text
stringlengths
6.38k
228k
### RAW ASSEMBLY INSTRUCTIONS: glabel alAudioFrame /* 319C0 800565C0 3C028008 */ lui $v0, %hi(gActiveSynDriverPtr) /* 319C4 800565C4 8C428E50 */ lw $v0, %lo(gActiveSynDriverPtr)($v0) /* 319C8 800565C8 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 319CC 800565CC AFB3002C */ sw $s3, 0x2C($sp) /* 319D0 800565D0 AFA40048 */ sw $a0, 0x48($sp) /* 319D4 800565D4 0080982D */ daddu $s3, $a0, $zero /* 319D8 800565D8 AFBF0044 */ sw $ra, 0x44($sp) /* 319DC 800565DC AFBE0040 */ sw $fp, 0x40($sp) /* 319E0 800565E0 AFB7003C */ sw $s7, 0x3C($sp) /* 319E4 800565E4 AFB60038 */ sw $s6, 0x38($sp) /* 319E8 800565E8 AFB50034 */ sw $s5, 0x34($sp) /* 319EC 800565EC AFB40030 */ sw $s4, 0x30($sp) /* 319F0 800565F0 AFB20028 */ sw $s2, 0x28($sp) /* 319F4 800565F4 AFB10024 */ sw $s1, 0x24($sp) /* 319F8 800565F8 AFB00020 */ sw $s0, 0x20($sp) /* 319FC 800565FC AFA5004C */ sw $a1, 0x4C($sp) /* 31A00 80056600 AFA70054 */ sw $a3, 0x54($sp) /* 31A04 80056604 14400003 */ bnez $v0, .L80056614 /* 31A08 80056608 AFA60010 */ sw $a2, 0x10($sp) /* 31A0C 8005660C 08015B40 */ j .L80056D00 /* 31A10 80056610 ACA00000 */ sw $zero, 0x0($a1) .L80056614: /* 31A14 80056614 0C014D70 */ jal snd_add_sfx_output /* 31A18 80056618 00000000 */ nop /* 31A1C 8005661C 3C028008 */ lui $v0, %hi(AuSynStereoDirty) /* 31A20 80056620 90428E5C */ lbu $v0, %lo(AuSynStereoDirty)($v0) /* 31A24 80056624 1040001B */ beqz $v0, .L80056694 /* 31A28 80056628 00000000 */ nop /* 31A2C 8005662C 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31A30 80056630 24638E54 */ addiu $v1, $v1, %lo(gSynDriverPtr) /* 31A34 80056634 8C620000 */ lw $v0, 0x0($v1) /* 31A38 80056638 8C42000C */ lw $v0, 0xC($v0) /* 31A3C 8005663C 18400013 */ blez $v0, .L8005668C /* 31A40 80056640 0000A82D */ daddu $s5, $zero, $zero /* 31A44 80056644 0060882D */ daddu $s1, $v1, $zero /* 31A48 80056648 24120001 */ addiu $s2, $zero, 0x1 /* 31A4C 8005664C 02A0802D */ daddu $s0, $s5, $zero .L80056650: /* 31A50 80056650 8E220000 */ lw $v0, 0x0($s1) /* 31A54 80056654 8C42001C */ lw $v0, 0x1C($v0) /* 31A58 80056658 00502021 */ addu $a0, $v0, $s0 /* 31A5C 8005665C 8C820070 */ lw $v0, 0x70($a0) /* 31A60 80056660 14520004 */ bne $v0, $s2, .L80056674 /* 31A64 80056664 00000000 */ nop /* 31A68 80056668 9085004D */ lbu $a1, 0x4D($a0) /* 31A6C 8005666C 0C015E1D */ jal au_syn_set_pan /* 31A70 80056670 32A400FF */ andi $a0, $s5, 0xFF .L80056674: /* 31A74 80056674 8E220000 */ lw $v0, 0x0($s1) /* 31A78 80056678 8C42000C */ lw $v0, 0xC($v0) /* 31A7C 8005667C 26B50001 */ addiu $s5, $s5, 0x1 /* 31A80 80056680 02A2102A */ slt $v0, $s5, $v0 /* 31A84 80056684 1440FFF2 */ bnez $v0, .L80056650 /* 31A88 80056688 2610007C */ addiu $s0, $s0, 0x7C .L8005668C: /* 31A8C 8005668C 3C018008 */ lui $at, %hi(AuSynStereoDirty) /* 31A90 80056690 A0208E5C */ sb $zero, %lo(AuSynStereoDirty)($at) .L80056694: /* 31A94 80056694 8FA90054 */ lw $t1, 0x54($sp) /* 31A98 80056698 19200194 */ blez $t1, .L80056CEC /* 31A9C 8005669C 00000000 */ nop /* 31AA0 800566A0 3C1E800A */ lui $fp, %hi(AuDelayCounter) /* 31AA4 800566A4 27DE3FE8 */ addiu $fp, $fp, %lo(AuDelayCounter) .L800566A8: /* 31AA8 800566A8 0C014CF4 */ jal au_update_clients_2 /* 31AAC 800566AC 0000A82D */ daddu $s5, $zero, $zero /* 31AB0 800566B0 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31AB4 800566B4 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 31AB8 800566B8 8C62000C */ lw $v0, 0xC($v1) /* 31ABC 800566BC 1840001E */ blez $v0, .L80056738 /* 31AC0 800566C0 24170001 */ addiu $s7, $zero, 0x1 /* 31AC4 800566C4 0060302D */ daddu $a2, $v1, $zero /* 31AC8 800566C8 02A0282D */ daddu $a1, $s5, $zero .L800566CC: /* 31ACC 800566CC 8CC2001C */ lw $v0, 0x1C($a2) /* 31AD0 800566D0 00452021 */ addu $a0, $v0, $a1 /* 31AD4 800566D4 90820078 */ lbu $v0, 0x78($a0) /* 31AD8 800566D8 240900FF */ addiu $t1, $zero, 0xFF /* 31ADC 800566DC 1049000E */ beq $v0, $t1, .L80056718 /* 31AE0 800566E0 0040182D */ daddu $v1, $v0, $zero /* 31AE4 800566E4 8CC20010 */ lw $v0, 0x10($a2) /* 31AE8 800566E8 0062102A */ slt $v0, $v1, $v0 /* 31AEC 800566EC 1040000A */ beqz $v0, .L80056718 /* 31AF0 800566F0 00031040 */ sll $v0, $v1, 1 /* 31AF4 800566F4 00431021 */ addu $v0, $v0, $v1 /* 31AF8 800566F8 8CC30020 */ lw $v1, 0x20($a2) /* 31AFC 800566FC 000210C0 */ sll $v0, $v0, 3 /* 31B00 80056700 0062A021 */ addu $s4, $v1, $v0 /* 31B04 80056704 8E820014 */ lw $v0, 0x14($s4) /* 31B08 80056708 50400002 */ beql $v0, $zero, .L80056714 /* 31B0C 8005670C AE840010 */ sw $a0, 0x10($s4) /* 31B10 80056710 AC440000 */ sw $a0, 0x0($v0) .L80056714: /* 31B14 80056714 AE840014 */ sw $a0, 0x14($s4) .L80056718: /* 31B18 80056718 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 31B1C 8005671C 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 31B20 80056720 8C42000C */ lw $v0, 0xC($v0) /* 31B24 80056724 26B50001 */ addiu $s5, $s5, 0x1 /* 31B28 80056728 02A2102A */ slt $v0, $s5, $v0 /* 31B2C 8005672C 1440FFE7 */ bnez $v0, .L800566CC /* 31B30 80056730 24A5007C */ addiu $a1, $a1, 0x7C /* 31B34 80056734 24170001 */ addiu $s7, $zero, 0x1 .L80056738: /* 31B38 80056738 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 31B3C 8005673C 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 31B40 80056740 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31B44 80056744 24638E54 */ addiu $v1, $v1, %lo(gSynDriverPtr) /* 31B48 80056748 8C420010 */ lw $v0, 0x10($v0) /* 31B4C 8005674C 18400110 */ blez $v0, .L80056B90 /* 31B50 80056750 0000A82D */ daddu $s5, $zero, $zero /* 31B54 80056754 02A0B02D */ daddu $s6, $s5, $zero .L80056758: /* 31B58 80056758 8C620000 */ lw $v0, 0x0($v1) /* 31B5C 8005675C 8C420020 */ lw $v0, 0x20($v0) /* 31B60 80056760 0056A021 */ addu $s4, $v0, $s6 /* 31B64 80056764 8E820010 */ lw $v0, 0x10($s4) /* 31B68 80056768 10400101 */ beqz $v0, .L80056B70 /* 31B6C 8005676C 3C020200 */ lui $v0, (0x20004E0 >> 16) /* 31B70 80056770 344204E0 */ ori $v0, $v0, (0x20004E0 & 0xFFFF) /* 31B74 80056774 0260182D */ daddu $v1, $s3, $zero /* 31B78 80056778 AC620000 */ sw $v0, 0x0($v1) /* 31B7C 8005677C 240205C0 */ addiu $v0, $zero, 0x5C0 /* 31B80 80056780 AC620004 */ sw $v0, 0x4($v1) /* 31B84 80056784 8E820010 */ lw $v0, 0x10($s4) /* 31B88 80056788 1040000B */ beqz $v0, .L800567B8 /* 31B8C 8005678C 26730008 */ addiu $s3, $s3, 0x8 .L80056790: /* 31B90 80056790 8E840010 */ lw $a0, 0x10($s4) /* 31B94 80056794 0C016014 */ jal au_pull_voice /* 31B98 80056798 0260282D */ daddu $a1, $s3, $zero /* 31B9C 8005679C 8E830010 */ lw $v1, 0x10($s4) /* 31BA0 800567A0 8C640000 */ lw $a0, 0x0($v1) /* 31BA4 800567A4 0040982D */ daddu $s3, $v0, $zero /* 31BA8 800567A8 AC600000 */ sw $zero, 0x0($v1) /* 31BAC 800567AC 1480FFF8 */ bnez $a0, .L80056790 /* 31BB0 800567B0 AE840010 */ sw $a0, 0x10($s4) /* 31BB4 800567B4 AE800014 */ sw $zero, 0x14($s4) .L800567B8: /* 31BB8 800567B8 9282000C */ lbu $v0, 0xC($s4) /* 31BBC 800567BC 1040000B */ beqz $v0, .L800567EC /* 31BC0 800567C0 0260282D */ daddu $a1, $s3, $zero /* 31BC4 800567C4 240607C0 */ addiu $a2, $zero, 0x7C0 /* 31BC8 800567C8 8E840004 */ lw $a0, 0x4($s4) /* 31BCC 800567CC 0C0164C4 */ jal au_pull_fx /* 31BD0 800567D0 0000382D */ daddu $a3, $zero, $zero /* 31BD4 800567D4 0040282D */ daddu $a1, $v0, $zero /* 31BD8 800567D8 24060930 */ addiu $a2, $zero, 0x930 /* 31BDC 800567DC 8E840008 */ lw $a0, 0x8($s4) /* 31BE0 800567E0 0C0164C4 */ jal au_pull_fx /* 31BE4 800567E4 0000382D */ daddu $a3, $zero, $zero /* 31BE8 800567E8 0040982D */ daddu $s3, $v0, $zero .L800567EC: /* 31BEC 800567EC 3C02800A */ lui $v0, %hi(AuDelayedVoiceGroup) /* 31BF0 800567F0 90423FEC */ lbu $v0, %lo(AuDelayedVoiceGroup)($v0) /* 31BF4 800567F4 16A20089 */ bne $s5, $v0, .L80056A1C /* 31BF8 800567F8 24020001 */ addiu $v0, $zero, 0x1 /* 31BFC 800567FC 3C03800A */ lui $v1, %hi(AuDelayedChannel) /* 31C00 80056800 84633FEE */ lh $v1, %lo(AuDelayedChannel)($v1) /* 31C04 80056804 10620006 */ beq $v1, $v0, .L80056820 /* 31C08 80056808 2410FFFF */ addiu $s0, $zero, -0x1 /* 31C0C 8005680C 24020002 */ addiu $v0, $zero, 0x2 /* 31C10 80056810 10620006 */ beq $v1, $v0, .L8005682C /* 31C14 80056814 00101400 */ sll $v0, $s0, 16 /* 31C18 80056818 08015A10 */ j .L80056840 /* 31C1C 8005681C 00021403 */ sra $v0, $v0, 16 .L80056820: /* 31C20 80056820 241004E0 */ addiu $s0, $zero, 0x4E0 /* 31C24 80056824 08015A0D */ j .L80056834 /* 31C28 80056828 240907C0 */ addiu $t1, $zero, 0x7C0 .L8005682C: /* 31C2C 8005682C 24100650 */ addiu $s0, $zero, 0x650 /* 31C30 80056830 24090930 */ addiu $t1, $zero, 0x930 .L80056834: /* 31C34 80056834 A7A9001E */ sh $t1, 0x1E($sp) /* 31C38 80056838 00101400 */ sll $v0, $s0, 16 /* 31C3C 8005683C 00021403 */ sra $v0, $v0, 16 .L80056840: /* 31C40 80056840 2403FFFF */ addiu $v1, $zero, -0x1 /* 31C44 80056844 10430075 */ beq $v0, $v1, .L80056A1C /* 31C48 80056848 0260882D */ daddu $s1, $s3, $zero /* 31C4C 8005684C 8FC30000 */ lw $v1, 0x0($fp) /* 31C50 80056850 3C02800A */ lui $v0, %hi(AuDelayCount) /* 31C54 80056854 8C423FF0 */ lw $v0, %lo(AuDelayCount)($v0) /* 31C58 80056858 14400002 */ bnez $v0, .L80056864 /* 31C5C 8005685C 0062001A */ div $zero, $v1, $v0 /* 31C60 80056860 0007000D */ break 7 .L80056864: /* 31C64 80056864 2401FFFF */ addiu $at, $zero, -0x1 /* 31C68 80056868 14410004 */ bne $v0, $at, .L8005687C /* 31C6C 8005686C 3C018000 */ lui $at, (0x80000000 >> 16) /* 31C70 80056870 14610002 */ bne $v1, $at, .L8005687C /* 31C74 80056874 00000000 */ nop /* 31C78 80056878 0006000D */ break 6 .L8005687C: /* 31C7C 8005687C 00002810 */ mfhi $a1 /* 31C80 80056880 32100FFF */ andi $s0, $s0, 0xFFF /* 31C84 80056884 3C090617 */ lui $t1, (0x6170000 >> 16) /* 31C88 80056888 02091025 */ or $v0, $s0, $t1 /* 31C8C 8005688C AE220000 */ sw $v0, 0x0($s1) /* 31C90 80056890 3C02800A */ lui $v0, %hi(AuDelayBufferMain) /* 31C94 80056894 8C423FE0 */ lw $v0, %lo(AuDelayBufferMain)($v0) /* 31C98 80056898 00052040 */ sll $a0, $a1, 1 /* 31C9C 8005689C 00852021 */ addu $a0, $a0, $a1 /* 31CA0 800568A0 000420C0 */ sll $a0, $a0, 3 /* 31CA4 800568A4 00852023 */ subu $a0, $a0, $a1 /* 31CA8 800568A8 00042100 */ sll $a0, $a0, 4 /* 31CAC 800568AC 0C0187A4 */ jal osVirtualToPhysical /* 31CB0 800568B0 00442021 */ addu $a0, $v0, $a0 /* 31CB4 800568B4 8FC30000 */ lw $v1, 0x0($fp) /* 31CB8 800568B8 3C04800A */ lui $a0, %hi(AuDelayCount) /* 31CBC 800568BC 8C843FF0 */ lw $a0, %lo(AuDelayCount)($a0) /* 31CC0 800568C0 24630001 */ addiu $v1, $v1, 0x1 /* 31CC4 800568C4 14800002 */ bnez $a0, .L800568D0 /* 31CC8 800568C8 0064001A */ div $zero, $v1, $a0 /* 31CCC 800568CC 0007000D */ break 7 .L800568D0: /* 31CD0 800568D0 2401FFFF */ addiu $at, $zero, -0x1 /* 31CD4 800568D4 14810004 */ bne $a0, $at, .L800568E8 /* 31CD8 800568D8 3C018000 */ lui $at, (0x80000000 >> 16) /* 31CDC 800568DC 14610002 */ bne $v1, $at, .L800568E8 /* 31CE0 800568E0 00000000 */ nop /* 31CE4 800568E4 0006000D */ break 6 .L800568E8: /* 31CE8 800568E8 00002810 */ mfhi $a1 /* 31CEC 800568EC 26730008 */ addiu $s3, $s3, 0x8 /* 31CF0 800568F0 AE220004 */ sw $v0, 0x4($s1) /* 31CF4 800568F4 0260882D */ daddu $s1, $s3, $zero /* 31CF8 800568F8 3C090417 */ lui $t1, (0x4170000 >> 16) /* 31CFC 800568FC 3C02800A */ lui $v0, %hi(AuDelayBufferMain) /* 31D00 80056900 8C423FE0 */ lw $v0, %lo(AuDelayBufferMain)($v0) /* 31D04 80056904 02098025 */ or $s0, $s0, $t1 /* 31D08 80056908 AE300000 */ sw $s0, 0x0($s1) /* 31D0C 8005690C 00052040 */ sll $a0, $a1, 1 /* 31D10 80056910 00852021 */ addu $a0, $a0, $a1 /* 31D14 80056914 000420C0 */ sll $a0, $a0, 3 /* 31D18 80056918 00852023 */ subu $a0, $a0, $a1 /* 31D1C 8005691C 00042100 */ sll $a0, $a0, 4 /* 31D20 80056920 0C0187A4 */ jal osVirtualToPhysical /* 31D24 80056924 00442021 */ addu $a0, $v0, $a0 /* 31D28 80056928 8FC40000 */ lw $a0, 0x0($fp) /* 31D2C 8005692C 3C03800A */ lui $v1, %hi(AuDelayCount) /* 31D30 80056930 8C633FF0 */ lw $v1, %lo(AuDelayCount)($v1) /* 31D34 80056934 14600002 */ bnez $v1, .L80056940 /* 31D38 80056938 0083001A */ div $zero, $a0, $v1 /* 31D3C 8005693C 0007000D */ break 7 .L80056940: /* 31D40 80056940 2401FFFF */ addiu $at, $zero, -0x1 /* 31D44 80056944 14610004 */ bne $v1, $at, .L80056958 /* 31D48 80056948 3C018000 */ lui $at, (0x80000000 >> 16) /* 31D4C 8005694C 14810002 */ bne $a0, $at, .L80056958 /* 31D50 80056950 00000000 */ nop /* 31D54 80056954 0006000D */ break 6 .L80056958: /* 31D58 80056958 00001810 */ mfhi $v1 /* 31D5C 8005695C 26730008 */ addiu $s3, $s3, 0x8 /* 31D60 80056960 AE220004 */ sw $v0, 0x4($s1) /* 31D64 80056964 97A9001E */ lhu $t1, 0x1E($sp) /* 31D68 80056968 0260902D */ daddu $s2, $s3, $zero /* 31D6C 8005696C 31300FFF */ andi $s0, $t1, 0xFFF /* 31D70 80056970 3C090617 */ lui $t1, (0x6170000 >> 16) /* 31D74 80056974 02091025 */ or $v0, $s0, $t1 /* 31D78 80056978 AE420000 */ sw $v0, 0x0($s2) /* 31D7C 8005697C 3C02800A */ lui $v0, %hi(AuDelayBufferAux) /* 31D80 80056980 8C423FE4 */ lw $v0, %lo(AuDelayBufferAux)($v0) /* 31D84 80056984 00032040 */ sll $a0, $v1, 1 /* 31D88 80056988 00832021 */ addu $a0, $a0, $v1 /* 31D8C 8005698C 000420C0 */ sll $a0, $a0, 3 /* 31D90 80056990 00832023 */ subu $a0, $a0, $v1 /* 31D94 80056994 00042100 */ sll $a0, $a0, 4 /* 31D98 80056998 0C0187A4 */ jal osVirtualToPhysical /* 31D9C 8005699C 00442021 */ addu $a0, $v0, $a0 /* 31DA0 800569A0 8FC30000 */ lw $v1, 0x0($fp) /* 31DA4 800569A4 3C04800A */ lui $a0, %hi(AuDelayCount) /* 31DA8 800569A8 8C843FF0 */ lw $a0, %lo(AuDelayCount)($a0) /* 31DAC 800569AC 24630001 */ addiu $v1, $v1, 0x1 /* 31DB0 800569B0 14800002 */ bnez $a0, .L800569BC /* 31DB4 800569B4 0064001A */ div $zero, $v1, $a0 /* 31DB8 800569B8 0007000D */ break 7 .L800569BC: /* 31DBC 800569BC 2401FFFF */ addiu $at, $zero, -0x1 /* 31DC0 800569C0 14810004 */ bne $a0, $at, .L800569D4 /* 31DC4 800569C4 3C018000 */ lui $at, (0x80000000 >> 16) /* 31DC8 800569C8 14610002 */ bne $v1, $at, .L800569D4 /* 31DCC 800569CC 00000000 */ nop /* 31DD0 800569D0 0006000D */ break 6 .L800569D4: /* 31DD4 800569D4 00002810 */ mfhi $a1 /* 31DD8 800569D8 26730008 */ addiu $s3, $s3, 0x8 /* 31DDC 800569DC 0260882D */ daddu $s1, $s3, $zero /* 31DE0 800569E0 26730008 */ addiu $s3, $s3, 0x8 /* 31DE4 800569E4 3C090417 */ lui $t1, (0x4170000 >> 16) /* 31DE8 800569E8 AE420004 */ sw $v0, 0x4($s2) /* 31DEC 800569EC 3C02800A */ lui $v0, %hi(AuDelayBufferAux) /* 31DF0 800569F0 8C423FE4 */ lw $v0, %lo(AuDelayBufferAux)($v0) /* 31DF4 800569F4 02098025 */ or $s0, $s0, $t1 /* 31DF8 800569F8 AE300000 */ sw $s0, 0x0($s1) /* 31DFC 800569FC 00052040 */ sll $a0, $a1, 1 /* 31E00 80056A00 00852021 */ addu $a0, $a0, $a1 /* 31E04 80056A04 000420C0 */ sll $a0, $a0, 3 /* 31E08 80056A08 00852023 */ subu $a0, $a0, $a1 /* 31E0C 80056A0C 00042100 */ sll $a0, $a0, 4 /* 31E10 80056A10 0C0187A4 */ jal osVirtualToPhysical /* 31E14 80056A14 00442021 */ addu $a0, $v0, $a0 /* 31E18 80056A18 AE220004 */ sw $v0, 0x4($s1) .L80056A1C: /* 31E1C 80056A1C 12E00007 */ beqz $s7, .L80056A3C /* 31E20 80056A20 0260102D */ daddu $v0, $s3, $zero /* 31E24 80056A24 26730008 */ addiu $s3, $s3, 0x8 /* 31E28 80056A28 3C030200 */ lui $v1, (0x2000000 >> 16) /* 31E2C 80056A2C AC430000 */ sw $v1, 0x0($v0) /* 31E30 80056A30 240302E0 */ addiu $v1, $zero, 0x2E0 /* 31E34 80056A34 08015A98 */ j .L80056A60 /* 31E38 80056A38 AC430004 */ sw $v1, 0x4($v0) .L80056A3C: /* 31E3C 80056A3C 0260802D */ daddu $s0, $s3, $zero /* 31E40 80056A40 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31E44 80056A44 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 31E48 80056A48 3C02042E */ lui $v0, (0x42E0000 >> 16) /* 31E4C 80056A4C AE020000 */ sw $v0, 0x0($s0) /* 31E50 80056A50 8C640028 */ lw $a0, 0x28($v1) /* 31E54 80056A54 0C0187A4 */ jal osVirtualToPhysical /* 31E58 80056A58 26730008 */ addiu $s3, $s3, 0x8 /* 31E5C 80056A5C AE020004 */ sw $v0, 0x4($s0) .L80056A60: /* 31E60 80056A60 0260202D */ daddu $a0, $s3, $zero /* 31E64 80056A64 26730008 */ addiu $s3, $s3, 0x8 /* 31E68 80056A68 0260282D */ daddu $a1, $s3, $zero /* 31E6C 80056A6C 26730008 */ addiu $s3, $s3, 0x8 /* 31E70 80056A70 3C060930 */ lui $a2, (0x9300170 >> 16) /* 31E74 80056A74 3C0207C0 */ lui $v0, (0x7C00000 >> 16) /* 31E78 80056A78 3C090C00 */ lui $t1, (0xC000000 >> 16) /* 31E7C 80056A7C 96830000 */ lhu $v1, 0x0($s4) /* 31E80 80056A80 34C60170 */ ori $a2, $a2, (0x9300170 & 0xFFFF) /* 31E84 80056A84 AC820004 */ sw $v0, 0x4($a0) /* 31E88 80056A88 00691825 */ or $v1, $v1, $t1 /* 31E8C 80056A8C AC830000 */ sw $v1, 0x0($a0) /* 31E90 80056A90 96820000 */ lhu $v0, 0x0($s4) /* 31E94 80056A94 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31E98 80056A98 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 31E9C 80056A9C 0260802D */ daddu $s0, $s3, $zero /* 31EA0 80056AA0 ACA60004 */ sw $a2, 0x4($a1) /* 31EA4 80056AA4 00491025 */ or $v0, $v0, $t1 /* 31EA8 80056AA8 ACA20000 */ sw $v0, 0x0($a1) /* 31EAC 80056AAC 3C02062E */ lui $v0, (0x62E0000 >> 16) /* 31EB0 80056AB0 AE020000 */ sw $v0, 0x0($s0) /* 31EB4 80056AB4 8C640028 */ lw $a0, 0x28($v1) /* 31EB8 80056AB8 0C0187A4 */ jal osVirtualToPhysical /* 31EBC 80056ABC 26730008 */ addiu $s3, $s3, 0x8 /* 31EC0 80056AC0 12E00009 */ beqz $s7, .L80056AE8 /* 31EC4 80056AC4 AE020004 */ sw $v0, 0x4($s0) /* 31EC8 80056AC8 0260102D */ daddu $v0, $s3, $zero /* 31ECC 80056ACC 26730008 */ addiu $s3, $s3, 0x8 /* 31ED0 80056AD0 0000B82D */ daddu $s7, $zero, $zero /* 31ED4 80056AD4 3C030200 */ lui $v1, (0x2000000 >> 16) /* 31ED8 80056AD8 AC430000 */ sw $v1, 0x0($v0) /* 31EDC 80056ADC 240302E0 */ addiu $v1, $zero, 0x2E0 /* 31EE0 80056AE0 08015AC3 */ j .L80056B0C /* 31EE4 80056AE4 AC430004 */ sw $v1, 0x4($v0) .L80056AE8: /* 31EE8 80056AE8 0260802D */ daddu $s0, $s3, $zero /* 31EEC 80056AEC 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31EF0 80056AF0 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 31EF4 80056AF4 3C02042E */ lui $v0, (0x42E0000 >> 16) /* 31EF8 80056AF8 AE020000 */ sw $v0, 0x0($s0) /* 31EFC 80056AFC 8C640024 */ lw $a0, 0x24($v1) /* 31F00 80056B00 0C0187A4 */ jal osVirtualToPhysical /* 31F04 80056B04 26730008 */ addiu $s3, $s3, 0x8 /* 31F08 80056B08 AE020004 */ sw $v0, 0x4($s0) .L80056B0C: /* 31F0C 80056B0C 0260202D */ daddu $a0, $s3, $zero /* 31F10 80056B10 26730008 */ addiu $s3, $s3, 0x8 /* 31F14 80056B14 0260282D */ daddu $a1, $s3, $zero /* 31F18 80056B18 26730008 */ addiu $s3, $s3, 0x8 /* 31F1C 80056B1C 3C060650 */ lui $a2, (0x6500170 >> 16) /* 31F20 80056B20 3C0204E0 */ lui $v0, (0x4E00000 >> 16) /* 31F24 80056B24 3C090C00 */ lui $t1, (0xC000000 >> 16) /* 31F28 80056B28 96830000 */ lhu $v1, 0x0($s4) /* 31F2C 80056B2C 34C60170 */ ori $a2, $a2, (0x6500170 & 0xFFFF) /* 31F30 80056B30 AC820004 */ sw $v0, 0x4($a0) /* 31F34 80056B34 00691825 */ or $v1, $v1, $t1 /* 31F38 80056B38 AC830000 */ sw $v1, 0x0($a0) /* 31F3C 80056B3C 96820000 */ lhu $v0, 0x0($s4) /* 31F40 80056B40 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31F44 80056B44 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 31F48 80056B48 0260802D */ daddu $s0, $s3, $zero /* 31F4C 80056B4C ACA60004 */ sw $a2, 0x4($a1) /* 31F50 80056B50 00491025 */ or $v0, $v0, $t1 /* 31F54 80056B54 ACA20000 */ sw $v0, 0x0($a1) /* 31F58 80056B58 3C02062E */ lui $v0, (0x62E0000 >> 16) /* 31F5C 80056B5C AE020000 */ sw $v0, 0x0($s0) /* 31F60 80056B60 8C640024 */ lw $a0, 0x24($v1) /* 31F64 80056B64 0C0187A4 */ jal osVirtualToPhysical /* 31F68 80056B68 26730008 */ addiu $s3, $s3, 0x8 /* 31F6C 80056B6C AE020004 */ sw $v0, 0x4($s0) .L80056B70: /* 31F70 80056B70 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31F74 80056B74 24638E54 */ addiu $v1, $v1, %lo(gSynDriverPtr) /* 31F78 80056B78 8C620000 */ lw $v0, 0x0($v1) /* 31F7C 80056B7C 8C420010 */ lw $v0, 0x10($v0) /* 31F80 80056B80 26B50001 */ addiu $s5, $s5, 0x1 /* 31F84 80056B84 02A2102A */ slt $v0, $s5, $v0 /* 31F88 80056B88 1440FEF3 */ bnez $v0, .L80056758 /* 31F8C 80056B8C 26D60018 */ addiu $s6, $s6, 0x18 .L80056B90: /* 31F90 80056B90 0260182D */ daddu $v1, $s3, $zero /* 31F94 80056B94 26730008 */ addiu $s3, $s3, 0x8 /* 31F98 80056B98 3C0404E0 */ lui $a0, (0x4E002E0 >> 16) /* 31F9C 80056B9C 348402E0 */ ori $a0, $a0, (0x4E002E0 & 0xFFFF) /* 31FA0 80056BA0 3C05042E */ lui $a1, (0x42E07C0 >> 16) /* 31FA4 80056BA4 34A507C0 */ ori $a1, $a1, (0x42E07C0 & 0xFFFF) /* 31FA8 80056BA8 3C020A00 */ lui $v0, (0xA000000 >> 16) /* 31FAC 80056BAC AC620000 */ sw $v0, 0x0($v1) /* 31FB0 80056BB0 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 31FB4 80056BB4 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 31FB8 80056BB8 0260802D */ daddu $s0, $s3, $zero /* 31FBC 80056BBC AC640004 */ sw $a0, 0x4($v1) /* 31FC0 80056BC0 AE050000 */ sw $a1, 0x0($s0) /* 31FC4 80056BC4 8C440028 */ lw $a0, 0x28($v0) /* 31FC8 80056BC8 0C0187A4 */ jal osVirtualToPhysical /* 31FCC 80056BCC 26730008 */ addiu $s3, $s3, 0x8 /* 31FD0 80056BD0 0260382D */ daddu $a3, $s3, $zero /* 31FD4 80056BD4 26730008 */ addiu $s3, $s3, 0x8 /* 31FD8 80056BD8 3C060C00 */ lui $a2, (0xC007FFF >> 16) /* 31FDC 80056BDC 34C67FFF */ ori $a2, $a2, (0xC007FFF & 0xFFFF) /* 31FE0 80056BE0 3C0807C0 */ lui $t0, (0x7C004E0 >> 16) /* 31FE4 80056BE4 350804E0 */ ori $t0, $t0, (0x7C004E0 & 0xFFFF) /* 31FE8 80056BE8 0260182D */ daddu $v1, $s3, $zero /* 31FEC 80056BEC 26730008 */ addiu $s3, $s3, 0x8 /* 31FF0 80056BF0 3C040930 */ lui $a0, (0x9300650 >> 16) /* 31FF4 80056BF4 3C058008 */ lui $a1, %hi(AuUseGlobalVolume) /* 31FF8 80056BF8 90A58E58 */ lbu $a1, %lo(AuUseGlobalVolume)($a1) /* 31FFC 80056BFC 34840650 */ ori $a0, $a0, (0x9300650 & 0xFFFF) /* 32000 80056C00 AE020004 */ sw $v0, 0x4($s0) /* 32004 80056C04 ACE60000 */ sw $a2, 0x0($a3) /* 32008 80056C08 ACE80004 */ sw $t0, 0x4($a3) /* 3200C 80056C0C AC660000 */ sw $a2, 0x0($v1) /* 32010 80056C10 10A0001D */ beqz $a1, .L80056C88 /* 32014 80056C14 AC640004 */ sw $a0, 0x4($v1) /* 32018 80056C18 0260202D */ daddu $a0, $s3, $zero /* 3201C 80056C1C 26730008 */ addiu $s3, $s3, 0x8 /* 32020 80056C20 3C020A00 */ lui $v0, (0xA0004E0 >> 16) /* 32024 80056C24 344204E0 */ ori $v0, $v0, (0xA0004E0 & 0xFFFF) /* 32028 80056C28 0260182D */ daddu $v1, $s3, $zero /* 3202C 80056C2C 26730008 */ addiu $s3, $s3, 0x8 /* 32030 80056C30 3C070200 */ lui $a3, (0x20004E0 >> 16) /* 32034 80056C34 34E704E0 */ ori $a3, $a3, (0x20004E0 & 0xFFFF) /* 32038 80056C38 0260282D */ daddu $a1, $s3, $zero /* 3203C 80056C3C 26730008 */ addiu $s3, $s3, 0x8 /* 32040 80056C40 0260302D */ daddu $a2, $s3, $zero /* 32044 80056C44 26730008 */ addiu $s3, $s3, 0x8 /* 32048 80056C48 3C080170 */ lui $t0, (0x1700650 >> 16) /* 3204C 80056C4C 35080650 */ ori $t0, $t0, (0x1700650 & 0xFFFF) /* 32050 80056C50 AC820000 */ sw $v0, 0x0($a0) /* 32054 80056C54 240202E0 */ addiu $v0, $zero, 0x2E0 /* 32058 80056C58 AC820004 */ sw $v0, 0x4($a0) /* 3205C 80056C5C AC670000 */ sw $a3, 0x0($v1) /* 32060 80056C60 AC620004 */ sw $v0, 0x4($v1) /* 32064 80056C64 3C038008 */ lui $v1, %hi(AuGlobalVolume) /* 32068 80056C68 94638E5A */ lhu $v1, %lo(AuGlobalVolume)($v1) /* 3206C 80056C6C 240204E0 */ addiu $v0, $zero, 0x4E0 /* 32070 80056C70 ACA20004 */ sw $v0, 0x4($a1) /* 32074 80056C74 3C020C00 */ lui $v0, (0xC000000 >> 16) /* 32078 80056C78 00621825 */ or $v1, $v1, $v0 /* 3207C 80056C7C ACA30000 */ sw $v1, 0x0($a1) /* 32080 80056C80 ACC30000 */ sw $v1, 0x0($a2) /* 32084 80056C84 ACC80004 */ sw $t0, 0x4($a2) .L80056C88: /* 32088 80056C88 0260202D */ daddu $a0, $s3, $zero /* 3208C 80056C8C 26730008 */ addiu $s3, $s3, 0x8 /* 32090 80056C90 0260182D */ daddu $v1, $s3, $zero /* 32094 80056C94 8FA90054 */ lw $t1, 0x54($sp) /* 32098 80056C98 3C020D00 */ lui $v0, (0xD000000 >> 16) /* 3209C 80056C9C 2529FF48 */ addiu $t1, $t1, -0xB8 /* 320A0 80056CA0 AFA90054 */ sw $t1, 0x54($sp) /* 320A4 80056CA4 AC820000 */ sw $v0, 0x0($a0) /* 320A8 80056CA8 8FA90010 */ lw $t1, 0x10($sp) /* 320AC 80056CAC 3C048008 */ lui $a0, %hi(gSynDriverPtr) /* 320B0 80056CB0 8C848E54 */ lw $a0, %lo(gSynDriverPtr)($a0) /* 320B4 80056CB4 3C02062E */ lui $v0, (0x62E0000 >> 16) /* 320B8 80056CB8 AC690004 */ sw $t1, 0x4($v1) /* 320BC 80056CBC 252902E0 */ addiu $t1, $t1, 0x2E0 /* 320C0 80056CC0 AFA90010 */ sw $t1, 0x10($sp) /* 320C4 80056CC4 AC620000 */ sw $v0, 0x0($v1) /* 320C8 80056CC8 8FC20000 */ lw $v0, 0x0($fp) /* 320CC 80056CCC 8C830000 */ lw $v1, 0x0($a0) /* 320D0 80056CD0 24420001 */ addiu $v0, $v0, 0x1 /* 320D4 80056CD4 246300B8 */ addiu $v1, $v1, 0xB8 /* 320D8 80056CD8 AFC20000 */ sw $v0, 0x0($fp) /* 320DC 80056CDC AC830000 */ sw $v1, 0x0($a0) /* 320E0 80056CE0 8FA90054 */ lw $t1, 0x54($sp) /* 320E4 80056CE4 1D20FE70 */ bgtz $t1, .L800566A8 /* 320E8 80056CE8 26730008 */ addiu $s3, $s3, 0x8 .L80056CEC: /* 320EC 80056CEC 8FA90048 */ lw $t1, 0x48($sp) /* 320F0 80056CF0 02691023 */ subu $v0, $s3, $t1 /* 320F4 80056CF4 8FA9004C */ lw $t1, 0x4C($sp) /* 320F8 80056CF8 000210C3 */ sra $v0, $v0, 3 /* 320FC 80056CFC AD220000 */ sw $v0, 0x0($t1) .L80056D00: /* 32100 80056D00 0260102D */ daddu $v0, $s3, $zero /* 32104 80056D04 8FBF0044 */ lw $ra, 0x44($sp) /* 32108 80056D08 8FBE0040 */ lw $fp, 0x40($sp) /* 3210C 80056D0C 8FB7003C */ lw $s7, 0x3C($sp) /* 32110 80056D10 8FB60038 */ lw $s6, 0x38($sp) /* 32114 80056D14 8FB50034 */ lw $s5, 0x34($sp) /* 32118 80056D18 8FB40030 */ lw $s4, 0x30($sp) /* 3211C 80056D1C 8FB3002C */ lw $s3, 0x2C($sp) /* 32120 80056D20 8FB20028 */ lw $s2, 0x28($sp) /* 32124 80056D24 8FB10024 */ lw $s1, 0x24($sp) /* 32128 80056D28 8FB00020 */ lw $s0, 0x20($sp) /* 3212C 80056D2C 03E00008 */ jr $ra /* 32130 80056D30 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: Acmd* alAudioFrame(Acmd* cmdList, s32* cmdLen, s16* outBuf, s32 outLen) { Acmd* cmdListPos; AuPVoice* pvoice; AuFxBus* fxBus; s16* bufPos; s16 auxOut; s16 mainOut; s32 i; s32 first = FALSE; cmdListPos = cmdList; bufPos = outBuf; if (gActiveSynDriverPtr == NULL) { *cmdLen = 0; } else { au_update_players_main(); if (AuSynStereoDirty) { for (i = 0; i < gSynDriverPtr->num_pvoice; i++) { pvoice = &gSynDriverPtr->pvoices[i]; if (pvoice->envMixer.motion == AL_PLAYING) { au_syn_set_pan(i, pvoice->envMixer.pan); } } AuSynStereoDirty = FALSE; } while (outLen > 0) { au_update_clients_2(); for (i = 0; i < gSynDriverPtr->num_pvoice; i++) { pvoice = &gSynDriverPtr->pvoices[i]; if ((pvoice->busId != 0xFF) && (pvoice->busId < gSynDriverPtr->num_bus)) { fxBus = &gSynDriverPtr->fxBus[pvoice->busId]; if (fxBus->tail != NULL) { fxBus->tail->next = pvoice; } else { fxBus->head = pvoice; } fxBus->tail = pvoice; } } first = TRUE; for (i = 0; i < gSynDriverPtr->num_bus; i++) { fxBus = &gSynDriverPtr->fxBus[i]; if (fxBus->head != NULL) { // clear all main and aux outputs aClearBuffer(cmdListPos++, N_AL_MAIN_L_OUT, 8 * AUDIO_SAMPLES); if (fxBus->head != NULL) { AuPVoice* next; do { cmdListPos = au_pull_voice(fxBus->head, cmdListPos); next = fxBus->head->next; fxBus->head->next = NULL; fxBus->head = next; } while (next != NULL); fxBus->tail = NULL; } if (fxBus->currentEffectType != AU_FX_NONE) { cmdListPos = au_pull_fx(fxBus->fxL, cmdListPos, N_AL_AUX_L_OUT, 0); cmdListPos = au_pull_fx(fxBus->fxR, cmdListPos, N_AL_AUX_R_OUT, 0); } // apply channel delay if (i == AuDelayedVoiceGroup) { mainOut = -1; switch (AuDelayedChannel) { case 1: mainOut = N_AL_MAIN_L_OUT; auxOut = N_AL_AUX_L_OUT; break; case 2: mainOut = N_AL_MAIN_R_OUT; auxOut = N_AL_AUX_R_OUT; break; } if (mainOut != -1) { n_aSaveBuffer(cmdListPos++, 2 * AUDIO_SAMPLES, mainOut, osVirtualToPhysical(AuDelayBufferMain + (AuDelayCounter % AuDelayCount) * AUDIO_SAMPLES)); n_aLoadBuffer(cmdListPos++, 2 * AUDIO_SAMPLES, mainOut, osVirtualToPhysical(AuDelayBufferMain + ((AuDelayCounter + 1) % AuDelayCount) * AUDIO_SAMPLES)); n_aSaveBuffer(cmdListPos++, 2 * AUDIO_SAMPLES, auxOut, osVirtualToPhysical(AuDelayBufferAux + (AuDelayCounter % AuDelayCount) * AUDIO_SAMPLES)); n_aLoadBuffer(cmdListPos++, 2 * AUDIO_SAMPLES, auxOut, osVirtualToPhysical(AuDelayBufferAux + ((AuDelayCounter + 1) % AuDelayCount) * AUDIO_SAMPLES)); } } // mix voice groups if (first) { aClearBuffer(cmdListPos++, 0, 4 * AUDIO_SAMPLES); } else { n_aLoadBuffer(cmdListPos++, 4 * AUDIO_SAMPLES, 0, osVirtualToPhysical(gSynDriverPtr->savedAuxOut)); } aMix(cmdListPos++, 0, fxBus->gain, N_AL_AUX_L_OUT, 0); aMix(cmdListPos++, 0, fxBus->gain, N_AL_AUX_R_OUT, 2 * AUDIO_SAMPLES); n_aSaveBuffer(cmdListPos++, 4 * AUDIO_SAMPLES, 0, osVirtualToPhysical(gSynDriverPtr->savedAuxOut)); if (first) { aClearBuffer(cmdListPos++, 0, 4 * AUDIO_SAMPLES); first = FALSE; } else { n_aLoadBuffer(cmdListPos++, 4 * AUDIO_SAMPLES, 0, osVirtualToPhysical(gSynDriverPtr->savedMainOut)); } aMix(cmdListPos++, 0, fxBus->gain, N_AL_MAIN_L_OUT, 0); aMix(cmdListPos++, 0, fxBus->gain, N_AL_MAIN_R_OUT, 2 * AUDIO_SAMPLES); n_aSaveBuffer(cmdListPos++, 4 * AUDIO_SAMPLES, 0, osVirtualToPhysical(gSynDriverPtr->savedMainOut)); } } aDMEMMove(cmdListPos++, 0, N_AL_MAIN_L_OUT, 4 * AUDIO_SAMPLES); n_aLoadBuffer(cmdListPos++, 4 * AUDIO_SAMPLES, N_AL_AUX_L_OUT, osVirtualToPhysical(gSynDriverPtr->savedAuxOut)); aMix(cmdListPos++, 0, 0x7FFF, N_AL_AUX_L_OUT, N_AL_MAIN_L_OUT); aMix(cmdListPos++, 0, 0x7FFF, N_AL_AUX_R_OUT, N_AL_MAIN_R_OUT); if (AuUseGlobalVolume) { u16 vol; aDMEMMove(cmdListPos++, N_AL_MAIN_L_OUT, 0, 4 * AUDIO_SAMPLES); aClearBuffer(cmdListPos++, N_AL_MAIN_L_OUT, 4 * AUDIO_SAMPLES); vol = AuGlobalVolume; aMix(cmdListPos++, 0, vol, 0, N_AL_MAIN_L_OUT); aMix(cmdListPos++, 0, vol, 2 * AUDIO_SAMPLES, N_AL_MAIN_R_OUT); } outLen -= AUDIO_SAMPLES; n_aInterleave(cmdListPos++); n_aSaveBuffer(cmdListPos++, 4 * AUDIO_SAMPLES, 0, bufPos); bufPos += 2 * AUDIO_SAMPLES; AuDelayCounter++; gSynDriverPtr->curSamples += AUDIO_SAMPLES; } *cmdLen = (cmdListPos - cmdList); } return cmdListPos; }
### RAW ASSEMBLY INSTRUCTIONS: glabel create_shading_palette /* DE8C4 801481C4 27BDFF08 */ addiu $sp, $sp, -0xF8 /* DE8C8 801481C8 AFB300AC */ sw $s3, 0xAC($sp) /* DE8CC 801481CC 0080982D */ daddu $s3, $a0, $zero /* DE8D0 801481D0 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* DE8D4 801481D4 44819000 */ mtc1 $at, $f18 /* DE8D8 801481D8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* DE8DC 801481DC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* DE8E0 801481E0 3C04800B */ lui $a0, %hi(gCameras) /* DE8E4 801481E4 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* DE8E8 801481E8 AFBF00C4 */ sw $ra, 0xC4($sp) /* DE8EC 801481EC AFBE00C0 */ sw $fp, 0xC0($sp) /* DE8F0 801481F0 AFB700BC */ sw $s7, 0xBC($sp) /* DE8F4 801481F4 AFB600B8 */ sw $s6, 0xB8($sp) /* DE8F8 801481F8 AFB500B4 */ sw $s5, 0xB4($sp) /* DE8FC 801481FC AFB400B0 */ sw $s4, 0xB0($sp) /* DE900 80148200 AFB200A8 */ sw $s2, 0xA8($sp) /* DE904 80148204 AFB100A4 */ sw $s1, 0xA4($sp) /* DE908 80148208 AFB000A0 */ sw $s0, 0xA0($sp) /* DE90C 8014820C F7BE00F0 */ sdc1 $f30, 0xF0($sp) /* DE910 80148210 F7BC00E8 */ sdc1 $f28, 0xE8($sp) /* DE914 80148214 F7BA00E0 */ sdc1 $f26, 0xE0($sp) /* DE918 80148218 F7B800D8 */ sdc1 $f24, 0xD8($sp) /* DE91C 8014821C F7B600D0 */ sdc1 $f22, 0xD0($sp) /* DE920 80148220 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* DE924 80148224 AFA70104 */ sw $a3, 0x104($sp) /* DE928 80148228 AFA0004C */ sw $zero, 0x4C($sp) /* DE92C 8014822C 00031080 */ sll $v0, $v1, 2 /* DE930 80148230 00431021 */ addu $v0, $v0, $v1 /* DE934 80148234 00021080 */ sll $v0, $v0, 2 /* DE938 80148238 00431023 */ subu $v0, $v0, $v1 /* DE93C 8014823C 000218C0 */ sll $v1, $v0, 3 /* DE940 80148240 00431021 */ addu $v0, $v0, $v1 /* DE944 80148244 E7B20060 */ swc1 $f18, 0x60($sp) /* DE948 80148248 C7B2004C */ lwc1 $f18, 0x4C($sp) /* DE94C 8014824C 000210C0 */ sll $v0, $v0, 3 /* DE950 80148250 E7B20048 */ swc1 $f18, 0x48($sp) /* DE954 80148254 E7B20050 */ swc1 $f18, 0x50($sp) /* DE958 80148258 E7B2007C */ swc1 $f18, 0x7C($sp) /* DE95C 8014825C E7B20078 */ swc1 $f18, 0x78($sp) /* DE960 80148260 E7B20080 */ swc1 $f18, 0x80($sp) /* DE964 80148264 E7B20084 */ swc1 $f18, 0x84($sp) /* DE968 80148268 E7B20088 */ swc1 $f18, 0x88($sp) /* DE96C 8014826C C6720008 */ lwc1 $f18, 0x8($s3) /* DE970 80148270 00441021 */ addu $v0, $v0, $a0 /* DE974 80148274 46009087 */ neg.s $f2, $f18 /* DE978 80148278 E7B20064 */ swc1 $f18, 0x64($sp) /* DE97C 8014827C C7B20080 */ lwc1 $f18, 0x80($sp) /* DE980 80148280 C44000DC */ lwc1 $f0, 0xDC($v0) /* DE984 80148284 E7B2008C */ swc1 $f18, 0x8C($sp) /* DE988 80148288 C6720028 */ lwc1 $f18, 0x28($s3) /* DE98C 8014828C 46001082 */ mul.s $f2, $f2, $f0 /* DE990 80148290 00000000 */ nop /* DE994 80148294 E7B20068 */ swc1 $f18, 0x68($sp) /* DE998 80148298 C44000FC */ lwc1 $f0, 0xFC($v0) /* DE99C 8014829C C7B20080 */ lwc1 $f18, 0x80($sp) /* DE9A0 801482A0 3C028015 */ lui $v0, %hi(gSpriteShadingProfile) /* DE9A4 801482A4 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0) /* DE9A8 801482A8 8FB40108 */ lw $s4, 0x108($sp) /* DE9AC 801482AC E7B20090 */ swc1 $f18, 0x90($sp) /* DE9B0 801482B0 C7B20068 */ lwc1 $f18, 0x68($sp) /* DE9B4 801482B4 8FB5010C */ lw $s5, 0x10C($sp) /* DE9B8 801482B8 46009002 */ mul.s $f0, $f18, $f0 /* DE9BC 801482BC 00000000 */ nop /* DE9C0 801482C0 C7B20080 */ lwc1 $f18, 0x80($sp) /* DE9C4 801482C4 E7B20094 */ swc1 $f18, 0x94($sp) /* DE9C8 801482C8 904300AC */ lbu $v1, 0xAC($v0) /* DE9CC 801482CC E7B20098 */ swc1 $f18, 0x98($sp) /* DE9D0 801482D0 44839000 */ mtc1 $v1, $f18 /* DE9D4 801482D4 00000000 */ nop /* DE9D8 801482D8 468094A0 */ cvt.s.w $f18, $f18 /* DE9DC 801482DC E7B2006C */ swc1 $f18, 0x6C($sp) /* DE9E0 801482E0 904300AD */ lbu $v1, 0xAD($v0) /* DE9E4 801482E4 904200AE */ lbu $v0, 0xAE($v0) /* DE9E8 801482E8 44839000 */ mtc1 $v1, $f18 /* DE9EC 801482EC 00000000 */ nop /* DE9F0 801482F0 468094A0 */ cvt.s.w $f18, $f18 /* DE9F4 801482F4 E7B20070 */ swc1 $f18, 0x70($sp) /* DE9F8 801482F8 44829000 */ mtc1 $v0, $f18 /* DE9FC 801482FC 00000000 */ nop /* DEA00 80148300 468094A0 */ cvt.s.w $f18, $f18 /* DEA04 80148304 E7B20074 */ swc1 $f18, 0x74($sp) /* DEA08 80148308 46001080 */ add.s $f2, $f2, $f0 /* DEA0C 8014830C C7B20098 */ lwc1 $f18, 0x98($sp) /* DEA10 80148310 8FB60110 */ lw $s6, 0x110($sp) /* DEA14 80148314 4612103C */ c.lt.s $f2, $f18 /* DEA18 80148318 C6720030 */ lwc1 $f18, 0x30($s3) /* DEA1C 8014831C E7B20054 */ swc1 $f18, 0x54($sp) /* DEA20 80148320 C6720034 */ lwc1 $f18, 0x34($s3) /* DEA24 80148324 00A0B82D */ daddu $s7, $a1, $zero /* DEA28 80148328 E7B20058 */ swc1 $f18, 0x58($sp) /* DEA2C 8014832C C6720038 */ lwc1 $f18, 0x38($s3) /* DEA30 80148330 E7B2005C */ swc1 $f18, 0x5C($sp) /* DEA34 80148334 C67E0018 */ lwc1 $f30, 0x18($s3) /* DEA38 80148338 45000005 */ bc1f .L80148350 /* DEA3C 8014833C 00C0F02D */ daddu $fp, $a2, $zero /* DEA40 80148340 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DEA44 80148344 44819000 */ mtc1 $at, $f18 /* DEA48 80148348 00000000 */ nop /* DEA4C 8014834C E7B20060 */ swc1 $f18, 0x60($sp) .L80148350: /* DEA50 80148350 0000902D */ daddu $s2, $zero, $zero /* DEA54 80148354 C7BC0098 */ lwc1 $f28, 0x98($sp) /* DEA58 80148358 24110004 */ addiu $s1, $zero, 0x4 .L8014835C: /* DEA5C 8014835C 3C028015 */ lui $v0, %hi(gSpriteShadingProfile) /* DEA60 80148360 8C421328 */ lw $v0, %lo(gSpriteShadingProfile)($v0) /* DEA64 80148364 00518021 */ addu $s0, $v0, $s1 /* DEA68 80148368 92020000 */ lbu $v0, 0x0($s0) /* DEA6C 8014836C 30420001 */ andi $v0, $v0, 0x1 /* DEA70 80148370 504000F5 */ beql $v0, $zero, .L80148748 /* DEA74 80148374 26520001 */ addiu $s2, $s2, 0x1 /* DEA78 80148378 C6000004 */ lwc1 $f0, 0x4($s0) /* DEA7C 8014837C C7B20054 */ lwc1 $f18, 0x54($sp) /* DEA80 80148380 46009681 */ sub.s $f26, $f18, $f0 /* DEA84 80148384 461AD082 */ mul.s $f2, $f26, $f26 /* DEA88 80148388 00000000 */ nop /* DEA8C 8014838C C6000008 */ lwc1 $f0, 0x8($s0) /* DEA90 80148390 C7B20058 */ lwc1 $f18, 0x58($sp) /* DEA94 80148394 46009601 */ sub.s $f24, $f18, $f0 /* DEA98 80148398 4618C102 */ mul.s $f4, $f24, $f24 /* DEA9C 8014839C 00000000 */ nop /* DEAA0 801483A0 C600000C */ lwc1 $f0, 0xC($s0) /* DEAA4 801483A4 C7B2005C */ lwc1 $f18, 0x5C($sp) /* DEAA8 801483A8 46009581 */ sub.s $f22, $f18, $f0 /* DEAAC 801483AC 4616B002 */ mul.s $f0, $f22, $f22 /* DEAB0 801483B0 00000000 */ nop /* DEAB4 801483B4 46041080 */ add.s $f2, $f2, $f4 /* DEAB8 801483B8 46001500 */ add.s $f20, $f2, $f0 /* DEABC 801483BC 461CA032 */ c.eq.s $f20, $f28 /* DEAC0 801483C0 00000000 */ nop /* DEAC4 801483C4 4501000D */ bc1t .L801483FC /* DEAC8 801483C8 4600E086 */ mov.s $f2, $f28 /* DEACC 801483CC 4600A004 */ sqrt.s $f0, $f20 /* DEAD0 801483D0 46000032 */ c.eq.s $f0, $f0 /* DEAD4 801483D4 00000000 */ nop /* DEAD8 801483D8 45010003 */ bc1t .L801483E8 /* DEADC 801483DC 00000000 */ nop /* DEAE0 801483E0 0C0187BC */ jal sqrtf /* DEAE4 801483E4 4600A306 */ mov.s $f12, $f20 .L801483E8: /* DEAE8 801483E8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DEAEC 801483EC 44819000 */ mtc1 $at, $f18 /* DEAF0 801483F0 46000086 */ mov.s $f2, $f0 /* DEAF4 801483F4 08052100 */ j .L80148400 /* DEAF8 801483F8 46029003 */ div.s $f0, $f18, $f2 .L801483FC: /* DEAFC 801483FC 4600E006 */ mov.s $f0, $f28 .L80148400: /* DEB00 80148400 4600D682 */ mul.s $f26, $f26, $f0 /* DEB04 80148404 00000000 */ nop /* DEB08 80148408 4600C602 */ mul.s $f24, $f24, $f0 /* DEB0C 8014840C 00000000 */ nop /* DEB10 80148410 92030000 */ lbu $v1, 0x0($s0) /* DEB14 80148414 4600B582 */ mul.s $f22, $f22, $f0 /* DEB18 80148418 00000000 */ nop /* DEB1C 8014841C 30620004 */ andi $v0, $v1, 0x4 /* DEB20 80148420 5040000E */ beql $v0, $zero, .L8014845C /* DEB24 80148424 30620008 */ andi $v0, $v1, 0x8 /* DEB28 80148428 461C1032 */ c.eq.s $f2, $f28 /* DEB2C 8014842C 00000000 */ nop /* DEB30 80148430 45000006 */ bc1f .L8014844C /* DEB34 80148434 00000000 */ nop /* DEB38 80148438 C6000010 */ lwc1 $f0, 0x10($s0) /* DEB3C 8014843C 461C0032 */ c.eq.s $f0, $f28 /* DEB40 80148440 00000000 */ nop /* DEB44 80148444 4501001E */ bc1t .L801484C0 /* DEB48 80148448 00000000 */ nop .L8014844C: /* DEB4C 8014844C C6000010 */ lwc1 $f0, 0x10($s0) /* DEB50 80148450 46001002 */ mul.s $f0, $f2, $f0 /* DEB54 80148454 08052125 */ j .L80148494 /* DEB58 80148458 00000000 */ nop .L8014845C: /* DEB5C 8014845C 10400018 */ beqz $v0, .L801484C0 /* DEB60 80148460 00000000 */ nop /* DEB64 80148464 461CA032 */ c.eq.s $f20, $f28 /* DEB68 80148468 00000000 */ nop /* DEB6C 8014846C 45000006 */ bc1f .L80148488 /* DEB70 80148470 00000000 */ nop /* DEB74 80148474 C6000010 */ lwc1 $f0, 0x10($s0) /* DEB78 80148478 461C0032 */ c.eq.s $f0, $f28 /* DEB7C 8014847C 00000000 */ nop /* DEB80 80148480 4501000F */ bc1t .L801484C0 /* DEB84 80148484 00000000 */ nop .L80148488: /* DEB88 80148488 C6000010 */ lwc1 $f0, 0x10($s0) /* DEB8C 8014848C 4600A002 */ mul.s $f0, $f20, $f0 /* DEB90 80148490 00000000 */ nop .L80148494: /* DEB94 80148494 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DEB98 80148498 44819000 */ mtc1 $at, $f18 /* DEB9C 8014849C 00000000 */ nop /* DEBA0 801484A0 46009203 */ div.s $f8, $f18, $f0 /* DEBA4 801484A4 4608D682 */ mul.s $f26, $f26, $f8 /* DEBA8 801484A8 00000000 */ nop /* DEBAC 801484AC 4608C602 */ mul.s $f24, $f24, $f8 /* DEBB0 801484B0 00000000 */ nop /* DEBB4 801484B4 4608B582 */ mul.s $f22, $f22, $f8 /* DEBB8 801484B8 08052132 */ j .L801484C8 /* DEBBC 801484BC 00000000 */ nop .L801484C0: /* DEBC0 801484C0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DEBC4 801484C4 44814000 */ mtc1 $at, $f8 .L801484C8: /* DEBC8 801484C8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DEBCC 801484CC 44819000 */ mtc1 $at, $f18 /* DEBD0 801484D0 00000000 */ nop /* DEBD4 801484D4 4608903C */ c.lt.s $f18, $f8 /* DEBD8 801484D8 00000000 */ nop /* DEBDC 801484DC 45030001 */ bc1tl .L801484E4 /* DEBE0 801484E0 46009206 */ mov.s $f8, $f18 .L801484E4: /* DEBE4 801484E4 C7B20048 */ lwc1 $f18, 0x48($sp) /* DEBE8 801484E8 461A9480 */ add.s $f18, $f18, $f26 /* DEBEC 801484EC E7B20048 */ swc1 $f18, 0x48($sp) /* DEBF0 801484F0 C7B2004C */ lwc1 $f18, 0x4C($sp) /* DEBF4 801484F4 46189480 */ add.s $f18, $f18, $f24 /* DEBF8 801484F8 E7B2004C */ swc1 $f18, 0x4C($sp) /* DEBFC 801484FC C7B20050 */ lwc1 $f18, 0x50($sp) /* DEC00 80148500 46169480 */ add.s $f18, $f18, $f22 /* DEC04 80148504 E7B20050 */ swc1 $f18, 0x50($sp) /* DEC08 80148508 C7B20060 */ lwc1 $f18, 0x60($sp) /* DEC0C 8014850C 461C903C */ c.lt.s $f18, $f28 /* DEC10 80148510 00000000 */ nop /* DEC14 80148514 45000005 */ bc1f .L8014852C /* DEC18 80148518 4600F086 */ mov.s $f2, $f30 /* DEC1C 8014851C C7B20068 */ lwc1 $f18, 0x68($sp) /* DEC20 80148520 C7A00064 */ lwc1 $f0, 0x64($sp) /* DEC24 80148524 0805214E */ j .L80148538 /* DEC28 80148528 46009107 */ neg.s $f4, $f18 .L8014852C: /* DEC2C 8014852C C7B20064 */ lwc1 $f18, 0x64($sp) /* DEC30 80148530 C7A40068 */ lwc1 $f4, 0x68($sp) /* DEC34 80148534 46009007 */ neg.s $f0, $f18 .L80148538: /* DEC38 80148538 461A0002 */ mul.s $f0, $f0, $f26 /* DEC3C 8014853C 00000000 */ nop /* DEC40 80148540 46181082 */ mul.s $f2, $f2, $f24 /* DEC44 80148544 00000000 */ nop /* DEC48 80148548 46162102 */ mul.s $f4, $f4, $f22 /* DEC4C 8014854C 00000000 */ nop /* DEC50 80148550 46020000 */ add.s $f0, $f0, $f2 /* DEC54 80148554 C7B20060 */ lwc1 $f18, 0x60($sp) /* DEC58 80148558 461C903C */ c.lt.s $f18, $f28 /* DEC5C 8014855C 00000000 */ nop /* DEC60 80148560 45000005 */ bc1f .L80148578 /* DEC64 80148564 46040280 */ add.s $f10, $f0, $f4 /* DEC68 80148568 C7A20068 */ lwc1 $f2, 0x68($sp) /* DEC6C 8014856C C7A60064 */ lwc1 $f6, 0x64($sp) /* DEC70 80148570 08052163 */ j .L8014858C /* DEC74 80148574 4600F106 */ mov.s $f4, $f30 .L80148578: /* DEC78 80148578 C7B20068 */ lwc1 $f18, 0x68($sp) /* DEC7C 8014857C 46009087 */ neg.s $f2, $f18 /* DEC80 80148580 C7B20064 */ lwc1 $f18, 0x64($sp) /* DEC84 80148584 4600F106 */ mov.s $f4, $f30 /* DEC88 80148588 46009187 */ neg.s $f6, $f18 .L8014858C: /* DEC8C 8014858C 461A1082 */ mul.s $f2, $f2, $f26 /* DEC90 80148590 00000000 */ nop /* DEC94 80148594 46182102 */ mul.s $f4, $f4, $f24 /* DEC98 80148598 00000000 */ nop /* DEC9C 8014859C 46163182 */ mul.s $f6, $f6, $f22 /* DECA0 801485A0 00000000 */ nop /* DECA4 801485A4 46005005 */ abs.s $f0, $f10 /* DECA8 801485A8 46004302 */ mul.s $f12, $f8, $f0 /* DECAC 801485AC 00000000 */ nop /* DECB0 801485B0 46041080 */ add.s $f2, $f2, $f4 /* DECB4 801485B4 46061400 */ add.s $f16, $f2, $f6 /* DECB8 801485B8 460AE03C */ c.lt.s $f28, $f10 /* DECBC 801485BC 46008005 */ abs.s $f0, $f16 /* DECC0 801485C0 46004182 */ mul.s $f6, $f8, $f0 /* DECC4 801485C4 00000000 */ nop /* DECC8 801485C8 45000021 */ bc1f .L80148650 /* DECCC 801485CC 46008506 */ mov.s $f20, $f16 /* DECD0 801485D0 92020001 */ lbu $v0, 0x1($s0) /* DECD4 801485D4 44827000 */ mtc1 $v0, $f14 /* DECD8 801485D8 00000000 */ nop /* DECDC 801485DC 468073A0 */ cvt.s.w $f14, $f14 /* DECE0 801485E0 460C7102 */ mul.s $f4, $f14, $f12 /* DECE4 801485E4 00000000 */ nop /* DECE8 801485E8 C7B20078 */ lwc1 $f18, 0x78($sp) /* DECEC 801485EC 92020002 */ lbu $v0, 0x2($s0) /* DECF0 801485F0 46049480 */ add.s $f18, $f18, $f4 /* DECF4 801485F4 44825000 */ mtc1 $v0, $f10 /* DECF8 801485F8 00000000 */ nop /* DECFC 801485FC 468052A0 */ cvt.s.w $f10, $f10 /* DED00 80148600 92020003 */ lbu $v0, 0x3($s0) /* DED04 80148604 460C5082 */ mul.s $f2, $f10, $f12 /* DED08 80148608 00000000 */ nop /* DED0C 8014860C E7B20078 */ swc1 $f18, 0x78($sp) /* DED10 80148610 C7B2007C */ lwc1 $f18, 0x7C($sp) /* DED14 80148614 46029480 */ add.s $f18, $f18, $f2 /* DED18 80148618 44824000 */ mtc1 $v0, $f8 /* DED1C 8014861C 00000000 */ nop /* DED20 80148620 46804220 */ cvt.s.w $f8, $f8 /* DED24 80148624 460C4002 */ mul.s $f0, $f8, $f12 /* DED28 80148628 00000000 */ nop /* DED2C 8014862C E7B2007C */ swc1 $f18, 0x7C($sp) /* DED30 80148630 C7B20080 */ lwc1 $f18, 0x80($sp) /* DED34 80148634 46009480 */ add.s $f18, $f18, $f0 /* DED38 80148638 4610E03C */ c.lt.s $f28, $f16 /* DED3C 8014863C 00000000 */ nop /* DED40 80148640 45010021 */ bc1t .L801486C8 /* DED44 80148644 E7B20080 */ swc1 $f18, 0x80($sp) /* DED48 80148648 080521C2 */ j .L80148708 /* DED4C 8014864C 00000000 */ nop .L80148650: /* DED50 80148650 92020001 */ lbu $v0, 0x1($s0) /* DED54 80148654 44827000 */ mtc1 $v0, $f14 /* DED58 80148658 00000000 */ nop /* DED5C 8014865C 468073A0 */ cvt.s.w $f14, $f14 /* DED60 80148660 460C7102 */ mul.s $f4, $f14, $f12 /* DED64 80148664 00000000 */ nop /* DED68 80148668 C7B2006C */ lwc1 $f18, 0x6C($sp) /* DED6C 8014866C 92020002 */ lbu $v0, 0x2($s0) /* DED70 80148670 46049480 */ add.s $f18, $f18, $f4 /* DED74 80148674 44825000 */ mtc1 $v0, $f10 /* DED78 80148678 00000000 */ nop /* DED7C 8014867C 468052A0 */ cvt.s.w $f10, $f10 /* DED80 80148680 92020003 */ lbu $v0, 0x3($s0) /* DED84 80148684 460C5082 */ mul.s $f2, $f10, $f12 /* DED88 80148688 00000000 */ nop /* DED8C 8014868C E7B2006C */ swc1 $f18, 0x6C($sp) /* DED90 80148690 C7B20070 */ lwc1 $f18, 0x70($sp) /* DED94 80148694 46029480 */ add.s $f18, $f18, $f2 /* DED98 80148698 44824000 */ mtc1 $v0, $f8 /* DED9C 8014869C 00000000 */ nop /* DEDA0 801486A0 46804220 */ cvt.s.w $f8, $f8 /* DEDA4 801486A4 460C4002 */ mul.s $f0, $f8, $f12 /* DEDA8 801486A8 00000000 */ nop /* DEDAC 801486AC E7B20070 */ swc1 $f18, 0x70($sp) /* DEDB0 801486B0 C7B20074 */ lwc1 $f18, 0x74($sp) /* DEDB4 801486B4 46009480 */ add.s $f18, $f18, $f0 /* DEDB8 801486B8 4614E03C */ c.lt.s $f28, $f20 /* DEDBC 801486BC 00000000 */ nop /* DEDC0 801486C0 45000011 */ bc1f .L80148708 /* DEDC4 801486C4 E7B20074 */ swc1 $f18, 0x74($sp) .L801486C8: /* DEDC8 801486C8 46067002 */ mul.s $f0, $f14, $f6 /* DEDCC 801486CC 00000000 */ nop /* DEDD0 801486D0 C7B20084 */ lwc1 $f18, 0x84($sp) /* DEDD4 801486D4 46009480 */ add.s $f18, $f18, $f0 /* DEDD8 801486D8 46065082 */ mul.s $f2, $f10, $f6 /* DEDDC 801486DC 00000000 */ nop /* DEDE0 801486E0 E7B20084 */ swc1 $f18, 0x84($sp) /* DEDE4 801486E4 C7B20088 */ lwc1 $f18, 0x88($sp) /* DEDE8 801486E8 46029480 */ add.s $f18, $f18, $f2 /* DEDEC 801486EC 46064102 */ mul.s $f4, $f8, $f6 /* DEDF0 801486F0 00000000 */ nop /* DEDF4 801486F4 E7B20088 */ swc1 $f18, 0x88($sp) /* DEDF8 801486F8 C7B2008C */ lwc1 $f18, 0x8C($sp) /* DEDFC 801486FC 46049480 */ add.s $f18, $f18, $f4 /* DEE00 80148700 080521D1 */ j .L80148744 /* DEE04 80148704 E7B2008C */ swc1 $f18, 0x8C($sp) .L80148708: /* DEE08 80148708 46067002 */ mul.s $f0, $f14, $f6 /* DEE0C 8014870C 00000000 */ nop /* DEE10 80148710 C7B20090 */ lwc1 $f18, 0x90($sp) /* DEE14 80148714 46009480 */ add.s $f18, $f18, $f0 /* DEE18 80148718 46065082 */ mul.s $f2, $f10, $f6 /* DEE1C 8014871C 00000000 */ nop /* DEE20 80148720 E7B20090 */ swc1 $f18, 0x90($sp) /* DEE24 80148724 C7B20094 */ lwc1 $f18, 0x94($sp) /* DEE28 80148728 46029480 */ add.s $f18, $f18, $f2 /* DEE2C 8014872C 46064102 */ mul.s $f4, $f8, $f6 /* DEE30 80148730 00000000 */ nop /* DEE34 80148734 E7B20094 */ swc1 $f18, 0x94($sp) /* DEE38 80148738 C7B20098 */ lwc1 $f18, 0x98($sp) /* DEE3C 8014873C 46049480 */ add.s $f18, $f18, $f4 /* DEE40 80148740 E7B20098 */ swc1 $f18, 0x98($sp) .L80148744: /* DEE44 80148744 26520001 */ addiu $s2, $s2, 0x1 .L80148748: /* DEE48 80148748 2A420007 */ slti $v0, $s2, 0x7 /* DEE4C 8014874C 1440FF03 */ bnez $v0, .L8014835C /* DEE50 80148750 26310018 */ addiu $s1, $s1, 0x18 /* DEE54 80148754 44800000 */ mtc1 $zero, $f0 /* DEE58 80148758 C7B20060 */ lwc1 $f18, 0x60($sp) /* DEE5C 8014875C 4600903C */ c.lt.s $f18, $f0 /* DEE60 80148760 00000000 */ nop /* DEE64 80148764 45000004 */ bc1f .L80148778 /* DEE68 80148768 4600F086 */ mov.s $f2, $f30 /* DEE6C 8014876C C7A00068 */ lwc1 $f0, 0x68($sp) /* DEE70 80148770 080521E2 */ j .L80148788 /* DEE74 80148774 C7A40064 */ lwc1 $f4, 0x64($sp) .L80148778: /* DEE78 80148778 C7B20068 */ lwc1 $f18, 0x68($sp) /* DEE7C 8014877C 46009007 */ neg.s $f0, $f18 /* DEE80 80148780 C7B20064 */ lwc1 $f18, 0x64($sp) /* DEE84 80148784 46009107 */ neg.s $f4, $f18 .L80148788: /* DEE88 80148788 C7B20048 */ lwc1 $f18, 0x48($sp) /* DEE8C 8014878C 46120002 */ mul.s $f0, $f0, $f18 /* DEE90 80148790 00000000 */ nop /* DEE94 80148794 C7B2004C */ lwc1 $f18, 0x4C($sp) /* DEE98 80148798 46121082 */ mul.s $f2, $f2, $f18 /* DEE9C 8014879C 00000000 */ nop /* DEEA0 801487A0 C7B20050 */ lwc1 $f18, 0x50($sp) /* DEEA4 801487A4 46122102 */ mul.s $f4, $f4, $f18 /* DEEA8 801487A8 00000000 */ nop /* DEEAC 801487AC 46020000 */ add.s $f0, $f0, $f2 /* DEEB0 801487B0 46040000 */ add.s $f0, $f0, $f4 /* DEEB4 801487B4 44801000 */ mtc1 $zero, $f2 /* DEEB8 801487B8 00000000 */ nop /* DEEBC 801487BC 4600103C */ c.lt.s $f2, $f0 /* DEEC0 801487C0 00000000 */ nop /* DEEC4 801487C4 45000031 */ bc1f .L8014888C /* DEEC8 801487C8 00000000 */ nop /* DEECC 801487CC C7B2006C */ lwc1 $f18, 0x6C($sp) /* DEED0 801487D0 4600948D */ trunc.w.s $f18, $f18 /* DEED4 801487D4 E7B20024 */ swc1 $f18, 0x24($sp) /* DEED8 801487D8 C7B20070 */ lwc1 $f18, 0x70($sp) /* DEEDC 801487DC 4600948D */ trunc.w.s $f18, $f18 /* DEEE0 801487E0 E7B20028 */ swc1 $f18, 0x28($sp) /* DEEE4 801487E4 C7B20074 */ lwc1 $f18, 0x74($sp) /* DEEE8 801487E8 3C038015 */ lui $v1, %hi(gSpriteShadingProfile) /* DEEEC 801487EC 8C631328 */ lw $v1, %lo(gSpriteShadingProfile)($v1) /* DEEF0 801487F0 4600948D */ trunc.w.s $f18, $f18 /* DEEF4 801487F4 E7B2002C */ swc1 $f18, 0x2C($sp) /* DEEF8 801487F8 C7B20048 */ lwc1 $f18, 0x48($sp) /* DEEFC 801487FC E7B20018 */ swc1 $f18, 0x18($sp) /* DEF00 80148800 C7B2004C */ lwc1 $f18, 0x4C($sp) /* DEF04 80148804 E7B2001C */ swc1 $f18, 0x1C($sp) /* DEF08 80148808 C7B20050 */ lwc1 $f18, 0x50($sp) /* DEF0C 8014880C AFB40010 */ sw $s4, 0x10($sp) /* DEF10 80148810 AFB50014 */ sw $s5, 0x14($sp) /* DEF14 80148814 E7B20020 */ swc1 $f18, 0x20($sp) /* DEF18 80148818 906200AC */ lbu $v0, 0xAC($v1) /* DEF1C 8014881C C7B20078 */ lwc1 $f18, 0x78($sp) /* DEF20 80148820 44820000 */ mtc1 $v0, $f0 /* DEF24 80148824 00000000 */ nop /* DEF28 80148828 46800020 */ cvt.s.w $f0, $f0 /* DEF2C 8014882C 46120000 */ add.s $f0, $f0, $f18 /* DEF30 80148830 C7B20084 */ lwc1 $f18, 0x84($sp) /* DEF34 80148834 46120000 */ add.s $f0, $f0, $f18 /* DEF38 80148838 4600048D */ trunc.w.s $f18, $f0 /* DEF3C 8014883C E7B20030 */ swc1 $f18, 0x30($sp) /* DEF40 80148840 906200AD */ lbu $v0, 0xAD($v1) /* DEF44 80148844 C7B2007C */ lwc1 $f18, 0x7C($sp) /* DEF48 80148848 44820000 */ mtc1 $v0, $f0 /* DEF4C 8014884C 00000000 */ nop /* DEF50 80148850 46800020 */ cvt.s.w $f0, $f0 /* DEF54 80148854 46120000 */ add.s $f0, $f0, $f18 /* DEF58 80148858 C7B20088 */ lwc1 $f18, 0x88($sp) /* DEF5C 8014885C 46120000 */ add.s $f0, $f0, $f18 /* DEF60 80148860 4600048D */ trunc.w.s $f18, $f0 /* DEF64 80148864 E7B20034 */ swc1 $f18, 0x34($sp) /* DEF68 80148868 906200AE */ lbu $v0, 0xAE($v1) /* DEF6C 8014886C C7B20080 */ lwc1 $f18, 0x80($sp) /* DEF70 80148870 44820000 */ mtc1 $v0, $f0 /* DEF74 80148874 00000000 */ nop /* DEF78 80148878 46800020 */ cvt.s.w $f0, $f0 /* DEF7C 8014887C 46120000 */ add.s $f0, $f0, $f18 /* DEF80 80148880 C7B2008C */ lwc1 $f18, 0x8C($sp) /* DEF84 80148884 08052252 */ j .L80148948 /* DEF88 80148888 46120000 */ add.s $f0, $f0, $f18 .L8014888C: /* DEF8C 8014888C C7B2006C */ lwc1 $f18, 0x6C($sp) /* DEF90 80148890 4600948D */ trunc.w.s $f18, $f18 /* DEF94 80148894 E7B20024 */ swc1 $f18, 0x24($sp) /* DEF98 80148898 C7B20070 */ lwc1 $f18, 0x70($sp) /* DEF9C 8014889C 4600948D */ trunc.w.s $f18, $f18 /* DEFA0 801488A0 E7B20028 */ swc1 $f18, 0x28($sp) /* DEFA4 801488A4 C7B20074 */ lwc1 $f18, 0x74($sp) /* DEFA8 801488A8 3C038015 */ lui $v1, %hi(gSpriteShadingProfile) /* DEFAC 801488AC 8C631328 */ lw $v1, %lo(gSpriteShadingProfile)($v1) /* DEFB0 801488B0 4600948D */ trunc.w.s $f18, $f18 /* DEFB4 801488B4 E7B2002C */ swc1 $f18, 0x2C($sp) /* DEFB8 801488B8 C7B20048 */ lwc1 $f18, 0x48($sp) /* DEFBC 801488BC E7B20018 */ swc1 $f18, 0x18($sp) /* DEFC0 801488C0 C7B2004C */ lwc1 $f18, 0x4C($sp) /* DEFC4 801488C4 E7B2001C */ swc1 $f18, 0x1C($sp) /* DEFC8 801488C8 C7B20050 */ lwc1 $f18, 0x50($sp) /* DEFCC 801488CC AFB40010 */ sw $s4, 0x10($sp) /* DEFD0 801488D0 AFB50014 */ sw $s5, 0x14($sp) /* DEFD4 801488D4 E7B20020 */ swc1 $f18, 0x20($sp) /* DEFD8 801488D8 906200AC */ lbu $v0, 0xAC($v1) /* DEFDC 801488DC C7B20078 */ lwc1 $f18, 0x78($sp) /* DEFE0 801488E0 44820000 */ mtc1 $v0, $f0 /* DEFE4 801488E4 00000000 */ nop /* DEFE8 801488E8 46800020 */ cvt.s.w $f0, $f0 /* DEFEC 801488EC 46120000 */ add.s $f0, $f0, $f18 /* DEFF0 801488F0 C7B20090 */ lwc1 $f18, 0x90($sp) /* DEFF4 801488F4 46120000 */ add.s $f0, $f0, $f18 /* DEFF8 801488F8 4600048D */ trunc.w.s $f18, $f0 /* DEFFC 801488FC E7B20030 */ swc1 $f18, 0x30($sp) /* DF000 80148900 906200AD */ lbu $v0, 0xAD($v1) /* DF004 80148904 C7B2007C */ lwc1 $f18, 0x7C($sp) /* DF008 80148908 44820000 */ mtc1 $v0, $f0 /* DF00C 8014890C 00000000 */ nop /* DF010 80148910 46800020 */ cvt.s.w $f0, $f0 /* DF014 80148914 46120000 */ add.s $f0, $f0, $f18 /* DF018 80148918 C7B20094 */ lwc1 $f18, 0x94($sp) /* DF01C 8014891C 46120000 */ add.s $f0, $f0, $f18 /* DF020 80148920 4600048D */ trunc.w.s $f18, $f0 /* DF024 80148924 E7B20034 */ swc1 $f18, 0x34($sp) /* DF028 80148928 906200AE */ lbu $v0, 0xAE($v1) /* DF02C 8014892C C7B20080 */ lwc1 $f18, 0x80($sp) /* DF030 80148930 44820000 */ mtc1 $v0, $f0 /* DF034 80148934 00000000 */ nop /* DF038 80148938 46800020 */ cvt.s.w $f0, $f0 /* DF03C 8014893C 46120000 */ add.s $f0, $f0, $f18 /* DF040 80148940 C7B20098 */ lwc1 $f18, 0x98($sp) /* DF044 80148944 46120000 */ add.s $f0, $f0, $f18 .L80148948: /* DF048 80148948 0260202D */ daddu $a0, $s3, $zero /* DF04C 8014894C 02E0282D */ daddu $a1, $s7, $zero /* DF050 80148950 4600048D */ trunc.w.s $f18, $f0 /* DF054 80148954 E7B20038 */ swc1 $f18, 0x38($sp) /* DF058 80148958 906200AF */ lbu $v0, 0xAF($v1) /* DF05C 8014895C 8FA70104 */ lw $a3, 0x104($sp) /* DF060 80148960 03C0302D */ daddu $a2, $fp, $zero /* DF064 80148964 AFB60040 */ sw $s6, 0x40($sp) /* DF068 80148968 0C05226E */ jal appendGfx_shading_palette /* DF06C 8014896C AFA2003C */ sw $v0, 0x3C($sp) /* DF070 80148970 8FBF00C4 */ lw $ra, 0xC4($sp) /* DF074 80148974 8FBE00C0 */ lw $fp, 0xC0($sp) /* DF078 80148978 8FB700BC */ lw $s7, 0xBC($sp) /* DF07C 8014897C 8FB600B8 */ lw $s6, 0xB8($sp) /* DF080 80148980 8FB500B4 */ lw $s5, 0xB4($sp) /* DF084 80148984 8FB400B0 */ lw $s4, 0xB0($sp) /* DF088 80148988 8FB300AC */ lw $s3, 0xAC($sp) /* DF08C 8014898C 8FB200A8 */ lw $s2, 0xA8($sp) /* DF090 80148990 8FB100A4 */ lw $s1, 0xA4($sp) /* DF094 80148994 8FB000A0 */ lw $s0, 0xA0($sp) /* DF098 80148998 D7BE00F0 */ ldc1 $f30, 0xF0($sp) /* DF09C 8014899C D7BC00E8 */ ldc1 $f28, 0xE8($sp) /* DF0A0 801489A0 D7BA00E0 */ ldc1 $f26, 0xE0($sp) /* DF0A4 801489A4 D7B800D8 */ ldc1 $f24, 0xD8($sp) /* DF0A8 801489A8 D7B600D0 */ ldc1 $f22, 0xD0($sp) /* DF0AC 801489AC D7B400C8 */ ldc1 $f20, 0xC8($sp) /* DF0B0 801489B0 03E00008 */ jr $ra /* DF0B4 801489B4 27BD00F8 */ addiu $sp, $sp, 0xF8 ### DECOMPILED C INSTRUCTIONS: void create_shading_palette(Matrix4f mtx, s32 uls, s32 ult, s32 lrs, s32 lrt, s32 alpha, s32 otherModeLBits) { Camera* camera = &gCameras[gCurrentCameraID]; SpriteShadingLightSource* lightSource; f32 shadowDirX, shadowDirY, shadowDirZ; f32 posX, posY, posZ; f32 facingDir; f32 Mxz, Myz, Mzz; f32 shadowColorR, shadowColorG, shadowColorB; f32 commonColorR, commonColorG, commonColorB; f32 backColorR, backColorG, backColorB; f32 frontColorR, frontColorG, frontColorB; f32 shadowIntensity; f32 lightIntensity; f32 intensityScale; f32 temp_f10; f32 temp_f16; f32 temp3; f32 distSq; f32 dx, dy, dz; f32 dist; f32 invDist; f32 qx, qy, qz; f32 wx, wy, wz; f32 ex, ey, ez; f32 Pxz, Pzz; s32 i; shadowDirX = 0.0f; shadowDirY = 0.0f; shadowDirZ = 0.0f; posX = mtx[3][0]; posY = mtx[3][1]; posZ = mtx[3][2]; Mxz = mtx[0][2]; Myz = mtx[1][2]; Mzz = mtx[2][2]; commonColorR = 0.0f; commonColorG = 0.0f; commonColorB = 0.0f; backColorR = 0.0f; backColorG = 0.0f; backColorB = 0.0f; frontColorR = 0.0f; frontColorG = 0.0f; frontColorB = 0.0f; shadowColorR = gSpriteShadingProfile->ambientColor.r; shadowColorG = gSpriteShadingProfile->ambientColor.g; shadowColorB = gSpriteShadingProfile->ambientColor.b; Pxz = camera->perspectiveMatrix[0][2]; Pzz = camera->perspectiveMatrix[2][2]; if ((-Mxz * Pxz + Mzz * Pzz) < 0.0f) { facingDir = 1.0f; } else { facingDir = -1.0f; } for (i = 0; i < ARRAY_COUNT(gSpriteShadingProfile->sources); i++) { lightSource = &gSpriteShadingProfile->sources[i]; if (lightSource->flags & LIGHT_SOURCE_ENABLED) { dx = posX - lightSource->pos.x; dy = posY - lightSource->pos.y; dz = posZ - lightSource->pos.z; distSq = SQ(dx) + SQ(dy) + SQ(dz); if (distSq != 0.0f) { dist = sqrtf(distSq); invDist = 1.0f / dist; } else { dist = 0.0f; invDist = 0.0f; } // normalize dx/dy/dz // they now form a normal vector pointing from light source to sprite dx *= invDist; dy *= invDist; dz *= invDist; // apply falloff from light source if (lightSource->flags & LIGHT_SOURCE_LINEAR_FALLOFF) { if ((dist == 0.0f) && (lightSource->falloff == 0.0f)) { intensityScale = 1.0f; } else { intensityScale = 1.0f / (dist * lightSource->falloff); dx *= intensityScale; dy *= intensityScale; dz *= intensityScale; } } else if (lightSource->flags & LIGHT_SOURCE_QUADRATIC_FALLOFF) { if ((distSq == 0.0f) && (lightSource->falloff == 0.0f)) { intensityScale = 1.0f; } else { intensityScale = 1.0f / (distSq * lightSource->falloff); dx *= intensityScale; dy *= intensityScale; dz *= intensityScale; } } else { intensityScale = 1.0f; } if (intensityScale > 1.0f) { intensityScale = 1.0f; } shadowDirX += dx; shadowDirY += dy; shadowDirZ += dz; if (facingDir < 0.0f) { ex = Mxz; ey = Myz; ez = -Mzz; } else { ex = -Mxz; ey = Myz; ez = Mzz; } temp_f10 = ex * dx + ey * dy + ez * dz; if (facingDir < 0.0f) { wx = Mzz; wy = Myz; wz = Mxz; } else { wx = -Mzz; wy = Myz; wz = -Mxz; } temp3 = wx * dx + wy * dy + wz * dz; temp_f16 = temp3; shadowIntensity = intensityScale * fabsf(temp_f10); lightIntensity = intensityScale * fabsf(temp_f16); if (temp_f10 > 0.0f) { commonColorR += lightSource->rgb.r * shadowIntensity; commonColorG += lightSource->rgb.g * shadowIntensity; commonColorB += lightSource->rgb.b * shadowIntensity; if (temp_f16 > 0.0f) { backColorR += lightSource->rgb.r * lightIntensity; backColorG += lightSource->rgb.g * lightIntensity; backColorB += lightSource->rgb.b * lightIntensity; } else { frontColorR += lightSource->rgb.r * lightIntensity; frontColorG += lightSource->rgb.g * lightIntensity; frontColorB += lightSource->rgb.b * lightIntensity; } } else { shadowColorR += lightSource->rgb.r * shadowIntensity; shadowColorG += lightSource->rgb.g * shadowIntensity; shadowColorB += lightSource->rgb.b * shadowIntensity; if (temp_f16 > 0.0f) { backColorR += lightSource->rgb.r * lightIntensity; backColorG += lightSource->rgb.g * lightIntensity; backColorB += lightSource->rgb.b * lightIntensity; } else { frontColorR += lightSource->rgb.r * lightIntensity; frontColorG += lightSource->rgb.g * lightIntensity; frontColorB += lightSource->rgb.b * lightIntensity; } } } } if (facingDir < 0.0f) { qx = Mzz; qy = Myz; qz = Mxz; } else { qx = -Mzz; qy = Myz; qz = -Mxz; } if (qx * shadowDirX + qy * shadowDirY + qz * shadowDirZ > 0.0f) { appendGfx_shading_palette( mtx, uls, ult, lrs, lrt, alpha, shadowDirX, shadowDirY, shadowDirZ, shadowColorR, shadowColorG, shadowColorB, gSpriteShadingProfile->ambientColor.r + commonColorR + backColorR, gSpriteShadingProfile->ambientColor.g + commonColorG + backColorG, gSpriteShadingProfile->ambientColor.b + commonColorB + backColorB, gSpriteShadingProfile->ambientPower, otherModeLBits ); } else { appendGfx_shading_palette( mtx, uls, ult, lrs, lrt, alpha, shadowDirX, shadowDirY, shadowDirZ, shadowColorR, shadowColorG, shadowColorB, gSpriteShadingProfile->ambientColor.r + commonColorR + frontColorR, gSpriteShadingProfile->ambientColor.g + commonColorG + frontColorG, gSpriteShadingProfile->ambientColor.b + commonColorB + frontColorB, gSpriteShadingProfile->ambientPower, otherModeLBits ); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel effect_65_appendGfx /* 3D09CC E00CA4CC 27BDFF38 */ addiu $sp, $sp, -0xC8 /* 3D09D0 E00CA4D0 0080482D */ daddu $t1, $a0, $zero /* 3D09D4 E00CA4D4 3C0ADB06 */ lui $t2, (0xDB060024 >> 16) /* 3D09D8 E00CA4D8 354A0024 */ ori $t2, $t2, (0xDB060024 & 0xFFFF) /* 3D09DC E00CA4DC 27A40010 */ addiu $a0, $sp, 0x10 /* 3D09E0 E00CA4E0 AFB20078 */ sw $s2, 0x78($sp) /* 3D09E4 E00CA4E4 3C120001 */ lui $s2, (0x11630 >> 16) /* 3D09E8 E00CA4E8 44800000 */ mtc1 $zero, $f0 /* 3D09EC E00CA4EC 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3D09F0 E00CA4F0 AFB3007C */ sw $s3, 0x7C($sp) /* 3D09F4 E00CA4F4 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3D09F8 E00CA4F8 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3D09FC E00CA4FC AFBF0094 */ sw $ra, 0x94($sp) /* 3D0A00 E00CA500 AFBE0090 */ sw $fp, 0x90($sp) /* 3D0A04 E00CA504 AFB7008C */ sw $s7, 0x8C($sp) /* 3D0A08 E00CA508 AFB60088 */ sw $s6, 0x88($sp) /* 3D0A0C E00CA50C AFB50084 */ sw $s5, 0x84($sp) /* 3D0A10 E00CA510 AFB40080 */ sw $s4, 0x80($sp) /* 3D0A14 E00CA514 AFB10074 */ sw $s1, 0x74($sp) /* 3D0A18 E00CA518 AFB00070 */ sw $s0, 0x70($sp) /* 3D0A1C E00CA51C F7BE00C0 */ sdc1 $f30, 0xC0($sp) /* 3D0A20 E00CA520 F7BC00B8 */ sdc1 $f28, 0xB8($sp) /* 3D0A24 E00CA524 F7BA00B0 */ sdc1 $f26, 0xB0($sp) /* 3D0A28 E00CA528 F7B800A8 */ sdc1 $f24, 0xA8($sp) /* 3D0A2C E00CA52C F7B600A0 */ sdc1 $f22, 0xA0($sp) /* 3D0A30 E00CA530 F7B40098 */ sdc1 $f20, 0x98($sp) /* 3D0A34 E00CA534 8E680000 */ lw $t0, 0x0($s3) /* 3D0A38 E00CA538 8D36000C */ lw $s6, 0xC($t1) /* 3D0A3C E00CA53C 0100182D */ daddu $v1, $t0, $zero /* 3D0A40 E00CA540 44050000 */ mfc1 $a1, $f0 /* 3D0A44 E00CA544 25080008 */ addiu $t0, $t0, 0x8 /* 3D0A48 E00CA548 AE680000 */ sw $t0, 0x0($s3) /* 3D0A4C E00CA54C 8ECB0014 */ lw $t3, 0x14($s6) /* 3D0A50 E00CA550 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D0A54 E00CA554 AFAB0050 */ sw $t3, 0x50($sp) /* 3D0A58 E00CA558 8ED50024 */ lw $s5, 0x24($s6) /* 3D0A5C E00CA55C 8ECB0000 */ lw $t3, 0x0($s6) /* 3D0A60 E00CA560 00A0302D */ daddu $a2, $a1, $zero /* 3D0A64 E00CA564 AFAB0054 */ sw $t3, 0x54($sp) /* 3D0A68 E00CA568 C6C60034 */ lwc1 $f6, 0x34($s6) /* 3D0A6C E00CA56C 00A0382D */ daddu $a3, $a1, $zero /* 3D0A70 E00CA570 E7A60058 */ swc1 $f6, 0x58($sp) /* 3D0A74 E00CA574 AC620000 */ sw $v0, 0x0($v1) /* 3D0A78 E00CA578 AC600004 */ sw $zero, 0x4($v1) /* 3D0A7C E00CA57C AD0A0000 */ sw $t2, 0x0($t0) /* 3D0A80 E00CA580 8D230010 */ lw $v1, 0x10($t1) /* 3D0A84 E00CA584 25020008 */ addiu $v0, $t0, 0x8 /* 3D0A88 E00CA588 AE620000 */ sw $v0, 0x0($s3) /* 3D0A8C E00CA58C 8C62001C */ lw $v0, 0x1C($v1) /* 3D0A90 E00CA590 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3D0A94 E00CA594 00431021 */ addu $v0, $v0, $v1 /* 3D0A98 E00CA598 0C080108 */ jal shim_guTranslateF /* 3D0A9C E00CA59C AD020004 */ sw $v0, 0x4($t0) /* 3D0AA0 E00CA5A0 27A40010 */ addiu $a0, $sp, 0x10 /* 3D0AA4 E00CA5A4 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3D0AA8 E00CA5A8 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3D0AAC E00CA5AC 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3D0AB0 E00CA5B0 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3D0AB4 E00CA5B4 96050000 */ lhu $a1, 0x0($s0) /* 3D0AB8 E00CA5B8 8E220000 */ lw $v0, 0x0($s1) /* 3D0ABC E00CA5BC 00052980 */ sll $a1, $a1, 6 /* 3D0AC0 E00CA5C0 00B22821 */ addu $a1, $a1, $s2 /* 3D0AC4 E00CA5C4 0C080118 */ jal shim_guMtxF2L /* 3D0AC8 E00CA5C8 00452821 */ addu $a1, $v0, $a1 /* 3D0ACC E00CA5CC 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3D0AD0 E00CA5D0 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3D0AD4 E00CA5D4 8E650000 */ lw $a1, 0x0($s3) /* 3D0AD8 E00CA5D8 96020000 */ lhu $v0, 0x0($s0) /* 3D0ADC E00CA5DC 00A0202D */ daddu $a0, $a1, $zero /* 3D0AE0 E00CA5E0 24A50008 */ addiu $a1, $a1, 0x8 /* 3D0AE4 E00CA5E4 AE650000 */ sw $a1, 0x0($s3) /* 3D0AE8 E00CA5E8 AC830000 */ sw $v1, 0x0($a0) /* 3D0AEC E00CA5EC 24430001 */ addiu $v1, $v0, 0x1 /* 3D0AF0 E00CA5F0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D0AF4 E00CA5F4 00021180 */ sll $v0, $v0, 6 /* 3D0AF8 E00CA5F8 A6030000 */ sh $v1, 0x0($s0) /* 3D0AFC E00CA5FC 8E230000 */ lw $v1, 0x0($s1) /* 3D0B00 E00CA600 00521021 */ addu $v0, $v0, $s2 /* 3D0B04 E00CA604 00621821 */ addu $v1, $v1, $v0 /* 3D0B08 E00CA608 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D0B0C E00CA60C AC830004 */ sw $v1, 0x4($a0) /* 3D0B10 E00CA610 ACA20000 */ sw $v0, 0x0($a1) /* 3D0B14 E00CA614 8FAB0054 */ lw $t3, 0x54($sp) /* 3D0B18 E00CA618 000B1080 */ sll $v0, $t3, 2 /* 3D0B1C E00CA61C 3C03E00D */ lui $v1, (0xE00D0000 >> 16) /* 3D0B20 E00CA620 00621821 */ addu $v1, $v1, $v0 /* 3D0B24 E00CA624 8C63ACB0 */ lw $v1, -0x5350($v1) /* 3D0B28 E00CA628 24A20008 */ addiu $v0, $a1, 0x8 /* 3D0B2C E00CA62C AE620000 */ sw $v0, 0x0($s3) /* 3D0B30 E00CA630 29620002 */ slti $v0, $t3, 0x2 /* 3D0B34 E00CA634 14400009 */ bnez $v0, .LE00CA65C /* 3D0B38 E00CA638 ACA30004 */ sw $v1, 0x4($a1) /* 3D0B3C E00CA63C 3C04FC40 */ lui $a0, (0xFC4099FF >> 16) /* 3D0B40 E00CA640 348499FF */ ori $a0, $a0, (0xFC4099FF & 0xFFFF) /* 3D0B44 E00CA644 3C035F0E */ lui $v1, (0x5F0EFE3F >> 16) /* 3D0B48 E00CA648 3463FE3F */ ori $v1, $v1, (0x5F0EFE3F & 0xFFFF) /* 3D0B4C E00CA64C 24A20010 */ addiu $v0, $a1, 0x10 /* 3D0B50 E00CA650 AE620000 */ sw $v0, 0x0($s3) /* 3D0B54 E00CA654 ACA40008 */ sw $a0, 0x8($a1) /* 3D0B58 E00CA658 ACA3000C */ sw $v1, 0xC($a1) .LE00CA65C: /* 3D0B5C E00CA65C 240BFFFF */ addiu $t3, $zero, -0x1 /* 3D0B60 E00CA660 0000F02D */ daddu $fp, $zero, $zero /* 3D0B64 E00CA664 03C0A02D */ daddu $s4, $fp, $zero /* 3D0B68 E00CA668 3C088888 */ lui $t0, (0x88888889 >> 16) /* 3D0B6C E00CA66C AFAB0060 */ sw $t3, 0x60($sp) /* 3D0B70 E00CA670 8FAB0050 */ lw $t3, 0x50($sp) /* 3D0B74 E00CA674 35088889 */ ori $t0, $t0, (0x88888889 & 0xFFFF) /* 3D0B78 E00CA678 3162003F */ andi $v0, $t3, 0x3F /* 3D0B7C E00CA67C 00021140 */ sll $v0, $v0, 5 /* 3D0B80 E00CA680 AFA20064 */ sw $v0, 0x64($sp) /* 3D0B84 E00CA684 8E660000 */ lw $a2, 0x0($s3) /* 3D0B88 E00CA688 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3D0B8C E00CA68C 00C0382D */ daddu $a3, $a2, $zero /* 3D0B90 E00CA690 24C60008 */ addiu $a2, $a2, 0x8 /* 3D0B94 E00CA694 24CB0010 */ addiu $t3, $a2, 0x10 /* 3D0B98 E00CA698 AFAB005C */ sw $t3, 0x5C($sp) /* 3D0B9C E00CA69C AE660000 */ sw $a2, 0x0($s3) /* 3D0BA0 E00CA6A0 ACE20000 */ sw $v0, 0x0($a3) /* 3D0BA4 E00CA6A4 92C2001B */ lbu $v0, 0x1B($s6) /* 3D0BA8 E00CA6A8 92C4001F */ lbu $a0, 0x1F($s6) /* 3D0BAC E00CA6AC 92C50023 */ lbu $a1, 0x23($s6) /* 3D0BB0 E00CA6B0 24C30008 */ addiu $v1, $a2, 0x8 /* 3D0BB4 E00CA6B4 AE630000 */ sw $v1, 0x0($s3) /* 3D0BB8 E00CA6B8 32A300FF */ andi $v1, $s5, 0xFF /* 3D0BBC E00CA6BC 00021600 */ sll $v0, $v0, 24 /* 3D0BC0 E00CA6C0 00042400 */ sll $a0, $a0, 16 /* 3D0BC4 E00CA6C4 00441025 */ or $v0, $v0, $a0 /* 3D0BC8 E00CA6C8 00052A00 */ sll $a1, $a1, 8 /* 3D0BCC E00CA6CC 00451025 */ or $v0, $v0, $a1 /* 3D0BD0 E00CA6D0 00431025 */ or $v0, $v0, $v1 /* 3D0BD4 E00CA6D4 ACE20004 */ sw $v0, 0x4($a3) /* 3D0BD8 E00CA6D8 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3D0BDC E00CA6DC ACC20000 */ sw $v0, 0x0($a2) /* 3D0BE0 E00CA6E0 92C3002B */ lbu $v1, 0x2B($s6) /* 3D0BE4 E00CA6E4 92C4002F */ lbu $a0, 0x2F($s6) /* 3D0BE8 E00CA6E8 92C50033 */ lbu $a1, 0x33($s6) /* 3D0BEC E00CA6EC 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3D0BF0 E00CA6F0 ACC20008 */ sw $v0, 0x8($a2) /* 3D0BF4 E00CA6F4 24C203D0 */ addiu $v0, $a2, 0x3D0 /* 3D0BF8 E00CA6F8 ACC2000C */ sw $v0, 0xC($a2) /* 3D0BFC E00CA6FC AE620000 */ sw $v0, 0x0($s3) /* 3D0C00 E00CA700 00031E00 */ sll $v1, $v1, 24 /* 3D0C04 E00CA704 00042400 */ sll $a0, $a0, 16 /* 3D0C08 E00CA708 00641825 */ or $v1, $v1, $a0 /* 3D0C0C E00CA70C 00052A00 */ sll $a1, $a1, 8 /* 3D0C10 E00CA710 00651825 */ or $v1, $v1, $a1 /* 3D0C14 E00CA714 ACC30004 */ sw $v1, 0x4($a2) /* 3D0C18 E00CA718 8EC602A8 */ lw $a2, 0x2A8($s6) /* 3D0C1C E00CA71C 26850001 */ addiu $a1, $s4, 0x1 .LE00CA720: /* 3D0C20 E00CA720 00C52021 */ addu $a0, $a2, $a1 /* 3D0C24 E00CA724 00880018 */ mult $a0, $t0 /* 3D0C28 E00CA728 00041FC3 */ sra $v1, $a0, 31 /* 3D0C2C E00CA72C 00005810 */ mfhi $t3 /* 3D0C30 E00CA730 01641021 */ addu $v0, $t3, $a0 /* 3D0C34 E00CA734 00021103 */ sra $v0, $v0, 4 /* 3D0C38 E00CA738 00431823 */ subu $v1, $v0, $v1 /* 3D0C3C E00CA73C 00031100 */ sll $v0, $v1, 4 /* 3D0C40 E00CA740 00431023 */ subu $v0, $v0, $v1 /* 3D0C44 E00CA744 00021040 */ sll $v0, $v0, 1 /* 3D0C48 E00CA748 00821823 */ subu $v1, $a0, $v0 /* 3D0C4C E00CA74C 00031080 */ sll $v0, $v1, 2 /* 3D0C50 E00CA750 02C21021 */ addu $v0, $s6, $v0 /* 3D0C54 E00CA754 8C420230 */ lw $v0, 0x230($v0) /* 3D0C58 E00CA758 54400001 */ bnel $v0, $zero, .LE00CA760 /* 3D0C5C E00CA75C 27DE0001 */ addiu $fp, $fp, 0x1 .LE00CA760: /* 3D0C60 E00CA760 00A0A02D */ daddu $s4, $a1, $zero /* 3D0C64 E00CA764 2A82001E */ slti $v0, $s4, 0x1E /* 3D0C68 E00CA768 1440FFED */ bnez $v0, .LE00CA720 /* 3D0C6C E00CA76C 26850001 */ addiu $a1, $s4, 0x1 /* 3D0C70 E00CA770 27DEFFFF */ addiu $fp, $fp, -0x1 /* 3D0C74 E00CA774 1BC00130 */ blez $fp, .LE00CAC38 /* 3D0C78 E00CA778 0000A02D */ daddu $s4, $zero, $zero /* 3D0C7C E00CA77C AFA00068 */ sw $zero, 0x68($sp) .LE00CA780: /* 3D0C80 E00CA780 8FAB0068 */ lw $t3, 0x68($sp) /* 3D0C84 E00CA784 17C00002 */ bnez $fp, .LE00CA790 /* 3D0C88 E00CA788 017E001A */ div $zero, $t3, $fp /* 3D0C8C E00CA78C 0007000D */ break 7 .LE00CA790: /* 3D0C90 E00CA790 2401FFFF */ addiu $at, $zero, -0x1 /* 3D0C94 E00CA794 17C10004 */ bne $fp, $at, .LE00CA7A8 /* 3D0C98 E00CA798 3C018000 */ lui $at, (0x80000000 >> 16) /* 3D0C9C E00CA79C 15610002 */ bne $t3, $at, .LE00CA7A8 /* 3D0CA0 E00CA7A0 00000000 */ nop /* 3D0CA4 E00CA7A4 0006000D */ break 6 .LE00CA7A8: /* 3D0CA8 E00CA7A8 00002812 */ mflo $a1 /* 3D0CAC E00CA7AC 3C038888 */ lui $v1, (0x88888889 >> 16) /* 3D0CB0 E00CA7B0 34638889 */ ori $v1, $v1, (0x88888889 & 0xFFFF) /* 3D0CB4 E00CA7B4 8EC402A8 */ lw $a0, 0x2A8($s6) /* 3D0CB8 E00CA7B8 26820001 */ addiu $v0, $s4, 0x1 /* 3D0CBC E00CA7BC 00822021 */ addu $a0, $a0, $v0 /* 3D0CC0 E00CA7C0 00830018 */ mult $a0, $v1 /* 3D0CC4 E00CA7C4 8FAB005C */ lw $t3, 0x5C($sp) /* 3D0CC8 E00CA7C8 00141140 */ sll $v0, $s4, 5 /* 3D0CCC E00CA7CC 01629021 */ addu $s2, $t3, $v0 /* 3D0CD0 E00CA7D0 00001810 */ mfhi $v1 /* 3D0CD4 E00CA7D4 00641021 */ addu $v0, $v1, $a0 /* 3D0CD8 E00CA7D8 00021103 */ sra $v0, $v0, 4 /* 3D0CDC E00CA7DC 00041FC3 */ sra $v1, $a0, 31 /* 3D0CE0 E00CA7E0 00439823 */ subu $s3, $v0, $v1 /* 3D0CE4 E00CA7E4 00131100 */ sll $v0, $s3, 4 /* 3D0CE8 E00CA7E8 00531023 */ subu $v0, $v0, $s3 /* 3D0CEC E00CA7EC 00021040 */ sll $v0, $v0, 1 /* 3D0CF0 E00CA7F0 44856000 */ mtc1 $a1, $f12 /* 3D0CF4 E00CA7F4 00000000 */ nop /* 3D0CF8 E00CA7F8 46806320 */ cvt.s.w $f12, $f12 /* 3D0CFC E00CA7FC 0C080140 */ jal shim_sin_deg /* 3D0D00 E00CA800 00829823 */ subu $s3, $a0, $v0 /* 3D0D04 E00CA804 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3D0D08 E00CA808 44811000 */ mtc1 $at, $f2 /* 3D0D0C E00CA80C 00000000 */ nop /* 3D0D10 E00CA810 46020002 */ mul.s $f0, $f0, $f2 /* 3D0D14 E00CA814 00000000 */ nop /* 3D0D18 E00CA818 4600018D */ trunc.w.s $f6, $f0 /* 3D0D1C E00CA81C 44173000 */ mfc1 $s7, $f6 /* 3D0D20 E00CA820 00000000 */ nop /* 3D0D24 E00CA824 2AE200C9 */ slti $v0, $s7, 0xC9 /* 3D0D28 E00CA828 50400001 */ beql $v0, $zero, .LE00CA830 /* 3D0D2C E00CA82C 241700C8 */ addiu $s7, $zero, 0xC8 .LE00CA830: /* 3D0D30 E00CA830 00131080 */ sll $v0, $s3, 2 /* 3D0D34 E00CA834 02C28021 */ addu $s0, $s6, $v0 /* 3D0D38 E00CA838 8E020230 */ lw $v0, 0x230($s0) /* 3D0D3C E00CA83C 504000DF */ beql $v0, $zero, .LE00CABBC /* 3D0D40 E00CA840 26940001 */ addiu $s4, $s4, 0x1 /* 3D0D44 E00CA844 8FAB0060 */ lw $t3, 0x60($sp) /* 3D0D48 E00CA848 2402FFFF */ addiu $v0, $zero, -0x1 /* 3D0D4C E00CA84C 15620012 */ bne $t3, $v0, .LE00CA898 /* 3D0D50 E00CA850 2402001D */ addiu $v0, $zero, 0x1D /* 3D0D54 E00CA854 26630001 */ addiu $v1, $s3, 0x1 /* 3D0D58 E00CA858 2862001E */ slti $v0, $v1, 0x1E /* 3D0D5C E00CA85C 50400001 */ beql $v0, $zero, .LE00CA864 /* 3D0D60 E00CA860 0000182D */ daddu $v1, $zero, $zero .LE00CA864: /* 3D0D64 E00CA864 00031080 */ sll $v0, $v1, 2 /* 3D0D68 E00CA868 02C21021 */ addu $v0, $s6, $v0 /* 3D0D6C E00CA86C AFB40060 */ sw $s4, 0x60($sp) /* 3D0D70 E00CA870 C44C00C8 */ lwc1 $f12, 0xC8($v0) /* 3D0D74 E00CA874 8E0600C8 */ lw $a2, 0xC8($s0) /* 3D0D78 E00CA878 C6000050 */ lwc1 $f0, 0x50($s0) /* 3D0D7C E00CA87C C44E0050 */ lwc1 $f14, 0x50($v0) /* 3D0D80 E00CA880 46000007 */ neg.s $f0, $f0 /* 3D0D84 E00CA884 44070000 */ mfc1 $a3, $f0 /* 3D0D88 E00CA888 0C080148 */ jal shim_atan2 /* 3D0D8C E00CA88C 46007387 */ neg.s $f14, $f14 /* 3D0D90 E00CA890 08032A63 */ j .LE00CA98C /* 3D0D94 E00CA894 46000787 */ neg.s $f30, $f0 .LE00CA898: /* 3D0D98 E00CA898 1282003C */ beq $s4, $v0, .LE00CA98C /* 3D0D9C E00CA89C 26630001 */ addiu $v1, $s3, 0x1 /* 3D0DA0 E00CA8A0 2862001E */ slti $v0, $v1, 0x1E /* 3D0DA4 E00CA8A4 14400002 */ bnez $v0, .LE00CA8B0 /* 3D0DA8 E00CA8A8 2671FFFF */ addiu $s1, $s3, -0x1 /* 3D0DAC E00CA8AC 0000182D */ daddu $v1, $zero, $zero .LE00CA8B0: /* 3D0DB0 E00CA8B0 06220001 */ bltzl $s1, .LE00CA8B8 /* 3D0DB4 E00CA8B4 2411001D */ addiu $s1, $zero, 0x1D .LE00CA8B8: /* 3D0DB8 E00CA8B8 00031080 */ sll $v0, $v1, 2 /* 3D0DBC E00CA8BC 02C21021 */ addu $v0, $s6, $v0 /* 3D0DC0 E00CA8C0 C44C00C8 */ lwc1 $f12, 0xC8($v0) /* 3D0DC4 E00CA8C4 8E0600C8 */ lw $a2, 0xC8($s0) /* 3D0DC8 E00CA8C8 C6000050 */ lwc1 $f0, 0x50($s0) /* 3D0DCC E00CA8CC C44E0050 */ lwc1 $f14, 0x50($v0) /* 3D0DD0 E00CA8D0 46000007 */ neg.s $f0, $f0 /* 3D0DD4 E00CA8D4 44070000 */ mfc1 $a3, $f0 /* 3D0DD8 E00CA8D8 0C080148 */ jal shim_atan2 /* 3D0DDC E00CA8DC 46007387 */ neg.s $f14, $f14 /* 3D0DE0 E00CA8E0 00111080 */ sll $v0, $s1, 2 /* 3D0DE4 E00CA8E4 02C21021 */ addu $v0, $s6, $v0 /* 3D0DE8 E00CA8E8 C60C00C8 */ lwc1 $f12, 0xC8($s0) /* 3D0DEC E00CA8EC 8C4600C8 */ lw $a2, 0xC8($v0) /* 3D0DF0 E00CA8F0 46000507 */ neg.s $f20, $f0 /* 3D0DF4 E00CA8F4 C4400050 */ lwc1 $f0, 0x50($v0) /* 3D0DF8 E00CA8F8 C60E0050 */ lwc1 $f14, 0x50($s0) /* 3D0DFC E00CA8FC 46000007 */ neg.s $f0, $f0 /* 3D0E00 E00CA900 44070000 */ mfc1 $a3, $f0 /* 3D0E04 E00CA904 0C080148 */ jal shim_atan2 /* 3D0E08 E00CA908 46007387 */ neg.s $f14, $f14 /* 3D0E0C E00CA90C 46000307 */ neg.s $f12, $f0 /* 3D0E10 E00CA910 46146081 */ sub.s $f2, $f12, $f20 /* 3D0E14 E00CA914 3C014334 */ lui $at, (0x43340000 >> 16) /* 3D0E18 E00CA918 44810000 */ mtc1 $at, $f0 /* 3D0E1C E00CA91C 00000000 */ nop /* 3D0E20 E00CA920 4602003C */ c.lt.s $f0, $f2 /* 3D0E24 E00CA924 00000000 */ nop /* 3D0E28 E00CA928 45000005 */ bc1f .LE00CA940 /* 3D0E2C E00CA92C 00000000 */ nop /* 3D0E30 E00CA930 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 3D0E34 E00CA934 44813000 */ mtc1 $at, $f6 /* 3D0E38 E00CA938 08032A5B */ j .LE00CA96C /* 3D0E3C E00CA93C 4606A500 */ add.s $f20, $f20, $f6 .LE00CA940: /* 3D0E40 E00CA940 3C01C334 */ lui $at, (0xC3340000 >> 16) /* 3D0E44 E00CA944 44810000 */ mtc1 $at, $f0 /* 3D0E48 E00CA948 00000000 */ nop /* 3D0E4C E00CA94C 4600103C */ c.lt.s $f2, $f0 /* 3D0E50 E00CA950 00000000 */ nop /* 3D0E54 E00CA954 45020006 */ bc1fl .LE00CA970 /* 3D0E58 E00CA958 460CA780 */ add.s $f30, $f20, $f12 /* 3D0E5C E00CA95C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 3D0E60 E00CA960 44813000 */ mtc1 $at, $f6 /* 3D0E64 E00CA964 00000000 */ nop /* 3D0E68 E00CA968 46066300 */ add.s $f12, $f12, $f6 .LE00CA96C: /* 3D0E6C E00CA96C 460CA780 */ add.s $f30, $f20, $f12 .LE00CA970: /* 3D0E70 E00CA970 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3D0E74 E00CA974 44811800 */ mtc1 $at, $f3 /* 3D0E78 E00CA978 44801000 */ mtc1 $zero, $f2 /* 3D0E7C E00CA97C 4600F021 */ cvt.d.s $f0, $f30 /* 3D0E80 E00CA980 46220002 */ mul.d $f0, $f0, $f2 /* 3D0E84 E00CA984 00000000 */ nop /* 3D0E88 E00CA988 462007A0 */ cvt.s.d $f30, $f0 .LE00CA98C: /* 3D0E8C E00CA98C 00131080 */ sll $v0, $s3, 2 /* 3D0E90 E00CA990 02C28021 */ addu $s0, $s6, $v0 /* 3D0E94 E00CA994 8E0301B8 */ lw $v1, 0x1B8($s0) /* 3D0E98 E00CA998 8FAB0050 */ lw $t3, 0x50($sp) /* 3D0E9C E00CA99C C6180050 */ lwc1 $f24, 0x50($s0) /* 3D0EA0 E00CA9A0 C61A00C8 */ lwc1 $f26, 0xC8($s0) /* 3D0EA4 E00CA9A4 C61C0140 */ lwc1 $f28, 0x140($s0) /* 3D0EA8 E00CA9A8 00031080 */ sll $v0, $v1, 2 /* 3D0EAC E00CA9AC 00431021 */ addu $v0, $v0, $v1 /* 3D0EB0 E00CA9B0 00021100 */ sll $v0, $v0, 4 /* 3D0EB4 E00CA9B4 01621023 */ subu $v0, $t3, $v0 /* 3D0EB8 E00CA9B8 00021080 */ sll $v0, $v0, 2 /* 3D0EBC E00CA9BC 44826000 */ mtc1 $v0, $f12 /* 3D0EC0 E00CA9C0 00000000 */ nop /* 3D0EC4 E00CA9C4 46806320 */ cvt.s.w $f12, $f12 /* 3D0EC8 E00CA9C8 0C080140 */ jal shim_sin_deg /* 3D0ECC E00CA9CC 01638823 */ subu $s1, $t3, $v1 /* 3D0ED0 E00CA9D0 3C014040 */ lui $at, (0x40400000 >> 16) /* 3D0ED4 E00CA9D4 44811000 */ mtc1 $at, $f2 /* 3D0ED8 E00CA9D8 00000000 */ nop /* 3D0EDC E00CA9DC 46020002 */ mul.s $f0, $f0, $f2 /* 3D0EE0 E00CA9E0 00000000 */ nop /* 3D0EE4 E00CA9E4 3C014180 */ lui $at, (0x41800000 >> 16) /* 3D0EE8 E00CA9E8 44811000 */ mtc1 $at, $f2 /* 3D0EEC E00CA9EC 00000000 */ nop /* 3D0EF0 E00CA9F0 46020000 */ add.s $f0, $f0, $f2 /* 3D0EF4 E00CA9F4 44911000 */ mtc1 $s1, $f2 /* 3D0EF8 E00CA9F8 00000000 */ nop /* 3D0EFC E00CA9FC 468010A0 */ cvt.s.w $f2, $f2 /* 3D0F00 E00CAA00 46020580 */ add.s $f22, $f0, $f2 /* 3D0F04 E00CAA04 C7A60058 */ lwc1 $f6, 0x58($sp) /* 3D0F08 E00CAA08 8FAB0054 */ lw $t3, 0x54($sp) /* 3D0F0C E00CAA0C 4606B582 */ mul.s $f22, $f22, $f6 /* 3D0F10 E00CAA10 00000000 */ nop /* 3D0F14 E00CAA14 C60002AC */ lwc1 $f0, 0x2AC($s0) /* 3D0F18 E00CAA18 3C0141C0 */ lui $at, (0x41C00000 >> 16) /* 3D0F1C E00CAA1C 44813000 */ mtc1 $at, $f6 /* 3D0F20 E00CAA20 00000000 */ nop /* 3D0F24 E00CAA24 46060002 */ mul.s $f0, $f0, $f6 /* 3D0F28 E00CAA28 00000000 */ nop /* 3D0F2C E00CAA2C C7A20064 */ lwc1 $f2, 0x64($sp) /* 3D0F30 E00CAA30 468010A0 */ cvt.s.w $f2, $f2 /* 3D0F34 E00CAA34 46020000 */ add.s $f0, $f0, $f2 /* 3D0F38 E00CAA38 4600018D */ trunc.w.s $f6, $f0 /* 3D0F3C E00CAA3C 44153000 */ mfc1 $s5, $f6 /* 3D0F40 E00CAA40 241300FF */ addiu $s3, $zero, 0xFF /* 3D0F44 E00CAA44 0260802D */ daddu $s0, $s3, $zero /* 3D0F48 E00CAA48 00111040 */ sll $v0, $s1, 1 /* 3D0F4C E00CAA4C 00511021 */ addu $v0, $v0, $s1 /* 3D0F50 E00CAA50 000210C0 */ sll $v0, $v0, 3 /* 3D0F54 E00CAA54 00511021 */ addu $v0, $v0, $s1 /* 3D0F58 E00CAA58 00021080 */ sll $v0, $v0, 2 /* 3D0F5C E00CAA5C 02028823 */ subu $s1, $s0, $v0 /* 3D0F60 E00CAA60 06210022 */ bgez $s1, .LE00CAAEC /* 3D0F64 E00CAA64 00000000 */ nop /* 3D0F68 E00CAA68 44910000 */ mtc1 $s1, $f0 /* 3D0F6C E00CAA6C 00000000 */ nop /* 3D0F70 E00CAA70 46800020 */ cvt.s.w $f0, $f0 /* 3D0F74 E00CAA74 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D0F78 E00CAA78 D422ACC0 */ ldc1 $f2, -0x5340($at) /* 3D0F7C E00CAA7C 46000021 */ cvt.d.s $f0, $f0 /* 3D0F80 E00CAA80 46220002 */ mul.d $f0, $f0, $f2 /* 3D0F84 E00CAA84 00000000 */ nop /* 3D0F88 E00CAA88 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D0F8C E00CAA8C D426ACC8 */ ldc1 $f6, -0x5338($at) /* 3D0F90 E00CAA90 46260000 */ add.d $f0, $f0, $f6 /* 3D0F94 E00CAA94 4620018D */ trunc.w.d $f6, $f0 /* 3D0F98 E00CAA98 44103000 */ mfc1 $s0, $f6 /* 3D0F9C E00CAA9C 00000000 */ nop /* 3D0FA0 E00CAAA0 06010012 */ bgez $s0, .LE00CAAEC /* 3D0FA4 E00CAAA4 0000882D */ daddu $s1, $zero, $zero /* 3D0FA8 E00CAAA8 44900000 */ mtc1 $s0, $f0 /* 3D0FAC E00CAAAC 00000000 */ nop /* 3D0FB0 E00CAAB0 46800020 */ cvt.s.w $f0, $f0 /* 3D0FB4 E00CAAB4 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D0FB8 E00CAAB8 D422ACD0 */ ldc1 $f2, -0x5330($at) /* 3D0FBC E00CAABC 46000021 */ cvt.d.s $f0, $f0 /* 3D0FC0 E00CAAC0 46220002 */ mul.d $f0, $f0, $f2 /* 3D0FC4 E00CAAC4 00000000 */ nop /* 3D0FC8 E00CAAC8 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D0FCC E00CAACC D426ACD8 */ ldc1 $f6, -0x5328($at) /* 3D0FD0 E00CAAD0 46260000 */ add.d $f0, $f0, $f6 /* 3D0FD4 E00CAAD4 4620018D */ trunc.w.d $f6, $f0 /* 3D0FD8 E00CAAD8 44133000 */ mfc1 $s3, $f6 /* 3D0FDC E00CAADC 00000000 */ nop /* 3D0FE0 E00CAAE0 06610002 */ bgez $s3, .LE00CAAEC /* 3D0FE4 E00CAAE4 0220802D */ daddu $s0, $s1, $zero /* 3D0FE8 E00CAAE8 0220982D */ daddu $s3, $s1, $zero .LE00CAAEC: /* 3D0FEC E00CAAEC 0C080140 */ jal shim_sin_deg /* 3D0FF0 E00CAAF0 4600F306 */ mov.s $f12, $f30 /* 3D0FF4 E00CAAF4 4600B502 */ mul.s $f20, $f22, $f0 /* 3D0FF8 E00CAAF8 00000000 */ nop /* 3D0FFC E00CAAFC 0C080144 */ jal shim_cos_deg /* 3D1000 E00CAB00 4600F306 */ mov.s $f12, $f30 /* 3D1004 E00CAB04 4600B002 */ mul.s $f0, $f22, $f0 /* 3D1008 E00CAB08 00000000 */ nop /* 3D100C E00CAB0C 24020400 */ addiu $v0, $zero, 0x400 /* 3D1010 E00CAB10 8FAB0068 */ lw $t3, 0x68($sp) /* 3D1014 E00CAB14 44803000 */ mtc1 $zero, $f6 /* 3D1018 E00CAB18 256B00B4 */ addiu $t3, $t3, 0xB4 /* 3D101C E00CAB1C 4606E080 */ add.s $f2, $f28, $f6 /* 3D1020 E00CAB20 AFAB0068 */ sw $t3, 0x68($sp) /* 3D1024 E00CAB24 A6550008 */ sh $s5, 0x8($s2) /* 3D1028 E00CAB28 A642000A */ sh $v0, 0xA($s2) /* 3D102C E00CAB2C 4614C100 */ add.s $f4, $f24, $f20 /* 3D1030 E00CAB30 A253000C */ sb $s3, 0xC($s2) /* 3D1034 E00CAB34 4600118D */ trunc.w.s $f6, $f2 /* 3D1038 E00CAB38 44033000 */ mfc1 $v1, $f6 /* 3D103C E00CAB3C 4600D080 */ add.s $f2, $f26, $f0 /* 3D1040 E00CAB40 A250000D */ sb $s0, 0xD($s2) /* 3D1044 E00CAB44 A251000E */ sb $s1, 0xE($s2) /* 3D1048 E00CAB48 4614C501 */ sub.s $f20, $f24, $f20 /* 3D104C E00CAB4C A257000F */ sb $s7, 0xF($s2) /* 3D1050 E00CAB50 A6430004 */ sh $v1, 0x4($s2) /* 3D1054 E00CAB54 4600D001 */ sub.s $f0, $f26, $f0 /* 3D1058 E00CAB58 4600218D */ trunc.w.s $f6, $f4 /* 3D105C E00CAB5C 44023000 */ mfc1 $v0, $f6 /* 3D1060 E00CAB60 00000000 */ nop /* 3D1064 E00CAB64 A6420000 */ sh $v0, 0x0($s2) /* 3D1068 E00CAB68 4600118D */ trunc.w.s $f6, $f2 /* 3D106C E00CAB6C 44023000 */ mfc1 $v0, $f6 /* 3D1070 E00CAB70 00000000 */ nop /* 3D1074 E00CAB74 A6420002 */ sh $v0, 0x2($s2) /* 3D1078 E00CAB78 26520010 */ addiu $s2, $s2, 0x10 /* 3D107C E00CAB7C 4600A18D */ trunc.w.s $f6, $f20 /* 3D1080 E00CAB80 44023000 */ mfc1 $v0, $f6 /* 3D1084 E00CAB84 00000000 */ nop /* 3D1088 E00CAB88 A6420000 */ sh $v0, 0x0($s2) /* 3D108C E00CAB8C 4600018D */ trunc.w.s $f6, $f0 /* 3D1090 E00CAB90 44023000 */ mfc1 $v0, $f6 /* 3D1094 E00CAB94 00000000 */ nop /* 3D1098 E00CAB98 A6420002 */ sh $v0, 0x2($s2) /* 3D109C E00CAB9C A6430004 */ sh $v1, 0x4($s2) /* 3D10A0 E00CABA0 A6550008 */ sh $s5, 0x8($s2) /* 3D10A4 E00CABA4 A640000A */ sh $zero, 0xA($s2) /* 3D10A8 E00CABA8 A253000C */ sb $s3, 0xC($s2) /* 3D10AC E00CABAC A250000D */ sb $s0, 0xD($s2) /* 3D10B0 E00CABB0 A251000E */ sb $s1, 0xE($s2) /* 3D10B4 E00CABB4 A257000F */ sb $s7, 0xF($s2) /* 3D10B8 E00CABB8 26940001 */ addiu $s4, $s4, 0x1 .LE00CABBC: /* 3D10BC E00CABBC 2A82001E */ slti $v0, $s4, 0x1E /* 3D10C0 E00CABC0 1440FEEF */ bnez $v0, .LE00CA780 /* 3D10C4 E00CABC4 00000000 */ nop /* 3D10C8 E00CABC8 8FB40060 */ lw $s4, 0x60($sp) /* 3D10CC E00CABCC 2A82001D */ slti $v0, $s4, 0x1D /* 3D10D0 E00CABD0 10400019 */ beqz $v0, .LE00CAC38 /* 3D10D4 E00CABD4 3C050002 */ lui $a1, (0x20406 >> 16) /* 3D10D8 E00CABD8 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3D10DC E00CABDC 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3D10E0 E00CABE0 3C080100 */ lui $t0, (0x1004008 >> 16) /* 3D10E4 E00CABE4 35084008 */ ori $t0, $t0, (0x1004008 & 0xFFFF) /* 3D10E8 E00CABE8 3C070600 */ lui $a3, (0x6000402 >> 16) /* 3D10EC E00CABEC 34E70402 */ ori $a3, $a3, (0x6000402 & 0xFFFF) /* 3D10F0 E00CABF0 34A50406 */ ori $a1, $a1, (0x20406 & 0xFFFF) /* 3D10F4 E00CABF4 8FAB005C */ lw $t3, 0x5C($sp) /* 3D10F8 E00CABF8 00141140 */ sll $v0, $s4, 5 /* 3D10FC E00CABFC 004B3021 */ addu $a2, $v0, $t3 .LE00CAC00: /* 3D1100 E00CAC00 8C830000 */ lw $v1, 0x0($a0) /* 3D1104 E00CAC04 26940001 */ addiu $s4, $s4, 0x1 /* 3D1108 E00CAC08 0060102D */ daddu $v0, $v1, $zero /* 3D110C E00CAC0C 24630008 */ addiu $v1, $v1, 0x8 /* 3D1110 E00CAC10 AC460004 */ sw $a2, 0x4($v0) /* 3D1114 E00CAC14 24C60020 */ addiu $a2, $a2, 0x20 /* 3D1118 E00CAC18 AC830000 */ sw $v1, 0x0($a0) /* 3D111C E00CAC1C AC480000 */ sw $t0, 0x0($v0) /* 3D1120 E00CAC20 24620008 */ addiu $v0, $v1, 0x8 /* 3D1124 E00CAC24 AC820000 */ sw $v0, 0x0($a0) /* 3D1128 E00CAC28 2A82001D */ slti $v0, $s4, 0x1D /* 3D112C E00CAC2C AC670000 */ sw $a3, 0x0($v1) /* 3D1130 E00CAC30 1440FFF3 */ bnez $v0, .LE00CAC00 /* 3D1134 E00CAC34 AC650004 */ sw $a1, 0x4($v1) .LE00CAC38: /* 3D1138 E00CAC38 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3D113C E00CAC3C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3D1140 E00CAC40 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3D1144 E00CAC44 8C620000 */ lw $v0, 0x0($v1) /* 3D1148 E00CAC48 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3D114C E00CAC4C 0040202D */ daddu $a0, $v0, $zero /* 3D1150 E00CAC50 24420008 */ addiu $v0, $v0, 0x8 /* 3D1154 E00CAC54 AC620000 */ sw $v0, 0x0($v1) /* 3D1158 E00CAC58 24020040 */ addiu $v0, $zero, 0x40 /* 3D115C E00CAC5C AC850000 */ sw $a1, 0x0($a0) /* 3D1160 E00CAC60 AC820004 */ sw $v0, 0x4($a0) /* 3D1164 E00CAC64 8FBF0094 */ lw $ra, 0x94($sp) /* 3D1168 E00CAC68 8FBE0090 */ lw $fp, 0x90($sp) /* 3D116C E00CAC6C 8FB7008C */ lw $s7, 0x8C($sp) /* 3D1170 E00CAC70 8FB60088 */ lw $s6, 0x88($sp) /* 3D1174 E00CAC74 8FB50084 */ lw $s5, 0x84($sp) /* 3D1178 E00CAC78 8FB40080 */ lw $s4, 0x80($sp) /* 3D117C E00CAC7C 8FB3007C */ lw $s3, 0x7C($sp) /* 3D1180 E00CAC80 8FB20078 */ lw $s2, 0x78($sp) /* 3D1184 E00CAC84 8FB10074 */ lw $s1, 0x74($sp) /* 3D1188 E00CAC88 8FB00070 */ lw $s0, 0x70($sp) /* 3D118C E00CAC8C D7BE00C0 */ ldc1 $f30, 0xC0($sp) /* 3D1190 E00CAC90 D7BC00B8 */ ldc1 $f28, 0xB8($sp) /* 3D1194 E00CAC94 D7BA00B0 */ ldc1 $f26, 0xB0($sp) /* 3D1198 E00CAC98 D7B800A8 */ ldc1 $f24, 0xA8($sp) /* 3D119C E00CAC9C D7B600A0 */ ldc1 $f22, 0xA0($sp) /* 3D11A0 E00CACA0 D7B40098 */ ldc1 $f20, 0x98($sp) /* 3D11A4 E00CACA4 03E00008 */ jr $ra /* 3D11A8 E00CACA8 27BD00C8 */ addiu $sp, $sp, 0xC8 /* 3D11AC E00CACAC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void effect_65_appendGfx(void* effect) { Effect65FXData* data = ((EffectInstance*)effect)->data.unk_65; Matrix4f mtx; s32 lifeTime; s32 variation; f32 scale; Vtx_t* vtxBuffer; Vtx_t* vtx; s32 firstPointIdx; s32 baseTexOffset; s32 phase; f32 deltaY; f32 deltaX; f32 width; f32 pathPointX; f32 pathPointY; f32 pathPointZ; f32 deltaAngle; f32 prevAngle; f32 nextAngle; f32 angle; s32 primAlpha; s32 texOffsetX; s32 numPoints; s32 pathPointLifetime; s32 r, g, b, a; f32 deltaZ; s32 idx; s32 next; s32 prev; s32 i; s32 fadeOutPhase; lifeTime = data->lifeTime; primAlpha = data->alpha; variation = data->variation; scale = data->scale; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(mtx, 0.0f, 0.0f, 0.0f); shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E00CACB0[variation]); if (variation >= 2) { gDPSetCombineLERP(gMainGfxPos++, SHADE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0); } gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, primAlpha); gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, 0); gSPBranchList(gMainGfxPos, gMainGfxPos + 0x79); vtxBuffer = (Vtx_t*) (gMainGfxPos + 1); firstPointIdx = -1; baseTexOffset = (lifeTime & 0x3F) << 5; gMainGfxPos += 0x79; numPoints = 0; for (i = 0; i < MAX_POINTS; i++) { s32 a1 = i + 1; s32 idx = (data->lastPointIndex + a1) % MAX_POINTS; if (data->pathPointEnabled[idx]) { numPoints++; } } numPoints--; if (numPoints > 0) { phase = 0; for (i = 0; i < MAX_POINTS; i++) { s32 a1 = i + 1; vtx = &vtxBuffer[i * 2]; fadeOutPhase = phase / numPoints; idx = (data->lastPointIndex + a1) % MAX_POINTS; a = shim_sin_deg(fadeOutPhase) * 255.0f; if (a > 200) { a = 200; } if (!data->pathPointEnabled[idx]) { continue; } if (firstPointIdx == -1) { next = idx + 1; if (next >= MAX_POINTS) { next = 0; } firstPointIdx = i; angle = -shim_atan2(data->pathY[next], -data->pathX[next], data->pathY[idx], -data->pathX[idx]); } else { if (i != MAX_POINTS - 1) { next = idx + 1; prev = idx - 1; if (next >= MAX_POINTS) { next = 0; } if (prev < 0) { prev = MAX_POINTS - 1; } nextAngle = -shim_atan2(data->pathY[next], -data->pathX[next], data->pathY[idx], -data->pathX[idx]); prevAngle = -shim_atan2(data->pathY[idx], -data->pathX[idx], data->pathY[prev], -data->pathX[prev]); deltaAngle = prevAngle - nextAngle; if (deltaAngle > 180.0f) { nextAngle += 360.0f; } else if (deltaAngle < -180.0f) { prevAngle += 360.0f; } angle = nextAngle + prevAngle; angle *= 0.5; } } pathPointX = data->pathX[idx]; pathPointY = data->pathY[idx]; pathPointZ = data->pathZ[idx]; pathPointLifetime = lifeTime - data->pathTimestamp[idx]; width = shim_sin_deg((lifeTime - data->pathTimestamp[idx] * 80) * 4) * 3.0f + 16.0f + pathPointLifetime; width *= scale; if (variation >= 0) { texOffsetX = (data->pathLength[idx] * 24.0f) + baseTexOffset; } else { texOffsetX = (data->pathLength[idx] * 24.0f) + baseTexOffset; } r = 255; g = 255; b = 255 - pathPointLifetime * 100; if (b < 0) { g = (f32) b * 0.8 + 255.0; b = 0; if (g < 0) { r = (f32) g * 0.4 + 255.0; g = 0; if (r < 0) { r = 0; } } } deltaX = width * shim_sin_deg(angle); deltaY = width * shim_cos_deg(angle); deltaZ = 0.0f; vtx->ob[0] = pathPointX + deltaX; vtx->ob[1] = pathPointY + deltaY; vtx->ob[2] = pathPointZ + deltaZ; vtx->tc[0] = texOffsetX; vtx->tc[1] = 0x400; vtx->cn[0] = r; vtx->cn[1] = g; vtx->cn[2] = b; vtx->cn[3] = a; vtx++; vtx->ob[0] = pathPointX - deltaX; vtx->ob[1] = pathPointY - deltaY; vtx->ob[2] = pathPointZ + deltaZ; vtx->tc[0] = texOffsetX; vtx->tc[1] = 0; vtx->cn[0] = r; vtx->cn[1] = g; vtx->cn[2] = b; vtx->cn[3] = a; vtx++; phase += 180; } for (i = firstPointIdx; i < MAX_POINTS - 1; i++) { gSPVertex(gMainGfxPos++, &vtxBuffer[i * 2], 4, 0); gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_player_actor /* 192D84 802644A4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 192D88 802644A8 24040444 */ addiu $a0, $zero, 0x444 /* 192D8C 802644AC AFBF0020 */ sw $ra, 0x20($sp) /* 192D90 802644B0 AFB1001C */ sw $s1, 0x1C($sp) /* 192D94 802644B4 0C00AB39 */ jal heap_malloc /* 192D98 802644B8 AFB00018 */ sw $s0, 0x18($sp) /* 192D9C 802644BC 3C11800E */ lui $s1, %hi(gBattleStatus) /* 192DA0 802644C0 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 192DA4 802644C4 0040802D */ daddu $s0, $v0, $zero /* 192DA8 802644C8 16000003 */ bnez $s0, .L802644D8 /* 192DAC 802644CC AE2200D8 */ sw $v0, 0xD8($s1) .L802644D0: /* 192DB0 802644D0 08099134 */ j .L802644D0 /* 192DB4 802644D4 00000000 */ nop .L802644D8: /* 192DB8 802644D8 92230093 */ lbu $v1, 0x93($s1) /* 192DBC 802644DC 24620001 */ addiu $v0, $v1, 0x1 /* 192DC0 802644E0 A2220093 */ sb $v0, 0x93($s1) /* 192DC4 802644E4 3C028028 */ lui $v0, %hi(bPlayerActorBlueprint) /* 192DC8 802644E8 244234D8 */ addiu $v0, $v0, %lo(bPlayerActorBlueprint) /* 192DCC 802644EC A2030134 */ sb $v1, 0x134($s0) /* 192DD0 802644F0 A2000135 */ sb $zero, 0x135($s0) /* 192DD4 802644F4 AE000000 */ sw $zero, 0x0($s0) /* 192DD8 802644F8 AE020008 */ sw $v0, 0x8($s0) /* 192DDC 802644FC 90420005 */ lbu $v0, 0x5($v0) /* 192DE0 80264500 A2020136 */ sb $v0, 0x136($s0) /* 192DE4 80264504 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) /* 192DE8 80264508 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) /* 192DEC 8026450C 30420040 */ andi $v0, $v0, 0x40 /* 192DF0 80264510 14400007 */ bnez $v0, .L80264530 /* 192DF4 80264514 00000000 */ nop /* 192DF8 80264518 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 192DFC 8026451C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 192E00 80264520 904200AA */ lbu $v0, 0xAA($v0) /* 192E04 80264524 30420002 */ andi $v0, $v0, 0x2 /* 192E08 80264528 1040000D */ beqz $v0, .L80264560 /* 192E0C 8026452C 00000000 */ nop .L80264530: /* 192E10 80264530 3C01C302 */ lui $at, (0xC3020000 >> 16) /* 192E14 80264534 44810000 */ mtc1 $at, $f0 /* 192E18 80264538 44801000 */ mtc1 $zero, $f2 /* 192E1C 8026453C 3C01C120 */ lui $at, (0xC1200000 >> 16) /* 192E20 80264540 44812000 */ mtc1 $at, $f4 /* 192E24 80264544 E6000144 */ swc1 $f0, 0x144($s0) /* 192E28 80264548 E6000138 */ swc1 $f0, 0x138($s0) /* 192E2C 8026454C E6020148 */ swc1 $f2, 0x148($s0) /* 192E30 80264550 E602013C */ swc1 $f2, 0x13C($s0) /* 192E34 80264554 E604014C */ swc1 $f4, 0x14C($s0) /* 192E38 80264558 08099161 */ j .L80264584 /* 192E3C 8026455C E6040140 */ swc1 $f4, 0x140($s0) .L80264560: /* 192E40 80264560 3C01C2BE */ lui $at, (0xC2BE0000 >> 16) /* 192E44 80264564 44811000 */ mtc1 $at, $f2 /* 192E48 80264568 44800000 */ mtc1 $zero, $f0 /* 192E4C 8026456C E6020144 */ swc1 $f2, 0x144($s0) /* 192E50 80264570 E6020138 */ swc1 $f2, 0x138($s0) /* 192E54 80264574 E6000148 */ swc1 $f0, 0x148($s0) /* 192E58 80264578 E600013C */ swc1 $f0, 0x13C($s0) /* 192E5C 8026457C E600014C */ swc1 $f0, 0x14C($s0) /* 192E60 80264580 E6000140 */ swc1 $f0, 0x140($s0) .L80264584: /* 192E64 80264584 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 192E68 80264588 44810000 */ mtc1 $at, $f0 /* 192E6C 8026458C 8E030008 */ lw $v1, 0x8($s0) /* 192E70 80264590 C6020144 */ lwc1 $f2, 0x144($s0) /* 192E74 80264594 C604014C */ lwc1 $f4, 0x14C($s0) /* 192E78 80264598 2402000D */ addiu $v0, $zero, 0xD /* 192E7C 8026459C A6000150 */ sh $zero, 0x150($s0) /* 192E80 802645A0 A6000152 */ sh $zero, 0x152($s0) /* 192E84 802645A4 A6000154 */ sh $zero, 0x154($s0) /* 192E88 802645A8 AE00015C */ sw $zero, 0x15C($s0) /* 192E8C 802645AC AE000160 */ sw $zero, 0x160($s0) /* 192E90 802645B0 AE000164 */ sw $zero, 0x164($s0) /* 192E94 802645B4 A6000168 */ sh $zero, 0x168($s0) /* 192E98 802645B8 A600016A */ sh $zero, 0x16A($s0) /* 192E9C 802645BC A600016C */ sh $zero, 0x16C($s0) /* 192EA0 802645C0 A200019A */ sb $zero, 0x19A($s0) /* 192EA4 802645C4 AE00018C */ sw $zero, 0x18C($s0) /* 192EA8 802645C8 A6020434 */ sh $v0, 0x434($s0) /* 192EAC 802645CC E6000170 */ swc1 $f0, 0x170($s0) /* 192EB0 802645D0 E6000174 */ swc1 $f0, 0x174($s0) /* 192EB4 802645D4 E6000178 */ swc1 $f0, 0x178($s0) /* 192EB8 802645D8 E600017C */ swc1 $f0, 0x17C($s0) /* 192EBC 802645DC E6000180 */ swc1 $f0, 0x180($s0) /* 192EC0 802645E0 E6000184 */ swc1 $f0, 0x184($s0) /* 192EC4 802645E4 90620020 */ lbu $v0, 0x20($v1) /* 192EC8 802645E8 A2020190 */ sb $v0, 0x190($s0) /* 192ECC 802645EC 4600118D */ trunc.w.s $f6, $f2 /* 192ED0 802645F0 44023000 */ mfc1 $v0, $f6 /* 192ED4 802645F4 90630021 */ lbu $v1, 0x21($v1) /* 192ED8 802645F8 C6020148 */ lwc1 $f2, 0x148($s0) /* 192EDC 802645FC A6000192 */ sh $zero, 0x192($s0) /* 192EE0 80264600 A6020156 */ sh $v0, 0x156($s0) /* 192EE4 80264604 E6000188 */ swc1 $f0, 0x188($s0) /* 192EE8 80264608 AE000200 */ sw $zero, 0x200($s0) /* 192EEC 8026460C 4600118D */ trunc.w.s $f6, $f2 /* 192EF0 80264610 44023000 */ mfc1 $v0, $f6 /* 192EF4 80264614 00000000 */ nop /* 192EF8 80264618 A6020158 */ sh $v0, 0x158($s0) /* 192EFC 8026461C 4600218D */ trunc.w.s $f6, $f4 /* 192F00 80264620 44023000 */ mfc1 $v0, $f6 /* 192F04 80264624 00000000 */ nop /* 192F08 80264628 A602015A */ sh $v0, 0x15A($s0) /* 192F0C 8026462C A2030191 */ sb $v1, 0x191($s0) /* 192F10 80264630 A2000204 */ sb $zero, 0x204($s0) /* 192F14 80264634 A2000205 */ sb $zero, 0x205($s0) /* 192F18 80264638 92030136 */ lbu $v1, 0x136($s0) /* 192F1C 8026463C 3C028028 */ lui $v0, %hi(bPlayerStatusTable) /* 192F20 80264640 2442342C */ addiu $v0, $v0, %lo(bPlayerStatusTable) /* 192F24 80264644 A2000194 */ sb $zero, 0x194($s0) /* 192F28 80264648 A2000195 */ sb $zero, 0x195($s0) /* 192F2C 8026464C A2000196 */ sb $zero, 0x196($s0) /* 192F30 80264650 A2000197 */ sb $zero, 0x197($s0) /* 192F34 80264654 AE0001C0 */ sw $zero, 0x1C0($s0) /* 192F38 80264658 AE0001C4 */ sw $zero, 0x1C4($s0) /* 192F3C 8026465C AE0001C8 */ sw $zero, 0x1C8($s0) /* 192F40 80264660 AE0001CC */ sw $zero, 0x1CC($s0) /* 192F44 80264664 AE0001D0 */ sw $zero, 0x1D0($s0) /* 192F48 80264668 AE0001D4 */ sw $zero, 0x1D4($s0) /* 192F4C 8026466C AE0001D8 */ sw $zero, 0x1D8($s0) /* 192F50 80264670 AE0001DC */ sw $zero, 0x1DC($s0) /* 192F54 80264674 A20001F1 */ sb $zero, 0x1F1($s0) /* 192F58 80264678 AE02020C */ sw $v0, 0x20C($s0) /* 192F5C 8026467C A2000210 */ sb $zero, 0x210($s0) /* 192F60 80264680 A2000211 */ sb $zero, 0x211($s0) /* 192F64 80264684 A2000212 */ sb $zero, 0x212($s0) /* 192F68 80264688 A2000213 */ sb $zero, 0x213($s0) /* 192F6C 8026468C A2000214 */ sb $zero, 0x214($s0) /* 192F70 80264690 A2000215 */ sb $zero, 0x215($s0) /* 192F74 80264694 A2000216 */ sb $zero, 0x216($s0) /* 192F78 80264698 A2000217 */ sb $zero, 0x217($s0) /* 192F7C 8026469C A2000218 */ sb $zero, 0x218($s0) /* 192F80 802646A0 A2000219 */ sb $zero, 0x219($s0) /* 192F84 802646A4 A2000220 */ sb $zero, 0x220($s0) /* 192F88 802646A8 A600021E */ sh $zero, 0x21E($s0) /* 192F8C 802646AC A200021D */ sb $zero, 0x21D($s0) /* 192F90 802646B0 A2000221 */ sb $zero, 0x221($s0) /* 192F94 802646B4 A2000222 */ sb $zero, 0x222($s0) /* 192F98 802646B8 A2000223 */ sb $zero, 0x223($s0) /* 192F9C 802646BC A2000224 */ sb $zero, 0x224($s0) /* 192FA0 802646C0 A200021C */ sb $zero, 0x21C($s0) /* 192FA4 802646C4 000310C0 */ sll $v0, $v1, 3 /* 192FA8 802646C8 00431023 */ subu $v0, $v0, $v1 /* 192FAC 802646CC 00021080 */ sll $v0, $v0, 2 /* 192FB0 802646D0 3C018028 */ lui $at, %hi(bActorSoundTable) /* 192FB4 802646D4 00220821 */ addu $at, $at, $v0 /* 192FB8 802646D8 8C221468 */ lw $v0, %lo(bActorSoundTable)($at) /* 192FBC 802646DC AE02019C */ sw $v0, 0x19C($s0) /* 192FC0 802646E0 000310C0 */ sll $v0, $v1, 3 /* 192FC4 802646E4 00431023 */ subu $v0, $v0, $v1 /* 192FC8 802646E8 00021080 */ sll $v0, $v0, 2 /* 192FCC 802646EC 3C018028 */ lui $at, %hi(bActorSoundTable + 0x4) /* 192FD0 802646F0 00220821 */ addu $at, $at, $v0 /* 192FD4 802646F4 8C22146C */ lw $v0, %lo(bActorSoundTable + 0x4)($at) /* 192FD8 802646F8 AE0201A0 */ sw $v0, 0x1A0($s0) /* 192FDC 802646FC 000310C0 */ sll $v0, $v1, 3 /* 192FE0 80264700 00431023 */ subu $v0, $v0, $v1 /* 192FE4 80264704 00021080 */ sll $v0, $v0, 2 /* 192FE8 80264708 3C018028 */ lui $at, %hi(bActorSoundTable + 0x8) /* 192FEC 8026470C 00220821 */ addu $at, $at, $v0 /* 192FF0 80264710 8C221470 */ lw $v0, %lo(bActorSoundTable + 0x8)($at) /* 192FF4 80264714 AE0201A4 */ sw $v0, 0x1A4($s0) /* 192FF8 80264718 000310C0 */ sll $v0, $v1, 3 /* 192FFC 8026471C 00431023 */ subu $v0, $v0, $v1 /* 193000 80264720 00021080 */ sll $v0, $v0, 2 /* 193004 80264724 3C018028 */ lui $at, %hi(bActorSoundTable + 0xC) /* 193008 80264728 00220821 */ addu $at, $at, $v0 /* 19300C 8026472C 8C221474 */ lw $v0, %lo(bActorSoundTable + 0xC)($at) /* 193010 80264730 AE0201A8 */ sw $v0, 0x1A8($s0) /* 193014 80264734 000310C0 */ sll $v0, $v1, 3 /* 193018 80264738 00431023 */ subu $v0, $v0, $v1 /* 19301C 8026473C 00021080 */ sll $v0, $v0, 2 /* 193020 80264740 3C018028 */ lui $at, %hi(bActorSoundTable + 0x10) /* 193024 80264744 00220821 */ addu $at, $at, $v0 /* 193028 80264748 8C221478 */ lw $v0, %lo(bActorSoundTable + 0x10)($at) /* 19302C 8026474C AE0201AC */ sw $v0, 0x1AC($s0) /* 193030 80264750 000310C0 */ sll $v0, $v1, 3 /* 193034 80264754 00431023 */ subu $v0, $v0, $v1 /* 193038 80264758 00021080 */ sll $v0, $v0, 2 /* 19303C 8026475C 3C018028 */ lui $at, %hi(bActorSoundTable + 0x14) /* 193040 80264760 00220821 */ addu $at, $at, $v0 /* 193044 80264764 8C22147C */ lw $v0, %lo(bActorSoundTable + 0x14)($at) /* 193048 80264768 AE0201B0 */ sw $v0, 0x1B0($s0) /* 19304C 8026476C 000310C0 */ sll $v0, $v1, 3 /* 193050 80264770 00431023 */ subu $v0, $v0, $v1 /* 193054 80264774 00021080 */ sll $v0, $v0, 2 /* 193058 80264778 3C018028 */ lui $at, %hi(bActorSoundTable + 0x18) /* 19305C 8026477C 00220821 */ addu $at, $at, $v0 /* 193060 80264780 94221480 */ lhu $v0, %lo(bActorSoundTable + 0x18)($at) /* 193064 80264784 24040001 */ addiu $a0, $zero, 0x1 /* 193068 80264788 A60201B4 */ sh $v0, 0x1B4($s0) /* 19306C 8026478C 000310C0 */ sll $v0, $v1, 3 /* 193070 80264790 00431023 */ subu $v0, $v0, $v1 /* 193074 80264794 00021080 */ sll $v0, $v0, 2 /* 193078 80264798 3C018028 */ lui $at, %hi(bActorSoundTable + 0x1A) /* 19307C 8026479C 00220821 */ addu $at, $at, $v0 /* 193080 802647A0 94221482 */ lhu $v0, %lo(bActorSoundTable + 0x1A)($at) /* 193084 802647A4 26030004 */ addiu $v1, $s0, 0x4 /* 193088 802647A8 A60201B6 */ sh $v0, 0x1B6($s0) .L802647AC: /* 19308C 802647AC AC600438 */ sw $zero, 0x438($v1) /* 193090 802647B0 2484FFFF */ addiu $a0, $a0, -0x1 /* 193094 802647B4 0481FFFD */ bgez $a0, .L802647AC /* 193098 802647B8 2463FFFC */ addiu $v1, $v1, -0x4 /* 19309C 802647BC 0C00AB39 */ jal heap_malloc /* 1930A0 802647C0 240400C4 */ addiu $a0, $zero, 0xC4 /* 1930A4 802647C4 0040882D */ daddu $s1, $v0, $zero /* 1930A8 802647C8 16200003 */ bnez $s1, .L802647D8 /* 1930AC 802647CC AE1101F4 */ sw $s1, 0x1F4($s0) .L802647D0: /* 1930B0 802647D0 080991F4 */ j .L802647D0 /* 1930B4 802647D4 00000000 */ nop .L802647D8: /* 1930B8 802647D8 24020001 */ addiu $v0, $zero, 0x1 /* 1930BC 802647DC A20201F3 */ sb $v0, 0x1F3($s0) /* 1930C0 802647E0 3C028028 */ lui $v0, %hi(bMarioParts) /* 1930C4 802647E4 24423500 */ addiu $v0, $v0, %lo(bMarioParts) /* 1930C8 802647E8 AE220008 */ sw $v0, 0x8($s1) /* 1930CC 802647EC 2402000C */ addiu $v0, $zero, 0xC /* 1930D0 802647F0 A6200014 */ sh $zero, 0x14($s1) /* 1930D4 802647F4 A6220014 */ sh $v0, 0x14($s1) /* 1930D8 802647F8 24020020 */ addiu $v0, $zero, 0x20 /* 1930DC 802647FC A6200016 */ sh $zero, 0x16($s1) /* 1930E0 80264800 A6220016 */ sh $v0, 0x16($s1) /* 1930E4 80264804 24020005 */ addiu $v0, $zero, 0x5 /* 1930E8 80264808 A6200018 */ sh $zero, 0x18($s1) /* 1930EC 8026480C A6220018 */ sh $v0, 0x18($s1) /* 1930F0 80264810 3C028028 */ lui $v0, %hi(bMarioDefenseTable) /* 1930F4 80264814 24423420 */ addiu $v0, $v0, %lo(bMarioDefenseTable) /* 1930F8 80264818 AE2000C0 */ sw $zero, 0xC0($s1) /* 1930FC 8026481C AE200000 */ sw $zero, 0x0($s1) /* 193100 80264820 AE200004 */ sw $zero, 0x4($s1) /* 193104 80264824 AE200020 */ sw $zero, 0x20($s1) /* 193108 80264828 AE200024 */ sw $zero, 0x24($s1) /* 19310C 8026482C AE200028 */ sw $zero, 0x28($s1) /* 193110 80264830 A6200044 */ sh $zero, 0x44($s1) /* 193114 80264834 A6200046 */ sh $zero, 0x46($s1) /* 193118 80264838 A6200048 */ sh $zero, 0x48($s1) /* 19311C 8026483C A620001A */ sh $zero, 0x1A($s1) /* 193120 80264840 A620001C */ sh $zero, 0x1C($s1) /* 193124 80264844 A620001E */ sh $zero, 0x1E($s1) /* 193128 80264848 AE20002C */ sw $zero, 0x2C($s1) /* 19312C 8026484C AE200030 */ sw $zero, 0x30($s1) /* 193130 80264850 AE200034 */ sw $zero, 0x34($s1) /* 193134 80264854 AE220078 */ sw $v0, 0x78($s1) /* 193138 80264858 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) /* 19313C 8026485C 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) /* 193140 80264860 30420040 */ andi $v0, $v0, 0x40 /* 193144 80264864 10400005 */ beqz $v0, .L8026487C /* 193148 80264868 00000000 */ nop /* 19314C 8026486C 3C028028 */ lui $v0, %hi(bPeachIdleAnims) /* 193150 80264870 2442340C */ addiu $v0, $v0, %lo(bPeachIdleAnims) /* 193154 80264874 08099222 */ j .L80264888 /* 193158 80264878 AE220094 */ sw $v0, 0x94($s1) .L8026487C: /* 19315C 8026487C 3C028028 */ lui $v0, %hi(bMarioIdleAnims) /* 193160 80264880 24423238 */ addiu $v0, $v0, %lo(bMarioIdleAnims) /* 193164 80264884 AE220094 */ sw $v0, 0x94($s1) .L80264888: /* 193168 80264888 240200FF */ addiu $v0, $zero, 0xFF /* 19316C 8026488C 8E240094 */ lw $a0, 0x94($s1) /* 193170 80264890 AE20007C */ sw $zero, 0x7C($s1) /* 193174 80264894 AE200080 */ sw $zero, 0x80($s1) /* 193178 80264898 A6220098 */ sh $v0, 0x98($s1) /* 19317C 8026489C 92020191 */ lbu $v0, 0x191($s0) /* 193180 802648A0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 193184 802648A4 44810000 */ mtc1 $at, $f0 /* 193188 802648A8 24050001 */ addiu $a1, $zero, 0x1 /* 19318C 802648AC A2220073 */ sb $v0, 0x73($s1) /* 193190 802648B0 92030190 */ lbu $v1, 0x190($s0) /* 193194 802648B4 00A0102D */ daddu $v0, $a1, $zero /* 193198 802648B8 AE200064 */ sw $zero, 0x64($s1) /* 19319C 802648BC A620006C */ sh $zero, 0x6C($s1) /* 1931A0 802648C0 A620006E */ sh $zero, 0x6E($s1) /* 1931A4 802648C4 A6200070 */ sh $zero, 0x70($s1) /* 1931A8 802648C8 AE200038 */ sw $zero, 0x38($s1) /* 1931AC 802648CC AE20003C */ sw $zero, 0x3C($s1) /* 1931B0 802648D0 AE200040 */ sw $zero, 0x40($s1) /* 1931B4 802648D4 E620004C */ swc1 $f0, 0x4C($s1) /* 1931B8 802648D8 E6200050 */ swc1 $f0, 0x50($s1) /* 1931BC 802648DC E6200054 */ swc1 $f0, 0x54($s1) /* 1931C0 802648E0 A2220074 */ sb $v0, 0x74($s1) /* 1931C4 802648E4 A6200068 */ sh $zero, 0x68($s1) /* 1931C8 802648E8 A620006A */ sh $zero, 0x6A($s1) /* 1931CC 802648EC E6200090 */ swc1 $f0, 0x90($s1) /* 1931D0 802648F0 0C09973A */ jal get_npc_anim_for_status /* 1931D4 802648F4 A2230072 */ sb $v1, 0x72($s1) /* 1931D8 802648F8 AE220088 */ sw $v0, 0x88($s1) /* 1931DC 802648FC AE20000C */ sw $zero, 0xC($s1) /* 1931E0 80264900 92030136 */ lbu $v1, 0x136($s0) /* 1931E4 80264904 000310C0 */ sll $v0, $v1, 3 /* 1931E8 80264908 00431023 */ subu $v0, $v0, $v1 /* 1931EC 8026490C 00021080 */ sll $v0, $v0, 2 /* 1931F0 80264910 3C018028 */ lui $at, %hi(bActorSoundTable) /* 1931F4 80264914 00220821 */ addu $at, $at, $v0 /* 1931F8 80264918 8C221468 */ lw $v0, %lo(bActorSoundTable)($at) /* 1931FC 8026491C AE2200A4 */ sw $v0, 0xA4($s1) /* 193200 80264920 92030136 */ lbu $v1, 0x136($s0) /* 193204 80264924 000310C0 */ sll $v0, $v1, 3 /* 193208 80264928 00431023 */ subu $v0, $v0, $v1 /* 19320C 8026492C 00021080 */ sll $v0, $v0, 2 /* 193210 80264930 3C018028 */ lui $at, %hi(bActorSoundTable + 0x4) /* 193214 80264934 00220821 */ addu $at, $at, $v0 /* 193218 80264938 8C22146C */ lw $v0, %lo(bActorSoundTable + 0x4)($at) /* 19321C 8026493C AE2200A8 */ sw $v0, 0xA8($s1) /* 193220 80264940 92030136 */ lbu $v1, 0x136($s0) /* 193224 80264944 000310C0 */ sll $v0, $v1, 3 /* 193228 80264948 00431023 */ subu $v0, $v0, $v1 /* 19322C 8026494C 00021080 */ sll $v0, $v0, 2 /* 193230 80264950 3C018028 */ lui $at, %hi(bActorSoundTable + 0x8) /* 193234 80264954 00220821 */ addu $at, $at, $v0 /* 193238 80264958 8C221470 */ lw $v0, %lo(bActorSoundTable + 0x8)($at) /* 19323C 8026495C AE2200AC */ sw $v0, 0xAC($s1) /* 193240 80264960 92030136 */ lbu $v1, 0x136($s0) /* 193244 80264964 000310C0 */ sll $v0, $v1, 3 /* 193248 80264968 00431023 */ subu $v0, $v0, $v1 /* 19324C 8026496C 00021080 */ sll $v0, $v0, 2 /* 193250 80264970 3C018028 */ lui $at, %hi(bActorSoundTable + 0xC) /* 193254 80264974 00220821 */ addu $at, $at, $v0 /* 193258 80264978 8C221474 */ lw $v0, %lo(bActorSoundTable + 0xC)($at) /* 19325C 8026497C AE2200B0 */ sw $v0, 0xB0($s1) /* 193260 80264980 92030136 */ lbu $v1, 0x136($s0) /* 193264 80264984 000310C0 */ sll $v0, $v1, 3 /* 193268 80264988 00431023 */ subu $v0, $v0, $v1 /* 19326C 8026498C 00021080 */ sll $v0, $v0, 2 /* 193270 80264990 3C018028 */ lui $at, %hi(bActorSoundTable + 0x10) /* 193274 80264994 00220821 */ addu $at, $at, $v0 /* 193278 80264998 8C221478 */ lw $v0, %lo(bActorSoundTable + 0x10)($at) /* 19327C 8026499C AE2200B4 */ sw $v0, 0xB4($s1) /* 193280 802649A0 92030136 */ lbu $v1, 0x136($s0) /* 193284 802649A4 000310C0 */ sll $v0, $v1, 3 /* 193288 802649A8 00431023 */ subu $v0, $v0, $v1 /* 19328C 802649AC 00021080 */ sll $v0, $v0, 2 /* 193290 802649B0 3C018028 */ lui $at, %hi(bActorSoundTable + 0x14) /* 193294 802649B4 00220821 */ addu $at, $at, $v0 /* 193298 802649B8 8C22147C */ lw $v0, %lo(bActorSoundTable + 0x14)($at) /* 19329C 802649BC AE2200B8 */ sw $v0, 0xB8($s1) /* 1932A0 802649C0 92030136 */ lbu $v1, 0x136($s0) /* 1932A4 802649C4 000310C0 */ sll $v0, $v1, 3 /* 1932A8 802649C8 00431023 */ subu $v0, $v0, $v1 /* 1932AC 802649CC 00021080 */ sll $v0, $v0, 2 /* 1932B0 802649D0 3C018028 */ lui $at, %hi(bActorSoundTable + 0x18) /* 1932B4 802649D4 00220821 */ addu $at, $at, $v0 /* 1932B8 802649D8 94221480 */ lhu $v0, %lo(bActorSoundTable + 0x18)($at) /* 1932BC 802649DC A62200BC */ sh $v0, 0xBC($s1) /* 1932C0 802649E0 92030136 */ lbu $v1, 0x136($s0) /* 1932C4 802649E4 000310C0 */ sll $v0, $v1, 3 /* 1932C8 802649E8 00431023 */ subu $v0, $v0, $v1 /* 1932CC 802649EC 00021080 */ sll $v0, $v0, 2 /* 1932D0 802649F0 3C018028 */ lui $at, %hi(bActorSoundTable + 0x1A) /* 1932D4 802649F4 00220821 */ addu $at, $at, $v0 /* 1932D8 802649F8 94221482 */ lhu $v0, %lo(bActorSoundTable + 0x1A)($at) /* 1932DC 802649FC 8E230094 */ lw $v1, 0x94($s1) /* 1932E0 80264A00 10600030 */ beqz $v1, .L80264AC4 /* 1932E4 80264A04 A62200BE */ sh $v0, 0xBE($s1) /* 1932E8 80264A08 0C00AB39 */ jal heap_malloc /* 1932EC 80264A0C 240408E8 */ addiu $a0, $zero, 0x8E8 /* 1932F0 80264A10 0040282D */ daddu $a1, $v0, $zero /* 1932F4 80264A14 14A00003 */ bnez $a1, .L80264A24 /* 1932F8 80264A18 AE2200C0 */ sw $v0, 0xC0($s1) .L80264A1C: /* 1932FC 80264A1C 08099287 */ j .L80264A1C /* 193300 80264A20 00000000 */ nop .L80264A24: /* 193304 80264A24 0000182D */ daddu $v1, $zero, $zero /* 193308 80264A28 00A0202D */ daddu $a0, $a1, $zero /* 19330C 80264A2C A0A006C0 */ sb $zero, 0x6C0($a1) /* 193310 80264A30 A0A00750 */ sb $zero, 0x750($a1) /* 193314 80264A34 A0A00764 */ sb $zero, 0x764($a1) /* 193318 80264A38 A0A00768 */ sb $zero, 0x768($a1) /* 19331C 80264A3C A0A007D8 */ sb $zero, 0x7D8($a1) /* 193320 80264A40 A0A007D9 */ sb $zero, 0x7D9($a1) .L80264A44: /* 193324 80264A44 C6000144 */ lwc1 $f0, 0x144($s0) /* 193328 80264A48 4600018D */ trunc.w.s $f6, $f0 /* 19332C 80264A4C 44023000 */ mfc1 $v0, $f6 /* 193330 80264A50 00000000 */ nop /* 193334 80264A54 A48207FC */ sh $v0, 0x7FC($a0) /* 193338 80264A58 C6000148 */ lwc1 $f0, 0x148($s0) /* 19333C 80264A5C 4600018D */ trunc.w.s $f6, $f0 /* 193340 80264A60 44023000 */ mfc1 $v0, $f6 /* 193344 80264A64 00000000 */ nop /* 193348 80264A68 A482081C */ sh $v0, 0x81C($a0) /* 19334C 80264A6C C600014C */ lwc1 $f0, 0x14C($s0) /* 193350 80264A70 24630001 */ addiu $v1, $v1, 0x1 /* 193354 80264A74 4600018D */ trunc.w.s $f6, $f0 /* 193358 80264A78 44023000 */ mfc1 $v0, $f6 /* 19335C 80264A7C 00000000 */ nop /* 193360 80264A80 A482083C */ sh $v0, 0x83C($a0) /* 193364 80264A84 28620010 */ slti $v0, $v1, 0x10 /* 193368 80264A88 1440FFEE */ bnez $v0, .L80264A44 /* 19336C 80264A8C 24840002 */ addiu $a0, $a0, 0x2 /* 193370 80264A90 0000182D */ daddu $v1, $zero, $zero /* 193374 80264A94 00A0202D */ daddu $a0, $a1, $zero /* 193378 80264A98 24020003 */ addiu $v0, $zero, 0x3 /* 19337C 80264A9C A0A207DA */ sb $v0, 0x7DA($a1) /* 193380 80264AA0 A0A007DB */ sb $zero, 0x7DB($a1) /* 193384 80264AA4 A0A008AC */ sb $zero, 0x8AC($a1) .L80264AA8: /* 193388 80264AA8 AC8008B0 */ sw $zero, 0x8B0($a0) /* 19338C 80264AAC 00A31021 */ addu $v0, $a1, $v1 /* 193390 80264AB0 24630001 */ addiu $v1, $v1, 0x1 /* 193394 80264AB4 A04008B8 */ sb $zero, 0x8B8($v0) /* 193398 80264AB8 28620002 */ slti $v0, $v1, 0x2 /* 19339C 80264ABC 1440FFFA */ bnez $v0, .L80264AA8 /* 1933A0 80264AC0 24840004 */ addiu $a0, $a0, 0x4 .L80264AC4: /* 1933A4 80264AC4 0C00AB39 */ jal heap_malloc /* 1933A8 80264AC8 2404008C */ addiu $a0, $zero, 0x8C /* 1933AC 80264ACC 14400003 */ bnez $v0, .L80264ADC /* 1933B0 80264AD0 AE220010 */ sw $v0, 0x10($s1) .L80264AD4: /* 1933B4 80264AD4 080992B5 */ j .L80264AD4 /* 1933B8 80264AD8 00000000 */ nop .L80264ADC: /* 1933BC 80264ADC 8E050144 */ lw $a1, 0x144($s0) /* 1933C0 80264AE0 8E060148 */ lw $a2, 0x148($s0) /* 1933C4 80264AE4 8E07014C */ lw $a3, 0x14C($s0) /* 1933C8 80264AE8 0C044898 */ jal create_shadow_type /* 1933CC 80264AEC 0000202D */ daddu $a0, $zero, $zero /* 1933D0 80264AF0 AE02042C */ sw $v0, 0x42C($s0) /* 1933D4 80264AF4 92020190 */ lbu $v0, 0x190($s0) /* 1933D8 80264AF8 3C014038 */ lui $at, (0x40380000 >> 16) /* 1933DC 80264AFC 44811800 */ mtc1 $at, $f3 /* 1933E0 80264B00 44801000 */ mtc1 $zero, $f2 /* 1933E4 80264B04 44820000 */ mtc1 $v0, $f0 /* 1933E8 80264B08 00000000 */ nop /* 1933EC 80264B0C 46800021 */ cvt.d.w $f0, $f0 /* 1933F0 80264B10 46220003 */ div.d $f0, $f0, $f2 /* 1933F4 80264B14 46200020 */ cvt.s.d $f0, $f0 /* 1933F8 80264B18 0C011D82 */ jal create_status_icon_set /* 1933FC 80264B1C E6000430 */ swc1 $f0, 0x430($s0) /* 193400 80264B20 3C05C30E */ lui $a1, (0xC30E0000 >> 16) /* 193404 80264B24 3C064208 */ lui $a2, (0x42080000 >> 16) /* 193408 80264B28 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 19340C 80264B2C 0000202D */ daddu $a0, $zero, $zero /* 193410 80264B30 A6020436 */ sh $v0, 0x436($s0) /* 193414 80264B34 0C01C43C */ jal fx_disable_x /* 193418 80264B38 AFA00010 */ sw $zero, 0x10($sp) /* 19341C 80264B3C 24040013 */ addiu $a0, $zero, 0x13 /* 193420 80264B40 AE020440 */ sw $v0, 0x440($s0) /* 193424 80264B44 0C03A752 */ jal is_ability_active /* 193428 80264B48 AE000228 */ sw $zero, 0x228($s0) /* 19342C 80264B4C 10400004 */ beqz $v0, .L80264B60 /* 193430 80264B50 2402000B */ addiu $v0, $zero, 0xB /* 193434 80264B54 A2020212 */ sb $v0, 0x212($s0) /* 193438 80264B58 2402007F */ addiu $v0, $zero, 0x7F /* 19343C 80264B5C A2020213 */ sb $v0, 0x213($s0) .L80264B60: /* 193440 80264B60 8FBF0020 */ lw $ra, 0x20($sp) /* 193444 80264B64 8FB1001C */ lw $s1, 0x1C($sp) /* 193448 80264B68 8FB00018 */ lw $s0, 0x18($sp) /* 19344C 80264B6C 03E00008 */ jr $ra /* 193450 80264B70 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void load_player_actor(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* player; ActorPart* part; DecorationTable* decorationTable; ActorPartMovement* partMovement; s32 i; s32 j; player = battleStatus->playerActor = heap_malloc(sizeof(*player)); ASSERT(player != NULL); player->unk_134 = battleStatus->unk_93++; player->footStepCounter = 0; player->flags = 0; player->actorBlueprint = &bPlayerActorBlueprint; player->actorType = bPlayerActorBlueprint.type; if ((gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) || (gGameStatusPtr->demoFlags & 2)) { player->homePos.x = player->currentPos.x = -130.0f; player->homePos.y = player->currentPos.y = 0.0f; player->homePos.z = player->currentPos.z = -10.0f; } else { player->homePos.x = player->currentPos.x = -95.0f; player->homePos.y = player->currentPos.y = 0.0f; player->homePos.z = player->currentPos.z = 0.0f; } player->headOffset.x = 0; player->headOffset.y = 0; player->headOffset.z = 0; player->rotation.x = 0.0f; player->rotation.y = 0.0f; player->rotation.z = 0.0f; player->rotationPivotOffset.x = 0; player->rotationPivotOffset.y = 0; player->rotationPivotOffset.z = 0; player->verticalRenderOffset = 0; player->yaw = 0.0f; player->renderMode = RENDER_MODE_ALPHATEST; player->scale.x = 1.0f; player->scale.y = 1.0f; player->scale.z = 1.0f; player->scaleModifier.x = 1.0f; player->scaleModifier.y = 1.0f; player->scaleModifier.z = 1.0f; player->size.x = player->actorBlueprint->size.x; player->size.y = player->actorBlueprint->size.y; player->actorID = 0; player->healthBarPos.x = player->currentPos.x; player->healthBarPos.y = player->currentPos.y; player->healthBarPos.z = player->currentPos.z; player->scalingFactor = 1.0f; player->attackResultEffect = NULL; player->actionRatingCombo = 0; player->actionRatingTime = 0; player->statusIconOffset.x = 0; player->statusIconOffset.y = 0; player->statusTextOffset.x = 0; player->statusTextOffset.y = 0; player->idleSource = NULL; player->takeTurnSource = NULL; player->handleEventSource = NULL; player->handlePhaseSource = NULL; player->idleScript = NULL; player->takeTurnScript = NULL; player->handleEventScript = NULL; player->handlePhaseScript = NULL; player->turnPriority = 0; player->statusTable = bPlayerStatusTable; player->debuff = 0; player->debuffDuration = 0; player->staticStatus = 0; player->staticDuration = 0; player->stoneStatus = 0; player->stoneDuration = 0; player->koStatus = 0; player->koDuration = 0; player->transparentStatus = 0; player->transparentDuration = 0; player->isGlowing = 0; player->unk_21E = 0; player->disableDismissTimer = 0; player->attackBoost = 0; player->defenseBoost = 0; player->chillOutAmount = 0; player->chillOutTurns = 0; player->statusAfflicted = 0; player->actorTypeData1[0] = bActorSoundTable[player->actorType].walk[0]; player->actorTypeData1[1] = bActorSoundTable[player->actorType].walk[1]; player->actorTypeData1[2] = bActorSoundTable[player->actorType].fly[0]; player->actorTypeData1[3] = bActorSoundTable[player->actorType].fly[1]; player->actorTypeData1[4] = bActorSoundTable[player->actorType].jump; player->actorTypeData1[5] = bActorSoundTable[player->actorType].hurt; player->actorTypeData1b[0] = bActorSoundTable[player->actorType].delay[0]; player->actorTypeData1b[1] = bActorSoundTable[player->actorType].delay[1]; for (i = 0; i < ARRAY_COUNT(player->loopingSoundID); i++) { player->loopingSoundID[i] = 0; } part = heap_malloc(sizeof(*part)); player->partsTable = part; ASSERT(part != NULL) player->numParts = 1; part->staticData = bMarioParts; part->partOffset.x = 0; part->partOffset.y = 0; part->partOffset.z = 0; part->partOffset.x = 12; part->partOffset.y = 32; part->partOffset.z = 5; part->decorationTable = NULL; part->flags = 0; part->targetFlags = 0; part->partOffsetFloat.x = 0.0f; part->partOffsetFloat.y = 0.0f; part->partOffsetFloat.z = 0.0f; part->rotationPivotOffset.x = 0; part->rotationPivotOffset.y = 0; part->rotationPivotOffset.z = 0; 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 = bMarioDefenseTable; if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) { part->idleAnimations = bPeachIdleAnims; } else { part->idleAnimations = bMarioIdleAnims; } part->eventFlags = 0; part->elementalImmunities = 0; part->opacity = 255; part->size.y = player->size.y; part->size.x = player->size.x; part->yaw = 0.0f; part->targetOffset.x = 0; part->targetOffset.y = 0; part->unk_70 = 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->animationRate = 1.0f; part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, 1U); part->nextPart = NULL; part->partTypeData[0] = bActorSoundTable[player->actorType].walk[0]; part->partTypeData[1] = bActorSoundTable[player->actorType].walk[1]; part->partTypeData[2] = bActorSoundTable[player->actorType].fly[0]; part->partTypeData[3] = bActorSoundTable[player->actorType].fly[1]; part->partTypeData[4] = bActorSoundTable[player->actorType].jump; part->partTypeData[5] = bActorSoundTable[player->actorType].hurt; part->actorTypeData2b[0] = bActorSoundTable[player->actorType].delay[0]; part->actorTypeData2b[1] = bActorSoundTable[player->actorType].delay[1]; if (part->idleAnimations != NULL) { 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] = player->currentPos.x; decorationTable->posY[j] = player->currentPos.y; decorationTable->posZ[j] = player->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; } } partMovement = part->movement = heap_malloc(sizeof(*partMovement)); ASSERT(partMovement != NULL); player->shadow.id = create_shadow_type(0, player->currentPos.x, player->currentPos.y, player->currentPos.z); player->shadowScale = player->size.x / 24.0; player->hudElementDataIndex = create_status_icon_set(); player->disableEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0); player->icePillarEffect = NULL; if (is_ability_active(ABILITY_ZAP_TAP)) { player->staticStatus = STATUS_KEY_STATIC; player->staticDuration = 127; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_frame /* 8B3C 8002D73C 27BDFF90 */ addiu $sp, $sp, -0x70 /* 8B40 8002D740 AFBF0054 */ sw $ra, 0x54($sp) /* 8B44 8002D744 AFBE0050 */ sw $fp, 0x50($sp) /* 8B48 8002D748 AFB7004C */ sw $s7, 0x4C($sp) /* 8B4C 8002D74C AFB60048 */ sw $s6, 0x48($sp) /* 8B50 8002D750 AFB50044 */ sw $s5, 0x44($sp) /* 8B54 8002D754 AFB40040 */ sw $s4, 0x40($sp) /* 8B58 8002D758 AFB3003C */ sw $s3, 0x3C($sp) /* 8B5C 8002D75C AFB20038 */ sw $s2, 0x38($sp) /* 8B60 8002D760 AFB10034 */ sw $s1, 0x34($sp) /* 8B64 8002D764 AFB00030 */ sw $s0, 0x30($sp) /* 8B68 8002D768 F7B80068 */ sdc1 $f24, 0x68($sp) /* 8B6C 8002D76C F7B60060 */ sdc1 $f22, 0x60($sp) /* 8B70 8002D770 F7B40058 */ sdc1 $f20, 0x58($sp) /* 8B74 8002D774 14800005 */ bnez $a0, .L8002D78C /* 8B78 8002D778 AFA40070 */ sw $a0, 0x70($sp) /* 8B7C 8002D77C 3C01800A */ lui $at, %hi(gCurrentCamID) /* 8B80 8002D780 A420A634 */ sh $zero, %lo(gCurrentCamID)($at) /* 8B84 8002D784 0C0459A6 */ jal func_80116698 /* 8B88 8002D788 00000000 */ nop .L8002D78C: /* 8B8C 8002D78C 8FAB0070 */ lw $t3, 0x70($sp) /* 8B90 8002D790 11600003 */ beqz $t3, .L8002D7A0 /* 8B94 8002D794 AFA00020 */ sw $zero, 0x20($sp) /* 8B98 8002D798 240B0003 */ addiu $t3, $zero, 0x3 /* 8B9C 8002D79C AFAB0020 */ sw $t3, 0x20($sp) .L8002D7A0: /* 8BA0 8002D7A0 8FAB0070 */ lw $t3, 0x70($sp) /* 8BA4 8002D7A4 24020001 */ addiu $v0, $zero, 0x1 /* 8BA8 8002D7A8 004B5823 */ subu $t3, $v0, $t3 /* 8BAC 8002D7AC 24020004 */ addiu $v0, $zero, 0x4 /* 8BB0 8002D7B0 004B1023 */ subu $v0, $v0, $t3 /* 8BB4 8002D7B4 AFAB0070 */ sw $t3, 0x70($sp) /* 8BB8 8002D7B8 8FAB0020 */ lw $t3, 0x20($sp) /* 8BBC 8002D7BC 0162102A */ slt $v0, $t3, $v0 /* 8BC0 8002D7C0 104001BD */ beqz $v0, .L8002DEB8 /* 8BC4 8002D7C4 000B1880 */ sll $v1, $t3, 2 /* 8BC8 8002D7C8 3C17800A */ lui $s7, %hi(gMainGfxPos) /* 8BCC 8002D7CC 26F7A66C */ addiu $s7, $s7, %lo(gMainGfxPos) /* 8BD0 8002D7D0 3C02800B */ lui $v0, %hi(gCameras) /* 8BD4 8002D7D4 24421D80 */ addiu $v0, $v0, %lo(gCameras) /* 8BD8 8002D7D8 006B1821 */ addu $v1, $v1, $t3 /* 8BDC 8002D7DC 00031880 */ sll $v1, $v1, 2 /* 8BE0 8002D7E0 006B1823 */ subu $v1, $v1, $t3 /* 8BE4 8002D7E4 000320C0 */ sll $a0, $v1, 3 /* 8BE8 8002D7E8 00641821 */ addu $v1, $v1, $a0 /* 8BEC 8002D7EC 000318C0 */ sll $v1, $v1, 3 /* 8BF0 8002D7F0 0062B021 */ addu $s6, $v1, $v0 /* 8BF4 8002D7F4 3C014080 */ lui $at, (0x40800000 >> 16) /* 8BF8 8002D7F8 4481B000 */ mtc1 $at, $f22 /* 8BFC 8002D7FC 4480A000 */ mtc1 $zero, $f20 /* 8C00 8002D800 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 8C04 8002D804 4481C000 */ mtc1 $at, $f24 .L8002D808: /* 8C08 8002D808 96C20000 */ lhu $v0, 0x0($s6) /* 8C0C 8002D80C 104001A0 */ beqz $v0, .L8002DE90 /* 8C10 8002D810 30420082 */ andi $v0, $v0, 0x82 /* 8C14 8002D814 1440019E */ bnez $v0, .L8002DE90 /* 8C18 8002D818 00000000 */ nop /* 8C1C 8002D81C 8EC201FC */ lw $v0, 0x1FC($s6) /* 8C20 8002D820 97AB0022 */ lhu $t3, 0x22($sp) /* 8C24 8002D824 3C01800A */ lui $at, %hi(gCurrentCamID) /* 8C28 8002D828 A42BA634 */ sh $t3, %lo(gCurrentCamID)($at) /* 8C2C 8002D82C 50400005 */ beql $v0, $zero, .L8002D844 /* 8C30 8002D830 3C02DC08 */ lui $v0, (0xDC080008 >> 16) /* 8C34 8002D834 0040F809 */ jalr $v0 /* 8C38 8002D838 02C0202D */ daddu $a0, $s6, $zero /* 8C3C 8002D83C 0800B713 */ j .L8002DC4C /* 8C40 8002D840 3C0A0001 */ lui $t2, (0x11630 >> 16) .L8002D844: /* 8C44 8002D844 34420008 */ ori $v0, $v0, (0xDC080008 & 0xFFFF) /* 8C48 8002D848 3C04D9C0 */ lui $a0, (0xD9C0F9FB >> 16) /* 8C4C 8002D84C 3484F9FB */ ori $a0, $a0, (0xD9C0F9FB & 0xFFFF) /* 8C50 8002D850 3C05E300 */ lui $a1, (0xE3000A01 >> 16) /* 8C54 8002D854 34A50A01 */ ori $a1, $a1, (0xE3000A01 & 0xFFFF) /* 8C58 8002D858 3C06E300 */ lui $a2, (0xE3000800 >> 16) /* 8C5C 8002D85C 8EF50000 */ lw $s5, 0x0($s7) /* 8C60 8002D860 34C60800 */ ori $a2, $a2, (0xE3000800 & 0xFFFF) /* 8C64 8002D864 02A0182D */ daddu $v1, $s5, $zero /* 8C68 8002D868 26B50008 */ addiu $s5, $s5, 0x8 /* 8C6C 8002D86C AC620000 */ sw $v0, 0x0($v1) /* 8C70 8002D870 26C200A0 */ addiu $v0, $s6, 0xA0 /* 8C74 8002D874 AC620004 */ sw $v0, 0x4($v1) /* 8C78 8002D878 3C02D700 */ lui $v0, (0xD7000000 >> 16) /* 8C7C 8002D87C AEA40000 */ sw $a0, 0x0($s5) /* 8C80 8002D880 AEA00004 */ sw $zero, 0x4($s5) /* 8C84 8002D884 AEA20008 */ sw $v0, 0x8($s5) /* 8C88 8002D888 AEA0000C */ sw $zero, 0xC($s5) /* 8C8C 8002D88C AEA50010 */ sw $a1, 0x10($s5) /* 8C90 8002D890 AEA00014 */ sw $zero, 0x14($s5) /* 8C94 8002D894 AEA60018 */ sw $a2, 0x18($s5) /* 8C98 8002D898 AEA0001C */ sw $zero, 0x1C($s5) /* 8C9C 8002D89C 86D8000E */ lh $t8, 0xE($s6) /* 8CA0 8002D8A0 86D90010 */ lh $t9, 0x10($s6) /* 8CA4 8002D8A4 26A20008 */ addiu $v0, $s5, 0x8 /* 8CA8 8002D8A8 AEF50000 */ sw $s5, 0x0($s7) /* 8CAC 8002D8AC AEE20000 */ sw $v0, 0x0($s7) /* 8CB0 8002D8B0 26A20010 */ addiu $v0, $s5, 0x10 /* 8CB4 8002D8B4 AEE20000 */ sw $v0, 0x0($s7) /* 8CB8 8002D8B8 26A20018 */ addiu $v0, $s5, 0x18 /* 8CBC 8002D8BC AEE20000 */ sw $v0, 0x0($s7) /* 8CC0 8002D8C0 26A20020 */ addiu $v0, $s5, 0x20 /* 8CC4 8002D8C4 AEE20000 */ sw $v0, 0x0($s7) /* 8CC8 8002D8C8 86C2000A */ lh $v0, 0xA($s6) /* 8CCC 8002D8CC 86C3000C */ lh $v1, 0xC($s6) /* 8CD0 8002D8D0 0302F021 */ addu $fp, $t8, $v0 /* 8CD4 8002D8D4 07010002 */ bgez $t8, .L8002D8E0 /* 8CD8 8002D8D8 0323A021 */ addu $s4, $t9, $v1 /* 8CDC 8002D8DC 0000C02D */ daddu $t8, $zero, $zero .L8002D8E0: /* 8CE0 8002D8E0 07220001 */ bltzl $t9, .L8002D8E8 /* 8CE4 8002D8E4 0000C82D */ daddu $t9, $zero, $zero .L8002D8E8: /* 8CE8 8002D8E8 5BC00001 */ blezl $fp, .L8002D8F0 /* 8CEC 8002D8EC 241E0001 */ addiu $fp, $zero, 0x1 .L8002D8F0: /* 8CF0 8002D8F0 5A800001 */ blezl $s4, .L8002D8F8 /* 8CF4 8002D8F4 24140001 */ addiu $s4, $zero, 0x1 .L8002D8F8: /* 8CF8 8002D8F8 2B020140 */ slti $v0, $t8, 0x140 /* 8CFC 8002D8FC 50400001 */ beql $v0, $zero, .L8002D904 /* 8D00 8002D900 2418013F */ addiu $t8, $zero, 0x13F .L8002D904: /* 8D04 8002D904 2B2200F0 */ slti $v0, $t9, 0xF0 /* 8D08 8002D908 50400001 */ beql $v0, $zero, .L8002D910 /* 8D0C 8002D90C 241900EF */ addiu $t9, $zero, 0xEF .L8002D910: /* 8D10 8002D910 2BC20141 */ slti $v0, $fp, 0x141 /* 8D14 8002D914 50400001 */ beql $v0, $zero, .L8002D91C /* 8D18 8002D918 241E0140 */ addiu $fp, $zero, 0x140 .L8002D91C: /* 8D1C 8002D91C 2A8200F1 */ slti $v0, $s4, 0xF1 /* 8D20 8002D920 50400001 */ beql $v0, $zero, .L8002D928 /* 8D24 8002D924 241400F0 */ addiu $s4, $zero, 0xF0 .L8002D928: /* 8D28 8002D928 3C03E300 */ lui $v1, (0xE3000F00 >> 16) /* 8D2C 8002D92C 34630F00 */ ori $v1, $v1, (0xE3000F00 & 0xFFFF) /* 8D30 8002D930 3C04E300 */ lui $a0, (0xE3001001 >> 16) /* 8D34 8002D934 34841001 */ ori $a0, $a0, (0xE3001001 & 0xFFFF) /* 8D38 8002D938 3C05E300 */ lui $a1, (0xE3000D01 >> 16) /* 8D3C 8002D93C 34A50D01 */ ori $a1, $a1, (0xE3000D01 & 0xFFFF) /* 8D40 8002D940 3C06E300 */ lui $a2, (0xE3000C00 >> 16) /* 8D44 8002D944 34C60C00 */ ori $a2, $a2, (0xE3000C00 & 0xFFFF) /* 8D48 8002D948 3C07E300 */ lui $a3, (0xE3001201 >> 16) /* 8D4C 8002D94C 34E71201 */ ori $a3, $a3, (0xE3001201 & 0xFFFF) /* 8D50 8002D950 3C08E300 */ lui $t0, (0xE3001402 >> 16) /* 8D54 8002D954 35081402 */ ori $t0, $t0, (0xE3001402 & 0xFFFF) /* 8D58 8002D958 3C0AFCFF */ lui $t2, (0xFCFFFFFF >> 16) /* 8D5C 8002D95C 354AFFFF */ ori $t2, $t2, (0xFCFFFFFF & 0xFFFF) /* 8D60 8002D960 3C09FFFE */ lui $t1, (0xFFFE793C >> 16) /* 8D64 8002D964 3529793C */ ori $t1, $t1, (0xFFFE793C & 0xFFFF) /* 8D68 8002D968 3C0BE300 */ lui $t3, (0xE3001700 >> 16) /* 8D6C 8002D96C 356B1700 */ ori $t3, $t3, (0xE3001700 & 0xFFFF) /* 8D70 8002D970 3C0CE200 */ lui $t4, (0xE2001E01 >> 16) /* 8D74 8002D974 358C1E01 */ ori $t4, $t4, (0xE2001E01 & 0xFFFF) /* 8D78 8002D978 3C0DE200 */ lui $t5, (0xE200001C >> 16) /* 8D7C 8002D97C 35AD001C */ ori $t5, $t5, (0xE200001C & 0xFFFF) /* 8D80 8002D980 3C0E0F0A */ lui $t6, (0xF0A4000 >> 16) /* 8D84 8002D984 35CE4000 */ ori $t6, $t6, (0xF0A4000 & 0xFFFF) /* 8D88 8002D988 3C0FE300 */ lui $t7, (0xE3001801 >> 16) /* 8D8C 8002D98C 35EF1801 */ ori $t7, $t7, (0xE3001801 & 0xFFFF) /* 8D90 8002D990 3C10DB04 */ lui $s0, (0xDB040004 >> 16) /* 8D94 8002D994 36100004 */ ori $s0, $s0, (0xDB040004 & 0xFFFF) /* 8D98 8002D998 3C11DB04 */ lui $s1, (0xDB04000C >> 16) /* 8D9C 8002D99C 3631000C */ ori $s1, $s1, (0xDB04000C & 0xFFFF) /* 8DA0 8002D9A0 3C12DB04 */ lui $s2, (0xDB040014 >> 16) /* 8DA4 8002D9A4 36520014 */ ori $s2, $s2, (0xDB040014 & 0xFFFF) /* 8DA8 8002D9A8 3C13DB04 */ lui $s3, (0xDB04001C >> 16) /* 8DAC 8002D9AC 3673001C */ ori $s3, $s3, (0xDB04001C & 0xFFFF) /* 8DB0 8002D9B0 AFAB0028 */ sw $t3, 0x28($sp) /* 8DB4 8002D9B4 3C0BFF10 */ lui $t3, (0xFF100000 >> 16) /* 8DB8 8002D9B8 26A20028 */ addiu $v0, $s5, 0x28 /* 8DBC 8002D9BC AFAB0024 */ sw $t3, 0x24($sp) /* 8DC0 8002D9C0 AEE20000 */ sw $v0, 0x0($s7) /* 8DC4 8002D9C4 26A20030 */ addiu $v0, $s5, 0x30 /* 8DC8 8002D9C8 AEE20000 */ sw $v0, 0x0($s7) /* 8DCC 8002D9CC 26A20038 */ addiu $v0, $s5, 0x38 /* 8DD0 8002D9D0 AEA30028 */ sw $v1, 0x28($s5) /* 8DD4 8002D9D4 AEA0002C */ sw $zero, 0x2C($s5) /* 8DD8 8002D9D8 AEE20000 */ sw $v0, 0x0($s7) /* 8DDC 8002D9DC 26A20040 */ addiu $v0, $s5, 0x40 /* 8DE0 8002D9E0 AEA40030 */ sw $a0, 0x30($s5) /* 8DE4 8002D9E4 AEA00034 */ sw $zero, 0x34($s5) /* 8DE8 8002D9E8 AEE20000 */ sw $v0, 0x0($s7) /* 8DEC 8002D9EC 26A20048 */ addiu $v0, $s5, 0x48 /* 8DF0 8002D9F0 AEA50038 */ sw $a1, 0x38($s5) /* 8DF4 8002D9F4 AEA0003C */ sw $zero, 0x3C($s5) /* 8DF8 8002D9F8 AEE20000 */ sw $v0, 0x0($s7) /* 8DFC 8002D9FC 3C020008 */ lui $v0, (0x80000 >> 16) /* 8E00 8002DA00 AEA20044 */ sw $v0, 0x44($s5) /* 8E04 8002DA04 26A20050 */ addiu $v0, $s5, 0x50 /* 8E08 8002DA08 AEA60040 */ sw $a2, 0x40($s5) /* 8E0C 8002DA0C AEE20000 */ sw $v0, 0x0($s7) /* 8E10 8002DA10 24022000 */ addiu $v0, $zero, 0x2000 /* 8E14 8002DA14 AEA2004C */ sw $v0, 0x4C($s5) /* 8E18 8002DA18 26A20058 */ addiu $v0, $s5, 0x58 /* 8E1C 8002DA1C AEA70048 */ sw $a3, 0x48($s5) /* 8E20 8002DA20 AEE20000 */ sw $v0, 0x0($s7) /* 8E24 8002DA24 24020C00 */ addiu $v0, $zero, 0xC00 /* 8E28 8002DA28 AEA20054 */ sw $v0, 0x54($s5) /* 8E2C 8002DA2C 26A20060 */ addiu $v0, $s5, 0x60 /* 8E30 8002DA30 AEA80050 */ sw $t0, 0x50($s5) /* 8E34 8002DA34 AEE20000 */ sw $v0, 0x0($s7) /* 8E38 8002DA38 26A20068 */ addiu $v0, $s5, 0x68 /* 8E3C 8002DA3C 44981000 */ mtc1 $t8, $f2 /* 8E40 8002DA40 00000000 */ nop /* 8E44 8002DA44 468010A0 */ cvt.s.w $f2, $f2 /* 8E48 8002DA48 46161082 */ mul.s $f2, $f2, $f22 /* 8E4C 8002DA4C 00000000 */ nop /* 8E50 8002DA50 AEAA0058 */ sw $t2, 0x58($s5) /* 8E54 8002DA54 AEA9005C */ sw $t1, 0x5C($s5) /* 8E58 8002DA58 AEE20000 */ sw $v0, 0x0($s7) /* 8E5C 8002DA5C 26A20070 */ addiu $v0, $s5, 0x70 /* 8E60 8002DA60 44990000 */ mtc1 $t9, $f0 /* 8E64 8002DA64 00000000 */ nop /* 8E68 8002DA68 46800020 */ cvt.s.w $f0, $f0 /* 8E6C 8002DA6C 8FAB0028 */ lw $t3, 0x28($sp) /* 8E70 8002DA70 46160002 */ mul.s $f0, $f0, $f22 /* 8E74 8002DA74 00000000 */ nop /* 8E78 8002DA78 AEAB0060 */ sw $t3, 0x60($s5) /* 8E7C 8002DA7C AEA00064 */ sw $zero, 0x64($s5) /* 8E80 8002DA80 AEE20000 */ sw $v0, 0x0($s7) /* 8E84 8002DA84 26A20078 */ addiu $v0, $s5, 0x78 /* 8E88 8002DA88 AEAC0068 */ sw $t4, 0x68($s5) /* 8E8C 8002DA8C AEA0006C */ sw $zero, 0x6C($s5) /* 8E90 8002DA90 AEE20000 */ sw $v0, 0x0($s7) /* 8E94 8002DA94 3C02ED00 */ lui $v0, (0xED000000 >> 16) /* 8E98 8002DA98 AEAD0070 */ sw $t5, 0x70($s5) /* 8E9C 8002DA9C AEAE0074 */ sw $t6, 0x74($s5) /* 8EA0 8002DAA0 4600110D */ trunc.w.s $f4, $f2 /* 8EA4 8002DAA4 44042000 */ mfc1 $a0, $f4 /* 8EA8 8002DAA8 00000000 */ nop /* 8EAC 8002DAAC 30840FFF */ andi $a0, $a0, 0xFFF /* 8EB0 8002DAB0 00042300 */ sll $a0, $a0, 12 /* 8EB4 8002DAB4 4600010D */ trunc.w.s $f4, $f0 /* 8EB8 8002DAB8 44032000 */ mfc1 $v1, $f4 /* 8EBC 8002DABC 449E1000 */ mtc1 $fp, $f2 /* 8EC0 8002DAC0 00000000 */ nop /* 8EC4 8002DAC4 468010A0 */ cvt.s.w $f2, $f2 /* 8EC8 8002DAC8 46161082 */ mul.s $f2, $f2, $f22 /* 8ECC 8002DACC 00000000 */ nop /* 8ED0 8002DAD0 30630FFF */ andi $v1, $v1, 0xFFF /* 8ED4 8002DAD4 00621825 */ or $v1, $v1, $v0 /* 8ED8 8002DAD8 00832025 */ or $a0, $a0, $v1 /* 8EDC 8002DADC 44940000 */ mtc1 $s4, $f0 /* 8EE0 8002DAE0 00000000 */ nop /* 8EE4 8002DAE4 46800020 */ cvt.s.w $f0, $f0 /* 8EE8 8002DAE8 46160002 */ mul.s $f0, $f0, $f22 /* 8EEC 8002DAEC 00000000 */ nop /* 8EF0 8002DAF0 AEA40020 */ sw $a0, 0x20($s5) /* 8EF4 8002DAF4 4600110D */ trunc.w.s $f4, $f2 /* 8EF8 8002DAF8 44032000 */ mfc1 $v1, $f4 /* 8EFC 8002DAFC 00000000 */ nop /* 8F00 8002DB00 30630FFF */ andi $v1, $v1, 0xFFF /* 8F04 8002DB04 00031B00 */ sll $v1, $v1, 12 /* 8F08 8002DB08 4600010D */ trunc.w.s $f4, $f0 /* 8F0C 8002DB0C 44022000 */ mfc1 $v0, $f4 /* 8F10 8002DB10 00000000 */ nop /* 8F14 8002DB14 30420FFF */ andi $v0, $v0, 0xFFF /* 8F18 8002DB18 00621825 */ or $v1, $v1, $v0 /* 8F1C 8002DB1C 26A20080 */ addiu $v0, $s5, 0x80 /* 8F20 8002DB20 AEA30024 */ sw $v1, 0x24($s5) /* 8F24 8002DB24 AEE20000 */ sw $v0, 0x0($s7) /* 8F28 8002DB28 240200C0 */ addiu $v0, $zero, 0xC0 /* 8F2C 8002DB2C 8FAB0024 */ lw $t3, 0x24($sp) /* 8F30 8002DB30 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) /* 8F34 8002DB34 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) /* 8F38 8002DB38 356B013F */ ori $t3, $t3, 0x13F /* 8F3C 8002DB3C AFAB0024 */ sw $t3, 0x24($sp) /* 8F40 8002DB40 AEA2007C */ sw $v0, 0x7C($s5) /* 8F44 8002DB44 26A20088 */ addiu $v0, $s5, 0x88 /* 8F48 8002DB48 240B0002 */ addiu $t3, $zero, 0x2 /* 8F4C 8002DB4C AEAF0078 */ sw $t7, 0x78($s5) /* 8F50 8002DB50 AEE20000 */ sw $v0, 0x0($s7) /* 8F54 8002DB54 26A20090 */ addiu $v0, $s5, 0x90 /* 8F58 8002DB58 AEB00080 */ sw $s0, 0x80($s5) /* 8F5C 8002DB5C AEAB0084 */ sw $t3, 0x84($s5) /* 8F60 8002DB60 AEE20000 */ sw $v0, 0x0($s7) /* 8F64 8002DB64 26A20098 */ addiu $v0, $s5, 0x98 /* 8F68 8002DB68 AEAB008C */ sw $t3, 0x8C($s5) /* 8F6C 8002DB6C 340BFFFE */ ori $t3, $zero, 0xFFFE /* 8F70 8002DB70 AEB10088 */ sw $s1, 0x88($s5) /* 8F74 8002DB74 AEE20000 */ sw $v0, 0x0($s7) /* 8F78 8002DB78 26A200A0 */ addiu $v0, $s5, 0xA0 /* 8F7C 8002DB7C AEB20090 */ sw $s2, 0x90($s5) /* 8F80 8002DB80 AEAB0094 */ sw $t3, 0x94($s5) /* 8F84 8002DB84 AEE20000 */ sw $v0, 0x0($s7) /* 8F88 8002DB88 26A200A8 */ addiu $v0, $s5, 0xA8 /* 8F8C 8002DB8C AEB30098 */ sw $s3, 0x98($s5) /* 8F90 8002DB90 AEAB009C */ sw $t3, 0x9C($s5) /* 8F94 8002DB94 AEE20000 */ sw $v0, 0x0($s7) /* 8F98 8002DB98 8FAB0024 */ lw $t3, 0x24($sp) /* 8F9C 8002DB9C 0C0187A4 */ jal osVirtualToPhysical /* 8FA0 8002DBA0 AEAB00A0 */ sw $t3, 0xA0($s5) /* 8FA4 8002DBA4 8EE40000 */ lw $a0, 0x0($s7) /* 8FA8 8002DBA8 AEA200A4 */ sw $v0, 0xA4($s5) /* 8FAC 8002DBAC 0080102D */ daddu $v0, $a0, $zero /* 8FB0 8002DBB0 3C0BE700 */ lui $t3, (0xE7000000 >> 16) /* 8FB4 8002DBB4 AC4B0000 */ sw $t3, 0x0($v0) /* 8FB8 8002DBB8 AC400004 */ sw $zero, 0x4($v0) /* 8FBC 8002DBBC 96C20000 */ lhu $v0, 0x0($s6) /* 8FC0 8002DBC0 24840008 */ addiu $a0, $a0, 0x8 /* 8FC4 8002DBC4 30420010 */ andi $v0, $v0, 0x10 /* 8FC8 8002DBC8 14400007 */ bnez $v0, .L8002DBE8 /* 8FCC 8002DBCC AEE40000 */ sw $a0, 0x0($s7) /* 8FD0 8002DBD0 3C02DB0E */ lui $v0, (0xDB0E0000 >> 16) /* 8FD4 8002DBD4 AC820000 */ sw $v0, 0x0($a0) /* 8FD8 8002DBD8 96C30038 */ lhu $v1, 0x38($s6) /* 8FDC 8002DBDC 24820008 */ addiu $v0, $a0, 0x8 /* 8FE0 8002DBE0 AEE20000 */ sw $v0, 0x0($s7) /* 8FE4 8002DBE4 AC830004 */ sw $v1, 0x4($a0) .L8002DBE8: /* 8FE8 8002DBE8 26C400D4 */ addiu $a0, $s6, 0xD4 /* 8FEC 8002DBEC 3C05800A */ lui $a1, %hi(gCurrentCamID) /* 8FF0 8002DBF0 84A5A634 */ lh $a1, %lo(gCurrentCamID)($a1) /* 8FF4 8002DBF4 3C02800A */ lui $v0, %hi(gDisplayContext) /* 8FF8 8002DBF8 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 8FFC 8002DBFC 00052980 */ sll $a1, $a1, 6 /* 9000 8002DC00 24A50030 */ addiu $a1, $a1, 0x30 /* 9004 8002DC04 0C019D40 */ jal guMtxF2L /* 9008 8002DC08 00452821 */ addu $a1, $v0, $a1 /* 900C 8002DC0C 3C05DA38 */ lui $a1, (0xDA380007 >> 16) /* 9010 8002DC10 34A50007 */ ori $a1, $a1, (0xDA380007 & 0xFFFF) /* 9014 8002DC14 8EE20000 */ lw $v0, 0x0($s7) /* 9018 8002DC18 3C03800A */ lui $v1, %hi(gCurrentCamID) /* 901C 8002DC1C 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* 9020 8002DC20 0040202D */ daddu $a0, $v0, $zero /* 9024 8002DC24 24420008 */ addiu $v0, $v0, 0x8 /* 9028 8002DC28 00031980 */ sll $v1, $v1, 6 /* 902C 8002DC2C AEE20000 */ sw $v0, 0x0($s7) /* 9030 8002DC30 3C02800A */ lui $v0, %hi(gDisplayContext) /* 9034 8002DC34 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 9038 8002DC38 24630030 */ addiu $v1, $v1, 0x30 /* 903C 8002DC3C AC850000 */ sw $a1, 0x0($a0) /* 9040 8002DC40 00431021 */ addu $v0, $v0, $v1 /* 9044 8002DC44 AC820004 */ sw $v0, 0x4($a0) /* 9048 8002DC48 3C0A0001 */ lui $t2, (0x11630 >> 16) .L8002DC4C: /* 904C 8002DC4C 354A1630 */ ori $t2, $t2, (0x11630 & 0xFFFF) /* 9050 8002DC50 3C098007 */ lui $t1, %hi(gMatrixListPos) /* 9054 8002DC54 252941F0 */ addiu $t1, $t1, %lo(gMatrixListPos) /* 9058 8002DC58 4406A000 */ mfc1 $a2, $f20 /* 905C 8002DC5C 95280000 */ lhu $t0, 0x0($t1) /* 9060 8002DC60 4407C000 */ mfc1 $a3, $f24 /* 9064 8002DC64 3C03800A */ lui $v1, %hi(gDisplayContext) /* 9068 8002DC68 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 906C 8002DC6C C6C00084 */ lwc1 $f0, 0x84($s6) /* 9070 8002DC70 3104FFFF */ andi $a0, $t0, 0xFFFF /* 9074 8002DC74 00042180 */ sll $a0, $a0, 6 /* 9078 8002DC78 008A2021 */ addu $a0, $a0, $t2 /* 907C 8002DC7C 00642021 */ addu $a0, $v1, $a0 /* 9080 8002DC80 3102FFFF */ andi $v0, $t0, 0xFFFF /* 9084 8002DC84 00021180 */ sll $v0, $v0, 6 /* 9088 8002DC88 004A1021 */ addu $v0, $v0, $t2 /* 908C 8002DC8C 00621821 */ addu $v1, $v1, $v0 /* 9090 8002DC90 46000007 */ neg.s $f0, $f0 /* 9094 8002DC94 44050000 */ mfc1 $a1, $f0 /* 9098 8002DC98 25080001 */ addiu $t0, $t0, 0x1 /* 909C 8002DC9C AEC30204 */ sw $v1, 0x204($s6) /* 90A0 8002DCA0 A5280000 */ sh $t0, 0x0($t1) /* 90A4 8002DCA4 0C019F20 */ jal guRotate /* 90A8 8002DCA8 E7B40010 */ swc1 $f20, 0x10($sp) /* 90AC 8002DCAC 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 90B0 8002DCB0 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* 90B4 8002DCB4 90820082 */ lbu $v0, 0x82($a0) /* 90B8 8002DCB8 96C300A8 */ lhu $v1, 0xA8($s6) /* 90BC 8002DCBC 00021600 */ sll $v0, $v0, 24 /* 90C0 8002DCC0 00021603 */ sra $v0, $v0, 24 /* 90C4 8002DCC4 00621821 */ addu $v1, $v1, $v0 /* 90C8 8002DCC8 A6C300B8 */ sh $v1, 0xB8($s6) /* 90CC 8002DCCC 90830083 */ lbu $v1, 0x83($a0) /* 90D0 8002DCD0 96C200AA */ lhu $v0, 0xAA($s6) /* 90D4 8002DCD4 96C40000 */ lhu $a0, 0x0($s6) /* 90D8 8002DCD8 00031E00 */ sll $v1, $v1, 24 /* 90DC 8002DCDC 00031E03 */ sra $v1, $v1, 24 /* 90E0 8002DCE0 00431021 */ addu $v0, $v0, $v1 /* 90E4 8002DCE4 A6C200BA */ sh $v0, 0xBA($s6) /* 90E8 8002DCE8 30820010 */ andi $v0, $a0, 0x10 /* 90EC 8002DCEC 14400048 */ bnez $v0, .L8002DE10 /* 90F0 8002DCF0 24020003 */ addiu $v0, $zero, 0x3 /* 90F4 8002DCF4 3C03800A */ lui $v1, %hi(gCurrentCamID) /* 90F8 8002DCF8 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* 90FC 8002DCFC 10620019 */ beq $v1, $v0, .L8002DD64 /* 9100 8002DD00 30820200 */ andi $v0, $a0, 0x200 /* 9104 8002DD04 14400003 */ bnez $v0, .L8002DD14 /* 9108 8002DD08 00000000 */ nop /* 910C 8002DD0C 0C043FAD */ jal render_entities /* 9110 8002DD10 00000000 */ nop .L8002DD14: /* 9114 8002DD14 96C20000 */ lhu $v0, 0x0($s6) /* 9118 8002DD18 30420400 */ andi $v0, $v0, 0x400 /* 911C 8002DD1C 14400003 */ bnez $v0, .L8002DD2C /* 9120 8002DD20 00000000 */ nop /* 9124 8002DD24 0C045AE4 */ jal render_models /* 9128 8002DD28 00000000 */ nop .L8002DD2C: /* 912C 8002DD2C 0C03844E */ jal render_player /* 9130 8002DD30 00000000 */ nop /* 9134 8002DD34 0C00E9FC */ jal render_npcs /* 9138 8002DD38 00000000 */ nop /* 913C 8002DD3C 0C048D1C */ jal render_workers_world /* 9140 8002DD40 00000000 */ nop /* 9144 8002DD44 0C0167BD */ jal render_effects_world /* 9148 8002DD48 00000000 */ nop /* 914C 8002DD4C 0C04766E */ jal execute_render_tasks /* 9150 8002DD50 00000000 */ nop /* 9154 8002DD54 0C050DAD */ jal render_hud_elements_world /* 9158 8002DD58 00000000 */ nop /* 915C 8002DD5C 0800B788 */ j .L8002DE20 /* 9160 8002DD60 00000000 */ nop .L8002DD64: /* 9164 8002DD64 26D000D4 */ addiu $s0, $s6, 0xD4 /* 9168 8002DD68 4405A000 */ mfc1 $a1, $f20 /* 916C 8002DD6C 3C0643A0 */ lui $a2, (0x43A00000 >> 16) /* 9170 8002DD70 3C07C370 */ lui $a3, (0xC3700000 >> 16) /* 9174 8002DD74 3C01C47A */ lui $at, (0xC47A0000 >> 16) /* 9178 8002DD78 44810000 */ mtc1 $at, $f0 /* 917C 8002DD7C 3C01447A */ lui $at, (0x447A0000 >> 16) /* 9180 8002DD80 44811000 */ mtc1 $at, $f2 /* 9184 8002DD84 0200202D */ daddu $a0, $s0, $zero /* 9188 8002DD88 E7B40010 */ swc1 $f20, 0x10($sp) /* 918C 8002DD8C E7B8001C */ swc1 $f24, 0x1C($sp) /* 9190 8002DD90 E7A00014 */ swc1 $f0, 0x14($sp) /* 9194 8002DD94 0C018E44 */ jal guOrthoF /* 9198 8002DD98 E7A20018 */ swc1 $f2, 0x18($sp) /* 919C 8002DD9C 0200202D */ daddu $a0, $s0, $zero /* 91A0 8002DDA0 3C05800A */ lui $a1, %hi(gCurrentCamID) /* 91A4 8002DDA4 84A5A634 */ lh $a1, %lo(gCurrentCamID)($a1) /* 91A8 8002DDA8 3C02800A */ lui $v0, %hi(gDisplayContext) /* 91AC 8002DDAC 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 91B0 8002DDB0 00052980 */ sll $a1, $a1, 6 /* 91B4 8002DDB4 24A50030 */ addiu $a1, $a1, 0x30 /* 91B8 8002DDB8 0C019D40 */ jal guMtxF2L /* 91BC 8002DDBC 00452821 */ addu $a1, $v0, $a1 /* 91C0 8002DDC0 3C05DA38 */ lui $a1, (0xDA380007 >> 16) /* 91C4 8002DDC4 34A50007 */ ori $a1, $a1, (0xDA380007 & 0xFFFF) /* 91C8 8002DDC8 8EE20000 */ lw $v0, 0x0($s7) /* 91CC 8002DDCC 3C03800A */ lui $v1, %hi(gCurrentCamID) /* 91D0 8002DDD0 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* 91D4 8002DDD4 0040202D */ daddu $a0, $v0, $zero /* 91D8 8002DDD8 24420008 */ addiu $v0, $v0, 0x8 /* 91DC 8002DDDC 00031980 */ sll $v1, $v1, 6 /* 91E0 8002DDE0 AEE20000 */ sw $v0, 0x0($s7) /* 91E4 8002DDE4 3C02800A */ lui $v0, %hi(gDisplayContext) /* 91E8 8002DDE8 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 91EC 8002DDEC 24630030 */ addiu $v1, $v1, 0x30 /* 91F0 8002DDF0 AC850000 */ sw $a1, 0x0($a0) /* 91F4 8002DDF4 00431021 */ addu $v0, $v0, $v1 /* 91F8 8002DDF8 0C050DAD */ jal render_hud_elements_world /* 91FC 8002DDFC AC820004 */ sw $v0, 0x4($a0) /* 9200 8002DE00 0C04CB95 */ jal render_item_entities /* 9204 8002DE04 00000000 */ nop /* 9208 8002DE08 0800B788 */ j .L8002DE20 /* 920C 8002DE0C 00000000 */ nop .L8002DE10: /* 9210 8002DE10 0C048D1C */ jal render_workers_world /* 9214 8002DE14 00000000 */ nop /* 9218 8002DE18 0C04766E */ jal execute_render_tasks /* 921C 8002DE1C 00000000 */ nop .L8002DE20: /* 9220 8002DE20 8EC20200 */ lw $v0, 0x200($s6) /* 9224 8002DE24 10400004 */ beqz $v0, .L8002DE38 /* 9228 8002DE28 3C03FF10 */ lui $v1, (0xFF10013F >> 16) /* 922C 8002DE2C 0040F809 */ jalr $v0 /* 9230 8002DE30 02C0202D */ daddu $a0, $s6, $zero /* 9234 8002DE34 3C03FF10 */ lui $v1, (0xFF10013F >> 16) .L8002DE38: /* 9238 8002DE38 3463013F */ ori $v1, $v1, (0xFF10013F & 0xFFFF) /* 923C 8002DE3C 8EF00000 */ lw $s0, 0x0($s7) /* 9240 8002DE40 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) /* 9244 8002DE44 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) /* 9248 8002DE48 0200102D */ daddu $v0, $s0, $zero /* 924C 8002DE4C 26100008 */ addiu $s0, $s0, 0x8 /* 9250 8002DE50 3C0BE700 */ lui $t3, (0xE7000000 >> 16) /* 9254 8002DE54 AEF00000 */ sw $s0, 0x0($s7) /* 9258 8002DE58 AC4B0000 */ sw $t3, 0x0($v0) /* 925C 8002DE5C AC400004 */ sw $zero, 0x4($v0) /* 9260 8002DE60 26020008 */ addiu $v0, $s0, 0x8 /* 9264 8002DE64 AEE20000 */ sw $v0, 0x0($s7) /* 9268 8002DE68 0C0187A4 */ jal osVirtualToPhysical /* 926C 8002DE6C AE030000 */ sw $v1, 0x0($s0) /* 9270 8002DE70 8EE30000 */ lw $v1, 0x0($s7) /* 9274 8002DE74 AE020004 */ sw $v0, 0x4($s0) /* 9278 8002DE78 0060102D */ daddu $v0, $v1, $zero /* 927C 8002DE7C 24630008 */ addiu $v1, $v1, 0x8 /* 9280 8002DE80 3C0BE700 */ lui $t3, (0xE7000000 >> 16) /* 9284 8002DE84 AEE30000 */ sw $v1, 0x0($s7) /* 9288 8002DE88 AC4B0000 */ sw $t3, 0x0($v0) /* 928C 8002DE8C AC400004 */ sw $zero, 0x4($v0) .L8002DE90: /* 9290 8002DE90 8FAB0020 */ lw $t3, 0x20($sp) /* 9294 8002DE94 256B0001 */ addiu $t3, $t3, 0x1 /* 9298 8002DE98 AFAB0020 */ sw $t3, 0x20($sp) /* 929C 8002DE9C 8FAB0070 */ lw $t3, 0x70($sp) /* 92A0 8002DEA0 24020004 */ addiu $v0, $zero, 0x4 /* 92A4 8002DEA4 004B1023 */ subu $v0, $v0, $t3 /* 92A8 8002DEA8 8FAB0020 */ lw $t3, 0x20($sp) /* 92AC 8002DEAC 0162102A */ slt $v0, $t3, $v0 /* 92B0 8002DEB0 1440FE55 */ bnez $v0, .L8002D808 /* 92B4 8002DEB4 26D60558 */ addiu $s6, $s6, 0x558 .L8002DEB8: /* 92B8 8002DEB8 8FBF0054 */ lw $ra, 0x54($sp) /* 92BC 8002DEBC 8FBE0050 */ lw $fp, 0x50($sp) /* 92C0 8002DEC0 8FB7004C */ lw $s7, 0x4C($sp) /* 92C4 8002DEC4 8FB60048 */ lw $s6, 0x48($sp) /* 92C8 8002DEC8 8FB50044 */ lw $s5, 0x44($sp) /* 92CC 8002DECC 8FB40040 */ lw $s4, 0x40($sp) /* 92D0 8002DED0 8FB3003C */ lw $s3, 0x3C($sp) /* 92D4 8002DED4 8FB20038 */ lw $s2, 0x38($sp) /* 92D8 8002DED8 8FB10034 */ lw $s1, 0x34($sp) /* 92DC 8002DEDC 8FB00030 */ lw $s0, 0x30($sp) /* 92E0 8002DEE0 D7B80068 */ ldc1 $f24, 0x68($sp) /* 92E4 8002DEE4 D7B60060 */ ldc1 $f22, 0x60($sp) /* 92E8 8002DEE8 D7B40058 */ ldc1 $f20, 0x58($sp) /* 92EC 8002DEEC 03E00008 */ jr $ra /* 92F0 8002DEF0 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: void render_frame(s32 isSecondPass) { s32 camID; if (!isSecondPass) { gCurrentCamID = CAM_DEFAULT; func_80116698(); } if (isSecondPass) { camID = CAM_3; } else { camID = CAM_DEFAULT; } // first pass: loop uses camIDs from CAM_DEFAULT to CAM_3 - 1 // second pass: loop only uses CAM_3 isSecondPass = 1 - isSecondPass; for (; camID < ARRAY_COUNT(gCameras) - isSecondPass; camID++) { Camera* camera = &gCameras[camID]; u16 matrixListPos; if (camera->flags == 0 || (camera->flags & (CAMERA_FLAG_80 | CAMERA_FLAG_DISABLED))) { continue; } gCurrentCamID = camID; if (camera->fpDoPreRender != NULL) { camera->fpDoPreRender(camera); } else { s32 ulx; s32 uly; s32 lrx; s32 lry; gSPViewport(gMainGfxPos++, &camera->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); ulx = camera->viewportStartX; uly = camera->viewportStartY; lrx = ulx + camera->viewportW; lry = uly + camera->viewportH; if (ulx < 0) { ulx = 0; } if (uly < 0) { uly = 0; } if (lrx < 1) { lrx = 1; } if (lry < 1) { lry = 1; } if (ulx > SCREEN_WIDTH - 1) { ulx = SCREEN_WIDTH - 1; } if (uly > SCREEN_HEIGHT - 1) { uly = SCREEN_HEIGHT - 1; } if (lrx > SCREEN_WIDTH) { lrx = SCREEN_WIDTH; } if (lry > SCREEN_HEIGHT) { lry = SCREEN_HEIGHT; } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); 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); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMainGfxPos++); if (!(camera->flags & CAMERA_FLAG_ORTHO)) { gSPPerspNormalize(gMainGfxPos++, camera->perspNorm); } guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]); gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); } camera->unkMatrix = &gDisplayContext->matrixStack[gMatrixListPos]; matrixListPos = gMatrixListPos++; guRotate(&gDisplayContext->matrixStack[matrixListPos], -camera->trueRotation.x, 0.0f, 1.0f, 0.0f); camera->vpAlt.vp.vtrans[0] = camera->vp.vp.vtrans[0] + gGameStatusPtr->unk_82; camera->vpAlt.vp.vtrans[1] = camera->vp.vp.vtrans[1] + gGameStatusPtr->unk_83; if (!(camera->flags & CAMERA_FLAG_ORTHO)) { if (gCurrentCamID != CAM_3) { if (!(camera->flags & CAMERA_FLAG_RENDER_ENTITIES)) { render_entities(); } if (!(camera->flags & CAMERA_FLAG_RENDER_MODELS)) { render_models(); } render_player(); render_npcs(); render_workers_world(); render_effects_world(); execute_render_tasks(); render_hud_elements_world(); } else { guOrthoF(camera->perspectiveMatrix, 0.0f, SCREEN_WIDTH, -SCREEN_HEIGHT, 0.0f, -1000.0f, 1000.0f, 1.0f); guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]); gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); render_hud_elements_world(); render_item_entities(); } } else { render_workers_world(); execute_render_tasks(); } if (camera->fpDoPostRender != NULL) { camera->fpDoPostRender(camera); } gDPPipeSync(gMainGfxPos++); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802439D8 /* 1722B8 802439D8 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 1722BC 802439DC AFB60028 */ sw $s6, 0x28($sp) D_802439E0: /* 1722C0 802439E0 3C16800E */ lui $s6, %hi(gBattleStatus) /* 1722C4 802439E4 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus) D_802439E8: /* 1722C8 802439E8 AFB7002C */ sw $s7, 0x2C($sp) .L802439EC: /* 1722CC 802439EC 3C178011 */ lui $s7, %hi(gPlayerData) D_802439F0: /* 1722D0 802439F0 26F7F290 */ addiu $s7, $s7, %lo(gPlayerData) .L802439F4: /* 1722D4 802439F4 AFBF0030 */ sw $ra, 0x30($sp) D_802439F8: /* 1722D8 802439F8 AFB50024 */ sw $s5, 0x24($sp) glabel func_802439FC /* 1722DC 802439FC AFB40020 */ sw $s4, 0x20($sp) D_80243A00: /* 1722E0 80243A00 AFB3001C */ sw $s3, 0x1C($sp) glabel func_80243A04 /* 1722E4 80243A04 AFB20018 */ sw $s2, 0x18($sp) D_80243A08: /* 1722E8 80243A08 AFB10014 */ sw $s1, 0x14($sp) D_80243A0C: /* 1722EC 80243A0C AFB00010 */ sw $s0, 0x10($sp) D_80243A10: /* 1722F0 80243A10 F7B80048 */ sdc1 $f24, 0x48($sp) D_80243A14: /* 1722F4 80243A14 F7B60040 */ sdc1 $f22, 0x40($sp) D_80243A18: /* 1722F8 80243A18 F7B40038 */ sdc1 $f20, 0x38($sp) glabel func_80243A1C /* 1722FC 80243A1C 8ED500D8 */ lw $s5, 0xD8($s6) jtbl_80243A20: /* 172300 80243A20 3C02800E */ lui $v0, %hi(gBattleSubState) /* 172304 80243A24 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0) glabel .L80243A28 /* 172308 80243A28 8ED300DC */ lw $s3, 0xDC($s6) D_80243A2C: /* 17230C 80243A2C 1440002E */ bnez $v0, func_80243AE8 D_80243A30: /* 172310 80243A30 0000A02D */ daddu $s4, $zero, $zero /* 172314 80243A34 0280882D */ daddu $s1, $s4, $zero .L80243A38: /* 172318 80243A38 02C0902D */ daddu $s2, $s6, $zero flo_13_pad_3A3C: /* 17231C 80243A3C 8E5000E0 */ lw $s0, 0xE0($s2) D_80243A40: /* 172320 80243A40 5200000B */ beql $s0, $zero, D_80243A70 glabel func_80243A44 /* 172324 80243A44 26310001 */ addiu $s1, $s1, 0x1 D_80243A48: /* 172328 80243A48 8E0201D8 */ lw $v0, 0x1D8($s0) /* 17232C 80243A4C 50400008 */ beql $v0, $zero, D_80243A70 glabel .L80243A50 /* 172330 80243A50 26310001 */ addiu $s1, $s1, 0x1 D_80243A54: /* 172334 80243A54 8E0401E8 */ lw $a0, 0x1E8($s0) /* 172338 80243A58 0C0B1059 */ jal does_script_exist D_80243A5C: /* 17233C 80243A5C 00000000 */ nop /* 172340 80243A60 50400002 */ beql $v0, $zero, D_80243A6C /* 172344 80243A64 AE0001D8 */ sw $zero, 0x1D8($s0) .L80243A68: /* 172348 80243A68 24140001 */ addiu $s4, $zero, 0x1 D_80243A6C: /* 17234C 80243A6C 26310001 */ addiu $s1, $s1, 0x1 D_80243A70: /* 172350 80243A70 2A220018 */ slti $v0, $s1, 0x18 /* 172354 80243A74 1440FFF1 */ bnez $v0, flo_13_pad_3A3C /* 172358 80243A78 26520004 */ addiu $s2, $s2, 0x4 D_80243A7C: /* 17235C 80243A7C 1680001A */ bnez $s4, func_80243AE8 D_80243A80: /* 172360 80243A80 00000000 */ nop /* 172364 80243A84 0000882D */ daddu $s1, $zero, $zero D_80243A88: /* 172368 80243A88 02C0902D */ daddu $s2, $s6, $zero D_80243A8C: /* 17236C 80243A8C 8E5000E0 */ lw $s0, 0xE0($s2) D_80243A90: /* 172370 80243A90 5200000B */ beql $s0, $zero, D_80243AC0 .L80243A94: /* 172374 80243A94 26310001 */ addiu $s1, $s1, 0x1 D_80243A98: /* 172378 80243A98 8E0201D4 */ lw $v0, 0x1D4($s0) /* 17237C 80243A9C 50400008 */ beql $v0, $zero, D_80243AC0 glabel func_80243AA0 /* 172380 80243AA0 26310001 */ addiu $s1, $s1, 0x1 /* 172384 80243AA4 8E0401E4 */ lw $a0, 0x1E4($s0) glabel func_80243AA8 /* 172388 80243AA8 0C0B1059 */ jal does_script_exist .L80243AAC: /* 17238C 80243AAC 00000000 */ nop D_80243AB0: /* 172390 80243AB0 50400002 */ beql $v0, $zero, func_80243ABC /* 172394 80243AB4 AE0001D4 */ sw $zero, 0x1D4($s0) glabel func_80243AB8 /* 172398 80243AB8 24140001 */ addiu $s4, $zero, 0x1 glabel func_80243ABC /* 17239C 80243ABC 26310001 */ addiu $s1, $s1, 0x1 D_80243AC0: /* 1723A0 80243AC0 2A220018 */ slti $v0, $s1, 0x18 .L80243AC4: /* 1723A4 80243AC4 1440FFF1 */ bnez $v0, D_80243A8C /* 1723A8 80243AC8 26520004 */ addiu $s2, $s2, 0x4 /* 1723AC 80243ACC 16800006 */ bnez $s4, func_80243AE8 glabel .L80243AD0 /* 1723B0 80243AD0 00000000 */ nop /* 1723B4 80243AD4 0C093903 */ jal func_8024E40C D_80243AD8_EAC5B8: /* 1723B8 80243AD8 24040002 */ addiu $a0, $zero, 0x2 /* 1723BC 80243ADC 24020001 */ addiu $v0, $zero, 0x1 /* 1723C0 80243AE0 3C01800E */ lui $at, %hi(gBattleSubState) .L80243AE4: /* 1723C4 80243AE4 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel func_80243AE8 /* 1723C8 80243AE8 3C04800E */ lui $a0, %hi(gBattleSubState) .L80243AEC: /* 1723CC 80243AEC 2484C4DC */ addiu $a0, $a0, %lo(gBattleSubState) D_80243AF0: /* 1723D0 80243AF0 8C830000 */ lw $v1, 0x0($a0) /* 1723D4 80243AF4 24020001 */ addiu $v0, $zero, 0x1 /* 1723D8 80243AF8 1462002A */ bne $v1, $v0, func_80243BA4 D_80243AFC: /* 1723DC 80243AFC 00000000 */ nop glabel .L80243B00 /* 1723E0 80243B00 3C03800E */ lui $v1, %hi(gBattleStatus) glabel func_80243B04 /* 1723E4 80243B04 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) .L80243B08: /* 1723E8 80243B08 8C620004 */ lw $v0, 0x4($v1) /* 1723EC 80243B0C 30420040 */ andi $v0, $v0, 0x40 glabel func_80243B10 /* 1723F0 80243B10 14400007 */ bnez $v0, .L80243B30 D_80243B14: /* 1723F4 80243B14 2402000C */ addiu $v0, $zero, 0xC D_80243B18: /* 1723F8 80243B18 8C620000 */ lw $v0, 0x0($v1) D_80243B1C: /* 1723FC 80243B1C 3C030010 */ lui $v1, (0x100000 >> 16) D_80243B20: /* 172400 80243B20 00431024 */ and $v0, $v0, $v1 /* 172404 80243B24 14400004 */ bnez $v0, D_80243B38 D_80243B28: /* 172408 80243B28 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) glabel func_80243B2C /* 17240C 80243B2C 2402000C */ addiu $v0, $zero, 0xC .L80243B30: /* 172410 80243B30 08090EE9 */ j func_80243BA4 /* 172414 80243B34 AC820000 */ sw $v0, 0x0($a0) D_80243B38: /* 172418 80243B38 8EA20000 */ lw $v0, 0x0($s5) D_80243B3C: /* 17241C 80243B3C 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF) /* 172420 80243B40 00431024 */ and $v0, $v0, $v1 D_80243B44_EEA0F4: /* 172424 80243B44 AEA20000 */ sw $v0, 0x0($s5) D_80243B48_EEA0F8: /* 172428 80243B48 8E620000 */ lw $v0, 0x0($s3) /* 17242C 80243B4C 00431024 */ and $v0, $v0, $v1 .L80243B50: /* 172430 80243B50 AE620000 */ sw $v0, 0x0($s3) D_80243B54: /* 172434 80243B54 8EA20000 */ lw $v0, 0x0($s5) D_80243B58: /* 172438 80243B58 3C030400 */ lui $v1, (0x4000000 >> 16) /* 17243C 80243B5C 00431025 */ or $v0, $v0, $v1 /* 172440 80243B60 AEA20000 */ sw $v0, 0x0($s5) D_80243B64: /* 172444 80243B64 8E620000 */ lw $v0, 0x0($s3) /* 172448 80243B68 C6600138 */ lwc1 $f0, 0x138($s3) glabel func_80243B6C /* 17244C 80243B6C C6620140 */ lwc1 $f2, 0x140($s3) D_80243B70: /* 172450 80243B70 00431025 */ or $v0, $v0, $v1 D_80243B74: /* 172454 80243B74 AE620000 */ sw $v0, 0x0($s3) D_80243B78: /* 172458 80243B78 E660000C */ swc1 $f0, 0xC($s3) D_80243B7C: /* 17245C 80243B7C E6620014 */ swc1 $f2, 0x14($s3) .L80243B80: /* 172460 80243B80 C6A00138 */ lwc1 $f0, 0x138($s5) /* 172464 80243B84 2402000B */ addiu $v0, $zero, 0xB /* 172468 80243B88 AC820000 */ sw $v0, 0x0($a0) /* 17246C 80243B8C E6600018 */ swc1 $f0, 0x18($s3) .L80243B90: /* 172470 80243B90 C6A00140 */ lwc1 $f0, 0x140($s5) /* 172474 80243B94 24020004 */ addiu $v0, $zero, 0x4 D_80243B98: /* 172478 80243B98 A6620070 */ sh $v0, 0x70($s3) D_80243B9C: /* 17247C 80243B9C AE600054 */ sw $zero, 0x54($s3) .L80243BA0: /* 172480 80243BA0 E6600020 */ swc1 $f0, 0x20($s3) glabel func_80243BA4 /* 172484 80243BA4 3C03800E */ lui $v1, %hi(gBattleSubState) /* 172488 80243BA8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) /* 17248C 80243BAC 2402000B */ addiu $v0, $zero, 0xB D_80243BB0: /* 172490 80243BB0 1462007D */ bne $v1, $v0, func_80243DA8 /* 172494 80243BB4 2402000C */ addiu $v0, $zero, 0xC D_80243BB8_EAC698: /* 172498 80243BB8 86620070 */ lh $v0, 0x70($s3) /* 17249C 80243BBC 10400022 */ beqz $v0, D_80243C48 D_80243BC0: /* 1724A0 80243BC0 00000000 */ nop D_80243BC4: /* 1724A4 80243BC4 C6600018 */ lwc1 $f0, 0x18($s3) dro_02_pad_3BC8: /* 1724A8 80243BC8 C6680144 */ lwc1 $f8, 0x144($s3) D_80243BCC: /* 1724AC 80243BCC C6620020 */ lwc1 $f2, 0x20($s3) D_80243BD0: /* 1724B0 80243BD0 46080001 */ sub.s $f0, $f0, $f8 D_80243BD4: /* 1724B4 80243BD4 C664014C */ lwc1 $f4, 0x14C($s3) D_80243BD8: /* 1724B8 80243BD8 46041081 */ sub.s $f2, $f2, $f4 /* 1724BC 80243BDC 44823000 */ mtc1 $v0, $f6 D_80243BE0: /* 1724C0 80243BE0 00000000 */ nop D_80243BE4: /* 1724C4 80243BE4 468031A0 */ cvt.s.w $f6, $f6 /* 1724C8 80243BE8 46060003 */ div.s $f0, $f0, $f6 glabel func_80243BEC /* 1724CC 80243BEC 46004200 */ add.s $f8, $f8, $f0 D_80243BF0: /* 1724D0 80243BF0 46003006 */ mov.s $f0, $f6 D_80243BF4: /* 1724D4 80243BF4 46061083 */ div.s $f2, $f2, $f6 jtbl_80243BF8: /* 1724D8 80243BF8 C660000C */ lwc1 $f0, 0xC($s3) /* 1724DC 80243BFC 46022100 */ add.s $f4, $f4, $f2 .L80243C00: /* 1724E0 80243C00 E6680144 */ swc1 $f8, 0x144($s3) .L80243C04: /* 1724E4 80243C04 E664014C */ swc1 $f4, 0x14C($s3) D_80243C08: /* 1724E8 80243C08 C6A40144 */ lwc1 $f4, 0x144($s5) D_80243C0C: /* 1724EC 80243C0C 46040001 */ sub.s $f0, $f0, $f4 glabel func_80243C10 /* 1724F0 80243C10 46003086 */ mov.s $f2, $f6 .L80243C14: /* 1724F4 80243C14 46060003 */ div.s $f0, $f0, $f6 D_80243C18: /* 1724F8 80243C18 46002100 */ add.s $f4, $f4, $f0 /* 1724FC 80243C1C E6A40144 */ swc1 $f4, 0x144($s5) D_80243C20: /* 172500 80243C20 C6600014 */ lwc1 $f0, 0x14($s3) D_80243C24: /* 172504 80243C24 C6A4014C */ lwc1 $f4, 0x14C($s5) /* 172508 80243C28 86620070 */ lh $v0, 0x70($s3) /* 17250C 80243C2C 46040001 */ sub.s $f0, $f0, $f4 D_80243C30: /* 172510 80243C30 44821000 */ mtc1 $v0, $f2 .L80243C34: /* 172514 80243C34 00000000 */ nop /* 172518 80243C38 468010A0 */ cvt.s.w $f2, $f2 dro_02_pad_3C3C: /* 17251C 80243C3C 46020003 */ div.s $f0, $f0, $f2 D_80243C40: /* 172520 80243C40 46002100 */ add.s $f4, $f4, $f0 .L80243C44: /* 172524 80243C44 E6A4014C */ swc1 $f4, 0x14C($s5) D_80243C48: /* 172528 80243C48 C66C0054 */ lwc1 $f12, 0x54($s3) D_80243C4C: /* 17252C 80243C4C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) D_80243C50: /* 172530 80243C50 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 172534 80243C54 4481B000 */ mtc1 $at, $f22 /* 172538 80243C58 00000000 */ nop D_80243C5C: /* 17253C 80243C5C 46166302 */ mul.s $f12, $f12, $f22 /* 172540 80243C60 00000000 */ nop /* 172544 80243C64 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 172548 80243C68 4481C000 */ mtc1 $at, $f24 D_80243C6C: /* 17254C 80243C6C 3C014180 */ lui $at, (0x41800000 >> 16) .L80243C70: /* 172550 80243C70 4481A000 */ mtc1 $at, $f20 /* 172554 80243C74 0C00A85B */ jal sin_rad D_80243C78: /* 172558 80243C78 46186303 */ div.s $f12, $f12, $f24 .L80243C7C: /* 17255C 80243C7C 46140002 */ mul.s $f0, $f0, $f20 /* 172560 80243C80 00000000 */ nop /* 172564 80243C84 C662014C */ lwc1 $f2, 0x14C($s3) /* 172568 80243C88 46001081 */ sub.s $f2, $f2, $f0 flo_25_pad_3C8C: /* 17256C 80243C8C C66C0054 */ lwc1 $f12, 0x54($s3) D_80243C90: /* 172570 80243C90 0C00A6C9 */ jal clamp_angle D_80243C94: /* 172574 80243C94 E662014C */ swc1 $f2, 0x14C($s3) D_80243C98: /* 172578 80243C98 C66C0054 */ lwc1 $f12, 0x54($s3) D_80243C9C: /* 17257C 80243C9C 46166302 */ mul.s $f12, $f12, $f22 D_80243CA0: /* 172580 80243CA0 00000000 */ nop D_80243CA4: /* 172584 80243CA4 E660018C */ swc1 $f0, 0x18C($s3) /* 172588 80243CA8 0C00A85B */ jal sin_rad D_80243CAC: /* 17258C 80243CAC 46186303 */ div.s $f12, $f12, $f24 D_80243CB0: /* 172590 80243CB0 46140002 */ mul.s $f0, $f0, $f20 D_80243CB4: /* 172594 80243CB4 00000000 */ nop /* 172598 80243CB8 C6A2014C */ lwc1 $f2, 0x14C($s5) /* 17259C 80243CBC 46001080 */ add.s $f2, $f2, $f0 D_80243CC0: /* 1725A0 80243CC0 E6A2014C */ swc1 $f2, 0x14C($s5) D_80243CC4: /* 1725A4 80243CC4 0C00A6C9 */ jal clamp_angle D_80243CC8: /* 1725A8 80243CC8 C66C0054 */ lwc1 $f12, 0x54($s3) glabel func_80243CCC /* 1725AC 80243CCC E6A0018C */ swc1 $f0, 0x18C($s5) D_80243CD0: /* 1725B0 80243CD0 C6600054 */ lwc1 $f0, 0x54($s3) glabel func_80243CD4 /* 1725B4 80243CD4 3C0142B4 */ lui $at, (0x42B40000 >> 16) flo_25_pad_3CD8: /* 1725B8 80243CD8 44811000 */ mtc1 $at, $f2 .L80243CDC: /* 1725BC 80243CDC 86620070 */ lh $v0, 0x70($s3) D_80243CE0: /* 1725C0 80243CE0 46020000 */ add.s $f0, $f0, $f2 /* 1725C4 80243CE4 96630070 */ lhu $v1, 0x70($s3) .L80243CE8: /* 1725C8 80243CE8 10400004 */ beqz $v0, .L80243CFC D_80243CEC: /* 1725CC 80243CEC E6600054 */ swc1 $f0, 0x54($s3) D_80243CF0: /* 1725D0 80243CF0 2462FFFF */ addiu $v0, $v1, -0x1 /* 1725D4 80243CF4 08090F67 */ j .L80243D9C /* 1725D8 80243CF8 A6620070 */ sh $v0, 0x70($s3) .L80243CFC: /* 1725DC 80243CFC C6600018 */ lwc1 $f0, 0x18($s3) D_80243D00: /* 1725E0 80243D00 C6620020 */ lwc1 $f2, 0x20($s3) D_80243D04: /* 1725E4 80243D04 C664000C */ lwc1 $f4, 0xC($s3) D_80243D08: /* 1725E8 80243D08 E6600144 */ swc1 $f0, 0x144($s3) /* 1725EC 80243D0C E662014C */ swc1 $f2, 0x14C($s3) D_80243D10: /* 1725F0 80243D10 E6A40144 */ swc1 $f4, 0x144($s5) glabel func_80243D14 /* 1725F4 80243D14 C6600014 */ lwc1 $f0, 0x14($s3) D_80243D18: /* 1725F8 80243D18 E6A0014C */ swc1 $f0, 0x14C($s5) D_80243D1C: /* 1725FC 80243D1C C6600144 */ lwc1 $f0, 0x144($s3) /* 172600 80243D20 C662014C */ lwc1 $f2, 0x14C($s3) /* 172604 80243D24 3C030800 */ lui $v1, (0x8000000 >> 16) D_80243D28: /* 172608 80243D28 E6600138 */ swc1 $f0, 0x138($s3) /* 17260C 80243D2C E6620140 */ swc1 $f2, 0x140($s3) D_80243D30: /* 172610 80243D30 C6A00144 */ lwc1 $f0, 0x144($s5) /* 172614 80243D34 8EA20000 */ lw $v0, 0x0($s5) D_80243D38: /* 172618 80243D38 C6A2014C */ lwc1 $f2, 0x14C($s5) /* 17261C 80243D3C 00431025 */ or $v0, $v0, $v1 D_80243D40: /* 172620 80243D40 E6A00138 */ swc1 $f0, 0x138($s5) .L80243D44: /* 172624 80243D44 E6A20140 */ swc1 $f2, 0x140($s5) D_80243D48: /* 172628 80243D48 AEA20000 */ sw $v0, 0x0($s5) /* 17262C 80243D4C 8E620000 */ lw $v0, 0x0($s3) jtbl_80243D50: /* 172630 80243D50 3C04800E */ lui $a0, %hi(gBattleStatus) /* 172634 80243D54 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) D_80243D58: /* 172638 80243D58 00431025 */ or $v0, $v0, $v1 D_80243D5C: /* 17263C 80243D5C AE620000 */ sw $v0, 0x0($s3) glabel func_80243D60 /* 172640 80243D60 8C820004 */ lw $v0, 0x4($a0) .L80243D64: /* 172644 80243D64 30420040 */ andi $v0, $v0, 0x40 D_80243D68: /* 172648 80243D68 10400004 */ beqz $v0, .L80243D7C D_80243D6C: /* 17264C 80243D6C 3C030010 */ lui $v1, (0x100000 >> 16) D_80243D70: /* 172650 80243D70 8C820000 */ lw $v0, 0x0($a0) dead_kzn_19_varStash: /* 172654 80243D74 08090F63 */ j .L80243D8C D_80243D78: /* 172658 80243D78 00431025 */ or $v0, $v0, $v1 .L80243D7C: /* 17265C 80243D7C 3C03FFEF */ lui $v1, (0xFFEFFFFF >> 16) D_80243D80: /* 172660 80243D80 8C820000 */ lw $v0, 0x0($a0) .L80243D84: /* 172664 80243D84 3463FFFF */ ori $v1, $v1, (0xFFEFFFFF & 0xFFFF) dgb_08_pad_3D88: /* 172668 80243D88 00431024 */ and $v0, $v0, $v1 .L80243D8C: /* 17266C 80243D8C AC820000 */ sw $v0, 0x0($a0) D_80243D90: /* 172670 80243D90 2402000C */ addiu $v0, $zero, 0xC D_80243D94: /* 172674 80243D94 3C01800E */ lui $at, %hi(gBattleSubState) jtbl_80243D98: /* 172678 80243D98 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80243D9C: /* 17267C 80243D9C 3C03800E */ lui $v1, %hi(gBattleSubState) D_80243DA0: /* 172680 80243DA0 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_80243DA4: /* 172684 80243DA4 2402000C */ addiu $v0, $zero, 0xC glabel func_80243DA8 /* 172688 80243DA8 1462004C */ bne $v1, $v0, .L80243EDC /* 17268C 80243DAC 3C02FFFE */ lui $v0, (0xFFFEFFFF >> 16) D_80243DB0: /* 172690 80243DB0 3C10800E */ lui $s0, %hi(gBattleStatus) /* 172694 80243DB4 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) /* 172698 80243DB8 8E030004 */ lw $v1, 0x4($s0) .L80243DBC: /* 17269C 80243DBC 3442FFFF */ ori $v0, $v0, (0xFFFEFFFF & 0xFFFF) D_80243DC0: /* 1726A0 80243DC0 00621824 */ and $v1, $v1, $v0 .L80243DC4: /* 1726A4 80243DC4 AE030004 */ sw $v1, 0x4($s0) /* 1726A8 80243DC8 8EA20000 */ lw $v0, 0x0($s5) D_80243DCC: /* 1726AC 80243DCC 3C030C00 */ lui $v1, (0xC000000 >> 16) .L80243DD0: /* 1726B0 80243DD0 A2A0021D */ sb $zero, 0x21D($s5) D_80243DD4: /* 1726B4 80243DD4 00431025 */ or $v0, $v0, $v1 dead_kzn_19_ItemChoice_HasSelectedItem: /* 1726B8 80243DD8 12600004 */ beqz $s3, D_80243DEC dead_kzn_19_ItemChoice_SelectedItemID: /* 1726BC 80243DDC AEA20000 */ sw $v0, 0x0($s5) D_80243DE0: /* 1726C0 80243DE0 00431025 */ or $v0, $v0, $v1 /* 1726C4 80243DE4 AEA20000 */ sw $v0, 0x0($s5) D_80243DE8: /* 1726C8 80243DE8 A260021D */ sb $zero, 0x21D($s3) D_80243DEC: /* 1726CC 80243DEC 0C098298 */ jal func_80260A60 D_80243DF0: /* 1726D0 80243DF0 00000000 */ nop /* 1726D4 80243DF4 3C04FFBF */ lui $a0, (0xFFBFFFFF >> 16) D_80243DF8: /* 1726D8 80243DF8 3484FFFF */ ori $a0, $a0, (0xFFBFFFFF & 0xFFFF) glabel func_80243DFC /* 1726DC 80243DFC 8E030000 */ lw $v1, 0x0($s0) D_80243E00: /* 1726E0 80243E00 96E20290 */ lhu $v0, 0x290($s7) /* 1726E4 80243E04 00641824 */ and $v1, $v1, $a0 D_80243E08: /* 1726E8 80243E08 24420020 */ addiu $v0, $v0, 0x20 /* 1726EC 80243E0C AE030000 */ sw $v1, 0x0($s0) D_80243E10: /* 1726F0 80243E10 A6E20290 */ sh $v0, 0x290($s7) /* 1726F4 80243E14 00021400 */ sll $v0, $v0, 16 D_80243E18: /* 1726F8 80243E18 82E3028E */ lb $v1, 0x28E($s7) .L80243E1C: /* 1726FC 80243E1C 00021403 */ sra $v0, $v0, 16 .L80243E20: /* 172700 80243E20 00031A00 */ sll $v1, $v1, 8 D_80243E24: /* 172704 80243E24 0062102A */ slt $v0, $v1, $v0 /* 172708 80243E28 54400001 */ bnel $v0, $zero, .L80243E30 /* 17270C 80243E2C A6E30290 */ sh $v1, 0x290($s7) .L80243E30: /* 172710 80243E30 0000882D */ daddu $s1, $zero, $zero /* 172714 80243E34 2414000B */ addiu $s4, $zero, 0xB D_80243E38: /* 172718 80243E38 02C0902D */ daddu $s2, $s6, $zero .L80243E3C: /* 17271C 80243E3C 8E5000E0 */ lw $s0, 0xE0($s2) /* 172720 80243E40 52000010 */ beql $s0, $zero, .L80243E84 D_80243E44: /* 172724 80243E44 26310001 */ addiu $s1, $s1, 0x1 /* 172728 80243E48 8E0201CC */ lw $v0, 0x1CC($s0) dgb_09_pad_3E4C: /* 17272C 80243E4C 5040000D */ beql $v0, $zero, .L80243E84 D_80243E50: /* 172730 80243E50 26310001 */ addiu $s1, $s1, 0x1 .L80243E54: /* 172734 80243E54 2405000A */ addiu $a1, $zero, 0xA D_80243E58: /* 172738 80243E58 A2D401A7 */ sb $s4, 0x1A7($s6) D_80243E5C: /* 17273C 80243E5C 8E0401CC */ lw $a0, 0x1CC($s0) D_80243E60: /* 172740 80243E60 0C0B0CF8 */ jal start_script D_80243E64: /* 172744 80243E64 0000302D */ daddu $a2, $zero, $zero /* 172748 80243E68 0040182D */ daddu $v1, $v0, $zero /* 17274C 80243E6C AE0301DC */ sw $v1, 0x1DC($s0) /* 172750 80243E70 8C620144 */ lw $v0, 0x144($v1) /* 172754 80243E74 AE0201EC */ sw $v0, 0x1EC($s0) D_80243E78: /* 172758 80243E78 36220200 */ ori $v0, $s1, 0x200 /* 17275C 80243E7C AC620148 */ sw $v0, 0x148($v1) D_80243E80: /* 172760 80243E80 26310001 */ addiu $s1, $s1, 0x1 .L80243E84: /* 172764 80243E84 2A220018 */ slti $v0, $s1, 0x18 jtbl_80243E88: /* 172768 80243E88 1440FFEC */ bnez $v0, .L80243E3C /* 17276C 80243E8C 26520004 */ addiu $s2, $s2, 0x4 D_80243E90: /* 172770 80243E90 12600010 */ beqz $s3, .L80243ED4 /* 172774 80243E94 24020002 */ addiu $v0, $zero, 0x2 /* 172778 80243E98 8E6201CC */ lw $v0, 0x1CC($s3) .L80243E9C: /* 17277C 80243E9C 1040000C */ beqz $v0, func_80243ED0 /* 172780 80243EA0 2405000A */ addiu $a1, $zero, 0xA /* 172784 80243EA4 2402000B */ addiu $v0, $zero, 0xB glabel .L80243EA8 /* 172788 80243EA8 A2C201A7 */ sb $v0, 0x1A7($s6) .L80243EAC: /* 17278C 80243EAC 8E6401CC */ lw $a0, 0x1CC($s3) .L80243EB0: /* 172790 80243EB0 0C0B0CF8 */ jal start_script .L80243EB4: /* 172794 80243EB4 0000302D */ daddu $a2, $zero, $zero glabel .L80243EB8 /* 172798 80243EB8 0040182D */ daddu $v1, $v0, $zero /* 17279C 80243EBC AE6301DC */ sw $v1, 0x1DC($s3) /* 1727A0 80243EC0 8C620144 */ lw $v0, 0x144($v1) /* 1727A4 80243EC4 AE6201EC */ sw $v0, 0x1EC($s3) glabel func_80243EC8 /* 1727A8 80243EC8 24020100 */ addiu $v0, $zero, 0x100 D_80243ECC: /* 1727AC 80243ECC AC620148 */ sw $v0, 0x148($v1) glabel func_80243ED0 /* 1727B0 80243ED0 24020002 */ addiu $v0, $zero, 0x2 .L80243ED4: /* 1727B4 80243ED4 3C01800E */ lui $at, %hi(gBattleSubState) glabel .L80243ED8 /* 1727B8 80243ED8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80243EDC: /* 1727BC 80243EDC 3C03800E */ lui $v1, %hi(gBattleSubState) glabel func_80243EE0 /* 1727C0 80243EE0 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) dgb_01_pad_3EE4: /* 1727C4 80243EE4 24020002 */ addiu $v0, $zero, 0x2 glabel .L80243EE8 /* 1727C8 80243EE8 14620026 */ bne $v1, $v0, D_80243F84 glabel func_80243EEC /* 1727CC 80243EEC 28620005 */ slti $v0, $v1, 0x5 D_80243EF0: /* 1727D0 80243EF0 0000A02D */ daddu $s4, $zero, $zero .L80243EF4: /* 1727D4 80243EF4 0280882D */ daddu $s1, $s4, $zero D_80243EF8: /* 1727D8 80243EF8 02C0902D */ daddu $s2, $s6, $zero .L80243EFC: /* 1727DC 80243EFC 8E5000E0 */ lw $s0, 0xE0($s2) /* 1727E0 80243F00 5200000A */ beql $s0, $zero, .L80243F2C .L80243F04: /* 1727E4 80243F04 26310001 */ addiu $s1, $s1, 0x1 D_80243F08: /* 1727E8 80243F08 8E0201CC */ lw $v0, 0x1CC($s0) glabel func_80243F0C /* 1727EC 80243F0C 50400007 */ beql $v0, $zero, .L80243F2C D_80243F10: /* 1727F0 80243F10 26310001 */ addiu $s1, $s1, 0x1 /* 1727F4 80243F14 8E0401EC */ lw $a0, 0x1EC($s0) D_80243F18: /* 1727F8 80243F18 0C0B1059 */ jal does_script_exist /* 1727FC 80243F1C 00000000 */ nop D_80243F20: /* 172800 80243F20 54400001 */ bnel $v0, $zero, D_80243F28 .L80243F24: /* 172804 80243F24 24140001 */ addiu $s4, $zero, 0x1 D_80243F28: /* 172808 80243F28 26310001 */ addiu $s1, $s1, 0x1 .L80243F2C: /* 17280C 80243F2C 2A220018 */ slti $v0, $s1, 0x18 D_80243F30: /* 172810 80243F30 1440FFF2 */ bnez $v0, .L80243EFC /* 172814 80243F34 26520004 */ addiu $s2, $s2, 0x4 D_80243F38: /* 172818 80243F38 12600008 */ beqz $s3, D_80243F5C D_80243F3C: /* 17281C 80243F3C 00000000 */ nop D_80243F40: /* 172820 80243F40 8E6201CC */ lw $v0, 0x1CC($s3) D_80243F44: /* 172824 80243F44 10400005 */ beqz $v0, D_80243F5C /* 172828 80243F48 00000000 */ nop /* 17282C 80243F4C 0C0B1059 */ jal does_script_exist .L80243F50: /* 172830 80243F50 8E6401EC */ lw $a0, 0x1EC($s3) .L80243F54: /* 172834 80243F54 54400001 */ bnel $v0, $zero, D_80243F5C /* 172838 80243F58 24140001 */ addiu $s4, $zero, 0x1 D_80243F5C: /* 17283C 80243F5C 16800006 */ bnez $s4, .L80243F78 /* 172840 80243F60 00000000 */ nop /* 172844 80243F64 0C093903 */ jal func_8024E40C D_80243F68: /* 172848 80243F68 24040002 */ addiu $a0, $zero, 0x2 D_80243F6C: /* 17284C 80243F6C 24020003 */ addiu $v0, $zero, 0x3 /* 172850 80243F70 3C01800E */ lui $at, %hi(gBattleSubState) D_80243F74: /* 172854 80243F74 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80243F78: /* 172858 80243F78 3C03800E */ lui $v1, %hi(gBattleSubState) /* 17285C 80243F7C 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_80243F80: /* 172860 80243F80 28620005 */ slti $v0, $v1, 0x5 D_80243F84: /* 172864 80243F84 10400005 */ beqz $v0, .L80243F9C .L80243F88: /* 172868 80243F88 28620003 */ slti $v0, $v1, 0x3 /* 17286C 80243F8C 14400003 */ bnez $v0, .L80243F9C D_80243F90: /* 172870 80243F90 00000000 */ nop /* 172874 80243F94 0C090464 */ jal func_80241190 D_80243F98: /* 172878 80243F98 24040005 */ addiu $a0, $zero, 0x5 .L80243F9C: /* 17287C 80243F9C 8FBF0030 */ lw $ra, 0x30($sp) jtbl_80243FA0: /* 172880 80243FA0 8FB7002C */ lw $s7, 0x2C($sp) D_80243FA4: /* 172884 80243FA4 8FB60028 */ lw $s6, 0x28($sp) /* 172888 80243FA8 8FB50024 */ lw $s5, 0x24($sp) D_80243FAC: /* 17288C 80243FAC 8FB40020 */ lw $s4, 0x20($sp) D_80243FB0: /* 172890 80243FB0 8FB3001C */ lw $s3, 0x1C($sp) /* 172894 80243FB4 8FB20018 */ lw $s2, 0x18($sp) .L80243FB8: /* 172898 80243FB8 8FB10014 */ lw $s1, 0x14($sp) .L80243FBC: /* 17289C 80243FBC 8FB00010 */ lw $s0, 0x10($sp) /* 1728A0 80243FC0 D7B80048 */ ldc1 $f24, 0x48($sp) glabel func_80243FC4 /* 1728A4 80243FC4 D7B60040 */ ldc1 $f22, 0x40($sp) .L80243FC8: /* 1728A8 80243FC8 D7B40038 */ ldc1 $f20, 0x38($sp) flo_17_pad_3FCC: /* 1728AC 80243FCC 03E00008 */ jr $ra D_80243FD0: /* 1728B0 80243FD0 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_end_turn(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; Actor* actor; Evt* script; s32 i; if (gBattleSubState == BTL_SUBSTATE_END_TURN_INIT) { s32 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)) { do { cond = TRUE; } while (0); // TODO required to match } else { actor->handleEventScript = NULL; } } } if (!cond) { 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)) { cond = TRUE; } else { actor->takeTurnScript = NULL; } } } if (!cond) { btl_cam_use_preset(BTL_CAM_DEFAULT); gBattleSubState = BTL_SUBSTATE_END_TURN_CHECK_FOR_SWAP; } } } if (gBattleSubState == BTL_SUBSTATE_END_TURN_CHECK_FOR_SWAP) { if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) { gBattleSubState = BTL_SUBSTATE_END_TURN_START_SCRIPTS; } else if (!(gBattleStatus.flags1 & BS_FLAGS1_PLAYER_IN_BACK)) { gBattleSubState = BTL_SUBSTATE_END_TURN_START_SCRIPTS; } else { player->flags &= ~ACTOR_FLAG_8000000; partner->flags &= ~ACTOR_FLAG_8000000; player->flags |= ACTOR_FLAG_4000000; partner->flags |= ACTOR_FLAG_4000000; 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; partner->state.moveTime = 4; partner->state.angle = 0.0f; gBattleSubState = BTL_SUBSTATE_END_TURN_PERFORM_SWAP; } } if (gBattleSubState == BTL_SUBSTATE_END_TURN_PERFORM_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; player->flags |= ACTOR_FLAG_8000000; partner->flags |= ACTOR_FLAG_8000000; if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) { gBattleStatus.flags1 |= BS_FLAGS1_PLAYER_IN_BACK; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_PLAYER_IN_BACK; } gBattleSubState = BTL_SUBSTATE_END_TURN_START_SCRIPTS; } } if (gBattleSubState == BTL_SUBSTATE_END_TURN_START_SCRIPTS) { gBattleStatus.flags2 &= ~BS_FLAGS2_10000; 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; } btl_set_player_idle_anims(); gBattleStatus.flags1 &= ~BS_FLAGS1_PLAYER_DEFENDING; playerData->specialBarsFilled += 32; if (playerData->specialBarsFilled > playerData->maxStarPower * 256) { playerData->specialBarsFilled = playerData->maxStarPower * 256; } for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { actor = battleStatus->enemyActors[i]; if (actor != NULL && actor->handlePhaseSource != NULL) { battleStatus->battlePhase = PHASE_ENEMY_END; script = start_script(actor->handlePhaseSource, EVT_PRIORITY_A, 0); actor->handlePhaseScript = script; actor->handleBatttlePhaseScriptID = script->id; script->owner1.enemyID = i | ACTOR_ENEMY0; } } if (partner != NULL && partner->handlePhaseSource != NULL) { battleStatus->battlePhase = PHASE_ENEMY_END; script = start_script(partner->handlePhaseSource, EVT_PRIORITY_A, 0); partner->handlePhaseScript = script; partner->handleBatttlePhaseScriptID = script->id; script->owner1.actorID = ACTOR_PARTNER; } gBattleSubState = BTL_SUBSTATE_END_TURN_AWAIT_SCRIPTS; } // wait for all end turn scripts to finish executing if (gBattleSubState == BTL_SUBSTATE_END_TURN_AWAIT_SCRIPTS) { s32 cond = FALSE; 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 (partner != NULL && partner->handlePhaseSource != NULL && does_script_exist(partner->handleBatttlePhaseScriptID)) { cond = TRUE; } if (!cond) { btl_cam_use_preset(BTL_CAM_DEFAULT); gBattleSubState = BTL_SUBSTATE_END_TURN_BEGIN_NEXT; } } // proceed to next turn switch (gBattleSubState) { case BTL_SUBSTATE_END_TURN_BEGIN_NEXT: case BTL_SUBSTATE_END_TURN_UNUSED_4: btl_set_state(BATTLE_STATE_BEGIN_TURN); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel parasol_get_npc /* E26710 802B6000 27BDFFD0 */ addiu $sp, $sp, -0x30 /* E26714 802B6004 AFB00018 */ sw $s0, 0x18($sp) /* E26718 802B6008 3C108011 */ lui $s0, %hi(gPlayerStatus) /* E2671C 802B600C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* E26720 802B6010 AFBF0020 */ sw $ra, 0x20($sp) /* E26724 802B6014 AFB1001C */ sw $s1, 0x1C($sp) .L802B6018: /* E26728 802B6018 F7B40028 */ sdc1 $f20, 0x28($sp) /* E2672C 802B601C 8E040000 */ lw $a0, 0x0($s0) /* E26730 802B6020 3C118016 */ lui $s1, %hi(gCollisionStatus) /* E26734 802B6024 2631A550 */ addiu $s1, $s1, %lo(gCollisionStatus) /* E26738 802B6028 0481003E */ bgez $a0, .L802B6124 /* E2673C 802B602C 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16) /* E26740 802B6030 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF) /* E26744 802B6034 3C030002 */ lui $v1, (0x2000A >> 16) /* E26748 802B6038 3463000A */ ori $v1, $v1, (0x2000A & 0xFFFF) /* E2674C 802B603C 00821024 */ and $v0, $a0, $v0 .L802B6040: /* E26750 802B6040 00431025 */ or $v0, $v0, $v1 .L802B6044: /* E26754 802B6044 0C03963C */ jal phys_clear_spin_history glabel action_hammer_play_hit_fx /* E26758 802B6048 AE020000 */ sw $v0, 0x0($s0) .L802B604C: /* E2675C 802B604C 3C014180 */ lui $at, (0x41800000 >> 16) .L802B6050: /* E26760 802B6050 44810000 */ mtc1 $at, $f0 /* E26764 802B6054 3C01C0EC */ lui $at, (0xC0EC5C14 >> 16) .L802B6058: /* E26768 802B6058 34215C14 */ ori $at, $at, (0xC0EC5C14 & 0xFFFF) /* E2676C 802B605C 44811000 */ mtc1 $at, $f2 glabel action_update_sliding /* E26770 802B6060 3C01405C */ lui $at, (0x405C9AAA >> 16) /* E26774 802B6064 34219AAA */ ori $at, $at, (0x405C9AAA & 0xFFFF) .L802B6068: /* E26778 802B6068 44812000 */ mtc1 $at, $f4 /* E2677C 802B606C 3C01BF40 */ lui $at, (0xBF400000 >> 16) /* E26780 802B6070 44813000 */ mtc1 $at, $f6 .L802B6074: /* E26784 802B6074 3C040008 */ lui $a0, (0x80000 >> 16) /* E26788 802B6078 A20000B6 */ sb $zero, 0xB6($s0) glabel .L802B607C /* E2678C 802B607C AE000054 */ sw $zero, 0x54($s0) .L802B6080: /* E26790 802B6080 E6000070 */ swc1 $f0, 0x70($s0) /* E26794 802B6084 E6020074 */ swc1 $f2, 0x74($s0) /* E26798 802B6088 E6040078 */ swc1 $f4, 0x78($s0) .L802B608C: /* E2679C 802B608C 0C037FDE */ jal suggest_player_anim_always_forward .L802B6090: /* E267A0 802B6090 E606007C */ swc1 $f6, 0x7C($s0) .L802B6094: /* E267A4 802B6094 0C03805E */ jal disable_player_input /* E267A8 802B6098 00000000 */ nop glabel action_update_state_23 /* E267AC 802B609C 8E020000 */ lw $v0, 0x0($s0) /* E267B0 802B60A0 3C04800B */ lui $a0, %hi(gCameras) glabel action_update_use_spinning_flower /* E267B4 802B60A4 24841D80 */ addiu $a0, $a0, %lo(gCameras) .L802B60A8: /* E267B8 802B60A8 34420200 */ ori $v0, $v0, 0x200 .L802B60AC: /* E267BC 802B60AC AE020000 */ sw $v0, 0x0($s0) /* E267C0 802B60B0 94820002 */ lhu $v0, 0x2($a0) glabel action_update_jump /* E267C4 802B60B4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* E267C8 802B60B8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* E267CC 802B60BC 34420001 */ ori $v0, $v0, 0x1 /* E267D0 802B60C0 A4820002 */ sh $v0, 0x2($a0) /* E267D4 802B60C4 00031080 */ sll $v0, $v1, 2 .L802B60C8: /* E267D8 802B60C8 00431021 */ addu $v0, $v0, $v1 /* E267DC 802B60CC 00021080 */ sll $v0, $v0, 2 glabel .L802B60D0 /* E267E0 802B60D0 00431023 */ subu $v0, $v0, $v1 .L802B60D4: /* E267E4 802B60D4 000218C0 */ sll $v1, $v0, 3 /* E267E8 802B60D8 00431021 */ addu $v0, $v0, $v1 /* E267EC 802B60DC 000210C0 */ sll $v0, $v0, 3 /* E267F0 802B60E0 00441021 */ addu $v0, $v0, $a0 /* E267F4 802B60E4 C6000080 */ lwc1 $f0, 0x80($s0) .L802B60E8: /* E267F8 802B60E8 C44C006C */ lwc1 $f12, 0x6C($v0) .L802B60EC: /* E267FC 802B60EC 0C00A6C9 */ jal clamp_angle .L802B60F0: /* E26800 802B60F0 460C0301 */ sub.s $f12, $f0, $f12 glabel .L802B60F4 /* E26804 802B60F4 3C014334 */ lui $at, (0x43340000 >> 16) /* E26808 802B60F8 44811000 */ mtc1 $at, $f2 /* E2680C 802B60FC 3C01C270 */ lui $at, (0xC2700000 >> 16) .L802B6100: /* E26810 802B6100 44812000 */ mtc1 $at, $f4 .L802B6104: /* E26814 802B6104 4602003E */ c.le.s $f0, $f2 .L802B6108: /* E26818 802B6108 00000000 */ nop glabel .L802B610C /* E2681C 802B610C 45020005 */ bc1fl .L802B6124 .L802B6110: /* E26820 802B6110 E60400D4 */ swc1 $f4, 0xD4($s0) /* E26824 802B6114 3C014270 */ lui $at, (0x42700000 >> 16) .L802B6118: /* E26828 802B6118 44812000 */ mtc1 $at, $f4 /* E2682C 802B611C 00000000 */ nop glabel action_update_parasol /* E26830 802B6120 E60400D4 */ swc1 $f4, 0xD4($s0) .L802B6124: /* E26834 802B6124 820200B6 */ lb $v0, 0xB6($s0) .L802B6128: /* E26838 802B6128 28420004 */ slti $v0, $v0, 0x4 /* E2683C 802B612C 1040001E */ beqz $v0, .L802B61A8 /* E26840 802B6130 00000000 */ nop glabel .L802B6134 /* E26844 802B6134 C60200D4 */ lwc1 $f2, 0xD4($s0) /* E26848 802B6138 44802000 */ mtc1 $zero, $f4 .L802B613C: /* E2684C 802B613C 00000000 */ nop .L802B6140: /* E26850 802B6140 4602203E */ c.le.s $f4, $f2 .L802B6144: /* E26854 802B6144 00000000 */ nop /* E26858 802B6148 4500000C */ bc1f .L802B617C .L802B614C: /* E2685C 802B614C 00000000 */ nop .L802B6150: /* E26860 802B6150 C60000A8 */ lwc1 $f0, 0xA8($s0) .L802B6154: /* E26864 802B6154 46020000 */ add.s $f0, $f0, $f2 .L802B6158: /* E26868 802B6158 3C0143B4 */ lui $at, (0x43B40000 >> 16) .L802B615C: /* E2686C 802B615C 44811000 */ mtc1 $at, $f2 /* E26870 802B6160 00000000 */ nop .L802B6164: /* E26874 802B6164 4600103E */ c.le.s $f2, $f0 .L802B6168: /* E26878 802B6168 00000000 */ nop /* E2687C 802B616C 4500000E */ bc1f .L802B61A8 glabel .L802B6170 /* E26880 802B6170 E60000A8 */ swc1 $f0, 0xA8($s0) glabel .L802B6174 /* E26884 802B6174 080AD869 */ j .L802B61A4 /* E26888 802B6178 46020001 */ sub.s $f0, $f0, $f2 .L802B617C: /* E2688C 802B617C C60000A8 */ lwc1 $f0, 0xA8($s0) .L802B6180: /* E26890 802B6180 46020080 */ add.s $f2, $f0, $f2 glabel .L802B6184 /* E26894 802B6184 4604103C */ c.lt.s $f2, $f4 .L802B6188: /* E26898 802B6188 00000000 */ nop .L802B618C: /* E2689C 802B618C 45000006 */ bc1f .L802B61A8 .L802B6190: /* E268A0 802B6190 E60200A8 */ swc1 $f2, 0xA8($s0) .L802B6194: /* E268A4 802B6194 3C0143B4 */ lui $at, (0x43B40000 >> 16) glabel func_802B6198 /* E268A8 802B6198 44810000 */ mtc1 $at, $f0 /* E268AC 802B619C 00000000 */ nop .L802B61A0: /* E268B0 802B61A0 46001000 */ add.s $f0, $f2, $f0 .L802B61A4: /* E268B4 802B61A4 E60000A8 */ swc1 $f0, 0xA8($s0) .L802B61A8: /* E268B8 802B61A8 C6020070 */ lwc1 $f2, 0x70($s0) .L802B61AC: /* E268BC 802B61AC 44800000 */ mtc1 $zero, $f0 .L802B61B0: /* E268C0 802B61B0 00000000 */ nop .L802B61B4: /* E268C4 802B61B4 4600103E */ c.le.s $f2, $f0 /* E268C8 802B61B8 00000000 */ nop /* E268CC 802B61BC 45000009 */ bc1f func_802B61E4 glabel func_802B61C0 /* E268D0 802B61C0 00000000 */ nop /* E268D4 802B61C4 3C028011 */ lui $v0, %hi(gSpinHistoryBufferPos) .L802B61C8: /* E268D8 802B61C8 8C42C944 */ lw $v0, %lo(gSpinHistoryBufferPos)($v0) .L802B61CC: /* E268DC 802B61CC C600002C */ lwc1 $f0, 0x2C($s0) /* E268E0 802B61D0 00021080 */ sll $v0, $v0, 2 .L802B61D4: /* E268E4 802B61D4 4600020D */ trunc.w.s $f8, $f0 .L802B61D8: /* E268E8 802B61D8 3C018011 */ lui $at, %hi(gSpinHistoryPosY) .L802B61DC: /* E268EC 802B61DC 00220821 */ addu $at, $at, $v0 /* E268F0 802B61E0 E428EF10 */ swc1 $f8, %lo(gSpinHistoryPosY)($at) glabel func_802B61E4 /* E268F4 802B61E4 3C058011 */ lui $a1, %hi(gSpinHistoryBufferPos) .L802B61E8: /* E268F8 802B61E8 24A5C944 */ addiu $a1, $a1, %lo(gSpinHistoryBufferPos) .L802B61EC: /* E268FC 802B61EC 8CA20000 */ lw $v0, 0x0($a1) .L802B61F0: /* E26900 802B61F0 C60000A8 */ lwc1 $f0, 0xA8($s0) .L802B61F4: /* E26904 802B61F4 00022040 */ sll $a0, $v0, 1 .L802B61F8: /* E26908 802B61F8 24420001 */ addiu $v0, $v0, 0x1 .L802B61FC: /* E2690C 802B61FC 4600020D */ trunc.w.s $f8, $f0 .L802B6200: /* E26910 802B6200 44034000 */ mfc1 $v1, $f8 .L802B6204: /* E26914 802B6204 3C018011 */ lui $at, %hi(gSpinHistoryPosAngle) glabel .L802B6208 /* E26918 802B6208 00240821 */ addu $at, $at, $a0 /* E2691C 802B620C A423F6B8 */ sh $v1, %lo(gSpinHistoryPosAngle)($at) .L802B6210: /* E26920 802B6210 ACA20000 */ sw $v0, 0x0($a1) .L802B6214: /* E26924 802B6214 28420006 */ slti $v0, $v0, 0x6 glabel .L802B6218 /* E26928 802B6218 50400001 */ beql $v0, $zero, .L802B6220 /* E2692C 802B621C ACA00000 */ sw $zero, 0x0($a1) .L802B6220: /* E26930 802B6220 820300B6 */ lb $v1, 0xB6($s0) .L802B6224: /* E26934 802B6224 2C62000D */ sltiu $v0, $v1, 0xD glabel .L802B6228 /* E26938 802B6228 104000DE */ beqz $v0, .L802B65A4 .L802B622C: /* E2693C 802B622C 00031080 */ sll $v0, $v1, 2 glabel action_update_step_up_peach /* E26940 802B6230 3C01802B */ lui $at, %hi(jtbl_802B6690) /* E26944 802B6234 00220821 */ addu $at, $at, $v0 glabel .L802B6238 /* E26948 802B6238 8C226690 */ lw $v0, %lo(jtbl_802B6690)($at) glabel .L802B623C /* E2694C 802B623C 00400008 */ jr $v0 glabel .L802B6240 /* E26950 802B6240 00000000 */ nop glabel .L802B6244 /* E26954 802B6244 0C038D12 */ jal integrate_gravity glabel .L802B6248 /* E26958 802B6248 00000000 */ nop /* E2695C 802B624C 46000506 */ mov.s $f20, $f0 glabel .L802B6250 /* E26960 802B6250 4600A306 */ mov.s $f12, $f20 .L802B6254: /* E26964 802B6254 0C038D45 */ jal player_check_collision_below glabel .L802B6258 /* E26968 802B6258 27A50010 */ addiu $a1, $sp, 0x10 .L802B625C: /* E2696C 802B625C 8FA20010 */ lw $v0, 0x10($sp) /* E26970 802B6260 04400014 */ bltz $v0, .L802B62B4 /* E26974 802B6264 E600002C */ swc1 $f0, 0x2C($s0) .L802B6268: /* E26978 802B6268 96240002 */ lhu $a0, 0x2($s1) .L802B626C: /* E2697C 802B626C 30824000 */ andi $v0, $a0, 0x4000 /* E26980 802B6270 10400010 */ beqz $v0, .L802B62B4 .L802B6274: /* E26984 802B6274 00042400 */ sll $a0, $a0, 16 glabel .L802B6278 /* E26988 802B6278 0C0441A9 */ jal get_entity_type /* E2698C 802B627C 00042403 */ sra $a0, $a0, 16 .L802B6280: /* E26990 802B6280 2442FFF9 */ addiu $v0, $v0, -0x7 .L802B6284: /* E26994 802B6284 2C420002 */ sltiu $v0, $v0, 0x2 glabel action_update_run /* E26998 802B6288 1040000A */ beqz $v0, .L802B62B4 /* E2699C 802B628C 00000000 */ nop .L802B6290: /* E269A0 802B6290 0C04417A */ jal get_entity_by_index glabel func_802B6294 /* E269A4 802B6294 86240002 */ lh $a0, 0x2($s1) glabel .L802B6298 /* E269A8 802B6298 90430006 */ lbu $v1, 0x6($v0) /* E269AC 802B629C 34630001 */ ori $v1, $v1, 0x1 /* E269B0 802B62A0 0C03805E */ jal disable_player_input glabel func_802B62A4 /* E269B4 802B62A4 A0430006 */ sb $v1, 0x6($v0) .L802B62A8: /* E269B8 802B62A8 2402000B */ addiu $v0, $zero, 0xB /* E269BC 802B62AC 080AD969 */ j .L802B65A4 jtbl_802B62B0: /* E269C0 802B62B0 A20200B6 */ sb $v0, 0xB6($s0) .L802B62B4: /* E269C4 802B62B4 44800000 */ mtc1 $zero, $f0 glabel .L802B62B8 /* E269C8 802B62B8 00000000 */ nop /* E269CC 802B62BC 4600A03E */ c.le.s $f20, $f0 /* E269D0 802B62C0 00000000 */ nop /* E269D4 802B62C4 4500000E */ bc1f D_802B6300 .L802B62C8: /* E269D8 802B62C8 00000000 */ nop glabel action_update_peach_land /* E269DC 802B62CC 0C0389AC */ jal record_jump_apex Munchlesia_LaunchVelocity: /* E269E0 802B62D0 00000000 */ nop Munchlesia_LateralVelocity: /* E269E4 802B62D4 24040147 */ addiu $a0, $zero, 0x147 Munchlesia_LaunchAccel: /* E269E8 802B62D8 0000282D */ daddu $a1, $zero, $zero Munchlesia_LaunchYaw: /* E269EC 802B62DC 24020003 */ addiu $v0, $zero, 0x3 D_802B62E0: /* E269F0 802B62E0 A6020008 */ sh $v0, 0x8($s0) .L802B62E4: /* E269F4 802B62E4 8E020000 */ lw $v0, 0x0($s0) /* E269F8 802B62E8 920300B6 */ lbu $v1, 0xB6($s0) /* E269FC 802B62EC 34420004 */ ori $v0, $v0, 0x4 /* E26A00 802B62F0 24630001 */ addiu $v1, $v1, 0x1 /* E26A04 802B62F4 AE020000 */ sw $v0, 0x0($s0) glabel func_802B62F8 /* E26A08 802B62F8 0C052736 */ jal sfx_play_sound_at_player .L802B62FC: /* E26A0C 802B62FC A20300B6 */ sb $v1, 0xB6($s0) D_802B6300: /* E26A10 802B6300 8FA20010 */ lw $v0, 0x10($sp) /* E26A14 802B6304 044000A7 */ bltz $v0, .L802B65A4 .L802B6308: /* E26A18 802B6308 3C03FFFD */ lui $v1, (0xFFFDFFF7 >> 16) .L802B630C: /* E26A1C 802B630C 3463FFF7 */ ori $v1, $v1, (0xFFFDFFF7 & 0xFFFF) .L802B6310: /* E26A20 802B6310 8E020000 */ lw $v0, 0x0($s0) /* E26A24 802B6314 2404000A */ addiu $a0, $zero, 0xA /* E26A28 802B6318 00431024 */ and $v0, $v0, $v1 glabel .L802B631C /* E26A2C 802B631C 0C039769 */ jal set_action_state .L802B6320: /* E26A30 802B6320 AE020000 */ sw $v0, 0x0($s0) glabel .L802B6324 /* E26A34 802B6324 080AD969 */ j .L802B65A4 .L802B6328: /* E26A38 802B6328 00000000 */ nop glabel .L802B632C /* E26A3C 802B632C 96020008 */ lhu $v0, 0x8($s0) .L802B6330: /* E26A40 802B6330 2442FFFF */ addiu $v0, $v0, -0x1 /* E26A44 802B6334 A6020008 */ sh $v0, 0x8($s0) .L802B6338: /* E26A48 802B6338 00021400 */ sll $v0, $v0, 16 /* E26A4C 802B633C 1C400099 */ bgtz $v0, .L802B65A4 .L802B6340: /* E26A50 802B6340 00000000 */ nop /* E26A54 802B6344 920200B6 */ lbu $v0, 0xB6($s0) glabel func_802B6348 /* E26A58 802B6348 24420001 */ addiu $v0, $v0, 0x1 /* E26A5C 802B634C 080AD969 */ j .L802B65A4 PlayerTweesterPhysicsPtr: /* E26A60 802B6350 A20200B6 */ sb $v0, 0xB6($s0) glabel .L802B6354 /* E26A64 802B6354 0C038D12 */ jal integrate_gravity /* E26A68 802B6358 00000000 */ nop .L802B635C: /* E26A6C 802B635C 46000506 */ mov.s $f20, $f0 D_802B6360: /* E26A70 802B6360 4600A306 */ mov.s $f12, $f20 .L802B6364: /* E26A74 802B6364 0C038D45 */ jal player_check_collision_below /* E26A78 802B6368 27A50010 */ addiu $a1, $sp, 0x10 .L802B636C: /* E26A7C 802B636C 3C01C2C8 */ lui $at, (0xC2C80000 >> 16) glabel .L802B6370 /* E26A80 802B6370 44811000 */ mtc1 $at, $f2 .L802B6374: /* E26A84 802B6374 00000000 */ nop /* E26A88 802B6378 4602A03C */ c.lt.s $f20, $f2 glabel .L802B637C /* E26A8C 802B637C 00000000 */ nop /* E26A90 802B6380 45000005 */ bc1f .L802B6398 /* E26A94 802B6384 E600002C */ swc1 $f0, 0x2C($s0) /* E26A98 802B6388 AE00007C */ sw $zero, 0x7C($s0) /* E26A9C 802B638C AE000078 */ sw $zero, 0x78($s0) /* E26AA0 802B6390 AE000074 */ sw $zero, 0x74($s0) glabel .L802B6394 /* E26AA4 802B6394 E6020070 */ swc1 $f2, 0x70($s0) .L802B6398: /* E26AA8 802B6398 8FA20010 */ lw $v0, 0x10($sp) .L802B639C: /* E26AAC 802B639C 04400081 */ bltz $v0, .L802B65A4 /* E26AB0 802B63A0 00000000 */ nop /* E26AB4 802B63A4 96240002 */ lhu $a0, 0x2($s1) .L802B63A8: /* E26AB8 802B63A8 30824000 */ andi $v0, $a0, 0x4000 .L802B63AC: /* E26ABC 802B63AC 1040002D */ beqz $v0, .L802B6464 glabel .L802B63B0 /* E26AC0 802B63B0 00042400 */ sll $a0, $a0, 16 /* E26AC4 802B63B4 0C0441A9 */ jal get_entity_type /* E26AC8 802B63B8 00042403 */ sra $a0, $a0, 16 /* E26ACC 802B63BC 0040182D */ daddu $v1, $v0, $zero .L802B63C0: /* E26AD0 802B63C0 2462FFD2 */ addiu $v0, $v1, -0x2E .L802B63C4: /* E26AD4 802B63C4 2C420002 */ sltiu $v0, $v0, 0x2 .L802B63C8: /* E26AD8 802B63C8 10400009 */ beqz $v0, .L802B63F0 .L802B63CC: /* E26ADC 802B63CC 2404000A */ addiu $a0, $zero, 0xA .L802B63D0: /* E26AE0 802B63D0 3C03FFFD */ lui $v1, (0xFFFDFFF7 >> 16) glabel action_update_first_strike /* E26AE4 802B63D4 3463FFF7 */ ori $v1, $v1, (0xFFFDFFF7 & 0xFFFF) .L802B63D8: /* E26AE8 802B63D8 8E020000 */ lw $v0, 0x0($s0) glabel .L802B63DC /* E26AEC 802B63DC 00431024 */ and $v0, $v0, $v1 .L802B63E0: /* E26AF0 802B63E0 0C039769 */ jal set_action_state .L802B63E4: /* E26AF4 802B63E4 AE020000 */ sw $v0, 0x0($s0) /* E26AF8 802B63E8 080AD978 */ j .L802B65E0 /* E26AFC 802B63EC 00000000 */ nop .L802B63F0: /* E26B00 802B63F0 2462FFF9 */ addiu $v0, $v1, -0x7 .L802B63F4: /* E26B04 802B63F4 2C420002 */ sltiu $v0, $v0, 0x2 /* E26B08 802B63F8 1040001A */ beqz $v0, .L802B6464 /* E26B0C 802B63FC 3C03FFFD */ lui $v1, (0xFFFDFFF7 >> 16) .L802B6400: /* E26B10 802B6400 8E020000 */ lw $v0, 0x0($s0) /* E26B14 802B6404 3463FFF7 */ ori $v1, $v1, (0xFFFDFFF7 & 0xFFFF) /* E26B18 802B6408 00431024 */ and $v0, $v0, $v1 .L802B640C: /* E26B1C 802B640C 0C038C9E */ jal phys_player_land /* E26B20 802B6410 AE020000 */ sw $v0, 0x0($s0) .L802B6414: /* E26B24 802B6414 0000202D */ daddu $a0, $zero, $zero .L802B6418: /* E26B28 802B6418 0080282D */ daddu $a1, $a0, $zero /* E26B2C 802B641C 0C0B2D5B */ jal exec_ShakeCam1 .L802B6420: /* E26B30 802B6420 24060004 */ addiu $a2, $zero, 0x4 .L802B6424: /* E26B34 802B6424 2404014A */ addiu $a0, $zero, 0x14A .L802B6428: /* E26B38 802B6428 0C052736 */ jal sfx_play_sound_at_player .L802B642C: /* E26B3C 802B642C 0000282D */ daddu $a1, $zero, $zero D_802B6430: /* E26B40 802B6430 24040100 */ addiu $a0, $zero, 0x100 /* E26B44 802B6434 0C00A3C2 */ jal start_rumble /* E26B48 802B6438 24050032 */ addiu $a1, $zero, 0x32 /* E26B4C 802B643C 3C048016 */ lui $a0, %hi(gCurrentHiddenPanels) /* E26B50 802B6440 2484A578 */ addiu $a0, $a0, %lo(gCurrentHiddenPanels) /* E26B54 802B6444 C600002C */ lwc1 $f0, 0x2C($s0) .L802B6448: /* E26B58 802B6448 8E030000 */ lw $v1, 0x0($s0) glabel action_update_peach_step_down_land /* E26B5C 802B644C 24020001 */ addiu $v0, $zero, 0x1 .L802B6450: /* E26B60 802B6450 A0820000 */ sb $v0, 0x0($a0) .L802B6454: /* E26B64 802B6454 34630400 */ ori $v1, $v1, 0x400 /* E26B68 802B6458 E4800008 */ swc1 $f0, 0x8($a0) /* E26B6C 802B645C 080AD978 */ j .L802B65E0 .L802B6460: /* E26B70 802B6460 AE030000 */ sw $v1, 0x0($s0) .L802B6464: /* E26B74 802B6464 8FA40010 */ lw $a0, 0x10($sp) /* E26B78 802B6468 0C016F6A */ jal get_collider_flags glabel .L802B646C /* E26B7C 802B646C 00000000 */ nop /* E26B80 802B6470 304300FF */ andi $v1, $v0, 0xFF /* E26B84 802B6474 24020003 */ addiu $v0, $zero, 0x3 glabel action_update_raise_arms /* E26B88 802B6478 1462000E */ bne $v1, $v0, .L802B64B4 glabel action_update_peach_falling /* E26B8C 802B647C 24020002 */ addiu $v0, $zero, 0x2 /* E26B90 802B6480 3C05FFFD */ lui $a1, (0xFFFDFFF7 >> 16) /* E26B94 802B6484 34A5FFF7 */ ori $a1, $a1, (0xFFFDFFF7 & 0xFFFF) /* E26B98 802B6488 24040017 */ addiu $a0, $zero, 0x17 .L802B648C: /* E26B9C 802B648C 8E020000 */ lw $v0, 0x0($s0) .L802B6490: /* E26BA0 802B6490 24030001 */ addiu $v1, $zero, 0x1 .L802B6494: /* E26BA4 802B6494 A20300BF */ sb $v1, 0xBF($s0) /* E26BA8 802B6498 00451024 */ and $v0, $v0, $a1 /* E26BAC 802B649C 0C039769 */ jal set_action_state .L802B64A0: /* E26BB0 802B64A0 AE020000 */ sw $v0, 0x0($s0) /* E26BB4 802B64A4 8E020000 */ lw $v0, 0x0($s0) glabel .L802B64A8 /* E26BB8 802B64A8 34420800 */ ori $v0, $v0, 0x800 .L802B64AC: /* E26BBC 802B64AC 080AD978 */ j .L802B65E0 /* E26BC0 802B64B0 AE020000 */ sw $v0, 0x0($s0) .L802B64B4: /* E26BC4 802B64B4 14620009 */ bne $v1, $v0, .L802B64DC /* E26BC8 802B64B8 0000202D */ daddu $a0, $zero, $zero /* E26BCC 802B64BC 0C039769 */ jal set_action_state /* E26BD0 802B64C0 24040017 */ addiu $a0, $zero, 0x17 .L802B64C4: /* E26BD4 802B64C4 3C03FFFD */ lui $v1, (0xFFFDFFF7 >> 16) /* E26BD8 802B64C8 8E020000 */ lw $v0, 0x0($s0) .L802B64CC: /* E26BDC 802B64CC 3463FFF7 */ ori $v1, $v1, (0xFFFDFFF7 & 0xFFFF) .L802B64D0: /* E26BE0 802B64D0 00431024 */ and $v0, $v0, $v1 .L802B64D4: /* E26BE4 802B64D4 080AD978 */ j .L802B65E0 .L802B64D8: /* E26BE8 802B64D8 AE020000 */ sw $v0, 0x0($s0) glabel .L802B64DC /* E26BEC 802B64DC 0080282D */ daddu $a1, $a0, $zero glabel .L802B64E0 /* E26BF0 802B64E0 24060004 */ addiu $a2, $zero, 0x4 /* E26BF4 802B64E4 24020008 */ addiu $v0, $zero, 0x8 /* E26BF8 802B64E8 A6020008 */ sh $v0, 0x8($s0) .L802B64EC: /* E26BFC 802B64EC 920200B6 */ lbu $v0, 0xB6($s0) glabel .L802B64F0 /* E26C00 802B64F0 24030010 */ addiu $v1, $zero, 0x10 /* E26C04 802B64F4 A60000C0 */ sh $zero, 0xC0($s0) .L802B64F8: /* E26C08 802B64F8 A20300B4 */ sb $v1, 0xB4($s0) /* E26C0C 802B64FC 24420001 */ addiu $v0, $v0, 0x1 /* E26C10 802B6500 0C0B2D5B */ jal exec_ShakeCam1 /* E26C14 802B6504 A20200B6 */ sb $v0, 0xB6($s0) glabel action_update_pushing_block /* E26C18 802B6508 2404014A */ addiu $a0, $zero, 0x14A .L802B650C: /* E26C1C 802B650C 0C052736 */ jal sfx_play_sound_at_player glabel .L802B6510 /* E26C20 802B6510 0000282D */ daddu $a1, $zero, $zero /* E26C24 802B6514 24040100 */ addiu $a0, $zero, 0x100 /* E26C28 802B6518 0C00A3C2 */ jal start_rumble .L802B651C: /* E26C2C 802B651C 24050032 */ addiu $a1, $zero, 0x32 .L802B6520: /* E26C30 802B6520 3C048016 */ lui $a0, %hi(gCurrentHiddenPanels) .L802B6524: /* E26C34 802B6524 2484A578 */ addiu $a0, $a0, %lo(gCurrentHiddenPanels) /* E26C38 802B6528 C600002C */ lwc1 $f0, 0x2C($s0) /* E26C3C 802B652C 8E030000 */ lw $v1, 0x0($s0) .L802B6530: /* E26C40 802B6530 24020001 */ addiu $v0, $zero, 0x1 .L802B6534: /* E26C44 802B6534 A0820000 */ sb $v0, 0x0($a0) /* E26C48 802B6538 34630400 */ ori $v1, $v1, 0x400 /* E26C4C 802B653C E4800008 */ swc1 $f0, 0x8($a0) /* E26C50 802B6540 080AD969 */ j .L802B65A4 glabel .L802B6544 /* E26C54 802B6544 AE030000 */ sw $v1, 0x0($s0) glabel .L802B6548 /* E26C58 802B6548 96020008 */ lhu $v0, 0x8($s0) /* E26C5C 802B654C 2442FFFF */ addiu $v0, $v0, -0x1 glabel func_802B6550 /* E26C60 802B6550 A6020008 */ sh $v0, 0x8($s0) .L802B6554: /* E26C64 802B6554 00021400 */ sll $v0, $v0, 16 /* E26C68 802B6558 14400012 */ bnez $v0, .L802B65A4 /* E26C6C 802B655C 3C02FFFD */ lui $v0, (0xFFFDFFF7 >> 16) /* E26C70 802B6560 3442FFF7 */ ori $v0, $v0, (0xFFFDFFF7 & 0xFFFF) /* E26C74 802B6564 2404000A */ addiu $a0, $zero, 0xA glabel .L802B6568 /* E26C78 802B6568 920300B6 */ lbu $v1, 0xB6($s0) .L802B656C: /* E26C7C 802B656C 8E050000 */ lw $a1, 0x0($s0) .L802B6570: /* E26C80 802B6570 24630001 */ addiu $v1, $v1, 0x1 .L802B6574: /* E26C84 802B6574 00A22824 */ and $a1, $a1, $v0 /* E26C88 802B6578 A20300B6 */ sb $v1, 0xB6($s0) /* E26C8C 802B657C 0C039769 */ jal set_action_state .L802B6580: /* E26C90 802B6580 AE050000 */ sw $a1, 0x0($s0) /* E26C94 802B6584 080AD969 */ j .L802B65A4 /* E26C98 802B6588 00000000 */ nop glabel .L802B658C /* E26C9C 802B658C 0C039769 */ jal set_action_state .L802B6590: /* E26CA0 802B6590 24040007 */ addiu $a0, $zero, 0x7 glabel .L802B6594 /* E26CA4 802B6594 920200B6 */ lbu $v0, 0xB6($s0) .L802B6598: /* E26CA8 802B6598 24420001 */ addiu $v0, $v0, 0x1 .L802B659C: /* E26CAC 802B659C 0C038069 */ jal enable_player_input /* E26CB0 802B65A0 A20200B6 */ sb $v0, 0xB6($s0) glabel .L802B65A4 /* E26CB4 802B65A4 C6020070 */ lwc1 $f2, 0x70($s0) .L802B65A8: /* E26CB8 802B65A8 44800000 */ mtc1 $zero, $f0 /* E26CBC 802B65AC 00000000 */ nop /* E26CC0 802B65B0 4600103C */ c.lt.s $f2, $f0 glabel .L802B65B4 /* E26CC4 802B65B4 00000000 */ nop .L802B65B8: /* E26CC8 802B65B8 45000009 */ bc1f .L802B65E0 /* E26CCC 802B65BC 00000000 */ nop glabel .L802B65C0 /* E26CD0 802B65C0 0C0AD97E */ jal func_802B65F8_E26D08 /* E26CD4 802B65C4 00000000 */ nop /* E26CD8 802B65C8 04400005 */ bltz $v0, .L802B65E0 glabel .L802B65CC /* E26CDC 802B65CC AFA20010 */ sw $v0, 0x10($sp) .L802B65D0: /* E26CE0 802B65D0 97A30012 */ lhu $v1, 0x12($sp) /* E26CE4 802B65D4 2402FFFF */ addiu $v0, $zero, -0x1 /* E26CE8 802B65D8 A6220004 */ sh $v0, 0x4($s1) .L802B65DC: /* E26CEC 802B65DC A6230002 */ sh $v1, 0x2($s1) .L802B65E0: /* E26CF0 802B65E0 8FBF0020 */ lw $ra, 0x20($sp) .L802B65E4: /* E26CF4 802B65E4 8FB1001C */ lw $s1, 0x1C($sp) glabel action_update_walk_peach /* E26CF8 802B65E8 8FB00018 */ lw $s0, 0x18($sp) .L802B65EC: /* E26CFC 802B65EC D7B40028 */ ldc1 $f20, 0x28($sp) .L802B65F0: /* E26D00 802B65F0 03E00008 */ jr $ra /* E26D04 802B65F4 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void action_update_tornado_jump(void) { PlayerStatus* playerStatus = &gPlayerStatus; CollisionStatus* collisionStatus = &gCollisionStatus; f32 cameraRelativeYaw; f32 fallVelocity; s32 surfaceType; f32 spinRate; s32 colliderBelow; u32 entityType; if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED; playerStatus->flags |= (PS_FLAG_SPINNING | PS_FLAG_FLYING | PS_FLAG_JUMPING); phys_clear_spin_history(); playerStatus->actionSubstate = SUBSTATE_ASCEND; playerStatus->currentSpeed = 0.0f; playerStatus->gravityIntegrator[0] = 16.0f; playerStatus->gravityIntegrator[1] = -7.38624f; playerStatus->gravityIntegrator[2] = 3.44694f; playerStatus->gravityIntegrator[3] = -0.75f; suggest_player_anim_always_forward(ANIM_MarioW2_Carried); disable_player_input(); playerStatus->flags |= PS_FLAG_SPECIAL_JUMP; gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y; cameraRelativeYaw = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw); if (cameraRelativeYaw <= 180.0f) { spinRate = 60.0f; } else { spinRate = -60.0f; } playerStatus->spinRate = spinRate; } if (playerStatus->actionSubstate <= SUBSTATE_IMPACT) { if (playerStatus->spinRate >= 0.0f) { playerStatus->spriteFacingAngle += playerStatus->spinRate; if (playerStatus->spriteFacingAngle >= 360.0f) { playerStatus->spriteFacingAngle -= 360.0f; } } else { playerStatus->spriteFacingAngle += playerStatus->spinRate; if (playerStatus->spriteFacingAngle < 0.0f) { playerStatus->spriteFacingAngle += 360.0f; } } } if (playerStatus->gravityIntegrator[0] <= 0.0f) { gSpinHistoryPosY[gSpinHistoryBufferPos] = playerStatus->position.y; } gSpinHistoryPosAngle[gSpinHistoryBufferPos++] = playerStatus->spriteFacingAngle; if (gSpinHistoryBufferPos >= 6) { gSpinHistoryBufferPos = 0; } switch (playerStatus->actionSubstate) { case SUBSTATE_ASCEND: fallVelocity = integrate_gravity(); playerStatus->position.y = player_check_collision_below(fallVelocity, &colliderBelow); if (colliderBelow >= 0 && collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT ) { entityType = get_entity_type(collisionStatus->currentFloor); if (entityType == ENTITY_TYPE_BLUE_SWITCH || entityType == ENTITY_TYPE_RED_SWITCH) { get_entity_by_index(collisionStatus->currentFloor)->collisionFlags |= ENTITY_COLLISION_PLAYER_TOUCH_FLOOR; disable_player_input(); playerStatus->actionSubstate = SUBSTATE_HIT_SWITCH; break; } } if (fallVelocity <= 0.0f) { record_jump_apex(); playerStatus->currentStateTime = 3; playerStatus->flags |= PS_FLAG_FALLING; playerStatus->actionSubstate++; sfx_play_sound_at_player(SOUND_TORNADO_JUMP, SOUND_SPACE_MODE_0); } if (colliderBelow >= 0) { playerStatus->flags &= ~(PS_FLAG_SPINNING | PS_FLAG_FLYING); set_action_state(ACTION_STATE_LAND); } break; case SUBSTATE_HOVER: if (--playerStatus->currentStateTime <= 0) { playerStatus->actionSubstate++; } break; case SUBSTATE_DESCEND: fallVelocity = integrate_gravity(); playerStatus->position.y = player_check_collision_below(fallVelocity, &colliderBelow); if (fallVelocity < -100.0f) { playerStatus->gravityIntegrator[3] = 0.0f; playerStatus->gravityIntegrator[2] = 0.0f; playerStatus->gravityIntegrator[1] = 0.0f; playerStatus->gravityIntegrator[0] = -100.0f; } if (colliderBelow >= 0) { if (collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT) { entityType = get_entity_type(collisionStatus->currentFloor); if (entityType == ENTITY_TYPE_SIMPLE_SPRING || entityType == ENTITY_TYPE_SCRIPT_SPRING) { playerStatus->flags &= ~(PS_FLAG_SPINNING | PS_FLAG_FLYING); set_action_state(ACTION_STATE_LAND); return; } else if (entityType == ENTITY_TYPE_BLUE_SWITCH || entityType == ENTITY_TYPE_RED_SWITCH) { playerStatus->flags &= ~(PS_FLAG_SPINNING | PS_FLAG_FLYING); phys_player_land(); exec_ShakeCam1(0, 0, 4); sfx_play_sound_at_player(SOUND_14A, SOUND_SPACE_MODE_0); start_rumble(256, 50); gCurrentHiddenPanels.tryFlipTrigger = TRUE; gCurrentHiddenPanels.flipTriggerPosY = playerStatus->position.y; playerStatus->flags |= PS_FLAG_SPECIAL_LAND; return; } } surfaceType = get_collider_flags(colliderBelow) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; if (surfaceType == SURFACE_TYPE_LAVA) { playerStatus->hazardType = HAZARD_TYPE_LAVA; playerStatus->flags &= ~(PS_FLAG_SPINNING | PS_FLAG_FLYING); set_action_state(ACTION_STATE_HIT_LAVA); playerStatus->flags |= PS_FLAG_HIT_FIRE; return; } else if (surfaceType == SURFACE_TYPE_SPIKES) { set_action_state(ACTION_STATE_HIT_LAVA); playerStatus->flags &= ~(PS_FLAG_SPINNING | PS_FLAG_FLYING); return; } playerStatus->currentStateTime = 8; playerStatus->timeInAir = 0; playerStatus->actionState = ACTION_STATE_TORNADO_POUND; playerStatus->actionSubstate++; exec_ShakeCam1(0, 0, 4); sfx_play_sound_at_player(SOUND_14A, SOUND_SPACE_MODE_0); start_rumble(256, 50); gCurrentHiddenPanels.tryFlipTrigger = TRUE; gCurrentHiddenPanels.flipTriggerPosY = playerStatus->position.y; playerStatus->flags |= PS_FLAG_SPECIAL_LAND; } break; case SUBSTATE_IMPACT: if (--playerStatus->currentStateTime == 0) { playerStatus->actionSubstate++; playerStatus->flags &= ~(PS_FLAG_SPINNING | PS_FLAG_FLYING); set_action_state(ACTION_STATE_LAND); } 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 (playerStatus->gravityIntegrator[0] < 0.0f) { colliderBelow = get_collider_below_tornado_jump(); if (colliderBelow >= 0) { collisionStatus->lastTouchedFloor = -1; collisionStatus->currentFloor = colliderBelow; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80247B04 /* 1763E4 80247B04 27BDFFD0 */ addiu $sp, $sp, -0x30 jtbl_80247B08: /* 1763E8 80247B08 AFB10014 */ sw $s1, 0x14($sp) /* 1763EC 80247B0C 3C118011 */ lui $s1, %hi(gPlayerData) /* 1763F0 80247B10 2631F290 */ addiu $s1, $s1, %lo(gPlayerData) /* 1763F4 80247B14 AFB40020 */ sw $s4, 0x20($sp) /* 1763F8 80247B18 3C14800E */ lui $s4, %hi(gBattleStatus) /* 1763FC 80247B1C 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) /* 176400 80247B20 AFB3001C */ sw $s3, 0x1C($sp) /* 176404 80247B24 3C13800B */ lui $s3, %hi(gCurrentEncounter) /* 176408 80247B28 26730F10 */ addiu $s3, $s3, %lo(gCurrentEncounter) /* 17640C 80247B2C AFB60028 */ sw $s6, 0x28($sp) /* 176410 80247B30 3C16800E */ lui $s6, %hi(gBattleSubState) /* 176414 80247B34 26D6C4DC */ addiu $s6, $s6, %lo(gBattleSubState) .L80247B38: /* 176418 80247B38 AFB20018 */ sw $s2, 0x18($sp) /* 17641C 80247B3C 24120001 */ addiu $s2, $zero, 0x1 /* 176420 80247B40 AFBF002C */ sw $ra, 0x2C($sp) D_80247B44: /* 176424 80247B44 AFB50024 */ sw $s5, 0x24($sp) /* 176428 80247B48 AFB00010 */ sw $s0, 0x10($sp) /* 17642C 80247B4C 8E9500D8 */ lw $s5, 0xD8($s4) D_80247B50_EE6510: /* 176430 80247B50 8EC30000 */ lw $v1, 0x0($s6) /* 176434 80247B54 8E9000DC */ lw $s0, 0xDC($s4) jtbl_80247B58: /* 176438 80247B58 10720077 */ beq $v1, $s2, .L80247D38 /* 17643C 80247B5C 28620002 */ slti $v0, $v1, 0x2 D_80247B60: /* 176440 80247B60 50400005 */ beql $v0, $zero, .L80247B78 /* 176444 80247B64 24020002 */ addiu $v0, $zero, 0x2 /* 176448 80247B68 10600009 */ beqz $v1, .L80247B90 /* 17644C 80247B6C 00000000 */ nop /* 176450 80247B70 08092032 */ j .L802480C8 /* 176454 80247B74 00000000 */ nop .L80247B78: /* 176458 80247B78 106200A4 */ beq $v1, $v0, .L80247E0C /* 17645C 80247B7C 24020003 */ addiu $v0, $zero, 0x3 D_80247B80: /* 176460 80247B80 10620131 */ beq $v1, $v0, .L80248048 /* 176464 80247B84 0000982D */ daddu $s3, $zero, $zero /* 176468 80247B88 08092032 */ j .L802480C8 /* 17646C 80247B8C 00000000 */ nop .L80247B90: /* 176470 80247B90 3C01802A */ lui $at, %hi(D_8029F254) /* 176474 80247B94 AC20F254 */ sw $zero, %lo(D_8029F254)($at) /* 176478 80247B98 0C0903F7 */ jal func_80240FDC /* 17647C 80247B9C 00000000 */ nop D_80247BA0: /* 176480 80247BA0 9623029C */ lhu $v1, 0x29C($s1) .L80247BA4: /* 176484 80247BA4 2C62270F */ sltiu $v0, $v1, 0x270F /* 176488 80247BA8 10400002 */ beqz $v0, .L80247BB4 /* 17648C 80247BAC 24620001 */ addiu $v0, $v1, 0x1 D_80247BB0_EE6570: /* 176490 80247BB0 A622029C */ sh $v0, 0x29C($s1) .L80247BB4: /* 176494 80247BB4 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) D_80247BB8: /* 176498 80247BB8 8E820004 */ lw $v0, 0x4($s4) /* 17649C 80247BBC 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF) D_80247BC0: /* 1764A0 80247BC0 A2800099 */ sb $zero, 0x99($s4) /* 1764A4 80247BC4 00431824 */ and $v1, $v0, $v1 D_80247BC8: /* 1764A8 80247BC8 30420040 */ andi $v0, $v0, 0x40 D_80247BCC: /* 1764AC 80247BCC 14400023 */ bnez $v0, .L80247C5C D_80247BD0: /* 1764B0 80247BD0 AE830004 */ sw $v1, 0x4($s4) /* 1764B4 80247BD4 82220002 */ lb $v0, 0x2($s1) D_80247BD8: /* 1764B8 80247BD8 28420002 */ slti $v0, $v0, 0x2 /* 1764BC 80247BDC 1040000B */ beqz $v0, .L80247C0C D_80247BE0_EE65A0: /* 1764C0 80247BE0 00000000 */ nop /* 1764C4 80247BE4 0C03A752 */ jal is_ability_active /* 1764C8 80247BE8 24040014 */ addiu $a0, $zero, 0x14 /* 1764CC 80247BEC 10400007 */ beqz $v0, .L80247C0C D_80247BF0: /* 1764D0 80247BF0 3C020800 */ lui $v0, (0x8000000 >> 16) /* 1764D4 80247BF4 8E830004 */ lw $v1, 0x4($s4) D_80247BF8: /* 1764D8 80247BF8 92840099 */ lbu $a0, 0x99($s4) /* 1764DC 80247BFC 00621825 */ or $v1, $v1, $v0 /* 1764E0 80247C00 34840001 */ ori $a0, $a0, 0x1 /* 1764E4 80247C04 AE830004 */ sw $v1, 0x4($s4) /* 1764E8 80247C08 A2840099 */ sb $a0, 0x99($s4) .L80247C0C: /* 1764EC 80247C0C 82220002 */ lb $v0, 0x2($s1) /* 1764F0 80247C10 28420006 */ slti $v0, $v0, 0x6 /* 1764F4 80247C14 10400011 */ beqz $v0, .L80247C5C /* 1764F8 80247C18 00000000 */ nop D_80247C1C: /* 1764FC 80247C1C 0C03A752 */ jal is_ability_active D_80247C20: /* 176500 80247C20 2404001E */ addiu $a0, $zero, 0x1E .L80247C24: /* 176504 80247C24 1040000D */ beqz $v0, .L80247C5C jtbl_80247C28: /* 176508 80247C28 00000000 */ nop .L80247C2C: /* 17650C 80247C2C 92820099 */ lbu $v0, 0x99($s4) /* 176510 80247C30 30420001 */ andi $v0, $v0, 0x1 /* 176514 80247C34 14400009 */ bnez $v0, .L80247C5C /* 176518 80247C38 3C040800 */ lui $a0, (0x8000000 >> 16) D_80247C3C: /* 17651C 80247C3C 3C05800E */ lui $a1, %hi(gBattleStatus) D_80247C40: /* 176520 80247C40 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus) /* 176524 80247C44 8CA20004 */ lw $v0, 0x4($a1) /* 176528 80247C48 92830099 */ lbu $v1, 0x99($s4) /* 17652C 80247C4C 00441025 */ or $v0, $v0, $a0 /* 176530 80247C50 34630002 */ ori $v1, $v1, 0x2 /* 176534 80247C54 ACA20004 */ sw $v0, 0x4($a1) /* 176538 80247C58 A2830099 */ sb $v1, 0x99($s4) .L80247C5C: /* 17653C 80247C5C 82630005 */ lb $v1, 0x5($s3) /* 176540 80247C60 24020004 */ addiu $v0, $zero, 0x4 /* 176544 80247C64 10620013 */ beq $v1, $v0, D_80247CB4 /* 176548 80247C68 28620005 */ slti $v0, $v1, 0x5 /* 17654C 80247C6C 10400005 */ beqz $v0, .L80247C84 /* 176550 80247C70 24020002 */ addiu $v0, $zero, 0x2 /* 176554 80247C74 50620008 */ beql $v1, $v0, .L80247C98 /* 176558 80247C78 A2800178 */ sb $zero, 0x178($s4) .L80247C7C: /* 17655C 80247C7C 08091F38 */ j .L80247CE0 D_80247C80: /* 176560 80247C80 00000000 */ nop .L80247C84: /* 176564 80247C84 24020006 */ addiu $v0, $zero, 0x6 D_80247C88: /* 176568 80247C88 1062010D */ beq $v1, $v0, D_802480C0 /* 17656C 80247C8C 24040003 */ addiu $a0, $zero, 0x3 D_80247C90: /* 176570 80247C90 08091F38 */ j .L80247CE0 D_80247C94: /* 176574 80247C94 00000000 */ nop .L80247C98: /* 176578 80247C98 92620006 */ lbu $v0, 0x6($s3) /* 17657C 80247C9C 2403001D */ addiu $v1, $zero, 0x1D D_80247CA0: /* 176580 80247CA0 A683017C */ sh $v1, 0x17C($s4) /* 176584 80247CA4 3C038009 */ lui $v1, %hi(D_8008F2A8) /* 176588 80247CA8 8C63F2A8 */ lw $v1, %lo(D_8008F2A8)($v1) /* 17658C 80247CAC 08091F35 */ j .L80247CD4 /* 176590 80247CB0 00021600 */ sll $v0, $v0, 24 D_80247CB4: /* 176594 80247CB4 24020001 */ addiu $v0, $zero, 0x1 /* 176598 80247CB8 A2820178 */ sb $v0, 0x178($s4) /* 17659C 80247CBC 92620006 */ lbu $v0, 0x6($s3) .L80247CC0: /* 1765A0 80247CC0 24030006 */ addiu $v1, $zero, 0x6 D_80247CC4: /* 1765A4 80247CC4 A683017C */ sh $v1, 0x17C($s4) /* 1765A8 80247CC8 3C038009 */ lui $v1, %hi(D_8008F0DC) /* 1765AC 80247CCC 8C63F0DC */ lw $v1, %lo(D_8008F0DC)($v1) /* 1765B0 80247CD0 00021600 */ sll $v0, $v0, 24 .L80247CD4: /* 1765B4 80247CD4 00021603 */ sra $v0, $v0, 24 /* 1765B8 80247CD8 A682017A */ sh $v0, 0x17A($s4) /* 1765BC 80247CDC AE830184 */ sw $v1, 0x184($s4) .L80247CE0: /* 1765C0 80247CE0 0C09A75B */ jal get_actor D_80247CE4: /* 1765C4 80247CE4 24040200 */ addiu $a0, $zero, 0x200 /* 1765C8 80247CE8 0040802D */ daddu $s0, $v0, $zero /* 1765CC 80247CEC 8E0201C8 */ lw $v0, 0x1C8($s0) D_80247CF0: /* 1765D0 80247CF0 1040000C */ beqz $v0, .L80247D24 .L80247CF4: /* 1765D4 80247CF4 2405000A */ addiu $a1, $zero, 0xA /* 1765D8 80247CF8 24060020 */ addiu $a2, $zero, 0x20 .L80247CFC: /* 1765DC 80247CFC 0040202D */ daddu $a0, $v0, $zero D_80247D00: /* 1765E0 80247D00 24020038 */ addiu $v0, $zero, 0x38 .L80247D04: /* 1765E4 80247D04 0C0B0CF8 */ jal start_script /* 1765E8 80247D08 A20201F0 */ sb $v0, 0x1F0($s0) D_80247D0C: /* 1765EC 80247D0C 0040202D */ daddu $a0, $v0, $zero D_80247D10: /* 1765F0 80247D10 AE0401D8 */ sw $a0, 0x1D8($s0) glabel func_80247D14 /* 1765F4 80247D14 8C820144 */ lw $v0, 0x144($a0) /* 1765F8 80247D18 86030192 */ lh $v1, 0x192($s0) glabel func_80247D1C /* 1765FC 80247D1C AE0201E8 */ sw $v0, 0x1E8($s0) D_80247D20: /* 176600 80247D20 AC830148 */ sw $v1, 0x148($a0) .L80247D24: /* 176604 80247D24 24020001 */ addiu $v0, $zero, 0x1 /* 176608 80247D28 3C01800E */ lui $at, %hi(gBattleSubState) glabel func_80247D2C /* 17660C 80247D2C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel func_80247D30 /* 176610 80247D30 08092032 */ j .L802480C8 /* 176614 80247D34 00000000 */ nop .L80247D38: /* 176618 80247D38 0C09A75B */ jal get_actor D_80247D3C: /* 17661C 80247D3C 24040200 */ addiu $a0, $zero, 0x200 /* 176620 80247D40 0040802D */ daddu $s0, $v0, $zero .L80247D44: /* 176624 80247D44 8E0201C8 */ lw $v0, 0x1C8($s0) /* 176628 80247D48 10400007 */ beqz $v0, .L80247D68 /* 17662C 80247D4C 02A0202D */ daddu $a0, $s5, $zero /* 176630 80247D50 8E0401E8 */ lw $a0, 0x1E8($s0) /* 176634 80247D54 0C0B1059 */ jal does_script_exist /* 176638 80247D58 00000000 */ nop /* 17663C 80247D5C 144000DA */ bnez $v0, .L802480C8 D_80247D60: /* 176640 80247D60 02A0202D */ daddu $a0, $s5, $zero /* 176644 80247D64 AE0001D8 */ sw $zero, 0x1D8($s0) .L80247D68: /* 176648 80247D68 0C098C8C */ jal func_80263230 /* 17664C 80247D6C 0200282D */ daddu $a1, $s0, $zero /* 176650 80247D70 3C05FFF7 */ lui $a1, (0xFFF7FFFF >> 16) /* 176654 80247D74 34A5FFFF */ ori $a1, $a1, (0xFFF7FFFF & 0xFFFF) /* 176658 80247D78 8E840000 */ lw $a0, 0x0($s4) /* 17665C 80247D7C 2402FFFD */ addiu $v0, $zero, -0x3 .L80247D80: /* 176660 80247D80 00822024 */ and $a0, $a0, $v0 /* 176664 80247D84 8E820004 */ lw $v0, 0x4($s4) /* 176668 80247D88 3C030100 */ lui $v1, (0x1000000 >> 16) /* 17666C 80247D8C A280008C */ sb $zero, 0x8C($s4) D_80247D90: /* 176670 80247D90 A6800180 */ sh $zero, 0x180($s4) /* 176674 80247D94 A280019A */ sb $zero, 0x19A($s4) .L80247D98: /* 176678 80247D98 AE840000 */ sw $a0, 0x0($s4) .L80247D9C: /* 17667C 80247D9C 00852024 */ and $a0, $a0, $a1 /* 176680 80247DA0 AE840000 */ sw $a0, 0x0($s4) .L80247DA4: /* 176684 80247DA4 00431025 */ or $v0, $v0, $v1 /* 176688 80247DA8 0C03A6D5 */ jal increment_status_bar_disabled D_80247DAC: /* 17668C 80247DAC AE820004 */ sw $v0, 0x4($s4) .L80247DB0: /* 176690 80247DB0 0C093903 */ jal func_8024E40C /* 176694 80247DB4 2404000A */ addiu $a0, $zero, 0xA D_80247DB8: /* 176698 80247DB8 0C09390F */ jal func_8024E43C /* 17669C 80247DBC 0000202D */ daddu $a0, $zero, $zero /* 1766A0 80247DC0 0C098F18 */ jal reset_actor_turn_info /* 1766A4 80247DC4 00000000 */ nop /* 1766A8 80247DC8 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase) /* 1766AC 80247DCC 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase) /* 1766B0 80247DD0 2405000A */ addiu $a1, $zero, 0xA /* 1766B4 80247DD4 0000302D */ daddu $a2, $zero, $zero /* 1766B8 80247DD8 0C0B0CF8 */ jal start_script D_80247DDC: /* 1766BC 80247DDC A29201A7 */ sb $s2, 0x1A7($s4) /* 1766C0 80247DE0 0040202D */ daddu $a0, $v0, $zero /* 1766C4 80247DE4 AEA401D4 */ sw $a0, 0x1D4($s5) /* 1766C8 80247DE8 8C830144 */ lw $v1, 0x144($a0) /* 1766CC 80247DEC 24020003 */ addiu $v0, $zero, 0x3 D_80247DF0: /* 1766D0 80247DF0 3C01802A */ lui $at, %hi(D_8029F248) /* 1766D4 80247DF4 AC22F248 */ sw $v0, %lo(D_8029F248)($at) /* 1766D8 80247DF8 24020002 */ addiu $v0, $zero, 0x2 .L80247DFC: /* 1766DC 80247DFC AEC20000 */ sw $v0, 0x0($s6) D_80247E00: /* 1766E0 80247E00 AEA301E4 */ sw $v1, 0x1E4($s5) /* 1766E4 80247E04 08092032 */ j .L802480C8 /* 1766E8 80247E08 AC800148 */ sw $zero, 0x148($a0) .L80247E0C: /* 1766EC 80247E0C 3C03802A */ lui $v1, %hi(D_8029F248) /* 1766F0 80247E10 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) /* 1766F4 80247E14 8C620000 */ lw $v0, 0x0($v1) /* 1766F8 80247E18 10400003 */ beqz $v0, .L80247E28 /* 1766FC 80247E1C 2442FFFF */ addiu $v0, $v0, -0x1 /* 176700 80247E20 08091F8C */ j D_80247E30 /* 176704 80247E24 AC620000 */ sw $v0, 0x0($v1) .L80247E28: /* 176708 80247E28 3C01802A */ lui $at, %hi(D_8029F254) /* 17670C 80247E2C AC32F254 */ sw $s2, %lo(D_8029F254)($at) D_80247E30: /* 176710 80247E30 3C02800E */ lui $v0, %hi(gBattleStatus) D_80247E34: /* 176714 80247E34 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) D_80247E38: /* 176718 80247E38 3C030020 */ lui $v1, (0x200000 >> 16) /* 17671C 80247E3C 00431024 */ and $v0, $v0, $v1 /* 176720 80247E40 1440000A */ bnez $v0, .L80247E6C /* 176724 80247E44 00000000 */ nop /* 176728 80247E48 8EA201D4 */ lw $v0, 0x1D4($s5) /* 17672C 80247E4C 50400007 */ beql $v0, $zero, .L80247E6C /* 176730 80247E50 AEA001D4 */ sw $zero, 0x1D4($s5) /* 176734 80247E54 8EA401E4 */ lw $a0, 0x1E4($s5) /* 176738 80247E58 0C0B1059 */ jal does_script_exist D_80247E5C: /* 17673C 80247E5C 00000000 */ nop /* 176740 80247E60 14400099 */ bnez $v0, .L802480C8 /* 176744 80247E64 00000000 */ nop D_80247E68: /* 176748 80247E68 AEA001D4 */ sw $zero, 0x1D4($s5) .L80247E6C: /* 17674C 80247E6C 3C04800E */ lui $a0, %hi(gBattleStatus) .L80247E70: /* 176750 80247E70 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) D_80247E74: /* 176754 80247E74 8C820000 */ lw $v0, 0x0($a0) /* 176758 80247E78 2403FEFF */ addiu $v1, $zero, -0x101 /* 17675C 80247E7C 00431024 */ and $v0, $v0, $v1 /* 176760 80247E80 AC820000 */ sw $v0, 0x0($a0) /* 176764 80247E84 8EA201D8 */ lw $v0, 0x1D8($s5) /* 176768 80247E88 10400005 */ beqz $v0, .L80247EA0 /* 17676C 80247E8C 00000000 */ nop /* 176770 80247E90 0C0B1059 */ jal does_script_exist /* 176774 80247E94 8EA401E8 */ lw $a0, 0x1E8($s5) /* 176778 80247E98 1440008B */ bnez $v0, .L802480C8 /* 17677C 80247E9C 00000000 */ nop .L80247EA0: /* 176780 80247EA0 1200000A */ beqz $s0, .L80247ECC /* 176784 80247EA4 AEA001D8 */ sw $zero, 0x1D8($s5) /* 176788 80247EA8 8E0201D8 */ lw $v0, 0x1D8($s0) /* 17678C 80247EAC 50400007 */ beql $v0, $zero, .L80247ECC /* 176790 80247EB0 AE0001D8 */ sw $zero, 0x1D8($s0) /* 176794 80247EB4 8E0401E8 */ lw $a0, 0x1E8($s0) /* 176798 80247EB8 0C0B1059 */ jal does_script_exist /* 17679C 80247EBC 00000000 */ nop /* 1767A0 80247EC0 14400081 */ bnez $v0, .L802480C8 /* 1767A4 80247EC4 00000000 */ nop /* 1767A8 80247EC8 AE0001D8 */ sw $zero, 0x1D8($s0) .L80247ECC: /* 1767AC 80247ECC 0000982D */ daddu $s3, $zero, $zero /* 1767B0 80247ED0 0260882D */ daddu $s1, $s3, $zero /* 1767B4 80247ED4 0280902D */ daddu $s2, $s4, $zero .L80247ED8: /* 1767B8 80247ED8 8E5000E0 */ lw $s0, 0xE0($s2) /* 1767BC 80247EDC 5200000B */ beql $s0, $zero, .L80247F0C /* 1767C0 80247EE0 26310001 */ addiu $s1, $s1, 0x1 /* 1767C4 80247EE4 8E0201D4 */ lw $v0, 0x1D4($s0) /* 1767C8 80247EE8 50400008 */ beql $v0, $zero, .L80247F0C /* 1767CC 80247EEC 26310001 */ addiu $s1, $s1, 0x1 /* 1767D0 80247EF0 8E0401E4 */ lw $a0, 0x1E4($s0) /* 1767D4 80247EF4 0C0B1059 */ jal does_script_exist /* 1767D8 80247EF8 00000000 */ nop /* 1767DC 80247EFC 50400002 */ beql $v0, $zero, .L80247F08 /* 1767E0 80247F00 AE0001D4 */ sw $zero, 0x1D4($s0) /* 1767E4 80247F04 24130001 */ addiu $s3, $zero, 0x1 .L80247F08: /* 1767E8 80247F08 26310001 */ addiu $s1, $s1, 0x1 .L80247F0C: /* 1767EC 80247F0C 2A220018 */ slti $v0, $s1, 0x18 /* 1767F0 80247F10 1440FFF1 */ bnez $v0, .L80247ED8 .L80247F14: /* 1767F4 80247F14 26520004 */ addiu $s2, $s2, 0x4 /* 1767F8 80247F18 1660006B */ bnez $s3, .L802480C8 /* 1767FC 80247F1C 0000882D */ daddu $s1, $zero, $zero /* 176800 80247F20 0280902D */ daddu $s2, $s4, $zero .L80247F24: /* 176804 80247F24 8E5000E0 */ lw $s0, 0xE0($s2) /* 176808 80247F28 5200000B */ beql $s0, $zero, .L80247F58 /* 17680C 80247F2C 26310001 */ addiu $s1, $s1, 0x1 .L80247F30: /* 176810 80247F30 8E0201D8 */ lw $v0, 0x1D8($s0) /* 176814 80247F34 50400008 */ beql $v0, $zero, .L80247F58 /* 176818 80247F38 26310001 */ addiu $s1, $s1, 0x1 /* 17681C 80247F3C 8E0401E8 */ lw $a0, 0x1E8($s0) /* 176820 80247F40 0C0B1059 */ jal does_script_exist /* 176824 80247F44 00000000 */ nop /* 176828 80247F48 50400002 */ beql $v0, $zero, .L80247F54 /* 17682C 80247F4C AE0001D8 */ sw $zero, 0x1D8($s0) /* 176830 80247F50 24130001 */ addiu $s3, $zero, 0x1 .L80247F54: /* 176834 80247F54 26310001 */ addiu $s1, $s1, 0x1 .L80247F58: /* 176838 80247F58 2A220018 */ slti $v0, $s1, 0x18 /* 17683C 80247F5C 1440FFF1 */ bnez $v0, .L80247F24 /* 176840 80247F60 26520004 */ addiu $s2, $s2, 0x4 /* 176844 80247F64 16600058 */ bnez $s3, .L802480C8 /* 176848 80247F68 0000882D */ daddu $s1, $zero, $zero /* 17684C 80247F6C 3C04FFF7 */ lui $a0, (0xFFF7FFFF >> 16) D_80247F70: /* 176850 80247F70 3484FFFF */ ori $a0, $a0, (0xFFF7FFFF & 0xFFFF) /* 176854 80247F74 0280182D */ daddu $v1, $s4, $zero .L80247F78: /* 176858 80247F78 8C7000E0 */ lw $s0, 0xE0($v1) /* 17685C 80247F7C 12000004 */ beqz $s0, .L80247F90 .L80247F80: /* 176860 80247F80 26310001 */ addiu $s1, $s1, 0x1 /* 176864 80247F84 8E020000 */ lw $v0, 0x0($s0) D_80247F88: /* 176868 80247F88 00441024 */ and $v0, $v0, $a0 /* 17686C 80247F8C AE020000 */ sw $v0, 0x0($s0) .L80247F90: /* 176870 80247F90 2A220018 */ slti $v0, $s1, 0x18 .L80247F94: /* 176874 80247F94 1440FFF8 */ bnez $v0, .L80247F78 .L80247F98: /* 176878 80247F98 24630004 */ addiu $v1, $v1, 0x4 /* 17687C 80247F9C 8282008C */ lb $v0, 0x8C($s4) /* 176880 80247FA0 14400049 */ bnez $v0, .L802480C8 .L80247FA4: /* 176884 80247FA4 00000000 */ nop /* 176888 80247FA8 0C03A6CC */ jal decrement_status_bar_disabled D_80247FAC: /* 17688C 80247FAC 00000000 */ nop /* 176890 80247FB0 3C028007 */ lui $v0, %hi(gGameStatusPtr) .L80247FB4: /* 176894 80247FB4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 176898 80247FB8 904200AA */ lbu $v0, 0xAA($v0) /* 17689C 80247FBC 30420001 */ andi $v0, $v0, 0x1 /* 1768A0 80247FC0 1440003F */ bnez $v0, D_802480C0 /* 1768A4 80247FC4 24040023 */ addiu $a0, $zero, 0x23 /* 1768A8 80247FC8 0C098D19 */ jal btl_check_player_defeated D_80247FCC: /* 1768AC 80247FCC 00000000 */ nop glabel func_80247FD0 /* 1768B0 80247FD0 1440003D */ bnez $v0, .L802480C8 /* 1768B4 80247FD4 00000000 */ nop /* 1768B8 80247FD8 0C098D0D */ jal btl_check_enemies_defeated /* 1768BC 80247FDC 00000000 */ nop /* 1768C0 80247FE0 14400039 */ bnez $v0, .L802480C8 /* 1768C4 80247FE4 00000000 */ nop /* 1768C8 80247FE8 0C09A75B */ jal get_actor .L80247FEC: /* 1768CC 80247FEC 86A40428 */ lh $a0, 0x428($s5) D_80247FF0: /* 1768D0 80247FF0 0040802D */ daddu $s0, $v0, $zero /* 1768D4 80247FF4 12000010 */ beqz $s0, .L80248038 /* 1768D8 80247FF8 24020003 */ addiu $v0, $zero, 0x3 /* 1768DC 80247FFC 8E0201C8 */ lw $v0, 0x1C8($s0) /* 1768E0 80248000 1040000C */ beqz $v0, .L80248034 D_80248004: /* 1768E4 80248004 2405000A */ addiu $a1, $zero, 0xA /* 1768E8 80248008 24060020 */ addiu $a2, $zero, 0x20 /* 1768EC 8024800C 0040202D */ daddu $a0, $v0, $zero /* 1768F0 80248010 24020035 */ addiu $v0, $zero, 0x35 /* 1768F4 80248014 0C0B0CF8 */ jal start_script /* 1768F8 80248018 A20201F0 */ sb $v0, 0x1F0($s0) D_8024801C: /* 1768FC 8024801C 0040202D */ daddu $a0, $v0, $zero /* 176900 80248020 AE0401D8 */ sw $a0, 0x1D8($s0) glabel func_80248024 /* 176904 80248024 8C820144 */ lw $v0, 0x144($a0) /* 176908 80248028 86030192 */ lh $v1, 0x192($s0) /* 17690C 8024802C AE0201E8 */ sw $v0, 0x1E8($s0) /* 176910 80248030 AC830148 */ sw $v1, 0x148($a0) .L80248034: /* 176914 80248034 24020003 */ addiu $v0, $zero, 0x3 .L80248038: /* 176918 80248038 3C01800E */ lui $at, %hi(gBattleSubState) D_8024803C: /* 17691C 8024803C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80248040: /* 176920 80248040 08092032 */ j .L802480C8 /* 176924 80248044 00000000 */ nop .L80248048: /* 176928 80248048 0260882D */ daddu $s1, $s3, $zero /* 17692C 8024804C 0280902D */ daddu $s2, $s4, $zero .L80248050: /* 176930 80248050 8E5000E0 */ lw $s0, 0xE0($s2) D_80248054: /* 176934 80248054 5200000B */ beql $s0, $zero, .L80248084 /* 176938 80248058 26310001 */ addiu $s1, $s1, 0x1 /* 17693C 8024805C 8E0201D8 */ lw $v0, 0x1D8($s0) /* 176940 80248060 50400008 */ beql $v0, $zero, .L80248084 .L80248064: /* 176944 80248064 26310001 */ addiu $s1, $s1, 0x1 D_80248068: /* 176948 80248068 8E0401E8 */ lw $a0, 0x1E8($s0) /* 17694C 8024806C 0C0B1059 */ jal does_script_exist D_80248070: /* 176950 80248070 00000000 */ nop D_80248074: /* 176954 80248074 50400002 */ beql $v0, $zero, D_80248080 /* 176958 80248078 AE0001D8 */ sw $zero, 0x1D8($s0) .L8024807C: /* 17695C 8024807C 24130001 */ addiu $s3, $zero, 0x1 D_80248080: /* 176960 80248080 26310001 */ addiu $s1, $s1, 0x1 .L80248084: /* 176964 80248084 2A220018 */ slti $v0, $s1, 0x18 D_80248088: /* 176968 80248088 1440FFF1 */ bnez $v0, .L80248050 .L8024808C: /* 17696C 8024808C 26520004 */ addiu $s2, $s2, 0x4 D_80248090: /* 176970 80248090 1660000D */ bnez $s3, .L802480C8 /* 176974 80248094 00000000 */ nop /* 176978 80248098 8EA201D4 */ lw $v0, 0x1D4($s5) /* 17697C 8024809C 50400007 */ beql $v0, $zero, .L802480BC /* 176980 802480A0 AEA001D4 */ sw $zero, 0x1D4($s5) /* 176984 802480A4 8EA401E4 */ lw $a0, 0x1E4($s5) /* 176988 802480A8 0C0B1059 */ jal does_script_exist D_802480AC: /* 17698C 802480AC 00000000 */ nop /* 176990 802480B0 14400005 */ bnez $v0, .L802480C8 /* 176994 802480B4 00000000 */ nop /* 176998 802480B8 AEA001D4 */ sw $zero, 0x1D4($s5) .L802480BC: /* 17699C 802480BC 24040005 */ addiu $a0, $zero, 0x5 D_802480C0: /* 1769A0 802480C0 0C090464 */ jal func_80241190 /* 1769A4 802480C4 00000000 */ nop .L802480C8: /* 1769A8 802480C8 8FBF002C */ lw $ra, 0x2C($sp) /* 1769AC 802480CC 8FB60028 */ lw $s6, 0x28($sp) /* 1769B0 802480D0 8FB50024 */ lw $s5, 0x24($sp) /* 1769B4 802480D4 8FB40020 */ lw $s4, 0x20($sp) /* 1769B8 802480D8 8FB3001C */ lw $s3, 0x1C($sp) /* 1769BC 802480DC 8FB20018 */ lw $s2, 0x18($sp) D_802480E0: /* 1769C0 802480E0 8FB10014 */ lw $s1, 0x14($sp) /* 1769C4 802480E4 8FB00010 */ lw $s0, 0x10($sp) /* 1769C8 802480E8 03E00008 */ jr $ra D_802480EC: /* 1769CC 802480EC 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_first_strike(void) { PlayerData* playerData = &gPlayerData; BattleStatus* battleStatus = &gBattleStatus; EncounterStatus* encounterStatus = &gCurrentEncounter; Actor* player = gBattleStatus.playerActor; Actor* partner = gBattleStatus.partnerActor; Evt* script; Actor* enemy; s32 enemyNotDone; s32 i; switch (gBattleSubState) { case BTL_SUBSTATE_FIRST_STRIKE_INIT: D_8029F254 = 0; btl_merlee_on_first_strike(); if (playerData->playerFirstStrikes < 9999) { playerData->playerFirstStrikes++; } // 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; } } } // setup dummy 'menu selection' for player move switch (encounterStatus->hitType) { case ENCOUNTER_TRIGGER_JUMP: battleStatus->moveCategory = BTL_MENU_TYPE_JUMP; battleStatus->selectedMoveID = MOVE_UNUSED_JUMP4; battleStatus->moveArgument = encounterStatus->hitTier; battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_JUMP4].flags; break; case ENCOUNTER_TRIGGER_HAMMER: battleStatus->moveCategory = BTL_MENU_TYPE_SMASH; battleStatus->selectedMoveID = MOVE_UNUSED_HAMMER4; battleStatus->moveArgument = encounterStatus->hitTier; battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_HAMMER4].flags; break; case ENCOUNTER_TRIGGER_PARTNER: btl_set_state(BATTLE_STATE_PARTNER_FIRST_STRIKE); return; } // let the enemy know a first strike is coming enemy = get_actor(ACTOR_ENEMY0); if (enemy->handleEventSource != NULL) { enemy->lastEventType = EVENT_BEGIN_FIRST_STRIKE; script = start_script(enemy->handleEventSource, EVT_PRIORITY_A, EVT_FLAG_RUN_IMMEDIATELY); enemy->handleEventScript = script; enemy->handleEventScriptID = script->id; script->owner1.actorID = enemy->actorID; } gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_READY; break; case BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_READY: enemy = get_actor(ACTOR_ENEMY0); if (enemy->handleEventSource != NULL) { if (does_script_exist(enemy->handleEventScriptID)) { break; } else { enemy->handleEventScript = NULL; } } func_80263230(player, enemy); battleStatus->stateFreezeCount = 0; battleStatus->lastAttackDamage = 0; battleStatus->currentDamageSource = DMG_SRC_DEFAULT; gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN; gBattleStatus.flags2 |= BS_FLAGS2_1000000; gBattleStatus.flags1 &= ~BS_FLAGS1_PARTNER_ACTING; increment_status_bar_disabled(); btl_cam_use_preset(BTL_CAM_PRESET_10); btl_cam_target_actor(ACTOR_PLAYER); reset_actor_turn_info(); // begin the partner turn script battleStatus->battlePhase = PHASE_FIRST_STRIKE; script = start_script(&EVS_Mario_HandlePhase, EVT_PRIORITY_A, 0); player->takeTurnScript = script; player->takeTurnScriptID = script->id; script->owner1.actorID = ACTOR_PLAYER; D_8029F248 = 3; gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_AWAIT_SCRIPTS; break; case BTL_SUBSTATE_FIRST_STRIKE_AWAIT_SCRIPTS: if (D_8029F248 != 0) { D_8029F248--; } else { D_8029F254 = 1; } // wait for player move script 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 handle event script if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) { break; } player->handleEventScript = NULL; // wait for partner handle event script if (partner != NULL) { if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) { break; } partner->handleEventScript = NULL; } // wait for all enemy turn scripts enemyNotDone = FALSE; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->takeTurnScript != NULL) { if (does_script_exist(enemy->takeTurnScriptID)) { enemyNotDone = TRUE; } else { enemy->takeTurnScript = NULL; } } } if (enemyNotDone) { break; } // wait for all enemy handle event scripts enemyNotDone = FALSE; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->handleEventScript != NULL) { if (does_script_exist(enemy->handleEventScriptID)) { enemyNotDone = TRUE; } else { enemy->handleEventScript = NULL; } } } if (enemyNotDone) { break; } for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL) { enemy->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN; } } if (battleStatus->stateFreezeCount == 0) { decrement_status_bar_disabled(); if (!(gGameStatusPtr->demoFlags & 1)) { Actor* target; if (btl_check_player_defeated() || btl_check_enemies_defeated()) { return; } target = get_actor(player->targetActorID); if (target != NULL) { if (target->handleEventSource != NULL) { target->lastEventType = EVENT_END_FIRST_STRIKE; script = start_script(target->handleEventSource, EVT_PRIORITY_A, EVT_FLAG_RUN_IMMEDIATELY); target->handleEventScript = script; target->handleEventScriptID = script->id; script->owner1.actorID = target->actorID; } } gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_DONE; } else { btl_set_state(BATTLE_STATE_END_DEMO_BATTLE); } } break; case BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_DONE: enemyNotDone = FALSE; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->handleEventScript != NULL) { if (does_script_exist(enemy->handleEventScriptID)) { enemyNotDone = TRUE; } else { enemy->handleEventScript = NULL; } } } if (enemyNotDone) { break; } if (player->takeTurnScript == NULL || !does_script_exist(player->takeTurnScriptID)) { player->takeTurnScript = NULL; btl_set_state(BATTLE_STATE_BEGIN_TURN); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel hieroglyphs_appendGfx /* 3DC528 E00E2218 27BDFF18 */ addiu $sp, $sp, -0xE8 /* 3DC52C E00E221C 0080302D */ daddu $a2, $a0, $zero /* 3DC530 E00E2220 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3DC534 E00E2224 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3DC538 E00E2228 27A40020 */ addiu $a0, $sp, 0x20 /* 3DC53C E00E222C AFB300BC */ sw $s3, 0xBC($sp) /* 3DC540 E00E2230 3C130001 */ lui $s3, (0x11630 >> 16) /* 3DC544 E00E2234 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 3DC548 E00E2238 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos) /* 3DC54C E00E223C AFB700CC */ sw $s7, 0xCC($sp) /* 3DC550 E00E2240 0040B82D */ daddu $s7, $v0, $zero /* 3DC554 E00E2244 3C0F0001 */ lui $t7, (0x11630 >> 16) /* 3DC558 E00E2248 35EF1630 */ ori $t7, $t7, (0x11630 & 0xFFFF) /* 3DC55C E00E224C 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3DC560 E00E2250 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3DC564 E00E2254 AFB600C8 */ sw $s6, 0xC8($sp) /* 3DC568 E00E2258 0040B02D */ daddu $s6, $v0, $zero /* 3DC56C E00E225C AFBF00D4 */ sw $ra, 0xD4($sp) /* 3DC570 E00E2260 AFBE00D0 */ sw $fp, 0xD0($sp) /* 3DC574 E00E2264 AFB500C4 */ sw $s5, 0xC4($sp) /* 3DC578 E00E2268 AFB400C0 */ sw $s4, 0xC0($sp) /* 3DC57C E00E226C AFB200B8 */ sw $s2, 0xB8($sp) /* 3DC580 E00E2270 AFB100B4 */ sw $s1, 0xB4($sp) /* 3DC584 E00E2274 AFB000B0 */ sw $s0, 0xB0($sp) /* 3DC588 E00E2278 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 3DC58C E00E227C F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 3DC590 E00E2280 AFAF00A8 */ sw $t7, 0xA8($sp) /* 3DC594 E00E2284 8EC50000 */ lw $a1, 0x0($s6) /* 3DC598 E00E2288 8CD5000C */ lw $s5, 0xC($a2) /* 3DC59C E00E228C 00A0182D */ daddu $v1, $a1, $zero /* 3DC5A0 E00E2290 24A50008 */ addiu $a1, $a1, 0x8 /* 3DC5A4 E00E2294 AEC50000 */ sw $a1, 0x0($s6) /* 3DC5A8 E00E2298 8EAF0014 */ lw $t7, 0x14($s5) /* 3DC5AC E00E229C 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3DC5B0 E00E22A0 AFAF00A0 */ sw $t7, 0xA0($sp) /* 3DC5B4 E00E22A4 8EB10024 */ lw $s1, 0x24($s5) /* 3DC5B8 E00E22A8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3DC5BC E00E22AC AC620000 */ sw $v0, 0x0($v1) /* 3DC5C0 E00E22B0 AC600004 */ sw $zero, 0x4($v1) /* 3DC5C4 E00E22B4 ACA70000 */ sw $a3, 0x0($a1) /* 3DC5C8 E00E22B8 8CC30010 */ lw $v1, 0x10($a2) /* 3DC5CC E00E22BC 24A20008 */ addiu $v0, $a1, 0x8 /* 3DC5D0 E00E22C0 AEC20000 */ sw $v0, 0x0($s6) /* 3DC5D4 E00E22C4 8C62001C */ lw $v0, 0x1C($v1) /* 3DC5D8 E00E22C8 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3DC5DC E00E22CC 00431021 */ addu $v0, $v0, $v1 /* 3DC5E0 E00E22D0 3C03800B */ lui $v1, %hi(gCameras) /* 3DC5E4 E00E22D4 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3DC5E8 E00E22D8 ACA20004 */ sw $v0, 0x4($a1) /* 3DC5EC E00E22DC 8EA50004 */ lw $a1, 0x4($s5) /* 3DC5F0 E00E22E0 8EA60008 */ lw $a2, 0x8($s5) /* 3DC5F4 E00E22E4 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3DC5F8 E00E22E8 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3DC5FC E00E22EC 8EA7000C */ lw $a3, 0xC($s5) /* 3DC600 E00E22F0 00028080 */ sll $s0, $v0, 2 /* 3DC604 E00E22F4 02028021 */ addu $s0, $s0, $v0 /* 3DC608 E00E22F8 00108080 */ sll $s0, $s0, 2 /* 3DC60C E00E22FC 02028023 */ subu $s0, $s0, $v0 /* 3DC610 E00E2300 001010C0 */ sll $v0, $s0, 3 /* 3DC614 E00E2304 02028021 */ addu $s0, $s0, $v0 /* 3DC618 E00E2308 001080C0 */ sll $s0, $s0, 3 /* 3DC61C E00E230C 0C080108 */ jal shim_guTranslateF /* 3DC620 E00E2310 02038021 */ addu $s0, $s0, $v1 /* 3DC624 E00E2314 27B20060 */ addiu $s2, $sp, 0x60 /* 3DC628 E00E2318 8EA50038 */ lw $a1, 0x38($s5) /* 3DC62C E00E231C 0240202D */ daddu $a0, $s2, $zero /* 3DC630 E00E2320 00A0302D */ daddu $a2, $a1, $zero /* 3DC634 E00E2324 0C080110 */ jal shim_guScaleF /* 3DC638 E00E2328 00A0382D */ daddu $a3, $a1, $zero /* 3DC63C E00E232C 0240202D */ daddu $a0, $s2, $zero /* 3DC640 E00E2330 27A50020 */ addiu $a1, $sp, 0x20 /* 3DC644 E00E2334 0C080114 */ jal shim_guMtxCatF /* 3DC648 E00E2338 00A0302D */ daddu $a2, $a1, $zero /* 3DC64C E00E233C 27A40020 */ addiu $a0, $sp, 0x20 /* 3DC650 E00E2340 96E50000 */ lhu $a1, 0x0($s7) /* 3DC654 E00E2344 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3DC658 E00E2348 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3DC65C E00E234C 00052980 */ sll $a1, $a1, 6 /* 3DC660 E00E2350 00B32821 */ addu $a1, $a1, $s3 /* 3DC664 E00E2354 0C080118 */ jal shim_guMtxF2L /* 3DC668 E00E2358 00452821 */ addu $a1, $v0, $a1 /* 3DC66C E00E235C 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3DC670 E00E2360 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3DC674 E00E2364 3C0ADA38 */ lui $t2, (0xDA380001 >> 16) /* 3DC678 E00E2368 354A0001 */ ori $t2, $t2, (0xDA380001 & 0xFFFF) /* 3DC67C E00E236C 27A40020 */ addiu $a0, $sp, 0x20 /* 3DC680 E00E2370 323100FF */ andi $s1, $s1, 0xFF /* 3DC684 E00E2374 8EC80000 */ lw $t0, 0x0($s6) /* 3DC688 E00E2378 3C0541A0 */ lui $a1, (0x41A00000 >> 16) /* 3DC68C E00E237C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3DC690 E00E2380 4481B000 */ mtc1 $at, $f22 /* 3DC694 E00E2384 4480A000 */ mtc1 $zero, $f20 /* 3DC698 E00E2388 96E20000 */ lhu $v0, 0x0($s7) /* 3DC69C E00E238C 0100482D */ daddu $t1, $t0, $zero /* 3DC6A0 E00E2390 25080008 */ addiu $t0, $t0, 0x8 /* 3DC6A4 E00E2394 AEC80000 */ sw $t0, 0x0($s6) /* 3DC6A8 E00E2398 AD230000 */ sw $v1, 0x0($t1) /* 3DC6AC E00E239C 24430001 */ addiu $v1, $v0, 0x1 /* 3DC6B0 E00E23A0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3DC6B4 E00E23A4 00021180 */ sll $v0, $v0, 6 /* 3DC6B8 E00E23A8 4406B000 */ mfc1 $a2, $f22 /* 3DC6BC E00E23AC 00531021 */ addu $v0, $v0, $s3 /* 3DC6C0 E00E23B0 A6E30000 */ sh $v1, 0x0($s7) /* 3DC6C4 E00E23B4 3C03800A */ lui $v1, %hi(gDisplayContext) /* 3DC6C8 E00E23B8 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 3DC6CC E00E23BC 4407A000 */ mfc1 $a3, $f20 /* 3DC6D0 E00E23C0 00621821 */ addu $v1, $v1, $v0 /* 3DC6D4 E00E23C4 25020008 */ addiu $v0, $t0, 0x8 /* 3DC6D8 E00E23C8 AD230004 */ sw $v1, 0x4($t1) /* 3DC6DC E00E23CC AEC20000 */ sw $v0, 0x0($s6) /* 3DC6E0 E00E23D0 25020010 */ addiu $v0, $t0, 0x10 /* 3DC6E4 E00E23D4 AD0A0000 */ sw $t2, 0x0($t0) /* 3DC6E8 E00E23D8 AEC20000 */ sw $v0, 0x0($s6) /* 3DC6EC E00E23DC 8E030204 */ lw $v1, 0x204($s0) /* 3DC6F0 E00E23E0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3DC6F4 E00E23E4 AD020008 */ sw $v0, 0x8($t0) /* 3DC6F8 E00E23E8 AD030004 */ sw $v1, 0x4($t0) /* 3DC6FC E00E23EC 92A2001B */ lbu $v0, 0x1B($s5) /* 3DC700 E00E23F0 92A9001F */ lbu $t1, 0x1F($s5) /* 3DC704 E00E23F4 92AA0023 */ lbu $t2, 0x23($s5) /* 3DC708 E00E23F8 25030018 */ addiu $v1, $t0, 0x18 /* 3DC70C E00E23FC AEC30000 */ sw $v1, 0x0($s6) /* 3DC710 E00E2400 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3DC714 E00E2404 AD030010 */ sw $v1, 0x10($t0) /* 3DC718 E00E2408 00021600 */ sll $v0, $v0, 24 /* 3DC71C E00E240C 00094C00 */ sll $t1, $t1, 16 /* 3DC720 E00E2410 00491025 */ or $v0, $v0, $t1 /* 3DC724 E00E2414 000A5200 */ sll $t2, $t2, 8 /* 3DC728 E00E2418 004A1025 */ or $v0, $v0, $t2 /* 3DC72C E00E241C 00511025 */ or $v0, $v0, $s1 /* 3DC730 E00E2420 AD02000C */ sw $v0, 0xC($t0) /* 3DC734 E00E2424 92A3002B */ lbu $v1, 0x2B($s5) /* 3DC738 E00E2428 92A9002F */ lbu $t1, 0x2F($s5) /* 3DC73C E00E242C 92AA0033 */ lbu $t2, 0x33($s5) /* 3DC740 E00E2430 92AB0037 */ lbu $t3, 0x37($s5) /* 3DC744 E00E2434 25020020 */ addiu $v0, $t0, 0x20 /* 3DC748 E00E2438 AEC20000 */ sw $v0, 0x0($s6) /* 3DC74C E00E243C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3DC750 E00E2440 AD020018 */ sw $v0, 0x18($t0) /* 3DC754 E00E2444 25020030 */ addiu $v0, $t0, 0x30 /* 3DC758 E00E2448 AEC20000 */ sw $v0, 0x0($s6) /* 3DC75C E00E244C 00031E00 */ sll $v1, $v1, 24 /* 3DC760 E00E2450 00094C00 */ sll $t1, $t1, 16 /* 3DC764 E00E2454 00691825 */ or $v1, $v1, $t1 /* 3DC768 E00E2458 000A5200 */ sll $t2, $t2, 8 /* 3DC76C E00E245C 006A1825 */ or $v1, $v1, $t2 /* 3DC770 E00E2460 006B1825 */ or $v1, $v1, $t3 /* 3DC774 E00E2464 AD030014 */ sw $v1, 0x14($t0) /* 3DC778 E00E2468 3C09E00E */ lui $t1, (0xE00E29F0 >> 16) /* 3DC77C E00E246C 8D2929F0 */ lw $t1, (0xE00E29F0 & 0xFFFF)($t1) /* 3DC780 E00E2470 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3DC784 E00E2474 AD020020 */ sw $v0, 0x20($t0) /* 3DC788 E00E2478 250201C0 */ addiu $v0, $t0, 0x1C0 /* 3DC78C E00E247C AD020024 */ sw $v0, 0x24($t0) /* 3DC790 E00E2480 8FAF00A0 */ lw $t7, 0xA0($sp) /* 3DC794 E00E2484 3C03F200 */ lui $v1, (0xF2000000 >> 16) /* 3DC798 E00E2488 000F80C0 */ sll $s0, $t7, 3 /* 3DC79C E00E248C 32020FFF */ andi $v0, $s0, 0xFFF /* 3DC7A0 E00E2490 00021300 */ sll $v0, $v0, 12 /* 3DC7A4 E00E2494 00431025 */ or $v0, $v0, $v1 /* 3DC7A8 E00E2498 AD020028 */ sw $v0, 0x28($t0) /* 3DC7AC E00E249C 0200102D */ daddu $v0, $s0, $zero /* 3DC7B0 E00E24A0 244201FC */ addiu $v0, $v0, 0x1FC /* 3DC7B4 E00E24A4 30420FFF */ andi $v0, $v0, 0xFFF /* 3DC7B8 E00E24A8 00021300 */ sll $v0, $v0, 12 /* 3DC7BC E00E24AC 3442007C */ ori $v0, $v0, 0x7C /* 3DC7C0 E00E24B0 AD02002C */ sw $v0, 0x2C($t0) /* 3DC7C4 E00E24B4 AD09001C */ sw $t1, 0x1C($t0) /* 3DC7C8 E00E24B8 25080028 */ addiu $t0, $t0, 0x28 /* 3DC7CC E00E24BC E7B40010 */ swc1 $f20, 0x10($sp) /* 3DC7D0 E00E24C0 0C080104 */ jal shim_guRotateF /* 3DC7D4 E00E24C4 AFA800A4 */ sw $t0, 0xA4($sp) /* 3DC7D8 E00E24C8 3C01E00E */ lui $at, (0xE00E2A30 >> 16) /* 3DC7DC E00E24CC D4202A30 */ ldc1 $f0, (0xE00E2A30 & 0xFFFF)($at) /* 3DC7E0 E00E24D0 44906000 */ mtc1 $s0, $f12 /* 3DC7E4 E00E24D4 00000000 */ nop /* 3DC7E8 E00E24D8 46806321 */ cvt.d.w $f12, $f12 /* 3DC7EC E00E24DC 46206300 */ add.d $f12, $f12, $f0 /* 3DC7F0 E00E24E0 0000A02D */ daddu $s4, $zero, $zero /* 3DC7F4 E00E24E4 0C080140 */ jal shim_sin_deg /* 3DC7F8 E00E24E8 46206320 */ cvt.s.d $f12, $f12 /* 3DC7FC E00E24EC 3C01C1F0 */ lui $at, (0xC1F00000 >> 16) /* 3DC800 E00E24F0 44811000 */ mtc1 $at, $f2 /* 3DC804 E00E24F4 3C1E0900 */ lui $fp, %hi(D_090010A8_40E338) /* 3DC808 E00E24F8 27DE10A8 */ addiu $fp, $fp, %lo(D_090010A8_40E338) /* 3DC80C E00E24FC 46020002 */ mul.s $f0, $f0, $f2 /* 3DC810 E00E2500 00000000 */ nop /* 3DC814 E00E2504 24110002 */ addiu $s1, $zero, 0x2 /* 3DC818 E00E2508 4405A000 */ mfc1 $a1, $f20 /* 3DC81C E00E250C 4407A000 */ mfc1 $a3, $f20 /* 3DC820 E00E2510 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 3DC824 E00E2514 44812000 */ mtc1 $at, $f4 /* 3DC828 E00E2518 44060000 */ mfc1 $a2, $f0 /* 3DC82C E00E251C 0240202D */ daddu $a0, $s2, $zero /* 3DC830 E00E2520 E7B60010 */ swc1 $f22, 0x10($sp) /* 3DC834 E00E2524 E7B40018 */ swc1 $f20, 0x18($sp) /* 3DC838 E00E2528 E7B4001C */ swc1 $f20, 0x1C($sp) /* 3DC83C E00E252C 0C080180 */ jal shim_guPositionF /* 3DC840 E00E2530 E7A40014 */ swc1 $f4, 0x14($sp) /* 3DC844 E00E2534 0240202D */ daddu $a0, $s2, $zero /* 3DC848 E00E2538 27A50020 */ addiu $a1, $sp, 0x20 /* 3DC84C E00E253C 0C080114 */ jal shim_guMtxCatF /* 3DC850 E00E2540 00A0302D */ daddu $a2, $a1, $zero /* 3DC854 E00E2544 27A40020 */ addiu $a0, $sp, 0x20 /* 3DC858 E00E2548 96E50000 */ lhu $a1, 0x0($s7) /* 3DC85C E00E254C 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3DC860 E00E2550 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3DC864 E00E2554 00052980 */ sll $a1, $a1, 6 /* 3DC868 E00E2558 00B32821 */ addu $a1, $a1, $s3 /* 3DC86C E00E255C 0C080118 */ jal shim_guMtxF2L /* 3DC870 E00E2560 00452821 */ addu $a1, $v0, $a1 /* 3DC874 E00E2564 8EC20000 */ lw $v0, 0x0($s6) /* 3DC878 E00E2568 0280802D */ daddu $s0, $s4, $zero /* 3DC87C E00E256C 0040202D */ daddu $a0, $v0, $zero /* 3DC880 E00E2570 24420008 */ addiu $v0, $v0, 0x8 /* 3DC884 E00E2574 AEC20000 */ sw $v0, 0x0($s6) /* 3DC888 E00E2578 96E20000 */ lhu $v0, 0x0($s7) /* 3DC88C E00E257C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3DC890 E00E2580 AC830000 */ sw $v1, 0x0($a0) /* 3DC894 E00E2584 24430001 */ addiu $v1, $v0, 0x1 /* 3DC898 E00E2588 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3DC89C E00E258C 00021180 */ sll $v0, $v0, 6 /* 3DC8A0 E00E2590 A6E30000 */ sh $v1, 0x0($s7) /* 3DC8A4 E00E2594 3C03800A */ lui $v1, %hi(gDisplayContext) /* 3DC8A8 E00E2598 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 3DC8AC E00E259C 00531021 */ addu $v0, $v0, $s3 /* 3DC8B0 E00E25A0 00621821 */ addu $v1, $v1, $v0 /* 3DC8B4 E00E25A4 AC830004 */ sw $v1, 0x4($a0) .LE00E25A8: /* 3DC8B8 E00E25A8 8FAF00A0 */ lw $t7, 0xA0($sp) /* 3DC8BC E00E25AC 000F10C0 */ sll $v0, $t7, 3 /* 3DC8C0 E00E25B0 02021021 */ addu $v0, $s0, $v0 /* 3DC8C4 E00E25B4 44826000 */ mtc1 $v0, $f12 /* 3DC8C8 E00E25B8 00000000 */ nop /* 3DC8CC E00E25BC 46806320 */ cvt.s.w $f12, $f12 /* 3DC8D0 E00E25C0 0C080140 */ jal shim_sin_deg /* 3DC8D4 E00E25C4 26100030 */ addiu $s0, $s0, 0x30 /* 3DC8D8 E00E25C8 44941000 */ mtc1 $s4, $f2 /* 3DC8DC E00E25CC 00000000 */ nop /* 3DC8E0 E00E25D0 468010A0 */ cvt.s.w $f2, $f2 /* 3DC8E4 E00E25D4 3C01E00E */ lui $at, (0xE00E2A38 >> 16) /* 3DC8E8 E00E25D8 D4242A38 */ ldc1 $f4, (0xE00E2A38 & 0xFFFF)($at) /* 3DC8EC E00E25DC 460010A1 */ cvt.d.s $f2, $f2 /* 3DC8F0 E00E25E0 46241082 */ mul.d $f2, $f2, $f4 /* 3DC8F4 E00E25E4 00000000 */ nop /* 3DC8F8 E00E25E8 27A40020 */ addiu $a0, $sp, 0x20 /* 3DC8FC E00E25EC 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 3DC900 E00E25F0 44812000 */ mtc1 $at, $f4 /* 3DC904 E00E25F4 00000000 */ nop /* 3DC908 E00E25F8 46040002 */ mul.s $f0, $f0, $f4 /* 3DC90C E00E25FC 00000000 */ nop /* 3DC910 E00E2600 4405A000 */ mfc1 $a1, $f20 /* 3DC914 E00E2604 3C0740C0 */ lui $a3, (0x40C00000 >> 16) /* 3DC918 E00E2608 26940001 */ addiu $s4, $s4, 0x1 /* 3DC91C E00E260C E7B40018 */ swc1 $f20, 0x18($sp) /* 3DC920 E00E2610 44060000 */ mfc1 $a2, $f0 /* 3DC924 E00E2614 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 3DC928 E00E2618 44810800 */ mtc1 $at, $f1 /* 3DC92C E00E261C 44800000 */ mtc1 $zero, $f0 /* 3DC930 E00E2620 3C014100 */ lui $at, (0x41000000 >> 16) /* 3DC934 E00E2624 44812000 */ mtc1 $at, $f4 /* 3DC938 E00E2628 46201080 */ add.d $f2, $f2, $f0 /* 3DC93C E00E262C E7B4001C */ swc1 $f20, 0x1C($sp) /* 3DC940 E00E2630 E7A40014 */ swc1 $f4, 0x14($sp) /* 3DC944 E00E2634 462010A0 */ cvt.s.d $f2, $f2 /* 3DC948 E00E2638 0C080180 */ jal shim_guPositionF /* 3DC94C E00E263C E7A20010 */ swc1 $f2, 0x10($sp) /* 3DC950 E00E2640 27A40020 */ addiu $a0, $sp, 0x20 /* 3DC954 E00E2644 96E50000 */ lhu $a1, 0x0($s7) /* 3DC958 E00E2648 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3DC95C E00E264C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3DC960 E00E2650 8FAF00A8 */ lw $t7, 0xA8($sp) /* 3DC964 E00E2654 00052980 */ sll $a1, $a1, 6 /* 3DC968 E00E2658 00AF2821 */ addu $a1, $a1, $t7 /* 3DC96C E00E265C 0C080118 */ jal shim_guMtxF2L /* 3DC970 E00E2660 00452821 */ addu $a1, $v0, $a1 /* 3DC974 E00E2664 3C02DA38 */ lui $v0, (0xDA380001 >> 16) /* 3DC978 E00E2668 34420001 */ ori $v0, $v0, (0xDA380001 & 0xFFFF) /* 3DC97C E00E266C 3C080100 */ lui $t0, (0x1002000 >> 16) /* 3DC980 E00E2670 35082000 */ ori $t0, $t0, (0x1002000 & 0xFFFF) /* 3DC984 E00E2674 3226007F */ andi $a2, $s1, 0x7F /* 3DC988 E00E2678 26310002 */ addiu $s1, $s1, 0x2 /* 3DC98C E00E267C 00063040 */ sll $a2, $a2, 1 /* 3DC990 E00E2680 00C83025 */ or $a2, $a2, $t0 /* 3DC994 E00E2684 8EC40000 */ lw $a0, 0x0($s6) /* 3DC998 E00E2688 96E50000 */ lhu $a1, 0x0($s7) /* 3DC99C E00E268C 3C03800A */ lui $v1, %hi(gDisplayContext) /* 3DC9A0 E00E2690 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 3DC9A4 E00E2694 0080382D */ daddu $a3, $a0, $zero /* 3DC9A8 E00E2698 24840008 */ addiu $a0, $a0, 0x8 /* 3DC9AC E00E269C ACE20000 */ sw $v0, 0x0($a3) /* 3DC9B0 E00E26A0 30A2FFFF */ andi $v0, $a1, 0xFFFF /* 3DC9B4 E00E26A4 00021180 */ sll $v0, $v0, 6 /* 3DC9B8 E00E26A8 8FAF00A8 */ lw $t7, 0xA8($sp) /* 3DC9BC E00E26AC 24A50001 */ addiu $a1, $a1, 0x1 /* 3DC9C0 E00E26B0 004F1021 */ addu $v0, $v0, $t7 /* 3DC9C4 E00E26B4 00621821 */ addu $v1, $v1, $v0 /* 3DC9C8 E00E26B8 ACE30004 */ sw $v1, 0x4($a3) /* 3DC9CC E00E26BC AC9E0004 */ sw $fp, 0x4($a0) /* 3DC9D0 E00E26C0 27DE0020 */ addiu $fp, $fp, 0x20 /* 3DC9D4 E00E26C4 24820008 */ addiu $v0, $a0, 0x8 /* 3DC9D8 E00E26C8 AEC40000 */ sw $a0, 0x0($s6) /* 3DC9DC E00E26CC A6E50000 */ sh $a1, 0x0($s7) /* 3DC9E0 E00E26D0 AEC20000 */ sw $v0, 0x0($s6) /* 3DC9E4 E00E26D4 2A820010 */ slti $v0, $s4, 0x10 /* 3DC9E8 E00E26D8 1440FFB3 */ bnez $v0, .LE00E25A8 /* 3DC9EC E00E26DC AC860000 */ sw $a2, 0x0($a0) /* 3DC9F0 E00E26E0 0000A02D */ daddu $s4, $zero, $zero /* 3DC9F4 E00E26E4 3C0B800A */ lui $t3, %hi(gMainGfxPos) /* 3DC9F8 E00E26E8 256BA66C */ addiu $t3, $t3, %lo(gMainGfxPos) /* 3DC9FC E00E26EC 3C0A0600 */ lui $t2, (0x6000000 >> 16) /* 3DCA00 E00E26F0 24090001 */ addiu $t1, $zero, 0x1 /* 3DCA04 E00E26F4 3C0E0606 */ lui $t6, (0x6060402 >> 16) /* 3DCA08 E00E26F8 35CE0402 */ ori $t6, $t6, (0x6060402 & 0xFFFF) /* 3DCA0C E00E26FC 3C0D0002 */ lui $t5, (0x20406 >> 16) /* 3DCA10 E00E2700 35AD0406 */ ori $t5, $t5, (0x20406 & 0xFFFF) /* 3DCA14 E00E2704 3C0C0006 */ lui $t4, (0x60804 >> 16) /* 3DCA18 E00E2708 358C0804 */ ori $t4, $t4, (0x60804 & 0xFFFF) /* 3DCA1C E00E270C 24070004 */ addiu $a3, $zero, 0x4 /* 3DCA20 E00E2710 24060002 */ addiu $a2, $zero, 0x2 /* 3DCA24 E00E2714 24080006 */ addiu $t0, $zero, 0x6 .LE00E2718: /* 3DCA28 E00E2718 8D640000 */ lw $a0, 0x0($t3) /* 3DCA2C E00E271C 00142840 */ sll $a1, $s4, 1 /* 3DCA30 E00E2720 24820008 */ addiu $v0, $a0, 0x8 /* 3DCA34 E00E2724 14A00004 */ bnez $a1, .LE00E2738 /* 3DCA38 E00E2728 AD620000 */ sw $v0, 0x0($t3) /* 3DCA3C E00E272C 00141440 */ sll $v0, $s4, 17 /* 3DCA40 E00E2730 080389D8 */ j .LE00E2760 /* 3DCA44 E00E2734 34420402 */ ori $v0, $v0, 0x402 .LE00E2738: /* 3DCA48 E00E2738 14A90003 */ bne $a1, $t1, .LE00E2748 /* 3DCA4C E00E273C 30C200FF */ andi $v0, $a2, 0xFF /* 3DCA50 E00E2740 080389DA */ j .LE00E2768 /* 3DCA54 E00E2744 AC8E0000 */ sw $t6, 0x0($a0) .LE00E2748: /* 3DCA58 E00E2748 00021400 */ sll $v0, $v0, 16 /* 3DCA5C E00E274C 00141A80 */ sll $v1, $s4, 10 /* 3DCA60 E00E2750 3063FC00 */ andi $v1, $v1, 0xFC00 /* 3DCA64 E00E2754 00431025 */ or $v0, $v0, $v1 /* 3DCA68 E00E2758 30E300FF */ andi $v1, $a3, 0xFF /* 3DCA6C E00E275C 00431025 */ or $v0, $v0, $v1 .LE00E2760: /* 3DCA70 E00E2760 004A1025 */ or $v0, $v0, $t2 /* 3DCA74 E00E2764 AC820000 */ sw $v0, 0x0($a0) .LE00E2768: /* 3DCA78 E00E2768 14A00003 */ bnez $a1, .LE00E2778 /* 3DCA7C E00E276C 00000000 */ nop /* 3DCA80 E00E2770 080389E9 */ j .LE00E27A4 /* 3DCA84 E00E2774 AC8D0004 */ sw $t5, 0x4($a0) .LE00E2778: /* 3DCA88 E00E2778 14A90003 */ bne $a1, $t1, .LE00E2788 /* 3DCA8C E00E277C 310200FF */ andi $v0, $t0, 0xFF /* 3DCA90 E00E2780 080389E9 */ j .LE00E27A4 /* 3DCA94 E00E2784 AC8C0004 */ sw $t4, 0x4($a0) .LE00E2788: /* 3DCA98 E00E2788 00021400 */ sll $v0, $v0, 16 /* 3DCA9C E00E278C 30C300FF */ andi $v1, $a2, 0xFF /* 3DCAA0 E00E2790 00031A00 */ sll $v1, $v1, 8 /* 3DCAA4 E00E2794 00431025 */ or $v0, $v0, $v1 /* 3DCAA8 E00E2798 30E300FF */ andi $v1, $a3, 0xFF /* 3DCAAC E00E279C 00431025 */ or $v0, $v0, $v1 /* 3DCAB0 E00E27A0 AC820004 */ sw $v0, 0x4($a0) .LE00E27A4: /* 3DCAB4 E00E27A4 24E70004 */ addiu $a3, $a3, 0x4 /* 3DCAB8 E00E27A8 24C60004 */ addiu $a2, $a2, 0x4 /* 3DCABC E00E27AC 26940001 */ addiu $s4, $s4, 0x1 /* 3DCAC0 E00E27B0 2A82000F */ slti $v0, $s4, 0xF /* 3DCAC4 E00E27B4 1440FFD8 */ bnez $v0, .LE00E2718 /* 3DCAC8 E00E27B8 25080004 */ addiu $t0, $t0, 0x4 /* 3DCACC E00E27BC 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 3DCAD0 E00E27C0 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 3DCAD4 E00E27C4 0000A02D */ daddu $s4, $zero, $zero /* 3DCAD8 E00E27C8 3C1E800A */ lui $fp, %hi(gDisplayContext) /* 3DCADC E00E27CC 27DEA674 */ addiu $fp, $fp, %lo(gDisplayContext) /* 3DCAE0 E00E27D0 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 3DCAE4 E00E27D4 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 3DCAE8 E00E27D8 3C160001 */ lui $s6, (0x11630 >> 16) /* 3DCAEC E00E27DC 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 3DCAF0 E00E27E0 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3DCAF4 E00E27E4 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3DCAF8 E00E27E8 0040902D */ daddu $s2, $v0, $zero /* 3DCAFC E00E27EC 2413FEE6 */ addiu $s3, $zero, -0x11A /* 3DCB00 E00E27F0 8FB000A0 */ lw $s0, 0xA0($sp) /* 3DCB04 E00E27F4 8E420000 */ lw $v0, 0x0($s2) /* 3DCB08 E00E27F8 4480A000 */ mtc1 $zero, $f20 /* 3DCB0C E00E27FC 0040202D */ daddu $a0, $v0, $zero /* 3DCB10 E00E2800 24420008 */ addiu $v0, $v0, 0x8 /* 3DCB14 E00E2804 AE420000 */ sw $v0, 0x0($s2) /* 3DCB18 E00E2808 AC830000 */ sw $v1, 0x0($a0) /* 3DCB1C E00E280C 24030040 */ addiu $v1, $zero, 0x40 /* 3DCB20 E00E2810 AC830004 */ sw $v1, 0x4($a0) /* 3DCB24 E00E2814 24430008 */ addiu $v1, $v0, 0x8 /* 3DCB28 E00E2818 AE430000 */ sw $v1, 0x0($s2) /* 3DCB2C E00E281C 3C03DF00 */ lui $v1, (0xDF000000 >> 16) /* 3DCB30 E00E2820 AC430000 */ sw $v1, 0x0($v0) /* 3DCB34 E00E2824 AC400004 */ sw $zero, 0x4($v0) .LE00E2828: /* 3DCB38 E00E2828 3C027878 */ lui $v0, (0x78787879 >> 16) /* 3DCB3C E00E282C 34427879 */ ori $v0, $v0, (0x78787879 & 0xFFFF) /* 3DCB40 E00E2830 27A40020 */ addiu $a0, $sp, 0x20 /* 3DCB44 E00E2834 44933000 */ mtc1 $s3, $f6 /* 3DCB48 E00E2838 00000000 */ nop /* 3DCB4C E00E283C 468031A0 */ cvt.s.w $f6, $f6 /* 3DCB50 E00E2840 26730024 */ addiu $s3, $s3, 0x24 /* 3DCB54 E00E2844 26940001 */ addiu $s4, $s4, 0x1 /* 3DCB58 E00E2848 02020018 */ mult $s0, $v0 /* 3DCB5C E00E284C 44073000 */ mfc1 $a3, $f6 /* 3DCB60 E00E2850 4405A000 */ mfc1 $a1, $f20 /* 3DCB64 E00E2854 4406A000 */ mfc1 $a2, $f20 /* 3DCB68 E00E2858 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3DCB6C E00E285C 44810000 */ mtc1 $at, $f0 /* 3DCB70 E00E2860 001017C3 */ sra $v0, $s0, 31 /* 3DCB74 E00E2864 E7B40014 */ swc1 $f20, 0x14($sp) /* 3DCB78 E00E2868 E7B40018 */ swc1 $f20, 0x18($sp) /* 3DCB7C E00E286C E7B4001C */ swc1 $f20, 0x1C($sp) /* 3DCB80 E00E2870 E7A00010 */ swc1 $f0, 0x10($sp) /* 3DCB84 E00E2874 00007810 */ mfhi $t7 /* 3DCB88 E00E2878 000F18C3 */ sra $v1, $t7, 3 /* 3DCB8C E00E287C 00628823 */ subu $s1, $v1, $v0 /* 3DCB90 E00E2880 00111100 */ sll $v0, $s1, 4 /* 3DCB94 E00E2884 00511021 */ addu $v0, $v0, $s1 /* 3DCB98 E00E2888 0C080180 */ jal shim_guPositionF /* 3DCB9C E00E288C 02028823 */ subu $s1, $s0, $v0 /* 3DCBA0 E00E2890 27A40020 */ addiu $a0, $sp, 0x20 /* 3DCBA4 E00E2894 26100004 */ addiu $s0, $s0, 0x4 /* 3DCBA8 E00E2898 96E50000 */ lhu $a1, 0x0($s7) /* 3DCBAC E00E289C 8FC20000 */ lw $v0, 0x0($fp) /* 3DCBB0 E00E28A0 00052980 */ sll $a1, $a1, 6 /* 3DCBB4 E00E28A4 00B62821 */ addu $a1, $a1, $s6 /* 3DCBB8 E00E28A8 0C080118 */ jal shim_guMtxF2L /* 3DCBBC E00E28AC 00452821 */ addu $a1, $v0, $a1 /* 3DCBC0 E00E28B0 3C09D838 */ lui $t1, (0xD8380002 >> 16) /* 3DCBC4 E00E28B4 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF) /* 3DCBC8 E00E28B8 8E440000 */ lw $a0, 0x0($s2) /* 3DCBCC E00E28BC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3DCBD0 E00E28C0 0080282D */ daddu $a1, $a0, $zero /* 3DCBD4 E00E28C4 24840008 */ addiu $a0, $a0, 0x8 /* 3DCBD8 E00E28C8 AE440000 */ sw $a0, 0x0($s2) /* 3DCBDC E00E28CC 96E20000 */ lhu $v0, 0x0($s7) /* 3DCBE0 E00E28D0 24080040 */ addiu $t0, $zero, 0x40 /* 3DCBE4 E00E28D4 ACA30000 */ sw $v1, 0x0($a1) /* 3DCBE8 E00E28D8 24430001 */ addiu $v1, $v0, 0x1 /* 3DCBEC E00E28DC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3DCBF0 E00E28E0 00021180 */ sll $v0, $v0, 6 /* 3DCBF4 E00E28E4 A6E30000 */ sh $v1, 0x0($s7) /* 3DCBF8 E00E28E8 8FC30000 */ lw $v1, 0x0($fp) /* 3DCBFC E00E28EC 00561021 */ addu $v0, $v0, $s6 /* 3DCC00 E00E28F0 00621821 */ addu $v1, $v1, $v0 /* 3DCC04 E00E28F4 24820008 */ addiu $v0, $a0, 0x8 /* 3DCC08 E00E28F8 ACA30004 */ sw $v1, 0x4($a1) /* 3DCC0C E00E28FC AE420000 */ sw $v0, 0x0($s2) /* 3DCC10 E00E2900 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3DCC14 E00E2904 AC820000 */ sw $v0, 0x0($a0) /* 3DCC18 E00E2908 3C03E00E */ lui $v1, (0xE00E29F4 >> 16) /* 3DCC1C E00E290C 00711821 */ addu $v1, $v1, $s1 /* 3DCC20 E00E2910 906329F4 */ lbu $v1, (0xE00E29F4 & 0xFFFF)($v1) /* 3DCC24 E00E2914 3C05E00E */ lui $a1, (0xE00E2A08 >> 16) /* 3DCC28 E00E2918 00B12821 */ addu $a1, $a1, $s1 /* 3DCC2C E00E291C 90A52A08 */ lbu $a1, (0xE00E2A08 & 0xFFFF)($a1) /* 3DCC30 E00E2920 3C06E00E */ lui $a2, (0xE00E2A1C >> 16) /* 3DCC34 E00E2924 00D13021 */ addu $a2, $a2, $s1 /* 3DCC38 E00E2928 90C62A1C */ lbu $a2, (0xE00E2A1C & 0xFFFF)($a2) /* 3DCC3C E00E292C 92A70027 */ lbu $a3, 0x27($s5) /* 3DCC40 E00E2930 24820010 */ addiu $v0, $a0, 0x10 /* 3DCC44 E00E2934 AE420000 */ sw $v0, 0x0($s2) /* 3DCC48 E00E2938 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3DCC4C E00E293C AC820008 */ sw $v0, 0x8($a0) /* 3DCC50 E00E2940 2402FF00 */ addiu $v0, $zero, -0x100 /* 3DCC54 E00E2944 AC82000C */ sw $v0, 0xC($a0) /* 3DCC58 E00E2948 24820018 */ addiu $v0, $a0, 0x18 /* 3DCC5C E00E294C AE420000 */ sw $v0, 0x0($s2) /* 3DCC60 E00E2950 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3DCC64 E00E2954 AC820010 */ sw $v0, 0x10($a0) /* 3DCC68 E00E2958 24820020 */ addiu $v0, $a0, 0x20 /* 3DCC6C E00E295C 8FAF00A4 */ lw $t7, 0xA4($sp) /* 3DCC70 E00E2960 00031E00 */ sll $v1, $v1, 24 /* 3DCC74 E00E2964 00052C00 */ sll $a1, $a1, 16 /* 3DCC78 E00E2968 00651825 */ or $v1, $v1, $a1 /* 3DCC7C E00E296C 00063200 */ sll $a2, $a2, 8 /* 3DCC80 E00E2970 00661825 */ or $v1, $v1, $a2 /* 3DCC84 E00E2974 00671825 */ or $v1, $v1, $a3 /* 3DCC88 E00E2978 AC8F0014 */ sw $t7, 0x14($a0) /* 3DCC8C E00E297C AE420000 */ sw $v0, 0x0($s2) /* 3DCC90 E00E2980 2A820002 */ slti $v0, $s4, 0x2 /* 3DCC94 E00E2984 AC890018 */ sw $t1, 0x18($a0) /* 3DCC98 E00E2988 AC88001C */ sw $t0, 0x1C($a0) /* 3DCC9C E00E298C 1440FFA6 */ bnez $v0, .LE00E2828 /* 3DCCA0 E00E2990 AC830004 */ sw $v1, 0x4($a0) /* 3DCCA4 E00E2994 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3DCCA8 E00E2998 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3DCCAC E00E299C 8C430000 */ lw $v1, 0x0($v0) /* 3DCCB0 E00E29A0 0060202D */ daddu $a0, $v1, $zero /* 3DCCB4 E00E29A4 24630008 */ addiu $v1, $v1, 0x8 /* 3DCCB8 E00E29A8 AC430000 */ sw $v1, 0x0($v0) /* 3DCCBC E00E29AC AC890000 */ sw $t1, 0x0($a0) /* 3DCCC0 E00E29B0 AC880004 */ sw $t0, 0x4($a0) /* 3DCCC4 E00E29B4 8FBF00D4 */ lw $ra, 0xD4($sp) /* 3DCCC8 E00E29B8 8FBE00D0 */ lw $fp, 0xD0($sp) /* 3DCCCC E00E29BC 8FB700CC */ lw $s7, 0xCC($sp) /* 3DCCD0 E00E29C0 8FB600C8 */ lw $s6, 0xC8($sp) /* 3DCCD4 E00E29C4 8FB500C4 */ lw $s5, 0xC4($sp) /* 3DCCD8 E00E29C8 8FB400C0 */ lw $s4, 0xC0($sp) /* 3DCCDC E00E29CC 8FB300BC */ lw $s3, 0xBC($sp) /* 3DCCE0 E00E29D0 8FB200B8 */ lw $s2, 0xB8($sp) /* 3DCCE4 E00E29D4 8FB100B4 */ lw $s1, 0xB4($sp) /* 3DCCE8 E00E29D8 8FB000B0 */ lw $s0, 0xB0($sp) /* 3DCCEC E00E29DC D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 3DCCF0 E00E29E0 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 3DCCF4 E00E29E4 03E00008 */ jr $ra /* 3DCCF8 E00E29E8 27BD00E8 */ addiu $sp, $sp, 0xE8 /* 3DCCFC E00E29EC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void hieroglyphs_appendGfx(void* effect) { HieroglyphsFXData* data = ((EffectInstance*)effect)->data.hieroglyphs; Camera* camera = &gCameras[gCurrentCameraID]; s32 lifeTime = data->lifeTime; s32 unk_24 = data->unk_24; Gfx* savedGfxPos; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp20, data->pos.x, data->pos.y, data->pos.z); shim_guScaleF(sp60, data->unk_38, data->unk_38, data->unk_38); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24); gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, data->unk_34); gSPDisplayList(gMainGfxPos++, D_E00E29F0[0]); gSPBranchList(gMainGfxPos, gMainGfxPos + 52); savedGfxPos = gMainGfxPos + 1; gDPSetTileSize(savedGfxPos, G_TX_RENDERTILE, (lifeTime * 2 ) * 4, 0, (lifeTime * 2 + 127) * 4, 31 * 4); gMainGfxPos += 2; shim_guRotateF(sp20, 20.0f, 1.0f, 0.0f, 0.0f); shim_guPositionF(sp60, 0.0f, shim_sin_deg(lifeTime * 8 + 78.75) * -30.0f, 0.0f, 1.0f, 6.0f, 0.0f, 0.0f); 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); for (i = 0; i < 16; i++) { f32 angle = i * 48 + lifeTime * 8; shim_guPositionF(sp20, 0.0f, shim_sin_deg(angle) * 30.0f, 6.0f, (f32) i * 0.01 + 1.0, 8.0f, 0.0f, 0.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPVertex(gMainGfxPos++, &D_090010A8_3DDDF8[i * 2], 2, i * 2); } for (i = 0; i < 15; i++) { s32 i2 = i * 2; gSP2Triangles(gMainGfxPos++, i2 , i2 + 2, i2 + 1, i2, i2 + 1, i2 + 2, i2 + 3, i2); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPEndDisplayList(gMainGfxPos++); for (i = 0; i < 2; i++) { s32 idx = (lifeTime + i * 4) % 17; shim_guPositionF(sp20, 0.0f, 0.0f, -0x11A + i * 0x24, 1.0f, 0.0f, 0.0f, 0.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E00E29F4[idx], D_E00E2A08[idx], D_E00E2A1C[idx], data->unk_24); gDPSetEnvColor(gMainGfxPos++, 255, 255, 255, 0); gSPDisplayList(gMainGfxPos++, savedGfxPos); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel fright_jar_appendGfx /* 3C13EC E00C221C 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 3C13F0 E00C2220 0080302D */ daddu $a2, $a0, $zero /* 3C13F4 E00C2224 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3C13F8 E00C2228 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3C13FC E00C222C 27A40010 */ addiu $a0, $sp, 0x10 /* 3C1400 E00C2230 AFB300A4 */ sw $s3, 0xA4($sp) /* 3C1404 E00C2234 3C130001 */ lui $s3, (0x11630 >> 16) /* 3C1408 E00C2238 AFB400A8 */ sw $s4, 0xA8($sp) /* 3C140C E00C223C 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 3C1410 E00C2240 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 3C1414 E00C2244 AFBF00B8 */ sw $ra, 0xB8($sp) /* 3C1418 E00C2248 AFB700B4 */ sw $s7, 0xB4($sp) /* 3C141C E00C224C AFB600B0 */ sw $s6, 0xB0($sp) /* 3C1420 E00C2250 AFB500AC */ sw $s5, 0xAC($sp) /* 3C1424 E00C2254 AFB200A0 */ sw $s2, 0xA0($sp) /* 3C1428 E00C2258 AFB1009C */ sw $s1, 0x9C($sp) /* 3C142C E00C225C AFB00098 */ sw $s0, 0x98($sp) /* 3C1430 E00C2260 8E850000 */ lw $a1, 0x0($s4) /* 3C1434 E00C2264 8CD6000C */ lw $s6, 0xC($a2) /* 3C1438 E00C2268 00A0182D */ daddu $v1, $a1, $zero /* 3C143C E00C226C 24A50008 */ addiu $a1, $a1, 0x8 /* 3C1440 E00C2270 AE850000 */ sw $a1, 0x0($s4) /* 3C1444 E00C2274 8ED50014 */ lw $s5, 0x14($s6) /* 3C1448 E00C2278 8ED70024 */ lw $s7, 0x24($s6) /* 3C144C E00C227C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3C1450 E00C2280 AFB70090 */ sw $s7, 0x90($sp) /* 3C1454 E00C2284 AC620000 */ sw $v0, 0x0($v1) /* 3C1458 E00C2288 AC600004 */ sw $zero, 0x4($v1) /* 3C145C E00C228C ACA70000 */ sw $a3, 0x0($a1) /* 3C1460 E00C2290 8CC30010 */ lw $v1, 0x10($a2) /* 3C1464 E00C2294 24A20008 */ addiu $v0, $a1, 0x8 /* 3C1468 E00C2298 AE820000 */ sw $v0, 0x0($s4) /* 3C146C E00C229C 8C62001C */ lw $v0, 0x1C($v1) /* 3C1470 E00C22A0 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3C1474 E00C22A4 00431021 */ addu $v0, $v0, $v1 /* 3C1478 E00C22A8 3C03800B */ lui $v1, %hi(gCameras) /* 3C147C E00C22AC 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3C1480 E00C22B0 ACA20004 */ sw $v0, 0x4($a1) /* 3C1484 E00C22B4 8EC50004 */ lw $a1, 0x4($s6) /* 3C1488 E00C22B8 8EC60008 */ lw $a2, 0x8($s6) /* 3C148C E00C22BC 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3C1490 E00C22C0 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3C1494 E00C22C4 8EC7000C */ lw $a3, 0xC($s6) /* 3C1498 E00C22C8 00028080 */ sll $s0, $v0, 2 /* 3C149C E00C22CC 02028021 */ addu $s0, $s0, $v0 /* 3C14A0 E00C22D0 00108080 */ sll $s0, $s0, 2 /* 3C14A4 E00C22D4 02028023 */ subu $s0, $s0, $v0 /* 3C14A8 E00C22D8 001010C0 */ sll $v0, $s0, 3 /* 3C14AC E00C22DC 02028021 */ addu $s0, $s0, $v0 /* 3C14B0 E00C22E0 001080C0 */ sll $s0, $s0, 3 /* 3C14B4 E00C22E4 0C080108 */ jal shim_guTranslateF /* 3C14B8 E00C22E8 02038021 */ addu $s0, $s0, $v1 /* 3C14BC E00C22EC C6C00028 */ lwc1 $f0, 0x28($s6) /* 3C14C0 E00C22F0 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3C14C4 E00C22F4 44060000 */ mfc1 $a2, $f0 /* 3C14C8 E00C22F8 27B10050 */ addiu $s1, $sp, 0x50 /* 3C14CC E00C22FC 44867000 */ mtc1 $a2, $f14 /* 3C14D0 E00C2300 0220202D */ daddu $a0, $s1, $zero /* 3C14D4 E00C2304 46007387 */ neg.s $f14, $f14 /* 3C14D8 E00C2308 44057000 */ mfc1 $a1, $f14 /* 3C14DC E00C230C 0C080110 */ jal shim_guScaleF /* 3C14E0 E00C2310 00C0382D */ daddu $a3, $a2, $zero /* 3C14E4 E00C2314 0220202D */ daddu $a0, $s1, $zero /* 3C14E8 E00C2318 27A50010 */ addiu $a1, $sp, 0x10 /* 3C14EC E00C231C 0C080114 */ jal shim_guMtxCatF /* 3C14F0 E00C2320 00A0302D */ daddu $a2, $a1, $zero /* 3C14F4 E00C2324 27A40010 */ addiu $a0, $sp, 0x10 /* 3C14F8 E00C2328 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 3C14FC E00C232C 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 3C1500 E00C2330 3C12800A */ lui $s2, %hi(gDisplayContext) /* 3C1504 E00C2334 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 3C1508 E00C2338 96250000 */ lhu $a1, 0x0($s1) /* 3C150C E00C233C 8E420000 */ lw $v0, 0x0($s2) /* 3C1510 E00C2340 00052980 */ sll $a1, $a1, 6 /* 3C1514 E00C2344 00B32821 */ addu $a1, $a1, $s3 /* 3C1518 E00C2348 0C080118 */ jal shim_guMtxF2L /* 3C151C E00C234C 00452821 */ addu $a1, $v0, $a1 /* 3C1520 E00C2350 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3C1524 E00C2354 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3C1528 E00C2358 3C05DA38 */ lui $a1, (0xDA380001 >> 16) /* 3C152C E00C235C 34A50001 */ ori $a1, $a1, (0xDA380001 & 0xFFFF) /* 3C1530 E00C2360 24020036 */ addiu $v0, $zero, 0x36 /* 3C1534 E00C2364 00553823 */ subu $a3, $v0, $s5 /* 3C1538 E00C2368 8E860000 */ lw $a2, 0x0($s4) /* 3C153C E00C236C 96220000 */ lhu $v0, 0x0($s1) /* 3C1540 E00C2370 00C0202D */ daddu $a0, $a2, $zero /* 3C1544 E00C2374 24C60008 */ addiu $a2, $a2, 0x8 /* 3C1548 E00C2378 AE860000 */ sw $a2, 0x0($s4) /* 3C154C E00C237C AC830000 */ sw $v1, 0x0($a0) /* 3C1550 E00C2380 24430001 */ addiu $v1, $v0, 0x1 /* 3C1554 E00C2384 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3C1558 E00C2388 00021180 */ sll $v0, $v0, 6 /* 3C155C E00C238C A6230000 */ sh $v1, 0x0($s1) /* 3C1560 E00C2390 8E430000 */ lw $v1, 0x0($s2) /* 3C1564 E00C2394 00531021 */ addu $v0, $v0, $s3 /* 3C1568 E00C2398 00621821 */ addu $v1, $v1, $v0 /* 3C156C E00C239C 24C20008 */ addiu $v0, $a2, 0x8 /* 3C1570 E00C23A0 AC830004 */ sw $v1, 0x4($a0) /* 3C1574 E00C23A4 AE820000 */ sw $v0, 0x0($s4) /* 3C1578 E00C23A8 24C20010 */ addiu $v0, $a2, 0x10 /* 3C157C E00C23AC ACC50000 */ sw $a1, 0x0($a2) /* 3C1580 E00C23B0 AE820000 */ sw $v0, 0x0($s4) /* 3C1584 E00C23B4 8E030204 */ lw $v1, 0x204($s0) /* 3C1588 E00C23B8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3C158C E00C23BC ACC20008 */ sw $v0, 0x8($a2) /* 3C1590 E00C23C0 3C020901 */ lui $v0, %hi(D_09008BE0_3F4A40) /* 3C1594 E00C23C4 24428BE0 */ addiu $v0, $v0, %lo(D_09008BE0_3F4A40) /* 3C1598 E00C23C8 ACC2000C */ sw $v0, 0xC($a2) /* 3C159C E00C23CC 04E10002 */ bgez $a3, .LE00C23D8 /* 3C15A0 E00C23D0 ACC30004 */ sw $v1, 0x4($a2) /* 3C15A4 E00C23D4 0000382D */ daddu $a3, $zero, $zero .LE00C23D8: /* 3C15A8 E00C23D8 3C030101 */ lui $v1, (0x101602C >> 16) /* 3C15AC E00C23DC 3463602C */ ori $v1, $v1, (0x101602C & 0xFFFF) /* 3C15B0 E00C23E0 02A0202D */ daddu $a0, $s5, $zero /* 3C15B4 E00C23E4 24C20018 */ addiu $v0, $a2, 0x18 /* 3C15B8 E00C23E8 AE820000 */ sw $v0, 0x0($s4) /* 3C15BC E00C23EC ACC30010 */ sw $v1, 0x10($a2) /* 3C15C0 E00C23F0 3C030900 */ lui $v1, %hi(D_09004040_4112D0) /* 3C15C4 E00C23F4 24634040 */ addiu $v1, $v1, %lo(D_09004040_4112D0) /* 3C15C8 E00C23F8 00071040 */ sll $v0, $a3, 1 /* 3C15CC E00C23FC 00471021 */ addu $v0, $v0, $a3 /* 3C15D0 E00C2400 00021080 */ sll $v0, $v0, 2 /* 3C15D4 E00C2404 00471023 */ subu $v0, $v0, $a3 /* 3C15D8 E00C2408 00021140 */ sll $v0, $v0, 5 /* 3C15DC E00C240C 00431021 */ addu $v0, $v0, $v1 /* 3C15E0 E00C2410 06A10002 */ bgez $s5, .LE00C241C /* 3C15E4 E00C2414 ACC20014 */ sw $v0, 0x14($a2) /* 3C15E8 E00C2418 26A4000F */ addiu $a0, $s5, 0xF .LE00C241C: /* 3C15EC E00C241C 0000602D */ daddu $t4, $zero, $zero /* 3C15F0 E00C2420 0280482D */ daddu $t1, $s4, $zero /* 3C15F4 E00C2424 3C148000 */ lui $s4, (0x80000000 >> 16) /* 3C15F8 E00C2428 3C12FD48 */ lui $s2, (0xFD48003F >> 16) /* 3C15FC E00C242C 3652003F */ ori $s2, $s2, (0xFD48003F & 0xFFFF) /* 3C1600 E00C2430 3C110709 */ lui $s1, (0x709FA7E >> 16) /* 3C1604 E00C2434 3631FA7E */ ori $s1, $s1, (0x709FA7E & 0xFFFF) /* 3C1608 E00C2438 3C19E600 */ lui $t9, (0xE6000000 >> 16) /* 3C160C E00C243C 3C18F400 */ lui $t8, (0xF4000000 >> 16) /* 3C1610 E00C2440 3C10070F */ lui $s0, (0x70FE000 >> 16) /* 3C1614 E00C2444 3610E000 */ ori $s0, $s0, (0x70FE000 & 0xFFFF) /* 3C1618 E00C2448 3C13E700 */ lui $s3, (0xE7000000 >> 16) /* 3C161C E00C244C 3C0FF200 */ lui $t7, (0xF2000000 >> 16) /* 3C1620 E00C2450 0180702D */ daddu $t6, $t4, $zero /* 3C1624 E00C2454 0180682D */ daddu $t5, $t4, $zero /* 3C1628 E00C2458 00041103 */ sra $v0, $a0, 4 /* 3C162C E00C245C 00021100 */ sll $v0, $v0, 4 /* 3C1630 E00C2460 02A21023 */ subu $v0, $s5, $v0 /* 3C1634 E00C2464 3C03E00C */ lui $v1, %hi(D_E00C2990) /* 3C1638 E00C2468 24632990 */ addiu $v1, $v1, %lo(D_E00C2990) /* 3C163C E00C246C 00431021 */ addu $v0, $v0, $v1 /* 3C1640 E00C2470 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3C1644 E00C2474 44816000 */ mtc1 $at, $f12 /* 3C1648 E00C2478 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 3C164C E00C247C 44813000 */ mtc1 $at, $f6 /* 3C1650 E00C2480 3C014300 */ lui $at, (0x43000000 >> 16) /* 3C1654 E00C2484 44815000 */ mtc1 $at, $f10 /* 3C1658 E00C2488 3C014080 */ lui $at, (0x40800000 >> 16) /* 3C165C E00C248C 44814000 */ mtc1 $at, $f8 /* 3C1660 E00C2490 90430000 */ lbu $v1, 0x0($v0) /* 3C1664 E00C2494 24C20020 */ addiu $v0, $a2, 0x20 /* 3C1668 E00C2498 AD220000 */ sw $v0, 0x0($t1) /* 3C166C E00C249C 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3C1670 E00C24A0 ACC20018 */ sw $v0, 0x18($a2) /* 3C1674 E00C24A4 ACC3001C */ sw $v1, 0x1C($a2) .LE00C24A8: /* 3C1678 E00C24A8 29820005 */ slti $v0, $t4, 0x5 /* 3C167C E00C24AC 14400002 */ bnez $v0, .LE00C24B8 /* 3C1680 E00C24B0 000D5880 */ sll $t3, $t5, 2 /* 3C1684 E00C24B4 25CB0004 */ addiu $t3, $t6, 0x4 .LE00C24B8: /* 3C1688 E00C24B8 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) /* 3C168C E00C24BC 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) /* 3C1690 E00C24C0 44811000 */ mtc1 $at, $f2 /* 3C1694 E00C24C4 448C0000 */ mtc1 $t4, $f0 /* 3C1698 E00C24C8 00000000 */ nop /* 3C169C E00C24CC 46800020 */ cvt.s.w $f0, $f0 /* 3C16A0 E00C24D0 46020102 */ mul.s $f4, $f0, $f2 /* 3C16A4 E00C24D4 00000000 */ nop /* 3C16A8 E00C24D8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3C16AC E00C24DC 44811000 */ mtc1 $at, $f2 /* 3C16B0 E00C24E0 00000000 */ nop /* 3C16B4 E00C24E4 46041081 */ sub.s $f2, $f2, $f4 /* 3C16B8 E00C24E8 C7A00090 */ lwc1 $f0, 0x90($sp) /* 3C16BC E00C24EC 46800020 */ cvt.s.w $f0, $f0 /* 3C16C0 E00C24F0 46020002 */ mul.s $f0, $f0, $f2 /* 3C16C4 E00C24F4 00000000 */ nop /* 3C16C8 E00C24F8 46000000 */ add.s $f0, $f0, $f0 /* 3C16CC E00C24FC 4600603C */ c.lt.s $f12, $f0 /* 3C16D0 E00C2500 00000000 */ nop /* 3C16D4 E00C2504 45030001 */ bc1tl .LE00C250C /* 3C16D8 E00C2508 46006006 */ mov.s $f0, $f12 .LE00C250C: /* 3C16DC E00C250C 8D220000 */ lw $v0, 0x0($t1) /* 3C16E0 E00C2510 4600303E */ c.le.s $f6, $f0 /* 3C16E4 E00C2514 0040182D */ daddu $v1, $v0, $zero /* 3C16E8 E00C2518 24420008 */ addiu $v0, $v0, 0x8 /* 3C16EC E00C251C AD220000 */ sw $v0, 0x0($t1) /* 3C16F0 E00C2520 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3C16F4 E00C2524 246A0004 */ addiu $t2, $v1, 0x4 /* 3C16F8 E00C2528 AC620000 */ sw $v0, 0x0($v1) /* 3C16FC E00C252C 92C4001B */ lbu $a0, 0x1B($s6) /* 3C1700 E00C2530 92C3001F */ lbu $v1, 0x1F($s6) /* 3C1704 E00C2534 92C20023 */ lbu $v0, 0x23($s6) /* 3C1708 E00C2538 00042600 */ sll $a0, $a0, 24 /* 3C170C E00C253C 00031C00 */ sll $v1, $v1, 16 /* 3C1710 E00C2540 00832025 */ or $a0, $a0, $v1 /* 3C1714 E00C2544 00021200 */ sll $v0, $v0, 8 /* 3C1718 E00C2548 45010005 */ bc1t .LE00C2560 /* 3C171C E00C254C 00822025 */ or $a0, $a0, $v0 /* 3C1720 E00C2550 4600038D */ trunc.w.s $f14, $f0 /* 3C1724 E00C2554 44027000 */ mfc1 $v0, $f14 /* 3C1728 E00C2558 0803095E */ j .LE00C2578 /* 3C172C E00C255C 3C05F548 */ lui $a1, (0xF5481000 >> 16) .LE00C2560: /* 3C1730 E00C2560 46060001 */ sub.s $f0, $f0, $f6 /* 3C1734 E00C2564 4600038D */ trunc.w.s $f14, $f0 /* 3C1738 E00C2568 44027000 */ mfc1 $v0, $f14 /* 3C173C E00C256C 00000000 */ nop /* 3C1740 E00C2570 00541025 */ or $v0, $v0, $s4 /* 3C1744 E00C2574 3C05F548 */ lui $a1, (0xF5481000 >> 16) .LE00C2578: /* 3C1748 E00C2578 34A51000 */ ori $a1, $a1, (0xF5481000 & 0xFFFF) /* 3C174C E00C257C 3C07F540 */ lui $a3, (0xF5401000 >> 16) /* 3C1750 E00C2580 34E71000 */ ori $a3, $a3, (0xF5401000 & 0xFFFF) /* 3C1754 E00C2584 3C060009 */ lui $a2, (0x9FA7E >> 16) /* 3C1758 E00C2588 34C6FA7E */ ori $a2, $a2, (0x9FA7E & 0xFFFF) /* 3C175C E00C258C 3C08001F */ lui $t0, (0x1FC000 >> 16) /* 3C1760 E00C2590 3508C000 */ ori $t0, $t0, (0x1FC000 & 0xFFFF) /* 3C1764 E00C2594 304200FF */ andi $v0, $v0, 0xFF /* 3C1768 E00C2598 8D230000 */ lw $v1, 0x0($t1) /* 3C176C E00C259C 00821025 */ or $v0, $a0, $v0 /* 3C1770 E00C25A0 AD420000 */ sw $v0, 0x0($t2) /* 3C1774 E00C25A4 3C020900 */ lui $v0, %hi(D_09002020_40F2B0) /* 3C1778 E00C25A8 24422020 */ addiu $v0, $v0, %lo(D_09002020_40F2B0) /* 3C177C E00C25AC 460A2002 */ mul.s $f0, $f4, $f10 /* 3C1780 E00C25B0 00000000 */ nop /* 3C1784 E00C25B4 0060202D */ daddu $a0, $v1, $zero /* 3C1788 E00C25B8 24630008 */ addiu $v1, $v1, 0x8 /* 3C178C E00C25BC AD230000 */ sw $v1, 0x0($t1) /* 3C1790 E00C25C0 AC820004 */ sw $v0, 0x4($a0) /* 3C1794 E00C25C4 24620008 */ addiu $v0, $v1, 0x8 /* 3C1798 E00C25C8 AC920000 */ sw $s2, 0x0($a0) /* 3C179C E00C25CC AD220000 */ sw $v0, 0x0($t1) /* 3C17A0 E00C25D0 24620010 */ addiu $v0, $v1, 0x10 /* 3C17A4 E00C25D4 AC650000 */ sw $a1, 0x0($v1) /* 3C17A8 E00C25D8 AC710004 */ sw $s1, 0x4($v1) /* 3C17AC E00C25DC AD220000 */ sw $v0, 0x0($t1) /* 3C17B0 E00C25E0 24620018 */ addiu $v0, $v1, 0x18 /* 3C17B4 E00C25E4 000B2880 */ sll $a1, $t3, 2 /* 3C17B8 E00C25E8 30A50FFF */ andi $a1, $a1, 0xFFF /* 3C17BC E00C25EC AC790008 */ sw $t9, 0x8($v1) /* 3C17C0 E00C25F0 AC60000C */ sw $zero, 0xC($v1) /* 3C17C4 E00C25F4 AD220000 */ sw $v0, 0x0($t1) /* 3C17C8 E00C25F8 00B81025 */ or $v0, $a1, $t8 /* 3C17CC E00C25FC 2564000F */ addiu $a0, $t3, 0xF /* 3C17D0 E00C2600 00042080 */ sll $a0, $a0, 2 /* 3C17D4 E00C2604 30840FFF */ andi $a0, $a0, 0xFFF /* 3C17D8 E00C2608 AC620010 */ sw $v0, 0x10($v1) /* 3C17DC E00C260C 00901025 */ or $v0, $a0, $s0 /* 3C17E0 E00C2610 AC620014 */ sw $v0, 0x14($v1) /* 3C17E4 E00C2614 24620020 */ addiu $v0, $v1, 0x20 /* 3C17E8 E00C2618 AD220000 */ sw $v0, 0x0($t1) /* 3C17EC E00C261C 24620028 */ addiu $v0, $v1, 0x28 /* 3C17F0 E00C2620 AC730018 */ sw $s3, 0x18($v1) /* 3C17F4 E00C2624 AC60001C */ sw $zero, 0x1C($v1) /* 3C17F8 E00C2628 AD220000 */ sw $v0, 0x0($t1) /* 3C17FC E00C262C 24620030 */ addiu $v0, $v1, 0x30 /* 3C1800 E00C2630 00AF2825 */ or $a1, $a1, $t7 /* 3C1804 E00C2634 00882025 */ or $a0, $a0, $t0 /* 3C1808 E00C2638 AC670020 */ sw $a3, 0x20($v1) /* 3C180C E00C263C AC660024 */ sw $a2, 0x24($v1) /* 3C1810 E00C2640 AD220000 */ sw $v0, 0x0($t1) /* 3C1814 E00C2644 AC650028 */ sw $a1, 0x28($v1) /* 3C1818 E00C2648 46080002 */ mul.s $f0, $f0, $f8 /* 3C181C E00C264C 00000000 */ nop /* 3C1820 E00C2650 AC64002C */ sw $a0, 0x2C($v1) /* 3C1824 E00C2654 24630038 */ addiu $v1, $v1, 0x38 /* 3C1828 E00C2658 0040502D */ daddu $t2, $v0, $zero /* 3C182C E00C265C 4600303E */ c.le.s $f6, $f0 /* 3C1830 E00C2660 00000000 */ nop /* 3C1834 E00C2664 45010005 */ bc1t .LE00C267C /* 3C1838 E00C2668 AD230000 */ sw $v1, 0x0($t1) /* 3C183C E00C266C 4600038D */ trunc.w.s $f14, $f0 /* 3C1840 E00C2670 44027000 */ mfc1 $v0, $f14 /* 3C1844 E00C2674 080309A5 */ j .LE00C2694 /* 3C1848 E00C2678 3C04007D */ lui $a0, (0x7D07D0 >> 16) .LE00C267C: /* 3C184C E00C267C 46060001 */ sub.s $f0, $f0, $f6 /* 3C1850 E00C2680 4600038D */ trunc.w.s $f14, $f0 /* 3C1854 E00C2684 44027000 */ mfc1 $v0, $f14 /* 3C1858 E00C2688 00000000 */ nop /* 3C185C E00C268C 00541025 */ or $v0, $v0, $s4 /* 3C1860 E00C2690 3C04007D */ lui $a0, (0x7D07D0 >> 16) .LE00C2694: /* 3C1864 E00C2694 348407D0 */ ori $a0, $a0, (0x7D07D0 & 0xFFFF) /* 3C1868 E00C2698 3C05F548 */ lui $a1, (0xF5481080 >> 16) /* 3C186C E00C269C 34A51080 */ ori $a1, $a1, (0xF5481080 & 0xFFFF) /* 3C1870 E00C26A0 3C07F540 */ lui $a3, (0xF5401080 >> 16) /* 3C1874 E00C26A4 34E71080 */ ori $a3, $a3, (0xF5401080 & 0xFFFF) /* 3C1878 E00C26A8 3C060119 */ lui $a2, (0x119FA7E >> 16) /* 3C187C E00C26AC 34C6FA7E */ ori $a2, $a2, (0x119FA7E & 0xFFFF) /* 3C1880 E00C26B0 3C08011F */ lui $t0, (0x11FC000 >> 16) /* 3C1884 E00C26B4 3508C000 */ ori $t0, $t0, (0x11FC000 & 0xFFFF) /* 3C1888 E00C26B8 30420FFF */ andi $v0, $v0, 0xFFF /* 3C188C E00C26BC 8D230000 */ lw $v1, 0x0($t1) /* 3C1890 E00C26C0 004F1025 */ or $v0, $v0, $t7 /* 3C1894 E00C26C4 AD420000 */ sw $v0, 0x0($t2) /* 3C1898 E00C26C8 3C020900 */ lui $v0, %hi(D_09000000_415060) /* 3C189C E00C26CC 24420000 */ addiu $v0, $v0, %lo(D_09000000_415060) /* 3C18A0 E00C26D0 460A2002 */ mul.s $f0, $f4, $f10 /* 3C18A4 E00C26D4 00000000 */ nop /* 3C18A8 E00C26D8 AD440004 */ sw $a0, 0x4($t2) /* 3C18AC E00C26DC 0060202D */ daddu $a0, $v1, $zero /* 3C18B0 E00C26E0 24630008 */ addiu $v1, $v1, 0x8 /* 3C18B4 E00C26E4 AD230000 */ sw $v1, 0x0($t1) /* 3C18B8 E00C26E8 AC820004 */ sw $v0, 0x4($a0) /* 3C18BC E00C26EC 24620008 */ addiu $v0, $v1, 0x8 /* 3C18C0 E00C26F0 AC920000 */ sw $s2, 0x0($a0) /* 3C18C4 E00C26F4 AD220000 */ sw $v0, 0x0($t1) /* 3C18C8 E00C26F8 24620010 */ addiu $v0, $v1, 0x10 /* 3C18CC E00C26FC AC650000 */ sw $a1, 0x0($v1) /* 3C18D0 E00C2700 AC710004 */ sw $s1, 0x4($v1) /* 3C18D4 E00C2704 AD220000 */ sw $v0, 0x0($t1) /* 3C18D8 E00C2708 24620018 */ addiu $v0, $v1, 0x18 /* 3C18DC E00C270C 000B2880 */ sll $a1, $t3, 2 /* 3C18E0 E00C2710 30A50FFF */ andi $a1, $a1, 0xFFF /* 3C18E4 E00C2714 AC790008 */ sw $t9, 0x8($v1) /* 3C18E8 E00C2718 AC60000C */ sw $zero, 0xC($v1) /* 3C18EC E00C271C AD220000 */ sw $v0, 0x0($t1) /* 3C18F0 E00C2720 00B81025 */ or $v0, $a1, $t8 /* 3C18F4 E00C2724 2564000F */ addiu $a0, $t3, 0xF /* 3C18F8 E00C2728 00042080 */ sll $a0, $a0, 2 /* 3C18FC E00C272C 30840FFF */ andi $a0, $a0, 0xFFF /* 3C1900 E00C2730 AC620010 */ sw $v0, 0x10($v1) /* 3C1904 E00C2734 00901025 */ or $v0, $a0, $s0 /* 3C1908 E00C2738 AC620014 */ sw $v0, 0x14($v1) /* 3C190C E00C273C 24620020 */ addiu $v0, $v1, 0x20 /* 3C1910 E00C2740 AD220000 */ sw $v0, 0x0($t1) /* 3C1914 E00C2744 24620028 */ addiu $v0, $v1, 0x28 /* 3C1918 E00C2748 AC730018 */ sw $s3, 0x18($v1) /* 3C191C E00C274C AC60001C */ sw $zero, 0x1C($v1) /* 3C1920 E00C2750 AD220000 */ sw $v0, 0x0($t1) /* 3C1924 E00C2754 24620030 */ addiu $v0, $v1, 0x30 /* 3C1928 E00C2758 00AF2825 */ or $a1, $a1, $t7 /* 3C192C E00C275C 00882025 */ or $a0, $a0, $t0 /* 3C1930 E00C2760 AC670020 */ sw $a3, 0x20($v1) /* 3C1934 E00C2764 AC660024 */ sw $a2, 0x24($v1) /* 3C1938 E00C2768 AD220000 */ sw $v0, 0x0($t1) /* 3C193C E00C276C AC650028 */ sw $a1, 0x28($v1) /* 3C1940 E00C2770 46080002 */ mul.s $f0, $f0, $f8 /* 3C1944 E00C2774 00000000 */ nop /* 3C1948 E00C2778 AC64002C */ sw $a0, 0x2C($v1) /* 3C194C E00C277C 24630038 */ addiu $v1, $v1, 0x38 /* 3C1950 E00C2780 0040202D */ daddu $a0, $v0, $zero /* 3C1954 E00C2784 4600303E */ c.le.s $f6, $f0 /* 3C1958 E00C2788 00000000 */ nop /* 3C195C E00C278C 45010005 */ bc1t .LE00C27A4 /* 3C1960 E00C2790 AD230000 */ sw $v1, 0x0($t1) /* 3C1964 E00C2794 4600038D */ trunc.w.s $f14, $f0 /* 3C1968 E00C2798 44037000 */ mfc1 $v1, $f14 /* 3C196C E00C279C 080309EF */ j .LE00C27BC /* 3C1970 E00C27A0 3C02017D */ lui $v0, (0x17D07D0 >> 16) .LE00C27A4: /* 3C1974 E00C27A4 46060001 */ sub.s $f0, $f0, $f6 /* 3C1978 E00C27A8 4600038D */ trunc.w.s $f14, $f0 /* 3C197C E00C27AC 44037000 */ mfc1 $v1, $f14 /* 3C1980 E00C27B0 00000000 */ nop /* 3C1984 E00C27B4 00741825 */ or $v1, $v1, $s4 /* 3C1988 E00C27B8 3C02017D */ lui $v0, (0x17D07D0 >> 16) .LE00C27BC: /* 3C198C E00C27BC 344207D0 */ ori $v0, $v0, (0x17D07D0 & 0xFFFF) /* 3C1990 E00C27C0 30630FFF */ andi $v1, $v1, 0xFFF /* 3C1994 E00C27C4 006F1825 */ or $v1, $v1, $t7 /* 3C1998 E00C27C8 AC820004 */ sw $v0, 0x4($a0) /* 3C199C E00C27CC 2D82000A */ sltiu $v0, $t4, 0xA /* 3C19A0 E00C27D0 1040004B */ beqz $v0, .LE00C2900 /* 3C19A4 E00C27D4 AC830000 */ sw $v1, 0x0($a0) /* 3C19A8 E00C27D8 000C1080 */ sll $v0, $t4, 2 /* 3C19AC E00C27DC 3C01E00C */ lui $at, (0xE00C29A8 >> 16) /* 3C19B0 E00C27E0 00220821 */ addu $at, $at, $v0 /* 3C19B4 E00C27E4 8C2229A8 */ lw $v0, (0xE00C29A8 & 0xFFFF)($at) /* 3C19B8 E00C27E8 00400008 */ jr $v0 /* 3C19BC E00C27EC 00000000 */ nop /* 3C19C0 E00C27F0 3C040600 */ lui $a0, (0x6000204 >> 16) /* 3C19C4 E00C27F4 8D220000 */ lw $v0, 0x0($t1) /* 3C19C8 E00C27F8 34840204 */ ori $a0, $a0, (0x6000204 & 0xFFFF) /* 3C19CC E00C27FC 0040182D */ daddu $v1, $v0, $zero /* 3C19D0 E00C2800 24420008 */ addiu $v0, $v0, 0x8 /* 3C19D4 E00C2804 AD220000 */ sw $v0, 0x0($t1) /* 3C19D8 E00C2808 24020406 */ addiu $v0, $zero, 0x406 /* 3C19DC E00C280C AC640000 */ sw $a0, 0x0($v1) /* 3C19E0 E00C2810 08030A40 */ j .LE00C2900 /* 3C19E4 E00C2814 AC620004 */ sw $v0, 0x4($v1) /* 3C19E8 E00C2818 3C050602 */ lui $a1, (0x602080A >> 16) /* 3C19EC E00C281C 34A5080A */ ori $a1, $a1, (0x602080A & 0xFFFF) /* 3C19F0 E00C2820 3C040002 */ lui $a0, (0x20A04 >> 16) /* 3C19F4 E00C2824 8D220000 */ lw $v0, 0x0($t1) /* 3C19F8 E00C2828 08030A3B */ j .LE00C28EC /* 3C19FC E00C282C 34840A04 */ ori $a0, $a0, (0x20A04 & 0xFFFF) /* 3C1A00 E00C2830 3C050608 */ lui $a1, (0x6080C0E >> 16) /* 3C1A04 E00C2834 34A50C0E */ ori $a1, $a1, (0x6080C0E & 0xFFFF) /* 3C1A08 E00C2838 3C040008 */ lui $a0, (0x80E0A >> 16) /* 3C1A0C E00C283C 8D220000 */ lw $v0, 0x0($t1) /* 3C1A10 E00C2840 08030A3B */ j .LE00C28EC /* 3C1A14 E00C2844 34840E0A */ ori $a0, $a0, (0x80E0A & 0xFFFF) /* 3C1A18 E00C2848 3C05060C */ lui $a1, (0x60C1012 >> 16) /* 3C1A1C E00C284C 34A51012 */ ori $a1, $a1, (0x60C1012 & 0xFFFF) /* 3C1A20 E00C2850 3C04000C */ lui $a0, (0xC120E >> 16) /* 3C1A24 E00C2854 8D220000 */ lw $v0, 0x0($t1) /* 3C1A28 E00C2858 08030A3B */ j .LE00C28EC /* 3C1A2C E00C285C 3484120E */ ori $a0, $a0, (0xC120E & 0xFFFF) /* 3C1A30 E00C2860 3C050610 */ lui $a1, (0x6101416 >> 16) /* 3C1A34 E00C2864 34A51416 */ ori $a1, $a1, (0x6101416 & 0xFFFF) /* 3C1A38 E00C2868 3C040010 */ lui $a0, (0x101612 >> 16) /* 3C1A3C E00C286C 8D220000 */ lw $v0, 0x0($t1) /* 3C1A40 E00C2870 08030A3B */ j .LE00C28EC /* 3C1A44 E00C2874 34841612 */ ori $a0, $a0, (0x101612 & 0xFFFF) /* 3C1A48 E00C2878 3C050614 */ lui $a1, (0x614181A >> 16) /* 3C1A4C E00C287C 34A5181A */ ori $a1, $a1, (0x614181A & 0xFFFF) /* 3C1A50 E00C2880 3C040014 */ lui $a0, (0x141A16 >> 16) /* 3C1A54 E00C2884 8D220000 */ lw $v0, 0x0($t1) /* 3C1A58 E00C2888 08030A3B */ j .LE00C28EC /* 3C1A5C E00C288C 34841A16 */ ori $a0, $a0, (0x141A16 & 0xFFFF) /* 3C1A60 E00C2890 3C050618 */ lui $a1, (0x6181C1E >> 16) /* 3C1A64 E00C2894 34A51C1E */ ori $a1, $a1, (0x6181C1E & 0xFFFF) /* 3C1A68 E00C2898 3C040018 */ lui $a0, (0x181E1A >> 16) /* 3C1A6C E00C289C 8D220000 */ lw $v0, 0x0($t1) /* 3C1A70 E00C28A0 08030A3B */ j .LE00C28EC /* 3C1A74 E00C28A4 34841E1A */ ori $a0, $a0, (0x181E1A & 0xFFFF) /* 3C1A78 E00C28A8 3C05061C */ lui $a1, (0x61C2022 >> 16) /* 3C1A7C E00C28AC 34A52022 */ ori $a1, $a1, (0x61C2022 & 0xFFFF) /* 3C1A80 E00C28B0 3C04001C */ lui $a0, (0x1C221E >> 16) /* 3C1A84 E00C28B4 8D220000 */ lw $v0, 0x0($t1) /* 3C1A88 E00C28B8 08030A3B */ j .LE00C28EC /* 3C1A8C E00C28BC 3484221E */ ori $a0, $a0, (0x1C221E & 0xFFFF) /* 3C1A90 E00C28C0 3C050620 */ lui $a1, (0x6202426 >> 16) /* 3C1A94 E00C28C4 34A52426 */ ori $a1, $a1, (0x6202426 & 0xFFFF) /* 3C1A98 E00C28C8 3C040020 */ lui $a0, (0x202622 >> 16) /* 3C1A9C E00C28CC 8D220000 */ lw $v0, 0x0($t1) /* 3C1AA0 E00C28D0 08030A3B */ j .LE00C28EC /* 3C1AA4 E00C28D4 34842622 */ ori $a0, $a0, (0x202622 & 0xFFFF) /* 3C1AA8 E00C28D8 3C050624 */ lui $a1, (0x624282A >> 16) /* 3C1AAC E00C28DC 34A5282A */ ori $a1, $a1, (0x624282A & 0xFFFF) /* 3C1AB0 E00C28E0 3C040024 */ lui $a0, (0x242A26 >> 16) /* 3C1AB4 E00C28E4 8D220000 */ lw $v0, 0x0($t1) /* 3C1AB8 E00C28E8 34842A26 */ ori $a0, $a0, (0x242A26 & 0xFFFF) .LE00C28EC: /* 3C1ABC E00C28EC 0040182D */ daddu $v1, $v0, $zero /* 3C1AC0 E00C28F0 24420008 */ addiu $v0, $v0, 0x8 /* 3C1AC4 E00C28F4 AD220000 */ sw $v0, 0x0($t1) /* 3C1AC8 E00C28F8 AC650000 */ sw $a1, 0x0($v1) /* 3C1ACC E00C28FC AC640004 */ sw $a0, 0x4($v1) .LE00C2900: /* 3C1AD0 E00C2900 25CE000C */ addiu $t6, $t6, 0xC /* 3C1AD4 E00C2904 25AD0003 */ addiu $t5, $t5, 0x3 /* 3C1AD8 E00C2908 8D220000 */ lw $v0, 0x0($t1) /* 3C1ADC E00C290C 258C0001 */ addiu $t4, $t4, 0x1 /* 3C1AE0 E00C2910 0040182D */ daddu $v1, $v0, $zero /* 3C1AE4 E00C2914 24420008 */ addiu $v0, $v0, 0x8 /* 3C1AE8 E00C2918 AD220000 */ sw $v0, 0x0($t1) /* 3C1AEC E00C291C 2982000A */ slti $v0, $t4, 0xA /* 3C1AF0 E00C2920 AC730000 */ sw $s3, 0x0($v1) /* 3C1AF4 E00C2924 1440FEE0 */ bnez $v0, .LE00C24A8 /* 3C1AF8 E00C2928 AC600004 */ sw $zero, 0x4($v1) /* 3C1AFC E00C292C 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3C1B00 E00C2930 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3C1B04 E00C2934 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3C1B08 E00C2938 8C620000 */ lw $v0, 0x0($v1) /* 3C1B0C E00C293C 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3C1B10 E00C2940 0040202D */ daddu $a0, $v0, $zero /* 3C1B14 E00C2944 24420008 */ addiu $v0, $v0, 0x8 /* 3C1B18 E00C2948 AC620000 */ sw $v0, 0x0($v1) /* 3C1B1C E00C294C 24020040 */ addiu $v0, $zero, 0x40 /* 3C1B20 E00C2950 AC850000 */ sw $a1, 0x0($a0) /* 3C1B24 E00C2954 AC820004 */ sw $v0, 0x4($a0) /* 3C1B28 E00C2958 8FBF00B8 */ lw $ra, 0xB8($sp) /* 3C1B2C E00C295C 8FB700B4 */ lw $s7, 0xB4($sp) /* 3C1B30 E00C2960 8FB600B0 */ lw $s6, 0xB0($sp) /* 3C1B34 E00C2964 8FB500AC */ lw $s5, 0xAC($sp) /* 3C1B38 E00C2968 8FB400A8 */ lw $s4, 0xA8($sp) /* 3C1B3C E00C296C 8FB300A4 */ lw $s3, 0xA4($sp) /* 3C1B40 E00C2970 8FB200A0 */ lw $s2, 0xA0($sp) /* 3C1B44 E00C2974 8FB1009C */ lw $s1, 0x9C($sp) /* 3C1B48 E00C2978 8FB00098 */ lw $s0, 0x98($sp) /* 3C1B4C E00C297C 03E00008 */ jr $ra /* 3C1B50 E00C2980 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 3C1B54 E00C2984 00000000 */ nop /* 3C1B58 E00C2988 00000000 */ nop /* 3C1B5C E00C298C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void fright_jar_appendGfx(void* effect) { FrightJarFXData* data = ((EffectInstance*)effect)->data.frightJar; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_14 = data->unk_14; s32 unk_24 = data->unk_24; u32 alpha; s32 idx; Matrix4f sp10; Matrix4f sp50; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C); shim_guScaleF(sp50, -data->unk_28, data->unk_28, data->unk_28); shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09008BE0_3CA780); idx = 54 - unk_14; if (idx < 0) { idx = 0; } gSPVertex(gMainGfxPos++, &D_09004040_3C5BE0[idx], 22, 0); alpha = D_E00C2990[unk_14 % 16]; gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha); for (i = 0; i < 10; i++) { s32 temp1; f32 temp2; f32 temp3; if (i < 5) { temp1 = i * 12; } else { temp1 = i * 12 + 4; } temp2 = i * 0.1f; temp3 = unk_24 * (1.0f - temp2) * 2.0f; if (temp3 > 255.0f) { temp3 = 255.0f; } gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, temp3); gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 64, &D_09002020_3C3BC0); gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 8, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14); gDPLoadSync(gMainGfxPos++); gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, temp1 * 4, 254, (temp1 + 15) * 4); gDPPipeSync(gMainGfxPos++); gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 8, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, temp1 * 4, 508, (temp1 + 15) * 4); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, temp2 * 128.0f * 4.0f, 2000, 2000); gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 64, &D_09000000_3C1BA0); gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 8, 0x80, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14); gDPLoadSync(gMainGfxPos++); gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, temp1 * 4, 254, (temp1 + 15) * 4); gDPPipeSync(gMainGfxPos++); gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 8, 0x80, 1, 1, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14); gDPSetTileSize(gMainGfxPos++, 1, 0, temp1 * 4, 508, (temp1 + 15) * 4); gDPSetTileSize(gMainGfxPos++, 1, 0, temp2 * 128.0f * 4.0f, 2000, 2000); switch (i) { case 0: gSP2Triangles(gMainGfxPos++, 0, 1, 2, 0, 0, 2, 3, 0); break; case 1: gSP2Triangles(gMainGfxPos++, 1, 4, 5, 0, 1, 5, 2, 0); break; case 2: gSP2Triangles(gMainGfxPos++, 4, 6, 7, 0, 4, 7, 5, 0); break; case 3: gSP2Triangles(gMainGfxPos++, 6, 8, 9, 0, 6, 9, 7, 0); break; case 4: gSP2Triangles(gMainGfxPos++, 8, 10, 11, 0, 8, 11, 9, 0); break; case 5: gSP2Triangles(gMainGfxPos++, 10, 12, 13, 0, 10, 13, 11, 0); break; case 6: gSP2Triangles(gMainGfxPos++, 12, 14, 15, 0, 12, 15, 13, 0); break; case 7: gSP2Triangles(gMainGfxPos++, 14, 16, 17, 0, 14, 17, 15, 0); break; case 8: gSP2Triangles(gMainGfxPos++, 16, 18, 19, 0, 16, 19, 17, 0); break; case 9: gSP2Triangles(gMainGfxPos++, 18, 20, 21, 0, 18, 21, 19, 0); break; } gDPPipeSync(gMainGfxPos++); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_npc /* 153D0 80039FD0 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 153D4 80039FD4 AFB1009C */ sw $s1, 0x9C($sp) /* 153D8 80039FD8 AFBF00A0 */ sw $ra, 0xA0($sp) /* 153DC 80039FDC AFB00098 */ sw $s0, 0x98($sp) /* 153E0 80039FE0 F7B600B0 */ sdc1 $f22, 0xB0($sp) /* 153E4 80039FE4 F7B400A8 */ sdc1 $f20, 0xA8($sp) /* 153E8 80039FE8 0C00E769 */ jal npc_get_render_yaw /* 153EC 80039FEC 0080882D */ daddu $s1, $a0, $zero /* 153F0 80039FF0 27A40018 */ addiu $a0, $sp, 0x18 /* 153F4 80039FF4 822200AB */ lb $v0, 0xAB($s1) /* 153F8 80039FF8 C624003C */ lwc1 $f4, 0x3C($s1) /* 153FC 80039FFC 44821000 */ mtc1 $v0, $f2 /* 15400 8003A000 00000000 */ nop /* 15404 8003A004 468010A0 */ cvt.s.w $f2, $f2 /* 15408 8003A008 46022100 */ add.s $f4, $f4, $f2 /* 1540C 8003A00C 8E250038 */ lw $a1, 0x38($s1) /* 15410 8003A010 8E270040 */ lw $a3, 0x40($s1) /* 15414 8003A014 44062000 */ mfc1 $a2, $f4 /* 15418 8003A018 0C019E40 */ jal guTranslateF /* 1541C 8003A01C 46000586 */ mov.s $f22, $f0 /* 15420 8003A020 8E220000 */ lw $v0, 0x0($s1) /* 15424 8003A024 30420080 */ andi $v0, $v0, 0x80 /* 15428 8003A028 10400007 */ beqz $v0, .L8003A048 /* 1542C 8003A02C 27B00058 */ addiu $s0, $sp, 0x58 /* 15430 8003A030 0C00E11E */ jal mtx_ident_mirror_y /* 15434 8003A034 0200202D */ daddu $a0, $s0, $zero /* 15438 8003A038 0200202D */ daddu $a0, $s0, $zero /* 1543C 8003A03C 27A50018 */ addiu $a1, $sp, 0x18 /* 15440 8003A040 0C019D80 */ jal guMtxCatF /* 15444 8003A044 00A0302D */ daddu $a2, $a1, $zero .L8003A048: /* 15448 8003A048 C6200050 */ lwc1 $f0, 0x50($s1) /* 1544C 8003A04C 4480A000 */ mtc1 $zero, $f20 /* 15450 8003A050 00000000 */ nop /* 15454 8003A054 46140032 */ c.eq.s $f0, $f20 /* 15458 8003A058 00000000 */ nop /* 1545C 8003A05C 4501000A */ bc1t .L8003A088 /* 15460 8003A060 27B00058 */ addiu $s0, $sp, 0x58 /* 15464 8003A064 4405A000 */ mfc1 $a1, $f20 /* 15468 8003A068 44060000 */ mfc1 $a2, $f0 /* 1546C 8003A06C 4407A000 */ mfc1 $a3, $f20 /* 15470 8003A070 0C019E40 */ jal guTranslateF /* 15474 8003A074 0200202D */ daddu $a0, $s0, $zero /* 15478 8003A078 0200202D */ daddu $a0, $s0, $zero /* 1547C 8003A07C 27A50018 */ addiu $a1, $sp, 0x18 /* 15480 8003A080 0C019D80 */ jal guMtxCatF /* 15484 8003A084 00A0302D */ daddu $a2, $a1, $zero .L8003A088: /* 15488 8003A088 C6200048 */ lwc1 $f0, 0x48($s1) /* 1548C 8003A08C 46140032 */ c.eq.s $f0, $f20 /* 15490 8003A090 00000000 */ nop /* 15494 8003A094 4501000B */ bc1t .L8003A0C4 /* 15498 8003A098 27B00058 */ addiu $s0, $sp, 0x58 /* 1549C 8003A09C E7B40010 */ swc1 $f20, 0x10($sp) /* 154A0 8003A0A0 8E250048 */ lw $a1, 0x48($s1) /* 154A4 8003A0A4 4406A000 */ mfc1 $a2, $f20 /* 154A8 8003A0A8 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 154AC 8003A0AC 0C019EC8 */ jal guRotateF /* 154B0 8003A0B0 0200202D */ daddu $a0, $s0, $zero /* 154B4 8003A0B4 0200202D */ daddu $a0, $s0, $zero /* 154B8 8003A0B8 27A50018 */ addiu $a1, $sp, 0x18 /* 154BC 8003A0BC 0C019D80 */ jal guMtxCatF /* 154C0 8003A0C0 00A0302D */ daddu $a2, $a1, $zero .L8003A0C4: /* 154C4 8003A0C4 C6200044 */ lwc1 $f0, 0x44($s1) /* 154C8 8003A0C8 46140032 */ c.eq.s $f0, $f20 /* 154CC 8003A0CC 00000000 */ nop /* 154D0 8003A0D0 4501000B */ bc1t .L8003A100 /* 154D4 8003A0D4 27B00058 */ addiu $s0, $sp, 0x58 /* 154D8 8003A0D8 E7B40010 */ swc1 $f20, 0x10($sp) /* 154DC 8003A0DC 8E250044 */ lw $a1, 0x44($s1) /* 154E0 8003A0E0 3C063F80 */ lui $a2, (0x3F800000 >> 16) /* 154E4 8003A0E4 4407A000 */ mfc1 $a3, $f20 /* 154E8 8003A0E8 0C019EC8 */ jal guRotateF /* 154EC 8003A0EC 0200202D */ daddu $a0, $s0, $zero /* 154F0 8003A0F0 0200202D */ daddu $a0, $s0, $zero /* 154F4 8003A0F4 27A50018 */ addiu $a1, $sp, 0x18 /* 154F8 8003A0F8 0C019D80 */ jal guMtxCatF /* 154FC 8003A0FC 00A0302D */ daddu $a2, $a1, $zero .L8003A100: /* 15500 8003A100 C620004C */ lwc1 $f0, 0x4C($s1) /* 15504 8003A104 46140032 */ c.eq.s $f0, $f20 /* 15508 8003A108 00000000 */ nop /* 1550C 8003A10C 4501000E */ bc1t .L8003A148 /* 15510 8003A110 27B00058 */ addiu $s0, $sp, 0x58 /* 15514 8003A114 4406A000 */ mfc1 $a2, $f20 /* 15518 8003A118 4407A000 */ mfc1 $a3, $f20 /* 1551C 8003A11C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 15520 8003A120 44810000 */ mtc1 $at, $f0 /* 15524 8003A124 00000000 */ nop /* 15528 8003A128 E7A00010 */ swc1 $f0, 0x10($sp) /* 1552C 8003A12C 8E25004C */ lw $a1, 0x4C($s1) /* 15530 8003A130 0C019EC8 */ jal guRotateF /* 15534 8003A134 0200202D */ daddu $a0, $s0, $zero /* 15538 8003A138 0200202D */ daddu $a0, $s0, $zero /* 1553C 8003A13C 27A50018 */ addiu $a1, $sp, 0x18 /* 15540 8003A140 0C019D80 */ jal guMtxCatF /* 15544 8003A144 00A0302D */ daddu $a2, $a1, $zero .L8003A148: /* 15548 8003A148 C6200050 */ lwc1 $f0, 0x50($s1) /* 1554C 8003A14C 46140032 */ c.eq.s $f0, $f20 /* 15550 8003A150 00000000 */ nop /* 15554 8003A154 4501000B */ bc1t .L8003A184 /* 15558 8003A158 27B00058 */ addiu $s0, $sp, 0x58 /* 1555C 8003A15C 46000007 */ neg.s $f0, $f0 /* 15560 8003A160 4405A000 */ mfc1 $a1, $f20 /* 15564 8003A164 4407A000 */ mfc1 $a3, $f20 /* 15568 8003A168 44060000 */ mfc1 $a2, $f0 /* 1556C 8003A16C 0C019E40 */ jal guTranslateF /* 15570 8003A170 0200202D */ daddu $a0, $s0, $zero /* 15574 8003A174 0200202D */ daddu $a0, $s0, $zero /* 15578 8003A178 27A50018 */ addiu $a1, $sp, 0x18 /* 1557C 8003A17C 0C019D80 */ jal guMtxCatF /* 15580 8003A180 00A0302D */ daddu $a2, $a1, $zero .L8003A184: /* 15584 8003A184 C6220318 */ lwc1 $f2, 0x318($s1) /* 15588 8003A188 46141032 */ c.eq.s $f2, $f20 /* 1558C 8003A18C 00000000 */ nop /* 15590 8003A190 45000006 */ bc1f .L8003A1AC /* 15594 8003A194 00000000 */ nop /* 15598 8003A198 C620031C */ lwc1 $f0, 0x31C($s1) /* 1559C 8003A19C 46140032 */ c.eq.s $f0, $f20 /* 155A0 8003A1A0 00000000 */ nop /* 155A4 8003A1A4 4501000A */ bc1t .L8003A1D0 /* 155A8 8003A1A8 00000000 */ nop .L8003A1AC: /* 155AC 8003A1AC 44051000 */ mfc1 $a1, $f2 /* 155B0 8003A1B0 8E26031C */ lw $a2, 0x31C($s1) /* 155B4 8003A1B4 4407A000 */ mfc1 $a3, $f20 /* 155B8 8003A1B8 0C019E40 */ jal guTranslateF /* 155BC 8003A1BC 27A40018 */ addiu $a0, $sp, 0x18 /* 155C0 8003A1C0 27A40058 */ addiu $a0, $sp, 0x58 /* 155C4 8003A1C4 27A50018 */ addiu $a1, $sp, 0x18 /* 155C8 8003A1C8 0C019D80 */ jal guMtxCatF /* 155CC 8003A1CC 00A0302D */ daddu $a2, $a1, $zero .L8003A1D0: /* 155D0 8003A1D0 C6200054 */ lwc1 $f0, 0x54($s1) /* 155D4 8003A1D4 3C01800A */ lui $at, %hi(D_80098480) /* 155D8 8003A1D8 D4268480 */ ldc1 $f6, %lo(D_80098480)($at) /* 155DC 8003A1DC 46000021 */ cvt.d.s $f0, $f0 /* 155E0 8003A1E0 46260002 */ mul.d $f0, $f0, $f6 /* 155E4 8003A1E4 00000000 */ nop /* 155E8 8003A1E8 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 155EC 8003A1EC 44812800 */ mtc1 $at, $f5 /* 155F0 8003A1F0 44802000 */ mtc1 $zero, $f4 /* 155F4 8003A1F4 00000000 */ nop /* 155F8 8003A1F8 46240032 */ c.eq.d $f0, $f4 /* 155FC 8003A1FC 00000000 */ nop /* 15600 8003A200 45000014 */ bc1f .L8003A254 /* 15604 8003A204 00000000 */ nop /* 15608 8003A208 C6200058 */ lwc1 $f0, 0x58($s1) /* 1560C 8003A20C C6220320 */ lwc1 $f2, 0x320($s1) /* 15610 8003A210 46020002 */ mul.s $f0, $f0, $f2 /* 15614 8003A214 00000000 */ nop /* 15618 8003A218 46000021 */ cvt.d.s $f0, $f0 /* 1561C 8003A21C 46260002 */ mul.d $f0, $f0, $f6 /* 15620 8003A220 00000000 */ nop /* 15624 8003A224 46240032 */ c.eq.d $f0, $f4 /* 15628 8003A228 00000000 */ nop /* 1562C 8003A22C 45000009 */ bc1f .L8003A254 /* 15630 8003A230 00000000 */ nop /* 15634 8003A234 C620005C */ lwc1 $f0, 0x5C($s1) /* 15638 8003A238 46000021 */ cvt.d.s $f0, $f0 /* 1563C 8003A23C 46260002 */ mul.d $f0, $f0, $f6 /* 15640 8003A240 00000000 */ nop /* 15644 8003A244 46240032 */ c.eq.d $f0, $f4 /* 15648 8003A248 00000000 */ nop /* 1564C 8003A24C 4501001F */ bc1t .L8003A2CC /* 15650 8003A250 00000000 */ nop .L8003A254: /* 15654 8003A254 C6260054 */ lwc1 $f6, 0x54($s1) /* 15658 8003A258 3C01800A */ lui $at, %hi(D_80098488) /* 1565C 8003A25C D4288488 */ ldc1 $f8, %lo(D_80098488)($at) /* 15660 8003A260 460031A1 */ cvt.d.s $f6, $f6 /* 15664 8003A264 46283182 */ mul.d $f6, $f6, $f8 /* 15668 8003A268 00000000 */ nop /* 1566C 8003A26C C622005C */ lwc1 $f2, 0x5C($s1) /* 15670 8003A270 460010A1 */ cvt.d.s $f2, $f2 /* 15674 8003A274 46281082 */ mul.d $f2, $f2, $f8 /* 15678 8003A278 00000000 */ nop /* 1567C 8003A27C C6200058 */ lwc1 $f0, 0x58($s1) /* 15680 8003A280 C6240320 */ lwc1 $f4, 0x320($s1) /* 15684 8003A284 46040002 */ mul.s $f0, $f0, $f4 /* 15688 8003A288 00000000 */ nop /* 1568C 8003A28C 46000021 */ cvt.d.s $f0, $f0 /* 15690 8003A290 46280002 */ mul.d $f0, $f0, $f8 /* 15694 8003A294 00000000 */ nop /* 15698 8003A298 27B00058 */ addiu $s0, $sp, 0x58 /* 1569C 8003A29C 462031A0 */ cvt.s.d $f6, $f6 /* 156A0 8003A2A0 462010A0 */ cvt.s.d $f2, $f2 /* 156A4 8003A2A4 44053000 */ mfc1 $a1, $f6 /* 156A8 8003A2A8 44071000 */ mfc1 $a3, $f2 /* 156AC 8003A2AC 46200020 */ cvt.s.d $f0, $f0 /* 156B0 8003A2B0 44060000 */ mfc1 $a2, $f0 /* 156B4 8003A2B4 0C019DF0 */ jal guScaleF /* 156B8 8003A2B8 0200202D */ daddu $a0, $s0, $zero /* 156BC 8003A2BC 0200202D */ daddu $a0, $s0, $zero /* 156C0 8003A2C0 27A50018 */ addiu $a1, $sp, 0x18 /* 156C4 8003A2C4 0C019D80 */ jal guMtxCatF /* 156C8 8003A2C8 00A0302D */ daddu $a2, $a1, $zero .L8003A2CC: /* 156CC 8003A2CC 8E230000 */ lw $v1, 0x0($s1) /* 156D0 8003A2D0 3C024000 */ lui $v0, (0x40000000 >> 16) /* 156D4 8003A2D4 00621024 */ and $v0, $v1, $v0 /* 156D8 8003A2D8 14400014 */ bnez $v0, .L8003A32C /* 156DC 8003A2DC 0220202D */ daddu $a0, $s1, $zero /* 156E0 8003A2E0 3C020100 */ lui $v0, (0x1000000 >> 16) /* 156E4 8003A2E4 00621024 */ and $v0, $v1, $v0 /* 156E8 8003A2E8 14400017 */ bnez $v0, .L8003A348 /* 156EC 8003A2EC 00000000 */ nop /* 156F0 8003A2F0 8E220028 */ lw $v0, 0x28($s1) /* 156F4 8003A2F4 10400014 */ beqz $v0, .L8003A348 /* 156F8 8003A2F8 00000000 */ nop /* 156FC 8003A2FC 8E220024 */ lw $v0, 0x24($s1) /* 15700 8003A300 04400011 */ bltz $v0, .L8003A348 /* 15704 8003A304 00000000 */ nop /* 15708 8003A308 4600B28D */ trunc.w.s $f10, $f22 /* 1570C 8003A30C 44055000 */ mfc1 $a1, $f10 /* 15710 8003A310 0C00ED1F */ jal npc_draw_with_palswap /* 15714 8003A314 27A60018 */ addiu $a2, $sp, 0x18 /* 15718 8003A318 8E240024 */ lw $a0, 0x24($s1) /* 1571C 8003A31C 0C0B7972 */ jal spr_get_notify_value /* 15720 8003A320 00000000 */ nop /* 15724 8003A324 0800E8D2 */ j .L8003A348 /* 15728 8003A328 AE22002C */ sw $v0, 0x2C($s1) .L8003A32C: /* 1572C 8003A32C 4600B28D */ trunc.w.s $f10, $f22 /* 15730 8003A330 44055000 */ mfc1 $a1, $f10 /* 15734 8003A334 0C00ED1F */ jal npc_draw_with_palswap /* 15738 8003A338 27A60018 */ addiu $a2, $sp, 0x18 /* 1573C 8003A33C 0C0B77B1 */ jal func_802DDEC4 /* 15740 8003A340 24040001 */ addiu $a0, $zero, 0x1 /* 15744 8003A344 AE22002C */ sw $v0, 0x2C($s1) .L8003A348: /* 15748 8003A348 8E220000 */ lw $v0, 0x0($s1) /* 1574C 8003A34C 3C030002 */ lui $v1, (0x20000 >> 16) /* 15750 8003A350 00431024 */ and $v0, $v0, $v1 /* 15754 8003A354 1040008E */ beqz $v0, .L8003A590 /* 15758 8003A358 00000000 */ nop /* 1575C 8003A35C 822200AB */ lb $v0, 0xAB($s1) /* 15760 8003A360 C622003C */ lwc1 $f2, 0x3C($s1) /* 15764 8003A364 44820000 */ mtc1 $v0, $f0 /* 15768 8003A368 00000000 */ nop /* 1576C 8003A36C 46800020 */ cvt.s.w $f0, $f0 /* 15770 8003A370 46001080 */ add.s $f2, $f2, $f0 /* 15774 8003A374 C6200040 */ lwc1 $f0, 0x40($s1) /* 15778 8003A378 8E250038 */ lw $a1, 0x38($s1) /* 1577C 8003A37C 46000007 */ neg.s $f0, $f0 /* 15780 8003A380 44070000 */ mfc1 $a3, $f0 /* 15784 8003A384 44061000 */ mfc1 $a2, $f2 /* 15788 8003A388 0C019E40 */ jal guTranslateF /* 1578C 8003A38C 27A40018 */ addiu $a0, $sp, 0x18 /* 15790 8003A390 8E220000 */ lw $v0, 0x0($s1) /* 15794 8003A394 30420080 */ andi $v0, $v0, 0x80 /* 15798 8003A398 10400007 */ beqz $v0, .L8003A3B8 /* 1579C 8003A39C 27B00058 */ addiu $s0, $sp, 0x58 /* 157A0 8003A3A0 0C00E11E */ jal mtx_ident_mirror_y /* 157A4 8003A3A4 0200202D */ daddu $a0, $s0, $zero /* 157A8 8003A3A8 0200202D */ daddu $a0, $s0, $zero /* 157AC 8003A3AC 27A50018 */ addiu $a1, $sp, 0x18 /* 157B0 8003A3B0 0C019D80 */ jal guMtxCatF /* 157B4 8003A3B4 00A0302D */ daddu $a2, $a1, $zero .L8003A3B8: /* 157B8 8003A3B8 C6200048 */ lwc1 $f0, 0x48($s1) /* 157BC 8003A3BC 44801000 */ mtc1 $zero, $f2 /* 157C0 8003A3C0 00000000 */ nop /* 157C4 8003A3C4 46020032 */ c.eq.s $f0, $f2 /* 157C8 8003A3C8 00000000 */ nop /* 157CC 8003A3CC 4500000B */ bc1f .L8003A3FC /* 157D0 8003A3D0 27B00058 */ addiu $s0, $sp, 0x58 /* 157D4 8003A3D4 C6200044 */ lwc1 $f0, 0x44($s1) /* 157D8 8003A3D8 46020032 */ c.eq.s $f0, $f2 /* 157DC 8003A3DC 00000000 */ nop /* 157E0 8003A3E0 45000006 */ bc1f .L8003A3FC /* 157E4 8003A3E4 00000000 */ nop /* 157E8 8003A3E8 C620004C */ lwc1 $f0, 0x4C($s1) /* 157EC 8003A3EC 46020032 */ c.eq.s $f0, $f2 /* 157F0 8003A3F0 00000000 */ nop /* 157F4 8003A3F4 4501000A */ bc1t .L8003A420 /* 157F8 8003A3F8 00000000 */ nop .L8003A3FC: /* 157FC 8003A3FC 8E250044 */ lw $a1, 0x44($s1) /* 15800 8003A400 8E260048 */ lw $a2, 0x48($s1) /* 15804 8003A404 8E27004C */ lw $a3, 0x4C($s1) /* 15808 8003A408 0C0190B4 */ jal guRotateRPYF /* 1580C 8003A40C 0200202D */ daddu $a0, $s0, $zero /* 15810 8003A410 0200202D */ daddu $a0, $s0, $zero /* 15814 8003A414 27A50018 */ addiu $a1, $sp, 0x18 /* 15818 8003A418 0C019D80 */ jal guMtxCatF /* 1581C 8003A41C 00A0302D */ daddu $a2, $a1, $zero .L8003A420: /* 15820 8003A420 C6200054 */ lwc1 $f0, 0x54($s1) /* 15824 8003A424 3C01800A */ lui $at, %hi(D_80098490) /* 15828 8003A428 D4268490 */ ldc1 $f6, %lo(D_80098490)($at) /* 1582C 8003A42C 46000021 */ cvt.d.s $f0, $f0 /* 15830 8003A430 46260002 */ mul.d $f0, $f0, $f6 /* 15834 8003A434 00000000 */ nop /* 15838 8003A438 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 1583C 8003A43C 44812800 */ mtc1 $at, $f5 /* 15840 8003A440 44802000 */ mtc1 $zero, $f4 /* 15844 8003A444 00000000 */ nop /* 15848 8003A448 46240032 */ c.eq.d $f0, $f4 /* 1584C 8003A44C 00000000 */ nop /* 15850 8003A450 45000014 */ bc1f .L8003A4A4 /* 15854 8003A454 00000000 */ nop /* 15858 8003A458 C6200058 */ lwc1 $f0, 0x58($s1) /* 1585C 8003A45C C6220320 */ lwc1 $f2, 0x320($s1) /* 15860 8003A460 46020002 */ mul.s $f0, $f0, $f2 /* 15864 8003A464 00000000 */ nop /* 15868 8003A468 46000021 */ cvt.d.s $f0, $f0 /* 1586C 8003A46C 46260002 */ mul.d $f0, $f0, $f6 /* 15870 8003A470 00000000 */ nop /* 15874 8003A474 46240032 */ c.eq.d $f0, $f4 /* 15878 8003A478 00000000 */ nop /* 1587C 8003A47C 45000009 */ bc1f .L8003A4A4 /* 15880 8003A480 00000000 */ nop /* 15884 8003A484 C620005C */ lwc1 $f0, 0x5C($s1) /* 15888 8003A488 46000021 */ cvt.d.s $f0, $f0 /* 1588C 8003A48C 46260002 */ mul.d $f0, $f0, $f6 /* 15890 8003A490 00000000 */ nop /* 15894 8003A494 46240032 */ c.eq.d $f0, $f4 /* 15898 8003A498 00000000 */ nop /* 1589C 8003A49C 4501001F */ bc1t .L8003A51C /* 158A0 8003A4A0 00000000 */ nop .L8003A4A4: /* 158A4 8003A4A4 C6260054 */ lwc1 $f6, 0x54($s1) /* 158A8 8003A4A8 3C01800A */ lui $at, %hi(D_80098498) /* 158AC 8003A4AC D4288498 */ ldc1 $f8, %lo(D_80098498)($at) /* 158B0 8003A4B0 460031A1 */ cvt.d.s $f6, $f6 /* 158B4 8003A4B4 46283182 */ mul.d $f6, $f6, $f8 /* 158B8 8003A4B8 00000000 */ nop /* 158BC 8003A4BC C624005C */ lwc1 $f4, 0x5C($s1) /* 158C0 8003A4C0 46002121 */ cvt.d.s $f4, $f4 /* 158C4 8003A4C4 46282102 */ mul.d $f4, $f4, $f8 /* 158C8 8003A4C8 00000000 */ nop /* 158CC 8003A4CC C6200058 */ lwc1 $f0, 0x58($s1) /* 158D0 8003A4D0 C6220320 */ lwc1 $f2, 0x320($s1) /* 158D4 8003A4D4 46020002 */ mul.s $f0, $f0, $f2 /* 158D8 8003A4D8 00000000 */ nop /* 158DC 8003A4DC 46000021 */ cvt.d.s $f0, $f0 /* 158E0 8003A4E0 46280002 */ mul.d $f0, $f0, $f8 /* 158E4 8003A4E4 00000000 */ nop /* 158E8 8003A4E8 27B00058 */ addiu $s0, $sp, 0x58 /* 158EC 8003A4EC 462031A0 */ cvt.s.d $f6, $f6 /* 158F0 8003A4F0 46202120 */ cvt.s.d $f4, $f4 /* 158F4 8003A4F4 44053000 */ mfc1 $a1, $f6 /* 158F8 8003A4F8 44072000 */ mfc1 $a3, $f4 /* 158FC 8003A4FC 46200020 */ cvt.s.d $f0, $f0 /* 15900 8003A500 44060000 */ mfc1 $a2, $f0 /* 15904 8003A504 0C019DF0 */ jal guScaleF /* 15908 8003A508 0200202D */ daddu $a0, $s0, $zero /* 1590C 8003A50C 0200202D */ daddu $a0, $s0, $zero /* 15910 8003A510 27A50018 */ addiu $a1, $sp, 0x18 /* 15914 8003A514 0C019D80 */ jal guMtxCatF /* 15918 8003A518 00A0302D */ daddu $a2, $a1, $zero .L8003A51C: /* 1591C 8003A51C 8E230000 */ lw $v1, 0x0($s1) /* 15920 8003A520 3C024000 */ lui $v0, (0x40000000 >> 16) /* 15924 8003A524 00621024 */ and $v0, $v1, $v0 /* 15928 8003A528 14400011 */ bnez $v0, .L8003A570 /* 1592C 8003A52C 27A20018 */ addiu $v0, $sp, 0x18 /* 15930 8003A530 3C020100 */ lui $v0, (0x1000000 >> 16) /* 15934 8003A534 00621024 */ and $v0, $v1, $v0 /* 15938 8003A538 14400015 */ bnez $v0, .L8003A590 /* 1593C 8003A53C 00000000 */ nop /* 15940 8003A540 8E220028 */ lw $v0, 0x28($s1) /* 15944 8003A544 10400012 */ beqz $v0, .L8003A590 /* 15948 8003A548 0000302D */ daddu $a2, $zero, $zero /* 1594C 8003A54C 4600B28D */ trunc.w.s $f10, $f22 /* 15950 8003A550 44055000 */ mfc1 $a1, $f10 /* 15954 8003A554 27A20018 */ addiu $v0, $sp, 0x18 /* 15958 8003A558 AFA20010 */ sw $v0, 0x10($sp) /* 1595C 8003A55C 8E240024 */ lw $a0, 0x24($s1) /* 15960 8003A560 0C0B78F6 */ jal spr_draw_npc_sprite /* 15964 8003A564 00C0382D */ daddu $a3, $a2, $zero /* 15968 8003A568 0800E964 */ j .L8003A590 /* 1596C 8003A56C 00000000 */ nop .L8003A570: /* 15970 8003A570 AFA20010 */ sw $v0, 0x10($sp) /* 15974 8003A574 3C044000 */ lui $a0, (0x40000001 >> 16) /* 15978 8003A578 34840001 */ ori $a0, $a0, (0x40000001 & 0xFFFF) /* 1597C 8003A57C 4600B28D */ trunc.w.s $f10, $f22 /* 15980 8003A580 44055000 */ mfc1 $a1, $f10 /* 15984 8003A584 0000302D */ daddu $a2, $zero, $zero /* 15988 8003A588 0C0B7710 */ jal spr_draw_player_sprite /* 1598C 8003A58C 00C0382D */ daddu $a3, $a2, $zero .L8003A590: /* 15990 8003A590 8E220000 */ lw $v0, 0x0($s1) /* 15994 8003A594 3C030008 */ lui $v1, (0x80000 >> 16) /* 15998 8003A598 00431024 */ and $v0, $v0, $v1 /* 1599C 8003A59C 1040008A */ beqz $v0, .L8003A7C8 /* 159A0 8003A5A0 00000000 */ nop /* 159A4 8003A5A4 822200AB */ lb $v0, 0xAB($s1) /* 159A8 8003A5A8 C622003C */ lwc1 $f2, 0x3C($s1) /* 159AC 8003A5AC 44820000 */ mtc1 $v0, $f0 /* 159B0 8003A5B0 00000000 */ nop /* 159B4 8003A5B4 46800020 */ cvt.s.w $f0, $f0 /* 159B8 8003A5B8 46001080 */ add.s $f2, $f2, $f0 /* 159BC 8003A5BC 8E250038 */ lw $a1, 0x38($s1) /* 159C0 8003A5C0 8E270040 */ lw $a3, 0x40($s1) /* 159C4 8003A5C4 46001087 */ neg.s $f2, $f2 /* 159C8 8003A5C8 44061000 */ mfc1 $a2, $f2 /* 159CC 8003A5CC 0C019E40 */ jal guTranslateF /* 159D0 8003A5D0 27A40018 */ addiu $a0, $sp, 0x18 /* 159D4 8003A5D4 27B00058 */ addiu $s0, $sp, 0x58 /* 159D8 8003A5D8 0C00E11E */ jal mtx_ident_mirror_y /* 159DC 8003A5DC 0200202D */ daddu $a0, $s0, $zero /* 159E0 8003A5E0 0200202D */ daddu $a0, $s0, $zero /* 159E4 8003A5E4 27A50018 */ addiu $a1, $sp, 0x18 /* 159E8 8003A5E8 0C019D80 */ jal guMtxCatF /* 159EC 8003A5EC 00A0302D */ daddu $a2, $a1, $zero /* 159F0 8003A5F0 C6200048 */ lwc1 $f0, 0x48($s1) /* 159F4 8003A5F4 44801000 */ mtc1 $zero, $f2 /* 159F8 8003A5F8 00000000 */ nop /* 159FC 8003A5FC 46020032 */ c.eq.s $f0, $f2 /* 15A00 8003A600 00000000 */ nop /* 15A04 8003A604 4500000B */ bc1f .L8003A634 /* 15A08 8003A608 27B00058 */ addiu $s0, $sp, 0x58 /* 15A0C 8003A60C C6200044 */ lwc1 $f0, 0x44($s1) /* 15A10 8003A610 46020032 */ c.eq.s $f0, $f2 /* 15A14 8003A614 00000000 */ nop /* 15A18 8003A618 45000006 */ bc1f .L8003A634 /* 15A1C 8003A61C 00000000 */ nop /* 15A20 8003A620 C620004C */ lwc1 $f0, 0x4C($s1) /* 15A24 8003A624 46020032 */ c.eq.s $f0, $f2 /* 15A28 8003A628 00000000 */ nop /* 15A2C 8003A62C 4501000A */ bc1t .L8003A658 /* 15A30 8003A630 00000000 */ nop .L8003A634: /* 15A34 8003A634 8E250044 */ lw $a1, 0x44($s1) /* 15A38 8003A638 8E260048 */ lw $a2, 0x48($s1) /* 15A3C 8003A63C 8E27004C */ lw $a3, 0x4C($s1) /* 15A40 8003A640 0C0190B4 */ jal guRotateRPYF /* 15A44 8003A644 0200202D */ daddu $a0, $s0, $zero /* 15A48 8003A648 0200202D */ daddu $a0, $s0, $zero /* 15A4C 8003A64C 27A50018 */ addiu $a1, $sp, 0x18 /* 15A50 8003A650 0C019D80 */ jal guMtxCatF /* 15A54 8003A654 00A0302D */ daddu $a2, $a1, $zero .L8003A658: /* 15A58 8003A658 C6200054 */ lwc1 $f0, 0x54($s1) /* 15A5C 8003A65C 3C01800A */ lui $at, %hi(D_800984A0) /* 15A60 8003A660 D42684A0 */ ldc1 $f6, %lo(D_800984A0)($at) /* 15A64 8003A664 46000021 */ cvt.d.s $f0, $f0 /* 15A68 8003A668 46260002 */ mul.d $f0, $f0, $f6 /* 15A6C 8003A66C 00000000 */ nop /* 15A70 8003A670 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 15A74 8003A674 44812800 */ mtc1 $at, $f5 /* 15A78 8003A678 44802000 */ mtc1 $zero, $f4 /* 15A7C 8003A67C 00000000 */ nop /* 15A80 8003A680 46240032 */ c.eq.d $f0, $f4 /* 15A84 8003A684 00000000 */ nop /* 15A88 8003A688 45000014 */ bc1f .L8003A6DC /* 15A8C 8003A68C 00000000 */ nop /* 15A90 8003A690 C6200058 */ lwc1 $f0, 0x58($s1) /* 15A94 8003A694 C6220320 */ lwc1 $f2, 0x320($s1) /* 15A98 8003A698 46020002 */ mul.s $f0, $f0, $f2 /* 15A9C 8003A69C 00000000 */ nop /* 15AA0 8003A6A0 46000021 */ cvt.d.s $f0, $f0 /* 15AA4 8003A6A4 46260002 */ mul.d $f0, $f0, $f6 /* 15AA8 8003A6A8 00000000 */ nop /* 15AAC 8003A6AC 46240032 */ c.eq.d $f0, $f4 /* 15AB0 8003A6B0 00000000 */ nop /* 15AB4 8003A6B4 45000009 */ bc1f .L8003A6DC /* 15AB8 8003A6B8 00000000 */ nop /* 15ABC 8003A6BC C620005C */ lwc1 $f0, 0x5C($s1) /* 15AC0 8003A6C0 46000021 */ cvt.d.s $f0, $f0 /* 15AC4 8003A6C4 46260002 */ mul.d $f0, $f0, $f6 /* 15AC8 8003A6C8 00000000 */ nop /* 15ACC 8003A6CC 46240032 */ c.eq.d $f0, $f4 /* 15AD0 8003A6D0 00000000 */ nop /* 15AD4 8003A6D4 4501001F */ bc1t .L8003A754 /* 15AD8 8003A6D8 00000000 */ nop .L8003A6DC: /* 15ADC 8003A6DC C6260054 */ lwc1 $f6, 0x54($s1) /* 15AE0 8003A6E0 3C01800A */ lui $at, %hi(D_800984A8) /* 15AE4 8003A6E4 D42884A8 */ ldc1 $f8, %lo(D_800984A8)($at) /* 15AE8 8003A6E8 460031A1 */ cvt.d.s $f6, $f6 /* 15AEC 8003A6EC 46283182 */ mul.d $f6, $f6, $f8 /* 15AF0 8003A6F0 00000000 */ nop /* 15AF4 8003A6F4 C624005C */ lwc1 $f4, 0x5C($s1) /* 15AF8 8003A6F8 46002121 */ cvt.d.s $f4, $f4 /* 15AFC 8003A6FC 46282102 */ mul.d $f4, $f4, $f8 /* 15B00 8003A700 00000000 */ nop /* 15B04 8003A704 C6200058 */ lwc1 $f0, 0x58($s1) /* 15B08 8003A708 C6220320 */ lwc1 $f2, 0x320($s1) /* 15B0C 8003A70C 46020002 */ mul.s $f0, $f0, $f2 /* 15B10 8003A710 00000000 */ nop /* 15B14 8003A714 46000021 */ cvt.d.s $f0, $f0 /* 15B18 8003A718 46280002 */ mul.d $f0, $f0, $f8 /* 15B1C 8003A71C 00000000 */ nop /* 15B20 8003A720 27B00058 */ addiu $s0, $sp, 0x58 /* 15B24 8003A724 462031A0 */ cvt.s.d $f6, $f6 /* 15B28 8003A728 46202120 */ cvt.s.d $f4, $f4 /* 15B2C 8003A72C 44053000 */ mfc1 $a1, $f6 /* 15B30 8003A730 44072000 */ mfc1 $a3, $f4 /* 15B34 8003A734 46200020 */ cvt.s.d $f0, $f0 /* 15B38 8003A738 44060000 */ mfc1 $a2, $f0 /* 15B3C 8003A73C 0C019DF0 */ jal guScaleF /* 15B40 8003A740 0200202D */ daddu $a0, $s0, $zero /* 15B44 8003A744 0200202D */ daddu $a0, $s0, $zero /* 15B48 8003A748 27A50018 */ addiu $a1, $sp, 0x18 /* 15B4C 8003A74C 0C019D80 */ jal guMtxCatF /* 15B50 8003A750 00A0302D */ daddu $a2, $a1, $zero .L8003A754: /* 15B54 8003A754 8E230000 */ lw $v1, 0x0($s1) /* 15B58 8003A758 3C024000 */ lui $v0, (0x40000000 >> 16) /* 15B5C 8003A75C 00621024 */ and $v0, $v1, $v0 /* 15B60 8003A760 14400011 */ bnez $v0, .L8003A7A8 /* 15B64 8003A764 27A20018 */ addiu $v0, $sp, 0x18 /* 15B68 8003A768 3C020100 */ lui $v0, (0x1000000 >> 16) /* 15B6C 8003A76C 00621024 */ and $v0, $v1, $v0 /* 15B70 8003A770 14400015 */ bnez $v0, .L8003A7C8 /* 15B74 8003A774 00000000 */ nop /* 15B78 8003A778 8E220028 */ lw $v0, 0x28($s1) /* 15B7C 8003A77C 10400012 */ beqz $v0, .L8003A7C8 /* 15B80 8003A780 0000302D */ daddu $a2, $zero, $zero /* 15B84 8003A784 4600B28D */ trunc.w.s $f10, $f22 /* 15B88 8003A788 44055000 */ mfc1 $a1, $f10 /* 15B8C 8003A78C 27A20018 */ addiu $v0, $sp, 0x18 /* 15B90 8003A790 AFA20010 */ sw $v0, 0x10($sp) /* 15B94 8003A794 8E240024 */ lw $a0, 0x24($s1) /* 15B98 8003A798 0C0B78F6 */ jal spr_draw_npc_sprite /* 15B9C 8003A79C 00C0382D */ daddu $a3, $a2, $zero /* 15BA0 8003A7A0 0800E9F2 */ j .L8003A7C8 /* 15BA4 8003A7A4 00000000 */ nop .L8003A7A8: /* 15BA8 8003A7A8 AFA20010 */ sw $v0, 0x10($sp) /* 15BAC 8003A7AC 3C044000 */ lui $a0, (0x40000001 >> 16) /* 15BB0 8003A7B0 34840001 */ ori $a0, $a0, (0x40000001 & 0xFFFF) /* 15BB4 8003A7B4 4600B28D */ trunc.w.s $f10, $f22 /* 15BB8 8003A7B8 44055000 */ mfc1 $a1, $f10 /* 15BBC 8003A7BC 0000302D */ daddu $a2, $zero, $zero /* 15BC0 8003A7C0 0C0B7710 */ jal spr_draw_player_sprite /* 15BC4 8003A7C4 00C0382D */ daddu $a3, $a2, $zero .L8003A7C8: /* 15BC8 8003A7C8 8E220008 */ lw $v0, 0x8($s1) /* 15BCC 8003A7CC 0040F809 */ jalr $v0 /* 15BD0 8003A7D0 0220202D */ daddu $a0, $s1, $zero /* 15BD4 8003A7D4 8FBF00A0 */ lw $ra, 0xA0($sp) /* 15BD8 8003A7D8 8FB1009C */ lw $s1, 0x9C($sp) /* 15BDC 8003A7DC 8FB00098 */ lw $s0, 0x98($sp) /* 15BE0 8003A7E0 D7B600B0 */ ldc1 $f22, 0xB0($sp) /* 15BE4 8003A7E4 D7B400A8 */ ldc1 $f20, 0xA8($sp) /* 15BE8 8003A7E8 03E00008 */ jr $ra /* 15BEC 8003A7EC 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: void appendGfx_npc(void* data) { Npc* npc = data; Matrix4f mtx1, mtx2; f32 renderYaw = npc_get_render_yaw(npc); guTranslateF(mtx1, npc->pos.x, npc->pos.y + npc->verticalRenderOffset, npc->pos.z); if (npc->flags & NPC_FLAG_UPSIDE_DOWN) { mtx_ident_mirror_y(mtx2); guMtxCatF(mtx2, mtx1, mtx1); } if (npc->rotationPivotOffsetY != 0.0f) { guTranslateF(mtx2, 0.0f, npc->rotationPivotOffsetY, 0.0f); guMtxCatF(mtx2, mtx1, mtx1); } if (npc->rotation.y != 0.0f) { guRotateF(mtx2, npc->rotation.y, 0.0f, 1.0f, 0.0f); guMtxCatF(mtx2, mtx1, mtx1); } if (npc->rotation.x != 0.0f) { guRotateF(mtx2, npc->rotation.x, 1.0f, 0.0f, 0.0f); guMtxCatF(mtx2, mtx1, mtx1); } if (npc->rotation.z != 0.0f) { guRotateF(mtx2, npc->rotation.z, 0.0f, 0.0f, 1.0f); guMtxCatF(mtx2, mtx1, mtx1); } if (npc->rotationPivotOffsetY != 0.0f) { guTranslateF(mtx2, 0.0f, -npc->rotationPivotOffsetY, 0.0f); guMtxCatF(mtx2, mtx1, mtx1); } if ((npc->screenSpaceOffset2D[0] != 0.0f) || (npc->screenSpaceOffset2D[1] != 0.0f)) { guTranslateF(mtx1, npc->screenSpaceOffset2D[0], npc->screenSpaceOffset2D[1], 0.0f); guMtxCatF(mtx2, mtx1, mtx1); } if ((npc->scale.x * SPRITE_WORLD_SCALE_D != 1.0f) || ((npc->scale.y * npc->verticalStretch) * SPRITE_WORLD_SCALE_D != 1.0f) || (npc->scale.z * SPRITE_WORLD_SCALE_D != 1.0f)) { guScaleF(mtx2, npc->scale.x * SPRITE_WORLD_SCALE_D, (npc->scale.y * npc->verticalStretch) * SPRITE_WORLD_SCALE_D, npc->scale.z * SPRITE_WORLD_SCALE_D); guMtxCatF(mtx2, mtx1, mtx1); } if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { if (!(npc->flags & NPC_FLAG_HAS_NO_SPRITE) && (npc->currentAnim != 0) && (npc->spriteInstanceID >= 0)) { npc_draw_with_palswap(npc, renderYaw, mtx1); npc->animNotifyValue = spr_get_notify_value(npc->spriteInstanceID); } } else { npc_draw_with_palswap(npc, renderYaw, mtx1); npc->animNotifyValue = func_802DDEC4(PLAYER_SPRITE_AUX1); } if (npc->flags & NPC_FLAG_REFLECT_WALL) { guTranslateF(mtx1, npc->pos.x, npc->pos.y + npc->verticalRenderOffset, -npc->pos.z); if (npc->flags & NPC_FLAG_UPSIDE_DOWN) { mtx_ident_mirror_y(mtx2); guMtxCatF(mtx2, mtx1, mtx1); } if ((npc->rotation.y != 0.0f) || (npc->rotation.x != 0.0f) || (npc->rotation.z != 0.0f)) { guRotateRPYF(mtx2, npc->rotation.x, npc->rotation.y, npc->rotation.z); guMtxCatF(mtx2, mtx1, mtx1); } if ((npc->scale.x * SPRITE_WORLD_SCALE_D != 1.0f) || ((npc->scale.y * npc->verticalStretch) * SPRITE_WORLD_SCALE_D != 1.0f) || (npc->scale.z * SPRITE_WORLD_SCALE_D != 1.0f)) { do { guScaleF(mtx2, npc->scale.x * SPRITE_WORLD_SCALE_D, (npc->scale.y * npc->verticalStretch) * SPRITE_WORLD_SCALE_D, npc->scale.z * SPRITE_WORLD_SCALE_D); } while (0); // required to match (macro?) guMtxCatF(mtx2, mtx1, mtx1); } if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { if (!(npc->flags & NPC_FLAG_HAS_NO_SPRITE) && (npc->currentAnim != 0)) { spr_draw_npc_sprite(npc->spriteInstanceID, renderYaw, 0, 0, mtx1); } } else { spr_draw_player_sprite(PLAYER_SPRITE_AUX1 | DRAW_SPRITE_OVERRIDE_YAW, renderYaw, 0, 0, mtx1); } } if (npc->flags & NPC_FLAG_REFLECT_FLOOR) { guTranslateF(mtx1, npc->pos.x, -(npc->pos.y + npc->verticalRenderOffset), npc->pos.z); mtx_ident_mirror_y(mtx2); guMtxCatF(mtx2, mtx1, mtx1); if (npc->rotation.y != 0.0f || npc->rotation.x != 0.0f || npc->rotation.z != 0.0f) { guRotateRPYF(mtx2, npc->rotation.x, npc->rotation.y, npc->rotation.z); guMtxCatF(mtx2, mtx1, mtx1); } if ((npc->scale.x * SPRITE_WORLD_SCALE_D != 1.0f) || ((npc->scale.y * npc->verticalStretch) * SPRITE_WORLD_SCALE_D != 1.0f) || (npc->scale.z * SPRITE_WORLD_SCALE_D != 1.0f)) { do { guScaleF(mtx2, npc->scale.x * SPRITE_WORLD_SCALE_D, (npc->scale.y * npc->verticalStretch) * SPRITE_WORLD_SCALE_D, npc->scale.z * SPRITE_WORLD_SCALE_D); } while (0); // required to match (macro?) guMtxCatF(mtx2, mtx1, mtx1); } if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { if (!(npc->flags & NPC_FLAG_HAS_NO_SPRITE) && (npc->currentAnim != 0)) { spr_draw_npc_sprite(npc->spriteInstanceID, renderYaw, 0, 0, mtx1); } } else { spr_draw_player_sprite(PLAYER_SPRITE_AUX1 | DRAW_SPRITE_OVERRIDE_YAW, renderYaw, 0, 0, mtx1); } } npc->onRender(npc); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025C120 /* 18AA00 8025C120 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 18AA04 8025C124 AFB40028 */ sw $s4, 0x28($sp) /* 18AA08 8025C128 0080A02D */ daddu $s4, $a0, $zero /* 18AA0C 8025C12C AFB30024 */ sw $s3, 0x24($sp) /* 18AA10 8025C130 00A0982D */ daddu $s3, $a1, $zero /* 18AA14 8025C134 AFB5002C */ sw $s5, 0x2C($sp) /* 18AA18 8025C138 00C0A82D */ daddu $s5, $a2, $zero /* 18AA1C 8025C13C AFBF0038 */ sw $ra, 0x38($sp) /* 18AA20 8025C140 AFB70034 */ sw $s7, 0x34($sp) /* 18AA24 8025C144 AFB60030 */ sw $s6, 0x30($sp) /* 18AA28 8025C148 AFB20020 */ sw $s2, 0x20($sp) /* 18AA2C 8025C14C AFB1001C */ sw $s1, 0x1C($sp) /* 18AA30 8025C150 AFB00018 */ sw $s0, 0x18($sp) /* 18AA34 8025C154 8E7000C0 */ lw $s0, 0xC0($s3) /* 18AA38 8025C158 820206C1 */ lb $v0, 0x6C1($s0) /* 18AA3C 8025C15C 8FB20050 */ lw $s2, 0x50($sp) /* 18AA40 8025C160 10400055 */ beqz $v0, .L8025C2B8 /* 18AA44 8025C164 00E0B02D */ daddu $s6, $a3, $zero /* 18AA48 8025C168 16800016 */ bnez $s4, .L8025C1C4 /* 18AA4C 8025C16C 00000000 */ nop /* 18AA50 8025C170 0C0B7830 */ jal spr_get_player_palettes /* 18AA54 8025C174 96640088 */ lhu $a0, 0x88($s3) /* 18AA58 8025C178 AE0206D0 */ sw $v0, 0x6D0($s0) /* 18AA5C 8025C17C 0040202D */ daddu $a0, $v0, $zero /* 18AA60 8025C180 A20006CD */ sb $zero, 0x6CD($s0) /* 18AA64 8025C184 8C830000 */ lw $v1, 0x0($a0) /* 18AA68 8025C188 2402FFFF */ addiu $v0, $zero, -0x1 /* 18AA6C 8025C18C 10620023 */ beq $v1, $v0, .L8025C21C /* 18AA70 8025C190 0080182D */ daddu $v1, $a0, $zero /* 18AA74 8025C194 0040202D */ daddu $a0, $v0, $zero .L8025C198: /* 18AA78 8025C198 920206CD */ lbu $v0, 0x6CD($s0) /* 18AA7C 8025C19C 24420001 */ addiu $v0, $v0, 0x1 /* 18AA80 8025C1A0 A20206CD */ sb $v0, 0x6CD($s0) /* 18AA84 8025C1A4 00021600 */ sll $v0, $v0, 24 /* 18AA88 8025C1A8 00021583 */ sra $v0, $v0, 22 /* 18AA8C 8025C1AC 00431021 */ addu $v0, $v0, $v1 /* 18AA90 8025C1B0 8C420000 */ lw $v0, 0x0($v0) /* 18AA94 8025C1B4 10440019 */ beq $v0, $a0, .L8025C21C /* 18AA98 8025C1B8 00000000 */ nop /* 18AA9C 8025C1BC 08097066 */ j .L8025C198 /* 18AAA0 8025C1C0 00000000 */ nop .L8025C1C4: /* 18AAA4 8025C1C4 0C0B7A90 */ jal spr_get_npc_palettes /* 18AAA8 8025C1C8 96640088 */ lhu $a0, 0x88($s3) /* 18AAAC 8025C1CC AE0206D0 */ sw $v0, 0x6D0($s0) /* 18AAB0 8025C1D0 0040202D */ daddu $a0, $v0, $zero /* 18AAB4 8025C1D4 A20006CD */ sb $zero, 0x6CD($s0) /* 18AAB8 8025C1D8 8C830000 */ lw $v1, 0x0($a0) /* 18AABC 8025C1DC 2402FFFF */ addiu $v0, $zero, -0x1 /* 18AAC0 8025C1E0 1062000B */ beq $v1, $v0, .L8025C210 /* 18AAC4 8025C1E4 0080182D */ daddu $v1, $a0, $zero /* 18AAC8 8025C1E8 0040202D */ daddu $a0, $v0, $zero .L8025C1EC: /* 18AACC 8025C1EC 920206CD */ lbu $v0, 0x6CD($s0) /* 18AAD0 8025C1F0 24420001 */ addiu $v0, $v0, 0x1 /* 18AAD4 8025C1F4 A20206CD */ sb $v0, 0x6CD($s0) /* 18AAD8 8025C1F8 00021600 */ sll $v0, $v0, 24 /* 18AADC 8025C1FC 00021583 */ sra $v0, $v0, 22 /* 18AAE0 8025C200 00431021 */ addu $v0, $v0, $v1 /* 18AAE4 8025C204 8C420000 */ lw $v0, 0x0($v0) /* 18AAE8 8025C208 1444FFF8 */ bne $v0, $a0, .L8025C1EC /* 18AAEC 8025C20C 00000000 */ nop .L8025C210: /* 18AAF0 8025C210 0C0B7A9B */ jal spr_get_npc_color_variations /* 18AAF4 8025C214 96640088 */ lhu $a0, 0x88($s3) /* 18AAF8 8025C218 A20206CC */ sb $v0, 0x6CC($s0) .L8025C21C: /* 18AAFC 8025C21C 820306C1 */ lb $v1, 0x6C1($s0) /* 18AB00 8025C220 24020001 */ addiu $v0, $zero, 0x1 /* 18AB04 8025C224 14620004 */ bne $v1, $v0, .L8025C238 /* 18AB08 8025C228 240200FF */ addiu $v0, $zero, 0xFF /* 18AB0C 8025C22C A20006C2 */ sb $zero, 0x6C2($s0) /* 18AB10 8025C230 08097090 */ j .L8025C240 /* 18AB14 8025C234 A60006CA */ sh $zero, 0x6CA($s0) .L8025C238: /* 18AB18 8025C238 A20006C2 */ sb $zero, 0x6C2($s0) /* 18AB1C 8025C23C A60206CA */ sh $v0, 0x6CA($s0) .L8025C240: /* 18AB20 8025C240 820206CD */ lb $v0, 0x6CD($s0) /* 18AB24 8025C244 18400017 */ blez $v0, .L8025C2A4 /* 18AB28 8025C248 0000602D */ daddu $t4, $zero, $zero /* 18AB2C 8025C24C 0200202D */ daddu $a0, $s0, $zero .L8025C250: /* 18AB30 8025C250 8E0206D0 */ lw $v0, 0x6D0($s0) /* 18AB34 8025C254 000C1880 */ sll $v1, $t4, 2 /* 18AB38 8025C258 00621821 */ addu $v1, $v1, $v0 /* 18AB3C 8025C25C 000C1140 */ sll $v0, $t4, 5 /* 18AB40 8025C260 8C6B0000 */ lw $t3, 0x0($v1) /* 18AB44 8025C264 02024821 */ addu $t1, $s0, $v0 /* 18AB48 8025C268 11600009 */ beqz $t3, .L8025C290 /* 18AB4C 8025C26C AC8906D4 */ sw $t1, 0x6D4($a0) /* 18AB50 8025C270 0000502D */ daddu $t2, $zero, $zero .L8025C274: /* 18AB54 8025C274 95620000 */ lhu $v0, 0x0($t3) /* 18AB58 8025C278 256B0002 */ addiu $t3, $t3, 0x2 /* 18AB5C 8025C27C 254A0001 */ addiu $t2, $t2, 0x1 /* 18AB60 8025C280 A5220000 */ sh $v0, 0x0($t1) /* 18AB64 8025C284 29420010 */ slti $v0, $t2, 0x10 /* 18AB68 8025C288 1440FFFA */ bnez $v0, .L8025C274 /* 18AB6C 8025C28C 25290002 */ addiu $t1, $t1, 0x2 .L8025C290: /* 18AB70 8025C290 820206CD */ lb $v0, 0x6CD($s0) /* 18AB74 8025C294 258C0001 */ addiu $t4, $t4, 0x1 /* 18AB78 8025C298 0182102A */ slt $v0, $t4, $v0 /* 18AB7C 8025C29C 1440FFEC */ bnez $v0, .L8025C250 /* 18AB80 8025C2A0 24840004 */ addiu $a0, $a0, 0x4 .L8025C2A4: /* 18AB84 8025C2A4 96020744 */ lhu $v0, 0x744($s0) /* 18AB88 8025C2A8 A60006CA */ sh $zero, 0x6CA($s0) /* 18AB8C 8025C2AC A20006C2 */ sb $zero, 0x6C2($s0) /* 18AB90 8025C2B0 A20006C1 */ sb $zero, 0x6C1($s0) /* 18AB94 8025C2B4 A60206C8 */ sh $v0, 0x6C8($s0) .L8025C2B8: /* 18AB98 8025C2B8 820306C2 */ lb $v1, 0x6C2($s0) /* 18AB9C 8025C2BC 10600005 */ beqz $v1, .L8025C2D4 /* 18ABA0 8025C2C0 24020001 */ addiu $v0, $zero, 0x1 /* 18ABA4 8025C2C4 1062000E */ beq $v1, $v0, .L8025C300 /* 18ABA8 8025C2C8 24020002 */ addiu $v0, $zero, 0x2 /* 18ABAC 8025C2CC 08097156 */ j .L8025C558 /* 18ABB0 8025C2D0 00000000 */ nop .L8025C2D4: /* 18ABB4 8025C2D4 1640009E */ bnez $s2, .L8025C550 /* 18ABB8 8025C2D8 00000000 */ nop /* 18ABBC 8025C2DC 860206C8 */ lh $v0, 0x6C8($s0) /* 18ABC0 8025C2E0 960306C8 */ lhu $v1, 0x6C8($s0) /* 18ABC4 8025C2E4 10400003 */ beqz $v0, .L8025C2F4 /* 18ABC8 8025C2E8 2462FFFF */ addiu $v0, $v1, -0x1 /* 18ABCC 8025C2EC 08097154 */ j .L8025C550 /* 18ABD0 8025C2F0 A60206C8 */ sh $v0, 0x6C8($s0) .L8025C2F4: /* 18ABD4 8025C2F4 24020001 */ addiu $v0, $zero, 0x1 /* 18ABD8 8025C2F8 A60006CA */ sh $zero, 0x6CA($s0) /* 18ABDC 8025C2FC A20206C2 */ sb $v0, 0x6C2($s0) .L8025C300: /* 18ABE0 8025C300 16400018 */ bnez $s2, .L8025C364 /* 18ABE4 8025C304 3C0451EB */ lui $a0, (0x51EB851F >> 16) /* 18ABE8 8025C308 86020746 */ lh $v0, 0x746($s0) /* 18ABEC 8025C30C 24036400 */ addiu $v1, $zero, 0x6400 /* 18ABF0 8025C310 14400002 */ bnez $v0, .L8025C31C /* 18ABF4 8025C314 0062001A */ div $zero, $v1, $v0 /* 18ABF8 8025C318 0007000D */ break 7 .L8025C31C: /* 18ABFC 8025C31C 2401FFFF */ addiu $at, $zero, -0x1 /* 18AC00 8025C320 14410004 */ bne $v0, $at, .L8025C334 /* 18AC04 8025C324 3C018000 */ lui $at, (0x80000000 >> 16) /* 18AC08 8025C328 14610002 */ bne $v1, $at, .L8025C334 /* 18AC0C 8025C32C 00000000 */ nop /* 18AC10 8025C330 0006000D */ break 6 .L8025C334: /* 18AC14 8025C334 00001812 */ mflo $v1 /* 18AC18 8025C338 960206CA */ lhu $v0, 0x6CA($s0) /* 18AC1C 8025C33C 00431021 */ addu $v0, $v0, $v1 /* 18AC20 8025C340 A60206CA */ sh $v0, 0x6CA($s0) /* 18AC24 8025C344 00021400 */ sll $v0, $v0, 16 /* 18AC28 8025C348 00021403 */ sra $v0, $v0, 16 /* 18AC2C 8025C34C 2842639D */ slti $v0, $v0, 0x639D /* 18AC30 8025C350 14400005 */ bnez $v0, .L8025C368 /* 18AC34 8025C354 3484851F */ ori $a0, $a0, (0x51EB851F & 0xFFFF) /* 18AC38 8025C358 2402639C */ addiu $v0, $zero, 0x639C /* 18AC3C 8025C35C A60206CA */ sh $v0, 0x6CA($s0) /* 18AC40 8025C360 3C0451EB */ lui $a0, (0x51EB851F >> 16) .L8025C364: /* 18AC44 8025C364 3484851F */ ori $a0, $a0, (0x51EB851F & 0xFFFF) .L8025C368: /* 18AC48 8025C368 960306CA */ lhu $v1, 0x6CA($s0) /* 18AC4C 8025C36C 00031C00 */ sll $v1, $v1, 16 /* 18AC50 8025C370 00031403 */ sra $v0, $v1, 16 /* 18AC54 8025C374 00440018 */ mult $v0, $a0 /* 18AC58 8025C378 0000602D */ daddu $t4, $zero, $zero /* 18AC5C 8025C37C 920506CC */ lbu $a1, 0x6CC($s0) /* 18AC60 8025C380 00031FC3 */ sra $v1, $v1, 31 /* 18AC64 8025C384 820206CC */ lb $v0, 0x6CC($s0) /* 18AC68 8025C388 0000B810 */ mfhi $s7 /* 18AC6C 8025C38C 00172143 */ sra $a0, $s7, 5 /* 18AC70 8025C390 18400068 */ blez $v0, .L8025C534 /* 18AC74 8025C394 00838823 */ subu $s1, $a0, $v1 /* 18AC78 8025C398 322E00FF */ andi $t6, $s1, 0xFF /* 18AC7C 8025C39C 240200FF */ addiu $v0, $zero, 0xFF /* 18AC80 8025C3A0 004EC023 */ subu $t8, $v0, $t6 /* 18AC84 8025C3A4 3C0F8080 */ lui $t7, (0x80808081 >> 16) /* 18AC88 8025C3A8 35EF8081 */ ori $t7, $t7, (0x80808081 & 0xFFFF) /* 18AC8C 8025C3AC 0200C82D */ daddu $t9, $s0, $zero .L8025C3B0: /* 18AC90 8025C3B0 00052600 */ sll $a0, $a1, 24 /* 18AC94 8025C3B4 86020740 */ lh $v0, 0x740($s0) /* 18AC98 8025C3B8 00042603 */ sra $a0, $a0, 24 /* 18AC9C 8025C3BC 00440018 */ mult $v0, $a0 /* 18ACA0 8025C3C0 86030742 */ lh $v1, 0x742($s0) /* 18ACA4 8025C3C4 000C1140 */ sll $v0, $t4, 5 D_8025C3C8: /* 18ACA8 8025C3C8 0000B812 */ mflo $s7 /* 18ACAC 8025C3CC 02026821 */ addu $t5, $s0, $v0 /* 18ACB0 8025C3D0 02EC1021 */ addu $v0, $s7, $t4 /* 18ACB4 8025C3D4 00640018 */ mult $v1, $a0 /* 18ACB8 8025C3D8 8E0306D0 */ lw $v1, 0x6D0($s0) /* 18ACBC 8025C3DC 00021080 */ sll $v0, $v0, 2 /* 18ACC0 8025C3E0 00431021 */ addu $v0, $v0, $v1 /* 18ACC4 8025C3E4 8C4B0000 */ lw $t3, 0x0($v0) /* 18ACC8 8025C3E8 0000B812 */ mflo $s7 /* 18ACCC 8025C3EC 02EC1021 */ addu $v0, $s7, $t4 /* 18ACD0 8025C3F0 00021080 */ sll $v0, $v0, 2 /* 18ACD4 8025C3F4 00431021 */ addu $v0, $v0, $v1 /* 18ACD8 8025C3F8 8C490000 */ lw $t1, 0x0($v0) /* 18ACDC 8025C3FC 0000502D */ daddu $t2, $zero, $zero /* 18ACE0 8025C400 AF2D06D4 */ sw $t5, 0x6D4($t9) .L8025C404: /* 18ACE4 8025C404 95630000 */ lhu $v1, 0x0($t3) /* 18ACE8 8025C408 000312C2 */ srl $v0, $v1, 11 /* 18ACEC 8025C40C 00580018 */ mult $v0, $t8 /* 18ACF0 8025C410 95240000 */ lhu $a0, 0x0($t1) /* 18ACF4 8025C414 00002812 */ mflo $a1 /* 18ACF8 8025C418 000412C2 */ srl $v0, $a0, 11 /* 18ACFC 8025C41C 00000000 */ nop /* 18AD00 8025C420 004E0018 */ mult $v0, $t6 /* 18AD04 8025C424 00004012 */ mflo $t0 /* 18AD08 8025C428 00A82821 */ addu $a1, $a1, $t0 /* 18AD0C 8025C42C 00000000 */ nop /* 18AD10 8025C430 00AF0018 */ mult $a1, $t7 /* 18AD14 8025C434 0000B810 */ mfhi $s7 /* 18AD18 8025C438 00031182 */ srl $v0, $v1, 6 /* 18AD1C 8025C43C 3042001F */ andi $v0, $v0, 0x1F /* 18AD20 8025C440 00580018 */ mult $v0, $t8 /* 18AD24 8025C444 00004012 */ mflo $t0 /* 18AD28 8025C448 00041182 */ srl $v0, $a0, 6 /* 18AD2C 8025C44C 3042001F */ andi $v0, $v0, 0x1F /* 18AD30 8025C450 004E0018 */ mult $v0, $t6 /* 18AD34 8025C454 00003812 */ mflo $a3 /* 18AD38 8025C458 00031842 */ srl $v1, $v1, 1 /* 18AD3C 8025C45C 3063001F */ andi $v1, $v1, 0x1F /* 18AD40 8025C460 00780018 */ mult $v1, $t8 /* 18AD44 8025C464 256B0002 */ addiu $t3, $t3, 0x2 /* 18AD48 8025C468 254A0001 */ addiu $t2, $t2, 0x1 /* 18AD4C 8025C46C 00042042 */ srl $a0, $a0, 1 /* 18AD50 8025C470 00001812 */ mflo $v1 /* 18AD54 8025C474 3084001F */ andi $a0, $a0, 0x1F /* 18AD58 8025C478 AFB70010 */ sw $s7, 0x10($sp) /* 18AD5C 8025C47C 008E0018 */ mult $a0, $t6 /* 18AD60 8025C480 91260001 */ lbu $a2, 0x1($t1) /* 18AD64 8025C484 25290002 */ addiu $t1, $t1, 0x2 /* 18AD68 8025C488 30C60001 */ andi $a2, $a2, 0x1 /* 18AD6C 8025C48C 01072021 */ addu $a0, $t0, $a3 /* 18AD70 8025C490 0000B812 */ mflo $s7 /* 18AD74 8025C494 AFB70014 */ sw $s7, 0x14($sp) /* 18AD78 8025C498 8FB70010 */ lw $s7, 0x10($sp) /* 18AD7C 8025C49C 008F0018 */ mult $a0, $t7 /* 18AD80 8025C4A0 02E51021 */ addu $v0, $s7, $a1 /* 18AD84 8025C4A4 000211C3 */ sra $v0, $v0, 7 /* 18AD88 8025C4A8 00052FC3 */ sra $a1, $a1, 31 /* 18AD8C 8025C4AC 8FB70014 */ lw $s7, 0x14($sp) /* 18AD90 8025C4B0 00004010 */ mfhi $t0 /* 18AD94 8025C4B4 00453823 */ subu $a3, $v0, $a1 /* 18AD98 8025C4B8 00771821 */ addu $v1, $v1, $s7 /* 18AD9C 8025C4BC 006F0018 */ mult $v1, $t7 /* 18ADA0 8025C4C0 01041021 */ addu $v0, $t0, $a0 /* 18ADA4 8025C4C4 000211C3 */ sra $v0, $v0, 7 /* 18ADA8 8025C4C8 000427C3 */ sra $a0, $a0, 31 /* 18ADAC 8025C4CC 00442823 */ subu $a1, $v0, $a0 /* 18ADB0 8025C4D0 0000B810 */ mfhi $s7 /* 18ADB4 8025C4D4 AFB70010 */ sw $s7, 0x10($sp) /* 18ADB8 8025C4D8 02E31021 */ addu $v0, $s7, $v1 /* 18ADBC 8025C4DC 000211C3 */ sra $v0, $v0, 7 /* 18ADC0 8025C4E0 00031FC3 */ sra $v1, $v1, 31 /* 18ADC4 8025C4E4 00432023 */ subu $a0, $v0, $v1 /* 18ADC8 8025C4E8 30E300FF */ andi $v1, $a3, 0xFF /* 18ADCC 8025C4EC 00031AC0 */ sll $v1, $v1, 11 /* 18ADD0 8025C4F0 30A200FF */ andi $v0, $a1, 0xFF /* 18ADD4 8025C4F4 00021180 */ sll $v0, $v0, 6 /* 18ADD8 8025C4F8 00621825 */ or $v1, $v1, $v0 /* 18ADDC 8025C4FC 308200FF */ andi $v0, $a0, 0xFF /* 18ADE0 8025C500 00021040 */ sll $v0, $v0, 1 /* 18ADE4 8025C504 00621825 */ or $v1, $v1, $v0 /* 18ADE8 8025C508 00C33025 */ or $a2, $a2, $v1 /* 18ADEC 8025C50C A5A60000 */ sh $a2, 0x0($t5) /* 18ADF0 8025C510 29420010 */ slti $v0, $t2, 0x10 /* 18ADF4 8025C514 1440FFBB */ bnez $v0, .L8025C404 /* 18ADF8 8025C518 25AD0002 */ addiu $t5, $t5, 0x2 /* 18ADFC 8025C51C 258C0001 */ addiu $t4, $t4, 0x1 /* 18AE00 8025C520 820206CC */ lb $v0, 0x6CC($s0) /* 18AE04 8025C524 920506CC */ lbu $a1, 0x6CC($s0) /* 18AE08 8025C528 0182102A */ slt $v0, $t4, $v0 /* 18AE0C 8025C52C 1440FFA0 */ bnez $v0, .L8025C3B0 /* 18AE10 8025C530 27390004 */ addiu $t9, $t9, 0x4 .L8025C534: /* 18AE14 8025C534 322300FF */ andi $v1, $s1, 0xFF /* 18AE18 8025C538 240200FF */ addiu $v0, $zero, 0xFF D_8025C53C: /* 18AE1C 8025C53C 14620004 */ bne $v1, $v0, .L8025C550 /* 18AE20 8025C540 24020002 */ addiu $v0, $zero, 0x2 /* 18AE24 8025C544 96030748 */ lhu $v1, 0x748($s0) /* 18AE28 8025C548 A20206C2 */ sb $v0, 0x6C2($s0) /* 18AE2C 8025C54C A60306C8 */ sh $v1, 0x6C8($s0) .L8025C550: /* 18AE30 8025C550 820306C2 */ lb $v1, 0x6C2($s0) /* 18AE34 8025C554 24020002 */ addiu $v0, $zero, 0x2 .L8025C558: /* 18AE38 8025C558 10620005 */ beq $v1, $v0, .L8025C570 /* 18AE3C 8025C55C 24020003 */ addiu $v0, $zero, 0x3 /* 18AE40 8025C560 1062000C */ beq $v1, $v0, .L8025C594 /* 18AE44 8025C564 00000000 */ nop /* 18AE48 8025C568 080971F5 */ j .L8025C7D4 /* 18AE4C 8025C56C 00000000 */ nop .L8025C570: /* 18AE50 8025C570 16400098 */ bnez $s2, .L8025C7D4 /* 18AE54 8025C574 00000000 */ nop /* 18AE58 8025C578 860206C8 */ lh $v0, 0x6C8($s0) /* 18AE5C 8025C57C 960306C8 */ lhu $v1, 0x6C8($s0) /* 18AE60 8025C580 14400093 */ bnez $v0, .L8025C7D0 /* 18AE64 8025C584 2462FFFF */ addiu $v0, $v1, -0x1 /* 18AE68 8025C588 24020003 */ addiu $v0, $zero, 0x3 /* 18AE6C 8025C58C A60006CA */ sh $zero, 0x6CA($s0) /* 18AE70 8025C590 A20206C2 */ sb $v0, 0x6C2($s0) .L8025C594: /* 18AE74 8025C594 16400018 */ bnez $s2, .L8025C5F8 /* 18AE78 8025C598 3C0451EB */ lui $a0, (0x51EB851F >> 16) /* 18AE7C 8025C59C 8602074A */ lh $v0, 0x74A($s0) /* 18AE80 8025C5A0 24036400 */ addiu $v1, $zero, 0x6400 /* 18AE84 8025C5A4 14400002 */ bnez $v0, .L8025C5B0 /* 18AE88 8025C5A8 0062001A */ div $zero, $v1, $v0 /* 18AE8C 8025C5AC 0007000D */ break 7 .L8025C5B0: /* 18AE90 8025C5B0 2401FFFF */ addiu $at, $zero, -0x1 /* 18AE94 8025C5B4 14410004 */ bne $v0, $at, .L8025C5C8 /* 18AE98 8025C5B8 3C018000 */ lui $at, (0x80000000 >> 16) /* 18AE9C 8025C5BC 14610002 */ bne $v1, $at, .L8025C5C8 /* 18AEA0 8025C5C0 00000000 */ nop /* 18AEA4 8025C5C4 0006000D */ break 6 .L8025C5C8: /* 18AEA8 8025C5C8 00001812 */ mflo $v1 /* 18AEAC 8025C5CC 960206CA */ lhu $v0, 0x6CA($s0) /* 18AEB0 8025C5D0 00431021 */ addu $v0, $v0, $v1 D_8025C5D4: /* 18AEB4 8025C5D4 A60206CA */ sh $v0, 0x6CA($s0) /* 18AEB8 8025C5D8 00021400 */ sll $v0, $v0, 16 /* 18AEBC 8025C5DC 00021403 */ sra $v0, $v0, 16 /* 18AEC0 8025C5E0 2842639D */ slti $v0, $v0, 0x639D /* 18AEC4 8025C5E4 14400005 */ bnez $v0, .L8025C5FC /* 18AEC8 8025C5E8 3484851F */ ori $a0, $a0, (0x51EB851F & 0xFFFF) /* 18AECC 8025C5EC 2402639C */ addiu $v0, $zero, 0x639C /* 18AED0 8025C5F0 A60206CA */ sh $v0, 0x6CA($s0) /* 18AED4 8025C5F4 3C0451EB */ lui $a0, (0x51EB851F >> 16) .L8025C5F8: /* 18AED8 8025C5F8 3484851F */ ori $a0, $a0, (0x51EB851F & 0xFFFF) .L8025C5FC: /* 18AEDC 8025C5FC 960306CA */ lhu $v1, 0x6CA($s0) /* 18AEE0 8025C600 00031C00 */ sll $v1, $v1, 16 /* 18AEE4 8025C604 00031403 */ sra $v0, $v1, 16 /* 18AEE8 8025C608 00440018 */ mult $v0, $a0 /* 18AEEC 8025C60C 0000602D */ daddu $t4, $zero, $zero /* 18AEF0 8025C610 920506CC */ lbu $a1, 0x6CC($s0) /* 18AEF4 8025C614 00031FC3 */ sra $v1, $v1, 31 /* 18AEF8 8025C618 820206CC */ lb $v0, 0x6CC($s0) /* 18AEFC 8025C61C 0000B810 */ mfhi $s7 /* 18AF00 8025C620 00172143 */ sra $a0, $s7, 5 /* 18AF04 8025C624 18400064 */ blez $v0, .L8025C7B8 /* 18AF08 8025C628 00838823 */ subu $s1, $a0, $v1 /* 18AF0C 8025C62C 322E00FF */ andi $t6, $s1, 0xFF /* 18AF10 8025C630 240200FF */ addiu $v0, $zero, 0xFF /* 18AF14 8025C634 004EC023 */ subu $t8, $v0, $t6 /* 18AF18 8025C638 3C0F8080 */ lui $t7, (0x80808081 >> 16) /* 18AF1C 8025C63C 35EF8081 */ ori $t7, $t7, (0x80808081 & 0xFFFF) /* 18AF20 8025C640 0200C82D */ daddu $t9, $s0, $zero .L8025C644: /* 18AF24 8025C644 00052600 */ sll $a0, $a1, 24 /* 18AF28 8025C648 86020740 */ lh $v0, 0x740($s0) /* 18AF2C 8025C64C 00042603 */ sra $a0, $a0, 24 /* 18AF30 8025C650 00440018 */ mult $v0, $a0 /* 18AF34 8025C654 86030742 */ lh $v1, 0x742($s0) /* 18AF38 8025C658 000C1140 */ sll $v0, $t4, 5 /* 18AF3C 8025C65C 0000B812 */ mflo $s7 /* 18AF40 8025C660 02026821 */ addu $t5, $s0, $v0 /* 18AF44 8025C664 02EC1021 */ addu $v0, $s7, $t4 /* 18AF48 8025C668 00640018 */ mult $v1, $a0 /* 18AF4C 8025C66C 8E0306D0 */ lw $v1, 0x6D0($s0) /* 18AF50 8025C670 00021080 */ sll $v0, $v0, 2 /* 18AF54 8025C674 00431021 */ addu $v0, $v0, $v1 /* 18AF58 8025C678 8C4B0000 */ lw $t3, 0x0($v0) /* 18AF5C 8025C67C 0000B812 */ mflo $s7 /* 18AF60 8025C680 02EC1021 */ addu $v0, $s7, $t4 /* 18AF64 8025C684 00021080 */ sll $v0, $v0, 2 /* 18AF68 8025C688 00431021 */ addu $v0, $v0, $v1 /* 18AF6C 8025C68C 8C490000 */ lw $t1, 0x0($v0) /* 18AF70 8025C690 0000502D */ daddu $t2, $zero, $zero /* 18AF74 8025C694 AF2D06D4 */ sw $t5, 0x6D4($t9) .L8025C698: /* 18AF78 8025C698 95630000 */ lhu $v1, 0x0($t3) /* 18AF7C 8025C69C 000312C2 */ srl $v0, $v1, 11 /* 18AF80 8025C6A0 00580018 */ mult $v0, $t8 /* 18AF84 8025C6A4 95240000 */ lhu $a0, 0x0($t1) /* 18AF88 8025C6A8 00002812 */ mflo $a1 /* 18AF8C 8025C6AC 000412C2 */ srl $v0, $a0, 11 /* 18AF90 8025C6B0 00000000 */ nop /* 18AF94 8025C6B4 004E0018 */ mult $v0, $t6 /* 18AF98 8025C6B8 00004012 */ mflo $t0 /* 18AF9C 8025C6BC 00A82821 */ addu $a1, $a1, $t0 /* 18AFA0 8025C6C0 00000000 */ nop /* 18AFA4 8025C6C4 00AF0018 */ mult $a1, $t7 /* 18AFA8 8025C6C8 00009010 */ mfhi $s2 /* 18AFAC 8025C6CC 00031182 */ srl $v0, $v1, 6 /* 18AFB0 8025C6D0 3042001F */ andi $v0, $v0, 0x1F /* 18AFB4 8025C6D4 00580018 */ mult $v0, $t8 /* 18AFB8 8025C6D8 00004012 */ mflo $t0 /* 18AFBC 8025C6DC 00041182 */ srl $v0, $a0, 6 /* 18AFC0 8025C6E0 3042001F */ andi $v0, $v0, 0x1F /* 18AFC4 8025C6E4 004E0018 */ mult $v0, $t6 /* 18AFC8 8025C6E8 00003812 */ mflo $a3 /* 18AFCC 8025C6EC 00031842 */ srl $v1, $v1, 1 /* 18AFD0 8025C6F0 3063001F */ andi $v1, $v1, 0x1F /* 18AFD4 8025C6F4 00780018 */ mult $v1, $t8 /* 18AFD8 8025C6F8 00001812 */ mflo $v1 /* 18AFDC 8025C6FC 00042042 */ srl $a0, $a0, 1 /* 18AFE0 8025C700 3084001F */ andi $a0, $a0, 0x1F /* 18AFE4 8025C704 008E0018 */ mult $a0, $t6 /* 18AFE8 8025C708 256B0002 */ addiu $t3, $t3, 0x2 /* 18AFEC 8025C70C 91260001 */ lbu $a2, 0x1($t1) /* 18AFF0 8025C710 25290002 */ addiu $t1, $t1, 0x2 /* 18AFF4 8025C714 254A0001 */ addiu $t2, $t2, 0x1 /* 18AFF8 8025C718 0000B812 */ mflo $s7 /* 18AFFC 8025C71C 30C60001 */ andi $a2, $a2, 0x1 /* 18B000 8025C720 01072021 */ addu $a0, $t0, $a3 /* 18B004 8025C724 008F0018 */ mult $a0, $t7 /* 18B008 8025C728 02451021 */ addu $v0, $s2, $a1 /* 18B00C 8025C72C 000211C3 */ sra $v0, $v0, 7 /* 18B010 8025C730 00052FC3 */ sra $a1, $a1, 31 /* 18B014 8025C734 00453823 */ subu $a3, $v0, $a1 /* 18B018 8025C738 00004010 */ mfhi $t0 /* 18B01C 8025C73C AFB70014 */ sw $s7, 0x14($sp) /* 18B020 8025C740 00771821 */ addu $v1, $v1, $s7 /* 18B024 8025C744 006F0018 */ mult $v1, $t7 /* 18B028 8025C748 01041021 */ addu $v0, $t0, $a0 /* 18B02C 8025C74C 000211C3 */ sra $v0, $v0, 7 /* 18B030 8025C750 000427C3 */ sra $a0, $a0, 31 /* 18B034 8025C754 00442823 */ subu $a1, $v0, $a0 /* 18B038 8025C758 00009010 */ mfhi $s2 /* 18B03C 8025C75C 02431021 */ addu $v0, $s2, $v1 /* 18B040 8025C760 000211C3 */ sra $v0, $v0, 7 /* 18B044 8025C764 00031FC3 */ sra $v1, $v1, 31 /* 18B048 8025C768 00432023 */ subu $a0, $v0, $v1 /* 18B04C 8025C76C 30E300FF */ andi $v1, $a3, 0xFF /* 18B050 8025C770 00031AC0 */ sll $v1, $v1, 11 /* 18B054 8025C774 30A200FF */ andi $v0, $a1, 0xFF /* 18B058 8025C778 00021180 */ sll $v0, $v0, 6 /* 18B05C 8025C77C 00621825 */ or $v1, $v1, $v0 /* 18B060 8025C780 308200FF */ andi $v0, $a0, 0xFF /* 18B064 8025C784 00021040 */ sll $v0, $v0, 1 /* 18B068 8025C788 00621825 */ or $v1, $v1, $v0 /* 18B06C 8025C78C 00C33025 */ or $a2, $a2, $v1 /* 18B070 8025C790 A5A60000 */ sh $a2, 0x0($t5) /* 18B074 8025C794 29420010 */ slti $v0, $t2, 0x10 /* 18B078 8025C798 1440FFBF */ bnez $v0, .L8025C698 /* 18B07C 8025C79C 25AD0002 */ addiu $t5, $t5, 0x2 /* 18B080 8025C7A0 258C0001 */ addiu $t4, $t4, 0x1 /* 18B084 8025C7A4 820206CC */ lb $v0, 0x6CC($s0) /* 18B088 8025C7A8 920506CC */ lbu $a1, 0x6CC($s0) /* 18B08C 8025C7AC 0182102A */ slt $v0, $t4, $v0 /* 18B090 8025C7B0 1440FFA4 */ bnez $v0, .L8025C644 /* 18B094 8025C7B4 27390004 */ addiu $t9, $t9, 0x4 .L8025C7B8: /* 18B098 8025C7B8 322300FF */ andi $v1, $s1, 0xFF /* 18B09C 8025C7BC 240200FF */ addiu $v0, $zero, 0xFF /* 18B0A0 8025C7C0 14620004 */ bne $v1, $v0, .L8025C7D4 /* 18B0A4 8025C7C4 00000000 */ nop /* 18B0A8 8025C7C8 96020744 */ lhu $v0, 0x744($s0) /* 18B0AC 8025C7CC A20006C2 */ sb $zero, 0x6C2($s0) .L8025C7D0: /* 18B0B0 8025C7D0 A60206C8 */ sh $v0, 0x6C8($s0) .L8025C7D4: /* 18B0B4 8025C7D4 820306C2 */ lb $v1, 0x6C2($s0) /* 18B0B8 8025C7D8 28620004 */ slti $v0, $v1, 0x4 /* 18B0BC 8025C7DC 1040000D */ beqz $v0, .L8025C814 /* 18B0C0 8025C7E0 00000000 */ nop /* 18B0C4 8025C7E4 0460000B */ bltz $v1, .L8025C814 /* 18B0C8 8025C7E8 00000000 */ nop /* 18B0CC 8025C7EC 16800006 */ bnez $s4, .L8025C808 /* 18B0D0 8025C7F0 0260202D */ daddu $a0, $s3, $zero /* 18B0D4 8025C7F4 02A0282D */ daddu $a1, $s5, $zero /* 18B0D8 8025C7F8 0C096657 */ jal func_8025995C /* 18B0DC 8025C7FC 02C0302D */ daddu $a2, $s6, $zero /* 18B0E0 8025C800 08097205 */ j .L8025C814 /* 18B0E4 8025C804 00000000 */ nop .L8025C808: /* 18B0E8 8025C808 02A0282D */ daddu $a1, $s5, $zero /* 18B0EC 8025C80C 0C0965B0 */ jal func_802596C0 /* 18B0F0 8025C810 02C0302D */ daddu $a2, $s6, $zero .L8025C814: /* 18B0F4 8025C814 8FBF0038 */ lw $ra, 0x38($sp) /* 18B0F8 8025C818 8FB70034 */ lw $s7, 0x34($sp) /* 18B0FC 8025C81C 8FB60030 */ lw $s6, 0x30($sp) /* 18B100 8025C820 8FB5002C */ lw $s5, 0x2C($sp) /* 18B104 8025C824 8FB40028 */ lw $s4, 0x28($sp) /* 18B108 8025C828 8FB30024 */ lw $s3, 0x24($sp) /* 18B10C 8025C82C 8FB20020 */ lw $s2, 0x20($sp) /* 18B110 8025C830 8FB1001C */ lw $s1, 0x1C($sp) /* 18B114 8025C834 8FB00018 */ lw $s0, 0x18($sp) /* 18B118 8025C838 03E00008 */ jr $ra /* 18B11C 8025C83C 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void render_with_palset_blending(b32 isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, b32 skipAnimation) { DecorationTable* decor = part->decorationTable; PAL_PTR color1; PAL_PTR color2; PAL_PTR outColor; s32 i, j; u8 blendAlpha; u8 r2, g2, b2, a1; u8 r1, g1, b1; if (decor->resetPalAdjust != 0) { if (isNpcSprite == SPRITE_MODE_PLAYER) { decor->originalPalettesList = spr_get_player_palettes(part->currentAnimation >> 16); decor->originalPalettesCount = 0; while (decor->originalPalettesList[decor->originalPalettesCount] != (PAL_PTR) -1) { decor->originalPalettesCount++; } } else { decor->originalPalettesList = spr_get_npc_palettes(part->currentAnimation >> 16); decor->originalPalettesCount = 0; while (decor->originalPalettesList[decor->originalPalettesCount] != (PAL_PTR) -1) { decor->originalPalettesCount++; } decor->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); } if (decor->resetPalAdjust == 1) { decor->palAnimState = 0; decor->palBlendAlpha = 0; } else { decor->palAnimState = 0; decor->palBlendAlpha = 255; } for (i = 0; i < decor->originalPalettesCount; i++) { color2 = decor->originalPalettesList[i]; color1 = decor->copiedPalettes[0][i]; decor->adjustedPalettes[i] = color1; if (color2 != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *color1++ = *color2++; } } } decor->nextPalTime = decor->palswapTimeHoldA; decor->palBlendAlpha = 0; decor->palAnimState = PAL_SWAP_HOLD_A; decor->resetPalAdjust = FALSE; } // blending from A -> B switch (decor->palAnimState) { case PAL_SWAP_HOLD_A: if (skipAnimation) { break; } if (decor->nextPalTime != 0) { decor->nextPalTime--; break; } decor->palBlendAlpha = 0; decor->palAnimState = PAL_SWAP_A_TO_B; // fallthrough case PAL_SWAP_A_TO_B: if (!skipAnimation) { decor->palBlendAlpha += 25600 / decor->palswapTimeAtoB; if (decor->palBlendAlpha > 255 * 100) { decor->palBlendAlpha = 255 * 100; } } blendAlpha = decor->palBlendAlpha / 100; // blend all palettes from two palette sets for (i = 0; i < decor->spriteColorVariations; i++) { color2 = decor->originalPalettesList[decor->blendPalA * decor->spriteColorVariations + i]; color1 = decor->originalPalettesList[decor->blendPalB * decor->spriteColorVariations + i]; outColor = decor->copiedPalettes[0][i]; decor->adjustedPalettes[i] = outColor; for (j = 0; j < SPR_PAL_SIZE; j++) { r2 = UNPACK_PAL_R(*color2); g2 = UNPACK_PAL_G(*color2); b2 = UNPACK_PAL_B(*color2); r1 = UNPACK_PAL_R(*color1); g1 = UNPACK_PAL_G(*color1); b1 = UNPACK_PAL_B(*color1); a1 = UNPACK_PAL_A(*color1); color2++; color1++; r1 = LERP_COMPONENT(r2, r1, blendAlpha); g1 = LERP_COMPONENT(g2, g1, blendAlpha); b1 = LERP_COMPONENT(b2, b1, blendAlpha); *outColor++ = PACK_PAL_RGBA(r1, g1, b1, a1); } } if (blendAlpha == 255) { decor->palAnimState = PAL_SWAP_HOLD_B; decor->nextPalTime = decor->palswapTimeHoldB; } break; } switch (decor->palAnimState) { case PAL_SWAP_HOLD_B: if (skipAnimation) { break; } if (decor->nextPalTime != 0) { decor->nextPalTime--; break; } decor->palBlendAlpha = 0; decor->palAnimState = PAL_SWAP_B_TO_A; // fallthrough case PAL_SWAP_B_TO_A: if (!skipAnimation) { decor->palBlendAlpha += 25600 / decor->palswapTimeBtoA; if (decor->palBlendAlpha > 255 * 100) { decor->palBlendAlpha = 255 * 100; } } blendAlpha = decor->palBlendAlpha / 100; // blend all palettes from two palette sets for (i = 0; i < decor->spriteColorVariations; i++) { color2 = decor->originalPalettesList[decor->blendPalA * decor->spriteColorVariations + i]; color1 = decor->originalPalettesList[decor->blendPalB * decor->spriteColorVariations + i]; outColor = decor->copiedPalettes[0][i]; decor->adjustedPalettes[i] = outColor; for (j = 0; j < SPR_PAL_SIZE; j++) { r2 = UNPACK_PAL_R(*color2); g2 = UNPACK_PAL_G(*color2); b2 = UNPACK_PAL_B(*color2); r1 = UNPACK_PAL_R(*color1); g1 = UNPACK_PAL_G(*color1); b1 = UNPACK_PAL_B(*color1); a1 = UNPACK_PAL_A(*color1); color2++; color1++; r1 = LERP_COMPONENT(r2, r1, blendAlpha); g1 = LERP_COMPONENT(g2, g1, blendAlpha); b1 = LERP_COMPONENT(b2, b1, blendAlpha); *outColor++ = PACK_PAL_RGBA(r1, g1, b1, a1); } } if (blendAlpha == 255) { decor->palAnimState = PAL_SWAP_HOLD_A; decor->nextPalTime = decor->palswapTimeHoldA; } break; } switch (decor->palAnimState) { case PAL_SWAP_HOLD_A: case PAL_SWAP_A_TO_B: case PAL_SWAP_HOLD_B: case PAL_SWAP_B_TO_A: if (isNpcSprite == SPRITE_MODE_PLAYER) { func_8025995C(part, yaw, mtx); } else { func_802596C0(part, yaw, mtx); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel is_model_center_visible /* B2F0C 8011C80C 27BDFF88 */ addiu $sp, $sp, -0x78 /* B2F10 8011C810 AFB00040 */ sw $s0, 0x40($sp) /* B2F14 8011C814 00C0802D */ daddu $s0, $a2, $zero /* B2F18 8011C818 AFB10044 */ sw $s1, 0x44($sp) /* B2F1C 8011C81C 00E0882D */ daddu $s1, $a3, $zero /* B2F20 8011C820 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* B2F24 8011C824 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* B2F28 8011C828 3084FFFF */ andi $a0, $a0, 0xFFFF /* B2F2C 8011C82C AFA5007C */ sw $a1, 0x7C($sp) /* B2F30 8011C830 3C05800B */ lui $a1, %hi(gCameras) /* B2F34 8011C834 24A51D80 */ addiu $a1, $a1, %lo(gCameras) /* B2F38 8011C838 AFBF0064 */ sw $ra, 0x64($sp) /* B2F3C 8011C83C AFBE0060 */ sw $fp, 0x60($sp) /* B2F40 8011C840 AFB7005C */ sw $s7, 0x5C($sp) /* B2F44 8011C844 AFB60058 */ sw $s6, 0x58($sp) /* B2F48 8011C848 AFB50054 */ sw $s5, 0x54($sp) /* B2F4C 8011C84C AFB40050 */ sw $s4, 0x50($sp) /* B2F50 8011C850 AFB3004C */ sw $s3, 0x4C($sp) /* B2F54 8011C854 AFB20048 */ sw $s2, 0x48($sp) /* B2F58 8011C858 F7B60070 */ sdc1 $f22, 0x70($sp) /* B2F5C 8011C85C F7B40068 */ sdc1 $f20, 0x68($sp) /* B2F60 8011C860 00031080 */ sll $v0, $v1, 2 /* B2F64 8011C864 00431021 */ addu $v0, $v0, $v1 /* B2F68 8011C868 00021080 */ sll $v0, $v0, 2 /* B2F6C 8011C86C 00431023 */ subu $v0, $v0, $v1 /* B2F70 8011C870 000218C0 */ sll $v1, $v0, 3 /* B2F74 8011C874 00431021 */ addu $v0, $v0, $v1 /* B2F78 8011C878 000210C0 */ sll $v0, $v0, 3 /* B2F7C 8011C87C 0C046C04 */ jal get_model_list_index_from_tree_index /* B2F80 8011C880 0045F021 */ addu $fp, $v0, $a1 /* B2F84 8011C884 0C046B4C */ jal get_model_from_list_index /* B2F88 8011C888 0040202D */ daddu $a0, $v0, $zero /* B2F8C 8011C88C 8FA8007C */ lw $t0, 0x7C($sp) /* B2F90 8011C890 0040182D */ daddu $v1, $v0, $zero /* B2F94 8011C894 29020010 */ slti $v0, $t0, 0x10 /* B2F98 8011C898 104001B9 */ beqz $v0, .L8011CF80 /* B2F9C 8011C89C 27A20028 */ addiu $v0, $sp, 0x28 /* B2FA0 8011C8A0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* B2FA4 8011C8A4 4481A000 */ mtc1 $at, $f20 /* B2FA8 8011C8A8 AFA20014 */ sw $v0, 0x14($sp) /* B2FAC 8011C8AC 27A2002C */ addiu $v0, $sp, 0x2C /* B2FB0 8011C8B0 AFA20018 */ sw $v0, 0x18($sp) /* B2FB4 8011C8B4 27A20030 */ addiu $v0, $sp, 0x30 /* B2FB8 8011C8B8 AFA2001C */ sw $v0, 0x1C($sp) /* B2FBC 8011C8BC 27A20034 */ addiu $v0, $sp, 0x34 /* B2FC0 8011C8C0 AFA20020 */ sw $v0, 0x20($sp) /* B2FC4 8011C8C4 E7B40010 */ swc1 $f20, 0x10($sp) /* B2FC8 8011C8C8 8C650098 */ lw $a1, 0x98($v1) /* B2FCC 8011C8CC 8C66009C */ lw $a2, 0x9C($v1) /* B2FD0 8011C8D0 8C6700A0 */ lw $a3, 0xA0($v1) /* B2FD4 8011C8D4 0C00A588 */ jal transform_point /* B2FD8 8011C8D8 27C400D4 */ addiu $a0, $fp, 0xD4 /* B2FDC 8011C8DC C7A00034 */ lwc1 $f0, 0x34($sp) /* B2FE0 8011C8E0 44809000 */ mtc1 $zero, $f18 /* B2FE4 8011C8E4 00000000 */ nop /* B2FE8 8011C8E8 46120032 */ c.eq.s $f0, $f18 /* B2FEC 8011C8EC 00000000 */ nop /* B2FF0 8011C8F0 45000004 */ bc1f .L8011C904 /* B2FF4 8011C8F4 24020001 */ addiu $v0, $zero, 0x1 /* B2FF8 8011C8F8 E6120000 */ swc1 $f18, 0x0($s0) /* B2FFC 8011C8FC 080473E1 */ j .L8011CF84 /* B3000 8011C900 E6320000 */ swc1 $f18, 0x0($s1) .L8011C904: /* B3004 8011C904 C7AC0030 */ lwc1 $f12, 0x30($sp) /* B3008 8011C908 4600A383 */ div.s $f14, $f20, $f0 /* B300C 8011C90C 460E6302 */ mul.s $f12, $f12, $f14 /* B3010 8011C910 00000000 */ nop /* B3014 8011C914 46146080 */ add.s $f2, $f12, $f20 /* B3018 8011C918 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* B301C 8011C91C 44814800 */ mtc1 $at, $f9 /* B3020 8011C920 44804000 */ mtc1 $zero, $f8 /* B3024 8011C924 460010A1 */ cvt.d.s $f2, $f2 /* B3028 8011C928 46281082 */ mul.d $f2, $f2, $f8 /* B302C 8011C92C 00000000 */ nop /* B3030 8011C930 C7B00028 */ lwc1 $f16, 0x28($sp) /* B3034 8011C934 460E8402 */ mul.s $f16, $f16, $f14 /* B3038 8011C938 00000000 */ nop /* B303C 8011C93C 87C2000A */ lh $v0, 0xA($fp) /* B3040 8011C940 44820000 */ mtc1 $v0, $f0 /* B3044 8011C944 00000000 */ nop /* B3048 8011C948 46800020 */ cvt.s.w $f0, $f0 /* B304C 8011C94C 46008102 */ mul.s $f4, $f16, $f0 /* B3050 8011C950 00000000 */ nop /* B3054 8011C954 46002100 */ add.s $f4, $f4, $f0 /* B3058 8011C958 46002121 */ cvt.d.s $f4, $f4 /* B305C 8011C95C 46282102 */ mul.d $f4, $f4, $f8 /* B3060 8011C960 00000000 */ nop /* B3064 8011C964 C7A6002C */ lwc1 $f6, 0x2C($sp) /* B3068 8011C968 46007007 */ neg.s $f0, $f14 /* B306C 8011C96C 46003182 */ mul.s $f6, $f6, $f0 /* B3070 8011C970 00000000 */ nop /* B3074 8011C974 87C2000C */ lh $v0, 0xC($fp) /* B3078 8011C978 44825000 */ mtc1 $v0, $f10 /* B307C 8011C97C 00000000 */ nop /* B3080 8011C980 468052A0 */ cvt.s.w $f10, $f10 /* B3084 8011C984 460A3002 */ mul.s $f0, $f6, $f10 /* B3088 8011C988 00000000 */ nop /* B308C 8011C98C E7AE0034 */ swc1 $f14, 0x34($sp) /* B3090 8011C990 E7B00028 */ swc1 $f16, 0x28($sp) /* B3094 8011C994 E7AC0030 */ swc1 $f12, 0x30($sp) /* B3098 8011C998 460A0000 */ add.s $f0, $f0, $f10 /* B309C 8011C99C E7A6002C */ swc1 $f6, 0x2C($sp) /* B30A0 8011C9A0 462010A0 */ cvt.s.d $f2, $f2 /* B30A4 8011C9A4 46000021 */ cvt.d.s $f0, $f0 /* B30A8 8011C9A8 46280002 */ mul.d $f0, $f0, $f8 /* B30AC 8011C9AC 00000000 */ nop /* B30B0 8011C9B0 E7A20030 */ swc1 $f2, 0x30($sp) /* B30B4 8011C9B4 87C2000E */ lh $v0, 0xE($fp) /* B30B8 8011C9B8 44821000 */ mtc1 $v0, $f2 /* B30BC 8011C9BC 00000000 */ nop /* B30C0 8011C9C0 468010A0 */ cvt.s.w $f2, $f2 /* B30C4 8011C9C4 46202120 */ cvt.s.d $f4, $f4 /* B30C8 8011C9C8 E7A40028 */ swc1 $f4, 0x28($sp) /* B30CC 8011C9CC 87C20010 */ lh $v0, 0x10($fp) /* B30D0 8011C9D0 46022100 */ add.s $f4, $f4, $f2 /* B30D4 8011C9D4 44821000 */ mtc1 $v0, $f2 /* B30D8 8011C9D8 00000000 */ nop /* B30DC 8011C9DC 468010A0 */ cvt.s.w $f2, $f2 /* B30E0 8011C9E0 4600258D */ trunc.w.s $f22, $f4 /* B30E4 8011C9E4 4402B000 */ mfc1 $v0, $f22 /* B30E8 8011C9E8 E7A40028 */ swc1 $f4, 0x28($sp) /* B30EC 8011C9EC 46200020 */ cvt.s.d $f0, $f0 /* B30F0 8011C9F0 46020080 */ add.s $f2, $f0, $f2 /* B30F4 8011C9F4 E7A0002C */ swc1 $f0, 0x2C($sp) /* B30F8 8011C9F8 44820000 */ mtc1 $v0, $f0 /* B30FC 8011C9FC 00000000 */ nop /* B3100 8011CA00 46800020 */ cvt.s.w $f0, $f0 /* B3104 8011CA04 E7A2002C */ swc1 $f2, 0x2C($sp) /* B3108 8011CA08 E6000000 */ swc1 $f0, 0x0($s0) /* B310C 8011CA0C C7A0002C */ lwc1 $f0, 0x2C($sp) /* B3110 8011CA10 4600058D */ trunc.w.s $f22, $f0 /* B3114 8011CA14 4402B000 */ mfc1 $v0, $f22 /* B3118 8011CA18 00000000 */ nop /* B311C 8011CA1C 44820000 */ mtc1 $v0, $f0 /* B3120 8011CA20 00000000 */ nop /* B3124 8011CA24 46800020 */ cvt.s.w $f0, $f0 /* B3128 8011CA28 E6200000 */ swc1 $f0, 0x0($s1) /* B312C 8011CA2C 8FA8007C */ lw $t0, 0x7C($sp) /* B3130 8011CA30 05010008 */ bgez $t0, .L8011CA54 /* B3134 8011CA34 00000000 */ nop /* B3138 8011CA38 C7A00030 */ lwc1 $f0, 0x30($sp) /* B313C 8011CA3C 4600903C */ c.lt.s $f18, $f0 /* B3140 8011CA40 00000000 */ nop /* B3144 8011CA44 4501014F */ bc1t .L8011CF84 /* B3148 8011CA48 0000102D */ daddu $v0, $zero, $zero /* B314C 8011CA4C 080473E1 */ j .L8011CF84 /* B3150 8011CA50 24020001 */ addiu $v0, $zero, 0x1 .L8011CA54: /* B3154 8011CA54 C7A40028 */ lwc1 $f4, 0x28($sp) /* B3158 8011CA58 4604903E */ c.le.s $f18, $f4 /* B315C 8011CA5C 00000000 */ nop /* B3160 8011CA60 45000140 */ bc1f .L8011CF64 /* B3164 8011CA64 00000000 */ nop /* B3168 8011CA68 C7A2002C */ lwc1 $f2, 0x2C($sp) /* B316C 8011CA6C 4602903E */ c.le.s $f18, $f2 /* B3170 8011CA70 00000000 */ nop /* B3174 8011CA74 4500013B */ bc1f .L8011CF64 /* B3178 8011CA78 00000000 */ nop /* B317C 8011CA7C 3C0143A0 */ lui $at, (0x43A00000 >> 16) /* B3180 8011CA80 44810000 */ mtc1 $at, $f0 /* B3184 8011CA84 00000000 */ nop /* B3188 8011CA88 4600203C */ c.lt.s $f4, $f0 /* B318C 8011CA8C 00000000 */ nop /* B3190 8011CA90 45000134 */ bc1f .L8011CF64 /* B3194 8011CA94 00000000 */ nop /* B3198 8011CA98 3C014370 */ lui $at, (0x43700000 >> 16) /* B319C 8011CA9C 44810000 */ mtc1 $at, $f0 /* B31A0 8011CAA0 00000000 */ nop /* B31A4 8011CAA4 4600103C */ c.lt.s $f2, $f0 /* B31A8 8011CAA8 00000000 */ nop /* B31AC 8011CAAC 4500012D */ bc1f .L8011CF64 /* B31B0 8011CAB0 3C05FD10 */ lui $a1, (0xFD10013F >> 16) /* B31B4 8011CAB4 3C11800A */ lui $s1, %hi(gMainGfxPos) /* B31B8 8011CAB8 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* B31BC 8011CABC 34A5013F */ ori $a1, $a1, (0xFD10013F & 0xFFFF) /* B31C0 8011CAC0 4600158D */ trunc.w.s $f22, $f2 /* B31C4 8011CAC4 4402B000 */ mfc1 $v0, $f22 /* B31C8 8011CAC8 00000000 */ nop /* B31CC 8011CACC 00022080 */ sll $a0, $v0, 2 /* B31D0 8011CAD0 00822021 */ addu $a0, $a0, $v0 /* B31D4 8011CAD4 000421C0 */ sll $a0, $a0, 7 /* B31D8 8011CAD8 3C13E700 */ lui $s3, (0xE7000000 >> 16) /* B31DC 8011CADC 8E320000 */ lw $s2, 0x0($s1) /* B31E0 8011CAE0 3C02800A */ lui $v0, %hi(nuGfxZBuffer) /* B31E4 8011CAE4 8C42A5DC */ lw $v0, %lo(nuGfxZBuffer)($v0) /* B31E8 8011CAE8 0240182D */ daddu $v1, $s2, $zero /* B31EC 8011CAEC 26520008 */ addiu $s2, $s2, 0x8 /* B31F0 8011CAF0 00442021 */ addu $a0, $v0, $a0 /* B31F4 8011CAF4 26420008 */ addiu $v0, $s2, 0x8 /* B31F8 8011CAF8 AE320000 */ sw $s2, 0x0($s1) /* B31FC 8011CAFC AC730000 */ sw $s3, 0x0($v1) /* B3200 8011CB00 AC600004 */ sw $zero, 0x4($v1) /* B3204 8011CB04 AE220000 */ sw $v0, 0x0($s1) /* B3208 8011CB08 0C0187A4 */ jal osVirtualToPhysical /* B320C 8011CB0C AE450000 */ sw $a1, 0x0($s2) /* B3210 8011CB10 3C06F510 */ lui $a2, (0xF5100200 >> 16) /* B3214 8011CB14 34C60200 */ ori $a2, $a2, (0xF5100200 & 0xFFFF) /* B3218 8011CB18 3C030700 */ lui $v1, (0x7000090 >> 16) /* B321C 8011CB1C 34630090 */ ori $v1, $v1, (0x7000090 & 0xFFFF) /* B3220 8011CB20 3C18FF10 */ lui $t8, (0xFF10013F >> 16) /* B3224 8011CB24 3718013F */ ori $t8, $t8, (0xFF10013F & 0xFFFF) /* B3228 8011CB28 3C07E300 */ lui $a3, (0xE3000A01 >> 16) /* B322C 8011CB2C 34E70A01 */ ori $a3, $a3, (0xE3000A01 & 0xFFFF) /* B3230 8011CB30 3C0AE200 */ lui $t2, (0xE200001C >> 16) /* B3234 8011CB34 354A001C */ ori $t2, $t2, (0xE200001C & 0xFFFF) /* B3238 8011CB38 3C080F0A */ lui $t0, (0xF0A4000 >> 16) /* B323C 8011CB3C 35084000 */ ori $t0, $t0, (0xF0A4000 & 0xFFFF) /* B3240 8011CB40 3C0BFCFF */ lui $t3, (0xFCFFFFFF >> 16) /* B3244 8011CB44 356BFFFF */ ori $t3, $t3, (0xFCFFFFFF & 0xFFFF) /* B3248 8011CB48 3C09FFFC */ lui $t1, (0xFFFCF279 >> 16) /* B324C 8011CB4C 3529F279 */ ori $t1, $t1, (0xFFFCF279 & 0xFFFF) /* B3250 8011CB50 3C0CE300 */ lui $t4, (0xE3001201 >> 16) /* B3254 8011CB54 358C1201 */ ori $t4, $t4, (0xE3001201 & 0xFFFF) /* B3258 8011CB58 3C0DE300 */ lui $t5, (0xE3000C00 >> 16) /* B325C 8011CB5C 35AD0C00 */ ori $t5, $t5, (0xE3000C00 & 0xFFFF) /* B3260 8011CB60 3C0ED700 */ lui $t6, (0xD7000002 >> 16) /* B3264 8011CB64 35CE0002 */ ori $t6, $t6, (0xD7000002 & 0xFFFF) /* B3268 8011CB68 3C0FE300 */ lui $t7, (0xE3001001 >> 16) /* B326C 8011CB6C 35EF1001 */ ori $t7, $t7, (0xE3001001 & 0xFFFF) /* B3270 8011CB70 3C15E300 */ lui $s5, (0xE3000D01 >> 16) /* B3274 8011CB74 36B50D01 */ ori $s5, $s5, (0xE3000D01 & 0xFFFF) /* B3278 8011CB78 3C16E300 */ lui $s6, (0xE3000F00 >> 16) /* B327C 8011CB7C 36D60F00 */ ori $s6, $s6, (0xE3000F00 & 0xFFFF) /* B3280 8011CB80 3C17E401 */ lui $s7, (0xE4010004 >> 16) /* B3284 8011CB84 36F70004 */ ori $s7, $s7, (0xE4010004 & 0xFFFF) /* B3288 8011CB88 3C190400 */ lui $t9, (0x4000400 >> 16) /* B328C 8011CB8C AFA80038 */ sw $t0, 0x38($sp) /* B3290 8011CB90 8E300000 */ lw $s0, 0x0($s1) /* B3294 8011CB94 3C148015 */ lui $s4, %hi(depthCopyBuffer) /* B3298 8011CB98 26943380 */ addiu $s4, $s4, %lo(depthCopyBuffer) /* B329C 8011CB9C AE420004 */ sw $v0, 0x4($s2) /* B32A0 8011CBA0 3C12ED00 */ lui $s2, (0xED000000 >> 16) /* B32A4 8011CBA4 0200102D */ daddu $v0, $s0, $zero /* B32A8 8011CBA8 26100008 */ addiu $s0, $s0, 0x8 /* B32AC 8011CBAC AE300000 */ sw $s0, 0x0($s1) /* B32B0 8011CBB0 AC460000 */ sw $a2, 0x0($v0) /* B32B4 8011CBB4 AC430004 */ sw $v1, 0x4($v0) /* B32B8 8011CBB8 26020008 */ addiu $v0, $s0, 0x8 /* B32BC 8011CBBC AE220000 */ sw $v0, 0x0($s1) /* B32C0 8011CBC0 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* B32C4 8011CBC4 AE020000 */ sw $v0, 0x0($s0) /* B32C8 8011CBC8 AE000004 */ sw $zero, 0x4($s0) /* B32CC 8011CBCC C7A00028 */ lwc1 $f0, 0x28($sp) /* B32D0 8011CBD0 26020010 */ addiu $v0, $s0, 0x10 /* B32D4 8011CBD4 AE220000 */ sw $v0, 0x0($s1) /* B32D8 8011CBD8 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* B32DC 8011CBDC 4600058D */ trunc.w.s $f22, $f0 /* B32E0 8011CBE0 4405B000 */ mfc1 $a1, $f22 /* B32E4 8011CBE4 00000000 */ nop /* B32E8 8011CBE8 00052080 */ sll $a0, $a1, 2 /* B32EC 8011CBEC 30840FFF */ andi $a0, $a0, 0xFFF /* B32F0 8011CBF0 00042300 */ sll $a0, $a0, 12 /* B32F4 8011CBF4 00821025 */ or $v0, $a0, $v0 /* B32F8 8011CBF8 24A30003 */ addiu $v1, $a1, 0x3 /* B32FC 8011CBFC 00031880 */ sll $v1, $v1, 2 /* B3300 8011CC00 30630FFF */ andi $v1, $v1, 0xFFF /* B3304 8011CC04 00031B00 */ sll $v1, $v1, 12 /* B3308 8011CC08 AE020008 */ sw $v0, 0x8($s0) /* B330C 8011CC0C 3C020700 */ lui $v0, (0x7000000 >> 16) /* B3310 8011CC10 00621025 */ or $v0, $v1, $v0 /* B3314 8011CC14 AE02000C */ sw $v0, 0xC($s0) /* B3318 8011CC18 26020018 */ addiu $v0, $s0, 0x18 /* B331C 8011CC1C AE220000 */ sw $v0, 0x0($s1) /* B3320 8011CC20 26020020 */ addiu $v0, $s0, 0x20 /* B3324 8011CC24 AE130010 */ sw $s3, 0x10($s0) /* B3328 8011CC28 AE000014 */ sw $zero, 0x14($s0) /* B332C 8011CC2C AE220000 */ sw $v0, 0x0($s1) /* B3330 8011CC30 24020090 */ addiu $v0, $zero, 0x90 /* B3334 8011CC34 AE02001C */ sw $v0, 0x1C($s0) /* B3338 8011CC38 26020028 */ addiu $v0, $s0, 0x28 /* B333C 8011CC3C AE060018 */ sw $a2, 0x18($s0) /* B3340 8011CC40 AE220000 */ sw $v0, 0x0($s1) /* B3344 8011CC44 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* B3348 8011CC48 00822025 */ or $a0, $a0, $v0 /* B334C 8011CC4C 26020030 */ addiu $v0, $s0, 0x30 /* B3350 8011CC50 AE040020 */ sw $a0, 0x20($s0) /* B3354 8011CC54 AE030024 */ sw $v1, 0x24($s0) /* B3358 8011CC58 AE220000 */ sw $v0, 0x0($s1) /* B335C 8011CC5C 26020038 */ addiu $v0, $s0, 0x38 /* B3360 8011CC60 AE130028 */ sw $s3, 0x28($s0) /* B3364 8011CC64 AE00002C */ sw $zero, 0x2C($s0) /* B3368 8011CC68 AE220000 */ sw $v0, 0x0($s1) /* B336C 8011CC6C 26020040 */ addiu $v0, $s0, 0x40 /* B3370 8011CC70 AE180030 */ sw $t8, 0x30($s0) /* B3374 8011CC74 AE140034 */ sw $s4, 0x34($s0) /* B3378 8011CC78 AE220000 */ sw $v0, 0x0($s1) /* B337C 8011CC7C 26020048 */ addiu $v0, $s0, 0x48 /* B3380 8011CC80 AE130038 */ sw $s3, 0x38($s0) /* B3384 8011CC84 AE00003C */ sw $zero, 0x3C($s0) /* B3388 8011CC88 AE220000 */ sw $v0, 0x0($s1) /* B338C 8011CC8C 26020050 */ addiu $v0, $s0, 0x50 /* B3390 8011CC90 AE070040 */ sw $a3, 0x40($s0) /* B3394 8011CC94 AE000044 */ sw $zero, 0x44($s0) /* B3398 8011CC98 AE220000 */ sw $v0, 0x0($s1) /* B339C 8011CC9C AE0A0048 */ sw $t2, 0x48($s0) /* B33A0 8011CCA0 8FA80038 */ lw $t0, 0x38($sp) /* B33A4 8011CCA4 26020058 */ addiu $v0, $s0, 0x58 /* B33A8 8011CCA8 AE08004C */ sw $t0, 0x4C($s0) /* B33AC 8011CCAC AE220000 */ sw $v0, 0x0($s1) /* B33B0 8011CCB0 26020060 */ addiu $v0, $s0, 0x60 /* B33B4 8011CCB4 AE0B0050 */ sw $t3, 0x50($s0) /* B33B8 8011CCB8 AE090054 */ sw $t1, 0x54($s0) /* B33BC 8011CCBC AE220000 */ sw $v0, 0x0($s1) /* B33C0 8011CCC0 26020068 */ addiu $v0, $s0, 0x68 /* B33C4 8011CCC4 AE0C0058 */ sw $t4, 0x58($s0) /* B33C8 8011CCC8 AE00005C */ sw $zero, 0x5C($s0) /* B33CC 8011CCCC AE220000 */ sw $v0, 0x0($s1) /* B33D0 8011CCD0 26020070 */ addiu $v0, $s0, 0x70 /* B33D4 8011CCD4 AE0D0060 */ sw $t5, 0x60($s0) /* B33D8 8011CCD8 AE000064 */ sw $zero, 0x64($s0) /* B33DC 8011CCDC AE220000 */ sw $v0, 0x0($s1) /* B33E0 8011CCE0 2402FFFF */ addiu $v0, $zero, -0x1 /* B33E4 8011CCE4 AE02006C */ sw $v0, 0x6C($s0) /* B33E8 8011CCE8 26020078 */ addiu $v0, $s0, 0x78 /* B33EC 8011CCEC AE0E0068 */ sw $t6, 0x68($s0) /* B33F0 8011CCF0 AE220000 */ sw $v0, 0x0($s1) /* B33F4 8011CCF4 26020080 */ addiu $v0, $s0, 0x80 /* B33F8 8011CCF8 AE0F0070 */ sw $t7, 0x70($s0) /* B33FC 8011CCFC AE000074 */ sw $zero, 0x74($s0) /* B3400 8011CD00 AE220000 */ sw $v0, 0x0($s1) /* B3404 8011CD04 26020088 */ addiu $v0, $s0, 0x88 /* B3408 8011CD08 AE150078 */ sw $s5, 0x78($s0) /* B340C 8011CD0C AE00007C */ sw $zero, 0x7C($s0) /* B3410 8011CD10 AE220000 */ sw $v0, 0x0($s1) /* B3414 8011CD14 26020090 */ addiu $v0, $s0, 0x90 /* B3418 8011CD18 AE160080 */ sw $s6, 0x80($s0) /* B341C 8011CD1C AE000084 */ sw $zero, 0x84($s0) /* B3420 8011CD20 AE220000 */ sw $v0, 0x0($s1) /* B3424 8011CD24 26020098 */ addiu $v0, $s0, 0x98 /* B3428 8011CD28 AE220000 */ sw $v0, 0x0($s1) /* B342C 8011CD2C AE170090 */ sw $s7, 0x90($s0) /* B3430 8011CD30 8FA8007C */ lw $t0, 0x7C($sp) /* B3434 8011CD34 3C014080 */ lui $at, (0x40800000 >> 16) /* B3438 8011CD38 4481A000 */ mtc1 $at, $f20 /* B343C 8011CD3C 00081080 */ sll $v0, $t0, 2 /* B3440 8011CD40 30420FFF */ andi $v0, $v0, 0xFFF /* B3444 8011CD44 00021300 */ sll $v0, $v0, 12 /* B3448 8011CD48 AE020094 */ sw $v0, 0x94($s0) /* B344C 8011CD4C 260200A0 */ addiu $v0, $s0, 0xA0 /* B3450 8011CD50 AE220000 */ sw $v0, 0x0($s1) /* B3454 8011CD54 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* B3458 8011CD58 AE020098 */ sw $v0, 0x98($s0) /* B345C 8011CD5C C7A0007C */ lwc1 $f0, 0x7C($sp) /* B3460 8011CD60 46800020 */ cvt.s.w $f0, $f0 /* B3464 8011CD64 46140002 */ mul.s $f0, $f0, $f20 /* B3468 8011CD68 00000000 */ nop /* B346C 8011CD6C 00052D40 */ sll $a1, $a1, 21 /* B3470 8011CD70 260200A8 */ addiu $v0, $s0, 0xA8 /* B3474 8011CD74 AE05009C */ sw $a1, 0x9C($s0) /* B3478 8011CD78 AE220000 */ sw $v0, 0x0($s1) /* B347C 8011CD7C 4600058D */ trunc.w.s $f22, $f0 /* B3480 8011CD80 4402B000 */ mfc1 $v0, $f22 /* B3484 8011CD84 8FA8007C */ lw $t0, 0x7C($sp) /* B3488 8011CD88 37390400 */ ori $t9, $t9, (0x4000400 & 0xFFFF) /* B348C 8011CD8C 25030001 */ addiu $v1, $t0, 0x1 /* B3490 8011CD90 44830000 */ mtc1 $v1, $f0 /* B3494 8011CD94 00000000 */ nop /* B3498 8011CD98 46800020 */ cvt.s.w $f0, $f0 /* B349C 8011CD9C 46140002 */ mul.s $f0, $f0, $f20 /* B34A0 8011CDA0 00000000 */ nop /* B34A4 8011CDA4 30420FFF */ andi $v0, $v0, 0xFFF /* B34A8 8011CDA8 00021300 */ sll $v0, $v0, 12 /* B34AC 8011CDAC 00521025 */ or $v0, $v0, $s2 /* B34B0 8011CDB0 AE020088 */ sw $v0, 0x88($s0) /* B34B4 8011CDB4 4600058D */ trunc.w.s $f22, $f0 /* B34B8 8011CDB8 4402B000 */ mfc1 $v0, $f22 /* B34BC 8011CDBC 00000000 */ nop /* B34C0 8011CDC0 30420FFF */ andi $v0, $v0, 0xFFF /* B34C4 8011CDC4 00021300 */ sll $v0, $v0, 12 /* B34C8 8011CDC8 34420004 */ ori $v0, $v0, 0x4 /* B34CC 8011CDCC AE02008C */ sw $v0, 0x8C($s0) /* B34D0 8011CDD0 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* B34D4 8011CDD4 AE0200A0 */ sw $v0, 0xA0($s0) /* B34D8 8011CDD8 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) /* B34DC 8011CDDC 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) /* B34E0 8011CDE0 260200B0 */ addiu $v0, $s0, 0xB0 /* B34E4 8011CDE4 AE1900A4 */ sw $t9, 0xA4($s0) /* B34E8 8011CDE8 AE220000 */ sw $v0, 0x0($s1) /* B34EC 8011CDEC 260200B8 */ addiu $v0, $s0, 0xB8 /* B34F0 8011CDF0 AE1300A8 */ sw $s3, 0xA8($s0) /* B34F4 8011CDF4 AE0000AC */ sw $zero, 0xAC($s0) /* B34F8 8011CDF8 AE220000 */ sw $v0, 0x0($s1) /* B34FC 8011CDFC 0C0187A4 */ jal osVirtualToPhysical /* B3500 8011CE00 AE1800B0 */ sw $t8, 0xB0($s0) /* B3504 8011CE04 8E240000 */ lw $a0, 0x0($s1) /* B3508 8011CE08 AE0200B4 */ sw $v0, 0xB4($s0) /* B350C 8011CE0C 0080102D */ daddu $v0, $a0, $zero /* B3510 8011CE10 AC530000 */ sw $s3, 0x0($v0) /* B3514 8011CE14 AC400004 */ sw $zero, 0x4($v0) /* B3518 8011CE18 87C2000E */ lh $v0, 0xE($fp) /* B351C 8011CE1C 44820000 */ mtc1 $v0, $f0 /* B3520 8011CE20 00000000 */ nop /* B3524 8011CE24 46800020 */ cvt.s.w $f0, $f0 /* B3528 8011CE28 46140002 */ mul.s $f0, $f0, $f20 /* B352C 8011CE2C 00000000 */ nop /* B3530 8011CE30 87C20010 */ lh $v0, 0x10($fp) /* B3534 8011CE34 44821000 */ mtc1 $v0, $f2 /* B3538 8011CE38 00000000 */ nop /* B353C 8011CE3C 468010A0 */ cvt.s.w $f2, $f2 /* B3540 8011CE40 46141082 */ mul.s $f2, $f2, $f20 /* B3544 8011CE44 00000000 */ nop /* B3548 8011CE48 24840008 */ addiu $a0, $a0, 0x8 /* B354C 8011CE4C 4600058D */ trunc.w.s $f22, $f0 /* B3550 8011CE50 4403B000 */ mfc1 $v1, $f22 /* B3554 8011CE54 00000000 */ nop /* B3558 8011CE58 30630FFF */ andi $v1, $v1, 0xFFF /* B355C 8011CE5C 00031B00 */ sll $v1, $v1, 12 /* B3560 8011CE60 4600158D */ trunc.w.s $f22, $f2 /* B3564 8011CE64 4402B000 */ mfc1 $v0, $f22 /* B3568 8011CE68 00000000 */ nop /* B356C 8011CE6C 30420FFF */ andi $v0, $v0, 0xFFF /* B3570 8011CE70 00521025 */ or $v0, $v0, $s2 /* B3574 8011CE74 00621825 */ or $v1, $v1, $v0 /* B3578 8011CE78 AC830000 */ sw $v1, 0x0($a0) /* B357C 8011CE7C 87C2000E */ lh $v0, 0xE($fp) /* B3580 8011CE80 87C3000A */ lh $v1, 0xA($fp) /* B3584 8011CE84 00431021 */ addu $v0, $v0, $v1 /* B3588 8011CE88 44821000 */ mtc1 $v0, $f2 /* B358C 8011CE8C 00000000 */ nop /* B3590 8011CE90 468010A0 */ cvt.s.w $f2, $f2 /* B3594 8011CE94 46141082 */ mul.s $f2, $f2, $f20 /* B3598 8011CE98 00000000 */ nop /* B359C 8011CE9C 87C20010 */ lh $v0, 0x10($fp) /* B35A0 8011CEA0 87C3000C */ lh $v1, 0xC($fp) /* B35A4 8011CEA4 00431021 */ addu $v0, $v0, $v1 /* B35A8 8011CEA8 44820000 */ mtc1 $v0, $f0 /* B35AC 8011CEAC 00000000 */ nop /* B35B0 8011CEB0 46800020 */ cvt.s.w $f0, $f0 /* B35B4 8011CEB4 46140002 */ mul.s $f0, $f0, $f20 /* B35B8 8011CEB8 00000000 */ nop /* B35BC 8011CEBC AE240000 */ sw $a0, 0x0($s1) /* B35C0 8011CEC0 4600158D */ trunc.w.s $f22, $f2 /* B35C4 8011CEC4 4402B000 */ mfc1 $v0, $f22 /* B35C8 8011CEC8 00000000 */ nop /* B35CC 8011CECC 30420FFF */ andi $v0, $v0, 0xFFF /* B35D0 8011CED0 00021300 */ sll $v0, $v0, 12 /* B35D4 8011CED4 4600058D */ trunc.w.s $f22, $f0 /* B35D8 8011CED8 4403B000 */ mfc1 $v1, $f22 /* B35DC 8011CEDC 00000000 */ nop /* B35E0 8011CEE0 30630FFF */ andi $v1, $v1, 0xFFF /* B35E4 8011CEE4 00431025 */ or $v0, $v0, $v1 /* B35E8 8011CEE8 AC820004 */ sw $v0, 0x4($a0) /* B35EC 8011CEEC 8FA8007C */ lw $t0, 0x7C($sp) /* B35F0 8011CEF0 3C0146FF */ lui $at, (0x46FF8000 >> 16) /* B35F4 8011CEF4 34218000 */ ori $at, $at, (0x46FF8000 & 0xFFFF) /* B35F8 8011CEF8 44810000 */ mtc1 $at, $f0 /* B35FC 8011CEFC 00081040 */ sll $v0, $t0, 1 /* B3600 8011CF00 00541021 */ addu $v0, $v0, $s4 /* B3604 8011CF04 94420000 */ lhu $v0, 0x0($v0) /* B3608 8011CF08 24840008 */ addiu $a0, $a0, 0x8 /* B360C 8011CF0C AE240000 */ sw $a0, 0x0($s1) /* B3610 8011CF10 3C048015 */ lui $a0, %hi(depthFloatLookupTable) /* B3614 8011CF14 2484B7A8 */ addiu $a0, $a0, %lo(depthFloatLookupTable) /* B3618 8011CF18 C7A20030 */ lwc1 $f2, 0x30($sp) /* B361C 8011CF1C 00021B42 */ srl $v1, $v0, 13 /* B3620 8011CF20 30421FFF */ andi $v0, $v0, 0x1FFF /* B3624 8011CF24 00021082 */ srl $v0, $v0, 2 /* B3628 8011CF28 000318C0 */ sll $v1, $v1, 3 /* B362C 8011CF2C 00641821 */ addu $v1, $v1, $a0 /* B3630 8011CF30 46001082 */ mul.s $f2, $f2, $f0 /* B3634 8011CF34 00000000 */ nop /* B3638 8011CF38 8C640000 */ lw $a0, 0x0($v1) /* B363C 8011CF3C 8C630004 */ lw $v1, 0x4($v1) /* B3640 8011CF40 00821004 */ sllv $v0, $v0, $a0 /* B3644 8011CF44 00431021 */ addu $v0, $v0, $v1 /* B3648 8011CF48 000210C2 */ srl $v0, $v0, 3 /* B364C 8011CF4C 4600158D */ trunc.w.s $f22, $f2 /* B3650 8011CF50 4403B000 */ mfc1 $v1, $f22 /* B3654 8011CF54 00000000 */ nop /* B3658 8011CF58 0043102B */ sltu $v0, $v0, $v1 /* B365C 8011CF5C 14400009 */ bnez $v0, .L8011CF84 /* B3660 8011CF60 0000102D */ daddu $v0, $zero, $zero .L8011CF64: /* B3664 8011CF64 C7A20030 */ lwc1 $f2, 0x30($sp) /* B3668 8011CF68 44800000 */ mtc1 $zero, $f0 /* B366C 8011CF6C 00000000 */ nop /* B3670 8011CF70 4602003C */ c.lt.s $f0, $f2 /* B3674 8011CF74 00000000 */ nop /* B3678 8011CF78 45010002 */ bc1t .L8011CF84 /* B367C 8011CF7C 24020001 */ addiu $v0, $zero, 0x1 .L8011CF80: /* B3680 8011CF80 0000102D */ daddu $v0, $zero, $zero .L8011CF84: /* B3684 8011CF84 8FBF0064 */ lw $ra, 0x64($sp) /* B3688 8011CF88 8FBE0060 */ lw $fp, 0x60($sp) /* B368C 8011CF8C 8FB7005C */ lw $s7, 0x5C($sp) /* B3690 8011CF90 8FB60058 */ lw $s6, 0x58($sp) /* B3694 8011CF94 8FB50054 */ lw $s5, 0x54($sp) /* B3698 8011CF98 8FB40050 */ lw $s4, 0x50($sp) /* B369C 8011CF9C 8FB3004C */ lw $s3, 0x4C($sp) /* B36A0 8011CFA0 8FB20048 */ lw $s2, 0x48($sp) /* B36A4 8011CFA4 8FB10044 */ lw $s1, 0x44($sp) /* B36A8 8011CFA8 8FB00040 */ lw $s0, 0x40($sp) /* B36AC 8011CFAC D7B60070 */ ldc1 $f22, 0x70($sp) /* B36B0 8011CFB0 D7B40068 */ ldc1 $f20, 0x68($sp) /* B36B4 8011CFB4 03E00008 */ jr $ra /* B36B8 8011CFB8 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: s32 is_model_center_visible(u16 modelID, s32 depthQueryID, f32* screenX, f32* screenY) { Camera* camera = &gCameras[gCurrentCameraID]; Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(modelID)); f32 outX; f32 outY; f32 outZ; f32 outW; s32 depthExponent; s32 depthMantissa; u32 shiftedMantissa, mantissaBias; u32 decodedDepth; s32 scaledDepth; // If an invalid depth query id was provided, return false. if (depthQueryID >= ARRAY_COUNT(depthCopyBuffer)) { return FALSE; } // Transform the model's center into clip space. transform_point(camera->perspectiveMatrix, model->center.x, model->center.y, model->center.z, 1.0f, &outX, &outY, &outZ, &outW); if (outW == 0.0f) { *screenX = 0.0f; *screenY = 0.0f; return TRUE; } // Perform the perspective divide (divide xyz by w) to convert to normalized device coords. // Normalized device coords have a range of (-1, 1) on each axis. outW = 1.0f / outW; outX *= outW; outY *= -outW; outZ *= outW; // Perform the viewport transform for x and y (convert normalized device coords to viewport coords). // Viewport coords have a range of (0, Width) for x and (0, Height) for y. outX = (outX * camera->viewportW + camera->viewportW) * 0.5; outX += camera->viewportStartX; outY = (outY * camera->viewportH + camera->viewportH) * 0.5; outY += camera->viewportStartY; // Convert depth from (-1, 1) to (0, 1). outZ = (outZ + 1.0f) * 0.5; // Write out the calculated x and y values. *screenX = (s32)outX; *screenY = (s32)outY; // If a depth query wasn't requested, simply check if the point is within the view frustum. if (depthQueryID < 0) { if (outZ > 0.0f) { return FALSE; } else { return TRUE; } } if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) { gDPPipeSync(gMainGfxPos++); // Load a 4x1 pixel tile of the depth buffer gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1, (s32) outX, 0, (s32) outX + 3, 0, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gDPPipeSync(gMainGfxPos++); // Set the current color image to the buffer where copied depth values are stored. gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer); gDPPipeSync(gMainGfxPos++); // Set up 1 cycle mode and all other relevant othermode params. // One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels. gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE); gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); // Adjust the scissor to only draw to the specified pixel. gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, depthQueryID, 0, depthQueryID + 1, 1); // Draw a texrect to copy one pixel of the loaded depth tile to the output buffer. gSPTextureRectangle(gMainGfxPos++, depthQueryID << 2, 0 << 2, 4 << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10); // Sync and swap the color image back to the current framebuffer. gDPPipeSync(gMainGfxPos++); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMainGfxPos++); // Reconfigure the frame's normal scissor. gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH); // The following code will use last frame's depth value, since the copy that was just written won't be executed until the current frame is drawn. // Extract the exponent and mantissa from the depth buffer value. depthExponent = depthCopyBuffer[depthQueryID] >> DEPTH_EXPONENT_SHIFT; depthMantissa = (depthCopyBuffer[depthQueryID] & (DEPTH_MANTISSA_MASK | DEPTH_DZ_MASK)) >> DEPTH_MANTISSA_SHIFT; // Convert the exponent and mantissa into a fixed-point value. shiftedMantissa = depthMantissa << depthFloatLookupTable[depthExponent].shift; mantissaBias = depthFloatLookupTable[depthExponent].bias; // Remove the 3 fractional bits of precision. decodedDepth = (shiftedMantissa + mantissaBias) >> 3; // Convert the calculated screen depth into viewport depth. scaledDepth = outZ * MAX_VIEWPORT_DEPTH; if (decodedDepth < scaledDepth) { return FALSE; } } return outZ > 0.0f; }
### RAW ASSEMBLY INSTRUCTIONS: glabel quizmo_stage_appendGfx /* 398410 E009C220 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 398414 E009C224 0080182D */ daddu $v1, $a0, $zero /* 398418 E009C228 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 39841C E009C22C 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 398420 E009C230 27A40018 */ addiu $a0, $sp, 0x18 /* 398424 E009C234 AFBE00C8 */ sw $fp, 0xC8($sp) /* 398428 E009C238 3C1E800A */ lui $fp, %hi(gMainGfxPos) /* 39842C E009C23C 27DEA66C */ addiu $fp, $fp, %lo(gMainGfxPos) /* 398430 E009C240 AFB500BC */ sw $s5, 0xBC($sp) /* 398434 E009C244 3C150001 */ lui $s5, (0x11630 >> 16) /* 398438 E009C248 AFBF00CC */ sw $ra, 0xCC($sp) /* 39843C E009C24C AFB700C4 */ sw $s7, 0xC4($sp) /* 398440 E009C250 AFB600C0 */ sw $s6, 0xC0($sp) /* 398444 E009C254 AFB400B8 */ sw $s4, 0xB8($sp) /* 398448 E009C258 AFB300B4 */ sw $s3, 0xB4($sp) /* 39844C E009C25C AFB200B0 */ sw $s2, 0xB0($sp) /* 398450 E009C260 AFB100AC */ sw $s1, 0xAC($sp) /* 398454 E009C264 AFB000A8 */ sw $s0, 0xA8($sp) /* 398458 E009C268 F7B600D8 */ sdc1 $f22, 0xD8($sp) /* 39845C E009C26C F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 398460 E009C270 8FC80000 */ lw $t0, 0x0($fp) /* 398464 E009C274 8C77000C */ lw $s7, 0xC($v1) /* 398468 E009C278 0100102D */ daddu $v0, $t0, $zero /* 39846C E009C27C 25080008 */ addiu $t0, $t0, 0x8 /* 398470 E009C280 8EF00018 */ lw $s0, 0x18($s7) /* 398474 E009C284 3C09E700 */ lui $t1, (0xE7000000 >> 16) /* 398478 E009C288 AC490000 */ sw $t1, 0x0($v0) /* 39847C E009C28C AC400004 */ sw $zero, 0x4($v0) /* 398480 E009C290 AD050000 */ sw $a1, 0x0($t0) /* 398484 E009C294 8C620010 */ lw $v0, 0x10($v1) /* 398488 E009C298 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 39848C E009C29C AFC80000 */ sw $t0, 0x0($fp) /* 398490 E009C2A0 8C42001C */ lw $v0, 0x1C($v0) /* 398494 E009C2A4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 398498 E009C2A8 00431021 */ addu $v0, $v0, $v1 /* 39849C E009C2AC AD020004 */ sw $v0, 0x4($t0) /* 3984A0 E009C2B0 8EE5000C */ lw $a1, 0xC($s7) /* 3984A4 E009C2B4 8EE60010 */ lw $a2, 0x10($s7) /* 3984A8 E009C2B8 8EE70014 */ lw $a3, 0x14($s7) /* 3984AC E009C2BC 25080008 */ addiu $t0, $t0, 0x8 /* 3984B0 E009C2C0 0C080108 */ jal shim_guTranslateF /* 3984B4 E009C2C4 AFC80000 */ sw $t0, 0x0($fp) /* 3984B8 E009C2C8 27B10058 */ addiu $s1, $sp, 0x58 /* 3984BC E009C2CC 4480A000 */ mtc1 $zero, $f20 /* 3984C0 E009C2D0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3984C4 E009C2D4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3984C8 E009C2D8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3984CC E009C2DC 4481B000 */ mtc1 $at, $f22 /* 3984D0 E009C2E0 00031080 */ sll $v0, $v1, 2 /* 3984D4 E009C2E4 00431021 */ addu $v0, $v0, $v1 /* 3984D8 E009C2E8 00021080 */ sll $v0, $v0, 2 /* 3984DC E009C2EC 00431023 */ subu $v0, $v0, $v1 /* 3984E0 E009C2F0 000218C0 */ sll $v1, $v0, 3 /* 3984E4 E009C2F4 00431021 */ addu $v0, $v0, $v1 /* 3984E8 E009C2F8 000210C0 */ sll $v0, $v0, 3 /* 3984EC E009C2FC 4406A000 */ mfc1 $a2, $f20 /* 3984F0 E009C300 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3984F4 E009C304 00220821 */ addu $at, $at, $v0 /* 3984F8 E009C308 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 3984FC E009C30C 4407B000 */ mfc1 $a3, $f22 /* 398500 E009C310 46000007 */ neg.s $f0, $f0 /* 398504 E009C314 44050000 */ mfc1 $a1, $f0 /* 398508 E009C318 0220202D */ daddu $a0, $s1, $zero /* 39850C E009C31C 0C080104 */ jal shim_guRotateF /* 398510 E009C320 E7B40010 */ swc1 $f20, 0x10($sp) /* 398514 E009C324 0220202D */ daddu $a0, $s1, $zero /* 398518 E009C328 27A50018 */ addiu $a1, $sp, 0x18 /* 39851C E009C32C 0C080114 */ jal shim_guMtxCatF /* 398520 E009C330 00A0302D */ daddu $a2, $a1, $zero /* 398524 E009C334 27A40018 */ addiu $a0, $sp, 0x18 /* 398528 E009C338 3C168007 */ lui $s6, %hi(gMatrixListPos) /* 39852C E009C33C 26D641F0 */ addiu $s6, $s6, %lo(gMatrixListPos) /* 398530 E009C340 3C13800A */ lui $s3, %hi(gDisplayContext) /* 398534 E009C344 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 398538 E009C348 96C50000 */ lhu $a1, 0x0($s6) /* 39853C E009C34C 8E620000 */ lw $v0, 0x0($s3) /* 398540 E009C350 00052980 */ sll $a1, $a1, 6 /* 398544 E009C354 00B52821 */ addu $a1, $a1, $s5 /* 398548 E009C358 0C080118 */ jal shim_guMtxF2L /* 39854C E009C35C 00452821 */ addu $a1, $v0, $a1 /* 398550 E009C360 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 398554 E009C364 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 398558 E009C368 3C05FC12 */ lui $a1, (0xFC121803 >> 16) /* 39855C E009C36C 34A51803 */ ori $a1, $a1, (0xFC121803 & 0xFFFF) /* 398560 E009C370 321000FF */ andi $s0, $s0, 0xFF /* 398564 E009C374 3C14DE00 */ lui $s4, (0xDE000000 >> 16) /* 398568 E009C378 8FC80000 */ lw $t0, 0x0($fp) /* 39856C E009C37C 96C20000 */ lhu $v0, 0x0($s6) /* 398570 E009C380 0100202D */ daddu $a0, $t0, $zero /* 398574 E009C384 25080008 */ addiu $t0, $t0, 0x8 /* 398578 E009C388 AFC80000 */ sw $t0, 0x0($fp) /* 39857C E009C38C AC830000 */ sw $v1, 0x0($a0) /* 398580 E009C390 24430001 */ addiu $v1, $v0, 0x1 /* 398584 E009C394 3042FFFF */ andi $v0, $v0, 0xFFFF /* 398588 E009C398 00021180 */ sll $v0, $v0, 6 /* 39858C E009C39C A6C30000 */ sh $v1, 0x0($s6) /* 398590 E009C3A0 8E630000 */ lw $v1, 0x0($s3) /* 398594 E009C3A4 00551021 */ addu $v0, $v0, $s5 /* 398598 E009C3A8 00621821 */ addu $v1, $v1, $v0 /* 39859C E009C3AC 25020008 */ addiu $v0, $t0, 0x8 /* 3985A0 E009C3B0 AC830004 */ sw $v1, 0x4($a0) /* 3985A4 E009C3B4 AFC20000 */ sw $v0, 0x0($fp) /* 3985A8 E009C3B8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3985AC E009C3BC AD020000 */ sw $v0, 0x0($t0) /* 3985B0 E009C3C0 00101600 */ sll $v0, $s0, 24 /* 3985B4 E009C3C4 00101C00 */ sll $v1, $s0, 16 /* 3985B8 E009C3C8 00431025 */ or $v0, $v0, $v1 /* 3985BC E009C3CC 00108200 */ sll $s0, $s0, 8 /* 3985C0 E009C3D0 00501025 */ or $v0, $v0, $s0 /* 3985C4 E009C3D4 344200FF */ ori $v0, $v0, 0xFF /* 3985C8 E009C3D8 AD020004 */ sw $v0, 0x4($t0) /* 3985CC E009C3DC 25020010 */ addiu $v0, $t0, 0x10 /* 3985D0 E009C3E0 AFC20000 */ sw $v0, 0x0($fp) /* 3985D4 E009C3E4 2402FFF8 */ addiu $v0, $zero, -0x8 /* 3985D8 E009C3E8 AD02000C */ sw $v0, 0xC($t0) /* 3985DC E009C3EC 25020018 */ addiu $v0, $t0, 0x18 /* 3985E0 E009C3F0 AD050008 */ sw $a1, 0x8($t0) /* 3985E4 E009C3F4 AFC20000 */ sw $v0, 0x0($fp) /* 3985E8 E009C3F8 3C020900 */ lui $v0, %hi(D_09007230_3F3090) /* 3985EC E009C3FC 24427230 */ addiu $v0, $v0, %lo(D_09007230_3F3090) /* 3985F0 E009C400 AD140010 */ sw $s4, 0x10($t0) /* 3985F4 E009C404 AD020014 */ sw $v0, 0x14($t0) /* 3985F8 E009C408 8EE3003C */ lw $v1, 0x3C($s7) /* 3985FC E009C40C 240200FF */ addiu $v0, $zero, 0xFF /* 398600 E009C410 10620150 */ beq $v1, $v0, .LE009C954 /* 398604 E009C414 3C098080 */ lui $t1, (0x80808081 >> 16) /* 398608 E009C418 35298081 */ ori $t1, $t1, (0x80808081 & 0xFFFF) /* 39860C E009C41C AFA90098 */ sw $t1, 0x98($sp) /* 398610 E009C420 3C09DA38 */ lui $t1, (0xDA380001 >> 16) /* 398614 E009C424 35290001 */ ori $t1, $t1, (0xDA380001 & 0xFFFF) /* 398618 E009C428 AFA9009C */ sw $t1, 0x9C($sp) /* 39861C E009C42C 3C09D838 */ lui $t1, (0xD8380002 >> 16) /* 398620 E009C430 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF) /* 398624 E009C434 AFA900A0 */ sw $t1, 0xA0($sp) /* 398628 E009C438 3C09DA38 */ lui $t1, (0xDA380000 >> 16) /* 39862C E009C43C 3C110900 */ lui $s1, %hi(D_090041C8_411458) /* 398630 E009C440 263141C8 */ addiu $s1, $s1, %lo(D_090041C8_411458) /* 398634 E009C444 AD090018 */ sw $t1, 0x18($t0) /* 398638 E009C448 AD11001C */ sw $s1, 0x1C($t0) /* 39863C E009C44C 8EE3001C */ lw $v1, 0x1C($s7) /* 398640 E009C450 8FA90098 */ lw $t1, 0x98($sp) /* 398644 E009C454 00031040 */ sll $v0, $v1, 1 /* 398648 E009C458 00431021 */ addu $v0, $v0, $v1 /* 39864C E009C45C 00021900 */ sll $v1, $v0, 4 /* 398650 E009C460 00621823 */ subu $v1, $v1, $v0 /* 398654 E009C464 00031880 */ sll $v1, $v1, 2 /* 398658 E009C468 00690018 */ mult $v1, $t1 /* 39865C E009C46C 4406B000 */ mfc1 $a2, $f22 /* 398660 E009C470 4407A000 */ mfc1 $a3, $f20 /* 398664 E009C474 25020020 */ addiu $v0, $t0, 0x20 /* 398668 E009C478 AFC20000 */ sw $v0, 0x0($fp) /* 39866C E009C47C 00004810 */ mfhi $t1 /* 398670 E009C480 01231021 */ addu $v0, $t1, $v1 /* 398674 E009C484 000211C3 */ sra $v0, $v0, 7 /* 398678 E009C488 00031FC3 */ sra $v1, $v1, 31 /* 39867C E009C48C 00431023 */ subu $v0, $v0, $v1 /* 398680 E009C490 2442FF4C */ addiu $v0, $v0, -0xB4 /* 398684 E009C494 44821000 */ mtc1 $v0, $f2 /* 398688 E009C498 00000000 */ nop /* 39868C E009C49C 468010A0 */ cvt.s.w $f2, $f2 /* 398690 E009C4A0 44051000 */ mfc1 $a1, $f2 /* 398694 E009C4A4 27A40018 */ addiu $a0, $sp, 0x18 /* 398698 E009C4A8 0C080104 */ jal shim_guRotateF /* 39869C E009C4AC E7B40010 */ swc1 $f20, 0x10($sp) /* 3986A0 E009C4B0 27A40018 */ addiu $a0, $sp, 0x18 /* 3986A4 E009C4B4 96C50000 */ lhu $a1, 0x0($s6) /* 3986A8 E009C4B8 8E620000 */ lw $v0, 0x0($s3) /* 3986AC E009C4BC 00052980 */ sll $a1, $a1, 6 /* 3986B0 E009C4C0 00B52821 */ addu $a1, $a1, $s5 /* 3986B4 E009C4C4 0C080118 */ jal shim_guMtxF2L /* 3986B8 E009C4C8 00452821 */ addu $a1, $v0, $a1 /* 3986BC E009C4CC 24120040 */ addiu $s2, $zero, 0x40 /* 3986C0 E009C4D0 2410005A */ addiu $s0, $zero, 0x5A /* 3986C4 E009C4D4 8FC50000 */ lw $a1, 0x0($fp) /* 3986C8 E009C4D8 4406A000 */ mfc1 $a2, $f20 /* 3986CC E009C4DC 4407A000 */ mfc1 $a3, $f20 /* 3986D0 E009C4E0 96C20000 */ lhu $v0, 0x0($s6) /* 3986D4 E009C4E4 00A0402D */ daddu $t0, $a1, $zero /* 3986D8 E009C4E8 24A50008 */ addiu $a1, $a1, 0x8 /* 3986DC E009C4EC 24430001 */ addiu $v1, $v0, 0x1 /* 3986E0 E009C4F0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3986E4 E009C4F4 AFC50000 */ sw $a1, 0x0($fp) /* 3986E8 E009C4F8 8FA9009C */ lw $t1, 0x9C($sp) /* 3986EC E009C4FC 00021180 */ sll $v0, $v0, 6 /* 3986F0 E009C500 AD090000 */ sw $t1, 0x0($t0) /* 3986F4 E009C504 A6C30000 */ sh $v1, 0x0($s6) /* 3986F8 E009C508 8E630000 */ lw $v1, 0x0($s3) /* 3986FC E009C50C 00551021 */ addu $v0, $v0, $s5 /* 398700 E009C510 00621821 */ addu $v1, $v1, $v0 /* 398704 E009C514 24A20008 */ addiu $v0, $a1, 0x8 /* 398708 E009C518 AD030004 */ sw $v1, 0x4($t0) /* 39870C E009C51C AFC20000 */ sw $v0, 0x0($fp) /* 398710 E009C520 3C020900 */ lui $v0, %hi(D_09006E28_3F2C88) /* 398714 E009C524 24426E28 */ addiu $v0, $v0, %lo(D_09006E28_3F2C88) /* 398718 E009C528 ACA20004 */ sw $v0, 0x4($a1) /* 39871C E009C52C 24A20010 */ addiu $v0, $a1, 0x10 /* 398720 E009C530 3C090900 */ lui $t1, %hi(D_09001518_40E7A8) /* 398724 E009C534 25291518 */ addiu $t1, $t1, %lo(D_09001518_40E7A8) /* 398728 E009C538 24A30018 */ addiu $v1, $a1, 0x18 /* 39872C E009C53C ACB40000 */ sw $s4, 0x0($a1) /* 398730 E009C540 AFC20000 */ sw $v0, 0x0($fp) /* 398734 E009C544 ACB40008 */ sw $s4, 0x8($a1) /* 398738 E009C548 ACA9000C */ sw $t1, 0xC($a1) /* 39873C E009C54C 8EE2002C */ lw $v0, 0x2C($s7) /* 398740 E009C550 3C09F200 */ lui $t1, (0xF2000000 >> 16) /* 398744 E009C554 AFC30000 */ sw $v1, 0x0($fp) /* 398748 E009C558 30420FFF */ andi $v0, $v0, 0xFFF /* 39874C E009C55C 00021300 */ sll $v0, $v0, 12 /* 398750 E009C560 00491025 */ or $v0, $v0, $t1 /* 398754 E009C564 ACA20010 */ sw $v0, 0x10($a1) /* 398758 E009C568 8EE3002C */ lw $v1, 0x2C($s7) /* 39875C E009C56C 24A20020 */ addiu $v0, $a1, 0x20 /* 398760 E009C570 AFC20000 */ sw $v0, 0x0($fp) /* 398764 E009C574 3C020900 */ lui $v0, %hi(D_09006DA0_3F2C00) /* 398768 E009C578 24426DA0 */ addiu $v0, $v0, %lo(D_09006DA0_3F2C00) /* 39876C E009C57C ACB40018 */ sw $s4, 0x18($a1) /* 398770 E009C580 ACA2001C */ sw $v0, 0x1C($a1) /* 398774 E009C584 8FA900A0 */ lw $t1, 0xA0($sp) /* 398778 E009C588 2622FF80 */ addiu $v0, $s1, -0x80 /* 39877C E009C58C ACB20024 */ sw $s2, 0x24($a1) /* 398780 E009C590 ACA2002C */ sw $v0, 0x2C($a1) /* 398784 E009C594 ACA90020 */ sw $t1, 0x20($a1) /* 398788 E009C598 3C09DA38 */ lui $t1, (0xDA380000 >> 16) /* 39878C E009C59C 246300FC */ addiu $v1, $v1, 0xFC /* 398790 E009C5A0 30630FFF */ andi $v1, $v1, 0xFFF /* 398794 E009C5A4 00031B00 */ sll $v1, $v1, 12 /* 398798 E009C5A8 3463003C */ ori $v1, $v1, 0x3C /* 39879C E009C5AC ACA90028 */ sw $t1, 0x28($a1) /* 3987A0 E009C5B0 ACA30014 */ sw $v1, 0x14($a1) /* 3987A4 E009C5B4 8EE30020 */ lw $v1, 0x20($s7) /* 3987A8 E009C5B8 8FA90098 */ lw $t1, 0x98($sp) /* 3987AC E009C5BC 00031040 */ sll $v0, $v1, 1 /* 3987B0 E009C5C0 00431021 */ addu $v0, $v0, $v1 /* 3987B4 E009C5C4 00021900 */ sll $v1, $v0, 4 /* 3987B8 E009C5C8 00621823 */ subu $v1, $v1, $v0 /* 3987BC E009C5CC 00031840 */ sll $v1, $v1, 1 /* 3987C0 E009C5D0 00690018 */ mult $v1, $t1 /* 3987C4 E009C5D4 24A80028 */ addiu $t0, $a1, 0x28 /* 3987C8 E009C5D8 24A50030 */ addiu $a1, $a1, 0x30 /* 3987CC E009C5DC AFC80000 */ sw $t0, 0x0($fp) /* 3987D0 E009C5E0 AFC50000 */ sw $a1, 0x0($fp) /* 3987D4 E009C5E4 00004810 */ mfhi $t1 /* 3987D8 E009C5E8 01231021 */ addu $v0, $t1, $v1 /* 3987DC E009C5EC 000211C3 */ sra $v0, $v0, 7 /* 3987E0 E009C5F0 00031FC3 */ sra $v1, $v1, 31 /* 3987E4 E009C5F4 00431023 */ subu $v0, $v0, $v1 /* 3987E8 E009C5F8 02021023 */ subu $v0, $s0, $v0 /* 3987EC E009C5FC 44821000 */ mtc1 $v0, $f2 /* 3987F0 E009C600 00000000 */ nop /* 3987F4 E009C604 468010A0 */ cvt.s.w $f2, $f2 /* 3987F8 E009C608 44051000 */ mfc1 $a1, $f2 /* 3987FC E009C60C 27A40018 */ addiu $a0, $sp, 0x18 /* 398800 E009C610 0C080104 */ jal shim_guRotateF /* 398804 E009C614 E7B60010 */ swc1 $f22, 0x10($sp) /* 398808 E009C618 27A40018 */ addiu $a0, $sp, 0x18 /* 39880C E009C61C 96C50000 */ lhu $a1, 0x0($s6) /* 398810 E009C620 8E620000 */ lw $v0, 0x0($s3) /* 398814 E009C624 00052980 */ sll $a1, $a1, 6 /* 398818 E009C628 00B52821 */ addu $a1, $a1, $s5 /* 39881C E009C62C 0C080118 */ jal shim_guMtxF2L /* 398820 E009C630 00452821 */ addu $a1, $v0, $a1 /* 398824 E009C634 8FC50000 */ lw $a1, 0x0($fp) /* 398828 E009C638 4406A000 */ mfc1 $a2, $f20 /* 39882C E009C63C 4407A000 */ mfc1 $a3, $f20 /* 398830 E009C640 96C20000 */ lhu $v0, 0x0($s6) /* 398834 E009C644 00A0402D */ daddu $t0, $a1, $zero /* 398838 E009C648 24A50008 */ addiu $a1, $a1, 0x8 /* 39883C E009C64C 24430001 */ addiu $v1, $v0, 0x1 /* 398840 E009C650 3042FFFF */ andi $v0, $v0, 0xFFFF /* 398844 E009C654 AFC50000 */ sw $a1, 0x0($fp) /* 398848 E009C658 8FA9009C */ lw $t1, 0x9C($sp) /* 39884C E009C65C 00021180 */ sll $v0, $v0, 6 /* 398850 E009C660 AD090000 */ sw $t1, 0x0($t0) /* 398854 E009C664 A6C30000 */ sh $v1, 0x0($s6) /* 398858 E009C668 8E630000 */ lw $v1, 0x0($s3) /* 39885C E009C66C 00551021 */ addu $v0, $v0, $s5 /* 398860 E009C670 00621821 */ addu $v1, $v1, $v0 /* 398864 E009C674 24A20008 */ addiu $v0, $a1, 0x8 /* 398868 E009C678 AD030004 */ sw $v1, 0x4($t0) /* 39886C E009C67C AFC20000 */ sw $v0, 0x0($fp) /* 398870 E009C680 3C020900 */ lui $v0, %hi(D_09006FB0_3F2E10) /* 398874 E009C684 24426FB0 */ addiu $v0, $v0, %lo(D_09006FB0_3F2E10) /* 398878 E009C688 ACB40000 */ sw $s4, 0x0($a1) /* 39887C E009C68C ACA20004 */ sw $v0, 0x4($a1) /* 398880 E009C690 8FA900A0 */ lw $t1, 0xA0($sp) /* 398884 E009C694 2622FFC0 */ addiu $v0, $s1, -0x40 /* 398888 E009C698 ACB2000C */ sw $s2, 0xC($a1) /* 39888C E009C69C ACA20014 */ sw $v0, 0x14($a1) /* 398890 E009C6A0 ACA90008 */ sw $t1, 0x8($a1) /* 398894 E009C6A4 3C09DA38 */ lui $t1, (0xDA380000 >> 16) /* 398898 E009C6A8 ACA90010 */ sw $t1, 0x10($a1) /* 39889C E009C6AC 8EE30024 */ lw $v1, 0x24($s7) /* 3988A0 E009C6B0 8FA90098 */ lw $t1, 0x98($sp) /* 3988A4 E009C6B4 00031040 */ sll $v0, $v1, 1 /* 3988A8 E009C6B8 00431021 */ addu $v0, $v0, $v1 /* 3988AC E009C6BC 00021900 */ sll $v1, $v0, 4 /* 3988B0 E009C6C0 00621823 */ subu $v1, $v1, $v0 /* 3988B4 E009C6C4 00031840 */ sll $v1, $v1, 1 /* 3988B8 E009C6C8 00690018 */ mult $v1, $t1 /* 3988BC E009C6CC 24A80010 */ addiu $t0, $a1, 0x10 /* 3988C0 E009C6D0 24A50018 */ addiu $a1, $a1, 0x18 /* 3988C4 E009C6D4 AFC80000 */ sw $t0, 0x0($fp) /* 3988C8 E009C6D8 AFC50000 */ sw $a1, 0x0($fp) /* 3988CC E009C6DC 00004810 */ mfhi $t1 /* 3988D0 E009C6E0 01231021 */ addu $v0, $t1, $v1 /* 3988D4 E009C6E4 000211C3 */ sra $v0, $v0, 7 /* 3988D8 E009C6E8 00031FC3 */ sra $v1, $v1, 31 /* 3988DC E009C6EC 00431023 */ subu $v0, $v0, $v1 /* 3988E0 E009C6F0 2442FFA6 */ addiu $v0, $v0, -0x5A /* 3988E4 E009C6F4 44821000 */ mtc1 $v0, $f2 /* 3988E8 E009C6F8 00000000 */ nop /* 3988EC E009C6FC 468010A0 */ cvt.s.w $f2, $f2 /* 3988F0 E009C700 44051000 */ mfc1 $a1, $f2 /* 3988F4 E009C704 27A40018 */ addiu $a0, $sp, 0x18 /* 3988F8 E009C708 0C080104 */ jal shim_guRotateF /* 3988FC E009C70C E7B60010 */ swc1 $f22, 0x10($sp) /* 398900 E009C710 27A40018 */ addiu $a0, $sp, 0x18 /* 398904 E009C714 96C50000 */ lhu $a1, 0x0($s6) /* 398908 E009C718 8E620000 */ lw $v0, 0x0($s3) /* 39890C E009C71C 00052980 */ sll $a1, $a1, 6 /* 398910 E009C720 00B52821 */ addu $a1, $a1, $s5 /* 398914 E009C724 0C080118 */ jal shim_guMtxF2L /* 398918 E009C728 00452821 */ addu $a1, $v0, $a1 /* 39891C E009C72C 02328821 */ addu $s1, $s1, $s2 /* 398920 E009C730 8FC50000 */ lw $a1, 0x0($fp) /* 398924 E009C734 4406B000 */ mfc1 $a2, $f22 /* 398928 E009C738 4407A000 */ mfc1 $a3, $f20 /* 39892C E009C73C 96C20000 */ lhu $v0, 0x0($s6) /* 398930 E009C740 00A0402D */ daddu $t0, $a1, $zero /* 398934 E009C744 24A50008 */ addiu $a1, $a1, 0x8 /* 398938 E009C748 24430001 */ addiu $v1, $v0, 0x1 /* 39893C E009C74C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 398940 E009C750 AFC50000 */ sw $a1, 0x0($fp) /* 398944 E009C754 8FA9009C */ lw $t1, 0x9C($sp) /* 398948 E009C758 00021180 */ sll $v0, $v0, 6 /* 39894C E009C75C AD090000 */ sw $t1, 0x0($t0) /* 398950 E009C760 A6C30000 */ sh $v1, 0x0($s6) /* 398954 E009C764 8E630000 */ lw $v1, 0x0($s3) /* 398958 E009C768 00551021 */ addu $v0, $v0, $s5 /* 39895C E009C76C 00621821 */ addu $v1, $v1, $v0 /* 398960 E009C770 24A20008 */ addiu $v0, $a1, 0x8 /* 398964 E009C774 AD030004 */ sw $v1, 0x4($t0) /* 398968 E009C778 AFC20000 */ sw $v0, 0x0($fp) /* 39896C E009C77C 3C020900 */ lui $v0, %hi(D_09006F20_3F2D80) /* 398970 E009C780 24426F20 */ addiu $v0, $v0, %lo(D_09006F20_3F2D80) /* 398974 E009C784 ACA20004 */ sw $v0, 0x4($a1) /* 398978 E009C788 24A20010 */ addiu $v0, $a1, 0x10 /* 39897C E009C78C ACB40000 */ sw $s4, 0x0($a1) /* 398980 E009C790 AFC20000 */ sw $v0, 0x0($fp) /* 398984 E009C794 24A20018 */ addiu $v0, $a1, 0x18 /* 398988 E009C798 8FA900A0 */ lw $t1, 0xA0($sp) /* 39898C E009C79C 24A30028 */ addiu $v1, $a1, 0x28 /* 398990 E009C7A0 ACB2000C */ sw $s2, 0xC($a1) /* 398994 E009C7A4 ACA90008 */ sw $t1, 0x8($a1) /* 398998 E009C7A8 AFC20000 */ sw $v0, 0x0($fp) /* 39899C E009C7AC 3C020900 */ lui $v0, %hi(D_090070E8_3F2F48) /* 3989A0 E009C7B0 244270E8 */ addiu $v0, $v0, %lo(D_090070E8_3F2F48) /* 3989A4 E009C7B4 ACA20014 */ sw $v0, 0x14($a1) /* 3989A8 E009C7B8 24A20020 */ addiu $v0, $a1, 0x20 /* 3989AC E009C7BC ACB40010 */ sw $s4, 0x10($a1) /* 3989B0 E009C7C0 AFC20000 */ sw $v0, 0x0($fp) /* 3989B4 E009C7C4 3C020900 */ lui $v0, %hi(D_09007030_3F2E90) /* 3989B8 E009C7C8 24427030 */ addiu $v0, $v0, %lo(D_09007030_3F2E90) /* 3989BC E009C7CC 3C090900 */ lui $t1, %hi(D_09001518_40E7A8) /* 3989C0 E009C7D0 25291518 */ addiu $t1, $t1, %lo(D_09001518_40E7A8) /* 3989C4 E009C7D4 ACB40018 */ sw $s4, 0x18($a1) /* 3989C8 E009C7D8 ACA2001C */ sw $v0, 0x1C($a1) /* 3989CC E009C7DC ACB40020 */ sw $s4, 0x20($a1) /* 3989D0 E009C7E0 ACA90024 */ sw $t1, 0x24($a1) /* 3989D4 E009C7E4 8EE2002C */ lw $v0, 0x2C($s7) /* 3989D8 E009C7E8 3C09F200 */ lui $t1, (0xF2000000 >> 16) /* 3989DC E009C7EC AFC30000 */ sw $v1, 0x0($fp) /* 3989E0 E009C7F0 30420FFF */ andi $v0, $v0, 0xFFF /* 3989E4 E009C7F4 00021300 */ sll $v0, $v0, 12 /* 3989E8 E009C7F8 00491025 */ or $v0, $v0, $t1 /* 3989EC E009C7FC ACA20028 */ sw $v0, 0x28($a1) /* 3989F0 E009C800 8EE2002C */ lw $v0, 0x2C($s7) /* 3989F4 E009C804 24A30030 */ addiu $v1, $a1, 0x30 /* 3989F8 E009C808 AFC30000 */ sw $v1, 0x0($fp) /* 3989FC E009C80C 3C030900 */ lui $v1, %hi(D_09006FD8_3F2E38) /* 398A00 E009C810 24636FD8 */ addiu $v1, $v1, %lo(D_09006FD8_3F2E38) /* 398A04 E009C814 3C09DA38 */ lui $t1, (0xDA380000 >> 16) /* 398A08 E009C818 ACB40030 */ sw $s4, 0x30($a1) /* 398A0C E009C81C ACA30034 */ sw $v1, 0x34($a1) /* 398A10 E009C820 ACA90038 */ sw $t1, 0x38($a1) /* 398A14 E009C824 ACB1003C */ sw $s1, 0x3C($a1) /* 398A18 E009C828 244200FC */ addiu $v0, $v0, 0xFC /* 398A1C E009C82C 30420FFF */ andi $v0, $v0, 0xFFF /* 398A20 E009C830 00021300 */ sll $v0, $v0, 12 /* 398A24 E009C834 3442003C */ ori $v0, $v0, 0x3C /* 398A28 E009C838 ACA2002C */ sw $v0, 0x2C($a1) /* 398A2C E009C83C 8EE30028 */ lw $v1, 0x28($s7) /* 398A30 E009C840 8FA90098 */ lw $t1, 0x98($sp) /* 398A34 E009C844 00031040 */ sll $v0, $v1, 1 /* 398A38 E009C848 00431021 */ addu $v0, $v0, $v1 /* 398A3C E009C84C 00021900 */ sll $v1, $v0, 4 /* 398A40 E009C850 00621823 */ subu $v1, $v1, $v0 /* 398A44 E009C854 00031840 */ sll $v1, $v1, 1 /* 398A48 E009C858 00690018 */ mult $v1, $t1 /* 398A4C E009C85C 24A80038 */ addiu $t0, $a1, 0x38 /* 398A50 E009C860 00B22821 */ addu $a1, $a1, $s2 /* 398A54 E009C864 AFC80000 */ sw $t0, 0x0($fp) /* 398A58 E009C868 AFC50000 */ sw $a1, 0x0($fp) /* 398A5C E009C86C 00004810 */ mfhi $t1 /* 398A60 E009C870 01231021 */ addu $v0, $t1, $v1 /* 398A64 E009C874 000211C3 */ sra $v0, $v0, 7 /* 398A68 E009C878 00031FC3 */ sra $v1, $v1, 31 /* 398A6C E009C87C 00431023 */ subu $v0, $v0, $v1 /* 398A70 E009C880 02028023 */ subu $s0, $s0, $v0 /* 398A74 E009C884 44901000 */ mtc1 $s0, $f2 /* 398A78 E009C888 00000000 */ nop /* 398A7C E009C88C 468010A0 */ cvt.s.w $f2, $f2 /* 398A80 E009C890 44051000 */ mfc1 $a1, $f2 /* 398A84 E009C894 27A40018 */ addiu $a0, $sp, 0x18 /* 398A88 E009C898 0C080104 */ jal shim_guRotateF /* 398A8C E009C89C AFA70010 */ sw $a3, 0x10($sp) /* 398A90 E009C8A0 27A40018 */ addiu $a0, $sp, 0x18 /* 398A94 E009C8A4 96C50000 */ lhu $a1, 0x0($s6) /* 398A98 E009C8A8 8E620000 */ lw $v0, 0x0($s3) /* 398A9C E009C8AC 00052980 */ sll $a1, $a1, 6 /* 398AA0 E009C8B0 00B52821 */ addu $a1, $a1, $s5 /* 398AA4 E009C8B4 0C080118 */ jal shim_guMtxF2L /* 398AA8 E009C8B8 00452821 */ addu $a1, $v0, $a1 /* 398AAC E009C8BC 8FC40000 */ lw $a0, 0x0($fp) /* 398AB0 E009C8C0 96C20000 */ lhu $v0, 0x0($s6) /* 398AB4 E009C8C4 0080282D */ daddu $a1, $a0, $zero /* 398AB8 E009C8C8 24840008 */ addiu $a0, $a0, 0x8 /* 398ABC E009C8CC 24430001 */ addiu $v1, $v0, 0x1 /* 398AC0 E009C8D0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 398AC4 E009C8D4 AFC40000 */ sw $a0, 0x0($fp) /* 398AC8 E009C8D8 8FA9009C */ lw $t1, 0x9C($sp) /* 398ACC E009C8DC 00021180 */ sll $v0, $v0, 6 /* 398AD0 E009C8E0 ACA90000 */ sw $t1, 0x0($a1) /* 398AD4 E009C8E4 A6C30000 */ sh $v1, 0x0($s6) /* 398AD8 E009C8E8 8E630000 */ lw $v1, 0x0($s3) /* 398ADC E009C8EC 00551021 */ addu $v0, $v0, $s5 /* 398AE0 E009C8F0 00621821 */ addu $v1, $v1, $v0 /* 398AE4 E009C8F4 24820008 */ addiu $v0, $a0, 0x8 /* 398AE8 E009C8F8 ACA30004 */ sw $v1, 0x4($a1) /* 398AEC E009C8FC AFC20000 */ sw $v0, 0x0($fp) /* 398AF0 E009C900 3C020900 */ lui $v0, %hi(D_09006D48_3F2BA8) /* 398AF4 E009C904 24426D48 */ addiu $v0, $v0, %lo(D_09006D48_3F2BA8) /* 398AF8 E009C908 AC820004 */ sw $v0, 0x4($a0) /* 398AFC E009C90C 24820010 */ addiu $v0, $a0, 0x10 /* 398B00 E009C910 AC940000 */ sw $s4, 0x0($a0) /* 398B04 E009C914 AFC20000 */ sw $v0, 0x0($fp) /* 398B08 E009C918 8FA900A0 */ lw $t1, 0xA0($sp) /* 398B0C E009C91C 24820018 */ addiu $v0, $a0, 0x18 /* 398B10 E009C920 AC890008 */ sw $t1, 0x8($a0) /* 398B14 E009C924 AC92000C */ sw $s2, 0xC($a0) /* 398B18 E009C928 AFC20000 */ sw $v0, 0x0($fp) /* 398B1C E009C92C 3C020900 */ lui $v0, %hi(D_09000218_415278) /* 398B20 E009C930 24420218 */ addiu $v0, $v0, %lo(D_09000218_415278) /* 398B24 E009C934 AC820014 */ sw $v0, 0x14($a0) /* 398B28 E009C938 24820020 */ addiu $v0, $a0, 0x20 /* 398B2C E009C93C AC940010 */ sw $s4, 0x10($a0) /* 398B30 E009C940 AFC20000 */ sw $v0, 0x0($fp) /* 398B34 E009C944 3C020900 */ lui $v0, %hi(D_09007090_3F2EF0) /* 398B38 E009C948 24427090 */ addiu $v0, $v0, %lo(D_09007090_3F2EF0) /* 398B3C E009C94C AC940018 */ sw $s4, 0x18($a0) /* 398B40 E009C950 AC82001C */ sw $v0, 0x1C($a0) .LE009C954: /* 398B44 E009C954 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 398B48 E009C958 8FC20000 */ lw $v0, 0x0($fp) /* 398B4C E009C95C 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 398B50 E009C960 0040202D */ daddu $a0, $v0, $zero /* 398B54 E009C964 24420008 */ addiu $v0, $v0, 0x8 /* 398B58 E009C968 AFC20000 */ sw $v0, 0x0($fp) /* 398B5C E009C96C AC830000 */ sw $v1, 0x0($a0) /* 398B60 E009C970 24030040 */ addiu $v1, $zero, 0x40 /* 398B64 E009C974 AC830004 */ sw $v1, 0x4($a0) /* 398B68 E009C978 24430008 */ addiu $v1, $v0, 0x8 /* 398B6C E009C97C 3C09E700 */ lui $t1, (0xE7000000 >> 16) /* 398B70 E009C980 AFC30000 */ sw $v1, 0x0($fp) /* 398B74 E009C984 AC490000 */ sw $t1, 0x0($v0) /* 398B78 E009C988 AC400004 */ sw $zero, 0x4($v0) /* 398B7C E009C98C 8FBF00CC */ lw $ra, 0xCC($sp) /* 398B80 E009C990 8FBE00C8 */ lw $fp, 0xC8($sp) /* 398B84 E009C994 8FB700C4 */ lw $s7, 0xC4($sp) /* 398B88 E009C998 8FB600C0 */ lw $s6, 0xC0($sp) /* 398B8C E009C99C 8FB500BC */ lw $s5, 0xBC($sp) /* 398B90 E009C9A0 8FB400B8 */ lw $s4, 0xB8($sp) /* 398B94 E009C9A4 8FB300B4 */ lw $s3, 0xB4($sp) /* 398B98 E009C9A8 8FB200B0 */ lw $s2, 0xB0($sp) /* 398B9C E009C9AC 8FB100AC */ lw $s1, 0xAC($sp) /* 398BA0 E009C9B0 8FB000A8 */ lw $s0, 0xA8($sp) /* 398BA4 E009C9B4 D7B600D8 */ ldc1 $f22, 0xD8($sp) /* 398BA8 E009C9B8 D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 398BAC E009C9BC 03E00008 */ jr $ra /* 398BB0 E009C9C0 27BD00E0 */ addiu $sp, $sp, 0xE0 /* 398BB4 E009C9C4 00000000 */ nop /* 398BB8 E009C9C8 00000000 */ nop /* 398BBC E009C9CC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void quizmo_stage_appendGfx(void* effect) { QuizmoStageFXData* data = ((EffectInstance*)effect)->data.quizmoStage; s32 microphoneRaiseAmt = data->microphoneRaiseAmt; Matrix4f sp18; Matrix4f sp58; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, data->origin.x, data->origin.y, data->origin.z); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, microphoneRaiseAmt, microphoneRaiseAmt, microphoneRaiseAmt, 255); gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, PM_CC_16); gSPDisplayList(gMainGfxPos++, D_09007230_39FDF0); if (data->unk_3C != 255) { gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[2], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); shim_guRotateF(sp18, (data->rearWallRaiseAmt * 180) / 255 - 180, 1.0f, 0.0f, 0.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09006E28_39F9E8); gSPDisplayList(gMainGfxPos++, D_09001518_39A0D8); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, data->lightScrollAmt, 0, data->lightScrollAmt + 252, 60); gSPDisplayList(gMainGfxPos++, D_09006DA0_39F960); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[0], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); shim_guRotateF(sp18, 90 - (data->leftWallRaiseAmt * 90) / 255, 0.0f, 0.0f, 1.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09006FB0_39FB70); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[1], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); shim_guRotateF(sp18, (data->rightWallRaiseAmt * 90) / 255 - 90, 0.0f, 0.0f, 1.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09006F20_39FAE0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090070E8_39FCA8); gSPDisplayList(gMainGfxPos++, D_09007030_39FBF0); gSPDisplayList(gMainGfxPos++, D_09001518_39A0D8); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, data->lightScrollAmt, 0, data->lightScrollAmt + 252, 60); gSPDisplayList(gMainGfxPos++, D_09006FD8_39FB98); gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[3], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); shim_guRotateF(sp18, 90 - (data->podiumRaiseAmt * 90) / 255, 1.0f, 0.0f, 0.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09006D48_39F908); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000218_398DD8); gSPDisplayList(gMainGfxPos++, D_09007090_39FC50); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel firework_rocket_appendGfx /* 3E4888 E010A4E8 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 3E488C E010A4EC AFB70094 */ sw $s7, 0x94($sp) /* 3E4890 E010A4F0 0080B82D */ daddu $s7, $a0, $zero /* 3E4894 E010A4F4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3E4898 E010A4F8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3E489C E010A4FC 3C04800B */ lui $a0, %hi(gCameras) /* 3E48A0 E010A500 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 3E48A4 E010A504 AFBF009C */ sw $ra, 0x9C($sp) /* 3E48A8 E010A508 AFBE0098 */ sw $fp, 0x98($sp) /* 3E48AC E010A50C AFB60090 */ sw $s6, 0x90($sp) /* 3E48B0 E010A510 AFB5008C */ sw $s5, 0x8C($sp) /* 3E48B4 E010A514 AFB40088 */ sw $s4, 0x88($sp) /* 3E48B8 E010A518 AFB30084 */ sw $s3, 0x84($sp) /* 3E48BC E010A51C AFB20080 */ sw $s2, 0x80($sp) /* 3E48C0 E010A520 AFB1007C */ sw $s1, 0x7C($sp) /* 3E48C4 E010A524 AFB00078 */ sw $s0, 0x78($sp) /* 3E48C8 E010A528 F7BE00C8 */ sdc1 $f30, 0xC8($sp) /* 3E48CC E010A52C F7BC00C0 */ sdc1 $f28, 0xC0($sp) /* 3E48D0 E010A530 F7BA00B8 */ sdc1 $f26, 0xB8($sp) /* 3E48D4 E010A534 F7B800B0 */ sdc1 $f24, 0xB0($sp) /* 3E48D8 E010A538 F7B600A8 */ sdc1 $f22, 0xA8($sp) /* 3E48DC E010A53C F7B400A0 */ sdc1 $f20, 0xA0($sp) /* 3E48E0 E010A540 8EF1000C */ lw $s1, 0xC($s7) /* 3E48E4 E010A544 00031080 */ sll $v0, $v1, 2 /* 3E48E8 E010A548 00431021 */ addu $v0, $v0, $v1 /* 3E48EC E010A54C 00021080 */ sll $v0, $v0, 2 /* 3E48F0 E010A550 00431023 */ subu $v0, $v0, $v1 /* 3E48F4 E010A554 000218C0 */ sll $v1, $v0, 3 /* 3E48F8 E010A558 00431021 */ addu $v0, $v0, $v1 /* 3E48FC E010A55C 000210C0 */ sll $v0, $v0, 3 /* 3E4900 E010A560 00449021 */ addu $s2, $v0, $a0 /* 3E4904 E010A564 C654006C */ lwc1 $f20, 0x6C($s2) /* 3E4908 E010A568 8E330030 */ lw $s3, 0x30($s1) /* 3E490C E010A56C 8E360000 */ lw $s6, 0x0($s1) /* 3E4910 E010A570 4600A507 */ neg.s $f20, $f20 /* 3E4914 E010A574 0C080140 */ jal shim_sin_deg /* 3E4918 E010A578 4600A306 */ mov.s $f12, $f20 /* 3E491C E010A57C 4600A306 */ mov.s $f12, $f20 /* 3E4920 E010A580 0C080144 */ jal shim_cos_deg /* 3E4924 E010A584 E7A00058 */ swc1 $f0, 0x58($sp) /* 3E4928 E010A588 3C148007 */ lui $s4, %hi(gGameStatusPtr) /* 3E492C E010A58C 2694419C */ addiu $s4, $s4, %lo(gGameStatusPtr) /* 3E4930 E010A590 E7A0005C */ swc1 $f0, 0x5C($sp) /* 3E4934 E010A594 8E820000 */ lw $v0, 0x0($s4) /* 3E4938 E010A598 3C15E011 */ lui $s5, %hi(D_E010AF80) /* 3E493C E010A59C 26B5AF80 */ addiu $s5, $s5, %lo(D_E010AF80) /* 3E4940 E010A5A0 94430134 */ lhu $v1, 0x134($v0) /* 3E4944 E010A5A4 8EA20000 */ lw $v0, 0x0($s5) /* 3E4948 E010A5A8 8E3E004C */ lw $fp, 0x4C($s1) /* 3E494C E010A5AC 10430013 */ beq $v0, $v1, .LE010A5FC /* 3E4950 E010A5B0 2404000A */ addiu $a0, $zero, 0xA /* 3E4954 E010A5B4 3C10E011 */ lui $s0, %hi(D_E010AF84) /* 3E4958 E010A5B8 2610AF84 */ addiu $s0, $s0, %lo(D_E010AF84) /* 3E495C E010A5BC 3C01E011 */ lui $at, (0xE0110000 >> 16) /* 3E4960 E010A5C0 D422AFA8 */ ldc1 $f2, -0x5058($at) /* 3E4964 E010A5C4 C6000000 */ lwc1 $f0, 0x0($s0) /* 3E4968 E010A5C8 46800021 */ cvt.d.w $f0, $f0 /* 3E496C E010A5CC 46220002 */ mul.d $f0, $f0, $f2 /* 3E4970 E010A5D0 00000000 */ nop /* 3E4974 E010A5D4 0080282D */ daddu $a1, $a0, $zero /* 3E4978 E010A5D8 24060136 */ addiu $a2, $zero, 0x136 /* 3E497C E010A5DC 240700E6 */ addiu $a3, $zero, 0xE6 /* 3E4980 E010A5E0 46200020 */ cvt.s.d $f0, $f0 /* 3E4984 E010A5E4 0C08018C */ jal shim_draw_prev_frame_buffer_at_screen_pos /* 3E4988 E010A5E8 E7A00010 */ swc1 $f0, 0x10($sp) /* 3E498C E010A5EC 8E820000 */ lw $v0, 0x0($s4) /* 3E4990 E010A5F0 94420134 */ lhu $v0, 0x134($v0) /* 3E4994 E010A5F4 AE000000 */ sw $zero, 0x0($s0) /* 3E4998 E010A5F8 AEA20000 */ sw $v0, 0x0($s5) .LE010A5FC: /* 3E499C E010A5FC 3C03E011 */ lui $v1, %hi(D_E010AF84) /* 3E49A0 E010A600 2463AF84 */ addiu $v1, $v1, %lo(D_E010AF84) /* 3E49A4 E010A604 8C620000 */ lw $v0, 0x0($v1) /* 3E49A8 E010A608 0053102A */ slt $v0, $v0, $s3 /* 3E49AC E010A60C 54400001 */ bnel $v0, $zero, .LE010A614 /* 3E49B0 E010A610 AC730000 */ sw $s3, 0x0($v1) .LE010A614: /* 3E49B4 E010A614 3C04DB06 */ lui $a0, (0xDB060024 >> 16) /* 3E49B8 E010A618 3C07800A */ lui $a3, %hi(gMainGfxPos) /* 3E49BC E010A61C 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* 3E49C0 E010A620 34840024 */ ori $a0, $a0, (0xDB060024 & 0xFFFF) /* 3E49C4 E010A624 8CE50000 */ lw $a1, 0x0($a3) /* 3E49C8 E010A628 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3E49CC E010A62C 00A0182D */ daddu $v1, $a1, $zero /* 3E49D0 E010A630 24A50008 */ addiu $a1, $a1, 0x8 /* 3E49D4 E010A634 ACE50000 */ sw $a1, 0x0($a3) /* 3E49D8 E010A638 AC620000 */ sw $v0, 0x0($v1) /* 3E49DC E010A63C AC600004 */ sw $zero, 0x4($v1) /* 3E49E0 E010A640 ACA40000 */ sw $a0, 0x0($a1) /* 3E49E4 E010A644 8EE30010 */ lw $v1, 0x10($s7) /* 3E49E8 E010A648 24A20008 */ addiu $v0, $a1, 0x8 /* 3E49EC E010A64C ACE20000 */ sw $v0, 0x0($a3) /* 3E49F0 E010A650 8C62001C */ lw $v0, 0x1C($v1) /* 3E49F4 E010A654 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3E49F8 E010A658 00431021 */ addu $v0, $v0, $v1 /* 3E49FC E010A65C ACA20004 */ sw $v0, 0x4($a1) /* 3E4A00 E010A660 C64E00D4 */ lwc1 $f14, 0xD4($s2) /* 3E4A04 E010A664 E7AE0018 */ swc1 $f14, 0x18($sp) /* 3E4A08 E010A668 C64E00D8 */ lwc1 $f14, 0xD8($s2) /* 3E4A0C E010A66C E7AE001C */ swc1 $f14, 0x1C($sp) /* 3E4A10 E010A670 C64E00DC */ lwc1 $f14, 0xDC($s2) /* 3E4A14 E010A674 E7AE0020 */ swc1 $f14, 0x20($sp) /* 3E4A18 E010A678 C64E00E0 */ lwc1 $f14, 0xE0($s2) /* 3E4A1C E010A67C E7AE0024 */ swc1 $f14, 0x24($sp) /* 3E4A20 E010A680 C64E00E4 */ lwc1 $f14, 0xE4($s2) /* 3E4A24 E010A684 E7AE0028 */ swc1 $f14, 0x28($sp) /* 3E4A28 E010A688 C64E00E8 */ lwc1 $f14, 0xE8($s2) /* 3E4A2C E010A68C E7AE002C */ swc1 $f14, 0x2C($sp) /* 3E4A30 E010A690 C64E00EC */ lwc1 $f14, 0xEC($s2) /* 3E4A34 E010A694 E7AE0030 */ swc1 $f14, 0x30($sp) /* 3E4A38 E010A698 C64E00F0 */ lwc1 $f14, 0xF0($s2) /* 3E4A3C E010A69C E7AE0034 */ swc1 $f14, 0x34($sp) /* 3E4A40 E010A6A0 C64E00F4 */ lwc1 $f14, 0xF4($s2) /* 3E4A44 E010A6A4 E7AE0038 */ swc1 $f14, 0x38($sp) /* 3E4A48 E010A6A8 C64E00F8 */ lwc1 $f14, 0xF8($s2) /* 3E4A4C E010A6AC E7AE003C */ swc1 $f14, 0x3C($sp) /* 3E4A50 E010A6B0 C64E00FC */ lwc1 $f14, 0xFC($s2) /* 3E4A54 E010A6B4 E7AE0040 */ swc1 $f14, 0x40($sp) /* 3E4A58 E010A6B8 C64E0100 */ lwc1 $f14, 0x100($s2) /* 3E4A5C E010A6BC E7AE0044 */ swc1 $f14, 0x44($sp) /* 3E4A60 E010A6C0 C64E0104 */ lwc1 $f14, 0x104($s2) /* 3E4A64 E010A6C4 E7AE0048 */ swc1 $f14, 0x48($sp) /* 3E4A68 E010A6C8 C64E0108 */ lwc1 $f14, 0x108($s2) /* 3E4A6C E010A6CC E7AE004C */ swc1 $f14, 0x4C($sp) /* 3E4A70 E010A6D0 C64E010C */ lwc1 $f14, 0x10C($s2) /* 3E4A74 E010A6D4 E7AE0050 */ swc1 $f14, 0x50($sp) /* 3E4A78 E010A6D8 C64E0110 */ lwc1 $f14, 0x110($s2) /* 3E4A7C E010A6DC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3E4A80 E010A6E0 E7AE0054 */ swc1 $f14, 0x54($sp) /* 3E4A84 E010A6E4 ACA20008 */ sw $v0, 0x8($a1) /* 3E4A88 E010A6E8 00161080 */ sll $v0, $s6, 2 /* 3E4A8C E010A6EC 3C03E011 */ lui $v1, (0xE0110000 >> 16) /* 3E4A90 E010A6F0 00621821 */ addu $v1, $v1, $v0 /* 3E4A94 E010A6F4 8C63ACCC */ lw $v1, -0x5334($v1) /* 3E4A98 E010A6F8 24A20010 */ addiu $v0, $a1, 0x10 /* 3E4A9C E010A6FC ACE20000 */ sw $v0, 0x0($a3) /* 3E4AA0 E010A700 ACA3000C */ sw $v1, 0xC($a1) /* 3E4AA4 E010A704 C62E0004 */ lwc1 $f14, 0x4($s1) /* 3E4AA8 E010A708 E7AE0060 */ swc1 $f14, 0x60($sp) /* 3E4AAC E010A70C C62E0008 */ lwc1 $f14, 0x8($s1) /* 3E4AB0 E010A710 E7AE0064 */ swc1 $f14, 0x64($sp) /* 3E4AB4 E010A714 C62E000C */ lwc1 $f14, 0xC($s1) /* 3E4AB8 E010A718 E7AE0068 */ swc1 $f14, 0x68($sp) /* 3E4ABC E010A71C C63E0044 */ lwc1 $f30, 0x44($s1) /* 3E4AC0 E010A720 24A20018 */ addiu $v0, $a1, 0x18 /* 3E4AC4 E010A724 ACE20000 */ sw $v0, 0x0($a3) /* 3E4AC8 E010A728 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3E4ACC E010A72C ACA20010 */ sw $v0, 0x10($a1) /* 3E4AD0 E010A730 92220027 */ lbu $v0, 0x27($s1) /* 3E4AD4 E010A734 9224002B */ lbu $a0, 0x2B($s1) /* 3E4AD8 E010A738 9226002F */ lbu $a2, 0x2F($s1) /* 3E4ADC E010A73C 24A30020 */ addiu $v1, $a1, 0x20 /* 3E4AE0 E010A740 ACE30000 */ sw $v1, 0x0($a3) /* 3E4AE4 E010A744 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3E4AE8 E010A748 ACA30018 */ sw $v1, 0x18($a1) /* 3E4AEC E010A74C 326300FF */ andi $v1, $s3, 0xFF /* 3E4AF0 E010A750 00021600 */ sll $v0, $v0, 24 /* 3E4AF4 E010A754 00042400 */ sll $a0, $a0, 16 /* 3E4AF8 E010A758 00441025 */ or $v0, $v0, $a0 /* 3E4AFC E010A75C 00063200 */ sll $a2, $a2, 8 /* 3E4B00 E010A760 00461025 */ or $v0, $v0, $a2 /* 3E4B04 E010A764 00431025 */ or $v0, $v0, $v1 /* 3E4B08 E010A768 ACA20014 */ sw $v0, 0x14($a1) /* 3E4B0C E010A76C 92220027 */ lbu $v0, 0x27($s1) /* 3E4B10 E010A770 9224002B */ lbu $a0, 0x2B($s1) /* 3E4B14 E010A774 9223002F */ lbu $v1, 0x2F($s1) /* 3E4B18 E010A778 00021600 */ sll $v0, $v0, 24 /* 3E4B1C E010A77C 00042400 */ sll $a0, $a0, 16 /* 3E4B20 E010A780 00441025 */ or $v0, $v0, $a0 /* 3E4B24 E010A784 00031A00 */ sll $v1, $v1, 8 /* 3E4B28 E010A788 00431025 */ or $v0, $v0, $v1 /* 3E4B2C E010A78C ACA2001C */ sw $v0, 0x1C($a1) /* 3E4B30 E010A790 24020001 */ addiu $v0, $zero, 0x1 /* 3E4B34 E010A794 17C20009 */ bne $fp, $v0, .LE010A7BC /* 3E4B38 E010A798 0000A02D */ daddu $s4, $zero, $zero /* 3E4B3C E010A79C 3C03E011 */ lui $v1, %hi(D_E010AF68) /* 3E4B40 E010A7A0 2463AF68 */ addiu $v1, $v1, %lo(D_E010AF68) /* 3E4B44 E010A7A4 001610C0 */ sll $v0, $s6, 3 /* 3E4B48 E010A7A8 00431021 */ addu $v0, $v0, $v1 /* 3E4B4C E010A7AC 8C540000 */ lw $s4, 0x0($v0) /* 3E4B50 E010A7B0 8C570004 */ lw $s7, 0x4($v0) /* 3E4B54 E010A7B4 080429F1 */ j .LE010A7C4 /* 3E4B58 E010A7B8 0000A82D */ daddu $s5, $zero, $zero .LE010A7BC: /* 3E4B5C E010A7BC 24170004 */ addiu $s7, $zero, 0x4 /* 3E4B60 E010A7C0 0000A82D */ daddu $s5, $zero, $zero .LE010A7C4: /* 3E4B64 E010A7C4 1AE00129 */ blez $s7, .LE010AC6C /* 3E4B68 E010A7C8 26930001 */ addiu $s3, $s4, 0x1 /* 3E4B6C E010A7CC 3C16800A */ lui $s6, %hi(gMainGfxPos) /* 3E4B70 E010A7D0 26D6A66C */ addiu $s6, $s6, %lo(gMainGfxPos) /* 3E4B74 E010A7D4 0220802D */ daddu $s0, $s1, $zero /* 3E4B78 E010A7D8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3E4B7C E010A7DC 4481E000 */ mtc1 $at, $f28 .LE010A7E0: /* 3E4B80 E010A7E0 24020001 */ addiu $v0, $zero, 0x1 /* 3E4B84 E010A7E4 17C20030 */ bne $fp, $v0, .LE010A8A8 /* 3E4B88 E010A7E8 00000000 */ nop /* 3E4B8C E010A7EC 0C080138 */ jal shim_rand_int /* 3E4B90 E010A7F0 24040010 */ addiu $a0, $zero, 0x10 /* 3E4B94 E010A7F4 28420006 */ slti $v0, $v0, 0x6 /* 3E4B98 E010A7F8 54400117 */ bnel $v0, $zero, .LE010AC58 /* 3E4B9C E010A7FC 26100004 */ addiu $s0, $s0, 0x4 /* 3E4BA0 E010A800 82830000 */ lb $v1, 0x0($s4) /* 3E4BA4 E010A804 C7AE005C */ lwc1 $f14, 0x5C($sp) /* 3E4BA8 E010A808 44832000 */ mtc1 $v1, $f4 /* 3E4BAC E010A80C 00000000 */ nop /* 3E4BB0 E010A810 46802120 */ cvt.s.w $f4, $f4 /* 3E4BB4 E010A814 460E2102 */ mul.s $f4, $f4, $f14 /* 3E4BB8 E010A818 00000000 */ nop /* 3E4BBC E010A81C 82620001 */ lb $v0, 0x1($s3) /* 3E4BC0 E010A820 C7AE0058 */ lwc1 $f14, 0x58($sp) /* 3E4BC4 E010A824 44823000 */ mtc1 $v0, $f6 /* 3E4BC8 E010A828 00000000 */ nop /* 3E4BCC E010A82C 468031A0 */ cvt.s.w $f6, $f6 /* 3E4BD0 E010A830 460E3002 */ mul.s $f0, $f6, $f14 /* 3E4BD4 E010A834 00000000 */ nop /* 3E4BD8 E010A838 82620000 */ lb $v0, 0x0($s3) /* 3E4BDC E010A83C 44821000 */ mtc1 $v0, $f2 /* 3E4BE0 E010A840 00000000 */ nop /* 3E4BE4 E010A844 468010A0 */ cvt.s.w $f2, $f2 /* 3E4BE8 E010A848 461E1082 */ mul.s $f2, $f2, $f30 /* 3E4BEC E010A84C 00000000 */ nop /* 3E4BF0 E010A850 46002100 */ add.s $f4, $f4, $f0 /* 3E4BF4 E010A854 00031823 */ negu $v1, $v1 /* 3E4BF8 E010A858 44830000 */ mtc1 $v1, $f0 /* 3E4BFC E010A85C 00000000 */ nop /* 3E4C00 E010A860 46800020 */ cvt.s.w $f0, $f0 /* 3E4C04 E010A864 460E0002 */ mul.s $f0, $f0, $f14 /* 3E4C08 E010A868 00000000 */ nop /* 3E4C0C E010A86C C7AE005C */ lwc1 $f14, 0x5C($sp) /* 3E4C10 E010A870 460E3182 */ mul.s $f6, $f6, $f14 /* 3E4C14 E010A874 00000000 */ nop /* 3E4C18 E010A878 461E2102 */ mul.s $f4, $f4, $f30 /* 3E4C1C E010A87C 00000000 */ nop /* 3E4C20 E010A880 46060000 */ add.s $f0, $f0, $f6 /* 3E4C24 E010A884 461E0002 */ mul.s $f0, $f0, $f30 /* 3E4C28 E010A888 00000000 */ nop /* 3E4C2C E010A88C C7AE0064 */ lwc1 $f14, 0x64($sp) /* 3E4C30 E010A890 460E1680 */ add.s $f26, $f2, $f14 /* 3E4C34 E010A894 C7AE0060 */ lwc1 $f14, 0x60($sp) /* 3E4C38 E010A898 460E2600 */ add.s $f24, $f4, $f14 /* 3E4C3C E010A89C C7AE0068 */ lwc1 $f14, 0x68($sp) /* 3E4C40 E010A8A0 08042A2D */ j .LE010A8B4 /* 3E4C44 E010A8A4 460E0100 */ add.s $f4, $f0, $f14 .LE010A8A8: /* 3E4C48 E010A8A8 C6180050 */ lwc1 $f24, 0x50($s0) /* 3E4C4C E010A8AC C61A0060 */ lwc1 $f26, 0x60($s0) /* 3E4C50 E010A8B0 C6040070 */ lwc1 $f4, 0x70($s0) .LE010A8B4: /* 3E4C54 E010A8B4 C7AE0018 */ lwc1 $f14, 0x18($sp) /* 3E4C58 E010A8B8 46187182 */ mul.s $f6, $f14, $f24 /* 3E4C5C E010A8BC 00000000 */ nop /* 3E4C60 E010A8C0 C7AE0028 */ lwc1 $f14, 0x28($sp) /* 3E4C64 E010A8C4 461A7402 */ mul.s $f16, $f14, $f26 /* 3E4C68 E010A8C8 00000000 */ nop /* 3E4C6C E010A8CC C7AE0038 */ lwc1 $f14, 0x38($sp) /* 3E4C70 E010A8D0 46047482 */ mul.s $f18, $f14, $f4 /* 3E4C74 E010A8D4 00000000 */ nop /* 3E4C78 E010A8D8 C7AE001C */ lwc1 $f14, 0x1C($sp) /* 3E4C7C E010A8DC 46187202 */ mul.s $f8, $f14, $f24 /* 3E4C80 E010A8E0 00000000 */ nop /* 3E4C84 E010A8E4 C7AE002C */ lwc1 $f14, 0x2C($sp) /* 3E4C88 E010A8E8 461A7302 */ mul.s $f12, $f14, $f26 /* 3E4C8C E010A8EC 00000000 */ nop /* 3E4C90 E010A8F0 C7AE003C */ lwc1 $f14, 0x3C($sp) /* 3E4C94 E010A8F4 46047502 */ mul.s $f20, $f14, $f4 /* 3E4C98 E010A8F8 00000000 */ nop /* 3E4C9C E010A8FC C7AE0020 */ lwc1 $f14, 0x20($sp) /* 3E4CA0 E010A900 46187282 */ mul.s $f10, $f14, $f24 /* 3E4CA4 E010A904 00000000 */ nop /* 3E4CA8 E010A908 C7AE0030 */ lwc1 $f14, 0x30($sp) /* 3E4CAC E010A90C 461A7382 */ mul.s $f14, $f14, $f26 /* 3E4CB0 E010A910 00000000 */ nop /* 3E4CB4 E010A914 E7AE0070 */ swc1 $f14, 0x70($sp) /* 3E4CB8 E010A918 C7AE0040 */ lwc1 $f14, 0x40($sp) /* 3E4CBC E010A91C 46047582 */ mul.s $f22, $f14, $f4 /* 3E4CC0 E010A920 00000000 */ nop /* 3E4CC4 E010A924 C7AE0024 */ lwc1 $f14, 0x24($sp) /* 3E4CC8 E010A928 46187002 */ mul.s $f0, $f14, $f24 /* 3E4CCC E010A92C 00000000 */ nop /* 3E4CD0 E010A930 C7AE0034 */ lwc1 $f14, 0x34($sp) /* 3E4CD4 E010A934 461A7082 */ mul.s $f2, $f14, $f26 /* 3E4CD8 E010A938 00000000 */ nop /* 3E4CDC E010A93C C7AE0044 */ lwc1 $f14, 0x44($sp) /* 3E4CE0 E010A940 46047102 */ mul.s $f4, $f14, $f4 /* 3E4CE4 E010A944 00000000 */ nop /* 3E4CE8 E010A948 46103180 */ add.s $f6, $f6, $f16 /* 3E4CEC E010A94C 46123180 */ add.s $f6, $f6, $f18 /* 3E4CF0 E010A950 460C4200 */ add.s $f8, $f8, $f12 /* 3E4CF4 E010A954 46144200 */ add.s $f8, $f8, $f20 /* 3E4CF8 E010A958 46020000 */ add.s $f0, $f0, $f2 /* 3E4CFC E010A95C 46040000 */ add.s $f0, $f0, $f4 /* 3E4D00 E010A960 C7AE0054 */ lwc1 $f14, 0x54($sp) /* 3E4D04 E010A964 460E0080 */ add.s $f2, $f0, $f14 /* 3E4D08 E010A968 C7AE0048 */ lwc1 $f14, 0x48($sp) /* 3E4D0C E010A96C 460E3100 */ add.s $f4, $f6, $f14 /* 3E4D10 E010A970 C7AE0070 */ lwc1 $f14, 0x70($sp) /* 3E4D14 E010A974 460E5280 */ add.s $f10, $f10, $f14 /* 3E4D18 E010A978 C7AE004C */ lwc1 $f14, 0x4C($sp) /* 3E4D1C E010A97C 460E4200 */ add.s $f8, $f8, $f14 /* 3E4D20 E010A980 46165280 */ add.s $f10, $f10, $f22 /* 3E4D24 E010A984 44807000 */ mtc1 $zero, $f14 /* 3E4D28 E010A988 00000000 */ nop /* 3E4D2C E010A98C 460E1032 */ c.eq.s $f2, $f14 /* 3E4D30 E010A990 C7AE0050 */ lwc1 $f14, 0x50($sp) /* 3E4D34 E010A994 450100AF */ bc1t .LE010AC54 /* 3E4D38 E010A998 460E5000 */ add.s $f0, $f10, $f14 /* 3E4D3C E010A99C 4602E083 */ div.s $f2, $f28, $f2 /* 3E4D40 E010A9A0 46022602 */ mul.s $f24, $f4, $f2 /* 3E4D44 E010A9A4 00000000 */ nop /* 3E4D48 E010A9A8 46020102 */ mul.s $f4, $f0, $f2 /* 3E4D4C E010A9AC 00000000 */ nop /* 3E4D50 E010A9B0 46004007 */ neg.s $f0, $f8 /* 3E4D54 E010A9B4 46020682 */ mul.s $f26, $f0, $f2 /* 3E4D58 E010A9B8 00000000 */ nop /* 3E4D5C E010A9BC 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 3E4D60 E010A9C0 44817000 */ mtc1 $at, $f14 /* 3E4D64 E010A9C4 00000000 */ nop /* 3E4D68 E010A9C8 460E203E */ c.le.s $f4, $f14 /* 3E4D6C E010A9CC 00000000 */ nop /* 3E4D70 E010A9D0 450300A1 */ bc1tl .LE010AC58 /* 3E4D74 E010A9D4 26100004 */ addiu $s0, $s0, 0x4 /* 3E4D78 E010A9D8 460EC03E */ c.le.s $f24, $f14 /* 3E4D7C E010A9DC 00000000 */ nop /* 3E4D80 E010A9E0 4503009D */ bc1tl .LE010AC58 /* 3E4D84 E010A9E4 26100004 */ addiu $s0, $s0, 0x4 /* 3E4D88 E010A9E8 4618E03E */ c.le.s $f28, $f24 /* 3E4D8C E010A9EC 00000000 */ nop /* 3E4D90 E010A9F0 45030099 */ bc1tl .LE010AC58 /* 3E4D94 E010A9F4 26100004 */ addiu $s0, $s0, 0x4 /* 3E4D98 E010A9F8 460ED03E */ c.le.s $f26, $f14 /* 3E4D9C E010A9FC 00000000 */ nop /* 3E4DA0 E010AA00 45030095 */ bc1tl .LE010AC58 /* 3E4DA4 E010AA04 26100004 */ addiu $s0, $s0, 0x4 /* 3E4DA8 E010AA08 461AE03E */ c.le.s $f28, $f26 /* 3E4DAC E010AA0C 00000000 */ nop /* 3E4DB0 E010AA10 45030091 */ bc1tl .LE010AC58 /* 3E4DB4 E010AA14 26100004 */ addiu $s0, $s0, 0x4 /* 3E4DB8 E010AA18 8642000A */ lh $v0, 0xA($s2) /* 3E4DBC E010AA1C 461CC000 */ add.s $f0, $f24, $f28 /* 3E4DC0 E010AA20 44821000 */ mtc1 $v0, $f2 /* 3E4DC4 E010AA24 00000000 */ nop /* 3E4DC8 E010AA28 468010A0 */ cvt.s.w $f2, $f2 /* 3E4DCC E010AA2C 46020002 */ mul.s $f0, $f0, $f2 /* 3E4DD0 E010AA30 00000000 */ nop /* 3E4DD4 E010AA34 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3E4DD8 E010AA38 44817800 */ mtc1 $at, $f15 /* 3E4DDC E010AA3C 44807000 */ mtc1 $zero, $f14 /* 3E4DE0 E010AA40 46000021 */ cvt.d.s $f0, $f0 /* 3E4DE4 E010AA44 462E0002 */ mul.d $f0, $f0, $f14 /* 3E4DE8 E010AA48 00000000 */ nop /* 3E4DEC E010AA4C 8642000C */ lh $v0, 0xC($s2) /* 3E4DF0 E010AA50 461CD080 */ add.s $f2, $f26, $f28 /* 3E4DF4 E010AA54 44822000 */ mtc1 $v0, $f4 /* 3E4DF8 E010AA58 00000000 */ nop /* 3E4DFC E010AA5C 46802120 */ cvt.s.w $f4, $f4 /* 3E4E00 E010AA60 46041082 */ mul.s $f2, $f2, $f4 /* 3E4E04 E010AA64 00000000 */ nop /* 3E4E08 E010AA68 460010A1 */ cvt.d.s $f2, $f2 /* 3E4E0C E010AA6C 462E1082 */ mul.d $f2, $f2, $f14 /* 3E4E10 E010AA70 00000000 */ nop /* 3E4E14 E010AA74 8642000E */ lh $v0, 0xE($s2) /* 3E4E18 E010AA78 46200620 */ cvt.s.d $f24, $f0 /* 3E4E1C E010AA7C 44820000 */ mtc1 $v0, $f0 /* 3E4E20 E010AA80 00000000 */ nop /* 3E4E24 E010AA84 46800020 */ cvt.s.w $f0, $f0 /* 3E4E28 E010AA88 4600C600 */ add.s $f24, $f24, $f0 /* 3E4E2C E010AA8C 3C014080 */ lui $at, (0x40800000 >> 16) /* 3E4E30 E010AA90 44812000 */ mtc1 $at, $f4 /* 3E4E34 E010AA94 00000000 */ nop /* 3E4E38 E010AA98 4604C602 */ mul.s $f24, $f24, $f4 /* 3E4E3C E010AA9C 00000000 */ nop /* 3E4E40 E010AAA0 86420010 */ lh $v0, 0x10($s2) /* 3E4E44 E010AAA4 44820000 */ mtc1 $v0, $f0 /* 3E4E48 E010AAA8 00000000 */ nop /* 3E4E4C E010AAAC 46800020 */ cvt.s.w $f0, $f0 /* 3E4E50 E010AAB0 462016A0 */ cvt.s.d $f26, $f2 /* 3E4E54 E010AAB4 4600D680 */ add.s $f26, $f26, $f0 /* 3E4E58 E010AAB8 3C014100 */ lui $at, (0x41000000 >> 16) /* 3E4E5C E010AABC 44810000 */ mtc1 $at, $f0 /* 3E4E60 E010AAC0 8EC40000 */ lw $a0, 0x0($s6) /* 3E4E64 E010AAC4 4600C000 */ add.s $f0, $f24, $f0 /* 3E4E68 E010AAC8 24820008 */ addiu $v0, $a0, 0x8 /* 3E4E6C E010AACC AEC20000 */ sw $v0, 0x0($s6) /* 3E4E70 E010AAD0 4604D682 */ mul.s $f26, $f26, $f4 /* 3E4E74 E010AAD4 00000000 */ nop /* 3E4E78 E010AAD8 4600038D */ trunc.w.s $f14, $f0 /* 3E4E7C E010AADC 44027000 */ mfc1 $v0, $f14 /* 3E4E80 E010AAE0 00000000 */ nop /* 3E4E84 E010AAE4 00021400 */ sll $v0, $v0, 16 /* 3E4E88 E010AAE8 00021403 */ sra $v0, $v0, 16 /* 3E4E8C E010AAEC 18400005 */ blez $v0, .LE010AB04 /* 3E4E90 E010AAF0 30420FFF */ andi $v0, $v0, 0xFFF /* 3E4E94 E010AAF4 00021300 */ sll $v0, $v0, 12 /* 3E4E98 E010AAF8 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* 3E4E9C E010AAFC 08042AC2 */ j .LE010AB08 /* 3E4EA0 E010AB00 00431825 */ or $v1, $v0, $v1 .LE010AB04: /* 3E4EA4 E010AB04 3C03E400 */ lui $v1, (0xE4000000 >> 16) .LE010AB08: /* 3E4EA8 E010AB08 3C014100 */ lui $at, (0x41000000 >> 16) /* 3E4EAC E010AB0C 44810000 */ mtc1 $at, $f0 /* 3E4EB0 E010AB10 00000000 */ nop /* 3E4EB4 E010AB14 4600D000 */ add.s $f0, $f26, $f0 /* 3E4EB8 E010AB18 4600038D */ trunc.w.s $f14, $f0 /* 3E4EBC E010AB1C 44027000 */ mfc1 $v0, $f14 /* 3E4EC0 E010AB20 00000000 */ nop /* 3E4EC4 E010AB24 00021400 */ sll $v0, $v0, 16 /* 3E4EC8 E010AB28 00021403 */ sra $v0, $v0, 16 /* 3E4ECC E010AB2C 18400004 */ blez $v0, .LE010AB40 /* 3E4ED0 E010AB30 AC830000 */ sw $v1, 0x0($a0) /* 3E4ED4 E010AB34 30420FFF */ andi $v0, $v0, 0xFFF /* 3E4ED8 E010AB38 00621025 */ or $v0, $v1, $v0 /* 3E4EDC E010AB3C AC820000 */ sw $v0, 0x0($a0) .LE010AB40: /* 3E4EE0 E010AB40 4600C38D */ trunc.w.s $f14, $f24 /* 3E4EE4 E010AB44 44027000 */ mfc1 $v0, $f14 /* 3E4EE8 E010AB48 00000000 */ nop /* 3E4EEC E010AB4C 00021400 */ sll $v0, $v0, 16 /* 3E4EF0 E010AB50 00021403 */ sra $v0, $v0, 16 /* 3E4EF4 E010AB54 18400004 */ blez $v0, .LE010AB68 /* 3E4EF8 E010AB58 24840004 */ addiu $a0, $a0, 0x4 /* 3E4EFC E010AB5C 30420FFF */ andi $v0, $v0, 0xFFF /* 3E4F00 E010AB60 08042ADB */ j .LE010AB6C /* 3E4F04 E010AB64 00021B00 */ sll $v1, $v0, 12 .LE010AB68: /* 3E4F08 E010AB68 0000182D */ daddu $v1, $zero, $zero .LE010AB6C: /* 3E4F0C E010AB6C 4600D38D */ trunc.w.s $f14, $f26 /* 3E4F10 E010AB70 44027000 */ mfc1 $v0, $f14 /* 3E4F14 E010AB74 00000000 */ nop /* 3E4F18 E010AB78 00021400 */ sll $v0, $v0, 16 /* 3E4F1C E010AB7C 00021403 */ sra $v0, $v0, 16 /* 3E4F20 E010AB80 18400004 */ blez $v0, .LE010AB94 /* 3E4F24 E010AB84 AC830000 */ sw $v1, 0x0($a0) /* 3E4F28 E010AB88 30420FFF */ andi $v0, $v0, 0xFFF /* 3E4F2C E010AB8C 00621025 */ or $v0, $v1, $v0 /* 3E4F30 E010AB90 AC820000 */ sw $v0, 0x0($a0) .LE010AB94: /* 3E4F34 E010AB94 8EC20000 */ lw $v0, 0x0($s6) /* 3E4F38 E010AB98 0040182D */ daddu $v1, $v0, $zero /* 3E4F3C E010AB9C 24420008 */ addiu $v0, $v0, 0x8 /* 3E4F40 E010ABA0 AEC20000 */ sw $v0, 0x0($s6) /* 3E4F44 E010ABA4 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 3E4F48 E010ABA8 AC620000 */ sw $v0, 0x0($v1) /* 3E4F4C E010ABAC 4600C38D */ trunc.w.s $f14, $f24 /* 3E4F50 E010ABB0 44027000 */ mfc1 $v0, $f14 /* 3E4F54 E010ABB4 00000000 */ nop /* 3E4F58 E010ABB8 00021400 */ sll $v0, $v0, 16 /* 3E4F5C E010ABBC 00021403 */ sra $v0, $v0, 16 /* 3E4F60 E010ABC0 04410008 */ bgez $v0, .LE010ABE4 /* 3E4F64 E010ABC4 24630004 */ addiu $v1, $v1, 0x4 /* 3E4F68 E010ABC8 000221C0 */ sll $a0, $v0, 7 /* 3E4F6C E010ABCC 5C800001 */ bgtzl $a0, .LE010ABD4 /* 3E4F70 E010ABD0 0000202D */ daddu $a0, $zero, $zero .LE010ABD4: /* 3E4F74 E010ABD4 24020080 */ addiu $v0, $zero, 0x80 /* 3E4F78 E010ABD8 00441023 */ subu $v0, $v0, $a0 /* 3E4F7C E010ABDC 08042AFA */ j .LE010ABE8 /* 3E4F80 E010ABE0 00022C00 */ sll $a1, $v0, 16 .LE010ABE4: /* 3E4F84 E010ABE4 3C050080 */ lui $a1, (0x800080 >> 16) .LE010ABE8: /* 3E4F88 E010ABE8 44807000 */ mtc1 $zero, $f14 /* 3E4F8C E010ABEC 00000000 */ nop /* 3E4F90 E010ABF0 460ED03C */ c.lt.s $f26, $f14 /* 3E4F94 E010ABF4 00000000 */ nop /* 3E4F98 E010ABF8 4500000C */ bc1f .LE010AC2C /* 3E4F9C E010ABFC 34A20080 */ ori $v0, $a1, (0x800080 & 0xFFFF) /* 3E4FA0 E010AC00 4600D38D */ trunc.w.s $f14, $f26 /* 3E4FA4 E010AC04 44027000 */ mfc1 $v0, $f14 /* 3E4FA8 E010AC08 00000000 */ nop /* 3E4FAC E010AC0C 00021400 */ sll $v0, $v0, 16 /* 3E4FB0 E010AC10 00022243 */ sra $a0, $v0, 9 /* 3E4FB4 E010AC14 5C800001 */ bgtzl $a0, .LE010AC1C /* 3E4FB8 E010AC18 0000202D */ daddu $a0, $zero, $zero .LE010AC1C: /* 3E4FBC E010AC1C 24020080 */ addiu $v0, $zero, 0x80 /* 3E4FC0 E010AC20 00441023 */ subu $v0, $v0, $a0 /* 3E4FC4 E010AC24 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3E4FC8 E010AC28 00A21025 */ or $v0, $a1, $v0 .LE010AC2C: /* 3E4FCC E010AC2C AC620000 */ sw $v0, 0x0($v1) /* 3E4FD0 E010AC30 3C044000 */ lui $a0, (0x40004000 >> 16) /* 3E4FD4 E010AC34 8EC20000 */ lw $v0, 0x0($s6) /* 3E4FD8 E010AC38 34844000 */ ori $a0, $a0, (0x40004000 & 0xFFFF) /* 3E4FDC E010AC3C 0040182D */ daddu $v1, $v0, $zero /* 3E4FE0 E010AC40 24420008 */ addiu $v0, $v0, 0x8 /* 3E4FE4 E010AC44 AEC20000 */ sw $v0, 0x0($s6) /* 3E4FE8 E010AC48 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* 3E4FEC E010AC4C AC620000 */ sw $v0, 0x0($v1) /* 3E4FF0 E010AC50 AC640004 */ sw $a0, 0x4($v1) .LE010AC54: /* 3E4FF4 E010AC54 26100004 */ addiu $s0, $s0, 0x4 .LE010AC58: /* 3E4FF8 E010AC58 26B50001 */ addiu $s5, $s5, 0x1 /* 3E4FFC E010AC5C 26730003 */ addiu $s3, $s3, 0x3 /* 3E5000 E010AC60 02B7102A */ slt $v0, $s5, $s7 /* 3E5004 E010AC64 1440FEDE */ bnez $v0, .LE010A7E0 /* 3E5008 E010AC68 26940003 */ addiu $s4, $s4, 0x3 .LE010AC6C: /* 3E500C E010AC6C 8FBF009C */ lw $ra, 0x9C($sp) /* 3E5010 E010AC70 8FBE0098 */ lw $fp, 0x98($sp) /* 3E5014 E010AC74 8FB70094 */ lw $s7, 0x94($sp) /* 3E5018 E010AC78 8FB60090 */ lw $s6, 0x90($sp) /* 3E501C E010AC7C 8FB5008C */ lw $s5, 0x8C($sp) /* 3E5020 E010AC80 8FB40088 */ lw $s4, 0x88($sp) /* 3E5024 E010AC84 8FB30084 */ lw $s3, 0x84($sp) /* 3E5028 E010AC88 8FB20080 */ lw $s2, 0x80($sp) /* 3E502C E010AC8C 8FB1007C */ lw $s1, 0x7C($sp) /* 3E5030 E010AC90 8FB00078 */ lw $s0, 0x78($sp) /* 3E5034 E010AC94 D7BE00C8 */ ldc1 $f30, 0xC8($sp) /* 3E5038 E010AC98 D7BC00C0 */ ldc1 $f28, 0xC0($sp) /* 3E503C E010AC9C D7BA00B8 */ ldc1 $f26, 0xB8($sp) /* 3E5040 E010ACA0 D7B800B0 */ ldc1 $f24, 0xB0($sp) /* 3E5044 E010ACA4 D7B600A8 */ ldc1 $f22, 0xA8($sp) /* 3E5048 E010ACA8 D7B400A0 */ ldc1 $f20, 0xA0($sp) /* 3E504C E010ACAC 03E00008 */ jr $ra /* 3E5050 E010ACB0 27BD00D0 */ addiu $sp, $sp, 0xD0 /* 3E5054 E010ACB4 00000000 */ nop /* 3E5058 E010ACB8 00000000 */ nop /* 3E505C E010ACBC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void firework_rocket_appendGfx(void* effect) { FireworkRocketFXData* data = ((EffectInstance*)effect)->data.fireworkRocket; Camera* camera = &gCameras[gCurrentCameraID]; s32 minBlurAlpha = data->minBlurAlpha; s32 variation = data->variation; f32 mtx_0_0, mtx_0_1, mtx_0_2, mtx_0_3; f32 mtx_1_0, mtx_1_1, mtx_1_2, mtx_1_3; f32 mtx_2_0, mtx_2_1, mtx_2_2, mtx_2_3; f32 mtx_3_0, mtx_3_1, mtx_3_2, mtx_3_3; f32 sinTheta, cosTheta; f32 centerX, centerY, centerZ; f32 negYaw; f32 x, y, z; f32 outX, outY, outZ, outS; f32 radius; s32 isExploded; s32 numSparks; Vec3b* sparkDir; s32 i; negYaw = -camera->currentYaw; sinTheta = shim_sin_deg(negYaw); cosTheta = shim_cos_deg(negYaw); isExploded = data->isExploded; if (firework_rocket_frame_counter != gGameStatusPtr->frameCounter) { // draw previous frame to create motion blur effect shim_draw_prev_frame_buffer_at_screen_pos(10, 10, SCREEN_WIDTH - 10, SCREEN_HEIGHT - 10, firework_rocket_blur_alpha * 0.8); firework_rocket_frame_counter = gGameStatusPtr->frameCounter; firework_rocket_blur_alpha = 0; } if (firework_rocket_blur_alpha < minBlurAlpha) { firework_rocket_blur_alpha = minBlurAlpha; } gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); mtx_0_0 = camera->perspectiveMatrix[0][0]; mtx_0_1 = camera->perspectiveMatrix[0][1]; mtx_0_2 = camera->perspectiveMatrix[0][2]; mtx_0_3 = camera->perspectiveMatrix[0][3]; mtx_1_0 = camera->perspectiveMatrix[1][0]; mtx_1_1 = camera->perspectiveMatrix[1][1]; mtx_1_2 = camera->perspectiveMatrix[1][2]; mtx_1_3 = camera->perspectiveMatrix[1][3]; mtx_2_0 = camera->perspectiveMatrix[2][0]; mtx_2_1 = camera->perspectiveMatrix[2][1]; mtx_2_2 = camera->perspectiveMatrix[2][2]; mtx_2_3 = camera->perspectiveMatrix[2][3]; mtx_3_0 = camera->perspectiveMatrix[3][0]; mtx_3_1 = camera->perspectiveMatrix[3][1]; mtx_3_2 = camera->perspectiveMatrix[3][2]; mtx_3_3 = camera->perspectiveMatrix[3][3]; gSPDisplayList(gMainGfxPos++, D_E010ACCC[variation]); centerX = data->pos.x; centerY = data->pos.y; centerZ = data->pos.z; radius = data->radius; gDPSetPrimColor(gMainGfxPos++, 0, 0, data->r, data->g, data->b, minBlurAlpha); gDPSetEnvColor(gMainGfxPos++, data->r, data->g, data->b, 0); if (isExploded == TRUE) { sparkDir = D_E010AF68[variation].sparks; numSparks = D_E010AF68[variation].num; } else { sparkDir = NULL; numSparks = 4; } for (i = 0; i < numSparks; i++, sparkDir++) { if (isExploded == TRUE) { // create blinking effect if (shim_rand_int(16) < 6) { continue; } x = (sparkDir->x * cosTheta + sparkDir->z * sinTheta) * radius + centerX; y = sparkDir->y * radius + centerY; z = (-sparkDir->x * sinTheta + sparkDir->z * cosTheta) * radius + centerZ; } else { x = data->rocketX[i]; y = data->rocketY[i]; z = data->rocketZ[i]; } // convert world coords to screen coords outX = mtx_0_0 * x + mtx_1_0 * y + mtx_2_0 * z + mtx_3_0; outY = mtx_0_1 * x + mtx_1_1 * y + mtx_2_1 * z + mtx_3_1; outZ = mtx_0_2 * x + mtx_1_2 * y + mtx_2_2 * z + mtx_3_2; outS = mtx_0_3 * x + mtx_1_3 * y + mtx_2_3 * z + mtx_3_3; if (outS != 0.0f) { outS = 1.0f / outS; x = outX * outS; y = -outY * outS; z = outZ * outS; if (z <= -1.0f || x <= -1.0f || x >= 1.0f || y <= -1.0f || y >= 1.0f) { continue; } z = 4.0f; // required to match x = (x + 1.0f) * camera->viewportW * 0.5; x += camera->viewportStartX; x *= 4.0f; y = (y + 1.0f) * camera->viewportH * 0.5; y += camera->viewportStartY; y *= 4.0f; gSPScisTextureRectangle(gMainGfxPos++, x, y, x + 8.0f, y + 8.0f, G_TX_RENDERTILE, 4 << 5, 4 << 5, 16 << 10, 16 << 10); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel motion_blur_flame_appendGfx /* 3A2BCC E00A223C 27BDFF60 */ addiu $sp, $sp, -0xA0 /* 3A2BD0 E00A2240 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3A2BD4 E00A2244 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3A2BD8 E00A2248 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3A2BDC E00A224C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3A2BE0 E00A2250 AFB00078 */ sw $s0, 0x78($sp) /* 3A2BE4 E00A2254 0040802D */ daddu $s0, $v0, $zero /* 3A2BE8 E00A2258 AFB60090 */ sw $s6, 0x90($sp) /* 3A2BEC E00A225C 3C16F510 */ lui $s6, (0xF5100100 >> 16) /* 3A2BF0 E00A2260 36D60100 */ ori $s6, $s6, (0xF5100100 & 0xFFFF) /* 3A2BF4 E00A2264 AFBF009C */ sw $ra, 0x9C($sp) /* 3A2BF8 E00A2268 AFBE0098 */ sw $fp, 0x98($sp) /* 3A2BFC E00A226C AFB70094 */ sw $s7, 0x94($sp) /* 3A2C00 E00A2270 AFB5008C */ sw $s5, 0x8C($sp) /* 3A2C04 E00A2274 AFB40088 */ sw $s4, 0x88($sp) /* 3A2C08 E00A2278 AFB30084 */ sw $s3, 0x84($sp) /* 3A2C0C E00A227C AFB20080 */ sw $s2, 0x80($sp) /* 3A2C10 E00A2280 AFB1007C */ sw $s1, 0x7C($sp) /* 3A2C14 E00A2284 AFB60060 */ sw $s6, 0x60($sp) /* 3A2C18 E00A2288 8E050000 */ lw $a1, 0x0($s0) /* 3A2C1C E00A228C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3A2C20 E00A2290 AFA0006C */ sw $zero, 0x6C($sp) /* 3A2C24 E00A2294 8C94000C */ lw $s4, 0xC($a0) /* 3A2C28 E00A2298 00A0182D */ daddu $v1, $a1, $zero /* 3A2C2C E00A229C 24A50008 */ addiu $a1, $a1, 0x8 /* 3A2C30 E00A22A0 AE050000 */ sw $a1, 0x0($s0) /* 3A2C34 E00A22A4 8E860000 */ lw $a2, 0x0($s4) /* 3A2C38 E00A22A8 8E96004C */ lw $s6, 0x4C($s4) /* 3A2C3C E00A22AC 0280B82D */ daddu $s7, $s4, $zero /* 3A2C40 E00A22B0 AFB60050 */ sw $s6, 0x50($sp) /* 3A2C44 E00A22B4 AC620000 */ sw $v0, 0x0($v1) /* 3A2C48 E00A22B8 24A20008 */ addiu $v0, $a1, 0x8 /* 3A2C4C E00A22BC AC600004 */ sw $zero, 0x4($v1) /* 3A2C50 E00A22C0 AE020000 */ sw $v0, 0x0($s0) /* 3A2C54 E00A22C4 ACA70000 */ sw $a3, 0x0($a1) /* 3A2C58 E00A22C8 8C830010 */ lw $v1, 0x10($a0) /* 3A2C5C E00A22CC 24A20010 */ addiu $v0, $a1, 0x10 /* 3A2C60 E00A22D0 AE020000 */ sw $v0, 0x0($s0) /* 3A2C64 E00A22D4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3A2C68 E00A22D8 8C63001C */ lw $v1, 0x1C($v1) /* 3A2C6C E00A22DC 3C04E00A */ lui $a0, %hi(D_E00A29DC) /* 3A2C70 E00A22E0 248429DC */ addiu $a0, $a0, %lo(D_E00A29DC) /* 3A2C74 E00A22E4 ACA20008 */ sw $v0, 0x8($a1) /* 3A2C78 E00A22E8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3A2C7C E00A22EC 00621821 */ addu $v1, $v1, $v0 /* 3A2C80 E00A22F0 00061040 */ sll $v0, $a2, 1 /* 3A2C84 E00A22F4 00461021 */ addu $v0, $v0, $a2 /* 3A2C88 E00A22F8 000210C0 */ sll $v0, $v0, 3 /* 3A2C8C E00A22FC 00063080 */ sll $a2, $a2, 2 /* 3A2C90 E00A2300 ACA30004 */ sw $v1, 0x4($a1) /* 3A2C94 E00A2304 3C03E00A */ lui $v1, (0xE00A29D0 >> 16) /* 3A2C98 E00A2308 00661821 */ addu $v1, $v1, $a2 /* 3A2C9C E00A230C 8C6329D0 */ lw $v1, (0xE00A29D0 & 0xFFFF)($v1) /* 3A2CA0 E00A2310 00448821 */ addu $s1, $v0, $a0 /* 3A2CA4 E00A2314 ACA3000C */ sw $v1, 0xC($a1) .LE00A2318: /* 3A2CA8 E00A2318 C6EC001C */ lwc1 $f12, 0x1C($s7) /* 3A2CAC E00A231C C6EE002C */ lwc1 $f14, 0x2C($s7) /* 3A2CB0 E00A2320 C6E0003C */ lwc1 $f0, 0x3C($s7) /* 3A2CB4 E00A2324 8E350010 */ lw $s5, 0x10($s1) /* 3A2CB8 E00A2328 8E320014 */ lw $s2, 0x14($s1) /* 3A2CBC E00A232C 56F4000A */ bnel $s7, $s4, .LE00A2358 /* 3A2CC0 E00A2330 E7AC0048 */ swc1 $f12, 0x48($sp) /* 3A2CC4 E00A2334 27A20048 */ addiu $v0, $sp, 0x48 /* 3A2CC8 E00A2338 AFA20010 */ sw $v0, 0x10($sp) /* 3A2CCC E00A233C 27A2004C */ addiu $v0, $sp, 0x4C /* 3A2CD0 E00A2340 44060000 */ mfc1 $a2, $f0 /* 3A2CD4 E00A2344 2407FFFF */ addiu $a3, $zero, -0x1 /* 3A2CD8 E00A2348 0C08015C */ jal shim_is_point_visible /* 3A2CDC E00A234C AFA20014 */ sw $v0, 0x14($sp) /* 3A2CE0 E00A2350 080288D9 */ j .LE00A2364 /* 3A2CE4 E00A2354 0040302D */ daddu $a2, $v0, $zero .LE00A2358: /* 3A2CE8 E00A2358 4600018D */ trunc.w.s $f6, $f0 /* 3A2CEC E00A235C 44063000 */ mfc1 $a2, $f6 /* 3A2CF0 E00A2360 E7AE004C */ swc1 $f14, 0x4C($sp) .LE00A2364: /* 3A2CF4 E00A2364 8FB6006C */ lw $s6, 0x6C($sp) /* 3A2CF8 E00A2368 03B61021 */ addu $v0, $sp, $s6 /* 3A2CFC E00A236C AC460018 */ sw $a2, 0x18($v0) /* 3A2D00 E00A2370 C7A20048 */ lwc1 $f2, 0x48($sp) /* 3A2D04 E00A2374 E4420028 */ swc1 $f2, 0x28($v0) /* 3A2D08 E00A2378 C7A4004C */ lwc1 $f4, 0x4C($sp) /* 3A2D0C E00A237C 10C0016B */ beqz $a2, .LE00A292C /* 3A2D10 E00A2380 E4440038 */ swc1 $f4, 0x38($v0) /* 3A2D14 E00A2384 44800000 */ mtc1 $zero, $f0 /* 3A2D18 E00A2388 00000000 */ nop /* 3A2D1C E00A238C 4600103C */ c.lt.s $f2, $f0 /* 3A2D20 E00A2390 00000000 */ nop /* 3A2D24 E00A2394 45030166 */ bc1tl .LE00A2930 /* 3A2D28 E00A2398 26F70004 */ addiu $s7, $s7, 0x4 /* 3A2D2C E00A239C 4600203C */ c.lt.s $f4, $f0 /* 3A2D30 E00A23A0 00000000 */ nop /* 3A2D34 E00A23A4 45030162 */ bc1tl .LE00A2930 /* 3A2D38 E00A23A8 26F70004 */ addiu $s7, $s7, 0x4 /* 3A2D3C E00A23AC 3C0143A0 */ lui $at, (0x43A00000 >> 16) /* 3A2D40 E00A23B0 44810000 */ mtc1 $at, $f0 /* 3A2D44 E00A23B4 00000000 */ nop /* 3A2D48 E00A23B8 4602003E */ c.le.s $f0, $f2 /* 3A2D4C E00A23BC 00000000 */ nop /* 3A2D50 E00A23C0 4503015B */ bc1tl .LE00A2930 /* 3A2D54 E00A23C4 26F70004 */ addiu $s7, $s7, 0x4 /* 3A2D58 E00A23C8 3C014370 */ lui $at, (0x43700000 >> 16) /* 3A2D5C E00A23CC 44810000 */ mtc1 $at, $f0 /* 3A2D60 E00A23D0 00000000 */ nop /* 3A2D64 E00A23D4 4604003E */ c.le.s $f0, $f4 /* 3A2D68 E00A23D8 00000000 */ nop /* 3A2D6C E00A23DC 45030154 */ bc1tl .LE00A2930 /* 3A2D70 E00A23E0 26F70004 */ addiu $s7, $s7, 0x4 /* 3A2D74 E00A23E4 3C02E00A */ lui $v0, (0xE00A2A24 >> 16) /* 3A2D78 E00A23E8 00561021 */ addu $v0, $v0, $s6 /* 3A2D7C E00A23EC 8C422A24 */ lw $v0, (0xE00A2A24 & 0xFFFF)($v0) /* 3A2D80 E00A23F0 8FB60050 */ lw $s6, 0x50($sp) /* 3A2D84 E00A23F4 02C20018 */ mult $s6, $v0 /* 3A2D88 E00A23F8 00001012 */ mflo $v0 /* 3A2D8C E00A23FC 3C0351EB */ lui $v1, (0x51EB851F >> 16) /* 3A2D90 E00A2400 3463851F */ ori $v1, $v1, (0x51EB851F & 0xFFFF) /* 3A2D94 E00A2404 00430018 */ mult $v0, $v1 /* 3A2D98 E00A2408 000217C3 */ sra $v0, $v0, 31 /* 3A2D9C E00A240C 00001810 */ mfhi $v1 /* 3A2DA0 E00A2410 00032143 */ sra $a0, $v1, 5 /* 3A2DA4 E00A2414 8E83005C */ lw $v1, 0x5C($s4) /* 3A2DA8 E00A2418 00822023 */ subu $a0, $a0, $v0 /* 3A2DAC E00A241C 00640018 */ mult $v1, $a0 /* 3A2DB0 E00A2420 00001812 */ mflo $v1 /* 3A2DB4 E00A2424 8E820060 */ lw $v0, 0x60($s4) /* 3A2DB8 E00A2428 00000000 */ nop /* 3A2DBC E00A242C 00440018 */ mult $v0, $a0 /* 3A2DC0 E00A2430 00003812 */ mflo $a3 /* 3A2DC4 E00A2434 8E820064 */ lw $v0, 0x64($s4) /* 3A2DC8 E00A2438 00000000 */ nop /* 3A2DCC E00A243C 00440018 */ mult $v0, $a0 /* 3A2DD0 E00A2440 00004812 */ mflo $t1 /* 3A2DD4 E00A2444 8E060000 */ lw $a2, 0x0($s0) /* 3A2DD8 E00A2448 00031A43 */ sra $v1, $v1, 9 /* 3A2DDC E00A244C 00640018 */ mult $v1, $a0 /* 3A2DE0 E00A2450 00C0282D */ daddu $a1, $a2, $zero /* 3A2DE4 E00A2454 24C60008 */ addiu $a2, $a2, 0x8 /* 3A2DE8 E00A2458 AE060000 */ sw $a2, 0x0($s0) /* 3A2DEC E00A245C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3A2DF0 E00A2460 00005812 */ mflo $t3 /* 3A2DF4 E00A2464 ACA20000 */ sw $v0, 0x0($a1) /* 3A2DF8 E00A2468 00071243 */ sra $v0, $a3, 9 /* 3A2DFC E00A246C 00440018 */ mult $v0, $a0 /* 3A2E00 E00A2470 246A0020 */ addiu $t2, $v1, 0x20 /* 3A2E04 E00A2474 24480020 */ addiu $t0, $v0, 0x20 /* 3A2E08 E00A2478 00091243 */ sra $v0, $t1, 9 /* 3A2E0C E00A247C 24490020 */ addiu $t1, $v0, 0x20 /* 3A2E10 E00A2480 00003812 */ mflo $a3 /* 3A2E14 E00A2484 000B1A03 */ sra $v1, $t3, 8 /* 3A2E18 E00A2488 00031E00 */ sll $v1, $v1, 24 /* 3A2E1C E00A248C 00440018 */ mult $v0, $a0 /* 3A2E20 E00A2490 00071203 */ sra $v0, $a3, 8 /* 3A2E24 E00A2494 304200FF */ andi $v0, $v0, 0xFF /* 3A2E28 E00A2498 00021400 */ sll $v0, $v0, 16 /* 3A2E2C E00A249C 00621825 */ or $v1, $v1, $v0 /* 3A2E30 E00A24A0 00005812 */ mflo $t3 /* 3A2E34 E00A24A4 3162FF00 */ andi $v0, $t3, 0xFF00 /* 3A2E38 E00A24A8 00621825 */ or $v1, $v1, $v0 /* 3A2E3C E00A24AC 346300FF */ ori $v1, $v1, 0xFF /* 3A2E40 E00A24B0 29420080 */ slti $v0, $t2, 0x80 /* 3A2E44 E00A24B4 14400002 */ bnez $v0, .LE00A24C0 /* 3A2E48 E00A24B8 ACA30004 */ sw $v1, 0x4($a1) /* 3A2E4C E00A24BC 240A007F */ addiu $t2, $zero, 0x7F .LE00A24C0: /* 3A2E50 E00A24C0 29020080 */ slti $v0, $t0, 0x80 /* 3A2E54 E00A24C4 50400001 */ beql $v0, $zero, .LE00A24CC /* 3A2E58 E00A24C8 2408007F */ addiu $t0, $zero, 0x7F .LE00A24CC: /* 3A2E5C E00A24CC 29220080 */ slti $v0, $t1, 0x80 /* 3A2E60 E00A24D0 50400001 */ beql $v0, $zero, .LE00A24D8 /* 3A2E64 E00A24D4 2409007F */ addiu $t1, $zero, 0x7F .LE00A24D8: /* 3A2E68 E00A24D8 0000282D */ daddu $a1, $zero, $zero /* 3A2E6C E00A24DC 24C20008 */ addiu $v0, $a2, 0x8 /* 3A2E70 E00A24E0 AE020000 */ sw $v0, 0x0($s0) /* 3A2E74 E00A24E4 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3A2E78 E00A24E8 000A1E00 */ sll $v1, $t2, 24 /* 3A2E7C E00A24EC ACC20000 */ sw $v0, 0x0($a2) /* 3A2E80 E00A24F0 310200FF */ andi $v0, $t0, 0xFF /* 3A2E84 E00A24F4 00021400 */ sll $v0, $v0, 16 /* 3A2E88 E00A24F8 00621825 */ or $v1, $v1, $v0 /* 3A2E8C E00A24FC 312200FF */ andi $v0, $t1, 0xFF /* 3A2E90 E00A2500 00021200 */ sll $v0, $v0, 8 /* 3A2E94 E00A2504 00621825 */ or $v1, $v1, $v0 /* 3A2E98 E00A2508 C7A00048 */ lwc1 $f0, 0x48($sp) /* 3A2E9C E00A250C 44952000 */ mtc1 $s5, $f4 /* 3A2EA0 E00A2510 00000000 */ nop /* 3A2EA4 E00A2514 46802120 */ cvt.s.w $f4, $f4 /* 3A2EA8 E00A2518 ACC30004 */ sw $v1, 0x4($a2) /* 3A2EAC E00A251C 46040001 */ sub.s $f0, $f0, $f4 /* 3A2EB0 E00A2520 C7A2004C */ lwc1 $f2, 0x4C($sp) /* 3A2EB4 E00A2524 00151840 */ sll $v1, $s5, 1 /* 3A2EB8 E00A2528 46041081 */ sub.s $f2, $f2, $f4 /* 3A2EBC E00A252C 4600018D */ trunc.w.s $f6, $f0 /* 3A2EC0 E00A2530 44133000 */ mfc1 $s3, $f6 /* 3A2EC4 E00A2534 00000000 */ nop /* 3A2EC8 E00A2538 02637021 */ addu $t6, $s3, $v1 /* 3A2ECC E00A253C 4600118D */ trunc.w.s $f6, $f2 /* 3A2ED0 E00A2540 44023000 */ mfc1 $v0, $f6 /* 3A2ED4 E00A2544 00000000 */ nop /* 3A2ED8 E00A2548 00432021 */ addu $a0, $v0, $v1 /* 3A2EDC E00A254C 06610002 */ bgez $s3, .LE00A2558 /* 3A2EE0 E00A2550 0040582D */ daddu $t3, $v0, $zero /* 3A2EE4 E00A2554 00132823 */ negu $a1, $s3 .LE00A2558: /* 3A2EE8 E00A2558 05610002 */ bgez $t3, .LE00A2564 /* 3A2EEC E00A255C 0000182D */ daddu $v1, $zero, $zero /* 3A2EF0 E00A2560 000B1823 */ negu $v1, $t3 .LE00A2564: /* 3A2EF4 E00A2564 29C20141 */ slti $v0, $t6, 0x141 /* 3A2EF8 E00A2568 50400001 */ beql $v0, $zero, .LE00A2570 /* 3A2EFC E00A256C 240E013F */ addiu $t6, $zero, 0x13F .LE00A2570: /* 3A2F00 E00A2570 288200F1 */ slti $v0, $a0, 0xF1 /* 3A2F04 E00A2574 50400001 */ beql $v0, $zero, .LE00A257C /* 3A2F08 E00A2578 240400EF */ addiu $a0, $zero, 0xEF .LE00A257C: /* 3A2F0C E00A257C 16400002 */ bnez $s2, .LE00A2588 /* 3A2F10 E00A2580 0072001A */ div $zero, $v1, $s2 /* 3A2F14 E00A2584 0007000D */ break 7 .LE00A2588: /* 3A2F18 E00A2588 2401FFFF */ addiu $at, $zero, -0x1 /* 3A2F1C E00A258C 16410004 */ bne $s2, $at, .LE00A25A0 /* 3A2F20 E00A2590 3C018000 */ lui $at, (0x80000000 >> 16) /* 3A2F24 E00A2594 14610002 */ bne $v1, $at, .LE00A25A0 /* 3A2F28 E00A2598 00000000 */ nop /* 3A2F2C E00A259C 0006000D */ break 6 .LE00A25A0: /* 3A2F30 E00A25A0 00005012 */ mflo $t2 /* 3A2F34 E00A25A4 008B1023 */ subu $v0, $a0, $t3 /* 3A2F38 E00A25A8 16400002 */ bnez $s2, .LE00A25B4 /* 3A2F3C E00A25AC 0052001A */ div $zero, $v0, $s2 /* 3A2F40 E00A25B0 0007000D */ break 7 .LE00A25B4: /* 3A2F44 E00A25B4 2401FFFF */ addiu $at, $zero, -0x1 /* 3A2F48 E00A25B8 16410004 */ bne $s2, $at, .LE00A25CC /* 3A2F4C E00A25BC 3C018000 */ lui $at, (0x80000000 >> 16) /* 3A2F50 E00A25C0 14410002 */ bne $v0, $at, .LE00A25CC /* 3A2F54 E00A25C4 00000000 */ nop /* 3A2F58 E00A25C8 0006000D */ break 6 .LE00A25CC: /* 3A2F5C E00A25CC 0000B012 */ mflo $s6 /* 3A2F60 E00A25D0 0156102A */ slt $v0, $t2, $s6 /* 3A2F64 E00A25D4 104000D5 */ beqz $v0, .LE00A292C /* 3A2F68 E00A25D8 AFB60054 */ sw $s6, 0x54($sp) /* 3A2F6C E00A25DC 01520018 */ mult $t2, $s2 /* 3A2F70 E00A25E0 0265A821 */ addu $s5, $s3, $a1 /* 3A2F74 E00A25E4 01D51023 */ subu $v0, $t6, $s5 /* 3A2F78 E00A25E8 00021040 */ sll $v0, $v0, 1 /* 3A2F7C E00A25EC AFA2005C */ sw $v0, 0x5C($sp) /* 3A2F80 E00A25F0 0000B012 */ mflo $s6 /* 3A2F84 E00A25F4 02CB4821 */ addu $t1, $s6, $t3 .LE00A25F8: /* 3A2F88 E00A25F8 01321021 */ addu $v0, $t1, $s2 /* 3A2F8C E00A25FC 284200F0 */ slti $v0, $v0, 0xF0 /* 3A2F90 E00A2600 104000CA */ beqz $v0, .LE00A292C /* 3A2F94 E00A2604 0120582D */ daddu $t3, $t1, $zero /* 3A2F98 E00A2608 00093080 */ sll $a2, $t1, 2 /* 3A2F9C E00A260C 00C91021 */ addu $v0, $a2, $t1 /* 3A2FA0 E00A2610 000211C0 */ sll $v0, $v0, 7 /* 3A2FA4 E00A2614 8FB6005C */ lw $s6, 0x5C($sp) /* 3A2FA8 E00A2618 44932000 */ mtc1 $s3, $f4 /* 3A2FAC E00A261C 00000000 */ nop /* 3A2FB0 E00A2620 46802120 */ cvt.s.w $f4, $f4 /* 3A2FB4 E00A2624 AFA20058 */ sw $v0, 0x58($sp) /* 3A2FB8 E00A2628 26C20007 */ addiu $v0, $s6, 0x7 /* 3A2FBC E00A262C 000210C3 */ sra $v0, $v0, 3 /* 3A2FC0 E00A2630 304201FF */ andi $v0, $v0, 0x1FF /* 3A2FC4 E00A2634 8FB60060 */ lw $s6, 0x60($sp) /* 3A2FC8 E00A2638 00021240 */ sll $v0, $v0, 9 /* 3A2FCC E00A263C 00567825 */ or $t7, $v0, $s6 /* 3A2FD0 E00A2640 00151080 */ sll $v0, $s5, 2 /* 3A2FD4 E00A2644 30420FFF */ andi $v0, $v0, 0xFFF /* 3A2FD8 E00A2648 00026B00 */ sll $t5, $v0, 12 /* 3A2FDC E00A264C 3C16F400 */ lui $s6, (0xF4000000 >> 16) /* 3A2FE0 E00A2650 01B6B025 */ or $s6, $t5, $s6 /* 3A2FE4 E00A2654 25C2FFFF */ addiu $v0, $t6, -0x1 /* 3A2FE8 E00A2658 00021080 */ sll $v0, $v0, 2 /* 3A2FEC E00A265C 30420FFF */ andi $v0, $v0, 0xFFF /* 3A2FF0 E00A2660 0002CB00 */ sll $t9, $v0, 12 /* 3A2FF4 E00A2664 2642FFFF */ addiu $v0, $s2, -0x1 /* 3A2FF8 E00A2668 00021080 */ sll $v0, $v0, 2 /* 3A2FFC E00A266C 30580FFF */ andi $t8, $v0, 0xFFF /* 3A3000 E00A2670 3C020700 */ lui $v0, (0x7000000 >> 16) /* 3A3004 E00A2674 03021025 */ or $v0, $t8, $v0 /* 3A3008 E00A2678 AFB60064 */ sw $s6, 0x64($sp) /* 3A300C E00A267C C6200008 */ lwc1 $f0, 0x8($s1) /* 3A3010 E00A2680 03221025 */ or $v0, $t9, $v0 /* 3A3014 E00A2684 46002002 */ mul.s $f0, $f4, $f0 /* 3A3018 E00A2688 00000000 */ nop /* 3A301C E00A268C AFA20068 */ sw $v0, 0x68($sp) /* 3A3020 E00A2690 8E220014 */ lw $v0, 0x14($s1) /* 3A3024 E00A2694 8E050000 */ lw $a1, 0x0($s0) /* 3A3028 E00A2698 8E230004 */ lw $v1, 0x4($s1) /* 3A302C E00A269C 01420018 */ mult $t2, $v0 /* 3A3030 E00A26A0 00A0382D */ daddu $a3, $a1, $zero /* 3A3034 E00A26A4 00031080 */ sll $v0, $v1, 2 /* 3A3038 E00A26A8 00431021 */ addu $v0, $v0, $v1 /* 3A303C E00A26AC 4600018D */ trunc.w.s $f6, $f0 /* 3A3040 E00A26B0 44043000 */ mfc1 $a0, $f6 /* 3A3044 E00A26B4 0000B012 */ mflo $s6 /* 3A3048 E00A26B8 C620000C */ lwc1 $f0, 0xC($s1) /* 3A304C E00A26BC 44961000 */ mtc1 $s6, $f2 /* 3A3050 E00A26C0 00000000 */ nop /* 3A3054 E00A26C4 468010A0 */ cvt.s.w $f2, $f2 /* 3A3058 E00A26C8 46001082 */ mul.s $f2, $f2, $f0 /* 3A305C E00A26CC 00000000 */ nop /* 3A3060 E00A26D0 00021080 */ sll $v0, $v0, 2 /* 3A3064 E00A26D4 24A50008 */ addiu $a1, $a1, 0x8 /* 3A3068 E00A26D8 00042080 */ sll $a0, $a0, 2 /* 3A306C E00A26DC 44820000 */ mtc1 $v0, $f0 /* 3A3070 E00A26E0 00000000 */ nop /* 3A3074 E00A26E4 46800020 */ cvt.s.w $f0, $f0 /* 3A3078 E00A26E8 46020001 */ sub.s $f0, $f0, $f2 /* 3A307C E00A26EC 30840FFF */ andi $a0, $a0, 0xFFF /* 3A3080 E00A26F0 00042300 */ sll $a0, $a0, 12 /* 3A3084 E00A26F4 4600018D */ trunc.w.s $f6, $f0 /* 3A3088 E00A26F8 44023000 */ mfc1 $v0, $f6 /* 3A308C E00A26FC 00000000 */ nop /* 3A3090 E00A2700 00021080 */ sll $v0, $v0, 2 /* 3A3094 E00A2704 30420FFF */ andi $v0, $v0, 0xFFF /* 3A3098 E00A2708 3C16F200 */ lui $s6, (0xF2000000 >> 16) /* 3A309C E00A270C 00561025 */ or $v0, $v0, $s6 /* 3A30A0 E00A2710 00822025 */ or $a0, $a0, $v0 /* 3A30A4 E00A2714 32A201FF */ andi $v0, $s5, 0x1FF /* 3A30A8 E00A2718 ACE40000 */ sw $a0, 0x0($a3) /* 3A30AC E00A271C C6200008 */ lwc1 $f0, 0x8($s1) /* 3A30B0 E00A2720 00021540 */ sll $v0, $v0, 21 /* 3A30B4 E00A2724 AFA20070 */ sw $v0, 0x70($sp) /* 3A30B8 E00A2728 46002102 */ mul.s $f4, $f4, $f0 /* 3A30BC E00A272C 00000000 */ nop /* 3A30C0 E00A2730 C6200000 */ lwc1 $f0, 0x0($s1) /* 3A30C4 E00A2734 46800020 */ cvt.s.w $f0, $f0 /* 3A30C8 E00A2738 AE050000 */ sw $a1, 0x0($s0) /* 3A30CC E00A273C 8E220014 */ lw $v0, 0x14($s1) /* 3A30D0 E00A2740 01420018 */ mult $t2, $v0 /* 3A30D4 E00A2744 0000602D */ daddu $t4, $zero, $zero /* 3A30D8 E00A2748 30C60FFF */ andi $a2, $a2, 0xFFF /* 3A30DC E00A274C 01A6F025 */ or $fp, $t5, $a2 /* 3A30E0 E00A2750 8E240004 */ lw $a0, 0x4($s1) /* 3A30E4 E00A2754 46002100 */ add.s $f4, $f4, $f0 /* 3A30E8 E00A2758 00041080 */ sll $v0, $a0, 2 /* 3A30EC E00A275C 00441021 */ addu $v0, $v0, $a0 /* 3A30F0 E00A2760 4600218D */ trunc.w.s $f6, $f4 /* 3A30F4 E00A2764 44033000 */ mfc1 $v1, $f6 /* 3A30F8 E00A2768 0000B012 */ mflo $s6 /* 3A30FC E00A276C C620000C */ lwc1 $f0, 0xC($s1) /* 3A3100 E00A2770 44961000 */ mtc1 $s6, $f2 /* 3A3104 E00A2774 00000000 */ nop /* 3A3108 E00A2778 468010A0 */ cvt.s.w $f2, $f2 /* 3A310C E00A277C 46001082 */ mul.s $f2, $f2, $f0 /* 3A3110 E00A2780 00000000 */ nop /* 3A3114 E00A2784 00021080 */ sll $v0, $v0, 2 /* 3A3118 E00A2788 00441021 */ addu $v0, $v0, $a0 /* 3A311C E00A278C 00031880 */ sll $v1, $v1, 2 /* 3A3120 E00A2790 44820000 */ mtc1 $v0, $f0 /* 3A3124 E00A2794 00000000 */ nop /* 3A3128 E00A2798 46800020 */ cvt.s.w $f0, $f0 /* 3A312C E00A279C 46020001 */ sub.s $f0, $f0, $f2 /* 3A3130 E00A27A0 30630FFF */ andi $v1, $v1, 0xFFF /* 3A3134 E00A27A4 00031B00 */ sll $v1, $v1, 12 /* 3A3138 E00A27A8 4600018D */ trunc.w.s $f6, $f0 /* 3A313C E00A27AC 44023000 */ mfc1 $v0, $f6 /* 3A3140 E00A27B0 00000000 */ nop /* 3A3144 E00A27B4 00021080 */ sll $v0, $v0, 2 /* 3A3148 E00A27B8 30420FFF */ andi $v0, $v0, 0xFFF /* 3A314C E00A27BC 00621825 */ or $v1, $v1, $v0 /* 3A3150 E00A27C0 ACE30004 */ sw $v1, 0x4($a3) .LE00A27C4: /* 3A3154 E00A27C4 3C02FD10 */ lui $v0, (0xFD10013F >> 16) /* 3A3158 E00A27C8 3442013F */ ori $v0, $v0, (0xFD10013F & 0xFFFF) /* 3A315C E00A27CC 3C060702 */ lui $a2, (0x7020090 >> 16) /* 3A3160 E00A27D0 34C60090 */ ori $a2, $a2, (0x7020090 & 0xFFFF) /* 3A3164 E00A27D4 3C070102 */ lui $a3, (0x1020090 >> 16) /* 3A3168 E00A27D8 34E70090 */ ori $a3, $a3, (0x1020090 & 0xFFFF) /* 3A316C E00A27DC 3C080400 */ lui $t0, (0x4000400 >> 16) /* 3A3170 E00A27E0 35080400 */ ori $t0, $t0, (0x4000400 & 0xFFFF) /* 3A3174 E00A27E4 258C0001 */ addiu $t4, $t4, 0x1 /* 3A3178 E00A27E8 8E050000 */ lw $a1, 0x0($s0) /* 3A317C E00A27EC 3C03800A */ lui $v1, %hi(nuGfxCfb_ptr) /* 3A3180 E00A27F0 8C63A64C */ lw $v1, %lo(nuGfxCfb_ptr)($v1) /* 3A3184 E00A27F4 00A0202D */ daddu $a0, $a1, $zero /* 3A3188 E00A27F8 24A50008 */ addiu $a1, $a1, 0x8 /* 3A318C E00A27FC AE050000 */ sw $a1, 0x0($s0) /* 3A3190 E00A2800 AC820000 */ sw $v0, 0x0($a0) /* 3A3194 E00A2804 8FB60058 */ lw $s6, 0x58($sp) /* 3A3198 E00A2808 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3A319C E00A280C 00761821 */ addu $v1, $v1, $s6 /* 3A31A0 E00A2810 00621821 */ addu $v1, $v1, $v0 /* 3A31A4 E00A2814 24A20008 */ addiu $v0, $a1, 0x8 /* 3A31A8 E00A2818 AC830004 */ sw $v1, 0x4($a0) /* 3A31AC E00A281C AE020000 */ sw $v0, 0x0($s0) /* 3A31B0 E00A2820 24A20010 */ addiu $v0, $a1, 0x10 /* 3A31B4 E00A2824 ACAF0000 */ sw $t7, 0x0($a1) /* 3A31B8 E00A2828 ACA60004 */ sw $a2, 0x4($a1) /* 3A31BC E00A282C AE020000 */ sw $v0, 0x0($s0) /* 3A31C0 E00A2830 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 3A31C4 E00A2834 ACA20008 */ sw $v0, 0x8($a1) /* 3A31C8 E00A2838 24A20018 */ addiu $v0, $a1, 0x18 /* 3A31CC E00A283C ACA0000C */ sw $zero, 0xC($a1) /* 3A31D0 E00A2840 AE020000 */ sw $v0, 0x0($s0) /* 3A31D4 E00A2844 24A20020 */ addiu $v0, $a1, 0x20 /* 3A31D8 E00A2848 000E2080 */ sll $a0, $t6, 2 /* 3A31DC E00A284C 30840FFF */ andi $a0, $a0, 0xFFF /* 3A31E0 E00A2850 8FB60064 */ lw $s6, 0x64($sp) /* 3A31E4 E00A2854 00042300 */ sll $a0, $a0, 12 /* 3A31E8 E00A2858 ACB60010 */ sw $s6, 0x10($a1) /* 3A31EC E00A285C 8FB60068 */ lw $s6, 0x68($sp) /* 3A31F0 E00A2860 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* 3A31F4 E00A2864 ACB60014 */ sw $s6, 0x14($a1) /* 3A31F8 E00A2868 3C16E700 */ lui $s6, (0xE7000000 >> 16) /* 3A31FC E00A286C AE020000 */ sw $v0, 0x0($s0) /* 3A3200 E00A2870 24A20028 */ addiu $v0, $a1, 0x28 /* 3A3204 E00A2874 ACB60018 */ sw $s6, 0x18($a1) /* 3A3208 E00A2878 ACA0001C */ sw $zero, 0x1C($a1) /* 3A320C E00A287C AE020000 */ sw $v0, 0x0($s0) /* 3A3210 E00A2880 24A20030 */ addiu $v0, $a1, 0x30 /* 3A3214 E00A2884 3C16F200 */ lui $s6, (0xF2000000 >> 16) /* 3A3218 E00A2888 ACAF0020 */ sw $t7, 0x20($a1) /* 3A321C E00A288C ACA70024 */ sw $a3, 0x24($a1) /* 3A3220 E00A2890 AE020000 */ sw $v0, 0x0($s0) /* 3A3224 E00A2894 01B61025 */ or $v0, $t5, $s6 /* 3A3228 E00A2898 ACA20028 */ sw $v0, 0x28($a1) /* 3A322C E00A289C 3C020100 */ lui $v0, (0x1000000 >> 16) /* 3A3230 E00A28A0 03021025 */ or $v0, $t8, $v0 /* 3A3234 E00A28A4 03221025 */ or $v0, $t9, $v0 /* 3A3238 E00A28A8 ACA2002C */ sw $v0, 0x2C($a1) /* 3A323C E00A28AC 24A20038 */ addiu $v0, $a1, 0x38 /* 3A3240 E00A28B0 AE020000 */ sw $v0, 0x0($s0) /* 3A3244 E00A28B4 01721021 */ addu $v0, $t3, $s2 /* 3A3248 E00A28B8 00021080 */ sll $v0, $v0, 2 /* 3A324C E00A28BC 30420FFF */ andi $v0, $v0, 0xFFF /* 3A3250 E00A28C0 00431025 */ or $v0, $v0, $v1 /* 3A3254 E00A28C4 00822025 */ or $a0, $a0, $v0 /* 3A3258 E00A28C8 24A20040 */ addiu $v0, $a1, 0x40 /* 3A325C E00A28CC ACA40030 */ sw $a0, 0x30($a1) /* 3A3260 E00A28D0 ACBE0034 */ sw $fp, 0x34($a1) /* 3A3264 E00A28D4 AE020000 */ sw $v0, 0x0($s0) /* 3A3268 E00A28D8 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 3A326C E00A28DC ACA20038 */ sw $v0, 0x38($a1) /* 3A3270 E00A28E0 8FB60070 */ lw $s6, 0x70($sp) /* 3A3274 E00A28E4 24A20048 */ addiu $v0, $a1, 0x48 /* 3A3278 E00A28E8 ACB6003C */ sw $s6, 0x3C($a1) /* 3A327C E00A28EC AE020000 */ sw $v0, 0x0($s0) /* 3A3280 E00A28F0 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* 3A3284 E00A28F4 ACA20040 */ sw $v0, 0x40($a1) /* 3A3288 E00A28F8 24A20050 */ addiu $v0, $a1, 0x50 /* 3A328C E00A28FC ACA80044 */ sw $t0, 0x44($a1) /* 3A3290 E00A2900 AE020000 */ sw $v0, 0x0($s0) /* 3A3294 E00A2904 3C16E700 */ lui $s6, (0xE7000000 >> 16) /* 3A3298 E00A2908 29820002 */ slti $v0, $t4, 0x2 /* 3A329C E00A290C ACB60048 */ sw $s6, 0x48($a1) /* 3A32A0 E00A2910 1440FFAC */ bnez $v0, .LE00A27C4 /* 3A32A4 E00A2914 ACA0004C */ sw $zero, 0x4C($a1) /* 3A32A8 E00A2918 8FB60054 */ lw $s6, 0x54($sp) /* 3A32AC E00A291C 254A0001 */ addiu $t2, $t2, 0x1 /* 3A32B0 E00A2920 0156102A */ slt $v0, $t2, $s6 /* 3A32B4 E00A2924 1440FF34 */ bnez $v0, .LE00A25F8 /* 3A32B8 E00A2928 01324821 */ addu $t1, $t1, $s2 .LE00A292C: /* 3A32BC E00A292C 26F70004 */ addiu $s7, $s7, 0x4 .LE00A2930: /* 3A32C0 E00A2930 26820010 */ addiu $v0, $s4, 0x10 /* 3A32C4 E00A2934 8FB6006C */ lw $s6, 0x6C($sp) /* 3A32C8 E00A2938 02E2102A */ slt $v0, $s7, $v0 /* 3A32CC E00A293C 26D60004 */ addiu $s6, $s6, 0x4 /* 3A32D0 E00A2940 1440FE75 */ bnez $v0, .LE00A2318 /* 3A32D4 E00A2944 AFB6006C */ sw $s6, 0x6C($sp) /* 3A32D8 E00A2948 0000182D */ daddu $v1, $zero, $zero /* 3A32DC E00A294C 27A80018 */ addiu $t0, $sp, 0x18 /* 3A32E0 E00A2950 27A70028 */ addiu $a3, $sp, 0x28 /* 3A32E4 E00A2954 27A60038 */ addiu $a2, $sp, 0x38 .LE00A2958: /* 3A32E8 E00A2958 24650001 */ addiu $a1, $v1, 0x1 /* 3A32EC E00A295C 00052080 */ sll $a0, $a1, 2 /* 3A32F0 E00A2960 02842021 */ addu $a0, $s4, $a0 /* 3A32F4 E00A2964 00031880 */ sll $v1, $v1, 2 /* 3A32F8 E00A2968 01031021 */ addu $v0, $t0, $v1 /* 3A32FC E00A296C C4400000 */ lwc1 $f0, 0x0($v0) /* 3A3300 E00A2970 46800020 */ cvt.s.w $f0, $f0 /* 3A3304 E00A2974 00E31021 */ addu $v0, $a3, $v1 /* 3A3308 E00A2978 E480003C */ swc1 $f0, 0x3C($a0) /* 3A330C E00A297C C4400000 */ lwc1 $f0, 0x0($v0) /* 3A3310 E00A2980 00C31821 */ addu $v1, $a2, $v1 /* 3A3314 E00A2984 E480001C */ swc1 $f0, 0x1C($a0) /* 3A3318 E00A2988 C4600000 */ lwc1 $f0, 0x0($v1) /* 3A331C E00A298C 00A0182D */ daddu $v1, $a1, $zero /* 3A3320 E00A2990 28620003 */ slti $v0, $v1, 0x3 /* 3A3324 E00A2994 1440FFF0 */ bnez $v0, .LE00A2958 /* 3A3328 E00A2998 E480002C */ swc1 $f0, 0x2C($a0) /* 3A332C E00A299C 8FBF009C */ lw $ra, 0x9C($sp) /* 3A3330 E00A29A0 8FBE0098 */ lw $fp, 0x98($sp) /* 3A3334 E00A29A4 8FB70094 */ lw $s7, 0x94($sp) /* 3A3338 E00A29A8 8FB60090 */ lw $s6, 0x90($sp) /* 3A333C E00A29AC 8FB5008C */ lw $s5, 0x8C($sp) /* 3A3340 E00A29B0 8FB40088 */ lw $s4, 0x88($sp) /* 3A3344 E00A29B4 8FB30084 */ lw $s3, 0x84($sp) /* 3A3348 E00A29B8 8FB20080 */ lw $s2, 0x80($sp) /* 3A334C E00A29BC 8FB1007C */ lw $s1, 0x7C($sp) /* 3A3350 E00A29C0 8FB00078 */ lw $s0, 0x78($sp) /* 3A3354 E00A29C4 03E00008 */ jr $ra /* 3A3358 E00A29C8 27BD00A0 */ addiu $sp, $sp, 0xA0 /* 3A335C E00A29CC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void motion_blur_flame_appendGfx(void* effect) { MotionBlurFlameFXData* data = ((EffectInstance*)effect)->data.motionBlurFlame; s32 temp_a2 = data->unk_00; f32 sp48; f32 sp4C; s32 sp50 = data->unk_4C; UnkStruct* temp_s1 = &D_E00A29DC[temp_a2]; s32 sp54; // declaration must come after sp50 s32 envR, envG, envB; s32 sp18[4]; f32 sp28[4]; f32 sp38[4]; s32 i; s32 t3; s32 v0; s32 temp_a0; s32 s3; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v1; s32 var_a0; s32 var_a1; s32 var_a2; s32 uly; s32 var_t2_2; s32 var_t4; s32 t6; s32 var_v1; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_E00A29D0[temp_a2]); for (i = 0; i < 4; i++) { f32 temp_f12 = data->unk_1C[i]; f32 temp_f14 = data->unk_2C[i]; f32 temp_f0 = data->unk_3C[i]; s32 temp_s5 = temp_s1->unk_10; s32 height = temp_s1->unk_14; if (i == 0) { var_a2 = shim_is_point_visible(temp_f12, temp_f14, temp_f0, -1, &sp48, &sp4C); } else { var_a2 = temp_f0; sp48 = temp_f12; sp4C = temp_f14; } sp18[i] = var_a2; sp28[i] = sp48; sp38[i] = sp4C; if ((var_a2 != 0) && !(sp48 < 0.0f) && !(sp4C < 0.0f) && !(sp48 >= 320.0f) && !(sp4C >= 240.0f)) { temp_a0 = (sp50 * D_E00A2A24[i]) / 100; temp_v1 = (data->unk_5C * temp_a0) >> 9; temp_v0_2 = (data->unk_60 * temp_a0) >> 9; temp_v0_3 = (data->unk_64 * temp_a0) >> 9; gDPSetPrimColor(gMainGfxPos++, 0, 0, (temp_v1 * temp_a0) >> 8, (temp_v0_2 * temp_a0) >> 8, (temp_v0_3 * temp_a0) >> 8, 255 ); envR = temp_v1 + 32; envG = temp_v0_2 + 32; envB = temp_v0_3 + 32; if (envR > 127) { envR = 127; } if (envG > 127) { envG = 127; } if (envB > 127) { envB = 127; } gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, 0); s3 = sp48 - temp_s5; t6 = s3 + temp_s5 * 2; v0 = sp4C - temp_s5; var_a0 = v0 + 2 * temp_s5; t3 = uly = sp4C - temp_s5; if (s3 < 0) { var_a1 = -s3; } else { var_a1 = 0; } if (t3 < 0) { var_v1 = -uly; } else { var_v1 = 0; } if (t6 > SCREEN_WIDTH) { t6 = SCREEN_WIDTH - 1; } if (var_a0 > SCREEN_HEIGHT) { var_a0 = SCREEN_HEIGHT - 1; } var_t2_2 = var_v1 / height; sp54 = (var_a0 - t3) / height; while (var_t2_2 < sp54) { uly = t3 + var_t2_2 * height; if (uly + height >= SCREEN_HEIGHT) { break; } gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (s32) (s3 * temp_s1->unk_08) * 4, (s32) (temp_s1->unk_04 * 20 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4, (s32) (s3 * temp_s1->unk_08 + temp_s1->unk_00) * 4, (s32) (temp_s1->unk_04 * 21 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4); for (var_t4 = 0; var_t4 < 2; var_t4++) { gDPLoadMultiTile(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + uly * SCREEN_WIDTH), 0x0100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, SCREEN_HEIGHT, s3 + var_a1, 0, t6 - 1, height - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD ); gSPTextureRectangle(gMainGfxPos++, (s3 + var_a1) * 4, uly * 4, t6 * 4, (uly + height) * 4, G_TX_RENDERTILE, ((u32) (s3 + var_a1) % 0x200) * 32, 0, 0x0400, 0x0400 ); gDPPipeSync(gMainGfxPos++); } var_t2_2++; } } } for (i = 0; i < ARRAY_COUNT(data->unk_3C) - 1; i++) { data->unk_3C[i + 1] = sp18[i]; data->unk_1C[i + 1] = sp28[i]; data->unk_2C[i + 1] = sp38[i]; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80247570 /* 175E50 80247570 3C03800E */ lui $v1, %hi(gBattleSubState) /* 175E54 80247574 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) /* 175E58 80247578 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 175E5C 8024757C AFB60028 */ sw $s6, 0x28($sp) /* 175E60 80247580 3C16800E */ lui $s6, %hi(gBattleStatus) D_80247584: /* 175E64 80247584 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus) D_80247588: /* 175E68 80247588 AFBF002C */ sw $ra, 0x2C($sp) /* 175E6C 8024758C AFB50024 */ sw $s5, 0x24($sp) /* 175E70 80247590 AFB40020 */ sw $s4, 0x20($sp) /* 175E74 80247594 AFB3001C */ sw $s3, 0x1C($sp) /* 175E78 80247598 AFB20018 */ sw $s2, 0x18($sp) /* 175E7C 8024759C AFB10014 */ sw $s1, 0x14($sp) /* 175E80 802475A0 AFB00010 */ sw $s0, 0x10($sp) D_802475A4: /* 175E84 802475A4 8ED500D8 */ lw $s5, 0xD8($s6) /* 175E88 802475A8 8ED400DC */ lw $s4, 0xDC($s6) /* 175E8C 802475AC 2C62000D */ sltiu $v0, $v1, 0xD D_802475B0: /* 175E90 802475B0 10400106 */ beqz $v0, .L802479CC /* 175E94 802475B4 00031080 */ sll $v0, $v1, 2 .L802475B8: /* 175E98 802475B8 3C01802A */ lui $at, %hi(jtbl_8029CB88) /* 175E9C 802475BC 00220821 */ addu $at, $at, $v0 .L802475C0: /* 175EA0 802475C0 8C22CB88 */ lw $v0, %lo(jtbl_8029CB88)($at) /* 175EA4 802475C4 00400008 */ jr $v0 /* 175EA8 802475C8 00000000 */ nop glabel .L802475CC /* 175EAC 802475CC 3C04FFDF */ lui $a0, (0xFFDFFFFF >> 16) D_802475D0: /* 175EB0 802475D0 3484FFFF */ ori $a0, $a0, (0xFFDFFFFF & 0xFFFF) /* 175EB4 802475D4 3C05F7FF */ lui $a1, (0xF7FFFFFF >> 16) .L802475D8: /* 175EB8 802475D8 3C10800E */ lui $s0, %hi(gBattleStatus) D_802475DC: /* 175EBC 802475DC 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) D_802475E0: /* 175EC0 802475E0 8E020000 */ lw $v0, 0x0($s0) D_802475E4: /* 175EC4 802475E4 2403FFFD */ addiu $v1, $zero, -0x3 D_802475E8: /* 175EC8 802475E8 00431024 */ and $v0, $v0, $v1 /* 175ECC 802475EC 00441024 */ and $v0, $v0, $a0 /* 175ED0 802475F0 AE020000 */ sw $v0, 0x0($s0) /* 175ED4 802475F4 8EA20000 */ lw $v0, 0x0($s5) /* 175ED8 802475F8 34A5FFFF */ ori $a1, $a1, (0xF7FFFFFF & 0xFFFF) /* 175EDC 802475FC 00451024 */ and $v0, $v0, $a1 /* 175EE0 80247600 12800004 */ beqz $s4, .L80247614 /* 175EE4 80247604 AEA20000 */ sw $v0, 0x0($s5) /* 175EE8 80247608 8E820000 */ lw $v0, 0x0($s4) /* 175EEC 8024760C 00451024 */ and $v0, $v0, $a1 D_80247610: /* 175EF0 80247610 AE820000 */ sw $v0, 0x0($s4) .L80247614: /* 175EF4 80247614 2402007F */ addiu $v0, $zero, 0x7F D_80247618: /* 175EF8 80247618 A2C0008C */ sb $zero, 0x8C($s6) /* 175EFC 8024761C A6C00180 */ sh $zero, 0x180($s6) jtbl_80247620: /* 175F00 80247620 A2C00081 */ sb $zero, 0x81($s6) /* 175F04 80247624 A2C20086 */ sb $v0, 0x86($s6) D_80247628: /* 175F08 80247628 A2C20087 */ sb $v0, 0x87($s6) /* 175F0C 8024762C 0C098F18 */ jal reset_actor_turn_info /* 175F10 80247630 A2C0019A */ sb $zero, 0x19A($s6) /* 175F14 80247634 8E020000 */ lw $v0, 0x0($s0) /* 175F18 80247638 34420100 */ ori $v0, $v0, 0x100 /* 175F1C 8024763C AE020000 */ sw $v0, 0x0($s0) /* 175F20 80247640 12800002 */ beqz $s4, .L8024764C /* 175F24 80247644 A2A0021C */ sb $zero, 0x21C($s5) D_80247648: /* 175F28 80247648 A280021C */ sb $zero, 0x21C($s4) .L8024764C: /* 175F2C 8024764C 0000882D */ daddu $s1, $zero, $zero /* 175F30 80247650 3C04FFF7 */ lui $a0, (0xFFF7FFFF >> 16) /* 175F34 80247654 3484FFFF */ ori $a0, $a0, (0xFFF7FFFF & 0xFFFF) /* 175F38 80247658 8E020004 */ lw $v0, 0x4($s0) /* 175F3C 8024765C 02C0182D */ daddu $v1, $s6, $zero /* 175F40 80247660 34424000 */ ori $v0, $v0, 0x4000 glabel D_80247664 /* 175F44 80247664 AE020004 */ sw $v0, 0x4($s0) .L80247668: /* 175F48 80247668 8C7000E0 */ lw $s0, 0xE0($v1) /* 175F4C 8024766C 12000004 */ beqz $s0, D_80247680 jtbl_80247670: /* 175F50 80247670 26310001 */ addiu $s1, $s1, 0x1 /* 175F54 80247674 8E020000 */ lw $v0, 0x0($s0) D_80247678: /* 175F58 80247678 00441024 */ and $v0, $v0, $a0 /* 175F5C 8024767C AE020000 */ sw $v0, 0x0($s0) D_80247680: /* 175F60 80247680 2A220018 */ slti $v0, $s1, 0x18 /* 175F64 80247684 1440FFF8 */ bnez $v0, .L80247668 D_80247688: /* 175F68 80247688 24630004 */ addiu $v1, $v1, 0x4 D_8024768C: /* 175F6C 8024768C 0000882D */ daddu $s1, $zero, $zero D_80247690: /* 175F70 80247690 3C060040 */ lui $a2, (0x400000 >> 16) /* 175F74 80247694 3C05F7FF */ lui $a1, (0xF7FFFFFF >> 16) D_80247698: /* 175F78 80247698 34A5FFFF */ ori $a1, $a1, (0xF7FFFFFF & 0xFFFF) D_8024769C: /* 175F7C 8024769C 02C0202D */ daddu $a0, $s6, $zero D_802476A0: /* 175F80 802476A0 8C9000E0 */ lw $s0, 0xE0($a0) .L802476A4: /* 175F84 802476A4 12000007 */ beqz $s0, .L802476C4 /* 175F88 802476A8 26310001 */ addiu $s1, $s1, 0x1 /* 175F8C 802476AC 8E030000 */ lw $v1, 0x0($s0) /* 175F90 802476B0 00661024 */ and $v0, $v1, $a2 /* 175F94 802476B4 14400003 */ bnez $v0, .L802476C4 /* 175F98 802476B8 00000000 */ nop /* 175F9C 802476BC 00651024 */ and $v0, $v1, $a1 /* 175FA0 802476C0 AE020000 */ sw $v0, 0x0($s0) .L802476C4: /* 175FA4 802476C4 2A220018 */ slti $v0, $s1, 0x18 /* 175FA8 802476C8 1440FFF5 */ bnez $v0, D_802476A0 .L802476CC: /* 175FAC 802476CC 24840004 */ addiu $a0, $a0, 0x4 .L802476D0: /* 175FB0 802476D0 8ED00174 */ lw $s0, 0x174($s6) /* 175FB4 802476D4 8E020000 */ lw $v0, 0x0($s0) D_802476D8: /* 175FB8 802476D8 3C030020 */ lui $v1, (0x200000 >> 16) D_802476DC: /* 175FBC 802476DC 00431024 */ and $v0, $v0, $v1 /* 175FC0 802476E0 544000B8 */ bnel $v0, $zero, .L802479C4 /* 175FC4 802476E4 24020002 */ addiu $v0, $zero, 0x2 /* 175FC8 802476E8 0C099EA7 */ jal reset_all_actor_sounds /* 175FCC 802476EC 0200202D */ daddu $a0, $s0, $zero /* 175FD0 802476F0 2405000A */ addiu $a1, $zero, 0xA D_802476F4: /* 175FD4 802476F4 A2C001A7 */ sb $zero, 0x1A7($s6) /* 175FD8 802476F8 8E0401C4 */ lw $a0, 0x1C4($s0) D_802476FC: /* 175FDC 802476FC 0C0B0CF8 */ jal start_script /* 175FE0 80247700 0000302D */ daddu $a2, $zero, $zero /* 175FE4 80247704 AE0201D4 */ sw $v0, 0x1D4($s0) /* 175FE8 80247708 8C430144 */ lw $v1, 0x144($v0) /* 175FEC 8024770C AE0301E4 */ sw $v1, 0x1E4($s0) /* 175FF0 80247710 86C30172 */ lh $v1, 0x172($s6) /* 175FF4 80247714 AC430148 */ sw $v1, 0x148($v0) /* 175FF8 80247718 08091E71 */ j .L802479C4 D_8024771C: /* 175FFC 8024771C 24020002 */ addiu $v0, $zero, 0x2 D_80247720: /* 176000 80247720 8EA201D4 */ lw $v0, 0x1D4($s5) /* 176004 80247724 10400005 */ beqz $v0, .L8024773C D_80247728: /* 176008 80247728 00000000 */ nop D_8024772C: /* 17600C 8024772C 0C0B1059 */ jal does_script_exist .L80247730: /* 176010 80247730 8EA401E4 */ lw $a0, 0x1E4($s5) /* 176014 80247734 144000A5 */ bnez $v0, .L802479CC D_80247738: /* 176018 80247738 00000000 */ nop .L8024773C: /* 17601C 8024773C 8EA201D8 */ lw $v0, 0x1D8($s5) D_80247740: /* 176020 80247740 10400006 */ beqz $v0, .L8024775C /* 176024 80247744 AEA001D4 */ sw $zero, 0x1D4($s5) /* 176028 80247748 8EA401E8 */ lw $a0, 0x1E8($s5) /* 17602C 8024774C 0C0B1059 */ jal does_script_exist D_80247750: /* 176030 80247750 00000000 */ nop /* 176034 80247754 1440009D */ bnez $v0, .L802479CC /* 176038 80247758 00000000 */ nop .L8024775C: /* 17603C 8024775C 1280000A */ beqz $s4, D_80247788 /* 176040 80247760 AEA001D8 */ sw $zero, 0x1D8($s5) D_80247764: /* 176044 80247764 8E8201D8 */ lw $v0, 0x1D8($s4) D_80247768: /* 176048 80247768 50400007 */ beql $v0, $zero, D_80247788 /* 17604C 8024776C AE8001D8 */ sw $zero, 0x1D8($s4) D_80247770: /* 176050 80247770 8E8401E8 */ lw $a0, 0x1E8($s4) /* 176054 80247774 0C0B1059 */ jal does_script_exist /* 176058 80247778 00000000 */ nop /* 17605C 8024777C 14400093 */ bnez $v0, .L802479CC D_80247780: /* 176060 80247780 00000000 */ nop /* 176064 80247784 AE8001D8 */ sw $zero, 0x1D8($s4) D_80247788: /* 176068 80247788 0000982D */ daddu $s3, $zero, $zero /* 17606C 8024778C 0260882D */ daddu $s1, $s3, $zero /* 176070 80247790 02C0902D */ daddu $s2, $s6, $zero D_80247794: /* 176074 80247794 8E5000E0 */ lw $s0, 0xE0($s2) /* 176078 80247798 5200000B */ beql $s0, $zero, D_802477C8 /* 17607C 8024779C 26310001 */ addiu $s1, $s1, 0x1 /* 176080 802477A0 8E0201D8 */ lw $v0, 0x1D8($s0) /* 176084 802477A4 50400008 */ beql $v0, $zero, D_802477C8 /* 176088 802477A8 26310001 */ addiu $s1, $s1, 0x1 /* 17608C 802477AC 8E0401E8 */ lw $a0, 0x1E8($s0) D_802477B0: /* 176090 802477B0 0C0B1059 */ jal does_script_exist D_802477B4: /* 176094 802477B4 00000000 */ nop D_802477B8: /* 176098 802477B8 50400002 */ beql $v0, $zero, .L802477C4 /* 17609C 802477BC AE0001D8 */ sw $zero, 0x1D8($s0) D_802477C0: /* 1760A0 802477C0 24130001 */ addiu $s3, $zero, 0x1 .L802477C4: /* 1760A4 802477C4 26310001 */ addiu $s1, $s1, 0x1 D_802477C8: /* 1760A8 802477C8 2A220018 */ slti $v0, $s1, 0x18 D_802477CC: /* 1760AC 802477CC 1440FFF1 */ bnez $v0, D_80247794 /* 1760B0 802477D0 26520004 */ addiu $s2, $s2, 0x4 D_802477D4: /* 1760B4 802477D4 1660007D */ bnez $s3, .L802479CC /* 1760B8 802477D8 00000000 */ nop /* 1760BC 802477DC 0C098D19 */ jal btl_check_player_defeated D_802477E0: /* 1760C0 802477E0 00000000 */ nop D_802477E4: /* 1760C4 802477E4 144000BB */ bnez $v0, .L80247AD4 D_802477E8: /* 1760C8 802477E8 0000882D */ daddu $s1, $zero, $zero D_802477EC: /* 1760CC 802477EC 02C0902D */ daddu $s2, $s6, $zero .L802477F0: /* 1760D0 802477F0 8E5000E0 */ lw $s0, 0xE0($s2) /* 1760D4 802477F4 5200000B */ beql $s0, $zero, .L80247824 glabel .L802477F8 /* 1760D8 802477F8 26310001 */ addiu $s1, $s1, 0x1 /* 1760DC 802477FC 8E0201D4 */ lw $v0, 0x1D4($s0) D_80247800: /* 1760E0 80247800 50400008 */ beql $v0, $zero, .L80247824 /* 1760E4 80247804 26310001 */ addiu $s1, $s1, 0x1 D_80247808: /* 1760E8 80247808 8E0401E4 */ lw $a0, 0x1E4($s0) /* 1760EC 8024780C 0C0B1059 */ jal does_script_exist /* 1760F0 80247810 00000000 */ nop /* 1760F4 80247814 50400002 */ beql $v0, $zero, .L80247820 /* 1760F8 80247818 AE0001D4 */ sw $zero, 0x1D4($s0) /* 1760FC 8024781C 24130001 */ addiu $s3, $zero, 0x1 .L80247820: /* 176100 80247820 26310001 */ addiu $s1, $s1, 0x1 .L80247824: /* 176104 80247824 2A220018 */ slti $v0, $s1, 0x18 /* 176108 80247828 1440FFF1 */ bnez $v0, .L802477F0 /* 17610C 8024782C 26520004 */ addiu $s2, $s2, 0x4 /* 176110 80247830 12600006 */ beqz $s3, .L8024784C /* 176114 80247834 3C030020 */ lui $v1, (0x200000 >> 16) /* 176118 80247838 3C02800E */ lui $v0, %hi(gBattleStatus) /* 17611C 8024783C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) D_80247840: /* 176120 80247840 00431024 */ and $v0, $v0, $v1 /* 176124 80247844 10400061 */ beqz $v0, .L802479CC /* 176128 80247848 00000000 */ nop .L8024784C: /* 17612C 8024784C 3C04800E */ lui $a0, %hi(gBattleStatus) /* 176130 80247850 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) /* 176134 80247854 8C820000 */ lw $v0, 0x0($a0) /* 176138 80247858 2403FEFF */ addiu $v1, $zero, -0x101 /* 17613C 8024785C 00431024 */ and $v0, $v0, $v1 /* 176140 80247860 AC820000 */ sw $v0, 0x0($a0) .L80247864: /* 176144 80247864 8C820004 */ lw $v0, 0x4($a0) /* 176148 80247868 2403BFFF */ addiu $v1, $zero, -0x4001 /* 17614C 8024786C 00431024 */ and $v0, $v0, $v1 D_80247870: /* 176150 80247870 0C098D0D */ jal btl_check_enemies_defeated /* 176154 80247874 AC820004 */ sw $v0, 0x4($a0) D_80247878: /* 176158 80247878 14400096 */ bnez $v0, .L80247AD4 D_8024787C: /* 17615C 8024787C 00000000 */ nop D_80247880: /* 176160 80247880 82C2008C */ lb $v0, 0x8C($s6) /* 176164 80247884 14400051 */ bnez $v0, .L802479CC D_80247888: /* 176168 80247888 00000000 */ nop /* 17616C 8024788C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 176170 80247890 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 176174 80247894 904200AA */ lbu $v0, 0xAA($v0) /* 176178 80247898 30420001 */ andi $v0, $v0, 0x1 .L8024789C: /* 17617C 8024789C 10400005 */ beqz $v0, .L802478B4 /* 176180 802478A0 00000000 */ nop /* 176184 802478A4 0C090464 */ jal func_80241190 /* 176188 802478A8 24040023 */ addiu $a0, $zero, 0x23 /* 17618C 802478AC 08091E73 */ j .L802479CC /* 176190 802478B0 00000000 */ nop .L802478B4: /* 176194 802478B4 0C099DDF */ jal btl_update_ko_status D_802478B8: /* 176198 802478B8 00000000 */ nop /* 17619C 802478BC 82A2021C */ lb $v0, 0x21C($s5) D_802478C0: /* 1761A0 802478C0 1040003F */ beqz $v0, D_802479C0 /* 1761A4 802478C4 3C030C00 */ lui $v1, (0xC000000 >> 16) D_802478C8: /* 1761A8 802478C8 8EA20000 */ lw $v0, 0x0($s5) /* 1761AC 802478CC 00431025 */ or $v0, $v0, $v1 /* 1761B0 802478D0 12800004 */ beqz $s4, .L802478E4 /* 1761B4 802478D4 AEA20000 */ sw $v0, 0x0($s5) /* 1761B8 802478D8 8E820000 */ lw $v0, 0x0($s4) /* 1761BC 802478DC 00431025 */ or $v0, $v0, $v1 /* 1761C0 802478E0 AE820000 */ sw $v0, 0x0($s4) .L802478E4: /* 1761C4 802478E4 0C093903 */ jal func_8024E40C D_802478E8: /* 1761C8 802478E8 24040021 */ addiu $a0, $zero, 0x21 /* 1761CC 802478EC 92A2021C */ lbu $v0, 0x21C($s5) /* 1761D0 802478F0 2442FFFC */ addiu $v0, $v0, -0x4 /* 1761D4 802478F4 00021600 */ sll $v0, $v0, 24 /* 1761D8 802478F8 00021E03 */ sra $v1, $v0, 24 /* 1761DC 802478FC 2C620007 */ sltiu $v0, $v1, 0x7 D_80247900: /* 1761E0 80247900 10400012 */ beqz $v0, .L8024794C /* 1761E4 80247904 00031080 */ sll $v0, $v1, 2 /* 1761E8 80247908 3C01802A */ lui $at, %hi(jtbl_8029CBC0) /* 1761EC 8024790C 00220821 */ addu $at, $at, $v0 /* 1761F0 80247910 8C22CBC0 */ lw $v0, %lo(jtbl_8029CBC0)($at) /* 1761F4 80247914 00400008 */ jr $v0 /* 1761F8 80247918 00000000 */ nop glabel .L8024791C /* 1761FC 8024791C 08091E57 */ j .L8024795C /* 176200 80247920 2404000A */ addiu $a0, $zero, 0xA glabel .L80247924 /* 176204 80247924 08091E57 */ j .L8024795C /* 176208 80247928 2404000B */ addiu $a0, $zero, 0xB D_8024792C: /* 17620C 8024792C 08091E57 */ j .L8024795C /* 176210 80247930 2404000C */ addiu $a0, $zero, 0xC glabel .L80247934 /* 176214 80247934 08091E57 */ j .L8024795C rodata_alignment: /* 176218 80247938 2404000D */ addiu $a0, $zero, 0xD glabel .L8024793C /* 17621C 8024793C 08091E57 */ j .L8024795C D_80247940: /* 176220 80247940 2404000E */ addiu $a0, $zero, 0xE glabel .L80247944 /* 176224 80247944 08091E57 */ j .L8024795C /* 176228 80247948 2404000F */ addiu $a0, $zero, 0xF glabel .L8024794C /* 17622C 8024794C 0000202D */ daddu $a0, $zero, $zero D_80247950: /* 176230 80247950 24020014 */ addiu $v0, $zero, 0x14 /* 176234 80247954 3C01800E */ lui $at, %hi(gBattleSubState) D_80247958: /* 176238 80247958 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L8024795C: /* 17623C 8024795C 0C093E58 */ jal func_8024F960 D_80247960: /* 176240 80247960 2405003C */ addiu $a1, $zero, 0x3C /* 176244 80247964 2402000B */ addiu $v0, $zero, 0xB jtbl_80247968: /* 176248 80247968 08091E71 */ j .L802479C4 D_8024796C: /* 17624C 8024796C A2A0021C */ sb $zero, 0x21C($s5) glabel .L80247970 /* 176250 80247970 0C093EAD */ jal func_8024FAB4 /* 176254 80247974 00000000 */ nop /* 176258 80247978 14400014 */ bnez $v0, .L802479CC D_8024797C: /* 17625C 8024797C 00000000 */ nop D_80247980: /* 176260 80247980 0C093903 */ jal func_8024E40C D_80247984: /* 176264 80247984 24040002 */ addiu $a0, $zero, 0x2 /* 176268 80247988 0C093936 */ jal D_8024E4D8_C0BD58 /* 17626C 8024798C 2404000F */ addiu $a0, $zero, 0xF /* 176270 80247990 2402000A */ addiu $v0, $zero, 0xA /* 176274 80247994 3C01802A */ lui $at, %hi(D_8029F248) /* 176278 80247998 AC22F248 */ sw $v0, %lo(D_8029F248)($at) /* 17627C 8024799C 08091E71 */ j .L802479C4 /* 176280 802479A0 2402000C */ addiu $v0, $zero, 0xC glabel .L802479A4 /* 176284 802479A4 3C03802A */ lui $v1, %hi(D_8029F248) D_802479A8: /* 176288 802479A8 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) /* 17628C 802479AC 8C620000 */ lw $v0, 0x0($v1) D_802479B0: /* 176290 802479B0 10400003 */ beqz $v0, D_802479C0 /* 176294 802479B4 2442FFFF */ addiu $v0, $v0, -0x1 D_802479B8: /* 176298 802479B8 08091E73 */ j .L802479CC .L802479BC: /* 17629C 802479BC AC620000 */ sw $v0, 0x0($v1) D_802479C0: /* 1762A0 802479C0 24020014 */ addiu $v0, $zero, 0x14 .L802479C4: /* 1762A4 802479C4 3C01800E */ lui $at, %hi(gBattleSubState) D_802479C8: /* 1762A8 802479C8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel .L802479CC /* 1762AC 802479CC 3C10800E */ lui $s0, %hi(gBattleSubState) jtbl_802479D0: /* 1762B0 802479D0 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState) /* 1762B4 802479D4 8E030000 */ lw $v1, 0x0($s0) /* 1762B8 802479D8 24110015 */ addiu $s1, $zero, 0x15 /* 1762BC 802479DC 10710020 */ beq $v1, $s1, .L80247A60 /* 1762C0 802479E0 28620016 */ slti $v0, $v1, 0x16 /* 1762C4 802479E4 10400005 */ beqz $v0, D_802479FC /* 1762C8 802479E8 24020014 */ addiu $v0, $zero, 0x14 /* 1762CC 802479EC 10620008 */ beq $v1, $v0, D_80247A10 D_802479F0: /* 1762D0 802479F0 00000000 */ nop .L802479F4: /* 1762D4 802479F4 08091EAE */ j jtbl_80247AB8 /* 1762D8 802479F8 00000000 */ nop D_802479FC: /* 1762DC 802479FC 24020016 */ addiu $v0, $zero, 0x16 D_80247A00: /* 1762E0 80247A00 10620024 */ beq $v1, $v0, .L80247A94 /* 1762E4 80247A04 00000000 */ nop /* 1762E8 80247A08 08091EAE */ j jtbl_80247AB8 /* 1762EC 80247A0C 00000000 */ nop D_80247A10: /* 1762F0 80247A10 12800027 */ beqz $s4, .L80247AB0 /* 1762F4 80247A14 2402000D */ addiu $v0, $zero, 0xD D_80247A18: /* 1762F8 80247A18 8283021C */ lb $v1, 0x21C($s4) /* 1762FC 80247A1C 14620025 */ bne $v1, $v0, .L80247AB4 D_80247A20: /* 176300 80247A20 2402001E */ addiu $v0, $zero, 0x1E .L80247A24: /* 176304 80247A24 8EA20000 */ lw $v0, 0x0($s5) jtbl_80247A28: /* 176308 80247A28 3C030C00 */ lui $v1, (0xC000000 >> 16) .L80247A2C: /* 17630C 80247A2C 00431025 */ or $v0, $v0, $v1 D_80247A30: /* 176310 80247A30 AEA20000 */ sw $v0, 0x0($s5) /* 176314 80247A34 8E820000 */ lw $v0, 0x0($s4) D_80247A38: /* 176318 80247A38 24040036 */ addiu $a0, $zero, 0x36 glabel .L80247A3C /* 17631C 80247A3C 00431025 */ or $v0, $v0, $v1 D_80247A40: /* 176320 80247A40 0C093903 */ jal func_8024E40C /* 176324 80247A44 AE820000 */ sw $v0, 0x0($s4) jtbl_80247A48: /* 176328 80247A48 24040023 */ addiu $a0, $zero, 0x23 /* 17632C 80247A4C 0C093E58 */ jal func_8024F960 /* 176330 80247A50 2405003C */ addiu $a1, $zero, 0x3C /* 176334 80247A54 A280021C */ sb $zero, 0x21C($s4) /* 176338 80247A58 08091EAE */ j jtbl_80247AB8 /* 17633C 80247A5C AE110000 */ sw $s1, 0x0($s0) .L80247A60: /* 176340 80247A60 0C093EAD */ jal func_8024FAB4 /* 176344 80247A64 00000000 */ nop /* 176348 80247A68 14400013 */ bnez $v0, jtbl_80247AB8 /* 17634C 80247A6C 00000000 */ nop D_80247A70: /* 176350 80247A70 0C093903 */ jal func_8024E40C /* 176354 80247A74 24040002 */ addiu $a0, $zero, 0x2 jtbl_80247A78: /* 176358 80247A78 0C093936 */ jal D_8024E4D8_C0BD58 .L80247A7C: /* 17635C 80247A7C 2404000F */ addiu $a0, $zero, 0xF D_80247A80: /* 176360 80247A80 2402000A */ addiu $v0, $zero, 0xA /* 176364 80247A84 3C01802A */ lui $at, %hi(D_8029F248) .L80247A88: /* 176368 80247A88 AC22F248 */ sw $v0, %lo(D_8029F248)($at) /* 17636C 80247A8C 08091EAD */ j .L80247AB4 D_80247A90: /* 176370 80247A90 24020016 */ addiu $v0, $zero, 0x16 .L80247A94: /* 176374 80247A94 3C03802A */ lui $v1, %hi(D_8029F248) jtbl_80247A98: /* 176378 80247A98 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) /* 17637C 80247A9C 8C620000 */ lw $v0, 0x0($v1) D_80247AA0: /* 176380 80247AA0 10400003 */ beqz $v0, .L80247AB0 .L80247AA4: /* 176384 80247AA4 2442FFFF */ addiu $v0, $v0, -0x1 /* 176388 80247AA8 08091EAE */ j jtbl_80247AB8 /* 17638C 80247AAC AC620000 */ sw $v0, 0x0($v1) .L80247AB0: /* 176390 80247AB0 2402001E */ addiu $v0, $zero, 0x1E .L80247AB4: /* 176394 80247AB4 AE020000 */ sw $v0, 0x0($s0) jtbl_80247AB8: /* 176398 80247AB8 3C03800E */ lui $v1, %hi(gBattleSubState) /* 17639C 80247ABC 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_80247AC0: /* 1763A0 80247AC0 2402001E */ addiu $v0, $zero, 0x1E /* 1763A4 80247AC4 14620003 */ bne $v1, $v0, .L80247AD4 /* 1763A8 80247AC8 00000000 */ nop /* 1763AC 80247ACC 0C090464 */ jal func_80241190 /* 1763B0 80247AD0 24040014 */ addiu $a0, $zero, 0x14 .L80247AD4: /* 1763B4 80247AD4 8FBF002C */ lw $ra, 0x2C($sp) /* 1763B8 80247AD8 8FB60028 */ lw $s6, 0x28($sp) /* 1763BC 80247ADC 8FB50024 */ lw $s5, 0x24($sp) /* 1763C0 80247AE0 8FB40020 */ lw $s4, 0x20($sp) /* 1763C4 80247AE4 8FB3001C */ lw $s3, 0x1C($sp) D_80247AE8: /* 1763C8 80247AE8 8FB20018 */ lw $s2, 0x18($sp) /* 1763CC 80247AEC 8FB10014 */ lw $s1, 0x14($sp) D_80247AF0_EE64B0: /* 1763D0 80247AF0 8FB00010 */ lw $s0, 0x10($sp) /* 1763D4 80247AF4 03E00008 */ jr $ra D_80247AF8_EE64B8: /* 1763D8 80247AF8 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_enemy_move(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = gBattleStatus.playerActor; Actor* partner = gBattleStatus.partnerActor; Actor* enemy; s32 i; Evt* script; s32 messageIndex; s32 waitingForEnemyScript; switch (gBattleSubState) { case BTL_SUBSTATE_ENEMY_MOVE_EXECUTE: case BTL_SUBSTATE_ENEMY_MOVE_UNUSED_1: gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN; gBattleStatus.flags1 &= ~BS_FLAGS1_YIELD_TURN; player->flags &= ~ACTOR_FLAG_8000000; if (partner != NULL) { partner->flags &= ~ACTOR_FLAG_8000000; } battleStatus->stateFreezeCount = 0; battleStatus->lastAttackDamage = 0; battleStatus->actionSuccess = 0; battleStatus->unk_86 = 127; battleStatus->blockResult = 127; battleStatus->currentDamageSource = DMG_SRC_DEFAULT; reset_actor_turn_info(); gBattleStatus.flags1 |= BS_FLAGS1_100; player->statusAfflicted = 0; if (partner != NULL) { partner->statusAfflicted = 0; } gBattleStatus.flags2 |= BS_FLAGS2_4000; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL) { enemy->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN; } } for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL) { if (!(enemy->flags & ACTOR_FLAG_NO_DMG_APPLY)) { enemy->flags &= ~ACTOR_FLAG_8000000; } } } enemy = battleStatus->currentTurnEnemy; if (!(enemy->flags & ACTOR_FLAG_NO_ATTACK)) { reset_all_actor_sounds(enemy); battleStatus->battlePhase = PHASE_EXECUTE_ACTION; script = start_script(enemy->takeTurnSource, EVT_PRIORITY_A, 0); enemy->takeTurnScript = script; enemy->takeTurnScriptID = script->id; script->owner1.actorID = battleStatus->activeEnemyActorID; } gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_AWAIT_SCRIPTS; break; case BTL_SUBSTATE_ENEMY_MOVE_AWAIT_SCRIPTS: if (player->takeTurnScript != NULL && does_script_exist(player->takeTurnScriptID)) { break; } player->takeTurnScript = NULL; 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; } waitingForEnemyScript = FALSE; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->handleEventScript != NULL) { if (does_script_exist(enemy->handleEventScriptID)) { waitingForEnemyScript = TRUE; } else { enemy->handleEventScript = NULL; } } } if (waitingForEnemyScript) { break; } if (btl_check_player_defeated()) { return; } for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->takeTurnScript != NULL) { if (does_script_exist(enemy->takeTurnScriptID)) { waitingForEnemyScript = TRUE; } else { enemy->takeTurnScript = NULL; } } } if (!waitingForEnemyScript || (gBattleStatus.flags1 & BS_FLAGS1_YIELD_TURN)) { gBattleStatus.flags1 &= ~BS_FLAGS1_100; gBattleStatus.flags2 &= ~BS_FLAGS2_4000; if (btl_check_enemies_defeated()) { return; } if (battleStatus->stateFreezeCount == 0) { if (gGameStatusPtr->demoFlags & 1) { btl_set_state(BATTLE_STATE_END_DEMO_BATTLE); } else { btl_update_ko_status(); if (player->statusAfflicted != 0) { player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; if (partner != NULL) { partner->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; } btl_cam_use_preset(BTL_CAM_PLAYER_STATUS_AFFLICTED); switch (player->statusAfflicted) { case STATUS_KEY_DIZZY: messageIndex = BTL_MSG_PLAYER_DAZED; break; case STATUS_KEY_SLEEP: messageIndex = BTL_MSG_PLAYER_ASLEEP; break; case STATUS_KEY_FROZEN: messageIndex = BTL_MSG_PLAYER_FROZEN; break; case STATUS_KEY_POISON: messageIndex = BTL_MSG_PLAYER_POISONED; break; case STATUS_KEY_SHRINK: messageIndex = BTL_MSG_PLAYER_SHRUNK; break; case STATUS_KEY_PARALYZE: messageIndex = BTL_MSG_PLAYER_PARALYZED; break; default: messageIndex = 0; gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_CHECK_PARTNER; break; } btl_show_battle_message(messageIndex, 60); player->statusAfflicted = 0; gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_AWAIT_PLAYER_POPUP_DONE; break; } else { gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_CHECK_PARTNER; break; } } } } break; case BTL_SUBSTATE_ENEMY_MOVE_AWAIT_PLAYER_POPUP_DONE: if (!btl_is_popup_displayed()) { btl_cam_use_preset(BTL_CAM_DEFAULT); btl_cam_move(15); D_8029F248 = 10; gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_POST_PLAYER_POPUP_DELAY; } break; case BTL_SUBSTATE_ENEMY_MOVE_POST_PLAYER_POPUP_DELAY: if (D_8029F248 != 0) { D_8029F248--; } else { gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_CHECK_PARTNER; break; } break; } switch (gBattleSubState) { case BTL_SUBSTATE_ENEMY_MOVE_CHECK_PARTNER: if (partner != NULL) { if (partner->statusAfflicted == STATUS_KEY_DAZE) { player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; partner->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; btl_cam_use_preset(BTL_CAM_PARTNER_INJURED); btl_show_battle_message(BTL_MSG_PARTNER_INJURED, 60); partner->statusAfflicted = 0; gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_AWAIT_PARTNER_POPUP_DONE; } else { gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_DONE; } } else { gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_DONE; } break; case BTL_SUBSTATE_ENEMY_MOVE_AWAIT_PARTNER_POPUP_DONE: if (!btl_is_popup_displayed()) { btl_cam_use_preset(BTL_CAM_DEFAULT); btl_cam_move(15); D_8029F248 = 10; gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_POST_PARTNER_POPUP_DELAY; } break; case BTL_SUBSTATE_ENEMY_MOVE_POST_PARTNER_POPUP_DELAY: if (D_8029F248 != 0) { D_8029F248--; } else { gBattleSubState = BTL_SUBSTATE_ENEMY_MOVE_DONE; } break; } if (gBattleSubState == BTL_SUBSTATE_ENEMY_MOVE_DONE) { btl_set_state(BATTLE_STATE_NEXT_ENEMY); } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel D_80241B14 /* 1703F4 80241B14 27BDFFD0 */ addiu $sp, $sp, -0x30 mgm_01_TallyPosY: /* 1703F8 80241B18 AFB40020 */ sw $s4, 0x20($sp) .L80241B1C: /* 1703FC 80241B1C 3C14800E */ lui $s4, %hi(gBattleStatus) glabel func_80241B20 /* 170400 80241B20 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) glabel func_80241B24 /* 170404 80241B24 AFB20018 */ sw $s2, 0x18($sp) glabel func_80241B28 /* 170408 80241B28 3C128011 */ lui $s2, %hi(gPlayerData) glabel func_80241B2C /* 17040C 80241B2C 2652F290 */ addiu $s2, $s2, %lo(gPlayerData) D_80241B30: /* 170410 80241B30 AFBF0028 */ sw $ra, 0x28($sp) glabel func_80241B34 /* 170414 80241B34 AFB50024 */ sw $s5, 0x24($sp) glabel .L80241B38 /* 170418 80241B38 AFB3001C */ sw $s3, 0x1C($sp) .L80241B3C: /* 17041C 80241B3C AFB10014 */ sw $s1, 0x14($sp) glabel func_80241B40 /* 170420 80241B40 AFB00010 */ sw $s0, 0x10($sp) mgm_01_PanelModelIDs: /* 170424 80241B44 8E9500DC */ lw $s5, 0xDC($s4) .L80241B48: /* 170428 80241B48 3C02800E */ lui $v0, %hi(gBattleSubState) D_80241B4C: /* 17042C 80241B4C 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0) glabel dead_kzn_19_LetterDelivery_SaveNpcAnim /* 170430 80241B50 8E8500D8 */ lw $a1, 0xD8($s4) D_80241B54: /* 170434 80241B54 144000E9 */ bnez $v0, func_80241EFC glabel func_80241B58 /* 170438 80241B58 3C04FEFF */ lui $a0, (0xFEFFFFFF >> 16) glabel func_80241B5C /* 17043C 80241B5C 3484FFFF */ ori $a0, $a0, (0xFEFFFFFF & 0xFFFF) glabel func_80241B60 /* 170440 80241B60 8E820004 */ lw $v0, 0x4($s4) D_80241B64: /* 170444 80241B64 2403FFFD */ addiu $v1, $zero, -0x3 glabel func_80241B68 /* 170448 80241B68 A28000AC */ sb $zero, 0xAC($s4) D_80241B6C: /* 17044C 80241B6C A28000AD */ sb $zero, 0xAD($s4) mgm_01_PanelTypes: /* 170450 80241B70 00431024 */ and $v0, $v0, $v1 glabel func_80241B74 /* 170454 80241B74 2403FFFB */ addiu $v1, $zero, -0x5 glabel func_80241B78 /* 170458 80241B78 00431024 */ and $v0, $v0, $v1 D_80241B7C: /* 17045C 80241B7C 2403FFF7 */ addiu $v1, $zero, -0x9 D_80241B80: /* 170460 80241B80 00431024 */ and $v0, $v0, $v1 D_80241B84: /* 170464 80241B84 2403FFEF */ addiu $v1, $zero, -0x11 glabel func_80241B88 /* 170468 80241B88 00431024 */ and $v0, $v0, $v1 glabel func_80241B8C /* 17046C 80241B8C AE820004 */ sw $v0, 0x4($s4) glabel func_80241B90 /* 170470 80241B90 00441024 */ and $v0, $v0, $a0 glabel dead_flo_13_LakituAI_Loiter /* 170474 80241B94 AE820004 */ sw $v0, 0x4($s4) D_80241B98: /* 170478 80241B98 8CA20000 */ lw $v0, 0x0($a1) mgm_01_InitialConfigurations: /* 17047C 80241B9C 3C030C00 */ lui $v1, (0xC000000 >> 16) .L80241BA0: /* 170480 80241BA0 A0A0021D */ sb $zero, 0x21D($a1) glabel func_80241BA4 /* 170484 80241BA4 00431025 */ or $v0, $v0, $v1 glabel func_80241BA8 /* 170488 80241BA8 12A00004 */ beqz $s5, func_80241BBC D_80241BAC: /* 17048C 80241BAC ACA20000 */ sw $v0, 0x0($a1) D_80241BB0: /* 170490 80241BB0 00431025 */ or $v0, $v0, $v1 D_80241BB4: /* 170494 80241BB4 ACA20000 */ sw $v0, 0x0($a1) arn_03_pad_1BB8: /* 170498 80241BB8 A2A0021D */ sb $zero, 0x21D($s5) glabel func_80241BBC /* 17049C 80241BBC 8282008B */ lb $v0, 0x8B($s4) glabel func_80241BC0_EAA6A0 /* 1704A0 80241BC0 10400004 */ beqz $v0, func_80241BD4 glabel func_80241BC4 /* 1704A4 80241BC4 3C030400 */ lui $v1, (0x4000000 >> 16) glabel func_80241BC8 /* 1704A8 80241BC8 8E820000 */ lw $v0, 0x0($s4) glabel func_80241BCC /* 1704AC 80241BCC 00431025 */ or $v0, $v0, $v1 .L80241BD0: /* 1704B0 80241BD0 AE820000 */ sw $v0, 0x0($s4) glabel func_80241BD4 /* 1704B4 80241BD4 0000502D */ daddu $t2, $zero, $zero glabel func_80241BD8 /* 1704B8 80241BD8 0140882D */ daddu $s1, $t2, $zero D_80241BDC: /* 1704BC 80241BDC 0280202D */ daddu $a0, $s4, $zero glabel func_80241BE0 /* 1704C0 80241BE0 0280182D */ daddu $v1, $s4, $zero D_80241BE4: /* 1704C4 80241BE4 8C9000E0 */ lw $s0, 0xE0($a0) glabel func_80241BE8 /* 1704C8 80241BE8 52000006 */ beql $s0, $zero, D_80241C04 glabel func_80241BEC /* 1704CC 80241BEC 26310001 */ addiu $s1, $s1, 0x1 glabel func_80241BF0 /* 1704D0 80241BF0 36220200 */ ori $v0, $s1, 0x200 .L80241BF4: /* 1704D4 80241BF4 A4620140 */ sh $v0, 0x140($v1) glabel dead_flo_08_FlowerGuard_MakeItemList /* 1704D8 80241BF8 24630002 */ addiu $v1, $v1, 0x2 glabel func_80241BFC /* 1704DC 80241BFC 254A0001 */ addiu $t2, $t2, 0x1 glabel func_80241C00 /* 1704E0 80241C00 26310001 */ addiu $s1, $s1, 0x1 D_80241C04: /* 1704E4 80241C04 2A220018 */ slti $v0, $s1, 0x18 glabel func_80241C08 /* 1704E8 80241C08 1440FFF6 */ bnez $v0, D_80241BE4 D_80241C0C: /* 1704EC 80241C0C 24840004 */ addiu $a0, $a0, 0x4 D_80241C10_EB8E40: /* 1704F0 80241C10 A28A0171 */ sb $t2, 0x171($s4) D_80241C14: /* 1704F4 80241C14 0000882D */ daddu $s1, $zero, $zero glabel func_80241C18 /* 1704F8 80241C18 2542FFFF */ addiu $v0, $t2, -0x1 .L80241C1C: /* 1704FC 80241C1C 18400031 */ blez $v0, D_80241CE4 glabel func_80241C20 /* 170500 80241C20 268C0140 */ addiu $t4, $s4, 0x140 glabel .L80241C24 /* 170504 80241C24 3C0E800E */ lui $t6, %hi(gBattleStatus) .L80241C28: /* 170508 80241C28 25CEC070 */ addiu $t6, $t6, %lo(gBattleStatus) D_80241C2C: /* 17050C 80241C2C 3C0D0800 */ lui $t5, (0x8000000 >> 16) glabel dead_flo_08_foliage_setup_shear_mtx /* 170510 80241C30 0180582D */ daddu $t3, $t4, $zero glabel func_80241C34 /* 170514 80241C34 26280001 */ addiu $t0, $s1, 0x1 glabel func_80241C38 /* 170518 80241C38 010A102A */ slt $v0, $t0, $t2 glabel func_80241C3C /* 17051C 80241C3C 50400025 */ beql $v0, $zero, D_80241CD4 D_80241C40: /* 170520 80241C40 26310001 */ addiu $s1, $s1, 0x1 glabel dead_flo_16_FlyingAI_Chase /* 170524 80241C44 0160482D */ daddu $t1, $t3, $zero D_80241C48: /* 170528 80241C48 00081040 */ sll $v0, $t0, 1 glabel .L80241C4C /* 17052C 80241C4C 004C2821 */ addu $a1, $v0, $t4 glabel func_80241C50 /* 170530 80241C50 95270000 */ lhu $a3, 0x0($t1) D_80241C54: /* 170534 80241C54 94A60000 */ lhu $a2, 0x0($a1) glabel func_80241C58 /* 170538 80241C58 8DC40000 */ lw $a0, 0x0($t6) glabel func_80241C5C /* 17053C 80241C5C 30E200FF */ andi $v0, $a3, 0xFF glabel func_80241C60 /* 170540 80241C60 00021080 */ sll $v0, $v0, 2 glabel func_80241C64 /* 170544 80241C64 02821021 */ addu $v0, $s4, $v0 arn_03_varStash: /* 170548 80241C68 30C300FF */ andi $v1, $a2, 0xFF .L80241C6C: /* 17054C 80241C6C 00031880 */ sll $v1, $v1, 2 glabel func_80241C70 /* 170550 80241C70 02831821 */ addu $v1, $s4, $v1 glabel func_80241C74 /* 170554 80241C74 008D2024 */ and $a0, $a0, $t5 glabel func_80241C78 /* 170558 80241C78 8C4200E0 */ lw $v0, 0xE0($v0) glabel func_80241C7C /* 17055C 80241C7C 10800009 */ beqz $a0, .L80241CA4 .L80241C80: /* 170560 80241C80 8C6300E0 */ lw $v1, 0xE0($v1) D_80241C84: /* 170564 80241C84 C4420138 */ lwc1 $f2, 0x138($v0) D_80241C88: /* 170568 80241C88 C4600138 */ lwc1 $f0, 0x138($v1) D_80241C8C: /* 17056C 80241C8C 4602003C */ c.lt.s $f0, $f2 glabel dead_11_LakituAI_Main /* 170570 80241C90 00000000 */ nop glabel .L80241C94 /* 170574 80241C94 4502000B */ bc1fl D_80241CC4 D_80241C98: /* 170578 80241C98 25080001 */ addiu $t0, $t0, 0x1 D_80241C9C: /* 17057C 80241C9C 0809072F */ j func_80241CBC glabel dead_flo_08_TransformFoliage /* 170580 80241CA0 A5260000 */ sh $a2, 0x0($t1) glabel .L80241CA4 /* 170584 80241CA4 804201F1 */ lb $v0, 0x1F1($v0) glabel dead_flo_16_FlyingAI_LosePlayer /* 170588 80241CA8 806301F1 */ lb $v1, 0x1F1($v1) .L80241CAC: /* 17058C 80241CAC 0043102A */ slt $v0, $v0, $v1 D_80241CB0: /* 170590 80241CB0 50400004 */ beql $v0, $zero, D_80241CC4 D_80241CB4: /* 170594 80241CB4 25080001 */ addiu $t0, $t0, 0x1 glabel func_80241CB8 /* 170598 80241CB8 A5260000 */ sh $a2, 0x0($t1) glabel func_80241CBC /* 17059C 80241CBC A4A70000 */ sh $a3, 0x0($a1) glabel .L80241CC0 /* 1705A0 80241CC0 25080001 */ addiu $t0, $t0, 0x1 D_80241CC4: /* 1705A4 80241CC4 010A102A */ slt $v0, $t0, $t2 glabel func_80241CC8 /* 1705A8 80241CC8 1440FFE1 */ bnez $v0, func_80241C50 glabel func_80241CCC /* 1705AC 80241CCC 24A50002 */ addiu $a1, $a1, 0x2 D_80241CD0: /* 1705B0 80241CD0 26310001 */ addiu $s1, $s1, 0x1 D_80241CD4: /* 1705B4 80241CD4 2542FFFF */ addiu $v0, $t2, -0x1 D_80241CD8: /* 1705B8 80241CD8 0222102A */ slt $v0, $s1, $v0 glabel func_80241CDC /* 1705BC 80241CDC 1440FFD5 */ bnez $v0, func_80241C34 .L80241CE0: /* 1705C0 80241CE0 256B0002 */ addiu $t3, $t3, 0x2 D_80241CE4: /* 1705C4 80241CE4 0C090398 */ jal func_80240E60 glabel func_80241CE8 /* 1705C8 80241CE8 A2800170 */ sb $zero, 0x170($s4) glabel func_80241CEC /* 1705CC 80241CEC 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) D_80241CF0: /* 1705D0 80241CF0 3C10800E */ lui $s0, %hi(gBattleStatus) D_80241CF4: /* 1705D4 80241CF4 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) glabel dead_flo_14_FlyingAI_Init /* 1705D8 80241CF8 8E020004 */ lw $v0, 0x4($s0) glabel .L80241CFC /* 1705DC 80241CFC 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF) glabel func_80241D00 /* 1705E0 80241D00 A2800099 */ sb $zero, 0x99($s4) glabel func_80241D04 /* 1705E4 80241D04 00431824 */ and $v1, $v0, $v1 glabel func_80241D08 /* 1705E8 80241D08 30420040 */ andi $v0, $v0, 0x40 .L80241D0C: /* 1705EC 80241D0C 14400023 */ bnez $v0, D_80241D9C glabel .L80241D10 /* 1705F0 80241D10 AE030004 */ sw $v1, 0x4($s0) D_80241D14: /* 1705F4 80241D14 82420002 */ lb $v0, 0x2($s2) glabel func_80241D18 /* 1705F8 80241D18 28420002 */ slti $v0, $v0, 0x2 glabel func_80241D1C /* 1705FC 80241D1C 1040000B */ beqz $v0, .L80241D4C glabel func_80241D20 /* 170600 80241D20 00000000 */ nop glabel func_80241D24 /* 170604 80241D24 0C03A752 */ jal is_ability_active glabel func_80241D28 /* 170608 80241D28 24040014 */ addiu $a0, $zero, 0x14 glabel .L80241D2C /* 17060C 80241D2C 10400007 */ beqz $v0, .L80241D4C glabel func_80241D30 /* 170610 80241D30 3C020800 */ lui $v0, (0x8000000 >> 16) D_80241D34: /* 170614 80241D34 8E030004 */ lw $v1, 0x4($s0) D_80241D38: /* 170618 80241D38 92840099 */ lbu $a0, 0x99($s4) glabel func_80241D3C /* 17061C 80241D3C 00621825 */ or $v1, $v1, $v0 .L80241D40: /* 170620 80241D40 34840001 */ ori $a0, $a0, 0x1 glabel func_80241D44 /* 170624 80241D44 AE030004 */ sw $v1, 0x4($s0) .L80241D48: /* 170628 80241D48 A2840099 */ sb $a0, 0x99($s4) .L80241D4C: /* 17062C 80241D4C 82420002 */ lb $v0, 0x2($s2) glabel func_80241D50 /* 170630 80241D50 28420006 */ slti $v0, $v0, 0x6 glabel .L80241D54 /* 170634 80241D54 10400011 */ beqz $v0, D_80241D9C glabel func_80241D58 /* 170638 80241D58 00000000 */ nop glabel func_80241D5C /* 17063C 80241D5C 0C03A752 */ jal is_ability_active glabel func_80241D60 /* 170640 80241D60 2404001E */ addiu $a0, $zero, 0x1E glabel func_80241D64 /* 170644 80241D64 1040000D */ beqz $v0, D_80241D9C glabel dead_kzn_17_set_script_owner_npc_anim /* 170648 80241D68 00000000 */ nop D_80241D6C: /* 17064C 80241D6C 92820099 */ lbu $v0, 0x99($s4) glabel func_80241D70 /* 170650 80241D70 30420001 */ andi $v0, $v0, 0x1 glabel func_80241D74 /* 170654 80241D74 14400009 */ bnez $v0, D_80241D9C glabel .L80241D78 /* 170658 80241D78 3C040800 */ lui $a0, (0x8000000 >> 16) glabel func_80241D7C /* 17065C 80241D7C 3C05800E */ lui $a1, %hi(gBattleStatus) glabel .L80241D80 /* 170660 80241D80 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus) glabel func_80241D84 /* 170664 80241D84 8CA20004 */ lw $v0, 0x4($a1) glabel func_80241D88 /* 170668 80241D88 92830099 */ lbu $v1, 0x99($s4) glabel func_80241D8C /* 17066C 80241D8C 00441025 */ or $v0, $v0, $a0 glabel func_80241D90 /* 170670 80241D90 34630002 */ ori $v1, $v1, 0x2 glabel func_80241D94 /* 170674 80241D94 ACA20004 */ sw $v0, 0x4($a1) D_80241D98: /* 170678 80241D98 A2830099 */ sb $v1, 0x99($s4) D_80241D9C: /* 17067C 80241D9C 3C04800E */ lui $a0, %hi(gBattleStatus) dead_flo_10_varStash: /* 170680 80241DA0 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) glabel func_80241DA4 /* 170684 80241DA4 8C820000 */ lw $v0, 0x0($a0) glabel func_80241DA8 /* 170688 80241DA8 3C032000 */ lui $v1, (0x20000000 >> 16) glabel func_80241DAC /* 17068C 80241DAC 00431024 */ and $v0, $v0, $v1 glabel func_80241DB0 /* 170690 80241DB0 50400001 */ beql $v0, $zero, func_80241DB8 glabel .L80241DB4 /* 170694 80241DB4 A2800097 */ sb $zero, 0x97($s4) glabel func_80241DB8 /* 170698 80241DB8 8C820000 */ lw $v0, 0x0($a0) D_80241DBC: /* 17069C 80241DBC 3C031000 */ lui $v1, (0x10000000 >> 16) glabel func_80241DC0 /* 1706A0 80241DC0 00431024 */ and $v0, $v0, $v1 glabel func_80241DC4 /* 1706A4 80241DC4 50400001 */ beql $v0, $zero, mgm_02_UpdateRecords glabel .L80241DC8 /* 1706A8 80241DC8 A2800096 */ sb $zero, 0x96($s4) glabel mgm_02_UpdateRecords /* 1706AC 80241DCC 3C028007 */ lui $v0, %hi(gGameStatusPtr) D_80241DD0: /* 1706B0 80241DD0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) glabel .L80241DD4 /* 1706B4 80241DD4 80430074 */ lb $v1, 0x74($v0) D_80241DD8: /* 1706B8 80241DD8 24020004 */ addiu $v0, $zero, 0x4 glabel func_80241DDC /* 1706BC 80241DDC 14620003 */ bne $v1, $v0, .L80241DEC glabel func_80241DE0 /* 1706C0 80241DE0 24020003 */ addiu $v0, $zero, 0x3 glabel dead_flo_13_LakituAI_Main /* 1706C4 80241DE4 080907FC */ j func_80241FF0 glabel .L80241DE8 /* 1706C8 80241DE8 24040018 */ addiu $a0, $zero, 0x18 .L80241DEC: /* 1706CC 80241DEC 14620018 */ bne $v1, $v0, D_80241E50 glabel func_80241DF0 /* 1706D0 80241DF0 0000882D */ daddu $s1, $zero, $zero glabel .L80241DF4 /* 1706D4 80241DF4 24130020 */ addiu $s3, $zero, 0x20 glabel func_80241DF8 /* 1706D8 80241DF8 0280902D */ daddu $s2, $s4, $zero glabel func_80241DFC /* 1706DC 80241DFC 8E5000E0 */ lw $s0, 0xE0($s2) D_80241E00: /* 1706E0 80241E00 5200000E */ beql $s0, $zero, func_80241E3C glabel func_80241E04 /* 1706E4 80241E04 26310001 */ addiu $s1, $s1, 0x1 D_80241E08: /* 1706E8 80241E08 8E0401C8 */ lw $a0, 0x1C8($s0) glabel func_80241E0C /* 1706EC 80241E0C 5080000B */ beql $a0, $zero, func_80241E3C D_80241E10: /* 1706F0 80241E10 26310001 */ addiu $s1, $s1, 0x1 .L80241E14: /* 1706F4 80241E14 2405000A */ addiu $a1, $zero, 0xA glabel func_80241E18 /* 1706F8 80241E18 0C0B0CF8 */ jal start_script glabel dead_flo_14_FlyingAI_Main /* 1706FC 80241E1C 0000302D */ daddu $a2, $zero, $zero glabel func_80241E20 /* 170700 80241E20 AE0201D8 */ sw $v0, 0x1D8($s0) glabel func_80241E24 /* 170704 80241E24 8C440144 */ lw $a0, 0x144($v0) glabel func_80241E28 /* 170708 80241E28 36230200 */ ori $v1, $s1, 0x200 D_80241E2C: /* 17070C 80241E2C AC430148 */ sw $v1, 0x148($v0) D_80241E30: /* 170710 80241E30 A21301F0 */ sb $s3, 0x1F0($s0) D_80241E34: /* 170714 80241E34 AE0401E8 */ sw $a0, 0x1E8($s0) glabel func_80241E38 /* 170718 80241E38 26310001 */ addiu $s1, $s1, 0x1 glabel func_80241E3C /* 17071C 80241E3C 2A220018 */ slti $v0, $s1, 0x18 D_80241E40: /* 170720 80241E40 1440FFEE */ bnez $v0, func_80241DFC glabel func_80241E44 /* 170724 80241E44 26520004 */ addiu $s2, $s2, 0x4 D_80241E48: /* 170728 80241E48 080907BD */ j D_80241EF4 glabel func_80241E4C /* 17072C 80241E4C 2402000A */ addiu $v0, $zero, 0xA D_80241E50: /* 170730 80241E50 2413000A */ addiu $s3, $zero, 0xA glabel .L80241E54 /* 170734 80241E54 0280902D */ daddu $s2, $s4, $zero D_80241E58: /* 170738 80241E58 8E5000E0 */ lw $s0, 0xE0($s2) D_80241E5C: /* 17073C 80241E5C 52000010 */ beql $s0, $zero, D_80241EA0 glabel func_80241E60 /* 170740 80241E60 26310001 */ addiu $s1, $s1, 0x1 glabel func_80241E64 /* 170744 80241E64 8E0201CC */ lw $v0, 0x1CC($s0) D_80241E68: /* 170748 80241E68 5040000D */ beql $v0, $zero, D_80241EA0 glabel func_80241E6C /* 17074C 80241E6C 26310001 */ addiu $s1, $s1, 0x1 glabel dead_flo_08_CheckVineTriggerDist /* 170750 80241E70 2405000A */ addiu $a1, $zero, 0xA glabel .L80241E74 /* 170754 80241E74 A29301A7 */ sb $s3, 0x1A7($s4) D_80241E78: /* 170758 80241E78 8E0401CC */ lw $a0, 0x1CC($s0) .L80241E7C: /* 17075C 80241E7C 0C0B0CF8 */ jal start_script glabel func_80241E80 /* 170760 80241E80 0000302D */ daddu $a2, $zero, $zero glabel .L80241E84 /* 170764 80241E84 0040182D */ daddu $v1, $v0, $zero glabel dgb_07_pad_1E74 /* 170768 80241E88 AE0301DC */ sw $v1, 0x1DC($s0) glabel func_80241E8C /* 17076C 80241E8C 8C620144 */ lw $v0, 0x144($v1) D_80241E90: /* 170770 80241E90 AE0201EC */ sw $v0, 0x1EC($s0) glabel dgb_15_pad_1E94 /* 170774 80241E94 36220200 */ ori $v0, $s1, 0x200 D_80241E98: /* 170778 80241E98 AC620148 */ sw $v0, 0x148($v1) glabel .L80241E9C /* 17077C 80241E9C 26310001 */ addiu $s1, $s1, 0x1 D_80241EA0: /* 170780 80241EA0 2A220018 */ slti $v0, $s1, 0x18 glabel func_80241EA4 /* 170784 80241EA4 1440FFEC */ bnez $v0, D_80241E58 D_80241EA8: /* 170788 80241EA8 26520004 */ addiu $s2, $s2, 0x4 glabel func_80241EAC /* 17078C 80241EAC 8E9500DC */ lw $s5, 0xDC($s4) D_80241EB0: /* 170790 80241EB0 12A00010 */ beqz $s5, D_80241EF4 glabel func_80241EB4 /* 170794 80241EB4 24020005 */ addiu $v0, $zero, 0x5 glabel func_80241EB8 /* 170798 80241EB8 8EA201CC */ lw $v0, 0x1CC($s5) glabel .L80241EBC /* 17079C 80241EBC 1040000C */ beqz $v0, func_80241EF0 .L80241EC0: /* 1707A0 80241EC0 2405000A */ addiu $a1, $zero, 0xA glabel .L80241EC4 /* 1707A4 80241EC4 00A0102D */ daddu $v0, $a1, $zero glabel .L80241EC8 /* 1707A8 80241EC8 A28201A7 */ sb $v0, 0x1A7($s4) D_80241ECC: /* 1707AC 80241ECC 8EA401CC */ lw $a0, 0x1CC($s5) D_80241ED0: /* 1707B0 80241ED0 0C0B0CF8 */ jal start_script D_80241ED4: /* 1707B4 80241ED4 0000302D */ daddu $a2, $zero, $zero glabel .L80241ED8 /* 1707B8 80241ED8 0040182D */ daddu $v1, $v0, $zero glabel .L80241EDC /* 1707BC 80241EDC AEA301DC */ sw $v1, 0x1DC($s5) D_80241EE0: /* 1707C0 80241EE0 8C620144 */ lw $v0, 0x144($v1) .L80241EE4: /* 1707C4 80241EE4 AEA201EC */ sw $v0, 0x1EC($s5) glabel func_80241EE8 /* 1707C8 80241EE8 24020100 */ addiu $v0, $zero, 0x100 D_80241EEC: /* 1707CC 80241EEC AC620148 */ sw $v0, 0x148($v1) glabel func_80241EF0 /* 1707D0 80241EF0 24020005 */ addiu $v0, $zero, 0x5 D_80241EF4: /* 1707D4 80241EF4 3C01800E */ lui $at, %hi(gBattleSubState) glabel func_80241EF8 /* 1707D8 80241EF8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel func_80241EFC /* 1707DC 80241EFC 3C03800E */ lui $v1, %hi(gBattleSubState) D_80241F00: /* 1707E0 80241F00 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_80241F04: /* 1707E4 80241F04 24020005 */ addiu $v0, $zero, 0x5 glabel func_80241F08 /* 1707E8 80241F08 14620020 */ bne $v1, $v0, D_80241F8C glabel .L80241F0C /* 1707EC 80241F0C 2402000A */ addiu $v0, $zero, 0xA D_80241F10: /* 1707F0 80241F10 0000982D */ daddu $s3, $zero, $zero D_80241F14: /* 1707F4 80241F14 0260882D */ daddu $s1, $s3, $zero glabel dead_kzn_17_UnkNpcAIFunc12 /* 1707F8 80241F18 0280902D */ daddu $s2, $s4, $zero glabel func_80241F1C /* 1707FC 80241F1C 8E5000E0 */ lw $s0, 0xE0($s2) D_80241F20: /* 170800 80241F20 5200000A */ beql $s0, $zero, func_80241F4C glabel .L80241F24 /* 170804 80241F24 26310001 */ addiu $s1, $s1, 0x1 D_80241F28: /* 170808 80241F28 8E0201CC */ lw $v0, 0x1CC($s0) D_80241F2C: /* 17080C 80241F2C 50400007 */ beql $v0, $zero, func_80241F4C glabel func_80241F30 /* 170810 80241F30 26310001 */ addiu $s1, $s1, 0x1 glabel .L80241F34 /* 170814 80241F34 8E0401EC */ lw $a0, 0x1EC($s0) glabel mgm_02_GiveCoinReward /* 170818 80241F38 0C0B1059 */ jal does_script_exist .L80241F3C: /* 17081C 80241F3C 00000000 */ nop D_80241F40: /* 170820 80241F40 54400001 */ bnel $v0, $zero, D_80241F48 glabel func_80241F44 /* 170824 80241F44 24130001 */ addiu $s3, $zero, 0x1 D_80241F48: /* 170828 80241F48 26310001 */ addiu $s1, $s1, 0x1 glabel func_80241F4C /* 17082C 80241F4C 2A220018 */ slti $v0, $s1, 0x18 glabel func_80241F50 /* 170830 80241F50 1440FFF2 */ bnez $v0, func_80241F1C glabel func_80241F54 /* 170834 80241F54 26520004 */ addiu $s2, $s2, 0x4 .L80241F58: /* 170838 80241F58 12A00008 */ beqz $s5, .L80241F7C D_80241F5C: /* 17083C 80241F5C 00000000 */ nop glabel func_80241F60 /* 170840 80241F60 8EA201CC */ lw $v0, 0x1CC($s5) glabel func_80241F64 /* 170844 80241F64 10400005 */ beqz $v0, .L80241F7C glabel func_80241F68 /* 170848 80241F68 00000000 */ nop D_80241F6C: /* 17084C 80241F6C 0C0B1059 */ jal does_script_exist glabel func_80241F70 /* 170850 80241F70 8EA401EC */ lw $a0, 0x1EC($s5) glabel .L80241F74 /* 170854 80241F74 54400001 */ bnel $v0, $zero, .L80241F7C glabel func_80241F78 /* 170858 80241F78 24130001 */ addiu $s3, $zero, 0x1 glabel .L80241F7C /* 17085C 80241F7C 12600018 */ beqz $s3, dead_flo_08_SuperBlock_CantUpgradeMessages D_80241F80: /* 170860 80241F80 2402000A */ addiu $v0, $zero, 0xA .L80241F84: /* 170864 80241F84 3C03800E */ lui $v1, %hi(gBattleSubState) D_80241F88: /* 170868 80241F88 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_80241F8C: /* 17086C 80241F8C 1462001A */ bne $v1, $v0, D_80241FF8 .L80241F90: /* 170870 80241F90 0000982D */ daddu $s3, $zero, $zero D_80241F94: /* 170874 80241F94 0260882D */ daddu $s1, $s3, $zero D_80241F98: /* 170878 80241F98 0280902D */ daddu $s2, $s4, $zero glabel func_80241F9C /* 17087C 80241F9C 8E5000E0 */ lw $s0, 0xE0($s2) glabel func_80241FA0 /* 170880 80241FA0 5200000A */ beql $s0, $zero, func_80241FCC D_80241FA4: /* 170884 80241FA4 26310001 */ addiu $s1, $s1, 0x1 glabel func_80241FA8 /* 170888 80241FA8 8E0201C8 */ lw $v0, 0x1C8($s0) glabel func_80241FAC /* 17088C 80241FAC 50400007 */ beql $v0, $zero, func_80241FCC glabel func_80241FB0 /* 170890 80241FB0 26310001 */ addiu $s1, $s1, 0x1 glabel func_80241FB4 /* 170894 80241FB4 8E0401E8 */ lw $a0, 0x1E8($s0) glabel func_80241FB8 /* 170898 80241FB8 0C0B1059 */ jal does_script_exist D_80241FBC: /* 17089C 80241FBC 00000000 */ nop D_80241FC0: /* 1708A0 80241FC0 54400001 */ bnel $v0, $zero, D_80241FC8 D_80241FC4: /* 1708A4 80241FC4 24130001 */ addiu $s3, $zero, 0x1 D_80241FC8: /* 1708A8 80241FC8 26310001 */ addiu $s1, $s1, 0x1 glabel func_80241FCC /* 1708AC 80241FCC 2A220018 */ slti $v0, $s1, 0x18 glabel func_80241FD0 /* 1708B0 80241FD0 1440FFF2 */ bnez $v0, func_80241F9C D_80241FD4: /* 1708B4 80241FD4 26520004 */ addiu $s2, $s2, 0x4 .L80241FD8: /* 1708B8 80241FD8 16600007 */ bnez $s3, D_80241FF8 glabel func_80241FDC /* 1708BC 80241FDC 00000000 */ nop dead_flo_08_SuperBlock_CantUpgradeMessages: /* 1708C0 80241FE0 0C098D0D */ jal btl_check_enemies_defeated glabel mgm_02_CleanupGame /* 1708C4 80241FE4 00000000 */ nop dead_flo_08_SuperBlock_PartnerIDs: /* 1708C8 80241FE8 14400003 */ bnez $v0, D_80241FF8 .L80241FEC: /* 1708CC 80241FEC 24040007 */ addiu $a0, $zero, 0x7 glabel func_80241FF0 /* 1708D0 80241FF0 0C090464 */ jal func_80241190 D_80241FF4: /* 1708D4 80241FF4 00000000 */ nop D_80241FF8: /* 1708D8 80241FF8 8FBF0028 */ lw $ra, 0x28($sp) glabel func_80241FFC /* 1708DC 80241FFC 8FB50024 */ lw $s5, 0x24($sp) D_80242000: /* 1708E0 80242000 8FB40020 */ lw $s4, 0x20($sp) flo_09_pad_2004: /* 1708E4 80242004 8FB3001C */ lw $s3, 0x1C($sp) glabel func_80242008 /* 1708E8 80242008 8FB20018 */ lw $s2, 0x18($sp) glabel .L8024200C /* 1708EC 8024200C 8FB10014 */ lw $s1, 0x14($sp) D_80242010: /* 1708F0 80242010 8FB00010 */ lw $s0, 0x10($sp) glabel func_80242014 /* 1708F4 80242014 03E00008 */ jr $ra .L80242018: /* 1708F8 80242018 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_begin_turn(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; Actor* partner = battleStatus->partnerActor; Actor* player = battleStatus->playerActor; Actor* enemy; Actor* enemy1; Actor* enemy2; Evt* script; Evt* script2; s32 cond; u16 id1; u16 id2; s32 numEnemyActors; s32 i; s32 j; s16* enemyIDs; if (gBattleSubState == BTL_SUBSTATE_BEGIN_TURN_INIT) { battleStatus->flags2 &= ~BS_FLAGS2_2; battleStatus->flags2 &= ~BS_FLAGS2_4; battleStatus->flags2 &= ~BS_FLAGS2_8; battleStatus->flags2 &= ~BS_FLAGS2_10; battleStatus->merleeAttackBoost = 0; battleStatus->merleeDefenseBoost = 0; battleStatus->flags2 &= ~BS_FLAGS2_1000000; player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; player->disableDismissTimer = 0; if (partner != NULL) { player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; partner->disableDismissTimer = 0; } if (battleStatus->hustleTurns != 0) { gBattleStatus.flags1 |= BS_FLAGS1_HUSTLED; } numEnemyActors = 0; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL) { battleStatus->enemyIDs[numEnemyActors] = i | ACTOR_ENEMY0; numEnemyActors++; } } battleStatus->numEnemyActors = numEnemyActors; // sort enemies by x-position or turn priority enemyIDs = battleStatus->enemyIDs; for (i = 0; i < numEnemyActors - 1; i++) { for (j = i + 1; j < numEnemyActors; j++) { id1 = enemyIDs[i]; id2 = enemyIDs[j]; enemy1 = battleStatus->enemyActors[id1 & 0xFF]; enemy2 = battleStatus->enemyActors[id2 & 0xFF]; if (gBattleStatus.flags1 & BS_FLAGS1_SORT_ENEMIES_BY_POSX) { if (enemy1->homePos.x > enemy2->homePos.x) { enemyIDs[i] = id2; enemyIDs[j] = id1; } } else if (enemy1->turnPriority < enemy2->turnPriority) { enemyIDs[i] = id2; enemyIDs[j] = id1; } } } battleStatus->nextEnemyIndex = 0; btl_merlee_on_start_turn(); // 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; } } } if (!(gBattleStatus.flags1 & BS_FLAGS1_JUMP_CHARGED)) { battleStatus->jumpCharge = 0; } if (!(gBattleStatus.flags1 & BS_FLAGS1_HAMMER_CHARGED)) { battleStatus->hammerCharge = 0; } if (gGameStatusPtr->debugEnemyContact == DEBUG_CONTACT_AUTO_FLEE) { btl_set_state(BATTLE_STATE_RUN_AWAY); return; } if (gGameStatusPtr->debugEnemyContact == DEBUG_CONTACT_DIE_IN_BATTLE) { for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->handleEventSource != NULL) { Evt* script = start_script(enemy->handleEventSource, EVT_PRIORITY_A, 0); enemy->handleEventScript = script; script->owner1.actorID = i | ACTOR_ENEMY0; enemy->handleEventScriptID = script->id; enemy->lastEventType = EVENT_DEATH; } } gBattleSubState = BTL_SUBSTATE_BEGIN_TURN_AWAIT_ENEMY_DEATH; } else { for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->handlePhaseSource != NULL) { battleStatus->battlePhase = PHASE_PLAYER_BEGIN; script = start_script(enemy->handlePhaseSource, EVT_PRIORITY_A, 0); enemy->handlePhaseScript = script; enemy->handleBatttlePhaseScriptID = script->id; script->owner1.actorID = i | ACTOR_ENEMY0; } } partner = battleStatus->partnerActor; if (partner != NULL) { if (partner->handlePhaseSource != NULL) { battleStatus->battlePhase = PHASE_PLAYER_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_BEGIN_TURN_AWAIT_ENEMY_SCRIPTS; } } if (gBattleSubState == BTL_SUBSTATE_BEGIN_TURN_AWAIT_ENEMY_SCRIPTS) { cond = FALSE; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->handlePhaseSource != NULL && does_script_exist(enemy->handleBatttlePhaseScriptID)) { cond = TRUE; } } if (partner != NULL && partner->handlePhaseSource != NULL && does_script_exist(partner->handleBatttlePhaseScriptID)) { cond = TRUE; } if (!cond) { if (!btl_check_enemies_defeated()) { btl_set_state(BATTLE_STATE_BEGIN_PLAYER_TURN); } return; } } if (gBattleSubState == BTL_SUBSTATE_BEGIN_TURN_AWAIT_ENEMY_DEATH) { cond = FALSE; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL && enemy->handleEventSource != NULL && does_script_exist(enemy->handleEventScriptID)) { cond = TRUE; } } if (!cond) { if (!btl_check_enemies_defeated()) { btl_set_state(BATTLE_STATE_BEGIN_PLAYER_TURN); } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802AACD8_7B2678 /* 41FA68 802AACD8 27BDFF58 */ addiu $sp, $sp, -0xA8 /* 41FA6C 802AACDC 3C02800E */ lui $v0, %hi(gBattleStatus) /* 41FA70 802AACE0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) /* 41FA74 802AACE4 3C030008 */ lui $v1, (0x80000 >> 16) /* 41FA78 802AACE8 AFBF008C */ sw $ra, 0x8C($sp) /* 41FA7C 802AACEC AFBE0088 */ sw $fp, 0x88($sp) /* 41FA80 802AACF0 AFB70084 */ sw $s7, 0x84($sp) /* 41FA84 802AACF4 AFB60080 */ sw $s6, 0x80($sp) /* 41FA88 802AACF8 AFB5007C */ sw $s5, 0x7C($sp) /* 41FA8C 802AACFC AFB40078 */ sw $s4, 0x78($sp) /* 41FA90 802AAD00 AFB30074 */ sw $s3, 0x74($sp) /* 41FA94 802AAD04 AFB20070 */ sw $s2, 0x70($sp) /* 41FA98 802AAD08 AFB1006C */ sw $s1, 0x6C($sp) /* 41FA9C 802AAD0C AFB00068 */ sw $s0, 0x68($sp) /* 41FAA0 802AAD10 F7B800A0 */ sdc1 $f24, 0xA0($sp) /* 41FAA4 802AAD14 F7B60098 */ sdc1 $f22, 0x98($sp) /* 41FAA8 802AAD18 F7B40090 */ sdc1 $f20, 0x90($sp) /* 41FAAC 802AAD1C 00431024 */ and $v0, $v0, $v1 /* 41FAB0 802AAD20 14400005 */ bnez $v0, .L802AAD38_7B26D8 /* 41FAB4 802AAD24 00000000 */ nop /* 41FAB8 802AAD28 3C16800E */ lui $s6, %hi(gBattleStatus + 0xD8) /* 41FABC 802AAD2C 8ED6C148 */ lw $s6, %lo(gBattleStatus + 0xD8)($s6) /* 41FAC0 802AAD30 080AAB50 */ j .L802AAD40_7B26E0 /* 41FAC4 802AAD34 00000000 */ nop .L802AAD38_7B26D8: /* 41FAC8 802AAD38 3C16800E */ lui $s6, %hi(gBattleStatus + 0xDC) /* 41FACC 802AAD3C 8ED6C14C */ lw $s6, %lo(gBattleStatus + 0xDC)($s6) .L802AAD40_7B26E0: /* 41FAD0 802AAD40 82C9040C */ lb $t1, 0x40C($s6) /* 41FAD4 802AAD44 AFA9005C */ sw $t1, 0x5C($sp) /* 41FAD8 802AAD48 82C90425 */ lb $t1, 0x425($s6) /* 41FADC 802AAD4C 26D1022C */ addiu $s1, $s6, 0x22C /* 41FAE0 802AAD50 AFA90060 */ sw $t1, 0x60($sp) /* 41FAE4 802AAD54 8FA9005C */ lw $t1, 0x5C($sp) /* 41FAE8 802AAD58 11200166 */ beqz $t1, .L802AB2F4_7B2C94 /* 41FAEC 802AAD5C 26D7040D */ addiu $s7, $s6, 0x40D /* 41FAF0 802AAD60 3C02800E */ lui $v0, %hi(gBattleStatus + 0x184) /* 41FAF4 802AAD64 8C42C1F4 */ lw $v0, %lo(gBattleStatus + 0x184)($v0) /* 41FAF8 802AAD68 30420001 */ andi $v0, $v0, 0x1 /* 41FAFC 802AAD6C 10400045 */ beqz $v0, .L802AAE84_7B2824 /* 41FB00 802AAD70 00000000 */ nop /* 41FB04 802AAD74 8FA90060 */ lw $t1, 0x60($sp) /* 41FB08 802AAD78 02E91021 */ addu $v0, $s7, $t1 /* 41FB0C 802AAD7C 80430000 */ lb $v1, 0x0($v0) /* 41FB10 802AAD80 00031080 */ sll $v0, $v1, 2 /* 41FB14 802AAD84 00431021 */ addu $v0, $v0, $v1 /* 41FB18 802AAD88 00021080 */ sll $v0, $v0, 2 /* 41FB1C 802AAD8C 2442022C */ addiu $v0, $v0, 0x22C /* 41FB20 802AAD90 02C28821 */ addu $s1, $s6, $v0 /* 41FB24 802AAD94 0C09A75B */ jal get_actor /* 41FB28 802AAD98 86240000 */ lh $a0, 0x0($s1) /* 41FB2C 802AAD9C 3C10802B */ lui $s0, %hi(D_802ACC70) /* 41FB30 802AADA0 8E10CC70 */ lw $s0, %lo(D_802ACC70)($s0) /* 41FB34 802AADA4 86230004 */ lh $v1, 0x4($s1) /* 41FB38 802AADA8 86240006 */ lh $a0, 0x6($s1) /* 41FB3C 802AADAC 8C420000 */ lw $v0, 0x0($v0) /* 41FB40 802AADB0 4483B000 */ mtc1 $v1, $f22 /* 41FB44 802AADB4 00000000 */ nop /* 41FB48 802AADB8 4680B5A0 */ cvt.s.w $f22, $f22 /* 41FB4C 802AADBC 4484C000 */ mtc1 $a0, $f24 /* 41FB50 802AADC0 00000000 */ nop /* 41FB54 802AADC4 4680C620 */ cvt.s.w $f24, $f24 /* 41FB58 802AADC8 86230008 */ lh $v1, 0x8($s1) /* 41FB5C 802AADCC 30420800 */ andi $v0, $v0, 0x800 /* 41FB60 802AADD0 4483A000 */ mtc1 $v1, $f20 /* 41FB64 802AADD4 00000000 */ nop /* 41FB68 802AADD8 4680A520 */ cvt.s.w $f20, $f20 /* 41FB6C 802AADDC 10400008 */ beqz $v0, .L802AAE00_7B27A0 /* 41FB70 802AADE0 24140010 */ addiu $s4, $zero, 0x10 /* 41FB74 802AADE4 24130002 */ addiu $s3, $zero, 0x2 /* 41FB78 802AADE8 0C05122C */ jal hud_element_get_script /* 41FB7C 802AADEC 0200202D */ daddu $a0, $s0, $zero /* 41FB80 802AADF0 3C058008 */ lui $a1, %hi(HES_HandPointLeftLoop) /* 41FB84 802AADF4 24A50208 */ addiu $a1, $a1, %lo(HES_HandPointLeftLoop) /* 41FB88 802AADF8 080AAB86 */ j .L802AAE18_7B27B8 /* 41FB8C 802AADFC 00000000 */ nop .L802AAE00_7B27A0: /* 41FB90 802AAE00 24140005 */ addiu $s4, $zero, 0x5 /* 41FB94 802AAE04 2413FFF5 */ addiu $s3, $zero, -0xB /* 41FB98 802AAE08 0C05122C */ jal hud_element_get_script /* 41FB9C 802AAE0C 0200202D */ daddu $a0, $s0, $zero /* 41FBA0 802AAE10 3C058008 */ lui $a1, %hi(HES_HandPointDownLoop) /* 41FBA4 802AAE14 24A5FF20 */ addiu $a1, $a1, %lo(HES_HandPointDownLoop) .L802AAE18_7B27B8: /* 41FBA8 802AAE18 50450004 */ beql $v0, $a1, .L802AAE2C_7B27CC /* 41FBAC 802AAE1C 24040001 */ addiu $a0, $zero, 0x1 /* 41FBB0 802AAE20 0C0511FF */ jal hud_element_set_script /* 41FBB4 802AAE24 0200202D */ daddu $a0, $s0, $zero /* 41FBB8 802AAE28 24040001 */ addiu $a0, $zero, 0x1 .L802AAE2C_7B27CC: /* 41FBBC 802AAE2C 4405B000 */ mfc1 $a1, $f22 /* 41FBC0 802AAE30 4406C000 */ mfc1 $a2, $f24 /* 41FBC4 802AAE34 4407A000 */ mfc1 $a3, $f20 /* 41FBC8 802AAE38 27A20050 */ addiu $v0, $sp, 0x50 /* 41FBCC 802AAE3C AFA20010 */ sw $v0, 0x10($sp) /* 41FBD0 802AAE40 27A20054 */ addiu $v0, $sp, 0x54 /* 41FBD4 802AAE44 AFA20014 */ sw $v0, 0x14($sp) /* 41FBD8 802AAE48 27A20058 */ addiu $v0, $sp, 0x58 /* 41FBDC 802AAE4C 0C00B94E */ jal get_screen_coords /* 41FBE0 802AAE50 AFA20018 */ sw $v0, 0x18($sp) /* 41FBE4 802AAE54 0200202D */ daddu $a0, $s0, $zero /* 41FBE8 802AAE58 8FA50050 */ lw $a1, 0x50($sp) /* 41FBEC 802AAE5C 8FA60054 */ lw $a2, 0x54($sp) /* 41FBF0 802AAE60 00B42821 */ addu $a1, $a1, $s4 /* 41FBF4 802AAE64 0C051261 */ jal hud_element_set_render_pos /* 41FBF8 802AAE68 00D33021 */ addu $a2, $a2, $s3 /* 41FBFC 802AAE6C 3C05802B */ lui $a1, %hi(D_802ACC64) /* 41FC00 802AAE70 8CA5CC64 */ lw $a1, %lo(D_802ACC64)($a1) /* 41FC04 802AAE74 0C0513AC */ jal hud_element_set_alpha /* 41FC08 802AAE78 0200202D */ daddu $a0, $s0, $zero /* 41FC0C 802AAE7C 080AABED */ j .L802AAFB4_7B2954 /* 41FC10 802AAE80 00000000 */ nop .L802AAE84_7B2824: /* 41FC14 802AAE84 1920004B */ blez $t1, .L802AAFB4_7B2954 /* 41FC18 802AAE88 0000902D */ daddu $s2, $zero, $zero /* 41FC1C 802AAE8C 3C1E8008 */ lui $fp, %hi(HES_HandPointDownLoop) /* 41FC20 802AAE90 27DEFF20 */ addiu $fp, $fp, %lo(HES_HandPointDownLoop) /* 41FC24 802AAE94 3C15802B */ lui $s5, %hi(D_802ACC70) /* 41FC28 802AAE98 26B5CC70 */ addiu $s5, $s5, %lo(D_802ACC70) .L802AAE9C_7B283C: /* 41FC2C 802AAE9C 02F21021 */ addu $v0, $s7, $s2 /* 41FC30 802AAEA0 80430000 */ lb $v1, 0x0($v0) /* 41FC34 802AAEA4 00031080 */ sll $v0, $v1, 2 /* 41FC38 802AAEA8 00431021 */ addu $v0, $v0, $v1 /* 41FC3C 802AAEAC 00021080 */ sll $v0, $v0, 2 /* 41FC40 802AAEB0 2442022C */ addiu $v0, $v0, 0x22C /* 41FC44 802AAEB4 02C28821 */ addu $s1, $s6, $v0 /* 41FC48 802AAEB8 0C09A75B */ jal get_actor /* 41FC4C 802AAEBC 86240000 */ lh $a0, 0x0($s1) /* 41FC50 802AAEC0 8EB00000 */ lw $s0, 0x0($s5) /* 41FC54 802AAEC4 86230004 */ lh $v1, 0x4($s1) /* 41FC58 802AAEC8 86240006 */ lh $a0, 0x6($s1) /* 41FC5C 802AAECC 8C420000 */ lw $v0, 0x0($v0) /* 41FC60 802AAED0 4483B000 */ mtc1 $v1, $f22 /* 41FC64 802AAED4 00000000 */ nop /* 41FC68 802AAED8 4680B5A0 */ cvt.s.w $f22, $f22 /* 41FC6C 802AAEDC 4484C000 */ mtc1 $a0, $f24 D_802AAEE0_7B2880: /* 41FC70 802AAEE0 00000000 */ nop /* 41FC74 802AAEE4 4680C620 */ cvt.s.w $f24, $f24 /* 41FC78 802AAEE8 86230008 */ lh $v1, 0x8($s1) /* 41FC7C 802AAEEC 30420800 */ andi $v0, $v0, 0x800 /* 41FC80 802AAEF0 4483A000 */ mtc1 $v1, $f20 /* 41FC84 802AAEF4 00000000 */ nop /* 41FC88 802AAEF8 4680A520 */ cvt.s.w $f20, $f20 /* 41FC8C 802AAEFC 1040000A */ beqz $v0, .L802AAF28_7B28C8 D_802AAF00_7B28A0: /* 41FC90 802AAF00 24140010 */ addiu $s4, $zero, 0x10 /* 41FC94 802AAF04 24130002 */ addiu $s3, $zero, 0x2 /* 41FC98 802AAF08 0C05122C */ jal hud_element_get_script /* 41FC9C 802AAF0C 0200202D */ daddu $a0, $s0, $zero /* 41FCA0 802AAF10 3C098008 */ lui $t1, %hi(HES_HandPointLeftLoop) /* 41FCA4 802AAF14 25290208 */ addiu $t1, $t1, %lo(HES_HandPointLeftLoop) /* 41FCA8 802AAF18 1049000C */ beq $v0, $t1, .L802AAF4C_7B28EC /* 41FCAC 802AAF1C 0120282D */ daddu $a1, $t1, $zero /* 41FCB0 802AAF20 080AABD1 */ j .L802AAF44_7B28E4 /* 41FCB4 802AAF24 0200202D */ daddu $a0, $s0, $zero .L802AAF28_7B28C8: /* 41FCB8 802AAF28 24140005 */ addiu $s4, $zero, 0x5 /* 41FCBC 802AAF2C 2413FFF5 */ addiu $s3, $zero, -0xB /* 41FCC0 802AAF30 0C05122C */ jal hud_element_get_script /* 41FCC4 802AAF34 0200202D */ daddu $a0, $s0, $zero /* 41FCC8 802AAF38 105E0004 */ beq $v0, $fp, .L802AAF4C_7B28EC /* 41FCCC 802AAF3C 03C0282D */ daddu $a1, $fp, $zero /* 41FCD0 802AAF40 0200202D */ daddu $a0, $s0, $zero .L802AAF44_7B28E4: /* 41FCD4 802AAF44 0C0511FF */ jal hud_element_set_script /* 41FCD8 802AAF48 00000000 */ nop .L802AAF4C_7B28EC: /* 41FCDC 802AAF4C 24040001 */ addiu $a0, $zero, 0x1 /* 41FCE0 802AAF50 02449021 */ addu $s2, $s2, $a0 /* 41FCE4 802AAF54 4405B000 */ mfc1 $a1, $f22 /* 41FCE8 802AAF58 4406C000 */ mfc1 $a2, $f24 /* 41FCEC 802AAF5C 4407A000 */ mfc1 $a3, $f20 /* 41FCF0 802AAF60 27A20050 */ addiu $v0, $sp, 0x50 /* 41FCF4 802AAF64 AFA20010 */ sw $v0, 0x10($sp) /* 41FCF8 802AAF68 27A20054 */ addiu $v0, $sp, 0x54 /* 41FCFC 802AAF6C AFA20014 */ sw $v0, 0x14($sp) /* 41FD00 802AAF70 27A20058 */ addiu $v0, $sp, 0x58 /* 41FD04 802AAF74 0C00B94E */ jal get_screen_coords /* 41FD08 802AAF78 AFA20018 */ sw $v0, 0x18($sp) /* 41FD0C 802AAF7C 0200202D */ daddu $a0, $s0, $zero /* 41FD10 802AAF80 8FA50050 */ lw $a1, 0x50($sp) /* 41FD14 802AAF84 8FA60054 */ lw $a2, 0x54($sp) /* 41FD18 802AAF88 00B42821 */ addu $a1, $a1, $s4 /* 41FD1C 802AAF8C 0C051261 */ jal hud_element_set_render_pos /* 41FD20 802AAF90 00D33021 */ addu $a2, $a2, $s3 /* 41FD24 802AAF94 3C05802B */ lui $a1, %hi(D_802ACC64) /* 41FD28 802AAF98 8CA5CC64 */ lw $a1, %lo(D_802ACC64)($a1) /* 41FD2C 802AAF9C 0C0513AC */ jal hud_element_set_alpha /* 41FD30 802AAFA0 0200202D */ daddu $a0, $s0, $zero /* 41FD34 802AAFA4 8FA9005C */ lw $t1, 0x5C($sp) /* 41FD38 802AAFA8 0249102A */ slt $v0, $s2, $t1 /* 41FD3C 802AAFAC 1440FFBB */ bnez $v0, .L802AAE9C_7B283C /* 41FD40 802AAFB0 26B50004 */ addiu $s5, $s5, 0x4 .L802AAFB4_7B2954: /* 41FD44 802AAFB4 3C028011 */ lui $v0, %hi(gPlayerData) /* 41FD48 802AAFB8 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* 41FD4C 802AAFBC 80520012 */ lb $s2, 0x12($v0) /* 41FD50 802AAFC0 24020034 */ addiu $v0, $zero, 0x34 /* 41FD54 802AAFC4 AFA20050 */ sw $v0, 0x50($sp) /* 41FD58 802AAFC8 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) /* 41FD5C 802AAFCC 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) /* 41FD60 802AAFD0 24030040 */ addiu $v1, $zero, 0x40 /* 41FD64 802AAFD4 00431024 */ and $v0, $v0, $v1 /* 41FD68 802AAFD8 10400002 */ beqz $v0, .L802AAFE4_7B2984 /* 41FD6C 802AAFDC AFA30054 */ sw $v1, 0x54($sp) /* 41FD70 802AAFE0 2412000B */ addiu $s2, $zero, 0xB .L802AAFE4_7B2984: /* 41FD74 802AAFE4 3C02800E */ lui $v0, %hi(gBattleStatus + 0x184) /* 41FD78 802AAFE8 8C42C1F4 */ lw $v0, %lo(gBattleStatus + 0x184)($v0) /* 41FD7C 802AAFEC 30420001 */ andi $v0, $v0, 0x1 /* 41FD80 802AAFF0 14400004 */ bnez $v0, .L802AB004_7B29A4 /* 41FD84 802AAFF4 24020001 */ addiu $v0, $zero, 0x1 /* 41FD88 802AAFF8 8FA9005C */ lw $t1, 0x5C($sp) /* 41FD8C 802AAFFC 15220026 */ bne $t1, $v0, .L802AB098_7B2A38 /* 41FD90 802AB000 00000000 */ nop .L802AB004_7B29A4: /* 41FD94 802AB004 86230000 */ lh $v1, 0x0($s1) /* 41FD98 802AB008 14600004 */ bnez $v1, .L802AB01C_7B29BC /* 41FD9C 802AB00C 24020100 */ addiu $v0, $zero, 0x100 /* 41FDA0 802AB010 3C04001D */ lui $a0, (0x1D00C4 >> 16) /* 41FDA4 802AB014 080AAC3C */ j .L802AB0F0_7B2A90 /* 41FDA8 802AB018 348400C4 */ ori $a0, $a0, (0x1D00C4 & 0xFFFF) .L802AB01C_7B29BC: /* 41FDAC 802AB01C 14620005 */ bne $v1, $v0, .L802AB034_7B29D4 D_802AB020_7B29C0: /* 41FDB0 802AB020 00121080 */ sll $v0, $s2, 2 /* 41FDB4 802AB024 3C04802B */ lui $a0, %hi(D_802AB738_7B30D8) /* 41FDB8 802AB028 00822021 */ addu $a0, $a0, $v0 /* 41FDBC 802AB02C 080AAC3C */ j .L802AB0F0_7B2A90 /* 41FDC0 802AB030 8C84B738 */ lw $a0, %lo(D_802AB738_7B30D8)($a0) .L802AB034_7B29D4: /* 41FDC4 802AB034 8FA90060 */ lw $t1, 0x60($sp) /* 41FDC8 802AB038 02E91021 */ addu $v0, $s7, $t1 /* 41FDCC 802AB03C 80430000 */ lb $v1, 0x0($v0) D_802AB040_7B29E0: /* 41FDD0 802AB040 00031080 */ sll $v0, $v1, 2 /* 41FDD4 802AB044 00431021 */ addu $v0, $v0, $v1 /* 41FDD8 802AB048 00021080 */ sll $v0, $v0, 2 /* 41FDDC 802AB04C 2442022C */ addiu $v0, $v0, 0x22C /* 41FDE0 802AB050 02C28821 */ addu $s1, $s6, $v0 /* 41FDE4 802AB054 0C09A75B */ jal get_actor /* 41FDE8 802AB058 86240000 */ lh $a0, 0x0($s1) /* 41FDEC 802AB05C 0040802D */ daddu $s0, $v0, $zero /* 41FDF0 802AB060 86250002 */ lh $a1, 0x2($s1) /* 41FDF4 802AB064 0C099117 */ jal get_actor_part D_802AB068_7B2A08: /* 41FDF8 802AB068 0200202D */ daddu $a0, $s0, $zero /* 41FDFC 802AB06C 8C420008 */ lw $v0, 0x8($v0) /* 41FE00 802AB070 8C440020 */ lw $a0, 0x20($v0) /* 41FE04 802AB074 1480001E */ bnez $a0, .L802AB0F0_7B2A90 /* 41FE08 802AB078 00000000 */ nop /* 41FE0C 802AB07C 92020136 */ lbu $v0, 0x136($s0) /* 41FE10 802AB080 00021080 */ sll $v0, $v0, 2 /* 41FE14 802AB084 3C048028 */ lui $a0, %hi(bActorNames) /* 41FE18 802AB088 00822021 */ addu $a0, $a0, $v0 /* 41FE1C 802AB08C 8C841104 */ lw $a0, %lo(bActorNames)($a0) D_802AB090_7B2A30: /* 41FE20 802AB090 080AAC3C */ j .L802AB0F0_7B2A90 /* 41FE24 802AB094 00000000 */ nop .L802AB098_7B2A38: /* 41FE28 802AB098 8FA90060 */ lw $t1, 0x60($sp) /* 41FE2C 802AB09C 02E91021 */ addu $v0, $s7, $t1 /* 41FE30 802AB0A0 80430000 */ lb $v1, 0x0($v0) /* 41FE34 802AB0A4 00031080 */ sll $v0, $v1, 2 /* 41FE38 802AB0A8 00431021 */ addu $v0, $v0, $v1 /* 41FE3C 802AB0AC 00021080 */ sll $v0, $v0, 2 /* 41FE40 802AB0B0 2442022C */ addiu $v0, $v0, 0x22C /* 41FE44 802AB0B4 02C28821 */ addu $s1, $s6, $v0 D_802AB0B8_7B2A58: /* 41FE48 802AB0B8 86230000 */ lh $v1, 0x0($s1) /* 41FE4C 802AB0BC 14600004 */ bnez $v1, .L802AB0D0_7B2A70 /* 41FE50 802AB0C0 24020100 */ addiu $v0, $zero, 0x100 /* 41FE54 802AB0C4 3C04001D */ lui $a0, (0x1D00C4 >> 16) /* 41FE58 802AB0C8 080AAC3C */ j .L802AB0F0_7B2A90 /* 41FE5C 802AB0CC 348400C4 */ ori $a0, $a0, (0x1D00C4 & 0xFFFF) .L802AB0D0_7B2A70: /* 41FE60 802AB0D0 14620006 */ bne $v1, $v0, .L802AB0EC_7B2A8C /* 41FE64 802AB0D4 3C04001D */ lui $a0, (0x1D00C5 >> 16) /* 41FE68 802AB0D8 00121080 */ sll $v0, $s2, 2 /* 41FE6C 802AB0DC 3C04802B */ lui $a0, (0x802B00C5 >> 16) D_802AB0E0_7B2A80: /* 41FE70 802AB0E0 00822021 */ addu $a0, $a0, $v0 /* 41FE74 802AB0E4 080AAC3C */ j .L802AB0F0_7B2A90 /* 41FE78 802AB0E8 8C84B738 */ lw $a0, %lo(D_802AB738_7B30D8)($a0) .L802AB0EC_7B2A8C: /* 41FE7C 802AB0EC 348400C5 */ ori $a0, $a0, (0x802B00C5 & 0xFFFF) .L802AB0F0_7B2A90: /* 41FE80 802AB0F0 0C04991D */ jal get_msg_width /* 41FE84 802AB0F4 0000282D */ daddu $a1, $zero, $zero /* 41FE88 802AB0F8 2442000A */ addiu $v0, $v0, 0xA /* 41FE8C 802AB0FC 0000202D */ daddu $a0, $zero, $zero /* 41FE90 802AB100 8FA30050 */ lw $v1, 0x50($sp) /* 41FE94 802AB104 8FA70054 */ lw $a3, 0x54($sp) D_802AB108_7B2AA8: /* 41FE98 802AB108 24050004 */ addiu $a1, $zero, 0x4 /* 41FE9C 802AB10C AFA20014 */ sw $v0, 0x14($sp) /* 41FEA0 802AB110 24020014 */ addiu $v0, $zero, 0x14 /* 41FEA4 802AB114 AFA20018 */ sw $v0, 0x18($sp) /* 41FEA8 802AB118 240200FF */ addiu $v0, $zero, 0xFF /* 41FEAC 802AB11C AFA2001C */ sw $v0, 0x1C($sp) /* 41FEB0 802AB120 24020140 */ addiu $v0, $zero, 0x140 /* 41FEB4 802AB124 3C10802B */ lui $s0, %hi(D_802ACC68) /* 41FEB8 802AB128 2610CC68 */ addiu $s0, $s0, %lo(D_802ACC68) /* 41FEBC 802AB12C AFA00010 */ sw $zero, 0x10($sp) D_802AB130_7B2AD0: /* 41FEC0 802AB130 AFA00020 */ sw $zero, 0x20($sp) /* 41FEC4 802AB134 AFA00024 */ sw $zero, 0x24($sp) /* 41FEC8 802AB138 AFA00028 */ sw $zero, 0x28($sp) /* 41FECC 802AB13C AFA0002C */ sw $zero, 0x2C($sp) /* 41FED0 802AB140 AFA00030 */ sw $zero, 0x30($sp) /* 41FED4 802AB144 AFA00034 */ sw $zero, 0x34($sp) /* 41FED8 802AB148 AFA00038 */ sw $zero, 0x38($sp) /* 41FEDC 802AB14C AFA0003C */ sw $zero, 0x3C($sp) /* 41FEE0 802AB150 AFA00040 */ sw $zero, 0x40($sp) /* 41FEE4 802AB154 AFA20044 */ sw $v0, 0x44($sp) D_802AB158_7B2AF8: /* 41FEE8 802AB158 8E060000 */ lw $a2, 0x0($s0) /* 41FEEC 802AB15C 240200F0 */ addiu $v0, $zero, 0xF0 /* 41FEF0 802AB160 AFA20048 */ sw $v0, 0x48($sp) /* 41FEF4 802AB164 AFA0004C */ sw $zero, 0x4C($sp) /* 41FEF8 802AB168 0C03D4B8 */ jal draw_box /* 41FEFC 802AB16C 00663021 */ addu $a2, $v1, $a2 /* 41FF00 802AB170 8FA20050 */ lw $v0, 0x50($sp) /* 41FF04 802AB174 8FA30054 */ lw $v1, 0x54($sp) /* 41FF08 802AB178 24480004 */ addiu $t0, $v0, 0x4 /* 41FF0C 802AB17C 3C02800E */ lui $v0, %hi(gBattleStatus + 0x184) D_802AB180_7B2B20: /* 41FF10 802AB180 8C42C1F4 */ lw $v0, %lo(gBattleStatus + 0x184)($v0) D_802AB184_7B2B24: /* 41FF14 802AB184 24660002 */ addiu $a2, $v1, 0x2 /* 41FF18 802AB188 AFA80050 */ sw $t0, 0x50($sp) /* 41FF1C 802AB18C 30420001 */ andi $v0, $v0, 0x1 /* 41FF20 802AB190 14400005 */ bnez $v0, .L802AB1A8_7B2B48 /* 41FF24 802AB194 AFA60054 */ sw $a2, 0x54($sp) /* 41FF28 802AB198 8FA9005C */ lw $t1, 0x5C($sp) /* 41FF2C 802AB19C 24020001 */ addiu $v0, $zero, 0x1 /* 41FF30 802AB1A0 15220032 */ bne $t1, $v0, .L802AB26C_7B2C0C /* 41FF34 802AB1A4 00000000 */ nop .L802AB1A8_7B2B48: /* 41FF38 802AB1A8 86230000 */ lh $v1, 0x0($s1) /* 41FF3C 802AB1AC 14600004 */ bnez $v1, .L802AB1C0_7B2B60 jtbl_802AB1B0_7B2B50: /* 41FF40 802AB1B0 24020100 */ addiu $v0, $zero, 0x100 /* 41FF44 802AB1B4 3C04001D */ lui $a0, (0x1D00C4 >> 16) /* 41FF48 802AB1B8 080AACB5 */ j .L802AB2D4_7B2C74 /* 41FF4C 802AB1BC 348400C4 */ ori $a0, $a0, (0x1D00C4 & 0xFFFF) .L802AB1C0_7B2B60: /* 41FF50 802AB1C0 1462000A */ bne $v1, $v0, .L802AB1EC_7B2B8C /* 41FF54 802AB1C4 24020036 */ addiu $v0, $zero, 0x36 /* 41FF58 802AB1C8 AFA20010 */ sw $v0, 0x10($sp) /* 41FF5C 802AB1CC 00121080 */ sll $v0, $s2, 2 /* 41FF60 802AB1D0 AFA00014 */ sw $zero, 0x14($sp) /* 41FF64 802AB1D4 8E050000 */ lw $a1, 0x0($s0) /* 41FF68 802AB1D8 3C04802B */ lui $a0, %hi(D_802AB738_7B30D8) /* 41FF6C 802AB1DC 00822021 */ addu $a0, $a0, $v0 /* 41FF70 802AB1E0 8C84B738 */ lw $a0, %lo(D_802AB738_7B30D8)($a0) /* 41FF74 802AB1E4 080AACBA */ j .L802AB2E8_7B2C88 /* 41FF78 802AB1E8 240700FF */ addiu $a3, $zero, 0xFF .L802AB1EC_7B2B8C: /* 41FF7C 802AB1EC 8FA90060 */ lw $t1, 0x60($sp) /* 41FF80 802AB1F0 02E91021 */ addu $v0, $s7, $t1 /* 41FF84 802AB1F4 80430000 */ lb $v1, 0x0($v0) /* 41FF88 802AB1F8 00031080 */ sll $v0, $v1, 2 /* 41FF8C 802AB1FC 00431021 */ addu $v0, $v0, $v1 /* 41FF90 802AB200 00021080 */ sll $v0, $v0, 2 /* 41FF94 802AB204 2442022C */ addiu $v0, $v0, 0x22C /* 41FF98 802AB208 02C28821 */ addu $s1, $s6, $v0 /* 41FF9C 802AB20C 0C09A75B */ jal get_actor /* 41FFA0 802AB210 86240000 */ lh $a0, 0x0($s1) /* 41FFA4 802AB214 0040802D */ daddu $s0, $v0, $zero /* 41FFA8 802AB218 86250002 */ lh $a1, 0x2($s1) /* 41FFAC 802AB21C 0C099117 */ jal get_actor_part /* 41FFB0 802AB220 0200202D */ daddu $a0, $s0, $zero /* 41FFB4 802AB224 8C420008 */ lw $v0, 0x8($v0) /* 41FFB8 802AB228 8C440020 */ lw $a0, 0x20($v0) /* 41FFBC 802AB22C 14800006 */ bnez $a0, .L802AB248_7B2BE8 /* 41FFC0 802AB230 240700FF */ addiu $a3, $zero, 0xFF /* 41FFC4 802AB234 92020136 */ lbu $v0, 0x136($s0) /* 41FFC8 802AB238 00021080 */ sll $v0, $v0, 2 /* 41FFCC 802AB23C 3C048028 */ lui $a0, %hi(bActorNames) /* 41FFD0 802AB240 00822021 */ addu $a0, $a0, $v0 /* 41FFD4 802AB244 8C841104 */ lw $a0, %lo(bActorNames)($a0) .L802AB248_7B2BE8: /* 41FFD8 802AB248 8FA30050 */ lw $v1, 0x50($sp) /* 41FFDC 802AB24C 3C05802B */ lui $a1, %hi(D_802ACC68) /* 41FFE0 802AB250 8CA5CC68 */ lw $a1, %lo(D_802ACC68)($a1) /* 41FFE4 802AB254 8FA60054 */ lw $a2, 0x54($sp) /* 41FFE8 802AB258 24020036 */ addiu $v0, $zero, 0x36 /* 41FFEC 802AB25C AFA20010 */ sw $v0, 0x10($sp) /* 41FFF0 802AB260 AFA00014 */ sw $zero, 0x14($sp) /* 41FFF4 802AB264 080AACBB */ j .L802AB2EC_7B2C8C /* 41FFF8 802AB268 00652821 */ addu $a1, $v1, $a1 .L802AB26C_7B2C0C: /* 41FFFC 802AB26C 8FA90060 */ lw $t1, 0x60($sp) /* 420000 802AB270 02E91021 */ addu $v0, $s7, $t1 /* 420004 802AB274 80430000 */ lb $v1, 0x0($v0) /* 420008 802AB278 00031080 */ sll $v0, $v1, 2 /* 42000C 802AB27C 00431021 */ addu $v0, $v0, $v1 /* 420010 802AB280 00021080 */ sll $v0, $v0, 2 /* 420014 802AB284 00568821 */ addu $s1, $v0, $s6 /* 420018 802AB288 8623022C */ lh $v1, 0x22C($s1) /* 42001C 802AB28C 14600004 */ bnez $v1, .L802AB2A0_7B2C40 /* 420020 802AB290 24020100 */ addiu $v0, $zero, 0x100 /* 420024 802AB294 3C04001D */ lui $a0, (0x1D00C4 >> 16) /* 420028 802AB298 080AACB5 */ j .L802AB2D4_7B2C74 /* 42002C 802AB29C 348400C4 */ ori $a0, $a0, (0x1D00C4 & 0xFFFF) .L802AB2A0_7B2C40: /* 420030 802AB2A0 1462000B */ bne $v1, $v0, .L802AB2D0_7B2C70 /* 420034 802AB2A4 3C04001D */ lui $a0, (0x1D00C5 >> 16) /* 420038 802AB2A8 24020036 */ addiu $v0, $zero, 0x36 /* 42003C 802AB2AC AFA20010 */ sw $v0, 0x10($sp) /* 420040 802AB2B0 00121080 */ sll $v0, $s2, 2 /* 420044 802AB2B4 AFA00014 */ sw $zero, 0x14($sp) /* 420048 802AB2B8 8E050000 */ lw $a1, 0x0($s0) /* 42004C 802AB2BC 3C04802B */ lui $a0, %hi(D_802AB738_7B30D8) /* 420050 802AB2C0 00822021 */ addu $a0, $a0, $v0 /* 420054 802AB2C4 8C84B738 */ lw $a0, %lo(D_802AB738_7B30D8)($a0) /* 420058 802AB2C8 080AACBA */ j .L802AB2E8_7B2C88 /* 42005C 802AB2CC 240700FF */ addiu $a3, $zero, 0xFF .L802AB2D0_7B2C70: /* 420060 802AB2D0 348400C5 */ ori $a0, $a0, (0x1D00C5 & 0xFFFF) .L802AB2D4_7B2C74: /* 420064 802AB2D4 240700FF */ addiu $a3, $zero, 0xFF /* 420068 802AB2D8 8E050000 */ lw $a1, 0x0($s0) /* 42006C 802AB2DC 24020036 */ addiu $v0, $zero, 0x36 /* 420070 802AB2E0 AFA20010 */ sw $v0, 0x10($sp) /* 420074 802AB2E4 AFA00014 */ sw $zero, 0x14($sp) .L802AB2E8_7B2C88: /* 420078 802AB2E8 01052821 */ addu $a1, $t0, $a1 .L802AB2EC_7B2C8C: /* 42007C 802AB2EC 0C04993B */ jal draw_msg /* 420080 802AB2F0 00000000 */ nop .L802AB2F4_7B2C94: /* 420084 802AB2F4 8FBF008C */ lw $ra, 0x8C($sp) /* 420088 802AB2F8 8FBE0088 */ lw $fp, 0x88($sp) /* 42008C 802AB2FC 8FB70084 */ lw $s7, 0x84($sp) /* 420090 802AB300 8FB60080 */ lw $s6, 0x80($sp) /* 420094 802AB304 8FB5007C */ lw $s5, 0x7C($sp) /* 420098 802AB308 8FB40078 */ lw $s4, 0x78($sp) /* 42009C 802AB30C 8FB30074 */ lw $s3, 0x74($sp) /* 4200A0 802AB310 8FB20070 */ lw $s2, 0x70($sp) /* 4200A4 802AB314 8FB1006C */ lw $s1, 0x6C($sp) /* 4200A8 802AB318 8FB00068 */ lw $s0, 0x68($sp) /* 4200AC 802AB31C D7B800A0 */ ldc1 $f24, 0xA0($sp) /* 4200B0 802AB320 D7B60098 */ ldc1 $f22, 0x98($sp) /* 4200B4 802AB324 D7B40090 */ ldc1 $f20, 0x90($sp) /* 4200B8 802AB328 03E00008 */ jr $ra /* 4200BC 802AB32C 27BD00A8 */ addiu $sp, $sp, 0xA8 ### DECOMPILED C INSTRUCTIONS: void btl_state_draw_select_target(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; s32 msgID; s32 msgX; s32 msgY; s32 targetListLength; s32 currentPartner; s32 actorID; SelectableTarget* target; Actor* actor; Actor* anotherActor; s32 id; s32 msgWidth; s32 xOffset, yOffset; f32 targetX, targetY, targetZ; s32 screenX, screenY, screenZ; s32 selectedTargetIndex; s8* targetIndexList; s32* tmpPtr; // TODO required to match and CURSED if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) { actor = battleStatus->playerActor; } else { actor = battleStatus->partnerActor; } targetListLength = actor->targetListLength; target = actor->targetData; selectedTargetIndex = actor->selectedTargetIndex; targetIndexList = actor->targetIndexList; tmpPtr = &D_802ACC68; if (targetListLength != 0) { if (battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) { target = &actor->targetData[targetIndexList[selectedTargetIndex]]; anotherActor = get_actor(target->actorID); id = D_802ACC70[0]; targetX = target->posA.x; targetY = target->posA.y; targetZ = target->posA.z; if (anotherActor->flags & ACTOR_FLAG_UPSIDE_DOWN) { xOffset = 16; yOffset = 2; if (hud_element_get_script(id) != &HES_HandPointLeftLoop) { hud_element_set_script(id, &HES_HandPointLeftLoop); } } else { xOffset = 5; yOffset = -11; if (hud_element_get_script(id) != &HES_HandPointDownLoop) { hud_element_set_script(id, &HES_HandPointDownLoop); } } get_screen_coords(1, targetX, targetY, targetZ, &screenX, &screenY, &screenZ); hud_element_set_render_pos(id, screenX + xOffset, screenY + yOffset); hud_element_set_alpha(id, D_802ACC64); } else { s32 i; for (i = 0; i < targetListLength; i++) { target = &actor->targetData[targetIndexList[i]]; anotherActor = get_actor(target->actorID); id = D_802ACC70[i]; targetX = target->posA.x; targetY = target->posA.y; targetZ = target->posA.z; if (anotherActor->flags & ACTOR_FLAG_UPSIDE_DOWN) { xOffset = 16; yOffset = 2; if (hud_element_get_script(id) != &HES_HandPointLeftLoop) { hud_element_set_script(id, &HES_HandPointLeftLoop); } } else { xOffset = 5; yOffset = -11; if (hud_element_get_script(id) != &HES_HandPointDownLoop) { hud_element_set_script(id, &HES_HandPointDownLoop); } } get_screen_coords(1, targetX, targetY, targetZ, &screenX, &screenY, &screenZ); hud_element_set_render_pos(id, screenX + xOffset, screenY + yOffset); hud_element_set_alpha(id, D_802ACC64); } } currentPartner = playerData->currentPartner; screenX = 52; screenY = 64; if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) { currentPartner = PARTNER_TWINK; } if ((battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) || targetListLength == 1) { actorID = target->actorID; if (actorID == ACTOR_PLAYER) { msgWidth = get_msg_width(MSG_Menus_Battle_TargetMario, 0) + 10; } else if (actorID == ACTOR_PARTNER) { msgWidth = get_msg_width(PartnerNameMessages[currentPartner], 0) + 10; } else { target = &actor->targetData[targetIndexList[selectedTargetIndex]]; anotherActor = get_actor(target->actorID); msgID = get_actor_part(anotherActor, target->partID)->staticData->overrideNameMsg; if (msgID == MSG_NONE) { msgID = bActorNames[anotherActor->actorType]; } msgWidth = get_msg_width(msgID, 0) + 10; } } else { target = &actor->targetData[targetIndexList[selectedTargetIndex]]; actorID = target->actorID; if (actorID == ACTOR_PLAYER) { msgWidth = get_msg_width(MSG_Menus_Battle_TargetMario, 0) + 10; } else if (actorID == ACTOR_PARTNER) { msgWidth = get_msg_width(PartnerNameMessages[currentPartner], 0) + 10; } else { msgWidth = get_msg_width(MSG_Menus_Battle_TargetAllEnemies, 0) + 10; } } draw_box(0, WINDOW_STYLE_4, screenX + D_802ACC68, screenY, 0, msgWidth, 20, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); screenX += 4; screenY += 2; if ((battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) || targetListLength == 1) { actorID = target->actorID; if (actorID == ACTOR_PLAYER) { draw_msg(MSG_Menus_Battle_TargetMario, screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0); } else if (actorID == ACTOR_PARTNER) { draw_msg(PartnerNameMessages[currentPartner], screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0); } else { target = &actor->targetData[targetIndexList[selectedTargetIndex]]; anotherActor = get_actor(target->actorID); msgID = get_actor_part(anotherActor, target->partID)->staticData->overrideNameMsg; if (msgID == MSG_NONE) { msgID = bActorNames[anotherActor->actorType]; } draw_msg(msgID, screenX + *tmpPtr, screenY, 255, MSG_PAL_36, 0); // TODO required to match } } else { target = &actor->targetData[targetIndexList[selectedTargetIndex]]; actorID = target->actorID; if (actorID == ACTOR_PLAYER) { draw_msg(MSG_Menus_Battle_TargetMario, screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0); } else if (actorID == ACTOR_PARTNER) { draw_msg(PartnerNameMessages[currentPartner], screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0); } else { draw_msg(MSG_Menus_Battle_TargetAllEnemies, screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel tubba_heart_attack_update /* 3D18E8 E00CC258 27BDFF10 */ addiu $sp, $sp, -0xF0 /* 3D18EC E00CC25C AFBF00BC */ sw $ra, 0xBC($sp) /* 3D18F0 E00CC260 AFBE00B8 */ sw $fp, 0xB8($sp) /* 3D18F4 E00CC264 AFB700B4 */ sw $s7, 0xB4($sp) /* 3D18F8 E00CC268 AFB600B0 */ sw $s6, 0xB0($sp) /* 3D18FC E00CC26C AFB500AC */ sw $s5, 0xAC($sp) /* 3D1900 E00CC270 AFB400A8 */ sw $s4, 0xA8($sp) /* 3D1904 E00CC274 AFB300A4 */ sw $s3, 0xA4($sp) /* 3D1908 E00CC278 AFB200A0 */ sw $s2, 0xA0($sp) /* 3D190C E00CC27C AFB1009C */ sw $s1, 0x9C($sp) /* 3D1910 E00CC280 AFB00098 */ sw $s0, 0x98($sp) /* 3D1914 E00CC284 F7BE00E8 */ sdc1 $f30, 0xE8($sp) /* 3D1918 E00CC288 F7BC00E0 */ sdc1 $f28, 0xE0($sp) /* 3D191C E00CC28C F7BA00D8 */ sdc1 $f26, 0xD8($sp) /* 3D1920 E00CC290 F7B800D0 */ sdc1 $f24, 0xD0($sp) /* 3D1924 E00CC294 F7B600C8 */ sdc1 $f22, 0xC8($sp) /* 3D1928 E00CC298 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* 3D192C E00CC29C 8C830000 */ lw $v1, 0x0($a0) /* 3D1930 E00CC2A0 8C92000C */ lw $s2, 0xC($a0) /* 3D1934 E00CC2A4 30620010 */ andi $v0, $v1, 0x10 /* 3D1938 E00CC2A8 8E5E0000 */ lw $fp, 0x0($s2) /* 3D193C E00CC2AC 10400005 */ beqz $v0, .LE00CC2C4 /* 3D1940 E00CC2B0 2402FFEF */ addiu $v0, $zero, -0x11 /* 3D1944 E00CC2B4 00621024 */ and $v0, $v1, $v0 /* 3D1948 E00CC2B8 AC820000 */ sw $v0, 0x0($a0) /* 3D194C E00CC2BC 24020040 */ addiu $v0, $zero, 0x40 /* 3D1950 E00CC2C0 AE420010 */ sw $v0, 0x10($s2) .LE00CC2C4: /* 3D1954 E00CC2C4 8E430010 */ lw $v1, 0x10($s2) /* 3D1958 E00CC2C8 286203E8 */ slti $v0, $v1, 0x3E8 /* 3D195C E00CC2CC 10400002 */ beqz $v0, .LE00CC2D8 /* 3D1960 E00CC2D0 2462FFFF */ addiu $v0, $v1, -0x1 /* 3D1964 E00CC2D4 AE420010 */ sw $v0, 0x10($s2) .LE00CC2D8: /* 3D1968 E00CC2D8 8E420014 */ lw $v0, 0x14($s2) /* 3D196C E00CC2DC 8E430010 */ lw $v1, 0x10($s2) /* 3D1970 E00CC2E0 24420001 */ addiu $v0, $v0, 0x1 /* 3D1974 E00CC2E4 04610005 */ bgez $v1, .LE00CC2FC /* 3D1978 E00CC2E8 AE420014 */ sw $v0, 0x14($s2) /* 3D197C E00CC2EC 0C080128 */ jal shim_remove_effect /* 3D1980 E00CC2F0 00000000 */ nop /* 3D1984 E00CC2F4 0803324E */ j .LE00CC938 /* 3D1988 E00CC2F8 00000000 */ nop .LE00CC2FC: /* 3D198C E00CC2FC 0040B02D */ daddu $s6, $v0, $zero /* 3D1990 E00CC300 0000982D */ daddu $s3, $zero, $zero /* 3D1994 E00CC304 3C17E00D */ lui $s7, %hi(D_E00CCDD8) /* 3D1998 E00CC308 26F7CDD8 */ addiu $s7, $s7, %lo(D_E00CCDD8) /* 3D199C E00CC30C 0240882D */ daddu $s1, $s2, $zero /* 3D19A0 E00CC310 0260A82D */ daddu $s5, $s3, $zero /* 3D19A4 E00CC314 0260A02D */ daddu $s4, $s3, $zero /* 3D19A8 E00CC318 4480F000 */ mtc1 $zero, $f30 /* 3D19AC E00CC31C 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D19B0 E00CC320 D43ACE70 */ ldc1 $f26, -0x3190($at) /* 3D19B4 E00CC324 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3D19B8 E00CC328 4481E000 */ mtc1 $at, $f28 /* 3D19BC E00CC32C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3D19C0 E00CC330 4481C800 */ mtc1 $at, $f25 /* 3D19C4 E00CC334 4480C000 */ mtc1 $zero, $f24 .LE00CC338: /* 3D19C8 E00CC338 3C029249 */ lui $v0, (0x92492493 >> 16) /* 3D19CC E00CC33C 34422493 */ ori $v0, $v0, (0x92492493 & 0xFFFF) /* 3D19D0 E00CC340 02C20018 */ mult $s6, $v0 /* 3D19D4 E00CC344 001617C3 */ sra $v0, $s6, 31 /* 3D19D8 E00CC348 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 3D19DC E00CC34C 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 3D19E0 E00CC350 44811000 */ mtc1 $at, $f2 /* 3D19E4 E00CC354 00004010 */ mfhi $t0 /* 3D19E8 E00CC358 01161821 */ addu $v1, $t0, $s6 /* 3D19EC E00CC35C 00031883 */ sra $v1, $v1, 2 /* 3D19F0 E00CC360 00621823 */ subu $v1, $v1, $v0 /* 3D19F4 E00CC364 000310C0 */ sll $v0, $v1, 3 /* 3D19F8 E00CC368 00431023 */ subu $v0, $v0, $v1 /* 3D19FC E00CC36C 02C21023 */ subu $v0, $s6, $v0 /* 3D1A00 E00CC370 3C08E00D */ lui $t0, %hi(D_E00CCDD0) /* 3D1A04 E00CC374 2508CDD0 */ addiu $t0, $t0, %lo(D_E00CCDD0) /* 3D1A08 E00CC378 00481021 */ addu $v0, $v0, $t0 /* 3D1A0C E00CC37C 90420000 */ lbu $v0, 0x0($v0) /* 3D1A10 E00CC380 C6260158 */ lwc1 $f6, 0x158($s1) /* 3D1A14 E00CC384 44820000 */ mtc1 $v0, $f0 /* 3D1A18 E00CC388 00000000 */ nop /* 3D1A1C E00CC38C 46800020 */ cvt.s.w $f0, $f0 /* 3D1A20 E00CC390 46020002 */ mul.s $f0, $f0, $f2 /* 3D1A24 E00CC394 00000000 */ nop /* 3D1A28 E00CC398 C62801BC */ lwc1 $f8, 0x1BC($s1) /* 3D1A2C E00CC39C C62A0220 */ lwc1 $f10, 0x220($s1) /* 3D1A30 E00CC3A0 3C014000 */ lui $at, (0x40000000 >> 16) /* 3D1A34 E00CC3A4 44811000 */ mtc1 $at, $f2 /* 3D1A38 E00CC3A8 8E2306D0 */ lw $v1, 0x6D0($s1) /* 3D1A3C E00CC3AC 46001081 */ sub.s $f2, $f2, $f0 /* 3D1A40 E00CC3B0 2C620015 */ sltiu $v0, $v1, 0x15 /* 3D1A44 E00CC3B4 E6200414 */ swc1 $f0, 0x414($s1) /* 3D1A48 E00CC3B8 10400159 */ beqz $v0, .LE00CC920 /* 3D1A4C E00CC3BC E62203B0 */ swc1 $f2, 0x3B0($s1) /* 3D1A50 E00CC3C0 00031080 */ sll $v0, $v1, 2 /* 3D1A54 E00CC3C4 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D1A58 E00CC3C8 00220821 */ addu $at, $at, $v0 /* 3D1A5C E00CC3CC 8C22CE78 */ lw $v0, -0x3188($at) /* 3D1A60 E00CC3D0 00400008 */ jr $v0 /* 3D1A64 E00CC3D4 00000000 */ nop /* 3D1A68 E00CC3D8 C62004DC */ lwc1 $f0, 0x4DC($s1) /* 3D1A6C E00CC3DC 8E22066C */ lw $v0, 0x66C($s1) /* 3D1A70 E00CC3E0 E626002C */ swc1 $f6, 0x2C($s1) /* 3D1A74 E00CC3E4 461E0000 */ add.s $f0, $f0, $f30 /* 3D1A78 E00CC3E8 E6280090 */ swc1 $f8, 0x90($s1) /* 3D1A7C E00CC3EC E62A00F4 */ swc1 $f10, 0xF4($s1) /* 3D1A80 E00CC3F0 10400004 */ beqz $v0, .LE00CC404 /* 3D1A84 E00CC3F4 E62004DC */ swc1 $f0, 0x4DC($s1) /* 3D1A88 E00CC3F8 2442FFFF */ addiu $v0, $v0, -0x1 /* 3D1A8C E00CC3FC 08033248 */ j .LE00CC920 /* 3D1A90 E00CC400 AE22066C */ sw $v0, 0x66C($s1) .LE00CC404: /* 3D1A94 E00CC404 8E230734 */ lw $v1, 0x734($s1) /* 3D1A98 E00CC408 24020001 */ addiu $v0, $zero, 0x1 /* 3D1A9C E00CC40C AE2206D0 */ sw $v0, 0x6D0($s1) /* 3D1AA0 E00CC410 00771821 */ addu $v1, $v1, $s7 /* 3D1AA4 E00CC414 90620000 */ lbu $v0, 0x0($v1) /* 3D1AA8 E00CC418 44820000 */ mtc1 $v0, $f0 /* 3D1AAC E00CC41C 00000000 */ nop /* 3D1AB0 E00CC420 46800021 */ cvt.d.w $f0, $f0 /* 3D1AB4 E00CC424 463A0002 */ mul.d $f0, $f0, $f26 /* 3D1AB8 E00CC428 00000000 */ nop /* 3D1ABC E00CC42C 8E220734 */ lw $v0, 0x734($s1) /* 3D1AC0 E00CC430 24420001 */ addiu $v0, $v0, 0x1 /* 3D1AC4 E00CC434 AE220734 */ sw $v0, 0x734($s1) /* 3D1AC8 E00CC438 46200020 */ cvt.s.d $f0, $f0 /* 3D1ACC E00CC43C E6200414 */ swc1 $f0, 0x414($s1) /* 3D1AD0 E00CC440 08033248 */ j .LE00CC920 /* 3D1AD4 E00CC444 E62003B0 */ swc1 $f0, 0x3B0($s1) /* 3D1AD8 E00CC448 8E220734 */ lw $v0, 0x734($s1) /* 3D1ADC E00CC44C 00571021 */ addu $v0, $v0, $s7 /* 3D1AE0 E00CC450 90420000 */ lbu $v0, 0x0($v0) /* 3D1AE4 E00CC454 44820000 */ mtc1 $v0, $f0 /* 3D1AE8 E00CC458 00000000 */ nop /* 3D1AEC E00CC45C 46800021 */ cvt.d.w $f0, $f0 /* 3D1AF0 E00CC460 463A0002 */ mul.d $f0, $f0, $f26 /* 3D1AF4 E00CC464 00000000 */ nop /* 3D1AF8 E00CC468 C62204DC */ lwc1 $f2, 0x4DC($s1) /* 3D1AFC E00CC46C 8E220734 */ lw $v0, 0x734($s1) /* 3D1B00 E00CC470 461E1080 */ add.s $f2, $f2, $f30 /* 3D1B04 E00CC474 24420001 */ addiu $v0, $v0, 0x1 /* 3D1B08 E00CC478 AE220734 */ sw $v0, 0x734($s1) /* 3D1B0C E00CC47C 28420008 */ slti $v0, $v0, 0x8 /* 3D1B10 E00CC480 E62204DC */ swc1 $f2, 0x4DC($s1) /* 3D1B14 E00CC484 46200020 */ cvt.s.d $f0, $f0 /* 3D1B18 E00CC488 E6200414 */ swc1 $f0, 0x414($s1) /* 3D1B1C E00CC48C 14400124 */ bnez $v0, .LE00CC920 /* 3D1B20 E00CC490 E62003B0 */ swc1 $f0, 0x3B0($s1) /* 3D1B24 E00CC494 17C00050 */ bnez $fp, .LE00CC5D8 /* 3D1B28 E00CC498 24020014 */ addiu $v0, $zero, 0x14 /* 3D1B2C E00CC49C 08033176 */ j .LE00CC5D8 /* 3D1B30 E00CC4A0 24020002 */ addiu $v0, $zero, 0x2 /* 3D1B34 E00CC4A4 C62004DC */ lwc1 $f0, 0x4DC($s1) /* 3D1B38 E00CC4A8 461E0000 */ add.s $f0, $f0, $f30 /* 3D1B3C E00CC4AC 8E220734 */ lw $v0, 0x734($s1) /* 3D1B40 E00CC4B0 E62004DC */ swc1 $f0, 0x4DC($s1) /* 3D1B44 E00CC4B4 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D1B48 E00CC4B8 00220821 */ addu $at, $at, $v0 /* 3D1B4C E00CC4BC 9022CDF0 */ lbu $v0, -0x3210($at) /* 3D1B50 E00CC4C0 44820000 */ mtc1 $v0, $f0 /* 3D1B54 E00CC4C4 00000000 */ nop /* 3D1B58 E00CC4C8 46800021 */ cvt.d.w $f0, $f0 /* 3D1B5C E00CC4CC 463A0002 */ mul.d $f0, $f0, $f26 /* 3D1B60 E00CC4D0 00000000 */ nop /* 3D1B64 E00CC4D4 C6240284 */ lwc1 $f4, 0x284($s1) /* 3D1B68 E00CC4D8 46062101 */ sub.s $f4, $f4, $f6 /* 3D1B6C E00CC4DC 462005A0 */ cvt.s.d $f22, $f0 /* 3D1B70 E00CC4E0 46162102 */ mul.s $f4, $f4, $f22 /* 3D1B74 E00CC4E4 00000000 */ nop /* 3D1B78 E00CC4E8 C62202E8 */ lwc1 $f2, 0x2E8($s1) /* 3D1B7C E00CC4EC 46081081 */ sub.s $f2, $f2, $f8 /* 3D1B80 E00CC4F0 46161082 */ mul.s $f2, $f2, $f22 /* 3D1B84 E00CC4F4 00000000 */ nop /* 3D1B88 E00CC4F8 C620034C */ lwc1 $f0, 0x34C($s1) /* 3D1B8C E00CC4FC 460A0001 */ sub.s $f0, $f0, $f10 /* 3D1B90 E00CC500 46160002 */ mul.s $f0, $f0, $f22 /* 3D1B94 E00CC504 00000000 */ nop /* 3D1B98 E00CC508 E63C0414 */ swc1 $f28, 0x414($s1) /* 3D1B9C E00CC50C 8E220734 */ lw $v0, 0x734($s1) /* 3D1BA0 E00CC510 46043100 */ add.s $f4, $f6, $f4 /* 3D1BA4 E00CC514 E63C03B0 */ swc1 $f28, 0x3B0($s1) /* 3D1BA8 E00CC518 24420001 */ addiu $v0, $v0, 0x1 /* 3D1BAC E00CC51C 46024080 */ add.s $f2, $f8, $f2 /* 3D1BB0 E00CC520 AE220734 */ sw $v0, 0x734($s1) /* 3D1BB4 E00CC524 28420014 */ slti $v0, $v0, 0x14 /* 3D1BB8 E00CC528 46005000 */ add.s $f0, $f10, $f0 /* 3D1BBC E00CC52C E624002C */ swc1 $f4, 0x2C($s1) /* 3D1BC0 E00CC530 E6220090 */ swc1 $f2, 0x90($s1) /* 3D1BC4 E00CC534 080331CC */ j .LE00CC730 /* 3D1BC8 E00CC538 E62000F4 */ swc1 $f0, 0xF4($s1) /* 3D1BCC E00CC53C C62004DC */ lwc1 $f0, 0x4DC($s1) /* 3D1BD0 E00CC540 461E0000 */ add.s $f0, $f0, $f30 /* 3D1BD4 E00CC544 8E220734 */ lw $v0, 0x734($s1) /* 3D1BD8 E00CC548 E62004DC */ swc1 $f0, 0x4DC($s1) /* 3D1BDC E00CC54C 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D1BE0 E00CC550 00220821 */ addu $at, $at, $v0 /* 3D1BE4 E00CC554 9022CDE0 */ lbu $v0, -0x3220($at) /* 3D1BE8 E00CC558 44820000 */ mtc1 $v0, $f0 /* 3D1BEC E00CC55C 00000000 */ nop /* 3D1BF0 E00CC560 46800021 */ cvt.d.w $f0, $f0 /* 3D1BF4 E00CC564 463A0002 */ mul.d $f0, $f0, $f26 /* 3D1BF8 E00CC568 00000000 */ nop /* 3D1BFC E00CC56C C6240284 */ lwc1 $f4, 0x284($s1) /* 3D1C00 E00CC570 46062101 */ sub.s $f4, $f4, $f6 /* 3D1C04 E00CC574 462005A0 */ cvt.s.d $f22, $f0 /* 3D1C08 E00CC578 46162102 */ mul.s $f4, $f4, $f22 /* 3D1C0C E00CC57C 00000000 */ nop /* 3D1C10 E00CC580 C62202E8 */ lwc1 $f2, 0x2E8($s1) /* 3D1C14 E00CC584 46081081 */ sub.s $f2, $f2, $f8 /* 3D1C18 E00CC588 46161082 */ mul.s $f2, $f2, $f22 /* 3D1C1C E00CC58C 00000000 */ nop /* 3D1C20 E00CC590 C620034C */ lwc1 $f0, 0x34C($s1) /* 3D1C24 E00CC594 460A0001 */ sub.s $f0, $f0, $f10 /* 3D1C28 E00CC598 46160002 */ mul.s $f0, $f0, $f22 /* 3D1C2C E00CC59C 00000000 */ nop /* 3D1C30 E00CC5A0 E63C0414 */ swc1 $f28, 0x414($s1) /* 3D1C34 E00CC5A4 8E220734 */ lw $v0, 0x734($s1) /* 3D1C38 E00CC5A8 46043100 */ add.s $f4, $f6, $f4 /* 3D1C3C E00CC5AC E63C03B0 */ swc1 $f28, 0x3B0($s1) /* 3D1C40 E00CC5B0 24420001 */ addiu $v0, $v0, 0x1 /* 3D1C44 E00CC5B4 46024080 */ add.s $f2, $f8, $f2 /* 3D1C48 E00CC5B8 AE220734 */ sw $v0, 0x734($s1) /* 3D1C4C E00CC5BC 2842000F */ slti $v0, $v0, 0xF /* 3D1C50 E00CC5C0 46005000 */ add.s $f0, $f10, $f0 /* 3D1C54 E00CC5C4 E624002C */ swc1 $f4, 0x2C($s1) /* 3D1C58 E00CC5C8 E6220090 */ swc1 $f2, 0x90($s1) /* 3D1C5C E00CC5CC 144000D4 */ bnez $v0, .LE00CC920 /* 3D1C60 E00CC5D0 E62000F4 */ swc1 $f0, 0xF4($s1) /* 3D1C64 E00CC5D4 24020003 */ addiu $v0, $zero, 0x3 .LE00CC5D8: /* 3D1C68 E00CC5D8 AE2206D0 */ sw $v0, 0x6D0($s1) /* 3D1C6C E00CC5DC 08033248 */ j .LE00CC920 /* 3D1C70 E00CC5E0 AE200734 */ sw $zero, 0x734($s1) /* 3D1C74 E00CC5E4 24020018 */ addiu $v0, $zero, 0x18 /* 3D1C78 E00CC5E8 566200CE */ bnel $s3, $v0, .LE00CC924 /* 3D1C7C E00CC5EC 26310004 */ addiu $s1, $s1, 0x4 /* 3D1C80 E00CC5F0 24040004 */ addiu $a0, $zero, 0x4 /* 3D1C84 E00CC5F4 0040182D */ daddu $v1, $v0, $zero /* 3D1C88 E00CC5F8 26420060 */ addiu $v0, $s2, 0x60 .LE00CC5FC: /* 3D1C8C E00CC5FC AC4406D0 */ sw $a0, 0x6D0($v0) /* 3D1C90 E00CC600 2463FFFF */ addiu $v1, $v1, -0x1 /* 3D1C94 E00CC604 0461FFFD */ bgez $v1, .LE00CC5FC /* 3D1C98 E00CC608 2442FFFC */ addiu $v0, $v0, -0x4 /* 3D1C9C E00CC60C 08033249 */ j .LE00CC924 /* 3D1CA0 E00CC610 26310004 */ addiu $s1, $s1, 0x4 /* 3D1CA4 E00CC614 8E220734 */ lw $v0, 0x734($s1) /* 3D1CA8 E00CC618 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D1CAC E00CC61C 00220821 */ addu $at, $at, $v0 /* 3D1CB0 E00CC620 9022CE04 */ lbu $v0, -0x31FC($at) /* 3D1CB4 E00CC624 44820000 */ mtc1 $v0, $f0 /* 3D1CB8 E00CC628 00000000 */ nop /* 3D1CBC E00CC62C 46800021 */ cvt.d.w $f0, $f0 /* 3D1CC0 E00CC630 463A0002 */ mul.d $f0, $f0, $f26 /* 3D1CC4 E00CC634 00000000 */ nop /* 3D1CC8 E00CC638 3C1051EB */ lui $s0, (0x51EB851F >> 16) /* 3D1CCC E00CC63C 3610851F */ ori $s0, $s0, (0x51EB851F & 0xFFFF) /* 3D1CD0 E00CC640 02900018 */ mult $s4, $s0 /* 3D1CD4 E00CC644 00141FC3 */ sra $v1, $s4, 31 /* 3D1CD8 E00CC648 00004010 */ mfhi $t0 /* 3D1CDC E00CC64C 000810C3 */ sra $v0, $t0, 3 /* 3D1CE0 E00CC650 00431023 */ subu $v0, $v0, $v1 /* 3D1CE4 E00CC654 44826000 */ mtc1 $v0, $f12 /* 3D1CE8 E00CC658 00000000 */ nop /* 3D1CEC E00CC65C 46806320 */ cvt.s.w $f12, $f12 /* 3D1CF0 E00CC660 0C080144 */ jal shim_cos_deg /* 3D1CF4 E00CC664 462005A0 */ cvt.s.d $f22, $f0 /* 3D1CF8 E00CC668 4616E081 */ sub.s $f2, $f28, $f22 /* 3D1CFC E00CC66C 3C014487 */ lui $at, (0x44870000 >> 16) /* 3D1D00 E00CC670 44812000 */ mtc1 $at, $f4 /* 3D1D04 E00CC674 00000000 */ nop /* 3D1D08 E00CC678 46041082 */ mul.s $f2, $f2, $f4 /* 3D1D0C E00CC67C 00000000 */ nop /* 3D1D10 E00CC680 460010A1 */ cvt.d.s $f2, $f2 /* 3D1D14 E00CC684 46381082 */ mul.d $f2, $f2, $f24 /* 3D1D18 E00CC688 00000000 */ nop /* 3D1D1C E00CC68C 46000021 */ cvt.d.s $f0, $f0 /* 3D1D20 E00CC690 46201082 */ mul.d $f2, $f2, $f0 /* 3D1D24 E00CC694 00000000 */ nop /* 3D1D28 E00CC698 02B00018 */ mult $s5, $s0 /* 3D1D2C E00CC69C 00151FC3 */ sra $v1, $s5, 31 /* 3D1D30 E00CC6A0 00004010 */ mfhi $t0 /* 3D1D34 E00CC6A4 000810C3 */ sra $v0, $t0, 3 /* 3D1D38 E00CC6A8 00431023 */ subu $v0, $v0, $v1 /* 3D1D3C E00CC6AC 4482A000 */ mtc1 $v0, $f20 /* 3D1D40 E00CC6B0 00000000 */ nop /* 3D1D44 E00CC6B4 4680A521 */ cvt.d.w $f20, $f20 /* 3D1D48 E00CC6B8 4622A500 */ add.d $f20, $f20, $f2 /* 3D1D4C E00CC6BC 4620A520 */ cvt.s.d $f20, $f20 /* 3D1D50 E00CC6C0 0C080140 */ jal shim_sin_deg /* 3D1D54 E00CC6C4 4600A306 */ mov.s $f12, $f20 /* 3D1D58 E00CC6C8 4600A306 */ mov.s $f12, $f20 /* 3D1D5C E00CC6CC 0C080144 */ jal shim_cos_deg /* 3D1D60 E00CC6D0 46000506 */ mov.s $f20, $f0 /* 3D1D64 E00CC6D4 3C014170 */ lui $at, (0x41700000 >> 16) /* 3D1D68 E00CC6D8 44811000 */ mtc1 $at, $f2 /* 3D1D6C E00CC6DC 00000000 */ nop /* 3D1D70 E00CC6E0 46161083 */ div.s $f2, $f2, $f22 /* 3D1D74 E00CC6E4 46161083 */ div.s $f2, $f2, $f22 /* 3D1D78 E00CC6E8 46141502 */ mul.s $f20, $f2, $f20 /* 3D1D7C E00CC6EC 00000000 */ nop /* 3D1D80 E00CC6F0 8E220734 */ lw $v0, 0x734($s1) /* 3D1D84 E00CC6F4 46001082 */ mul.s $f2, $f2, $f0 /* 3D1D88 E00CC6F8 00000000 */ nop /* 3D1D8C E00CC6FC E634002C */ swc1 $f20, 0x2C($s1) /* 3D1D90 E00CC700 3C03E00D */ lui $v1, (0xE00D0000 >> 16) /* 3D1D94 E00CC704 00731821 */ addu $v1, $v1, $s3 /* 3D1D98 E00CC708 8063CE4C */ lb $v1, -0x31B4($v1) /* 3D1D9C E00CC70C 24420001 */ addiu $v0, $v0, 0x1 /* 3D1DA0 E00CC710 AE220734 */ sw $v0, 0x734($s1) /* 3D1DA4 E00CC714 28420046 */ slti $v0, $v0, 0x46 /* 3D1DA8 E00CC718 E62200F4 */ swc1 $f2, 0xF4($s1) /* 3D1DAC E00CC71C 2463000A */ addiu $v1, $v1, 0xA /* 3D1DB0 E00CC720 44830000 */ mtc1 $v1, $f0 /* 3D1DB4 E00CC724 00000000 */ nop /* 3D1DB8 E00CC728 46800020 */ cvt.s.w $f0, $f0 /* 3D1DBC E00CC72C E6200090 */ swc1 $f0, 0x90($s1) .LE00CC730: /* 3D1DC0 E00CC730 5440007C */ bnel $v0, $zero, .LE00CC924 /* 3D1DC4 E00CC734 26310004 */ addiu $s1, $s1, 0x4 /* 3D1DC8 E00CC738 C6240284 */ lwc1 $f4, 0x284($s1) /* 3D1DCC E00CC73C 46002121 */ cvt.d.s $f4, $f4 /* 3D1DD0 E00CC740 46382102 */ mul.d $f4, $f4, $f24 /* 3D1DD4 E00CC744 00000000 */ nop /* 3D1DD8 E00CC748 C62202E8 */ lwc1 $f2, 0x2E8($s1) /* 3D1DDC E00CC74C 460010A1 */ cvt.d.s $f2, $f2 /* 3D1DE0 E00CC750 46381082 */ mul.d $f2, $f2, $f24 /* 3D1DE4 E00CC754 00000000 */ nop /* 3D1DE8 E00CC758 C620034C */ lwc1 $f0, 0x34C($s1) /* 3D1DEC E00CC75C 46000021 */ cvt.d.s $f0, $f0 /* 3D1DF0 E00CC760 46380002 */ mul.d $f0, $f0, $f24 /* 3D1DF4 E00CC764 00000000 */ nop /* 3D1DF8 E00CC768 24020005 */ addiu $v0, $zero, 0x5 /* 3D1DFC E00CC76C AE2206D0 */ sw $v0, 0x6D0($s1) /* 3D1E00 E00CC770 AE200734 */ sw $zero, 0x734($s1) /* 3D1E04 E00CC774 46202120 */ cvt.s.d $f4, $f4 /* 3D1E08 E00CC778 462010A0 */ cvt.s.d $f2, $f2 /* 3D1E0C E00CC77C 46200020 */ cvt.s.d $f0, $f0 /* 3D1E10 E00CC780 E6240540 */ swc1 $f4, 0x540($s1) /* 3D1E14 E00CC784 E62205A4 */ swc1 $f2, 0x5A4($s1) /* 3D1E18 E00CC788 08033248 */ j .LE00CC920 /* 3D1E1C E00CC78C E6200608 */ swc1 $f0, 0x608($s1) /* 3D1E20 E00CC790 C6260540 */ lwc1 $f6, 0x540($s1) /* 3D1E24 E00CC794 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D1E28 E00CC798 D42CCED0 */ ldc1 $f12, -0x3130($at) /* 3D1E2C E00CC79C 460031A1 */ cvt.d.s $f6, $f6 /* 3D1E30 E00CC7A0 462C3182 */ mul.d $f6, $f6, $f12 /* 3D1E34 E00CC7A4 00000000 */ nop /* 3D1E38 E00CC7A8 C62405A4 */ lwc1 $f4, 0x5A4($s1) /* 3D1E3C E00CC7AC 46002121 */ cvt.d.s $f4, $f4 /* 3D1E40 E00CC7B0 462C2102 */ mul.d $f4, $f4, $f12 /* 3D1E44 E00CC7B4 00000000 */ nop /* 3D1E48 E00CC7B8 C6280608 */ lwc1 $f8, 0x608($s1) /* 3D1E4C E00CC7BC 46004086 */ mov.s $f2, $f8 /* 3D1E50 E00CC7C0 460010A1 */ cvt.d.s $f2, $f2 /* 3D1E54 E00CC7C4 462C1082 */ mul.d $f2, $f2, $f12 /* 3D1E58 E00CC7C8 00000000 */ nop /* 3D1E5C E00CC7CC C62E002C */ lwc1 $f14, 0x2C($s1) /* 3D1E60 E00CC7D0 C6200540 */ lwc1 $f0, 0x540($s1) /* 3D1E64 E00CC7D4 C62A0090 */ lwc1 $f10, 0x90($s1) /* 3D1E68 E00CC7D8 8E220734 */ lw $v0, 0x734($s1) /* 3D1E6C E00CC7DC 46007380 */ add.s $f14, $f14, $f0 /* 3D1E70 E00CC7E0 C62005A4 */ lwc1 $f0, 0x5A4($s1) /* 3D1E74 E00CC7E4 24420001 */ addiu $v0, $v0, 0x1 /* 3D1E78 E00CC7E8 AE220734 */ sw $v0, 0x734($s1) /* 3D1E7C E00CC7EC 46005280 */ add.s $f10, $f10, $f0 /* 3D1E80 E00CC7F0 C62000F4 */ lwc1 $f0, 0xF4($s1) /* 3D1E84 E00CC7F4 28420011 */ slti $v0, $v0, 0x11 /* 3D1E88 E00CC7F8 46080000 */ add.s $f0, $f0, $f8 /* 3D1E8C E00CC7FC E62E002C */ swc1 $f14, 0x2C($s1) /* 3D1E90 E00CC800 E62A0090 */ swc1 $f10, 0x90($s1) /* 3D1E94 E00CC804 E62000F4 */ swc1 $f0, 0xF4($s1) /* 3D1E98 E00CC808 462031A0 */ cvt.s.d $f6, $f6 /* 3D1E9C E00CC80C 46202120 */ cvt.s.d $f4, $f4 /* 3D1EA0 E00CC810 E62405A4 */ swc1 $f4, 0x5A4($s1) /* 3D1EA4 E00CC814 46002006 */ mov.s $f0, $f4 /* 3D1EA8 E00CC818 46000021 */ cvt.d.s $f0, $f0 /* 3D1EAC E00CC81C 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D1EB0 E00CC820 D424CED8 */ ldc1 $f4, -0x3128($at) /* 3D1EB4 E00CC824 462010A0 */ cvt.s.d $f2, $f2 /* 3D1EB8 E00CC828 46240000 */ add.d $f0, $f0, $f4 /* 3D1EBC E00CC82C E6260540 */ swc1 $f6, 0x540($s1) /* 3D1EC0 E00CC830 E6220608 */ swc1 $f2, 0x608($s1) /* 3D1EC4 E00CC834 46200020 */ cvt.s.d $f0, $f0 /* 3D1EC8 E00CC838 14400004 */ bnez $v0, .LE00CC84C /* 3D1ECC E00CC83C E62005A4 */ swc1 $f0, 0x5A4($s1) /* 3D1ED0 E00CC840 24020006 */ addiu $v0, $zero, 0x6 /* 3D1ED4 E00CC844 AE200734 */ sw $zero, 0x734($s1) /* 3D1ED8 E00CC848 AE2206D0 */ sw $v0, 0x6D0($s1) .LE00CC84C: /* 3D1EDC E00CC84C C6200478 */ lwc1 $f0, 0x478($s1) /* 3D1EE0 E00CC850 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D1EE4 E00CC854 D422CEE0 */ ldc1 $f2, -0x3120($at) /* 3D1EE8 E00CC858 46000021 */ cvt.d.s $f0, $f0 /* 3D1EEC E00CC85C 46220002 */ mul.d $f0, $f0, $f2 /* 3D1EF0 E00CC860 00000000 */ nop /* 3D1EF4 E00CC864 46200020 */ cvt.s.d $f0, $f0 /* 3D1EF8 E00CC868 08033248 */ j .LE00CC920 /* 3D1EFC E00CC86C E6200478 */ swc1 $f0, 0x478($s1) /* 3D1F00 E00CC870 0C080150 */ jal shim_load_effect /* 3D1F04 E00CC874 24040069 */ addiu $a0, $zero, 0x69 /* 3D1F08 E00CC878 E7BE0010 */ swc1 $f30, 0x10($sp) /* 3D1F0C E00CC87C 8E2504DC */ lw $a1, 0x4DC($s1) /* 3D1F10 E00CC880 4406F000 */ mfc1 $a2, $f30 /* 3D1F14 E00CC884 4407E000 */ mfc1 $a3, $f28 /* 3D1F18 E00CC888 0C080104 */ jal shim_guRotateF /* 3D1F1C E00CC88C 27A40018 */ addiu $a0, $sp, 0x18 /* 3D1F20 E00CC890 27B00058 */ addiu $s0, $sp, 0x58 /* 3D1F24 E00CC894 8E25002C */ lw $a1, 0x2C($s1) /* 3D1F28 E00CC898 8E260090 */ lw $a2, 0x90($s1) /* 3D1F2C E00CC89C 8E2700F4 */ lw $a3, 0xF4($s1) /* 3D1F30 E00CC8A0 0C080108 */ jal shim_guTranslateF /* 3D1F34 E00CC8A4 0200202D */ daddu $a0, $s0, $zero /* 3D1F38 E00CC8A8 0200202D */ daddu $a0, $s0, $zero /* 3D1F3C E00CC8AC 27A50018 */ addiu $a1, $sp, 0x18 /* 3D1F40 E00CC8B0 0C080114 */ jal shim_guMtxCatF /* 3D1F44 E00CC8B4 00A0302D */ daddu $a2, $a1, $zero /* 3D1F48 E00CC8B8 C6420004 */ lwc1 $f2, 0x4($s2) /* 3D1F4C E00CC8BC C7A00048 */ lwc1 $f0, 0x48($sp) /* 3D1F50 E00CC8C0 46001080 */ add.s $f2, $f2, $f0 /* 3D1F54 E00CC8C4 C7A0004C */ lwc1 $f0, 0x4C($sp) /* 3D1F58 E00CC8C8 44051000 */ mfc1 $a1, $f2 /* 3D1F5C E00CC8CC C6420008 */ lwc1 $f2, 0x8($s2) /* 3D1F60 E00CC8D0 46001080 */ add.s $f2, $f2, $f0 /* 3D1F64 E00CC8D4 C7A00050 */ lwc1 $f0, 0x50($sp) /* 3D1F68 E00CC8D8 44061000 */ mfc1 $a2, $f2 /* 3D1F6C E00CC8DC C642000C */ lwc1 $f2, 0xC($s2) /* 3D1F70 E00CC8E0 46001080 */ add.s $f2, $f2, $f0 /* 3D1F74 E00CC8E4 0000202D */ daddu $a0, $zero, $zero /* 3D1F78 E00CC8E8 44071000 */ mfc1 $a3, $f2 /* 3D1F7C E00CC8EC 24020010 */ addiu $v0, $zero, 0x10 /* 3D1F80 E00CC8F0 E7BC0010 */ swc1 $f28, 0x10($sp) /* 3D1F84 E00CC8F4 0C034800 */ jal floating_cloud_puff_main /* 3D1F88 E00CC8F8 AFA20014 */ sw $v0, 0x14($sp) /* 3D1F8C E00CC8FC 8C44000C */ lw $a0, 0xC($v0) /* 3D1F90 E00CC900 24030064 */ addiu $v1, $zero, 0x64 /* 3D1F94 E00CC904 AC830028 */ sw $v1, 0x28($a0) /* 3D1F98 E00CC908 8C43000C */ lw $v1, 0xC($v0) /* 3D1F9C E00CC90C AC60002C */ sw $zero, 0x2C($v1) /* 3D1FA0 E00CC910 8C42000C */ lw $v0, 0xC($v0) /* 3D1FA4 E00CC914 AC400030 */ sw $zero, 0x30($v0) /* 3D1FA8 E00CC918 24020007 */ addiu $v0, $zero, 0x7 /* 3D1FAC E00CC91C AE2206D0 */ sw $v0, 0x6D0($s1) .LE00CC920: /* 3D1FB0 E00CC920 26310004 */ addiu $s1, $s1, 0x4 .LE00CC924: /* 3D1FB4 E00CC924 26B50438 */ addiu $s5, $s5, 0x438 /* 3D1FB8 E00CC928 26730001 */ addiu $s3, $s3, 0x1 /* 3D1FBC E00CC92C 2A620019 */ slti $v0, $s3, 0x19 /* 3D1FC0 E00CC930 1440FE81 */ bnez $v0, .LE00CC338 /* 3D1FC4 E00CC934 269400B4 */ addiu $s4, $s4, 0xB4 .LE00CC938: /* 3D1FC8 E00CC938 8FBF00BC */ lw $ra, 0xBC($sp) /* 3D1FCC E00CC93C 8FBE00B8 */ lw $fp, 0xB8($sp) /* 3D1FD0 E00CC940 8FB700B4 */ lw $s7, 0xB4($sp) /* 3D1FD4 E00CC944 8FB600B0 */ lw $s6, 0xB0($sp) /* 3D1FD8 E00CC948 8FB500AC */ lw $s5, 0xAC($sp) /* 3D1FDC E00CC94C 8FB400A8 */ lw $s4, 0xA8($sp) /* 3D1FE0 E00CC950 8FB300A4 */ lw $s3, 0xA4($sp) /* 3D1FE4 E00CC954 8FB200A0 */ lw $s2, 0xA0($sp) /* 3D1FE8 E00CC958 8FB1009C */ lw $s1, 0x9C($sp) /* 3D1FEC E00CC95C 8FB00098 */ lw $s0, 0x98($sp) /* 3D1FF0 E00CC960 D7BE00E8 */ ldc1 $f30, 0xE8($sp) /* 3D1FF4 E00CC964 D7BC00E0 */ ldc1 $f28, 0xE0($sp) /* 3D1FF8 E00CC968 D7BA00D8 */ ldc1 $f26, 0xD8($sp) /* 3D1FFC E00CC96C D7B800D0 */ ldc1 $f24, 0xD0($sp) /* 3D2000 E00CC970 D7B600C8 */ ldc1 $f22, 0xC8($sp) /* 3D2004 E00CC974 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* 3D2008 E00CC978 03E00008 */ jr $ra /* 3D200C E00CC97C 27BD00F0 */ addiu $sp, $sp, 0xF0 ### DECOMPILED C INSTRUCTIONS: void tubba_heart_attack_update(EffectInstance* effect) { TubbaHeartAttackFXData* data = effect->data.tubbaHeartAttack; EffectInstance* puffEffect; s32 unk_00 = data->unk_00; s32 unk_14; f32 factor; f32 angle; f32 sin; f32 cos; Matrix4f sp18; Matrix4f sp58; s32 i; s32 j; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->unk_10 = 64; } if (data->unk_10 < 1000) { data->unk_10--; } data->unk_14++; if (data->unk_10 < 0) { shim_remove_effect(effect); return; } unk_14 = data->unk_14; for (i = 0; i < 25; i++) { f32 unk_158 = data->unk_158[i]; f32 unk_1BC = data->unk_1BC[i]; f32 unk_220 = data->unk_220[i]; data->unk_414[i] = D_E00CCDD0[unk_14 % ARRAY_COUNT(D_E00CCDD0)] * 0.01f; data->unk_3B0[i] = 2.0f - data->unk_414[i]; switch (data->unk_6D0[i]) { case 0: data->unk_2C[i] = unk_158; data->unk_90[i] = unk_1BC; data->unk_F4[i] = unk_220; data->unk_4DC[i] += 0.0f; if (data->unk_66C[i] != 0) { data->unk_66C[i]--; } else { data->unk_6D0[i] = 1; data->unk_3B0[i] = data->unk_414[i] = D_E00CCDD8[data->unk_734[i]] * 0.01; data->unk_734[i]++; } break; case 1: data->unk_3B0[i] = data->unk_414[i] = D_E00CCDD8[data->unk_734[i]] * 0.01; data->unk_4DC[i] += 0.0f; data->unk_734[i]++; if (data->unk_734[i] >= ARRAY_COUNT(D_E00CCDD8)) { if (unk_00 == 0) { data->unk_6D0[i] = 2; } else { data->unk_6D0[i] = 20; } data->unk_734[i] = 0; } break; case 20: data->unk_4DC[i] += 0.0f; factor = D_E00CCDF0[data->unk_734[i]] * 0.01; data->unk_3B0[i] = data->unk_414[i] = 1.0f; data->unk_2C[i] = unk_158 + (data->unk_284[i] - unk_158) * factor; data->unk_90[i] = unk_1BC + (data->unk_2E8[i] - unk_1BC) * factor; data->unk_F4[i] = unk_220 + (data->unk_34C[i] - unk_220) * factor; data->unk_734[i]++; if (data->unk_734[i] >= ARRAY_COUNT(D_E00CCDF0)) { data->unk_6D0[i] = 5; data->unk_734[i] = 0; data->unk_540[i] = data->unk_284[i] * 0.5; data->unk_5A4[i] = data->unk_2E8[i] * 0.5; data->unk_608[i] = data->unk_34C[i] * 0.5; } break; case 2: data->unk_4DC[i] += 0.0f; factor = D_E00CCDE0[data->unk_734[i]] * 0.01; data->unk_414[i] = 1.0f; data->unk_3B0[i] = 1.0f; data->unk_2C[i] = unk_158 + (data->unk_284[i] - unk_158) * factor; data->unk_90[i] = unk_1BC + (data->unk_2E8[i] - unk_1BC) * factor; data->unk_F4[i] = unk_220 + (data->unk_34C[i] - unk_220) * factor; data->unk_734[i]++; if (data->unk_734[i] >= ARRAY_COUNT(D_E00CCDE0)) { data->unk_6D0[i] = 3; data->unk_734[i] = 0; } break; case 3: if (i == 24) { for (j = 0; j < ARRAY_COUNT(data->unk_6D0); j++) { data->unk_6D0[j] = 4; } } break; case 4: factor = D_E00CCE04[data->unk_734[i]] * 0.01; angle = i * 1080 / 25 + (1.0f - factor) * 1080.0f * 0.5 * shim_cos_deg(i * 180 / 25); sin = shim_sin_deg(angle); cos = shim_cos_deg(angle); data->unk_2C[i] = ((15.0f / factor) / factor) * sin; data->unk_90[i] = D_E00CCE4C[i] + 10; data->unk_F4[i] = ((15.0f / factor) / factor) * cos; data->unk_734[i]++; if (data->unk_734[i] >= ARRAY_COUNT(D_E00CCE04)) { data->unk_6D0[i] = 5; data->unk_734[i] = 0; data->unk_540[i] = data->unk_284[i] * 0.5; data->unk_5A4[i] = data->unk_2E8[i] * 0.5; data->unk_608[i] = data->unk_34C[i] * 0.5; } break; case 5: data->unk_2C[i] += data->unk_540[i]; data->unk_90[i] += data->unk_5A4[i]; data->unk_F4[i] += data->unk_608[i]; data->unk_540[i] *= 0.99; data->unk_5A4[i] *= 0.99; data->unk_608[i] *= 0.99; data->unk_5A4[i] += -0.1; data->unk_734[i]++; if (data->unk_734[i] >= 17) { data->unk_734[i] = 0; data->unk_6D0[i] = 6; } data->unk_478[i] *= 0.9; break; case 6: shim_load_effect(EFFECT_FLOATING_CLOUD_PUFF); shim_guRotateF(sp18, data->unk_4DC[i], 0.0f, 1.0f, 0.0f); shim_guTranslateF(sp58, data->unk_2C[i], data->unk_90[i], data->unk_F4[i]); shim_guMtxCatF(sp58, sp18, sp18); puffEffect = floating_cloud_puff_main(0, data->unk_04 + sp18[3][0], data->unk_08 + sp18[3][1], data->unk_0C + sp18[3][2], 1.0f, 16); puffEffect->data.floatingCloudPuff->unk_28 = 100; puffEffect->data.floatingCloudPuff->unk_2C = 0; puffEffect->data.floatingCloudPuff->unk_30 = 0; data->unk_6D0[i] = 7; break; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel btl_update /* 16CD18 8023E438 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 16CD1C 8023E43C AFB00028 */ sw $s0, 0x28($sp) /* 16CD20 8023E440 3C10800E */ lui $s0, %hi(gBattleStatus) /* 16CD24 8023E444 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) /* 16CD28 8023E448 2402FFFF */ addiu $v0, $zero, -0x1 /* 16CD2C 8023E44C AFBF0034 */ sw $ra, 0x34($sp) /* 16CD30 8023E450 AFB20030 */ sw $s2, 0x30($sp) /* 16CD34 8023E454 AFB1002C */ sw $s1, 0x2C($sp) /* 16CD38 8023E458 8E040224 */ lw $a0, 0x224($s0) /* 16CD3C 8023E45C 8E1200DC */ lw $s2, 0xDC($s0) /* 16CD40 8023E460 10820028 */ beq $a0, $v0, .L8023E504 /* 16CD44 8023E464 3C030008 */ lui $v1, (0x80000 >> 16) /* 16CD48 8023E468 8E020000 */ lw $v0, 0x0($s0) /* 16CD4C 8023E46C 00431024 */ and $v0, $v0, $v1 /* 16CD50 8023E470 10400014 */ beqz $v0, .L8023E4C4 /* 16CD54 8023E474 00000000 */ nop /* 16CD58 8023E478 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 16CD5C 8023E47C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 16CD60 8023E480 80620081 */ lb $v0, 0x81($v1) /* 16CD64 8023E484 1040000F */ beqz $v0, .L8023E4C4 /* 16CD68 8023E488 00000000 */ nop /* 16CD6C 8023E48C 8C620004 */ lw $v0, 0x4($v1) /* 16CD70 8023E490 00441024 */ and $v0, $v0, $a0 /* 16CD74 8023E494 AE020210 */ sw $v0, 0x210($s0) /* 16CD78 8023E498 8C620014 */ lw $v0, 0x14($v1) /* 16CD7C 8023E49C 00441024 */ and $v0, $v0, $a0 /* 16CD80 8023E4A0 AE020214 */ sw $v0, 0x214($s0) /* 16CD84 8023E4A4 8C620024 */ lw $v0, 0x24($v1) /* 16CD88 8023E4A8 00441024 */ and $v0, $v0, $a0 /* 16CD8C 8023E4AC AE020218 */ sw $v0, 0x218($s0) /* 16CD90 8023E4B0 80620041 */ lb $v0, 0x41($v1) /* 16CD94 8023E4B4 AE02021C */ sw $v0, 0x21C($s0) /* 16CD98 8023E4B8 80620045 */ lb $v0, 0x45($v1) /* 16CD9C 8023E4BC 0808F941 */ j .L8023E504 /* 16CDA0 8023E4C0 AE020220 */ sw $v0, 0x220($s0) .L8023E4C4: /* 16CDA4 8023E4C4 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 16CDA8 8023E4C8 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* 16CDAC 8023E4CC 8E030224 */ lw $v1, 0x224($s0) /* 16CDB0 8023E4D0 8C820000 */ lw $v0, 0x0($a0) /* 16CDB4 8023E4D4 00431024 */ and $v0, $v0, $v1 /* 16CDB8 8023E4D8 AE020210 */ sw $v0, 0x210($s0) /* 16CDBC 8023E4DC 8C820010 */ lw $v0, 0x10($a0) /* 16CDC0 8023E4E0 00431024 */ and $v0, $v0, $v1 /* 16CDC4 8023E4E4 AE020214 */ sw $v0, 0x214($s0) /* 16CDC8 8023E4E8 8C820020 */ lw $v0, 0x20($a0) /* 16CDCC 8023E4EC 00431024 */ and $v0, $v0, $v1 /* 16CDD0 8023E4F0 AE020218 */ sw $v0, 0x218($s0) /* 16CDD4 8023E4F4 80820040 */ lb $v0, 0x40($a0) /* 16CDD8 8023E4F8 AE02021C */ sw $v0, 0x21C($s0) /* 16CDDC 8023E4FC 80820044 */ lb $v0, 0x44($a0) /* 16CDE0 8023E500 AE020220 */ sw $v0, 0x220($s0) .L8023E504: /* 16CDE4 8023E504 27A40010 */ addiu $a0, $sp, 0x10 /* 16CDE8 8023E508 0C08F800 */ jal get_dpad_input_radial /* 16CDEC 8023E50C 27A50014 */ addiu $a1, $sp, 0x14 /* 16CDF0 8023E510 C7A00010 */ lwc1 $f0, 0x10($sp) /* 16CDF4 8023E514 82020431 */ lb $v0, 0x431($s0) /* 16CDF8 8023E518 8E030214 */ lw $v1, 0x214($s0) /* 16CDFC 8023E51C 4600010D */ trunc.w.s $f4, $f0 /* 16CE00 8023E520 E6040228 */ swc1 $f4, 0x228($s0) /* 16CE04 8023E524 00021080 */ sll $v0, $v0, 2 /* 16CE08 8023E528 C7A00014 */ lwc1 $f0, 0x14($sp) /* 16CE0C 8023E52C 02021021 */ addu $v0, $s0, $v0 /* 16CE10 8023E530 4600010D */ trunc.w.s $f4, $f0 /* 16CE14 8023E534 E604022C */ swc1 $f4, 0x22C($s0) /* 16CE18 8023E538 AC430330 */ sw $v1, 0x330($v0) /* 16CE1C 8023E53C 82020431 */ lb $v0, 0x431($s0) /* 16CE20 8023E540 8E030210 */ lw $v1, 0x210($s0) /* 16CE24 8023E544 00021080 */ sll $v0, $v0, 2 /* 16CE28 8023E548 02021021 */ addu $v0, $s0, $v0 /* 16CE2C 8023E54C AC430230 */ sw $v1, 0x230($v0) /* 16CE30 8023E550 92020431 */ lbu $v0, 0x431($s0) /* 16CE34 8023E554 24420001 */ addiu $v0, $v0, 0x1 /* 16CE38 8023E558 A2020431 */ sb $v0, 0x431($s0) /* 16CE3C 8023E55C 00021600 */ sll $v0, $v0, 24 /* 16CE40 8023E560 00021603 */ sra $v0, $v0, 24 /* 16CE44 8023E564 28420040 */ slti $v0, $v0, 0x40 /* 16CE48 8023E568 50400001 */ beql $v0, $zero, .L8023E570 /* 16CE4C 8023E56C A2000431 */ sb $zero, 0x431($s0) .L8023E570: /* 16CE50 8023E570 8E0200B4 */ lw $v0, 0xB4($s0) /* 16CE54 8023E574 10400003 */ beqz $v0, .L8023E584 /* 16CE58 8023E578 00000000 */ nop /* 16CE5C 8023E57C 0040F809 */ jalr $v0 /* 16CE60 8023E580 00000000 */ nop .L8023E584: /* 16CE64 8023E584 82030095 */ lb $v1, 0x95($s0) /* 16CE68 8023E588 10600005 */ beqz $v1, .L8023E5A0 /* 16CE6C 8023E58C 24110001 */ addiu $s1, $zero, 0x1 /* 16CE70 8023E590 3C02800E */ lui $v0, %hi(gBattleState) /* 16CE74 8023E594 8C42C068 */ lw $v0, %lo(gBattleState)($v0) /* 16CE78 8023E598 10620092 */ beq $v1, $v0, .L8023E7E4 /* 16CE7C 8023E59C 00000000 */ nop .L8023E5A0: /* 16CE80 8023E5A0 3C02800E */ lui $v0, %hi(gBattleState) /* 16CE84 8023E5A4 8C42C068 */ lw $v0, %lo(gBattleState)($v0) /* 16CE88 8023E5A8 24430001 */ addiu $v1, $v0, 0x1 /* 16CE8C 8023E5AC 2C620025 */ sltiu $v0, $v1, 0x25 /* 16CE90 8023E5B0 1040008C */ beqz $v0, .L8023E7E4 /* 16CE94 8023E5B4 00031080 */ sll $v0, $v1, 2 /* 16CE98 8023E5B8 3C01802A */ lui $at, %hi(jtbl_8029C960) /* 16CE9C 8023E5BC 00220821 */ addu $at, $at, $v0 /* 16CEA0 8023E5C0 8C22C960 */ lw $v0, %lo(jtbl_8029C960)($at) /* 16CEA4 8023E5C4 00400008 */ jr $v0 /* 16CEA8 8023E5C8 00000000 */ nop glabel .L8023E5CC /* 16CEAC 8023E5CC 0C090486 */ jal func_80241218 /* 16CEB0 8023E5D0 0000882D */ daddu $s1, $zero, $zero /* 16CEB4 8023E5D4 0808F9F9 */ j .L8023E7E4 /* 16CEB8 8023E5D8 00000000 */ nop glabel .L8023E5DC /* 16CEBC 8023E5DC 0C090809 */ jal func_80242024 /* 16CEC0 8023E5E0 00000000 */ nop /* 16CEC4 8023E5E4 0808F9F9 */ j .L8023E7E4 /* 16CEC8 8023E5E8 00000000 */ nop glabel .L8023E5EC /* 16CECC 8023E5EC 0C090AEC */ jal D_80242BB0 /* 16CED0 8023E5F0 00000000 */ nop /* 16CED4 8023E5F4 0808F9F9 */ j .L8023E7E4 /* 16CED8 8023E5F8 00000000 */ nop glabel .L8023E5FC /* 16CEDC 8023E5FC 0C090BF8 */ jal D_80242FE0 /* 16CEE0 8023E600 00000000 */ nop /* 16CEE4 8023E604 0808F9F9 */ j .L8023E7E4 /* 16CEE8 8023E608 00000000 */ nop glabel .L8023E60C /* 16CEEC 8023E60C 0C0906C5 */ jal D_80241B14 /* 16CEF0 8023E610 00000000 */ nop /* 16CEF4 8023E614 0808F9F9 */ j .L8023E7E4 /* 16CEF8 8023E618 00000000 */ nop glabel .L8023E61C /* 16CEFC 8023E61C 0C090E76 */ jal func_802439D8 /* 16CF00 8023E620 00000000 */ nop /* 16CF04 8023E624 0808F9F9 */ j .L8023E7E4 /* 16CF08 8023E628 00000000 */ nop glabel .L8023E62C /* 16CF0C 8023E62C 0C090AB2 */ jal dgb_15_pad_2AC8 /* 16CF10 8023E630 00000000 */ nop /* 16CF14 8023E634 0808F9F9 */ j .L8023E7E4 /* 16CF18 8023E638 00000000 */ nop glabel .L8023E63C /* 16CF1C 8023E63C 0C090BC0 */ jal D_80242F00 /* 16CF20 8023E640 00000000 */ nop /* 16CF24 8023E644 0808F9F9 */ j .L8023E7E4 /* 16CF28 8023E648 00000000 */ nop glabel .L8023E64C /* 16CF2C 8023E64C 0C090E46 */ jal dgb_09_pad_3918 /* 16CF30 8023E650 00000000 */ nop /* 16CF34 8023E654 0808F9F9 */ j .L8023E7E4 /* 16CF38 8023E658 00000000 */ nop glabel .L8023E65C /* 16CF3C 8023E65C 0C0A9662 */ jal func_802A5988_7AD328 /* 16CF40 8023E660 00000000 */ nop /* 16CF44 8023E664 0808F9F9 */ j .L8023E7E4 /* 16CF48 8023E668 00000000 */ nop glabel .L8023E66C /* 16CF4C 8023E66C 0C0AA072 */ jal func_802A81C8_7AFB68 /* 16CF50 8023E670 00000000 */ nop /* 16CF54 8023E674 0808F9F9 */ j .L8023E7E4 /* 16CF58 8023E678 00000000 */ nop glabel .L8023E67C /* 16CF5C 8023E67C 0C0AA82E */ jal func_802AA0B8_7B1A58 /* 16CF60 8023E680 00000000 */ nop /* 16CF64 8023E684 0808F9F9 */ j .L8023E7E4 /* 16CF68 8023E688 00000000 */ nop glabel .L8023E68C /* 16CF6C 8023E68C 0C0AA6D1 */ jal func_802A9B44_7B14E4 /* 16CF70 8023E690 00000000 */ nop /* 16CF74 8023E694 0808F9F9 */ j .L8023E7E4 /* 16CF78 8023E698 00000000 */ nop glabel .L8023E69C /* 16CF7C 8023E69C 0C0AA9A2 */ jal func_802AA688_7B2028 /* 16CF80 8023E6A0 00000000 */ nop /* 16CF84 8023E6A4 0808F9F9 */ j .L8023E7E4 /* 16CF88 8023E6A8 00000000 */ nop glabel .L8023E6AC /* 16CF8C 8023E6AC 0C0916B4 */ jal D_80245AD0 /* 16CF90 8023E6B0 00000000 */ nop /* 16CF94 8023E6B4 0808F9F9 */ j .L8023E7E4 /* 16CF98 8023E6B8 00000000 */ nop glabel .L8023E6BC /* 16CF9C 8023E6BC 0C091EC1 */ jal func_80247B04 /* 16CFA0 8023E6C0 00000000 */ nop /* 16CFA4 8023E6C4 0808F9F9 */ j .L8023E7E4 /* 16CFA8 8023E6C8 00000000 */ nop glabel .L8023E6CC /* 16CFAC 8023E6CC 0C091914 */ jal func_80246450 /* 16CFB0 8023E6D0 00000000 */ nop /* 16CFB4 8023E6D4 0808F9F9 */ j .L8023E7E4 /* 16CFB8 8023E6D8 00000000 */ nop glabel .L8023E6DC /* 16CFBC 8023E6DC 0C091C87 */ jal func_8024721C /* 16CFC0 8023E6E0 00000000 */ nop /* 16CFC4 8023E6E4 0808F9F9 */ j .L8023E7E4 /* 16CFC8 8023E6E8 00000000 */ nop glabel .L8023E6EC /* 16CFCC 8023E6EC 0C091D5C */ jal func_80247570 /* 16CFD0 8023E6F0 00000000 */ nop /* 16CFD4 8023E6F4 0808F9F9 */ j .L8023E7E4 /* 16CFD8 8023E6F8 00000000 */ nop glabel .L8023E6FC /* 16CFDC 8023E6FC 0C092064 */ jal func_80248190 /* 16CFE0 8023E700 00000000 */ nop /* 16CFE4 8023E704 0808F9F9 */ j .L8023E7E4 /* 16CFE8 8023E708 00000000 */ nop glabel .L8023E70C /* 16CFEC 8023E70C 0C091CAB */ jal D_802472AC /* 16CFF0 8023E710 00000000 */ nop /* 16CFF4 8023E714 0808F9F9 */ j .L8023E7E4 /* 16CFF8 8023E718 00000000 */ nop glabel .L8023E71C /* 16CFFC 8023E71C 0C091ACD */ jal func_80246B34 /* 16D000 8023E720 00000000 */ nop /* 16D004 8023E724 0808F9F9 */ j .L8023E7E4 /* 16D008 8023E728 00000000 */ nop glabel .L8023E72C /* 16D00C 8023E72C 0C091002 */ jal func_80244008 /* 16D010 8023E730 00000000 */ nop /* 16D014 8023E734 0808F9F9 */ j .L8023E7E4 /* 16D018 8023E738 00000000 */ nop glabel .L8023E73C /* 16D01C 8023E73C 0C091294 */ jal D_80244A50 /* 16D020 8023E740 00000000 */ nop /* 16D024 8023E744 0808F9F9 */ j .L8023E7E4 /* 16D028 8023E748 00000000 */ nop glabel .L8023E74C /* 16D02C 8023E74C 0C0915BE */ jal func_802456F8 /* 16D030 8023E750 00000000 */ nop /* 16D034 8023E754 0808F9F9 */ j .L8023E7E4 /* 16D038 8023E758 00000000 */ nop glabel .L8023E75C /* 16D03C 8023E75C 0C0913C0 */ jal D_80244F00 /* 16D040 8023E760 00000000 */ nop /* 16D044 8023E764 0808F9F9 */ j .L8023E7E4 /* 16D048 8023E768 00000000 */ nop glabel .L8023E76C /* 16D04C 8023E76C 0C09138E */ jal func_80244E38 /* 16D050 8023E770 00000000 */ nop /* 16D054 8023E774 0808F9F9 */ j .L8023E7E4 /* 16D058 8023E778 00000000 */ nop glabel .L8023E77C /* 16D05C 8023E77C 0C091510 */ jal func_80245440 /* 16D060 8023E780 00000000 */ nop /* 16D064 8023E784 0808F9F9 */ j .L8023E7E4 /* 16D068 8023E788 00000000 */ nop glabel .L8023E78C /* 16D06C 8023E78C 0C090FF7 */ jal func_80243FDC /* 16D070 8023E790 00000000 */ nop /* 16D074 8023E794 0808F9F9 */ j .L8023E7E4 /* 16D078 8023E798 00000000 */ nop glabel .L8023E79C /* 16D07C 8023E79C 0C0911C4 */ jal func_80244710 /* 16D080 8023E7A0 00000000 */ nop /* 16D084 8023E7A4 0808F9F9 */ j .L8023E7E4 /* 16D088 8023E7A8 00000000 */ nop glabel .L8023E7AC /* 16D08C 8023E7AC 0C092198 */ jal func_80248660 /* 16D090 8023E7B0 00000000 */ nop /* 16D094 8023E7B4 0808F9F9 */ j .L8023E7E4 /* 16D098 8023E7B8 00000000 */ nop glabel .L8023E7BC /* 16D09C 8023E7BC 0C0AACCC */ jal func_802AB330_7B2CD0 /* 16D0A0 8023E7C0 00000000 */ nop /* 16D0A4 8023E7C4 0808F9F9 */ j .L8023E7E4 /* 16D0A8 8023E7C8 00000000 */ nop glabel .L8023E7CC /* 16D0AC 8023E7CC 0C097864 */ jal func_8025E190 /* 16D0B0 8023E7D0 00000000 */ nop /* 16D0B4 8023E7D4 0808F9F9 */ j .L8023E7E4 /* 16D0B8 8023E7D8 00000000 */ nop glabel .L8023E7DC /* 16D0BC 8023E7DC 0C0922C2 */ jal func_80248B08 /* 16D0C0 8023E7E0 0000882D */ daddu $s1, $zero, $zero glabel .L8023E7E4 /* 16D0C4 8023E7E4 96020090 */ lhu $v0, 0x90($s0) /* 16D0C8 8023E7E8 24030028 */ addiu $v1, $zero, 0x28 /* 16D0CC 8023E7EC 24420001 */ addiu $v0, $v0, 0x1 /* 16D0D0 8023E7F0 A6020090 */ sh $v0, 0x90($s0) /* 16D0D4 8023E7F4 00021400 */ sll $v0, $v0, 16 /* 16D0D8 8023E7F8 00021403 */ sra $v0, $v0, 16 /* 16D0DC 8023E7FC 14430003 */ bne $v0, $v1, .L8023E80C /* 16D0E0 8023E800 00000000 */ nop /* 16D0E4 8023E804 0C093DF2 */ jal func_8024F7C8 /* 16D0E8 8023E808 00000000 */ nop .L8023E80C: /* 16D0EC 8023E80C 0C0999A1 */ jal update_damage_popups /* 16D0F0 8023E810 00000000 */ nop /* 16D0F4 8023E814 0C099A5E */ jal update_action_ratings /* 16D0F8 8023E818 00000000 */ nop /* 16D0FC 8023E81C 0C099AC5 */ jal update_health_bars /* 16D100 8023E820 00000000 */ nop /* 16D104 8023E824 0C093B92 */ jal func_8024EE48 /* 16D108 8023E828 00000000 */ nop /* 16D10C 8023E82C 0C08F901 */ jal update_actor_shadows /* 16D110 8023E830 00000000 */ nop /* 16D114 8023E834 82030432 */ lb $v1, 0x432($s0) /* 16D118 8023E838 2402FFFE */ addiu $v0, $zero, -0x2 /* 16D11C 8023E83C 10620089 */ beq $v1, $v0, .L8023EA64 /* 16D120 8023E840 27A50018 */ addiu $a1, $sp, 0x18 /* 16D124 8023E844 24040001 */ addiu $a0, $zero, 0x1 /* 16D128 8023E848 0C04DF70 */ jal get_screen_overlay_params /* 16D12C 8023E84C 27A6001C */ addiu $a2, $sp, 0x1C /* 16D130 8023E850 82020432 */ lb $v0, 0x432($s0) /* 16D134 8023E854 1840002C */ blez $v0, .L8023E908 /* 16D138 8023E858 24040001 */ addiu $a0, $zero, 0x1 /* 16D13C 8023E85C 0000282D */ daddu $a1, $zero, $zero /* 16D140 8023E860 00A0302D */ daddu $a2, $a1, $zero /* 16D144 8023E864 0C04DF84 */ jal set_screen_overlay_color /* 16D148 8023E868 00A0382D */ daddu $a3, $a1, $zero /* 16D14C 8023E86C 16400003 */ bnez $s2, .L8023E87C /* 16D150 8023E870 00000000 */ nop /* 16D154 8023E874 0808FA56 */ j .L8023E958 /* 16D158 8023E878 3C054357 */ lui $a1, (0x43570000 >> 16) .L8023E87C: /* 16D15C 8023E87C 3C028011 */ lui $v0, %hi(gPlayerData) /* 16D160 8023E880 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* 16D164 8023E884 80430012 */ lb $v1, 0x12($v0) /* 16D168 8023E888 24020006 */ addiu $v0, $zero, 0x6 /* 16D16C 8023E88C 1462000F */ bne $v1, $v0, .L8023E8CC /* 16D170 8023E890 00000000 */ nop /* 16D174 8023E894 C7A0001C */ lwc1 $f0, 0x1C($sp) /* 16D178 8023E898 3C014120 */ lui $at, (0x41200000 >> 16) /* 16D17C 8023E89C 44811000 */ mtc1 $at, $f2 /* 16D180 8023E8A0 00000000 */ nop /* 16D184 8023E8A4 46020001 */ sub.s $f0, $f0, $f2 /* 16D188 8023E8A8 44801000 */ mtc1 $zero, $f2 /* 16D18C 8023E8AC 00000000 */ nop /* 16D190 8023E8B0 4602003C */ c.lt.s $f0, $f2 /* 16D194 8023E8B4 00000000 */ nop /* 16D198 8023E8B8 45000002 */ bc1f .L8023E8C4 /* 16D19C 8023E8BC E7A0001C */ swc1 $f0, 0x1C($sp) /* 16D1A0 8023E8C0 E7A2001C */ swc1 $f2, 0x1C($sp) .L8023E8C4: /* 16D1A4 8023E8C4 0808FA56 */ j .L8023E958 /* 16D1A8 8023E8C8 8FA5001C */ lw $a1, 0x1C($sp) .L8023E8CC: /* 16D1AC 8023E8CC C7A0001C */ lwc1 $f0, 0x1C($sp) /* 16D1B0 8023E8D0 3C014120 */ lui $at, (0x41200000 >> 16) /* 16D1B4 8023E8D4 44811000 */ mtc1 $at, $f2 /* 16D1B8 8023E8D8 00000000 */ nop /* 16D1BC 8023E8DC 46020000 */ add.s $f0, $f0, $f2 /* 16D1C0 8023E8E0 3C014357 */ lui $at, (0x43570000 >> 16) /* 16D1C4 8023E8E4 44811000 */ mtc1 $at, $f2 /* 16D1C8 8023E8E8 00000000 */ nop /* 16D1CC 8023E8EC 4600103C */ c.lt.s $f2, $f0 /* 16D1D0 8023E8F0 00000000 */ nop /* 16D1D4 8023E8F4 45000002 */ bc1f .L8023E900 /* 16D1D8 8023E8F8 E7A0001C */ swc1 $f0, 0x1C($sp) /* 16D1DC 8023E8FC E7A2001C */ swc1 $f2, 0x1C($sp) .L8023E900: /* 16D1E0 8023E900 0808FA56 */ j .L8023E958 /* 16D1E4 8023E904 8FA5001C */ lw $a1, 0x1C($sp) .L8023E908: /* 16D1E8 8023E908 04410015 */ bgez $v0, .L8023E960 /* 16D1EC 8023E90C 00000000 */ nop /* 16D1F0 8023E910 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 16D1F4 8023E914 3C014120 */ lui $at, (0x41200000 >> 16) /* 16D1F8 8023E918 44810000 */ mtc1 $at, $f0 /* 16D1FC 8023E91C 00000000 */ nop /* 16D200 8023E920 46001081 */ sub.s $f2, $f2, $f0 /* 16D204 8023E924 44800000 */ mtc1 $zero, $f0 /* 16D208 8023E928 00000000 */ nop /* 16D20C 8023E92C 4600103C */ c.lt.s $f2, $f0 /* 16D210 8023E930 00000000 */ nop /* 16D214 8023E934 45000007 */ bc1f .L8023E954 /* 16D218 8023E938 E7A2001C */ swc1 $f2, 0x1C($sp) /* 16D21C 8023E93C 3C05BF80 */ lui $a1, (0xBF800000 >> 16) /* 16D220 8023E940 240400FF */ addiu $a0, $zero, 0xFF /* 16D224 8023E944 0C04DF69 */ jal set_screen_overlay_params_back /* 16D228 8023E948 E7A0001C */ swc1 $f0, 0x1C($sp) /* 16D22C 8023E94C 0808FA58 */ j .L8023E960 /* 16D230 8023E950 A2000432 */ sb $zero, 0x432($s0) .L8023E954: /* 16D234 8023E954 44051000 */ mfc1 $a1, $f2 .L8023E958: /* 16D238 8023E958 0C04DF69 */ jal set_screen_overlay_params_back /* 16D23C 8023E95C 0000202D */ daddu $a0, $zero, $zero .L8023E960: /* 16D240 8023E960 16200005 */ bnez $s1, .L8023E978 /* 16D244 8023E964 2402FFFF */ addiu $v0, $zero, -0x1 /* 16D248 8023E968 3C038028 */ lui $v1, %hi(D_802809F6) /* 16D24C 8023E96C 846309F6 */ lh $v1, %lo(D_802809F6)($v1) /* 16D250 8023E970 1062003C */ beq $v1, $v0, .L8023EA64 /* 16D254 8023E974 00000000 */ nop .L8023E978: /* 16D258 8023E978 3C108028 */ lui $s0, %hi(D_802809F6) /* 16D25C 8023E97C 261009F6 */ addiu $s0, $s0, %lo(D_802809F6) /* 16D260 8023E980 2402FFFF */ addiu $v0, $zero, -0x1 /* 16D264 8023E984 86040000 */ lh $a0, 0x0($s0) /* 16D268 8023E988 96030000 */ lhu $v1, 0x0($s0) /* 16D26C 8023E98C 14820014 */ bne $a0, $v0, .L8023E9E0 /* 16D270 8023E990 240500FF */ addiu $a1, $zero, 0xFF /* 16D274 8023E994 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 16D278 8023E998 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 16D27C 8023E99C 80430071 */ lb $v1, 0x71($v0) /* 16D280 8023E9A0 24020002 */ addiu $v0, $zero, 0x2 /* 16D284 8023E9A4 1462002F */ bne $v1, $v0, .L8023EA64 /* 16D288 8023E9A8 27A50020 */ addiu $a1, $sp, 0x20 /* 16D28C 8023E9AC 0000202D */ daddu $a0, $zero, $zero /* 16D290 8023E9B0 0C04DF70 */ jal get_screen_overlay_params /* 16D294 8023E9B4 27A60024 */ addiu $a2, $sp, 0x24 /* 16D298 8023E9B8 93A30020 */ lbu $v1, 0x20($sp) /* 16D29C 8023E9BC 240200FF */ addiu $v0, $zero, 0xFF /* 16D2A0 8023E9C0 14620028 */ bne $v1, $v0, .L8023EA64 /* 16D2A4 8023E9C4 00000000 */ nop /* 16D2A8 8023E9C8 A6000000 */ sh $zero, 0x0($s0) /* 16D2AC 8023E9CC 0000202D */ daddu $a0, $zero, $zero /* 16D2B0 8023E9D0 0C04DF62 */ jal set_screen_overlay_params_front /* 16D2B4 8023E9D4 0000282D */ daddu $a1, $zero, $zero /* 16D2B8 8023E9D8 0808FA99 */ j .L8023EA64 /* 16D2BC 8023E9DC 00000000 */ nop .L8023E9E0: /* 16D2C0 8023E9E0 1485000A */ bne $a0, $a1, .L8023EA0C /* 16D2C4 8023E9E4 2462000A */ addiu $v0, $v1, 0xA /* 16D2C8 8023E9E8 3C03800E */ lui $v1, %hi(gBattleState) /* 16D2CC 8023E9EC 8C63C068 */ lw $v1, %lo(gBattleState)($v1) /* 16D2D0 8023E9F0 24020023 */ addiu $v0, $zero, 0x23 /* 16D2D4 8023E9F4 1062001B */ beq $v1, $v0, .L8023EA64 /* 16D2D8 8023E9F8 00000000 */ nop /* 16D2DC 8023E9FC 0C090464 */ jal func_80241190 /* 16D2E0 8023EA00 0040202D */ daddu $a0, $v0, $zero /* 16D2E4 8023EA04 0808FA99 */ j .L8023EA64 /* 16D2E8 8023EA08 00000000 */ nop .L8023EA0C: /* 16D2EC 8023EA0C A6020000 */ sh $v0, 0x0($s0) /* 16D2F0 8023EA10 00021400 */ sll $v0, $v0, 16 /* 16D2F4 8023EA14 00021403 */ sra $v0, $v0, 16 /* 16D2F8 8023EA18 28420100 */ slti $v0, $v0, 0x100 /* 16D2FC 8023EA1C 50400001 */ beql $v0, $zero, .L8023EA24 /* 16D300 8023EA20 A6050000 */ sh $a1, 0x0($s0) .L8023EA24: /* 16D304 8023EA24 86020000 */ lh $v0, 0x0($s0) /* 16D308 8023EA28 44822000 */ mtc1 $v0, $f4 /* 16D30C 8023EA2C 00000000 */ nop /* 16D310 8023EA30 46802120 */ cvt.s.w $f4, $f4 /* 16D314 8023EA34 44052000 */ mfc1 $a1, $f4 /* 16D318 8023EA38 0C04DF62 */ jal set_screen_overlay_params_front /* 16D31C 8023EA3C 0000202D */ daddu $a0, $zero, $zero /* 16D320 8023EA40 0000202D */ daddu $a0, $zero, $zero /* 16D324 8023EA44 240500D0 */ addiu $a1, $zero, 0xD0 /* 16D328 8023EA48 00A0302D */ daddu $a2, $a1, $zero /* 16D32C 8023EA4C 0C04DF84 */ jal set_screen_overlay_color /* 16D330 8023EA50 00A0382D */ daddu $a3, $a1, $zero /* 16D334 8023EA54 0C00CDF4 */ jal intro_logos_set_fade_alpha /* 16D338 8023EA58 240400FF */ addiu $a0, $zero, 0xFF /* 16D33C 8023EA5C 0C00CDF8 */ jal intro_logos_set_fade_color /* 16D340 8023EA60 240400E0 */ addiu $a0, $zero, 0xE0 glabel .L8023EA64 /* 16D344 8023EA64 8FBF0034 */ lw $ra, 0x34($sp) /* 16D348 8023EA68 8FB20030 */ lw $s2, 0x30($sp) /* 16D34C 8023EA6C 8FB1002C */ lw $s1, 0x2C($sp) /* 16D350 8023EA70 8FB00028 */ lw $s0, 0x28($sp) /* 16D354 8023EA74 03E00008 */ jr $ra /* 16D358 8023EA78 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void btl_update(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; Actor* partner = battleStatus->partnerActor; f32 dpadAngle; f32 dpadMagnitude; s32 cond; if (battleStatus->inputBitmask != -1) { if ((battleStatus->flags1 & BS_FLAGS1_PARTNER_ACTING) && gGameStatusPtr->multiplayerEnabled != 0) { s32 inputBitmask = battleStatus->inputBitmask; battleStatus->currentButtonsDown = gGameStatusPtr->currentButtons[1] & inputBitmask; battleStatus->currentButtonsPressed = gGameStatusPtr->pressedButtons[1] & inputBitmask; battleStatus->currentButtonsHeld = gGameStatusPtr->heldButtons[1] & inputBitmask; battleStatus->stickX = gGameStatusPtr->stickX[1]; battleStatus->stickY = gGameStatusPtr->stickY[1]; } else { s32 inputBitmask2 = battleStatus->inputBitmask; battleStatus->currentButtonsDown = gGameStatusPtr->currentButtons[0] & inputBitmask2; battleStatus->currentButtonsPressed = gGameStatusPtr->pressedButtons[0] & inputBitmask2; battleStatus->currentButtonsHeld = gGameStatusPtr->heldButtons[0] & inputBitmask2; battleStatus->stickX = gGameStatusPtr->stickX[0]; battleStatus->stickY = gGameStatusPtr->stickY[0]; } } get_dpad_input_radial(&dpadAngle, &dpadMagnitude); battleStatus->dpadX = dpadAngle; battleStatus->dpadY = dpadMagnitude; battleStatus->pushInputBuffer[battleStatus->inputBufferPos] = battleStatus->currentButtonsPressed; battleStatus->holdInputBuffer[battleStatus->inputBufferPos] = battleStatus->currentButtonsDown; battleStatus->inputBufferPos++; if (battleStatus->inputBufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) { battleStatus->inputBufferPos = 0; } if (battleStatus->preUpdateCallback != NULL) { battleStatus->preUpdateCallback(); } cond = TRUE; if (battleStatus->unk_95 == 0 || battleStatus->unk_95 != gBattleState) { switch (gBattleState) { case BATTLE_STATE_NEGATIVE_1: case BATTLE_STATE_0: return; case BATTLE_STATE_NORMAL_START: btl_state_update_normal_start(); cond = FALSE; break; case BATTLE_STATE_BEGIN_PLAYER_TURN: btl_state_update_begin_player_turn(); break; case BATTLE_STATE_BEGIN_PARTNER_TURN: btl_state_update_begin_partner_turn(); break; case BATTLE_STATE_9: btl_state_update_9(); break; case BATTLE_STATE_BEGIN_TURN: btl_state_update_begin_turn(); break; case BATTLE_STATE_END_TURN: btl_state_update_end_turn(); break; case BATTLE_STATE_SWITCH_TO_PLAYER: btl_state_update_switch_to_player(); break; case BATTLE_STATE_SWITCH_TO_PARTNER: btl_state_update_switch_to_partner(); break; case BATTLE_STATE_PREPARE_MENU: btl_state_update_prepare_menu(); break; case BATTLE_STATE_PLAYER_MENU: btl_state_update_player_menu(); break; case BATTLE_STATE_PARTNER_MENU: btl_state_update_partner_menu(); break; case BATTLE_STATE_TWINK_MENU: btl_state_update_twink_menu(); break; case BATTLE_STATE_PEACH_MENU: btl_state_update_peach_menu(); break; case BATTLE_STATE_SELECT_TARGET: btl_state_update_select_target(); break; case BATTLE_STATE_PLAYER_MOVE: btl_state_update_player_move(); break; case BATTLE_STATE_FIRST_STRIKE: btl_state_update_first_strike(); break; case BATTLE_STATE_END_PLAYER_TURN: btl_state_update_end_player_turn(); break; case BATTLE_STATE_END_PARTNER_TURN: btl_state_update_end_partner_turn(); break; case BATTLE_STATE_ENEMY_MOVE: btl_state_update_enemy_move(); break; case BATTLE_STATE_PARTNER_FIRST_STRIKE: btl_state_update_partner_striking_first(); break; case BATTLE_STATE_NEXT_ENEMY: btl_state_update_next_enemy(); break; case BATTLE_STATE_PARTNER_MOVE: btl_state_update_partner_move(); break; case BATTLE_STATE_VICTORY: btl_state_update_victory(); break; case BATTLE_STATE_END_BATTLE: btl_state_update_end_battle(); break; case BATTLE_STATE_CHANGE_PARTNER: btl_state_update_change_partner(); break; case BATTLE_STATE_RUN_AWAY: btl_state_update_run_away(); break; case BATTLE_STATE_DEFEND: btl_state_update_defend(); break; case BATTLE_STATE_DEFEAT: btl_state_update_defeat(); break; case BATTLE_STATE_28: btl_state_update_1C(); break; case BATTLE_STATE_END_TRAINING_BATTLE: btl_state_update_end_training_battle(); break; case BATTLE_STATE_ENEMY_FIRST_STRIKE: btl_state_update_enemy_striking_first(); break; case BATTLE_STATE_34: btl_state_update_22(); break; case BATTLE_STATE_CELEBRATION: btl_state_update_celebration(); break; case BATTLE_STATE_END_DEMO_BATTLE: btl_state_update_end_demo_battle(); cond = FALSE; break; } } battleStatus->unk_90++; if (battleStatus->unk_90 == 40) { btl_bonk_cleanup(); } update_damage_popups(); update_action_ratings(); update_health_bars(); btl_popup_messages_update(); update_actor_shadows(); if (battleStatus->darknessMode != BTL_DARKNESS_STATE_LOCKED) { u8 paramType; f32 paramAmount; get_screen_overlay_params(SCREEN_LAYER_BACK, &paramType, &paramAmount); if (battleStatus->darknessMode > BTL_DARKNESS_STATE_NONE) { set_screen_overlay_color(SCREEN_LAYER_BACK, 0, 0, 0); if (partner == NULL) { set_screen_overlay_params_back(OVERLAY_SCREEN_COLOR, 215.0f); } else if (playerData->currentPartner == PARTNER_WATT) { paramAmount -= 10.0f; if (paramAmount < 0.0f) { paramAmount = 0.0f; } set_screen_overlay_params_back(OVERLAY_SCREEN_COLOR, paramAmount); } else { paramAmount += 10.0f; if (paramAmount > 215.0f) { paramAmount = 215.0f; } set_screen_overlay_params_back(OVERLAY_SCREEN_COLOR, paramAmount); } } else if (battleStatus->darknessMode < BTL_DARKNESS_STATE_NONE) { paramAmount -= 10.0f; if (paramAmount < 0.0f) { paramAmount = 0.0f; set_screen_overlay_params_back(OVERLAY_NONE, -1.0f); battleStatus->darknessMode = BTL_DARKNESS_STATE_NONE; } else { set_screen_overlay_params_back(OVERLAY_SCREEN_COLOR, paramAmount); } } if (cond || D_802809F6 != -1) { if (D_802809F6 == -1) { if (gGameStatusPtr->demoState == DEMO_STATE_CHANGE_MAP) { u8 paramType; f32 paramAmount; get_screen_overlay_params(SCREEN_LAYER_FRONT, &paramType, &paramAmount); if (paramType == (u8) OVERLAY_NONE) { D_802809F6 = 0; set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, 0.0f); } } } else if (D_802809F6 == 255) { if (gBattleState != BATTLE_STATE_END_DEMO_BATTLE) { btl_set_state(BATTLE_STATE_END_DEMO_BATTLE); } } else { D_802809F6 += 10; if (D_802809F6 > 255) { D_802809F6 = 255; } set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, D_802809F6); set_screen_overlay_color(SCREEN_LAYER_FRONT, 208, 208, 208); intro_logos_set_fade_alpha(255); intro_logos_set_fade_color(224); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel is_point_visible /* B36BC 8011CFBC 44860000 */ mtc1 $a2, $f0 /* B36C0 8011CFC0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* B36C4 8011CFC4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* B36C8 8011CFC8 27BDFF88 */ addiu $sp, $sp, -0x78 /* B36CC 8011CFCC AFB00040 */ sw $s0, 0x40($sp) /* B36D0 8011CFD0 8FB00088 */ lw $s0, 0x88($sp) /* B36D4 8011CFD4 AFB10044 */ sw $s1, 0x44($sp) /* B36D8 8011CFD8 8FB1008C */ lw $s1, 0x8C($sp) /* B36DC 8011CFDC 3C04800B */ lui $a0, %hi(gCameras) /* B36E0 8011CFE0 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* B36E4 8011CFE4 AFBF0064 */ sw $ra, 0x64($sp) /* B36E8 8011CFE8 AFBE0060 */ sw $fp, 0x60($sp) /* B36EC 8011CFEC AFB7005C */ sw $s7, 0x5C($sp) /* B36F0 8011CFF0 AFB60058 */ sw $s6, 0x58($sp) /* B36F4 8011CFF4 AFB50054 */ sw $s5, 0x54($sp) /* B36F8 8011CFF8 AFB40050 */ sw $s4, 0x50($sp) /* B36FC 8011CFFC AFB3004C */ sw $s3, 0x4C($sp) /* B3700 8011D000 AFB20048 */ sw $s2, 0x48($sp) /* B3704 8011D004 F7B60070 */ sdc1 $f22, 0x70($sp) /* B3708 8011D008 F7B40068 */ sdc1 $f20, 0x68($sp) /* B370C 8011D00C 00031080 */ sll $v0, $v1, 2 /* B3710 8011D010 00431021 */ addu $v0, $v0, $v1 /* B3714 8011D014 00021080 */ sll $v0, $v0, 2 /* B3718 8011D018 00431023 */ subu $v0, $v0, $v1 /* B371C 8011D01C 000218C0 */ sll $v1, $v0, 3 /* B3720 8011D020 00431021 */ addu $v0, $v0, $v1 /* B3724 8011D024 000210C0 */ sll $v0, $v0, 3 /* B3728 8011D028 0044F021 */ addu $fp, $v0, $a0 /* B372C 8011D02C 28E20010 */ slti $v0, $a3, 0x10 /* B3730 8011D030 104001AF */ beqz $v0, .L8011D6F0 /* B3734 8011D034 AFA70084 */ sw $a3, 0x84($sp) /* B3738 8011D038 27C400D4 */ addiu $a0, $fp, 0xD4 /* B373C 8011D03C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* B3740 8011D040 4481A000 */ mtc1 $at, $f20 /* B3744 8011D044 44056000 */ mfc1 $a1, $f12 /* B3748 8011D048 44067000 */ mfc1 $a2, $f14 /* B374C 8011D04C 44070000 */ mfc1 $a3, $f0 /* B3750 8011D050 27A20028 */ addiu $v0, $sp, 0x28 /* B3754 8011D054 AFA20014 */ sw $v0, 0x14($sp) /* B3758 8011D058 27A2002C */ addiu $v0, $sp, 0x2C /* B375C 8011D05C AFA20018 */ sw $v0, 0x18($sp) /* B3760 8011D060 27A20030 */ addiu $v0, $sp, 0x30 /* B3764 8011D064 AFA2001C */ sw $v0, 0x1C($sp) /* B3768 8011D068 27A20034 */ addiu $v0, $sp, 0x34 /* B376C 8011D06C AFA20020 */ sw $v0, 0x20($sp) /* B3770 8011D070 0C00A588 */ jal transform_point /* B3774 8011D074 E7B40010 */ swc1 $f20, 0x10($sp) /* B3778 8011D078 C7A00034 */ lwc1 $f0, 0x34($sp) /* B377C 8011D07C 44809000 */ mtc1 $zero, $f18 /* B3780 8011D080 00000000 */ nop /* B3784 8011D084 46120032 */ c.eq.s $f0, $f18 /* B3788 8011D088 00000000 */ nop /* B378C 8011D08C 45000004 */ bc1f .L8011D0A0 /* B3790 8011D090 24020001 */ addiu $v0, $zero, 0x1 /* B3794 8011D094 E6120000 */ swc1 $f18, 0x0($s0) /* B3798 8011D098 080475BD */ j .L8011D6F4 /* B379C 8011D09C E6320000 */ swc1 $f18, 0x0($s1) .L8011D0A0: /* B37A0 8011D0A0 C7AC0030 */ lwc1 $f12, 0x30($sp) /* B37A4 8011D0A4 4600A383 */ div.s $f14, $f20, $f0 /* B37A8 8011D0A8 460E6302 */ mul.s $f12, $f12, $f14 /* B37AC 8011D0AC 00000000 */ nop /* B37B0 8011D0B0 46146080 */ add.s $f2, $f12, $f20 /* B37B4 8011D0B4 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* B37B8 8011D0B8 44814800 */ mtc1 $at, $f9 /* B37BC 8011D0BC 44804000 */ mtc1 $zero, $f8 /* B37C0 8011D0C0 460010A1 */ cvt.d.s $f2, $f2 /* B37C4 8011D0C4 46281082 */ mul.d $f2, $f2, $f8 /* B37C8 8011D0C8 00000000 */ nop /* B37CC 8011D0CC C7B00028 */ lwc1 $f16, 0x28($sp) /* B37D0 8011D0D0 460E8402 */ mul.s $f16, $f16, $f14 /* B37D4 8011D0D4 00000000 */ nop /* B37D8 8011D0D8 87C2000A */ lh $v0, 0xA($fp) /* B37DC 8011D0DC 44820000 */ mtc1 $v0, $f0 /* B37E0 8011D0E0 00000000 */ nop /* B37E4 8011D0E4 46800020 */ cvt.s.w $f0, $f0 /* B37E8 8011D0E8 46008102 */ mul.s $f4, $f16, $f0 /* B37EC 8011D0EC 00000000 */ nop /* B37F0 8011D0F0 46002100 */ add.s $f4, $f4, $f0 /* B37F4 8011D0F4 46002121 */ cvt.d.s $f4, $f4 /* B37F8 8011D0F8 46282102 */ mul.d $f4, $f4, $f8 /* B37FC 8011D0FC 00000000 */ nop /* B3800 8011D100 C7A6002C */ lwc1 $f6, 0x2C($sp) /* B3804 8011D104 46007007 */ neg.s $f0, $f14 /* B3808 8011D108 46003182 */ mul.s $f6, $f6, $f0 /* B380C 8011D10C 00000000 */ nop /* B3810 8011D110 87C2000C */ lh $v0, 0xC($fp) /* B3814 8011D114 44825000 */ mtc1 $v0, $f10 /* B3818 8011D118 00000000 */ nop /* B381C 8011D11C 468052A0 */ cvt.s.w $f10, $f10 /* B3820 8011D120 460A3002 */ mul.s $f0, $f6, $f10 /* B3824 8011D124 00000000 */ nop /* B3828 8011D128 E7AE0034 */ swc1 $f14, 0x34($sp) /* B382C 8011D12C E7B00028 */ swc1 $f16, 0x28($sp) /* B3830 8011D130 E7AC0030 */ swc1 $f12, 0x30($sp) /* B3834 8011D134 460A0000 */ add.s $f0, $f0, $f10 /* B3838 8011D138 E7A6002C */ swc1 $f6, 0x2C($sp) /* B383C 8011D13C 462010A0 */ cvt.s.d $f2, $f2 /* B3840 8011D140 46000021 */ cvt.d.s $f0, $f0 /* B3844 8011D144 46280002 */ mul.d $f0, $f0, $f8 /* B3848 8011D148 00000000 */ nop /* B384C 8011D14C E7A20030 */ swc1 $f2, 0x30($sp) /* B3850 8011D150 87C2000E */ lh $v0, 0xE($fp) /* B3854 8011D154 44821000 */ mtc1 $v0, $f2 /* B3858 8011D158 00000000 */ nop /* B385C 8011D15C 468010A0 */ cvt.s.w $f2, $f2 /* B3860 8011D160 46202120 */ cvt.s.d $f4, $f4 /* B3864 8011D164 E7A40028 */ swc1 $f4, 0x28($sp) /* B3868 8011D168 87C20010 */ lh $v0, 0x10($fp) /* B386C 8011D16C 46022100 */ add.s $f4, $f4, $f2 /* B3870 8011D170 44821000 */ mtc1 $v0, $f2 /* B3874 8011D174 00000000 */ nop /* B3878 8011D178 468010A0 */ cvt.s.w $f2, $f2 /* B387C 8011D17C 46200020 */ cvt.s.d $f0, $f0 /* B3880 8011D180 46020080 */ add.s $f2, $f0, $f2 /* B3884 8011D184 E7A40028 */ swc1 $f4, 0x28($sp) /* B3888 8011D188 E7A0002C */ swc1 $f0, 0x2C($sp) /* B388C 8011D18C E7A2002C */ swc1 $f2, 0x2C($sp) /* B3890 8011D190 E6040000 */ swc1 $f4, 0x0($s0) /* B3894 8011D194 C7A0002C */ lwc1 $f0, 0x2C($sp) /* B3898 8011D198 E6200000 */ swc1 $f0, 0x0($s1) /* B389C 8011D19C 8FA80084 */ lw $t0, 0x84($sp) /* B38A0 8011D1A0 05010005 */ bgez $t0, .L8011D1B8 /* B38A4 8011D1A4 24020001 */ addiu $v0, $zero, 0x1 /* B38A8 8011D1A8 C7A00030 */ lwc1 $f0, 0x30($sp) /* B38AC 8011D1AC 4600903C */ c.lt.s $f18, $f0 /* B38B0 8011D1B0 080475BA */ j .L8011D6E8 /* B38B4 8011D1B4 00000000 */ nop .L8011D1B8: /* B38B8 8011D1B8 C7A40028 */ lwc1 $f4, 0x28($sp) /* B38BC 8011D1BC 4604903E */ c.le.s $f18, $f4 /* B38C0 8011D1C0 00000000 */ nop /* B38C4 8011D1C4 45000143 */ bc1f .L8011D6D4 /* B38C8 8011D1C8 00000000 */ nop /* B38CC 8011D1CC C7A2002C */ lwc1 $f2, 0x2C($sp) /* B38D0 8011D1D0 4602903E */ c.le.s $f18, $f2 /* B38D4 8011D1D4 00000000 */ nop /* B38D8 8011D1D8 4500013E */ bc1f .L8011D6D4 /* B38DC 8011D1DC 00000000 */ nop /* B38E0 8011D1E0 3C0143A0 */ lui $at, (0x43A00000 >> 16) /* B38E4 8011D1E4 44810000 */ mtc1 $at, $f0 /* B38E8 8011D1E8 00000000 */ nop /* B38EC 8011D1EC 4600203C */ c.lt.s $f4, $f0 /* B38F0 8011D1F0 00000000 */ nop /* B38F4 8011D1F4 45000137 */ bc1f .L8011D6D4 /* B38F8 8011D1F8 00000000 */ nop /* B38FC 8011D1FC 3C014370 */ lui $at, (0x43700000 >> 16) /* B3900 8011D200 44810000 */ mtc1 $at, $f0 /* B3904 8011D204 00000000 */ nop /* B3908 8011D208 4600103C */ c.lt.s $f2, $f0 /* B390C 8011D20C 00000000 */ nop /* B3910 8011D210 45000130 */ bc1f .L8011D6D4 /* B3914 8011D214 3C05FD10 */ lui $a1, (0xFD10013F >> 16) /* B3918 8011D218 3C11800A */ lui $s1, %hi(gMainGfxPos) /* B391C 8011D21C 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* B3920 8011D220 34A5013F */ ori $a1, $a1, (0xFD10013F & 0xFFFF) /* B3924 8011D224 4600158D */ trunc.w.s $f22, $f2 /* B3928 8011D228 4402B000 */ mfc1 $v0, $f22 /* B392C 8011D22C 00000000 */ nop /* B3930 8011D230 00022080 */ sll $a0, $v0, 2 /* B3934 8011D234 00822021 */ addu $a0, $a0, $v0 /* B3938 8011D238 000421C0 */ sll $a0, $a0, 7 /* B393C 8011D23C 3C13E700 */ lui $s3, (0xE7000000 >> 16) /* B3940 8011D240 8E320000 */ lw $s2, 0x0($s1) /* B3944 8011D244 3C02800A */ lui $v0, %hi(nuGfxZBuffer) /* B3948 8011D248 8C42A5DC */ lw $v0, %lo(nuGfxZBuffer)($v0) /* B394C 8011D24C 0240182D */ daddu $v1, $s2, $zero /* B3950 8011D250 26520008 */ addiu $s2, $s2, 0x8 /* B3954 8011D254 00442021 */ addu $a0, $v0, $a0 /* B3958 8011D258 26420008 */ addiu $v0, $s2, 0x8 /* B395C 8011D25C AE320000 */ sw $s2, 0x0($s1) /* B3960 8011D260 AC730000 */ sw $s3, 0x0($v1) /* B3964 8011D264 AC600004 */ sw $zero, 0x4($v1) /* B3968 8011D268 AE220000 */ sw $v0, 0x0($s1) /* B396C 8011D26C 0C0187A4 */ jal osVirtualToPhysical /* B3970 8011D270 AE450000 */ sw $a1, 0x0($s2) /* B3974 8011D274 3C06F510 */ lui $a2, (0xF5100200 >> 16) /* B3978 8011D278 34C60200 */ ori $a2, $a2, (0xF5100200 & 0xFFFF) /* B397C 8011D27C 3C030700 */ lui $v1, (0x7000090 >> 16) /* B3980 8011D280 34630090 */ ori $v1, $v1, (0x7000090 & 0xFFFF) /* B3984 8011D284 3C18FF10 */ lui $t8, (0xFF10013F >> 16) /* B3988 8011D288 3718013F */ ori $t8, $t8, (0xFF10013F & 0xFFFF) /* B398C 8011D28C 3C07E300 */ lui $a3, (0xE3000A01 >> 16) /* B3990 8011D290 34E70A01 */ ori $a3, $a3, (0xE3000A01 & 0xFFFF) /* B3994 8011D294 3C0AE200 */ lui $t2, (0xE200001C >> 16) /* B3998 8011D298 354A001C */ ori $t2, $t2, (0xE200001C & 0xFFFF) /* B399C 8011D29C 3C080F0A */ lui $t0, (0xF0A4000 >> 16) /* B39A0 8011D2A0 35084000 */ ori $t0, $t0, (0xF0A4000 & 0xFFFF) /* B39A4 8011D2A4 3C0BFCFF */ lui $t3, (0xFCFFFFFF >> 16) /* B39A8 8011D2A8 356BFFFF */ ori $t3, $t3, (0xFCFFFFFF & 0xFFFF) /* B39AC 8011D2AC 3C09FFFC */ lui $t1, (0xFFFCF279 >> 16) /* B39B0 8011D2B0 3529F279 */ ori $t1, $t1, (0xFFFCF279 & 0xFFFF) /* B39B4 8011D2B4 3C0CE300 */ lui $t4, (0xE3001201 >> 16) /* B39B8 8011D2B8 358C1201 */ ori $t4, $t4, (0xE3001201 & 0xFFFF) /* B39BC 8011D2BC 3C0DE300 */ lui $t5, (0xE3000C00 >> 16) /* B39C0 8011D2C0 35AD0C00 */ ori $t5, $t5, (0xE3000C00 & 0xFFFF) /* B39C4 8011D2C4 3C0ED700 */ lui $t6, (0xD7000002 >> 16) /* B39C8 8011D2C8 35CE0002 */ ori $t6, $t6, (0xD7000002 & 0xFFFF) /* B39CC 8011D2CC 3C0FE300 */ lui $t7, (0xE3001001 >> 16) /* B39D0 8011D2D0 35EF1001 */ ori $t7, $t7, (0xE3001001 & 0xFFFF) /* B39D4 8011D2D4 3C15E300 */ lui $s5, (0xE3000D01 >> 16) /* B39D8 8011D2D8 36B50D01 */ ori $s5, $s5, (0xE3000D01 & 0xFFFF) /* B39DC 8011D2DC 3C16E300 */ lui $s6, (0xE3000F00 >> 16) /* B39E0 8011D2E0 36D60F00 */ ori $s6, $s6, (0xE3000F00 & 0xFFFF) /* B39E4 8011D2E4 3C17E400 */ lui $s7, (0xE4000004 >> 16) /* B39E8 8011D2E8 36F70004 */ ori $s7, $s7, (0xE4000004 & 0xFFFF) /* B39EC 8011D2EC 3C190400 */ lui $t9, (0x4000400 >> 16) /* B39F0 8011D2F0 AFA80038 */ sw $t0, 0x38($sp) /* B39F4 8011D2F4 8E300000 */ lw $s0, 0x0($s1) /* B39F8 8011D2F8 3C148015 */ lui $s4, %hi(depthCopyBuffer) /* B39FC 8011D2FC 26943380 */ addiu $s4, $s4, %lo(depthCopyBuffer) /* B3A00 8011D300 AE420004 */ sw $v0, 0x4($s2) /* B3A04 8011D304 3C12ED00 */ lui $s2, (0xED000000 >> 16) /* B3A08 8011D308 37390400 */ ori $t9, $t9, (0x4000400 & 0xFFFF) /* B3A0C 8011D30C 0200102D */ daddu $v0, $s0, $zero /* B3A10 8011D310 26100008 */ addiu $s0, $s0, 0x8 /* B3A14 8011D314 AE300000 */ sw $s0, 0x0($s1) /* B3A18 8011D318 AC460000 */ sw $a2, 0x0($v0) /* B3A1C 8011D31C AC430004 */ sw $v1, 0x4($v0) /* B3A20 8011D320 26020008 */ addiu $v0, $s0, 0x8 /* B3A24 8011D324 AE220000 */ sw $v0, 0x0($s1) /* B3A28 8011D328 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* B3A2C 8011D32C AE020000 */ sw $v0, 0x0($s0) /* B3A30 8011D330 AE000004 */ sw $zero, 0x4($s0) /* B3A34 8011D334 C7A00028 */ lwc1 $f0, 0x28($sp) /* B3A38 8011D338 26020010 */ addiu $v0, $s0, 0x10 /* B3A3C 8011D33C AE220000 */ sw $v0, 0x0($s1) /* B3A40 8011D340 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* B3A44 8011D344 4600058D */ trunc.w.s $f22, $f0 /* B3A48 8011D348 4405B000 */ mfc1 $a1, $f22 /* B3A4C 8011D34C 00000000 */ nop /* B3A50 8011D350 00052080 */ sll $a0, $a1, 2 /* B3A54 8011D354 30840FFF */ andi $a0, $a0, 0xFFF /* B3A58 8011D358 00042300 */ sll $a0, $a0, 12 /* B3A5C 8011D35C 00821025 */ or $v0, $a0, $v0 /* B3A60 8011D360 24A30003 */ addiu $v1, $a1, 0x3 /* B3A64 8011D364 00031880 */ sll $v1, $v1, 2 /* B3A68 8011D368 30630FFF */ andi $v1, $v1, 0xFFF /* B3A6C 8011D36C 00031B00 */ sll $v1, $v1, 12 /* B3A70 8011D370 AE020008 */ sw $v0, 0x8($s0) /* B3A74 8011D374 3C020700 */ lui $v0, (0x7000000 >> 16) /* B3A78 8011D378 00621025 */ or $v0, $v1, $v0 /* B3A7C 8011D37C AE02000C */ sw $v0, 0xC($s0) /* B3A80 8011D380 26020018 */ addiu $v0, $s0, 0x18 /* B3A84 8011D384 AE220000 */ sw $v0, 0x0($s1) /* B3A88 8011D388 26020020 */ addiu $v0, $s0, 0x20 /* B3A8C 8011D38C AE130010 */ sw $s3, 0x10($s0) /* B3A90 8011D390 AE000014 */ sw $zero, 0x14($s0) /* B3A94 8011D394 AE220000 */ sw $v0, 0x0($s1) /* B3A98 8011D398 24020090 */ addiu $v0, $zero, 0x90 /* B3A9C 8011D39C AE02001C */ sw $v0, 0x1C($s0) /* B3AA0 8011D3A0 26020028 */ addiu $v0, $s0, 0x28 /* B3AA4 8011D3A4 AE060018 */ sw $a2, 0x18($s0) /* B3AA8 8011D3A8 AE220000 */ sw $v0, 0x0($s1) /* B3AAC 8011D3AC 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* B3AB0 8011D3B0 00822025 */ or $a0, $a0, $v0 /* B3AB4 8011D3B4 26020030 */ addiu $v0, $s0, 0x30 /* B3AB8 8011D3B8 AE040020 */ sw $a0, 0x20($s0) /* B3ABC 8011D3BC AE030024 */ sw $v1, 0x24($s0) /* B3AC0 8011D3C0 AE220000 */ sw $v0, 0x0($s1) /* B3AC4 8011D3C4 26020038 */ addiu $v0, $s0, 0x38 /* B3AC8 8011D3C8 AE130028 */ sw $s3, 0x28($s0) /* B3ACC 8011D3CC AE00002C */ sw $zero, 0x2C($s0) /* B3AD0 8011D3D0 AE220000 */ sw $v0, 0x0($s1) /* B3AD4 8011D3D4 26020040 */ addiu $v0, $s0, 0x40 /* B3AD8 8011D3D8 AE180030 */ sw $t8, 0x30($s0) /* B3ADC 8011D3DC AE140034 */ sw $s4, 0x34($s0) /* B3AE0 8011D3E0 AE220000 */ sw $v0, 0x0($s1) /* B3AE4 8011D3E4 26020048 */ addiu $v0, $s0, 0x48 /* B3AE8 8011D3E8 AE130038 */ sw $s3, 0x38($s0) /* B3AEC 8011D3EC AE00003C */ sw $zero, 0x3C($s0) /* B3AF0 8011D3F0 AE220000 */ sw $v0, 0x0($s1) /* B3AF4 8011D3F4 26020050 */ addiu $v0, $s0, 0x50 /* B3AF8 8011D3F8 AE070040 */ sw $a3, 0x40($s0) /* B3AFC 8011D3FC AE000044 */ sw $zero, 0x44($s0) /* B3B00 8011D400 AE220000 */ sw $v0, 0x0($s1) /* B3B04 8011D404 AE0A0048 */ sw $t2, 0x48($s0) /* B3B08 8011D408 8FA80038 */ lw $t0, 0x38($sp) /* B3B0C 8011D40C 26020058 */ addiu $v0, $s0, 0x58 /* B3B10 8011D410 AE08004C */ sw $t0, 0x4C($s0) /* B3B14 8011D414 AE220000 */ sw $v0, 0x0($s1) /* B3B18 8011D418 26020060 */ addiu $v0, $s0, 0x60 /* B3B1C 8011D41C AE0B0050 */ sw $t3, 0x50($s0) /* B3B20 8011D420 AE090054 */ sw $t1, 0x54($s0) /* B3B24 8011D424 AE220000 */ sw $v0, 0x0($s1) /* B3B28 8011D428 26020068 */ addiu $v0, $s0, 0x68 /* B3B2C 8011D42C AE0C0058 */ sw $t4, 0x58($s0) /* B3B30 8011D430 AE00005C */ sw $zero, 0x5C($s0) /* B3B34 8011D434 AE220000 */ sw $v0, 0x0($s1) /* B3B38 8011D438 26020070 */ addiu $v0, $s0, 0x70 /* B3B3C 8011D43C AE0D0060 */ sw $t5, 0x60($s0) /* B3B40 8011D440 AE000064 */ sw $zero, 0x64($s0) /* B3B44 8011D444 AE220000 */ sw $v0, 0x0($s1) /* B3B48 8011D448 2402FFFF */ addiu $v0, $zero, -0x1 /* B3B4C 8011D44C AE02006C */ sw $v0, 0x6C($s0) /* B3B50 8011D450 26020078 */ addiu $v0, $s0, 0x78 /* B3B54 8011D454 AE0E0068 */ sw $t6, 0x68($s0) /* B3B58 8011D458 AE220000 */ sw $v0, 0x0($s1) /* B3B5C 8011D45C 26020080 */ addiu $v0, $s0, 0x80 /* B3B60 8011D460 AE0F0070 */ sw $t7, 0x70($s0) /* B3B64 8011D464 AE000074 */ sw $zero, 0x74($s0) /* B3B68 8011D468 AE220000 */ sw $v0, 0x0($s1) /* B3B6C 8011D46C 26020088 */ addiu $v0, $s0, 0x88 /* B3B70 8011D470 AE150078 */ sw $s5, 0x78($s0) /* B3B74 8011D474 AE00007C */ sw $zero, 0x7C($s0) /* B3B78 8011D478 AE220000 */ sw $v0, 0x0($s1) /* B3B7C 8011D47C 26020090 */ addiu $v0, $s0, 0x90 /* B3B80 8011D480 AE160080 */ sw $s6, 0x80($s0) /* B3B84 8011D484 AE000084 */ sw $zero, 0x84($s0) /* B3B88 8011D488 AE220000 */ sw $v0, 0x0($s1) /* B3B8C 8011D48C 26020098 */ addiu $v0, $s0, 0x98 /* B3B90 8011D490 AE220000 */ sw $v0, 0x0($s1) /* B3B94 8011D494 8FA80084 */ lw $t0, 0x84($sp) /* B3B98 8011D498 3C014080 */ lui $at, (0x40800000 >> 16) /* B3B9C 8011D49C 4481A000 */ mtc1 $at, $f20 /* B3BA0 8011D4A0 25030001 */ addiu $v1, $t0, 0x1 /* B3BA4 8011D4A4 00031080 */ sll $v0, $v1, 2 /* B3BA8 8011D4A8 30420FFF */ andi $v0, $v0, 0xFFF /* B3BAC 8011D4AC 00021300 */ sll $v0, $v0, 12 /* B3BB0 8011D4B0 00571025 */ or $v0, $v0, $s7 /* B3BB4 8011D4B4 AE020090 */ sw $v0, 0x90($s0) /* B3BB8 8011D4B8 00081080 */ sll $v0, $t0, 2 /* B3BBC 8011D4BC 30420FFF */ andi $v0, $v0, 0xFFF /* B3BC0 8011D4C0 00021300 */ sll $v0, $v0, 12 /* B3BC4 8011D4C4 AE020094 */ sw $v0, 0x94($s0) /* B3BC8 8011D4C8 260200A0 */ addiu $v0, $s0, 0xA0 /* B3BCC 8011D4CC AE220000 */ sw $v0, 0x0($s1) /* B3BD0 8011D4D0 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* B3BD4 8011D4D4 AE020098 */ sw $v0, 0x98($s0) /* B3BD8 8011D4D8 C7A00084 */ lwc1 $f0, 0x84($sp) /* B3BDC 8011D4DC 46800020 */ cvt.s.w $f0, $f0 /* B3BE0 8011D4E0 46140002 */ mul.s $f0, $f0, $f20 /* B3BE4 8011D4E4 00000000 */ nop /* B3BE8 8011D4E8 00052D40 */ sll $a1, $a1, 21 /* B3BEC 8011D4EC 260200A8 */ addiu $v0, $s0, 0xA8 /* B3BF0 8011D4F0 AE05009C */ sw $a1, 0x9C($s0) /* B3BF4 8011D4F4 AE220000 */ sw $v0, 0x0($s1) /* B3BF8 8011D4F8 4600058D */ trunc.w.s $f22, $f0 /* B3BFC 8011D4FC 4402B000 */ mfc1 $v0, $f22 /* B3C00 8011D500 44830000 */ mtc1 $v1, $f0 /* B3C04 8011D504 00000000 */ nop /* B3C08 8011D508 46800020 */ cvt.s.w $f0, $f0 /* B3C0C 8011D50C 46140002 */ mul.s $f0, $f0, $f20 /* B3C10 8011D510 00000000 */ nop /* B3C14 8011D514 30420FFF */ andi $v0, $v0, 0xFFF /* B3C18 8011D518 00021300 */ sll $v0, $v0, 12 /* B3C1C 8011D51C 00521025 */ or $v0, $v0, $s2 /* B3C20 8011D520 AE020088 */ sw $v0, 0x88($s0) /* B3C24 8011D524 4600058D */ trunc.w.s $f22, $f0 /* B3C28 8011D528 4402B000 */ mfc1 $v0, $f22 /* B3C2C 8011D52C 00000000 */ nop /* B3C30 8011D530 30420FFF */ andi $v0, $v0, 0xFFF /* B3C34 8011D534 00021300 */ sll $v0, $v0, 12 /* B3C38 8011D538 34420004 */ ori $v0, $v0, 0x4 /* B3C3C 8011D53C AE02008C */ sw $v0, 0x8C($s0) /* B3C40 8011D540 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* B3C44 8011D544 AE0200A0 */ sw $v0, 0xA0($s0) /* B3C48 8011D548 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) /* B3C4C 8011D54C 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) /* B3C50 8011D550 260200B0 */ addiu $v0, $s0, 0xB0 /* B3C54 8011D554 AE1900A4 */ sw $t9, 0xA4($s0) /* B3C58 8011D558 AE220000 */ sw $v0, 0x0($s1) /* B3C5C 8011D55C 260200B8 */ addiu $v0, $s0, 0xB8 /* B3C60 8011D560 AE1300A8 */ sw $s3, 0xA8($s0) /* B3C64 8011D564 AE0000AC */ sw $zero, 0xAC($s0) /* B3C68 8011D568 AE220000 */ sw $v0, 0x0($s1) /* B3C6C 8011D56C 0C0187A4 */ jal osVirtualToPhysical /* B3C70 8011D570 AE1800B0 */ sw $t8, 0xB0($s0) /* B3C74 8011D574 8E240000 */ lw $a0, 0x0($s1) /* B3C78 8011D578 AE0200B4 */ sw $v0, 0xB4($s0) /* B3C7C 8011D57C 0080102D */ daddu $v0, $a0, $zero /* B3C80 8011D580 AC530000 */ sw $s3, 0x0($v0) /* B3C84 8011D584 AC400004 */ sw $zero, 0x4($v0) /* B3C88 8011D588 87C2000E */ lh $v0, 0xE($fp) /* B3C8C 8011D58C 44820000 */ mtc1 $v0, $f0 /* B3C90 8011D590 00000000 */ nop /* B3C94 8011D594 46800020 */ cvt.s.w $f0, $f0 /* B3C98 8011D598 46140002 */ mul.s $f0, $f0, $f20 /* B3C9C 8011D59C 00000000 */ nop /* B3CA0 8011D5A0 87C20010 */ lh $v0, 0x10($fp) /* B3CA4 8011D5A4 44821000 */ mtc1 $v0, $f2 /* B3CA8 8011D5A8 00000000 */ nop /* B3CAC 8011D5AC 468010A0 */ cvt.s.w $f2, $f2 /* B3CB0 8011D5B0 46141082 */ mul.s $f2, $f2, $f20 /* B3CB4 8011D5B4 00000000 */ nop /* B3CB8 8011D5B8 24840008 */ addiu $a0, $a0, 0x8 /* B3CBC 8011D5BC 4600058D */ trunc.w.s $f22, $f0 /* B3CC0 8011D5C0 4403B000 */ mfc1 $v1, $f22 /* B3CC4 8011D5C4 00000000 */ nop /* B3CC8 8011D5C8 30630FFF */ andi $v1, $v1, 0xFFF /* B3CCC 8011D5CC 00031B00 */ sll $v1, $v1, 12 /* B3CD0 8011D5D0 4600158D */ trunc.w.s $f22, $f2 /* B3CD4 8011D5D4 4402B000 */ mfc1 $v0, $f22 /* B3CD8 8011D5D8 00000000 */ nop /* B3CDC 8011D5DC 30420FFF */ andi $v0, $v0, 0xFFF /* B3CE0 8011D5E0 00521025 */ or $v0, $v0, $s2 /* B3CE4 8011D5E4 00621825 */ or $v1, $v1, $v0 /* B3CE8 8011D5E8 AC830000 */ sw $v1, 0x0($a0) /* B3CEC 8011D5EC 87C2000E */ lh $v0, 0xE($fp) /* B3CF0 8011D5F0 87C3000A */ lh $v1, 0xA($fp) /* B3CF4 8011D5F4 00431021 */ addu $v0, $v0, $v1 /* B3CF8 8011D5F8 44821000 */ mtc1 $v0, $f2 /* B3CFC 8011D5FC 00000000 */ nop /* B3D00 8011D600 468010A0 */ cvt.s.w $f2, $f2 /* B3D04 8011D604 46141082 */ mul.s $f2, $f2, $f20 /* B3D08 8011D608 00000000 */ nop /* B3D0C 8011D60C 87C20010 */ lh $v0, 0x10($fp) /* B3D10 8011D610 87C3000C */ lh $v1, 0xC($fp) /* B3D14 8011D614 00431021 */ addu $v0, $v0, $v1 /* B3D18 8011D618 44820000 */ mtc1 $v0, $f0 /* B3D1C 8011D61C 00000000 */ nop /* B3D20 8011D620 46800020 */ cvt.s.w $f0, $f0 /* B3D24 8011D624 46140002 */ mul.s $f0, $f0, $f20 /* B3D28 8011D628 00000000 */ nop /* B3D2C 8011D62C AE240000 */ sw $a0, 0x0($s1) /* B3D30 8011D630 4600158D */ trunc.w.s $f22, $f2 /* B3D34 8011D634 4402B000 */ mfc1 $v0, $f22 /* B3D38 8011D638 00000000 */ nop /* B3D3C 8011D63C 30420FFF */ andi $v0, $v0, 0xFFF /* B3D40 8011D640 00021300 */ sll $v0, $v0, 12 /* B3D44 8011D644 4600058D */ trunc.w.s $f22, $f0 /* B3D48 8011D648 4403B000 */ mfc1 $v1, $f22 /* B3D4C 8011D64C 00000000 */ nop /* B3D50 8011D650 30630FFF */ andi $v1, $v1, 0xFFF /* B3D54 8011D654 00431025 */ or $v0, $v0, $v1 /* B3D58 8011D658 AC820004 */ sw $v0, 0x4($a0) /* B3D5C 8011D65C 8FA80084 */ lw $t0, 0x84($sp) /* B3D60 8011D660 3C0146FF */ lui $at, (0x46FF8000 >> 16) /* B3D64 8011D664 34218000 */ ori $at, $at, (0x46FF8000 & 0xFFFF) /* B3D68 8011D668 44810000 */ mtc1 $at, $f0 /* B3D6C 8011D66C 00081040 */ sll $v0, $t0, 1 /* B3D70 8011D670 00541021 */ addu $v0, $v0, $s4 /* B3D74 8011D674 94420000 */ lhu $v0, 0x0($v0) /* B3D78 8011D678 24840008 */ addiu $a0, $a0, 0x8 /* B3D7C 8011D67C AE240000 */ sw $a0, 0x0($s1) /* B3D80 8011D680 3C048015 */ lui $a0, %hi(depthFloatLookupTable) /* B3D84 8011D684 2484B7A8 */ addiu $a0, $a0, %lo(depthFloatLookupTable) /* B3D88 8011D688 C7A20030 */ lwc1 $f2, 0x30($sp) /* B3D8C 8011D68C 00021B42 */ srl $v1, $v0, 13 /* B3D90 8011D690 30421FFF */ andi $v0, $v0, 0x1FFF /* B3D94 8011D694 00021082 */ srl $v0, $v0, 2 /* B3D98 8011D698 000318C0 */ sll $v1, $v1, 3 /* B3D9C 8011D69C 00641821 */ addu $v1, $v1, $a0 /* B3DA0 8011D6A0 46001082 */ mul.s $f2, $f2, $f0 /* B3DA4 8011D6A4 00000000 */ nop /* B3DA8 8011D6A8 8C640000 */ lw $a0, 0x0($v1) /* B3DAC 8011D6AC 8C630004 */ lw $v1, 0x4($v1) /* B3DB0 8011D6B0 00821004 */ sllv $v0, $v0, $a0 /* B3DB4 8011D6B4 00431021 */ addu $v0, $v0, $v1 /* B3DB8 8011D6B8 000210C2 */ srl $v0, $v0, 3 /* B3DBC 8011D6BC 4600158D */ trunc.w.s $f22, $f2 /* B3DC0 8011D6C0 4403B000 */ mfc1 $v1, $f22 /* B3DC4 8011D6C4 00000000 */ nop /* B3DC8 8011D6C8 0043102B */ sltu $v0, $v0, $v1 /* B3DCC 8011D6CC 14400009 */ bnez $v0, .L8011D6F4 /* B3DD0 8011D6D0 0000102D */ daddu $v0, $zero, $zero .L8011D6D4: /* B3DD4 8011D6D4 C7A20030 */ lwc1 $f2, 0x30($sp) /* B3DD8 8011D6D8 44800000 */ mtc1 $zero, $f0 /* B3DDC 8011D6DC 24020001 */ addiu $v0, $zero, 0x1 /* B3DE0 8011D6E0 4602003C */ c.lt.s $f0, $f2 /* B3DE4 8011D6E4 00000000 */ nop .L8011D6E8: /* B3DE8 8011D6E8 45010002 */ bc1t .L8011D6F4 /* B3DEC 8011D6EC 00000000 */ nop .L8011D6F0: /* B3DF0 8011D6F0 0000102D */ daddu $v0, $zero, $zero .L8011D6F4: /* B3DF4 8011D6F4 8FBF0064 */ lw $ra, 0x64($sp) /* B3DF8 8011D6F8 8FBE0060 */ lw $fp, 0x60($sp) /* B3DFC 8011D6FC 8FB7005C */ lw $s7, 0x5C($sp) /* B3E00 8011D700 8FB60058 */ lw $s6, 0x58($sp) /* B3E04 8011D704 8FB50054 */ lw $s5, 0x54($sp) /* B3E08 8011D708 8FB40050 */ lw $s4, 0x50($sp) /* B3E0C 8011D70C 8FB3004C */ lw $s3, 0x4C($sp) /* B3E10 8011D710 8FB20048 */ lw $s2, 0x48($sp) /* B3E14 8011D714 8FB10044 */ lw $s1, 0x44($sp) /* B3E18 8011D718 8FB00040 */ lw $s0, 0x40($sp) /* B3E1C 8011D71C D7B60070 */ ldc1 $f22, 0x70($sp) /* B3E20 8011D720 D7B40068 */ ldc1 $f20, 0x68($sp) /* B3E24 8011D724 03E00008 */ jr $ra /* B3E28 8011D728 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* screenY) { Camera* camera = &gCameras[gCurrentCameraID]; f32 outX; f32 outY; f32 outZ; f32 outW; s32 depthExponent; s32 depthMantissa; u32 shiftedMantissa, mantissaBias; u32 decodedDepth; s32 scaledDepth; // If an invalid depth query id was provided, return false. if (depthQueryID >= ARRAY_COUNT(depthCopyBuffer)) { return FALSE; } // Transform the point into clip space. transform_point(camera->perspectiveMatrix, x, y, z, 1.0f, &outX, &outY, &outZ, &outW); if (outW == 0.0f) { *screenX = 0.0f; *screenY = 0.0f; return TRUE; } // Perform the perspective divide (divide xyz by w) to convert to normalized device coords. // Normalized device coords have a range of (-1, 1) on each axis. outW = 1.0f / outW; outX *= outW; outY *= -outW; outZ *= outW; // Perform the viewport transform for x and y (convert normalized device coords to viewport coords). // Viewport coords have a range of (0, Width) for x and (0, Height) for y. outX = (outX * camera->viewportW + camera->viewportW) * 0.5; outX += camera->viewportStartX; outY = (outY * camera->viewportH + camera->viewportH) * 0.5; outY += camera->viewportStartY; // Convert depth from (-1, 1) to (0, 1). outZ = (outZ + 1.0f) * 0.5; // Write out the calculated x and y values. *screenX = outX; *screenY = outY; // If a depth query wasn't requested, simply check if the point is within the view frustum. if (depthQueryID < 0) { return outZ > 0.0f; } if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) { gDPPipeSync(gMainGfxPos++); // Load a 4x1 pixel tile of the depth buffer gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1, (s32) outX, 0, (s32) outX + 3, 0, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gDPPipeSync(gMainGfxPos++); // Set the current color image to the buffer where copied depth values are stored. gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer); gDPPipeSync(gMainGfxPos++); // Set up 1 cycle mode and all other relevant othermode params. // One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels. gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE); gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); // Adjust the scissor to only draw to the specified pixel. gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, depthQueryID, 0, depthQueryID + 1, 1); // Draw a texrect to copy one pixel of the loaded depth tile to the output buffer. gSPTextureRectangle(gMainGfxPos++, depthQueryID << 2, 0 << 2, (depthQueryID + 1) << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10); // Sync and swap the color image back to the current framebuffer. gDPPipeSync(gMainGfxPos++); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMainGfxPos++); // Reconfigure the frame's normal scissor. gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH); // The following code will use last frame's depth value, since the copy that was just written won't be executed until the current frame is drawn. // Extract the exponent and mantissa from the depth buffer value. depthExponent = depthCopyBuffer[depthQueryID] >> DEPTH_EXPONENT_SHIFT; depthMantissa = (depthCopyBuffer[depthQueryID] & (DEPTH_MANTISSA_MASK | DEPTH_DZ_MASK)) >> DEPTH_MANTISSA_SHIFT; // Convert the exponent and mantissa into a fixed-point value. shiftedMantissa = depthMantissa << depthFloatLookupTable[depthExponent].shift; mantissaBias = depthFloatLookupTable[depthExponent].bias; // Remove the 3 fractional bits of precision. decodedDepth = (shiftedMantissa + mantissaBias) >> 3; // Convert the calculated screen depth into viewport depth. scaledDepth = outZ * MAX_VIEWPORT_DEPTH; if (decodedDepth < scaledDepth) { return FALSE; } } return outZ > 0.0f; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_all_status_icons /* 21430 80046030 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 21434 80046034 AFB40020 */ sw $s4, 0x20($sp) /* 21438 80046038 3C14800A */ lui $s4, %hi(D_800A0F44) /* 2143C 8004603C 8E940F44 */ lw $s4, %lo(D_800A0F44)($s4) /* 21440 80046040 AFB50024 */ sw $s5, 0x24($sp) /* 21444 80046044 0000A82D */ daddu $s5, $zero, $zero /* 21448 80046048 AFB20018 */ sw $s2, 0x18($sp) /* 2144C 8004604C 24120001 */ addiu $s2, $zero, 0x1 /* 21450 80046050 AFB3001C */ sw $s3, 0x1C($sp) /* 21454 80046054 24130002 */ addiu $s3, $zero, 0x2 /* 21458 80046058 AFB60028 */ sw $s6, 0x28($sp) /* 2145C 8004605C 24160002 */ addiu $s6, $zero, 0x2 /* 21460 80046060 AFB7002C */ sw $s7, 0x2C($sp) /* 21464 80046064 24170014 */ addiu $s7, $zero, 0x14 /* 21468 80046068 AFBF0030 */ sw $ra, 0x30($sp) /* 2146C 8004606C AFB10014 */ sw $s1, 0x14($sp) /* 21470 80046070 AFB00010 */ sw $s0, 0x10($sp) /* 21474 80046074 26910085 */ addiu $s1, $s4, 0x85 .L80046078: /* 21478 80046078 8E820000 */ lw $v0, 0x0($s4) /* 2147C 8004607C 50400149 */ beql $v0, $zero, .L800465A4 /* 21480 80046080 26B50001 */ addiu $s5, $s5, 0x1 /* 21484 80046084 8222FFB5 */ lb $v0, -0x4B($s1) /* 21488 80046088 1452003A */ bne $v0, $s2, .L80046174 /* 2148C 8004608C 00000000 */ nop /* 21490 80046090 9222FFB3 */ lbu $v0, -0x4D($s1) /* 21494 80046094 2442FFFD */ addiu $v0, $v0, -0x3 /* 21498 80046098 00021600 */ sll $v0, $v0, 24 /* 2149C 8004609C 00021E03 */ sra $v1, $v0, 24 /* 214A0 800460A0 2C620008 */ sltiu $v0, $v1, 0x8 /* 214A4 800460A4 10400026 */ beqz $v0, .L80046140 /* 214A8 800460A8 00031080 */ sll $v0, $v1, 2 /* 214AC 800460AC 3C01800A */ lui $at, %hi(jtbl_800986C8) /* 214B0 800460B0 00220821 */ addu $at, $at, $v0 /* 214B4 800460B4 8C2286C8 */ lw $v0, %lo(jtbl_800986C8)($at) /* 214B8 800460B8 00400008 */ jr $v0 /* 214BC 800460BC 00000000 */ nop glabel .L800460C0 /* 214C0 800460C0 3C048010 */ lui $a0, %hi(HES_AsleepBegin) /* 214C4 800460C4 24844CC4 */ addiu $a0, $a0, %lo(HES_AsleepBegin) /* 214C8 800460C8 08011852 */ j .L80046148 /* 214CC 800460CC 00000000 */ nop glabel .L800460D0 /* 214D0 800460D0 3C048010 */ lui $a0, %hi(HES_ParalyzedBegin) /* 214D4 800460D4 2484551C */ addiu $a0, $a0, %lo(HES_ParalyzedBegin) /* 214D8 800460D8 08011852 */ j .L80046148 /* 214DC 800460DC 00000000 */ nop glabel .L800460E0 /* 214E0 800460E0 3C048010 */ lui $a0, %hi(HES_DizzyBegin) /* 214E4 800460E4 24845900 */ addiu $a0, $a0, %lo(HES_DizzyBegin) /* 214E8 800460E8 08011852 */ j .L80046148 /* 214EC 800460EC 00000000 */ nop glabel .L800460F0 /* 214F0 800460F0 3C048010 */ lui $a0, %hi(HES_WeakenedLoop) /* 214F4 800460F4 248462A0 */ addiu $a0, $a0, %lo(HES_WeakenedLoop) /* 214F8 800460F8 08011852 */ j .L80046148 /* 214FC 800460FC 00000000 */ nop glabel .L80046100 /* 21500 80046100 3C048010 */ lui $a0, %hi(HES_StoppedBegin) /* 21504 80046104 24846610 */ addiu $a0, $a0, %lo(HES_StoppedBegin) /* 21508 80046108 08011852 */ j .L80046148 /* 2150C 8004610C 00000000 */ nop glabel .L80046110 /* 21510 80046110 3C048010 */ lui $a0, %hi(HES_PoisonedBegin) /* 21514 80046114 24845C54 */ addiu $a0, $a0, %lo(HES_PoisonedBegin) /* 21518 80046118 08011852 */ j .L80046148 /* 2151C 8004611C 00000000 */ nop glabel .L80046120 /* 21520 80046120 3C048010 */ lui $a0, %hi(HES_ShrunkBegin) /* 21524 80046124 24846964 */ addiu $a0, $a0, %lo(HES_ShrunkBegin) /* 21528 80046128 08011852 */ j .L80046148 /* 2152C 8004612C 00000000 */ nop glabel .L80046130 /* 21530 80046130 3C048010 */ lui $a0, %hi(HES_FrozenBegin) /* 21534 80046134 24845FA8 */ addiu $a0, $a0, %lo(HES_FrozenBegin) /* 21538 80046138 08011852 */ j .L80046148 /* 2153C 8004613C 00000000 */ nop .L80046140: /* 21540 80046140 3C048008 */ lui $a0, %hi(HES_Item_Present) /* 21544 80046144 248404F0 */ addiu $a0, $a0, %lo(HES_Item_Present) .L80046148: /* 21548 80046148 0C050529 */ jal hud_element_create /* 2154C 8004614C 00000000 */ nop /* 21550 80046150 AE22FFBB */ sw $v0, -0x45($s1) /* 21554 80046154 0040802D */ daddu $s0, $v0, $zero /* 21558 80046158 0200202D */ daddu $a0, $s0, $zero /* 2155C 8004615C 0C051280 */ jal hud_element_set_flags /* 21560 80046160 24050002 */ addiu $a1, $zero, 0x2 /* 21564 80046164 0200202D */ daddu $a0, $s0, $zero /* 21568 80046168 0C051280 */ jal hud_element_set_flags /* 2156C 8004616C 24050080 */ addiu $a1, $zero, 0x80 /* 21570 80046170 A233FFB5 */ sb $s3, -0x4B($s1) .L80046174: /* 21574 80046174 8223FFB6 */ lb $v1, -0x4A($s1) /* 21578 80046178 10720007 */ beq $v1, $s2, .L80046198 /* 2157C 8004617C 28620002 */ slti $v0, $v1, 0x2 /* 21580 80046180 1440004C */ bnez $v0, .L800462B4 /* 21584 80046184 00000000 */ nop /* 21588 80046188 10760040 */ beq $v1, $s6, .L8004628C /* 2158C 8004618C 00000000 */ nop /* 21590 80046190 080118AD */ j .L800462B4 /* 21594 80046194 00000000 */ nop .L80046198: /* 21598 80046198 9222FFB4 */ lbu $v0, -0x4C($s1) /* 2159C 8004619C 2442FFFD */ addiu $v0, $v0, -0x3 /* 215A0 800461A0 00021600 */ sll $v0, $v0, 24 /* 215A4 800461A4 00021E03 */ sra $v1, $v0, 24 /* 215A8 800461A8 2C620008 */ sltiu $v0, $v1, 0x8 /* 215AC 800461AC 1040002E */ beqz $v0, .L80046268 /* 215B0 800461B0 00031080 */ sll $v0, $v1, 2 /* 215B4 800461B4 3C01800A */ lui $at, %hi(jtbl_800986E8) /* 215B8 800461B8 00220821 */ addu $at, $at, $v0 /* 215BC 800461BC 8C2286E8 */ lw $v0, %lo(jtbl_800986E8)($at) /* 215C0 800461C0 00400008 */ jr $v0 /* 215C4 800461C4 00000000 */ nop glabel .L800461C8 /* 215C8 800461C8 8E24FFBF */ lw $a0, -0x41($s1) /* 215CC 800461CC 3C058010 */ lui $a1, %hi(HES_AsleepEnd) /* 215D0 800461D0 24A54E64 */ addiu $a1, $a1, %lo(HES_AsleepEnd) /* 215D4 800461D4 0801189D */ j .L80046274 /* 215D8 800461D8 00000000 */ nop glabel .L800461DC /* 215DC 800461DC 8E24FFBF */ lw $a0, -0x41($s1) /* 215E0 800461E0 3C058010 */ lui $a1, %hi(HES_ParalyzedEnd) /* 215E4 800461E4 24A5574C */ addiu $a1, $a1, %lo(HES_ParalyzedEnd) /* 215E8 800461E8 0801189D */ j .L80046274 /* 215EC 800461EC 00000000 */ nop glabel .L800461F0 /* 215F0 800461F0 8E24FFBF */ lw $a0, -0x41($s1) /* 215F4 800461F4 3C058010 */ lui $a1, %hi(HES_DizzyEnd) /* 215F8 800461F8 24A55AA0 */ addiu $a1, $a1, %lo(HES_DizzyEnd) /* 215FC 800461FC 0801189D */ j .L80046274 /* 21600 80046200 00000000 */ nop glabel .L80046204 /* 21604 80046204 8E24FFBF */ lw $a0, -0x41($s1) /* 21608 80046208 3C058010 */ lui $a1, %hi(HES_WeakenedLoop) /* 2160C 8004620C 24A562A0 */ addiu $a1, $a1, %lo(HES_WeakenedLoop) /* 21610 80046210 0801189D */ j .L80046274 /* 21614 80046214 00000000 */ nop glabel .L80046218 /* 21618 80046218 8E24FFBF */ lw $a0, -0x41($s1) /* 2161C 8004621C 3C058010 */ lui $a1, %hi(HES_StoppedEnd) /* 21620 80046220 24A567B0 */ addiu $a1, $a1, %lo(HES_StoppedEnd) /* 21624 80046224 0801189D */ j .L80046274 /* 21628 80046228 00000000 */ nop glabel .L8004622C /* 2162C 8004622C 8E24FFBF */ lw $a0, -0x41($s1) /* 21630 80046230 3C058010 */ lui $a1, %hi(HES_PoisonedEnd) /* 21634 80046234 24A55DF4 */ addiu $a1, $a1, %lo(HES_PoisonedEnd) /* 21638 80046238 0801189D */ j .L80046274 /* 2163C 8004623C 00000000 */ nop glabel .L80046240 /* 21640 80046240 8E24FFBF */ lw $a0, -0x41($s1) /* 21644 80046244 3C058010 */ lui $a1, %hi(HES_ShrunkEnd) /* 21648 80046248 24A56B04 */ addiu $a1, $a1, %lo(HES_ShrunkEnd) /* 2164C 8004624C 0801189D */ j .L80046274 /* 21650 80046250 00000000 */ nop glabel .L80046254 /* 21654 80046254 8E24FFBF */ lw $a0, -0x41($s1) /* 21658 80046258 3C058010 */ lui $a1, %hi(HES_FrozenEnd) /* 2165C 8004625C 24A56148 */ addiu $a1, $a1, %lo(HES_FrozenEnd) /* 21660 80046260 0801189D */ j .L80046274 /* 21664 80046264 00000000 */ nop .L80046268: /* 21668 80046268 8E24FFBF */ lw $a0, -0x41($s1) /* 2166C 8004626C 3C058008 */ lui $a1, %hi(HES_Item_Present) /* 21670 80046270 24A504F0 */ addiu $a1, $a1, %lo(HES_Item_Present) .L80046274: /* 21674 80046274 0C0511FF */ jal hud_element_set_script /* 21678 80046278 00000000 */ nop /* 2167C 8004627C 2402000A */ addiu $v0, $zero, 0xA /* 21680 80046280 A222FFB8 */ sb $v0, -0x48($s1) /* 21684 80046284 080118AD */ j .L800462B4 /* 21688 80046288 A233FFB6 */ sb $s3, -0x4A($s1) .L8004628C: /* 2168C 8004628C 8222FFB8 */ lb $v0, -0x48($s1) /* 21690 80046290 9223FFB8 */ lbu $v1, -0x48($s1) /* 21694 80046294 10400003 */ beqz $v0, .L800462A4 /* 21698 80046298 2462FFFF */ addiu $v0, $v1, -0x1 /* 2169C 8004629C 080118AD */ j .L800462B4 /* 216A0 800462A0 A222FFB8 */ sb $v0, -0x48($s1) .L800462A4: /* 216A4 800462A4 8E24FFBF */ lw $a0, -0x41($s1) /* 216A8 800462A8 0C05123D */ jal hud_element_free /* 216AC 800462AC A220FFB4 */ sb $zero, -0x4C($s1) /* 216B0 800462B0 A220FFB6 */ sb $zero, -0x4A($s1) .L800462B4: /* 216B4 800462B4 8222FFC5 */ lb $v0, -0x3B($s1) /* 216B8 800462B8 14520013 */ bne $v0, $s2, .L80046308 /* 216BC 800462BC 2402000B */ addiu $v0, $zero, 0xB /* 216C0 800462C0 8223FFC3 */ lb $v1, -0x3D($s1) /* 216C4 800462C4 3C048008 */ lui $a0, %hi(HES_Item_Present) /* 216C8 800462C8 248404F0 */ addiu $a0, $a0, %lo(HES_Item_Present) /* 216CC 800462CC 14620003 */ bne $v1, $v0, .L800462DC /* 216D0 800462D0 00000000 */ nop /* 216D4 800462D4 3C048010 */ lui $a0, %hi(HES_ElectrifiedBegin) /* 216D8 800462D8 248450A8 */ addiu $a0, $a0, %lo(HES_ElectrifiedBegin) .L800462DC: /* 216DC 800462DC 0C050529 */ jal hud_element_create /* 216E0 800462E0 00000000 */ nop /* 216E4 800462E4 AE22FFCB */ sw $v0, -0x35($s1) /* 216E8 800462E8 0040802D */ daddu $s0, $v0, $zero /* 216EC 800462EC 0200202D */ daddu $a0, $s0, $zero /* 216F0 800462F0 0C051280 */ jal hud_element_set_flags /* 216F4 800462F4 24050002 */ addiu $a1, $zero, 0x2 /* 216F8 800462F8 0200202D */ daddu $a0, $s0, $zero /* 216FC 800462FC 0C051280 */ jal hud_element_set_flags /* 21700 80046300 24050080 */ addiu $a1, $zero, 0x80 /* 21704 80046304 A233FFC5 */ sb $s3, -0x3B($s1) .L80046308: /* 21708 80046308 8223FFC6 */ lb $v1, -0x3A($s1) /* 2170C 8004630C 10720007 */ beq $v1, $s2, .L8004632C /* 21710 80046310 28620002 */ slti $v0, $v1, 0x2 /* 21714 80046314 14400020 */ bnez $v0, .L80046398 /* 21718 80046318 00000000 */ nop /* 2171C 8004631C 10760014 */ beq $v1, $s6, .L80046370 /* 21720 80046320 00000000 */ nop /* 21724 80046324 080118E6 */ j .L80046398 /* 21728 80046328 00000000 */ nop .L8004632C: /* 2172C 8004632C 8223FFC4 */ lb $v1, -0x3C($s1) /* 21730 80046330 2402000B */ addiu $v0, $zero, 0xB /* 21734 80046334 14620006 */ bne $v1, $v0, .L80046350 /* 21738 80046338 00000000 */ nop /* 2173C 8004633C 8E24FFCF */ lw $a0, -0x31($s1) /* 21740 80046340 3C058010 */ lui $a1, %hi(HES_ElectrifiedEnd) /* 21744 80046344 24A552D8 */ addiu $a1, $a1, %lo(HES_ElectrifiedEnd) /* 21748 80046348 080118D7 */ j .L8004635C /* 2174C 8004634C 00000000 */ nop .L80046350: /* 21750 80046350 8E24FFCF */ lw $a0, -0x31($s1) /* 21754 80046354 3C058008 */ lui $a1, %hi(HES_Item_Present) /* 21758 80046358 24A504F0 */ addiu $a1, $a1, %lo(HES_Item_Present) .L8004635C: /* 2175C 8004635C 0C0511FF */ jal hud_element_set_script /* 21760 80046360 00000000 */ nop /* 21764 80046364 A237FFC8 */ sb $s7, -0x38($s1) /* 21768 80046368 080118E6 */ j .L80046398 /* 2176C 8004636C A233FFC6 */ sb $s3, -0x3A($s1) .L80046370: /* 21770 80046370 8222FFC8 */ lb $v0, -0x38($s1) /* 21774 80046374 9223FFC8 */ lbu $v1, -0x38($s1) /* 21778 80046378 10400003 */ beqz $v0, .L80046388 /* 2177C 8004637C 2462FFFF */ addiu $v0, $v1, -0x1 /* 21780 80046380 080118E6 */ j .L80046398 /* 21784 80046384 A222FFC8 */ sb $v0, -0x38($s1) .L80046388: /* 21788 80046388 8E24FFCF */ lw $a0, -0x31($s1) /* 2178C 8004638C 0C05123D */ jal hud_element_free /* 21790 80046390 A220FFC4 */ sb $zero, -0x3C($s1) /* 21794 80046394 A220FFC6 */ sb $zero, -0x3A($s1) .L80046398: /* 21798 80046398 8222FFD5 */ lb $v0, -0x2B($s1) /* 2179C 8004639C 14520013 */ bne $v0, $s2, .L800463EC /* 217A0 800463A0 2402000E */ addiu $v0, $zero, 0xE /* 217A4 800463A4 8223FFD3 */ lb $v1, -0x2D($s1) /* 217A8 800463A8 3C048008 */ lui $a0, %hi(HES_Item_Present) /* 217AC 800463AC 248404F0 */ addiu $a0, $a0, %lo(HES_Item_Present) /* 217B0 800463B0 14620003 */ bne $v1, $v0, .L800463C0 /* 217B4 800463B4 00000000 */ nop /* 217B8 800463B8 3C048010 */ lui $a0, %hi(HES_TransparentBegin) /* 217BC 800463BC 24846CD8 */ addiu $a0, $a0, %lo(HES_TransparentBegin) .L800463C0: /* 217C0 800463C0 0C050529 */ jal hud_element_create /* 217C4 800463C4 00000000 */ nop /* 217C8 800463C8 AE22FFDB */ sw $v0, -0x25($s1) /* 217CC 800463CC 0040802D */ daddu $s0, $v0, $zero /* 217D0 800463D0 0200202D */ daddu $a0, $s0, $zero /* 217D4 800463D4 0C051280 */ jal hud_element_set_flags /* 217D8 800463D8 24050002 */ addiu $a1, $zero, 0x2 /* 217DC 800463DC 0200202D */ daddu $a0, $s0, $zero /* 217E0 800463E0 0C051280 */ jal hud_element_set_flags /* 217E4 800463E4 24050080 */ addiu $a1, $zero, 0x80 /* 217E8 800463E8 A233FFD5 */ sb $s3, -0x2B($s1) .L800463EC: /* 217EC 800463EC 8223FFD6 */ lb $v1, -0x2A($s1) /* 217F0 800463F0 10720007 */ beq $v1, $s2, .L80046410 /* 217F4 800463F4 28620002 */ slti $v0, $v1, 0x2 /* 217F8 800463F8 14400020 */ bnez $v0, .L8004647C /* 217FC 800463FC 00000000 */ nop /* 21800 80046400 10760014 */ beq $v1, $s6, .L80046454 /* 21804 80046404 00000000 */ nop /* 21808 80046408 0801191F */ j .L8004647C /* 2180C 8004640C 00000000 */ nop .L80046410: /* 21810 80046410 8223FFD4 */ lb $v1, -0x2C($s1) /* 21814 80046414 2402000E */ addiu $v0, $zero, 0xE /* 21818 80046418 14620006 */ bne $v1, $v0, .L80046434 /* 2181C 8004641C 00000000 */ nop /* 21820 80046420 8E24FFDF */ lw $a0, -0x21($s1) /* 21824 80046424 3C058010 */ lui $a1, %hi(HES_TransparentEnd) /* 21828 80046428 24A56E98 */ addiu $a1, $a1, %lo(HES_TransparentEnd) /* 2182C 8004642C 08011910 */ j .L80046440 /* 21830 80046430 00000000 */ nop .L80046434: /* 21834 80046434 8E24FFDF */ lw $a0, -0x21($s1) /* 21838 80046438 3C058008 */ lui $a1, %hi(HES_Item_Present) /* 2183C 8004643C 24A504F0 */ addiu $a1, $a1, %lo(HES_Item_Present) .L80046440: /* 21840 80046440 0C0511FF */ jal hud_element_set_script /* 21844 80046444 00000000 */ nop /* 21848 80046448 A237FFD8 */ sb $s7, -0x28($s1) /* 2184C 8004644C 0801191F */ j .L8004647C /* 21850 80046450 A233FFD6 */ sb $s3, -0x2A($s1) .L80046454: /* 21854 80046454 8222FFD8 */ lb $v0, -0x28($s1) /* 21858 80046458 9223FFD8 */ lbu $v1, -0x28($s1) /* 2185C 8004645C 10400003 */ beqz $v0, .L8004646C /* 21860 80046460 2462FFFF */ addiu $v0, $v1, -0x1 /* 21864 80046464 0801191F */ j .L8004647C /* 21868 80046468 A222FFD8 */ sb $v0, -0x28($s1) .L8004646C: /* 2186C 8004646C 8E24FFDF */ lw $a0, -0x21($s1) /* 21870 80046470 0C05123D */ jal hud_element_free /* 21874 80046474 A220FFD4 */ sb $zero, -0x2C($s1) /* 21878 80046478 A220FFD6 */ sb $zero, -0x2A($s1) .L8004647C: /* 2187C 8004647C 8222FFE5 */ lb $v0, -0x1B($s1) /* 21880 80046480 1452000E */ bne $v0, $s2, .L800464BC /* 21884 80046484 00000000 */ nop /* 21888 80046488 3C048010 */ lui $a0, %hi(HES_WeakenedBegin) /* 2188C 8004648C 248462DC */ addiu $a0, $a0, %lo(HES_WeakenedBegin) /* 21890 80046490 0C050529 */ jal hud_element_create /* 21894 80046494 00000000 */ nop /* 21898 80046498 0040802D */ daddu $s0, $v0, $zero /* 2189C 8004649C 0040202D */ daddu $a0, $v0, $zero /* 218A0 800464A0 24050002 */ addiu $a1, $zero, 0x2 /* 218A4 800464A4 0C051280 */ jal hud_element_set_flags /* 218A8 800464A8 AE30FFEB */ sw $s0, -0x15($s1) /* 218AC 800464AC 0200202D */ daddu $a0, $s0, $zero /* 218B0 800464B0 0C051280 */ jal hud_element_set_flags /* 218B4 800464B4 24050080 */ addiu $a1, $zero, 0x80 /* 218B8 800464B8 A233FFE5 */ sb $s3, -0x1B($s1) .L800464BC: /* 218BC 800464BC 8223FFE6 */ lb $v1, -0x1A($s1) /* 218C0 800464C0 10720007 */ beq $v1, $s2, .L800464E0 /* 218C4 800464C4 28620002 */ slti $v0, $v1, 0x2 /* 218C8 800464C8 14400017 */ bnez $v0, .L80046528 /* 218CC 800464CC 00000000 */ nop /* 218D0 800464D0 1076000B */ beq $v1, $s6, .L80046500 /* 218D4 800464D4 00000000 */ nop /* 218D8 800464D8 0801194A */ j .L80046528 /* 218DC 800464DC 00000000 */ nop .L800464E0: /* 218E0 800464E0 8E24FFEF */ lw $a0, -0x11($s1) /* 218E4 800464E4 3C058010 */ lui $a1, %hi(HES_WeakenedEnd) /* 218E8 800464E8 24A5645C */ addiu $a1, $a1, %lo(HES_WeakenedEnd) /* 218EC 800464EC 0C0511FF */ jal hud_element_set_script /* 218F0 800464F0 00000000 */ nop /* 218F4 800464F4 A237FFE8 */ sb $s7, -0x18($s1) /* 218F8 800464F8 0801194A */ j .L80046528 /* 218FC 800464FC A233FFE6 */ sb $s3, -0x1A($s1) .L80046500: /* 21900 80046500 8222FFE8 */ lb $v0, -0x18($s1) /* 21904 80046504 9223FFE8 */ lbu $v1, -0x18($s1) /* 21908 80046508 10400003 */ beqz $v0, .L80046518 /* 2190C 8004650C 2462FFFF */ addiu $v0, $v1, -0x1 /* 21910 80046510 0801194A */ j .L80046528 /* 21914 80046514 A222FFE8 */ sb $v0, -0x18($s1) .L80046518: /* 21918 80046518 8E24FFEF */ lw $a0, -0x11($s1) /* 2191C 8004651C 0C05123D */ jal hud_element_free /* 21920 80046520 A220FFE4 */ sb $zero, -0x1C($s1) /* 21924 80046524 A220FFE6 */ sb $zero, -0x1A($s1) .L80046528: /* 21928 80046528 8222FFF4 */ lb $v0, -0xC($s1) /* 2192C 8004652C 1040000D */ beqz $v0, .L80046564 /* 21930 80046530 00000000 */ nop /* 21934 80046534 1452000B */ bne $v0, $s2, .L80046564 /* 21938 80046538 00000000 */ nop /* 2193C 8004653C 8E30FFFB */ lw $s0, -0x5($s1) /* 21940 80046540 0C051235 */ jal get_hud_element /* 21944 80046544 0200202D */ daddu $a0, $s0, $zero /* 21948 80046548 8C420000 */ lw $v0, 0x0($v0) /* 2194C 8004654C 30420004 */ andi $v0, $v0, 0x4 /* 21950 80046550 10400004 */ beqz $v0, .L80046564 /* 21954 80046554 00000000 */ nop /* 21958 80046558 0C05123D */ jal hud_element_free /* 2195C 8004655C 0200202D */ daddu $a0, $s0, $zero /* 21960 80046560 A220FFF4 */ sb $zero, -0xC($s1) .L80046564: /* 21964 80046564 82220000 */ lb $v0, 0x0($s1) /* 21968 80046568 5040000E */ beql $v0, $zero, .L800465A4 /* 2196C 8004656C 26B50001 */ addiu $s5, $s5, 0x1 /* 21970 80046570 5452000C */ bnel $v0, $s2, .L800465A4 /* 21974 80046574 26B50001 */ addiu $s5, $s5, 0x1 /* 21978 80046578 8E300007 */ lw $s0, 0x7($s1) /* 2197C 8004657C 0C051235 */ jal get_hud_element /* 21980 80046580 0200202D */ daddu $a0, $s0, $zero /* 21984 80046584 8C420000 */ lw $v0, 0x0($v0) /* 21988 80046588 30420004 */ andi $v0, $v0, 0x4 /* 2198C 8004658C 50400005 */ beql $v0, $zero, .L800465A4 /* 21990 80046590 26B50001 */ addiu $s5, $s5, 0x1 /* 21994 80046594 0C05123D */ jal hud_element_free /* 21998 80046598 0200202D */ daddu $a0, $s0, $zero /* 2199C 8004659C A2200000 */ sb $zero, 0x0($s1) /* 219A0 800465A0 26B50001 */ addiu $s5, $s5, 0x1 .L800465A4: /* 219A4 800465A4 263100B0 */ addiu $s1, $s1, 0xB0 /* 219A8 800465A8 2AA20040 */ slti $v0, $s5, 0x40 /* 219AC 800465AC 1440FEB2 */ bnez $v0, .L80046078 /* 219B0 800465B0 269400B0 */ addiu $s4, $s4, 0xB0 /* 219B4 800465B4 8FBF0030 */ lw $ra, 0x30($sp) /* 219B8 800465B8 8FB7002C */ lw $s7, 0x2C($sp) /* 219BC 800465BC 8FB60028 */ lw $s6, 0x28($sp) /* 219C0 800465C0 8FB50024 */ lw $s5, 0x24($sp) /* 219C4 800465C4 8FB40020 */ lw $s4, 0x20($sp) /* 219C8 800465C8 8FB3001C */ lw $s3, 0x1C($sp) /* 219CC 800465CC 8FB20018 */ lw $s2, 0x18($sp) /* 219D0 800465D0 8FB10014 */ lw $s1, 0x14($sp) /* 219D4 800465D4 8FB00010 */ lw $s0, 0x10($sp) /* 219D8 800465D8 03E00008 */ jr $ra /* 219DC 800465DC 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void update_all_status_icons(void* data) { PopupMessage* popup = data; HudStatusIcon* icon; int i; s32 elementID; for (i = 0, icon = D_800A0F44; i < MAX_ICONS; i++, icon++) { if (icon->flags == 0) { continue; } if (icon->status1.activeTask == STATUS_ICON_TASK_LOAD) { switch (icon->status1.active) { case STATUS_KEY_SLEEP: elementID = icon->status1.activeElementID = hud_element_create(&HES_AsleepBegin); break; case STATUS_KEY_PARALYZE: elementID = icon->status1.activeElementID = hud_element_create(&HES_ParalyzedBegin); break; case STATUS_KEY_DIZZY: elementID = icon->status1.activeElementID = hud_element_create(&HES_DizzyBegin); break; case STATUS_KEY_FEAR: elementID = icon->status1.activeElementID = hud_element_create(&HES_WeakenedLoop); break; case STATUS_KEY_STOP: elementID = icon->status1.activeElementID = hud_element_create(&HES_StoppedBegin); break; case STATUS_KEY_POISON: elementID = icon->status1.activeElementID = hud_element_create(&HES_PoisonedBegin); break; case STATUS_KEY_SHRINK: elementID = icon->status1.activeElementID = hud_element_create(&HES_ShrunkBegin); break; case STATUS_KEY_FROZEN: elementID = icon->status1.activeElementID = hud_element_create(&HES_FrozenBegin); break; default: elementID = icon->status1.activeElementID = hud_element_create(&HES_Item_Present); break; } hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DISABLED); hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); icon->status1.activeTask = STATUS_ICON_TASK_DRAW; } switch (icon->status1.removingTask) { case STATUS_ICON_TASK_NONE: break; case STATUS_ICON_TASK_LOAD: switch (icon->status1.removing) { case STATUS_KEY_SLEEP: hud_element_set_script(icon->status1.removingElementID, &HES_AsleepEnd); break; case STATUS_KEY_PARALYZE: hud_element_set_script(icon->status1.removingElementID, &HES_ParalyzedEnd); break; case STATUS_KEY_DIZZY: hud_element_set_script(icon->status1.removingElementID, &HES_DizzyEnd); break; case STATUS_KEY_FEAR: hud_element_set_script(icon->status1.removingElementID, &HES_WeakenedLoop); break; case STATUS_KEY_STOP: hud_element_set_script(icon->status1.removingElementID, &HES_StoppedEnd); break; case STATUS_KEY_POISON: hud_element_set_script(icon->status1.removingElementID, &HES_PoisonedEnd); break; case STATUS_KEY_SHRINK: hud_element_set_script(icon->status1.removingElementID, &HES_ShrunkEnd); break; case STATUS_KEY_FROZEN: hud_element_set_script(icon->status1.removingElementID, &HES_FrozenEnd); break; default: hud_element_set_script(icon->status1.removingElementID, &HES_Item_Present); break; } icon->status1.frameCounter = 10; icon->status1.removingTask = STATUS_ICON_TASK_DRAW; break; case STATUS_ICON_TASK_DRAW: if (icon->status1.frameCounter != 0) { icon->status1.frameCounter--; } else { icon->status1.removing = 0; hud_element_free(icon->status1.removingElementID); icon->status1.removingTask = STATUS_ICON_TASK_NONE; } break; } if (icon->status2.activeTask == STATUS_ICON_TASK_LOAD) { switch (icon->status2.active) { case STATUS_KEY_STATIC: elementID = icon->status2.activeElementID = hud_element_create(&HES_ElectrifiedBegin); break; default: elementID = icon->status2.activeElementID = hud_element_create(&HES_Item_Present); break; } hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DISABLED); hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); icon->status2.activeTask = STATUS_ICON_TASK_DRAW; } switch (icon->status2.removingTask) { case STATUS_ICON_TASK_NONE: break; case STATUS_ICON_TASK_LOAD: switch (icon->status2.removing) { case STATUS_KEY_STATIC: hud_element_set_script(icon->status2.removingElementID, &HES_ElectrifiedEnd); break; default: hud_element_set_script(icon->status2.removingElementID, &HES_Item_Present); break; } icon->status2.frameCounter = 20; icon->status2.removingTask = STATUS_ICON_TASK_DRAW; break; case STATUS_ICON_TASK_DRAW: if (icon->status2.frameCounter != 0) { icon->status2.frameCounter--; } else { icon->status2.removing = 0; hud_element_free(icon->status2.removingElementID); icon->status2.removingTask = STATUS_ICON_TASK_NONE; } break; } if (icon->status3.activeTask == STATUS_ICON_TASK_LOAD) { switch (icon->status3.active) { case STATUS_KEY_TRANSPARENT: elementID = icon->status3.activeElementID = hud_element_create(&HES_TransparentBegin); break; default: elementID = icon->status3.activeElementID = hud_element_create(&HES_Item_Present); break; } hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DISABLED); hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); icon->status3.activeTask = STATUS_ICON_TASK_DRAW; } switch (icon->status3.removingTask) { case STATUS_ICON_TASK_NONE: break; case STATUS_ICON_TASK_LOAD: switch (icon->status3.removing) { case STATUS_KEY_TRANSPARENT: hud_element_set_script(icon->status3.removingElementID, &HES_TransparentEnd); break; default: hud_element_set_script(icon->status3.removingElementID, &HES_Item_Present); break; } icon->status3.frameCounter = 20; icon->status3.removingTask = STATUS_ICON_TASK_DRAW; break; case STATUS_ICON_TASK_DRAW: if (icon->status3.frameCounter != 0) { icon->status3.frameCounter--; } else { icon->status3.removing = 0; hud_element_free(icon->status3.removingElementID); icon->status3.removingTask = STATUS_ICON_TASK_NONE; } break; } if (icon->status4.activeTask == STATUS_ICON_TASK_LOAD) { elementID = icon->status4.activeElementID = hud_element_create(&HES_WeakenedBegin); hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DISABLED); hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); icon->status4.activeTask = STATUS_ICON_TASK_DRAW; } switch (icon->status4.removingTask) { case STATUS_ICON_TASK_NONE: break; case STATUS_ICON_TASK_LOAD: hud_element_set_script(icon->status4.removingElementID, &HES_WeakenedEnd); icon->status4.frameCounter = 20; icon->status4.removingTask = STATUS_ICON_TASK_DRAW; break; case STATUS_ICON_TASK_DRAW: if (icon->status4.frameCounter != 0) { icon->status4.frameCounter--; } else { icon->status4.removing = 0; hud_element_free(icon->status4.removingElementID); icon->status4.removingTask = STATUS_ICON_TASK_NONE; } break; } if (icon->boostJump.removing) { if (icon->boostJump.removing == 1) { s32 index = icon->prevIndexBoostJump; if (get_hud_element(index)->flags & HUD_ELEMENT_FLAG_ANIMATION_FINISHED) { hud_element_free(index); icon->boostJump.removing = 0; } } } if (icon->boostHammer.removing) { if (icon->boostHammer.removing == 1) { s32 index = icon->prevIndexBoostHammer; if (get_hud_element(index)->flags & HUD_ELEMENT_FLAG_ANIMATION_FINISHED) { hud_element_free(index); icon->boostHammer.removing = 0; } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80032C64 /* E064 80032C64 27BDFF68 */ addiu $sp, $sp, -0x98 /* E068 80032C68 AFB10054 */ sw $s1, 0x54($sp) /* E06C 80032C6C 0080882D */ daddu $s1, $a0, $zero /* E070 80032C70 AFBF0068 */ sw $ra, 0x68($sp) /* E074 80032C74 AFB50064 */ sw $s5, 0x64($sp) /* E078 80032C78 AFB40060 */ sw $s4, 0x60($sp) /* E07C 80032C7C AFB3005C */ sw $s3, 0x5C($sp) /* E080 80032C80 AFB20058 */ sw $s2, 0x58($sp) /* E084 80032C84 AFB00050 */ sw $s0, 0x50($sp) /* E088 80032C88 F7BC0090 */ sdc1 $f28, 0x90($sp) /* E08C 80032C8C F7BA0088 */ sdc1 $f26, 0x88($sp) /* E090 80032C90 F7B80080 */ sdc1 $f24, 0x80($sp) /* E094 80032C94 F7B60078 */ sdc1 $f22, 0x78($sp) /* E098 80032C98 F7B40070 */ sdc1 $f20, 0x70($sp) /* E09C 80032C9C C6200084 */ lwc1 $f0, 0x84($s1) /* E0A0 80032CA0 3C014334 */ lui $at, (0x43340000 >> 16) /* E0A4 80032CA4 44811000 */ mtc1 $at, $f2 /* E0A8 80032CA8 3C014049 */ lui $at, (0x40490FD8 >> 16) /* E0AC 80032CAC 34210FD8 */ ori $at, $at, (0x40490FD8 & 0xFFFF) /* E0B0 80032CB0 44812000 */ mtc1 $at, $f4 /* E0B4 80032CB4 46020003 */ div.s $f0, $f0, $f2 /* E0B8 80032CB8 46040502 */ mul.s $f20, $f0, $f4 /* E0BC 80032CBC 00000000 */ nop /* E0C0 80032CC0 0000902D */ daddu $s2, $zero, $zero /* E0C4 80032CC4 C63A050C */ lwc1 $f26, 0x50C($s1) /* E0C8 80032CC8 0C00A874 */ jal cos_rad /* E0CC 80032CCC 4600A306 */ mov.s $f12, $f20 /* E0D0 80032CD0 0C00A85B */ jal sin_rad /* E0D4 80032CD4 4600A306 */ mov.s $f12, $f20 /* E0D8 80032CD8 C6200064 */ lwc1 $f0, 0x64($s1) /* E0DC 80032CDC 3C014120 */ lui $at, (0x41200000 >> 16) /* E0E0 80032CE0 44817000 */ mtc1 $at, $f14 /* E0E4 80032CE4 C62C0060 */ lwc1 $f12, 0x60($s1) /* E0E8 80032CE8 460E0380 */ add.s $f14, $f0, $f14 /* E0EC 80032CEC 8E260068 */ lw $a2, 0x68($s1) /* E0F0 80032CF0 0C00C884 */ jal test_ray_zone /* E0F4 80032CF4 0240382D */ daddu $a3, $s2, $zero /* E0F8 80032CF8 0040802D */ daddu $s0, $v0, $zero /* E0FC 80032CFC 120000A1 */ beqz $s0, .L80032F84 /* E100 80032D00 0200982D */ daddu $s3, $s0, $zero /* E104 80032D04 8E030000 */ lw $v1, 0x0($s0) /* E108 80032D08 24020002 */ addiu $v0, $zero, 0x2 /* E10C 80032D0C 1062000A */ beq $v1, $v0, .L80032D38 /* E110 80032D10 24020005 */ addiu $v0, $zero, 0x5 /* E114 80032D14 10620008 */ beq $v1, $v0, .L80032D38 /* E118 80032D18 00000000 */ nop /* E11C 80032D1C 8E250060 */ lw $a1, 0x60($s1) /* E120 80032D20 8E260068 */ lw $a2, 0x68($s1) /* E124 80032D24 0C00CA29 */ jal func_800328A4 /* E128 80032D28 0200202D */ daddu $a0, $s0, $zero /* E12C 80032D2C 0040902D */ daddu $s2, $v0, $zero /* E130 80032D30 12400094 */ beqz $s2, .L80032F84 /* E134 80032D34 00000000 */ nop .L80032D38: /* E138 80032D38 8E220530 */ lw $v0, 0x530($s1) /* E13C 80032D3C 10400049 */ beqz $v0, .L80032E64 /* E140 80032D40 00000000 */ nop /* E144 80032D44 263000D4 */ addiu $s0, $s1, 0xD4 /* E148 80032D48 0200202D */ daddu $a0, $s0, $zero /* E14C 80032D4C 8627000A */ lh $a3, 0xA($s1) /* E150 80032D50 86220012 */ lh $v0, 0x12($s1) /* E154 80032D54 8623000C */ lh $v1, 0xC($s1) /* E158 80032D58 3C013F80 */ lui $at, (0x3F800000 >> 16) /* E15C 80032D5C 4481A000 */ mtc1 $at, $f20 /* E160 80032D60 44820000 */ mtc1 $v0, $f0 /* E164 80032D64 00000000 */ nop /* E168 80032D68 46800020 */ cvt.s.w $f0, $f0 /* E16C 80032D6C E7A00010 */ swc1 $f0, 0x10($sp) /* E170 80032D70 86220014 */ lh $v0, 0x14($s1) /* E174 80032D74 44871000 */ mtc1 $a3, $f2 /* E178 80032D78 00000000 */ nop /* E17C 80032D7C 468010A0 */ cvt.s.w $f2, $f2 /* E180 80032D80 E7B40018 */ swc1 $f20, 0x18($sp) /* E184 80032D84 44820000 */ mtc1 $v0, $f0 /* E188 80032D88 00000000 */ nop /* E18C 80032D8C 46800020 */ cvt.s.w $f0, $f0 /* E190 80032D90 E7A00014 */ swc1 $f0, 0x14($sp) /* E194 80032D94 44830000 */ mtc1 $v1, $f0 /* E198 80032D98 00000000 */ nop /* E19C 80032D9C 46800020 */ cvt.s.w $f0, $f0 /* E1A0 80032DA0 46001083 */ div.s $f2, $f2, $f0 /* E1A4 80032DA4 8E260018 */ lw $a2, 0x18($s1) /* E1A8 80032DA8 44071000 */ mfc1 $a3, $f2 /* E1AC 80032DAC 0C018EE4 */ jal guPerspectiveF /* E1B0 80032DB0 26250038 */ addiu $a1, $s1, 0x38 /* E1B4 80032DB4 26240114 */ addiu $a0, $s1, 0x114 /* E1B8 80032DB8 0200282D */ daddu $a1, $s0, $zero /* E1BC 80032DBC 0C019D80 */ jal guMtxCatF /* E1C0 80032DC0 0200302D */ daddu $a2, $s0, $zero /* E1C4 80032DC4 27A20030 */ addiu $v0, $sp, 0x30 /* E1C8 80032DC8 AFA20014 */ sw $v0, 0x14($sp) /* E1CC 80032DCC 27A20034 */ addiu $v0, $sp, 0x34 /* E1D0 80032DD0 AFA20018 */ sw $v0, 0x18($sp) /* E1D4 80032DD4 27A20038 */ addiu $v0, $sp, 0x38 /* E1D8 80032DD8 AFA2001C */ sw $v0, 0x1C($sp) /* E1DC 80032DDC 27A2003C */ addiu $v0, $sp, 0x3C /* E1E0 80032DE0 E7B40010 */ swc1 $f20, 0x10($sp) /* E1E4 80032DE4 AFA20020 */ sw $v0, 0x20($sp) /* E1E8 80032DE8 8E250060 */ lw $a1, 0x60($s1) /* E1EC 80032DEC 8E260064 */ lw $a2, 0x64($s1) /* E1F0 80032DF0 8E270068 */ lw $a3, 0x68($s1) /* E1F4 80032DF4 0C00A588 */ jal transform_point /* E1F8 80032DF8 0200202D */ daddu $a0, $s0, $zero /* E1FC 80032DFC C7A0003C */ lwc1 $f0, 0x3C($sp) /* E200 80032E00 44802000 */ mtc1 $zero, $f4 /* E204 80032E04 00000000 */ nop /* E208 80032E08 46040032 */ c.eq.s $f0, $f4 /* E20C 80032E0C 00000000 */ nop /* E210 80032E10 45030001 */ bc1tl .L80032E18 /* E214 80032E14 E7B4003C */ swc1 $f20, 0x3C($sp) .L80032E18: /* E218 80032E18 C7A0003C */ lwc1 $f0, 0x3C($sp) /* E21C 80032E1C C7A20030 */ lwc1 $f2, 0x30($sp) /* E220 80032E20 4600A003 */ div.s $f0, $f20, $f0 /* E224 80032E24 46001082 */ mul.s $f2, $f2, $f0 /* E228 80032E28 00000000 */ nop /* E22C 80032E2C 2623052C */ addiu $v1, $s1, 0x52C /* E230 80032E30 E7A0003C */ swc1 $f0, 0x3C($sp) /* E234 80032E34 4602203C */ c.lt.s $f4, $f2 /* E238 80032E38 E7A20030 */ swc1 $f2, 0x30($sp) /* E23C 80032E3C 45010006 */ bc1t .L80032E58 /* E240 80032E40 24020001 */ addiu $v0, $zero, 0x1 /* E244 80032E44 4604103C */ c.lt.s $f2, $f4 /* E248 80032E48 00000000 */ nop /* E24C 80032E4C 45000002 */ bc1f .L80032E58 /* E250 80032E50 0000102D */ daddu $v0, $zero, $zero /* E254 80032E54 2402FFFF */ addiu $v0, $zero, -0x1 .L80032E58: /* E258 80032E58 AC620000 */ sw $v0, 0x0($v1) /* E25C 80032E5C 0800CBC9 */ j .L80032F24 /* E260 80032E60 AE200530 */ sw $zero, 0x530($s1) .L80032E64: /* E264 80032E64 8E220534 */ lw $v0, 0x534($s1) /* E268 80032E68 10400011 */ beqz $v0, .L80032EB0 /* E26C 80032E6C 00000000 */ nop /* E270 80032E70 8C430000 */ lw $v1, 0x0($v0) /* E274 80032E74 24020002 */ addiu $v0, $zero, 0x2 /* E278 80032E78 1062002A */ beq $v1, $v0, .L80032F24 /* E27C 80032E7C 24020005 */ addiu $v0, $zero, 0x5 /* E280 80032E80 10620028 */ beq $v1, $v0, .L80032F24 /* E284 80032E84 00000000 */ nop /* E288 80032E88 8E250524 */ lw $a1, 0x524($s1) /* E28C 80032E8C 8E260528 */ lw $a2, 0x528($s1) /* E290 80032E90 0C00CA29 */ jal func_800328A4 /* E294 80032E94 0200202D */ daddu $a0, $s0, $zero /* E298 80032E98 14400022 */ bnez $v0, .L80032F24 /* E29C 80032E9C 00000000 */ nop /* E2A0 80032EA0 12400003 */ beqz $s2, .L80032EB0 /* E2A4 80032EA4 00000000 */ nop /* E2A8 80032EA8 0800CBC9 */ j .L80032F24 /* E2AC 80032EAC AE32052C */ sw $s2, 0x52C($s1) .L80032EB0: /* E2B0 80032EB0 C6380060 */ lwc1 $f24, 0x60($s1) /* E2B4 80032EB4 C6200524 */ lwc1 $f0, 0x524($s1) /* E2B8 80032EB8 C6360068 */ lwc1 $f22, 0x68($s1) /* E2BC 80032EBC 4600C601 */ sub.s $f24, $f24, $f0 /* E2C0 80032EC0 C6200528 */ lwc1 $f0, 0x528($s1) /* E2C4 80032EC4 C62C006C */ lwc1 $f12, 0x6C($s1) /* E2C8 80032EC8 0C00A8D4 */ jal cos_deg /* E2CC 80032ECC 4600B581 */ sub.s $f22, $f22, $f0 /* E2D0 80032ED0 C62C006C */ lwc1 $f12, 0x6C($s1) /* E2D4 80032ED4 0C00A8BB */ jal sin_deg /* E2D8 80032ED8 46000507 */ neg.s $f20, $f0 /* E2DC 80032EDC 4614C602 */ mul.s $f24, $f24, $f20 /* E2E0 80032EE0 00000000 */ nop /* E2E4 80032EE4 46000007 */ neg.s $f0, $f0 /* E2E8 80032EE8 4600B582 */ mul.s $f22, $f22, $f0 /* E2EC 80032EEC 00000000 */ nop /* E2F0 80032EF0 4616C600 */ add.s $f24, $f24, $f22 /* E2F4 80032EF4 44800000 */ mtc1 $zero, $f0 /* E2F8 80032EF8 00000000 */ nop /* E2FC 80032EFC 4618003C */ c.lt.s $f0, $f24 /* E300 80032F00 00000000 */ nop /* E304 80032F04 45010006 */ bc1t .L80032F20 /* E308 80032F08 2402FFFF */ addiu $v0, $zero, -0x1 /* E30C 80032F0C 4600C03C */ c.lt.s $f24, $f0 /* E310 80032F10 00000000 */ nop /* E314 80032F14 45010002 */ bc1t .L80032F20 /* E318 80032F18 24020001 */ addiu $v0, $zero, 0x1 /* E31C 80032F1C 0000102D */ daddu $v0, $zero, $zero .L80032F20: /* E320 80032F20 AE22052C */ sw $v0, 0x52C($s1) .L80032F24: /* E324 80032F24 44800000 */ mtc1 $zero, $f0 /* E328 80032F28 00000000 */ nop /* E32C 80032F2C 461A003C */ c.lt.s $f0, $f26 /* E330 80032F30 00000000 */ nop /* E334 80032F34 45000004 */ bc1f .L80032F48 /* E338 80032F38 00000000 */ nop /* E33C 80032F3C 8E22052C */ lw $v0, 0x52C($s1) /* E340 80032F40 5C400009 */ bgtzl $v0, .L80032F68 /* E344 80032F44 AE200514 */ sw $zero, 0x514($s1) .L80032F48: /* E348 80032F48 4600D03C */ c.lt.s $f26, $f0 /* E34C 80032F4C 00000000 */ nop /* E350 80032F50 45000006 */ bc1f .L80032F6C /* E354 80032F54 00000000 */ nop /* E358 80032F58 8E22052C */ lw $v0, 0x52C($s1) /* E35C 80032F5C 04410003 */ bgez $v0, .L80032F6C /* E360 80032F60 00000000 */ nop /* E364 80032F64 AE200514 */ sw $zero, 0x514($s1) .L80032F68: /* E368 80032F68 AE20050C */ sw $zero, 0x50C($s1) .L80032F6C: /* E36C 80032F6C C6200060 */ lwc1 $f0, 0x60($s1) /* E370 80032F70 C6220068 */ lwc1 $f2, 0x68($s1) /* E374 80032F74 AE330534 */ sw $s3, 0x534($s1) /* E378 80032F78 E6200524 */ swc1 $f0, 0x524($s1) /* E37C 80032F7C 0800CCD7 */ j .L8003335C /* E380 80032F80 E6220528 */ swc1 $f2, 0x528($s1) .L80032F84: /* E384 80032F84 C6200060 */ lwc1 $f0, 0x60($s1) /* E388 80032F88 C6220068 */ lwc1 $f2, 0x68($s1) /* E38C 80032F8C 4600A306 */ mov.s $f12, $f20 /* E390 80032F90 AE20052C */ sw $zero, 0x52C($s1) /* E394 80032F94 AE330534 */ sw $s3, 0x534($s1) /* E398 80032F98 E6200524 */ swc1 $f0, 0x524($s1) /* E39C 80032F9C 0C00A874 */ jal cos_rad /* E3A0 80032FA0 E6220528 */ swc1 $f2, 0x528($s1) /* E3A4 80032FA4 4600D002 */ mul.s $f0, $f26, $f0 /* E3A8 80032FA8 00000000 */ nop /* E3AC 80032FAC C6220060 */ lwc1 $f2, 0x60($s1) /* E3B0 80032FB0 46001700 */ add.s $f28, $f2, $f0 /* E3B4 80032FB4 0C00A85B */ jal sin_rad /* E3B8 80032FB8 4600A306 */ mov.s $f12, $f20 /* E3BC 80032FBC 4600D002 */ mul.s $f0, $f26, $f0 /* E3C0 80032FC0 00000000 */ nop /* E3C4 80032FC4 C6220068 */ lwc1 $f2, 0x68($s1) /* E3C8 80032FC8 3C014120 */ lui $at, (0x41200000 >> 16) /* E3CC 80032FCC 44817000 */ mtc1 $at, $f14 /* E3D0 80032FD0 46001680 */ add.s $f26, $f2, $f0 /* E3D4 80032FD4 C6200064 */ lwc1 $f0, 0x64($s1) /* E3D8 80032FD8 27A70040 */ addiu $a3, $sp, 0x40 /* E3DC 80032FDC 460E0380 */ add.s $f14, $f0, $f14 /* E3E0 80032FE0 4406D000 */ mfc1 $a2, $f26 /* E3E4 80032FE4 0C00C884 */ jal test_ray_zone /* E3E8 80032FE8 4600E306 */ mov.s $f12, $f28 /* E3EC 80032FEC 0040802D */ daddu $s0, $v0, $zero /* E3F0 80032FF0 120000DA */ beqz $s0, .L8003335C /* E3F4 80032FF4 24020002 */ addiu $v0, $zero, 0x2 /* E3F8 80032FF8 8E040000 */ lw $a0, 0x0($s0) /* E3FC 80032FFC 1082000A */ beq $a0, $v0, .L80033028 /* E400 80033000 24020005 */ addiu $v0, $zero, 0x5 /* E404 80033004 10820008 */ beq $a0, $v0, .L80033028 /* E408 80033008 00000000 */ nop /* E40C 8003300C 8E240534 */ lw $a0, 0x534($s1) /* E410 80033010 4405E000 */ mfc1 $a1, $f28 /* E414 80033014 4406D000 */ mfc1 $a2, $f26 /* E418 80033018 0C00CA29 */ jal func_800328A4 /* E41C 8003301C 00000000 */ nop /* E420 80033020 104000CE */ beqz $v0, .L8003335C /* E424 80033024 00000000 */ nop .L80033028: /* E428 80033028 8E240534 */ lw $a0, 0x534($s1) /* E42C 8003302C 3C014974 */ lui $at, (0x49742400 >> 16) /* E430 80033030 34212400 */ ori $at, $at, (0x49742400 & 0xFFFF) /* E434 80033034 4481A000 */ mtc1 $at, $f20 /* E438 80033038 10800043 */ beqz $a0, .L80033148 /* E43C 8003303C 24120001 */ addiu $s2, $zero, 0x1 /* E440 80033040 8C830000 */ lw $v1, 0x0($a0) /* E444 80033044 24020006 */ addiu $v0, $zero, 0x6 /* E448 80033048 1462003F */ bne $v1, $v0, .L80033148 /* E44C 8003304C 0080802D */ daddu $s0, $a0, $zero /* E450 80033050 C6200060 */ lwc1 $f0, 0x60($s1) /* E454 80033054 C6080018 */ lwc1 $f8, 0x18($s0) /* E458 80033058 C604000C */ lwc1 $f4, 0xC($s0) /* E45C 8003305C C6020020 */ lwc1 $f2, 0x20($s0) /* E460 80033060 C6060014 */ lwc1 $f6, 0x14($s0) /* E464 80033064 E7A00010 */ swc1 $f0, 0x10($sp) /* E468 80033068 C6200068 */ lwc1 $f0, 0x68($s1) /* E46C 8003306C 27A20044 */ addiu $v0, $sp, 0x44 /* E470 80033070 AFA20020 */ sw $v0, 0x20($sp) /* E474 80033074 27A20048 */ addiu $v0, $sp, 0x48 /* E478 80033078 46061601 */ sub.s $f24, $f2, $f6 /* E47C 8003307C AFA20024 */ sw $v0, 0x24($sp) /* E480 80033080 27A2004C */ addiu $v0, $sp, 0x4C /* E484 80033084 46044581 */ sub.s $f22, $f8, $f4 /* E488 80033088 E7BC0018 */ swc1 $f28, 0x18($sp) /* E48C 8003308C E7BA001C */ swc1 $f26, 0x1C($sp) /* E490 80033090 AFA20028 */ sw $v0, 0x28($sp) /* E494 80033094 46182281 */ sub.s $f10, $f4, $f24 /* E498 80033098 E7A00014 */ swc1 $f0, 0x14($sp) /* E49C 8003309C C60C000C */ lwc1 $f12, 0xC($s0) /* E4A0 800330A0 46163180 */ add.s $f6, $f6, $f22 /* E4A4 800330A4 C60E0014 */ lwc1 $f14, 0x14($s0) /* E4A8 800330A8 44065000 */ mfc1 $a2, $f10 /* E4AC 800330AC 44073000 */ mfc1 $a3, $f6 /* E4B0 800330B0 0C00C979 */ jal calculate_line_segment_intersection /* E4B4 800330B4 0000902D */ daddu $s2, $zero, $zero /* E4B8 800330B8 10400006 */ beqz $v0, .L800330D4 /* E4BC 800330BC 00000000 */ nop /* E4C0 800330C0 C7A0004C */ lwc1 $f0, 0x4C($sp) /* E4C4 800330C4 4614003C */ c.lt.s $f0, $f20 /* E4C8 800330C8 00000000 */ nop /* E4CC 800330CC 45030001 */ bc1tl .L800330D4 /* E4D0 800330D0 46000506 */ mov.s $f20, $f0 .L800330D4: /* E4D4 800330D4 C6200060 */ lwc1 $f0, 0x60($s1) /* E4D8 800330D8 C6020018 */ lwc1 $f2, 0x18($s0) /* E4DC 800330DC C6040020 */ lwc1 $f4, 0x20($s0) /* E4E0 800330E0 E7A00010 */ swc1 $f0, 0x10($sp) /* E4E4 800330E4 C6200068 */ lwc1 $f0, 0x68($s1) /* E4E8 800330E8 27A20044 */ addiu $v0, $sp, 0x44 /* E4EC 800330EC AFA20020 */ sw $v0, 0x20($sp) /* E4F0 800330F0 27A20048 */ addiu $v0, $sp, 0x48 /* E4F4 800330F4 46181081 */ sub.s $f2, $f2, $f24 /* E4F8 800330F8 AFA20024 */ sw $v0, 0x24($sp) /* E4FC 800330FC 27A2004C */ addiu $v0, $sp, 0x4C /* E500 80033100 46162100 */ add.s $f4, $f4, $f22 /* E504 80033104 E7BC0018 */ swc1 $f28, 0x18($sp) /* E508 80033108 E7BA001C */ swc1 $f26, 0x1C($sp) /* E50C 8003310C AFA20028 */ sw $v0, 0x28($sp) /* E510 80033110 E7A00014 */ swc1 $f0, 0x14($sp) /* E514 80033114 C60C0018 */ lwc1 $f12, 0x18($s0) /* E518 80033118 C60E0020 */ lwc1 $f14, 0x20($s0) /* E51C 8003311C 44061000 */ mfc1 $a2, $f2 /* E520 80033120 44072000 */ mfc1 $a3, $f4 /* E524 80033124 0C00C979 */ jal calculate_line_segment_intersection /* E528 80033128 00000000 */ nop /* E52C 8003312C 10400006 */ beqz $v0, .L80033148 /* E530 80033130 00000000 */ nop /* E534 80033134 C7A0004C */ lwc1 $f0, 0x4C($sp) /* E538 80033138 4614003C */ c.lt.s $f0, $f20 /* E53C 8003313C 00000000 */ nop /* E540 80033140 45030001 */ bc1tl .L80033148 /* E544 80033144 46000506 */ mov.s $f20, $f0 .L80033148: /* E548 80033148 1240005C */ beqz $s2, .L800332BC /* E54C 8003314C 00000000 */ nop /* E550 80033150 8FA30040 */ lw $v1, 0x40($sp) /* E554 80033154 8462000A */ lh $v0, 0xA($v1) /* E558 80033158 18400058 */ blez $v0, .L800332BC /* E55C 8003315C 0000902D */ daddu $s2, $zero, $zero /* E560 80033160 27B50044 */ addiu $s5, $sp, 0x44 /* E564 80033164 27B40048 */ addiu $s4, $sp, 0x48 /* E568 80033168 27B3004C */ addiu $s3, $sp, 0x4C /* E56C 8003316C 0240802D */ daddu $s0, $s2, $zero .L80033170: /* E570 80033170 8C62000C */ lw $v0, 0xC($v1) /* E574 80033174 C6200060 */ lwc1 $f0, 0x60($s1) /* E578 80033178 02021021 */ addu $v0, $s0, $v0 /* E57C 8003317C 8C430000 */ lw $v1, 0x0($v0) /* E580 80033180 8C420004 */ lw $v0, 0x4($v0) /* E584 80033184 E7A00010 */ swc1 $f0, 0x10($sp) /* E588 80033188 C6200068 */ lwc1 $f0, 0x68($s1) /* E58C 8003318C E7BC0018 */ swc1 $f28, 0x18($sp) /* E590 80033190 E7BA001C */ swc1 $f26, 0x1C($sp) /* E594 80033194 AFB50020 */ sw $s5, 0x20($sp) /* E598 80033198 AFB40024 */ sw $s4, 0x24($sp) /* E59C 8003319C AFB30028 */ sw $s3, 0x28($sp) /* E5A0 800331A0 E7A00014 */ swc1 $f0, 0x14($sp) /* E5A4 800331A4 C46C0000 */ lwc1 $f12, 0x0($v1) /* E5A8 800331A8 C46E0008 */ lwc1 $f14, 0x8($v1) /* E5AC 800331AC 8C460000 */ lw $a2, 0x0($v0) /* E5B0 800331B0 0C00C8B7 */ jal calculate_segment_intersection /* E5B4 800331B4 8C470008 */ lw $a3, 0x8($v0) /* E5B8 800331B8 10400006 */ beqz $v0, .L800331D4 /* E5BC 800331BC 00000000 */ nop /* E5C0 800331C0 C7A0004C */ lwc1 $f0, 0x4C($sp) /* E5C4 800331C4 4614003C */ c.lt.s $f0, $f20 /* E5C8 800331C8 00000000 */ nop /* E5CC 800331CC 45030001 */ bc1tl .L800331D4 /* E5D0 800331D0 46000506 */ mov.s $f20, $f0 .L800331D4: /* E5D4 800331D4 8FA20040 */ lw $v0, 0x40($sp) /* E5D8 800331D8 8C42000C */ lw $v0, 0xC($v0) /* E5DC 800331DC C6200060 */ lwc1 $f0, 0x60($s1) /* E5E0 800331E0 02021021 */ addu $v0, $s0, $v0 /* E5E4 800331E4 8C430004 */ lw $v1, 0x4($v0) /* E5E8 800331E8 8C420008 */ lw $v0, 0x8($v0) /* E5EC 800331EC E7A00010 */ swc1 $f0, 0x10($sp) /* E5F0 800331F0 C6200068 */ lwc1 $f0, 0x68($s1) /* E5F4 800331F4 E7BC0018 */ swc1 $f28, 0x18($sp) /* E5F8 800331F8 E7BA001C */ swc1 $f26, 0x1C($sp) /* E5FC 800331FC AFB50020 */ sw $s5, 0x20($sp) /* E600 80033200 AFB40024 */ sw $s4, 0x24($sp) /* E604 80033204 AFB30028 */ sw $s3, 0x28($sp) /* E608 80033208 E7A00014 */ swc1 $f0, 0x14($sp) /* E60C 8003320C C46C0000 */ lwc1 $f12, 0x0($v1) /* E610 80033210 C46E0008 */ lwc1 $f14, 0x8($v1) /* E614 80033214 8C460000 */ lw $a2, 0x0($v0) /* E618 80033218 0C00C8B7 */ jal calculate_segment_intersection /* E61C 8003321C 8C470008 */ lw $a3, 0x8($v0) /* E620 80033220 10400006 */ beqz $v0, .L8003323C /* E624 80033224 00000000 */ nop /* E628 80033228 C7A0004C */ lwc1 $f0, 0x4C($sp) /* E62C 8003322C 4614003C */ c.lt.s $f0, $f20 /* E630 80033230 00000000 */ nop /* E634 80033234 45030001 */ bc1tl .L8003323C /* E638 80033238 46000506 */ mov.s $f20, $f0 .L8003323C: /* E63C 8003323C 8FA20040 */ lw $v0, 0x40($sp) /* E640 80033240 8C42000C */ lw $v0, 0xC($v0) /* E644 80033244 C6200060 */ lwc1 $f0, 0x60($s1) /* E648 80033248 02021021 */ addu $v0, $s0, $v0 /* E64C 8003324C 8C430008 */ lw $v1, 0x8($v0) /* E650 80033250 8C420000 */ lw $v0, 0x0($v0) /* E654 80033254 E7A00010 */ swc1 $f0, 0x10($sp) /* E658 80033258 C6200068 */ lwc1 $f0, 0x68($s1) /* E65C 8003325C E7BC0018 */ swc1 $f28, 0x18($sp) /* E660 80033260 E7BA001C */ swc1 $f26, 0x1C($sp) /* E664 80033264 AFB50020 */ sw $s5, 0x20($sp) /* E668 80033268 AFB40024 */ sw $s4, 0x24($sp) /* E66C 8003326C AFB30028 */ sw $s3, 0x28($sp) /* E670 80033270 E7A00014 */ swc1 $f0, 0x14($sp) /* E674 80033274 C46C0000 */ lwc1 $f12, 0x0($v1) /* E678 80033278 C46E0008 */ lwc1 $f14, 0x8($v1) /* E67C 8003327C 8C460000 */ lw $a2, 0x0($v0) /* E680 80033280 0C00C8B7 */ jal calculate_segment_intersection /* E684 80033284 8C470008 */ lw $a3, 0x8($v0) /* E688 80033288 10400006 */ beqz $v0, .L800332A4 /* E68C 8003328C 00000000 */ nop /* E690 80033290 C7A0004C */ lwc1 $f0, 0x4C($sp) /* E694 80033294 4614003C */ c.lt.s $f0, $f20 /* E698 80033298 00000000 */ nop /* E69C 8003329C 45030001 */ bc1tl .L800332A4 /* E6A0 800332A0 46000506 */ mov.s $f20, $f0 .L800332A4: /* E6A4 800332A4 8FA30040 */ lw $v1, 0x40($sp) /* E6A8 800332A8 8462000A */ lh $v0, 0xA($v1) /* E6AC 800332AC 26520001 */ addiu $s2, $s2, 0x1 /* E6B0 800332B0 0242102A */ slt $v0, $s2, $v0 /* E6B4 800332B4 1440FFAE */ bnez $v0, .L80033170 /* E6B8 800332B8 26100040 */ addiu $s0, $s0, 0x40 .L800332BC: /* E6BC 800332BC 3C014974 */ lui $at, (0x49742400 >> 16) /* E6C0 800332C0 34212400 */ ori $at, $at, (0x49742400 & 0xFFFF) /* E6C4 800332C4 44810000 */ mtc1 $at, $f0 /* E6C8 800332C8 00000000 */ nop /* E6CC 800332CC 4600A032 */ c.eq.s $f20, $f0 /* E6D0 800332D0 00000000 */ nop /* E6D4 800332D4 45030020 */ bc1tl .L80033358 /* E6D8 800332D8 AE20050C */ sw $zero, 0x50C($s1) /* E6DC 800332DC 44801000 */ mtc1 $zero, $f2 /* E6E0 800332E0 00000000 */ nop /* E6E4 800332E4 4602A032 */ c.eq.s $f20, $f2 /* E6E8 800332E8 00000000 */ nop /* E6EC 800332EC 45000003 */ bc1f .L800332FC /* E6F0 800332F0 00000000 */ nop /* E6F4 800332F4 0800CCD6 */ j .L80033358 /* E6F8 800332F8 AE20050C */ sw $zero, 0x50C($s1) .L800332FC: /* E6FC 800332FC C620050C */ lwc1 $f0, 0x50C($s1) /* E700 80033300 4600103C */ c.lt.s $f2, $f0 /* E704 80033304 00000000 */ nop /* E708 80033308 4500000A */ bc1f .L80033334 /* E70C 8003330C 2630050C */ addiu $s0, $s1, 0x50C /* E710 80033310 4600A004 */ sqrt.s $f0, $f20 /* E714 80033314 46000032 */ c.eq.s $f0, $f0 /* E718 80033318 00000000 */ nop /* E71C 8003331C 4503000E */ bc1tl .L80033358 /* E720 80033320 E6000000 */ swc1 $f0, 0x0($s0) /* E724 80033324 0C0187BC */ jal sqrtf /* E728 80033328 4600A306 */ mov.s $f12, $f20 /* E72C 8003332C 0800CCD6 */ j .L80033358 /* E730 80033330 E6000000 */ swc1 $f0, 0x0($s0) .L80033334: /* E734 80033334 4600A004 */ sqrt.s $f0, $f20 /* E738 80033338 46000032 */ c.eq.s $f0, $f0 /* E73C 8003333C 00000000 */ nop /* E740 80033340 45030004 */ bc1tl .L80033354 /* E744 80033344 46000007 */ neg.s $f0, $f0 /* E748 80033348 0C0187BC */ jal sqrtf /* E74C 8003334C 4600A306 */ mov.s $f12, $f20 /* E750 80033350 46000007 */ neg.s $f0, $f0 .L80033354: /* E754 80033354 E6000000 */ swc1 $f0, 0x0($s0) .L80033358: /* E758 80033358 AE200514 */ sw $zero, 0x514($s1) .L8003335C: /* E75C 8003335C 8FBF0068 */ lw $ra, 0x68($sp) /* E760 80033360 8FB50064 */ lw $s5, 0x64($sp) /* E764 80033364 8FB40060 */ lw $s4, 0x60($sp) /* E768 80033368 8FB3005C */ lw $s3, 0x5C($sp) /* E76C 8003336C 8FB20058 */ lw $s2, 0x58($sp) /* E770 80033370 8FB10054 */ lw $s1, 0x54($sp) /* E774 80033374 8FB00050 */ lw $s0, 0x50($sp) /* E778 80033378 D7BC0090 */ ldc1 $f28, 0x90($sp) /* E77C 8003337C D7BA0088 */ ldc1 $f26, 0x88($sp) /* E780 80033380 D7B80080 */ ldc1 $f24, 0x80($sp) /* E784 80033384 D7B60078 */ ldc1 $f22, 0x78($sp) /* E788 80033388 D7B40070 */ ldc1 $f20, 0x70($sp) /* E78C 8003338C 03E00008 */ jr $ra /* E790 80033390 27BD0098 */ addiu $sp, $sp, 0x98 ### DECOMPILED C INSTRUCTIONS: void func_80032C64(Camera* camera) { s32 i; f32 rotationRad; f32 leadAmount; CameraControlSettings* settings; CameraControlSettings* settings2; CameraControlSettings* settings3; s32 s2; f32 X, Y, Z, W; f32 product; f32 newPosX, newPosZ; Collider* zone; s32 cond; f32 dist; f32 sp44, sp48, sp4C; f32 deltaPosX, deltaPosZ; f32 f24, f22, cosYaw, sinYaw; rotationRad = camera->trueRotation.x / 180.0f * PI; leadAmount = camera->leadAmount; s2 = 0; cos_rad(rotationRad); sin_rad(rotationRad); settings3 = settings = test_ray_zone(camera->targetPos.x, camera->targetPos.y + 10.0f, camera->targetPos.z, NULL); if (settings != NULL) { if (settings->type == CAM_CONTROL_CONSTRAIN_TO_LINE || settings->type == CAM_CONTROL_LOOK_AT_POINT_CONSTAIN_TO_LINE || (s2 = func_800328A4(settings, camera->targetPos.x, camera->targetPos.z))) { if (camera->unk_530) { guPerspectiveF(camera->perspectiveMatrix, &camera->perspNorm, camera->vfov, (f32)camera->viewportW / (f32)camera->viewportH, camera->nearClip, camera->farClip, 1.0f); guMtxCatF(camera->viewMtxPlayer, camera->perspectiveMatrix, camera->perspectiveMatrix); transform_point(camera->perspectiveMatrix, camera->targetPos.x, camera->targetPos.y, camera->targetPos.z, 1.0f, &X, &Y, &Z, &W); if (W == 0.0f) { W = 1.0f; } W = 1.0f / W; X *= W; camera->unk_52C = (X > 0.0f) ? 1 : (X < 0.0f) ? -1 : 0; camera->unk_530 = 0; } else { CameraControlSettings* aabbForZoneBelow = camera->aabbForZoneBelow; if (!(aabbForZoneBelow != NULL && (aabbForZoneBelow->type == CAM_CONTROL_CONSTRAIN_TO_LINE || aabbForZoneBelow->type == CAM_CONTROL_LOOK_AT_POINT_CONSTAIN_TO_LINE || func_800328A4(settings, camera->unk_524, camera->unk_528) != 0))) { if (aabbForZoneBelow != NULL && s2 != 0) { camera->unk_52C = s2; } else { f24 = cosYaw = camera->targetPos.x - camera->unk_524; f22 = camera->targetPos.z - camera->unk_528; cosYaw = -cos_deg(camera->currentYaw); sinYaw = -sin_deg(camera->currentYaw); product = f24 * cosYaw + f22 * sinYaw; camera->unk_52C = (product > 0) ? -1 : (product < 0) ? 1 : 0; } } } if (leadAmount > 0.0f && camera->unk_52C > 0 || leadAmount < 0.0f && camera->unk_52C < 0) { camera->unk_514 = 0.0f; camera->leadAmount = 0.0f; } camera->aabbForZoneBelow = settings3; camera->unk_524 = camera->targetPos.x; camera->unk_528 = camera->targetPos.z; return; } } camera->unk_52C = 0; camera->aabbForZoneBelow = settings3; camera->unk_524 = camera->targetPos.x; camera->unk_528 = camera->targetPos.z; newPosX = camera->targetPos.x + leadAmount * cos_rad(rotationRad); newPosZ = camera->targetPos.z + leadAmount * sin_rad(rotationRad); settings = test_ray_zone(newPosX, camera->targetPos.y + 10.0f, newPosZ, &zone); if (settings != NULL) { if (settings->type == CAM_CONTROL_CONSTRAIN_TO_LINE || settings->type == CAM_CONTROL_LOOK_AT_POINT_CONSTAIN_TO_LINE || func_800328A4(camera->aabbForZoneBelow, newPosX, newPosZ) != 0) { cond = TRUE; dist = SQ(1000.0f); if (camera->aabbForZoneBelow != NULL && camera->aabbForZoneBelow->type == CAM_CONTROL_CONSTAIN_BETWEEN_POINTS) { settings2 = camera->aabbForZoneBelow; cond = FALSE; deltaPosX = settings2->points.two.Bx - settings2->points.two.Ax; deltaPosZ = settings2->points.two.Bz - settings2->points.two.Az; if (calculate_line_segment_intersection(settings2->points.two.Ax, settings2->points.two.Az, settings2->points.two.Ax - deltaPosZ, settings2->points.two.Az + deltaPosX, camera->targetPos.x, camera->targetPos.z, newPosX, newPosZ, &sp44, &sp48, &sp4C) && sp4C < SQ(1000.0f)) { dist = sp4C; } do { if (calculate_line_segment_intersection(settings2->points.two.Bx, settings2->points.two.Bz, settings2->points.two.Bx - deltaPosZ, settings2->points.two.Bz + deltaPosX, camera->targetPos.x, camera->targetPos.z, newPosX, newPosZ, &sp44, &sp48, &sp4C) && sp4C < dist) { dist = sp4C; } } while (0); // TODO find better match } if (cond) { for (i = 0; i < zone->numTriangles; i++) { if (calculate_segment_intersection(zone->triangleTable[i].v1->x, zone->triangleTable[i].v1->z, zone->triangleTable[i].v2->x, zone->triangleTable[i].v2->z, camera->targetPos.x, camera->targetPos.z, newPosX, newPosZ, &sp44, &sp48, &sp4C) && sp4C < dist) { dist = sp4C; } if (calculate_segment_intersection(zone->triangleTable[i].v2->x, zone->triangleTable[i].v2->z, zone->triangleTable[i].v3->x, zone->triangleTable[i].v3->z, camera->targetPos.x, camera->targetPos.z, newPosX, newPosZ, &sp44, &sp48, &sp4C) && sp4C < dist) { dist = sp4C; } if (calculate_segment_intersection(zone->triangleTable[i].v3->x, zone->triangleTable[i].v3->z, zone->triangleTable[i].v1->x, zone->triangleTable[i].v1->z, camera->targetPos.x, camera->targetPos.z, newPosX, newPosZ, &sp44, &sp48, &sp4C) && sp4C < dist) { dist = sp4C; } } } if (dist == SQ(1000.0f) || dist == 0) { camera->leadAmount = 0.0f; } else { camera->leadAmount = (camera->leadAmount > 0.0f) ? sqrtf(dist) : -sqrtf(dist); } camera->unk_514 = 0.0f; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_encounters_pre_battle /* 1C764 80041364 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 1C768 80041368 AFB50024 */ sw $s5, 0x24($sp) /* 1C76C 8004136C 3C15800B */ lui $s5, %hi(gCurrentEncounter) /* 1C770 80041370 26B50F10 */ addiu $s5, $s5, %lo(gCurrentEncounter) /* 1C774 80041374 AFB7002C */ sw $s7, 0x2C($sp) /* 1C778 80041378 3C178011 */ lui $s7, %hi(gPlayerData) /* 1C77C 8004137C 26F7F290 */ addiu $s7, $s7, %lo(gPlayerData) /* 1C780 80041380 3C04800A */ lui $a0, %hi(gEncounterSubState) /* 1C784 80041384 2484A5D0 */ addiu $a0, $a0, %lo(gEncounterSubState) /* 1C788 80041388 AFBF0030 */ sw $ra, 0x30($sp) /* 1C78C 8004138C AFB60028 */ sw $s6, 0x28($sp) /* 1C790 80041390 AFB40020 */ sw $s4, 0x20($sp) /* 1C794 80041394 AFB3001C */ sw $s3, 0x1C($sp) /* 1C798 80041398 AFB20018 */ sw $s2, 0x18($sp) /* 1C79C 8004139C AFB10014 */ sw $s1, 0x14($sp) /* 1C7A0 800413A0 AFB00010 */ sw $s0, 0x10($sp) /* 1C7A4 800413A4 8C830000 */ lw $v1, 0x0($a0) /* 1C7A8 800413A8 24050001 */ addiu $a1, $zero, 0x1 /* 1C7AC 800413AC 106500CF */ beq $v1, $a1, .L800416EC /* 1C7B0 800413B0 28620002 */ slti $v0, $v1, 0x2 /* 1C7B4 800413B4 50400005 */ beql $v0, $zero, .L800413CC /* 1C7B8 800413B8 24020002 */ addiu $v0, $zero, 0x2 /* 1C7BC 800413BC 10600009 */ beqz $v1, .L800413E4 /* 1C7C0 800413C0 2402FFFF */ addiu $v0, $zero, -0x1 /* 1C7C4 800413C4 0801064E */ j .L80041938 /* 1C7C8 800413C8 00000000 */ nop .L800413CC: /* 1C7CC 800413CC 1062011C */ beq $v1, $v0, .L80041840 /* 1C7D0 800413D0 24020003 */ addiu $v0, $zero, 0x3 /* 1C7D4 800413D4 1062014E */ beq $v1, $v0, .L80041910 /* 1C7D8 800413D8 24020004 */ addiu $v0, $zero, 0x4 /* 1C7DC 800413DC 0801064E */ j .L80041938 /* 1C7E0 800413E0 00000000 */ nop .L800413E4: /* 1C7E4 800413E4 AEA00090 */ sw $zero, 0x90($s5) /* 1C7E8 800413E8 AEA50094 */ sw $a1, 0x94($s5) /* 1C7EC 800413EC AEA50098 */ sw $a1, 0x98($s5) /* 1C7F0 800413F0 A2A20008 */ sb $v0, 0x8($s5) /* 1C7F4 800413F4 3C01800A */ lui $at, %hi(D_8009A654) /* 1C7F8 800413F8 A020A654 */ sb $zero, %lo(D_8009A654)($at) /* 1C7FC 800413FC 3C018007 */ lui $at, %hi(D_80077C40) /* 1C800 80041400 AC207C40 */ sw $zero, %lo(D_80077C40)($at) /* 1C804 80041404 0C0B117A */ jal suspend_all_group /* 1C808 80041408 24040010 */ addiu $a0, $zero, 0x10 /* 1C80C 8004140C 82A2001C */ lb $v0, 0x1C($s5) /* 1C810 80041410 18400024 */ blez $v0, .L800414A4 /* 1C814 80041414 0000982D */ daddu $s3, $zero, $zero /* 1C818 80041418 02A0B02D */ daddu $s6, $s5, $zero .L8004141C: /* 1C81C 8004141C 8ED40028 */ lw $s4, 0x28($s6) /* 1C820 80041420 1280001B */ beqz $s4, .L80041490 /* 1C824 80041424 00000000 */ nop /* 1C828 80041428 8E820000 */ lw $v0, 0x0($s4) /* 1C82C 8004142C 18400018 */ blez $v0, .L80041490 /* 1C830 80041430 0000882D */ daddu $s1, $zero, $zero /* 1C834 80041434 0280902D */ daddu $s2, $s4, $zero .L80041438: /* 1C838 80041438 8E500004 */ lw $s0, 0x4($s2) /* 1C83C 8004143C 1200000F */ beqz $s0, .L8004147C /* 1C840 80041440 00000000 */ nop /* 1C844 80041444 8E020000 */ lw $v0, 0x0($s0) /* 1C848 80041448 30420020 */ andi $v0, $v0, 0x20 /* 1C84C 8004144C 1440000B */ bnez $v0, .L8004147C /* 1C850 80041450 00000000 */ nop /* 1C854 80041454 8E02003C */ lw $v0, 0x3C($s0) /* 1C858 80041458 10400003 */ beqz $v0, .L80041468 /* 1C85C 8004145C 00000000 */ nop /* 1C860 80041460 0C0B1108 */ jal suspend_all_script /* 1C864 80041464 8E040054 */ lw $a0, 0x54($s0) .L80041468: /* 1C868 80041468 8E020044 */ lw $v0, 0x44($s0) /* 1C86C 8004146C 10400003 */ beqz $v0, .L8004147C /* 1C870 80041470 00000000 */ nop /* 1C874 80041474 0C0B1108 */ jal suspend_all_script /* 1C878 80041478 8E04005C */ lw $a0, 0x5C($s0) .L8004147C: /* 1C87C 8004147C 8E820000 */ lw $v0, 0x0($s4) /* 1C880 80041480 26310001 */ addiu $s1, $s1, 0x1 /* 1C884 80041484 0222102A */ slt $v0, $s1, $v0 /* 1C888 80041488 1440FFEB */ bnez $v0, .L80041438 /* 1C88C 8004148C 26520004 */ addiu $s2, $s2, 0x4 .L80041490: /* 1C890 80041490 82A2001C */ lb $v0, 0x1C($s5) /* 1C894 80041494 26730001 */ addiu $s3, $s3, 0x1 /* 1C898 80041498 0262102A */ slt $v0, $s3, $v0 /* 1C89C 8004149C 1440FFDF */ bnez $v0, .L8004141C /* 1C8A0 800414A0 26D60004 */ addiu $s6, $s6, 0x4 .L800414A4: /* 1C8A4 800414A4 8EB0008C */ lw $s0, 0x8C($s5) /* 1C8A8 800414A8 8E020000 */ lw $v0, 0x0($s0) /* 1C8AC 800414AC 3C030010 */ lui $v1, (0x100000 >> 16) /* 1C8B0 800414B0 00431024 */ and $v0, $v0, $v1 /* 1C8B4 800414B4 1040000C */ beqz $v0, .L800414E8 /* 1C8B8 800414B8 00000000 */ nop /* 1C8BC 800414BC 82A20012 */ lb $v0, 0x12($s5) /* 1C8C0 800414C0 14400009 */ bnez $v0, .L800414E8 /* 1C8C4 800414C4 00000000 */ nop /* 1C8C8 800414C8 AEA00094 */ sw $zero, 0x94($s5) /* 1C8CC 800414CC 0C03AD96 */ jal partner_handle_before_battle /* 1C8D0 800414D0 AEA0009C */ sw $zero, 0x9C($s5) /* 1C8D4 800414D4 24020003 */ addiu $v0, $zero, 0x3 /* 1C8D8 800414D8 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1C8DC 800414DC AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at) /* 1C8E0 800414E0 0801064E */ j .L80041938 /* 1C8E4 800414E4 00000000 */ nop .L800414E8: /* 1C8E8 800414E8 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 1C8EC 800414EC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 1C8F0 800414F0 80420074 */ lb $v0, 0x74($v0) /* 1C8F4 800414F4 24110002 */ addiu $s1, $zero, 0x2 /* 1C8F8 800414F8 14510009 */ bne $v0, $s1, .L80041520 /* 1C8FC 800414FC 24120001 */ addiu $s2, $zero, 0x1 /* 1C900 80041500 2402000A */ addiu $v0, $zero, 0xA /* 1C904 80041504 AEA00094 */ sw $zero, 0x94($s5) /* 1C908 80041508 0C03AD96 */ jal partner_handle_before_battle /* 1C90C 8004150C AEA2009C */ sw $v0, 0x9C($s5) /* 1C910 80041510 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1C914 80041514 AC31A5D0 */ sw $s1, %lo(gEncounterSubState)($at) /* 1C918 80041518 0801064E */ j .L80041938 /* 1C91C 8004151C 00000000 */ nop .L80041520: /* 1C920 80041520 82A30005 */ lb $v1, 0x5($s5) /* 1C924 80041524 8EB0008C */ lw $s0, 0x8C($s5) /* 1C928 80041528 1072001D */ beq $v1, $s2, .L800415A0 /* 1C92C 8004152C 24020003 */ addiu $v0, $zero, 0x3 /* 1C930 80041530 1062001B */ beq $v1, $v0, .L800415A0 /* 1C934 80041534 00000000 */ nop /* 1C938 80041538 0C03A752 */ jal is_ability_active /* 1C93C 8004153C 0040202D */ daddu $a0, $v0, $zero /* 1C940 80041540 10400016 */ beqz $v0, .L8004159C /* 1C944 80041544 00000000 */ nop /* 1C948 80041548 8E020018 */ lw $v0, 0x18($s0) /* 1C94C 8004154C 82E30009 */ lb $v1, 0x9($s7) /* 1C950 80041550 84420028 */ lh $v0, 0x28($v0) /* 1C954 80041554 0062182A */ slt $v1, $v1, $v0 /* 1C958 80041558 14600010 */ bnez $v1, .L8004159C /* 1C95C 8004155C 00000000 */ nop /* 1C960 80041560 8E020000 */ lw $v0, 0x0($s0) /* 1C964 80041564 30420040 */ andi $v0, $v0, 0x40 /* 1C968 80041568 1440000C */ bnez $v0, .L8004159C /* 1C96C 8004156C 00000000 */ nop /* 1C970 80041570 82A20012 */ lb $v0, 0x12($s5) /* 1C974 80041574 14400009 */ bnez $v0, .L8004159C /* 1C978 80041578 2402000A */ addiu $v0, $zero, 0xA /* 1C97C 8004157C AEA00094 */ sw $zero, 0x94($s5) /* 1C980 80041580 AEA2009C */ sw $v0, 0x9C($s5) /* 1C984 80041584 3C018007 */ lui $at, %hi(D_80077C40) /* 1C988 80041588 AC327C40 */ sw $s2, %lo(D_80077C40)($at) /* 1C98C 8004158C 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1C990 80041590 AC31A5D0 */ sw $s1, %lo(gEncounterSubState)($at) /* 1C994 80041594 0801064E */ j .L80041938 /* 1C998 80041598 00000000 */ nop .L8004159C: /* 1C99C 8004159C 8EB0008C */ lw $s0, 0x8C($s5) .L800415A0: /* 1C9A0 800415A0 0C03A752 */ jal is_ability_active /* 1C9A4 800415A4 2404002A */ addiu $a0, $zero, 0x2A /* 1C9A8 800415A8 1040000E */ beqz $v0, .L800415E4 /* 1C9AC 800415AC 24020003 */ addiu $v0, $zero, 0x3 /* 1C9B0 800415B0 8E020018 */ lw $v0, 0x18($s0) /* 1C9B4 800415B4 82E30009 */ lb $v1, 0x9($s7) /* 1C9B8 800415B8 84420028 */ lh $v0, 0x28($v0) /* 1C9BC 800415BC 0062182A */ slt $v1, $v1, $v0 /* 1C9C0 800415C0 14600008 */ bnez $v1, .L800415E4 /* 1C9C4 800415C4 24020003 */ addiu $v0, $zero, 0x3 /* 1C9C8 800415C8 8E020000 */ lw $v0, 0x0($s0) /* 1C9CC 800415CC 30420040 */ andi $v0, $v0, 0x40 /* 1C9D0 800415D0 14400004 */ bnez $v0, .L800415E4 /* 1C9D4 800415D4 24020003 */ addiu $v0, $zero, 0x3 /* 1C9D8 800415D8 82A20012 */ lb $v0, 0x12($s5) /* 1C9DC 800415DC 10400015 */ beqz $v0, .L80041634 /* 1C9E0 800415E0 24020003 */ addiu $v0, $zero, 0x3 .L800415E4: /* 1C9E4 800415E4 82A30005 */ lb $v1, 0x5($s5) /* 1C9E8 800415E8 1462001D */ bne $v1, $v0, .L80041660 /* 1C9EC 800415EC 8EB0008C */ lw $s0, 0x8C($s5) /* 1C9F0 800415F0 0C03A752 */ jal is_ability_active /* 1C9F4 800415F4 24040028 */ addiu $a0, $zero, 0x28 /* 1C9F8 800415F8 10400019 */ beqz $v0, .L80041660 /* 1C9FC 800415FC 00000000 */ nop /* 1CA00 80041600 8E020018 */ lw $v0, 0x18($s0) /* 1CA04 80041604 82E30009 */ lb $v1, 0x9($s7) /* 1CA08 80041608 84420028 */ lh $v0, 0x28($v0) /* 1CA0C 8004160C 0062182A */ slt $v1, $v1, $v0 /* 1CA10 80041610 14600013 */ bnez $v1, .L80041660 /* 1CA14 80041614 00000000 */ nop /* 1CA18 80041618 8E020000 */ lw $v0, 0x0($s0) /* 1CA1C 8004161C 30420040 */ andi $v0, $v0, 0x40 /* 1CA20 80041620 1440000F */ bnez $v0, .L80041660 /* 1CA24 80041624 00000000 */ nop /* 1CA28 80041628 82A20012 */ lb $v0, 0x12($s5) /* 1CA2C 8004162C 1440000C */ bnez $v0, .L80041660 /* 1CA30 80041630 00000000 */ nop .L80041634: /* 1CA34 80041634 2402000A */ addiu $v0, $zero, 0xA /* 1CA38 80041638 AEA2009C */ sw $v0, 0x9C($s5) /* 1CA3C 8004163C 24020001 */ addiu $v0, $zero, 0x1 /* 1CA40 80041640 3C018007 */ lui $at, %hi(D_80077C40) /* 1CA44 80041644 AC227C40 */ sw $v0, %lo(D_80077C40)($at) /* 1CA48 80041648 24020002 */ addiu $v0, $zero, 0x2 /* 1CA4C 8004164C AEA00094 */ sw $zero, 0x94($s5) /* 1CA50 80041650 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1CA54 80041654 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at) /* 1CA58 80041658 0801064E */ j .L80041938 /* 1CA5C 8004165C 00000000 */ nop .L80041660: /* 1CA60 80041660 8EA40014 */ lw $a0, 0x14($s5) /* 1CA64 80041664 04810015 */ bgez $a0, .L800416BC /* 1CA68 80041668 0000282D */ daddu $a1, $zero, $zero /* 1CA6C 8004166C 82A30004 */ lb $v1, 0x4($s5) /* 1CA70 80041670 24020001 */ addiu $v0, $zero, 0x1 /* 1CA74 80041674 1062000B */ beq $v1, $v0, .L800416A4 /* 1CA78 80041678 28620002 */ slti $v0, $v1, 0x2 /* 1CA7C 8004167C 10400005 */ beqz $v0, .L80041694 /* 1CA80 80041680 24020002 */ addiu $v0, $zero, 0x2 /* 1CA84 80041684 1060000D */ beqz $v1, .L800416BC /* 1CA88 80041688 24040002 */ addiu $a0, $zero, 0x2 /* 1CA8C 8004168C 080105B1 */ j .L800416C4 /* 1CA90 80041690 00000000 */ nop .L80041694: /* 1CA94 80041694 10620006 */ beq $v1, $v0, .L800416B0 /* 1CA98 80041698 24040002 */ addiu $a0, $zero, 0x2 /* 1CA9C 8004169C 080105B1 */ j .L800416C4 /* 1CAA0 800416A0 00000000 */ nop .L800416A4: /* 1CAA4 800416A4 24040002 */ addiu $a0, $zero, 0x2 /* 1CAA8 800416A8 080105AF */ j .L800416BC /* 1CAAC 800416AC 24050001 */ addiu $a1, $zero, 0x1 .L800416B0: /* 1CAB0 800416B0 080105AF */ j .L800416BC /* 1CAB4 800416B4 0080282D */ daddu $a1, $a0, $zero /* 1CAB8 800416B8 0000282D */ daddu $a1, $zero, $zero .L800416BC: /* 1CABC 800416BC 0C052BE3 */ jal bgm_set_battle_song /* 1CAC0 800416C0 00000000 */ nop .L800416C4: /* 1CAC4 800416C4 0C052BBE */ jal bgm_push_battle_song /* 1CAC8 800416C8 00000000 */ nop /* 1CACC 800416CC 24020001 */ addiu $v0, $zero, 0x1 /* 1CAD0 800416D0 3C01800A */ lui $at, %hi(D_8009A654) /* 1CAD4 800416D4 A022A654 */ sb $v0, %lo(D_8009A654)($at) /* 1CAD8 800416D8 2402000A */ addiu $v0, $zero, 0xA /* 1CADC 800416DC AEA2009C */ sw $v0, 0x9C($s5) /* 1CAE0 800416E0 24020001 */ addiu $v0, $zero, 0x1 /* 1CAE4 800416E4 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1CAE8 800416E8 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at) .L800416EC: /* 1CAEC 800416EC 8EA30090 */ lw $v1, 0x90($s5) /* 1CAF0 800416F0 240200FF */ addiu $v0, $zero, 0xFF /* 1CAF4 800416F4 14620090 */ bne $v1, $v0, .L80041938 /* 1CAF8 800416F8 00000000 */ nop /* 1CAFC 800416FC 8EA2009C */ lw $v0, 0x9C($s5) /* 1CB00 80041700 14400052 */ bnez $v0, .L8004184C /* 1CB04 80041704 2442FFFF */ addiu $v0, $v0, -0x1 /* 1CB08 80041708 8EB40088 */ lw $s4, 0x88($s5) /* 1CB0C 8004170C 8E820000 */ lw $v0, 0x0($s4) /* 1CB10 80041710 18400019 */ blez $v0, .L80041778 /* 1CB14 80041714 0000982D */ daddu $s3, $zero, $zero /* 1CB18 80041718 0280882D */ daddu $s1, $s4, $zero .L8004171C: /* 1CB1C 8004171C 8E300004 */ lw $s0, 0x4($s1) /* 1CB20 80041720 12000010 */ beqz $s0, .L80041764 /* 1CB24 80041724 00000000 */ nop /* 1CB28 80041728 8E030000 */ lw $v1, 0x0($s0) /* 1CB2C 8004172C 30620008 */ andi $v0, $v1, 0x8 /* 1CB30 80041730 10400004 */ beqz $v0, .L80041744 /* 1CB34 80041734 30620020 */ andi $v0, $v1, 0x20 /* 1CB38 80041738 8EA2008C */ lw $v0, 0x8C($s5) /* 1CB3C 8004173C 16020009 */ bne $s0, $v0, .L80041764 /* 1CB40 80041740 30620020 */ andi $v0, $v1, 0x20 .L80041744: /* 1CB44 80041744 14400007 */ bnez $v0, .L80041764 /* 1CB48 80041748 00000000 */ nop /* 1CB4C 8004174C 8E020040 */ lw $v0, 0x40($s0) /* 1CB50 80041750 10400004 */ beqz $v0, .L80041764 /* 1CB54 80041754 00000000 */ nop /* 1CB58 80041758 0C0B102B */ jal kill_script_by_ID /* 1CB5C 8004175C 8E040058 */ lw $a0, 0x58($s0) /* 1CB60 80041760 AE000040 */ sw $zero, 0x40($s0) .L80041764: /* 1CB64 80041764 8E820000 */ lw $v0, 0x0($s4) /* 1CB68 80041768 26730001 */ addiu $s3, $s3, 0x1 /* 1CB6C 8004176C 0262102A */ slt $v0, $s3, $v0 /* 1CB70 80041770 1440FFEA */ bnez $v0, .L8004171C /* 1CB74 80041774 26310004 */ addiu $s1, $s1, 0x4 .L80041778: /* 1CB78 80041778 0C03AD96 */ jal partner_handle_before_battle /* 1CB7C 8004177C 00000000 */ nop /* 1CB80 80041780 8EB0008C */ lw $s0, 0x8C($s5) /* 1CB84 80041784 A2A000A0 */ sb $zero, 0xA0($s5) /* 1CB88 80041788 A6A000A2 */ sh $zero, 0xA2($s5) /* 1CB8C 8004178C 920200B5 */ lbu $v0, 0xB5($s0) /* 1CB90 80041790 2404002D */ addiu $a0, $zero, 0x2D /* 1CB94 80041794 0C03A752 */ jal is_ability_active /* 1CB98 80041798 A2A20010 */ sb $v0, 0x10($s5) /* 1CB9C 8004179C 10400008 */ beqz $v0, .L800417C0 /* 1CBA0 800417A0 00000000 */ nop /* 1CBA4 800417A4 82A30005 */ lb $v1, 0x5($s5) /* 1CBA8 800417A8 24020003 */ addiu $v0, $zero, 0x3 /* 1CBAC 800417AC 14620004 */ bne $v1, $v0, .L800417C0 /* 1CBB0 800417B0 00000000 */ nop /* 1CBB4 800417B4 24020004 */ addiu $v0, $zero, 0x4 /* 1CBB8 800417B8 A2A200A0 */ sb $v0, 0xA0($s5) /* 1CBBC 800417BC A6A300A2 */ sh $v1, 0xA2($s5) .L800417C0: /* 1CBC0 800417C0 0C05271B */ jal sfx_stop_sound /* 1CBC4 800417C4 24042111 */ addiu $a0, $zero, 0x2111 /* 1CBC8 800417C8 0C05271B */ jal sfx_stop_sound /* 1CBCC 800417CC 24042112 */ addiu $a0, $zero, 0x2112 /* 1CBD0 800417D0 0C05271B */ jal sfx_stop_sound /* 1CBD4 800417D4 24042113 */ addiu $a0, $zero, 0x2113 /* 1CBD8 800417D8 0C05271B */ jal sfx_stop_sound /* 1CBDC 800417DC 24042114 */ addiu $a0, $zero, 0x2114 /* 1CBE0 800417E0 0C01CB37 */ jal set_battle_formation /* 1CBE4 800417E4 0000202D */ daddu $a0, $zero, $zero /* 1CBE8 800417E8 86840046 */ lh $a0, 0x46($s4) /* 1CBEC 800417EC 0C01CB33 */ jal set_battle_stage /* 1CBF0 800417F0 00000000 */ nop /* 1CBF4 800417F4 0C01CB24 */ jal load_battle /* 1CBF8 800417F8 86840044 */ lh $a0, 0x44($s4) /* 1CBFC 800417FC 0000202D */ daddu $a0, $zero, $zero /* 1CC00 80041800 3C05437F */ lui $a1, (0x437F0000 >> 16) /* 1CC04 80041804 24020001 */ addiu $v0, $zero, 0x1 /* 1CC08 80041808 A2A20007 */ sb $v0, 0x7($s5) /* 1CC0C 8004180C 240200FF */ addiu $v0, $zero, 0xFF /* 1CC10 80041810 A2A00008 */ sb $zero, 0x8($s5) /* 1CC14 80041814 A2A0000B */ sb $zero, 0xB($s5) /* 1CC18 80041818 A2A0000C */ sb $zero, 0xC($s5) /* 1CC1C 8004181C A6A0000E */ sh $zero, 0xE($s5) /* 1CC20 80041820 AEA00098 */ sw $zero, 0x98($s5) /* 1CC24 80041824 0C04DF62 */ jal set_screen_overlay_params_front /* 1CC28 80041828 AEA20090 */ sw $v0, 0x90($s5) /* 1CC2C 8004182C 24020005 */ addiu $v0, $zero, 0x5 /* 1CC30 80041830 3C01800A */ lui $at, %hi(gEncounterState) /* 1CC34 80041834 AC22A600 */ sw $v0, %lo(gEncounterState)($at) /* 1CC38 80041838 0801063E */ j .L800418F8 /* 1CC3C 8004183C 24020001 */ addiu $v0, $zero, 0x1 .L80041840: /* 1CC40 80041840 8EA2009C */ lw $v0, 0x9C($s5) /* 1CC44 80041844 10400003 */ beqz $v0, .L80041854 /* 1CC48 80041848 2442FFFF */ addiu $v0, $v0, -0x1 .L8004184C: /* 1CC4C 8004184C 0801064E */ j .L80041938 /* 1CC50 80041850 AEA2009C */ sw $v0, 0x9C($s5) .L80041854: /* 1CC54 80041854 8EB40088 */ lw $s4, 0x88($s5) /* 1CC58 80041858 8E820000 */ lw $v0, 0x0($s4) /* 1CC5C 8004185C 18400019 */ blez $v0, .L800418C4 /* 1CC60 80041860 0000982D */ daddu $s3, $zero, $zero /* 1CC64 80041864 0280882D */ daddu $s1, $s4, $zero .L80041868: /* 1CC68 80041868 8E300004 */ lw $s0, 0x4($s1) /* 1CC6C 8004186C 12000010 */ beqz $s0, .L800418B0 /* 1CC70 80041870 00000000 */ nop /* 1CC74 80041874 8E030000 */ lw $v1, 0x0($s0) /* 1CC78 80041878 30620008 */ andi $v0, $v1, 0x8 /* 1CC7C 8004187C 10400004 */ beqz $v0, .L80041890 /* 1CC80 80041880 30620020 */ andi $v0, $v1, 0x20 /* 1CC84 80041884 8EA2008C */ lw $v0, 0x8C($s5) /* 1CC88 80041888 16020009 */ bne $s0, $v0, .L800418B0 /* 1CC8C 8004188C 30620020 */ andi $v0, $v1, 0x20 .L80041890: /* 1CC90 80041890 14400007 */ bnez $v0, .L800418B0 /* 1CC94 80041894 00000000 */ nop /* 1CC98 80041898 8E020040 */ lw $v0, 0x40($s0) /* 1CC9C 8004189C 10400004 */ beqz $v0, .L800418B0 /* 1CCA0 800418A0 00000000 */ nop /* 1CCA4 800418A4 0C0B102B */ jal kill_script_by_ID /* 1CCA8 800418A8 8E040058 */ lw $a0, 0x58($s0) /* 1CCAC 800418AC AE000040 */ sw $zero, 0x40($s0) .L800418B0: /* 1CCB0 800418B0 8E820000 */ lw $v0, 0x0($s4) /* 1CCB4 800418B4 26730001 */ addiu $s3, $s3, 0x1 /* 1CCB8 800418B8 0262102A */ slt $v0, $s3, $v0 /* 1CCBC 800418BC 1440FFEA */ bnez $v0, .L80041868 /* 1CCC0 800418C0 26310004 */ addiu $s1, $s1, 0x4 .L800418C4: /* 1CCC4 800418C4 24020001 */ addiu $v0, $zero, 0x1 /* 1CCC8 800418C8 A2A20008 */ sb $v0, 0x8($s5) /* 1CCCC 800418CC A2A20007 */ sb $v0, 0x7($s5) /* 1CCD0 800418D0 24020005 */ addiu $v0, $zero, 0x5 /* 1CCD4 800418D4 A2A00009 */ sb $zero, 0x9($s5) /* 1CCD8 800418D8 A2A0000B */ sb $zero, 0xB($s5) /* 1CCDC 800418DC A2A0000C */ sb $zero, 0xC($s5) /* 1CCE0 800418E0 3C01800A */ lui $at, %hi(gEncounterState) /* 1CCE4 800418E4 AC22A600 */ sw $v0, %lo(gEncounterState)($at) /* 1CCE8 800418E8 24020001 */ addiu $v0, $zero, 0x1 /* 1CCEC 800418EC A6A0000E */ sh $zero, 0xE($s5) /* 1CCF0 800418F0 AEA00098 */ sw $zero, 0x98($s5) /* 1CCF4 800418F4 AEA00090 */ sw $zero, 0x90($s5) .L800418F8: /* 1CCF8 800418F8 3C01800A */ lui $at, %hi(D_8009A678) /* 1CCFC 800418FC AC22A678 */ sw $v0, %lo(D_8009A678)($at) /* 1CD00 80041900 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1CD04 80041904 AC20A5D0 */ sw $zero, %lo(gEncounterSubState)($at) /* 1CD08 80041908 0801064E */ j .L80041938 /* 1CD0C 8004190C 00000000 */ nop .L80041910: /* 1CD10 80041910 A2A20009 */ sb $v0, 0x9($s5) /* 1CD14 80041914 24020005 */ addiu $v0, $zero, 0x5 /* 1CD18 80041918 A2A50008 */ sb $a1, 0x8($s5) /* 1CD1C 8004191C AEA00090 */ sw $zero, 0x90($s5) /* 1CD20 80041920 AEA00098 */ sw $zero, 0x98($s5) /* 1CD24 80041924 3C01800A */ lui $at, %hi(gEncounterState) /* 1CD28 80041928 AC22A600 */ sw $v0, %lo(gEncounterState)($at) /* 1CD2C 8004192C 3C01800A */ lui $at, %hi(D_8009A678) /* 1CD30 80041930 AC25A678 */ sw $a1, %lo(D_8009A678)($at) /* 1CD34 80041934 AC800000 */ sw $zero, 0x0($a0) .L80041938: /* 1CD38 80041938 8FBF0030 */ lw $ra, 0x30($sp) /* 1CD3C 8004193C 8FB7002C */ lw $s7, 0x2C($sp) /* 1CD40 80041940 8FB60028 */ lw $s6, 0x28($sp) /* 1CD44 80041944 8FB50024 */ lw $s5, 0x24($sp) /* 1CD48 80041948 8FB40020 */ lw $s4, 0x20($sp) /* 1CD4C 8004194C 8FB3001C */ lw $s3, 0x1C($sp) /* 1CD50 80041950 8FB20018 */ lw $s2, 0x18($sp) /* 1CD54 80041954 8FB10014 */ lw $s1, 0x14($sp) /* 1CD58 80041958 8FB00010 */ lw $s0, 0x10($sp) /* 1CD5C 8004195C 03E00008 */ jr $ra /* 1CD60 80041960 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void update_encounters_pre_battle(void) { EncounterStatus* currentEncounter = &gCurrentEncounter; PlayerData* playerData = &gPlayerData; Encounter* encounter; Enemy* enemy; s32 i; s32 j; switch (gEncounterSubState) { case ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT: currentEncounter->fadeOutAmount = 0; currentEncounter->unk_94 = 1; currentEncounter->fadeOutAccel = 1; currentEncounter->unk_08 = -1; D_8009A654 = FALSE; D_80077C40 = 0; suspend_all_group(EVT_GROUP_10); for (i = 0; i < currentEncounter->numEncounters; i++) { encounter = currentEncounter->encounterList[i]; if (encounter != NULL) { for (j = 0; j < encounter->count; j++) { enemy = encounter->enemy[j]; if (enemy != NULL && !(enemy->flags & ENEMY_FLAG_DISABLE_AI)) { if (enemy->aiScript != NULL) { suspend_all_script(enemy->aiScriptID); } if (enemy->auxScript != NULL) { suspend_all_script(enemy->auxScriptID); } } } } } enemy = currentEncounter->currentEnemy; if ((enemy->flags & ENEMY_FLAG_100000) && !currentEncounter->scriptedBattle) { currentEncounter->unk_94 = 0; currentEncounter->battleStartCountdown = 0; partner_handle_before_battle(); gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_3; return; } if (gGameStatusPtr->debugEnemyContact == DEBUG_CONTACT_DIE_ON_TOUCH) { currentEncounter->unk_94 = 0; currentEncounter->battleStartCountdown = 10; partner_handle_before_battle(); gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_AUTO_WIN; return; } enemy = currentEncounter->currentEnemy; if (currentEncounter->hitType != ENCOUNTER_TRIGGER_NONE && currentEncounter->hitType != ENCOUNTER_TRIGGER_SPIN && is_ability_active(ABILITY_FIRST_ATTACK) && (playerData->level >= enemy->npcSettings->level) && !(enemy->flags & ENEMY_FLAG_PROJECTILE) && !currentEncounter->scriptedBattle ) { currentEncounter->unk_94 = 0; currentEncounter->battleStartCountdown = 10; D_80077C40 = 1; gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_AUTO_WIN; return; } enemy = currentEncounter->currentEnemy; if (( (is_ability_active(ABILITY_BUMP_ATTACK)) && (playerData->level >= enemy->npcSettings->level) && (!(enemy->flags & ENEMY_FLAG_PROJECTILE) && !(currentEncounter->scriptedBattle)) ) || ( (enemy = currentEncounter->currentEnemy, (currentEncounter->hitType == ENCOUNTER_TRIGGER_SPIN)) && (is_ability_active(ABILITY_SPIN_ATTACK)) && playerData->level >= enemy->npcSettings->level && !(enemy->flags & ENEMY_FLAG_PROJECTILE) && !currentEncounter->scriptedBattle )) { currentEncounter->battleStartCountdown = 10; D_80077C40 = 1; currentEncounter->unk_94 = 0; gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_AUTO_WIN; return; } if (currentEncounter->songID < 0) { switch (currentEncounter->firstStrikeType) { case 0: bgm_set_battle_song(SONG_NORMAL_BATTLE, FIRST_STRIKE_NONE); break; case 1: bgm_set_battle_song(SONG_NORMAL_BATTLE, FIRST_STRIKE_PLAYER); break; case 2: bgm_set_battle_song(SONG_NORMAL_BATTLE, FIRST_STRIKE_ENEMY); break; } } else { bgm_set_battle_song(currentEncounter->songID, FIRST_STRIKE_NONE); } bgm_push_battle_song(); D_8009A654 = TRUE; currentEncounter->battleStartCountdown = 10; gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_LOAD_BATTLE; case ENCOUNTER_SUBSTATE_PRE_BATTLE_LOAD_BATTLE: if (currentEncounter->fadeOutAmount == 255) { if (currentEncounter->battleStartCountdown != 0) { currentEncounter->battleStartCountdown--; break; } encounter = currentEncounter->currentEncounter; for (i = 0; i < encounter->count; i++) { enemy = encounter->enemy[i]; if (enemy != NULL && ((!(enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) || enemy == currentEncounter->currentEnemy)) && !(enemy->flags & ENEMY_FLAG_DISABLE_AI) && enemy->hitScript != NULL) { kill_script_by_ID(enemy->hitScriptID); enemy->hitScript = NULL; } } partner_handle_before_battle(); currentEncounter->dizzyAttackStatus = 0; currentEncounter->dizzyAttackDuration = 0; enemy = currentEncounter->currentEnemy; currentEncounter->instigatorValue = enemy->instigatorValue; if (is_ability_active(ABILITY_DIZZY_ATTACK) && currentEncounter->hitType == ENCOUNTER_TRIGGER_SPIN) { currentEncounter->dizzyAttackStatus = 4; currentEncounter->dizzyAttackDuration = 3; } sfx_stop_sound(SOUND_2111); sfx_stop_sound(SOUND_2112); sfx_stop_sound(SOUND_2113); sfx_stop_sound(SOUND_2114); set_battle_formation(NULL); set_battle_stage(encounter->stage); load_battle(encounter->battle); currentEncounter->unk_07 = 1; currentEncounter->unk_08 = 0; currentEncounter->hasMerleeCoinBonus = FALSE; currentEncounter->damageTaken = 0; currentEncounter->coinsEarned = 0; currentEncounter->fadeOutAccel = 0; currentEncounter->fadeOutAmount = 255; set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, 255.0f); gEncounterState = ENCOUNTER_STATE_POST_BATTLE; D_8009A678 = 1; gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_INIT; } break; case ENCOUNTER_SUBSTATE_PRE_BATTLE_AUTO_WIN: if (currentEncounter->battleStartCountdown != 0) { currentEncounter->battleStartCountdown--; break; } encounter = currentEncounter->currentEncounter; for (i = 0; i < encounter->count; i++) { enemy = encounter->enemy[i]; if (enemy != NULL && (!(enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) || enemy == currentEncounter->currentEnemy) && !(enemy->flags & ENEMY_FLAG_DISABLE_AI) && (enemy->hitScript != 0)) { kill_script_by_ID(enemy->hitScriptID); enemy->hitScript = NULL; } } currentEncounter->unk_08 = 1; currentEncounter->unk_07 = 1; currentEncounter->battleOutcome = OUTCOME_PLAYER_WON; currentEncounter->hasMerleeCoinBonus = FALSE; currentEncounter->damageTaken = 0; gEncounterState = ENCOUNTER_STATE_POST_BATTLE; currentEncounter->coinsEarned = 0; currentEncounter->fadeOutAccel = 0; currentEncounter->fadeOutAmount = 0; D_8009A678 = 1; gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_INIT; break; case ENCOUNTER_SUBSTATE_PRE_BATTLE_3: currentEncounter->battleOutcome = OUTCOME_4; currentEncounter->unk_08 = 1; currentEncounter->fadeOutAmount = 0; currentEncounter->fadeOutAccel = 0; gEncounterState = ENCOUNTER_STATE_POST_BATTLE; D_8009A678 = 1; gEncounterSubState = ENCOUNTER_SUBSTATE_POST_BATTLE_INIT; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel ring_blast_appendGfx /* 356B98 E0048218 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 356B9C E004821C 0080302D */ daddu $a2, $a0, $zero /* 356BA0 E0048220 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 356BA4 E0048224 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 356BA8 E0048228 27A40020 */ addiu $a0, $sp, 0x20 /* 356BAC E004822C AFB500BC */ sw $s5, 0xBC($sp) /* 356BB0 E0048230 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 356BB4 E0048234 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 356BB8 E0048238 AFB300B4 */ sw $s3, 0xB4($sp) /* 356BBC E004823C 3C130001 */ lui $s3, (0x11630 >> 16) /* 356BC0 E0048240 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 356BC4 E0048244 AFBF00CC */ sw $ra, 0xCC($sp) /* 356BC8 E0048248 AFBE00C8 */ sw $fp, 0xC8($sp) /* 356BCC E004824C AFB700C4 */ sw $s7, 0xC4($sp) /* 356BD0 E0048250 AFB600C0 */ sw $s6, 0xC0($sp) /* 356BD4 E0048254 AFB400B8 */ sw $s4, 0xB8($sp) /* 356BD8 E0048258 AFB200B0 */ sw $s2, 0xB0($sp) /* 356BDC E004825C AFB100AC */ sw $s1, 0xAC($sp) /* 356BE0 E0048260 AFB000A8 */ sw $s0, 0xA8($sp) /* 356BE4 E0048264 F7B600D8 */ sdc1 $f22, 0xD8($sp) /* 356BE8 E0048268 F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 356BEC E004826C 8EA80000 */ lw $t0, 0x0($s5) /* 356BF0 E0048270 8CD4000C */ lw $s4, 0xC($a2) /* 356BF4 E0048274 4480A000 */ mtc1 $zero, $f20 /* 356BF8 E0048278 3C014380 */ lui $at, (0x43800000 >> 16) /* 356BFC E004827C 44812000 */ mtc1 $at, $f4 /* 356C00 E0048280 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 356C04 E0048284 4481B000 */ mtc1 $at, $f22 /* 356C08 E0048288 0100182D */ daddu $v1, $t0, $zero /* 356C0C E004828C 96920000 */ lhu $s2, 0x0($s4) /* 356C10 E0048290 4405A000 */ mfc1 $a1, $f20 /* 356C14 E0048294 C6860020 */ lwc1 $f6, 0x20($s4) /* 356C18 E0048298 00121080 */ sll $v0, $s2, 2 /* 356C1C E004829C 3C0AE005 */ lui $t2, (0xE0050000 >> 16) /* 356C20 E00482A0 01425021 */ addu $t2, $t2, $v0 /* 356C24 E00482A4 8D4A8A00 */ lw $t2, -0x7600($t2) /* 356C28 E00482A8 25080008 */ addiu $t0, $t0, 0x8 /* 356C2C E00482AC AFAA00A0 */ sw $t2, 0xA0($sp) /* 356C30 E00482B0 3C09E005 */ lui $t1, (0xE0050000 >> 16) /* 356C34 E00482B4 01224821 */ addu $t1, $t1, $v0 /* 356C38 E00482B8 8D298A08 */ lw $t1, -0x75F8($t1) /* 356C3C E00482BC 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 356C40 E00482C0 4600328D */ trunc.w.s $f10, $f6 /* 356C44 E00482C4 44165000 */ mfc1 $s6, $f10 /* 356C48 E00482C8 00000000 */ nop /* 356C4C E00482CC 44961000 */ mtc1 $s6, $f2 /* 356C50 E00482D0 00000000 */ nop /* 356C54 E00482D4 468010A0 */ cvt.s.w $f2, $f2 /* 356C58 E00482D8 46023181 */ sub.s $f6, $f6, $f2 /* 356C5C E00482DC AC620000 */ sw $v0, 0x0($v1) /* 356C60 E00482E0 AC600004 */ sw $zero, 0x4($v1) /* 356C64 E00482E4 AD070000 */ sw $a3, 0x0($t0) /* 356C68 E00482E8 8CC20010 */ lw $v0, 0x10($a2) /* 356C6C E00482EC 4407A000 */ mfc1 $a3, $f20 /* 356C70 E00482F0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 356C74 E00482F4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 356C78 E00482F8 8C46001C */ lw $a2, 0x1C($v0) /* 356C7C E00482FC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 356C80 E0048300 AD020008 */ sw $v0, 0x8($t0) /* 356C84 E0048304 3C028000 */ lui $v0, (0x80000000 >> 16) /* 356C88 E0048308 AD09000C */ sw $t1, 0xC($t0) /* 356C8C E004830C 00C23021 */ addu $a2, $a2, $v0 /* 356C90 E0048310 00031080 */ sll $v0, $v1, 2 /* 356C94 E0048314 00431021 */ addu $v0, $v0, $v1 /* 356C98 E0048318 00021080 */ sll $v0, $v0, 2 /* 356C9C E004831C 00431023 */ subu $v0, $v0, $v1 /* 356CA0 E0048320 000218C0 */ sll $v1, $v0, 3 /* 356CA4 E0048324 00431021 */ addu $v0, $v0, $v1 /* 356CA8 E0048328 000210C0 */ sll $v0, $v0, 3 /* 356CAC E004832C AD060004 */ sw $a2, 0x4($t0) /* 356CB0 E0048330 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 356CB4 E0048334 00220821 */ addu $at, $at, $v0 /* 356CB8 E0048338 C4281DEC */ lwc1 $f8, %lo(gCameras + 0x6C)($at) /* 356CBC E004833C C6800010 */ lwc1 $f0, 0x10($s4) /* 356CC0 E0048340 25020008 */ addiu $v0, $t0, 0x8 /* 356CC4 E0048344 AEA80000 */ sw $t0, 0x0($s5) /* 356CC8 E0048348 25080010 */ addiu $t0, $t0, 0x10 /* 356CCC E004834C 46004207 */ neg.s $f8, $f8 /* 356CD0 E0048350 E7A00010 */ swc1 $f0, 0x10($sp) /* 356CD4 E0048354 C6800004 */ lwc1 $f0, 0x4($s4) /* 356CD8 E0048358 44064000 */ mfc1 $a2, $f8 /* 356CDC E004835C 46043182 */ mul.s $f6, $f6, $f4 /* 356CE0 E0048360 00000000 */ nop /* 356CE4 E0048364 AEA20000 */ sw $v0, 0x0($s5) /* 356CE8 E0048368 3AC20007 */ xori $v0, $s6, 0x7 /* 356CEC E004836C E7A00014 */ swc1 $f0, 0x14($sp) /* 356CF0 E0048370 C6800008 */ lwc1 $f0, 0x8($s4) /* 356CF4 E0048374 2C5E0001 */ sltiu $fp, $v0, 0x1 /* 356CF8 E0048378 AEA80000 */ sw $t0, 0x0($s5) /* 356CFC E004837C E7A00018 */ swc1 $f0, 0x18($sp) /* 356D00 E0048380 C680000C */ lwc1 $f0, 0xC($s4) /* 356D04 E0048384 4600328D */ trunc.w.s $f10, $f6 /* 356D08 E0048388 44175000 */ mfc1 $s7, $f10 /* 356D0C E004838C 0C080180 */ jal shim_guPositionF /* 356D10 E0048390 E7A0001C */ swc1 $f0, 0x1C($sp) /* 356D14 E0048394 27B00060 */ addiu $s0, $sp, 0x60 /* 356D18 E0048398 E7B60010 */ swc1 $f22, 0x10($sp) /* 356D1C E004839C 8E850024 */ lw $a1, 0x24($s4) /* 356D20 E00483A0 4406A000 */ mfc1 $a2, $f20 /* 356D24 E00483A4 4407A000 */ mfc1 $a3, $f20 /* 356D28 E00483A8 0C080104 */ jal shim_guRotateF /* 356D2C E00483AC 0200202D */ daddu $a0, $s0, $zero /* 356D30 E00483B0 0200202D */ daddu $a0, $s0, $zero /* 356D34 E00483B4 27A50020 */ addiu $a1, $sp, 0x20 /* 356D38 E00483B8 0C080114 */ jal shim_guMtxCatF /* 356D3C E00483BC 00A0302D */ daddu $a2, $a1, $zero /* 356D40 E00483C0 27A40020 */ addiu $a0, $sp, 0x20 /* 356D44 E00483C4 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 356D48 E00483C8 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 356D4C E00483CC 3C11800A */ lui $s1, %hi(gDisplayContext) /* 356D50 E00483D0 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 356D54 E00483D4 96050000 */ lhu $a1, 0x0($s0) /* 356D58 E00483D8 8E220000 */ lw $v0, 0x0($s1) /* 356D5C E00483DC 00052980 */ sll $a1, $a1, 6 /* 356D60 E00483E0 00B32821 */ addu $a1, $a1, $s3 /* 356D64 E00483E4 0C080118 */ jal shim_guMtxF2L /* 356D68 E00483E8 00452821 */ addu $a1, $v0, $a1 /* 356D6C E00483EC 8EA60000 */ lw $a2, 0x0($s5) /* 356D70 E00483F0 00C0202D */ daddu $a0, $a2, $zero /* 356D74 E00483F4 24C60008 */ addiu $a2, $a2, 0x8 /* 356D78 E00483F8 AEA60000 */ sw $a2, 0x0($s5) /* 356D7C E00483FC 96020000 */ lhu $v0, 0x0($s0) /* 356D80 E0048400 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 356D84 E0048404 AC830000 */ sw $v1, 0x0($a0) /* 356D88 E0048408 24430001 */ addiu $v1, $v0, 0x1 /* 356D8C E004840C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 356D90 E0048410 00021180 */ sll $v0, $v0, 6 /* 356D94 E0048414 A6030000 */ sh $v1, 0x0($s0) /* 356D98 E0048418 8E230000 */ lw $v1, 0x0($s1) /* 356D9C E004841C 00531021 */ addu $v0, $v0, $s3 /* 356DA0 E0048420 00621821 */ addu $v1, $v1, $v0 /* 356DA4 E0048424 1640010F */ bnez $s2, .LE0048864 /* 356DA8 E0048428 AC830004 */ sw $v1, 0x4($a0) /* 356DAC E004842C C6800020 */ lwc1 $f0, 0x20($s4) /* 356DB0 E0048430 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 356DB4 E0048434 44811000 */ mtc1 $at, $f2 /* 356DB8 E0048438 00000000 */ nop /* 356DBC E004843C 4600103C */ c.lt.s $f2, $f0 /* 356DC0 E0048440 00000000 */ nop /* 356DC4 E0048444 45000007 */ bc1f .LE0048464 /* 356DC8 E0048448 4600B106 */ mov.s $f4, $f22 /* 356DCC E004844C 46020001 */ sub.s $f0, $f0, $f2 /* 356DD0 E0048450 46002101 */ sub.s $f4, $f4, $f0 /* 356DD4 E0048454 4614203C */ c.lt.s $f4, $f20 /* 356DD8 E0048458 00000000 */ nop /* 356DDC E004845C 45030001 */ bc1tl .LE0048464 /* 356DE0 E0048460 4600A106 */ mov.s $f4, $f20 .LE0048464: /* 356DE4 E0048464 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 356DE8 E0048468 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 356DEC E004846C 8C620000 */ lw $v0, 0x0($v1) /* 356DF0 E0048470 3C01437F */ lui $at, (0x437F0000 >> 16) /* 356DF4 E0048474 44810000 */ mtc1 $at, $f0 /* 356DF8 E0048478 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 356DFC E004847C 44811000 */ mtc1 $at, $f2 /* 356E00 E0048480 0040202D */ daddu $a0, $v0, $zero /* 356E04 E0048484 24420008 */ addiu $v0, $v0, 0x8 /* 356E08 E0048488 46002002 */ mul.s $f0, $f4, $f0 /* 356E0C E004848C 00000000 */ nop /* 356E10 E0048490 AC620000 */ sw $v0, 0x0($v1) /* 356E14 E0048494 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 356E18 E0048498 AC820000 */ sw $v0, 0x0($a0) /* 356E1C E004849C 4600103E */ c.le.s $f2, $f0 /* 356E20 E00484A0 00000000 */ nop /* 356E24 E00484A4 45010005 */ bc1t .LE00484BC /* 356E28 E00484A8 24840004 */ addiu $a0, $a0, 0x4 /* 356E2C E00484AC 4600028D */ trunc.w.s $f10, $f0 /* 356E30 E00484B0 44035000 */ mfc1 $v1, $f10 /* 356E34 E00484B4 08012135 */ j .LE00484D4 /* 356E38 E00484B8 00000000 */ nop .LE00484BC: /* 356E3C E00484BC 46020001 */ sub.s $f0, $f0, $f2 /* 356E40 E00484C0 3C028000 */ lui $v0, (0x80000000 >> 16) /* 356E44 E00484C4 4600028D */ trunc.w.s $f10, $f0 /* 356E48 E00484C8 44035000 */ mfc1 $v1, $f10 /* 356E4C E00484CC 00000000 */ nop /* 356E50 E00484D0 00621825 */ or $v1, $v1, $v0 .LE00484D4: /* 356E54 E00484D4 3C014190 */ lui $at, (0x41900000 >> 16) /* 356E58 E00484D8 44810000 */ mtc1 $at, $f0 /* 356E5C E00484DC 00000000 */ nop /* 356E60 E00484E0 46002002 */ mul.s $f0, $f4, $f0 /* 356E64 E00484E4 00000000 */ nop /* 356E68 E00484E8 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 356E6C E00484EC 44811000 */ mtc1 $at, $f2 /* 356E70 E00484F0 00000000 */ nop /* 356E74 E00484F4 4600103E */ c.le.s $f2, $f0 /* 356E78 E00484F8 00000000 */ nop /* 356E7C E00484FC 45010005 */ bc1t .LE0048514 /* 356E80 E0048500 00032E00 */ sll $a1, $v1, 24 /* 356E84 E0048504 4600028D */ trunc.w.s $f10, $f0 /* 356E88 E0048508 44035000 */ mfc1 $v1, $f10 /* 356E8C E004850C 0801214B */ j .LE004852C /* 356E90 E0048510 00000000 */ nop .LE0048514: /* 356E94 E0048514 46020001 */ sub.s $f0, $f0, $f2 /* 356E98 E0048518 3C028000 */ lui $v0, (0x80000000 >> 16) /* 356E9C E004851C 4600028D */ trunc.w.s $f10, $f0 /* 356EA0 E0048520 44035000 */ mfc1 $v1, $f10 /* 356EA4 E0048524 00000000 */ nop /* 356EA8 E0048528 00621825 */ or $v1, $v1, $v0 .LE004852C: /* 356EAC E004852C 3C01426C */ lui $at, (0x426C0000 >> 16) /* 356EB0 E0048530 44810000 */ mtc1 $at, $f0 /* 356EB4 E0048534 00000000 */ nop /* 356EB8 E0048538 46002002 */ mul.s $f0, $f4, $f0 /* 356EBC E004853C 00000000 */ nop /* 356EC0 E0048540 306200FF */ andi $v0, $v1, 0xFF /* 356EC4 E0048544 00021400 */ sll $v0, $v0, 16 /* 356EC8 E0048548 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 356ECC E004854C 44811000 */ mtc1 $at, $f2 /* 356ED0 E0048550 00000000 */ nop /* 356ED4 E0048554 4600103E */ c.le.s $f2, $f0 /* 356ED8 E0048558 00000000 */ nop /* 356EDC E004855C 45010005 */ bc1t .LE0048574 /* 356EE0 E0048560 00A23825 */ or $a3, $a1, $v0 /* 356EE4 E0048564 4600028D */ trunc.w.s $f10, $f0 /* 356EE8 E0048568 44065000 */ mfc1 $a2, $f10 /* 356EEC E004856C 08012163 */ j .LE004858C /* 356EF0 E0048570 00000000 */ nop .LE0048574: /* 356EF4 E0048574 46020001 */ sub.s $f0, $f0, $f2 /* 356EF8 E0048578 3C028000 */ lui $v0, (0x80000000 >> 16) /* 356EFC E004857C 4600028D */ trunc.w.s $f10, $f0 /* 356F00 E0048580 44065000 */ mfc1 $a2, $f10 /* 356F04 E0048584 00000000 */ nop /* 356F08 E0048588 00C23025 */ or $a2, $a2, $v0 .LE004858C: /* 356F0C E004858C 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 356F10 E0048590 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 356F14 E0048594 30C200FF */ andi $v0, $a2, 0xFF /* 356F18 E0048598 00021200 */ sll $v0, $v0, 8 /* 356F1C E004859C 8CA30000 */ lw $v1, 0x0($a1) /* 356F20 E00485A0 00E21025 */ or $v0, $a3, $v0 /* 356F24 E00485A4 AC820000 */ sw $v0, 0x0($a0) /* 356F28 E00485A8 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 356F2C E00485AC 3C01437F */ lui $at, (0x437F0000 >> 16) /* 356F30 E00485B0 44810000 */ mtc1 $at, $f0 /* 356F34 E00485B4 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 356F38 E00485B8 44811000 */ mtc1 $at, $f2 /* 356F3C E00485BC 0060202D */ daddu $a0, $v1, $zero /* 356F40 E00485C0 46002002 */ mul.s $f0, $f4, $f0 /* 356F44 E00485C4 00000000 */ nop /* 356F48 E00485C8 24630008 */ addiu $v1, $v1, 0x8 /* 356F4C E00485CC 24870004 */ addiu $a3, $a0, 0x4 /* 356F50 E00485D0 ACA30000 */ sw $v1, 0x0($a1) /* 356F54 E00485D4 4600103E */ c.le.s $f2, $f0 /* 356F58 E00485D8 00000000 */ nop /* 356F5C E00485DC 45010005 */ bc1t .LE00485F4 /* 356F60 E00485E0 AC820000 */ sw $v0, 0x0($a0) /* 356F64 E00485E4 4600028D */ trunc.w.s $f10, $f0 /* 356F68 E00485E8 44035000 */ mfc1 $v1, $f10 /* 356F6C E00485EC 08012183 */ j .LE004860C /* 356F70 E00485F0 00000000 */ nop .LE00485F4: /* 356F74 E00485F4 46020001 */ sub.s $f0, $f0, $f2 /* 356F78 E00485F8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 356F7C E00485FC 4600028D */ trunc.w.s $f10, $f0 /* 356F80 E0048600 44035000 */ mfc1 $v1, $f10 /* 356F84 E0048604 00000000 */ nop /* 356F88 E0048608 00621825 */ or $v1, $v1, $v0 .LE004860C: /* 356F8C E004860C 3C014254 */ lui $at, (0x42540000 >> 16) /* 356F90 E0048610 44810000 */ mtc1 $at, $f0 /* 356F94 E0048614 00000000 */ nop /* 356F98 E0048618 46002002 */ mul.s $f0, $f4, $f0 /* 356F9C E004861C 00000000 */ nop /* 356FA0 E0048620 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 356FA4 E0048624 44811000 */ mtc1 $at, $f2 /* 356FA8 E0048628 00000000 */ nop /* 356FAC E004862C 4600103E */ c.le.s $f2, $f0 /* 356FB0 E0048630 00000000 */ nop /* 356FB4 E0048634 45010005 */ bc1t .LE004864C /* 356FB8 E0048638 00032600 */ sll $a0, $v1, 24 /* 356FBC E004863C 4600028D */ trunc.w.s $f10, $f0 /* 356FC0 E0048640 44035000 */ mfc1 $v1, $f10 /* 356FC4 E0048644 08012199 */ j .LE0048664 /* 356FC8 E0048648 00000000 */ nop .LE004864C: /* 356FCC E004864C 46020001 */ sub.s $f0, $f0, $f2 /* 356FD0 E0048650 3C028000 */ lui $v0, (0x80000000 >> 16) /* 356FD4 E0048654 4600028D */ trunc.w.s $f10, $f0 /* 356FD8 E0048658 44035000 */ mfc1 $v1, $f10 /* 356FDC E004865C 00000000 */ nop /* 356FE0 E0048660 00621825 */ or $v1, $v1, $v0 .LE0048664: /* 356FE4 E0048664 3C0141C0 */ lui $at, (0x41C00000 >> 16) /* 356FE8 E0048668 44810000 */ mtc1 $at, $f0 /* 356FEC E004866C 00000000 */ nop /* 356FF0 E0048670 46002002 */ mul.s $f0, $f4, $f0 /* 356FF4 E0048674 00000000 */ nop /* 356FF8 E0048678 306200FF */ andi $v0, $v1, 0xFF /* 356FFC E004867C 00021400 */ sll $v0, $v0, 16 /* 357000 E0048680 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 357004 E0048684 44811000 */ mtc1 $at, $f2 /* 357008 E0048688 00000000 */ nop /* 35700C E004868C 4600103E */ c.le.s $f2, $f0 /* 357010 E0048690 00000000 */ nop /* 357014 E0048694 45010005 */ bc1t .LE00486AC /* 357018 E0048698 00823025 */ or $a2, $a0, $v0 /* 35701C E004869C 4600028D */ trunc.w.s $f10, $f0 /* 357020 E00486A0 44035000 */ mfc1 $v1, $f10 /* 357024 E00486A4 080121B1 */ j .LE00486C4 /* 357028 E00486A8 00000000 */ nop .LE00486AC: /* 35702C E00486AC 46020001 */ sub.s $f0, $f0, $f2 /* 357030 E00486B0 3C028000 */ lui $v0, (0x80000000 >> 16) /* 357034 E00486B4 4600028D */ trunc.w.s $f10, $f0 /* 357038 E00486B8 44035000 */ mfc1 $v1, $f10 /* 35703C E00486BC 00000000 */ nop /* 357040 E00486C0 00621825 */ or $v1, $v1, $v0 .LE00486C4: /* 357044 E00486C4 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 357048 E00486C8 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 35704C E00486CC 306200FF */ andi $v0, $v1, 0xFF /* 357050 E00486D0 00021200 */ sll $v0, $v0, 8 /* 357054 E00486D4 00C21025 */ or $v0, $a2, $v0 /* 357058 E00486D8 32E300FF */ andi $v1, $s7, 0xFF /* 35705C E00486DC 8CA40000 */ lw $a0, 0x0($a1) /* 357060 E00486E0 00431025 */ or $v0, $v0, $v1 /* 357064 E00486E4 ACE20000 */ sw $v0, 0x0($a3) /* 357068 E00486E8 3C02EB00 */ lui $v0, (0xEB000000 >> 16) /* 35706C E00486EC 3C014353 */ lui $at, (0x43530000 >> 16) /* 357070 E00486F0 44810000 */ mtc1 $at, $f0 /* 357074 E00486F4 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 357078 E00486F8 44811000 */ mtc1 $at, $f2 /* 35707C E00486FC 0080182D */ daddu $v1, $a0, $zero /* 357080 E0048700 46002002 */ mul.s $f0, $f4, $f0 /* 357084 E0048704 00000000 */ nop /* 357088 E0048708 24840008 */ addiu $a0, $a0, 0x8 /* 35708C E004870C 24660004 */ addiu $a2, $v1, 0x4 /* 357090 E0048710 ACA40000 */ sw $a0, 0x0($a1) /* 357094 E0048714 4600103E */ c.le.s $f2, $f0 /* 357098 E0048718 00000000 */ nop /* 35709C E004871C 45010005 */ bc1t .LE0048734 /* 3570A0 E0048720 AC620000 */ sw $v0, 0x0($v1) /* 3570A4 E0048724 4600028D */ trunc.w.s $f10, $f0 /* 3570A8 E0048728 44055000 */ mfc1 $a1, $f10 /* 3570AC E004872C 080121D3 */ j .LE004874C /* 3570B0 E0048730 00000000 */ nop .LE0048734: /* 3570B4 E0048734 46020001 */ sub.s $f0, $f0, $f2 /* 3570B8 E0048738 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3570BC E004873C 4600028D */ trunc.w.s $f10, $f0 /* 3570C0 E0048740 44055000 */ mfc1 $a1, $f10 /* 3570C4 E0048744 00000000 */ nop /* 3570C8 E0048748 00A22825 */ or $a1, $a1, $v0 .LE004874C: /* 3570CC E004874C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3570D0 E0048750 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3570D4 E0048754 30A200FF */ andi $v0, $a1, 0xFF /* 3570D8 E0048758 8C830000 */ lw $v1, 0x0($a0) /* 3570DC E004875C 00021200 */ sll $v0, $v0, 8 /* 3570E0 E0048760 ACC20000 */ sw $v0, 0x0($a2) /* 3570E4 E0048764 3C02EA00 */ lui $v0, (0xEA000000 >> 16) /* 3570E8 E0048768 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3570EC E004876C 44810000 */ mtc1 $at, $f0 /* 3570F0 E0048770 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 3570F4 E0048774 44811000 */ mtc1 $at, $f2 /* 3570F8 E0048778 0060282D */ daddu $a1, $v1, $zero /* 3570FC E004877C 46002002 */ mul.s $f0, $f4, $f0 /* 357100 E0048780 00000000 */ nop /* 357104 E0048784 24630008 */ addiu $v1, $v1, 0x8 /* 357108 E0048788 24A90004 */ addiu $t1, $a1, 0x4 /* 35710C E004878C AC830000 */ sw $v1, 0x0($a0) /* 357110 E0048790 4600103E */ c.le.s $f2, $f0 /* 357114 E0048794 00000000 */ nop /* 357118 E0048798 45010005 */ bc1t .LE00487B0 /* 35711C E004879C ACA20000 */ sw $v0, 0x0($a1) /* 357120 E00487A0 4600028D */ trunc.w.s $f10, $f0 /* 357124 E00487A4 44035000 */ mfc1 $v1, $f10 /* 357128 E00487A8 080121F2 */ j .LE00487C8 /* 35712C E00487AC 00000000 */ nop .LE00487B0: /* 357130 E00487B0 46020001 */ sub.s $f0, $f0, $f2 /* 357134 E00487B4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 357138 E00487B8 4600028D */ trunc.w.s $f10, $f0 /* 35713C E00487BC 44035000 */ mfc1 $v1, $f10 /* 357140 E00487C0 00000000 */ nop /* 357144 E00487C4 00621825 */ or $v1, $v1, $v0 .LE00487C8: /* 357148 E00487C8 3C014358 */ lui $at, (0x43580000 >> 16) /* 35714C E00487CC 44810000 */ mtc1 $at, $f0 /* 357150 E00487D0 00000000 */ nop /* 357154 E00487D4 46002002 */ mul.s $f0, $f4, $f0 /* 357158 E00487D8 00000000 */ nop /* 35715C E00487DC 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 357160 E00487E0 44811000 */ mtc1 $at, $f2 /* 357164 E00487E4 00000000 */ nop /* 357168 E00487E8 4600103E */ c.le.s $f2, $f0 /* 35716C E00487EC 00000000 */ nop /* 357170 E00487F0 45010005 */ bc1t .LE0048808 /* 357174 E00487F4 00034600 */ sll $t0, $v1, 24 /* 357178 E00487F8 4600028D */ trunc.w.s $f10, $f0 /* 35717C E00487FC 44075000 */ mfc1 $a3, $f10 /* 357180 E0048800 08012209 */ j .LE0048824 /* 357184 E0048804 3C06FC26 */ lui $a2, (0xFC262A60 >> 16) .LE0048808: /* 357188 E0048808 46020001 */ sub.s $f0, $f0, $f2 /* 35718C E004880C 3C028000 */ lui $v0, (0x80000000 >> 16) /* 357190 E0048810 4600028D */ trunc.w.s $f10, $f0 /* 357194 E0048814 44075000 */ mfc1 $a3, $f10 /* 357198 E0048818 00000000 */ nop /* 35719C E004881C 00E23825 */ or $a3, $a3, $v0 /* 3571A0 E0048820 3C06FC26 */ lui $a2, (0xFC262A60 >> 16) .LE0048824: /* 3571A4 E0048824 34C62A60 */ ori $a2, $a2, (0xFC262A60 & 0xFFFF) /* 3571A8 E0048828 3C0516FC */ lui $a1, (0x16FC9378 >> 16) /* 3571AC E004882C 34A59378 */ ori $a1, $a1, (0x16FC9378 & 0xFFFF) /* 3571B0 E0048830 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3571B4 E0048834 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3571B8 E0048838 30E200FF */ andi $v0, $a3, 0xFF /* 3571BC E004883C 00021200 */ sll $v0, $v0, 8 /* 3571C0 E0048840 8C830000 */ lw $v1, 0x0($a0) /* 3571C4 E0048844 01021025 */ or $v0, $t0, $v0 /* 3571C8 E0048848 AD220000 */ sw $v0, 0x0($t1) /* 3571CC E004884C 0060102D */ daddu $v0, $v1, $zero /* 3571D0 E0048850 24630008 */ addiu $v1, $v1, 0x8 /* 3571D4 E0048854 AC830000 */ sw $v1, 0x0($a0) /* 3571D8 E0048858 AC460000 */ sw $a2, 0x0($v0) /* 3571DC E004885C 08012230 */ j .LE00488C0 /* 3571E0 E0048860 AC450004 */ sw $a1, 0x4($v0) .LE0048864: /* 3571E4 E0048864 3C04FC26 */ lui $a0, (0xFC262AC3 >> 16) /* 3571E8 E0048868 34842AC3 */ ori $a0, $a0, (0xFC262AC3 & 0xFFFF) /* 3571EC E004886C 3C0310FC */ lui $v1, (0x10FC9238 >> 16) /* 3571F0 E0048870 34639238 */ ori $v1, $v1, (0x10FC9238 & 0xFFFF) /* 3571F4 E0048874 3C05FFFF */ lui $a1, (0xFFFF287F >> 16) /* 3571F8 E0048878 34A5287F */ ori $a1, $a1, (0xFFFF287F & 0xFFFF) /* 3571FC E004887C 24C20008 */ addiu $v0, $a2, 0x8 /* 357200 E0048880 AEA20000 */ sw $v0, 0x0($s5) /* 357204 E0048884 24C20010 */ addiu $v0, $a2, 0x10 /* 357208 E0048888 ACC40000 */ sw $a0, 0x0($a2) /* 35720C E004888C ACC30004 */ sw $v1, 0x4($a2) /* 357210 E0048890 AEA20000 */ sw $v0, 0x0($s5) /* 357214 E0048894 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 357218 E0048898 ACC20008 */ sw $v0, 0x8($a2) /* 35721C E004889C 24C20018 */ addiu $v0, $a2, 0x18 /* 357220 E00488A0 ACC5000C */ sw $a1, 0xC($a2) /* 357224 E00488A4 AEA20000 */ sw $v0, 0x0($s5) /* 357228 E00488A8 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 35722C E00488AC ACC20010 */ sw $v0, 0x10($a2) /* 357230 E00488B0 32E200FF */ andi $v0, $s7, 0xFF /* 357234 E00488B4 24038B00 */ addiu $v1, $zero, -0x7500 /* 357238 E00488B8 00431025 */ or $v0, $v0, $v1 /* 35723C E00488BC ACC20014 */ sw $v0, 0x14($a2) .LE00488C0: /* 357240 E00488C0 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 357244 E00488C4 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 357248 E00488C8 001611C0 */ sll $v0, $s6, 7 /* 35724C E00488CC 30420FFF */ andi $v0, $v0, 0xFFF /* 357250 E00488D0 00021300 */ sll $v0, $v0, 12 /* 357254 E00488D4 3C04F200 */ lui $a0, (0xF2000080 >> 16) /* 357258 E00488D8 00441025 */ or $v0, $v0, $a0 /* 35725C E00488DC 8D050000 */ lw $a1, 0x0($t0) /* 357260 E00488E0 00163940 */ sll $a3, $s6, 5 /* 357264 E00488E4 00A0182D */ daddu $v1, $a1, $zero /* 357268 E00488E8 24A50008 */ addiu $a1, $a1, 0x8 /* 35726C E00488EC AD050000 */ sw $a1, 0x0($t0) /* 357270 E00488F0 AC620000 */ sw $v0, 0x0($v1) /* 357274 E00488F4 24E20020 */ addiu $v0, $a3, 0x20 /* 357278 E00488F8 00021080 */ sll $v0, $v0, 2 /* 35727C E00488FC 30420FFF */ andi $v0, $v0, 0xFFF /* 357280 E0048900 00023300 */ sll $a2, $v0, 12 /* 357284 E0048904 34C20080 */ ori $v0, $a2, 0x80 /* 357288 E0048908 13C0000F */ beqz $fp, .LE0048948 /* 35728C E004890C AC620004 */ sw $v0, 0x4($v1) /* 357290 E0048910 0080182D */ daddu $v1, $a0, $zero /* 357294 E0048914 34630080 */ ori $v1, $v1, (0xF2000080 & 0xFFFF) /* 357298 E0048918 3C040100 */ lui $a0, (0x1000100 >> 16) /* 35729C E004891C 34840100 */ ori $a0, $a0, (0x1000100 & 0xFFFF) /* 3572A0 E0048920 24A20008 */ addiu $v0, $a1, 0x8 /* 3572A4 E0048924 00C31825 */ or $v1, $a2, $v1 /* 3572A8 E0048928 AD020000 */ sw $v0, 0x0($t0) /* 3572AC E004892C 24E20040 */ addiu $v0, $a3, 0x40 /* 3572B0 E0048930 00021080 */ sll $v0, $v0, 2 /* 3572B4 E0048934 30420FFF */ andi $v0, $v0, 0xFFF /* 3572B8 E0048938 00021300 */ sll $v0, $v0, 12 /* 3572BC E004893C 00441025 */ or $v0, $v0, $a0 /* 3572C0 E0048940 0801225D */ j .LE0048974 /* 3572C4 E0048944 ACA30000 */ sw $v1, 0x0($a1) .LE0048948: /* 3572C8 E0048948 3C030100 */ lui $v1, (0x1000080 >> 16) /* 3572CC E004894C 34630080 */ ori $v1, $v1, (0x1000080 & 0xFFFF) /* 3572D0 E0048950 24A20008 */ addiu $v0, $a1, 0x8 /* 3572D4 E0048954 AD020000 */ sw $v0, 0x0($t0) /* 3572D8 E0048958 00C41025 */ or $v0, $a2, $a0 /* 3572DC E004895C ACA20000 */ sw $v0, 0x0($a1) /* 3572E0 E0048960 24E20040 */ addiu $v0, $a3, 0x40 /* 3572E4 E0048964 00021080 */ sll $v0, $v0, 2 /* 3572E8 E0048968 30420FFF */ andi $v0, $v0, 0xFFF /* 3572EC E004896C 00021300 */ sll $v0, $v0, 12 /* 3572F0 E0048970 00431025 */ or $v0, $v0, $v1 .LE0048974: /* 3572F4 E0048974 ACA20004 */ sw $v0, 0x4($a1) /* 3572F8 E0048978 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3572FC E004897C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 357300 E0048980 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 357304 E0048984 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 357308 E0048988 8C820000 */ lw $v0, 0x0($a0) /* 35730C E004898C 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 357310 E0048990 0040282D */ daddu $a1, $v0, $zero /* 357314 E0048994 24420008 */ addiu $v0, $v0, 0x8 /* 357318 E0048998 AC820000 */ sw $v0, 0x0($a0) /* 35731C E004899C ACA30000 */ sw $v1, 0x0($a1) /* 357320 E00489A0 8FAA00A0 */ lw $t2, 0xA0($sp) /* 357324 E00489A4 24430008 */ addiu $v1, $v0, 0x8 /* 357328 E00489A8 ACAA0004 */ sw $t2, 0x4($a1) /* 35732C E00489AC AC830000 */ sw $v1, 0x0($a0) /* 357330 E00489B0 24030040 */ addiu $v1, $zero, 0x40 /* 357334 E00489B4 AC460000 */ sw $a2, 0x0($v0) /* 357338 E00489B8 AC430004 */ sw $v1, 0x4($v0) /* 35733C E00489BC 8FBF00CC */ lw $ra, 0xCC($sp) /* 357340 E00489C0 8FBE00C8 */ lw $fp, 0xC8($sp) /* 357344 E00489C4 8FB700C4 */ lw $s7, 0xC4($sp) /* 357348 E00489C8 8FB600C0 */ lw $s6, 0xC0($sp) /* 35734C E00489CC 8FB500BC */ lw $s5, 0xBC($sp) /* 357350 E00489D0 8FB400B8 */ lw $s4, 0xB8($sp) /* 357354 E00489D4 8FB300B4 */ lw $s3, 0xB4($sp) /* 357358 E00489D8 8FB200B0 */ lw $s2, 0xB0($sp) /* 35735C E00489DC 8FB100AC */ lw $s1, 0xAC($sp) /* 357360 E00489E0 8FB000A8 */ lw $s0, 0xA8($sp) /* 357364 E00489E4 D7B600D8 */ ldc1 $f22, 0xD8($sp) /* 357368 E00489E8 D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 35736C E00489EC 03E00008 */ jr $ra /* 357370 E00489F0 27BD00E0 */ addiu $sp, $sp, 0xE0 /* 357374 E00489F4 00000000 */ nop /* 357378 E00489F8 00000000 */ nop /* 35737C E00489FC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void ring_blast_appendGfx(void* effect) { RingBlastFXData* data = ((EffectInstance*)effect)->data.ringBlast; s32 unk_00 = data->unk_00; s32 unk_20_s32 = data->unk_20; s32 envAlpha = (data->unk_20 - unk_20_s32) * 256.0f; s32 cond = (unk_20_s32 == 7); Gfx* dlist = D_E0048A00[unk_00]; Gfx* dlist2 = D_E0048A08[unk_00]; Matrix4f sp20; Matrix4f sp60; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist2); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->unk_10, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(sp60, data->unk_24, 0.0f, 0.0f, 1.0f); 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); if (unk_00 == 0) { f32 var_f4 = 1.0f; if (data->unk_20 > 5.0f) { var_f4 = 1.0f - (data->unk_20 - 5.0f); if (var_f4 < 0.0f) { var_f4 = 0.0f; } } gDPSetPrimColor(gMainGfxPos++, 0, 0, var_f4 * 255.0f, var_f4 * 18.0f, var_f4 * 59.0f, 0); gDPSetEnvColor(gMainGfxPos++, var_f4 * 255.0f, var_f4 * 53.0f, var_f4 * 24.0f, envAlpha); gDPSetKeyR(gMainGfxPos++, var_f4 * 211.0f, 0, 0); gDPSetKeyGB(gMainGfxPos++, var_f4 * 255.0f, 0, 0, var_f4 * 216.0f, 0, 0); gDPSetCombineLERP(gMainGfxPos++, TEXEL1, TEXEL0, ENV_ALPHA, TEXEL0, TEXEL1, TEXEL0, ENVIRONMENT, TEXEL0, PRIMITIVE, CENTER, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED); } else { gDPSetCombineLERP(gMainGfxPos++, TEXEL1, TEXEL0, ENV_ALPHA, TEXEL0, TEXEL1, TEXEL0, ENVIRONMENT, TEXEL0, 1, COMBINED, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 40, 127); gDPSetEnvColor(gMainGfxPos++, 255, 255, 139, envAlpha); } gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (unk_20_s32 * 32 ) * 4, 0, (unk_20_s32 * 32 + 32) * 4, 32 * 4); if (cond) { gDPSetTileSize(gMainGfxPos++, 1, (unk_20_s32 * 32 + 32) * 4, 32 * 4, (unk_20_s32 * 32 + 64) * 4, 64 * 4); } else { gDPSetTileSize(gMainGfxPos++, 1, (unk_20_s32 * 32 + 32) * 4, 0, (unk_20_s32 * 32 + 64) * 4, 32 * 4); } gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8024E40C /* 17CCEC 8024E40C 3C028028 */ lui $v0, %hi(BattleCam_IsFrozen) /* 17CCF0 8024E410 80420CE0 */ lb $v0, %lo(BattleCam_IsFrozen)($v0) /* 17CCF4 8024E414 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 17CCF8 8024E418 14400005 */ bnez $v0, .L8024E430 /* 17CCFC 8024E41C AFBF0010 */ sw $ra, 0x10($sp) /* 17CD00 8024E420 3C01802A */ lui $at, %hi(BattleCam_SetImmediately) /* 17CD04 8024E424 A020F2A4 */ sb $zero, %lo(BattleCam_SetImmediately)($at) /* 17CD08 8024E428 0C0933CD */ jal func_8024CF34 /* 17CD0C 8024E42C 00000000 */ nop .L8024E430: /* 17CD10 8024E430 8FBF0010 */ lw $ra, 0x10($sp) /* 17CD14 8024E434 03E00008 */ jr $ra D_8024E438: /* 17CD18 8024E438 27BD0018 */ addiu $sp, $sp, 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 water_block_appendGfx /* 3B626C E00B457C 27BDFEF8 */ addiu $sp, $sp, -0x108 /* 3B6270 E00B4580 0080282D */ daddu $a1, $a0, $zero /* 3B6274 E00B4584 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3B6278 E00B4588 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3B627C E00B458C 27A40020 */ addiu $a0, $sp, 0x20 /* 3B6280 E00B4590 AFB300BC */ sw $s3, 0xBC($sp) /* 3B6284 E00B4594 3C130001 */ lui $s3, (0x11630 >> 16) /* 3B6288 E00B4598 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3B628C E00B459C AFB600C8 */ sw $s6, 0xC8($sp) /* 3B6290 E00B45A0 3C16E00B */ lui $s6, %hi(D_E00B4CF0) /* 3B6294 E00B45A4 26D64CF0 */ addiu $s6, $s6, %lo(D_E00B4CF0) /* 3B6298 E00B45A8 AFB100B4 */ sw $s1, 0xB4($sp) /* 3B629C E00B45AC 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 3B62A0 E00B45B0 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 3B62A4 E00B45B4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3B62A8 E00B45B8 AFBF00D4 */ sw $ra, 0xD4($sp) /* 3B62AC E00B45BC AFBE00D0 */ sw $fp, 0xD0($sp) /* 3B62B0 E00B45C0 AFB700CC */ sw $s7, 0xCC($sp) /* 3B62B4 E00B45C4 AFB500C4 */ sw $s5, 0xC4($sp) /* 3B62B8 E00B45C8 AFB400C0 */ sw $s4, 0xC0($sp) /* 3B62BC E00B45CC AFB200B8 */ sw $s2, 0xB8($sp) /* 3B62C0 E00B45D0 AFB000B0 */ sw $s0, 0xB0($sp) /* 3B62C4 E00B45D4 F7BE0100 */ sdc1 $f30, 0x100($sp) /* 3B62C8 E00B45D8 F7BC00F8 */ sdc1 $f28, 0xF8($sp) /* 3B62CC E00B45DC F7BA00F0 */ sdc1 $f26, 0xF0($sp) /* 3B62D0 E00B45E0 F7B800E8 */ sdc1 $f24, 0xE8($sp) /* 3B62D4 E00B45E4 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 3B62D8 E00B45E8 F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 3B62DC E00B45EC 8E280000 */ lw $t0, 0x0($s1) /* 3B62E0 E00B45F0 8CAD000C */ lw $t5, 0xC($a1) /* 3B62E4 E00B45F4 0100182D */ daddu $v1, $t0, $zero /* 3B62E8 E00B45F8 AFAD00A0 */ sw $t5, 0xA0($sp) /* 3B62EC E00B45FC 8DAD0024 */ lw $t5, 0x24($t5) /* 3B62F0 E00B4600 25080008 */ addiu $t0, $t0, 0x8 /* 3B62F4 E00B4604 AFAD00A4 */ sw $t5, 0xA4($sp) /* 3B62F8 E00B4608 AC620000 */ sw $v0, 0x0($v1) /* 3B62FC E00B460C AC600004 */ sw $zero, 0x4($v1) /* 3B6300 E00B4610 AD060000 */ sw $a2, 0x0($t0) /* 3B6304 E00B4614 8CA20010 */ lw $v0, 0x10($a1) /* 3B6308 E00B4618 0000B82D */ daddu $s7, $zero, $zero /* 3B630C E00B461C AE280000 */ sw $t0, 0x0($s1) /* 3B6310 E00B4620 8C42001C */ lw $v0, 0x1C($v0) /* 3B6314 E00B4624 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3B6318 E00B4628 00431021 */ addu $v0, $v0, $v1 /* 3B631C E00B462C AD020004 */ sw $v0, 0x4($t0) /* 3B6320 E00B4630 8FAD00A0 */ lw $t5, 0xA0($sp) /* 3B6324 E00B4634 26D5000A */ addiu $s5, $s6, 0xA /* 3B6328 E00B4638 8DA50004 */ lw $a1, 0x4($t5) /* 3B632C E00B463C 8DA60008 */ lw $a2, 0x8($t5) /* 3B6330 E00B4640 8DA7000C */ lw $a3, 0xC($t5) /* 3B6334 E00B4644 25080008 */ addiu $t0, $t0, 0x8 /* 3B6338 E00B4648 0C080108 */ jal shim_guTranslateF /* 3B633C E00B464C AE280000 */ sw $t0, 0x0($s1) /* 3B6340 E00B4650 27A40020 */ addiu $a0, $sp, 0x20 /* 3B6344 E00B4654 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3B6348 E00B4658 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3B634C E00B465C 3C12800A */ lui $s2, %hi(gDisplayContext) /* 3B6350 E00B4660 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 3B6354 E00B4664 96050000 */ lhu $a1, 0x0($s0) /* 3B6358 E00B4668 8E420000 */ lw $v0, 0x0($s2) /* 3B635C E00B466C 00052980 */ sll $a1, $a1, 6 /* 3B6360 E00B4670 00B32821 */ addu $a1, $a1, $s3 /* 3B6364 E00B4674 0C080118 */ jal shim_guMtxF2L /* 3B6368 E00B4678 00452821 */ addu $a1, $v0, $a1 /* 3B636C E00B467C 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 3B6370 E00B4680 8E240000 */ lw $a0, 0x0($s1) /* 3B6374 E00B4684 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 3B6378 E00B4688 0080302D */ daddu $a2, $a0, $zero /* 3B637C E00B468C 24840008 */ addiu $a0, $a0, 0x8 /* 3B6380 E00B4690 248D0008 */ addiu $t5, $a0, 0x8 /* 3B6384 E00B4694 01A0F02D */ daddu $fp, $t5, $zero /* 3B6388 E00B4698 AFAD00A8 */ sw $t5, 0xA8($sp) /* 3B638C E00B469C 96050000 */ lhu $a1, 0x0($s0) /* 3B6390 E00B46A0 24940017 */ addiu $s4, $a0, 0x17 /* 3B6394 E00B46A4 AE240000 */ sw $a0, 0x0($s1) /* 3B6398 E00B46A8 ACC20000 */ sw $v0, 0x0($a2) /* 3B639C E00B46AC 8E430000 */ lw $v1, 0x0($s2) /* 3B63A0 E00B46B0 30A2FFFF */ andi $v0, $a1, 0xFFFF /* 3B63A4 E00B46B4 00021180 */ sll $v0, $v0, 6 /* 3B63A8 E00B46B8 00531021 */ addu $v0, $v0, $s3 /* 3B63AC E00B46BC 00621821 */ addu $v1, $v1, $v0 /* 3B63B0 E00B46C0 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3B63B4 E00B46C4 ACC30004 */ sw $v1, 0x4($a2) /* 3B63B8 E00B46C8 AC820000 */ sw $v0, 0x0($a0) /* 3B63BC E00B46CC 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 3B63C0 E00B46D0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 3B63C4 E00B46D4 24830288 */ addiu $v1, $a0, 0x288 /* 3B63C8 E00B46D8 AC830004 */ sw $v1, 0x4($a0) /* 3B63CC E00B46DC 94420134 */ lhu $v0, 0x134($v0) /* 3B63D0 E00B46E0 24A50001 */ addiu $a1, $a1, 0x1 /* 3B63D4 E00B46E4 A6050000 */ sh $a1, 0x0($s0) /* 3B63D8 E00B46E8 AE230000 */ sw $v1, 0x0($s1) /* 3B63DC E00B46EC 00028080 */ sll $s0, $v0, 2 .LE00B46F0: /* 3B63E0 E00B46F0 82C30000 */ lb $v1, 0x0($s6) /* 3B63E4 E00B46F4 4480F000 */ mtc1 $zero, $f30 /* 3B63E8 E00B46F8 00031080 */ sll $v0, $v1, 2 /* 3B63EC E00B46FC 00431021 */ addu $v0, $v0, $v1 /* 3B63F0 E00B4700 00021040 */ sll $v0, $v0, 1 /* 3B63F4 E00B4704 82A3FFF7 */ lb $v1, -0x9($s5) /* 3B63F8 E00B4708 4482E000 */ mtc1 $v0, $f28 /* 3B63FC E00B470C 00000000 */ nop /* 3B6400 E00B4710 4680E720 */ cvt.s.w $f28, $f28 /* 3B6404 E00B4714 00031080 */ sll $v0, $v1, 2 /* 3B6408 E00B4718 00431021 */ addu $v0, $v0, $v1 /* 3B640C E00B471C 00021040 */ sll $v0, $v0, 1 /* 3B6410 E00B4720 4482C000 */ mtc1 $v0, $f24 /* 3B6414 E00B4724 00000000 */ nop /* 3B6418 E00B4728 4680C620 */ cvt.s.w $f24, $f24 /* 3B641C E00B472C 82A3FFF8 */ lb $v1, -0x8($s5) /* 3B6420 E00B4730 461EC032 */ c.eq.s $f24, $f30 /* 3B6424 E00B4734 00031080 */ sll $v0, $v1, 2 /* 3B6428 E00B4738 00431021 */ addu $v0, $v0, $v1 /* 3B642C E00B473C 00021040 */ sll $v0, $v0, 1 /* 3B6430 E00B4740 4482D000 */ mtc1 $v0, $f26 /* 3B6434 E00B4744 00000000 */ nop /* 3B6438 E00B4748 4680D6A0 */ cvt.s.w $f26, $f26 /* 3B643C E00B474C 45010052 */ bc1t .LE00B4898 /* 3B6440 E00B4750 00000000 */ nop /* 3B6444 E00B4754 3C014120 */ lui $at, (0x41200000 >> 16) /* 3B6448 E00B4758 44813000 */ mtc1 $at, $f6 /* 3B644C E00B475C 00000000 */ nop /* 3B6450 E00B4760 4606C002 */ mul.s $f0, $f24, $f6 /* 3B6454 E00B4764 00000000 */ nop /* 3B6458 E00B4768 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 3B645C E00B476C 44813000 */ mtc1 $at, $f6 /* 3B6460 E00B4770 00000000 */ nop /* 3B6464 E00B4774 4606D082 */ mul.s $f2, $f26, $f6 /* 3B6468 E00B4778 00000000 */ nop /* 3B646C E00B477C 4600E000 */ add.s $f0, $f28, $f0 /* 3B6470 E00B4780 46020000 */ add.s $f0, $f0, $f2 /* 3B6474 E00B4784 4600018D */ trunc.w.s $f6, $f0 /* 3B6478 E00B4788 44053000 */ mfc1 $a1, $f6 /* 3B647C E00B478C 0C080011 */ jal func_E0200044 /* 3B6480 E00B4790 240403E8 */ addiu $a0, $zero, 0x3E8 /* 3B6484 E00B4794 02021021 */ addu $v0, $s0, $v0 /* 3B6488 E00B4798 44826000 */ mtc1 $v0, $f12 /* 3B648C E00B479C 00000000 */ nop /* 3B6490 E00B47A0 0C080140 */ jal shim_sin_deg /* 3B6494 E00B47A4 46806320 */ cvt.s.w $f12, $f12 /* 3B6498 E00B47A8 3C014120 */ lui $at, (0x41200000 >> 16) /* 3B649C E00B47AC 44813000 */ mtc1 $at, $f6 /* 3B64A0 E00B47B0 00000000 */ nop /* 3B64A4 E00B47B4 4606E102 */ mul.s $f4, $f28, $f6 /* 3B64A8 E00B47B8 00000000 */ nop /* 3B64AC E00B47BC 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 3B64B0 E00B47C0 44813000 */ mtc1 $at, $f6 /* 3B64B4 E00B47C4 00000000 */ nop /* 3B64B8 E00B47C8 4606C082 */ mul.s $f2, $f24, $f6 /* 3B64BC E00B47CC 00000000 */ nop /* 3B64C0 E00B47D0 46022100 */ add.s $f4, $f4, $f2 /* 3B64C4 E00B47D4 461A2100 */ add.s $f4, $f4, $f26 /* 3B64C8 E00B47D8 4600218D */ trunc.w.s $f6, $f4 /* 3B64CC E00B47DC 44053000 */ mfc1 $a1, $f6 /* 3B64D0 E00B47E0 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 3B64D4 E00B47E4 44813000 */ mtc1 $at, $f6 /* 3B64D8 E00B47E8 00000000 */ nop /* 3B64DC E00B47EC 46060582 */ mul.s $f22, $f0, $f6 /* 3B64E0 E00B47F0 00000000 */ nop /* 3B64E4 E00B47F4 0C080011 */ jal func_E0200044 /* 3B64E8 E00B47F8 240403E8 */ addiu $a0, $zero, 0x3E8 /* 3B64EC E00B47FC 02021021 */ addu $v0, $s0, $v0 /* 3B64F0 E00B4800 44826000 */ mtc1 $v0, $f12 /* 3B64F4 E00B4804 00000000 */ nop /* 3B64F8 E00B4808 0C080140 */ jal shim_sin_deg /* 3B64FC E00B480C 46806320 */ cvt.s.w $f12, $f12 /* 3B6500 E00B4810 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 3B6504 E00B4814 44813000 */ mtc1 $at, $f6 /* 3B6508 E00B4818 00000000 */ nop /* 3B650C E00B481C 4606E082 */ mul.s $f2, $f28, $f6 /* 3B6510 E00B4820 00000000 */ nop /* 3B6514 E00B4824 3C014120 */ lui $at, (0x41200000 >> 16) /* 3B6518 E00B4828 44813000 */ mtc1 $at, $f6 /* 3B651C E00B482C 00000000 */ nop /* 3B6520 E00B4830 4606D102 */ mul.s $f4, $f26, $f6 /* 3B6524 E00B4834 00000000 */ nop /* 3B6528 E00B4838 46181080 */ add.s $f2, $f2, $f24 /* 3B652C E00B483C 46041080 */ add.s $f2, $f2, $f4 /* 3B6530 E00B4840 4600118D */ trunc.w.s $f6, $f2 /* 3B6534 E00B4844 44053000 */ mfc1 $a1, $f6 /* 3B6538 E00B4848 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 3B653C E00B484C 44813000 */ mtc1 $at, $f6 /* 3B6540 E00B4850 00000000 */ nop /* 3B6544 E00B4854 46060502 */ mul.s $f20, $f0, $f6 /* 3B6548 E00B4858 00000000 */ nop /* 3B654C E00B485C 0C080011 */ jal func_E0200044 /* 3B6550 E00B4860 240403E8 */ addiu $a0, $zero, 0x3E8 /* 3B6554 E00B4864 02021021 */ addu $v0, $s0, $v0 /* 3B6558 E00B4868 44826000 */ mtc1 $v0, $f12 /* 3B655C E00B486C 00000000 */ nop /* 3B6560 E00B4870 0C080140 */ jal shim_sin_deg /* 3B6564 E00B4874 46806320 */ cvt.s.w $f12, $f12 /* 3B6568 E00B4878 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 3B656C E00B487C 44813000 */ mtc1 $at, $f6 /* 3B6570 E00B4880 00000000 */ nop /* 3B6574 E00B4884 46060002 */ mul.s $f0, $f0, $f6 /* 3B6578 E00B4888 00000000 */ nop /* 3B657C E00B488C 4616E700 */ add.s $f28, $f28, $f22 /* 3B6580 E00B4890 4614C600 */ add.s $f24, $f24, $f20 /* 3B6584 E00B4894 4600D680 */ add.s $f26, $f26, $f0 .LE00B4898: /* 3B6588 E00B4898 4600E18D */ trunc.w.s $f6, $f28 /* 3B658C E00B489C 44023000 */ mfc1 $v0, $f6 /* 3B6590 E00B48A0 00000000 */ nop /* 3B6594 E00B48A4 A7C20000 */ sh $v0, 0x0($fp) /* 3B6598 E00B48A8 4600C18D */ trunc.w.s $f6, $f24 /* 3B659C E00B48AC 44023000 */ mfc1 $v0, $f6 /* 3B65A0 E00B48B0 00000000 */ nop /* 3B65A4 E00B48B4 A682FFF3 */ sh $v0, -0xD($s4) /* 3B65A8 E00B48B8 4600D18D */ trunc.w.s $f6, $f26 /* 3B65AC E00B48BC 44023000 */ mfc1 $v0, $f6 /* 3B65B0 E00B48C0 00000000 */ nop /* 3B65B4 E00B48C4 A682FFF5 */ sh $v0, -0xB($s4) /* 3B65B8 E00B48C8 96A2FFFA */ lhu $v0, -0x6($s5) /* 3B65BC E00B48CC A682FFF9 */ sh $v0, -0x7($s4) /* 3B65C0 E00B48D0 96A2FFFC */ lhu $v0, -0x4($s5) /* 3B65C4 E00B48D4 26F70001 */ addiu $s7, $s7, 0x1 /* 3B65C8 E00B48D8 A682FFFB */ sh $v0, -0x5($s4) /* 3B65CC E00B48DC 92A2FFFE */ lbu $v0, -0x2($s5) /* 3B65D0 E00B48E0 26D6000C */ addiu $s6, $s6, 0xC /* 3B65D4 E00B48E4 A282FFFD */ sb $v0, -0x3($s4) /* 3B65D8 E00B48E8 92A2FFFF */ lbu $v0, -0x1($s5) /* 3B65DC E00B48EC 27DE0010 */ addiu $fp, $fp, 0x10 /* 3B65E0 E00B48F0 A282FFFE */ sb $v0, -0x2($s4) /* 3B65E4 E00B48F4 92A30000 */ lbu $v1, 0x0($s5) /* 3B65E8 E00B48F8 26B5000C */ addiu $s5, $s5, 0xC /* 3B65EC E00B48FC 24020050 */ addiu $v0, $zero, 0x50 /* 3B65F0 E00B4900 A2820000 */ sb $v0, 0x0($s4) /* 3B65F4 E00B4904 2AE20028 */ slti $v0, $s7, 0x28 /* 3B65F8 E00B4908 A283FFFF */ sb $v1, -0x1($s4) /* 3B65FC E00B490C 1440FF78 */ bnez $v0, .LE00B46F0 /* 3B6600 E00B4910 26940010 */ addiu $s4, $s4, 0x10 /* 3B6604 E00B4914 27A40020 */ addiu $a0, $sp, 0x20 /* 3B6608 E00B4918 3C100001 */ lui $s0, (0x11630 >> 16) /* 3B660C E00B491C 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 3B6610 E00B4920 0000B82D */ daddu $s7, $zero, $zero /* 3B6614 E00B4924 4600F506 */ mov.s $f20, $f30 /* 3B6618 E00B4928 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3B661C E00B492C 2442A674 */ addiu $v0, $v0, %lo(gDisplayContext) /* 3B6620 E00B4930 0040A82D */ daddu $s5, $v0, $zero /* 3B6624 E00B4934 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 3B6628 E00B4938 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos) /* 3B662C E00B493C 0040982D */ daddu $s3, $v0, $zero /* 3B6630 E00B4940 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) /* 3B6634 E00B4944 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) /* 3B6638 E00B4948 44810000 */ mtc1 $at, $f0 /* 3B663C E00B494C 3C140001 */ lui $s4, (0x11630 >> 16) /* 3B6640 E00B4950 44050000 */ mfc1 $a1, $f0 /* 3B6644 E00B4954 8FB100A0 */ lw $s1, 0xA0($sp) /* 3B6648 E00B4958 00A0302D */ daddu $a2, $a1, $zero /* 3B664C E00B495C 0C080110 */ jal shim_guScaleF /* 3B6650 E00B4960 00A0382D */ daddu $a3, $a1, $zero /* 3B6654 E00B4964 27A40020 */ addiu $a0, $sp, 0x20 /* 3B6658 E00B4968 96650000 */ lhu $a1, 0x0($s3) /* 3B665C E00B496C 8EA20000 */ lw $v0, 0x0($s5) /* 3B6660 E00B4970 00052980 */ sll $a1, $a1, 6 /* 3B6664 E00B4974 00B02821 */ addu $a1, $a1, $s0 /* 3B6668 E00B4978 0C080118 */ jal shim_guMtxF2L /* 3B666C E00B497C 00452821 */ addu $a1, $v0, $a1 /* 3B6670 E00B4980 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3B6674 E00B4984 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3B6678 E00B4988 8C440000 */ lw $a0, 0x0($v0) /* 3B667C E00B498C 0040902D */ daddu $s2, $v0, $zero /* 3B6680 E00B4990 0080282D */ daddu $a1, $a0, $zero /* 3B6684 E00B4994 24840008 */ addiu $a0, $a0, 0x8 /* 3B6688 E00B4998 AE440000 */ sw $a0, 0x0($s2) /* 3B668C E00B499C 96620000 */ lhu $v0, 0x0($s3) /* 3B6690 E00B49A0 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3B6694 E00B49A4 ACA30000 */ sw $v1, 0x0($a1) /* 3B6698 E00B49A8 24430001 */ addiu $v1, $v0, 0x1 /* 3B669C E00B49AC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B66A0 E00B49B0 00021180 */ sll $v0, $v0, 6 /* 3B66A4 E00B49B4 A6630000 */ sh $v1, 0x0($s3) /* 3B66A8 E00B49B8 8EA30000 */ lw $v1, 0x0($s5) /* 3B66AC E00B49BC 00501021 */ addu $v0, $v0, $s0 /* 3B66B0 E00B49C0 00621821 */ addu $v1, $v1, $v0 /* 3B66B4 E00B49C4 24820008 */ addiu $v0, $a0, 0x8 /* 3B66B8 E00B49C8 ACA30004 */ sw $v1, 0x4($a1) /* 3B66BC E00B49CC AE420000 */ sw $v0, 0x0($s2) /* 3B66C0 E00B49D0 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3B66C4 E00B49D4 AC820000 */ sw $v0, 0x0($a0) /* 3B66C8 E00B49D8 8FAD00A0 */ lw $t5, 0xA0($sp) /* 3B66CC E00B49DC 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 3B66D0 E00B49E0 91A3002B */ lbu $v1, 0x2B($t5) /* 3B66D4 E00B49E4 24820010 */ addiu $v0, $a0, 0x10 /* 3B66D8 E00B49E8 AE420000 */ sw $v0, 0x0($s2) /* 3B66DC E00B49EC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B66E0 E00B49F0 AC820008 */ sw $v0, 0x8($a0) /* 3B66E4 E00B49F4 8FAD00A4 */ lw $t5, 0xA4($sp) /* 3B66E8 E00B49F8 2402FF00 */ addiu $v0, $zero, -0x100 /* 3B66EC E00B49FC 01A21025 */ or $v0, $t5, $v0 /* 3B66F0 E00B4A00 AC82000C */ sw $v0, 0xC($a0) /* 3B66F4 E00B4A04 24820018 */ addiu $v0, $a0, 0x18 /* 3B66F8 E00B4A08 AE420000 */ sw $v0, 0x0($s2) /* 3B66FC E00B4A0C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B6700 E00B4A10 AC820010 */ sw $v0, 0x10($a0) /* 3B6704 E00B4A14 3C020900 */ lui $v0, %hi(D_090003B0_415410) /* 3B6708 E00B4A18 244203B0 */ addiu $v0, $v0, %lo(D_090003B0_415410) /* 3B670C E00B4A1C 3463FF00 */ ori $v1, $v1, 0xFF00 /* 3B6710 E00B4A20 AC820014 */ sw $v0, 0x14($a0) /* 3B6714 E00B4A24 AC830004 */ sw $v1, 0x4($a0) .LE00B4A28: /* 3B6718 E00B4A28 8E220088 */ lw $v0, 0x88($s1) /* 3B671C E00B4A2C 04420032 */ bltzl $v0, .LE00B4AF8 /* 3B6720 E00B4A30 26F70001 */ addiu $s7, $s7, 0x1 /* 3B6724 E00B4A34 C6200078 */ lwc1 $f0, 0x78($s1) /* 3B6728 E00B4A38 4405A000 */ mfc1 $a1, $f20 /* 3B672C E00B4A3C 4406A000 */ mfc1 $a2, $f20 /* 3B6730 E00B4A40 4407A000 */ mfc1 $a3, $f20 /* 3B6734 E00B4A44 E7A00010 */ swc1 $f0, 0x10($sp) /* 3B6738 E00B4A48 C6200038 */ lwc1 $f0, 0x38($s1) /* 3B673C E00B4A4C E7A00014 */ swc1 $f0, 0x14($sp) /* 3B6740 E00B4A50 C6200048 */ lwc1 $f0, 0x48($s1) /* 3B6744 E00B4A54 27A40020 */ addiu $a0, $sp, 0x20 /* 3B6748 E00B4A58 E7B4001C */ swc1 $f20, 0x1C($sp) /* 3B674C E00B4A5C 0C080180 */ jal shim_guPositionF /* 3B6750 E00B4A60 E7A00018 */ swc1 $f0, 0x18($sp) /* 3B6754 E00B4A64 27A40020 */ addiu $a0, $sp, 0x20 /* 3B6758 E00B4A68 96650000 */ lhu $a1, 0x0($s3) /* 3B675C E00B4A6C 8EA20000 */ lw $v0, 0x0($s5) /* 3B6760 E00B4A70 00052980 */ sll $a1, $a1, 6 /* 3B6764 E00B4A74 00B42821 */ addu $a1, $a1, $s4 /* 3B6768 E00B4A78 0C080118 */ jal shim_guMtxF2L /* 3B676C E00B4A7C 00452821 */ addu $a1, $v0, $a1 /* 3B6770 E00B4A80 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3B6774 E00B4A84 8E440000 */ lw $a0, 0x0($s2) /* 3B6778 E00B4A88 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3B677C E00B4A8C 0080282D */ daddu $a1, $a0, $zero /* 3B6780 E00B4A90 24840008 */ addiu $a0, $a0, 0x8 /* 3B6784 E00B4A94 AE440000 */ sw $a0, 0x0($s2) /* 3B6788 E00B4A98 96620000 */ lhu $v0, 0x0($s3) /* 3B678C E00B4A9C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3B6790 E00B4AA0 ACA30000 */ sw $v1, 0x0($a1) /* 3B6794 E00B4AA4 24430001 */ addiu $v1, $v0, 0x1 /* 3B6798 E00B4AA8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B679C E00B4AAC 00021180 */ sll $v0, $v0, 6 /* 3B67A0 E00B4AB0 A6630000 */ sh $v1, 0x0($s3) /* 3B67A4 E00B4AB4 8EA30000 */ lw $v1, 0x0($s5) /* 3B67A8 E00B4AB8 00541021 */ addu $v0, $v0, $s4 /* 3B67AC E00B4ABC 00621821 */ addu $v1, $v1, $v0 /* 3B67B0 E00B4AC0 24820008 */ addiu $v0, $a0, 0x8 /* 3B67B4 E00B4AC4 ACA30004 */ sw $v1, 0x4($a1) /* 3B67B8 E00B4AC8 AE420000 */ sw $v0, 0x0($s2) /* 3B67BC E00B4ACC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B67C0 E00B4AD0 AC820000 */ sw $v0, 0x0($a0) /* 3B67C4 E00B4AD4 3C020900 */ lui $v0, %hi(D_090004A0_415500) /* 3B67C8 E00B4AD8 244204A0 */ addiu $v0, $v0, %lo(D_090004A0_415500) /* 3B67CC E00B4ADC AC820004 */ sw $v0, 0x4($a0) /* 3B67D0 E00B4AE0 24820010 */ addiu $v0, $a0, 0x10 /* 3B67D4 E00B4AE4 AE420000 */ sw $v0, 0x0($s2) /* 3B67D8 E00B4AE8 24020040 */ addiu $v0, $zero, 0x40 /* 3B67DC E00B4AEC AC860008 */ sw $a2, 0x8($a0) /* 3B67E0 E00B4AF0 AC82000C */ sw $v0, 0xC($a0) /* 3B67E4 E00B4AF4 26F70001 */ addiu $s7, $s7, 0x1 .LE00B4AF8: /* 3B67E8 E00B4AF8 2AE20004 */ slti $v0, $s7, 0x4 /* 3B67EC E00B4AFC 1440FFCA */ bnez $v0, .LE00B4A28 /* 3B67F0 E00B4B00 26310004 */ addiu $s1, $s1, 0x4 /* 3B67F4 E00B4B04 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3B67F8 E00B4B08 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3B67FC E00B4B0C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B6800 E00B4B10 8C830000 */ lw $v1, 0x0($a0) /* 3B6804 E00B4B14 3C01E00B */ lui $at, (0xE00B4EF8 >> 16) /* 3B6808 E00B4B18 D4224EF8 */ ldc1 $f2, (0xE00B4EF8 & 0xFFFF)($at) /* 3B680C E00B4B1C 0060282D */ daddu $a1, $v1, $zero /* 3B6810 E00B4B20 24630008 */ addiu $v1, $v1, 0x8 /* 3B6814 E00B4B24 AC830000 */ sw $v1, 0x0($a0) /* 3B6818 E00B4B28 ACA20000 */ sw $v0, 0x0($a1) /* 3B681C E00B4B2C C7A000A4 */ lwc1 $f0, 0xA4($sp) /* 3B6820 E00B4B30 46800021 */ cvt.d.w $f0, $f0 /* 3B6824 E00B4B34 3C020900 */ lui $v0, %hi(D_09000300_415360) /* 3B6828 E00B4B38 24420300 */ addiu $v0, $v0, %lo(D_09000300_415360) /* 3B682C E00B4B3C ACA20004 */ sw $v0, 0x4($a1) /* 3B6830 E00B4B40 24620008 */ addiu $v0, $v1, 0x8 /* 3B6834 E00B4B44 AC820000 */ sw $v0, 0x0($a0) /* 3B6838 E00B4B48 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B683C E00B4B4C 246C0004 */ addiu $t4, $v1, 0x4 /* 3B6840 E00B4B50 46220002 */ mul.d $f0, $f0, $f2 /* 3B6844 E00B4B54 00000000 */ nop /* 3B6848 E00B4B58 AC620000 */ sw $v0, 0x0($v1) /* 3B684C E00B4B5C 8FAD00A0 */ lw $t5, 0xA0($sp) /* 3B6850 E00B4B60 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* 3B6854 E00B4B64 44811800 */ mtc1 $at, $f3 /* 3B6858 E00B4B68 44801000 */ mtc1 $zero, $f2 /* 3B685C E00B4B6C 91A4001B */ lbu $a0, 0x1B($t5) /* 3B6860 E00B4B70 91A3001F */ lbu $v1, 0x1F($t5) /* 3B6864 E00B4B74 91A20023 */ lbu $v0, 0x23($t5) /* 3B6868 E00B4B78 00042600 */ sll $a0, $a0, 24 /* 3B686C E00B4B7C 00031C00 */ sll $v1, $v1, 16 /* 3B6870 E00B4B80 00832025 */ or $a0, $a0, $v1 /* 3B6874 E00B4B84 00021200 */ sll $v0, $v0, 8 /* 3B6878 E00B4B88 4620103E */ c.le.d $f2, $f0 /* 3B687C E00B4B8C 00000000 */ nop /* 3B6880 E00B4B90 45010005 */ bc1t .LE00B4BA8 /* 3B6884 E00B4B94 00825825 */ or $t3, $a0, $v0 /* 3B6888 E00B4B98 4620018D */ trunc.w.d $f6, $f0 /* 3B688C E00B4B9C 440A3000 */ mfc1 $t2, $f6 /* 3B6890 E00B4BA0 0802D2F1 */ j .LE00B4BC4 /* 3B6894 E00B4BA4 3C05D9FF */ lui $a1, (0xD9FFF9FF >> 16) .LE00B4BA8: /* 3B6898 E00B4BA8 46220001 */ sub.d $f0, $f0, $f2 /* 3B689C E00B4BAC 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3B68A0 E00B4BB0 4620018D */ trunc.w.d $f6, $f0 /* 3B68A4 E00B4BB4 440A3000 */ mfc1 $t2, $f6 /* 3B68A8 E00B4BB8 00000000 */ nop /* 3B68AC E00B4BBC 01425025 */ or $t2, $t2, $v0 /* 3B68B0 E00B4BC0 3C05D9FF */ lui $a1, (0xD9FFF9FF >> 16) .LE00B4BC4: /* 3B68B4 E00B4BC4 34A5F9FF */ ori $a1, $a1, (0xD9FFF9FF & 0xFFFF) /* 3B68B8 E00B4BC8 3C06D9FF */ lui $a2, (0xD9FFFFFF >> 16) /* 3B68BC E00B4BCC 34C6FFFF */ ori $a2, $a2, (0xD9FFFFFF & 0xFFFF) /* 3B68C0 E00B4BD0 3C070101 */ lui $a3, (0x101E03C >> 16) /* 3B68C4 E00B4BD4 34E7E03C */ ori $a3, $a3, (0x101E03C & 0xFFFF) /* 3B68C8 E00B4BD8 3C090100 */ lui $t1, (0x100C018 >> 16) /* 3B68CC E00B4BDC 3529C018 */ ori $t1, $t1, (0x100C018 & 0xFFFF) /* 3B68D0 E00B4BE0 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 3B68D4 E00B4BE4 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 3B68D8 E00B4BE8 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3B68DC E00B4BEC 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3B68E0 E00B4BF0 314200FF */ andi $v0, $t2, 0xFF /* 3B68E4 E00B4BF4 8C830000 */ lw $v1, 0x0($a0) /* 3B68E8 E00B4BF8 01621025 */ or $v0, $t3, $v0 /* 3B68EC E00B4BFC AD820000 */ sw $v0, 0x0($t4) /* 3B68F0 E00B4C00 0060102D */ daddu $v0, $v1, $zero /* 3B68F4 E00B4C04 24630008 */ addiu $v1, $v1, 0x8 /* 3B68F8 E00B4C08 AC830000 */ sw $v1, 0x0($a0) /* 3B68FC E00B4C0C AC450000 */ sw $a1, 0x0($v0) /* 3B6900 E00B4C10 AC400004 */ sw $zero, 0x4($v0) /* 3B6904 E00B4C14 24620008 */ addiu $v0, $v1, 0x8 /* 3B6908 E00B4C18 AC820000 */ sw $v0, 0x0($a0) /* 3B690C E00B4C1C 24020400 */ addiu $v0, $zero, 0x400 /* 3B6910 E00B4C20 AC620004 */ sw $v0, 0x4($v1) /* 3B6914 E00B4C24 24620010 */ addiu $v0, $v1, 0x10 /* 3B6918 E00B4C28 AC660000 */ sw $a2, 0x0($v1) /* 3B691C E00B4C2C AC820000 */ sw $v0, 0x0($a0) /* 3B6920 E00B4C30 24620018 */ addiu $v0, $v1, 0x18 /* 3B6924 E00B4C34 AC670008 */ sw $a3, 0x8($v1) /* 3B6928 E00B4C38 8FAD00A8 */ lw $t5, 0xA8($sp) /* 3B692C E00B4C3C 3C05DE00 */ lui $a1, (0xDE000000 >> 16) /* 3B6930 E00B4C40 AC6D000C */ sw $t5, 0xC($v1) /* 3B6934 E00B4C44 AC820000 */ sw $v0, 0x0($a0) /* 3B6938 E00B4C48 3C020900 */ lui $v0, %hi(D_090004D8_415538) /* 3B693C E00B4C4C 244204D8 */ addiu $v0, $v0, %lo(D_090004D8_415538) /* 3B6940 E00B4C50 AC620014 */ sw $v0, 0x14($v1) /* 3B6944 E00B4C54 24620020 */ addiu $v0, $v1, 0x20 /* 3B6948 E00B4C58 AC650010 */ sw $a1, 0x10($v1) /* 3B694C E00B4C5C AC820000 */ sw $v0, 0x0($a0) /* 3B6950 E00B4C60 AC690018 */ sw $t1, 0x18($v1) /* 3B6954 E00B4C64 25A201C0 */ addiu $v0, $t5, 0x1C0 /* 3B6958 E00B4C68 AC62001C */ sw $v0, 0x1C($v1) /* 3B695C E00B4C6C 24620028 */ addiu $v0, $v1, 0x28 /* 3B6960 E00B4C70 AC820000 */ sw $v0, 0x0($a0) /* 3B6964 E00B4C74 3C020900 */ lui $v0, %hi(D_09000538_415598) /* 3B6968 E00B4C78 24420538 */ addiu $v0, $v0, %lo(D_09000538_415598) /* 3B696C E00B4C7C AC620024 */ sw $v0, 0x24($v1) /* 3B6970 E00B4C80 24620030 */ addiu $v0, $v1, 0x30 /* 3B6974 E00B4C84 AC650020 */ sw $a1, 0x20($v1) /* 3B6978 E00B4C88 24050040 */ addiu $a1, $zero, 0x40 /* 3B697C E00B4C8C AC820000 */ sw $v0, 0x0($a0) /* 3B6980 E00B4C90 24620038 */ addiu $v0, $v1, 0x38 /* 3B6984 E00B4C94 AC680028 */ sw $t0, 0x28($v1) /* 3B6988 E00B4C98 AC65002C */ sw $a1, 0x2C($v1) /* 3B698C E00B4C9C AC820000 */ sw $v0, 0x0($a0) /* 3B6990 E00B4CA0 AC680030 */ sw $t0, 0x30($v1) /* 3B6994 E00B4CA4 AC650034 */ sw $a1, 0x34($v1) /* 3B6998 E00B4CA8 8FBF00D4 */ lw $ra, 0xD4($sp) /* 3B699C E00B4CAC 8FBE00D0 */ lw $fp, 0xD0($sp) /* 3B69A0 E00B4CB0 8FB700CC */ lw $s7, 0xCC($sp) /* 3B69A4 E00B4CB4 8FB600C8 */ lw $s6, 0xC8($sp) /* 3B69A8 E00B4CB8 8FB500C4 */ lw $s5, 0xC4($sp) /* 3B69AC E00B4CBC 8FB400C0 */ lw $s4, 0xC0($sp) /* 3B69B0 E00B4CC0 8FB300BC */ lw $s3, 0xBC($sp) /* 3B69B4 E00B4CC4 8FB200B8 */ lw $s2, 0xB8($sp) /* 3B69B8 E00B4CC8 8FB100B4 */ lw $s1, 0xB4($sp) /* 3B69BC E00B4CCC 8FB000B0 */ lw $s0, 0xB0($sp) /* 3B69C0 E00B4CD0 D7BE0100 */ ldc1 $f30, 0x100($sp) /* 3B69C4 E00B4CD4 D7BC00F8 */ ldc1 $f28, 0xF8($sp) /* 3B69C8 E00B4CD8 D7BA00F0 */ ldc1 $f26, 0xF0($sp) /* 3B69CC E00B4CDC D7B800E8 */ ldc1 $f24, 0xE8($sp) /* 3B69D0 E00B4CE0 D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 3B69D4 E00B4CE4 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 3B69D8 E00B4CE8 03E00008 */ jr $ra /* 3B69DC E00B4CEC 27BD0108 */ addiu $sp, $sp, 0x108 ### DECOMPILED C INSTRUCTIONS: void water_block_appendGfx(void *effect) { Matrix4f sp20; Matrix4f sp60; WaterBlockFXData* data = ((EffectInstance*)effect)->data.waterBlock; s32 spA4 = data->unk_24; Vtx* spA8; EffectInstance* effectTemp = effect; WaterBlockVtxData* var_s6; Vtx* var_fp; s32 temp_s0; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); shim_guTranslateF(sp20, 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_LOAD | G_MTX_MODELVIEW); gSPBranchList(gMainGfxPos, &gMainGfxPos[81]); spA8 = (Vtx*)++gMainGfxPos; gMainGfxPos = &gMainGfxPos[80]; temp_s0 = gGameStatusPtr->frameCounter * 4; for (var_s6 = D_E00B4CF0, i = 0, var_fp = spA8; i < 40; i++, var_s6++, var_fp++) { f32 x = var_s6->unk_00 * 10; f32 y = var_s6->unk_01 * 10; f32 z = var_s6->unk_02 * 10; if (y != 0.0f) { f32 dx = shim_sin_deg(temp_s0 + func_E0200044(1000, (x + (y * 10.0f) + (z * 100.0f)))) * 20.0f; f32 dy = shim_sin_deg(temp_s0 + func_E0200044(1000, ((x * 10.0f) + (y * 100.0f) + z))) * 20.0f; f32 dz = shim_sin_deg(temp_s0 + func_E0200044(1000, ((x * 100.0f) + y + (z * 10.0f)))) * 20.0f; x += dx; y += dy; z += dz; } var_fp->v.ob[0] = x; var_fp->v.ob[1] = y; var_fp->v.ob[2] = z; var_fp->v.tc[0] = var_s6->unk_04; var_fp->v.tc[1] = var_s6->unk_06; var_fp->v.cn[0] = var_s6->unk_08; var_fp->v.cn[1] = var_s6->unk_09; var_fp->v.cn[2] = var_s6->unk_0A; var_fp->v.cn[3] = 80; } 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); gDPSetEnvColor(gMainGfxPos++, 0, 0, 255, data->unk_28); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, spA4); gSPDisplayList(gMainGfxPos++, D_090003B0_3B6FA0); for (i = 0; i < NUM_WATER_BLOCK_COMPONENTS; i++) { if (data->unk_88[i] >= 0) { shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, data->unk_78[i], data->unk_38[i], data->unk_48[i], 0.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090004A0_3B7090); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPDisplayList(gMainGfxPos++, D_09000300_3B6EF0); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, spA4 * 0.3); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK); gSPVertex(gMainGfxPos++, spA8, 30, 0); gSPDisplayList(gMainGfxPos++, D_090004D8_3B70C8); gSPVertex(gMainGfxPos++, &spA8[28], 12, 0); gSPDisplayList(gMainGfxPos++, D_09000538_3B7128) gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel msg_draw_speech_arrow /* C3ADC 8012D3DC 27BDFF58 */ addiu $sp, $sp, -0xA8 /* C3AE0 8012D3E0 AFB10064 */ sw $s1, 0x64($sp) /* C3AE4 8012D3E4 0080882D */ daddu $s1, $a0, $zero /* C3AE8 8012D3E8 0000282D */ daddu $a1, $zero, $zero /* C3AEC 8012D3EC AFBF0084 */ sw $ra, 0x84($sp) /* C3AF0 8012D3F0 AFBE0080 */ sw $fp, 0x80($sp) /* C3AF4 8012D3F4 AFB7007C */ sw $s7, 0x7C($sp) /* C3AF8 8012D3F8 AFB60078 */ sw $s6, 0x78($sp) /* C3AFC 8012D3FC AFB50074 */ sw $s5, 0x74($sp) /* C3B00 8012D400 AFB40070 */ sw $s4, 0x70($sp) /* C3B04 8012D404 AFB3006C */ sw $s3, 0x6C($sp) /* C3B08 8012D408 AFB20068 */ sw $s2, 0x68($sp) /* C3B0C 8012D40C AFB00060 */ sw $s0, 0x60($sp) /* C3B10 8012D410 F7BA00A0 */ sdc1 $f26, 0xA0($sp) /* C3B14 8012D414 F7B80098 */ sdc1 $f24, 0x98($sp) /* C3B18 8012D418 F7B60090 */ sdc1 $f22, 0x90($sp) /* C3B1C 8012D41C F7B40088 */ sdc1 $f20, 0x88($sp) /* C3B20 8012D420 96230456 */ lhu $v1, 0x456($s1) /* C3B24 8012D424 9622045A */ lhu $v0, 0x45A($s1) /* C3B28 8012D428 96240458 */ lhu $a0, 0x458($s1) /* C3B2C 8012D42C 00623021 */ addu $a2, $v1, $v0 /* C3B30 8012D430 9622045C */ lhu $v0, 0x45C($s1) /* C3B34 8012D434 9623050E */ lhu $v1, 0x50E($s1) /* C3B38 8012D438 106001B7 */ beqz $v1, .L8012DB18 /* C3B3C 8012D43C 00822021 */ addu $a0, $a0, $v0 /* C3B40 8012D440 92220508 */ lbu $v0, 0x508($s1) /* C3B44 8012D444 2442FFFF */ addiu $v0, $v0, -0x1 /* C3B48 8012D448 2C420003 */ sltiu $v0, $v0, 0x3 /* C3B4C 8012D44C 14400004 */ bnez $v0, .L8012D460 /* C3B50 8012D450 24020003 */ addiu $v0, $zero, 0x3 /* C3B54 8012D454 9223053C */ lbu $v1, 0x53C($s1) /* C3B58 8012D458 14620005 */ bne $v1, $v0, .L8012D470 /* C3B5C 8012D45C 00000000 */ nop .L8012D460: /* C3B60 8012D460 96220516 */ lhu $v0, 0x516($s1) /* C3B64 8012D464 00821021 */ addu $v0, $a0, $v0 /* C3B68 8012D468 0804B51F */ j .L8012D47C /* C3B6C 8012D46C 2454FFFC */ addiu $s4, $v0, -0x4 .L8012D470: /* C3B70 8012D470 96220516 */ lhu $v0, 0x516($s1) /* C3B74 8012D474 00821021 */ addu $v0, $a0, $v0 /* C3B78 8012D478 2454FFFD */ addiu $s4, $v0, -0x3 .L8012D47C: /* C3B7C 8012D47C 92230508 */ lbu $v1, 0x508($s1) /* C3B80 8012D480 24020002 */ addiu $v0, $zero, 0x2 /* C3B84 8012D484 14620003 */ bne $v1, $v0, .L8012D494 /* C3B88 8012D488 24020003 */ addiu $v0, $zero, 0x3 /* C3B8C 8012D48C 0804B52C */ j .L8012D4B0 /* C3B90 8012D490 0000282D */ daddu $a1, $zero, $zero .L8012D494: /* C3B94 8012D494 50620006 */ beql $v1, $v0, .L8012D4B0 /* C3B98 8012D498 24050001 */ addiu $a1, $zero, 0x1 /* C3B9C 8012D49C 9622050E */ lhu $v0, 0x50E($s1) /* C3BA0 8012D4A0 2C4200A0 */ sltiu $v0, $v0, 0xA0 /* C3BA4 8012D4A4 14400003 */ bnez $v0, .L8012D4B4 /* C3BA8 8012D4A8 30A200FF */ andi $v0, $a1, 0xFF /* C3BAC 8012D4AC 24050001 */ addiu $a1, $zero, 0x1 .L8012D4B0: /* C3BB0 8012D4B0 30A200FF */ andi $v0, $a1, 0xFF .L8012D4B4: /* C3BB4 8012D4B4 10400056 */ beqz $v0, .L8012D610 /* C3BB8 8012D4B8 00000000 */ nop /* C3BBC 8012D4BC 96220514 */ lhu $v0, 0x514($s1) /* C3BC0 8012D4C0 3C018015 */ lui $at, %hi(D_80150A08) /* C3BC4 8012D4C4 D4200A08 */ ldc1 $f0, %lo(D_80150A08)($at) /* C3BC8 8012D4C8 44821000 */ mtc1 $v0, $f2 /* C3BCC 8012D4CC 00000000 */ nop /* C3BD0 8012D4D0 468010A0 */ cvt.s.w $f2, $f2 /* C3BD4 8012D4D4 460010A1 */ cvt.d.s $f2, $f2 /* C3BD8 8012D4D8 46201082 */ mul.d $f2, $f2, $f0 /* C3BDC 8012D4DC 00000000 */ nop /* C3BE0 8012D4E0 00061400 */ sll $v0, $a2, 16 /* C3BE4 8012D4E4 00022403 */ sra $a0, $v0, 16 /* C3BE8 8012D4E8 44840000 */ mtc1 $a0, $f0 /* C3BEC 8012D4EC 00000000 */ nop /* C3BF0 8012D4F0 46800021 */ cvt.d.w $f0, $f0 /* C3BF4 8012D4F4 46220000 */ add.d $f0, $f0, $f2 /* C3BF8 8012D4F8 9623050E */ lhu $v1, 0x50E($s1) /* C3BFC 8012D4FC 4620010D */ trunc.w.d $f4, $f0 /* C3C00 8012D500 44022000 */ mfc1 $v0, $f4 /* C3C04 8012D504 00000000 */ nop /* C3C08 8012D508 0040902D */ daddu $s2, $v0, $zero /* C3C0C 8012D50C 00021400 */ sll $v0, $v0, 16 /* C3C10 8012D510 00021403 */ sra $v0, $v0, 16 /* C3C14 8012D514 0062182A */ slt $v1, $v1, $v0 /* C3C18 8012D518 10600090 */ beqz $v1, .L8012D75C /* C3C1C 8012D51C 00141400 */ sll $v0, $s4, 16 /* C3C20 8012D520 4484D000 */ mtc1 $a0, $f26 /* C3C24 8012D524 00000000 */ nop /* C3C28 8012D528 4680D6A0 */ cvt.s.w $f26, $f26 /* C3C2C 8012D52C 00029C03 */ sra $s3, $v0, 16 /* C3C30 8012D530 3C013F33 */ lui $at, (0x3F333333 >> 16) /* C3C34 8012D534 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF) /* C3C38 8012D538 4481A000 */ mtc1 $at, $f20 /* C3C3C 8012D53C 3C018015 */ lui $at, %hi(D_80150A10) /* C3C40 8012D540 D4380A10 */ ldc1 $f24, %lo(D_80150A10)($at) /* C3C44 8012D544 3C018015 */ lui $at, %hi(D_80150A18) /* C3C48 8012D548 D4360A18 */ ldc1 $f22, %lo(D_80150A18)($at) .L8012D54C: /* C3C4C 8012D54C 96220514 */ lhu $v0, 0x514($s1) /* C3C50 8012D550 44820000 */ mtc1 $v0, $f0 /* C3C54 8012D554 00000000 */ nop /* C3C58 8012D558 46800020 */ cvt.s.w $f0, $f0 /* C3C5C 8012D55C 46140002 */ mul.s $f0, $f0, $f20 /* C3C60 8012D560 00000000 */ nop /* C3C64 8012D564 44932000 */ mtc1 $s3, $f4 /* C3C68 8012D568 00000000 */ nop /* C3C6C 8012D56C 46802120 */ cvt.s.w $f4, $f4 /* C3C70 8012D570 44072000 */ mfc1 $a3, $f4 /* C3C74 8012D574 9622050E */ lhu $v0, 0x50E($s1) /* C3C78 8012D578 4600D000 */ add.s $f0, $f26, $f0 /* C3C7C 8012D57C 96230510 */ lhu $v1, 0x510($s1) /* C3C80 8012D580 44826000 */ mtc1 $v0, $f12 /* C3C84 8012D584 00000000 */ nop /* C3C88 8012D588 46806320 */ cvt.s.w $f12, $f12 /* C3C8C 8012D58C 4600010D */ trunc.w.s $f4, $f0 /* C3C90 8012D590 44022000 */ mfc1 $v0, $f4 /* C3C94 8012D594 00000000 */ nop /* C3C98 8012D598 0040902D */ daddu $s2, $v0, $zero /* C3C9C 8012D59C 00021400 */ sll $v0, $v0, 16 /* C3CA0 8012D5A0 00021403 */ sra $v0, $v0, 16 /* C3CA4 8012D5A4 44822000 */ mtc1 $v0, $f4 /* C3CA8 8012D5A8 00000000 */ nop /* C3CAC 8012D5AC 46802120 */ cvt.s.w $f4, $f4 /* C3CB0 8012D5B0 44062000 */ mfc1 $a2, $f4 /* C3CB4 8012D5B4 44837000 */ mtc1 $v1, $f14 /* C3CB8 8012D5B8 00000000 */ nop /* C3CBC 8012D5BC 0C00A720 */ jal atan2 /* C3CC0 8012D5C0 468073A0 */ cvt.s.w $f14, $f14 /* C3CC4 8012D5C4 4600010D */ trunc.w.s $f4, $f0 /* C3CC8 8012D5C8 44102000 */ mfc1 $s0, $f4 /* C3CCC 8012D5CC 00000000 */ nop /* C3CD0 8012D5D0 06010002 */ bgez $s0, .L8012D5DC /* C3CD4 8012D5D4 0200102D */ daddu $v0, $s0, $zero /* C3CD8 8012D5D8 00021023 */ negu $v0, $v0 .L8012D5DC: /* C3CDC 8012D5DC 2842002D */ slti $v0, $v0, 0x2D /* C3CE0 8012D5E0 1440005F */ bnez $v0, .L8012D760 /* C3CE4 8012D5E4 00121400 */ sll $v0, $s2, 16 /* C3CE8 8012D5E8 4600A021 */ cvt.d.s $f0, $f20 /* C3CEC 8012D5EC 46380001 */ sub.d $f0, $f0, $f24 /* C3CF0 8012D5F0 46200520 */ cvt.s.d $f20, $f0 /* C3CF4 8012D5F4 4600A021 */ cvt.d.s $f0, $f20 /* C3CF8 8012D5F8 4620B03E */ c.le.d $f22, $f0 /* C3CFC 8012D5FC 00000000 */ nop /* C3D00 8012D600 45000058 */ bc1f .L8012D764 /* C3D04 8012D604 00021403 */ sra $v0, $v0, 16 /* C3D08 8012D608 0804B553 */ j .L8012D54C /* C3D0C 8012D60C 00000000 */ nop .L8012D610: /* C3D10 8012D610 96220514 */ lhu $v0, 0x514($s1) /* C3D14 8012D614 3C018015 */ lui $at, %hi(D_80150A20) /* C3D18 8012D618 D4200A20 */ ldc1 $f0, %lo(D_80150A20)($at) /* C3D1C 8012D61C 44821000 */ mtc1 $v0, $f2 /* C3D20 8012D620 00000000 */ nop /* C3D24 8012D624 468010A0 */ cvt.s.w $f2, $f2 /* C3D28 8012D628 460010A1 */ cvt.d.s $f2, $f2 /* C3D2C 8012D62C 46201082 */ mul.d $f2, $f2, $f0 /* C3D30 8012D630 00000000 */ nop /* C3D34 8012D634 00061400 */ sll $v0, $a2, 16 /* C3D38 8012D638 00022403 */ sra $a0, $v0, 16 /* C3D3C 8012D63C 44840000 */ mtc1 $a0, $f0 /* C3D40 8012D640 00000000 */ nop /* C3D44 8012D644 46800021 */ cvt.d.w $f0, $f0 /* C3D48 8012D648 46220000 */ add.d $f0, $f0, $f2 /* C3D4C 8012D64C 9623050E */ lhu $v1, 0x50E($s1) /* C3D50 8012D650 4620010D */ trunc.w.d $f4, $f0 /* C3D54 8012D654 44022000 */ mfc1 $v0, $f4 /* C3D58 8012D658 00000000 */ nop /* C3D5C 8012D65C 0040902D */ daddu $s2, $v0, $zero /* C3D60 8012D660 00021400 */ sll $v0, $v0, 16 /* C3D64 8012D664 00021403 */ sra $v0, $v0, 16 /* C3D68 8012D668 0043102A */ slt $v0, $v0, $v1 /* C3D6C 8012D66C 1040003B */ beqz $v0, .L8012D75C /* C3D70 8012D670 00141400 */ sll $v0, $s4, 16 /* C3D74 8012D674 4484D000 */ mtc1 $a0, $f26 /* C3D78 8012D678 00000000 */ nop /* C3D7C 8012D67C 4680D6A0 */ cvt.s.w $f26, $f26 /* C3D80 8012D680 00029C03 */ sra $s3, $v0, 16 /* C3D84 8012D684 3C013E99 */ lui $at, (0x3E99999A >> 16) /* C3D88 8012D688 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF) /* C3D8C 8012D68C 4481A000 */ mtc1 $at, $f20 /* C3D90 8012D690 3C018015 */ lui $at, %hi(D_80150A28) /* C3D94 8012D694 D4380A28 */ ldc1 $f24, %lo(D_80150A28)($at) /* C3D98 8012D698 3C018015 */ lui $at, %hi(D_80150A30) /* C3D9C 8012D69C D4360A30 */ ldc1 $f22, %lo(D_80150A30)($at) .L8012D6A0: /* C3DA0 8012D6A0 96220514 */ lhu $v0, 0x514($s1) /* C3DA4 8012D6A4 44820000 */ mtc1 $v0, $f0 /* C3DA8 8012D6A8 00000000 */ nop /* C3DAC 8012D6AC 46800020 */ cvt.s.w $f0, $f0 /* C3DB0 8012D6B0 46140002 */ mul.s $f0, $f0, $f20 /* C3DB4 8012D6B4 00000000 */ nop /* C3DB8 8012D6B8 44932000 */ mtc1 $s3, $f4 /* C3DBC 8012D6BC 00000000 */ nop /* C3DC0 8012D6C0 46802120 */ cvt.s.w $f4, $f4 /* C3DC4 8012D6C4 44072000 */ mfc1 $a3, $f4 /* C3DC8 8012D6C8 9622050E */ lhu $v0, 0x50E($s1) /* C3DCC 8012D6CC 4600D000 */ add.s $f0, $f26, $f0 /* C3DD0 8012D6D0 96230510 */ lhu $v1, 0x510($s1) /* C3DD4 8012D6D4 44826000 */ mtc1 $v0, $f12 /* C3DD8 8012D6D8 00000000 */ nop /* C3DDC 8012D6DC 46806320 */ cvt.s.w $f12, $f12 /* C3DE0 8012D6E0 4600010D */ trunc.w.s $f4, $f0 /* C3DE4 8012D6E4 44022000 */ mfc1 $v0, $f4 /* C3DE8 8012D6E8 00000000 */ nop /* C3DEC 8012D6EC 0040902D */ daddu $s2, $v0, $zero /* C3DF0 8012D6F0 00021400 */ sll $v0, $v0, 16 /* C3DF4 8012D6F4 00021403 */ sra $v0, $v0, 16 /* C3DF8 8012D6F8 44822000 */ mtc1 $v0, $f4 /* C3DFC 8012D6FC 00000000 */ nop /* C3E00 8012D700 46802120 */ cvt.s.w $f4, $f4 /* C3E04 8012D704 44062000 */ mfc1 $a2, $f4 /* C3E08 8012D708 44837000 */ mtc1 $v1, $f14 /* C3E0C 8012D70C 00000000 */ nop /* C3E10 8012D710 0C00A720 */ jal atan2 /* C3E14 8012D714 468073A0 */ cvt.s.w $f14, $f14 /* C3E18 8012D718 4600010D */ trunc.w.s $f4, $f0 /* C3E1C 8012D71C 44102000 */ mfc1 $s0, $f4 /* C3E20 8012D720 00000000 */ nop /* C3E24 8012D724 06010002 */ bgez $s0, .L8012D730 /* C3E28 8012D728 0200102D */ daddu $v0, $s0, $zero /* C3E2C 8012D72C 00021023 */ negu $v0, $v0 .L8012D730: /* C3E30 8012D730 2842002D */ slti $v0, $v0, 0x2D /* C3E34 8012D734 1440000A */ bnez $v0, .L8012D760 /* C3E38 8012D738 00121400 */ sll $v0, $s2, 16 /* C3E3C 8012D73C 4600A021 */ cvt.d.s $f0, $f20 /* C3E40 8012D740 46380000 */ add.d $f0, $f0, $f24 /* C3E44 8012D744 46200520 */ cvt.s.d $f20, $f0 /* C3E48 8012D748 4600A021 */ cvt.d.s $f0, $f20 /* C3E4C 8012D74C 4636003E */ c.le.d $f0, $f22 /* C3E50 8012D750 00000000 */ nop /* C3E54 8012D754 4501FFD2 */ bc1t .L8012D6A0 /* C3E58 8012D758 00000000 */ nop .L8012D75C: /* C3E5C 8012D75C 00121400 */ sll $v0, $s2, 16 .L8012D760: /* C3E60 8012D760 00021403 */ sra $v0, $v0, 16 .L8012D764: /* C3E64 8012D764 4482C000 */ mtc1 $v0, $f24 /* C3E68 8012D768 00000000 */ nop /* C3E6C 8012D76C 4680C620 */ cvt.s.w $f24, $f24 /* C3E70 8012D770 00141400 */ sll $v0, $s4, 16 /* C3E74 8012D774 0002B403 */ sra $s6, $v0, 16 /* C3E78 8012D778 4496B000 */ mtc1 $s6, $f22 /* C3E7C 8012D77C 00000000 */ nop /* C3E80 8012D780 4680B5A0 */ cvt.s.w $f22, $f22 /* C3E84 8012D784 4406C000 */ mfc1 $a2, $f24 /* C3E88 8012D788 4407B000 */ mfc1 $a3, $f22 /* C3E8C 8012D78C 8622050A */ lh $v0, 0x50A($s1) /* C3E90 8012D790 8623050C */ lh $v1, 0x50C($s1) /* C3E94 8012D794 44826000 */ mtc1 $v0, $f12 /* C3E98 8012D798 00000000 */ nop /* C3E9C 8012D79C 46806320 */ cvt.s.w $f12, $f12 /* C3EA0 8012D7A0 44837000 */ mtc1 $v1, $f14 /* C3EA4 8012D7A4 00000000 */ nop /* C3EA8 8012D7A8 468073A0 */ cvt.s.w $f14, $f14 /* C3EAC 8012D7AC 0C00A7B5 */ jal dist2D /* C3EB0 8012D7B0 2655FFF7 */ addiu $s5, $s2, -0x9 /* C3EB4 8012D7B4 4600010D */ trunc.w.s $f4, $f0 /* C3EB8 8012D7B8 44172000 */ mfc1 $s7, $f4 /* C3EBC 8012D7BC 26520009 */ addiu $s2, $s2, 0x9 /* C3EC0 8012D7C0 2AE2000A */ slti $v0, $s7, 0xA /* C3EC4 8012D7C4 144000D4 */ bnez $v0, .L8012DB18 /* C3EC8 8012D7C8 AFB20050 */ sw $s2, 0x50($sp) /* C3ECC 8012D7CC 2AE2001A */ slti $v0, $s7, 0x1A /* C3ED0 8012D7D0 50400001 */ beql $v0, $zero, .L8012D7D8 /* C3ED4 8012D7D4 24170019 */ addiu $s7, $zero, 0x19 .L8012D7D8: /* C3ED8 8012D7D8 3C028007 */ lui $v0, %hi(gCurrentDisplayContextIndex) /* C3EDC 8012D7DC 8C4241F4 */ lw $v0, %lo(gCurrentDisplayContextIndex)($v0) /* C3EE0 8012D7E0 3C1E8015 */ lui $fp, %hi(gMsgArrowQuad2) /* C3EE4 8012D7E4 27DEC4C0 */ addiu $fp, $fp, %lo(gMsgArrowQuad2) /* C3EE8 8012D7E8 10400003 */ beqz $v0, .L8012D7F8 /* C3EEC 8012D7EC 4600C306 */ mov.s $f12, $f24 /* C3EF0 8012D7F0 3C1E8015 */ lui $fp, %hi(gMsgArrowQuad1) /* C3EF4 8012D7F4 27DEC480 */ addiu $fp, $fp, %lo(gMsgArrowQuad1) .L8012D7F8: /* C3EF8 8012D7F8 8622050A */ lh $v0, 0x50A($s1) /* C3EFC 8012D7FC 8623050C */ lh $v1, 0x50C($s1) /* C3F00 8012D800 44822000 */ mtc1 $v0, $f4 /* C3F04 8012D804 00000000 */ nop /* C3F08 8012D808 46802120 */ cvt.s.w $f4, $f4 /* C3F0C 8012D80C 44062000 */ mfc1 $a2, $f4 /* C3F10 8012D810 44832000 */ mtc1 $v1, $f4 /* C3F14 8012D814 00000000 */ nop /* C3F18 8012D818 46802120 */ cvt.s.w $f4, $f4 /* C3F1C 8012D81C 44072000 */ mfc1 $a3, $f4 /* C3F20 8012D820 0C00A720 */ jal atan2 /* C3F24 8012D824 4600B386 */ mov.s $f14, $f22 /* C3F28 8012D828 4600010D */ trunc.w.s $f4, $f0 /* C3F2C 8012D82C 44102000 */ mfc1 $s0, $f4 /* C3F30 8012D830 00000000 */ nop /* C3F34 8012D834 2610FF4C */ addiu $s0, $s0, -0xB4 /* C3F38 8012D838 06010002 */ bgez $s0, .L8012D844 /* C3F3C 8012D83C 0200102D */ daddu $v0, $s0, $zero /* C3F40 8012D840 00021023 */ negu $v0, $v0 .L8012D844: /* C3F44 8012D844 2842004B */ slti $v0, $v0, 0x4B /* C3F48 8012D848 104000B3 */ beqz $v0, .L8012DB18 /* C3F4C 8012D84C 00102400 */ sll $a0, $s0, 16 /* C3F50 8012D850 0C00A4F5 */ jal cosine /* C3F54 8012D854 00042403 */ sra $a0, $a0, 16 /* C3F58 8012D858 2604005A */ addiu $a0, $s0, 0x5A /* C3F5C 8012D85C 00042400 */ sll $a0, $a0, 16 /* C3F60 8012D860 00042403 */ sra $a0, $a0, 16 /* C3F64 8012D864 0C00A4F5 */ jal cosine /* C3F68 8012D868 46000506 */ mov.s $f20, $f0 /* C3F6C 8012D86C 3C13E200 */ lui $s3, (0xE200001C >> 16) /* C3F70 8012D870 3673001C */ ori $s3, $s3, (0xE200001C & 0xFFFF) /* C3F74 8012D874 3C0F0F0A */ lui $t7, (0xF0A4000 >> 16) /* C3F78 8012D878 35EF4000 */ ori $t7, $t7, (0xF0A4000 & 0xFFFF) /* C3F7C 8012D87C 3C0CFCFF */ lui $t4, (0xFCFFFFFF >> 16) /* C3F80 8012D880 358CFFFF */ ori $t4, $t4, (0xFCFFFFFF & 0xFFFF) /* C3F84 8012D884 3C0BFFFC */ lui $t3, (0xFFFCFC7E >> 16) /* C3F88 8012D888 356BFC7E */ ori $t3, $t3, (0xFFFCFC7E & 0xFFFF) /* C3F8C 8012D88C 3C0AE300 */ lui $t2, (0xE3001201 >> 16) /* C3F90 8012D890 354A1201 */ ori $t2, $t2, (0xE3001201 & 0xFFFF) /* C3F94 8012D894 3C112020 */ lui $s1, (0x202020FF >> 16) /* C3F98 8012D898 363120FF */ ori $s1, $s1, (0x202020FF & 0xFFFF) /* C3F9C 8012D89C 3C0DFD48 */ lui $t5, (0xFD480007 >> 16) /* C3FA0 8012D8A0 35AD0007 */ ori $t5, $t5, (0xFD480007 & 0xFFFF) /* C3FA4 8012D8A4 3C12F548 */ lui $s2, (0xF5480200 >> 16) /* C3FA8 8012D8A8 36520200 */ ori $s2, $s2, (0xF5480200 & 0xFFFF) /* C3FAC 8012D8AC 3C0E0701 */ lui $t6, (0x7010040 >> 16) /* C3FB0 8012D8B0 35CE0040 */ ori $t6, $t6, (0x7010040 & 0xFFFF) /* C3FB4 8012D8B4 3C190701 */ lui $t9, (0x701E03C >> 16) /* C3FB8 8012D8B8 3739E03C */ ori $t9, $t9, (0x701E03C & 0xFFFF) /* C3FBC 8012D8BC AFB90054 */ sw $t9, 0x54($sp) /* C3FC0 8012D8C0 3C19F540 */ lui $t9, (0xF5400200 >> 16) /* C3FC4 8012D8C4 37390200 */ ori $t9, $t9, (0xF5400200 & 0xFFFF) /* C3FC8 8012D8C8 AFB90058 */ sw $t9, 0x58($sp) /* C3FCC 8012D8CC 3C190001 */ lui $t9, (0x10040 >> 16) /* C3FD0 8012D8D0 37390040 */ ori $t9, $t9, (0x10040 & 0xFFFF) /* C3FD4 8012D8D4 3C180003 */ lui $t8, (0x3C03C >> 16) /* C3FD8 8012D8D8 3718C03C */ ori $t8, $t8, (0x3C03C & 0xFFFF) /* C3FDC 8012D8DC 27A40010 */ addiu $a0, $sp, 0x10 /* C3FE0 8012D8E0 3C140001 */ lui $s4, (0x11630 >> 16) /* C3FE4 8012D8E4 3C10800A */ lui $s0, %hi(gMainGfxPos) /* C3FE8 8012D8E8 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* C3FEC 8012D8EC 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* C3FF0 8012D8F0 AFB9005C */ sw $t9, 0x5C($sp) /* C3FF4 8012D8F4 8E030000 */ lw $v1, 0x0($s0) /* C3FF8 8012D8F8 44801000 */ mtc1 $zero, $f2 /* C3FFC 8012D8FC 00161023 */ negu $v0, $s6 /* C4000 8012D900 A7D50000 */ sh $s5, 0x0($fp) /* C4004 8012D904 A7C20002 */ sh $v0, 0x2($fp) /* C4008 8012D908 97B90052 */ lhu $t9, 0x52($sp) /* C400C 8012D90C A7C20012 */ sh $v0, 0x12($fp) /* C4010 8012D910 0060482D */ daddu $t1, $v1, $zero /* C4014 8012D914 24630008 */ addiu $v1, $v1, 0x8 /* C4018 8012D918 24620008 */ addiu $v0, $v1, 0x8 /* C401C 8012D91C A7D90010 */ sh $t9, 0x10($fp) /* C4020 8012D920 AE030000 */ sw $v1, 0x0($s0) /* C4024 8012D924 AE020000 */ sw $v0, 0x0($s0) /* C4028 8012D928 24620010 */ addiu $v0, $v1, 0x10 /* C402C 8012D92C 44051000 */ mfc1 $a1, $f2 /* C4030 8012D930 44971000 */ mtc1 $s7, $f2 /* C4034 8012D934 00000000 */ nop /* C4038 8012D938 468010A0 */ cvt.s.w $f2, $f2 /* C403C 8012D93C 46141502 */ mul.s $f20, $f2, $f20 /* C4040 8012D940 00000000 */ nop /* C4044 8012D944 AE020000 */ sw $v0, 0x0($s0) /* C4048 8012D948 24620018 */ addiu $v0, $v1, 0x18 /* C404C 8012D94C AE020000 */ sw $v0, 0x0($s0) /* C4050 8012D950 24620020 */ addiu $v0, $v1, 0x20 /* C4054 8012D954 46001082 */ mul.s $f2, $f2, $f0 /* C4058 8012D958 00000000 */ nop /* C405C 8012D95C AE020000 */ sw $v0, 0x0($s0) /* C4060 8012D960 24620028 */ addiu $v0, $v1, 0x28 /* C4064 8012D964 AE020000 */ sw $v0, 0x0($s0) /* C4068 8012D968 24620030 */ addiu $v0, $v1, 0x30 /* C406C 8012D96C AE020000 */ sw $v0, 0x0($s0) /* C4070 8012D970 4614C501 */ sub.s $f20, $f24, $f20 /* C4074 8012D974 24620038 */ addiu $v0, $v1, 0x38 /* C4078 8012D978 AE020000 */ sw $v0, 0x0($s0) /* C407C 8012D97C 4602B080 */ add.s $f2, $f22, $f2 /* C4080 8012D980 00A0302D */ daddu $a2, $a1, $zero /* C4084 8012D984 4600A10D */ trunc.w.s $f4, $f20 /* C4088 8012D988 44082000 */ mfc1 $t0, $f4 /* C408C 8012D98C 4600110D */ trunc.w.s $f4, $f2 /* C4090 8012D990 44022000 */ mfc1 $v0, $f4 /* C4094 8012D994 00000000 */ nop /* C4098 8012D998 00021400 */ sll $v0, $v0, 16 /* C409C 8012D99C 00021403 */ sra $v0, $v0, 16 /* C40A0 8012D9A0 00021023 */ negu $v0, $v0 /* C40A4 8012D9A4 A7C80020 */ sh $t0, 0x20($fp) /* C40A8 8012D9A8 25080001 */ addiu $t0, $t0, 0x1 /* C40AC 8012D9AC A7C80030 */ sh $t0, 0x30($fp) /* C40B0 8012D9B0 3C08E700 */ lui $t0, (0xE7000000 >> 16) /* C40B4 8012D9B4 A7C20022 */ sh $v0, 0x22($fp) /* C40B8 8012D9B8 A7C20032 */ sh $v0, 0x32($fp) /* C40BC 8012D9BC 24022000 */ addiu $v0, $zero, 0x2000 /* C40C0 8012D9C0 AD280000 */ sw $t0, 0x0($t1) /* C40C4 8012D9C4 AD200004 */ sw $zero, 0x4($t1) /* C40C8 8012D9C8 AC620014 */ sw $v0, 0x14($v1) /* C40CC 8012D9CC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* C40D0 8012D9D0 AC620018 */ sw $v0, 0x18($v1) /* C40D4 8012D9D4 3C02802F */ lui $v0, %hi(ui_msg_arrow_png) /* C40D8 8012D9D8 2442BF70 */ addiu $v0, $v0, %lo(ui_msg_arrow_png) /* C40DC 8012D9DC AC730000 */ sw $s3, 0x0($v1) /* C40E0 8012D9E0 AC6F0004 */ sw $t7, 0x4($v1) /* C40E4 8012D9E4 AC6C0008 */ sw $t4, 0x8($v1) /* C40E8 8012D9E8 AC6B000C */ sw $t3, 0xC($v1) /* C40EC 8012D9EC AC6A0010 */ sw $t2, 0x10($v1) /* C40F0 8012D9F0 AC71001C */ sw $s1, 0x1C($v1) /* C40F4 8012D9F4 AC6D0020 */ sw $t5, 0x20($v1) /* C40F8 8012D9F8 AC620024 */ sw $v0, 0x24($v1) /* C40FC 8012D9FC 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* C4100 8012DA00 AC620030 */ sw $v0, 0x30($v1) /* C4104 8012DA04 24620040 */ addiu $v0, $v1, 0x40 /* C4108 8012DA08 AC720028 */ sw $s2, 0x28($v1) /* C410C 8012DA0C AC6E002C */ sw $t6, 0x2C($v1) /* C4110 8012DA10 AC600034 */ sw $zero, 0x34($v1) /* C4114 8012DA14 AE020000 */ sw $v0, 0x0($s0) /* C4118 8012DA18 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* C411C 8012DA1C AC620038 */ sw $v0, 0x38($v1) /* C4120 8012DA20 8FB90054 */ lw $t9, 0x54($sp) /* C4124 8012DA24 24620048 */ addiu $v0, $v1, 0x48 /* C4128 8012DA28 AC79003C */ sw $t9, 0x3C($v1) /* C412C 8012DA2C AE020000 */ sw $v0, 0x0($s0) /* C4130 8012DA30 24620050 */ addiu $v0, $v1, 0x50 /* C4134 8012DA34 AC680040 */ sw $t0, 0x40($v1) /* C4138 8012DA38 AC600044 */ sw $zero, 0x44($v1) /* C413C 8012DA3C AE020000 */ sw $v0, 0x0($s0) /* C4140 8012DA40 8FB90058 */ lw $t9, 0x58($sp) /* C4144 8012DA44 00A0382D */ daddu $a3, $a1, $zero /* C4148 8012DA48 AC790048 */ sw $t9, 0x48($v1) /* C414C 8012DA4C 8FB9005C */ lw $t9, 0x5C($sp) /* C4150 8012DA50 24620058 */ addiu $v0, $v1, 0x58 /* C4154 8012DA54 AC79004C */ sw $t9, 0x4C($v1) /* C4158 8012DA58 AE020000 */ sw $v0, 0x0($s0) /* C415C 8012DA5C 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* C4160 8012DA60 AC620050 */ sw $v0, 0x50($v1) /* C4164 8012DA64 0C019E40 */ jal guTranslateF /* C4168 8012DA68 AC780054 */ sw $t8, 0x54($v1) /* C416C 8012DA6C 27A40010 */ addiu $a0, $sp, 0x10 /* C4170 8012DA70 3C118007 */ lui $s1, %hi(gMatrixListPos) /* C4174 8012DA74 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* C4178 8012DA78 3C12800A */ lui $s2, %hi(gDisplayContext) /* C417C 8012DA7C 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* C4180 8012DA80 96250000 */ lhu $a1, 0x0($s1) /* C4184 8012DA84 8E420000 */ lw $v0, 0x0($s2) /* C4188 8012DA88 00052980 */ sll $a1, $a1, 6 /* C418C 8012DA8C 00B42821 */ addu $a1, $a1, $s4 /* C4190 8012DA90 0C019D40 */ jal guMtxF2L /* C4194 8012DA94 00452821 */ addu $a1, $v0, $a1 /* C4198 8012DA98 3C03DA38 */ lui $v1, (0xDA380003 >> 16) /* C419C 8012DA9C 34630003 */ ori $v1, $v1, (0xDA380003 & 0xFFFF) /* C41A0 8012DAA0 3C060100 */ lui $a2, (0x1004008 >> 16) /* C41A4 8012DAA4 34C64008 */ ori $a2, $a2, (0x1004008 & 0xFFFF) /* C41A8 8012DAA8 3C080600 */ lui $t0, (0x6000402 >> 16) /* C41AC 8012DAAC 35080402 */ ori $t0, $t0, (0x6000402 & 0xFFFF) /* C41B0 8012DAB0 3C070002 */ lui $a3, (0x20406 >> 16) /* C41B4 8012DAB4 34E70406 */ ori $a3, $a3, (0x20406 & 0xFFFF) /* C41B8 8012DAB8 8E040000 */ lw $a0, 0x0($s0) /* C41BC 8012DABC 96220000 */ lhu $v0, 0x0($s1) /* C41C0 8012DAC0 0080282D */ daddu $a1, $a0, $zero /* C41C4 8012DAC4 24840008 */ addiu $a0, $a0, 0x8 /* C41C8 8012DAC8 AE040000 */ sw $a0, 0x0($s0) /* C41CC 8012DACC ACA30000 */ sw $v1, 0x0($a1) /* C41D0 8012DAD0 24430001 */ addiu $v1, $v0, 0x1 /* C41D4 8012DAD4 3042FFFF */ andi $v0, $v0, 0xFFFF /* C41D8 8012DAD8 00021180 */ sll $v0, $v0, 6 /* C41DC 8012DADC A6230000 */ sh $v1, 0x0($s1) /* C41E0 8012DAE0 8E430000 */ lw $v1, 0x0($s2) /* C41E4 8012DAE4 00541021 */ addu $v0, $v0, $s4 /* C41E8 8012DAE8 00621821 */ addu $v1, $v1, $v0 /* C41EC 8012DAEC 3C028000 */ lui $v0, (0x80000000 >> 16) /* C41F0 8012DAF0 00621821 */ addu $v1, $v1, $v0 /* C41F4 8012DAF4 24820008 */ addiu $v0, $a0, 0x8 /* C41F8 8012DAF8 ACA30004 */ sw $v1, 0x4($a1) /* C41FC 8012DAFC AE020000 */ sw $v0, 0x0($s0) /* C4200 8012DB00 24820010 */ addiu $v0, $a0, 0x10 /* C4204 8012DB04 AC860000 */ sw $a2, 0x0($a0) /* C4208 8012DB08 AC9E0004 */ sw $fp, 0x4($a0) /* C420C 8012DB0C AE020000 */ sw $v0, 0x0($s0) /* C4210 8012DB10 AC880008 */ sw $t0, 0x8($a0) /* C4214 8012DB14 AC87000C */ sw $a3, 0xC($a0) .L8012DB18: /* C4218 8012DB18 8FBF0084 */ lw $ra, 0x84($sp) /* C421C 8012DB1C 8FBE0080 */ lw $fp, 0x80($sp) /* C4220 8012DB20 8FB7007C */ lw $s7, 0x7C($sp) /* C4224 8012DB24 8FB60078 */ lw $s6, 0x78($sp) /* C4228 8012DB28 8FB50074 */ lw $s5, 0x74($sp) /* C422C 8012DB2C 8FB40070 */ lw $s4, 0x70($sp) /* C4230 8012DB30 8FB3006C */ lw $s3, 0x6C($sp) /* C4234 8012DB34 8FB20068 */ lw $s2, 0x68($sp) /* C4238 8012DB38 8FB10064 */ lw $s1, 0x64($sp) /* C423C 8012DB3C 8FB00060 */ lw $s0, 0x60($sp) /* C4240 8012DB40 D7BA00A0 */ ldc1 $f26, 0xA0($sp) /* C4244 8012DB44 D7B80098 */ ldc1 $f24, 0x98($sp) /* C4248 8012DB48 D7B60090 */ ldc1 $f22, 0x90($sp) /* C424C 8012DB4C D7B40088 */ ldc1 $f20, 0x88($sp) /* C4250 8012DB50 03E00008 */ jr $ra /* C4254 8012DB54 27BD00A8 */ addiu $sp, $sp, 0xA8 ### DECOMPILED C INSTRUCTIONS: void msg_draw_speech_arrow(MessagePrintState* printer) { s16 targetX, targetY; f32 windowXpart; s32 arrowLength; Vtx* quad; s32 angle; f32 cosAngle, sinAngle; Matrix4f sp10; s16 x1, x2, x3, x4; s32 y1, y2; u8 pointRightSide = FALSE; s16 windowX = printer->windowOffsetPos.x + printer->windowBasePos.x; s16 windowY = printer->windowOffsetPos.y + printer->windowBasePos.y; if (printer->openStartPos.x == 0) { return; } if (printer->style == MSG_STYLE_RIGHT || printer->style == MSG_STYLE_LEFT || printer->style == MSG_STYLE_CENTER || printer->maxLinesPerPage == 3) { targetY = windowY + printer->windowSize.y - 4; } else { targetY = windowY + printer->windowSize.y - 3; } if (printer->style == MSG_STYLE_LEFT) { pointRightSide = FALSE; } else if (printer->style == MSG_STYLE_CENTER || printer->openStartPos.x >= 160) { pointRightSide = TRUE; } if (pointRightSide) { targetX = windowX + (f32)printer->windowSize.x * 0.7; if (printer->openStartPos.x < targetX) { for (windowXpart = 0.7f; windowXpart >= 0.67; windowXpart -= 0.005) { targetX = windowX + printer->windowSize.x * windowXpart; angle = atan2(printer->openStartPos.x, printer->openStartPos.y, targetX, targetY); if (abs(angle) < 45) { break; } } } } else { targetX = windowX + (f32)printer->windowSize.x * 0.3; if (printer->openStartPos.x > targetX) { for (windowXpart = 0.3f; windowXpart <= 0.38; windowXpart += 0.005) { targetX = windowX + printer->windowSize.x * windowXpart; angle = atan2(printer->openStartPos.x, printer->openStartPos.y, targetX, targetY); if (abs(angle) < 45) { break; } } } } x1 = targetX - 9; x2 = targetX + 9; x3 = targetX; arrowLength = dist2D(printer->initOpenPos.x, printer->initOpenPos.y, targetX, targetY); if (arrowLength < 10) { return; } if (arrowLength > 25) { arrowLength = 25; } // alternate quads between frames if (gCurrentDisplayContextIndex != 0) { quad = gMsgArrowQuad1; } else { quad = gMsgArrowQuad2; } angle = atan2(targetX, targetY, printer->initOpenPos.x, printer->initOpenPos.y); angle -= 180; if (abs(angle) >= 75) { return; } cosAngle = cosine(angle); sinAngle = cosine(angle + 90); x3 = x3 - arrowLength * cosAngle; x4 = x3 + 1; y1 = -targetY; y2 = -(s16)(targetY + arrowLength * sinAngle); quad[0].v.ob[0] = x1; quad[0].v.ob[1] = y1; quad[1].v.ob[0] = x2; quad[1].v.ob[1] = y1; quad[2].v.ob[0] = x3; quad[2].v.ob[1] = y2; quad[3].v.ob[0] = x4; quad[3].v.ob[1] = y2; gDPPipeSync(gMainGfxPos++); gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); gDPSetCombineMode(gMainGfxPos++, PM_CC_0F, PM_CC_0F); gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); gDPSetPrimColor(gMainGfxPos++, 0, 0, 32, 32, 32, 255); gDPLoadTextureTile_4b(gMainGfxPos++, ui_msg_arrow_png, G_IM_FMT_CI, 16, 0, 0, 0, 15, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); guTranslateF(sp10, 0.0f, 0.0f, 0.0f); guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPVertex(gMainGfxPos++, quad, 4, 0); gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_RedSwitch_animate_scale /* 103028 802E17A8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 10302C 802E17AC AFB10014 */ sw $s1, 0x14($sp) /* 103030 802E17B0 0080882D */ daddu $s1, $a0, $zero /* 103034 802E17B4 AFBF001C */ sw $ra, 0x1C($sp) /* 103038 802E17B8 AFB20018 */ sw $s2, 0x18($sp) /* 10303C 802E17BC AFB00010 */ sw $s0, 0x10($sp) /* 103040 802E17C0 8E300040 */ lw $s0, 0x40($s1) /* 103044 802E17C4 82030010 */ lb $v1, 0x10($s0) /* 103048 802E17C8 2C620006 */ sltiu $v0, $v1, 0x6 /* 10304C 802E17CC 104000D3 */ beqz $v0, .L802E1B1C /* 103050 802E17D0 0000902D */ daddu $s2, $zero, $zero /* 103054 802E17D4 00031080 */ sll $v0, $v1, 2 /* 103058 802E17D8 3C01802F */ lui $at, %hi(jtbl_802EB010) /* 10305C 802E17DC 00220821 */ addu $at, $at, $v0 /* 103060 802E17E0 8C22B010 */ lw $v0, %lo(jtbl_802EB010)($at) /* 103064 802E17E4 00400008 */ jr $v0 /* 103068 802E17E8 00000000 */ nop glabel .L802E17EC /* 10306C 802E17EC C602001C */ lwc1 $f2, 0x1C($s0) /* 103070 802E17F0 3C01802F */ lui $at, %hi(D_802EB028) /* 103074 802E17F4 D420B028 */ ldc1 $f0, %lo(D_802EB028)($at) /* 103078 802E17F8 460010A1 */ cvt.d.s $f2, $f2 /* 10307C 802E17FC 46201082 */ mul.d $f2, $f2, $f0 /* 103080 802E1800 00000000 */ nop /* 103084 802E1804 C6000014 */ lwc1 $f0, 0x14($s0) /* 103088 802E1808 462011A0 */ cvt.s.d $f6, $f2 /* 10308C 802E180C 46060000 */ add.s $f0, $f0, $f6 /* 103090 802E1810 C6220054 */ lwc1 $f2, 0x54($s1) /* 103094 802E1814 46020001 */ sub.s $f0, $f0, $f2 /* 103098 802E1818 3C013FD0 */ lui $at, (0x3FD00000 >> 16) /* 10309C 802E181C 44811800 */ mtc1 $at, $f3 /* 1030A0 802E1820 44801000 */ mtc1 $zero, $f2 /* 1030A4 802E1824 46000021 */ cvt.d.s $f0, $f0 /* 1030A8 802E1828 46220002 */ mul.d $f0, $f0, $f2 /* 1030AC 802E182C 00000000 */ nop /* 1030B0 802E1830 3C01802F */ lui $at, %hi(D_802EB030) /* 1030B4 802E1834 D422B030 */ ldc1 $f2, %lo(D_802EB030)($at) /* 1030B8 802E1838 46200120 */ cvt.s.d $f4, $f0 /* 1030BC 802E183C 46002021 */ cvt.d.s $f0, $f4 /* 1030C0 802E1840 4622003C */ c.lt.d $f0, $f2 /* 1030C4 802E1844 00000000 */ nop /* 1030C8 802E1848 45000004 */ bc1f .L802E185C /* 1030CC 802E184C 00000000 */ nop /* 1030D0 802E1850 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 1030D4 802E1854 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 1030D8 802E1858 44812000 */ mtc1 $at, $f4 .L802E185C: /* 1030DC 802E185C C6000004 */ lwc1 $f0, 0x4($s0) /* 1030E0 802E1860 46040000 */ add.s $f0, $f0, $f4 /* 1030E4 802E1864 E6000004 */ swc1 $f0, 0x4($s0) /* 1030E8 802E1868 C6220054 */ lwc1 $f2, 0x54($s1) /* 1030EC 802E186C 46001080 */ add.s $f2, $f2, $f0 /* 1030F0 802E1870 E6220054 */ swc1 $f2, 0x54($s1) /* 1030F4 802E1874 C6000014 */ lwc1 $f0, 0x14($s0) /* 1030F8 802E1878 46060000 */ add.s $f0, $f0, $f6 /* 1030FC 802E187C 4602003E */ c.le.s $f0, $f2 /* 103100 802E1880 00000000 */ nop /* 103104 802E1884 450000A5 */ bc1f .L802E1B1C /* 103108 802E1888 00000000 */ nop /* 10310C 802E188C 080B86C1 */ j .L802E1B04 /* 103110 802E1890 00000000 */ nop glabel .L802E1894 /* 103114 802E1894 C602001C */ lwc1 $f2, 0x1C($s0) /* 103118 802E1898 3C01802F */ lui $at, %hi(D_802EB038) /* 10311C 802E189C D420B038 */ ldc1 $f0, %lo(D_802EB038)($at) /* 103120 802E18A0 460010A1 */ cvt.d.s $f2, $f2 /* 103124 802E18A4 46201082 */ mul.d $f2, $f2, $f0 /* 103128 802E18A8 00000000 */ nop /* 10312C 802E18AC C6000014 */ lwc1 $f0, 0x14($s0) /* 103130 802E18B0 462011A0 */ cvt.s.d $f6, $f2 /* 103134 802E18B4 46060000 */ add.s $f0, $f0, $f6 /* 103138 802E18B8 C6220054 */ lwc1 $f2, 0x54($s1) /* 10313C 802E18BC 46020001 */ sub.s $f0, $f0, $f2 /* 103140 802E18C0 3C014018 */ lui $at, (0x40180000 >> 16) /* 103144 802E18C4 44811800 */ mtc1 $at, $f3 /* 103148 802E18C8 44801000 */ mtc1 $zero, $f2 /* 10314C 802E18CC 46000021 */ cvt.d.s $f0, $f0 /* 103150 802E18D0 46220003 */ div.d $f0, $f0, $f2 /* 103154 802E18D4 46200120 */ cvt.s.d $f4, $f0 /* 103158 802E18D8 3C01802F */ lui $at, %hi(D_802EB040) /* 10315C 802E18DC D422B040 */ ldc1 $f2, %lo(D_802EB040)($at) /* 103160 802E18E0 46002021 */ cvt.d.s $f0, $f4 /* 103164 802E18E4 4620103C */ c.lt.d $f2, $f0 /* 103168 802E18E8 00000000 */ nop /* 10316C 802E18EC 45000004 */ bc1f .L802E1900 /* 103170 802E18F0 00000000 */ nop /* 103174 802E18F4 3C01BC23 */ lui $at, (0xBC23D70A >> 16) /* 103178 802E18F8 3421D70A */ ori $at, $at, (0xBC23D70A & 0xFFFF) /* 10317C 802E18FC 44812000 */ mtc1 $at, $f4 .L802E1900: /* 103180 802E1900 C6000004 */ lwc1 $f0, 0x4($s0) /* 103184 802E1904 46040000 */ add.s $f0, $f0, $f4 /* 103188 802E1908 E6000004 */ swc1 $f0, 0x4($s0) /* 10318C 802E190C C6220054 */ lwc1 $f2, 0x54($s1) /* 103190 802E1910 46001080 */ add.s $f2, $f2, $f0 /* 103194 802E1914 E6220054 */ swc1 $f2, 0x54($s1) /* 103198 802E1918 C6000014 */ lwc1 $f0, 0x14($s0) /* 10319C 802E191C 46060000 */ add.s $f0, $f0, $f6 /* 1031A0 802E1920 4600103E */ c.le.s $f2, $f0 /* 1031A4 802E1924 00000000 */ nop /* 1031A8 802E1928 4500007C */ bc1f .L802E1B1C /* 1031AC 802E192C 00000000 */ nop /* 1031B0 802E1930 080B86C1 */ j .L802E1B04 /* 1031B4 802E1934 00000000 */ nop glabel .L802E1938 /* 1031B8 802E1938 C602001C */ lwc1 $f2, 0x1C($s0) /* 1031BC 802E193C 3C01802F */ lui $at, %hi(D_802EB048) /* 1031C0 802E1940 D420B048 */ ldc1 $f0, %lo(D_802EB048)($at) /* 1031C4 802E1944 460010A1 */ cvt.d.s $f2, $f2 /* 1031C8 802E1948 46201082 */ mul.d $f2, $f2, $f0 /* 1031CC 802E194C 00000000 */ nop /* 1031D0 802E1950 C6000014 */ lwc1 $f0, 0x14($s0) /* 1031D4 802E1954 462011A0 */ cvt.s.d $f6, $f2 /* 1031D8 802E1958 46060000 */ add.s $f0, $f0, $f6 /* 1031DC 802E195C C6220054 */ lwc1 $f2, 0x54($s1) /* 1031E0 802E1960 46020001 */ sub.s $f0, $f0, $f2 /* 1031E4 802E1964 3C013FD0 */ lui $at, (0x3FD00000 >> 16) /* 1031E8 802E1968 44811800 */ mtc1 $at, $f3 /* 1031EC 802E196C 44801000 */ mtc1 $zero, $f2 /* 1031F0 802E1970 46000021 */ cvt.d.s $f0, $f0 /* 1031F4 802E1974 46220002 */ mul.d $f0, $f0, $f2 /* 1031F8 802E1978 00000000 */ nop /* 1031FC 802E197C 3C01802F */ lui $at, %hi(D_802EB050) /* 103200 802E1980 D422B050 */ ldc1 $f2, %lo(D_802EB050)($at) /* 103204 802E1984 46200120 */ cvt.s.d $f4, $f0 /* 103208 802E1988 46002021 */ cvt.d.s $f0, $f4 /* 10320C 802E198C 4622003C */ c.lt.d $f0, $f2 /* 103210 802E1990 00000000 */ nop /* 103214 802E1994 45000004 */ bc1f .L802E19A8 /* 103218 802E1998 00000000 */ nop /* 10321C 802E199C 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 103220 802E19A0 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 103224 802E19A4 44812000 */ mtc1 $at, $f4 .L802E19A8: /* 103228 802E19A8 C6000004 */ lwc1 $f0, 0x4($s0) /* 10322C 802E19AC 46040000 */ add.s $f0, $f0, $f4 /* 103230 802E19B0 E6000004 */ swc1 $f0, 0x4($s0) /* 103234 802E19B4 C6220054 */ lwc1 $f2, 0x54($s1) /* 103238 802E19B8 46001080 */ add.s $f2, $f2, $f0 /* 10323C 802E19BC E6220054 */ swc1 $f2, 0x54($s1) /* 103240 802E19C0 C6000014 */ lwc1 $f0, 0x14($s0) /* 103244 802E19C4 46060000 */ add.s $f0, $f0, $f6 /* 103248 802E19C8 4602003E */ c.le.s $f0, $f2 /* 10324C 802E19CC 00000000 */ nop /* 103250 802E19D0 45000052 */ bc1f .L802E1B1C /* 103254 802E19D4 00000000 */ nop /* 103258 802E19D8 080B86C1 */ j .L802E1B04 /* 10325C 802E19DC 00000000 */ nop glabel .L802E19E0 /* 103260 802E19E0 C602001C */ lwc1 $f2, 0x1C($s0) /* 103264 802E19E4 3C01802F */ lui $at, %hi(D_802EB058) /* 103268 802E19E8 D420B058 */ ldc1 $f0, %lo(D_802EB058)($at) /* 10326C 802E19EC 460010A1 */ cvt.d.s $f2, $f2 /* 103270 802E19F0 46201082 */ mul.d $f2, $f2, $f0 /* 103274 802E19F4 00000000 */ nop /* 103278 802E19F8 C6000014 */ lwc1 $f0, 0x14($s0) /* 10327C 802E19FC 462011A0 */ cvt.s.d $f6, $f2 /* 103280 802E1A00 46060000 */ add.s $f0, $f0, $f6 /* 103284 802E1A04 C6220054 */ lwc1 $f2, 0x54($s1) /* 103288 802E1A08 46020001 */ sub.s $f0, $f0, $f2 /* 10328C 802E1A0C 3C014018 */ lui $at, (0x40180000 >> 16) /* 103290 802E1A10 44811800 */ mtc1 $at, $f3 /* 103294 802E1A14 44801000 */ mtc1 $zero, $f2 /* 103298 802E1A18 46000021 */ cvt.d.s $f0, $f0 /* 10329C 802E1A1C 46220003 */ div.d $f0, $f0, $f2 /* 1032A0 802E1A20 46200120 */ cvt.s.d $f4, $f0 /* 1032A4 802E1A24 3C01802F */ lui $at, %hi(D_802EB060) /* 1032A8 802E1A28 D422B060 */ ldc1 $f2, %lo(D_802EB060)($at) /* 1032AC 802E1A2C 46002021 */ cvt.d.s $f0, $f4 /* 1032B0 802E1A30 4620103C */ c.lt.d $f2, $f0 /* 1032B4 802E1A34 00000000 */ nop /* 1032B8 802E1A38 45000004 */ bc1f .L802E1A4C /* 1032BC 802E1A3C 00000000 */ nop /* 1032C0 802E1A40 3C01BC23 */ lui $at, (0xBC23D70A >> 16) /* 1032C4 802E1A44 3421D70A */ ori $at, $at, (0xBC23D70A & 0xFFFF) /* 1032C8 802E1A48 44812000 */ mtc1 $at, $f4 .L802E1A4C: /* 1032CC 802E1A4C C6000004 */ lwc1 $f0, 0x4($s0) /* 1032D0 802E1A50 46040000 */ add.s $f0, $f0, $f4 /* 1032D4 802E1A54 E6000004 */ swc1 $f0, 0x4($s0) /* 1032D8 802E1A58 C6220054 */ lwc1 $f2, 0x54($s1) /* 1032DC 802E1A5C 46001080 */ add.s $f2, $f2, $f0 /* 1032E0 802E1A60 E6220054 */ swc1 $f2, 0x54($s1) /* 1032E4 802E1A64 C6000014 */ lwc1 $f0, 0x14($s0) /* 1032E8 802E1A68 46060000 */ add.s $f0, $f0, $f6 /* 1032EC 802E1A6C 4600103E */ c.le.s $f2, $f0 /* 1032F0 802E1A70 00000000 */ nop /* 1032F4 802E1A74 45000029 */ bc1f .L802E1B1C /* 1032F8 802E1A78 00000000 */ nop /* 1032FC 802E1A7C 080B86C1 */ j .L802E1B04 /* 103300 802E1A80 00000000 */ nop glabel .L802E1A84 /* 103304 802E1A84 C6000014 */ lwc1 $f0, 0x14($s0) /* 103308 802E1A88 C6220054 */ lwc1 $f2, 0x54($s1) /* 10330C 802E1A8C 46020001 */ sub.s $f0, $f0, $f2 /* 103310 802E1A90 3C013FD0 */ lui $at, (0x3FD00000 >> 16) /* 103314 802E1A94 44811800 */ mtc1 $at, $f3 /* 103318 802E1A98 44801000 */ mtc1 $zero, $f2 /* 10331C 802E1A9C 46000021 */ cvt.d.s $f0, $f0 /* 103320 802E1AA0 46220002 */ mul.d $f0, $f0, $f2 /* 103324 802E1AA4 00000000 */ nop /* 103328 802E1AA8 3C01802F */ lui $at, %hi(D_802EB068) /* 10332C 802E1AAC D422B068 */ ldc1 $f2, %lo(D_802EB068)($at) /* 103330 802E1AB0 46200120 */ cvt.s.d $f4, $f0 /* 103334 802E1AB4 46002021 */ cvt.d.s $f0, $f4 /* 103338 802E1AB8 4622003C */ c.lt.d $f0, $f2 /* 10333C 802E1ABC 00000000 */ nop /* 103340 802E1AC0 45000004 */ bc1f .L802E1AD4 /* 103344 802E1AC4 00000000 */ nop /* 103348 802E1AC8 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 10334C 802E1ACC 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 103350 802E1AD0 44812000 */ mtc1 $at, $f4 .L802E1AD4: /* 103354 802E1AD4 C6000004 */ lwc1 $f0, 0x4($s0) /* 103358 802E1AD8 46040000 */ add.s $f0, $f0, $f4 /* 10335C 802E1ADC E6000004 */ swc1 $f0, 0x4($s0) /* 103360 802E1AE0 C6220054 */ lwc1 $f2, 0x54($s1) /* 103364 802E1AE4 46001080 */ add.s $f2, $f2, $f0 /* 103368 802E1AE8 E6220054 */ swc1 $f2, 0x54($s1) /* 10336C 802E1AEC C6000014 */ lwc1 $f0, 0x14($s0) /* 103370 802E1AF0 4602003E */ c.le.s $f0, $f2 /* 103374 802E1AF4 00000000 */ nop /* 103378 802E1AF8 45000008 */ bc1f .L802E1B1C /* 10337C 802E1AFC 00000000 */ nop /* 103380 802E1B00 E6200054 */ swc1 $f0, 0x54($s1) .L802E1B04: /* 103384 802E1B04 92020010 */ lbu $v0, 0x10($s0) /* 103388 802E1B08 AE000004 */ sw $zero, 0x4($s0) /* 10338C 802E1B0C 24420001 */ addiu $v0, $v0, 0x1 /* 103390 802E1B10 080B86C7 */ j .L802E1B1C /* 103394 802E1B14 A2020010 */ sb $v0, 0x10($s0) glabel .L802E1B18 /* 103398 802E1B18 26520001 */ addiu $s2, $s2, 0x1 .L802E1B1C: /* 10339C 802E1B1C C6200054 */ lwc1 $f0, 0x54($s1) /* 1033A0 802E1B20 E620005C */ swc1 $f0, 0x5C($s1) /* 1033A4 802E1B24 82030011 */ lb $v1, 0x11($s0) /* 1033A8 802E1B28 2C620006 */ sltiu $v0, $v1, 0x6 /* 1033AC 802E1B2C 104000D0 */ beqz $v0, .L802E1E70 /* 1033B0 802E1B30 00031080 */ sll $v0, $v1, 2 /* 1033B4 802E1B34 3C01802F */ lui $at, %hi(jtbl_802EB070) /* 1033B8 802E1B38 00220821 */ addu $at, $at, $v0 /* 1033BC 802E1B3C 8C22B070 */ lw $v0, %lo(jtbl_802EB070)($at) /* 1033C0 802E1B40 00400008 */ jr $v0 /* 1033C4 802E1B44 00000000 */ nop glabel .L802E1B48 /* 1033C8 802E1B48 C602001C */ lwc1 $f2, 0x1C($s0) /* 1033CC 802E1B4C 3C01BFE0 */ lui $at, (0xBFE00000 >> 16) /* 1033D0 802E1B50 44810800 */ mtc1 $at, $f1 /* 1033D4 802E1B54 44800000 */ mtc1 $zero, $f0 /* 1033D8 802E1B58 460010A1 */ cvt.d.s $f2, $f2 /* 1033DC 802E1B5C 46201082 */ mul.d $f2, $f2, $f0 /* 1033E0 802E1B60 00000000 */ nop /* 1033E4 802E1B64 C6000018 */ lwc1 $f0, 0x18($s0) /* 1033E8 802E1B68 462011A0 */ cvt.s.d $f6, $f2 /* 1033EC 802E1B6C 46060000 */ add.s $f0, $f0, $f6 /* 1033F0 802E1B70 C6220058 */ lwc1 $f2, 0x58($s1) /* 1033F4 802E1B74 46020001 */ sub.s $f0, $f0, $f2 /* 1033F8 802E1B78 3C014014 */ lui $at, (0x40140000 >> 16) /* 1033FC 802E1B7C 44811800 */ mtc1 $at, $f3 /* 103400 802E1B80 44801000 */ mtc1 $zero, $f2 /* 103404 802E1B84 46000021 */ cvt.d.s $f0, $f0 /* 103408 802E1B88 46220003 */ div.d $f0, $f0, $f2 /* 10340C 802E1B8C 46200120 */ cvt.s.d $f4, $f0 /* 103410 802E1B90 3C01802F */ lui $at, %hi(D_802EB088) /* 103414 802E1B94 D422B088 */ ldc1 $f2, %lo(D_802EB088)($at) /* 103418 802E1B98 46002021 */ cvt.d.s $f0, $f4 /* 10341C 802E1B9C 4620103C */ c.lt.d $f2, $f0 /* 103420 802E1BA0 00000000 */ nop /* 103424 802E1BA4 45000004 */ bc1f .L802E1BB8 /* 103428 802E1BA8 00000000 */ nop /* 10342C 802E1BAC 3C01BC23 */ lui $at, (0xBC23D70A >> 16) /* 103430 802E1BB0 3421D70A */ ori $at, $at, (0xBC23D70A & 0xFFFF) /* 103434 802E1BB4 44812000 */ mtc1 $at, $f4 .L802E1BB8: /* 103438 802E1BB8 C6000008 */ lwc1 $f0, 0x8($s0) /* 10343C 802E1BBC 46040000 */ add.s $f0, $f0, $f4 /* 103440 802E1BC0 E6000008 */ swc1 $f0, 0x8($s0) /* 103444 802E1BC4 C6220058 */ lwc1 $f2, 0x58($s1) /* 103448 802E1BC8 46001080 */ add.s $f2, $f2, $f0 /* 10344C 802E1BCC E6220058 */ swc1 $f2, 0x58($s1) /* 103450 802E1BD0 C6000018 */ lwc1 $f0, 0x18($s0) /* 103454 802E1BD4 46060000 */ add.s $f0, $f0, $f6 /* 103458 802E1BD8 4600103E */ c.le.s $f2, $f0 /* 10345C 802E1BDC 00000000 */ nop /* 103460 802E1BE0 450000A3 */ bc1f .L802E1E70 /* 103464 802E1BE4 00000000 */ nop /* 103468 802E1BE8 080B8796 */ j .L802E1E58 /* 10346C 802E1BEC 00000000 */ nop glabel .L802E1BF0 /* 103470 802E1BF0 C602001C */ lwc1 $f2, 0x1C($s0) /* 103474 802E1BF4 3C01802F */ lui $at, %hi(D_802EB090) /* 103478 802E1BF8 D420B090 */ ldc1 $f0, %lo(D_802EB090)($at) /* 10347C 802E1BFC 460010A1 */ cvt.d.s $f2, $f2 /* 103480 802E1C00 46201082 */ mul.d $f2, $f2, $f0 /* 103484 802E1C04 00000000 */ nop /* 103488 802E1C08 C6000018 */ lwc1 $f0, 0x18($s0) /* 10348C 802E1C0C 462011A0 */ cvt.s.d $f6, $f2 /* 103490 802E1C10 46060000 */ add.s $f0, $f0, $f6 /* 103494 802E1C14 C6220058 */ lwc1 $f2, 0x58($s1) /* 103498 802E1C18 46020001 */ sub.s $f0, $f0, $f2 /* 10349C 802E1C1C 3C014024 */ lui $at, (0x40240000 >> 16) /* 1034A0 802E1C20 44811800 */ mtc1 $at, $f3 /* 1034A4 802E1C24 44801000 */ mtc1 $zero, $f2 /* 1034A8 802E1C28 46000021 */ cvt.d.s $f0, $f0 /* 1034AC 802E1C2C 46220003 */ div.d $f0, $f0, $f2 /* 1034B0 802E1C30 46200120 */ cvt.s.d $f4, $f0 /* 1034B4 802E1C34 3C01802F */ lui $at, %hi(D_802EB098) /* 1034B8 802E1C38 D422B098 */ ldc1 $f2, %lo(D_802EB098)($at) /* 1034BC 802E1C3C 46002021 */ cvt.d.s $f0, $f4 /* 1034C0 802E1C40 4622003C */ c.lt.d $f0, $f2 /* 1034C4 802E1C44 00000000 */ nop /* 1034C8 802E1C48 45000004 */ bc1f .L802E1C5C /* 1034CC 802E1C4C 00000000 */ nop /* 1034D0 802E1C50 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 1034D4 802E1C54 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 1034D8 802E1C58 44812000 */ mtc1 $at, $f4 .L802E1C5C: /* 1034DC 802E1C5C C6000008 */ lwc1 $f0, 0x8($s0) /* 1034E0 802E1C60 46040000 */ add.s $f0, $f0, $f4 /* 1034E4 802E1C64 E6000008 */ swc1 $f0, 0x8($s0) /* 1034E8 802E1C68 C6220058 */ lwc1 $f2, 0x58($s1) /* 1034EC 802E1C6C 46001080 */ add.s $f2, $f2, $f0 /* 1034F0 802E1C70 E6220058 */ swc1 $f2, 0x58($s1) /* 1034F4 802E1C74 C6000018 */ lwc1 $f0, 0x18($s0) /* 1034F8 802E1C78 46060000 */ add.s $f0, $f0, $f6 /* 1034FC 802E1C7C 4602003E */ c.le.s $f0, $f2 /* 103500 802E1C80 00000000 */ nop /* 103504 802E1C84 4500007A */ bc1f .L802E1E70 /* 103508 802E1C88 00000000 */ nop /* 10350C 802E1C8C 080B8796 */ j .L802E1E58 /* 103510 802E1C90 00000000 */ nop glabel .L802E1C94 /* 103514 802E1C94 C602001C */ lwc1 $f2, 0x1C($s0) /* 103518 802E1C98 3C01802F */ lui $at, %hi(D_802EB0A0) /* 10351C 802E1C9C D420B0A0 */ ldc1 $f0, %lo(D_802EB0A0)($at) /* 103520 802E1CA0 460010A1 */ cvt.d.s $f2, $f2 /* 103524 802E1CA4 46201082 */ mul.d $f2, $f2, $f0 /* 103528 802E1CA8 00000000 */ nop /* 10352C 802E1CAC C6000018 */ lwc1 $f0, 0x18($s0) /* 103530 802E1CB0 462011A0 */ cvt.s.d $f6, $f2 /* 103534 802E1CB4 46060000 */ add.s $f0, $f0, $f6 /* 103538 802E1CB8 C6220058 */ lwc1 $f2, 0x58($s1) /* 10353C 802E1CBC 46020001 */ sub.s $f0, $f0, $f2 /* 103540 802E1CC0 3C014014 */ lui $at, (0x40140000 >> 16) /* 103544 802E1CC4 44811800 */ mtc1 $at, $f3 /* 103548 802E1CC8 44801000 */ mtc1 $zero, $f2 /* 10354C 802E1CCC 46000021 */ cvt.d.s $f0, $f0 /* 103550 802E1CD0 46220003 */ div.d $f0, $f0, $f2 /* 103554 802E1CD4 46200120 */ cvt.s.d $f4, $f0 /* 103558 802E1CD8 3C01802F */ lui $at, %hi(D_802EB0A8) /* 10355C 802E1CDC D422B0A8 */ ldc1 $f2, %lo(D_802EB0A8)($at) /* 103560 802E1CE0 46002021 */ cvt.d.s $f0, $f4 /* 103564 802E1CE4 4620103C */ c.lt.d $f2, $f0 /* 103568 802E1CE8 00000000 */ nop /* 10356C 802E1CEC 45000004 */ bc1f .L802E1D00 /* 103570 802E1CF0 00000000 */ nop /* 103574 802E1CF4 3C01BC23 */ lui $at, (0xBC23D70A >> 16) /* 103578 802E1CF8 3421D70A */ ori $at, $at, (0xBC23D70A & 0xFFFF) /* 10357C 802E1CFC 44812000 */ mtc1 $at, $f4 .L802E1D00: /* 103580 802E1D00 C6000008 */ lwc1 $f0, 0x8($s0) /* 103584 802E1D04 46040000 */ add.s $f0, $f0, $f4 /* 103588 802E1D08 E6000008 */ swc1 $f0, 0x8($s0) /* 10358C 802E1D0C C6220058 */ lwc1 $f2, 0x58($s1) /* 103590 802E1D10 46001080 */ add.s $f2, $f2, $f0 /* 103594 802E1D14 E6220058 */ swc1 $f2, 0x58($s1) /* 103598 802E1D18 C6000018 */ lwc1 $f0, 0x18($s0) /* 10359C 802E1D1C 46060000 */ add.s $f0, $f0, $f6 /* 1035A0 802E1D20 4600103E */ c.le.s $f2, $f0 /* 1035A4 802E1D24 00000000 */ nop /* 1035A8 802E1D28 45000051 */ bc1f .L802E1E70 /* 1035AC 802E1D2C 00000000 */ nop /* 1035B0 802E1D30 080B8796 */ j .L802E1E58 /* 1035B4 802E1D34 00000000 */ nop glabel .L802E1D38 /* 1035B8 802E1D38 C602001C */ lwc1 $f2, 0x1C($s0) /* 1035BC 802E1D3C 44800000 */ mtc1 $zero, $f0 /* 1035C0 802E1D40 44800800 */ mtc1 $zero, $f1 /* 1035C4 802E1D44 460010A1 */ cvt.d.s $f2, $f2 /* 1035C8 802E1D48 46201082 */ mul.d $f2, $f2, $f0 /* 1035CC 802E1D4C 00000000 */ nop /* 1035D0 802E1D50 C6000018 */ lwc1 $f0, 0x18($s0) /* 1035D4 802E1D54 462011A0 */ cvt.s.d $f6, $f2 /* 1035D8 802E1D58 46060000 */ add.s $f0, $f0, $f6 /* 1035DC 802E1D5C C6220058 */ lwc1 $f2, 0x58($s1) /* 1035E0 802E1D60 46020001 */ sub.s $f0, $f0, $f2 /* 1035E4 802E1D64 3C014024 */ lui $at, (0x40240000 >> 16) /* 1035E8 802E1D68 44811800 */ mtc1 $at, $f3 /* 1035EC 802E1D6C 44801000 */ mtc1 $zero, $f2 /* 1035F0 802E1D70 46000021 */ cvt.d.s $f0, $f0 /* 1035F4 802E1D74 46220003 */ div.d $f0, $f0, $f2 /* 1035F8 802E1D78 46200120 */ cvt.s.d $f4, $f0 /* 1035FC 802E1D7C 3C01802F */ lui $at, %hi(D_802EB0B0) /* 103600 802E1D80 D422B0B0 */ ldc1 $f2, %lo(D_802EB0B0)($at) /* 103604 802E1D84 46002021 */ cvt.d.s $f0, $f4 /* 103608 802E1D88 4622003C */ c.lt.d $f0, $f2 /* 10360C 802E1D8C 00000000 */ nop /* 103610 802E1D90 45000004 */ bc1f .L802E1DA4 /* 103614 802E1D94 00000000 */ nop /* 103618 802E1D98 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 10361C 802E1D9C 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 103620 802E1DA0 44812000 */ mtc1 $at, $f4 .L802E1DA4: /* 103624 802E1DA4 C6000008 */ lwc1 $f0, 0x8($s0) /* 103628 802E1DA8 46040000 */ add.s $f0, $f0, $f4 /* 10362C 802E1DAC E6000008 */ swc1 $f0, 0x8($s0) /* 103630 802E1DB0 C6220058 */ lwc1 $f2, 0x58($s1) /* 103634 802E1DB4 46001080 */ add.s $f2, $f2, $f0 /* 103638 802E1DB8 E6220058 */ swc1 $f2, 0x58($s1) /* 10363C 802E1DBC C6000018 */ lwc1 $f0, 0x18($s0) /* 103640 802E1DC0 46060000 */ add.s $f0, $f0, $f6 /* 103644 802E1DC4 4602003E */ c.le.s $f0, $f2 /* 103648 802E1DC8 00000000 */ nop /* 10364C 802E1DCC 45000028 */ bc1f .L802E1E70 /* 103650 802E1DD0 00000000 */ nop /* 103654 802E1DD4 080B8796 */ j .L802E1E58 /* 103658 802E1DD8 00000000 */ nop glabel .L802E1DDC /* 10365C 802E1DDC C6000018 */ lwc1 $f0, 0x18($s0) /* 103660 802E1DE0 C6220058 */ lwc1 $f2, 0x58($s1) /* 103664 802E1DE4 46020001 */ sub.s $f0, $f0, $f2 /* 103668 802E1DE8 3C014014 */ lui $at, (0x40140000 >> 16) /* 10366C 802E1DEC 44811800 */ mtc1 $at, $f3 /* 103670 802E1DF0 44801000 */ mtc1 $zero, $f2 /* 103674 802E1DF4 46000021 */ cvt.d.s $f0, $f0 /* 103678 802E1DF8 46220003 */ div.d $f0, $f0, $f2 /* 10367C 802E1DFC 46200120 */ cvt.s.d $f4, $f0 /* 103680 802E1E00 3C01802F */ lui $at, %hi(D_802EB0B8) /* 103684 802E1E04 D422B0B8 */ ldc1 $f2, %lo(D_802EB0B8)($at) /* 103688 802E1E08 46002021 */ cvt.d.s $f0, $f4 /* 10368C 802E1E0C 4620103C */ c.lt.d $f2, $f0 /* 103690 802E1E10 00000000 */ nop /* 103694 802E1E14 45000004 */ bc1f .L802E1E28 /* 103698 802E1E18 00000000 */ nop /* 10369C 802E1E1C 3C01BC23 */ lui $at, (0xBC23D70A >> 16) /* 1036A0 802E1E20 3421D70A */ ori $at, $at, (0xBC23D70A & 0xFFFF) /* 1036A4 802E1E24 44812000 */ mtc1 $at, $f4 .L802E1E28: /* 1036A8 802E1E28 C6000008 */ lwc1 $f0, 0x8($s0) /* 1036AC 802E1E2C 46040000 */ add.s $f0, $f0, $f4 /* 1036B0 802E1E30 E6000008 */ swc1 $f0, 0x8($s0) /* 1036B4 802E1E34 C6220058 */ lwc1 $f2, 0x58($s1) /* 1036B8 802E1E38 46001080 */ add.s $f2, $f2, $f0 /* 1036BC 802E1E3C E6220058 */ swc1 $f2, 0x58($s1) /* 1036C0 802E1E40 C6000018 */ lwc1 $f0, 0x18($s0) /* 1036C4 802E1E44 4600103E */ c.le.s $f2, $f0 /* 1036C8 802E1E48 00000000 */ nop /* 1036CC 802E1E4C 45000008 */ bc1f .L802E1E70 /* 1036D0 802E1E50 00000000 */ nop /* 1036D4 802E1E54 E6200058 */ swc1 $f0, 0x58($s1) .L802E1E58: /* 1036D8 802E1E58 92020011 */ lbu $v0, 0x11($s0) /* 1036DC 802E1E5C AE000008 */ sw $zero, 0x8($s0) /* 1036E0 802E1E60 24420001 */ addiu $v0, $v0, 0x1 /* 1036E4 802E1E64 080B879C */ j .L802E1E70 /* 1036E8 802E1E68 A2020011 */ sb $v0, 0x11($s0) glabel .L802E1E6C /* 1036EC 802E1E6C 26520001 */ addiu $s2, $s2, 0x1 .L802E1E70: /* 1036F0 802E1E70 0C0B854F */ jal entity_switch_fall_down /* 1036F4 802E1E74 0220202D */ daddu $a0, $s1, $zero /* 1036F8 802E1E78 24020002 */ addiu $v0, $zero, 0x2 /* 1036FC 802E1E7C 16420004 */ bne $s2, $v0, .L802E1E90 /* 103700 802E1E80 0220202D */ daddu $a0, $s1, $zero /* 103704 802E1E84 A2000010 */ sb $zero, 0x10($s0) /* 103708 802E1E88 0C043F5A */ jal exec_entity_commandlist /* 10370C 802E1E8C A2000011 */ sb $zero, 0x11($s0) .L802E1E90: /* 103710 802E1E90 8FBF001C */ lw $ra, 0x1C($sp) /* 103714 802E1E94 8FB20018 */ lw $s2, 0x18($sp) /* 103718 802E1E98 8FB10014 */ lw $s1, 0x14($sp) /* 10371C 802E1E9C 8FB00010 */ lw $s0, 0x10($sp) /* 103720 802E1EA0 03E00008 */ jr $ra /* 103724 802E1EA4 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: s32 entity_RedSwitch_animate_scale(Entity* entity) { f32 phi_f4; f32 temp_f6; SwitchData* data = entity->dataBuf.swtch; s32 phi_s2 = 0; switch (data->animStateScaleX) { case 0: temp_f6 = data->baseScale.z * 0.3; phi_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 4.0; if (phi_f4 < 0.01) { phi_f4 = 0.01f; } data->deltaScaleX += phi_f4; entity->scale.x += data->deltaScaleX; if ((data->baseScale.x + temp_f6) <= entity->scale.x) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 1: temp_f6 = data->baseScale.z * -0.2; phi_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 6.0; if (phi_f4 > -0.01) { phi_f4 = -0.01f; } data->deltaScaleX += phi_f4; entity->scale.x += data->deltaScaleX; if (entity->scale.x <= (data->baseScale.x + temp_f6)) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 2: temp_f6 = data->baseScale.z * 0.15; phi_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 4.0; if (phi_f4 < 0.01) { phi_f4 = 0.01f; } data->deltaScaleX += phi_f4; entity->scale.x += data->deltaScaleX; if ((data->baseScale.x + temp_f6) <= entity->scale.x) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 3: temp_f6 = data->baseScale.z * -0.1; phi_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 6.0; if (phi_f4 > -0.01) { phi_f4 = -0.01f; } data->deltaScaleX += phi_f4; entity->scale.x += data->deltaScaleX; if (entity->scale.x <= (data->baseScale.x + temp_f6)) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 4: phi_f4 = (data->baseScale.x - entity->scale.x) / 4.0; if (phi_f4 < 0.01) { phi_f4 = 0.01f; } data->deltaScaleX += phi_f4; entity->scale.x += data->deltaScaleX; if (data->baseScale.x <= entity->scale.x) { entity->scale.x = data->baseScale.x; data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 5: phi_s2++; break; } entity->scale.z = entity->scale.x; switch (data->animStateScaleY) { case 0: temp_f6 = data->baseScale.z * -0.5; phi_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 5.0; if (phi_f4 > -0.01) { phi_f4 = -0.01f; } data->deltaScaleY += phi_f4; entity->scale.y += data->deltaScaleY; if (entity->scale.y <= (data->baseScale.y + temp_f6)) { data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 1: temp_f6 = data->baseScale.z * 0.1; phi_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 10.0; if (phi_f4 < 0.01) { phi_f4 = 0.01f; } data->deltaScaleY += phi_f4; entity->scale.y += data->deltaScaleY; if ((data->baseScale.y + temp_f6) <= entity->scale.y) { data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 2: temp_f6 = data->baseScale.z * -0.3; phi_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 5.0; if (phi_f4 > -0.01) { phi_f4 = -0.01f; } data->deltaScaleY += phi_f4; entity->scale.y += data->deltaScaleY; if (entity->scale.y <= (data->baseScale.y + temp_f6)) { data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 3: temp_f6 = data->baseScale.z * 0.0; phi_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 10.0; if (phi_f4 < 0.01) { phi_f4 = 0.01f; } data->deltaScaleY += phi_f4; entity->scale.y += data->deltaScaleY; if ((data->baseScale.y + temp_f6) <= entity->scale.y) { data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 4: phi_f4 = (data->baseScale.y - entity->scale.y) / 5.0; if (phi_f4 > -0.01) { phi_f4 = -0.01f; } data->deltaScaleY += phi_f4; entity->scale.y += data->deltaScaleY; if (entity->scale.y <= data->baseScale.y) { entity->scale.y = data->baseScale.y; data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 5: phi_s2++; break; } entity_switch_fall_down(entity); if (phi_s2 == 2) { data->animStateScaleX = 0; data->animStateScaleY = 0; exec_entity_commandlist(entity); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_tile_header /* AB46C 80114D6C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* AB470 80114D70 AFB40038 */ sw $s4, 0x38($sp) /* AB474 80114D74 00A0A02D */ daddu $s4, $a1, $zero /* AB478 80114D78 AFBF004C */ sw $ra, 0x4C($sp) /* AB47C 80114D7C AFBE0048 */ sw $fp, 0x48($sp) /* AB480 80114D80 AFB70044 */ sw $s7, 0x44($sp) /* AB484 80114D84 AFB60040 */ sw $s6, 0x40($sp) /* AB488 80114D88 AFB5003C */ sw $s5, 0x3C($sp) /* AB48C 80114D8C AFB30034 */ sw $s3, 0x34($sp) /* AB490 80114D90 AFB20030 */ sw $s2, 0x30($sp) /* AB494 80114D94 AFB1002C */ sw $s1, 0x2C($sp) /* AB498 80114D98 AFB00028 */ sw $s0, 0x28($sp) /* AB49C 80114D9C AFA60058 */ sw $a2, 0x58($sp) /* AB4A0 80114DA0 AFA00020 */ sw $zero, 0x20($sp) /* AB4A4 80114DA4 8C970008 */ lw $s7, 0x8($a0) /* AB4A8 80114DA8 12E0017B */ beqz $s7, .L80115398 /* AB4AC 80114DAC 0280F02D */ daddu $fp, $s4, $zero /* AB4B0 80114DB0 8FA80058 */ lw $t0, 0x58($sp) /* AB4B4 80114DB4 03C81021 */ addu $v0, $fp, $t0 /* AB4B8 80114DB8 03C2102B */ sltu $v0, $fp, $v0 /* AB4BC 80114DBC 10400171 */ beqz $v0, .L80115384 /* AB4C0 80114DC0 24160001 */ addiu $s6, $zero, 0x1 /* AB4C4 80114DC4 3C128015 */ lui $s2, %hi(gCurrentTileDescriptor) /* AB4C8 80114DC8 26521740 */ addiu $s2, $s2, %lo(gCurrentTileDescriptor) /* AB4CC 80114DCC 0280202D */ daddu $a0, $s4, $zero .L80114DD0: /* AB4D0 80114DD0 3C068015 */ lui $a2, %hi(gCurrentTileDescriptor) /* AB4D4 80114DD4 24C61740 */ addiu $a2, $a2, %lo(gCurrentTileDescriptor) /* AB4D8 80114DD8 0C00A5CF */ jal dma_copy /* AB4DC 80114DDC 26850030 */ addiu $a1, $s4, 0x30 /* AB4E0 80114DE0 96430022 */ lhu $v1, 0x22($s2) /* AB4E4 80114DE4 96460026 */ lhu $a2, 0x26($s2) /* AB4E8 80114DE8 00660018 */ mult $v1, $a2 /* AB4EC 80114DEC 9642002C */ lhu $v0, 0x2C($s2) /* AB4F0 80114DF0 30420F00 */ andi $v0, $v0, 0xF00 /* AB4F4 80114DF4 00008012 */ mflo $s0 /* AB4F8 80114DF8 14400047 */ bnez $v0, .L80114F18 /* AB4FC 80114DFC 0060382D */ daddu $a3, $v1, $zero /* AB500 80114E00 92420029 */ lbu $v0, 0x29($s2) /* AB504 80114E04 54560120 */ bnel $v0, $s6, .L80115288 /* AB508 80114E08 00108042 */ srl $s0, $s0, 1 /* AB50C 80114E0C 24040002 */ addiu $a0, $zero, 0x2 /* AB510 80114E10 14800002 */ bnez $a0, .L80114E1C /* AB514 80114E14 0064001A */ div $zero, $v1, $a0 /* AB518 80114E18 0007000D */ break 7 .L80114E1C: /* AB51C 80114E1C 2401FFFF */ addiu $at, $zero, -0x1 /* AB520 80114E20 14810004 */ bne $a0, $at, .L80114E34 /* AB524 80114E24 3C018000 */ lui $at, (0x80000000 >> 16) /* AB528 80114E28 14610002 */ bne $v1, $at, .L80114E34 /* AB52C 80114E2C 00000000 */ nop /* AB530 80114E30 0006000D */ break 6 .L80114E34: /* AB534 80114E34 00001012 */ mflo $v0 /* AB538 80114E38 28420010 */ slti $v0, $v0, 0x10 /* AB53C 80114E3C 54400112 */ bnel $v0, $zero, .L80115288 /* AB540 80114E40 00108042 */ srl $s0, $s0, 1 .L80114E44: /* AB544 80114E44 14800002 */ bnez $a0, .L80114E50 /* AB548 80114E48 00C4001A */ div $zero, $a2, $a0 /* AB54C 80114E4C 0007000D */ break 7 .L80114E50: /* AB550 80114E50 2401FFFF */ addiu $at, $zero, -0x1 /* AB554 80114E54 14810004 */ bne $a0, $at, .L80114E68 /* AB558 80114E58 3C018000 */ lui $at, (0x80000000 >> 16) /* AB55C 80114E5C 14C10002 */ bne $a2, $at, .L80114E68 /* AB560 80114E60 00000000 */ nop /* AB564 80114E64 0006000D */ break 6 .L80114E68: /* AB568 80114E68 00001012 */ mflo $v0 /* AB56C 80114E6C 58400106 */ blezl $v0, .L80115288 /* AB570 80114E70 00108042 */ srl $s0, $s0, 1 /* AB574 80114E74 14800002 */ bnez $a0, .L80114E80 /* AB578 80114E78 00E4001A */ div $zero, $a3, $a0 /* AB57C 80114E7C 0007000D */ break 7 .L80114E80: /* AB580 80114E80 2401FFFF */ addiu $at, $zero, -0x1 /* AB584 80114E84 14810004 */ bne $a0, $at, .L80114E98 /* AB588 80114E88 3C018000 */ lui $at, (0x80000000 >> 16) /* AB58C 80114E8C 14E10002 */ bne $a3, $at, .L80114E98 /* AB590 80114E90 00000000 */ nop /* AB594 80114E94 0006000D */ break 6 .L80114E98: /* AB598 80114E98 00001012 */ mflo $v0 /* AB59C 80114E9C 00000000 */ nop /* AB5A0 80114EA0 00000000 */ nop /* AB5A4 80114EA4 00460018 */ mult $v0, $a2 /* AB5A8 80114EA8 00001812 */ mflo $v1 /* AB5AC 80114EAC 00000000 */ nop /* AB5B0 80114EB0 14800002 */ bnez $a0, .L80114EBC /* AB5B4 80114EB4 0064001A */ div $zero, $v1, $a0 /* AB5B8 80114EB8 0007000D */ break 7 .L80114EBC: /* AB5BC 80114EBC 2401FFFF */ addiu $at, $zero, -0x1 /* AB5C0 80114EC0 14810004 */ bne $a0, $at, .L80114ED4 /* AB5C4 80114EC4 3C018000 */ lui $at, (0x80000000 >> 16) /* AB5C8 80114EC8 14610002 */ bne $v1, $at, .L80114ED4 /* AB5CC 80114ECC 00000000 */ nop /* AB5D0 80114ED0 0006000D */ break 6 .L80114ED4: /* AB5D4 80114ED4 00001812 */ mflo $v1 /* AB5D8 80114ED8 00042040 */ sll $a0, $a0, 1 /* AB5DC 80114EDC 14800002 */ bnez $a0, .L80114EE8 /* AB5E0 80114EE0 00E4001A */ div $zero, $a3, $a0 /* AB5E4 80114EE4 0007000D */ break 7 .L80114EE8: /* AB5E8 80114EE8 2401FFFF */ addiu $at, $zero, -0x1 /* AB5EC 80114EEC 14810004 */ bne $a0, $at, .L80114F00 /* AB5F0 80114EF0 3C018000 */ lui $at, (0x80000000 >> 16) /* AB5F4 80114EF4 14E10002 */ bne $a3, $at, .L80114F00 /* AB5F8 80114EF8 00000000 */ nop /* AB5FC 80114EFC 0006000D */ break 6 .L80114F00: /* AB600 80114F00 00001012 */ mflo $v0 /* AB604 80114F04 28420010 */ slti $v0, $v0, 0x10 /* AB608 80114F08 1040FFCE */ beqz $v0, .L80114E44 /* AB60C 80114F0C 02038021 */ addu $s0, $s0, $v1 /* AB610 80114F10 080454A2 */ j .L80115288 /* AB614 80114F14 00108042 */ srl $s0, $s0, 1 .L80114F18: /* AB618 80114F18 24080100 */ addiu $t0, $zero, 0x100 /* AB61C 80114F1C 14480044 */ bne $v0, $t0, .L80115030 /* AB620 80114F20 00000000 */ nop /* AB624 80114F24 92420029 */ lbu $v0, 0x29($s2) /* AB628 80114F28 145600D7 */ bne $v0, $s6, .L80115288 /* AB62C 80114F2C 24050002 */ addiu $a1, $zero, 0x2 /* AB630 80114F30 14A00002 */ bnez $a1, .L80114F3C /* AB634 80114F34 0065001A */ div $zero, $v1, $a1 /* AB638 80114F38 0007000D */ break 7 .L80114F3C: /* AB63C 80114F3C 2401FFFF */ addiu $at, $zero, -0x1 /* AB640 80114F40 14A10004 */ bne $a1, $at, .L80114F54 /* AB644 80114F44 3C018000 */ lui $at, (0x80000000 >> 16) /* AB648 80114F48 14610002 */ bne $v1, $at, .L80114F54 /* AB64C 80114F4C 00000000 */ nop /* AB650 80114F50 0006000D */ break 6 .L80114F54: /* AB654 80114F54 00001012 */ mflo $v0 .L80114F58: /* AB658 80114F58 28420008 */ slti $v0, $v0, 0x8 /* AB65C 80114F5C 144000CA */ bnez $v0, .L80115288 /* AB660 80114F60 00000000 */ nop /* AB664 80114F64 14A00002 */ bnez $a1, .L80114F70 /* AB668 80114F68 00C5001A */ div $zero, $a2, $a1 /* AB66C 80114F6C 0007000D */ break 7 .L80114F70: /* AB670 80114F70 2401FFFF */ addiu $at, $zero, -0x1 /* AB674 80114F74 14A10004 */ bne $a1, $at, .L80114F88 /* AB678 80114F78 3C018000 */ lui $at, (0x80000000 >> 16) /* AB67C 80114F7C 14C10002 */ bne $a2, $at, .L80114F88 /* AB680 80114F80 00000000 */ nop /* AB684 80114F84 0006000D */ break 6 .L80114F88: /* AB688 80114F88 00001012 */ mflo $v0 /* AB68C 80114F8C 184000BE */ blez $v0, .L80115288 /* AB690 80114F90 00000000 */ nop /* AB694 80114F94 96430022 */ lhu $v1, 0x22($s2) /* AB698 80114F98 14A00002 */ bnez $a1, .L80114FA4 /* AB69C 80114F9C 0065001A */ div $zero, $v1, $a1 /* AB6A0 80114FA0 0007000D */ break 7 .L80114FA4: /* AB6A4 80114FA4 2401FFFF */ addiu $at, $zero, -0x1 /* AB6A8 80114FA8 14A10004 */ bne $a1, $at, .L80114FBC /* AB6AC 80114FAC 3C018000 */ lui $at, (0x80000000 >> 16) /* AB6B0 80114FB0 14610002 */ bne $v1, $at, .L80114FBC /* AB6B4 80114FB4 00000000 */ nop /* AB6B8 80114FB8 0006000D */ break 6 .L80114FBC: /* AB6BC 80114FBC 00001012 */ mflo $v0 /* AB6C0 80114FC0 00000000 */ nop /* AB6C4 80114FC4 00000000 */ nop /* AB6C8 80114FC8 00460018 */ mult $v0, $a2 /* AB6CC 80114FCC 00004812 */ mflo $t1 /* AB6D0 80114FD0 00000000 */ nop /* AB6D4 80114FD4 14A00002 */ bnez $a1, .L80114FE0 /* AB6D8 80114FD8 0125001A */ div $zero, $t1, $a1 /* AB6DC 80114FDC 0007000D */ break 7 .L80114FE0: /* AB6E0 80114FE0 2401FFFF */ addiu $at, $zero, -0x1 /* AB6E4 80114FE4 14A10004 */ bne $a1, $at, .L80114FF8 /* AB6E8 80114FE8 3C018000 */ lui $at, (0x80000000 >> 16) /* AB6EC 80114FEC 15210002 */ bne $t1, $at, .L80114FF8 /* AB6F0 80114FF0 00000000 */ nop /* AB6F4 80114FF4 0006000D */ break 6 .L80114FF8: /* AB6F8 80114FF8 00002012 */ mflo $a0 /* AB6FC 80114FFC 00052840 */ sll $a1, $a1, 1 /* AB700 80115000 14A00002 */ bnez $a1, .L8011500C /* AB704 80115004 0065001A */ div $zero, $v1, $a1 /* AB708 80115008 0007000D */ break 7 .L8011500C: /* AB70C 8011500C 2401FFFF */ addiu $at, $zero, -0x1 /* AB710 80115010 14A10004 */ bne $a1, $at, .L80115024 /* AB714 80115014 3C018000 */ lui $at, (0x80000000 >> 16) /* AB718 80115018 14610002 */ bne $v1, $at, .L80115024 /* AB71C 8011501C 00000000 */ nop /* AB720 80115020 0006000D */ break 6 .L80115024: /* AB724 80115024 00001012 */ mflo $v0 /* AB728 80115028 080453D6 */ j .L80114F58 /* AB72C 8011502C 02048021 */ addu $s0, $s0, $a0 .L80115030: /* AB730 80115030 9642002C */ lhu $v0, 0x2C($s2) /* AB734 80115034 30430F00 */ andi $v1, $v0, 0xF00 /* AB738 80115038 24020200 */ addiu $v0, $zero, 0x200 /* AB73C 8011503C 14620049 */ bne $v1, $v0, .L80115164 /* AB740 80115040 24020300 */ addiu $v0, $zero, 0x300 /* AB744 80115044 92420029 */ lbu $v0, 0x29($s2) /* AB748 80115048 5456008F */ bnel $v0, $s6, .L80115288 /* AB74C 8011504C 00108040 */ sll $s0, $s0, 1 /* AB750 80115050 96470022 */ lhu $a3, 0x22($s2) /* AB754 80115054 24040002 */ addiu $a0, $zero, 0x2 /* AB758 80115058 14800002 */ bnez $a0, .L80115064 /* AB75C 8011505C 00E4001A */ div $zero, $a3, $a0 /* AB760 80115060 0007000D */ break 7 .L80115064: /* AB764 80115064 2401FFFF */ addiu $at, $zero, -0x1 /* AB768 80115068 14810004 */ bne $a0, $at, .L8011507C /* AB76C 8011506C 3C018000 */ lui $at, (0x80000000 >> 16) /* AB770 80115070 14E10002 */ bne $a3, $at, .L8011507C /* AB774 80115074 00000000 */ nop /* AB778 80115078 0006000D */ break 6 .L8011507C: /* AB77C 8011507C 00001012 */ mflo $v0 /* AB780 80115080 28420004 */ slti $v0, $v0, 0x4 /* AB784 80115084 54400080 */ bnel $v0, $zero, .L80115288 /* AB788 80115088 00108040 */ sll $s0, $s0, 1 /* AB78C 8011508C 96460026 */ lhu $a2, 0x26($s2) .L80115090: /* AB790 80115090 14800002 */ bnez $a0, .L8011509C /* AB794 80115094 00C4001A */ div $zero, $a2, $a0 /* AB798 80115098 0007000D */ break 7 .L8011509C: /* AB79C 8011509C 2401FFFF */ addiu $at, $zero, -0x1 /* AB7A0 801150A0 14810004 */ bne $a0, $at, .L801150B4 /* AB7A4 801150A4 3C018000 */ lui $at, (0x80000000 >> 16) /* AB7A8 801150A8 14C10002 */ bne $a2, $at, .L801150B4 /* AB7AC 801150AC 00000000 */ nop /* AB7B0 801150B0 0006000D */ break 6 .L801150B4: /* AB7B4 801150B4 00001012 */ mflo $v0 /* AB7B8 801150B8 58400073 */ blezl $v0, .L80115288 /* AB7BC 801150BC 00108040 */ sll $s0, $s0, 1 /* AB7C0 801150C0 14800002 */ bnez $a0, .L801150CC /* AB7C4 801150C4 00E4001A */ div $zero, $a3, $a0 /* AB7C8 801150C8 0007000D */ break 7 .L801150CC: /* AB7CC 801150CC 2401FFFF */ addiu $at, $zero, -0x1 /* AB7D0 801150D0 14810004 */ bne $a0, $at, .L801150E4 /* AB7D4 801150D4 3C018000 */ lui $at, (0x80000000 >> 16) /* AB7D8 801150D8 14E10002 */ bne $a3, $at, .L801150E4 /* AB7DC 801150DC 00000000 */ nop /* AB7E0 801150E0 0006000D */ break 6 .L801150E4: /* AB7E4 801150E4 00001012 */ mflo $v0 /* AB7E8 801150E8 00000000 */ nop /* AB7EC 801150EC 00000000 */ nop /* AB7F0 801150F0 00460018 */ mult $v0, $a2 /* AB7F4 801150F4 00001812 */ mflo $v1 /* AB7F8 801150F8 00000000 */ nop /* AB7FC 801150FC 14800002 */ bnez $a0, .L80115108 /* AB800 80115100 0064001A */ div $zero, $v1, $a0 /* AB804 80115104 0007000D */ break 7 .L80115108: /* AB808 80115108 2401FFFF */ addiu $at, $zero, -0x1 /* AB80C 8011510C 14810004 */ bne $a0, $at, .L80115120 /* AB810 80115110 3C018000 */ lui $at, (0x80000000 >> 16) /* AB814 80115114 14610002 */ bne $v1, $at, .L80115120 /* AB818 80115118 00000000 */ nop /* AB81C 8011511C 0006000D */ break 6 .L80115120: /* AB820 80115120 00001812 */ mflo $v1 /* AB824 80115124 00042040 */ sll $a0, $a0, 1 /* AB828 80115128 14800002 */ bnez $a0, .L80115134 /* AB82C 8011512C 00E4001A */ div $zero, $a3, $a0 /* AB830 80115130 0007000D */ break 7 .L80115134: /* AB834 80115134 2401FFFF */ addiu $at, $zero, -0x1 /* AB838 80115138 14810004 */ bne $a0, $at, .L8011514C /* AB83C 8011513C 3C018000 */ lui $at, (0x80000000 >> 16) /* AB840 80115140 14E10002 */ bne $a3, $at, .L8011514C /* AB844 80115144 00000000 */ nop /* AB848 80115148 0006000D */ break 6 .L8011514C: /* AB84C 8011514C 00001012 */ mflo $v0 /* AB850 80115150 28420004 */ slti $v0, $v0, 0x4 /* AB854 80115154 1040FFCE */ beqz $v0, .L80115090 /* AB858 80115158 02038021 */ addu $s0, $s0, $v1 /* AB85C 8011515C 080454A2 */ j .L80115288 /* AB860 80115160 00108040 */ sll $s0, $s0, 1 .L80115164: /* AB864 80115164 14620048 */ bne $v1, $v0, .L80115288 /* AB868 80115168 00000000 */ nop /* AB86C 8011516C 92420029 */ lbu $v0, 0x29($s2) /* AB870 80115170 54560045 */ bnel $v0, $s6, .L80115288 /* AB874 80115174 00108080 */ sll $s0, $s0, 2 /* AB878 80115178 96470022 */ lhu $a3, 0x22($s2) /* AB87C 8011517C 24040002 */ addiu $a0, $zero, 0x2 /* AB880 80115180 14800002 */ bnez $a0, .L8011518C /* AB884 80115184 00E4001A */ div $zero, $a3, $a0 /* AB888 80115188 0007000D */ break 7 .L8011518C: /* AB88C 8011518C 2401FFFF */ addiu $at, $zero, -0x1 /* AB890 80115190 14810004 */ bne $a0, $at, .L801151A4 /* AB894 80115194 3C018000 */ lui $at, (0x80000000 >> 16) /* AB898 80115198 14E10002 */ bne $a3, $at, .L801151A4 /* AB89C 8011519C 00000000 */ nop /* AB8A0 801151A0 0006000D */ break 6 .L801151A4: /* AB8A4 801151A4 00001012 */ mflo $v0 /* AB8A8 801151A8 0044102A */ slt $v0, $v0, $a0 /* AB8AC 801151AC 54400036 */ bnel $v0, $zero, .L80115288 /* AB8B0 801151B0 00108080 */ sll $s0, $s0, 2 /* AB8B4 801151B4 96460026 */ lhu $a2, 0x26($s2) .L801151B8: /* AB8B8 801151B8 14800002 */ bnez $a0, .L801151C4 /* AB8BC 801151BC 00C4001A */ div $zero, $a2, $a0 /* AB8C0 801151C0 0007000D */ break 7 .L801151C4: /* AB8C4 801151C4 2401FFFF */ addiu $at, $zero, -0x1 /* AB8C8 801151C8 14810004 */ bne $a0, $at, .L801151DC /* AB8CC 801151CC 3C018000 */ lui $at, (0x80000000 >> 16) /* AB8D0 801151D0 14C10002 */ bne $a2, $at, .L801151DC /* AB8D4 801151D4 00000000 */ nop /* AB8D8 801151D8 0006000D */ break 6 .L801151DC: /* AB8DC 801151DC 00001012 */ mflo $v0 /* AB8E0 801151E0 58400029 */ blezl $v0, .L80115288 /* AB8E4 801151E4 00108080 */ sll $s0, $s0, 2 /* AB8E8 801151E8 14800002 */ bnez $a0, .L801151F4 /* AB8EC 801151EC 00E4001A */ div $zero, $a3, $a0 /* AB8F0 801151F0 0007000D */ break 7 .L801151F4: /* AB8F4 801151F4 2401FFFF */ addiu $at, $zero, -0x1 /* AB8F8 801151F8 14810004 */ bne $a0, $at, .L8011520C /* AB8FC 801151FC 3C018000 */ lui $at, (0x80000000 >> 16) /* AB900 80115200 14E10002 */ bne $a3, $at, .L8011520C /* AB904 80115204 00000000 */ nop /* AB908 80115208 0006000D */ break 6 .L8011520C: /* AB90C 8011520C 00001012 */ mflo $v0 /* AB910 80115210 00000000 */ nop /* AB914 80115214 00000000 */ nop /* AB918 80115218 00460018 */ mult $v0, $a2 /* AB91C 8011521C 00001812 */ mflo $v1 /* AB920 80115220 00000000 */ nop /* AB924 80115224 14800002 */ bnez $a0, .L80115230 /* AB928 80115228 0064001A */ div $zero, $v1, $a0 /* AB92C 8011522C 0007000D */ break 7 .L80115230: /* AB930 80115230 2401FFFF */ addiu $at, $zero, -0x1 /* AB934 80115234 14810004 */ bne $a0, $at, .L80115248 /* AB938 80115238 3C018000 */ lui $at, (0x80000000 >> 16) /* AB93C 8011523C 14610002 */ bne $v1, $at, .L80115248 /* AB940 80115240 00000000 */ nop /* AB944 80115244 0006000D */ break 6 .L80115248: /* AB948 80115248 00001812 */ mflo $v1 /* AB94C 8011524C 00042040 */ sll $a0, $a0, 1 /* AB950 80115250 14800002 */ bnez $a0, .L8011525C /* AB954 80115254 00E4001A */ div $zero, $a3, $a0 /* AB958 80115258 0007000D */ break 7 .L8011525C: /* AB95C 8011525C 2401FFFF */ addiu $at, $zero, -0x1 /* AB960 80115260 14810004 */ bne $a0, $at, .L80115274 /* AB964 80115264 3C018000 */ lui $at, (0x80000000 >> 16) /* AB968 80115268 14E10002 */ bne $a3, $at, .L80115274 /* AB96C 8011526C 00000000 */ nop /* AB970 80115270 0006000D */ break 6 .L80115274: /* AB974 80115274 00001012 */ mflo $v0 /* AB978 80115278 28420002 */ slti $v0, $v0, 0x2 /* AB97C 8011527C 1040FFCE */ beqz $v0, .L801151B8 /* AB980 80115280 02038021 */ addu $s0, $s0, $v1 /* AB984 80115284 00108080 */ sll $s0, $s0, 2 .L80115288: /* AB988 80115288 9642002A */ lhu $v0, 0x2A($s2) /* AB98C 8011528C 24030002 */ addiu $v1, $zero, 0x2 /* AB990 80115290 3042000F */ andi $v0, $v0, 0xF /* AB994 80115294 14430007 */ bne $v0, $v1, .L801152B4 /* AB998 80115298 0000A82D */ daddu $s5, $zero, $zero /* AB99C 8011529C 9642002C */ lhu $v0, 0x2C($s2) /* AB9A0 801152A0 24080100 */ addiu $t0, $zero, 0x100 /* AB9A4 801152A4 30420F00 */ andi $v0, $v0, 0xF00 /* AB9A8 801152A8 14480002 */ bne $v0, $t0, .L801152B4 /* AB9AC 801152AC 24150020 */ addiu $s5, $zero, 0x20 /* AB9B0 801152B0 24150200 */ addiu $s5, $zero, 0x200 .L801152B4: /* AB9B4 801152B4 92430029 */ lbu $v1, 0x29($s2) /* AB9B8 801152B8 24020003 */ addiu $v0, $zero, 0x3 /* AB9BC 801152BC 1462001F */ bne $v1, $v0, .L8011533C /* AB9C0 801152C0 0000982D */ daddu $s3, $zero, $zero /* AB9C4 801152C4 96440020 */ lhu $a0, 0x20($s2) /* AB9C8 801152C8 96420024 */ lhu $v0, 0x24($s2) /* AB9CC 801152CC 00820018 */ mult $a0, $v0 /* AB9D0 801152D0 9643002C */ lhu $v1, 0x2C($s2) /* AB9D4 801152D4 3063F000 */ andi $v1, $v1, 0xF000 /* AB9D8 801152D8 00008812 */ mflo $s1 /* AB9DC 801152DC 14600003 */ bnez $v1, .L801152EC /* AB9E0 801152E0 24081000 */ addiu $t0, $zero, 0x1000 /* AB9E4 801152E4 080454C3 */ j .L8011530C /* AB9E8 801152E8 00118842 */ srl $s1, $s1, 1 .L801152EC: /* AB9EC 801152EC 10680007 */ beq $v1, $t0, .L8011530C /* AB9F0 801152F0 24022000 */ addiu $v0, $zero, 0x2000 /* AB9F4 801152F4 14620003 */ bne $v1, $v0, .L80115304 /* AB9F8 801152F8 24023000 */ addiu $v0, $zero, 0x3000 /* AB9FC 801152FC 080454C3 */ j .L8011530C /* ABA00 80115300 00118840 */ sll $s1, $s1, 1 .L80115304: /* ABA04 80115304 50620001 */ beql $v1, $v0, .L8011530C /* ABA08 80115308 00118880 */ sll $s1, $s1, 2 .L8011530C: /* ABA0C 8011530C 9642002A */ lhu $v0, 0x2A($s2) /* ABA10 80115310 24030020 */ addiu $v1, $zero, 0x20 /* ABA14 80115314 304200F0 */ andi $v0, $v0, 0xF0 /* ABA18 80115318 14430009 */ bne $v0, $v1, .L80115340 /* ABA1C 8011531C 0000982D */ daddu $s3, $zero, $zero /* ABA20 80115320 9642002C */ lhu $v0, 0x2C($s2) /* ABA24 80115324 24081000 */ addiu $t0, $zero, 0x1000 /* ABA28 80115328 3042F000 */ andi $v0, $v0, 0xF000 /* ABA2C 8011532C 14480004 */ bne $v0, $t0, .L80115340 /* ABA30 80115330 0060982D */ daddu $s3, $v1, $zero /* ABA34 80115334 080454D0 */ j .L80115340 /* ABA38 80115338 24130200 */ addiu $s3, $zero, 0x200 .L8011533C: /* ABA3C 8011533C 0260882D */ daddu $s1, $s3, $zero .L80115340: /* ABA40 80115340 02E0202D */ daddu $a0, $s7, $zero /* ABA44 80115344 0C01BB5C */ jal strcmp /* ABA48 80115348 0240282D */ daddu $a1, $s2, $zero /* ABA4C 8011534C 1040000D */ beqz $v0, .L80115384 /* ABA50 80115350 02151021 */ addu $v0, $s0, $s5 /* ABA54 80115354 24420030 */ addiu $v0, $v0, 0x30 /* ABA58 80115358 0282A021 */ addu $s4, $s4, $v0 /* ABA5C 8011535C 8FA80020 */ lw $t0, 0x20($sp) /* ABA60 80115360 02331021 */ addu $v0, $s1, $s3 /* ABA64 80115364 25080001 */ addiu $t0, $t0, 0x1 /* ABA68 80115368 AFA80020 */ sw $t0, 0x20($sp) /* ABA6C 8011536C 8FA80058 */ lw $t0, 0x58($sp) /* ABA70 80115370 0282A021 */ addu $s4, $s4, $v0 /* ABA74 80115374 03C81021 */ addu $v0, $fp, $t0 /* ABA78 80115378 0282102B */ sltu $v0, $s4, $v0 /* ABA7C 8011537C 1440FE94 */ bnez $v0, .L80114DD0 /* ABA80 80115380 0280202D */ daddu $a0, $s4, $zero .L80115384: /* ABA84 80115384 3C020004 */ lui $v0, (0x40000 >> 16) /* ABA88 80115388 03C21021 */ addu $v0, $fp, $v0 /* ABA8C 8011538C 0282102B */ sltu $v0, $s4, $v0 /* ABA90 80115390 14400009 */ bnez $v0, .L801153B8 /* ABA94 80115394 00000000 */ nop .L80115398: /* ABA98 80115398 3C028015 */ lui $v0, %hi(mdl_treeIterPos) /* ABA9C 8011539C 8C423224 */ lw $v0, %lo(mdl_treeIterPos)($v0) /* ABAA0 801153A0 3C03800A */ lui $v1, %hi(mdl_currentModelTreeNodeInfo) /* ABAA4 801153A4 8C63A5F4 */ lw $v1, %lo(mdl_currentModelTreeNodeInfo)($v1) /* ABAA8 801153A8 00021080 */ sll $v0, $v0, 2 /* ABAAC 801153AC 00431021 */ addu $v0, $v0, $v1 /* ABAB0 801153B0 0804551A */ j .L80115468 /* ABAB4 801153B4 A0400002 */ sb $zero, 0x2($v0) .L801153B8: /* ABAB8 801153B8 3C168015 */ lui $s6, %hi(mdl_treeIterPos) /* ABABC 801153BC 26D63224 */ addiu $s6, $s6, %lo(mdl_treeIterPos) /* ABAC0 801153C0 3C17800A */ lui $s7, %hi(mdl_currentModelTreeNodeInfo) /* ABAC4 801153C4 26F7A5F4 */ addiu $s7, $s7, %lo(mdl_currentModelTreeNodeInfo) /* ABAC8 801153C8 8EC20000 */ lw $v0, 0x0($s6) /* ABACC 801153CC 8EE30000 */ lw $v1, 0x0($s7) /* ABAD0 801153D0 8FA80020 */ lw $t0, 0x20($sp) /* ABAD4 801153D4 00021080 */ sll $v0, $v0, 2 /* ABAD8 801153D8 00431021 */ addu $v0, $v0, $v1 /* ABADC 801153DC 25030001 */ addiu $v1, $t0, 0x1 /* ABAE0 801153E0 A0430002 */ sb $v1, 0x2($v0) /* ABAE4 801153E4 8EC20000 */ lw $v0, 0x0($s6) /* ABAE8 801153E8 8EE30000 */ lw $v1, 0x0($s7) /* ABAEC 801153EC 00021080 */ sll $v0, $v0, 2 /* ABAF0 801153F0 00431021 */ addu $v0, $v0, $v1 /* ABAF4 801153F4 90430002 */ lbu $v1, 0x2($v0) /* ABAF8 801153F8 3C048016 */ lui $a0, %hi(mdl_textureHandles) /* ABAFC 801153FC 2484A590 */ addiu $a0, $a0, %lo(mdl_textureHandles) /* ABB00 80115400 00031100 */ sll $v0, $v1, 4 /* ABB04 80115404 00431021 */ addu $v0, $v0, $v1 /* ABB08 80115408 00021080 */ sll $v0, $v0, 2 /* ABB0C 8011540C 00442821 */ addu $a1, $v0, $a0 /* ABB10 80115410 8CA20000 */ lw $v0, 0x0($a1) /* ABB14 80115414 14400014 */ bnez $v0, .L80115468 /* ABB18 80115418 26940030 */ addiu $s4, $s4, 0x30 /* ABB1C 8011541C 0280202D */ daddu $a0, $s4, $zero /* ABB20 80115420 0240302D */ daddu $a2, $s2, $zero /* ABB24 80115424 0200382D */ daddu $a3, $s0, $zero /* ABB28 80115428 AFB50010 */ sw $s5, 0x10($sp) /* ABB2C 8011542C AFB10014 */ sw $s1, 0x14($sp) /* ABB30 80115430 0C0452D6 */ jal func_80114B58 /* ABB34 80115434 AFB30018 */ sw $s3, 0x18($sp) /* ABB38 80115438 02902021 */ addu $a0, $s4, $s0 /* ABB3C 8011543C 00952021 */ addu $a0, $a0, $s5 /* ABB40 80115440 00912021 */ addu $a0, $a0, $s1 /* ABB44 80115444 00932021 */ addu $a0, $a0, $s3 /* ABB48 80115448 8EC20000 */ lw $v0, 0x0($s6) /* ABB4C 8011544C 8EE30000 */ lw $v1, 0x0($s7) /* ABB50 80115450 8FA70058 */ lw $a3, 0x58($sp) /* ABB54 80115454 00021080 */ sll $v0, $v0, 2 /* ABB58 80115458 00431021 */ addu $v0, $v0, $v1 /* ABB5C 8011545C 90450002 */ lbu $a1, 0x2($v0) /* ABB60 80115460 0C045526 */ jal func_80115498 /* ABB64 80115464 03C0302D */ daddu $a2, $fp, $zero .L80115468: /* ABB68 80115468 8FBF004C */ lw $ra, 0x4C($sp) /* ABB6C 8011546C 8FBE0048 */ lw $fp, 0x48($sp) /* ABB70 80115470 8FB70044 */ lw $s7, 0x44($sp) /* ABB74 80115474 8FB60040 */ lw $s6, 0x40($sp) /* ABB78 80115478 8FB5003C */ lw $s5, 0x3C($sp) /* ABB7C 8011547C 8FB40038 */ lw $s4, 0x38($sp) /* ABB80 80115480 8FB30034 */ lw $s3, 0x34($sp) /* ABB84 80115484 8FB20030 */ lw $s2, 0x30($sp) /* ABB88 80115488 8FB1002C */ lw $s1, 0x2C($sp) /* ABB8C 8011548C 8FB00028 */ lw $s0, 0x28($sp) /* ABB90 80115490 03E00008 */ jr $ra /* ABB94 80115494 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void load_tile_header(ModelNodeProperty* propertyName, s32 romOffset, s32 size) { char* textureName = (char*)propertyName->data.p; u32 baseOffset = romOffset; s32 textureID = 0; u32 paletteSize; u32 rasterSize; u32 auxPaletteSize; u32 auxRasterSize; TextureHeader* header; TextureHandle* textureHandle; s32 mainSize; if (textureName == NULL) { (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; return; } while (romOffset < baseOffset + size) { dma_copy((u8*)romOffset, (u8*)romOffset + sizeof(gCurrentTileDescriptor), &gCurrentTileDescriptor); header = &gCurrentTileDescriptor; rasterSize = header->mainW * header->mainH; if (header->mainBitDepth == G_IM_SIZ_4b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 16 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } rasterSize /= 2; } else if (header->mainBitDepth == G_IM_SIZ_8b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 8 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } } else { do {} while (0); if (header->mainBitDepth == G_IM_SIZ_16b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 4 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } rasterSize *= 2; } else if (header->mainBitDepth == G_IM_SIZ_32b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 2 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } rasterSize *= 4; } } if (header->mainFmt == G_IM_FMT_CI) { paletteSize = 0x20; if (header->mainBitDepth == G_IM_SIZ_8b) { paletteSize = 0x200; } } else { paletteSize = 0; } if (header->extraTiles == EXTRA_TILE_AUX_INDEPENDENT) { auxRasterSize = header->auxW * header->auxH; if (header->auxBitDepth == G_IM_SIZ_4b) { auxRasterSize /= 2; } else if (header->auxBitDepth == G_IM_SIZ_8b) { } else if (header->auxBitDepth == G_IM_SIZ_16b) { auxRasterSize *= 2; } else { if (header->auxBitDepth == G_IM_SIZ_32b) { auxRasterSize *= 4; } } if (header->auxFmt == G_IM_FMT_CI) { auxPaletteSize = 0x20; if (header->auxBitDepth == G_IM_SIZ_8b) { auxPaletteSize = 0x200; } } else { auxPaletteSize = 0; } } else { auxPaletteSize = 0; auxRasterSize = 0; } if (strcmp(textureName, header->name) == 0) { break; } textureID++; mainSize = rasterSize + paletteSize + sizeof(*header); romOffset += mainSize; romOffset += auxRasterSize + auxPaletteSize; } if (romOffset >= baseOffset + 0x40000) { (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; return; } (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = textureID + 1; textureHandle = &mdl_textureHandles[(*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID]; romOffset += sizeof(*header); if (textureHandle->gfx == NULL) { func_80114B58(romOffset, textureHandle, header, rasterSize, paletteSize, auxRasterSize, auxPaletteSize); func_80115498(romOffset + rasterSize + paletteSize + auxRasterSize + auxPaletteSize, (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID, baseOffset, size); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E00863B4 /* 389C04 E00863B4 27BDFF00 */ addiu $sp, $sp, -0x100 /* 389C08 E00863B8 AFBF00EC */ sw $ra, 0xEC($sp) /* 389C0C E00863BC AFBE00E8 */ sw $fp, 0xE8($sp) /* 389C10 E00863C0 AFB700E4 */ sw $s7, 0xE4($sp) /* 389C14 E00863C4 AFB600E0 */ sw $s6, 0xE0($sp) /* 389C18 E00863C8 AFB500DC */ sw $s5, 0xDC($sp) /* 389C1C E00863CC AFB400D8 */ sw $s4, 0xD8($sp) /* 389C20 E00863D0 AFB300D4 */ sw $s3, 0xD4($sp) /* 389C24 E00863D4 AFB200D0 */ sw $s2, 0xD0($sp) /* 389C28 E00863D8 AFB100CC */ sw $s1, 0xCC($sp) /* 389C2C E00863DC AFB000C8 */ sw $s0, 0xC8($sp) /* 389C30 E00863E0 F7B600F8 */ sdc1 $f22, 0xF8($sp) /* 389C34 E00863E4 F7B400F0 */ sdc1 $f20, 0xF0($sp) /* 389C38 E00863E8 AFA40100 */ sw $a0, 0x100($sp) /* 389C3C E00863EC 8C94000C */ lw $s4, 0xC($a0) /* 389C40 E00863F0 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 389C44 E00863F4 44810000 */ mtc1 $at, $f0 /* 389C48 E00863F8 C6820038 */ lwc1 $f2, 0x38($s4) /* 389C4C E00863FC 46001502 */ mul.s $f20, $f2, $f0 /* 389C50 E0086400 00000000 */ nop /* 389C54 E0086404 4600A10D */ trunc.w.s $f4, $f20 /* 389C58 E0086408 E7A400A4 */ swc1 $f4, 0xA4($sp) /* 389C5C E008640C 8FA900A4 */ lw $t1, 0xA4($sp) /* 389C60 E0086410 8E960034 */ lw $s6, 0x34($s4) /* 389C64 E0086414 8E950000 */ lw $s5, 0x0($s4) /* 389C68 E0086418 29220005 */ slti $v0, $t1, 0x5 /* 389C6C E008641C 10400191 */ beqz $v0, .LE0086A64 /* 389C70 E0086420 3C08DB06 */ lui $t0, (0xDB060024 >> 16) /* 389C74 E0086424 35080024 */ ori $t0, $t0, (0xDB060024 & 0xFFFF) /* 389C78 E0086428 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 389C7C E008642C 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 389C80 E0086430 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 389C84 E0086434 8E260000 */ lw $a2, 0x0($s1) /* 389C88 E0086438 44800000 */ mtc1 $zero, $f0 /* 389C8C E008643C 00C0182D */ daddu $v1, $a2, $zero /* 389C90 E0086440 24C60008 */ addiu $a2, $a2, 0x8 /* 389C94 E0086444 AC620000 */ sw $v0, 0x0($v1) /* 389C98 E0086448 AC600004 */ sw $zero, 0x4($v1) /* 389C9C E008644C ACC80000 */ sw $t0, 0x0($a2) /* 389CA0 E0086450 8FA90100 */ lw $t1, 0x100($sp) /* 389CA4 E0086454 3C088000 */ lui $t0, (0x80000000 >> 16) /* 389CA8 E0086458 8D220010 */ lw $v0, 0x10($t1) /* 389CAC E008645C 44050000 */ mfc1 $a1, $f0 /* 389CB0 E0086460 8C42001C */ lw $v0, 0x1C($v0) /* 389CB4 E0086464 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 389CB8 E0086468 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 389CBC E008646C 00481021 */ addu $v0, $v0, $t0 /* 389CC0 E0086470 ACC20004 */ sw $v0, 0x4($a2) /* 389CC4 E0086474 00031080 */ sll $v0, $v1, 2 /* 389CC8 E0086478 00431021 */ addu $v0, $v0, $v1 /* 389CCC E008647C 00021080 */ sll $v0, $v0, 2 /* 389CD0 E0086480 00431023 */ subu $v0, $v0, $v1 /* 389CD4 E0086484 000218C0 */ sll $v1, $v0, 3 /* 389CD8 E0086488 00431021 */ addu $v0, $v0, $v1 /* 389CDC E008648C 000210C0 */ sll $v0, $v0, 3 /* 389CE0 E0086490 C6800028 */ lwc1 $f0, 0x28($s4) /* 389CE4 E0086494 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 389CE8 E0086498 00220821 */ addu $at, $at, $v0 /* 389CEC E008649C C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 389CF0 E00864A0 27A40020 */ addiu $a0, $sp, 0x20 /* 389CF4 E00864A4 E7A00010 */ swc1 $f0, 0x10($sp) /* 389CF8 E00864A8 C6800004 */ lwc1 $f0, 0x4($s4) /* 389CFC E00864AC 3C130001 */ lui $s3, (0x11630 >> 16) /* 389D00 E00864B0 AE260000 */ sw $a2, 0x0($s1) /* 389D04 E00864B4 24C60008 */ addiu $a2, $a2, 0x8 /* 389D08 E00864B8 E7A00014 */ swc1 $f0, 0x14($sp) /* 389D0C E00864BC C6800008 */ lwc1 $f0, 0x8($s4) /* 389D10 E00864C0 46001087 */ neg.s $f2, $f2 /* 389D14 E00864C4 AE260000 */ sw $a2, 0x0($s1) /* 389D18 E00864C8 44061000 */ mfc1 $a2, $f2 /* 389D1C E00864CC 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 389D20 E00864D0 E7A00018 */ swc1 $f0, 0x18($sp) /* 389D24 E00864D4 C680000C */ lwc1 $f0, 0xC($s4) /* 389D28 E00864D8 00A0382D */ daddu $a3, $a1, $zero /* 389D2C E00864DC 0C080180 */ jal shim_guPositionF /* 389D30 E00864E0 E7A0001C */ swc1 $f0, 0x1C($sp) /* 389D34 E00864E4 27A40020 */ addiu $a0, $sp, 0x20 /* 389D38 E00864E8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 389D3C E00864EC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 389D40 E00864F0 3C12800A */ lui $s2, %hi(gDisplayContext) /* 389D44 E00864F4 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 389D48 E00864F8 96050000 */ lhu $a1, 0x0($s0) /* 389D4C E00864FC 8E420000 */ lw $v0, 0x0($s2) /* 389D50 E0086500 00052980 */ sll $a1, $a1, 6 /* 389D54 E0086504 00B32821 */ addu $a1, $a1, $s3 /* 389D58 E0086508 0C080118 */ jal shim_guMtxF2L /* 389D5C E008650C 00452821 */ addu $a1, $v0, $a1 /* 389D60 E0086510 8E220000 */ lw $v0, 0x0($s1) /* 389D64 E0086514 3C014380 */ lui $at, (0x43800000 >> 16) /* 389D68 E0086518 44811000 */ mtc1 $at, $f2 /* 389D6C E008651C 0040202D */ daddu $a0, $v0, $zero /* 389D70 E0086520 24420008 */ addiu $v0, $v0, 0x8 /* 389D74 E0086524 AE220000 */ sw $v0, 0x0($s1) /* 389D78 E0086528 96030000 */ lhu $v1, 0x0($s0) /* 389D7C E008652C 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 389D80 E0086530 AC820000 */ sw $v0, 0x0($a0) /* 389D84 E0086534 24620001 */ addiu $v0, $v1, 0x1 /* 389D88 E0086538 A6020000 */ sh $v0, 0x0($s0) /* 389D8C E008653C C7A000A4 */ lwc1 $f0, 0xA4($sp) /* 389D90 E0086540 46800020 */ cvt.s.w $f0, $f0 /* 389D94 E0086544 4600A001 */ sub.s $f0, $f20, $f0 /* 389D98 E0086548 3063FFFF */ andi $v1, $v1, 0xFFFF /* 389D9C E008654C 00031980 */ sll $v1, $v1, 6 /* 389DA0 E0086550 46020002 */ mul.s $f0, $f0, $f2 /* 389DA4 E0086554 00000000 */ nop /* 389DA8 E0086558 8E420000 */ lw $v0, 0x0($s2) /* 389DAC E008655C 00731821 */ addu $v1, $v1, $s3 /* 389DB0 E0086560 00431021 */ addu $v0, $v0, $v1 /* 389DB4 E0086564 AC820004 */ sw $v0, 0x4($a0) /* 389DB8 E0086568 4600010D */ trunc.w.s $f4, $f0 /* 389DBC E008656C E7A400A0 */ swc1 $f4, 0xA0($sp) /* 389DC0 E0086570 8FA900A4 */ lw $t1, 0xA4($sp) /* 389DC4 E0086574 29220004 */ slti $v0, $t1, 0x4 /* 389DC8 E0086578 38480001 */ xori $t0, $v0, 0x1 /* 389DCC E008657C 8E89002C */ lw $t1, 0x2C($s4) /* 389DD0 E0086580 24020001 */ addiu $v0, $zero, 0x1 /* 389DD4 E0086584 12A20008 */ beq $s5, $v0, .LE00865A8 /* 389DD8 E0086588 AFA900BC */ sw $t1, 0xBC($sp) /* 389DDC E008658C 2AA20002 */ slti $v0, $s5, 0x2 /* 389DE0 E0086590 14400035 */ bnez $v0, .LE0086668 /* 389DE4 E0086594 24020002 */ addiu $v0, $zero, 0x2 /* 389DE8 E0086598 12A20028 */ beq $s5, $v0, .LE008663C /* 389DEC E008659C 32C20001 */ andi $v0, $s6, 0x1 /* 389DF0 E00865A0 0802199A */ j .LE0086668 /* 389DF4 E00865A4 00000000 */ nop .LE00865A8: /* 389DF8 E00865A8 26C3FFFF */ addiu $v1, $s6, -0x1 /* 389DFC E00865AC 2862000D */ slti $v0, $v1, 0xD /* 389E00 E00865B0 50400004 */ beql $v0, $zero, .LE00865C4 /* 389E04 E00865B4 0000182D */ daddu $v1, $zero, $zero /* 389E08 E00865B8 3C01E008 */ lui $at, (0xE0086AE4 >> 16) /* 389E0C E00865BC 00230821 */ addu $at, $at, $v1 /* 389E10 E00865C0 90236AE4 */ lbu $v1, (0xE0086AE4 & 0xFFFF)($at) .LE00865C4: /* 389E14 E00865C4 9282003D */ lbu $v0, 0x3D($s4) /* 389E18 E00865C8 00430018 */ mult $v0, $v1 /* 389E1C E00865CC 00003812 */ mflo $a3 /* 389E20 E00865D0 9282003E */ lbu $v0, 0x3E($s4) /* 389E24 E00865D4 00000000 */ nop /* 389E28 E00865D8 00430018 */ mult $v0, $v1 /* 389E2C E00865DC 00003012 */ mflo $a2 /* 389E30 E00865E0 9282003F */ lbu $v0, 0x3F($s4) /* 389E34 E00865E4 00000000 */ nop /* 389E38 E00865E8 00430018 */ mult $v0, $v1 /* 389E3C E00865EC 00002812 */ mflo $a1 /* 389E40 E00865F0 92820040 */ lbu $v0, 0x40($s4) /* 389E44 E00865F4 00000000 */ nop /* 389E48 E00865F8 00430018 */ mult $v0, $v1 /* 389E4C E00865FC 9289003C */ lbu $t1, 0x3C($s4) /* 389E50 E0086600 00073A03 */ sra $a3, $a3, 8 /* 389E54 E0086604 0006F203 */ sra $fp, $a2, 8 /* 389E58 E0086608 92820041 */ lbu $v0, 0x41($s4) /* 389E5C E008660C 00002012 */ mflo $a0 /* 389E60 E0086610 00052A03 */ sra $a1, $a1, 8 /* 389E64 E0086614 AFA900A8 */ sw $t1, 0xA8($sp) /* 389E68 E0086618 00430018 */ mult $v0, $v1 /* 389E6C E008661C AFA700AC */ sw $a3, 0xAC($sp) /* 389E70 E0086620 AFA500B0 */ sw $a1, 0xB0($sp) /* 389E74 E0086624 00042203 */ sra $a0, $a0, 8 /* 389E78 E0086628 AFA400B4 */ sw $a0, 0xB4($sp) /* 389E7C E008662C 00001012 */ mflo $v0 /* 389E80 E0086630 00021203 */ sra $v0, $v0, 8 /* 389E84 E0086634 080219A5 */ j .LE0086694 /* 389E88 E0086638 AFA200B8 */ sw $v0, 0xB8($sp) .LE008663C: /* 389E8C E008663C 1440000A */ bnez $v0, .LE0086668 /* 389E90 E0086640 0000F02D */ daddu $fp, $zero, $zero /* 389E94 E0086644 AFA000A8 */ sw $zero, 0xA8($sp) /* 389E98 E0086648 AFA000AC */ sw $zero, 0xAC($sp) /* 389E9C E008664C 9289003C */ lbu $t1, 0x3C($s4) /* 389EA0 E0086650 AFA900B0 */ sw $t1, 0xB0($sp) /* 389EA4 E0086654 9289003D */ lbu $t1, 0x3D($s4) /* 389EA8 E0086658 AFA900B4 */ sw $t1, 0xB4($sp) /* 389EAC E008665C 9289003E */ lbu $t1, 0x3E($s4) /* 389EB0 E0086660 080219A5 */ j .LE0086694 /* 389EB4 E0086664 AFA900B8 */ sw $t1, 0xB8($sp) .LE0086668: /* 389EB8 E0086668 9289003C */ lbu $t1, 0x3C($s4) /* 389EBC E008666C AFA900A8 */ sw $t1, 0xA8($sp) /* 389EC0 E0086670 9289003D */ lbu $t1, 0x3D($s4) /* 389EC4 E0086674 AFA900AC */ sw $t1, 0xAC($sp) /* 389EC8 E0086678 9289003F */ lbu $t1, 0x3F($s4) /* 389ECC E008667C 929E003E */ lbu $fp, 0x3E($s4) /* 389ED0 E0086680 AFA900B0 */ sw $t1, 0xB0($sp) /* 389ED4 E0086684 92890040 */ lbu $t1, 0x40($s4) /* 389ED8 E0086688 AFA900B4 */ sw $t1, 0xB4($sp) /* 389EDC E008668C 92890041 */ lbu $t1, 0x41($s4) /* 389EE0 E0086690 AFA900B8 */ sw $t1, 0xB8($sp) .LE0086694: /* 389EE4 E0086694 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 389EE8 E0086698 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 389EEC E008669C 8C930000 */ lw $s3, 0x0($a0) /* 389EF0 E00866A0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 389EF4 E00866A4 AE620008 */ sw $v0, 0x8($s3) /* 389EF8 E00866A8 00151080 */ sll $v0, $s5, 2 /* 389EFC E00866AC 3C03E008 */ lui $v1, (0xE0086AB4 >> 16) /* 389F00 E00866B0 00621821 */ addu $v1, $v1, $v0 /* 389F04 E00866B4 8C636AB4 */ lw $v1, (0xE0086AB4 & 0xFFFF)($v1) /* 389F08 E00866B8 26620010 */ addiu $v0, $s3, 0x10 /* 389F0C E00866BC AC820000 */ sw $v0, 0x0($a0) /* 389F10 E00866C0 AE63000C */ sw $v1, 0xC($s3) /* 389F14 E00866C4 3C03E008 */ lui $v1, %hi(D_E0086AB4) /* 389F18 E00866C8 24636AB4 */ addiu $v1, $v1, %lo(D_E0086AB4) /* 389F1C E00866CC 11000007 */ beqz $t0, .LE00866EC /* 389F20 E00866D0 26940044 */ addiu $s4, $s4, 0x44 /* 389F24 E00866D4 26620018 */ addiu $v0, $s3, 0x18 /* 389F28 E00866D8 AC820000 */ sw $v0, 0x0($a0) /* 389F2C E00866DC 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 389F30 E00866E0 AE620010 */ sw $v0, 0x10($s3) /* 389F34 E00866E4 3C020100 */ lui $v0, (0x1000000 >> 16) /* 389F38 E00866E8 AE620014 */ sw $v0, 0x14($s3) .LE00866EC: /* 389F3C E00866EC 8FA90100 */ lw $t1, 0x100($sp) /* 389F40 E00866F0 8D220008 */ lw $v0, 0x8($t1) /* 389F44 E00866F4 24120001 */ addiu $s2, $zero, 0x1 /* 389F48 E00866F8 0242102A */ slt $v0, $s2, $v0 /* 389F4C E00866FC 10400063 */ beqz $v0, .LE008688C /* 389F50 E0086700 0080A82D */ daddu $s5, $a0, $zero /* 389F54 E0086704 27B10060 */ addiu $s1, $sp, 0x60 /* 389F58 E0086708 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 389F5C E008670C 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 389F60 E0086710 3C160001 */ lui $s6, (0x11630 >> 16) /* 389F64 E0086714 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 389F68 E0086718 3C03E008 */ lui $v1, %hi(D_E0086AA0) /* 389F6C E008671C 24636AA0 */ addiu $v1, $v1, %lo(D_E0086AA0) /* 389F70 E0086720 2690000C */ addiu $s0, $s4, 0xC /* 389F74 E0086724 8FA900A4 */ lw $t1, 0xA4($sp) /* 389F78 E0086728 4480A000 */ mtc1 $zero, $f20 /* 389F7C E008672C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 389F80 E0086730 4481B000 */ mtc1 $at, $f22 /* 389F84 E0086734 00091080 */ sll $v0, $t1, 2 /* 389F88 E0086738 00431021 */ addu $v0, $v0, $v1 /* 389F8C E008673C AFA200C0 */ sw $v0, 0xC0($sp) .LE0086740: /* 389F90 E0086740 27A40020 */ addiu $a0, $sp, 0x20 /* 389F94 E0086744 26520001 */ addiu $s2, $s2, 0x1 /* 389F98 E0086748 8EA30000 */ lw $v1, 0x0($s5) /* 389F9C E008674C 4406A000 */ mfc1 $a2, $f20 /* 389FA0 E0086750 4407A000 */ mfc1 $a3, $f20 /* 389FA4 E0086754 0060282D */ daddu $a1, $v1, $zero /* 389FA8 E0086758 3C09DE00 */ lui $t1, (0xDE000000 >> 16) /* 389FAC E008675C ACA90000 */ sw $t1, 0x0($a1) /* 389FB0 E0086760 8E820000 */ lw $v0, 0x0($s4) /* 389FB4 E0086764 3C09E008 */ lui $t1, %hi(D_E0086AB4) /* 389FB8 E0086768 25296AB4 */ addiu $t1, $t1, %lo(D_E0086AB4) /* 389FBC E008676C 00021080 */ sll $v0, $v0, 2 /* 389FC0 E0086770 00491021 */ addu $v0, $v0, $t1 /* 389FC4 E0086774 8C420000 */ lw $v0, 0x0($v0) /* 389FC8 E0086778 24630008 */ addiu $v1, $v1, 0x8 /* 389FCC E008677C ACA20004 */ sw $v0, 0x4($a1) /* 389FD0 E0086780 E7B60010 */ swc1 $f22, 0x10($sp) /* 389FD4 E0086784 8E050010 */ lw $a1, 0x10($s0) /* 389FD8 E0086788 26940044 */ addiu $s4, $s4, 0x44 /* 389FDC E008678C 0C080104 */ jal shim_guRotateF /* 389FE0 E0086790 AEA30000 */ sw $v1, 0x0($s5) /* 389FE4 E0086794 E7B40010 */ swc1 $f20, 0x10($sp) /* 389FE8 E0086798 8E050018 */ lw $a1, 0x18($s0) /* 389FEC E008679C 4406A000 */ mfc1 $a2, $f20 /* 389FF0 E00867A0 4407B000 */ mfc1 $a3, $f22 /* 389FF4 E00867A4 0C080104 */ jal shim_guRotateF /* 389FF8 E00867A8 0220202D */ daddu $a0, $s1, $zero /* 389FFC E00867AC 0220202D */ daddu $a0, $s1, $zero /* 38A000 E00867B0 27A50020 */ addiu $a1, $sp, 0x20 /* 38A004 E00867B4 0C080114 */ jal shim_guMtxCatF /* 38A008 E00867B8 00A0302D */ daddu $a2, $a1, $zero /* 38A00C E00867BC 8E05FFF8 */ lw $a1, -0x8($s0) /* 38A010 E00867C0 8E06FFFC */ lw $a2, -0x4($s0) /* 38A014 E00867C4 8E070000 */ lw $a3, 0x0($s0) /* 38A018 E00867C8 0C080108 */ jal shim_guTranslateF /* 38A01C E00867CC 0220202D */ daddu $a0, $s1, $zero /* 38A020 E00867D0 0220202D */ daddu $a0, $s1, $zero /* 38A024 E00867D4 27A50020 */ addiu $a1, $sp, 0x20 /* 38A028 E00867D8 0C080114 */ jal shim_guMtxCatF /* 38A02C E00867DC 00A0302D */ daddu $a2, $a1, $zero /* 38A030 E00867E0 27A40020 */ addiu $a0, $sp, 0x20 /* 38A034 E00867E4 96E50000 */ lhu $a1, 0x0($s7) /* 38A038 E00867E8 3C02800A */ lui $v0, %hi(gDisplayContext) /* 38A03C E00867EC 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 38A040 E00867F0 00052980 */ sll $a1, $a1, 6 /* 38A044 E00867F4 00B62821 */ addu $a1, $a1, $s6 /* 38A048 E00867F8 0C080118 */ jal shim_guMtxF2L /* 38A04C E00867FC 00452821 */ addu $a1, $v0, $a1 /* 38A050 E0086800 8EA40000 */ lw $a0, 0x0($s5) /* 38A054 E0086804 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 38A058 E0086808 0080282D */ daddu $a1, $a0, $zero /* 38A05C E008680C 24840008 */ addiu $a0, $a0, 0x8 /* 38A060 E0086810 AEA40000 */ sw $a0, 0x0($s5) /* 38A064 E0086814 96E20000 */ lhu $v0, 0x0($s7) /* 38A068 E0086818 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 38A06C E008681C ACA30000 */ sw $v1, 0x0($a1) /* 38A070 E0086820 24430001 */ addiu $v1, $v0, 0x1 /* 38A074 E0086824 3042FFFF */ andi $v0, $v0, 0xFFFF /* 38A078 E0086828 00021180 */ sll $v0, $v0, 6 /* 38A07C E008682C A6E30000 */ sh $v1, 0x0($s7) /* 38A080 E0086830 3C03800A */ lui $v1, %hi(gDisplayContext) /* 38A084 E0086834 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 38A088 E0086838 00561021 */ addu $v0, $v0, $s6 /* 38A08C E008683C 00621821 */ addu $v1, $v1, $v0 /* 38A090 E0086840 ACA30004 */ sw $v1, 0x4($a1) /* 38A094 E0086844 3C09DE00 */ lui $t1, (0xDE000000 >> 16) /* 38A098 E0086848 AC890000 */ sw $t1, 0x0($a0) /* 38A09C E008684C 8FA900C0 */ lw $t1, 0xC0($sp) /* 38A0A0 E0086850 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 38A0A4 E0086854 8D230000 */ lw $v1, 0x0($t1) /* 38A0A8 E0086858 24820008 */ addiu $v0, $a0, 0x8 /* 38A0AC E008685C AEA20000 */ sw $v0, 0x0($s5) /* 38A0B0 E0086860 24020040 */ addiu $v0, $zero, 0x40 /* 38A0B4 E0086864 AC860008 */ sw $a2, 0x8($a0) /* 38A0B8 E0086868 AC82000C */ sw $v0, 0xC($a0) /* 38A0BC E008686C AC830004 */ sw $v1, 0x4($a0) /* 38A0C0 E0086870 8FA90100 */ lw $t1, 0x100($sp) /* 38A0C4 E0086874 26100044 */ addiu $s0, $s0, 0x44 /* 38A0C8 E0086878 8D220008 */ lw $v0, 0x8($t1) /* 38A0CC E008687C 24840010 */ addiu $a0, $a0, 0x10 /* 38A0D0 E0086880 0242102A */ slt $v0, $s2, $v0 /* 38A0D4 E0086884 1440FFAE */ bnez $v0, .LE0086740 /* 38A0D8 E0086888 AEA40000 */ sw $a0, 0x0($s5) .LE008688C: /* 38A0DC E008688C 27A40020 */ addiu $a0, $sp, 0x20 /* 38A0E0 E0086890 3C150001 */ lui $s5, (0x11630 >> 16) /* 38A0E4 E0086894 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 38A0E8 E0086898 3C10800A */ lui $s0, %hi(gMainGfxPos) /* 38A0EC E008689C 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* 38A0F0 E00868A0 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 38A0F4 E00868A4 3C14DE00 */ lui $s4, (0xDE000000 >> 16) /* 38A0F8 E00868A8 8E080000 */ lw $t0, 0x0($s0) /* 38A0FC E00868AC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 38A100 E00868B0 44810000 */ mtc1 $at, $f0 /* 38A104 E00868B4 0100182D */ daddu $v1, $t0, $zero /* 38A108 E00868B8 25080008 */ addiu $t0, $t0, 0x8 /* 38A10C E00868BC AE080000 */ sw $t0, 0x0($s0) /* 38A110 E00868C0 AC620000 */ sw $v0, 0x0($v1) /* 38A114 E00868C4 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 38A118 E00868C8 AC600004 */ sw $zero, 0x4($v1) /* 38A11C E00868CC AE620000 */ sw $v0, 0x0($s3) /* 38A120 E00868D0 25020008 */ addiu $v0, $t0, 0x8 /* 38A124 E00868D4 AE680004 */ sw $t0, 0x4($s3) /* 38A128 E00868D8 AE020000 */ sw $v0, 0x0($s0) /* 38A12C E00868DC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 38A130 E00868E0 AD020000 */ sw $v0, 0x0($t0) /* 38A134 E00868E4 8FA900A8 */ lw $t1, 0xA8($sp) /* 38A138 E00868E8 3C0542F0 */ lui $a1, (0x42F00000 >> 16) /* 38A13C E00868EC 00091E00 */ sll $v1, $t1, 24 /* 38A140 E00868F0 8FA900AC */ lw $t1, 0xAC($sp) /* 38A144 E00868F4 26730008 */ addiu $s3, $s3, 0x8 /* 38A148 E00868F8 312200FF */ andi $v0, $t1, 0xFF /* 38A14C E00868FC 00021400 */ sll $v0, $v0, 16 /* 38A150 E0086900 00621825 */ or $v1, $v1, $v0 /* 38A154 E0086904 33C200FF */ andi $v0, $fp, 0xFF /* 38A158 E0086908 00021200 */ sll $v0, $v0, 8 /* 38A15C E008690C 8FA900BC */ lw $t1, 0xBC($sp) /* 38A160 E0086910 00621825 */ or $v1, $v1, $v0 /* 38A164 E0086914 312200FF */ andi $v0, $t1, 0xFF /* 38A168 E0086918 00621825 */ or $v1, $v1, $v0 /* 38A16C E008691C 25020010 */ addiu $v0, $t0, 0x10 /* 38A170 E0086920 AD030004 */ sw $v1, 0x4($t0) /* 38A174 E0086924 AE020000 */ sw $v0, 0x0($s0) /* 38A178 E0086928 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 38A17C E008692C AD020008 */ sw $v0, 0x8($t0) /* 38A180 E0086930 8FA900B0 */ lw $t1, 0xB0($sp) /* 38A184 E0086934 44060000 */ mfc1 $a2, $f0 /* 38A188 E0086938 00091E00 */ sll $v1, $t1, 24 /* 38A18C E008693C 8FA900B4 */ lw $t1, 0xB4($sp) /* 38A190 E0086940 00C0382D */ daddu $a3, $a2, $zero /* 38A194 E0086944 312200FF */ andi $v0, $t1, 0xFF /* 38A198 E0086948 00021400 */ sll $v0, $v0, 16 /* 38A19C E008694C 8FA900B8 */ lw $t1, 0xB8($sp) /* 38A1A0 E0086950 00621825 */ or $v1, $v1, $v0 /* 38A1A4 E0086954 312200FF */ andi $v0, $t1, 0xFF /* 38A1A8 E0086958 00021200 */ sll $v0, $v0, 8 /* 38A1AC E008695C 8FA900A0 */ lw $t1, 0xA0($sp) /* 38A1B0 E0086960 00621825 */ or $v1, $v1, $v0 /* 38A1B4 E0086964 312200FF */ andi $v0, $t1, 0xFF /* 38A1B8 E0086968 00621825 */ or $v1, $v1, $v0 /* 38A1BC E008696C 25020018 */ addiu $v0, $t0, 0x18 /* 38A1C0 E0086970 AD03000C */ sw $v1, 0xC($t0) /* 38A1C4 E0086974 AE020000 */ sw $v0, 0x0($s0) /* 38A1C8 E0086978 AD140010 */ sw $s4, 0x10($t0) /* 38A1CC E008697C AD130014 */ sw $s3, 0x14($t0) /* 38A1D0 E0086980 0C080104 */ jal shim_guRotateF /* 38A1D4 E0086984 AFA60010 */ sw $a2, 0x10($sp) /* 38A1D8 E0086988 27A40020 */ addiu $a0, $sp, 0x20 /* 38A1DC E008698C 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 38A1E0 E0086990 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 38A1E4 E0086994 3C12800A */ lui $s2, %hi(gDisplayContext) /* 38A1E8 E0086998 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 38A1EC E008699C 96250000 */ lhu $a1, 0x0($s1) /* 38A1F0 E00869A0 8E420000 */ lw $v0, 0x0($s2) /* 38A1F4 E00869A4 00052980 */ sll $a1, $a1, 6 /* 38A1F8 E00869A8 00B52821 */ addu $a1, $a1, $s5 /* 38A1FC E00869AC 0C080118 */ jal shim_guMtxF2L /* 38A200 E00869B0 00452821 */ addu $a1, $v0, $a1 /* 38A204 E00869B4 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 38A208 E00869B8 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 38A20C E00869BC 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 38A210 E00869C0 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 38A214 E00869C4 8E030000 */ lw $v1, 0x0($s0) /* 38A218 E00869C8 96220000 */ lhu $v0, 0x0($s1) /* 38A21C E00869CC 0060202D */ daddu $a0, $v1, $zero /* 38A220 E00869D0 24630008 */ addiu $v1, $v1, 0x8 /* 38A224 E00869D4 00021180 */ sll $v0, $v0, 6 /* 38A228 E00869D8 AE030000 */ sw $v1, 0x0($s0) /* 38A22C E00869DC AC860000 */ sw $a2, 0x0($a0) /* 38A230 E00869E0 8E450000 */ lw $a1, 0x0($s2) /* 38A234 E00869E4 00551021 */ addu $v0, $v0, $s5 /* 38A238 E00869E8 00A21021 */ addu $v0, $a1, $v0 /* 38A23C E00869EC AC820004 */ sw $v0, 0x4($a0) /* 38A240 E00869F0 24620008 */ addiu $v0, $v1, 0x8 /* 38A244 E00869F4 AE020000 */ sw $v0, 0x0($s0) /* 38A248 E00869F8 AC740000 */ sw $s4, 0x0($v1) /* 38A24C E00869FC AC730004 */ sw $s3, 0x4($v1) /* 38A250 E0086A00 96220000 */ lhu $v0, 0x0($s1) /* 38A254 E0086A04 24640010 */ addiu $a0, $v1, 0x10 /* 38A258 E0086A08 AE040000 */ sw $a0, 0x0($s0) /* 38A25C E0086A0C AC660008 */ sw $a2, 0x8($v1) /* 38A260 E0086A10 24440001 */ addiu $a0, $v0, 0x1 /* 38A264 E0086A14 3042FFFF */ andi $v0, $v0, 0xFFFF /* 38A268 E0086A18 00021180 */ sll $v0, $v0, 6 /* 38A26C E0086A1C 00551021 */ addu $v0, $v0, $s5 /* 38A270 E0086A20 00A22821 */ addu $a1, $a1, $v0 /* 38A274 E0086A24 24620018 */ addiu $v0, $v1, 0x18 /* 38A278 E0086A28 A6240000 */ sh $a0, 0x0($s1) /* 38A27C E0086A2C AC65000C */ sw $a1, 0xC($v1) /* 38A280 E0086A30 AE020000 */ sw $v0, 0x0($s0) /* 38A284 E0086A34 24620020 */ addiu $v0, $v1, 0x20 /* 38A288 E0086A38 AC740010 */ sw $s4, 0x10($v1) /* 38A28C E0086A3C AC730014 */ sw $s3, 0x14($v1) /* 38A290 E0086A40 AE020000 */ sw $v0, 0x0($s0) /* 38A294 E0086A44 24020040 */ addiu $v0, $zero, 0x40 /* 38A298 E0086A48 AC62001C */ sw $v0, 0x1C($v1) /* 38A29C E0086A4C 24620028 */ addiu $v0, $v1, 0x28 /* 38A2A0 E0086A50 AC670018 */ sw $a3, 0x18($v1) /* 38A2A4 E0086A54 AE020000 */ sw $v0, 0x0($s0) /* 38A2A8 E0086A58 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 38A2AC E0086A5C AC620020 */ sw $v0, 0x20($v1) /* 38A2B0 E0086A60 AC600024 */ sw $zero, 0x24($v1) .LE0086A64: /* 38A2B4 E0086A64 8FBF00EC */ lw $ra, 0xEC($sp) /* 38A2B8 E0086A68 8FBE00E8 */ lw $fp, 0xE8($sp) /* 38A2BC E0086A6C 8FB700E4 */ lw $s7, 0xE4($sp) /* 38A2C0 E0086A70 8FB600E0 */ lw $s6, 0xE0($sp) /* 38A2C4 E0086A74 8FB500DC */ lw $s5, 0xDC($sp) /* 38A2C8 E0086A78 8FB400D8 */ lw $s4, 0xD8($sp) /* 38A2CC E0086A7C 8FB300D4 */ lw $s3, 0xD4($sp) /* 38A2D0 E0086A80 8FB200D0 */ lw $s2, 0xD0($sp) /* 38A2D4 E0086A84 8FB100CC */ lw $s1, 0xCC($sp) /* 38A2D8 E0086A88 8FB000C8 */ lw $s0, 0xC8($sp) /* 38A2DC E0086A8C D7B600F8 */ ldc1 $f22, 0xF8($sp) /* 38A2E0 E0086A90 D7B400F0 */ ldc1 $f20, 0xF0($sp) /* 38A2E4 E0086A94 03E00008 */ jr $ra /* 38A2E8 E0086A98 27BD0100 */ addiu $sp, $sp, 0x100 /* 38A2EC E0086A9C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E00863B4(EffectInstance* effect) { FireworkFXData* part = effect->data.firework; Gfx* savedGfxPos; f32 temp_f32 = part->unk_38 * 5.0f; s32 envA; s32 temp_s32 = temp_f32; s32 primR; s32 primG; s32 primB; s32 envR; s32 envG; s32 engB; s32 primA; s32 unk_34 = part->unk_34; s32 unk_00 = part->unk_00; s32 var_v1; Matrix4f sp20; Matrix4f sp60; s32 i; if (temp_s32 < 5) { s32 cond; f32 unk_28; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data)); unk_28 = part->unk_28; shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_28, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); envA = (temp_f32 - temp_s32) * 256.0f; primA = part->unk_2C; cond = (temp_s32 >= 4); switch (unk_00) { case 1: if (unk_34 - 1 < 13) { var_v1 = D_E0086AE4[unk_34 - 1]; } else { var_v1 = 0; } primR = part->unk_3C; primG = (part->unk_3D * var_v1) >> 8; primB = (part->unk_3E * var_v1) >> 8; envR = (part->unk_3F * var_v1) >> 8; envG = (part->unk_40 * var_v1) >> 8; engB = (part->unk_41 * var_v1) >> 8; break; case 2: if (unk_34 % 2 == 0) { primR = 0; primG = 0; primB = 0; envR = part->unk_3C; envG = part->unk_3D; engB = part->unk_3E; } else { primR = part->unk_3C; primG = part->unk_3D; primB = part->unk_3E; envR = part->unk_3F; envG = part->unk_40; engB = part->unk_41; } break; case 0: default: primR = part->unk_3C; primG = part->unk_3D; primB = part->unk_3E; envR = part->unk_3F; envG = part->unk_40; engB = part->unk_41; break; } savedGfxPos = gMainGfxPos++; gSPDisplayList(gMainGfxPos++, D_E0086AB4[unk_00]); part++; if (cond) { gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 0, 0); } for (i = 1; i < effect->numParts; i++, part++) { gSPDisplayList(gMainGfxPos++, D_E0086AB4[part->unk_00]); shim_guRotateF(sp20, part->unk_1C, 0.0f, 0.0f, 1.0f); shim_guRotateF(sp60, part->unk_24, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guTranslateF(sp60, part->unk_04, part->unk_08, part->unk_0C); 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); gSPDisplayList(gMainGfxPos++, D_E0086AA0[temp_s32]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, primA); gDPSetEnvColor(gMainGfxPos++, envR, envG, engB, envA); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); shim_guRotateF(sp20, 120.0f, 1.0f, 1.0f, 1.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_input /* 3C74 80028874 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 3C78 80028878 AFB20018 */ sw $s2, 0x18($sp) /* 3C7C 8002887C 3C128007 */ lui $s2, %hi(gGameStatusPtr) /* 3C80 80028880 2652419C */ addiu $s2, $s2, %lo(gGameStatusPtr) /* 3C84 80028884 AFBF001C */ sw $ra, 0x1C($sp) /* 3C88 80028888 AFB10014 */ sw $s1, 0x14($sp) /* 3C8C 8002888C AFB00010 */ sw $s0, 0x10($sp) /* 3C90 80028890 8E420000 */ lw $v0, 0x0($s2) /* 3C94 80028894 90420073 */ lbu $v0, 0x73($v0) /* 3C98 80028898 3C11800A */ lui $s1, %hi(D_8009A5B8) /* 3C9C 8002889C 2631A5B8 */ addiu $s1, $s1, %lo(D_8009A5B8) /* 3CA0 800288A0 30420001 */ andi $v0, $v0, 0x1 /* 3CA4 800288A4 10400005 */ beqz $v0, .L800288BC /* 3CA8 800288A8 0000802D */ daddu $s0, $zero, $zero /* 3CAC 800288AC 24100001 */ addiu $s0, $zero, 0x1 /* 3CB0 800288B0 0220202D */ daddu $a0, $s1, $zero /* 3CB4 800288B4 0C017D94 */ jal nuContDataGet /* 3CB8 800288B8 0000282D */ daddu $a1, $zero, $zero .L800288BC: /* 3CBC 800288BC 8E430000 */ lw $v1, 0x0($s2) /* 3CC0 800288C0 80620071 */ lb $v0, 0x71($v1) /* 3CC4 800288C4 10400015 */ beqz $v0, .L8002891C /* 3CC8 800288C8 28420002 */ slti $v0, $v0, 0x2 /* 3CCC 800288CC 10400008 */ beqz $v0, .L800288F0 /* 3CD0 800288D0 00000000 */ nop /* 3CD4 800288D4 96220000 */ lhu $v0, 0x0($s1) /* 3CD8 800288D8 3042F000 */ andi $v0, $v0, 0xF000 /* 3CDC 800288DC 10400004 */ beqz $v0, .L800288F0 /* 3CE0 800288E0 0200102D */ daddu $v0, $s0, $zero /* 3CE4 800288E4 10400002 */ beqz $v0, .L800288F0 /* 3CE8 800288E8 24020002 */ addiu $v0, $zero, 0x2 /* 3CEC 800288EC A0620071 */ sb $v0, 0x71($v1) .L800288F0: /* 3CF0 800288F0 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 3CF4 800288F4 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* 3CF8 800288F8 8C830000 */ lw $v1, 0x0($a0) /* 3CFC 800288FC 94620068 */ lhu $v0, 0x68($v1) /* 3D00 80028900 A6220000 */ sh $v0, 0x0($s1) /* 3D04 80028904 9062006A */ lbu $v0, 0x6A($v1) /* 3D08 80028908 8C830000 */ lw $v1, 0x0($a0) /* 3D0C 8002890C A2220002 */ sb $v0, 0x2($s1) /* 3D10 80028910 9062006B */ lbu $v0, 0x6B($v1) /* 3D14 80028914 24100001 */ addiu $s0, $zero, 0x1 /* 3D18 80028918 A2220003 */ sb $v0, 0x3($s1) .L8002891C: /* 3D1C 8002891C 0200102D */ daddu $v0, $s0, $zero /* 3D20 80028920 10400166 */ beqz $v0, .L80028EBC /* 3D24 80028924 00000000 */ nop /* 3D28 80028928 92230003 */ lbu $v1, 0x3($s1) /* 3D2C 8002892C 92220002 */ lbu $v0, 0x2($s1) /* 3D30 80028930 00031E00 */ sll $v1, $v1, 24 /* 3D34 80028934 00033E03 */ sra $a3, $v1, 24 /* 3D38 80028938 00021600 */ sll $v0, $v0, 24 /* 3D3C 8002893C 18400007 */ blez $v0, .L8002895C /* 3D40 80028940 00022E03 */ sra $a1, $v0, 24 /* 3D44 80028944 24A2FFFC */ addiu $v0, $a1, -0x4 /* 3D48 80028948 0040282D */ daddu $a1, $v0, $zero /* 3D4C 8002894C 00021400 */ sll $v0, $v0, 16 /* 3D50 80028950 0441000B */ bgez $v0, .L80028980 /* 3D54 80028954 00071400 */ sll $v0, $a3, 16 /* 3D58 80028958 0000282D */ daddu $a1, $zero, $zero .L8002895C: /* 3D5C 8002895C 00051400 */ sll $v0, $a1, 16 /* 3D60 80028960 04410007 */ bgez $v0, .L80028980 /* 3D64 80028964 00071400 */ sll $v0, $a3, 16 /* 3D68 80028968 24A20004 */ addiu $v0, $a1, 0x4 /* 3D6C 8002896C 0040282D */ daddu $a1, $v0, $zero /* 3D70 80028970 00021400 */ sll $v0, $v0, 16 /* 3D74 80028974 5C400001 */ bgtzl $v0, .L8002897C /* 3D78 80028978 0000282D */ daddu $a1, $zero, $zero .L8002897C: /* 3D7C 8002897C 00071400 */ sll $v0, $a3, 16 .L80028980: /* 3D80 80028980 18400006 */ blez $v0, .L8002899C /* 3D84 80028984 24E2FFFC */ addiu $v0, $a3, -0x4 /* 3D88 80028988 0040382D */ daddu $a3, $v0, $zero /* 3D8C 8002898C 00021400 */ sll $v0, $v0, 16 /* 3D90 80028990 04410009 */ bgez $v0, .L800289B8 /* 3D94 80028994 00000000 */ nop /* 3D98 80028998 0000382D */ daddu $a3, $zero, $zero .L8002899C: /* 3D9C 8002899C 00071400 */ sll $v0, $a3, 16 /* 3DA0 800289A0 04410005 */ bgez $v0, .L800289B8 /* 3DA4 800289A4 24E20004 */ addiu $v0, $a3, 0x4 /* 3DA8 800289A8 0040382D */ daddu $a3, $v0, $zero /* 3DAC 800289AC 00021400 */ sll $v0, $v0, 16 /* 3DB0 800289B0 5C400001 */ bgtzl $v0, .L800289B8 /* 3DB4 800289B4 0000382D */ daddu $a3, $zero, $zero .L800289B8: /* 3DB8 800289B8 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 3DBC 800289BC 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) /* 3DC0 800289C0 8C620000 */ lw $v0, 0x0($v1) /* 3DC4 800289C4 A0450040 */ sb $a1, 0x40($v0) /* 3DC8 800289C8 8C620000 */ lw $v0, 0x0($v1) /* 3DCC 800289CC A0470044 */ sb $a3, 0x44($v0) /* 3DD0 800289D0 00051400 */ sll $v0, $a1, 16 /* 3DD4 800289D4 00023403 */ sra $a2, $v0, 16 /* 3DD8 800289D8 28C20021 */ slti $v0, $a2, 0x21 /* 3DDC 800289DC 96240000 */ lhu $a0, 0x0($s1) /* 3DE0 800289E0 1440001B */ bnez $v0, .L80028A50 /* 3DE4 800289E4 0000402D */ daddu $t0, $zero, $zero /* 3DE8 800289E8 24080001 */ addiu $t0, $zero, 0x1 /* 3DEC 800289EC 8C620000 */ lw $v0, 0x0($v1) /* 3DF0 800289F0 3C030008 */ lui $v1, (0x80000 >> 16) /* 3DF4 800289F4 8C420030 */ lw $v0, 0x30($v0) /* 3DF8 800289F8 00431024 */ and $v0, $v0, $v1 /* 3DFC 800289FC 14400005 */ bnez $v0, .L80028A14 /* 3E00 80028A00 00832025 */ or $a0, $a0, $v1 /* 3E04 80028A04 3C01800A */ lui $at, %hi(D_8009A6A0) /* 3E08 80028A08 A425A6A0 */ sh $a1, %lo(D_8009A6A0)($at) /* 3E0C 80028A0C 0800A295 */ j .L80028A54 /* 3E10 80028A10 00051400 */ sll $v0, $a1, 16 .L80028A14: /* 3E14 80028A14 3C02800A */ lui $v0, %hi(D_8009A6A4) /* 3E18 80028A18 8442A6A4 */ lh $v0, %lo(D_8009A6A4)($v0) /* 3E1C 80028A1C 14400006 */ bnez $v0, .L80028A38 /* 3E20 80028A20 00000000 */ nop /* 3E24 80028A24 3C03800A */ lui $v1, %hi(D_8009A6A0) /* 3E28 80028A28 2463A6A0 */ addiu $v1, $v1, %lo(D_8009A6A0) /* 3E2C 80028A2C 84620000 */ lh $v0, 0x0($v1) /* 3E30 80028A30 0800A292 */ j .L80028A48 /* 3E34 80028A34 0046102A */ slt $v0, $v0, $a2 .L80028A38: /* 3E38 80028A38 3C03800A */ lui $v1, %hi(D_8009A6A0) /* 3E3C 80028A3C 2463A6A0 */ addiu $v1, $v1, %lo(D_8009A6A0) /* 3E40 80028A40 84620000 */ lh $v0, 0x0($v1) /* 3E44 80028A44 00C2102A */ slt $v0, $a2, $v0 .L80028A48: /* 3E48 80028A48 54400001 */ bnel $v0, $zero, .L80028A50 /* 3E4C 80028A4C A4650000 */ sh $a1, 0x0($v1) .L80028A50: /* 3E50 80028A50 00051400 */ sll $v0, $a1, 16 .L80028A54: /* 3E54 80028A54 00023403 */ sra $a2, $v0, 16 /* 3E58 80028A58 28C2FFE0 */ slti $v0, $a2, -0x20 /* 3E5C 80028A5C 1040001D */ beqz $v0, .L80028AD4 /* 3E60 80028A60 0100102D */ daddu $v0, $t0, $zero /* 3E64 80028A64 24080001 */ addiu $t0, $zero, 0x1 /* 3E68 80028A68 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 3E6C 80028A6C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 3E70 80028A70 3C030004 */ lui $v1, (0x40000 >> 16) /* 3E74 80028A74 8C420030 */ lw $v0, 0x30($v0) /* 3E78 80028A78 00431024 */ and $v0, $v0, $v1 /* 3E7C 80028A7C 14400005 */ bnez $v0, .L80028A94 /* 3E80 80028A80 00832025 */ or $a0, $a0, $v1 /* 3E84 80028A84 3C01800A */ lui $at, %hi(D_8009A6A0) /* 3E88 80028A88 A425A6A0 */ sh $a1, %lo(D_8009A6A0)($at) /* 3E8C 80028A8C 0800A2B5 */ j .L80028AD4 /* 3E90 80028A90 0100102D */ daddu $v0, $t0, $zero .L80028A94: /* 3E94 80028A94 3C02800A */ lui $v0, %hi(D_8009A6A4) /* 3E98 80028A98 8442A6A4 */ lh $v0, %lo(D_8009A6A4)($v0) /* 3E9C 80028A9C 14400006 */ bnez $v0, .L80028AB8 /* 3EA0 80028AA0 00000000 */ nop /* 3EA4 80028AA4 3C03800A */ lui $v1, %hi(D_8009A6A0) /* 3EA8 80028AA8 2463A6A0 */ addiu $v1, $v1, %lo(D_8009A6A0) /* 3EAC 80028AAC 84620000 */ lh $v0, 0x0($v1) /* 3EB0 80028AB0 0800A2B2 */ j .L80028AC8 /* 3EB4 80028AB4 00C2102A */ slt $v0, $a2, $v0 .L80028AB8: /* 3EB8 80028AB8 3C03800A */ lui $v1, %hi(D_8009A6A0) /* 3EBC 80028ABC 2463A6A0 */ addiu $v1, $v1, %lo(D_8009A6A0) /* 3EC0 80028AC0 84620000 */ lh $v0, 0x0($v1) /* 3EC4 80028AC4 0046102A */ slt $v0, $v0, $a2 .L80028AC8: /* 3EC8 80028AC8 54400001 */ bnel $v0, $zero, .L80028AD0 /* 3ECC 80028ACC A4650000 */ sh $a1, 0x0($v1) .L80028AD0: /* 3ED0 80028AD0 0100102D */ daddu $v0, $t0, $zero .L80028AD4: /* 3ED4 80028AD4 14400005 */ bnez $v0, .L80028AEC /* 3ED8 80028AD8 00071400 */ sll $v0, $a3, 16 /* 3EDC 80028ADC 3C01800A */ lui $at, %hi(D_8009A6A4) /* 3EE0 80028AE0 A420A6A4 */ sh $zero, %lo(D_8009A6A4)($at) /* 3EE4 80028AE4 3C01800A */ lui $at, %hi(D_8009A6A0) /* 3EE8 80028AE8 A425A6A0 */ sh $a1, %lo(D_8009A6A0)($at) .L80028AEC: /* 3EEC 80028AEC 00023403 */ sra $a2, $v0, 16 /* 3EF0 80028AF0 28C20021 */ slti $v0, $a2, 0x21 /* 3EF4 80028AF4 1440001C */ bnez $v0, .L80028B68 /* 3EF8 80028AF8 0000402D */ daddu $t0, $zero, $zero /* 3EFC 80028AFC 24080001 */ addiu $t0, $zero, 0x1 /* 3F00 80028B00 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 3F04 80028B04 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 3F08 80028B08 3C030001 */ lui $v1, (0x10000 >> 16) /* 3F0C 80028B0C 8C420030 */ lw $v0, 0x30($v0) /* 3F10 80028B10 00431024 */ and $v0, $v0, $v1 /* 3F14 80028B14 14400005 */ bnez $v0, .L80028B2C /* 3F18 80028B18 00832025 */ or $a0, $a0, $v1 /* 3F1C 80028B1C 3C01800A */ lui $at, %hi(D_8009A6A2) /* 3F20 80028B20 A427A6A2 */ sh $a3, %lo(D_8009A6A2)($at) /* 3F24 80028B24 0800A2DB */ j .L80028B6C /* 3F28 80028B28 00071400 */ sll $v0, $a3, 16 .L80028B2C: /* 3F2C 80028B2C 3C02800A */ lui $v0, %hi(D_8009A6A6) /* 3F30 80028B30 8442A6A6 */ lh $v0, %lo(D_8009A6A6)($v0) /* 3F34 80028B34 14400006 */ bnez $v0, .L80028B50 /* 3F38 80028B38 00000000 */ nop /* 3F3C 80028B3C 3C03800A */ lui $v1, %hi(D_8009A6A2) /* 3F40 80028B40 2463A6A2 */ addiu $v1, $v1, %lo(D_8009A6A2) /* 3F44 80028B44 84620000 */ lh $v0, 0x0($v1) /* 3F48 80028B48 0800A2D8 */ j .L80028B60 /* 3F4C 80028B4C 0046102A */ slt $v0, $v0, $a2 .L80028B50: /* 3F50 80028B50 3C03800A */ lui $v1, %hi(D_8009A6A2) /* 3F54 80028B54 2463A6A2 */ addiu $v1, $v1, %lo(D_8009A6A2) /* 3F58 80028B58 84620000 */ lh $v0, 0x0($v1) /* 3F5C 80028B5C 00C2102A */ slt $v0, $a2, $v0 .L80028B60: /* 3F60 80028B60 54400001 */ bnel $v0, $zero, .L80028B68 /* 3F64 80028B64 A4670000 */ sh $a3, 0x0($v1) .L80028B68: /* 3F68 80028B68 00071400 */ sll $v0, $a3, 16 .L80028B6C: /* 3F6C 80028B6C 00023403 */ sra $a2, $v0, 16 /* 3F70 80028B70 28C2FFE0 */ slti $v0, $a2, -0x20 /* 3F74 80028B74 1040002B */ beqz $v0, .L80028C24 /* 3F78 80028B78 0100102D */ daddu $v0, $t0, $zero /* 3F7C 80028B7C 24080001 */ addiu $t0, $zero, 0x1 /* 3F80 80028B80 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 3F84 80028B84 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 3F88 80028B88 3C030002 */ lui $v1, (0x20000 >> 16) /* 3F8C 80028B8C 8C420030 */ lw $v0, 0x30($v0) /* 3F90 80028B90 00431024 */ and $v0, $v0, $v1 /* 3F94 80028B94 14400005 */ bnez $v0, .L80028BAC /* 3F98 80028B98 00832025 */ or $a0, $a0, $v1 /* 3F9C 80028B9C 3C01800A */ lui $at, %hi(D_8009A6A2) /* 3FA0 80028BA0 A427A6A2 */ sh $a3, %lo(D_8009A6A2)($at) /* 3FA4 80028BA4 0800A309 */ j .L80028C24 /* 3FA8 80028BA8 0100102D */ daddu $v0, $t0, $zero .L80028BAC: /* 3FAC 80028BAC 3C02800A */ lui $v0, %hi(D_8009A6A6) /* 3FB0 80028BB0 8442A6A6 */ lh $v0, %lo(D_8009A6A6)($v0) /* 3FB4 80028BB4 14400014 */ bnez $v0, .L80028C08 /* 3FB8 80028BB8 00000000 */ nop /* 3FBC 80028BBC 3C03800A */ lui $v1, %hi(D_8009A6A2) /* 3FC0 80028BC0 2463A6A2 */ addiu $v1, $v1, %lo(D_8009A6A2) /* 3FC4 80028BC4 84620000 */ lh $v0, 0x0($v1) /* 3FC8 80028BC8 0800A306 */ j .L80028C18 /* 3FCC 80028BCC 00C2102A */ slt $v0, $a2, $v0 .L80028BD0: /* 3FD0 80028BD0 8CA30000 */ lw $v1, 0x0($a1) /* 3FD4 80028BD4 8CA40030 */ lw $a0, 0x30($a1) /* 3FD8 80028BD8 2402FFFF */ addiu $v0, $zero, -0x1 /* 3FDC 80028BDC A4A20060 */ sh $v0, 0x60($a1) /* 3FE0 80028BE0 8CA20000 */ lw $v0, 0x0($a1) /* 3FE4 80028BE4 00641826 */ xor $v1, $v1, $a0 /* 3FE8 80028BE8 94A40048 */ lhu $a0, 0x48($a1) /* 3FEC 80028BEC ACA30020 */ sw $v1, 0x20($a1) /* 3FF0 80028BF0 00621824 */ and $v1, $v1, $v0 /* 3FF4 80028BF4 ACA30020 */ sw $v1, 0x20($a1) /* 3FF8 80028BF8 0800A3AB */ j .L80028EAC /* 3FFC 80028BFC A4A40058 */ sh $a0, 0x58($a1) .L80028C00: /* 4000 80028C00 0800A3AB */ j .L80028EAC /* 4004 80028C04 ACA00020 */ sw $zero, 0x20($a1) .L80028C08: /* 4008 80028C08 3C03800A */ lui $v1, %hi(D_8009A6A2) /* 400C 80028C0C 2463A6A2 */ addiu $v1, $v1, %lo(D_8009A6A2) /* 4010 80028C10 84620000 */ lh $v0, 0x0($v1) /* 4014 80028C14 0046102A */ slt $v0, $v0, $a2 .L80028C18: /* 4018 80028C18 54400001 */ bnel $v0, $zero, .L80028C20 /* 401C 80028C1C A4670000 */ sh $a3, 0x0($v1) .L80028C20: /* 4020 80028C20 0100102D */ daddu $v0, $t0, $zero .L80028C24: /* 4024 80028C24 14400005 */ bnez $v0, .L80028C3C /* 4028 80028C28 00051400 */ sll $v0, $a1, 16 /* 402C 80028C2C 3C01800A */ lui $at, %hi(D_8009A6A6) /* 4030 80028C30 A420A6A6 */ sh $zero, %lo(D_8009A6A6)($at) /* 4034 80028C34 3C01800A */ lui $at, %hi(D_8009A6A2) /* 4038 80028C38 A427A6A2 */ sh $a3, %lo(D_8009A6A2)($at) .L80028C3C: /* 403C 80028C3C 00023403 */ sra $a2, $v0, 16 /* 4040 80028C40 28C20021 */ slti $v0, $a2, 0x21 /* 4044 80028C44 1440001C */ bnez $v0, .L80028CB8 /* 4048 80028C48 00051400 */ sll $v0, $a1, 16 /* 404C 80028C4C 3C08800A */ lui $t0, %hi(D_8009A6A4) /* 4050 80028C50 2508A6A4 */ addiu $t0, $t0, %lo(D_8009A6A4) /* 4054 80028C54 85030000 */ lh $v1, 0x0($t0) /* 4058 80028C58 24020001 */ addiu $v0, $zero, 0x1 /* 405C 80028C5C 1462000A */ bne $v1, $v0, .L80028C88 /* 4060 80028C60 00000000 */ nop /* 4064 80028C64 3C02800A */ lui $v0, %hi(D_8009A6A0) /* 4068 80028C68 8442A6A0 */ lh $v0, %lo(D_8009A6A0)($v0) /* 406C 80028C6C 00C21023 */ subu $v0, $a2, $v0 /* 4070 80028C70 28420011 */ slti $v0, $v0, 0x11 /* 4074 80028C74 14400004 */ bnez $v0, .L80028C88 /* 4078 80028C78 3C02FFF7 */ lui $v0, (0xFFF7FFFF >> 16) /* 407C 80028C7C 3442FFFF */ ori $v0, $v0, (0xFFF7FFFF & 0xFFFF) /* 4080 80028C80 00822024 */ and $a0, $a0, $v0 /* 4084 80028C84 A5000000 */ sh $zero, 0x0($t0) .L80028C88: /* 4088 80028C88 3C03800A */ lui $v1, %hi(D_8009A6A0) /* 408C 80028C8C 8463A6A0 */ lh $v1, %lo(D_8009A6A0)($v1) /* 4090 80028C90 00051400 */ sll $v0, $a1, 16 /* 4094 80028C94 00021403 */ sra $v0, $v0, 16 /* 4098 80028C98 00621823 */ subu $v1, $v1, $v0 /* 409C 80028C9C 28630011 */ slti $v1, $v1, 0x11 /* 40A0 80028CA0 14600005 */ bnez $v1, .L80028CB8 /* 40A4 80028CA4 00051400 */ sll $v0, $a1, 16 /* 40A8 80028CA8 24020001 */ addiu $v0, $zero, 0x1 /* 40AC 80028CAC 3C01800A */ lui $at, %hi(D_8009A6A4) /* 40B0 80028CB0 A422A6A4 */ sh $v0, %lo(D_8009A6A4)($at) /* 40B4 80028CB4 00051400 */ sll $v0, $a1, 16 .L80028CB8: /* 40B8 80028CB8 00023403 */ sra $a2, $v0, 16 /* 40BC 80028CBC 28C2FFE0 */ slti $v0, $a2, -0x20 /* 40C0 80028CC0 1040001B */ beqz $v0, .L80028D30 /* 40C4 80028CC4 24020001 */ addiu $v0, $zero, 0x1 /* 40C8 80028CC8 3C08800A */ lui $t0, %hi(D_8009A6A4) /* 40CC 80028CCC 2508A6A4 */ addiu $t0, $t0, %lo(D_8009A6A4) /* 40D0 80028CD0 85030000 */ lh $v1, 0x0($t0) /* 40D4 80028CD4 1462000C */ bne $v1, $v0, .L80028D08 /* 40D8 80028CD8 00051400 */ sll $v0, $a1, 16 /* 40DC 80028CDC 3C02800A */ lui $v0, %hi(D_8009A6A0) /* 40E0 80028CE0 8442A6A0 */ lh $v0, %lo(D_8009A6A0)($v0) /* 40E4 80028CE4 00461023 */ subu $v0, $v0, $a2 /* 40E8 80028CE8 28420011 */ slti $v0, $v0, 0x11 /* 40EC 80028CEC 14400006 */ bnez $v0, .L80028D08 /* 40F0 80028CF0 00051400 */ sll $v0, $a1, 16 /* 40F4 80028CF4 3C02FFFB */ lui $v0, (0xFFFBFFFF >> 16) /* 40F8 80028CF8 3442FFFF */ ori $v0, $v0, (0xFFFBFFFF & 0xFFFF) /* 40FC 80028CFC 00822024 */ and $a0, $a0, $v0 /* 4100 80028D00 A5000000 */ sh $zero, 0x0($t0) /* 4104 80028D04 00051400 */ sll $v0, $a1, 16 .L80028D08: /* 4108 80028D08 3C03800A */ lui $v1, %hi(D_8009A6A0) /* 410C 80028D0C 8463A6A0 */ lh $v1, %lo(D_8009A6A0)($v1) /* 4110 80028D10 00021403 */ sra $v0, $v0, 16 /* 4114 80028D14 00431023 */ subu $v0, $v0, $v1 /* 4118 80028D18 28420011 */ slti $v0, $v0, 0x11 /* 411C 80028D1C 14400005 */ bnez $v0, .L80028D34 /* 4120 80028D20 00071400 */ sll $v0, $a3, 16 /* 4124 80028D24 24020001 */ addiu $v0, $zero, 0x1 /* 4128 80028D28 3C01800A */ lui $at, %hi(D_8009A6A4) /* 412C 80028D2C A422A6A4 */ sh $v0, %lo(D_8009A6A4)($at) .L80028D30: /* 4130 80028D30 00071400 */ sll $v0, $a3, 16 .L80028D34: /* 4134 80028D34 00022C03 */ sra $a1, $v0, 16 /* 4138 80028D38 28A20021 */ slti $v0, $a1, 0x21 /* 413C 80028D3C 1440001C */ bnez $v0, .L80028DB0 /* 4140 80028D40 00071400 */ sll $v0, $a3, 16 /* 4144 80028D44 3C06800A */ lui $a2, %hi(D_8009A6A6) /* 4148 80028D48 24C6A6A6 */ addiu $a2, $a2, %lo(D_8009A6A6) /* 414C 80028D4C 84C30000 */ lh $v1, 0x0($a2) /* 4150 80028D50 24020001 */ addiu $v0, $zero, 0x1 /* 4154 80028D54 1462000A */ bne $v1, $v0, .L80028D80 /* 4158 80028D58 00000000 */ nop /* 415C 80028D5C 3C02800A */ lui $v0, %hi(D_8009A6A2) /* 4160 80028D60 8442A6A2 */ lh $v0, %lo(D_8009A6A2)($v0) /* 4164 80028D64 00A21023 */ subu $v0, $a1, $v0 /* 4168 80028D68 28420011 */ slti $v0, $v0, 0x11 /* 416C 80028D6C 14400004 */ bnez $v0, .L80028D80 /* 4170 80028D70 3C02FFFE */ lui $v0, (0xFFFEFFFF >> 16) /* 4174 80028D74 3442FFFF */ ori $v0, $v0, (0xFFFEFFFF & 0xFFFF) /* 4178 80028D78 00822024 */ and $a0, $a0, $v0 /* 417C 80028D7C A4C00000 */ sh $zero, 0x0($a2) .L80028D80: /* 4180 80028D80 3C03800A */ lui $v1, %hi(D_8009A6A2) /* 4184 80028D84 8463A6A2 */ lh $v1, %lo(D_8009A6A2)($v1) /* 4188 80028D88 00071400 */ sll $v0, $a3, 16 /* 418C 80028D8C 00021403 */ sra $v0, $v0, 16 /* 4190 80028D90 00621823 */ subu $v1, $v1, $v0 /* 4194 80028D94 28630011 */ slti $v1, $v1, 0x11 /* 4198 80028D98 14600005 */ bnez $v1, .L80028DB0 /* 419C 80028D9C 00071400 */ sll $v0, $a3, 16 /* 41A0 80028DA0 24020001 */ addiu $v0, $zero, 0x1 /* 41A4 80028DA4 3C01800A */ lui $at, %hi(D_8009A6A6) /* 41A8 80028DA8 A422A6A6 */ sh $v0, %lo(D_8009A6A6)($at) /* 41AC 80028DAC 00071400 */ sll $v0, $a3, 16 .L80028DB0: /* 41B0 80028DB0 00022C03 */ sra $a1, $v0, 16 /* 41B4 80028DB4 28A2FFE0 */ slti $v0, $a1, -0x20 /* 41B8 80028DB8 1040001A */ beqz $v0, .L80028E24 /* 41BC 80028DBC 24020001 */ addiu $v0, $zero, 0x1 /* 41C0 80028DC0 3C06800A */ lui $a2, %hi(D_8009A6A6) /* 41C4 80028DC4 24C6A6A6 */ addiu $a2, $a2, %lo(D_8009A6A6) /* 41C8 80028DC8 84C30000 */ lh $v1, 0x0($a2) /* 41CC 80028DCC 1462000C */ bne $v1, $v0, .L80028E00 /* 41D0 80028DD0 00071400 */ sll $v0, $a3, 16 /* 41D4 80028DD4 3C02800A */ lui $v0, %hi(D_8009A6A2) /* 41D8 80028DD8 8442A6A2 */ lh $v0, %lo(D_8009A6A2)($v0) /* 41DC 80028DDC 00451023 */ subu $v0, $v0, $a1 /* 41E0 80028DE0 28420011 */ slti $v0, $v0, 0x11 /* 41E4 80028DE4 14400006 */ bnez $v0, .L80028E00 /* 41E8 80028DE8 00071400 */ sll $v0, $a3, 16 /* 41EC 80028DEC 3C02FFFD */ lui $v0, (0xFFFDFFFF >> 16) /* 41F0 80028DF0 3442FFFF */ ori $v0, $v0, (0xFFFDFFFF & 0xFFFF) /* 41F4 80028DF4 00822024 */ and $a0, $a0, $v0 /* 41F8 80028DF8 A4C00000 */ sh $zero, 0x0($a2) /* 41FC 80028DFC 00071400 */ sll $v0, $a3, 16 .L80028E00: /* 4200 80028E00 3C03800A */ lui $v1, %hi(D_8009A6A2) /* 4204 80028E04 8463A6A2 */ lh $v1, %lo(D_8009A6A2)($v1) /* 4208 80028E08 00021403 */ sra $v0, $v0, 16 /* 420C 80028E0C 00431023 */ subu $v0, $v0, $v1 /* 4210 80028E10 28420011 */ slti $v0, $v0, 0x11 /* 4214 80028E14 14400003 */ bnez $v0, .L80028E24 /* 4218 80028E18 24020001 */ addiu $v0, $zero, 0x1 /* 421C 80028E1C 3C01800A */ lui $at, %hi(D_8009A6A6) /* 4220 80028E20 A422A6A6 */ sh $v0, %lo(D_8009A6A6)($at) .L80028E24: /* 4224 80028E24 3C058007 */ lui $a1, %hi(gGameStatusPtr) /* 4228 80028E28 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) /* 422C 80028E2C 8CA20030 */ lw $v0, 0x30($a1) /* 4230 80028E30 ACA40000 */ sw $a0, 0x0($a1) /* 4234 80028E34 0080182D */ daddu $v1, $a0, $zero /* 4238 80028E38 00821026 */ xor $v0, $a0, $v0 /* 423C 80028E3C ACA20010 */ sw $v0, 0x10($a1) /* 4240 80028E40 00431024 */ and $v0, $v0, $v1 /* 4244 80028E44 1060FF6E */ beqz $v1, .L80028C00 /* 4248 80028E48 ACA20010 */ sw $v0, 0x10($a1) /* 424C 80028E4C 8CA20030 */ lw $v0, 0x30($a1) /* 4250 80028E50 5443FF5F */ bnel $v0, $v1, .L80028BD0 /* 4254 80028E54 ACA30020 */ sw $v1, 0x20($a1) /* 4258 80028E58 84A20060 */ lh $v0, 0x60($a1) /* 425C 80028E5C 94A30060 */ lhu $v1, 0x60($a1) /* 4260 80028E60 04400008 */ bltz $v0, .L80028E84 /* 4264 80028E64 2462FFFF */ addiu $v0, $v1, -0x1 /* 4268 80028E68 A4A20060 */ sh $v0, 0x60($a1) /* 426C 80028E6C 00021400 */ sll $v0, $v0, 16 /* 4270 80028E70 1440FF63 */ bnez $v0, .L80028C00 /* 4274 80028E74 0080102D */ daddu $v0, $a0, $zero /* 4278 80028E78 94A30050 */ lhu $v1, 0x50($a1) /* 427C 80028E7C 0800A3AA */ j .L80028EA8 /* 4280 80028E80 ACA20020 */ sw $v0, 0x20($a1) .L80028E84: /* 4284 80028E84 94A20058 */ lhu $v0, 0x58($a1) /* 4288 80028E88 2442FFFF */ addiu $v0, $v0, -0x1 /* 428C 80028E8C A4A20058 */ sh $v0, 0x58($a1) /* 4290 80028E90 00021400 */ sll $v0, $v0, 16 /* 4294 80028E94 54400005 */ bnel $v0, $zero, .L80028EAC /* 4298 80028E98 ACA00020 */ sw $zero, 0x20($a1) /* 429C 80028E9C 8CA20000 */ lw $v0, 0x0($a1) /* 42A0 80028EA0 94A30050 */ lhu $v1, 0x50($a1) /* 42A4 80028EA4 ACA20020 */ sw $v0, 0x20($a1) .L80028EA8: /* 42A8 80028EA8 A4A30060 */ sh $v1, 0x60($a1) .L80028EAC: /* 42AC 80028EAC 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 42B0 80028EB0 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 42B4 80028EB4 8C620000 */ lw $v0, 0x0($v1) /* 42B8 80028EB8 AC620030 */ sw $v0, 0x30($v1) .L80028EBC: /* 42BC 80028EBC 8FBF001C */ lw $ra, 0x1C($sp) /* 42C0 80028EC0 8FB20018 */ lw $s2, 0x18($sp) /* 42C4 80028EC4 8FB10014 */ lw $s1, 0x14($sp) /* 42C8 80028EC8 8FB00010 */ lw $s0, 0x10($sp) /* 42CC 80028ECC 03E00008 */ jr $ra /* 42D0 80028ED0 27BD0020 */ addiu $sp, $sp, 0x20 /* 42D4 80028ED4 00000000 */ nop /* 42D8 80028ED8 00000000 */ nop /* 42DC 80028EDC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void update_input(void) { OSContPad* contData = &D_8009A5B8; s16 handleInput = FALSE; s16 cond1; s32 buttons; s16 stickX; s16 stickY; if (gGameStatusPtr->contBitPattern & 1) { handleInput = TRUE; nuContDataGet(contData, 0); } if (gGameStatusPtr->demoState != DEMO_STATE_NONE) { if (gGameStatusPtr->demoState < DEMO_STATE_CHANGE_MAP && (contData->button & (BUTTON_A | BUTTON_B | BUTTON_Z | BUTTON_START)) && handleInput ) { gGameStatusPtr->demoState = DEMO_STATE_CHANGE_MAP; } contData->button = gGameStatusPtr->demoButtonInput; contData->stick_x = gGameStatusPtr->demoStickX; contData->stick_y = gGameStatusPtr->demoStickY; handleInput = TRUE; } if (!handleInput) { return; } stickX = contData->stick_x; stickY = contData->stick_y; if (stickX > 0) { stickX -= 4; if (stickX < 0) { stickX = 0; } } if (stickX < 0) { stickX += 4; if (stickX > 0) { stickX = 0; } } if (stickY > 0) { stickY -= 4; if (stickY < 0) { stickY = 0; } } if (stickY < 0) { stickY += 4; if (stickY > 0) { stickY = 0; } } gGameStatusPtr->stickX[0] = stickX; gGameStatusPtr->stickY[0] = stickY; buttons = contData->button; cond1 = FALSE; if (stickX > 0x20) { cond1 = TRUE; buttons |= BUTTON_STICK_RIGHT; if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_RIGHT)) { D_8009A6A0 = stickX; } else if (D_8009A6A4 == 0) { if (D_8009A6A0 < stickX) { D_8009A6A0 = stickX; } } else { if (D_8009A6A0 > stickX) { D_8009A6A0 = stickX; } } } if (stickX < -0x20) { cond1 = TRUE; buttons |= BUTTON_STICK_LEFT; if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_LEFT)) { D_8009A6A0 = stickX; } else if (D_8009A6A4 == 0) { if (D_8009A6A0 > stickX) { D_8009A6A0 = stickX; } } else { if (D_8009A6A0 < stickX) { D_8009A6A0 = stickX; } } } if (!cond1) { D_8009A6A4 = 0; D_8009A6A0 = stickX; } cond1 = FALSE; if (stickY > 0x20) { cond1 = TRUE; buttons |= BUTTON_STICK_UP; if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_UP)) { D_8009A6A2 = stickY; } else if (D_8009A6A6 == 0) { if (D_8009A6A2 < stickY) { D_8009A6A2 = stickY; } } else { if (D_8009A6A2 > stickY) { D_8009A6A2 = stickY; } } } if (stickY < -0x20) { cond1 = TRUE; buttons |= BUTTON_STICK_DOWN; if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_DOWN)) { D_8009A6A2 = stickY; } else if (D_8009A6A6 == 0) { if (D_8009A6A2 > stickY) { D_8009A6A2 = stickY; } } else { if (D_8009A6A2 < stickY) { D_8009A6A2 = stickY; } } } if (!cond1) { D_8009A6A6 = 0; D_8009A6A2 = stickY; } if (stickX > 0x20) { if (D_8009A6A4 == 1 && stickX - D_8009A6A0 > 0x10) { buttons &= ~BUTTON_STICK_RIGHT; D_8009A6A4 = 0; } if (D_8009A6A0 - stickX > 0x10) { D_8009A6A4 = 1; } } if (stickX < -0x20) { if (D_8009A6A4 == 1 && D_8009A6A0 - stickX > 0x10) { buttons &= ~BUTTON_STICK_LEFT; D_8009A6A4 = 0; } if (stickX - D_8009A6A0 > 0x10) { D_8009A6A4 = 1; } } if (stickY > 0x20) { if (D_8009A6A6 == 1 && stickY - D_8009A6A2 > 0x10) { buttons &= ~BUTTON_STICK_UP; D_8009A6A6 = 0; } if (D_8009A6A2 - stickY > 0x10) { D_8009A6A6 = 1; } } if (stickY < -0x20) { if (D_8009A6A6 == 1 && D_8009A6A2 - stickY > 0x10) { buttons &= ~BUTTON_STICK_DOWN; D_8009A6A6 = 0; } if (stickY - D_8009A6A2 > 0x10) { D_8009A6A6 = 1; } } gGameStatusPtr->currentButtons[0] = buttons; gGameStatusPtr->pressedButtons[0] = gGameStatusPtr->currentButtons[0] ^ gGameStatusPtr->prevButtons[0]; gGameStatusPtr->pressedButtons[0] &= gGameStatusPtr->currentButtons[0]; do { if (gGameStatusPtr->currentButtons[0] == 0) { gGameStatusPtr->heldButtons[0] = 0; } else if (gGameStatusPtr->prevButtons[0] != gGameStatusPtr->currentButtons[0]) { gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0]; gGameStatusPtr->unk_60 = -1; gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0] ^ gGameStatusPtr->prevButtons[0]; gGameStatusPtr->heldButtons[0] &= gGameStatusPtr->currentButtons[0]; gGameStatusPtr->unk_58 = gGameStatusPtr->unk_48[0]; } else { if (gGameStatusPtr->unk_60 >= 0) { gGameStatusPtr->unk_60--; if (gGameStatusPtr->unk_60 != 0) { gGameStatusPtr->heldButtons[0] = 0; } else { gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0]; gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0]; } } else { gGameStatusPtr->unk_58--; if (gGameStatusPtr->unk_58 != 0) { gGameStatusPtr->heldButtons[0] = 0; } else { gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0]; gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0]; } } } } while (0); gGameStatusPtr->prevButtons[0] = gGameStatusPtr->currentButtons[0]; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8021835C /* 59EA3C 8021835C 27BDFF78 */ addiu $sp, $sp, -0x88 glabel b_area_mim_mim_01_UnkFogFunc2 /* 59EA40 80218360 3C038023 */ lui $v1, %hi(b_area_kzn2_VineRenderState) /* 59EA44 80218364 8C63B550 */ lw $v1, %lo(b_area_kzn2_VineRenderState)($v1) D_80218368: /* 59EA48 80218368 2402FFFF */ addiu $v0, $zero, -0x1 .L8021836C: /* 59EA4C 8021836C AFBF0054 */ sw $ra, 0x54($sp) .L80218370: /* 59EA50 80218370 AFBE0050 */ sw $fp, 0x50($sp) .L80218374: /* 59EA54 80218374 AFB7004C */ sw $s7, 0x4C($sp) glabel func_80218378 /* 59EA58 80218378 AFB60048 */ sw $s6, 0x48($sp) glabel b_area_trd_part_2_PlayLandOnTowerFX /* 59EA5C 8021837C AFB50044 */ sw $s5, 0x44($sp) glabel dup_b_area_flo_SetAbsoluteStatusOffsets /* 59EA60 80218380 AFB40040 */ sw $s4, 0x40($sp) glabel b_area_tik2_UnfadeBackgroundToBlack /* 59EA64 80218384 AFB3003C */ sw $s3, 0x3C($sp) .L80218388: /* 59EA68 80218388 AFB20038 */ sw $s2, 0x38($sp) glabel func_8021838C /* 59EA6C 8021838C AFB10034 */ sw $s1, 0x34($sp) D_80218390: /* 59EA70 80218390 AFB00030 */ sw $s0, 0x30($sp) /* 59EA74 80218394 F7BE0080 */ sdc1 $f30, 0x80($sp) b_area_iwa_Formation_07: /* 59EA78 80218398 F7BC0078 */ sdc1 $f28, 0x78($sp) /* 59EA7C 8021839C F7BA0070 */ sdc1 $f26, 0x70($sp) glabel func_802183A0 /* 59EA80 802183A0 F7B80068 */ sdc1 $f24, 0x68($sp) glabel func_802183A4_660AF4 /* 59EA84 802183A4 F7B60060 */ sdc1 $f22, 0x60($sp) glabel b_area_jan2_white_magikoopa_GetSelectedMoveID /* 59EA88 802183A8 1062012F */ beq $v1, $v0, .L80218868_59EF48 .L802183AC: /* 59EA8C 802183AC F7B40058 */ sdc1 $f20, 0x58($sp) .L802183B0: /* 59EA90 802183B0 14600059 */ bnez $v1, .L80218518_59EBF8 .L802183B4: /* 59EA94 802183B4 0000382D */ daddu $a3, $zero, $zero /* 59EA98 802183B8 3C108023 */ lui $s0, %hi(b_area_kzn2_VineData) /* 59EA9C 802183BC 2610ADD0 */ addiu $s0, $s0, %lo(b_area_kzn2_VineData) D_802183C0: /* 59EAA0 802183C0 3C0142B4 */ lui $at, (0x42B40000 >> 16) .L802183C4: /* 59EAA4 802183C4 4481E000 */ mtc1 $at, $f28 .L802183C8: /* 59EAA8 802183C8 3C014334 */ lui $at, (0x43340000 >> 16) D_802183CC: /* 59EAAC 802183CC 4481D000 */ mtc1 $at, $f26 /* 59EAB0 802183D0 3C0143B4 */ lui $at, (0x43B40000 >> 16) glabel func_802183D4 /* 59EAB4 802183D4 4481A000 */ mtc1 $at, $f20 .L802183D8: /* 59EAB8 802183D8 3C01C334 */ lui $at, (0xC3340000 >> 16) glabel func_802183DC /* 59EABC 802183DC 4481B000 */ mtc1 $at, $f22 glabel b_area_dig_IsSaveVar123 /* 59EAC0 802183E0 24020001 */ addiu $v0, $zero, 0x1 .L802183E4: /* 59EAC4 802183E4 10E20011 */ beq $a3, $v0, .L8021842C b_area_omo2_general_guy_ActorParts: /* 59EAC8 802183E8 28E20002 */ slti $v0, $a3, 0x2 glabel func_802183EC_6DC18C /* 59EACC 802183EC 50400005 */ beql $v0, $zero, func_80218404 .L802183F0: /* 59EAD0 802183F0 24020002 */ addiu $v0, $zero, 0x2 .L802183F4: /* 59EAD4 802183F4 10E00009 */ beqz $a3, .L8021841C glabel b_area_hos_magikoopa_UnkFunc52 /* 59EAD8 802183F8 00000000 */ nop /* 59EADC 802183FC 0808621A */ j .L80218868_59EF48 .L80218400: /* 59EAE0 80218400 00000000 */ nop glabel func_80218404 /* 59EAE4 80218404 10E2000B */ beq $a3, $v0, .L80218434_59EB14 .L80218408: /* 59EAE8 80218408 24020003 */ addiu $v0, $zero, 0x3 glabel func_8021840C /* 59EAEC 8021840C 10E2000A */ beq $a3, $v0, b_area_kpa4_GetSelectedMoveID glabel b_area_omo_anti_guy_SetAbsoluteStatusOffsets /* 59EAF0 80218410 24140005 */ addiu $s4, $zero, 0x5 D_80218414: /* 59EAF4 80218414 0808621A */ j .L80218868_59EF48 .L80218418: /* 59EAF8 80218418 00000000 */ nop .L8021841C: /* 59EAFC 8021841C 3C014120 */ lui $at, (0x41200000 >> 16) .L80218420: /* 59EB00 80218420 4481C000 */ mtc1 $at, $f24 D_80218424: /* 59EB04 80218424 08086110 */ j func_80218440_5CEAD0 glabel func_80218428 /* 59EB08 80218428 24140009 */ addiu $s4, $zero, 0x9 .L8021842C: /* 59EB0C 8021842C 0808610E */ j b_area_kpa4_GetSelectedMoveID glabel b_area_dig_UpdateSunPos /* 59EB10 80218430 24140007 */ addiu $s4, $zero, 0x7 .L80218434_59EB14: /* 59EB14 80218434 24140007 */ addiu $s4, $zero, 0x7 glabel b_area_kpa4_GetSelectedMoveID /* 59EB18 80218438 3C014100 */ lui $at, (0x41000000 >> 16) .L8021843C: /* 59EB1C 8021843C 4481C000 */ mtc1 $at, $f24 glabel func_80218440_5CEAD0 /* 59EB20 80218440 0000882D */ daddu $s1, $zero, $zero .L80218444: /* 59EB24 80218444 AE140090 */ sw $s4, 0x90($s0) /* 59EB28 80218448 1A800027 */ blez $s4, b_area_kpa_GetSelectedMoveID glabel b_area_flo_MediGuySpriteRotationFunc /* 59EB2C 8021844C E6180094 */ swc1 $f24, 0x94($s0) glabel b_area_kzn_medi_guy_SetAbsoluteStatusOffsets /* 59EB30 80218450 2685FFFF */ addiu $a1, $s4, -0x1 .L80218454: /* 59EB34 80218454 0200182D */ daddu $v1, $s0, $zero glabel dup3_b_area_pra_GetSelectedMoveID /* 59EB38 80218458 24040004 */ addiu $a0, $zero, 0x4 D_8021845C: /* 59EB3C 8021845C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) .L80218460: /* 59EB40 80218460 44814800 */ mtc1 $at, $f9 glabel b_area_kpa4_SetAbsoluteStatusOffsets /* 59EB44 80218464 44804000 */ mtc1 $zero, $f8 .L80218468: /* 59EB48 80218468 3C018023 */ lui $at, %hi(D_8022AC40_45A080) /* 59EB4C 8021846C D426AC40 */ ldc1 $f6, %lo(D_8022AC40_45A080)($at) .L80218470: /* 59EB50 80218470 16250004 */ bne $s1, $a1, func_80218484 D_80218474: /* 59EB54 80218474 02041021 */ addu $v0, $s0, $a0 D_80218478: /* 59EB58 80218478 C460006C */ lwc1 $f0, 0x6C($v1) /* 59EB5C 8021847C 08086134 */ j .L802184D0_59EBB0 glabel dup_b_area_tik_ArcsinDeg /* 59EB60 80218480 461C0000 */ add.s $f0, $f0, $f28 glabel func_80218484 /* 59EB64 80218484 C460006C */ lwc1 $f0, 0x6C($v1) /* 59EB68 80218488 C444006C */ lwc1 $f4, 0x6C($v0) glabel func_8021848C /* 59EB6C 8021848C 46002081 */ sub.s $f2, $f4, $f0 glabel func_80218490_557870 /* 59EB70 80218490 4602D03C */ c.lt.s $f26, $f2 D_80218494: /* 59EB74 80218494 00000000 */ nop /* 59EB78 80218498 45000003 */ bc1f .L802184A8 glabel func_8021849C_6DC23C /* 59EB7C 8021849C 00000000 */ nop glabel b_area_jan2_white_magikoopa_StartRumbleWithParams /* 59EB80 802184A0 0808612E */ j .L802184B8_59EB98 .L802184A4: /* 59EB84 802184A4 46140000 */ add.s $f0, $f0, $f20 .L802184A8: /* 59EB88 802184A8 4616103C */ c.lt.s $f2, $f22 D_802184AC: /* 59EB8C 802184AC 00000000 */ nop D_802184B0: /* 59EB90 802184B0 45030001 */ bc1tl .L802184B8_59EB98 D_802184B4: /* 59EB94 802184B4 46142100 */ add.s $f4, $f4, $f20 .L802184B8_59EB98: /* 59EB98 802184B8 46040000 */ add.s $f0, $f0, $f4 /* 59EB9C 802184BC 46000021 */ cvt.d.s $f0, $f0 func_802184C0_47F570: /* 59EBA0 802184C0 46280002 */ mul.d $f0, $f0, $f8 glabel func_802184C4 /* 59EBA4 802184C4 00000000 */ nop /* 59EBA8 802184C8 46260000 */ add.d $f0, $f0, $f6 glabel b_area_isk_part_1_ChompChainUpdate /* 59EBAC 802184CC 46200020 */ cvt.s.d $f0, $f0 .L802184D0_59EBB0: /* 59EBB0 802184D0 E460006C */ swc1 $f0, 0x6C($v1) glabel b_area_sam2_monstar_StartRumbleWithParams /* 59EBB4 802184D4 24630004 */ addiu $v1, $v1, 0x4 .L802184D8: /* 59EBB8 802184D8 26310001 */ addiu $s1, $s1, 0x1 glabel func_802184DC /* 59EBBC 802184DC 0234102A */ slt $v0, $s1, $s4 glabel func_802184E0 /* 59EBC0 802184E0 1440FFE3 */ bnez $v0, .L80218470 glabel dup_b_area_tik2_SpitInk /* 59EBC4 802184E4 24840004 */ addiu $a0, $a0, 0x4 glabel b_area_kpa_GetSelectedMoveID /* 59EBC8 802184E8 0200202D */ daddu $a0, $s0, $zero D_802184EC: /* 59EBCC 802184EC 0C086016 */ jal b_area_pra2_crystal_king_CosInterpMinMax glabel func_802184F0 /* 59EBD0 802184F0 AFA70028 */ sw $a3, 0x28($sp) .L802184F4: /* 59EBD4 802184F4 8FA70028 */ lw $a3, 0x28($sp) glabel b_area_jan2_white_magikoopa_UnkFunc52 /* 59EBD8 802184F8 24E70001 */ addiu $a3, $a3, 0x1 D_802184FC: /* 59EBDC 802184FC 28E20004 */ slti $v0, $a3, 0x4 glabel func_80218500 /* 59EBE0 80218500 1440FFB7 */ bnez $v0, b_area_dig_IsSaveVar123 .L80218504: /* 59EBE4 80218504 261001E0 */ addiu $s0, $s0, 0x1E0 /* 59EBE8 80218508 24020001 */ addiu $v0, $zero, 0x1 .L8021850C: /* 59EBEC 8021850C 3C018023 */ lui $at, %hi(b_area_kzn2_VineRenderState) b_area_trd_part_2_green_ninja_koopa_GetKoopaBrosWithState: /* 59EBF0 80218510 AC22B550 */ sw $v0, %lo(b_area_kzn2_VineRenderState)($at) glabel dup2_b_area_kpa_SetAbsoluteStatusOffsets /* 59EBF4 80218514 0000382D */ daddu $a3, $zero, $zero .L80218518_59EBF8: /* 59EBF8 80218518 3C02800A */ lui $v0, %hi(gMainGfxPos) glabel b_area_kzn_medi_guy_MediGuySpriteRotationFunc /* 59EBFC 8021851C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 59EC00 80218520 0040402D */ daddu $t0, $v0, $zero .L80218524: /* 59EC04 80218524 3C090100 */ lui $t1, (0x1004008 >> 16) D_80218528: /* 59EC08 80218528 35294008 */ ori $t1, $t1, (0x1004008 & 0xFFFF) glabel func_8021852C /* 59EC0C 8021852C AFA90018 */ sw $t1, 0x18($sp) glabel b_area_kpa4_StartRumbleWithParams /* 59EC10 80218530 3C090602 */ lui $t1, (0x6020004 >> 16) b_area_sbk_pokey_init_80218534: /* 59EC14 80218534 35290004 */ ori $t1, $t1, (0x6020004 & 0xFFFF) b_area_trd_part_1_Formation_03: /* 59EC18 80218538 3C158023 */ lui $s5, %hi(b_area_kzn2_VineData) D_8021853C: /* 59EC1C 8021853C 26B5ADD0 */ addiu $s5, $s5, %lo(b_area_kzn2_VineData) .L80218540: /* 59EC20 80218540 AFA9001C */ sw $t1, 0x1C($sp) .L80218544: /* 59EC24 80218544 8D030000 */ lw $v1, 0x0($t0) D_80218548: /* 59EC28 80218548 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 59EC2C 8021854C 0060202D */ daddu $a0, $v1, $zero glabel b_area_kkj_SetLightningBoltPurple /* 59EC30 80218550 24630008 */ addiu $v1, $v1, 0x8 /* 59EC34 80218554 AD030000 */ sw $v1, 0x0($t0) glabel func_80218558 /* 59EC38 80218558 AC820000 */ sw $v0, 0x0($a0) glabel func_8021855C /* 59EC3C 8021855C 24620008 */ addiu $v0, $v1, 0x8 glabel b_area_flo_ShrinkActor /* 59EC40 80218560 AC800004 */ sw $zero, 0x4($a0) D_80218564: /* 59EC44 80218564 AD020000 */ sw $v0, 0x0($t0) /* 59EC48 80218568 3C02DE00 */ lui $v0, (0xDE000000 >> 16) .L8021856C: /* 59EC4C 8021856C AC620000 */ sw $v0, 0x0($v1) D_80218570: /* 59EC50 80218570 3C028022 */ lui $v0, %hi(D_8021CF40) D_80218574: /* 59EC54 80218574 2442CF40 */ addiu $v0, $v0, %lo(D_8021CF40) /* 59EC58 80218578 AC620004 */ sw $v0, 0x4($v1) .L8021857C: /* 59EC5C 8021857C 0000882D */ daddu $s1, $zero, $zero glabel b_area_dig_GetModelPos /* 59EC60 80218580 3C02DE01 */ lui $v0, (0xDE010000 >> 16) b_area_mim_forest_fuzzy_handleEvent_80218584: /* 59EC64 80218584 C6B80094 */ lwc1 $f24, 0x94($s5) glabel b_area_kpa4_UnkFunc52 /* 59EC68 80218588 8D040000 */ lw $a0, 0x0($t0) b_area_omo2_general_guy_init: /* 59EC6C 8021858C 8EB40090 */ lw $s4, 0x90($s5) .L80218590: /* 59EC70 80218590 24890008 */ addiu $t1, $a0, 0x8 .L80218594: /* 59EC74 80218594 AFA90010 */ sw $t1, 0x10($sp) /* 59EC78 80218598 8EA601DC */ lw $a2, 0x1DC($s5) .L8021859C: /* 59EC7C 8021859C 0120982D */ daddu $s3, $t1, $zero .L802185A0: /* 59EC80 802185A0 AC820000 */ sw $v0, 0x0($a0) /* 59EC84 802185A4 00061940 */ sll $v1, $a2, 5 glabel b_area_pra_UnkFunc52 /* 59EC88 802185A8 24620008 */ addiu $v0, $v1, 0x8 glabel b_area_omo_medi_guy_MediGuySpriteRotationFunc /* 59EC8C 802185AC 00821021 */ addu $v0, $a0, $v0 glabel func_802185B0 /* 59EC90 802185B0 01231821 */ addu $v1, $t1, $v1 .L802185B4: /* 59EC94 802185B4 AC820004 */ sw $v0, 0x4($a0) D_802185B8: /* 59EC98 802185B8 18C00088 */ blez $a2, .L802187DC glabel b_area_jan2_white_magikoopa_GetBootsHammerLevel /* 59EC9C 802185BC AD030000 */ sw $v1, 0x0($t0) D_802185C0: /* 59ECA0 802185C0 2682FFFF */ addiu $v0, $s4, -0x1 D_802185C4: /* 59ECA4 802185C4 00021080 */ sll $v0, $v0, 2 .L802185C8: /* 59ECA8 802185C8 02A21021 */ addu $v0, $s5, $v0 /* 59ECAC 802185CC AFA20014 */ sw $v0, 0x14($sp) glabel func_802185D0 /* 59ECB0 802185D0 0220282D */ daddu $a1, $s1, $zero glabel func_802185D4_5CEC64 /* 59ECB4 802185D4 0220F02D */ daddu $fp, $s1, $zero /* 59ECB8 802185D8 0220B82D */ daddu $s7, $s1, $zero glabel func_802185DC /* 59ECBC 802185DC 0220B02D */ daddu $s6, $s1, $zero glabel b_area_dig_IsGameStatusUnkAA_1 /* 59ECC0 802185E0 02A0902D */ daddu $s2, $s5, $zero /* 59ECC4 802185E4 24900016 */ addiu $s0, $a0, 0x16 .L802185E8_447A28: /* 59ECC8 802185E8 44911000 */ mtc1 $s1, $f2 .L802185EC: /* 59ECCC 802185EC 00000000 */ nop /* 59ECD0 802185F0 468010A0 */ cvt.s.w $f2, $f2 .L802185F4: /* 59ECD4 802185F4 44940000 */ mtc1 $s4, $f0 .L802185F8: /* 59ECD8 802185F8 00000000 */ nop .L802185FC: /* 59ECDC 802185FC 46800020 */ cvt.s.w $f0, $f0 .L80218600: /* 59ECE0 80218600 46001082 */ mul.s $f2, $f2, $f0 .L80218604: /* 59ECE4 80218604 00000000 */ nop glabel b_area_dig_Add1Coin /* 59ECE8 80218608 44860000 */ mtc1 $a2, $f0 glabel dup_b_area_tik_CalculateRotationZ /* 59ECEC 8021860C 00000000 */ nop .L80218610: /* 59ECF0 80218610 46800020 */ cvt.s.w $f0, $f0 .L80218614: /* 59ECF4 80218614 C65A0098 */ lwc1 $f26, 0x98($s2) glabel b_area_arn_hyper_cleft_SetSpinSmashable /* 59ECF8 80218618 C65C009C */ lwc1 $f28, 0x9C($s2) glabel func_8021861C /* 59ECFC 8021861C C65E00A0 */ lwc1 $f30, 0xA0($s2) glabel func_80218620 /* 59ED00 80218620 46001083 */ div.s $f2, $f2, $f0 .L80218624: /* 59ED04 80218624 4600128D */ trunc.w.s $f10, $f2 glabel func_80218628 /* 59ED08 80218628 44045000 */ mfc1 $a0, $f10 .L8021862C: /* 59ED0C 8021862C 00000000 */ nop glabel b_area_dig_SetDemoBattleBeginDelay /* 59ED10 80218630 44840000 */ mtc1 $a0, $f0 D_80218634: /* 59ED14 80218634 00000000 */ nop glabel b_area_kpa_UnkFunc52 /* 59ED18 80218638 46800020 */ cvt.s.w $f0, $f0 .L8021863C: /* 59ED1C 8021863C 24830001 */ addiu $v1, $a0, 0x1 .L80218640: /* 59ED20 80218640 0074102A */ slt $v0, $v1, $s4 glabel func_80218644_6DE404 /* 59ED24 80218644 14400005 */ bnez $v0, .L8021865C_59ED3C .L80218648: /* 59ED28 80218648 46001181 */ sub.s $f6, $f2, $f0 glabel func_8021864C /* 59ED2C 8021864C 8FA90014 */ lw $t1, 0x14($sp) .L80218650: /* 59ED30 80218650 C536006C */ lwc1 $f22, 0x6C($t1) .L80218654: /* 59ED34 80218654 080861BA */ j func_802186E8 D_80218658: /* 59ED38 80218658 4600B306 */ mov.s $f12, $f22 .L8021865C_59ED3C: /* 59ED3C 8021865C 00031080 */ sll $v0, $v1, 2 .L80218660: /* 59ED40 80218660 02A21021 */ addu $v0, $s5, $v0 b_area_jan_spear_guy_IdleAnimations_80218664: /* 59ED44 80218664 C444006C */ lwc1 $f4, 0x6C($v0) .L80218668: /* 59ED48 80218668 00041080 */ sll $v0, $a0, 2 glabel func_8021866C /* 59ED4C 8021866C 02A21021 */ addu $v0, $s5, $v0 glabel func_80218670 /* 59ED50 80218670 C44C006C */ lwc1 $f12, 0x6C($v0) glabel func_80218674 /* 59ED54 80218674 460C2081 */ sub.s $f2, $f4, $f12 .L80218678: /* 59ED58 80218678 3C014334 */ lui $at, (0x43340000 >> 16) .L8021867C: /* 59ED5C 8021867C 44810000 */ mtc1 $at, $f0 glabel dup2_b_area_tik2_StartRumbleWithParams /* 59ED60 80218680 00000000 */ nop D_80218684: /* 59ED64 80218684 4602003C */ c.lt.s $f0, $f2 D_80218688: /* 59ED68 80218688 00000000 */ nop glabel b_area_kmr_part_2_blue_goomba_2_CalculateRotationZ /* 59ED6C 8021868C 45000006 */ bc1f .L802186A8_48D848 glabel func_80218690 /* 59ED70 80218690 00000000 */ nop .L80218694: /* 59ED74 80218694 3C0143B4 */ lui $at, (0x43B40000 >> 16) func_80218698: /* 59ED78 80218698 44815000 */ mtc1 $at, $f10 /* 59ED7C 8021869C 00000000 */ nop glabel dup2_b_area_kpa2_RemoveChillOut /* 59ED80 802186A0 460A2101 */ sub.s $f4, $f4, $f10 /* 59ED84 802186A4 460C2081 */ sub.s $f2, $f4, $f12 .L802186A8_48D848: /* 59ED88 802186A8 3C01C334 */ lui $at, (0xC3340000 >> 16) .L802186AC: /* 59ED8C 802186AC 44810000 */ mtc1 $at, $f0 D_802186B0: /* 59ED90 802186B0 00000000 */ nop .L802186B4: /* 59ED94 802186B4 4600103C */ c.lt.s $f2, $f0 glabel func_802186B8 /* 59ED98 802186B8 00000000 */ nop D_802186BC: /* 59ED9C 802186BC 45020006 */ bc1fl func_802186D8_609188 glabel b_area_pra2_sam_04_UnkModelStuff_func1 /* 59EDA0 802186C0 460C2001 */ sub.s $f0, $f4, $f12 /* 59EDA4 802186C4 3C0143B4 */ lui $at, (0x43B40000 >> 16) glabel func_802186C8 /* 59EDA8 802186C8 44815000 */ mtc1 $at, $f10 .L802186CC: /* 59EDAC 802186CC 00000000 */ nop glabel func_802186D0_69F8D0 /* 59EDB0 802186D0 460A2100 */ add.s $f4, $f4, $f10 glabel func_802186D4 /* 59EDB4 802186D4 460C2001 */ sub.s $f0, $f4, $f12 glabel func_802186D8_609188 /* 59EDB8 802186D8 46060002 */ mul.s $f0, $f0, $f6 .L802186DC: /* 59EDBC 802186DC 00000000 */ nop glabel func_802186E0_6DE4A0 /* 59EDC0 802186E0 460C0580 */ add.s $f22, $f0, $f12 glabel dup2_b_area_flo_SetAbsoluteStatusOffsets /* 59EDC4 802186E4 4600B306 */ mov.s $f12, $f22 glabel func_802186E8 /* 59EDC8 802186E8 AFA50020 */ sw $a1, 0x20($sp) b_area_nok_spiked_goomba_CalculateRotationZ: /* 59EDCC 802186EC AFA60024 */ sw $a2, 0x24($sp) glabel b_area_omo3_ArcsinDeg /* 59EDD0 802186F0 AFA70028 */ sw $a3, 0x28($sp) /* 59EDD4 802186F4 0C00A8BB */ jal sin_deg D_802186F8: /* 59EDD8 802186F8 AFA8002C */ sw $t0, 0x2C($sp) glabel func_802186FC /* 59EDDC 802186FC 46180502 */ mul.s $f20, $f0, $f24 glabel b_area_kpa_UnkSfxFunc /* 59EDE0 80218700 00000000 */ nop /* 59EDE4 80218704 0C00A8D4 */ jal cos_deg /* 59EDE8 80218708 4600B306 */ mov.s $f12, $f22 D_8021870C: /* 59EDEC 8021870C 46000007 */ neg.s $f0, $f0 b_area_iwa_cleft_DefenseTable_80218710: /* 59EDF0 80218710 46180002 */ mul.s $f0, $f0, $f24 glabel b_area_sam2_paragoomba_CalculateRotationZ /* 59EDF4 80218714 00000000 */ nop /* 59EDF8 80218718 4614D100 */ add.s $f4, $f26, $f20 /* 59EDFC 8021871C 4600E080 */ add.s $f2, $f28, $f0 D_80218720: /* 59EE00 80218720 4614D501 */ sub.s $f20, $f26, $f20 .L80218724: /* 59EE04 80218724 2652000C */ addiu $s2, $s2, 0xC /* 59EE08 80218728 26310001 */ addiu $s1, $s1, 0x1 D_8021872C: /* 59EE0C 8021872C 4600E001 */ sub.s $f0, $f28, $f0 D_80218730: /* 59EE10 80218730 4600228D */ trunc.w.s $f10, $f4 .L80218734: /* 59EE14 80218734 44025000 */ mfc1 $v0, $f10 .L80218738: /* 59EE18 80218738 00000000 */ nop /* 59EE1C 8021873C A6620000 */ sh $v0, 0x0($s3) D_80218740: /* 59EE20 80218740 4600128D */ trunc.w.s $f10, $f2 b_area_kmr_part_3_paragoomba2_CalculateRotationZ: /* 59EE24 80218744 44025000 */ mfc1 $v0, $f10 .L80218748: /* 59EE28 80218748 4600F28D */ trunc.w.s $f10, $f30 /* 59EE2C 8021874C 44035000 */ mfc1 $v1, $f10 .L80218750: /* 59EE30 80218750 26730010 */ addiu $s3, $s3, 0x10 .L80218754: /* 59EE34 80218754 A602FFF4 */ sh $v0, -0xC($s0) glabel dup2_b_area_tik_ArcsinDeg /* 59EE38 80218758 A603FFF6 */ sh $v1, -0xA($s0) glabel SpawnFallingRock /* 59EE3C 8021875C A616FFFA */ sh $s6, -0x6($s0) .L80218760: /* 59EE40 80218760 A600FFFC */ sh $zero, -0x4($s0) /* 59EE44 80218764 A217FFFE */ sb $s7, -0x2($s0) /* 59EE48 80218768 A21EFFFF */ sb $fp, -0x1($s0) glabel func_8021876C /* 59EE4C 8021876C 8FA50020 */ lw $a1, 0x20($sp) glabel func_80218770_6DE530 /* 59EE50 80218770 4600A28D */ trunc.w.s $f10, $f20 glabel func_80218774_5CEE04 /* 59EE54 80218774 44025000 */ mfc1 $v0, $f10 /* 59EE58 80218778 A2050000 */ sb $a1, 0x0($s0) D_8021877C: /* 59EE5C 8021877C 26100010 */ addiu $s0, $s0, 0x10 glabel b_area_kmr_part_2_blue_goomba_2_DivActorLevel4 /* 59EE60 80218780 A6620000 */ sh $v0, 0x0($s3) D_80218784: /* 59EE64 80218784 4600028D */ trunc.w.s $f10, $f0 glabel func_80218788 /* 59EE68 80218788 44025000 */ mfc1 $v0, $f10 glabel func_8021878C /* 59EE6C 8021878C 00000000 */ nop .L80218790: /* 59EE70 80218790 A602FFF4 */ sh $v0, -0xC($s0) /* 59EE74 80218794 24020400 */ addiu $v0, $zero, 0x400 .L80218798: /* 59EE78 80218798 A603FFF6 */ sh $v1, -0xA($s0) .L8021879C: /* 59EE7C 8021879C A616FFFA */ sh $s6, -0x6($s0) .L802187A0: /* 59EE80 802187A0 A602FFFC */ sh $v0, -0x4($s0) /* 59EE84 802187A4 A217FFFE */ sb $s7, -0x2($s0) /* 59EE88 802187A8 A21EFFFF */ sb $fp, -0x1($s0) glabel func_802187AC /* 59EE8C 802187AC A2050000 */ sb $a1, 0x0($s0) glabel dup_b_area_tik3_UnkFunc56 /* 59EE90 802187B0 26100010 */ addiu $s0, $s0, 0x10 glabel func_802187B4 /* 59EE94 802187B4 26730010 */ addiu $s3, $s3, 0x10 .L802187B8: /* 59EE98 802187B8 24A5001E */ addiu $a1, $a1, 0x1E b_area_trd_part_1_Formation_0B: /* 59EE9C 802187BC 27DE0078 */ addiu $fp, $fp, 0x78 .L802187C0: /* 59EEA0 802187C0 26F70032 */ addiu $s7, $s7, 0x32 .L802187C4: /* 59EEA4 802187C4 8FA60024 */ lw $a2, 0x24($sp) glabel dup4_b_area_pra_GetSelectedMoveID /* 59EEA8 802187C8 8FA70028 */ lw $a3, 0x28($sp) b_area_jan2_putrid_piranha_ActorParts: /* 59EEAC 802187CC 8FA8002C */ lw $t0, 0x2C($sp) .L802187D0: /* 59EEB0 802187D0 0226102A */ slt $v0, $s1, $a2 /* 59EEB4 802187D4 1440FF84 */ bnez $v0, .L802185E8_447A28 /* 59EEB8 802187D8 26D60140 */ addiu $s6, $s6, 0x140 .L802187DC: /* 59EEBC 802187DC 24C5FFFF */ addiu $a1, $a2, -0x1 glabel b_area_nok_koopa_troopa_SetAbsoluteStatusOffsets /* 59EEC0 802187E0 18A00014 */ blez $a1, .L80218834_4B1A24 .L802187E4: /* 59EEC4 802187E4 0000882D */ daddu $s1, $zero, $zero /* 59EEC8 802187E8 3C060002 */ lui $a2, (0x20406 >> 16) D_802187EC: /* 59EECC 802187EC 34C60406 */ ori $a2, $a2, (0x20406 & 0xFFFF) glabel func_802187F0_6DE5B0 /* 59EED0 802187F0 8FA40010 */ lw $a0, 0x10($sp) glabel dup2_b_area_pra_SetAbsoluteStatusOffsets /* 59EED4 802187F4 8D030000 */ lw $v1, 0x0($t0) /* 59EED8 802187F8 26310001 */ addiu $s1, $s1, 0x1 .L802187FC: /* 59EEDC 802187FC 0060102D */ daddu $v0, $v1, $zero /* 59EEE0 80218800 24630008 */ addiu $v1, $v1, 0x8 glabel dup_b_area_tik2_UnfadeBackgroundToBlack /* 59EEE4 80218804 AC440004 */ sw $a0, 0x4($v0) glabel func_80218808 /* 59EEE8 80218808 AD030000 */ sw $v1, 0x0($t0) .L8021880C: /* 59EEEC 8021880C 8FA90018 */ lw $t1, 0x18($sp) glabel b_area_sam2_gray_magikoopa_ShrinkActor /* 59EEF0 80218810 24840020 */ addiu $a0, $a0, 0x20 .L80218814: /* 59EEF4 80218814 AC490000 */ sw $t1, 0x0($v0) D_80218818: /* 59EEF8 80218818 24620008 */ addiu $v0, $v1, 0x8 /* 59EEFC 8021881C AD020000 */ sw $v0, 0x0($t0) .L80218820: /* 59EF00 80218820 8FA9001C */ lw $t1, 0x1C($sp) /* 59EF04 80218824 0225102A */ slt $v0, $s1, $a1 D_80218828: /* 59EF08 80218828 AC660004 */ sw $a2, 0x4($v1) /* 59EF0C 8021882C 1440FFF1 */ bnez $v0, dup2_b_area_pra_SetAbsoluteStatusOffsets .L80218830: /* 59EF10 80218830 AC690000 */ sw $t1, 0x0($v1) .L80218834_4B1A24: /* 59EF14 80218834 24E70001 */ addiu $a3, $a3, 0x1 D_80218838: /* 59EF18 80218838 28E20004 */ slti $v0, $a3, 0x4 /* 59EF1C 8021883C 1440FF4F */ bnez $v0, .L8021857C glabel func_80218840 /* 59EF20 80218840 26B501E0 */ addiu $s5, $s5, 0x1E0 .L80218844: /* 59EF24 80218844 3C03800A */ lui $v1, %hi(gMainGfxPos) .L80218848: /* 59EF28 80218848 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) D_8021884C: /* 59EF2C 8021884C 8C620000 */ lw $v0, 0x0($v1) glabel func_80218850_4EFCF0 /* 59EF30 80218850 0040202D */ daddu $a0, $v0, $zero /* 59EF34 80218854 24420008 */ addiu $v0, $v0, 0x8 .L80218858: /* 59EF38 80218858 AC620000 */ sw $v0, 0x0($v1) .L8021885C: /* 59EF3C 8021885C 3C02E700 */ lui $v0, (0xE7000000 >> 16) .L80218860: /* 59EF40 80218860 AC820000 */ sw $v0, 0x0($a0) D_80218864: /* 59EF44 80218864 AC800004 */ sw $zero, 0x4($a0) .L80218868_59EF48: /* 59EF48 80218868 8FBF0054 */ lw $ra, 0x54($sp) /* 59EF4C 8021886C 8FBE0050 */ lw $fp, 0x50($sp) /* 59EF50 80218870 8FB7004C */ lw $s7, 0x4C($sp) D_80218874: /* 59EF54 80218874 8FB60048 */ lw $s6, 0x48($sp) .L80218878: /* 59EF58 80218878 8FB50044 */ lw $s5, 0x44($sp) glabel b_area_omo3_CalculateRotationZ /* 59EF5C 8021887C 8FB40040 */ lw $s4, 0x40($sp) glabel func_80218880 /* 59EF60 80218880 8FB3003C */ lw $s3, 0x3C($sp) glabel func_80218884 /* 59EF64 80218884 8FB20038 */ lw $s2, 0x38($sp) .L80218888: /* 59EF68 80218888 8FB10034 */ lw $s1, 0x34($sp) /* 59EF6C 8021888C 8FB00030 */ lw $s0, 0x30($sp) glabel dup_b_area_dig_SetDemoBattleBeginDelay /* 59EF70 80218890 D7BE0080 */ ldc1 $f30, 0x80($sp) .L80218894: /* 59EF74 80218894 D7BC0078 */ ldc1 $f28, 0x78($sp) /* 59EF78 80218898 D7BA0070 */ ldc1 $f26, 0x70($sp) /* 59EF7C 8021889C D7B80068 */ ldc1 $f24, 0x68($sp) .L802188A0: /* 59EF80 802188A0 D7B60060 */ ldc1 $f22, 0x60($sp) .L802188A4: /* 59EF84 802188A4 D7B40058 */ ldc1 $f20, 0x58($sp) glabel b_area_flo2_UnkBackgroundFunc3 /* 59EF88 802188A8 03E00008 */ jr $ra .L802188AC: /* 59EF8C 802188AC 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: void func_8021835C_59EA3C(void* data) { Vtx_t* vtxBuffer; Vtx_t* vtx; f32 boneLength; s32 boneCount; f32 angle; f32 nextAngle; f32 curAngle1; f32 curAngle2; f32 alphaCoord; f32 alphaFrac; s32 nearest; s32 numPoints; s32 i, j; f32 deltaX, deltaY; f32 posX, posY, posZ; if (N(VineRenderState) == -1) { return; } if (N(VineRenderState) == 0) { for (i = 0; i < NUM_VINES; i++) { LavaPiranhaVine* vine = &N(VineData)[i]; switch (i) { default: return; case 0: boneCount = 9; boneLength = 10.0f; break; case 1: boneCount = 7; boneLength = 8.0f; break; case 2: boneCount = 7; boneLength = 8.0f; break; case 3: boneCount = 5; boneLength = 8.0f; break; } vine->boneCount = boneCount; vine->boneLength = boneLength; for (j = 0; j < boneCount; j++) { if (j == (boneCount - 1)) { vine->boneRot[j] += 90.0f; } else { curAngle1 = vine->boneRot[j]; nextAngle = vine->boneRot[j + 1]; if (nextAngle - curAngle1 > 180.0f) { curAngle1 += 360.0f; } else if (nextAngle - curAngle1 < -180.0f) { nextAngle += 360.0f; } // average cur and next angles vine->boneRot[j] = ((curAngle1 + nextAngle) / 2.0) + 90.0; } } N(make_vine_interpolation)(vine); } N(VineRenderState) = 1; } gDPPipeSync(gMainGfxPos++); gSPDisplayList(gMainGfxPos++, D_8021CF40_5A3620); for (i = 0; i < NUM_VINES; i++) { LavaPiranhaVine* vine = &N(VineData)[i]; boneLength = vine->boneLength; boneCount = vine->boneCount; numPoints = vine->numPoints; // we'll build the vertex data and place it in the display list, so jump forward // here and leave space behind for the gSPBranchList command followed by two vertices // for each point in numPoints vtxBuffer = (Vtx_t*)(gMainGfxPos + 1); gSPBranchList(gMainGfxPos, &gMainGfxPos[1 + 2 * (2 * numPoints)]); vtx = (Vtx_t*) (++gMainGfxPos); gMainGfxPos = &gMainGfxPos[2 * (2 * numPoints)]; for (j = 0; j < numPoints; j++) { posX = vine->points[j].x; posY = vine->points[j].y; posZ = vine->points[j].z; alphaCoord = ((f32) j * boneCount) / numPoints; nearest = (s32) alphaCoord; alphaFrac = alphaCoord - (f32)nearest; if (nearest + 1 >= boneCount) { angle = vine->boneRot[boneCount - 1]; } else { curAngle2 = vine->boneRot[nearest]; nextAngle = vine->boneRot[nearest + 1]; if (nextAngle - curAngle2 > 180.0f) { nextAngle -= 360.0f; } if (nextAngle - curAngle2 < -180.0f) { nextAngle += 360.0f; } angle = ((nextAngle - curAngle2) * alphaFrac) + curAngle2; } deltaX = sin_deg(angle) * boneLength; deltaY = -cos_deg(angle) * boneLength; vtx->ob[0] = posX + deltaX; vtx->ob[1] = posY + deltaY; vtx->ob[2] = posZ; vtx->tc[0] = j * 0x140; vtx->tc[1] = 0; vtx->cn[0] = j * 50; vtx->cn[1] = j * 120; vtx->cn[2] = j * 30; vtx++; vtx->ob[0] = posX - deltaX; vtx->ob[1] = posY - deltaY; vtx->ob[2] = posZ; vtx->tc[0] = j * 0x140; vtx->tc[1] = 0x400; vtx->cn[0] = j * 50; vtx->cn[1] = j * 120; vtx->cn[2] = j * 30; vtx++; } for (j = 0; j < numPoints - 1; j++) { gSPVertex(gMainGfxPos++, &vtxBuffer[2*j], 4, 0); gSP2Triangles(gMainGfxPos++, 1, 0, 2, 0, 1, 2, 3, 0); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802AA0B8_7B1A58 /* 41EE48 802AA0B8 3C03800E */ lui $v1, %hi(gBattleSubState) /* 41EE4C 802AA0BC 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) /* 41EE50 802AA0C0 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 41EE54 802AA0C4 AFB20018 */ sw $s2, 0x18($sp) D_802AA0C8_7B1A68: /* 41EE58 802AA0C8 3C12800E */ lui $s2, %hi(gBattleStatus) /* 41EE5C 802AA0CC 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) /* 41EE60 802AA0D0 AFBF001C */ sw $ra, 0x1C($sp) /* 41EE64 802AA0D4 AFB10014 */ sw $s1, 0x14($sp) glabel func_802AA0D8 /* 41EE68 802AA0D8 AFB00010 */ sw $s0, 0x10($sp) /* 41EE6C 802AA0DC F7B80030 */ sdc1 $f24, 0x30($sp) /* 41EE70 802AA0E0 F7B60028 */ sdc1 $f22, 0x28($sp) /* 41EE74 802AA0E4 F7B40020 */ sdc1 $f20, 0x20($sp) /* 41EE78 802AA0E8 8E5000D8 */ lw $s0, 0xD8($s2) /* 41EE7C 802AA0EC 8E5100DC */ lw $s1, 0xDC($s2) D_802AA0F0_7B1A90: /* 41EE80 802AA0F0 2C62000C */ sltiu $v0, $v1, 0xC /* 41EE84 802AA0F4 10400149 */ beqz $v0, .L802AA61C_7B1FBC /* 41EE88 802AA0F8 00031080 */ sll $v0, $v1, 2 /* 41EE8C 802AA0FC 3C01802B */ lui $at, %hi(jtbl_802ACC08_7B45A8) /* 41EE90 802AA100 00220821 */ addu $at, $at, $v0 /* 41EE94 802AA104 8C22CC08 */ lw $v0, %lo(jtbl_802ACC08_7B45A8)($at) /* 41EE98 802AA108 00400008 */ jr $v0 /* 41EE9C 802AA10C 00000000 */ nop glabel .L802AA110_7B1AB0 /* 41EEA0 802AA110 82030210 */ lb $v1, 0x210($s0) /* 41EEA4 802AA114 38620006 */ xori $v0, $v1, 0x6 D_802AA118_7B1AB8: /* 41EEA8 802AA118 2C440001 */ sltiu $a0, $v0, 0x1 /* 41EEAC 802AA11C 24020003 */ addiu $v0, $zero, 0x3 /* 41EEB0 802AA120 50620001 */ beql $v1, $v0, .L802AA128_7B1AC8 /* 41EEB4 802AA124 24040001 */ addiu $a0, $zero, 0x1 .L802AA128_7B1AC8: /* 41EEB8 802AA128 24120004 */ addiu $s2, $zero, 0x4 /* 41EEBC 802AA12C 50720001 */ beql $v1, $s2, .L802AA134_7B1AD4 /* 41EEC0 802AA130 24040001 */ addiu $a0, $zero, 0x1 .L802AA134_7B1AD4: /* 41EEC4 802AA134 24020005 */ addiu $v0, $zero, 0x5 /* 41EEC8 802AA138 50620001 */ beql $v1, $v0, .L802AA140_7B1AE0 /* 41EECC 802AA13C 24040001 */ addiu $a0, $zero, 0x1 .L802AA140_7B1AE0: /* 41EED0 802AA140 24020007 */ addiu $v0, $zero, 0x7 /* 41EED4 802AA144 50620001 */ beql $v1, $v0, .L802AA14C_7B1AEC /* 41EED8 802AA148 24040001 */ addiu $a0, $zero, 0x1 .L802AA14C_7B1AEC: /* 41EEDC 802AA14C 24020008 */ addiu $v0, $zero, 0x8 /* 41EEE0 802AA150 50620001 */ beql $v1, $v0, .L802AA158_7B1AF8 /* 41EEE4 802AA154 24040001 */ addiu $a0, $zero, 0x1 .L802AA158_7B1AF8: /* 41EEE8 802AA158 82030214 */ lb $v1, 0x214($s0) /* 41EEEC 802AA15C 2402000C */ addiu $v0, $zero, 0xC D_802AA160_7B1B00: /* 41EEF0 802AA160 50620001 */ beql $v1, $v0, .L802AA168_7B1B08 /* 41EEF4 802AA164 24040001 */ addiu $a0, $zero, 0x1 .L802AA168_7B1B08: /* 41EEF8 802AA168 82030216 */ lb $v1, 0x216($s0) /* 41EEFC 802AA16C 2402000D */ addiu $v0, $zero, 0xD /* 41EF00 802AA170 50620001 */ beql $v1, $v0, .L802AA178_7B1B18 /* 41EF04 802AA174 24040001 */ addiu $a0, $zero, 0x1 .L802AA178_7B1B18: /* 41EF08 802AA178 10800005 */ beqz $a0, .L802AA190_7B1B30 /* 41EF0C 802AA17C 00000000 */ nop D_802AA180_7B1B20: /* 41EF10 802AA180 0C090464 */ jal func_80241190 /* 41EF14 802AA184 24040016 */ addiu $a0, $zero, 0x16 /* 41EF18 802AA188 080AA987 */ j .L802AA61C_7B1FBC /* 41EF1C 802AA18C 00000000 */ nop .L802AA190_7B1B30: /* 41EF20 802AA190 0C093903 */ jal func_8024E40C /* 41EF24 802AA194 24040002 */ addiu $a0, $zero, 0x2 /* 41EF28 802AA198 0C093936 */ jal D_8024E4D8_C0BD58 /* 41EF2C 802AA19C 2404000A */ addiu $a0, $zero, 0xA D_802AA1A0_7B1B40: /* 41EF30 802AA1A0 3C02800E */ lui $v0, %hi(gBattleStatus) /* 41EF34 802AA1A4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) /* 41EF38 802AA1A8 3C030010 */ lui $v1, (0x100000 >> 16) /* 41EF3C 802AA1AC 00431024 */ and $v0, $v0, $v1 /* 41EF40 802AA1B0 14400118 */ bnez $v0, .L802AA614_7B1FB4 /* 41EF44 802AA1B4 2402000B */ addiu $v0, $zero, 0xB D_802AA1B8_7B1B58: /* 41EF48 802AA1B8 C6000138 */ lwc1 $f0, 0x138($s0) /* 41EF4C 802AA1BC C6020140 */ lwc1 $f2, 0x140($s0) /* 41EF50 802AA1C0 E600000C */ swc1 $f0, 0xC($s0) /* 41EF54 802AA1C4 E6020014 */ swc1 $f2, 0x14($s0) /* 41EF58 802AA1C8 C6200138 */ lwc1 $f0, 0x138($s1) /* 41EF5C 802AA1CC E6000018 */ swc1 $f0, 0x18($s0) /* 41EF60 802AA1D0 C6200140 */ lwc1 $f0, 0x140($s1) /* 41EF64 802AA1D4 2402000A */ addiu $v0, $zero, 0xA /* 41EF68 802AA1D8 3C01800E */ lui $at, %hi(gBattleSubState) /* 41EF6C 802AA1DC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) D_802AA1E0_7B1B80: /* 41EF70 802AA1E0 A6120070 */ sh $s2, 0x70($s0) /* 41EF74 802AA1E4 AE000054 */ sw $zero, 0x54($s0) /* 41EF78 802AA1E8 080AA987 */ j .L802AA61C_7B1FBC /* 41EF7C 802AA1EC E6000020 */ swc1 $f0, 0x20($s0) glabel .L802AA1F0_7B1B90 /* 41EF80 802AA1F0 86020070 */ lh $v0, 0x70($s0) /* 41EF84 802AA1F4 10400022 */ beqz $v0, D_802AA280_7B1C20 /* 41EF88 802AA1F8 00000000 */ nop /* 41EF8C 802AA1FC C6000018 */ lwc1 $f0, 0x18($s0) /* 41EF90 802AA200 C6080144 */ lwc1 $f8, 0x144($s0) /* 41EF94 802AA204 C6020020 */ lwc1 $f2, 0x20($s0) D_802AA208_7B1BA8: /* 41EF98 802AA208 46080001 */ sub.s $f0, $f0, $f8 /* 41EF9C 802AA20C C604014C */ lwc1 $f4, 0x14C($s0) /* 41EFA0 802AA210 46041081 */ sub.s $f2, $f2, $f4 /* 41EFA4 802AA214 44823000 */ mtc1 $v0, $f6 /* 41EFA8 802AA218 00000000 */ nop /* 41EFAC 802AA21C 468031A0 */ cvt.s.w $f6, $f6 /* 41EFB0 802AA220 46060003 */ div.s $f0, $f0, $f6 /* 41EFB4 802AA224 46004200 */ add.s $f8, $f8, $f0 /* 41EFB8 802AA228 46003006 */ mov.s $f0, $f6 /* 41EFBC 802AA22C 46061083 */ div.s $f2, $f2, $f6 D_802AA230_7B1BD0: /* 41EFC0 802AA230 C600000C */ lwc1 $f0, 0xC($s0) /* 41EFC4 802AA234 46022100 */ add.s $f4, $f4, $f2 /* 41EFC8 802AA238 E6080144 */ swc1 $f8, 0x144($s0) /* 41EFCC 802AA23C E604014C */ swc1 $f4, 0x14C($s0) /* 41EFD0 802AA240 C6240144 */ lwc1 $f4, 0x144($s1) /* 41EFD4 802AA244 46040001 */ sub.s $f0, $f0, $f4 /* 41EFD8 802AA248 46003086 */ mov.s $f2, $f6 /* 41EFDC 802AA24C 46060003 */ div.s $f0, $f0, $f6 /* 41EFE0 802AA250 46002100 */ add.s $f4, $f4, $f0 /* 41EFE4 802AA254 E6240144 */ swc1 $f4, 0x144($s1) D_802AA258_7B1BF8: /* 41EFE8 802AA258 C6000014 */ lwc1 $f0, 0x14($s0) /* 41EFEC 802AA25C C624014C */ lwc1 $f4, 0x14C($s1) /* 41EFF0 802AA260 86020070 */ lh $v0, 0x70($s0) /* 41EFF4 802AA264 46040001 */ sub.s $f0, $f0, $f4 /* 41EFF8 802AA268 44821000 */ mtc1 $v0, $f2 /* 41EFFC 802AA26C 00000000 */ nop /* 41F000 802AA270 468010A0 */ cvt.s.w $f2, $f2 /* 41F004 802AA274 46020003 */ div.s $f0, $f0, $f2 /* 41F008 802AA278 46002100 */ add.s $f4, $f4, $f0 /* 41F00C 802AA27C E624014C */ swc1 $f4, 0x14C($s1) D_802AA280_7B1C20: /* 41F010 802AA280 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41F014 802AA284 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 41F018 802AA288 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 41F01C 802AA28C 4481B000 */ mtc1 $at, $f22 /* 41F020 802AA290 00000000 */ nop /* 41F024 802AA294 46166302 */ mul.s $f12, $f12, $f22 /* 41F028 802AA298 00000000 */ nop /* 41F02C 802AA29C 3C0143B4 */ lui $at, (0x43B40000 >> 16) D_802AA2A0_7B1C40: /* 41F030 802AA2A0 4481C000 */ mtc1 $at, $f24 /* 41F034 802AA2A4 3C014180 */ lui $at, (0x41800000 >> 16) D_802AA2A8_7B1C48: /* 41F038 802AA2A8 4481A000 */ mtc1 $at, $f20 /* 41F03C 802AA2AC 0C00A85B */ jal sin_rad /* 41F040 802AA2B0 46186303 */ div.s $f12, $f12, $f24 /* 41F044 802AA2B4 46140002 */ mul.s $f0, $f0, $f20 /* 41F048 802AA2B8 00000000 */ nop /* 41F04C 802AA2BC C602014C */ lwc1 $f2, 0x14C($s0) /* 41F050 802AA2C0 46001080 */ add.s $f2, $f2, $f0 /* 41F054 802AA2C4 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41F058 802AA2C8 46006307 */ neg.s $f12, $f12 /* 41F05C 802AA2CC 0C00A6C9 */ jal clamp_angle D_802AA2D0_7B1C70: /* 41F060 802AA2D0 E602014C */ swc1 $f2, 0x14C($s0) /* 41F064 802AA2D4 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41F068 802AA2D8 46166302 */ mul.s $f12, $f12, $f22 /* 41F06C 802AA2DC 00000000 */ nop /* 41F070 802AA2E0 E600018C */ swc1 $f0, 0x18C($s0) /* 41F074 802AA2E4 0C00A85B */ jal sin_rad /* 41F078 802AA2E8 46186303 */ div.s $f12, $f12, $f24 /* 41F07C 802AA2EC 46140002 */ mul.s $f0, $f0, $f20 /* 41F080 802AA2F0 00000000 */ nop /* 41F084 802AA2F4 C622014C */ lwc1 $f2, 0x14C($s1) D_802AA2F8_7B1C98: /* 41F088 802AA2F8 46001081 */ sub.s $f2, $f2, $f0 /* 41F08C 802AA2FC E622014C */ swc1 $f2, 0x14C($s1) /* 41F090 802AA300 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41F094 802AA304 0C00A6C9 */ jal clamp_angle /* 41F098 802AA308 46006307 */ neg.s $f12, $f12 /* 41F09C 802AA30C E620018C */ swc1 $f0, 0x18C($s1) /* 41F0A0 802AA310 C6000054 */ lwc1 $f0, 0x54($s0) /* 41F0A4 802AA314 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 41F0A8 802AA318 44811000 */ mtc1 $at, $f2 /* 41F0AC 802AA31C 86020070 */ lh $v0, 0x70($s0) D_802AA320_7B1CC0: /* 41F0B0 802AA320 46020000 */ add.s $f0, $f0, $f2 /* 41F0B4 802AA324 96030070 */ lhu $v1, 0x70($s0) /* 41F0B8 802AA328 10400004 */ beqz $v0, .L802AA33C_7B1CDC /* 41F0BC 802AA32C E6000054 */ swc1 $f0, 0x54($s0) /* 41F0C0 802AA330 2462FFFF */ addiu $v0, $v1, -0x1 /* 41F0C4 802AA334 080AA987 */ j .L802AA61C_7B1FBC /* 41F0C8 802AA338 A6020070 */ sh $v0, 0x70($s0) .L802AA33C_7B1CDC: /* 41F0CC 802AA33C C6000018 */ lwc1 $f0, 0x18($s0) /* 41F0D0 802AA340 C6020020 */ lwc1 $f2, 0x20($s0) /* 41F0D4 802AA344 C604000C */ lwc1 $f4, 0xC($s0) D_802AA348_7B1CE8: /* 41F0D8 802AA348 E6000144 */ swc1 $f0, 0x144($s0) /* 41F0DC 802AA34C E602014C */ swc1 $f2, 0x14C($s0) /* 41F0E0 802AA350 E6240144 */ swc1 $f4, 0x144($s1) /* 41F0E4 802AA354 C6000014 */ lwc1 $f0, 0x14($s0) /* 41F0E8 802AA358 E620014C */ swc1 $f0, 0x14C($s1) /* 41F0EC 802AA35C C6000144 */ lwc1 $f0, 0x144($s0) /* 41F0F0 802AA360 C602014C */ lwc1 $f2, 0x14C($s0) /* 41F0F4 802AA364 E6000138 */ swc1 $f0, 0x138($s0) /* 41F0F8 802AA368 E6020140 */ swc1 $f2, 0x140($s0) /* 41F0FC 802AA36C C6200144 */ lwc1 $f0, 0x144($s1) /* 41F100 802AA370 C622014C */ lwc1 $f2, 0x14C($s1) D_802AA374_7B1D14: /* 41F104 802AA374 3C04800E */ lui $a0, %hi(gBattleStatus) /* 41F108 802AA378 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) /* 41F10C 802AA37C E6200138 */ swc1 $f0, 0x138($s1) /* 41F110 802AA380 E6220140 */ swc1 $f2, 0x140($s1) /* 41F114 802AA384 8C820000 */ lw $v0, 0x0($a0) /* 41F118 802AA388 3C030010 */ lui $v1, (0x100000 >> 16) /* 41F11C 802AA38C 00431025 */ or $v0, $v0, $v1 /* 41F120 802AA390 AC820000 */ sw $v0, 0x0($a0) glabel .L802AA394_7B1D34 /* 41F124 802AA394 3C03800E */ lui $v1, %hi(gBattleStatus) /* 41F128 802AA398 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) D_802AA39C_7B1D3C: /* 41F12C 802AA39C 8C620000 */ lw $v0, 0x0($v1) /* 41F130 802AA3A0 3C04FBFF */ lui $a0, (0xFBFFFFFF >> 16) /* 41F134 802AA3A4 34420002 */ ori $v0, $v0, 0x2 /* 41F138 802AA3A8 AC620000 */ sw $v0, 0x0($v1) /* 41F13C 802AA3AC 8E020000 */ lw $v0, 0x0($s0) /* 41F140 802AA3B0 3484FFFF */ ori $a0, $a0, (0xFBFFFFFF & 0xFFFF) /* 41F144 802AA3B4 00441024 */ and $v0, $v0, $a0 /* 41F148 802AA3B8 3C040800 */ lui $a0, (0x8000000 >> 16) /* 41F14C 802AA3BC 00441025 */ or $v0, $v0, $a0 D_802AA3C0_7B1D60: /* 41F150 802AA3C0 12200006 */ beqz $s1, .L802AA3DC_7B1D7C D_802AA3C4_7B1D64: /* 41F154 802AA3C4 AE020000 */ sw $v0, 0x0($s0) /* 41F158 802AA3C8 8E220000 */ lw $v0, 0x0($s1) /* 41F15C 802AA3CC 3C030400 */ lui $v1, (0x4000000 >> 16) /* 41F160 802AA3D0 00431025 */ or $v0, $v0, $v1 /* 41F164 802AA3D4 00441025 */ or $v0, $v0, $a0 /* 41F168 802AA3D8 AE220000 */ sw $v0, 0x0($s1) .L802AA3DC_7B1D7C: /* 41F16C 802AA3DC 24020008 */ addiu $v0, $zero, 0x8 D_802AA3E0_7B1D80: /* 41F170 802AA3E0 3C07802B */ lui $a3, %hi(BattleMenu_OptionEnabled) /* 41F174 802AA3E4 24E7D0D0 */ addiu $a3, $a3, %lo(BattleMenu_OptionEnabled) /* 41F178 802AA3E8 A640017C */ sh $zero, 0x17C($s2) D_802AA3EC_7B1D8C: /* 41F17C 802AA3EC 3C01802B */ lui $at, %hi(battle_menu_submenuIDs) /* 41F180 802AA3F0 AC22D0B8 */ sw $v0, %lo(battle_menu_submenuIDs)($at) /* 41F184 802AA3F4 24020001 */ addiu $v0, $zero, 0x1 /* 41F188 802AA3F8 3C08802B */ lui $t0, %hi(battle_menu_isMessageDisabled) /* 41F18C 802AA3FC 2508D0E8 */ addiu $t0, $t0, %lo(battle_menu_isMessageDisabled) /* 41F190 802AA400 3C06802B */ lui $a2, %hi(D_802AB72C_7B30CC) /* 41F194 802AA404 24C6B72C */ addiu $a2, $a2, %lo(D_802AB72C_7B30CC) /* 41F198 802AA408 3C05802B */ lui $a1, %hi(BattleMenu_HudScripts) /* 41F19C 802AA40C 24A5D078 */ addiu $a1, $a1, %lo(BattleMenu_HudScripts) /* 41F1A0 802AA410 ACE20000 */ sw $v0, 0x0($a3) D_802AA414_7B1DB4: /* 41F1A4 802AA414 AD000000 */ sw $zero, 0x0($t0) /* 41F1A8 802AA418 8CC30000 */ lw $v1, 0x0($a2) /* 41F1AC 802AA41C 96420070 */ lhu $v0, 0x70($s2) /* 41F1B0 802AA420 3C04802B */ lui $a0, %hi(D_802AB734_7B30D4) /* 41F1B4 802AA424 8C84B734 */ lw $a0, %lo(D_802AB734_7B30D4)($a0) /* 41F1B8 802AA428 30420100 */ andi $v0, $v0, 0x100 /* 41F1BC 802AA42C ACA30000 */ sw $v1, 0x0($a1) /* 41F1C0 802AA430 3C01802B */ lui $at, %hi(BattleMenu_TitleMessages) /* 41F1C4 802AA434 AC24D090 */ sw $a0, %lo(BattleMenu_TitleMessages)($at) /* 41F1C8 802AA438 14400006 */ bnez $v0, .L802AA454_7B1DF4 D_802AA43C_7B1DDC: /* 41F1CC 802AA43C 0000882D */ daddu $s1, $zero, $zero /* 41F1D0 802AA440 ACE00000 */ sw $zero, 0x0($a3) /* 41F1D4 802AA444 8CC30004 */ lw $v1, 0x4($a2) /* 41F1D8 802AA448 24020048 */ addiu $v0, $zero, 0x48 /* 41F1DC 802AA44C AD020000 */ sw $v0, 0x0($t0) /* 41F1E0 802AA450 ACA30000 */ sw $v1, 0x0($a1) .L802AA454_7B1DF4: /* 41F1E4 802AA454 0C0AA829 */ jal func_802AA0A4_7B1A44 /* 41F1E8 802AA458 24100001 */ addiu $s0, $zero, 0x1 /* 41F1EC 802AA45C 10400005 */ beqz $v0, .L802AA474_7B1E14 /* 41F1F0 802AA460 24020002 */ addiu $v0, $zero, 0x2 D_802AA464_7B1E04: /* 41F1F4 802AA464 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons) /* 41F1F8 802AA468 AC30D104 */ sw $s0, %lo(BattleMenu_ShowSwapIcons)($at) /* 41F1FC 802AA46C 080AA920 */ j .L802AA480_7B1E20 /* 41F200 802AA470 00511023 */ subu $v0, $v0, $s1 .L802AA474_7B1E14: /* 41F204 802AA474 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons) /* 41F208 802AA478 AC20D104 */ sw $zero, %lo(BattleMenu_ShowSwapIcons)($at) /* 41F20C 802AA47C 00511023 */ subu $v0, $v0, $s1 .L802AA480_7B1E20: /* 41F210 802AA480 3C01802B */ lui $at, %hi(BattleMenu_NumOptions) /* 41F214 802AA484 AC30D0AC */ sw $s0, %lo(BattleMenu_NumOptions)($at) /* 41F218 802AA488 3C01802B */ lui $at, %hi(D_802AD0A8) D_802AA48C_7B1E2C: /* 41F21C 802AA48C AC20D0A8 */ sw $zero, %lo(D_802AD0A8)($at) /* 41F220 802AA490 3C01802B */ lui $at, %hi(D_802AD0B0) /* 41F224 802AA494 AC20D0B0 */ sw $zero, %lo(D_802AD0B0)($at) /* 41F228 802AA498 3C01802B */ lui $at, %hi(D_802AD100) /* 41F22C 802AA49C AC22D100 */ sw $v0, %lo(D_802AD100)($at) /* 41F230 802AA4A0 0C0A8400 */ jal func_802A1000_7A89A0 /* 41F234 802AA4A4 00000000 */ nop /* 41F238 802AA4A8 24020008 */ addiu $v0, $zero, 0x8 /* 41F23C 802AA4AC 3C01802B */ lui $at, %hi(D_802ACC60) /* 41F240 802AA4B0 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) D_802AA4B4_7B1E54: /* 41F244 802AA4B4 080AA985 */ j .L802AA614_7B1FB4 /* 41F248 802AA4B8 24020001 */ addiu $v0, $zero, 0x1 glabel .L802AA4BC_7B1E5C /* 41F24C 802AA4BC 24040100 */ addiu $a0, $zero, 0x100 /* 41F250 802AA4C0 0000282D */ daddu $a1, $zero, $zero /* 41F254 802AA4C4 3C060020 */ lui $a2, (0x200001 >> 16) /* 41F258 802AA4C8 0C098F3F */ jal set_animation /* 41F25C 802AA4CC 34C60001 */ ori $a2, $a2, (0x200001 & 0xFFFF) /* 41F260 802AA4D0 0C0A846C */ jal func_802A11B0_7A8B50 /* 41F264 802AA4D4 00000000 */ nop /* 41F268 802AA4D8 3C11802B */ lui $s1, %hi(D_802ACC60) D_802AA4DC_7B1E7C: /* 41F26C 802AA4DC 2631CC60 */ addiu $s1, $s1, %lo(D_802ACC60) /* 41F270 802AA4E0 8E230000 */ lw $v1, 0x0($s1) /* 41F274 802AA4E4 10600004 */ beqz $v1, .L802AA4F8_7B1E98 /* 41F278 802AA4E8 0040802D */ daddu $s0, $v0, $zero /* 41F27C 802AA4EC 2462FFFF */ addiu $v0, $v1, -0x1 /* 41F280 802AA4F0 080AA987 */ j .L802AA61C_7B1FBC /* 41F284 802AA4F4 AE220000 */ sw $v0, 0x0($s1) .L802AA4F8_7B1E98: /* 41F288 802AA4F8 12000048 */ beqz $s0, .L802AA61C_7B1FBC /* 41F28C 802AA4FC 24040100 */ addiu $a0, $zero, 0x100 D_802AA500_7B1EA0: /* 41F290 802AA500 0000282D */ daddu $a1, $zero, $zero D_802AA504_7B1EA4: /* 41F294 802AA504 3C060020 */ lui $a2, (0x200008 >> 16) /* 41F298 802AA508 0C098F3F */ jal set_animation /* 41F29C 802AA50C 34C60008 */ ori $a2, $a2, (0x200008 & 0xFFFF) /* 41F2A0 802AA510 2602FFFF */ addiu $v0, $s0, -0x1 /* 41F2A4 802AA514 00021080 */ sll $v0, $v0, 2 /* 41F2A8 802AA518 3C01802B */ lui $at, %hi(D_802AD0BB) /* 41F2AC 802AA51C 00220821 */ addu $at, $at, $v0 D_802AA520_7B1EC0: /* 41F2B0 802AA520 9022D0BB */ lbu $v0, %lo(D_802AD0BB)($at) /* 41F2B4 802AA524 0C0A840C */ jal func_802A1030_7A89D0 /* 41F2B8 802AA528 A2420048 */ sb $v0, 0x48($s2) D_802AA52C_7B1ECC: /* 41F2BC 802AA52C 24020008 */ addiu $v0, $zero, 0x8 /* 41F2C0 802AA530 AE220000 */ sw $v0, 0x0($s1) /* 41F2C4 802AA534 24020004 */ addiu $v0, $zero, 0x4 /* 41F2C8 802AA538 3C01802B */ lui $at, %hi(D_802ACC6C) /* 41F2CC 802AA53C AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) /* 41F2D0 802AA540 080AA985 */ j .L802AA614_7B1FB4 /* 41F2D4 802AA544 24020002 */ addiu $v0, $zero, 0x2 glabel .L802AA548_7B1EE8 /* 41F2D8 802AA548 0C0A846C */ jal func_802A11B0_7A8B50 /* 41F2DC 802AA54C 00000000 */ nop /* 41F2E0 802AA550 10400032 */ beqz $v0, .L802AA61C_7B1FBC D_802AA554_7B1EF4: /* 41F2E4 802AA554 24040011 */ addiu $a0, $zero, 0x11 /* 41F2E8 802AA558 24020004 */ addiu $v0, $zero, 0x4 /* 41F2EC 802AA55C A642006C */ sh $v0, 0x6C($s2) /* 41F2F0 802AA560 24020005 */ addiu $v0, $zero, 0x5 /* 41F2F4 802AA564 A642006E */ sh $v0, 0x6E($s2) /* 41F2F8 802AA568 24020008 */ addiu $v0, $zero, 0x8 /* 41F2FC 802AA56C A2420178 */ sb $v0, 0x178($s2) /* 41F300 802AA570 3C038009 */ lui $v1, %hi(D_8008FA8C) /* 41F304 802AA574 8C63FA8C */ lw $v1, %lo(D_8008FA8C)($v1) /* 41F308 802AA578 24020082 */ addiu $v0, $zero, 0x82 D_802AA57C_7B1F1C: /* 41F30C 802AA57C A642017C */ sh $v0, 0x17C($s2) /* 41F310 802AA580 A640017A */ sh $zero, 0x17A($s2) /* 41F314 802AA584 0C090464 */ jal func_80241190 /* 41F318 802AA588 AE430184 */ sw $v1, 0x184($s2) /* 41F31C 802AA58C 080AA987 */ j .L802AA61C_7B1FBC /* 41F320 802AA590 00000000 */ nop glabel .L802AA594_7B1F34 /* 41F324 802AA594 0C0A8414 */ jal func_802A1050_7A89F0 /* 41F328 802AA598 00000000 */ nop /* 41F32C 802AA59C 24020001 */ addiu $v0, $zero, 0x1 /* 41F330 802AA5A0 3C01800E */ lui $at, %hi(gBattleSubState) D_802AA5A4_7B1F44: /* 41F334 802AA5A4 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 41F338 802AA5A8 0C0AA82E */ jal func_802AA0B8_7B1A58 /* 41F33C 802AA5AC 00000000 */ nop /* 41F340 802AA5B0 0C0AA82E */ jal func_802AA0B8_7B1A58 /* 41F344 802AA5B4 00000000 */ nop /* 41F348 802AA5B8 080AA987 */ j .L802AA61C_7B1FBC /* 41F34C 802AA5BC 00000000 */ nop glabel .L802AA5C0_7B1F60 /* 41F350 802AA5C0 0C0A842E */ jal func_802A10B8_7A8A58 /* 41F354 802AA5C4 00000000 */ nop /* 41F358 802AA5C8 080AA987 */ j .L802AA61C_7B1FBC D_802AA5CC_7B1F6C: /* 41F35C 802AA5CC 00000000 */ nop glabel .L802AA5D0_7B1F70 /* 41F360 802AA5D0 24040050 */ addiu $a0, $zero, 0x50 /* 41F364 802AA5D4 2405003C */ addiu $a1, $zero, 0x3C /* 41F368 802AA5D8 0C093E81 */ jal func_8024FA04 /* 41F36C 802AA5DC 0000302D */ daddu $a2, $zero, $zero /* 41F370 802AA5E0 24020001 */ addiu $v0, $zero, 0x1 /* 41F374 802AA5E4 3C01802B */ lui $at, %hi(D_802AD607) /* 41F378 802AA5E8 A022D607 */ sb $v0, %lo(D_802AD607)($at) /* 41F37C 802AA5EC 080AA985 */ j .L802AA614_7B1FB4 /* 41F380 802AA5F0 24020009 */ addiu $v0, $zero, 0x9 glabel .L802AA5F4_7B1F94 /* 41F384 802AA5F4 0C093EAD */ jal func_8024FAB4 /* 41F388 802AA5F8 00000000 */ nop /* 41F38C 802AA5FC 14400007 */ bnez $v0, .L802AA61C_7B1FBC /* 41F390 802AA600 24020001 */ addiu $v0, $zero, 0x1 /* 41F394 802AA604 3C01802B */ lui $at, %hi(D_802AD607) /* 41F398 802AA608 A020D607 */ sb $zero, %lo(D_802AD607)($at) /* 41F39C 802AA60C 3C01802B */ lui $at, %hi(D_802ACC60) /* 41F3A0 802AA610 AC20CC60 */ sw $zero, %lo(D_802ACC60)($at) .L802AA614_7B1FB4: /* 41F3A4 802AA614 3C01800E */ lui $at, %hi(gBattleSubState) /* 41F3A8 802AA618 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel .L802AA61C_7B1FBC /* 41F3AC 802AA61C 8FBF001C */ lw $ra, 0x1C($sp) /* 41F3B0 802AA620 8FB20018 */ lw $s2, 0x18($sp) /* 41F3B4 802AA624 8FB10014 */ lw $s1, 0x14($sp) /* 41F3B8 802AA628 8FB00010 */ lw $s0, 0x10($sp) /* 41F3BC 802AA62C D7B80030 */ ldc1 $f24, 0x30($sp) /* 41F3C0 802AA630 D7B60028 */ ldc1 $f22, 0x28($sp) /* 41F3C4 802AA634 D7B40020 */ ldc1 $f20, 0x20($sp) /* 41F3C8 802AA638 03E00008 */ jr $ra /* 41F3CC 802AA63C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_twink_menu(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; s32 s1; s32 selection; s32 var_v0_2; s32 shouldSkipTurn; s32 initialPos; s32 entryIdx; switch (gBattleSubState) { case BTL_SUBSTATE_TWINK_MENU_INIT: shouldSkipTurn = FALSE; if (player->debuff == STATUS_KEY_SLEEP) { shouldSkipTurn = TRUE; } if (player->debuff == STATUS_KEY_FEAR) { shouldSkipTurn = TRUE; } if (player->debuff == STATUS_KEY_DIZZY) { shouldSkipTurn = TRUE; } if (player->debuff == STATUS_KEY_PARALYZE) { shouldSkipTurn = TRUE; } if (player->debuff == STATUS_KEY_FROZEN) { shouldSkipTurn = TRUE; } if (player->debuff == STATUS_KEY_STOP) { shouldSkipTurn = TRUE; } if (player->stoneStatus == STATUS_KEY_STONE) { shouldSkipTurn = TRUE; } if (player->koStatus == STATUS_KEY_DAZE) { shouldSkipTurn = TRUE; } if (shouldSkipTurn) { btl_set_state(BATTLE_STATE_END_PLAYER_TURN); break; } btl_cam_use_preset(BTL_CAM_DEFAULT); btl_cam_move(10); if (!(gBattleStatus.flags1 & BS_FLAGS1_PLAYER_IN_BACK)) { 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; gBattleSubState = BTL_SUBSTATE_TWINK_MENU_PERFORM_SWAP; player->state.moveTime = 4; player->state.angle = 0.0f; break; } gBattleSubState = BTL_SUBSTATE_TWINK_MENU_CREATE_MAIN_MENU; break; case BTL_SUBSTATE_TWINK_MENU_PERFORM_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--; break; } 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; case BTL_SUBSTATE_TWINK_MENU_CREATE_MAIN_MENU: gBattleStatus.flags1 |= BS_FLAGS1_MENU_OPEN; player->flags &= ~ACTOR_FLAG_4000000; player->flags |= ACTOR_FLAG_8000000; if (partner != NULL) { partner->flags |= ACTOR_FLAG_4000000; partner->flags |= ACTOR_FLAG_8000000; } entryIdx = 0; battleStatus->selectedMoveID = MOVE_NONE; battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_STAR_POWERS; BattleMenu_OptionEnabled[entryIdx] = TRUE; battle_menu_isMessageDisabled[entryIdx] = 0; BattleMenu_HudScripts[entryIdx] = battle_menu_TwinkStarPowerHudScripts.enabled; BattleMenu_TitleMessages[entryIdx] = D_802AB734[entryIdx]; if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_STAR_POWERS)) { BattleMenu_OptionEnabled[entryIdx] = FALSE; battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW; BattleMenu_HudScripts[entryIdx] = battle_menu_TwinkStarPowerHudScripts.disabled; } initialPos = 0; entryIdx++; if (btl_menu_show_switch_to_peach()) { BattleMenu_ShowSwapIcons = TRUE; } else { BattleMenu_ShowSwapIcons = FALSE; } BattleMenu_NumOptions = entryIdx; D_802AD0A8 = 0; D_802AD0B0 = initialPos; D_802AD100 = 2 - initialPos; btl_main_menu_init(); D_802ACC60 = 8; gBattleSubState = BTL_SUBSTATE_TWINK_MENU_CHOOSE_CATEGORY; break; case BTL_SUBSTATE_TWINK_MENU_CHOOSE_CATEGORY: set_animation(ACTOR_PARTNER, 0, ANIM_Twink_Idle); selection = btl_main_menu_update(); if (D_802ACC60 != 0) { D_802ACC60--; break; } if (selection != 0) { set_animation(ACTOR_PARTNER, 0, ANIM_Twink_Angry); battleStatus->currentSubmenu = battle_menu_submenuIDs[selection - 1]; func_802A1030(); D_802ACC60 = 8; D_802ACC6C = 4; gBattleSubState = BTL_SUBSTATE_TWINK_MENU_CHOOSE_TARGET; } break; case BTL_SUBSTATE_TWINK_MENU_CHOOSE_TARGET: if (btl_main_menu_update() != 0) { battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_TWINK_MENU_TARGET_CANCEL; battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_TWINK_MENU_TARGET_CHOSEN; battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS; battleStatus->selectedMoveID = MOVE_TWINK_DASH; battleStatus->moveArgument = 0; battleStatus->currentTargetListFlags = gMoveTable[MOVE_TWINK_DASH].flags; btl_set_state(BATTLE_STATE_SELECT_TARGET); } break; case BTL_SUBSTATE_TWINK_MENU_TARGET_CANCEL: func_802A1050(); gBattleSubState = BTL_SUBSTATE_TWINK_MENU_CHOOSE_CATEGORY; btl_state_update_twink_menu(); btl_state_update_twink_menu(); break; case BTL_SUBSTATE_TWINK_MENU_TARGET_CHOSEN: btl_main_menu_destroy(); break; case BTL_SUBSTATE_TWINK_MENU_SHOW_CANT_SWITCH: btl_show_variable_battle_message(BTL_MSG_CANT_SWITCH, 60, 0); D_802AD607 = 1; gBattleSubState = BTL_SUBSTATE_TWINK_MENU_AWAIT_CANT_SWITCH_POPUP; break; case BTL_SUBSTATE_TWINK_MENU_AWAIT_CANT_SWITCH_POPUP: if (!btl_is_popup_displayed()) { D_802AD607 = 0; D_802ACC60 = 0; gBattleSubState = BTL_SUBSTATE_TWINK_MENU_CHOOSE_CATEGORY; } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel msg_update_rewind_arrow /* BCE90 80126790 27BDFF18 */ addiu $sp, $sp, -0xE8 /* BCE94 80126794 F7BA00D8 */ sdc1 $f26, 0xD8($sp) /* BCE98 80126798 4480D000 */ mtc1 $zero, $f26 /* BCE9C 8012679C F7BC00E0 */ sdc1 $f28, 0xE0($sp) /* BCEA0 801267A0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* BCEA4 801267A4 4481E000 */ mtc1 $at, $f28 /* BCEA8 801267A8 3C05800A */ lui $a1, %hi(gMainGfxPos) /* BCEAC 801267AC 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* BCEB0 801267B0 F7B600C8 */ sdc1 $f22, 0xC8($sp) /* BCEB4 801267B4 3C01437F */ lui $at, (0x437F0000 >> 16) /* BCEB8 801267B8 4481B000 */ mtc1 $at, $f22 /* BCEBC 801267BC 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* BCEC0 801267C0 AFBF00B8 */ sw $ra, 0xB8($sp) /* BCEC4 801267C4 AFB700B4 */ sw $s7, 0xB4($sp) /* BCEC8 801267C8 AFB600B0 */ sw $s6, 0xB0($sp) /* BCECC 801267CC AFB500AC */ sw $s5, 0xAC($sp) /* BCED0 801267D0 AFB400A8 */ sw $s4, 0xA8($sp) /* BCED4 801267D4 AFB300A4 */ sw $s3, 0xA4($sp) /* BCED8 801267D8 AFB200A0 */ sw $s2, 0xA0($sp) /* BCEDC 801267DC AFB1009C */ sw $s1, 0x9C($sp) /* BCEE0 801267E0 AFB00098 */ sw $s0, 0x98($sp) /* BCEE4 801267E4 F7B800D0 */ sdc1 $f24, 0xD0($sp) /* BCEE8 801267E8 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* BCEEC 801267EC 8CA30000 */ lw $v1, 0x0($a1) /* BCEF0 801267F0 4600B606 */ mov.s $f24, $f22 /* BCEF4 801267F4 0060302D */ daddu $a2, $v1, $zero /* BCEF8 801267F8 24630008 */ addiu $v1, $v1, 0x8 /* BCEFC 801267FC ACA30000 */ sw $v1, 0x0($a1) /* BCF00 80126800 ACC20000 */ sw $v0, 0x0($a2) /* BCF04 80126804 24620008 */ addiu $v0, $v1, 0x8 /* BCF08 80126808 ACC00004 */ sw $zero, 0x4($a2) /* BCF0C 8012680C ACA20000 */ sw $v0, 0x0($a1) /* BCF10 80126810 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* BCF14 80126814 AC620000 */ sw $v0, 0x0($v1) /* BCF18 80126818 3C028015 */ lui $v0, %hi(D_8014C2D8) /* BCF1C 8012681C 2442C2D8 */ addiu $v0, $v0, %lo(D_8014C2D8) /* BCF20 80126820 3C058015 */ lui $a1, %hi(gMessagePrinters) /* BCF24 80126824 24A54C30 */ addiu $a1, $a1, %lo(gMessagePrinters) /* BCF28 80126828 AC620004 */ sw $v0, 0x4($v1) /* BCF2C 8012682C 00041080 */ sll $v0, $a0, 2 /* BCF30 80126830 00441021 */ addu $v0, $v0, $a0 /* BCF34 80126834 00021080 */ sll $v0, $v0, 2 /* BCF38 80126838 00441023 */ subu $v0, $v0, $a0 /* BCF3C 8012683C 000218C0 */ sll $v1, $v0, 3 /* BCF40 80126840 00431021 */ addu $v0, $v0, $v1 /* BCF44 80126844 000210C0 */ sll $v0, $v0, 3 /* BCF48 80126848 00458821 */ addu $s1, $v0, $a1 /* BCF4C 8012684C 9223047C */ lbu $v1, 0x47C($s1) /* BCF50 80126850 2C620005 */ sltiu $v0, $v1, 0x5 /* BCF54 80126854 10400071 */ beqz $v0, .L80126A1C /* BCF58 80126858 4600B106 */ mov.s $f4, $f22 /* BCF5C 8012685C 00031080 */ sll $v0, $v1, 2 /* BCF60 80126860 3C018015 */ lui $at, %hi(jtbl_801506F8) /* BCF64 80126864 00220821 */ addu $at, $at, $v0 /* BCF68 80126868 8C2206F8 */ lw $v0, %lo(jtbl_801506F8)($at) /* BCF6C 8012686C 00400008 */ jr $v0 /* BCF70 80126870 00000000 */ nop glabel .L80126874 /* BCF74 80126874 24020001 */ addiu $v0, $zero, 0x1 /* BCF78 80126878 A620047E */ sh $zero, 0x47E($s1) /* BCF7C 8012687C A6200480 */ sh $zero, 0x480($s1) /* BCF80 80126880 A222047C */ sb $v0, 0x47C($s1) glabel .L80126884 /* BCF84 80126884 8622047E */ lh $v0, 0x47E($s1) /* BCF88 80126888 3C018015 */ lui $at, %hi(D_80150710) /* BCF8C 8012688C D4220710 */ ldc1 $f2, %lo(D_80150710)($at) /* BCF90 80126890 44820000 */ mtc1 $v0, $f0 /* BCF94 80126894 00000000 */ nop /* BCF98 80126898 46800020 */ cvt.s.w $f0, $f0 /* BCF9C 8012689C 46000021 */ cvt.d.s $f0, $f0 /* BCFA0 801268A0 46220002 */ mul.d $f0, $f0, $f2 /* BCFA4 801268A4 00000000 */ nop /* BCFA8 801268A8 9622047E */ lhu $v0, 0x47E($s1) /* BCFAC 801268AC 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* BCFB0 801268B0 44811800 */ mtc1 $at, $f3 /* BCFB4 801268B4 44801000 */ mtc1 $zero, $f2 /* BCFB8 801268B8 24420001 */ addiu $v0, $v0, 0x1 /* BCFBC 801268BC A622047E */ sh $v0, 0x47E($s1) /* BCFC0 801268C0 00021400 */ sll $v0, $v0, 16 /* BCFC4 801268C4 46220000 */ add.d $f0, $f0, $f2 /* BCFC8 801268C8 00021403 */ sra $v0, $v0, 16 /* BCFCC 801268CC 28420004 */ slti $v0, $v0, 0x4 /* BCFD0 801268D0 08049A83 */ j .L80126A0C /* BCFD4 801268D4 46200720 */ cvt.s.d $f28, $f0 glabel .L801268D8 /* BCFD8 801268D8 9622047E */ lhu $v0, 0x47E($s1) /* BCFDC 801268DC 24420001 */ addiu $v0, $v0, 0x1 /* BCFE0 801268E0 A622047E */ sh $v0, 0x47E($s1) /* BCFE4 801268E4 00021400 */ sll $v0, $v0, 16 /* BCFE8 801268E8 00021403 */ sra $v0, $v0, 16 /* BCFEC 801268EC 28420019 */ slti $v0, $v0, 0x19 /* BCFF0 801268F0 1440004A */ bnez $v0, .L80126A1C /* BCFF4 801268F4 24020003 */ addiu $v0, $zero, 0x3 /* BCFF8 801268F8 08049A86 */ j .L80126A18 /* BCFFC 801268FC A620047E */ sh $zero, 0x47E($s1) glabel .L80126900 /* BD000 80126900 0000202D */ daddu $a0, $zero, $zero /* BD004 80126904 8627047E */ lh $a3, 0x47E($s1) /* BD008 80126908 3C01437F */ lui $at, (0x437F0000 >> 16) /* BD00C 8012690C 4481A000 */ mtc1 $at, $f20 /* BD010 80126910 3C014360 */ lui $at, (0x43600000 >> 16) /* BD014 80126914 4481B000 */ mtc1 $at, $f22 /* BD018 80126918 4405A000 */ mfc1 $a1, $f20 /* BD01C 8012691C 4406B000 */ mfc1 $a2, $f22 /* BD020 80126920 2410000F */ addiu $s0, $zero, 0xF /* BD024 80126924 0C00A8ED */ jal update_lerp /* BD028 80126928 AFB00010 */ sw $s0, 0x10($sp) /* BD02C 8012692C 46000606 */ mov.s $f24, $f0 /* BD030 80126930 4405A000 */ mfc1 $a1, $f20 /* BD034 80126934 4406B000 */ mfc1 $a2, $f22 /* BD038 80126938 8627047E */ lh $a3, 0x47E($s1) /* BD03C 8012693C 0000202D */ daddu $a0, $zero, $zero /* BD040 80126940 0C00A8ED */ jal update_lerp /* BD044 80126944 AFB00010 */ sw $s0, 0x10($sp) /* BD048 80126948 46000586 */ mov.s $f22, $f0 /* BD04C 8012694C 4405A000 */ mfc1 $a1, $f20 /* BD050 80126950 3C064350 */ lui $a2, (0x43500000 >> 16) /* BD054 80126954 8627047E */ lh $a3, 0x47E($s1) /* BD058 80126958 0000202D */ daddu $a0, $zero, $zero /* BD05C 8012695C 0C00A8ED */ jal update_lerp /* BD060 80126960 AFB00010 */ sw $s0, 0x10($sp) /* BD064 80126964 9622047E */ lhu $v0, 0x47E($s1) /* BD068 80126968 24420001 */ addiu $v0, $v0, 0x1 /* BD06C 8012696C A622047E */ sh $v0, 0x47E($s1) /* BD070 80126970 00021400 */ sll $v0, $v0, 16 /* BD074 80126974 00021403 */ sra $v0, $v0, 16 /* BD078 80126978 0050102A */ slt $v0, $v0, $s0 /* BD07C 8012697C 14400027 */ bnez $v0, .L80126A1C /* BD080 80126980 46000106 */ mov.s $f4, $f0 /* BD084 80126984 08049A85 */ j .L80126A14 /* BD088 80126988 24020004 */ addiu $v0, $zero, 0x4 glabel .L8012698C /* BD08C 8012698C 0000202D */ daddu $a0, $zero, $zero /* BD090 80126990 8627047E */ lh $a3, 0x47E($s1) /* BD094 80126994 3C014360 */ lui $at, (0x43600000 >> 16) /* BD098 80126998 4481B000 */ mtc1 $at, $f22 /* BD09C 8012699C 3C01437F */ lui $at, (0x437F0000 >> 16) /* BD0A0 801269A0 4481A000 */ mtc1 $at, $f20 /* BD0A4 801269A4 4405B000 */ mfc1 $a1, $f22 /* BD0A8 801269A8 4406A000 */ mfc1 $a2, $f20 /* BD0AC 801269AC 2410000F */ addiu $s0, $zero, 0xF /* BD0B0 801269B0 0C00A8ED */ jal update_lerp /* BD0B4 801269B4 AFB00010 */ sw $s0, 0x10($sp) /* BD0B8 801269B8 46000606 */ mov.s $f24, $f0 /* BD0BC 801269BC 4405B000 */ mfc1 $a1, $f22 /* BD0C0 801269C0 4406A000 */ mfc1 $a2, $f20 /* BD0C4 801269C4 8627047E */ lh $a3, 0x47E($s1) /* BD0C8 801269C8 0000202D */ daddu $a0, $zero, $zero /* BD0CC 801269CC 0C00A8ED */ jal update_lerp /* BD0D0 801269D0 AFB00010 */ sw $s0, 0x10($sp) /* BD0D4 801269D4 46000586 */ mov.s $f22, $f0 /* BD0D8 801269D8 3C054350 */ lui $a1, (0x43500000 >> 16) /* BD0DC 801269DC 4406A000 */ mfc1 $a2, $f20 /* BD0E0 801269E0 8627047E */ lh $a3, 0x47E($s1) /* BD0E4 801269E4 0000202D */ daddu $a0, $zero, $zero /* BD0E8 801269E8 0C00A8ED */ jal update_lerp /* BD0EC 801269EC AFB00010 */ sw $s0, 0x10($sp) /* BD0F0 801269F0 9622047E */ lhu $v0, 0x47E($s1) /* BD0F4 801269F4 46000106 */ mov.s $f4, $f0 /* BD0F8 801269F8 24420001 */ addiu $v0, $v0, 0x1 /* BD0FC 801269FC A622047E */ sh $v0, 0x47E($s1) /* BD100 80126A00 00021400 */ sll $v0, $v0, 16 /* BD104 80126A04 00021403 */ sra $v0, $v0, 16 /* BD108 80126A08 0050102A */ slt $v0, $v0, $s0 .L80126A0C: /* BD10C 80126A0C 14400003 */ bnez $v0, .L80126A1C /* BD110 80126A10 24020002 */ addiu $v0, $zero, 0x2 .L80126A14: /* BD114 80126A14 A620047E */ sh $zero, 0x47E($s1) .L80126A18: /* BD118 80126A18 A222047C */ sb $v0, 0x47C($s1) .L80126A1C: /* BD11C 80126A1C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* BD120 80126A20 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* BD124 80126A24 8C620000 */ lw $v0, 0x0($v1) /* BD128 80126A28 3C014F00 */ lui $at, (0x4F000000 >> 16) /* BD12C 80126A2C 44810000 */ mtc1 $at, $f0 /* BD130 80126A30 0040202D */ daddu $a0, $v0, $zero /* BD134 80126A34 24420008 */ addiu $v0, $v0, 0x8 /* BD138 80126A38 AC620000 */ sw $v0, 0x0($v1) /* BD13C 80126A3C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* BD140 80126A40 AC820000 */ sw $v0, 0x0($a0) /* BD144 80126A44 4618003E */ c.le.s $f0, $f24 /* BD148 80126A48 00000000 */ nop /* BD14C 80126A4C 45010005 */ bc1t .L80126A64 /* BD150 80126A50 24840004 */ addiu $a0, $a0, 0x4 /* BD154 80126A54 4600C18D */ trunc.w.s $f6, $f24 /* BD158 80126A58 44033000 */ mfc1 $v1, $f6 /* BD15C 80126A5C 08049AA2 */ j .L80126A88 /* BD160 80126A60 00032E00 */ sll $a1, $v1, 24 .L80126A64: /* BD164 80126A64 4600C001 */ sub.s $f0, $f24, $f0 /* BD168 80126A68 3C028000 */ lui $v0, (0x80000000 >> 16) /* BD16C 80126A6C 4600018D */ trunc.w.s $f6, $f0 /* BD170 80126A70 44033000 */ mfc1 $v1, $f6 /* BD174 80126A74 00000000 */ nop /* BD178 80126A78 00621825 */ or $v1, $v1, $v0 /* BD17C 80126A7C 3C014F00 */ lui $at, (0x4F000000 >> 16) /* BD180 80126A80 44810000 */ mtc1 $at, $f0 /* BD184 80126A84 00032E00 */ sll $a1, $v1, 24 .L80126A88: /* BD188 80126A88 4616003E */ c.le.s $f0, $f22 /* BD18C 80126A8C 00000000 */ nop /* BD190 80126A90 45030005 */ bc1tl .L80126AA8 /* BD194 80126A94 4600B001 */ sub.s $f0, $f22, $f0 /* BD198 80126A98 4600B18D */ trunc.w.s $f6, $f22 /* BD19C 80126A9C 44033000 */ mfc1 $v1, $f6 /* BD1A0 80126AA0 08049AAF */ j .L80126ABC /* BD1A4 80126AA4 00000000 */ nop .L80126AA8: /* BD1A8 80126AA8 3C028000 */ lui $v0, (0x80000000 >> 16) /* BD1AC 80126AAC 4600018D */ trunc.w.s $f6, $f0 /* BD1B0 80126AB0 44033000 */ mfc1 $v1, $f6 /* BD1B4 80126AB4 00000000 */ nop /* BD1B8 80126AB8 00621825 */ or $v1, $v1, $v0 .L80126ABC: /* BD1BC 80126ABC 3C014F00 */ lui $at, (0x4F000000 >> 16) /* BD1C0 80126AC0 44810000 */ mtc1 $at, $f0 /* BD1C4 80126AC4 306200FF */ andi $v0, $v1, 0xFF /* BD1C8 80126AC8 00021400 */ sll $v0, $v0, 16 /* BD1CC 80126ACC 4604003E */ c.le.s $f0, $f4 /* BD1D0 80126AD0 00000000 */ nop /* BD1D4 80126AD4 45010005 */ bc1t .L80126AEC /* BD1D8 80126AD8 00A22825 */ or $a1, $a1, $v0 /* BD1DC 80126ADC 4600218D */ trunc.w.s $f6, $f4 /* BD1E0 80126AE0 44033000 */ mfc1 $v1, $f6 /* BD1E4 80126AE4 08049AC2 */ j .L80126B08 /* BD1E8 80126AE8 306200FF */ andi $v0, $v1, 0xFF .L80126AEC: /* BD1EC 80126AEC 46002001 */ sub.s $f0, $f4, $f0 /* BD1F0 80126AF0 3C028000 */ lui $v0, (0x80000000 >> 16) /* BD1F4 80126AF4 4600018D */ trunc.w.s $f6, $f0 /* BD1F8 80126AF8 44033000 */ mfc1 $v1, $f6 /* BD1FC 80126AFC 00000000 */ nop /* BD200 80126B00 00621825 */ or $v1, $v1, $v0 /* BD204 80126B04 306200FF */ andi $v0, $v1, 0xFF .L80126B08: /* BD208 80126B08 00021200 */ sll $v0, $v0, 8 /* BD20C 80126B0C 00A21025 */ or $v0, $a1, $v0 /* BD210 80126B10 344200FF */ ori $v0, $v0, 0xFF /* BD214 80126B14 AC820000 */ sw $v0, 0x0($a0) /* BD218 80126B18 9222047C */ lbu $v0, 0x47C($s1) /* BD21C 80126B1C 2442FFFE */ addiu $v0, $v0, -0x2 /* BD220 80126B20 2C420003 */ sltiu $v0, $v0, 0x3 /* BD224 80126B24 10400010 */ beqz $v0, .L80126B68 /* BD228 80126B28 00000000 */ nop /* BD22C 80126B2C 0C00A4F5 */ jal cosine /* BD230 80126B30 86240480 */ lh $a0, 0x480($s1) /* BD234 80126B34 96230480 */ lhu $v1, 0x480($s1) /* BD238 80126B38 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* BD23C 80126B3C 44811000 */ mtc1 $at, $f2 /* BD240 80126B40 2462000F */ addiu $v0, $v1, 0xF /* BD244 80126B44 A6220480 */ sh $v0, 0x480($s1) /* BD248 80126B48 00021400 */ sll $v0, $v0, 16 /* BD24C 80126B4C 00021403 */ sra $v0, $v0, 16 /* BD250 80126B50 28420168 */ slti $v0, $v0, 0x168 /* BD254 80126B54 46020682 */ mul.s $f26, $f0, $f2 /* BD258 80126B58 00000000 */ nop /* BD25C 80126B5C 14400002 */ bnez $v0, .L80126B68 /* BD260 80126B60 2462FEA7 */ addiu $v0, $v1, -0x159 /* BD264 80126B64 A6220480 */ sh $v0, 0x480($s1) .L80126B68: /* BD268 80126B68 96220482 */ lhu $v0, 0x482($s1) /* BD26C 80126B6C 4480A000 */ mtc1 $zero, $f20 /* BD270 80126B70 2442000C */ addiu $v0, $v0, 0xC /* BD274 80126B74 44823000 */ mtc1 $v0, $f6 /* BD278 80126B78 00000000 */ nop /* BD27C 80126B7C 468031A0 */ cvt.s.w $f6, $f6 /* BD280 80126B80 44053000 */ mfc1 $a1, $f6 /* BD284 80126B84 96220484 */ lhu $v0, 0x484($s1) /* BD288 80126B88 4407A000 */ mfc1 $a3, $f20 /* BD28C 80126B8C 2442000C */ addiu $v0, $v0, 0xC /* BD290 80126B90 00021023 */ negu $v0, $v0 /* BD294 80126B94 44823000 */ mtc1 $v0, $f6 /* BD298 80126B98 00000000 */ nop /* BD29C 80126B9C 468031A0 */ cvt.s.w $f6, $f6 /* BD2A0 80126BA0 44063000 */ mfc1 $a2, $f6 /* BD2A4 80126BA4 0C019E40 */ jal guTranslateF /* BD2A8 80126BA8 27A40018 */ addiu $a0, $sp, 0x18 /* BD2AC 80126BAC 44801000 */ mtc1 $zero, $f2 /* BD2B0 80126BB0 44801800 */ mtc1 $zero, $f3 /* BD2B4 80126BB4 4600D021 */ cvt.d.s $f0, $f26 /* BD2B8 80126BB8 46220032 */ c.eq.d $f0, $f2 /* BD2BC 80126BBC 00000000 */ nop /* BD2C0 80126BC0 4501000D */ bc1t .L80126BF8 /* BD2C4 80126BC4 27B00058 */ addiu $s0, $sp, 0x58 /* BD2C8 80126BC8 0200202D */ daddu $a0, $s0, $zero /* BD2CC 80126BCC 4405D000 */ mfc1 $a1, $f26 /* BD2D0 80126BD0 4406A000 */ mfc1 $a2, $f20 /* BD2D4 80126BD4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* BD2D8 80126BD8 44810000 */ mtc1 $at, $f0 /* BD2DC 80126BDC 00C0382D */ daddu $a3, $a2, $zero /* BD2E0 80126BE0 0C019EC8 */ jal guRotateF /* BD2E4 80126BE4 E7A00010 */ swc1 $f0, 0x10($sp) /* BD2E8 80126BE8 0200202D */ daddu $a0, $s0, $zero /* BD2EC 80126BEC 27A50018 */ addiu $a1, $sp, 0x18 /* BD2F0 80126BF0 0C019D80 */ jal guMtxCatF /* BD2F4 80126BF4 00A0302D */ daddu $a2, $a1, $zero .L80126BF8: /* BD2F8 80126BF8 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* BD2FC 80126BFC 44811800 */ mtc1 $at, $f3 /* BD300 80126C00 44801000 */ mtc1 $zero, $f2 /* BD304 80126C04 4600E021 */ cvt.d.s $f0, $f28 /* BD308 80126C08 46220032 */ c.eq.d $f0, $f2 /* BD30C 80126C0C 00000000 */ nop /* BD310 80126C10 4501000C */ bc1t .L80126C44 /* BD314 80126C14 3C120001 */ lui $s2, (0x11630 >> 16) /* BD318 80126C18 27B00058 */ addiu $s0, $sp, 0x58 /* BD31C 80126C1C 0200202D */ daddu $a0, $s0, $zero /* BD320 80126C20 4405E000 */ mfc1 $a1, $f28 /* BD324 80126C24 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* BD328 80126C28 0C019DF0 */ jal guScaleF /* BD32C 80126C2C 00A0302D */ daddu $a2, $a1, $zero /* BD330 80126C30 0200202D */ daddu $a0, $s0, $zero /* BD334 80126C34 27A50018 */ addiu $a1, $sp, 0x18 /* BD338 80126C38 0C019D80 */ jal guMtxCatF /* BD33C 80126C3C 00A0302D */ daddu $a2, $a1, $zero /* BD340 80126C40 3C120001 */ lui $s2, (0x11630 >> 16) .L80126C44: /* BD344 80126C44 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* BD348 80126C48 27A40018 */ addiu $a0, $sp, 0x18 /* BD34C 80126C4C 3C108007 */ lui $s0, %hi(gMatrixListPos) /* BD350 80126C50 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* BD354 80126C54 3C11800A */ lui $s1, %hi(gDisplayContext) /* BD358 80126C58 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* BD35C 80126C5C 96050000 */ lhu $a1, 0x0($s0) /* BD360 80126C60 8E220000 */ lw $v0, 0x0($s1) /* BD364 80126C64 00052980 */ sll $a1, $a1, 6 /* BD368 80126C68 00B22821 */ addu $a1, $a1, $s2 /* BD36C 80126C6C 0C019D40 */ jal guMtxF2L /* BD370 80126C70 00452821 */ addu $a1, $v0, $a1 /* BD374 80126C74 3C04DA38 */ lui $a0, (0xDA380002 >> 16) /* BD378 80126C78 34840002 */ ori $a0, $a0, (0xDA380002 & 0xFFFF) /* BD37C 80126C7C 3C07FD10 */ lui $a3, (0xFD10000F >> 16) /* BD380 80126C80 34E7000F */ ori $a3, $a3, (0xFD10000F & 0xFFFF) /* BD384 80126C84 3C09F510 */ lui $t1, (0xF5100800 >> 16) /* BD388 80126C88 35290800 */ ori $t1, $t1, (0xF5100800 & 0xFFFF) /* BD38C 80126C8C 3C080701 */ lui $t0, (0x7010140 >> 16) /* BD390 80126C90 35080140 */ ori $t0, $t0, (0x7010140 & 0xFFFF) /* BD394 80126C94 3C0A0703 */ lui $t2, (0x703C044 >> 16) /* BD398 80126C98 354AC044 */ ori $t2, $t2, (0x703C044 & 0xFFFF) /* BD39C 80126C9C 3C0B0001 */ lui $t3, (0x10140 >> 16) /* BD3A0 80126CA0 356B0140 */ ori $t3, $t3, (0x10140 & 0xFFFF) /* BD3A4 80126CA4 3C0C0003 */ lui $t4, (0x3C044 >> 16) /* BD3A8 80126CA8 358CC044 */ ori $t4, $t4, (0x3C044 & 0xFFFF) /* BD3AC 80126CAC 3C0DFD88 */ lui $t5, (0xFD880007 >> 16) /* BD3B0 80126CB0 35AD0007 */ ori $t5, $t5, (0xFD880007 & 0xFFFF) /* BD3B4 80126CB4 3C0FF588 */ lui $t7, (0xF5880300 >> 16) /* BD3B8 80126CB8 35EF0300 */ ori $t7, $t7, (0xF5880300 & 0xFFFF) /* BD3BC 80126CBC 3C0E0701 */ lui $t6, (0x7014140 >> 16) /* BD3C0 80126CC0 35CE4140 */ ori $t6, $t6, (0x7014140 & 0xFFFF) /* BD3C4 80126CC4 3C130701 */ lui $s3, (0x701E048 >> 16) /* BD3C8 80126CC8 3673E048 */ ori $s3, $s3, (0x701E048 & 0xFFFF) /* BD3CC 80126CCC 3C15F580 */ lui $s5, (0xF5800300 >> 16) /* BD3D0 80126CD0 36B50300 */ ori $s5, $s5, (0xF5800300 & 0xFFFF) /* BD3D4 80126CD4 3C140101 */ lui $s4, (0x1014140 >> 16) /* BD3D8 80126CD8 36944140 */ ori $s4, $s4, (0x1014140 & 0xFFFF) /* BD3DC 80126CDC 3C160103 */ lui $s6, (0x103C048 >> 16) /* BD3E0 80126CE0 36D6C048 */ ori $s6, $s6, (0x103C048 & 0xFFFF) /* BD3E4 80126CE4 3C170100 */ lui $s7, (0x1004008 >> 16) /* BD3E8 80126CE8 36F74008 */ ori $s7, $s7, (0x1004008 & 0xFFFF) /* BD3EC 80126CEC 3C190600 */ lui $t9, (0x6000402 >> 16) /* BD3F0 80126CF0 37390402 */ ori $t9, $t9, (0x6000402 & 0xFFFF) /* BD3F4 80126CF4 3C180002 */ lui $t8, (0x20406 >> 16) /* BD3F8 80126CF8 3C05800A */ lui $a1, %hi(gMainGfxPos) /* BD3FC 80126CFC 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* BD400 80126D00 37180406 */ ori $t8, $t8, (0x20406 & 0xFFFF) /* BD404 80126D04 8CA20000 */ lw $v0, 0x0($a1) /* BD408 80126D08 96030000 */ lhu $v1, 0x0($s0) /* BD40C 80126D0C 0040302D */ daddu $a2, $v0, $zero /* BD410 80126D10 24420008 */ addiu $v0, $v0, 0x8 /* BD414 80126D14 ACA20000 */ sw $v0, 0x0($a1) /* BD418 80126D18 ACC40000 */ sw $a0, 0x0($a2) /* BD41C 80126D1C 24640001 */ addiu $a0, $v1, 0x1 /* BD420 80126D20 3063FFFF */ andi $v1, $v1, 0xFFFF /* BD424 80126D24 00031980 */ sll $v1, $v1, 6 /* BD428 80126D28 A6040000 */ sh $a0, 0x0($s0) /* BD42C 80126D2C 8E240000 */ lw $a0, 0x0($s1) /* BD430 80126D30 00721821 */ addu $v1, $v1, $s2 /* BD434 80126D34 00832021 */ addu $a0, $a0, $v1 /* BD438 80126D38 3C038000 */ lui $v1, (0x80000000 >> 16) /* BD43C 80126D3C 00832021 */ addu $a0, $a0, $v1 /* BD440 80126D40 24430008 */ addiu $v1, $v0, 0x8 /* BD444 80126D44 ACC40004 */ sw $a0, 0x4($a2) /* BD448 80126D48 ACA30000 */ sw $v1, 0x0($a1) /* BD44C 80126D4C 3C03802F */ lui $v1, %hi(ui_msg_star_png) /* BD450 80126D50 2463D690 */ addiu $v1, $v1, %lo(ui_msg_star_png) /* BD454 80126D54 AC430004 */ sw $v1, 0x4($v0) /* BD458 80126D58 24430010 */ addiu $v1, $v0, 0x10 /* BD45C 80126D5C AC470000 */ sw $a3, 0x0($v0) /* BD460 80126D60 ACA30000 */ sw $v1, 0x0($a1) /* BD464 80126D64 24430018 */ addiu $v1, $v0, 0x18 /* BD468 80126D68 AC48000C */ sw $t0, 0xC($v0) /* BD46C 80126D6C 3C08E600 */ lui $t0, (0xE6000000 >> 16) /* BD470 80126D70 AC490008 */ sw $t1, 0x8($v0) /* BD474 80126D74 ACA30000 */ sw $v1, 0x0($a1) /* BD478 80126D78 24430020 */ addiu $v1, $v0, 0x20 /* BD47C 80126D7C 3C07F400 */ lui $a3, (0xF4000000 >> 16) /* BD480 80126D80 AC480010 */ sw $t0, 0x10($v0) /* BD484 80126D84 AC400014 */ sw $zero, 0x14($v0) /* BD488 80126D88 ACA30000 */ sw $v1, 0x0($a1) /* BD48C 80126D8C 24430028 */ addiu $v1, $v0, 0x28 /* BD490 80126D90 3C06E700 */ lui $a2, (0xE7000000 >> 16) /* BD494 80126D94 AC470018 */ sw $a3, 0x18($v0) /* BD498 80126D98 AC4A001C */ sw $t2, 0x1C($v0) /* BD49C 80126D9C ACA30000 */ sw $v1, 0x0($a1) /* BD4A0 80126DA0 24430030 */ addiu $v1, $v0, 0x30 /* BD4A4 80126DA4 AC460020 */ sw $a2, 0x20($v0) /* BD4A8 80126DA8 AC400024 */ sw $zero, 0x24($v0) /* BD4AC 80126DAC ACA30000 */ sw $v1, 0x0($a1) /* BD4B0 80126DB0 24430038 */ addiu $v1, $v0, 0x38 /* BD4B4 80126DB4 3C04F200 */ lui $a0, (0xF2000000 >> 16) /* BD4B8 80126DB8 AC490028 */ sw $t1, 0x28($v0) /* BD4BC 80126DBC AC4B002C */ sw $t3, 0x2C($v0) /* BD4C0 80126DC0 ACA30000 */ sw $v1, 0x0($a1) /* BD4C4 80126DC4 24430040 */ addiu $v1, $v0, 0x40 /* BD4C8 80126DC8 AC440030 */ sw $a0, 0x30($v0) /* BD4CC 80126DCC AC4C0034 */ sw $t4, 0x34($v0) /* BD4D0 80126DD0 ACA30000 */ sw $v1, 0x0($a1) /* BD4D4 80126DD4 3C03802F */ lui $v1, %hi(ui_msg_star_silhouette_png) /* BD4D8 80126DD8 2463D8D0 */ addiu $v1, $v1, %lo(ui_msg_star_silhouette_png) /* BD4DC 80126DDC AC43003C */ sw $v1, 0x3C($v0) /* BD4E0 80126DE0 24430048 */ addiu $v1, $v0, 0x48 /* BD4E4 80126DE4 AC4D0038 */ sw $t5, 0x38($v0) /* BD4E8 80126DE8 ACA30000 */ sw $v1, 0x0($a1) /* BD4EC 80126DEC 24430050 */ addiu $v1, $v0, 0x50 /* BD4F0 80126DF0 AC4F0040 */ sw $t7, 0x40($v0) /* BD4F4 80126DF4 AC4E0044 */ sw $t6, 0x44($v0) /* BD4F8 80126DF8 ACA30000 */ sw $v1, 0x0($a1) /* BD4FC 80126DFC 24430058 */ addiu $v1, $v0, 0x58 /* BD500 80126E00 AC480048 */ sw $t0, 0x48($v0) /* BD504 80126E04 AC40004C */ sw $zero, 0x4C($v0) /* BD508 80126E08 ACA30000 */ sw $v1, 0x0($a1) /* BD50C 80126E0C 24430060 */ addiu $v1, $v0, 0x60 /* BD510 80126E10 AC470050 */ sw $a3, 0x50($v0) /* BD514 80126E14 AC530054 */ sw $s3, 0x54($v0) /* BD518 80126E18 ACA30000 */ sw $v1, 0x0($a1) /* BD51C 80126E1C 24430068 */ addiu $v1, $v0, 0x68 /* BD520 80126E20 AC460058 */ sw $a2, 0x58($v0) /* BD524 80126E24 AC40005C */ sw $zero, 0x5C($v0) /* BD528 80126E28 ACA30000 */ sw $v1, 0x0($a1) /* BD52C 80126E2C 24430070 */ addiu $v1, $v0, 0x70 /* BD530 80126E30 AC550060 */ sw $s5, 0x60($v0) /* BD534 80126E34 AC540064 */ sw $s4, 0x64($v0) /* BD538 80126E38 ACA30000 */ sw $v1, 0x0($a1) /* BD53C 80126E3C 24430078 */ addiu $v1, $v0, 0x78 /* BD540 80126E40 AC440068 */ sw $a0, 0x68($v0) /* BD544 80126E44 AC56006C */ sw $s6, 0x6C($v0) /* BD548 80126E48 ACA30000 */ sw $v1, 0x0($a1) /* BD54C 80126E4C 3C038015 */ lui $v1, %hi(gRewindArrowQuad) /* BD550 80126E50 2463C298 */ addiu $v1, $v1, %lo(gRewindArrowQuad) /* BD554 80126E54 AC430074 */ sw $v1, 0x74($v0) /* BD558 80126E58 24430080 */ addiu $v1, $v0, 0x80 /* BD55C 80126E5C AC570070 */ sw $s7, 0x70($v0) /* BD560 80126E60 ACA30000 */ sw $v1, 0x0($a1) /* BD564 80126E64 AC590078 */ sw $t9, 0x78($v0) /* BD568 80126E68 AC58007C */ sw $t8, 0x7C($v0) /* BD56C 80126E6C 8FBF00B8 */ lw $ra, 0xB8($sp) /* BD570 80126E70 8FB700B4 */ lw $s7, 0xB4($sp) /* BD574 80126E74 8FB600B0 */ lw $s6, 0xB0($sp) /* BD578 80126E78 8FB500AC */ lw $s5, 0xAC($sp) /* BD57C 80126E7C 8FB400A8 */ lw $s4, 0xA8($sp) /* BD580 80126E80 8FB300A4 */ lw $s3, 0xA4($sp) /* BD584 80126E84 8FB200A0 */ lw $s2, 0xA0($sp) /* BD588 80126E88 8FB1009C */ lw $s1, 0x9C($sp) /* BD58C 80126E8C 8FB00098 */ lw $s0, 0x98($sp) /* BD590 80126E90 D7BC00E0 */ ldc1 $f28, 0xE0($sp) /* BD594 80126E94 D7BA00D8 */ ldc1 $f26, 0xD8($sp) /* BD598 80126E98 D7B800D0 */ ldc1 $f24, 0xD0($sp) /* BD59C 80126E9C D7B600C8 */ ldc1 $f22, 0xC8($sp) /* BD5A0 80126EA0 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* BD5A4 80126EA4 03E00008 */ jr $ra /* BD5A8 80126EA8 27BD00E8 */ addiu $sp, $sp, 0xE8 ### DECOMPILED C INSTRUCTIONS: void msg_update_rewind_arrow(s32 printerIndex) { MessagePrintState* printer = &gMessagePrinters[printerIndex]; f32 angle = 0.0f; f32 scale = 1.0f; f32 colorG = 255.0f; f32 colorR = 255.0f; f32 colorB = 255.0f; Matrix4f sp18; Matrix4f sp58; f32 temp; gDPPipeSync(gMainGfxPos++); gSPDisplayList(gMainGfxPos++, D_8014C2D8); switch (printer->rewindArrowAnimState) { case REWIND_ARROW_STATE_INIT: printer->rewindArrowCounter = 0; printer->rewindArrowSwingPhase = 0; printer->rewindArrowAnimState = REWIND_ARROW_STATE_GROW; // fallthrough case REWIND_ARROW_STATE_GROW: temp = printer->rewindArrowCounter; scale = temp * 0.2 + 0.5; if (++printer->rewindArrowCounter >= 4) { printer->rewindArrowCounter = 0; printer->rewindArrowAnimState = REWIND_ARROW_STATE_NEUTRAL; } break; case REWIND_ARROW_STATE_NEUTRAL: if (++printer->rewindArrowCounter >= 25) { printer->rewindArrowCounter = 0; printer->rewindArrowAnimState = REWIND_ARROW_STATE_CHANGE_COLOR; } break; case REWIND_ARROW_STATE_CHANGE_COLOR: colorR = update_lerp(EASING_LINEAR, 255.0f, 224.0f, printer->rewindArrowCounter, 15); colorG = update_lerp(EASING_LINEAR, 255.0f, 224.0f, printer->rewindArrowCounter, 15); colorB = update_lerp(EASING_LINEAR, 255.0f, 208.0f, printer->rewindArrowCounter, 15); if (++printer->rewindArrowCounter >= 15) { printer->rewindArrowCounter = 0; printer->rewindArrowAnimState = REWIND_ARROW_STATE_CHANGE_COLOR_BACK; } break; case REWIND_ARROW_STATE_CHANGE_COLOR_BACK: colorR = update_lerp(EASING_LINEAR, 224.0f, 255.0f, printer->rewindArrowCounter, 15); colorG = update_lerp(EASING_LINEAR, 224.0f, 255.0f, printer->rewindArrowCounter, 15); colorB = update_lerp(EASING_LINEAR, 208.0f, 255.0f, printer->rewindArrowCounter, 15); if (++printer->rewindArrowCounter >= 15) { printer->rewindArrowCounter = 0; printer->rewindArrowAnimState = REWIND_ARROW_STATE_NEUTRAL; } break; } gDPSetPrimColor(gMainGfxPos++, 0, 0, colorR, colorG, colorB, 255); if (printer->rewindArrowAnimState == REWIND_ARROW_STATE_NEUTRAL || printer->rewindArrowAnimState == REWIND_ARROW_STATE_CHANGE_COLOR || printer->rewindArrowAnimState == REWIND_ARROW_STATE_CHANGE_COLOR_BACK) { angle = cosine(printer->rewindArrowSwingPhase) * 30.0f; printer->rewindArrowSwingPhase += 15; if (printer->rewindArrowSwingPhase >= 360) { printer->rewindArrowSwingPhase -= 360; } } guTranslateF(sp18, printer->rewindArrowPos.x + 12, -(printer->rewindArrowPos.y + 12), 0); if (angle != 0.0) { guRotateF(sp58, angle, 0, 0, 1.0f); guMtxCatF(sp58, sp18, sp18); } if (scale != 1.0) { guScaleF(sp58, scale, scale, 1.0f); guMtxCatF(sp58, sp18, sp18); } guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPLoadTextureTile(gMainGfxPos++, ui_msg_star_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, 15, 17, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); gDPLoadMultiTile_4b(gMainGfxPos++, ui_msg_star_silhouette_png, 0x0100, 1, G_IM_FMT_I, 16, 0, 0, 0, 15, 18, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD); gSPVertex(gMainGfxPos++, gRewindArrowQuad, 4, 0); gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025BAA0 /* 18A380 8025BAA0 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 18A384 8025BAA4 AFB40020 */ sw $s4, 0x20($sp) /* 18A388 8025BAA8 0080A02D */ daddu $s4, $a0, $zero /* 18A38C 8025BAAC AFB20018 */ sw $s2, 0x18($sp) /* 18A390 8025BAB0 00A0902D */ daddu $s2, $a1, $zero /* 18A394 8025BAB4 AFB50024 */ sw $s5, 0x24($sp) /* 18A398 8025BAB8 00C0A82D */ daddu $s5, $a2, $zero /* 18A39C 8025BABC AFB3001C */ sw $s3, 0x1C($sp) /* 18A3A0 8025BAC0 AFBF0030 */ sw $ra, 0x30($sp) /* 18A3A4 8025BAC4 AFB7002C */ sw $s7, 0x2C($sp) /* 18A3A8 8025BAC8 AFB60028 */ sw $s6, 0x28($sp) /* 18A3AC 8025BACC AFB10014 */ sw $s1, 0x14($sp) /* 18A3B0 8025BAD0 AFB00010 */ sw $s0, 0x10($sp) /* 18A3B4 8025BAD4 8E5000C0 */ lw $s0, 0xC0($s2) /* 18A3B8 8025BAD8 8FB60048 */ lw $s6, 0x48($sp) /* 18A3BC 8025BADC 820206C1 */ lb $v0, 0x6C1($s0) /* 18A3C0 8025BAE0 8FB1004C */ lw $s1, 0x4C($sp) /* 18A3C4 8025BAE4 1040005A */ beqz $v0, .L8025BC50 /* 18A3C8 8025BAE8 00E0982D */ daddu $s3, $a3, $zero /* 18A3CC 8025BAEC 16800016 */ bnez $s4, .L8025BB48 /* 18A3D0 8025BAF0 00000000 */ nop /* 18A3D4 8025BAF4 0C0B7830 */ jal spr_get_player_palettes /* 18A3D8 8025BAF8 96440088 */ lhu $a0, 0x88($s2) /* 18A3DC 8025BAFC AE0206D0 */ sw $v0, 0x6D0($s0) /* 18A3E0 8025BB00 0040202D */ daddu $a0, $v0, $zero /* 18A3E4 8025BB04 A20006CD */ sb $zero, 0x6CD($s0) /* 18A3E8 8025BB08 8C830000 */ lw $v1, 0x0($a0) /* 18A3EC 8025BB0C 2402FFFF */ addiu $v0, $zero, -0x1 /* 18A3F0 8025BB10 10620020 */ beq $v1, $v0, .L8025BB94 /* 18A3F4 8025BB14 0080182D */ daddu $v1, $a0, $zero /* 18A3F8 8025BB18 0040202D */ daddu $a0, $v0, $zero .L8025BB1C: /* 18A3FC 8025BB1C 920206CD */ lbu $v0, 0x6CD($s0) /* 18A400 8025BB20 24420001 */ addiu $v0, $v0, 0x1 /* 18A404 8025BB24 A20206CD */ sb $v0, 0x6CD($s0) /* 18A408 8025BB28 00021600 */ sll $v0, $v0, 24 /* 18A40C 8025BB2C 00021583 */ sra $v0, $v0, 22 /* 18A410 8025BB30 00431021 */ addu $v0, $v0, $v1 /* 18A414 8025BB34 8C420000 */ lw $v0, 0x0($v0) /* 18A418 8025BB38 10440016 */ beq $v0, $a0, .L8025BB94 /* 18A41C 8025BB3C 00000000 */ nop /* 18A420 8025BB40 08096EC7 */ j .L8025BB1C /* 18A424 8025BB44 00000000 */ nop .L8025BB48: /* 18A428 8025BB48 0C0B7A90 */ jal spr_get_npc_palettes /* 18A42C 8025BB4C 96440088 */ lhu $a0, 0x88($s2) /* 18A430 8025BB50 AE0206D0 */ sw $v0, 0x6D0($s0) /* 18A434 8025BB54 0040202D */ daddu $a0, $v0, $zero /* 18A438 8025BB58 A20006CD */ sb $zero, 0x6CD($s0) /* 18A43C 8025BB5C 8C830000 */ lw $v1, 0x0($a0) /* 18A440 8025BB60 2402FFFF */ addiu $v0, $zero, -0x1 /* 18A444 8025BB64 1062000B */ beq $v1, $v0, .L8025BB94 /* 18A448 8025BB68 0080182D */ daddu $v1, $a0, $zero /* 18A44C 8025BB6C 0040202D */ daddu $a0, $v0, $zero .L8025BB70: /* 18A450 8025BB70 920206CD */ lbu $v0, 0x6CD($s0) /* 18A454 8025BB74 24420001 */ addiu $v0, $v0, 0x1 /* 18A458 8025BB78 A20206CD */ sb $v0, 0x6CD($s0) /* 18A45C 8025BB7C 00021600 */ sll $v0, $v0, 24 D_8025BB80: /* 18A460 8025BB80 00021583 */ sra $v0, $v0, 22 /* 18A464 8025BB84 00431021 */ addu $v0, $v0, $v1 /* 18A468 8025BB88 8C420000 */ lw $v0, 0x0($v0) /* 18A46C 8025BB8C 1444FFF8 */ bne $v0, $a0, .L8025BB70 /* 18A470 8025BB90 00000000 */ nop .L8025BB94: /* 18A474 8025BB94 820306C1 */ lb $v1, 0x6C1($s0) /* 18A478 8025BB98 24020001 */ addiu $v0, $zero, 0x1 /* 18A47C 8025BB9C 14620004 */ bne $v1, $v0, .L8025BBB0 /* 18A480 8025BBA0 240200FF */ addiu $v0, $zero, 0xFF /* 18A484 8025BBA4 A20006C2 */ sb $zero, 0x6C2($s0) /* 18A488 8025BBA8 08096EEE */ j .L8025BBB8 /* 18A48C 8025BBAC A60006CA */ sh $zero, 0x6CA($s0) .L8025BBB0: /* 18A490 8025BBB0 A20006C2 */ sb $zero, 0x6C2($s0) /* 18A494 8025BBB4 A60206CA */ sh $v0, 0x6CA($s0) .L8025BBB8: /* 18A498 8025BBB8 820206CD */ lb $v0, 0x6CD($s0) /* 18A49C 8025BBBC 18400017 */ blez $v0, .L8025BC1C /* 18A4A0 8025BBC0 0000202D */ daddu $a0, $zero, $zero /* 18A4A4 8025BBC4 0200282D */ daddu $a1, $s0, $zero .L8025BBC8: /* 18A4A8 8025BBC8 8E0206D0 */ lw $v0, 0x6D0($s0) /* 18A4AC 8025BBCC 00041880 */ sll $v1, $a0, 2 /* 18A4B0 8025BBD0 00621821 */ addu $v1, $v1, $v0 /* 18A4B4 8025BBD4 00041140 */ sll $v0, $a0, 5 /* 18A4B8 8025BBD8 8C6A0000 */ lw $t2, 0x0($v1) /* 18A4BC 8025BBDC 02024821 */ addu $t1, $s0, $v0 /* 18A4C0 8025BBE0 11400009 */ beqz $t2, .L8025BC08 /* 18A4C4 8025BBE4 ACA906D4 */ sw $t1, 0x6D4($a1) /* 18A4C8 8025BBE8 0000582D */ daddu $t3, $zero, $zero .L8025BBEC: /* 18A4CC 8025BBEC 95420000 */ lhu $v0, 0x0($t2) /* 18A4D0 8025BBF0 254A0002 */ addiu $t2, $t2, 0x2 /* 18A4D4 8025BBF4 256B0001 */ addiu $t3, $t3, 0x1 /* 18A4D8 8025BBF8 A5220000 */ sh $v0, 0x0($t1) /* 18A4DC 8025BBFC 29620010 */ slti $v0, $t3, 0x10 /* 18A4E0 8025BC00 1440FFFA */ bnez $v0, .L8025BBEC /* 18A4E4 8025BC04 25290002 */ addiu $t1, $t1, 0x2 .L8025BC08: /* 18A4E8 8025BC08 820206CD */ lb $v0, 0x6CD($s0) /* 18A4EC 8025BC0C 24840001 */ addiu $a0, $a0, 0x1 /* 18A4F0 8025BC10 0082102A */ slt $v0, $a0, $v0 /* 18A4F4 8025BC14 1440FFEC */ bnez $v0, .L8025BBC8 /* 18A4F8 8025BC18 24A50004 */ addiu $a1, $a1, 0x4 .L8025BC1C: /* 18A4FC 8025BC1C 16600007 */ bnez $s3, .L8025BC3C /* 18A500 8025BC20 00000000 */ nop /* 18A504 8025BC24 96020744 */ lhu $v0, 0x744($s0) /* 18A508 8025BC28 A6000744 */ sh $zero, 0x744($s0) /* 18A50C 8025BC2C A6020746 */ sh $v0, 0x746($s0) /* 18A510 8025BC30 0040182D */ daddu $v1, $v0, $zero /* 18A514 8025BC34 A6020748 */ sh $v0, 0x748($s0) /* 18A518 8025BC38 A603074A */ sh $v1, 0x74A($s0) .L8025BC3C: /* 18A51C 8025BC3C 96020744 */ lhu $v0, 0x744($s0) /* 18A520 8025BC40 A60006CA */ sh $zero, 0x6CA($s0) /* 18A524 8025BC44 A20006C2 */ sb $zero, 0x6C2($s0) /* 18A528 8025BC48 A20006C1 */ sb $zero, 0x6C1($s0) /* 18A52C 8025BC4C A60206C8 */ sh $v0, 0x6C8($s0) .L8025BC50: /* 18A530 8025BC50 820306C2 */ lb $v1, 0x6C2($s0) /* 18A534 8025BC54 10600005 */ beqz $v1, .L8025BC6C /* 18A538 8025BC58 24020001 */ addiu $v0, $zero, 0x1 /* 18A53C 8025BC5C 1062000E */ beq $v1, $v0, .L8025BC98 /* 18A540 8025BC60 24020002 */ addiu $v0, $zero, 0x2 /* 18A544 8025BC64 08096FA3 */ j .L8025BE8C /* 18A548 8025BC68 00000000 */ nop .L8025BC6C: /* 18A54C 8025BC6C 16200085 */ bnez $s1, .L8025BE84 /* 18A550 8025BC70 00000000 */ nop /* 18A554 8025BC74 860206C8 */ lh $v0, 0x6C8($s0) /* 18A558 8025BC78 960306C8 */ lhu $v1, 0x6C8($s0) /* 18A55C 8025BC7C 10400003 */ beqz $v0, .L8025BC8C /* 18A560 8025BC80 2462FFFF */ addiu $v0, $v1, -0x1 /* 18A564 8025BC84 08096FA1 */ j .L8025BE84 /* 18A568 8025BC88 A60206C8 */ sh $v0, 0x6C8($s0) .L8025BC8C: /* 18A56C 8025BC8C 24020001 */ addiu $v0, $zero, 0x1 /* 18A570 8025BC90 A60006CA */ sh $zero, 0x6CA($s0) /* 18A574 8025BC94 A20206C2 */ sb $v0, 0x6C2($s0) .L8025BC98: /* 18A578 8025BC98 16200018 */ bnez $s1, .L8025BCFC /* 18A57C 8025BC9C 3C0651EB */ lui $a2, (0x51EB851F >> 16) /* 18A580 8025BCA0 86020746 */ lh $v0, 0x746($s0) /* 18A584 8025BCA4 24036400 */ addiu $v1, $zero, 0x6400 /* 18A588 8025BCA8 14400002 */ bnez $v0, .L8025BCB4 /* 18A58C 8025BCAC 0062001A */ div $zero, $v1, $v0 /* 18A590 8025BCB0 0007000D */ break 7 .L8025BCB4: /* 18A594 8025BCB4 2401FFFF */ addiu $at, $zero, -0x1 /* 18A598 8025BCB8 14410004 */ bne $v0, $at, .L8025BCCC /* 18A59C 8025BCBC 3C018000 */ lui $at, (0x80000000 >> 16) /* 18A5A0 8025BCC0 14610002 */ bne $v1, $at, .L8025BCCC /* 18A5A4 8025BCC4 00000000 */ nop /* 18A5A8 8025BCC8 0006000D */ break 6 .L8025BCCC: /* 18A5AC 8025BCCC 00001812 */ mflo $v1 /* 18A5B0 8025BCD0 960206CA */ lhu $v0, 0x6CA($s0) /* 18A5B4 8025BCD4 00431021 */ addu $v0, $v0, $v1 /* 18A5B8 8025BCD8 A60206CA */ sh $v0, 0x6CA($s0) /* 18A5BC 8025BCDC 00021400 */ sll $v0, $v0, 16 /* 18A5C0 8025BCE0 00021403 */ sra $v0, $v0, 16 /* 18A5C4 8025BCE4 2842639D */ slti $v0, $v0, 0x639D /* 18A5C8 8025BCE8 14400005 */ bnez $v0, .L8025BD00 /* 18A5CC 8025BCEC 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) /* 18A5D0 8025BCF0 2402639C */ addiu $v0, $zero, 0x639C /* 18A5D4 8025BCF4 A60206CA */ sh $v0, 0x6CA($s0) /* 18A5D8 8025BCF8 3C0651EB */ lui $a2, (0x51EB851F >> 16) .L8025BCFC: /* 18A5DC 8025BCFC 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) .L8025BD00: /* 18A5E0 8025BD00 0200682D */ daddu $t5, $s0, $zero /* 18A5E4 8025BD04 0000582D */ daddu $t3, $zero, $zero /* 18A5E8 8025BD08 3C0F8080 */ lui $t7, (0x80808081 >> 16) /* 18A5EC 8025BD0C 35EF8081 */ ori $t7, $t7, (0x80808081 & 0xFFFF) /* 18A5F0 8025BD10 86020740 */ lh $v0, 0x740($s0) /* 18A5F4 8025BD14 8E0506D0 */ lw $a1, 0x6D0($s0) /* 18A5F8 8025BD18 960306CA */ lhu $v1, 0x6CA($s0) /* 18A5FC 8025BD1C 00021080 */ sll $v0, $v0, 2 /* 18A600 8025BD20 00451021 */ addu $v0, $v0, $a1 /* 18A604 8025BD24 00031C00 */ sll $v1, $v1, 16 /* 18A608 8025BD28 00032403 */ sra $a0, $v1, 16 /* 18A60C 8025BD2C 8C4A0000 */ lw $t2, 0x0($v0) /* 18A610 8025BD30 86020742 */ lh $v0, 0x742($s0) /* 18A614 8025BD34 00860018 */ mult $a0, $a2 /* 18A618 8025BD38 00021080 */ sll $v0, $v0, 2 /* 18A61C 8025BD3C 00451021 */ addu $v0, $v0, $a1 /* 18A620 8025BD40 8C490000 */ lw $t1, 0x0($v0) /* 18A624 8025BD44 00031FC3 */ sra $v1, $v1, 31 /* 18A628 8025BD48 AE1006D4 */ sw $s0, 0x6D4($s0) /* 18A62C 8025BD4C 0000C810 */ mfhi $t9 /* 18A630 8025BD50 00191143 */ sra $v0, $t9, 5 /* 18A634 8025BD54 0043C023 */ subu $t8, $v0, $v1 /* 18A638 8025BD58 330C00FF */ andi $t4, $t8, 0xFF /* 18A63C 8025BD5C 240200FF */ addiu $v0, $zero, 0xFF /* 18A640 8025BD60 004C7023 */ subu $t6, $v0, $t4 .L8025BD64: /* 18A644 8025BD64 95430000 */ lhu $v1, 0x0($t2) /* 18A648 8025BD68 000312C2 */ srl $v0, $v1, 11 /* 18A64C 8025BD6C 004E0018 */ mult $v0, $t6 /* 18A650 8025BD70 95240000 */ lhu $a0, 0x0($t1) /* 18A654 8025BD74 00002812 */ mflo $a1 /* 18A658 8025BD78 000412C2 */ srl $v0, $a0, 11 /* 18A65C 8025BD7C 00000000 */ nop /* 18A660 8025BD80 004C0018 */ mult $v0, $t4 /* 18A664 8025BD84 00004012 */ mflo $t0 /* 18A668 8025BD88 00A82821 */ addu $a1, $a1, $t0 /* 18A66C 8025BD8C 00000000 */ nop /* 18A670 8025BD90 00AF0018 */ mult $a1, $t7 /* 18A674 8025BD94 00009810 */ mfhi $s3 /* 18A678 8025BD98 00031182 */ srl $v0, $v1, 6 /* 18A67C 8025BD9C 3042001F */ andi $v0, $v0, 0x1F /* 18A680 8025BDA0 004E0018 */ mult $v0, $t6 /* 18A684 8025BDA4 00004012 */ mflo $t0 /* 18A688 8025BDA8 00041182 */ srl $v0, $a0, 6 /* 18A68C 8025BDAC 3042001F */ andi $v0, $v0, 0x1F /* 18A690 8025BDB0 004C0018 */ mult $v0, $t4 /* 18A694 8025BDB4 00003812 */ mflo $a3 /* 18A698 8025BDB8 00031842 */ srl $v1, $v1, 1 /* 18A69C 8025BDBC 3063001F */ andi $v1, $v1, 0x1F /* 18A6A0 8025BDC0 006E0018 */ mult $v1, $t6 /* 18A6A4 8025BDC4 00001812 */ mflo $v1 /* 18A6A8 8025BDC8 00042042 */ srl $a0, $a0, 1 /* 18A6AC 8025BDCC 3084001F */ andi $a0, $a0, 0x1F /* 18A6B0 8025BDD0 008C0018 */ mult $a0, $t4 /* 18A6B4 8025BDD4 254A0002 */ addiu $t2, $t2, 0x2 /* 18A6B8 8025BDD8 91260001 */ lbu $a2, 0x1($t1) D_8025BDDC: /* 18A6BC 8025BDDC 25290002 */ addiu $t1, $t1, 0x2 /* 18A6C0 8025BDE0 0000B812 */ mflo $s7 /* 18A6C4 8025BDE4 256B0001 */ addiu $t3, $t3, 0x1 /* 18A6C8 8025BDE8 01072021 */ addu $a0, $t0, $a3 /* 18A6CC 8025BDEC 008F0018 */ mult $a0, $t7 /* 18A6D0 8025BDF0 30C60001 */ andi $a2, $a2, 0x1 /* 18A6D4 8025BDF4 02651021 */ addu $v0, $s3, $a1 /* 18A6D8 8025BDF8 000211C3 */ sra $v0, $v0, 7 /* 18A6DC 8025BDFC 00052FC3 */ sra $a1, $a1, 31 /* 18A6E0 8025BE00 00004010 */ mfhi $t0 /* 18A6E4 8025BE04 00453823 */ subu $a3, $v0, $a1 /* 18A6E8 8025BE08 00771821 */ addu $v1, $v1, $s7 /* 18A6EC 8025BE0C 006F0018 */ mult $v1, $t7 /* 18A6F0 8025BE10 01041021 */ addu $v0, $t0, $a0 /* 18A6F4 8025BE14 000211C3 */ sra $v0, $v0, 7 /* 18A6F8 8025BE18 000427C3 */ sra $a0, $a0, 31 /* 18A6FC 8025BE1C 00442823 */ subu $a1, $v0, $a0 /* 18A700 8025BE20 00009810 */ mfhi $s3 /* 18A704 8025BE24 02631021 */ addu $v0, $s3, $v1 /* 18A708 8025BE28 000211C3 */ sra $v0, $v0, 7 /* 18A70C 8025BE2C 00031FC3 */ sra $v1, $v1, 31 /* 18A710 8025BE30 00432023 */ subu $a0, $v0, $v1 /* 18A714 8025BE34 30E300FF */ andi $v1, $a3, 0xFF /* 18A718 8025BE38 00031AC0 */ sll $v1, $v1, 11 /* 18A71C 8025BE3C 30A200FF */ andi $v0, $a1, 0xFF /* 18A720 8025BE40 00021180 */ sll $v0, $v0, 6 /* 18A724 8025BE44 00621825 */ or $v1, $v1, $v0 /* 18A728 8025BE48 308200FF */ andi $v0, $a0, 0xFF /* 18A72C 8025BE4C 00021040 */ sll $v0, $v0, 1 /* 18A730 8025BE50 00621825 */ or $v1, $v1, $v0 /* 18A734 8025BE54 00C33025 */ or $a2, $a2, $v1 /* 18A738 8025BE58 A5A60000 */ sh $a2, 0x0($t5) /* 18A73C 8025BE5C 29620010 */ slti $v0, $t3, 0x10 /* 18A740 8025BE60 1440FFC0 */ bnez $v0, .L8025BD64 /* 18A744 8025BE64 25AD0002 */ addiu $t5, $t5, 0x2 /* 18A748 8025BE68 330300FF */ andi $v1, $t8, 0xFF D_8025BE6C: /* 18A74C 8025BE6C 240200FF */ addiu $v0, $zero, 0xFF /* 18A750 8025BE70 14620004 */ bne $v1, $v0, .L8025BE84 /* 18A754 8025BE74 24020002 */ addiu $v0, $zero, 0x2 /* 18A758 8025BE78 96030748 */ lhu $v1, 0x748($s0) /* 18A75C 8025BE7C A20206C2 */ sb $v0, 0x6C2($s0) /* 18A760 8025BE80 A60306C8 */ sh $v1, 0x6C8($s0) .L8025BE84: /* 18A764 8025BE84 820306C2 */ lb $v1, 0x6C2($s0) /* 18A768 8025BE88 24020002 */ addiu $v0, $zero, 0x2 .L8025BE8C: /* 18A76C 8025BE8C 10620005 */ beq $v1, $v0, .L8025BEA4 /* 18A770 8025BE90 24020003 */ addiu $v0, $zero, 0x3 /* 18A774 8025BE94 1062000C */ beq $v1, $v0, .L8025BEC8 /* 18A778 8025BE98 00000000 */ nop /* 18A77C 8025BE9C 0809702D */ j .L8025C0B4 /* 18A780 8025BEA0 00000000 */ nop .L8025BEA4: /* 18A784 8025BEA4 16200083 */ bnez $s1, .L8025C0B4 /* 18A788 8025BEA8 00000000 */ nop /* 18A78C 8025BEAC 860206C8 */ lh $v0, 0x6C8($s0) /* 18A790 8025BEB0 960306C8 */ lhu $v1, 0x6C8($s0) /* 18A794 8025BEB4 1440007E */ bnez $v0, .L8025C0B0 /* 18A798 8025BEB8 2462FFFF */ addiu $v0, $v1, -0x1 /* 18A79C 8025BEBC 24020003 */ addiu $v0, $zero, 0x3 /* 18A7A0 8025BEC0 A60006CA */ sh $zero, 0x6CA($s0) /* 18A7A4 8025BEC4 A20206C2 */ sb $v0, 0x6C2($s0) .L8025BEC8: /* 18A7A8 8025BEC8 16200018 */ bnez $s1, .L8025BF2C /* 18A7AC 8025BECC 3C0651EB */ lui $a2, (0x51EB851F >> 16) /* 18A7B0 8025BED0 8602074A */ lh $v0, 0x74A($s0) /* 18A7B4 8025BED4 24036400 */ addiu $v1, $zero, 0x6400 /* 18A7B8 8025BED8 14400002 */ bnez $v0, .L8025BEE4 /* 18A7BC 8025BEDC 0062001A */ div $zero, $v1, $v0 /* 18A7C0 8025BEE0 0007000D */ break 7 .L8025BEE4: /* 18A7C4 8025BEE4 2401FFFF */ addiu $at, $zero, -0x1 /* 18A7C8 8025BEE8 14410004 */ bne $v0, $at, .L8025BEFC /* 18A7CC 8025BEEC 3C018000 */ lui $at, (0x80000000 >> 16) /* 18A7D0 8025BEF0 14610002 */ bne $v1, $at, .L8025BEFC /* 18A7D4 8025BEF4 00000000 */ nop /* 18A7D8 8025BEF8 0006000D */ break 6 .L8025BEFC: /* 18A7DC 8025BEFC 00001812 */ mflo $v1 /* 18A7E0 8025BF00 960206CA */ lhu $v0, 0x6CA($s0) /* 18A7E4 8025BF04 00431021 */ addu $v0, $v0, $v1 /* 18A7E8 8025BF08 A60206CA */ sh $v0, 0x6CA($s0) /* 18A7EC 8025BF0C 00021400 */ sll $v0, $v0, 16 /* 18A7F0 8025BF10 00021403 */ sra $v0, $v0, 16 /* 18A7F4 8025BF14 2842639D */ slti $v0, $v0, 0x639D /* 18A7F8 8025BF18 14400005 */ bnez $v0, .L8025BF30 /* 18A7FC 8025BF1C 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) /* 18A800 8025BF20 2402639C */ addiu $v0, $zero, 0x639C /* 18A804 8025BF24 A60206CA */ sh $v0, 0x6CA($s0) /* 18A808 8025BF28 3C0651EB */ lui $a2, (0x51EB851F >> 16) .L8025BF2C: /* 18A80C 8025BF2C 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) .L8025BF30: /* 18A810 8025BF30 0200682D */ daddu $t5, $s0, $zero /* 18A814 8025BF34 0000582D */ daddu $t3, $zero, $zero /* 18A818 8025BF38 3C0F8080 */ lui $t7, (0x80808081 >> 16) /* 18A81C 8025BF3C 35EF8081 */ ori $t7, $t7, (0x80808081 & 0xFFFF) /* 18A820 8025BF40 86020742 */ lh $v0, 0x742($s0) /* 18A824 8025BF44 8E0506D0 */ lw $a1, 0x6D0($s0) /* 18A828 8025BF48 960306CA */ lhu $v1, 0x6CA($s0) /* 18A82C 8025BF4C 00021080 */ sll $v0, $v0, 2 /* 18A830 8025BF50 00451021 */ addu $v0, $v0, $a1 /* 18A834 8025BF54 00031C00 */ sll $v1, $v1, 16 /* 18A838 8025BF58 00032403 */ sra $a0, $v1, 16 /* 18A83C 8025BF5C 8C4A0000 */ lw $t2, 0x0($v0) /* 18A840 8025BF60 86020740 */ lh $v0, 0x740($s0) /* 18A844 8025BF64 00860018 */ mult $a0, $a2 /* 18A848 8025BF68 00021080 */ sll $v0, $v0, 2 /* 18A84C 8025BF6C 00451021 */ addu $v0, $v0, $a1 /* 18A850 8025BF70 8C490000 */ lw $t1, 0x0($v0) /* 18A854 8025BF74 00031FC3 */ sra $v1, $v1, 31 D_8025BF78: /* 18A858 8025BF78 AE1006D4 */ sw $s0, 0x6D4($s0) /* 18A85C 8025BF7C 0000C810 */ mfhi $t9 /* 18A860 8025BF80 00191143 */ sra $v0, $t9, 5 /* 18A864 8025BF84 0043C023 */ subu $t8, $v0, $v1 /* 18A868 8025BF88 330C00FF */ andi $t4, $t8, 0xFF /* 18A86C 8025BF8C 240200FF */ addiu $v0, $zero, 0xFF /* 18A870 8025BF90 004C7023 */ subu $t6, $v0, $t4 .L8025BF94: /* 18A874 8025BF94 95430000 */ lhu $v1, 0x0($t2) /* 18A878 8025BF98 000312C2 */ srl $v0, $v1, 11 /* 18A87C 8025BF9C 004E0018 */ mult $v0, $t6 /* 18A880 8025BFA0 95240000 */ lhu $a0, 0x0($t1) /* 18A884 8025BFA4 00002812 */ mflo $a1 /* 18A888 8025BFA8 000412C2 */ srl $v0, $a0, 11 /* 18A88C 8025BFAC 00000000 */ nop /* 18A890 8025BFB0 004C0018 */ mult $v0, $t4 /* 18A894 8025BFB4 00004012 */ mflo $t0 /* 18A898 8025BFB8 00A82821 */ addu $a1, $a1, $t0 /* 18A89C 8025BFBC 00000000 */ nop /* 18A8A0 8025BFC0 00AF0018 */ mult $a1, $t7 /* 18A8A4 8025BFC4 00008810 */ mfhi $s1 /* 18A8A8 8025BFC8 00031182 */ srl $v0, $v1, 6 /* 18A8AC 8025BFCC 3042001F */ andi $v0, $v0, 0x1F /* 18A8B0 8025BFD0 004E0018 */ mult $v0, $t6 /* 18A8B4 8025BFD4 00004012 */ mflo $t0 /* 18A8B8 8025BFD8 00041182 */ srl $v0, $a0, 6 /* 18A8BC 8025BFDC 3042001F */ andi $v0, $v0, 0x1F /* 18A8C0 8025BFE0 004C0018 */ mult $v0, $t4 /* 18A8C4 8025BFE4 00003812 */ mflo $a3 /* 18A8C8 8025BFE8 00031842 */ srl $v1, $v1, 1 /* 18A8CC 8025BFEC 3063001F */ andi $v1, $v1, 0x1F /* 18A8D0 8025BFF0 006E0018 */ mult $v1, $t6 /* 18A8D4 8025BFF4 00001812 */ mflo $v1 /* 18A8D8 8025BFF8 00042042 */ srl $a0, $a0, 1 /* 18A8DC 8025BFFC 3084001F */ andi $a0, $a0, 0x1F /* 18A8E0 8025C000 008C0018 */ mult $a0, $t4 /* 18A8E4 8025C004 254A0002 */ addiu $t2, $t2, 0x2 /* 18A8E8 8025C008 91260001 */ lbu $a2, 0x1($t1) /* 18A8EC 8025C00C 25290002 */ addiu $t1, $t1, 0x2 /* 18A8F0 8025C010 00009812 */ mflo $s3 /* 18A8F4 8025C014 256B0001 */ addiu $t3, $t3, 0x1 /* 18A8F8 8025C018 01072021 */ addu $a0, $t0, $a3 /* 18A8FC 8025C01C 008F0018 */ mult $a0, $t7 /* 18A900 8025C020 30C60001 */ andi $a2, $a2, 0x1 /* 18A904 8025C024 02251021 */ addu $v0, $s1, $a1 /* 18A908 8025C028 000211C3 */ sra $v0, $v0, 7 /* 18A90C 8025C02C 00052FC3 */ sra $a1, $a1, 31 /* 18A910 8025C030 00004010 */ mfhi $t0 /* 18A914 8025C034 00453823 */ subu $a3, $v0, $a1 /* 18A918 8025C038 00731821 */ addu $v1, $v1, $s3 /* 18A91C 8025C03C 006F0018 */ mult $v1, $t7 /* 18A920 8025C040 01041021 */ addu $v0, $t0, $a0 /* 18A924 8025C044 000211C3 */ sra $v0, $v0, 7 /* 18A928 8025C048 000427C3 */ sra $a0, $a0, 31 /* 18A92C 8025C04C 00442823 */ subu $a1, $v0, $a0 /* 18A930 8025C050 00008810 */ mfhi $s1 /* 18A934 8025C054 02231021 */ addu $v0, $s1, $v1 /* 18A938 8025C058 000211C3 */ sra $v0, $v0, 7 /* 18A93C 8025C05C 00031FC3 */ sra $v1, $v1, 31 /* 18A940 8025C060 00432023 */ subu $a0, $v0, $v1 /* 18A944 8025C064 30E300FF */ andi $v1, $a3, 0xFF /* 18A948 8025C068 00031AC0 */ sll $v1, $v1, 11 /* 18A94C 8025C06C 30A200FF */ andi $v0, $a1, 0xFF /* 18A950 8025C070 00021180 */ sll $v0, $v0, 6 /* 18A954 8025C074 00621825 */ or $v1, $v1, $v0 /* 18A958 8025C078 308200FF */ andi $v0, $a0, 0xFF /* 18A95C 8025C07C 00021040 */ sll $v0, $v0, 1 /* 18A960 8025C080 00621825 */ or $v1, $v1, $v0 /* 18A964 8025C084 00C33025 */ or $a2, $a2, $v1 /* 18A968 8025C088 A5A60000 */ sh $a2, 0x0($t5) /* 18A96C 8025C08C 29620010 */ slti $v0, $t3, 0x10 /* 18A970 8025C090 1440FFC0 */ bnez $v0, .L8025BF94 /* 18A974 8025C094 25AD0002 */ addiu $t5, $t5, 0x2 /* 18A978 8025C098 330300FF */ andi $v1, $t8, 0xFF /* 18A97C 8025C09C 240200FF */ addiu $v0, $zero, 0xFF /* 18A980 8025C0A0 14620004 */ bne $v1, $v0, .L8025C0B4 /* 18A984 8025C0A4 00000000 */ nop /* 18A988 8025C0A8 96020744 */ lhu $v0, 0x744($s0) /* 18A98C 8025C0AC A20006C2 */ sb $zero, 0x6C2($s0) .L8025C0B0: /* 18A990 8025C0B0 A60206C8 */ sh $v0, 0x6C8($s0) .L8025C0B4: /* 18A994 8025C0B4 820306C2 */ lb $v1, 0x6C2($s0) /* 18A998 8025C0B8 28620004 */ slti $v0, $v1, 0x4 /* 18A99C 8025C0BC 1040000D */ beqz $v0, .L8025C0F4 /* 18A9A0 8025C0C0 00000000 */ nop /* 18A9A4 8025C0C4 0460000B */ bltz $v1, .L8025C0F4 /* 18A9A8 8025C0C8 00000000 */ nop /* 18A9AC 8025C0CC 16800006 */ bnez $s4, .L8025C0E8 D_8025C0D0: /* 18A9B0 8025C0D0 0240202D */ daddu $a0, $s2, $zero /* 18A9B4 8025C0D4 02A0282D */ daddu $a1, $s5, $zero /* 18A9B8 8025C0D8 0C096657 */ jal func_8025995C /* 18A9BC 8025C0DC 02C0302D */ daddu $a2, $s6, $zero /* 18A9C0 8025C0E0 0809703D */ j .L8025C0F4 D_8025C0E4: /* 18A9C4 8025C0E4 00000000 */ nop .L8025C0E8: /* 18A9C8 8025C0E8 02A0282D */ daddu $a1, $s5, $zero /* 18A9CC 8025C0EC 0C0965B0 */ jal func_802596C0 /* 18A9D0 8025C0F0 02C0302D */ daddu $a2, $s6, $zero .L8025C0F4: /* 18A9D4 8025C0F4 8FBF0030 */ lw $ra, 0x30($sp) /* 18A9D8 8025C0F8 8FB7002C */ lw $s7, 0x2C($sp) /* 18A9DC 8025C0FC 8FB60028 */ lw $s6, 0x28($sp) /* 18A9E0 8025C100 8FB50024 */ lw $s5, 0x24($sp) /* 18A9E4 8025C104 8FB40020 */ lw $s4, 0x20($sp) /* 18A9E8 8025C108 8FB3001C */ lw $s3, 0x1C($sp) /* 18A9EC 8025C10C 8FB20018 */ lw $s2, 0x18($sp) /* 18A9F0 8025C110 8FB10014 */ lw $s1, 0x14($sp) /* 18A9F4 8025C114 8FB00010 */ lw $s0, 0x10($sp) /* 18A9F8 8025C118 03E00008 */ jr $ra /* 18A9FC 8025C11C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void render_with_pal_blending(b32 isNpcSprite, ActorPart* part, s32 yaw, b32 hasDifferentIntervals, Matrix4f mtx, b32 skipAnimation) { DecorationTable* decor = part->decorationTable; PAL_PTR color1; PAL_PTR color2; PAL_PTR outColor; s32 i, j; u8 blendAlpha; u8 r2, g2, b2, a1; u8 r1, g1, b1; if (decor->resetPalAdjust != 0) { if (isNpcSprite == SPRITE_MODE_PLAYER) { decor->originalPalettesList = spr_get_player_palettes(part->currentAnimation >> 16); decor->originalPalettesCount = 0; while ((s32)decor->originalPalettesList[decor->originalPalettesCount] != -1) { decor->originalPalettesCount++; } } else { decor->originalPalettesList = spr_get_npc_palettes(part->currentAnimation >> 16); decor->originalPalettesCount = 0; while ((s32)decor->originalPalettesList[decor->originalPalettesCount] != -1) { decor->originalPalettesCount++; } } if (decor->resetPalAdjust == 1) { decor->palAnimState = 0; decor->palBlendAlpha = 0; } else { decor->palAnimState = 0; decor->palBlendAlpha = 255; } for (i = 0; i < decor->originalPalettesCount; i++) { color2 = decor->originalPalettesList[i]; color1 = decor->copiedPalettes[0][i]; decor->adjustedPalettes[i] = color1; if (color2 != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *color1++ = *color2++; } } } if (!hasDifferentIntervals) { decor->palswapTimeAtoB = decor->palswapTimeHoldA; decor->palswapTimeHoldB = decor->palswapTimeAtoB; decor->palswapTimeBtoA = decor->palswapTimeAtoB; decor->palswapTimeHoldA = 0; } decor->nextPalTime = decor->palswapTimeHoldA; decor->palBlendAlpha = 0; decor->palAnimState = PAL_SWAP_HOLD_A; decor->resetPalAdjust = FALSE; } // blending from A -> B switch (decor->palAnimState) { case PAL_SWAP_HOLD_A: if (skipAnimation) { break; } if (decor->nextPalTime != 0) { decor->nextPalTime--; break; } decor->palBlendAlpha = 0; decor->palAnimState = PAL_SWAP_A_TO_B; // fallthrough case PAL_SWAP_A_TO_B: if (!skipAnimation) { decor->palBlendAlpha += 25600 / decor->palswapTimeAtoB; if (decor->palBlendAlpha > 255 * 100) { decor->palBlendAlpha = 255 * 100; } } blendAlpha = decor->palBlendAlpha / 100; // blend two palettes color2 = decor->originalPalettesList[decor->blendPalA]; color1 = decor->originalPalettesList[decor->blendPalB]; outColor = decor->adjustedPalettes[0] = decor->copiedPalettes[0][0]; for (j = 0; j < SPR_PAL_SIZE; j++) { r2 = UNPACK_PAL_R(*color2); g2 = UNPACK_PAL_G(*color2); b2 = UNPACK_PAL_B(*color2); r1 = UNPACK_PAL_R(*color1); g1 = UNPACK_PAL_G(*color1); b1 = UNPACK_PAL_B(*color1); a1 = UNPACK_PAL_A(*color1); color2++; color1++; r1 = LERP_COMPONENT(r2, r1, blendAlpha); g1 = LERP_COMPONENT(g2, g1, blendAlpha); b1 = LERP_COMPONENT(b2, b1, blendAlpha); *outColor++ = PACK_PAL_RGBA(r1, g1, b1, a1); } if (blendAlpha == 255) { decor->palAnimState = PAL_SWAP_HOLD_B; decor->nextPalTime = decor->palswapTimeHoldB; } break; } // blending from B -> A switch (decor->palAnimState) { case PAL_SWAP_HOLD_B: if (skipAnimation) { break; } if (decor->nextPalTime != 0) { decor->nextPalTime--; break; } decor->palBlendAlpha = 0; decor->palAnimState = PAL_SWAP_B_TO_A; // fallthrough case PAL_SWAP_B_TO_A: if (!skipAnimation) { decor->palBlendAlpha += 25600 / decor->palswapTimeBtoA; if (decor->palBlendAlpha > 255 * 100) { decor->palBlendAlpha = 255 * 100; } } blendAlpha = decor->palBlendAlpha / 100; // blend two palettes color2 = decor->originalPalettesList[decor->blendPalB]; color1 = decor->originalPalettesList[decor->blendPalA]; outColor = decor->copiedPalettes[0][0]; decor->adjustedPalettes[0] = outColor; for (j = 0; j < SPR_PAL_SIZE; j++) { r2 = UNPACK_PAL_R(*color2); g2 = UNPACK_PAL_G(*color2); b2 = UNPACK_PAL_B(*color2); r1 = UNPACK_PAL_R(*color1); g1 = UNPACK_PAL_G(*color1); b1 = UNPACK_PAL_B(*color1); a1 = UNPACK_PAL_A(*color1); color2++; color1++; r1 = LERP_COMPONENT(r2, r1, blendAlpha); g1 = LERP_COMPONENT(g2, g1, blendAlpha); b1 = LERP_COMPONENT(b2, b1, blendAlpha); *outColor++ = PACK_PAL_RGBA(r1, g1, b1, a1); } if (blendAlpha == 255) { decor->palAnimState = PAL_SWAP_HOLD_A; decor->nextPalTime = decor->palswapTimeHoldA; } break; } switch (decor->palAnimState) { case PAL_SWAP_HOLD_A: case PAL_SWAP_A_TO_B: case PAL_SWAP_HOLD_B: case PAL_SWAP_B_TO_A: if (isNpcSprite == SPRITE_MODE_PLAYER) { func_8025995C(part, yaw, mtx); } else { func_802596C0(part, yaw, mtx); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel star_outline_appendGfx /* 41384C E01264EC 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 413850 E01264F0 0080302D */ daddu $a2, $a0, $zero /* 413854 E01264F4 AFBF00D4 */ sw $ra, 0xD4($sp) /* 413858 E01264F8 AFBE00D0 */ sw $fp, 0xD0($sp) /* 41385C E01264FC AFB700CC */ sw $s7, 0xCC($sp) /* 413860 E0126500 AFB600C8 */ sw $s6, 0xC8($sp) /* 413864 E0126504 AFB500C4 */ sw $s5, 0xC4($sp) /* 413868 E0126508 AFB400C0 */ sw $s4, 0xC0($sp) /* 41386C E012650C AFB300BC */ sw $s3, 0xBC($sp) /* 413870 E0126510 AFB200B8 */ sw $s2, 0xB8($sp) /* 413874 E0126514 AFB100B4 */ sw $s1, 0xB4($sp) /* 413878 E0126518 AFB000B0 */ sw $s0, 0xB0($sp) /* 41387C E012651C F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 413880 E0126520 8CD3000C */ lw $s3, 0xC($a2) /* 413884 E0126524 8E690024 */ lw $t1, 0x24($s3) /* 413888 E0126528 8E760018 */ lw $s6, 0x18($s3) /* 41388C E012652C 8E77001C */ lw $s7, 0x1C($s3) /* 413890 E0126530 8E7E0020 */ lw $fp, 0x20($s3) /* 413894 E0126534 AFA900A0 */ sw $t1, 0xA0($sp) /* 413898 E0126538 8E690028 */ lw $t1, 0x28($s3) /* 41389C E012653C AFA900A4 */ sw $t1, 0xA4($sp) /* 4138A0 E0126540 8E69002C */ lw $t1, 0x2C($s3) /* 4138A4 E0126544 AFA900A8 */ sw $t1, 0xA8($sp) /* 4138A8 E0126548 8E690030 */ lw $t1, 0x30($s3) /* 4138AC E012654C 2AC20100 */ slti $v0, $s6, 0x100 /* 4138B0 E0126550 AFA900AC */ sw $t1, 0xAC($sp) /* 4138B4 E0126554 8E750034 */ lw $s5, 0x34($s3) /* 4138B8 E0126558 50400001 */ beql $v0, $zero, .LE0126560 /* 4138BC E012655C 241600FF */ addiu $s6, $zero, 0xFF .LE0126560: /* 4138C0 E0126560 2AE20100 */ slti $v0, $s7, 0x100 /* 4138C4 E0126564 50400001 */ beql $v0, $zero, .LE012656C /* 4138C8 E0126568 241700FF */ addiu $s7, $zero, 0xFF .LE012656C: /* 4138CC E012656C 2BC20100 */ slti $v0, $fp, 0x100 /* 4138D0 E0126570 50400001 */ beql $v0, $zero, .LE0126578 /* 4138D4 E0126574 241E00FF */ addiu $fp, $zero, 0xFF .LE0126578: /* 4138D8 E0126578 8FA900A0 */ lw $t1, 0xA0($sp) /* 4138DC E012657C 29220100 */ slti $v0, $t1, 0x100 /* 4138E0 E0126580 14400002 */ bnez $v0, .LE012658C /* 4138E4 E0126584 240900FF */ addiu $t1, $zero, 0xFF /* 4138E8 E0126588 AFA900A0 */ sw $t1, 0xA0($sp) .LE012658C: /* 4138EC E012658C 8FA900A4 */ lw $t1, 0xA4($sp) /* 4138F0 E0126590 29220100 */ slti $v0, $t1, 0x100 /* 4138F4 E0126594 14400002 */ bnez $v0, .LE01265A0 /* 4138F8 E0126598 240900FF */ addiu $t1, $zero, 0xFF /* 4138FC E012659C AFA900A4 */ sw $t1, 0xA4($sp) .LE01265A0: /* 413900 E01265A0 8FA900A8 */ lw $t1, 0xA8($sp) /* 413904 E01265A4 29220100 */ slti $v0, $t1, 0x100 /* 413908 E01265A8 14400002 */ bnez $v0, .LE01265B4 /* 41390C E01265AC 240900FF */ addiu $t1, $zero, 0xFF /* 413910 E01265B0 AFA900A8 */ sw $t1, 0xA8($sp) .LE01265B4: /* 413914 E01265B4 8FA900AC */ lw $t1, 0xAC($sp) /* 413918 E01265B8 29220100 */ slti $v0, $t1, 0x100 /* 41391C E01265BC 14400003 */ bnez $v0, .LE01265CC /* 413920 E01265C0 2AA20100 */ slti $v0, $s5, 0x100 /* 413924 E01265C4 240900FF */ addiu $t1, $zero, 0xFF /* 413928 E01265C8 AFA900AC */ sw $t1, 0xAC($sp) .LE01265CC: /* 41392C E01265CC 50400001 */ beql $v0, $zero, .LE01265D4 /* 413930 E01265D0 241500FF */ addiu $s5, $zero, 0xFF .LE01265D4: /* 413934 E01265D4 06C20001 */ bltzl $s6, .LE01265DC /* 413938 E01265D8 0000B02D */ daddu $s6, $zero, $zero .LE01265DC: /* 41393C E01265DC 06E20001 */ bltzl $s7, .LE01265E4 /* 413940 E01265E0 0000B82D */ daddu $s7, $zero, $zero .LE01265E4: /* 413944 E01265E4 07C20001 */ bltzl $fp, .LE01265EC /* 413948 E01265E8 0000F02D */ daddu $fp, $zero, $zero .LE01265EC: /* 41394C E01265EC 8FA900A0 */ lw $t1, 0xA0($sp) /* 413950 E01265F0 05220001 */ bltzl $t1, .LE01265F8 /* 413954 E01265F4 AFA000A0 */ sw $zero, 0xA0($sp) .LE01265F8: /* 413958 E01265F8 8FA900A4 */ lw $t1, 0xA4($sp) /* 41395C E01265FC 05220001 */ bltzl $t1, .LE0126604 /* 413960 E0126600 AFA000A4 */ sw $zero, 0xA4($sp) .LE0126604: /* 413964 E0126604 8FA900A8 */ lw $t1, 0xA8($sp) /* 413968 E0126608 05220001 */ bltzl $t1, .LE0126610 /* 41396C E012660C AFA000A8 */ sw $zero, 0xA8($sp) .LE0126610: /* 413970 E0126610 8FA900AC */ lw $t1, 0xAC($sp) /* 413974 E0126614 05220001 */ bltzl $t1, .LE012661C /* 413978 E0126618 AFA000AC */ sw $zero, 0xAC($sp) .LE012661C: /* 41397C E012661C 06A20001 */ bltzl $s5, .LE0126624 /* 413980 E0126620 0000A82D */ daddu $s5, $zero, $zero .LE0126624: /* 413984 E0126624 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 413988 E0126628 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 41398C E012662C 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 413990 E0126630 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 413994 E0126634 8E840000 */ lw $a0, 0x0($s4) /* 413998 E0126638 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 41399C E012663C 0080182D */ daddu $v1, $a0, $zero /* 4139A0 E0126640 24840008 */ addiu $a0, $a0, 0x8 /* 4139A4 E0126644 AE840000 */ sw $a0, 0x0($s4) /* 4139A8 E0126648 AC620000 */ sw $v0, 0x0($v1) /* 4139AC E012664C AC600004 */ sw $zero, 0x4($v1) /* 4139B0 E0126650 AC850000 */ sw $a1, 0x0($a0) /* 4139B4 E0126654 8CC30010 */ lw $v1, 0x10($a2) /* 4139B8 E0126658 24820008 */ addiu $v0, $a0, 0x8 /* 4139BC E012665C AE820000 */ sw $v0, 0x0($s4) /* 4139C0 E0126660 8C63001C */ lw $v1, 0x1C($v1) /* 4139C4 E0126664 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 4139C8 E0126668 AC820008 */ sw $v0, 0x8($a0) /* 4139CC E012666C 3C028000 */ lui $v0, (0x80000000 >> 16) /* 4139D0 E0126670 00621821 */ addu $v1, $v1, $v0 /* 4139D4 E0126674 AC830004 */ sw $v1, 0x4($a0) /* 4139D8 E0126678 3C03E012 */ lui $v1, (0xE0126BC8 >> 16) /* 4139DC E012667C 8C636BC8 */ lw $v1, (0xE0126BC8 & 0xFFFF)($v1) /* 4139E0 E0126680 24820010 */ addiu $v0, $a0, 0x10 /* 4139E4 E0126684 AE820000 */ sw $v0, 0x0($s4) /* 4139E8 E0126688 12A0008F */ beqz $s5, .LE01268C8 /* 4139EC E012668C AC83000C */ sw $v1, 0xC($a0) /* 4139F0 E0126690 4480A000 */ mtc1 $zero, $f20 /* 4139F4 E0126694 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 4139F8 E0126698 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 4139FC E012669C C6600054 */ lwc1 $f0, 0x54($s3) /* 413A00 E01266A0 3C01E012 */ lui $at, (0xE0126C30 >> 16) /* 413A04 E01266A4 D4226C30 */ ldc1 $f2, (0xE0126C30 & 0xFFFF)($at) /* 413A08 E01266A8 00031080 */ sll $v0, $v1, 2 /* 413A0C E01266AC 46000021 */ cvt.d.s $f0, $f0 /* 413A10 E01266B0 00431021 */ addu $v0, $v0, $v1 /* 413A14 E01266B4 00021080 */ sll $v0, $v0, 2 /* 413A18 E01266B8 46220002 */ mul.d $f0, $f0, $f2 /* 413A1C E01266BC 00000000 */ nop /* 413A20 E01266C0 00431023 */ subu $v0, $v0, $v1 /* 413A24 E01266C4 000218C0 */ sll $v1, $v0, 3 /* 413A28 E01266C8 00431021 */ addu $v0, $v0, $v1 /* 413A2C E01266CC 000210C0 */ sll $v0, $v0, 3 /* 413A30 E01266D0 4405A000 */ mfc1 $a1, $f20 /* 413A34 E01266D4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 413A38 E01266D8 00220821 */ addu $at, $at, $v0 /* 413A3C E01266DC C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 413A40 E01266E0 4407A000 */ mfc1 $a3, $f20 /* 413A44 E01266E4 46001087 */ neg.s $f2, $f2 /* 413A48 E01266E8 44061000 */ mfc1 $a2, $f2 /* 413A4C E01266EC 46200020 */ cvt.s.d $f0, $f0 /* 413A50 E01266F0 E7A00010 */ swc1 $f0, 0x10($sp) /* 413A54 E01266F4 C6600004 */ lwc1 $f0, 0x4($s3) /* 413A58 E01266F8 E7A00014 */ swc1 $f0, 0x14($sp) /* 413A5C E01266FC C6600008 */ lwc1 $f0, 0x8($s3) /* 413A60 E0126700 27A40020 */ addiu $a0, $sp, 0x20 /* 413A64 E0126704 E7A00018 */ swc1 $f0, 0x18($sp) /* 413A68 E0126708 C660000C */ lwc1 $f0, 0xC($s3) /* 413A6C E012670C 3C120001 */ lui $s2, (0x11630 >> 16) /* 413A70 E0126710 0C080180 */ jal shim_guPositionF /* 413A74 E0126714 E7A0001C */ swc1 $f0, 0x1C($sp) /* 413A78 E0126718 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 413A7C E012671C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 413A80 E0126720 44810000 */ mtc1 $at, $f0 /* 413A84 E0126724 27B00060 */ addiu $s0, $sp, 0x60 /* 413A88 E0126728 E7B40014 */ swc1 $f20, 0x14($sp) /* 413A8C E012672C E7B40018 */ swc1 $f20, 0x18($sp) /* 413A90 E0126730 E7B4001C */ swc1 $f20, 0x1C($sp) /* 413A94 E0126734 E7A00010 */ swc1 $f0, 0x10($sp) /* 413A98 E0126738 8E650048 */ lw $a1, 0x48($s3) /* 413A9C E012673C 8E66004C */ lw $a2, 0x4C($s3) /* 413AA0 E0126740 8E670050 */ lw $a3, 0x50($s3) /* 413AA4 E0126744 0C080180 */ jal shim_guPositionF /* 413AA8 E0126748 0200202D */ daddu $a0, $s0, $zero /* 413AAC E012674C 0200202D */ daddu $a0, $s0, $zero /* 413AB0 E0126750 27A50020 */ addiu $a1, $sp, 0x20 /* 413AB4 E0126754 0C080114 */ jal shim_guMtxCatF /* 413AB8 E0126758 00A0302D */ daddu $a2, $a1, $zero /* 413ABC E012675C 27A40020 */ addiu $a0, $sp, 0x20 /* 413AC0 E0126760 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 413AC4 E0126764 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 413AC8 E0126768 3C11800A */ lui $s1, %hi(gDisplayContext) /* 413ACC E012676C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 413AD0 E0126770 96050000 */ lhu $a1, 0x0($s0) /* 413AD4 E0126774 8E220000 */ lw $v0, 0x0($s1) /* 413AD8 E0126778 00052980 */ sll $a1, $a1, 6 /* 413ADC E012677C 00B22821 */ addu $a1, $a1, $s2 /* 413AE0 E0126780 0C080118 */ jal shim_guMtxF2L /* 413AE4 E0126784 00452821 */ addu $a1, $v0, $a1 /* 413AE8 E0126788 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 413AEC E012678C 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 413AF0 E0126790 8E860000 */ lw $a2, 0x0($s4) /* 413AF4 E0126794 96040000 */ lhu $a0, 0x0($s0) /* 413AF8 E0126798 00C0282D */ daddu $a1, $a2, $zero /* 413AFC E012679C 24C60008 */ addiu $a2, $a2, 0x8 /* 413B00 E01267A0 AE860000 */ sw $a2, 0x0($s4) /* 413B04 E01267A4 ACA20000 */ sw $v0, 0x0($a1) /* 413B08 E01267A8 3082FFFF */ andi $v0, $a0, 0xFFFF /* 413B0C E01267AC 00021180 */ sll $v0, $v0, 6 /* 413B10 E01267B0 8E230000 */ lw $v1, 0x0($s1) /* 413B14 E01267B4 00521021 */ addu $v0, $v0, $s2 /* 413B18 E01267B8 00621821 */ addu $v1, $v1, $v0 /* 413B1C E01267BC ACA30004 */ sw $v1, 0x4($a1) /* 413B20 E01267C0 86620000 */ lh $v0, 0x0($s3) /* 413B24 E01267C4 24840001 */ addiu $a0, $a0, 0x1 /* 413B28 E01267C8 14400006 */ bnez $v0, .LE01267E4 /* 413B2C E01267CC A6040000 */ sh $a0, 0x0($s0) /* 413B30 E01267D0 3C04E200 */ lui $a0, (0xE200001C >> 16) /* 413B34 E01267D4 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 413B38 E01267D8 3C030050 */ lui $v1, (0x504340 >> 16) /* 413B3C E01267DC 080499FD */ j .LE01267F4 /* 413B40 E01267E0 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF) .LE01267E4: /* 413B44 E01267E4 3C04E200 */ lui $a0, (0xE200001C >> 16) /* 413B48 E01267E8 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 413B4C E01267EC 3C030050 */ lui $v1, (0x504B50 >> 16) /* 413B50 E01267F0 34634B50 */ ori $v1, $v1, (0x504B50 & 0xFFFF) .LE01267F4: /* 413B54 E01267F4 24C20008 */ addiu $v0, $a2, 0x8 /* 413B58 E01267F8 AE820000 */ sw $v0, 0x0($s4) /* 413B5C E01267FC ACC40000 */ sw $a0, 0x0($a2) /* 413B60 E0126800 ACC30004 */ sw $v1, 0x4($a2) /* 413B64 E0126804 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 413B68 E0126808 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 413B6C E012680C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 413B70 E0126810 00161E00 */ sll $v1, $s6, 24 /* 413B74 E0126814 00152843 */ sra $a1, $s5, 1 /* 413B78 E0126818 8CC40000 */ lw $a0, 0x0($a2) /* 413B7C E012681C 30A500FF */ andi $a1, $a1, 0xFF /* 413B80 E0126820 0080382D */ daddu $a3, $a0, $zero /* 413B84 E0126824 24840008 */ addiu $a0, $a0, 0x8 /* 413B88 E0126828 ACC40000 */ sw $a0, 0x0($a2) /* 413B8C E012682C ACE20000 */ sw $v0, 0x0($a3) /* 413B90 E0126830 32E200FF */ andi $v0, $s7, 0xFF /* 413B94 E0126834 00021400 */ sll $v0, $v0, 16 /* 413B98 E0126838 00621825 */ or $v1, $v1, $v0 /* 413B9C E012683C 33C200FF */ andi $v0, $fp, 0xFF /* 413BA0 E0126840 00021200 */ sll $v0, $v0, 8 /* 413BA4 E0126844 00621825 */ or $v1, $v1, $v0 /* 413BA8 E0126848 00651825 */ or $v1, $v1, $a1 /* 413BAC E012684C 24820008 */ addiu $v0, $a0, 0x8 /* 413BB0 E0126850 ACE30004 */ sw $v1, 0x4($a3) /* 413BB4 E0126854 ACC20000 */ sw $v0, 0x0($a2) /* 413BB8 E0126858 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 413BBC E012685C AC820000 */ sw $v0, 0x0($a0) /* 413BC0 E0126860 8FA900A4 */ lw $t1, 0xA4($sp) /* 413BC4 E0126864 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 413BC8 E0126868 00091E00 */ sll $v1, $t1, 24 /* 413BCC E012686C 8FA900A8 */ lw $t1, 0xA8($sp) /* 413BD0 E0126870 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 413BD4 E0126874 312200FF */ andi $v0, $t1, 0xFF /* 413BD8 E0126878 00021400 */ sll $v0, $v0, 16 /* 413BDC E012687C 8FA900AC */ lw $t1, 0xAC($sp) /* 413BE0 E0126880 00621825 */ or $v1, $v1, $v0 /* 413BE4 E0126884 312200FF */ andi $v0, $t1, 0xFF /* 413BE8 E0126888 00021200 */ sll $v0, $v0, 8 /* 413BEC E012688C 00621825 */ or $v1, $v1, $v0 /* 413BF0 E0126890 00651825 */ or $v1, $v1, $a1 /* 413BF4 E0126894 24820010 */ addiu $v0, $a0, 0x10 /* 413BF8 E0126898 AC830004 */ sw $v1, 0x4($a0) /* 413BFC E012689C ACC20000 */ sw $v0, 0x0($a2) /* 413C00 E01268A0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 413C04 E01268A4 AC820008 */ sw $v0, 0x8($a0) /* 413C08 E01268A8 3C03E012 */ lui $v1, (0xE0126BC4 >> 16) /* 413C0C E01268AC 8C636BC4 */ lw $v1, (0xE0126BC4 & 0xFFFF)($v1) /* 413C10 E01268B0 24820018 */ addiu $v0, $a0, 0x18 /* 413C14 E01268B4 ACC20000 */ sw $v0, 0x0($a2) /* 413C18 E01268B8 24020040 */ addiu $v0, $zero, 0x40 /* 413C1C E01268BC AC880010 */ sw $t0, 0x10($a0) /* 413C20 E01268C0 AC820014 */ sw $v0, 0x14($a0) /* 413C24 E01268C4 AC83000C */ sw $v1, 0xC($a0) .LE01268C8: /* 413C28 E01268C8 4480A000 */ mtc1 $zero, $f20 /* 413C2C E01268CC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 413C30 E01268D0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 413C34 E01268D4 C6600038 */ lwc1 $f0, 0x38($s3) /* 413C38 E01268D8 3C01E012 */ lui $at, (0xE0126C38 >> 16) /* 413C3C E01268DC D4226C38 */ ldc1 $f2, (0xE0126C38 & 0xFFFF)($at) /* 413C40 E01268E0 00031080 */ sll $v0, $v1, 2 /* 413C44 E01268E4 46000021 */ cvt.d.s $f0, $f0 /* 413C48 E01268E8 00431021 */ addu $v0, $v0, $v1 /* 413C4C E01268EC 00021080 */ sll $v0, $v0, 2 /* 413C50 E01268F0 46220002 */ mul.d $f0, $f0, $f2 /* 413C54 E01268F4 00000000 */ nop /* 413C58 E01268F8 00431023 */ subu $v0, $v0, $v1 /* 413C5C E01268FC 000218C0 */ sll $v1, $v0, 3 /* 413C60 E0126900 00431021 */ addu $v0, $v0, $v1 /* 413C64 E0126904 000210C0 */ sll $v0, $v0, 3 /* 413C68 E0126908 4405A000 */ mfc1 $a1, $f20 /* 413C6C E012690C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 413C70 E0126910 00220821 */ addu $at, $at, $v0 /* 413C74 E0126914 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 413C78 E0126918 4407A000 */ mfc1 $a3, $f20 /* 413C7C E012691C 46001087 */ neg.s $f2, $f2 /* 413C80 E0126920 44061000 */ mfc1 $a2, $f2 /* 413C84 E0126924 46200020 */ cvt.s.d $f0, $f0 /* 413C88 E0126928 E7A00010 */ swc1 $f0, 0x10($sp) /* 413C8C E012692C C6600004 */ lwc1 $f0, 0x4($s3) /* 413C90 E0126930 E7A00014 */ swc1 $f0, 0x14($sp) /* 413C94 E0126934 C6600008 */ lwc1 $f0, 0x8($s3) /* 413C98 E0126938 27A40020 */ addiu $a0, $sp, 0x20 /* 413C9C E012693C E7A00018 */ swc1 $f0, 0x18($sp) /* 413CA0 E0126940 C660000C */ lwc1 $f0, 0xC($s3) /* 413CA4 E0126944 3C120001 */ lui $s2, (0x11630 >> 16) /* 413CA8 E0126948 0C080180 */ jal shim_guPositionF /* 413CAC E012694C E7A0001C */ swc1 $f0, 0x1C($sp) /* 413CB0 E0126950 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 413CB4 E0126954 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 413CB8 E0126958 44810000 */ mtc1 $at, $f0 /* 413CBC E012695C 27B00060 */ addiu $s0, $sp, 0x60 /* 413CC0 E0126960 E7B40014 */ swc1 $f20, 0x14($sp) /* 413CC4 E0126964 E7B40018 */ swc1 $f20, 0x18($sp) /* 413CC8 E0126968 E7B4001C */ swc1 $f20, 0x1C($sp) /* 413CCC E012696C E7A00010 */ swc1 $f0, 0x10($sp) /* 413CD0 E0126970 8E65003C */ lw $a1, 0x3C($s3) /* 413CD4 E0126974 8E660040 */ lw $a2, 0x40($s3) /* 413CD8 E0126978 8E670044 */ lw $a3, 0x44($s3) /* 413CDC E012697C 0C080180 */ jal shim_guPositionF /* 413CE0 E0126980 0200202D */ daddu $a0, $s0, $zero /* 413CE4 E0126984 0200202D */ daddu $a0, $s0, $zero /* 413CE8 E0126988 27A50020 */ addiu $a1, $sp, 0x20 /* 413CEC E012698C 0C080114 */ jal shim_guMtxCatF /* 413CF0 E0126990 00A0302D */ daddu $a2, $a1, $zero /* 413CF4 E0126994 27A40020 */ addiu $a0, $sp, 0x20 /* 413CF8 E0126998 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 413CFC E012699C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 413D00 E01269A0 3C11800A */ lui $s1, %hi(gDisplayContext) /* 413D04 E01269A4 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 413D08 E01269A8 96050000 */ lhu $a1, 0x0($s0) /* 413D0C E01269AC 8E220000 */ lw $v0, 0x0($s1) /* 413D10 E01269B0 00052980 */ sll $a1, $a1, 6 /* 413D14 E01269B4 00B22821 */ addu $a1, $a1, $s2 /* 413D18 E01269B8 0C080118 */ jal shim_guMtxF2L /* 413D1C E01269BC 00452821 */ addu $a1, $v0, $a1 /* 413D20 E01269C0 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 413D24 E01269C4 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 413D28 E01269C8 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 413D2C E01269CC 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 413D30 E01269D0 8CC50000 */ lw $a1, 0x0($a2) /* 413D34 E01269D4 96020000 */ lhu $v0, 0x0($s0) /* 413D38 E01269D8 00A0202D */ daddu $a0, $a1, $zero /* 413D3C E01269DC 24A50008 */ addiu $a1, $a1, 0x8 /* 413D40 E01269E0 ACC50000 */ sw $a1, 0x0($a2) /* 413D44 E01269E4 AC830000 */ sw $v1, 0x0($a0) /* 413D48 E01269E8 24430001 */ addiu $v1, $v0, 0x1 /* 413D4C E01269EC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 413D50 E01269F0 00021180 */ sll $v0, $v0, 6 /* 413D54 E01269F4 A6030000 */ sh $v1, 0x0($s0) /* 413D58 E01269F8 8E230000 */ lw $v1, 0x0($s1) /* 413D5C E01269FC 00521021 */ addu $v0, $v0, $s2 /* 413D60 E0126A00 00621821 */ addu $v1, $v1, $v0 /* 413D64 E0126A04 12A0001A */ beqz $s5, .LE0126A70 /* 413D68 E0126A08 AC830004 */ sw $v1, 0x4($a0) /* 413D6C E0126A0C 86620000 */ lh $v0, 0x0($s3) /* 413D70 E0126A10 14400005 */ bnez $v0, .LE0126A28 /* 413D74 E0126A14 3C04E200 */ lui $a0, (0xE200001C >> 16) /* 413D78 E0126A18 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 413D7C E0126A1C 3C030050 */ lui $v1, (0x504340 >> 16) /* 413D80 E0126A20 08049A8D */ j .LE0126A34 /* 413D84 E0126A24 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF) .LE0126A28: /* 413D88 E0126A28 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 413D8C E0126A2C 3C030050 */ lui $v1, (0x504B50 >> 16) /* 413D90 E0126A30 34634B50 */ ori $v1, $v1, (0x504B50 & 0xFFFF) .LE0126A34: /* 413D94 E0126A34 24A20008 */ addiu $v0, $a1, 0x8 /* 413D98 E0126A38 ACC20000 */ sw $v0, 0x0($a2) /* 413D9C E0126A3C ACA40000 */ sw $a0, 0x0($a1) /* 413DA0 E0126A40 ACA30004 */ sw $v1, 0x4($a1) /* 413DA4 E0126A44 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 413DA8 E0126A48 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 413DAC E0126A4C 8CA30000 */ lw $v1, 0x0($a1) /* 413DB0 E0126A50 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 413DB4 E0126A54 0060202D */ daddu $a0, $v1, $zero /* 413DB8 E0126A58 AC820000 */ sw $v0, 0x0($a0) /* 413DBC E0126A5C 3C02E012 */ lui $v0, (0xE0126BC4 >> 16) /* 413DC0 E0126A60 8C426BC4 */ lw $v0, (0xE0126BC4 & 0xFFFF)($v0) /* 413DC4 E0126A64 24630008 */ addiu $v1, $v1, 0x8 /* 413DC8 E0126A68 ACA30000 */ sw $v1, 0x0($a1) /* 413DCC E0126A6C AC820004 */ sw $v0, 0x4($a0) .LE0126A70: /* 413DD0 E0126A70 86620000 */ lh $v0, 0x0($s3) /* 413DD4 E0126A74 14400008 */ bnez $v0, .LE0126A98 /* 413DD8 E0126A78 3C06E200 */ lui $a2, (0xE200001C >> 16) /* 413DDC E0126A7C 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF) /* 413DE0 E0126A80 3C050050 */ lui $a1, (0x5041C8 >> 16) /* 413DE4 E0126A84 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 413DE8 E0126A88 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 413DEC E0126A8C 8C820000 */ lw $v0, 0x0($a0) /* 413DF0 E0126A90 08049AAC */ j .LE0126AB0 /* 413DF4 E0126A94 34A541C8 */ ori $a1, $a1, (0x5041C8 & 0xFFFF) .LE0126A98: /* 413DF8 E0126A98 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF) /* 413DFC E0126A9C 3C050050 */ lui $a1, (0x5049D8 >> 16) /* 413E00 E0126AA0 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 413E04 E0126AA4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 413E08 E0126AA8 8C820000 */ lw $v0, 0x0($a0) /* 413E0C E0126AAC 34A549D8 */ ori $a1, $a1, (0x5049D8 & 0xFFFF) .LE0126AB0: /* 413E10 E0126AB0 0040182D */ daddu $v1, $v0, $zero /* 413E14 E0126AB4 24420008 */ addiu $v0, $v0, 0x8 /* 413E18 E0126AB8 AC820000 */ sw $v0, 0x0($a0) /* 413E1C E0126ABC AC660000 */ sw $a2, 0x0($v1) /* 413E20 E0126AC0 AC650004 */ sw $a1, 0x4($v1) /* 413E24 E0126AC4 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 413E28 E0126AC8 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 413E2C E0126ACC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 413E30 E0126AD0 8CA40000 */ lw $a0, 0x0($a1) /* 413E34 E0126AD4 00161E00 */ sll $v1, $s6, 24 /* 413E38 E0126AD8 0080302D */ daddu $a2, $a0, $zero /* 413E3C E0126ADC 24840008 */ addiu $a0, $a0, 0x8 /* 413E40 E0126AE0 ACA40000 */ sw $a0, 0x0($a1) /* 413E44 E0126AE4 ACC20000 */ sw $v0, 0x0($a2) /* 413E48 E0126AE8 32E200FF */ andi $v0, $s7, 0xFF /* 413E4C E0126AEC 00021400 */ sll $v0, $v0, 16 /* 413E50 E0126AF0 00621825 */ or $v1, $v1, $v0 /* 413E54 E0126AF4 33C200FF */ andi $v0, $fp, 0xFF /* 413E58 E0126AF8 00021200 */ sll $v0, $v0, 8 /* 413E5C E0126AFC 00621825 */ or $v1, $v1, $v0 /* 413E60 E0126B00 8FA900A0 */ lw $t1, 0xA0($sp) /* 413E64 E0126B04 24820008 */ addiu $v0, $a0, 0x8 /* 413E68 E0126B08 312700FF */ andi $a3, $t1, 0xFF /* 413E6C E0126B0C 00671825 */ or $v1, $v1, $a3 /* 413E70 E0126B10 ACC30004 */ sw $v1, 0x4($a2) /* 413E74 E0126B14 ACA20000 */ sw $v0, 0x0($a1) /* 413E78 E0126B18 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 413E7C E0126B1C AC820000 */ sw $v0, 0x0($a0) /* 413E80 E0126B20 8FA900A4 */ lw $t1, 0xA4($sp) /* 413E84 E0126B24 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 413E88 E0126B28 00091E00 */ sll $v1, $t1, 24 /* 413E8C E0126B2C 8FA900A8 */ lw $t1, 0xA8($sp) /* 413E90 E0126B30 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 413E94 E0126B34 312200FF */ andi $v0, $t1, 0xFF /* 413E98 E0126B38 00021400 */ sll $v0, $v0, 16 /* 413E9C E0126B3C 8FA900AC */ lw $t1, 0xAC($sp) /* 413EA0 E0126B40 00621825 */ or $v1, $v1, $v0 /* 413EA4 E0126B44 312200FF */ andi $v0, $t1, 0xFF /* 413EA8 E0126B48 00021200 */ sll $v0, $v0, 8 /* 413EAC E0126B4C 00621825 */ or $v1, $v1, $v0 /* 413EB0 E0126B50 00671825 */ or $v1, $v1, $a3 /* 413EB4 E0126B54 24820010 */ addiu $v0, $a0, 0x10 /* 413EB8 E0126B58 AC830004 */ sw $v1, 0x4($a0) /* 413EBC E0126B5C ACA20000 */ sw $v0, 0x0($a1) /* 413EC0 E0126B60 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 413EC4 E0126B64 AC820008 */ sw $v0, 0x8($a0) /* 413EC8 E0126B68 3C03E012 */ lui $v1, (0xE0126BC0 >> 16) /* 413ECC E0126B6C 8C636BC0 */ lw $v1, (0xE0126BC0 & 0xFFFF)($v1) /* 413ED0 E0126B70 24820018 */ addiu $v0, $a0, 0x18 /* 413ED4 E0126B74 ACA20000 */ sw $v0, 0x0($a1) /* 413ED8 E0126B78 24020040 */ addiu $v0, $zero, 0x40 /* 413EDC E0126B7C AC880010 */ sw $t0, 0x10($a0) /* 413EE0 E0126B80 AC820014 */ sw $v0, 0x14($a0) /* 413EE4 E0126B84 AC83000C */ sw $v1, 0xC($a0) /* 413EE8 E0126B88 8FBF00D4 */ lw $ra, 0xD4($sp) /* 413EEC E0126B8C 8FBE00D0 */ lw $fp, 0xD0($sp) /* 413EF0 E0126B90 8FB700CC */ lw $s7, 0xCC($sp) /* 413EF4 E0126B94 8FB600C8 */ lw $s6, 0xC8($sp) /* 413EF8 E0126B98 8FB500C4 */ lw $s5, 0xC4($sp) /* 413EFC E0126B9C 8FB400C0 */ lw $s4, 0xC0($sp) /* 413F00 E0126BA0 8FB300BC */ lw $s3, 0xBC($sp) /* 413F04 E0126BA4 8FB200B8 */ lw $s2, 0xB8($sp) /* 413F08 E0126BA8 8FB100B4 */ lw $s1, 0xB4($sp) /* 413F0C E0126BAC 8FB000B0 */ lw $s0, 0xB0($sp) /* 413F10 E0126BB0 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 413F14 E0126BB4 03E00008 */ jr $ra /* 413F18 E0126BB8 27BD00E0 */ addiu $sp, $sp, 0xE0 /* 413F1C E0126BBC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void star_outline_appendGfx(void* effect) { StarOutlineFXData* data = ((EffectInstance*)effect)->data.starOutline; s32 unk_18 = data->unk_18; s32 unk_1C = data->unk_1C; s32 unk_20 = data->unk_20; s32 unk_24 = data->unk_24; s32 unk_28 = data->unk_28; s32 unk_2C = data->unk_2C; s32 unk_30 = data->unk_30; s32 unk_34 = data->unk_34; Matrix4f sp20; Matrix4f sp60; if (unk_18 > 255) { unk_18 = 255; } if (unk_1C > 255) { unk_1C = 255; } if (unk_20 > 255) { unk_20 = 255; } if (unk_24 > 255) { unk_24 = 255; } if (unk_28 > 255) { unk_28 = 255; } if (unk_2C > 255) { unk_2C = 255; } if (unk_30 > 255) { unk_30 = 255; } if (unk_34 > 255) { unk_34 = 255; } if (unk_18 < 0) { unk_18 = 0; } if (unk_1C < 0) { unk_1C = 0; } if (unk_20 < 0) { unk_20 = 0; } if (unk_24 < 0) { unk_24 = 0; } if (unk_28 < 0) { unk_28 = 0; } if (unk_2C < 0) { unk_2C = 0; } if (unk_30 < 0) { unk_30 = 0; } if (unk_34 < 0) { unk_34 = 0; } gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_E0126BC8[0]); if (unk_34 != 0) { shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, (f32) ((f64) data->unk_54 * 0.4), data->pos.x, data->pos.y, data->pos.z); shim_guPositionF(sp60, data->unk_48, data->unk_4C, data->unk_50, 1.0f, 0.0f, 0.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (data->unk_00 == 0) { gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); } gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, unk_34 >> 1); gDPSetEnvColor(gMainGfxPos++, unk_28, unk_2C, unk_30, unk_34 >> 1); gSPDisplayList(gMainGfxPos++, D_E0126BC4[0]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->unk_38 * 0.4, data->pos.x, data->pos.y, data->pos.z); shim_guPositionF(sp60, data->unk_3C.x, data->unk_3C.y, data->unk_3C.z, 1.0f, 0.0f, 0.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (unk_34 != 0) { if (data->unk_00 == 0) { gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); } gSPDisplayList(gMainGfxPos++, D_E0126BC4[0]); } if (data->unk_00 == 0) { gDPSetRenderMode(gMainGfxPos++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2); } gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, unk_24); gDPSetEnvColor(gMainGfxPos++, unk_28, unk_2C, unk_30, unk_24); gSPDisplayList(gMainGfxPos++, D_E0126BC0[0]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel fire_flower_appendGfx /* 37FC6C E007E54C 27BDFF18 */ addiu $sp, $sp, -0xE8 /* 37FC70 E007E550 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 37FC74 E007E554 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 37FC78 E007E558 AFA400E8 */ sw $a0, 0xE8($sp) /* 37FC7C E007E55C 27A40018 */ addiu $a0, $sp, 0x18 /* 37FC80 E007E560 AFB600B8 */ sw $s6, 0xB8($sp) /* 37FC84 E007E564 3C16800A */ lui $s6, %hi(gMainGfxPos) /* 37FC88 E007E568 26D6A66C */ addiu $s6, $s6, %lo(gMainGfxPos) /* 37FC8C E007E56C AFBF00C4 */ sw $ra, 0xC4($sp) /* 37FC90 E007E570 AFBE00C0 */ sw $fp, 0xC0($sp) /* 37FC94 E007E574 AFB700BC */ sw $s7, 0xBC($sp) /* 37FC98 E007E578 AFB500B4 */ sw $s5, 0xB4($sp) /* 37FC9C E007E57C AFB400B0 */ sw $s4, 0xB0($sp) /* 37FCA0 E007E580 AFB300AC */ sw $s3, 0xAC($sp) /* 37FCA4 E007E584 AFB200A8 */ sw $s2, 0xA8($sp) /* 37FCA8 E007E588 AFB100A4 */ sw $s1, 0xA4($sp) /* 37FCAC E007E58C AFB000A0 */ sw $s0, 0xA0($sp) /* 37FCB0 E007E590 F7BA00E0 */ sdc1 $f26, 0xE0($sp) /* 37FCB4 E007E594 F7B800D8 */ sdc1 $f24, 0xD8($sp) /* 37FCB8 E007E598 F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 37FCBC E007E59C F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 37FCC0 E007E5A0 8EC50000 */ lw $a1, 0x0($s6) /* 37FCC4 E007E5A4 8FB900E8 */ lw $t9, 0xE8($sp) /* 37FCC8 E007E5A8 00A0182D */ daddu $v1, $a1, $zero /* 37FCCC E007E5AC 8F31000C */ lw $s1, 0xC($t9) /* 37FCD0 E007E5B0 24A50008 */ addiu $a1, $a1, 0x8 /* 37FCD4 E007E5B4 AEC50000 */ sw $a1, 0x0($s6) /* 37FCD8 E007E5B8 8E390034 */ lw $t9, 0x34($s1) /* 37FCDC E007E5BC 3C140001 */ lui $s4, (0x11630 >> 16) /* 37FCE0 E007E5C0 AFB90098 */ sw $t9, 0x98($sp) /* 37FCE4 E007E5C4 C6380030 */ lwc1 $f24, 0x30($s1) /* 37FCE8 E007E5C8 8E300004 */ lw $s0, 0x4($s1) /* 37FCEC E007E5CC C63A0028 */ lwc1 $f26, 0x28($s1) /* 37FCF0 E007E5D0 C636002C */ lwc1 $f22, 0x2C($s1) /* 37FCF4 E007E5D4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 37FCF8 E007E5D8 AC620000 */ sw $v0, 0x0($v1) /* 37FCFC E007E5DC AC600004 */ sw $zero, 0x4($v1) /* 37FD00 E007E5E0 ACA60000 */ sw $a2, 0x0($a1) /* 37FD04 E007E5E4 8FB900E8 */ lw $t9, 0xE8($sp) /* 37FD08 E007E5E8 8F230010 */ lw $v1, 0x10($t9) /* 37FD0C E007E5EC 24A20008 */ addiu $v0, $a1, 0x8 /* 37FD10 E007E5F0 AEC20000 */ sw $v0, 0x0($s6) /* 37FD14 E007E5F4 8C62001C */ lw $v0, 0x1C($v1) /* 37FD18 E007E5F8 3C038000 */ lui $v1, (0x80000000 >> 16) /* 37FD1C E007E5FC 00431021 */ addu $v0, $v0, $v1 /* 37FD20 E007E600 ACA20004 */ sw $v0, 0x4($a1) /* 37FD24 E007E604 8E250008 */ lw $a1, 0x8($s1) /* 37FD28 E007E608 8E26000C */ lw $a2, 0xC($s1) /* 37FD2C E007E60C 8E270010 */ lw $a3, 0x10($s1) /* 37FD30 E007E610 4480A000 */ mtc1 $zero, $f20 /* 37FD34 E007E614 0C080108 */ jal shim_guTranslateF /* 37FD38 E007E618 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 37FD3C E007E61C 27B50058 */ addiu $s5, $sp, 0x58 /* 37FD40 E007E620 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 37FD44 E007E624 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 37FD48 E007E628 4406A000 */ mfc1 $a2, $f20 /* 37FD4C E007E62C 00031080 */ sll $v0, $v1, 2 /* 37FD50 E007E630 00431021 */ addu $v0, $v0, $v1 /* 37FD54 E007E634 00021080 */ sll $v0, $v0, 2 /* 37FD58 E007E638 00431023 */ subu $v0, $v0, $v1 /* 37FD5C E007E63C 000218C0 */ sll $v1, $v0, 3 /* 37FD60 E007E640 00431021 */ addu $v0, $v0, $v1 /* 37FD64 E007E644 000210C0 */ sll $v0, $v0, 3 /* 37FD68 E007E648 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 37FD6C E007E64C 00220821 */ addu $at, $at, $v0 /* 37FD70 E007E650 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 37FD74 E007E654 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 37FD78 E007E658 46000007 */ neg.s $f0, $f0 /* 37FD7C E007E65C 44050000 */ mfc1 $a1, $f0 /* 37FD80 E007E660 02A0202D */ daddu $a0, $s5, $zero /* 37FD84 E007E664 0C080104 */ jal shim_guRotateF /* 37FD88 E007E668 E7B40010 */ swc1 $f20, 0x10($sp) /* 37FD8C E007E66C 02A0202D */ daddu $a0, $s5, $zero /* 37FD90 E007E670 27A50018 */ addiu $a1, $sp, 0x18 /* 37FD94 E007E674 0C080114 */ jal shim_guMtxCatF /* 37FD98 E007E678 00A0302D */ daddu $a2, $a1, $zero /* 37FD9C E007E67C 27A40018 */ addiu $a0, $sp, 0x18 /* 37FDA0 E007E680 3C138007 */ lui $s3, %hi(gMatrixListPos) /* 37FDA4 E007E684 267341F0 */ addiu $s3, $s3, %lo(gMatrixListPos) /* 37FDA8 E007E688 3C17800A */ lui $s7, %hi(gDisplayContext) /* 37FDAC E007E68C 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext) /* 37FDB0 E007E690 96650000 */ lhu $a1, 0x0($s3) /* 37FDB4 E007E694 8EE20000 */ lw $v0, 0x0($s7) /* 37FDB8 E007E698 00052980 */ sll $a1, $a1, 6 /* 37FDBC E007E69C 00B42821 */ addu $a1, $a1, $s4 /* 37FDC0 E007E6A0 0C080118 */ jal shim_guMtxF2L /* 37FDC4 E007E6A4 00452821 */ addu $a1, $v0, $a1 /* 37FDC8 E007E6A8 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 37FDCC E007E6AC 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 37FDD0 E007E6B0 2610FFFC */ addiu $s0, $s0, -0x4 /* 37FDD4 E007E6B4 8EC40000 */ lw $a0, 0x0($s6) /* 37FDD8 E007E6B8 96620000 */ lhu $v0, 0x0($s3) /* 37FDDC E007E6BC 0080282D */ daddu $a1, $a0, $zero /* 37FDE0 E007E6C0 24840008 */ addiu $a0, $a0, 0x8 /* 37FDE4 E007E6C4 AEC40000 */ sw $a0, 0x0($s6) /* 37FDE8 E007E6C8 ACA30000 */ sw $v1, 0x0($a1) /* 37FDEC E007E6CC 24430001 */ addiu $v1, $v0, 0x1 /* 37FDF0 E007E6D0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 37FDF4 E007E6D4 00021180 */ sll $v0, $v0, 6 /* 37FDF8 E007E6D8 A6630000 */ sh $v1, 0x0($s3) /* 37FDFC E007E6DC 8EE30000 */ lw $v1, 0x0($s7) /* 37FE00 E007E6E0 00541021 */ addu $v0, $v0, $s4 /* 37FE04 E007E6E4 00621821 */ addu $v1, $v1, $v0 /* 37FE08 E007E6E8 24820008 */ addiu $v0, $a0, 0x8 /* 37FE0C E007E6EC ACA30004 */ sw $v1, 0x4($a1) /* 37FE10 E007E6F0 AEC20000 */ sw $v0, 0x0($s6) /* 37FE14 E007E6F4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 37FE18 E007E6F8 AC820000 */ sw $v0, 0x0($a0) /* 37FE1C E007E6FC 9223003F */ lbu $v1, 0x3F($s1) /* 37FE20 E007E700 24820010 */ addiu $v0, $a0, 0x10 /* 37FE24 E007E704 AEC20000 */ sw $v0, 0x0($s6) /* 37FE28 E007E708 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 37FE2C E007E70C 3C05FF00 */ lui $a1, (0xFF000000 >> 16) /* 37FE30 E007E710 AC820008 */ sw $v0, 0x8($a0) /* 37FE34 E007E714 00651825 */ or $v1, $v1, $a1 /* 37FE38 E007E718 AC830004 */ sw $v1, 0x4($a0) /* 37FE3C E007E71C 9222003B */ lbu $v0, 0x3B($s1) /* 37FE40 E007E720 2E100003 */ sltiu $s0, $s0, 0x3 /* 37FE44 E007E724 00451025 */ or $v0, $v0, $a1 /* 37FE48 E007E728 1200007F */ beqz $s0, .LE007E928 /* 37FE4C E007E72C AC82000C */ sw $v0, 0xC($a0) /* 37FE50 E007E730 4405A000 */ mfc1 $a1, $f20 /* 37FE54 E007E734 3C064180 */ lui $a2, (0x41800000 >> 16) /* 37FE58 E007E738 4407A000 */ mfc1 $a3, $f20 /* 37FE5C E007E73C 0C080108 */ jal shim_guTranslateF /* 37FE60 E007E740 27A40018 */ addiu $a0, $sp, 0x18 /* 37FE64 E007E744 27A40018 */ addiu $a0, $sp, 0x18 /* 37FE68 E007E748 96650000 */ lhu $a1, 0x0($s3) /* 37FE6C E007E74C 8EE20000 */ lw $v0, 0x0($s7) /* 37FE70 E007E750 00052980 */ sll $a1, $a1, 6 /* 37FE74 E007E754 00B42821 */ addu $a1, $a1, $s4 /* 37FE78 E007E758 0C080118 */ jal shim_guMtxF2L /* 37FE7C E007E75C 00452821 */ addu $a1, $v0, $a1 /* 37FE80 E007E760 8EC40000 */ lw $a0, 0x0($s6) /* 37FE84 E007E764 24120001 */ addiu $s2, $zero, 0x1 /* 37FE88 E007E768 0080282D */ daddu $a1, $a0, $zero /* 37FE8C E007E76C 24840008 */ addiu $a0, $a0, 0x8 /* 37FE90 E007E770 AEC40000 */ sw $a0, 0x0($s6) /* 37FE94 E007E774 96620000 */ lhu $v0, 0x0($s3) /* 37FE98 E007E778 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 37FE9C E007E77C ACA30000 */ sw $v1, 0x0($a1) /* 37FEA0 E007E780 00521821 */ addu $v1, $v0, $s2 /* 37FEA4 E007E784 3042FFFF */ andi $v0, $v0, 0xFFFF /* 37FEA8 E007E788 00021180 */ sll $v0, $v0, 6 /* 37FEAC E007E78C A6630000 */ sh $v1, 0x0($s3) /* 37FEB0 E007E790 8EE30000 */ lw $v1, 0x0($s7) /* 37FEB4 E007E794 00541021 */ addu $v0, $v0, $s4 /* 37FEB8 E007E798 00621821 */ addu $v1, $v1, $v0 /* 37FEBC E007E79C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 37FEC0 E007E7A0 ACA30004 */ sw $v1, 0x4($a1) /* 37FEC4 E007E7A4 AC820000 */ sw $v0, 0x0($a0) /* 37FEC8 E007E7A8 3C020900 */ lui $v0, %hi(D_09000DE0_40E070) /* 37FECC E007E7AC 24420DE0 */ addiu $v0, $v0, %lo(D_09000DE0_40E070) /* 37FED0 E007E7B0 AC820004 */ sw $v0, 0x4($a0) /* 37FED4 E007E7B4 8FB900E8 */ lw $t9, 0xE8($sp) /* 37FED8 E007E7B8 2631004C */ addiu $s1, $s1, 0x4C /* 37FEDC E007E7BC 8F220008 */ lw $v0, 0x8($t9) /* 37FEE0 E007E7C0 24840008 */ addiu $a0, $a0, 0x8 /* 37FEE4 E007E7C4 0242102A */ slt $v0, $s2, $v0 /* 37FEE8 E007E7C8 1040004C */ beqz $v0, .LE007E8FC /* 37FEEC E007E7CC AEC40000 */ sw $a0, 0x0($s6) /* 37FEF0 E007E7D0 02E0F02D */ daddu $fp, $s7, $zero /* 37FEF4 E007E7D4 0260B82D */ daddu $s7, $s3, $zero /* 37FEF8 E007E7D8 3C140001 */ lui $s4, (0x11630 >> 16) /* 37FEFC E007E7DC 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 37FF00 E007E7E0 02C0982D */ daddu $s3, $s6, $zero /* 37FF04 E007E7E4 26300010 */ addiu $s0, $s1, 0x10 .LE007E7E8: /* 37FF08 E007E7E8 8E020038 */ lw $v0, 0x38($s0) /* 37FF0C E007E7EC 5440003D */ bnel $v0, $zero, .LE007E8E4 /* 37FF10 E007E7F0 26520001 */ addiu $s2, $s2, 0x1 /* 37FF14 E007E7F4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 37FF18 E007E7F8 44810000 */ mtc1 $at, $f0 /* 37FF1C E007E7FC 4406A000 */ mfc1 $a2, $f20 /* 37FF20 E007E800 4407A000 */ mfc1 $a3, $f20 /* 37FF24 E007E804 E7A00010 */ swc1 $f0, 0x10($sp) /* 37FF28 E007E808 8E050014 */ lw $a1, 0x14($s0) /* 37FF2C E007E80C 0C080104 */ jal shim_guRotateF /* 37FF30 E007E810 27A40018 */ addiu $a0, $sp, 0x18 /* 37FF34 E007E814 8E05FFF8 */ lw $a1, -0x8($s0) /* 37FF38 E007E818 8E06FFFC */ lw $a2, -0x4($s0) /* 37FF3C E007E81C 8E070000 */ lw $a3, 0x0($s0) /* 37FF40 E007E820 0C080108 */ jal shim_guTranslateF /* 37FF44 E007E824 02A0202D */ daddu $a0, $s5, $zero /* 37FF48 E007E828 02A0202D */ daddu $a0, $s5, $zero /* 37FF4C E007E82C 27A50018 */ addiu $a1, $sp, 0x18 /* 37FF50 E007E830 0C080114 */ jal shim_guMtxCatF /* 37FF54 E007E834 00A0302D */ daddu $a2, $a1, $zero /* 37FF58 E007E838 27A40018 */ addiu $a0, $sp, 0x18 /* 37FF5C E007E83C 96E50000 */ lhu $a1, 0x0($s7) /* 37FF60 E007E840 8FC20000 */ lw $v0, 0x0($fp) /* 37FF64 E007E844 00052980 */ sll $a1, $a1, 6 /* 37FF68 E007E848 00B42821 */ addu $a1, $a1, $s4 /* 37FF6C E007E84C 0C080118 */ jal shim_guMtxF2L /* 37FF70 E007E850 00452821 */ addu $a1, $v0, $a1 /* 37FF74 E007E854 8E650000 */ lw $a1, 0x0($s3) /* 37FF78 E007E858 3C060900 */ lui $a2, %hi(D_09000EB8_40E148) /* 37FF7C E007E85C 24C60EB8 */ addiu $a2, $a2, %lo(D_09000EB8_40E148) /* 37FF80 E007E860 00A0202D */ daddu $a0, $a1, $zero /* 37FF84 E007E864 24A50008 */ addiu $a1, $a1, 0x8 /* 37FF88 E007E868 AE650000 */ sw $a1, 0x0($s3) /* 37FF8C E007E86C 96E20000 */ lhu $v0, 0x0($s7) /* 37FF90 E007E870 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 37FF94 E007E874 AC830000 */ sw $v1, 0x0($a0) /* 37FF98 E007E878 24430001 */ addiu $v1, $v0, 0x1 /* 37FF9C E007E87C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 37FFA0 E007E880 00021180 */ sll $v0, $v0, 6 /* 37FFA4 E007E884 A6E30000 */ sh $v1, 0x0($s7) /* 37FFA8 E007E888 8FC30000 */ lw $v1, 0x0($fp) /* 37FFAC E007E88C 00541021 */ addu $v0, $v0, $s4 /* 37FFB0 E007E890 00621821 */ addu $v1, $v1, $v0 /* 37FFB4 E007E894 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 37FFB8 E007E898 AC830004 */ sw $v1, 0x4($a0) /* 37FFBC E007E89C ACA20000 */ sw $v0, 0x0($a1) /* 37FFC0 E007E8A0 8E230000 */ lw $v1, 0x0($s1) /* 37FFC4 E007E8A4 24A20008 */ addiu $v0, $a1, 0x8 /* 37FFC8 E007E8A8 10600003 */ beqz $v1, .LE007E8B8 /* 37FFCC E007E8AC AE620000 */ sw $v0, 0x0($s3) /* 37FFD0 E007E8B0 3C060900 */ lui $a2, %hi(D_09000ED8_40E168) /* 37FFD4 E007E8B4 24C60ED8 */ addiu $a2, $a2, %lo(D_09000ED8_40E168) .LE007E8B8: /* 37FFD8 E007E8B8 3C04D838 */ lui $a0, (0xD8380002 >> 16) /* 37FFDC E007E8BC 8E620000 */ lw $v0, 0x0($s3) /* 37FFE0 E007E8C0 34840002 */ ori $a0, $a0, (0xD8380002 & 0xFFFF) /* 37FFE4 E007E8C4 ACA60004 */ sw $a2, 0x4($a1) /* 37FFE8 E007E8C8 0040182D */ daddu $v1, $v0, $zero /* 37FFEC E007E8CC 24420008 */ addiu $v0, $v0, 0x8 /* 37FFF0 E007E8D0 AE620000 */ sw $v0, 0x0($s3) /* 37FFF4 E007E8D4 24020040 */ addiu $v0, $zero, 0x40 /* 37FFF8 E007E8D8 AC640000 */ sw $a0, 0x0($v1) /* 37FFFC E007E8DC AC620004 */ sw $v0, 0x4($v1) /* 380000 E007E8E0 26520001 */ addiu $s2, $s2, 0x1 .LE007E8E4: /* 380004 E007E8E4 8FB900E8 */ lw $t9, 0xE8($sp) /* 380008 E007E8E8 2610004C */ addiu $s0, $s0, 0x4C /* 38000C E007E8EC 8F220008 */ lw $v0, 0x8($t9) /* 380010 E007E8F0 0242102A */ slt $v0, $s2, $v0 /* 380014 E007E8F4 1440FFBC */ bnez $v0, .LE007E7E8 /* 380018 E007E8F8 2631004C */ addiu $s1, $s1, 0x4C .LE007E8FC: /* 38001C E007E8FC 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 380020 E007E900 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 380024 E007E904 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 380028 E007E908 8C620000 */ lw $v0, 0x0($v1) /* 38002C E007E90C 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 380030 E007E910 0040202D */ daddu $a0, $v0, $zero /* 380034 E007E914 24420008 */ addiu $v0, $v0, 0x8 /* 380038 E007E918 AC620000 */ sw $v0, 0x0($v1) /* 38003C E007E91C 24020040 */ addiu $v0, $zero, 0x40 /* 380040 E007E920 AC850000 */ sw $a1, 0x0($a0) /* 380044 E007E924 AC820004 */ sw $v0, 0x4($a0) .LE007E928: /* 380048 E007E928 3C0DFD48 */ lui $t5, (0xFD48000F >> 16) /* 38004C E007E92C 35AD000F */ ori $t5, $t5, (0xFD48000F & 0xFFFF) /* 380050 E007E930 3C09F548 */ lui $t1, (0xF5480400 >> 16) /* 380054 E007E934 35290400 */ ori $t1, $t1, (0xF5480400 & 0xFFFF) /* 380058 E007E938 3C0E0705 */ lui $t6, (0x7054150 >> 16) /* 38005C E007E93C 35CE4150 */ ori $t6, $t6, (0x7054150 & 0xFFFF) /* 380060 E007E940 3C0F0703 */ lui $t7, (0x703E07C >> 16) /* 380064 E007E944 35EFE07C */ ori $t7, $t7, (0x703E07C & 0xFFFF) /* 380068 E007E948 3C12F540 */ lui $s2, (0xF5400400 >> 16) /* 38006C E007E94C 36520400 */ ori $s2, $s2, (0xF5400400 & 0xFFFF) /* 380070 E007E950 3C100005 */ lui $s0, (0x54150 >> 16) /* 380074 E007E954 36104150 */ ori $s0, $s0, (0x54150 & 0xFFFF) /* 380078 E007E958 3C130007 */ lui $s3, (0x7C07C >> 16) /* 38007C E007E95C 3673C07C */ ori $s3, $s3, (0x7C07C & 0xFFFF) /* 380080 E007E960 3C14F548 */ lui $s4, (0xF5480480 >> 16) /* 380084 E007E964 36940480 */ ori $s4, $s4, (0xF5480480 & 0xFFFF) /* 380088 E007E968 3C17F540 */ lui $s7, (0xF5400480 >> 16) /* 38008C E007E96C 36F70480 */ ori $s7, $s7, (0xF5400480 & 0xFFFF) /* 380090 E007E970 3C160105 */ lui $s6, (0x1054150 >> 16) /* 380094 E007E974 36D64150 */ ori $s6, $s6, (0x1054150 & 0xFFFF) /* 380098 E007E978 3C180107 */ lui $t8, (0x107C07C >> 16) /* 38009C E007E97C 3718C07C */ ori $t8, $t8, (0x107C07C & 0xFFFF) /* 3800A0 E007E980 27A40018 */ addiu $a0, $sp, 0x18 /* 3800A4 E007E984 3C1E0001 */ lui $fp, (0x11630 >> 16) /* 3800A8 E007E988 37DE1630 */ ori $fp, $fp, (0x11630 & 0xFFFF) /* 3800AC E007E98C 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 3800B0 E007E990 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 3800B4 E007E994 3C15DE00 */ lui $s5, (0xDE000000 >> 16) /* 3800B8 E007E998 3C020900 */ lui $v0, %hi(D_09000D40_40DFD0) /* 3800BC E007E99C 24420D40 */ addiu $v0, $v0, %lo(D_09000D40_40DFD0) /* 3800C0 E007E9A0 3C0C0900 */ lui $t4, %hi(D_09000000_415060) /* 3800C4 E007E9A4 258C0000 */ addiu $t4, $t4, %lo(D_09000000_415060) /* 3800C8 E007E9A8 3C0BE600 */ lui $t3, (0xE6000000 >> 16) /* 3800CC E007E9AC 3C0AF400 */ lui $t2, (0xF4000000 >> 16) /* 3800D0 E007E9B0 8E230000 */ lw $v1, 0x0($s1) /* 3800D4 E007E9B4 4480A000 */ mtc1 $zero, $f20 /* 3800D8 E007E9B8 4405B000 */ mfc1 $a1, $f22 /* 3800DC E007E9BC 0060402D */ daddu $t0, $v1, $zero /* 3800E0 E007E9C0 24630008 */ addiu $v1, $v1, 0x8 /* 3800E4 E007E9C4 AE230000 */ sw $v1, 0x0($s1) /* 3800E8 E007E9C8 AD020004 */ sw $v0, 0x4($t0) /* 3800EC E007E9CC 24620008 */ addiu $v0, $v1, 0x8 /* 3800F0 E007E9D0 AD150000 */ sw $s5, 0x0($t0) /* 3800F4 E007E9D4 AE220000 */ sw $v0, 0x0($s1) /* 3800F8 E007E9D8 24020003 */ addiu $v0, $zero, 0x3 /* 3800FC E007E9DC 4406A000 */ mfc1 $a2, $f20 /* 380100 E007E9E0 3C08F200 */ lui $t0, (0xF2000000 >> 16) /* 380104 E007E9E4 AC6D0000 */ sw $t5, 0x0($v1) /* 380108 E007E9E8 8FB90098 */ lw $t9, 0x98($sp) /* 38010C E007E9EC 4407A000 */ mfc1 $a3, $f20 /* 380110 E007E9F0 00591023 */ subu $v0, $v0, $t9 /* 380114 E007E9F4 00021240 */ sll $v0, $v0, 9 /* 380118 E007E9F8 004C1021 */ addu $v0, $v0, $t4 /* 38011C E007E9FC AC620004 */ sw $v0, 0x4($v1) /* 380120 E007EA00 24620010 */ addiu $v0, $v1, 0x10 /* 380124 E007EA04 AE220000 */ sw $v0, 0x0($s1) /* 380128 E007EA08 24620018 */ addiu $v0, $v1, 0x18 /* 38012C E007EA0C AC690008 */ sw $t1, 0x8($v1) /* 380130 E007EA10 AC6E000C */ sw $t6, 0xC($v1) /* 380134 E007EA14 AE220000 */ sw $v0, 0x0($s1) /* 380138 E007EA18 24620020 */ addiu $v0, $v1, 0x20 /* 38013C E007EA1C AC6B0010 */ sw $t3, 0x10($v1) /* 380140 E007EA20 AC600014 */ sw $zero, 0x14($v1) /* 380144 E007EA24 AE220000 */ sw $v0, 0x0($s1) /* 380148 E007EA28 24620028 */ addiu $v0, $v1, 0x28 /* 38014C E007EA2C 3C09E700 */ lui $t1, (0xE7000000 >> 16) /* 380150 E007EA30 AC6A0018 */ sw $t2, 0x18($v1) /* 380154 E007EA34 AC6F001C */ sw $t7, 0x1C($v1) /* 380158 E007EA38 AE220000 */ sw $v0, 0x0($s1) /* 38015C E007EA3C 24620030 */ addiu $v0, $v1, 0x30 /* 380160 E007EA40 AC690020 */ sw $t1, 0x20($v1) /* 380164 E007EA44 AC600024 */ sw $zero, 0x24($v1) /* 380168 E007EA48 AE220000 */ sw $v0, 0x0($s1) /* 38016C E007EA4C 24620038 */ addiu $v0, $v1, 0x38 /* 380170 E007EA50 AC720028 */ sw $s2, 0x28($v1) /* 380174 E007EA54 AC70002C */ sw $s0, 0x2C($v1) /* 380178 E007EA58 AE220000 */ sw $v0, 0x0($s1) /* 38017C E007EA5C 24620040 */ addiu $v0, $v1, 0x40 /* 380180 E007EA60 AC680030 */ sw $t0, 0x30($v1) /* 380184 E007EA64 AC730034 */ sw $s3, 0x34($v1) /* 380188 E007EA68 AE220000 */ sw $v0, 0x0($s1) /* 38018C E007EA6C 24020002 */ addiu $v0, $zero, 0x2 /* 380190 E007EA70 AC6D0038 */ sw $t5, 0x38($v1) /* 380194 E007EA74 00591023 */ subu $v0, $v0, $t9 /* 380198 E007EA78 00021240 */ sll $v0, $v0, 9 /* 38019C E007EA7C 004C1021 */ addu $v0, $v0, $t4 /* 3801A0 E007EA80 AC62003C */ sw $v0, 0x3C($v1) /* 3801A4 E007EA84 24620048 */ addiu $v0, $v1, 0x48 /* 3801A8 E007EA88 AE220000 */ sw $v0, 0x0($s1) /* 3801AC E007EA8C 24620050 */ addiu $v0, $v1, 0x50 /* 3801B0 E007EA90 AC740040 */ sw $s4, 0x40($v1) /* 3801B4 E007EA94 AC6E0044 */ sw $t6, 0x44($v1) /* 3801B8 E007EA98 AE220000 */ sw $v0, 0x0($s1) /* 3801BC E007EA9C 24620058 */ addiu $v0, $v1, 0x58 /* 3801C0 E007EAA0 AC6B0048 */ sw $t3, 0x48($v1) /* 3801C4 E007EAA4 AC60004C */ sw $zero, 0x4C($v1) /* 3801C8 E007EAA8 AE220000 */ sw $v0, 0x0($s1) /* 3801CC E007EAAC 24620060 */ addiu $v0, $v1, 0x60 /* 3801D0 E007EAB0 AC6A0050 */ sw $t2, 0x50($v1) /* 3801D4 E007EAB4 AC6F0054 */ sw $t7, 0x54($v1) /* 3801D8 E007EAB8 AE220000 */ sw $v0, 0x0($s1) /* 3801DC E007EABC 24620068 */ addiu $v0, $v1, 0x68 /* 3801E0 E007EAC0 AC690058 */ sw $t1, 0x58($v1) /* 3801E4 E007EAC4 AC60005C */ sw $zero, 0x5C($v1) /* 3801E8 E007EAC8 AE220000 */ sw $v0, 0x0($s1) /* 3801EC E007EACC 24620070 */ addiu $v0, $v1, 0x70 /* 3801F0 E007EAD0 AC770060 */ sw $s7, 0x60($v1) /* 3801F4 E007EAD4 AC760064 */ sw $s6, 0x64($v1) /* 3801F8 E007EAD8 AE220000 */ sw $v0, 0x0($s1) /* 3801FC E007EADC AC680068 */ sw $t0, 0x68($v1) /* 380200 E007EAE0 0C080108 */ jal shim_guTranslateF /* 380204 E007EAE4 AC78006C */ sw $t8, 0x6C($v1) /* 380208 E007EAE8 27B00058 */ addiu $s0, $sp, 0x58 /* 38020C E007EAEC 4405C000 */ mfc1 $a1, $f24 /* 380210 E007EAF0 0200202D */ daddu $a0, $s0, $zero /* 380214 E007EAF4 00A0302D */ daddu $a2, $a1, $zero /* 380218 E007EAF8 0C080110 */ jal shim_guScaleF /* 38021C E007EAFC 00A0382D */ daddu $a3, $a1, $zero /* 380220 E007EB00 0200202D */ daddu $a0, $s0, $zero /* 380224 E007EB04 27A50018 */ addiu $a1, $sp, 0x18 /* 380228 E007EB08 0C080114 */ jal shim_guMtxCatF /* 38022C E007EB0C 00A0302D */ daddu $a2, $a1, $zero /* 380230 E007EB10 4405D000 */ mfc1 $a1, $f26 /* 380234 E007EB14 4406A000 */ mfc1 $a2, $f20 /* 380238 E007EB18 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 38023C E007EB1C 0200202D */ daddu $a0, $s0, $zero /* 380240 E007EB20 0C080104 */ jal shim_guRotateF /* 380244 E007EB24 AFA60010 */ sw $a2, 0x10($sp) /* 380248 E007EB28 0200202D */ daddu $a0, $s0, $zero /* 38024C E007EB2C 27A50018 */ addiu $a1, $sp, 0x18 /* 380250 E007EB30 0C080114 */ jal shim_guMtxCatF /* 380254 E007EB34 00A0302D */ daddu $a2, $a1, $zero /* 380258 E007EB38 27A40018 */ addiu $a0, $sp, 0x18 /* 38025C E007EB3C 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 380260 E007EB40 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 380264 E007EB44 3C12800A */ lui $s2, %hi(gDisplayContext) /* 380268 E007EB48 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 38026C E007EB4C 96050000 */ lhu $a1, 0x0($s0) /* 380270 E007EB50 8E420000 */ lw $v0, 0x0($s2) /* 380274 E007EB54 00052980 */ sll $a1, $a1, 6 /* 380278 E007EB58 00BE2821 */ addu $a1, $a1, $fp /* 38027C E007EB5C 0C080118 */ jal shim_guMtxF2L /* 380280 E007EB60 00452821 */ addu $a1, $v0, $a1 /* 380284 E007EB64 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 380288 E007EB68 8E240000 */ lw $a0, 0x0($s1) /* 38028C E007EB6C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 380290 E007EB70 0080282D */ daddu $a1, $a0, $zero /* 380294 E007EB74 24840008 */ addiu $a0, $a0, 0x8 /* 380298 E007EB78 AE240000 */ sw $a0, 0x0($s1) /* 38029C E007EB7C 96020000 */ lhu $v0, 0x0($s0) /* 3802A0 E007EB80 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3802A4 E007EB84 ACA30000 */ sw $v1, 0x0($a1) /* 3802A8 E007EB88 24430001 */ addiu $v1, $v0, 0x1 /* 3802AC E007EB8C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3802B0 E007EB90 00021180 */ sll $v0, $v0, 6 /* 3802B4 E007EB94 A6030000 */ sh $v1, 0x0($s0) /* 3802B8 E007EB98 8E430000 */ lw $v1, 0x0($s2) /* 3802BC E007EB9C 005E1021 */ addu $v0, $v0, $fp /* 3802C0 E007EBA0 00621821 */ addu $v1, $v1, $v0 /* 3802C4 E007EBA4 24820008 */ addiu $v0, $a0, 0x8 /* 3802C8 E007EBA8 ACA30004 */ sw $v1, 0x4($a1) /* 3802CC E007EBAC AE220000 */ sw $v0, 0x0($s1) /* 3802D0 E007EBB0 3C020900 */ lui $v0, %hi(D_09000EF8_40E188) /* 3802D4 E007EBB4 24420EF8 */ addiu $v0, $v0, %lo(D_09000EF8_40E188) /* 3802D8 E007EBB8 AC820004 */ sw $v0, 0x4($a0) /* 3802DC E007EBBC 24820010 */ addiu $v0, $a0, 0x10 /* 3802E0 E007EBC0 24030040 */ addiu $v1, $zero, 0x40 /* 3802E4 E007EBC4 AC950000 */ sw $s5, 0x0($a0) /* 3802E8 E007EBC8 AE220000 */ sw $v0, 0x0($s1) /* 3802EC E007EBCC 24820018 */ addiu $v0, $a0, 0x18 /* 3802F0 E007EBD0 AC860008 */ sw $a2, 0x8($a0) /* 3802F4 E007EBD4 AC83000C */ sw $v1, 0xC($a0) /* 3802F8 E007EBD8 AE220000 */ sw $v0, 0x0($s1) /* 3802FC E007EBDC AC860010 */ sw $a2, 0x10($a0) /* 380300 E007EBE0 AC830014 */ sw $v1, 0x14($a0) /* 380304 E007EBE4 8FBF00C4 */ lw $ra, 0xC4($sp) /* 380308 E007EBE8 8FBE00C0 */ lw $fp, 0xC0($sp) /* 38030C E007EBEC 8FB700BC */ lw $s7, 0xBC($sp) /* 380310 E007EBF0 8FB600B8 */ lw $s6, 0xB8($sp) /* 380314 E007EBF4 8FB500B4 */ lw $s5, 0xB4($sp) /* 380318 E007EBF8 8FB400B0 */ lw $s4, 0xB0($sp) /* 38031C E007EBFC 8FB300AC */ lw $s3, 0xAC($sp) /* 380320 E007EC00 8FB200A8 */ lw $s2, 0xA8($sp) /* 380324 E007EC04 8FB100A4 */ lw $s1, 0xA4($sp) /* 380328 E007EC08 8FB000A0 */ lw $s0, 0xA0($sp) /* 38032C E007EC0C D7BA00E0 */ ldc1 $f26, 0xE0($sp) /* 380330 E007EC10 D7B800D8 */ ldc1 $f24, 0xD8($sp) /* 380334 E007EC14 D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 380338 E007EC18 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 38033C E007EC1C 03E00008 */ jr $ra /* 380340 E007EC20 27BD00E8 */ addiu $sp, $sp, 0xE8 /* 380344 E007EC24 00000000 */ nop /* 380348 E007EC28 00000000 */ nop /* 38034C E007EC2C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void fire_flower_appendGfx(void* effect) { FireFlowerFXData* part = ((EffectInstance*)effect)->data.fireFlower; s32 unk_34 = part->unk_34; f32 unk_30 = part->unk_30; s32 unk_04 = part->unk_04; f32 unk_28 = part->unk_28; f32 unk_2C = part->unk_2C; Matrix4f sp18; Matrix4f sp58; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 0, 0, part->unk_3C); gDPSetEnvColor(gMainGfxPos++, 255, 0, 0, part->unk_38); if ((u32) (unk_04 - 4) < 3U) { shim_guTranslateF(sp18, 0.0f, 16.0f, 0.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000DE0_381180); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_40.z == 0) { shim_guRotateF(sp18, part->unk_24, 0.0f, 0.0f, 1.0f); shim_guTranslateF(sp58, part->pos.x, part->pos.y, part->pos.z); 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++, part->unk_00 != 0 ? D_09000ED8_381278 : D_09000EB8_381258); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPDisplayList(gMainGfxPos++, D_09000D40_3810E0); gDPLoadTextureTile_4b( gMainGfxPos++, D_09000000_3803A0[3 - unk_34], G_IM_FMT_CI, 32, 0, 0, 0, 31, 31, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); gDPLoadMultiTile_4b( gMainGfxPos++, D_09000000_3803A0[2 - unk_34], 0x0080, 1, G_IM_FMT_CI, 32, 0, 0, 0, 31, 31, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); shim_guTranslateF(sp18, unk_2C, 0.0f, 0.0f); shim_guScaleF(sp58, unk_30, unk_30, unk_30); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, unk_28, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000EF8_381298); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel D_80244F00 /* 1737E0 80244F00 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 1737E4 80244F04 AFB1001C */ sw $s1, 0x1C($sp) /* 1737E8 80244F08 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1737EC 80244F0C 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) glabel func_80244F10 /* 1737F0 80244F10 AFB5002C */ sw $s5, 0x2C($sp) /* 1737F4 80244F14 3C158011 */ lui $s5, %hi(gPlayerData) /* 1737F8 80244F18 26B5F290 */ addiu $s5, $s5, %lo(gPlayerData) .L80244F1C: /* 1737FC 80244F1C AFB40028 */ sw $s4, 0x28($sp) /* 173800 80244F20 3C14800E */ lui $s4, %hi(gBattleSubState) flo_14_pad_4F24: /* 173804 80244F24 2694C4DC */ addiu $s4, $s4, %lo(gBattleSubState) .L80244F28: /* 173808 80244F28 AFBF0030 */ sw $ra, 0x30($sp) .L80244F2C: /* 17380C 80244F2C AFB30024 */ sw $s3, 0x24($sp) D_80244F30: /* 173810 80244F30 AFB20020 */ sw $s2, 0x20($sp) /* 173814 80244F34 AFB00018 */ sw $s0, 0x18($sp) D_80244F38: /* 173818 80244F38 8E3300D8 */ lw $s3, 0xD8($s1) flo_08_pad_4F3C: /* 17381C 80244F3C 8E900000 */ lw $s0, 0x0($s4) D_80244F40: /* 173820 80244F40 8E3200DC */ lw $s2, 0xDC($s1) glabel func_80244F44 /* 173824 80244F44 12000005 */ beqz $s0, func_80244F5C D_80244F48: /* 173828 80244F48 24020002 */ addiu $v0, $zero, 0x2 /* 17382C 80244F4C 12020060 */ beq $s0, $v0, .L802450D0 D_80244F50: /* 173830 80244F50 00000000 */ nop /* 173834 80244F54 0809146D */ j .L802451B4 /* 173838 80244F58 00000000 */ nop glabel func_80244F5C /* 17383C 80244F5C 3C03FFFB */ lui $v1, (0xFFFBFFFF >> 16) /* 173840 80244F60 3463FFFF */ ori $v1, $v1, (0xFFFBFFFF & 0xFFFF) flo_14_pad_4F64: /* 173844 80244F64 24040019 */ addiu $a0, $zero, 0x19 /* 173848 80244F68 8E220000 */ lw $v0, 0x0($s1) /* 17384C 80244F6C 0000802D */ daddu $s0, $zero, $zero D_80244F70: /* 173850 80244F70 A220008C */ sb $zero, 0x8C($s1) /* 173854 80244F74 00431024 */ and $v0, $v0, $v1 D_80244F78: /* 173858 80244F78 AE220000 */ sw $v0, 0x0($s1) /* 17385C 80244F7C 8E220004 */ lw $v0, 0x4($s1) /* 173860 80244F80 96A302A6 */ lhu $v1, 0x2A6($s5) D_80244F84: /* 173864 80244F84 3442001E */ ori $v0, $v0, 0x1E D_80244F88_EC7188: /* 173868 80244F88 24630001 */ addiu $v1, $v1, 0x1 /* 17386C 80244F8C AE220004 */ sw $v0, 0x4($s1) D_80244F90_EC7190: /* 173870 80244F90 0C093903 */ jal func_8024E40C .L80244F94: /* 173874 80244F94 A6A302A6 */ sh $v1, 0x2A6($s5) D_80244F98: /* 173878 80244F98 0C09390F */ jal func_8024E43C /* 17387C 80244F9C 0200202D */ daddu $a0, $s0, $zero flo_25_ItemChoiceList: /* 173880 80244FA0 0200302D */ daddu $a2, $s0, $zero D_80244FA4: /* 173884 80244FA4 3C070040 */ lui $a3, (0x400000 >> 16) D_80244FA8: /* 173888 80244FA8 0220282D */ daddu $a1, $s1, $zero /* 17388C 80244FAC 44801000 */ mtc1 $zero, $f2 D_80244FB0: /* 173890 80244FB0 8CA400E0 */ lw $a0, 0xE0($a1) /* 173894 80244FB4 50800017 */ beql $a0, $zero, D_80245014 D_80244FB8: /* 173898 80244FB8 24C60001 */ addiu $a2, $a2, 0x1 /* 17389C 80244FBC 8C830000 */ lw $v1, 0x0($a0) .L80244FC0: /* 1738A0 80244FC0 30624000 */ andi $v0, $v1, 0x4000 /* 1738A4 80244FC4 54400013 */ bnel $v0, $zero, D_80245014 D_80244FC8: /* 1738A8 80244FC8 24C60001 */ addiu $a2, $a2, 0x1 /* 1738AC 80244FCC 00671024 */ and $v0, $v1, $a3 D_80244FD0: /* 1738B0 80244FD0 54400010 */ bnel $v0, $zero, D_80245014 glabel func_80244FD4 /* 1738B4 80244FD4 24C60001 */ addiu $a2, $a2, 0x1 /* 1738B8 80244FD8 8C820008 */ lw $v0, 0x8($a0) D_80244FDC: /* 1738BC 80244FDC 90430018 */ lbu $v1, 0x18($v0) /* 1738C0 80244FE0 90820210 */ lbu $v0, 0x210($a0) .L80244FE4: /* 1738C4 80244FE4 44830000 */ mtc1 $v1, $f0 .L80244FE8: /* 1738C8 80244FE8 00000000 */ nop D_80244FEC: /* 1738CC 80244FEC 46800020 */ cvt.s.w $f0, $f0 .L80244FF0: /* 1738D0 80244FF0 2442FFFD */ addiu $v0, $v0, -0x3 /* 1738D4 80244FF4 2C420006 */ sltiu $v0, $v0, 0x6 arn_05_pad_4FF8: /* 1738D8 80244FF8 10400004 */ beqz $v0, .L8024500C .L80244FFC: /* 1738DC 80244FFC 26100001 */ addiu $s0, $s0, 0x1 D_80245000: /* 1738E0 80245000 3C0142C8 */ lui $at, (0x42C80000 >> 16) D_80245004: /* 1738E4 80245004 44810000 */ mtc1 $at, $f0 /* 1738E8 80245008 00000000 */ nop .L8024500C: /* 1738EC 8024500C 46001080 */ add.s $f2, $f2, $f0 D_80245010: /* 1738F0 80245010 24C60001 */ addiu $a2, $a2, 0x1 D_80245014: /* 1738F4 80245014 28C20018 */ slti $v0, $a2, 0x18 glabel func_80245018 /* 1738F8 80245018 1440FFE5 */ bnez $v0, D_80244FB0 D_8024501C: /* 1738FC 8024501C 24A50004 */ addiu $a1, $a1, 0x4 D_80245020: /* 173900 80245020 44900000 */ mtc1 $s0, $f0 /* 173904 80245024 00000000 */ nop glabel func_80245028 /* 173908 80245028 46800020 */ cvt.s.w $f0, $f0 .L8024502C: /* 17390C 8024502C 46001003 */ div.s $f0, $f2, $f0 .L80245030: /* 173910 80245030 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 173914 80245034 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) D_80245038: /* 173918 80245038 4600010D */ trunc.w.s $f4, $f0 /* 17391C 8024503C E6640088 */ swc1 $f4, 0x88($s3) D_80245040: /* 173920 80245040 80430074 */ lb $v1, 0x74($v0) /* 173924 80245044 24020004 */ addiu $v0, $zero, 0x4 D_80245048: /* 173928 80245048 14620002 */ bne $v1, $v0, D_80245054 /* 17392C 8024504C 24020064 */ addiu $v0, $zero, 0x64 D_80245050: /* 173930 80245050 AE620088 */ sw $v0, 0x88($s3) D_80245054: /* 173934 80245054 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase) D_80245058: /* 173938 80245058 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase) /* 17393C 8024505C 2405000A */ addiu $a1, $zero, 0xA D_80245060: /* 173940 80245060 0000302D */ daddu $a2, $zero, $zero .L80245064: /* 173944 80245064 24020003 */ addiu $v0, $zero, 0x3 D_80245068: /* 173948 80245068 0C0B0CF8 */ jal start_script /* 17394C 8024506C A22201A7 */ sb $v0, 0x1A7($s1) .L80245070: /* 173950 80245070 0040182D */ daddu $v1, $v0, $zero /* 173954 80245074 AE6301D4 */ sw $v1, 0x1D4($s3) /* 173958 80245078 8C620144 */ lw $v0, 0x144($v1) .L8024507C: /* 17395C 8024507C AE6201E4 */ sw $v0, 0x1E4($s3) /* 173960 80245080 1240000E */ beqz $s2, D_802450BC .L80245084: /* 173964 80245084 AC600148 */ sw $zero, 0x148($v1) /* 173968 80245088 82420216 */ lb $v0, 0x216($s2) D_8024508C: /* 17396C 8024508C 1440000C */ bnez $v0, .L802450C0 D_80245090: /* 173970 80245090 24020002 */ addiu $v0, $zero, 0x2 .L80245094: /* 173974 80245094 2405000A */ addiu $a1, $zero, 0xA .L80245098: /* 173978 80245098 8E4401C4 */ lw $a0, 0x1C4($s2) /* 17397C 8024509C 0C0B0CF8 */ jal start_script D_802450A0: /* 173980 802450A0 0000302D */ daddu $a2, $zero, $zero /* 173984 802450A4 0040182D */ daddu $v1, $v0, $zero /* 173988 802450A8 AE4301D4 */ sw $v1, 0x1D4($s2) /* 17398C 802450AC 8C620144 */ lw $v0, 0x144($v1) D_802450B0: /* 173990 802450B0 AE4201E4 */ sw $v0, 0x1E4($s2) D_802450B4: /* 173994 802450B4 24020100 */ addiu $v0, $zero, 0x100 /* 173998 802450B8 AC620148 */ sw $v0, 0x148($v1) D_802450BC: /* 17399C 802450BC 24020002 */ addiu $v0, $zero, 0x2 .L802450C0: /* 1739A0 802450C0 3C01800E */ lui $at, %hi(gBattleSubState) /* 1739A4 802450C4 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 1739A8 802450C8 0809146D */ j .L802451B4 /* 1739AC 802450CC 00000000 */ nop .L802450D0: /* 1739B0 802450D0 0C0B1059 */ jal does_script_exist /* 1739B4 802450D4 8E6401E4 */ lw $a0, 0x1E4($s3) .L802450D8: /* 1739B8 802450D8 14400036 */ bnez $v0, .L802451B4 glabel func_802450DC /* 1739BC 802450DC 00000000 */ nop /* 1739C0 802450E0 8222008C */ lb $v0, 0x8C($s1) /* 1739C4 802450E4 14400033 */ bnez $v0, .L802451B4 /* 1739C8 802450E8 3C030004 */ lui $v1, (0x40000 >> 16) /* 1739CC 802450EC 8E220000 */ lw $v0, 0x0($s1) /* 1739D0 802450F0 00431024 */ and $v0, $v0, $v1 /* 1739D4 802450F4 14400003 */ bnez $v0, D_80245104 /* 1739D8 802450F8 24020003 */ addiu $v0, $zero, 0x3 D_802450FC: /* 1739DC 802450FC 0809146D */ j .L802451B4 .L80245100: /* 1739E0 80245100 AE820000 */ sw $v0, 0x0($s4) D_80245104: /* 1739E4 80245104 3C02800B */ lui $v0, %hi(gCurrentEncounter) D_80245108: /* 1739E8 80245108 24420F10 */ addiu $v0, $v0, %lo(gCurrentEncounter) flo_25_D_8024510C_pad: /* 1739EC 8024510C A0500009 */ sb $s0, 0x9($v0) flo_25_FlowerGuard_ItemChoiceList: /* 1739F0 80245110 0C03A752 */ jal is_ability_active D_80245114: /* 1739F4 80245114 24040017 */ addiu $a0, $zero, 0x17 D_80245118: /* 1739F8 80245118 14400003 */ bnez $v0, .L80245128 /* 1739FC 8024511C 2402000B */ addiu $v0, $zero, 0xB D_80245120: /* 173A00 80245120 0809146D */ j .L802451B4 /* 173A04 80245124 AE820000 */ sw $v0, 0x0($s4) .L80245128: /* 173A08 80245128 0C03A6B9 */ jal status_bar_start_blinking_starpoints .L8024512C: /* 173A0C 8024512C 00000000 */ nop /* 173A10 80245130 0C08F841 */ jal func_8023E104 D_80245134: /* 173A14 80245134 00000000 */ nop /* 173A18 80245138 82230078 */ lb $v1, 0x78($s1) .L8024513C: /* 173A1C 8024513C 00031040 */ sll $v0, $v1, 1 .L80245140: /* 173A20 80245140 00431021 */ addu $v0, $v0, $v1 /* 173A24 80245144 000210C0 */ sll $v0, $v0, 3 /* 173A28 80245148 00431021 */ addu $v0, $v0, $v1 D_8024514C: /* 173A2C 8024514C 00021080 */ sll $v0, $v0, 2 D_80245150: /* 173A30 80245150 24030014 */ addiu $v1, $zero, 0x14 D_80245154: /* 173A34 80245154 14600002 */ bnez $v1, D_80245160 /* 173A38 80245158 0043001A */ div $zero, $v0, $v1 /* 173A3C 8024515C 0007000D */ break 7 D_80245160: /* 173A40 80245160 2401FFFF */ addiu $at, $zero, -0x1 D_80245164: /* 173A44 80245164 14610004 */ bne $v1, $at, .L80245178 /* 173A48 80245168 3C018000 */ lui $at, (0x80000000 >> 16) .L8024516C: /* 173A4C 8024516C 14410002 */ bne $v0, $at, .L80245178 /* 173A50 80245170 00000000 */ nop .L80245174: /* 173A54 80245174 0006000D */ break 6 .L80245178: /* 173A58 80245178 00002012 */ mflo $a0 D_8024517C: /* 173A5C 8024517C 3C01802A */ lui $at, %hi(D_8029F264) .L80245180: /* 173A60 80245180 AC20F264 */ sw $zero, %lo(D_8029F264)($at) /* 173A64 80245184 3C01802A */ lui $at, %hi(D_8029F24C) /* 173A68 80245188 AC20F24C */ sw $zero, %lo(D_8029F24C)($at) D_8024518C: /* 173A6C 8024518C 3C018028 */ lui $at, %hi(BattleScreenFadeAmt) /* 173A70 80245190 AC200A30 */ sw $zero, %lo(BattleScreenFadeAmt)($at) /* 173A74 80245194 3C01802A */ lui $at, %hi(RunAwayRewardStep) /* 173A78 80245198 AC23F250 */ sw $v1, %lo(RunAwayRewardStep)($at) D_8024519C: /* 173A7C 8024519C 2403000A */ addiu $v1, $zero, 0xA /* 173A80 802451A0 AE830000 */ sw $v1, 0x0($s4) /* 173A84 802451A4 3C01802A */ lui $at, %hi(RunAwayRewardTotal) /* 173A88 802451A8 AC22F25C */ sw $v0, %lo(RunAwayRewardTotal)($at) D_802451AC: /* 173A8C 802451AC 3C01802A */ lui $at, %hi(RunAwayRewardIncrement) D_802451B0: /* 173A90 802451B0 AC24F260 */ sw $a0, %lo(RunAwayRewardIncrement)($at) .L802451B4: /* 173A94 802451B4 3C03800E */ lui $v1, %hi(gBattleSubState) D_802451B8: /* 173A98 802451B8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_802451BC: /* 173A9C 802451BC 2402000A */ addiu $v0, $zero, 0xA D_802451C0: /* 173AA0 802451C0 14620043 */ bne $v1, $v0, D_802452D0 D_802451C4: /* 173AA4 802451C4 2402000B */ addiu $v0, $zero, 0xB D_802451C8: /* 173AA8 802451C8 82220078 */ lb $v0, 0x78($s1) /* 173AAC 802451CC 10400027 */ beqz $v0, D_8024526C /* 173AB0 802451D0 3C0551EB */ lui $a1, (0x51EB851F >> 16) D_802451D4: /* 173AB4 802451D4 3C04802A */ lui $a0, %hi(RunAwayRewardTotal) jtbl_802451D8: /* 173AB8 802451D8 2484F25C */ addiu $a0, $a0, %lo(RunAwayRewardTotal) /* 173ABC 802451DC 8C820000 */ lw $v0, 0x0($a0) /* 173AC0 802451E0 3C03802A */ lui $v1, %hi(RunAwayRewardIncrement) .L802451E4: /* 173AC4 802451E4 8C63F260 */ lw $v1, %lo(RunAwayRewardIncrement)($v1) /* 173AC8 802451E8 34A5851F */ ori $a1, $a1, (0x51EB851F & 0xFFFF) D_802451EC: /* 173ACC 802451EC 00431023 */ subu $v0, $v0, $v1 D_802451F0: /* 173AD0 802451F0 00450018 */ mult $v0, $a1 /* 173AD4 802451F4 AC820000 */ sw $v0, 0x0($a0) D_802451F8: /* 173AD8 802451F8 000217C3 */ sra $v0, $v0, 31 .L802451FC: /* 173ADC 802451FC 82240078 */ lb $a0, 0x78($s1) D_80245200: /* 173AE0 80245200 00004010 */ mfhi $t0 /* 173AE4 80245204 00081943 */ sra $v1, $t0, 5 D_80245208: /* 173AE8 80245208 00621823 */ subu $v1, $v1, $v0 /* 173AEC 8024520C 00031600 */ sll $v0, $v1, 24 D_80245210: /* 173AF0 80245210 00021603 */ sra $v0, $v0, 24 /* 173AF4 80245214 00828023 */ subu $s0, $a0, $v0 /* 173AF8 80245218 1A000003 */ blez $s0, D_80245228 D_8024521C: /* 173AFC 8024521C A2230078 */ sb $v1, 0x78($s1) /* 173B00 80245220 0C05272D */ jal sfx_play_sound D_80245224: /* 173B04 80245224 24040211 */ addiu $a0, $zero, 0x211 D_80245228: /* 173B08 80245228 92A20010 */ lbu $v0, 0x10($s5) glabel func_8024522C /* 173B0C 8024522C 3C038028 */ lui $v1, %hi(BattleScreenFadeAmt) D_80245230: /* 173B10 80245230 24630A30 */ addiu $v1, $v1, %lo(BattleScreenFadeAmt) /* 173B14 80245234 00501021 */ addu $v0, $v0, $s0 /* 173B18 80245238 A2A20010 */ sb $v0, 0x10($s5) /* 173B1C 8024523C 8C620000 */ lw $v0, 0x0($v1) /* 173B20 80245240 3C04802A */ lui $a0, %hi(RunAwayRewardStep) /* 173B24 80245244 8C84F250 */ lw $a0, %lo(RunAwayRewardStep)($a0) /* 173B28 80245248 24420001 */ addiu $v0, $v0, 0x1 /* 173B2C 8024524C 14800007 */ bnez $a0, D_8024526C D_80245250: /* 173B30 80245250 AC620000 */ sw $v0, 0x0($v1) /* 173B34 80245254 82220078 */ lb $v0, 0x78($s1) D_80245258: /* 173B38 80245258 10400004 */ beqz $v0, D_8024526C D_8024525C: /* 173B3C 8024525C 00000000 */ nop /* 173B40 80245260 92A20010 */ lbu $v0, 0x10($s5) /* 173B44 80245264 24420001 */ addiu $v0, $v0, 0x1 D_80245268: /* 173B48 80245268 A2A20010 */ sb $v0, 0x10($s5) D_8024526C: /* 173B4C 8024526C 82A20010 */ lb $v0, 0x10($s5) /* 173B50 80245270 28420063 */ slti $v0, $v0, 0x63 .L80245274: /* 173B54 80245274 14400002 */ bnez $v0, D_80245280 D_80245278: /* 173B58 80245278 24020063 */ addiu $v0, $zero, 0x63 D_8024527C: /* 173B5C 8024527C A2A20010 */ sb $v0, 0x10($s5) D_80245280: /* 173B60 80245280 82220078 */ lb $v0, 0x78($s1) /* 173B64 80245284 1440000F */ bnez $v0, func_802452C4 glabel func_80245288 /* 173B68 80245288 00000000 */ nop /* 173B6C 8024528C 3C03802A */ lui $v1, %hi(RunAwayRewardStep) D_80245290: /* 173B70 80245290 2463F250 */ addiu $v1, $v1, %lo(RunAwayRewardStep) .L80245294: /* 173B74 80245294 8C620000 */ lw $v0, 0x0($v1) D_80245298: /* 173B78 80245298 10400003 */ beqz $v0, D_802452A8 .L8024529C: /* 173B7C 8024529C 2442FFFF */ addiu $v0, $v0, -0x1 D_802452A0: /* 173B80 802452A0 080914B1 */ j func_802452C4 /* 173B84 802452A4 AC620000 */ sw $v0, 0x0($v1) D_802452A8: /* 173B88 802452A8 0C03A6C3 */ jal status_bar_stop_blinking_starpoints D_802452AC: /* 173B8C 802452AC 00000000 */ nop D_802452B0: /* 173B90 802452B0 0C08F847 */ jal func_8023E11C D_802452B4: /* 173B94 802452B4 00000000 */ nop D_802452B8: /* 173B98 802452B8 2402000B */ addiu $v0, $zero, 0xB /* 173B9C 802452BC 3C01800E */ lui $at, %hi(gBattleSubState) jtbl_802452C0: /* 173BA0 802452C0 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel func_802452C4 /* 173BA4 802452C4 3C03800E */ lui $v1, %hi(gBattleSubState) D_802452C8: /* 173BA8 802452C8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) /* 173BAC 802452CC 2402000B */ addiu $v0, $zero, 0xB D_802452D0: /* 173BB0 802452D0 14620011 */ bne $v1, $v0, D_80245318 /* 173BB4 802452D4 3C030200 */ lui $v1, (0x2000000 >> 16) /* 173BB8 802452D8 96A202A8 */ lhu $v0, 0x2A8($s5) /* 173BBC 802452DC 24420001 */ addiu $v0, $v0, 0x1 /* 173BC0 802452E0 A6A202A8 */ sh $v0, 0x2A8($s5) /* 173BC4 802452E4 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) D_802452E8: /* 173BC8 802452E8 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) /* 173BCC 802452EC 00431024 */ and $v0, $v0, $v1 .L802452F0: /* 173BD0 802452F0 14400007 */ bnez $v0, D_80245310 /* 173BD4 802452F4 24020008 */ addiu $v0, $zero, 0x8 D_802452F8: /* 173BD8 802452F8 AFA20010 */ sw $v0, 0x10($sp) /* 173BDC 802452FC 0000202D */ daddu $a0, $zero, $zero D_80245300: /* 173BE0 80245300 2405FFFF */ addiu $a1, $zero, -0x1 D_80245304: /* 173BE4 80245304 0080302D */ daddu $a2, $a0, $zero D_80245308: /* 173BE8 80245308 0C052A46 */ jal bgm_set_song .L8024530C: /* 173BEC 8024530C 240705DC */ addiu $a3, $zero, 0x5DC D_80245310: /* 173BF0 80245310 0C090464 */ jal func_80241190 D_80245314: /* 173BF4 80245314 24040020 */ addiu $a0, $zero, 0x20 D_80245318: /* 173BF8 80245318 3C03800E */ lui $v1, %hi(gBattleSubState) .L8024531C: /* 173BFC 8024531C 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_80245320: /* 173C00 80245320 24020003 */ addiu $v0, $zero, 0x3 D_80245324: /* 173C04 80245324 10620005 */ beq $v1, $v0, D_8024533C D_80245328: /* 173C08 80245328 24020004 */ addiu $v0, $zero, 0x4 /* 173C0C 8024532C 10620022 */ beq $v1, $v0, D_802453B8_EF79C8 D_80245330: /* 173C10 80245330 00000000 */ nop /* 173C14 80245334 08091505 */ j .L80245414 D_80245338: /* 173C18 80245338 00000000 */ nop D_8024533C: /* 173C1C 8024533C 3C048028 */ lui $a0, %hi(EVS_Mario_HandlePhase) D_80245340: /* 173C20 80245340 24844EBC */ addiu $a0, $a0, %lo(EVS_Mario_HandlePhase) /* 173C24 80245344 2405000A */ addiu $a1, $zero, 0xA D_80245348: /* 173C28 80245348 0000302D */ daddu $a2, $zero, $zero /* 173C2C 8024534C 24020007 */ addiu $v0, $zero, 0x7 D_80245350_EEB900: /* 173C30 80245350 0C0B0CF8 */ jal start_script glabel func_80245354 /* 173C34 80245354 A22201A7 */ sb $v0, 0x1A7($s1) D_80245358_EEB908: /* 173C38 80245358 0040182D */ daddu $v1, $v0, $zero D_8024535C: /* 173C3C 8024535C AE6301D4 */ sw $v1, 0x1D4($s3) D_80245360_EEB910: /* 173C40 80245360 8C620144 */ lw $v0, 0x144($v1) /* 173C44 80245364 AE6201E4 */ sw $v0, 0x1E4($s3) D_80245368_EEB918: /* 173C48 80245368 1240000E */ beqz $s2, .L802453A4 D_8024536C: /* 173C4C 8024536C AC600148 */ sw $zero, 0x148($v1) D_80245370_EEB920: /* 173C50 80245370 82420216 */ lb $v0, 0x216($s2) D_80245374: /* 173C54 80245374 1440000C */ bnez $v0, .L802453A8 D_80245378_EEB928: /* 173C58 80245378 24020004 */ addiu $v0, $zero, 0x4 /* 173C5C 8024537C 2405000A */ addiu $a1, $zero, 0xA D_80245380_EEB930: /* 173C60 80245380 8E4401C4 */ lw $a0, 0x1C4($s2) /* 173C64 80245384 0C0B0CF8 */ jal start_script D_80245388_EEB938: /* 173C68 80245388 0000302D */ daddu $a2, $zero, $zero /* 173C6C 8024538C 0040182D */ daddu $v1, $v0, $zero D_80245390_EEB940: /* 173C70 80245390 AE4301D4 */ sw $v1, 0x1D4($s2) /* 173C74 80245394 8C620144 */ lw $v0, 0x144($v1) jtbl_80245398: /* 173C78 80245398 AE4201E4 */ sw $v0, 0x1E4($s2) .L8024539C: /* 173C7C 8024539C 24020100 */ addiu $v0, $zero, 0x100 .L802453A0: /* 173C80 802453A0 AC620148 */ sw $v0, 0x148($v1) .L802453A4: /* 173C84 802453A4 24020004 */ addiu $v0, $zero, 0x4 .L802453A8: /* 173C88 802453A8 3C01800E */ lui $at, %hi(gBattleSubState) /* 173C8C 802453AC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) D_802453B0: /* 173C90 802453B0 08091505 */ j .L80245414 /* 173C94 802453B4 00000000 */ nop D_802453B8_EF79C8: /* 173C98 802453B8 3C03802A */ lui $v1, %hi(D_8029F248) .L802453BC: /* 173C9C 802453BC 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) D_802453C0_EF79D0: /* 173CA0 802453C0 8C620000 */ lw $v0, 0x0($v1) /* 173CA4 802453C4 10400003 */ beqz $v0, .L802453D4 D_802453C8: /* 173CA8 802453C8 2442FFFF */ addiu $v0, $v0, -0x1 .L802453CC: /* 173CAC 802453CC 08091505 */ j .L80245414 D_802453D0: /* 173CB0 802453D0 AC620000 */ sw $v0, 0x0($v1) .L802453D4: /* 173CB4 802453D4 8E6401E4 */ lw $a0, 0x1E4($s3) D_802453D8: /* 173CB8 802453D8 0C0B1059 */ jal does_script_exist /* 173CBC 802453DC 00000000 */ nop D_802453E0_EEB990: /* 173CC0 802453E0 1440000C */ bnez $v0, .L80245414 /* 173CC4 802453E4 00000000 */ nop /* 173CC8 802453E8 12400005 */ beqz $s2, D_80245400 /* 173CCC 802453EC 00000000 */ nop D_802453F0: /* 173CD0 802453F0 0C0B1059 */ jal does_script_exist /* 173CD4 802453F4 8E4401E4 */ lw $a0, 0x1E4($s2) D_802453F8: /* 173CD8 802453F8 14400006 */ bnez $v0, .L80245414 .L802453FC: /* 173CDC 802453FC 00000000 */ nop D_80245400: /* 173CE0 80245400 8222008C */ lb $v0, 0x8C($s1) .L80245404: /* 173CE4 80245404 14400003 */ bnez $v0, .L80245414 D_80245408_EF7A18: /* 173CE8 80245408 00000000 */ nop /* 173CEC 8024540C 0C090464 */ jal func_80241190 jtbl_80245410: /* 173CF0 80245410 24040009 */ addiu $a0, $zero, 0x9 .L80245414: /* 173CF4 80245414 8FBF0030 */ lw $ra, 0x30($sp) .L80245418: /* 173CF8 80245418 8FB5002C */ lw $s5, 0x2C($sp) .L8024541C: /* 173CFC 8024541C 8FB40028 */ lw $s4, 0x28($sp) /* 173D00 80245420 8FB30024 */ lw $s3, 0x24($sp) .L80245424: /* 173D04 80245424 8FB20020 */ lw $s2, 0x20($sp) /* 173D08 80245428 8FB1001C */ lw $s1, 0x1C($sp) /* 173D0C 8024542C 8FB00018 */ lw $s0, 0x18($sp) D_80245430: /* 173D10 80245430 03E00008 */ jr $ra D_80245434: /* 173D14 80245434 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_run_away(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; EncounterStatus* currentEncounter = &gCurrentEncounter; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; Actor* enemy; s32 enemyCount; f32 totalEscapeChance; Evt* script; s32 i; switch (gBattleSubState) { case BTL_SUBSTATE_RUN_AWAY_EXEC_SCRIPT: battleStatus->stateFreezeCount = 0; gBattleStatus.flags1 &= ~BS_FLAGS1_BATTLE_FLED; gBattleStatus.flags2 |= BS_FLAGS2_10 | BS_FLAGS2_8 | BS_FLAGS2_4 | BS_FLAGS2_2; playerData->unk_2A6++; btl_cam_use_preset(BTL_CAM_PRESET_25); btl_cam_target_actor(ACTOR_PLAYER); // calculate average escape chance enemyCount = 0; totalEscapeChance = 0.0f; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL) { if (!(enemy->flags & ACTOR_FLAG_TARGET_ONLY)) { if (!(enemy->flags & ACTOR_FLAG_NO_DMG_APPLY)) { f32 escapeChance = enemy->actorBlueprint->escapeChance; if (enemy->debuff == STATUS_KEY_FEAR || enemy->debuff == STATUS_KEY_DIZZY || enemy->debuff == STATUS_KEY_PARALYZE || enemy->debuff == STATUS_KEY_SLEEP || enemy->debuff == STATUS_KEY_FROZEN || enemy->debuff == STATUS_KEY_STOP) { escapeChance = 100.0f; } totalEscapeChance += escapeChance; enemyCount += 1; } } } } player->state.varTable[0] = totalEscapeChance / enemyCount; if (gGameStatusPtr->debugEnemyContact == DEBUG_CONTACT_AUTO_FLEE) { player->state.varTable[0] = 100; } battleStatus->battlePhase = PHASE_RUN_AWAY_START; 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 && partner->koStatus == 0) { script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0); partner->takeTurnScript = script; partner->takeTurnScriptID = script->id; script->owner1.actorID = ACTOR_PARTNER; } gBattleSubState = BTL_SUBSTATE_RUN_AWAY_AWAIT_SCRIPT; break; case BTL_SUBSTATE_RUN_AWAY_AWAIT_SCRIPT: if (does_script_exist(player->takeTurnScriptID) || battleStatus->stateFreezeCount != 0) { break; } if (!(gBattleStatus.flags1 & BS_FLAGS1_BATTLE_FLED)) { gBattleSubState = BTL_SUBSTATE_RUN_AWAY_EXEC_POST_FAILURE; } else { currentEncounter->battleOutcome = OUTCOME_PLAYER_FLED; if (is_ability_active(ABILITY_RUNAWAY_PAY) == 0) { gBattleSubState = BTL_SUBSTATE_RUN_AWAY_DONE; } else { status_bar_start_blinking_starpoints(); func_8023E104(); D_8029F264 = 0; D_8029F24C = 0; BattleScreenFadeAmt = 0; // divide reward into 20 increments RunAwayRewardTotal = battleStatus->totalStarPoints * 100; RunAwayRewardStep = 20; RunAwayRewardIncrement = RunAwayRewardTotal / RunAwayRewardStep; gBattleSubState = BTL_SUBSTATE_RUN_AWAY_GIVE_STAR_POINTS; } } break; } if (gBattleSubState == BTL_SUBSTATE_RUN_AWAY_GIVE_STAR_POINTS) { if (battleStatus->totalStarPoints != 0) { s32 prevSP; //TODO shouldnt need to reuse enemyCount here, see BTL_SUBSTATE_CELEBRATE_TALLY_STAR_POINTS RunAwayRewardTotal -= RunAwayRewardIncrement; prevSP = battleStatus->totalStarPoints; battleStatus->totalStarPoints = (s8)(RunAwayRewardTotal / 100); enemyCount = prevSP - battleStatus->totalStarPoints; if (enemyCount > 0) { sfx_play_sound(SOUND_211); } playerData->starPoints += enemyCount; BattleScreenFadeAmt++; if (RunAwayRewardStep == 0 && battleStatus->totalStarPoints != 0) { playerData->starPoints++; } } if (playerData->starPoints >= 99) { playerData->starPoints = 99; } if (battleStatus->totalStarPoints == 0) { if (RunAwayRewardStep != 0) { RunAwayRewardStep--; } else { status_bar_stop_blinking_starpoints(); func_8023E11C(); gBattleSubState = BTL_SUBSTATE_RUN_AWAY_DONE; } } } if (gBattleSubState == BTL_SUBSTATE_RUN_AWAY_DONE) { playerData->battlesFled++; if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) { bgm_set_song(0, -1, 0, 1500, 8); } btl_set_state(BATTLE_STATE_END_BATTLE); } switch (gBattleSubState) { case BTL_SUBSTATE_RUN_AWAY_EXEC_POST_FAILURE: battleStatus->battlePhase = PHASE_RUN_AWAY_FAIL; 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 && partner->koStatus == 0) { script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0); partner->takeTurnScript = script; partner->takeTurnScriptID = script->id; script->owner1.actorID = ACTOR_PARTNER; } gBattleSubState = BTL_SUBSTATE_RUN_AWAY_AWAIT_POST_FAILURE; break; case BTL_SUBSTATE_RUN_AWAY_AWAIT_POST_FAILURE: if (D_8029F248 != 0) { D_8029F248--; return; } if (!does_script_exist(player->takeTurnScriptID) && (partner == NULL || !does_script_exist(partner->takeTurnScriptID)) && battleStatus->stateFreezeCount == 0 ) { btl_set_state(BATTLE_STATE_9); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel emote_appendGfx /* 334490 E00205D0 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 334494 E00205D4 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 334498 E00205D8 AFB600C0 */ sw $s6, 0xC0($sp) /* 33449C E00205DC 3C16800A */ lui $s6, %hi(gMainGfxPos) /* 3344A0 E00205E0 26D6A66C */ addiu $s6, $s6, %lo(gMainGfxPos) /* 3344A4 E00205E4 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3344A8 E00205E8 AFBF00CC */ sw $ra, 0xCC($sp) /* 3344AC E00205EC AFBE00C8 */ sw $fp, 0xC8($sp) /* 3344B0 E00205F0 AFB700C4 */ sw $s7, 0xC4($sp) /* 3344B4 E00205F4 AFB500BC */ sw $s5, 0xBC($sp) /* 3344B8 E00205F8 AFB400B8 */ sw $s4, 0xB8($sp) /* 3344BC E00205FC AFB300B4 */ sw $s3, 0xB4($sp) /* 3344C0 E0020600 AFB200B0 */ sw $s2, 0xB0($sp) /* 3344C4 E0020604 AFB100AC */ sw $s1, 0xAC($sp) /* 3344C8 E0020608 AFB000A8 */ sw $s0, 0xA8($sp) /* 3344CC E002060C F7B600D8 */ sdc1 $f22, 0xD8($sp) /* 3344D0 E0020610 F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 3344D4 E0020614 8EC50000 */ lw $a1, 0x0($s6) /* 3344D8 E0020618 8C94000C */ lw $s4, 0xC($a0) /* 3344DC E002061C 00A0182D */ daddu $v1, $a1, $zero /* 3344E0 E0020620 24A50008 */ addiu $a1, $a1, 0x8 /* 3344E4 E0020624 AEC50000 */ sw $a1, 0x0($s6) /* 3344E8 E0020628 8E950000 */ lw $s5, 0x0($s4) /* 3344EC E002062C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3344F0 E0020630 AC620000 */ sw $v0, 0x0($v1) /* 3344F4 E0020634 AC600004 */ sw $zero, 0x4($v1) /* 3344F8 E0020638 ACA60000 */ sw $a2, 0x0($a1) /* 3344FC E002063C 8C830010 */ lw $v1, 0x10($a0) /* 334500 E0020640 24A20008 */ addiu $v0, $a1, 0x8 /* 334504 E0020644 AEC20000 */ sw $v0, 0x0($s6) /* 334508 E0020648 8C62001C */ lw $v0, 0x1C($v1) /* 33450C E002064C 3C038000 */ lui $v1, (0x80000000 >> 16) /* 334510 E0020650 00431021 */ addu $v0, $v0, $v1 /* 334514 E0020654 ACA20004 */ sw $v0, 0x4($a1) /* 334518 E0020658 24020001 */ addiu $v0, $zero, 0x1 /* 33451C E002065C 12A2006D */ beq $s5, $v0, .LE0020814 /* 334520 E0020660 27A40018 */ addiu $a0, $sp, 0x18 /* 334524 E0020664 3C130001 */ lui $s3, (0x11630 >> 16) /* 334528 E0020668 8E850004 */ lw $a1, 0x4($s4) /* 33452C E002066C 8E860008 */ lw $a2, 0x8($s4) /* 334530 E0020670 8E87000C */ lw $a3, 0xC($s4) /* 334534 E0020674 0C080108 */ jal shim_guTranslateF /* 334538 E0020678 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 33453C E002067C 27B00058 */ addiu $s0, $sp, 0x58 /* 334540 E0020680 4480B000 */ mtc1 $zero, $f22 /* 334544 E0020684 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 334548 E0020688 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 33454C E002068C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 334550 E0020690 4481A000 */ mtc1 $at, $f20 /* 334554 E0020694 00031080 */ sll $v0, $v1, 2 /* 334558 E0020698 00431021 */ addu $v0, $v0, $v1 /* 33455C E002069C 00021080 */ sll $v0, $v0, 2 /* 334560 E00206A0 00431023 */ subu $v0, $v0, $v1 /* 334564 E00206A4 000218C0 */ sll $v1, $v0, 3 /* 334568 E00206A8 00431021 */ addu $v0, $v0, $v1 /* 33456C E00206AC 000210C0 */ sll $v0, $v0, 3 /* 334570 E00206B0 4406B000 */ mfc1 $a2, $f22 /* 334574 E00206B4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 334578 E00206B8 00220821 */ addu $at, $at, $v0 /* 33457C E00206BC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 334580 E00206C0 4407A000 */ mfc1 $a3, $f20 /* 334584 E00206C4 46000007 */ neg.s $f0, $f0 /* 334588 E00206C8 44050000 */ mfc1 $a1, $f0 /* 33458C E00206CC 0200202D */ daddu $a0, $s0, $zero /* 334590 E00206D0 0C080104 */ jal shim_guRotateF /* 334594 E00206D4 E7B60010 */ swc1 $f22, 0x10($sp) /* 334598 E00206D8 0200202D */ daddu $a0, $s0, $zero /* 33459C E00206DC 27A50018 */ addiu $a1, $sp, 0x18 /* 3345A0 E00206E0 0C080114 */ jal shim_guMtxCatF /* 3345A4 E00206E4 00A0302D */ daddu $a2, $a1, $zero /* 3345A8 E00206E8 27A40018 */ addiu $a0, $sp, 0x18 /* 3345AC E00206EC 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 3345B0 E00206F0 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 3345B4 E00206F4 3C12800A */ lui $s2, %hi(gDisplayContext) /* 3345B8 E00206F8 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 3345BC E00206FC 96220000 */ lhu $v0, 0x0($s1) /* 3345C0 E0020700 8E460000 */ lw $a2, 0x0($s2) /* 3345C4 E0020704 00022980 */ sll $a1, $v0, 6 /* 3345C8 E0020708 00B32821 */ addu $a1, $a1, $s3 /* 3345CC E002070C 00C52821 */ addu $a1, $a2, $a1 /* 3345D0 E0020710 24430001 */ addiu $v1, $v0, 0x1 /* 3345D4 E0020714 00021180 */ sll $v0, $v0, 6 /* 3345D8 E0020718 00531021 */ addu $v0, $v0, $s3 /* 3345DC E002071C 00C23021 */ addu $a2, $a2, $v0 /* 3345E0 E0020720 A6230000 */ sh $v1, 0x0($s1) /* 3345E4 E0020724 0C080118 */ jal shim_guMtxF2L /* 3345E8 E0020728 AFA60098 */ sw $a2, 0x98($sp) /* 3345EC E002072C 4405A000 */ mfc1 $a1, $f20 /* 3345F0 E0020730 3C063F4C */ lui $a2, (0x3F4CCCCD >> 16) /* 3345F4 E0020734 34C6CCCD */ ori $a2, $a2, (0x3F4CCCCD & 0xFFFF) /* 3345F8 E0020738 4407A000 */ mfc1 $a3, $f20 /* 3345FC E002073C 0C080110 */ jal shim_guScaleF /* 334600 E0020740 0200202D */ daddu $a0, $s0, $zero /* 334604 E0020744 0200202D */ daddu $a0, $s0, $zero /* 334608 E0020748 27A50018 */ addiu $a1, $sp, 0x18 /* 33460C E002074C 0C080114 */ jal shim_guMtxCatF /* 334610 E0020750 00A0302D */ daddu $a2, $a1, $zero /* 334614 E0020754 4406B000 */ mfc1 $a2, $f22 /* 334618 E0020758 0200202D */ daddu $a0, $s0, $zero /* 33461C E002075C E7B40010 */ swc1 $f20, 0x10($sp) /* 334620 E0020760 8E850024 */ lw $a1, 0x24($s4) /* 334624 E0020764 0C080104 */ jal shim_guRotateF /* 334628 E0020768 00C0382D */ daddu $a3, $a2, $zero /* 33462C E002076C 0200202D */ daddu $a0, $s0, $zero /* 334630 E0020770 27A50018 */ addiu $a1, $sp, 0x18 /* 334634 E0020774 0C080114 */ jal shim_guMtxCatF /* 334638 E0020778 00A0302D */ daddu $a2, $a1, $zero /* 33463C E002077C 27A40018 */ addiu $a0, $sp, 0x18 /* 334640 E0020780 96250000 */ lhu $a1, 0x0($s1) /* 334644 E0020784 8E420000 */ lw $v0, 0x0($s2) /* 334648 E0020788 00052980 */ sll $a1, $a1, 6 /* 33464C E002078C 00B32821 */ addu $a1, $a1, $s3 /* 334650 E0020790 0C080118 */ jal shim_guMtxF2L /* 334654 E0020794 00452821 */ addu $a1, $v0, $a1 /* 334658 E0020798 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 33465C E002079C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 334660 E00207A0 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 334664 E00207A4 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 334668 E00207A8 8EC40000 */ lw $a0, 0x0($s6) /* 33466C E00207AC 96220000 */ lhu $v0, 0x0($s1) /* 334670 E00207B0 0080282D */ daddu $a1, $a0, $zero /* 334674 E00207B4 24840008 */ addiu $a0, $a0, 0x8 /* 334678 E00207B8 AEC40000 */ sw $a0, 0x0($s6) /* 33467C E00207BC ACA30000 */ sw $v1, 0x0($a1) /* 334680 E00207C0 24430001 */ addiu $v1, $v0, 0x1 /* 334684 E00207C4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 334688 E00207C8 00021180 */ sll $v0, $v0, 6 /* 33468C E00207CC A6230000 */ sh $v1, 0x0($s1) /* 334690 E00207D0 8E430000 */ lw $v1, 0x0($s2) /* 334694 E00207D4 00531021 */ addu $v0, $v0, $s3 /* 334698 E00207D8 00621821 */ addu $v1, $v1, $v0 /* 33469C E00207DC 24820008 */ addiu $v0, $a0, 0x8 /* 3346A0 E00207E0 ACA30004 */ sw $v1, 0x4($a1) /* 3346A4 E00207E4 AEC20000 */ sw $v0, 0x0($s6) /* 3346A8 E00207E8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3346AC E00207EC AC820000 */ sw $v0, 0x0($a0) /* 3346B0 E00207F0 3C020900 */ lui $v0, %hi(D_09002170_40F400) /* 3346B4 E00207F4 24422170 */ addiu $v0, $v0, %lo(D_09002170_40F400) /* 3346B8 E00207F8 AC820004 */ sw $v0, 0x4($a0) /* 3346BC E00207FC 24820010 */ addiu $v0, $a0, 0x10 /* 3346C0 E0020800 AEC20000 */ sw $v0, 0x0($s6) /* 3346C4 E0020804 24020040 */ addiu $v0, $zero, 0x40 /* 3346C8 E0020808 AC860008 */ sw $a2, 0x8($a0) /* 3346CC E002080C 08008276 */ j .LE00209D8 /* 3346D0 E0020810 AC82000C */ sw $v0, 0xC($a0) .LE0020814: /* 3346D4 E0020814 8E820038 */ lw $v0, 0x38($s4) /* 3346D8 E0020818 1440010F */ bnez $v0, .LE0020C58 /* 3346DC E002081C 0000982D */ daddu $s3, $zero, $zero /* 3346E0 E0020820 27B10058 */ addiu $s1, $sp, 0x58 /* 3346E4 E0020824 3C1E800A */ lui $fp, %hi(gDisplayContext) /* 3346E8 E0020828 27DEA674 */ addiu $fp, $fp, %lo(gDisplayContext) /* 3346EC E002082C 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 3346F0 E0020830 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 3346F4 E0020834 3C150001 */ lui $s5, (0x11630 >> 16) /* 3346F8 E0020838 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 3346FC E002083C 02C0902D */ daddu $s2, $s6, $zero /* 334700 E0020840 26900028 */ addiu $s0, $s4, 0x28 /* 334704 E0020844 4480A000 */ mtc1 $zero, $f20 /* 334708 E0020848 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 33470C E002084C 4481B000 */ mtc1 $at, $f22 .LE0020850: /* 334710 E0020850 27A40018 */ addiu $a0, $sp, 0x18 /* 334714 E0020854 8E05FFDC */ lw $a1, -0x24($s0) /* 334718 E0020858 8E06FFE0 */ lw $a2, -0x20($s0) /* 33471C E002085C 8E07FFE4 */ lw $a3, -0x1C($s0) /* 334720 E0020860 0C080108 */ jal shim_guTranslateF /* 334724 E0020864 26730001 */ addiu $s3, $s3, 0x1 /* 334728 E0020868 3C09800B */ lui $t1, %hi(gCameras) /* 33472C E002086C 25291D80 */ addiu $t1, $t1, %lo(gCameras) /* 334730 E0020870 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 334734 E0020874 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 334738 E0020878 4406A000 */ mfc1 $a2, $f20 /* 33473C E002087C 00031080 */ sll $v0, $v1, 2 /* 334740 E0020880 00431021 */ addu $v0, $v0, $v1 /* 334744 E0020884 00021080 */ sll $v0, $v0, 2 /* 334748 E0020888 00431023 */ subu $v0, $v0, $v1 /* 33474C E002088C 000218C0 */ sll $v1, $v0, 3 /* 334750 E0020890 00431021 */ addu $v0, $v0, $v1 /* 334754 E0020894 000210C0 */ sll $v0, $v0, 3 /* 334758 E0020898 00491021 */ addu $v0, $v0, $t1 /* 33475C E002089C C440006C */ lwc1 $f0, 0x6C($v0) /* 334760 E00208A0 4407B000 */ mfc1 $a3, $f22 /* 334764 E00208A4 46000007 */ neg.s $f0, $f0 /* 334768 E00208A8 44050000 */ mfc1 $a1, $f0 /* 33476C E00208AC 0220202D */ daddu $a0, $s1, $zero /* 334770 E00208B0 0C080104 */ jal shim_guRotateF /* 334774 E00208B4 E7B40010 */ swc1 $f20, 0x10($sp) /* 334778 E00208B8 0220202D */ daddu $a0, $s1, $zero /* 33477C E00208BC 27A50018 */ addiu $a1, $sp, 0x18 /* 334780 E00208C0 0C080114 */ jal shim_guMtxCatF /* 334784 E00208C4 00A0302D */ daddu $a2, $a1, $zero /* 334788 E00208C8 E7B60010 */ swc1 $f22, 0x10($sp) /* 33478C E00208CC 8E05FFFC */ lw $a1, -0x4($s0) /* 334790 E00208D0 4406A000 */ mfc1 $a2, $f20 /* 334794 E00208D4 4407A000 */ mfc1 $a3, $f20 /* 334798 E00208D8 0C080104 */ jal shim_guRotateF /* 33479C E00208DC 0220202D */ daddu $a0, $s1, $zero /* 3347A0 E00208E0 0220202D */ daddu $a0, $s1, $zero /* 3347A4 E00208E4 27A50018 */ addiu $a1, $sp, 0x18 /* 3347A8 E00208E8 0C080114 */ jal shim_guMtxCatF /* 3347AC E00208EC 00A0302D */ daddu $a2, $a1, $zero /* 3347B0 E00208F0 0220202D */ daddu $a0, $s1, $zero /* 3347B4 E00208F4 8E050000 */ lw $a1, 0x0($s0) /* 3347B8 E00208F8 26100040 */ addiu $s0, $s0, 0x40 /* 3347BC E00208FC 4407B000 */ mfc1 $a3, $f22 /* 3347C0 E0020900 0C080110 */ jal shim_guScaleF /* 3347C4 E0020904 00A0302D */ daddu $a2, $a1, $zero /* 3347C8 E0020908 0220202D */ daddu $a0, $s1, $zero /* 3347CC E002090C 27A50018 */ addiu $a1, $sp, 0x18 /* 3347D0 E0020910 0C080114 */ jal shim_guMtxCatF /* 3347D4 E0020914 00A0302D */ daddu $a2, $a1, $zero /* 3347D8 E0020918 27A40018 */ addiu $a0, $sp, 0x18 /* 3347DC E002091C 96E50000 */ lhu $a1, 0x0($s7) /* 3347E0 E0020920 8FC20000 */ lw $v0, 0x0($fp) /* 3347E4 E0020924 00052980 */ sll $a1, $a1, 6 /* 3347E8 E0020928 00B52821 */ addu $a1, $a1, $s5 /* 3347EC E002092C 0C080118 */ jal shim_guMtxF2L /* 3347F0 E0020930 00452821 */ addu $a1, $v0, $a1 /* 3347F4 E0020934 3C05EB1C */ lui $a1, (0xEB1C00FF >> 16) /* 3347F8 E0020938 34A500FF */ ori $a1, $a1, (0xEB1C00FF & 0xFFFF) /* 3347FC E002093C 3C06DA38 */ lui $a2, (0xDA380002 >> 16) /* 334800 E0020940 34C60002 */ ori $a2, $a2, (0xDA380002 & 0xFFFF) /* 334804 E0020944 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 334808 E0020948 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 33480C E002094C 8E440000 */ lw $a0, 0x0($s2) /* 334810 E0020950 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 334814 E0020954 0080182D */ daddu $v1, $a0, $zero /* 334818 E0020958 24840008 */ addiu $a0, $a0, 0x8 /* 33481C E002095C AE440000 */ sw $a0, 0x0($s2) /* 334820 E0020960 AC620000 */ sw $v0, 0x0($v1) /* 334824 E0020964 AC650004 */ sw $a1, 0x4($v1) /* 334828 E0020968 96E30000 */ lhu $v1, 0x0($s7) /* 33482C E002096C 24820008 */ addiu $v0, $a0, 0x8 /* 334830 E0020970 AE420000 */ sw $v0, 0x0($s2) /* 334834 E0020974 AC860000 */ sw $a2, 0x0($a0) /* 334838 E0020978 24620001 */ addiu $v0, $v1, 0x1 /* 33483C E002097C 3063FFFF */ andi $v1, $v1, 0xFFFF /* 334840 E0020980 00031980 */ sll $v1, $v1, 6 /* 334844 E0020984 A6E20000 */ sh $v0, 0x0($s7) /* 334848 E0020988 8FC20000 */ lw $v0, 0x0($fp) /* 33484C E002098C 00751821 */ addu $v1, $v1, $s5 /* 334850 E0020990 00431021 */ addu $v0, $v0, $v1 /* 334854 E0020994 AC820004 */ sw $v0, 0x4($a0) /* 334858 E0020998 24820010 */ addiu $v0, $a0, 0x10 /* 33485C E002099C AE420000 */ sw $v0, 0x0($s2) /* 334860 E00209A0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 334864 E00209A4 AC820008 */ sw $v0, 0x8($a0) /* 334868 E00209A8 3C020900 */ lui $v0, %hi(D_09002578_40F808) /* 33486C E00209AC 24422578 */ addiu $v0, $v0, %lo(D_09002578_40F808) /* 334870 E00209B0 AC82000C */ sw $v0, 0xC($a0) /* 334874 E00209B4 24820018 */ addiu $v0, $a0, 0x18 /* 334878 E00209B8 AE420000 */ sw $v0, 0x0($s2) /* 33487C E00209BC 24020040 */ addiu $v0, $zero, 0x40 /* 334880 E00209C0 AC820014 */ sw $v0, 0x14($a0) /* 334884 E00209C4 2A620003 */ slti $v0, $s3, 0x3 /* 334888 E00209C8 1440FFA1 */ bnez $v0, .LE0020850 /* 33488C E00209CC AC870010 */ sw $a3, 0x10($a0) /* 334890 E00209D0 08008316 */ j .LE0020C58 /* 334894 E00209D4 00000000 */ nop .LE00209D8: /* 334898 E00209D8 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 33489C E00209DC 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 3348A0 E00209E0 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 3348A4 E00209E4 8CC50000 */ lw $a1, 0x0($a2) /* 3348A8 E00209E8 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3348AC E00209EC 00A0102D */ daddu $v0, $a1, $zero /* 3348B0 E00209F0 24A50008 */ addiu $a1, $a1, 0x8 /* 3348B4 E00209F4 ACC50000 */ sw $a1, 0x0($a2) /* 3348B8 E00209F8 AC430000 */ sw $v1, 0x0($v0) /* 3348BC E00209FC 8FA90098 */ lw $t1, 0x98($sp) /* 3348C0 E0020A00 24030002 */ addiu $v1, $zero, 0x2 /* 3348C4 E0020A04 AC490004 */ sw $t1, 0x4($v0) /* 3348C8 E0020A08 00151080 */ sll $v0, $s5, 2 /* 3348CC E0020A0C 8E840038 */ lw $a0, 0x38($s4) /* 3348D0 E0020A10 3C07E002 */ lui $a3, (0xE0020CA4 >> 16) /* 3348D4 E0020A14 00E23821 */ addu $a3, $a3, $v0 /* 3348D8 E0020A18 8CE70CA4 */ lw $a3, (0xE0020CA4 & 0xFFFF)($a3) /* 3348DC E0020A1C 3C08E002 */ lui $t0, (0xE0020C90 >> 16) /* 3348E0 E0020A20 01024021 */ addu $t0, $t0, $v0 /* 3348E4 E0020A24 8D080C90 */ lw $t0, (0xE0020C90 & 0xFFFF)($t0) /* 3348E8 E0020A28 12A30016 */ beq $s5, $v1, .LE0020A84 /* 3348EC E0020A2C 2AA20003 */ slti $v0, $s5, 0x3 /* 3348F0 E0020A30 50400005 */ beql $v0, $zero, .LE0020A48 /* 3348F4 E0020A34 24020003 */ addiu $v0, $zero, 0x3 /* 3348F8 E0020A38 12A00009 */ beqz $s5, .LE0020A60 /* 3348FC E0020A3C 24090010 */ addiu $t1, $zero, 0x10 /* 334900 E0020A40 080082E2 */ j .LE0020B88 /* 334904 E0020A44 00000000 */ nop .LE0020A48: /* 334908 E0020A48 12A2001E */ beq $s5, $v0, .LE0020AC4 /* 33490C E0020A4C 24020004 */ addiu $v0, $zero, 0x4 /* 334910 E0020A50 12A20046 */ beq $s5, $v0, .LE0020B6C /* 334914 E0020A54 24090020 */ addiu $t1, $zero, 0x20 /* 334918 E0020A58 080082E2 */ j .LE0020B88 /* 33491C E0020A5C 00000000 */ nop .LE0020A60: /* 334920 E0020A60 00041900 */ sll $v1, $a0, 4 /* 334924 E0020A64 24020080 */ addiu $v0, $zero, 0x80 /* 334928 E0020A68 0043B823 */ subu $s7, $v0, $v1 /* 33492C E0020A6C 0000F02D */ daddu $fp, $zero, $zero /* 334930 E0020A70 3C03DC00 */ lui $v1, (0xDC0000FF >> 16) /* 334934 E0020A74 346300FF */ ori $v1, $v1, (0xDC0000FF & 0xFFFF) /* 334938 E0020A78 24A20008 */ addiu $v0, $a1, 0x8 /* 33493C E0020A7C 080082AB */ j .LE0020AAC /* 334940 E0020A80 AFA9009C */ sw $t1, 0x9C($sp) .LE0020A84: /* 334944 E0020A84 24090020 */ addiu $t1, $zero, 0x20 /* 334948 E0020A88 AFA9009C */ sw $t1, 0x9C($sp) /* 33494C E0020A8C 24090030 */ addiu $t1, $zero, 0x30 /* 334950 E0020A90 00041940 */ sll $v1, $a0, 5 /* 334954 E0020A94 24020080 */ addiu $v0, $zero, 0x80 /* 334958 E0020A98 0043B823 */ subu $s7, $v0, $v1 /* 33495C E0020A9C 0000F02D */ daddu $fp, $zero, $zero /* 334960 E0020AA0 3C03DC00 */ lui $v1, (0xDC0000FF >> 16) /* 334964 E0020AA4 346300FF */ ori $v1, $v1, (0xDC0000FF & 0xFFFF) /* 334968 E0020AA8 24A20008 */ addiu $v0, $a1, 0x8 .LE0020AAC: /* 33496C E0020AAC AFA900A0 */ sw $t1, 0xA0($sp) /* 334970 E0020AB0 ACC20000 */ sw $v0, 0x0($a2) /* 334974 E0020AB4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 334978 E0020AB8 ACA20000 */ sw $v0, 0x0($a1) /* 33497C E0020ABC 080082E2 */ j .LE0020B88 /* 334980 E0020AC0 ACA30004 */ sw $v1, 0x4($a1) .LE0020AC4: /* 334984 E0020AC4 24090020 */ addiu $t1, $zero, 0x20 /* 334988 E0020AC8 00041940 */ sll $v1, $a0, 5 /* 33498C E0020ACC 24020080 */ addiu $v0, $zero, 0x80 /* 334990 E0020AD0 0043B823 */ subu $s7, $v0, $v1 /* 334994 E0020AD4 0000F02D */ daddu $fp, $zero, $zero /* 334998 E0020AD8 3C039249 */ lui $v1, (0x92492493 >> 16) /* 33499C E0020ADC AFA9009C */ sw $t1, 0x9C($sp) /* 3349A0 E0020AE0 AFA900A0 */ sw $t1, 0xA0($sp) /* 3349A4 E0020AE4 8E82002C */ lw $v0, 0x2C($s4) /* 3349A8 E0020AE8 34632493 */ ori $v1, $v1, (0x92492493 & 0xFFFF) /* 3349AC E0020AEC 00022040 */ sll $a0, $v0, 1 /* 3349B0 E0020AF0 00822021 */ addu $a0, $a0, $v0 /* 3349B4 E0020AF4 24A20008 */ addiu $v0, $a1, 0x8 /* 3349B8 E0020AF8 00830018 */ mult $a0, $v1 /* 3349BC E0020AFC ACC20000 */ sw $v0, 0x0($a2) /* 3349C0 E0020B00 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3349C4 E0020B04 00041FC3 */ sra $v1, $a0, 31 /* 3349C8 E0020B08 ACA20000 */ sw $v0, 0x0($a1) /* 3349CC E0020B0C 00004810 */ mfhi $t1 /* 3349D0 E0020B10 01241021 */ addu $v0, $t1, $a0 /* 3349D4 E0020B14 00021083 */ sra $v0, $v0, 2 /* 3349D8 E0020B18 00431823 */ subu $v1, $v0, $v1 /* 3349DC E0020B1C 000310C0 */ sll $v0, $v1, 3 /* 3349E0 E0020B20 00431023 */ subu $v0, $v0, $v1 /* 3349E4 E0020B24 00821823 */ subu $v1, $a0, $v0 /* 3349E8 E0020B28 3C02E002 */ lui $v0, (0xE0020D94 >> 16) /* 3349EC E0020B2C 00431021 */ addu $v0, $v0, $v1 /* 3349F0 E0020B30 90420D94 */ lbu $v0, (0xE0020D94 & 0xFFFF)($v0) /* 3349F4 E0020B34 3C04E002 */ lui $a0, (0xE0020D95 >> 16) /* 3349F8 E0020B38 00832021 */ addu $a0, $a0, $v1 /* 3349FC E0020B3C 90840D95 */ lbu $a0, (0xE0020D95 & 0xFFFF)($a0) /* 334A00 E0020B40 3C01E002 */ lui $at, (0xE0020D96 >> 16) /* 334A04 E0020B44 00230821 */ addu $at, $at, $v1 /* 334A08 E0020B48 90230D96 */ lbu $v1, (0xE0020D96 & 0xFFFF)($at) /* 334A0C E0020B4C 00021600 */ sll $v0, $v0, 24 /* 334A10 E0020B50 00042400 */ sll $a0, $a0, 16 /* 334A14 E0020B54 00441025 */ or $v0, $v0, $a0 /* 334A18 E0020B58 00031A00 */ sll $v1, $v1, 8 /* 334A1C E0020B5C 00431025 */ or $v0, $v0, $v1 /* 334A20 E0020B60 344200FF */ ori $v0, $v0, 0xFF /* 334A24 E0020B64 080082E2 */ j .LE0020B88 /* 334A28 E0020B68 ACA20004 */ sw $v0, 0x4($a1) .LE0020B6C: /* 334A2C E0020B6C AFA9009C */ sw $t1, 0x9C($sp) /* 334A30 E0020B70 24090008 */ addiu $t1, $zero, 0x8 /* 334A34 E0020B74 00041940 */ sll $v1, $a0, 5 /* 334A38 E0020B78 24020080 */ addiu $v0, $zero, 0x80 /* 334A3C E0020B7C 0043B823 */ subu $s7, $v0, $v1 /* 334A40 E0020B80 0000F02D */ daddu $fp, $zero, $zero /* 334A44 E0020B84 AFA900A0 */ sw $t1, 0xA0($sp) .LE0020B88: /* 334A48 E0020B88 10E0000A */ beqz $a3, .LE0020BB4 /* 334A4C E0020B8C 00000000 */ nop /* 334A50 E0020B90 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 334A54 E0020B94 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 334A58 E0020B98 8C620000 */ lw $v0, 0x0($v1) /* 334A5C E0020B9C 0040202D */ daddu $a0, $v0, $zero /* 334A60 E0020BA0 24420008 */ addiu $v0, $v0, 0x8 /* 334A64 E0020BA4 AC620000 */ sw $v0, 0x0($v1) /* 334A68 E0020BA8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 334A6C E0020BAC AC820000 */ sw $v0, 0x0($a0) /* 334A70 E0020BB0 AC870004 */ sw $a3, 0x4($a0) .LE0020BB4: /* 334A74 E0020BB4 3C07800A */ lui $a3, %hi(gMainGfxPos) /* 334A78 E0020BB8 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* 334A7C E0020BBC 00171080 */ sll $v0, $s7, 2 /* 334A80 E0020BC0 30420FFF */ andi $v0, $v0, 0xFFF /* 334A84 E0020BC4 00021300 */ sll $v0, $v0, 12 /* 334A88 E0020BC8 001E1880 */ sll $v1, $fp, 2 /* 334A8C E0020BCC 30630FFF */ andi $v1, $v1, 0xFFF /* 334A90 E0020BD0 3C04F200 */ lui $a0, (0xF2000000 >> 16) /* 334A94 E0020BD4 00641825 */ or $v1, $v1, $a0 /* 334A98 E0020BD8 8CE60000 */ lw $a2, 0x0($a3) /* 334A9C E0020BDC 00431025 */ or $v0, $v0, $v1 /* 334AA0 E0020BE0 00C0282D */ daddu $a1, $a2, $zero /* 334AA4 E0020BE4 24C60008 */ addiu $a2, $a2, 0x8 /* 334AA8 E0020BE8 ACE60000 */ sw $a2, 0x0($a3) /* 334AAC E0020BEC ACA20000 */ sw $v0, 0x0($a1) /* 334AB0 E0020BF0 8FA9009C */ lw $t1, 0x9C($sp) /* 334AB4 E0020BF4 02E91821 */ addu $v1, $s7, $t1 /* 334AB8 E0020BF8 00031880 */ sll $v1, $v1, 2 /* 334ABC E0020BFC 30630FFF */ andi $v1, $v1, 0xFFF /* 334AC0 E0020C00 8FA900A0 */ lw $t1, 0xA0($sp) /* 334AC4 E0020C04 00031B00 */ sll $v1, $v1, 12 /* 334AC8 E0020C08 03C91021 */ addu $v0, $fp, $t1 /* 334ACC E0020C0C 00021080 */ sll $v0, $v0, 2 /* 334AD0 E0020C10 30420FFF */ andi $v0, $v0, 0xFFF /* 334AD4 E0020C14 00621825 */ or $v1, $v1, $v0 /* 334AD8 E0020C18 11000006 */ beqz $t0, .LE0020C34 /* 334ADC E0020C1C ACA30004 */ sw $v1, 0x4($a1) /* 334AE0 E0020C20 24C20008 */ addiu $v0, $a2, 0x8 /* 334AE4 E0020C24 ACE20000 */ sw $v0, 0x0($a3) /* 334AE8 E0020C28 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 334AEC E0020C2C ACC20000 */ sw $v0, 0x0($a2) /* 334AF0 E0020C30 ACC80004 */ sw $t0, 0x4($a2) .LE0020C34: /* 334AF4 E0020C34 3C04D838 */ lui $a0, (0xD8380002 >> 16) /* 334AF8 E0020C38 8CE20000 */ lw $v0, 0x0($a3) /* 334AFC E0020C3C 34840002 */ ori $a0, $a0, (0xD8380002 & 0xFFFF) /* 334B00 E0020C40 0040182D */ daddu $v1, $v0, $zero /* 334B04 E0020C44 24420008 */ addiu $v0, $v0, 0x8 /* 334B08 E0020C48 ACE20000 */ sw $v0, 0x0($a3) /* 334B0C E0020C4C 24020040 */ addiu $v0, $zero, 0x40 /* 334B10 E0020C50 AC640000 */ sw $a0, 0x0($v1) /* 334B14 E0020C54 AC620004 */ sw $v0, 0x4($v1) .LE0020C58: /* 334B18 E0020C58 8FBF00CC */ lw $ra, 0xCC($sp) /* 334B1C E0020C5C 8FBE00C8 */ lw $fp, 0xC8($sp) /* 334B20 E0020C60 8FB700C4 */ lw $s7, 0xC4($sp) /* 334B24 E0020C64 8FB600C0 */ lw $s6, 0xC0($sp) /* 334B28 E0020C68 8FB500BC */ lw $s5, 0xBC($sp) /* 334B2C E0020C6C 8FB400B8 */ lw $s4, 0xB8($sp) /* 334B30 E0020C70 8FB300B4 */ lw $s3, 0xB4($sp) /* 334B34 E0020C74 8FB200B0 */ lw $s2, 0xB0($sp) /* 334B38 E0020C78 8FB100AC */ lw $s1, 0xAC($sp) /* 334B3C E0020C7C 8FB000A8 */ lw $s0, 0xA8($sp) /* 334B40 E0020C80 D7B600D8 */ ldc1 $f22, 0xD8($sp) /* 334B44 E0020C84 D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 334B48 E0020C88 03E00008 */ jr $ra /* 334B4C E0020C8C 27BD00E0 */ addiu $sp, $sp, 0xE0 ### DECOMPILED C INSTRUCTIONS: void emote_appendGfx(void* effect) { EmoteFXData* part = ((EffectInstance*)effect)->data.emote; s32 type = part->unk_00; s32 unk_38; Gfx* dlist; Gfx* dlist2; Mtx* matrix; s32 w; s32 h; s32 uls; s32 ult; s32 idx; Matrix4f sp18; Matrix4f sp58; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); if (type != 1) { shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); matrix = &gDisplayContext->matrixStack[gMatrixListPos]; shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos++]); shim_guScaleF(sp58, 1.0f, 0.8f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, part->unk_24, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09002170_336DE0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } else { if (part->unk_38 == 0) { for (i = 0; i < 3; i++, part++) { shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, part->unk_24, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, part->unk_28, part->unk_28, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gDPSetPrimColor(gMainGfxPos++, 0, 0, 235, 28, 0, 255); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09002578_3371E8); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } return; } gSPMatrix(gMainGfxPos++, matrix, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); unk_38 = part->unk_38; dlist = D_E0020CA4[type]; dlist2 = D_E0020C90[type]; switch (type) { case 0: w = 16; h = 16; uls = 128 - unk_38 * 16; ult = 0; gDPSetPrimColor(gMainGfxPos++, 0, 0, 220, 0, 0, 255); break; case 2: w = 32; h = 48; uls = 128 - unk_38 * 32; ult = 0; gDPSetPrimColor(gMainGfxPos++, 0, 0, 220, 0, 0, 255); break; case 3: w = 32; h = 32; uls = 128 - unk_38 * 32; ult = 0; idx = (part->unk_2C * 3) % (ARRAY_COUNT(D_E0020D94) / 3); gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0020D94[idx], D_E0020D94[idx + 1], D_E0020D94[idx + 2], 255); break; case 4: w = 32; h = 8; uls = 128 - unk_38 * 32; ult = 0; break; } if (dlist != NULL) { gSPDisplayList(gMainGfxPos++, dlist); } gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls * 4, ult * 4, (uls + w) * 4, (ult + h) * 4); if (dlist2 != NULL) { gSPDisplayList(gMainGfxPos++, dlist2); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel energy_in_out_main /* 3D5020 E00D6000 27BDFF78 */ addiu $sp, $sp, -0x88 /* 3D5024 E00D6004 F7B40060 */ sdc1 $f20, 0x60($sp) /* 3D5028 E00D6008 4485A000 */ mtc1 $a1, $f20 /* 3D502C E00D600C F7B60068 */ sdc1 $f22, 0x68($sp) /* 3D5030 E00D6010 4486B000 */ mtc1 $a2, $f22 /* 3D5034 E00D6014 F7B80070 */ sdc1 $f24, 0x70($sp) /* 3D5038 E00D6018 4487C000 */ mtc1 $a3, $f24 /* 3D503C E00D601C AFB70054 */ sw $s7, 0x54($sp) /* 3D5040 E00D6020 0080B82D */ daddu $s7, $a0, $zero /* 3D5044 E00D6024 AFB00038 */ sw $s0, 0x38($sp) /* 3D5048 E00D6028 8FB0009C */ lw $s0, 0x9C($sp) /* 3D504C E00D602C 27A40010 */ addiu $a0, $sp, 0x10 /* 3D5050 E00D6030 AFBF005C */ sw $ra, 0x5C($sp) /* 3D5054 E00D6034 AFBE0058 */ sw $fp, 0x58($sp) /* 3D5058 E00D6038 AFB60050 */ sw $s6, 0x50($sp) /* 3D505C E00D603C AFB5004C */ sw $s5, 0x4C($sp) /* 3D5060 E00D6040 AFB40048 */ sw $s4, 0x48($sp) /* 3D5064 E00D6044 AFB30044 */ sw $s3, 0x44($sp) /* 3D5068 E00D6048 AFB20040 */ sw $s2, 0x40($sp) /* 3D506C E00D604C AFB1003C */ sw $s1, 0x3C($sp) /* 3D5070 E00D6050 F7BC0080 */ sdc1 $f28, 0x80($sp) /* 3D5074 E00D6054 F7BA0078 */ sdc1 $f26, 0x78($sp) /* 3D5078 E00D6058 3C08E00D */ lui $t0, (0xE00D6E74 >> 16) /* 3D507C E00D605C 01174021 */ addu $t0, $t0, $s7 /* 3D5080 E00D6060 91086E74 */ lbu $t0, (0xE00D6E74 & 0xFFFF)($t0) /* 3D5084 E00D6064 3C02E00D */ lui $v0, %hi(energy_in_out_init) /* 3D5088 E00D6068 24426718 */ addiu $v0, $v0, %lo(energy_in_out_init) /* 3D508C E00D606C AFA20018 */ sw $v0, 0x18($sp) /* 3D5090 E00D6070 3C02E00D */ lui $v0, %hi(energy_in_out_update) /* 3D5094 E00D6074 24426720 */ addiu $v0, $v0, %lo(energy_in_out_update) /* 3D5098 E00D6078 AFA2001C */ sw $v0, 0x1C($sp) /* 3D509C E00D607C 3C02E00D */ lui $v0, %hi(energy_in_out_render) /* 3D50A0 E00D6080 2442693C */ addiu $v0, $v0, %lo(energy_in_out_render) /* 3D50A4 E00D6084 AFA20020 */ sw $v0, 0x20($sp) /* 3D50A8 E00D6088 2402006B */ addiu $v0, $zero, 0x6B /* 3D50AC E00D608C AFA00010 */ sw $zero, 0x10($sp) /* 3D50B0 E00D6090 AFA00024 */ sw $zero, 0x24($sp) /* 3D50B4 E00D6094 AFA20014 */ sw $v0, 0x14($sp) /* 3D50B8 E00D6098 0C080124 */ jal shim_create_effect_instance /* 3D50BC E00D609C AFA8002C */ sw $t0, 0x2C($sp) /* 3D50C0 E00D60A0 8FA9002C */ lw $t1, 0x2C($sp) /* 3D50C4 E00D60A4 AFA20028 */ sw $v0, 0x28($sp) /* 3D50C8 E00D60A8 000920C0 */ sll $a0, $t1, 3 /* 3D50CC E00D60AC 00892021 */ addu $a0, $a0, $t1 /* 3D50D0 E00D60B0 000420C0 */ sll $a0, $a0, 3 /* 3D50D4 E00D60B4 0C08012C */ jal shim_general_heap_malloc /* 3D50D8 E00D60B8 AC490008 */ sw $t1, 0x8($v0) /* 3D50DC E00D60BC 0040902D */ daddu $s2, $v0, $zero /* 3D50E0 E00D60C0 8FA80028 */ lw $t0, 0x28($sp) /* 3D50E4 E00D60C4 0240A02D */ daddu $s4, $s2, $zero /* 3D50E8 E00D60C8 16400003 */ bnez $s2, .LE00D60D8 /* 3D50EC E00D60CC AD12000C */ sw $s2, 0xC($t0) .LE00D60D0: /* 3D50F0 E00D60D0 08035834 */ j .LE00D60D0 /* 3D50F4 E00D60D4 00000000 */ nop .LE00D60D8: /* 3D50F8 E00D60D8 AE570000 */ sw $s7, 0x0($s2) /* 3D50FC E00D60DC 1E000004 */ bgtz $s0, .LE00D60F0 /* 3D5100 E00D60E0 AE400014 */ sw $zero, 0x14($s2) /* 3D5104 E00D60E4 240203E8 */ addiu $v0, $zero, 0x3E8 /* 3D5108 E00D60E8 0803583D */ j .LE00D60F4 /* 3D510C E00D60EC AE420010 */ sw $v0, 0x10($s2) .LE00D60F0: /* 3D5110 E00D60F0 AE500010 */ sw $s0, 0x10($s2) .LE00D60F4: /* 3D5114 E00D60F4 24040168 */ addiu $a0, $zero, 0x168 /* 3D5118 E00D60F8 AE400024 */ sw $zero, 0x24($s2) /* 3D511C E00D60FC E6540004 */ swc1 $f20, 0x4($s2) /* 3D5120 E00D6100 E6560008 */ swc1 $f22, 0x8($s2) /* 3D5124 E00D6104 E658000C */ swc1 $f24, 0xC($s2) /* 3D5128 E00D6108 C7A00098 */ lwc1 $f0, 0x98($sp) /* 3D512C E00D610C 240200FF */ addiu $v0, $zero, 0xFF /* 3D5130 E00D6110 AE420018 */ sw $v0, 0x18($s2) /* 3D5134 E00D6114 AE42001C */ sw $v0, 0x1C($s2) /* 3D5138 E00D6118 AE420020 */ sw $v0, 0x20($s2) /* 3D513C E00D611C AE420028 */ sw $v0, 0x28($s2) /* 3D5140 E00D6120 E6400034 */ swc1 $f0, 0x34($s2) /* 3D5144 E00D6124 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3D5148 E00D6128 44810000 */ mtc1 $at, $f0 /* 3D514C E00D612C 240200F5 */ addiu $v0, $zero, 0xF5 /* 3D5150 E00D6130 AE42002C */ sw $v0, 0x2C($s2) /* 3D5154 E00D6134 AE400030 */ sw $zero, 0x30($s2) /* 3D5158 E00D6138 E6400044 */ swc1 $f0, 0x44($s2) /* 3D515C E00D613C 3C02E00D */ lui $v0, (0xE00D6E84 >> 16) /* 3D5160 E00D6140 00571021 */ addu $v0, $v0, $s7 /* 3D5164 E00D6144 90426E84 */ lbu $v0, (0xE00D6E84 & 0xFFFF)($v0) /* 3D5168 E00D6148 24110001 */ addiu $s1, $zero, 0x1 /* 3D516C E00D614C 44820000 */ mtc1 $v0, $f0 /* 3D5170 E00D6150 00000000 */ nop /* 3D5174 E00D6154 46800020 */ cvt.s.w $f0, $f0 /* 3D5178 E00D6158 0C080138 */ jal shim_rand_int /* 3D517C E00D615C E6400038 */ swc1 $f0, 0x38($s2) /* 3D5180 E00D6160 8FA90028 */ lw $t1, 0x28($sp) /* 3D5184 E00D6164 8D230008 */ lw $v1, 0x8($t1) /* 3D5188 E00D6168 4482E000 */ mtc1 $v0, $f28 /* 3D518C E00D616C 00000000 */ nop /* 3D5190 E00D6170 4680E720 */ cvt.s.w $f28, $f28 /* 3D5194 E00D6174 0223182A */ slt $v1, $s1, $v1 /* 3D5198 E00D6178 10600155 */ beqz $v1, .LE00D66D0 /* 3D519C E00D617C 26520048 */ addiu $s2, $s2, 0x48 /* 3D51A0 E00D6180 3C135555 */ lui $s3, (0x55555556 >> 16) /* 3D51A4 E00D6184 36735556 */ ori $s3, $s3, (0x55555556 & 0xFFFF) /* 3D51A8 E00D6188 24160014 */ addiu $s6, $zero, 0x14 /* 3D51AC E00D618C 241E000A */ addiu $fp, $zero, 0xA /* 3D51B0 E00D6190 2650003C */ addiu $s0, $s2, 0x3C /* 3D51B4 E00D6194 0000A82D */ daddu $s5, $zero, $zero /* 3D51B8 E00D6198 001717C3 */ sra $v0, $s7, 31 /* 3D51BC E00D619C 02F30018 */ mult $s7, $s3 /* 3D51C0 E00D61A0 3C01E00D */ lui $at, (0xE00D6EA0 >> 16) /* 3D51C4 E00D61A4 D4366EA0 */ ldc1 $f22, (0xE00D6EA0 & 0xFFFF)($at) /* 3D51C8 E00D61A8 3C01E00D */ lui $at, (0xE00D6EA8 >> 16) /* 3D51CC E00D61AC D43A6EA8 */ ldc1 $f26, (0xE00D6EA8 & 0xFFFF)($at) /* 3D51D0 E00D61B0 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 3D51D4 E00D61B4 4481A800 */ mtc1 $at, $f21 /* 3D51D8 E00D61B8 4480A000 */ mtc1 $zero, $f20 /* 3D51DC E00D61BC 3C01E00D */ lui $at, (0xE00D6EB0 >> 16) /* 3D51E0 E00D61C0 D4386EB0 */ ldc1 $f24, (0xE00D6EB0 & 0xFFFF)($at) /* 3D51E4 E00D61C4 00004010 */ mfhi $t0 /* 3D51E8 E00D61C8 01024023 */ subu $t0, $t0, $v0 /* 3D51EC E00D61CC AFA80030 */ sw $t0, 0x30($sp) .LE00D61D0: /* 3D51F0 E00D61D0 8FA90030 */ lw $t1, 0x30($sp) /* 3D51F4 E00D61D4 00091040 */ sll $v0, $t1, 1 /* 3D51F8 E00D61D8 00491021 */ addu $v0, $v0, $t1 /* 3D51FC E00D61DC 02E21023 */ subu $v0, $s7, $v0 /* 3D5200 E00D61E0 AE420000 */ sw $v0, 0x0($s2) /* 3D5204 E00D61E4 2EE2000D */ sltiu $v0, $s7, 0xD /* 3D5208 E00D61E8 1040010C */ beqz $v0, .LE00D661C /* 3D520C E00D61EC 00171080 */ sll $v0, $s7, 2 /* 3D5210 E00D61F0 3C01E00D */ lui $at, (0xE00D6EB8 >> 16) /* 3D5214 E00D61F4 00220821 */ addu $at, $at, $v0 /* 3D5218 E00D61F8 8C226EB8 */ lw $v0, (0xE00D6EB8 & 0xFFFF)($at) /* 3D521C E00D61FC 00400008 */ jr $v0 /* 3D5220 E00D6200 00000000 */ nop /* 3D5224 E00D6204 0C080138 */ jal shim_rand_int /* 3D5228 E00D6208 2404000A */ addiu $a0, $zero, 0xA /* 3D522C E00D620C 44821000 */ mtc1 $v0, $f2 /* 3D5230 E00D6210 00000000 */ nop /* 3D5234 E00D6214 468010A1 */ cvt.d.w $f2, $f2 /* 3D5238 E00D6218 46361082 */ mul.d $f2, $f2, $f22 /* 3D523C E00D621C 00000000 */ nop /* 3D5240 E00D6220 02330018 */ mult $s1, $s3 /* 3D5244 E00D6224 00111FC3 */ sra $v1, $s1, 31 /* 3D5248 E00D6228 00004010 */ mfhi $t0 /* 3D524C E00D622C 01031823 */ subu $v1, $t0, $v1 /* 3D5250 E00D6230 00031040 */ sll $v0, $v1, 1 /* 3D5254 E00D6234 00431021 */ addu $v0, $v0, $v1 /* 3D5258 E00D6238 02221023 */ subu $v0, $s1, $v0 /* 3D525C E00D623C 44820000 */ mtc1 $v0, $f0 /* 3D5260 E00D6240 00000000 */ nop /* 3D5264 E00D6244 46800021 */ cvt.d.w $f0, $f0 /* 3D5268 E00D6248 463A0002 */ mul.d $f0, $f0, $f26 /* 3D526C E00D624C 00000000 */ nop /* 3D5270 E00D6250 46361080 */ add.d $f2, $f2, $f22 /* 3D5274 E00D6254 AE16FFD4 */ sw $s6, -0x2C($s0) /* 3D5278 E00D6258 AE000004 */ sw $zero, 0x4($s0) /* 3D527C E00D625C 08035982 */ j .LE00D6608 /* 3D5280 E00D6260 46201087 */ neg.d $f2, $f2 /* 3D5284 E00D6264 0C080138 */ jal shim_rand_int /* 3D5288 E00D6268 2404000A */ addiu $a0, $zero, 0xA /* 3D528C E00D626C 44821000 */ mtc1 $v0, $f2 /* 3D5290 E00D6270 00000000 */ nop /* 3D5294 E00D6274 468010A1 */ cvt.d.w $f2, $f2 /* 3D5298 E00D6278 46361082 */ mul.d $f2, $f2, $f22 /* 3D529C E00D627C 00000000 */ nop /* 3D52A0 E00D6280 02330018 */ mult $s1, $s3 /* 3D52A4 E00D6284 00111FC3 */ sra $v1, $s1, 31 /* 3D52A8 E00D6288 00004010 */ mfhi $t0 /* 3D52AC E00D628C 01031823 */ subu $v1, $t0, $v1 /* 3D52B0 E00D6290 00031040 */ sll $v0, $v1, 1 /* 3D52B4 E00D6294 00431021 */ addu $v0, $v0, $v1 /* 3D52B8 E00D6298 02221023 */ subu $v0, $s1, $v0 /* 3D52BC E00D629C 44820000 */ mtc1 $v0, $f0 /* 3D52C0 E00D62A0 00000000 */ nop /* 3D52C4 E00D62A4 46800021 */ cvt.d.w $f0, $f0 /* 3D52C8 E00D62A8 463A0002 */ mul.d $f0, $f0, $f26 /* 3D52CC E00D62AC 00000000 */ nop /* 3D52D0 E00D62B0 46361080 */ add.d $f2, $f2, $f22 /* 3D52D4 E00D62B4 AE16FFD4 */ sw $s6, -0x2C($s0) /* 3D52D8 E00D62B8 08035982 */ j .LE00D6608 /* 3D52DC E00D62BC AE000004 */ sw $zero, 0x4($s0) /* 3D52E0 E00D62C0 0C080138 */ jal shim_rand_int /* 3D52E4 E00D62C4 2404000A */ addiu $a0, $zero, 0xA /* 3D52E8 E00D62C8 02330018 */ mult $s1, $s3 /* 3D52EC E00D62CC 001127C3 */ sra $a0, $s1, 31 /* 3D52F0 E00D62D0 00004010 */ mfhi $t0 /* 3D52F4 E00D62D4 01042023 */ subu $a0, $t0, $a0 /* 3D52F8 E00D62D8 00041840 */ sll $v1, $a0, 1 /* 3D52FC E00D62DC 00641821 */ addu $v1, $v1, $a0 /* 3D5300 E00D62E0 02231823 */ subu $v1, $s1, $v1 /* 3D5304 E00D62E4 44830000 */ mtc1 $v1, $f0 /* 3D5308 E00D62E8 00000000 */ nop /* 3D530C E00D62EC 46800021 */ cvt.d.w $f0, $f0 /* 3D5310 E00D62F0 46380002 */ mul.d $f0, $f0, $f24 /* 3D5314 E00D62F4 00000000 */ nop /* 3D5318 E00D62F8 24420004 */ addiu $v0, $v0, 0x4 /* 3D531C E00D62FC 00021023 */ negu $v0, $v0 /* 3D5320 E00D6300 44821000 */ mtc1 $v0, $f2 /* 3D5324 E00D6304 00000000 */ nop /* 3D5328 E00D6308 468010A0 */ cvt.s.w $f2, $f2 /* 3D532C E00D630C E602FFFC */ swc1 $f2, -0x4($s0) /* 3D5330 E00D6310 4620A001 */ sub.d $f0, $f20, $f0 /* 3D5334 E00D6314 AE1EFFD4 */ sw $fp, -0x2C($s0) /* 3D5338 E00D6318 08035985 */ j .LE00D6614 /* 3D533C E00D631C AE000004 */ sw $zero, 0x4($s0) /* 3D5340 E00D6320 0C080138 */ jal shim_rand_int /* 3D5344 E00D6324 2404000A */ addiu $a0, $zero, 0xA /* 3D5348 E00D6328 02330018 */ mult $s1, $s3 /* 3D534C E00D632C 001127C3 */ sra $a0, $s1, 31 /* 3D5350 E00D6330 00004010 */ mfhi $t0 /* 3D5354 E00D6334 01042023 */ subu $a0, $t0, $a0 /* 3D5358 E00D6338 00041840 */ sll $v1, $a0, 1 /* 3D535C E00D633C 00641821 */ addu $v1, $v1, $a0 /* 3D5360 E00D6340 02231823 */ subu $v1, $s1, $v1 /* 3D5364 E00D6344 44830000 */ mtc1 $v1, $f0 /* 3D5368 E00D6348 00000000 */ nop /* 3D536C E00D634C 46800021 */ cvt.d.w $f0, $f0 /* 3D5370 E00D6350 46380002 */ mul.d $f0, $f0, $f24 /* 3D5374 E00D6354 00000000 */ nop /* 3D5378 E00D6358 24420004 */ addiu $v0, $v0, 0x4 /* 3D537C E00D635C 00021023 */ negu $v0, $v0 /* 3D5380 E00D6360 44821000 */ mtc1 $v0, $f2 /* 3D5384 E00D6364 00000000 */ nop /* 3D5388 E00D6368 468010A0 */ cvt.s.w $f2, $f2 /* 3D538C E00D636C E602FFFC */ swc1 $f2, -0x4($s0) /* 3D5390 E00D6370 4620A001 */ sub.d $f0, $f20, $f0 /* 3D5394 E00D6374 AE1EFFD4 */ sw $fp, -0x2C($s0) /* 3D5398 E00D6378 08035985 */ j .LE00D6614 /* 3D539C E00D637C AE000004 */ sw $zero, 0x4($s0) /* 3D53A0 E00D6380 0C080138 */ jal shim_rand_int /* 3D53A4 E00D6384 2404000A */ addiu $a0, $zero, 0xA /* 3D53A8 E00D6388 44821000 */ mtc1 $v0, $f2 /* 3D53AC E00D638C 00000000 */ nop /* 3D53B0 E00D6390 468010A1 */ cvt.d.w $f2, $f2 /* 3D53B4 E00D6394 46361082 */ mul.d $f2, $f2, $f22 /* 3D53B8 E00D6398 00000000 */ nop /* 3D53BC E00D639C 02330018 */ mult $s1, $s3 /* 3D53C0 E00D63A0 00111FC3 */ sra $v1, $s1, 31 /* 3D53C4 E00D63A4 00004010 */ mfhi $t0 /* 3D53C8 E00D63A8 01031823 */ subu $v1, $t0, $v1 /* 3D53CC E00D63AC 00031040 */ sll $v0, $v1, 1 /* 3D53D0 E00D63B0 00431021 */ addu $v0, $v0, $v1 /* 3D53D4 E00D63B4 02221023 */ subu $v0, $s1, $v0 /* 3D53D8 E00D63B8 44820000 */ mtc1 $v0, $f0 /* 3D53DC E00D63BC 00000000 */ nop /* 3D53E0 E00D63C0 46800021 */ cvt.d.w $f0, $f0 /* 3D53E4 E00D63C4 46380002 */ mul.d $f0, $f0, $f24 /* 3D53E8 E00D63C8 00000000 */ nop /* 3D53EC E00D63CC 3C01E00D */ lui $at, (0xE00D6EF0 >> 16) /* 3D53F0 E00D63D0 D4246EF0 */ ldc1 $f4, (0xE00D6EF0 & 0xFFFF)($at) /* 3D53F4 E00D63D4 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 3D53F8 E00D63D8 44813000 */ mtc1 $at, $f6 /* 3D53FC E00D63DC 08035980 */ j .LE00D6600 /* 3D5400 E00D63E0 46241080 */ add.d $f2, $f2, $f4 /* 3D5404 E00D63E4 0C080138 */ jal shim_rand_int /* 3D5408 E00D63E8 2404000A */ addiu $a0, $zero, 0xA /* 3D540C E00D63EC 44821000 */ mtc1 $v0, $f2 /* 3D5410 E00D63F0 00000000 */ nop /* 3D5414 E00D63F4 468010A1 */ cvt.d.w $f2, $f2 /* 3D5418 E00D63F8 46361082 */ mul.d $f2, $f2, $f22 /* 3D541C E00D63FC 00000000 */ nop /* 3D5420 E00D6400 02330018 */ mult $s1, $s3 /* 3D5424 E00D6404 00111FC3 */ sra $v1, $s1, 31 /* 3D5428 E00D6408 00004010 */ mfhi $t0 /* 3D542C E00D640C 01031823 */ subu $v1, $t0, $v1 /* 3D5430 E00D6410 00031040 */ sll $v0, $v1, 1 /* 3D5434 E00D6414 00431021 */ addu $v0, $v0, $v1 /* 3D5438 E00D6418 02221023 */ subu $v0, $s1, $v0 /* 3D543C E00D641C 44820000 */ mtc1 $v0, $f0 /* 3D5440 E00D6420 00000000 */ nop /* 3D5444 E00D6424 46800021 */ cvt.d.w $f0, $f0 /* 3D5448 E00D6428 46380002 */ mul.d $f0, $f0, $f24 /* 3D544C E00D642C 00000000 */ nop /* 3D5450 E00D6430 3C01E00D */ lui $at, (0xE00D6EF8 >> 16) /* 3D5454 E00D6434 D4246EF8 */ ldc1 $f4, (0xE00D6EF8 & 0xFFFF)($at) /* 3D5458 E00D6438 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 3D545C E00D643C 44813000 */ mtc1 $at, $f6 /* 3D5460 E00D6440 AE16FFD4 */ sw $s6, -0x2C($s0) /* 3D5464 E00D6444 46241080 */ add.d $f2, $f2, $f4 /* 3D5468 E00D6448 E6060004 */ swc1 $f6, 0x4($s0) /* 3D546C E00D644C 240200FF */ addiu $v0, $zero, 0xFF /* 3D5470 E00D6450 46201087 */ neg.d $f2, $f2 /* 3D5474 E00D6454 4620A001 */ sub.d $f0, $f20, $f0 /* 3D5478 E00D6458 462010A0 */ cvt.s.d $f2, $f2 /* 3D547C E00D645C E602FFFC */ swc1 $f2, -0x4($s0) /* 3D5480 E00D6460 46200020 */ cvt.s.d $f0, $f0 /* 3D5484 E00D6464 E600FFF8 */ swc1 $f0, -0x8($s0) /* 3D5488 E00D6468 AE820018 */ sw $v0, 0x18($s4) /* 3D548C E00D646C 240200F5 */ addiu $v0, $zero, 0xF5 /* 3D5490 E00D6470 AE82001C */ sw $v0, 0x1C($s4) /* 3D5494 E00D6474 240200D7 */ addiu $v0, $zero, 0xD7 /* 3D5498 E00D6478 AE820020 */ sw $v0, 0x20($s4) /* 3D549C E00D647C 240200DC */ addiu $v0, $zero, 0xDC /* 3D54A0 E00D6480 AE820028 */ sw $v0, 0x28($s4) /* 3D54A4 E00D6484 2402003C */ addiu $v0, $zero, 0x3C /* 3D54A8 E00D6488 AE82002C */ sw $v0, 0x2C($s4) /* 3D54AC E00D648C 08035987 */ j .LE00D661C /* 3D54B0 E00D6490 AE9E0030 */ sw $fp, 0x30($s4) /* 3D54B4 E00D6494 0C080138 */ jal shim_rand_int /* 3D54B8 E00D6498 2404000A */ addiu $a0, $zero, 0xA /* 3D54BC E00D649C 44821000 */ mtc1 $v0, $f2 /* 3D54C0 E00D64A0 00000000 */ nop /* 3D54C4 E00D64A4 468010A1 */ cvt.d.w $f2, $f2 /* 3D54C8 E00D64A8 463A1082 */ mul.d $f2, $f2, $f26 /* 3D54CC E00D64AC 00000000 */ nop /* 3D54D0 E00D64B0 02330018 */ mult $s1, $s3 /* 3D54D4 E00D64B4 001127C3 */ sra $a0, $s1, 31 /* 3D54D8 E00D64B8 00004010 */ mfhi $t0 /* 3D54DC E00D64BC 01042023 */ subu $a0, $t0, $a0 /* 3D54E0 E00D64C0 00041840 */ sll $v1, $a0, 1 /* 3D54E4 E00D64C4 00641821 */ addu $v1, $v1, $a0 /* 3D54E8 E00D64C8 02231823 */ subu $v1, $s1, $v1 /* 3D54EC E00D64CC 44832000 */ mtc1 $v1, $f4 /* 3D54F0 E00D64D0 00000000 */ nop /* 3D54F4 E00D64D4 46802121 */ cvt.d.w $f4, $f4 /* 3D54F8 E00D64D8 46382102 */ mul.d $f4, $f4, $f24 /* 3D54FC E00D64DC 00000000 */ nop /* 3D5500 E00D64E0 4624A101 */ sub.d $f4, $f20, $f4 /* 3D5504 E00D64E4 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3D5508 E00D64E8 44810800 */ mtc1 $at, $f1 /* 3D550C E00D64EC 44800000 */ mtc1 $zero, $f0 /* 3D5510 E00D64F0 00000000 */ nop /* 3D5514 E00D64F4 46202102 */ mul.d $f4, $f4, $f0 /* 3D5518 E00D64F8 00000000 */ nop /* 3D551C E00D64FC 3C014000 */ lui $at, (0x40000000 >> 16) /* 3D5520 E00D6500 44810800 */ mtc1 $at, $f1 /* 3D5524 E00D6504 44800000 */ mtc1 $zero, $f0 /* 3D5528 E00D6508 00000000 */ nop /* 3D552C E00D650C 46201080 */ add.d $f2, $f2, $f0 /* 3D5530 E00D6510 AE1EFFD4 */ sw $fp, -0x2C($s0) /* 3D5534 E00D6514 AE000004 */ sw $zero, 0x4($s0) /* 3D5538 E00D6518 462010A0 */ cvt.s.d $f2, $f2 /* 3D553C E00D651C E602FFFC */ swc1 $f2, -0x4($s0) /* 3D5540 E00D6520 46202120 */ cvt.s.d $f4, $f4 /* 3D5544 E00D6524 08035987 */ j .LE00D661C /* 3D5548 E00D6528 E604FFF8 */ swc1 $f4, -0x8($s0) /* 3D554C E00D652C 0C080138 */ jal shim_rand_int /* 3D5550 E00D6530 2404000A */ addiu $a0, $zero, 0xA /* 3D5554 E00D6534 3C01E00D */ lui $at, (0xE00D6F00 >> 16) /* 3D5558 E00D6538 D4206F00 */ ldc1 $f0, (0xE00D6F00 & 0xFFFF)($at) /* 3D555C E00D653C 44821000 */ mtc1 $v0, $f2 /* 3D5560 E00D6540 00000000 */ nop /* 3D5564 E00D6544 468010A1 */ cvt.d.w $f2, $f2 /* 3D5568 E00D6548 46201082 */ mul.d $f2, $f2, $f0 /* 3D556C E00D654C 00000000 */ nop /* 3D5570 E00D6550 02330018 */ mult $s1, $s3 /* 3D5574 E00D6554 00111FC3 */ sra $v1, $s1, 31 /* 3D5578 E00D6558 00004010 */ mfhi $t0 /* 3D557C E00D655C 01031823 */ subu $v1, $t0, $v1 /* 3D5580 E00D6560 00031040 */ sll $v0, $v1, 1 /* 3D5584 E00D6564 00431021 */ addu $v0, $v0, $v1 /* 3D5588 E00D6568 02221023 */ subu $v0, $s1, $v0 /* 3D558C E00D656C 44820000 */ mtc1 $v0, $f0 /* 3D5590 E00D6570 00000000 */ nop /* 3D5594 E00D6574 46800021 */ cvt.d.w $f0, $f0 /* 3D5598 E00D6578 46380002 */ mul.d $f0, $f0, $f24 /* 3D559C E00D657C 00000000 */ nop /* 3D55A0 E00D6580 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 3D55A4 E00D6584 44812000 */ mtc1 $at, $f4 /* 3D55A8 E00D6588 00000000 */ nop /* 3D55AC E00D658C E6040004 */ swc1 $f4, 0x4($s0) /* 3D55B0 E00D6590 46361080 */ add.d $f2, $f2, $f22 /* 3D55B4 E00D6594 2402001E */ addiu $v0, $zero, 0x1E /* 3D55B8 E00D6598 08035982 */ j .LE00D6608 /* 3D55BC E00D659C AE02FFD4 */ sw $v0, -0x2C($s0) /* 3D55C0 E00D65A0 0C080138 */ jal shim_rand_int /* 3D55C4 E00D65A4 2404000A */ addiu $a0, $zero, 0xA /* 3D55C8 E00D65A8 44821000 */ mtc1 $v0, $f2 /* 3D55CC E00D65AC 00000000 */ nop /* 3D55D0 E00D65B0 468010A1 */ cvt.d.w $f2, $f2 /* 3D55D4 E00D65B4 46361082 */ mul.d $f2, $f2, $f22 /* 3D55D8 E00D65B8 00000000 */ nop /* 3D55DC E00D65BC 02330018 */ mult $s1, $s3 /* 3D55E0 E00D65C0 00111FC3 */ sra $v1, $s1, 31 /* 3D55E4 E00D65C4 00004010 */ mfhi $t0 /* 3D55E8 E00D65C8 01031823 */ subu $v1, $t0, $v1 /* 3D55EC E00D65CC 00031040 */ sll $v0, $v1, 1 /* 3D55F0 E00D65D0 00431021 */ addu $v0, $v0, $v1 /* 3D55F4 E00D65D4 02221023 */ subu $v0, $s1, $v0 /* 3D55F8 E00D65D8 44820000 */ mtc1 $v0, $f0 /* 3D55FC E00D65DC 00000000 */ nop /* 3D5600 E00D65E0 46800021 */ cvt.d.w $f0, $f0 /* 3D5604 E00D65E4 46380002 */ mul.d $f0, $f0, $f24 /* 3D5608 E00D65E8 00000000 */ nop /* 3D560C E00D65EC 3C01E00D */ lui $at, (0xE00D6F08 >> 16) /* 3D5610 E00D65F0 D4246F08 */ ldc1 $f4, (0xE00D6F08 & 0xFFFF)($at) /* 3D5614 E00D65F4 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 3D5618 E00D65F8 44813000 */ mtc1 $at, $f6 /* 3D561C E00D65FC 46241080 */ add.d $f2, $f2, $f4 .LE00D6600: /* 3D5620 E00D6600 AE16FFD4 */ sw $s6, -0x2C($s0) /* 3D5624 E00D6604 E6060004 */ swc1 $f6, 0x4($s0) .LE00D6608: /* 3D5628 E00D6608 4620A001 */ sub.d $f0, $f20, $f0 /* 3D562C E00D660C 462010A0 */ cvt.s.d $f2, $f2 /* 3D5630 E00D6610 E602FFFC */ swc1 $f2, -0x4($s0) .LE00D6614: /* 3D5634 E00D6614 46200020 */ cvt.s.d $f0, $f0 /* 3D5638 E00D6618 E600FFF8 */ swc1 $f0, -0x8($s0) .LE00D661C: /* 3D563C E00D661C 0C080138 */ jal shim_rand_int /* 3D5640 E00D6620 8E04FFD4 */ lw $a0, -0x2C($s0) /* 3D5644 E00D6624 C602FFFC */ lwc1 $f2, -0x4($s0) /* 3D5648 E00D6628 44800000 */ mtc1 $zero, $f0 /* 3D564C E00D662C 00021823 */ negu $v1, $v0 /* 3D5650 E00D6630 4600103C */ c.lt.s $f2, $f0 /* 3D5654 E00D6634 00000000 */ nop /* 3D5658 E00D6638 45000004 */ bc1f .LE00D664C /* 3D565C E00D663C AE03FFD8 */ sw $v1, -0x28($s0) /* 3D5660 E00D6640 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3D5664 E00D6644 46001087 */ neg.s $f2, $f2 /* 3D5668 E00D6648 00431023 */ subu $v0, $v0, $v1 .LE00D664C: /* 3D566C E00D664C 44820000 */ mtc1 $v0, $f0 /* 3D5670 E00D6650 00000000 */ nop /* 3D5674 E00D6654 46800020 */ cvt.s.w $f0, $f0 /* 3D5678 E00D6658 46020002 */ mul.s $f0, $f0, $f2 /* 3D567C E00D665C 00000000 */ nop /* 3D5680 E00D6660 E600FFC8 */ swc1 $f0, -0x38($s0) /* 3D5684 E00D6664 8FA9002C */ lw $t1, 0x2C($sp) /* 3D5688 E00D6668 2522FFFF */ addiu $v0, $t1, -0x1 /* 3D568C E00D666C 14400002 */ bnez $v0, .LE00D6678 /* 3D5690 E00D6670 02A2001A */ div $zero, $s5, $v0 /* 3D5694 E00D6674 0007000D */ break 7 .LE00D6678: /* 3D5698 E00D6678 2401FFFF */ addiu $at, $zero, -0x1 /* 3D569C E00D667C 14410004 */ bne $v0, $at, .LE00D6690 /* 3D56A0 E00D6680 3C018000 */ lui $at, (0x80000000 >> 16) /* 3D56A4 E00D6684 16A10002 */ bne $s5, $at, .LE00D6690 /* 3D56A8 E00D6688 00000000 */ nop /* 3D56AC E00D668C 0006000D */ break 6 .LE00D6690: /* 3D56B0 E00D6690 00001012 */ mflo $v0 /* 3D56B4 E00D6694 26310001 */ addiu $s1, $s1, 0x1 /* 3D56B8 E00D6698 26520048 */ addiu $s2, $s2, 0x48 /* 3D56BC E00D669C 44820000 */ mtc1 $v0, $f0 /* 3D56C0 E00D66A0 00000000 */ nop /* 3D56C4 E00D66A4 46800020 */ cvt.s.w $f0, $f0 /* 3D56C8 E00D66A8 461C0000 */ add.s $f0, $f0, $f28 /* 3D56CC E00D66AC AE00FFCC */ sw $zero, -0x34($s0) /* 3D56D0 E00D66B0 AE00FFD0 */ sw $zero, -0x30($s0) /* 3D56D4 E00D66B4 E6000000 */ swc1 $f0, 0x0($s0) /* 3D56D8 E00D66B8 8FA80028 */ lw $t0, 0x28($sp) /* 3D56DC E00D66BC 26B50168 */ addiu $s5, $s5, 0x168 /* 3D56E0 E00D66C0 8D020008 */ lw $v0, 0x8($t0) /* 3D56E4 E00D66C4 0222102A */ slt $v0, $s1, $v0 /* 3D56E8 E00D66C8 1440FEC1 */ bnez $v0, .LE00D61D0 /* 3D56EC E00D66CC 26100048 */ addiu $s0, $s0, 0x48 .LE00D66D0: /* 3D56F0 E00D66D0 8FA20028 */ lw $v0, 0x28($sp) /* 3D56F4 E00D66D4 8FBF005C */ lw $ra, 0x5C($sp) /* 3D56F8 E00D66D8 8FBE0058 */ lw $fp, 0x58($sp) /* 3D56FC E00D66DC 8FB70054 */ lw $s7, 0x54($sp) /* 3D5700 E00D66E0 8FB60050 */ lw $s6, 0x50($sp) /* 3D5704 E00D66E4 8FB5004C */ lw $s5, 0x4C($sp) /* 3D5708 E00D66E8 8FB40048 */ lw $s4, 0x48($sp) /* 3D570C E00D66EC 8FB30044 */ lw $s3, 0x44($sp) /* 3D5710 E00D66F0 8FB20040 */ lw $s2, 0x40($sp) /* 3D5714 E00D66F4 8FB1003C */ lw $s1, 0x3C($sp) /* 3D5718 E00D66F8 8FB00038 */ lw $s0, 0x38($sp) /* 3D571C E00D66FC D7BC0080 */ ldc1 $f28, 0x80($sp) /* 3D5720 E00D6700 D7BA0078 */ ldc1 $f26, 0x78($sp) /* 3D5724 E00D6704 D7B80070 */ ldc1 $f24, 0x70($sp) /* 3D5728 E00D6708 D7B60068 */ ldc1 $f22, 0x68($sp) /* 3D572C E00D670C D7B40060 */ ldc1 $f20, 0x60($sp) /* 3D5730 E00D6710 03E00008 */ jr $ra /* 3D5734 E00D6714 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: EffectInstance* energy_in_out_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectInstance* effect; EnergyInOutFXData* part; EnergyInOutFXData* firstPart; s32 numParts = D_E00D6E74[arg0]; f32 randAngle; s32 i; bp.init = energy_in_out_init; bp.update = energy_in_out_update; bp.renderWorld = energy_in_out_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_ENERGY_IN_OUT; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; firstPart = part = effect->data.energyInOut = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.energyInOut != NULL); part->unk_00 = arg0; part->unk_14 = 0; if (arg5 <= 0) { part->unk_10 = 1000; } else { part->unk_10 = arg5; } part->unk_24 = 0; part->pos.x = arg1; part->pos.y = arg2; part->pos.z = arg3; part->scale = arg4; part->unk_18 = 255; part->unk_1C = 255; part->unk_20 = 255; part->unk_28 = 255; part->unk_2C = 245; part->unk_30 = 0; part->unk_44 = 1.0f; part->unk_38 = D_E00D6E84[arg0]; randAngle = shim_rand_int(360); part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_00 = arg0 % 3; switch (arg0) { case 0: case 1: case 2: part->unk_38 = -(shim_rand_int(10) * 0.2 + 0.2); part->unk_10 = 20; part->unk_40 = 0; part->scale = 1.0 - (i % 3) * 0.1; break; case 3: case 5: part->unk_38 = shim_rand_int(10) * 0.2 + 0.2; part->unk_10 = 20; part->unk_40 = 0; part->scale = 1.0 - (i % 3) * 0.1; break; case 6: part->unk_38 = -(shim_rand_int(10) + 4); part->unk_10 = 10; part->unk_40 = 0; part->scale = 1.0 - (i % 3) * 0.3; break; case 7: part->unk_38 = -(shim_rand_int(10) + 4); part->unk_10 = 10; part->unk_40 = 0; part->scale = 1.0 - (i % 3) * 0.3; break; case 8: part->unk_38 = shim_rand_int(10) * 0.2 + 0.6; part->unk_10 = 20; part->unk_40 = -1.0f; part->scale = 1.0 - (i % 3) * 0.3; break; case 9: part->unk_38 = -(shim_rand_int(10) * 0.2 + 0.6); part->unk_10 = 20; part->unk_40 = -2.0f; part->scale = 1.0 - (i % 3) * 0.3; firstPart->unk_18 = 255; firstPart->unk_1C = 245; firstPart->unk_20 = 215; firstPart->unk_28 = 220; firstPart->unk_2C = 60; firstPart->unk_30 = 10; break; case 10: part->unk_38 = shim_rand_int(10) * 0.1 + 2.0; part->unk_10 = 10; part->unk_40 = 0; part->scale = (1.0 - (i % 3) * 0.3) * 0.5; break; case 11: part->unk_38 = shim_rand_int(10) * 0.05 + 0.2; part->unk_40 = -1.0f; part->unk_10 = 30; part->scale = 1.0 - (i % 3) * 0.3; break; case 4: case 12: part->unk_38 = shim_rand_int(10) * 0.2 + 0.6; part->unk_10 = 20; part->unk_40 = -2.0f; part->scale = 1.0 - (i % 3) * 0.3; break; } part->unk_14 = -shim_rand_int(part->unk_10); if (part->unk_38 < 0.0f) { part->pos.x = (part->unk_10 - part->unk_14) * (-part->unk_38); } else { part->pos.x = (-part->unk_14) * part->unk_38; } part->pos.y = 0; part->pos.z = 0; part->unk_3C = (i - 1) * 360 / (numParts - 1) + randAngle; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel water_fountain_appendGfx /* 3B7D88 E00B8208 27BDFEF8 */ addiu $sp, $sp, -0x108 /* 3B7D8C E00B820C 0080302D */ daddu $a2, $a0, $zero /* 3B7D90 E00B8210 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3B7D94 E00B8214 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3B7D98 E00B8218 3C04800B */ lui $a0, %hi(gCameras) /* 3B7D9C E00B821C 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 3B7DA0 E00B8220 AFBF00EC */ sw $ra, 0xEC($sp) /* 3B7DA4 E00B8224 AFBE00E8 */ sw $fp, 0xE8($sp) /* 3B7DA8 E00B8228 AFB700E4 */ sw $s7, 0xE4($sp) /* 3B7DAC E00B822C AFB600E0 */ sw $s6, 0xE0($sp) /* 3B7DB0 E00B8230 AFB500DC */ sw $s5, 0xDC($sp) /* 3B7DB4 E00B8234 AFB400D8 */ sw $s4, 0xD8($sp) /* 3B7DB8 E00B8238 AFB300D4 */ sw $s3, 0xD4($sp) /* 3B7DBC E00B823C AFB200D0 */ sw $s2, 0xD0($sp) /* 3B7DC0 E00B8240 AFB100CC */ sw $s1, 0xCC($sp) /* 3B7DC4 E00B8244 AFB000C8 */ sw $s0, 0xC8($sp) /* 3B7DC8 E00B8248 F7B80100 */ sdc1 $f24, 0x100($sp) /* 3B7DCC E00B824C F7B600F8 */ sdc1 $f22, 0xF8($sp) /* 3B7DD0 E00B8250 F7B400F0 */ sdc1 $f20, 0xF0($sp) /* 3B7DD4 E00B8254 8CD3000C */ lw $s3, 0xC($a2) /* 3B7DD8 E00B8258 00031080 */ sll $v0, $v1, 2 /* 3B7DDC E00B825C 00431021 */ addu $v0, $v0, $v1 /* 3B7DE0 E00B8260 00021080 */ sll $v0, $v0, 2 /* 3B7DE4 E00B8264 00431023 */ subu $v0, $v0, $v1 /* 3B7DE8 E00B8268 000218C0 */ sll $v1, $v0, 3 /* 3B7DEC E00B826C 00431021 */ addu $v0, $v0, $v1 /* 3B7DF0 E00B8270 8E7E0014 */ lw $fp, 0x14($s3) /* 3B7DF4 E00B8274 8E6A0010 */ lw $t2, 0x10($s3) /* 3B7DF8 E00B8278 000210C0 */ sll $v0, $v0, 3 /* 3B7DFC E00B827C AFAA0098 */ sw $t2, 0x98($sp) /* 3B7E00 E00B8280 8E6A0024 */ lw $t2, 0x24($s3) /* 3B7E04 E00B8284 0044B821 */ addu $s7, $v0, $a0 /* 3B7E08 E00B8288 AFAA00A0 */ sw $t2, 0xA0($sp) /* 3B7E0C E00B828C 8E6A0018 */ lw $t2, 0x18($s3) /* 3B7E10 E00B8290 8E620000 */ lw $v0, 0x0($s3) /* 3B7E14 E00B8294 AFAA00A4 */ sw $t2, 0xA4($sp) /* 3B7E18 E00B8298 8E6A001C */ lw $t2, 0x1C($s3) /* 3B7E1C E00B829C AFAA00A8 */ sw $t2, 0xA8($sp) /* 3B7E20 E00B82A0 8E6A0020 */ lw $t2, 0x20($s3) /* 3B7E24 E00B82A4 14400007 */ bnez $v0, .LE00B82C4 /* 3B7E28 E00B82A8 AFAA00AC */ sw $t2, 0xAC($sp) /* 3B7E2C E00B82AC 240A0003 */ addiu $t2, $zero, 0x3 /* 3B7E30 E00B82B0 AFAA00B0 */ sw $t2, 0xB0($sp) /* 3B7E34 E00B82B4 3C0AE00C */ lui $t2, %hi(D_E00B8900) /* 3B7E38 E00B82B8 254A8900 */ addiu $t2, $t2, %lo(D_E00B8900) /* 3B7E3C E00B82BC 0802E0B6 */ j .LE00B82D8 /* 3B7E40 E00B82C0 24160014 */ addiu $s6, $zero, 0x14 .LE00B82C4: /* 3B7E44 E00B82C4 2416000B */ addiu $s6, $zero, 0xB /* 3B7E48 E00B82C8 240A0003 */ addiu $t2, $zero, 0x3 /* 3B7E4C E00B82CC AFAA00B0 */ sw $t2, 0xB0($sp) /* 3B7E50 E00B82D0 3C0AE00C */ lui $t2, %hi(D_E00B8B58) /* 3B7E54 E00B82D4 254A8B58 */ addiu $t2, $t2, %lo(D_E00B8B58) .LE00B82D8: /* 3B7E58 E00B82D8 AFAA00B4 */ sw $t2, 0xB4($sp) /* 3B7E5C E00B82DC 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 3B7E60 E00B82E0 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 3B7E64 E00B82E4 27A40018 */ addiu $a0, $sp, 0x18 /* 3B7E68 E00B82E8 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 3B7E6C E00B82EC 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 3B7E70 E00B82F0 3C120001 */ lui $s2, (0x11630 >> 16) /* 3B7E74 E00B82F4 8E880000 */ lw $t0, 0x0($s4) /* 3B7E78 E00B82F8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3B7E7C E00B82FC 0100182D */ daddu $v1, $t0, $zero /* 3B7E80 E00B8300 25080008 */ addiu $t0, $t0, 0x8 /* 3B7E84 E00B8304 AC620000 */ sw $v0, 0x0($v1) /* 3B7E88 E00B8308 AC600004 */ sw $zero, 0x4($v1) /* 3B7E8C E00B830C AD050000 */ sw $a1, 0x0($t0) /* 3B7E90 E00B8310 8CC20010 */ lw $v0, 0x10($a2) /* 3B7E94 E00B8314 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3B7E98 E00B8318 AE880000 */ sw $t0, 0x0($s4) /* 3B7E9C E00B831C 8C42001C */ lw $v0, 0x1C($v0) /* 3B7EA0 E00B8320 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3B7EA4 E00B8324 00431021 */ addu $v0, $v0, $v1 /* 3B7EA8 E00B8328 AD020004 */ sw $v0, 0x4($t0) /* 3B7EAC E00B832C 8E650004 */ lw $a1, 0x4($s3) /* 3B7EB0 E00B8330 8E660008 */ lw $a2, 0x8($s3) /* 3B7EB4 E00B8334 8E67000C */ lw $a3, 0xC($s3) /* 3B7EB8 E00B8338 25080008 */ addiu $t0, $t0, 0x8 /* 3B7EBC E00B833C 0C080108 */ jal shim_guTranslateF /* 3B7EC0 E00B8340 AE880000 */ sw $t0, 0x0($s4) /* 3B7EC4 E00B8344 27B50058 */ addiu $s5, $sp, 0x58 /* 3B7EC8 E00B8348 8E650034 */ lw $a1, 0x34($s3) /* 3B7ECC E00B834C 02A0202D */ daddu $a0, $s5, $zero /* 3B7ED0 E00B8350 00A0302D */ daddu $a2, $a1, $zero /* 3B7ED4 E00B8354 0C080110 */ jal shim_guScaleF /* 3B7ED8 E00B8358 00A0382D */ daddu $a3, $a1, $zero /* 3B7EDC E00B835C 02A0202D */ daddu $a0, $s5, $zero /* 3B7EE0 E00B8360 27A50018 */ addiu $a1, $sp, 0x18 /* 3B7EE4 E00B8364 0C080114 */ jal shim_guMtxCatF /* 3B7EE8 E00B8368 00A0302D */ daddu $a2, $a1, $zero /* 3B7EEC E00B836C 27A40018 */ addiu $a0, $sp, 0x18 /* 3B7EF0 E00B8370 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3B7EF4 E00B8374 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3B7EF8 E00B8378 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3B7EFC E00B837C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3B7F00 E00B8380 96050000 */ lhu $a1, 0x0($s0) /* 3B7F04 E00B8384 8E220000 */ lw $v0, 0x0($s1) /* 3B7F08 E00B8388 00052980 */ sll $a1, $a1, 6 /* 3B7F0C E00B838C 00B22821 */ addu $a1, $a1, $s2 /* 3B7F10 E00B8390 0C080118 */ jal shim_guMtxF2L /* 3B7F14 E00B8394 00452821 */ addu $a1, $v0, $a1 /* 3B7F18 E00B8398 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3B7F1C E00B839C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3B7F20 E00B83A0 3C09DA38 */ lui $t1, (0xDA380001 >> 16) /* 3B7F24 E00B83A4 35290001 */ ori $t1, $t1, (0xDA380001 & 0xFFFF) /* 3B7F28 E00B83A8 27A40018 */ addiu $a0, $sp, 0x18 /* 3B7F2C E00B83AC 4480B000 */ mtc1 $zero, $f22 /* 3B7F30 E00B83B0 8E880000 */ lw $t0, 0x0($s4) /* 3B7F34 E00B83B4 96020000 */ lhu $v0, 0x0($s0) /* 3B7F38 E00B83B8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3B7F3C E00B83BC 4481A000 */ mtc1 $at, $f20 /* 3B7F40 E00B83C0 0100282D */ daddu $a1, $t0, $zero /* 3B7F44 E00B83C4 25080008 */ addiu $t0, $t0, 0x8 /* 3B7F48 E00B83C8 AE880000 */ sw $t0, 0x0($s4) /* 3B7F4C E00B83CC ACA30000 */ sw $v1, 0x0($a1) /* 3B7F50 E00B83D0 24430001 */ addiu $v1, $v0, 0x1 /* 3B7F54 E00B83D4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B7F58 E00B83D8 00021180 */ sll $v0, $v0, 6 /* 3B7F5C E00B83DC 4406B000 */ mfc1 $a2, $f22 /* 3B7F60 E00B83E0 00521021 */ addu $v0, $v0, $s2 /* 3B7F64 E00B83E4 A6030000 */ sh $v1, 0x0($s0) /* 3B7F68 E00B83E8 8E230000 */ lw $v1, 0x0($s1) /* 3B7F6C E00B83EC 4407B000 */ mfc1 $a3, $f22 /* 3B7F70 E00B83F0 00621821 */ addu $v1, $v1, $v0 /* 3B7F74 E00B83F4 25020008 */ addiu $v0, $t0, 0x8 /* 3B7F78 E00B83F8 ACA30004 */ sw $v1, 0x4($a1) /* 3B7F7C E00B83FC AE820000 */ sw $v0, 0x0($s4) /* 3B7F80 E00B8400 AD090000 */ sw $t1, 0x0($t0) /* 3B7F84 E00B8404 8EE30204 */ lw $v1, 0x204($s7) /* 3B7F88 E00B8408 3C17DE00 */ lui $s7, (0xDE000000 >> 16) /* 3B7F8C E00B840C 3C020900 */ lui $v0, %hi(D_09000280_4152E0) /* 3B7F90 E00B8410 24420280 */ addiu $v0, $v0, %lo(D_09000280_4152E0) /* 3B7F94 E00B8414 AD170008 */ sw $s7, 0x8($t0) /* 3B7F98 E00B8418 AD02000C */ sw $v0, 0xC($t0) /* 3B7F9C E00B841C AD030004 */ sw $v1, 0x4($t0) /* 3B7FA0 E00B8420 E7B40010 */ swc1 $f20, 0x10($sp) /* 3B7FA4 E00B8424 8E650038 */ lw $a1, 0x38($s3) /* 3B7FA8 E00B8428 25080010 */ addiu $t0, $t0, 0x10 /* 3B7FAC E00B842C 0C080104 */ jal shim_guRotateF /* 3B7FB0 E00B8430 AE880000 */ sw $t0, 0x0($s4) /* 3B7FB4 E00B8434 8E65003C */ lw $a1, 0x3C($s3) /* 3B7FB8 E00B8438 8E660040 */ lw $a2, 0x40($s3) /* 3B7FBC E00B843C 4407A000 */ mfc1 $a3, $f20 /* 3B7FC0 E00B8440 0C080110 */ jal shim_guScaleF /* 3B7FC4 E00B8444 02A0202D */ daddu $a0, $s5, $zero /* 3B7FC8 E00B8448 02A0202D */ daddu $a0, $s5, $zero /* 3B7FCC E00B844C 27A50018 */ addiu $a1, $sp, 0x18 /* 3B7FD0 E00B8450 0C080114 */ jal shim_guMtxCatF /* 3B7FD4 E00B8454 00A0302D */ daddu $a2, $a1, $zero /* 3B7FD8 E00B8458 27A40018 */ addiu $a0, $sp, 0x18 /* 3B7FDC E00B845C 96050000 */ lhu $a1, 0x0($s0) /* 3B7FE0 E00B8460 8E220000 */ lw $v0, 0x0($s1) /* 3B7FE4 E00B8464 00052980 */ sll $a1, $a1, 6 /* 3B7FE8 E00B8468 00B22821 */ addu $a1, $a1, $s2 /* 3B7FEC E00B846C 0C080118 */ jal shim_guMtxF2L /* 3B7FF0 E00B8470 00452821 */ addu $a1, $v0, $a1 /* 3B7FF4 E00B8474 8E850000 */ lw $a1, 0x0($s4) /* 3B7FF8 E00B8478 00A0202D */ daddu $a0, $a1, $zero /* 3B7FFC E00B847C 24A50008 */ addiu $a1, $a1, 0x8 /* 3B8000 E00B8480 AE850000 */ sw $a1, 0x0($s4) /* 3B8004 E00B8484 96020000 */ lhu $v0, 0x0($s0) /* 3B8008 E00B8488 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3B800C E00B848C AC830000 */ sw $v1, 0x0($a0) /* 3B8010 E00B8490 24430001 */ addiu $v1, $v0, 0x1 /* 3B8014 E00B8494 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B8018 E00B8498 00021180 */ sll $v0, $v0, 6 /* 3B801C E00B849C A6030000 */ sh $v1, 0x0($s0) /* 3B8020 E00B84A0 8E230000 */ lw $v1, 0x0($s1) /* 3B8024 E00B84A4 00521021 */ addu $v0, $v0, $s2 /* 3B8028 E00B84A8 00621821 */ addu $v1, $v1, $v0 /* 3B802C E00B84AC 24A20008 */ addiu $v0, $a1, 0x8 /* 3B8030 E00B84B0 AC830004 */ sw $v1, 0x4($a0) /* 3B8034 E00B84B4 AE820000 */ sw $v0, 0x0($s4) /* 3B8038 E00B84B8 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3B803C E00B84BC ACA20000 */ sw $v0, 0x0($a1) /* 3B8040 E00B84C0 9262002B */ lbu $v0, 0x2B($s3) /* 3B8044 E00B84C4 9264002F */ lbu $a0, 0x2F($s3) /* 3B8048 E00B84C8 92630033 */ lbu $v1, 0x33($s3) /* 3B804C E00B84CC 8FAA00A0 */ lw $t2, 0xA0($sp) /* 3B8050 E00B84D0 00021600 */ sll $v0, $v0, 24 /* 3B8054 E00B84D4 00042400 */ sll $a0, $a0, 16 /* 3B8058 E00B84D8 00441025 */ or $v0, $v0, $a0 /* 3B805C E00B84DC 00031A00 */ sll $v1, $v1, 8 /* 3B8060 E00B84E0 00431025 */ or $v0, $v0, $v1 /* 3B8064 E00B84E4 314400FF */ andi $a0, $t2, 0xFF /* 3B8068 E00B84E8 00441025 */ or $v0, $v0, $a0 /* 3B806C E00B84EC ACA20004 */ sw $v0, 0x4($a1) /* 3B8070 E00B84F0 8FAA009C */ lw $t2, 0x9C($sp) /* 3B8074 E00B84F4 25420001 */ addiu $v0, $t2, 0x1 /* 3B8078 E00B84F8 8FAA0098 */ lw $t2, 0x98($sp) /* 3B807C E00B84FC 02C21023 */ subu $v0, $s6, $v0 /* 3B8080 E00B8500 0142102A */ slt $v0, $t2, $v0 /* 3B8084 E00B8504 14400018 */ bnez $v0, .LE00B8568 /* 3B8088 E00B8508 00161042 */ srl $v0, $s6, 1 /* 3B808C E00B850C 24A20010 */ addiu $v0, $a1, 0x10 /* 3B8090 E00B8510 AE820000 */ sw $v0, 0x0($s4) /* 3B8094 E00B8514 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B8098 E00B8518 ACA20008 */ sw $v0, 0x8($a1) /* 3B809C E00B851C 8FAA00A4 */ lw $t2, 0xA4($sp) /* 3B80A0 E00B8520 000A1E00 */ sll $v1, $t2, 24 /* 3B80A4 E00B8524 8FAA00A8 */ lw $t2, 0xA8($sp) /* 3B80A8 E00B8528 314200FF */ andi $v0, $t2, 0xFF /* 3B80AC E00B852C 00021400 */ sll $v0, $v0, 16 /* 3B80B0 E00B8530 8FAA00AC */ lw $t2, 0xAC($sp) /* 3B80B4 E00B8534 00621825 */ or $v1, $v1, $v0 /* 3B80B8 E00B8538 314200FF */ andi $v0, $t2, 0xFF /* 3B80BC E00B853C 00021200 */ sll $v0, $v0, 8 /* 3B80C0 E00B8540 00621825 */ or $v1, $v1, $v0 /* 3B80C4 E00B8544 00641825 */ or $v1, $v1, $a0 /* 3B80C8 E00B8548 24A20018 */ addiu $v0, $a1, 0x18 /* 3B80CC E00B854C ACA3000C */ sw $v1, 0xC($a1) /* 3B80D0 E00B8550 AE820000 */ sw $v0, 0x0($s4) /* 3B80D4 E00B8554 3C020900 */ lui $v0, %hi(D_09000348_4153A8) /* 3B80D8 E00B8558 24420348 */ addiu $v0, $v0, %lo(D_09000348_4153A8) /* 3B80DC E00B855C ACB70010 */ sw $s7, 0x10($a1) /* 3B80E0 E00B8560 ACA20014 */ sw $v0, 0x14($a1) /* 3B80E4 E00B8564 00161042 */ srl $v0, $s6, 1 .LE00B8568: /* 3B80E8 E00B8568 184000BF */ blez $v0, .LE00B8868 /* 3B80EC E00B856C 0000B82D */ daddu $s7, $zero, $zero /* 3B80F0 E00B8570 001E1080 */ sll $v0, $fp, 2 /* 3B80F4 E00B8574 4600B506 */ mov.s $f20, $f22 /* 3B80F8 E00B8578 3C01E00C */ lui $at, (0xE00C0000 >> 16) /* 3B80FC E00B857C D4368CD0 */ ldc1 $f22, -0x7330($at) /* 3B8100 E00B8580 005E1021 */ addu $v0, $v0, $fp /* 3B8104 E00B8584 AFA200BC */ sw $v0, 0xBC($sp) /* 3B8108 E00B8588 AFBE00C4 */ sw $fp, 0xC4($sp) .LE00B858C: /* 3B810C E00B858C 8FAA00B0 */ lw $t2, 0xB0($sp) /* 3B8110 E00B8590 114000AE */ beqz $t2, .LE00B884C /* 3B8114 E00B8594 0000902D */ daddu $s2, $zero, $zero /* 3B8118 E00B8598 3C1E0001 */ lui $fp, (0x11630 >> 16) /* 3B811C E00B859C 37DE1630 */ ori $fp, $fp, (0x11630 & 0xFFFF) /* 3B8120 E00B85A0 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 3B8124 E00B85A4 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 3B8128 E00B85A8 8FAA00C4 */ lw $t2, 0xC4($sp) /* 3B812C E00B85AC 0240982D */ daddu $s3, $s2, $zero /* 3B8130 E00B85B0 AFAA00B8 */ sw $t2, 0xB8($sp) /* 3B8134 E00B85B4 8FAA00A4 */ lw $t2, 0xA4($sp) /* 3B8138 E00B85B8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3B813C E00B85BC 4481C000 */ mtc1 $at, $f24 /* 3B8140 E00B85C0 000A5600 */ sll $t2, $t2, 24 /* 3B8144 E00B85C4 AFAA00C0 */ sw $t2, 0xC0($sp) .LE00B85C8: /* 3B8148 E00B85C8 8FAA00B8 */ lw $t2, 0xB8($sp) /* 3B814C E00B85CC 16C00002 */ bnez $s6, .LE00B85D8 /* 3B8150 E00B85D0 0156001A */ div $zero, $t2, $s6 /* 3B8154 E00B85D4 0007000D */ break 7 .LE00B85D8: /* 3B8158 E00B85D8 2401FFFF */ addiu $at, $zero, -0x1 /* 3B815C E00B85DC 16C10004 */ bne $s6, $at, .LE00B85F0 /* 3B8160 E00B85E0 3C018000 */ lui $at, (0x80000000 >> 16) /* 3B8164 E00B85E4 15410002 */ bne $t2, $at, .LE00B85F0 /* 3B8168 E00B85E8 00000000 */ nop /* 3B816C E00B85EC 0006000D */ break 6 .LE00B85F0: /* 3B8170 E00B85F0 00001810 */ mfhi $v1 /* 3B8174 E00B85F4 00131080 */ sll $v0, $s3, 2 /* 3B8178 E00B85F8 00531021 */ addu $v0, $v0, $s3 /* 3B817C E00B85FC 8FAA00B4 */ lw $t2, 0xB4($sp) /* 3B8180 E00B8600 00021040 */ sll $v0, $v0, 1 /* 3B8184 E00B8604 01422821 */ addu $a1, $t2, $v0 /* 3B8188 E00B8608 8FAA00BC */ lw $t2, 0xBC($sp) /* 3B818C E00B860C 0143102A */ slt $v0, $t2, $v1 /* 3B8190 E00B8610 14400089 */ bnez $v0, .LE00B8838 /* 3B8194 E00B8614 24620001 */ addiu $v0, $v1, 0x1 /* 3B8198 E00B8618 8FAA0098 */ lw $t2, 0x98($sp) /* 3B819C E00B861C 02C21023 */ subu $v0, $s6, $v0 /* 3B81A0 E00B8620 0142102A */ slt $v0, $t2, $v0 /* 3B81A4 E00B8624 14400084 */ bnez $v0, .LE00B8838 /* 3B81A8 E00B8628 00038080 */ sll $s0, $v1, 2 /* 3B81AC E00B862C 02038021 */ addu $s0, $s0, $v1 /* 3B81B0 E00B8630 00108040 */ sll $s0, $s0, 1 /* 3B81B4 E00B8634 02058821 */ addu $s1, $s0, $a1 /* 3B81B8 E00B8638 82220001 */ lb $v0, 0x1($s1) /* 3B81BC E00B863C 3C014120 */ lui $at, (0x41200000 >> 16) /* 3B81C0 E00B8640 44811000 */ mtc1 $at, $f2 /* 3B81C4 E00B8644 4407A000 */ mfc1 $a3, $f20 /* 3B81C8 E00B8648 44820000 */ mtc1 $v0, $f0 /* 3B81CC E00B864C 00000000 */ nop /* 3B81D0 E00B8650 46800020 */ cvt.s.w $f0, $f0 /* 3B81D4 E00B8654 82220000 */ lb $v0, 0x0($s1) /* 3B81D8 E00B8658 46020000 */ add.s $f0, $f0, $f2 /* 3B81DC E00B865C 44822000 */ mtc1 $v0, $f4 /* 3B81E0 E00B8660 00000000 */ nop /* 3B81E4 E00B8664 46802120 */ cvt.s.w $f4, $f4 /* 3B81E8 E00B8668 44052000 */ mfc1 $a1, $f4 /* 3B81EC E00B866C 44060000 */ mfc1 $a2, $f0 /* 3B81F0 E00B8670 0C080108 */ jal shim_guTranslateF /* 3B81F4 E00B8674 27A40018 */ addiu $a0, $sp, 0x18 /* 3B81F8 E00B8678 8FAA00B4 */ lw $t2, 0xB4($sp) /* 3B81FC E00B867C 020A8021 */ addu $s0, $s0, $t2 /* 3B8200 E00B8680 86020002 */ lh $v0, 0x2($s0) /* 3B8204 E00B8684 44821000 */ mtc1 $v0, $f2 /* 3B8208 E00B8688 00000000 */ nop /* 3B820C E00B868C 468010A0 */ cvt.s.w $f2, $f2 /* 3B8210 E00B8690 460010A1 */ cvt.d.s $f2, $f2 /* 3B8214 E00B8694 46361082 */ mul.d $f2, $f2, $f22 /* 3B8218 E00B8698 00000000 */ nop /* 3B821C E00B869C 86020004 */ lh $v0, 0x4($s0) /* 3B8220 E00B86A0 44820000 */ mtc1 $v0, $f0 /* 3B8224 E00B86A4 00000000 */ nop /* 3B8228 E00B86A8 46800020 */ cvt.s.w $f0, $f0 /* 3B822C E00B86AC 46000021 */ cvt.d.s $f0, $f0 /* 3B8230 E00B86B0 46360002 */ mul.d $f0, $f0, $f22 /* 3B8234 E00B86B4 00000000 */ nop /* 3B8238 E00B86B8 4407C000 */ mfc1 $a3, $f24 /* 3B823C E00B86BC 462010A0 */ cvt.s.d $f2, $f2 /* 3B8240 E00B86C0 44051000 */ mfc1 $a1, $f2 /* 3B8244 E00B86C4 46200020 */ cvt.s.d $f0, $f0 /* 3B8248 E00B86C8 44060000 */ mfc1 $a2, $f0 /* 3B824C E00B86CC 0C080110 */ jal shim_guScaleF /* 3B8250 E00B86D0 02A0202D */ daddu $a0, $s5, $zero /* 3B8254 E00B86D4 02A0202D */ daddu $a0, $s5, $zero /* 3B8258 E00B86D8 27A50018 */ addiu $a1, $sp, 0x18 /* 3B825C E00B86DC 0C080114 */ jal shim_guMtxCatF /* 3B8260 E00B86E0 00A0302D */ daddu $a2, $a1, $zero /* 3B8264 E00B86E4 86220006 */ lh $v0, 0x6($s1) /* 3B8268 E00B86E8 3C0AE00C */ lui $t2, %hi(D_E00B8CA4) /* 3B826C E00B86EC 254A8CA4 */ addiu $t2, $t2, %lo(D_E00B8CA4) /* 3B8270 E00B86F0 44821000 */ mtc1 $v0, $f2 /* 3B8274 E00B86F4 00000000 */ nop /* 3B8278 E00B86F8 468010A0 */ cvt.s.w $f2, $f2 /* 3B827C E00B86FC 02571021 */ addu $v0, $s2, $s7 /* 3B8280 E00B8700 30420007 */ andi $v0, $v0, 0x7 /* 3B8284 E00B8704 00021080 */ sll $v0, $v0, 2 /* 3B8288 E00B8708 004A1021 */ addu $v0, $v0, $t2 /* 3B828C E00B870C C4400000 */ lwc1 $f0, 0x0($v0) /* 3B8290 E00B8710 46800020 */ cvt.s.w $f0, $f0 /* 3B8294 E00B8714 46001080 */ add.s $f2, $f2, $f0 /* 3B8298 E00B8718 4406A000 */ mfc1 $a2, $f20 /* 3B829C E00B871C 4407A000 */ mfc1 $a3, $f20 /* 3B82A0 E00B8720 44051000 */ mfc1 $a1, $f2 /* 3B82A4 E00B8724 02A0202D */ daddu $a0, $s5, $zero /* 3B82A8 E00B8728 0C080104 */ jal shim_guRotateF /* 3B82AC E00B872C E7B80010 */ swc1 $f24, 0x10($sp) /* 3B82B0 E00B8730 02A0202D */ daddu $a0, $s5, $zero /* 3B82B4 E00B8734 27A50018 */ addiu $a1, $sp, 0x18 /* 3B82B8 E00B8738 0C080114 */ jal shim_guMtxCatF /* 3B82BC E00B873C 00A0302D */ daddu $a2, $a1, $zero /* 3B82C0 E00B8740 27A40018 */ addiu $a0, $sp, 0x18 /* 3B82C4 E00B8744 3C058007 */ lui $a1, %hi(gMatrixListPos) /* 3B82C8 E00B8748 94A541F0 */ lhu $a1, %lo(gMatrixListPos)($a1) /* 3B82CC E00B874C 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3B82D0 E00B8750 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3B82D4 E00B8754 00052980 */ sll $a1, $a1, 6 /* 3B82D8 E00B8758 00BE2821 */ addu $a1, $a1, $fp /* 3B82DC E00B875C 0C080118 */ jal shim_guMtxF2L /* 3B82E0 E00B8760 00452821 */ addu $a1, $v0, $a1 /* 3B82E4 E00B8764 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3B82E8 E00B8768 8E840000 */ lw $a0, 0x0($s4) /* 3B82EC E00B876C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3B82F0 E00B8770 0080282D */ daddu $a1, $a0, $zero /* 3B82F4 E00B8774 24840008 */ addiu $a0, $a0, 0x8 /* 3B82F8 E00B8778 AE840000 */ sw $a0, 0x0($s4) /* 3B82FC E00B877C 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 3B8300 E00B8780 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0) /* 3B8304 E00B8784 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3B8308 E00B8788 ACA30000 */ sw $v1, 0x0($a1) /* 3B830C E00B878C 24430001 */ addiu $v1, $v0, 0x1 /* 3B8310 E00B8790 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B8314 E00B8794 00021180 */ sll $v0, $v0, 6 /* 3B8318 E00B8798 3C018007 */ lui $at, %hi(gMatrixListPos) /* 3B831C E00B879C A42341F0 */ sh $v1, %lo(gMatrixListPos)($at) /* 3B8320 E00B87A0 3C03800A */ lui $v1, %hi(gDisplayContext) /* 3B8324 E00B87A4 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 3B8328 E00B87A8 005E1021 */ addu $v0, $v0, $fp /* 3B832C E00B87AC 00621821 */ addu $v1, $v1, $v0 /* 3B8330 E00B87B0 24820008 */ addiu $v0, $a0, 0x8 /* 3B8334 E00B87B4 ACA30004 */ sw $v1, 0x4($a1) /* 3B8338 E00B87B8 AE820000 */ sw $v0, 0x0($s4) /* 3B833C E00B87BC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B8340 E00B87C0 AC820000 */ sw $v0, 0x0($a0) /* 3B8344 E00B87C4 92050008 */ lbu $a1, 0x8($s0) /* 3B8348 E00B87C8 24820010 */ addiu $v0, $a0, 0x10 /* 3B834C E00B87CC AE820000 */ sw $v0, 0x0($s4) /* 3B8350 E00B87D0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B8354 E00B87D4 AC820008 */ sw $v0, 0x8($a0) /* 3B8358 E00B87D8 3C020900 */ lui $v0, %hi(D_09000328_415388) /* 3B835C E00B87DC 24420328 */ addiu $v0, $v0, %lo(D_09000328_415388) /* 3B8360 E00B87E0 AC82000C */ sw $v0, 0xC($a0) /* 3B8364 E00B87E4 24820018 */ addiu $v0, $a0, 0x18 /* 3B8368 E00B87E8 AE820000 */ sw $v0, 0x0($s4) /* 3B836C E00B87EC 24020040 */ addiu $v0, $zero, 0x40 /* 3B8370 E00B87F0 AC860010 */ sw $a2, 0x10($a0) /* 3B8374 E00B87F4 AC820014 */ sw $v0, 0x14($a0) /* 3B8378 E00B87F8 8FAA00A8 */ lw $t2, 0xA8($sp) /* 3B837C E00B87FC 314300FF */ andi $v1, $t2, 0xFF /* 3B8380 E00B8800 8FAA00A0 */ lw $t2, 0xA0($sp) /* 3B8384 E00B8804 01450018 */ mult $t2, $a1 /* 3B8388 E00B8808 8FAA00C0 */ lw $t2, 0xC0($sp) /* 3B838C E00B880C 00031C00 */ sll $v1, $v1, 16 /* 3B8390 E00B8810 01431825 */ or $v1, $t2, $v1 /* 3B8394 E00B8814 8FAA00AC */ lw $t2, 0xAC($sp) /* 3B8398 E00B8818 314200FF */ andi $v0, $t2, 0xFF /* 3B839C E00B881C 00021200 */ sll $v0, $v0, 8 /* 3B83A0 E00B8820 00621825 */ or $v1, $v1, $v0 /* 3B83A4 E00B8824 00005012 */ mflo $t2 /* 3B83A8 E00B8828 000A1203 */ sra $v0, $t2, 8 /* 3B83AC E00B882C 304200FF */ andi $v0, $v0, 0xFF /* 3B83B0 E00B8830 00621825 */ or $v1, $v1, $v0 /* 3B83B4 E00B8834 AC830004 */ sw $v1, 0x4($a0) .LE00B8838: /* 3B83B8 E00B8838 8FAA00B0 */ lw $t2, 0xB0($sp) /* 3B83BC E00B883C 26520001 */ addiu $s2, $s2, 0x1 /* 3B83C0 E00B8840 024A102A */ slt $v0, $s2, $t2 /* 3B83C4 E00B8844 1440FF60 */ bnez $v0, .LE00B85C8 /* 3B83C8 E00B8848 02769821 */ addu $s3, $s3, $s6 .LE00B884C: /* 3B83CC E00B884C 26F70001 */ addiu $s7, $s7, 0x1 /* 3B83D0 E00B8850 00161042 */ srl $v0, $s6, 1 /* 3B83D4 E00B8854 8FAA00C4 */ lw $t2, 0xC4($sp) /* 3B83D8 E00B8858 02E2102A */ slt $v0, $s7, $v0 /* 3B83DC E00B885C 254A0002 */ addiu $t2, $t2, 0x2 /* 3B83E0 E00B8860 1440FF4A */ bnez $v0, .LE00B858C /* 3B83E4 E00B8864 AFAA00C4 */ sw $t2, 0xC4($sp) .LE00B8868: /* 3B83E8 E00B8868 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3B83EC E00B886C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3B83F0 E00B8870 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3B83F4 E00B8874 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3B83F8 E00B8878 8C820000 */ lw $v0, 0x0($a0) /* 3B83FC E00B887C 24050040 */ addiu $a1, $zero, 0x40 /* 3B8400 E00B8880 0040182D */ daddu $v1, $v0, $zero /* 3B8404 E00B8884 24420008 */ addiu $v0, $v0, 0x8 /* 3B8408 E00B8888 AC820000 */ sw $v0, 0x0($a0) /* 3B840C E00B888C AC660000 */ sw $a2, 0x0($v1) /* 3B8410 E00B8890 AC650004 */ sw $a1, 0x4($v1) /* 3B8414 E00B8894 24430008 */ addiu $v1, $v0, 0x8 /* 3B8418 E00B8898 AC830000 */ sw $v1, 0x0($a0) /* 3B841C E00B889C 24430010 */ addiu $v1, $v0, 0x10 /* 3B8420 E00B88A0 AC460000 */ sw $a2, 0x0($v0) /* 3B8424 E00B88A4 AC450004 */ sw $a1, 0x4($v0) /* 3B8428 E00B88A8 AC830000 */ sw $v1, 0x0($a0) /* 3B842C E00B88AC 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 3B8430 E00B88B0 AC430008 */ sw $v1, 0x8($v0) /* 3B8434 E00B88B4 AC40000C */ sw $zero, 0xC($v0) /* 3B8438 E00B88B8 8FBF00EC */ lw $ra, 0xEC($sp) /* 3B843C E00B88BC 8FBE00E8 */ lw $fp, 0xE8($sp) /* 3B8440 E00B88C0 8FB700E4 */ lw $s7, 0xE4($sp) /* 3B8444 E00B88C4 8FB600E0 */ lw $s6, 0xE0($sp) /* 3B8448 E00B88C8 8FB500DC */ lw $s5, 0xDC($sp) /* 3B844C E00B88CC 8FB400D8 */ lw $s4, 0xD8($sp) /* 3B8450 E00B88D0 8FB300D4 */ lw $s3, 0xD4($sp) /* 3B8454 E00B88D4 8FB200D0 */ lw $s2, 0xD0($sp) /* 3B8458 E00B88D8 8FB100CC */ lw $s1, 0xCC($sp) /* 3B845C E00B88DC 8FB000C8 */ lw $s0, 0xC8($sp) /* 3B8460 E00B88E0 D7B80100 */ ldc1 $f24, 0x100($sp) /* 3B8464 E00B88E4 D7B600F8 */ ldc1 $f22, 0xF8($sp) /* 3B8468 E00B88E8 D7B400F0 */ ldc1 $f20, 0xF0($sp) /* 3B846C E00B88EC 03E00008 */ jr $ra ### DECOMPILED C INSTRUCTIONS: void water_fountain_appendGfx(void *effect) { WaterFountainFXData* data = ((EffectInstance*)effect)->data.waterFountain; Camera* camera = &gCameras[gCurrentCameraID]; s32 lifeTime = data->lifeTime; s32 timeLeft = data->timeLeft; s32 sp9C; s32 unk_24 = data->unk_24; s32 unk_00 = data->unk_00; s32 unk_18 = data->unk_18; s32 unk_1C = data->unk_1C; s32 unk_20 = data->unk_20; s32 spB0; s32 var_s6; s32 temp; UnkStruct* basePtr; Matrix4f sp18; Matrix4f sp58; s32 i; s32 j; if (unk_00 == 0) { spB0 = 3; basePtr = D_E00B8900; var_s6 = 20; } else { var_s6 = 11; spB0 = 3; basePtr = D_E00B8B58; } gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guScaleF(sp58, data->unk_34, data->unk_34, data->unk_34); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000280_3B8AE0); shim_guRotateF(sp18, data->unk_38, 0.0f, 0.0f, 1.0f); shim_guScaleF(sp58, data->unk_3C, data->unk_40, 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); gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, unk_24); temp = sp9C + 1; if (timeLeft >= var_s6 - temp) { gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, unk_24); gSPDisplayList(gMainGfxPos++, D_09000348_3B8BA8); } for (i = 0; i < var_s6 / 2; i++) { for (j = 0; j < spB0; j++) { s32 idx = (lifeTime + i * 2) % var_s6; UnkStruct* ptr = &basePtr[j * var_s6]; if (lifeTime * 5 >= idx) { s32 temp2 = idx + 1; if (timeLeft >= var_s6 - temp2) { shim_guTranslateF(sp18, (f32) ptr[idx].unk_00, (f32) ptr[idx].unk_01 + 10.0f, 0.0f); shim_guScaleF(sp58, (f32) basePtr[idx].unk_02 * 0.01, (f32) basePtr[idx].unk_04 * 0.01, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, (f32) ptr[idx].unk_06 + D_E00B8CA4[(j + i) & 7], 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, (unk_24 * basePtr[idx].unk_08) >> 8); gSPDisplayList(gMainGfxPos++, D_09000328_3B8B88); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel misc_particles_update /* 3DE290 E00E4290 27BDFF80 */ addiu $sp, $sp, -0x80 /* 3DE294 E00E4294 AFB40038 */ sw $s4, 0x38($sp) /* 3DE298 E00E4298 0080A02D */ daddu $s4, $a0, $zero /* 3DE29C E00E429C AFBF004C */ sw $ra, 0x4C($sp) /* 3DE2A0 E00E42A0 AFBE0048 */ sw $fp, 0x48($sp) /* 3DE2A4 E00E42A4 AFB70044 */ sw $s7, 0x44($sp) /* 3DE2A8 E00E42A8 AFB60040 */ sw $s6, 0x40($sp) /* 3DE2AC E00E42AC AFB5003C */ sw $s5, 0x3C($sp) /* 3DE2B0 E00E42B0 AFB30034 */ sw $s3, 0x34($sp) /* 3DE2B4 E00E42B4 AFB20030 */ sw $s2, 0x30($sp) /* 3DE2B8 E00E42B8 AFB1002C */ sw $s1, 0x2C($sp) /* 3DE2BC E00E42BC AFB00028 */ sw $s0, 0x28($sp) /* 3DE2C0 E00E42C0 F7BE0078 */ sdc1 $f30, 0x78($sp) /* 3DE2C4 E00E42C4 F7BC0070 */ sdc1 $f28, 0x70($sp) /* 3DE2C8 E00E42C8 F7BA0068 */ sdc1 $f26, 0x68($sp) /* 3DE2CC E00E42CC F7B80060 */ sdc1 $f24, 0x60($sp) /* 3DE2D0 E00E42D0 F7B60058 */ sdc1 $f22, 0x58($sp) /* 3DE2D4 E00E42D4 F7B40050 */ sdc1 $f20, 0x50($sp) /* 3DE2D8 E00E42D8 8E830000 */ lw $v1, 0x0($s4) /* 3DE2DC E00E42DC 8E91000C */ lw $s1, 0xC($s4) /* 3DE2E0 E00E42E0 30620010 */ andi $v0, $v1, 0x10 /* 3DE2E4 E00E42E4 8E320000 */ lw $s2, 0x0($s1) /* 3DE2E8 E00E42E8 10400005 */ beqz $v0, .LE00E4300 /* 3DE2EC E00E42EC 2402FFEF */ addiu $v0, $zero, -0x11 /* 3DE2F0 E00E42F0 00621024 */ and $v0, $v1, $v0 /* 3DE2F4 E00E42F4 AE820000 */ sw $v0, 0x0($s4) /* 3DE2F8 E00E42F8 24020010 */ addiu $v0, $zero, 0x10 /* 3DE2FC E00E42FC AE220030 */ sw $v0, 0x30($s1) .LE00E4300: /* 3DE300 E00E4300 8E230030 */ lw $v1, 0x30($s1) /* 3DE304 E00E4304 286203E8 */ slti $v0, $v1, 0x3E8 /* 3DE308 E00E4308 10400002 */ beqz $v0, .LE00E4314 /* 3DE30C E00E430C 2462FFFF */ addiu $v0, $v1, -0x1 /* 3DE310 E00E4310 AE220030 */ sw $v0, 0x30($s1) .LE00E4314: /* 3DE314 E00E4314 8E220034 */ lw $v0, 0x34($s1) /* 3DE318 E00E4318 8E230030 */ lw $v1, 0x30($s1) /* 3DE31C E00E431C 24420001 */ addiu $v0, $v0, 0x1 /* 3DE320 E00E4320 04610005 */ bgez $v1, .LE00E4338 /* 3DE324 E00E4324 AE220034 */ sw $v0, 0x34($s1) /* 3DE328 E00E4328 0C080128 */ jal shim_remove_effect /* 3DE32C E00E432C 0280202D */ daddu $a0, $s4, $zero /* 3DE330 E00E4330 08039231 */ j .LE00E48C4 /* 3DE334 E00E4334 00000000 */ nop .LE00E4338: /* 3DE338 E00E4338 0060A82D */ daddu $s5, $v1, $zero /* 3DE33C E00E433C 2AA20008 */ slti $v0, $s5, 0x8 /* 3DE340 E00E4340 10400002 */ beqz $v0, .LE00E434C /* 3DE344 E00E4344 00151140 */ sll $v0, $s5, 5 /* 3DE348 E00E4348 AE220044 */ sw $v0, 0x44($s1) .LE00E434C: /* 3DE34C E00E434C 3C108007 */ lui $s0, %hi(gCurrentCameraID) /* 3DE350 E00E4350 26107410 */ addiu $s0, $s0, %lo(gCurrentCameraID) /* 3DE354 E00E4354 8E030000 */ lw $v1, 0x0($s0) /* 3DE358 E00E4358 C6300014 */ lwc1 $f16, 0x14($s1) /* 3DE35C E00E435C C63E0010 */ lwc1 $f30, 0x10($s1) /* 3DE360 E00E4360 00031080 */ sll $v0, $v1, 2 /* 3DE364 E00E4364 00431021 */ addu $v0, $v0, $v1 /* 3DE368 E00E4368 00021080 */ sll $v0, $v0, 2 /* 3DE36C E00E436C 00431023 */ subu $v0, $v0, $v1 /* 3DE370 E00E4370 000218C0 */ sll $v1, $v0, 3 /* 3DE374 E00E4374 00431021 */ addu $v0, $v0, $v1 /* 3DE378 E00E4378 000210C0 */ sll $v0, $v0, 3 /* 3DE37C E00E437C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3DE380 E00E4380 00220821 */ addu $at, $at, $v0 /* 3DE384 E00E4384 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) /* 3DE388 E00E4388 E7B00010 */ swc1 $f16, 0x10($sp) /* 3DE38C E00E438C C6300004 */ lwc1 $f16, 0x4($s1) /* 3DE390 E00E4390 E7B00014 */ swc1 $f16, 0x14($sp) /* 3DE394 E00E4394 C6300008 */ lwc1 $f16, 0x8($s1) /* 3DE398 E00E4398 E7B00018 */ swc1 $f16, 0x18($sp) /* 3DE39C E00E439C C630000C */ lwc1 $f16, 0xC($s1) /* 3DE3A0 E00E43A0 0C080144 */ jal shim_cos_deg /* 3DE3A4 E00E43A4 E7B0001C */ swc1 $f16, 0x1C($sp) /* 3DE3A8 E00E43A8 8E030000 */ lw $v1, 0x0($s0) /* 3DE3AC E00E43AC 00031080 */ sll $v0, $v1, 2 /* 3DE3B0 E00E43B0 00431021 */ addu $v0, $v0, $v1 /* 3DE3B4 E00E43B4 00021080 */ sll $v0, $v0, 2 /* 3DE3B8 E00E43B8 00431023 */ subu $v0, $v0, $v1 /* 3DE3BC E00E43BC 000218C0 */ sll $v1, $v0, 3 /* 3DE3C0 E00E43C0 00431021 */ addu $v0, $v0, $v1 /* 3DE3C4 E00E43C4 000210C0 */ sll $v0, $v0, 3 /* 3DE3C8 E00E43C8 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3DE3CC E00E43CC 00220821 */ addu $at, $at, $v0 /* 3DE3D0 E00E43D0 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) /* 3DE3D4 E00E43D4 0C080140 */ jal shim_sin_deg /* 3DE3D8 E00E43D8 46000706 */ mov.s $f28, $f0 /* 3DE3DC E00E43DC 8E250038 */ lw $a1, 0x38($s1) /* 3DE3E0 E00E43E0 24130001 */ addiu $s3, $zero, 0x1 /* 3DE3E4 E00E43E4 AFA50020 */ sw $a1, 0x20($sp) /* 3DE3E8 E00E43E8 8E3E003C */ lw $fp, 0x3C($s1) /* 3DE3EC E00E43EC 8E250040 */ lw $a1, 0x40($s1) /* 3DE3F0 E00E43F0 46000686 */ mov.s $f26, $f0 /* 3DE3F4 E00E43F4 AFA50024 */ sw $a1, 0x24($sp) /* 3DE3F8 E00E43F8 8E820008 */ lw $v0, 0x8($s4) /* 3DE3FC E00E43FC 0262102A */ slt $v0, $s3, $v0 /* 3DE400 E00E4400 10400130 */ beqz $v0, .LE00E48C4 /* 3DE404 E00E4404 26310064 */ addiu $s1, $s1, 0x64 /* 3DE408 E00E4408 241600FF */ addiu $s6, $zero, 0xFF /* 3DE40C E00E440C 3C17E00E */ lui $s7, %hi(D_E00E4DC0) /* 3DE410 E00E4410 26F74DC0 */ addiu $s7, $s7, %lo(D_E00E4DC0) /* 3DE414 E00E4414 26300058 */ addiu $s0, $s1, 0x58 /* 3DE418 E00E4418 3C01E00E */ lui $at, (0xE00E4E20 >> 16) /* 3DE41C E00E441C D4384E20 */ ldc1 $f24, (0xE00E4E20 & 0xFFFF)($at) /* 3DE420 E00E4420 3C01E00E */ lui $at, (0xE00E4E28 >> 16) /* 3DE424 E00E4424 D4364E28 */ ldc1 $f22, (0xE00E4E28 & 0xFFFF)($at) .LE00E4428: /* 3DE428 E00E4428 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE42C E00E442C 24420001 */ addiu $v0, $v0, 0x1 /* 3DE430 E00E4430 AE02FFD4 */ sw $v0, -0x2C($s0) /* 3DE434 E00E4434 2842001E */ slti $v0, $v0, 0x1E /* 3DE438 E00E4438 14400006 */ bnez $v0, .LE00E4454 /* 3DE43C E00E443C 2AA2001E */ slti $v0, $s5, 0x1E /* 3DE440 E00E4440 10400003 */ beqz $v0, .LE00E4450 /* 3DE444 E00E4444 24020014 */ addiu $v0, $zero, 0x14 /* 3DE448 E00E4448 08039115 */ j .LE00E4454 /* 3DE44C E00E444C AE02FFD4 */ sw $v0, -0x2C($s0) .LE00E4450: /* 3DE450 E00E4450 AE00FFD4 */ sw $zero, -0x2C($s0) .LE00E4454: /* 3DE454 E00E4454 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE458 E00E4458 04420116 */ bltzl $v0, .LE00E48B4 /* 3DE45C E00E445C 26730001 */ addiu $s3, $s3, 0x1 /* 3DE460 E00E4460 1440002B */ bnez $v0, .LE00E4510 /* 3DE464 E00E4464 00000000 */ nop /* 3DE468 E00E4468 4600F40D */ trunc.w.s $f16, $f30 /* 3DE46C E00E446C 44048000 */ mfc1 $a0, $f16 /* 3DE470 E00E4470 0C080138 */ jal shim_rand_int /* 3DE474 E00E4474 00000000 */ nop /* 3DE478 E00E4478 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3DE47C E00E447C 44811800 */ mtc1 $at, $f3 /* 3DE480 E00E4480 44801000 */ mtc1 $zero, $f2 /* 3DE484 E00E4484 4600F021 */ cvt.d.s $f0, $f30 /* 3DE488 E00E4488 46220002 */ mul.d $f0, $f0, $f2 /* 3DE48C E00E448C 00000000 */ nop /* 3DE490 E00E4490 4482A000 */ mtc1 $v0, $f20 /* 3DE494 E00E4494 00000000 */ nop /* 3DE498 E00E4498 4680A521 */ cvt.d.w $f20, $f20 /* 3DE49C E00E449C 4620A501 */ sub.d $f20, $f20, $f0 /* 3DE4A0 E00E44A0 4620A520 */ cvt.s.d $f20, $f20 /* 3DE4A4 E00E44A4 461CA002 */ mul.s $f0, $f20, $f28 /* 3DE4A8 E00E44A8 00000000 */ nop /* 3DE4AC E00E44AC C7B00014 */ lwc1 $f16, 0x14($sp) /* 3DE4B0 E00E44B0 46008000 */ add.s $f0, $f16, $f0 /* 3DE4B4 E00E44B4 C7B00010 */ lwc1 $f16, 0x10($sp) /* 3DE4B8 E00E44B8 461A0001 */ sub.s $f0, $f0, $f26 /* 3DE4BC E00E44BC 4600840D */ trunc.w.s $f16, $f16 /* 3DE4C0 E00E44C0 44048000 */ mfc1 $a0, $f16 /* 3DE4C4 E00E44C4 0C080138 */ jal shim_rand_int /* 3DE4C8 E00E44C8 E600FFAC */ swc1 $f0, -0x54($s0) /* 3DE4CC E00E44CC 461AA502 */ mul.s $f20, $f20, $f26 /* 3DE4D0 E00E44D0 00000000 */ nop /* 3DE4D4 E00E44D4 44820000 */ mtc1 $v0, $f0 /* 3DE4D8 E00E44D8 00000000 */ nop /* 3DE4DC E00E44DC 46800020 */ cvt.s.w $f0, $f0 /* 3DE4E0 E00E44E0 C7B00018 */ lwc1 $f16, 0x18($sp) /* 3DE4E4 E00E44E4 8FA50020 */ lw $a1, 0x20($sp) /* 3DE4E8 E00E44E8 46008000 */ add.s $f0, $f16, $f0 /* 3DE4EC E00E44EC C7B0001C */ lwc1 $f16, 0x1C($sp) /* 3DE4F0 E00E44F0 AE05FFE0 */ sw $a1, -0x20($s0) /* 3DE4F4 E00E44F4 46148500 */ add.s $f20, $f16, $f20 /* 3DE4F8 E00E44F8 AE1EFFE4 */ sw $fp, -0x1C($s0) /* 3DE4FC E00E44FC 8FA50024 */ lw $a1, 0x24($sp) /* 3DE500 E00E4500 461CA500 */ add.s $f20, $f20, $f28 /* 3DE504 E00E4504 AE05FFE8 */ sw $a1, -0x18($s0) /* 3DE508 E00E4508 E600FFB0 */ swc1 $f0, -0x50($s0) /* 3DE50C E00E450C E614FFB4 */ swc1 $f20, -0x4C($s0) .LE00E4510: /* 3DE510 E00E4510 064000BA */ bltz $s2, .LE00E47FC /* 3DE514 E00E4514 2A420002 */ slti $v0, $s2, 0x2 /* 3DE518 E00E4518 14400005 */ bnez $v0, .LE00E4530 /* 3DE51C E00E451C 2A420004 */ slti $v0, $s2, 0x4 /* 3DE520 E00E4520 104000B6 */ beqz $v0, .LE00E47FC /* 3DE524 E00E4524 00000000 */ nop /* 3DE528 E00E4528 0803919A */ j .LE00E4668 /* 3DE52C E00E452C 00000000 */ nop .LE00E4530: /* 3DE530 E00E4530 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE534 E00E4534 14400020 */ bnez $v0, .LE00E45B8 /* 3DE538 E00E4538 2404000A */ addiu $a0, $zero, 0xA /* 3DE53C E00E453C AE00FFC0 */ sw $zero, -0x40($s0) /* 3DE540 E00E4540 AE00FFC4 */ sw $zero, -0x3C($s0) /* 3DE544 E00E4544 0C080138 */ jal shim_rand_int /* 3DE548 E00E4548 AE00FFCC */ sw $zero, -0x34($s0) /* 3DE54C E00E454C 00021023 */ negu $v0, $v0 /* 3DE550 E00E4550 2442FFFE */ addiu $v0, $v0, -0x2 /* 3DE554 E00E4554 44820000 */ mtc1 $v0, $f0 /* 3DE558 E00E4558 00000000 */ nop /* 3DE55C E00E455C 46800020 */ cvt.s.w $f0, $f0 /* 3DE560 E00E4560 46000021 */ cvt.d.s $f0, $f0 /* 3DE564 E00E4564 46380002 */ mul.d $f0, $f0, $f24 /* 3DE568 E00E4568 00000000 */ nop /* 3DE56C E00E456C 2404000A */ addiu $a0, $zero, 0xA /* 3DE570 E00E4570 AE000004 */ sw $zero, 0x4($s0) /* 3DE574 E00E4574 AE000008 */ sw $zero, 0x8($s0) /* 3DE578 E00E4578 46200020 */ cvt.s.d $f0, $f0 /* 3DE57C E00E457C 0C080138 */ jal shim_rand_int /* 3DE580 E00E4580 E600FFD0 */ swc1 $f0, -0x30($s0) /* 3DE584 E00E4584 44820000 */ mtc1 $v0, $f0 /* 3DE588 E00E4588 00000000 */ nop /* 3DE58C E00E458C 46800020 */ cvt.s.w $f0, $f0 /* 3DE590 E00E4590 46000021 */ cvt.d.s $f0, $f0 /* 3DE594 E00E4594 46380002 */ mul.d $f0, $f0, $f24 /* 3DE598 E00E4598 00000000 */ nop /* 3DE59C E00E459C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3DE5A0 E00E45A0 44811800 */ mtc1 $at, $f3 /* 3DE5A4 E00E45A4 44801000 */ mtc1 $zero, $f2 /* 3DE5A8 E00E45A8 00000000 */ nop /* 3DE5AC E00E45AC 46220000 */ add.d $f0, $f0, $f2 /* 3DE5B0 E00E45B0 46200020 */ cvt.s.d $f0, $f0 /* 3DE5B4 E00E45B4 E6000000 */ swc1 $f0, 0x0($s0) .LE00E45B8: /* 3DE5B8 E00E45B8 C60CFFC0 */ lwc1 $f12, -0x40($s0) /* 3DE5BC E00E45BC C60AFFCC */ lwc1 $f10, -0x34($s0) /* 3DE5C0 E00E45C0 460C5281 */ sub.s $f10, $f10, $f12 /* 3DE5C4 E00E45C4 460052A1 */ cvt.d.s $f10, $f10 /* 3DE5C8 E00E45C8 46365282 */ mul.d $f10, $f10, $f22 /* 3DE5CC E00E45CC 00000000 */ nop /* 3DE5D0 E00E45D0 C608FFC4 */ lwc1 $f8, -0x3C($s0) /* 3DE5D4 E00E45D4 C606FFD0 */ lwc1 $f6, -0x30($s0) /* 3DE5D8 E00E45D8 C604FFAC */ lwc1 $f4, -0x54($s0) /* 3DE5DC E00E45DC 46083181 */ sub.s $f6, $f6, $f8 /* 3DE5E0 E00E45E0 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE5E4 E00E45E4 46006006 */ mov.s $f0, $f12 /* 3DE5E8 E00E45E8 46002100 */ add.s $f4, $f4, $f0 /* 3DE5EC E00E45EC C600FFB0 */ lwc1 $f0, -0x50($s0) /* 3DE5F0 E00E45F0 46004086 */ mov.s $f2, $f8 /* 3DE5F4 E00E45F4 46020000 */ add.s $f0, $f0, $f2 /* 3DE5F8 E00E45F8 3C01E00E */ lui $at, (0xE00E4E00 >> 16) /* 3DE5FC E00E45FC 00220821 */ addu $at, $at, $v0 /* 3DE600 E00E4600 90224E00 */ lbu $v0, (0xE00E4E00 & 0xFFFF)($at) /* 3DE604 E00E4604 460031A1 */ cvt.d.s $f6, $f6 /* 3DE608 E00E4608 46363182 */ mul.d $f6, $f6, $f22 /* 3DE60C E00E460C 00000000 */ nop /* 3DE610 E00E4610 3C01E00E */ lui $at, (0xE00E4E30 >> 16) /* 3DE614 E00E4614 D4224E30 */ ldc1 $f2, (0xE00E4E30 & 0xFFFF)($at) /* 3DE618 E00E4618 46006321 */ cvt.d.s $f12, $f12 /* 3DE61C E00E461C E600FFB0 */ swc1 $f0, -0x50($s0) /* 3DE620 E00E4620 C6000004 */ lwc1 $f0, 0x4($s0) /* 3DE624 E00E4624 46004221 */ cvt.d.s $f8, $f8 /* 3DE628 E00E4628 E604FFAC */ swc1 $f4, -0x54($s0) /* 3DE62C E00E462C 46000021 */ cvt.d.s $f0, $f0 /* 3DE630 E00E4630 46220000 */ add.d $f0, $f0, $f2 /* 3DE634 E00E4634 C6020008 */ lwc1 $f2, 0x8($s0) /* 3DE638 E00E4638 3C01E00E */ lui $at, (0xE00E4E38 >> 16) /* 3DE63C E00E463C D4244E38 */ ldc1 $f4, (0xE00E4E38 & 0xFFFF)($at) /* 3DE640 E00E4640 460010A1 */ cvt.d.s $f2, $f2 /* 3DE644 E00E4644 46241080 */ add.d $f2, $f2, $f4 /* 3DE648 E00E4648 AE02FFEC */ sw $v0, -0x14($s0) /* 3DE64C E00E464C 46200020 */ cvt.s.d $f0, $f0 /* 3DE650 E00E4650 462A6300 */ add.d $f12, $f12, $f10 /* 3DE654 E00E4654 E6000004 */ swc1 $f0, 0x4($s0) /* 3DE658 E00E4658 462010A0 */ cvt.s.d $f2, $f2 /* 3DE65C E00E465C 46264200 */ add.d $f8, $f8, $f6 /* 3DE660 E00E4660 080391FA */ j .LE00E47E8 /* 3DE664 E00E4664 E6020008 */ swc1 $f2, 0x8($s0) .LE00E4668: /* 3DE668 E00E4668 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE66C E00E466C 1440002D */ bnez $v0, .LE00E4724 /* 3DE670 E00E4670 00571021 */ addu $v0, $v0, $s7 /* 3DE674 E00E4674 24020002 */ addiu $v0, $zero, 0x2 /* 3DE678 E00E4678 56420018 */ bnel $s2, $v0, .LE00E46DC /* 3DE67C E00E467C AE00FFC0 */ sw $zero, -0x40($s0) /* 3DE680 E00E4680 0C080138 */ jal shim_rand_int /* 3DE684 E00E4684 24040014 */ addiu $a0, $zero, 0x14 /* 3DE688 E00E4688 2442FFF6 */ addiu $v0, $v0, -0xA /* 3DE68C E00E468C 44820000 */ mtc1 $v0, $f0 /* 3DE690 E00E4690 00000000 */ nop /* 3DE694 E00E4694 46800020 */ cvt.s.w $f0, $f0 /* 3DE698 E00E4698 46000021 */ cvt.d.s $f0, $f0 /* 3DE69C E00E469C 46380002 */ mul.d $f0, $f0, $f24 /* 3DE6A0 E00E46A0 00000000 */ nop /* 3DE6A4 E00E46A4 24040014 */ addiu $a0, $zero, 0x14 /* 3DE6A8 E00E46A8 46200020 */ cvt.s.d $f0, $f0 /* 3DE6AC E00E46AC 0C080138 */ jal shim_rand_int /* 3DE6B0 E00E46B0 E600FFC0 */ swc1 $f0, -0x40($s0) /* 3DE6B4 E00E46B4 2442FFF6 */ addiu $v0, $v0, -0xA /* 3DE6B8 E00E46B8 44820000 */ mtc1 $v0, $f0 /* 3DE6BC E00E46BC 00000000 */ nop /* 3DE6C0 E00E46C0 46800020 */ cvt.s.w $f0, $f0 /* 3DE6C4 E00E46C4 46000021 */ cvt.d.s $f0, $f0 /* 3DE6C8 E00E46C8 46380002 */ mul.d $f0, $f0, $f24 /* 3DE6CC E00E46CC 00000000 */ nop /* 3DE6D0 E00E46D0 46200020 */ cvt.s.d $f0, $f0 /* 3DE6D4 E00E46D4 080391B8 */ j .LE00E46E0 /* 3DE6D8 E00E46D8 E600FFC4 */ swc1 $f0, -0x3C($s0) .LE00E46DC: /* 3DE6DC E00E46DC AE00FFC4 */ sw $zero, -0x3C($s0) .LE00E46E0: /* 3DE6E0 E00E46E0 2404000F */ addiu $a0, $zero, 0xF /* 3DE6E4 E00E46E4 AE00FFCC */ sw $zero, -0x34($s0) /* 3DE6E8 E00E46E8 0C080138 */ jal shim_rand_int /* 3DE6EC E00E46EC AE00FFD0 */ sw $zero, -0x30($s0) /* 3DE6F0 E00E46F0 2404000F */ addiu $a0, $zero, 0xF /* 3DE6F4 E00E46F4 44820000 */ mtc1 $v0, $f0 /* 3DE6F8 E00E46F8 00000000 */ nop /* 3DE6FC E00E46FC 46800020 */ cvt.s.w $f0, $f0 /* 3DE700 E00E4700 0C080138 */ jal shim_rand_int /* 3DE704 E00E4704 E6000004 */ swc1 $f0, 0x4($s0) /* 3DE708 E00E4708 44820000 */ mtc1 $v0, $f0 /* 3DE70C E00E470C 00000000 */ nop /* 3DE710 E00E4710 46800020 */ cvt.s.w $f0, $f0 /* 3DE714 E00E4714 E6000008 */ swc1 $f0, 0x8($s0) /* 3DE718 E00E4718 AE16FFEC */ sw $s6, -0x14($s0) /* 3DE71C E00E471C 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE720 E00E4720 00571021 */ addu $v0, $v0, $s7 .LE00E4724: /* 3DE724 E00E4724 90420000 */ lbu $v0, 0x0($v0) /* 3DE728 E00E4728 3C01E00E */ lui $at, (0xE00E4E40 >> 16) /* 3DE72C E00E472C D4204E40 */ ldc1 $f0, (0xE00E4E40 & 0xFFFF)($at) /* 3DE730 E00E4730 44827000 */ mtc1 $v0, $f14 /* 3DE734 E00E4734 00000000 */ nop /* 3DE738 E00E4738 468073A0 */ cvt.s.w $f14, $f14 /* 3DE73C E00E473C 460073A1 */ cvt.d.s $f14, $f14 /* 3DE740 E00E4740 46207382 */ mul.d $f14, $f14, $f0 /* 3DE744 E00E4744 00000000 */ nop /* 3DE748 E00E4748 C60CFFC0 */ lwc1 $f12, -0x40($s0) /* 3DE74C E00E474C C60AFFCC */ lwc1 $f10, -0x34($s0) /* 3DE750 E00E4750 460C5281 */ sub.s $f10, $f10, $f12 /* 3DE754 E00E4754 460052A1 */ cvt.d.s $f10, $f10 /* 3DE758 E00E4758 46365282 */ mul.d $f10, $f10, $f22 /* 3DE75C E00E475C 00000000 */ nop /* 3DE760 E00E4760 C608FFC4 */ lwc1 $f8, -0x3C($s0) /* 3DE764 E00E4764 C606FFD0 */ lwc1 $f6, -0x30($s0) /* 3DE768 E00E4768 46083181 */ sub.s $f6, $f6, $f8 /* 3DE76C E00E476C C604FFAC */ lwc1 $f4, -0x54($s0) /* 3DE770 E00E4770 46006006 */ mov.s $f0, $f12 /* 3DE774 E00E4774 46002100 */ add.s $f4, $f4, $f0 /* 3DE778 E00E4778 C602FFB0 */ lwc1 $f2, -0x50($s0) /* 3DE77C E00E477C 46004006 */ mov.s $f0, $f8 /* 3DE780 E00E4780 46001080 */ add.s $f2, $f2, $f0 /* 3DE784 E00E4784 460031A1 */ cvt.d.s $f6, $f6 /* 3DE788 E00E4788 46363182 */ mul.d $f6, $f6, $f22 /* 3DE78C E00E478C 00000000 */ nop /* 3DE790 E00E4790 3C01E00E */ lui $at, (0xE00E4E48 >> 16) /* 3DE794 E00E4794 D4204E48 */ ldc1 $f0, (0xE00E4E48 & 0xFFFF)($at) /* 3DE798 E00E4798 46006321 */ cvt.d.s $f12, $f12 /* 3DE79C E00E479C E602FFB0 */ swc1 $f2, -0x50($s0) /* 3DE7A0 E00E47A0 C6020004 */ lwc1 $f2, 0x4($s0) /* 3DE7A4 E00E47A4 46004221 */ cvt.d.s $f8, $f8 /* 3DE7A8 E00E47A8 E604FFAC */ swc1 $f4, -0x54($s0) /* 3DE7AC E00E47AC 460010A1 */ cvt.d.s $f2, $f2 /* 3DE7B0 E00E47B0 46201080 */ add.d $f2, $f2, $f0 /* 3DE7B4 E00E47B4 C6000008 */ lwc1 $f0, 0x8($s0) /* 3DE7B8 E00E47B8 3C01E00E */ lui $at, (0xE00E4E50 >> 16) /* 3DE7BC E00E47BC D4244E50 */ ldc1 $f4, (0xE00E4E50 & 0xFFFF)($at) /* 3DE7C0 E00E47C0 46000021 */ cvt.d.s $f0, $f0 /* 3DE7C4 E00E47C4 46240000 */ add.d $f0, $f0, $f4 /* 3DE7C8 E00E47C8 462010A0 */ cvt.s.d $f2, $f2 /* 3DE7CC E00E47CC E6020004 */ swc1 $f2, 0x4($s0) /* 3DE7D0 E00E47D0 46200020 */ cvt.s.d $f0, $f0 /* 3DE7D4 E00E47D4 462A6300 */ add.d $f12, $f12, $f10 /* 3DE7D8 E00E47D8 E6000008 */ swc1 $f0, 0x8($s0) /* 3DE7DC E00E47DC 462073A0 */ cvt.s.d $f14, $f14 /* 3DE7E0 E00E47E0 46264200 */ add.d $f8, $f8, $f6 /* 3DE7E4 E00E47E4 E60E0000 */ swc1 $f14, 0x0($s0) .LE00E47E8: /* 3DE7E8 E00E47E8 46206320 */ cvt.s.d $f12, $f12 /* 3DE7EC E00E47EC 46204220 */ cvt.s.d $f8, $f8 /* 3DE7F0 E00E47F0 E60CFFC0 */ swc1 $f12, -0x40($s0) /* 3DE7F4 E00E47F4 0803922C */ j .LE00E48B0 /* 3DE7F8 E00E47F8 E608FFC4 */ swc1 $f8, -0x3C($s0) .LE00E47FC: /* 3DE7FC E00E47FC 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE800 E00E4800 14400017 */ bnez $v0, .LE00E4860 /* 3DE804 E00E4804 24020004 */ addiu $v0, $zero, 0x4 /* 3DE808 E00E4808 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3DE80C E00E480C 44810000 */ mtc1 $at, $f0 /* 3DE810 E00E4810 2404007F */ addiu $a0, $zero, 0x7F /* 3DE814 E00E4814 AE000004 */ sw $zero, 0x4($s0) /* 3DE818 E00E4818 AE000008 */ sw $zero, 0x8($s0) /* 3DE81C E00E481C AE16FFEC */ sw $s6, -0x14($s0) /* 3DE820 E00E4820 0C080138 */ jal shim_rand_int /* 3DE824 E00E4824 E6000000 */ swc1 $f0, 0x0($s0) /* 3DE828 E00E4828 24420080 */ addiu $v0, $v0, 0x80 /* 3DE82C E00E482C 02C22023 */ subu $a0, $s6, $v0 /* 3DE830 E00E4830 0C080138 */ jal shim_rand_int /* 3DE834 E00E4834 AE02FFE0 */ sw $v0, -0x20($s0) /* 3DE838 E00E4838 24420080 */ addiu $v0, $v0, 0x80 /* 3DE83C E00E483C 2404017F */ addiu $a0, $zero, 0x17F /* 3DE840 E00E4840 8E03FFE0 */ lw $v1, -0x20($s0) /* 3DE844 E00E4844 00822023 */ subu $a0, $a0, $v0 /* 3DE848 E00E4848 AE02FFE4 */ sw $v0, -0x1C($s0) /* 3DE84C E00E484C 0C080138 */ jal shim_rand_int /* 3DE850 E00E4850 00832023 */ subu $a0, $a0, $v1 /* 3DE854 E00E4854 24420080 */ addiu $v0, $v0, 0x80 /* 3DE858 E00E4858 AE02FFE8 */ sw $v0, -0x18($s0) /* 3DE85C E00E485C 24020004 */ addiu $v0, $zero, 0x4 .LE00E4860: /* 3DE860 E00E4860 16420006 */ bne $s2, $v0, .LE00E487C /* 3DE864 E00E4864 00000000 */ nop /* 3DE868 E00E4868 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE86C E00E486C 3C01E00E */ lui $at, (0xE00E4DE0 >> 16) /* 3DE870 E00E4870 00220821 */ addu $at, $at, $v0 /* 3DE874 E00E4874 08039222 */ j .LE00E4888 /* 3DE878 E00E4878 90224DE0 */ lbu $v0, (0xE00E4DE0 & 0xFFFF)($at) .LE00E487C: /* 3DE87C E00E487C 8E02FFD4 */ lw $v0, -0x2C($s0) /* 3DE880 E00E4880 00571021 */ addu $v0, $v0, $s7 /* 3DE884 E00E4884 90420000 */ lbu $v0, 0x0($v0) .LE00E4888: /* 3DE888 E00E4888 3C01E00E */ lui $at, (0xE00E4E58 >> 16) /* 3DE88C E00E488C D4224E58 */ ldc1 $f2, (0xE00E4E58 & 0xFFFF)($at) /* 3DE890 E00E4890 44820000 */ mtc1 $v0, $f0 /* 3DE894 E00E4894 00000000 */ nop /* 3DE898 E00E4898 46800020 */ cvt.s.w $f0, $f0 /* 3DE89C E00E489C 46000021 */ cvt.d.s $f0, $f0 /* 3DE8A0 E00E48A0 46220002 */ mul.d $f0, $f0, $f2 /* 3DE8A4 E00E48A4 00000000 */ nop /* 3DE8A8 E00E48A8 46200020 */ cvt.s.d $f0, $f0 /* 3DE8AC E00E48AC E6000000 */ swc1 $f0, 0x0($s0) .LE00E48B0: /* 3DE8B0 E00E48B0 26730001 */ addiu $s3, $s3, 0x1 .LE00E48B4: /* 3DE8B4 E00E48B4 8E820008 */ lw $v0, 0x8($s4) /* 3DE8B8 E00E48B8 0262102A */ slt $v0, $s3, $v0 /* 3DE8BC E00E48BC 1440FEDA */ bnez $v0, .LE00E4428 /* 3DE8C0 E00E48C0 26100064 */ addiu $s0, $s0, 0x64 .LE00E48C4: /* 3DE8C4 E00E48C4 8FBF004C */ lw $ra, 0x4C($sp) /* 3DE8C8 E00E48C8 8FBE0048 */ lw $fp, 0x48($sp) /* 3DE8CC E00E48CC 8FB70044 */ lw $s7, 0x44($sp) /* 3DE8D0 E00E48D0 8FB60040 */ lw $s6, 0x40($sp) /* 3DE8D4 E00E48D4 8FB5003C */ lw $s5, 0x3C($sp) /* 3DE8D8 E00E48D8 8FB40038 */ lw $s4, 0x38($sp) /* 3DE8DC E00E48DC 8FB30034 */ lw $s3, 0x34($sp) /* 3DE8E0 E00E48E0 8FB20030 */ lw $s2, 0x30($sp) /* 3DE8E4 E00E48E4 8FB1002C */ lw $s1, 0x2C($sp) /* 3DE8E8 E00E48E8 8FB00028 */ lw $s0, 0x28($sp) /* 3DE8EC E00E48EC D7BE0078 */ ldc1 $f30, 0x78($sp) /* 3DE8F0 E00E48F0 D7BC0070 */ ldc1 $f28, 0x70($sp) /* 3DE8F4 E00E48F4 D7BA0068 */ ldc1 $f26, 0x68($sp) /* 3DE8F8 E00E48F8 D7B80060 */ ldc1 $f24, 0x60($sp) /* 3DE8FC E00E48FC D7B60058 */ ldc1 $f22, 0x58($sp) /* 3DE900 E00E4900 D7B40050 */ ldc1 $f20, 0x50($sp) /* 3DE904 E00E4904 03E00008 */ jr $ra /* 3DE908 E00E4908 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: void misc_particles_update(EffectInstance* effect) { MiscParticlesFXData* particle = effect->data.miscParticles; s32 variation = particle->variation; f32 scaleX; f32 scaleY; f32 posX; f32 posY; f32 posZ; s32 timeLeft; s32 innerColorR; s32 innerColorG; s32 innerColorB; f32 temp_sin; f32 temp_cos; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; particle->timeLeft = 16; } if (particle->timeLeft < 1000) { particle->timeLeft--; } particle->lifetime++; if (particle->timeLeft < 0) { shim_remove_effect(effect); return; } timeLeft = particle->timeLeft; if (particle->timeLeft < 8) { particle->innerColor.a = particle->timeLeft * 32; } scaleX = particle->scaleX; scaleY = particle->scaleY; posX = particle->pos.x; posY = particle->pos.y; posZ = particle->pos.z; temp_cos = shim_cos_deg(gCameras[gCurrentCameraID].currentYaw); temp_sin = shim_sin_deg(gCameras[gCurrentCameraID].currentYaw); innerColorR = particle->innerColor.r; innerColorG = particle->innerColor.g; innerColorB = particle->innerColor.b; particle++; for (i = 1; i < effect->numParts; i++, particle++) { particle->animTime++; if (particle->animTime >= 30) { if (timeLeft < 30) { // perform final fadeout particle->animTime = 20; } else { // recycle the particle particle->animTime = 0; } } if (particle->animTime >= 0) { if (particle->animTime == 0) { f32 randMag = shim_rand_int(scaleX) - scaleX * 0.5; particle->pos.x = posX + randMag * temp_cos - temp_sin; particle->pos.y = posY + shim_rand_int(scaleY); particle->pos.z = posZ + randMag * temp_sin + temp_cos; particle->innerColor.r = innerColorR; particle->innerColor.g = innerColorG; particle->innerColor.b = innerColorB; } switch (variation) { case 0: case 1: if (particle->animTime == 0) { particle->unk_18 = 0.0f; particle->unk_1C = 0.0f; particle->unk_24 = 0.0f; particle->unk_28 = (f32) (-shim_rand_int(10) - 2) * 0.05; particle->unk_5C = 0.0f; particle->unk_60 = 0.0f; particle->scale = (f32) shim_rand_int(10) * 0.05 + 0.5; } particle->innerColor.a = D_E00E4E00[particle->animTime]; particle->pos.x += particle->unk_18; particle->pos.y += particle->unk_1C; particle->unk_5C += 0.2; particle->unk_60 += 0.6; particle->unk_18 += (particle->unk_24 - particle->unk_18) * 0.04; particle->unk_1C += (particle->unk_28 - particle->unk_1C) * 0.04; break; case 2: case 3: if (particle->animTime == 0) { if (variation == 2) { particle->unk_18 = (f32) (shim_rand_int(20) - 10) * 0.05; particle->unk_1C = (f32) (shim_rand_int(20) - 10) * 0.05; } else { particle->unk_18 = 0.0f; particle->unk_1C = 0.0f; } particle->unk_24 = 0.0f; particle->unk_28 = 0.0f; particle->unk_5C = shim_rand_int(15); particle->unk_60 = shim_rand_int(15); particle->innerColor.a = 255; } particle->scale = (f32) D_E00E4DC0[particle->animTime] * 0.1; particle->pos.x += particle->unk_18; particle->pos.y += particle->unk_1C; particle->unk_5C += 0.2; particle->unk_60 += 0.6; particle->unk_18 += (particle->unk_24 - particle->unk_18) * 0.04; particle->unk_1C += (particle->unk_28 - particle->unk_1C) * 0.04; break; default: if (particle->animTime == 0) { particle->unk_5C = 0.0f; particle->unk_60 = 0.0f; particle->innerColor.a = 255; particle->scale = 1.0f; particle->innerColor.r = shim_rand_int(127) + 128; particle->innerColor.g = shim_rand_int(255 - particle->innerColor.r) + 128; particle->innerColor.b = shim_rand_int(383 - particle->innerColor.r - particle->innerColor.g) + 128; } if (variation == 4) { particle->scale = (f32) D_E00E4DE0[particle->animTime] * 0.01; } else { particle->scale = (f32) D_E00E4DC0[particle->animTime] * 0.01; } break; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel shockwave_appendGfx /* 358C4C E004A78C 27BDFEE8 */ addiu $sp, $sp, -0x118 /* 358C50 E004A790 AFBF00FC */ sw $ra, 0xFC($sp) /* 358C54 E004A794 AFBE00F8 */ sw $fp, 0xF8($sp) /* 358C58 E004A798 AFB700F4 */ sw $s7, 0xF4($sp) /* 358C5C E004A79C AFB600F0 */ sw $s6, 0xF0($sp) /* 358C60 E004A7A0 AFB500EC */ sw $s5, 0xEC($sp) /* 358C64 E004A7A4 AFB400E8 */ sw $s4, 0xE8($sp) /* 358C68 E004A7A8 AFB300E4 */ sw $s3, 0xE4($sp) /* 358C6C E004A7AC AFB200E0 */ sw $s2, 0xE0($sp) /* 358C70 E004A7B0 AFB100DC */ sw $s1, 0xDC($sp) /* 358C74 E004A7B4 AFB000D8 */ sw $s0, 0xD8($sp) /* 358C78 E004A7B8 F7B80110 */ sdc1 $f24, 0x110($sp) /* 358C7C E004A7BC F7B60108 */ sdc1 $f22, 0x108($sp) /* 358C80 E004A7C0 F7B40100 */ sdc1 $f20, 0x100($sp) /* 358C84 E004A7C4 AFA40118 */ sw $a0, 0x118($sp) /* 358C88 E004A7C8 8C91000C */ lw $s1, 0xC($a0) /* 358C8C E004A7CC 922F0050 */ lbu $t7, 0x50($s1) /* 358C90 E004A7D0 AFAF00A4 */ sw $t7, 0xA4($sp) /* 358C94 E004A7D4 922F0051 */ lbu $t7, 0x51($s1) /* 358C98 E004A7D8 AFAF00A8 */ sw $t7, 0xA8($sp) /* 358C9C E004A7DC 8FAF00A4 */ lw $t7, 0xA4($sp) /* 358CA0 E004A7E0 AFAF00BC */ sw $t7, 0xBC($sp) /* 358CA4 E004A7E4 8FAF00A8 */ lw $t7, 0xA8($sp) /* 358CA8 E004A7E8 AFAF00C0 */ sw $t7, 0xC0($sp) /* 358CAC E004A7EC 922F0052 */ lbu $t7, 0x52($s1) /* 358CB0 E004A7F0 AFAF00AC */ sw $t7, 0xAC($sp) /* 358CB4 E004A7F4 922F0053 */ lbu $t7, 0x53($s1) /* 358CB8 E004A7F8 AFAF00B0 */ sw $t7, 0xB0($sp) /* 358CBC E004A7FC 8FAF00AC */ lw $t7, 0xAC($sp) /* 358CC0 E004A800 AFAF00C4 */ sw $t7, 0xC4($sp) /* 358CC4 E004A804 8FAF00B0 */ lw $t7, 0xB0($sp) /* 358CC8 E004A808 AFAF00C8 */ sw $t7, 0xC8($sp) /* 358CCC E004A80C 922F0054 */ lbu $t7, 0x54($s1) /* 358CD0 E004A810 AFAF00B4 */ sw $t7, 0xB4($sp) /* 358CD4 E004A814 922F0055 */ lbu $t7, 0x55($s1) /* 358CD8 E004A818 AFAF00B8 */ sw $t7, 0xB8($sp) /* 358CDC E004A81C 8FAF00B4 */ lw $t7, 0xB4($sp) /* 358CE0 E004A820 AFAF00CC */ sw $t7, 0xCC($sp) /* 358CE4 E004A824 8FAF00B8 */ lw $t7, 0xB8($sp) /* 358CE8 E004A828 AFAF00D0 */ sw $t7, 0xD0($sp) /* 358CEC E004A82C 96220000 */ lhu $v0, 0x0($s1) /* 358CF0 E004A830 00021880 */ sll $v1, $v0, 2 /* 358CF4 E004A834 28420002 */ slti $v0, $v0, 0x2 /* 358CF8 E004A838 3C09E005 */ lui $t1, (0xE0050000 >> 16) /* 358CFC E004A83C 01234821 */ addu $t1, $t1, $v1 /* 358D00 E004A840 8D29AE60 */ lw $t1, -0x51A0($t1) /* 358D04 E004A844 14400013 */ bnez $v0, .LE004A894 /* 358D08 E004A848 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 358D0C E004A84C 8FAF00A4 */ lw $t7, 0xA4($sp) /* 358D10 E004A850 000F7883 */ sra $t7, $t7, 2 /* 358D14 E004A854 AFAF00BC */ sw $t7, 0xBC($sp) /* 358D18 E004A858 8FAF00A8 */ lw $t7, 0xA8($sp) /* 358D1C E004A85C 000F7883 */ sra $t7, $t7, 2 /* 358D20 E004A860 AFAF00C0 */ sw $t7, 0xC0($sp) /* 358D24 E004A864 8FAF00AC */ lw $t7, 0xAC($sp) /* 358D28 E004A868 000F7883 */ sra $t7, $t7, 2 /* 358D2C E004A86C AFAF00C4 */ sw $t7, 0xC4($sp) /* 358D30 E004A870 8FAF00B0 */ lw $t7, 0xB0($sp) /* 358D34 E004A874 000F7883 */ sra $t7, $t7, 2 /* 358D38 E004A878 AFAF00C8 */ sw $t7, 0xC8($sp) /* 358D3C E004A87C 8FAF00B4 */ lw $t7, 0xB4($sp) /* 358D40 E004A880 000F7883 */ sra $t7, $t7, 2 /* 358D44 E004A884 AFAF00CC */ sw $t7, 0xCC($sp) /* 358D48 E004A888 8FAF00B8 */ lw $t7, 0xB8($sp) /* 358D4C E004A88C 000F7883 */ sra $t7, $t7, 2 /* 358D50 E004A890 AFAF00D0 */ sw $t7, 0xD0($sp) .LE004A894: /* 358D54 E004A894 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 358D58 E004A898 27A40020 */ addiu $a0, $sp, 0x20 /* 358D5C E004A89C 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 358D60 E004A8A0 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 358D64 E004A8A4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 358D68 E004A8A8 8E680000 */ lw $t0, 0x0($s3) /* 358D6C E004A8AC 4480A000 */ mtc1 $zero, $f20 /* 358D70 E004A8B0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 358D74 E004A8B4 4481C000 */ mtc1 $at, $f24 /* 358D78 E004A8B8 0100182D */ daddu $v1, $t0, $zero /* 358D7C E004A8BC 4405A000 */ mfc1 $a1, $f20 /* 358D80 E004A8C0 25080008 */ addiu $t0, $t0, 0x8 /* 358D84 E004A8C4 AC620000 */ sw $v0, 0x0($v1) /* 358D88 E004A8C8 AC600004 */ sw $zero, 0x4($v1) /* 358D8C E004A8CC AD060000 */ sw $a2, 0x0($t0) /* 358D90 E004A8D0 8FAF0118 */ lw $t7, 0x118($sp) /* 358D94 E004A8D4 4407A000 */ mfc1 $a3, $f20 /* 358D98 E004A8D8 8DE20010 */ lw $v0, 0x10($t7) /* 358D9C E004A8DC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 358DA0 E004A8E0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 358DA4 E004A8E4 8C46001C */ lw $a2, 0x1C($v0) /* 358DA8 E004A8E8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 358DAC E004A8EC AD020008 */ sw $v0, 0x8($t0) /* 358DB0 E004A8F0 3C028000 */ lui $v0, (0x80000000 >> 16) /* 358DB4 E004A8F4 AD09000C */ sw $t1, 0xC($t0) /* 358DB8 E004A8F8 00C23021 */ addu $a2, $a2, $v0 /* 358DBC E004A8FC 00031080 */ sll $v0, $v1, 2 /* 358DC0 E004A900 00431021 */ addu $v0, $v0, $v1 /* 358DC4 E004A904 00021080 */ sll $v0, $v0, 2 /* 358DC8 E004A908 00431023 */ subu $v0, $v0, $v1 /* 358DCC E004A90C 000218C0 */ sll $v1, $v0, 3 /* 358DD0 E004A910 00431021 */ addu $v0, $v0, $v1 /* 358DD4 E004A914 000210C0 */ sll $v0, $v0, 3 /* 358DD8 E004A918 AD060004 */ sw $a2, 0x4($t0) /* 358DDC E004A91C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 358DE0 E004A920 00220821 */ addu $at, $at, $v0 /* 358DE4 E004A924 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 358DE8 E004A928 3C100001 */ lui $s0, (0x11630 >> 16) /* 358DEC E004A92C AE680000 */ sw $t0, 0x0($s3) /* 358DF0 E004A930 E7B80010 */ swc1 $f24, 0x10($sp) /* 358DF4 E004A934 C6200004 */ lwc1 $f0, 0x4($s1) /* 358DF8 E004A938 25020008 */ addiu $v0, $t0, 0x8 /* 358DFC E004A93C AE620000 */ sw $v0, 0x0($s3) /* 358E00 E004A940 46001087 */ neg.s $f2, $f2 /* 358E04 E004A944 E7A00014 */ swc1 $f0, 0x14($sp) /* 358E08 E004A948 C6200008 */ lwc1 $f0, 0x8($s1) /* 358E0C E004A94C 44061000 */ mfc1 $a2, $f2 /* 358E10 E004A950 25080010 */ addiu $t0, $t0, 0x10 /* 358E14 E004A954 AE680000 */ sw $t0, 0x0($s3) /* 358E18 E004A958 E7A00018 */ swc1 $f0, 0x18($sp) /* 358E1C E004A95C C620000C */ lwc1 $f0, 0xC($s1) /* 358E20 E004A960 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 358E24 E004A964 0C080180 */ jal shim_guPositionF /* 358E28 E004A968 E7A0001C */ swc1 $f0, 0x1C($sp) /* 358E2C E004A96C 27A40020 */ addiu $a0, $sp, 0x20 /* 358E30 E004A970 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 358E34 E004A974 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 358E38 E004A978 3C16800A */ lui $s6, %hi(gDisplayContext) /* 358E3C E004A97C 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 358E40 E004A980 96A50000 */ lhu $a1, 0x0($s5) /* 358E44 E004A984 8EC20000 */ lw $v0, 0x0($s6) /* 358E48 E004A988 00052980 */ sll $a1, $a1, 6 /* 358E4C E004A98C 00B02821 */ addu $a1, $a1, $s0 /* 358E50 E004A990 0C080118 */ jal shim_guMtxF2L /* 358E54 E004A994 00452821 */ addu $a1, $v0, $a1 /* 358E58 E004A998 24140001 */ addiu $s4, $zero, 0x1 /* 358E5C E004A99C 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 358E60 E004A9A0 8E650000 */ lw $a1, 0x0($s3) /* 358E64 E004A9A4 96A40000 */ lhu $a0, 0x0($s5) /* 358E68 E004A9A8 00A0302D */ daddu $a2, $a1, $zero /* 358E6C E004A9AC 24A50008 */ addiu $a1, $a1, 0x8 /* 358E70 E004A9B0 ACC20000 */ sw $v0, 0x0($a2) /* 358E74 E004A9B4 3082FFFF */ andi $v0, $a0, 0xFFFF /* 358E78 E004A9B8 00021180 */ sll $v0, $v0, 6 /* 358E7C E004A9BC 00501021 */ addu $v0, $v0, $s0 /* 358E80 E004A9C0 00942021 */ addu $a0, $a0, $s4 /* 358E84 E004A9C4 8EC30000 */ lw $v1, 0x0($s6) /* 358E88 E004A9C8 00A0B82D */ daddu $s7, $a1, $zero /* 358E8C E004A9CC 00621821 */ addu $v1, $v1, $v0 /* 358E90 E004A9D0 ACC30004 */ sw $v1, 0x4($a2) /* 358E94 E004A9D4 8E2F0038 */ lw $t7, 0x38($s1) /* 358E98 E004A9D8 26E30008 */ addiu $v1, $s7, 0x8 /* 358E9C E004A9DC AFAF00A0 */ sw $t7, 0xA0($sp) /* 358EA0 E004A9E0 AE650000 */ sw $a1, 0x0($s3) /* 358EA4 E004A9E4 A6A40000 */ sh $a0, 0x0($s5) /* 358EA8 E004A9E8 AE630000 */ sw $v1, 0x0($s3) /* 358EAC E004A9EC 8FAF0118 */ lw $t7, 0x118($sp) /* 358EB0 E004A9F0 8DE20008 */ lw $v0, 0x8($t7) /* 358EB4 E004A9F4 26310058 */ addiu $s1, $s1, 0x58 /* 358EB8 E004A9F8 0282102A */ slt $v0, $s4, $v0 /* 358EBC E004A9FC 10400090 */ beqz $v0, .LE004AC40 /* 358EC0 E004AA00 AFA300D4 */ sw $v1, 0xD4($sp) /* 358EC4 E004AA04 27B20060 */ addiu $s2, $sp, 0x60 /* 358EC8 E004AA08 4600A586 */ mov.s $f22, $f20 /* 358ECC E004AA0C 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358ED0 E004AA10 D434AEE8 */ ldc1 $f20, -0x5118($at) /* 358ED4 E004AA14 02A0B02D */ daddu $s6, $s5, $zero /* 358ED8 E004AA18 3C150001 */ lui $s5, (0x11630 >> 16) /* 358EDC E004AA1C 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 358EE0 E004AA20 3C1EF200 */ lui $fp, (0xF2000000 >> 16) /* 358EE4 E004AA24 26300044 */ addiu $s0, $s1, 0x44 .LE004AA28: /* 358EE8 E004AA28 8E020008 */ lw $v0, 0x8($s0) /* 358EEC E004AA2C 0440007E */ bltz $v0, .LE004AC28 /* 358EF0 E004AA30 00000000 */ nop /* 358EF4 E004AA34 8E05FFC0 */ lw $a1, -0x40($s0) /* 358EF8 E004AA38 8E06FFC4 */ lw $a2, -0x3C($s0) /* 358EFC E004AA3C 8E07FFC8 */ lw $a3, -0x38($s0) /* 358F00 E004AA40 0C080108 */ jal shim_guTranslateF /* 358F04 E004AA44 27A40020 */ addiu $a0, $sp, 0x20 /* 358F08 E004AA48 E7B80010 */ swc1 $f24, 0x10($sp) /* 358F0C E004AA4C 8E05FFF0 */ lw $a1, -0x10($s0) /* 358F10 E004AA50 4406B000 */ mfc1 $a2, $f22 /* 358F14 E004AA54 4407B000 */ mfc1 $a3, $f22 /* 358F18 E004AA58 0C080104 */ jal shim_guRotateF /* 358F1C E004AA5C 0240202D */ daddu $a0, $s2, $zero /* 358F20 E004AA60 0240202D */ daddu $a0, $s2, $zero /* 358F24 E004AA64 27A50020 */ addiu $a1, $sp, 0x20 /* 358F28 E004AA68 0C080114 */ jal shim_guMtxCatF /* 358F2C E004AA6C 00A0302D */ daddu $a2, $a1, $zero /* 358F30 E004AA70 C604FFD8 */ lwc1 $f4, -0x28($s0) /* 358F34 E004AA74 46002121 */ cvt.d.s $f4, $f4 /* 358F38 E004AA78 46342102 */ mul.d $f4, $f4, $f20 /* 358F3C E004AA7C 00000000 */ nop /* 358F40 E004AA80 C602FFDC */ lwc1 $f2, -0x24($s0) /* 358F44 E004AA84 460010A1 */ cvt.d.s $f2, $f2 /* 358F48 E004AA88 46341082 */ mul.d $f2, $f2, $f20 /* 358F4C E004AA8C 00000000 */ nop /* 358F50 E004AA90 C600FFE0 */ lwc1 $f0, -0x20($s0) /* 358F54 E004AA94 46000021 */ cvt.d.s $f0, $f0 /* 358F58 E004AA98 46340002 */ mul.d $f0, $f0, $f20 /* 358F5C E004AA9C 00000000 */ nop /* 358F60 E004AAA0 46202120 */ cvt.s.d $f4, $f4 /* 358F64 E004AAA4 462010A0 */ cvt.s.d $f2, $f2 /* 358F68 E004AAA8 46200020 */ cvt.s.d $f0, $f0 /* 358F6C E004AAAC 44052000 */ mfc1 $a1, $f4 /* 358F70 E004AAB0 44061000 */ mfc1 $a2, $f2 /* 358F74 E004AAB4 44070000 */ mfc1 $a3, $f0 /* 358F78 E004AAB8 0C080110 */ jal shim_guScaleF /* 358F7C E004AABC 0240202D */ daddu $a0, $s2, $zero /* 358F80 E004AAC0 0240202D */ daddu $a0, $s2, $zero /* 358F84 E004AAC4 27A50020 */ addiu $a1, $sp, 0x20 /* 358F88 E004AAC8 0C080114 */ jal shim_guMtxCatF /* 358F8C E004AACC 00A0302D */ daddu $a2, $a1, $zero /* 358F90 E004AAD0 E7B60010 */ swc1 $f22, 0x10($sp) /* 358F94 E004AAD4 8E05FFEC */ lw $a1, -0x14($s0) /* 358F98 E004AAD8 4406B000 */ mfc1 $a2, $f22 /* 358F9C E004AADC 4407C000 */ mfc1 $a3, $f24 /* 358FA0 E004AAE0 0C080104 */ jal shim_guRotateF /* 358FA4 E004AAE4 0240202D */ daddu $a0, $s2, $zero /* 358FA8 E004AAE8 0240202D */ daddu $a0, $s2, $zero /* 358FAC E004AAEC 27A50020 */ addiu $a1, $sp, 0x20 /* 358FB0 E004AAF0 0C080114 */ jal shim_guMtxCatF /* 358FB4 E004AAF4 00A0302D */ daddu $a2, $a1, $zero /* 358FB8 E004AAF8 27A40020 */ addiu $a0, $sp, 0x20 /* 358FBC E004AAFC 96C50000 */ lhu $a1, 0x0($s6) /* 358FC0 E004AB00 3C02800A */ lui $v0, %hi(gDisplayContext) /* 358FC4 E004AB04 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 358FC8 E004AB08 00052980 */ sll $a1, $a1, 6 /* 358FCC E004AB0C 00B52821 */ addu $a1, $a1, $s5 /* 358FD0 E004AB10 0C080118 */ jal shim_guMtxF2L /* 358FD4 E004AB14 00452821 */ addu $a1, $v0, $a1 /* 358FD8 E004AB18 3C06000F */ lui $a2, (0xFC000 >> 16) /* 358FDC E004AB1C 34C6C000 */ ori $a2, $a2, (0xFC000 & 0xFFFF) /* 358FE0 E004AB20 3C080107 */ lui $t0, (0x107C000 >> 16) /* 358FE4 E004AB24 3508C000 */ ori $t0, $t0, (0x107C000 & 0xFFFF) /* 358FE8 E004AB28 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 358FEC E004AB2C 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 358FF0 E004AB30 8E630000 */ lw $v1, 0x0($s3) /* 358FF4 E004AB34 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 358FF8 E004AB38 0060282D */ daddu $a1, $v1, $zero /* 358FFC E004AB3C 24630008 */ addiu $v1, $v1, 0x8 /* 359000 E004AB40 4600018D */ trunc.w.s $f6, $f0 /* 359004 E004AB44 44023000 */ mfc1 $v0, $f6 /* 359008 E004AB48 00000000 */ nop /* 35900C E004AB4C 30420FFF */ andi $v0, $v0, 0xFFF /* 359010 E004AB50 005E1025 */ or $v0, $v0, $fp /* 359014 E004AB54 AE630000 */ sw $v1, 0x0($s3) /* 359018 E004AB58 ACA20000 */ sw $v0, 0x0($a1) /* 35901C E004AB5C 24620008 */ addiu $v0, $v1, 0x8 /* 359020 E004AB60 AE620000 */ sw $v0, 0x0($s3) /* 359024 E004AB64 96C40000 */ lhu $a0, 0x0($s6) /* 359028 E004AB68 24620010 */ addiu $v0, $v1, 0x10 /* 35902C E004AB6C AE620000 */ sw $v0, 0x0($s3) /* 359030 E004AB70 24820001 */ addiu $v0, $a0, 0x1 /* 359034 E004AB74 A6C20000 */ sh $v0, 0x0($s6) /* 359038 E004AB78 24620018 */ addiu $v0, $v1, 0x18 /* 35903C E004AB7C 3084FFFF */ andi $a0, $a0, 0xFFFF /* 359040 E004AB80 00042180 */ sll $a0, $a0, 6 /* 359044 E004AB84 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 359048 E004AB88 00952021 */ addu $a0, $a0, $s5 /* 35904C E004AB8C AE620000 */ sw $v0, 0x0($s3) /* 359050 E004AB90 4600018D */ trunc.w.s $f6, $f0 /* 359054 E004AB94 44023000 */ mfc1 $v0, $f6 /* 359058 E004AB98 00000000 */ nop /* 35905C E004AB9C 2442007C */ addiu $v0, $v0, 0x7C /* 359060 E004ABA0 30420FFF */ andi $v0, $v0, 0xFFF /* 359064 E004ABA4 00461025 */ or $v0, $v0, $a2 /* 359068 E004ABA8 ACA20004 */ sw $v0, 0x4($a1) /* 35906C E004ABAC C6000000 */ lwc1 $f0, 0x0($s0) /* 359070 E004ABB0 24620020 */ addiu $v0, $v1, 0x20 /* 359074 E004ABB4 AE620000 */ sw $v0, 0x0($s3) /* 359078 E004ABB8 4600018D */ trunc.w.s $f6, $f0 /* 35907C E004ABBC 44023000 */ mfc1 $v0, $f6 /* 359080 E004ABC0 00000000 */ nop /* 359084 E004ABC4 30420FFF */ andi $v0, $v0, 0xFFF /* 359088 E004ABC8 005E1025 */ or $v0, $v0, $fp /* 35908C E004ABCC AC620000 */ sw $v0, 0x0($v1) /* 359090 E004ABD0 C6000000 */ lwc1 $f0, 0x0($s0) /* 359094 E004ABD4 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 359098 E004ABD8 AC620008 */ sw $v0, 0x8($v1) /* 35909C E004ABDC 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3590A0 E004ABE0 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3590A4 E004ABE4 3C0F0900 */ lui $t7, %hi(D_09000940_4159A0) /* 3590A8 E004ABE8 25EF0940 */ addiu $t7, $t7, %lo(D_09000940_4159A0) /* 3590AC E004ABEC AC6F0014 */ sw $t7, 0x14($v1) /* 3590B0 E004ABF0 AC670018 */ sw $a3, 0x18($v1) /* 3590B4 E004ABF4 00441021 */ addu $v0, $v0, $a0 /* 3590B8 E004ABF8 AC62000C */ sw $v0, 0xC($v1) /* 3590BC E004ABFC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3590C0 E004AC00 AC620010 */ sw $v0, 0x10($v1) /* 3590C4 E004AC04 24020040 */ addiu $v0, $zero, 0x40 /* 3590C8 E004AC08 AC62001C */ sw $v0, 0x1C($v1) /* 3590CC E004AC0C 4600018D */ trunc.w.s $f6, $f0 /* 3590D0 E004AC10 44023000 */ mfc1 $v0, $f6 /* 3590D4 E004AC14 00000000 */ nop /* 3590D8 E004AC18 2442007C */ addiu $v0, $v0, 0x7C /* 3590DC E004AC1C 30420FFF */ andi $v0, $v0, 0xFFF /* 3590E0 E004AC20 00481025 */ or $v0, $v0, $t0 /* 3590E4 E004AC24 AC620004 */ sw $v0, 0x4($v1) .LE004AC28: /* 3590E8 E004AC28 8FAF0118 */ lw $t7, 0x118($sp) /* 3590EC E004AC2C 26940001 */ addiu $s4, $s4, 0x1 /* 3590F0 E004AC30 8DE20008 */ lw $v0, 0x8($t7) /* 3590F4 E004AC34 0282102A */ slt $v0, $s4, $v0 /* 3590F8 E004AC38 1440FF7B */ bnez $v0, .LE004AA28 /* 3590FC E004AC3C 26100058 */ addiu $s0, $s0, 0x58 .LE004AC40: /* 359100 E004AC40 3C0AD9FF */ lui $t2, (0xD9FFF9FF >> 16) /* 359104 E004AC44 354AF9FF */ ori $t2, $t2, (0xD9FFF9FF & 0xFFFF) /* 359108 E004AC48 3C0BD9FF */ lui $t3, (0xD9FFFFFF >> 16) /* 35910C E004AC4C 356BFFFF */ ori $t3, $t3, (0xD9FFFFFF & 0xFFFF) /* 359110 E004AC50 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 359114 E004AC54 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 359118 E004AC58 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 35911C E004AC5C 8CA30000 */ lw $v1, 0x0($a1) /* 359120 E004AC60 3C09FA00 */ lui $t1, (0xFA000000 >> 16) /* 359124 E004AC64 0060202D */ daddu $a0, $v1, $zero /* 359128 E004AC68 24630008 */ addiu $v1, $v1, 0x8 /* 35912C E004AC6C ACA30000 */ sw $v1, 0x0($a1) /* 359130 E004AC70 AC820000 */ sw $v0, 0x0($a0) /* 359134 E004AC74 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 359138 E004AC78 AC800004 */ sw $zero, 0x4($a0) /* 35913C E004AC7C AEE20000 */ sw $v0, 0x0($s7) /* 359140 E004AC80 24620008 */ addiu $v0, $v1, 0x8 /* 359144 E004AC84 AEE30004 */ sw $v1, 0x4($s7) /* 359148 E004AC88 ACA20000 */ sw $v0, 0x0($a1) /* 35914C E004AC8C AC690000 */ sw $t1, 0x0($v1) /* 359150 E004AC90 8FAF00BC */ lw $t7, 0xBC($sp) /* 359154 E004AC94 3C0CE300 */ lui $t4, (0xE3001801 >> 16) /* 359158 E004AC98 000F1600 */ sll $v0, $t7, 24 /* 35915C E004AC9C 8FAF00C0 */ lw $t7, 0xC0($sp) /* 359160 E004ACA0 3C07FB00 */ lui $a3, (0xFB000000 >> 16) /* 359164 E004ACA4 000F2400 */ sll $a0, $t7, 16 /* 359168 E004ACA8 8FAF00C4 */ lw $t7, 0xC4($sp) /* 35916C E004ACAC 00441025 */ or $v0, $v0, $a0 /* 359170 E004ACB0 000F2200 */ sll $a0, $t7, 8 /* 359174 E004ACB4 8FAF00A0 */ lw $t7, 0xA0($sp) /* 359178 E004ACB8 00441025 */ or $v0, $v0, $a0 /* 35917C E004ACBC 31E800FF */ andi $t0, $t7, 0xFF /* 359180 E004ACC0 00481025 */ or $v0, $v0, $t0 /* 359184 E004ACC4 AC620004 */ sw $v0, 0x4($v1) /* 359188 E004ACC8 24620010 */ addiu $v0, $v1, 0x10 /* 35918C E004ACCC ACA20000 */ sw $v0, 0x0($a1) /* 359190 E004ACD0 AC670008 */ sw $a3, 0x8($v1) /* 359194 E004ACD4 8FAF00C8 */ lw $t7, 0xC8($sp) /* 359198 E004ACD8 358C1801 */ ori $t4, $t4, (0xE3001801 & 0xFFFF) /* 35919C E004ACDC 000F1600 */ sll $v0, $t7, 24 /* 3591A0 E004ACE0 8FAF00CC */ lw $t7, 0xCC($sp) /* 3591A4 E004ACE4 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 3591A8 E004ACE8 000F2400 */ sll $a0, $t7, 16 /* 3591AC E004ACEC 8FAF00D0 */ lw $t7, 0xD0($sp) /* 3591B0 E004ACF0 00441025 */ or $v0, $v0, $a0 /* 3591B4 E004ACF4 000F2200 */ sll $a0, $t7, 8 /* 3591B8 E004ACF8 00441025 */ or $v0, $v0, $a0 /* 3591BC E004ACFC AC62000C */ sw $v0, 0xC($v1) /* 3591C0 E004AD00 24620018 */ addiu $v0, $v1, 0x18 /* 3591C4 E004AD04 ACA20000 */ sw $v0, 0x0($a1) /* 3591C8 E004AD08 24620020 */ addiu $v0, $v1, 0x20 /* 3591CC E004AD0C AC6A0010 */ sw $t2, 0x10($v1) /* 3591D0 E004AD10 AC600014 */ sw $zero, 0x14($v1) /* 3591D4 E004AD14 ACA20000 */ sw $v0, 0x0($a1) /* 3591D8 E004AD18 24020200 */ addiu $v0, $zero, 0x200 /* 3591DC E004AD1C AC62001C */ sw $v0, 0x1C($v1) /* 3591E0 E004AD20 24620028 */ addiu $v0, $v1, 0x28 /* 3591E4 E004AD24 AC6B0018 */ sw $t3, 0x18($v1) /* 3591E8 E004AD28 ACA20000 */ sw $v0, 0x0($a1) /* 3591EC E004AD2C AC660020 */ sw $a2, 0x20($v1) /* 3591F0 E004AD30 8FAF00D4 */ lw $t7, 0xD4($sp) /* 3591F4 E004AD34 24620030 */ addiu $v0, $v1, 0x30 /* 3591F8 E004AD38 AC6F0024 */ sw $t7, 0x24($v1) /* 3591FC E004AD3C ACA20000 */ sw $v0, 0x0($a1) /* 359200 E004AD40 AC690028 */ sw $t1, 0x28($v1) /* 359204 E004AD44 8FAF00A4 */ lw $t7, 0xA4($sp) /* 359208 E004AD48 3C0DE300 */ lui $t5, (0xE3001A01 >> 16) /* 35920C E004AD4C 000F1600 */ sll $v0, $t7, 24 /* 359210 E004AD50 8FAF00A8 */ lw $t7, 0xA8($sp) /* 359214 E004AD54 35AD1A01 */ ori $t5, $t5, (0xE3001A01 & 0xFFFF) /* 359218 E004AD58 000F2400 */ sll $a0, $t7, 16 /* 35921C E004AD5C 8FAF00AC */ lw $t7, 0xAC($sp) /* 359220 E004AD60 00441025 */ or $v0, $v0, $a0 /* 359224 E004AD64 000F2200 */ sll $a0, $t7, 8 /* 359228 E004AD68 00441025 */ or $v0, $v0, $a0 /* 35922C E004AD6C 00481025 */ or $v0, $v0, $t0 /* 359230 E004AD70 AC62002C */ sw $v0, 0x2C($v1) /* 359234 E004AD74 24620038 */ addiu $v0, $v1, 0x38 /* 359238 E004AD78 ACA20000 */ sw $v0, 0x0($a1) /* 35923C E004AD7C AC670030 */ sw $a3, 0x30($v1) /* 359240 E004AD80 8FAF00B0 */ lw $t7, 0xB0($sp) /* 359244 E004AD84 3C0ED838 */ lui $t6, (0xD8380002 >> 16) /* 359248 E004AD88 000F1600 */ sll $v0, $t7, 24 /* 35924C E004AD8C 8FAF00B4 */ lw $t7, 0xB4($sp) /* 359250 E004AD90 35CE0002 */ ori $t6, $t6, (0xD8380002 & 0xFFFF) /* 359254 E004AD94 000F2400 */ sll $a0, $t7, 16 /* 359258 E004AD98 8FAF00B8 */ lw $t7, 0xB8($sp) /* 35925C E004AD9C 00441025 */ or $v0, $v0, $a0 /* 359260 E004ADA0 000F2200 */ sll $a0, $t7, 8 /* 359264 E004ADA4 00441025 */ or $v0, $v0, $a0 /* 359268 E004ADA8 AC620034 */ sw $v0, 0x34($v1) /* 35926C E004ADAC 24620040 */ addiu $v0, $v1, 0x40 /* 359270 E004ADB0 ACA20000 */ sw $v0, 0x0($a1) /* 359274 E004ADB4 24620048 */ addiu $v0, $v1, 0x48 /* 359278 E004ADB8 AC6A0038 */ sw $t2, 0x38($v1) /* 35927C E004ADBC AC60003C */ sw $zero, 0x3C($v1) /* 359280 E004ADC0 ACA20000 */ sw $v0, 0x0($a1) /* 359284 E004ADC4 24020400 */ addiu $v0, $zero, 0x400 /* 359288 E004ADC8 AC620044 */ sw $v0, 0x44($v1) /* 35928C E004ADCC 24620050 */ addiu $v0, $v1, 0x50 /* 359290 E004ADD0 AC6B0040 */ sw $t3, 0x40($v1) /* 359294 E004ADD4 ACA20000 */ sw $v0, 0x0($a1) /* 359298 E004ADD8 AC660048 */ sw $a2, 0x48($v1) /* 35929C E004ADDC 8FAF00D4 */ lw $t7, 0xD4($sp) /* 3592A0 E004ADE0 24620058 */ addiu $v0, $v1, 0x58 /* 3592A4 E004ADE4 AC6F004C */ sw $t7, 0x4C($v1) /* 3592A8 E004ADE8 ACA20000 */ sw $v0, 0x0($a1) /* 3592AC E004ADEC 240200C0 */ addiu $v0, $zero, 0xC0 /* 3592B0 E004ADF0 AC6C0050 */ sw $t4, 0x50($v1) /* 3592B4 E004ADF4 AC620054 */ sw $v0, 0x54($v1) /* 3592B8 E004ADF8 24620060 */ addiu $v0, $v1, 0x60 /* 3592BC E004ADFC ACA20000 */ sw $v0, 0x0($a1) /* 3592C0 E004AE00 24020030 */ addiu $v0, $zero, 0x30 /* 3592C4 E004AE04 AC62005C */ sw $v0, 0x5C($v1) /* 3592C8 E004AE08 24620068 */ addiu $v0, $v1, 0x68 /* 3592CC E004AE0C AC6D0058 */ sw $t5, 0x58($v1) /* 3592D0 E004AE10 ACA20000 */ sw $v0, 0x0($a1) /* 3592D4 E004AE14 24020040 */ addiu $v0, $zero, 0x40 /* 3592D8 E004AE18 AC6E0060 */ sw $t6, 0x60($v1) /* 3592DC E004AE1C AC620064 */ sw $v0, 0x64($v1) /* 3592E0 E004AE20 8FBF00FC */ lw $ra, 0xFC($sp) /* 3592E4 E004AE24 8FBE00F8 */ lw $fp, 0xF8($sp) /* 3592E8 E004AE28 8FB700F4 */ lw $s7, 0xF4($sp) /* 3592EC E004AE2C 8FB600F0 */ lw $s6, 0xF0($sp) /* 3592F0 E004AE30 8FB500EC */ lw $s5, 0xEC($sp) /* 3592F4 E004AE34 8FB400E8 */ lw $s4, 0xE8($sp) /* 3592F8 E004AE38 8FB300E4 */ lw $s3, 0xE4($sp) /* 3592FC E004AE3C 8FB200E0 */ lw $s2, 0xE0($sp) /* 359300 E004AE40 8FB100DC */ lw $s1, 0xDC($sp) /* 359304 E004AE44 8FB000D8 */ lw $s0, 0xD8($sp) /* 359308 E004AE48 D7B80110 */ ldc1 $f24, 0x110($sp) /* 35930C E004AE4C D7B60108 */ ldc1 $f22, 0x108($sp) /* 359310 E004AE50 D7B40100 */ ldc1 $f20, 0x100($sp) /* 359314 E004AE54 03E00008 */ jr $ra /* 359318 E004AE58 27BD0118 */ addiu $sp, $sp, 0x118 /* 35931C E004AE5C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void shockwave_appendGfx(void* effect) { ShockwaveFXData* data = ((EffectInstance*) effect)->data.shockwave; Matrix4f sp20, sp60; Gfx* dlist = D_09000940_359CF0; Gfx* dlist2; s32 primA; s32 primR, primG, primB; s32 envR, envG, envB; s32 primR2, primG2, primB2; s32 envR2, envG2, envB2; Gfx* savedGfxPos; Gfx* savedGfxPos2; s32 temp_v0; s32 i; primR = data->prim.r; primG = data->prim.g; primB = data->prim.b; envR = data->env.r; envG = data->env.g; envB = data->env.b; primR2 = data->prim.r; primG2 = data->prim.g; primB2 = data->prim.b; envR2 = data->env.r; envG2 = data->env.g; envB2 = data->env.b; temp_v0 = data->unk_00; dlist2 = D_E004AE60[temp_v0]; if (temp_v0 >= 2) { primR2 = primR >> 2; primG2 = primG >> 2; primB2 = primB >> 2; envR2 = envR >> 2; envG2 = envG >> 2; envB2 = envB >> 2; } gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist2); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 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); primA = data->alpha; savedGfxPos = gMainGfxPos; gMainGfxPos++; savedGfxPos2 = gMainGfxPos; data++; for (i = 1; i < ((EffectInstance*) effect)->numParts; i++, data++) { if (data->unk_4C >= 0) { shim_guTranslateF(sp20, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(sp60, data->unk_34, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guScaleF(sp60, data->unk_1C * 0.3, data->unk_20 * 0.3, data->unk_24 * 0.3); shim_guMtxCatF(sp60, sp20, sp20); shim_guRotateF(sp60, data->unk_30, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (s32) data->unk_3C, 0x00FC, (s32) data->unk_3C + 0x7C); gDPSetTileSize(gMainGfxPos++, 1, 0, (s32) data->unk_44, 0x007C, (s32) data->unk_44 + 0x7C); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gDPSetPrimColor(gMainGfxPos++, 0, 0, primR2, primG2, primB2, primA); gDPSetEnvColor(gMainGfxPos++, envR2, envG2, envB2, 0); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPSetGeometryMode(gMainGfxPos++, G_CULL_FRONT); gSPDisplayList(gMainGfxPos++, savedGfxPos2); gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, primA); gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, 0); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK); gSPDisplayList(gMainGfxPos++, savedGfxPos2); gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel squirt_appendGfx /* 3B4C40 E00B24B0 27BDFF00 */ addiu $sp, $sp, -0x100 /* 3B4C44 E00B24B4 0080482D */ daddu $t1, $a0, $zero /* 3B4C48 E00B24B8 3C0ADB06 */ lui $t2, (0xDB060024 >> 16) /* 3B4C4C E00B24BC 354A0024 */ ori $t2, $t2, (0xDB060024 & 0xFFFF) /* 3B4C50 E00B24C0 27A40010 */ addiu $a0, $sp, 0x10 /* 3B4C54 E00B24C4 AFB300B4 */ sw $s3, 0xB4($sp) /* 3B4C58 E00B24C8 3C130001 */ lui $s3, (0x11630 >> 16) /* 3B4C5C E00B24CC 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3B4C60 E00B24D0 AFB500BC */ sw $s5, 0xBC($sp) /* 3B4C64 E00B24D4 0000A82D */ daddu $s5, $zero, $zero /* 3B4C68 E00B24D8 3C18E00B */ lui $t8, %hi(D_E00B2BA0) /* 3B4C6C E00B24DC 27182BA0 */ addiu $t8, $t8, %lo(D_E00B2BA0) /* 3B4C70 E00B24E0 AFB800A0 */ sw $t8, 0xA0($sp) /* 3B4C74 E00B24E4 24180004 */ addiu $t8, $zero, 0x4 /* 3B4C78 E00B24E8 AFB100AC */ sw $s1, 0xAC($sp) /* 3B4C7C E00B24EC 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 3B4C80 E00B24F0 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 3B4C84 E00B24F4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3B4C88 E00B24F8 AFBF00CC */ sw $ra, 0xCC($sp) /* 3B4C8C E00B24FC AFBE00C8 */ sw $fp, 0xC8($sp) /* 3B4C90 E00B2500 AFB700C4 */ sw $s7, 0xC4($sp) /* 3B4C94 E00B2504 AFB600C0 */ sw $s6, 0xC0($sp) /* 3B4C98 E00B2508 AFB400B8 */ sw $s4, 0xB8($sp) /* 3B4C9C E00B250C AFB200B0 */ sw $s2, 0xB0($sp) /* 3B4CA0 E00B2510 AFB000A8 */ sw $s0, 0xA8($sp) /* 3B4CA4 E00B2514 F7BE00F8 */ sdc1 $f30, 0xF8($sp) /* 3B4CA8 E00B2518 F7BC00F0 */ sdc1 $f28, 0xF0($sp) /* 3B4CAC E00B251C F7BA00E8 */ sdc1 $f26, 0xE8($sp) /* 3B4CB0 E00B2520 F7B800E0 */ sdc1 $f24, 0xE0($sp) /* 3B4CB4 E00B2524 F7B600D8 */ sdc1 $f22, 0xD8($sp) /* 3B4CB8 E00B2528 F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 3B4CBC E00B252C AFA0009C */ sw $zero, 0x9C($sp) /* 3B4CC0 E00B2530 AFB800A4 */ sw $t8, 0xA4($sp) /* 3B4CC4 E00B2534 8E280000 */ lw $t0, 0x0($s1) /* 3B4CC8 E00B2538 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3B4CCC E00B253C 4481E800 */ mtc1 $at, $f29 /* 3B4CD0 E00B2540 4480E000 */ mtc1 $zero, $f28 /* 3B4CD4 E00B2544 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 3B4CD8 E00B2548 4481D000 */ mtc1 $at, $f26 /* 3B4CDC E00B254C 44800000 */ mtc1 $zero, $f0 /* 3B4CE0 E00B2550 8D37000C */ lw $s7, 0xC($t1) /* 3B4CE4 E00B2554 0100182D */ daddu $v1, $t0, $zero /* 3B4CE8 E00B2558 44050000 */ mfc1 $a1, $f0 /* 3B4CEC E00B255C 25080008 */ addiu $t0, $t0, 0x8 /* 3B4CF0 E00B2560 AE280000 */ sw $t0, 0x0($s1) /* 3B4CF4 E00B2564 8EF80000 */ lw $t8, 0x0($s7) /* 3B4CF8 E00B2568 4485F000 */ mtc1 $a1, $f30 /* 3B4CFC E00B256C 00A0302D */ daddu $a2, $a1, $zero /* 3B4D00 E00B2570 AFB80090 */ sw $t8, 0x90($sp) /* 3B4D04 E00B2574 C6E40050 */ lwc1 $f4, 0x50($s7) /* 3B4D08 E00B2578 00A0382D */ daddu $a3, $a1, $zero /* 3B4D0C E00B257C E7A40098 */ swc1 $f4, 0x98($sp) /* 3B4D10 E00B2580 AC620000 */ sw $v0, 0x0($v1) /* 3B4D14 E00B2584 AC600004 */ sw $zero, 0x4($v1) /* 3B4D18 E00B2588 AD0A0000 */ sw $t2, 0x0($t0) /* 3B4D1C E00B258C 8D230010 */ lw $v1, 0x10($t1) /* 3B4D20 E00B2590 25020008 */ addiu $v0, $t0, 0x8 /* 3B4D24 E00B2594 AE220000 */ sw $v0, 0x0($s1) /* 3B4D28 E00B2598 8C62001C */ lw $v0, 0x1C($v1) /* 3B4D2C E00B259C 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3B4D30 E00B25A0 00431021 */ addu $v0, $v0, $v1 /* 3B4D34 E00B25A4 0C080108 */ jal shim_guTranslateF /* 3B4D38 E00B25A8 AD020004 */ sw $v0, 0x4($t0) /* 3B4D3C E00B25AC 02E0B02D */ daddu $s6, $s7, $zero /* 3B4D40 E00B25B0 3C013D4C */ lui $at, (0x3D4CCCCD >> 16) /* 3B4D44 E00B25B4 3421CCCD */ ori $at, $at, (0x3D4CCCCD & 0xFFFF) /* 3B4D48 E00B25B8 44810000 */ mtc1 $at, $f0 /* 3B4D4C E00B25BC 27B00050 */ addiu $s0, $sp, 0x50 /* 3B4D50 E00B25C0 44050000 */ mfc1 $a1, $f0 /* 3B4D54 E00B25C4 0200202D */ daddu $a0, $s0, $zero /* 3B4D58 E00B25C8 00A0302D */ daddu $a2, $a1, $zero /* 3B4D5C E00B25CC 0C080110 */ jal shim_guScaleF /* 3B4D60 E00B25D0 00A0382D */ daddu $a3, $a1, $zero /* 3B4D64 E00B25D4 0200202D */ daddu $a0, $s0, $zero /* 3B4D68 E00B25D8 27A50010 */ addiu $a1, $sp, 0x10 /* 3B4D6C E00B25DC 0C080114 */ jal shim_guMtxCatF /* 3B4D70 E00B25E0 00A0302D */ daddu $a2, $a1, $zero /* 3B4D74 E00B25E4 27A40010 */ addiu $a0, $sp, 0x10 /* 3B4D78 E00B25E8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3B4D7C E00B25EC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3B4D80 E00B25F0 3C12800A */ lui $s2, %hi(gDisplayContext) /* 3B4D84 E00B25F4 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 3B4D88 E00B25F8 96050000 */ lhu $a1, 0x0($s0) /* 3B4D8C E00B25FC 8E420000 */ lw $v0, 0x0($s2) /* 3B4D90 E00B2600 00052980 */ sll $a1, $a1, 6 /* 3B4D94 E00B2604 00B32821 */ addu $a1, $a1, $s3 /* 3B4D98 E00B2608 0C080118 */ jal shim_guMtxF2L /* 3B4D9C E00B260C 00452821 */ addu $a1, $v0, $a1 /* 3B4DA0 E00B2610 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3B4DA4 E00B2614 8E240000 */ lw $a0, 0x0($s1) /* 3B4DA8 E00B2618 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3B4DAC E00B261C 0080282D */ daddu $a1, $a0, $zero /* 3B4DB0 E00B2620 24840008 */ addiu $a0, $a0, 0x8 /* 3B4DB4 E00B2624 24980018 */ addiu $t8, $a0, 0x18 /* 3B4DB8 E00B2628 0300F02D */ daddu $fp, $t8, $zero /* 3B4DBC E00B262C AFB80094 */ sw $t8, 0x94($sp) /* 3B4DC0 E00B2630 96020000 */ lhu $v0, 0x0($s0) /* 3B4DC4 E00B2634 24940027 */ addiu $s4, $a0, 0x27 /* 3B4DC8 E00B2638 AE240000 */ sw $a0, 0x0($s1) /* 3B4DCC E00B263C ACA30000 */ sw $v1, 0x0($a1) /* 3B4DD0 E00B2640 24430001 */ addiu $v1, $v0, 0x1 /* 3B4DD4 E00B2644 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B4DD8 E00B2648 00021180 */ sll $v0, $v0, 6 /* 3B4DDC E00B264C A6030000 */ sh $v1, 0x0($s0) /* 3B4DE0 E00B2650 8E430000 */ lw $v1, 0x0($s2) /* 3B4DE4 E00B2654 00531021 */ addu $v0, $v0, $s3 /* 3B4DE8 E00B2658 00621821 */ addu $v1, $v1, $v0 /* 3B4DEC E00B265C 24820008 */ addiu $v0, $a0, 0x8 /* 3B4DF0 E00B2660 ACA30004 */ sw $v1, 0x4($a1) /* 3B4DF4 E00B2664 AE220000 */ sw $v0, 0x0($s1) /* 3B4DF8 E00B2668 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B4DFC E00B266C AC820000 */ sw $v0, 0x0($a0) /* 3B4E00 E00B2670 92E20037 */ lbu $v0, 0x37($s7) /* 3B4E04 E00B2674 92E5003B */ lbu $a1, 0x3B($s7) /* 3B4E08 E00B2678 92E6003F */ lbu $a2, 0x3F($s7) /* 3B4E0C E00B267C 92E70043 */ lbu $a3, 0x43($s7) /* 3B4E10 E00B2680 24830010 */ addiu $v1, $a0, 0x10 /* 3B4E14 E00B2684 AE230000 */ sw $v1, 0x0($s1) /* 3B4E18 E00B2688 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3B4E1C E00B268C AC830008 */ sw $v1, 0x8($a0) /* 3B4E20 E00B2690 00021600 */ sll $v0, $v0, 24 /* 3B4E24 E00B2694 00052C00 */ sll $a1, $a1, 16 /* 3B4E28 E00B2698 00451025 */ or $v0, $v0, $a1 /* 3B4E2C E00B269C 00063200 */ sll $a2, $a2, 8 /* 3B4E30 E00B26A0 00461025 */ or $v0, $v0, $a2 /* 3B4E34 E00B26A4 00471025 */ or $v0, $v0, $a3 /* 3B4E38 E00B26A8 AC820004 */ sw $v0, 0x4($a0) /* 3B4E3C E00B26AC 92E20047 */ lbu $v0, 0x47($s7) /* 3B4E40 E00B26B0 92E5004B */ lbu $a1, 0x4B($s7) /* 3B4E44 E00B26B4 92E6004F */ lbu $a2, 0x4F($s7) /* 3B4E48 E00B26B8 3C03DE01 */ lui $v1, (0xDE010000 >> 16) /* 3B4E4C E00B26BC AC830010 */ sw $v1, 0x10($a0) /* 3B4E50 E00B26C0 24830198 */ addiu $v1, $a0, 0x198 /* 3B4E54 E00B26C4 AC830014 */ sw $v1, 0x14($a0) /* 3B4E58 E00B26C8 AE230000 */ sw $v1, 0x0($s1) /* 3B4E5C E00B26CC 00021600 */ sll $v0, $v0, 24 /* 3B4E60 E00B26D0 00052C00 */ sll $a1, $a1, 16 /* 3B4E64 E00B26D4 00451025 */ or $v0, $v0, $a1 /* 3B4E68 E00B26D8 00063200 */ sll $a2, $a2, 8 /* 3B4E6C E00B26DC 00461025 */ or $v0, $v0, $a2 /* 3B4E70 E00B26E0 344200C8 */ ori $v0, $v0, 0xC8 /* 3B4E74 E00B26E4 AC82000C */ sw $v0, 0xC($a0) .LE00B26E8: /* 3B4E78 E00B26E8 12A00008 */ beqz $s5, .LE00B270C /* 3B4E7C E00B26EC 0000C02D */ daddu $t8, $zero, $zero /* 3B4E80 E00B26F0 13150006 */ beq $t8, $s5, .LE00B270C /* 3B4E84 E00B26F4 2402000B */ addiu $v0, $zero, 0xB /* 3B4E88 E00B26F8 12A2000F */ beq $s5, $v0, .LE00B2738 /* 3B4E8C E00B26FC 00000000 */ nop /* 3B4E90 E00B2700 8EC20178 */ lw $v0, 0x178($s6) /* 3B4E94 E00B2704 1440000C */ bnez $v0, .LE00B2738 /* 3B4E98 E00B2708 00000000 */ nop .LE00B270C: /* 3B4E9C E00B270C 8FB800A4 */ lw $t8, 0xA4($sp) /* 3B4EA0 E00B2710 8EC60118 */ lw $a2, 0x118($s6) /* 3B4EA4 E00B2714 C6C000E8 */ lwc1 $f0, 0xE8($s6) /* 3B4EA8 E00B2718 02F81021 */ addu $v0, $s7, $t8 /* 3B4EAC E00B271C 46000007 */ neg.s $f0, $f0 /* 3B4EB0 E00B2720 C44C0118 */ lwc1 $f12, 0x118($v0) /* 3B4EB4 E00B2724 C44E00E8 */ lwc1 $f14, 0xE8($v0) /* 3B4EB8 E00B2728 44070000 */ mfc1 $a3, $f0 /* 3B4EBC E00B272C 0C080148 */ jal shim_atan2 /* 3B4EC0 E00B2730 46007387 */ neg.s $f14, $f14 /* 3B4EC4 E00B2734 46000607 */ neg.s $f24, $f0 .LE00B2738: /* 3B4EC8 E00B2738 8EE20000 */ lw $v0, 0x0($s7) /* 3B4ECC E00B273C 14400015 */ bnez $v0, .LE00B2794 /* 3B4ED0 E00B2740 00000000 */ nop /* 3B4ED4 E00B2744 C6C001A8 */ lwc1 $f0, 0x1A8($s6) /* 3B4ED8 E00B2748 46800020 */ cvt.s.w $f0, $f0 /* 3B4EDC E00B274C 46000021 */ cvt.d.s $f0, $f0 /* 3B4EE0 E00B2750 463C0002 */ mul.d $f0, $f0, $f28 /* 3B4EE4 E00B2754 00000000 */ nop /* 3B4EE8 E00B2758 3C014000 */ lui $at, (0x40000000 >> 16) /* 3B4EEC E00B275C 44811800 */ mtc1 $at, $f3 /* 3B4EF0 E00B2760 44801000 */ mtc1 $zero, $f2 /* 3B4EF4 E00B2764 00000000 */ nop /* 3B4EF8 E00B2768 46220000 */ add.d $f0, $f0, $f2 /* 3B4EFC E00B276C 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 3B4F00 E00B2770 44812000 */ mtc1 $at, $f4 /* 3B4F04 E00B2774 462005A0 */ cvt.s.d $f22, $f0 /* 3B4F08 E00B2778 4616203C */ c.lt.s $f4, $f22 /* 3B4F0C E00B277C 00000000 */ nop /* 3B4F10 E00B2780 45030001 */ bc1tl .LE00B2788 /* 3B4F14 E00B2784 46002586 */ mov.s $f22, $f4 .LE00B2788: /* 3B4F18 E00B2788 8FB800A0 */ lw $t8, 0xA0($sp) /* 3B4F1C E00B278C 0802CA04 */ j .LE00B2810 /* 3B4F20 E00B2790 93110000 */ lbu $s1, 0x0($t8) .LE00B2794: /* 3B4F24 E00B2794 C6C001A8 */ lwc1 $f0, 0x1A8($s6) /* 3B4F28 E00B2798 46800020 */ cvt.s.w $f0, $f0 /* 3B4F2C E00B279C 46000021 */ cvt.d.s $f0, $f0 /* 3B4F30 E00B27A0 463C0002 */ mul.d $f0, $f0, $f28 /* 3B4F34 E00B27A4 00000000 */ nop /* 3B4F38 E00B27A8 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 3B4F3C E00B27AC 44811800 */ mtc1 $at, $f3 /* 3B4F40 E00B27B0 44801000 */ mtc1 $zero, $f2 /* 3B4F44 E00B27B4 00000000 */ nop /* 3B4F48 E00B27B8 46220000 */ add.d $f0, $f0, $f2 /* 3B4F4C E00B27BC 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 3B4F50 E00B27C0 44811000 */ mtc1 $at, $f2 /* 3B4F54 E00B27C4 462005A0 */ cvt.s.d $f22, $f0 /* 3B4F58 E00B27C8 4616103C */ c.lt.s $f2, $f22 /* 3B4F5C E00B27CC 00000000 */ nop /* 3B4F60 E00B27D0 45030001 */ bc1tl .LE00B27D8 /* 3B4F64 E00B27D4 46001586 */ mov.s $f22, $f2 .LE00B27D8: /* 3B4F68 E00B27D8 02F51021 */ addu $v0, $s7, $s5 /* 3B4F6C E00B27DC 8FB800A0 */ lw $t8, 0xA0($sp) /* 3B4F70 E00B27E0 904201D8 */ lbu $v0, 0x1D8($v0) /* 3B4F74 E00B27E4 93030000 */ lbu $v1, 0x0($t8) /* 3B4F78 E00B27E8 00620018 */ mult $v1, $v0 /* 3B4F7C E00B27EC 00001812 */ mflo $v1 /* 3B4F80 E00B27F0 3C028080 */ lui $v0, (0x80808081 >> 16) /* 3B4F84 E00B27F4 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF) /* 3B4F88 E00B27F8 00620018 */ mult $v1, $v0 /* 3B4F8C E00B27FC 00001010 */ mfhi $v0 /* 3B4F90 E00B2800 00431021 */ addu $v0, $v0, $v1 /* 3B4F94 E00B2804 000211C3 */ sra $v0, $v0, 7 /* 3B4F98 E00B2808 00031FC3 */ sra $v1, $v1, 31 /* 3B4F9C E00B280C 00438823 */ subu $s1, $v0, $v1 .LE00B2810: /* 3B4FA0 E00B2810 C7A40098 */ lwc1 $f4, 0x98($sp) /* 3B4FA4 E00B2814 8FB8009C */ lw $t8, 0x9C($sp) /* 3B4FA8 E00B2818 4604B582 */ mul.s $f22, $f22, $f4 /* 3B4FAC E00B281C 00000000 */ nop /* 3B4FB0 E00B2820 4600C306 */ mov.s $f12, $f24 /* 3B4FB4 E00B2824 03158021 */ addu $s0, $t8, $s5 /* 3B4FB8 E00B2828 0C080140 */ jal shim_sin_deg /* 3B4FBC E00B282C 00108180 */ sll $s0, $s0, 6 /* 3B4FC0 E00B2830 4600B502 */ mul.s $f20, $f22, $f0 /* 3B4FC4 E00B2834 00000000 */ nop /* 3B4FC8 E00B2838 0C080144 */ jal shim_cos_deg /* 3B4FCC E00B283C 4600C306 */ mov.s $f12, $f24 /* 3B4FD0 E00B2840 C6C200E8 */ lwc1 $f2, 0xE8($s6) /* 3B4FD4 E00B2844 46141080 */ add.s $f2, $f2, $f20 /* 3B4FD8 E00B2848 461A1082 */ mul.s $f2, $f2, $f26 /* 3B4FDC E00B284C 00000000 */ nop /* 3B4FE0 E00B2850 4600B002 */ mul.s $f0, $f22, $f0 /* 3B4FE4 E00B2854 00000000 */ nop /* 3B4FE8 E00B2858 4600110D */ trunc.w.s $f4, $f2 /* 3B4FEC E00B285C 44022000 */ mfc1 $v0, $f4 /* 3B4FF0 E00B2860 00000000 */ nop /* 3B4FF4 E00B2864 A7C20000 */ sh $v0, 0x0($fp) /* 3B4FF8 E00B2868 C6C20118 */ lwc1 $f2, 0x118($s6) /* 3B4FFC E00B286C 46001080 */ add.s $f2, $f2, $f0 /* 3B5000 E00B2870 461A1082 */ mul.s $f2, $f2, $f26 /* 3B5004 E00B2874 00000000 */ nop /* 3B5008 E00B2878 4600110D */ trunc.w.s $f4, $f2 /* 3B500C E00B287C 44022000 */ mfc1 $v0, $f4 /* 3B5010 E00B2880 00000000 */ nop /* 3B5014 E00B2884 A682FFF3 */ sh $v0, -0xD($s4) /* 3B5018 E00B2888 32A20001 */ andi $v0, $s5, 0x1 /* 3B501C E00B288C 00022A00 */ sll $a1, $v0, 8 /* 3B5020 E00B2890 00A22823 */ subu $a1, $a1, $v0 /* 3B5024 E00B2894 00151043 */ sra $v0, $s5, 1 /* 3B5028 E00B2898 30420001 */ andi $v0, $v0, 0x1 /* 3B502C E00B289C 00022200 */ sll $a0, $v0, 8 /* 3B5030 E00B28A0 00822023 */ subu $a0, $a0, $v0 /* 3B5034 E00B28A4 00151083 */ sra $v0, $s5, 2 /* 3B5038 E00B28A8 30420001 */ andi $v0, $v0, 0x1 /* 3B503C E00B28AC 00021A00 */ sll $v1, $v0, 8 /* 3B5040 E00B28B0 C6C20148 */ lwc1 $f2, 0x148($s6) /* 3B5044 E00B28B4 00621823 */ subu $v1, $v1, $v0 /* 3B5048 E00B28B8 461E1080 */ add.s $f2, $f2, $f30 /* 3B504C E00B28BC A690FFF9 */ sh $s0, -0x7($s4) /* 3B5050 E00B28C0 A680FFFB */ sh $zero, -0x5($s4) /* 3B5054 E00B28C4 461A1082 */ mul.s $f2, $f2, $f26 /* 3B5058 E00B28C8 00000000 */ nop /* 3B505C E00B28CC A285FFFD */ sb $a1, -0x3($s4) /* 3B5060 E00B28D0 A284FFFE */ sb $a0, -0x2($s4) /* 3B5064 E00B28D4 A283FFFF */ sb $v1, -0x1($s4) /* 3B5068 E00B28D8 A2910000 */ sb $s1, 0x0($s4) /* 3B506C E00B28DC 4600110D */ trunc.w.s $f4, $f2 /* 3B5070 E00B28E0 44022000 */ mfc1 $v0, $f4 /* 3B5074 E00B28E4 00000000 */ nop /* 3B5078 E00B28E8 A682FFF5 */ sh $v0, -0xB($s4) /* 3B507C E00B28EC C6C200E8 */ lwc1 $f2, 0xE8($s6) /* 3B5080 E00B28F0 46141081 */ sub.s $f2, $f2, $f20 /* 3B5084 E00B28F4 461A1082 */ mul.s $f2, $f2, $f26 /* 3B5088 E00B28F8 00000000 */ nop /* 3B508C E00B28FC 27DE0010 */ addiu $fp, $fp, 0x10 /* 3B5090 E00B2900 26B50001 */ addiu $s5, $s5, 0x1 /* 3B5094 E00B2904 26940010 */ addiu $s4, $s4, 0x10 /* 3B5098 E00B2908 4600110D */ trunc.w.s $f4, $f2 /* 3B509C E00B290C 44022000 */ mfc1 $v0, $f4 /* 3B50A0 E00B2910 00000000 */ nop /* 3B50A4 E00B2914 A7C20000 */ sh $v0, 0x0($fp) /* 3B50A8 E00B2918 8FB8009C */ lw $t8, 0x9C($sp) /* 3B50AC E00B291C C6C20118 */ lwc1 $f2, 0x118($s6) /* 3B50B0 E00B2920 27180004 */ addiu $t8, $t8, 0x4 /* 3B50B4 E00B2924 AFB8009C */ sw $t8, 0x9C($sp) /* 3B50B8 E00B2928 8FB800A0 */ lw $t8, 0xA0($sp) /* 3B50BC E00B292C 46001081 */ sub.s $f2, $f2, $f0 /* 3B50C0 E00B2930 27180001 */ addiu $t8, $t8, 0x1 /* 3B50C4 E00B2934 AFB800A0 */ sw $t8, 0xA0($sp) /* 3B50C8 E00B2938 461A1082 */ mul.s $f2, $f2, $f26 /* 3B50CC E00B293C 00000000 */ nop /* 3B50D0 E00B2940 8FB800A4 */ lw $t8, 0xA4($sp) /* 3B50D4 E00B2944 27DE0010 */ addiu $fp, $fp, 0x10 /* 3B50D8 E00B2948 27180004 */ addiu $t8, $t8, 0x4 /* 3B50DC E00B294C AFB800A4 */ sw $t8, 0xA4($sp) /* 3B50E0 E00B2950 4600110D */ trunc.w.s $f4, $f2 /* 3B50E4 E00B2954 44022000 */ mfc1 $v0, $f4 /* 3B50E8 E00B2958 00000000 */ nop /* 3B50EC E00B295C A682FFF3 */ sh $v0, -0xD($s4) /* 3B50F0 E00B2960 C6C00148 */ lwc1 $f0, 0x148($s6) /* 3B50F4 E00B2964 26D60004 */ addiu $s6, $s6, 0x4 /* 3B50F8 E00B2968 24020400 */ addiu $v0, $zero, 0x400 /* 3B50FC E00B296C 461E0000 */ add.s $f0, $f0, $f30 /* 3B5100 E00B2970 A690FFF9 */ sh $s0, -0x7($s4) /* 3B5104 E00B2974 A682FFFB */ sh $v0, -0x5($s4) /* 3B5108 E00B2978 461A0002 */ mul.s $f0, $f0, $f26 /* 3B510C E00B297C 00000000 */ nop /* 3B5110 E00B2980 A285FFFD */ sb $a1, -0x3($s4) /* 3B5114 E00B2984 A284FFFE */ sb $a0, -0x2($s4) /* 3B5118 E00B2988 A283FFFF */ sb $v1, -0x1($s4) /* 3B511C E00B298C A2910000 */ sb $s1, 0x0($s4) /* 3B5120 E00B2990 4600010D */ trunc.w.s $f4, $f0 /* 3B5124 E00B2994 44022000 */ mfc1 $v0, $f4 /* 3B5128 E00B2998 00000000 */ nop /* 3B512C E00B299C A682FFF5 */ sh $v0, -0xB($s4) /* 3B5130 E00B29A0 2AA2000C */ slti $v0, $s5, 0xC /* 3B5134 E00B29A4 1440FF50 */ bnez $v0, .LE00B26E8 /* 3B5138 E00B29A8 26940010 */ addiu $s4, $s4, 0x10 /* 3B513C E00B29AC 3C07800A */ lui $a3, %hi(gMainGfxPos) /* 3B5140 E00B29B0 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* 3B5144 E00B29B4 3C080900 */ lui $t0, %hi(D_090008A8_415908) /* 3B5148 E00B29B8 250808A8 */ addiu $t0, $t0, %lo(D_090008A8_415908) /* 3B514C E00B29BC 00151040 */ sll $v0, $s5, 1 /* 3B5150 E00B29C0 304400FF */ andi $a0, $v0, 0xFF /* 3B5154 E00B29C4 00042300 */ sll $a0, $a0, 12 /* 3B5158 E00B29C8 3042007F */ andi $v0, $v0, 0x7F /* 3B515C E00B29CC 00021040 */ sll $v0, $v0, 1 /* 3B5160 E00B29D0 3C030100 */ lui $v1, (0x1000000 >> 16) /* 3B5164 E00B29D4 00431025 */ or $v0, $v0, $v1 /* 3B5168 E00B29D8 8CE60000 */ lw $a2, 0x0($a3) /* 3B516C E00B29DC 00822025 */ or $a0, $a0, $v0 /* 3B5170 E00B29E0 00C0282D */ daddu $a1, $a2, $zero /* 3B5174 E00B29E4 24C60008 */ addiu $a2, $a2, 0x8 /* 3B5178 E00B29E8 ACE60000 */ sw $a2, 0x0($a3) /* 3B517C E00B29EC ACA40000 */ sw $a0, 0x0($a1) /* 3B5180 E00B29F0 8FB80094 */ lw $t8, 0x94($sp) /* 3B5184 E00B29F4 24C20008 */ addiu $v0, $a2, 0x8 /* 3B5188 E00B29F8 ACB80004 */ sw $t8, 0x4($a1) /* 3B518C E00B29FC ACE20000 */ sw $v0, 0x0($a3) /* 3B5190 E00B2A00 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B5194 E00B2A04 ACC20000 */ sw $v0, 0x0($a2) /* 3B5198 E00B2A08 8FB80090 */ lw $t8, 0x90($sp) /* 3B519C E00B2A0C 17000003 */ bnez $t8, .LE00B2A1C /* 3B51A0 E00B2A10 02A0102D */ daddu $v0, $s5, $zero /* 3B51A4 E00B2A14 3C080900 */ lui $t0, %hi(D_09000800_415860) /* 3B51A8 E00B2A18 25080800 */ addiu $t0, $t0, %lo(D_09000800_415860) .LE00B2A1C: /* 3B51AC E00B2A1C ACC80004 */ sw $t0, 0x4($a2) /* 3B51B0 E00B2A20 2442FFFF */ addiu $v0, $v0, -0x1 /* 3B51B4 E00B2A24 18400039 */ blez $v0, .LE00B2B0C /* 3B51B8 E00B2A28 0000A82D */ daddu $s5, $zero, $zero /* 3B51BC E00B2A2C 00E0582D */ daddu $t3, $a3, $zero /* 3B51C0 E00B2A30 3C0A0600 */ lui $t2, (0x6000000 >> 16) /* 3B51C4 E00B2A34 24090001 */ addiu $t1, $zero, 0x1 /* 3B51C8 E00B2A38 3C0F0606 */ lui $t7, (0x6060402 >> 16) /* 3B51CC E00B2A3C 35EF0402 */ ori $t7, $t7, (0x6060402 & 0xFFFF) /* 3B51D0 E00B2A40 3C0E0002 */ lui $t6, (0x20406 >> 16) /* 3B51D4 E00B2A44 35CE0406 */ ori $t6, $t6, (0x20406 & 0xFFFF) /* 3B51D8 E00B2A48 3C0D0006 */ lui $t5, (0x60804 >> 16) /* 3B51DC E00B2A4C 35AD0804 */ ori $t5, $t5, (0x60804 & 0xFFFF) /* 3B51E0 E00B2A50 0040602D */ daddu $t4, $v0, $zero /* 3B51E4 E00B2A54 24070004 */ addiu $a3, $zero, 0x4 /* 3B51E8 E00B2A58 24060002 */ addiu $a2, $zero, 0x2 /* 3B51EC E00B2A5C 24080006 */ addiu $t0, $zero, 0x6 .LE00B2A60: /* 3B51F0 E00B2A60 2AA20000 */ slti $v0, $s5, 0x0 /* 3B51F4 E00B2A64 14400023 */ bnez $v0, .LE00B2AF4 /* 3B51F8 E00B2A68 00152840 */ sll $a1, $s5, 1 /* 3B51FC E00B2A6C 8D640000 */ lw $a0, 0x0($t3) /* 3B5200 E00B2A70 24820008 */ addiu $v0, $a0, 0x8 /* 3B5204 E00B2A74 14A00004 */ bnez $a1, .LE00B2A88 /* 3B5208 E00B2A78 AD620000 */ sw $v0, 0x0($t3) /* 3B520C E00B2A7C 00151440 */ sll $v0, $s5, 17 /* 3B5210 E00B2A80 0802CAAC */ j .LE00B2AB0 /* 3B5214 E00B2A84 34420402 */ ori $v0, $v0, 0x402 .LE00B2A88: /* 3B5218 E00B2A88 14A90003 */ bne $a1, $t1, .LE00B2A98 /* 3B521C E00B2A8C 30C200FF */ andi $v0, $a2, 0xFF /* 3B5220 E00B2A90 0802CAAE */ j .LE00B2AB8 /* 3B5224 E00B2A94 AC8F0000 */ sw $t7, 0x0($a0) .LE00B2A98: /* 3B5228 E00B2A98 00021400 */ sll $v0, $v0, 16 /* 3B522C E00B2A9C 00151A80 */ sll $v1, $s5, 10 /* 3B5230 E00B2AA0 3063FC00 */ andi $v1, $v1, 0xFC00 /* 3B5234 E00B2AA4 00431025 */ or $v0, $v0, $v1 /* 3B5238 E00B2AA8 30E300FF */ andi $v1, $a3, 0xFF /* 3B523C E00B2AAC 00431025 */ or $v0, $v0, $v1 .LE00B2AB0: /* 3B5240 E00B2AB0 004A1025 */ or $v0, $v0, $t2 /* 3B5244 E00B2AB4 AC820000 */ sw $v0, 0x0($a0) .LE00B2AB8: /* 3B5248 E00B2AB8 14A00003 */ bnez $a1, .LE00B2AC8 /* 3B524C E00B2ABC 00000000 */ nop /* 3B5250 E00B2AC0 0802CABD */ j .LE00B2AF4 /* 3B5254 E00B2AC4 AC8E0004 */ sw $t6, 0x4($a0) .LE00B2AC8: /* 3B5258 E00B2AC8 14A90003 */ bne $a1, $t1, .LE00B2AD8 /* 3B525C E00B2ACC 310200FF */ andi $v0, $t0, 0xFF /* 3B5260 E00B2AD0 0802CABD */ j .LE00B2AF4 /* 3B5264 E00B2AD4 AC8D0004 */ sw $t5, 0x4($a0) .LE00B2AD8: /* 3B5268 E00B2AD8 00021400 */ sll $v0, $v0, 16 /* 3B526C E00B2ADC 30C300FF */ andi $v1, $a2, 0xFF /* 3B5270 E00B2AE0 00031A00 */ sll $v1, $v1, 8 /* 3B5274 E00B2AE4 00431025 */ or $v0, $v0, $v1 /* 3B5278 E00B2AE8 30E300FF */ andi $v1, $a3, 0xFF /* 3B527C E00B2AEC 00431025 */ or $v0, $v0, $v1 /* 3B5280 E00B2AF0 AC820004 */ sw $v0, 0x4($a0) .LE00B2AF4: /* 3B5284 E00B2AF4 24E70004 */ addiu $a3, $a3, 0x4 /* 3B5288 E00B2AF8 24C60004 */ addiu $a2, $a2, 0x4 /* 3B528C E00B2AFC 26B50001 */ addiu $s5, $s5, 0x1 /* 3B5290 E00B2B00 02AC102A */ slt $v0, $s5, $t4 /* 3B5294 E00B2B04 1440FFD6 */ bnez $v0, .LE00B2A60 /* 3B5298 E00B2B08 25080004 */ addiu $t0, $t0, 0x4 .LE00B2B0C: /* 3B529C E00B2B0C 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 3B52A0 E00B2B10 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3B52A4 E00B2B14 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3B52A8 E00B2B18 8C820000 */ lw $v0, 0x0($a0) /* 3B52AC E00B2B1C 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 3B52B0 E00B2B20 0040282D */ daddu $a1, $v0, $zero /* 3B52B4 E00B2B24 24420008 */ addiu $v0, $v0, 0x8 /* 3B52B8 E00B2B28 AC820000 */ sw $v0, 0x0($a0) /* 3B52BC E00B2B2C ACA30000 */ sw $v1, 0x0($a1) /* 3B52C0 E00B2B30 24030040 */ addiu $v1, $zero, 0x40 /* 3B52C4 E00B2B34 ACA30004 */ sw $v1, 0x4($a1) /* 3B52C8 E00B2B38 24430008 */ addiu $v1, $v0, 0x8 /* 3B52CC E00B2B3C AC830000 */ sw $v1, 0x0($a0) /* 3B52D0 E00B2B40 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 3B52D4 E00B2B44 AC430000 */ sw $v1, 0x0($v0) /* 3B52D8 E00B2B48 AC400004 */ sw $zero, 0x4($v0) /* 3B52DC E00B2B4C 8FBF00CC */ lw $ra, 0xCC($sp) /* 3B52E0 E00B2B50 8FBE00C8 */ lw $fp, 0xC8($sp) /* 3B52E4 E00B2B54 8FB700C4 */ lw $s7, 0xC4($sp) /* 3B52E8 E00B2B58 8FB600C0 */ lw $s6, 0xC0($sp) /* 3B52EC E00B2B5C 8FB500BC */ lw $s5, 0xBC($sp) /* 3B52F0 E00B2B60 8FB400B8 */ lw $s4, 0xB8($sp) /* 3B52F4 E00B2B64 8FB300B4 */ lw $s3, 0xB4($sp) /* 3B52F8 E00B2B68 8FB200B0 */ lw $s2, 0xB0($sp) /* 3B52FC E00B2B6C 8FB100AC */ lw $s1, 0xAC($sp) /* 3B5300 E00B2B70 8FB000A8 */ lw $s0, 0xA8($sp) /* 3B5304 E00B2B74 D7BE00F8 */ ldc1 $f30, 0xF8($sp) /* 3B5308 E00B2B78 D7BC00F0 */ ldc1 $f28, 0xF0($sp) /* 3B530C E00B2B7C D7BA00E8 */ ldc1 $f26, 0xE8($sp) /* 3B5310 E00B2B80 D7B800E0 */ ldc1 $f24, 0xE0($sp) /* 3B5314 E00B2B84 D7B600D8 */ ldc1 $f22, 0xD8($sp) /* 3B5318 E00B2B88 D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 3B531C E00B2B8C 03E00008 */ jr $ra /* 3B5320 E00B2B90 27BD0100 */ addiu $sp, $sp, 0x100 /* 3B5324 E00B2B94 00000000 */ nop /* 3B5328 E00B2B98 00000000 */ nop /* 3B532C E00B2B9C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void squirt_appendGfx(void* effect) { SquirtFXData* data = ((EffectInstance*)effect)->data.squirt; s32 zero = 0; s32 unk_00 = data->unk_00; Gfx* savedGfxPos; f32 unk_50 = data->unk_50; Matrix4f sp10, sp50; Vtx_t* vtx; s32 savedIdx; s32 i; f32 cosComp; f32 sinComp; f32 var_f22; f32 theta; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp10, 0.0f, 0.0f, 0.0f); shim_guScaleF(sp50, 0.05f, 0.05f, 0.05f); shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_34, data->unk_38, data->unk_3C, data->unk_40); gDPSetEnvColor(gMainGfxPos++, data->unk_44, data->unk_48, data->unk_4C, 200); gSPBranchList(gMainGfxPos, &gMainGfxPos[49]); savedGfxPos = gMainGfxPos + 1; gMainGfxPos = &gMainGfxPos[49]; vtx = (Vtx_t*) savedGfxPos; for (i = 0; i < 12; i++) { s32 inc = i + 1; s32 tc0; s32 cnA; if (i == 0 || zero == i || (i != 11 && data->unk_178[i] == 0)) { theta = data->unk_118[inc]; theta = -shim_atan2(theta, -data->unk_E8[i + 1], data->unk_118[i], -data->unk_E8[i]); } if (data->unk_00 == 0) { var_f22 = ((f32) data->unk_1A8[i] * 0.5) + 2.0; if (var_f22 > 6.0f) { var_f22 = 6.0f; } cnA = D_E00B2BA0[i]; } else { var_f22 = ((f32) data->unk_1A8[i] * 0.5) + 1.0; if (var_f22 > 30.0f) { do { } while (0); // TODO required to match var_f22 = 30.0f; } cnA = (D_E00B2BA0[i] * data->unk_1D8[i]) / 255; } tc0 = i * 5; tc0 *= 64; var_f22 *= unk_50; sinComp = var_f22 * shim_sin_deg(theta); cosComp = var_f22 * shim_cos_deg(theta); vtx->ob[0] = (data->unk_E8[i] + sinComp) * 20.0f; vtx->ob[1] = (data->unk_118[i] + cosComp) * 20.0f; vtx->ob[2] = (data->unk_148[i] + 0.0f) * 20.0f; vtx->tc[0] = tc0; vtx->tc[1] = 0; vtx->cn[0] = (i & 1) * 255; vtx->cn[1] = ((i >> 1) & 1) * 255; vtx->cn[2] = ((i >> 2) & 1) * 255; vtx->cn[3] = cnA; vtx++; vtx->ob[0] = (data->unk_E8[i] - sinComp) * 20.0f; vtx->ob[1] = (data->unk_118[i] - cosComp) * 20.0f; vtx->ob[2] = (data->unk_148[i] + 0.0f) * 20.0f; vtx->tc[0] = tc0; vtx->tc[1] = 1024; vtx->cn[0] = (i & 1) * 255; vtx->cn[1] = ((i >> 1) & 1) * 255; vtx->cn[2] = ((i >> 2) & 1) * 255; vtx->cn[3] = cnA; vtx++; } gSPVertex(gMainGfxPos++, savedGfxPos, i * 2, 0); savedIdx = i; gSPDisplayList(gMainGfxPos++, unk_00 == 0 ? D_09000800_3B5B40 : D_090008A8_3B5BE8); for (i = 0; i < savedIdx - 1; i++) { s32 i2 = i * 2; if (i < zero) { continue; } gSP2Triangles(gMainGfxPos++, i2, i2 + 2, i2 + 1, i2, i2 + 1, i2 + 2, i2 + 3, i2); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E0080448 /* 381708 E0080448 27BDFEE8 */ addiu $sp, $sp, -0x118 /* 38170C E008044C 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 381710 E0080450 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 381714 E0080454 AFA40118 */ sw $a0, 0x118($sp) /* 381718 E0080458 27A40018 */ addiu $a0, $sp, 0x18 /* 38171C E008045C AFB300F4 */ sw $s3, 0xF4($sp) /* 381720 E0080460 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 381724 E0080464 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 381728 E0080468 8FAA0118 */ lw $t2, 0x118($sp) /* 38172C E008046C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 381730 E0080470 AFBF010C */ sw $ra, 0x10C($sp) /* 381734 E0080474 AFBE0108 */ sw $fp, 0x108($sp) /* 381738 E0080478 AFB70104 */ sw $s7, 0x104($sp) /* 38173C E008047C AFB60100 */ sw $s6, 0x100($sp) /* 381740 E0080480 AFB500FC */ sw $s5, 0xFC($sp) /* 381744 E0080484 AFB400F8 */ sw $s4, 0xF8($sp) /* 381748 E0080488 AFB200F0 */ sw $s2, 0xF0($sp) /* 38174C E008048C AFB100EC */ sw $s1, 0xEC($sp) /* 381750 E0080490 AFB000E8 */ sw $s0, 0xE8($sp) /* 381754 E0080494 F7B40110 */ sdc1 $f20, 0x110($sp) /* 381758 E0080498 8E680000 */ lw $t0, 0x0($s3) /* 38175C E008049C 8D52000C */ lw $s2, 0xC($t2) /* 381760 E00804A0 0100182D */ daddu $v1, $t0, $zero /* 381764 E00804A4 8E4A0044 */ lw $t2, 0x44($s2) /* 381768 E00804A8 25080008 */ addiu $t0, $t0, 0x8 /* 38176C E00804AC AFAA00DC */ sw $t2, 0xDC($sp) /* 381770 E00804B0 AC620000 */ sw $v0, 0x0($v1) /* 381774 E00804B4 AC600004 */ sw $zero, 0x4($v1) /* 381778 E00804B8 AD050000 */ sw $a1, 0x0($t0) /* 38177C E00804BC 8FAA0118 */ lw $t2, 0x118($sp) /* 381780 E00804C0 3C110001 */ lui $s1, (0x11630 >> 16) /* 381784 E00804C4 8D420010 */ lw $v0, 0x10($t2) /* 381788 E00804C8 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 38178C E00804CC AE680000 */ sw $t0, 0x0($s3) /* 381790 E00804D0 8C42001C */ lw $v0, 0x1C($v0) /* 381794 E00804D4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 381798 E00804D8 00431021 */ addu $v0, $v0, $v1 /* 38179C E00804DC AD020004 */ sw $v0, 0x4($t0) /* 3817A0 E00804E0 8E450004 */ lw $a1, 0x4($s2) /* 3817A4 E00804E4 8E460008 */ lw $a2, 0x8($s2) /* 3817A8 E00804E8 8E47000C */ lw $a3, 0xC($s2) /* 3817AC E00804EC 25080008 */ addiu $t0, $t0, 0x8 /* 3817B0 E00804F0 0C080108 */ jal shim_guTranslateF /* 3817B4 E00804F4 AE680000 */ sw $t0, 0x0($s3) /* 3817B8 E00804F8 27B50058 */ addiu $s5, $sp, 0x58 /* 3817BC E00804FC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3817C0 E0080500 4481A000 */ mtc1 $at, $f20 /* 3817C4 E0080504 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3817C8 E0080508 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3817CC E008050C 44800000 */ mtc1 $zero, $f0 /* 3817D0 E0080510 00031080 */ sll $v0, $v1, 2 /* 3817D4 E0080514 00431021 */ addu $v0, $v0, $v1 /* 3817D8 E0080518 00021080 */ sll $v0, $v0, 2 /* 3817DC E008051C 00431023 */ subu $v0, $v0, $v1 /* 3817E0 E0080520 000218C0 */ sll $v1, $v0, 3 /* 3817E4 E0080524 00431021 */ addu $v0, $v0, $v1 /* 3817E8 E0080528 000210C0 */ sll $v0, $v0, 3 /* 3817EC E008052C 44060000 */ mfc1 $a2, $f0 /* 3817F0 E0080530 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3817F4 E0080534 00220821 */ addu $at, $at, $v0 /* 3817F8 E0080538 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 3817FC E008053C 4407A000 */ mfc1 $a3, $f20 /* 381800 E0080540 46000007 */ neg.s $f0, $f0 /* 381804 E0080544 44050000 */ mfc1 $a1, $f0 /* 381808 E0080548 02A0202D */ daddu $a0, $s5, $zero /* 38180C E008054C 0C080104 */ jal shim_guRotateF /* 381810 E0080550 AFA60010 */ sw $a2, 0x10($sp) /* 381814 E0080554 02A0202D */ daddu $a0, $s5, $zero /* 381818 E0080558 27A50018 */ addiu $a1, $sp, 0x18 /* 38181C E008055C 27B00098 */ addiu $s0, $sp, 0x98 /* 381820 E0080560 0C080114 */ jal shim_guMtxCatF /* 381824 E0080564 0200302D */ daddu $a2, $s0, $zero /* 381828 E0080568 0200202D */ daddu $a0, $s0, $zero /* 38182C E008056C 3C168007 */ lui $s6, %hi(gMatrixListPos) /* 381830 E0080570 26D641F0 */ addiu $s6, $s6, %lo(gMatrixListPos) /* 381834 E0080574 3C1E800A */ lui $fp, %hi(gDisplayContext) /* 381838 E0080578 27DEA674 */ addiu $fp, $fp, %lo(gDisplayContext) /* 38183C E008057C 96C50000 */ lhu $a1, 0x0($s6) /* 381840 E0080580 8FC20000 */ lw $v0, 0x0($fp) /* 381844 E0080584 00052980 */ sll $a1, $a1, 6 /* 381848 E0080588 00B12821 */ addu $a1, $a1, $s1 /* 38184C E008058C 0C080118 */ jal shim_guMtxF2L /* 381850 E0080590 00452821 */ addu $a1, $v0, $a1 /* 381854 E0080594 240A0001 */ addiu $t2, $zero, 0x1 /* 381858 E0080598 8E650000 */ lw $a1, 0x0($s3) /* 38185C E008059C 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 381860 E00805A0 AFAA00D8 */ sw $t2, 0xD8($sp) /* 381864 E00805A4 96C40000 */ lhu $a0, 0x0($s6) /* 381868 E00805A8 00A0302D */ daddu $a2, $a1, $zero /* 38186C E00805AC ACC20000 */ sw $v0, 0x0($a2) /* 381870 E00805B0 3082FFFF */ andi $v0, $a0, 0xFFFF /* 381874 E00805B4 00021180 */ sll $v0, $v0, 6 /* 381878 E00805B8 8FC30000 */ lw $v1, 0x0($fp) /* 38187C E00805BC 00511021 */ addu $v0, $v0, $s1 /* 381880 E00805C0 00621821 */ addu $v1, $v1, $v0 /* 381884 E00805C4 ACC30004 */ sw $v1, 0x4($a2) /* 381888 E00805C8 8E540000 */ lw $s4, 0x0($s2) /* 38188C E00805CC 8E570040 */ lw $s7, 0x40($s2) /* 381890 E00805D0 24A50008 */ addiu $a1, $a1, 0x8 /* 381894 E00805D4 AE650000 */ sw $a1, 0x0($s3) /* 381898 E00805D8 8FAA0118 */ lw $t2, 0x118($sp) /* 38189C E00805DC 8D420008 */ lw $v0, 0x8($t2) /* 3818A0 E00805E0 24840001 */ addiu $a0, $a0, 0x1 /* 3818A4 E00805E4 A6C40000 */ sh $a0, 0x0($s6) /* 3818A8 E00805E8 8FAA00D8 */ lw $t2, 0xD8($sp) /* 3818AC E00805EC 0142102A */ slt $v0, $t2, $v0 /* 3818B0 E00805F0 10400118 */ beqz $v0, .LE0080A54 /* 3818B4 E00805F4 26520048 */ addiu $s2, $s2, 0x48 /* 3818B8 E00805F8 0260802D */ daddu $s0, $s3, $zero /* 3818BC E00805FC 3C13DE00 */ lui $s3, (0xDE000000 >> 16) /* 3818C0 E0080600 AFB500E0 */ sw $s5, 0xE0($sp) /* 3818C4 E0080604 3C150001 */ lui $s5, (0x11630 >> 16) /* 3818C8 E0080608 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 3818CC E008060C 3C1ED838 */ lui $fp, (0xD8380002 >> 16) /* 3818D0 E0080610 37DE0002 */ ori $fp, $fp, (0xD8380002 & 0xFFFF) /* 3818D4 E0080614 2651001C */ addiu $s1, $s2, 0x1C .LE0080618: /* 3818D8 E0080618 8E220018 */ lw $v0, 0x18($s1) /* 3818DC E008061C 1C400104 */ bgtz $v0, .LE0080A30 /* 3818E0 E0080620 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3818E4 E0080624 8E070000 */ lw $a3, 0x0($s0) /* 3818E8 E0080628 00E0182D */ daddu $v1, $a3, $zero /* 3818EC E008062C 24E70008 */ addiu $a3, $a3, 0x8 /* 3818F0 E0080630 AE070000 */ sw $a3, 0x0($s0) /* 3818F4 E0080634 AC620000 */ sw $v0, 0x0($v1) /* 3818F8 E0080638 9222000F */ lbu $v0, 0xF($s1) /* 3818FC E008063C AC620004 */ sw $v0, 0x4($v1) /* 381900 E0080640 8E23000C */ lw $v1, 0xC($s1) /* 381904 E0080644 240200FF */ addiu $v0, $zero, 0xFF /* 381908 E0080648 14620011 */ bne $v1, $v0, .LE0080690 /* 38190C E008064C 3C05E200 */ lui $a1, (0xE200001C >> 16) /* 381910 E0080650 3C04E200 */ lui $a0, (0xE200001C >> 16) /* 381914 E0080654 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 381918 E0080658 3C030055 */ lui $v1, (0x551208 >> 16) /* 38191C E008065C 34631208 */ ori $v1, $v1, (0x551208 & 0xFFFF) /* 381920 E0080660 3C05FC12 */ lui $a1, (0xFC127E24 >> 16) /* 381924 E0080664 34A57E24 */ ori $a1, $a1, (0xFC127E24 & 0xFFFF) /* 381928 E0080668 24E20008 */ addiu $v0, $a3, 0x8 /* 38192C E008066C AE020000 */ sw $v0, 0x0($s0) /* 381930 E0080670 24E20010 */ addiu $v0, $a3, 0x10 /* 381934 E0080674 ACE40000 */ sw $a0, 0x0($a3) /* 381938 E0080678 ACE30004 */ sw $v1, 0x4($a3) /* 38193C E008067C AE020000 */ sw $v0, 0x0($s0) /* 381940 E0080680 2402F3F9 */ addiu $v0, $zero, -0xC07 /* 381944 E0080684 ACE50008 */ sw $a1, 0x8($a3) /* 381948 E0080688 080201B3 */ j .LE00806CC /* 38194C E008068C ACE2000C */ sw $v0, 0xC($a3) .LE0080690: /* 381950 E0080690 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF) /* 381954 E0080694 3C030050 */ lui $v1, (0x504340 >> 16) /* 381958 E0080698 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF) /* 38195C E008069C 3C06FC12 */ lui $a2, (0xFC123224 >> 16) /* 381960 E00806A0 34C63224 */ ori $a2, $a2, (0xFC123224 & 0xFFFF) /* 381964 E00806A4 3C04FF67 */ lui $a0, (0xFF67FFFF >> 16) /* 381968 E00806A8 3484FFFF */ ori $a0, $a0, (0xFF67FFFF & 0xFFFF) /* 38196C E00806AC 24E20008 */ addiu $v0, $a3, 0x8 /* 381970 E00806B0 AE020000 */ sw $v0, 0x0($s0) /* 381974 E00806B4 24E20010 */ addiu $v0, $a3, 0x10 /* 381978 E00806B8 ACE50000 */ sw $a1, 0x0($a3) /* 38197C E00806BC ACE30004 */ sw $v1, 0x4($a3) /* 381980 E00806C0 AE020000 */ sw $v0, 0x0($s0) /* 381984 E00806C4 ACE60008 */ sw $a2, 0x8($a3) /* 381988 E00806C8 ACE4000C */ sw $a0, 0xC($a3) .LE00806CC: /* 38198C E00806CC 8E020000 */ lw $v0, 0x0($s0) /* 381990 E00806D0 0040182D */ daddu $v1, $v0, $zero /* 381994 E00806D4 24420008 */ addiu $v0, $v0, 0x8 /* 381998 E00806D8 AE020000 */ sw $v0, 0x0($s0) /* 38199C E00806DC AC730000 */ sw $s3, 0x0($v1) /* 3819A0 E00806E0 12800004 */ beqz $s4, .LE00806F4 /* 3819A4 E00806E4 24630004 */ addiu $v1, $v1, 0x4 /* 3819A8 E00806E8 24020002 */ addiu $v0, $zero, 0x2 /* 3819AC E00806EC 1682000A */ bne $s4, $v0, .LE0080718 /* 3819B0 E00806F0 00000000 */ nop .LE00806F4: /* 3819B4 E00806F4 8FAA00DC */ lw $t2, 0xDC($sp) /* 3819B8 E00806F8 3C020900 */ lui $v0, %hi(D_09003298_410528) /* 3819BC E00806FC 24423298 */ addiu $v0, $v0, %lo(D_09003298_410528) /* 3819C0 E0080700 55400008 */ bnel $t2, $zero, .LE0080724 /* 3819C4 E0080704 AC620000 */ sw $v0, 0x0($v1) /* 3819C8 E0080708 3C020900 */ lui $v0, %hi(D_09003200_410490) /* 3819CC E008070C 24423200 */ addiu $v0, $v0, %lo(D_09003200_410490) /* 3819D0 E0080710 080201C9 */ j .LE0080724 /* 3819D4 E0080714 AC620000 */ sw $v0, 0x0($v1) .LE0080718: /* 3819D8 E0080718 3C020900 */ lui $v0, %hi(D_09003330_4105C0) /* 3819DC E008071C 24423330 */ addiu $v0, $v0, %lo(D_09003330_4105C0) /* 3819E0 E0080720 AC620000 */ sw $v0, 0x0($v1) .LE0080724: /* 3819E4 E0080724 C622FFE8 */ lwc1 $f2, -0x18($s1) /* 3819E8 E0080728 C6200008 */ lwc1 $f0, 0x8($s1) /* 3819EC E008072C 46001080 */ add.s $f2, $f2, $f0 /* 3819F0 E0080730 8E26FFEC */ lw $a2, -0x14($s1) /* 3819F4 E0080734 8E27FFF0 */ lw $a3, -0x10($s1) /* 3819F8 E0080738 44051000 */ mfc1 $a1, $f2 /* 3819FC E008073C 0C080108 */ jal shim_guTranslateF /* 381A00 E0080740 27A40018 */ addiu $a0, $sp, 0x18 /* 381A04 E0080744 8E25001C */ lw $a1, 0x1C($s1) /* 381A08 E0080748 8E260020 */ lw $a2, 0x20($s1) /* 381A0C E008074C 4407A000 */ mfc1 $a3, $f20 /* 381A10 E0080750 0C080110 */ jal shim_guScaleF /* 381A14 E0080754 8FA400E0 */ lw $a0, 0xE0($sp) /* 381A18 E0080758 27A50018 */ addiu $a1, $sp, 0x18 /* 381A1C E008075C 8FA400E0 */ lw $a0, 0xE0($sp) /* 381A20 E0080760 0C080114 */ jal shim_guMtxCatF /* 381A24 E0080764 00A0302D */ daddu $a2, $a1, $zero /* 381A28 E0080768 27A40018 */ addiu $a0, $sp, 0x18 /* 381A2C E008076C 96C50000 */ lhu $a1, 0x0($s6) /* 381A30 E0080770 3C02800A */ lui $v0, %hi(gDisplayContext) /* 381A34 E0080774 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 381A38 E0080778 00052980 */ sll $a1, $a1, 6 /* 381A3C E008077C 00B52821 */ addu $a1, $a1, $s5 /* 381A40 E0080780 0C080118 */ jal shim_guMtxF2L /* 381A44 E0080784 00452821 */ addu $a1, $v0, $a1 /* 381A48 E0080788 27A40018 */ addiu $a0, $sp, 0x18 /* 381A4C E008078C 8E080000 */ lw $t0, 0x0($s0) /* 381A50 E0080790 96C90000 */ lhu $t1, 0x0($s6) /* 381A54 E0080794 3C03800A */ lui $v1, %hi(gDisplayContext) /* 381A58 E0080798 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 381A5C E008079C 44800000 */ mtc1 $zero, $f0 /* 381A60 E00807A0 0100282D */ daddu $a1, $t0, $zero /* 381A64 E00807A4 3C0ADA38 */ lui $t2, (0xDA380000 >> 16) /* 381A68 E00807A8 3122FFFF */ andi $v0, $t1, 0xFFFF /* 381A6C E00807AC 00021180 */ sll $v0, $v0, 6 /* 381A70 E00807B0 00551021 */ addu $v0, $v0, $s5 /* 381A74 E00807B4 00621821 */ addu $v1, $v1, $v0 /* 381A78 E00807B8 25080008 */ addiu $t0, $t0, 0x8 /* 381A7C E00807BC ACAA0000 */ sw $t2, 0x0($a1) /* 381A80 E00807C0 ACA30004 */ sw $v1, 0x4($a1) /* 381A84 E00807C4 E7B40010 */ swc1 $f20, 0x10($sp) /* 381A88 E00807C8 8E250000 */ lw $a1, 0x0($s1) /* 381A8C E00807CC 44060000 */ mfc1 $a2, $f0 /* 381A90 E00807D0 25290001 */ addiu $t1, $t1, 0x1 /* 381A94 E00807D4 AE080000 */ sw $t0, 0x0($s0) /* 381A98 E00807D8 A6C90000 */ sh $t1, 0x0($s6) /* 381A9C E00807DC 0C080104 */ jal shim_guRotateF /* 381AA0 E00807E0 00C0382D */ daddu $a3, $a2, $zero /* 381AA4 E00807E4 27A40018 */ addiu $a0, $sp, 0x18 /* 381AA8 E00807E8 96C50000 */ lhu $a1, 0x0($s6) /* 381AAC E00807EC 3C02800A */ lui $v0, %hi(gDisplayContext) /* 381AB0 E00807F0 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 381AB4 E00807F4 00052980 */ sll $a1, $a1, 6 /* 381AB8 E00807F8 00B52821 */ addu $a1, $a1, $s5 /* 381ABC E00807FC 0C080118 */ jal shim_guMtxF2L /* 381AC0 E0080800 00452821 */ addu $a1, $v0, $a1 /* 381AC4 E0080804 8E050000 */ lw $a1, 0x0($s0) /* 381AC8 E0080808 96C30000 */ lhu $v1, 0x0($s6) /* 381ACC E008080C 00A0202D */ daddu $a0, $a1, $zero /* 381AD0 E0080810 24A50008 */ addiu $a1, $a1, 0x8 /* 381AD4 E0080814 3C0ADA38 */ lui $t2, (0xDA380000 >> 16) /* 381AD8 E0080818 24620001 */ addiu $v0, $v1, 0x1 /* 381ADC E008081C 3063FFFF */ andi $v1, $v1, 0xFFFF /* 381AE0 E0080820 00031980 */ sll $v1, $v1, 6 /* 381AE4 E0080824 AE050000 */ sw $a1, 0x0($s0) /* 381AE8 E0080828 AC8A0000 */ sw $t2, 0x0($a0) /* 381AEC E008082C A6C20000 */ sh $v0, 0x0($s6) /* 381AF0 E0080830 3C02800A */ lui $v0, %hi(gDisplayContext) /* 381AF4 E0080834 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 381AF8 E0080838 00751821 */ addu $v1, $v1, $s5 /* 381AFC E008083C 00431021 */ addu $v0, $v0, $v1 /* 381B00 E0080840 AC820004 */ sw $v0, 0x4($a0) /* 381B04 E0080844 8FAA00D8 */ lw $t2, 0xD8($sp) /* 381B08 E0080848 24020001 */ addiu $v0, $zero, 0x1 /* 381B0C E008084C 15420064 */ bne $t2, $v0, .LE00809E0 /* 381B10 E0080850 24020002 */ addiu $v0, $zero, 0x2 /* 381B14 E0080854 12820062 */ beq $s4, $v0, .LE00809E0 /* 381B18 E0080858 24A20008 */ addiu $v0, $a1, 0x8 /* 381B1C E008085C AE020000 */ sw $v0, 0x0($s0) /* 381B20 E0080860 3C020900 */ lui $v0, %hi(D_090033D0_410660) /* 381B24 E0080864 244233D0 */ addiu $v0, $v0, %lo(D_090033D0_410660) /* 381B28 E0080868 ACA20004 */ sw $v0, 0x4($a1) /* 381B2C E008086C 24A20010 */ addiu $v0, $a1, 0x10 /* 381B30 E0080870 240A0040 */ addiu $t2, $zero, 0x40 /* 381B34 E0080874 ACB30000 */ sw $s3, 0x0($a1) /* 381B38 E0080878 AE020000 */ sw $v0, 0x0($s0) /* 381B3C E008087C 24A20018 */ addiu $v0, $a1, 0x18 /* 381B40 E0080880 ACBE0008 */ sw $fp, 0x8($a1) /* 381B44 E0080884 ACAA000C */ sw $t2, 0xC($a1) /* 381B48 E0080888 AE020000 */ sw $v0, 0x0($s0) /* 381B4C E008088C 3C020900 */ lui $v0, %hi(D_090034D0_410760) /* 381B50 E0080890 244234D0 */ addiu $v0, $v0, %lo(D_090034D0_410760) /* 381B54 E0080894 ACA20014 */ sw $v0, 0x14($a1) /* 381B58 E0080898 2AE2000A */ slti $v0, $s7, 0xA /* 381B5C E008089C 10400017 */ beqz $v0, .LE00808FC /* 381B60 E00808A0 ACB30010 */ sw $s3, 0x10($a1) /* 381B64 E00808A4 8FAA00DC */ lw $t2, 0xDC($sp) /* 381B68 E00808A8 15400015 */ bnez $t2, .LE0080900 /* 381B6C E00808AC 3C026666 */ lui $v0, (0x66666667 >> 16) /* 381B70 E00808B0 3C040900 */ lui $a0, %hi(D_09003470_410700) /* 381B74 E00808B4 24843470 */ addiu $a0, $a0, %lo(D_09003470_410700) /* 381B78 E00808B8 24A20020 */ addiu $v0, $a1, 0x20 /* 381B7C E00808BC AE020000 */ sw $v0, 0x0($s0) /* 381B80 E00808C0 00171080 */ sll $v0, $s7, 2 /* 381B84 E00808C4 3C0AE008 */ lui $t2, %hi(D_E0080AC0) /* 381B88 E00808C8 254A0AC0 */ addiu $t2, $t2, %lo(D_E0080AC0) /* 381B8C E00808CC 004A1021 */ addu $v0, $v0, $t2 /* 381B90 E00808D0 ACB30018 */ sw $s3, 0x18($a1) /* 381B94 E00808D4 8C430000 */ lw $v1, 0x0($v0) /* 381B98 E00808D8 24A20028 */ addiu $v0, $a1, 0x28 /* 381B9C E00808DC AE020000 */ sw $v0, 0x0($s0) /* 381BA0 E00808E0 ACB30020 */ sw $s3, 0x20($a1) /* 381BA4 E00808E4 16800003 */ bnez $s4, .LE00808F4 /* 381BA8 E00808E8 ACA3001C */ sw $v1, 0x1C($a1) /* 381BAC E00808EC 3C040900 */ lui $a0, %hi(D_09003410_4106A0) /* 381BB0 E00808F0 24843410 */ addiu $a0, $a0, %lo(D_09003410_4106A0) .LE00808F4: /* 381BB4 E00808F4 08020285 */ j .LE0080A14 /* 381BB8 E00808F8 ACA40024 */ sw $a0, 0x24($a1) .LE00808FC: /* 381BBC E00808FC 3C026666 */ lui $v0, (0x66666667 >> 16) .LE0080900: /* 381BC0 E0080900 34426667 */ ori $v0, $v0, (0x66666667 & 0xFFFF) /* 381BC4 E0080904 02E20018 */ mult $s7, $v0 /* 381BC8 E0080908 2409000A */ addiu $t1, $zero, 0xA /* 381BCC E008090C 001717C3 */ sra $v0, $s7, 31 /* 381BD0 E0080910 00005010 */ mfhi $t2 /* 381BD4 E0080914 000A1883 */ sra $v1, $t2, 2 /* 381BD8 E0080918 00621023 */ subu $v0, $v1, $v0 /* 381BDC E008091C 0040202D */ daddu $a0, $v0, $zero /* 381BE0 E0080920 00041080 */ sll $v0, $a0, 2 /* 381BE4 E0080924 00441021 */ addu $v0, $v0, $a0 /* 381BE8 E0080928 00021040 */ sll $v0, $v0, 1 /* 381BEC E008092C 8FAA00DC */ lw $t2, 0xDC($sp) /* 381BF0 E0080930 15400002 */ bnez $t2, .LE008093C /* 381BF4 E0080934 02E21023 */ subu $v0, $s7, $v0 /* 381BF8 E0080938 0080482D */ daddu $t1, $a0, $zero .LE008093C: /* 381BFC E008093C 3C080900 */ lui $t0, %hi(D_090034B0_410740) /* 381C00 E0080940 250834B0 */ addiu $t0, $t0, %lo(D_090034B0_410740) /* 381C04 E0080944 00021080 */ sll $v0, $v0, 2 /* 381C08 E0080948 3C0AE008 */ lui $t2, %hi(D_E0080AC0) /* 381C0C E008094C 254A0AC0 */ addiu $t2, $t2, %lo(D_E0080AC0) /* 381C10 E0080950 8E060000 */ lw $a2, 0x0($s0) /* 381C14 E0080954 004A1021 */ addu $v0, $v0, $t2 /* 381C18 E0080958 00C0202D */ daddu $a0, $a2, $zero /* 381C1C E008095C 24C60008 */ addiu $a2, $a2, 0x8 /* 381C20 E0080960 AE060000 */ sw $a2, 0x0($s0) /* 381C24 E0080964 AC930000 */ sw $s3, 0x0($a0) /* 381C28 E0080968 8C430000 */ lw $v1, 0x0($v0) /* 381C2C E008096C 24C20008 */ addiu $v0, $a2, 0x8 /* 381C30 E0080970 AE020000 */ sw $v0, 0x0($s0) /* 381C34 E0080974 AC830004 */ sw $v1, 0x4($a0) /* 381C38 E0080978 16800003 */ bnez $s4, .LE0080988 /* 381C3C E008097C ACD30000 */ sw $s3, 0x0($a2) /* 381C40 E0080980 3C080900 */ lui $t0, %hi(D_09003450_4106E0) /* 381C44 E0080984 25083450 */ addiu $t0, $t0, %lo(D_09003450_4106E0) .LE0080988: /* 381C48 E0080988 3C070900 */ lui $a3, %hi(D_09003490_410720) /* 381C4C E008098C 24E73490 */ addiu $a3, $a3, %lo(D_09003490_410720) /* 381C50 E0080990 00091080 */ sll $v0, $t1, 2 /* 381C54 E0080994 3C0AE008 */ lui $t2, %hi(D_E0080AC0) /* 381C58 E0080998 254A0AC0 */ addiu $t2, $t2, %lo(D_E0080AC0) /* 381C5C E008099C 8E050000 */ lw $a1, 0x0($s0) /* 381C60 E00809A0 004A1021 */ addu $v0, $v0, $t2 /* 381C64 E00809A4 ACC80004 */ sw $t0, 0x4($a2) /* 381C68 E00809A8 00A0202D */ daddu $a0, $a1, $zero /* 381C6C E00809AC 24A50008 */ addiu $a1, $a1, 0x8 /* 381C70 E00809B0 AE050000 */ sw $a1, 0x0($s0) /* 381C74 E00809B4 AC930000 */ sw $s3, 0x0($a0) /* 381C78 E00809B8 8C430000 */ lw $v1, 0x0($v0) /* 381C7C E00809BC 24A20008 */ addiu $v0, $a1, 0x8 /* 381C80 E00809C0 AE020000 */ sw $v0, 0x0($s0) /* 381C84 E00809C4 AC830004 */ sw $v1, 0x4($a0) /* 381C88 E00809C8 16800003 */ bnez $s4, .LE00809D8 /* 381C8C E00809CC ACB30000 */ sw $s3, 0x0($a1) /* 381C90 E00809D0 3C070900 */ lui $a3, %hi(D_09003430_4106C0) /* 381C94 E00809D4 24E73430 */ addiu $a3, $a3, %lo(D_09003430_4106C0) .LE00809D8: /* 381C98 E00809D8 08020285 */ j .LE0080A14 /* 381C9C E00809DC ACA70004 */ sw $a3, 0x4($a1) .LE00809E0: /* 381CA0 E00809E0 8E030000 */ lw $v1, 0x0($s0) /* 381CA4 E00809E4 3C020900 */ lui $v0, %hi(D_090033F0_410680) /* 381CA8 E00809E8 244233F0 */ addiu $v0, $v0, %lo(D_090033F0_410680) /* 381CAC E00809EC 0060202D */ daddu $a0, $v1, $zero /* 381CB0 E00809F0 24630008 */ addiu $v1, $v1, 0x8 /* 381CB4 E00809F4 AE030000 */ sw $v1, 0x0($s0) /* 381CB8 E00809F8 AC820004 */ sw $v0, 0x4($a0) /* 381CBC E00809FC 24620008 */ addiu $v0, $v1, 0x8 /* 381CC0 E0080A00 AC930000 */ sw $s3, 0x0($a0) /* 381CC4 E0080A04 240A0040 */ addiu $t2, $zero, 0x40 /* 381CC8 E0080A08 AE020000 */ sw $v0, 0x0($s0) /* 381CCC E0080A0C AC7E0000 */ sw $fp, 0x0($v1) /* 381CD0 E0080A10 AC6A0004 */ sw $t2, 0x4($v1) .LE0080A14: /* 381CD4 E0080A14 8E020000 */ lw $v0, 0x0($s0) /* 381CD8 E0080A18 0040182D */ daddu $v1, $v0, $zero /* 381CDC E0080A1C 24420008 */ addiu $v0, $v0, 0x8 /* 381CE0 E0080A20 240A0040 */ addiu $t2, $zero, 0x40 /* 381CE4 E0080A24 AE020000 */ sw $v0, 0x0($s0) /* 381CE8 E0080A28 AC7E0000 */ sw $fp, 0x0($v1) /* 381CEC E0080A2C AC6A0004 */ sw $t2, 0x4($v1) .LE0080A30: /* 381CF0 E0080A30 8FAA00D8 */ lw $t2, 0xD8($sp) /* 381CF4 E0080A34 254A0001 */ addiu $t2, $t2, 0x1 /* 381CF8 E0080A38 AFAA00D8 */ sw $t2, 0xD8($sp) /* 381CFC E0080A3C 8FAA0118 */ lw $t2, 0x118($sp) /* 381D00 E0080A40 8D420008 */ lw $v0, 0x8($t2) /* 381D04 E0080A44 8FAA00D8 */ lw $t2, 0xD8($sp) /* 381D08 E0080A48 0142102A */ slt $v0, $t2, $v0 /* 381D0C E0080A4C 1440FEF2 */ bnez $v0, .LE0080618 /* 381D10 E0080A50 26310048 */ addiu $s1, $s1, 0x48 .LE0080A54: /* 381D14 E0080A54 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 381D18 E0080A58 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 381D1C E0080A5C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 381D20 E0080A60 8C620000 */ lw $v0, 0x0($v1) /* 381D24 E0080A64 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 381D28 E0080A68 0040202D */ daddu $a0, $v0, $zero /* 381D2C E0080A6C 24420008 */ addiu $v0, $v0, 0x8 /* 381D30 E0080A70 AC620000 */ sw $v0, 0x0($v1) /* 381D34 E0080A74 24020040 */ addiu $v0, $zero, 0x40 /* 381D38 E0080A78 AC850000 */ sw $a1, 0x0($a0) /* 381D3C E0080A7C AC820004 */ sw $v0, 0x4($a0) /* 381D40 E0080A80 8FBF010C */ lw $ra, 0x10C($sp) /* 381D44 E0080A84 8FBE0108 */ lw $fp, 0x108($sp) /* 381D48 E0080A88 8FB70104 */ lw $s7, 0x104($sp) /* 381D4C E0080A8C 8FB60100 */ lw $s6, 0x100($sp) /* 381D50 E0080A90 8FB500FC */ lw $s5, 0xFC($sp) /* 381D54 E0080A94 8FB400F8 */ lw $s4, 0xF8($sp) /* 381D58 E0080A98 8FB300F4 */ lw $s3, 0xF4($sp) /* 381D5C E0080A9C 8FB200F0 */ lw $s2, 0xF0($sp) /* 381D60 E0080AA0 8FB100EC */ lw $s1, 0xEC($sp) /* 381D64 E0080AA4 8FB000E8 */ lw $s0, 0xE8($sp) /* 381D68 E0080AA8 D7B40110 */ ldc1 $f20, 0x110($sp) /* 381D6C E0080AAC 03E00008 */ jr $ra /* 381D70 E0080AB0 27BD0118 */ addiu $sp, $sp, 0x118 /* 381D74 E0080AB4 00000000 */ nop /* 381D78 E0080AB8 00000000 */ nop /* 381D7C E0080ABC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E0080448(EffectInstance* effect) { RecoverFXData* part = ((EffectInstance*)effect)->data.recover; s32 i; s32 unk_00; s32 unk_40; s32 unk_44 = part->unk_44; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp98); shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); unk_00 = part->unk_00; unk_40 = part->unk_40; part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_34 <= 0) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, part->unk_28); if (part->unk_28 == 255) { gDPSetRenderMode(gMainGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)); gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0); } gSPDisplayList(gMainGfxPos++, (unk_00 == 0 || unk_00 == 2) ? (unk_44 == 0 ? D_09003200_385000 : D_09003298_385098) : D_09003330_385130); shim_guTranslateF(sp18, part->unk_04 + part->unk_24, part->unk_08, part->unk_0C); shim_guScaleF(sp58, part->unk_38, part->unk_3C, 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); shim_guRotateF(sp18, part->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); if (i == 1 && unk_00 != 2) { gSPDisplayList(gMainGfxPos++, D_090033D0_3851D0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090034D0_3852D0); if (unk_40 < 0xA && unk_44 == 0) { gSPDisplayList(gMainGfxPos++, D_E0080AC0[unk_40]); gSPDisplayList(gMainGfxPos++, unk_00 == 0 ? D_09003410_385210 : D_09003470_385270); } else { s32 ones = unk_40 % 10; s32 tens = unk_44 == 0 ? (unk_40 / 10) : 10; gSPDisplayList(gMainGfxPos++, D_E0080AC0[ones]); gSPDisplayList(gMainGfxPos++, unk_00 == 0 ? D_09003450_385250 : D_090034B0_3852B0); gSPDisplayList(gMainGfxPos++, D_E0080AC0[tens]); gSPDisplayList(gMainGfxPos++, unk_00 == 0 ? D_09003430_385230 : D_09003490_385290); } } else { gSPDisplayList(gMainGfxPos++, D_090033F0_3851F0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel get_msg_properties /* BC668 80125F68 27BDFEB0 */ addiu $sp, $sp, -0x150 /* BC66C 80125F6C F7B40148 */ sdc1 $f20, 0x148($sp) /* BC670 80125F70 3C013F80 */ lui $at, (0x3F800000 >> 16) /* BC674 80125F74 4481A000 */ mtc1 $at, $f20 /* BC678 80125F78 AFB3012C */ sw $s3, 0x12C($sp) /* BC67C 80125F7C 97B3016E */ lhu $s3, 0x16E($sp) /* BC680 80125F80 AFB00120 */ sw $s0, 0x120($sp) /* BC684 80125F84 0080802D */ daddu $s0, $a0, $zero /* BC688 80125F88 AFB20128 */ sw $s2, 0x128($sp) /* BC68C 80125F8C 0000902D */ daddu $s2, $zero, $zero /* BC690 80125F90 AFB7013C */ sw $s7, 0x13C($sp) /* BC694 80125F94 0240B82D */ daddu $s7, $s2, $zero /* BC698 80125F98 AFBF0144 */ sw $ra, 0x144($sp) /* BC69C 80125F9C AFBE0140 */ sw $fp, 0x140($sp) /* BC6A0 80125FA0 AFB60138 */ sw $s6, 0x138($sp) /* BC6A4 80125FA4 AFB50134 */ sw $s5, 0x134($sp) /* BC6A8 80125FA8 AFB40130 */ sw $s4, 0x130($sp) /* BC6AC 80125FAC AFB10124 */ sw $s1, 0x124($sp) /* BC6B0 80125FB0 AFA50154 */ sw $a1, 0x154($sp) /* BC6B4 80125FB4 AFA60158 */ sw $a2, 0x158($sp) /* BC6B8 80125FB8 AFA7015C */ sw $a3, 0x15C($sp) /* BC6BC 80125FBC A7A000E6 */ sh $zero, 0xE6($sp) /* BC6C0 80125FC0 A7A000EE */ sh $zero, 0xEE($sp) /* BC6C4 80125FC4 AFA000F0 */ sw $zero, 0xF0($sp) /* BC6C8 80125FC8 A7A000FE */ sh $zero, 0xFE($sp) /* BC6CC 80125FCC A7A00106 */ sh $zero, 0x106($sp) /* BC6D0 80125FD0 A7A00108 */ sh $zero, 0x108($sp) /* BC6D4 80125FD4 1200011A */ beqz $s0, .L80126440 /* BC6D8 80125FD8 A7A00116 */ sh $zero, 0x116($sp) /* BC6DC 80125FDC 0600000A */ bltz $s0, .L80126008 /* BC6E0 80125FE0 0200882D */ daddu $s1, $s0, $zero /* BC6E4 80125FE4 0C00AB0A */ jal general_heap_malloc /* BC6E8 80125FE8 24040400 */ addiu $a0, $zero, 0x400 /* BC6EC 80125FEC 0200202D */ daddu $a0, $s0, $zero /* BC6F0 80125FF0 AFA200F0 */ sw $v0, 0xF0($sp) /* BC6F4 80125FF4 0C049601 */ jal dma_load_msg /* BC6F8 80125FF8 0040282D */ daddu $a1, $v0, $zero /* BC6FC 80125FFC 8FB100F0 */ lw $s1, 0xF0($sp) /* BC700 80126000 08049803 */ j .L8012600C /* BC704 80126004 32620001 */ andi $v0, $s3, 0x1 .L80126008: /* BC708 80126008 32620001 */ andi $v0, $s3, 0x1 .L8012600C: /* BC70C 8012600C 10400002 */ beqz $v0, .L80126018 /* BC710 80126010 24080001 */ addiu $t0, $zero, 0x1 /* BC714 80126014 A7A800EE */ sh $t0, 0xEE($sp) .L80126018: /* BC718 80126018 0000802D */ daddu $s0, $zero, $zero /* BC71C 8012601C 0200A02D */ daddu $s4, $s0, $zero /* BC720 80126020 0200982D */ daddu $s3, $s0, $zero /* BC724 80126024 0200B02D */ daddu $s6, $s0, $zero /* BC728 80126028 0200A82D */ daddu $s5, $s0, $zero /* BC72C 8012602C 241E0001 */ addiu $fp, $zero, 0x1 /* BC730 80126030 27A90018 */ addiu $t1, $sp, 0x18 /* BC734 80126034 27A80058 */ addiu $t0, $sp, 0x58 /* BC738 80126038 AFA000D8 */ sw $zero, 0xD8($sp) /* BC73C 8012603C AFA9011C */ sw $t1, 0x11C($sp) /* BC740 80126040 AFA80118 */ sw $t0, 0x118($sp) /* BC744 80126044 02301021 */ addu $v0, $s1, $s0 .L80126048: /* BC748 80126048 90440000 */ lbu $a0, 0x0($v0) /* BC74C 8012604C 2483FF10 */ addiu $v1, $a0, -0xF0 /* BC750 80126050 2C620010 */ sltiu $v0, $v1, 0x10 /* BC754 80126054 10400092 */ beqz $v0, .L801262A0 /* BC758 80126058 26100001 */ addiu $s0, $s0, 0x1 /* BC75C 8012605C 00031080 */ sll $v0, $v1, 2 /* BC760 80126060 3C018015 */ lui $at, %hi(jtbl_80150588) glabel func_80126064 /* BC764 80126064 00220821 */ addu $at, $at, $v0 /* BC768 80126068 8C220588 */ lw $v0, %lo(jtbl_80150588)($at) /* BC76C 8012606C 00400008 */ jr $v0 /* BC770 80126070 00000000 */ nop glabel .L80126074 /* BC774 80126074 2484FF0D */ addiu $a0, $a0, -0xF3 /* BC778 80126078 080498BA */ j .L801262E8 glabel func_8012607C /* BC77C 8012607C A7A400E6 */ sh $a0, 0xE6($sp) glabel .L80126080 /* BC780 80126080 12C00099 */ beqz $s6, .L801262E8 /* BC784 80126084 32E2FFFF */ andi $v0, $s7, 0xFFFF /* BC788 80126088 00021040 */ sll $v0, $v0, 1 /* BC78C 8012608C 03A21021 */ addu $v0, $sp, $v0 /* BC790 80126090 A4560098 */ sh $s6, 0x98($v0) glabel func_80126094 /* BC794 80126094 26F70001 */ addiu $s7, $s7, 0x1 /* BC798 80126098 32E2FFFF */ andi $v0, $s7, 0xFFFF /* BC79C 8012609C 2C420020 */ sltiu $v0, $v0, 0x20 /* BC7A0 801260A0 50400001 */ beql $v0, $zero, .L801260A8 /* BC7A4 801260A4 24140001 */ addiu $s4, $zero, 0x1 .L801260A8: /* BC7A8 801260A8 080498BA */ j .L801262E8 glabel func_801260AC /* BC7AC 801260AC 0000B02D */ daddu $s6, $zero, $zero glabel .L801260B0 /* BC7B0 801260B0 3243FFFF */ andi $v1, $s2, 0xFFFF /* BC7B4 801260B4 26520001 */ addiu $s2, $s2, 0x1 /* BC7B8 801260B8 8FA9011C */ lw $t1, 0x11C($sp) /* BC7BC 801260BC 00031840 */ sll $v1, $v1, 1 /* BC7C0 801260C0 01231021 */ addu $v0, $t1, $v1 /* BC7C4 801260C4 A4530000 */ sh $s3, 0x0($v0) /* BC7C8 801260C8 3242FFFF */ andi $v0, $s2, 0xFFFF /* BC7CC 801260CC 8FA80118 */ lw $t0, 0x118($sp) /* BC7D0 801260D0 2C420020 */ sltiu $v0, $v0, 0x20 /* BC7D4 801260D4 01031821 */ addu $v1, $t0, $v1 /* BC7D8 801260D8 14400002 */ bnez $v0, .L801260E4 /* BC7DC 801260DC A4750000 */ sh $s5, 0x0($v1) /* BC7E0 801260E0 24140001 */ addiu $s4, $zero, 0x1 .L801260E4: /* BC7E4 801260E4 0000982D */ daddu $s3, $zero, $zero /* BC7E8 801260E8 0260A82D */ daddu $s5, $s3, $zero /* BC7EC 801260EC 080498BA */ j .L801262E8 /* BC7F0 801260F0 241E0001 */ addiu $fp, $zero, 0x1 glabel .L801260F4 /* BC7F4 801260F4 02301021 */ addu $v0, $s1, $s0 /* BC7F8 801260F8 90420000 */ lbu $v0, 0x0($v0) /* BC7FC 801260FC 2443FFFF */ addiu $v1, $v0, -0x1 /* BC800 80126100 2C62000B */ sltiu $v0, $v1, 0xB /* BC804 80126104 10400078 */ beqz $v0, .L801262E8 /* BC808 80126108 26100001 */ addiu $s0, $s0, 0x1 /* BC80C 8012610C 00031080 */ sll $v0, $v1, 2 /* BC810 80126110 3C018015 */ lui $at, %hi(jtbl_801505C8) /* BC814 80126114 00220821 */ addu $at, $at, $v0 /* BC818 80126118 8C2205C8 */ lw $v0, %lo(jtbl_801505C8)($at) /* BC81C 8012611C 00400008 */ jr $v0 /* BC820 80126120 00000000 */ nop glabel .L80126124 /* BC824 80126124 080498BA */ j .L801262E8 /* BC828 80126128 26100004 */ addiu $s0, $s0, 0x4 glabel .L8012612C /* BC82C 8012612C 3243FFFF */ andi $v1, $s2, 0xFFFF /* BC830 80126130 26520001 */ addiu $s2, $s2, 0x1 /* BC834 80126134 8FA9011C */ lw $t1, 0x11C($sp) /* BC838 80126138 00031840 */ sll $v1, $v1, 1 /* BC83C 8012613C 01231021 */ addu $v0, $t1, $v1 /* BC840 80126140 A4530000 */ sh $s3, 0x0($v0) /* BC844 80126144 8FA80118 */ lw $t0, 0x118($sp) /* BC848 80126148 24140001 */ addiu $s4, $zero, 0x1 /* BC84C 8012614C 01031821 */ addu $v1, $t0, $v1 /* BC850 80126150 080498BA */ j .L801262E8 /* BC854 80126154 A4750000 */ sh $s5, 0x0($v1) glabel .L80126158 /* BC858 80126158 02301021 */ addu $v0, $s1, $s0 /* BC85C 8012615C 90430000 */ lbu $v1, 0x0($v0) /* BC860 80126160 2C620030 */ sltiu $v0, $v1, 0x30 /* BC864 80126164 1040001C */ beqz $v0, .L801261D8 /* BC868 80126168 26100001 */ addiu $s0, $s0, 0x1 /* BC86C 8012616C 00031080 */ sll $v0, $v1, 2 /* BC870 80126170 3C018015 */ lui $at, %hi(jtbl_801505F8) /* BC874 80126174 00220821 */ addu $at, $at, $v0 /* BC878 80126178 8C2205F8 */ lw $v0, %lo(jtbl_801505F8)($at) /* BC87C 8012617C 00400008 */ jr $v0 /* BC880 80126180 00000000 */ nop glabel .L80126184 /* BC884 80126184 02301021 */ addu $v0, $s1, $s0 /* BC888 80126188 90420000 */ lbu $v0, 0x0($v0) /* BC88C 8012618C 26100001 */ addiu $s0, $s0, 0x1 /* BC890 80126190 080498BA */ j .L801262E8 /* BC894 80126194 A7A200EE */ sh $v0, 0xEE($sp) glabel .L80126198 /* BC898 80126198 26100001 */ addiu $s0, $s0, 0x1 glabel .L8012619C /* BC89C 8012619C 26100004 */ addiu $s0, $s0, 0x4 glabel .L801261A0 /* BC8A0 801261A0 26100001 */ addiu $s0, $s0, 0x1 glabel .L801261A4 /* BC8A4 801261A4 08049898 */ j .L80126260 /* BC8A8 801261A8 26100001 */ addiu $s0, $s0, 0x1 glabel .L801261AC /* BC8AC 801261AC 02301021 */ addu $v0, $s1, $s0 /* BC8B0 801261B0 90420000 */ lbu $v0, 0x0($v0) /* BC8B4 801261B4 5040002A */ beql $v0, $zero, .L80126260 /* BC8B8 801261B8 24140001 */ addiu $s4, $zero, 0x1 /* BC8BC 801261BC 080498BA */ j .L801262E8 /* BC8C0 801261C0 26100001 */ addiu $s0, $s0, 0x1 glabel .L801261C4 /* BC8C4 801261C4 02301021 */ addu $v0, $s1, $s0 /* BC8C8 801261C8 90430000 */ lbu $v1, 0x0($v0) /* BC8CC 801261CC 240200FD */ addiu $v0, $zero, 0xFD /* BC8D0 801261D0 14620046 */ bne $v1, $v0, .L801262EC /* BC8D4 801261D4 328200FF */ andi $v0, $s4, 0xFF glabel .L801261D8 /* BC8D8 801261D8 080498BA */ j .L801262E8 /* BC8DC 801261DC 24140001 */ addiu $s4, $zero, 0x1 glabel .L801261E0 /* BC8E0 801261E0 02111021 */ addu $v0, $s0, $s1 /* BC8E4 801261E4 90420001 */ lbu $v0, 0x1($v0) /* BC8E8 801261E8 3C013D80 */ lui $at, (0x3D800000 >> 16) /* BC8EC 801261EC 44810000 */ mtc1 $at, $f0 /* BC8F0 801261F0 3043000F */ andi $v1, $v0, 0xF /* BC8F4 801261F4 44831000 */ mtc1 $v1, $f2 /* BC8F8 801261F8 00000000 */ nop /* BC8FC 801261FC 468010A0 */ cvt.s.w $f2, $f2 /* BC900 80126200 46001082 */ mul.s $f2, $f2, $f0 /* BC904 80126204 00000000 */ nop /* BC908 80126208 26100002 */ addiu $s0, $s0, 0x2 /* BC90C 8012620C 00021102 */ srl $v0, $v0, 4 /* BC910 80126210 44820000 */ mtc1 $v0, $f0 /* BC914 80126214 00000000 */ nop /* BC918 80126218 46800020 */ cvt.s.w $f0, $f0 /* BC91C 8012621C 080498BA */ j .L801262E8 /* BC920 80126220 46020500 */ add.s $f20, $f0, $f2 glabel .L80126224 /* BC924 80126224 3C013F80 */ lui $at, (0x3F800000 >> 16) /* BC928 80126228 4481A000 */ mtc1 $at, $f20 /* BC92C 8012622C 080498BB */ j .L801262EC /* BC930 80126230 328200FF */ andi $v0, $s4, 0xFF glabel .L80126234 /* BC934 80126234 02301021 */ addu $v0, $s1, $s0 /* BC938 80126238 90430000 */ lbu $v1, 0x0($v0) /* BC93C 8012623C 2C62000F */ sltiu $v0, $v1, 0xF /* BC940 80126240 10400029 */ beqz $v0, .L801262E8 /* BC944 80126244 26100001 */ addiu $s0, $s0, 0x1 /* BC948 80126248 00031080 */ sll $v0, $v1, 2 /* BC94C 8012624C 3C018015 */ lui $at, %hi(jtbl_801506B8) /* BC950 80126250 00220821 */ addu $at, $at, $v0 /* BC954 80126254 8C2206B8 */ lw $v0, %lo(jtbl_801506B8)($at) /* BC958 80126258 00400008 */ jr $v0 /* BC95C 8012625C 00000000 */ nop glabel .L80126260 /* BC960 80126260 080498BA */ j .L801262E8 /* BC964 80126264 26100001 */ addiu $s0, $s0, 0x1 glabel .L80126268 /* BC968 80126268 02301021 */ addu $v0, $s1, $s0 /* BC96C 8012626C 26100001 */ addiu $s0, $s0, 0x1 /* BC970 80126270 90440000 */ lbu $a0, 0x0($v0) /* BC974 80126274 0000282D */ daddu $a1, $zero, $zero /* BC978 80126278 3C098015 */ lui $t1, %hi(gMessageMsgVars) /* BC97C 8012627C 25295C38 */ addiu $t1, $t1, %lo(gMessageMsgVars) /* BC980 80126280 00042140 */ sll $a0, $a0, 5 /* BC984 80126284 0C04991D */ jal get_msg_width /* BC988 80126288 00892021 */ addu $a0, $a0, $t1 /* BC98C 8012628C 080498BA */ j .L801262E8 /* BC990 80126290 02629821 */ addu $s3, $s3, $v0 glabel .L80126294 /* BC994 80126294 97A80116 */ lhu $t0, 0x116($sp) /* BC998 80126298 25080001 */ addiu $t0, $t0, 0x1 /* BC99C 8012629C A7A80116 */ sh $t0, 0x116($sp) glabel .L801262A0 /* BC9A0 801262A0 33C2FFFF */ andi $v0, $fp, 0xFFFF /* BC9A4 801262A4 10400006 */ beqz $v0, .L801262C0 /* BC9A8 801262A8 308400FF */ andi $a0, $a0, 0xFF /* BC9AC 801262AC 8FA900D8 */ lw $t1, 0xD8($sp) /* BC9B0 801262B0 25290001 */ addiu $t1, $t1, 0x1 /* BC9B4 801262B4 AFA900D8 */ sw $t1, 0xD8($sp) /* BC9B8 801262B8 26D60001 */ addiu $s6, $s6, 0x1 /* BC9BC 801262BC 0000F02D */ daddu $fp, $zero, $zero .L801262C0: /* BC9C0 801262C0 26B50001 */ addiu $s5, $s5, 0x1 /* BC9C4 801262C4 97A800EE */ lhu $t0, 0xEE($sp) /* BC9C8 801262C8 4407A000 */ mfc1 $a3, $f20 /* BC9CC 801262CC 97A600E6 */ lhu $a2, 0xE6($sp) /* BC9D0 801262D0 24020001 */ addiu $v0, $zero, 0x1 /* BC9D4 801262D4 AFA00010 */ sw $zero, 0x10($sp) /* BC9D8 801262D8 AFA20014 */ sw $v0, 0x14($sp) /* BC9DC 801262DC 0C049721 */ jal msg_get_print_char_width /* BC9E0 801262E0 0100282D */ daddu $a1, $t0, $zero /* BC9E4 801262E4 02629821 */ addu $s3, $s3, $v0 glabel .L801262E8 /* BC9E8 801262E8 328200FF */ andi $v0, $s4, 0xFF .L801262EC: /* BC9EC 801262EC 1040FF56 */ beqz $v0, .L80126048 /* BC9F0 801262F0 02301021 */ addu $v0, $s1, $s0 /* BC9F4 801262F4 8FA900F0 */ lw $t1, 0xF0($sp) /* BC9F8 801262F8 11200004 */ beqz $t1, .L8012630C /* BC9FC 801262FC 3242FFFF */ andi $v0, $s2, 0xFFFF /* BCA00 80126300 0C00AB1E */ jal general_heap_free /* BCA04 80126304 0120202D */ daddu $a0, $t1, $zero /* BCA08 80126308 3242FFFF */ andi $v0, $s2, 0xFFFF .L8012630C: /* BCA0C 8012630C 10400013 */ beqz $v0, .L8012635C /* BCA10 80126310 0000802D */ daddu $s0, $zero, $zero /* BCA14 80126314 0040182D */ daddu $v1, $v0, $zero /* BCA18 80126318 27A60058 */ addiu $a2, $sp, 0x58 /* BCA1C 8012631C 27A50018 */ addiu $a1, $sp, 0x18 .L80126320: /* BCA20 80126320 94A40000 */ lhu $a0, 0x0($a1) /* BCA24 80126324 97A800FE */ lhu $t0, 0xFE($sp) /* BCA28 80126328 0104102B */ sltu $v0, $t0, $a0 /* BCA2C 8012632C 54400001 */ bnel $v0, $zero, .L80126334 /* BCA30 80126330 A7A400FE */ sh $a0, 0xFE($sp) .L80126334: /* BCA34 80126334 94C40000 */ lhu $a0, 0x0($a2) /* BCA38 80126338 97A90106 */ lhu $t1, 0x106($sp) /* BCA3C 8012633C 0124102B */ sltu $v0, $t1, $a0 /* BCA40 80126340 54400001 */ bnel $v0, $zero, .L80126348 /* BCA44 80126344 A7A40106 */ sh $a0, 0x106($sp) .L80126348: /* BCA48 80126348 24C60002 */ addiu $a2, $a2, 0x2 /* BCA4C 8012634C 26100001 */ addiu $s0, $s0, 0x1 /* BCA50 80126350 0203102A */ slt $v0, $s0, $v1 /* BCA54 80126354 1440FFF2 */ bnez $v0, .L80126320 /* BCA58 80126358 24A50002 */ addiu $a1, $a1, 0x2 .L8012635C: /* BCA5C 8012635C 32E2FFFF */ andi $v0, $s7, 0xFFFF /* BCA60 80126360 14400003 */ bnez $v0, .L80126370 /* BCA64 80126364 00000000 */ nop /* BCA68 80126368 080498E9 */ j .L801263A4 /* BCA6C 8012636C A7B60108 */ sh $s6, 0x108($sp) .L80126370: /* BCA70 80126370 1040000C */ beqz $v0, .L801263A4 /* BCA74 80126374 0000802D */ daddu $s0, $zero, $zero /* BCA78 80126378 0040282D */ daddu $a1, $v0, $zero /* BCA7C 8012637C 27A40098 */ addiu $a0, $sp, 0x98 .L80126380: /* BCA80 80126380 94830000 */ lhu $v1, 0x0($a0) /* BCA84 80126384 97A20108 */ lhu $v0, 0x108($sp) /* BCA88 80126388 0043102B */ sltu $v0, $v0, $v1 /* BCA8C 8012638C 54400001 */ bnel $v0, $zero, .L80126394 /* BCA90 80126390 A7A30108 */ sh $v1, 0x108($sp) .L80126394: /* BCA94 80126394 26100001 */ addiu $s0, $s0, 0x1 /* BCA98 80126398 0205102A */ slt $v0, $s0, $a1 /* BCA9C 8012639C 1440FFF8 */ bnez $v0, .L80126380 /* BCAA0 801263A0 24840002 */ addiu $a0, $a0, 0x2 .L801263A4: /* BCAA4 801263A4 8FA80158 */ lw $t0, 0x158($sp) /* BCAA8 801263A8 11000003 */ beqz $t0, .L801263B8 /* BCAAC 801263AC 00000000 */ nop /* BCAB0 801263B0 97A900FE */ lhu $t1, 0xFE($sp) /* BCAB4 801263B4 AD090000 */ sw $t1, 0x0($t0) .L801263B8: /* BCAB8 801263B8 8FA80154 */ lw $t0, 0x154($sp) /* BCABC 801263BC 1100000C */ beqz $t0, .L801263F0 /* BCAC0 801263C0 00000000 */ nop /* BCAC4 801263C4 97A900EE */ lhu $t1, 0xEE($sp) /* BCAC8 801263C8 00091080 */ sll $v0, $t1, 2 /* BCACC 801263CC 3C01802F */ lui $at, %hi(gMsgCharsets) /* BCAD0 801263D0 00220821 */ addu $at, $at, $v0 /* BCAD4 801263D4 8C22B5A8 */ lw $v0, %lo(gMsgCharsets)($at) /* BCAD8 801263D8 8FA800D8 */ lw $t0, 0xD8($sp) /* BCADC 801263DC 90420003 */ lbu $v0, 0x3($v0) /* BCAE0 801263E0 01020018 */ mult $t0, $v0 /* BCAE4 801263E4 8FA90154 */ lw $t1, 0x154($sp) /* BCAE8 801263E8 00004012 */ mflo $t0 /* BCAEC 801263EC AD280000 */ sw $t0, 0x0($t1) .L801263F0: /* BCAF0 801263F0 8FA9015C */ lw $t1, 0x15C($sp) /* BCAF4 801263F4 11200003 */ beqz $t1, .L80126404 /* BCAF8 801263F8 00000000 */ nop /* BCAFC 801263FC 97A80106 */ lhu $t0, 0x106($sp) /* BCB00 80126400 AD280000 */ sw $t0, 0x0($t1) .L80126404: /* BCB04 80126404 8FA90160 */ lw $t1, 0x160($sp) /* BCB08 80126408 11200003 */ beqz $t1, .L80126418 /* BCB0C 8012640C 00000000 */ nop /* BCB10 80126410 8FA800D8 */ lw $t0, 0xD8($sp) /* BCB14 80126414 AD280000 */ sw $t0, 0x0($t1) .L80126418: /* BCB18 80126418 8FA90164 */ lw $t1, 0x164($sp) /* BCB1C 8012641C 11200003 */ beqz $t1, .L8012642C /* BCB20 80126420 00000000 */ nop /* BCB24 80126424 97A20108 */ lhu $v0, 0x108($sp) /* BCB28 80126428 AD220000 */ sw $v0, 0x0($t1) .L8012642C: /* BCB2C 8012642C 8FA80168 */ lw $t0, 0x168($sp) /* BCB30 80126430 11000003 */ beqz $t0, .L80126440 /* BCB34 80126434 00000000 */ nop /* BCB38 80126438 97A20116 */ lhu $v0, 0x116($sp) /* BCB3C 8012643C AD020000 */ sw $v0, 0x0($t0) .L80126440: /* BCB40 80126440 8FBF0144 */ lw $ra, 0x144($sp) /* BCB44 80126444 8FBE0140 */ lw $fp, 0x140($sp) /* BCB48 80126448 8FB7013C */ lw $s7, 0x13C($sp) /* BCB4C 8012644C 8FB60138 */ lw $s6, 0x138($sp) /* BCB50 80126450 8FB50134 */ lw $s5, 0x134($sp) /* BCB54 80126454 8FB40130 */ lw $s4, 0x130($sp) /* BCB58 80126458 8FB3012C */ lw $s3, 0x12C($sp) /* BCB5C 8012645C 8FB20128 */ lw $s2, 0x128($sp) /* BCB60 80126460 8FB10124 */ lw $s1, 0x124($sp) /* BCB64 80126464 8FB00120 */ lw $s0, 0x120($sp) /* BCB68 80126468 D7B40148 */ ldc1 $f20, 0x148($sp) /* BCB6C 8012646C 03E00008 */ jr $ra /* BCB70 80126470 27BD0150 */ addiu $sp, $sp, 0x150 ### DECOMPILED C INSTRUCTIONS: void get_msg_properties(s32 msgID, s32* height, s32* width, s32* maxLineChars, s32* numLines, s32* maxLinesPerPage, s32* numSpaces, u16 charset) { u8* message; s32 i; u16 pageCount; s32 linesOnPage; u8 stop; s32 lineWidth; s32 charCount; u16 lineIndex; s32 msgStyle; s32 functionCode; u8 packedScaleY; f32 scale; s32 temp; u16 lineWidths[32]; u16 lineCharNumbers[32]; u16 linesPerPage[32]; s32 lineCount; u16 varIndex; u16 font; u8* buffer; u16 maxLineWidth; u16 maxCharsPerLine; u16 maxLinesOnPage; u16 spaceCount; u16 endl; u8 c; u8 prevChar; scale = 1.0f; c = 0; lineIndex = 0; pageCount = 0; varIndex = 0; font = 0; buffer = NULL; maxLineWidth = 0; maxCharsPerLine = 0; maxLinesOnPage = 0; spaceCount = 0; if (msgID == MSG_NONE) { return; } if (msgID >= 0) { buffer = general_heap_malloc(0x400); dma_load_msg(msgID, buffer); message = buffer; } else { message = (u8*)msgID; } if (charset & 1) { font = 1; } i = 0; stop = FALSE; lineWidth = 0; linesOnPage = 0; charCount = 0; endl = TRUE; lineCount = 0; do { prevChar = c; c = message[i++]; switch (c) { case MSG_CHAR_READ_VARIANT0: case MSG_CHAR_READ_VARIANT1: case MSG_CHAR_READ_VARIANT2: case MSG_CHAR_READ_VARIANT3: varIndex = c - MSG_CHAR_READ_VARIANT0; break; case MSG_CHAR_READ_PAUSE: i++; break; case MSG_CHAR_READ_WAIT: case MSG_CHAR_READ_NEXT: if (linesOnPage != 0) { linesPerPage[pageCount] = linesOnPage; pageCount++; if (pageCount >= 32) { stop = 1; } linesOnPage = 0; } break; case MSG_CHAR_READ_ENDL: lineWidths[lineIndex] = lineWidth; lineCharNumbers[lineIndex] = charCount; lineIndex++; if (lineIndex >= 32) { stop = 1; } lineWidth = 0; charCount = 0; endl = TRUE; break; case MSG_CHAR_READ_STYLE: msgStyle = message[i++]; switch (msgStyle) { case MSG_STYLE_CHOICE: i += 4; break; case MSG_STYLE_POSTCARD: i++; break; case MSG_STYLE_RIGHT: case MSG_STYLE_LEFT: case MSG_STYLE_CENTER: case MSG_STYLE_TATTLE: case MSG_STYLE_INSPECT: case MSG_STYLE_SIGN: case MSG_STYLE_LAMPPOST: case MSG_STYLE_POPUP: case MSG_STYLE_B: break; } break; case MSG_CHAR_READ_END: lineWidths[lineIndex] = lineWidth; lineCharNumbers[lineIndex] = charCount; lineIndex++; stop = TRUE; break; case MSG_CHAR_READ_FUNCTION: functionCode = message[i++]; switch (functionCode) { case MSG_READ_FUNC_FONT: font = message[i++]; break; case MSG_READ_FUNC_RESET_GFX: case MSG_READ_FUNC_NO_SKIP: case MSG_READ_FUNC_INPUT_OFF: case MSG_READ_FUNC_INPUT_ON: case MSG_READ_FUNC_DELAY_OFF: case MSG_READ_FUNC_DELAY_ON: case MSG_READ_FUNC_SAVE_POS: case MSG_READ_FUNC_RESTORE_POS: case MSG_READ_FUNC_SAVE_COLOR: case MSG_READ_FUNC_RESTORE_COLOR: case MSG_READ_FUNC_ENABLE_CDOWN_NEXT: break; default: stop = TRUE; break; case MSG_READ_FUNC_CUSTOM_VOICE: i++; // fallthrough temp = 4; case MSG_READ_FUNC_IMAGE: i += temp; // fallthrough case MSG_READ_FUNC_ANIM_SPRITE: case MSG_READ_FUNC_ANIM_DELAY: i++; // fallthrough case MSG_READ_FUNC_SPEED: case MSG_READ_FUNC_SET_X: case MSG_READ_FUNC_ANIM_LOOP: i++; // fallthrough case MSG_READ_FUNC_COLOR: case MSG_READ_FUNC_SPACING: case MSG_READ_FUNC_SCROLL: case MSG_READ_FUNC_SET_Y: case MSG_READ_FUNC_RIGHT: case MSG_READ_FUNC_DOWN: case MSG_READ_FUNC_UP: case MSG_READ_FUNC_INLINE_IMAGE: case MSG_READ_FUNC_ITEM_ICON: case MSG_READ_FUNC_HIDE_IMAGE: case MSG_READ_FUNC_ANIM_DONE: case MSG_READ_FUNC_CURSOR: case MSG_READ_FUNC_END_CHOICE: case MSG_READ_FUNC_SET_CANCEL: case MSG_READ_FUNC_OPTION: case MSG_READ_FUNC_END_FX: case MSG_READ_FUNC_SET_REWIND: case MSG_READ_FUNC_VOICE: i++; break; case MSG_READ_FUNC_CENTER_X: if (message[i] == 0) { stop = TRUE; } i++; break; case MSG_READ_FUNC_YIELD: if (message[i] == MSG_CHAR_READ_END) { stop = TRUE; } break; case MSG_READ_FUNC_SIZE: packedScaleY = message[i + 1]; i += 2; scale = (f32)(packedScaleY >> 4) + ((packedScaleY & 0xF) * 0.0625f); break; case MSG_READ_FUNC_SIZE_RESET: scale = 1.0f; break; case MSG_READ_FUNC_START_FX: switch (message[i++]) { case MSG_FX_STATIC: case MSG_FX_BLUR: case MSG_FX_DITHER_FADE: i++; break; 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: break; } break; case MSG_READ_FUNC_VAR: lineWidth += get_msg_width((s32)gMessageMsgVars[message[i++]], 0); break; } break; case MSG_CHAR_READ_UNK_CHAR_FA: break; case MSG_CHAR_READ_SPACE: case MSG_CHAR_READ_FULL_SPACE: case MSG_CHAR_READ_HALF_SPACE: spaceCount++; // fallthrough default: if (endl) { lineCount++; linesOnPage++; endl = FALSE; } #if VERSION_IQUE if (prevChar >= 0x5f && prevChar <= 0x8F) { break; } #endif lineWidth += msg_get_print_char_width(c, font, varIndex, scale, 0, 1); charCount++; break; } } while (!stop); if (buffer != NULL) { general_heap_free(buffer); } for (i = 0; i < lineIndex; i++) { if (maxLineWidth < lineWidths[i]) { maxLineWidth = lineWidths[i]; } if (maxCharsPerLine < lineCharNumbers[i]) { maxCharsPerLine = lineCharNumbers[i]; } } if (pageCount == 0) { maxLinesOnPage = linesOnPage; } else { for (i = 0; i < pageCount; i++) { if (maxLinesOnPage < linesPerPage[i]) { maxLinesOnPage = linesPerPage[i]; } } } if (width != NULL) { *width = maxLineWidth; } if (height != NULL) { *height = lineCount * gMsgCharsets[font]->newLineY; } if (maxLineChars != NULL) { *maxLineChars = maxCharsPerLine; } if (numLines != NULL) { *numLines = lineCount; } if (maxLinesPerPage != NULL) { *maxLinesPerPage = maxLinesOnPage; } if (numSpaces != NULL) { *numSpaces = spaceCount; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel stop_watch_appendGfx /* 3CB0F8 E00C4308 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 3CB0FC E00C430C 0080302D */ daddu $a2, $a0, $zero /* 3CB100 E00C4310 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3CB104 E00C4314 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3CB108 E00C4318 27A40020 */ addiu $a0, $sp, 0x20 /* 3CB10C E00C431C 3C0F0001 */ lui $t7, (0x11630 >> 16) /* 3CB110 E00C4320 35EF1630 */ ori $t7, $t7, (0x11630 & 0xFFFF) /* 3CB114 E00C4324 AFB600C8 */ sw $s6, 0xC8($sp) /* 3CB118 E00C4328 0000B02D */ daddu $s6, $zero, $zero /* 3CB11C E00C432C AFB200B8 */ sw $s2, 0xB8($sp) /* 3CB120 E00C4330 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 3CB124 E00C4334 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 3CB128 E00C4338 AFB500C4 */ sw $s5, 0xC4($sp) /* 3CB12C E00C433C 02C0A82D */ daddu $s5, $s6, $zero /* 3CB130 E00C4340 AFBF00D4 */ sw $ra, 0xD4($sp) /* 3CB134 E00C4344 AFBE00D0 */ sw $fp, 0xD0($sp) /* 3CB138 E00C4348 AFB700CC */ sw $s7, 0xCC($sp) /* 3CB13C E00C434C AFB400C0 */ sw $s4, 0xC0($sp) /* 3CB140 E00C4350 AFB300BC */ sw $s3, 0xBC($sp) /* 3CB144 E00C4354 AFB100B4 */ sw $s1, 0xB4($sp) /* 3CB148 E00C4358 AFB000B0 */ sw $s0, 0xB0($sp) /* 3CB14C E00C435C F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 3CB150 E00C4360 AFAF00A8 */ sw $t7, 0xA8($sp) /* 3CB154 E00C4364 8E450000 */ lw $a1, 0x0($s2) /* 3CB158 E00C4368 8CDE000C */ lw $fp, 0xC($a2) /* 3CB15C E00C436C 00A0182D */ daddu $v1, $a1, $zero /* 3CB160 E00C4370 24A50008 */ addiu $a1, $a1, 0x8 /* 3CB164 E00C4374 AE450000 */ sw $a1, 0x0($s2) /* 3CB168 E00C4378 8FD40014 */ lw $s4, 0x14($fp) /* 3CB16C E00C437C 8FCF0024 */ lw $t7, 0x24($fp) /* 3CB170 E00C4380 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3CB174 E00C4384 AFAF00A0 */ sw $t7, 0xA0($sp) /* 3CB178 E00C4388 AC620000 */ sw $v0, 0x0($v1) /* 3CB17C E00C438C AC600004 */ sw $zero, 0x4($v1) /* 3CB180 E00C4390 ACA70000 */ sw $a3, 0x0($a1) /* 3CB184 E00C4394 8CC30010 */ lw $v1, 0x10($a2) /* 3CB188 E00C4398 24A20008 */ addiu $v0, $a1, 0x8 /* 3CB18C E00C439C AE420000 */ sw $v0, 0x0($s2) /* 3CB190 E00C43A0 8C62001C */ lw $v0, 0x1C($v1) /* 3CB194 E00C43A4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3CB198 E00C43A8 00431021 */ addu $v0, $v0, $v1 /* 3CB19C E00C43AC 3C03800B */ lui $v1, %hi(gCameras) /* 3CB1A0 E00C43B0 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3CB1A4 E00C43B4 ACA20004 */ sw $v0, 0x4($a1) /* 3CB1A8 E00C43B8 8FC50004 */ lw $a1, 0x4($fp) /* 3CB1AC E00C43BC 8FC60008 */ lw $a2, 0x8($fp) /* 3CB1B0 E00C43C0 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3CB1B4 E00C43C4 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3CB1B8 E00C43C8 8FC7000C */ lw $a3, 0xC($fp) /* 3CB1BC E00C43CC 00028080 */ sll $s0, $v0, 2 /* 3CB1C0 E00C43D0 02028021 */ addu $s0, $s0, $v0 /* 3CB1C4 E00C43D4 00108080 */ sll $s0, $s0, 2 /* 3CB1C8 E00C43D8 02028023 */ subu $s0, $s0, $v0 /* 3CB1CC E00C43DC 001010C0 */ sll $v0, $s0, 3 /* 3CB1D0 E00C43E0 02028021 */ addu $s0, $s0, $v0 /* 3CB1D4 E00C43E4 001080C0 */ sll $s0, $s0, 3 /* 3CB1D8 E00C43E8 0C080108 */ jal shim_guTranslateF /* 3CB1DC E00C43EC 02038021 */ addu $s0, $s0, $v1 /* 3CB1E0 E00C43F0 27B10060 */ addiu $s1, $sp, 0x60 /* 3CB1E4 E00C43F4 8FC50028 */ lw $a1, 0x28($fp) /* 3CB1E8 E00C43F8 0220202D */ daddu $a0, $s1, $zero /* 3CB1EC E00C43FC 00A0302D */ daddu $a2, $a1, $zero /* 3CB1F0 E00C4400 0C080110 */ jal shim_guScaleF /* 3CB1F4 E00C4404 00A0382D */ daddu $a3, $a1, $zero /* 3CB1F8 E00C4408 0220202D */ daddu $a0, $s1, $zero /* 3CB1FC E00C440C 27A50020 */ addiu $a1, $sp, 0x20 /* 3CB200 E00C4410 0C080114 */ jal shim_guMtxCatF /* 3CB204 E00C4414 00A0302D */ daddu $a2, $a1, $zero /* 3CB208 E00C4418 27A40020 */ addiu $a0, $sp, 0x20 /* 3CB20C E00C441C 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 3CB210 E00C4420 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 3CB214 E00C4424 3C13800A */ lui $s3, %hi(gDisplayContext) /* 3CB218 E00C4428 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 3CB21C E00C442C 96250000 */ lhu $a1, 0x0($s1) /* 3CB220 E00C4430 8E620000 */ lw $v0, 0x0($s3) /* 3CB224 E00C4434 8FAF00A8 */ lw $t7, 0xA8($sp) /* 3CB228 E00C4438 00052980 */ sll $a1, $a1, 6 /* 3CB22C E00C443C 00AF2821 */ addu $a1, $a1, $t7 /* 3CB230 E00C4440 0C080118 */ jal shim_guMtxF2L /* 3CB234 E00C4444 00452821 */ addu $a1, $v0, $a1 /* 3CB238 E00C4448 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3CB23C E00C444C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3CB240 E00C4450 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 3CB244 E00C4454 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 3CB248 E00C4458 00141080 */ sll $v0, $s4, 2 /* 3CB24C E00C445C 00541021 */ addu $v0, $v0, $s4 /* 3CB250 E00C4460 0002A040 */ sll $s4, $v0, 1 /* 3CB254 E00C4464 0280B82D */ daddu $s7, $s4, $zero /* 3CB258 E00C4468 8E440000 */ lw $a0, 0x0($s2) /* 3CB25C E00C446C 96220000 */ lhu $v0, 0x0($s1) /* 3CB260 E00C4470 0080282D */ daddu $a1, $a0, $zero /* 3CB264 E00C4474 24840008 */ addiu $a0, $a0, 0x8 /* 3CB268 E00C4478 248F0020 */ addiu $t7, $a0, 0x20 /* 3CB26C E00C447C AFAF00A4 */ sw $t7, 0xA4($sp) /* 3CB270 E00C4480 AE440000 */ sw $a0, 0x0($s2) /* 3CB274 E00C4484 ACA30000 */ sw $v1, 0x0($a1) /* 3CB278 E00C4488 24430001 */ addiu $v1, $v0, 0x1 /* 3CB27C E00C448C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3CB280 E00C4490 00021180 */ sll $v0, $v0, 6 /* 3CB284 E00C4494 A6230000 */ sh $v1, 0x0($s1) /* 3CB288 E00C4498 8FAF00A8 */ lw $t7, 0xA8($sp) /* 3CB28C E00C449C 8E630000 */ lw $v1, 0x0($s3) /* 3CB290 E00C44A0 004F1021 */ addu $v0, $v0, $t7 /* 3CB294 E00C44A4 00621821 */ addu $v1, $v1, $v0 /* 3CB298 E00C44A8 24820008 */ addiu $v0, $a0, 0x8 /* 3CB29C E00C44AC ACA30004 */ sw $v1, 0x4($a1) /* 3CB2A0 E00C44B0 AE420000 */ sw $v0, 0x0($s2) /* 3CB2A4 E00C44B4 24820010 */ addiu $v0, $a0, 0x10 /* 3CB2A8 E00C44B8 AC860000 */ sw $a2, 0x0($a0) /* 3CB2AC E00C44BC AE420000 */ sw $v0, 0x0($s2) /* 3CB2B0 E00C44C0 8E030204 */ lw $v1, 0x204($s0) /* 3CB2B4 E00C44C4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3CB2B8 E00C44C8 AC820008 */ sw $v0, 0x8($a0) /* 3CB2BC E00C44CC 3C020900 */ lui $v0, %hi(D_09001000_40E290) /* 3CB2C0 E00C44D0 24421000 */ addiu $v0, $v0, %lo(D_09001000_40E290) /* 3CB2C4 E00C44D4 AC82000C */ sw $v0, 0xC($a0) /* 3CB2C8 E00C44D8 24820018 */ addiu $v0, $a0, 0x18 /* 3CB2CC E00C44DC AE420000 */ sw $v0, 0x0($s2) /* 3CB2D0 E00C44E0 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3CB2D4 E00C44E4 AC820010 */ sw $v0, 0x10($a0) /* 3CB2D8 E00C44E8 AC830004 */ sw $v1, 0x4($a0) /* 3CB2DC E00C44EC 93C3002F */ lbu $v1, 0x2F($fp) /* 3CB2E0 E00C44F0 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3CB2E4 E00C44F4 AC820018 */ sw $v0, 0x18($a0) /* 3CB2E8 E00C44F8 24820220 */ addiu $v0, $a0, 0x220 /* 3CB2EC E00C44FC AC82001C */ sw $v0, 0x1C($a0) /* 3CB2F0 E00C4500 AE420000 */ sw $v0, 0x0($s2) /* 3CB2F4 E00C4504 AC830014 */ sw $v1, 0x14($a0) .LE00C4508: /* 3CB2F8 E00C4508 00168140 */ sll $s0, $s6, 5 /* 3CB2FC E00C450C 44976000 */ mtc1 $s7, $f12 /* 3CB300 E00C4510 00000000 */ nop /* 3CB304 E00C4514 46806320 */ cvt.s.w $f12, $f12 /* 3CB308 E00C4518 8FAF00A4 */ lw $t7, 0xA4($sp) /* 3CB30C E00C451C C7D40030 */ lwc1 $f20, 0x30($fp) /* 3CB310 E00C4520 0C080140 */ jal shim_sin_deg /* 3CB314 E00C4524 01F08021 */ addu $s0, $t7, $s0 /* 3CB318 E00C4528 3C0143FA */ lui $at, (0x43FA0000 >> 16) /* 3CB31C E00C452C 44811000 */ mtc1 $at, $f2 /* 3CB320 E00C4530 00000000 */ nop /* 3CB324 E00C4534 46020002 */ mul.s $f0, $f0, $f2 /* 3CB328 E00C4538 00000000 */ nop /* 3CB32C E00C453C 46140002 */ mul.s $f0, $f0, $f20 /* 3CB330 E00C4540 00000000 */ nop /* 3CB334 E00C4544 44946000 */ mtc1 $s4, $f12 /* 3CB338 E00C4548 00000000 */ nop /* 3CB33C E00C454C 46806320 */ cvt.s.w $f12, $f12 /* 3CB340 E00C4550 4600010D */ trunc.w.s $f4, $f0 /* 3CB344 E00C4554 44112000 */ mfc1 $s1, $f4 /* 3CB348 E00C4558 0C080140 */ jal shim_sin_deg /* 3CB34C E00C455C 26940006 */ addiu $s4, $s4, 0x6 /* 3CB350 E00C4560 3C014348 */ lui $at, (0x43480000 >> 16) /* 3CB354 E00C4564 44811000 */ mtc1 $at, $f2 /* 3CB358 E00C4568 26F7003C */ addiu $s7, $s7, 0x3C /* 3CB35C E00C456C 46020002 */ mul.s $f0, $f0, $f2 /* 3CB360 E00C4570 00000000 */ nop /* 3CB364 E00C4574 001619C0 */ sll $v1, $s6, 7 /* 3CB368 E00C4578 26D60001 */ addiu $s6, $s6, 0x1 /* 3CB36C E00C457C 2622F380 */ addiu $v0, $s1, -0xC80 /* 3CB370 E00C4580 26310C80 */ addiu $s1, $s1, 0xC80 /* 3CB374 E00C4584 46140002 */ mul.s $f0, $f0, $f20 /* 3CB378 E00C4588 00000000 */ nop /* 3CB37C E00C458C A6020000 */ sh $v0, 0x0($s0) /* 3CB380 E00C4590 A6000004 */ sh $zero, 0x4($s0) /* 3CB384 E00C4594 A6000008 */ sh $zero, 0x8($s0) /* 3CB388 E00C4598 A603000A */ sh $v1, 0xA($s0) /* 3CB38C E00C459C 4600010D */ trunc.w.s $f4, $f0 /* 3CB390 E00C45A0 44022000 */ mfc1 $v0, $f4 /* 3CB394 E00C45A4 00000000 */ nop /* 3CB398 E00C45A8 02A21021 */ addu $v0, $s5, $v0 /* 3CB39C E00C45AC 2442F448 */ addiu $v0, $v0, -0xBB8 /* 3CB3A0 E00C45B0 A6020002 */ sh $v0, 0x2($s0) /* 3CB3A4 E00C45B4 26100010 */ addiu $s0, $s0, 0x10 /* 3CB3A8 E00C45B8 26B50190 */ addiu $s5, $s5, 0x190 /* 3CB3AC E00C45BC A6020002 */ sh $v0, 0x2($s0) /* 3CB3B0 E00C45C0 24020800 */ addiu $v0, $zero, 0x800 /* 3CB3B4 E00C45C4 A6020008 */ sh $v0, 0x8($s0) /* 3CB3B8 E00C45C8 2AC20010 */ slti $v0, $s6, 0x10 /* 3CB3BC E00C45CC A6110000 */ sh $s1, 0x0($s0) /* 3CB3C0 E00C45D0 A6000004 */ sh $zero, 0x4($s0) /* 3CB3C4 E00C45D4 1440FFCC */ bnez $v0, .LE00C4508 /* 3CB3C8 E00C45D8 A603000A */ sh $v1, 0xA($s0) /* 3CB3CC E00C45DC 27A40020 */ addiu $a0, $sp, 0x20 /* 3CB3D0 E00C45E0 3C130001 */ lui $s3, (0x11630 >> 16) /* 3CB3D4 E00C45E4 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3CB3D8 E00C45E8 0000B02D */ daddu $s6, $zero, $zero /* 3CB3DC E00C45EC 3C10800A */ lui $s0, %hi(gMainGfxPos) /* 3CB3E0 E00C45F0 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* 3CB3E4 E00C45F4 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 3CB3E8 E00C45F8 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 3CB3EC E00C45FC 44810000 */ mtc1 $at, $f0 /* 3CB3F0 E00C4600 8E020000 */ lw $v0, 0x0($s0) /* 3CB3F4 E00C4604 3C03DE01 */ lui $v1, (0xDE010000 >> 16) /* 3CB3F8 E00C4608 AC430000 */ sw $v1, 0x0($v0) /* 3CB3FC E00C460C 244300A0 */ addiu $v1, $v0, 0xA0 /* 3CB400 E00C4610 AC430004 */ sw $v1, 0x4($v0) /* 3CB404 E00C4614 24420008 */ addiu $v0, $v0, 0x8 /* 3CB408 E00C4618 44050000 */ mfc1 $a1, $f0 /* 3CB40C E00C461C 0040A82D */ daddu $s5, $v0, $zero /* 3CB410 E00C4620 AE020000 */ sw $v0, 0x0($s0) /* 3CB414 E00C4624 00A0302D */ daddu $a2, $a1, $zero /* 3CB418 E00C4628 0C080110 */ jal shim_guScaleF /* 3CB41C E00C462C 00A0382D */ daddu $a3, $a1, $zero /* 3CB420 E00C4630 27A40020 */ addiu $a0, $sp, 0x20 /* 3CB424 E00C4634 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 3CB428 E00C4638 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 3CB42C E00C463C 3C12800A */ lui $s2, %hi(gDisplayContext) /* 3CB430 E00C4640 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 3CB434 E00C4644 96250000 */ lhu $a1, 0x0($s1) /* 3CB438 E00C4648 8E420000 */ lw $v0, 0x0($s2) /* 3CB43C E00C464C 00052980 */ sll $a1, $a1, 6 /* 3CB440 E00C4650 00B32821 */ addu $a1, $a1, $s3 /* 3CB444 E00C4654 0C080118 */ jal shim_guMtxF2L /* 3CB448 E00C4658 00452821 */ addu $a1, $v0, $a1 /* 3CB44C E00C465C 3C060102 */ lui $a2, (0x1020040 >> 16) /* 3CB450 E00C4660 34C60040 */ ori $a2, $a2, (0x1020040 & 0xFFFF) /* 3CB454 E00C4664 3C0B0600 */ lui $t3, (0x6000000 >> 16) /* 3CB458 E00C4668 240A0001 */ addiu $t2, $zero, 0x1 /* 3CB45C E00C466C 3C0E0606 */ lui $t6, (0x6060402 >> 16) /* 3CB460 E00C4670 35CE0402 */ ori $t6, $t6, (0x6060402 & 0xFFFF) /* 3CB464 E00C4674 3C0D0002 */ lui $t5, (0x20406 >> 16) /* 3CB468 E00C4678 35AD0406 */ ori $t5, $t5, (0x20406 & 0xFFFF) /* 3CB46C E00C467C 3C0C0006 */ lui $t4, (0x60804 >> 16) /* 3CB470 E00C4680 358C0804 */ ori $t4, $t4, (0x60804 & 0xFFFF) /* 3CB474 E00C4684 24080004 */ addiu $t0, $zero, 0x4 /* 3CB478 E00C4688 8E040000 */ lw $a0, 0x0($s0) /* 3CB47C E00C468C 24090006 */ addiu $t1, $zero, 0x6 /* 3CB480 E00C4690 0080282D */ daddu $a1, $a0, $zero /* 3CB484 E00C4694 24840008 */ addiu $a0, $a0, 0x8 /* 3CB488 E00C4698 AE040000 */ sw $a0, 0x0($s0) /* 3CB48C E00C469C 96220000 */ lhu $v0, 0x0($s1) /* 3CB490 E00C46A0 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3CB494 E00C46A4 ACA30000 */ sw $v1, 0x0($a1) /* 3CB498 E00C46A8 004A1821 */ addu $v1, $v0, $t2 /* 3CB49C E00C46AC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3CB4A0 E00C46B0 01221004 */ sllv $v0, $v0, $t1 /* 3CB4A4 E00C46B4 A6230000 */ sh $v1, 0x0($s1) /* 3CB4A8 E00C46B8 8E430000 */ lw $v1, 0x0($s2) /* 3CB4AC E00C46BC 00531021 */ addu $v0, $v0, $s3 /* 3CB4B0 E00C46C0 00621821 */ addu $v1, $v1, $v0 /* 3CB4B4 E00C46C4 24820008 */ addiu $v0, $a0, 0x8 /* 3CB4B8 E00C46C8 ACA30004 */ sw $v1, 0x4($a1) /* 3CB4BC E00C46CC AE020000 */ sw $v0, 0x0($s0) /* 3CB4C0 E00C46D0 AC860000 */ sw $a2, 0x0($a0) /* 3CB4C4 E00C46D4 8FAF00A4 */ lw $t7, 0xA4($sp) /* 3CB4C8 E00C46D8 24070002 */ addiu $a3, $zero, 0x2 /* 3CB4CC E00C46DC AC8F0004 */ sw $t7, 0x4($a0) .LE00C46E0: /* 3CB4D0 E00C46E0 8E040000 */ lw $a0, 0x0($s0) /* 3CB4D4 E00C46E4 00162840 */ sll $a1, $s6, 1 /* 3CB4D8 E00C46E8 24820008 */ addiu $v0, $a0, 0x8 /* 3CB4DC E00C46EC 14A00004 */ bnez $a1, .LE00C4700 /* 3CB4E0 E00C46F0 AE020000 */ sw $v0, 0x0($s0) /* 3CB4E4 E00C46F4 00161440 */ sll $v0, $s6, 17 /* 3CB4E8 E00C46F8 080311CA */ j .LE00C4728 /* 3CB4EC E00C46FC 34420402 */ ori $v0, $v0, 0x402 .LE00C4700: /* 3CB4F0 E00C4700 14AA0003 */ bne $a1, $t2, .LE00C4710 /* 3CB4F4 E00C4704 30E200FF */ andi $v0, $a3, 0xFF /* 3CB4F8 E00C4708 080311CC */ j .LE00C4730 /* 3CB4FC E00C470C AC8E0000 */ sw $t6, 0x0($a0) .LE00C4710: /* 3CB500 E00C4710 00021400 */ sll $v0, $v0, 16 /* 3CB504 E00C4714 00161A80 */ sll $v1, $s6, 10 /* 3CB508 E00C4718 3063FC00 */ andi $v1, $v1, 0xFC00 /* 3CB50C E00C471C 00431025 */ or $v0, $v0, $v1 /* 3CB510 E00C4720 310300FF */ andi $v1, $t0, 0xFF /* 3CB514 E00C4724 00431025 */ or $v0, $v0, $v1 .LE00C4728: /* 3CB518 E00C4728 004B1025 */ or $v0, $v0, $t3 /* 3CB51C E00C472C AC820000 */ sw $v0, 0x0($a0) .LE00C4730: /* 3CB520 E00C4730 14A00003 */ bnez $a1, .LE00C4740 /* 3CB524 E00C4734 00000000 */ nop /* 3CB528 E00C4738 080311DB */ j .LE00C476C /* 3CB52C E00C473C AC8D0004 */ sw $t5, 0x4($a0) .LE00C4740: /* 3CB530 E00C4740 14AA0003 */ bne $a1, $t2, .LE00C4750 /* 3CB534 E00C4744 312200FF */ andi $v0, $t1, 0xFF /* 3CB538 E00C4748 080311DB */ j .LE00C476C /* 3CB53C E00C474C AC8C0004 */ sw $t4, 0x4($a0) .LE00C4750: /* 3CB540 E00C4750 00021400 */ sll $v0, $v0, 16 /* 3CB544 E00C4754 30E300FF */ andi $v1, $a3, 0xFF /* 3CB548 E00C4758 00031A00 */ sll $v1, $v1, 8 /* 3CB54C E00C475C 00431025 */ or $v0, $v0, $v1 /* 3CB550 E00C4760 310300FF */ andi $v1, $t0, 0xFF /* 3CB554 E00C4764 00431025 */ or $v0, $v0, $v1 /* 3CB558 E00C4768 AC820004 */ sw $v0, 0x4($a0) .LE00C476C: /* 3CB55C E00C476C 25080004 */ addiu $t0, $t0, 0x4 /* 3CB560 E00C4770 24E70004 */ addiu $a3, $a3, 0x4 /* 3CB564 E00C4774 26D60001 */ addiu $s6, $s6, 0x1 /* 3CB568 E00C4778 2AC2000F */ slti $v0, $s6, 0xF /* 3CB56C E00C477C 1440FFD8 */ bnez $v0, .LE00C46E0 /* 3CB570 E00C4780 25290004 */ addiu $t1, $t1, 0x4 /* 3CB574 E00C4784 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 3CB578 E00C4788 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 3CB57C E00C478C 0000B02D */ daddu $s6, $zero, $zero /* 3CB580 E00C4790 3C17E00C */ lui $s7, %hi(D_E00C49D0) /* 3CB584 E00C4794 26F749D0 */ addiu $s7, $s7, %lo(D_E00C49D0) /* 3CB588 E00C4798 3C14800A */ lui $s4, %hi(gDisplayContext) /* 3CB58C E00C479C 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 3CB590 E00C47A0 3C138007 */ lui $s3, %hi(gMatrixListPos) /* 3CB594 E00C47A4 267341F0 */ addiu $s3, $s3, %lo(gMatrixListPos) /* 3CB598 E00C47A8 3C120001 */ lui $s2, (0x11630 >> 16) /* 3CB59C E00C47AC 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3CB5A0 E00C47B0 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3CB5A4 E00C47B4 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3CB5A8 E00C47B8 0040882D */ daddu $s1, $v0, $zero /* 3CB5AC E00C47BC 8E220000 */ lw $v0, 0x0($s1) /* 3CB5B0 E00C47C0 03C0802D */ daddu $s0, $fp, $zero /* 3CB5B4 E00C47C4 0040202D */ daddu $a0, $v0, $zero /* 3CB5B8 E00C47C8 24420008 */ addiu $v0, $v0, 0x8 /* 3CB5BC E00C47CC AE220000 */ sw $v0, 0x0($s1) /* 3CB5C0 E00C47D0 AC830000 */ sw $v1, 0x0($a0) /* 3CB5C4 E00C47D4 24030040 */ addiu $v1, $zero, 0x40 /* 3CB5C8 E00C47D8 AC830004 */ sw $v1, 0x4($a0) /* 3CB5CC E00C47DC 24430008 */ addiu $v1, $v0, 0x8 /* 3CB5D0 E00C47E0 AE230000 */ sw $v1, 0x0($s1) /* 3CB5D4 E00C47E4 3C03DF00 */ lui $v1, (0xDF000000 >> 16) /* 3CB5D8 E00C47E8 AC430000 */ sw $v1, 0x0($v0) /* 3CB5DC E00C47EC AC400004 */ sw $zero, 0x4($v0) .LE00C47F0: /* 3CB5E0 E00C47F0 06C10002 */ bgez $s6, .LE00C47FC /* 3CB5E4 E00C47F4 02C0102D */ daddu $v0, $s6, $zero /* 3CB5E8 E00C47F8 26C20003 */ addiu $v0, $s6, 0x3 .LE00C47FC: /* 3CB5EC E00C47FC 00021083 */ sra $v0, $v0, 2 /* 3CB5F0 E00C4800 00021080 */ sll $v0, $v0, 2 /* 3CB5F4 E00C4804 02C21023 */ subu $v0, $s6, $v0 /* 3CB5F8 E00C4808 00571021 */ addu $v0, $v0, $s7 /* 3CB5FC E00C480C 90420000 */ lbu $v0, 0x0($v0) /* 3CB600 E00C4810 3C01E00C */ lui $at, (0xE00C4A98 >> 16) /* 3CB604 E00C4814 D4224A98 */ ldc1 $f2, (0xE00C4A98 & 0xFFFF)($at) /* 3CB608 E00C4818 44820000 */ mtc1 $v0, $f0 /* 3CB60C E00C481C 00000000 */ nop /* 3CB610 E00C4820 46800021 */ cvt.d.w $f0, $f0 /* 3CB614 E00C4824 46220002 */ mul.d $f0, $f0, $f2 /* 3CB618 E00C4828 00000000 */ nop /* 3CB61C E00C482C 46200020 */ cvt.s.d $f0, $f0 /* 3CB620 E00C4830 E7A00010 */ swc1 $f0, 0x10($sp) /* 3CB624 E00C4834 C6000034 */ lwc1 $f0, 0x34($s0) /* 3CB628 E00C4838 E7A00014 */ swc1 $f0, 0x14($sp) /* 3CB62C E00C483C C600005C */ lwc1 $f0, 0x5C($s0) /* 3CB630 E00C4840 E7A00018 */ swc1 $f0, 0x18($sp) /* 3CB634 E00C4844 C6000084 */ lwc1 $f0, 0x84($s0) /* 3CB638 E00C4848 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3CB63C E00C484C 8E0500AC */ lw $a1, 0xAC($s0) /* 3CB640 E00C4850 8E0600D4 */ lw $a2, 0xD4($s0) /* 3CB644 E00C4854 8E0700FC */ lw $a3, 0xFC($s0) /* 3CB648 E00C4858 0C080180 */ jal shim_guPositionF /* 3CB64C E00C485C 27A40020 */ addiu $a0, $sp, 0x20 /* 3CB650 E00C4860 27A40020 */ addiu $a0, $sp, 0x20 /* 3CB654 E00C4864 96650000 */ lhu $a1, 0x0($s3) /* 3CB658 E00C4868 8E820000 */ lw $v0, 0x0($s4) /* 3CB65C E00C486C 00052980 */ sll $a1, $a1, 6 /* 3CB660 E00C4870 00B22821 */ addu $a1, $a1, $s2 /* 3CB664 E00C4874 0C080118 */ jal shim_guMtxF2L /* 3CB668 E00C4878 00452821 */ addu $a1, $v0, $a1 /* 3CB66C E00C487C 3C088080 */ lui $t0, (0x80808081 >> 16) /* 3CB670 E00C4880 35088081 */ ori $t0, $t0, (0x80808081 & 0xFFFF) /* 3CB674 E00C4884 3C0AD838 */ lui $t2, (0xD8380002 >> 16) /* 3CB678 E00C4888 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 3CB67C E00C488C 8E240000 */ lw $a0, 0x0($s1) /* 3CB680 E00C4890 96660000 */ lhu $a2, 0x0($s3) /* 3CB684 E00C4894 0080282D */ daddu $a1, $a0, $zero /* 3CB688 E00C4898 24840008 */ addiu $a0, $a0, 0x8 /* 3CB68C E00C489C ACA20000 */ sw $v0, 0x0($a1) /* 3CB690 E00C48A0 30C2FFFF */ andi $v0, $a2, 0xFFFF /* 3CB694 E00C48A4 00021180 */ sll $v0, $v0, 6 /* 3CB698 E00C48A8 00521021 */ addu $v0, $v0, $s2 /* 3CB69C E00C48AC 8E830000 */ lw $v1, 0x0($s4) /* 3CB6A0 E00C48B0 24C60001 */ addiu $a2, $a2, 0x1 /* 3CB6A4 E00C48B4 00621821 */ addu $v1, $v1, $v0 /* 3CB6A8 E00C48B8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3CB6AC E00C48BC ACA30004 */ sw $v1, 0x4($a1) /* 3CB6B0 E00C48C0 AC820000 */ sw $v0, 0x0($a0) /* 3CB6B4 E00C48C4 8E050124 */ lw $a1, 0x124($s0) /* 3CB6B8 E00C48C8 24820008 */ addiu $v0, $a0, 0x8 /* 3CB6BC E00C48CC AE240000 */ sw $a0, 0x0($s1) /* 3CB6C0 E00C48D0 A6660000 */ sh $a2, 0x0($s3) /* 3CB6C4 E00C48D4 AE220000 */ sw $v0, 0x0($s1) /* 3CB6C8 E00C48D8 3C03E00C */ lui $v1, (0xE00C49D4 >> 16) /* 3CB6CC E00C48DC 00761821 */ addu $v1, $v1, $s6 /* 3CB6D0 E00C48E0 906349D4 */ lbu $v1, (0xE00C49D4 & 0xFFFF)($v1) /* 3CB6D4 E00C48E4 3C06E00C */ lui $a2, (0xE00C49E8 >> 16) /* 3CB6D8 E00C48E8 00D63021 */ addu $a2, $a2, $s6 /* 3CB6DC E00C48EC 90C649E8 */ lbu $a2, (0xE00C49E8 & 0xFFFF)($a2) /* 3CB6E0 E00C48F0 3C07E00C */ lui $a3, (0xE00C49FC >> 16) /* 3CB6E4 E00C48F4 00F63821 */ addu $a3, $a3, $s6 /* 3CB6E8 E00C48F8 90E749FC */ lbu $a3, (0xE00C49FC & 0xFFFF)($a3) /* 3CB6EC E00C48FC 24820010 */ addiu $v0, $a0, 0x10 /* 3CB6F0 E00C4900 AE220000 */ sw $v0, 0x0($s1) /* 3CB6F4 E00C4904 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3CB6F8 E00C4908 AC820008 */ sw $v0, 0x8($a0) /* 3CB6FC E00C490C 24820018 */ addiu $v0, $a0, 0x18 /* 3CB700 E00C4910 AC95000C */ sw $s5, 0xC($a0) /* 3CB704 E00C4914 AE220000 */ sw $v0, 0x0($s1) /* 3CB708 E00C4918 8FAF00A0 */ lw $t7, 0xA0($sp) /* 3CB70C E00C491C 354A0002 */ ori $t2, $t2, (0xD8380002 & 0xFFFF) /* 3CB710 E00C4920 01E50018 */ mult $t7, $a1 /* 3CB714 E00C4924 24090040 */ addiu $t1, $zero, 0x40 /* 3CB718 E00C4928 26100004 */ addiu $s0, $s0, 0x4 /* 3CB71C E00C492C 26D60001 */ addiu $s6, $s6, 0x1 /* 3CB720 E00C4930 AC8A0010 */ sw $t2, 0x10($a0) /* 3CB724 E00C4934 00002812 */ mflo $a1 /* 3CB728 E00C4938 AC890014 */ sw $t1, 0x14($a0) /* 3CB72C E00C493C 00031E00 */ sll $v1, $v1, 24 /* 3CB730 E00C4940 00A80018 */ mult $a1, $t0 /* 3CB734 E00C4944 00063400 */ sll $a2, $a2, 16 /* 3CB738 E00C4948 00661825 */ or $v1, $v1, $a2 /* 3CB73C E00C494C 00073A00 */ sll $a3, $a3, 8 /* 3CB740 E00C4950 00671825 */ or $v1, $v1, $a3 /* 3CB744 E00C4954 00001010 */ mfhi $v0 /* 3CB748 E00C4958 00451021 */ addu $v0, $v0, $a1 /* 3CB74C E00C495C 000211C3 */ sra $v0, $v0, 7 /* 3CB750 E00C4960 00052FC3 */ sra $a1, $a1, 31 /* 3CB754 E00C4964 00451023 */ subu $v0, $v0, $a1 /* 3CB758 E00C4968 304200FF */ andi $v0, $v0, 0xFF /* 3CB75C E00C496C 00621825 */ or $v1, $v1, $v0 /* 3CB760 E00C4970 2AC2000A */ slti $v0, $s6, 0xA /* 3CB764 E00C4974 1440FF9E */ bnez $v0, .LE00C47F0 /* 3CB768 E00C4978 AC830004 */ sw $v1, 0x4($a0) /* 3CB76C E00C497C 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3CB770 E00C4980 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3CB774 E00C4984 8C430000 */ lw $v1, 0x0($v0) /* 3CB778 E00C4988 0060202D */ daddu $a0, $v1, $zero /* 3CB77C E00C498C 24630008 */ addiu $v1, $v1, 0x8 /* 3CB780 E00C4990 AC430000 */ sw $v1, 0x0($v0) /* 3CB784 E00C4994 AC8A0000 */ sw $t2, 0x0($a0) /* 3CB788 E00C4998 AC890004 */ sw $t1, 0x4($a0) /* 3CB78C E00C499C 8FBF00D4 */ lw $ra, 0xD4($sp) /* 3CB790 E00C49A0 8FBE00D0 */ lw $fp, 0xD0($sp) /* 3CB794 E00C49A4 8FB700CC */ lw $s7, 0xCC($sp) /* 3CB798 E00C49A8 8FB600C8 */ lw $s6, 0xC8($sp) /* 3CB79C E00C49AC 8FB500C4 */ lw $s5, 0xC4($sp) /* 3CB7A0 E00C49B0 8FB400C0 */ lw $s4, 0xC0($sp) /* 3CB7A4 E00C49B4 8FB300BC */ lw $s3, 0xBC($sp) /* 3CB7A8 E00C49B8 8FB200B8 */ lw $s2, 0xB8($sp) /* 3CB7AC E00C49BC 8FB100B4 */ lw $s1, 0xB4($sp) /* 3CB7B0 E00C49C0 8FB000B0 */ lw $s0, 0xB0($sp) /* 3CB7B4 E00C49C4 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 3CB7B8 E00C49C8 03E00008 */ jr $ra /* 3CB7BC E00C49CC 27BD00E0 */ addiu $sp, $sp, 0xE0 ### DECOMPILED C INSTRUCTIONS: void stop_watch_appendGfx(void* effect) { StopWatchFXData* data = ((EffectInstance*)effect)->data.stopWatch; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_14 = data->unk_14; s32 unk_24 = data->unk_24; Vtx_t* vtxBuffer; Gfx* savedGfxPos; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C); shim_guScaleF(sp60, data->unk_28, data->unk_28, data->unk_28); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09001000_3CC890); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, data->unk_2C); gSPBranchList(gMainGfxPos, &gMainGfxPos[65]); vtxBuffer = (Vtx_t*) (gMainGfxPos + 1); gMainGfxPos = &gMainGfxPos[65]; for (i = 0; i < 16; i++) { Vtx_t* vtx = &vtxBuffer[i * 2]; f32 unk_30 = data->unk_30; s32 temp_s1 = shim_sin_deg(unk_14 * 10 + i * 60) * 500.0f * unk_30; s32 temp_f0 = shim_sin_deg(unk_14 * 10 + i * 6) * 200.0f * unk_30; vtx->ob[0] = temp_s1 - 3200; vtx->ob[1] = i * 400 + temp_f0 - 3000; vtx->ob[2] = 0; vtx->tc[0] = 0; vtx->tc[1] = i * 128; vtx++; vtx->ob[0] = temp_s1 + 3200; vtx->ob[1] = i * 400 + temp_f0 - 3000; vtx->ob[2] = 0; vtx->tc[0] = 2048; vtx->tc[1] = i * 128; } gSPBranchList(gMainGfxPos, &gMainGfxPos[20]); gMainGfxPos++; savedGfxPos = gMainGfxPos; shim_guScaleF(sp20, 0.01f, 0.01f, 0.01f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPVertex(gMainGfxPos++, vtxBuffer, 32, 0); for (i = 0; i < 15; i++) { s32 i2 = i * 2; gSP2Triangles(gMainGfxPos++, i2 , i2 + 2, i2 + 1, i2, i2 + 1, i2 + 2, i2 + 3, i2); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPEndDisplayList(gMainGfxPos++); for (i = 0; i < 10; i++) { shim_guPositionF(sp20, data->unk_AC[i], data->unk_D4[i], data->unk_FC[i], D_E00C49D0[i % 4] * 0.01, data->unk_34[i], data->unk_5C[i], data->unk_84[i]); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E00C49D4[i], D_E00C49E8[i], D_E00C49FC[i], unk_24 * data->unk_124[i] / 255); gSPDisplayList(gMainGfxPos++, savedGfxPos); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80249380 /* 169BE0 80249380 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 169BE4 80249384 0080482D */ daddu $t1, $a0, $zero /* 169BE8 80249388 AFB5003C */ sw $s5, 0x3C($sp) /* 169BEC 8024938C 00A0A82D */ daddu $s5, $a1, $zero /* 169BF0 80249390 AFB60040 */ sw $s6, 0x40($sp) /* 169BF4 80249394 8FAA0058 */ lw $t2, 0x58($sp) /* 169BF8 80249398 3C038025 */ lui $v1, %hi(D_8024B7CC) .L8024939C: /* 169BFC 8024939C 2463B7CC */ addiu $v1, $v1, %lo(D_8024B7CC) end_01_D_802493A0_E0E700: /* 169C00 802493A0 AFBF0044 */ sw $ra, 0x44($sp) /* 169C04 802493A4 AFB40038 */ sw $s4, 0x38($sp) /* 169C08 802493A8 AFB30034 */ sw $s3, 0x34($sp) .L802493AC: /* 169C0C 802493AC AFB20030 */ sw $s2, 0x30($sp) /* 169C10 802493B0 AFB1002C */ sw $s1, 0x2C($sp) /* 169C14 802493B4 AFB00028 */ sw $s0, 0x28($sp) /* 169C18 802493B8 8C620000 */ lw $v0, 0x0($v1) /* 169C1C 802493BC 8FAD005C */ lw $t5, 0x5C($sp) /* 169C20 802493C0 10E20004 */ beq $a3, $v0, .L802493D4 /* 169C24 802493C4 00C0B02D */ daddu $s6, $a2, $zero /* 169C28 802493C8 AC670000 */ sw $a3, 0x0($v1) /* 169C2C 802493CC 3C018025 */ lui $at, %hi(D_8024B7D0) /* 169C30 802493D0 AC20B7D0 */ sw $zero, %lo(D_8024B7D0)($at) .L802493D4: /* 169C34 802493D4 3C058025 */ lui $a1, %hi(D_8024B7D0) /* 169C38 802493D8 24A5B7D0 */ addiu $a1, $a1, %lo(D_8024B7D0) .L802493DC: /* 169C3C 802493DC 8C630000 */ lw $v1, 0x0($v1) jtbl_802493E0: /* 169C40 802493E0 8CA40000 */ lw $a0, 0x0($a1) /* 169C44 802493E4 00031880 */ sll $v1, $v1, 2 /* 169C48 802493E8 00041040 */ sll $v0, $a0, 1 /* 169C4C 802493EC 00441021 */ addu $v0, $v0, $a0 /* 169C50 802493F0 3C01802F */ lui $at, %hi(gMsgCharsets) /* 169C54 802493F4 00230821 */ addu $at, $at, $v1 /* 169C58 802493F8 8C23B5A8 */ lw $v1, %lo(gMsgCharsets)($at) /* 169C5C 802493FC 00021080 */ sll $v0, $v0, 2 /* 169C60 80249400 8C640008 */ lw $a0, 0x8($v1) /* 169C64 80249404 90720000 */ lbu $s2, 0x0($v1) /* 169C68 80249408 90730001 */ lbu $s3, 0x1($v1) /* 169C6C 8024940C 946B0004 */ lhu $t3, 0x4($v1) /* 169C70 80249410 00822021 */ addu $a0, $a0, $v0 /* 169C74 80249414 292200A2 */ slti $v0, $t1, 0xA2 /* 169C78 80249418 90940008 */ lbu $s4, 0x8($a0) .L8024941C: /* 169C7C 8024941C 8C8C0000 */ lw $t4, 0x0($a0) jtbl_80249420: /* 169C80 80249420 10400130 */ beqz $v0, D_802498E4 /* 169C84 80249424 240200F7 */ addiu $v0, $zero, 0xF7 /* 169C88 80249428 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 169C8C 8024942C 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 169C90 80249430 8C820004 */ lw $v0, 0x4($a0) /* 169C94 80249434 8D040000 */ lw $a0, 0x0($t0) /* 169C98 80249438 3C038025 */ lui $v1, %hi(D_8024B7C8) /* 169C9C 8024943C 8C63B7C8 */ lw $v1, %lo(D_8024B7C8)($v1) end_01_CreditsData: /* 169CA0 80249440 00491021 */ addu $v0, $v0, $t1 /* 169CA4 80249444 90540000 */ lbu $s4, 0x0($v0) /* 169CA8 80249448 1083000A */ beq $a0, $v1, .L80249474 /* 169CAC 8024944C 24820008 */ addiu $v0, $a0, 0x8 /* 169CB0 80249450 AD020000 */ sw $v0, 0x0($t0) /* 169CB4 80249454 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 169CB8 80249458 AC820000 */ sw $v0, 0x0($a0) /* 169CBC 8024945C 3C028025 */ lui $v0, %hi(D_8024B760) /* 169CC0 80249460 2442B760 */ addiu $v0, $v0, %lo(D_8024B760) /* 169CC4 80249464 AC820004 */ sw $v0, 0x4($a0) /* 169CC8 80249468 2402FFFF */ addiu $v0, $zero, -0x1 /* 169CCC 8024946C 3C018025 */ lui $at, %hi(D_8024B7D4) /* 169CD0 80249470 AC22B7D4 */ sw $v0, %lo(D_8024B7D4)($at) .L80249474: /* 169CD4 80249474 3C048025 */ lui $a0, %hi(D_8024B7D4) /* 169CD8 80249478 2484B7D4 */ addiu $a0, $a0, %lo(D_8024B7D4) /* 169CDC 8024947C 8C820000 */ lw $v0, 0x0($a0) /* 169CE0 80249480 104A0029 */ beq $v0, $t2, .L80249528 D_80249484: /* 169CE4 80249484 3C06F500 */ lui $a2, (0xF5000100 >> 16) /* 169CE8 80249488 34C60100 */ ori $a2, $a2, (0xF5000100 & 0xFFFF) .L8024948C: /* 169CEC 8024948C 3C070703 */ lui $a3, (0x703C000 >> 16) /* 169CF0 80249490 34E7C000 */ ori $a3, $a3, (0x703C000 & 0xFFFF) /* 169CF4 80249494 8D030000 */ lw $v1, 0x0($t0) /* 169CF8 80249498 3C02FD10 */ lui $v0, (0xFD100000 >> 16) /* 169CFC 8024949C AC8A0000 */ sw $t2, 0x0($a0) /* 169D00 802494A0 3C04802F */ lui $a0, %hi(D_802F4560) /* 169D04 802494A4 24844560 */ addiu $a0, $a0, %lo(D_802F4560) .L802494A8: /* 169D08 802494A8 0060282D */ daddu $a1, $v1, $zero .L802494AC: /* 169D0C 802494AC 24630008 */ addiu $v1, $v1, 0x8 /* 169D10 802494B0 AD030000 */ sw $v1, 0x0($t0) /* 169D14 802494B4 ACA20000 */ sw $v0, 0x0($a1) /* 169D18 802494B8 000A1100 */ sll $v0, $t2, 4 /* 169D1C 802494BC 00441021 */ addu $v0, $v0, $a0 .L802494C0: /* 169D20 802494C0 ACA20004 */ sw $v0, 0x4($a1) /* 169D24 802494C4 24620008 */ addiu $v0, $v1, 0x8 /* 169D28 802494C8 AD020000 */ sw $v0, 0x0($t0) /* 169D2C 802494CC 3C02E800 */ lui $v0, (0xE8000000 >> 16) /* 169D30 802494D0 AC620000 */ sw $v0, 0x0($v1) /* 169D34 802494D4 24620010 */ addiu $v0, $v1, 0x10 /* 169D38 802494D8 AC600004 */ sw $zero, 0x4($v1) /* 169D3C 802494DC AD020000 */ sw $v0, 0x0($t0) /* 169D40 802494E0 3C020700 */ lui $v0, (0x7000000 >> 16) /* 169D44 802494E4 AC62000C */ sw $v0, 0xC($v1) /* 169D48 802494E8 24620018 */ addiu $v0, $v1, 0x18 /* 169D4C 802494EC AC660008 */ sw $a2, 0x8($v1) .L802494F0: /* 169D50 802494F0 AD020000 */ sw $v0, 0x0($t0) /* 169D54 802494F4 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 169D58 802494F8 AC620010 */ sw $v0, 0x10($v1) D_802494FC: /* 169D5C 802494FC 24620020 */ addiu $v0, $v1, 0x20 /* 169D60 80249500 AC600014 */ sw $zero, 0x14($v1) /* 169D64 80249504 AD020000 */ sw $v0, 0x0($t0) /* 169D68 80249508 3C02F000 */ lui $v0, (0xF0000000 >> 16) .L8024950C: /* 169D6C 8024950C AC620018 */ sw $v0, 0x18($v1) /* 169D70 80249510 24620028 */ addiu $v0, $v1, 0x28 /* 169D74 80249514 AC67001C */ sw $a3, 0x1C($v1) /* 169D78 80249518 AD020000 */ sw $v0, 0x0($t0) /* 169D7C 8024951C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 169D80 80249520 AC620020 */ sw $v0, 0x20($v1) /* 169D84 80249524 AC600024 */ sw $zero, 0x24($v1) .L80249528: /* 169D88 80249528 2A420010 */ slti $v0, $s2, 0x10 /* 169D8C 8024952C 1440005E */ bnez $v0, .L802496A8 /* 169D90 80249530 3242000F */ andi $v0, $s2, 0xF /* 169D94 80249534 1440005C */ bnez $v0, .L802496A8 /* 169D98 80249538 0240202D */ daddu $a0, $s2, $zero /* 169D9C 8024953C 3C02FD50 */ lui $v0, (0xFD500000 >> 16) /* 169DA0 80249540 3C070700 */ lui $a3, (0x7000000 >> 16) D_80249544: /* 169DA4 80249544 8D050000 */ lw $a1, 0x0($t0) /* 169DA8 80249548 01690018 */ mult $t3, $t1 /* 169DAC 8024954C 00A0182D */ daddu $v1, $a1, $zero /* 169DB0 80249550 24A50008 */ addiu $a1, $a1, 0x8 /* 169DB4 80249554 AD050000 */ sw $a1, 0x0($t0) /* 169DB8 80249558 AC620000 */ sw $v0, 0x0($v1) .L8024955C: /* 169DBC 8024955C 24A20008 */ addiu $v0, $a1, 0x8 /* 169DC0 80249560 AD020000 */ sw $v0, 0x0($t0) /* 169DC4 80249564 24A20010 */ addiu $v0, $a1, 0x10 .L80249568: /* 169DC8 80249568 AD020000 */ sw $v0, 0x0($t0) .L8024956C: /* 169DCC 8024956C 24A20018 */ addiu $v0, $a1, 0x18 D_80249570: /* 169DD0 80249570 AD020000 */ sw $v0, 0x0($t0) /* 169DD4 80249574 00007012 */ mflo $t6 /* 169DD8 80249578 018E1021 */ addu $v0, $t4, $t6 /* 169DDC 8024957C AC620004 */ sw $v0, 0x4($v1) .L80249580: /* 169DE0 80249580 3C02F550 */ lui $v0, (0xF5500000 >> 16) /* 169DE4 80249584 ACA20000 */ sw $v0, 0x0($a1) /* 169DE8 80249588 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 169DEC 8024958C ACA20008 */ sw $v0, 0x8($a1) .L80249590: /* 169DF0 80249590 3C02F300 */ lui $v0, (0xF3000000 >> 16) .L80249594: /* 169DF4 80249594 ACA70004 */ sw $a3, 0x4($a1) .L80249598: /* 169DF8 80249598 ACA0000C */ sw $zero, 0xC($a1) /* 169DFC 8024959C 06410002 */ bgez $s2, .L802495A8 /* 169E00 802495A0 ACA20010 */ sw $v0, 0x10($a1) /* 169E04 802495A4 2644000F */ addiu $a0, $s2, 0xF .L802495A8: /* 169E08 802495A8 00043103 */ sra $a2, $a0, 4 D_802495AC: /* 169E0C 802495AC 18C00002 */ blez $a2, .L802495B8 /* 169E10 802495B0 24030800 */ addiu $v1, $zero, 0x800 /* 169E14 802495B4 24C307FF */ addiu $v1, $a2, 0x7FF .L802495B8: /* 169E18 802495B8 02530018 */ mult $s2, $s3 /* 169E1C 802495BC 00007012 */ mflo $t6 /* 169E20 802495C0 25C20003 */ addiu $v0, $t6, 0x3 /* 169E24 802495C4 00021083 */ sra $v0, $v0, 2 /* 169E28 802495C8 2444FFFF */ addiu $a0, $v0, -0x1 /* 169E2C 802495CC 28820800 */ slti $v0, $a0, 0x800 /* 169E30 802495D0 50400001 */ beql $v0, $zero, .L802495D8 /* 169E34 802495D4 240407FF */ addiu $a0, $zero, 0x7FF .L802495D8: /* 169E38 802495D8 30820FFF */ andi $v0, $a0, 0xFFF D_802495DC: /* 169E3C 802495DC 00021300 */ sll $v0, $v0, 12 D_802495E0: /* 169E40 802495E0 18C0000D */ blez $a2, .L80249618 /* 169E44 802495E4 00472025 */ or $a0, $v0, $a3 /* 169E48 802495E8 14C00002 */ bnez $a2, .L802495F4 /* 169E4C 802495EC 0066001A */ div $zero, $v1, $a2 /* 169E50 802495F0 0007000D */ break 7 .L802495F4: /* 169E54 802495F4 2401FFFF */ addiu $at, $zero, -0x1 /* 169E58 802495F8 14C10004 */ bne $a2, $at, .L8024960C /* 169E5C 802495FC 3C018000 */ lui $at, (0x80000000 >> 16) /* 169E60 80249600 14610002 */ bne $v1, $at, .L8024960C .L80249604: /* 169E64 80249604 00000000 */ nop /* 169E68 80249608 0006000D */ break 6 .L8024960C: /* 169E6C 8024960C 00001012 */ mflo $v0 /* 169E70 80249610 08092587 */ j func_8024961C /* 169E74 80249614 30420FFF */ andi $v0, $v0, 0xFFF .L80249618: /* 169E78 80249618 30620FFF */ andi $v0, $v1, 0xFFF glabel func_8024961C /* 169E7C 8024961C 00821025 */ or $v0, $a0, $v0 /* 169E80 80249620 ACA20014 */ sw $v0, 0x14($a1) /* 169E84 80249624 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 169E88 80249628 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 169E8C 8024962C 8CA40000 */ lw $a0, 0x0($a1) /* 169E90 80249630 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 169E94 80249634 0080182D */ daddu $v1, $a0, $zero /* 169E98 80249638 24840008 */ addiu $a0, $a0, 0x8 D_8024963C: /* 169E9C 8024963C ACA40000 */ sw $a0, 0x0($a1) /* 169EA0 80249640 AC620000 */ sw $v0, 0x0($v1) /* 169EA4 80249644 24820008 */ addiu $v0, $a0, 0x8 /* 169EA8 80249648 AC600004 */ sw $zero, 0x4($v1) /* 169EAC 8024964C ACA20000 */ sw $v0, 0x0($a1) /* 169EB0 80249650 00121043 */ sra $v0, $s2, 1 /* 169EB4 80249654 24420007 */ addiu $v0, $v0, 0x7 /* 169EB8 80249658 000210C2 */ srl $v0, $v0, 3 /* 169EBC 8024965C 00021240 */ sll $v0, $v0, 9 .L80249660: /* 169EC0 80249660 3C03F540 */ lui $v1, (0xF5400000 >> 16) /* 169EC4 80249664 00431025 */ or $v0, $v0, $v1 /* 169EC8 80249668 AC820000 */ sw $v0, 0x0($a0) /* 169ECC 8024966C 24820010 */ addiu $v0, $a0, 0x10 /* 169ED0 80249670 AC800004 */ sw $zero, 0x4($a0) /* 169ED4 80249674 ACA20000 */ sw $v0, 0x0($a1) .L80249678: /* 169ED8 80249678 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 169EDC 8024967C 2643FFFF */ addiu $v1, $s2, -0x1 /* 169EE0 80249680 00031880 */ sll $v1, $v1, 2 /* 169EE4 80249684 30630FFF */ andi $v1, $v1, 0xFFF /* 169EE8 80249688 00031B00 */ sll $v1, $v1, 12 /* 169EEC 8024968C AC820008 */ sw $v0, 0x8($a0) /* 169EF0 80249690 2662FFFF */ addiu $v0, $s3, -0x1 D_80249694: /* 169EF4 80249694 00021080 */ sll $v0, $v0, 2 /* 169EF8 80249698 30420FFF */ andi $v0, $v0, 0xFFF /* 169EFC 8024969C 00621825 */ or $v1, $v1, $v0 .L802496A0: /* 169F00 802496A0 080925EB */ j .L802497AC /* 169F04 802496A4 AC83000C */ sw $v1, 0xC($a0) .L802496A8: /* 169F08 802496A8 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 169F0C 802496AC 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) .L802496B0: /* 169F10 802496B0 00123043 */ sra $a2, $s2, 1 /* 169F14 802496B4 24C2FFFF */ addiu $v0, $a2, -0x1 /* 169F18 802496B8 30420FFF */ andi $v0, $v0, 0xFFF /* 169F1C 802496BC 3C03FD48 */ lui $v1, (0xFD480000 >> 16) /* 169F20 802496C0 00431025 */ or $v0, $v0, $v1 /* 169F24 802496C4 24C60007 */ addiu $a2, $a2, 0x7 /* 169F28 802496C8 000630C2 */ srl $a2, $a2, 3 /* 169F2C 802496CC 00063240 */ sll $a2, $a2, 9 /* 169F30 802496D0 2643FFFF */ addiu $v1, $s2, -0x1 .L802496D4: /* 169F34 802496D4 8CA40000 */ lw $a0, 0x0($a1) /* 169F38 802496D8 01690018 */ mult $t3, $t1 /* 169F3C 802496DC 0080382D */ daddu $a3, $a0, $zero /* 169F40 802496E0 24840008 */ addiu $a0, $a0, 0x8 /* 169F44 802496E4 ACA40000 */ sw $a0, 0x0($a1) /* 169F48 802496E8 ACE20000 */ sw $v0, 0x0($a3) /* 169F4C 802496EC 24820008 */ addiu $v0, $a0, 0x8 D_802496F0: /* 169F50 802496F0 ACA20000 */ sw $v0, 0x0($a1) D_802496F4: /* 169F54 802496F4 24820010 */ addiu $v0, $a0, 0x10 .L802496F8: /* 169F58 802496F8 ACA20000 */ sw $v0, 0x0($a1) .L802496FC: /* 169F5C 802496FC 24820018 */ addiu $v0, $a0, 0x18 /* 169F60 80249700 ACA20000 */ sw $v0, 0x0($a1) /* 169F64 80249704 24820020 */ addiu $v0, $a0, 0x20 /* 169F68 80249708 ACA20000 */ sw $v0, 0x0($a1) /* 169F6C 8024970C 24820028 */ addiu $v0, $a0, 0x28 /* 169F70 80249710 ACA20000 */ sw $v0, 0x0($a1) /* 169F74 80249714 24820030 */ addiu $v0, $a0, 0x30 /* 169F78 80249718 ACA20000 */ sw $v0, 0x0($a1) /* 169F7C 8024971C 2665FFFF */ addiu $a1, $s3, -0x1 /* 169F80 80249720 00052880 */ sll $a1, $a1, 2 /* 169F84 80249724 30A50FFF */ andi $a1, $a1, 0xFFF /* 169F88 80249728 00007012 */ mflo $t6 /* 169F8C 8024972C 018E1021 */ addu $v0, $t4, $t6 /* 169F90 80249730 ACE20004 */ sw $v0, 0x4($a3) /* 169F94 80249734 3C02F548 */ lui $v0, (0xF5480000 >> 16) /* 169F98 80249738 00C21025 */ or $v0, $a2, $v0 /* 169F9C 8024973C 3C070700 */ lui $a3, (0x7000000 >> 16) /* 169FA0 80249740 AC820000 */ sw $v0, 0x0($a0) /* 169FA4 80249744 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 169FA8 80249748 AC820008 */ sw $v0, 0x8($a0) /* 169FAC 8024974C 3C02F400 */ lui $v0, (0xF4000000 >> 16) D_80249750: /* 169FB0 80249750 AC820010 */ sw $v0, 0x10($a0) /* 169FB4 80249754 00031040 */ sll $v0, $v1, 1 glabel func_80249758 /* 169FB8 80249758 30420FFF */ andi $v0, $v0, 0xFFF /* 169FBC 8024975C 00021300 */ sll $v0, $v0, 12 /* 169FC0 80249760 AC870004 */ sw $a3, 0x4($a0) /* 169FC4 80249764 00A73825 */ or $a3, $a1, $a3 /* 169FC8 80249768 00471025 */ or $v0, $v0, $a3 /* 169FCC 8024976C AC820014 */ sw $v0, 0x14($a0) /* 169FD0 80249770 3C02E700 */ lui $v0, (0xE7000000 >> 16) .L80249774: /* 169FD4 80249774 AC820018 */ sw $v0, 0x18($a0) /* 169FD8 80249778 3C02F540 */ lui $v0, (0xF5400000 >> 16) /* 169FDC 8024977C 00C23025 */ or $a2, $a2, $v0 /* 169FE0 80249780 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 169FE4 80249784 00031880 */ sll $v1, $v1, 2 /* 169FE8 80249788 30630FFF */ andi $v1, $v1, 0xFFF /* 169FEC 8024978C 00031B00 */ sll $v1, $v1, 12 /* 169FF0 80249790 00651825 */ or $v1, $v1, $a1 /* 169FF4 80249794 AC80000C */ sw $zero, 0xC($a0) /* 169FF8 80249798 AC80001C */ sw $zero, 0x1C($a0) /* 169FFC 8024979C AC860020 */ sw $a2, 0x20($a0) /* 16A000 802497A0 AC800024 */ sw $zero, 0x24($a0) /* 16A004 802497A4 AC820028 */ sw $v0, 0x28($a0) /* 16A008 802497A8 AC83002C */ sw $v1, 0x2C($a0) .L802497AC: /* 16A00C 802497AC 11A0003A */ beqz $t5, func_80249898 glabel func_802497B0 /* 16A010 802497B0 3C0AFCFF */ lui $t2, (0xFCFF97FF >> 16) /* 16A014 802497B4 354A97FF */ ori $t2, $t2, (0xFCFF97FF & 0xFFFF) /* 16A018 802497B8 3C08FF2D */ lui $t0, (0xFF2DFEFF >> 16) /* 16A01C 802497BC 3508FEFF */ ori $t0, $t0, (0xFF2DFEFF & 0xFFFF) /* 16A020 802497C0 3C11E200 */ lui $s1, (0xE200001C >> 16) /* 16A024 802497C4 3631001C */ ori $s1, $s1, (0xE200001C & 0xFFFF) .L802497C8: /* 16A028 802497C8 3C090050 */ lui $t1, (0x504340 >> 16) /* 16A02C 802497CC 35294340 */ ori $t1, $t1, (0x504340 & 0xFFFF) glabel func_802497D0 /* 16A030 802497D0 26A40002 */ addiu $a0, $s5, 0x2 /* 16A034 802497D4 00042080 */ sll $a0, $a0, 2 .L802497D8: /* 16A038 802497D8 26C50002 */ addiu $a1, $s6, 0x2 /* 16A03C 802497DC 00052880 */ sll $a1, $a1, 2 /* 16A040 802497E0 26460002 */ addiu $a2, $s2, 0x2 /* 16A044 802497E4 02A63021 */ addu $a2, $s5, $a2 /* 16A048 802497E8 00063080 */ sll $a2, $a2, 2 /* 16A04C 802497EC 3C10800A */ lui $s0, %hi(gMainGfxPos) /* 16A050 802497F0 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) .L802497F4: /* 16A054 802497F4 26670002 */ addiu $a3, $s3, 0x2 /* 16A058 802497F8 02C73821 */ addu $a3, $s6, $a3 /* 16A05C 802497FC 8E020000 */ lw $v0, 0x0($s0) /* 16A060 80249800 00073880 */ sll $a3, $a3, 2 glabel func_80249804 /* 16A064 80249804 0040182D */ daddu $v1, $v0, $zero /* 16A068 80249808 24420008 */ addiu $v0, $v0, 0x8 .L8024980C: /* 16A06C 8024980C AE020000 */ sw $v0, 0x0($s0) /* 16A070 80249810 AC6A0000 */ sw $t2, 0x0($v1) /* 16A074 80249814 AC680004 */ sw $t0, 0x4($v1) /* 16A078 80249818 24430008 */ addiu $v1, $v0, 0x8 D_8024981C: /* 16A07C 8024981C AE030000 */ sw $v1, 0x0($s0) /* 16A080 80249820 AC510000 */ sw $s1, 0x0($v0) /* 16A084 80249824 AC490004 */ sw $t1, 0x4($v0) glabel func_80249828 /* 16A088 80249828 24020400 */ addiu $v0, $zero, 0x400 /* 16A08C 8024982C AFA00010 */ sw $zero, 0x10($sp) /* 16A090 80249830 AFA00014 */ sw $zero, 0x14($sp) /* 16A094 80249834 AFA00018 */ sw $zero, 0x18($sp) /* 16A098 80249838 AFA2001C */ sw $v0, 0x1C($sp) /* 16A09C 8024983C 0C090AE8 */ jal func_80242BA0 /* 16A0A0 80249840 AFA20020 */ sw $v0, 0x20($sp) /* 16A0A4 80249844 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16) /* 16A0A8 80249848 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF) /* 16A0AC 8024984C 3C05FFFC */ lui $a1, (0xFFFCF279 >> 16) .L80249850: /* 16A0B0 80249850 34A5F279 */ ori $a1, $a1, (0xFFFCF279 & 0xFFFF) D_80249854: /* 16A0B4 80249854 3C070F0A */ lui $a3, (0xF0A7008 >> 16) /* 16A0B8 80249858 34E77008 */ ori $a3, $a3, (0xF0A7008 & 0xFFFF) /* 16A0BC 8024985C 8E020000 */ lw $v0, 0x0($s0) /* 16A0C0 80249860 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 16A0C4 80249864 0040202D */ daddu $a0, $v0, $zero .L80249868: /* 16A0C8 80249868 24420008 */ addiu $v0, $v0, 0x8 /* 16A0CC 8024986C AE020000 */ sw $v0, 0x0($s0) dgb_01_img2_gfx: /* 16A0D0 80249870 AC830000 */ sw $v1, 0x0($a0) .L80249874: /* 16A0D4 80249874 24430008 */ addiu $v1, $v0, 0x8 /* 16A0D8 80249878 AC800004 */ sw $zero, 0x4($a0) D_8024987C: /* 16A0DC 8024987C AE030000 */ sw $v1, 0x0($s0) /* 16A0E0 80249880 24430010 */ addiu $v1, $v0, 0x10 .L80249884: /* 16A0E4 80249884 AC460000 */ sw $a2, 0x0($v0) /* 16A0E8 80249888 AC450004 */ sw $a1, 0x4($v0) /* 16A0EC 8024988C AE030000 */ sw $v1, 0x0($s0) /* 16A0F0 80249890 AC510008 */ sw $s1, 0x8($v0) /* 16A0F4 80249894 AC47000C */ sw $a3, 0xC($v0) glabel func_80249898 /* 16A0F8 80249898 00152080 */ sll $a0, $s5, 2 /* 16A0FC 8024989C 00162880 */ sll $a1, $s6, 2 /* 16A100 802498A0 02B23021 */ addu $a2, $s5, $s2 /* 16A104 802498A4 00063080 */ sll $a2, $a2, 2 D_802498A8: /* 16A108 802498A8 02D33821 */ addu $a3, $s6, $s3 /* 16A10C 802498AC 00073880 */ sll $a3, $a3, 2 /* 16A110 802498B0 24020400 */ addiu $v0, $zero, 0x400 /* 16A114 802498B4 AFA00010 */ sw $zero, 0x10($sp) /* 16A118 802498B8 AFA00014 */ sw $zero, 0x14($sp) .L802498BC: /* 16A11C 802498BC AFA00018 */ sw $zero, 0x18($sp) /* 16A120 802498C0 AFA2001C */ sw $v0, 0x1C($sp) D_802498C4: /* 16A124 802498C4 0C090AE8 */ jal func_80242BA0 /* 16A128 802498C8 AFA20020 */ sw $v0, 0x20($sp) /* 16A12C 802498CC 3C03800A */ lui $v1, %hi(gMainGfxPos) D_802498D0: /* 16A130 802498D0 8C63A66C */ lw $v1, %lo(gMainGfxPos)($v1) D_802498D4: /* 16A134 802498D4 3C018025 */ lui $at, %hi(D_8024B7C8) D_802498D8: /* 16A138 802498D8 AC23B7C8 */ sw $v1, %lo(D_8024B7C8)($at) D_802498DC: /* 16A13C 802498DC 08092655 */ j .L80249954 D_802498E0: /* 16A140 802498E0 0280102D */ daddu $v0, $s4, $zero D_802498E4: /* 16A144 802498E4 15220003 */ bne $t1, $v0, D_802498F4 D_802498E8: /* 16A148 802498E8 240200F4 */ addiu $v0, $zero, 0xF4 D_802498EC: /* 16A14C 802498EC 08092655 */ j .L80249954 dgb_01_img3_png: /* 16A150 802498F0 2682FFFA */ addiu $v0, $s4, -0x6 D_802498F4: /* 16A154 802498F4 11220010 */ beq $t1, $v0, .L80249938 D_802498F8: /* 16A158 802498F8 292200F5 */ slti $v0, $t1, 0xF5 D_802498FC: /* 16A15C 802498FC 10400005 */ beqz $v0, D_80249914 D_80249900: /* 16A160 80249900 240200F3 */ addiu $v0, $zero, 0xF3 D_80249904: /* 16A164 80249904 1122000A */ beq $t1, $v0, func_80249930 D_80249908: /* 16A168 80249908 0000102D */ daddu $v0, $zero, $zero D_8024990C: /* 16A16C 8024990C 08092655 */ j .L80249954 D_80249910: /* 16A170 80249910 00000000 */ nop D_80249914: /* 16A174 80249914 240200F5 */ addiu $v0, $zero, 0xF5 /* 16A178 80249918 11220009 */ beq $t1, $v0, .L80249940 /* 16A17C 8024991C 240200F6 */ addiu $v0, $zero, 0xF6 .L80249920: /* 16A180 80249920 11220009 */ beq $t1, $v0, .L80249948 /* 16A184 80249924 0000102D */ daddu $v0, $zero, $zero /* 16A188 80249928 08092655 */ j .L80249954 /* 16A18C 8024992C 00000000 */ nop glabel func_80249930 /* 16A190 80249930 08092654 */ j .L80249950 D_80249934: /* 16A194 80249934 ACA00000 */ sw $zero, 0x0($a1) .L80249938: /* 16A198 80249938 08092653 */ j .L8024994C /* 16A19C 8024993C 24020001 */ addiu $v0, $zero, 0x1 .L80249940: /* 16A1A0 80249940 08092653 */ j .L8024994C /* 16A1A4 80249944 24020002 */ addiu $v0, $zero, 0x2 .L80249948: /* 16A1A8 80249948 24020003 */ addiu $v0, $zero, 0x3 .L8024994C: /* 16A1AC 8024994C ACA20000 */ sw $v0, 0x0($a1) .L80249950: /* 16A1B0 80249950 0000102D */ daddu $v0, $zero, $zero .L80249954: /* 16A1B4 80249954 8FBF0044 */ lw $ra, 0x44($sp) glabel func_80249958 /* 16A1B8 80249958 8FB60040 */ lw $s6, 0x40($sp) D_8024995C: /* 16A1BC 8024995C 8FB5003C */ lw $s5, 0x3C($sp) D_80249960: /* 16A1C0 80249960 8FB40038 */ lw $s4, 0x38($sp) /* 16A1C4 80249964 8FB30034 */ lw $s3, 0x34($sp) glabel func_80249968 /* 16A1C8 80249968 8FB20030 */ lw $s2, 0x30($sp) /* 16A1CC 8024996C 8FB1002C */ lw $s1, 0x2C($sp) glabel func_80249970 /* 16A1D0 80249970 8FB00028 */ lw $s0, 0x28($sp) /* 16A1D4 80249974 03E00008 */ jr $ra /* 16A1D8 80249978 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 filemenu_draw_char(s32 c, s32 x, s32 y, s32 flag1, s32 color, s32 flag2) { MessageCharset* charset; s32 texSizeX; s32 texSizeY; s32 charRasterSize; MessageCharData* charData; u8* raster; s32 charWidth; if (flag1 != filemenu_charset) { filemenu_charset = flag1; filemenu_charset_raster_id = 0; } charset = gMsgCharsets[filemenu_charset]; texSizeX = charset->texSize.x; texSizeY = charset->texSize.y; charRasterSize = charset->charRasterSize; charData = &charset->rasters[filemenu_charset_raster_id]; charWidth = charData->monospaceWidth; raster = charData->raster; if (c < 0xA2) { charWidth = charData->charWidthTable[c]; if (gMainGfxPos != filemenu_savedGfxPos) { gSPDisplayList(gMainGfxPos++, filemenu_dl_draw_char_init); filemenu_char_color = -1; } if (filemenu_char_color != color) { filemenu_char_color = color; gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[color]); } if (texSizeX >= 16 && texSizeX % 16 == 0) { gDPLoadTextureBlock_4b(gMainGfxPos++, &raster[charRasterSize * c], G_IM_FMT_CI, texSizeX, texSizeY, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } else { gDPLoadTextureTile_4b(gMainGfxPos++, &raster[charRasterSize * c], G_IM_FMT_CI, texSizeX, texSizeY, 0, 0, texSizeX - 1, texSizeY - 1, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } if (flag2) { gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07); gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); filemenu_draw_rect((x + 2) * 4, (y + 2) * 4, (2 + x + texSizeX) * 4, (2 + y + texSizeY) * 4, 0, 0, 0, 0x400, 0x400); gDPPipeSync(gMainGfxPos++); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); } filemenu_draw_rect(x * 4, y * 4, (x + texSizeX) * 4, (y + texSizeY) * 4, 0, 0, 0, 0x400, 0x400); filemenu_savedGfxPos = gMainGfxPos; return charWidth; } #if VERSION_IQUE if (c >= 0x100) { int offset; s32 character; s32* offsetPtr = &filemenu_glyphBufferIndex; character = c < 0 ? c + 0xFF : c; offset = (((character >> 8) - 1) * 0x31) + (c & 0xff) + 0x47; *offsetPtr = offset; // Probably modifying data outside of the filemenu_glyphBuffer array load_font_data(charset_standard_OFFSET + offset * 0x80, 0x80, &filemenu_glyphBuffer[*offsetPtr][0]); if (gMainGfxPos != filemenu_savedGfxPos) { gSPDisplayList(gMainGfxPos++, filemenu_dl_draw_char_init); filemenu_char_color = -1; } if (filemenu_char_color != color) { filemenu_char_color = color; gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[color]); } gDPLoadTextureBlock_4b(gMainGfxPos++, &filemenu_glyphBuffer[*offsetPtr][0], G_IM_FMT_CI, 16, 16, 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); if (flag2) { gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07); gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); filemenu_draw_rect((x + 2) * 4, (y + 2) * 4, (x + 18) * 4, (y + 18) * 4, 0, 0, 0, 0x400, 0x400); gDPPipeSync(gMainGfxPos++); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); } filemenu_draw_rect(x * 4, y * 4, (x + 16) * 4, (y + 16) * 4, 0, 0, 0, 0x400, 0x400); filemenu_savedGfxPos = gMainGfxPos; *offsetPtr = (*offsetPtr + 1) % 20; return 16; } #endif if (c == 0xF7) { return charWidth - 6; } switch (c) { case 0xF3: filemenu_charset_raster_id = 0; break; case 0xF4: filemenu_charset_raster_id = 1; break; case 0xF5: filemenu_charset_raster_id = 2; break; case 0xF6: filemenu_charset_raster_id = 3; break; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel check_input_open_menus /* 80194 800E6CE4 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 80198 800E6CE8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 8019C 800E6CEC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 801A0 800E6CF0 AFB3001C */ sw $s3, 0x1C($sp) /* 801A4 800E6CF4 3C138011 */ lui $s3, %hi(gPartnerStatus) /* 801A8 800E6CF8 2673EBB0 */ addiu $s3, $s3, %lo(gPartnerStatus) /* 801AC 800E6CFC AFB40020 */ sw $s4, 0x20($sp) /* 801B0 800E6D00 3C148011 */ lui $s4, %hi(gPlayerStatus) /* 801B4 800E6D04 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) /* 801B8 800E6D08 AFBF0024 */ sw $ra, 0x24($sp) /* 801BC 800E6D0C AFB20018 */ sw $s2, 0x18($sp) /* 801C0 800E6D10 AFB10014 */ sw $s1, 0x14($sp) /* 801C4 800E6D14 AFB00010 */ sw $s0, 0x10($sp) /* 801C8 800E6D18 80620078 */ lb $v0, 0x78($v1) /* 801CC 800E6D1C 3C128011 */ lui $s2, %hi(D_8010C9C8) /* 801D0 800E6D20 2652C9C8 */ addiu $s2, $s2, %lo(D_8010C9C8) /* 801D4 800E6D24 14400151 */ bnez $v0, .L800E726C /* 801D8 800E6D28 00000000 */ nop /* 801DC 800E6D2C 9062007E */ lbu $v0, 0x7E($v1) /* 801E0 800E6D30 30420001 */ andi $v0, $v0, 0x1 /* 801E4 800E6D34 1440014D */ bnez $v0, .L800E726C /* 801E8 800E6D38 0000202D */ daddu $a0, $zero, $zero /* 801EC 800E6D3C 3C05F5DE */ lui $a1, (0xF5DE0180 >> 16) /* 801F0 800E6D40 0C0B1EAF */ jal evt_get_variable /* 801F4 800E6D44 34A50180 */ ori $a1, $a1, (0xF5DE0180 & 0xFFFF) /* 801F8 800E6D48 2403FF80 */ addiu $v1, $zero, -0x80 /* 801FC 800E6D4C 10430147 */ beq $v0, $v1, .L800E726C /* 80200 800E6D50 00000000 */ nop /* 80204 800E6D54 82620000 */ lb $v0, 0x0($s3) /* 80208 800E6D58 1040000A */ beqz $v0, .L800E6D84 /* 8020C 800E6D5C 00000000 */ nop /* 80210 800E6D60 92620003 */ lbu $v0, 0x3($s3) /* 80214 800E6D64 2442FFF9 */ addiu $v0, $v0, -0x7 /* 80218 800E6D68 2C420003 */ sltiu $v0, $v0, 0x3 /* 8021C 800E6D6C 10400005 */ beqz $v0, .L800E6D84 /* 80220 800E6D70 0000202D */ daddu $a0, $zero, $zero /* 80224 800E6D74 8E710008 */ lw $s1, 0x8($s3) /* 80228 800E6D78 8E70000C */ lw $s0, 0xC($s3) /* 8022C 800E6D7C 08039B65 */ j .L800E6D94 /* 80230 800E6D80 3C05F5DE */ lui $a1, (0xF5DE0180 >> 16) .L800E6D84: /* 80234 800E6D84 8E9100DC */ lw $s1, 0xDC($s4) /* 80238 800E6D88 8E9000E0 */ lw $s0, 0xE0($s4) /* 8023C 800E6D8C 0000202D */ daddu $a0, $zero, $zero /* 80240 800E6D90 3C05F5DE */ lui $a1, (0xF5DE0180 >> 16) .L800E6D94: /* 80244 800E6D94 0C0B1EAF */ jal evt_get_variable /* 80248 800E6D98 34A50180 */ ori $a1, $a1, (0xF5DE0180 & 0xFFFF) /* 8024C 800E6D9C 28420060 */ slti $v0, $v0, 0x60 /* 80250 800E6DA0 14400003 */ bnez $v0, .L800E6DB0 /* 80254 800E6DA4 2402FFFC */ addiu $v0, $zero, -0x4 /* 80258 800E6DA8 02228824 */ and $s1, $s1, $v0 /* 8025C 800E6DAC 02028024 */ and $s0, $s0, $v0 .L800E6DB0: /* 80260 800E6DB0 3C038011 */ lui $v1, %hi(D_8010CD00) /* 80264 800E6DB4 8463CD00 */ lh $v1, %lo(D_8010CD00)($v1) /* 80268 800E6DB8 2C62000B */ sltiu $v0, $v1, 0xB /* 8026C 800E6DBC 1040012B */ beqz $v0, .L800E726C /* 80270 800E6DC0 00031080 */ sll $v0, $v1, 2 /* 80274 800E6DC4 3C018011 */ lui $at, %hi(jtbl_8010BF30) /* 80278 800E6DC8 00220821 */ addu $at, $at, $v0 /* 8027C 800E6DCC 8C22BF30 */ lw $v0, %lo(jtbl_8010BF30)($at) /* 80280 800E6DD0 00400008 */ jr $v0 /* 80284 800E6DD4 00000000 */ nop glabel .L800E6DD8 /* 80288 800E6DD8 0220202D */ daddu $a0, $s1, $zero /* 8028C 800E6DDC 0C039A77 */ jal can_pause /* 80290 800E6DE0 0200282D */ daddu $a1, $s0, $zero /* 80294 800E6DE4 10400121 */ beqz $v0, .L800E726C /* 80298 800E6DE8 24020001 */ addiu $v0, $zero, 0x1 /* 8029C 800E6DEC 3C038011 */ lui $v1, %hi(D_8010CCF8) /* 802A0 800E6DF0 2463CCF8 */ addiu $v1, $v1, %lo(D_8010CCF8) /* 802A4 800E6DF4 A4620000 */ sh $v0, 0x0($v1) /* 802A8 800E6DF8 32020001 */ andi $v0, $s0, 0x1 /* 802AC 800E6DFC 54400001 */ bnel $v0, $zero, .L800E6E04 /* 802B0 800E6E00 A4600000 */ sh $zero, 0x0($v1) .L800E6E04: /* 802B4 800E6E04 32021000 */ andi $v0, $s0, 0x1000 /* 802B8 800E6E08 10400002 */ beqz $v0, .L800E6E14 /* 802BC 800E6E0C 24020002 */ addiu $v0, $zero, 0x2 /* 802C0 800E6E10 A4620000 */ sh $v0, 0x0($v1) .L800E6E14: /* 802C4 800E6E14 3C018011 */ lui $at, %hi(D_8010C9C0) /* 802C8 800E6E18 A420C9C0 */ sh $zero, %lo(D_8010C9C0)($at) .L800E6E1C: /* 802CC 800E6E1C 3C038011 */ lui $v1, %hi(D_8010CCF8) /* 802D0 800E6E20 8463CCF8 */ lh $v1, %lo(D_8010CCF8)($v1) /* 802D4 800E6E24 10600005 */ beqz $v1, .L800E6E3C /* 802D8 800E6E28 24020001 */ addiu $v0, $zero, 0x1 /* 802DC 800E6E2C 1062001F */ beq $v1, $v0, .L800E6EAC /* 802E0 800E6E30 00000000 */ nop /* 802E4 800E6E34 08039BB2 */ j .L800E6EC8 /* 802E8 800E6E38 00000000 */ nop .L800E6E3C: /* 802EC 800E6E3C 8E820000 */ lw $v0, 0x0($s4) /* 802F0 800E6E40 30420040 */ andi $v0, $v0, 0x40 /* 802F4 800E6E44 10400009 */ beqz $v0, .L800E6E6C /* 802F8 800E6E48 00000000 */ nop /* 802FC 800E6E4C 0C05272D */ jal sfx_play_sound /* 80300 800E6E50 2404021D */ addiu $a0, $zero, 0x21D /* 80304 800E6E54 3C028011 */ lui $v0, %hi(D_8010C9C0) /* 80308 800E6E58 8442C9C0 */ lh $v0, %lo(D_8010C9C0)($v0) /* 8030C 800E6E5C 10400103 */ beqz $v0, .L800E726C /* 80310 800E6E60 00000000 */ nop /* 80314 800E6E64 08039C72 */ j .L800E71C8 /* 80318 800E6E68 00000000 */ nop .L800E6E6C: /* 8031C 800E6E6C 0C039ADE */ jal setup_partner_popup /* 80320 800E6E70 0240202D */ daddu $a0, $s2, $zero /* 80324 800E6E74 104000FD */ beqz $v0, .L800E726C /* 80328 800E6E78 24030001 */ addiu $v1, $zero, 0x1 /* 8032C 800E6E7C AE420324 */ sw $v0, 0x324($s2) /* 80330 800E6E80 3C028011 */ lui $v0, %hi(gPlayerData) /* 80334 800E6E84 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* 80338 800E6E88 80420012 */ lb $v0, 0x12($v0) /* 8033C 800E6E8C AE430318 */ sw $v1, 0x318($s2) /* 80340 800E6E90 00021080 */ sll $v0, $v0, 2 /* 80344 800E6E94 3C018009 */ lui $at, %hi(D_8008EEF0) /* 80348 800E6E98 00220821 */ addu $at, $at, $v0 /* 8034C 800E6E9C 8C22EEF0 */ lw $v0, %lo(D_8008EEF0)($at) /* 80350 800E6EA0 2442FFFF */ addiu $v0, $v0, -0x1 /* 80354 800E6EA4 08039BB2 */ j .L800E6EC8 /* 80358 800E6EA8 AE420328 */ sw $v0, 0x328($s2) .L800E6EAC: /* 8035C 800E6EAC 0C039B11 */ jal setup_item_popup /* 80360 800E6EB0 0240202D */ daddu $a0, $s2, $zero /* 80364 800E6EB4 104000ED */ beqz $v0, .L800E726C /* 80368 800E6EB8 00000000 */ nop /* 8036C 800E6EBC AE400318 */ sw $zero, 0x318($s2) /* 80370 800E6EC0 AE420324 */ sw $v0, 0x324($s2) /* 80374 800E6EC4 AE400328 */ sw $zero, 0x328($s2) .L800E6EC8: /* 80378 800E6EC8 8E820000 */ lw $v0, 0x0($s4) /* 8037C 800E6ECC 34420020 */ ori $v0, $v0, 0x20 /* 80380 800E6ED0 0C03805E */ jal disable_player_input /* 80384 800E6ED4 AE820000 */ sw $v0, 0x0($s4) /* 80388 800E6ED8 0C03BD8A */ jal partner_disable_input /* 8038C 800E6EDC 00000000 */ nop /* 80390 800E6EE0 24020003 */ addiu $v0, $zero, 0x3 /* 80394 800E6EE4 3C018011 */ lui $at, %hi(D_8010CCFA) /* 80398 800E6EE8 A422CCFA */ sh $v0, %lo(D_8010CCFA)($at) /* 8039C 800E6EEC 92820015 */ lbu $v0, 0x15($s4) /* 803A0 800E6EF0 24030001 */ addiu $v1, $zero, 0x1 /* 803A4 800E6EF4 3C018011 */ lui $at, %hi(D_8010CD00) /* 803A8 800E6EF8 A423CD00 */ sh $v1, %lo(D_8010CD00)($at) /* 803AC 800E6EFC 00021600 */ sll $v0, $v0, 24 /* 803B0 800E6F00 00021603 */ sra $v0, $v0, 24 /* 803B4 800E6F04 3C018011 */ lui $at, %hi(D_8010CCFE) /* 803B8 800E6F08 A422CCFE */ sh $v0, %lo(D_8010CCFE)($at) /* 803BC 800E6F0C 08039C9B */ j .L800E726C /* 803C0 800E6F10 00000000 */ nop glabel .L800E6F14 /* 803C4 800E6F14 0C039A41 */ jal func_800E6904 /* 803C8 800E6F18 00000000 */ nop /* 803CC 800E6F1C 1040000B */ beqz $v0, .L800E6F4C /* 803D0 800E6F20 00000000 */ nop /* 803D4 800E6F24 0C04D07A */ jal is_picking_up_item /* 803D8 800E6F28 00000000 */ nop /* 803DC 800E6F2C 14400007 */ bnez $v0, .L800E6F4C /* 803E0 800E6F30 00000000 */ nop /* 803E4 800E6F34 3C028011 */ lui $v0, %hi(D_8010CCFE) /* 803E8 800E6F38 8442CCFE */ lh $v0, %lo(D_8010CCFE)($v0) /* 803EC 800E6F3C 82830015 */ lb $v1, 0x15($s4) /* 803F0 800E6F40 0043102A */ slt $v0, $v0, $v1 /* 803F4 800E6F44 10400010 */ beqz $v0, .L800E6F88 /* 803F8 800E6F48 00000000 */ nop .L800E6F4C: /* 803FC 800E6F4C 8E820000 */ lw $v0, 0x0($s4) /* 80400 800E6F50 2403FFDF */ addiu $v1, $zero, -0x21 /* 80404 800E6F54 00431024 */ and $v0, $v0, $v1 /* 80408 800E6F58 0C038069 */ jal enable_player_input /* 8040C 800E6F5C AE820000 */ sw $v0, 0x0($s4) /* 80410 800E6F60 0C03BD80 */ jal partner_enable_input /* 80414 800E6F64 00000000 */ nop /* 80418 800E6F68 3C028011 */ lui $v0, %hi(D_8010C9C0) /* 8041C 800E6F6C 8442C9C0 */ lh $v0, %lo(D_8010C9C0)($v0) /* 80420 800E6F70 3C018011 */ lui $at, %hi(D_8010CD00) /* 80424 800E6F74 A420CD00 */ sh $zero, %lo(D_8010CD00)($at) /* 80428 800E6F78 104000BC */ beqz $v0, .L800E726C /* 8042C 800E6F7C 00000000 */ nop /* 80430 800E6F80 08039C72 */ j .L800E71C8 /* 80434 800E6F84 00000000 */ nop .L800E6F88: /* 80438 800E6F88 3C038011 */ lui $v1, %hi(D_8010CCFA) /* 8043C 800E6F8C 2463CCFA */ addiu $v1, $v1, %lo(D_8010CCFA) /* 80440 800E6F90 94620000 */ lhu $v0, 0x0($v1) /* 80444 800E6F94 2442FFFF */ addiu $v0, $v0, -0x1 /* 80448 800E6F98 A4620000 */ sh $v0, 0x0($v1) /* 8044C 800E6F9C 00021400 */ sll $v0, $v0, 16 /* 80450 800E6FA0 144000B2 */ bnez $v0, .L800E726C /* 80454 800E6FA4 24040002 */ addiu $a0, $zero, 0x2 /* 80458 800E6FA8 3C02800A */ lui $v0, %hi(gOverrideFlags) /* 8045C 800E6FAC 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags) /* 80460 800E6FB0 8C430000 */ lw $v1, 0x0($v0) /* 80464 800E6FB4 3C018011 */ lui $at, %hi(D_8010CD00) /* 80468 800E6FB8 A424CD00 */ sh $a0, %lo(D_8010CD00)($at) /* 8046C 800E6FBC 34630040 */ ori $v1, $v1, 0x40 /* 80470 800E6FC0 08039C9B */ j .L800E726C /* 80474 800E6FC4 AC430000 */ sw $v1, 0x0($v0) glabel .L800E6FC8 /* 80478 800E6FC8 3C038011 */ lui $v1, %hi(D_8010CCF8) /* 8047C 800E6FCC 8463CCF8 */ lh $v1, %lo(D_8010CCF8)($v1) /* 80480 800E6FD0 24020002 */ addiu $v0, $zero, 0x2 /* 80484 800E6FD4 1462000C */ bne $v1, $v0, .L800E7008 /* 80488 800E6FD8 00000000 */ nop /* 8048C 800E6FDC 0C00CD3C */ jal set_game_mode /* 80490 800E6FE0 2404000A */ addiu $a0, $zero, 0xA /* 80494 800E6FE4 0C05272D */ jal sfx_play_sound /* 80498 800E6FE8 240400C5 */ addiu $a0, $zero, 0xC5 /* 8049C 800E6FEC 2402000A */ addiu $v0, $zero, 0xA /* 804A0 800E6FF0 3C018011 */ lui $at, %hi(D_8010CCFA) /* 804A4 800E6FF4 A422CCFA */ sh $v0, %lo(D_8010CCFA)($at) /* 804A8 800E6FF8 3C018011 */ lui $at, %hi(D_8010CD00) /* 804AC 800E6FFC A422CD00 */ sh $v0, %lo(D_8010CD00)($at) /* 804B0 800E7000 08039C9B */ j .L800E726C /* 804B4 800E7004 00000000 */ nop .L800E7008: /* 804B8 800E7008 0C03D390 */ jal create_standard_popup_menu /* 804BC 800E700C 0240202D */ daddu $a0, $s2, $zero /* 804C0 800E7010 0C009C22 */ jal set_time_freeze_mode /* 804C4 800E7014 24040003 */ addiu $a0, $zero, 0x3 /* 804C8 800E7018 82620000 */ lb $v0, 0x0($s3) /* 804CC 800E701C 14400003 */ bnez $v0, .L800E702C /* 804D0 800E7020 00000000 */ nop /* 804D4 800E7024 0C039769 */ jal set_action_state /* 804D8 800E7028 0000202D */ daddu $a0, $zero, $zero .L800E702C: /* 804DC 800E702C 3C038011 */ lui $v1, %hi(D_8010CD00) /* 804E0 800E7030 2463CD00 */ addiu $v1, $v1, %lo(D_8010CD00) /* 804E4 800E7034 94620000 */ lhu $v0, 0x0($v1) /* 804E8 800E7038 24420001 */ addiu $v0, $v0, 0x1 /* 804EC 800E703C 08039C9B */ j .L800E726C /* 804F0 800E7040 A4620000 */ sh $v0, 0x0($v1) glabel .L800E7044 /* 804F4 800E7044 2402FFFF */ addiu $v0, $zero, -0x1 /* 804F8 800E7048 8643032C */ lh $v1, 0x32C($s2) /* 804FC 800E704C 10620087 */ beq $v1, $v0, .L800E726C /* 80500 800E7050 9644032C */ lhu $a0, 0x32C($s2) /* 80504 800E7054 3C018011 */ lui $at, %hi(D_8010CCFC) /* 80508 800E7058 A424CCFC */ sh $a0, %lo(D_8010CCFC)($at) /* 8050C 800E705C 10600083 */ beqz $v1, .L800E726C /* 80510 800E7060 00000000 */ nop /* 80514 800E7064 0C03C4EC */ jal hide_popup_menu /* 80518 800E7068 00000000 */ nop /* 8051C 800E706C 3C028011 */ lui $v0, %hi(D_8010CD00) /* 80520 800E7070 2442CD00 */ addiu $v0, $v0, %lo(D_8010CD00) /* 80524 800E7074 94430000 */ lhu $v1, 0x0($v0) /* 80528 800E7078 2404000F */ addiu $a0, $zero, 0xF /* 8052C 800E707C 3C018011 */ lui $at, %hi(D_8010CCFA) /* 80530 800E7080 A424CCFA */ sh $a0, %lo(D_8010CCFA)($at) /* 80534 800E7084 24630001 */ addiu $v1, $v1, 0x1 /* 80538 800E7088 08039C9B */ j .L800E726C /* 8053C 800E708C A4430000 */ sh $v1, 0x0($v0) glabel .L800E7090 /* 80540 800E7090 3C038011 */ lui $v1, %hi(D_8010CCFA) /* 80544 800E7094 2463CCFA */ addiu $v1, $v1, %lo(D_8010CCFA) /* 80548 800E7098 94620000 */ lhu $v0, 0x0($v1) /* 8054C 800E709C 2442FFFF */ addiu $v0, $v0, -0x1 /* 80550 800E70A0 A4620000 */ sh $v0, 0x0($v1) /* 80554 800E70A4 00021400 */ sll $v0, $v0, 16 /* 80558 800E70A8 14400070 */ bnez $v0, .L800E726C /* 8055C 800E70AC 00000000 */ nop /* 80560 800E70B0 0C03C54E */ jal destroy_popup_menu /* 80564 800E70B4 00000000 */ nop /* 80568 800E70B8 3C018011 */ lui $at, %hi(D_8010CD00) /* 8056C 800E70BC A420CD00 */ sh $zero, %lo(D_8010CD00)($at) /* 80570 800E70C0 0C038069 */ jal enable_player_input /* 80574 800E70C4 00000000 */ nop /* 80578 800E70C8 0C03BD80 */ jal partner_enable_input /* 8057C 800E70CC 00000000 */ nop /* 80580 800E70D0 3C108011 */ lui $s0, %hi(D_8010CCFC) /* 80584 800E70D4 2610CCFC */ addiu $s0, $s0, %lo(D_8010CCFC) /* 80588 800E70D8 86030000 */ lh $v1, 0x0($s0) /* 8058C 800E70DC 2402FFFE */ addiu $v0, $zero, -0x2 /* 80590 800E70E0 1462001B */ bne $v1, $v0, .L800E7150 /* 80594 800E70E4 00000000 */ nop /* 80598 800E70E8 0C039ADE */ jal setup_partner_popup /* 8059C 800E70EC 0240202D */ daddu $a0, $s2, $zero /* 805A0 800E70F0 10400005 */ beqz $v0, .L800E7108 /* 805A4 800E70F4 240200FF */ addiu $v0, $zero, 0xFF /* 805A8 800E70F8 0C039B11 */ jal setup_item_popup /* 805AC 800E70FC 0240202D */ daddu $a0, $s2, $zero /* 805B0 800E7100 14400003 */ bnez $v0, .L800E7110 /* 805B4 800E7104 240200FF */ addiu $v0, $zero, 0xFF .L800E7108: /* 805B8 800E7108 08039C54 */ j .L800E7150 /* 805BC 800E710C A6020000 */ sh $v0, 0x0($s0) .L800E7110: /* 805C0 800E7110 3C048011 */ lui $a0, %hi(D_8010CCF8) /* 805C4 800E7114 2484CCF8 */ addiu $a0, $a0, %lo(D_8010CCF8) /* 805C8 800E7118 84830000 */ lh $v1, 0x0($a0) /* 805CC 800E711C 10600005 */ beqz $v1, .L800E7134 /* 805D0 800E7120 24020001 */ addiu $v0, $zero, 0x1 /* 805D4 800E7124 10620006 */ beq $v1, $v0, .L800E7140 /* 805D8 800E7128 24020001 */ addiu $v0, $zero, 0x1 /* 805DC 800E712C 08039C51 */ j .L800E7144 /* 805E0 800E7130 00000000 */ nop .L800E7134: /* 805E4 800E7134 24020001 */ addiu $v0, $zero, 0x1 /* 805E8 800E7138 08039C51 */ j .L800E7144 /* 805EC 800E713C A4820000 */ sh $v0, 0x0($a0) .L800E7140: /* 805F0 800E7140 A4800000 */ sh $zero, 0x0($a0) .L800E7144: /* 805F4 800E7144 3C018011 */ lui $at, %hi(D_8010C9C0) /* 805F8 800E7148 08039B87 */ j .L800E6E1C /* 805FC 800E714C A422C9C0 */ sh $v0, %lo(D_8010C9C0)($at) .L800E7150: /* 80600 800E7150 3C038011 */ lui $v1, %hi(D_8010CCFC) /* 80604 800E7154 8463CCFC */ lh $v1, %lo(D_8010CCFC)($v1) /* 80608 800E7158 240200FF */ addiu $v0, $zero, 0xFF /* 8060C 800E715C 1062001A */ beq $v1, $v0, .L800E71C8 /* 80610 800E7160 00000000 */ nop /* 80614 800E7164 3C048011 */ lui $a0, %hi(D_8010CCF8) /* 80618 800E7168 8484CCF8 */ lh $a0, %lo(D_8010CCF8)($a0) /* 8061C 800E716C 10800005 */ beqz $a0, .L800E7184 /* 80620 800E7170 24020001 */ addiu $v0, $zero, 0x1 /* 80624 800E7174 1082000A */ beq $a0, $v0, .L800E71A0 /* 80628 800E7178 2462FFFF */ addiu $v0, $v1, -0x1 /* 8062C 800E717C 08039C72 */ j .L800E71C8 /* 80630 800E7180 00000000 */ nop .L800E7184: /* 80634 800E7184 2462FFFF */ addiu $v0, $v1, -0x1 /* 80638 800E7188 00021080 */ sll $v0, $v0, 2 /* 8063C 800E718C 02421021 */ addu $v0, $s2, $v0 /* 80640 800E7190 0C03AC5A */ jal switch_to_partner /* 80644 800E7194 8C440108 */ lw $a0, 0x108($v0) /* 80648 800E7198 08039C72 */ j .L800E71C8 /* 8064C 800E719C 00000000 */ nop .L800E71A0: /* 80650 800E71A0 00021080 */ sll $v0, $v0, 2 /* 80654 800E71A4 02421021 */ addu $v0, $s2, $v0 /* 80658 800E71A8 0C03A900 */ jal use_consumable /* 8065C 800E71AC 8C440108 */ lw $a0, 0x108($v0) /* 80660 800E71B0 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 80664 800E71B4 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 80668 800E71B8 8C820000 */ lw $v0, 0x0($a0) /* 8066C 800E71BC 3C030020 */ lui $v1, (0x200000 >> 16) /* 80670 800E71C0 00431025 */ or $v0, $v0, $v1 /* 80674 800E71C4 AC820000 */ sw $v0, 0x0($a0) .L800E71C8: /* 80678 800E71C8 0C039A18 */ jal func_800E6860 /* 8067C 800E71CC 00000000 */ nop /* 80680 800E71D0 0000202D */ daddu $a0, $zero, $zero /* 80684 800E71D4 2403FFDF */ addiu $v1, $zero, -0x21 /* 80688 800E71D8 8E820000 */ lw $v0, 0x0($s4) /* 8068C 800E71DC 3C05800A */ lui $a1, %hi(gOverrideFlags) /* 80690 800E71E0 24A5A650 */ addiu $a1, $a1, %lo(gOverrideFlags) /* 80694 800E71E4 00431024 */ and $v0, $v0, $v1 /* 80698 800E71E8 AE820000 */ sw $v0, 0x0($s4) /* 8069C 800E71EC 8CA20000 */ lw $v0, 0x0($a1) /* 806A0 800E71F0 2403FFBF */ addiu $v1, $zero, -0x41 /* 806A4 800E71F4 00431024 */ and $v0, $v0, $v1 /* 806A8 800E71F8 0C009C22 */ jal set_time_freeze_mode /* 806AC 800E71FC ACA20000 */ sw $v0, 0x0($a1) /* 806B0 800E7200 08039C9B */ j .L800E726C /* 806B4 800E7204 00000000 */ nop glabel .L800E7208 /* 806B8 800E7208 3C038011 */ lui $v1, %hi(D_8010CCFA) /* 806BC 800E720C 2463CCFA */ addiu $v1, $v1, %lo(D_8010CCFA) /* 806C0 800E7210 94620000 */ lhu $v0, 0x0($v1) /* 806C4 800E7214 2442FFFF */ addiu $v0, $v0, -0x1 /* 806C8 800E7218 A4620000 */ sh $v0, 0x0($v1) /* 806CC 800E721C 00021400 */ sll $v0, $v0, 16 /* 806D0 800E7220 14400012 */ bnez $v0, .L800E726C /* 806D4 800E7224 00000000 */ nop /* 806D8 800E7228 0C039A18 */ jal func_800E6860 /* 806DC 800E722C 00000000 */ nop /* 806E0 800E7230 2403FFDF */ addiu $v1, $zero, -0x21 /* 806E4 800E7234 8E820000 */ lw $v0, 0x0($s4) /* 806E8 800E7238 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 806EC 800E723C 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 806F0 800E7240 3C018011 */ lui $at, %hi(D_8010CD00) /* 806F4 800E7244 A420CD00 */ sh $zero, %lo(D_8010CD00)($at) /* 806F8 800E7248 00431024 */ and $v0, $v0, $v1 /* 806FC 800E724C AE820000 */ sw $v0, 0x0($s4) /* 80700 800E7250 8C820000 */ lw $v0, 0x0($a0) /* 80704 800E7254 2403FFBF */ addiu $v1, $zero, -0x41 /* 80708 800E7258 00431024 */ and $v0, $v0, $v1 /* 8070C 800E725C 0C038069 */ jal enable_player_input /* 80710 800E7260 AC820000 */ sw $v0, 0x0($a0) /* 80714 800E7264 0C03BD80 */ jal partner_enable_input /* 80718 800E7268 00000000 */ nop glabel .L800E726C /* 8071C 800E726C 8FBF0024 */ lw $ra, 0x24($sp) /* 80720 800E7270 8FB40020 */ lw $s4, 0x20($sp) /* 80724 800E7274 8FB3001C */ lw $s3, 0x1C($sp) /* 80728 800E7278 8FB20018 */ lw $s2, 0x18($sp) /* 8072C 800E727C 8FB10014 */ lw $s1, 0x14($sp) /* 80730 800E7280 8FB00010 */ lw $s0, 0x10($sp) /* 80734 800E7284 03E00008 */ jr $ra /* 80738 800E7288 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void check_input_open_menus(void) { static s16 D_8010C9C0; PartnerStatus* partnerStatus; PlayerStatus* playerStatus; PlayerData* playerData; PopupMenu* popup; s32 flags; s32 numEntries; s32 pressedButtons; s32 currentButtons; s8* partnerActionState; partnerStatus = &gPartnerStatus; playerStatus = &gPlayerStatus; playerData = &gPlayerData; popup = &D_8010C9C8; if (gGameStatusPtr->disableScripts || (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH) || evt_get_variable(NULL, GB_StoryProgress) == STORY_INTRO) { return; } if (partnerStatus->partnerActionState != 0 && (partnerStatus->actingPartner == PARTNER_SUSHIE || partnerStatus->actingPartner == PARTNER_LAKILESTER || partnerStatus->actingPartner == PARTNER_BOW)) { currentButtons = partnerStatus->currentButtons; pressedButtons = partnerStatus->pressedButtons; } else { currentButtons = playerStatus->currentButtons; pressedButtons = playerStatus->pressedButtons; } partnerActionState = &partnerStatus->partnerActionState; if (evt_get_variable(NULL, GB_StoryProgress) >= STORY_EPILOGUE) { currentButtons &= ~(BUTTON_C_LEFT | BUTTON_C_RIGHT); pressedButtons &= ~(BUTTON_C_LEFT | BUTTON_C_RIGHT); } switch (D_8010CD00) { case 0: if (can_pause(currentButtons, pressedButtons)) { D_8010CCF8 = 1; if (pressedButtons & 1) { D_8010CCF8 = 0; } if (pressedButtons & BUTTON_START) { D_8010CCF8 = 2; } D_8010C9C0 = FALSE; block_17: switch (D_8010CCF8) { case 0: if (playerStatus->flags & PS_FLAG_NO_CHANGE_PARTNER) { sfx_play_sound(SOUND_MENU_ERROR); if (D_8010C9C0) { func_800E6860(); playerStatus->flags &= ~PS_FLAG_PAUSED; gOverrideFlags &= ~GLOBAL_OVERRIDES_40; set_time_freeze_mode(TIME_FREEZE_NORMAL); } } else { numEntries = setup_partner_popup(popup); if (numEntries == 0) { return; } popup->numEntries = numEntries; popup->popupType = POPUP_MENU_SWITCH_PARTNER; popup->initialPos = D_8008EEF0[playerData->currentPartner] - 1; break; } return; case 1: numEntries = setup_item_popup(popup); if (numEntries == 0) { return; } popup->popupType = POPUP_MENU_USE_ITEM; popup->numEntries = numEntries; popup->initialPos = 0; break; } playerStatus->flags |= PS_FLAG_PAUSED; disable_player_input(); partner_disable_input(); D_8010CCFA = 3; D_8010CD00 = 1; D_8010CCFE = playerStatus->inputDisabledCount; } break; case 1: flags = ~PS_FLAG_PAUSED; if ((func_800E6904() == 0) || is_picking_up_item() || D_8010CCFE < playerStatus->inputDisabledCount != 0) { playerStatus->flags &= flags; enable_player_input(); partner_enable_input(); D_8010CD00 = 0; if (D_8010C9C0) { func_800E6860(); playerStatus->flags &= ~PS_FLAG_PAUSED; gOverrideFlags &= ~GLOBAL_OVERRIDES_40; set_time_freeze_mode(TIME_FREEZE_NORMAL); } } else { D_8010CCFA--; if (D_8010CCFA == 0) { D_8010CD00 = 2; gOverrideFlags |= GLOBAL_OVERRIDES_40; } } break; case 2: if (D_8010CCF8 == 2) { set_game_mode(GAME_MODE_PAUSE); sfx_play_sound(SOUND_MENU_OPEN); D_8010CCFA = 10; D_8010CD00 = 10; return; } create_standard_popup_menu(popup); set_time_freeze_mode(TIME_FREEZE_POPUP_MENU); if (*partnerActionState == PARTNER_ACTION_NONE) { set_action_state(ACTION_STATE_IDLE); } D_8010CD00++; break; case 3: if (popup->result != POPUP_RESULT_MINUS_1) { D_8010CCFC = popup->result; if (D_8010CCFC != POPUP_RESULT_CHOOSING) { hide_popup_menu(); D_8010CCFA = 15; D_8010CD00++; } } break; case 4: D_8010CCFA--; if (D_8010CCFA == 0) { destroy_popup_menu(); D_8010CD00 = 0; enable_player_input(); partner_enable_input(); if (D_8010CCFC == POPUP_RESULT_MINUS_2) { if ((setup_partner_popup(popup) == 0) || (setup_item_popup(popup) == 0)) { D_8010CCFC = POPUP_RESULT_CANCEL; } else { switch (D_8010CCF8) { case 0: D_8010CCF8 = 1; break; case 1: D_8010CCF8 = 0; break; } D_8010C9C0 = TRUE; goto block_17; // TODO required to match } } if (D_8010CCFC != POPUP_RESULT_CANCEL) { switch (D_8010CCF8) { case 0: switch_to_partner(popup->userIndex[D_8010CCFC - 1]); break; case 1: do { use_consumable(popup->userIndex[D_8010CCFC - 1]); } while (0); // todo required to match gOverrideFlags |= GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS; break; } } func_800E6860(); playerStatus->flags &= ~PS_FLAG_PAUSED; gOverrideFlags &= ~GLOBAL_OVERRIDES_40; set_time_freeze_mode(TIME_FREEZE_NORMAL); } break; case 10: D_8010CCFA--; if (D_8010CCFA == 0) { func_800E6860(); D_8010CD00 = 0; playerStatus->flags &= ~PS_FLAG_PAUSED; gOverrideFlags &= ~GLOBAL_OVERRIDES_40; enable_player_input(); partner_enable_input(); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8024A990 /* 179270 8024A990 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 179274 8024A994 AFB00020 */ sw $s0, 0x20($sp) /* 179278 8024A998 3C10800B */ lui $s0, %hi(gCameras + 0x558) /* 17927C 8024A99C 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558) /* 179280 8024A9A0 3C02802A */ lui $v0, %hi(BattleCam_TargetActor) /* 179284 8024A9A4 9442F27C */ lhu $v0, %lo(BattleCam_TargetActor)($v0) .L8024A9A8: /* 179288 8024A9A8 3C04800E */ lui $a0, %hi(gBattleStatus) /* 17928C 8024A9AC 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) /* 179290 8024A9B0 AFBF0024 */ sw $ra, 0x24($sp) D_8024A9B4: /* 179294 8024A9B4 F7BE0050 */ sdc1 $f30, 0x50($sp) /* 179298 8024A9B8 F7BC0048 */ sdc1 $f28, 0x48($sp) /* 17929C 8024A9BC F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1792A0 8024A9C0 F7B80038 */ sdc1 $f24, 0x38($sp) /* 1792A4 8024A9C4 F7B60030 */ sdc1 $f22, 0x30($sp) D_8024A9C8: /* 1792A8 8024A9C8 F7B40028 */ sdc1 $f20, 0x28($sp) D_8024A9CC: /* 1792AC 8024A9CC 30430700 */ andi $v1, $v0, 0x700 /* 1792B0 8024A9D0 304600FF */ andi $a2, $v0, 0xFF /* 1792B4 8024A9D4 24020100 */ addiu $v0, $zero, 0x100 /* 1792B8 8024A9D8 1062002B */ beq $v1, $v0, .L8024AA88 /* 1792BC 8024A9DC 28620101 */ slti $v0, $v1, 0x101 /* 1792C0 8024A9E0 10400005 */ beqz $v0, .L8024A9F8 /* 1792C4 8024A9E4 24020200 */ addiu $v0, $zero, 0x200 /* 1792C8 8024A9E8 10600007 */ beqz $v1, .L8024AA08 /* 1792CC 8024A9EC 24020002 */ addiu $v0, $zero, 0x2 /* 1792D0 8024A9F0 08092BEF */ j .L8024AFBC /* 1792D4 8024A9F4 00000000 */ nop .L8024A9F8: /* 1792D8 8024A9F8 10620026 */ beq $v1, $v0, .L8024AA94 /* 1792DC 8024A9FC 24020002 */ addiu $v0, $zero, 0x2 /* 1792E0 8024AA00 08092BEF */ j .L8024AFBC /* 1792E4 8024AA04 00000000 */ nop .L8024AA08: /* 1792E8 8024AA08 8C8400D8 */ lw $a0, 0xD8($a0) /* 1792EC 8024AA0C 14800005 */ bnez $a0, .L8024AA24 /* 1792F0 8024AA10 00000000 */ nop .L8024AA14: /* 1792F4 8024AA14 0C093903 */ jal func_8024E40C /* 1792F8 8024AA18 24040002 */ addiu $a0, $zero, 0x2 /* 1792FC 8024AA1C 08092BEF */ j .L8024AFBC D_8024AA20: /* 179300 8024AA20 0000102D */ daddu $v0, $zero, $zero .L8024AA24: /* 179304 8024AA24 3C028011 */ lui $v0, %hi(gPlayerStatus) D_8024AA28: /* 179308 8024AA28 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) /* 17930C 8024AA2C 944200B0 */ lhu $v0, 0xB0($v0) /* 179310 8024AA30 C4820148 */ lwc1 $f2, 0x148($a0) /* 179314 8024AA34 00021400 */ sll $v0, $v0, 16 /* 179318 8024AA38 00021C03 */ sra $v1, $v0, 16 .L8024AA3C: /* 17931C 8024AA3C 000217C2 */ srl $v0, $v0, 31 /* 179320 8024AA40 00621821 */ addu $v1, $v1, $v0 /* 179324 8024AA44 00031843 */ sra $v1, $v1, 1 /* 179328 8024AA48 44830000 */ mtc1 $v1, $f0 /* 17932C 8024AA4C 00000000 */ nop /* 179330 8024AA50 46800020 */ cvt.s.w $f0, $f0 /* 179334 8024AA54 46001080 */ add.s $f2, $f2, $f0 /* 179338 8024AA58 C49A0144 */ lwc1 $f26, 0x144($a0) /* 17933C 8024AA5C E7A20010 */ swc1 $f2, 0x10($sp) /* 179340 8024AA60 90820191 */ lbu $v0, 0x191($a0) /* 179344 8024AA64 90830190 */ lbu $v1, 0x190($a0) /* 179348 8024AA68 44824000 */ mtc1 $v0, $f8 /* 17934C 8024AA6C 00000000 */ nop /* 179350 8024AA70 46804220 */ cvt.s.w $f8, $f8 /* 179354 8024AA74 44833000 */ mtc1 $v1, $f6 /* 179358 8024AA78 00000000 */ nop .L8024AA7C: /* 17935C 8024AA7C 468031A0 */ cvt.s.w $f6, $f6 .L8024AA80: /* 179360 8024AA80 08092ABB */ j .L8024AAEC /* 179364 8024AA84 46064080 */ add.s $f2, $f8, $f6 .L8024AA88: /* 179368 8024AA88 8C8400DC */ lw $a0, 0xDC($a0) /* 17936C 8024AA8C 08092AA8 */ j .L8024AAA0 /* 179370 8024AA90 00000000 */ nop .L8024AA94: /* 179374 8024AA94 00061080 */ sll $v0, $a2, 2 /* 179378 8024AA98 00441021 */ addu $v0, $v0, $a0 /* 17937C 8024AA9C 8C4400E0 */ lw $a0, 0xE0($v0) .L8024AAA0: /* 179380 8024AAA0 1080FFDC */ beqz $a0, .L8024AA14 /* 179384 8024AAA4 00000000 */ nop /* 179388 8024AAA8 90830191 */ lbu $v1, 0x191($a0) /* 17938C 8024AAAC C4820148 */ lwc1 $f2, 0x148($a0) D_8024AAB0: /* 179390 8024AAB0 00031042 */ srl $v0, $v1, 1 D_8024AAB4: /* 179394 8024AAB4 44820000 */ mtc1 $v0, $f0 D_8024AAB8: /* 179398 8024AAB8 00000000 */ nop D_8024AABC: /* 17939C 8024AABC 46800020 */ cvt.s.w $f0, $f0 D_8024AAC0: /* 1793A0 8024AAC0 46001080 */ add.s $f2, $f2, $f0 /* 1793A4 8024AAC4 C49A0144 */ lwc1 $f26, 0x144($a0) /* 1793A8 8024AAC8 E7A20010 */ swc1 $f2, 0x10($sp) /* 1793AC 8024AACC 90820190 */ lbu $v0, 0x190($a0) /* 1793B0 8024AAD0 44834000 */ mtc1 $v1, $f8 /* 1793B4 8024AAD4 00000000 */ nop /* 1793B8 8024AAD8 46804220 */ cvt.s.w $f8, $f8 /* 1793BC 8024AADC 44823000 */ mtc1 $v0, $f6 /* 1793C0 8024AAE0 00000000 */ nop /* 1793C4 8024AAE4 468031A0 */ cvt.s.w $f6, $f6 /* 1793C8 8024AAE8 46064080 */ add.s $f2, $f8, $f6 .L8024AAEC: /* 1793CC 8024AAEC 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1793D0 8024AAF0 44810000 */ mtc1 $at, $f0 /* 1793D4 8024AAF4 C49C014C */ lwc1 $f28, 0x14C($a0) /* 1793D8 8024AAF8 46001782 */ mul.s $f30, $f2, $f0 /* 1793DC 8024AAFC 00000000 */ nop /* 1793E0 8024AB00 3C02802A */ lui $v0, %hi(D_8029F2A6) /* 1793E4 8024AB04 8042F2A6 */ lb $v0, %lo(D_8029F2A6)($v0) .L8024AB08: /* 1793E8 8024AB08 10400029 */ beqz $v0, .L8024ABB0 .L8024AB0C: /* 1793EC 8024AB0C 00000000 */ nop D_8024AB10_DD77E0: /* 1793F0 8024AB10 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 1793F4 8024AB14 C422F28C */ lwc1 $f2, %lo(BattleCam_InitialBoomLength)($at) D_8024AB18_DD77E8: /* 1793F8 8024AB18 3C0143FA */ lui $at, (0x43FA0000 >> 16) /* 1793FC 8024AB1C 44810000 */ mtc1 $at, $f0 D_8024AB20_DD77F0: /* 179400 8024AB20 00000000 */ nop /* 179404 8024AB24 46020001 */ sub.s $f0, $f0, $f2 D_8024AB28_DD77F8: /* 179408 8024AB28 3C01802A */ lui $at, %hi(D_8029CC18) /* 17940C 8024AB2C D422CC18 */ ldc1 $f2, %lo(D_8029CC18)($at) D_8024AB30_DD7800: /* 179410 8024AB30 46000021 */ cvt.d.s $f0, $f0 /* 179414 8024AB34 46220002 */ mul.d $f0, $f0, $f2 jtbl_8024AB38: /* 179418 8024AB38 00000000 */ nop D_8024AB3C: /* 17941C 8024AB3C 3C01403E */ lui $at, (0x403E0000 >> 16) /* 179420 8024AB40 44811800 */ mtc1 $at, $f3 /* 179424 8024AB44 44801000 */ mtc1 $zero, $f2 /* 179428 8024AB48 00000000 */ nop /* 17942C 8024AB4C 46220000 */ add.d $f0, $f0, $f2 .L8024AB50: /* 179430 8024AB50 46200120 */ cvt.s.d $f4, $f0 /* 179434 8024AB54 46002007 */ neg.s $f0, $f4 /* 179438 8024AB58 4600D03C */ c.lt.s $f26, $f0 /* 17943C 8024AB5C 00000000 */ nop /* 179440 8024AB60 45000008 */ bc1f .L8024AB84 /* 179444 8024AB64 00000000 */ nop /* 179448 8024AB68 461A0001 */ sub.s $f0, $f0, $f26 .L8024AB6C: /* 17944C 8024AB6C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 179450 8024AB70 44811000 */ mtc1 $at, $f2 /* 179454 8024AB74 00000000 */ nop /* 179458 8024AB78 46020002 */ mul.s $f0, $f0, $f2 /* 17945C 8024AB7C 00000000 */ nop /* 179460 8024AB80 4600D680 */ add.s $f26, $f26, $f0 .L8024AB84: /* 179464 8024AB84 461A203C */ c.lt.s $f4, $f26 /* 179468 8024AB88 00000000 */ nop /* 17946C 8024AB8C 45000008 */ bc1f .L8024ABB0 /* 179470 8024AB90 00000000 */ nop /* 179474 8024AB94 461A2001 */ sub.s $f0, $f4, $f26 /* 179478 8024AB98 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 17947C 8024AB9C 44811000 */ mtc1 $at, $f2 /* 179480 8024ABA0 00000000 */ nop /* 179484 8024ABA4 46020002 */ mul.s $f0, $f0, $f2 /* 179488 8024ABA8 00000000 */ nop /* 17948C 8024ABAC 4600D680 */ add.s $f26, $f26, $f0 .L8024ABB0: /* 179490 8024ABB0 10A00043 */ beqz $a1, .L8024ACC0 /* 179494 8024ABB4 00000000 */ nop /* 179498 8024ABB8 3C0141C0 */ lui $at, (0x41C00000 >> 16) .L8024ABBC: /* 17949C 8024ABBC 44810000 */ mtc1 $at, $f0 /* 1794A0 8024ABC0 00000000 */ nop /* 1794A4 8024ABC4 46003181 */ sub.s $f6, $f6, $f0 /* 1794A8 8024ABC8 46004201 */ sub.s $f8, $f8, $f0 .L8024ABCC: /* 1794AC 8024ABCC 44800000 */ mtc1 $zero, $f0 /* 1794B0 8024ABD0 00000000 */ nop /* 1794B4 8024ABD4 4600303C */ c.lt.s $f6, $f0 /* 1794B8 8024ABD8 00000000 */ nop /* 1794BC 8024ABDC 45030001 */ bc1tl .L8024ABE4 .L8024ABE0: /* 1794C0 8024ABE0 46000186 */ mov.s $f6, $f0 .L8024ABE4: /* 1794C4 8024ABE4 4600403C */ c.lt.s $f8, $f0 /* 1794C8 8024ABE8 00000000 */ nop /* 1794CC 8024ABEC 45030001 */ bc1tl .L8024ABF4 .L8024ABF0: /* 1794D0 8024ABF0 46000206 */ mov.s $f8, $f0 .L8024ABF4: /* 1794D4 8024ABF4 86040026 */ lh $a0, 0x26($s0) .L8024ABF8: /* 1794D8 8024ABF8 8602001E */ lh $v0, 0x1E($s0) /* 1794DC 8024ABFC 86030022 */ lh $v1, 0x22($s0) /* 1794E0 8024AC00 44820000 */ mtc1 $v0, $f0 /* 1794E4 8024AC04 00000000 */ nop /* 1794E8 8024AC08 46800020 */ cvt.s.w $f0, $f0 /* 1794EC 8024AC0C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 1794F0 8024AC10 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at) D_8024AC14: /* 1794F4 8024AC14 44830000 */ mtc1 $v1, $f0 /* 1794F8 8024AC18 00000000 */ nop /* 1794FC 8024AC1C 46800020 */ cvt.s.w $f0, $f0 /* 179500 8024AC20 3C03802A */ lui $v1, %hi(BattleCam_BoomLength) /* 179504 8024AC24 2463F280 */ addiu $v1, $v1, %lo(BattleCam_BoomLength) /* 179508 8024AC28 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17950C 8024AC2C E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 179510 8024AC30 84620000 */ lh $v0, 0x0($v1) D_8024AC34: /* 179514 8024AC34 46083000 */ add.s $f0, $f6, $f8 .L8024AC38: /* 179518 8024AC38 44821000 */ mtc1 $v0, $f2 /* 17951C 8024AC3C 00000000 */ nop /* 179520 8024AC40 468010A0 */ cvt.s.w $f2, $f2 .L8024AC44: /* 179524 8024AC44 86020024 */ lh $v0, 0x24($s0) /* 179528 8024AC48 46001080 */ add.s $f2, $f2, $f0 /* 17952C 8024AC4C 44820000 */ mtc1 $v0, $f0 /* 179530 8024AC50 00000000 */ nop glabel func_8024AC54 /* 179534 8024AC54 46800020 */ cvt.s.w $f0, $f0 /* 179538 8024AC58 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17953C 8024AC5C E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at) /* 179540 8024AC60 4600148D */ trunc.w.s $f18, $f2 /* 179544 8024AC64 44029000 */ mfc1 $v0, $f18 /* 179548 8024AC68 04810002 */ bgez $a0, .L8024AC74 /* 17954C 8024AC6C A4620000 */ sh $v0, 0x0($v1) /* 179550 8024AC70 248400FF */ addiu $a0, $a0, 0xFF .L8024AC74: /* 179554 8024AC74 00041203 */ sra $v0, $a0, 8 /* 179558 8024AC78 C6020054 */ lwc1 $f2, 0x54($s0) D_8024AC7C: /* 17955C 8024AC7C C6040058 */ lwc1 $f4, 0x58($s0) /* 179560 8024AC80 C606005C */ lwc1 $f6, 0x5C($s0) /* 179564 8024AC84 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft) /* 179568 8024AC88 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1) D_8024AC8C: /* 17956C 8024AC8C 44820000 */ mtc1 $v0, $f0 /* 179570 8024AC90 00000000 */ nop /* 179574 8024AC94 46800020 */ cvt.s.w $f0, $f0 .L8024AC98: /* 179578 8024AC98 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) D_8024AC9C: /* 17957C 8024AC9C E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at) /* 179580 8024ACA0 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 179584 8024ACA4 E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at) /* 179588 8024ACA8 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 17958C 8024ACAC E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at) .L8024ACB0: /* 179590 8024ACB0 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 179594 8024ACB4 E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at) D_8024ACB8: /* 179598 8024ACB8 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal) /* 17959C 8024ACBC A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at) .L8024ACC0: /* 1795A0 8024ACC0 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp) /* 1795A4 8024ACC4 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0) /* 1795A8 8024ACC8 14400027 */ bnez $v0, .L8024AD68 /* 1795AC 8024ACCC 00000000 */ nop /* 1795B0 8024ACD0 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 1795B4 8024ACD4 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) .L8024ACD8: /* 1795B8 8024ACD8 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 1795BC 8024ACDC 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 1795C0 8024ACE0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1795C4 8024ACE4 4481C000 */ mtc1 $at, $f24 .L8024ACE8: /* 1795C8 8024ACE8 4482A000 */ mtc1 $v0, $f20 /* 1795CC 8024ACEC 00000000 */ nop /* 1795D0 8024ACF0 4680A520 */ cvt.s.w $f20, $f20 /* 1795D4 8024ACF4 44830000 */ mtc1 $v1, $f0 /* 1795D8 8024ACF8 00000000 */ nop /* 1795DC 8024ACFC 46800020 */ cvt.s.w $f0, $f0 /* 1795E0 8024AD00 4600A503 */ div.s $f20, $f20, $f0 /* 1795E4 8024AD04 4614C301 */ sub.s $f12, $f24, $f20 /* 1795E8 8024AD08 3C014049 */ lui $at, (0x40490FD0 >> 16) .L8024AD0C: /* 1795EC 8024AD0C 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF) /* 1795F0 8024AD10 4481B000 */ mtc1 $at, $f22 /* 1795F4 8024AD14 00000000 */ nop /* 1795F8 8024AD18 46166302 */ mul.s $f12, $f12, $f22 /* 1795FC 8024AD1C 00000000 */ nop /* 179600 8024AD20 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 179604 8024AD24 4481A000 */ mtc1 $at, $f20 /* 179608 8024AD28 00000000 */ nop /* 17960C 8024AD2C 46146302 */ mul.s $f12, $f12, $f20 .L8024AD30: /* 179610 8024AD30 0C00A85B */ jal sin_rad .L8024AD34: /* 179614 8024AD34 00000000 */ nop /* 179618 8024AD38 46160002 */ mul.s $f0, $f0, $f22 /* 17961C 8024AD3C 00000000 */ nop /* 179620 8024AD40 46140302 */ mul.s $f12, $f0, $f20 /* 179624 8024AD44 0C00A85B */ jal sin_rad /* 179628 8024AD48 00000000 */ nop /* 17962C 8024AD4C 46160002 */ mul.s $f0, $f0, $f22 /* 179630 8024AD50 00000000 */ nop /* 179634 8024AD54 46140302 */ mul.s $f12, $f0, $f20 /* 179638 8024AD58 0C00A85B */ jal sin_rad /* 17963C 8024AD5C 00000000 */ nop /* 179640 8024AD60 08092B65 */ j .L8024AD94 /* 179644 8024AD64 4600C501 */ sub.s $f20, $f24, $f0 .L8024AD68: /* 179648 8024AD68 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17964C 8024AD6C 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 179650 8024AD70 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 179654 8024AD74 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 179658 8024AD78 4482A000 */ mtc1 $v0, $f20 /* 17965C 8024AD7C 00000000 */ nop /* 179660 8024AD80 4680A520 */ cvt.s.w $f20, $f20 /* 179664 8024AD84 44830000 */ mtc1 $v1, $f0 /* 179668 8024AD88 00000000 */ nop /* 17966C 8024AD8C 46800020 */ cvt.s.w $f0, $f0 glabel func_8024AD90 /* 179670 8024AD90 4600A503 */ div.s $f20, $f20, $f0 .L8024AD94: /* 179674 8024AD94 3C02802A */ lui $v0, %hi(BattleCam_ModeX) /* 179678 8024AD98 8042F2A3 */ lb $v0, %lo(BattleCam_ModeX)($v0) /* 17967C 8024AD9C 10400013 */ beqz $v0, .L8024ADEC /* 179680 8024ADA0 00000000 */ nop /* 179684 8024ADA4 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 179688 8024ADA8 C424F2A8 */ lwc1 $f4, %lo(BattleCam_InitialPosX)($at) .L8024ADAC: /* 17968C 8024ADAC 46142102 */ mul.s $f4, $f4, $f20 /* 179690 8024ADB0 00000000 */ nop /* 179694 8024ADB4 3C02802A */ lui $v0, %hi(D_8029F2A7) /* 179698 8024ADB8 8042F2A7 */ lb $v0, %lo(D_8029F2A7)($v0) /* 17969C 8024ADBC 44821000 */ mtc1 $v0, $f2 /* 1796A0 8024ADC0 00000000 */ nop /* 1796A4 8024ADC4 468010A0 */ cvt.s.w $f2, $f2 /* 1796A8 8024ADC8 4602D080 */ add.s $f2, $f26, $f2 /* 1796AC 8024ADCC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1796B0 8024ADD0 44810000 */ mtc1 $at, $f0 /* 1796B4 8024ADD4 00000000 */ nop /* 1796B8 8024ADD8 46140001 */ sub.s $f0, $f0, $f20 /* 1796BC 8024ADDC 46001082 */ mul.s $f2, $f2, $f0 glabel func_8024ADE0 /* 1796C0 8024ADE0 00000000 */ nop D_8024ADE4: /* 1796C4 8024ADE4 46022100 */ add.s $f4, $f4, $f2 /* 1796C8 8024ADE8 E6040054 */ swc1 $f4, 0x54($s0) .L8024ADEC: /* 1796CC 8024ADEC 3C02802A */ lui $v0, %hi(BattleCam_ModeY) /* 1796D0 8024ADF0 8042F2A2 */ lb $v0, %lo(BattleCam_ModeY)($v0) /* 1796D4 8024ADF4 1040000E */ beqz $v0, .L8024AE30 /* 1796D8 8024ADF8 00000000 */ nop /* 1796DC 8024ADFC 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 1796E0 8024AE00 C422F2AC */ lwc1 $f2, %lo(BattleCam_InitialPosY)($at) /* 1796E4 8024AE04 46141082 */ mul.s $f2, $f2, $f20 /* 1796E8 8024AE08 00000000 */ nop /* 1796EC 8024AE0C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1796F0 8024AE10 44810000 */ mtc1 $at, $f0 /* 1796F4 8024AE14 00000000 */ nop /* 1796F8 8024AE18 46140001 */ sub.s $f0, $f0, $f20 /* 1796FC 8024AE1C C7B20010 */ lwc1 $f18, 0x10($sp) /* 179700 8024AE20 46009002 */ mul.s $f0, $f18, $f0 /* 179704 8024AE24 00000000 */ nop /* 179708 8024AE28 46001080 */ add.s $f2, $f2, $f0 /* 17970C 8024AE2C E6020058 */ swc1 $f2, 0x58($s0) .L8024AE30: /* 179710 8024AE30 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 179714 8024AE34 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at) /* 179718 8024AE38 46148402 */ mul.s $f16, $f16, $f20 /* 17971C 8024AE3C 00000000 */ nop /* 179720 8024AE40 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 179724 8024AE44 C42CF298 */ lwc1 $f12, %lo(BattleCam_InitialBoomZOffset)($at) /* 179728 8024AE48 46146302 */ mul.s $f12, $f12, $f20 /* 17972C 8024AE4C 00000000 */ nop /* 179730 8024AE50 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 179734 8024AE54 C42EF28C */ lwc1 $f14, %lo(BattleCam_InitialBoomLength)($at) .L8024AE58: /* 179738 8024AE58 46147382 */ mul.s $f14, $f14, $f20 /* 17973C 8024AE5C 00000000 */ nop /* 179740 8024AE60 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 179744 8024AE64 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at) /* 179748 8024AE68 46144202 */ mul.s $f8, $f8, $f20 /* 17974C 8024AE6C 00000000 */ nop dgb_01_img6_gfx: /* 179750 8024AE70 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 179754 8024AE74 C426F294 */ lwc1 $f6, %lo(BattleCam_InitialBoomPitch)($at) /* 179758 8024AE78 46143182 */ mul.s $f6, $f6, $f20 /* 17975C 8024AE7C 00000000 */ nop /* 179760 8024AE80 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 179764 8024AE84 44812000 */ mtc1 $at, $f4 .L8024AE88: /* 179768 8024AE88 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset) /* 17976C 8024AE8C 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0) /* 179770 8024AE90 46142101 */ sub.s $f4, $f4, $f20 D_8024AE94: /* 179774 8024AE94 44820000 */ mtc1 $v0, $f0 /* 179778 8024AE98 00000000 */ nop /* 17977C 8024AE9C 46800020 */ cvt.s.w $f0, $f0 /* 179780 8024AEA0 46040002 */ mul.s $f0, $f0, $f4 /* 179784 8024AEA4 00000000 */ nop /* 179788 8024AEA8 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) /* 17978C 8024AEAC 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0) /* 179790 8024AEB0 4604E702 */ mul.s $f28, $f28, $f4 /* 179794 8024AEB4 00000000 */ nop /* 179798 8024AEB8 44825000 */ mtc1 $v0, $f10 /* 17979C 8024AEBC 00000000 */ nop /* 1797A0 8024AEC0 468052A0 */ cvt.s.w $f10, $f10 D_8024AEC4: /* 1797A4 8024AEC4 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw) D_8024AEC8: /* 1797A8 8024AEC8 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0) /* 1797AC 8024AECC 44821000 */ mtc1 $v0, $f2 /* 1797B0 8024AED0 00000000 */ nop /* 1797B4 8024AED4 468010A0 */ cvt.s.w $f2, $f2 /* 1797B8 8024AED8 46041082 */ mul.s $f2, $f2, $f4 /* 1797BC 8024AEDC 00000000 */ nop .L8024AEE0: /* 1797C0 8024AEE0 46006300 */ add.s $f12, $f12, $f0 /* 1797C4 8024AEE4 3C014380 */ lui $at, (0x43800000 >> 16) /* 1797C8 8024AEE8 44810000 */ mtc1 $at, $f0 /* 1797CC 8024AEEC 00000000 */ nop dgb_01_img7_png: /* 1797D0 8024AEF0 46006302 */ mul.s $f12, $f12, $f0 /* 1797D4 8024AEF4 00000000 */ nop glabel func_8024AEF8 /* 1797D8 8024AEF8 3C014200 */ lui $at, (0x42000000 >> 16) /* 1797DC 8024AEFC 44810000 */ mtc1 $at, $f0 /* 1797E0 8024AF00 00000000 */ nop /* 1797E4 8024AF04 4600F001 */ sub.s $f0, $f30, $f0 /* 1797E8 8024AF08 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch) /* 1797EC 8024AF0C 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0) /* 1797F0 8024AF10 46005280 */ add.s $f10, $f10, $f0 /* 1797F4 8024AF14 44820000 */ mtc1 $v0, $f0 /* 1797F8 8024AF18 00000000 */ nop /* 1797FC 8024AF1C 46800020 */ cvt.s.w $f0, $f0 /* 179800 8024AF20 46040002 */ mul.s $f0, $f0, $f4 /* 179804 8024AF24 00000000 */ nop /* 179808 8024AF28 46045282 */ mul.s $f10, $f10, $f4 /* 17980C 8024AF2C 00000000 */ nop /* 179810 8024AF30 E7BC0018 */ swc1 $f28, 0x18($sp) /* 179814 8024AF34 461C8400 */ add.s $f16, $f16, $f28 /* 179818 8024AF38 46024200 */ add.s $f8, $f8, $f2 /* 17981C 8024AF3C 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft) /* 179820 8024AF40 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft) /* 179824 8024AF44 E610005C */ swc1 $f16, 0x5C($s0) /* 179828 8024AF48 46003180 */ add.s $f6, $f6, $f0 /* 17982C 8024AF4C 4600448D */ trunc.w.s $f18, $f8 /* 179830 8024AF50 44029000 */ mfc1 $v0, $f18 /* 179834 8024AF54 00000000 */ nop /* 179838 8024AF58 A6020024 */ sh $v0, 0x24($s0) /* 17983C 8024AF5C 460A7380 */ add.s $f14, $f14, $f10 /* 179840 8024AF60 4600348D */ trunc.w.s $f18, $f6 /* 179844 8024AF64 44029000 */ mfc1 $v0, $f18 /* 179848 8024AF68 00000000 */ nop /* 17984C 8024AF6C A6020022 */ sh $v0, 0x22($s0) /* 179850 8024AF70 4600748D */ trunc.w.s $f18, $f14 /* 179854 8024AF74 44029000 */ mfc1 $v0, $f18 /* 179858 8024AF78 00000000 */ nop /* 17985C 8024AF7C A602001E */ sh $v0, 0x1E($s0) /* 179860 8024AF80 4600648D */ trunc.w.s $f18, $f12 /* 179864 8024AF84 44029000 */ mfc1 $v0, $f18 /* 179868 8024AF88 00000000 */ nop /* 17986C 8024AF8C A6020026 */ sh $v0, 0x26($s0) /* 179870 8024AF90 84820000 */ lh $v0, 0x0($a0) /* 179874 8024AF94 94830000 */ lhu $v1, 0x0($a0) /* 179878 8024AF98 14400006 */ bnez $v0, .L8024AFB4 /* 17987C 8024AF9C 2462FFFF */ addiu $v0, $v1, -0x1 /* 179880 8024AFA0 24020001 */ addiu $v0, $zero, 0x1 /* 179884 8024AFA4 3C01802A */ lui $at, %hi(BattleCam_DoneMoving) /* 179888 8024AFA8 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at) /* 17988C 8024AFAC 08092BEF */ j .L8024AFBC /* 179890 8024AFB0 0000102D */ daddu $v0, $zero, $zero .L8024AFB4: /* 179894 8024AFB4 A4820000 */ sh $v0, 0x0($a0) /* 179898 8024AFB8 0000102D */ daddu $v0, $zero, $zero .L8024AFBC: /* 17989C 8024AFBC 8FBF0024 */ lw $ra, 0x24($sp) /* 1798A0 8024AFC0 8FB00020 */ lw $s0, 0x20($sp) /* 1798A4 8024AFC4 D7BE0050 */ ldc1 $f30, 0x50($sp) /* 1798A8 8024AFC8 D7BC0048 */ ldc1 $f28, 0x48($sp) /* 1798AC 8024AFCC D7BA0040 */ ldc1 $f26, 0x40($sp) /* 1798B0 8024AFD0 D7B80038 */ ldc1 $f24, 0x38($sp) /* 1798B4 8024AFD4 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1798B8 8024AFD8 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1798BC 8024AFDC 03E00008 */ jr $ra /* 1798C0 8024AFE0 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: s32 CamPresetUpdate_I(Evt* script, s32 isInitialCall) { Actor* actor; Camera* camera = &gCameras[CAM_BATTLE]; BattleStatus* battleStatus = &gBattleStatus; PlayerStatus* playerStatus = &gPlayerStatus; f32 x, y, z; f32 sizeX, sizeY; f32 averageSize, targetAverageSize; f32 alpha; f32 extraLength; s32 actorClass = BattleCam_TargetActor & ACTOR_CLASS_MASK; s32 actorID = BattleCam_TargetActor & 0xFF; switch (actorClass) { case ACTOR_CLASS_PLAYER: actor = battleStatus->playerActor; if (actor == NULL) { btl_cam_use_preset(BTL_CAM_DEFAULT); return ApiStatus_BLOCK; } x = actor->currentPos.x; y = actor->currentPos.y + playerStatus->colliderHeight / 2; z = actor->currentPos.z; sizeY = actor->size.y; sizeX = actor->size.x; averageSize = (sizeY + sizeX) / 2; break; case ACTOR_CLASS_PARTNER: actor = battleStatus->partnerActor; if (actor == NULL) { btl_cam_use_preset(BTL_CAM_DEFAULT); return ApiStatus_BLOCK; } x = actor->currentPos.x; y = actor->currentPos.y + actor->size.y / 2; z = actor->currentPos.z; sizeY = actor->size.y; sizeX = actor->size.x; averageSize = (sizeY + sizeX) / 2; break; case ACTOR_CLASS_ENEMY: actor = battleStatus->enemyActors[actorID]; if (actor == NULL) { btl_cam_use_preset(BTL_CAM_DEFAULT); return ApiStatus_BLOCK; } x = actor->currentPos.x; y = actor->currentPos.y + actor->size.y / 2; z = actor->currentPos.z; sizeY = actor->size.y; sizeX = actor->size.x; averageSize = (sizeY + sizeX) / 2; break; default: return ApiStatus_DONE2; } if (D_8029F2A6) { f32 upperBound = (500.0f - BattleCam_InitialBoomLength) * 0.4 + 30.0; f32 lowerBound = -upperBound; if (x < lowerBound) { x += (lowerBound - x) / 2; } if (x > upperBound) { x += (upperBound - x) / 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; 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; } if (BattleCam_ModeX != BTL_CAM_MODEX_0) { camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x + D_8029F2A7, alpha); } if (BattleCam_ModeY != BTL_CAM_MODEY_0) { camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha); } camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha); camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f; extraLength = averageSize - 32.0f; camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength + extraLength, 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 peach_star_beam_appendGfx /* 3E585C E010C39C 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 3E5860 E010C3A0 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3E5864 E010C3A4 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3E5868 E010C3A8 AFB300B4 */ sw $s3, 0xB4($sp) /* 3E586C E010C3AC 0000982D */ daddu $s3, $zero, $zero /* 3E5870 E010C3B0 AFB700C4 */ sw $s7, 0xC4($sp) /* 3E5874 E010C3B4 3C17800A */ lui $s7, %hi(gDisplayContext) /* 3E5878 E010C3B8 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext) /* 3E587C E010C3BC AFB500BC */ sw $s5, 0xBC($sp) /* 3E5880 E010C3C0 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 3E5884 E010C3C4 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 3E5888 E010C3C8 AFB400B8 */ sw $s4, 0xB8($sp) /* 3E588C E010C3CC 3C140001 */ lui $s4, (0x11630 >> 16) /* 3E5890 E010C3D0 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 3E5894 E010C3D4 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3E5898 E010C3D8 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3E589C E010C3DC AFB000A8 */ sw $s0, 0xA8($sp) /* 3E58A0 E010C3E0 0040802D */ daddu $s0, $v0, $zero /* 3E58A4 E010C3E4 AFB600C0 */ sw $s6, 0xC0($sp) /* 3E58A8 E010C3E8 3C16DE00 */ lui $s6, (0xDE000000 >> 16) /* 3E58AC E010C3EC AFB100AC */ sw $s1, 0xAC($sp) /* 3E58B0 E010C3F0 2411005C */ addiu $s1, $zero, 0x5C /* 3E58B4 E010C3F4 3C06800B */ lui $a2, %hi(gCameras) /* 3E58B8 E010C3F8 24C61D80 */ addiu $a2, $a2, %lo(gCameras) /* 3E58BC E010C3FC AFBF00CC */ sw $ra, 0xCC($sp) /* 3E58C0 E010C400 AFBE00C8 */ sw $fp, 0xC8($sp) /* 3E58C4 E010C404 AFB200B0 */ sw $s2, 0xB0($sp) /* 3E58C8 E010C408 F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 3E58CC E010C40C 8E050000 */ lw $a1, 0x0($s0) /* 3E58D0 E010C410 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3E58D4 E010C414 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3E58D8 E010C418 4480A000 */ mtc1 $zero, $f20 /* 3E58DC E010C41C 00031080 */ sll $v0, $v1, 2 /* 3E58E0 E010C420 00431021 */ addu $v0, $v0, $v1 /* 3E58E4 E010C424 00021080 */ sll $v0, $v0, 2 /* 3E58E8 E010C428 00431023 */ subu $v0, $v0, $v1 /* 3E58EC E010C42C 000218C0 */ sll $v1, $v0, 3 /* 3E58F0 E010C430 00431021 */ addu $v0, $v0, $v1 /* 3E58F4 E010C434 000210C0 */ sll $v0, $v0, 3 /* 3E58F8 E010C438 00461021 */ addu $v0, $v0, $a2 /* 3E58FC E010C43C 00A0182D */ daddu $v1, $a1, $zero /* 3E5900 E010C440 AFA200A0 */ sw $v0, 0xA0($sp) /* 3E5904 E010C444 8C92000C */ lw $s2, 0xC($a0) /* 3E5908 E010C448 24A50008 */ addiu $a1, $a1, 0x8 /* 3E590C E010C44C AE050000 */ sw $a1, 0x0($s0) /* 3E5910 E010C450 8E4A0024 */ lw $t2, 0x24($s2) /* 3E5914 E010C454 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3E5918 E010C458 AFAA00A4 */ sw $t2, 0xA4($sp) /* 3E591C E010C45C AC620000 */ sw $v0, 0x0($v1) /* 3E5920 E010C460 24A20008 */ addiu $v0, $a1, 0x8 /* 3E5924 E010C464 AC600004 */ sw $zero, 0x4($v1) /* 3E5928 E010C468 AE020000 */ sw $v0, 0x0($s0) /* 3E592C E010C46C ACA70000 */ sw $a3, 0x0($a1) /* 3E5930 E010C470 8C830010 */ lw $v1, 0x10($a0) /* 3E5934 E010C474 24A20010 */ addiu $v0, $a1, 0x10 /* 3E5938 E010C478 AE020000 */ sw $v0, 0x0($s0) /* 3E593C E010C47C 8C63001C */ lw $v1, 0x1C($v1) /* 3E5940 E010C480 02C0102D */ daddu $v0, $s6, $zero /* 3E5944 E010C484 ACA20008 */ sw $v0, 0x8($a1) /* 3E5948 E010C488 3C020900 */ lui $v0, %hi(D_09005090_412320) /* 3E594C E010C48C 24425090 */ addiu $v0, $v0, %lo(D_09005090_412320) /* 3E5950 E010C490 ACA2000C */ sw $v0, 0xC($a1) /* 3E5954 E010C494 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3E5958 E010C498 00621821 */ addu $v1, $v1, $v0 /* 3E595C E010C49C ACA30004 */ sw $v1, 0x4($a1) .LE010C4A0: /* 3E5960 E010C4A0 02511821 */ addu $v1, $s2, $s1 /* 3E5964 E010C4A4 8C640000 */ lw $a0, 0x0($v1) /* 3E5968 E010C4A8 30820001 */ andi $v0, $a0, 0x1 /* 3E596C E010C4AC 10400056 */ beqz $v0, .LE010C608 /* 3E5970 E010C4B0 30820002 */ andi $v0, $a0, 0x2 /* 3E5974 E010C4B4 10400005 */ beqz $v0, .LE010C4CC /* 3E5978 E010C4B8 00000000 */ nop /* 3E597C E010C4BC C4660010 */ lwc1 $f6, 0x10($v1) /* 3E5980 E010C4C0 C4640014 */ lwc1 $f4, 0x14($v1) /* 3E5984 E010C4C4 08043136 */ j .LE010C4D8 /* 3E5988 E010C4C8 C4620018 */ lwc1 $f2, 0x18($v1) .LE010C4CC: /* 3E598C E010C4CC C4660004 */ lwc1 $f6, 0x4($v1) /* 3E5990 E010C4D0 C4640008 */ lwc1 $f4, 0x8($v1) /* 3E5994 E010C4D4 C462000C */ lwc1 $f2, 0xC($v1) .LE010C4D8: /* 3E5998 E010C4D8 C640000C */ lwc1 $f0, 0xC($s2) /* 3E599C E010C4DC 4602003C */ c.lt.s $f0, $f2 /* 3E59A0 E010C4E0 00000000 */ nop /* 3E59A4 E010C4E4 45030049 */ bc1tl .LE010C60C /* 3E59A8 E010C4E8 26730001 */ addiu $s3, $s3, 0x1 /* 3E59AC E010C4EC 4405A000 */ mfc1 $a1, $f20 /* 3E59B0 E010C4F0 4406A000 */ mfc1 $a2, $f20 /* 3E59B4 E010C4F4 4407A000 */ mfc1 $a3, $f20 /* 3E59B8 E010C4F8 3C013F36 */ lui $at, (0x3F36DB6E >> 16) /* 3E59BC E010C4FC 3421DB6E */ ori $at, $at, (0x3F36DB6E & 0xFFFF) /* 3E59C0 E010C500 44810000 */ mtc1 $at, $f0 /* 3E59C4 E010C504 27A40020 */ addiu $a0, $sp, 0x20 /* 3E59C8 E010C508 E7A60014 */ swc1 $f6, 0x14($sp) /* 3E59CC E010C50C E7A40018 */ swc1 $f4, 0x18($sp) /* 3E59D0 E010C510 E7A2001C */ swc1 $f2, 0x1C($sp) /* 3E59D4 E010C514 0C080180 */ jal shim_guPositionF /* 3E59D8 E010C518 E7A00010 */ swc1 $f0, 0x10($sp) /* 3E59DC E010C51C 27A40020 */ addiu $a0, $sp, 0x20 /* 3E59E0 E010C520 96A50000 */ lhu $a1, 0x0($s5) /* 3E59E4 E010C524 8EE20000 */ lw $v0, 0x0($s7) /* 3E59E8 E010C528 00052980 */ sll $a1, $a1, 6 /* 3E59EC E010C52C 00B42821 */ addu $a1, $a1, $s4 /* 3E59F0 E010C530 0C080118 */ jal shim_guMtxF2L /* 3E59F4 E010C534 00452821 */ addu $a1, $v0, $a1 /* 3E59F8 E010C538 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 3E59FC E010C53C 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 3E5A00 E010C540 3C068080 */ lui $a2, (0x808080FF >> 16) /* 3E5A04 E010C544 34C680FF */ ori $a2, $a2, (0x808080FF & 0xFFFF) /* 3E5A08 E010C548 3C078080 */ lui $a3, (0x8080807F >> 16) /* 3E5A0C E010C54C 34E7807F */ ori $a3, $a3, (0x8080807F & 0xFFFF) /* 3E5A10 E010C550 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 3E5A14 E010C554 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 3E5A18 E010C558 8E040000 */ lw $a0, 0x0($s0) /* 3E5A1C E010C55C 96A30000 */ lhu $v1, 0x0($s5) /* 3E5A20 E010C560 0080282D */ daddu $a1, $a0, $zero /* 3E5A24 E010C564 24840008 */ addiu $a0, $a0, 0x8 /* 3E5A28 E010C568 AE040000 */ sw $a0, 0x0($s0) /* 3E5A2C E010C56C ACA20000 */ sw $v0, 0x0($a1) /* 3E5A30 E010C570 24620001 */ addiu $v0, $v1, 0x1 /* 3E5A34 E010C574 3063FFFF */ andi $v1, $v1, 0xFFFF /* 3E5A38 E010C578 00031980 */ sll $v1, $v1, 6 /* 3E5A3C E010C57C A6A20000 */ sh $v0, 0x0($s5) /* 3E5A40 E010C580 8EE20000 */ lw $v0, 0x0($s7) /* 3E5A44 E010C584 00741821 */ addu $v1, $v1, $s4 /* 3E5A48 E010C588 00431021 */ addu $v0, $v0, $v1 /* 3E5A4C E010C58C ACA20004 */ sw $v0, 0x4($a1) /* 3E5A50 E010C590 24820008 */ addiu $v0, $a0, 0x8 /* 3E5A54 E010C594 AE020000 */ sw $v0, 0x0($s0) /* 3E5A58 E010C598 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3E5A5C E010C59C AC820000 */ sw $v0, 0x0($a0) /* 3E5A60 E010C5A0 24820010 */ addiu $v0, $a0, 0x10 /* 3E5A64 E010C5A4 AC860004 */ sw $a2, 0x4($a0) /* 3E5A68 E010C5A8 AE020000 */ sw $v0, 0x0($s0) /* 3E5A6C E010C5AC 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3E5A70 E010C5B0 AC820008 */ sw $v0, 0x8($a0) /* 3E5A74 E010C5B4 24820018 */ addiu $v0, $a0, 0x18 /* 3E5A78 E010C5B8 00131880 */ sll $v1, $s3, 2 /* 3E5A7C E010C5BC AC87000C */ sw $a3, 0xC($a0) /* 3E5A80 E010C5C0 AE020000 */ sw $v0, 0x0($s0) /* 3E5A84 E010C5C4 AC960010 */ sw $s6, 0x10($a0) /* 3E5A88 E010C5C8 3C05E011 */ lui $a1, (0xE0110000 >> 16) /* 3E5A8C E010C5CC 00A32821 */ addu $a1, $a1, $v1 /* 3E5A90 E010C5D0 8CA5CA38 */ lw $a1, -0x35C8($a1) /* 3E5A94 E010C5D4 24820020 */ addiu $v0, $a0, 0x20 /* 3E5A98 E010C5D8 AE020000 */ sw $v0, 0x0($s0) /* 3E5A9C E010C5DC AC960018 */ sw $s6, 0x18($a0) /* 3E5AA0 E010C5E0 AC850014 */ sw $a1, 0x14($a0) /* 3E5AA4 E010C5E4 3C01E011 */ lui $at, (0xE0110000 >> 16) /* 3E5AA8 E010C5E8 00230821 */ addu $at, $at, $v1 /* 3E5AAC E010C5EC 8C23CA18 */ lw $v1, -0x35E8($at) /* 3E5AB0 E010C5F0 24820028 */ addiu $v0, $a0, 0x28 /* 3E5AB4 E010C5F4 AE020000 */ sw $v0, 0x0($s0) /* 3E5AB8 E010C5F8 24020040 */ addiu $v0, $zero, 0x40 /* 3E5ABC E010C5FC AC880020 */ sw $t0, 0x20($a0) /* 3E5AC0 E010C600 AC820024 */ sw $v0, 0x24($a0) /* 3E5AC4 E010C604 AC83001C */ sw $v1, 0x1C($a0) .LE010C608: /* 3E5AC8 E010C608 26730001 */ addiu $s3, $s3, 0x1 .LE010C60C: /* 3E5ACC E010C60C 2A620008 */ slti $v0, $s3, 0x8 /* 3E5AD0 E010C610 1440FFA3 */ bnez $v0, .LE010C4A0 /* 3E5AD4 E010C614 2631001C */ addiu $s1, $s1, 0x1C /* 3E5AD8 E010C618 27A40020 */ addiu $a0, $sp, 0x20 /* 3E5ADC E010C61C 240200FF */ addiu $v0, $zero, 0xFF /* 3E5AE0 E010C620 8E43003C */ lw $v1, 0x3C($s2) /* 3E5AE4 E010C624 3C014079 */ lui $at, (0x40790000 >> 16) /* 3E5AE8 E010C628 44811800 */ mtc1 $at, $f3 /* 3E5AEC E010C62C 44801000 */ mtc1 $zero, $f2 /* 3E5AF0 E010C630 00431023 */ subu $v0, $v0, $v1 /* 3E5AF4 E010C634 44820000 */ mtc1 $v0, $f0 /* 3E5AF8 E010C638 00000000 */ nop /* 3E5AFC E010C63C 46800020 */ cvt.s.w $f0, $f0 /* 3E5B00 E010C640 46000021 */ cvt.d.s $f0, $f0 /* 3E5B04 E010C644 46220002 */ mul.d $f0, $f0, $f2 /* 3E5B08 E010C648 00000000 */ nop /* 3E5B0C E010C64C 3C110001 */ lui $s1, (0x11630 >> 16) /* 3E5B10 E010C650 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 3E5B14 E010C654 0000982D */ daddu $s3, $zero, $zero /* 3E5B18 E010C658 3C01E011 */ lui $at, (0xE0110000 >> 16) /* 3E5B1C E010C65C D424CA60 */ ldc1 $f4, -0x35A0($at) /* 3E5B20 E010C660 C6420008 */ lwc1 $f2, 0x8($s2) /* 3E5B24 E010C664 8E450004 */ lw $a1, 0x4($s2) /* 3E5B28 E010C668 460010A1 */ cvt.d.s $f2, $f2 /* 3E5B2C E010C66C 46240003 */ div.d $f0, $f0, $f4 /* 3E5B30 E010C670 46201081 */ sub.d $f2, $f2, $f0 /* 3E5B34 E010C674 8E47000C */ lw $a3, 0xC($s2) /* 3E5B38 E010C678 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3E5B3C E010C67C 2442A674 */ addiu $v0, $v0, %lo(gDisplayContext) /* 3E5B40 E010C680 462010A0 */ cvt.s.d $f2, $f2 /* 3E5B44 E010C684 44061000 */ mfc1 $a2, $f2 /* 3E5B48 E010C688 0C080108 */ jal shim_guTranslateF /* 3E5B4C E010C68C 0040B82D */ daddu $s7, $v0, $zero /* 3E5B50 E010C690 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 3E5B54 E010C694 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos) /* 3E5B58 E010C698 C6400038 */ lwc1 $f0, 0x38($s2) /* 3E5B5C E010C69C 3C01E011 */ lui $at, (0xE0110000 >> 16) /* 3E5B60 E010C6A0 D422CA68 */ ldc1 $f2, -0x3598($at) /* 3E5B64 E010C6A4 46000021 */ cvt.d.s $f0, $f0 /* 3E5B68 E010C6A8 46220002 */ mul.d $f0, $f0, $f2 /* 3E5B6C E010C6AC 00000000 */ nop /* 3E5B70 E010C6B0 0040A02D */ daddu $s4, $v0, $zero /* 3E5B74 E010C6B4 3C160001 */ lui $s6, (0x11630 >> 16) /* 3E5B78 E010C6B8 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 3E5B7C E010C6BC 3C1EDE00 */ lui $fp, (0xDE000000 >> 16) /* 3E5B80 E010C6C0 2415005C */ addiu $s5, $zero, 0x5C /* 3E5B84 E010C6C4 27B00060 */ addiu $s0, $sp, 0x60 /* 3E5B88 E010C6C8 0200202D */ daddu $a0, $s0, $zero /* 3E5B8C E010C6CC 46200020 */ cvt.s.d $f0, $f0 /* 3E5B90 E010C6D0 44050000 */ mfc1 $a1, $f0 /* 3E5B94 E010C6D4 4480A000 */ mtc1 $zero, $f20 /* 3E5B98 E010C6D8 00A0302D */ daddu $a2, $a1, $zero /* 3E5B9C E010C6DC 0C080110 */ jal shim_guScaleF /* 3E5BA0 E010C6E0 00A0382D */ daddu $a3, $a1, $zero /* 3E5BA4 E010C6E4 0200202D */ daddu $a0, $s0, $zero /* 3E5BA8 E010C6E8 27A50020 */ addiu $a1, $sp, 0x20 /* 3E5BAC E010C6EC 0C080114 */ jal shim_guMtxCatF /* 3E5BB0 E010C6F0 00A0302D */ daddu $a2, $a1, $zero /* 3E5BB4 E010C6F4 27A40020 */ addiu $a0, $sp, 0x20 /* 3E5BB8 E010C6F8 96850000 */ lhu $a1, 0x0($s4) /* 3E5BBC E010C6FC 8EE20000 */ lw $v0, 0x0($s7) /* 3E5BC0 E010C700 00052980 */ sll $a1, $a1, 6 /* 3E5BC4 E010C704 00B12821 */ addu $a1, $a1, $s1 /* 3E5BC8 E010C708 0C080118 */ jal shim_guMtxF2L /* 3E5BCC E010C70C 00452821 */ addu $a1, $v0, $a1 /* 3E5BD0 E010C710 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3E5BD4 E010C714 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3E5BD8 E010C718 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 3E5BDC E010C71C 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 3E5BE0 E010C720 3C09D838 */ lui $t1, (0xD8380002 >> 16) /* 3E5BE4 E010C724 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF) /* 3E5BE8 E010C728 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3E5BEC E010C72C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3E5BF0 E010C730 0040802D */ daddu $s0, $v0, $zero /* 3E5BF4 E010C734 8C440000 */ lw $a0, 0x0($v0) /* 3E5BF8 E010C738 96820000 */ lhu $v0, 0x0($s4) /* 3E5BFC E010C73C 0080282D */ daddu $a1, $a0, $zero /* 3E5C00 E010C740 24840008 */ addiu $a0, $a0, 0x8 /* 3E5C04 E010C744 AE040000 */ sw $a0, 0x0($s0) /* 3E5C08 E010C748 ACA30000 */ sw $v1, 0x0($a1) /* 3E5C0C E010C74C 24430001 */ addiu $v1, $v0, 0x1 /* 3E5C10 E010C750 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3E5C14 E010C754 00021180 */ sll $v0, $v0, 6 /* 3E5C18 E010C758 A6830000 */ sh $v1, 0x0($s4) /* 3E5C1C E010C75C 8EE30000 */ lw $v1, 0x0($s7) /* 3E5C20 E010C760 00511021 */ addu $v0, $v0, $s1 /* 3E5C24 E010C764 00621821 */ addu $v1, $v1, $v0 /* 3E5C28 E010C768 24820008 */ addiu $v0, $a0, 0x8 /* 3E5C2C E010C76C ACA30004 */ sw $v1, 0x4($a1) /* 3E5C30 E010C770 AE020000 */ sw $v0, 0x0($s0) /* 3E5C34 E010C774 24820010 */ addiu $v0, $a0, 0x10 /* 3E5C38 E010C778 AC860000 */ sw $a2, 0x0($a0) /* 3E5C3C E010C77C AE020000 */ sw $v0, 0x0($s0) /* 3E5C40 E010C780 8FAA00A0 */ lw $t2, 0xA0($sp) /* 3E5C44 E010C784 03C0382D */ daddu $a3, $fp, $zero /* 3E5C48 E010C788 8D430204 */ lw $v1, 0x204($t2) /* 3E5C4C E010C78C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3E5C50 E010C790 AC820008 */ sw $v0, 0x8($a0) /* 3E5C54 E010C794 AC830004 */ sw $v1, 0x4($a0) /* 3E5C58 E010C798 9242001B */ lbu $v0, 0x1B($s2) /* 3E5C5C E010C79C 9245001F */ lbu $a1, 0x1F($s2) /* 3E5C60 E010C7A0 92460023 */ lbu $a2, 0x23($s2) /* 3E5C64 E010C7A4 24830018 */ addiu $v1, $a0, 0x18 /* 3E5C68 E010C7A8 AE030000 */ sw $v1, 0x0($s0) /* 3E5C6C E010C7AC 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3E5C70 E010C7B0 AC830010 */ sw $v1, 0x10($a0) /* 3E5C74 E010C7B4 8FAA00A4 */ lw $t2, 0xA4($sp) /* 3E5C78 E010C7B8 00021600 */ sll $v0, $v0, 24 /* 3E5C7C E010C7BC 00052C00 */ sll $a1, $a1, 16 /* 3E5C80 E010C7C0 00451025 */ or $v0, $v0, $a1 /* 3E5C84 E010C7C4 00063200 */ sll $a2, $a2, 8 /* 3E5C88 E010C7C8 00461025 */ or $v0, $v0, $a2 /* 3E5C8C E010C7CC 314300FF */ andi $v1, $t2, 0xFF /* 3E5C90 E010C7D0 00431025 */ or $v0, $v0, $v1 /* 3E5C94 E010C7D4 AC82000C */ sw $v0, 0xC($a0) /* 3E5C98 E010C7D8 9242002B */ lbu $v0, 0x2B($s2) /* 3E5C9C E010C7DC 9245002F */ lbu $a1, 0x2F($s2) /* 3E5CA0 E010C7E0 92460033 */ lbu $a2, 0x33($s2) /* 3E5CA4 E010C7E4 92480037 */ lbu $t0, 0x37($s2) /* 3E5CA8 E010C7E8 24830020 */ addiu $v1, $a0, 0x20 /* 3E5CAC E010C7EC AE030000 */ sw $v1, 0x0($s0) /* 3E5CB0 E010C7F0 AC870018 */ sw $a3, 0x18($a0) /* 3E5CB4 E010C7F4 00021600 */ sll $v0, $v0, 24 /* 3E5CB8 E010C7F8 00052C00 */ sll $a1, $a1, 16 /* 3E5CBC E010C7FC 00451025 */ or $v0, $v0, $a1 /* 3E5CC0 E010C800 00063200 */ sll $a2, $a2, 8 /* 3E5CC4 E010C804 00461025 */ or $v0, $v0, $a2 /* 3E5CC8 E010C808 00481025 */ or $v0, $v0, $t0 /* 3E5CCC E010C80C AC820014 */ sw $v0, 0x14($a0) /* 3E5CD0 E010C810 3C03E011 */ lui $v1, (0xE0110000 >> 16) /* 3E5CD4 E010C814 8C63CA14 */ lw $v1, -0x35EC($v1) /* 3E5CD8 E010C818 24820028 */ addiu $v0, $a0, 0x28 /* 3E5CDC E010C81C AE020000 */ sw $v0, 0x0($s0) /* 3E5CE0 E010C820 AC870020 */ sw $a3, 0x20($a0) /* 3E5CE4 E010C824 AC83001C */ sw $v1, 0x1C($a0) /* 3E5CE8 E010C828 3C03E011 */ lui $v1, (0xE0110000 >> 16) /* 3E5CEC E010C82C 8C63CA10 */ lw $v1, -0x35F0($v1) /* 3E5CF0 E010C830 24820030 */ addiu $v0, $a0, 0x30 /* 3E5CF4 E010C834 AE020000 */ sw $v0, 0x0($s0) /* 3E5CF8 E010C838 24020040 */ addiu $v0, $zero, 0x40 /* 3E5CFC E010C83C AC830024 */ sw $v1, 0x24($a0) /* 3E5D00 E010C840 AC890028 */ sw $t1, 0x28($a0) /* 3E5D04 E010C844 AC82002C */ sw $v0, 0x2C($a0) /* 3E5D08 E010C848 24820038 */ addiu $v0, $a0, 0x38 /* 3E5D0C E010C84C AE020000 */ sw $v0, 0x0($s0) /* 3E5D10 E010C850 3C020900 */ lui $v0, %hi(D_09005090_412320) /* 3E5D14 E010C854 24425090 */ addiu $v0, $v0, %lo(D_09005090_412320) /* 3E5D18 E010C858 AC870030 */ sw $a3, 0x30($a0) /* 3E5D1C E010C85C AC820034 */ sw $v0, 0x34($a0) .LE010C860: /* 3E5D20 E010C860 02551821 */ addu $v1, $s2, $s5 /* 3E5D24 E010C864 8C640000 */ lw $a0, 0x0($v1) /* 3E5D28 E010C868 30820001 */ andi $v0, $a0, 0x1 /* 3E5D2C E010C86C 10400056 */ beqz $v0, .LE010C9C8 /* 3E5D30 E010C870 30820002 */ andi $v0, $a0, 0x2 /* 3E5D34 E010C874 10400005 */ beqz $v0, .LE010C88C /* 3E5D38 E010C878 00000000 */ nop /* 3E5D3C E010C87C C4660010 */ lwc1 $f6, 0x10($v1) /* 3E5D40 E010C880 C4640014 */ lwc1 $f4, 0x14($v1) /* 3E5D44 E010C884 08043226 */ j .LE010C898 /* 3E5D48 E010C888 C4620018 */ lwc1 $f2, 0x18($v1) .LE010C88C: /* 3E5D4C E010C88C C4660004 */ lwc1 $f6, 0x4($v1) /* 3E5D50 E010C890 C4640008 */ lwc1 $f4, 0x8($v1) /* 3E5D54 E010C894 C462000C */ lwc1 $f2, 0xC($v1) .LE010C898: /* 3E5D58 E010C898 C640000C */ lwc1 $f0, 0xC($s2) /* 3E5D5C E010C89C 4600103E */ c.le.s $f2, $f0 /* 3E5D60 E010C8A0 00000000 */ nop /* 3E5D64 E010C8A4 45030049 */ bc1tl .LE010C9CC /* 3E5D68 E010C8A8 26730001 */ addiu $s3, $s3, 0x1 /* 3E5D6C E010C8AC 4405A000 */ mfc1 $a1, $f20 /* 3E5D70 E010C8B0 4406A000 */ mfc1 $a2, $f20 /* 3E5D74 E010C8B4 4407A000 */ mfc1 $a3, $f20 /* 3E5D78 E010C8B8 3C013F2B */ lui $at, (0x3F2B851F >> 16) /* 3E5D7C E010C8BC 3421851F */ ori $at, $at, (0x3F2B851F & 0xFFFF) /* 3E5D80 E010C8C0 44810000 */ mtc1 $at, $f0 /* 3E5D84 E010C8C4 27A40020 */ addiu $a0, $sp, 0x20 /* 3E5D88 E010C8C8 E7A60014 */ swc1 $f6, 0x14($sp) /* 3E5D8C E010C8CC E7A40018 */ swc1 $f4, 0x18($sp) /* 3E5D90 E010C8D0 E7A2001C */ swc1 $f2, 0x1C($sp) /* 3E5D94 E010C8D4 0C080180 */ jal shim_guPositionF /* 3E5D98 E010C8D8 E7A00010 */ swc1 $f0, 0x10($sp) /* 3E5D9C E010C8DC 27A40020 */ addiu $a0, $sp, 0x20 /* 3E5DA0 E010C8E0 96850000 */ lhu $a1, 0x0($s4) /* 3E5DA4 E010C8E4 8EE20000 */ lw $v0, 0x0($s7) /* 3E5DA8 E010C8E8 00052980 */ sll $a1, $a1, 6 /* 3E5DAC E010C8EC 00B62821 */ addu $a1, $a1, $s6 /* 3E5DB0 E010C8F0 0C080118 */ jal shim_guMtxF2L /* 3E5DB4 E010C8F4 00452821 */ addu $a1, $v0, $a1 /* 3E5DB8 E010C8F8 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 3E5DBC E010C8FC 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 3E5DC0 E010C900 3C068080 */ lui $a2, (0x808080FF >> 16) /* 3E5DC4 E010C904 34C680FF */ ori $a2, $a2, (0x808080FF & 0xFFFF) /* 3E5DC8 E010C908 3C078080 */ lui $a3, (0x8080807F >> 16) /* 3E5DCC E010C90C 34E7807F */ ori $a3, $a3, (0x8080807F & 0xFFFF) /* 3E5DD0 E010C910 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 3E5DD4 E010C914 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 3E5DD8 E010C918 8E040000 */ lw $a0, 0x0($s0) /* 3E5DDC E010C91C 96830000 */ lhu $v1, 0x0($s4) /* 3E5DE0 E010C920 0080282D */ daddu $a1, $a0, $zero /* 3E5DE4 E010C924 24840008 */ addiu $a0, $a0, 0x8 /* 3E5DE8 E010C928 AE040000 */ sw $a0, 0x0($s0) /* 3E5DEC E010C92C ACA20000 */ sw $v0, 0x0($a1) /* 3E5DF0 E010C930 24620001 */ addiu $v0, $v1, 0x1 /* 3E5DF4 E010C934 3063FFFF */ andi $v1, $v1, 0xFFFF /* 3E5DF8 E010C938 00031980 */ sll $v1, $v1, 6 /* 3E5DFC E010C93C A6820000 */ sh $v0, 0x0($s4) /* 3E5E00 E010C940 8EE20000 */ lw $v0, 0x0($s7) /* 3E5E04 E010C944 00761821 */ addu $v1, $v1, $s6 /* 3E5E08 E010C948 00431021 */ addu $v0, $v0, $v1 /* 3E5E0C E010C94C ACA20004 */ sw $v0, 0x4($a1) /* 3E5E10 E010C950 24820008 */ addiu $v0, $a0, 0x8 /* 3E5E14 E010C954 AE020000 */ sw $v0, 0x0($s0) /* 3E5E18 E010C958 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3E5E1C E010C95C AC820000 */ sw $v0, 0x0($a0) /* 3E5E20 E010C960 24820010 */ addiu $v0, $a0, 0x10 /* 3E5E24 E010C964 AC860004 */ sw $a2, 0x4($a0) /* 3E5E28 E010C968 AE020000 */ sw $v0, 0x0($s0) /* 3E5E2C E010C96C 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3E5E30 E010C970 AC820008 */ sw $v0, 0x8($a0) /* 3E5E34 E010C974 24820018 */ addiu $v0, $a0, 0x18 /* 3E5E38 E010C978 00131880 */ sll $v1, $s3, 2 /* 3E5E3C E010C97C AC87000C */ sw $a3, 0xC($a0) /* 3E5E40 E010C980 AE020000 */ sw $v0, 0x0($s0) /* 3E5E44 E010C984 AC9E0010 */ sw $fp, 0x10($a0) /* 3E5E48 E010C988 3C05E011 */ lui $a1, (0xE0110000 >> 16) /* 3E5E4C E010C98C 00A32821 */ addu $a1, $a1, $v1 /* 3E5E50 E010C990 8CA5CA38 */ lw $a1, -0x35C8($a1) /* 3E5E54 E010C994 24820020 */ addiu $v0, $a0, 0x20 /* 3E5E58 E010C998 AE020000 */ sw $v0, 0x0($s0) /* 3E5E5C E010C99C AC9E0018 */ sw $fp, 0x18($a0) /* 3E5E60 E010C9A0 AC850014 */ sw $a1, 0x14($a0) /* 3E5E64 E010C9A4 3C01E011 */ lui $at, (0xE0110000 >> 16) /* 3E5E68 E010C9A8 00230821 */ addu $at, $at, $v1 /* 3E5E6C E010C9AC 8C23CA18 */ lw $v1, -0x35E8($at) /* 3E5E70 E010C9B0 24820028 */ addiu $v0, $a0, 0x28 /* 3E5E74 E010C9B4 AE020000 */ sw $v0, 0x0($s0) /* 3E5E78 E010C9B8 24020040 */ addiu $v0, $zero, 0x40 /* 3E5E7C E010C9BC AC880020 */ sw $t0, 0x20($a0) /* 3E5E80 E010C9C0 AC820024 */ sw $v0, 0x24($a0) /* 3E5E84 E010C9C4 AC83001C */ sw $v1, 0x1C($a0) .LE010C9C8: /* 3E5E88 E010C9C8 26730001 */ addiu $s3, $s3, 0x1 .LE010C9CC: /* 3E5E8C E010C9CC 2A620008 */ slti $v0, $s3, 0x8 /* 3E5E90 E010C9D0 1440FFA3 */ bnez $v0, .LE010C860 /* 3E5E94 E010C9D4 26B5001C */ addiu $s5, $s5, 0x1C /* 3E5E98 E010C9D8 8FBF00CC */ lw $ra, 0xCC($sp) /* 3E5E9C E010C9DC 8FBE00C8 */ lw $fp, 0xC8($sp) /* 3E5EA0 E010C9E0 8FB700C4 */ lw $s7, 0xC4($sp) /* 3E5EA4 E010C9E4 8FB600C0 */ lw $s6, 0xC0($sp) /* 3E5EA8 E010C9E8 8FB500BC */ lw $s5, 0xBC($sp) /* 3E5EAC E010C9EC 8FB400B8 */ lw $s4, 0xB8($sp) /* 3E5EB0 E010C9F0 8FB300B4 */ lw $s3, 0xB4($sp) /* 3E5EB4 E010C9F4 8FB200B0 */ lw $s2, 0xB0($sp) /* 3E5EB8 E010C9F8 8FB100AC */ lw $s1, 0xAC($sp) /* 3E5EBC E010C9FC 8FB000A8 */ lw $s0, 0xA8($sp) /* 3E5EC0 E010CA00 D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 3E5EC4 E010CA04 03E00008 */ jr $ra /* 3E5EC8 E010CA08 27BD00D8 */ addiu $sp, $sp, 0xD8 /* 3E5ECC E010CA0C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void peach_star_beam_appendGfx(void* effect) { Matrix4f sp20, sp60; Camera* camera = &gCameras[gCurrentCameraID]; PeachStarBeamFXData* data = ((EffectInstance*)effect)->data.peachStarBeam; PeachStarBeamSpirit* part; s32 alpha = data->beamAlpha; f32 partX, partY, partZ; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09005090_3EAFC0); for (i = 0; i < ARRAY_COUNT(data->spirits); i++) { part = &data->spirits[i]; if (part->flags & 1) { if (part->flags & 2) { partX = part->lockedPos.x; partY = part->lockedPos.y; partZ = part->lockedPos.z; } else { partX = part->pos.x; partY = part->pos.y; partZ = part->pos.z; } if (!(data->pos.z < partZ)) { shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, SPRITE_WORLD_SCALE_F, partX, partY, partZ); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 128, 128, 128, 255); gDPSetEnvColor(gMainGfxPos++, 128, 128, 128, 127); gSPDisplayList(gMainGfxPos++, D_E010CA38[i]); gSPDisplayList(gMainGfxPos++, D_E010CA18[i]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } } shim_guTranslateF(sp20, data->pos.x, data->pos.y - (((f32) (255 - data->unk_3C) * 400.0) / 255.0), data->pos.z); shim_guScaleF(sp60, data->beamScale * 0.4, data->beamScale * 0.4, data->beamScale * 0.4); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, alpha); gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, data->envA); gSPDisplayList(gMainGfxPos++, D_E010CA14[0]); gSPDisplayList(gMainGfxPos++, D_E010CA10[0]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09005090_3EAFC0); for (i = 0; i < ARRAY_COUNT(data->spirits); i++) { part = &data->spirits[i]; if (part->flags & 1) { if (part->flags & 2) { partX = part->lockedPos.x; partY = part->lockedPos.y; partZ = part->lockedPos.z; } else { partX = part->pos.x; partY = part->pos.y; partZ = part->pos.z; } if (!(partZ <= data->pos.z)) { shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, 0.67f, partX, partY, partZ); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 128, 128, 128, 255); gDPSetEnvColor(gMainGfxPos++, 128, 128, 128, 127); gSPDisplayList(gMainGfxPos++, D_E010CA38[i]); gSPDisplayList(gMainGfxPos++, D_E010CA18[i]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802552EC /* 183BCC 802552EC 27BDFC68 */ addiu $sp, $sp, -0x398 /* 183BD0 802552F0 F7B60370 */ sdc1 $f22, 0x370($sp) /* 183BD4 802552F4 4480B000 */ mtc1 $zero, $f22 /* 183BD8 802552F8 F7B80378 */ sdc1 $f24, 0x378($sp) /* 183BDC 802552FC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 183BE0 80255300 4481C000 */ mtc1 $at, $f24 /* 183BE4 80255304 00A0402D */ daddu $t0, $a1, $zero /* 183BE8 80255308 AFBF0364 */ sw $ra, 0x364($sp) /* 183BEC 8025530C AFBE0360 */ sw $fp, 0x360($sp) /* 183BF0 80255310 AFB7035C */ sw $s7, 0x35C($sp) /* 183BF4 80255314 AFB60358 */ sw $s6, 0x358($sp) /* 183BF8 80255318 AFB50354 */ sw $s5, 0x354($sp) /* 183BFC 8025531C AFB40350 */ sw $s4, 0x350($sp) /* 183C00 80255320 AFB3034C */ sw $s3, 0x34C($sp) /* 183C04 80255324 AFB20348 */ sw $s2, 0x348($sp) /* 183C08 80255328 AFB10344 */ sw $s1, 0x344($sp) /* 183C0C 8025532C AFB00340 */ sw $s0, 0x340($sp) /* 183C10 80255330 F7BE0390 */ sdc1 $f30, 0x390($sp) /* 183C14 80255334 F7BC0388 */ sdc1 $f28, 0x388($sp) /* 183C18 80255338 F7BA0380 */ sdc1 $f26, 0x380($sp) /* 183C1C 8025533C F7B40368 */ sdc1 $f20, 0x368($sp) /* 183C20 80255340 AFA40398 */ sw $a0, 0x398($sp) /* 183C24 80255344 AFA5039C */ sw $a1, 0x39C($sp) /* 183C28 80255348 E7B60010 */ swc1 $f22, 0x10($sp) /* 183C2C 8025534C 8D05015C */ lw $a1, 0x15C($t0) /* 183C30 80255350 4406C000 */ mfc1 $a2, $f24 /* 183C34 80255354 4407B000 */ mfc1 $a3, $f22 /* 183C38 80255358 0C019EC8 */ jal guRotateF /* 183C3C 8025535C 27A40018 */ addiu $a0, $sp, 0x18 /* 183C40 80255360 8FA9039C */ lw $t1, 0x39C($sp) /* 183C44 80255364 4406B000 */ mfc1 $a2, $f22 /* 183C48 80255368 4407C000 */ mfc1 $a3, $f24 /* 183C4C 8025536C 27B50058 */ addiu $s5, $sp, 0x58 /* 183C50 80255370 E7B60010 */ swc1 $f22, 0x10($sp) /* 183C54 80255374 8D250160 */ lw $a1, 0x160($t1) /* 183C58 80255378 0C019EC8 */ jal guRotateF /* 183C5C 8025537C 02A0202D */ daddu $a0, $s5, $zero /* 183C60 80255380 8FA8039C */ lw $t0, 0x39C($sp) /* 183C64 80255384 4406B000 */ mfc1 $a2, $f22 /* 183C68 80255388 4407B000 */ mfc1 $a3, $f22 /* 183C6C 8025538C 27B40098 */ addiu $s4, $sp, 0x98 /* 183C70 80255390 E7B80010 */ swc1 $f24, 0x10($sp) /* 183C74 80255394 8D050164 */ lw $a1, 0x164($t0) /* 183C78 80255398 0C019EC8 */ jal guRotateF /* 183C7C 8025539C 0280202D */ daddu $a0, $s4, $zero /* 183C80 802553A0 27A40018 */ addiu $a0, $sp, 0x18 /* 183C84 802553A4 02A0282D */ daddu $a1, $s5, $zero /* 183C88 802553A8 27B30198 */ addiu $s3, $sp, 0x198 /* 183C8C 802553AC 0C019D80 */ jal guMtxCatF /* 183C90 802553B0 0260302D */ daddu $a2, $s3, $zero /* 183C94 802553B4 0260202D */ daddu $a0, $s3, $zero /* 183C98 802553B8 0280282D */ daddu $a1, $s4, $zero /* 183C9C 802553BC 27B100D8 */ addiu $s1, $sp, 0xD8 /* 183CA0 802553C0 0C019D80 */ jal guMtxCatF /* 183CA4 802553C4 0220302D */ daddu $a2, $s1, $zero /* 183CA8 802553C8 8FA9039C */ lw $t1, 0x39C($sp) /* 183CAC 802553CC C5240170 */ lwc1 $f4, 0x170($t1) /* 183CB0 802553D0 3C01802A */ lui $at, %hi(D_8029D358) /* 183CB4 802553D4 D434D358 */ ldc1 $f20, %lo(D_8029D358)($at) /* 183CB8 802553D8 46002121 */ cvt.d.s $f4, $f4 /* 183CBC 802553DC 46342102 */ mul.d $f4, $f4, $f20 /* 183CC0 802553E0 00000000 */ nop /* 183CC4 802553E4 C5200174 */ lwc1 $f0, 0x174($t1) /* 183CC8 802553E8 46000021 */ cvt.d.s $f0, $f0 /* 183CCC 802553EC 46340002 */ mul.d $f0, $f0, $f20 /* 183CD0 802553F0 00000000 */ nop /* 183CD4 802553F4 C5220178 */ lwc1 $f2, 0x178($t1) /* 183CD8 802553F8 460010A1 */ cvt.d.s $f2, $f2 /* 183CDC 802553FC 46341082 */ mul.d $f2, $f2, $f20 /* 183CE0 80255400 00000000 */ nop /* 183CE4 80255404 C5260188 */ lwc1 $f6, 0x188($t1) /* 183CE8 80255408 460031A1 */ cvt.d.s $f6, $f6 /* 183CEC 8025540C 46262102 */ mul.d $f4, $f4, $f6 /* 183CF0 80255410 00000000 */ nop /* 183CF4 80255414 46260002 */ mul.d $f0, $f0, $f6 /* 183CF8 80255418 00000000 */ nop /* 183CFC 8025541C 27B00118 */ addiu $s0, $sp, 0x118 /* 183D00 80255420 462010A0 */ cvt.s.d $f2, $f2 /* 183D04 80255424 44071000 */ mfc1 $a3, $f2 /* 183D08 80255428 46202120 */ cvt.s.d $f4, $f4 /* 183D0C 8025542C 46200020 */ cvt.s.d $f0, $f0 /* 183D10 80255430 44052000 */ mfc1 $a1, $f4 /* 183D14 80255434 44060000 */ mfc1 $a2, $f0 /* 183D18 80255438 0200202D */ daddu $a0, $s0, $zero /* 183D1C 8025543C 0C019DF0 */ jal guScaleF /* 183D20 80255440 AFA0031C */ sw $zero, 0x31C($sp) /* 183D24 80255444 0200202D */ daddu $a0, $s0, $zero /* 183D28 80255448 0220282D */ daddu $a1, $s1, $zero /* 183D2C 8025544C 0C019D80 */ jal guMtxCatF /* 183D30 80255450 27A60298 */ addiu $a2, $sp, 0x298 /* 183D34 80255454 8FA8039C */ lw $t0, 0x39C($sp) /* 183D38 80255458 8FA9039C */ lw $t1, 0x39C($sp) /* 183D3C 8025545C 810801F3 */ lb $t0, 0x1F3($t0) /* 183D40 80255460 AFA80318 */ sw $t0, 0x318($sp) /* 183D44 80255464 8D3201F4 */ lw $s2, 0x1F4($t1) /* 183D48 80255468 19000122 */ blez $t0, .L802558F4 /* 183D4C 8025546C 4600B506 */ mov.s $f20, $f22 /* 183D50 80255470 0260B82D */ daddu $s7, $s3, $zero /* 183D54 80255474 AFB50330 */ sw $s5, 0x330($sp) /* 183D58 80255478 AFB40334 */ sw $s4, 0x334($sp) .L8025547C: /* 183D5C 8025547C 8E420094 */ lw $v0, 0x94($s2) /* 183D60 80255480 10400013 */ beqz $v0, .L802554D0 /* 183D64 80255484 00000000 */ nop /* 183D68 80255488 8E420000 */ lw $v0, 0x0($s2) /* 183D6C 8025548C 30420002 */ andi $v0, $v0, 0x2 /* 183D70 80255490 1440000F */ bnez $v0, .L802554D0 /* 183D74 80255494 00000000 */ nop /* 183D78 80255498 8E5500C0 */ lw $s5, 0xC0($s2) /* 183D7C 8025549C 82A208AC */ lb $v0, 0x8AC($s5) /* 183D80 802554A0 92A308AC */ lbu $v1, 0x8AC($s5) /* 183D84 802554A4 1040000C */ beqz $v0, .L802554D8 /* 183D88 802554A8 2462FFFF */ addiu $v0, $v1, -0x1 /* 183D8C 802554AC A2A208AC */ sb $v0, 0x8AC($s5) /* 183D90 802554B0 00021600 */ sll $v0, $v0, 24 /* 183D94 802554B4 14400008 */ bnez $v0, .L802554D8 /* 183D98 802554B8 3C03EFFF */ lui $v1, (0xEFFFFFFF >> 16) /* 183D9C 802554BC 8FA8039C */ lw $t0, 0x39C($sp) /* 183DA0 802554C0 8D020000 */ lw $v0, 0x0($t0) /* 183DA4 802554C4 3463FFFF */ ori $v1, $v1, (0xEFFFFFFF & 0xFFFF) /* 183DA8 802554C8 00431024 */ and $v0, $v0, $v1 /* 183DAC 802554CC AD020000 */ sw $v0, 0x0($t0) .L802554D0: /* 183DB0 802554D0 08095637 */ j .L802558DC /* 183DB4 802554D4 8E52000C */ lw $s2, 0xC($s2) .L802554D8: /* 183DB8 802554D8 8E430000 */ lw $v1, 0x0($s2) /* 183DBC 802554DC 30620001 */ andi $v0, $v1, 0x1 /* 183DC0 802554E0 1440FFFB */ bnez $v0, .L802554D0 /* 183DC4 802554E4 3C020010 */ lui $v0, (0x100000 >> 16) /* 183DC8 802554E8 00621024 */ and $v0, $v1, $v0 /* 183DCC 802554EC 10400019 */ beqz $v0, .L80255554 /* 183DD0 802554F0 27A800D8 */ addiu $t0, $sp, 0xD8 /* 183DD4 802554F4 8FA9039C */ lw $t1, 0x39C($sp) /* 183DD8 802554F8 C5240170 */ lwc1 $f4, 0x170($t1) /* 183DDC 802554FC 3C01802A */ lui $at, %hi(D_8029D360) D_80255500: /* 183DE0 80255500 D428D360 */ ldc1 $f8, %lo(D_8029D360)($at) /* 183DE4 80255504 46002121 */ cvt.d.s $f4, $f4 /* 183DE8 80255508 46282102 */ mul.d $f4, $f4, $f8 /* 183DEC 8025550C 00000000 */ nop /* 183DF0 80255510 C5220174 */ lwc1 $f2, 0x174($t1) /* 183DF4 80255514 460010A1 */ cvt.d.s $f2, $f2 /* 183DF8 80255518 46281082 */ mul.d $f2, $f2, $f8 /* 183DFC 8025551C 00000000 */ nop /* 183E00 80255520 C5200178 */ lwc1 $f0, 0x178($t1) /* 183E04 80255524 46000021 */ cvt.d.s $f0, $f0 /* 183E08 80255528 46280002 */ mul.d $f0, $f0, $f8 /* 183E0C 8025552C 00000000 */ nop /* 183E10 80255530 46202120 */ cvt.s.d $f4, $f4 /* 183E14 80255534 462010A0 */ cvt.s.d $f2, $f2 /* 183E18 80255538 46200020 */ cvt.s.d $f0, $f0 /* 183E1C 8025553C 44052000 */ mfc1 $a1, $f4 /* 183E20 80255540 44061000 */ mfc1 $a2, $f2 /* 183E24 80255544 44070000 */ mfc1 $a3, $f0 /* 183E28 80255548 0C019DF0 */ jal guScaleF /* 183E2C 8025554C 27A402D8 */ addiu $a0, $sp, 0x2D8 /* 183E30 80255550 27A800D8 */ addiu $t0, $sp, 0xD8 .L80255554: /* 183E34 80255554 27A90118 */ addiu $t1, $sp, 0x118 /* 183E38 80255558 82B407D9 */ lb $s4, 0x7D9($s5) /* 183E3C 8025555C 27B301D8 */ addiu $s3, $sp, 0x1D8 /* 183E40 80255560 AFA00320 */ sw $zero, 0x320($sp) /* 183E44 80255564 AFA00324 */ sw $zero, 0x324($sp) /* 183E48 80255568 AFA80338 */ sw $t0, 0x338($sp) /* 183E4C 8025556C AFA9033C */ sw $t1, 0x33C($sp) .L80255570: /* 183E50 80255570 8FA80320 */ lw $t0, 0x320($sp) /* 183E54 80255574 2694FFFF */ addiu $s4, $s4, -0x1 /* 183E58 80255578 25080001 */ addiu $t0, $t0, 0x1 /* 183E5C 8025557C 06810002 */ bgez $s4, .L80255588 D_80255580: /* 183E60 80255580 AFA80320 */ sw $t0, 0x320($sp) /* 183E64 80255584 2414000F */ addiu $s4, $zero, 0xF .L80255588: /* 183E68 80255588 82A207D9 */ lb $v0, 0x7D9($s5) /* 183E6C 8025558C 128200D3 */ beq $s4, $v0, .L802558DC /* 183E70 80255590 00000000 */ nop /* 183E74 80255594 8FA90320 */ lw $t1, 0x320($sp) /* 183E78 80255598 29220003 */ slti $v0, $t1, 0x3 /* 183E7C 8025559C 1440FFF4 */ bnez $v0, .L80255570 /* 183E80 802555A0 00000000 */ nop /* 183E84 802555A4 8FA80324 */ lw $t0, 0x324($sp) /* 183E88 802555A8 AFA00320 */ sw $zero, 0x320($sp) D_802555AC: /* 183E8C 802555AC 82A207DA */ lb $v0, 0x7DA($s5) /* 183E90 802555B0 25080001 */ addiu $t0, $t0, 0x1 /* 183E94 802555B4 0048102A */ slt $v0, $v0, $t0 /* 183E98 802555B8 144000C8 */ bnez $v0, .L802558DC /* 183E9C 802555BC AFA80324 */ sw $t0, 0x324($sp) /* 183EA0 802555C0 241E0078 */ addiu $fp, $zero, 0x78 /* 183EA4 802555C4 00142840 */ sll $a1, $s4, 1 /* 183EA8 802555C8 02A52821 */ addu $a1, $s5, $a1 /* 183EAC 802555CC 02B42021 */ addu $a0, $s5, $s4 /* 183EB0 802555D0 84A207FC */ lh $v0, 0x7FC($a1) /* 183EB4 802555D4 84A3081C */ lh $v1, 0x81C($a1) /* 183EB8 802555D8 4482D000 */ mtc1 $v0, $f26 /* 183EBC 802555DC 00000000 */ nop /* 183EC0 802555E0 4680D6A0 */ cvt.s.w $f26, $f26 /* 183EC4 802555E4 4483E000 */ mtc1 $v1, $f28 /* 183EC8 802555E8 00000000 */ nop /* 183ECC 802555EC 4680E720 */ cvt.s.w $f28, $f28 /* 183ED0 802555F0 84A3083C */ lh $v1, 0x83C($a1) /* 183ED4 802555F4 9082087C */ lbu $v0, 0x87C($a0) /* 183ED8 802555F8 4483B000 */ mtc1 $v1, $f22 /* 183EDC 802555FC 00000000 */ nop /* 183EE0 80255600 4680B5A0 */ cvt.s.w $f22, $f22 /* 183EE4 80255604 00021040 */ sll $v0, $v0, 1 /* 183EE8 80255608 4482C000 */ mtc1 $v0, $f24 /* 183EEC 8025560C 00000000 */ nop /* 183EF0 80255610 4680C620 */ cvt.s.w $f24, $f24 /* 183EF4 80255614 9083088C */ lbu $v1, 0x88C($a0) /* 183EF8 80255618 9082089C */ lbu $v0, 0x89C($a0) /* 183EFC 8025561C 00031840 */ sll $v1, $v1, 1 /* 183F00 80255620 4483F000 */ mtc1 $v1, $f30 /* 183F04 80255624 00000000 */ nop /* 183F08 80255628 4680F7A0 */ cvt.s.w $f30, $f30 /* 183F0C 8025562C 00021040 */ sll $v0, $v0, 1 D_80255630: /* 183F10 80255630 86430098 */ lh $v1, 0x98($s2) /* 183F14 80255634 44824000 */ mtc1 $v0, $f8 /* 183F18 80255638 00000000 */ nop /* 183F1C 8025563C 46804220 */ cvt.s.w $f8, $f8 /* 183F20 80255640 E7A80328 */ swc1 $f8, 0x328($sp) /* 183F24 80255644 84A507DC */ lh $a1, 0x7DC($a1) /* 183F28 80255648 28620032 */ slti $v0, $v1, 0x32 /* 183F2C 8025564C AFA5032C */ sw $a1, 0x32C($sp) /* 183F30 80255650 8090085C */ lb $s0, 0x85C($a0) /* 183F34 80255654 8091086C */ lb $s1, 0x86C($a0) /* 183F38 80255658 10400004 */ beqz $v0, .L8025566C /* 183F3C 8025565C 24160014 */ addiu $s6, $zero, 0x14 D_80255660: /* 183F40 80255660 241E0032 */ addiu $fp, $zero, 0x32 /* 183F44 80255664 080955A5 */ j .L80255694 /* 183F48 80255668 24160008 */ addiu $s6, $zero, 0x8 .L8025566C: /* 183F4C 8025566C 28620064 */ slti $v0, $v1, 0x64 /* 183F50 80255670 10400004 */ beqz $v0, .L80255684 /* 183F54 80255674 28620096 */ slti $v0, $v1, 0x96 /* 183F58 80255678 241E0046 */ addiu $fp, $zero, 0x46 /* 183F5C 8025567C 080955A5 */ j .L80255694 /* 183F60 80255680 2416000A */ addiu $s6, $zero, 0xA .L80255684: /* 183F64 80255684 10400003 */ beqz $v0, .L80255694 /* 183F68 80255688 00000000 */ nop /* 183F6C 8025568C 241E0064 */ addiu $fp, $zero, 0x64 /* 183F70 80255690 2416000F */ addiu $s6, $zero, 0xF .L80255694: /* 183F74 80255694 8FA8039C */ lw $t0, 0x39C($sp) /* 183F78 80255698 8D020000 */ lw $v0, 0x0($t0) /* 183F7C 8025569C 30420800 */ andi $v0, $v0, 0x800 /* 183F80 802556A0 14400015 */ bnez $v0, .L802556F8 /* 183F84 802556A4 00101023 */ negu $v0, $s0 /* 183F88 802556A8 44824000 */ mtc1 $v0, $f8 D_802556AC: /* 183F8C 802556AC 00000000 */ nop /* 183F90 802556B0 46804220 */ cvt.s.w $f8, $f8 /* 183F94 802556B4 00111023 */ negu $v0, $s1 /* 183F98 802556B8 44054000 */ mfc1 $a1, $f8 /* 183F9C 802556BC 44824000 */ mtc1 $v0, $f8 /* 183FA0 802556C0 00000000 */ nop /* 183FA4 802556C4 46804220 */ cvt.s.w $f8, $f8 /* 183FA8 802556C8 4407A000 */ mfc1 $a3, $f20 /* 183FAC 802556CC 44064000 */ mfc1 $a2, $f8 /* 183FB0 802556D0 0C019E40 */ jal guTranslateF /* 183FB4 802556D4 27A40218 */ addiu $a0, $sp, 0x218 /* 183FB8 802556D8 44904000 */ mtc1 $s0, $f8 /* 183FBC 802556DC 00000000 */ nop /* 183FC0 802556E0 46804220 */ cvt.s.w $f8, $f8 D_802556E4: /* 183FC4 802556E4 44054000 */ mfc1 $a1, $f8 /* 183FC8 802556E8 44914000 */ mtc1 $s1, $f8 /* 183FCC 802556EC 00000000 */ nop /* 183FD0 802556F0 080955D1 */ j .L80255744 /* 183FD4 802556F4 46804220 */ cvt.s.w $f8, $f8 .L802556F8: /* 183FD8 802556F8 44824000 */ mtc1 $v0, $f8 /* 183FDC 802556FC 00000000 */ nop /* 183FE0 80255700 46804220 */ cvt.s.w $f8, $f8 /* 183FE4 80255704 44054000 */ mfc1 $a1, $f8 /* 183FE8 80255708 44914000 */ mtc1 $s1, $f8 /* 183FEC 8025570C 00000000 */ nop /* 183FF0 80255710 46804220 */ cvt.s.w $f8, $f8 /* 183FF4 80255714 4407A000 */ mfc1 $a3, $f20 /* 183FF8 80255718 44064000 */ mfc1 $a2, $f8 D_8025571C: /* 183FFC 8025571C 0C019E40 */ jal guTranslateF /* 184000 80255720 27A40218 */ addiu $a0, $sp, 0x218 /* 184004 80255724 44904000 */ mtc1 $s0, $f8 /* 184008 80255728 00000000 */ nop /* 18400C 8025572C 46804220 */ cvt.s.w $f8, $f8 /* 184010 80255730 00111023 */ negu $v0, $s1 /* 184014 80255734 44054000 */ mfc1 $a1, $f8 /* 184018 80255738 44824000 */ mtc1 $v0, $f8 D_8025573C: /* 18401C 8025573C 00000000 */ nop /* 184020 80255740 46804220 */ cvt.s.w $f8, $f8 .L80255744: /* 184024 80255744 4407A000 */ mfc1 $a3, $f20 /* 184028 80255748 44064000 */ mfc1 $a2, $f8 /* 18402C 8025574C 0C019E40 */ jal guTranslateF /* 184030 80255750 27A40258 */ addiu $a0, $sp, 0x258 D_80255754: /* 184034 80255754 4405D000 */ mfc1 $a1, $f26 /* 184038 80255758 4406E000 */ mfc1 $a2, $f28 /* 18403C 8025575C 4407B000 */ mfc1 $a3, $f22 /* 184040 80255760 0C019E40 */ jal guTranslateF /* 184044 80255764 27A40158 */ addiu $a0, $sp, 0x158 /* 184048 80255768 4405C000 */ mfc1 $a1, $f24 /* 18404C 8025576C 3C063F80 */ lui $a2, (0x3F800000 >> 16) /* 184050 80255770 4407A000 */ mfc1 $a3, $f20 /* 184054 80255774 27A40018 */ addiu $a0, $sp, 0x18 /* 184058 80255778 0C019EC8 */ jal guRotateF /* 18405C 8025577C E7B40010 */ swc1 $f20, 0x10($sp) /* 184060 80255780 4405F000 */ mfc1 $a1, $f30 /* 184064 80255784 4406A000 */ mfc1 $a2, $f20 /* 184068 80255788 3C073F80 */ lui $a3, (0x3F800000 >> 16) D_8025578C: /* 18406C 8025578C 8FA40330 */ lw $a0, 0x330($sp) /* 184070 80255790 0C019EC8 */ jal guRotateF /* 184074 80255794 E7B40010 */ swc1 $f20, 0x10($sp) /* 184078 80255798 3C013F80 */ lui $at, (0x3F800000 >> 16) D_8025579C: /* 18407C 8025579C 44814000 */ mtc1 $at, $f8 /* 184080 802557A0 8FA50328 */ lw $a1, 0x328($sp) /* 184084 802557A4 4406A000 */ mfc1 $a2, $f20 /* 184088 802557A8 4407A000 */ mfc1 $a3, $f20 /* 18408C 802557AC 8FA40334 */ lw $a0, 0x334($sp) /* 184090 802557B0 0C019EC8 */ jal guRotateF /* 184094 802557B4 E7A80010 */ swc1 $f8, 0x10($sp) /* 184098 802557B8 27A50018 */ addiu $a1, $sp, 0x18 /* 18409C 802557BC 8FA40330 */ lw $a0, 0x330($sp) /* 1840A0 802557C0 0C019D80 */ jal guMtxCatF /* 1840A4 802557C4 02E0302D */ daddu $a2, $s7, $zero /* 1840A8 802557C8 8FA50334 */ lw $a1, 0x334($sp) D_802557CC: /* 1840AC 802557CC 8FA60338 */ lw $a2, 0x338($sp) /* 1840B0 802557D0 0C019D80 */ jal guMtxCatF /* 1840B4 802557D4 02E0202D */ daddu $a0, $s7, $zero /* 1840B8 802557D8 82420074 */ lb $v0, 0x74($s2) /* 1840BC 802557DC C6420050 */ lwc1 $f2, 0x50($s2) /* 1840C0 802557E0 44820000 */ mtc1 $v0, $f0 /* 1840C4 802557E4 00000000 */ nop /* 1840C8 802557E8 46800020 */ cvt.s.w $f0, $f0 D_802557EC: /* 1840CC 802557EC 46001082 */ mul.s $f2, $f2, $f0 /* 1840D0 802557F0 00000000 */ nop /* 1840D4 802557F4 8E45004C */ lw $a1, 0x4C($s2) /* 1840D8 802557F8 8E470054 */ lw $a3, 0x54($s2) /* 1840DC 802557FC 8FA4033C */ lw $a0, 0x33C($sp) /* 1840E0 80255800 44061000 */ mfc1 $a2, $f2 /* 1840E4 80255804 0C019DF0 */ jal guScaleF /* 1840E8 80255808 00000000 */ nop /* 1840EC 8025580C 27A50218 */ addiu $a1, $sp, 0x218 D_80255810: /* 1840F0 80255810 8FA4033C */ lw $a0, 0x33C($sp) /* 1840F4 80255814 0C019D80 */ jal guMtxCatF /* 1840F8 80255818 0260302D */ daddu $a2, $s3, $zero /* 1840FC 8025581C 0260202D */ daddu $a0, $s3, $zero /* 184100 80255820 8FA50338 */ lw $a1, 0x338($sp) /* 184104 80255824 0C019D80 */ jal guMtxCatF /* 184108 80255828 02E0302D */ daddu $a2, $s7, $zero /* 18410C 8025582C 02E0202D */ daddu $a0, $s7, $zero /* 184110 80255830 27A50258 */ addiu $a1, $sp, 0x258 /* 184114 80255834 0C019D80 */ jal guMtxCatF /* 184118 80255838 0260302D */ daddu $a2, $s3, $zero /* 18411C 8025583C 8E420000 */ lw $v0, 0x0($s2) /* 184120 80255840 3C030010 */ lui $v1, (0x100000 >> 16) /* 184124 80255844 00431024 */ and $v0, $v0, $v1 /* 184128 80255848 14400003 */ bnez $v0, .L80255858 D_8025584C: /* 18412C 8025584C 0260202D */ daddu $a0, $s3, $zero /* 184130 80255850 08095617 */ j .L8025585C /* 184134 80255854 27A50298 */ addiu $a1, $sp, 0x298 .L80255858: /* 184138 80255858 27A502D8 */ addiu $a1, $sp, 0x2D8 .L8025585C: /* 18413C 8025585C 0C019D80 */ jal guMtxCatF /* 184140 80255860 02E0302D */ daddu $a2, $s7, $zero /* 184144 80255864 27A40198 */ addiu $a0, $sp, 0x198 /* 184148 80255868 27A50158 */ addiu $a1, $sp, 0x158 /* 18414C 8025586C 0C019D80 */ jal guMtxCatF D_80255870: /* 184150 80255870 0260302D */ daddu $a2, $s3, $zero /* 184154 80255874 8FA80324 */ lw $t0, 0x324($sp) /* 184158 80255878 01160018 */ mult $t0, $s6 /* 18415C 8025587C 3C118000 */ lui $s1, (0x80000000 >> 16) /* 184160 80255880 8FA80398 */ lw $t0, 0x398($sp) /* 184164 80255884 00004812 */ mflo $t1 /* 184168 80255888 15000004 */ bnez $t0, .L8025589C /* 18416C 8025588C 03C98023 */ subu $s0, $fp, $t1 /* 184170 80255890 8FA5032C */ lw $a1, 0x32C($sp) D_80255894: /* 184174 80255894 08095630 */ j .L802558C0 /* 184178 80255898 0200302D */ daddu $a2, $s0, $zero .L8025589C: /* 18417C 8025589C 8FA9032C */ lw $t1, 0x32C($sp) /* 184180 802558A0 252200B4 */ addiu $v0, $t1, 0xB4 /* 184184 802558A4 44826000 */ mtc1 $v0, $f12 /* 184188 802558A8 00000000 */ nop /* 18418C 802558AC 0C00A6C9 */ jal clamp_angle /* 184190 802558B0 46806320 */ cvt.s.w $f12, $f12 /* 184194 802558B4 4600020D */ trunc.w.s $f8, $f0 /* 184198 802558B8 44054000 */ mfc1 $a1, $f8 /* 18419C 802558BC 0200302D */ daddu $a2, $s0, $zero .L802558C0: /* 1841A0 802558C0 8E440084 */ lw $a0, 0x84($s2) D_802558C4: /* 1841A4 802558C4 0000382D */ daddu $a3, $zero, $zero /* 1841A8 802558C8 AFB30010 */ sw $s3, 0x10($sp) /* 1841AC 802558CC 0C0B78F6 */ jal spr_draw_npc_sprite /* 1841B0 802558D0 00912025 */ or $a0, $a0, $s1 /* 1841B4 802558D4 0809555C */ j .L80255570 /* 1841B8 802558D8 00000000 */ nop .L802558DC: /* 1841BC 802558DC 8FA9031C */ lw $t1, 0x31C($sp) /* 1841C0 802558E0 8FA80318 */ lw $t0, 0x318($sp) /* 1841C4 802558E4 25290001 */ addiu $t1, $t1, 0x1 /* 1841C8 802558E8 0128102A */ slt $v0, $t1, $t0 /* 1841CC 802558EC 1440FEE3 */ bnez $v0, .L8025547C /* 1841D0 802558F0 AFA9031C */ sw $t1, 0x31C($sp) .L802558F4: /* 1841D4 802558F4 8FBF0364 */ lw $ra, 0x364($sp) /* 1841D8 802558F8 8FBE0360 */ lw $fp, 0x360($sp) /* 1841DC 802558FC 8FB7035C */ lw $s7, 0x35C($sp) /* 1841E0 80255900 8FB60358 */ lw $s6, 0x358($sp) /* 1841E4 80255904 8FB50354 */ lw $s5, 0x354($sp) /* 1841E8 80255908 8FB40350 */ lw $s4, 0x350($sp) D_8025590C: /* 1841EC 8025590C 8FB3034C */ lw $s3, 0x34C($sp) /* 1841F0 80255910 8FB20348 */ lw $s2, 0x348($sp) /* 1841F4 80255914 8FB10344 */ lw $s1, 0x344($sp) /* 1841F8 80255918 8FB00340 */ lw $s0, 0x340($sp) /* 1841FC 8025591C D7BE0390 */ ldc1 $f30, 0x390($sp) /* 184200 80255920 D7BC0388 */ ldc1 $f28, 0x388($sp) /* 184204 80255924 D7BA0380 */ ldc1 $f26, 0x380($sp) /* 184208 80255928 D7B80378 */ ldc1 $f24, 0x378($sp) /* 18420C 8025592C D7B60370 */ ldc1 $f22, 0x370($sp) /* 184210 80255930 D7B40368 */ ldc1 $f20, 0x368($sp) /* 184214 80255934 03E00008 */ jr $ra /* 184218 80255938 27BD0398 */ addiu $sp, $sp, 0x398 ### DECOMPILED C INSTRUCTIONS: void func_802552EC(s32 arg0, Actor* actor) { DecorationTable* decorationTable; ActorPart* partTable; Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation; Matrix4f mtxScale, mtxTranslate; Matrix4f mtxTemp, mtxTransform; Matrix4f mtxPivotOn, mtxPivotOff; Matrix4f mtxActor, mtxPartScale; s32 numParts; s32 i, j, k, l; f32 x, y, z; f32 rotX, rotY, rotZ; s32 yaw; s32 opacity; s32 pivotX; s32 pivotY; s32 phi_fp; s32 phi_s6; s32 temp; s32 flags; 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(mtxRotX, mtxRotY, 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(mtxScale, mtxRotation, mtxActor); numParts = actor->numParts; partTable = actor->partsTable; for (i = 0; i < numParts; i++) { if ((partTable->idleAnimations == NULL) || (partTable->flags & ACTOR_PART_FLAG_2)) { partTable = partTable->nextPart; continue; } decorationTable = partTable->decorationTable; if (decorationTable->effectType != 0) { decorationTable->effectType--; if (decorationTable->effectType == 0) { actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED; partTable = partTable->nextPart; continue; } } if (partTable->flags & ACTOR_PART_FLAG_INVISIBLE) { partTable = partTable->nextPart; continue; } if (partTable->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) { guScaleF(mtxPartScale, actor->scale.x * SPRITE_WORLD_SCALE_D, actor->scale.y * SPRITE_WORLD_SCALE_D, actor->scale.z * SPRITE_WORLD_SCALE_D); } j = decorationTable->unk_7D9; k = 0; l = 0; while (1) { j--; k++; if (j < 0) { j = 15; } if (j == decorationTable->unk_7D9) { break; } if (k < 3) { continue; } k = 0; l++; if (decorationTable->unk_7DA < l) { break; } opacity = partTable->opacity; x = decorationTable->posX[j]; y = decorationTable->posY[j]; z = decorationTable->posZ[j]; yaw = decorationTable->yaw[j]; pivotX = decorationTable->rotationPivotOffsetX[j]; pivotY = decorationTable->rotationPivotOffsetY[j]; rotX = decorationTable->rotX[j] * 2; rotY = decorationTable->rotY[j] * 2; rotZ = decorationTable->rotZ[j] * 2; phi_fp = 120; phi_s6 = 20; if (opacity < 50) { phi_fp = 50; phi_s6 = 8; } else if (opacity < 100) { phi_fp = 70; phi_s6 = 10; } else if (opacity < 150) { phi_fp = 100; phi_s6 = 15; } if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) { guTranslateF(mtxPivotOn, -pivotX, -pivotY, 0.0f); guTranslateF(mtxPivotOff, pivotX, pivotY, 0.0f); } else { guTranslateF(mtxPivotOn, -pivotX, pivotY, 0.0f); guTranslateF(mtxPivotOff, pivotX, -pivotY, 0.0f); } guTranslateF(mtxTranslate, x, y, z); 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(mtxRotY, mtxRotX, mtxTemp); guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); guScaleF(mtxScale, partTable->scale.x, partTable->scale.y * partTable->verticalStretch, partTable->scale.z); guMtxCatF(mtxScale, mtxPivotOn, mtxTransform); guMtxCatF(mtxTransform, mtxRotation, mtxTemp); guMtxCatF(mtxTemp, mtxPivotOff, mtxTransform); if (!(partTable->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { guMtxCatF(mtxTransform, mtxActor, mtxTemp); } else { guMtxCatF(mtxTransform, mtxPartScale, mtxTemp); } guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); flags = ACTOR_PART_FLAG_80000000; temp = phi_fp - l * phi_s6; if (arg0 == 0) { spr_draw_npc_sprite(partTable->spriteInstanceID | flags, yaw, temp, 0, mtxTransform); } else { spr_draw_npc_sprite(partTable->spriteInstanceID | flags, clamp_angle(yaw + 180), temp, 0, mtxTransform); } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802A9B44_7B14E4 /* 41E8D4 802A9B44 3C03800E */ lui $v1, %hi(gBattleSubState) /* 41E8D8 802A9B48 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) /* 41E8DC 802A9B4C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 41E8E0 802A9B50 AFB20018 */ sw $s2, 0x18($sp) /* 41E8E4 802A9B54 3C12800E */ lui $s2, %hi(gBattleStatus) /* 41E8E8 802A9B58 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) /* 41E8EC 802A9B5C AFBF001C */ sw $ra, 0x1C($sp) D_802A9B60_7B1500: /* 41E8F0 802A9B60 AFB10014 */ sw $s1, 0x14($sp) /* 41E8F4 802A9B64 AFB00010 */ sw $s0, 0x10($sp) /* 41E8F8 802A9B68 F7B80030 */ sdc1 $f24, 0x30($sp) /* 41E8FC 802A9B6C F7B60028 */ sdc1 $f22, 0x28($sp) .L802A9B70_7B1510: /* 41E900 802A9B70 F7B40020 */ sdc1 $f20, 0x20($sp) /* 41E904 802A9B74 8E5000D8 */ lw $s0, 0xD8($s2) .L802A9B78_7B1518: /* 41E908 802A9B78 8E5100DC */ lw $s1, 0xDC($s2) /* 41E90C 802A9B7C 2C62000C */ sltiu $v0, $v1, 0xC /* 41E910 802A9B80 1040012D */ beqz $v0, .L802AA038_7B19D8 /* 41E914 802A9B84 00031080 */ sll $v0, $v1, 2 /* 41E918 802A9B88 3C01802B */ lui $at, %hi(jtbl_802ACBB0_7B4550) .L802A9B8C_7B152C: /* 41E91C 802A9B8C 00220821 */ addu $at, $at, $v0 /* 41E920 802A9B90 8C22CBB0 */ lw $v0, %lo(jtbl_802ACBB0_7B4550)($at) /* 41E924 802A9B94 00400008 */ jr $v0 /* 41E928 802A9B98 00000000 */ nop glabel .L802A9B9C_7B153C /* 41E92C 802A9B9C 0C093903 */ jal func_8024E40C .L802A9BA0_7B1540: /* 41E930 802A9BA0 24040002 */ addiu $a0, $zero, 0x2 /* 41E934 802A9BA4 0C093936 */ jal D_8024E4D8_C0BD58 /* 41E938 802A9BA8 2404000A */ addiu $a0, $zero, 0xA /* 41E93C 802A9BAC 3C02800E */ lui $v0, %hi(gBattleStatus) /* 41E940 802A9BB0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) /* 41E944 802A9BB4 3C030010 */ lui $v1, (0x100000 >> 16) /* 41E948 802A9BB8 00431024 */ and $v0, $v0, $v1 .L802A9BBC_7B155C: /* 41E94C 802A9BBC 14400003 */ bnez $v0, .L802A9BCC_7B156C /* 41E950 802A9BC0 2402000A */ addiu $v0, $zero, 0xA /* 41E954 802A9BC4 080AA80C */ j .L802AA030_7B19D0 /* 41E958 802A9BC8 2402000B */ addiu $v0, $zero, 0xB .L802A9BCC_7B156C: /* 41E95C 802A9BCC C6000138 */ lwc1 $f0, 0x138($s0) /* 41E960 802A9BD0 C6020140 */ lwc1 $f2, 0x140($s0) /* 41E964 802A9BD4 E600000C */ swc1 $f0, 0xC($s0) .L802A9BD8_7B1578: /* 41E968 802A9BD8 E6020014 */ swc1 $f2, 0x14($s0) /* 41E96C 802A9BDC C6200138 */ lwc1 $f0, 0x138($s1) /* 41E970 802A9BE0 3C01800E */ lui $at, %hi(gBattleSubState) .L802A9BE4_7B1584: /* 41E974 802A9BE4 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 41E978 802A9BE8 E6000018 */ swc1 $f0, 0x18($s0) /* 41E97C 802A9BEC C6200140 */ lwc1 $f0, 0x140($s1) /* 41E980 802A9BF0 24020004 */ addiu $v0, $zero, 0x4 /* 41E984 802A9BF4 A6020070 */ sh $v0, 0x70($s0) .L802A9BF8_7B1598: /* 41E988 802A9BF8 AE000054 */ sw $zero, 0x54($s0) /* 41E98C 802A9BFC 080AA80E */ j .L802AA038_7B19D8 /* 41E990 802A9C00 E6000020 */ swc1 $f0, 0x20($s0) glabel .L802A9C04_7B15A4 /* 41E994 802A9C04 86020070 */ lh $v0, 0x70($s0) .L802A9C08_7B15A8: /* 41E998 802A9C08 10400022 */ beqz $v0, .L802A9C94_7B1634 /* 41E99C 802A9C0C 00000000 */ nop /* 41E9A0 802A9C10 C6000018 */ lwc1 $f0, 0x18($s0) /* 41E9A4 802A9C14 C6080144 */ lwc1 $f8, 0x144($s0) /* 41E9A8 802A9C18 C6020020 */ lwc1 $f2, 0x20($s0) /* 41E9AC 802A9C1C 46080001 */ sub.s $f0, $f0, $f8 /* 41E9B0 802A9C20 C604014C */ lwc1 $f4, 0x14C($s0) /* 41E9B4 802A9C24 46041081 */ sub.s $f2, $f2, $f4 /* 41E9B8 802A9C28 44823000 */ mtc1 $v0, $f6 /* 41E9BC 802A9C2C 00000000 */ nop .L802A9C30_7B15D0: /* 41E9C0 802A9C30 468031A0 */ cvt.s.w $f6, $f6 /* 41E9C4 802A9C34 46060003 */ div.s $f0, $f0, $f6 /* 41E9C8 802A9C38 46004200 */ add.s $f8, $f8, $f0 /* 41E9CC 802A9C3C 46003006 */ mov.s $f0, $f6 /* 41E9D0 802A9C40 46061083 */ div.s $f2, $f2, $f6 /* 41E9D4 802A9C44 C600000C */ lwc1 $f0, 0xC($s0) /* 41E9D8 802A9C48 46022100 */ add.s $f4, $f4, $f2 /* 41E9DC 802A9C4C E6080144 */ swc1 $f8, 0x144($s0) .L802A9C50_7B15F0: /* 41E9E0 802A9C50 E604014C */ swc1 $f4, 0x14C($s0) /* 41E9E4 802A9C54 C6240144 */ lwc1 $f4, 0x144($s1) .L802A9C58_7B15F8: /* 41E9E8 802A9C58 46040001 */ sub.s $f0, $f0, $f4 /* 41E9EC 802A9C5C 46003086 */ mov.s $f2, $f6 /* 41E9F0 802A9C60 46060003 */ div.s $f0, $f0, $f6 /* 41E9F4 802A9C64 46002100 */ add.s $f4, $f4, $f0 /* 41E9F8 802A9C68 E6240144 */ swc1 $f4, 0x144($s1) /* 41E9FC 802A9C6C C6000014 */ lwc1 $f0, 0x14($s0) /* 41EA00 802A9C70 C624014C */ lwc1 $f4, 0x14C($s1) /* 41EA04 802A9C74 86020070 */ lh $v0, 0x70($s0) /* 41EA08 802A9C78 46040001 */ sub.s $f0, $f0, $f4 /* 41EA0C 802A9C7C 44821000 */ mtc1 $v0, $f2 D_802A9C80_7B1620: /* 41EA10 802A9C80 00000000 */ nop .L802A9C84_7B1624: /* 41EA14 802A9C84 468010A0 */ cvt.s.w $f2, $f2 /* 41EA18 802A9C88 46020003 */ div.s $f0, $f0, $f2 /* 41EA1C 802A9C8C 46002100 */ add.s $f4, $f4, $f0 /* 41EA20 802A9C90 E624014C */ swc1 $f4, 0x14C($s1) .L802A9C94_7B1634: /* 41EA24 802A9C94 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41EA28 802A9C98 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 41EA2C 802A9C9C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) D_802A9CA0_7B1640: /* 41EA30 802A9CA0 4481B000 */ mtc1 $at, $f22 /* 41EA34 802A9CA4 00000000 */ nop /* 41EA38 802A9CA8 46166302 */ mul.s $f12, $f12, $f22 /* 41EA3C 802A9CAC 00000000 */ nop /* 41EA40 802A9CB0 3C0143B4 */ lui $at, (0x43B40000 >> 16) .L802A9CB4_7B1654: /* 41EA44 802A9CB4 4481C000 */ mtc1 $at, $f24 /* 41EA48 802A9CB8 3C014180 */ lui $at, (0x41800000 >> 16) .L802A9CBC_7B165C: /* 41EA4C 802A9CBC 4481A000 */ mtc1 $at, $f20 /* 41EA50 802A9CC0 0C00A85B */ jal sin_rad /* 41EA54 802A9CC4 46186303 */ div.s $f12, $f12, $f24 /* 41EA58 802A9CC8 46140002 */ mul.s $f0, $f0, $f20 /* 41EA5C 802A9CCC 00000000 */ nop /* 41EA60 802A9CD0 C602014C */ lwc1 $f2, 0x14C($s0) /* 41EA64 802A9CD4 46001081 */ sub.s $f2, $f2, $f0 /* 41EA68 802A9CD8 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41EA6C 802A9CDC 46006307 */ neg.s $f12, $f12 /* 41EA70 802A9CE0 0C00A6C9 */ jal clamp_angle /* 41EA74 802A9CE4 E602014C */ swc1 $f2, 0x14C($s0) /* 41EA78 802A9CE8 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41EA7C 802A9CEC 46166302 */ mul.s $f12, $f12, $f22 /* 41EA80 802A9CF0 00000000 */ nop /* 41EA84 802A9CF4 E600018C */ swc1 $f0, 0x18C($s0) /* 41EA88 802A9CF8 0C00A85B */ jal sin_rad .L802A9CFC_7B169C: /* 41EA8C 802A9CFC 46186303 */ div.s $f12, $f12, $f24 /* 41EA90 802A9D00 46140002 */ mul.s $f0, $f0, $f20 /* 41EA94 802A9D04 00000000 */ nop /* 41EA98 802A9D08 C622014C */ lwc1 $f2, 0x14C($s1) /* 41EA9C 802A9D0C 46001080 */ add.s $f2, $f2, $f0 /* 41EAA0 802A9D10 E622014C */ swc1 $f2, 0x14C($s1) /* 41EAA4 802A9D14 C60C0054 */ lwc1 $f12, 0x54($s0) /* 41EAA8 802A9D18 0C00A6C9 */ jal clamp_angle /* 41EAAC 802A9D1C 46006307 */ neg.s $f12, $f12 /* 41EAB0 802A9D20 E620018C */ swc1 $f0, 0x18C($s1) /* 41EAB4 802A9D24 C6000054 */ lwc1 $f0, 0x54($s0) /* 41EAB8 802A9D28 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 41EABC 802A9D2C 44811000 */ mtc1 $at, $f2 /* 41EAC0 802A9D30 86020070 */ lh $v0, 0x70($s0) /* 41EAC4 802A9D34 46020000 */ add.s $f0, $f0, $f2 /* 41EAC8 802A9D38 96030070 */ lhu $v1, 0x70($s0) /* 41EACC 802A9D3C 10400004 */ beqz $v0, .L802A9D50_7B16F0 /* 41EAD0 802A9D40 E6000054 */ swc1 $f0, 0x54($s0) /* 41EAD4 802A9D44 2462FFFF */ addiu $v0, $v1, -0x1 .L802A9D48_7B16E8: /* 41EAD8 802A9D48 080AA80E */ j .L802AA038_7B19D8 /* 41EADC 802A9D4C A6020070 */ sh $v0, 0x70($s0) .L802A9D50_7B16F0: /* 41EAE0 802A9D50 C6000018 */ lwc1 $f0, 0x18($s0) /* 41EAE4 802A9D54 C6020020 */ lwc1 $f2, 0x20($s0) /* 41EAE8 802A9D58 C604000C */ lwc1 $f4, 0xC($s0) /* 41EAEC 802A9D5C E6000144 */ swc1 $f0, 0x144($s0) /* 41EAF0 802A9D60 E602014C */ swc1 $f2, 0x14C($s0) /* 41EAF4 802A9D64 E6240144 */ swc1 $f4, 0x144($s1) .L802A9D68_7B1708: /* 41EAF8 802A9D68 C6000014 */ lwc1 $f0, 0x14($s0) /* 41EAFC 802A9D6C E620014C */ swc1 $f0, 0x14C($s1) /* 41EB00 802A9D70 C6000144 */ lwc1 $f0, 0x144($s0) /* 41EB04 802A9D74 C602014C */ lwc1 $f2, 0x14C($s0) /* 41EB08 802A9D78 3C04FFEF */ lui $a0, (0xFFEFFFFF >> 16) glabel .L802A9D7C_7B171C /* 41EB0C 802A9D7C E6000138 */ swc1 $f0, 0x138($s0) /* 41EB10 802A9D80 E6020140 */ swc1 $f2, 0x140($s0) /* 41EB14 802A9D84 C6200144 */ lwc1 $f0, 0x144($s1) /* 41EB18 802A9D88 C622014C */ lwc1 $f2, 0x14C($s1) /* 41EB1C 802A9D8C 3C03800E */ lui $v1, %hi(gBattleStatus) /* 41EB20 802A9D90 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 41EB24 802A9D94 E6200138 */ swc1 $f0, 0x138($s1) /* 41EB28 802A9D98 E6220140 */ swc1 $f2, 0x140($s1) /* 41EB2C 802A9D9C 8C620000 */ lw $v0, 0x0($v1) /* 41EB30 802A9DA0 3484FFFF */ ori $a0, $a0, (0xFFEFFFFF & 0xFFFF) /* 41EB34 802A9DA4 00441024 */ and $v0, $v0, $a0 /* 41EB38 802A9DA8 AC620000 */ sw $v0, 0x0($v1) glabel .L802A9DAC_7B174C /* 41EB3C 802A9DAC 3C03800E */ lui $v1, %hi(gBattleStatus) /* 41EB40 802A9DB0 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 41EB44 802A9DB4 8C620000 */ lw $v0, 0x0($v1) /* 41EB48 802A9DB8 3C04FBFF */ lui $a0, (0xFBFFFFFF >> 16) /* 41EB4C 802A9DBC 34420002 */ ori $v0, $v0, 0x2 D_802A9DC0_7B1760: /* 41EB50 802A9DC0 AC620000 */ sw $v0, 0x0($v1) /* 41EB54 802A9DC4 8E020000 */ lw $v0, 0x0($s0) /* 41EB58 802A9DC8 3484FFFF */ ori $a0, $a0, (0xFBFFFFFF & 0xFFFF) /* 41EB5C 802A9DCC 00441024 */ and $v0, $v0, $a0 /* 41EB60 802A9DD0 3C040800 */ lui $a0, (0x8000000 >> 16) /* 41EB64 802A9DD4 00441025 */ or $v0, $v0, $a0 .L802A9DD8_7B1778: /* 41EB68 802A9DD8 12200006 */ beqz $s1, .L802A9DF4_7B1794 /* 41EB6C 802A9DDC AE020000 */ sw $v0, 0x0($s0) D_802A9DE0_7B1780: /* 41EB70 802A9DE0 8E220000 */ lw $v0, 0x0($s1) /* 41EB74 802A9DE4 3C030400 */ lui $v1, (0x4000000 >> 16) .L802A9DE8_7B1788: /* 41EB78 802A9DE8 00431025 */ or $v0, $v0, $v1 /* 41EB7C 802A9DEC 00441025 */ or $v0, $v0, $a0 .L802A9DF0_7B1790: /* 41EB80 802A9DF0 AE220000 */ sw $v0, 0x0($s1) .L802A9DF4_7B1794: /* 41EB84 802A9DF4 24020008 */ addiu $v0, $zero, 0x8 /* 41EB88 802A9DF8 3C07802B */ lui $a3, %hi(BattleMenu_OptionEnabled) /* 41EB8C 802A9DFC 24E7D0D0 */ addiu $a3, $a3, %lo(BattleMenu_OptionEnabled) /* 41EB90 802A9E00 A640017C */ sh $zero, 0x17C($s2) .L802A9E04_7B17A4: /* 41EB94 802A9E04 3C01802B */ lui $at, %hi(battle_menu_submenuIDs) /* 41EB98 802A9E08 AC22D0B8 */ sw $v0, %lo(battle_menu_submenuIDs)($at) /* 41EB9C 802A9E0C 24020001 */ addiu $v0, $zero, 0x1 /* 41EBA0 802A9E10 3C08802B */ lui $t0, %hi(battle_menu_isMessageDisabled) /* 41EBA4 802A9E14 2508D0E8 */ addiu $t0, $t0, %lo(battle_menu_isMessageDisabled) .L802A9E18_7B17B8: /* 41EBA8 802A9E18 3C06802B */ lui $a2, %hi(D_802AB720_7B30C0) /* 41EBAC 802A9E1C 24C6B720 */ addiu $a2, $a2, %lo(D_802AB720_7B30C0) /* 41EBB0 802A9E20 3C05802B */ lui $a1, %hi(BattleMenu_HudScripts) /* 41EBB4 802A9E24 24A5D078 */ addiu $a1, $a1, %lo(BattleMenu_HudScripts) /* 41EBB8 802A9E28 ACE20000 */ sw $v0, 0x0($a3) /* 41EBBC 802A9E2C AD000000 */ sw $zero, 0x0($t0) /* 41EBC0 802A9E30 8CC30000 */ lw $v1, 0x0($a2) .L802A9E34_7B17D4: /* 41EBC4 802A9E34 96420070 */ lhu $v0, 0x70($s2) /* 41EBC8 802A9E38 3C04802B */ lui $a0, %hi(D_802AB728_7B30C8) /* 41EBCC 802A9E3C 8C84B728 */ lw $a0, %lo(D_802AB728_7B30C8)($a0) /* 41EBD0 802A9E40 30420100 */ andi $v0, $v0, 0x100 /* 41EBD4 802A9E44 ACA30000 */ sw $v1, 0x0($a1) /* 41EBD8 802A9E48 3C01802B */ lui $at, %hi(BattleMenu_TitleMessages) /* 41EBDC 802A9E4C AC24D090 */ sw $a0, %lo(BattleMenu_TitleMessages)($at) .L802A9E50_7B17F0: /* 41EBE0 802A9E50 14400006 */ bnez $v0, .L802A9E6C_7B180C /* 41EBE4 802A9E54 0000882D */ daddu $s1, $zero, $zero /* 41EBE8 802A9E58 ACE00000 */ sw $zero, 0x0($a3) .L802A9E5C_7B17FC: /* 41EBEC 802A9E5C 8CC30004 */ lw $v1, 0x4($a2) /* 41EBF0 802A9E60 24020048 */ addiu $v0, $zero, 0x48 /* 41EBF4 802A9E64 AD020000 */ sw $v0, 0x0($t0) /* 41EBF8 802A9E68 ACA30000 */ sw $v1, 0x0($a1) .L802A9E6C_7B180C: /* 41EBFC 802A9E6C 0C0AA6CC */ jal func_802A9B30_7B14D0 .L802A9E70_7B1810: /* 41EC00 802A9E70 24100001 */ addiu $s0, $zero, 0x1 /* 41EC04 802A9E74 10400005 */ beqz $v0, .L802A9E8C_7B182C /* 41EC08 802A9E78 24020002 */ addiu $v0, $zero, 0x2 /* 41EC0C 802A9E7C 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons) .L802A9E80_7B1820: /* 41EC10 802A9E80 AC30D104 */ sw $s0, %lo(BattleMenu_ShowSwapIcons)($at) /* 41EC14 802A9E84 080AA7A6 */ j .L802A9E98_7B1838 /* 41EC18 802A9E88 00511023 */ subu $v0, $v0, $s1 .L802A9E8C_7B182C: /* 41EC1C 802A9E8C 3C01802B */ lui $at, %hi(BattleMenu_ShowSwapIcons) /* 41EC20 802A9E90 AC20D104 */ sw $zero, %lo(BattleMenu_ShowSwapIcons)($at) /* 41EC24 802A9E94 00511023 */ subu $v0, $v0, $s1 .L802A9E98_7B1838: /* 41EC28 802A9E98 3C01802B */ lui $at, %hi(BattleMenu_NumOptions) /* 41EC2C 802A9E9C AC30D0AC */ sw $s0, %lo(BattleMenu_NumOptions)($at) /* 41EC30 802A9EA0 3C01802B */ lui $at, %hi(D_802AD0A8) /* 41EC34 802A9EA4 AC20D0A8 */ sw $zero, %lo(D_802AD0A8)($at) .L802A9EA8_7B1848: /* 41EC38 802A9EA8 3C01802B */ lui $at, %hi(D_802AD0B0) /* 41EC3C 802A9EAC AC20D0B0 */ sw $zero, %lo(D_802AD0B0)($at) /* 41EC40 802A9EB0 3C01802B */ lui $at, %hi(D_802AD100) /* 41EC44 802A9EB4 AC22D100 */ sw $v0, %lo(D_802AD100)($at) /* 41EC48 802A9EB8 0C0A8400 */ jal func_802A1000_7A89A0 /* 41EC4C 802A9EBC 00000000 */ nop /* 41EC50 802A9EC0 24020008 */ addiu $v0, $zero, 0x8 /* 41EC54 802A9EC4 3C01802B */ lui $at, %hi(D_802ACC60) .L802A9EC8_7B1868: /* 41EC58 802A9EC8 AC22CC60 */ sw $v0, %lo(D_802ACC60)($at) /* 41EC5C 802A9ECC 080AA80C */ j .L802AA030_7B19D0 D_802A9ED0_7B1870: /* 41EC60 802A9ED0 24020001 */ addiu $v0, $zero, 0x1 glabel .L802A9ED4_7B1874 /* 41EC64 802A9ED4 0000202D */ daddu $a0, $zero, $zero /* 41EC68 802A9ED8 0080282D */ daddu $a1, $a0, $zero /* 41EC6C 802A9EDC 3C06000C */ lui $a2, (0xC0009 >> 16) /* 41EC70 802A9EE0 0C098F3F */ jal set_animation /* 41EC74 802A9EE4 34C60009 */ ori $a2, $a2, (0xC0009 & 0xFFFF) /* 41EC78 802A9EE8 0C0A846C */ jal func_802A11B0_7A8B50 /* 41EC7C 802A9EEC 00000000 */ nop D_802A9EF0_7B1890: /* 41EC80 802A9EF0 3C11802B */ lui $s1, %hi(D_802ACC60) /* 41EC84 802A9EF4 2631CC60 */ addiu $s1, $s1, %lo(D_802ACC60) /* 41EC88 802A9EF8 8E230000 */ lw $v1, 0x0($s1) /* 41EC8C 802A9EFC 10600004 */ beqz $v1, .L802A9F10_7B18B0 D_802A9F00_7B18A0: /* 41EC90 802A9F00 0040802D */ daddu $s0, $v0, $zero /* 41EC94 802A9F04 2462FFFF */ addiu $v0, $v1, -0x1 /* 41EC98 802A9F08 080AA80E */ j .L802AA038_7B19D8 D_802A9F0C_7B18AC: /* 41EC9C 802A9F0C AE220000 */ sw $v0, 0x0($s1) .L802A9F10_7B18B0: /* 41ECA0 802A9F10 12000049 */ beqz $s0, .L802AA038_7B19D8 /* 41ECA4 802A9F14 0000202D */ daddu $a0, $zero, $zero /* 41ECA8 802A9F18 0080282D */ daddu $a1, $a0, $zero /* 41ECAC 802A9F1C 3C06000A */ lui $a2, (0xA0002 >> 16) D_802A9F20_7B18C0: /* 41ECB0 802A9F20 0C098F3F */ jal set_animation /* 41ECB4 802A9F24 34C60002 */ ori $a2, $a2, (0xA0002 & 0xFFFF) /* 41ECB8 802A9F28 2602FFFF */ addiu $v0, $s0, -0x1 /* 41ECBC 802A9F2C 00021080 */ sll $v0, $v0, 2 .L802A9F30_7B18D0: /* 41ECC0 802A9F30 3C01802B */ lui $at, %hi(D_802AD0BB) D_802A9F34_7B18D4: /* 41ECC4 802A9F34 00220821 */ addu $at, $at, $v0 .L802A9F38_7B18D8: /* 41ECC8 802A9F38 9022D0BB */ lbu $v0, %lo(D_802AD0BB)($at) /* 41ECCC 802A9F3C 0C0A840C */ jal func_802A1030_7A89D0 /* 41ECD0 802A9F40 A2420048 */ sb $v0, 0x48($s2) /* 41ECD4 802A9F44 24020008 */ addiu $v0, $zero, 0x8 /* 41ECD8 802A9F48 AE220000 */ sw $v0, 0x0($s1) /* 41ECDC 802A9F4C 24020004 */ addiu $v0, $zero, 0x4 /* 41ECE0 802A9F50 3C01802B */ lui $at, %hi(D_802ACC6C) /* 41ECE4 802A9F54 AC22CC6C */ sw $v0, %lo(D_802ACC6C)($at) /* 41ECE8 802A9F58 080AA80C */ j .L802AA030_7B19D0 D_802A9F5C_7B18FC: /* 41ECEC 802A9F5C 24020002 */ addiu $v0, $zero, 0x2 glabel .L802A9F60_7B1900 /* 41ECF0 802A9F60 0C0A846C */ jal func_802A11B0_7A8B50 /* 41ECF4 802A9F64 00000000 */ nop /* 41ECF8 802A9F68 10400033 */ beqz $v0, .L802AA038_7B19D8 /* 41ECFC 802A9F6C 24040011 */ addiu $a0, $zero, 0x11 /* 41ED00 802A9F70 24020004 */ addiu $v0, $zero, 0x4 /* 41ED04 802A9F74 A642006C */ sh $v0, 0x6C($s2) /* 41ED08 802A9F78 24020005 */ addiu $v0, $zero, 0x5 /* 41ED0C 802A9F7C A642006E */ sh $v0, 0x6E($s2) /* 41ED10 802A9F80 24020008 */ addiu $v0, $zero, 0x8 .L802A9F84_7B1924: /* 41ED14 802A9F84 A2420178 */ sb $v0, 0x178($s2) /* 41ED18 802A9F88 24020081 */ addiu $v0, $zero, 0x81 glabel .L802A9F8C_7B192C /* 41ED1C 802A9F8C A642017C */ sh $v0, 0x17C($s2) /* 41ED20 802A9F90 3C038009 */ lui $v1, %hi(D_8008FA78) /* 41ED24 802A9F94 8C63FA78 */ lw $v1, %lo(D_8008FA78)($v1) /* 41ED28 802A9F98 2402000A */ addiu $v0, $zero, 0xA /* 41ED2C 802A9F9C A642017A */ sh $v0, 0x17A($s2) /* 41ED30 802A9FA0 0C090464 */ jal func_80241190 .L802A9FA4_7B1944: /* 41ED34 802A9FA4 AE430184 */ sw $v1, 0x184($s2) /* 41ED38 802A9FA8 080AA80E */ j .L802AA038_7B19D8 D_802A9FAC_7B194C: /* 41ED3C 802A9FAC 00000000 */ nop glabel .L802A9FB0_7B1950 /* 41ED40 802A9FB0 0C0A8414 */ jal func_802A1050_7A89F0 /* 41ED44 802A9FB4 00000000 */ nop /* 41ED48 802A9FB8 24020001 */ addiu $v0, $zero, 0x1 /* 41ED4C 802A9FBC 3C01800E */ lui $at, %hi(gBattleSubState) /* 41ED50 802A9FC0 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L802A9FC4_7B1964: /* 41ED54 802A9FC4 0C0AA6D1 */ jal func_802A9B44_7B14E4 /* 41ED58 802A9FC8 00000000 */ nop /* 41ED5C 802A9FCC 0C0AA6D1 */ jal func_802A9B44_7B14E4 /* 41ED60 802A9FD0 00000000 */ nop D_802A9FD4_7B1974: /* 41ED64 802A9FD4 080AA80E */ j .L802AA038_7B19D8 /* 41ED68 802A9FD8 00000000 */ nop glabel .L802A9FDC_7B197C /* 41ED6C 802A9FDC 0C0A842E */ jal func_802A10B8_7A8A58 glabel .L802A9FE0_7B1980 /* 41ED70 802A9FE0 00000000 */ nop /* 41ED74 802A9FE4 080AA80E */ j .L802AA038_7B19D8 /* 41ED78 802A9FE8 00000000 */ nop glabel .L802A9FEC_7B198C /* 41ED7C 802A9FEC 24040050 */ addiu $a0, $zero, 0x50 /* 41ED80 802A9FF0 2405003C */ addiu $a1, $zero, 0x3C /* 41ED84 802A9FF4 0C093E81 */ jal func_8024FA04 .L802A9FF8_7B1998: /* 41ED88 802A9FF8 0000302D */ daddu $a2, $zero, $zero /* 41ED8C 802A9FFC 24020001 */ addiu $v0, $zero, 0x1 glabel .L802AA000_7B19A0 /* 41ED90 802AA000 3C01802B */ lui $at, %hi(D_802AD607) /* 41ED94 802AA004 A022D607 */ sb $v0, %lo(D_802AD607)($at) /* 41ED98 802AA008 080AA80C */ j .L802AA030_7B19D0 /* 41ED9C 802AA00C 24020009 */ addiu $v0, $zero, 0x9 glabel .L802AA010_7B19B0 /* 41EDA0 802AA010 0C093EAD */ jal func_8024FAB4 glabel func_802AA014 /* 41EDA4 802AA014 00000000 */ nop /* 41EDA8 802AA018 14400007 */ bnez $v0, .L802AA038_7B19D8 /* 41EDAC 802AA01C 24020001 */ addiu $v0, $zero, 0x1 /* 41EDB0 802AA020 3C01802B */ lui $at, %hi(D_802AD607) /* 41EDB4 802AA024 A020D607 */ sb $zero, %lo(D_802AD607)($at) D_802AA028_7B19C8: /* 41EDB8 802AA028 3C01802B */ lui $at, %hi(D_802ACC60) /* 41EDBC 802AA02C AC20CC60 */ sw $zero, %lo(D_802ACC60)($at) .L802AA030_7B19D0: /* 41EDC0 802AA030 3C01800E */ lui $at, %hi(gBattleSubState) /* 41EDC4 802AA034 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel .L802AA038_7B19D8 /* 41EDC8 802AA038 8FBF001C */ lw $ra, 0x1C($sp) /* 41EDCC 802AA03C 8FB20018 */ lw $s2, 0x18($sp) D_802AA040_7B19E0: /* 41EDD0 802AA040 8FB10014 */ lw $s1, 0x14($sp) /* 41EDD4 802AA044 8FB00010 */ lw $s0, 0x10($sp) /* 41EDD8 802AA048 D7B80030 */ ldc1 $f24, 0x30($sp) /* 41EDDC 802AA04C D7B60028 */ ldc1 $f22, 0x28($sp) D_802AA050_7B19F0: /* 41EDE0 802AA050 D7B40020 */ ldc1 $f20, 0x20($sp) /* 41EDE4 802AA054 03E00008 */ jr $ra /* 41EDE8 802AA058 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_peach_menu(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; s32 selectedOption; s32 initialPos; s32 entryIdx; switch (gBattleSubState) { case BTL_SUBSTATE_PEACH_MENU_INIT: btl_cam_use_preset(BTL_CAM_DEFAULT); btl_cam_move(10); if (!(gBattleStatus.flags1 & BS_FLAGS1_PLAYER_IN_BACK)) { gBattleSubState = BTL_SUBSTATE_PEACH_CREATE_MAIN_MENU; break; } player->state.currentPos.x = player->homePos.x; player->state.currentPos.z = player->homePos.z; gBattleSubState = BTL_SUBSTATE_PEACH_MENU_PERFORM_SWAP; player->state.goalPos.x = partner->homePos.x; player->state.goalPos.z = partner->homePos.z; player->state.moveTime = 4; player->state.angle = 0.0f; break; case BTL_SUBSTATE_PEACH_MENU_PERFORM_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(DEG_TO_RAD(player->state.angle)) * 16.0f; player->yaw = clamp_angle(-player->state.angle); partner->currentPos.z += sin_rad(DEG_TO_RAD(player->state.angle)) * 16.0f; partner->yaw = clamp_angle(-player->state.angle); player->state.angle += 90.0f; if (player->state.moveTime != 0) { player->state.moveTime--; break; } 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; case BTL_SUBSTATE_PEACH_CREATE_MAIN_MENU: gBattleStatus.flags1 |= BS_FLAGS1_MENU_OPEN; player->flags &= ~ACTOR_FLAG_4000000; player->flags |= ACTOR_FLAG_8000000; if (partner != NULL) { partner->flags |= ACTOR_FLAG_4000000; partner->flags |= ACTOR_FLAG_8000000; } entryIdx = 0; battleStatus->selectedMoveID = MOVE_NONE; battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_STAR_POWERS; BattleMenu_OptionEnabled[entryIdx] = TRUE; battle_menu_isMessageDisabled[entryIdx] = 0; BattleMenu_HudScripts[entryIdx] = battle_menu_PeachStarPowerHudScripts.enabled; BattleMenu_TitleMessages[entryIdx] = D_802AB728[entryIdx]; if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_STAR_POWERS)) { BattleMenu_OptionEnabled[entryIdx] = FALSE; battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW; BattleMenu_HudScripts[entryIdx] = battle_menu_PeachStarPowerHudScripts.disabled; } initialPos = 0; entryIdx++; if (btl_menu_show_switch_to_twink()) { BattleMenu_ShowSwapIcons = TRUE; } else { BattleMenu_ShowSwapIcons = FALSE; } BattleMenu_NumOptions = entryIdx; D_802AD0A8 = 0; D_802AD0B0 = initialPos; D_802AD100 = 2 - initialPos; btl_main_menu_init(); D_802ACC60 = 8; gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY; break; case BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY: set_animation(ACTOR_PLAYER, 0, ANIM_Peach2_Delighted); selectedOption = btl_main_menu_update(); if (D_802ACC60 != 0) { D_802ACC60--; break; } if (selectedOption != 0) { set_animation(ACTOR_PLAYER, 0, ANIM_Peach1_Walk); battleStatus->currentSubmenu = battle_menu_submenuIDs[selectedOption - 1]; func_802A1030(); D_802ACC60 = 8; D_802ACC6C = 4; gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_TARGET; } break; case BTL_SUBSTATE_PEACH_MENU_CHOOSE_TARGET: if (btl_main_menu_update() != 0) { battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PEACH_MENU_TARGET_CANCEL; battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PEACH_MENU_TARGET_CHOSEN; battleStatus->currentTargetListFlags = gMoveTable[MOVE_PEACH_FOCUS].flags; battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS; battleStatus->selectedMoveID = MOVE_PEACH_FOCUS; battleStatus->moveArgument = STAR_POWER_INDEX(MOVE_PEACH_FOCUS); btl_set_state(BATTLE_STATE_SELECT_TARGET); } break; case BTL_SUBSTATE_PEACH_MENU_TARGET_CANCEL: func_802A1050(); gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY; btl_state_update_peach_menu(); btl_state_update_peach_menu(); break; case BTL_SUBSTATE_PEACH_MENU_TARGET_CHOSEN: btl_main_menu_destroy(); break; case BTL_SUBSTATE_PEACH_MENU_SHOW_CANT_SWITCH: btl_show_variable_battle_message(BTL_MSG_CANT_SWITCH, 60, 0); D_802AD607 = 1; gBattleSubState = BTL_SUBSTATE_PEACH_MENU_AWAIT_CANT_SWITCH_POPUP; break; case BTL_SUBSTATE_PEACH_MENU_AWAIT_CANT_SWITCH_POPUP: if (!btl_is_popup_displayed()) { D_802AD607 = 0; D_802ACC60 = 0; gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY; } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel partner_get_out /* 88198 800EECE8 27BDFF90 */ addiu $sp, $sp, -0x70 /* 8819C 800EECEC AFB00030 */ sw $s0, 0x30($sp) /* 881A0 800EECF0 0080802D */ daddu $s0, $a0, $zero /* 881A4 800EECF4 AFB10034 */ sw $s1, 0x34($sp) /* 881A8 800EECF8 3C118011 */ lui $s1, %hi(gPlayerStatus) /* 881AC 800EECFC 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* 881B0 800EED00 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 881B4 800EED04 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 881B8 800EED08 3C04800B */ lui $a0, %hi(gCameras) /* 881BC 800EED0C 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 881C0 800EED10 AFB3003C */ sw $s3, 0x3C($sp) /* 881C4 800EED14 3C138011 */ lui $s3, %hi(wPartnerFollowState) /* 881C8 800EED18 2673CFC8 */ addiu $s3, $s3, %lo(wPartnerFollowState) /* 881CC 800EED1C AFBF0048 */ sw $ra, 0x48($sp) /* 881D0 800EED20 AFB50044 */ sw $s5, 0x44($sp) /* 881D4 800EED24 AFB40040 */ sw $s4, 0x40($sp) /* 881D8 800EED28 AFB20038 */ sw $s2, 0x38($sp) /* 881DC 800EED2C F7BA0068 */ sdc1 $f26, 0x68($sp) /* 881E0 800EED30 F7B80060 */ sdc1 $f24, 0x60($sp) /* 881E4 800EED34 F7B60058 */ sdc1 $f22, 0x58($sp) /* 881E8 800EED38 F7B40050 */ sdc1 $f20, 0x50($sp) /* 881EC 800EED3C 00031080 */ sll $v0, $v1, 2 /* 881F0 800EED40 00431021 */ addu $v0, $v0, $v1 /* 881F4 800EED44 00021080 */ sll $v0, $v0, 2 /* 881F8 800EED48 00431023 */ subu $v0, $v0, $v1 /* 881FC 800EED4C 000218C0 */ sll $v1, $v0, 3 /* 88200 800EED50 00431021 */ addu $v0, $v0, $v1 /* 88204 800EED54 000210C0 */ sll $v0, $v0, 3 /* 88208 800EED58 00449021 */ addu $s2, $v0, $a0 /* 8820C 800EED5C 86630000 */ lh $v1, 0x0($s3) /* 88210 800EED60 24020001 */ addiu $v0, $zero, 0x1 /* 88214 800EED64 106200E6 */ beq $v1, $v0, .L800EF100 /* 88218 800EED68 28620002 */ slti $v0, $v1, 0x2 /* 8821C 800EED6C 10400005 */ beqz $v0, .L800EED84 /* 88220 800EED70 24020002 */ addiu $v0, $zero, 0x2 /* 88224 800EED74 10600007 */ beqz $v1, .L800EED94 /* 88228 800EED78 0000102D */ daddu $v0, $zero, $zero /* 8822C 800EED7C 0803BCB3 */ j .L800EF2CC /* 88230 800EED80 00000000 */ nop .L800EED84: /* 88234 800EED84 10620123 */ beq $v1, $v0, .L800EF214 /* 88238 800EED88 0000102D */ daddu $v0, $zero, $zero /* 8823C 800EED8C 0803BCB3 */ j .L800EF2CC /* 88240 800EED90 00000000 */ nop .L800EED94: /* 88244 800EED94 0C00A6C9 */ jal clamp_angle /* 88248 800EED98 C62C00A8 */ lwc1 $f12, 0xA8($s1) /* 8824C 800EED9C 3C014334 */ lui $at, (0x43340000 >> 16) /* 88250 800EEDA0 44811000 */ mtc1 $at, $f2 /* 88254 800EEDA4 00000000 */ nop /* 88258 800EEDA8 4602003C */ c.lt.s $f0, $f2 /* 8825C 800EEDAC 00000000 */ nop /* 88260 800EEDB0 45000006 */ bc1f .L800EEDCC /* 88264 800EEDB4 00000000 */ nop /* 88268 800EEDB8 C640006C */ lwc1 $f0, 0x6C($s2) /* 8826C 800EEDBC 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 88270 800EEDC0 44816000 */ mtc1 $at, $f12 /* 88274 800EEDC4 0803BB78 */ j .L800EEDE0 /* 88278 800EEDC8 460C0300 */ add.s $f12, $f0, $f12 .L800EEDCC: /* 8827C 800EEDCC C640006C */ lwc1 $f0, 0x6C($s2) /* 88280 800EEDD0 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 88284 800EEDD4 44816000 */ mtc1 $at, $f12 /* 88288 800EEDD8 00000000 */ nop /* 8828C 800EEDDC 460C0301 */ sub.s $f12, $f0, $f12 .L800EEDE0: /* 88290 800EEDE0 0C00A6C9 */ jal clamp_angle /* 88294 800EEDE4 00000000 */ nop /* 88298 800EEDE8 E600000C */ swc1 $f0, 0xC($s0) /* 8829C 800EEDEC C6200028 */ lwc1 $f0, 0x28($s1) /* 882A0 800EEDF0 3C128011 */ lui $s2, %hi(wPartner) /* 882A4 800EEDF4 2652CFEC */ addiu $s2, $s2, %lo(wPartner) /* 882A8 800EEDF8 E6000060 */ swc1 $f0, 0x60($s0) /* 882AC 800EEDFC C620002C */ lwc1 $f0, 0x2C($s1) /* 882B0 800EEE00 8E420000 */ lw $v0, 0x0($s2) /* 882B4 800EEE04 E6000064 */ swc1 $f0, 0x64($s0) /* 882B8 800EEE08 8C42000C */ lw $v0, 0xC($v0) /* 882BC 800EEE0C 10400003 */ beqz $v0, .L800EEE1C /* 882C0 800EEE10 26040060 */ addiu $a0, $s0, 0x60 /* 882C4 800EEE14 C620002C */ lwc1 $f0, 0x2C($s1) /* 882C8 800EEE18 E6000064 */ swc1 $f0, 0x64($s0) .L800EEE1C: /* 882CC 800EEE1C C6200030 */ lwc1 $f0, 0x30($s1) /* 882D0 800EEE20 E6000068 */ swc1 $f0, 0x68($s0) /* 882D4 800EEE24 862200B2 */ lh $v0, 0xB2($s1) /* 882D8 800EEE28 8E07000C */ lw $a3, 0xC($s0) /* 882DC 800EEE2C 44825000 */ mtc1 $v0, $f10 /* 882E0 800EEE30 00000000 */ nop /* 882E4 800EEE34 468052A0 */ cvt.s.w $f10, $f10 /* 882E8 800EEE38 44065000 */ mfc1 $a2, $f10 /* 882EC 800EEE3C 0C00A7E7 */ jal add_vec2D_polar /* 882F0 800EEE40 26050068 */ addiu $a1, $s0, 0x68 /* 882F4 800EEE44 C6160060 */ lwc1 $f22, 0x60($s0) /* 882F8 800EEE48 8E420000 */ lw $v0, 0x0($s2) /* 882FC 800EEE4C C61A0064 */ lwc1 $f26, 0x64($s0) /* 88300 800EEE50 8C42000C */ lw $v0, 0xC($v0) /* 88304 800EEE54 C6140068 */ lwc1 $f20, 0x68($s0) /* 88308 800EEE58 14400052 */ bnez $v0, .L800EEFA4 /* 8830C 800EEE5C 27B20020 */ addiu $s2, $sp, 0x20 /* 88310 800EEE60 0240202D */ daddu $a0, $s2, $zero /* 88314 800EEE64 27B30024 */ addiu $s3, $sp, 0x24 /* 88318 800EEE68 0260282D */ daddu $a1, $s3, $zero /* 8831C 800EEE6C 3C158007 */ lui $s5, %hi(gCurrentCameraID) /* 88320 800EEE70 26B57410 */ addiu $s5, $s5, %lo(gCurrentCameraID) /* 88324 800EEE74 8EA30000 */ lw $v1, 0x0($s5) /* 88328 800EEE78 3C014000 */ lui $at, (0x40000000 >> 16) /* 8832C 800EEE7C 4481C000 */ mtc1 $at, $f24 /* 88330 800EEE80 00031080 */ sll $v0, $v1, 2 /* 88334 800EEE84 00431021 */ addu $v0, $v0, $v1 /* 88338 800EEE88 00021080 */ sll $v0, $v0, 2 /* 8833C 800EEE8C 00431023 */ subu $v0, $v0, $v1 /* 88340 800EEE90 000218C0 */ sll $v1, $v0, 3 /* 88344 800EEE94 00431021 */ addu $v0, $v0, $v1 /* 88348 800EEE98 000210C0 */ sll $v0, $v0, 3 /* 8834C 800EEE9C 4406C000 */ mfc1 $a2, $f24 /* 88350 800EEEA0 860300A8 */ lh $v1, 0xA8($s0) /* 88354 800EEEA4 3C07800B */ lui $a3, %hi(gCameras + 0x6C) /* 88358 800EEEA8 00E23821 */ addu $a3, $a3, $v0 /* 8835C 800EEEAC 8CE71DEC */ lw $a3, %lo(gCameras + 0x6C)($a3) /* 88360 800EEEB0 44830000 */ mtc1 $v1, $f0 /* 88364 800EEEB4 00000000 */ nop /* 88368 800EEEB8 46800020 */ cvt.s.w $f0, $f0 /* 8836C 800EEEBC 4600D000 */ add.s $f0, $f26, $f0 /* 88370 800EEEC0 E7B60020 */ swc1 $f22, 0x20($sp) /* 88374 800EEEC4 E7B40024 */ swc1 $f20, 0x24($sp) /* 88378 800EEEC8 0C00A7E7 */ jal add_vec2D_polar /* 8837C 800EEECC E7A00028 */ swc1 $f0, 0x28($sp) /* 88380 800EEED0 3C040001 */ lui $a0, (0x10000 >> 16) /* 88384 800EEED4 0240282D */ daddu $a1, $s2, $zero /* 88388 800EEED8 27A2002C */ addiu $v0, $sp, 0x2C /* 8838C 800EEEDC 3C01447A */ lui $at, (0x447A0000 >> 16) /* 88390 800EEEE0 44810000 */ mtc1 $at, $f0 /* 88394 800EEEE4 27A60028 */ addiu $a2, $sp, 0x28 /* 88398 800EEEE8 E7A0002C */ swc1 $f0, 0x2C($sp) /* 8839C 800EEEEC AFA20010 */ sw $v0, 0x10($sp) /* 883A0 800EEEF0 C600000C */ lwc1 $f0, 0xC($s0) /* 883A4 800EEEF4 0260382D */ daddu $a3, $s3, $zero /* 883A8 800EEEF8 E7A00014 */ swc1 $f0, 0x14($sp) /* 883AC 800EEEFC 860200A6 */ lh $v0, 0xA6($s0) /* 883B0 800EEF00 3C14800B */ lui $s4, %hi(gCameras) /* 883B4 800EEF04 26941D80 */ addiu $s4, $s4, %lo(gCameras) /* 883B8 800EEF08 44820000 */ mtc1 $v0, $f0 /* 883BC 800EEF0C 00000000 */ nop /* 883C0 800EEF10 46800020 */ cvt.s.w $f0, $f0 /* 883C4 800EEF14 0C0371DE */ jal npc_raycast_down_around /* 883C8 800EEF18 E7A00018 */ swc1 $f0, 0x18($sp) /* 883CC 800EEF1C 10400011 */ beqz $v0, .L800EEF64 /* 883D0 800EEF20 0240202D */ daddu $a0, $s2, $zero /* 883D4 800EEF24 3C048011 */ lui $a0, %hi(NpcHitQueryColliderID) /* 883D8 800EEF28 8C84C978 */ lw $a0, %lo(NpcHitQueryColliderID)($a0) /* 883DC 800EEF2C 0C016F6A */ jal get_collider_flags /* 883E0 800EEF30 00000000 */ nop /* 883E4 800EEF34 2442FFFE */ addiu $v0, $v0, -0x2 /* 883E8 800EEF38 2C420002 */ sltiu $v0, $v0, 0x2 /* 883EC 800EEF3C 14400009 */ bnez $v0, .L800EEF64 /* 883F0 800EEF40 0240202D */ daddu $a0, $s2, $zero /* 883F4 800EEF44 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 883F8 800EEF48 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 883FC 800EEF4C 44810000 */ mtc1 $at, $f0 /* 88400 800EEF50 00000000 */ nop /* 88404 800EEF54 4602003C */ c.lt.s $f0, $f2 /* 88408 800EEF58 00000000 */ nop /* 8840C 800EEF5C 45000011 */ bc1f .L800EEFA4 /* 88410 800EEF60 00000000 */ nop .L800EEF64: /* 88414 800EEF64 C6360028 */ lwc1 $f22, 0x28($s1) /* 88418 800EEF68 C63A002C */ lwc1 $f26, 0x2C($s1) /* 8841C 800EEF6C 8EA20000 */ lw $v0, 0x0($s5) /* 88420 800EEF70 4406C000 */ mfc1 $a2, $f24 /* 88424 800EEF74 00021880 */ sll $v1, $v0, 2 /* 88428 800EEF78 00621821 */ addu $v1, $v1, $v0 /* 8842C 800EEF7C 00031880 */ sll $v1, $v1, 2 /* 88430 800EEF80 00621823 */ subu $v1, $v1, $v0 /* 88434 800EEF84 000310C0 */ sll $v0, $v1, 3 /* 88438 800EEF88 00621821 */ addu $v1, $v1, $v0 /* 8843C 800EEF8C 000318C0 */ sll $v1, $v1, 3 /* 88440 800EEF90 00741821 */ addu $v1, $v1, $s4 /* 88444 800EEF94 8C67006C */ lw $a3, 0x6C($v1) /* 88448 800EEF98 C6340030 */ lwc1 $f20, 0x30($s1) /* 8844C 800EEF9C 0C00A7E7 */ jal add_vec2D_polar /* 88450 800EEFA0 0260282D */ daddu $a1, $s3, $zero .L800EEFA4: /* 88454 800EEFA4 C62C0028 */ lwc1 $f12, 0x28($s1) /* 88458 800EEFA8 4406B000 */ mfc1 $a2, $f22 /* 8845C 800EEFAC 4407A000 */ mfc1 $a3, $f20 /* 88460 800EEFB0 3C013F99 */ lui $at, (0x3F99999A >> 16) /* 88464 800EEFB4 3421999A */ ori $at, $at, (0x3F99999A & 0xFFFF) /* 88468 800EEFB8 44812000 */ mtc1 $at, $f4 /* 8846C 800EEFBC E60C0038 */ swc1 $f12, 0x38($s0) /* 88470 800EEFC0 962200B0 */ lhu $v0, 0xB0($s1) /* 88474 800EEFC4 C622002C */ lwc1 $f2, 0x2C($s1) /* 88478 800EEFC8 00021400 */ sll $v0, $v0, 16 /* 8847C 800EEFCC 00021C03 */ sra $v1, $v0, 16 /* 88480 800EEFD0 000217C2 */ srl $v0, $v0, 31 /* 88484 800EEFD4 00621821 */ addu $v1, $v1, $v0 /* 88488 800EEFD8 00031843 */ sra $v1, $v1, 1 /* 8848C 800EEFDC 44830000 */ mtc1 $v1, $f0 /* 88490 800EEFE0 00000000 */ nop /* 88494 800EEFE4 46800020 */ cvt.s.w $f0, $f0 /* 88498 800EEFE8 46001080 */ add.s $f2, $f2, $f0 /* 8849C 800EEFEC 3C014080 */ lui $at, (0x40800000 >> 16) /* 884A0 800EEFF0 44810000 */ mtc1 $at, $f0 /* 884A4 800EEFF4 E602003C */ swc1 $f2, 0x3C($s0) /* 884A8 800EEFF8 C62E0030 */ lwc1 $f14, 0x30($s1) /* 884AC 800EEFFC E7AC0020 */ swc1 $f12, 0x20($sp) /* 884B0 800EF000 E7A20028 */ swc1 $f2, 0x28($sp) /* 884B4 800EF004 E6000018 */ swc1 $f0, 0x18($s0) /* 884B8 800EF008 E6040014 */ swc1 $f4, 0x14($s0) /* 884BC 800EF00C E60E0040 */ swc1 $f14, 0x40($s0) /* 884C0 800EF010 0C00A7B5 */ jal dist2D /* 884C4 800EF014 E7AE0024 */ swc1 $f14, 0x24($sp) /* 884C8 800EF018 C7AC0020 */ lwc1 $f12, 0x20($sp) /* 884CC 800EF01C C7AE0024 */ lwc1 $f14, 0x24($sp) /* 884D0 800EF020 4406B000 */ mfc1 $a2, $f22 /* 884D4 800EF024 4407A000 */ mfc1 $a3, $f20 /* 884D8 800EF028 0C00A720 */ jal atan2 /* 884DC 800EF02C E6000010 */ swc1 $f0, 0x10($s0) /* 884E0 800EF030 C6020010 */ lwc1 $f2, 0x10($s0) /* 884E4 800EF034 C6040018 */ lwc1 $f4, 0x18($s0) /* 884E8 800EF038 E600000C */ swc1 $f0, 0xC($s0) /* 884EC 800EF03C 46041083 */ div.s $f2, $f2, $f4 /* 884F0 800EF040 4600128D */ trunc.w.s $f10, $f2 /* 884F4 800EF044 44025000 */ mfc1 $v0, $f10 /* 884F8 800EF048 00000000 */ nop /* 884FC 800EF04C A602008E */ sh $v0, 0x8E($s0) /* 88500 800EF050 00021400 */ sll $v0, $v0, 16 /* 88504 800EF054 00021403 */ sra $v0, $v0, 16 /* 88508 800EF058 2842000A */ slti $v0, $v0, 0xA /* 8850C 800EF05C 10400007 */ beqz $v0, .L800EF07C /* 88510 800EF060 2402000A */ addiu $v0, $zero, 0xA /* 88514 800EF064 3C014120 */ lui $at, (0x41200000 >> 16) /* 88518 800EF068 44810000 */ mtc1 $at, $f0 /* 8851C 800EF06C C6020010 */ lwc1 $f2, 0x10($s0) /* 88520 800EF070 A602008E */ sh $v0, 0x8E($s0) /* 88524 800EF074 46001083 */ div.s $f2, $f2, $f0 /* 88528 800EF078 E6020018 */ swc1 $f2, 0x18($s0) .L800EF07C: /* 8852C 800EF07C 8602008E */ lh $v0, 0x8E($s0) /* 88530 800EF080 C6000014 */ lwc1 $f0, 0x14($s0) /* 88534 800EF084 44822000 */ mtc1 $v0, $f4 /* 88538 800EF088 00000000 */ nop /* 8853C 800EF08C 46802120 */ cvt.s.w $f4, $f4 /* 88540 800EF090 46040002 */ mul.s $f0, $f0, $f4 /* 88544 800EF094 00000000 */ nop /* 88548 800EF098 46040002 */ mul.s $f0, $f0, $f4 /* 8854C 800EF09C 00000000 */ nop /* 88550 800EF0A0 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 88554 800EF0A4 44811000 */ mtc1 $at, $f2 /* 88558 800EF0A8 00000000 */ nop /* 8855C 800EF0AC 46020002 */ mul.s $f0, $f0, $f2 /* 88560 800EF0B0 00000000 */ nop /* 88564 800EF0B4 C7A20028 */ lwc1 $f2, 0x28($sp) /* 88568 800EF0B8 3C038011 */ lui $v1, %hi(wCurrentPartnerId) /* 8856C 800EF0BC 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1) /* 88570 800EF0C0 4602D081 */ sub.s $f2, $f26, $f2 /* 88574 800EF0C4 000310C0 */ sll $v0, $v1, 3 /* 88578 800EF0C8 46001000 */ add.s $f0, $f2, $f0 /* 8857C 800EF0CC 00431021 */ addu $v0, $v0, $v1 /* 88580 800EF0D0 00021080 */ sll $v0, $v0, 2 /* 88584 800EF0D4 46040003 */ div.s $f0, $f0, $f4 /* 88588 800EF0D8 E600001C */ swc1 $f0, 0x1C($s0) /* 8858C 800EF0DC 3C038010 */ lui $v1, %hi(gPartnerAnimations + 0x8) /* 88590 800EF0E0 00621821 */ addu $v1, $v1, $v0 /* 88594 800EF0E4 8C638350 */ lw $v1, %lo(gPartnerAnimations + 0x8)($v1) /* 88598 800EF0E8 24020001 */ addiu $v0, $zero, 0x1 /* 8859C 800EF0EC 3C018011 */ lui $at, %hi(wPartnerFollowState) /* 885A0 800EF0F0 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at) /* 885A4 800EF0F4 E7A20028 */ swc1 $f2, 0x28($sp) /* 885A8 800EF0F8 0803BCB2 */ j .L800EF2C8 /* 885AC 800EF0FC AE030028 */ sw $v1, 0x28($s0) .L800EF100: /* 885B0 800EF100 C602001C */ lwc1 $f2, 0x1C($s0) /* 885B4 800EF104 44800000 */ mtc1 $zero, $f0 /* 885B8 800EF108 00000000 */ nop /* 885BC 800EF10C 4600103C */ c.lt.s $f2, $f0 /* 885C0 800EF110 00000000 */ nop /* 885C4 800EF114 45000009 */ bc1f .L800EF13C /* 885C8 800EF118 00000000 */ nop /* 885CC 800EF11C 46001085 */ abs.s $f2, $f2 /* 885D0 800EF120 44051000 */ mfc1 $a1, $f2 /* 885D4 800EF124 0C00E5FA */ jal npc_try_snap_to_ground /* 885D8 800EF128 0200202D */ daddu $a0, $s0, $zero /* 885DC 800EF12C 10400003 */ beqz $v0, .L800EF13C /* 885E0 800EF130 24020002 */ addiu $v0, $zero, 0x2 /* 885E4 800EF134 0803BCB2 */ j .L800EF2C8 /* 885E8 800EF138 A6620000 */ sh $v0, 0x0($s3) .L800EF13C: /* 885EC 800EF13C C600001C */ lwc1 $f0, 0x1C($s0) /* 885F0 800EF140 C6020014 */ lwc1 $f2, 0x14($s0) /* 885F4 800EF144 46020001 */ sub.s $f0, $f0, $f2 /* 885F8 800EF148 C602003C */ lwc1 $f2, 0x3C($s0) /* 885FC 800EF14C E600001C */ swc1 $f0, 0x1C($s0) /* 88600 800EF150 46000106 */ mov.s $f4, $f0 /* 88604 800EF154 46001080 */ add.s $f2, $f2, $f0 /* 88608 800EF158 44800000 */ mtc1 $zero, $f0 /* 8860C 800EF15C 00000000 */ nop /* 88610 800EF160 4600203E */ c.le.s $f4, $f0 /* 88614 800EF164 00000000 */ nop /* 88618 800EF168 4500000A */ bc1f .L800EF194 /* 8861C 800EF16C E602003C */ swc1 $f2, 0x3C($s0) /* 88620 800EF170 3C028011 */ lui $v0, %hi(wCurrentPartnerId) /* 88624 800EF174 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0) /* 88628 800EF178 000218C0 */ sll $v1, $v0, 3 /* 8862C 800EF17C 00621821 */ addu $v1, $v1, $v0 /* 88630 800EF180 00031880 */ sll $v1, $v1, 2 /* 88634 800EF184 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0xC) /* 88638 800EF188 00431021 */ addu $v0, $v0, $v1 /* 8863C 800EF18C 8C428354 */ lw $v0, %lo(gPartnerAnimations + 0xC)($v0) /* 88640 800EF190 AE020028 */ sw $v0, 0x28($s0) .L800EF194: /* 88644 800EF194 8E050018 */ lw $a1, 0x18($s0) /* 88648 800EF198 8E06000C */ lw $a2, 0xC($s0) /* 8864C 800EF19C 0C00EA95 */ jal npc_move_heading /* 88650 800EF1A0 0200202D */ daddu $a0, $s0, $zero /* 88654 800EF1A4 0C00E2BF */ jal npc_do_world_collision /* 88658 800EF1A8 0200202D */ daddu $a0, $s0, $zero /* 8865C 800EF1AC 8602008E */ lh $v0, 0x8E($s0) /* 88660 800EF1B0 3C014120 */ lui $at, (0x41200000 >> 16) /* 88664 800EF1B4 44811000 */ mtc1 $at, $f2 /* 88668 800EF1B8 44820000 */ mtc1 $v0, $f0 /* 8866C 800EF1BC 00000000 */ nop /* 88670 800EF1C0 46800020 */ cvt.s.w $f0, $f0 /* 88674 800EF1C4 4600103C */ c.lt.s $f2, $f0 /* 88678 800EF1C8 00000000 */ nop /* 8867C 800EF1CC 45030001 */ bc1tl .L800EF1D4 /* 88680 800EF1D0 46001006 */ mov.s $f0, $f2 .L800EF1D4: /* 88684 800EF1D4 9602008E */ lhu $v0, 0x8E($s0) /* 88688 800EF1D8 46001001 */ sub.s $f0, $f2, $f0 /* 8868C 800EF1DC 2442FFFF */ addiu $v0, $v0, -0x1 /* 88690 800EF1E0 A602008E */ sh $v0, 0x8E($s0) /* 88694 800EF1E4 00021400 */ sll $v0, $v0, 16 /* 88698 800EF1E8 46020003 */ div.s $f0, $f0, $f2 /* 8869C 800EF1EC E6000054 */ swc1 $f0, 0x54($s0) /* 886A0 800EF1F0 46000086 */ mov.s $f2, $f0 /* 886A4 800EF1F4 E6000058 */ swc1 $f0, 0x58($s0) /* 886A8 800EF1F8 04410033 */ bgez $v0, .L800EF2C8 /* 886AC 800EF1FC E602005C */ swc1 $f2, 0x5C($s0) /* 886B0 800EF200 24020002 */ addiu $v0, $zero, 0x2 /* 886B4 800EF204 3C018011 */ lui $at, %hi(wPartnerFollowState) /* 886B8 800EF208 A422CFC8 */ sh $v0, %lo(wPartnerFollowState)($at) /* 886BC 800EF20C 0803BCB3 */ j .L800EF2CC /* 886C0 800EF210 0000102D */ daddu $v0, $zero, $zero .L800EF214: /* 886C4 800EF214 C6000064 */ lwc1 $f0, 0x64($s0) /* 886C8 800EF218 C6060038 */ lwc1 $f6, 0x38($s0) /* 886CC 800EF21C C6020040 */ lwc1 $f2, 0x40($s0) /* 886D0 800EF220 E600003C */ swc1 $f0, 0x3C($s0) /* 886D4 800EF224 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 886D8 800EF228 44810000 */ mtc1 $at, $f0 /* 886DC 800EF22C C608003C */ lwc1 $f8, 0x3C($s0) /* 886E0 800EF230 3C128011 */ lui $s2, %hi(wPartner) /* 886E4 800EF234 2652CFEC */ addiu $s2, $s2, %lo(wPartner) /* 886E8 800EF238 AE00001C */ sw $zero, 0x1C($s0) /* 886EC 800EF23C E6060060 */ swc1 $f6, 0x60($s0) /* 886F0 800EF240 E6020068 */ swc1 $f2, 0x68($s0) /* 886F4 800EF244 E6000054 */ swc1 $f0, 0x54($s0) /* 886F8 800EF248 E6000058 */ swc1 $f0, 0x58($s0) /* 886FC 800EF24C E600005C */ swc1 $f0, 0x5C($s0) /* 88700 800EF250 E6080064 */ swc1 $f8, 0x64($s0) /* 88704 800EF254 C620002C */ lwc1 $f0, 0x2C($s1) /* 88708 800EF258 8E420000 */ lw $v0, 0x0($s2) /* 8870C 800EF25C E600003C */ swc1 $f0, 0x3C($s0) /* 88710 800EF260 8C42000C */ lw $v0, 0xC($v0) /* 88714 800EF264 10400003 */ beqz $v0, .L800EF274 /* 88718 800EF268 46003106 */ mov.s $f4, $f6 /* 8871C 800EF26C C620002C */ lwc1 $f0, 0x2C($s1) /* 88720 800EF270 E600003C */ swc1 $f0, 0x3C($s0) .L800EF274: /* 88724 800EF274 C6000040 */ lwc1 $f0, 0x40($s0) /* 88728 800EF278 0C03BD17 */ jal partner_clear_player_tracking /* 8872C 800EF27C 0200202D */ daddu $a0, $s0, $zero /* 88730 800EF280 C6000060 */ lwc1 $f0, 0x60($s0) /* 88734 800EF284 C6020064 */ lwc1 $f2, 0x64($s0) /* 88738 800EF288 8E020000 */ lw $v0, 0x0($s0) /* 8873C 800EF28C C6040068 */ lwc1 $f4, 0x68($s0) /* 88740 800EF290 30421000 */ andi $v0, $v0, 0x1000 /* 88744 800EF294 E6000038 */ swc1 $f0, 0x38($s0) /* 88748 800EF298 E602003C */ swc1 $f2, 0x3C($s0) /* 8874C 800EF29C 10400008 */ beqz $v0, .L800EF2C0 /* 88750 800EF2A0 E6040040 */ swc1 $f4, 0x40($s0) /* 88754 800EF2A4 8E420000 */ lw $v0, 0x0($s2) /* 88758 800EF2A8 8C42000C */ lw $v0, 0xC($v0) /* 8875C 800EF2AC 14400007 */ bnez $v0, .L800EF2CC /* 88760 800EF2B0 24020001 */ addiu $v0, $zero, 0x1 /* 88764 800EF2B4 0200202D */ daddu $a0, $s0, $zero /* 88768 800EF2B8 0C00F598 */ jal spawn_surface_effects /* 8876C 800EF2BC 24050002 */ addiu $a1, $zero, 0x2 .L800EF2C0: /* 88770 800EF2C0 0803BCB3 */ j .L800EF2CC /* 88774 800EF2C4 24020001 */ addiu $v0, $zero, 0x1 .L800EF2C8: /* 88778 800EF2C8 0000102D */ daddu $v0, $zero, $zero .L800EF2CC: /* 8877C 800EF2CC 8FBF0048 */ lw $ra, 0x48($sp) /* 88780 800EF2D0 8FB50044 */ lw $s5, 0x44($sp) /* 88784 800EF2D4 8FB40040 */ lw $s4, 0x40($sp) /* 88788 800EF2D8 8FB3003C */ lw $s3, 0x3C($sp) /* 8878C 800EF2DC 8FB20038 */ lw $s2, 0x38($sp) /* 88790 800EF2E0 8FB10034 */ lw $s1, 0x34($sp) /* 88794 800EF2E4 8FB00030 */ lw $s0, 0x30($sp) /* 88798 800EF2E8 D7BA0068 */ ldc1 $f26, 0x68($sp) /* 8879C 800EF2EC D7B80060 */ ldc1 $f24, 0x60($sp) /* 887A0 800EF2F0 D7B60058 */ ldc1 $f22, 0x58($sp) /* 887A4 800EF2F4 D7B40050 */ ldc1 $f20, 0x50($sp) /* 887A8 800EF2F8 03E00008 */ jr $ra /* 887AC 800EF2FC 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: s32 partner_get_out(Npc* partner) { PlayerStatus* playerStatus = &gPlayerStatus; Camera* camera = &gCameras[gCurrentCameraID]; f32 x, y, z, hitDepth; f32 var_f0; f32 moveToX, moveToY, moveToZ; switch (wPartnerFollowState) { case 0: if (clamp_angle(playerStatus->spriteFacingAngle) < 180.0f) { partner->yaw = clamp_angle(camera->currentYaw + 90.0f); } else { partner->yaw = clamp_angle(camera->currentYaw - 90.0f); } partner->moveToPos.x = playerStatus->position.x; partner->moveToPos.y = playerStatus->position.y; if (wPartner->isFlying) { partner->moveToPos.y = playerStatus->position.y; } partner->moveToPos.z = playerStatus->position.z; add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, playerStatus->colliderDiameter, partner->yaw); moveToX = partner->moveToPos.x; moveToY = partner->moveToPos.y; moveToZ = partner->moveToPos.z; if (!wPartner->isFlying) { x = moveToX; y = moveToY + partner->collisionHeight; z = moveToZ; add_vec2D_polar(&x, &z, 2.0f, gCameras[gCurrentCameraID].currentYaw); hitDepth = 1000.0f; if (npc_raycast_down_around(COLLISION_CHANNEL_10000, &x, &y, &z, &hitDepth, partner->yaw, partner->collisionDiameter)) { // @bug? collider flags not properly masked with COLLIDER_FLAG_SURFACE_TYPE s32 surfaceType = get_collider_flags(NpcHitQueryColliderID); if ((surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) || (hitDepth > 100.0f)) { moveToX = playerStatus->position.x; moveToY = playerStatus->position.y; moveToZ = playerStatus->position.z; add_vec2D_polar(&x, &z, 2.0f, gCameras[gCurrentCameraID].currentYaw); } } else { moveToX = playerStatus->position.x; moveToY = playerStatus->position.y; moveToZ = playerStatus->position.z; add_vec2D_polar(&x, &z, 2.0f, gCameras[gCurrentCameraID].currentYaw); } } x = partner->pos.x = playerStatus->position.x; y = partner->pos.y = playerStatus->position.y + (playerStatus->colliderHeight / 2); z = partner->pos.z = playerStatus->position.z; partner->moveSpeed = 4.0f; partner->jumpScale = 1.2f; partner->planarFlyDist = dist2D(x, z, moveToX, moveToZ); partner->yaw = atan2(x, z, moveToX, moveToZ); partner->duration = partner->planarFlyDist / partner->moveSpeed; if (partner->duration < 10) { partner->duration = 10; partner->moveSpeed = partner->planarFlyDist / partner->duration; } partner->jumpVelocity = (moveToY - y + (partner->jumpScale * partner->duration * partner->duration * 0.5f)) / partner->duration; wPartnerFollowState = 1; y = moveToY - y; partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].jump; break; case 1: if (partner->jumpVelocity < 0.0f && npc_try_snap_to_ground(partner, fabsf(partner->jumpVelocity))) { wPartnerFollowState = 2; break; } 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); npc_do_world_collision(partner); var_f0 = partner->duration; if (var_f0 > 10.0f) { var_f0 = 10.0f; } partner->scale.x = (10.0f - var_f0) / 10.0f; partner->scale.y = partner->scale.x; partner->scale.z = partner->scale.x; partner->duration--; if (partner->duration < 0) { wPartnerFollowState = 2; } break; case 2: partner->pos.y = partner->moveToPos.y; partner->jumpVelocity = 0.0f; partner->scale.x = 1.0f; partner->scale.y = 1.0f; partner->scale.z = 1.0f; partner->moveToPos.x = partner->pos.x; partner->moveToPos.y = partner->pos.y; partner->moveToPos.z = partner->pos.z; partner->pos.x = partner->pos.x; partner->pos.y = playerStatus->position.y; if (wPartner->isFlying) { partner->pos.y = playerStatus->position.y; } partner->pos.z = partner->pos.z; partner_clear_player_tracking(partner); partner->pos.x = partner->moveToPos.x; partner->pos.y = partner->moveToPos.y; partner->pos.z = partner->moveToPos.z; if (partner->flags & NPC_FLAG_GROUNDED) { if (!wPartner->isFlying) { spawn_surface_effects(partner, SURFACE_INTERACT_LAND); } } return TRUE; } return FALSE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel red_impact_appendGfx /* 3D42AC E00D048C 27BDFED8 */ addiu $sp, $sp, -0x128 /* 3D42B0 E00D0490 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3D42B4 E00D0494 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3D42B8 E00D0498 AFA40128 */ sw $a0, 0x128($sp) /* 3D42BC E00D049C 27A40020 */ addiu $a0, $sp, 0x20 /* 3D42C0 E00D04A0 AFB000D8 */ sw $s0, 0xD8($sp) /* 3D42C4 E00D04A4 3C100001 */ lui $s0, (0x11630 >> 16) /* 3D42C8 E00D04A8 AFB300E4 */ sw $s3, 0xE4($sp) /* 3D42CC E00D04AC 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3D42D0 E00D04B0 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3D42D4 E00D04B4 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 3D42D8 E00D04B8 AFBF00FC */ sw $ra, 0xFC($sp) /* 3D42DC E00D04BC AFBE00F8 */ sw $fp, 0xF8($sp) /* 3D42E0 E00D04C0 AFB700F4 */ sw $s7, 0xF4($sp) /* 3D42E4 E00D04C4 AFB600F0 */ sw $s6, 0xF0($sp) /* 3D42E8 E00D04C8 AFB500EC */ sw $s5, 0xEC($sp) /* 3D42EC E00D04CC AFB400E8 */ sw $s4, 0xE8($sp) /* 3D42F0 E00D04D0 AFB200E0 */ sw $s2, 0xE0($sp) /* 3D42F4 E00D04D4 AFB100DC */ sw $s1, 0xDC($sp) /* 3D42F8 E00D04D8 F7BC0120 */ sdc1 $f28, 0x120($sp) /* 3D42FC E00D04DC F7BA0118 */ sdc1 $f26, 0x118($sp) /* 3D4300 E00D04E0 F7B80110 */ sdc1 $f24, 0x110($sp) /* 3D4304 E00D04E4 F7B60108 */ sdc1 $f22, 0x108($sp) /* 3D4308 E00D04E8 F7B40100 */ sdc1 $f20, 0x100($sp) /* 3D430C E00D04EC 8E660000 */ lw $a2, 0x0($s3) /* 3D4310 E00D04F0 8FAD0128 */ lw $t5, 0x128($sp) /* 3D4314 E00D04F4 4480A000 */ mtc1 $zero, $f20 /* 3D4318 E00D04F8 3C01E00D */ lui $at, (0xE00D0B40 >> 16) /* 3D431C E00D04FC D4200B40 */ ldc1 $f0, (0xE00D0B40 & 0xFFFF)($at) /* 3D4320 E00D0500 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3D4324 E00D0504 4481B000 */ mtc1 $at, $f22 /* 3D4328 E00D0508 00C0182D */ daddu $v1, $a2, $zero /* 3D432C E00D050C 24C60008 */ addiu $a2, $a2, 0x8 /* 3D4330 E00D0510 8DB1000C */ lw $s1, 0xC($t5) /* 3D4334 E00D0514 4405A000 */ mfc1 $a1, $f20 /* 3D4338 E00D0518 96220000 */ lhu $v0, 0x0($s1) /* 3D433C E00D051C C624001C */ lwc1 $f4, 0x1C($s1) /* 3D4340 E00D0520 C6260020 */ lwc1 $f6, 0x20($s1) /* 3D4344 E00D0524 C6280024 */ lwc1 $f8, 0x24($s1) /* 3D4348 E00D0528 922D0050 */ lbu $t5, 0x50($s1) /* 3D434C E00D052C 00021080 */ sll $v0, $v0, 2 /* 3D4350 E00D0530 3C08E00D */ lui $t0, (0xE00D0B10 >> 16) /* 3D4354 E00D0534 01024021 */ addu $t0, $t0, $v0 /* 3D4358 E00D0538 8D080B10 */ lw $t0, (0xE00D0B10 & 0xFFFF)($t0) /* 3D435C E00D053C 46002121 */ cvt.d.s $f4, $f4 /* 3D4360 E00D0540 AFAD00A4 */ sw $t5, 0xA4($sp) /* 3D4364 E00D0544 922D0051 */ lbu $t5, 0x51($s1) /* 3D4368 E00D0548 46202102 */ mul.d $f4, $f4, $f0 /* 3D436C E00D054C 00000000 */ nop /* 3D4370 E00D0550 AFAD00A8 */ sw $t5, 0xA8($sp) /* 3D4374 E00D0554 922D0052 */ lbu $t5, 0x52($s1) /* 3D4378 E00D0558 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D437C E00D055C AFAD00AC */ sw $t5, 0xAC($sp) /* 3D4380 E00D0560 922D0053 */ lbu $t5, 0x53($s1) /* 3D4384 E00D0564 460031A1 */ cvt.d.s $f6, $f6 /* 3D4388 E00D0568 AFAD00B0 */ sw $t5, 0xB0($sp) /* 3D438C E00D056C 922D0054 */ lbu $t5, 0x54($s1) /* 3D4390 E00D0570 46203182 */ mul.d $f6, $f6, $f0 /* 3D4394 E00D0574 00000000 */ nop /* 3D4398 E00D0578 AFAD00B4 */ sw $t5, 0xB4($sp) /* 3D439C E00D057C 922D0055 */ lbu $t5, 0x55($s1) /* 3D43A0 E00D0580 46004221 */ cvt.d.s $f8, $f8 /* 3D43A4 E00D0584 AFAD00B8 */ sw $t5, 0xB8($sp) /* 3D43A8 E00D0588 AC620000 */ sw $v0, 0x0($v1) /* 3D43AC E00D058C AC600004 */ sw $zero, 0x4($v1) /* 3D43B0 E00D0590 ACC70000 */ sw $a3, 0x0($a2) /* 3D43B4 E00D0594 8FAD0128 */ lw $t5, 0x128($sp) /* 3D43B8 E00D0598 46204202 */ mul.d $f8, $f8, $f0 /* 3D43BC E00D059C 00000000 */ nop /* 3D43C0 E00D05A0 8DA20010 */ lw $v0, 0x10($t5) /* 3D43C4 E00D05A4 4407A000 */ mfc1 $a3, $f20 /* 3D43C8 E00D05A8 8C43001C */ lw $v1, 0x1C($v0) /* 3D43CC E00D05AC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D43D0 E00D05B0 ACC20008 */ sw $v0, 0x8($a2) /* 3D43D4 E00D05B4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3D43D8 E00D05B8 00621821 */ addu $v1, $v1, $v0 /* 3D43DC E00D05BC ACC30004 */ sw $v1, 0x4($a2) /* 3D43E0 E00D05C0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3D43E4 E00D05C4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3D43E8 E00D05C8 46202720 */ cvt.s.d $f28, $f4 /* 3D43EC E00D05CC ACC8000C */ sw $t0, 0xC($a2) /* 3D43F0 E00D05D0 00031080 */ sll $v0, $v1, 2 /* 3D43F4 E00D05D4 00431021 */ addu $v0, $v0, $v1 /* 3D43F8 E00D05D8 00021080 */ sll $v0, $v0, 2 /* 3D43FC E00D05DC 00431023 */ subu $v0, $v0, $v1 /* 3D4400 E00D05E0 000218C0 */ sll $v1, $v0, 3 /* 3D4404 E00D05E4 00431021 */ addu $v0, $v0, $v1 /* 3D4408 E00D05E8 000210C0 */ sll $v0, $v0, 3 /* 3D440C E00D05EC 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3D4410 E00D05F0 00220821 */ addu $at, $at, $v0 /* 3D4414 E00D05F4 C42A1DEC */ lwc1 $f10, %lo(gCameras + 0x6C)($at) /* 3D4418 E00D05F8 24C20008 */ addiu $v0, $a2, 0x8 /* 3D441C E00D05FC AE660000 */ sw $a2, 0x0($s3) /* 3D4420 E00D0600 E7B60010 */ swc1 $f22, 0x10($sp) /* 3D4424 E00D0604 C6220004 */ lwc1 $f2, 0x4($s1) /* 3D4428 E00D0608 24C60010 */ addiu $a2, $a2, 0x10 /* 3D442C E00D060C AE620000 */ sw $v0, 0x0($s3) /* 3D4430 E00D0610 E7A20014 */ swc1 $f2, 0x14($sp) /* 3D4434 E00D0614 C6200008 */ lwc1 $f0, 0x8($s1) /* 3D4438 E00D0618 46005287 */ neg.s $f10, $f10 /* 3D443C E00D061C AE660000 */ sw $a2, 0x0($s3) /* 3D4440 E00D0620 44065000 */ mfc1 $a2, $f10 /* 3D4444 E00D0624 462036A0 */ cvt.s.d $f26, $f6 /* 3D4448 E00D0628 E7A00018 */ swc1 $f0, 0x18($sp) /* 3D444C E00D062C C620000C */ lwc1 $f0, 0xC($s1) /* 3D4450 E00D0630 46204620 */ cvt.s.d $f24, $f8 /* 3D4454 E00D0634 0C080180 */ jal shim_guPositionF /* 3D4458 E00D0638 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3D445C E00D063C 27A40020 */ addiu $a0, $sp, 0x20 /* 3D4460 E00D0640 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 3D4464 E00D0644 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 3D4468 E00D0648 3C16800A */ lui $s6, %hi(gDisplayContext) /* 3D446C E00D064C 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 3D4470 E00D0650 96A50000 */ lhu $a1, 0x0($s5) /* 3D4474 E00D0654 8EC20000 */ lw $v0, 0x0($s6) /* 3D4478 E00D0658 00052980 */ sll $a1, $a1, 6 /* 3D447C E00D065C 00B02821 */ addu $a1, $a1, $s0 /* 3D4480 E00D0660 0C080118 */ jal shim_guMtxF2L /* 3D4484 E00D0664 00452821 */ addu $a1, $v0, $a1 /* 3D4488 E00D0668 24140001 */ addiu $s4, $zero, 0x1 /* 3D448C E00D066C 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 3D4490 E00D0670 8E650000 */ lw $a1, 0x0($s3) /* 3D4494 E00D0674 96A40000 */ lhu $a0, 0x0($s5) /* 3D4498 E00D0678 00A0302D */ daddu $a2, $a1, $zero /* 3D449C E00D067C 24A50008 */ addiu $a1, $a1, 0x8 /* 3D44A0 E00D0680 ACC20000 */ sw $v0, 0x0($a2) /* 3D44A4 E00D0684 3082FFFF */ andi $v0, $a0, 0xFFFF /* 3D44A8 E00D0688 00021180 */ sll $v0, $v0, 6 /* 3D44AC E00D068C 00501021 */ addu $v0, $v0, $s0 /* 3D44B0 E00D0690 00942021 */ addu $a0, $a0, $s4 /* 3D44B4 E00D0694 8EC30000 */ lw $v1, 0x0($s6) /* 3D44B8 E00D0698 00A0B82D */ daddu $s7, $a1, $zero /* 3D44BC E00D069C 00621821 */ addu $v1, $v1, $v0 /* 3D44C0 E00D06A0 ACC30004 */ sw $v1, 0x4($a2) /* 3D44C4 E00D06A4 8E2D0038 */ lw $t5, 0x38($s1) /* 3D44C8 E00D06A8 26E30008 */ addiu $v1, $s7, 0x8 /* 3D44CC E00D06AC AFAD00A0 */ sw $t5, 0xA0($sp) /* 3D44D0 E00D06B0 AE650000 */ sw $a1, 0x0($s3) /* 3D44D4 E00D06B4 A6A40000 */ sh $a0, 0x0($s5) /* 3D44D8 E00D06B8 AE630000 */ sw $v1, 0x0($s3) /* 3D44DC E00D06BC 8FAD00A4 */ lw $t5, 0xA4($sp) /* 3D44E0 E00D06C0 AFAD00BC */ sw $t5, 0xBC($sp) /* 3D44E4 E00D06C4 8FAD00A8 */ lw $t5, 0xA8($sp) /* 3D44E8 E00D06C8 AFAD00C0 */ sw $t5, 0xC0($sp) /* 3D44EC E00D06CC 8FAD00AC */ lw $t5, 0xAC($sp) /* 3D44F0 E00D06D0 AFAD00C4 */ sw $t5, 0xC4($sp) /* 3D44F4 E00D06D4 8FAD00B0 */ lw $t5, 0xB0($sp) /* 3D44F8 E00D06D8 AFAD00C8 */ sw $t5, 0xC8($sp) /* 3D44FC E00D06DC 8FAD00B4 */ lw $t5, 0xB4($sp) /* 3D4500 E00D06E0 AFAD00CC */ sw $t5, 0xCC($sp) /* 3D4504 E00D06E4 8FAD00B8 */ lw $t5, 0xB8($sp) /* 3D4508 E00D06E8 AFAD00D0 */ sw $t5, 0xD0($sp) /* 3D450C E00D06EC 8FAD0128 */ lw $t5, 0x128($sp) /* 3D4510 E00D06F0 8DA20008 */ lw $v0, 0x8($t5) /* 3D4514 E00D06F4 26310058 */ addiu $s1, $s1, 0x58 /* 3D4518 E00D06F8 0282102A */ slt $v0, $s4, $v0 /* 3D451C E00D06FC 10400087 */ beqz $v0, .LE00D091C /* 3D4520 E00D0700 AFA300D4 */ sw $v1, 0xD4($sp) /* 3D4524 E00D0704 27B20060 */ addiu $s2, $sp, 0x60 /* 3D4528 E00D0708 02A0B02D */ daddu $s6, $s5, $zero /* 3D452C E00D070C 3C150001 */ lui $s5, (0x11630 >> 16) /* 3D4530 E00D0710 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 3D4534 E00D0714 3C1EF200 */ lui $fp, (0xF2000000 >> 16) /* 3D4538 E00D0718 26300044 */ addiu $s0, $s1, 0x44 .LE00D071C: /* 3D453C E00D071C 8E020008 */ lw $v0, 0x8($s0) /* 3D4540 E00D0720 04400078 */ bltz $v0, .LE00D0904 /* 3D4544 E00D0724 00000000 */ nop /* 3D4548 E00D0728 8E05FFC0 */ lw $a1, -0x40($s0) /* 3D454C E00D072C 8E06FFC4 */ lw $a2, -0x3C($s0) /* 3D4550 E00D0730 8E07FFC8 */ lw $a3, -0x38($s0) /* 3D4554 E00D0734 0C080108 */ jal shim_guTranslateF /* 3D4558 E00D0738 27A40020 */ addiu $a0, $sp, 0x20 /* 3D455C E00D073C E7B60010 */ swc1 $f22, 0x10($sp) /* 3D4560 E00D0740 8E05FFF0 */ lw $a1, -0x10($s0) /* 3D4564 E00D0744 4406A000 */ mfc1 $a2, $f20 /* 3D4568 E00D0748 4407A000 */ mfc1 $a3, $f20 /* 3D456C E00D074C 0C080104 */ jal shim_guRotateF /* 3D4570 E00D0750 0240202D */ daddu $a0, $s2, $zero /* 3D4574 E00D0754 0240202D */ daddu $a0, $s2, $zero /* 3D4578 E00D0758 27A50020 */ addiu $a1, $sp, 0x20 /* 3D457C E00D075C 0C080114 */ jal shim_guMtxCatF /* 3D4580 E00D0760 00A0302D */ daddu $a2, $a1, $zero /* 3D4584 E00D0764 C600FFD8 */ lwc1 $f0, -0x28($s0) /* 3D4588 E00D0768 461C0002 */ mul.s $f0, $f0, $f28 /* 3D458C E00D076C 00000000 */ nop /* 3D4590 E00D0770 44050000 */ mfc1 $a1, $f0 /* 3D4594 E00D0774 C600FFDC */ lwc1 $f0, -0x24($s0) /* 3D4598 E00D0778 461A0002 */ mul.s $f0, $f0, $f26 /* 3D459C E00D077C 00000000 */ nop /* 3D45A0 E00D0780 44060000 */ mfc1 $a2, $f0 /* 3D45A4 E00D0784 C600FFE0 */ lwc1 $f0, -0x20($s0) /* 3D45A8 E00D0788 46180002 */ mul.s $f0, $f0, $f24 /* 3D45AC E00D078C 00000000 */ nop /* 3D45B0 E00D0790 44070000 */ mfc1 $a3, $f0 /* 3D45B4 E00D0794 0C080110 */ jal shim_guScaleF /* 3D45B8 E00D0798 0240202D */ daddu $a0, $s2, $zero /* 3D45BC E00D079C 0240202D */ daddu $a0, $s2, $zero /* 3D45C0 E00D07A0 27A50020 */ addiu $a1, $sp, 0x20 /* 3D45C4 E00D07A4 0C080114 */ jal shim_guMtxCatF /* 3D45C8 E00D07A8 00A0302D */ daddu $a2, $a1, $zero /* 3D45CC E00D07AC E7B40010 */ swc1 $f20, 0x10($sp) /* 3D45D0 E00D07B0 8E05FFEC */ lw $a1, -0x14($s0) /* 3D45D4 E00D07B4 4406A000 */ mfc1 $a2, $f20 /* 3D45D8 E00D07B8 4407B000 */ mfc1 $a3, $f22 /* 3D45DC E00D07BC 0C080104 */ jal shim_guRotateF /* 3D45E0 E00D07C0 0240202D */ daddu $a0, $s2, $zero /* 3D45E4 E00D07C4 0240202D */ daddu $a0, $s2, $zero /* 3D45E8 E00D07C8 27A50020 */ addiu $a1, $sp, 0x20 /* 3D45EC E00D07CC 0C080114 */ jal shim_guMtxCatF /* 3D45F0 E00D07D0 00A0302D */ daddu $a2, $a1, $zero /* 3D45F4 E00D07D4 27A40020 */ addiu $a0, $sp, 0x20 /* 3D45F8 E00D07D8 96C50000 */ lhu $a1, 0x0($s6) /* 3D45FC E00D07DC 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3D4600 E00D07E0 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3D4604 E00D07E4 00052980 */ sll $a1, $a1, 6 /* 3D4608 E00D07E8 00B52821 */ addu $a1, $a1, $s5 /* 3D460C E00D07EC 0C080118 */ jal shim_guMtxF2L /* 3D4610 E00D07F0 00452821 */ addu $a1, $v0, $a1 /* 3D4614 E00D07F4 3C06000F */ lui $a2, (0xFC000 >> 16) /* 3D4618 E00D07F8 34C6C000 */ ori $a2, $a2, (0xFC000 & 0xFFFF) /* 3D461C E00D07FC 3C080107 */ lui $t0, (0x107C000 >> 16) /* 3D4620 E00D0800 3508C000 */ ori $t0, $t0, (0x107C000 & 0xFFFF) /* 3D4624 E00D0804 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3D4628 E00D0808 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3D462C E00D080C 8E630000 */ lw $v1, 0x0($s3) /* 3D4630 E00D0810 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 3D4634 E00D0814 0060282D */ daddu $a1, $v1, $zero /* 3D4638 E00D0818 24630008 */ addiu $v1, $v1, 0x8 /* 3D463C E00D081C 4600030D */ trunc.w.s $f12, $f0 /* 3D4640 E00D0820 44026000 */ mfc1 $v0, $f12 /* 3D4644 E00D0824 00000000 */ nop /* 3D4648 E00D0828 30420FFF */ andi $v0, $v0, 0xFFF /* 3D464C E00D082C 005E1025 */ or $v0, $v0, $fp /* 3D4650 E00D0830 AE630000 */ sw $v1, 0x0($s3) /* 3D4654 E00D0834 ACA20000 */ sw $v0, 0x0($a1) /* 3D4658 E00D0838 24620008 */ addiu $v0, $v1, 0x8 /* 3D465C E00D083C AE620000 */ sw $v0, 0x0($s3) /* 3D4660 E00D0840 96C40000 */ lhu $a0, 0x0($s6) /* 3D4664 E00D0844 24620010 */ addiu $v0, $v1, 0x10 /* 3D4668 E00D0848 AE620000 */ sw $v0, 0x0($s3) /* 3D466C E00D084C 24820001 */ addiu $v0, $a0, 0x1 /* 3D4670 E00D0850 A6C20000 */ sh $v0, 0x0($s6) /* 3D4674 E00D0854 24620018 */ addiu $v0, $v1, 0x18 /* 3D4678 E00D0858 3084FFFF */ andi $a0, $a0, 0xFFFF /* 3D467C E00D085C 00042180 */ sll $a0, $a0, 6 /* 3D4680 E00D0860 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 3D4684 E00D0864 00952021 */ addu $a0, $a0, $s5 /* 3D4688 E00D0868 AE620000 */ sw $v0, 0x0($s3) /* 3D468C E00D086C 4600030D */ trunc.w.s $f12, $f0 /* 3D4690 E00D0870 44026000 */ mfc1 $v0, $f12 /* 3D4694 E00D0874 00000000 */ nop /* 3D4698 E00D0878 2442007C */ addiu $v0, $v0, 0x7C /* 3D469C E00D087C 30420FFF */ andi $v0, $v0, 0xFFF /* 3D46A0 E00D0880 00461025 */ or $v0, $v0, $a2 /* 3D46A4 E00D0884 ACA20004 */ sw $v0, 0x4($a1) /* 3D46A8 E00D0888 C6000000 */ lwc1 $f0, 0x0($s0) /* 3D46AC E00D088C 24620020 */ addiu $v0, $v1, 0x20 /* 3D46B0 E00D0890 AE620000 */ sw $v0, 0x0($s3) /* 3D46B4 E00D0894 4600030D */ trunc.w.s $f12, $f0 /* 3D46B8 E00D0898 44026000 */ mfc1 $v0, $f12 /* 3D46BC E00D089C 00000000 */ nop /* 3D46C0 E00D08A0 30420FFF */ andi $v0, $v0, 0xFFF /* 3D46C4 E00D08A4 005E1025 */ or $v0, $v0, $fp /* 3D46C8 E00D08A8 AC620000 */ sw $v0, 0x0($v1) /* 3D46CC E00D08AC C6000000 */ lwc1 $f0, 0x0($s0) /* 3D46D0 E00D08B0 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 3D46D4 E00D08B4 AC620008 */ sw $v0, 0x8($v1) /* 3D46D8 E00D08B8 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3D46DC E00D08BC 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3D46E0 E00D08C0 3C0D0900 */ lui $t5, %hi(D_09000940_4159A0) /* 3D46E4 E00D08C4 25AD0940 */ addiu $t5, $t5, %lo(D_09000940_4159A0) /* 3D46E8 E00D08C8 AC6D0014 */ sw $t5, 0x14($v1) /* 3D46EC E00D08CC AC670018 */ sw $a3, 0x18($v1) /* 3D46F0 E00D08D0 00441021 */ addu $v0, $v0, $a0 /* 3D46F4 E00D08D4 AC62000C */ sw $v0, 0xC($v1) /* 3D46F8 E00D08D8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D46FC E00D08DC AC620010 */ sw $v0, 0x10($v1) /* 3D4700 E00D08E0 24020040 */ addiu $v0, $zero, 0x40 /* 3D4704 E00D08E4 AC62001C */ sw $v0, 0x1C($v1) /* 3D4708 E00D08E8 4600030D */ trunc.w.s $f12, $f0 /* 3D470C E00D08EC 44026000 */ mfc1 $v0, $f12 /* 3D4710 E00D08F0 00000000 */ nop /* 3D4714 E00D08F4 2442007C */ addiu $v0, $v0, 0x7C /* 3D4718 E00D08F8 30420FFF */ andi $v0, $v0, 0xFFF /* 3D471C E00D08FC 00481025 */ or $v0, $v0, $t0 /* 3D4720 E00D0900 AC620004 */ sw $v0, 0x4($v1) .LE00D0904: /* 3D4724 E00D0904 8FAD0128 */ lw $t5, 0x128($sp) /* 3D4728 E00D0908 26940001 */ addiu $s4, $s4, 0x1 /* 3D472C E00D090C 8DA20008 */ lw $v0, 0x8($t5) /* 3D4730 E00D0910 0282102A */ slt $v0, $s4, $v0 /* 3D4734 E00D0914 1440FF81 */ bnez $v0, .LE00D071C /* 3D4738 E00D0918 26100058 */ addiu $s0, $s0, 0x58 .LE00D091C: /* 3D473C E00D091C 3C0AD9FF */ lui $t2, (0xD9FFF9FF >> 16) /* 3D4740 E00D0920 354AF9FF */ ori $t2, $t2, (0xD9FFF9FF & 0xFFFF) /* 3D4744 E00D0924 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 3D4748 E00D0928 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 3D474C E00D092C 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 3D4750 E00D0930 8CA30000 */ lw $v1, 0x0($a1) /* 3D4754 E00D0934 3C09FA00 */ lui $t1, (0xFA000000 >> 16) /* 3D4758 E00D0938 0060202D */ daddu $a0, $v1, $zero /* 3D475C E00D093C 24630008 */ addiu $v1, $v1, 0x8 /* 3D4760 E00D0940 ACA30000 */ sw $v1, 0x0($a1) /* 3D4764 E00D0944 AC820000 */ sw $v0, 0x0($a0) /* 3D4768 E00D0948 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3D476C E00D094C AC800004 */ sw $zero, 0x4($a0) /* 3D4770 E00D0950 AEE20000 */ sw $v0, 0x0($s7) /* 3D4774 E00D0954 24620008 */ addiu $v0, $v1, 0x8 /* 3D4778 E00D0958 AEE30004 */ sw $v1, 0x4($s7) /* 3D477C E00D095C ACA20000 */ sw $v0, 0x0($a1) /* 3D4780 E00D0960 AC690000 */ sw $t1, 0x0($v1) /* 3D4784 E00D0964 8FAD00BC */ lw $t5, 0xBC($sp) /* 3D4788 E00D0968 3C0BD9FF */ lui $t3, (0xD9FFFFFF >> 16) /* 3D478C E00D096C 000D1600 */ sll $v0, $t5, 24 /* 3D4790 E00D0970 8FAD00C0 */ lw $t5, 0xC0($sp) /* 3D4794 E00D0974 3C07FB00 */ lui $a3, (0xFB000000 >> 16) /* 3D4798 E00D0978 000D2400 */ sll $a0, $t5, 16 /* 3D479C E00D097C 8FAD00C4 */ lw $t5, 0xC4($sp) /* 3D47A0 E00D0980 00441025 */ or $v0, $v0, $a0 /* 3D47A4 E00D0984 000D2200 */ sll $a0, $t5, 8 /* 3D47A8 E00D0988 8FAD00A0 */ lw $t5, 0xA0($sp) /* 3D47AC E00D098C 00441025 */ or $v0, $v0, $a0 /* 3D47B0 E00D0990 31A800FF */ andi $t0, $t5, 0xFF /* 3D47B4 E00D0994 00481025 */ or $v0, $v0, $t0 /* 3D47B8 E00D0998 AC620004 */ sw $v0, 0x4($v1) /* 3D47BC E00D099C 24620010 */ addiu $v0, $v1, 0x10 /* 3D47C0 E00D09A0 ACA20000 */ sw $v0, 0x0($a1) /* 3D47C4 E00D09A4 AC670008 */ sw $a3, 0x8($v1) /* 3D47C8 E00D09A8 8FAD00C8 */ lw $t5, 0xC8($sp) /* 3D47CC E00D09AC 356BFFFF */ ori $t3, $t3, (0xD9FFFFFF & 0xFFFF) /* 3D47D0 E00D09B0 000D1600 */ sll $v0, $t5, 24 /* 3D47D4 E00D09B4 8FAD00CC */ lw $t5, 0xCC($sp) /* 3D47D8 E00D09B8 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 3D47DC E00D09BC 000D2400 */ sll $a0, $t5, 16 /* 3D47E0 E00D09C0 8FAD00D0 */ lw $t5, 0xD0($sp) /* 3D47E4 E00D09C4 00441025 */ or $v0, $v0, $a0 /* 3D47E8 E00D09C8 000D2200 */ sll $a0, $t5, 8 /* 3D47EC E00D09CC 00441025 */ or $v0, $v0, $a0 /* 3D47F0 E00D09D0 AC62000C */ sw $v0, 0xC($v1) /* 3D47F4 E00D09D4 24620018 */ addiu $v0, $v1, 0x18 /* 3D47F8 E00D09D8 ACA20000 */ sw $v0, 0x0($a1) /* 3D47FC E00D09DC 24620020 */ addiu $v0, $v1, 0x20 /* 3D4800 E00D09E0 AC6A0010 */ sw $t2, 0x10($v1) /* 3D4804 E00D09E4 AC600014 */ sw $zero, 0x14($v1) /* 3D4808 E00D09E8 ACA20000 */ sw $v0, 0x0($a1) /* 3D480C E00D09EC 24020200 */ addiu $v0, $zero, 0x200 /* 3D4810 E00D09F0 AC62001C */ sw $v0, 0x1C($v1) /* 3D4814 E00D09F4 24620028 */ addiu $v0, $v1, 0x28 /* 3D4818 E00D09F8 AC6B0018 */ sw $t3, 0x18($v1) /* 3D481C E00D09FC ACA20000 */ sw $v0, 0x0($a1) /* 3D4820 E00D0A00 AC660020 */ sw $a2, 0x20($v1) /* 3D4824 E00D0A04 8FAD00D4 */ lw $t5, 0xD4($sp) /* 3D4828 E00D0A08 24620030 */ addiu $v0, $v1, 0x30 /* 3D482C E00D0A0C AC6D0024 */ sw $t5, 0x24($v1) /* 3D4830 E00D0A10 ACA20000 */ sw $v0, 0x0($a1) /* 3D4834 E00D0A14 AC690028 */ sw $t1, 0x28($v1) /* 3D4838 E00D0A18 8FAD00A4 */ lw $t5, 0xA4($sp) /* 3D483C E00D0A1C 000D1600 */ sll $v0, $t5, 24 /* 3D4840 E00D0A20 8FAD00A8 */ lw $t5, 0xA8($sp) /* 3D4844 E00D0A24 000D2400 */ sll $a0, $t5, 16 /* 3D4848 E00D0A28 8FAD00AC */ lw $t5, 0xAC($sp) /* 3D484C E00D0A2C 00441025 */ or $v0, $v0, $a0 /* 3D4850 E00D0A30 000D2200 */ sll $a0, $t5, 8 /* 3D4854 E00D0A34 00441025 */ or $v0, $v0, $a0 /* 3D4858 E00D0A38 00481025 */ or $v0, $v0, $t0 /* 3D485C E00D0A3C AC62002C */ sw $v0, 0x2C($v1) /* 3D4860 E00D0A40 24620038 */ addiu $v0, $v1, 0x38 /* 3D4864 E00D0A44 ACA20000 */ sw $v0, 0x0($a1) /* 3D4868 E00D0A48 AC670030 */ sw $a3, 0x30($v1) /* 3D486C E00D0A4C 8FAD00B0 */ lw $t5, 0xB0($sp) /* 3D4870 E00D0A50 3C0CD838 */ lui $t4, (0xD8380002 >> 16) /* 3D4874 E00D0A54 000D1600 */ sll $v0, $t5, 24 /* 3D4878 E00D0A58 8FAD00B4 */ lw $t5, 0xB4($sp) /* 3D487C E00D0A5C 358C0002 */ ori $t4, $t4, (0xD8380002 & 0xFFFF) /* 3D4880 E00D0A60 000D2400 */ sll $a0, $t5, 16 /* 3D4884 E00D0A64 8FAD00B8 */ lw $t5, 0xB8($sp) /* 3D4888 E00D0A68 00441025 */ or $v0, $v0, $a0 /* 3D488C E00D0A6C 000D2200 */ sll $a0, $t5, 8 /* 3D4890 E00D0A70 00441025 */ or $v0, $v0, $a0 /* 3D4894 E00D0A74 AC620034 */ sw $v0, 0x34($v1) /* 3D4898 E00D0A78 24620040 */ addiu $v0, $v1, 0x40 /* 3D489C E00D0A7C ACA20000 */ sw $v0, 0x0($a1) /* 3D48A0 E00D0A80 24620048 */ addiu $v0, $v1, 0x48 /* 3D48A4 E00D0A84 AC6A0038 */ sw $t2, 0x38($v1) /* 3D48A8 E00D0A88 AC60003C */ sw $zero, 0x3C($v1) /* 3D48AC E00D0A8C ACA20000 */ sw $v0, 0x0($a1) /* 3D48B0 E00D0A90 24020400 */ addiu $v0, $zero, 0x400 /* 3D48B4 E00D0A94 AC620044 */ sw $v0, 0x44($v1) /* 3D48B8 E00D0A98 24620050 */ addiu $v0, $v1, 0x50 /* 3D48BC E00D0A9C AC6B0040 */ sw $t3, 0x40($v1) /* 3D48C0 E00D0AA0 ACA20000 */ sw $v0, 0x0($a1) /* 3D48C4 E00D0AA4 AC660048 */ sw $a2, 0x48($v1) /* 3D48C8 E00D0AA8 8FAD00D4 */ lw $t5, 0xD4($sp) /* 3D48CC E00D0AAC 24620058 */ addiu $v0, $v1, 0x58 /* 3D48D0 E00D0AB0 AC6D004C */ sw $t5, 0x4C($v1) /* 3D48D4 E00D0AB4 ACA20000 */ sw $v0, 0x0($a1) /* 3D48D8 E00D0AB8 24020040 */ addiu $v0, $zero, 0x40 /* 3D48DC E00D0ABC AC6C0050 */ sw $t4, 0x50($v1) /* 3D48E0 E00D0AC0 AC620054 */ sw $v0, 0x54($v1) /* 3D48E4 E00D0AC4 8FBF00FC */ lw $ra, 0xFC($sp) /* 3D48E8 E00D0AC8 8FBE00F8 */ lw $fp, 0xF8($sp) /* 3D48EC E00D0ACC 8FB700F4 */ lw $s7, 0xF4($sp) /* 3D48F0 E00D0AD0 8FB600F0 */ lw $s6, 0xF0($sp) /* 3D48F4 E00D0AD4 8FB500EC */ lw $s5, 0xEC($sp) /* 3D48F8 E00D0AD8 8FB400E8 */ lw $s4, 0xE8($sp) /* 3D48FC E00D0ADC 8FB300E4 */ lw $s3, 0xE4($sp) /* 3D4900 E00D0AE0 8FB200E0 */ lw $s2, 0xE0($sp) /* 3D4904 E00D0AE4 8FB100DC */ lw $s1, 0xDC($sp) /* 3D4908 E00D0AE8 8FB000D8 */ lw $s0, 0xD8($sp) /* 3D490C E00D0AEC D7BC0120 */ ldc1 $f28, 0x120($sp) /* 3D4910 E00D0AF0 D7BA0118 */ ldc1 $f26, 0x118($sp) /* 3D4914 E00D0AF4 D7B80110 */ ldc1 $f24, 0x110($sp) /* 3D4918 E00D0AF8 D7B60108 */ ldc1 $f22, 0x108($sp) /* 3D491C E00D0AFC D7B40100 */ ldc1 $f20, 0x100($sp) /* 3D4920 E00D0B00 03E00008 */ jr $ra /* 3D4924 E00D0B04 27BD0128 */ addiu $sp, $sp, 0x128 /* 3D4928 E00D0B08 00000000 */ nop /* 3D492C E00D0B0C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void red_impact_appendGfx(void* effect) { RedImpactFXData* part = ((EffectInstance*)effect)->data.redImpact; Gfx* dlist = D_E00D0B10[part->unk_00]; Gfx* dlist2; f32 temp_1C = part->unk_1C * 0.3; f32 temp_20 = part->unk_20 * 0.3; f32 temp_24 = part->unk_24 * 0.3; s32 alpha; s32 primR = part->unk_50.r; s32 primG = part->unk_50.g; s32 primB = part->unk_50.b; s32 envR = part->unk_53.r; s32 envG = part->unk_53.g; s32 envB = part->unk_53.b; s32 primR2; s32 primG2; s32 primB2; s32 envR2; s32 envG2; s32 envB2; Gfx* savedGfxPos; Gfx* savedGfxPos2; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); alpha = part->unk_38; primR2 = primR; primG2 = primG; primB2 = primB; envR2 = envR; envG2 = envG; envB2 = envB; savedGfxPos = gMainGfxPos; gMainGfxPos++; savedGfxPos2 = savedGfxPos + 1; part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_4C >= 0) { shim_guTranslateF(sp20, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp60, part->unk_34, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guScaleF(sp60, part->unk_1C * temp_1C, part->unk_20 * temp_20, part->unk_24 * temp_24); shim_guMtxCatF(sp60, sp20, sp20); shim_guRotateF(sp60, part->unk_30, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); dlist2 = D_09000940_359CF0; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (s32) part->unk_3C, 0x00FC, (s32) part->unk_3C + 0x7C); gDPSetTileSize(gMainGfxPos++, 1, 0, (s32) part->unk_44, 0x007C, (s32) part->unk_44 + 0x7C); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gDPSetPrimColor(gMainGfxPos++, 0, 0, primR2, primG2, primB2, alpha); gDPSetEnvColor(gMainGfxPos++, envR2, envG2, envB2, 0); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPSetGeometryMode(gMainGfxPos++, G_CULL_FRONT); gSPDisplayList(gMainGfxPos++, savedGfxPos2); gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, alpha); gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, 0); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK); gSPDisplayList(gMainGfxPos++, savedGfxPos2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8024AFE4 /* 1798C4 8024AFE4 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 1798C8 8024AFE8 AFB00020 */ sw $s0, 0x20($sp) /* 1798CC 8024AFEC 3C10800B */ lui $s0, %hi(gCameras + 0x558) /* 1798D0 8024AFF0 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558) /* 1798D4 8024AFF4 3C02802A */ lui $v0, %hi(BattleCam_TargetActor) /* 1798D8 8024AFF8 9442F27C */ lhu $v0, %lo(BattleCam_TargetActor)($v0) /* 1798DC 8024AFFC 3C04800E */ lui $a0, %hi(gBattleStatus) /* 1798E0 8024B000 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) /* 1798E4 8024B004 AFBF0024 */ sw $ra, 0x24($sp) /* 1798E8 8024B008 F7BE0050 */ sdc1 $f30, 0x50($sp) /* 1798EC 8024B00C F7BC0048 */ sdc1 $f28, 0x48($sp) /* 1798F0 8024B010 F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1798F4 8024B014 F7B80038 */ sdc1 $f24, 0x38($sp) /* 1798F8 8024B018 F7B60030 */ sdc1 $f22, 0x30($sp) /* 1798FC 8024B01C F7B40028 */ sdc1 $f20, 0x28($sp) /* 179900 8024B020 30430700 */ andi $v1, $v0, 0x700 /* 179904 8024B024 304600FF */ andi $a2, $v0, 0xFF /* 179908 8024B028 24020100 */ addiu $v0, $zero, 0x100 /* 17990C 8024B02C 10620026 */ beq $v1, $v0, .L8024B0C8 /* 179910 8024B030 28620101 */ slti $v0, $v1, 0x101 /* 179914 8024B034 10400005 */ beqz $v0, .L8024B04C /* 179918 8024B038 24020200 */ addiu $v0, $zero, 0x200 /* 17991C 8024B03C 10600007 */ beqz $v1, .L8024B05C /* 179920 8024B040 24020002 */ addiu $v0, $zero, 0x2 /* 179924 8024B044 08092D75 */ j .L8024B5D4 /* 179928 8024B048 00000000 */ nop .L8024B04C: /* 17992C 8024B04C 10620021 */ beq $v1, $v0, .L8024B0D4 /* 179930 8024B050 24020002 */ addiu $v0, $zero, 0x2 /* 179934 8024B054 08092D75 */ j .L8024B5D4 /* 179938 8024B058 00000000 */ nop .L8024B05C: /* 17993C 8024B05C 8C8400D8 */ lw $a0, 0xD8($a0) /* 179940 8024B060 1080015C */ beqz $a0, .L8024B5D4 /* 179944 8024B064 0000102D */ daddu $v0, $zero, $zero /* 179948 8024B068 C49E001C */ lwc1 $f30, 0x1C($a0) /* 17994C 8024B06C C4860144 */ lwc1 $f6, 0x144($a0) /* 179950 8024B070 C49A0018 */ lwc1 $f26, 0x18($a0) /* 179954 8024B074 E7BE0018 */ swc1 $f30, 0x18($sp) /* 179958 8024B078 90830191 */ lbu $v1, 0x191($a0) /* 17995C 8024B07C 90820190 */ lbu $v0, 0x190($a0) /* 179960 8024B080 C49E0020 */ lwc1 $f30, 0x20($a0) /* 179964 8024B084 00621821 */ addu $v1, $v1, $v0 /* 179968 8024B088 00031843 */ sra $v1, $v1, 1 /* 17996C 8024B08C 3C028011 */ lui $v0, %hi(gPlayerStatus) /* 179970 8024B090 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) /* 179974 8024B094 E7BE0010 */ swc1 $f30, 0x10($sp) /* 179978 8024B098 944200B0 */ lhu $v0, 0xB0($v0) /* 17997C 8024B09C 4483F000 */ mtc1 $v1, $f30 D_8024B0A0: /* 179980 8024B0A0 00000000 */ nop /* 179984 8024B0A4 4680F7A0 */ cvt.s.w $f30, $f30 /* 179988 8024B0A8 E7BE0014 */ swc1 $f30, 0x14($sp) /* 17998C 8024B0AC C4820148 */ lwc1 $f2, 0x148($a0) /* 179990 8024B0B0 00021400 */ sll $v0, $v0, 16 /* 179994 8024B0B4 00021C03 */ sra $v1, $v0, 16 /* 179998 8024B0B8 000217C2 */ srl $v0, $v0, 31 .L8024B0BC: /* 17999C 8024B0BC 00621821 */ addu $v1, $v1, $v0 /* 1799A0 8024B0C0 08092C4A */ j .L8024B128 /* 1799A4 8024B0C4 00031843 */ sra $v1, $v1, 1 .L8024B0C8: /* 1799A8 8024B0C8 8C8400DC */ lw $a0, 0xDC($a0) .L8024B0CC: /* 1799AC 8024B0CC 08092C38 */ j .L8024B0E0 /* 1799B0 8024B0D0 00000000 */ nop .L8024B0D4: /* 1799B4 8024B0D4 00061080 */ sll $v0, $a2, 2 /* 1799B8 8024B0D8 00441021 */ addu $v0, $v0, $a0 /* 1799BC 8024B0DC 8C4400E0 */ lw $a0, 0xE0($v0) .L8024B0E0: /* 1799C0 8024B0E0 1080013C */ beqz $a0, .L8024B5D4 .L8024B0E4: /* 1799C4 8024B0E4 0000102D */ daddu $v0, $zero, $zero /* 1799C8 8024B0E8 C49E001C */ lwc1 $f30, 0x1C($a0) /* 1799CC 8024B0EC C4860144 */ lwc1 $f6, 0x144($a0) /* 1799D0 8024B0F0 C49A0018 */ lwc1 $f26, 0x18($a0) /* 1799D4 8024B0F4 E7BE0018 */ swc1 $f30, 0x18($sp) /* 1799D8 8024B0F8 90830191 */ lbu $v1, 0x191($a0) /* 1799DC 8024B0FC 90820190 */ lbu $v0, 0x190($a0) /* 1799E0 8024B100 C49E0020 */ lwc1 $f30, 0x20($a0) /* 1799E4 8024B104 00621021 */ addu $v0, $v1, $v0 /* 1799E8 8024B108 00021043 */ sra $v0, $v0, 1 /* 1799EC 8024B10C E7BE0010 */ swc1 $f30, 0x10($sp) /* 1799F0 8024B110 4482F000 */ mtc1 $v0, $f30 D_8024B114: /* 1799F4 8024B114 00000000 */ nop /* 1799F8 8024B118 4680F7A0 */ cvt.s.w $f30, $f30 .L8024B11C: /* 1799FC 8024B11C 00031842 */ srl $v1, $v1, 1 /* 179A00 8024B120 E7BE0014 */ swc1 $f30, 0x14($sp) /* 179A04 8024B124 C4820148 */ lwc1 $f2, 0x148($a0) .L8024B128: /* 179A08 8024B128 44830000 */ mtc1 $v1, $f0 /* 179A0C 8024B12C 00000000 */ nop /* 179A10 8024B130 46800020 */ cvt.s.w $f0, $f0 /* 179A14 8024B134 3C02802A */ lui $v0, %hi(BattleCam_ModeY) /* 179A18 8024B138 8042F2A2 */ lb $v0, %lo(BattleCam_ModeY)($v0) /* 179A1C 8024B13C 1040000F */ beqz $v0, .L8024B17C .L8024B140: /* 179A20 8024B140 46001000 */ add.s $f0, $f2, $f0 /* 179A24 8024B144 C7BE0018 */ lwc1 $f30, 0x18($sp) /* 179A28 8024B148 461E0001 */ sub.s $f0, $f0, $f30 /* 179A2C 8024B14C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 179A30 8024B150 44811000 */ mtc1 $at, $f2 /* 179A34 8024B154 00000000 */ nop .L8024B158: /* 179A38 8024B158 46020082 */ mul.s $f2, $f0, $f2 /* 179A3C 8024B15C 00000000 */ nop /* 179A40 8024B160 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 179A44 8024B164 44812000 */ mtc1 $at, $f4 /* 179A48 8024B168 00000000 */ nop /* 179A4C 8024B16C 46040003 */ div.s $f0, $f0, $f4 /* 179A50 8024B170 46001080 */ add.s $f2, $f2, $f0 /* 179A54 8024B174 4602F780 */ add.s $f30, $f30, $f2 /* 179A58 8024B178 E7BE0018 */ swc1 $f30, 0x18($sp) .L8024B17C: /* 179A5C 8024B17C 3C02802A */ lui $v0, %hi(BattleCam_ModeX) /* 179A60 8024B180 8042F2A3 */ lb $v0, %lo(BattleCam_ModeX)($v0) .L8024B184: /* 179A64 8024B184 10400012 */ beqz $v0, .L8024B1D0 /* 179A68 8024B188 00000000 */ nop D_8024B18C: /* 179A6C 8024B18C 461A3001 */ sub.s $f0, $f6, $f26 /* 179A70 8024B190 3C013F00 */ lui $at, (0x3F000000 >> 16) D_8024B194: /* 179A74 8024B194 44811000 */ mtc1 $at, $f2 /* 179A78 8024B198 00000000 */ nop /* 179A7C 8024B19C 46020002 */ mul.s $f0, $f0, $f2 /* 179A80 8024B1A0 00000000 */ nop /* 179A84 8024B1A4 4600D680 */ add.s $f26, $f26, $f0 /* 179A88 8024B1A8 3C014296 */ lui $at, (0x42960000 >> 16) /* 179A8C 8024B1AC 44810000 */ mtc1 $at, $f0 .L8024B1B0: /* 179A90 8024B1B0 00000000 */ nop /* 179A94 8024B1B4 461A003C */ c.lt.s $f0, $f26 /* 179A98 8024B1B8 00000000 */ nop /* 179A9C 8024B1BC 45000004 */ bc1f .L8024B1D0 /* 179AA0 8024B1C0 00000000 */ nop /* 179AA4 8024B1C4 461A0001 */ sub.s $f0, $f0, $f26 /* 179AA8 8024B1C8 46000005 */ abs.s $f0, $f0 /* 179AAC 8024B1CC 4600D681 */ sub.s $f26, $f26, $f0 .L8024B1D0: /* 179AB0 8024B1D0 3C02802A */ lui $v0, %hi(D_8029F2A6) /* 179AB4 8024B1D4 8042F2A6 */ lb $v0, %lo(D_8029F2A6)($v0) /* 179AB8 8024B1D8 10400029 */ beqz $v0, .L8024B280 /* 179ABC 8024B1DC 00000000 */ nop .L8024B1E0: /* 179AC0 8024B1E0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 179AC4 8024B1E4 C422F28C */ lwc1 $f2, %lo(BattleCam_InitialBoomLength)($at) /* 179AC8 8024B1E8 3C0143FA */ lui $at, (0x43FA0000 >> 16) /* 179ACC 8024B1EC 44810000 */ mtc1 $at, $f0 /* 179AD0 8024B1F0 00000000 */ nop /* 179AD4 8024B1F4 46020001 */ sub.s $f0, $f0, $f2 /* 179AD8 8024B1F8 3C01802A */ lui $at, %hi(D_8029CC20) /* 179ADC 8024B1FC D422CC20 */ ldc1 $f2, %lo(D_8029CC20)($at) D_8024B200: /* 179AE0 8024B200 46000021 */ cvt.d.s $f0, $f0 /* 179AE4 8024B204 46220002 */ mul.d $f0, $f0, $f2 /* 179AE8 8024B208 00000000 */ nop D_8024B20C: /* 179AEC 8024B20C 3C01403E */ lui $at, (0x403E0000 >> 16) .L8024B210: /* 179AF0 8024B210 44811800 */ mtc1 $at, $f3 /* 179AF4 8024B214 44801000 */ mtc1 $zero, $f2 /* 179AF8 8024B218 00000000 */ nop /* 179AFC 8024B21C 46220000 */ add.d $f0, $f0, $f2 /* 179B00 8024B220 46200120 */ cvt.s.d $f4, $f0 /* 179B04 8024B224 46002007 */ neg.s $f0, $f4 .L8024B228: /* 179B08 8024B228 4600D03C */ c.lt.s $f26, $f0 /* 179B0C 8024B22C 00000000 */ nop /* 179B10 8024B230 45000008 */ bc1f .L8024B254 /* 179B14 8024B234 00000000 */ nop /* 179B18 8024B238 461A0001 */ sub.s $f0, $f0, $f26 /* 179B1C 8024B23C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 179B20 8024B240 44811000 */ mtc1 $at, $f2 /* 179B24 8024B244 00000000 */ nop /* 179B28 8024B248 46020002 */ mul.s $f0, $f0, $f2 /* 179B2C 8024B24C 00000000 */ nop /* 179B30 8024B250 4600D680 */ add.s $f26, $f26, $f0 .L8024B254: /* 179B34 8024B254 461A203C */ c.lt.s $f4, $f26 D_8024B258: /* 179B38 8024B258 00000000 */ nop /* 179B3C 8024B25C 45000008 */ bc1f .L8024B280 /* 179B40 8024B260 00000000 */ nop /* 179B44 8024B264 461A2001 */ sub.s $f0, $f4, $f26 /* 179B48 8024B268 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 179B4C 8024B26C 44811000 */ mtc1 $at, $f2 /* 179B50 8024B270 00000000 */ nop /* 179B54 8024B274 46020002 */ mul.s $f0, $f0, $f2 /* 179B58 8024B278 00000000 */ nop /* 179B5C 8024B27C 4600D680 */ add.s $f26, $f26, $f0 .L8024B280: /* 179B60 8024B280 10A00029 */ beqz $a1, .L8024B328 D_8024B284: /* 179B64 8024B284 00000000 */ nop /* 179B68 8024B288 8602001E */ lh $v0, 0x1E($s0) /* 179B6C 8024B28C 86040026 */ lh $a0, 0x26($s0) /* 179B70 8024B290 86030024 */ lh $v1, 0x24($s0) /* 179B74 8024B294 44820000 */ mtc1 $v0, $f0 /* 179B78 8024B298 00000000 */ nop /* 179B7C 8024B29C 46800020 */ cvt.s.w $f0, $f0 /* 179B80 8024B2A0 86020022 */ lh $v0, 0x22($s0) /* 179B84 8024B2A4 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 179B88 8024B2A8 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at) /* 179B8C 8024B2AC 44820000 */ mtc1 $v0, $f0 D_8024B2B0: /* 179B90 8024B2B0 00000000 */ nop /* 179B94 8024B2B4 46800020 */ cvt.s.w $f0, $f0 /* 179B98 8024B2B8 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 179B9C 8024B2BC E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 179BA0 8024B2C0 44830000 */ mtc1 $v1, $f0 /* 179BA4 8024B2C4 00000000 */ nop /* 179BA8 8024B2C8 46800020 */ cvt.s.w $f0, $f0 /* 179BAC 8024B2CC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 179BB0 8024B2D0 E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at) /* 179BB4 8024B2D4 04820001 */ bltzl $a0, .L8024B2DC /* 179BB8 8024B2D8 248400FF */ addiu $a0, $a0, 0xFF .L8024B2DC: /* 179BBC 8024B2DC 00041203 */ sra $v0, $a0, 8 /* 179BC0 8024B2E0 C6020054 */ lwc1 $f2, 0x54($s0) /* 179BC4 8024B2E4 C6040058 */ lwc1 $f4, 0x58($s0) /* 179BC8 8024B2E8 C606005C */ lwc1 $f6, 0x5C($s0) /* 179BCC 8024B2EC 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft) /* 179BD0 8024B2F0 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1) /* 179BD4 8024B2F4 44820000 */ mtc1 $v0, $f0 /* 179BD8 8024B2F8 00000000 */ nop /* 179BDC 8024B2FC 46800020 */ cvt.s.w $f0, $f0 /* 179BE0 8024B300 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 179BE4 8024B304 E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at) D_8024B308: /* 179BE8 8024B308 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 179BEC 8024B30C E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at) /* 179BF0 8024B310 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 179BF4 8024B314 E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at) /* 179BF8 8024B318 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 179BFC 8024B31C E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at) /* 179C00 8024B320 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal) /* 179C04 8024B324 A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at) .L8024B328: /* 179C08 8024B328 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp) /* 179C0C 8024B32C 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0) /* 179C10 8024B330 14400027 */ bnez $v0, .L8024B3D0 D_8024B334: /* 179C14 8024B334 00000000 */ nop /* 179C18 8024B338 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 179C1C 8024B33C 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 179C20 8024B340 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 179C24 8024B344 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 179C28 8024B348 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 179C2C 8024B34C 4481C000 */ mtc1 $at, $f24 /* 179C30 8024B350 4482E000 */ mtc1 $v0, $f28 /* 179C34 8024B354 00000000 */ nop /* 179C38 8024B358 4680E720 */ cvt.s.w $f28, $f28 /* 179C3C 8024B35C 44830000 */ mtc1 $v1, $f0 D_8024B360: /* 179C40 8024B360 00000000 */ nop /* 179C44 8024B364 46800020 */ cvt.s.w $f0, $f0 /* 179C48 8024B368 4600E703 */ div.s $f28, $f28, $f0 /* 179C4C 8024B36C 461CC301 */ sub.s $f12, $f24, $f28 /* 179C50 8024B370 3C014049 */ lui $at, (0x40490FD0 >> 16) /* 179C54 8024B374 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF) /* 179C58 8024B378 4481B000 */ mtc1 $at, $f22 /* 179C5C 8024B37C 00000000 */ nop /* 179C60 8024B380 46166302 */ mul.s $f12, $f12, $f22 /* 179C64 8024B384 00000000 */ nop D_8024B388: /* 179C68 8024B388 3C013F00 */ lui $at, (0x3F000000 >> 16) D_8024B38C: /* 179C6C 8024B38C 4481A000 */ mtc1 $at, $f20 /* 179C70 8024B390 00000000 */ nop /* 179C74 8024B394 46146302 */ mul.s $f12, $f12, $f20 D_8024B398: /* 179C78 8024B398 0C00A85B */ jal sin_rad /* 179C7C 8024B39C 00000000 */ nop /* 179C80 8024B3A0 46160002 */ mul.s $f0, $f0, $f22 /* 179C84 8024B3A4 00000000 */ nop /* 179C88 8024B3A8 46140302 */ mul.s $f12, $f0, $f20 /* 179C8C 8024B3AC 0C00A85B */ jal sin_rad /* 179C90 8024B3B0 00000000 */ nop /* 179C94 8024B3B4 46160002 */ mul.s $f0, $f0, $f22 D_8024B3B8: /* 179C98 8024B3B8 00000000 */ nop /* 179C9C 8024B3BC 46140302 */ mul.s $f12, $f0, $f20 /* 179CA0 8024B3C0 0C00A85B */ jal sin_rad /* 179CA4 8024B3C4 00000000 */ nop /* 179CA8 8024B3C8 08092CFF */ j .L8024B3FC /* 179CAC 8024B3CC 4600C701 */ sub.s $f28, $f24, $f0 .L8024B3D0: /* 179CB0 8024B3D0 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 179CB4 8024B3D4 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 179CB8 8024B3D8 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) .L8024B3DC: /* 179CBC 8024B3DC 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 179CC0 8024B3E0 4482E000 */ mtc1 $v0, $f28 D_8024B3E4: /* 179CC4 8024B3E4 00000000 */ nop /* 179CC8 8024B3E8 4680E720 */ cvt.s.w $f28, $f28 /* 179CCC 8024B3EC 44830000 */ mtc1 $v1, $f0 /* 179CD0 8024B3F0 00000000 */ nop /* 179CD4 8024B3F4 46800020 */ cvt.s.w $f0, $f0 /* 179CD8 8024B3F8 4600E703 */ div.s $f28, $f28, $f0 .L8024B3FC: /* 179CDC 8024B3FC 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) D_8024B400: /* 179CE0 8024B400 C434F2A8 */ lwc1 $f20, %lo(BattleCam_InitialPosX)($at) /* 179CE4 8024B404 461CA502 */ mul.s $f20, $f20, $f28 /* 179CE8 8024B408 00000000 */ nop /* 179CEC 8024B40C 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) D_8024B410: /* 179CF0 8024B410 C432F2AC */ lwc1 $f18, %lo(BattleCam_InitialPosY)($at) /* 179CF4 8024B414 461C9482 */ mul.s $f18, $f18, $f28 /* 179CF8 8024B418 00000000 */ nop /* 179CFC 8024B41C 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 179D00 8024B420 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at) /* 179D04 8024B424 461C8402 */ mul.s $f16, $f16, $f28 /* 179D08 8024B428 00000000 */ nop /* 179D0C 8024B42C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 179D10 8024B430 C42AF298 */ lwc1 $f10, %lo(BattleCam_InitialBoomZOffset)($at) /* 179D14 8024B434 461C5282 */ mul.s $f10, $f10, $f28 /* 179D18 8024B438 00000000 */ nop D_8024B43C: /* 179D1C 8024B43C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 179D20 8024B440 C42EF28C */ lwc1 $f14, %lo(BattleCam_InitialBoomLength)($at) /* 179D24 8024B444 461C7382 */ mul.s $f14, $f14, $f28 /* 179D28 8024B448 00000000 */ nop /* 179D2C 8024B44C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 179D30 8024B450 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at) /* 179D34 8024B454 461C4202 */ mul.s $f8, $f8, $f28 /* 179D38 8024B458 00000000 */ nop /* 179D3C 8024B45C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) .L8024B460: /* 179D40 8024B460 C424F294 */ lwc1 $f4, %lo(BattleCam_InitialBoomPitch)($at) D_8024B464: /* 179D44 8024B464 461C2102 */ mul.s $f4, $f4, $f28 D_8024B468: /* 179D48 8024B468 00000000 */ nop /* 179D4C 8024B46C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 179D50 8024B470 44811000 */ mtc1 $at, $f2 /* 179D54 8024B474 00000000 */ nop /* 179D58 8024B478 461C1081 */ sub.s $f2, $f2, $f28 D_8024B47C: /* 179D5C 8024B47C 4602D682 */ mul.s $f26, $f26, $f2 /* 179D60 8024B480 00000000 */ nop /* 179D64 8024B484 C7BE0018 */ lwc1 $f30, 0x18($sp) /* 179D68 8024B488 4602F602 */ mul.s $f24, $f30, $f2 /* 179D6C 8024B48C 00000000 */ nop /* 179D70 8024B490 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset) D_8024B494: /* 179D74 8024B494 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0) /* 179D78 8024B498 44820000 */ mtc1 $v0, $f0 /* 179D7C 8024B49C 00000000 */ nop D_8024B4A0: /* 179D80 8024B4A0 46800020 */ cvt.s.w $f0, $f0 /* 179D84 8024B4A4 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) /* 179D88 8024B4A8 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0) /* 179D8C 8024B4AC 46020002 */ mul.s $f0, $f0, $f2 /* 179D90 8024B4B0 00000000 */ nop /* 179D94 8024B4B4 44826000 */ mtc1 $v0, $f12 /* 179D98 8024B4B8 00000000 */ nop /* 179D9C 8024B4BC 46806320 */ cvt.s.w $f12, $f12 D_8024B4C0: /* 179DA0 8024B4C0 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw) /* 179DA4 8024B4C4 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0) /* 179DA8 8024B4C8 44823000 */ mtc1 $v0, $f6 .L8024B4CC: /* 179DAC 8024B4CC 00000000 */ nop /* 179DB0 8024B4D0 468031A0 */ cvt.s.w $f6, $f6 /* 179DB4 8024B4D4 46023182 */ mul.s $f6, $f6, $f2 /* 179DB8 8024B4D8 00000000 */ nop /* 179DBC 8024B4DC C7BE0010 */ lwc1 $f30, 0x10($sp) /* 179DC0 8024B4E0 4602F582 */ mul.s $f22, $f30, $f2 /* 179DC4 8024B4E4 00000000 */ nop /* 179DC8 8024B4E8 46005280 */ add.s $f10, $f10, $f0 D_8024B4EC: /* 179DCC 8024B4EC 3C014380 */ lui $at, (0x43800000 >> 16) .L8024B4F0: /* 179DD0 8024B4F0 44810000 */ mtc1 $at, $f0 /* 179DD4 8024B4F4 00000000 */ nop /* 179DD8 8024B4F8 46005282 */ mul.s $f10, $f10, $f0 D_8024B4FC: /* 179DDC 8024B4FC 00000000 */ nop /* 179DE0 8024B500 C7BE0014 */ lwc1 $f30, 0x14($sp) /* 179DE4 8024B504 3C014200 */ lui $at, (0x42000000 >> 16) /* 179DE8 8024B508 44810000 */ mtc1 $at, $f0 /* 179DEC 8024B50C 00000000 */ nop .L8024B510: /* 179DF0 8024B510 4600F001 */ sub.s $f0, $f30, $f0 /* 179DF4 8024B514 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch) .L8024B518: /* 179DF8 8024B518 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0) /* 179DFC 8024B51C 46006300 */ add.s $f12, $f12, $f0 /* 179E00 8024B520 44820000 */ mtc1 $v0, $f0 /* 179E04 8024B524 00000000 */ nop /* 179E08 8024B528 46800020 */ cvt.s.w $f0, $f0 /* 179E0C 8024B52C 46020002 */ mul.s $f0, $f0, $f2 D_8024B530: /* 179E10 8024B530 00000000 */ nop /* 179E14 8024B534 46026302 */ mul.s $f12, $f12, $f2 /* 179E18 8024B538 00000000 */ nop /* 179E1C 8024B53C 461AA500 */ add.s $f20, $f20, $f26 .L8024B540: /* 179E20 8024B540 46189480 */ add.s $f18, $f18, $f24 /* 179E24 8024B544 46064200 */ add.s $f8, $f8, $f6 /* 179E28 8024B548 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft) .L8024B54C: /* 179E2C 8024B54C 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft) D_8024B550: /* 179E30 8024B550 46168400 */ add.s $f16, $f16, $f22 /* 179E34 8024B554 E6140054 */ swc1 $f20, 0x54($s0) /* 179E38 8024B558 E6120058 */ swc1 $f18, 0x58($s0) /* 179E3C 8024B55C E610005C */ swc1 $f16, 0x5C($s0) /* 179E40 8024B560 46002100 */ add.s $f4, $f4, $f0 /* 179E44 8024B564 4600478D */ trunc.w.s $f30, $f8 /* 179E48 8024B568 4402F000 */ mfc1 $v0, $f30 /* 179E4C 8024B56C 00000000 */ nop /* 179E50 8024B570 A6020024 */ sh $v0, 0x24($s0) /* 179E54 8024B574 460C7380 */ add.s $f14, $f14, $f12 /* 179E58 8024B578 4600278D */ trunc.w.s $f30, $f4 /* 179E5C 8024B57C 4402F000 */ mfc1 $v0, $f30 /* 179E60 8024B580 00000000 */ nop /* 179E64 8024B584 A6020022 */ sh $v0, 0x22($s0) /* 179E68 8024B588 4600778D */ trunc.w.s $f30, $f14 /* 179E6C 8024B58C 4402F000 */ mfc1 $v0, $f30 D_8024B590: /* 179E70 8024B590 00000000 */ nop /* 179E74 8024B594 A602001E */ sh $v0, 0x1E($s0) /* 179E78 8024B598 4600578D */ trunc.w.s $f30, $f10 /* 179E7C 8024B59C 4402F000 */ mfc1 $v0, $f30 D_8024B5A0: /* 179E80 8024B5A0 00000000 */ nop /* 179E84 8024B5A4 A6020026 */ sh $v0, 0x26($s0) /* 179E88 8024B5A8 84820000 */ lh $v0, 0x0($a0) /* 179E8C 8024B5AC 94830000 */ lhu $v1, 0x0($a0) D_8024B5B0: /* 179E90 8024B5B0 14400006 */ bnez $v0, .L8024B5CC D_8024B5B4: /* 179E94 8024B5B4 2462FFFF */ addiu $v0, $v1, -0x1 /* 179E98 8024B5B8 24020001 */ addiu $v0, $zero, 0x1 /* 179E9C 8024B5BC 3C01802A */ lui $at, %hi(BattleCam_DoneMoving) /* 179EA0 8024B5C0 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at) /* 179EA4 8024B5C4 08092D75 */ j .L8024B5D4 /* 179EA8 8024B5C8 0000102D */ daddu $v0, $zero, $zero .L8024B5CC: /* 179EAC 8024B5CC A4820000 */ sh $v0, 0x0($a0) .L8024B5D0: /* 179EB0 8024B5D0 0000102D */ daddu $v0, $zero, $zero .L8024B5D4: /* 179EB4 8024B5D4 8FBF0024 */ lw $ra, 0x24($sp) /* 179EB8 8024B5D8 8FB00020 */ lw $s0, 0x20($sp) /* 179EBC 8024B5DC D7BE0050 */ ldc1 $f30, 0x50($sp) /* 179EC0 8024B5E0 D7BC0048 */ ldc1 $f28, 0x48($sp) D_8024B5E4: /* 179EC4 8024B5E4 D7BA0040 */ ldc1 $f26, 0x40($sp) .L8024B5E8: /* 179EC8 8024B5E8 D7B80038 */ ldc1 $f24, 0x38($sp) /* 179ECC 8024B5EC D7B60030 */ ldc1 $f22, 0x30($sp) /* 179ED0 8024B5F0 D7B40028 */ ldc1 $f20, 0x28($sp) /* 179ED4 8024B5F4 03E00008 */ jr $ra /* 179ED8 8024B5F8 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: s32 CamPresetUpdate_H(Evt* script, s32 isInitialCall) { Actor* actor; Camera* camera = &gCameras[CAM_BATTLE]; BattleStatus* battleStatus = &gBattleStatus; PlayerStatus* playerStatus = &gPlayerStatus; f32 x, y, z; f32 currentX, currentY; f32 averageSize; f32 alpha; f32 extraLength; 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; } currentX = actor->currentPos.x; x = actor->state.goalPos.x; y = actor->state.goalPos.y; z = actor->state.goalPos.z; averageSize = (actor->size.y + actor->size.x) / 2; currentY = actor->currentPos.y + playerStatus->colliderHeight / 2; break; case ACTOR_CLASS_PARTNER: actor = battleStatus->partnerActor; if (actor == NULL) { return ApiStatus_BLOCK; } currentX = actor->currentPos.x; x = actor->state.goalPos.x; y = actor->state.goalPos.y; z = actor->state.goalPos.z; averageSize = (actor->size.y + actor->size.x) / 2; currentY = actor->currentPos.y + actor->size.y / 2; break; case ACTOR_CLASS_ENEMY: actor = battleStatus->enemyActors[actorID]; if (actor == NULL) { return ApiStatus_BLOCK; } currentX = actor->currentPos.x; x = actor->state.goalPos.x; y = actor->state.goalPos.y; z = actor->state.goalPos.z; averageSize = (actor->size.y + actor->size.x) / 2; currentY = actor->currentPos.y + actor->size.y / 2; break; default: return ApiStatus_DONE2; } if (BattleCam_ModeY != BTL_CAM_MODEY_0) { f32 delta = currentY - y; y += delta / 2 + delta / 6.0f; } if (BattleCam_ModeX != BTL_CAM_MODEX_0) { x += (currentX - x) / 2; if (x > 75.0f) { x -= fabsf(75.0f - x); } } if (D_8029F2A6) { f32 upperBound = (500.0f - BattleCam_InitialBoomLength) * 0.4 + 30.0; f32 lowerBound = -upperBound; if (x < lowerBound) { x += (lowerBound - x) / 2; } if (x > upperBound) { x += (upperBound - x) / 2; } } if (isInitialCall) { 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; } camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha); camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha); camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha); camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f; extraLength = averageSize - 32.0f; camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength + extraLength, 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 render_hud_elements_world /* D9DB4 801436B4 27BDFAE0 */ addiu $sp, $sp, -0x520 /* D9DB8 801436B8 AFBF051C */ sw $ra, 0x51C($sp) /* D9DBC 801436BC AFB20518 */ sw $s2, 0x518($sp) /* D9DC0 801436C0 AFB10514 */ sw $s1, 0x514($sp) /* D9DC4 801436C4 AFB00510 */ sw $s0, 0x510($sp) /* D9DC8 801436C8 3C03800A */ lui $v1, %hi(gCurrentCamID) /* D9DCC 801436CC 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* D9DD0 801436D0 24020003 */ addiu $v0, $zero, 0x3 /* D9DD4 801436D4 146200AB */ bne $v1, $v0, .L80143984 /* D9DD8 801436D8 0000902D */ daddu $s2, $zero, $zero /* D9DDC 801436DC 0240882D */ daddu $s1, $s2, $zero /* D9DE0 801436E0 3C091020 */ lui $t1, (0x10200000 >> 16) /* D9DE4 801436E4 3C080001 */ lui $t0, (0x10000 >> 16) /* D9DE8 801436E8 3C074000 */ lui $a3, (0x40000000 >> 16) /* D9DEC 801436EC 3C068015 */ lui $a2, %hi(gHudElements) /* D9DF0 801436F0 8CC67960 */ lw $a2, %lo(gHudElements)($a2) /* D9DF4 801436F4 27A50010 */ addiu $a1, $sp, 0x10 .L801436F8: /* D9DF8 801436F8 8CC40000 */ lw $a0, 0x0($a2) /* D9DFC 801436FC 5080001D */ beql $a0, $zero, .L80143774 /* D9E00 80143700 26310001 */ addiu $s1, $s1, 0x1 /* D9E04 80143704 8C830000 */ lw $v1, 0x0($a0) /* D9E08 80143708 5060001A */ beql $v1, $zero, .L80143774 /* D9E0C 8014370C 26310001 */ addiu $s1, $s1, 0x1 /* D9E10 80143710 30620002 */ andi $v0, $v1, 0x2 /* D9E14 80143714 54400017 */ bnel $v0, $zero, .L80143774 /* D9E18 80143718 26310001 */ addiu $s1, $s1, 0x1 /* D9E1C 8014371C 00691024 */ and $v0, $v1, $t1 /* D9E20 80143720 54400014 */ bnel $v0, $zero, .L80143774 /* D9E24 80143724 26310001 */ addiu $s1, $s1, 0x1 /* D9E28 80143728 00681024 */ and $v0, $v1, $t0 /* D9E2C 8014372C 50400011 */ beql $v0, $zero, .L80143774 /* D9E30 80143730 26310001 */ addiu $s1, $s1, 0x1 /* D9E34 80143734 00671024 */ and $v0, $v1, $a3 /* D9E38 80143738 5440000E */ bnel $v0, $zero, .L80143774 /* D9E3C 8014373C 26310001 */ addiu $s1, $s1, 0x1 /* D9E40 80143740 30620040 */ andi $v0, $v1, 0x40 /* D9E44 80143744 5440000B */ bnel $v0, $zero, .L80143774 /* D9E48 80143748 26310001 */ addiu $s1, $s1, 0x1 /* D9E4C 8014374C 80820045 */ lb $v0, 0x45($a0) /* D9E50 80143750 04420008 */ bltzl $v0, .L80143774 /* D9E54 80143754 26310001 */ addiu $s1, $s1, 0x1 /* D9E58 80143758 30620080 */ andi $v0, $v1, 0x80 /* D9E5C 8014375C 54400005 */ bnel $v0, $zero, .L80143774 /* D9E60 80143760 26310001 */ addiu $s1, $s1, 0x1 /* D9E64 80143764 ACB10000 */ sw $s1, 0x0($a1) /* D9E68 80143768 24A50004 */ addiu $a1, $a1, 0x4 /* D9E6C 8014376C 26520001 */ addiu $s2, $s2, 0x1 /* D9E70 80143770 26310001 */ addiu $s1, $s1, 0x1 .L80143774: /* D9E74 80143774 2A220140 */ slti $v0, $s1, 0x140 /* D9E78 80143778 1440FFDF */ bnez $v0, .L801436F8 /* D9E7C 8014377C 24C60004 */ addiu $a2, $a2, 0x4 /* D9E80 80143780 1240007E */ beqz $s2, .L8014397C /* D9E84 80143784 2642FFFF */ addiu $v0, $s2, -0x1 /* D9E88 80143788 18400024 */ blez $v0, .L8014381C /* D9E8C 8014378C 0000882D */ daddu $s1, $zero, $zero /* D9E90 80143790 3C0C8015 */ lui $t4, %hi(gHudElements) /* D9E94 80143794 258C7960 */ addiu $t4, $t4, %lo(gHudElements) /* D9E98 80143798 27AB0010 */ addiu $t3, $sp, 0x10 /* D9E9C 8014379C 0160502D */ daddu $t2, $t3, $zero .L801437A0: /* D9EA0 801437A0 26240001 */ addiu $a0, $s1, 0x1 /* D9EA4 801437A4 0092102A */ slt $v0, $a0, $s2 /* D9EA8 801437A8 50400018 */ beql $v0, $zero, .L8014380C /* D9EAC 801437AC 26310001 */ addiu $s1, $s1, 0x1 /* D9EB0 801437B0 0140482D */ daddu $t1, $t2, $zero /* D9EB4 801437B4 8D880000 */ lw $t0, 0x0($t4) /* D9EB8 801437B8 00041080 */ sll $v0, $a0, 2 /* D9EBC 801437BC 004B2821 */ addu $a1, $v0, $t3 .L801437C0: /* D9EC0 801437C0 8D270000 */ lw $a3, 0x0($t1) /* D9EC4 801437C4 8CA60000 */ lw $a2, 0x0($a1) /* D9EC8 801437C8 00071080 */ sll $v0, $a3, 2 /* D9ECC 801437CC 00481021 */ addu $v0, $v0, $t0 /* D9ED0 801437D0 8C430000 */ lw $v1, 0x0($v0) /* D9ED4 801437D4 00061080 */ sll $v0, $a2, 2 /* D9ED8 801437D8 00481021 */ addu $v0, $v0, $t0 /* D9EDC 801437DC 8C420000 */ lw $v0, 0x0($v0) /* D9EE0 801437E0 80630044 */ lb $v1, 0x44($v1) /* D9EE4 801437E4 80420044 */ lb $v0, 0x44($v0) /* D9EE8 801437E8 0062182A */ slt $v1, $v1, $v0 /* D9EEC 801437EC 10600003 */ beqz $v1, .L801437FC /* D9EF0 801437F0 24840001 */ addiu $a0, $a0, 0x1 /* D9EF4 801437F4 AD260000 */ sw $a2, 0x0($t1) /* D9EF8 801437F8 ACA70000 */ sw $a3, 0x0($a1) .L801437FC: /* D9EFC 801437FC 0092102A */ slt $v0, $a0, $s2 /* D9F00 80143800 1440FFEF */ bnez $v0, .L801437C0 /* D9F04 80143804 24A50004 */ addiu $a1, $a1, 0x4 /* D9F08 80143808 26310001 */ addiu $s1, $s1, 0x1 .L8014380C: /* D9F0C 8014380C 2642FFFF */ addiu $v0, $s2, -0x1 /* D9F10 80143810 0222102A */ slt $v0, $s1, $v0 /* D9F14 80143814 1440FFE2 */ bnez $v0, .L801437A0 /* D9F18 80143818 254A0004 */ addiu $t2, $t2, 0x4 .L8014381C: /* D9F1C 8014381C 3C06ED03 */ lui $a2, (0xED030050 >> 16) /* D9F20 80143820 34C60050 */ ori $a2, $a2, (0xED030050 & 0xFFFF) /* D9F24 80143824 3C04004D */ lui $a0, (0x4D0370 >> 16) /* D9F28 80143828 34840370 */ ori $a0, $a0, (0x4D0370 & 0xFFFF) /* D9F2C 8014382C 3C07D9C0 */ lui $a3, (0xD9C0F9FA >> 16) /* D9F30 80143830 34E7F9FA */ ori $a3, $a3, (0xD9C0F9FA & 0xFFFF) /* D9F34 80143834 3C09D9FF */ lui $t1, (0xD9FFFFFF >> 16) /* D9F38 80143838 3529FFFF */ ori $t1, $t1, (0xD9FFFFFF & 0xFFFF) /* D9F3C 8014383C 3C080022 */ lui $t0, (0x220005 >> 16) /* D9F40 80143840 35080005 */ ori $t0, $t0, (0x220005 & 0xFFFF) /* D9F44 80143844 3C0ADC08 */ lui $t2, (0xDC08060A >> 16) /* D9F48 80143848 354A060A */ ori $t2, $t2, (0xDC08060A & 0xFFFF) /* D9F4C 8014384C 3C0BDC08 */ lui $t3, (0xDC08090A >> 16) /* D9F50 80143850 356B090A */ ori $t3, $t3, (0xDC08090A & 0xFFFF) /* D9F54 80143854 3C0CD700 */ lui $t4, (0xD7000002 >> 16) /* D9F58 80143858 358C0002 */ ori $t4, $t4, (0xD7000002 & 0xFFFF) /* D9F5C 8014385C 3C0DE200 */ lui $t5, (0xE2001E01 >> 16) /* D9F60 80143860 35AD1E01 */ ori $t5, $t5, (0xE2001E01 & 0xFFFF) /* D9F64 80143864 3C0FE300 */ lui $t7, (0xE3000A11 >> 16) /* D9F68 80143868 35EF0A11 */ ori $t7, $t7, (0xE3000A11 & 0xFFFF) /* D9F6C 8014386C 3C0E0008 */ lui $t6, (0x82CF0 >> 16) /* D9F70 80143870 35CE2CF0 */ ori $t6, $t6, (0x82CF0 & 0xFFFF) /* D9F74 80143874 3C05800A */ lui $a1, %hi(gMainGfxPos) /* D9F78 80143878 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* D9F7C 8014387C 8CA20000 */ lw $v0, 0x0($a1) /* D9F80 80143880 0000882D */ daddu $s1, $zero, $zero /* D9F84 80143884 0040182D */ daddu $v1, $v0, $zero /* D9F88 80143888 24420008 */ addiu $v0, $v0, 0x8 /* D9F8C 8014388C ACA20000 */ sw $v0, 0x0($a1) /* D9F90 80143890 AC660000 */ sw $a2, 0x0($v1) /* D9F94 80143894 AC640004 */ sw $a0, 0x4($v1) /* D9F98 80143898 24430008 */ addiu $v1, $v0, 0x8 /* D9F9C 8014389C ACA30000 */ sw $v1, 0x0($a1) /* D9FA0 801438A0 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* D9FA4 801438A4 AC430000 */ sw $v1, 0x0($v0) /* D9FA8 801438A8 24430010 */ addiu $v1, $v0, 0x10 /* D9FAC 801438AC AC400004 */ sw $zero, 0x4($v0) /* D9FB0 801438B0 ACA30000 */ sw $v1, 0x0($a1) /* D9FB4 801438B4 24430018 */ addiu $v1, $v0, 0x18 /* D9FB8 801438B8 AC470008 */ sw $a3, 0x8($v0) /* D9FBC 801438BC AC40000C */ sw $zero, 0xC($v0) /* D9FC0 801438C0 ACA30000 */ sw $v1, 0x0($a1) /* D9FC4 801438C4 24430020 */ addiu $v1, $v0, 0x20 /* D9FC8 801438C8 AC490010 */ sw $t1, 0x10($v0) /* D9FCC 801438CC AC480014 */ sw $t0, 0x14($v0) /* D9FD0 801438D0 ACA30000 */ sw $v1, 0x0($a1) /* D9FD4 801438D4 3C03DB02 */ lui $v1, (0xDB020000 >> 16) /* D9FD8 801438D8 AC430018 */ sw $v1, 0x18($v0) /* D9FDC 801438DC 24030018 */ addiu $v1, $zero, 0x18 /* D9FE0 801438E0 AC43001C */ sw $v1, 0x1C($v0) /* D9FE4 801438E4 24430028 */ addiu $v1, $v0, 0x28 /* D9FE8 801438E8 3C048015 */ lui $a0, %hi(D_8014F110) /* D9FEC 801438EC 2484F110 */ addiu $a0, $a0, %lo(D_8014F110) /* D9FF0 801438F0 ACA30000 */ sw $v1, 0x0($a1) /* D9FF4 801438F4 24430030 */ addiu $v1, $v0, 0x30 /* D9FF8 801438F8 AC440024 */ sw $a0, 0x24($v0) /* D9FFC 801438FC 2484FFF8 */ addiu $a0, $a0, -0x8 /* DA000 80143900 AC4A0020 */ sw $t2, 0x20($v0) /* DA004 80143904 ACA30000 */ sw $v1, 0x0($a1) /* DA008 80143908 24430038 */ addiu $v1, $v0, 0x38 /* DA00C 8014390C AC4B0028 */ sw $t3, 0x28($v0) /* DA010 80143910 AC44002C */ sw $a0, 0x2C($v0) /* DA014 80143914 ACA30000 */ sw $v1, 0x0($a1) /* DA018 80143918 2403FFFF */ addiu $v1, $zero, -0x1 /* DA01C 8014391C AC430034 */ sw $v1, 0x34($v0) /* DA020 80143920 24430040 */ addiu $v1, $v0, 0x40 /* DA024 80143924 AC4C0030 */ sw $t4, 0x30($v0) /* DA028 80143928 ACA30000 */ sw $v1, 0x0($a1) /* DA02C 8014392C 24430048 */ addiu $v1, $v0, 0x48 /* DA030 80143930 AC4D0038 */ sw $t5, 0x38($v0) /* DA034 80143934 AC40003C */ sw $zero, 0x3C($v0) /* DA038 80143938 ACA30000 */ sw $v1, 0x0($a1) /* DA03C 8014393C AC4F0040 */ sw $t7, 0x40($v0) /* DA040 80143940 1A40000E */ blez $s2, .L8014397C /* DA044 80143944 AC4E0044 */ sw $t6, 0x44($v0) /* DA048 80143948 27B00010 */ addiu $s0, $sp, 0x10 .L8014394C: /* DA04C 8014394C 8E020000 */ lw $v0, 0x0($s0) /* DA050 80143950 26100004 */ addiu $s0, $s0, 0x4 /* DA054 80143954 3C038015 */ lui $v1, %hi(gHudElements) /* DA058 80143958 8C637960 */ lw $v1, %lo(gHudElements)($v1) /* DA05C 8014395C 00021080 */ sll $v0, $v0, 2 /* DA060 80143960 00431021 */ addu $v0, $v0, $v1 /* DA064 80143964 8C440000 */ lw $a0, 0x0($v0) /* DA068 80143968 0C050AFF */ jal render_hud_element /* DA06C 8014396C 26310001 */ addiu $s1, $s1, 0x1 /* DA070 80143970 0232102A */ slt $v0, $s1, $s2 /* DA074 80143974 1440FFF5 */ bnez $v0, .L8014394C /* DA078 80143978 00000000 */ nop .L8014397C: /* DA07C 8014397C 3C03800A */ lui $v1, %hi(gCurrentCamID) /* DA080 80143980 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) .L80143984: /* DA084 80143984 24020001 */ addiu $v0, $zero, 0x1 /* DA088 80143988 146200A9 */ bne $v1, $v0, .L80143C30 /* DA08C 8014398C 0000902D */ daddu $s2, $zero, $zero /* DA090 80143990 0240882D */ daddu $s1, $s2, $zero /* DA094 80143994 3C091020 */ lui $t1, (0x10200000 >> 16) /* DA098 80143998 3C080001 */ lui $t0, (0x10000 >> 16) /* DA09C 8014399C 3C074000 */ lui $a3, (0x40000000 >> 16) /* DA0A0 801439A0 3C068015 */ lui $a2, %hi(gHudElements) /* DA0A4 801439A4 8CC67960 */ lw $a2, %lo(gHudElements)($a2) /* DA0A8 801439A8 27A50010 */ addiu $a1, $sp, 0x10 .L801439AC: /* DA0AC 801439AC 8CC40000 */ lw $a0, 0x0($a2) /* DA0B0 801439B0 5080001D */ beql $a0, $zero, .L80143A28 /* DA0B4 801439B4 26310001 */ addiu $s1, $s1, 0x1 /* DA0B8 801439B8 8C830000 */ lw $v1, 0x0($a0) /* DA0BC 801439BC 5060001A */ beql $v1, $zero, .L80143A28 /* DA0C0 801439C0 26310001 */ addiu $s1, $s1, 0x1 /* DA0C4 801439C4 30620002 */ andi $v0, $v1, 0x2 /* DA0C8 801439C8 54400017 */ bnel $v0, $zero, .L80143A28 /* DA0CC 801439CC 26310001 */ addiu $s1, $s1, 0x1 /* DA0D0 801439D0 00691024 */ and $v0, $v1, $t1 /* DA0D4 801439D4 54400014 */ bnel $v0, $zero, .L80143A28 /* DA0D8 801439D8 26310001 */ addiu $s1, $s1, 0x1 /* DA0DC 801439DC 00681024 */ and $v0, $v1, $t0 /* DA0E0 801439E0 50400011 */ beql $v0, $zero, .L80143A28 /* DA0E4 801439E4 26310001 */ addiu $s1, $s1, 0x1 /* DA0E8 801439E8 00671024 */ and $v0, $v1, $a3 /* DA0EC 801439EC 5040000E */ beql $v0, $zero, .L80143A28 /* DA0F0 801439F0 26310001 */ addiu $s1, $s1, 0x1 /* DA0F4 801439F4 30620040 */ andi $v0, $v1, 0x40 /* DA0F8 801439F8 5440000B */ bnel $v0, $zero, .L80143A28 /* DA0FC 801439FC 26310001 */ addiu $s1, $s1, 0x1 /* DA100 80143A00 80820045 */ lb $v0, 0x45($a0) /* DA104 80143A04 04420008 */ bltzl $v0, .L80143A28 /* DA108 80143A08 26310001 */ addiu $s1, $s1, 0x1 /* DA10C 80143A0C 30620080 */ andi $v0, $v1, 0x80 /* DA110 80143A10 54400005 */ bnel $v0, $zero, .L80143A28 /* DA114 80143A14 26310001 */ addiu $s1, $s1, 0x1 /* DA118 80143A18 ACB10000 */ sw $s1, 0x0($a1) /* DA11C 80143A1C 24A50004 */ addiu $a1, $a1, 0x4 /* DA120 80143A20 26520001 */ addiu $s2, $s2, 0x1 /* DA124 80143A24 26310001 */ addiu $s1, $s1, 0x1 .L80143A28: /* DA128 80143A28 2A220140 */ slti $v0, $s1, 0x140 /* DA12C 80143A2C 1440FFDF */ bnez $v0, .L801439AC /* DA130 80143A30 24C60004 */ addiu $a2, $a2, 0x4 /* DA134 80143A34 1240007E */ beqz $s2, .L80143C30 /* DA138 80143A38 2642FFFF */ addiu $v0, $s2, -0x1 /* DA13C 80143A3C 18400024 */ blez $v0, .L80143AD0 /* DA140 80143A40 0000882D */ daddu $s1, $zero, $zero /* DA144 80143A44 3C0C8015 */ lui $t4, %hi(gHudElements) /* DA148 80143A48 258C7960 */ addiu $t4, $t4, %lo(gHudElements) /* DA14C 80143A4C 27AB0010 */ addiu $t3, $sp, 0x10 /* DA150 80143A50 0160502D */ daddu $t2, $t3, $zero .L80143A54: /* DA154 80143A54 26240001 */ addiu $a0, $s1, 0x1 /* DA158 80143A58 0092102A */ slt $v0, $a0, $s2 /* DA15C 80143A5C 50400018 */ beql $v0, $zero, .L80143AC0 /* DA160 80143A60 26310001 */ addiu $s1, $s1, 0x1 /* DA164 80143A64 0140482D */ daddu $t1, $t2, $zero /* DA168 80143A68 8D880000 */ lw $t0, 0x0($t4) /* DA16C 80143A6C 00041080 */ sll $v0, $a0, 2 /* DA170 80143A70 004B2821 */ addu $a1, $v0, $t3 .L80143A74: /* DA174 80143A74 8D270000 */ lw $a3, 0x0($t1) /* DA178 80143A78 8CA60000 */ lw $a2, 0x0($a1) /* DA17C 80143A7C 00071080 */ sll $v0, $a3, 2 /* DA180 80143A80 00481021 */ addu $v0, $v0, $t0 /* DA184 80143A84 8C430000 */ lw $v1, 0x0($v0) /* DA188 80143A88 00061080 */ sll $v0, $a2, 2 /* DA18C 80143A8C 00481021 */ addu $v0, $v0, $t0 /* DA190 80143A90 8C420000 */ lw $v0, 0x0($v0) /* DA194 80143A94 80630044 */ lb $v1, 0x44($v1) /* DA198 80143A98 80420044 */ lb $v0, 0x44($v0) /* DA19C 80143A9C 0062182A */ slt $v1, $v1, $v0 /* DA1A0 80143AA0 10600003 */ beqz $v1, .L80143AB0 /* DA1A4 80143AA4 24840001 */ addiu $a0, $a0, 0x1 /* DA1A8 80143AA8 AD260000 */ sw $a2, 0x0($t1) /* DA1AC 80143AAC ACA70000 */ sw $a3, 0x0($a1) .L80143AB0: /* DA1B0 80143AB0 0092102A */ slt $v0, $a0, $s2 /* DA1B4 80143AB4 1440FFEF */ bnez $v0, .L80143A74 /* DA1B8 80143AB8 24A50004 */ addiu $a1, $a1, 0x4 /* DA1BC 80143ABC 26310001 */ addiu $s1, $s1, 0x1 .L80143AC0: /* DA1C0 80143AC0 2642FFFF */ addiu $v0, $s2, -0x1 /* DA1C4 80143AC4 0222102A */ slt $v0, $s1, $v0 /* DA1C8 80143AC8 1440FFE2 */ bnez $v0, .L80143A54 /* DA1CC 80143ACC 254A0004 */ addiu $t2, $t2, 0x4 .L80143AD0: /* DA1D0 80143AD0 3C06ED03 */ lui $a2, (0xED030050 >> 16) /* DA1D4 80143AD4 34C60050 */ ori $a2, $a2, (0xED030050 & 0xFFFF) /* DA1D8 80143AD8 3C04004D */ lui $a0, (0x4D0370 >> 16) /* DA1DC 80143ADC 34840370 */ ori $a0, $a0, (0x4D0370 & 0xFFFF) /* DA1E0 80143AE0 3C07D9C0 */ lui $a3, (0xD9C0F9FA >> 16) /* DA1E4 80143AE4 34E7F9FA */ ori $a3, $a3, (0xD9C0F9FA & 0xFFFF) /* DA1E8 80143AE8 3C09D9FF */ lui $t1, (0xD9FFFFFF >> 16) /* DA1EC 80143AEC 3529FFFF */ ori $t1, $t1, (0xD9FFFFFF & 0xFFFF) /* DA1F0 80143AF0 3C080022 */ lui $t0, (0x220005 >> 16) /* DA1F4 80143AF4 35080005 */ ori $t0, $t0, (0x220005 & 0xFFFF) /* DA1F8 80143AF8 3C0ADC08 */ lui $t2, (0xDC08060A >> 16) /* DA1FC 80143AFC 354A060A */ ori $t2, $t2, (0xDC08060A & 0xFFFF) /* DA200 80143B00 3C0BDC08 */ lui $t3, (0xDC08090A >> 16) /* DA204 80143B04 356B090A */ ori $t3, $t3, (0xDC08090A & 0xFFFF) /* DA208 80143B08 3C0CD700 */ lui $t4, (0xD7000002 >> 16) /* DA20C 80143B0C 358C0002 */ ori $t4, $t4, (0xD7000002 & 0xFFFF) /* DA210 80143B10 3C0DE200 */ lui $t5, (0xE2001E01 >> 16) /* DA214 80143B14 35AD1E01 */ ori $t5, $t5, (0xE2001E01 & 0xFFFF) /* DA218 80143B18 3C0FE300 */ lui $t7, (0xE3000A11 >> 16) /* DA21C 80143B1C 35EF0A11 */ ori $t7, $t7, (0xE3000A11 & 0xFFFF) /* DA220 80143B20 3C0E0008 */ lui $t6, (0x82CF0 >> 16) /* DA224 80143B24 35CE2CF0 */ ori $t6, $t6, (0x82CF0 & 0xFFFF) /* DA228 80143B28 3C05800A */ lui $a1, %hi(gMainGfxPos) /* DA22C 80143B2C 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* DA230 80143B30 8CA20000 */ lw $v0, 0x0($a1) /* DA234 80143B34 0000882D */ daddu $s1, $zero, $zero /* DA238 80143B38 0040182D */ daddu $v1, $v0, $zero /* DA23C 80143B3C 24420008 */ addiu $v0, $v0, 0x8 /* DA240 80143B40 ACA20000 */ sw $v0, 0x0($a1) /* DA244 80143B44 AC660000 */ sw $a2, 0x0($v1) /* DA248 80143B48 AC640004 */ sw $a0, 0x4($v1) /* DA24C 80143B4C 24430008 */ addiu $v1, $v0, 0x8 /* DA250 80143B50 ACA30000 */ sw $v1, 0x0($a1) /* DA254 80143B54 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* DA258 80143B58 AC430000 */ sw $v1, 0x0($v0) /* DA25C 80143B5C 24430010 */ addiu $v1, $v0, 0x10 /* DA260 80143B60 AC400004 */ sw $zero, 0x4($v0) /* DA264 80143B64 ACA30000 */ sw $v1, 0x0($a1) /* DA268 80143B68 24430018 */ addiu $v1, $v0, 0x18 /* DA26C 80143B6C AC470008 */ sw $a3, 0x8($v0) /* DA270 80143B70 AC40000C */ sw $zero, 0xC($v0) /* DA274 80143B74 ACA30000 */ sw $v1, 0x0($a1) /* DA278 80143B78 24430020 */ addiu $v1, $v0, 0x20 /* DA27C 80143B7C AC490010 */ sw $t1, 0x10($v0) /* DA280 80143B80 AC480014 */ sw $t0, 0x14($v0) /* DA284 80143B84 ACA30000 */ sw $v1, 0x0($a1) /* DA288 80143B88 3C03DB02 */ lui $v1, (0xDB020000 >> 16) /* DA28C 80143B8C AC430018 */ sw $v1, 0x18($v0) /* DA290 80143B90 24030018 */ addiu $v1, $zero, 0x18 /* DA294 80143B94 AC43001C */ sw $v1, 0x1C($v0) /* DA298 80143B98 24430028 */ addiu $v1, $v0, 0x28 /* DA29C 80143B9C 3C048015 */ lui $a0, %hi(D_8014F110) /* DA2A0 80143BA0 2484F110 */ addiu $a0, $a0, %lo(D_8014F110) /* DA2A4 80143BA4 ACA30000 */ sw $v1, 0x0($a1) /* DA2A8 80143BA8 24430030 */ addiu $v1, $v0, 0x30 /* DA2AC 80143BAC AC440024 */ sw $a0, 0x24($v0) /* DA2B0 80143BB0 2484FFF8 */ addiu $a0, $a0, -0x8 /* DA2B4 80143BB4 AC4A0020 */ sw $t2, 0x20($v0) /* DA2B8 80143BB8 ACA30000 */ sw $v1, 0x0($a1) /* DA2BC 80143BBC 24430038 */ addiu $v1, $v0, 0x38 /* DA2C0 80143BC0 AC4B0028 */ sw $t3, 0x28($v0) /* DA2C4 80143BC4 AC44002C */ sw $a0, 0x2C($v0) /* DA2C8 80143BC8 ACA30000 */ sw $v1, 0x0($a1) /* DA2CC 80143BCC 2403FFFF */ addiu $v1, $zero, -0x1 /* DA2D0 80143BD0 AC430034 */ sw $v1, 0x34($v0) /* DA2D4 80143BD4 24430040 */ addiu $v1, $v0, 0x40 /* DA2D8 80143BD8 AC4C0030 */ sw $t4, 0x30($v0) /* DA2DC 80143BDC ACA30000 */ sw $v1, 0x0($a1) /* DA2E0 80143BE0 24430048 */ addiu $v1, $v0, 0x48 /* DA2E4 80143BE4 AC4D0038 */ sw $t5, 0x38($v0) /* DA2E8 80143BE8 AC40003C */ sw $zero, 0x3C($v0) /* DA2EC 80143BEC ACA30000 */ sw $v1, 0x0($a1) /* DA2F0 80143BF0 AC4F0040 */ sw $t7, 0x40($v0) /* DA2F4 80143BF4 1A40000E */ blez $s2, .L80143C30 /* DA2F8 80143BF8 AC4E0044 */ sw $t6, 0x44($v0) /* DA2FC 80143BFC 27B00010 */ addiu $s0, $sp, 0x10 .L80143C00: /* DA300 80143C00 8E020000 */ lw $v0, 0x0($s0) /* DA304 80143C04 26100004 */ addiu $s0, $s0, 0x4 /* DA308 80143C08 3C038015 */ lui $v1, %hi(gHudElements) /* DA30C 80143C0C 8C637960 */ lw $v1, %lo(gHudElements)($v1) /* DA310 80143C10 00021080 */ sll $v0, $v0, 2 /* DA314 80143C14 00431021 */ addu $v0, $v0, $v1 /* DA318 80143C18 8C440000 */ lw $a0, 0x0($v0) /* DA31C 80143C1C 0C050AFF */ jal render_hud_element /* DA320 80143C20 26310001 */ addiu $s1, $s1, 0x1 /* DA324 80143C24 0232102A */ slt $v0, $s1, $s2 /* DA328 80143C28 1440FFF5 */ bnez $v0, .L80143C00 /* DA32C 80143C2C 00000000 */ nop .L80143C30: /* DA330 80143C30 8FBF051C */ lw $ra, 0x51C($sp) /* DA334 80143C34 8FB20518 */ lw $s2, 0x518($sp) /* DA338 80143C38 8FB10514 */ lw $s1, 0x514($sp) /* DA33C 80143C3C 8FB00510 */ lw $s0, 0x510($sp) /* DA340 80143C40 03E00008 */ jr $ra /* DA344 80143C44 27BD0520 */ addiu $sp, $sp, 0x520 ### DECOMPILED C INSTRUCTIONS: void render_hud_elements_world(void) { s32 i, count, j; s32 sortedElements[ARRAY_COUNT(*gHudElements)]; s32 el1, el2; HudElement* hudElement; s16 tempOffsetZ; // TODO fix this terrible match do { do { count = 0; if (gCurrentCamID == CAM_3) { 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_200000 | HUD_ELEMENT_FLAG_10000000))) { if (flags & HUD_ELEMENT_FLAG_TRANSFORM) { if (!(flags & HUD_ELEMENT_FLAG_40000000)) { if (!(flags & HUD_ELEMENT_FLAG_FRONTUI) && hudElement->drawSizePreset >= 0 && !(flags & HUD_ELEMENT_FLAG_80)) { sortedElements[count++] = i; } } } } } } } if (count != 0) { for (i = 0; i < count - 1; i++) { for (j = i + 1; j < count; j++) { el1 = sortedElements[i]; el2 = sortedElements[j]; tempOffsetZ = (*gHudElements)[el1]->worldPosOffset.z; do {} while (0); if (tempOffsetZ < (*gHudElements)[el2]->worldPosOffset.z) { sortedElements[i] = el2; sortedElements[j] = el1; } } } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220); 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_8014F108); 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); for (i = 0; i < count; i++) { render_hud_element((*gHudElements)[sortedElements[i]]); } } } count = 0; if (gCurrentCamID == CAM_BATTLE) { 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_200000 | HUD_ELEMENT_FLAG_10000000))) { if (flags & HUD_ELEMENT_FLAG_TRANSFORM) { if (flags & HUD_ELEMENT_FLAG_40000000) { if (!(flags & HUD_ELEMENT_FLAG_FRONTUI) && hudElement->drawSizePreset >= 0 && !(flags & HUD_ELEMENT_FLAG_80)) { sortedElements[count++] = i; } } } } } } } if (count != 0) { for (i = 0; i < count - 1; i++) { for (j = i + 1; j < count; j++) { el1 = sortedElements[i]; el2 = sortedElements[j]; tempOffsetZ = (*gHudElements)[el1]->worldPosOffset.z; do {} while (0); if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) { sortedElements[i] = el2; sortedElements[j] = el1; } } } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220); 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_8014F108); 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); for (i = 0; i < count; i++) { render_hud_element((*gHudElements)[sortedElements[i]]); } } } } while (0); } while (0); }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_HiddenPanel_flip_over /* 107DF4 802E6574 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 107DF8 802E6578 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 107DFC 802E657C 3C014234 */ lui $at, (0x42340000 >> 16) /* 107E00 802E6580 44816000 */ mtc1 $at, $f12 /* 107E04 802E6584 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 107E08 802E6588 AFB1001C */ sw $s1, 0x1C($sp) /* 107E0C 802E658C 0080882D */ daddu $s1, $a0, $zero /* 107E10 802E6590 AFBF0024 */ sw $ra, 0x24($sp) /* 107E14 802E6594 AFB20020 */ sw $s2, 0x20($sp) /* 107E18 802E6598 AFB00018 */ sw $s0, 0x18($sp) /* 107E1C 802E659C F7B60030 */ sdc1 $f22, 0x30($sp) /* 107E20 802E65A0 F7B40028 */ sdc1 $f20, 0x28($sp) /* 107E24 802E65A4 8E300040 */ lw $s0, 0x40($s1) /* 107E28 802E65A8 0C00A6C9 */ jal clamp_angle /* 107E2C 802E65AC 460C0300 */ add.s $f12, $f0, $f12 /* 107E30 802E65B0 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 107E34 802E65B4 44811000 */ mtc1 $at, $f2 /* 107E38 802E65B8 46000106 */ mov.s $f4, $f0 /* 107E3C 802E65BC 4602203C */ c.lt.s $f4, $f2 /* 107E40 802E65C0 00000000 */ nop /* 107E44 802E65C4 4501000F */ bc1t .L802E6604 /* 107E48 802E65C8 00000000 */ nop /* 107E4C 802E65CC 3C014334 */ lui $at, (0x43340000 >> 16) /* 107E50 802E65D0 44810000 */ mtc1 $at, $f0 /* 107E54 802E65D4 00000000 */ nop /* 107E58 802E65D8 4604003E */ c.le.s $f0, $f4 /* 107E5C 802E65DC 00000000 */ nop /* 107E60 802E65E0 4500000B */ bc1f .L802E6610 /* 107E64 802E65E4 00000000 */ nop /* 107E68 802E65E8 3C014387 */ lui $at, (0x43870000 >> 16) /* 107E6C 802E65EC 44810000 */ mtc1 $at, $f0 /* 107E70 802E65F0 00000000 */ nop /* 107E74 802E65F4 4600203C */ c.lt.s $f4, $f0 /* 107E78 802E65F8 00000000 */ nop /* 107E7C 802E65FC 45000004 */ bc1f .L802E6610 /* 107E80 802E6600 00000000 */ nop .L802E6604: /* 107E84 802E6604 C6340068 */ lwc1 $f20, 0x68($s1) /* 107E88 802E6608 080B9986 */ j .L802E6618 /* 107E8C 802E660C 24120001 */ addiu $s2, $zero, 0x1 .L802E6610: /* 107E90 802E6610 C6340060 */ lwc1 $f20, 0x60($s1) /* 107E94 802E6614 0000902D */ daddu $s2, $zero, $zero .L802E6618: /* 107E98 802E6618 82030000 */ lb $v1, 0x0($s0) /* 107E9C 802E661C 2C62000D */ sltiu $v0, $v1, 0xD /* 107EA0 802E6620 1040012C */ beqz $v0, .L802E6AD4 /* 107EA4 802E6624 00031080 */ sll $v0, $v1, 2 /* 107EA8 802E6628 3C01802F */ lui $at, %hi(jtbl_802EB2B0) /* 107EAC 802E662C 00220821 */ addu $at, $at, $v0 /* 107EB0 802E6630 8C22B2B0 */ lw $v0, %lo(jtbl_802EB2B0)($at) /* 107EB4 802E6634 00400008 */ jr $v0 /* 107EB8 802E6638 00000000 */ nop glabel .L802E663C /* 107EBC 802E663C 0C05272D */ jal sfx_play_sound /* 107EC0 802E6640 240420AB */ addiu $a0, $zero, 0x20AB /* 107EC4 802E6644 24040001 */ addiu $a0, $zero, 0x1 /* 107EC8 802E6648 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 107ECC 802E664C 44810000 */ mtc1 $at, $f0 /* 107ED0 802E6650 3C014282 */ lui $at, (0x42820000 >> 16) /* 107ED4 802E6654 44811000 */ mtc1 $at, $f2 /* 107ED8 802E6658 0080102D */ daddu $v0, $a0, $zero /* 107EDC 802E665C A2020000 */ sb $v0, 0x0($s0) /* 107EE0 802E6660 A2020002 */ sb $v0, 0x2($s0) /* 107EE4 802E6664 E600002C */ swc1 $f0, 0x2C($s0) /* 107EE8 802E6668 0C009C22 */ jal set_time_freeze_mode /* 107EEC 802E666C E6020030 */ swc1 $f2, 0x30($s0) /* 107EF0 802E6670 0C038045 */ jal disable_player_static_collisions /* 107EF4 802E6674 00000000 */ nop /* 107EF8 802E6678 3C03800F */ lui $v1, %hi(gPlayerStatusPtr) /* 107EFC 802E667C 8C637B30 */ lw $v1, %lo(gPlayerStatusPtr)($v1) /* 107F00 802E6680 8C620004 */ lw $v0, 0x4($v1) /* 107F04 802E6684 34420800 */ ori $v0, $v0, 0x800 /* 107F08 802E6688 AC620004 */ sw $v0, 0x4($v1) /* 107F0C 802E668C 82020003 */ lb $v0, 0x3($s0) /* 107F10 802E6690 10400013 */ beqz $v0, .L802E66E0 /* 107F14 802E6694 24020005 */ addiu $v0, $zero, 0x5 /* 107F18 802E6698 A2000003 */ sb $zero, 0x3($s0) /* 107F1C 802E669C C620004C */ lwc1 $f0, 0x4C($s1) /* 107F20 802E66A0 AFA20010 */ sw $v0, 0x10($sp) /* 107F24 802E66A4 96020006 */ lhu $v0, 0x6($s0) /* 107F28 802E66A8 3C014000 */ lui $at, (0x40000000 >> 16) /* 107F2C 802E66AC 44811800 */ mtc1 $at, $f3 /* 107F30 802E66B0 44801000 */ mtc1 $zero, $f2 /* 107F34 802E66B4 46000021 */ cvt.d.s $f0, $f0 /* 107F38 802E66B8 46220000 */ add.d $f0, $f0, $f2 /* 107F3C 802E66BC AFA20014 */ sw $v0, 0x14($sp) /* 107F40 802E66C0 8E040010 */ lw $a0, 0x10($s0) /* 107F44 802E66C4 8E250048 */ lw $a1, 0x48($s1) /* 107F48 802E66C8 8E270050 */ lw $a3, 0x50($s1) /* 107F4C 802E66CC 46200020 */ cvt.s.d $f0, $f0 /* 107F50 802E66D0 44060000 */ mfc1 $a2, $f0 /* 107F54 802E66D4 0C04C6A5 */ jal make_item_entity_nodelay /* 107F58 802E66D8 00000000 */ nop /* 107F5C 802E66DC AE020014 */ sw $v0, 0x14($s0) .L802E66E0: /* 107F60 802E66E0 8E220000 */ lw $v0, 0x0($s1) /* 107F64 802E66E4 2403FFFE */ addiu $v1, $zero, -0x2 /* 107F68 802E66E8 00431024 */ and $v0, $v0, $v1 /* 107F6C 802E66EC 080B9AB5 */ j .L802E6AD4 /* 107F70 802E66F0 AE220000 */ sw $v0, 0x0($s1) glabel .L802E66F4 /* 107F74 802E66F4 C60C002C */ lwc1 $f12, 0x2C($s0) /* 107F78 802E66F8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 107F7C 802E66FC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 107F80 802E6700 44810000 */ mtc1 $at, $f0 /* 107F84 802E6704 00000000 */ nop /* 107F88 802E6708 46006302 */ mul.s $f12, $f12, $f0 /* 107F8C 802E670C 00000000 */ nop /* 107F90 802E6710 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 107F94 802E6714 4481B000 */ mtc1 $at, $f22 /* 107F98 802E6718 0C00A85B */ jal sin_rad /* 107F9C 802E671C 46166303 */ div.s $f12, $f12, $f22 /* 107FA0 802E6720 C6020028 */ lwc1 $f2, 0x28($s0) /* 107FA4 802E6724 46001082 */ mul.s $f2, $f2, $f0 /* 107FA8 802E6728 00000000 */ nop /* 107FAC 802E672C C620004C */ lwc1 $f0, 0x4C($s1) /* 107FB0 802E6730 46020000 */ add.s $f0, $f0, $f2 /* 107FB4 802E6734 E620004C */ swc1 $f0, 0x4C($s1) /* 107FB8 802E6738 C6020024 */ lwc1 $f2, 0x24($s0) /* 107FBC 802E673C 4602003E */ c.le.s $f0, $f2 /* 107FC0 802E6740 00000000 */ nop /* 107FC4 802E6744 45000006 */ bc1f .L802E6760 /* 107FC8 802E6748 2402000A */ addiu $v0, $zero, 0xA /* 107FCC 802E674C AE200068 */ sw $zero, 0x68($s1) /* 107FD0 802E6750 C6340068 */ lwc1 $f20, 0x68($s1) /* 107FD4 802E6754 E622004C */ swc1 $f2, 0x4C($s1) /* 107FD8 802E6758 AE200060 */ sw $zero, 0x60($s1) /* 107FDC 802E675C A2020001 */ sb $v0, 0x1($s0) .L802E6760: /* 107FE0 802E6760 C600002C */ lwc1 $f0, 0x2C($s0) /* 107FE4 802E6764 3C014120 */ lui $at, (0x41200000 >> 16) /* 107FE8 802E6768 44811000 */ mtc1 $at, $f2 /* 107FEC 802E676C 00000000 */ nop /* 107FF0 802E6770 46020000 */ add.s $f0, $f0, $f2 /* 107FF4 802E6774 3C014334 */ lui $at, (0x43340000 >> 16) /* 107FF8 802E6778 44811000 */ mtc1 $at, $f2 /* 107FFC 802E677C 00000000 */ nop /* 108000 802E6780 4600103E */ c.le.s $f2, $f0 /* 108004 802E6784 00000000 */ nop /* 108008 802E6788 45000007 */ bc1f .L802E67A8 /* 10800C 802E678C E600002C */ swc1 $f0, 0x2C($s0) /* 108010 802E6790 92020000 */ lbu $v0, 0x0($s0) /* 108014 802E6794 24030007 */ addiu $v1, $zero, 0x7 /* 108018 802E6798 E602002C */ swc1 $f2, 0x2C($s0) /* 10801C 802E679C A2030001 */ sb $v1, 0x1($s0) /* 108020 802E67A0 24420001 */ addiu $v0, $v0, 0x1 /* 108024 802E67A4 A2020000 */ sb $v0, 0x0($s0) .L802E67A8: /* 108028 802E67A8 C602002C */ lwc1 $f2, 0x2C($s0) /* 10802C 802E67AC 3C0142DC */ lui $at, (0x42DC0000 >> 16) /* 108030 802E67B0 44810000 */ mtc1 $at, $f0 /* 108034 802E67B4 00000000 */ nop /* 108038 802E67B8 4602003C */ c.lt.s $f0, $f2 /* 10803C 802E67BC 00000000 */ nop /* 108040 802E67C0 450000C4 */ bc1f .L802E6AD4 /* 108044 802E67C4 00000000 */ nop /* 108048 802E67C8 C6000030 */ lwc1 $f0, 0x30($s0) /* 10804C 802E67CC 4600A500 */ add.s $f20, $f20, $f0 /* 108050 802E67D0 4614B03E */ c.le.s $f22, $f20 /* 108054 802E67D4 00000000 */ nop /* 108058 802E67D8 450300BE */ bc1tl .L802E6AD4 /* 10805C 802E67DC 4616A501 */ sub.s $f20, $f20, $f22 /* 108060 802E67E0 080B9AB5 */ j .L802E6AD4 /* 108064 802E67E4 00000000 */ nop glabel .L802E67E8 /* 108068 802E67E8 C6000030 */ lwc1 $f0, 0x30($s0) /* 10806C 802E67EC 3C014000 */ lui $at, (0x40000000 >> 16) /* 108070 802E67F0 44811000 */ mtc1 $at, $f2 /* 108074 802E67F4 00000000 */ nop /* 108078 802E67F8 46020001 */ sub.s $f0, $f0, $f2 /* 10807C 802E67FC 44801000 */ mtc1 $zero, $f2 /* 108080 802E6800 00000000 */ nop /* 108084 802E6804 4602003E */ c.le.s $f0, $f2 /* 108088 802E6808 00000000 */ nop /* 10808C 802E680C 45000002 */ bc1f .L802E6818 /* 108090 802E6810 E6000030 */ swc1 $f0, 0x30($s0) /* 108094 802E6814 E6020030 */ swc1 $f2, 0x30($s0) .L802E6818: /* 108098 802E6818 C6000030 */ lwc1 $f0, 0x30($s0) /* 10809C 802E681C 4600A500 */ add.s $f20, $f20, $f0 /* 1080A0 802E6820 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 1080A4 802E6824 44810000 */ mtc1 $at, $f0 /* 1080A8 802E6828 00000000 */ nop /* 1080AC 802E682C 4614003E */ c.le.s $f0, $f20 /* 1080B0 802E6830 00000000 */ nop /* 1080B4 802E6834 45030001 */ bc1tl .L802E683C /* 1080B8 802E6838 4600A501 */ sub.s $f20, $f20, $f0 .L802E683C: /* 1080BC 802E683C 92020001 */ lbu $v0, 0x1($s0) /* 1080C0 802E6840 2442FFFF */ addiu $v0, $v0, -0x1 /* 1080C4 802E6844 A2020001 */ sb $v0, 0x1($s0) /* 1080C8 802E6848 00021600 */ sll $v0, $v0, 24 /* 1080CC 802E684C 1840004B */ blez $v0, .L802E697C /* 1080D0 802E6850 00000000 */ nop /* 1080D4 802E6854 080B9AB5 */ j .L802E6AD4 /* 1080D8 802E6858 00000000 */ nop glabel .L802E685C /* 1080DC 802E685C C6000030 */ lwc1 $f0, 0x30($s0) /* 1080E0 802E6860 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 1080E4 802E6864 44811000 */ mtc1 $at, $f2 /* 1080E8 802E6868 00000000 */ nop /* 1080EC 802E686C 46020001 */ sub.s $f0, $f0, $f2 /* 1080F0 802E6870 4480B000 */ mtc1 $zero, $f22 /* 1080F4 802E6874 00000000 */ nop /* 1080F8 802E6878 4616003E */ c.le.s $f0, $f22 /* 1080FC 802E687C 00000000 */ nop /* 108100 802E6880 45000002 */ bc1f .L802E688C /* 108104 802E6884 E6000030 */ swc1 $f0, 0x30($s0) /* 108108 802E6888 E6160030 */ swc1 $f22, 0x30($s0) .L802E688C: /* 10810C 802E688C C6000030 */ lwc1 $f0, 0x30($s0) /* 108110 802E6890 4600A500 */ add.s $f20, $f20, $f0 /* 108114 802E6894 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 108118 802E6898 44811000 */ mtc1 $at, $f2 /* 10811C 802E689C 00000000 */ nop /* 108120 802E68A0 4614103E */ c.le.s $f2, $f20 /* 108124 802E68A4 00000000 */ nop /* 108128 802E68A8 45030001 */ bc1tl .L802E68B0 /* 10812C 802E68AC 46001506 */ mov.s $f20, $f2 .L802E68B0: /* 108130 802E68B0 C60C002C */ lwc1 $f12, 0x2C($s0) /* 108134 802E68B4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 108138 802E68B8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 10813C 802E68BC 44810000 */ mtc1 $at, $f0 /* 108140 802E68C0 00000000 */ nop /* 108144 802E68C4 46006302 */ mul.s $f12, $f12, $f0 /* 108148 802E68C8 00000000 */ nop /* 10814C 802E68CC 0C00A85B */ jal sin_rad /* 108150 802E68D0 46026303 */ div.s $f12, $f12, $f2 /* 108154 802E68D4 C6020028 */ lwc1 $f2, 0x28($s0) /* 108158 802E68D8 46001082 */ mul.s $f2, $f2, $f0 /* 10815C 802E68DC 00000000 */ nop /* 108160 802E68E0 C620004C */ lwc1 $f0, 0x4C($s1) /* 108164 802E68E4 46020000 */ add.s $f0, $f0, $f2 /* 108168 802E68E8 3C014120 */ lui $at, (0x41200000 >> 16) /* 10816C 802E68EC 44811000 */ mtc1 $at, $f2 /* 108170 802E68F0 E620004C */ swc1 $f0, 0x4C($s1) /* 108174 802E68F4 C600002C */ lwc1 $f0, 0x2C($s0) /* 108178 802E68F8 46020000 */ add.s $f0, $f0, $f2 /* 10817C 802E68FC 3C014387 */ lui $at, (0x43870000 >> 16) /* 108180 802E6900 44811000 */ mtc1 $at, $f2 /* 108184 802E6904 00000000 */ nop /* 108188 802E6908 4600103C */ c.lt.s $f2, $f0 /* 10818C 802E690C 00000000 */ nop /* 108190 802E6910 45000002 */ bc1f .L802E691C /* 108194 802E6914 E600002C */ swc1 $f0, 0x2C($s0) /* 108198 802E6918 E602002C */ swc1 $f2, 0x2C($s0) .L802E691C: /* 10819C 802E691C C622004C */ lwc1 $f2, 0x4C($s1) /* 1081A0 802E6920 C6000024 */ lwc1 $f0, 0x24($s0) /* 1081A4 802E6924 4600103E */ c.le.s $f2, $f0 /* 1081A8 802E6928 00000000 */ nop /* 1081AC 802E692C 45000069 */ bc1f .L802E6AD4 /* 1081B0 802E6930 0000202D */ daddu $a0, $zero, $zero /* 1081B4 802E6934 4600B506 */ mov.s $f20, $f22 /* 1081B8 802E6938 24050002 */ addiu $a1, $zero, 0x2 /* 1081BC 802E693C 24060001 */ addiu $a2, $zero, 0x1 /* 1081C0 802E6940 92020000 */ lbu $v0, 0x0($s0) /* 1081C4 802E6944 3C073E4C */ lui $a3, (0x3E4CCCCD >> 16) /* 1081C8 802E6948 34E7CCCD */ ori $a3, $a3, (0x3E4CCCCD & 0xFFFF) /* 1081CC 802E694C 00461021 */ addu $v0, $v0, $a2 /* 1081D0 802E6950 A2020000 */ sb $v0, 0x0($s0) /* 1081D4 802E6954 2402000A */ addiu $v0, $zero, 0xA /* 1081D8 802E6958 E620004C */ swc1 $f0, 0x4C($s1) /* 1081DC 802E695C E6340060 */ swc1 $f20, 0x60($s1) /* 1081E0 802E6960 E6340068 */ swc1 $f20, 0x68($s1) /* 1081E4 802E6964 0C0B2D72 */ jal exec_ShakeCamX /* 1081E8 802E6968 A2020001 */ sb $v0, 0x1($s0) /* 1081EC 802E696C 0C05272D */ jal sfx_play_sound /* 1081F0 802E6970 240420AC */ addiu $a0, $zero, 0x20AC /* 1081F4 802E6974 080B9AB5 */ j .L802E6AD4 /* 1081F8 802E6978 00000000 */ nop glabel .L802E697C /* 1081FC 802E697C 92020000 */ lbu $v0, 0x0($s0) /* 108200 802E6980 24420001 */ addiu $v0, $v0, 0x1 /* 108204 802E6984 080B9AB5 */ j .L802E6AD4 /* 108208 802E6988 A2020000 */ sb $v0, 0x0($s0) glabel .L802E698C /* 10820C 802E698C 2402000B */ addiu $v0, $zero, 0xB /* 108210 802E6990 A2020000 */ sb $v0, 0x0($s0) /* 108214 802E6994 C620004C */ lwc1 $f0, 0x4C($s1) /* 108218 802E6998 3C014000 */ lui $at, (0x40000000 >> 16) /* 10821C 802E699C 44811000 */ mtc1 $at, $f2 /* 108220 802E69A0 080B9A76 */ j .L802E69D8 /* 108224 802E69A4 46020000 */ add.s $f0, $f0, $f2 glabel .L802E69A8 /* 108228 802E69A8 2403FFFE */ addiu $v1, $zero, -0x2 /* 10822C 802E69AC 8E220000 */ lw $v0, 0x0($s1) /* 108230 802E69B0 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 108234 802E69B4 44811000 */ mtc1 $at, $f2 /* 108238 802E69B8 00431024 */ and $v0, $v0, $v1 /* 10823C 802E69BC AE220000 */ sw $v0, 0x0($s1) /* 108240 802E69C0 92020000 */ lbu $v0, 0x0($s0) /* 108244 802E69C4 A2000002 */ sb $zero, 0x2($s0) /* 108248 802E69C8 24420001 */ addiu $v0, $v0, 0x1 /* 10824C 802E69CC A2020000 */ sb $v0, 0x0($s0) /* 108250 802E69D0 C620004C */ lwc1 $f0, 0x4C($s1) /* 108254 802E69D4 46020000 */ add.s $f0, $f0, $f2 .L802E69D8: /* 108258 802E69D8 080B9AB5 */ j .L802E6AD4 /* 10825C 802E69DC E620004C */ swc1 $f0, 0x4C($s1) glabel .L802E69E0 /* 108260 802E69E0 C620004C */ lwc1 $f0, 0x4C($s1) /* 108264 802E69E4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 108268 802E69E8 44811000 */ mtc1 $at, $f2 /* 10826C 802E69EC 00000000 */ nop /* 108270 802E69F0 46020001 */ sub.s $f0, $f0, $f2 /* 108274 802E69F4 E620004C */ swc1 $f0, 0x4C($s1) /* 108278 802E69F8 C6020024 */ lwc1 $f2, 0x24($s0) /* 10827C 802E69FC 4602003E */ c.le.s $f0, $f2 /* 108280 802E6A00 00000000 */ nop /* 108284 802E6A04 45000033 */ bc1f .L802E6AD4 /* 108288 802E6A08 24030001 */ addiu $v1, $zero, 0x1 /* 10828C 802E6A0C E622004C */ swc1 $f2, 0x4C($s1) /* 108290 802E6A10 92020000 */ lbu $v0, 0x0($s0) /* 108294 802E6A14 A2030001 */ sb $v1, 0x1($s0) /* 108298 802E6A18 24420001 */ addiu $v0, $v0, 0x1 /* 10829C 802E6A1C A2020000 */ sb $v0, 0x0($s0) /* 1082A0 802E6A20 8E220000 */ lw $v0, 0x0($s1) /* 1082A4 802E6A24 34420021 */ ori $v0, $v0, 0x21 /* 1082A8 802E6A28 AE220000 */ sw $v0, 0x0($s1) /* 1082AC 802E6A2C 82020002 */ lb $v0, 0x2($s0) /* 1082B0 802E6A30 10400028 */ beqz $v0, .L802E6AD4 /* 1082B4 802E6A34 00000000 */ nop /* 1082B8 802E6A38 0C038050 */ jal enable_player_static_collisions /* 1082BC 802E6A3C 00000000 */ nop /* 1082C0 802E6A40 080B9AB5 */ j .L802E6AD4 /* 1082C4 802E6A44 00000000 */ nop glabel .L802E6A48 /* 1082C8 802E6A48 92020001 */ lbu $v0, 0x1($s0) /* 1082CC 802E6A4C 2442FFFF */ addiu $v0, $v0, -0x1 /* 1082D0 802E6A50 A2020001 */ sb $v0, 0x1($s0) /* 1082D4 802E6A54 00021600 */ sll $v0, $v0, 24 /* 1082D8 802E6A58 0441001E */ bgez $v0, .L802E6AD4 /* 1082DC 802E6A5C 0220202D */ daddu $a0, $s1, $zero /* 1082E0 802E6A60 0C043F5A */ jal exec_entity_commandlist /* 1082E4 802E6A64 A2000000 */ sb $zero, 0x0($s0) /* 1082E8 802E6A68 82020002 */ lb $v0, 0x2($s0) /* 1082EC 802E6A6C 10400009 */ beqz $v0, .L802E6A94 /* 1082F0 802E6A70 00000000 */ nop /* 1082F4 802E6A74 0C009C22 */ jal set_time_freeze_mode /* 1082F8 802E6A78 0000202D */ daddu $a0, $zero, $zero /* 1082FC 802E6A7C 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) /* 108300 802E6A80 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) /* 108304 802E6A84 8C430004 */ lw $v1, 0x4($v0) /* 108308 802E6A88 2404F7FF */ addiu $a0, $zero, -0x801 /* 10830C 802E6A8C 00641824 */ and $v1, $v1, $a0 /* 108310 802E6A90 AC430004 */ sw $v1, 0x4($v0) .L802E6A94: /* 108314 802E6A94 8E220000 */ lw $v0, 0x0($s1) /* 108318 802E6A98 2403FFDF */ addiu $v1, $zero, -0x21 /* 10831C 802E6A9C 00431024 */ and $v0, $v0, $v1 /* 108320 802E6AA0 AE220000 */ sw $v0, 0x0($s1) /* 108324 802E6AA4 8E040008 */ lw $a0, 0x8($s0) /* 108328 802E6AA8 0480000A */ bltz $a0, .L802E6AD4 /* 10832C 802E6AAC 00000000 */ nop /* 108330 802E6AB0 0C00E2B7 */ jal get_npc_by_index /* 108334 802E6AB4 00000000 */ nop /* 108338 802E6AB8 8C430000 */ lw $v1, 0x0($v0) /* 10833C 802E6ABC 2404FDF7 */ addiu $a0, $zero, -0x209 /* 108340 802E6AC0 00641824 */ and $v1, $v1, $a0 /* 108344 802E6AC4 AC430000 */ sw $v1, 0x0($v0) /* 108348 802E6AC8 8E04000C */ lw $a0, 0xC($s0) /* 10834C 802E6ACC 00641825 */ or $v1, $v1, $a0 /* 108350 802E6AD0 AC430000 */ sw $v1, 0x0($v0) glabel .L802E6AD4 /* 108354 802E6AD4 56400002 */ bnel $s2, $zero, .L802E6AE0 /* 108358 802E6AD8 E6340068 */ swc1 $f20, 0x68($s1) /* 10835C 802E6ADC E6340060 */ swc1 $f20, 0x60($s1) .L802E6AE0: /* 108360 802E6AE0 8E040014 */ lw $a0, 0x14($s0) /* 108364 802E6AE4 04800019 */ bltz $a0, .L802E6B4C /* 108368 802E6AE8 00000000 */ nop /* 10836C 802E6AEC 0C04C3D6 */ jal get_item_entity /* 108370 802E6AF0 00000000 */ nop /* 108374 802E6AF4 0040182D */ daddu $v1, $v0, $zero /* 108378 802E6AF8 10600013 */ beqz $v1, .L802E6B48 /* 10837C 802E6AFC 2402FFFF */ addiu $v0, $zero, -0x1 /* 108380 802E6B00 8C620000 */ lw $v0, 0x0($v1) /* 108384 802E6B04 30420010 */ andi $v0, $v0, 0x10 /* 108388 802E6B08 1040000B */ beqz $v0, .L802E6B38 /* 10838C 802E6B0C 34028000 */ ori $v0, $zero, 0x8000 /* 108390 802E6B10 C4600008 */ lwc1 $f0, 0x8($v1) /* 108394 802E6B14 4600018D */ trunc.w.s $f6, $f0 /* 108398 802E6B18 E6060018 */ swc1 $f6, 0x18($s0) /* 10839C 802E6B1C C460000C */ lwc1 $f0, 0xC($v1) /* 1083A0 802E6B20 4600018D */ trunc.w.s $f6, $f0 /* 1083A4 802E6B24 E606001C */ swc1 $f6, 0x1C($s0) /* 1083A8 802E6B28 C4600010 */ lwc1 $f0, 0x10($v1) /* 1083AC 802E6B2C 4600018D */ trunc.w.s $f6, $f0 /* 1083B0 802E6B30 080B9AD3 */ j .L802E6B4C /* 1083B4 802E6B34 E6060020 */ swc1 $f6, 0x20($s0) .L802E6B38: /* 1083B8 802E6B38 AE020018 */ sw $v0, 0x18($s0) /* 1083BC 802E6B3C AE02001C */ sw $v0, 0x1C($s0) /* 1083C0 802E6B40 080B9AD3 */ j .L802E6B4C /* 1083C4 802E6B44 AE020020 */ sw $v0, 0x20($s0) .L802E6B48: /* 1083C8 802E6B48 AE020014 */ sw $v0, 0x14($s0) .L802E6B4C: /* 1083CC 802E6B4C 8FBF0024 */ lw $ra, 0x24($sp) /* 1083D0 802E6B50 8FB20020 */ lw $s2, 0x20($sp) /* 1083D4 802E6B54 8FB1001C */ lw $s1, 0x1C($sp) /* 1083D8 802E6B58 8FB00018 */ lw $s0, 0x18($sp) /* 1083DC 802E6B5C D7B60030 */ ldc1 $f22, 0x30($sp) /* 1083E0 802E6B60 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1083E4 802E6B64 03E00008 */ jr $ra /* 1083E8 802E6B68 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void entity_HiddenPanel_flip_over(Entity* entity) { HiddenPanelData* data = entity->dataBuf.hiddenPanel; f32 yaw; f32 rotAngle; s32 flipAxis; yaw = clamp_angle(gCameras[CAM_DEFAULT].currentYaw + 45.0f); if (yaw < 90.0f || yaw >= 180.0f && yaw < 270.0f) { rotAngle = entity->rotation.z; flipAxis = 1; } else { rotAngle = entity->rotation.x; flipAxis = 0; } switch (data->state) { case 0: sfx_play_sound(SOUND_20AB); data->state = 1; data->unk_02 = TRUE; data->riseInterpPhase = 90.0f; data->rotationSpeed = 65.0f; set_time_freeze_mode(TIME_FREEZE_PARTIAL); disable_player_static_collisions(); gPlayerStatusPtr->animFlags |= PA_FLAG_OPENED_HIDDEN_PANEL; if (data->needSpawnItem) { data->needSpawnItem = FALSE; data->spawnedItemIndex = make_item_entity_nodelay(data->itemID, entity->position.x, entity->position.y + 2.0, entity->position.z, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, data->pickupVar); } entity->flags &= ~ENTITY_FLAG_HIDDEN; break; case 1: entity->position.y += data->riseVelocity * sin_rad(DEG_TO_RAD(data->riseInterpPhase)); if (entity->position.y <= data->initialY) { entity->position.y = data->initialY; entity->rotation.x = 0.0f; entity->rotation.z = 0.0f; rotAngle = 0.0f; data->timer = 10; } data->riseInterpPhase += 10.0f; if (data->riseInterpPhase >= 180.0f) { data->riseInterpPhase = 180.0f; data->timer = 7; data->state++; } if (data->riseInterpPhase > 110.0f) { rotAngle += data->rotationSpeed; if (rotAngle >= 360.0f) { rotAngle -= 360.0f; } } break; case 2: data->rotationSpeed -= 2.0f; if (data->rotationSpeed <= 0.0f) { data->rotationSpeed = 0.0f; } rotAngle += data->rotationSpeed; if (rotAngle >= 360.0f) { rotAngle -= 360.0f; } if (--data->timer <= 0) { data->state++; } break; case 3: data->rotationSpeed -= 5.0f; if (data->rotationSpeed <= 0.0f) { data->rotationSpeed = 0.0f; } rotAngle += data->rotationSpeed; if (rotAngle >= 360.0f) { rotAngle = 360.0f; } entity->position.y += data->riseVelocity * sin_rad(DEG_TO_RAD(data->riseInterpPhase)); data->riseInterpPhase += 10.0f; if (data->riseInterpPhase > 270.0f) { data->riseInterpPhase = 270.0f; } if (entity->position.y <= data->initialY) { data->state++; entity->position.y = data->initialY; entity->rotation.x = 0.0f; entity->rotation.z = 0.0f; rotAngle = 0.0f; data->timer = 10; exec_ShakeCamX(CAM_DEFAULT, CAM_SHAKE_DECAYING_VERTICAL, 1, 0.2f); sfx_play_sound(SOUND_20AC); } break; case 4: data->state++; break; case 5: data->state = 11; entity->position.y += 2.0f; break; case 10: entity->flags &= ~ENTITY_FLAG_HIDDEN; data->unk_02 = FALSE; data->state++; entity->position.y += 6.0f; break; case 11: entity->position.y -= 1.0f; if (entity->position.y <= data->initialY) { entity->position.y = data->initialY; data->timer = 1; data->state++; entity->flags |= ENTITY_FLAG_HIDDEN | ENTITY_FLAG_DISABLE_COLLISION; if (data->unk_02) { enable_player_static_collisions(); } } break; case 12: data->timer--; if (data->timer < 0) { data->state = 0; exec_entity_commandlist(entity); if (data->unk_02) { set_time_freeze_mode(TIME_FREEZE_NORMAL); gPlayerStatusPtr->animFlags &= ~PA_FLAG_OPENED_HIDDEN_PANEL; } entity->flags &= ~ENTITY_FLAG_DISABLE_COLLISION; if (data->standingNpcIndex >= 0) { Npc* npc = get_npc_by_index(data->standingNpcIndex); npc->flags &= ~(NPC_FLAG_GRAVITY | NPC_FLAG_8); npc->flags |= data->npcFlags; } } break; } if (flipAxis == 0) { entity->rotation.x = rotAngle; } else { entity->rotation.z = rotAngle; } if (data->spawnedItemIndex >= 0) { ItemEntity* itemEntity = get_item_entity(data->spawnedItemIndex); if (itemEntity != NULL) { if (itemEntity->flags & ITEM_ENTITY_FLAG_10) { data->spawnedItemPos.x = itemEntity->position.x; data->spawnedItemPos.y = itemEntity->position.y; data->spawnedItemPos.z = itemEntity->position.z; } else { data->spawnedItemPos.x = 0x8000; data->spawnedItemPos.y = 0x8000; data->spawnedItemPos.z = 0x8000; } } else { data->spawnedItemIndex = -1; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel chomp_drop_appendGfx /* 396990 E009A3E0 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 396994 E009A3E4 0080482D */ daddu $t1, $a0, $zero /* 396998 E009A3E8 3C0ADB06 */ lui $t2, (0xDB060024 >> 16) /* 39699C E009A3EC 354A0024 */ ori $t2, $t2, (0xDB060024 & 0xFFFF) /* 3969A0 E009A3F0 27A40020 */ addiu $a0, $sp, 0x20 /* 3969A4 E009A3F4 AFB200B0 */ sw $s2, 0xB0($sp) /* 3969A8 E009A3F8 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 3969AC E009A3FC 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 3969B0 E009A400 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 3969B4 E009A404 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 3969B8 E009A408 44810000 */ mtc1 $at, $f0 /* 3969BC E009A40C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3969C0 E009A410 AFBF00CC */ sw $ra, 0xCC($sp) /* 3969C4 E009A414 AFBE00C8 */ sw $fp, 0xC8($sp) /* 3969C8 E009A418 AFB700C4 */ sw $s7, 0xC4($sp) /* 3969CC E009A41C AFB600C0 */ sw $s6, 0xC0($sp) /* 3969D0 E009A420 AFB500BC */ sw $s5, 0xBC($sp) /* 3969D4 E009A424 AFB400B8 */ sw $s4, 0xB8($sp) /* 3969D8 E009A428 AFB300B4 */ sw $s3, 0xB4($sp) /* 3969DC E009A42C AFB100AC */ sw $s1, 0xAC($sp) /* 3969E0 E009A430 AFB000A8 */ sw $s0, 0xA8($sp) /* 3969E4 E009A434 F7B600D8 */ sdc1 $f22, 0xD8($sp) /* 3969E8 E009A438 F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 3969EC E009A43C 8E430000 */ lw $v1, 0x0($s2) /* 3969F0 E009A440 8D35000C */ lw $s5, 0xC($t1) /* 3969F4 E009A444 0060402D */ daddu $t0, $v1, $zero /* 3969F8 E009A448 44050000 */ mfc1 $a1, $f0 /* 3969FC E009A44C 24630008 */ addiu $v1, $v1, 0x8 /* 396A00 E009A450 AE430000 */ sw $v1, 0x0($s2) /* 396A04 E009A454 C6B60034 */ lwc1 $f22, 0x34($s5) /* 396A08 E009A458 8EB70038 */ lw $s7, 0x38($s5) /* 396A0C E009A45C 8EAF003C */ lw $t7, 0x3C($s5) /* 396A10 E009A460 3C1E8000 */ lui $fp, (0x80000000 >> 16) /* 396A14 E009A464 AFAF00A0 */ sw $t7, 0xA0($sp) /* 396A18 E009A468 8EB60044 */ lw $s6, 0x44($s5) /* 396A1C E009A46C 00A0302D */ daddu $a2, $a1, $zero /* 396A20 E009A470 AD020000 */ sw $v0, 0x0($t0) /* 396A24 E009A474 AD000004 */ sw $zero, 0x4($t0) /* 396A28 E009A478 AC6A0000 */ sw $t2, 0x0($v1) /* 396A2C E009A47C 8D280010 */ lw $t0, 0x10($t1) /* 396A30 E009A480 24620008 */ addiu $v0, $v1, 0x8 /* 396A34 E009A484 AE420000 */ sw $v0, 0x0($s2) /* 396A38 E009A488 8D02001C */ lw $v0, 0x1C($t0) /* 396A3C E009A48C 00A0382D */ daddu $a3, $a1, $zero /* 396A40 E009A490 005E1021 */ addu $v0, $v0, $fp /* 396A44 E009A494 0C080110 */ jal shim_guScaleF /* 396A48 E009A498 AC620004 */ sw $v0, 0x4($v1) /* 396A4C E009A49C C6A00024 */ lwc1 $f0, 0x24($s5) /* 396A50 E009A4A0 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 396A54 E009A4A4 44812000 */ mtc1 $at, $f4 /* 396A58 E009A4A8 E7A00010 */ swc1 $f0, 0x10($sp) /* 396A5C E009A4AC C6A00004 */ lwc1 $f0, 0x4($s5) /* 396A60 E009A4B0 46040002 */ mul.s $f0, $f0, $f4 /* 396A64 E009A4B4 00000000 */ nop /* 396A68 E009A4B8 E7A00014 */ swc1 $f0, 0x14($sp) /* 396A6C E009A4BC C6A00008 */ lwc1 $f0, 0x8($s5) /* 396A70 E009A4C0 46040002 */ mul.s $f0, $f0, $f4 /* 396A74 E009A4C4 00000000 */ nop /* 396A78 E009A4C8 3C140001 */ lui $s4, (0x11630 >> 16) /* 396A7C E009A4CC 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 396A80 E009A4D0 27B00060 */ addiu $s0, $sp, 0x60 /* 396A84 E009A4D4 E7A00018 */ swc1 $f0, 0x18($sp) /* 396A88 E009A4D8 C6A0000C */ lwc1 $f0, 0xC($s5) /* 396A8C E009A4DC 44801000 */ mtc1 $zero, $f2 /* 396A90 E009A4E0 46040002 */ mul.s $f0, $f0, $f4 /* 396A94 E009A4E4 00000000 */ nop /* 396A98 E009A4E8 44051000 */ mfc1 $a1, $f2 /* 396A9C E009A4EC 0200202D */ daddu $a0, $s0, $zero /* 396AA0 E009A4F0 00A0302D */ daddu $a2, $a1, $zero /* 396AA4 E009A4F4 00A0382D */ daddu $a3, $a1, $zero /* 396AA8 E009A4F8 0C080180 */ jal shim_guPositionF /* 396AAC E009A4FC E7A0001C */ swc1 $f0, 0x1C($sp) /* 396AB0 E009A500 0200202D */ daddu $a0, $s0, $zero /* 396AB4 E009A504 27A50020 */ addiu $a1, $sp, 0x20 /* 396AB8 E009A508 0C080114 */ jal shim_guMtxCatF /* 396ABC E009A50C 00A0302D */ daddu $a2, $a1, $zero /* 396AC0 E009A510 27A40020 */ addiu $a0, $sp, 0x20 /* 396AC4 E009A514 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 396AC8 E009A518 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 396ACC E009A51C 3C13800A */ lui $s3, %hi(gDisplayContext) /* 396AD0 E009A520 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 396AD4 E009A524 96250000 */ lhu $a1, 0x0($s1) /* 396AD8 E009A528 8E620000 */ lw $v0, 0x0($s3) /* 396ADC E009A52C 00052980 */ sll $a1, $a1, 6 /* 396AE0 E009A530 00B42821 */ addu $a1, $a1, $s4 /* 396AE4 E009A534 0C080118 */ jal shim_guMtxF2L /* 396AE8 E009A538 00452821 */ addu $a1, $v0, $a1 /* 396AEC E009A53C 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 396AF0 E009A540 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 396AF4 E009A544 00161100 */ sll $v0, $s6, 4 /* 396AF8 E009A548 00561023 */ subu $v0, $v0, $s6 /* 396AFC E009A54C 00021040 */ sll $v0, $v0, 1 /* 396B00 E009A550 4482A000 */ mtc1 $v0, $f20 /* 396B04 E009A554 00000000 */ nop /* 396B08 E009A558 4680A520 */ cvt.s.w $f20, $f20 /* 396B0C E009A55C 4600A306 */ mov.s $f12, $f20 /* 396B10 E009A560 8E500000 */ lw $s0, 0x0($s2) /* 396B14 E009A564 96220000 */ lhu $v0, 0x0($s1) /* 396B18 E009A568 0200202D */ daddu $a0, $s0, $zero /* 396B1C E009A56C 26100008 */ addiu $s0, $s0, 0x8 /* 396B20 E009A570 AE500000 */ sw $s0, 0x0($s2) /* 396B24 E009A574 AC830000 */ sw $v1, 0x0($a0) /* 396B28 E009A578 24430001 */ addiu $v1, $v0, 0x1 /* 396B2C E009A57C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 396B30 E009A580 00021180 */ sll $v0, $v0, 6 /* 396B34 E009A584 A6230000 */ sh $v1, 0x0($s1) /* 396B38 E009A588 8E630000 */ lw $v1, 0x0($s3) /* 396B3C E009A58C 00541021 */ addu $v0, $v0, $s4 /* 396B40 E009A590 00621821 */ addu $v1, $v1, $v0 /* 396B44 E009A594 26020008 */ addiu $v0, $s0, 0x8 /* 396B48 E009A598 AC830004 */ sw $v1, 0x4($a0) /* 396B4C E009A59C AE420000 */ sw $v0, 0x0($s2) /* 396B50 E009A5A0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 396B54 E009A5A4 0C080140 */ jal shim_sin_deg /* 396B58 E009A5A8 AE020000 */ sw $v0, 0x0($s0) /* 396B5C E009A5AC 4600A306 */ mov.s $f12, $f20 /* 396B60 E009A5B0 0C080140 */ jal shim_sin_deg /* 396B64 E009A5B4 46000506 */ mov.s $f20, $f0 /* 396B68 E009A5B8 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 396B6C E009A5BC 44811000 */ mtc1 $at, $f2 /* 396B70 E009A5C0 00000000 */ nop /* 396B74 E009A5C4 4602A502 */ mul.s $f20, $f20, $f2 /* 396B78 E009A5C8 00000000 */ nop /* 396B7C E009A5CC 3C014361 */ lui $at, (0x43610000 >> 16) /* 396B80 E009A5D0 44811000 */ mtc1 $at, $f2 /* 396B84 E009A5D4 46000106 */ mov.s $f4, $f0 /* 396B88 E009A5D8 4602A500 */ add.s $f20, $f20, $f2 /* 396B8C E009A5DC 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 396B90 E009A5E0 44811000 */ mtc1 $at, $f2 /* 396B94 E009A5E4 00000000 */ nop /* 396B98 E009A5E8 4614103E */ c.le.s $f2, $f20 /* 396B9C E009A5EC 00000000 */ nop /* 396BA0 E009A5F0 45010005 */ bc1t .LE009A608 /* 396BA4 E009A5F4 26100004 */ addiu $s0, $s0, 0x4 /* 396BA8 E009A5F8 4600A18D */ trunc.w.s $f6, $f20 /* 396BAC E009A5FC 44023000 */ mfc1 $v0, $f6 /* 396BB0 E009A600 08026987 */ j .LE009A61C /* 396BB4 E009A604 00000000 */ nop .LE009A608: /* 396BB8 E009A608 4602A001 */ sub.s $f0, $f20, $f2 /* 396BBC E009A60C 4600018D */ trunc.w.s $f6, $f0 /* 396BC0 E009A610 44023000 */ mfc1 $v0, $f6 /* 396BC4 E009A614 00000000 */ nop /* 396BC8 E009A618 005E1025 */ or $v0, $v0, $fp .LE009A61C: /* 396BCC E009A61C 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 396BD0 E009A620 44810000 */ mtc1 $at, $f0 /* 396BD4 E009A624 00000000 */ nop /* 396BD8 E009A628 46002002 */ mul.s $f0, $f4, $f0 /* 396BDC E009A62C 00000000 */ nop /* 396BE0 E009A630 3C014361 */ lui $at, (0x43610000 >> 16) /* 396BE4 E009A634 44811000 */ mtc1 $at, $f2 /* 396BE8 E009A638 00000000 */ nop /* 396BEC E009A63C 46020000 */ add.s $f0, $f0, $f2 /* 396BF0 E009A640 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 396BF4 E009A644 44811000 */ mtc1 $at, $f2 /* 396BF8 E009A648 00000000 */ nop /* 396BFC E009A64C 4600103E */ c.le.s $f2, $f0 /* 396C00 E009A650 00000000 */ nop /* 396C04 E009A654 45010005 */ bc1t .LE009A66C /* 396C08 E009A658 00022600 */ sll $a0, $v0, 24 /* 396C0C E009A65C 4600018D */ trunc.w.s $f6, $f0 /* 396C10 E009A660 44033000 */ mfc1 $v1, $f6 /* 396C14 E009A664 080269A2 */ j .LE009A688 /* 396C18 E009A668 306200FF */ andi $v0, $v1, 0xFF .LE009A66C: /* 396C1C E009A66C 46020001 */ sub.s $f0, $f0, $f2 /* 396C20 E009A670 3C028000 */ lui $v0, (0x80000000 >> 16) /* 396C24 E009A674 4600018D */ trunc.w.s $f6, $f0 /* 396C28 E009A678 44033000 */ mfc1 $v1, $f6 /* 396C2C E009A67C 00000000 */ nop /* 396C30 E009A680 00621825 */ or $v1, $v1, $v0 /* 396C34 E009A684 306200FF */ andi $v0, $v1, 0xFF .LE009A688: /* 396C38 E009A688 00021400 */ sll $v0, $v0, 16 /* 396C3C E009A68C 8FAF00A0 */ lw $t7, 0xA0($sp) /* 396C40 E009A690 00821025 */ or $v0, $a0, $v0 /* 396C44 E009A694 31E300FF */ andi $v1, $t7, 0xFF /* 396C48 E009A698 3463FF00 */ ori $v1, $v1, 0xFF00 /* 396C4C E009A69C 00431025 */ or $v0, $v0, $v1 /* 396C50 E009A6A0 AE020000 */ sw $v0, 0x0($s0) /* 396C54 E009A6A4 8EA3002C */ lw $v1, 0x2C($s5) /* 396C58 E009A6A8 24020001 */ addiu $v0, $zero, 0x1 /* 396C5C E009A6AC 1462002F */ bne $v1, $v0, .LE009A76C /* 396C60 E009A6B0 3C088888 */ lui $t0, (0x88888889 >> 16) /* 396C64 E009A6B4 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 396C68 E009A6B8 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 396C6C E009A6BC 35088889 */ ori $t0, $t0, (0x88888889 & 0xFFFF) /* 396C70 E009A6C0 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 396C74 E009A6C4 3C020900 */ lui $v0, %hi(D_09001040_40E2D0) /* 396C78 E009A6C8 24421040 */ addiu $v0, $v0, %lo(D_09001040_40E2D0) /* 396C7C E009A6CC 8CA40000 */ lw $a0, 0x0($a1) /* 396C80 E009A6D0 3C070900 */ lui $a3, %hi(D_09001190_40E420) /* 396C84 E009A6D4 24E71190 */ addiu $a3, $a3, %lo(D_09001190_40E420) /* 396C88 E009A6D8 0080182D */ daddu $v1, $a0, $zero /* 396C8C E009A6DC 24840008 */ addiu $a0, $a0, 0x8 /* 396C90 E009A6E0 ACA40000 */ sw $a0, 0x0($a1) /* 396C94 E009A6E4 AC620004 */ sw $v0, 0x4($v1) /* 396C98 E009A6E8 24820008 */ addiu $v0, $a0, 0x8 /* 396C9C E009A6EC AC660000 */ sw $a2, 0x0($v1) /* 396CA0 E009A6F0 ACA20000 */ sw $v0, 0x0($a1) /* 396CA4 E009A6F4 24820010 */ addiu $v0, $a0, 0x10 /* 396CA8 E009A6F8 AC860000 */ sw $a2, 0x0($a0) /* 396CAC E009A6FC AC870004 */ sw $a3, 0x4($a0) /* 396CB0 E009A700 ACA20000 */ sw $v0, 0x0($a1) /* 396CB4 E009A704 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 396CB8 E009A708 AC820008 */ sw $v0, 0x8($a0) /* 396CBC E009A70C 8EA30030 */ lw $v1, 0x30($s5) /* 396CC0 E009A710 24820018 */ addiu $v0, $a0, 0x18 /* 396CC4 E009A714 ACA20000 */ sw $v0, 0x0($a1) /* 396CC8 E009A718 3C020900 */ lui $v0, %hi(D_090010E8_40E378) /* 396CCC E009A71C 244210E8 */ addiu $v0, $v0, %lo(D_090010E8_40E378) /* 396CD0 E009A720 AC820014 */ sw $v0, 0x14($a0) /* 396CD4 E009A724 2402001E */ addiu $v0, $zero, 0x1E /* 396CD8 E009A728 AC860010 */ sw $a2, 0x10($a0) /* 396CDC E009A72C 00431023 */ subu $v0, $v0, $v1 /* 396CE0 E009A730 00021A00 */ sll $v1, $v0, 8 /* 396CE4 E009A734 00621823 */ subu $v1, $v1, $v0 /* 396CE8 E009A738 00680018 */ mult $v1, $t0 /* 396CEC E009A73C 24820020 */ addiu $v0, $a0, 0x20 /* 396CF0 E009A740 ACA20000 */ sw $v0, 0x0($a1) /* 396CF4 E009A744 AC860018 */ sw $a2, 0x18($a0) /* 396CF8 E009A748 AC87001C */ sw $a3, 0x1C($a0) /* 396CFC E009A74C 00007810 */ mfhi $t7 /* 396D00 E009A750 01E31021 */ addu $v0, $t7, $v1 /* 396D04 E009A754 00021103 */ sra $v0, $v0, 4 /* 396D08 E009A758 00031FC3 */ sra $v1, $v1, 31 /* 396D0C E009A75C 00431023 */ subu $v0, $v0, $v1 /* 396D10 E009A760 304200FF */ andi $v0, $v0, 0xFF /* 396D14 E009A764 08026A77 */ j .LE009A9DC /* 396D18 E009A768 AC82000C */ sw $v0, 0xC($a0) .LE009A76C: /* 396D1C E009A76C 1860000D */ blez $v1, .LE009A7A4 /* 396D20 E009A770 00000000 */ nop /* 396D24 E009A774 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 396D28 E009A778 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 396D2C E009A77C 8C620000 */ lw $v0, 0x0($v1) /* 396D30 E009A780 0040202D */ daddu $a0, $v0, $zero /* 396D34 E009A784 24420008 */ addiu $v0, $v0, 0x8 /* 396D38 E009A788 AC620000 */ sw $v0, 0x0($v1) /* 396D3C E009A78C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 396D40 E009A790 AC820000 */ sw $v0, 0x0($a0) /* 396D44 E009A794 3C020900 */ lui $v0, %hi(D_090010E8_40E378) /* 396D48 E009A798 244210E8 */ addiu $v0, $v0, %lo(D_090010E8_40E378) /* 396D4C E009A79C 080269F4 */ j .LE009A7D0 /* 396D50 E009A7A0 AC820004 */ sw $v0, 0x4($a0) .LE009A7A4: /* 396D54 E009A7A4 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 396D58 E009A7A8 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 396D5C E009A7AC 8C620000 */ lw $v0, 0x0($v1) /* 396D60 E009A7B0 0040202D */ daddu $a0, $v0, $zero /* 396D64 E009A7B4 24420008 */ addiu $v0, $v0, 0x8 /* 396D68 E009A7B8 AC620000 */ sw $v0, 0x0($v1) /* 396D6C E009A7BC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 396D70 E009A7C0 AC820000 */ sw $v0, 0x0($a0) /* 396D74 E009A7C4 3C020900 */ lui $v0, %hi(D_09001040_40E2D0) /* 396D78 E009A7C8 24421040 */ addiu $v0, $v0, %lo(D_09001040_40E2D0) /* 396D7C E009A7CC AC820004 */ sw $v0, 0x4($a0) .LE009A7D0: /* 396D80 E009A7D0 0000902D */ daddu $s2, $zero, $zero /* 396D84 E009A7D4 0240A82D */ daddu $s5, $s2, $zero /* 396D88 E009A7D8 00161080 */ sll $v0, $s6, 2 /* 396D8C E009A7DC 00561021 */ addu $v0, $v0, $s6 /* 396D90 E009A7E0 00029840 */ sll $s3, $v0, 1 /* 396D94 E009A7E4 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 396D98 E009A7E8 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 396D9C E009A7EC 8C830000 */ lw $v1, 0x0($a0) /* 396DA0 E009A7F0 0260A02D */ daddu $s4, $s3, $zero /* 396DA4 E009A7F4 24620008 */ addiu $v0, $v1, 0x8 /* 396DA8 E009A7F8 0040B02D */ daddu $s6, $v0, $zero /* 396DAC E009A7FC 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 396DB0 E009A800 AC620000 */ sw $v0, 0x0($v1) /* 396DB4 E009A804 24620208 */ addiu $v0, $v1, 0x208 /* 396DB8 E009A808 AC620004 */ sw $v0, 0x4($v1) /* 396DBC E009A80C AC960000 */ sw $s6, 0x0($a0) .LE009A810: /* 396DC0 E009A810 00128140 */ sll $s0, $s2, 5 /* 396DC4 E009A814 02971021 */ addu $v0, $s4, $s7 /* 396DC8 E009A818 44826000 */ mtc1 $v0, $f12 /* 396DCC E009A81C 00000000 */ nop /* 396DD0 E009A820 46806320 */ cvt.s.w $f12, $f12 /* 396DD4 E009A824 0C080140 */ jal shim_sin_deg /* 396DD8 E009A828 02D08021 */ addu $s0, $s6, $s0 /* 396DDC E009A82C 3C0143FA */ lui $at, (0x43FA0000 >> 16) /* 396DE0 E009A830 44811000 */ mtc1 $at, $f2 /* 396DE4 E009A834 00000000 */ nop /* 396DE8 E009A838 46020002 */ mul.s $f0, $f0, $f2 /* 396DEC E009A83C 00000000 */ nop /* 396DF0 E009A840 46160002 */ mul.s $f0, $f0, $f22 /* 396DF4 E009A844 00000000 */ nop /* 396DF8 E009A848 02771021 */ addu $v0, $s3, $s7 /* 396DFC E009A84C 44826000 */ mtc1 $v0, $f12 /* 396E00 E009A850 00000000 */ nop /* 396E04 E009A854 46806320 */ cvt.s.w $f12, $f12 /* 396E08 E009A858 4600018D */ trunc.w.s $f6, $f0 /* 396E0C E009A85C 44113000 */ mfc1 $s1, $f6 /* 396E10 E009A860 0C080140 */ jal shim_sin_deg /* 396E14 E009A864 26730006 */ addiu $s3, $s3, 0x6 /* 396E18 E009A868 3C014348 */ lui $at, (0x43480000 >> 16) /* 396E1C E009A86C 44811000 */ mtc1 $at, $f2 /* 396E20 E009A870 2694003C */ addiu $s4, $s4, 0x3C /* 396E24 E009A874 46020002 */ mul.s $f0, $f0, $f2 /* 396E28 E009A878 00000000 */ nop /* 396E2C E009A87C 001219C0 */ sll $v1, $s2, 7 /* 396E30 E009A880 26520001 */ addiu $s2, $s2, 0x1 /* 396E34 E009A884 2622F380 */ addiu $v0, $s1, -0xC80 /* 396E38 E009A888 26310C80 */ addiu $s1, $s1, 0xC80 /* 396E3C E009A88C 46160002 */ mul.s $f0, $f0, $f22 /* 396E40 E009A890 00000000 */ nop /* 396E44 E009A894 A6020000 */ sh $v0, 0x0($s0) /* 396E48 E009A898 A6000004 */ sh $zero, 0x4($s0) /* 396E4C E009A89C A6000008 */ sh $zero, 0x8($s0) /* 396E50 E009A8A0 A603000A */ sh $v1, 0xA($s0) /* 396E54 E009A8A4 4600018D */ trunc.w.s $f6, $f0 /* 396E58 E009A8A8 44023000 */ mfc1 $v0, $f6 /* 396E5C E009A8AC 00000000 */ nop /* 396E60 E009A8B0 02A21021 */ addu $v0, $s5, $v0 /* 396E64 E009A8B4 A6020002 */ sh $v0, 0x2($s0) /* 396E68 E009A8B8 26100010 */ addiu $s0, $s0, 0x10 /* 396E6C E009A8BC 26B50190 */ addiu $s5, $s5, 0x190 /* 396E70 E009A8C0 A6020002 */ sh $v0, 0x2($s0) /* 396E74 E009A8C4 24020800 */ addiu $v0, $zero, 0x800 /* 396E78 E009A8C8 A6020008 */ sh $v0, 0x8($s0) /* 396E7C E009A8CC 2A420010 */ slti $v0, $s2, 0x10 /* 396E80 E009A8D0 A6110000 */ sh $s1, 0x0($s0) /* 396E84 E009A8D4 A6000004 */ sh $zero, 0x4($s0) /* 396E88 E009A8D8 1440FFCD */ bnez $v0, .LE009A810 /* 396E8C E009A8DC A603000A */ sh $v1, 0xA($s0) /* 396E90 E009A8E0 3C040102 */ lui $a0, (0x1020040 >> 16) /* 396E94 E009A8E4 34840040 */ ori $a0, $a0, (0x1020040 & 0xFFFF) /* 396E98 E009A8E8 0000902D */ daddu $s2, $zero, $zero /* 396E9C E009A8EC 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 396EA0 E009A8F0 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 396EA4 E009A8F4 0040482D */ daddu $t1, $v0, $zero /* 396EA8 E009A8F8 3C0B0600 */ lui $t3, (0x6000000 >> 16) /* 396EAC E009A8FC 240A0001 */ addiu $t2, $zero, 0x1 /* 396EB0 E009A900 3C0E0606 */ lui $t6, (0x6060402 >> 16) /* 396EB4 E009A904 35CE0402 */ ori $t6, $t6, (0x6060402 & 0xFFFF) /* 396EB8 E009A908 3C0D0002 */ lui $t5, (0x20406 >> 16) /* 396EBC E009A90C 35AD0406 */ ori $t5, $t5, (0x20406 & 0xFFFF) /* 396EC0 E009A910 3C0C0006 */ lui $t4, (0x60804 >> 16) /* 396EC4 E009A914 358C0804 */ ori $t4, $t4, (0x60804 & 0xFFFF) /* 396EC8 E009A918 24070004 */ addiu $a3, $zero, 0x4 /* 396ECC E009A91C 24060002 */ addiu $a2, $zero, 0x2 /* 396ED0 E009A920 8D230000 */ lw $v1, 0x0($t1) /* 396ED4 E009A924 24080006 */ addiu $t0, $zero, 0x6 /* 396ED8 E009A928 24620208 */ addiu $v0, $v1, 0x208 /* 396EDC E009A92C AD220000 */ sw $v0, 0x0($t1) /* 396EE0 E009A930 AC640200 */ sw $a0, 0x200($v1) /* 396EE4 E009A934 AC760204 */ sw $s6, 0x204($v1) .LE009A938: /* 396EE8 E009A938 8D240000 */ lw $a0, 0x0($t1) /* 396EEC E009A93C 00122840 */ sll $a1, $s2, 1 /* 396EF0 E009A940 24820008 */ addiu $v0, $a0, 0x8 /* 396EF4 E009A944 14A00004 */ bnez $a1, .LE009A958 /* 396EF8 E009A948 AD220000 */ sw $v0, 0x0($t1) /* 396EFC E009A94C 00121440 */ sll $v0, $s2, 17 /* 396F00 E009A950 08026A60 */ j .LE009A980 /* 396F04 E009A954 34420402 */ ori $v0, $v0, 0x402 .LE009A958: /* 396F08 E009A958 14AA0003 */ bne $a1, $t2, .LE009A968 /* 396F0C E009A95C 30C200FF */ andi $v0, $a2, 0xFF /* 396F10 E009A960 08026A62 */ j .LE009A988 /* 396F14 E009A964 AC8E0000 */ sw $t6, 0x0($a0) .LE009A968: /* 396F18 E009A968 00021400 */ sll $v0, $v0, 16 /* 396F1C E009A96C 00121A80 */ sll $v1, $s2, 10 /* 396F20 E009A970 3063FC00 */ andi $v1, $v1, 0xFC00 /* 396F24 E009A974 00431025 */ or $v0, $v0, $v1 /* 396F28 E009A978 30E300FF */ andi $v1, $a3, 0xFF /* 396F2C E009A97C 00431025 */ or $v0, $v0, $v1 .LE009A980: /* 396F30 E009A980 004B1025 */ or $v0, $v0, $t3 /* 396F34 E009A984 AC820000 */ sw $v0, 0x0($a0) .LE009A988: /* 396F38 E009A988 14A00003 */ bnez $a1, .LE009A998 /* 396F3C E009A98C 00000000 */ nop /* 396F40 E009A990 08026A71 */ j .LE009A9C4 /* 396F44 E009A994 AC8D0004 */ sw $t5, 0x4($a0) .LE009A998: /* 396F48 E009A998 14AA0003 */ bne $a1, $t2, .LE009A9A8 /* 396F4C E009A99C 310200FF */ andi $v0, $t0, 0xFF /* 396F50 E009A9A0 08026A71 */ j .LE009A9C4 /* 396F54 E009A9A4 AC8C0004 */ sw $t4, 0x4($a0) .LE009A9A8: /* 396F58 E009A9A8 00021400 */ sll $v0, $v0, 16 /* 396F5C E009A9AC 30C300FF */ andi $v1, $a2, 0xFF /* 396F60 E009A9B0 00031A00 */ sll $v1, $v1, 8 /* 396F64 E009A9B4 00431025 */ or $v0, $v0, $v1 /* 396F68 E009A9B8 30E300FF */ andi $v1, $a3, 0xFF /* 396F6C E009A9BC 00431025 */ or $v0, $v0, $v1 /* 396F70 E009A9C0 AC820004 */ sw $v0, 0x4($a0) .LE009A9C4: /* 396F74 E009A9C4 24E70004 */ addiu $a3, $a3, 0x4 /* 396F78 E009A9C8 24C60004 */ addiu $a2, $a2, 0x4 /* 396F7C E009A9CC 26520001 */ addiu $s2, $s2, 0x1 /* 396F80 E009A9D0 2A42000F */ slti $v0, $s2, 0xF /* 396F84 E009A9D4 1440FFD8 */ bnez $v0, .LE009A938 /* 396F88 E009A9D8 25080004 */ addiu $t0, $t0, 0x4 .LE009A9DC: /* 396F8C E009A9DC 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 396F90 E009A9E0 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 396F94 E009A9E4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 396F98 E009A9E8 8C820000 */ lw $v0, 0x0($a0) /* 396F9C E009A9EC 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 396FA0 E009A9F0 0040282D */ daddu $a1, $v0, $zero /* 396FA4 E009A9F4 24420008 */ addiu $v0, $v0, 0x8 /* 396FA8 E009A9F8 AC820000 */ sw $v0, 0x0($a0) /* 396FAC E009A9FC ACA30000 */ sw $v1, 0x0($a1) /* 396FB0 E009AA00 24030040 */ addiu $v1, $zero, 0x40 /* 396FB4 E009AA04 ACA30004 */ sw $v1, 0x4($a1) /* 396FB8 E009AA08 24430008 */ addiu $v1, $v0, 0x8 /* 396FBC E009AA0C AC830000 */ sw $v1, 0x0($a0) /* 396FC0 E009AA10 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 396FC4 E009AA14 AC430000 */ sw $v1, 0x0($v0) /* 396FC8 E009AA18 AC400004 */ sw $zero, 0x4($v0) /* 396FCC E009AA1C 8FBF00CC */ lw $ra, 0xCC($sp) /* 396FD0 E009AA20 8FBE00C8 */ lw $fp, 0xC8($sp) /* 396FD4 E009AA24 8FB700C4 */ lw $s7, 0xC4($sp) /* 396FD8 E009AA28 8FB600C0 */ lw $s6, 0xC0($sp) /* 396FDC E009AA2C 8FB500BC */ lw $s5, 0xBC($sp) /* 396FE0 E009AA30 8FB400B8 */ lw $s4, 0xB8($sp) /* 396FE4 E009AA34 8FB300B4 */ lw $s3, 0xB4($sp) /* 396FE8 E009AA38 8FB200B0 */ lw $s2, 0xB0($sp) /* 396FEC E009AA3C 8FB100AC */ lw $s1, 0xAC($sp) /* 396FF0 E009AA40 8FB000A8 */ lw $s0, 0xA8($sp) /* 396FF4 E009AA44 D7B600D8 */ ldc1 $f22, 0xD8($sp) /* 396FF8 E009AA48 D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 396FFC E009AA4C 03E00008 */ jr $ra /* 397000 E009AA50 27BD00E0 */ addiu $sp, $sp, 0xE0 /* 397004 E009AA54 00000000 */ nop /* 397008 E009AA58 00000000 */ nop /* 39700C E009AA5C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void chomp_drop_appendGfx(void* effect) { EffectInstance* effectTemp = effect; ChompDropFXData* data = effectTemp->data.chompDrop; f32 temp_f22 = data->unk_34; s32 temp_s7 = data->unk_38; s32 primA = data->unk_3C; s32 temp_s6 = data->unk_44; Matrix4f sp20, sp60; Gfx* savedGfxPos; Vtx_t* vtxTemp; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effectTemp)->graphics->data)); shim_guScaleF(sp20, 0.01f, 0.01f, 0.01f); shim_guPositionF(sp60, 0.0f, 0.0f, 0.0f, data->unk_24, data->unk_04 * 100.0f, data->unk_08 * 100.0f, data->unk_0C * 100.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor( gMainGfxPos++, 0, 0, (shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f, (shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f, 255, primA ); if (data->unk_2C == 1) { gSPDisplayList(gMainGfxPos++, D_09001040_398080); gSPDisplayList(gMainGfxPos++, D_09001190_3981D0); gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, ((30 - data->unk_30) * 255) / 30); gSPDisplayList(gMainGfxPos++, D_090010E8_398128); gSPDisplayList(gMainGfxPos++, D_09001190_3981D0); } else { if (data->unk_2C > 0) { gSPDisplayList(gMainGfxPos++, D_090010E8_398128); } else { gSPDisplayList(gMainGfxPos++, D_09001040_398080); } savedGfxPos = gMainGfxPos + 1; gSPBranchList(gMainGfxPos, gMainGfxPos + 0x41); gMainGfxPos = savedGfxPos; vtxTemp = (Vtx_t*) savedGfxPos; for (i = 0; i < 16; i++) { Vtx_t* vtx = &vtxTemp[i * 2]; s32 temp_s1 = shim_sin_deg(((temp_s6 * 10) + (i * 60)) + temp_s7) * 500.0f * temp_f22; s32 temp_v0_3 = (i * 400) + (s32) (shim_sin_deg(((temp_s6 * 10) + (i * 6)) + temp_s7) * 200.0f * temp_f22); vtx->ob[0] = temp_s1 - 3200; vtx->ob[1] = temp_v0_3; vtx->ob[2] = 0; vtx->tc[0] = 0; vtx->tc[1] = i * 128; vtx++; vtx->ob[0] = temp_s1 + 3200; vtx->ob[1] = temp_v0_3; vtx->ob[2] = 0; vtx->tc[0] = 2048; vtx->tc[1] = i * 128; } gMainGfxPos += 0x40; gSPVertex(gMainGfxPos++, vtxTemp, 32, 0); for (i = 0; i < 15; i++) { s32 i2 = i * 2; gSP2Triangles(gMainGfxPos++, i2 , i2 + 2, i2 + 1, i2, i2 + 1, i2 + 2, i2 + 3, i2); }; } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80115498 /* ABB98 80115498 27BDFF88 */ addiu $sp, $sp, -0x78 /* ABB9C 8011549C AFB50064 */ sw $s5, 0x64($sp) /* ABBA0 801154A0 0080A82D */ daddu $s5, $a0, $zero /* ABBA4 801154A4 00A0182D */ daddu $v1, $a1, $zero /* ABBA8 801154A8 AFA60080 */ sw $a2, 0x80($sp) /* ABBAC 801154AC AFA70084 */ sw $a3, 0x84($sp) /* ABBB0 801154B0 00C71021 */ addu $v0, $a2, $a3 /* ABBB4 801154B4 02A2102B */ sltu $v0, $s5, $v0 /* ABBB8 801154B8 AFBF0074 */ sw $ra, 0x74($sp) /* ABBBC 801154BC AFBE0070 */ sw $fp, 0x70($sp) /* ABBC0 801154C0 AFB7006C */ sw $s7, 0x6C($sp) /* ABBC4 801154C4 AFB60068 */ sw $s6, 0x68($sp) /* ABBC8 801154C8 AFB40060 */ sw $s4, 0x60($sp) /* ABBCC 801154CC AFB3005C */ sw $s3, 0x5C($sp) /* ABBD0 801154D0 AFB20058 */ sw $s2, 0x58($sp) /* ABBD4 801154D4 AFB10054 */ sw $s1, 0x54($sp) /* ABBD8 801154D8 10400180 */ beqz $v0, .L80115ADC /* ABBDC 801154DC AFB00050 */ sw $s0, 0x50($sp) /* ABBE0 801154E0 27B30020 */ addiu $s3, $sp, 0x20 /* ABBE4 801154E4 24170001 */ addiu $s7, $zero, 0x1 /* ABBE8 801154E8 241E1000 */ addiu $fp, $zero, 0x1000 /* ABBEC 801154EC 00031100 */ sll $v0, $v1, 4 /* ABBF0 801154F0 00451021 */ addu $v0, $v0, $a1 /* ABBF4 801154F4 0002B080 */ sll $s6, $v0, 2 /* ABBF8 801154F8 02A0202D */ daddu $a0, $s5, $zero .L801154FC: /* ABBFC 801154FC 26A50030 */ addiu $a1, $s5, 0x30 /* ABC00 80115500 0C00A5CF */ jal dma_copy /* ABC04 80115504 27A60020 */ addiu $a2, $sp, 0x20 /* ABC08 80115508 93A20048 */ lbu $v0, 0x48($sp) /* ABC0C 8011550C 10400173 */ beqz $v0, .L80115ADC /* ABC10 80115510 00000000 */ nop /* ABC14 80115514 97A40042 */ lhu $a0, 0x42($sp) /* ABC18 80115518 97A20046 */ lhu $v0, 0x46($sp) /* ABC1C 8011551C 00820018 */ mult $a0, $v0 /* ABC20 80115520 97A3004C */ lhu $v1, 0x4C($sp) /* ABC24 80115524 30630F00 */ andi $v1, $v1, 0xF00 /* ABC28 80115528 00009012 */ mflo $s2 /* ABC2C 8011552C 14600049 */ bnez $v1, .L80115654 /* ABC30 80115530 24080100 */ addiu $t0, $zero, 0x100 /* ABC34 80115534 93A20049 */ lbu $v0, 0x49($sp) /* ABC38 80115538 54570125 */ bnel $v0, $s7, .L801159D0 /* ABC3C 8011553C 00129042 */ srl $s2, $s2, 1 /* ABC40 80115540 24050002 */ addiu $a1, $zero, 0x2 /* ABC44 80115544 14A00002 */ bnez $a1, .L80115550 /* ABC48 80115548 0085001A */ div $zero, $a0, $a1 /* ABC4C 8011554C 0007000D */ break 7 .L80115550: /* ABC50 80115550 2401FFFF */ addiu $at, $zero, -0x1 /* ABC54 80115554 14A10004 */ bne $a1, $at, .L80115568 /* ABC58 80115558 3C018000 */ lui $at, (0x80000000 >> 16) /* ABC5C 8011555C 14810002 */ bne $a0, $at, .L80115568 /* ABC60 80115560 00000000 */ nop /* ABC64 80115564 0006000D */ break 6 .L80115568: /* ABC68 80115568 00001012 */ mflo $v0 /* ABC6C 8011556C 28420010 */ slti $v0, $v0, 0x10 /* ABC70 80115570 54400117 */ bnel $v0, $zero, .L801159D0 /* ABC74 80115574 00129042 */ srl $s2, $s2, 1 /* ABC78 80115578 96660026 */ lhu $a2, 0x26($s3) .L8011557C: /* ABC7C 8011557C 14A00002 */ bnez $a1, .L80115588 /* ABC80 80115580 00C5001A */ div $zero, $a2, $a1 /* ABC84 80115584 0007000D */ break 7 .L80115588: /* ABC88 80115588 2401FFFF */ addiu $at, $zero, -0x1 /* ABC8C 8011558C 14A10004 */ bne $a1, $at, .L801155A0 /* ABC90 80115590 3C018000 */ lui $at, (0x80000000 >> 16) /* ABC94 80115594 14C10002 */ bne $a2, $at, .L801155A0 /* ABC98 80115598 00000000 */ nop /* ABC9C 8011559C 0006000D */ break 6 .L801155A0: /* ABCA0 801155A0 00001012 */ mflo $v0 /* ABCA4 801155A4 5840010A */ blezl $v0, .L801159D0 /* ABCA8 801155A8 00129042 */ srl $s2, $s2, 1 /* ABCAC 801155AC 96630022 */ lhu $v1, 0x22($s3) /* ABCB0 801155B0 14A00002 */ bnez $a1, .L801155BC /* ABCB4 801155B4 0065001A */ div $zero, $v1, $a1 /* ABCB8 801155B8 0007000D */ break 7 .L801155BC: /* ABCBC 801155BC 2401FFFF */ addiu $at, $zero, -0x1 /* ABCC0 801155C0 14A10004 */ bne $a1, $at, .L801155D4 /* ABCC4 801155C4 3C018000 */ lui $at, (0x80000000 >> 16) /* ABCC8 801155C8 14610002 */ bne $v1, $at, .L801155D4 /* ABCCC 801155CC 00000000 */ nop /* ABCD0 801155D0 0006000D */ break 6 .L801155D4: /* ABCD4 801155D4 00001012 */ mflo $v0 /* ABCD8 801155D8 00000000 */ nop /* ABCDC 801155DC 00000000 */ nop /* ABCE0 801155E0 00460018 */ mult $v0, $a2 /* ABCE4 801155E4 00005012 */ mflo $t2 /* ABCE8 801155E8 00000000 */ nop /* ABCEC 801155EC 14A00002 */ bnez $a1, .L801155F8 /* ABCF0 801155F0 0145001A */ div $zero, $t2, $a1 /* ABCF4 801155F4 0007000D */ break 7 .L801155F8: /* ABCF8 801155F8 2401FFFF */ addiu $at, $zero, -0x1 /* ABCFC 801155FC 14A10004 */ bne $a1, $at, .L80115610 /* ABD00 80115600 3C018000 */ lui $at, (0x80000000 >> 16) /* ABD04 80115604 15410002 */ bne $t2, $at, .L80115610 /* ABD08 80115608 00000000 */ nop /* ABD0C 8011560C 0006000D */ break 6 .L80115610: /* ABD10 80115610 00002012 */ mflo $a0 /* ABD14 80115614 00052840 */ sll $a1, $a1, 1 /* ABD18 80115618 14A00002 */ bnez $a1, .L80115624 /* ABD1C 8011561C 0065001A */ div $zero, $v1, $a1 /* ABD20 80115620 0007000D */ break 7 .L80115624: /* ABD24 80115624 2401FFFF */ addiu $at, $zero, -0x1 /* ABD28 80115628 14A10004 */ bne $a1, $at, .L8011563C /* ABD2C 8011562C 3C018000 */ lui $at, (0x80000000 >> 16) /* ABD30 80115630 14610002 */ bne $v1, $at, .L8011563C /* ABD34 80115634 00000000 */ nop /* ABD38 80115638 0006000D */ break 6 .L8011563C: /* ABD3C 8011563C 00001012 */ mflo $v0 /* ABD40 80115640 28420010 */ slti $v0, $v0, 0x10 /* ABD44 80115644 1040FFCD */ beqz $v0, .L8011557C /* ABD48 80115648 02449021 */ addu $s2, $s2, $a0 /* ABD4C 8011564C 08045674 */ j .L801159D0 /* ABD50 80115650 00129042 */ srl $s2, $s2, 1 .L80115654: /* ABD54 80115654 14680048 */ bne $v1, $t0, .L80115778 /* ABD58 80115658 00000000 */ nop /* ABD5C 8011565C 93A20049 */ lbu $v0, 0x49($sp) /* ABD60 80115660 145700DB */ bne $v0, $s7, .L801159D0 /* ABD64 80115664 24050002 */ addiu $a1, $zero, 0x2 /* ABD68 80115668 14A00002 */ bnez $a1, .L80115674 /* ABD6C 8011566C 0085001A */ div $zero, $a0, $a1 /* ABD70 80115670 0007000D */ break 7 .L80115674: /* ABD74 80115674 2401FFFF */ addiu $at, $zero, -0x1 /* ABD78 80115678 14A10004 */ bne $a1, $at, .L8011568C /* ABD7C 8011567C 3C018000 */ lui $at, (0x80000000 >> 16) /* ABD80 80115680 14810002 */ bne $a0, $at, .L8011568C /* ABD84 80115684 00000000 */ nop /* ABD88 80115688 0006000D */ break 6 .L8011568C: /* ABD8C 8011568C 00001012 */ mflo $v0 /* ABD90 80115690 28420008 */ slti $v0, $v0, 0x8 /* ABD94 80115694 144000CE */ bnez $v0, .L801159D0 /* ABD98 80115698 00000000 */ nop /* ABD9C 8011569C 96660026 */ lhu $a2, 0x26($s3) .L801156A0: /* ABDA0 801156A0 14A00002 */ bnez $a1, .L801156AC /* ABDA4 801156A4 00C5001A */ div $zero, $a2, $a1 /* ABDA8 801156A8 0007000D */ break 7 .L801156AC: /* ABDAC 801156AC 2401FFFF */ addiu $at, $zero, -0x1 /* ABDB0 801156B0 14A10004 */ bne $a1, $at, .L801156C4 /* ABDB4 801156B4 3C018000 */ lui $at, (0x80000000 >> 16) /* ABDB8 801156B8 14C10002 */ bne $a2, $at, .L801156C4 /* ABDBC 801156BC 00000000 */ nop /* ABDC0 801156C0 0006000D */ break 6 .L801156C4: /* ABDC4 801156C4 00001012 */ mflo $v0 /* ABDC8 801156C8 184000C1 */ blez $v0, .L801159D0 /* ABDCC 801156CC 00000000 */ nop /* ABDD0 801156D0 96630022 */ lhu $v1, 0x22($s3) /* ABDD4 801156D4 14A00002 */ bnez $a1, .L801156E0 /* ABDD8 801156D8 0065001A */ div $zero, $v1, $a1 /* ABDDC 801156DC 0007000D */ break 7 .L801156E0: /* ABDE0 801156E0 2401FFFF */ addiu $at, $zero, -0x1 /* ABDE4 801156E4 14A10004 */ bne $a1, $at, .L801156F8 /* ABDE8 801156E8 3C018000 */ lui $at, (0x80000000 >> 16) /* ABDEC 801156EC 14610002 */ bne $v1, $at, .L801156F8 /* ABDF0 801156F0 00000000 */ nop /* ABDF4 801156F4 0006000D */ break 6 .L801156F8: /* ABDF8 801156F8 00001012 */ mflo $v0 /* ABDFC 801156FC 00000000 */ nop /* ABE00 80115700 00000000 */ nop /* ABE04 80115704 00460018 */ mult $v0, $a2 /* ABE08 80115708 00005012 */ mflo $t2 /* ABE0C 8011570C 00000000 */ nop /* ABE10 80115710 14A00002 */ bnez $a1, .L8011571C /* ABE14 80115714 0145001A */ div $zero, $t2, $a1 /* ABE18 80115718 0007000D */ break 7 .L8011571C: /* ABE1C 8011571C 2401FFFF */ addiu $at, $zero, -0x1 /* ABE20 80115720 14A10004 */ bne $a1, $at, .L80115734 /* ABE24 80115724 3C018000 */ lui $at, (0x80000000 >> 16) /* ABE28 80115728 15410002 */ bne $t2, $at, .L80115734 /* ABE2C 8011572C 00000000 */ nop /* ABE30 80115730 0006000D */ break 6 .L80115734: /* ABE34 80115734 00002012 */ mflo $a0 /* ABE38 80115738 00052840 */ sll $a1, $a1, 1 /* ABE3C 8011573C 14A00002 */ bnez $a1, .L80115748 /* ABE40 80115740 0065001A */ div $zero, $v1, $a1 /* ABE44 80115744 0007000D */ break 7 .L80115748: /* ABE48 80115748 2401FFFF */ addiu $at, $zero, -0x1 /* ABE4C 8011574C 14A10004 */ bne $a1, $at, .L80115760 /* ABE50 80115750 3C018000 */ lui $at, (0x80000000 >> 16) /* ABE54 80115754 14610002 */ bne $v1, $at, .L80115760 /* ABE58 80115758 00000000 */ nop /* ABE5C 8011575C 0006000D */ break 6 .L80115760: /* ABE60 80115760 00001012 */ mflo $v0 /* ABE64 80115764 28420008 */ slti $v0, $v0, 0x8 /* ABE68 80115768 14400099 */ bnez $v0, .L801159D0 /* ABE6C 8011576C 02449021 */ addu $s2, $s2, $a0 /* ABE70 80115770 080455A8 */ j .L801156A0 /* ABE74 80115774 00000000 */ nop .L80115778: /* ABE78 80115778 9662002C */ lhu $v0, 0x2C($s3) /* ABE7C 8011577C 30430F00 */ andi $v1, $v0, 0xF00 /* ABE80 80115780 24020200 */ addiu $v0, $zero, 0x200 /* ABE84 80115784 14620049 */ bne $v1, $v0, .L801158AC /* ABE88 80115788 24020300 */ addiu $v0, $zero, 0x300 /* ABE8C 8011578C 92620029 */ lbu $v0, 0x29($s3) /* ABE90 80115790 5457008F */ bnel $v0, $s7, .L801159D0 /* ABE94 80115794 00129040 */ sll $s2, $s2, 1 /* ABE98 80115798 96670022 */ lhu $a3, 0x22($s3) /* ABE9C 8011579C 24040002 */ addiu $a0, $zero, 0x2 /* ABEA0 801157A0 14800002 */ bnez $a0, .L801157AC /* ABEA4 801157A4 00E4001A */ div $zero, $a3, $a0 /* ABEA8 801157A8 0007000D */ break 7 .L801157AC: /* ABEAC 801157AC 2401FFFF */ addiu $at, $zero, -0x1 /* ABEB0 801157B0 14810004 */ bne $a0, $at, .L801157C4 /* ABEB4 801157B4 3C018000 */ lui $at, (0x80000000 >> 16) /* ABEB8 801157B8 14E10002 */ bne $a3, $at, .L801157C4 /* ABEBC 801157BC 00000000 */ nop /* ABEC0 801157C0 0006000D */ break 6 .L801157C4: /* ABEC4 801157C4 00001012 */ mflo $v0 /* ABEC8 801157C8 28420004 */ slti $v0, $v0, 0x4 /* ABECC 801157CC 54400080 */ bnel $v0, $zero, .L801159D0 /* ABED0 801157D0 00129040 */ sll $s2, $s2, 1 /* ABED4 801157D4 96660026 */ lhu $a2, 0x26($s3) .L801157D8: /* ABED8 801157D8 14800002 */ bnez $a0, .L801157E4 /* ABEDC 801157DC 00C4001A */ div $zero, $a2, $a0 /* ABEE0 801157E0 0007000D */ break 7 .L801157E4: /* ABEE4 801157E4 2401FFFF */ addiu $at, $zero, -0x1 /* ABEE8 801157E8 14810004 */ bne $a0, $at, .L801157FC /* ABEEC 801157EC 3C018000 */ lui $at, (0x80000000 >> 16) /* ABEF0 801157F0 14C10002 */ bne $a2, $at, .L801157FC /* ABEF4 801157F4 00000000 */ nop /* ABEF8 801157F8 0006000D */ break 6 .L801157FC: /* ABEFC 801157FC 00001012 */ mflo $v0 /* ABF00 80115800 58400073 */ blezl $v0, .L801159D0 /* ABF04 80115804 00129040 */ sll $s2, $s2, 1 /* ABF08 80115808 14800002 */ bnez $a0, .L80115814 /* ABF0C 8011580C 00E4001A */ div $zero, $a3, $a0 /* ABF10 80115810 0007000D */ break 7 .L80115814: /* ABF14 80115814 2401FFFF */ addiu $at, $zero, -0x1 /* ABF18 80115818 14810004 */ bne $a0, $at, .L8011582C /* ABF1C 8011581C 3C018000 */ lui $at, (0x80000000 >> 16) /* ABF20 80115820 14E10002 */ bne $a3, $at, .L8011582C /* ABF24 80115824 00000000 */ nop /* ABF28 80115828 0006000D */ break 6 .L8011582C: /* ABF2C 8011582C 00001012 */ mflo $v0 /* ABF30 80115830 00000000 */ nop /* ABF34 80115834 00000000 */ nop /* ABF38 80115838 00460018 */ mult $v0, $a2 /* ABF3C 8011583C 00001812 */ mflo $v1 /* ABF40 80115840 00000000 */ nop /* ABF44 80115844 14800002 */ bnez $a0, .L80115850 /* ABF48 80115848 0064001A */ div $zero, $v1, $a0 /* ABF4C 8011584C 0007000D */ break 7 .L80115850: /* ABF50 80115850 2401FFFF */ addiu $at, $zero, -0x1 /* ABF54 80115854 14810004 */ bne $a0, $at, .L80115868 /* ABF58 80115858 3C018000 */ lui $at, (0x80000000 >> 16) /* ABF5C 8011585C 14610002 */ bne $v1, $at, .L80115868 /* ABF60 80115860 00000000 */ nop /* ABF64 80115864 0006000D */ break 6 .L80115868: /* ABF68 80115868 00001812 */ mflo $v1 /* ABF6C 8011586C 00042040 */ sll $a0, $a0, 1 /* ABF70 80115870 14800002 */ bnez $a0, .L8011587C /* ABF74 80115874 00E4001A */ div $zero, $a3, $a0 /* ABF78 80115878 0007000D */ break 7 .L8011587C: /* ABF7C 8011587C 2401FFFF */ addiu $at, $zero, -0x1 /* ABF80 80115880 14810004 */ bne $a0, $at, .L80115894 /* ABF84 80115884 3C018000 */ lui $at, (0x80000000 >> 16) /* ABF88 80115888 14E10002 */ bne $a3, $at, .L80115894 /* ABF8C 8011588C 00000000 */ nop /* ABF90 80115890 0006000D */ break 6 .L80115894: /* ABF94 80115894 00001012 */ mflo $v0 /* ABF98 80115898 28420004 */ slti $v0, $v0, 0x4 /* ABF9C 8011589C 1040FFCE */ beqz $v0, .L801157D8 /* ABFA0 801158A0 02439021 */ addu $s2, $s2, $v1 /* ABFA4 801158A4 08045674 */ j .L801159D0 /* ABFA8 801158A8 00129040 */ sll $s2, $s2, 1 .L801158AC: /* ABFAC 801158AC 14620048 */ bne $v1, $v0, .L801159D0 /* ABFB0 801158B0 00000000 */ nop /* ABFB4 801158B4 92620029 */ lbu $v0, 0x29($s3) /* ABFB8 801158B8 54570045 */ bnel $v0, $s7, .L801159D0 /* ABFBC 801158BC 00129080 */ sll $s2, $s2, 2 /* ABFC0 801158C0 96670022 */ lhu $a3, 0x22($s3) /* ABFC4 801158C4 24040002 */ addiu $a0, $zero, 0x2 /* ABFC8 801158C8 14800002 */ bnez $a0, .L801158D4 /* ABFCC 801158CC 00E4001A */ div $zero, $a3, $a0 /* ABFD0 801158D0 0007000D */ break 7 .L801158D4: /* ABFD4 801158D4 2401FFFF */ addiu $at, $zero, -0x1 /* ABFD8 801158D8 14810004 */ bne $a0, $at, .L801158EC /* ABFDC 801158DC 3C018000 */ lui $at, (0x80000000 >> 16) /* ABFE0 801158E0 14E10002 */ bne $a3, $at, .L801158EC /* ABFE4 801158E4 00000000 */ nop /* ABFE8 801158E8 0006000D */ break 6 .L801158EC: /* ABFEC 801158EC 00001012 */ mflo $v0 /* ABFF0 801158F0 0044102A */ slt $v0, $v0, $a0 /* ABFF4 801158F4 54400036 */ bnel $v0, $zero, .L801159D0 /* ABFF8 801158F8 00129080 */ sll $s2, $s2, 2 /* ABFFC 801158FC 96660026 */ lhu $a2, 0x26($s3) .L80115900: /* AC000 80115900 14800002 */ bnez $a0, .L8011590C /* AC004 80115904 00C4001A */ div $zero, $a2, $a0 /* AC008 80115908 0007000D */ break 7 .L8011590C: /* AC00C 8011590C 2401FFFF */ addiu $at, $zero, -0x1 /* AC010 80115910 14810004 */ bne $a0, $at, .L80115924 /* AC014 80115914 3C018000 */ lui $at, (0x80000000 >> 16) /* AC018 80115918 14C10002 */ bne $a2, $at, .L80115924 /* AC01C 8011591C 00000000 */ nop /* AC020 80115920 0006000D */ break 6 .L80115924: /* AC024 80115924 00001012 */ mflo $v0 /* AC028 80115928 58400029 */ blezl $v0, .L801159D0 /* AC02C 8011592C 00129080 */ sll $s2, $s2, 2 /* AC030 80115930 14800002 */ bnez $a0, .L8011593C /* AC034 80115934 00E4001A */ div $zero, $a3, $a0 /* AC038 80115938 0007000D */ break 7 .L8011593C: /* AC03C 8011593C 2401FFFF */ addiu $at, $zero, -0x1 /* AC040 80115940 14810004 */ bne $a0, $at, .L80115954 /* AC044 80115944 3C018000 */ lui $at, (0x80000000 >> 16) /* AC048 80115948 14E10002 */ bne $a3, $at, .L80115954 /* AC04C 8011594C 00000000 */ nop /* AC050 80115950 0006000D */ break 6 .L80115954: /* AC054 80115954 00001012 */ mflo $v0 /* AC058 80115958 00000000 */ nop /* AC05C 8011595C 00000000 */ nop /* AC060 80115960 00460018 */ mult $v0, $a2 /* AC064 80115964 00001812 */ mflo $v1 /* AC068 80115968 00000000 */ nop /* AC06C 8011596C 14800002 */ bnez $a0, .L80115978 /* AC070 80115970 0064001A */ div $zero, $v1, $a0 /* AC074 80115974 0007000D */ break 7 .L80115978: /* AC078 80115978 2401FFFF */ addiu $at, $zero, -0x1 /* AC07C 8011597C 14810004 */ bne $a0, $at, .L80115990 /* AC080 80115980 3C018000 */ lui $at, (0x80000000 >> 16) /* AC084 80115984 14610002 */ bne $v1, $at, .L80115990 /* AC088 80115988 00000000 */ nop /* AC08C 8011598C 0006000D */ break 6 .L80115990: /* AC090 80115990 00001812 */ mflo $v1 /* AC094 80115994 00042040 */ sll $a0, $a0, 1 /* AC098 80115998 14800002 */ bnez $a0, .L801159A4 /* AC09C 8011599C 00E4001A */ div $zero, $a3, $a0 /* AC0A0 801159A0 0007000D */ break 7 .L801159A4: /* AC0A4 801159A4 2401FFFF */ addiu $at, $zero, -0x1 /* AC0A8 801159A8 14810004 */ bne $a0, $at, .L801159BC /* AC0AC 801159AC 3C018000 */ lui $at, (0x80000000 >> 16) /* AC0B0 801159B0 14E10002 */ bne $a3, $at, .L801159BC /* AC0B4 801159B4 00000000 */ nop /* AC0B8 801159B8 0006000D */ break 6 .L801159BC: /* AC0BC 801159BC 00001012 */ mflo $v0 /* AC0C0 801159C0 28420002 */ slti $v0, $v0, 0x2 /* AC0C4 801159C4 1040FFCE */ beqz $v0, .L80115900 /* AC0C8 801159C8 02439021 */ addu $s2, $s2, $v1 /* AC0CC 801159CC 00129080 */ sll $s2, $s2, 2 .L801159D0: /* AC0D0 801159D0 9662002A */ lhu $v0, 0x2A($s3) /* AC0D4 801159D4 24030002 */ addiu $v1, $zero, 0x2 /* AC0D8 801159D8 3042000F */ andi $v0, $v0, 0xF /* AC0DC 801159DC 14430007 */ bne $v0, $v1, .L801159FC /* AC0E0 801159E0 0000A02D */ daddu $s4, $zero, $zero /* AC0E4 801159E4 9662002C */ lhu $v0, 0x2C($s3) /* AC0E8 801159E8 24080100 */ addiu $t0, $zero, 0x100 /* AC0EC 801159EC 30420F00 */ andi $v0, $v0, 0xF00 /* AC0F0 801159F0 14480002 */ bne $v0, $t0, .L801159FC /* AC0F4 801159F4 24140020 */ addiu $s4, $zero, 0x20 /* AC0F8 801159F8 24140200 */ addiu $s4, $zero, 0x200 .L801159FC: /* AC0FC 801159FC 92630029 */ lbu $v1, 0x29($s3) /* AC100 80115A00 24020003 */ addiu $v0, $zero, 0x3 /* AC104 80115A04 1462001E */ bne $v1, $v0, .L80115A80 /* AC108 80115A08 0000882D */ daddu $s1, $zero, $zero /* AC10C 80115A0C 96640020 */ lhu $a0, 0x20($s3) /* AC110 80115A10 96620024 */ lhu $v0, 0x24($s3) /* AC114 80115A14 00820018 */ mult $a0, $v0 /* AC118 80115A18 9663002C */ lhu $v1, 0x2C($s3) /* AC11C 80115A1C 3063F000 */ andi $v1, $v1, 0xF000 /* AC120 80115A20 00008012 */ mflo $s0 /* AC124 80115A24 14600003 */ bnez $v1, .L80115A34 /* AC128 80115A28 00000000 */ nop /* AC12C 80115A2C 08045695 */ j .L80115A54 /* AC130 80115A30 00108042 */ srl $s0, $s0, 1 .L80115A34: /* AC134 80115A34 107E0007 */ beq $v1, $fp, .L80115A54 /* AC138 80115A38 24022000 */ addiu $v0, $zero, 0x2000 /* AC13C 80115A3C 14620003 */ bne $v1, $v0, .L80115A4C /* AC140 80115A40 24023000 */ addiu $v0, $zero, 0x3000 /* AC144 80115A44 08045695 */ j .L80115A54 /* AC148 80115A48 00108040 */ sll $s0, $s0, 1 .L80115A4C: /* AC14C 80115A4C 50620001 */ beql $v1, $v0, .L80115A54 /* AC150 80115A50 00108080 */ sll $s0, $s0, 2 .L80115A54: /* AC154 80115A54 9662002A */ lhu $v0, 0x2A($s3) /* AC158 80115A58 24030020 */ addiu $v1, $zero, 0x20 /* AC15C 80115A5C 304200F0 */ andi $v0, $v0, 0xF0 /* AC160 80115A60 14430008 */ bne $v0, $v1, .L80115A84 /* AC164 80115A64 0000882D */ daddu $s1, $zero, $zero /* AC168 80115A68 9662002C */ lhu $v0, 0x2C($s3) /* AC16C 80115A6C 3042F000 */ andi $v0, $v0, 0xF000 /* AC170 80115A70 145E0004 */ bne $v0, $fp, .L80115A84 /* AC174 80115A74 0060882D */ daddu $s1, $v1, $zero /* AC178 80115A78 080456A1 */ j .L80115A84 /* AC17C 80115A7C 24110200 */ addiu $s1, $zero, 0x200 .L80115A80: /* AC180 80115A80 0220802D */ daddu $s0, $s1, $zero .L80115A84: /* AC184 80115A84 26D60044 */ addiu $s6, $s6, 0x44 /* AC188 80115A88 26A40030 */ addiu $a0, $s5, 0x30 /* AC18C 80115A8C 3C058016 */ lui $a1, %hi(mdl_textureHandles) /* AC190 80115A90 24A5A590 */ addiu $a1, $a1, %lo(mdl_textureHandles) /* AC194 80115A94 02C52821 */ addu $a1, $s6, $a1 /* AC198 80115A98 0260302D */ daddu $a2, $s3, $zero /* AC19C 80115A9C 0240382D */ daddu $a3, $s2, $zero /* AC1A0 80115AA0 AFB40010 */ sw $s4, 0x10($sp) /* AC1A4 80115AA4 AFB00014 */ sw $s0, 0x14($sp) /* AC1A8 80115AA8 0C0452D6 */ jal func_80114B58 /* AC1AC 80115AAC AFB10018 */ sw $s1, 0x18($sp) /* AC1B0 80115AB0 02541021 */ addu $v0, $s2, $s4 /* AC1B4 80115AB4 24420030 */ addiu $v0, $v0, 0x30 /* AC1B8 80115AB8 02A2A821 */ addu $s5, $s5, $v0 /* AC1BC 80115ABC 02111021 */ addu $v0, $s0, $s1 /* AC1C0 80115AC0 8FA80080 */ lw $t0, 0x80($sp) /* AC1C4 80115AC4 8FA90084 */ lw $t1, 0x84($sp) /* AC1C8 80115AC8 02A2A821 */ addu $s5, $s5, $v0 /* AC1CC 80115ACC 01091021 */ addu $v0, $t0, $t1 /* AC1D0 80115AD0 02A2102B */ sltu $v0, $s5, $v0 /* AC1D4 80115AD4 1440FE89 */ bnez $v0, .L801154FC /* AC1D8 80115AD8 02A0202D */ daddu $a0, $s5, $zero .L80115ADC: /* AC1DC 80115ADC 8FBF0074 */ lw $ra, 0x74($sp) /* AC1E0 80115AE0 8FBE0070 */ lw $fp, 0x70($sp) /* AC1E4 80115AE4 8FB7006C */ lw $s7, 0x6C($sp) /* AC1E8 80115AE8 8FB60068 */ lw $s6, 0x68($sp) /* AC1EC 80115AEC 8FB50064 */ lw $s5, 0x64($sp) /* AC1F0 80115AF0 8FB40060 */ lw $s4, 0x60($sp) /* AC1F4 80115AF4 8FB3005C */ lw $s3, 0x5C($sp) /* AC1F8 80115AF8 8FB20058 */ lw $s2, 0x58($sp) /* AC1FC 80115AFC 8FB10054 */ lw $s1, 0x54($sp) /* AC200 80115B00 8FB00050 */ lw $s0, 0x50($sp) /* AC204 80115B04 03E00008 */ jr $ra /* AC208 80115B08 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: void func_80115498(u32 romOffset, s32 textureID, s32 baseOffset, s32 size) { u32 offset; TextureHeader sp20; u32 rasterSize; s32 paletteSize; u32 auxRasterSize; u32 auxPaletteSize; s32 bitDepth; s32 mainSize; TextureHeader* header; s32 currentTextureID = textureID; for (offset = romOffset; offset < baseOffset + size;) { dma_copy((u8*)offset, (u8*)offset + sizeof(sp20), &sp20); header = &sp20; if (header->unk_28 == 0) { break; } rasterSize = header->mainW * header->mainH; if (header->mainBitDepth == G_IM_SIZ_4b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 16 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } rasterSize /= 2; } else if (header->mainBitDepth == G_IM_SIZ_8b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 8 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } } else { do {} while (0); if (header->mainBitDepth == G_IM_SIZ_16b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 4 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } rasterSize *= 2; } else if (header->mainBitDepth == G_IM_SIZ_32b) { if (header->extraTiles == EXTRA_TILE_MIPMAPS) { s32 d = 2; while (header->mainW / d >= 2 && header->mainH / d > 0) { rasterSize += header->mainW / d * header->mainH / d; d *= 2; } } rasterSize *= 4; } } if (header->mainFmt == G_IM_FMT_CI) { paletteSize = 0x20; if (header->mainBitDepth == G_IM_SIZ_8b) { paletteSize = 0x200; } } else { paletteSize = 0; } if (header->extraTiles == EXTRA_TILE_AUX_INDEPENDENT) { auxRasterSize = header->auxW * header->auxH; if (header->auxBitDepth == G_IM_SIZ_4b) { auxRasterSize /= 2; } else if (header->auxBitDepth == G_IM_SIZ_8b) { } else if (header->auxBitDepth == G_IM_SIZ_16b) { auxRasterSize *= 2; } else { if (header->auxBitDepth == G_IM_SIZ_32b) { auxRasterSize *= 4; } } if (header->auxFmt == G_IM_FMT_CI) { auxPaletteSize = 0x20; if (header->auxBitDepth == G_IM_SIZ_8b) { auxPaletteSize = 0x200; } } else { auxPaletteSize = 0; } } else { auxPaletteSize = 0; auxRasterSize = 0; } currentTextureID = ++textureID; func_80114B58(offset + sizeof(*header), &mdl_textureHandles[currentTextureID], header, rasterSize, paletteSize, auxRasterSize, auxPaletteSize); mainSize = rasterSize + paletteSize + sizeof(*header); offset += mainSize; offset += auxRasterSize + auxPaletteSize; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel green_impact_appendGfx /* 365324 E0064414 27BDFEE8 */ addiu $sp, $sp, -0x118 /* 365328 E0064418 AFB300E4 */ sw $s3, 0xE4($sp) /* 36532C E006441C 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 365330 E0064420 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 365334 E0064424 AFBF00FC */ sw $ra, 0xFC($sp) /* 365338 E0064428 AFBE00F8 */ sw $fp, 0xF8($sp) /* 36533C E006442C AFB700F4 */ sw $s7, 0xF4($sp) /* 365340 E0064430 AFB600F0 */ sw $s6, 0xF0($sp) /* 365344 E0064434 AFB500EC */ sw $s5, 0xEC($sp) /* 365348 E0064438 AFB400E8 */ sw $s4, 0xE8($sp) /* 36534C E006443C AFB200E0 */ sw $s2, 0xE0($sp) /* 365350 E0064440 AFB100DC */ sw $s1, 0xDC($sp) /* 365354 E0064444 AFB000D8 */ sw $s0, 0xD8($sp) /* 365358 E0064448 F7B80110 */ sdc1 $f24, 0x110($sp) /* 36535C E006444C F7B60108 */ sdc1 $f22, 0x108($sp) /* 365360 E0064450 F7B40100 */ sdc1 $f20, 0x100($sp) /* 365364 E0064454 AFA40118 */ sw $a0, 0x118($sp) /* 365368 E0064458 8E680000 */ lw $t0, 0x0($s3) /* 36536C E006445C 8FAD0118 */ lw $t5, 0x118($sp) /* 365370 E0064460 4480A000 */ mtc1 $zero, $f20 /* 365374 E0064464 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 365378 E0064468 4481C000 */ mtc1 $at, $f24 /* 36537C E006446C 8DB1000C */ lw $s1, 0xC($t5) /* 365380 E0064470 4405A000 */ mfc1 $a1, $f20 /* 365384 E0064474 96220000 */ lhu $v0, 0x0($s1) /* 365388 E0064478 922D0050 */ lbu $t5, 0x50($s1) /* 36538C E006447C 00021080 */ sll $v0, $v0, 2 /* 365390 E0064480 3C09E006 */ lui $t1, (0xE0064A60 >> 16) /* 365394 E0064484 01224821 */ addu $t1, $t1, $v0 /* 365398 E0064488 8D294A60 */ lw $t1, (0xE0064A60 & 0xFFFF)($t1) /* 36539C E006448C 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3653A0 E0064490 AFAD00A4 */ sw $t5, 0xA4($sp) /* 3653A4 E0064494 922D0051 */ lbu $t5, 0x51($s1) /* 3653A8 E0064498 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3653AC E006449C AFAD00A8 */ sw $t5, 0xA8($sp) /* 3653B0 E00644A0 922D0052 */ lbu $t5, 0x52($s1) /* 3653B4 E00644A4 27A40020 */ addiu $a0, $sp, 0x20 /* 3653B8 E00644A8 AFAD00AC */ sw $t5, 0xAC($sp) /* 3653BC E00644AC 922D0053 */ lbu $t5, 0x53($s1) /* 3653C0 E00644B0 0100182D */ daddu $v1, $t0, $zero /* 3653C4 E00644B4 AFAD00B0 */ sw $t5, 0xB0($sp) /* 3653C8 E00644B8 922D0054 */ lbu $t5, 0x54($s1) /* 3653CC E00644BC 25080008 */ addiu $t0, $t0, 0x8 /* 3653D0 E00644C0 AFAD00B4 */ sw $t5, 0xB4($sp) /* 3653D4 E00644C4 922D0055 */ lbu $t5, 0x55($s1) /* 3653D8 E00644C8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3653DC E00644CC AFAD00B8 */ sw $t5, 0xB8($sp) /* 3653E0 E00644D0 AC620000 */ sw $v0, 0x0($v1) /* 3653E4 E00644D4 AC600004 */ sw $zero, 0x4($v1) /* 3653E8 E00644D8 AD060000 */ sw $a2, 0x0($t0) /* 3653EC E00644DC 8FAD0118 */ lw $t5, 0x118($sp) /* 3653F0 E00644E0 4407A000 */ mfc1 $a3, $f20 /* 3653F4 E00644E4 8DA20010 */ lw $v0, 0x10($t5) /* 3653F8 E00644E8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3653FC E00644EC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 365400 E00644F0 8C46001C */ lw $a2, 0x1C($v0) /* 365404 E00644F4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 365408 E00644F8 AD020008 */ sw $v0, 0x8($t0) /* 36540C E00644FC 3C028000 */ lui $v0, (0x80000000 >> 16) /* 365410 E0064500 AD09000C */ sw $t1, 0xC($t0) /* 365414 E0064504 00C23021 */ addu $a2, $a2, $v0 /* 365418 E0064508 00031080 */ sll $v0, $v1, 2 /* 36541C E006450C 00431021 */ addu $v0, $v0, $v1 /* 365420 E0064510 00021080 */ sll $v0, $v0, 2 /* 365424 E0064514 00431023 */ subu $v0, $v0, $v1 /* 365428 E0064518 000218C0 */ sll $v1, $v0, 3 /* 36542C E006451C 00431021 */ addu $v0, $v0, $v1 /* 365430 E0064520 000210C0 */ sll $v0, $v0, 3 /* 365434 E0064524 AD060004 */ sw $a2, 0x4($t0) /* 365438 E0064528 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 36543C E006452C 00220821 */ addu $at, $at, $v0 /* 365440 E0064530 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 365444 E0064534 3C100001 */ lui $s0, (0x11630 >> 16) /* 365448 E0064538 AE680000 */ sw $t0, 0x0($s3) /* 36544C E006453C E7B80010 */ swc1 $f24, 0x10($sp) /* 365450 E0064540 C6200004 */ lwc1 $f0, 0x4($s1) /* 365454 E0064544 25020008 */ addiu $v0, $t0, 0x8 /* 365458 E0064548 AE620000 */ sw $v0, 0x0($s3) /* 36545C E006454C 46001087 */ neg.s $f2, $f2 /* 365460 E0064550 E7A00014 */ swc1 $f0, 0x14($sp) /* 365464 E0064554 C6200008 */ lwc1 $f0, 0x8($s1) /* 365468 E0064558 44061000 */ mfc1 $a2, $f2 /* 36546C E006455C 25080010 */ addiu $t0, $t0, 0x10 /* 365470 E0064560 AE680000 */ sw $t0, 0x0($s3) /* 365474 E0064564 E7A00018 */ swc1 $f0, 0x18($sp) /* 365478 E0064568 C620000C */ lwc1 $f0, 0xC($s1) /* 36547C E006456C 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 365480 E0064570 0C080180 */ jal shim_guPositionF /* 365484 E0064574 E7A0001C */ swc1 $f0, 0x1C($sp) /* 365488 E0064578 27A40020 */ addiu $a0, $sp, 0x20 /* 36548C E006457C 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 365490 E0064580 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 365494 E0064584 3C16800A */ lui $s6, %hi(gDisplayContext) /* 365498 E0064588 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 36549C E006458C 96A50000 */ lhu $a1, 0x0($s5) /* 3654A0 E0064590 8EC20000 */ lw $v0, 0x0($s6) /* 3654A4 E0064594 00052980 */ sll $a1, $a1, 6 /* 3654A8 E0064598 00B02821 */ addu $a1, $a1, $s0 /* 3654AC E006459C 0C080118 */ jal shim_guMtxF2L /* 3654B0 E00645A0 00452821 */ addu $a1, $v0, $a1 /* 3654B4 E00645A4 24140001 */ addiu $s4, $zero, 0x1 /* 3654B8 E00645A8 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 3654BC E00645AC 8E650000 */ lw $a1, 0x0($s3) /* 3654C0 E00645B0 96A40000 */ lhu $a0, 0x0($s5) /* 3654C4 E00645B4 00A0302D */ daddu $a2, $a1, $zero /* 3654C8 E00645B8 24A50008 */ addiu $a1, $a1, 0x8 /* 3654CC E00645BC ACC20000 */ sw $v0, 0x0($a2) /* 3654D0 E00645C0 3082FFFF */ andi $v0, $a0, 0xFFFF /* 3654D4 E00645C4 00021180 */ sll $v0, $v0, 6 /* 3654D8 E00645C8 00501021 */ addu $v0, $v0, $s0 /* 3654DC E00645CC 00942021 */ addu $a0, $a0, $s4 /* 3654E0 E00645D0 8EC30000 */ lw $v1, 0x0($s6) /* 3654E4 E00645D4 00A0B82D */ daddu $s7, $a1, $zero /* 3654E8 E00645D8 00621821 */ addu $v1, $v1, $v0 /* 3654EC E00645DC ACC30004 */ sw $v1, 0x4($a2) /* 3654F0 E00645E0 8E2D0038 */ lw $t5, 0x38($s1) /* 3654F4 E00645E4 26E30008 */ addiu $v1, $s7, 0x8 /* 3654F8 E00645E8 AFAD00A0 */ sw $t5, 0xA0($sp) /* 3654FC E00645EC AE650000 */ sw $a1, 0x0($s3) /* 365500 E00645F0 A6A40000 */ sh $a0, 0x0($s5) /* 365504 E00645F4 AE630000 */ sw $v1, 0x0($s3) /* 365508 E00645F8 8FAD00A4 */ lw $t5, 0xA4($sp) /* 36550C E00645FC AFAD00BC */ sw $t5, 0xBC($sp) /* 365510 E0064600 8FAD00A8 */ lw $t5, 0xA8($sp) /* 365514 E0064604 AFAD00C0 */ sw $t5, 0xC0($sp) /* 365518 E0064608 8FAD00AC */ lw $t5, 0xAC($sp) /* 36551C E006460C AFAD00C4 */ sw $t5, 0xC4($sp) /* 365520 E0064610 8FAD00B0 */ lw $t5, 0xB0($sp) /* 365524 E0064614 AFAD00C8 */ sw $t5, 0xC8($sp) /* 365528 E0064618 8FAD00B4 */ lw $t5, 0xB4($sp) /* 36552C E006461C AFAD00CC */ sw $t5, 0xCC($sp) /* 365530 E0064620 8FAD00B8 */ lw $t5, 0xB8($sp) /* 365534 E0064624 AFAD00D0 */ sw $t5, 0xD0($sp) /* 365538 E0064628 8FAD0118 */ lw $t5, 0x118($sp) /* 36553C E006462C 8DA20008 */ lw $v0, 0x8($t5) /* 365540 E0064630 26310058 */ addiu $s1, $s1, 0x58 /* 365544 E0064634 0282102A */ slt $v0, $s4, $v0 /* 365548 E0064638 10400090 */ beqz $v0, .LE006487C /* 36554C E006463C AFA300D4 */ sw $v1, 0xD4($sp) /* 365550 E0064640 27B20060 */ addiu $s2, $sp, 0x60 /* 365554 E0064644 4600A586 */ mov.s $f22, $f20 /* 365558 E0064648 3C01E006 */ lui $at, (0xE0064A90 >> 16) /* 36555C E006464C D4344A90 */ ldc1 $f20, (0xE0064A90 & 0xFFFF)($at) /* 365560 E0064650 02A0B02D */ daddu $s6, $s5, $zero /* 365564 E0064654 3C150001 */ lui $s5, (0x11630 >> 16) /* 365568 E0064658 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 36556C E006465C 3C1EF200 */ lui $fp, (0xF2000000 >> 16) /* 365570 E0064660 26300044 */ addiu $s0, $s1, 0x44 .LE0064664: /* 365574 E0064664 8E020008 */ lw $v0, 0x8($s0) /* 365578 E0064668 0440007E */ bltz $v0, .LE0064864 /* 36557C E006466C 00000000 */ nop /* 365580 E0064670 8E05FFC0 */ lw $a1, -0x40($s0) /* 365584 E0064674 8E06FFC4 */ lw $a2, -0x3C($s0) /* 365588 E0064678 8E07FFC8 */ lw $a3, -0x38($s0) /* 36558C E006467C 0C080108 */ jal shim_guTranslateF /* 365590 E0064680 27A40020 */ addiu $a0, $sp, 0x20 /* 365594 E0064684 E7B80010 */ swc1 $f24, 0x10($sp) /* 365598 E0064688 8E05FFF0 */ lw $a1, -0x10($s0) /* 36559C E006468C 4406B000 */ mfc1 $a2, $f22 /* 3655A0 E0064690 4407B000 */ mfc1 $a3, $f22 /* 3655A4 E0064694 0C080104 */ jal shim_guRotateF /* 3655A8 E0064698 0240202D */ daddu $a0, $s2, $zero /* 3655AC E006469C 0240202D */ daddu $a0, $s2, $zero /* 3655B0 E00646A0 27A50020 */ addiu $a1, $sp, 0x20 /* 3655B4 E00646A4 0C080114 */ jal shim_guMtxCatF /* 3655B8 E00646A8 00A0302D */ daddu $a2, $a1, $zero /* 3655BC E00646AC C604FFD8 */ lwc1 $f4, -0x28($s0) /* 3655C0 E00646B0 46002121 */ cvt.d.s $f4, $f4 /* 3655C4 E00646B4 46342102 */ mul.d $f4, $f4, $f20 /* 3655C8 E00646B8 00000000 */ nop /* 3655CC E00646BC C602FFDC */ lwc1 $f2, -0x24($s0) /* 3655D0 E00646C0 460010A1 */ cvt.d.s $f2, $f2 /* 3655D4 E00646C4 46341082 */ mul.d $f2, $f2, $f20 /* 3655D8 E00646C8 00000000 */ nop /* 3655DC E00646CC C600FFE0 */ lwc1 $f0, -0x20($s0) /* 3655E0 E00646D0 46000021 */ cvt.d.s $f0, $f0 /* 3655E4 E00646D4 46340002 */ mul.d $f0, $f0, $f20 /* 3655E8 E00646D8 00000000 */ nop /* 3655EC E00646DC 46202120 */ cvt.s.d $f4, $f4 /* 3655F0 E00646E0 462010A0 */ cvt.s.d $f2, $f2 /* 3655F4 E00646E4 46200020 */ cvt.s.d $f0, $f0 /* 3655F8 E00646E8 44052000 */ mfc1 $a1, $f4 /* 3655FC E00646EC 44061000 */ mfc1 $a2, $f2 /* 365600 E00646F0 44070000 */ mfc1 $a3, $f0 /* 365604 E00646F4 0C080110 */ jal shim_guScaleF /* 365608 E00646F8 0240202D */ daddu $a0, $s2, $zero /* 36560C E00646FC 0240202D */ daddu $a0, $s2, $zero /* 365610 E0064700 27A50020 */ addiu $a1, $sp, 0x20 /* 365614 E0064704 0C080114 */ jal shim_guMtxCatF /* 365618 E0064708 00A0302D */ daddu $a2, $a1, $zero /* 36561C E006470C E7B60010 */ swc1 $f22, 0x10($sp) /* 365620 E0064710 8E05FFEC */ lw $a1, -0x14($s0) /* 365624 E0064714 4406B000 */ mfc1 $a2, $f22 /* 365628 E0064718 4407C000 */ mfc1 $a3, $f24 /* 36562C E006471C 0C080104 */ jal shim_guRotateF /* 365630 E0064720 0240202D */ daddu $a0, $s2, $zero /* 365634 E0064724 0240202D */ daddu $a0, $s2, $zero /* 365638 E0064728 27A50020 */ addiu $a1, $sp, 0x20 /* 36563C E006472C 0C080114 */ jal shim_guMtxCatF /* 365640 E0064730 00A0302D */ daddu $a2, $a1, $zero /* 365644 E0064734 27A40020 */ addiu $a0, $sp, 0x20 /* 365648 E0064738 96C50000 */ lhu $a1, 0x0($s6) /* 36564C E006473C 3C02800A */ lui $v0, %hi(gDisplayContext) /* 365650 E0064740 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 365654 E0064744 00052980 */ sll $a1, $a1, 6 /* 365658 E0064748 00B52821 */ addu $a1, $a1, $s5 /* 36565C E006474C 0C080118 */ jal shim_guMtxF2L /* 365660 E0064750 00452821 */ addu $a1, $v0, $a1 /* 365664 E0064754 3C06000F */ lui $a2, (0xFC000 >> 16) /* 365668 E0064758 34C6C000 */ ori $a2, $a2, (0xFC000 & 0xFFFF) /* 36566C E006475C 3C080107 */ lui $t0, (0x107C000 >> 16) /* 365670 E0064760 3508C000 */ ori $t0, $t0, (0x107C000 & 0xFFFF) /* 365674 E0064764 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 365678 E0064768 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 36567C E006476C 8E630000 */ lw $v1, 0x0($s3) /* 365680 E0064770 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 365684 E0064774 0060282D */ daddu $a1, $v1, $zero /* 365688 E0064778 24630008 */ addiu $v1, $v1, 0x8 /* 36568C E006477C 4600018D */ trunc.w.s $f6, $f0 /* 365690 E0064780 44023000 */ mfc1 $v0, $f6 /* 365694 E0064784 00000000 */ nop /* 365698 E0064788 30420FFF */ andi $v0, $v0, 0xFFF /* 36569C E006478C 005E1025 */ or $v0, $v0, $fp /* 3656A0 E0064790 AE630000 */ sw $v1, 0x0($s3) /* 3656A4 E0064794 ACA20000 */ sw $v0, 0x0($a1) /* 3656A8 E0064798 24620008 */ addiu $v0, $v1, 0x8 /* 3656AC E006479C AE620000 */ sw $v0, 0x0($s3) /* 3656B0 E00647A0 96C40000 */ lhu $a0, 0x0($s6) /* 3656B4 E00647A4 24620010 */ addiu $v0, $v1, 0x10 /* 3656B8 E00647A8 AE620000 */ sw $v0, 0x0($s3) /* 3656BC E00647AC 24820001 */ addiu $v0, $a0, 0x1 /* 3656C0 E00647B0 A6C20000 */ sh $v0, 0x0($s6) /* 3656C4 E00647B4 24620018 */ addiu $v0, $v1, 0x18 /* 3656C8 E00647B8 3084FFFF */ andi $a0, $a0, 0xFFFF /* 3656CC E00647BC 00042180 */ sll $a0, $a0, 6 /* 3656D0 E00647C0 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 3656D4 E00647C4 00952021 */ addu $a0, $a0, $s5 /* 3656D8 E00647C8 AE620000 */ sw $v0, 0x0($s3) /* 3656DC E00647CC 4600018D */ trunc.w.s $f6, $f0 /* 3656E0 E00647D0 44023000 */ mfc1 $v0, $f6 /* 3656E4 E00647D4 00000000 */ nop /* 3656E8 E00647D8 2442007C */ addiu $v0, $v0, 0x7C /* 3656EC E00647DC 30420FFF */ andi $v0, $v0, 0xFFF /* 3656F0 E00647E0 00461025 */ or $v0, $v0, $a2 /* 3656F4 E00647E4 ACA20004 */ sw $v0, 0x4($a1) /* 3656F8 E00647E8 C6000000 */ lwc1 $f0, 0x0($s0) /* 3656FC E00647EC 24620020 */ addiu $v0, $v1, 0x20 /* 365700 E00647F0 AE620000 */ sw $v0, 0x0($s3) /* 365704 E00647F4 4600018D */ trunc.w.s $f6, $f0 /* 365708 E00647F8 44023000 */ mfc1 $v0, $f6 /* 36570C E00647FC 00000000 */ nop /* 365710 E0064800 30420FFF */ andi $v0, $v0, 0xFFF /* 365714 E0064804 005E1025 */ or $v0, $v0, $fp /* 365718 E0064808 AC620000 */ sw $v0, 0x0($v1) /* 36571C E006480C C6000000 */ lwc1 $f0, 0x0($s0) /* 365720 E0064810 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 365724 E0064814 AC620008 */ sw $v0, 0x8($v1) /* 365728 E0064818 3C02800A */ lui $v0, %hi(gDisplayContext) /* 36572C E006481C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 365730 E0064820 3C0D0900 */ lui $t5, %hi(D_09000540_4155A0) /* 365734 E0064824 25AD0540 */ addiu $t5, $t5, %lo(D_09000540_4155A0) /* 365738 E0064828 AC6D0014 */ sw $t5, 0x14($v1) /* 36573C E006482C AC670018 */ sw $a3, 0x18($v1) /* 365740 E0064830 00441021 */ addu $v0, $v0, $a0 /* 365744 E0064834 AC62000C */ sw $v0, 0xC($v1) /* 365748 E0064838 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 36574C E006483C AC620010 */ sw $v0, 0x10($v1) /* 365750 E0064840 24020040 */ addiu $v0, $zero, 0x40 /* 365754 E0064844 AC62001C */ sw $v0, 0x1C($v1) /* 365758 E0064848 4600018D */ trunc.w.s $f6, $f0 /* 36575C E006484C 44023000 */ mfc1 $v0, $f6 /* 365760 E0064850 00000000 */ nop /* 365764 E0064854 2442007C */ addiu $v0, $v0, 0x7C /* 365768 E0064858 30420FFF */ andi $v0, $v0, 0xFFF /* 36576C E006485C 00481025 */ or $v0, $v0, $t0 /* 365770 E0064860 AC620004 */ sw $v0, 0x4($v1) .LE0064864: /* 365774 E0064864 8FAD0118 */ lw $t5, 0x118($sp) /* 365778 E0064868 26940001 */ addiu $s4, $s4, 0x1 /* 36577C E006486C 8DA20008 */ lw $v0, 0x8($t5) /* 365780 E0064870 0282102A */ slt $v0, $s4, $v0 /* 365784 E0064874 1440FF7B */ bnez $v0, .LE0064664 /* 365788 E0064878 26100058 */ addiu $s0, $s0, 0x58 .LE006487C: /* 36578C E006487C 3C0AD9FF */ lui $t2, (0xD9FFF9FF >> 16) /* 365790 E0064880 354AF9FF */ ori $t2, $t2, (0xD9FFF9FF & 0xFFFF) /* 365794 E0064884 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 365798 E0064888 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 36579C E006488C 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 3657A0 E0064890 8CA30000 */ lw $v1, 0x0($a1) /* 3657A4 E0064894 3C09FA00 */ lui $t1, (0xFA000000 >> 16) /* 3657A8 E0064898 0060202D */ daddu $a0, $v1, $zero /* 3657AC E006489C 24630008 */ addiu $v1, $v1, 0x8 /* 3657B0 E00648A0 ACA30000 */ sw $v1, 0x0($a1) /* 3657B4 E00648A4 AC820000 */ sw $v0, 0x0($a0) /* 3657B8 E00648A8 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3657BC E00648AC AC800004 */ sw $zero, 0x4($a0) /* 3657C0 E00648B0 AEE20000 */ sw $v0, 0x0($s7) /* 3657C4 E00648B4 24620008 */ addiu $v0, $v1, 0x8 /* 3657C8 E00648B8 AEE30004 */ sw $v1, 0x4($s7) /* 3657CC E00648BC ACA20000 */ sw $v0, 0x0($a1) /* 3657D0 E00648C0 AC690000 */ sw $t1, 0x0($v1) /* 3657D4 E00648C4 8FAD00BC */ lw $t5, 0xBC($sp) /* 3657D8 E00648C8 3C0BD9FF */ lui $t3, (0xD9FFFFFF >> 16) /* 3657DC E00648CC 000D1600 */ sll $v0, $t5, 24 /* 3657E0 E00648D0 8FAD00C0 */ lw $t5, 0xC0($sp) /* 3657E4 E00648D4 3C07FB00 */ lui $a3, (0xFB000000 >> 16) /* 3657E8 E00648D8 000D2400 */ sll $a0, $t5, 16 /* 3657EC E00648DC 8FAD00C4 */ lw $t5, 0xC4($sp) /* 3657F0 E00648E0 00441025 */ or $v0, $v0, $a0 /* 3657F4 E00648E4 000D2200 */ sll $a0, $t5, 8 /* 3657F8 E00648E8 8FAD00A0 */ lw $t5, 0xA0($sp) /* 3657FC E00648EC 00441025 */ or $v0, $v0, $a0 /* 365800 E00648F0 31A800FF */ andi $t0, $t5, 0xFF /* 365804 E00648F4 00481025 */ or $v0, $v0, $t0 /* 365808 E00648F8 AC620004 */ sw $v0, 0x4($v1) /* 36580C E00648FC 24620010 */ addiu $v0, $v1, 0x10 /* 365810 E0064900 ACA20000 */ sw $v0, 0x0($a1) /* 365814 E0064904 AC670008 */ sw $a3, 0x8($v1) /* 365818 E0064908 8FAD00C8 */ lw $t5, 0xC8($sp) /* 36581C E006490C 356BFFFF */ ori $t3, $t3, (0xD9FFFFFF & 0xFFFF) /* 365820 E0064910 000D1600 */ sll $v0, $t5, 24 /* 365824 E0064914 8FAD00CC */ lw $t5, 0xCC($sp) /* 365828 E0064918 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 36582C E006491C 000D2400 */ sll $a0, $t5, 16 /* 365830 E0064920 8FAD00D0 */ lw $t5, 0xD0($sp) /* 365834 E0064924 00441025 */ or $v0, $v0, $a0 /* 365838 E0064928 000D2200 */ sll $a0, $t5, 8 /* 36583C E006492C 00441025 */ or $v0, $v0, $a0 /* 365840 E0064930 AC62000C */ sw $v0, 0xC($v1) /* 365844 E0064934 24620018 */ addiu $v0, $v1, 0x18 /* 365848 E0064938 ACA20000 */ sw $v0, 0x0($a1) /* 36584C E006493C 24620020 */ addiu $v0, $v1, 0x20 /* 365850 E0064940 AC6A0010 */ sw $t2, 0x10($v1) /* 365854 E0064944 AC600014 */ sw $zero, 0x14($v1) /* 365858 E0064948 ACA20000 */ sw $v0, 0x0($a1) /* 36585C E006494C 24020200 */ addiu $v0, $zero, 0x200 /* 365860 E0064950 AC62001C */ sw $v0, 0x1C($v1) /* 365864 E0064954 24620028 */ addiu $v0, $v1, 0x28 /* 365868 E0064958 AC6B0018 */ sw $t3, 0x18($v1) /* 36586C E006495C ACA20000 */ sw $v0, 0x0($a1) /* 365870 E0064960 AC660020 */ sw $a2, 0x20($v1) /* 365874 E0064964 8FAD00D4 */ lw $t5, 0xD4($sp) /* 365878 E0064968 24620030 */ addiu $v0, $v1, 0x30 /* 36587C E006496C AC6D0024 */ sw $t5, 0x24($v1) /* 365880 E0064970 ACA20000 */ sw $v0, 0x0($a1) /* 365884 E0064974 AC690028 */ sw $t1, 0x28($v1) /* 365888 E0064978 8FAD00A4 */ lw $t5, 0xA4($sp) /* 36588C E006497C 000D1600 */ sll $v0, $t5, 24 /* 365890 E0064980 8FAD00A8 */ lw $t5, 0xA8($sp) /* 365894 E0064984 000D2400 */ sll $a0, $t5, 16 /* 365898 E0064988 8FAD00AC */ lw $t5, 0xAC($sp) /* 36589C E006498C 00441025 */ or $v0, $v0, $a0 /* 3658A0 E0064990 000D2200 */ sll $a0, $t5, 8 /* 3658A4 E0064994 00441025 */ or $v0, $v0, $a0 /* 3658A8 E0064998 00481025 */ or $v0, $v0, $t0 /* 3658AC E006499C AC62002C */ sw $v0, 0x2C($v1) /* 3658B0 E00649A0 24620038 */ addiu $v0, $v1, 0x38 /* 3658B4 E00649A4 ACA20000 */ sw $v0, 0x0($a1) /* 3658B8 E00649A8 AC670030 */ sw $a3, 0x30($v1) /* 3658BC E00649AC 8FAD00B0 */ lw $t5, 0xB0($sp) /* 3658C0 E00649B0 3C0CD838 */ lui $t4, (0xD8380002 >> 16) /* 3658C4 E00649B4 000D1600 */ sll $v0, $t5, 24 /* 3658C8 E00649B8 8FAD00B4 */ lw $t5, 0xB4($sp) /* 3658CC E00649BC 358C0002 */ ori $t4, $t4, (0xD8380002 & 0xFFFF) /* 3658D0 E00649C0 000D2400 */ sll $a0, $t5, 16 /* 3658D4 E00649C4 8FAD00B8 */ lw $t5, 0xB8($sp) /* 3658D8 E00649C8 00441025 */ or $v0, $v0, $a0 /* 3658DC E00649CC 000D2200 */ sll $a0, $t5, 8 /* 3658E0 E00649D0 00441025 */ or $v0, $v0, $a0 /* 3658E4 E00649D4 AC620034 */ sw $v0, 0x34($v1) /* 3658E8 E00649D8 24620040 */ addiu $v0, $v1, 0x40 /* 3658EC E00649DC ACA20000 */ sw $v0, 0x0($a1) /* 3658F0 E00649E0 24620048 */ addiu $v0, $v1, 0x48 /* 3658F4 E00649E4 AC6A0038 */ sw $t2, 0x38($v1) /* 3658F8 E00649E8 AC60003C */ sw $zero, 0x3C($v1) /* 3658FC E00649EC ACA20000 */ sw $v0, 0x0($a1) /* 365900 E00649F0 24020400 */ addiu $v0, $zero, 0x400 /* 365904 E00649F4 AC620044 */ sw $v0, 0x44($v1) /* 365908 E00649F8 24620050 */ addiu $v0, $v1, 0x50 /* 36590C E00649FC AC6B0040 */ sw $t3, 0x40($v1) /* 365910 E0064A00 ACA20000 */ sw $v0, 0x0($a1) /* 365914 E0064A04 AC660048 */ sw $a2, 0x48($v1) /* 365918 E0064A08 8FAD00D4 */ lw $t5, 0xD4($sp) /* 36591C E0064A0C 24620058 */ addiu $v0, $v1, 0x58 /* 365920 E0064A10 AC6D004C */ sw $t5, 0x4C($v1) /* 365924 E0064A14 ACA20000 */ sw $v0, 0x0($a1) /* 365928 E0064A18 24020040 */ addiu $v0, $zero, 0x40 /* 36592C E0064A1C AC6C0050 */ sw $t4, 0x50($v1) /* 365930 E0064A20 AC620054 */ sw $v0, 0x54($v1) /* 365934 E0064A24 8FBF00FC */ lw $ra, 0xFC($sp) /* 365938 E0064A28 8FBE00F8 */ lw $fp, 0xF8($sp) /* 36593C E0064A2C 8FB700F4 */ lw $s7, 0xF4($sp) /* 365940 E0064A30 8FB600F0 */ lw $s6, 0xF0($sp) /* 365944 E0064A34 8FB500EC */ lw $s5, 0xEC($sp) /* 365948 E0064A38 8FB400E8 */ lw $s4, 0xE8($sp) /* 36594C E0064A3C 8FB300E4 */ lw $s3, 0xE4($sp) /* 365950 E0064A40 8FB200E0 */ lw $s2, 0xE0($sp) /* 365954 E0064A44 8FB100DC */ lw $s1, 0xDC($sp) /* 365958 E0064A48 8FB000D8 */ lw $s0, 0xD8($sp) /* 36595C E0064A4C D7B80110 */ ldc1 $f24, 0x110($sp) /* 365960 E0064A50 D7B60108 */ ldc1 $f22, 0x108($sp) /* 365964 E0064A54 D7B40100 */ ldc1 $f20, 0x100($sp) /* 365968 E0064A58 03E00008 */ jr $ra /* 36596C E0064A5C 27BD0118 */ addiu $sp, $sp, 0x118 ### DECOMPILED C INSTRUCTIONS: void green_impact_appendGfx(void* effect) { GreenImpactFXData* part = ((EffectInstance*)effect)->data.greenImpact; Gfx* dlist = D_E0064A60[part->unk_00]; Gfx* dlist2; s32 alpha; s32 primR; s32 primG; s32 primB; s32 envR; s32 envG; s32 envB; s32 primR2; s32 primG2; s32 primB2; s32 envR2; s32 envG2; s32 envB2; Gfx* savedGfxPos; Gfx* savedGfxPos2; Matrix4f sp20; Matrix4f sp60; s32 i; primR = part->unk_50.r; primG = part->unk_50.g; primB = part->unk_50.b; envR = part->unk_53.r; envG = part->unk_53.g; envB = part->unk_53.b; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); alpha = part->unk_38; primR2 = primR; primG2 = primG; primB2 = primB; envR2 = envR; envG2 = envG; envB2 = envB; savedGfxPos = gMainGfxPos; gMainGfxPos++; savedGfxPos2 = gMainGfxPos; part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_4C >= 0) { shim_guTranslateF(sp20, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp60, part->unk_34, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guScaleF(sp60, part->unk_1C * 0.3, part->unk_20 * 0.3, part->unk_24 * 0.3); shim_guMtxCatF(sp60, sp20, sp20); shim_guRotateF(sp60, part->unk_30, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); dlist2 = D_09000540_365EF0; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (s32) part->unk_3C, 252, (s32) part->unk_3C + 124); gDPSetTileSize(gMainGfxPos++, 1, 0, (s32) part->unk_44, 124, (s32) part->unk_44 + 124); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gDPSetPrimColor(gMainGfxPos++, 0, 0, primR2, primG2, primB2, alpha); gDPSetEnvColor(gMainGfxPos++, envR2, envG2, envB2, 0); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPSetGeometryMode(gMainGfxPos++, G_CULL_FRONT); gSPDisplayList(gMainGfxPos++, savedGfxPos2); gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, alpha); gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, 0); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK); gSPDisplayList(gMainGfxPos++, savedGfxPos2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel bulb_glow_appendGfx /* 37A66C E007827C 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 37A670 E0078280 0080302D */ daddu $a2, $a0, $zero /* 37A674 E0078284 AFBF005C */ sw $ra, 0x5C($sp) /* 37A678 E0078288 AFBE0058 */ sw $fp, 0x58($sp) /* 37A67C E007828C AFB70054 */ sw $s7, 0x54($sp) /* 37A680 E0078290 AFB60050 */ sw $s6, 0x50($sp) /* 37A684 E0078294 AFB5004C */ sw $s5, 0x4C($sp) /* 37A688 E0078298 AFB40048 */ sw $s4, 0x48($sp) /* 37A68C E007829C AFB30044 */ sw $s3, 0x44($sp) /* 37A690 E00782A0 AFB20040 */ sw $s2, 0x40($sp) /* 37A694 E00782A4 AFB1003C */ sw $s1, 0x3C($sp) /* 37A698 E00782A8 AFB00038 */ sw $s0, 0x38($sp) /* 37A69C E00782AC 8CD0000C */ lw $s0, 0xC($a2) /* 37A6A0 E00782B0 8E140010 */ lw $s4, 0x10($s0) /* 37A6A4 E00782B4 8E120000 */ lw $s2, 0x0($s0) /* 37A6A8 E00782B8 2A820080 */ slti $v0, $s4, 0x80 /* 37A6AC E00782BC 50400001 */ beql $v0, $zero, .LE00782C4 /* 37A6B0 E00782C0 2414007F */ addiu $s4, $zero, 0x7F .LE00782C4: /* 37A6B4 E00782C4 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 37A6B8 E00782C8 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 37A6BC E00782CC 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 37A6C0 E00782D0 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 37A6C4 E00782D4 8EA40000 */ lw $a0, 0x0($s5) /* 37A6C8 E00782D8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 37A6CC E00782DC 0080182D */ daddu $v1, $a0, $zero /* 37A6D0 E00782E0 24840008 */ addiu $a0, $a0, 0x8 /* 37A6D4 E00782E4 AC620000 */ sw $v0, 0x0($v1) /* 37A6D8 E00782E8 AC600004 */ sw $zero, 0x4($v1) /* 37A6DC E00782EC AC850000 */ sw $a1, 0x0($a0) /* 37A6E0 E00782F0 8CC20010 */ lw $v0, 0x10($a2) /* 37A6E4 E00782F4 AEA40000 */ sw $a0, 0x0($s5) /* 37A6E8 E00782F8 8C42001C */ lw $v0, 0x1C($v0) /* 37A6EC E00782FC 3C038000 */ lui $v1, (0x80000000 >> 16) /* 37A6F0 E0078300 00431021 */ addu $v0, $v0, $v1 /* 37A6F4 E0078304 3C03E008 */ lui $v1, %hi(D_E0078918) /* 37A6F8 E0078308 24638918 */ addiu $v1, $v1, %lo(D_E0078918) /* 37A6FC E007830C AC820004 */ sw $v0, 0x4($a0) /* 37A700 E0078310 00121040 */ sll $v0, $s2, 1 /* 37A704 E0078314 00521021 */ addu $v0, $v0, $s2 /* 37A708 E0078318 000210C0 */ sll $v0, $v0, 3 /* 37A70C E007831C 00438821 */ addu $s1, $v0, $v1 /* 37A710 E0078320 8E360010 */ lw $s6, 0x10($s1) /* 37A714 E0078324 8E330014 */ lw $s3, 0x14($s1) /* 37A718 E0078328 27A20018 */ addiu $v0, $sp, 0x18 /* 37A71C E007832C AFA20010 */ sw $v0, 0x10($sp) /* 37A720 E0078330 27A2001C */ addiu $v0, $sp, 0x1C /* 37A724 E0078334 AFA20014 */ sw $v0, 0x14($sp) /* 37A728 E0078338 C60C0004 */ lwc1 $f12, 0x4($s0) /* 37A72C E007833C C60E0008 */ lwc1 $f14, 0x8($s0) /* 37A730 E0078340 8E06000C */ lw $a2, 0xC($s0) /* 37A734 E0078344 8E07001C */ lw $a3, 0x1C($s0) /* 37A738 E0078348 24840008 */ addiu $a0, $a0, 0x8 /* 37A73C E007834C 0C08015C */ jal shim_is_point_visible /* 37A740 E0078350 AEA40000 */ sw $a0, 0x0($s5) /* 37A744 E0078354 0040182D */ daddu $v1, $v0, $zero /* 37A748 E0078358 24020005 */ addiu $v0, $zero, 0x5 /* 37A74C E007835C 52420001 */ beql $s2, $v0, .LE0078364 /* 37A750 E0078360 24030001 */ addiu $v1, $zero, 0x1 .LE0078364: /* 37A754 E0078364 10600157 */ beqz $v1, .LE00788C4 /* 37A758 E0078368 00000000 */ nop /* 37A75C E007836C C7A20018 */ lwc1 $f2, 0x18($sp) /* 37A760 E0078370 44800000 */ mtc1 $zero, $f0 /* 37A764 E0078374 00000000 */ nop /* 37A768 E0078378 4600103C */ c.lt.s $f2, $f0 /* 37A76C E007837C 00000000 */ nop /* 37A770 E0078380 45010150 */ bc1t .LE00788C4 /* 37A774 E0078384 00000000 */ nop /* 37A778 E0078388 C7A4001C */ lwc1 $f4, 0x1C($sp) /* 37A77C E007838C 4600203C */ c.lt.s $f4, $f0 /* 37A780 E0078390 00000000 */ nop /* 37A784 E0078394 4501014B */ bc1t .LE00788C4 /* 37A788 E0078398 00000000 */ nop /* 37A78C E007839C 3C0143A0 */ lui $at, (0x43A00000 >> 16) /* 37A790 E00783A0 44810000 */ mtc1 $at, $f0 /* 37A794 E00783A4 00000000 */ nop /* 37A798 E00783A8 4602003E */ c.le.s $f0, $f2 /* 37A79C E00783AC 00000000 */ nop /* 37A7A0 E00783B0 45010144 */ bc1t .LE00788C4 /* 37A7A4 E00783B4 00000000 */ nop /* 37A7A8 E00783B8 3C014370 */ lui $at, (0x43700000 >> 16) /* 37A7AC E00783BC 44810000 */ mtc1 $at, $f0 /* 37A7B0 E00783C0 00000000 */ nop /* 37A7B4 E00783C4 4604003E */ c.le.s $f0, $f4 /* 37A7B8 E00783C8 00000000 */ nop /* 37A7BC E00783CC 4501013D */ bc1t .LE00788C4 /* 37A7C0 E00783D0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 37A7C4 E00783D4 8EA70000 */ lw $a3, 0x0($s5) /* 37A7C8 E00783D8 00E0182D */ daddu $v1, $a3, $zero /* 37A7CC E00783DC AC620000 */ sw $v0, 0x0($v1) /* 37A7D0 E00783E0 00121080 */ sll $v0, $s2, 2 /* 37A7D4 E00783E4 3C01E008 */ lui $at, (0xE0080000 >> 16) /* 37A7D8 E00783E8 00220821 */ addu $at, $at, $v0 /* 37A7DC E00783EC 8C228900 */ lw $v0, -0x7700($at) /* 37A7E0 E00783F0 24E70008 */ addiu $a3, $a3, 0x8 /* 37A7E4 E00783F4 AEA70000 */ sw $a3, 0x0($s5) /* 37A7E8 E00783F8 AC620004 */ sw $v0, 0x4($v1) /* 37A7EC E00783FC 8E030020 */ lw $v1, 0x20($s0) /* 37A7F0 E0078400 3C04E008 */ lui $a0, %hi(D_E00789AC) /* 37A7F4 E0078404 248489AC */ addiu $a0, $a0, %lo(D_E00789AC) /* 37A7F8 E0078408 00031040 */ sll $v0, $v1, 1 /* 37A7FC E007840C 00431021 */ addu $v0, $v0, $v1 /* 37A800 E0078410 00441021 */ addu $v0, $v0, $a0 /* 37A804 E0078414 90430000 */ lbu $v1, 0x0($v0) /* 37A808 E0078418 00144040 */ sll $t0, $s4, 1 /* 37A80C E007841C 00680018 */ mult $v1, $t0 /* 37A810 E0078420 00001812 */ mflo $v1 /* 37A814 E0078424 3C098080 */ lui $t1, (0x80808081 >> 16) /* 37A818 E0078428 35298081 */ ori $t1, $t1, (0x80808081 & 0xFFFF) /* 37A81C E007842C 00690018 */ mult $v1, $t1 /* 37A820 E0078430 44960000 */ mtc1 $s6, $f0 /* 37A824 E0078434 00000000 */ nop /* 37A828 E0078438 46800020 */ cvt.s.w $f0, $f0 /* 37A82C E007843C 46001081 */ sub.s $f2, $f2, $f0 /* 37A830 E0078440 46002001 */ sub.s $f0, $f4, $f0 /* 37A834 E0078444 4600118D */ trunc.w.s $f6, $f2 /* 37A838 E0078448 E7A60020 */ swc1 $f6, 0x20($sp) /* 37A83C E007844C 00007010 */ mfhi $t6 /* 37A840 E0078450 90460001 */ lbu $a2, 0x1($v0) /* 37A844 E0078454 00000000 */ nop /* 37A848 E0078458 00C80018 */ mult $a2, $t0 /* 37A84C E007845C 00162040 */ sll $a0, $s6, 1 /* 37A850 E0078460 90450002 */ lbu $a1, 0x2($v0) /* 37A854 E0078464 24E20008 */ addiu $v0, $a3, 0x8 /* 37A858 E0078468 8FB70020 */ lw $s7, 0x20($sp) /* 37A85C E007846C 00003012 */ mflo $a2 /* 37A860 E0078470 AEA20000 */ sw $v0, 0x0($s5) /* 37A864 E0078474 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 37A868 E0078478 00C90018 */ mult $a2, $t1 /* 37A86C E007847C ACE20000 */ sw $v0, 0x0($a3) /* 37A870 E0078480 02E47821 */ addu $t7, $s7, $a0 /* 37A874 E0078484 4600018D */ trunc.w.s $f6, $f0 /* 37A878 E0078488 440A3000 */ mfc1 $t2, $f6 /* 37A87C E007848C 00000000 */ nop /* 37A880 E0078490 01446021 */ addu $t4, $t2, $a0 /* 37A884 E0078494 00005810 */ mfhi $t3 /* 37A888 E0078498 01C32021 */ addu $a0, $t6, $v1 /* 37A88C E007849C 000421C3 */ sra $a0, $a0, 7 /* 37A890 E00784A0 00A80018 */ mult $a1, $t0 /* 37A894 E00784A4 00031FC3 */ sra $v1, $v1, 31 /* 37A898 E00784A8 00832023 */ subu $a0, $a0, $v1 /* 37A89C E00784AC 00042600 */ sll $a0, $a0, 24 /* 37A8A0 E00784B0 01661821 */ addu $v1, $t3, $a2 /* 37A8A4 E00784B4 00002812 */ mflo $a1 /* 37A8A8 E00784B8 000319C3 */ sra $v1, $v1, 7 /* 37A8AC E00784BC 000637C3 */ sra $a2, $a2, 31 /* 37A8B0 E00784C0 00A90018 */ mult $a1, $t1 /* 37A8B4 E00784C4 00661823 */ subu $v1, $v1, $a2 /* 37A8B8 E00784C8 306300FF */ andi $v1, $v1, 0xFF /* 37A8BC E00784CC 00031C00 */ sll $v1, $v1, 16 /* 37A8C0 E00784D0 00832025 */ or $a0, $a0, $v1 /* 37A8C4 E00784D4 00004010 */ mfhi $t0 /* 37A8C8 E00784D8 01051021 */ addu $v0, $t0, $a1 /* 37A8CC E00784DC 000211C3 */ sra $v0, $v0, 7 /* 37A8D0 E00784E0 00052FC3 */ sra $a1, $a1, 31 /* 37A8D4 E00784E4 00451023 */ subu $v0, $v0, $a1 /* 37A8D8 E00784E8 304200FF */ andi $v0, $v0, 0xFF /* 37A8DC E00784EC 00021200 */ sll $v0, $v0, 8 /* 37A8E0 E00784F0 00822025 */ or $a0, $a0, $v0 /* 37A8E4 E00784F4 3484007F */ ori $a0, $a0, 0x7F /* 37A8E8 E00784F8 ACE40004 */ sw $a0, 0x4($a3) /* 37A8EC E00784FC 8FB70020 */ lw $s7, 0x20($sp) /* 37A8F0 E0078500 06E10002 */ bgez $s7, .LE007850C /* 37A8F4 E0078504 0000682D */ daddu $t5, $zero, $zero /* 37A8F8 E0078508 00176823 */ negu $t5, $s7 .LE007850C: /* 37A8FC E007850C 05410002 */ bgez $t2, .LE0078518 /* 37A900 E0078510 0000182D */ daddu $v1, $zero, $zero /* 37A904 E0078514 000A1823 */ negu $v1, $t2 .LE0078518: /* 37A908 E0078518 29E20141 */ slti $v0, $t7, 0x141 /* 37A90C E007851C 50400001 */ beql $v0, $zero, .LE0078524 /* 37A910 E0078520 240F013F */ addiu $t7, $zero, 0x13F .LE0078524: /* 37A914 E0078524 298200F1 */ slti $v0, $t4, 0xF1 /* 37A918 E0078528 50400001 */ beql $v0, $zero, .LE0078530 /* 37A91C E007852C 240C00EF */ addiu $t4, $zero, 0xEF .LE0078530: /* 37A920 E0078530 16600002 */ bnez $s3, .LE007853C /* 37A924 E0078534 0073001A */ div $zero, $v1, $s3 /* 37A928 E0078538 0007000D */ break 7 .LE007853C: /* 37A92C E007853C 2401FFFF */ addiu $at, $zero, -0x1 /* 37A930 E0078540 16610004 */ bne $s3, $at, .LE0078554 /* 37A934 E0078544 3C018000 */ lui $at, (0x80000000 >> 16) /* 37A938 E0078548 14610002 */ bne $v1, $at, .LE0078554 /* 37A93C E007854C 00000000 */ nop /* 37A940 E0078550 0006000D */ break 6 .LE0078554: /* 37A944 E0078554 00005812 */ mflo $t3 /* 37A948 E0078558 018A1023 */ subu $v0, $t4, $t2 /* 37A94C E007855C 16600002 */ bnez $s3, .LE0078568 /* 37A950 E0078560 0053001A */ div $zero, $v0, $s3 /* 37A954 E0078564 0007000D */ break 7 .LE0078568: /* 37A958 E0078568 2401FFFF */ addiu $at, $zero, -0x1 /* 37A95C E007856C 16610004 */ bne $s3, $at, .LE0078580 /* 37A960 E0078570 3C018000 */ lui $at, (0x80000000 >> 16) /* 37A964 E0078574 14410002 */ bne $v0, $at, .LE0078580 /* 37A968 E0078578 00000000 */ nop /* 37A96C E007857C 0006000D */ break 6 .LE0078580: /* 37A970 E0078580 0000B812 */ mflo $s7 /* 37A974 E0078584 0177102A */ slt $v0, $t3, $s7 /* 37A978 E0078588 104000CE */ beqz $v0, .LE00788C4 /* 37A97C E007858C AFB70024 */ sw $s7, 0x24($sp) /* 37A980 E0078590 02A0482D */ daddu $t1, $s5, $zero /* 37A984 E0078594 8FB70020 */ lw $s7, 0x20($sp) /* 37A988 E0078598 01730018 */ mult $t3, $s3 /* 37A98C E007859C 02EDB021 */ addu $s6, $s7, $t5 /* 37A990 E00785A0 01F61023 */ subu $v0, $t7, $s6 /* 37A994 E00785A4 00021040 */ sll $v0, $v0, 1 /* 37A998 E00785A8 AFA20028 */ sw $v0, 0x28($sp) /* 37A99C E00785AC 0000B812 */ mflo $s7 /* 37A9A0 E00785B0 02EA5021 */ addu $t2, $s7, $t2 .LE00785B4: /* 37A9A4 E00785B4 01531021 */ addu $v0, $t2, $s3 /* 37A9A8 E00785B8 284200F0 */ slti $v0, $v0, 0xF0 /* 37A9AC E00785BC 104000C1 */ beqz $v0, .LE00788C4 /* 37A9B0 E00785C0 3C03F510 */ lui $v1, (0xF5100100 >> 16) /* 37A9B4 E00785C4 000A3080 */ sll $a2, $t2, 2 /* 37A9B8 E00785C8 00CA1021 */ addu $v0, $a2, $t2 /* 37A9BC E00785CC 0002F1C0 */ sll $fp, $v0, 7 /* 37A9C0 E00785D0 34630100 */ ori $v1, $v1, (0xF5100100 & 0xFFFF) /* 37A9C4 E00785D4 8FB70028 */ lw $s7, 0x28($sp) /* 37A9C8 E00785D8 C7A40020 */ lwc1 $f4, 0x20($sp) /* 37A9CC E00785DC 46802120 */ cvt.s.w $f4, $f4 /* 37A9D0 E00785E0 26E20007 */ addiu $v0, $s7, 0x7 /* 37A9D4 E00785E4 000210C3 */ sra $v0, $v0, 3 /* 37A9D8 E00785E8 304201FF */ andi $v0, $v0, 0x1FF /* 37A9DC E00785EC 00021240 */ sll $v0, $v0, 9 /* 37A9E0 E00785F0 00437025 */ or $t6, $v0, $v1 /* 37A9E4 E00785F4 00161080 */ sll $v0, $s6, 2 /* 37A9E8 E00785F8 30420FFF */ andi $v0, $v0, 0xFFF /* 37A9EC E00785FC 00026B00 */ sll $t5, $v0, 12 /* 37A9F0 E0078600 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* 37A9F4 E0078604 01A21025 */ or $v0, $t5, $v0 /* 37A9F8 E0078608 AFA20030 */ sw $v0, 0x30($sp) /* 37A9FC E007860C 25E2FFFF */ addiu $v0, $t7, -0x1 /* 37AA00 E0078610 00021080 */ sll $v0, $v0, 2 /* 37AA04 E0078614 30420FFF */ andi $v0, $v0, 0xFFF /* 37AA08 E0078618 00029300 */ sll $s2, $v0, 12 /* 37AA0C E007861C 2662FFFF */ addiu $v0, $s3, -0x1 /* 37AA10 E0078620 00021080 */ sll $v0, $v0, 2 /* 37AA14 E0078624 30500FFF */ andi $s0, $v0, 0xFFF /* 37AA18 E0078628 3C020700 */ lui $v0, (0x7000000 >> 16) /* 37AA1C E007862C C6200008 */ lwc1 $f0, 0x8($s1) /* 37AA20 E0078630 02021025 */ or $v0, $s0, $v0 /* 37AA24 E0078634 46002002 */ mul.s $f0, $f4, $f0 /* 37AA28 E0078638 00000000 */ nop /* 37AA2C E007863C 0242C825 */ or $t9, $s2, $v0 /* 37AA30 E0078640 8E220014 */ lw $v0, 0x14($s1) /* 37AA34 E0078644 8D250000 */ lw $a1, 0x0($t1) /* 37AA38 E0078648 8E240004 */ lw $a0, 0x4($s1) /* 37AA3C E007864C 01620018 */ mult $t3, $v0 /* 37AA40 E0078650 00A0382D */ daddu $a3, $a1, $zero /* 37AA44 E0078654 00041080 */ sll $v0, $a0, 2 /* 37AA48 E0078658 00441021 */ addu $v0, $v0, $a0 /* 37AA4C E007865C 4600018D */ trunc.w.s $f6, $f0 /* 37AA50 E0078660 44033000 */ mfc1 $v1, $f6 /* 37AA54 E0078664 0000B812 */ mflo $s7 /* 37AA58 E0078668 C620000C */ lwc1 $f0, 0xC($s1) /* 37AA5C E007866C 44971000 */ mtc1 $s7, $f2 /* 37AA60 E0078670 00000000 */ nop /* 37AA64 E0078674 468010A0 */ cvt.s.w $f2, $f2 /* 37AA68 E0078678 46001082 */ mul.s $f2, $f2, $f0 /* 37AA6C E007867C 00000000 */ nop /* 37AA70 E0078680 00021080 */ sll $v0, $v0, 2 /* 37AA74 E0078684 24A50008 */ addiu $a1, $a1, 0x8 /* 37AA78 E0078688 00031880 */ sll $v1, $v1, 2 /* 37AA7C E007868C 44820000 */ mtc1 $v0, $f0 /* 37AA80 E0078690 00000000 */ nop /* 37AA84 E0078694 46800020 */ cvt.s.w $f0, $f0 /* 37AA88 E0078698 46020001 */ sub.s $f0, $f0, $f2 /* 37AA8C E007869C 30630FFF */ andi $v1, $v1, 0xFFF /* 37AA90 E00786A0 00031B00 */ sll $v1, $v1, 12 /* 37AA94 E00786A4 4600018D */ trunc.w.s $f6, $f0 /* 37AA98 E00786A8 44023000 */ mfc1 $v0, $f6 /* 37AA9C E00786AC 00000000 */ nop /* 37AAA0 E00786B0 00021080 */ sll $v0, $v0, 2 /* 37AAA4 E00786B4 30420FFF */ andi $v0, $v0, 0xFFF /* 37AAA8 E00786B8 3C17F200 */ lui $s7, (0xF2000000 >> 16) /* 37AAAC E00786BC 00571025 */ or $v0, $v0, $s7 /* 37AAB0 E00786C0 00621825 */ or $v1, $v1, $v0 /* 37AAB4 E00786C4 32C201FF */ andi $v0, $s6, 0x1FF /* 37AAB8 E00786C8 ACE30000 */ sw $v1, 0x0($a3) /* 37AABC E00786CC C6200008 */ lwc1 $f0, 0x8($s1) /* 37AAC0 E00786D0 0002A540 */ sll $s4, $v0, 21 /* 37AAC4 E00786D4 46002102 */ mul.s $f4, $f4, $f0 /* 37AAC8 E00786D8 00000000 */ nop /* 37AACC E00786DC C6200000 */ lwc1 $f0, 0x0($s1) /* 37AAD0 E00786E0 46800020 */ cvt.s.w $f0, $f0 /* 37AAD4 E00786E4 AD250000 */ sw $a1, 0x0($t1) /* 37AAD8 E00786E8 8E220014 */ lw $v0, 0x14($s1) /* 37AADC E00786EC 0000602D */ daddu $t4, $zero, $zero /* 37AAE0 E00786F0 01620018 */ mult $t3, $v0 /* 37AAE4 E00786F4 3C15E700 */ lui $s5, (0xE7000000 >> 16) /* 37AAE8 E00786F8 30C60FFF */ andi $a2, $a2, 0xFFF /* 37AAEC E00786FC 01A6C025 */ or $t8, $t5, $a2 /* 37AAF0 E0078700 8E240004 */ lw $a0, 0x4($s1) /* 37AAF4 E0078704 46002100 */ add.s $f4, $f4, $f0 /* 37AAF8 E0078708 00041080 */ sll $v0, $a0, 2 /* 37AAFC E007870C 00441021 */ addu $v0, $v0, $a0 /* 37AB00 E0078710 4600218D */ trunc.w.s $f6, $f4 /* 37AB04 E0078714 44033000 */ mfc1 $v1, $f6 /* 37AB08 E0078718 0000B812 */ mflo $s7 /* 37AB0C E007871C C620000C */ lwc1 $f0, 0xC($s1) /* 37AB10 E0078720 44971000 */ mtc1 $s7, $f2 /* 37AB14 E0078724 00000000 */ nop /* 37AB18 E0078728 468010A0 */ cvt.s.w $f2, $f2 /* 37AB1C E007872C 46001082 */ mul.s $f2, $f2, $f0 /* 37AB20 E0078730 00000000 */ nop /* 37AB24 E0078734 00021080 */ sll $v0, $v0, 2 /* 37AB28 E0078738 00441021 */ addu $v0, $v0, $a0 /* 37AB2C E007873C 00031880 */ sll $v1, $v1, 2 /* 37AB30 E0078740 44820000 */ mtc1 $v0, $f0 /* 37AB34 E0078744 00000000 */ nop /* 37AB38 E0078748 46800020 */ cvt.s.w $f0, $f0 /* 37AB3C E007874C 46020001 */ sub.s $f0, $f0, $f2 /* 37AB40 E0078750 30630FFF */ andi $v1, $v1, 0xFFF /* 37AB44 E0078754 00031B00 */ sll $v1, $v1, 12 /* 37AB48 E0078758 4600018D */ trunc.w.s $f6, $f0 /* 37AB4C E007875C 44023000 */ mfc1 $v0, $f6 /* 37AB50 E0078760 00000000 */ nop /* 37AB54 E0078764 00021080 */ sll $v0, $v0, 2 /* 37AB58 E0078768 30420FFF */ andi $v0, $v0, 0xFFF /* 37AB5C E007876C 00621825 */ or $v1, $v1, $v0 /* 37AB60 E0078770 ACE30004 */ sw $v1, 0x4($a3) .LE0078774: /* 37AB64 E0078774 3C02FD10 */ lui $v0, (0xFD10013F >> 16) /* 37AB68 E0078778 3442013F */ ori $v0, $v0, (0xFD10013F & 0xFFFF) /* 37AB6C E007877C 3C060702 */ lui $a2, (0x7020090 >> 16) /* 37AB70 E0078780 34C60090 */ ori $a2, $a2, (0x7020090 & 0xFFFF) /* 37AB74 E0078784 3C070102 */ lui $a3, (0x1020090 >> 16) /* 37AB78 E0078788 34E70090 */ ori $a3, $a3, (0x1020090 & 0xFFFF) /* 37AB7C E007878C 3C080400 */ lui $t0, (0x4000400 >> 16) /* 37AB80 E0078790 35080400 */ ori $t0, $t0, (0x4000400 & 0xFFFF) /* 37AB84 E0078794 258C0001 */ addiu $t4, $t4, 0x1 /* 37AB88 E0078798 8D250000 */ lw $a1, 0x0($t1) /* 37AB8C E007879C 3C03800A */ lui $v1, %hi(nuGfxCfb_ptr) /* 37AB90 E00787A0 8C63A64C */ lw $v1, %lo(nuGfxCfb_ptr)($v1) /* 37AB94 E00787A4 00A0202D */ daddu $a0, $a1, $zero /* 37AB98 E00787A8 24A50008 */ addiu $a1, $a1, 0x8 /* 37AB9C E00787AC 007E1821 */ addu $v1, $v1, $fp /* 37ABA0 E00787B0 AD250000 */ sw $a1, 0x0($t1) /* 37ABA4 E00787B4 AC820000 */ sw $v0, 0x0($a0) /* 37ABA8 E00787B8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 37ABAC E00787BC 00621821 */ addu $v1, $v1, $v0 /* 37ABB0 E00787C0 24A20008 */ addiu $v0, $a1, 0x8 /* 37ABB4 E00787C4 AC830004 */ sw $v1, 0x4($a0) /* 37ABB8 E00787C8 AD220000 */ sw $v0, 0x0($t1) /* 37ABBC E00787CC 24A20010 */ addiu $v0, $a1, 0x10 /* 37ABC0 E00787D0 ACAE0000 */ sw $t6, 0x0($a1) /* 37ABC4 E00787D4 ACA60004 */ sw $a2, 0x4($a1) /* 37ABC8 E00787D8 AD220000 */ sw $v0, 0x0($t1) /* 37ABCC E00787DC 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 37ABD0 E00787E0 ACA20008 */ sw $v0, 0x8($a1) /* 37ABD4 E00787E4 24A20018 */ addiu $v0, $a1, 0x18 /* 37ABD8 E00787E8 ACA0000C */ sw $zero, 0xC($a1) /* 37ABDC E00787EC AD220000 */ sw $v0, 0x0($t1) /* 37ABE0 E00787F0 24A20020 */ addiu $v0, $a1, 0x20 /* 37ABE4 E00787F4 000F2080 */ sll $a0, $t7, 2 /* 37ABE8 E00787F8 30840FFF */ andi $a0, $a0, 0xFFF /* 37ABEC E00787FC 00042300 */ sll $a0, $a0, 12 /* 37ABF0 E0078800 01533021 */ addu $a2, $t2, $s3 /* 37ABF4 E0078804 8FB70030 */ lw $s7, 0x30($sp) /* 37ABF8 E0078808 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* 37ABFC E007880C ACB90014 */ sw $t9, 0x14($a1) /* 37AC00 E0078810 ACB70010 */ sw $s7, 0x10($a1) /* 37AC04 E0078814 AD220000 */ sw $v0, 0x0($t1) /* 37AC08 E0078818 24A20028 */ addiu $v0, $a1, 0x28 /* 37AC0C E007881C ACB50018 */ sw $s5, 0x18($a1) /* 37AC10 E0078820 ACA0001C */ sw $zero, 0x1C($a1) /* 37AC14 E0078824 AD220000 */ sw $v0, 0x0($t1) /* 37AC18 E0078828 24A20030 */ addiu $v0, $a1, 0x30 /* 37AC1C E007882C 3C17F200 */ lui $s7, (0xF2000000 >> 16) /* 37AC20 E0078830 ACAE0020 */ sw $t6, 0x20($a1) /* 37AC24 E0078834 ACA70024 */ sw $a3, 0x24($a1) /* 37AC28 E0078838 AD220000 */ sw $v0, 0x0($t1) /* 37AC2C E007883C 01B71025 */ or $v0, $t5, $s7 /* 37AC30 E0078840 ACA20028 */ sw $v0, 0x28($a1) /* 37AC34 E0078844 3C020100 */ lui $v0, (0x1000000 >> 16) /* 37AC38 E0078848 02021025 */ or $v0, $s0, $v0 /* 37AC3C E007884C 02421025 */ or $v0, $s2, $v0 /* 37AC40 E0078850 ACA2002C */ sw $v0, 0x2C($a1) /* 37AC44 E0078854 24A20038 */ addiu $v0, $a1, 0x38 /* 37AC48 E0078858 AD220000 */ sw $v0, 0x0($t1) /* 37AC4C E007885C 00061080 */ sll $v0, $a2, 2 /* 37AC50 E0078860 30420FFF */ andi $v0, $v0, 0xFFF /* 37AC54 E0078864 00431025 */ or $v0, $v0, $v1 /* 37AC58 E0078868 00822025 */ or $a0, $a0, $v0 /* 37AC5C E007886C 24A20040 */ addiu $v0, $a1, 0x40 /* 37AC60 E0078870 ACA40030 */ sw $a0, 0x30($a1) /* 37AC64 E0078874 ACB80034 */ sw $t8, 0x34($a1) /* 37AC68 E0078878 AD220000 */ sw $v0, 0x0($t1) /* 37AC6C E007887C 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 37AC70 E0078880 ACA20038 */ sw $v0, 0x38($a1) /* 37AC74 E0078884 24A20048 */ addiu $v0, $a1, 0x48 /* 37AC78 E0078888 ACB4003C */ sw $s4, 0x3C($a1) /* 37AC7C E007888C AD220000 */ sw $v0, 0x0($t1) /* 37AC80 E0078890 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* 37AC84 E0078894 ACA20040 */ sw $v0, 0x40($a1) /* 37AC88 E0078898 24A20050 */ addiu $v0, $a1, 0x50 /* 37AC8C E007889C ACA80044 */ sw $t0, 0x44($a1) /* 37AC90 E00788A0 AD220000 */ sw $v0, 0x0($t1) /* 37AC94 E00788A4 ACB50048 */ sw $s5, 0x48($a1) /* 37AC98 E00788A8 1980FFB2 */ blez $t4, .LE0078774 /* 37AC9C E00788AC ACA0004C */ sw $zero, 0x4C($a1) /* 37ACA0 E00788B0 8FB70024 */ lw $s7, 0x24($sp) /* 37ACA4 E00788B4 256B0001 */ addiu $t3, $t3, 0x1 /* 37ACA8 E00788B8 0177102A */ slt $v0, $t3, $s7 /* 37ACAC E00788BC 1440FF3D */ bnez $v0, .LE00785B4 /* 37ACB0 E00788C0 00C0502D */ daddu $t2, $a2, $zero .LE00788C4: /* 37ACB4 E00788C4 8FBF005C */ lw $ra, 0x5C($sp) /* 37ACB8 E00788C8 8FBE0058 */ lw $fp, 0x58($sp) /* 37ACBC E00788CC 8FB70054 */ lw $s7, 0x54($sp) /* 37ACC0 E00788D0 8FB60050 */ lw $s6, 0x50($sp) /* 37ACC4 E00788D4 8FB5004C */ lw $s5, 0x4C($sp) /* 37ACC8 E00788D8 8FB40048 */ lw $s4, 0x48($sp) /* 37ACCC E00788DC 8FB30044 */ lw $s3, 0x44($sp) /* 37ACD0 E00788E0 8FB20040 */ lw $s2, 0x40($sp) /* 37ACD4 E00788E4 8FB1003C */ lw $s1, 0x3C($sp) /* 37ACD8 E00788E8 8FB00038 */ lw $s0, 0x38($sp) /* 37ACDC E00788EC 03E00008 */ jr $ra /* 37ACE0 E00788F0 27BD0060 */ addiu $sp, $sp, 0x60 /* 37ACE4 E00788F4 00000000 */ nop /* 37ACE8 E00788F8 00000000 */ nop /* 37ACEC E00788FC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void bulb_glow_appendGfx(void* effect) { BulbGlowFXData* data = ((EffectInstance*)effect)->data.bulbGlow; f32 centerX; f32 centerY; s32 xMin; s32 numRects; s32 yMin; s32 temp_s2; s32 rectHeight; s32 glowExtent; s32 colorScale; s32 brightness; s32 yMax; s32 xStart; s32 xMax; s32 isPointVisible; s32 yStart; UnkBulbGlow* temp_s1; Color_RGB8* temp_v0; s32 i; s32 j; u8 r, g, b; brightness = data->unk_10; temp_s2 = data->unk_00; if (brightness > 127) { brightness = 127; } gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); temp_s1 = &D_E0078918[temp_s2]; glowExtent = temp_s1->unk_10; rectHeight = temp_s1->unk_14; isPointVisible = shim_is_point_visible(data->pos.x, data->pos.y, data->pos.z, data->unk_1C, &centerX, &centerY); if (temp_s2 == 5) { isPointVisible = TRUE; } if (!isPointVisible || centerX < 0.0f || centerY < 0.0f || centerX >= SCREEN_WIDTH || centerY >= SCREEN_HEIGHT) { return; } gSPDisplayList(gMainGfxPos++, D_E0078900[temp_s2]); temp_v0 = &D_E00789AC[data->unk_20]; colorScale = brightness * 2; r = temp_v0->r * colorScale / 255; g = temp_v0->g * colorScale / 255; b = temp_v0->b * colorScale / 255; gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, 127); xMin = centerX - glowExtent; xMax = xMin + glowExtent * 2; yMin = centerY - glowExtent; yMax = yMin + glowExtent * 2; xStart = 0; if (xMin < 0) { xStart = -xMin; } yStart = 0; if (yMin < 0) { yStart = -yMin; } if (xMax > SCREEN_WIDTH) { xMax = SCREEN_WIDTH - 1; } if (yMax > SCREEN_HEIGHT) { yMax = SCREEN_HEIGHT - 1; } numRects = (yMax - yMin) / rectHeight; for (i = yStart / rectHeight; i < numRects; i++) { s32 y = yMin + i * rectHeight; if (y + rectHeight >= SCREEN_HEIGHT) { break; } gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (s32) (xMin * temp_s1->unk_08) << 2, (s32) (temp_s1->unk_04 * 20 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2, (s32) (xMin * temp_s1->unk_08 + temp_s1->unk_00) << 2, (s32) (temp_s1->unk_04 * 21 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2); for (j = 0; j < 1; j++) { gDPLoadMultiTile(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + y * SCREEN_WIDTH), TMEM_ADDR(TMEM_SIZE/2), G_TX_RENDERTILE + 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 0, xMin + xStart, 0, xMax - 1, rectHeight - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(gMainGfxPos++, (xMin + xStart) << 2, y << 2, xMax << 2, (y + rectHeight) << 2, G_TX_RENDERTILE, ((xMin + xStart) & 0x1FF) << 5, 0, 1 << 10, 1 << 10); gDPPipeSync(gMainGfxPos++); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel FlyPartTo /* 1AA818 8027BF38 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 1AA81C 8027BF3C AFB30024 */ sw $s3, 0x24($sp) /* 1AA820 8027BF40 0080982D */ daddu $s3, $a0, $zero /* 1AA824 8027BF44 AFBF002C */ sw $ra, 0x2C($sp) /* 1AA828 8027BF48 AFB40028 */ sw $s4, 0x28($sp) /* 1AA82C 8027BF4C AFB20020 */ sw $s2, 0x20($sp) /* 1AA830 8027BF50 AFB1001C */ sw $s1, 0x1C($sp) /* 1AA834 8027BF54 AFB00018 */ sw $s0, 0x18($sp) /* 1AA838 8027BF58 F7B40030 */ sdc1 $f20, 0x30($sp) /* 1AA83C 8027BF5C 10A0008A */ beqz $a1, .L8027C188 /* 1AA840 8027BF60 8E71000C */ lw $s1, 0xC($s3) /* 1AA844 8027BF64 8E250000 */ lw $a1, 0x0($s1) /* 1AA848 8027BF68 0C0B1EAF */ jal evt_get_variable /* 1AA84C 8027BF6C 26310004 */ addiu $s1, $s1, 0x4 /* 1AA850 8027BF70 0040802D */ daddu $s0, $v0, $zero /* 1AA854 8027BF74 2402FF81 */ addiu $v0, $zero, -0x7F /* 1AA858 8027BF78 16020002 */ bne $s0, $v0, .L8027BF84 /* 1AA85C 8027BF7C 00000000 */ nop /* 1AA860 8027BF80 8E700148 */ lw $s0, 0x148($s3) .L8027BF84: /* 1AA864 8027BF84 8E250000 */ lw $a1, 0x0($s1) /* 1AA868 8027BF88 26310004 */ addiu $s1, $s1, 0x4 /* 1AA86C 8027BF8C 0C0B1EAF */ jal evt_get_variable /* 1AA870 8027BF90 0260202D */ daddu $a0, $s3, $zero /* 1AA874 8027BF94 0200202D */ daddu $a0, $s0, $zero /* 1AA878 8027BF98 0C09A75B */ jal get_actor /* 1AA87C 8027BF9C 0040802D */ daddu $s0, $v0, $zero /* 1AA880 8027BFA0 0040A02D */ daddu $s4, $v0, $zero /* 1AA884 8027BFA4 0280202D */ daddu $a0, $s4, $zero /* 1AA888 8027BFA8 0C099117 */ jal get_actor_part /* 1AA88C 8027BFAC 0200282D */ daddu $a1, $s0, $zero /* 1AA890 8027BFB0 0040902D */ daddu $s2, $v0, $zero /* 1AA894 8027BFB4 AE740074 */ sw $s4, 0x74($s3) /* 1AA898 8027BFB8 AE720078 */ sw $s2, 0x78($s3) /* 1AA89C 8027BFBC 8E250000 */ lw $a1, 0x0($s1) /* 1AA8A0 8027BFC0 26310004 */ addiu $s1, $s1, 0x4 /* 1AA8A4 8027BFC4 8E500010 */ lw $s0, 0x10($s2) /* 1AA8A8 8027BFC8 0C0B1EAF */ jal evt_get_variable /* 1AA8AC 8027BFCC 0260202D */ daddu $a0, $s3, $zero /* 1AA8B0 8027BFD0 44820000 */ mtc1 $v0, $f0 /* 1AA8B4 8027BFD4 00000000 */ nop /* 1AA8B8 8027BFD8 46800020 */ cvt.s.w $f0, $f0 /* 1AA8BC 8027BFDC E600000C */ swc1 $f0, 0xC($s0) /* 1AA8C0 8027BFE0 8E250000 */ lw $a1, 0x0($s1) /* 1AA8C4 8027BFE4 26310004 */ addiu $s1, $s1, 0x4 /* 1AA8C8 8027BFE8 0C0B1EAF */ jal evt_get_variable /* 1AA8CC 8027BFEC 0260202D */ daddu $a0, $s3, $zero /* 1AA8D0 8027BFF0 44820000 */ mtc1 $v0, $f0 /* 1AA8D4 8027BFF4 00000000 */ nop /* 1AA8D8 8027BFF8 46800020 */ cvt.s.w $f0, $f0 /* 1AA8DC 8027BFFC E6000010 */ swc1 $f0, 0x10($s0) /* 1AA8E0 8027C000 8E250000 */ lw $a1, 0x0($s1) /* 1AA8E4 8027C004 26310004 */ addiu $s1, $s1, 0x4 /* 1AA8E8 8027C008 0C0B1EAF */ jal evt_get_variable /* 1AA8EC 8027C00C 0260202D */ daddu $a0, $s3, $zero /* 1AA8F0 8027C010 44820000 */ mtc1 $v0, $f0 /* 1AA8F4 8027C014 00000000 */ nop /* 1AA8F8 8027C018 46800020 */ cvt.s.w $f0, $f0 /* 1AA8FC 8027C01C E6000014 */ swc1 $f0, 0x14($s0) /* 1AA900 8027C020 8E250000 */ lw $a1, 0x0($s1) /* 1AA904 8027C024 26310004 */ addiu $s1, $s1, 0x4 /* 1AA908 8027C028 0C0B1EAF */ jal evt_get_variable /* 1AA90C 8027C02C 0260202D */ daddu $a0, $s3, $zero /* 1AA910 8027C030 A6020038 */ sh $v0, 0x38($s0) /* 1AA914 8027C034 8E250000 */ lw $a1, 0x0($s1) /* 1AA918 8027C038 26310004 */ addiu $s1, $s1, 0x4 /* 1AA91C 8027C03C 0C0B1EAF */ jal evt_get_variable /* 1AA920 8027C040 0260202D */ daddu $a0, $s3, $zero /* 1AA924 8027C044 A602003A */ sh $v0, 0x3A($s0) /* 1AA928 8027C048 8E250000 */ lw $a1, 0x0($s1) /* 1AA92C 8027C04C 0C0B1EAF */ jal evt_get_variable /* 1AA930 8027C050 0260202D */ daddu $a0, $s3, $zero /* 1AA934 8027C054 AE62007C */ sw $v0, 0x7C($s3) /* 1AA938 8027C058 C602000C */ lwc1 $f2, 0xC($s0) /* 1AA93C 8027C05C C640002C */ lwc1 $f0, 0x2C($s2) /* 1AA940 8027C060 46020081 */ sub.s $f2, $f0, $f2 /* 1AA944 8027C064 E6000000 */ swc1 $f0, 0x0($s0) /* 1AA948 8027C068 46021102 */ mul.s $f4, $f2, $f2 /* 1AA94C 8027C06C 00000000 */ nop /* 1AA950 8027C070 E6000018 */ swc1 $f0, 0x18($s0) /* 1AA954 8027C074 C6400030 */ lwc1 $f0, 0x30($s2) /* 1AA958 8027C078 C6020010 */ lwc1 $f2, 0x10($s0) /* 1AA95C 8027C07C 46020081 */ sub.s $f2, $f0, $f2 /* 1AA960 8027C080 E6000004 */ swc1 $f0, 0x4($s0) /* 1AA964 8027C084 46021182 */ mul.s $f6, $f2, $f2 /* 1AA968 8027C088 00000000 */ nop /* 1AA96C 8027C08C E600001C */ swc1 $f0, 0x1C($s0) /* 1AA970 8027C090 C6400034 */ lwc1 $f0, 0x34($s2) /* 1AA974 8027C094 C6020014 */ lwc1 $f2, 0x14($s0) /* 1AA978 8027C098 46020081 */ sub.s $f2, $f0, $f2 /* 1AA97C 8027C09C 46021082 */ mul.s $f2, $f2, $f2 /* 1AA980 8027C0A0 00000000 */ nop /* 1AA984 8027C0A4 46062100 */ add.s $f4, $f4, $f6 /* 1AA988 8027C0A8 46022300 */ add.s $f12, $f4, $f2 /* 1AA98C 8027C0AC E6000008 */ swc1 $f0, 0x8($s0) /* 1AA990 8027C0B0 46006084 */ sqrt.s $f2, $f12 /* 1AA994 8027C0B4 46021032 */ c.eq.s $f2, $f2 /* 1AA998 8027C0B8 00000000 */ nop /* 1AA99C 8027C0BC 45010004 */ bc1t .L8027C0D0 /* 1AA9A0 8027C0C0 E6000020 */ swc1 $f0, 0x20($s0) /* 1AA9A4 8027C0C4 0C0187BC */ jal sqrtf /* 1AA9A8 8027C0C8 00000000 */ nop /* 1AA9AC 8027C0CC 46000086 */ mov.s $f2, $f0 .L8027C0D0: /* 1AA9B0 8027C0D0 86020038 */ lh $v0, 0x38($s0) /* 1AA9B4 8027C0D4 14400007 */ bnez $v0, .L8027C0F4 /* 1AA9B8 8027C0D8 E6020034 */ swc1 $f2, 0x34($s0) /* 1AA9BC 8027C0DC C6000028 */ lwc1 $f0, 0x28($s0) /* 1AA9C0 8027C0E0 46001003 */ div.s $f0, $f2, $f0 /* 1AA9C4 8027C0E4 4600020D */ trunc.w.s $f8, $f0 /* 1AA9C8 8027C0E8 44024000 */ mfc1 $v0, $f8 /* 1AA9CC 8027C0EC 0809F042 */ j .L8027C108 /* 1AA9D0 8027C0F0 A6020038 */ sh $v0, 0x38($s0) .L8027C0F4: /* 1AA9D4 8027C0F4 44820000 */ mtc1 $v0, $f0 /* 1AA9D8 8027C0F8 00000000 */ nop /* 1AA9DC 8027C0FC 46800020 */ cvt.s.w $f0, $f0 /* 1AA9E0 8027C100 46001003 */ div.s $f0, $f2, $f0 /* 1AA9E4 8027C104 E6000028 */ swc1 $f0, 0x28($s0) .L8027C108: /* 1AA9E8 8027C108 86020038 */ lh $v0, 0x38($s0) /* 1AA9EC 8027C10C 14400003 */ bnez $v0, .L8027C11C /* 1AA9F0 8027C110 00000000 */ nop .L8027C114: /* 1AA9F4 8027C114 0809F12F */ j .L8027C4BC /* 1AA9F8 8027C118 24020002 */ addiu $v0, $zero, 0x2 .L8027C11C: /* 1AA9FC 8027C11C 8E4200AC */ lw $v0, 0xAC($s2) /* 1AAA00 8027C120 5040000C */ beql $v0, $zero, .L8027C154 /* 1AAA04 8027C124 AE00003C */ sw $zero, 0x3C($s0) /* 1AAA08 8027C128 8E4200B0 */ lw $v0, 0xB0($s2) /* 1AAA0C 8027C12C 54400009 */ bnel $v0, $zero, .L8027C154 /* 1AAA10 8027C130 AE00003C */ sw $zero, 0x3C($s0) /* 1AAA14 8027C134 C6400034 */ lwc1 $f0, 0x34($s2) /* 1AAA18 8027C138 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AAA1C 8027C13C 8E4400AC */ lw $a0, 0xAC($s2) /* 1AAA20 8027C140 8E46002C */ lw $a2, 0x2C($s2) /* 1AAA24 8027C144 8E470030 */ lw $a3, 0x30($s2) /* 1AAA28 8027C148 0C052757 */ jal sfx_play_sound_at_position /* 1AAA2C 8027C14C 0000282D */ daddu $a1, $zero, $zero /* 1AAA30 8027C150 AE00003C */ sw $zero, 0x3C($s0) .L8027C154: /* 1AAA34 8027C154 AE000030 */ sw $zero, 0x30($s0) /* 1AAA38 8027C158 864200BE */ lh $v0, 0xBE($s2) /* 1AAA3C 8027C15C 04400004 */ bltz $v0, .L8027C170 /* 1AAA40 8027C160 00000000 */ nop /* 1AAA44 8027C164 868201B6 */ lh $v0, 0x1B6($s4) /* 1AAA48 8027C168 0809F05E */ j .L8027C178 /* 1AAA4C 8027C16C 24420001 */ addiu $v0, $v0, 0x1 .L8027C170: /* 1AAA50 8027C170 868201B6 */ lh $v0, 0x1B6($s4) /* 1AAA54 8027C174 00021027 */ nor $v0, $zero, $v0 .L8027C178: /* 1AAA58 8027C178 44820000 */ mtc1 $v0, $f0 /* 1AAA5C 8027C17C 00000000 */ nop /* 1AAA60 8027C180 46800020 */ cvt.s.w $f0, $f0 /* 1AAA64 8027C184 E600002C */ swc1 $f0, 0x2C($s0) .L8027C188: /* 1AAA68 8027C188 8E720078 */ lw $s2, 0x78($s3) /* 1AAA6C 8027C18C 8E500010 */ lw $s0, 0x10($s2) /* 1AAA70 8027C190 8E740074 */ lw $s4, 0x74($s3) /* 1AAA74 8027C194 86020038 */ lh $v0, 0x38($s0) /* 1AAA78 8027C198 AFA20010 */ sw $v0, 0x10($sp) /* 1AAA7C 8027C19C 8E64007C */ lw $a0, 0x7C($s3) /* 1AAA80 8027C1A0 8E050018 */ lw $a1, 0x18($s0) /* 1AAA84 8027C1A4 8E06000C */ lw $a2, 0xC($s0) /* 1AAA88 8027C1A8 0C09EC37 */ jal update_lerp_battle /* 1AAA8C 8027C1AC 8E07003C */ lw $a3, 0x3C($s0) /* 1AAA90 8027C1B0 86020038 */ lh $v0, 0x38($s0) /* 1AAA94 8027C1B4 E6000000 */ swc1 $f0, 0x0($s0) /* 1AAA98 8027C1B8 AFA20010 */ sw $v0, 0x10($sp) /* 1AAA9C 8027C1BC 8E64007C */ lw $a0, 0x7C($s3) /* 1AAAA0 8027C1C0 8E05001C */ lw $a1, 0x1C($s0) /* 1AAAA4 8027C1C4 8E060010 */ lw $a2, 0x10($s0) /* 1AAAA8 8027C1C8 0C09EC37 */ jal update_lerp_battle /* 1AAAAC 8027C1CC 8E07003C */ lw $a3, 0x3C($s0) /* 1AAAB0 8027C1D0 86020038 */ lh $v0, 0x38($s0) /* 1AAAB4 8027C1D4 E6000004 */ swc1 $f0, 0x4($s0) /* 1AAAB8 8027C1D8 AFA20010 */ sw $v0, 0x10($sp) /* 1AAABC 8027C1DC 8E64007C */ lw $a0, 0x7C($s3) /* 1AAAC0 8027C1E0 8E050020 */ lw $a1, 0x20($s0) /* 1AAAC4 8027C1E4 8E060014 */ lw $a2, 0x14($s0) /* 1AAAC8 8027C1E8 0C09EC37 */ jal update_lerp_battle /* 1AAACC 8027C1EC 8E07003C */ lw $a3, 0x3C($s0) /* 1AAAD0 8027C1F0 8E02003C */ lw $v0, 0x3C($s0) /* 1AAAD4 8027C1F4 86030038 */ lh $v1, 0x38($s0) /* 1AAAD8 8027C1F8 E6000008 */ swc1 $f0, 0x8($s0) /* 1AAADC 8027C1FC 24420001 */ addiu $v0, $v0, 0x1 /* 1AAAE0 8027C200 0062182A */ slt $v1, $v1, $v0 /* 1AAAE4 8027C204 10600010 */ beqz $v1, .L8027C248 /* 1AAAE8 8027C208 AE02003C */ sw $v0, 0x3C($s0) /* 1AAAEC 8027C20C C600000C */ lwc1 $f0, 0xC($s0) /* 1AAAF0 8027C210 8E4400AC */ lw $a0, 0xAC($s2) /* 1AAAF4 8027C214 E640002C */ swc1 $f0, 0x2C($s2) /* 1AAAF8 8027C218 C6000010 */ lwc1 $f0, 0x10($s0) /* 1AAAFC 8027C21C E6400030 */ swc1 $f0, 0x30($s2) /* 1AAB00 8027C220 C6000014 */ lwc1 $f0, 0x14($s0) /* 1AAB04 8027C224 1080FFBB */ beqz $a0, .L8027C114 /* 1AAB08 8027C228 E6400034 */ swc1 $f0, 0x34($s2) /* 1AAB0C 8027C22C 8E4200B0 */ lw $v0, 0xB0($s2) /* 1AAB10 8027C230 144000A2 */ bnez $v0, .L8027C4BC /* 1AAB14 8027C234 24020002 */ addiu $v0, $zero, 0x2 /* 1AAB18 8027C238 0C0154F0 */ jal snd_stop_sound /* 1AAB1C 8027C23C 00000000 */ nop /* 1AAB20 8027C240 0809F12F */ j .L8027C4BC /* 1AAB24 8027C244 24020002 */ addiu $v0, $zero, 0x2 .L8027C248: /* 1AAB28 8027C248 8E4200AC */ lw $v0, 0xAC($s2) /* 1AAB2C 8027C24C 1040004A */ beqz $v0, .L8027C378 /* 1AAB30 8027C250 00000000 */ nop /* 1AAB34 8027C254 8E4200B0 */ lw $v0, 0xB0($s2) /* 1AAB38 8027C258 10400047 */ beqz $v0, .L8027C378 /* 1AAB3C 8027C25C 00000000 */ nop /* 1AAB40 8027C260 864200BE */ lh $v0, 0xBE($s2) /* 1AAB44 8027C264 0440001C */ bltz $v0, .L8027C2D8 /* 1AAB48 8027C268 00000000 */ nop /* 1AAB4C 8027C26C C602002C */ lwc1 $f2, 0x2C($s0) /* 1AAB50 8027C270 C6000028 */ lwc1 $f0, 0x28($s0) /* 1AAB54 8027C274 46001080 */ add.s $f2, $f2, $f0 /* 1AAB58 8027C278 E602002C */ swc1 $f2, 0x2C($s0) /* 1AAB5C 8027C27C 864200BE */ lh $v0, 0xBE($s2) /* 1AAB60 8027C280 44820000 */ mtc1 $v0, $f0 /* 1AAB64 8027C284 00000000 */ nop /* 1AAB68 8027C288 46800020 */ cvt.s.w $f0, $f0 /* 1AAB6C 8027C28C 4602003C */ c.lt.s $f0, $f2 /* 1AAB70 8027C290 00000000 */ nop /* 1AAB74 8027C294 45000038 */ bc1f .L8027C378 /* 1AAB78 8027C298 00000000 */ nop /* 1AAB7C 8027C29C 92820135 */ lbu $v0, 0x135($s4) /* 1AAB80 8027C2A0 24420001 */ addiu $v0, $v0, 0x1 /* 1AAB84 8027C2A4 A2820135 */ sb $v0, 0x135($s4) /* 1AAB88 8027C2A8 AE00002C */ sw $zero, 0x2C($s0) /* 1AAB8C 8027C2AC 92820135 */ lbu $v0, 0x135($s4) /* 1AAB90 8027C2B0 30420001 */ andi $v0, $v0, 0x1 /* 1AAB94 8027C2B4 10400026 */ beqz $v0, .L8027C350 /* 1AAB98 8027C2B8 00000000 */ nop /* 1AAB9C 8027C2BC 8E4200AC */ lw $v0, 0xAC($s2) /* 1AABA0 8027C2C0 1040002D */ beqz $v0, .L8027C378 /* 1AABA4 8027C2C4 00000000 */ nop /* 1AABA8 8027C2C8 C6400034 */ lwc1 $f0, 0x34($s2) /* 1AABAC 8027C2CC E7A00010 */ swc1 $f0, 0x10($sp) /* 1AABB0 8027C2D0 0809F0DA */ j .L8027C368 /* 1AABB4 8027C2D4 8E4400AC */ lw $a0, 0xAC($s2) .L8027C2D8: /* 1AABB8 8027C2D8 C602002C */ lwc1 $f2, 0x2C($s0) /* 1AABBC 8027C2DC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1AABC0 8027C2E0 44810000 */ mtc1 $at, $f0 /* 1AABC4 8027C2E4 00000000 */ nop /* 1AABC8 8027C2E8 46001080 */ add.s $f2, $f2, $f0 /* 1AABCC 8027C2EC E602002C */ swc1 $f2, 0x2C($s0) /* 1AABD0 8027C2F0 864200BE */ lh $v0, 0xBE($s2) /* 1AABD4 8027C2F4 00021023 */ negu $v0, $v0 /* 1AABD8 8027C2F8 44820000 */ mtc1 $v0, $f0 /* 1AABDC 8027C2FC 00000000 */ nop /* 1AABE0 8027C300 46800020 */ cvt.s.w $f0, $f0 /* 1AABE4 8027C304 4602003E */ c.le.s $f0, $f2 /* 1AABE8 8027C308 00000000 */ nop /* 1AABEC 8027C30C 4500001A */ bc1f .L8027C378 /* 1AABF0 8027C310 00000000 */ nop /* 1AABF4 8027C314 92820135 */ lbu $v0, 0x135($s4) /* 1AABF8 8027C318 24420001 */ addiu $v0, $v0, 0x1 /* 1AABFC 8027C31C A2820135 */ sb $v0, 0x135($s4) /* 1AAC00 8027C320 AE00002C */ sw $zero, 0x2C($s0) /* 1AAC04 8027C324 92820135 */ lbu $v0, 0x135($s4) /* 1AAC08 8027C328 30420001 */ andi $v0, $v0, 0x1 /* 1AAC0C 8027C32C 10400008 */ beqz $v0, .L8027C350 /* 1AAC10 8027C330 00000000 */ nop /* 1AAC14 8027C334 8E4200AC */ lw $v0, 0xAC($s2) /* 1AAC18 8027C338 1040000F */ beqz $v0, .L8027C378 /* 1AAC1C 8027C33C 00000000 */ nop /* 1AAC20 8027C340 C6400034 */ lwc1 $f0, 0x34($s2) /* 1AAC24 8027C344 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AAC28 8027C348 0809F0DA */ j .L8027C368 /* 1AAC2C 8027C34C 8E4400AC */ lw $a0, 0xAC($s2) .L8027C350: /* 1AAC30 8027C350 8E4200B0 */ lw $v0, 0xB0($s2) /* 1AAC34 8027C354 10400008 */ beqz $v0, .L8027C378 /* 1AAC38 8027C358 00000000 */ nop /* 1AAC3C 8027C35C C6400034 */ lwc1 $f0, 0x34($s2) /* 1AAC40 8027C360 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AAC44 8027C364 8E4400B0 */ lw $a0, 0xB0($s2) .L8027C368: /* 1AAC48 8027C368 8E46002C */ lw $a2, 0x2C($s2) /* 1AAC4C 8027C36C 8E470030 */ lw $a3, 0x30($s2) /* 1AAC50 8027C370 0C052757 */ jal sfx_play_sound_at_position /* 1AAC54 8027C374 0000282D */ daddu $a1, $zero, $zero .L8027C378: /* 1AAC58 8027C378 C602000C */ lwc1 $f2, 0xC($s0) /* 1AAC5C 8027C37C C6000000 */ lwc1 $f0, 0x0($s0) /* 1AAC60 8027C380 46001081 */ sub.s $f2, $f2, $f0 /* 1AAC64 8027C384 46021102 */ mul.s $f4, $f2, $f2 /* 1AAC68 8027C388 00000000 */ nop /* 1AAC6C 8027C38C C6000004 */ lwc1 $f0, 0x4($s0) /* 1AAC70 8027C390 C6020010 */ lwc1 $f2, 0x10($s0) /* 1AAC74 8027C394 46001081 */ sub.s $f2, $f2, $f0 /* 1AAC78 8027C398 46021182 */ mul.s $f6, $f2, $f2 /* 1AAC7C 8027C39C 00000000 */ nop /* 1AAC80 8027C3A0 C6000008 */ lwc1 $f0, 0x8($s0) /* 1AAC84 8027C3A4 C6020014 */ lwc1 $f2, 0x14($s0) /* 1AAC88 8027C3A8 46001081 */ sub.s $f2, $f2, $f0 /* 1AAC8C 8027C3AC 46021002 */ mul.s $f0, $f2, $f2 /* 1AAC90 8027C3B0 00000000 */ nop /* 1AAC94 8027C3B4 46062100 */ add.s $f4, $f4, $f6 /* 1AAC98 8027C3B8 46002300 */ add.s $f12, $f4, $f0 /* 1AAC9C 8027C3BC 46006004 */ sqrt.s $f0, $f12 /* 1AACA0 8027C3C0 46000032 */ c.eq.s $f0, $f0 /* 1AACA4 8027C3C4 00000000 */ nop /* 1AACA8 8027C3C8 45010003 */ bc1t .L8027C3D8 /* 1AACAC 8027C3CC 00000000 */ nop /* 1AACB0 8027C3D0 0C0187BC */ jal sqrtf /* 1AACB4 8027C3D4 00000000 */ nop .L8027C3D8: /* 1AACB8 8027C3D8 4480A000 */ mtc1 $zero, $f20 /* 1AACBC 8027C3DC 46000086 */ mov.s $f2, $f0 /* 1AACC0 8027C3E0 46141032 */ c.eq.s $f2, $f20 /* 1AACC4 8027C3E4 00000000 */ nop /* 1AACC8 8027C3E8 45000003 */ bc1f .L8027C3F8 /* 1AACCC 8027C3EC 00000000 */ nop /* 1AACD0 8027C3F0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1AACD4 8027C3F4 44811000 */ mtc1 $at, $f2 .L8027C3F8: /* 1AACD8 8027C3F8 C6000034 */ lwc1 $f0, 0x34($s0) /* 1AACDC 8027C3FC 46140032 */ c.eq.s $f0, $f20 /* 1AACE0 8027C400 00000000 */ nop /* 1AACE4 8027C404 45000006 */ bc1f .L8027C420 /* 1AACE8 8027C408 00000000 */ nop /* 1AACEC 8027C40C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1AACF0 8027C410 44810000 */ mtc1 $at, $f0 /* 1AACF4 8027C414 00000000 */ nop /* 1AACF8 8027C418 E6000034 */ swc1 $f0, 0x34($s0) /* 1AACFC 8027C41C C6000034 */ lwc1 $f0, 0x34($s0) .L8027C420: /* 1AAD00 8027C420 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 1AAD04 8027C424 44816800 */ mtc1 $at, $f13 /* 1AAD08 8027C428 44806000 */ mtc1 $zero, $f12 /* 1AAD0C 8027C42C 46001003 */ div.s $f0, $f2, $f0 /* 1AAD10 8027C430 46000021 */ cvt.d.s $f0, $f0 /* 1AAD14 8027C434 46206301 */ sub.d $f12, $f12, $f0 /* 1AAD18 8027C438 3C01802A */ lui $at, %hi(D_8029DA20) /* 1AAD1C 8027C43C D420DA20 */ ldc1 $f0, %lo(D_8029DA20)($at) /* 1AAD20 8027C440 46206302 */ mul.d $f12, $f12, $f0 /* 1AAD24 8027C444 00000000 */ nop /* 1AAD28 8027C448 0C00A8BB */ jal sin_deg /* 1AAD2C 8027C44C 46206320 */ cvt.s.d $f12, $f12 /* 1AAD30 8027C450 8603003A */ lh $v1, 0x3A($s0) /* 1AAD34 8027C454 14600002 */ bnez $v1, .L8027C460 /* 1AAD38 8027C458 46000106 */ mov.s $f4, $f0 /* 1AAD3C 8027C45C 4600A106 */ mov.s $f4, $f20 .L8027C460: /* 1AAD40 8027C460 04610007 */ bgez $v1, .L8027C480 /* 1AAD44 8027C464 00031023 */ negu $v0, $v1 /* 1AAD48 8027C468 44821000 */ mtc1 $v0, $f2 /* 1AAD4C 8027C46C 00000000 */ nop /* 1AAD50 8027C470 468010A0 */ cvt.s.w $f2, $f2 /* 1AAD54 8027C474 46002007 */ neg.s $f0, $f4 /* 1AAD58 8027C478 46020102 */ mul.s $f4, $f0, $f2 /* 1AAD5C 8027C47C 00000000 */ nop .L8027C480: /* 1AAD60 8027C480 18600006 */ blez $v1, .L8027C49C /* 1AAD64 8027C484 00000000 */ nop /* 1AAD68 8027C488 44830000 */ mtc1 $v1, $f0 /* 1AAD6C 8027C48C 00000000 */ nop /* 1AAD70 8027C490 46800020 */ cvt.s.w $f0, $f0 /* 1AAD74 8027C494 46002102 */ mul.s $f4, $f4, $f0 /* 1AAD78 8027C498 00000000 */ nop .L8027C49C: /* 1AAD7C 8027C49C C6000000 */ lwc1 $f0, 0x0($s0) /* 1AAD80 8027C4A0 E640002C */ swc1 $f0, 0x2C($s2) /* 1AAD84 8027C4A4 C6000004 */ lwc1 $f0, 0x4($s0) /* 1AAD88 8027C4A8 46040000 */ add.s $f0, $f0, $f4 /* 1AAD8C 8027C4AC E6400030 */ swc1 $f0, 0x30($s2) /* 1AAD90 8027C4B0 C6000008 */ lwc1 $f0, 0x8($s0) /* 1AAD94 8027C4B4 0000102D */ daddu $v0, $zero, $zero /* 1AAD98 8027C4B8 E6400034 */ swc1 $f0, 0x34($s2) .L8027C4BC: /* 1AAD9C 8027C4BC 8FBF002C */ lw $ra, 0x2C($sp) /* 1AADA0 8027C4C0 8FB40028 */ lw $s4, 0x28($sp) /* 1AADA4 8027C4C4 8FB30024 */ lw $s3, 0x24($sp) /* 1AADA8 8027C4C8 8FB20020 */ lw $s2, 0x20($sp) /* 1AADAC 8027C4CC 8FB1001C */ lw $s1, 0x1C($sp) /* 1AADB0 8027C4D0 8FB00018 */ lw $s0, 0x18($sp) /* 1AADB4 8027C4D4 D7B40030 */ ldc1 $f20, 0x30($sp) /* 1AADB8 8027C4D8 03E00008 */ jr $ra /* 1AADBC 8027C4DC 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorPart* part; ActorPartMovement* partMovement; s32 actorID; s32 partID; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; f32 deltaX, deltaY, deltaZ; f32 dist3D; f32 offsetY; if (isInitialCall) { actorID = evt_get_variable(script, *args++); if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } partID = evt_get_variable(script, *args++); actor = get_actor(actorID); part = get_actor_part(actor, partID); script->functionTempPtr[1] = actor; script->functionTempPtr[2] = part; partMovement = part->movement; partMovement->goalPos.x = evt_get_variable(script, *args++); partMovement->goalPos.y = evt_get_variable(script, *args++); partMovement->goalPos.z = evt_get_variable(script, *args++); partMovement->moveTime = evt_get_variable(script, *args++); partMovement->unk_3A = evt_get_variable(script, *args++); script->functionTemp[3] = evt_get_variable(script, *args++); goalX = partMovement->goalPos.x; posX = part->absolutePosition.x; deltaX = posX - goalX; partMovement->absolutePosition.x = posX; partMovement->unk_18.x = posX; goalY = partMovement->goalPos.y; posY = part->absolutePosition.y; deltaY = posY - goalY; partMovement->absolutePosition.y = posY; partMovement->unk_18.y = posY; goalZ = partMovement->goalPos.z; posZ = part->absolutePosition.z; deltaZ = posZ - goalZ; partMovement->absolutePosition.z = posZ; partMovement->unk_18.z = posZ; partMovement->distance = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ)); if (partMovement->moveTime == 0) { partMovement->moveTime = partMovement->distance / partMovement->moveSpeed; } else { partMovement->moveSpeed = partMovement->distance / partMovement->moveTime; } if (partMovement->moveTime == 0) { return ApiStatus_DONE2; } if (part->partTypeData[2] != 0 && part->partTypeData[3] == 0) { sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } partMovement->unk_3C = 0; partMovement->angle = 0.0f; if (part->actorTypeData2b[1] >= 0) { partMovement->unk_2C = actor->actorTypeData1b[1] + 1; } else { partMovement->unk_2C = ~actor->actorTypeData1b[1]; } } part = script->functionTempPtr[2]; actor = script->functionTempPtr[1]; partMovement = part->movement; partMovement->absolutePosition.x = update_lerp_battle(script->functionTemp[3], partMovement->unk_18.x, partMovement->goalPos.x, partMovement->unk_3C, partMovement->moveTime); partMovement->absolutePosition.y = update_lerp_battle(script->functionTemp[3], partMovement->unk_18.y, partMovement->goalPos.y, partMovement->unk_3C, partMovement->moveTime); partMovement->absolutePosition.z = update_lerp_battle(script->functionTemp[3], partMovement->unk_18.z, partMovement->goalPos.z, partMovement->unk_3C, partMovement->moveTime); partMovement->unk_3C++; if (partMovement->moveTime < partMovement->unk_3C) { part->absolutePosition.x = partMovement->goalPos.x; part->absolutePosition.y = partMovement->goalPos.y; part->absolutePosition.z = partMovement->goalPos.z; if (part->partTypeData[2] != 0 && part->partTypeData[3] == 0) { snd_stop_sound(part->partTypeData[2]); } return ApiStatus_DONE2; } if (part->partTypeData[2] != 0 && part->partTypeData[3] != 0) { if (part->actorTypeData2b[1] >= 0) { partMovement->unk_2C += partMovement->moveSpeed; if (part->actorTypeData2b[1] < partMovement->unk_2C) { actor->footStepCounter++; partMovement->unk_2C = 0; if (actor->footStepCounter % 2 != 0) { if (part->partTypeData[2] != 0) { sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } else { if (part->partTypeData[3] != 0) { sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } } } else { partMovement->unk_2C += 1.0f; if (-part->actorTypeData2b[1] <= partMovement->unk_2C) { actor->footStepCounter++; partMovement->unk_2C = 0; if (actor->footStepCounter % 2 != 0) { if (part->partTypeData[2] != 0) { sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } else { if (part->partTypeData[3] != 0) { sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } } } } deltaX = partMovement->goalPos.x - partMovement->absolutePosition.x; deltaY = partMovement->goalPos.y - partMovement->absolutePosition.y; deltaZ = partMovement->goalPos.z - partMovement->absolutePosition.z; dist3D = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ)); if (dist3D == 0.0f) { dist3D = 1.0f; } if (partMovement->distance == 0.0f) { partMovement->distance = 1.0f; } offsetY = sin_deg((1.0 - dist3D / partMovement->distance) * 180.0); if (partMovement->unk_3A == 0) { offsetY = 0.0f; } if (partMovement->unk_3A < 0) { offsetY = -offsetY * (-partMovement->unk_3A); } if (partMovement->unk_3A > 0) { offsetY = offsetY * partMovement->unk_3A; } part->absolutePosition.x = partMovement->absolutePosition.x; part->absolutePosition.y = partMovement->absolutePosition.y + offsetY; part->absolutePosition.z = partMovement->absolutePosition.z; return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel _show_message /* F4CD0 802D0320 27BDFFA0 */ addiu $sp, $sp, -0x60 /* F4CD4 802D0324 AFB20038 */ sw $s2, 0x38($sp) /* F4CD8 802D0328 0080902D */ daddu $s2, $a0, $zero /* F4CDC 802D032C AFB50044 */ sw $s5, 0x44($sp) /* F4CE0 802D0330 0000A82D */ daddu $s5, $zero, $zero /* F4CE4 802D0334 AFB7004C */ sw $s7, 0x4C($sp) /* F4CE8 802D0338 AFB3003C */ sw $s3, 0x3C($sp) /* F4CEC 802D033C 3C138011 */ lui $s3, %hi(gPlayerStatus) /* F4CF0 802D0340 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* F4CF4 802D0344 AFBF0054 */ sw $ra, 0x54($sp) /* F4CF8 802D0348 AFBE0050 */ sw $fp, 0x50($sp) /* F4CFC 802D034C AFB60048 */ sw $s6, 0x48($sp) /* F4D00 802D0350 AFB40040 */ sw $s4, 0x40($sp) /* F4D04 802D0354 AFB10034 */ sw $s1, 0x34($sp) /* F4D08 802D0358 AFB00030 */ sw $s0, 0x30($sp) /* F4D0C 802D035C F7B40058 */ sdc1 $f20, 0x58($sp) /* F4D10 802D0360 8E50000C */ lw $s0, 0xC($s2) /* F4D14 802D0364 10A000CD */ beqz $a1, .L802D069C /* F4D18 802D0368 00C0B82D */ daddu $s7, $a2, $zero /* F4D1C 802D036C 3C16802E */ lui $s6, %hi(D_802DB264) /* F4D20 802D0370 26D6B264 */ addiu $s6, $s6, %lo(D_802DB264) /* F4D24 802D0374 AEC00000 */ sw $zero, 0x0($s6) /* F4D28 802D0378 8E050000 */ lw $a1, 0x0($s0) /* F4D2C 802D037C 0C0B1EAF */ jal evt_get_variable /* F4D30 802D0380 26100004 */ addiu $s0, $s0, 0x4 /* F4D34 802D0384 8E050000 */ lw $a1, 0x0($s0) /* F4D38 802D0388 26100004 */ addiu $s0, $s0, 0x4 /* F4D3C 802D038C 0240202D */ daddu $a0, $s2, $zero /* F4D40 802D0390 0C0B1EAF */ jal evt_get_variable /* F4D44 802D0394 0040F02D */ daddu $fp, $v0, $zero /* F4D48 802D0398 AE4200B8 */ sw $v0, 0xB8($s2) /* F4D4C 802D039C 8E050000 */ lw $a1, 0x0($s0) /* F4D50 802D03A0 26100004 */ addiu $s0, $s0, 0x4 /* F4D54 802D03A4 0C0B1EAF */ jal evt_get_variable /* F4D58 802D03A8 0240202D */ daddu $a0, $s2, $zero /* F4D5C 802D03AC AE4200BC */ sw $v0, 0xBC($s2) /* F4D60 802D03B0 8E050000 */ lw $a1, 0x0($s0) /* F4D64 802D03B4 26100004 */ addiu $s0, $s0, 0x4 /* F4D68 802D03B8 0C0B1EAF */ jal evt_get_variable /* F4D6C 802D03BC 0240202D */ daddu $a0, $s2, $zero /* F4D70 802D03C0 3C14802E */ lui $s4, %hi(D_802DAE54) /* F4D74 802D03C4 2694AE54 */ addiu $s4, $s4, %lo(D_802DAE54) /* F4D78 802D03C8 AE420074 */ sw $v0, 0x74($s2) /* F4D7C 802D03CC AE800000 */ sw $zero, 0x0($s4) /* F4D80 802D03D0 8E420074 */ lw $v0, 0x74($s2) /* F4D84 802D03D4 3C11802E */ lui $s1, %hi(D_802DAE50) /* F4D88 802D03D8 2631AE50 */ addiu $s1, $s1, %lo(D_802DAE50) /* F4D8C 802D03DC 30420100 */ andi $v0, $v0, 0x100 /* F4D90 802D03E0 1040000B */ beqz $v0, .L802D0410 /* F4D94 802D03E4 AE200000 */ sw $zero, 0x0($s1) /* F4D98 802D03E8 8E050000 */ lw $a1, 0x0($s0) /* F4D9C 802D03EC 26100004 */ addiu $s0, $s0, 0x4 /* F4DA0 802D03F0 0C0B1EAF */ jal evt_get_variable /* F4DA4 802D03F4 0240202D */ daddu $a0, $s2, $zero /* F4DA8 802D03F8 AE220000 */ sw $v0, 0x0($s1) /* F4DAC 802D03FC 8E050000 */ lw $a1, 0x0($s0) /* F4DB0 802D0400 26100004 */ addiu $s0, $s0, 0x4 /* F4DB4 802D0404 0C0B1EAF */ jal evt_get_variable /* F4DB8 802D0408 0240202D */ daddu $a0, $s2, $zero /* F4DBC 802D040C AE820000 */ sw $v0, 0x0($s4) .L802D0410: /* F4DC0 802D0410 24020001 */ addiu $v0, $zero, 0x1 /* F4DC4 802D0414 12E20012 */ beq $s7, $v0, .L802D0460 /* F4DC8 802D0418 2AE20002 */ slti $v0, $s7, 0x2 /* F4DCC 802D041C 10400005 */ beqz $v0, .L802D0434 /* F4DD0 802D0420 24020002 */ addiu $v0, $zero, 0x2 /* F4DD4 802D0424 12E00009 */ beqz $s7, .L802D044C /* F4DD8 802D0428 2402FFFE */ addiu $v0, $zero, -0x2 /* F4DDC 802D042C 080B413A */ j .L802D04E8 /* F4DE0 802D0430 00000000 */ nop .L802D0434: /* F4DE4 802D0434 12E20010 */ beq $s7, $v0, .L802D0478 /* F4DE8 802D0438 24020003 */ addiu $v0, $zero, 0x3 /* F4DEC 802D043C 12E20017 */ beq $s7, $v0, .L802D049C /* F4DF0 802D0440 2402FFFE */ addiu $v0, $zero, -0x2 /* F4DF4 802D0444 080B413A */ j .L802D04E8 /* F4DF8 802D0448 00000000 */ nop .L802D044C: /* F4DFC 802D044C 8E050000 */ lw $a1, 0x0($s0) /* F4E00 802D0450 0C0B1EAF */ jal evt_get_variable /* F4E04 802D0454 0240202D */ daddu $a0, $s2, $zero /* F4E08 802D0458 080B4135 */ j .L802D04D4 /* F4E0C 802D045C 0040202D */ daddu $a0, $v0, $zero .L802D0460: /* F4E10 802D0460 3C04802E */ lui $a0, %hi(gCurrentPrintContext) /* F4E14 802D0464 8C84B260 */ lw $a0, %lo(gCurrentPrintContext)($a0) /* F4E18 802D0468 0C04971C */ jal close_message /* F4E1C 802D046C 00000000 */ nop /* F4E20 802D0470 080B413A */ j .L802D04E8 /* F4E24 802D0474 2402FFFE */ addiu $v0, $zero, -0x2 .L802D0478: /* F4E28 802D0478 8E050000 */ lw $a1, 0x0($s0) /* F4E2C 802D047C 0C0B1EAF */ jal evt_get_variable /* F4E30 802D0480 0240202D */ daddu $a0, $s2, $zero /* F4E34 802D0484 3C05802E */ lui $a1, %hi(gCurrentPrintContext) /* F4E38 802D0488 8CA5B260 */ lw $a1, %lo(gCurrentPrintContext)($a1) /* F4E3C 802D048C 0C04969A */ jal msg_printer_load_msg /* F4E40 802D0490 0040202D */ daddu $a0, $v0, $zero /* F4E44 802D0494 080B413A */ j .L802D04E8 /* F4E48 802D0498 2402FFFE */ addiu $v0, $zero, -0x2 .L802D049C: /* F4E4C 802D049C 8E050000 */ lw $a1, 0x0($s0) /* F4E50 802D04A0 26100004 */ addiu $s0, $s0, 0x4 /* F4E54 802D04A4 0C0B1EAF */ jal evt_get_variable /* F4E58 802D04A8 0240202D */ daddu $a0, $s2, $zero /* F4E5C 802D04AC 0240202D */ daddu $a0, $s2, $zero /* F4E60 802D04B0 8E050000 */ lw $a1, 0x0($s0) /* F4E64 802D04B4 0C0B1EAF */ jal evt_get_variable /* F4E68 802D04B8 0040802D */ daddu $s0, $v0, $zero /* F4E6C 802D04BC 0240202D */ daddu $a0, $s2, $zero /* F4E70 802D04C0 0200282D */ daddu $a1, $s0, $zero /* F4E74 802D04C4 0C0B36B0 */ jal resolve_npc /* F4E78 802D04C8 0040802D */ daddu $s0, $v0, $zero /* F4E7C 802D04CC 0040A82D */ daddu $s5, $v0, $zero /* F4E80 802D04D0 0200202D */ daddu $a0, $s0, $zero .L802D04D4: /* F4E84 802D04D4 0C049640 */ jal msg_get_printer_for_msg /* F4E88 802D04D8 02C0282D */ daddu $a1, $s6, $zero /* F4E8C 802D04DC 3C01802E */ lui $at, %hi(gCurrentPrintContext) /* F4E90 802D04E0 AC22B260 */ sw $v0, %lo(gCurrentPrintContext)($at) /* F4E94 802D04E4 2402FFFE */ addiu $v0, $zero, -0x2 .L802D04E8: /* F4E98 802D04E8 17C20018 */ bne $fp, $v0, .L802D054C /* F4E9C 802D04EC 0240202D */ daddu $a0, $s2, $zero /* F4EA0 802D04F0 8E650028 */ lw $a1, 0x28($s3) /* F4EA4 802D04F4 8E670030 */ lw $a3, 0x30($s3) /* F4EA8 802D04F8 27A20020 */ addiu $v0, $sp, 0x20 /* F4EAC 802D04FC AFA20010 */ sw $v0, 0x10($sp) /* F4EB0 802D0500 27A20024 */ addiu $v0, $sp, 0x24 /* F4EB4 802D0504 AFA20014 */ sw $v0, 0x14($sp) /* F4EB8 802D0508 866200B0 */ lh $v0, 0xB0($s3) /* F4EBC 802D050C C662002C */ lwc1 $f2, 0x2C($s3) /* F4EC0 802D0510 44820000 */ mtc1 $v0, $f0 /* F4EC4 802D0514 00000000 */ nop /* F4EC8 802D0518 46800020 */ cvt.s.w $f0, $f0 /* F4ECC 802D051C 46001080 */ add.s $f2, $f2, $f0 /* F4ED0 802D0520 3C048007 */ lui $a0, %hi(gCurrentCameraID) /* F4ED4 802D0524 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) /* F4ED8 802D0528 44061000 */ mfc1 $a2, $f2 /* F4EDC 802D052C 27A20028 */ addiu $v0, $sp, 0x28 /* F4EE0 802D0530 0C00B94E */ jal get_screen_coords /* F4EE4 802D0534 AFA20018 */ sw $v0, 0x18($sp) /* F4EE8 802D0538 8E6200B8 */ lw $v0, 0xB8($s3) /* F4EEC 802D053C AE42007C */ sw $v0, 0x7C($s2) /* F4EF0 802D0540 C6600080 */ lwc1 $f0, 0x80($s3) /* F4EF4 802D0544 080B416C */ j .L802D05B0 /* F4EF8 802D0548 2410FFFE */ addiu $s0, $zero, -0x2 .L802D054C: /* F4EFC 802D054C 0C0B36B0 */ jal resolve_npc /* F4F00 802D0550 03C0282D */ daddu $a1, $fp, $zero /* F4F04 802D0554 0040802D */ daddu $s0, $v0, $zero /* F4F08 802D0558 3C048007 */ lui $a0, %hi(gCurrentCameraID) /* F4F0C 802D055C 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) /* F4F10 802D0560 860300A8 */ lh $v1, 0xA8($s0) /* F4F14 802D0564 C602003C */ lwc1 $f2, 0x3C($s0) /* F4F18 802D0568 27A20020 */ addiu $v0, $sp, 0x20 /* F4F1C 802D056C AFA20010 */ sw $v0, 0x10($sp) /* F4F20 802D0570 27A20024 */ addiu $v0, $sp, 0x24 /* F4F24 802D0574 AFA20014 */ sw $v0, 0x14($sp) /* F4F28 802D0578 27A20028 */ addiu $v0, $sp, 0x28 /* F4F2C 802D057C AFA20018 */ sw $v0, 0x18($sp) /* F4F30 802D0580 44830000 */ mtc1 $v1, $f0 /* F4F34 802D0584 00000000 */ nop /* F4F38 802D0588 46800020 */ cvt.s.w $f0, $f0 /* F4F3C 802D058C 46001080 */ add.s $f2, $f2, $f0 /* F4F40 802D0590 8E050038 */ lw $a1, 0x38($s0) /* F4F44 802D0594 8E070040 */ lw $a3, 0x40($s0) /* F4F48 802D0598 44061000 */ mfc1 $a2, $f2 /* F4F4C 802D059C 0C00B94E */ jal get_screen_coords /* F4F50 802D05A0 00000000 */ nop /* F4F54 802D05A4 8E020028 */ lw $v0, 0x28($s0) /* F4F58 802D05A8 AE42007C */ sw $v0, 0x7C($s2) /* F4F5C 802D05AC C600000C */ lwc1 $f0, 0xC($s0) .L802D05B0: /* F4F60 802D05B0 4600010D */ trunc.w.s $f4, $f0 /* F4F64 802D05B4 E64400C0 */ swc1 $f4, 0xC0($s2) /* F4F68 802D05B8 3C04802E */ lui $a0, %hi(gCurrentPrintContext) /* F4F6C 802D05BC 8C84B260 */ lw $a0, %lo(gCurrentPrintContext)($a0) /* F4F70 802D05C0 8FA30020 */ lw $v1, 0x20($sp) /* F4F74 802D05C4 3C05802E */ lui $a1, %hi(D_802DAE50) /* F4F78 802D05C8 8CA5AE50 */ lw $a1, %lo(D_802DAE50)($a1) /* F4F7C 802D05CC 8FA20024 */ lw $v0, 0x24($sp) /* F4F80 802D05D0 3C06802E */ lui $a2, %hi(D_802DAE54) /* F4F84 802D05D4 8CC6AE54 */ lw $a2, %lo(D_802DAE54)($a2) /* F4F88 802D05D8 00652821 */ addu $a1, $v1, $a1 /* F4F8C 802D05DC 0C0496AE */ jal msg_printer_set_origin_pos /* F4F90 802D05E0 00463021 */ addu $a2, $v0, $a2 /* F4F94 802D05E4 2402FFFE */ addiu $v0, $zero, -0x2 /* F4F98 802D05E8 1202002C */ beq $s0, $v0, .L802D069C /* F4F9C 802D05EC AE5000B4 */ sw $s0, 0xB4($s2) /* F4FA0 802D05F0 24020003 */ addiu $v0, $zero, 0x3 /* F4FA4 802D05F4 16E20007 */ bne $s7, $v0, .L802D0614 /* F4FA8 802D05F8 26710080 */ addiu $s1, $s3, 0x80 /* F4FAC 802D05FC C60C0038 */ lwc1 $f12, 0x38($s0) /* F4FB0 802D0600 C60E0040 */ lwc1 $f14, 0x40($s0) /* F4FB4 802D0604 8EA60038 */ lw $a2, 0x38($s5) /* F4FB8 802D0608 8EA70040 */ lw $a3, 0x40($s5) /* F4FBC 802D060C 080B4189 */ j .L802D0624 /* F4FC0 802D0610 26B1000C */ addiu $s1, $s5, 0xC .L802D0614: /* F4FC4 802D0614 C60C0038 */ lwc1 $f12, 0x38($s0) /* F4FC8 802D0618 C60E0040 */ lwc1 $f14, 0x40($s0) /* F4FCC 802D061C 8E660028 */ lw $a2, 0x28($s3) /* F4FD0 802D0620 8E670030 */ lw $a3, 0x30($s3) .L802D0624: /* F4FD4 802D0624 0C00A720 */ jal atan2 /* F4FD8 802D0628 00000000 */ nop /* F4FDC 802D062C 46000506 */ mov.s $f20, $f0 /* F4FE0 802D0630 3C014334 */ lui $at, (0x43340000 >> 16) /* F4FE4 802D0634 44816000 */ mtc1 $at, $f12 /* F4FE8 802D0638 0C00A6C9 */ jal clamp_angle /* F4FEC 802D063C 460CA300 */ add.s $f12, $f20, $f12 /* F4FF0 802D0640 8E420074 */ lw $v0, 0x74($s2) /* F4FF4 802D0644 3043000F */ andi $v1, $v0, 0xF /* F4FF8 802D0648 2C620006 */ sltiu $v0, $v1, 0x6 /* F4FFC 802D064C 10400013 */ beqz $v0, .L802D069C /* F5000 802D0650 00031080 */ sll $v0, $v1, 2 /* F5004 802D0654 3C01802E */ lui $at, %hi(jtbl_802DA1F0) /* F5008 802D0658 00220821 */ addu $at, $at, $v0 /* F500C 802D065C 8C22A1F0 */ lw $v0, %lo(jtbl_802DA1F0)($at) /* F5010 802D0660 00400008 */ jr $v0 /* F5014 802D0664 00000000 */ nop glabel .L802D0668 /* F5018 802D0668 E614000C */ swc1 $f20, 0xC($s0) /* F501C 802D066C 080B41A7 */ j .L802D069C /* F5020 802D0670 E6200000 */ swc1 $f0, 0x0($s1) glabel .L802D0674 /* F5024 802D0674 E600000C */ swc1 $f0, 0xC($s0) /* F5028 802D0678 080B41A7 */ j .L802D069C /* F502C 802D067C E6200000 */ swc1 $f0, 0x0($s1) glabel .L802D0680 /* F5030 802D0680 E614000C */ swc1 $f20, 0xC($s0) /* F5034 802D0684 080B41A7 */ j .L802D069C /* F5038 802D0688 E6340000 */ swc1 $f20, 0x0($s1) glabel .L802D068C /* F503C 802D068C E600000C */ swc1 $f0, 0xC($s0) /* F5040 802D0690 080B41A7 */ j .L802D069C /* F5044 802D0694 E6340000 */ swc1 $f20, 0x0($s1) glabel .L802D0698 /* F5048 802D0698 E614000C */ swc1 $f20, 0xC($s0) glabel .L802D069C /* F504C 802D069C 8E5000B4 */ lw $s0, 0xB4($s2) /* F5050 802D06A0 2402FFFE */ addiu $v0, $zero, -0x2 /* F5054 802D06A4 12020022 */ beq $s0, $v0, .L802D0730 /* F5058 802D06A8 27A20020 */ addiu $v0, $sp, 0x20 /* F505C 802D06AC 3C048007 */ lui $a0, %hi(gCurrentCameraID) /* F5060 802D06B0 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) /* F5064 802D06B4 860300A8 */ lh $v1, 0xA8($s0) /* F5068 802D06B8 C602003C */ lwc1 $f2, 0x3C($s0) /* F506C 802D06BC AFA20010 */ sw $v0, 0x10($sp) /* F5070 802D06C0 27A20024 */ addiu $v0, $sp, 0x24 /* F5074 802D06C4 AFA20014 */ sw $v0, 0x14($sp) /* F5078 802D06C8 27A20028 */ addiu $v0, $sp, 0x28 /* F507C 802D06CC AFA20018 */ sw $v0, 0x18($sp) /* F5080 802D06D0 44830000 */ mtc1 $v1, $f0 /* F5084 802D06D4 00000000 */ nop /* F5088 802D06D8 46800020 */ cvt.s.w $f0, $f0 /* F508C 802D06DC 46001080 */ add.s $f2, $f2, $f0 /* F5090 802D06E0 8E050038 */ lw $a1, 0x38($s0) /* F5094 802D06E4 8E070040 */ lw $a3, 0x40($s0) /* F5098 802D06E8 44061000 */ mfc1 $a2, $f2 /* F509C 802D06EC 0C00B94E */ jal get_screen_coords /* F50A0 802D06F0 00000000 */ nop /* F50A4 802D06F4 8E4500B8 */ lw $a1, 0xB8($s2) /* F50A8 802D06F8 2402FFFF */ addiu $v0, $zero, -0x1 /* F50AC 802D06FC 10A2002B */ beq $a1, $v0, .L802D07AC /* F50B0 802D0700 00000000 */ nop /* F50B4 802D0704 3C02802E */ lui $v0, %hi(gCurrentPrintContext) /* F50B8 802D0708 8C42B260 */ lw $v0, %lo(gCurrentPrintContext)($v0) /* F50BC 802D070C 8C4204FC */ lw $v0, 0x4FC($v0) /* F50C0 802D0710 30420080 */ andi $v0, $v0, 0x80 /* F50C4 802D0714 14400002 */ bnez $v0, .L802D0720 /* F50C8 802D0718 00000000 */ nop /* F50CC 802D071C 8E4500BC */ lw $a1, 0xBC($s2) .L802D0720: /* F50D0 802D0720 0C0B36C3 */ jal set_npc_animation /* F50D4 802D0724 0200202D */ daddu $a0, $s0, $zero /* F50D8 802D0728 080B41EB */ j .L802D07AC /* F50DC 802D072C 00000000 */ nop .L802D0730: /* F50E0 802D0730 8E650028 */ lw $a1, 0x28($s3) /* F50E4 802D0734 8E670030 */ lw $a3, 0x30($s3) /* F50E8 802D0738 AFA20010 */ sw $v0, 0x10($sp) /* F50EC 802D073C 27A20024 */ addiu $v0, $sp, 0x24 /* F50F0 802D0740 AFA20014 */ sw $v0, 0x14($sp) /* F50F4 802D0744 866200B0 */ lh $v0, 0xB0($s3) /* F50F8 802D0748 C662002C */ lwc1 $f2, 0x2C($s3) /* F50FC 802D074C 44820000 */ mtc1 $v0, $f0 /* F5100 802D0750 00000000 */ nop /* F5104 802D0754 46800020 */ cvt.s.w $f0, $f0 /* F5108 802D0758 46001080 */ add.s $f2, $f2, $f0 /* F510C 802D075C 3C048007 */ lui $a0, %hi(gCurrentCameraID) /* F5110 802D0760 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) /* F5114 802D0764 44061000 */ mfc1 $a2, $f2 /* F5118 802D0768 27A20028 */ addiu $v0, $sp, 0x28 /* F511C 802D076C 0C00B94E */ jal get_screen_coords /* F5120 802D0770 AFA20018 */ sw $v0, 0x18($sp) /* F5124 802D0774 8E4300B8 */ lw $v1, 0xB8($s2) /* F5128 802D0778 2402FFFF */ addiu $v0, $zero, -0x1 /* F512C 802D077C 1062000B */ beq $v1, $v0, .L802D07AC /* F5130 802D0780 00000000 */ nop /* F5134 802D0784 3C02802E */ lui $v0, %hi(gCurrentPrintContext) /* F5138 802D0788 8C42B260 */ lw $v0, %lo(gCurrentPrintContext)($v0) /* F513C 802D078C 8C4204FC */ lw $v0, 0x4FC($v0) /* F5140 802D0790 30420080 */ andi $v0, $v0, 0x80 /* F5144 802D0794 10400003 */ beqz $v0, .L802D07A4 /* F5148 802D0798 00000000 */ nop /* F514C 802D079C 080B41EB */ j .L802D07AC /* F5150 802D07A0 AE6300B8 */ sw $v1, 0xB8($s3) .L802D07A4: /* F5154 802D07A4 8E4200BC */ lw $v0, 0xBC($s2) /* F5158 802D07A8 AE6200B8 */ sw $v0, 0xB8($s3) .L802D07AC: /* F515C 802D07AC 8E420074 */ lw $v0, 0x74($s2) /* F5160 802D07B0 30420200 */ andi $v0, $v0, 0x200 /* F5164 802D07B4 1440000C */ bnez $v0, .L802D07E8 /* F5168 802D07B8 00000000 */ nop /* F516C 802D07BC 3C04802E */ lui $a0, %hi(gCurrentPrintContext) /* F5170 802D07C0 8C84B260 */ lw $a0, %lo(gCurrentPrintContext)($a0) /* F5174 802D07C4 8FA30020 */ lw $v1, 0x20($sp) /* F5178 802D07C8 3C05802E */ lui $a1, %hi(D_802DAE50) /* F517C 802D07CC 8CA5AE50 */ lw $a1, %lo(D_802DAE50)($a1) /* F5180 802D07D0 8FA20024 */ lw $v0, 0x24($sp) /* F5184 802D07D4 3C06802E */ lui $a2, %hi(D_802DAE54) /* F5188 802D07D8 8CC6AE54 */ lw $a2, %lo(D_802DAE54)($a2) /* F518C 802D07DC 00652821 */ addu $a1, $v1, $a1 /* F5190 802D07E0 0C0496AE */ jal msg_printer_set_origin_pos /* F5194 802D07E4 00463021 */ addu $a2, $v0, $a2 .L802D07E8: /* F5198 802D07E8 3C02802E */ lui $v0, %hi(gCurrentPrintContext) /* F519C 802D07EC 8C42B260 */ lw $v0, %lo(gCurrentPrintContext)($v0) /* F51A0 802D07F0 8C4204FC */ lw $v0, 0x4FC($v0) /* F51A4 802D07F4 30420040 */ andi $v0, $v0, 0x40 /* F51A8 802D07F8 14400019 */ bnez $v0, .L802D0860 /* F51AC 802D07FC 24020001 */ addiu $v0, $zero, 0x1 /* F51B0 802D0800 3C03802E */ lui $v1, %hi(D_802DB264) /* F51B4 802D0804 8C63B264 */ lw $v1, %lo(D_802DB264)($v1) /* F51B8 802D0808 14620015 */ bne $v1, $v0, .L802D0860 /* F51BC 802D080C 0000102D */ daddu $v0, $zero, $zero /* F51C0 802D0810 8E4300B8 */ lw $v1, 0xB8($s2) /* F51C4 802D0814 2402FFFF */ addiu $v0, $zero, -0x1 /* F51C8 802D0818 1062000A */ beq $v1, $v0, .L802D0844 /* F51CC 802D081C 2402FFFE */ addiu $v0, $zero, -0x2 /* F51D0 802D0820 12020006 */ beq $s0, $v0, .L802D083C /* F51D4 802D0824 00000000 */ nop /* F51D8 802D0828 8E45007C */ lw $a1, 0x7C($s2) /* F51DC 802D082C 0C0B36C3 */ jal set_npc_animation /* F51E0 802D0830 0200202D */ daddu $a0, $s0, $zero /* F51E4 802D0834 080B4211 */ j .L802D0844 /* F51E8 802D0838 00000000 */ nop .L802D083C: /* F51EC 802D083C 8E42007C */ lw $v0, 0x7C($s2) /* F51F0 802D0840 AE6200B8 */ sw $v0, 0xB8($s3) .L802D0844: /* F51F4 802D0844 8E420074 */ lw $v0, 0x74($s2) /* F51F8 802D0848 30420010 */ andi $v0, $v0, 0x10 /* F51FC 802D084C 10400004 */ beqz $v0, .L802D0860 /* F5200 802D0850 24020001 */ addiu $v0, $zero, 0x1 /* F5204 802D0854 C64000C0 */ lwc1 $f0, 0xC0($s2) /* F5208 802D0858 46800020 */ cvt.s.w $f0, $f0 /* F520C 802D085C E600000C */ swc1 $f0, 0xC($s0) .L802D0860: /* F5210 802D0860 8FBF0054 */ lw $ra, 0x54($sp) /* F5214 802D0864 8FBE0050 */ lw $fp, 0x50($sp) /* F5218 802D0868 8FB7004C */ lw $s7, 0x4C($sp) /* F521C 802D086C 8FB60048 */ lw $s6, 0x48($sp) /* F5220 802D0870 8FB50044 */ lw $s5, 0x44($sp) /* F5224 802D0874 8FB40040 */ lw $s4, 0x40($sp) /* F5228 802D0878 8FB3003C */ lw $s3, 0x3C($sp) /* F522C 802D087C 8FB20038 */ lw $s2, 0x38($sp) /* F5230 802D0880 8FB10034 */ lw $s1, 0x34($sp) /* F5234 802D0884 8FB00030 */ lw $s0, 0x30($sp) /* F5238 802D0888 D7B40058 */ ldc1 $f20, 0x58($sp) /* F523C 802D088C 03E00008 */ jr $ra /* F5240 802D0890 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: s32 _show_message(Evt* script, s32 isInitialCall, s32 mode) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; s32 screenX, screenY, screenZ; Npc* speakerNpc; Npc* targetNpc; f32 reverseAngle; f32 angle; f32* listenerYaw; s32 speakerNpcID; s32 targetNpcID; s32 msgID; s32 animID; s32 ret; targetNpc = NULL; if (isInitialCall) { D_802DB264 = 0; speakerNpcID = evt_get_variable(script, *args++); script->varTable[13] = evt_get_variable(script, *args++); script->varTable[14] = evt_get_variable(script, *args++); script->functionTemp[1] = evt_get_variable(script, *args++); ShowMessageScreenOffsetY = 0; ShowMessageScreenOffsetX = 0; if (script->functionTemp[1] & SPEECH_FLAG_HAS_OFFSET) { ShowMessageScreenOffsetX = evt_get_variable(script, *args++); ShowMessageScreenOffsetY = evt_get_variable(script, *args++); } switch (mode) { case SHOW_MESSAGE_SPEAK_TO_PLAYER: msgID = evt_get_variable(script, *args++); gCurrentPrintContext = msg_get_printer_for_msg(msgID, &D_802DB264); break; case SHOW_MESSAGE_END_SPEECH: close_message(gCurrentPrintContext); break; case SHOW_MESSAGE_CONTINUE_SPEECH: msgID = evt_get_variable(script, *args++); msg_printer_load_msg(msgID, gCurrentPrintContext); break; case SHOW_MESSAGE_SPEAK_TO_NPC: targetNpcID = evt_get_variable(script, *args++); msgID = evt_get_variable(script, *args++); targetNpc = resolve_npc(script, targetNpcID); gCurrentPrintContext = msg_get_printer_for_msg(msgID, &D_802DB264); break; } if (speakerNpcID == NPC_PLAYER) { get_screen_coords(gCurrentCameraID, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, &screenX, &screenY, &screenZ); script->functionTemp[3] = playerStatus->anim; speakerNpc = (Npc*) NPC_PLAYER; script->varTable[15] = playerStatus->targetYaw; } else { speakerNpc = resolve_npc(script, speakerNpcID); get_screen_coords(gCurrentCameraID, speakerNpc->pos.x, speakerNpc->pos.y + speakerNpc->collisionHeight, speakerNpc->pos.z, &screenX, &screenY, &screenZ); script->functionTemp[3] = speakerNpc->currentAnim; script->varTable[15] = speakerNpc->yaw; } msg_printer_set_origin_pos(gCurrentPrintContext, screenX + ShowMessageScreenOffsetX, screenY + ShowMessageScreenOffsetY); script->varTablePtr[12] = speakerNpc; if (speakerNpc != (Npc*) NPC_PLAYER) { if (mode == SHOW_MESSAGE_SPEAK_TO_NPC) { listenerYaw = &targetNpc->yaw; angle = atan2(speakerNpc->pos.x, speakerNpc->pos.z, targetNpc->pos.x, targetNpc->pos.z); } else { listenerYaw = &playerStatus->targetYaw; angle = atan2(speakerNpc->pos.x, speakerNpc->pos.z, playerStatus->position.x, playerStatus->position.z); } reverseAngle = clamp_angle(angle + 180.0f); switch (script->functionTemp[1] & SPEECH_ORIENTATION_MASK) { case SPEECH_FACE_EACH_OTHER: speakerNpc->yaw = angle; *listenerYaw = reverseAngle; break; case SPEECH_FACE_LIKE_LISTENER: speakerNpc->yaw = reverseAngle; *listenerYaw = reverseAngle; break; case SPEECH_FACE_LIKE_SPEAKER: speakerNpc->yaw = angle; *listenerYaw = angle; break; case SPEECH_FACE_AWAY_FROM: speakerNpc->yaw = reverseAngle; *listenerYaw = angle; break; case SPEECH_FACE_SPEAKER_ONLY: speakerNpc->yaw = angle; break; case 5: break; } } } speakerNpc = script->varTablePtr[12]; if (speakerNpc != (Npc*) NPC_PLAYER) { get_screen_coords(gCurrentCameraID, speakerNpc->pos.x, speakerNpc->pos.y + speakerNpc->collisionHeight, speakerNpc->pos.z, &screenX, &screenY, &screenZ); animID = script->varTable[13]; if (animID != -1) { if (!(gCurrentPrintContext->stateFlags & MSG_STATE_FLAG_80)) { animID = script->varTable[14]; } set_npc_animation(speakerNpc, animID); } } else { get_screen_coords(gCurrentCameraID, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, &screenX, &screenY, &screenZ); if (script->varTable[13] != -1) { if (gCurrentPrintContext->stateFlags & MSG_STATE_FLAG_80) { playerStatus->anim = script->varTable[13]; } else { playerStatus->anim = script->varTable[14]; } } } if (!(script->functionTemp[1] & SPEECH_FLAG_200)) { msg_printer_set_origin_pos(gCurrentPrintContext, screenX + ShowMessageScreenOffsetX, screenY + ShowMessageScreenOffsetY); } if (gCurrentPrintContext->stateFlags & MSG_STATE_FLAG_40) { return TRUE; } if (D_802DB264 != 1) { return FALSE; } if (script->varTable[13] != -1) { if (speakerNpc != (Npc*) NPC_PLAYER) { set_npc_animation(speakerNpc, script->functionTemp[3]); } else { playerStatus->anim = script->functionTemp[3]; } } if (script->functionTemp[1] & SPEECH_FLAG_10) { speakerNpc->yaw = script->varTable[0xF]; } return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel msg_draw_char /* C2A24 8012C324 27BDFFE8 */ addiu $sp, $sp, -0x18 /* C2A28 8012C328 00A0502D */ daddu $t2, $a1, $zero /* C2A2C 8012C32C AFB20008 */ sw $s2, 0x8($sp) /* C2A30 8012C330 00C0902D */ daddu $s2, $a2, $zero /* C2A34 8012C334 AFB10004 */ sw $s1, 0x4($sp) /* C2A38 8012C338 00E0882D */ daddu $s1, $a3, $zero /* C2A3C 8012C33C AFB40010 */ sw $s4, 0x10($sp) /* C2A40 8012C340 AFB3000C */ sw $s3, 0xC($sp) /* C2A44 8012C344 AFB00000 */ sw $s0, 0x0($sp) /* C2A48 8012C348 9542003C */ lhu $v0, 0x3C($t2) /* C2A4C 8012C34C C5460018 */ lwc1 $f6, 0x18($t2) /* C2A50 8012C350 C542001C */ lwc1 $f2, 0x1C($t2) /* C2A54 8012C354 8FA60028 */ lw $a2, 0x28($sp) /* C2A58 8012C358 00021080 */ sll $v0, $v0, 2 /* C2A5C 8012C35C 3C09802F */ lui $t1, %hi(gMsgCharsets) /* C2A60 8012C360 01224821 */ addu $t1, $t1, $v0 /* C2A64 8012C364 8D29B5A8 */ lw $t1, %lo(gMsgCharsets)($t1) /* C2A68 8012C368 8FA3002C */ lw $v1, 0x2C($sp) /* C2A6C 8012C36C 91220000 */ lbu $v0, 0x0($t1) /* C2A70 8012C370 8D4B0004 */ lw $t3, 0x4($t2) /* C2A74 8012C374 44822000 */ mtc1 $v0, $f4 /* C2A78 8012C378 00000000 */ nop /* C2A7C 8012C37C 46802120 */ cvt.s.w $f4, $f4 /* C2A80 8012C380 46043102 */ mul.s $f4, $f6, $f4 /* C2A84 8012C384 00000000 */ nop /* C2A88 8012C388 954C003E */ lhu $t4, 0x3E($t2) /* C2A8C 8012C38C 91220001 */ lbu $v0, 0x1($t1) /* C2A90 8012C390 8D470008 */ lw $a3, 0x8($t2) /* C2A94 8012C394 44820000 */ mtc1 $v0, $f0 /* C2A98 8012C398 00000000 */ nop /* C2A9C 8012C39C 46800020 */ cvt.s.w $f0, $f0 /* C2AA0 8012C3A0 46001082 */ mul.s $f2, $f2, $f0 /* C2AA4 8012C3A4 00000000 */ nop /* C2AA8 8012C3A8 8D48000C */ lw $t0, 0xC($t2) /* C2AAC 8012C3AC 8D450000 */ lw $a1, 0x0($t2) /* C2AB0 8012C3B0 4600220D */ trunc.w.s $f8, $f4 /* C2AB4 8012C3B4 44024000 */ mfc1 $v0, $f8 /* C2AB8 8012C3B8 00000000 */ nop /* C2ABC 8012C3BC 00C26821 */ addu $t5, $a2, $v0 /* C2AC0 8012C3C0 4600120D */ trunc.w.s $f8, $f2 /* C2AC4 8012C3C4 44024000 */ mfc1 $v0, $f8 /* C2AC8 8012C3C8 00000000 */ nop /* C2ACC 8012C3CC 00627021 */ addu $t6, $v1, $v0 /* C2AD0 8012C3D0 00CB102A */ slt $v0, $a2, $t3 /* C2AD4 8012C3D4 1040016D */ beqz $v0, .L8012C98C /* C2AD8 8012C3D8 0068102A */ slt $v0, $v1, $t0 /* C2ADC 8012C3DC 1040016B */ beqz $v0, .L8012C98C /* C2AE0 8012C3E0 00AD102A */ slt $v0, $a1, $t5 /* C2AE4 8012C3E4 10400169 */ beqz $v0, .L8012C98C /* C2AE8 8012C3E8 00EE102A */ slt $v0, $a3, $t6 /* C2AEC 8012C3EC 10400167 */ beqz $v0, .L8012C98C /* C2AF0 8012C3F0 00C5102A */ slt $v0, $a2, $a1 /* C2AF4 8012C3F4 10400017 */ beqz $v0, .L8012C454 /* C2AF8 8012C3F8 00C51023 */ subu $v0, $a2, $a1 /* C2AFC 8012C3FC 04420001 */ bltzl $v0, .L8012C404 /* C2B00 8012C400 00021023 */ negu $v0, $v0 .L8012C404: /* C2B04 8012C404 44820000 */ mtc1 $v0, $f0 /* C2B08 8012C408 00000000 */ nop /* C2B0C 8012C40C 46800020 */ cvt.s.w $f0, $f0 /* C2B10 8012C410 46060103 */ div.s $f4, $f0, $f6 /* C2B14 8012C414 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* C2B18 8012C418 44811800 */ mtc1 $at, $f3 /* C2B1C 8012C41C 44801000 */ mtc1 $zero, $f2 /* C2B20 8012C420 46002021 */ cvt.d.s $f0, $f4 /* C2B24 8012C424 46220000 */ add.d $f0, $f0, $f2 /* C2B28 8012C428 3C014040 */ lui $at, (0x40400000 >> 16) /* C2B2C 8012C42C 44811800 */ mtc1 $at, $f3 /* C2B30 8012C430 44801000 */ mtc1 $zero, $f2 /* C2B34 8012C434 00000000 */ nop /* C2B38 8012C438 46220002 */ mul.d $f0, $f0, $f2 /* C2B3C 8012C43C 00000000 */ nop /* C2B40 8012C440 46200020 */ cvt.s.d $f0, $f0 /* C2B44 8012C444 4600020D */ trunc.w.s $f8, $f0 /* C2B48 8012C448 44104000 */ mfc1 $s0, $f8 /* C2B4C 8012C44C 0804B117 */ j .L8012C45C /* C2B50 8012C450 00A0C82D */ daddu $t9, $a1, $zero .L8012C454: /* C2B54 8012C454 0000802D */ daddu $s0, $zero, $zero /* C2B58 8012C458 00C0C82D */ daddu $t9, $a2, $zero .L8012C45C: /* C2B5C 8012C45C 0067102A */ slt $v0, $v1, $a3 /* C2B60 8012C460 10400017 */ beqz $v0, .L8012C4C0 /* C2B64 8012C464 0000C02D */ daddu $t8, $zero, $zero /* C2B68 8012C468 8C8204FC */ lw $v0, 0x4FC($a0) /* C2B6C 8012C46C 30420400 */ andi $v0, $v0, 0x400 /* C2B70 8012C470 10400004 */ beqz $v0, .L8012C484 /* C2B74 8012C474 00671023 */ subu $v0, $v1, $a3 /* C2B78 8012C478 04610012 */ bgez $v1, .L8012C4C4 /* C2B7C 8012C47C 0060782D */ daddu $t7, $v1, $zero /* C2B80 8012C480 00671023 */ subu $v0, $v1, $a3 .L8012C484: /* C2B84 8012C484 04420001 */ bltzl $v0, .L8012C48C /* C2B88 8012C488 00021023 */ negu $v0, $v0 .L8012C48C: /* C2B8C 8012C48C 44822000 */ mtc1 $v0, $f4 /* C2B90 8012C490 00000000 */ nop /* C2B94 8012C494 46802120 */ cvt.s.w $f4, $f4 /* C2B98 8012C498 C542001C */ lwc1 $f2, 0x1C($t2) /* C2B9C 8012C49C 3C014200 */ lui $at, (0x42000000 >> 16) /* C2BA0 8012C4A0 44810000 */ mtc1 $at, $f0 /* C2BA4 8012C4A4 46022103 */ div.s $f4, $f4, $f2 /* C2BA8 8012C4A8 46002002 */ mul.s $f0, $f4, $f0 /* C2BAC 8012C4AC 00000000 */ nop /* C2BB0 8012C4B0 4600020D */ trunc.w.s $f8, $f0 /* C2BB4 8012C4B4 44184000 */ mfc1 $t8, $f8 /* C2BB8 8012C4B8 0804B131 */ j .L8012C4C4 /* C2BBC 8012C4BC 00E0782D */ daddu $t7, $a3, $zero .L8012C4C0: /* C2BC0 8012C4C0 0060782D */ daddu $t7, $v1, $zero .L8012C4C4: /* C2BC4 8012C4C4 01AB102A */ slt $v0, $t5, $t3 /* C2BC8 8012C4C8 50400001 */ beql $v0, $zero, .L8012C4D0 /* C2BCC 8012C4CC 0160682D */ daddu $t5, $t3, $zero .L8012C4D0: /* C2BD0 8012C4D0 01C0582D */ daddu $t3, $t6, $zero /* C2BD4 8012C4D4 0168102A */ slt $v0, $t3, $t0 /* C2BD8 8012C4D8 50400001 */ beql $v0, $zero, .L8012C4E0 /* C2BDC 8012C4DC 0100582D */ daddu $t3, $t0, $zero .L8012C4E0: /* C2BE0 8012C4E0 C5440018 */ lwc1 $f4, 0x18($t2) /* C2BE4 8012C4E4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* C2BE8 8012C4E8 44811000 */ mtc1 $at, $f2 /* C2BEC 8012C4EC 3C014480 */ lui $at, (0x44800000 >> 16) /* C2BF0 8012C4F0 44813000 */ mtc1 $at, $f6 /* C2BF4 8012C4F4 46041103 */ div.s $f4, $f2, $f4 /* C2BF8 8012C4F8 46062102 */ mul.s $f4, $f4, $f6 /* C2BFC 8012C4FC 00000000 */ nop /* C2C00 8012C500 C540001C */ lwc1 $f0, 0x1C($t2) /* C2C04 8012C504 46001083 */ div.s $f2, $f2, $f0 /* C2C08 8012C508 46061082 */ mul.s $f2, $f2, $f6 /* C2C0C 8012C50C 00000000 */ nop /* C2C10 8012C510 95440034 */ lhu $a0, 0x34($t2) /* C2C14 8012C514 30820011 */ andi $v0, $a0, 0x11 /* C2C18 8012C518 4600220D */ trunc.w.s $f8, $f4 /* C2C1C 8012C51C 440E4000 */ mfc1 $t6, $f8 /* C2C20 8012C520 4600120D */ trunc.w.s $f8, $f2 /* C2C24 8012C524 44134000 */ mfc1 $s3, $f8 /* C2C28 8012C528 1040002C */ beqz $v0, .L8012C5DC /* C2C2C 8012C52C 3082FFEE */ andi $v0, $a0, 0xFFEE /* C2C30 8012C530 3C07F500 */ lui $a3, (0xF5000100 >> 16) /* C2C34 8012C534 34E70100 */ ori $a3, $a3, (0xF5000100 & 0xFFFF) /* C2C38 8012C538 3C080703 */ lui $t0, (0x703C000 >> 16) /* C2C3C 8012C53C 3508C000 */ ori $t0, $t0, (0x703C000 & 0xFFFF) /* C2C40 8012C540 3C05800A */ lui $a1, %hi(gMainGfxPos) /* C2C44 8012C544 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* C2C48 8012C548 8CA30000 */ lw $v1, 0x0($a1) /* C2C4C 8012C54C A5420034 */ sh $v0, 0x34($t2) /* C2C50 8012C550 3C02FD10 */ lui $v0, (0xFD100000 >> 16) /* C2C54 8012C554 3C04802F */ lui $a0, %hi(D_802F4560) /* C2C58 8012C558 24844560 */ addiu $a0, $a0, %lo(D_802F4560) /* C2C5C 8012C55C 0060302D */ daddu $a2, $v1, $zero /* C2C60 8012C560 24630008 */ addiu $v1, $v1, 0x8 /* C2C64 8012C564 ACA30000 */ sw $v1, 0x0($a1) /* C2C68 8012C568 ACC20000 */ sw $v0, 0x0($a2) /* C2C6C 8012C56C 00111100 */ sll $v0, $s1, 4 /* C2C70 8012C570 00441021 */ addu $v0, $v0, $a0 /* C2C74 8012C574 ACC20004 */ sw $v0, 0x4($a2) /* C2C78 8012C578 24620008 */ addiu $v0, $v1, 0x8 /* C2C7C 8012C57C ACA20000 */ sw $v0, 0x0($a1) /* C2C80 8012C580 3C02E800 */ lui $v0, (0xE8000000 >> 16) /* C2C84 8012C584 AC620000 */ sw $v0, 0x0($v1) /* C2C88 8012C588 24620010 */ addiu $v0, $v1, 0x10 /* C2C8C 8012C58C AC600004 */ sw $zero, 0x4($v1) /* C2C90 8012C590 ACA20000 */ sw $v0, 0x0($a1) /* C2C94 8012C594 3C020700 */ lui $v0, (0x7000000 >> 16) /* C2C98 8012C598 AC62000C */ sw $v0, 0xC($v1) /* C2C9C 8012C59C 24620018 */ addiu $v0, $v1, 0x18 /* C2CA0 8012C5A0 AC670008 */ sw $a3, 0x8($v1) /* C2CA4 8012C5A4 ACA20000 */ sw $v0, 0x0($a1) /* C2CA8 8012C5A8 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* C2CAC 8012C5AC AC620010 */ sw $v0, 0x10($v1) /* C2CB0 8012C5B0 24620020 */ addiu $v0, $v1, 0x20 /* C2CB4 8012C5B4 AC600014 */ sw $zero, 0x14($v1) /* C2CB8 8012C5B8 ACA20000 */ sw $v0, 0x0($a1) /* C2CBC 8012C5BC 3C02F000 */ lui $v0, (0xF0000000 >> 16) /* C2CC0 8012C5C0 AC620018 */ sw $v0, 0x18($v1) /* C2CC4 8012C5C4 24620028 */ addiu $v0, $v1, 0x28 /* C2CC8 8012C5C8 AC68001C */ sw $t0, 0x1C($v1) /* C2CCC 8012C5CC ACA20000 */ sw $v0, 0x0($a1) /* C2CD0 8012C5D0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* C2CD4 8012C5D4 AC620020 */ sw $v0, 0x20($v1) /* C2CD8 8012C5D8 AC600024 */ sw $zero, 0x24($v1) .L8012C5DC: /* C2CDC 8012C5DC 91220000 */ lbu $v0, 0x0($t1) /* C2CE0 8012C5E0 2C420010 */ sltiu $v0, $v0, 0x10 /* C2CE4 8012C5E4 1440006B */ bnez $v0, .L8012C794 /* C2CE8 8012C5E8 00000000 */ nop /* C2CEC 8012C5EC 91220000 */ lbu $v0, 0x0($t1) /* C2CF0 8012C5F0 3042000F */ andi $v0, $v0, 0xF /* C2CF4 8012C5F4 14400067 */ bnez $v0, .L8012C794 /* C2CF8 8012C5F8 3C02FD50 */ lui $v0, (0xFD500000 >> 16) /* C2CFC 8012C5FC 3C06800A */ lui $a2, %hi(gMainGfxPos) /* C2D00 8012C600 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* C2D04 8012C604 8CC40000 */ lw $a0, 0x0($a2) /* C2D08 8012C608 0080382D */ daddu $a3, $a0, $zero /* C2D0C 8012C60C 24840008 */ addiu $a0, $a0, 0x8 /* C2D10 8012C610 ACC40000 */ sw $a0, 0x0($a2) /* C2D14 8012C614 ACE20000 */ sw $v0, 0x0($a3) /* C2D18 8012C618 24820008 */ addiu $v0, $a0, 0x8 /* C2D1C 8012C61C ACC20000 */ sw $v0, 0x0($a2) /* C2D20 8012C620 24820010 */ addiu $v0, $a0, 0x10 /* C2D24 8012C624 ACC20000 */ sw $v0, 0x0($a2) /* C2D28 8012C628 000C1040 */ sll $v0, $t4, 1 /* C2D2C 8012C62C 004C1021 */ addu $v0, $v0, $t4 /* C2D30 8012C630 00021080 */ sll $v0, $v0, 2 /* C2D34 8012C634 8D250008 */ lw $a1, 0x8($t1) /* C2D38 8012C638 95230004 */ lhu $v1, 0x4($t1) /* C2D3C 8012C63C 00451021 */ addu $v0, $v0, $a1 /* C2D40 8012C640 00720018 */ mult $v1, $s2 /* C2D44 8012C644 24830018 */ addiu $v1, $a0, 0x18 /* C2D48 8012C648 8C420000 */ lw $v0, 0x0($v0) /* C2D4C 8012C64C 3C050700 */ lui $a1, (0x7000000 >> 16) /* C2D50 8012C650 ACC30000 */ sw $v1, 0x0($a2) /* C2D54 8012C654 0000A012 */ mflo $s4 /* C2D58 8012C658 00541021 */ addu $v0, $v0, $s4 /* C2D5C 8012C65C ACE20004 */ sw $v0, 0x4($a3) /* C2D60 8012C660 3C02F550 */ lui $v0, (0xF5500000 >> 16) /* C2D64 8012C664 AC820000 */ sw $v0, 0x0($a0) /* C2D68 8012C668 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* C2D6C 8012C66C AC820008 */ sw $v0, 0x8($a0) /* C2D70 8012C670 3C02F300 */ lui $v0, (0xF3000000 >> 16) /* C2D74 8012C674 AC850004 */ sw $a1, 0x4($a0) /* C2D78 8012C678 AC80000C */ sw $zero, 0xC($a0) /* C2D7C 8012C67C AC820010 */ sw $v0, 0x10($a0) /* C2D80 8012C680 91230000 */ lbu $v1, 0x0($t1) /* C2D84 8012C684 24860014 */ addiu $a2, $a0, 0x14 /* C2D88 8012C688 00032102 */ srl $a0, $v1, 4 /* C2D8C 8012C68C 10800002 */ beqz $a0, .L8012C698 /* C2D90 8012C690 24080800 */ addiu $t0, $zero, 0x800 /* C2D94 8012C694 248807FF */ addiu $t0, $a0, 0x7FF .L8012C698: /* C2D98 8012C698 91220001 */ lbu $v0, 0x1($t1) /* C2D9C 8012C69C 00620018 */ mult $v1, $v0 /* C2DA0 8012C6A0 0000A012 */ mflo $s4 /* C2DA4 8012C6A4 26820003 */ addiu $v0, $s4, 0x3 /* C2DA8 8012C6A8 00021083 */ sra $v0, $v0, 2 /* C2DAC 8012C6AC 2443FFFF */ addiu $v1, $v0, -0x1 /* C2DB0 8012C6B0 28620800 */ slti $v0, $v1, 0x800 /* C2DB4 8012C6B4 50400001 */ beql $v0, $zero, .L8012C6BC /* C2DB8 8012C6B8 240307FF */ addiu $v1, $zero, 0x7FF .L8012C6BC: /* C2DBC 8012C6BC 30620FFF */ andi $v0, $v1, 0xFFF /* C2DC0 8012C6C0 00021300 */ sll $v0, $v0, 12 /* C2DC4 8012C6C4 1080000D */ beqz $a0, .L8012C6FC /* C2DC8 8012C6C8 00452825 */ or $a1, $v0, $a1 /* C2DCC 8012C6CC 14800002 */ bnez $a0, .L8012C6D8 /* C2DD0 8012C6D0 0104001A */ div $zero, $t0, $a0 /* C2DD4 8012C6D4 0007000D */ break 7 .L8012C6D8: /* C2DD8 8012C6D8 2401FFFF */ addiu $at, $zero, -0x1 /* C2DDC 8012C6DC 14810004 */ bne $a0, $at, .L8012C6F0 /* C2DE0 8012C6E0 3C018000 */ lui $at, (0x80000000 >> 16) /* C2DE4 8012C6E4 15010002 */ bne $t0, $at, .L8012C6F0 /* C2DE8 8012C6E8 00000000 */ nop /* C2DEC 8012C6EC 0006000D */ break 6 .L8012C6F0: /* C2DF0 8012C6F0 00001012 */ mflo $v0 /* C2DF4 8012C6F4 0804B1C0 */ j .L8012C700 /* C2DF8 8012C6F8 00A21025 */ or $v0, $a1, $v0 .L8012C6FC: /* C2DFC 8012C6FC 00A81025 */ or $v0, $a1, $t0 .L8012C700: /* C2E00 8012C700 3C05800A */ lui $a1, %hi(gMainGfxPos) /* C2E04 8012C704 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* C2E08 8012C708 8CA40000 */ lw $a0, 0x0($a1) /* C2E0C 8012C70C ACC20000 */ sw $v0, 0x0($a2) /* C2E10 8012C710 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* C2E14 8012C714 0080182D */ daddu $v1, $a0, $zero /* C2E18 8012C718 24840008 */ addiu $a0, $a0, 0x8 /* C2E1C 8012C71C ACA40000 */ sw $a0, 0x0($a1) /* C2E20 8012C720 AC620000 */ sw $v0, 0x0($v1) /* C2E24 8012C724 24820008 */ addiu $v0, $a0, 0x8 /* C2E28 8012C728 AC600004 */ sw $zero, 0x4($v1) /* C2E2C 8012C72C ACA20000 */ sw $v0, 0x0($a1) /* C2E30 8012C730 91220000 */ lbu $v0, 0x0($t1) /* C2E34 8012C734 24830010 */ addiu $v1, $a0, 0x10 /* C2E38 8012C738 AC800004 */ sw $zero, 0x4($a0) /* C2E3C 8012C73C ACA30000 */ sw $v1, 0x0($a1) /* C2E40 8012C740 3C03F200 */ lui $v1, (0xF2000000 >> 16) /* C2E44 8012C744 AC830008 */ sw $v1, 0x8($a0) /* C2E48 8012C748 3C03F540 */ lui $v1, (0xF5400000 >> 16) /* C2E4C 8012C74C 00021042 */ srl $v0, $v0, 1 /* C2E50 8012C750 24420007 */ addiu $v0, $v0, 0x7 /* C2E54 8012C754 000210C2 */ srl $v0, $v0, 3 /* C2E58 8012C758 00021240 */ sll $v0, $v0, 9 /* C2E5C 8012C75C 00431025 */ or $v0, $v0, $v1 /* C2E60 8012C760 AC820000 */ sw $v0, 0x0($a0) /* C2E64 8012C764 91230000 */ lbu $v1, 0x0($t1) /* C2E68 8012C768 91220001 */ lbu $v0, 0x1($t1) /* C2E6C 8012C76C 2463FFFF */ addiu $v1, $v1, -0x1 /* C2E70 8012C770 00031880 */ sll $v1, $v1, 2 /* C2E74 8012C774 30630FFF */ andi $v1, $v1, 0xFFF /* C2E78 8012C778 00031B00 */ sll $v1, $v1, 12 /* C2E7C 8012C77C 2442FFFF */ addiu $v0, $v0, -0x1 /* C2E80 8012C780 00021080 */ sll $v0, $v0, 2 /* C2E84 8012C784 30420FFF */ andi $v0, $v0, 0xFFF /* C2E88 8012C788 00621825 */ or $v1, $v1, $v0 /* C2E8C 8012C78C 0804B23D */ j .L8012C8F4 /* C2E90 8012C790 AC83000C */ sw $v1, 0xC($a0) .L8012C794: /* C2E94 8012C794 3C06800A */ lui $a2, %hi(gMainGfxPos) /* C2E98 8012C798 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* C2E9C 8012C79C 8CC50000 */ lw $a1, 0x0($a2) /* C2EA0 8012C7A0 00A0382D */ daddu $a3, $a1, $zero /* C2EA4 8012C7A4 24A50008 */ addiu $a1, $a1, 0x8 /* C2EA8 8012C7A8 ACC50000 */ sw $a1, 0x0($a2) /* C2EAC 8012C7AC 91220000 */ lbu $v0, 0x0($t1) /* C2EB0 8012C7B0 3C03FD48 */ lui $v1, (0xFD480000 >> 16) /* C2EB4 8012C7B4 00021042 */ srl $v0, $v0, 1 /* C2EB8 8012C7B8 2442FFFF */ addiu $v0, $v0, -0x1 /* C2EBC 8012C7BC 30420FFF */ andi $v0, $v0, 0xFFF /* C2EC0 8012C7C0 00431025 */ or $v0, $v0, $v1 /* C2EC4 8012C7C4 ACE20000 */ sw $v0, 0x0($a3) /* C2EC8 8012C7C8 000C1040 */ sll $v0, $t4, 1 /* C2ECC 8012C7CC 004C1021 */ addu $v0, $v0, $t4 /* C2ED0 8012C7D0 00021080 */ sll $v0, $v0, 2 /* C2ED4 8012C7D4 8D240008 */ lw $a0, 0x8($t1) /* C2ED8 8012C7D8 95230004 */ lhu $v1, 0x4($t1) /* C2EDC 8012C7DC 00441021 */ addu $v0, $v0, $a0 /* C2EE0 8012C7E0 00720018 */ mult $v1, $s2 /* C2EE4 8012C7E4 8C420000 */ lw $v0, 0x0($v0) /* C2EE8 8012C7E8 24A30008 */ addiu $v1, $a1, 0x8 /* C2EEC 8012C7EC ACC30000 */ sw $v1, 0x0($a2) /* C2EF0 8012C7F0 24A30010 */ addiu $v1, $a1, 0x10 /* C2EF4 8012C7F4 0000A012 */ mflo $s4 /* C2EF8 8012C7F8 00541021 */ addu $v0, $v0, $s4 /* C2EFC 8012C7FC ACE20004 */ sw $v0, 0x4($a3) /* C2F00 8012C800 91220000 */ lbu $v0, 0x0($t1) /* C2F04 8012C804 3C070700 */ lui $a3, (0x7000000 >> 16) /* C2F08 8012C808 ACA70004 */ sw $a3, 0x4($a1) /* C2F0C 8012C80C ACC30000 */ sw $v1, 0x0($a2) /* C2F10 8012C810 3C03E600 */ lui $v1, (0xE6000000 >> 16) /* C2F14 8012C814 ACA30008 */ sw $v1, 0x8($a1) /* C2F18 8012C818 24A30018 */ addiu $v1, $a1, 0x18 /* C2F1C 8012C81C ACA0000C */ sw $zero, 0xC($a1) /* C2F20 8012C820 ACC30000 */ sw $v1, 0x0($a2) /* C2F24 8012C824 3C03F400 */ lui $v1, (0xF4000000 >> 16) /* C2F28 8012C828 ACA30010 */ sw $v1, 0x10($a1) /* C2F2C 8012C82C 3C03F548 */ lui $v1, (0xF5480000 >> 16) /* C2F30 8012C830 00021042 */ srl $v0, $v0, 1 /* C2F34 8012C834 24420007 */ addiu $v0, $v0, 0x7 /* C2F38 8012C838 000210C2 */ srl $v0, $v0, 3 /* C2F3C 8012C83C 00021240 */ sll $v0, $v0, 9 /* C2F40 8012C840 00431025 */ or $v0, $v0, $v1 /* C2F44 8012C844 ACA20000 */ sw $v0, 0x0($a1) /* C2F48 8012C848 91220000 */ lbu $v0, 0x0($t1) /* C2F4C 8012C84C 91240001 */ lbu $a0, 0x1($t1) /* C2F50 8012C850 24A30020 */ addiu $v1, $a1, 0x20 /* C2F54 8012C854 ACC30000 */ sw $v1, 0x0($a2) /* C2F58 8012C858 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* C2F5C 8012C85C ACA30018 */ sw $v1, 0x18($a1) /* C2F60 8012C860 24A30028 */ addiu $v1, $a1, 0x28 /* C2F64 8012C864 ACA0001C */ sw $zero, 0x1C($a1) /* C2F68 8012C868 ACC30000 */ sw $v1, 0x0($a2) /* C2F6C 8012C86C 2442FFFF */ addiu $v0, $v0, -0x1 /* C2F70 8012C870 00021040 */ sll $v0, $v0, 1 /* C2F74 8012C874 30420FFF */ andi $v0, $v0, 0xFFF /* C2F78 8012C878 00021300 */ sll $v0, $v0, 12 /* C2F7C 8012C87C 2484FFFF */ addiu $a0, $a0, -0x1 /* C2F80 8012C880 00042080 */ sll $a0, $a0, 2 /* C2F84 8012C884 30840FFF */ andi $a0, $a0, 0xFFF /* C2F88 8012C888 00872025 */ or $a0, $a0, $a3 /* C2F8C 8012C88C 00441025 */ or $v0, $v0, $a0 /* C2F90 8012C890 ACA20014 */ sw $v0, 0x14($a1) /* C2F94 8012C894 91220000 */ lbu $v0, 0x0($t1) /* C2F98 8012C898 24A30030 */ addiu $v1, $a1, 0x30 /* C2F9C 8012C89C ACA00024 */ sw $zero, 0x24($a1) /* C2FA0 8012C8A0 ACC30000 */ sw $v1, 0x0($a2) /* C2FA4 8012C8A4 3C03F200 */ lui $v1, (0xF2000000 >> 16) /* C2FA8 8012C8A8 ACA30028 */ sw $v1, 0x28($a1) /* C2FAC 8012C8AC 3C03F540 */ lui $v1, (0xF5400000 >> 16) /* C2FB0 8012C8B0 00021042 */ srl $v0, $v0, 1 /* C2FB4 8012C8B4 24420007 */ addiu $v0, $v0, 0x7 /* C2FB8 8012C8B8 000210C2 */ srl $v0, $v0, 3 /* C2FBC 8012C8BC 00021240 */ sll $v0, $v0, 9 /* C2FC0 8012C8C0 00431025 */ or $v0, $v0, $v1 /* C2FC4 8012C8C4 ACA20020 */ sw $v0, 0x20($a1) /* C2FC8 8012C8C8 91230000 */ lbu $v1, 0x0($t1) /* C2FCC 8012C8CC 91220001 */ lbu $v0, 0x1($t1) /* C2FD0 8012C8D0 2463FFFF */ addiu $v1, $v1, -0x1 /* C2FD4 8012C8D4 00031880 */ sll $v1, $v1, 2 /* C2FD8 8012C8D8 30630FFF */ andi $v1, $v1, 0xFFF /* C2FDC 8012C8DC 00031B00 */ sll $v1, $v1, 12 /* C2FE0 8012C8E0 2442FFFF */ addiu $v0, $v0, -0x1 /* C2FE4 8012C8E4 00021080 */ sll $v0, $v0, 2 /* C2FE8 8012C8E8 30420FFF */ andi $v0, $v0, 0xFFF /* C2FEC 8012C8EC 00621825 */ or $v1, $v1, $v0 /* C2FF0 8012C8F0 ACA3002C */ sw $v1, 0x2C($a1) .L8012C8F4: /* C2FF4 8012C8F4 3C06800A */ lui $a2, %hi(gMainGfxPos) /* C2FF8 8012C8F8 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* C2FFC 8012C8FC 000D1080 */ sll $v0, $t5, 2 /* C3000 8012C900 30420FFF */ andi $v0, $v0, 0xFFF /* C3004 8012C904 00021300 */ sll $v0, $v0, 12 /* C3008 8012C908 000B1880 */ sll $v1, $t3, 2 /* C300C 8012C90C 30630FFF */ andi $v1, $v1, 0xFFF /* C3010 8012C910 3C04E400 */ lui $a0, (0xE4000000 >> 16) /* C3014 8012C914 00641825 */ or $v1, $v1, $a0 /* C3018 8012C918 00431025 */ or $v0, $v0, $v1 /* C301C 8012C91C 000F1880 */ sll $v1, $t7, 2 /* C3020 8012C920 8CC50000 */ lw $a1, 0x0($a2) /* C3024 8012C924 30630FFF */ andi $v1, $v1, 0xFFF /* C3028 8012C928 00A0382D */ daddu $a3, $a1, $zero /* C302C 8012C92C 24A50008 */ addiu $a1, $a1, 0x8 /* C3030 8012C930 ACC50000 */ sw $a1, 0x0($a2) /* C3034 8012C934 ACE20000 */ sw $v0, 0x0($a3) /* C3038 8012C938 00191080 */ sll $v0, $t9, 2 /* C303C 8012C93C 30420FFF */ andi $v0, $v0, 0xFFF /* C3040 8012C940 00021300 */ sll $v0, $v0, 12 /* C3044 8012C944 00431025 */ or $v0, $v0, $v1 /* C3048 8012C948 ACE20004 */ sw $v0, 0x4($a3) /* C304C 8012C94C 24A20008 */ addiu $v0, $a1, 0x8 /* C3050 8012C950 ACC20000 */ sw $v0, 0x0($a2) /* C3054 8012C954 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* C3058 8012C958 ACA20000 */ sw $v0, 0x0($a1) /* C305C 8012C95C 00101400 */ sll $v0, $s0, 16 /* C3060 8012C960 3303FFFF */ andi $v1, $t8, 0xFFFF /* C3064 8012C964 00431025 */ or $v0, $v0, $v1 /* C3068 8012C968 ACA20004 */ sw $v0, 0x4($a1) /* C306C 8012C96C 24A20010 */ addiu $v0, $a1, 0x10 /* C3070 8012C970 ACC20000 */ sw $v0, 0x0($a2) /* C3074 8012C974 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* C3078 8012C978 ACA20008 */ sw $v0, 0x8($a1) /* C307C 8012C97C 000E1400 */ sll $v0, $t6, 16 /* C3080 8012C980 3263FFFF */ andi $v1, $s3, 0xFFFF /* C3084 8012C984 00431025 */ or $v0, $v0, $v1 /* C3088 8012C988 ACA2000C */ sw $v0, 0xC($a1) .L8012C98C: /* C308C 8012C98C 8FB40010 */ lw $s4, 0x10($sp) /* C3090 8012C990 8FB3000C */ lw $s3, 0xC($sp) /* C3094 8012C994 8FB20008 */ lw $s2, 0x8($sp) /* C3098 8012C998 8FB10004 */ lw $s1, 0x4($sp) /* C309C 8012C99C 8FB00000 */ lw $s0, 0x0($sp) /* C30A0 8012C9A0 03E00008 */ jr $ra /* C30A4 8012C9A4 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32 charIndex, s32 palette, s32 posX, s32 posY) { MessageCharset* messageCharset = gMsgCharsets[drawState->font]; s32 fontVariant = drawState->fontVariant; s32 clipUly = drawState->clipY[0]; s32 clipLry = drawState->clipY[1]; s32 clipUlx = drawState->clipX[0]; s32 clipLrx = drawState->clipX[1]; s32 rightPosX = posX + (s32)(drawState->charScale.x * messageCharset->texSize.x); s32 rightPosY = posY + (s32)(drawState->charScale.y * messageCharset->texSize.y); f32 clipOffset; s32 texOffsetX; s32 texOffsetY; s32 ulx, uly, lrx, lry; s32 dsdx, dtdy; if (posX >= clipLrx || posY >= clipLry || rightPosX <= clipUlx || rightPosY <= clipUly) { return; } if (posX < clipUlx) { clipOffset = abs(posX - clipUlx) / drawState->charScale.x; texOffsetX = (f32)((clipOffset + 0.5) * 32.0); ulx = clipUlx; } else { texOffsetX = 0; ulx = posX; } if (posY < clipUly) { if (!(printer->stateFlags & MSG_STATE_FLAG_400) || posY < 0) { clipOffset = abs(posY - clipUly) / drawState->charScale.y; texOffsetY = clipOffset * 32.0f; uly = clipUly; } else { texOffsetY = 0; uly = posY; } } else { texOffsetY = 0; uly = posY; } lrx = rightPosX; if (lrx >= clipLrx) { lrx = clipLrx; } lry = rightPosY; if (lry >= clipLry) { lry = clipLry; } dsdx = 1.0f / drawState->charScale.x * 1024.0f; dtdy = 1.0f / drawState->charScale.y * 1024.0f; if (drawState->printModeFlags & (MSG_PRINT_FLAG_10 | MSG_PRINT_FLAG_1)) { drawState->printModeFlags &= ~(MSG_PRINT_FLAG_10 | MSG_PRINT_FLAG_1); gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[palette]); } if (messageCharset->texSize.x >= 16 && messageCharset->texSize.x % 16 == 0) { gDPLoadTextureBlock_4b(gMainGfxPos++, messageCharset->rasters[fontVariant].raster + messageCharset->charRasterSize * charIndex, G_IM_FMT_CI, messageCharset->texSize.x, messageCharset->texSize.y, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } else { gDPLoadTextureTile_4b(gMainGfxPos++, messageCharset->rasters[fontVariant].raster + messageCharset->charRasterSize * charIndex, G_IM_FMT_CI, messageCharset->texSize.x, messageCharset->texSize.y, 0, 0, messageCharset->texSize.x - 1, messageCharset->texSize.y - 1, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } gSPTextureRectangle(gMainGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, G_TX_RENDERTILE, texOffsetX, texOffsetY, dsdx, dtdy); }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_intro /* 11C54 80036854 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 11C58 80036858 AFB10014 */ sw $s1, 0x14($sp) /* 11C5C 8003685C 3C118011 */ lui $s1, %hi(gPlayerData) /* 11C60 80036860 2631F290 */ addiu $s1, $s1, %lo(gPlayerData) /* 11C64 80036864 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 11C68 80036868 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 11C6C 8003686C 2404FFFF */ addiu $a0, $zero, -0x1 /* 11C70 80036870 AFBF0018 */ sw $ra, 0x18($sp) /* 11C74 80036874 AFB00010 */ sw $s0, 0x10($sp) /* 11C78 80036878 F7B40020 */ sdc1 $f20, 0x20($sp) /* 11C7C 8003687C 804300A8 */ lb $v1, 0xA8($v0) /* 11C80 80036880 1064002F */ beq $v1, $a0, .L80036940 /* 11C84 80036884 8C450010 */ lw $a1, 0x10($v0) /* 11C88 80036888 3C03800A */ lui $v1, %hi(D_800A0964) /* 11C8C 8003688C 24630964 */ addiu $v1, $v1, %lo(D_800A0964) /* 11C90 80036890 8C620000 */ lw $v0, 0x0($v1) /* 11C94 80036894 14400004 */ bnez $v0, .L800368A8 /* 11C98 80036898 30A2F000 */ andi $v0, $a1, 0xF000 /* 11C9C 8003689C 10400002 */ beqz $v0, .L800368A8 /* 11CA0 800368A0 24020001 */ addiu $v0, $zero, 0x1 /* 11CA4 800368A4 AC620000 */ sw $v0, 0x0($v1) .L800368A8: /* 11CA8 800368A8 3C03800A */ lui $v1, %hi(D_800A0964) /* 11CAC 800368AC 8C630964 */ lw $v1, %lo(D_800A0964)($v1) /* 11CB0 800368B0 24020001 */ addiu $v0, $zero, 0x1 /* 11CB4 800368B4 14620010 */ bne $v1, $v0, .L800368F8 /* 11CB8 800368B8 24020002 */ addiu $v0, $zero, 0x2 /* 11CBC 800368BC 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 11CC0 800368C0 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* 11CC4 800368C4 908300AC */ lbu $v1, 0xAC($a0) /* 11CC8 800368C8 2C620002 */ sltiu $v0, $v1, 0x2 /* 11CCC 800368CC 14400018 */ bnez $v0, .L80036930 /* 11CD0 800368D0 24020064 */ addiu $v0, $zero, 0x64 /* 11CD4 800368D4 00031600 */ sll $v0, $v1, 24 /* 11CD8 800368D8 00021603 */ sra $v0, $v0, 24 /* 11CDC 800368DC 24030004 */ addiu $v1, $zero, 0x4 /* 11CE0 800368E0 14430003 */ bne $v0, $v1, .L800368F0 /* 11CE4 800368E4 24020002 */ addiu $v0, $zero, 0x2 /* 11CE8 800368E8 0800DA4C */ j .L80036930 /* 11CEC 800368EC 24020064 */ addiu $v0, $zero, 0x64 .L800368F0: /* 11CF0 800368F0 3C03800A */ lui $v1, %hi(D_800A0964) /* 11CF4 800368F4 8C630964 */ lw $v1, %lo(D_800A0964)($v1) .L800368F8: /* 11CF8 800368F8 14620011 */ bne $v1, $v0, .L80036940 /* 11CFC 800368FC 00000000 */ nop /* 11D00 80036900 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 11D04 80036904 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* 11D08 80036908 908300AC */ lbu $v1, 0xAC($a0) /* 11D0C 8003690C 2C620002 */ sltiu $v0, $v1, 0x2 /* 11D10 80036910 14400005 */ bnez $v0, .L80036928 /* 11D14 80036914 00031600 */ sll $v0, $v1, 24 /* 11D18 80036918 00021603 */ sra $v0, $v0, 24 /* 11D1C 8003691C 24030004 */ addiu $v1, $zero, 0x4 /* 11D20 80036920 14430007 */ bne $v0, $v1, .L80036940 /* 11D24 80036924 00000000 */ nop .L80036928: /* 11D28 80036928 908200A8 */ lbu $v0, 0xA8($a0) /* 11D2C 8003692C 24420001 */ addiu $v0, $v0, 0x1 .L80036930: /* 11D30 80036930 0C00D994 */ jal state_init_intro /* 11D34 80036934 A08200A8 */ sb $v0, 0xA8($a0) /* 11D38 80036938 0800DB72 */ j .L80036DC8 /* 11D3C 8003693C 00000000 */ nop .L80036940: /* 11D40 80036940 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 11D44 80036944 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 11D48 80036948 804300AC */ lb $v1, 0xAC($v0) /* 11D4C 8003694C 2C620016 */ sltiu $v0, $v1, 0x16 /* 11D50 80036950 10400109 */ beqz $v0, .L80036D78 /* 11D54 80036954 00031080 */ sll $v0, $v1, 2 /* 11D58 80036958 3C01800A */ lui $at, %hi(jtbl_80098338) /* 11D5C 8003695C 00220821 */ addu $at, $at, $v0 /* 11D60 80036960 8C228338 */ lw $v0, %lo(jtbl_80098338)($at) /* 11D64 80036964 00400008 */ jr $v0 /* 11D68 80036968 00000000 */ nop glabel .L8003696C /* 11D6C 8003696C 0C016754 */ jal update_effects /* 11D70 80036970 00000000 */ nop /* 11D74 80036974 0C00B500 */ jal update_cameras /* 11D78 80036978 00000000 */ nop /* 11D7C 8003697C 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 11D80 80036980 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 11D84 80036984 8E060000 */ lw $a2, 0x0($s0) /* 11D88 80036988 80C300A8 */ lb $v1, 0xA8($a2) /* 11D8C 8003698C 2402FFFF */ addiu $v0, $zero, -0x1 /* 11D90 80036990 14620010 */ bne $v1, $v0, .L800369D4 /* 11D94 80036994 00000000 */ nop /* 11D98 80036998 44806000 */ mtc1 $zero, $f12 /* 11D9C 8003699C 0C00AFC5 */ jal set_curtain_fade_goal /* 11DA0 800369A0 00000000 */ nop /* 11DA4 800369A4 3C04800A */ lui $a0, %hi(D_800A0956) /* 11DA8 800369A8 84840956 */ lh $a0, %lo(D_800A0956)($a0) /* 11DAC 800369AC 0C00CE0C */ jal intro_logos_fade_out /* 11DB0 800369B0 00000000 */ nop /* 11DB4 800369B4 104000F0 */ beqz $v0, .L80036D78 /* 11DB8 800369B8 24020001 */ addiu $v0, $zero, 0x1 /* 11DBC 800369BC 0000202D */ daddu $a0, $zero, $zero /* 11DC0 800369C0 8E030000 */ lw $v1, 0x0($s0) /* 11DC4 800369C4 0C00AFC1 */ jal set_curtain_draw_callback /* 11DC8 800369C8 A06200AC */ sb $v0, 0xAC($v1) /* 11DCC 800369CC 0800DB5E */ j .L80036D78 /* 11DD0 800369D0 00000000 */ nop .L800369D4: /* 11DD4 800369D4 3C05800A */ lui $a1, %hi(D_800A0954) /* 11DD8 800369D8 24A50954 */ addiu $a1, $a1, %lo(D_800A0954) /* 11DDC 800369DC 94A20000 */ lhu $v0, 0x0($a1) /* 11DE0 800369E0 3C03800A */ lui $v1, %hi(D_800A0956) /* 11DE4 800369E4 94630956 */ lhu $v1, %lo(D_800A0956)($v1) /* 11DE8 800369E8 00431021 */ addu $v0, $v0, $v1 /* 11DEC 800369EC A4A20000 */ sh $v0, 0x0($a1) /* 11DF0 800369F0 00021400 */ sll $v0, $v0, 16 /* 11DF4 800369F4 00021403 */ sra $v0, $v0, 16 /* 11DF8 800369F8 284200FF */ slti $v0, $v0, 0xFF /* 11DFC 800369FC 144000DE */ bnez $v0, .L80036D78 /* 11E00 80036A00 240200FF */ addiu $v0, $zero, 0xFF /* 11E04 80036A04 0000202D */ daddu $a0, $zero, $zero /* 11E08 80036A08 A4A20000 */ sh $v0, 0x0($a1) /* 11E0C 80036A0C 24020001 */ addiu $v0, $zero, 0x1 /* 11E10 80036A10 0C00AFC1 */ jal set_curtain_draw_callback /* 11E14 80036A14 A0C200AC */ sb $v0, 0xAC($a2) /* 11E18 80036A18 0800DB5E */ j .L80036D78 /* 11E1C 80036A1C 00000000 */ nop glabel .L80036A20 /* 11E20 80036A20 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 11E24 80036A24 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 11E28 80036A28 8C820000 */ lw $v0, 0x0($a0) /* 11E2C 80036A2C 24030004 */ addiu $v1, $zero, 0x4 /* 11E30 80036A30 3C01800A */ lui $at, %hi(D_800A0950) /* 11E34 80036A34 AC230950 */ sw $v1, %lo(D_800A0950)($at) /* 11E38 80036A38 34420008 */ ori $v0, $v0, 0x8 /* 11E3C 80036A3C AC820000 */ sw $v0, 0x0($a0) /* 11E40 80036A40 3C03800A */ lui $v1, %hi(D_800A0960) /* 11E44 80036A44 8C630960 */ lw $v1, %lo(D_800A0960)($v1) /* 11E48 80036A48 2402000E */ addiu $v0, $zero, 0xE /* 11E4C 80036A4C 106200CA */ beq $v1, $v0, .L80036D78 /* 11E50 80036A50 00000000 */ nop /* 11E54 80036A54 0800DAA3 */ j .L80036A8C /* 11E58 80036A58 00000000 */ nop glabel .L80036A5C /* 11E5C 80036A5C 3C03800A */ lui $v1, %hi(D_800A0950) /* 11E60 80036A60 24630950 */ addiu $v1, $v1, %lo(D_800A0950) /* 11E64 80036A64 8C620000 */ lw $v0, 0x0($v1) /* 11E68 80036A68 2442FFFF */ addiu $v0, $v0, -0x1 /* 11E6C 80036A6C 1C4000C2 */ bgtz $v0, .L80036D78 /* 11E70 80036A70 AC620000 */ sw $v0, 0x0($v1) /* 11E74 80036A74 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 11E78 80036A78 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 11E7C 80036A7C 8C820000 */ lw $v0, 0x0($a0) /* 11E80 80036A80 2403FFF7 */ addiu $v1, $zero, -0x9 /* 11E84 80036A84 00431024 */ and $v0, $v0, $v1 /* 11E88 80036A88 AC820000 */ sw $v0, 0x0($a0) .L80036A8C: /* 11E8C 80036A8C 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 11E90 80036A90 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 11E94 80036A94 24020002 */ addiu $v0, $zero, 0x2 /* 11E98 80036A98 0800DB5E */ j .L80036D78 /* 11E9C 80036A9C A06200AC */ sb $v0, 0xAC($v1) glabel .L80036AA0 /* 11EA0 80036AA0 0C00AFC1 */ jal set_curtain_draw_callback /* 11EA4 80036AA4 0000202D */ daddu $a0, $zero, $zero /* 11EA8 80036AA8 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 11EAC 80036AAC 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) /* 11EB0 80036AB0 8C620000 */ lw $v0, 0x0($v1) /* 11EB4 80036AB4 A0400070 */ sb $zero, 0x70($v0) /* 11EB8 80036AB8 8C620000 */ lw $v0, 0x0($v1) /* 11EBC 80036ABC A0400076 */ sb $zero, 0x76($v0) /* 11EC0 80036AC0 8C620000 */ lw $v0, 0x0($v1) /* 11EC4 80036AC4 A0400078 */ sb $zero, 0x78($v0) /* 11EC8 80036AC8 8C620000 */ lw $v0, 0x0($v1) /* 11ECC 80036ACC A040007D */ sb $zero, 0x7D($v0) /* 11ED0 80036AD0 8C620000 */ lw $v0, 0x0($v1) /* 11ED4 80036AD4 804200A8 */ lb $v0, 0xA8($v0) /* 11ED8 80036AD8 2405FFFF */ addiu $a1, $zero, -0x1 /* 11EDC 80036ADC 14450037 */ bne $v0, $a1, .L80036BBC /* 11EE0 80036AE0 2404000B */ addiu $a0, $zero, 0xB /* 11EE4 80036AE4 0C00AB00 */ jal general_heap_create /* 11EE8 80036AE8 00000000 */ nop /* 11EEC 80036AEC 0C047624 */ jal clear_render_tasks /* 11EF0 80036AF0 00000000 */ nop /* 11EF4 80036AF4 0C048C2E */ jal clear_worker_list /* 11EF8 80036AF8 00000000 */ nop /* 11EFC 80036AFC 0C0B0C77 */ jal clear_script_list /* 11F00 80036B00 00000000 */ nop /* 11F04 80036B04 0C00B7BD */ jal create_cameras_a /* 11F08 80036B08 00000000 */ nop /* 11F0C 80036B0C 0C0B763E */ jal spr_init_sprites /* 11F10 80036B10 0000202D */ daddu $a0, $zero, $zero /* 11F14 80036B14 0C0482EC */ jal clear_entity_models /* 11F18 80036B18 00000000 */ nop /* 11F1C 80036B1C 0C047889 */ jal clear_animator_list /* 11F20 80036B20 00000000 */ nop /* 11F24 80036B24 0C045751 */ jal clear_model_data /* 11F28 80036B28 00000000 */ nop /* 11F2C 80036B2C 0C052010 */ jal clear_sprite_shading_data /* 11F30 80036B30 00000000 */ nop /* 11F34 80036B34 0C05177E */ jal reset_background_settings /* 11F38 80036B38 00000000 */ nop /* 11F3C 80036B3C 0C050440 */ jal hud_element_clear_cache /* 11F40 80036B40 00000000 */ nop /* 11F44 80036B44 0C0515A0 */ jal clear_trigger_data /* 11F48 80036B48 00000000 */ nop /* 11F4C 80036B4C 0C048D9D */ jal clear_printers /* 11F50 80036B50 00000000 */ nop /* 11F54 80036B54 0C04432E */ jal clear_entity_data /* 11F58 80036B58 0000202D */ daddu $a0, $zero, $zero /* 11F5C 80036B5C 0C04E042 */ jal clear_screen_overlays /* 11F60 80036B60 00000000 */ nop /* 11F64 80036B64 0C037F14 */ jal clear_player_status /* 11F68 80036B68 00000000 */ nop /* 11F6C 80036B6C 0C00E12F */ jal clear_npcs /* 11F70 80036B70 00000000 */ nop /* 11F74 80036B74 0C039CE8 */ jal clear_player_data /* 11F78 80036B78 00000000 */ nop /* 11F7C 80036B7C 0C01CACC */ jal reset_battle_status /* 11F80 80036B80 00000000 */ nop /* 11F84 80036B84 0C00F8CE */ jal init_encounter_status /* 11F88 80036B88 00000000 */ nop /* 11F8C 80036B8C 0C016727 */ jal clear_effect_data /* 11F90 80036B90 00000000 */ nop /* 11F94 80036B94 0C04C3FC */ jal clear_item_entity_data /* 11F98 80036B98 00000000 */ nop /* 11F9C 80036B9C 0C0514C8 */ jal clear_saved_variables /* 11FA0 80036BA0 00000000 */ nop /* 11FA4 80036BA4 0C016BE5 */ jal initialize_collision /* 11FA8 80036BA8 00000000 */ nop /* 11FAC 80036BAC 0C00CD3C */ jal set_game_mode /* 11FB0 80036BB0 24040002 */ addiu $a0, $zero, 0x2 /* 11FB4 80036BB4 0800DB72 */ j .L80036DC8 /* 11FB8 80036BB8 00000000 */ nop .L80036BBC: /* 11FBC 80036BBC 26230058 */ addiu $v1, $s1, 0x58 /* 11FC0 80036BC0 2402000A */ addiu $v0, $zero, 0xA /* 11FC4 80036BC4 A2220002 */ sb $v0, 0x2($s1) /* 11FC8 80036BC8 A2220003 */ sb $v0, 0x3($s1) /* 11FCC 80036BCC A2220004 */ sb $v0, 0x4($s1) /* 11FD0 80036BD0 24020005 */ addiu $v0, $zero, 0x5 /* 11FD4 80036BD4 A2220005 */ sb $v0, 0x5($s1) /* 11FD8 80036BD8 A2220006 */ sb $v0, 0x6($s1) /* 11FDC 80036BDC A2220007 */ sb $v0, 0x7($s1) /* 11FE0 80036BE0 24020002 */ addiu $v0, $zero, 0x2 /* 11FE4 80036BE4 A2220008 */ sb $v0, 0x8($s1) /* 11FE8 80036BE8 A2200000 */ sb $zero, 0x0($s1) /* 11FEC 80036BEC A2250001 */ sb $a1, 0x1($s1) /* 11FF0 80036BF0 A220000E */ sb $zero, 0xE($s1) /* 11FF4 80036BF4 A2200009 */ sb $zero, 0x9($s1) .L80036BF8: /* 11FF8 80036BF8 A0600014 */ sb $zero, 0x14($v1) /* 11FFC 80036BFC 2484FFFF */ addiu $a0, $a0, -0x1 /* 12000 80036C00 0481FFFD */ bgez $a0, .L80036BF8 /* 12004 80036C04 2463FFF8 */ addiu $v1, $v1, -0x8 /* 12008 80036C08 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 1200C 80036C0C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 12010 80036C10 8E020000 */ lw $v0, 0x0($s0) /* 12014 80036C14 A2200012 */ sb $zero, 0x12($s1) /* 12018 80036C18 84440086 */ lh $a0, 0x86($v0) /* 1201C 80036C1C 8445008C */ lh $a1, 0x8C($v0) /* 12020 80036C20 0C0169BD */ jal load_map_by_IDs /* 12024 80036C24 0000302D */ daddu $a2, $zero, $zero /* 12028 80036C28 8E030000 */ lw $v1, 0x0($s0) /* 1202C 80036C2C 24020003 */ addiu $v0, $zero, 0x3 /* 12030 80036C30 0C03805E */ jal disable_player_input /* 12034 80036C34 A06200AC */ sb $v0, 0xAC($v1) /* 12038 80036C38 0800DB5E */ j .L80036D78 /* 1203C 80036C3C 00000000 */ nop glabel .L80036C40 /* 12040 80036C40 3C04800A */ lui $a0, %hi(D_800A0960) /* 12044 80036C44 24840960 */ addiu $a0, $a0, %lo(D_800A0960) /* 12048 80036C48 8C830000 */ lw $v1, 0x0($a0) /* 1204C 80036C4C 2402000E */ addiu $v0, $zero, 0xE /* 12050 80036C50 14620004 */ bne $v1, $v0, .L80036C64 /* 12054 80036C54 240200FF */ addiu $v0, $zero, 0xFF /* 12058 80036C58 2402000F */ addiu $v0, $zero, 0xF /* 1205C 80036C5C AC820000 */ sw $v0, 0x0($a0) /* 12060 80036C60 240200FF */ addiu $v0, $zero, 0xFF .L80036C64: /* 12064 80036C64 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 12068 80036C68 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 1206C 80036C6C 2405FFF7 */ addiu $a1, $zero, -0x9 /* 12070 80036C70 3C03800A */ lui $v1, %hi(D_800A0958) /* 12074 80036C74 94630958 */ lhu $v1, %lo(D_800A0958)($v1) /* 12078 80036C78 3C06800B */ lui $a2, %hi(gCameras) /* 1207C 80036C7C 24C61D80 */ addiu $a2, $a2, %lo(gCameras) /* 12080 80036C80 00431023 */ subu $v0, $v0, $v1 /* 12084 80036C84 3C01800A */ lui $at, %hi(D_800A0954) /* 12088 80036C88 A4220954 */ sh $v0, %lo(D_800A0954)($at) /* 1208C 80036C8C 8C830000 */ lw $v1, 0x0($a0) /* 12090 80036C90 94C20000 */ lhu $v0, 0x0($a2) /* 12094 80036C94 00651824 */ and $v1, $v1, $a1 /* 12098 80036C98 3042FFFD */ andi $v0, $v0, 0xFFFD /* 1209C 80036C9C AC830000 */ sw $v1, 0x0($a0) /* 120A0 80036CA0 A4C20000 */ sh $v0, 0x0($a2) /* 120A4 80036CA4 2402FFFD */ addiu $v0, $zero, -0x3 /* 120A8 80036CA8 00621824 */ and $v1, $v1, $v0 /* 120AC 80036CAC 0C037DD0 */ jal update_player /* 120B0 80036CB0 AC830000 */ sw $v1, 0x0($a0) /* 120B4 80036CB4 0C00F949 */ jal update_encounters /* 120B8 80036CB8 00000000 */ nop /* 120BC 80036CBC 0C00E64C */ jal update_npcs /* 120C0 80036CC0 00000000 */ nop /* 120C4 80036CC4 0C016754 */ jal update_effects /* 120C8 80036CC8 00000000 */ nop /* 120CC 80036CCC 0C00B500 */ jal update_cameras /* 120D0 80036CD0 00000000 */ nop /* 120D4 80036CD4 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 120D8 80036CD8 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 120DC 80036CDC 8E020000 */ lw $v0, 0x0($s0) /* 120E0 80036CE0 0C0B1059 */ jal does_script_exist /* 120E4 80036CE4 8C44006C */ lw $a0, 0x6C($v0) /* 120E8 80036CE8 14400037 */ bnez $v0, .L80036DC8 /* 120EC 80036CEC 24030004 */ addiu $v1, $zero, 0x4 /* 120F0 80036CF0 8E020000 */ lw $v0, 0x0($s0) /* 120F4 80036CF4 94440086 */ lhu $a0, 0x86($v0) /* 120F8 80036CF8 A04300AC */ sb $v1, 0xAC($v0) /* 120FC 80036CFC 0800DB5E */ j .L80036D78 /* 12100 80036D00 A4440088 */ sh $a0, 0x88($v0) glabel .L80036D04 /* 12104 80036D04 0C016754 */ jal update_effects /* 12108 80036D08 00000000 */ nop /* 1210C 80036D0C 0C00B500 */ jal update_cameras /* 12110 80036D10 00000000 */ nop /* 12114 80036D14 0C00E64C */ jal update_npcs /* 12118 80036D18 00000000 */ nop /* 1211C 80036D1C 3C04800A */ lui $a0, %hi(D_800A0954) /* 12120 80036D20 24840954 */ addiu $a0, $a0, %lo(D_800A0954) /* 12124 80036D24 84820000 */ lh $v0, 0x0($a0) /* 12128 80036D28 1440000C */ bnez $v0, .L80036D5C /* 1212C 80036D2C 94830000 */ lhu $v1, 0x0($a0) /* 12130 80036D30 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 12134 80036D34 4481A000 */ mtc1 $at, $f20 /* 12138 80036D38 00000000 */ nop /* 1213C 80036D3C 4405A000 */ mfc1 $a1, $f20 /* 12140 80036D40 0C04DF62 */ jal set_screen_overlay_params_front /* 12144 80036D44 240400FF */ addiu $a0, $zero, 0xFF /* 12148 80036D48 4405A000 */ mfc1 $a1, $f20 /* 1214C 80036D4C 0C04DF69 */ jal set_screen_overlay_params_back /* 12150 80036D50 240400FF */ addiu $a0, $zero, 0xFF /* 12154 80036D54 0800DB5E */ j .L80036D78 /* 12158 80036D58 00000000 */ nop .L80036D5C: /* 1215C 80036D5C 3C02800A */ lui $v0, %hi(D_800A0958) /* 12160 80036D60 94420958 */ lhu $v0, %lo(D_800A0958)($v0) /* 12164 80036D64 00621023 */ subu $v0, $v1, $v0 /* 12168 80036D68 A4820000 */ sh $v0, 0x0($a0) /* 1216C 80036D6C 00021400 */ sll $v0, $v0, 16 /* 12170 80036D70 04420001 */ bltzl $v0, .L80036D78 /* 12174 80036D74 A4800000 */ sh $zero, 0x0($a0) glabel .L80036D78 /* 12178 80036D78 3C02800A */ lui $v0, %hi(D_800A0954) /* 1217C 80036D7C 84420954 */ lh $v0, %lo(D_800A0954)($v0) /* 12180 80036D80 3C04800A */ lui $a0, %hi(D_800A0963) /* 12184 80036D84 90840963 */ lbu $a0, %lo(D_800A0963)($a0) /* 12188 80036D88 44820000 */ mtc1 $v0, $f0 /* 1218C 80036D8C 00000000 */ nop /* 12190 80036D90 46800020 */ cvt.s.w $f0, $f0 /* 12194 80036D94 44050000 */ mfc1 $a1, $f0 /* 12198 80036D98 0C04DF69 */ jal set_screen_overlay_params_back /* 1219C 80036D9C 00000000 */ nop /* 121A0 80036DA0 3C05800A */ lui $a1, %hi(D_800A095B) /* 121A4 80036DA4 90A5095B */ lbu $a1, %lo(D_800A095B)($a1) /* 121A8 80036DA8 3C06800A */ lui $a2, %hi(D_800A095D) /* 121AC 80036DAC 90C6095D */ lbu $a2, %lo(D_800A095D)($a2) /* 121B0 80036DB0 3C07800A */ lui $a3, %hi(D_800A095F) /* 121B4 80036DB4 90E7095F */ lbu $a3, %lo(D_800A095F)($a3) /* 121B8 80036DB8 0C04DF84 */ jal set_screen_overlay_color /* 121BC 80036DBC 24040001 */ addiu $a0, $zero, 0x1 /* 121C0 80036DC0 0C00CE1D */ jal intro_logos_update_fade /* 121C4 80036DC4 00000000 */ nop .L80036DC8: /* 121C8 80036DC8 8FBF0018 */ lw $ra, 0x18($sp) /* 121CC 80036DCC 8FB10014 */ lw $s1, 0x14($sp) /* 121D0 80036DD0 8FB00010 */ lw $s0, 0x10($sp) /* 121D4 80036DD4 D7B40020 */ ldc1 $f20, 0x20($sp) /* 121D8 80036DD8 03E00008 */ jr $ra /* 121DC 80036DDC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void state_step_intro(void) { PlayerData* playerData = &gPlayerData; u32 pressedButtons = gGameStatusPtr->pressedButtons[0]; s32 i; if (gGameStatusPtr->creditsViewportMode != -1) { if (D_800A0964 == 0 && pressedButtons & (BUTTON_A | BUTTON_B | BUTTON_START | BUTTON_Z)) { D_800A0964 = 1; } if (D_800A0964 == 1 && (gGameStatusPtr->introState == INTRO_STATE_0 || gGameStatusPtr->introState == INTRO_STATE_1 || gGameStatusPtr->introState == INTRO_STATE_4)) { gGameStatusPtr->creditsViewportMode = 100; state_init_intro(); return; } if (D_800A0964 == 2 && (gGameStatusPtr->introState == INTRO_STATE_0 || gGameStatusPtr->introState == INTRO_STATE_1 || gGameStatusPtr->introState == INTRO_STATE_4)) { gGameStatusPtr->creditsViewportMode++; state_init_intro(); return; } } switch (gGameStatusPtr->introState) { case INTRO_STATE_0: update_effects(); update_cameras(); if (gGameStatusPtr->creditsViewportMode == -1) { set_curtain_fade_goal(0.0f); if (intro_logos_fade_out(D_800A0956)) { gGameStatusPtr->introState = INTRO_STATE_1; set_curtain_draw_callback(NULL); } } else { D_800A0954 += D_800A0956; if (D_800A0954 >= 0xFF) { D_800A0954 = 0xFF; gGameStatusPtr->introState = INTRO_STATE_1; set_curtain_draw_callback(NULL); } } break; case INTRO_STATE_1: D_800A0950 = 4; gOverrideFlags |= GLOBAL_OVERRIDES_8; if (D_800A0960 != 0xE) { gGameStatusPtr->introState = INTRO_STATE_2; } break; case INTRO_STATE_15: D_800A0950--; if (D_800A0950 <= 0) { gOverrideFlags &= ~GLOBAL_OVERRIDES_8; gGameStatusPtr->introState = INTRO_STATE_2; } break; case INTRO_STATE_2: set_curtain_draw_callback(NULL); gGameStatusPtr->isBattle = FALSE; gGameStatusPtr->unk_76 = 0; gGameStatusPtr->disableScripts = FALSE; gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE; if (gGameStatusPtr->creditsViewportMode == -1) { general_heap_create(); clear_render_tasks(); clear_worker_list(); clear_script_list(); create_cameras_a(); spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD); clear_entity_models(); clear_animator_list(); clear_model_data(); clear_sprite_shading_data(); reset_background_settings(); hud_element_clear_cache(); clear_trigger_data(); clear_printers(); clear_entity_data(0); clear_screen_overlays(); clear_player_status(); clear_npcs(); clear_player_data(); reset_battle_status(); init_encounter_status(); clear_effect_data(); clear_item_entity_data(); clear_saved_variables(); initialize_collision(); set_game_mode(GAME_MODE_TITLE_SCREEN); return; } playerData->curHP = 10; playerData->curMaxHP = 10; playerData->hardMaxHP = 10; playerData->curFP = 5; playerData->curMaxFP = 5; playerData->hardMaxFP = 5; playerData->maxBP = 2; playerData->bootsLevel = 0; playerData->hammerLevel = -1; playerData->fortressKeyCount = 0; playerData->level = 0; for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) { playerData->partners[i].enabled = 0; } playerData->currentPartner = PARTNER_NONE; load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0); gGameStatusPtr->introState = INTRO_STATE_3; disable_player_input(); break; case INTRO_STATE_3: if (D_800A0960 == 0xE) { D_800A0960 = 0xF; } D_800A0954 = 255 - D_800A0958; gOverrideFlags &= ~GLOBAL_OVERRIDES_8; gCameras[CAM_DEFAULT].flags &= ~0x2; gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD; update_player(); update_encounters(); update_npcs(); update_effects(); update_cameras(); if (!does_script_exist(gGameStatusPtr->mainScriptID)) { gGameStatusPtr->prevArea = gGameStatusPtr->areaID; gGameStatusPtr->introState = INTRO_STATE_4; break; } return; case INTRO_STATE_4: update_effects(); update_cameras(); update_npcs(); if (D_800A0954 == 0) { set_screen_overlay_params_front(OVERLAY_NONE, -1.0f); set_screen_overlay_params_back(OVERLAY_NONE, -1.0f); } else { D_800A0954 -= D_800A0958; if (D_800A0954 < 0) { D_800A0954 = 0; } } break; } set_screen_overlay_params_back(D_800A0963, D_800A0954); set_screen_overlay_color(SCREEN_LAYER_BACK, D_800A095B, D_800A095D, D_800A095F); intro_logos_update_fade(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel CreateMapRoom /* 7E2B2C 80281CAC 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 7E2B30 80281CB0 AFB10034 */ sw $s1, 0x34($sp) /* 7E2B34 80281CB4 0080882D */ daddu $s1, $a0, $zero /* 7E2B38 80281CB8 AFBF0054 */ sw $ra, 0x54($sp) /* 7E2B3C 80281CBC AFBE0050 */ sw $fp, 0x50($sp) /* 7E2B40 80281CC0 AFB7004C */ sw $s7, 0x4C($sp) /* 7E2B44 80281CC4 AFB60048 */ sw $s6, 0x48($sp) /* 7E2B48 80281CC8 AFB50044 */ sw $s5, 0x44($sp) /* 7E2B4C 80281CCC AFB40040 */ sw $s4, 0x40($sp) /* 7E2B50 80281CD0 AFB3003C */ sw $s3, 0x3C($sp) /* 7E2B54 80281CD4 AFB20038 */ sw $s2, 0x38($sp) /* 7E2B58 80281CD8 AFB00030 */ sw $s0, 0x30($sp) /* 7E2B5C 80281CDC 8E30000C */ lw $s0, 0xC($s1) /* 7E2B60 80281CE0 0C00AB39 */ jal heap_malloc /* 7E2B64 80281CE4 24040064 */ addiu $a0, $zero, 0x64 /* 7E2B68 80281CE8 0220202D */ daddu $a0, $s1, $zero /* 7E2B6C 80281CEC 0040902D */ daddu $s2, $v0, $zero /* 7E2B70 80281CF0 AE400000 */ sw $zero, 0x0($s2) /* 7E2B74 80281CF4 8E050000 */ lw $a1, 0x0($s0) /* 7E2B78 80281CF8 0C0B1EAF */ jal evt_get_variable /* 7E2B7C 80281CFC 26100004 */ addiu $s0, $s0, 0x4 /* 7E2B80 80281D00 0040982D */ daddu $s3, $v0, $zero /* 7E2B84 80281D04 32620FFF */ andi $v0, $s3, 0xFFF /* 7E2B88 80281D08 AE420004 */ sw $v0, 0x4($s2) /* 7E2B8C 80281D0C 3262F000 */ andi $v0, $s3, 0xF000 /* 7E2B90 80281D10 00021303 */ sra $v0, $v0, 12 /* 7E2B94 80281D14 A6420008 */ sh $v0, 0x8($s2) /* 7E2B98 80281D18 A640000A */ sh $zero, 0xA($s2) /* 7E2B9C 80281D1C 8E050000 */ lw $a1, 0x0($s0) /* 7E2BA0 80281D20 26100004 */ addiu $s0, $s0, 0x4 /* 7E2BA4 80281D24 0C0B1EAF */ jal evt_get_variable /* 7E2BA8 80281D28 0220202D */ daddu $a0, $s1, $zero /* 7E2BAC 80281D2C 8E050000 */ lw $a1, 0x0($s0) /* 7E2BB0 80281D30 26100004 */ addiu $s0, $s0, 0x4 /* 7E2BB4 80281D34 0220202D */ daddu $a0, $s1, $zero /* 7E2BB8 80281D38 0C0B1EAF */ jal evt_get_variable /* 7E2BBC 80281D3C AFA2002C */ sw $v0, 0x2C($sp) /* 7E2BC0 80281D40 8E050000 */ lw $a1, 0x0($s0) /* 7E2BC4 80281D44 26100004 */ addiu $s0, $s0, 0x4 /* 7E2BC8 80281D48 0220202D */ daddu $a0, $s1, $zero /* 7E2BCC 80281D4C 0C0B1EAF */ jal evt_get_variable /* 7E2BD0 80281D50 0040F02D */ daddu $fp, $v0, $zero /* 7E2BD4 80281D54 8E050000 */ lw $a1, 0x0($s0) /* 7E2BD8 80281D58 26100004 */ addiu $s0, $s0, 0x4 /* 7E2BDC 80281D5C 0220202D */ daddu $a0, $s1, $zero /* 7E2BE0 80281D60 0C0B1EAF */ jal evt_get_variable /* 7E2BE4 80281D64 0040A82D */ daddu $s5, $v0, $zero /* 7E2BE8 80281D68 8E050000 */ lw $a1, 0x0($s0) /* 7E2BEC 80281D6C 26100004 */ addiu $s0, $s0, 0x4 /* 7E2BF0 80281D70 0220202D */ daddu $a0, $s1, $zero /* 7E2BF4 80281D74 0C0B1EAF */ jal evt_get_variable /* 7E2BF8 80281D78 0040B82D */ daddu $s7, $v0, $zero /* 7E2BFC 80281D7C 0040A02D */ daddu $s4, $v0, $zero /* 7E2C00 80281D80 AE540060 */ sw $s4, 0x60($s2) /* 7E2C04 80281D84 8E050000 */ lw $a1, 0x0($s0) /* 7E2C08 80281D88 26100004 */ addiu $s0, $s0, 0x4 /* 7E2C0C 80281D8C 0C0B1EAF */ jal evt_get_variable /* 7E2C10 80281D90 0220202D */ daddu $a0, $s1, $zero /* 7E2C14 80281D94 8E050000 */ lw $a1, 0x0($s0) /* 7E2C18 80281D98 26100004 */ addiu $s0, $s0, 0x4 /* 7E2C1C 80281D9C 0220202D */ daddu $a0, $s1, $zero /* 7E2C20 80281DA0 0C0B1EAF */ jal evt_get_variable /* 7E2C24 80281DA4 0040B02D */ daddu $s6, $v0, $zero /* 7E2C28 80281DA8 AE42003C */ sw $v0, 0x3C($s2) /* 7E2C2C 80281DAC 8E050000 */ lw $a1, 0x0($s0) /* 7E2C30 80281DB0 0C0B1EAF */ jal evt_get_variable /* 7E2C34 80281DB4 0220202D */ daddu $a0, $s1, $zero /* 7E2C38 80281DB8 12A00003 */ beqz $s5, .L80281DC8 /* 7E2C3C 80281DBC AE42005C */ sw $v0, 0x5C($s2) /* 7E2C40 80281DC0 36730800 */ ori $s3, $s3, 0x800 /* 7E2C44 80281DC4 AE530004 */ sw $s3, 0x4($s2) .L80281DC8: /* 7E2C48 80281DC8 0280202D */ daddu $a0, $s4, $zero /* 7E2C4C 80281DCC 27A50018 */ addiu $a1, $sp, 0x18 /* 7E2C50 80281DD0 27B0001C */ addiu $s0, $sp, 0x1C /* 7E2C54 80281DD4 0200302D */ daddu $a2, $s0, $zero /* 7E2C58 80281DD8 0C016F84 */ jal get_collider_center /* 7E2C5C 80281DDC 27A70020 */ addiu $a3, $sp, 0x20 /* 7E2C60 80281DE0 0280202D */ daddu $a0, $s4, $zero /* 7E2C64 80281DE4 27A50024 */ addiu $a1, $sp, 0x24 /* 7E2C68 80281DE8 0200302D */ daddu $a2, $s0, $zero /* 7E2C6C 80281DEC 0C016F76 */ jal get_flat_collider_normal /* 7E2C70 80281DF0 27A70028 */ addiu $a3, $sp, 0x28 /* 7E2C74 80281DF4 326300FF */ andi $v1, $s3, 0xFF /* 7E2C78 80281DF8 2C620008 */ sltiu $v0, $v1, 0x8 /* 7E2C7C 80281DFC 104000F0 */ beqz $v0, .L802821C0 /* 7E2C80 80281E00 00031080 */ sll $v0, $v1, 2 /* 7E2C84 80281E04 3C018028 */ lui $at, %hi(jtbl_80286500) /* 7E2C88 80281E08 00220821 */ addu $at, $at, $v0 /* 7E2C8C 80281E0C 8C226500 */ lw $v0, %lo(jtbl_80286500)($at) /* 7E2C90 80281E10 00400008 */ jr $v0 /* 7E2C94 80281E14 00000000 */ nop glabel .L80281E18 /* 7E2C98 80281E18 C7AA0024 */ lwc1 $f10, 0x24($sp) /* 7E2C9C 80281E1C 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2CA0 80281E20 44811000 */ mtc1 $at, $f2 /* 7E2CA4 80281E24 00000000 */ nop /* 7E2CA8 80281E28 46025302 */ mul.s $f12, $f10, $f2 /* 7E2CAC 80281E2C 00000000 */ nop /* 7E2CB0 80281E30 C7A60028 */ lwc1 $f6, 0x28($sp) /* 7E2CB4 80281E34 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 7E2CB8 80281E38 44810000 */ mtc1 $at, $f0 /* 7E2CBC 80281E3C 00000000 */ nop /* 7E2CC0 80281E40 46003102 */ mul.s $f4, $f6, $f0 /* 7E2CC4 80281E44 00000000 */ nop /* 7E2CC8 80281E48 46023182 */ mul.s $f6, $f6, $f2 /* 7E2CCC 80281E4C 00000000 */ nop /* 7E2CD0 80281E50 46005282 */ mul.s $f10, $f10, $f0 /* 7E2CD4 80281E54 00000000 */ nop /* 7E2CD8 80281E58 C7A20018 */ lwc1 $f2, 0x18($sp) /* 7E2CDC 80281E5C 460C1200 */ add.s $f8, $f2, $f12 /* 7E2CE0 80281E60 460C1081 */ sub.s $f2, $f2, $f12 /* 7E2CE4 80281E64 46044201 */ sub.s $f8, $f8, $f4 /* 7E2CE8 80281E68 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E2CEC 80281E6C 46060100 */ add.s $f4, $f0, $f6 /* 7E2CF0 80281E70 46060001 */ sub.s $f0, $f0, $f6 /* 7E2CF4 80281E74 E6420014 */ swc1 $f2, 0x14($s2) /* 7E2CF8 80281E78 080A0819 */ j .L80282064 /* 7E2CFC 80281E7C 460A2100 */ add.s $f4, $f4, $f10 glabel .L80281E80 /* 7E2D00 80281E80 C7A80024 */ lwc1 $f8, 0x24($sp) /* 7E2D04 80281E84 3C014270 */ lui $at, (0x42700000 >> 16) /* 7E2D08 80281E88 44812000 */ mtc1 $at, $f4 /* 7E2D0C 80281E8C 00000000 */ nop /* 7E2D10 80281E90 46044302 */ mul.s $f12, $f8, $f4 /* 7E2D14 80281E94 00000000 */ nop /* 7E2D18 80281E98 C7A60028 */ lwc1 $f6, 0x28($sp) /* 7E2D1C 80281E9C 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 7E2D20 80281EA0 44815000 */ mtc1 $at, $f10 /* 7E2D24 80281EA4 00000000 */ nop /* 7E2D28 80281EA8 460A3382 */ mul.s $f14, $f6, $f10 /* 7E2D2C 80281EAC 00000000 */ nop /* 7E2D30 80281EB0 46043102 */ mul.s $f4, $f6, $f4 /* 7E2D34 80281EB4 00000000 */ nop /* 7E2D38 80281EB8 460A4282 */ mul.s $f10, $f8, $f10 /* 7E2D3C 80281EBC 00000000 */ nop /* 7E2D40 80281EC0 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2D44 80281EC4 44810000 */ mtc1 $at, $f0 /* 7E2D48 80281EC8 00000000 */ nop /* 7E2D4C 80281ECC 46004202 */ mul.s $f8, $f8, $f0 /* 7E2D50 80281ED0 00000000 */ nop /* 7E2D54 80281ED4 46003182 */ mul.s $f6, $f6, $f0 /* 7E2D58 80281ED8 00000000 */ nop /* 7E2D5C 80281EDC C7A20018 */ lwc1 $f2, 0x18($sp) /* 7E2D60 80281EE0 460C1300 */ add.s $f12, $f2, $f12 /* 7E2D64 80281EE4 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E2D68 80281EE8 46040100 */ add.s $f4, $f0, $f4 /* 7E2D6C 80281EEC 46081081 */ sub.s $f2, $f2, $f8 /* 7E2D70 80281EF0 46060001 */ sub.s $f0, $f0, $f6 /* 7E2D74 80281EF4 460E6301 */ sub.s $f12, $f12, $f14 /* 7E2D78 80281EF8 E6420014 */ swc1 $f2, 0x14($s2) /* 7E2D7C 80281EFC 080A083D */ j .L802820F4 /* 7E2D80 80281F00 460A2100 */ add.s $f4, $f4, $f10 glabel .L80281F04 /* 7E2D84 80281F04 C7A80024 */ lwc1 $f8, 0x24($sp) /* 7E2D88 80281F08 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2D8C 80281F0C 44813000 */ mtc1 $at, $f6 /* 7E2D90 80281F10 00000000 */ nop /* 7E2D94 80281F14 46064282 */ mul.s $f10, $f8, $f6 /* 7E2D98 80281F18 00000000 */ nop /* 7E2D9C 80281F1C C7A40028 */ lwc1 $f4, 0x28($sp) /* 7E2DA0 80281F20 46062182 */ mul.s $f6, $f4, $f6 /* 7E2DA4 80281F24 00000000 */ nop /* 7E2DA8 80281F28 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 7E2DAC 80281F2C 44810000 */ mtc1 $at, $f0 /* 7E2DB0 80281F30 00000000 */ nop /* 7E2DB4 80281F34 46002102 */ mul.s $f4, $f4, $f0 /* 7E2DB8 80281F38 00000000 */ nop /* 7E2DBC 80281F3C 46004202 */ mul.s $f8, $f8, $f0 /* 7E2DC0 80281F40 00000000 */ nop /* 7E2DC4 80281F44 C7A20018 */ lwc1 $f2, 0x18($sp) /* 7E2DC8 80281F48 460A1300 */ add.s $f12, $f2, $f10 /* 7E2DCC 80281F4C 460A1081 */ sub.s $f2, $f2, $f10 /* 7E2DD0 80281F50 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E2DD4 80281F54 46060280 */ add.s $f10, $f0, $f6 /* 7E2DD8 80281F58 46060001 */ sub.s $f0, $f0, $f6 /* 7E2DDC 80281F5C 46041081 */ sub.s $f2, $f2, $f4 /* 7E2DE0 80281F60 E64C000C */ swc1 $f12, 0xC($s2) /* 7E2DE4 80281F64 46080001 */ sub.s $f0, $f0, $f8 /* 7E2DE8 80281F68 E64A0010 */ swc1 $f10, 0x10($s2) /* 7E2DEC 80281F6C 080A086F */ j .L802821BC /* 7E2DF0 80281F70 E6420014 */ swc1 $f2, 0x14($s2) glabel .L80281F74 /* 7E2DF4 80281F74 C7A80024 */ lwc1 $f8, 0x24($sp) /* 7E2DF8 80281F78 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2DFC 80281F7C 44813000 */ mtc1 $at, $f6 /* 7E2E00 80281F80 00000000 */ nop /* 7E2E04 80281F84 46064282 */ mul.s $f10, $f8, $f6 /* 7E2E08 80281F88 00000000 */ nop /* 7E2E0C 80281F8C C7A40028 */ lwc1 $f4, 0x28($sp) /* 7E2E10 80281F90 46062182 */ mul.s $f6, $f4, $f6 /* 7E2E14 80281F94 00000000 */ nop /* 7E2E18 80281F98 3C014270 */ lui $at, (0x42700000 >> 16) /* 7E2E1C 80281F9C 44811000 */ mtc1 $at, $f2 /* 7E2E20 80281FA0 00000000 */ nop /* 7E2E24 80281FA4 46024302 */ mul.s $f12, $f8, $f2 /* 7E2E28 80281FA8 00000000 */ nop /* 7E2E2C 80281FAC 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 7E2E30 80281FB0 44810000 */ mtc1 $at, $f0 /* 7E2E34 80281FB4 00000000 */ nop /* 7E2E38 80281FB8 46002382 */ mul.s $f14, $f4, $f0 /* 7E2E3C 80281FBC 00000000 */ nop /* 7E2E40 80281FC0 46022102 */ mul.s $f4, $f4, $f2 /* 7E2E44 80281FC4 00000000 */ nop /* 7E2E48 80281FC8 46004202 */ mul.s $f8, $f8, $f0 /* 7E2E4C 80281FCC 00000000 */ nop /* 7E2E50 80281FD0 C7A20018 */ lwc1 $f2, 0x18($sp) /* 7E2E54 80281FD4 460A1280 */ add.s $f10, $f2, $f10 /* 7E2E58 80281FD8 460C1081 */ sub.s $f2, $f2, $f12 /* 7E2E5C 80281FDC C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E2E60 80281FE0 46060180 */ add.s $f6, $f0, $f6 /* 7E2E64 80281FE4 46040001 */ sub.s $f0, $f0, $f4 /* 7E2E68 80281FE8 460E1081 */ sub.s $f2, $f2, $f14 /* 7E2E6C 80281FEC E64A000C */ swc1 $f10, 0xC($s2) /* 7E2E70 80281FF0 46080001 */ sub.s $f0, $f0, $f8 /* 7E2E74 80281FF4 E6460010 */ swc1 $f6, 0x10($s2) /* 7E2E78 80281FF8 080A086F */ j .L802821BC /* 7E2E7C 80281FFC E6420014 */ swc1 $f2, 0x14($s2) glabel .L80282000 /* 7E2E80 80282000 C7AA0024 */ lwc1 $f10, 0x24($sp) /* 7E2E84 80282004 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2E88 80282008 44811000 */ mtc1 $at, $f2 /* 7E2E8C 8028200C 00000000 */ nop /* 7E2E90 80282010 46025302 */ mul.s $f12, $f10, $f2 /* 7E2E94 80282014 00000000 */ nop /* 7E2E98 80282018 C7A60028 */ lwc1 $f6, 0x28($sp) /* 7E2E9C 8028201C 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 7E2EA0 80282020 44810000 */ mtc1 $at, $f0 /* 7E2EA4 80282024 00000000 */ nop /* 7E2EA8 80282028 46003102 */ mul.s $f4, $f6, $f0 /* 7E2EAC 8028202C 00000000 */ nop /* 7E2EB0 80282030 46023182 */ mul.s $f6, $f6, $f2 /* 7E2EB4 80282034 00000000 */ nop /* 7E2EB8 80282038 46005282 */ mul.s $f10, $f10, $f0 /* 7E2EBC 8028203C 00000000 */ nop /* 7E2EC0 80282040 C7A20018 */ lwc1 $f2, 0x18($sp) /* 7E2EC4 80282044 460C1200 */ add.s $f8, $f2, $f12 /* 7E2EC8 80282048 460C1081 */ sub.s $f2, $f2, $f12 /* 7E2ECC 8028204C 46044200 */ add.s $f8, $f8, $f4 /* 7E2ED0 80282050 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E2ED4 80282054 46060100 */ add.s $f4, $f0, $f6 /* 7E2ED8 80282058 46060001 */ sub.s $f0, $f0, $f6 /* 7E2EDC 8028205C E6420014 */ swc1 $f2, 0x14($s2) /* 7E2EE0 80282060 460A2101 */ sub.s $f4, $f4, $f10 .L80282064: /* 7E2EE4 80282064 E6400018 */ swc1 $f0, 0x18($s2) /* 7E2EE8 80282068 E648000C */ swc1 $f8, 0xC($s2) /* 7E2EEC 8028206C 080A0870 */ j .L802821C0 /* 7E2EF0 80282070 E6440010 */ swc1 $f4, 0x10($s2) glabel .L80282074 /* 7E2EF4 80282074 C7A80024 */ lwc1 $f8, 0x24($sp) /* 7E2EF8 80282078 3C014270 */ lui $at, (0x42700000 >> 16) /* 7E2EFC 8028207C 44812000 */ mtc1 $at, $f4 /* 7E2F00 80282080 00000000 */ nop /* 7E2F04 80282084 46044302 */ mul.s $f12, $f8, $f4 /* 7E2F08 80282088 00000000 */ nop /* 7E2F0C 8028208C C7A60028 */ lwc1 $f6, 0x28($sp) /* 7E2F10 80282090 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 7E2F14 80282094 44815000 */ mtc1 $at, $f10 /* 7E2F18 80282098 00000000 */ nop /* 7E2F1C 8028209C 460A3382 */ mul.s $f14, $f6, $f10 /* 7E2F20 802820A0 00000000 */ nop /* 7E2F24 802820A4 46043102 */ mul.s $f4, $f6, $f4 /* 7E2F28 802820A8 00000000 */ nop /* 7E2F2C 802820AC 460A4282 */ mul.s $f10, $f8, $f10 /* 7E2F30 802820B0 00000000 */ nop /* 7E2F34 802820B4 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2F38 802820B8 44810000 */ mtc1 $at, $f0 /* 7E2F3C 802820BC 00000000 */ nop /* 7E2F40 802820C0 46004202 */ mul.s $f8, $f8, $f0 /* 7E2F44 802820C4 00000000 */ nop /* 7E2F48 802820C8 46003182 */ mul.s $f6, $f6, $f0 /* 7E2F4C 802820CC 00000000 */ nop /* 7E2F50 802820D0 C7A20018 */ lwc1 $f2, 0x18($sp) /* 7E2F54 802820D4 460C1300 */ add.s $f12, $f2, $f12 /* 7E2F58 802820D8 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E2F5C 802820DC 46040100 */ add.s $f4, $f0, $f4 /* 7E2F60 802820E0 46081081 */ sub.s $f2, $f2, $f8 /* 7E2F64 802820E4 46060001 */ sub.s $f0, $f0, $f6 /* 7E2F68 802820E8 460E6300 */ add.s $f12, $f12, $f14 /* 7E2F6C 802820EC E6420014 */ swc1 $f2, 0x14($s2) /* 7E2F70 802820F0 460A2101 */ sub.s $f4, $f4, $f10 .L802820F4: /* 7E2F74 802820F4 E6400018 */ swc1 $f0, 0x18($s2) /* 7E2F78 802820F8 E64C000C */ swc1 $f12, 0xC($s2) /* 7E2F7C 802820FC 080A0870 */ j .L802821C0 /* 7E2F80 80282100 E6440010 */ swc1 $f4, 0x10($s2) glabel .L80282104 /* 7E2F84 80282104 C7A80024 */ lwc1 $f8, 0x24($sp) /* 7E2F88 80282108 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2F8C 8028210C 44813000 */ mtc1 $at, $f6 /* 7E2F90 80282110 00000000 */ nop /* 7E2F94 80282114 46064282 */ mul.s $f10, $f8, $f6 /* 7E2F98 80282118 00000000 */ nop /* 7E2F9C 8028211C C7A40028 */ lwc1 $f4, 0x28($sp) /* 7E2FA0 80282120 46062182 */ mul.s $f6, $f4, $f6 /* 7E2FA4 80282124 00000000 */ nop /* 7E2FA8 80282128 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 7E2FAC 8028212C 44810000 */ mtc1 $at, $f0 /* 7E2FB0 80282130 00000000 */ nop /* 7E2FB4 80282134 46002102 */ mul.s $f4, $f4, $f0 /* 7E2FB8 80282138 00000000 */ nop /* 7E2FBC 8028213C 46004202 */ mul.s $f8, $f8, $f0 /* 7E2FC0 80282140 00000000 */ nop /* 7E2FC4 80282144 C7A20018 */ lwc1 $f2, 0x18($sp) /* 7E2FC8 80282148 460A1300 */ add.s $f12, $f2, $f10 /* 7E2FCC 8028214C 460A1081 */ sub.s $f2, $f2, $f10 /* 7E2FD0 80282150 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E2FD4 80282154 46060280 */ add.s $f10, $f0, $f6 /* 7E2FD8 80282158 46060001 */ sub.s $f0, $f0, $f6 /* 7E2FDC 8028215C 46041080 */ add.s $f2, $f2, $f4 /* 7E2FE0 80282160 E64C000C */ swc1 $f12, 0xC($s2) /* 7E2FE4 80282164 46080000 */ add.s $f0, $f0, $f8 /* 7E2FE8 80282168 E64A0010 */ swc1 $f10, 0x10($s2) /* 7E2FEC 8028216C 080A086F */ j .L802821BC /* 7E2FF0 80282170 E6420014 */ swc1 $f2, 0x14($s2) glabel .L80282174 /* 7E2FF4 80282174 C7A60024 */ lwc1 $f6, 0x24($sp) /* 7E2FF8 80282178 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 7E2FFC 8028217C 44810000 */ mtc1 $at, $f0 /* 7E3000 80282180 00000000 */ nop /* 7E3004 80282184 46003182 */ mul.s $f6, $f6, $f0 /* 7E3008 80282188 00000000 */ nop /* 7E300C 8028218C C7A20028 */ lwc1 $f2, 0x28($sp) /* 7E3010 80282190 46001082 */ mul.s $f2, $f2, $f0 /* 7E3014 80282194 00000000 */ nop /* 7E3018 80282198 C7A40018 */ lwc1 $f4, 0x18($sp) /* 7E301C 8028219C 46062200 */ add.s $f8, $f4, $f6 /* 7E3020 802821A0 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7E3024 802821A4 46020280 */ add.s $f10, $f0, $f2 /* 7E3028 802821A8 46062101 */ sub.s $f4, $f4, $f6 /* 7E302C 802821AC 46020001 */ sub.s $f0, $f0, $f2 /* 7E3030 802821B0 E648000C */ swc1 $f8, 0xC($s2) /* 7E3034 802821B4 E64A0010 */ swc1 $f10, 0x10($s2) /* 7E3038 802821B8 E6440014 */ swc1 $f4, 0x14($s2) .L802821BC: /* 7E303C 802821BC E6400018 */ swc1 $f0, 0x18($s2) .L802821C0: /* 7E3040 802821C0 3C048028 */ lui $a0, %hi(D_802847D4) /* 7E3044 802821C4 248447D4 */ addiu $a0, $a0, %lo(D_802847D4) /* 7E3048 802821C8 3C02800B */ lui $v0, %hi(gCameras) /* 7E304C 802821CC 24421D80 */ addiu $v0, $v0, %lo(gCameras) /* 7E3050 802821D0 C6400014 */ lwc1 $f0, 0x14($s2) /* 7E3054 802821D4 C6420018 */ lwc1 $f2, 0x18($s2) /* 7E3058 802821D8 C644000C */ lwc1 $f4, 0xC($s2) /* 7E305C 802821DC C6460010 */ lwc1 $f6, 0x10($s2) /* 7E3060 802821E0 8FA8002C */ lw $t0, 0x2C($sp) /* 7E3064 802821E4 24050100 */ addiu $a1, $zero, 0x100 /* 7E3068 802821E8 AE48002C */ sw $t0, 0x2C($s2) /* 7E306C 802821EC AE5E0030 */ sw $fp, 0x30($s2) /* 7E3070 802821F0 AE550034 */ sw $s5, 0x34($s2) /* 7E3074 802821F4 AE570038 */ sw $s7, 0x38($s2) /* 7E3078 802821F8 E640001C */ swc1 $f0, 0x1C($s2) /* 7E307C 802821FC E6420020 */ swc1 $f2, 0x20($s2) /* 7E3080 80282200 E6440024 */ swc1 $f4, 0x24($s2) /* 7E3084 80282204 E6460028 */ swc1 $f6, 0x28($s2) /* 7E3088 80282208 8443002C */ lh $v1, 0x2C($v0) /* 7E308C 8028220C 0280302D */ daddu $a2, $s4, $zero /* 7E3090 80282210 AE430040 */ sw $v1, 0x40($s2) /* 7E3094 80282214 8443002E */ lh $v1, 0x2E($v0) /* 7E3098 80282218 0000382D */ daddu $a3, $zero, $zero /* 7E309C 8028221C AE430044 */ sw $v1, 0x44($s2) /* 7E30A0 80282220 84420030 */ lh $v0, 0x30($v0) /* 7E30A4 80282224 24100003 */ addiu $s0, $zero, 0x3 /* 7E30A8 80282228 AE420048 */ sw $v0, 0x48($s2) /* 7E30AC 8028222C AFB20010 */ sw $s2, 0x10($sp) /* 7E30B0 80282230 0C0B10AA */ jal bind_trigger_1 /* 7E30B4 80282234 AFB00014 */ sw $s0, 0x14($sp) /* 7E30B8 80282238 32620800 */ andi $v0, $s3, 0x800 /* 7E30BC 8028223C 10400005 */ beqz $v0, .L80282254 /* 7E30C0 80282240 24050040 */ addiu $a1, $zero, 0x40 /* 7E30C4 80282244 3C048028 */ lui $a0, %hi(D_80284F80) /* 7E30C8 80282248 24844F80 */ addiu $a0, $a0, %lo(D_80284F80) /* 7E30CC 8028224C 080A0899 */ j .L80282264 /* 7E30D0 80282250 02C0302D */ daddu $a2, $s6, $zero .L80282254: /* 7E30D4 80282254 3C048028 */ lui $a0, %hi(D_80284F80) /* 7E30D8 80282258 24844F80 */ addiu $a0, $a0, %lo(D_80284F80) /* 7E30DC 8028225C 24050100 */ addiu $a1, $zero, 0x100 /* 7E30E0 80282260 02C0302D */ daddu $a2, $s6, $zero .L80282264: /* 7E30E4 80282264 24070001 */ addiu $a3, $zero, 0x1 /* 7E30E8 80282268 AFB20010 */ sw $s2, 0x10($sp) /* 7E30EC 8028226C 0C0B10AA */ jal bind_trigger_1 /* 7E30F0 80282270 AFB00014 */ sw $s0, 0x14($sp) /* 7E30F4 80282274 8FBF0054 */ lw $ra, 0x54($sp) /* 7E30F8 80282278 8FBE0050 */ lw $fp, 0x50($sp) /* 7E30FC 8028227C 8FB7004C */ lw $s7, 0x4C($sp) /* 7E3100 80282280 8FB60048 */ lw $s6, 0x48($sp) /* 7E3104 80282284 8FB50044 */ lw $s5, 0x44($sp) /* 7E3108 80282288 8FB40040 */ lw $s4, 0x40($sp) /* 7E310C 8028228C 8FB3003C */ lw $s3, 0x3C($sp) /* 7E3110 80282290 8FB20038 */ lw $s2, 0x38($sp) /* 7E3114 80282294 8FB10034 */ lw $s1, 0x34($sp) /* 7E3118 80282298 8FB00030 */ lw $s0, 0x30($sp) /* 7E311C 8028229C 24020002 */ addiu $v0, $zero, 0x2 /* 7E3120 802822A0 03E00008 */ jr $ra /* 7E3124 802822A4 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(CreateMapRoom) { Bytecode* args = script->ptrReadPos; MapRoom* room = heap_malloc(sizeof(*room)); EvtScript* openDoorScript; EvtScript* moveWallsScript; EvtScript* dropDoorScript; EvtScript* stateListenerScript; s32 colliderID; s32 triggerColliderID; s32 roomFlags; f32 centerX, centerZ; f32 nX, nZ; f32 tempY; room->state = ROOM_STATE_IDLE; roomFlags = evt_get_variable(script, *args++); room->flags = roomFlags & (ROOM_FLAGS_MASK | ROOM_FLAGS_DOOR_TYPE_MASK); room->newItemVisGroup = (roomFlags & ROOM_FLAGS_VISGROUP_MASK) >> 0xC; room->prevItemVisGroup = VIS_GROUP_0; openDoorScript = (EvtScript*) evt_get_variable(script, *args++); moveWallsScript = (EvtScript*) evt_get_variable(script, *args++); dropDoorScript = (EvtScript*) evt_get_variable(script, *args++); stateListenerScript = (EvtScript*) evt_get_variable(script, *args++); room->colliderID = colliderID = evt_get_variable(script, *args++); triggerColliderID = evt_get_variable(script, *args++); room->modelID = evt_get_variable(script, *args++); room->npcList = (s32*) evt_get_variable(script, *args++); if (dropDoorScript != NULL) { roomFlags |= ROOM_FLAG_EXIT_DOOR_DROPS; room->flags = roomFlags; } get_collider_center(colliderID, &centerX, &tempY, &centerZ); get_flat_collider_normal(colliderID, &nX, &tempY, &nZ); switch (roomFlags & ROOM_FLAGS_DOOR_TYPE_MASK) { case ROOM_DOOR_RIGHT_HINGE_OPENS_OUT: room->posEnterA.x = centerX + (nX * 30.0f) - (nZ * 20.0f); room->posEnterA.z = centerZ + (nZ * 30.0f) + (nX * 20.0f); room->posEnterB.x = centerX - (nX * 30.0f); room->posEnterB.z = centerZ - (nZ * 30.0f); break; case ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT: room->posEnterA.x = centerX + (nX * 60.0f) - (nZ * 20.0f); room->posEnterA.z = centerZ + (nZ * 60.0f) + (nX * 20.0f); room->posEnterB.x = centerX - (nX * 30.0f); room->posEnterB.z = centerZ - (nZ * 30.0f); break; case ROOM_DOOR_RIGHT_HINGE_OPENS_IN: room->posEnterA.x = centerX + (nX * 30.0f); room->posEnterA.z = centerZ + (nZ * 30.0f); room->posEnterB.x = centerX - (nX * 30.0f) - (nZ * 20.0f); room->posEnterB.z = centerZ - (nZ * 30.0f) - (nX * 20.0f); break; case ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_IN: room->posEnterA.x = centerX + (nX * 30.0f); room->posEnterA.z = centerZ + (nZ * 30.0f); room->posEnterB.x = centerX - (nX * 60.0f) - (nZ * 20.0f); room->posEnterB.z = centerZ - (nZ * 60.0f) - (nX * 20.0f); break; case ROOM_DOOR_LEFT_HINGE_OPENS_OUT: room->posEnterA.x = centerX + (nX * 30.0f) + (nZ * 20.0f); room->posEnterA.z = centerZ + (nZ * 30.0f) - (nX * 20.0f); room->posEnterB.x = centerX - (nX * 30.0f); room->posEnterB.z = centerZ - (nZ * 30.0f); break; case ROOM_LARGE_DOOR_LEFT_HINGE_OPENS_OUT: room->posEnterA.x = centerX + (nX * 60.0f) + (nZ * 20.0f); room->posEnterA.z = centerZ + (nZ * 60.0f) - (nX * 20.0f); room->posEnterB.x = centerX - (nX * 30.0f); room->posEnterB.z = centerZ - (nZ * 30.0f); break; case ROOM_DOOR_LEFT_HINGE_OPENS_IN: room->posEnterA.x = centerX + (nX * 30.0f); room->posEnterA.z = centerZ + (nZ * 30.0f); room->posEnterB.x = centerX - (nX * 30.0f) + (nZ * 20.0f); room->posEnterB.z = centerZ - (nZ * 30.0f) + (nX * 20.0f); break; case ROOM_DOOR_STRAIGHT_THROUGH: room->posEnterA.x = centerX + (nX * 30.0f); room->posEnterA.z = centerZ + (nZ * 30.0f); room->posEnterB.x = centerX - (nX * 30.0f); room->posEnterB.z = centerZ - (nZ * 30.0f); break; } room->overrideOpenDoor = openDoorScript; room->overrideMoveWall = moveWallsScript; room->overrideDropDoor = dropDoorScript; room->stateListenerScript = stateListenerScript; room->posExitA.x = room->posEnterB.x; room->posExitA.z = room->posEnterB.z; room->posExitB.x = room->posEnterA.x; room->posExitB.z = room->posEnterA.z; room->bgColor[0] = gCameras[CAM_DEFAULT].bgColor[0]; room->bgColor[1] = gCameras[CAM_DEFAULT].bgColor[1]; room->bgColor[2] = gCameras[CAM_DEFAULT].bgColor[2]; bind_trigger_1(&EVS_EnterRoomDoor, TRIGGER_WALL_PRESS_A, colliderID, 0, (s32) room, 3); if (roomFlags & ROOM_FLAG_EXIT_DOOR_DROPS) { bind_trigger_1(&EVS_ExitRoomDoor, TRIGGER_WALL_PUSH, triggerColliderID, 1, (s32) room, 3); } else { bind_trigger_1(&EVS_ExitRoomDoor, TRIGGER_WALL_PRESS_A, triggerColliderID, 1, (s32) room, 3); } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802B6820_E256F0 /* E256F0 802B6820 27BDFF88 */ addiu $sp, $sp, -0x78 .L802B6824: /* E256F4 802B6824 AFB20040 */ sw $s2, 0x40($sp) .L802B6828: /* E256F8 802B6828 3C128011 */ lui $s2, %hi(gPlayerStatus) glabel .L802B682C /* E256FC 802B682C 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* E25700 802B6830 AFBF004C */ sw $ra, 0x4C($sp) /* E25704 802B6834 AFB40048 */ sw $s4, 0x48($sp) /* E25708 802B6838 AFB30044 */ sw $s3, 0x44($sp) /* E2570C 802B683C AFB1003C */ sw $s1, 0x3C($sp) /* E25710 802B6840 AFB00038 */ sw $s0, 0x38($sp) /* E25714 802B6844 F7BC0070 */ sdc1 $f28, 0x70($sp) /* E25718 802B6848 F7BA0068 */ sdc1 $f26, 0x68($sp) /* E2571C 802B684C F7B80060 */ sdc1 $f24, 0x60($sp) jtbl_802B6850: /* E25720 802B6850 F7B60058 */ sdc1 $f22, 0x58($sp) .L802B6854: /* E25724 802B6854 F7B40050 */ sdc1 $f20, 0x50($sp) .L802B6858: /* E25728 802B6858 3C148016 */ lui $s4, %hi(gCollisionStatus) /* E2572C 802B685C 2694A550 */ addiu $s4, $s4, %lo(gCollisionStatus) /* E25730 802B6860 0C0394D2 */ jal func_800E5348 /* E25734 802B6864 00000000 */ nop /* E25738 802B6868 8E4400A4 */ lw $a0, 0xA4($s2) /* E2573C 802B686C 0C0AD800 */ jal parasol_get_npc .L802B6870: /* E25740 802B6870 46000586 */ mov.s $f22, $f0 /* E25744 802B6874 10400024 */ beqz $v0, .L802B6908 /* E25748 802B6878 27A50020 */ addiu $a1, $sp, 0x20 /* E2574C 802B687C 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* E25750 802B6880 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* E25754 802B6884 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* E25758 802B6888 4481A000 */ mtc1 $at, $f20 /* E2575C 802B688C 00031080 */ sll $v0, $v1, 2 /* E25760 802B6890 00431021 */ addu $v0, $v0, $v1 /* E25764 802B6894 00021080 */ sll $v0, $v0, 2 /* E25768 802B6898 00431023 */ subu $v0, $v0, $v1 /* E2576C 802B689C 000218C0 */ sll $v1, $v0, 3 .L802B68A0: /* E25770 802B68A0 00431021 */ addu $v0, $v0, $v1 /* E25774 802B68A4 000210C0 */ sll $v0, $v0, 3 /* E25778 802B68A8 4614B000 */ add.s $f0, $f22, $f20 /* E2577C 802B68AC 3C01800B */ lui $at, %hi(gCameras + 0x6C) D_802B68B0: /* E25780 802B68B0 00220821 */ addu $at, $at, $v0 D_802B68B4: /* E25784 802B68B4 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) .L802B68B8: /* E25788 802B68B8 0C00A6C9 */ jal clamp_angle D_802B68BC: /* E2578C 802B68BC 460C0301 */ sub.s $f12, $f0, $f12 .L802B68C0: /* E25790 802B68C0 46000086 */ mov.s $f2, $f0 /* E25794 802B68C4 4602A03E */ c.le.s $f20, $f2 .L802B68C8: /* E25798 802B68C8 00000000 */ nop /* E2579C 802B68CC 45000009 */ bc1f .L802B68F4 /* E257A0 802B68D0 00000000 */ nop /* E257A4 802B68D4 3C014387 */ lui $at, (0x43870000 >> 16) /* E257A8 802B68D8 44810000 */ mtc1 $at, $f0 /* E257AC 802B68DC 00000000 */ nop /* E257B0 802B68E0 4600103C */ c.lt.s $f2, $f0 /* E257B4 802B68E4 3C01C1F0 */ lui $at, (0xC1F00000 >> 16) /* E257B8 802B68E8 44810000 */ mtc1 $at, $f0 .L802B68EC: /* E257BC 802B68EC 45030005 */ bc1tl .L802B6904 /* E257C0 802B68F0 4600B580 */ add.s $f22, $f22, $f0 .L802B68F4: /* E257C4 802B68F4 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* E257C8 802B68F8 44810000 */ mtc1 $at, $f0 .L802B68FC: /* E257CC 802B68FC 00000000 */ nop /* E257D0 802B6900 4600B580 */ add.s $f22, $f22, $f0 .L802B6904: /* E257D4 802B6904 27A50020 */ addiu $a1, $sp, 0x20 .L802B6908: /* E257D8 802B6908 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* E257DC 802B690C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) WalkPeachAnims: /* E257E0 802B6910 44816000 */ mtc1 $at, $f12 /* E257E4 802B6914 27A60024 */ addiu $a2, $sp, 0x24 /* E257E8 802B6918 460CB302 */ mul.s $f12, $f22, $f12 .L802B691C: /* E257EC 802B691C 00000000 */ nop /* E257F0 802B6920 24110001 */ addiu $s1, $zero, 0x1 /* E257F4 802B6924 27B30030 */ addiu $s3, $sp, 0x30 /* E257F8 802B6928 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* E257FC 802B692C 44810000 */ mtc1 $at, $f0 /* E25800 802B6930 3C014080 */ lui $at, (0x40800000 >> 16) .L802B6934: /* E25804 802B6934 4481A000 */ mtc1 $at, $f20 /* E25808 802B6938 0C00A82D */ jal sin_cos_rad /* E2580C 802B693C 46006303 */ div.s $f12, $f12, $f0 /* E25810 802B6940 C65C0028 */ lwc1 $f28, 0x28($s2) /* E25814 802B6944 C65A002C */ lwc1 $f26, 0x2C($s2) .L802B6948: /* E25818 802B6948 C6580030 */ lwc1 $f24, 0x30($s2) .L802B694C: /* E2581C 802B694C C7A40020 */ lwc1 $f4, 0x20($sp) .L802B6950: /* E25820 802B6950 44910000 */ mtc1 $s1, $f0 /* E25824 802B6954 00000000 */ nop /* E25828 802B6958 46800020 */ cvt.s.w $f0, $f0 .L802B695C: /* E2582C 802B695C 46002102 */ mul.s $f4, $f4, $f0 .L802B6960: /* E25830 802B6960 00000000 */ nop /* E25834 802B6964 C7A20024 */ lwc1 $f2, 0x24($sp) glabel .L802B6968 /* E25838 802B6968 46001082 */ mul.s $f2, $f2, $f0 .L802B696C: /* E2583C 802B696C 00000000 */ nop /* E25840 802B6970 24040003 */ addiu $a0, $zero, 0x3 /* E25844 802B6974 0240282D */ daddu $a1, $s2, $zero /* E25848 802B6978 4604E100 */ add.s $f4, $f28, $f4 /* E2584C 802B697C 27A60028 */ addiu $a2, $sp, 0x28 /* E25850 802B6980 27A7002C */ addiu $a3, $sp, 0x2C /* E25854 802B6984 4602C081 */ sub.s $f2, $f24, $f2 /* E25858 802B6988 E7BA002C */ swc1 $f26, 0x2C($sp) /* E2585C 802B698C E7A40028 */ swc1 $f4, 0x28($sp) /* E25860 802B6990 E7A20030 */ swc1 $f2, 0x30($sp) /* E25864 802B6994 AFB30010 */ sw $s3, 0x10($sp) /* E25868 802B6998 E7B40014 */ swc1 $f20, 0x14($sp) /* E2586C 802B699C 0C037B01 */ jal player_test_lateral_overlap D_802B69A0_E26700: /* E25870 802B69A0 E7B60018 */ swc1 $f22, 0x18($sp) glabel .L802B69A4 /* E25874 802B69A4 3C03802B */ lui $v1, %hi(HammerHit) D_802B69A8_E26708: /* E25878 802B69A8 8C636DB0 */ lw $v1, %lo(HammerHit)($v1) /* E2587C 802B69AC 8C630014 */ lw $v1, 0x14($v1) /* E25880 802B69B0 14600009 */ bnez $v1, .L802B69D8 glabel .L802B69B4 /* E25884 802B69B4 0040802D */ daddu $s0, $v0, $zero /* E25888 802B69B8 06000009 */ bltz $s0, .L802B69E0 .L802B69BC: /* E2588C 802B69BC A6900014 */ sh $s0, 0x14($s4) /* E25890 802B69C0 32024000 */ andi $v0, $s0, 0x4000 /* E25894 802B69C4 10400004 */ beqz $v0, .L802B69D8 glabel .L802B69C8 /* E25898 802B69C8 00000000 */ nop /* E2589C 802B69CC 0C04417A */ jal get_entity_by_index /* E258A0 802B69D0 0200202D */ daddu $a0, $s0, $zero /* E258A4 802B69D4 A0400007 */ sb $zero, 0x7($v0) .L802B69D8: /* E258A8 802B69D8 06010005 */ bgez $s0, .L802B69F0 glabel .L802B69DC /* E258AC 802B69DC 2A220010 */ slti $v0, $s1, 0x10 .L802B69E0: /* E258B0 802B69E0 26310001 */ addiu $s1, $s1, 0x1 /* E258B4 802B69E4 2A220010 */ slti $v0, $s1, 0x10 .L802B69E8: /* E258B8 802B69E8 1440FFD8 */ bnez $v0, .L802B694C /* E258BC 802B69EC 00000000 */ nop glabel .L802B69F0 /* E258C0 802B69F0 14400062 */ bnez $v0, .L802B6B7C /* E258C4 802B69F4 00000000 */ nop /* E258C8 802B69F8 0C0394D2 */ jal func_800E5348 /* E258CC 802B69FC 00000000 */ nop /* E258D0 802B6A00 8E4400A4 */ lw $a0, 0xA4($s2) /* E258D4 802B6A04 0C0AD800 */ jal parasol_get_npc /* E258D8 802B6A08 46000586 */ mov.s $f22, $f0 /* E258DC 802B6A0C 14400024 */ bnez $v0, .L802B6AA0 /* E258E0 802B6A10 27A50020 */ addiu $a1, $sp, 0x20 /* E258E4 802B6A14 3C038007 */ lui $v1, %hi(gCurrentCameraID) .L802B6A18: /* E258E8 802B6A18 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* E258EC 802B6A1C 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* E258F0 802B6A20 4481A000 */ mtc1 $at, $f20 /* E258F4 802B6A24 00031080 */ sll $v0, $v1, 2 /* E258F8 802B6A28 00431021 */ addu $v0, $v0, $v1 /* E258FC 802B6A2C 00021080 */ sll $v0, $v0, 2 /* E25900 802B6A30 00431023 */ subu $v0, $v0, $v1 /* E25904 802B6A34 000218C0 */ sll $v1, $v0, 3 /* E25908 802B6A38 00431021 */ addu $v0, $v0, $v1 /* E2590C 802B6A3C 000210C0 */ sll $v0, $v0, 3 /* E25910 802B6A40 4614B000 */ add.s $f0, $f22, $f20 /* E25914 802B6A44 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* E25918 802B6A48 00220821 */ addu $at, $at, $v0 /* E2591C 802B6A4C C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) .L802B6A50: /* E25920 802B6A50 0C00A6C9 */ jal clamp_angle /* E25924 802B6A54 460C0301 */ sub.s $f12, $f0, $f12 /* E25928 802B6A58 46000086 */ mov.s $f2, $f0 /* E2592C 802B6A5C 4602A03E */ c.le.s $f20, $f2 /* E25930 802B6A60 00000000 */ nop /* E25934 802B6A64 45000009 */ bc1f .L802B6A8C /* E25938 802B6A68 00000000 */ nop /* E2593C 802B6A6C 3C014387 */ lui $at, (0x43870000 >> 16) /* E25940 802B6A70 44810000 */ mtc1 $at, $f0 /* E25944 802B6A74 00000000 */ nop /* E25948 802B6A78 4600103C */ c.lt.s $f2, $f0 .L802B6A7C: /* E2594C 802B6A7C 3C014170 */ lui $at, (0x41700000 >> 16) /* E25950 802B6A80 44810000 */ mtc1 $at, $f0 /* E25954 802B6A84 45030005 */ bc1tl .L802B6A9C /* E25958 802B6A88 4600B580 */ add.s $f22, $f22, $f0 .L802B6A8C: /* E2595C 802B6A8C 3C01C170 */ lui $at, (0xC1700000 >> 16) /* E25960 802B6A90 44810000 */ mtc1 $at, $f0 /* E25964 802B6A94 00000000 */ nop /* E25968 802B6A98 4600B580 */ add.s $f22, $f22, $f0 .L802B6A9C: /* E2596C 802B6A9C 27A50020 */ addiu $a1, $sp, 0x20 .L802B6AA0: /* E25970 802B6AA0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* E25974 802B6AA4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* E25978 802B6AA8 44816000 */ mtc1 $at, $f12 /* E2597C 802B6AAC 27A60024 */ addiu $a2, $sp, 0x24 /* E25980 802B6AB0 460CB302 */ mul.s $f12, $f22, $f12 /* E25984 802B6AB4 00000000 */ nop /* E25988 802B6AB8 24110001 */ addiu $s1, $zero, 0x1 .L802B6ABC: /* E2598C 802B6ABC 27B30030 */ addiu $s3, $sp, 0x30 /* E25990 802B6AC0 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* E25994 802B6AC4 44810000 */ mtc1 $at, $f0 /* E25998 802B6AC8 3C014080 */ lui $at, (0x40800000 >> 16) /* E2599C 802B6ACC 4481A000 */ mtc1 $at, $f20 /* E259A0 802B6AD0 0C00A82D */ jal sin_cos_rad /* E259A4 802B6AD4 46006303 */ div.s $f12, $f12, $f0 .L802B6AD8: /* E259A8 802B6AD8 C7A40020 */ lwc1 $f4, 0x20($sp) /* E259AC 802B6ADC 44910000 */ mtc1 $s1, $f0 /* E259B0 802B6AE0 00000000 */ nop /* E259B4 802B6AE4 46800020 */ cvt.s.w $f0, $f0 /* E259B8 802B6AE8 46002102 */ mul.s $f4, $f4, $f0 /* E259BC 802B6AEC 00000000 */ nop /* E259C0 802B6AF0 C7A20024 */ lwc1 $f2, 0x24($sp) /* E259C4 802B6AF4 46001082 */ mul.s $f2, $f2, $f0 /* E259C8 802B6AF8 00000000 */ nop /* E259CC 802B6AFC 24040003 */ addiu $a0, $zero, 0x3 /* E259D0 802B6B00 0240282D */ daddu $a1, $s2, $zero /* E259D4 802B6B04 4604E100 */ add.s $f4, $f28, $f4 /* E259D8 802B6B08 27A60028 */ addiu $a2, $sp, 0x28 .L802B6B0C: /* E259DC 802B6B0C 27A7002C */ addiu $a3, $sp, 0x2C /* E259E0 802B6B10 4602C081 */ sub.s $f2, $f24, $f2 /* E259E4 802B6B14 E7BA002C */ swc1 $f26, 0x2C($sp) /* E259E8 802B6B18 E7A40028 */ swc1 $f4, 0x28($sp) /* E259EC 802B6B1C E7A20030 */ swc1 $f2, 0x30($sp) /* E259F0 802B6B20 AFB30010 */ sw $s3, 0x10($sp) /* E259F4 802B6B24 E7B40014 */ swc1 $f20, 0x14($sp) /* E259F8 802B6B28 0C037B01 */ jal player_test_lateral_overlap /* E259FC 802B6B2C E7B60018 */ swc1 $f22, 0x18($sp) /* E25A00 802B6B30 3C03802B */ lui $v1, %hi(HammerHit) /* E25A04 802B6B34 8C636DB0 */ lw $v1, %lo(HammerHit)($v1) /* E25A08 802B6B38 8C630014 */ lw $v1, 0x14($v1) /* E25A0C 802B6B3C 14600009 */ bnez $v1, .L802B6B64 /* E25A10 802B6B40 0040802D */ daddu $s0, $v0, $zero /* E25A14 802B6B44 06000009 */ bltz $s0, .L802B6B6C /* E25A18 802B6B48 A6900014 */ sh $s0, 0x14($s4) /* E25A1C 802B6B4C 32024000 */ andi $v0, $s0, 0x4000 /* E25A20 802B6B50 10400004 */ beqz $v0, .L802B6B64 /* E25A24 802B6B54 00000000 */ nop /* E25A28 802B6B58 0C04417A */ jal get_entity_by_index /* E25A2C 802B6B5C 0200202D */ daddu $a0, $s0, $zero /* E25A30 802B6B60 A0400007 */ sb $zero, 0x7($v0) .L802B6B64: /* E25A34 802B6B64 06010005 */ bgez $s0, .L802B6B7C /* E25A38 802B6B68 00000000 */ nop .L802B6B6C: /* E25A3C 802B6B6C 26310001 */ addiu $s1, $s1, 0x1 /* E25A40 802B6B70 2A220010 */ slti $v0, $s1, 0x10 /* E25A44 802B6B74 1440FFD8 */ bnez $v0, .L802B6AD8 /* E25A48 802B6B78 00000000 */ nop .L802B6B7C: /* E25A4C 802B6B7C 3C02802B */ lui $v0, %hi(HammerHit) /* E25A50 802B6B80 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) /* E25A54 802B6B84 8C440018 */ lw $a0, 0x18($v0) /* E25A58 802B6B88 24020002 */ addiu $v0, $zero, 0x2 /* E25A5C 802B6B8C 14820032 */ bne $a0, $v0, .L802B6C58 /* E25A60 802B6B90 00000000 */ nop /* E25A64 802B6B94 3C038011 */ lui $v1, %hi(gPlayerData + 0x1) /* E25A68 802B6B98 8063F291 */ lb $v1, %lo(gPlayerData + 0x1)($v1) /* E25A6C 802B6B9C 14640003 */ bne $v1, $a0, .L802B6BAC /* E25A70 802B6BA0 24020001 */ addiu $v0, $zero, 0x1 /* E25A74 802B6BA4 080ADAEE */ j .L802B6BB8 /* E25A78 802B6BA8 24042117 */ addiu $a0, $zero, 0x2117 .L802B6BAC: /* E25A7C 802B6BAC 14620002 */ bne $v1, $v0, .L802B6BB8 /* E25A80 802B6BB0 24042115 */ addiu $a0, $zero, 0x2115 /* E25A84 802B6BB4 24042116 */ addiu $a0, $zero, 0x2116 .L802B6BB8: /* E25A88 802B6BB8 0C052736 */ jal sfx_play_sound_at_player /* E25A8C 802B6BBC 0000282D */ daddu $a1, $zero, $zero /* E25A90 802B6BC0 3C02802B */ lui $v0, %hi(HammerHit) /* E25A94 802B6BC4 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) /* E25A98 802B6BC8 0C0AD812 */ jal action_hammer_play_hit_fx /* E25A9C 802B6BCC 8C440010 */ lw $a0, 0x10($v0) /* E25AA0 802B6BD0 86840014 */ lh $a0, 0x14($s4) /* E25AA4 802B6BD4 96820014 */ lhu $v0, 0x14($s4) /* E25AA8 802B6BD8 04800007 */ bltz $a0, .L802B6BF8 /* E25AAC 802B6BDC 30424000 */ andi $v0, $v0, 0x4000 /* E25AB0 802B6BE0 10400005 */ beqz $v0, .L802B6BF8 /* E25AB4 802B6BE4 00000000 */ nop /* E25AB8 802B6BE8 0C04417A */ jal get_entity_by_index /* E25ABC 802B6BEC 00000000 */ nop /* E25AC0 802B6BF0 080ADB03 */ j .L802B6C0C /* E25AC4 802B6BF4 A0400007 */ sb $zero, 0x7($v0) .L802B6BF8: /* E25AC8 802B6BF8 3C02802B */ lui $v0, %hi(HammerHit) /* E25ACC 802B6BFC 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) /* E25AD0 802B6C00 8C420010 */ lw $v0, 0x10($v0) /* E25AD4 802B6C04 04410014 */ bgez $v0, .L802B6C58 .L802B6C08: /* E25AD8 802B6C08 00000000 */ nop .L802B6C0C: /* E25ADC 802B6C0C 8E420000 */ lw $v0, 0x0($s2) /* E25AE0 802B6C10 3C030100 */ lui $v1, (0x1000000 >> 16) /* E25AE4 802B6C14 00431025 */ or $v0, $v0, $v1 /* E25AE8 802B6C18 AE420000 */ sw $v0, 0x0($s2) /* E25AEC 802B6C1C 3C02802B */ lui $v0, %hi(HammerHit) /* E25AF0 802B6C20 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) /* E25AF4 802B6C24 8C420010 */ lw $v0, 0x10($v0) /* E25AF8 802B6C28 0441000B */ bgez $v0, .L802B6C58 /* E25AFC 802B6C2C 00000000 */ nop glabel .L802B6C30 /* E25B00 802B6C30 3C028011 */ lui $v0, %hi(gPlayerData + 0x1) /* E25B04 802B6C34 8042F291 */ lb $v0, %lo(gPlayerData + 0x1)($v0) /* E25B08 802B6C38 28420002 */ slti $v0, $v0, 0x2 /* E25B0C 802B6C3C 14400006 */ bnez $v0, .L802B6C58 /* E25B10 802B6C40 24030001 */ addiu $v1, $zero, 0x1 /* E25B14 802B6C44 3C028016 */ lui $v0, %hi(gCurrentHiddenPanels) /* E25B18 802B6C48 2442A578 */ addiu $v0, $v0, %lo(gCurrentHiddenPanels) /* E25B1C 802B6C4C C640002C */ lwc1 $f0, 0x2C($s2) /* E25B20 802B6C50 A0430000 */ sb $v1, 0x0($v0) /* E25B24 802B6C54 E4400008 */ swc1 $f0, 0x8($v0) .L802B6C58: /* E25B28 802B6C58 824200B6 */ lb $v0, 0xB6($s2) /* E25B2C 802B6C5C 14400009 */ bnez $v0, .L802B6C84 /* E25B30 802B6C60 924300B6 */ lbu $v1, 0xB6($s2) /* E25B34 802B6C64 06000007 */ bltz $s0, .L802B6C84 /* E25B38 802B6C68 00000000 */ nop /* E25B3C 802B6C6C 3C02802B */ lui $v0, %hi(HammerHit) /* E25B40 802B6C70 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) /* E25B44 802B6C74 8C420014 */ lw $v0, 0x14($v0) /* E25B48 802B6C78 14400002 */ bnez $v0, .L802B6C84 .L802B6C7C: /* E25B4C 802B6C7C 24620001 */ addiu $v0, $v1, 0x1 /* E25B50 802B6C80 A24200B6 */ sb $v0, 0xB6($s2) .L802B6C84: /* E25B54 802B6C84 824300B6 */ lb $v1, 0xB6($s2) /* E25B58 802B6C88 24020001 */ addiu $v0, $zero, 0x1 /* E25B5C 802B6C8C 14620004 */ bne $v1, $v0, .L802B6CA0 .L802B6C90: /* E25B60 802B6C90 00000000 */ nop /* E25B64 802B6C94 06010002 */ bgez $s0, .L802B6CA0 /* E25B68 802B6C98 24020002 */ addiu $v0, $zero, 0x2 /* E25B6C 802B6C9C A24200B6 */ sb $v0, 0xB6($s2) .L802B6CA0: /* E25B70 802B6CA0 3C05802B */ lui $a1, %hi(HammerHit) /* E25B74 802B6CA4 24A56DB0 */ addiu $a1, $a1, %lo(HammerHit) /* E25B78 802B6CA8 8CA30000 */ lw $v1, 0x0($a1) /* E25B7C 802B6CAC 8C620018 */ lw $v0, 0x18($v1) /* E25B80 802B6CB0 24420001 */ addiu $v0, $v0, 0x1 /* E25B84 802B6CB4 06000003 */ bltz $s0, .L802B6CC4 /* E25B88 802B6CB8 AC620018 */ sw $v0, 0x18($v1) .L802B6CBC: /* E25B8C 802B6CBC 24020001 */ addiu $v0, $zero, 0x1 /* E25B90 802B6CC0 AC620014 */ sw $v0, 0x14($v1) .L802B6CC4: /* E25B94 802B6CC4 8CA20000 */ lw $v0, 0x0($a1) .L802B6CC8: /* E25B98 802B6CC8 8C430018 */ lw $v1, 0x18($v0) /* E25B9C 802B6CCC 24020006 */ addiu $v0, $zero, 0x6 /* E25BA0 802B6CD0 14620005 */ bne $v1, $v0, .L802B6CE8 /* E25BA4 802B6CD4 3C03FFDF */ lui $v1, (0xFFDFFFFF >> 16) /* E25BA8 802B6CD8 8E420000 */ lw $v0, 0x0($s2) /* E25BAC 802B6CDC 3463FFFF */ ori $v1, $v1, (0xFFDFFFFF & 0xFFFF) /* E25BB0 802B6CE0 00431024 */ and $v0, $v0, $v1 /* E25BB4 802B6CE4 AE420000 */ sw $v0, 0x0($s2) .L802B6CE8: /* E25BB8 802B6CE8 964400BC */ lhu $a0, 0xBC($s2) /* E25BBC 802B6CEC 24020001 */ addiu $v0, $zero, 0x1 glabel func_802B6CF0_E2B3A0 /* E25BC0 802B6CF0 14820020 */ bne $a0, $v0, func_802B6D74 /* E25BC4 802B6CF4 00000000 */ nop .L802B6CF8: /* E25BC8 802B6CF8 8CA30000 */ lw $v1, 0x0($a1) /* E25BCC 802B6CFC 8C620018 */ lw $v0, 0x18($v1) .L802B6D00: /* E25BD0 802B6D00 28420007 */ slti $v0, $v0, 0x7 /* E25BD4 802B6D04 14400005 */ bnez $v0, .L802B6D1C /* E25BD8 802B6D08 00000000 */ nop /* E25BDC 802B6D0C 8E4200E0 */ lw $v0, 0xE0($s2) /* E25BE0 802B6D10 30424000 */ andi $v0, $v0, 0x4000 /* E25BE4 802B6D14 54400001 */ bnel $v0, $zero, .L802B6D1C /* E25BE8 802B6D18 AC64001C */ sw $a0, 0x1C($v1) .L802B6D1C: /* E25BEC 802B6D1C 3C03802B */ lui $v1, %hi(HammerHit) /* E25BF0 802B6D20 8C636DB0 */ lw $v1, %lo(HammerHit)($v1) glabel .L802B6D24 /* E25BF4 802B6D24 8C62001C */ lw $v0, 0x1C($v1) /* E25BF8 802B6D28 14400006 */ bnez $v0, .L802B6D44 /* E25BFC 802B6D2C AC600014 */ sw $zero, 0x14($v1) /* E25C00 802B6D30 8C630018 */ lw $v1, 0x18($v1) /* E25C04 802B6D34 2402000A */ addiu $v0, $zero, 0xA /* E25C08 802B6D38 0043102A */ slt $v0, $v0, $v1 /* E25C0C 802B6D3C 10400009 */ beqz $v0, .L802B6D64 /* E25C10 802B6D40 3C03FFDF */ lui $v1, (0xFFDFFFFF >> 16) .L802B6D44: /* E25C14 802B6D44 3C03FEFF */ lui $v1, (0xFEFFFFFF >> 16) /* E25C18 802B6D48 3463FFFF */ ori $v1, $v1, (0xFEFFFFFF & 0xFFFF) .L802B6D4C: /* E25C1C 802B6D4C 8E420000 */ lw $v0, 0x0($s2) .L802B6D50: /* E25C20 802B6D50 0000202D */ daddu $a0, $zero, $zero /* E25C24 802B6D54 00431024 */ and $v0, $v0, $v1 /* E25C28 802B6D58 0C039769 */ jal set_action_state /* E25C2C 802B6D5C AE420000 */ sw $v0, 0x0($s2) .L802B6D60: /* E25C30 802B6D60 3C03FFDF */ lui $v1, (0xFFDFFFFF >> 16) .L802B6D64: /* E25C34 802B6D64 8E420000 */ lw $v0, 0x0($s2) /* E25C38 802B6D68 3463FFFF */ ori $v1, $v1, (0xFFDFFFFF & 0xFFFF) /* E25C3C 802B6D6C 00431024 */ and $v0, $v0, $v1 /* E25C40 802B6D70 AE420000 */ sw $v0, 0x0($s2) glabel func_802B6D74 /* E25C44 802B6D74 8FBF004C */ lw $ra, 0x4C($sp) /* E25C48 802B6D78 8FB40048 */ lw $s4, 0x48($sp) /* E25C4C 802B6D7C 8FB30044 */ lw $s3, 0x44($sp) /* E25C50 802B6D80 8FB20040 */ lw $s2, 0x40($sp) /* E25C54 802B6D84 8FB1003C */ lw $s1, 0x3C($sp) /* E25C58 802B6D88 8FB00038 */ lw $s0, 0x38($sp) /* E25C5C 802B6D8C D7BC0070 */ ldc1 $f28, 0x70($sp) jtbl_802B6D90: /* E25C60 802B6D90 D7BA0068 */ ldc1 $f26, 0x68($sp) /* E25C64 802B6D94 D7B80060 */ ldc1 $f24, 0x60($sp) /* E25C68 802B6D98 D7B60058 */ ldc1 $f22, 0x58($sp) /* E25C6C 802B6D9C D7B40050 */ ldc1 $f20, 0x50($sp) /* E25C70 802B6DA0 03E00008 */ jr $ra .L802B6DA4: /* E25C74 802B6DA4 27BD0078 */ addiu $sp, $sp, 0x78 /* E25C78 802B6DA8 00000000 */ nop /* E25C7C 802B6DAC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_802B6820_E256F0(void) { PlayerStatus* playerStatus = &gPlayerStatus; CollisionStatus* collisionStatus; f32 yaw; f32 angle; f32 outSinTheta; f32 outCosTheta; f32 playerX, playerY, playerZ; f32 x, y, z; s32 result; s32 hammerLevel; s32 soundID; u32 unk_BC; s32 ten; s32 ret; s32 i; do { collisionStatus = &gCollisionStatus; } while (0); // required to match; yaw = func_800E5348(); if (action_hammer_is_swinging_away(playerStatus->trueAnimation)) { angle = clamp_angle(yaw + 90.0f - gCameras[gCurrentCameraID].currentYaw); if (angle >= 90.0f && angle < 270.0f) { yaw += -30.0f; } else { yaw += 30.0f; } } sin_cos_rad(DEG_TO_RAD(yaw), &outSinTheta, &outCosTheta); playerX = playerStatus->position.x; playerY = playerStatus->position.y; playerZ = playerStatus->position.z; // check collision allong 16 points in a line away from the player for (i = 1; i < 16; i++) { x = playerX + (outSinTheta * i); y = playerY; z = playerZ - (outCosTheta * i); result = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw); if (HammerHit->unk_14 == 0) { collisionStatus->lastWallHammered = result; if (result >= 0) { if (result & COLLISION_WITH_ENTITY_BIT) { get_entity_by_index(result)->collisionTimer = 0; } } } if (result >= 0) { break; } } if (i >= 16) { yaw = func_800E5348(); if (action_hammer_is_swinging_away(playerStatus->trueAnimation) == 0) { angle = clamp_angle(yaw + 90.0f - gCameras[gCurrentCameraID].currentYaw); if (angle >= 90.0f && angle < 270.0f) { yaw += 15.0f; } else { yaw += -15.0f; } } sin_cos_rad(DEG_TO_RAD(yaw), &outSinTheta, &outCosTheta); for (i = 1; i < 16; i++) { x = playerX + (outSinTheta * i); y = playerY; z = playerZ - (outCosTheta * i); result = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw); if (HammerHit->unk_14 == 0) { collisionStatus->lastWallHammered = result; if (result >= 0) { if (result & COLLISION_WITH_ENTITY_BIT) { get_entity_by_index(result)->collisionTimer = 0; } } } if (result >= 0) { break; } } } if (HammerHit->timer == 2) { hammerLevel = gPlayerData.hammerLevel; if (hammerLevel == 2) { soundID = SOUND_2117; } else if (hammerLevel == 1) { soundID = SOUND_2116; } else { soundID = SOUND_2115; } sfx_play_sound_at_player(soundID, SOUND_SPACE_MODE_0); action_hammer_play_hit_fx(HammerHit->hitID); if (collisionStatus->lastWallHammered >= 0 && (collisionStatus->lastWallHammered & COLLISION_WITH_ENTITY_BIT)) { get_entity_by_index(collisionStatus->lastWallHammered)->collisionTimer = 0; playerStatus->flags |= PS_FLAG_HAMMER_CHECK; } else if (HammerHit->hitID < 0) { playerStatus->flags |= PS_FLAG_HAMMER_CHECK; } if (HammerHit->hitID < 0 && gPlayerData.hammerLevel >= 2) { gCurrentHiddenPanels.tryFlipTrigger = TRUE; gCurrentHiddenPanels.flipTriggerPosY = playerStatus->position.y; } } if (playerStatus->actionSubstate == SUBSTATE_HAMMER_0 && result >= 0 && HammerHit->unk_14 == 0) { playerStatus->actionSubstate++; } if (playerStatus->actionSubstate == SUBSTATE_HAMMER_1 && result < 0) { playerStatus->actionSubstate = SUBSTATE_HAMMER_2; } HammerHit->timer++; if (result >= 0) { HammerHit->unk_14 = 1; } if (HammerHit->timer == 6) { playerStatus->flags &= ~PS_FLAG_NO_FLIPPING; } if (playerStatus->animNotifyValue == 1) { if (HammerHit->timer >= 7 && (playerStatus->pressedButtons & BUTTON_B)) { HammerHit->unk_1C = 1; } HammerHit->unk_14 = 0; ten = 10; // required to match if (HammerHit->unk_1C != 0 || HammerHit->timer > ten) { playerStatus->flags &= ~PS_FLAG_HAMMER_CHECK; set_action_state(ACTION_STATE_IDLE); } playerStatus->flags &= ~PS_FLAG_NO_FLIPPING; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_SuperBlockContent_setupGfx /* 1070EC 802E586C 27BDFF68 */ addiu $sp, $sp, -0x98 /* 1070F0 802E5870 AFB60088 */ sw $s6, 0x88($sp) /* 1070F4 802E5874 3C16800A */ lui $s6, %hi(gMainGfxPos) /* 1070F8 802E5878 8ED6A66C */ lw $s6, %lo(gMainGfxPos)($s6) /* 1070FC 802E587C AFBF0094 */ sw $ra, 0x94($sp) /* 107100 802E5880 AFBE0090 */ sw $fp, 0x90($sp) /* 107104 802E5884 AFB7008C */ sw $s7, 0x8C($sp) /* 107108 802E5888 AFB50084 */ sw $s5, 0x84($sp) /* 10710C 802E588C AFB40080 */ sw $s4, 0x80($sp) /* 107110 802E5890 AFB3007C */ sw $s3, 0x7C($sp) /* 107114 802E5894 AFB20078 */ sw $s2, 0x78($sp) /* 107118 802E5898 AFB10074 */ sw $s1, 0x74($sp) /* 10711C 802E589C 0C04417A */ jal get_entity_by_index /* 107120 802E58A0 AFB00070 */ sw $s0, 0x70($sp) /* 107124 802E58A4 AFA20060 */ sw $v0, 0x60($sp) /* 107128 802E58A8 8C570040 */ lw $s7, 0x40($v0) /* 10712C 802E58AC 92E20008 */ lbu $v0, 0x8($s7) /* 107130 802E58B0 14400011 */ bnez $v0, .L802E58F8 /* 107134 802E58B4 2442FFFF */ addiu $v0, $v0, -0x1 /* 107138 802E58B8 92E30009 */ lbu $v1, 0x9($s7) /* 10713C 802E58BC 3C05802F */ lui $a1, %hi(D_802EA870) /* 107140 802E58C0 24A5A870 */ addiu $a1, $a1, %lo(D_802EA870) /* 107144 802E58C4 24630002 */ addiu $v1, $v1, 0x2 /* 107148 802E58C8 3C02802F */ lui $v0, %hi(D_802EA870) /* 10714C 802E58CC 00431021 */ addu $v0, $v0, $v1 /* 107150 802E58D0 8042A870 */ lb $v0, %lo(D_802EA870)($v0) /* 107154 802E58D4 3C04802F */ lui $a0, %hi(D_802EA870) /* 107158 802E58D8 00832021 */ addu $a0, $a0, $v1 /* 10715C 802E58DC 18400004 */ blez $v0, .L802E58F0 /* 107160 802E58E0 9084A870 */ lbu $a0, %lo(D_802EA870)($a0) /* 107164 802E58E4 A2E40008 */ sb $a0, 0x8($s7) /* 107168 802E58E8 080B963F */ j .L802E58FC /* 10716C 802E58EC A2E30009 */ sb $v1, 0x9($s7) .L802E58F0: /* 107170 802E58F0 90A20000 */ lbu $v0, 0x0($a1) /* 107174 802E58F4 A2E00009 */ sb $zero, 0x9($s7) .L802E58F8: /* 107178 802E58F8 A2E20008 */ sb $v0, 0x8($s7) .L802E58FC: /* 10717C 802E58FC 02C0382D */ daddu $a3, $s6, $zero /* 107180 802E5900 26D60008 */ addiu $s6, $s6, 0x8 /* 107184 802E5904 02E0202D */ daddu $a0, $s7, $zero /* 107188 802E5908 24050001 */ addiu $a1, $zero, 0x1 /* 10718C 802E590C 92E20009 */ lbu $v0, 0x9($s7) /* 107190 802E5910 8FAF0060 */ lw $t7, 0x60($sp) /* 107194 802E5914 8EF5012C */ lw $s5, 0x12C($s7) /* 107198 802E5918 3C01802F */ lui $at, %hi(D_802EA871) /* 10719C 802E591C 00220821 */ addu $at, $at, $v0 /* 1071A0 802E5920 8022A871 */ lb $v0, %lo(D_802EA871)($at) /* 1071A4 802E5924 8DE30044 */ lw $v1, 0x44($t7) /* 1071A8 802E5928 00021080 */ sll $v0, $v0, 2 /* 1071AC 802E592C 3C06802F */ lui $a2, %hi(D_802EA862) /* 1071B0 802E5930 00C23021 */ addu $a2, $a2, $v0 /* 1071B4 802E5934 94C6A862 */ lhu $a2, %lo(D_802EA862)($a2) /* 1071B8 802E5938 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 1071BC 802E593C AFB50058 */ sw $s5, 0x58($sp) /* 1071C0 802E5940 ACE20000 */ sw $v0, 0x0($a3) /* 1071C4 802E5944 ACE00004 */ sw $zero, 0x4($a3) /* 1071C8 802E5948 00661821 */ addu $v1, $v1, $a2 /* 1071CC 802E594C 0C0B959C */ jal entity_SuperBlockContent_get_previous_yaw /* 1071D0 802E5950 AFA3005C */ sw $v1, 0x5C($sp) /* 1071D4 802E5954 44050000 */ mfc1 $a1, $f0 /* 1071D8 802E5958 44800000 */ mtc1 $zero, $f0 /* 1071DC 802E595C 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 1071E0 802E5960 44060000 */ mfc1 $a2, $f0 /* 1071E4 802E5964 27A40018 */ addiu $a0, $sp, 0x18 /* 1071E8 802E5968 0C019EC8 */ jal guRotateF /* 1071EC 802E596C AFA60010 */ sw $a2, 0x10($sp) /* 1071F0 802E5970 27A40018 */ addiu $a0, $sp, 0x18 /* 1071F4 802E5974 26F00010 */ addiu $s0, $s7, 0x10 /* 1071F8 802E5978 0C019D40 */ jal guMtxF2L /* 1071FC 802E597C 0200282D */ daddu $a1, $s0, $zero /* 107200 802E5980 3C040001 */ lui $a0, (0x11630 >> 16) /* 107204 802E5984 34841630 */ ori $a0, $a0, (0x11630 & 0xFFFF) /* 107208 802E5988 26E50050 */ addiu $a1, $s7, 0x50 /* 10720C 802E598C 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 107210 802E5990 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0) /* 107214 802E5994 3C03800A */ lui $v1, %hi(gDisplayContext) /* 107218 802E5998 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 10721C 802E599C 00021180 */ sll $v0, $v0, 6 /* 107220 802E59A0 00621821 */ addu $v1, $v1, $v0 /* 107224 802E59A4 00641821 */ addu $v1, $v1, $a0 .L802E59A8: /* 107228 802E59A8 8E180000 */ lw $t8, 0x0($s0) /* 10722C 802E59AC 8E190004 */ lw $t9, 0x4($s0) /* 107230 802E59B0 8E0F0008 */ lw $t7, 0x8($s0) /* 107234 802E59B4 8E15000C */ lw $s5, 0xC($s0) /* 107238 802E59B8 AC780000 */ sw $t8, 0x0($v1) /* 10723C 802E59BC AC790004 */ sw $t9, 0x4($v1) /* 107240 802E59C0 AC6F0008 */ sw $t7, 0x8($v1) /* 107244 802E59C4 AC75000C */ sw $s5, 0xC($v1) /* 107248 802E59C8 26100010 */ addiu $s0, $s0, 0x10 /* 10724C 802E59CC 1605FFF6 */ bne $s0, $a1, .L802E59A8 /* 107250 802E59D0 24630010 */ addiu $v1, $v1, 0x10 /* 107254 802E59D4 02C0702D */ daddu $t6, $s6, $zero /* 107258 802E59D8 26D60008 */ addiu $s6, $s6, 0x8 /* 10725C 802E59DC 3C180001 */ lui $t8, (0x11630 >> 16) /* 107260 802E59E0 37181630 */ ori $t8, $t8, (0x11630 & 0xFFFF) /* 107264 802E59E4 02C0682D */ daddu $t5, $s6, $zero /* 107268 802E59E8 26D60008 */ addiu $s6, $s6, 0x8 /* 10726C 802E59EC 3C19E200 */ lui $t9, (0xE200001C >> 16) /* 107270 802E59F0 3739001C */ ori $t9, $t9, (0xE200001C & 0xFFFF) /* 107274 802E59F4 3C140055 */ lui $s4, (0x553078 >> 16) /* 107278 802E59F8 36943078 */ ori $s4, $s4, (0x553078 & 0xFFFF) /* 10727C 802E59FC 02C0582D */ daddu $t3, $s6, $zero /* 107280 802E5A00 26D60008 */ addiu $s6, $s6, 0x8 /* 107284 802E5A04 3C12FC12 */ lui $s2, (0xFC121824 >> 16) /* 107288 802E5A08 36521824 */ ori $s2, $s2, (0xFC121824 & 0xFFFF) /* 10728C 802E5A0C 3C10FF33 */ lui $s0, (0xFF33FFFF >> 16) /* 107290 802E5A10 3610FFFF */ ori $s0, $s0, (0xFF33FFFF & 0xFFFF) /* 107294 802E5A14 02C0202D */ daddu $a0, $s6, $zero /* 107298 802E5A18 26D60008 */ addiu $s6, $s6, 0x8 /* 10729C 802E5A1C 02C0282D */ daddu $a1, $s6, $zero /* 1072A0 802E5A20 26D60008 */ addiu $s6, $s6, 0x8 /* 1072A4 802E5A24 02C0402D */ daddu $t0, $s6, $zero /* 1072A8 802E5A28 26D60008 */ addiu $s6, $s6, 0x8 /* 1072AC 802E5A2C 3C0FF500 */ lui $t7, (0xF5000100 >> 16) /* 1072B0 802E5A30 35EF0100 */ ori $t7, $t7, (0xF5000100 & 0xFFFF) /* 1072B4 802E5A34 02C0302D */ daddu $a2, $s6, $zero /* 1072B8 802E5A38 26D60008 */ addiu $s6, $s6, 0x8 /* 1072BC 802E5A3C 02C0482D */ daddu $t1, $s6, $zero /* 1072C0 802E5A40 26D60008 */ addiu $s6, $s6, 0x8 /* 1072C4 802E5A44 3C130703 */ lui $s3, (0x703C000 >> 16) /* 1072C8 802E5A48 3673C000 */ ori $s3, $s3, (0x703C000 & 0xFFFF) /* 1072CC 802E5A4C 02C0382D */ daddu $a3, $s6, $zero /* 1072D0 802E5A50 26D60008 */ addiu $s6, $s6, 0x8 /* 1072D4 802E5A54 02C0502D */ daddu $t2, $s6, $zero /* 1072D8 802E5A58 26D60008 */ addiu $s6, $s6, 0x8 /* 1072DC 802E5A5C 02C0602D */ daddu $t4, $s6, $zero /* 1072E0 802E5A60 3C11D838 */ lui $s1, (0xD8380002 >> 16) /* 1072E4 802E5A64 36310002 */ ori $s1, $s1, (0xD8380002 & 0xFFFF) /* 1072E8 802E5A68 3C1E8007 */ lui $fp, %hi(gMatrixListPos) /* 1072EC 802E5A6C 27DE41F0 */ addiu $fp, $fp, %lo(gMatrixListPos) /* 1072F0 802E5A70 AFB80064 */ sw $t8, 0x64($sp) /* 1072F4 802E5A74 97C20000 */ lhu $v0, 0x0($fp) /* 1072F8 802E5A78 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 1072FC 802E5A7C ADC30000 */ sw $v1, 0x0($t6) /* 107300 802E5A80 24430001 */ addiu $v1, $v0, 0x1 /* 107304 802E5A84 3042FFFF */ andi $v0, $v0, 0xFFFF /* 107308 802E5A88 00021180 */ sll $v0, $v0, 6 /* 10730C 802E5A8C A7C30000 */ sh $v1, 0x0($fp) /* 107310 802E5A90 3C03800A */ lui $v1, %hi(gDisplayContext) /* 107314 802E5A94 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 107318 802E5A98 00581021 */ addu $v0, $v0, $t8 /* 10731C 802E5A9C 00621821 */ addu $v1, $v1, $v0 /* 107320 802E5AA0 3C02FD10 */ lui $v0, (0xFD100000 >> 16) /* 107324 802E5AA4 ADC30004 */ sw $v1, 0x4($t6) /* 107328 802E5AA8 ADB90000 */ sw $t9, 0x0($t5) /* 10732C 802E5AAC ADB40004 */ sw $s4, 0x4($t5) /* 107330 802E5AB0 AD720000 */ sw $s2, 0x0($t3) /* 107334 802E5AB4 AD700004 */ sw $s0, 0x4($t3) /* 107338 802E5AB8 AC820000 */ sw $v0, 0x0($a0) /* 10733C 802E5ABC 8FB5005C */ lw $s5, 0x5C($sp) /* 107340 802E5AC0 3C02E800 */ lui $v0, (0xE8000000 >> 16) /* 107344 802E5AC4 AC950004 */ sw $s5, 0x4($a0) /* 107348 802E5AC8 ACA20000 */ sw $v0, 0x0($a1) /* 10734C 802E5ACC 3C020700 */ lui $v0, (0x7000000 >> 16) /* 107350 802E5AD0 ACA00004 */ sw $zero, 0x4($a1) /* 107354 802E5AD4 AD020004 */ sw $v0, 0x4($t0) /* 107358 802E5AD8 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 10735C 802E5ADC AD0F0000 */ sw $t7, 0x0($t0) /* 107360 802E5AE0 ACC20000 */ sw $v0, 0x0($a2) /* 107364 802E5AE4 3C02F000 */ lui $v0, (0xF0000000 >> 16) /* 107368 802E5AE8 ACC00004 */ sw $zero, 0x4($a2) /* 10736C 802E5AEC 3C06E700 */ lui $a2, (0xE7000000 >> 16) /* 107370 802E5AF0 AD220000 */ sw $v0, 0x0($t1) /* 107374 802E5AF4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 107378 802E5AF8 AD330004 */ sw $s3, 0x4($t1) /* 10737C 802E5AFC ACE60000 */ sw $a2, 0x0($a3) /* 107380 802E5B00 ACE00004 */ sw $zero, 0x4($a3) /* 107384 802E5B04 AD420000 */ sw $v0, 0x0($t2) /* 107388 802E5B08 8FB80058 */ lw $t8, 0x58($sp) /* 10738C 802E5B0C 24020040 */ addiu $v0, $zero, 0x40 /* 107390 802E5B10 AD580004 */ sw $t8, 0x4($t2) /* 107394 802E5B14 AD910000 */ sw $s1, 0x0($t4) /* 107398 802E5B18 AD820004 */ sw $v0, 0x4($t4) /* 10739C 802E5B1C 8FB90060 */ lw $t9, 0x60($sp) /* 1073A0 802E5B20 9323000B */ lbu $v1, 0xB($t9) /* 1073A4 802E5B24 24110078 */ addiu $s1, $zero, 0x78 /* 1073A8 802E5B28 0071102A */ slt $v0, $v1, $s1 /* 1073AC 802E5B2C 10400002 */ beqz $v0, .L802E5B38 /* 1073B0 802E5B30 26D60008 */ addiu $s6, $s6, 0x8 /* 1073B4 802E5B34 0060882D */ daddu $s1, $v1, $zero .L802E5B38: /* 1073B8 802E5B38 02C0102D */ daddu $v0, $s6, $zero /* 1073BC 802E5B3C 26D60008 */ addiu $s6, $s6, 0x8 /* 1073C0 802E5B40 02E0202D */ daddu $a0, $s7, $zero /* 1073C4 802E5B44 24050006 */ addiu $a1, $zero, 0x6 /* 1073C8 802E5B48 AC460000 */ sw $a2, 0x0($v0) /* 1073CC 802E5B4C 0C0B959C */ jal entity_SuperBlockContent_get_previous_yaw /* 1073D0 802E5B50 AC400004 */ sw $zero, 0x4($v0) /* 1073D4 802E5B54 44050000 */ mfc1 $a1, $f0 /* 1073D8 802E5B58 44800000 */ mtc1 $zero, $f0 /* 1073DC 802E5B5C 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 1073E0 802E5B60 44060000 */ mfc1 $a2, $f0 /* 1073E4 802E5B64 27A40018 */ addiu $a0, $sp, 0x18 /* 1073E8 802E5B68 0C019EC8 */ jal guRotateF /* 1073EC 802E5B6C AFA60010 */ sw $a2, 0x10($sp) /* 1073F0 802E5B70 27A40018 */ addiu $a0, $sp, 0x18 /* 1073F4 802E5B74 26F00050 */ addiu $s0, $s7, 0x50 /* 1073F8 802E5B78 0C019D40 */ jal guMtxF2L /* 1073FC 802E5B7C 0200282D */ daddu $a1, $s0, $zero /* 107400 802E5B80 26E40090 */ addiu $a0, $s7, 0x90 /* 107404 802E5B84 97C20000 */ lhu $v0, 0x0($fp) /* 107408 802E5B88 3C03800A */ lui $v1, %hi(gDisplayContext) /* 10740C 802E5B8C 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 107410 802E5B90 8FAF0064 */ lw $t7, 0x64($sp) /* 107414 802E5B94 00021180 */ sll $v0, $v0, 6 /* 107418 802E5B98 00621821 */ addu $v1, $v1, $v0 /* 10741C 802E5B9C 006F1821 */ addu $v1, $v1, $t7 .L802E5BA0: /* 107420 802E5BA0 8E150000 */ lw $s5, 0x0($s0) /* 107424 802E5BA4 8E180004 */ lw $t8, 0x4($s0) /* 107428 802E5BA8 8E190008 */ lw $t9, 0x8($s0) /* 10742C 802E5BAC 8E0F000C */ lw $t7, 0xC($s0) /* 107430 802E5BB0 AC750000 */ sw $s5, 0x0($v1) /* 107434 802E5BB4 AC780004 */ sw $t8, 0x4($v1) /* 107438 802E5BB8 AC790008 */ sw $t9, 0x8($v1) /* 10743C 802E5BBC AC6F000C */ sw $t7, 0xC($v1) /* 107440 802E5BC0 26100010 */ addiu $s0, $s0, 0x10 /* 107444 802E5BC4 1604FFF6 */ bne $s0, $a0, .L802E5BA0 /* 107448 802E5BC8 24630010 */ addiu $v1, $v1, 0x10 /* 10744C 802E5BCC 02C0482D */ daddu $t1, $s6, $zero /* 107450 802E5BD0 26D60008 */ addiu $s6, $s6, 0x8 /* 107454 802E5BD4 3C130001 */ lui $s3, (0x11630 >> 16) /* 107458 802E5BD8 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 10745C 802E5BDC 02C0402D */ daddu $t0, $s6, $zero /* 107460 802E5BE0 26D60008 */ addiu $s6, $s6, 0x8 /* 107464 802E5BE4 3C0EE200 */ lui $t6, (0xE200001C >> 16) /* 107468 802E5BE8 35CE001C */ ori $t6, $t6, (0xE200001C & 0xFFFF) /* 10746C 802E5BEC 3C0D0050 */ lui $t5, (0x504358 >> 16) /* 107470 802E5BF0 35AD4358 */ ori $t5, $t5, (0x504358 & 0xFFFF) /* 107474 802E5BF4 02C0382D */ daddu $a3, $s6, $zero /* 107478 802E5BF8 26D60008 */ addiu $s6, $s6, 0x8 /* 10747C 802E5BFC 3C0CFCFF */ lui $t4, (0xFCFFB3FF >> 16) /* 107480 802E5C00 358CB3FF */ ori $t4, $t4, (0xFCFFB3FF & 0xFFFF) /* 107484 802E5C04 3C0BFF2C */ lui $t3, (0xFF2CFE7F >> 16) /* 107488 802E5C08 356BFE7F */ ori $t3, $t3, (0xFF2CFE7F & 0xFFFF) /* 10748C 802E5C0C 02C0202D */ daddu $a0, $s6, $zero /* 107490 802E5C10 26D60008 */ addiu $s6, $s6, 0x8 /* 107494 802E5C14 02C0282D */ daddu $a1, $s6, $zero /* 107498 802E5C18 26D60008 */ addiu $s6, $s6, 0x8 /* 10749C 802E5C1C 02C0302D */ daddu $a2, $s6, $zero /* 1074A0 802E5C20 3C0AD838 */ lui $t2, (0xD8380002 >> 16) /* 1074A4 802E5C24 354A0002 */ ori $t2, $t2, (0xD8380002 & 0xFFFF) /* 1074A8 802E5C28 3C128007 */ lui $s2, %hi(gMatrixListPos) /* 1074AC 802E5C2C 265241F0 */ addiu $s2, $s2, %lo(gMatrixListPos) /* 1074B0 802E5C30 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 1074B4 802E5C34 96420000 */ lhu $v0, 0x0($s2) /* 1074B8 802E5C38 3C14800A */ lui $s4, %hi(gDisplayContext) /* 1074BC 802E5C3C 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 1074C0 802E5C40 AD230000 */ sw $v1, 0x0($t1) /* 1074C4 802E5C44 24430001 */ addiu $v1, $v0, 0x1 /* 1074C8 802E5C48 3042FFFF */ andi $v0, $v0, 0xFFFF /* 1074CC 802E5C4C 00021180 */ sll $v0, $v0, 6 /* 1074D0 802E5C50 A6430000 */ sh $v1, 0x0($s2) /* 1074D4 802E5C54 8E830000 */ lw $v1, 0x0($s4) /* 1074D8 802E5C58 00531021 */ addu $v0, $v0, $s3 /* 1074DC 802E5C5C 00621821 */ addu $v1, $v1, $v0 /* 1074E0 802E5C60 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 1074E4 802E5C64 AD230004 */ sw $v1, 0x4($t1) /* 1074E8 802E5C68 AD0E0000 */ sw $t6, 0x0($t0) /* 1074EC 802E5C6C AD0D0004 */ sw $t5, 0x4($t0) /* 1074F0 802E5C70 ACEC0000 */ sw $t4, 0x0($a3) /* 1074F4 802E5C74 ACEB0004 */ sw $t3, 0x4($a3) /* 1074F8 802E5C78 AC820000 */ sw $v0, 0x0($a0) /* 1074FC 802E5C7C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 107500 802E5C80 AC910004 */ sw $s1, 0x4($a0) /* 107504 802E5C84 ACA20000 */ sw $v0, 0x0($a1) /* 107508 802E5C88 8FB50058 */ lw $s5, 0x58($sp) /* 10750C 802E5C8C 24020040 */ addiu $v0, $zero, 0x40 /* 107510 802E5C90 ACB50004 */ sw $s5, 0x4($a1) /* 107514 802E5C94 ACCA0000 */ sw $t2, 0x0($a2) /* 107518 802E5C98 ACC20004 */ sw $v0, 0x4($a2) /* 10751C 802E5C9C 8FB80060 */ lw $t8, 0x60($sp) /* 107520 802E5CA0 9303000B */ lbu $v1, 0xB($t8) /* 107524 802E5CA4 24110050 */ addiu $s1, $zero, 0x50 /* 107528 802E5CA8 0071102A */ slt $v0, $v1, $s1 /* 10752C 802E5CAC 10400002 */ beqz $v0, .L802E5CB8 /* 107530 802E5CB0 26D60008 */ addiu $s6, $s6, 0x8 /* 107534 802E5CB4 0060882D */ daddu $s1, $v1, $zero .L802E5CB8: /* 107538 802E5CB8 02C0182D */ daddu $v1, $s6, $zero /* 10753C 802E5CBC 26D60008 */ addiu $s6, $s6, 0x8 /* 107540 802E5CC0 02E0202D */ daddu $a0, $s7, $zero /* 107544 802E5CC4 2405000A */ addiu $a1, $zero, 0xA /* 107548 802E5CC8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 10754C 802E5CCC AC620000 */ sw $v0, 0x0($v1) /* 107550 802E5CD0 0C0B959C */ jal entity_SuperBlockContent_get_previous_yaw /* 107554 802E5CD4 AC600004 */ sw $zero, 0x4($v1) /* 107558 802E5CD8 44050000 */ mfc1 $a1, $f0 /* 10755C 802E5CDC 44800000 */ mtc1 $zero, $f0 /* 107560 802E5CE0 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 107564 802E5CE4 44060000 */ mfc1 $a2, $f0 /* 107568 802E5CE8 27A40018 */ addiu $a0, $sp, 0x18 /* 10756C 802E5CEC 0C019EC8 */ jal guRotateF /* 107570 802E5CF0 AFA60010 */ sw $a2, 0x10($sp) /* 107574 802E5CF4 27A40018 */ addiu $a0, $sp, 0x18 /* 107578 802E5CF8 26F00090 */ addiu $s0, $s7, 0x90 /* 10757C 802E5CFC 0C019D40 */ jal guMtxF2L /* 107580 802E5D00 0200282D */ daddu $a1, $s0, $zero /* 107584 802E5D04 26E400D0 */ addiu $a0, $s7, 0xD0 /* 107588 802E5D08 96420000 */ lhu $v0, 0x0($s2) /* 10758C 802E5D0C 8E830000 */ lw $v1, 0x0($s4) /* 107590 802E5D10 00021180 */ sll $v0, $v0, 6 /* 107594 802E5D14 00621821 */ addu $v1, $v1, $v0 /* 107598 802E5D18 00731821 */ addu $v1, $v1, $s3 .L802E5D1C: /* 10759C 802E5D1C 8E190000 */ lw $t9, 0x0($s0) /* 1075A0 802E5D20 8E0F0004 */ lw $t7, 0x4($s0) /* 1075A4 802E5D24 8E150008 */ lw $s5, 0x8($s0) /* 1075A8 802E5D28 8E18000C */ lw $t8, 0xC($s0) /* 1075AC 802E5D2C AC790000 */ sw $t9, 0x0($v1) /* 1075B0 802E5D30 AC6F0004 */ sw $t7, 0x4($v1) /* 1075B4 802E5D34 AC750008 */ sw $s5, 0x8($v1) /* 1075B8 802E5D38 AC78000C */ sw $t8, 0xC($v1) /* 1075BC 802E5D3C 26100010 */ addiu $s0, $s0, 0x10 /* 1075C0 802E5D40 1604FFF6 */ bne $s0, $a0, .L802E5D1C /* 1075C4 802E5D44 24630010 */ addiu $v1, $v1, 0x10 /* 1075C8 802E5D48 02C0502D */ daddu $t2, $s6, $zero /* 1075CC 802E5D4C 26D60008 */ addiu $s6, $s6, 0x8 /* 1075D0 802E5D50 3C100001 */ lui $s0, (0x11630 >> 16) /* 1075D4 802E5D54 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 1075D8 802E5D58 02C0482D */ daddu $t1, $s6, $zero /* 1075DC 802E5D5C 26D60008 */ addiu $s6, $s6, 0x8 /* 1075E0 802E5D60 3C19E200 */ lui $t9, (0xE200001C >> 16) /* 1075E4 802E5D64 3739001C */ ori $t9, $t9, (0xE200001C & 0xFFFF) /* 1075E8 802E5D68 3C0E0050 */ lui $t6, (0x504358 >> 16) /* 1075EC 802E5D6C 35CE4358 */ ori $t6, $t6, (0x504358 & 0xFFFF) /* 1075F0 802E5D70 02C0402D */ daddu $t0, $s6, $zero /* 1075F4 802E5D74 26D60008 */ addiu $s6, $s6, 0x8 /* 1075F8 802E5D78 3C0DFCFF */ lui $t5, (0xFCFFB3FF >> 16) /* 1075FC 802E5D7C 35ADB3FF */ ori $t5, $t5, (0xFCFFB3FF & 0xFFFF) /* 107600 802E5D80 3C0CFF2C */ lui $t4, (0xFF2CFE7F >> 16) /* 107604 802E5D84 358CFE7F */ ori $t4, $t4, (0xFF2CFE7F & 0xFFFF) /* 107608 802E5D88 02C0282D */ daddu $a1, $s6, $zero /* 10760C 802E5D8C 26D60008 */ addiu $s6, $s6, 0x8 /* 107610 802E5D90 02C0302D */ daddu $a2, $s6, $zero /* 107614 802E5D94 26D60008 */ addiu $s6, $s6, 0x8 /* 107618 802E5D98 02C0382D */ daddu $a3, $s6, $zero /* 10761C 802E5D9C 26D60008 */ addiu $s6, $s6, 0x8 /* 107620 802E5DA0 3C0BD838 */ lui $t3, (0xD8380002 >> 16) /* 107624 802E5DA4 356B0002 */ ori $t3, $t3, (0xD8380002 & 0xFFFF) /* 107628 802E5DA8 3C048007 */ lui $a0, %hi(gMatrixListPos) /* 10762C 802E5DAC 248441F0 */ addiu $a0, $a0, %lo(gMatrixListPos) /* 107630 802E5DB0 94820000 */ lhu $v0, 0x0($a0) /* 107634 802E5DB4 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 107638 802E5DB8 AD430000 */ sw $v1, 0x0($t2) /* 10763C 802E5DBC 3C01800A */ lui $at, %hi(gMainGfxPos) /* 107640 802E5DC0 AC36A66C */ sw $s6, %lo(gMainGfxPos)($at) /* 107644 802E5DC4 24430001 */ addiu $v1, $v0, 0x1 /* 107648 802E5DC8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 10764C 802E5DCC 00021180 */ sll $v0, $v0, 6 /* 107650 802E5DD0 A4830000 */ sh $v1, 0x0($a0) /* 107654 802E5DD4 3C03800A */ lui $v1, %hi(gDisplayContext) /* 107658 802E5DD8 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 10765C 802E5DDC 00501021 */ addu $v0, $v0, $s0 /* 107660 802E5DE0 00621821 */ addu $v1, $v1, $v0 /* 107664 802E5DE4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 107668 802E5DE8 AD430004 */ sw $v1, 0x4($t2) /* 10766C 802E5DEC AD390000 */ sw $t9, 0x0($t1) /* 107670 802E5DF0 AD2E0004 */ sw $t6, 0x4($t1) /* 107674 802E5DF4 AD0D0000 */ sw $t5, 0x0($t0) /* 107678 802E5DF8 AD0C0004 */ sw $t4, 0x4($t0) /* 10767C 802E5DFC ACA20000 */ sw $v0, 0x0($a1) /* 107680 802E5E00 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 107684 802E5E04 ACB10004 */ sw $s1, 0x4($a1) /* 107688 802E5E08 ACC20000 */ sw $v0, 0x0($a2) /* 10768C 802E5E0C 8FAF0058 */ lw $t7, 0x58($sp) /* 107690 802E5E10 24020040 */ addiu $v0, $zero, 0x40 /* 107694 802E5E14 ACCF0004 */ sw $t7, 0x4($a2) /* 107698 802E5E18 ACEB0000 */ sw $t3, 0x0($a3) /* 10769C 802E5E1C ACE20004 */ sw $v0, 0x4($a3) /* 1076A0 802E5E20 8FBF0094 */ lw $ra, 0x94($sp) /* 1076A4 802E5E24 8FBE0090 */ lw $fp, 0x90($sp) /* 1076A8 802E5E28 8FB7008C */ lw $s7, 0x8C($sp) /* 1076AC 802E5E2C 8FB60088 */ lw $s6, 0x88($sp) /* 1076B0 802E5E30 8FB50084 */ lw $s5, 0x84($sp) /* 1076B4 802E5E34 8FB40080 */ lw $s4, 0x80($sp) /* 1076B8 802E5E38 8FB3007C */ lw $s3, 0x7C($sp) /* 1076BC 802E5E3C 8FB20078 */ lw $s2, 0x78($sp) /* 1076C0 802E5E40 8FB10074 */ lw $s1, 0x74($sp) /* 1076C4 802E5E44 8FB00070 */ lw $s0, 0x70($sp) /* 1076C8 802E5E48 03E00008 */ jr $ra /* 1076CC 802E5E4C 27BD0098 */ addiu $sp, $sp, 0x98 ### DECOMPILED C INSTRUCTIONS: void entity_SuperBlockContent_setupGfx(s32 entityIndex) { Gfx* gfxPos = gMainGfxPos; Gfx* dlist; u8* palette; Entity* entity = get_entity_by_index(entityIndex); SuperBlockContentData* data = entity->dataBuf.superBlockContent; s32 alpha; Matrix4f sp18; if (data->paletteTimer == 0) { s32 temp = data->paletteArrOffset; temp += 2; if (Entity_SuperBlock_PalData[temp] > 0) { data->paletteTimer = Entity_SuperBlock_PalData[temp]; data->paletteArrOffset = temp; } else { data->paletteTimer = Entity_SuperBlock_PalData[0]; data->paletteArrOffset = 0; } } else { data->paletteTimer--; } palette = ENTITY_ADDR(entity, u8*, Entity_SuperBlock_Palettes[Entity_SuperBlock_PalData[data->paletteArrOffset + 1]]); dlist = data->gfx2; gDPPipeSync(gfxPos++); guRotateF(sp18, entity_SuperBlockContent_get_previous_yaw(data, 1), 0.0f, 1.0f, 0.0f); guMtxF2L(sp18, &data->unk_10); gDisplayContext->matrixStack[gMatrixListPos] = data->unk_10; gSPMatrix(gfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetRenderMode(gfxPos++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2); gDPSetCombineMode(gfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA); gDPLoadTLUT_pal16(gfxPos++, 0, palette); gSPDisplayList(gfxPos++, dlist); gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW); alpha = 120; if (entity->alpha < alpha) { alpha = entity->alpha; } gDPPipeSync(gfxPos++); guRotateF(sp18, entity_SuperBlockContent_get_previous_yaw(data, 6), 0.0f, 1.0f, 0.0f); guMtxF2L(sp18, &data->unk_50); gDisplayContext->matrixStack[gMatrixListPos] = data->unk_50; gSPMatrix(gfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetRenderMode(gfxPos++, AA_EN | Z_CMP | 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 | Z_CMP | 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)); gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02); gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, alpha); gSPDisplayList(gfxPos++, dlist); gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW); alpha = 80; if (entity->alpha < alpha) { alpha = entity->alpha; } gDPPipeSync(gfxPos++); guRotateF(sp18, entity_SuperBlockContent_get_previous_yaw(data, 10), 0.0f, 1.0f, 0.0f); guMtxF2L(sp18, &data->unk_90); gDisplayContext->matrixStack[gMatrixListPos] = data->unk_90; gSPMatrix(gfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetRenderMode(gfxPos++, AA_EN | Z_CMP | 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 | Z_CMP | 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)); gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02); gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, alpha); gSPDisplayList(gfxPos++, dlist); gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW); gMainGfxPos = gfxPos; }
### RAW ASSEMBLY INSTRUCTIONS: glabel FlyToGoal /* 1A9F04 8027B624 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 1A9F08 8027B628 AFB20020 */ sw $s2, 0x20($sp) /* 1A9F0C 8027B62C 0080902D */ daddu $s2, $a0, $zero /* 1A9F10 8027B630 AFBF0024 */ sw $ra, 0x24($sp) /* 1A9F14 8027B634 AFB1001C */ sw $s1, 0x1C($sp) /* 1A9F18 8027B638 AFB00018 */ sw $s0, 0x18($sp) /* 1A9F1C 8027B63C F7B40028 */ sdc1 $f20, 0x28($sp) /* 1A9F20 8027B640 10A0006C */ beqz $a1, .L8027B7F4 /* 1A9F24 8027B644 8E51000C */ lw $s1, 0xC($s2) /* 1A9F28 8027B648 8E250000 */ lw $a1, 0x0($s1) /* 1A9F2C 8027B64C 0C0B1EAF */ jal evt_get_variable /* 1A9F30 8027B650 26310004 */ addiu $s1, $s1, 0x4 /* 1A9F34 8027B654 0040202D */ daddu $a0, $v0, $zero /* 1A9F38 8027B658 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A9F3C 8027B65C 14820002 */ bne $a0, $v0, .L8027B668 /* 1A9F40 8027B660 00000000 */ nop /* 1A9F44 8027B664 8E440148 */ lw $a0, 0x148($s2) .L8027B668: /* 1A9F48 8027B668 0C09A75B */ jal get_actor /* 1A9F4C 8027B66C 00000000 */ nop /* 1A9F50 8027B670 0040802D */ daddu $s0, $v0, $zero /* 1A9F54 8027B674 AE500074 */ sw $s0, 0x74($s2) /* 1A9F58 8027B678 8E250000 */ lw $a1, 0x0($s1) /* 1A9F5C 8027B67C 26310004 */ addiu $s1, $s1, 0x4 /* 1A9F60 8027B680 0C0B1EAF */ jal evt_get_variable /* 1A9F64 8027B684 0240202D */ daddu $a0, $s2, $zero /* 1A9F68 8027B688 A6020070 */ sh $v0, 0x70($s0) /* 1A9F6C 8027B68C 8E250000 */ lw $a1, 0x0($s1) /* 1A9F70 8027B690 26310004 */ addiu $s1, $s1, 0x4 /* 1A9F74 8027B694 0C0B1EAF */ jal evt_get_variable /* 1A9F78 8027B698 0240202D */ daddu $a0, $s2, $zero /* 1A9F7C 8027B69C A6020072 */ sh $v0, 0x72($s0) /* 1A9F80 8027B6A0 8E250000 */ lw $a1, 0x0($s1) /* 1A9F84 8027B6A4 0C0B1EAF */ jal evt_get_variable /* 1A9F88 8027B6A8 0240202D */ daddu $a0, $s2, $zero /* 1A9F8C 8027B6AC AE42007C */ sw $v0, 0x7C($s2) /* 1A9F90 8027B6B0 AE000078 */ sw $zero, 0x78($s0) /* 1A9F94 8027B6B4 8E43007C */ lw $v1, 0x7C($s2) /* 1A9F98 8027B6B8 28620064 */ slti $v0, $v1, 0x64 /* 1A9F9C 8027B6BC 14400005 */ bnez $v0, .L8027B6D4 /* 1A9FA0 8027B6C0 2611000C */ addiu $s1, $s0, 0xC /* 1A9FA4 8027B6C4 2462FF9C */ addiu $v0, $v1, -0x64 /* 1A9FA8 8027B6C8 AE42007C */ sw $v0, 0x7C($s2) /* 1A9FAC 8027B6CC 24020001 */ addiu $v0, $zero, 0x1 /* 1A9FB0 8027B6D0 AE020078 */ sw $v0, 0x78($s0) .L8027B6D4: /* 1A9FB4 8027B6D4 C6000018 */ lwc1 $f0, 0x18($s0) /* 1A9FB8 8027B6D8 C6060144 */ lwc1 $f6, 0x144($s0) /* 1A9FBC 8027B6DC 46003081 */ sub.s $f2, $f6, $f0 /* 1A9FC0 8027B6E0 46021202 */ mul.s $f8, $f2, $f2 /* 1A9FC4 8027B6E4 00000000 */ nop /* 1A9FC8 8027B6E8 C6040148 */ lwc1 $f4, 0x148($s0) /* 1A9FCC 8027B6EC C600001C */ lwc1 $f0, 0x1C($s0) /* 1A9FD0 8027B6F0 46002081 */ sub.s $f2, $f4, $f0 /* 1A9FD4 8027B6F4 46021282 */ mul.s $f10, $f2, $f2 /* 1A9FD8 8027B6F8 00000000 */ nop /* 1A9FDC 8027B6FC C6000020 */ lwc1 $f0, 0x20($s0) /* 1A9FE0 8027B700 C602014C */ lwc1 $f2, 0x14C($s0) /* 1A9FE4 8027B704 46001001 */ sub.s $f0, $f2, $f0 /* 1A9FE8 8027B708 46000002 */ mul.s $f0, $f0, $f0 /* 1A9FEC 8027B70C 00000000 */ nop /* 1A9FF0 8027B710 E606000C */ swc1 $f6, 0xC($s0) /* 1A9FF4 8027B714 E6060024 */ swc1 $f6, 0x24($s0) /* 1A9FF8 8027B718 460A4200 */ add.s $f8, $f8, $f10 /* 1A9FFC 8027B71C E6040010 */ swc1 $f4, 0x10($s0) /* 1AA000 8027B720 E6040028 */ swc1 $f4, 0x28($s0) /* 1AA004 8027B724 46004300 */ add.s $f12, $f8, $f0 /* 1AA008 8027B728 E6020014 */ swc1 $f2, 0x14($s0) /* 1AA00C 8027B72C E602002C */ swc1 $f2, 0x2C($s0) /* 1AA010 8027B730 46006084 */ sqrt.s $f2, $f12 /* 1AA014 8027B734 46021032 */ c.eq.s $f2, $f2 /* 1AA018 8027B738 00000000 */ nop /* 1AA01C 8027B73C 45010004 */ bc1t .L8027B750 /* 1AA020 8027B740 00000000 */ nop /* 1AA024 8027B744 0C0187BC */ jal sqrtf /* 1AA028 8027B748 00000000 */ nop /* 1AA02C 8027B74C 46000086 */ mov.s $f2, $f0 .L8027B750: /* 1AA030 8027B750 86020070 */ lh $v0, 0x70($s0) /* 1AA034 8027B754 14400007 */ bnez $v0, .L8027B774 /* 1AA038 8027B758 E6020058 */ swc1 $f2, 0x58($s0) /* 1AA03C 8027B75C C600004C */ lwc1 $f0, 0x4C($s0) /* 1AA040 8027B760 46001003 */ div.s $f0, $f2, $f0 /* 1AA044 8027B764 4600038D */ trunc.w.s $f14, $f0 /* 1AA048 8027B768 44027000 */ mfc1 $v0, $f14 /* 1AA04C 8027B76C 0809EDE2 */ j .L8027B788 /* 1AA050 8027B770 A6020070 */ sh $v0, 0x70($s0) .L8027B774: /* 1AA054 8027B774 44820000 */ mtc1 $v0, $f0 /* 1AA058 8027B778 00000000 */ nop /* 1AA05C 8027B77C 46800020 */ cvt.s.w $f0, $f0 /* 1AA060 8027B780 46001003 */ div.s $f0, $f2, $f0 /* 1AA064 8027B784 E600004C */ swc1 $f0, 0x4C($s0) .L8027B788: /* 1AA068 8027B788 86220064 */ lh $v0, 0x64($s1) /* 1AA06C 8027B78C 54400003 */ bnel $v0, $zero, .L8027B79C /* 1AA070 8027B790 AE200050 */ sw $zero, 0x50($s1) .L8027B794: /* 1AA074 8027B794 0809EEE7 */ j .L8027BB9C /* 1AA078 8027B798 24020002 */ addiu $v0, $zero, 0x2 .L8027B79C: /* 1AA07C 8027B79C AE200048 */ sw $zero, 0x48($s1) /* 1AA080 8027B7A0 860201B6 */ lh $v0, 0x1B6($s0) /* 1AA084 8027B7A4 04420002 */ bltzl $v0, .L8027B7B0 /* 1AA088 8027B7A8 00021027 */ nor $v0, $zero, $v0 /* 1AA08C 8027B7AC 24420001 */ addiu $v0, $v0, 0x1 .L8027B7B0: /* 1AA090 8027B7B0 44820000 */ mtc1 $v0, $f0 /* 1AA094 8027B7B4 00000000 */ nop /* 1AA098 8027B7B8 46800020 */ cvt.s.w $f0, $f0 /* 1AA09C 8027B7BC E6200044 */ swc1 $f0, 0x44($s1) /* 1AA0A0 8027B7C0 8E0201A4 */ lw $v0, 0x1A4($s0) /* 1AA0A4 8027B7C4 1040000B */ beqz $v0, .L8027B7F4 /* 1AA0A8 8027B7C8 00000000 */ nop /* 1AA0AC 8027B7CC 8E0201A8 */ lw $v0, 0x1A8($s0) /* 1AA0B0 8027B7D0 14400008 */ bnez $v0, .L8027B7F4 /* 1AA0B4 8027B7D4 00000000 */ nop /* 1AA0B8 8027B7D8 C600014C */ lwc1 $f0, 0x14C($s0) /* 1AA0BC 8027B7DC E7A00010 */ swc1 $f0, 0x10($sp) /* 1AA0C0 8027B7E0 8E0401A4 */ lw $a0, 0x1A4($s0) /* 1AA0C4 8027B7E4 8E060144 */ lw $a2, 0x144($s0) /* 1AA0C8 8027B7E8 8E070148 */ lw $a3, 0x148($s0) /* 1AA0CC 8027B7EC 0C052757 */ jal sfx_play_sound_at_position /* 1AA0D0 8027B7F0 0000282D */ daddu $a1, $zero, $zero .L8027B7F4: /* 1AA0D4 8027B7F4 8E500074 */ lw $s0, 0x74($s2) /* 1AA0D8 8027B7F8 86020070 */ lh $v0, 0x70($s0) /* 1AA0DC 8027B7FC C600005C */ lwc1 $f0, 0x5C($s0) /* 1AA0E0 8027B800 AFA20010 */ sw $v0, 0x10($sp) /* 1AA0E4 8027B804 8E44007C */ lw $a0, 0x7C($s2) /* 1AA0E8 8027B808 8E050024 */ lw $a1, 0x24($s0) /* 1AA0EC 8027B80C 8E060018 */ lw $a2, 0x18($s0) /* 1AA0F0 8027B810 4600038D */ trunc.w.s $f14, $f0 /* 1AA0F4 8027B814 44077000 */ mfc1 $a3, $f14 /* 1AA0F8 8027B818 0C09EC37 */ jal update_lerp_battle /* 1AA0FC 8027B81C 2611000C */ addiu $s1, $s0, 0xC /* 1AA100 8027B820 C602005C */ lwc1 $f2, 0x5C($s0) /* 1AA104 8027B824 86020070 */ lh $v0, 0x70($s0) /* 1AA108 8027B828 E600000C */ swc1 $f0, 0xC($s0) /* 1AA10C 8027B82C AFA20010 */ sw $v0, 0x10($sp) /* 1AA110 8027B830 8E44007C */ lw $a0, 0x7C($s2) /* 1AA114 8027B834 8E050028 */ lw $a1, 0x28($s0) /* 1AA118 8027B838 8E06001C */ lw $a2, 0x1C($s0) /* 1AA11C 8027B83C 4600138D */ trunc.w.s $f14, $f2 /* 1AA120 8027B840 44077000 */ mfc1 $a3, $f14 /* 1AA124 8027B844 0C09EC37 */ jal update_lerp_battle /* 1AA128 8027B848 00000000 */ nop /* 1AA12C 8027B84C C602005C */ lwc1 $f2, 0x5C($s0) /* 1AA130 8027B850 86020070 */ lh $v0, 0x70($s0) /* 1AA134 8027B854 E6000010 */ swc1 $f0, 0x10($s0) /* 1AA138 8027B858 AFA20010 */ sw $v0, 0x10($sp) /* 1AA13C 8027B85C 8E44007C */ lw $a0, 0x7C($s2) /* 1AA140 8027B860 8E05002C */ lw $a1, 0x2C($s0) /* 1AA144 8027B864 8E060020 */ lw $a2, 0x20($s0) /* 1AA148 8027B868 4600138D */ trunc.w.s $f14, $f2 /* 1AA14C 8027B86C 44077000 */ mfc1 $a3, $f14 /* 1AA150 8027B870 0C09EC37 */ jal update_lerp_battle /* 1AA154 8027B874 00000000 */ nop /* 1AA158 8027B878 8E020078 */ lw $v0, 0x78($s0) /* 1AA15C 8027B87C 10400012 */ beqz $v0, .L8027B8C8 /* 1AA160 8027B880 E6000014 */ swc1 $f0, 0x14($s0) /* 1AA164 8027B884 C6000010 */ lwc1 $f0, 0x10($s0) /* 1AA168 8027B888 44801000 */ mtc1 $zero, $f2 /* 1AA16C 8027B88C 00000000 */ nop /* 1AA170 8027B890 4602003C */ c.lt.s $f0, $f2 /* 1AA174 8027B894 00000000 */ nop /* 1AA178 8027B898 4500000B */ bc1f .L8027B8C8 /* 1AA17C 8027B89C 00000000 */ nop /* 1AA180 8027B8A0 86020070 */ lh $v0, 0x70($s0) /* 1AA184 8027B8A4 E602001C */ swc1 $f2, 0x1C($s0) /* 1AA188 8027B8A8 C602000C */ lwc1 $f2, 0xC($s0) /* 1AA18C 8027B8AC C6040014 */ lwc1 $f4, 0x14($s0) /* 1AA190 8027B8B0 44820000 */ mtc1 $v0, $f0 /* 1AA194 8027B8B4 00000000 */ nop /* 1AA198 8027B8B8 46800020 */ cvt.s.w $f0, $f0 /* 1AA19C 8027B8BC E600005C */ swc1 $f0, 0x5C($s0) /* 1AA1A0 8027B8C0 E6020018 */ swc1 $f2, 0x18($s0) /* 1AA1A4 8027B8C4 E6040020 */ swc1 $f4, 0x20($s0) .L8027B8C8: /* 1AA1A8 8027B8C8 C6200050 */ lwc1 $f0, 0x50($s1) /* 1AA1AC 8027B8CC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1AA1B0 8027B8D0 44812000 */ mtc1 $at, $f4 /* 1AA1B4 8027B8D4 86220064 */ lh $v0, 0x64($s1) /* 1AA1B8 8027B8D8 46040000 */ add.s $f0, $f0, $f4 /* 1AA1BC 8027B8DC 44821000 */ mtc1 $v0, $f2 /* 1AA1C0 8027B8E0 00000000 */ nop /* 1AA1C4 8027B8E4 468010A0 */ cvt.s.w $f2, $f2 /* 1AA1C8 8027B8E8 4600103C */ c.lt.s $f2, $f0 /* 1AA1CC 8027B8EC 00000000 */ nop /* 1AA1D0 8027B8F0 45000010 */ bc1f .L8027B934 /* 1AA1D4 8027B8F4 E6200050 */ swc1 $f0, 0x50($s1) /* 1AA1D8 8027B8F8 C620000C */ lwc1 $f0, 0xC($s1) /* 1AA1DC 8027B8FC 8E0401A4 */ lw $a0, 0x1A4($s0) /* 1AA1E0 8027B900 E6000144 */ swc1 $f0, 0x144($s0) /* 1AA1E4 8027B904 C6200010 */ lwc1 $f0, 0x10($s1) /* 1AA1E8 8027B908 E6000148 */ swc1 $f0, 0x148($s0) /* 1AA1EC 8027B90C C6200014 */ lwc1 $f0, 0x14($s1) /* 1AA1F0 8027B910 1080FFA0 */ beqz $a0, .L8027B794 /* 1AA1F4 8027B914 E600014C */ swc1 $f0, 0x14C($s0) /* 1AA1F8 8027B918 8E0201A8 */ lw $v0, 0x1A8($s0) /* 1AA1FC 8027B91C 1440009F */ bnez $v0, .L8027BB9C /* 1AA200 8027B920 24020002 */ addiu $v0, $zero, 0x2 /* 1AA204 8027B924 0C0154F0 */ jal snd_stop_sound /* 1AA208 8027B928 00000000 */ nop /* 1AA20C 8027B92C 0809EEE7 */ j .L8027BB9C /* 1AA210 8027B930 24020002 */ addiu $v0, $zero, 0x2 .L8027B934: /* 1AA214 8027B934 8E0201A4 */ lw $v0, 0x1A4($s0) /* 1AA218 8027B938 10400047 */ beqz $v0, .L8027BA58 /* 1AA21C 8027B93C 00000000 */ nop /* 1AA220 8027B940 8E0201A8 */ lw $v0, 0x1A8($s0) /* 1AA224 8027B944 10400044 */ beqz $v0, .L8027BA58 /* 1AA228 8027B948 00000000 */ nop /* 1AA22C 8027B94C 860201B6 */ lh $v0, 0x1B6($s0) /* 1AA230 8027B950 0440001C */ bltz $v0, .L8027B9C4 /* 1AA234 8027B954 00000000 */ nop /* 1AA238 8027B958 C6220044 */ lwc1 $f2, 0x44($s1) /* 1AA23C 8027B95C C6200040 */ lwc1 $f0, 0x40($s1) /* 1AA240 8027B960 46001080 */ add.s $f2, $f2, $f0 /* 1AA244 8027B964 E6220044 */ swc1 $f2, 0x44($s1) /* 1AA248 8027B968 860201B6 */ lh $v0, 0x1B6($s0) /* 1AA24C 8027B96C 44820000 */ mtc1 $v0, $f0 /* 1AA250 8027B970 00000000 */ nop /* 1AA254 8027B974 46800020 */ cvt.s.w $f0, $f0 /* 1AA258 8027B978 4602003C */ c.lt.s $f0, $f2 /* 1AA25C 8027B97C 00000000 */ nop /* 1AA260 8027B980 45000035 */ bc1f .L8027BA58 /* 1AA264 8027B984 00000000 */ nop /* 1AA268 8027B988 92020135 */ lbu $v0, 0x135($s0) /* 1AA26C 8027B98C 24420001 */ addiu $v0, $v0, 0x1 /* 1AA270 8027B990 A2020135 */ sb $v0, 0x135($s0) /* 1AA274 8027B994 AE200044 */ sw $zero, 0x44($s1) /* 1AA278 8027B998 92020135 */ lbu $v0, 0x135($s0) /* 1AA27C 8027B99C 30420001 */ andi $v0, $v0, 0x1 /* 1AA280 8027B9A0 10400023 */ beqz $v0, .L8027BA30 /* 1AA284 8027B9A4 00000000 */ nop /* 1AA288 8027B9A8 8E0201A4 */ lw $v0, 0x1A4($s0) /* 1AA28C 8027B9AC 1040002A */ beqz $v0, .L8027BA58 /* 1AA290 8027B9B0 00000000 */ nop /* 1AA294 8027B9B4 C600014C */ lwc1 $f0, 0x14C($s0) /* 1AA298 8027B9B8 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AA29C 8027B9BC 0809EE92 */ j .L8027BA48 /* 1AA2A0 8027B9C0 8E0401A4 */ lw $a0, 0x1A4($s0) .L8027B9C4: /* 1AA2A4 8027B9C4 C6200044 */ lwc1 $f0, 0x44($s1) /* 1AA2A8 8027B9C8 46040000 */ add.s $f0, $f0, $f4 /* 1AA2AC 8027B9CC E6200044 */ swc1 $f0, 0x44($s1) /* 1AA2B0 8027B9D0 860201B6 */ lh $v0, 0x1B6($s0) /* 1AA2B4 8027B9D4 00021023 */ negu $v0, $v0 /* 1AA2B8 8027B9D8 44821000 */ mtc1 $v0, $f2 /* 1AA2BC 8027B9DC 00000000 */ nop /* 1AA2C0 8027B9E0 468010A0 */ cvt.s.w $f2, $f2 /* 1AA2C4 8027B9E4 4600103E */ c.le.s $f2, $f0 /* 1AA2C8 8027B9E8 00000000 */ nop /* 1AA2CC 8027B9EC 4500001A */ bc1f .L8027BA58 /* 1AA2D0 8027B9F0 00000000 */ nop /* 1AA2D4 8027B9F4 92020135 */ lbu $v0, 0x135($s0) /* 1AA2D8 8027B9F8 24420001 */ addiu $v0, $v0, 0x1 /* 1AA2DC 8027B9FC A2020135 */ sb $v0, 0x135($s0) /* 1AA2E0 8027BA00 AE200044 */ sw $zero, 0x44($s1) /* 1AA2E4 8027BA04 92020135 */ lbu $v0, 0x135($s0) /* 1AA2E8 8027BA08 30420001 */ andi $v0, $v0, 0x1 /* 1AA2EC 8027BA0C 10400008 */ beqz $v0, .L8027BA30 /* 1AA2F0 8027BA10 00000000 */ nop /* 1AA2F4 8027BA14 8E0201A4 */ lw $v0, 0x1A4($s0) /* 1AA2F8 8027BA18 1040000F */ beqz $v0, .L8027BA58 /* 1AA2FC 8027BA1C 00000000 */ nop /* 1AA300 8027BA20 C600014C */ lwc1 $f0, 0x14C($s0) /* 1AA304 8027BA24 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AA308 8027BA28 0809EE92 */ j .L8027BA48 /* 1AA30C 8027BA2C 8E0401A4 */ lw $a0, 0x1A4($s0) .L8027BA30: /* 1AA310 8027BA30 8E0201A8 */ lw $v0, 0x1A8($s0) /* 1AA314 8027BA34 10400008 */ beqz $v0, .L8027BA58 /* 1AA318 8027BA38 00000000 */ nop /* 1AA31C 8027BA3C C600014C */ lwc1 $f0, 0x14C($s0) /* 1AA320 8027BA40 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AA324 8027BA44 8E0401A8 */ lw $a0, 0x1A8($s0) .L8027BA48: /* 1AA328 8027BA48 8E060144 */ lw $a2, 0x144($s0) /* 1AA32C 8027BA4C 8E070148 */ lw $a3, 0x148($s0) /* 1AA330 8027BA50 0C052757 */ jal sfx_play_sound_at_position /* 1AA334 8027BA54 0000282D */ daddu $a1, $zero, $zero .L8027BA58: /* 1AA338 8027BA58 C622000C */ lwc1 $f2, 0xC($s1) /* 1AA33C 8027BA5C C6200000 */ lwc1 $f0, 0x0($s1) /* 1AA340 8027BA60 46001081 */ sub.s $f2, $f2, $f0 /* 1AA344 8027BA64 46021102 */ mul.s $f4, $f2, $f2 /* 1AA348 8027BA68 00000000 */ nop /* 1AA34C 8027BA6C C6200004 */ lwc1 $f0, 0x4($s1) /* 1AA350 8027BA70 C6220010 */ lwc1 $f2, 0x10($s1) /* 1AA354 8027BA74 46001081 */ sub.s $f2, $f2, $f0 /* 1AA358 8027BA78 46021182 */ mul.s $f6, $f2, $f2 /* 1AA35C 8027BA7C 00000000 */ nop /* 1AA360 8027BA80 C6200008 */ lwc1 $f0, 0x8($s1) /* 1AA364 8027BA84 C6220014 */ lwc1 $f2, 0x14($s1) /* 1AA368 8027BA88 46001001 */ sub.s $f0, $f2, $f0 /* 1AA36C 8027BA8C 46000002 */ mul.s $f0, $f0, $f0 /* 1AA370 8027BA90 00000000 */ nop /* 1AA374 8027BA94 46062100 */ add.s $f4, $f4, $f6 /* 1AA378 8027BA98 46002300 */ add.s $f12, $f4, $f0 /* 1AA37C 8027BA9C 46006004 */ sqrt.s $f0, $f12 /* 1AA380 8027BAA0 46000032 */ c.eq.s $f0, $f0 /* 1AA384 8027BAA4 00000000 */ nop /* 1AA388 8027BAA8 45010003 */ bc1t .L8027BAB8 /* 1AA38C 8027BAAC 00000000 */ nop /* 1AA390 8027BAB0 0C0187BC */ jal sqrtf /* 1AA394 8027BAB4 00000000 */ nop .L8027BAB8: /* 1AA398 8027BAB8 4480A000 */ mtc1 $zero, $f20 /* 1AA39C 8027BABC 46000086 */ mov.s $f2, $f0 /* 1AA3A0 8027BAC0 46141032 */ c.eq.s $f2, $f20 /* 1AA3A4 8027BAC4 00000000 */ nop /* 1AA3A8 8027BAC8 45000003 */ bc1f .L8027BAD8 /* 1AA3AC 8027BACC 00000000 */ nop /* 1AA3B0 8027BAD0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1AA3B4 8027BAD4 44811000 */ mtc1 $at, $f2 .L8027BAD8: /* 1AA3B8 8027BAD8 C620004C */ lwc1 $f0, 0x4C($s1) /* 1AA3BC 8027BADC 46140032 */ c.eq.s $f0, $f20 /* 1AA3C0 8027BAE0 00000000 */ nop /* 1AA3C4 8027BAE4 45000006 */ bc1f .L8027BB00 /* 1AA3C8 8027BAE8 00000000 */ nop /* 1AA3CC 8027BAEC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1AA3D0 8027BAF0 44810000 */ mtc1 $at, $f0 /* 1AA3D4 8027BAF4 00000000 */ nop /* 1AA3D8 8027BAF8 E620004C */ swc1 $f0, 0x4C($s1) /* 1AA3DC 8027BAFC C620004C */ lwc1 $f0, 0x4C($s1) .L8027BB00: /* 1AA3E0 8027BB00 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 1AA3E4 8027BB04 44816800 */ mtc1 $at, $f13 /* 1AA3E8 8027BB08 44806000 */ mtc1 $zero, $f12 /* 1AA3EC 8027BB0C 46001003 */ div.s $f0, $f2, $f0 /* 1AA3F0 8027BB10 46000021 */ cvt.d.s $f0, $f0 /* 1AA3F4 8027BB14 46206301 */ sub.d $f12, $f12, $f0 /* 1AA3F8 8027BB18 3C01802A */ lui $at, %hi(D_8029DA10) /* 1AA3FC 8027BB1C D420DA10 */ ldc1 $f0, %lo(D_8029DA10)($at) /* 1AA400 8027BB20 46206302 */ mul.d $f12, $f12, $f0 /* 1AA404 8027BB24 00000000 */ nop /* 1AA408 8027BB28 0C00A8BB */ jal sin_deg /* 1AA40C 8027BB2C 46206320 */ cvt.s.d $f12, $f12 /* 1AA410 8027BB30 86230066 */ lh $v1, 0x66($s1) /* 1AA414 8027BB34 14600002 */ bnez $v1, .L8027BB40 /* 1AA418 8027BB38 46000106 */ mov.s $f4, $f0 /* 1AA41C 8027BB3C 4600A106 */ mov.s $f4, $f20 .L8027BB40: /* 1AA420 8027BB40 04610007 */ bgez $v1, .L8027BB60 /* 1AA424 8027BB44 00031023 */ negu $v0, $v1 /* 1AA428 8027BB48 44821000 */ mtc1 $v0, $f2 /* 1AA42C 8027BB4C 00000000 */ nop /* 1AA430 8027BB50 468010A0 */ cvt.s.w $f2, $f2 /* 1AA434 8027BB54 46002007 */ neg.s $f0, $f4 /* 1AA438 8027BB58 46020102 */ mul.s $f4, $f0, $f2 /* 1AA43C 8027BB5C 00000000 */ nop .L8027BB60: /* 1AA440 8027BB60 18600006 */ blez $v1, .L8027BB7C /* 1AA444 8027BB64 00000000 */ nop /* 1AA448 8027BB68 44830000 */ mtc1 $v1, $f0 /* 1AA44C 8027BB6C 00000000 */ nop /* 1AA450 8027BB70 46800020 */ cvt.s.w $f0, $f0 /* 1AA454 8027BB74 46002102 */ mul.s $f4, $f4, $f0 /* 1AA458 8027BB78 00000000 */ nop .L8027BB7C: /* 1AA45C 8027BB7C C6200000 */ lwc1 $f0, 0x0($s1) /* 1AA460 8027BB80 E6000144 */ swc1 $f0, 0x144($s0) /* 1AA464 8027BB84 C6200004 */ lwc1 $f0, 0x4($s1) /* 1AA468 8027BB88 46040000 */ add.s $f0, $f0, $f4 /* 1AA46C 8027BB8C E6000148 */ swc1 $f0, 0x148($s0) /* 1AA470 8027BB90 C6200008 */ lwc1 $f0, 0x8($s1) /* 1AA474 8027BB94 0000102D */ daddu $v0, $zero, $zero /* 1AA478 8027BB98 E600014C */ swc1 $f0, 0x14C($s0) .L8027BB9C: /* 1AA47C 8027BB9C 8FBF0024 */ lw $ra, 0x24($sp) /* 1AA480 8027BBA0 8FB20020 */ lw $s2, 0x20($sp) /* 1AA484 8027BBA4 8FB1001C */ lw $s1, 0x1C($sp) /* 1AA488 8027BBA8 8FB00018 */ lw $s0, 0x18($sp) /* 1AA48C 8027BBAC D7B40028 */ ldc1 $f20, 0x28($sp) /* 1AA490 8027BBB0 03E00008 */ jr $ra /* 1AA494 8027BBB4 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorState* actorState; s32 actorID; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; f32 deltaX, deltaY, deltaZ; f32 dist3D; f32 offsetY; if (isInitialCall) { actorID = evt_get_variable(script, *args++); if (actorID == ACTOR_SELF) { actorID = script->owner1.enemyID; } script->functionTempPtr[1] = actor = get_actor(actorID); actorState = &actor->state; actorState->moveTime = evt_get_variable(script, *args++); actorState->moveArcAmplitude = evt_get_variable(script, *args++); script->functionTemp[3] = evt_get_variable(script, *args++); actorState->functionTemp[0] = FALSE; if (script->functionTemp[3] >= 100) { script->functionTemp[3] -= 100; actorState->functionTemp[0] = TRUE; } goalX = actorState->goalPos.x; goalY = actorState->goalPos.y; goalZ = actorState->goalPos.z; posX = actor->currentPos.x; posY = actor->currentPos.y; posZ = actor->currentPos.z; deltaX = posX - goalX; deltaY = posY - goalY; deltaZ = posZ - goalZ; actorState->currentPos.x = posX; actorState->unk_18.x = posX; actorState->currentPos.y = posY; actorState->unk_18.y = posY; actorState->currentPos.z = posZ; actorState->unk_18.z = posZ; actorState->distance = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ)); if (actorState->moveTime == 0) { actorState->moveTime = actorState->distance / actorState->speed; } else { actorState->speed = actorState->distance / actorState->moveTime; } if (actorState->moveTime == 0) { return ApiStatus_DONE2; } actorState->bounceDivisor = 0.0f; actorState->angle = 0.0f; if (actor->actorTypeData1b[1] >= 0) { actorState->velocity = actor->actorTypeData1b[1] + 1; } else { actorState->velocity = ~actor->actorTypeData1b[1]; } if ((actor->actorTypeData1[2] != 0) && (actor->actorTypeData1[3] == 0)) { sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } actor = script->functionTempPtr[1]; actorState = &actor->state; actorState->currentPos.x = update_lerp_battle(script->functionTemp[3], actorState->unk_18.x, actorState->goalPos.x, actorState->bounceDivisor, actorState->moveTime); actorState->currentPos.y = update_lerp_battle(script->functionTemp[3], actorState->unk_18.y, actorState->goalPos.y, actorState->bounceDivisor, actorState->moveTime); actorState->currentPos.z = update_lerp_battle(script->functionTemp[3], actorState->unk_18.z, actorState->goalPos.z, actorState->bounceDivisor, actorState->moveTime); if ((actorState->functionTemp[0]) && (actorState->currentPos.y < 0.0f)) { actorState->bounceDivisor = actorState->moveTime; actorState->goalPos.x = actorState->currentPos.x; actorState->goalPos.y = 0.0f; actorState->goalPos.z = actorState->currentPos.z; } actorState->bounceDivisor += 1.0f; if (actorState->moveTime < actorState->bounceDivisor) { actor->currentPos.x = actorState->goalPos.x; actor->currentPos.y = actorState->goalPos.y; actor->currentPos.z = actorState->goalPos.z; if (actor->actorTypeData1[2] != 0) { if (actor->actorTypeData1[3] == 0) { snd_stop_sound(actor->actorTypeData1[2]); } } return ApiStatus_DONE2; } if ((actor->actorTypeData1[2] != 0) && (actor->actorTypeData1[3] != 0)) { if (actor->actorTypeData1b[1] >= 0) { actorState->velocity += actorState->speed; if (actor->actorTypeData1b[1] < actorState->velocity) { actor->footStepCounter++; actorState->velocity = 0.0f; if (actor->footStepCounter & 1) { if (actor->actorTypeData1[2] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } else { if (actor->actorTypeData1[3] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } } } else { actorState->velocity += 1.0f; if (-actor->actorTypeData1b[1] <= actorState->velocity) { actor->footStepCounter++; actorState->velocity = 0.0f; if (actor->footStepCounter & 1) { if (actor->actorTypeData1[2] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } else { if (actor->actorTypeData1[3] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } } } } deltaX = actorState->goalPos.x - actorState->currentPos.x; deltaY = actorState->goalPos.y - actorState->currentPos.y; deltaZ = actorState->goalPos.z - actorState->currentPos.z; dist3D = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ)); if (dist3D == 0.0f) { dist3D = 1.0f; } if (actorState->distance == 0.0f) { actorState->distance = 1.0f; } offsetY = sin_deg((1.0 - (dist3D / actorState->distance)) * 180.0); if (actorState->moveArcAmplitude == 0) { offsetY = 0.0f; } if (actorState->moveArcAmplitude < 0) { offsetY = -offsetY * -actorState->moveArcAmplitude; } if (actorState->moveArcAmplitude > 0) { offsetY = offsetY * actorState->moveArcAmplitude; } actor->currentPos.x = actorState->currentPos.x; actor->currentPos.y = actorState->currentPos.y + offsetY; actor->currentPos.z = actorState->currentPos.z; return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel evt_handle_print_debug_var /* EB7CC 802C6E1C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* EB7D0 802C6E20 0080382D */ daddu $a3, $a0, $zero /* EB7D4 802C6E24 AFBF0024 */ sw $ra, 0x24($sp) /* EB7D8 802C6E28 AFB20020 */ sw $s2, 0x20($sp) /* EB7DC 802C6E2C AFB1001C */ sw $s1, 0x1C($sp) /* EB7E0 802C6E30 AFB00018 */ sw $s0, 0x18($sp) /* EB7E4 802C6E34 8CE2000C */ lw $v0, 0xC($a3) /* EB7E8 802C6E38 8C500000 */ lw $s0, 0x0($v0) /* EB7EC 802C6E3C 3C11EFE8 */ lui $s1, (0xEFE82080 >> 16) /* EB7F0 802C6E40 36312080 */ ori $s1, $s1, (0xEFE82080 & 0xFFFF) /* EB7F4 802C6E44 0230102A */ slt $v0, $s1, $s0 /* EB7F8 802C6E48 14400007 */ bnez $v0, .L802C6E68 /* EB7FC 802C6E4C 3C12F2E3 */ lui $s2, (0xF2E31100 >> 16) /* EB800 802C6E50 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB804 802C6E54 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB808 802C6E58 3C05802E */ lui $a1, %hi(D_802D9D98) /* EB80C 802C6E5C 24A59D98 */ addiu $a1, $a1, %lo(D_802D9D98) /* EB810 802C6E60 080B1CDE */ j .L802C7378 /* EB814 802C6E64 0200302D */ daddu $a2, $s0, $zero .L802C6E68: /* EB818 802C6E68 36521100 */ ori $s2, $s2, (0xF2E31100 & 0xFFFF) /* EB81C 802C6E6C 0250102A */ slt $v0, $s2, $s0 /* EB820 802C6E70 1440000D */ bnez $v0, .L802C6EA8 /* EB824 802C6E74 3C02F414 */ lui $v0, (0xF4143E00 >> 16) /* EB828 802C6E78 0C0B1248 */ jal evt_fixed_var_to_float /* EB82C 802C6E7C 0200202D */ daddu $a0, $s0, $zero /* EB830 802C6E80 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB834 802C6E84 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB838 802C6E88 460000A1 */ cvt.d.s $f2, $f0 /* EB83C 802C6E8C 44071000 */ mfc1 $a3, $f2 /* EB840 802C6E90 44061800 */ mfc1 $a2, $f3 /* EB844 802C6E94 3C05802E */ lui $a1, %hi(D_802D9DA8) /* EB848 802C6E98 0C01953C */ jal sprintf /* EB84C 802C6E9C 24A59DA8 */ addiu $a1, $a1, %lo(D_802D9DA8) /* EB850 802C6EA0 080B1CE0 */ j .L802C7380 /* EB854 802C6EA4 00000000 */ nop .L802C6EA8: /* EB858 802C6EA8 34423E00 */ ori $v0, $v0, (0xF4143E00 & 0xFFFF) /* EB85C 802C6EAC 0050102A */ slt $v0, $v0, $s0 /* EB860 802C6EB0 14400016 */ bnez $v0, .L802C6F0C /* EB864 802C6EB4 3C02F545 */ lui $v0, (0xF5456B00 >> 16) /* EB868 802C6EB8 3C020C84 */ lui $v0, (0xC845880 >> 16) /* EB86C 802C6EBC 34425880 */ ori $v0, $v0, (0xC845880 & 0xFFFF) /* EB870 802C6EC0 02028021 */ addu $s0, $s0, $v0 /* EB874 802C6EC4 06010002 */ bgez $s0, .L802C6ED0 /* EB878 802C6EC8 0200182D */ daddu $v1, $s0, $zero /* EB87C 802C6ECC 2603001F */ addiu $v1, $s0, 0x1F .L802C6ED0: /* EB880 802C6ED0 00034143 */ sra $t0, $v1, 5 /* EB884 802C6ED4 0100182D */ daddu $v1, $t0, $zero /* EB888 802C6ED8 00031140 */ sll $v0, $v1, 5 /* EB88C 802C6EDC 02024023 */ subu $t0, $s0, $v0 /* EB890 802C6EE0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB894 802C6EE4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB898 802C6EE8 3C05802E */ lui $a1, %hi(D_802D9DBC) /* EB89C 802C6EEC 24A59DBC */ addiu $a1, $a1, %lo(D_802D9DBC) /* EB8A0 802C6EF0 0200302D */ daddu $a2, $s0, $zero /* EB8A4 802C6EF4 00031880 */ sll $v1, $v1, 2 /* EB8A8 802C6EF8 8CE20140 */ lw $v0, 0x140($a3) /* EB8AC 802C6EFC 00621821 */ addu $v1, $v1, $v0 /* EB8B0 802C6F00 8C620000 */ lw $v0, 0x0($v1) /* EB8B4 802C6F04 080B1C7F */ j .L802C71FC /* EB8B8 802C6F08 24070001 */ addiu $a3, $zero, 0x1 .L802C6F0C: /* EB8BC 802C6F0C 34426B00 */ ori $v0, $v0, (0xF5456B00 & 0xFFFF) /* EB8C0 802C6F10 0050102A */ slt $v0, $v0, $s0 /* EB8C4 802C6F14 14400021 */ bnez $v0, .L802C6F9C /* EB8C8 802C6F18 3C02F676 */ lui $v0, (0xF6769800 >> 16) /* EB8CC 802C6F1C 3C020B53 */ lui $v0, (0xB532B80 >> 16) /* EB8D0 802C6F20 34422B80 */ ori $v0, $v0, (0xB532B80 & 0xFFFF) /* EB8D4 802C6F24 02028021 */ addu $s0, $s0, $v0 /* EB8D8 802C6F28 8CE3013C */ lw $v1, 0x13C($a3) /* EB8DC 802C6F2C 00101080 */ sll $v0, $s0, 2 /* EB8E0 802C6F30 00431021 */ addu $v0, $v0, $v1 /* EB8E4 802C6F34 8C470000 */ lw $a3, 0x0($v0) /* EB8E8 802C6F38 0227102A */ slt $v0, $s1, $a3 /* EB8EC 802C6F3C 14400007 */ bnez $v0, .L802C6F5C /* EB8F0 802C6F40 0247102A */ slt $v0, $s2, $a3 /* EB8F4 802C6F44 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB8F8 802C6F48 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB8FC 802C6F4C 3C05802E */ lui $a1, %hi(D_802D9DCC) /* EB900 802C6F50 24A59DCC */ addiu $a1, $a1, %lo(D_802D9DCC) /* EB904 802C6F54 080B1CDE */ j .L802C7378 /* EB908 802C6F58 00E0302D */ daddu $a2, $a3, $zero .L802C6F5C: /* EB90C 802C6F5C 1440000A */ bnez $v0, .L802C6F88 /* EB910 802C6F60 00000000 */ nop /* EB914 802C6F64 0C0B1248 */ jal evt_fixed_var_to_float /* EB918 802C6F68 00E0202D */ daddu $a0, $a3, $zero /* EB91C 802C6F6C 46000021 */ cvt.d.s $f0, $f0 /* EB920 802C6F70 F7A00010 */ sdc1 $f0, 0x10($sp) /* EB924 802C6F74 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB928 802C6F78 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB92C 802C6F7C 3C05802E */ lui $a1, %hi(D_802D9DDC) /* EB930 802C6F80 080B1CCE */ j .L802C7338 /* EB934 802C6F84 24A59DDC */ addiu $a1, $a1, %lo(D_802D9DDC) .L802C6F88: /* EB938 802C6F88 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB93C 802C6F8C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB940 802C6F90 3C05802E */ lui $a1, %hi(D_802D9DF0) /* EB944 802C6F94 080B1CD6 */ j .L802C7358 /* EB948 802C6F98 24A59DF0 */ addiu $a1, $a1, %lo(D_802D9DF0) .L802C6F9C: /* EB94C 802C6F9C 34429800 */ ori $v0, $v0, (0xF6769800 & 0xFFFF) /* EB950 802C6FA0 0050102A */ slt $v0, $v0, $s0 /* EB954 802C6FA4 14400020 */ bnez $v0, .L802C7028 /* EB958 802C6FA8 3C02F7A7 */ lui $v0, (0xF7A7C500 >> 16) /* EB95C 802C6FAC 3C020A21 */ lui $v0, (0xA21FE80 >> 16) /* EB960 802C6FB0 3442FE80 */ ori $v0, $v0, (0xA21FE80 & 0xFFFF) /* EB964 802C6FB4 02028021 */ addu $s0, $s0, $v0 /* EB968 802C6FB8 0C05154E */ jal get_global_byte /* EB96C 802C6FBC 0200202D */ daddu $a0, $s0, $zero /* EB970 802C6FC0 0040382D */ daddu $a3, $v0, $zero /* EB974 802C6FC4 0227102A */ slt $v0, $s1, $a3 /* EB978 802C6FC8 14400007 */ bnez $v0, .L802C6FE8 /* EB97C 802C6FCC 0247102A */ slt $v0, $s2, $a3 /* EB980 802C6FD0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB984 802C6FD4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB988 802C6FD8 3C05802E */ lui $a1, %hi(D_802D9E00) /* EB98C 802C6FDC 24A59E00 */ addiu $a1, $a1, %lo(D_802D9E00) /* EB990 802C6FE0 080B1CDE */ j .L802C7378 /* EB994 802C6FE4 00E0302D */ daddu $a2, $a3, $zero .L802C6FE8: /* EB998 802C6FE8 1440000A */ bnez $v0, .L802C7014 /* EB99C 802C6FEC 00000000 */ nop /* EB9A0 802C6FF0 0C0B1248 */ jal evt_fixed_var_to_float /* EB9A4 802C6FF4 00E0202D */ daddu $a0, $a3, $zero /* EB9A8 802C6FF8 46000021 */ cvt.d.s $f0, $f0 /* EB9AC 802C6FFC F7A00010 */ sdc1 $f0, 0x10($sp) /* EB9B0 802C7000 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB9B4 802C7004 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB9B8 802C7008 3C05802E */ lui $a1, %hi(D_802D9E10) /* EB9BC 802C700C 080B1CCE */ j .L802C7338 /* EB9C0 802C7010 24A59E10 */ addiu $a1, $a1, %lo(D_802D9E10) .L802C7014: /* EB9C4 802C7014 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EB9C8 802C7018 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EB9CC 802C701C 3C05802E */ lui $a1, %hi(D_802D9E24) /* EB9D0 802C7020 080B1CD6 */ j .L802C7358 /* EB9D4 802C7024 24A59E24 */ addiu $a1, $a1, %lo(D_802D9E24) .L802C7028: /* EB9D8 802C7028 3442C500 */ ori $v0, $v0, (0xF7A7C500 & 0xFFFF) /* EB9DC 802C702C 0050102A */ slt $v0, $v0, $s0 /* EB9E0 802C7030 14400020 */ bnez $v0, .L802C70B4 /* EB9E4 802C7034 3C02F8D8 */ lui $v0, (0xF8D8F200 >> 16) /* EB9E8 802C7038 3C0208F0 */ lui $v0, (0x8F0D180 >> 16) /* EB9EC 802C703C 3442D180 */ ori $v0, $v0, (0x8F0D180 & 0xFFFF) /* EB9F0 802C7040 02028021 */ addu $s0, $s0, $v0 /* EB9F4 802C7044 0C051594 */ jal get_area_byte /* EB9F8 802C7048 0200202D */ daddu $a0, $s0, $zero /* EB9FC 802C704C 0040382D */ daddu $a3, $v0, $zero /* EBA00 802C7050 0227102A */ slt $v0, $s1, $a3 /* EBA04 802C7054 14400007 */ bnez $v0, .L802C7074 /* EBA08 802C7058 0247102A */ slt $v0, $s2, $a3 /* EBA0C 802C705C 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBA10 802C7060 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBA14 802C7064 3C05802E */ lui $a1, %hi(D_802D9E34) /* EBA18 802C7068 24A59E34 */ addiu $a1, $a1, %lo(D_802D9E34) /* EBA1C 802C706C 080B1CDE */ j .L802C7378 /* EBA20 802C7070 00E0302D */ daddu $a2, $a3, $zero .L802C7074: /* EBA24 802C7074 1440000A */ bnez $v0, .L802C70A0 /* EBA28 802C7078 00000000 */ nop /* EBA2C 802C707C 0C0B1248 */ jal evt_fixed_var_to_float /* EBA30 802C7080 00E0202D */ daddu $a0, $a3, $zero /* EBA34 802C7084 46000021 */ cvt.d.s $f0, $f0 /* EBA38 802C7088 F7A00010 */ sdc1 $f0, 0x10($sp) /* EBA3C 802C708C 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBA40 802C7090 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBA44 802C7094 3C05802E */ lui $a1, %hi(D_802D9E44) /* EBA48 802C7098 080B1CCE */ j .L802C7338 /* EBA4C 802C709C 24A59E44 */ addiu $a1, $a1, %lo(D_802D9E44) .L802C70A0: /* EBA50 802C70A0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBA54 802C70A4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBA58 802C70A8 3C05802E */ lui $a1, %hi(D_802D9E58) /* EBA5C 802C70AC 080B1CD6 */ j .L802C7358 /* EBA60 802C70B0 24A59E58 */ addiu $a1, $a1, %lo(D_802D9E58) .L802C70B4: /* EBA64 802C70B4 3442F200 */ ori $v0, $v0, (0xF8D8F200 & 0xFFFF) /* EBA68 802C70B8 0050102A */ slt $v0, $v0, $s0 /* EBA6C 802C70BC 1440000C */ bnez $v0, .L802C70F0 /* EBA70 802C70C0 3C02FA0A */ lui $v0, (0xFA0A1F00 >> 16) /* EBA74 802C70C4 3C0207BF */ lui $v0, (0x7BFA480 >> 16) /* EBA78 802C70C8 3442A480 */ ori $v0, $v0, (0x7BFA480 & 0xFFFF) /* EBA7C 802C70CC 02028021 */ addu $s0, $s0, $v0 /* EBA80 802C70D0 0C05152F */ jal get_global_flag /* EBA84 802C70D4 0200202D */ daddu $a0, $s0, $zero /* EBA88 802C70D8 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBA8C 802C70DC 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBA90 802C70E0 3C05802E */ lui $a1, %hi(D_802D9E68) /* EBA94 802C70E4 24A59E68 */ addiu $a1, $a1, %lo(D_802D9E68) /* EBA98 802C70E8 080B1C4A */ j .L802C7128 /* EBA9C 802C70EC 0200302D */ daddu $a2, $s0, $zero .L802C70F0: /* EBAA0 802C70F0 34421F00 */ ori $v0, $v0, (0xFA0A1F00 & 0xFFFF) /* EBAA4 802C70F4 0050102A */ slt $v0, $v0, $s0 /* EBAA8 802C70F8 1440000F */ bnez $v0, .L802C7138 /* EBAAC 802C70FC 3C02FB3B */ lui $v0, (0xFB3B4C00 >> 16) /* EBAB0 802C7100 3C02068E */ lui $v0, (0x68E7780 >> 16) /* EBAB4 802C7104 34427780 */ ori $v0, $v0, (0x68E7780 & 0xFFFF) /* EBAB8 802C7108 02028021 */ addu $s0, $s0, $v0 /* EBABC 802C710C 0C05157C */ jal get_area_flag /* EBAC0 802C7110 0200202D */ daddu $a0, $s0, $zero /* EBAC4 802C7114 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBAC8 802C7118 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBACC 802C711C 3C05802E */ lui $a1, %hi(D_802D9E78) /* EBAD0 802C7120 24A59E78 */ addiu $a1, $a1, %lo(D_802D9E78) /* EBAD4 802C7124 0200302D */ daddu $a2, $s0, $zero .L802C7128: /* EBAD8 802C7128 0C01953C */ jal sprintf /* EBADC 802C712C 0040382D */ daddu $a3, $v0, $zero /* EBAE0 802C7130 080B1CE0 */ j .L802C7380 /* EBAE4 802C7134 00000000 */ nop .L802C7138: /* EBAE8 802C7138 34424C00 */ ori $v0, $v0, (0xFB3B4C00 & 0xFFFF) /* EBAEC 802C713C 0050102A */ slt $v0, $v0, $s0 /* EBAF0 802C7140 14400017 */ bnez $v0, .L802C71A0 /* EBAF4 802C7144 3C02FC6C */ lui $v0, (0xFC6C7900 >> 16) /* EBAF8 802C7148 3C02055D */ lui $v0, (0x55D4A80 >> 16) /* EBAFC 802C714C 34424A80 */ ori $v0, $v0, (0x55D4A80 & 0xFFFF) /* EBB00 802C7150 02028021 */ addu $s0, $s0, $v0 /* EBB04 802C7154 06010002 */ bgez $s0, .L802C7160 /* EBB08 802C7158 0200182D */ daddu $v1, $s0, $zero /* EBB0C 802C715C 2603001F */ addiu $v1, $s0, 0x1F .L802C7160: /* EBB10 802C7160 00034143 */ sra $t0, $v1, 5 /* EBB14 802C7164 0100182D */ daddu $v1, $t0, $zero /* EBB18 802C7168 00031140 */ sll $v0, $v1, 5 /* EBB1C 802C716C 02024023 */ subu $t0, $s0, $v0 /* EBB20 802C7170 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBB24 802C7174 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBB28 802C7178 3C05802E */ lui $a1, %hi(D_802D9E88) /* EBB2C 802C717C 24A59E88 */ addiu $a1, $a1, %lo(D_802D9E88) /* EBB30 802C7180 0200302D */ daddu $a2, $s0, $zero /* EBB34 802C7184 00031880 */ sll $v1, $v1, 2 /* EBB38 802C7188 3C02802E */ lui $v0, %hi(gMapFlags) /* EBB3C 802C718C 8C42A480 */ lw $v0, %lo(gMapFlags)($v0) /* EBB40 802C7190 00621821 */ addu $v1, $v1, $v0 /* EBB44 802C7194 8C620000 */ lw $v0, 0x0($v1) /* EBB48 802C7198 080B1C7F */ j .L802C71FC /* EBB4C 802C719C 24070001 */ addiu $a3, $zero, 0x1 .L802C71A0: /* EBB50 802C71A0 34427900 */ ori $v0, $v0, (0xFC6C7900 & 0xFFFF) /* EBB54 802C71A4 0050102A */ slt $v0, $v0, $s0 /* EBB58 802C71A8 14400019 */ bnez $v0, .L802C7210 /* EBB5C 802C71AC 3C02FD9D */ lui $v0, (0xFD9DA600 >> 16) /* EBB60 802C71B0 3C02042C */ lui $v0, (0x42C1D80 >> 16) /* EBB64 802C71B4 34421D80 */ ori $v0, $v0, (0x42C1D80 & 0xFFFF) /* EBB68 802C71B8 02028021 */ addu $s0, $s0, $v0 /* EBB6C 802C71BC 06010002 */ bgez $s0, .L802C71C8 /* EBB70 802C71C0 0200182D */ daddu $v1, $s0, $zero /* EBB74 802C71C4 2603001F */ addiu $v1, $s0, 0x1F .L802C71C8: /* EBB78 802C71C8 00034143 */ sra $t0, $v1, 5 /* EBB7C 802C71CC 0100182D */ daddu $v1, $t0, $zero /* EBB80 802C71D0 00031140 */ sll $v0, $v1, 5 /* EBB84 802C71D4 02024023 */ subu $t0, $s0, $v0 /* EBB88 802C71D8 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBB8C 802C71DC 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBB90 802C71E0 3C05802E */ lui $a1, %hi(D_802D9E98) /* EBB94 802C71E4 24A59E98 */ addiu $a1, $a1, %lo(D_802D9E98) /* EBB98 802C71E8 0200302D */ daddu $a2, $s0, $zero /* EBB9C 802C71EC 00031880 */ sll $v1, $v1, 2 /* EBBA0 802C71F0 00E31821 */ addu $v1, $a3, $v1 /* EBBA4 802C71F4 24070001 */ addiu $a3, $zero, 0x1 /* EBBA8 802C71F8 8C6200C4 */ lw $v0, 0xC4($v1) .L802C71FC: /* EBBAC 802C71FC 01073804 */ sllv $a3, $a3, $t0 /* EBBB0 802C7200 0C01953C */ jal sprintf /* EBBB4 802C7204 00473824 */ and $a3, $v0, $a3 /* EBBB8 802C7208 080B1CE0 */ j .L802C7380 /* EBBBC 802C720C 00000000 */ nop .L802C7210: /* EBBC0 802C7210 3442A600 */ ori $v0, $v0, (0xFD9DA600 & 0xFFFF) /* EBBC4 802C7214 0050102A */ slt $v0, $v0, $s0 /* EBBC8 802C7218 14400026 */ bnez $v0, .L802C72B4 /* EBBCC 802C721C 3C02FECE */ lui $v0, (0xFECED300 >> 16) /* EBBD0 802C7220 3C0202FA */ lui $v0, (0x2FAF080 >> 16) /* EBBD4 802C7224 3442F080 */ ori $v0, $v0, (0x2FAF080 & 0xFFFF) /* EBBD8 802C7228 02028021 */ addu $s0, $s0, $v0 /* EBBDC 802C722C 3C04EFE8 */ lui $a0, (0xEFE82080 >> 16) /* EBBE0 802C7230 3C03802E */ lui $v1, %hi(gMapVars) /* EBBE4 802C7234 8C63A484 */ lw $v1, %lo(gMapVars)($v1) /* EBBE8 802C7238 00101080 */ sll $v0, $s0, 2 /* EBBEC 802C723C 00431021 */ addu $v0, $v0, $v1 /* EBBF0 802C7240 8C470000 */ lw $a3, 0x0($v0) /* EBBF4 802C7244 34842080 */ ori $a0, $a0, (0xEFE82080 & 0xFFFF) /* EBBF8 802C7248 0087202A */ slt $a0, $a0, $a3 /* EBBFC 802C724C 14800007 */ bnez $a0, .L802C726C /* EBC00 802C7250 3C02F2E3 */ lui $v0, (0xF2E31100 >> 16) /* EBC04 802C7254 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBC08 802C7258 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBC0C 802C725C 3C05802E */ lui $a1, %hi(D_802D9EA8) /* EBC10 802C7260 24A59EA8 */ addiu $a1, $a1, %lo(D_802D9EA8) /* EBC14 802C7264 080B1CDE */ j .L802C7378 /* EBC18 802C7268 00E0302D */ daddu $a2, $a3, $zero .L802C726C: /* EBC1C 802C726C 34421100 */ ori $v0, $v0, (0xF2E31100 & 0xFFFF) /* EBC20 802C7270 0047102A */ slt $v0, $v0, $a3 /* EBC24 802C7274 1440000A */ bnez $v0, .L802C72A0 /* EBC28 802C7278 00000000 */ nop /* EBC2C 802C727C 0C0B1248 */ jal evt_fixed_var_to_float /* EBC30 802C7280 00E0202D */ daddu $a0, $a3, $zero /* EBC34 802C7284 46000021 */ cvt.d.s $f0, $f0 /* EBC38 802C7288 F7A00010 */ sdc1 $f0, 0x10($sp) /* EBC3C 802C728C 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBC40 802C7290 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBC44 802C7294 3C05802E */ lui $a1, %hi(D_802D9EB8) /* EBC48 802C7298 080B1CCE */ j .L802C7338 /* EBC4C 802C729C 24A59EB8 */ addiu $a1, $a1, %lo(D_802D9EB8) .L802C72A0: /* EBC50 802C72A0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBC54 802C72A4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBC58 802C72A8 3C05802E */ lui $a1, %hi(D_802D9ECC) /* EBC5C 802C72AC 080B1CD6 */ j .L802C7358 /* EBC60 802C72B0 24A59ECC */ addiu $a1, $a1, %lo(D_802D9ECC) .L802C72B4: /* EBC64 802C72B4 3442D300 */ ori $v0, $v0, (0xFECED300 & 0xFFFF) /* EBC68 802C72B8 0050102A */ slt $v0, $v0, $s0 /* EBC6C 802C72BC 1440002A */ bnez $v0, .L802C7368 /* EBC70 802C72C0 0200302D */ daddu $a2, $s0, $zero /* EBC74 802C72C4 3C0201C9 */ lui $v0, (0x1C9C380 >> 16) /* EBC78 802C72C8 3442C380 */ ori $v0, $v0, (0x1C9C380 & 0xFFFF) /* EBC7C 802C72CC 02028021 */ addu $s0, $s0, $v0 /* EBC80 802C72D0 00101080 */ sll $v0, $s0, 2 /* EBC84 802C72D4 00E21021 */ addu $v0, $a3, $v0 /* EBC88 802C72D8 8C470084 */ lw $a3, 0x84($v0) /* EBC8C 802C72DC 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16) /* EBC90 802C72E0 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF) /* EBC94 802C72E4 0047102A */ slt $v0, $v0, $a3 /* EBC98 802C72E8 14400007 */ bnez $v0, .L802C7308 /* EBC9C 802C72EC 3C02F2E3 */ lui $v0, (0xF2E31100 >> 16) /* EBCA0 802C72F0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBCA4 802C72F4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBCA8 802C72F8 3C05802E */ lui $a1, %hi(D_802D9EDC) /* EBCAC 802C72FC 24A59EDC */ addiu $a1, $a1, %lo(D_802D9EDC) /* EBCB0 802C7300 080B1CDE */ j .L802C7378 /* EBCB4 802C7304 00E0302D */ daddu $a2, $a3, $zero .L802C7308: /* EBCB8 802C7308 34421100 */ ori $v0, $v0, (0xF2E31100 & 0xFFFF) /* EBCBC 802C730C 0047102A */ slt $v0, $v0, $a3 /* EBCC0 802C7310 1440000D */ bnez $v0, .L802C7348 /* EBCC4 802C7314 00000000 */ nop /* EBCC8 802C7318 0C0B1248 */ jal evt_fixed_var_to_float /* EBCCC 802C731C 00E0202D */ daddu $a0, $a3, $zero /* EBCD0 802C7320 46000021 */ cvt.d.s $f0, $f0 /* EBCD4 802C7324 F7A00010 */ sdc1 $f0, 0x10($sp) /* EBCD8 802C7328 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBCDC 802C732C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBCE0 802C7330 3C05802E */ lui $a1, %hi(D_802D9EEC) /* EBCE4 802C7334 24A59EEC */ addiu $a1, $a1, %lo(D_802D9EEC) .L802C7338: /* EBCE8 802C7338 0C01953C */ jal sprintf /* EBCEC 802C733C 0200302D */ daddu $a2, $s0, $zero /* EBCF0 802C7340 080B1CE0 */ j .L802C7380 /* EBCF4 802C7344 00000000 */ nop .L802C7348: /* EBCF8 802C7348 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBCFC 802C734C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBD00 802C7350 3C05802E */ lui $a1, %hi(D_802D9F00) /* EBD04 802C7354 24A59F00 */ addiu $a1, $a1, %lo(D_802D9F00) .L802C7358: /* EBD08 802C7358 0C01953C */ jal sprintf /* EBD0C 802C735C 0200302D */ daddu $a2, $s0, $zero /* EBD10 802C7360 080B1CE0 */ j .L802C7380 /* EBD14 802C7364 00000000 */ nop .L802C7368: /* EBD18 802C7368 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer) /* EBD1C 802C736C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer) /* EBD20 802C7370 3C05802E */ lui $a1, %hi(D_802D9F10) /* EBD24 802C7374 24A59F10 */ addiu $a1, $a1, %lo(D_802D9F10) .L802C7378: /* EBD28 802C7378 0C01953C */ jal sprintf /* EBD2C 802C737C 00000000 */ nop .L802C7380: /* EBD30 802C7380 8FBF0024 */ lw $ra, 0x24($sp) /* EBD34 802C7384 8FB20020 */ lw $s2, 0x20($sp) /* EBD38 802C7388 8FB1001C */ lw $s1, 0x1C($sp) /* EBD3C 802C738C 8FB00018 */ lw $s0, 0x18($sp) /* EBD40 802C7390 24020002 */ addiu $v0, $zero, 0x2 /* EBD44 802C7394 03E00008 */ jr $ra /* EBD48 802C7398 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 evt_handle_print_debug_var(Evt* script) { Bytecode* args = script->ptrReadPos; s32 var = *args++; s32 flagBitPos; do {} while (0); if (var <= EVT_LIMIT) { sprintf(evtDebugPrintBuffer, "ADDR [%08X]", var); } else if (var <= EVT_FIXED_CUTOFF) { sprintf(evtDebugPrintBuffer, "FLOAT [%4.2f]", evt_fixed_var_to_float(var)); } else if (var <= EVT_ARRAY_FLAG_CUTOFF) { var = EVT_INDEX_OF_ARRAY_FLAG(var); flagBitPos = var % 32; sprintf(evtDebugPrintBuffer, "UF(%3d) [%d]", var, script->flagArray[var / 32] & (1 << flagBitPos)); } else if (var <= EVT_ARRAY_VAR_CUTOFF) { s32 arrayVal; var = EVT_INDEX_OF_ARRAY_VAR(var); arrayVal = script->array[var]; if (script->array[var] <= EVT_LIMIT) { sprintf(evtDebugPrintBuffer, "UW(%3d) [%08X]", arrayVal); } else if (arrayVal <= EVT_FIXED_CUTOFF) { sprintf(evtDebugPrintBuffer, "UW(%3d) [%4.2f]", var, evt_fixed_var_to_float(arrayVal)); } else { sprintf(evtDebugPrintBuffer, "UW(%3d) [%d]", var, arrayVal); } } else if (var <= EVT_GAME_BYTE_CUTOFF) { s32 globalByte; var = EVT_INDEX_OF_GAME_BYTE(var); globalByte = get_global_byte(var); if (globalByte <= EVT_LIMIT) { sprintf(evtDebugPrintBuffer, "GSW(%3d) [%08X]", globalByte); } else if (globalByte <= EVT_FIXED_CUTOFF) { sprintf(evtDebugPrintBuffer, "GSW(%3d) [%4.2f]", var, evt_fixed_var_to_float(globalByte)); } else { sprintf(evtDebugPrintBuffer, "GSW(%3d) [%d]", var, globalByte); } } else if (var <= EVT_AREA_BYTE_CUTOFF) { s32 areaByte; var = EVT_INDEX_OF_AREA_BYTE(var); areaByte = get_area_byte(var); if (areaByte <= EVT_LIMIT) { sprintf(evtDebugPrintBuffer, "LSW(%3d) [%08X]", areaByte); } else if (areaByte <= EVT_FIXED_CUTOFF) { sprintf(evtDebugPrintBuffer, "LSW(%3d) [%4.2f]", var, evt_fixed_var_to_float(areaByte)); } else { sprintf(evtDebugPrintBuffer, "LSW(%3d) [%d]", var, areaByte); } } else if (var <= EVT_GAME_FLAG_CUTOFF) { var = EVT_INDEX_OF_GAME_FLAG(var); sprintf(evtDebugPrintBuffer, "GSWF(%3d)[%d]", var, get_global_flag(var)); } else if (var <= EVT_AREA_FLAG_CUTOFF) { var = EVT_INDEX_OF_AREA_FLAG(var); sprintf(evtDebugPrintBuffer, "LSWF(%3d)[%d]", var, get_area_flag(var)); } else if (var <= EVT_MAP_FLAG_CUTOFF) { var = EVT_INDEX_OF_MAP_FLAG(var); flagBitPos = var % 32; sprintf(evtDebugPrintBuffer, "GF(%3d) [%d]", var, gMapFlags[var / 32] & (1 << flagBitPos)); } else if (var <= EVT_LOCAL_FLAG_CUTOFF) { var = EVT_INDEX_OF_LOCAL_FLAG(var); flagBitPos = var % 32; sprintf(evtDebugPrintBuffer, "LF(%3d) [%d]", var, script->varFlags[var / 32] & (1 << flagBitPos)); } else if (var <= EVT_MAP_VAR_CUTOFF) { s32 mapVar; s32 temp; do { var = EVT_INDEX_OF_MAP_VAR(var); mapVar = gMapVars[var]; temp = EVT_LIMIT; } while (0); if (mapVar <= temp) { sprintf(evtDebugPrintBuffer, "GW(%3d) [%08X]", mapVar); } else if (mapVar <= EVT_FIXED_CUTOFF) { sprintf(evtDebugPrintBuffer, "GW(%3d) [%4.2f]", var, evt_fixed_var_to_float(mapVar)); } else { sprintf(evtDebugPrintBuffer, "GW(%3d) [%d]", var, mapVar); } } else if (var <= EVT_LOCAL_VAR_CUTOFF) { s32 tableVar; var = EVT_INDEX_OF_LOCAL_VAR(var); tableVar = script->varTable[var]; do {} while (0); if (tableVar <= EVT_LIMIT) { sprintf(evtDebugPrintBuffer, "LW(%3d) [%08X]", tableVar); } else if (tableVar <= EVT_FIXED_CUTOFF) { sprintf(evtDebugPrintBuffer, "LW(%3d) [%4.2f]", var, evt_fixed_var_to_float(tableVar)); } else { sprintf(evtDebugPrintBuffer, "LW(%3d) [%d]", var, tableVar); } } else { sprintf(evtDebugPrintBuffer, " [%d]", var); } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_models /* AD290 80116B90 27BDFF10 */ addiu $sp, $sp, -0xF0 /* AD294 80116B94 F7BE00E8 */ sdc1 $f30, 0xE8($sp) /* AD298 80116B98 3C013F80 */ lui $at, (0x3F800000 >> 16) /* AD29C 80116B9C 4481F000 */ mtc1 $at, $f30 /* AD2A0 80116BA0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* AD2A4 80116BA4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* AD2A8 80116BA8 3C04800B */ lui $a0, %hi(gCameras) /* AD2AC 80116BAC 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* AD2B0 80116BB0 AFBF00BC */ sw $ra, 0xBC($sp) /* AD2B4 80116BB4 AFB400B8 */ sw $s4, 0xB8($sp) /* AD2B8 80116BB8 AFB300B4 */ sw $s3, 0xB4($sp) /* AD2BC 80116BBC AFB200B0 */ sw $s2, 0xB0($sp) /* AD2C0 80116BC0 AFB100AC */ sw $s1, 0xAC($sp) /* AD2C4 80116BC4 AFB000A8 */ sw $s0, 0xA8($sp) /* AD2C8 80116BC8 F7BC00E0 */ sdc1 $f28, 0xE0($sp) /* AD2CC 80116BCC F7BA00D8 */ sdc1 $f26, 0xD8($sp) /* AD2D0 80116BD0 F7B800D0 */ sdc1 $f24, 0xD0($sp) /* AD2D4 80116BD4 F7B600C8 */ sdc1 $f22, 0xC8($sp) /* AD2D8 80116BD8 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* AD2DC 80116BDC 00031080 */ sll $v0, $v1, 2 /* AD2E0 80116BE0 00431021 */ addu $v0, $v0, $v1 /* AD2E4 80116BE4 00021080 */ sll $v0, $v0, 2 /* AD2E8 80116BE8 00431023 */ subu $v0, $v0, $v1 /* AD2EC 80116BEC 000218C0 */ sll $v1, $v0, 3 /* AD2F0 80116BF0 00431021 */ addu $v0, $v0, $v1 /* AD2F4 80116BF4 000210C0 */ sll $v0, $v0, 3 /* AD2F8 80116BF8 00449021 */ addu $s2, $v0, $a0 /* AD2FC 80116BFC C65800D4 */ lwc1 $f24, 0xD4($s2) /* AD300 80116C00 E7B80048 */ swc1 $f24, 0x48($sp) /* AD304 80116C04 C65A00D8 */ lwc1 $f26, 0xD8($s2) /* AD308 80116C08 E7BA004C */ swc1 $f26, 0x4C($sp) /* AD30C 80116C0C C65800DC */ lwc1 $f24, 0xDC($s2) /* AD310 80116C10 E7B80050 */ swc1 $f24, 0x50($sp) /* AD314 80116C14 C65A00E0 */ lwc1 $f26, 0xE0($s2) /* AD318 80116C18 E7BA0054 */ swc1 $f26, 0x54($sp) /* AD31C 80116C1C C65800E4 */ lwc1 $f24, 0xE4($s2) /* AD320 80116C20 E7B80058 */ swc1 $f24, 0x58($sp) /* AD324 80116C24 C65A00E8 */ lwc1 $f26, 0xE8($s2) /* AD328 80116C28 E7BA005C */ swc1 $f26, 0x5C($sp) /* AD32C 80116C2C C65800EC */ lwc1 $f24, 0xEC($s2) /* AD330 80116C30 E7B80060 */ swc1 $f24, 0x60($sp) /* AD334 80116C34 C65A00F0 */ lwc1 $f26, 0xF0($s2) /* AD338 80116C38 E7BA0064 */ swc1 $f26, 0x64($sp) /* AD33C 80116C3C C65800F4 */ lwc1 $f24, 0xF4($s2) /* AD340 80116C40 E7B80068 */ swc1 $f24, 0x68($sp) /* AD344 80116C44 C65A00F8 */ lwc1 $f26, 0xF8($s2) /* AD348 80116C48 E7BA006C */ swc1 $f26, 0x6C($sp) /* AD34C 80116C4C C65800FC */ lwc1 $f24, 0xFC($s2) /* AD350 80116C50 E7B80070 */ swc1 $f24, 0x70($sp) /* AD354 80116C54 C65A0100 */ lwc1 $f26, 0x100($s2) /* AD358 80116C58 E7BA0074 */ swc1 $f26, 0x74($sp) /* AD35C 80116C5C C6580104 */ lwc1 $f24, 0x104($s2) /* AD360 80116C60 E7B80078 */ swc1 $f24, 0x78($sp) /* AD364 80116C64 C65A0108 */ lwc1 $f26, 0x108($s2) /* AD368 80116C68 27B10028 */ addiu $s1, $sp, 0x28 /* AD36C 80116C6C E7BA007C */ swc1 $f26, 0x7C($sp) /* AD370 80116C70 C658010C */ lwc1 $f24, 0x10C($s2) /* AD374 80116C74 0000982D */ daddu $s3, $zero, $zero /* AD378 80116C78 E7B80080 */ swc1 $f24, 0x80($sp) /* AD37C 80116C7C C65A0110 */ lwc1 $f26, 0x110($s2) /* AD380 80116C80 E7BA0084 */ swc1 $f26, 0x84($sp) .L80116C84: /* AD384 80116C84 3C038015 */ lui $v1, %hi(gCurrentModels) /* AD388 80116C88 8C6312CC */ lw $v1, %lo(gCurrentModels)($v1) /* AD38C 80116C8C 00131080 */ sll $v0, $s3, 2 /* AD390 80116C90 00431021 */ addu $v0, $v0, $v1 /* AD394 80116C94 8C500000 */ lw $s0, 0x0($v0) /* AD398 80116C98 520003AA */ beql $s0, $zero, .L80117B44 /* AD39C 80116C9C 26730001 */ addiu $s3, $s3, 0x1 /* AD3A0 80116CA0 96030000 */ lhu $v1, 0x0($s0) /* AD3A4 80116CA4 506003A7 */ beql $v1, $zero, .L80117B44 /* AD3A8 80116CA8 26730001 */ addiu $s3, $s3, 0x1 /* AD3AC 80116CAC 30620004 */ andi $v0, $v1, 0x4 /* AD3B0 80116CB0 544003A4 */ bnel $v0, $zero, .L80117B44 /* AD3B4 80116CB4 26730001 */ addiu $s3, $s3, 0x1 /* AD3B8 80116CB8 30620002 */ andi $v0, $v1, 0x2 /* AD3BC 80116CBC 544003A1 */ bnel $v0, $zero, .L80117B44 /* AD3C0 80116CC0 26730001 */ addiu $s3, $s3, 0x1 /* AD3C4 80116CC4 30620020 */ andi $v0, $v1, 0x20 /* AD3C8 80116CC8 5440039E */ bnel $v0, $zero, .L80117B44 /* AD3CC 80116CCC 26730001 */ addiu $s3, $s3, 0x1 /* AD3D0 80116CD0 30620008 */ andi $v0, $v1, 0x8 /* AD3D4 80116CD4 5440039B */ bnel $v0, $zero, .L80117B44 /* AD3D8 80116CD8 26730001 */ addiu $s3, $s3, 0x1 /* AD3DC 80116CDC C6180098 */ lwc1 $f24, 0x98($s0) /* AD3E0 80116CE0 E7B80088 */ swc1 $f24, 0x88($sp) /* AD3E4 80116CE4 C61A009C */ lwc1 $f26, 0x9C($s0) /* AD3E8 80116CE8 E7BA008C */ swc1 $f26, 0x8C($sp) /* AD3EC 80116CEC C61800A0 */ lwc1 $f24, 0xA0($s0) /* AD3F0 80116CF0 30620200 */ andi $v0, $v1, 0x200 /* AD3F4 80116CF4 10400362 */ beqz $v0, .L80117A80 /* AD3F8 80116CF8 E7B80090 */ swc1 $f24, 0x90($sp) /* AD3FC 80116CFC 8E020008 */ lw $v0, 0x8($s0) /* AD400 80116D00 8C42000C */ lw $v0, 0xC($v0) /* AD404 80116D04 0000182D */ daddu $v1, $zero, $zero /* AD408 80116D08 C45A0004 */ lwc1 $f26, 0x4($v0) /* AD40C 80116D0C 4680D6A0 */ cvt.s.w $f26, $f26 /* AD410 80116D10 E7BA0098 */ swc1 $f26, 0x98($sp) /* AD414 80116D14 C4580010 */ lwc1 $f24, 0x10($v0) /* AD418 80116D18 4680C620 */ cvt.s.w $f24, $f24 /* AD41C 80116D1C E7B800A0 */ swc1 $f24, 0xA0($sp) /* AD420 80116D20 C45C001C */ lwc1 $f28, 0x1C($v0) /* AD424 80116D24 4680E720 */ cvt.s.w $f28, $f28 /* AD428 80116D28 C7B80088 */ lwc1 $f24, 0x88($sp) /* AD42C 80116D2C 461AC101 */ sub.s $f4, $f24, $f26 /* AD430 80116D30 C7BA0048 */ lwc1 $f26, 0x48($sp) /* AD434 80116D34 4604D182 */ mul.s $f6, $f26, $f4 /* AD438 80116D38 00000000 */ nop /* AD43C 80116D3C C7B8008C */ lwc1 $f24, 0x8C($sp) /* AD440 80116D40 C7BA00A0 */ lwc1 $f26, 0xA0($sp) /* AD444 80116D44 461AC301 */ sub.s $f12, $f24, $f26 /* AD448 80116D48 C7B80058 */ lwc1 $f24, 0x58($sp) /* AD44C 80116D4C 460CC582 */ mul.s $f22, $f24, $f12 /* AD450 80116D50 00000000 */ nop /* AD454 80116D54 C7BA0090 */ lwc1 $f26, 0x90($sp) /* AD458 80116D58 461CD501 */ sub.s $f20, $f26, $f28 /* AD45C 80116D5C C7BA004C */ lwc1 $f26, 0x4C($sp) /* AD460 80116D60 4604D002 */ mul.s $f0, $f26, $f4 /* AD464 80116D64 00000000 */ nop /* AD468 80116D68 C7B80068 */ lwc1 $f24, 0x68($sp) /* AD46C 80116D6C 4614C382 */ mul.s $f14, $f24, $f20 /* AD470 80116D70 00000000 */ nop /* AD474 80116D74 C7BA006C */ lwc1 $f26, 0x6C($sp) /* AD478 80116D78 4614D402 */ mul.s $f16, $f26, $f20 /* AD47C 80116D7C 00000000 */ nop /* AD480 80116D80 C7B8005C */ lwc1 $f24, 0x5C($sp) /* AD484 80116D84 460CC202 */ mul.s $f8, $f24, $f12 /* AD488 80116D88 00000000 */ nop /* AD48C 80116D8C C7BA0060 */ lwc1 $f26, 0x60($sp) /* AD490 80116D90 460CD282 */ mul.s $f10, $f26, $f12 /* AD494 80116D94 00000000 */ nop /* AD498 80116D98 C7B80050 */ lwc1 $f24, 0x50($sp) /* AD49C 80116D9C 4604C082 */ mul.s $f2, $f24, $f4 /* AD4A0 80116DA0 00000000 */ nop /* AD4A4 80116DA4 C7BA0054 */ lwc1 $f26, 0x54($sp) /* AD4A8 80116DA8 4604D102 */ mul.s $f4, $f26, $f4 /* AD4AC 80116DAC 00000000 */ nop /* AD4B0 80116DB0 C7B80070 */ lwc1 $f24, 0x70($sp) /* AD4B4 80116DB4 4614C482 */ mul.s $f18, $f24, $f20 /* AD4B8 80116DB8 00000000 */ nop /* AD4BC 80116DBC C7BA0074 */ lwc1 $f26, 0x74($sp) /* AD4C0 80116DC0 4614D502 */ mul.s $f20, $f26, $f20 /* AD4C4 80116DC4 00000000 */ nop /* AD4C8 80116DC8 C7B80064 */ lwc1 $f24, 0x64($sp) /* AD4CC 80116DCC 460CC302 */ mul.s $f12, $f24, $f12 /* AD4D0 80116DD0 00000000 */ nop /* AD4D4 80116DD4 46163180 */ add.s $f6, $f6, $f22 /* AD4D8 80116DD8 460E3180 */ add.s $f6, $f6, $f14 /* AD4DC 80116DDC 46080000 */ add.s $f0, $f0, $f8 /* AD4E0 80116DE0 460A1080 */ add.s $f2, $f2, $f10 /* AD4E4 80116DE4 C7B80078 */ lwc1 $f24, 0x78($sp) /* AD4E8 80116DE8 46183180 */ add.s $f6, $f6, $f24 /* AD4EC 80116DEC 46100000 */ add.s $f0, $f0, $f16 /* AD4F0 80116DF0 46121080 */ add.s $f2, $f2, $f18 /* AD4F4 80116DF4 460C2100 */ add.s $f4, $f4, $f12 /* AD4F8 80116DF8 C7BA007C */ lwc1 $f26, 0x7C($sp) /* AD4FC 80116DFC 461A0200 */ add.s $f8, $f0, $f26 /* AD500 80116E00 C7B80080 */ lwc1 $f24, 0x80($sp) /* AD504 80116E04 46181080 */ add.s $f2, $f2, $f24 /* AD508 80116E08 C7BA0084 */ lwc1 $f26, 0x84($sp) /* AD50C 80116E0C 46142100 */ add.s $f4, $f4, $f20 /* AD510 80116E10 E7A60038 */ swc1 $f6, 0x38($sp) /* AD514 80116E14 4480C000 */ mtc1 $zero, $f24 /* AD518 80116E18 461A2100 */ add.s $f4, $f4, $f26 /* AD51C 80116E1C E7A8003C */ swc1 $f8, 0x3C($sp) /* AD520 80116E20 E7A20040 */ swc1 $f2, 0x40($sp) /* AD524 80116E24 46182032 */ c.eq.s $f4, $f24 /* AD528 80116E28 00000000 */ nop /* AD52C 80116E2C 45010312 */ bc1t .L80117A78 /* AD530 80116E30 E7A40044 */ swc1 $f4, 0x44($sp) /* AD534 80116E34 4604F003 */ div.s $f0, $f30, $f4 /* AD538 80116E38 46003102 */ mul.s $f4, $f6, $f0 /* AD53C 80116E3C 00000000 */ nop /* AD540 80116E40 46004302 */ mul.s $f12, $f8, $f0 /* AD544 80116E44 00000000 */ nop /* AD548 80116E48 46001502 */ mul.s $f20, $f2, $f0 /* AD54C 80116E4C 00000000 */ nop /* AD550 80116E50 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* AD554 80116E54 4481D000 */ mtc1 $at, $f26 /* AD558 80116E58 00000000 */ nop /* AD55C 80116E5C 4614D03C */ c.lt.s $f26, $f20 /* AD560 80116E60 00000000 */ nop /* AD564 80116E64 45000011 */ bc1f .L80116EAC /* AD568 80116E68 E7A00044 */ swc1 $f0, 0x44($sp) /* AD56C 80116E6C 4604D03E */ c.le.s $f26, $f4 /* AD570 80116E70 00000000 */ nop /* AD574 80116E74 4500000D */ bc1f .L80116EAC /* AD578 80116E78 00000000 */ nop /* AD57C 80116E7C 461E203E */ c.le.s $f4, $f30 /* AD580 80116E80 00000000 */ nop /* AD584 80116E84 45000009 */ bc1f .L80116EAC /* AD588 80116E88 00000000 */ nop /* AD58C 80116E8C 460CD03E */ c.le.s $f26, $f12 /* AD590 80116E90 00000000 */ nop /* AD594 80116E94 45000005 */ bc1f .L80116EAC /* AD598 80116E98 00000000 */ nop /* AD59C 80116E9C 461E603E */ c.le.s $f12, $f30 /* AD5A0 80116EA0 00000000 */ nop /* AD5A4 80116EA4 450102F4 */ bc1t .L80117A78 /* AD5A8 80116EA8 00000000 */ nop .L80116EAC: /* AD5AC 80116EAC C7B80098 */ lwc1 $f24, 0x98($sp) /* AD5B0 80116EB0 4480D000 */ mtc1 $zero, $f26 /* AD5B4 80116EB4 00000000 */ nop /* AD5B8 80116EB8 461AC032 */ c.eq.s $f24, $f26 /* AD5BC 80116EBC 00000000 */ nop /* AD5C0 80116EC0 45010062 */ bc1t .L8011704C /* AD5C4 80116EC4 00000000 */ nop /* AD5C8 80116EC8 C7BA0088 */ lwc1 $f26, 0x88($sp) /* AD5CC 80116ECC 4618D100 */ add.s $f4, $f26, $f24 /* AD5D0 80116ED0 C7B80048 */ lwc1 $f24, 0x48($sp) /* AD5D4 80116ED4 4604C182 */ mul.s $f6, $f24, $f4 /* AD5D8 80116ED8 00000000 */ nop /* AD5DC 80116EDC C7BA008C */ lwc1 $f26, 0x8C($sp) /* AD5E0 80116EE0 C7B800A0 */ lwc1 $f24, 0xA0($sp) /* AD5E4 80116EE4 4618D301 */ sub.s $f12, $f26, $f24 /* AD5E8 80116EE8 C7BA0058 */ lwc1 $f26, 0x58($sp) /* AD5EC 80116EEC 460CD582 */ mul.s $f22, $f26, $f12 /* AD5F0 80116EF0 00000000 */ nop /* AD5F4 80116EF4 C7B80090 */ lwc1 $f24, 0x90($sp) /* AD5F8 80116EF8 461CC501 */ sub.s $f20, $f24, $f28 /* AD5FC 80116EFC C7B8004C */ lwc1 $f24, 0x4C($sp) /* AD600 80116F00 4604C002 */ mul.s $f0, $f24, $f4 /* AD604 80116F04 00000000 */ nop /* AD608 80116F08 C7BA0068 */ lwc1 $f26, 0x68($sp) /* AD60C 80116F0C 4614D382 */ mul.s $f14, $f26, $f20 /* AD610 80116F10 00000000 */ nop /* AD614 80116F14 C7B8006C */ lwc1 $f24, 0x6C($sp) /* AD618 80116F18 4614C402 */ mul.s $f16, $f24, $f20 /* AD61C 80116F1C 00000000 */ nop /* AD620 80116F20 C7BA005C */ lwc1 $f26, 0x5C($sp) /* AD624 80116F24 460CD202 */ mul.s $f8, $f26, $f12 /* AD628 80116F28 00000000 */ nop /* AD62C 80116F2C C7B80060 */ lwc1 $f24, 0x60($sp) /* AD630 80116F30 460CC282 */ mul.s $f10, $f24, $f12 /* AD634 80116F34 00000000 */ nop /* AD638 80116F38 C7BA0050 */ lwc1 $f26, 0x50($sp) /* AD63C 80116F3C 4604D082 */ mul.s $f2, $f26, $f4 /* AD640 80116F40 00000000 */ nop /* AD644 80116F44 C7B80054 */ lwc1 $f24, 0x54($sp) /* AD648 80116F48 4604C102 */ mul.s $f4, $f24, $f4 /* AD64C 80116F4C 00000000 */ nop /* AD650 80116F50 C7BA0070 */ lwc1 $f26, 0x70($sp) /* AD654 80116F54 4614D482 */ mul.s $f18, $f26, $f20 /* AD658 80116F58 00000000 */ nop /* AD65C 80116F5C C7B80074 */ lwc1 $f24, 0x74($sp) /* AD660 80116F60 4614C502 */ mul.s $f20, $f24, $f20 /* AD664 80116F64 00000000 */ nop /* AD668 80116F68 C7BA0064 */ lwc1 $f26, 0x64($sp) /* AD66C 80116F6C 460CD302 */ mul.s $f12, $f26, $f12 /* AD670 80116F70 00000000 */ nop /* AD674 80116F74 46163180 */ add.s $f6, $f6, $f22 /* AD678 80116F78 460E3180 */ add.s $f6, $f6, $f14 /* AD67C 80116F7C 46080000 */ add.s $f0, $f0, $f8 /* AD680 80116F80 460A1080 */ add.s $f2, $f2, $f10 /* AD684 80116F84 C7BA0078 */ lwc1 $f26, 0x78($sp) /* AD688 80116F88 461A3180 */ add.s $f6, $f6, $f26 /* AD68C 80116F8C 46100000 */ add.s $f0, $f0, $f16 /* AD690 80116F90 46121080 */ add.s $f2, $f2, $f18 /* AD694 80116F94 460C2100 */ add.s $f4, $f4, $f12 /* AD698 80116F98 C7B8007C */ lwc1 $f24, 0x7C($sp) /* AD69C 80116F9C 46180200 */ add.s $f8, $f0, $f24 /* AD6A0 80116FA0 C7BA0080 */ lwc1 $f26, 0x80($sp) /* AD6A4 80116FA4 461A1080 */ add.s $f2, $f2, $f26 /* AD6A8 80116FA8 C7B80084 */ lwc1 $f24, 0x84($sp) /* AD6AC 80116FAC 46142100 */ add.s $f4, $f4, $f20 /* AD6B0 80116FB0 E7A60038 */ swc1 $f6, 0x38($sp) /* AD6B4 80116FB4 4480D000 */ mtc1 $zero, $f26 /* AD6B8 80116FB8 46182100 */ add.s $f4, $f4, $f24 /* AD6BC 80116FBC E7A8003C */ swc1 $f8, 0x3C($sp) /* AD6C0 80116FC0 E7A20040 */ swc1 $f2, 0x40($sp) /* AD6C4 80116FC4 461A2032 */ c.eq.s $f4, $f26 /* AD6C8 80116FC8 00000000 */ nop /* AD6CC 80116FCC 450102AA */ bc1t .L80117A78 /* AD6D0 80116FD0 E7A40044 */ swc1 $f4, 0x44($sp) /* AD6D4 80116FD4 4604F003 */ div.s $f0, $f30, $f4 /* AD6D8 80116FD8 46003102 */ mul.s $f4, $f6, $f0 /* AD6DC 80116FDC 00000000 */ nop /* AD6E0 80116FE0 46004302 */ mul.s $f12, $f8, $f0 /* AD6E4 80116FE4 00000000 */ nop /* AD6E8 80116FE8 46001502 */ mul.s $f20, $f2, $f0 /* AD6EC 80116FEC 00000000 */ nop /* AD6F0 80116FF0 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* AD6F4 80116FF4 4481C000 */ mtc1 $at, $f24 /* AD6F8 80116FF8 00000000 */ nop /* AD6FC 80116FFC 4614C03C */ c.lt.s $f24, $f20 /* AD700 80117000 00000000 */ nop /* AD704 80117004 45000011 */ bc1f .L8011704C /* AD708 80117008 E7A00044 */ swc1 $f0, 0x44($sp) /* AD70C 8011700C 4604C03E */ c.le.s $f24, $f4 /* AD710 80117010 00000000 */ nop /* AD714 80117014 4500000D */ bc1f .L8011704C /* AD718 80117018 00000000 */ nop /* AD71C 8011701C 461E203E */ c.le.s $f4, $f30 /* AD720 80117020 00000000 */ nop /* AD724 80117024 45000009 */ bc1f .L8011704C /* AD728 80117028 00000000 */ nop /* AD72C 8011702C 460CC03E */ c.le.s $f24, $f12 /* AD730 80117030 00000000 */ nop /* AD734 80117034 45000005 */ bc1f .L8011704C /* AD738 80117038 00000000 */ nop /* AD73C 8011703C 461E603E */ c.le.s $f12, $f30 /* AD740 80117040 00000000 */ nop /* AD744 80117044 4501028C */ bc1t .L80117A78 /* AD748 80117048 00000000 */ nop .L8011704C: /* AD74C 8011704C C7BA00A0 */ lwc1 $f26, 0xA0($sp) /* AD750 80117050 4480C000 */ mtc1 $zero, $f24 /* AD754 80117054 00000000 */ nop /* AD758 80117058 4618D032 */ c.eq.s $f26, $f24 /* AD75C 8011705C 00000000 */ nop /* AD760 80117060 45010063 */ bc1t .L801171F0 /* AD764 80117064 00000000 */ nop /* AD768 80117068 C7BA0088 */ lwc1 $f26, 0x88($sp) /* AD76C 8011706C C7B80098 */ lwc1 $f24, 0x98($sp) /* AD770 80117070 4618D101 */ sub.s $f4, $f26, $f24 /* AD774 80117074 C7BA0048 */ lwc1 $f26, 0x48($sp) /* AD778 80117078 4604D182 */ mul.s $f6, $f26, $f4 /* AD77C 8011707C 00000000 */ nop /* AD780 80117080 C7B8008C */ lwc1 $f24, 0x8C($sp) /* AD784 80117084 C7BA00A0 */ lwc1 $f26, 0xA0($sp) /* AD788 80117088 461AC300 */ add.s $f12, $f24, $f26 /* AD78C 8011708C C7B80058 */ lwc1 $f24, 0x58($sp) /* AD790 80117090 460CC582 */ mul.s $f22, $f24, $f12 /* AD794 80117094 00000000 */ nop /* AD798 80117098 C7BA0090 */ lwc1 $f26, 0x90($sp) /* AD79C 8011709C 461CD501 */ sub.s $f20, $f26, $f28 /* AD7A0 801170A0 C7BA004C */ lwc1 $f26, 0x4C($sp) /* AD7A4 801170A4 4604D002 */ mul.s $f0, $f26, $f4 /* AD7A8 801170A8 00000000 */ nop /* AD7AC 801170AC C7B80068 */ lwc1 $f24, 0x68($sp) /* AD7B0 801170B0 4614C382 */ mul.s $f14, $f24, $f20 /* AD7B4 801170B4 00000000 */ nop /* AD7B8 801170B8 C7BA006C */ lwc1 $f26, 0x6C($sp) /* AD7BC 801170BC 4614D402 */ mul.s $f16, $f26, $f20 /* AD7C0 801170C0 00000000 */ nop /* AD7C4 801170C4 C7B8005C */ lwc1 $f24, 0x5C($sp) /* AD7C8 801170C8 460CC202 */ mul.s $f8, $f24, $f12 /* AD7CC 801170CC 00000000 */ nop /* AD7D0 801170D0 C7BA0060 */ lwc1 $f26, 0x60($sp) /* AD7D4 801170D4 460CD282 */ mul.s $f10, $f26, $f12 /* AD7D8 801170D8 00000000 */ nop /* AD7DC 801170DC C7B80050 */ lwc1 $f24, 0x50($sp) /* AD7E0 801170E0 4604C082 */ mul.s $f2, $f24, $f4 /* AD7E4 801170E4 00000000 */ nop /* AD7E8 801170E8 C7BA0054 */ lwc1 $f26, 0x54($sp) /* AD7EC 801170EC 4604D102 */ mul.s $f4, $f26, $f4 /* AD7F0 801170F0 00000000 */ nop /* AD7F4 801170F4 C7B80070 */ lwc1 $f24, 0x70($sp) /* AD7F8 801170F8 4614C482 */ mul.s $f18, $f24, $f20 /* AD7FC 801170FC 00000000 */ nop /* AD800 80117100 C7BA0074 */ lwc1 $f26, 0x74($sp) /* AD804 80117104 4614D502 */ mul.s $f20, $f26, $f20 /* AD808 80117108 00000000 */ nop /* AD80C 8011710C C7B80064 */ lwc1 $f24, 0x64($sp) /* AD810 80117110 460CC302 */ mul.s $f12, $f24, $f12 /* AD814 80117114 00000000 */ nop /* AD818 80117118 46163180 */ add.s $f6, $f6, $f22 /* AD81C 8011711C 460E3180 */ add.s $f6, $f6, $f14 /* AD820 80117120 46080000 */ add.s $f0, $f0, $f8 /* AD824 80117124 460A1080 */ add.s $f2, $f2, $f10 /* AD828 80117128 C7B80078 */ lwc1 $f24, 0x78($sp) /* AD82C 8011712C 46183180 */ add.s $f6, $f6, $f24 /* AD830 80117130 46100000 */ add.s $f0, $f0, $f16 /* AD834 80117134 46121080 */ add.s $f2, $f2, $f18 /* AD838 80117138 460C2100 */ add.s $f4, $f4, $f12 /* AD83C 8011713C C7BA007C */ lwc1 $f26, 0x7C($sp) /* AD840 80117140 461A0200 */ add.s $f8, $f0, $f26 /* AD844 80117144 C7B80080 */ lwc1 $f24, 0x80($sp) /* AD848 80117148 46181080 */ add.s $f2, $f2, $f24 /* AD84C 8011714C C7BA0084 */ lwc1 $f26, 0x84($sp) /* AD850 80117150 46142100 */ add.s $f4, $f4, $f20 /* AD854 80117154 E7A60038 */ swc1 $f6, 0x38($sp) /* AD858 80117158 4480C000 */ mtc1 $zero, $f24 /* AD85C 8011715C 461A2100 */ add.s $f4, $f4, $f26 ### DECOMPILED C INSTRUCTIONS: void render_models(void) { RenderTask rt; RenderTask* rtPtr = &rt; f32 outX, outY, outZ, outW; f32 m00, m01, m02, m03; f32 m10, m11, m12, m13; f32 m20, m21, m22, m23; f32 m30, m31, m32, m33; f32 x, y, z; f32 bbx, bby, bbz; Camera* camera = &gCameras[gCurrentCameraID]; Model* model; ModelBoundingBox* boundingBox; ModelTransformGroup* transformGroup; f32 xComp, yComp, zComp; s32 distance; s32 cond; s32 i; #define COMMON_RENDER_MODELS \ outX = (m00 * xComp) + (m10 * yComp) + (m20 * zComp) + m30; \ outY = (m01 * xComp) + (m11 * yComp) + (m21 * zComp) + m31; \ outZ = (m02 * xComp) + (m12 * yComp) + (m22 * zComp) + m32; \ outW = (m03 * xComp) + (m13 * yComp) + (m23 * zComp) + m33; \ if (outW == 0.0f) { \ break; \ } \ /* Perspective divide */ \ outW = 1.0f / outW; \ xComp = outX * outW; \ yComp = outY * outW; \ zComp = outZ * outW; \ if (zComp > -1.0f && xComp >= -1.0f && xComp <= 1.0f && yComp >= -1.0f && yComp <= 1.0f) { \ break; \ } m00 = camera->perspectiveMatrix[0][0]; m01 = camera->perspectiveMatrix[0][1]; m02 = camera->perspectiveMatrix[0][2]; m03 = camera->perspectiveMatrix[0][3]; m10 = camera->perspectiveMatrix[1][0]; m11 = camera->perspectiveMatrix[1][1]; m12 = camera->perspectiveMatrix[1][2]; m13 = camera->perspectiveMatrix[1][3]; m20 = camera->perspectiveMatrix[2][0]; m21 = camera->perspectiveMatrix[2][1]; m22 = camera->perspectiveMatrix[2][2]; m23 = camera->perspectiveMatrix[2][3]; m30 = camera->perspectiveMatrix[3][0]; m31 = camera->perspectiveMatrix[3][1]; m32 = camera->perspectiveMatrix[3][2]; m33 = camera->perspectiveMatrix[3][3]; for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) { model = (*gCurrentModels)[i]; if (model == NULL) { continue; } if (model->flags == 0) { continue; } if (model->flags & MODEL_FLAG_FLAG_4) { continue; } if (model->flags & MODEL_FLAG_HIDDEN) { continue; } if (model->flags & MODEL_FLAG_FLAG_20) { continue; } if (model->flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER) { continue; } x = model->center.x; y = model->center.y; z = model->center.z; if (model->flags & MODEL_FLAG_FLAG_200) { cond = FALSE; boundingBox = (ModelBoundingBox*) model->modelNode->propertyList; bbx = boundingBox->halfSizeX; bby = boundingBox->halfSizeY; bbz = boundingBox->halfSizeZ; while (TRUE) { if (TRUE) { xComp = x - bbx; yComp = y - bby; zComp = z - bbz; COMMON_RENDER_MODELS; } if (bbx != 0.0f) { xComp = x + bbx; yComp = y - bby; zComp = z - bbz; COMMON_RENDER_MODELS; } if (bby != 0.0f) { xComp = x - bbx; yComp = y + bby; zComp = z - bbz; COMMON_RENDER_MODELS; } if (bbx != 0.0f && bby != 0.0f) { xComp = x + bbx; yComp = y + bby; zComp = z - bbz; COMMON_RENDER_MODELS; } if (bbz != 0.0f) { xComp = x - bbx; yComp = y - bby; zComp = z + bbz; COMMON_RENDER_MODELS; } if (bbx != 0.0f && bbz != 0.0f) { xComp = x + bbx; yComp = y - bby; zComp = z + bbz; COMMON_RENDER_MODELS; } if (bby != 0.0f && bbz != 0.0f) { xComp = x - bbx; yComp = y + bby; zComp = z + bbz; COMMON_RENDER_MODELS; } if (bbx != 0.0f && bby != 0.0f && bbz != 0.0f) { xComp = x + bbx; yComp = y + bby; zComp = z + bbz; COMMON_RENDER_MODELS; } cond = TRUE; break; } if (cond) { continue; } } transform_point(camera->perspectiveMatrix, x, y, z, 1.0f, &outX, &outY, &outZ, &outW); distance = outZ + 5000.0f; if (distance < 0) { distance = 0; } else if (distance > 10000) { distance = 10000; } rtPtr->appendGfxArg = model; if (model->modelNode->type == SHAPE_TYPE_GROUP) { rtPtr->appendGfx = appendGfx_model_group; } else { rtPtr->appendGfx = appendGfx_model; } rtPtr->distance = -distance; rtPtr->renderMode = model->renderMode; queue_render_task(rtPtr); } for (i = 0; i < ARRAY_COUNT(*gCurrentTransformGroups); i++) { transformGroup = (*gCurrentTransformGroups)[i]; if (transformGroup == NULL) { continue; } if (transformGroup->flags == 0) { continue; } if (transformGroup->flags & 4) { continue; } xComp = transformGroup->center.x; yComp = transformGroup->center.y; zComp = transformGroup->center.z; transform_point( camera->perspectiveMatrix, xComp, yComp, zComp, 1.0f, &outX, &outY, &outZ, &outW ); if (outW == 0.0f) { outW = 1.0f; } distance = ((outZ / outW) * 10000.0f); if (!(transformGroup->flags & 2)) { rtPtr->appendGfx = render_transform_group; rtPtr->appendGfxArg = transformGroup; rtPtr->distance = -distance; rtPtr->renderMode = transformGroup->renderMode; queue_render_task(rtPtr); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel imgfx_appendGfx_mesh_anim /* D49F0 8013E2F0 3C028007 */ lui $v0, %hi(gCurrentDisplayContextIndex) /* D49F4 8013E2F4 8C4241F4 */ lw $v0, %lo(gCurrentDisplayContextIndex)($v0) /* D49F8 8013E2F8 27BDFFC8 */ addiu $sp, $sp, -0x38 /* D49FC 8013E2FC AFB3002C */ sw $s3, 0x2C($sp) /* D4A00 8013E300 0080982D */ daddu $s3, $a0, $zero /* D4A04 8013E304 AFBF0034 */ sw $ra, 0x34($sp) /* D4A08 8013E308 AFB40030 */ sw $s4, 0x30($sp) /* D4A0C 8013E30C AFB20028 */ sw $s2, 0x28($sp) /* D4A10 8013E310 AFB10024 */ sw $s1, 0x24($sp) /* D4A14 8013E314 AFB00020 */ sw $s0, 0x20($sp) /* D4A18 8013E318 00021080 */ sll $v0, $v0, 2 /* D4A1C 8013E31C 02621821 */ addu $v1, $s3, $v0 /* D4A20 8013E320 8C620068 */ lw $v0, 0x68($v1) /* D4A24 8013E324 1040016F */ beqz $v0, .L8013E8E4 /* D4A28 8013E328 00A0A02D */ daddu $s4, $a1, $zero /* D4A2C 8013E32C 8C620070 */ lw $v0, 0x70($v1) /* D4A30 8013E330 1040016C */ beqz $v0, .L8013E8E4 /* D4A34 8013E334 3C120001 */ lui $s2, (0x11630 >> 16) /* D4A38 8013E338 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* D4A3C 8013E33C 3C108007 */ lui $s0, %hi(gMatrixListPos) /* D4A40 8013E340 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* D4A44 8013E344 3C11800A */ lui $s1, %hi(gDisplayContext) /* D4A48 8013E348 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* D4A4C 8013E34C 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) /* D4A50 8013E350 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) /* D4A54 8013E354 44810000 */ mtc1 $at, $f0 /* D4A58 8013E358 96040000 */ lhu $a0, 0x0($s0) /* D4A5C 8013E35C 8E220000 */ lw $v0, 0x0($s1) /* D4A60 8013E360 00042180 */ sll $a0, $a0, 6 /* D4A64 8013E364 00922021 */ addu $a0, $a0, $s2 /* D4A68 8013E368 44050000 */ mfc1 $a1, $f0 /* D4A6C 8013E36C 00442021 */ addu $a0, $v0, $a0 /* D4A70 8013E370 00A0302D */ daddu $a2, $a1, $zero /* D4A74 8013E374 0C019DC0 */ jal guScale /* D4A78 8013E378 00A0382D */ daddu $a3, $a1, $zero /* D4A7C 8013E37C 3C08800A */ lui $t0, %hi(gMainGfxPos) /* D4A80 8013E380 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* D4A84 8013E384 8D070000 */ lw $a3, 0x0($t0) /* D4A88 8013E388 00E0282D */ daddu $a1, $a3, $zero /* D4A8C 8013E38C 24E70008 */ addiu $a3, $a3, 0x8 /* D4A90 8013E390 AD070000 */ sw $a3, 0x0($t0) /* D4A94 8013E394 96040000 */ lhu $a0, 0x0($s0) /* D4A98 8013E398 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* D4A9C 8013E39C ACA20000 */ sw $v0, 0x0($a1) /* D4AA0 8013E3A0 8E230000 */ lw $v1, 0x0($s1) /* D4AA4 8013E3A4 3082FFFF */ andi $v0, $a0, 0xFFFF /* D4AA8 8013E3A8 00021180 */ sll $v0, $v0, 6 /* D4AAC 8013E3AC 00521021 */ addu $v0, $v0, $s2 /* D4AB0 8013E3B0 00621821 */ addu $v1, $v1, $v0 /* D4AB4 8013E3B4 3C028000 */ lui $v0, (0x80000000 >> 16) /* D4AB8 8013E3B8 00621821 */ addu $v1, $v1, $v0 /* D4ABC 8013E3BC ACA30004 */ sw $v1, 0x4($a1) /* D4AC0 8013E3C0 8E620014 */ lw $v0, 0x14($s3) /* D4AC4 8013E3C4 24840001 */ addiu $a0, $a0, 0x1 /* D4AC8 8013E3C8 30420020 */ andi $v0, $v0, 0x20 /* D4ACC 8013E3CC 14400130 */ bnez $v0, .L8013E890 /* D4AD0 8013E3D0 A6040000 */ sh $a0, 0x0($s0) /* D4AD4 8013E3D4 3C03E300 */ lui $v1, (0xE3001001 >> 16) /* D4AD8 8013E3D8 34631001 */ ori $v1, $v1, (0xE3001001 & 0xFFFF) /* D4ADC 8013E3DC 3C05F500 */ lui $a1, (0xF5000100 >> 16) /* D4AE0 8013E3E0 34A50100 */ ori $a1, $a1, (0xF5000100 & 0xFFFF) /* D4AE4 8013E3E4 3C060703 */ lui $a2, (0x703C000 >> 16) /* D4AE8 8013E3E8 34C6C000 */ ori $a2, $a2, (0x703C000 & 0xFFFF) /* D4AEC 8013E3EC 24E20008 */ addiu $v0, $a3, 0x8 /* D4AF0 8013E3F0 AD020000 */ sw $v0, 0x0($t0) /* D4AF4 8013E3F4 34028000 */ ori $v0, $zero, 0x8000 /* D4AF8 8013E3F8 ACE20004 */ sw $v0, 0x4($a3) /* D4AFC 8013E3FC 24E20010 */ addiu $v0, $a3, 0x10 /* D4B00 8013E400 ACE30000 */ sw $v1, 0x0($a3) /* D4B04 8013E404 AD020000 */ sw $v0, 0x0($t0) /* D4B08 8013E408 3C02FD10 */ lui $v0, (0xFD100000 >> 16) /* D4B0C 8013E40C ACE20008 */ sw $v0, 0x8($a3) /* D4B10 8013E410 24E20018 */ addiu $v0, $a3, 0x18 /* D4B14 8013E414 AD020000 */ sw $v0, 0x0($t0) /* D4B18 8013E418 24E20020 */ addiu $v0, $a3, 0x20 /* D4B1C 8013E41C AD020000 */ sw $v0, 0x0($t0) /* D4B20 8013E420 24E20028 */ addiu $v0, $a3, 0x28 /* D4B24 8013E424 AD020000 */ sw $v0, 0x0($t0) /* D4B28 8013E428 3C038015 */ lui $v1, %hi(ImgFXCurrentTexturePtr) /* D4B2C 8013E42C 8C63EE10 */ lw $v1, %lo(ImgFXCurrentTexturePtr)($v1) /* D4B30 8013E430 24E20030 */ addiu $v0, $a3, 0x30 /* D4B34 8013E434 AD020000 */ sw $v0, 0x0($t0) /* D4B38 8013E438 8C640004 */ lw $a0, 0x4($v1) /* D4B3C 8013E43C 3C038015 */ lui $v1, %hi(gSpriteShadingProfile) /* D4B40 8013E440 8C631328 */ lw $v1, %lo(gSpriteShadingProfile)($v1) /* D4B44 8013E444 3C02E800 */ lui $v0, (0xE8000000 >> 16) /* D4B48 8013E448 ACE20010 */ sw $v0, 0x10($a3) /* D4B4C 8013E44C 3C020700 */ lui $v0, (0x7000000 >> 16) /* D4B50 8013E450 ACE2001C */ sw $v0, 0x1C($a3) /* D4B54 8013E454 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* D4B58 8013E458 ACE20020 */ sw $v0, 0x20($a3) /* D4B5C 8013E45C 3C02F000 */ lui $v0, (0xF0000000 >> 16) /* D4B60 8013E460 ACE20028 */ sw $v0, 0x28($a3) /* D4B64 8013E464 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* D4B68 8013E468 ACE00014 */ sw $zero, 0x14($a3) /* D4B6C 8013E46C ACE50018 */ sw $a1, 0x18($a3) /* D4B70 8013E470 ACE00024 */ sw $zero, 0x24($a3) /* D4B74 8013E474 ACE6002C */ sw $a2, 0x2C($a3) /* D4B78 8013E478 ACE20030 */ sw $v0, 0x30($a3) /* D4B7C 8013E47C ACE00034 */ sw $zero, 0x34($a3) /* D4B80 8013E480 ACE4000C */ sw $a0, 0xC($a3) /* D4B84 8013E484 94620000 */ lhu $v0, 0x0($v1) /* D4B88 8013E488 24E30038 */ addiu $v1, $a3, 0x38 /* D4B8C 8013E48C 30420001 */ andi $v0, $v0, 0x1 /* D4B90 8013E490 104000A7 */ beqz $v0, .L8013E730 /* D4B94 8013E494 AD030000 */ sw $v1, 0x0($t0) /* D4B98 8013E498 8E620014 */ lw $v0, 0x14($s3) /* D4B9C 8013E49C 3C030018 */ lui $v1, (0x180000 >> 16) /* D4BA0 8013E4A0 00431024 */ and $v0, $v0, $v1 /* D4BA4 8013E4A4 504000A3 */ beql $v0, $zero, .L8013E734 /* D4BA8 8013E4A8 3C08070A */ lui $t0, (0x70A0280 >> 16) /* D4BAC 8013E4AC 92630002 */ lbu $v1, 0x2($s3) /* D4BB0 8013E4B0 10600007 */ beqz $v1, .L8013E4D0 /* D4BB4 8013E4B4 24020002 */ addiu $v0, $zero, 0x2 /* D4BB8 8013E4B8 10620005 */ beq $v1, $v0, .L8013E4D0 /* D4BBC 8013E4BC 24020007 */ addiu $v0, $zero, 0x7 /* D4BC0 8013E4C0 10620003 */ beq $v1, $v0, .L8013E4D0 /* D4BC4 8013E4C4 2402000B */ addiu $v0, $zero, 0xB /* D4BC8 8013E4C8 1462009A */ bne $v1, $v0, .L8013E734 /* D4BCC 8013E4CC 3C08070A */ lui $t0, (0x70A0280 >> 16) .L8013E4D0: /* D4BD0 8013E4D0 240E00FF */ addiu $t6, $zero, 0xFF /* D4BD4 8013E4D4 3C08070A */ lui $t0, (0x70A0280 >> 16) /* D4BD8 8013E4D8 35080280 */ ori $t0, $t0, (0x70A0280 & 0xFFFF) /* D4BDC 8013E4DC 3C0A010A */ lui $t2, (0x10A0280 >> 16) /* D4BE0 8013E4E0 354A0280 */ ori $t2, $t2, (0x10A0280 & 0xFFFF) /* D4BE4 8013E4E4 3C09F240 */ lui $t1, (0xF2400400 >> 16) /* D4BE8 8013E4E8 35290400 */ ori $t1, $t1, (0xF2400400 & 0xFFFF) /* D4BEC 8013E4EC 3C0B001A */ lui $t3, (0x1A0280 >> 16) /* D4BF0 8013E4F0 356B0280 */ ori $t3, $t3, (0x1A0280 & 0xFFFF) /* D4BF4 8013E4F4 3C0CF510 */ lui $t4, (0xF5100900 >> 16) /* D4BF8 8013E4F8 358C0900 */ ori $t4, $t4, (0xF5100900 & 0xFFFF) /* D4BFC 8013E4FC 3C0D020F */ lui $t5, (0x20FC000 >> 16) /* D4C00 8013E500 3C07800A */ lui $a3, %hi(gMainGfxPos) /* D4C04 8013E504 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* D4C08 8013E508 8CE50000 */ lw $a1, 0x0($a3) /* D4C0C 8013E50C 35ADC000 */ ori $t5, $t5, (0x20FC000 & 0xFFFF) /* D4C10 8013E510 00A0202D */ daddu $a0, $a1, $zero /* D4C14 8013E514 24A50008 */ addiu $a1, $a1, 0x8 /* D4C18 8013E518 ACE50000 */ sw $a1, 0x0($a3) /* D4C1C 8013E51C 3C068015 */ lui $a2, %hi(ImgFXCurrentTexturePtr) /* D4C20 8013E520 8CC6EE10 */ lw $a2, %lo(ImgFXCurrentTexturePtr)($a2) /* D4C24 8013E524 24A20008 */ addiu $v0, $a1, 0x8 /* D4C28 8013E528 ACE20000 */ sw $v0, 0x0($a3) /* D4C2C 8013E52C 94C20008 */ lhu $v0, 0x8($a2) /* D4C30 8013E530 24A30010 */ addiu $v1, $a1, 0x10 /* D4C34 8013E534 ACE30000 */ sw $v1, 0x0($a3) /* D4C38 8013E538 3C03FD48 */ lui $v1, (0xFD480000 >> 16) /* D4C3C 8013E53C 00021042 */ srl $v0, $v0, 1 /* D4C40 8013E540 2442FFFF */ addiu $v0, $v0, -0x1 /* D4C44 8013E544 30420FFF */ andi $v0, $v0, 0xFFF /* D4C48 8013E548 00431025 */ or $v0, $v0, $v1 /* D4C4C 8013E54C AC820000 */ sw $v0, 0x0($a0) /* D4C50 8013E550 8CC30000 */ lw $v1, 0x0($a2) /* D4C54 8013E554 24A20018 */ addiu $v0, $a1, 0x18 /* D4C58 8013E558 ACE20000 */ sw $v0, 0x0($a3) /* D4C5C 8013E55C AC830004 */ sw $v1, 0x4($a0) /* D4C60 8013E560 94C20008 */ lhu $v0, 0x8($a2) /* D4C64 8013E564 24A30020 */ addiu $v1, $a1, 0x20 /* D4C68 8013E568 ACE30000 */ sw $v1, 0x0($a3) /* D4C6C 8013E56C 3C03E600 */ lui $v1, (0xE6000000 >> 16) /* D4C70 8013E570 ACA30008 */ sw $v1, 0x8($a1) /* D4C74 8013E574 3C03F400 */ lui $v1, (0xF4000000 >> 16) /* D4C78 8013E578 ACA30010 */ sw $v1, 0x10($a1) /* D4C7C 8013E57C 3C03F548 */ lui $v1, (0xF5480000 >> 16) /* D4C80 8013E580 3C04E700 */ lui $a0, (0xE7000000 >> 16) /* D4C84 8013E584 ACA80004 */ sw $t0, 0x4($a1) /* D4C88 8013E588 ACA0000C */ sw $zero, 0xC($a1) /* D4C8C 8013E58C 00021042 */ srl $v0, $v0, 1 /* D4C90 8013E590 24420007 */ addiu $v0, $v0, 0x7 /* D4C94 8013E594 000210C3 */ sra $v0, $v0, 3 /* D4C98 8013E598 304201FF */ andi $v0, $v0, 0x1FF /* D4C9C 8013E59C 00021240 */ sll $v0, $v0, 9 /* D4CA0 8013E5A0 00431025 */ or $v0, $v0, $v1 /* D4CA4 8013E5A4 ACA20000 */ sw $v0, 0x0($a1) /* D4CA8 8013E5A8 94C20008 */ lhu $v0, 0x8($a2) /* D4CAC 8013E5AC 94C3000A */ lhu $v1, 0xA($a2) /* D4CB0 8013E5B0 3C08F540 */ lui $t0, (0xF5400000 >> 16) /* D4CB4 8013E5B4 ACA40018 */ sw $a0, 0x18($a1) /* D4CB8 8013E5B8 3C040700 */ lui $a0, (0x7000000 >> 16) /* D4CBC 8013E5BC ACA0001C */ sw $zero, 0x1C($a1) /* D4CC0 8013E5C0 2442FFFF */ addiu $v0, $v0, -0x1 /* D4CC4 8013E5C4 00021040 */ sll $v0, $v0, 1 /* D4CC8 8013E5C8 30420FFF */ andi $v0, $v0, 0xFFF /* D4CCC 8013E5CC 00021300 */ sll $v0, $v0, 12 /* D4CD0 8013E5D0 2463FFFF */ addiu $v1, $v1, -0x1 /* D4CD4 8013E5D4 00031880 */ sll $v1, $v1, 2 /* D4CD8 8013E5D8 30630FFF */ andi $v1, $v1, 0xFFF /* D4CDC 8013E5DC 00641825 */ or $v1, $v1, $a0 /* D4CE0 8013E5E0 00431025 */ or $v0, $v0, $v1 /* D4CE4 8013E5E4 24A30028 */ addiu $v1, $a1, 0x28 /* D4CE8 8013E5E8 ACA20014 */ sw $v0, 0x14($a1) /* D4CEC 8013E5EC 94C20008 */ lhu $v0, 0x8($a2) /* D4CF0 8013E5F0 3C040100 */ lui $a0, (0x1000000 >> 16) /* D4CF4 8013E5F4 ACE30000 */ sw $v1, 0x0($a3) /* D4CF8 8013E5F8 ACAA0024 */ sw $t2, 0x24($a1) /* D4CFC 8013E5FC ACA90028 */ sw $t1, 0x28($a1) /* D4D00 8013E600 00021042 */ srl $v0, $v0, 1 /* D4D04 8013E604 24420007 */ addiu $v0, $v0, 0x7 /* D4D08 8013E608 000210C3 */ sra $v0, $v0, 3 /* D4D0C 8013E60C 304201FF */ andi $v0, $v0, 0x1FF /* D4D10 8013E610 00021240 */ sll $v0, $v0, 9 /* D4D14 8013E614 00481025 */ or $v0, $v0, $t0 /* D4D18 8013E618 ACA20020 */ sw $v0, 0x20($a1) /* D4D1C 8013E61C 94C30008 */ lhu $v1, 0x8($a2) /* D4D20 8013E620 24A20030 */ addiu $v0, $a1, 0x30 /* D4D24 8013E624 ACE20000 */ sw $v0, 0x0($a3) /* D4D28 8013E628 94C2000A */ lhu $v0, 0xA($a2) /* D4D2C 8013E62C 006E1821 */ addu $v1, $v1, $t6 /* D4D30 8013E630 00031880 */ sll $v1, $v1, 2 /* D4D34 8013E634 30630FFF */ andi $v1, $v1, 0xFFF /* D4D38 8013E638 00031B00 */ sll $v1, $v1, 12 /* D4D3C 8013E63C 004E1021 */ addu $v0, $v0, $t6 /* D4D40 8013E640 00021080 */ sll $v0, $v0, 2 /* D4D44 8013E644 30420FFF */ andi $v0, $v0, 0xFFF /* D4D48 8013E648 00441025 */ or $v0, $v0, $a0 /* D4D4C 8013E64C 00621825 */ or $v1, $v1, $v0 /* D4D50 8013E650 ACA3002C */ sw $v1, 0x2C($a1) /* D4D54 8013E654 94C20008 */ lhu $v0, 0x8($a2) /* D4D58 8013E658 24A30038 */ addiu $v1, $a1, 0x38 /* D4D5C 8013E65C ACE30000 */ sw $v1, 0x0($a3) /* D4D60 8013E660 00021042 */ srl $v0, $v0, 1 /* D4D64 8013E664 24420007 */ addiu $v0, $v0, 0x7 /* D4D68 8013E668 000210C3 */ sra $v0, $v0, 3 /* D4D6C 8013E66C 304201FF */ andi $v0, $v0, 0x1FF /* D4D70 8013E670 00021240 */ sll $v0, $v0, 9 /* D4D74 8013E674 00481025 */ or $v0, $v0, $t0 /* D4D78 8013E678 ACA20030 */ sw $v0, 0x30($a1) /* D4D7C 8013E67C 24A20040 */ addiu $v0, $a1, 0x40 /* D4D80 8013E680 ACAB0034 */ sw $t3, 0x34($a1) /* D4D84 8013E684 ACE20000 */ sw $v0, 0x0($a3) /* D4D88 8013E688 3C020200 */ lui $v0, (0x2000000 >> 16) /* D4D8C 8013E68C ACA2003C */ sw $v0, 0x3C($a1) /* D4D90 8013E690 24A20048 */ addiu $v0, $a1, 0x48 /* D4D94 8013E694 ACAC0038 */ sw $t4, 0x38($a1) /* D4D98 8013E698 ACE20000 */ sw $v0, 0x0($a3) /* D4D9C 8013E69C 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* D4DA0 8013E6A0 ACA20040 */ sw $v0, 0x40($a1) /* D4DA4 8013E6A4 ACAD0044 */ sw $t5, 0x44($a1) /* D4DA8 8013E6A8 92630002 */ lbu $v1, 0x2($s3) /* D4DAC 8013E6AC 24020002 */ addiu $v0, $zero, 0x2 /* D4DB0 8013E6B0 1062000D */ beq $v1, $v0, .L8013E6E8 /* D4DB4 8013E6B4 28620003 */ slti $v0, $v1, 0x3 /* D4DB8 8013E6B8 10400005 */ beqz $v0, .L8013E6D0 /* D4DBC 8013E6BC 24020007 */ addiu $v0, $zero, 0x7 /* D4DC0 8013E6C0 1060000D */ beqz $v1, .L8013E6F8 /* D4DC4 8013E6C4 00000000 */ nop /* D4DC8 8013E6C8 0804F9BE */ j .L8013E6F8 /* D4DCC 8013E6CC 00000000 */ nop .L8013E6D0: /* D4DD0 8013E6D0 10620008 */ beq $v1, $v0, .L8013E6F4 /* D4DD4 8013E6D4 2402000B */ addiu $v0, $zero, 0xB /* D4DD8 8013E6D8 14620007 */ bne $v1, $v0, .L8013E6F8 /* D4DDC 8013E6DC 00000000 */ nop /* D4DE0 8013E6E0 0804F9BE */ j .L8013E6F8 /* D4DE4 8013E6E4 240E00FF */ addiu $t6, $zero, 0xFF .L8013E6E8: /* D4DE8 8013E6E8 8E6E0038 */ lw $t6, 0x38($s3) /* D4DEC 8013E6EC 0804F9BE */ j .L8013E6F8 /* D4DF0 8013E6F0 00000000 */ nop .L8013E6F4: /* D4DF4 8013E6F4 240EFFFF */ addiu $t6, $zero, -0x1 .L8013E6F8: /* D4DF8 8013E6F8 3C028015 */ lui $v0, %hi(ImgFXCurrentTexturePtr) /* D4DFC 8013E6FC 8C42EE10 */ lw $v0, %lo(ImgFXCurrentTexturePtr)($v0) /* D4E00 8013E700 0280202D */ daddu $a0, $s4, $zero /* D4E04 8013E704 94470008 */ lhu $a3, 0x8($v0) /* D4E08 8013E708 9442000A */ lhu $v0, 0xA($v0) /* D4E0C 8013E70C 0000282D */ daddu $a1, $zero, $zero /* D4E10 8013E710 AFAE0014 */ sw $t6, 0x14($sp) /* D4E14 8013E714 AFA20010 */ sw $v0, 0x10($sp) /* D4E18 8013E718 8E620078 */ lw $v0, 0x78($s3) /* D4E1C 8013E71C 00A0302D */ daddu $a2, $a1, $zero /* D4E20 8013E720 0C052071 */ jal create_shading_palette /* D4E24 8013E724 AFA20018 */ sw $v0, 0x18($sp) /* D4E28 8013E728 0804FA25 */ j .L8013E894 /* D4E2C 8013E72C 3C07D838 */ lui $a3, (0xD8380002 >> 16) .L8013E730: /* D4E30 8013E730 3C08070A */ lui $t0, (0x70A0280 >> 16) .L8013E734: /* D4E34 8013E734 35080280 */ ori $t0, $t0, (0x70A0280 & 0xFFFF) /* D4E38 8013E738 3C0A000A */ lui $t2, (0xA0280 >> 16) /* D4E3C 8013E73C 354A0280 */ ori $t2, $t2, (0xA0280 & 0xFFFF) /* D4E40 8013E740 3C09F240 */ lui $t1, (0xF2400400 >> 16) /* D4E44 8013E744 3C07800A */ lui $a3, %hi(gMainGfxPos) /* D4E48 8013E748 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* D4E4C 8013E74C 8CE50000 */ lw $a1, 0x0($a3) /* D4E50 8013E750 35290400 */ ori $t1, $t1, (0xF2400400 & 0xFFFF) /* D4E54 8013E754 00A0202D */ daddu $a0, $a1, $zero /* D4E58 8013E758 24A50008 */ addiu $a1, $a1, 0x8 /* D4E5C 8013E75C ACE50000 */ sw $a1, 0x0($a3) /* D4E60 8013E760 3C068015 */ lui $a2, %hi(ImgFXCurrentTexturePtr) /* D4E64 8013E764 8CC6EE10 */ lw $a2, %lo(ImgFXCurrentTexturePtr)($a2) /* D4E68 8013E768 24A20008 */ addiu $v0, $a1, 0x8 /* D4E6C 8013E76C ACE20000 */ sw $v0, 0x0($a3) /* D4E70 8013E770 94C20008 */ lhu $v0, 0x8($a2) /* D4E74 8013E774 24A30010 */ addiu $v1, $a1, 0x10 /* D4E78 8013E778 ACE30000 */ sw $v1, 0x0($a3) /* D4E7C 8013E77C 3C03FD48 */ lui $v1, (0xFD480000 >> 16) /* D4E80 8013E780 00021042 */ srl $v0, $v0, 1 /* D4E84 8013E784 2442FFFF */ addiu $v0, $v0, -0x1 /* D4E88 8013E788 30420FFF */ andi $v0, $v0, 0xFFF /* D4E8C 8013E78C 00431025 */ or $v0, $v0, $v1 /* D4E90 8013E790 AC820000 */ sw $v0, 0x0($a0) /* D4E94 8013E794 8CC30000 */ lw $v1, 0x0($a2) /* D4E98 8013E798 24A20018 */ addiu $v0, $a1, 0x18 /* D4E9C 8013E79C ACE20000 */ sw $v0, 0x0($a3) /* D4EA0 8013E7A0 AC830004 */ sw $v1, 0x4($a0) /* D4EA4 8013E7A4 94C20008 */ lhu $v0, 0x8($a2) /* D4EA8 8013E7A8 24A30020 */ addiu $v1, $a1, 0x20 /* D4EAC 8013E7AC ACE30000 */ sw $v1, 0x0($a3) /* D4EB0 8013E7B0 3C03E600 */ lui $v1, (0xE6000000 >> 16) /* D4EB4 8013E7B4 ACA30008 */ sw $v1, 0x8($a1) /* D4EB8 8013E7B8 3C03F400 */ lui $v1, (0xF4000000 >> 16) /* D4EBC 8013E7BC ACA30010 */ sw $v1, 0x10($a1) /* D4EC0 8013E7C0 3C03F548 */ lui $v1, (0xF5480000 >> 16) /* D4EC4 8013E7C4 ACA80004 */ sw $t0, 0x4($a1) /* D4EC8 8013E7C8 ACA0000C */ sw $zero, 0xC($a1) /* D4ECC 8013E7CC 00021042 */ srl $v0, $v0, 1 /* D4ED0 8013E7D0 24420007 */ addiu $v0, $v0, 0x7 /* D4ED4 8013E7D4 000210C3 */ sra $v0, $v0, 3 /* D4ED8 8013E7D8 304201FF */ andi $v0, $v0, 0x1FF /* D4EDC 8013E7DC 00021240 */ sll $v0, $v0, 9 /* D4EE0 8013E7E0 00431025 */ or $v0, $v0, $v1 /* D4EE4 8013E7E4 ACA20000 */ sw $v0, 0x0($a1) /* D4EE8 8013E7E8 94C20008 */ lhu $v0, 0x8($a2) /* D4EEC 8013E7EC 94C3000A */ lhu $v1, 0xA($a2) /* D4EF0 8013E7F0 3C04E700 */ lui $a0, (0xE7000000 >> 16) /* D4EF4 8013E7F4 ACA40018 */ sw $a0, 0x18($a1) /* D4EF8 8013E7F8 3C040700 */ lui $a0, (0x7000000 >> 16) /* D4EFC 8013E7FC ACA0001C */ sw $zero, 0x1C($a1) /* D4F00 8013E800 2442FFFF */ addiu $v0, $v0, -0x1 /* D4F04 8013E804 00021040 */ sll $v0, $v0, 1 /* D4F08 8013E808 30420FFF */ andi $v0, $v0, 0xFFF /* D4F0C 8013E80C 00021300 */ sll $v0, $v0, 12 /* D4F10 8013E810 2463FFFF */ addiu $v1, $v1, -0x1 /* D4F14 8013E814 00031880 */ sll $v1, $v1, 2 /* D4F18 8013E818 30630FFF */ andi $v1, $v1, 0xFFF /* D4F1C 8013E81C 00641825 */ or $v1, $v1, $a0 /* D4F20 8013E820 00431025 */ or $v0, $v0, $v1 /* D4F24 8013E824 ACA20014 */ sw $v0, 0x14($a1) /* D4F28 8013E828 94C20008 */ lhu $v0, 0x8($a2) /* D4F2C 8013E82C 24A30028 */ addiu $v1, $a1, 0x28 /* D4F30 8013E830 ACE30000 */ sw $v1, 0x0($a3) /* D4F34 8013E834 3C03F540 */ lui $v1, (0xF5400000 >> 16) /* D4F38 8013E838 ACAA0024 */ sw $t2, 0x24($a1) /* D4F3C 8013E83C ACA90028 */ sw $t1, 0x28($a1) /* D4F40 8013E840 00021042 */ srl $v0, $v0, 1 /* D4F44 8013E844 24420007 */ addiu $v0, $v0, 0x7 /* D4F48 8013E848 000210C3 */ sra $v0, $v0, 3 /* D4F4C 8013E84C 304201FF */ andi $v0, $v0, 0x1FF /* D4F50 8013E850 00021240 */ sll $v0, $v0, 9 /* D4F54 8013E854 00431025 */ or $v0, $v0, $v1 /* D4F58 8013E858 ACA20020 */ sw $v0, 0x20($a1) /* D4F5C 8013E85C 94C30008 */ lhu $v1, 0x8($a2) /* D4F60 8013E860 24A20030 */ addiu $v0, $a1, 0x30 /* D4F64 8013E864 ACE20000 */ sw $v0, 0x0($a3) /* D4F68 8013E868 94C2000A */ lhu $v0, 0xA($a2) /* D4F6C 8013E86C 246300FF */ addiu $v1, $v1, 0xFF /* D4F70 8013E870 00031880 */ sll $v1, $v1, 2 /* D4F74 8013E874 30630FFF */ andi $v1, $v1, 0xFFF /* D4F78 8013E878 00031B00 */ sll $v1, $v1, 12 /* D4F7C 8013E87C 244200FF */ addiu $v0, $v0, 0xFF /* D4F80 8013E880 00021080 */ sll $v0, $v0, 2 /* D4F84 8013E884 30420FFF */ andi $v0, $v0, 0xFFF /* D4F88 8013E888 00621825 */ or $v1, $v1, $v0 /* D4F8C 8013E88C ACA3002C */ sw $v1, 0x2C($a1) .L8013E890: /* D4F90 8013E890 3C07D838 */ lui $a3, (0xD8380002 >> 16) .L8013E894: /* D4F94 8013E894 3C05800A */ lui $a1, %hi(gMainGfxPos) /* D4F98 8013E898 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* D4F9C 8013E89C 8CA40000 */ lw $a0, 0x0($a1) /* D4FA0 8013E8A0 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* D4FA4 8013E8A4 0080302D */ daddu $a2, $a0, $zero /* D4FA8 8013E8A8 24840008 */ addiu $a0, $a0, 0x8 /* D4FAC 8013E8AC ACA40000 */ sw $a0, 0x0($a1) /* D4FB0 8013E8B0 3C028007 */ lui $v0, %hi(gCurrentDisplayContextIndex) /* D4FB4 8013E8B4 8C4241F4 */ lw $v0, %lo(gCurrentDisplayContextIndex)($v0) /* D4FB8 8013E8B8 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* D4FBC 8013E8BC ACC30000 */ sw $v1, 0x0($a2) /* D4FC0 8013E8C0 00021080 */ sll $v0, $v0, 2 /* D4FC4 8013E8C4 02621021 */ addu $v0, $s3, $v0 /* D4FC8 8013E8C8 8C430070 */ lw $v1, 0x70($v0) /* D4FCC 8013E8CC 24820008 */ addiu $v0, $a0, 0x8 /* D4FD0 8013E8D0 ACA20000 */ sw $v0, 0x0($a1) /* D4FD4 8013E8D4 24020040 */ addiu $v0, $zero, 0x40 /* D4FD8 8013E8D8 ACC30004 */ sw $v1, 0x4($a2) /* D4FDC 8013E8DC AC870000 */ sw $a3, 0x0($a0) /* D4FE0 8013E8E0 AC820004 */ sw $v0, 0x4($a0) .L8013E8E4: /* D4FE4 8013E8E4 8FBF0034 */ lw $ra, 0x34($sp) /* D4FE8 8013E8E8 8FB40030 */ lw $s4, 0x30($sp) /* D4FEC 8013E8EC 8FB3002C */ lw $s3, 0x2C($sp) /* D4FF0 8013E8F0 8FB20028 */ lw $s2, 0x28($sp) /* D4FF4 8013E8F4 8FB10024 */ lw $s1, 0x24($sp) /* D4FF8 8013E8F8 8FB00020 */ lw $s0, 0x20($sp) /* D4FFC 8013E8FC 03E00008 */ jr $ra /* D5000 8013E900 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void imgfx_appendGfx_mesh_anim(ImgFXState* state, Matrix4f mtx) { if (state->vtxBufs[gCurrentDisplayContextIndex] == NULL || state->gfxBufs[gCurrentDisplayContextIndex] == NULL) { return; } guScale(&gDisplayContext->matrixStack[gMatrixListPos], 0.1f, 0.1f, 0.1f); gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) { gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); gDPLoadTLUT_pal16(gMainGfxPos++, 0, ImgFXCurrentTexturePtr->tex.palette); if ((gSpriteShadingProfile->flags & 1) && (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 || state->renderType == IMGFX_RENDER_ANIM) ) { s32 alpha = 255; gDPScrollMultiTile2_4b(gMainGfxPos++, ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI, ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, 0, 0, ImgFXCurrentTexturePtr->tex.width - 1, ImgFXCurrentTexturePtr->tex.height - 1, 0, G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD, 256, 256); gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 252, 0); switch (state->renderType) { case IMGFX_RENDER_DEFAULT: case IMGFX_RENDER_ANIM: 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, 0, 0, ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, alpha, state->otherModeL); } else { gDPScrollTextureTile_4b(gMainGfxPos++, ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI, ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, 0, 0, ImgFXCurrentTexturePtr->tex.width - 1, ImgFXCurrentTexturePtr->tex.height - 1, 0, G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD, 256, 256); } } gSPDisplayList(gMainGfxPos++, state->gfxBufs[gCurrentDisplayContextIndex]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80143C48 /* DA348 80143C48 27BDFFB8 */ addiu $sp, $sp, -0x48 /* DA34C 80143C4C AFBE0040 */ sw $fp, 0x40($sp) /* DA350 80143C50 0080F02D */ daddu $fp, $a0, $zero /* DA354 80143C54 AFB10024 */ sw $s1, 0x24($sp) /* DA358 80143C58 00C0882D */ daddu $s1, $a2, $zero /* DA35C 80143C5C 3C02800B */ lui $v0, %hi(gCameras) /* DA360 80143C60 24421D80 */ addiu $v0, $v0, %lo(gCameras) /* DA364 80143C64 00111880 */ sll $v1, $s1, 2 /* DA368 80143C68 00711821 */ addu $v1, $v1, $s1 /* DA36C 80143C6C 00031880 */ sll $v1, $v1, 2 /* DA370 80143C70 00711823 */ subu $v1, $v1, $s1 /* DA374 80143C74 000320C0 */ sll $a0, $v1, 3 /* DA378 80143C78 00641821 */ addu $v1, $v1, $a0 /* DA37C 80143C7C 000318C0 */ sll $v1, $v1, 3 /* DA380 80143C80 AFB60038 */ sw $s6, 0x38($sp) /* DA384 80143C84 0062B021 */ addu $s6, $v1, $v0 /* DA388 80143C88 AFBF0044 */ sw $ra, 0x44($sp) /* DA38C 80143C8C AFB7003C */ sw $s7, 0x3C($sp) /* DA390 80143C90 AFB50034 */ sw $s5, 0x34($sp) /* DA394 80143C94 AFB40030 */ sw $s4, 0x30($sp) /* DA398 80143C98 AFB3002C */ sw $s3, 0x2C($sp) /* DA39C 80143C9C AFB20028 */ sw $s2, 0x28($sp) /* DA3A0 80143CA0 18A00133 */ blez $a1, .L80144170 /* DA3A4 80143CA4 AFB00020 */ sw $s0, 0x20($sp) /* DA3A8 80143CA8 96C20000 */ lhu $v0, 0x0($s6) /* DA3AC 80143CAC 1040014E */ beqz $v0, .L801441E8 /* DA3B0 80143CB0 30420002 */ andi $v0, $v0, 0x2 /* DA3B4 80143CB4 1440014C */ bnez $v0, .L801441E8 /* DA3B8 80143CB8 3C02DC08 */ lui $v0, (0xDC080008 >> 16) /* DA3BC 80143CBC 34420008 */ ori $v0, $v0, (0xDC080008 & 0xFFFF) /* DA3C0 80143CC0 3C04D9C0 */ lui $a0, (0xD9C0F9FB >> 16) /* DA3C4 80143CC4 3484F9FB */ ori $a0, $a0, (0xD9C0F9FB & 0xFFFF) /* DA3C8 80143CC8 3C05E300 */ lui $a1, (0xE3000800 >> 16) /* DA3CC 80143CCC 34A50800 */ ori $a1, $a1, (0xE3000800 & 0xFFFF) /* DA3D0 80143CD0 3C06E300 */ lui $a2, (0xE3001001 >> 16) /* DA3D4 80143CD4 34C61001 */ ori $a2, $a2, (0xE3001001 & 0xFFFF) /* DA3D8 80143CD8 3C07E300 */ lui $a3, (0xE3001201 >> 16) /* DA3DC 80143CDC 34E71201 */ ori $a3, $a3, (0xE3001201 & 0xFFFF) /* DA3E0 80143CE0 3C0AFCFF */ lui $t2, (0xFCFFFFFF >> 16) /* DA3E4 80143CE4 354AFFFF */ ori $t2, $t2, (0xFCFFFFFF & 0xFFFF) /* DA3E8 80143CE8 3C08FFFE */ lui $t0, (0xFFFE793C >> 16) /* DA3EC 80143CEC 3508793C */ ori $t0, $t0, (0xFFFE793C & 0xFFFF) /* DA3F0 80143CF0 3C0BE200 */ lui $t3, (0xE200001C >> 16) /* DA3F4 80143CF4 356B001C */ ori $t3, $t3, (0xE200001C & 0xFFFF) /* DA3F8 80143CF8 3C090F0A */ lui $t1, (0xF0A4000 >> 16) /* DA3FC 80143CFC 35294000 */ ori $t1, $t1, (0xF0A4000 & 0xFFFF) /* DA400 80143D00 3C0CDB04 */ lui $t4, (0xDB040004 >> 16) /* DA404 80143D04 358C0004 */ ori $t4, $t4, (0xDB040004 & 0xFFFF) /* DA408 80143D08 3C0DDB04 */ lui $t5, (0xDB04000C >> 16) /* DA40C 80143D0C 35AD000C */ ori $t5, $t5, (0xDB04000C & 0xFFFF) /* DA410 80143D10 3C0EDB04 */ lui $t6, (0xDB040014 >> 16) /* DA414 80143D14 35CE0014 */ ori $t6, $t6, (0xDB040014 & 0xFFFF) /* DA418 80143D18 3C0FDB04 */ lui $t7, (0xDB04001C >> 16) /* DA41C 80143D1C 35EF001C */ ori $t7, $t7, (0xDB04001C & 0xFFFF) /* DA420 80143D20 3C14E300 */ lui $s4, (0xE3000A01 >> 16) /* DA424 80143D24 36940A01 */ ori $s4, $s4, (0xE3000A01 & 0xFFFF) /* DA428 80143D28 3C15FF10 */ lui $s5, (0xFF10013F >> 16) /* DA42C 80143D2C 36B5013F */ ori $s5, $s5, (0xFF10013F & 0xFFFF) /* DA430 80143D30 3C12800A */ lui $s2, %hi(gMainGfxPos) /* DA434 80143D34 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* DA438 80143D38 8E500000 */ lw $s0, 0x0($s2) /* DA43C 80143D3C 3C13E700 */ lui $s3, (0xE7000000 >> 16) /* DA440 80143D40 3C01800A */ lui $at, %hi(gCurrentCamID) /* DA444 80143D44 A431A634 */ sh $s1, %lo(gCurrentCamID)($at) /* DA448 80143D48 0200182D */ daddu $v1, $s0, $zero /* DA44C 80143D4C 26100008 */ addiu $s0, $s0, 0x8 /* DA450 80143D50 AE500000 */ sw $s0, 0x0($s2) /* DA454 80143D54 AC620000 */ sw $v0, 0x0($v1) /* DA458 80143D58 26C200A0 */ addiu $v0, $s6, 0xA0 /* DA45C 80143D5C AC620004 */ sw $v0, 0x4($v1) /* DA460 80143D60 26020008 */ addiu $v0, $s0, 0x8 /* DA464 80143D64 AE420000 */ sw $v0, 0x0($s2) /* DA468 80143D68 26020010 */ addiu $v0, $s0, 0x10 /* DA46C 80143D6C AE040000 */ sw $a0, 0x0($s0) /* DA470 80143D70 AE000004 */ sw $zero, 0x4($s0) /* DA474 80143D74 AE420000 */ sw $v0, 0x0($s2) /* DA478 80143D78 3C02D700 */ lui $v0, (0xD7000000 >> 16) /* DA47C 80143D7C AE020008 */ sw $v0, 0x8($s0) /* DA480 80143D80 26020018 */ addiu $v0, $s0, 0x18 /* DA484 80143D84 AE00000C */ sw $zero, 0xC($s0) /* DA488 80143D88 AE420000 */ sw $v0, 0x0($s2) /* DA48C 80143D8C 26020020 */ addiu $v0, $s0, 0x20 /* DA490 80143D90 AE050010 */ sw $a1, 0x10($s0) /* DA494 80143D94 AE000014 */ sw $zero, 0x14($s0) /* DA498 80143D98 AE420000 */ sw $v0, 0x0($s2) /* DA49C 80143D9C 26020028 */ addiu $v0, $s0, 0x28 /* DA4A0 80143DA0 AE060018 */ sw $a2, 0x18($s0) /* DA4A4 80143DA4 AE00001C */ sw $zero, 0x1C($s0) /* DA4A8 80143DA8 AE420000 */ sw $v0, 0x0($s2) /* DA4AC 80143DAC 24022000 */ addiu $v0, $zero, 0x2000 /* DA4B0 80143DB0 AE020024 */ sw $v0, 0x24($s0) /* DA4B4 80143DB4 26020030 */ addiu $v0, $s0, 0x30 /* DA4B8 80143DB8 AE070020 */ sw $a3, 0x20($s0) /* DA4BC 80143DBC AE420000 */ sw $v0, 0x0($s2) /* DA4C0 80143DC0 26020038 */ addiu $v0, $s0, 0x38 /* DA4C4 80143DC4 AE0A0028 */ sw $t2, 0x28($s0) /* DA4C8 80143DC8 AE08002C */ sw $t0, 0x2C($s0) /* DA4CC 80143DCC AE420000 */ sw $v0, 0x0($s2) /* DA4D0 80143DD0 26020040 */ addiu $v0, $s0, 0x40 /* DA4D4 80143DD4 24030002 */ addiu $v1, $zero, 0x2 /* DA4D8 80143DD8 AE0B0030 */ sw $t3, 0x30($s0) /* DA4DC 80143DDC AE090034 */ sw $t1, 0x34($s0) /* DA4E0 80143DE0 AE420000 */ sw $v0, 0x0($s2) /* DA4E4 80143DE4 26020048 */ addiu $v0, $s0, 0x48 /* DA4E8 80143DE8 AE0C0038 */ sw $t4, 0x38($s0) /* DA4EC 80143DEC AE03003C */ sw $v1, 0x3C($s0) /* DA4F0 80143DF0 AE420000 */ sw $v0, 0x0($s2) /* DA4F4 80143DF4 26020050 */ addiu $v0, $s0, 0x50 /* DA4F8 80143DF8 AE030044 */ sw $v1, 0x44($s0) /* DA4FC 80143DFC 3403FFFE */ ori $v1, $zero, 0xFFFE /* DA500 80143E00 AE0D0040 */ sw $t5, 0x40($s0) /* DA504 80143E04 AE420000 */ sw $v0, 0x0($s2) /* DA508 80143E08 AE0E0048 */ sw $t6, 0x48($s0) /* DA50C 80143E0C 3C04800A */ lui $a0, %hi(nuGfxZBuffer) /* DA510 80143E10 8C84A5DC */ lw $a0, %lo(nuGfxZBuffer)($a0) /* DA514 80143E14 26020058 */ addiu $v0, $s0, 0x58 /* DA518 80143E18 AE03004C */ sw $v1, 0x4C($s0) /* DA51C 80143E1C AE420000 */ sw $v0, 0x0($s2) /* DA520 80143E20 26020060 */ addiu $v0, $s0, 0x60 /* DA524 80143E24 AE0F0050 */ sw $t7, 0x50($s0) /* DA528 80143E28 AE030054 */ sw $v1, 0x54($s0) /* DA52C 80143E2C AE420000 */ sw $v0, 0x0($s2) /* DA530 80143E30 26020068 */ addiu $v0, $s0, 0x68 /* DA534 80143E34 AE130058 */ sw $s3, 0x58($s0) /* DA538 80143E38 AE00005C */ sw $zero, 0x5C($s0) /* DA53C 80143E3C AE420000 */ sw $v0, 0x0($s2) /* DA540 80143E40 3C020030 */ lui $v0, (0x300000 >> 16) /* DA544 80143E44 AE020064 */ sw $v0, 0x64($s0) /* DA548 80143E48 26020070 */ addiu $v0, $s0, 0x70 /* DA54C 80143E4C AE140060 */ sw $s4, 0x60($s0) /* DA550 80143E50 AE420000 */ sw $v0, 0x0($s2) /* DA554 80143E54 0C0187A4 */ jal osVirtualToPhysical /* DA558 80143E58 AE150068 */ sw $s5, 0x68($s0) /* DA55C 80143E5C 3C05FFFC */ lui $a1, (0xFFFCFFFC >> 16) /* DA560 80143E60 8E510000 */ lw $s1, 0x0($s2) /* DA564 80143E64 34A5FFFC */ ori $a1, $a1, (0xFFFCFFFC & 0xFFFF) /* DA568 80143E68 AE02006C */ sw $v0, 0x6C($s0) /* DA56C 80143E6C 3C02F700 */ lui $v0, (0xF7000000 >> 16) /* DA570 80143E70 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) /* DA574 80143E74 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) /* DA578 80143E78 0220182D */ daddu $v1, $s1, $zero /* DA57C 80143E7C 26310008 */ addiu $s1, $s1, 0x8 /* DA580 80143E80 AE510000 */ sw $s1, 0x0($s2) /* DA584 80143E84 AC620000 */ sw $v0, 0x0($v1) /* DA588 80143E88 26220008 */ addiu $v0, $s1, 0x8 /* DA58C 80143E8C AC650004 */ sw $a1, 0x4($v1) /* DA590 80143E90 AE420000 */ sw $v0, 0x0($s2) /* DA594 80143E94 86C3000E */ lh $v1, 0xE($s6) /* DA598 80143E98 86C5000A */ lh $a1, 0xA($s6) /* DA59C 80143E9C 26220010 */ addiu $v0, $s1, 0x10 /* DA5A0 80143EA0 AE420000 */ sw $v0, 0x0($s2) /* DA5A4 80143EA4 86C20010 */ lh $v0, 0x10($s6) /* DA5A8 80143EA8 00651821 */ addu $v1, $v1, $a1 /* DA5AC 80143EAC 2463FFFF */ addiu $v1, $v1, -0x1 /* DA5B0 80143EB0 306303FF */ andi $v1, $v1, 0x3FF /* DA5B4 80143EB4 86C5000C */ lh $a1, 0xC($s6) /* DA5B8 80143EB8 00031B80 */ sll $v1, $v1, 14 /* DA5BC 80143EBC 00451021 */ addu $v0, $v0, $a1 /* DA5C0 80143EC0 2442FFFF */ addiu $v0, $v0, -0x1 /* DA5C4 80143EC4 304203FF */ andi $v0, $v0, 0x3FF /* DA5C8 80143EC8 00021080 */ sll $v0, $v0, 2 /* DA5CC 80143ECC 3C05F600 */ lui $a1, (0xF6000000 >> 16) /* DA5D0 80143ED0 00451025 */ or $v0, $v0, $a1 /* DA5D4 80143ED4 00621825 */ or $v1, $v1, $v0 /* DA5D8 80143ED8 AE230000 */ sw $v1, 0x0($s1) /* DA5DC 80143EDC 96C2000E */ lhu $v0, 0xE($s6) /* DA5E0 80143EE0 96C50010 */ lhu $a1, 0x10($s6) /* DA5E4 80143EE4 26230018 */ addiu $v1, $s1, 0x18 /* DA5E8 80143EE8 AE430000 */ sw $v1, 0x0($s2) /* DA5EC 80143EEC AE330008 */ sw $s3, 0x8($s1) /* DA5F0 80143EF0 AE20000C */ sw $zero, 0xC($s1) /* DA5F4 80143EF4 AE350010 */ sw $s5, 0x10($s1) /* DA5F8 80143EF8 304203FF */ andi $v0, $v0, 0x3FF /* DA5FC 80143EFC 00021380 */ sll $v0, $v0, 14 /* DA600 80143F00 30A503FF */ andi $a1, $a1, 0x3FF /* DA604 80143F04 00052880 */ sll $a1, $a1, 2 /* DA608 80143F08 00451025 */ or $v0, $v0, $a1 /* DA60C 80143F0C 0C0187A4 */ jal osVirtualToPhysical /* DA610 80143F10 AE220004 */ sw $v0, 0x4($s1) /* DA614 80143F14 26D000D4 */ addiu $s0, $s6, 0xD4 /* DA618 80143F18 8E430000 */ lw $v1, 0x0($s2) /* DA61C 80143F1C 44800000 */ mtc1 $zero, $f0 /* DA620 80143F20 3C01447A */ lui $at, (0x447A0000 >> 16) /* DA624 80143F24 44811000 */ mtc1 $at, $f2 /* DA628 80143F28 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DA62C 80143F2C 44812000 */ mtc1 $at, $f4 /* DA630 80143F30 3C0643A0 */ lui $a2, (0x43A00000 >> 16) /* DA634 80143F34 3C07C370 */ lui $a3, (0xC3700000 >> 16) /* DA638 80143F38 0200202D */ daddu $a0, $s0, $zero /* DA63C 80143F3C AE220014 */ sw $v0, 0x14($s1) /* DA640 80143F40 0060102D */ daddu $v0, $v1, $zero /* DA644 80143F44 44050000 */ mfc1 $a1, $f0 /* DA648 80143F48 3C01C47A */ lui $at, (0xC47A0000 >> 16) /* DA64C 80143F4C 44810000 */ mtc1 $at, $f0 /* DA650 80143F50 24630008 */ addiu $v1, $v1, 0x8 /* DA654 80143F54 AE430000 */ sw $v1, 0x0($s2) /* DA658 80143F58 AC530000 */ sw $s3, 0x0($v0) /* DA65C 80143F5C AC400004 */ sw $zero, 0x4($v0) /* DA660 80143F60 E7A20018 */ swc1 $f2, 0x18($sp) /* DA664 80143F64 E7A4001C */ swc1 $f4, 0x1C($sp) /* DA668 80143F68 AFA50010 */ sw $a1, 0x10($sp) /* DA66C 80143F6C 0C018E44 */ jal guOrthoF /* DA670 80143F70 E7A00014 */ swc1 $f0, 0x14($sp) /* DA674 80143F74 0200202D */ daddu $a0, $s0, $zero /* DA678 80143F78 3C10800A */ lui $s0, %hi(gDisplayContext) /* DA67C 80143F7C 2610A674 */ addiu $s0, $s0, %lo(gDisplayContext) /* DA680 80143F80 3C05800A */ lui $a1, %hi(gCurrentCamID) /* DA684 80143F84 84A5A634 */ lh $a1, %lo(gCurrentCamID)($a1) /* DA688 80143F88 8E020000 */ lw $v0, 0x0($s0) /* DA68C 80143F8C 00052980 */ sll $a1, $a1, 6 /* DA690 80143F90 24A50030 */ addiu $a1, $a1, 0x30 /* DA694 80143F94 0C019D40 */ jal guMtxF2L /* DA698 80143F98 00452821 */ addu $a1, $v0, $a1 /* DA69C 80143F9C 3C03DA38 */ lui $v1, (0xDA380007 >> 16) /* DA6A0 80143FA0 34630007 */ ori $v1, $v1, (0xDA380007 & 0xFFFF) /* DA6A4 80143FA4 3C07ED03 */ lui $a3, (0xED030050 >> 16) /* DA6A8 80143FA8 34E70050 */ ori $a3, $a3, (0xED030050 & 0xFFFF) /* DA6AC 80143FAC 3C06004D */ lui $a2, (0x4D0370 >> 16) /* DA6B0 80143FB0 34C60370 */ ori $a2, $a2, (0x4D0370 & 0xFFFF) /* DA6B4 80143FB4 3C08D9C0 */ lui $t0, (0xD9C0F9FA >> 16) /* DA6B8 80143FB8 3508F9FA */ ori $t0, $t0, (0xD9C0F9FA & 0xFFFF) /* DA6BC 80143FBC 3C0AD9FF */ lui $t2, (0xD9FFFFFF >> 16) /* DA6C0 80143FC0 354AFFFF */ ori $t2, $t2, (0xD9FFFFFF & 0xFFFF) /* DA6C4 80143FC4 3C090022 */ lui $t1, (0x220005 >> 16) /* DA6C8 80143FC8 35290005 */ ori $t1, $t1, (0x220005 & 0xFFFF) /* DA6CC 80143FCC 3C0BDC08 */ lui $t3, (0xDC08060A >> 16) /* DA6D0 80143FD0 356B060A */ ori $t3, $t3, (0xDC08060A & 0xFFFF) /* DA6D4 80143FD4 3C0CDC08 */ lui $t4, (0xDC08090A >> 16) /* DA6D8 80143FD8 358C090A */ ori $t4, $t4, (0xDC08090A & 0xFFFF) /* DA6DC 80143FDC 3C0DD700 */ lui $t5, (0xD7000002 >> 16) /* DA6E0 80143FE0 35AD0002 */ ori $t5, $t5, (0xD7000002 & 0xFFFF) /* DA6E4 80143FE4 3C0EE300 */ lui $t6, (0xE3000F00 >> 16) /* DA6E8 80143FE8 35CE0F00 */ ori $t6, $t6, (0xE3000F00 & 0xFFFF) /* DA6EC 80143FEC 3C0FE300 */ lui $t7, (0xE3000C00 >> 16) /* DA6F0 80143FF0 35EF0C00 */ ori $t7, $t7, (0xE3000C00 & 0xFFFF) /* DA6F4 80143FF4 3C11E300 */ lui $s1, (0xE3001801 >> 16) /* DA6F8 80143FF8 36311801 */ ori $s1, $s1, (0xE3001801 & 0xFFFF) /* DA6FC 80143FFC 3C15E300 */ lui $s5, (0xE3000D01 >> 16) /* DA700 80144000 36B50D01 */ ori $s5, $s5, (0xE3000D01 & 0xFFFF) /* DA704 80144004 3C16E300 */ lui $s6, (0xE3001402 >> 16) /* DA708 80144008 36D61402 */ ori $s6, $s6, (0xE3001402 & 0xFFFF) /* DA70C 8014400C 3C17E300 */ lui $s7, (0xE3001700 >> 16) /* DA710 80144010 36F71700 */ ori $s7, $s7, (0xE3001700 & 0xFFFF) /* DA714 80144014 3C18E200 */ lui $t8, (0xE2001E01 >> 16) /* DA718 80144018 37181E01 */ ori $t8, $t8, (0xE2001E01 & 0xFFFF) /* DA71C 8014401C 8E420000 */ lw $v0, 0x0($s2) /* DA720 80144020 3C04800A */ lui $a0, %hi(gCurrentCamID) /* DA724 80144024 8484A634 */ lh $a0, %lo(gCurrentCamID)($a0) /* DA728 80144028 0040282D */ daddu $a1, $v0, $zero /* DA72C 8014402C 24420008 */ addiu $v0, $v0, 0x8 /* DA730 80144030 00042180 */ sll $a0, $a0, 6 /* DA734 80144034 AE420000 */ sw $v0, 0x0($s2) /* DA738 80144038 ACA30000 */ sw $v1, 0x0($a1) /* DA73C 8014403C 8E030000 */ lw $v1, 0x0($s0) /* DA740 80144040 24840030 */ addiu $a0, $a0, 0x30 /* DA744 80144044 00641821 */ addu $v1, $v1, $a0 /* DA748 80144048 ACA30004 */ sw $v1, 0x4($a1) /* DA74C 8014404C 24430008 */ addiu $v1, $v0, 0x8 /* DA750 80144050 AE430000 */ sw $v1, 0x0($s2) /* DA754 80144054 24430010 */ addiu $v1, $v0, 0x10 /* DA758 80144058 AC470000 */ sw $a3, 0x0($v0) /* DA75C 8014405C AC460004 */ sw $a2, 0x4($v0) /* DA760 80144060 AE430000 */ sw $v1, 0x0($s2) /* DA764 80144064 24430018 */ addiu $v1, $v0, 0x18 /* DA768 80144068 AC530008 */ sw $s3, 0x8($v0) /* DA76C 8014406C AC40000C */ sw $zero, 0xC($v0) /* DA770 80144070 AE430000 */ sw $v1, 0x0($s2) /* DA774 80144074 24430020 */ addiu $v1, $v0, 0x20 /* DA778 80144078 AC540010 */ sw $s4, 0x10($v0) /* DA77C 8014407C AC400014 */ sw $zero, 0x14($v0) /* DA780 80144080 AE430000 */ sw $v1, 0x0($s2) /* DA784 80144084 24430028 */ addiu $v1, $v0, 0x28 /* DA788 80144088 AC480018 */ sw $t0, 0x18($v0) /* DA78C 8014408C AC40001C */ sw $zero, 0x1C($v0) /* DA790 80144090 AE430000 */ sw $v1, 0x0($s2) /* DA794 80144094 24430030 */ addiu $v1, $v0, 0x30 /* DA798 80144098 AC4A0020 */ sw $t2, 0x20($v0) /* DA79C 8014409C AC490024 */ sw $t1, 0x24($v0) /* DA7A0 801440A0 AE430000 */ sw $v1, 0x0($s2) /* DA7A4 801440A4 3C03DB02 */ lui $v1, (0xDB020000 >> 16) /* DA7A8 801440A8 AC430028 */ sw $v1, 0x28($v0) /* DA7AC 801440AC 24030018 */ addiu $v1, $zero, 0x18 /* DA7B0 801440B0 AC43002C */ sw $v1, 0x2C($v0) /* DA7B4 801440B4 24430038 */ addiu $v1, $v0, 0x38 /* DA7B8 801440B8 3C048015 */ lui $a0, %hi(D_8014F110) /* DA7BC 801440BC 2484F110 */ addiu $a0, $a0, %lo(D_8014F110) /* DA7C0 801440C0 AE430000 */ sw $v1, 0x0($s2) /* DA7C4 801440C4 24430040 */ addiu $v1, $v0, 0x40 /* DA7C8 801440C8 AC440034 */ sw $a0, 0x34($v0) /* DA7CC 801440CC 2484FFF8 */ addiu $a0, $a0, -0x8 /* DA7D0 801440D0 AC4B0030 */ sw $t3, 0x30($v0) /* DA7D4 801440D4 AE430000 */ sw $v1, 0x0($s2) /* DA7D8 801440D8 24430048 */ addiu $v1, $v0, 0x48 /* DA7DC 801440DC AC4C0038 */ sw $t4, 0x38($v0) /* DA7E0 801440E0 AC44003C */ sw $a0, 0x3C($v0) /* DA7E4 801440E4 AE430000 */ sw $v1, 0x0($s2) /* DA7E8 801440E8 2403FFFF */ addiu $v1, $zero, -0x1 /* DA7EC 801440EC AC430044 */ sw $v1, 0x44($v0) /* DA7F0 801440F0 24430050 */ addiu $v1, $v0, 0x50 /* DA7F4 801440F4 AC4D0040 */ sw $t5, 0x40($v0) /* DA7F8 801440F8 AE430000 */ sw $v1, 0x0($s2) /* DA7FC 801440FC 24430058 */ addiu $v1, $v0, 0x58 /* DA800 80144100 AC4E0048 */ sw $t6, 0x48($v0) /* DA804 80144104 AC40004C */ sw $zero, 0x4C($v0) /* DA808 80144108 AE430000 */ sw $v1, 0x0($s2) /* DA80C 8014410C 3C030008 */ lui $v1, (0x80000 >> 16) /* DA810 80144110 AC430054 */ sw $v1, 0x54($v0) /* DA814 80144114 24430060 */ addiu $v1, $v0, 0x60 /* DA818 80144118 AC4F0050 */ sw $t7, 0x50($v0) /* DA81C 8014411C AE430000 */ sw $v1, 0x0($s2) /* DA820 80144120 240300C0 */ addiu $v1, $zero, 0xC0 /* DA824 80144124 AC43005C */ sw $v1, 0x5C($v0) /* DA828 80144128 24430068 */ addiu $v1, $v0, 0x68 /* DA82C 8014412C AC510058 */ sw $s1, 0x58($v0) /* DA830 80144130 AE430000 */ sw $v1, 0x0($s2) /* DA834 80144134 24430070 */ addiu $v1, $v0, 0x70 /* DA838 80144138 AC550060 */ sw $s5, 0x60($v0) /* DA83C 8014413C AC400064 */ sw $zero, 0x64($v0) /* DA840 80144140 AE430000 */ sw $v1, 0x0($s2) /* DA844 80144144 24030C00 */ addiu $v1, $zero, 0xC00 /* DA848 80144148 AC43006C */ sw $v1, 0x6C($v0) /* DA84C 8014414C 24430078 */ addiu $v1, $v0, 0x78 /* DA850 80144150 AC560068 */ sw $s6, 0x68($v0) /* DA854 80144154 AE430000 */ sw $v1, 0x0($s2) /* DA858 80144158 24430080 */ addiu $v1, $v0, 0x80 /* DA85C 8014415C AC570070 */ sw $s7, 0x70($v0) /* DA860 80144160 AC400074 */ sw $zero, 0x74($v0) /* DA864 80144164 AE430000 */ sw $v1, 0x0($s2) /* DA868 80144168 AC580078 */ sw $t8, 0x78($v0) /* DA86C 8014416C AC40007C */ sw $zero, 0x7C($v0) .L80144170: /* DA870 80144170 07C0001D */ bltz $fp, .L801441E8 /* DA874 80144174 2402F7FF */ addiu $v0, $zero, -0x801 glabel func_80144178 /* DA878 80144178 03C2F024 */ and $fp, $fp, $v0 /* DA87C 8014417C 3C038015 */ lui $v1, %hi(gHudElements) /* DA880 80144180 8C637960 */ lw $v1, %lo(gHudElements)($v1) /* DA884 80144184 001E1080 */ sll $v0, $fp, 2 /* DA888 80144188 00431021 */ addu $v0, $v0, $v1 /* DA88C 8014418C 8C440000 */ lw $a0, 0x0($v0) /* DA890 80144190 10800015 */ beqz $a0, .L801441E8 glabel func_80144194 /* DA894 80144194 00000000 */ nop /* DA898 80144198 8C830000 */ lw $v1, 0x0($a0) /* DA89C 8014419C 10600012 */ beqz $v1, .L801441E8 /* DA8A0 801441A0 30620002 */ andi $v0, $v1, 0x2 /* DA8A4 801441A4 14400010 */ bnez $v0, .L801441E8 /* DA8A8 801441A8 3C021020 */ lui $v0, (0x10200000 >> 16) /* DA8AC 801441AC 00621024 */ and $v0, $v1, $v0 /* DA8B0 801441B0 1440000D */ bnez $v0, .L801441E8 /* DA8B4 801441B4 3C020001 */ lui $v0, (0x10000 >> 16) /* DA8B8 801441B8 00621024 */ and $v0, $v1, $v0 /* DA8BC 801441BC 1040000A */ beqz $v0, .L801441E8 /* DA8C0 801441C0 30620040 */ andi $v0, $v1, 0x40 /* DA8C4 801441C4 14400008 */ bnez $v0, .L801441E8 /* DA8C8 801441C8 00000000 */ nop /* DA8CC 801441CC 80820045 */ lb $v0, 0x45($a0) /* DA8D0 801441D0 04400005 */ bltz $v0, .L801441E8 /* DA8D4 801441D4 30620080 */ andi $v0, $v1, 0x80 /* DA8D8 801441D8 10400003 */ beqz $v0, .L801441E8 /* DA8DC 801441DC 00000000 */ nop /* DA8E0 801441E0 0C050AFF */ jal render_hud_element /* DA8E4 801441E4 00000000 */ nop .L801441E8: /* DA8E8 801441E8 8FBF0044 */ lw $ra, 0x44($sp) /* DA8EC 801441EC 8FBE0040 */ lw $fp, 0x40($sp) /* DA8F0 801441F0 8FB7003C */ lw $s7, 0x3C($sp) /* DA8F4 801441F4 8FB60038 */ lw $s6, 0x38($sp) /* DA8F8 801441F8 8FB50034 */ lw $s5, 0x34($sp) /* DA8FC 801441FC 8FB40030 */ lw $s4, 0x30($sp) glabel func_80144200 /* DA900 80144200 8FB3002C */ lw $s3, 0x2C($sp) /* DA904 80144204 8FB20028 */ lw $s2, 0x28($sp) /* DA908 80144208 8FB10024 */ lw $s1, 0x24($sp) /* DA90C 8014420C 8FB00020 */ lw $s0, 0x20($sp) /* DA910 80144210 03E00008 */ jr $ra /* DA914 80144214 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void func_80143C48(s32 elemID, s32 arg1, s32 camID) { Camera* camera = &gCameras[camID]; if (arg1 > 0) { if (camera->flags == 0 || (camera->flags & CAMERA_FLAG_DISABLED)) { return; } gCurrentCamID = camID; gSPViewport(gMainGfxPos++, &camera->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); gDPPipelineMode(gMainGfxPos++, G_PM_NPRIMITIVE); gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); gDPSetCombineMode(gMainGfxPos++, G_CC_SHADE, G_CC_SHADE); gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2); gDPPipeSync(gMainGfxPos++); //clear Z buffer inside camera viewport gDPSetCycleType(gMainGfxPos++, G_CYC_FILL); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxZBuffer)); gDPSetFillColor(gMainGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0)); gDPFillRectangle(gMainGfxPos++, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW - 1, camera->viewportStartY + camera->viewportH - 1); gDPPipeSync(gMainGfxPos++); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMainGfxPos++); guOrthoF(camera->perspectiveMatrix, 0.0f, 320.0f, -240.0f, 0.0f, -1000.0f, 1000.0f, 1.0f); guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]); gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220); gDPPipeSync(gMainGfxPos++); gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); 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_8014F108); gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP); gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP); gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT); gDPSetCombineKey(gMainGfxPos++, G_CK_NONE); gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); } if (elemID >= 0) { HudElement* elem; elemID &= ~HUD_ELEMENT_BATTLE_ID_MASK; elem = (*gHudElements)[elemID]; if (elem != NULL) { if (elem->flags && !(elem->flags & HUD_ELEMENT_FLAG_DISABLED)) { if (!(elem->flags & (HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_10000000))) { if (elem->flags & HUD_ELEMENT_FLAG_TRANSFORM) { if (!(elem->flags & HUD_ELEMENT_FLAG_FRONTUI) && (elem->drawSizePreset >= 0) && (elem->flags & HUD_ELEMENT_FLAG_80)) { render_hud_element(elem); } } } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel aura_appendGfx /* 3778CC E007685C 27BDFF00 */ addiu $sp, $sp, -0x100 /* 3778D0 E0076860 3C02DB06 */ lui $v0, (0xDB060024 >> 16) /* 3778D4 E0076864 34420024 */ ori $v0, $v0, (0xDB060024 & 0xFFFF) /* 3778D8 E0076868 3C09800A */ lui $t1, %hi(gMainGfxPos) /* 3778DC E007686C 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos) /* 3778E0 E0076870 AFBF00F4 */ sw $ra, 0xF4($sp) /* 3778E4 E0076874 AFB600F0 */ sw $s6, 0xF0($sp) /* 3778E8 E0076878 AFB500EC */ sw $s5, 0xEC($sp) /* 3778EC E007687C AFB400E8 */ sw $s4, 0xE8($sp) /* 3778F0 E0076880 AFB300E4 */ sw $s3, 0xE4($sp) /* 3778F4 E0076884 AFB200E0 */ sw $s2, 0xE0($sp) /* 3778F8 E0076888 AFB100DC */ sw $s1, 0xDC($sp) /* 3778FC E007688C AFB000D8 */ sw $s0, 0xD8($sp) /* 377900 E0076890 F7B400F8 */ sdc1 $f20, 0xF8($sp) /* 377904 E0076894 8C93000C */ lw $s3, 0xC($a0) /* 377908 E0076898 8D280000 */ lw $t0, 0x0($t1) /* 37790C E007689C 8E750000 */ lw $s5, 0x0($s3) /* 377910 E00768A0 8E760028 */ lw $s6, 0x28($s3) /* 377914 E00768A4 0100282D */ daddu $a1, $t0, $zero /* 377918 E00768A8 ACA20000 */ sw $v0, 0x0($a1) /* 37791C E00768AC 8C820010 */ lw $v0, 0x10($a0) /* 377920 E00768B0 3C038000 */ lui $v1, (0x80000000 >> 16) /* 377924 E00768B4 8C42001C */ lw $v0, 0x1C($v0) /* 377928 E00768B8 25080008 */ addiu $t0, $t0, 0x8 /* 37792C E00768BC 00431021 */ addu $v0, $v0, $v1 /* 377930 E00768C0 ACA20004 */ sw $v0, 0x4($a1) /* 377934 E00768C4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 377938 E00768C8 AD020000 */ sw $v0, 0x0($t0) /* 37793C E00768CC 00151080 */ sll $v0, $s5, 2 /* 377940 E00768D0 3C01E007 */ lui $at, (0xE0076ED0 >> 16) /* 377944 E00768D4 00220821 */ addu $at, $at, $v0 /* 377948 E00768D8 8C226ED0 */ lw $v0, (0xE0076ED0 & 0xFFFF)($at) /* 37794C E00768DC 27A40018 */ addiu $a0, $sp, 0x18 /* 377950 E00768E0 AD280000 */ sw $t0, 0x0($t1) /* 377954 E00768E4 AD020004 */ sw $v0, 0x4($t0) /* 377958 E00768E8 8E650010 */ lw $a1, 0x10($s3) /* 37795C E00768EC 8E660014 */ lw $a2, 0x14($s3) /* 377960 E00768F0 8E670018 */ lw $a3, 0x18($s3) /* 377964 E00768F4 25080008 */ addiu $t0, $t0, 0x8 /* 377968 E00768F8 0C080108 */ jal shim_guTranslateF /* 37796C E00768FC AD280000 */ sw $t0, 0x0($t1) /* 377970 E0076900 24020002 */ addiu $v0, $zero, 0x2 /* 377974 E0076904 16A20008 */ bne $s5, $v0, .LE0076928 /* 377978 E0076908 27A40058 */ addiu $a0, $sp, 0x58 /* 37797C E007690C 44800000 */ mtc1 $zero, $f0 /* 377980 E0076910 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 377984 E0076914 E7A00010 */ swc1 $f0, 0x10($sp) /* 377988 E0076918 8E650064 */ lw $a1, 0x64($s3) /* 37798C E007691C 44060000 */ mfc1 $a2, $f0 /* 377990 E0076920 0801DA5C */ j .LE0076970 /* 377994 E0076924 00000000 */ nop .LE0076928: /* 377998 E0076928 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 37799C E007692C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3779A0 E0076930 44800000 */ mtc1 $zero, $f0 /* 3779A4 E0076934 00031080 */ sll $v0, $v1, 2 /* 3779A8 E0076938 00431021 */ addu $v0, $v0, $v1 /* 3779AC E007693C 00021080 */ sll $v0, $v0, 2 /* 3779B0 E0076940 00431023 */ subu $v0, $v0, $v1 /* 3779B4 E0076944 000218C0 */ sll $v1, $v0, 3 /* 3779B8 E0076948 00431021 */ addu $v0, $v0, $v1 /* 3779BC E007694C 000210C0 */ sll $v0, $v0, 3 /* 3779C0 E0076950 44060000 */ mfc1 $a2, $f0 /* 3779C4 E0076954 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3779C8 E0076958 00220821 */ addu $at, $at, $v0 /* 3779CC E007695C C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 3779D0 E0076960 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 3779D4 E0076964 46000007 */ neg.s $f0, $f0 /* 3779D8 E0076968 44050000 */ mfc1 $a1, $f0 /* 3779DC E007696C AFA60010 */ sw $a2, 0x10($sp) .LE0076970: /* 3779E0 E0076970 0C080104 */ jal shim_guRotateF /* 3779E4 E0076974 00000000 */ nop /* 3779E8 E0076978 27B40058 */ addiu $s4, $sp, 0x58 /* 3779EC E007697C 0280202D */ daddu $a0, $s4, $zero /* 3779F0 E0076980 27A50018 */ addiu $a1, $sp, 0x18 /* 3779F4 E0076984 27B00098 */ addiu $s0, $sp, 0x98 /* 3779F8 E0076988 0C080114 */ jal shim_guMtxCatF /* 3779FC E007698C 0200302D */ daddu $a2, $s0, $zero /* 377A00 E0076990 8E65001C */ lw $a1, 0x1C($s3) /* 377A04 E0076994 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 377A08 E0076998 4481A000 */ mtc1 $at, $f20 /* 377A0C E007699C 8E660020 */ lw $a2, 0x20($s3) /* 377A10 E00769A0 4407A000 */ mfc1 $a3, $f20 /* 377A14 E00769A4 0C080110 */ jal shim_guScaleF /* 377A18 E00769A8 0280202D */ daddu $a0, $s4, $zero /* 377A1C E00769AC 0280202D */ daddu $a0, $s4, $zero /* 377A20 E00769B0 0200282D */ daddu $a1, $s0, $zero /* 377A24 E00769B4 0C080114 */ jal shim_guMtxCatF /* 377A28 E00769B8 0200302D */ daddu $a2, $s0, $zero /* 377A2C E00769BC 16A00016 */ bnez $s5, .LE0076A18 /* 377A30 E00769C0 3C120001 */ lui $s2, (0x11630 >> 16) /* 377A34 E00769C4 C660001C */ lwc1 $f0, 0x1C($s3) /* 377A38 E00769C8 C6640024 */ lwc1 $f4, 0x24($s3) /* 377A3C E00769CC 46040001 */ sub.s $f0, $f0, $f4 /* 377A40 E00769D0 3C014120 */ lui $at, (0x41200000 >> 16) /* 377A44 E00769D4 44811000 */ mtc1 $at, $f2 /* 377A48 E00769D8 46000007 */ neg.s $f0, $f0 /* 377A4C E00769DC 46040003 */ div.s $f0, $f0, $f4 /* 377A50 E00769E0 46020002 */ mul.s $f0, $f0, $f2 /* 377A54 E00769E4 00000000 */ nop /* 377A58 E00769E8 44050000 */ mfc1 $a1, $f0 /* 377A5C E00769EC 44800000 */ mtc1 $zero, $f0 /* 377A60 E00769F0 00000000 */ nop /* 377A64 E00769F4 44060000 */ mfc1 $a2, $f0 /* 377A68 E00769F8 0280202D */ daddu $a0, $s4, $zero /* 377A6C E00769FC 0C080108 */ jal shim_guTranslateF /* 377A70 E0076A00 00C0382D */ daddu $a3, $a2, $zero /* 377A74 E0076A04 0280202D */ daddu $a0, $s4, $zero /* 377A78 E0076A08 0200282D */ daddu $a1, $s0, $zero /* 377A7C E0076A0C 0C080114 */ jal shim_guMtxCatF /* 377A80 E0076A10 0200302D */ daddu $a2, $s0, $zero /* 377A84 E0076A14 3C120001 */ lui $s2, (0x11630 >> 16) .LE0076A18: /* 377A88 E0076A18 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 377A8C E0076A1C 0200202D */ daddu $a0, $s0, $zero /* 377A90 E0076A20 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 377A94 E0076A24 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 377A98 E0076A28 3C11800A */ lui $s1, %hi(gDisplayContext) /* 377A9C E0076A2C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 377AA0 E0076A30 96050000 */ lhu $a1, 0x0($s0) /* 377AA4 E0076A34 8E220000 */ lw $v0, 0x0($s1) /* 377AA8 E0076A38 00052980 */ sll $a1, $a1, 6 /* 377AAC E0076A3C 00B22821 */ addu $a1, $a1, $s2 /* 377AB0 E0076A40 0C080118 */ jal shim_guMtxF2L /* 377AB4 E0076A44 00452821 */ addu $a1, $v0, $a1 /* 377AB8 E0076A48 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 377ABC E0076A4C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 377AC0 E0076A50 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 377AC4 E0076A54 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 377AC8 E0076A58 3C09800A */ lui $t1, %hi(gMainGfxPos) /* 377ACC E0076A5C 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos) /* 377AD0 E0076A60 27A40018 */ addiu $a0, $sp, 0x18 /* 377AD4 E0076A64 8D280000 */ lw $t0, 0x0($t1) /* 377AD8 E0076A68 96020000 */ lhu $v0, 0x0($s0) /* 377ADC E0076A6C 0100282D */ daddu $a1, $t0, $zero /* 377AE0 E0076A70 25080008 */ addiu $t0, $t0, 0x8 /* 377AE4 E0076A74 AD280000 */ sw $t0, 0x0($t1) /* 377AE8 E0076A78 ACA30000 */ sw $v1, 0x0($a1) /* 377AEC E0076A7C 24430001 */ addiu $v1, $v0, 0x1 /* 377AF0 E0076A80 3042FFFF */ andi $v0, $v0, 0xFFFF /* 377AF4 E0076A84 00021180 */ sll $v0, $v0, 6 /* 377AF8 E0076A88 A6030000 */ sh $v1, 0x0($s0) /* 377AFC E0076A8C 8E230000 */ lw $v1, 0x0($s1) /* 377B00 E0076A90 00521021 */ addu $v0, $v0, $s2 /* 377B04 E0076A94 00621821 */ addu $v1, $v1, $v0 /* 377B08 E0076A98 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 377B0C E0076A9C ACA30004 */ sw $v1, 0x4($a1) /* 377B10 E0076AA0 AD020000 */ sw $v0, 0x0($t0) /* 377B14 E0076AA4 00151080 */ sll $v0, $s5, 2 /* 377B18 E0076AA8 3C03E007 */ lui $v1, (0xE0076EC0 >> 16) /* 377B1C E0076AAC 00621821 */ addu $v1, $v1, $v0 /* 377B20 E0076AB0 8C636EC0 */ lw $v1, (0xE0076EC0 & 0xFFFF)($v1) /* 377B24 E0076AB4 25020008 */ addiu $v0, $t0, 0x8 /* 377B28 E0076AB8 AD220000 */ sw $v0, 0x0($t1) /* 377B2C E0076ABC 24020040 */ addiu $v0, $zero, 0x40 /* 377B30 E0076AC0 AD060008 */ sw $a2, 0x8($t0) /* 377B34 E0076AC4 AD02000C */ sw $v0, 0xC($t0) /* 377B38 E0076AC8 AD030004 */ sw $v1, 0x4($t0) /* 377B3C E0076ACC 8E650004 */ lw $a1, 0x4($s3) /* 377B40 E0076AD0 8E660008 */ lw $a2, 0x8($s3) /* 377B44 E0076AD4 8E67000C */ lw $a3, 0xC($s3) /* 377B48 E0076AD8 25080010 */ addiu $t0, $t0, 0x10 /* 377B4C E0076ADC 0C080108 */ jal shim_guTranslateF /* 377B50 E0076AE0 AD280000 */ sw $t0, 0x0($t1) /* 377B54 E0076AE4 24020002 */ addiu $v0, $zero, 0x2 /* 377B58 E0076AE8 16A20008 */ bne $s5, $v0, .LE0076B0C /* 377B5C E0076AEC 0280202D */ daddu $a0, $s4, $zero /* 377B60 E0076AF0 44800000 */ mtc1 $zero, $f0 /* 377B64 E0076AF4 4407A000 */ mfc1 $a3, $f20 /* 377B68 E0076AF8 E7A00010 */ swc1 $f0, 0x10($sp) /* 377B6C E0076AFC 8E650064 */ lw $a1, 0x64($s3) /* 377B70 E0076B00 44060000 */ mfc1 $a2, $f0 /* 377B74 E0076B04 0801DAD5 */ j .LE0076B54 /* 377B78 E0076B08 00000000 */ nop .LE0076B0C: /* 377B7C E0076B0C 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 377B80 E0076B10 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 377B84 E0076B14 44800000 */ mtc1 $zero, $f0 /* 377B88 E0076B18 00031080 */ sll $v0, $v1, 2 /* 377B8C E0076B1C 00431021 */ addu $v0, $v0, $v1 /* 377B90 E0076B20 00021080 */ sll $v0, $v0, 2 /* 377B94 E0076B24 00431023 */ subu $v0, $v0, $v1 /* 377B98 E0076B28 000218C0 */ sll $v1, $v0, 3 /* 377B9C E0076B2C 00431021 */ addu $v0, $v0, $v1 /* 377BA0 E0076B30 000210C0 */ sll $v0, $v0, 3 /* 377BA4 E0076B34 44060000 */ mfc1 $a2, $f0 /* 377BA8 E0076B38 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 377BAC E0076B3C 00220821 */ addu $at, $at, $v0 /* 377BB0 E0076B40 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 377BB4 E0076B44 4407A000 */ mfc1 $a3, $f20 /* 377BB8 E0076B48 46000007 */ neg.s $f0, $f0 /* 377BBC E0076B4C 44050000 */ mfc1 $a1, $f0 /* 377BC0 E0076B50 AFA60010 */ sw $a2, 0x10($sp) .LE0076B54: /* 377BC4 E0076B54 0C080104 */ jal shim_guRotateF /* 377BC8 E0076B58 00000000 */ nop /* 377BCC E0076B5C 27B10058 */ addiu $s1, $sp, 0x58 /* 377BD0 E0076B60 0220202D */ daddu $a0, $s1, $zero /* 377BD4 E0076B64 27A50018 */ addiu $a1, $sp, 0x18 /* 377BD8 E0076B68 27B00098 */ addiu $s0, $sp, 0x98 /* 377BDC E0076B6C 0C080114 */ jal shim_guMtxCatF /* 377BE0 E0076B70 0200302D */ daddu $a2, $s0, $zero /* 377BE4 E0076B74 8E65001C */ lw $a1, 0x1C($s3) /* 377BE8 E0076B78 8E660020 */ lw $a2, 0x20($s3) /* 377BEC E0076B7C 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 377BF0 E0076B80 0C080110 */ jal shim_guScaleF /* 377BF4 E0076B84 0220202D */ daddu $a0, $s1, $zero /* 377BF8 E0076B88 0220202D */ daddu $a0, $s1, $zero /* 377BFC E0076B8C 0200282D */ daddu $a1, $s0, $zero /* 377C00 E0076B90 0C080114 */ jal shim_guMtxCatF /* 377C04 E0076B94 0200302D */ daddu $a2, $s0, $zero /* 377C08 E0076B98 16A00016 */ bnez $s5, .LE0076BF4 /* 377C0C E0076B9C 3C120001 */ lui $s2, (0x11630 >> 16) /* 377C10 E0076BA0 C660001C */ lwc1 $f0, 0x1C($s3) /* 377C14 E0076BA4 C6640024 */ lwc1 $f4, 0x24($s3) /* 377C18 E0076BA8 46040001 */ sub.s $f0, $f0, $f4 /* 377C1C E0076BAC 3C014120 */ lui $at, (0x41200000 >> 16) /* 377C20 E0076BB0 44811000 */ mtc1 $at, $f2 /* 377C24 E0076BB4 46000007 */ neg.s $f0, $f0 /* 377C28 E0076BB8 46040003 */ div.s $f0, $f0, $f4 /* 377C2C E0076BBC 46020002 */ mul.s $f0, $f0, $f2 /* 377C30 E0076BC0 00000000 */ nop /* 377C34 E0076BC4 44050000 */ mfc1 $a1, $f0 /* 377C38 E0076BC8 44800000 */ mtc1 $zero, $f0 /* 377C3C E0076BCC 00000000 */ nop /* 377C40 E0076BD0 44060000 */ mfc1 $a2, $f0 /* 377C44 E0076BD4 0220202D */ daddu $a0, $s1, $zero /* 377C48 E0076BD8 0C080108 */ jal shim_guTranslateF /* 377C4C E0076BDC 00C0382D */ daddu $a3, $a2, $zero /* 377C50 E0076BE0 0220202D */ daddu $a0, $s1, $zero /* 377C54 E0076BE4 0200282D */ daddu $a1, $s0, $zero /* 377C58 E0076BE8 0C080114 */ jal shim_guMtxCatF /* 377C5C E0076BEC 0200302D */ daddu $a2, $s0, $zero /* 377C60 E0076BF0 3C120001 */ lui $s2, (0x11630 >> 16) .LE0076BF4: /* 377C64 E0076BF4 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 377C68 E0076BF8 0200202D */ daddu $a0, $s0, $zero /* 377C6C E0076BFC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 377C70 E0076C00 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 377C74 E0076C04 3C11800A */ lui $s1, %hi(gDisplayContext) /* 377C78 E0076C08 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 377C7C E0076C0C 96050000 */ lhu $a1, 0x0($s0) /* 377C80 E0076C10 8E220000 */ lw $v0, 0x0($s1) /* 377C84 E0076C14 00052980 */ sll $a1, $a1, 6 /* 377C88 E0076C18 00B22821 */ addu $a1, $a1, $s2 /* 377C8C E0076C1C 0C080118 */ jal shim_guMtxF2L /* 377C90 E0076C20 00452821 */ addu $a1, $v0, $a1 /* 377C94 E0076C24 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 377C98 E0076C28 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 377C9C E0076C2C 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 377CA0 E0076C30 3C07800A */ lui $a3, %hi(gMainGfxPos) /* 377CA4 E0076C34 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* 377CA8 E0076C38 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 377CAC E0076C3C 3C08DE00 */ lui $t0, (0xDE000000 >> 16) /* 377CB0 E0076C40 00154880 */ sll $t1, $s5, 2 /* 377CB4 E0076C44 8CE50000 */ lw $a1, 0x0($a3) /* 377CB8 E0076C48 96020000 */ lhu $v0, 0x0($s0) /* 377CBC E0076C4C 3C014080 */ lui $at, (0x40800000 >> 16) /* 377CC0 E0076C50 44812000 */ mtc1 $at, $f4 /* 377CC4 E0076C54 00A0202D */ daddu $a0, $a1, $zero /* 377CC8 E0076C58 24A50008 */ addiu $a1, $a1, 0x8 /* 377CCC E0076C5C ACE50000 */ sw $a1, 0x0($a3) /* 377CD0 E0076C60 AC830000 */ sw $v1, 0x0($a0) /* 377CD4 E0076C64 24430001 */ addiu $v1, $v0, 0x1 /* 377CD8 E0076C68 3042FFFF */ andi $v0, $v0, 0xFFFF /* 377CDC E0076C6C 00021180 */ sll $v0, $v0, 6 /* 377CE0 E0076C70 A6030000 */ sh $v1, 0x0($s0) /* 377CE4 E0076C74 8E230000 */ lw $v1, 0x0($s1) /* 377CE8 E0076C78 00521021 */ addu $v0, $v0, $s2 /* 377CEC E0076C7C 00621821 */ addu $v1, $v1, $v0 /* 377CF0 E0076C80 24A20008 */ addiu $v0, $a1, 0x8 /* 377CF4 E0076C84 AC830004 */ sw $v1, 0x4($a0) /* 377CF8 E0076C88 ACE20000 */ sw $v0, 0x0($a3) /* 377CFC E0076C8C ACA80000 */ sw $t0, 0x0($a1) /* 377D00 E0076C90 3C03E007 */ lui $v1, (0xE0076EB0 >> 16) /* 377D04 E0076C94 00691821 */ addu $v1, $v1, $t1 /* 377D08 E0076C98 8C636EB0 */ lw $v1, (0xE0076EB0 & 0xFFFF)($v1) /* 377D0C E0076C9C 24A20010 */ addiu $v0, $a1, 0x10 /* 377D10 E0076CA0 ACE20000 */ sw $v0, 0x0($a3) /* 377D14 E0076CA4 24020040 */ addiu $v0, $zero, 0x40 /* 377D18 E0076CA8 ACA2000C */ sw $v0, 0xC($a1) /* 377D1C E0076CAC 24A20018 */ addiu $v0, $a1, 0x18 /* 377D20 E0076CB0 ACA60008 */ sw $a2, 0x8($a1) /* 377D24 E0076CB4 ACE20000 */ sw $v0, 0x0($a3) /* 377D28 E0076CB8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 377D2C E0076CBC ACA20010 */ sw $v0, 0x10($a1) /* 377D30 E0076CC0 ACA30004 */ sw $v1, 0x4($a1) /* 377D34 E0076CC4 92620068 */ lbu $v0, 0x68($s3) /* 377D38 E0076CC8 92640069 */ lbu $a0, 0x69($s3) /* 377D3C E0076CCC 9266006A */ lbu $a2, 0x6A($s3) /* 377D40 E0076CD0 24A30020 */ addiu $v1, $a1, 0x20 /* 377D44 E0076CD4 ACE30000 */ sw $v1, 0x0($a3) /* 377D48 E0076CD8 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 377D4C E0076CDC ACA30018 */ sw $v1, 0x18($a1) /* 377D50 E0076CE0 32C300FF */ andi $v1, $s6, 0xFF /* 377D54 E0076CE4 00021600 */ sll $v0, $v0, 24 /* 377D58 E0076CE8 00042400 */ sll $a0, $a0, 16 /* 377D5C E0076CEC 00441025 */ or $v0, $v0, $a0 /* 377D60 E0076CF0 00063200 */ sll $a2, $a2, 8 /* 377D64 E0076CF4 00461025 */ or $v0, $v0, $a2 /* 377D68 E0076CF8 00431025 */ or $v0, $v0, $v1 /* 377D6C E0076CFC ACA20014 */ sw $v0, 0x14($a1) /* 377D70 E0076D00 9262006B */ lbu $v0, 0x6B($s3) /* 377D74 E0076D04 9263006C */ lbu $v1, 0x6C($s3) /* 377D78 E0076D08 9264006D */ lbu $a0, 0x6D($s3) /* 377D7C E0076D0C 00021600 */ sll $v0, $v0, 24 /* 377D80 E0076D10 00031C00 */ sll $v1, $v1, 16 /* 377D84 E0076D14 00431025 */ or $v0, $v0, $v1 /* 377D88 E0076D18 00042200 */ sll $a0, $a0, 8 /* 377D8C E0076D1C 9263006E */ lbu $v1, 0x6E($s3) /* 377D90 E0076D20 00441025 */ or $v0, $v0, $a0 /* 377D94 E0076D24 00431025 */ or $v0, $v0, $v1 /* 377D98 E0076D28 ACA2001C */ sw $v0, 0x1C($a1) /* 377D9C E0076D2C C6620034 */ lwc1 $f2, 0x34($s3) /* 377DA0 E0076D30 46041082 */ mul.s $f2, $f2, $f4 /* 377DA4 E0076D34 00000000 */ nop /* 377DA8 E0076D38 3C06F200 */ lui $a2, (0xF2000000 >> 16) /* 377DAC E0076D3C 3C040100 */ lui $a0, (0x1000000 >> 16) /* 377DB0 E0076D40 C6600040 */ lwc1 $f0, 0x40($s3) /* 377DB4 E0076D44 24A20028 */ addiu $v0, $a1, 0x28 /* 377DB8 E0076D48 46040002 */ mul.s $f0, $f0, $f4 /* 377DBC E0076D4C 00000000 */ nop /* 377DC0 E0076D50 ACE20000 */ sw $v0, 0x0($a3) /* 377DC4 E0076D54 24A20030 */ addiu $v0, $a1, 0x30 /* 377DC8 E0076D58 ACE20000 */ sw $v0, 0x0($a3) /* 377DCC E0076D5C 4600118D */ trunc.w.s $f6, $f2 /* 377DD0 E0076D60 440A3000 */ mfc1 $t2, $f6 /* 377DD4 E0076D64 4600018D */ trunc.w.s $f6, $f0 /* 377DD8 E0076D68 440B3000 */ mfc1 $t3, $f6 /* 377DDC E0076D6C 31430FFF */ andi $v1, $t2, 0xFFF /* 377DE0 E0076D70 00031B00 */ sll $v1, $v1, 12 /* 377DE4 E0076D74 31620FFF */ andi $v0, $t3, 0xFFF /* 377DE8 E0076D78 00461025 */ or $v0, $v0, $a2 /* 377DEC E0076D7C 00621825 */ or $v1, $v1, $v0 /* 377DF0 E0076D80 2542007C */ addiu $v0, $t2, 0x7C /* 377DF4 E0076D84 30420FFF */ andi $v0, $v0, 0xFFF /* 377DF8 E0076D88 00021300 */ sll $v0, $v0, 12 /* 377DFC E0076D8C ACA30020 */ sw $v1, 0x20($a1) /* 377E00 E0076D90 256301FC */ addiu $v1, $t3, 0x1FC /* 377E04 E0076D94 30630FFF */ andi $v1, $v1, 0xFFF /* 377E08 E0076D98 00641825 */ or $v1, $v1, $a0 /* 377E0C E0076D9C 00431025 */ or $v0, $v0, $v1 /* 377E10 E0076DA0 ACA20024 */ sw $v0, 0x24($a1) /* 377E14 E0076DA4 ACA80028 */ sw $t0, 0x28($a1) /* 377E18 E0076DA8 3C02E007 */ lui $v0, (0xE0076E90 >> 16) /* 377E1C E0076DAC 00491021 */ addu $v0, $v0, $t1 /* 377E20 E0076DB0 8C426E90 */ lw $v0, (0xE0076E90 & 0xFFFF)($v0) /* 377E24 E0076DB4 ACA2002C */ sw $v0, 0x2C($a1) /* 377E28 E0076DB8 C662004C */ lwc1 $f2, 0x4C($s3) /* 377E2C E0076DBC 24A20038 */ addiu $v0, $a1, 0x38 /* 377E30 E0076DC0 46041082 */ mul.s $f2, $f2, $f4 /* 377E34 E0076DC4 00000000 */ nop /* 377E38 E0076DC8 ACE20000 */ sw $v0, 0x0($a3) /* 377E3C E0076DCC C6600058 */ lwc1 $f0, 0x58($s3) /* 377E40 E0076DD0 24A20040 */ addiu $v0, $a1, 0x40 /* 377E44 E0076DD4 ACE20000 */ sw $v0, 0x0($a3) /* 377E48 E0076DD8 46040002 */ mul.s $f0, $f0, $f4 /* 377E4C E0076DDC 00000000 */ nop /* 377E50 E0076DE0 24A20048 */ addiu $v0, $a1, 0x48 /* 377E54 E0076DE4 ACE20000 */ sw $v0, 0x0($a3) /* 377E58 E0076DE8 ACA80038 */ sw $t0, 0x38($a1) /* 377E5C E0076DEC 4600118D */ trunc.w.s $f6, $f2 /* 377E60 E0076DF0 440A3000 */ mfc1 $t2, $f6 /* 377E64 E0076DF4 4600018D */ trunc.w.s $f6, $f0 /* 377E68 E0076DF8 440B3000 */ mfc1 $t3, $f6 /* 377E6C E0076DFC 2543001E */ addiu $v1, $t2, 0x1E /* 377E70 E0076E00 30630FFF */ andi $v1, $v1, 0xFFF /* 377E74 E0076E04 00031B00 */ sll $v1, $v1, 12 /* 377E78 E0076E08 2562001E */ addiu $v0, $t3, 0x1E /* 377E7C E0076E0C 30420FFF */ andi $v0, $v0, 0xFFF /* 377E80 E0076E10 00461025 */ or $v0, $v0, $a2 /* 377E84 E0076E14 00621825 */ or $v1, $v1, $v0 /* 377E88 E0076E18 ACA30030 */ sw $v1, 0x30($a1) /* 377E8C E0076E1C 2543011A */ addiu $v1, $t2, 0x11A /* 377E90 E0076E20 30630FFF */ andi $v1, $v1, 0xFFF /* 377E94 E0076E24 00031B00 */ sll $v1, $v1, 12 /* 377E98 E0076E28 2562021A */ addiu $v0, $t3, 0x21A /* 377E9C E0076E2C 30420FFF */ andi $v0, $v0, 0xFFF /* 377EA0 E0076E30 00441025 */ or $v0, $v0, $a0 /* 377EA4 E0076E34 00621825 */ or $v1, $v1, $v0 /* 377EA8 E0076E38 ACA30034 */ sw $v1, 0x34($a1) /* 377EAC E0076E3C 3C03E007 */ lui $v1, (0xE0076EA0 >> 16) /* 377EB0 E0076E40 00691821 */ addu $v1, $v1, $t1 /* 377EB4 E0076E44 8C636EA0 */ lw $v1, (0xE0076EA0 & 0xFFFF)($v1) /* 377EB8 E0076E48 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 377EBC E0076E4C ACA20040 */ sw $v0, 0x40($a1) /* 377EC0 E0076E50 ACA00044 */ sw $zero, 0x44($a1) /* 377EC4 E0076E54 ACA3003C */ sw $v1, 0x3C($a1) /* 377EC8 E0076E58 8FBF00F4 */ lw $ra, 0xF4($sp) /* 377ECC E0076E5C 8FB600F0 */ lw $s6, 0xF0($sp) /* 377ED0 E0076E60 8FB500EC */ lw $s5, 0xEC($sp) /* 377ED4 E0076E64 8FB400E8 */ lw $s4, 0xE8($sp) /* 377ED8 E0076E68 8FB300E4 */ lw $s3, 0xE4($sp) /* 377EDC E0076E6C 8FB200E0 */ lw $s2, 0xE0($sp) /* 377EE0 E0076E70 8FB100DC */ lw $s1, 0xDC($sp) /* 377EE4 E0076E74 8FB000D8 */ lw $s0, 0xD8($sp) /* 377EE8 E0076E78 D7B400F8 */ ldc1 $f20, 0xF8($sp) /* 377EEC E0076E7C 03E00008 */ jr $ra /* 377EF0 E0076E80 27BD0100 */ addiu $sp, $sp, 0x100 /* 377EF4 E0076E84 00000000 */ nop /* 377EF8 E0076E88 00000000 */ nop /* 377EFC E0076E8C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void aura_appendGfx(void* argEffect) { Matrix4f translateMtx, tempMtx, transformMtx; EffectInstance* effect = argEffect; AuraFXData* data = effect->data.aura; s32 type = data->type; s32 primA = data->primA; s32 v1, v2; gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data)); gSPDisplayList(gMainGfxPos++, D_E0076ED0[type]); shim_guTranslateF(translateMtx, data->posB.x, data->posB.y, data->posB.z); if (type == 2) { shim_guRotateF(tempMtx, data->renderYaw, 0.0f, 1.0f, 0.0f); } else { shim_guRotateF(tempMtx, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); } shim_guMtxCatF(tempMtx, translateMtx, transformMtx); shim_guScaleF(tempMtx, data->scale.x, data->scale.y, 1.0f); shim_guMtxCatF(tempMtx, transformMtx, transformMtx); if (type == 0) { shim_guTranslateF(tempMtx, (-(data->scale.x - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f); shim_guMtxCatF(tempMtx, transformMtx, transformMtx); } shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E0076EC0[type]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); shim_guTranslateF(translateMtx, data->posA.x, data->posA.y, data->posA.z); if (type == 2) { shim_guRotateF(tempMtx, data->renderYaw, 0.0f, 1.0f, 0.0f); } else { shim_guRotateF(tempMtx, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); } shim_guMtxCatF(tempMtx, translateMtx, transformMtx); shim_guScaleF(tempMtx, data->scale.x, data->scale.y, 1.0f); shim_guMtxCatF(tempMtx, transformMtx, transformMtx); if (type == 0) { shim_guTranslateF(tempMtx, (-(data->scale.x - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f); shim_guMtxCatF(tempMtx, transformMtx, transformMtx); } shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E0076EB0[type]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, primA); gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->engB, data->engA); v1 = data->unk_34 * 4.0f; v2 = data->unk_40 * 4.0f; gDPSetTileSize(gMainGfxPos++, 1, v1, v2, v1 + 124, v2 + 508); gSPDisplayList(gMainGfxPos++, D_E0076E90[type]); v1 = data->unk_4C * 4.0f; v2 = data->unk_58 * 4.0f; gDPSetTileSize(gMainGfxPos++, 1, v1 + 30, v2 + 30, v1 + 282, v2 + 538); gSPDisplayList(gMainGfxPos++, D_E0076EA0[type]); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802559BC /* 18429C 802559BC 27BDFFA8 */ addiu $sp, $sp, -0x58 D_802559C0: /* 1842A0 802559C0 AFB00028 */ sw $s0, 0x28($sp) /* 1842A4 802559C4 AFB20030 */ sw $s2, 0x30($sp) D_802559C8: /* 1842A8 802559C8 00A0902D */ daddu $s2, $a1, $zero /* 1842AC 802559CC AFB5003C */ sw $s5, 0x3C($sp) jtbl_802559D0: /* 1842B0 802559D0 3C15800B */ lui $s5, %hi(gCameras + 0x558) /* 1842B4 802559D4 26B522D8 */ addiu $s5, $s5, %lo(gCameras + 0x558) /* 1842B8 802559D8 AFBF0040 */ sw $ra, 0x40($sp) /* 1842BC 802559DC AFB40038 */ sw $s4, 0x38($sp) /* 1842C0 802559E0 AFB30034 */ sw $s3, 0x34($sp) /* 1842C4 802559E4 AFB1002C */ sw $s1, 0x2C($sp) /* 1842C8 802559E8 F7B60050 */ sdc1 $f22, 0x50($sp) /* 1842CC 802559EC F7B40048 */ sdc1 $f20, 0x48($sp) /* 1842D0 802559F0 1240014F */ beqz $s2, .L80255F30 /* 1842D4 802559F4 0080802D */ daddu $s0, $a0, $zero /* 1842D8 802559F8 8E44042C */ lw $a0, 0x42C($s2) /* 1842DC 802559FC 0C044181 */ jal get_shadow_by_index /* 1842E0 80255A00 00000000 */ nop /* 1842E4 80255A04 0040882D */ daddu $s1, $v0, $zero /* 1842E8 80255A08 8E220000 */ lw $v0, 0x0($s1) /* 1842EC 80255A0C 34420001 */ ori $v0, $v0, 0x1 /* 1842F0 80255A10 AE220000 */ sw $v0, 0x0($s1) /* 1842F4 80255A14 8E430000 */ lw $v1, 0x0($s2) /* 1842F8 80255A18 30620001 */ andi $v0, $v1, 0x1 /* 1842FC 80255A1C 14400144 */ bnez $v0, .L80255F30 /* 184300 80255A20 3C021000 */ lui $v0, (0x10000000 >> 16) /* 184304 80255A24 00621024 */ and $v0, $v1, $v0 /* 184308 80255A28 10400009 */ beqz $v0, .L80255A50 /* 18430C 80255A2C 00000000 */ nop /* 184310 80255A30 16000005 */ bnez $s0, .L80255A48 /* 184314 80255A34 00000000 */ nop /* 184318 80255A38 0C09564F */ jal func_8025593C /* 18431C 80255A3C 0240202D */ daddu $a0, $s2, $zero /* 184320 80255A40 08095694 */ j .L80255A50 /* 184324 80255A44 00000000 */ nop .L80255A48: /* 184328 80255A48 0C09565F */ jal func_8025597C /* 18432C 80255A4C 0240202D */ daddu $a0, $s2, $zero .L80255A50: /* 184330 80255A50 86420150 */ lh $v0, 0x150($s2) /* 184334 80255A54 C6420144 */ lwc1 $f2, 0x144($s2) /* 184338 80255A58 8E430000 */ lw $v1, 0x0($s2) /* 18433C 80255A5C 44820000 */ mtc1 $v0, $f0 /* 184340 80255A60 00000000 */ nop /* 184344 80255A64 46800020 */ cvt.s.w $f0, $f0 /* 184348 80255A68 2402000D */ addiu $v0, $zero, 0xD /* 18434C 80255A6C 46001080 */ add.s $f2, $f2, $f0 /* 184350 80255A70 30630800 */ andi $v1, $v1, 0x800 /* 184354 80255A74 A6420434 */ sh $v0, 0x434($s2) /* 184358 80255A78 14600008 */ bnez $v1, .L80255A9C /* 18435C 80255A7C E7A20018 */ swc1 $f2, 0x18($sp) /* 184360 80255A80 86420152 */ lh $v0, 0x152($s2) /* 184364 80255A84 C6400148 */ lwc1 $f0, 0x148($s2) /* 184368 80255A88 44821000 */ mtc1 $v0, $f2 /* 18436C 80255A8C 00000000 */ nop /* 184370 80255A90 468010A0 */ cvt.s.w $f2, $f2 /* 184374 80255A94 080956AD */ j .L80255AB4 /* 184378 80255A98 46020000 */ add.s $f0, $f0, $f2 .L80255A9C: /* 18437C 80255A9C 86420152 */ lh $v0, 0x152($s2) D_80255AA0: /* 184380 80255AA0 C6400148 */ lwc1 $f0, 0x148($s2) /* 184384 80255AA4 44821000 */ mtc1 $v0, $f2 /* 184388 80255AA8 00000000 */ nop /* 18438C 80255AAC 468010A0 */ cvt.s.w $f2, $f2 /* 184390 80255AB0 46020001 */ sub.s $f0, $f0, $f2 .L80255AB4: /* 184394 80255AB4 E7A0001C */ swc1 $f0, 0x1C($sp) /* 184398 80255AB8 86420154 */ lh $v0, 0x154($s2) /* 18439C 80255ABC C642014C */ lwc1 $f2, 0x14C($s2) /* 1843A0 80255AC0 44820000 */ mtc1 $v0, $f0 /* 1843A4 80255AC4 00000000 */ nop /* 1843A8 80255AC8 46800020 */ cvt.s.w $f0, $f0 /* 1843AC 80255ACC 46001080 */ add.s $f2, $f2, $f0 /* 1843B0 80255AD0 E7A20020 */ swc1 $f2, 0x20($sp) /* 1843B4 80255AD4 825401F3 */ lb $s4, 0x1F3($s2) /* 1843B8 80255AD8 8E5001F4 */ lw $s0, 0x1F4($s2) /* 1843BC 80255ADC 1A8000B0 */ blez $s4, .L80255DA0 /* 1843C0 80255AE0 0000982D */ daddu $s3, $zero, $zero /* 1843C4 80255AE4 3C014028 */ lui $at, (0x40280000 >> 16) /* 1843C8 80255AE8 4481B800 */ mtc1 $at, $f23 /* 1843CC 80255AEC 4480B000 */ mtc1 $zero, $f22 .L80255AF0: /* 1843D0 80255AF0 8E020000 */ lw $v0, 0x0($s0) /* 1843D4 80255AF4 30420001 */ andi $v0, $v0, 0x1 /* 1843D8 80255AF8 144000A4 */ bnez $v0, .L80255D8C /* 1843DC 80255AFC 00000000 */ nop /* 1843E0 80255B00 8E020094 */ lw $v0, 0x94($s0) /* 1843E4 80255B04 104000A1 */ beqz $v0, .L80255D8C /* 1843E8 80255B08 00000000 */ nop /* 1843EC 80255B0C 8E040084 */ lw $a0, 0x84($s0) /* 1843F0 80255B10 04800007 */ bltz $a0, .L80255B30 /* 1843F4 80255B14 00000000 */ nop /* 1843F8 80255B18 8E050088 */ lw $a1, 0x88($s0) /* 1843FC 80255B1C 0C0B78AB */ jal spr_update_sprite /* 184400 80255B20 8E060090 */ lw $a2, 0x90($s0) /* 184404 80255B24 0C0B7972 */ jal spr_get_notify_value /* 184408 80255B28 8E040084 */ lw $a0, 0x84($s0) /* 18440C 80255B2C AE02008C */ sw $v0, 0x8C($s0) .L80255B30: /* 184410 80255B30 8E020000 */ lw $v0, 0x0($s0) /* 184414 80255B34 3C030010 */ lui $v1, (0x100000 >> 16) /* 184418 80255B38 00431024 */ and $v0, $v0, $v1 /* 18441C 80255B3C 14400031 */ bnez $v0, .L80255C04 /* 184420 80255B40 00000000 */ nop /* 184424 80255B44 86020014 */ lh $v0, 0x14($s0) /* 184428 80255B48 C7A00018 */ lwc1 $f0, 0x18($sp) /* 18442C 80255B4C 44821000 */ mtc1 $v0, $f2 /* 184430 80255B50 00000000 */ nop /* 184434 80255B54 468010A0 */ cvt.s.w $f2, $f2 /* 184438 80255B58 8602001A */ lh $v0, 0x1A($s0) /* 18443C 80255B5C 46020000 */ add.s $f0, $f0, $f2 /* 184440 80255B60 44821000 */ mtc1 $v0, $f2 /* 184444 80255B64 00000000 */ nop /* 184448 80255B68 468010A0 */ cvt.s.w $f2, $f2 /* 18444C 80255B6C 8E420000 */ lw $v0, 0x0($s2) mac_00_Quizmo_Worker: /* 184450 80255B70 30420800 */ andi $v0, $v0, 0x800 /* 184454 80255B74 1440000D */ bnez $v0, .L80255BAC /* 184458 80255B78 46020180 */ add.s $f6, $f0, $f2 /* 18445C 80255B7C 86020016 */ lh $v0, 0x16($s0) /* 184460 80255B80 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 184464 80255B84 44820000 */ mtc1 $v0, $f0 mac_00_Quizmo_AnswerResult: /* 184468 80255B88 00000000 */ nop /* 18446C 80255B8C 46800020 */ cvt.s.w $f0, $f0 mac_00_Quizmo_StageEffect: /* 184470 80255B90 8602001C */ lh $v0, 0x1C($s0) mac_00_Quizmo_AudienceEffect: /* 184474 80255B94 46001080 */ add.s $f2, $f2, $f0 mac_00_Quizmo_VannaTEffect: /* 184478 80255B98 44820000 */ mtc1 $v0, $f0 /* 18447C 80255B9C 00000000 */ nop mac_00_D_80255BA0: /* 184480 80255BA0 46800020 */ cvt.s.w $f0, $f0 /* 184484 80255BA4 080956F6 */ j .L80255BD8 /* 184488 80255BA8 46001100 */ add.s $f4, $f2, $f0 .L80255BAC: /* 18448C 80255BAC 86020016 */ lh $v0, 0x16($s0) /* 184490 80255BB0 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 184494 80255BB4 44820000 */ mtc1 $v0, $f0 /* 184498 80255BB8 00000000 */ nop /* 18449C 80255BBC 46800020 */ cvt.s.w $f0, $f0 /* 1844A0 80255BC0 8602001C */ lh $v0, 0x1C($s0) /* 1844A4 80255BC4 46001081 */ sub.s $f2, $f2, $f0 /* 1844A8 80255BC8 44820000 */ mtc1 $v0, $f0 /* 1844AC 80255BCC 00000000 */ nop /* 1844B0 80255BD0 46800020 */ cvt.s.w $f0, $f0 /* 1844B4 80255BD4 46001101 */ sub.s $f4, $f2, $f0 .L80255BD8: /* 1844B8 80255BD8 C640018C */ lwc1 $f0, 0x18C($s2) /* 1844BC 80255BDC 86020018 */ lh $v0, 0x18($s0) /* 1844C0 80255BE0 C7A20020 */ lwc1 $f2, 0x20($sp) /* 1844C4 80255BE4 46000506 */ mov.s $f20, $f0 /* 1844C8 80255BE8 44820000 */ mtc1 $v0, $f0 /* 1844CC 80255BEC 00000000 */ nop /* 1844D0 80255BF0 46800020 */ cvt.s.w $f0, $f0 /* 1844D4 80255BF4 8602001E */ lh $v0, 0x1E($s0) /* 1844D8 80255BF8 46001080 */ add.s $f2, $f2, $f0 /* 1844DC 80255BFC 08095710 */ j .L80255C40 /* 1844E0 80255C00 E6140064 */ swc1 $f20, 0x64($s0) .L80255C04: /* 1844E4 80255C04 C6140064 */ lwc1 $f20, 0x64($s0) /* 1844E8 80255C08 8602001A */ lh $v0, 0x1A($s0) /* 1844EC 80255C0C C602002C */ lwc1 $f2, 0x2C($s0) /* 1844F0 80255C10 44820000 */ mtc1 $v0, $f0 /* 1844F4 80255C14 00000000 */ nop /* 1844F8 80255C18 46800020 */ cvt.s.w $f0, $f0 /* 1844FC 80255C1C 46001180 */ add.s $f6, $f2, $f0 /* 184500 80255C20 8602001C */ lh $v0, 0x1C($s0) /* 184504 80255C24 C6020030 */ lwc1 $f2, 0x30($s0) /* 184508 80255C28 44820000 */ mtc1 $v0, $f0 /* 18450C 80255C2C 00000000 */ nop /* 184510 80255C30 46800020 */ cvt.s.w $f0, $f0 /* 184514 80255C34 46001100 */ add.s $f4, $f2, $f0 /* 184518 80255C38 8602001E */ lh $v0, 0x1E($s0) /* 18451C 80255C3C C6020034 */ lwc1 $f2, 0x34($s0) .L80255C40: /* 184520 80255C40 44820000 */ mtc1 $v0, $f0 /* 184524 80255C44 00000000 */ nop /* 184528 80255C48 46800020 */ cvt.s.w $f0, $f0 /* 18452C 80255C4C 46001080 */ add.s $f2, $f2, $f0 /* 184530 80255C50 8E020000 */ lw $v0, 0x0($s0) /* 184534 80255C54 E6060058 */ swc1 $f6, 0x58($s0) /* 184538 80255C58 E604005C */ swc1 $f4, 0x5C($s0) /* 18453C 80255C5C 30420004 */ andi $v0, $v0, 0x4 /* 184540 80255C60 14400041 */ bnez $v0, mac_00_D_80255D68 /* 184544 80255C64 E6020060 */ swc1 $f2, 0x60($s0) /* 184548 80255C68 8E04009C */ lw $a0, 0x9C($s0) /* 18454C 80255C6C 0C044181 */ jal get_shadow_by_index /* 184550 80255C70 00000000 */ nop /* 184554 80255C74 0040882D */ daddu $s1, $v0, $zero /* 184558 80255C78 8E220000 */ lw $v0, 0x0($s1) /* 18455C 80255C7C 2403FFFE */ addiu $v1, $zero, -0x2 /* 184560 80255C80 00431024 */ and $v0, $v0, $v1 /* 184564 80255C84 AE220000 */ sw $v0, 0x0($s1) /* 184568 80255C88 8E420000 */ lw $v0, 0x0($s2) /* 18456C 80255C8C C6000058 */ lwc1 $f0, 0x58($s0) /* 184570 80255C90 30420800 */ andi $v0, $v0, 0x800 /* 184574 80255C94 14400005 */ bnez $v0, .L80255CAC /* 184578 80255C98 E7A00018 */ swc1 $f0, 0x18($sp) /* 18457C 80255C9C C600005C */ lwc1 $f0, 0x5C($s0) /* 184580 80255CA0 46000021 */ cvt.d.s $f0, $f0 /* 184584 80255CA4 0809572E */ j .L80255CB8 /* 184588 80255CA8 46360000 */ add.d $f0, $f0, $f22 .L80255CAC: /* 18458C 80255CAC C600005C */ lwc1 $f0, 0x5C($s0) /* 184590 80255CB0 46000021 */ cvt.d.s $f0, $f0 /* 184594 80255CB4 46360001 */ sub.d $f0, $f0, $f22 .L80255CB8: /* 184598 80255CB8 46200020 */ cvt.s.d $f0, $f0 /* 18459C 80255CBC E7A0001C */ swc1 $f0, 0x1C($sp) /* 1845A0 80255CC0 0000202D */ daddu $a0, $zero, $zero /* 1845A4 80255CC4 27A50018 */ addiu $a1, $sp, 0x18 /* 1845A8 80255CC8 27A6001C */ addiu $a2, $sp, 0x1C /* 1845AC 80255CCC 27A70020 */ addiu $a3, $sp, 0x20 /* 1845B0 80255CD0 C6000060 */ lwc1 $f0, 0x60($s0) /* 1845B4 80255CD4 3C0146FF */ lui $at, (0x46FFFE00 >> 16) /* 1845B8 80255CD8 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF) /* 1845BC 80255CDC 44811000 */ mtc1 $at, $f2 /* 1845C0 80255CE0 27A20024 */ addiu $v0, $sp, 0x24 /* 1845C4 80255CE4 E7A00020 */ swc1 $f0, 0x20($sp) /* 1845C8 80255CE8 E7A20024 */ swc1 $f2, 0x24($sp) /* 1845CC 80255CEC 0C0372DF */ jal npc_raycast_down_sides /* 1845D0 80255CF0 AFA20010 */ sw $v0, 0x10($sp) /* 1845D4 80255CF4 C7A20024 */ lwc1 $f2, 0x24($sp) /* 1845D8 80255CF8 3C014348 */ lui $at, (0x43480000 >> 16) /* 1845DC 80255CFC 44810000 */ mtc1 $at, $f0 /* 1845E0 80255D00 00000000 */ nop /* 1845E4 80255D04 4602003C */ c.lt.s $f0, $f2 /* 1845E8 80255D08 00000000 */ nop /* 1845EC 80255D0C 45000004 */ bc1f .L80255D20 /* 1845F0 80255D10 00000000 */ nop /* 1845F4 80255D14 8E220000 */ lw $v0, 0x0($s1) /* 1845F8 80255D18 34420001 */ ori $v0, $v0, 0x1 /* 1845FC 80255D1C AE220000 */ sw $v0, 0x0($s1) .L80255D20: /* 184600 80255D20 C7A00018 */ lwc1 $f0, 0x18($sp) /* 184604 80255D24 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 184608 80255D28 C7A40020 */ lwc1 $f4, 0x20($sp) /* 18460C 80255D2C E6200010 */ swc1 $f0, 0x10($s1) /* 184610 80255D30 E6220014 */ swc1 $f2, 0x14($s1) /* 184614 80255D34 E6240018 */ swc1 $f4, 0x18($s1) /* 184618 80255D38 C6AC006C */ lwc1 $f12, 0x6C($s5) /* 18461C 80255D3C 0C00A6C9 */ jal clamp_angle /* 184620 80255D40 460CA301 */ sub.s $f12, $f20, $f12 /* 184624 80255D44 8FA50024 */ lw $a1, 0x24($sp) /* 184628 80255D48 0220202D */ daddu $a0, $s1, $zero /* 18462C 80255D4C 0C044A17 */ jal set_standard_shadow_scale /* 184630 80255D50 E620002C */ swc1 $f0, 0x2C($s1) /* 184634 80255D54 C620001C */ lwc1 $f0, 0x1C($s1) /* 184638 80255D58 C60200A0 */ lwc1 $f2, 0xA0($s0) /* 18463C 80255D5C 46020002 */ mul.s $f0, $f0, $f2 /* 184640 80255D60 00000000 */ nop /* 184644 80255D64 E620001C */ swc1 $f0, 0x1C($s1) mac_00_D_80255D68: /* 184648 80255D68 86020098 */ lh $v0, 0x98($s0) /* 18464C 80255D6C 284200FF */ slti $v0, $v0, 0xFF /* 184650 80255D70 14400005 */ bnez $v0, .L80255D88 /* 184654 80255D74 24020022 */ addiu $v0, $zero, 0x22 /* 184658 80255D78 8E020000 */ lw $v0, 0x0($s0) /* 18465C 80255D7C 30420100 */ andi $v0, $v0, 0x100 /* 184660 80255D80 10400002 */ beqz $v0, .L80255D8C /* 184664 80255D84 24020022 */ addiu $v0, $zero, 0x22 .L80255D88: /* 184668 80255D88 A6420434 */ sh $v0, 0x434($s2) .L80255D8C: /* 18466C 80255D8C 8E10000C */ lw $s0, 0xC($s0) /* 184670 80255D90 26730001 */ addiu $s3, $s3, 0x1 /* 184674 80255D94 0274102A */ slt $v0, $s3, $s4 /* 184678 80255D98 1440FF55 */ bnez $v0, .L80255AF0 /* 18467C 80255D9C 00000000 */ nop .L80255DA0: /* 184680 80255DA0 0C044181 */ jal get_shadow_by_index /* 184684 80255DA4 8E44042C */ lw $a0, 0x42C($s2) /* 184688 80255DA8 8E430000 */ lw $v1, 0x0($s2) /* 18468C 80255DAC 30630004 */ andi $v1, $v1, 0x4 /* 184690 80255DB0 14600005 */ bnez $v1, .L80255DC8 /* 184694 80255DB4 0040882D */ daddu $s1, $v0, $zero /* 184698 80255DB8 8E220000 */ lw $v0, 0x0($s1) /* 18469C 80255DBC 2403FFFE */ addiu $v1, $zero, -0x2 /* 1846A0 80255DC0 00431024 */ and $v0, $v0, $v1 /* 1846A4 80255DC4 AE220000 */ sw $v0, 0x0($s1) .L80255DC8: /* 1846A8 80255DC8 86420150 */ lh $v0, 0x150($s2) /* 1846AC 80255DCC C6400144 */ lwc1 $f0, 0x144($s2) /* 1846B0 80255DD0 44821000 */ mtc1 $v0, $f2 /* 1846B4 80255DD4 00000000 */ nop /* 1846B8 80255DD8 468010A0 */ cvt.s.w $f2, $f2 /* 1846BC 80255DDC 46020000 */ add.s $f0, $f0, $f2 /* 1846C0 80255DE0 8E420000 */ lw $v0, 0x0($s2) /* 1846C4 80255DE4 30420800 */ andi $v0, $v0, 0x800 /* 1846C8 80255DE8 14400008 */ bnez $v0, .L80255E0C /* 1846CC 80255DEC E7A00018 */ swc1 $f0, 0x18($sp) /* 1846D0 80255DF0 86420152 */ lh $v0, 0x152($s2) /* 1846D4 80255DF4 C6400148 */ lwc1 $f0, 0x148($s2) /* 1846D8 80255DF8 44821000 */ mtc1 $v0, $f2 /* 1846DC 80255DFC 00000000 */ nop /* 1846E0 80255E00 468010A0 */ cvt.s.w $f2, $f2 /* 1846E4 80255E04 08095789 */ j .L80255E24 /* 1846E8 80255E08 46020000 */ add.s $f0, $f0, $f2 .L80255E0C: /* 1846EC 80255E0C 86420152 */ lh $v0, 0x152($s2) /* 1846F0 80255E10 C6400148 */ lwc1 $f0, 0x148($s2) /* 1846F4 80255E14 44821000 */ mtc1 $v0, $f2 /* 1846F8 80255E18 00000000 */ nop /* 1846FC 80255E1C 468010A0 */ cvt.s.w $f2, $f2 /* 184700 80255E20 46020001 */ sub.s $f0, $f0, $f2 .L80255E24: /* 184704 80255E24 3C014028 */ lui $at, (0x40280000 >> 16) /* 184708 80255E28 44811800 */ mtc1 $at, $f3 /* 18470C 80255E2C 44801000 */ mtc1 $zero, $f2 /* 184710 80255E30 46000021 */ cvt.d.s $f0, $f0 /* 184714 80255E34 46220000 */ add.d $f0, $f0, $f2 /* 184718 80255E38 46200020 */ cvt.s.d $f0, $f0 /* 18471C 80255E3C E7A0001C */ swc1 $f0, 0x1C($sp) /* 184720 80255E40 0000202D */ daddu $a0, $zero, $zero /* 184724 80255E44 27A50018 */ addiu $a1, $sp, 0x18 /* 184728 80255E48 27A6001C */ addiu $a2, $sp, 0x1C /* 18472C 80255E4C 27A70020 */ addiu $a3, $sp, 0x20 /* 184730 80255E50 86420154 */ lh $v0, 0x154($s2) /* 184734 80255E54 C642014C */ lwc1 $f2, 0x14C($s2) /* 184738 80255E58 44820000 */ mtc1 $v0, $f0 /* 18473C 80255E5C 00000000 */ nop /* 184740 80255E60 46800020 */ cvt.s.w $f0, $f0 /* 184744 80255E64 46001080 */ add.s $f2, $f2, $f0 /* 184748 80255E68 3C0146FF */ lui $at, (0x46FFFE00 >> 16) /* 18474C 80255E6C 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF) /* 184750 80255E70 44810000 */ mtc1 $at, $f0 /* 184754 80255E74 27A20024 */ addiu $v0, $sp, 0x24 /* 184758 80255E78 E7A00024 */ swc1 $f0, 0x24($sp) /* 18475C 80255E7C E7A20020 */ swc1 $f2, 0x20($sp) /* 184760 80255E80 0C0372DF */ jal npc_raycast_down_sides /* 184764 80255E84 AFA20010 */ sw $v0, 0x10($sp) /* 184768 80255E88 C7A20024 */ lwc1 $f2, 0x24($sp) /* 18476C 80255E8C 3C014348 */ lui $at, (0x43480000 >> 16) /* 184770 80255E90 44810000 */ mtc1 $at, $f0 /* 184774 80255E94 00000000 */ nop /* 184778 80255E98 4602003C */ c.lt.s $f0, $f2 /* 18477C 80255E9C 00000000 */ nop /* 184780 80255EA0 45000004 */ bc1f .L80255EB4 /* 184784 80255EA4 00000000 */ nop /* 184788 80255EA8 8E220000 */ lw $v0, 0x0($s1) /* 18478C 80255EAC 34420001 */ ori $v0, $v0, 0x1 /* 184790 80255EB0 AE220000 */ sw $v0, 0x0($s1) .L80255EB4: /* 184794 80255EB4 C7A00018 */ lwc1 $f0, 0x18($sp) /* 184798 80255EB8 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 18479C 80255EBC E6200010 */ swc1 $f0, 0x10($s1) /* 1847A0 80255EC0 E6220014 */ swc1 $f2, 0x14($s1) /* 1847A4 80255EC4 92420136 */ lbu $v0, 0x136($s2) /* 1847A8 80255EC8 00021080 */ sll $v0, $v0, 2 /* 1847AC 80255ECC 3C018028 */ lui $at, %hi(bActorOffsets + 0x3) /* 1847B0 80255ED0 00220821 */ addu $at, $at, $v0 /* 1847B4 80255ED4 80222EEB */ lb $v0, %lo(bActorOffsets + 0x3)($at) mac_00_LetterDelivery_SavedNpcAnim: /* 1847B8 80255ED8 C7A00020 */ lwc1 $f0, 0x20($sp) /* 1847BC 80255EDC 44821000 */ mtc1 $v0, $f2 D_80255EE0: /* 1847C0 80255EE0 00000000 */ nop /* 1847C4 80255EE4 468010A0 */ cvt.s.w $f2, $f2 /* 1847C8 80255EE8 46020000 */ add.s $f0, $f0, $f2 /* 1847CC 80255EEC E6200018 */ swc1 $f0, 0x18($s1) /* 1847D0 80255EF0 C640018C */ lwc1 $f0, 0x18C($s2) /* 1847D4 80255EF4 C6AC006C */ lwc1 $f12, 0x6C($s5) /* 1847D8 80255EF8 0C00A6C9 */ jal clamp_angle /* 1847DC 80255EFC 460C0301 */ sub.s $f12, $f0, $f12 /* 1847E0 80255F00 8FA50024 */ lw $a1, 0x24($sp) /* 1847E4 80255F04 0220202D */ daddu $a0, $s1, $zero /* 1847E8 80255F08 0C044A17 */ jal set_standard_shadow_scale /* 1847EC 80255F0C E620002C */ swc1 $f0, 0x2C($s1) /* 1847F0 80255F10 C6420430 */ lwc1 $f2, 0x430($s2) /* 1847F4 80255F14 C6400188 */ lwc1 $f0, 0x188($s2) /* 1847F8 80255F18 46001082 */ mul.s $f2, $f2, $f0 /* 1847FC 80255F1C 00000000 */ nop /* 184800 80255F20 C620001C */ lwc1 $f0, 0x1C($s1) /* 184804 80255F24 46020002 */ mul.s $f0, $f0, $f2 /* 184808 80255F28 00000000 */ nop /* 18480C 80255F2C E620001C */ swc1 $f0, 0x1C($s1) .L80255F30: /* 184810 80255F30 8FBF0040 */ lw $ra, 0x40($sp) /* 184814 80255F34 8FB5003C */ lw $s5, 0x3C($sp) /* 184818 80255F38 8FB40038 */ lw $s4, 0x38($sp) /* 18481C 80255F3C 8FB30034 */ lw $s3, 0x34($sp) /* 184820 80255F40 8FB20030 */ lw $s2, 0x30($sp) /* 184824 80255F44 8FB1002C */ lw $s1, 0x2C($sp) /* 184828 80255F48 8FB00028 */ lw $s0, 0x28($sp) /* 18482C 80255F4C D7B60050 */ ldc1 $f22, 0x50($sp) /* 184830 80255F50 D7B40048 */ ldc1 $f20, 0x48($sp) /* 184834 80255F54 03E00008 */ jr $ra /* 184838 80255F58 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void update_actor_shadow(s32 arg0, Actor* actor) { Camera* camera = &gCameras[CAM_BATTLE]; ActorPart* actorPart; Shadow* shadow; s32 numParts; f32 x1, y1, z1; f32 x2, y2, z2; f32 dist; s32 spriteID; f32 yaw; s32 i; if (actor != NULL) { shadow = get_shadow_by_index(actor->shadow.id); shadow->flags |= ENTITY_FLAG_HIDDEN; if (!(actor->flags & ACTOR_FLAG_DISABLED)) { if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { if (arg0 == 0) { func_8025593C(actor); } else { func_8025597C(actor); } } actor->renderMode = RENDER_MODE_ALPHATEST; x1 = actor->currentPos.x + actor->headOffset.x; if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) { y1 = actor->currentPos.y + actor->headOffset.y; } else { y1 = actor->currentPos.y - actor->headOffset.y; } z1 = actor->currentPos.z + actor->headOffset.z; numParts = actor->numParts; actorPart = actor->partsTable; for (i = 0; i < numParts; i++) { if (!(actorPart->flags & ACTOR_PART_FLAG_INVISIBLE) && actorPart->idleAnimations != NULL) { spriteID = actorPart->spriteInstanceID; if (spriteID >= 0) { spr_update_sprite(spriteID, actorPart->currentAnimation, actorPart->animationRate); actorPart->animNotifyValue = spr_get_notify_value(actorPart->spriteInstanceID); } if (!(actorPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { x2 = x1 + actorPart->partOffset.x + actorPart->visualOffset.x; if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) { y2 = y1 + actorPart->partOffset.y + actorPart->visualOffset.y; } else { y2 = y1 - actorPart->partOffset.y - actorPart->visualOffset.y; } z2 = z1 + actorPart->partOffset.z + actorPart->visualOffset.z; yaw = actorPart->yaw = actor->yaw; } else { x2 = actorPart->absolutePosition.x + actorPart->visualOffset.x; y2 = actorPart->absolutePosition.y + actorPart->visualOffset.y; z2 = actorPart->absolutePosition.z + actorPart->visualOffset.z; yaw = actorPart->yaw; } actorPart->currentPos.x = x2; actorPart->currentPos.y = y2; actorPart->currentPos.z = z2; if (!(actorPart->flags & ACTOR_PART_FLAG_4)) { shadow = get_shadow_by_index(actorPart->shadowIndex); shadow->flags &= ~ENTITY_FLAG_HIDDEN; x1 = actorPart->currentPos.x; if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) { y1 = actorPart->currentPos.y + 12.0; } else { y1 = actorPart->currentPos.y - 12.0; } z1 = actorPart->currentPos.z; dist = 32767.0f; npc_raycast_down_sides(0, &x1, &y1, &z1, &dist); if (200.0f < dist) { shadow->flags |= ENTITY_FLAG_HIDDEN; } shadow->position.x = x1; shadow->position.y = y1; shadow->position.z = z1; shadow->rotation.y = clamp_angle(yaw - camera->currentYaw); set_standard_shadow_scale(shadow, dist); shadow->scale.x *= actorPart->shadowScale; } if (actorPart->opacity < 255 || actorPart->flags & ACTOR_PART_FLAG_100) { actor->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; } } actorPart = actorPart->nextPart; } shadow = get_shadow_by_index(actor->shadow.id); if (!(actor->flags & ACTOR_FLAG_NO_SHADOW)) { shadow->flags &= ~ENTITY_FLAG_HIDDEN; } x1 = actor->currentPos.x + actor->headOffset.x; if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) { y1 = actor->currentPos.y + actor->headOffset.y + 12.0; } else { y1 = actor->currentPos.y - actor->headOffset.y + 12.0; } z1 = actor->currentPos.z + actor->headOffset.z; dist = 32767.0f; npc_raycast_down_sides(0, &x1, &y1, &z1, &dist); if (200.0f < dist) { shadow->flags |= ENTITY_FLAG_HIDDEN; } shadow->position.x = x1; shadow->position.y = y1; shadow->position.z = z1 + bActorOffsets[actor->actorType].shadow; shadow->rotation.y = clamp_angle(actor->yaw - camera->currentYaw); set_standard_shadow_scale(shadow, dist); shadow->scale.x *= actor->shadowScale * actor->scalingFactor; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel star_appendGfx /* 332070 E001E730 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 332074 E001E734 3C03DB06 */ lui $v1, (0xDB060024 >> 16) /* 332078 E001E738 AFB700BC */ sw $s7, 0xBC($sp) /* 33207C E001E73C 3C17800A */ lui $s7, %hi(gMainGfxPos) /* 332080 E001E740 26F7A66C */ addiu $s7, $s7, %lo(gMainGfxPos) /* 332084 E001E744 34630024 */ ori $v1, $v1, (0xDB060024 & 0xFFFF) /* 332088 E001E748 AFBF00C4 */ sw $ra, 0xC4($sp) /* 33208C E001E74C AFBE00C0 */ sw $fp, 0xC0($sp) /* 332090 E001E750 AFB600B8 */ sw $s6, 0xB8($sp) /* 332094 E001E754 AFB500B4 */ sw $s5, 0xB4($sp) /* 332098 E001E758 AFB400B0 */ sw $s4, 0xB0($sp) /* 33209C E001E75C AFB300AC */ sw $s3, 0xAC($sp) /* 3320A0 E001E760 AFB200A8 */ sw $s2, 0xA8($sp) /* 3320A4 E001E764 AFB100A4 */ sw $s1, 0xA4($sp) /* 3320A8 E001E768 AFB000A0 */ sw $s0, 0xA0($sp) /* 3320AC E001E76C F7B800D8 */ sdc1 $f24, 0xD8($sp) /* 3320B0 E001E770 F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 3320B4 E001E774 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 3320B8 E001E778 8EE60000 */ lw $a2, 0x0($s7) /* 3320BC E001E77C 4480A000 */ mtc1 $zero, $f20 /* 3320C0 E001E780 8C96000C */ lw $s6, 0xC($a0) /* 3320C4 E001E784 00C0102D */ daddu $v0, $a2, $zero /* 3320C8 E001E788 24C60008 */ addiu $a2, $a2, 0x8 /* 3320CC E001E78C C6D80240 */ lwc1 $f24, 0x240($s6) /* 3320D0 E001E790 8EDE0038 */ lw $fp, 0x38($s6) /* 3320D4 E001E794 8ED10244 */ lw $s1, 0x244($s6) /* 3320D8 E001E798 8ED20248 */ lw $s2, 0x248($s6) /* 3320DC E001E79C 8ED3024C */ lw $s3, 0x24C($s6) /* 3320E0 E001E7A0 3C0EE700 */ lui $t6, (0xE7000000 >> 16) /* 3320E4 E001E7A4 AC4E0000 */ sw $t6, 0x0($v0) /* 3320E8 E001E7A8 AC400004 */ sw $zero, 0x4($v0) /* 3320EC E001E7AC ACC30000 */ sw $v1, 0x0($a2) /* 3320F0 E001E7B0 8C820010 */ lw $v0, 0x10($a0) /* 3320F4 E001E7B4 3C048000 */ lui $a0, (0x80000000 >> 16) /* 3320F8 E001E7B8 4405A000 */ mfc1 $a1, $f20 /* 3320FC E001E7BC 4407A000 */ mfc1 $a3, $f20 /* 332100 E001E7C0 8C42001C */ lw $v0, 0x1C($v0) /* 332104 E001E7C4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 332108 E001E7C8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 33210C E001E7CC 00441021 */ addu $v0, $v0, $a0 /* 332110 E001E7D0 ACC20004 */ sw $v0, 0x4($a2) /* 332114 E001E7D4 00031080 */ sll $v0, $v1, 2 /* 332118 E001E7D8 00431021 */ addu $v0, $v0, $v1 /* 33211C E001E7DC 00021080 */ sll $v0, $v0, 2 /* 332120 E001E7E0 00431023 */ subu $v0, $v0, $v1 /* 332124 E001E7E4 000218C0 */ sll $v1, $v0, 3 /* 332128 E001E7E8 00431021 */ addu $v0, $v0, $v1 /* 33212C E001E7EC 000210C0 */ sll $v0, $v0, 3 /* 332130 E001E7F0 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 332134 E001E7F4 00220821 */ addu $at, $at, $v0 /* 332138 E001E7F8 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 33213C E001E7FC E7B80010 */ swc1 $f24, 0x10($sp) /* 332140 E001E800 C6C00004 */ lwc1 $f0, 0x4($s6) /* 332144 E001E804 AEE60000 */ sw $a2, 0x0($s7) /* 332148 E001E808 24C60008 */ addiu $a2, $a2, 0x8 /* 33214C E001E80C E7A00014 */ swc1 $f0, 0x14($sp) /* 332150 E001E810 C6C00008 */ lwc1 $f0, 0x8($s6) /* 332154 E001E814 46001087 */ neg.s $f2, $f2 /* 332158 E001E818 AEE60000 */ sw $a2, 0x0($s7) /* 33215C E001E81C 44061000 */ mfc1 $a2, $f2 /* 332160 E001E820 3C150001 */ lui $s5, (0x11630 >> 16) /* 332164 E001E824 E7A00018 */ swc1 $f0, 0x18($sp) /* 332168 E001E828 C6C0000C */ lwc1 $f0, 0xC($s6) /* 33216C E001E82C 27A40020 */ addiu $a0, $sp, 0x20 /* 332170 E001E830 0C080180 */ jal shim_guPositionF /* 332174 E001E834 E7A0001C */ swc1 $f0, 0x1C($sp) /* 332178 E001E838 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 33217C E001E83C 27B00060 */ addiu $s0, $sp, 0x60 /* 332180 E001E840 4406A000 */ mfc1 $a2, $f20 /* 332184 E001E844 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 332188 E001E848 44810000 */ mtc1 $at, $f0 /* 33218C E001E84C 0200202D */ daddu $a0, $s0, $zero /* 332190 E001E850 E7A00010 */ swc1 $f0, 0x10($sp) /* 332194 E001E854 8EC50024 */ lw $a1, 0x24($s6) /* 332198 E001E858 0C080104 */ jal shim_guRotateF /* 33219C E001E85C 00C0382D */ daddu $a3, $a2, $zero /* 3321A0 E001E860 0200202D */ daddu $a0, $s0, $zero /* 3321A4 E001E864 27A50020 */ addiu $a1, $sp, 0x20 /* 3321A8 E001E868 0C080114 */ jal shim_guMtxCatF /* 3321AC E001E86C 00A0302D */ daddu $a2, $a1, $zero /* 3321B0 E001E870 27A40020 */ addiu $a0, $sp, 0x20 /* 3321B4 E001E874 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3321B8 E001E878 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3321BC E001E87C 3C14800A */ lui $s4, %hi(gDisplayContext) /* 3321C0 E001E880 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 3321C4 E001E884 96050000 */ lhu $a1, 0x0($s0) /* 3321C8 E001E888 8E820000 */ lw $v0, 0x0($s4) /* 3321CC E001E88C 00052980 */ sll $a1, $a1, 6 /* 3321D0 E001E890 00B52821 */ addu $a1, $a1, $s5 /* 3321D4 E001E894 0C080118 */ jal shim_guMtxF2L /* 3321D8 E001E898 00452821 */ addu $a1, $v0, $a1 /* 3321DC E001E89C 3C05FA00 */ lui $a1, (0xFA000050 >> 16) /* 3321E0 E001E8A0 34A50050 */ ori $a1, $a1, (0xFA000050 & 0xFFFF) /* 3321E4 E001E8A4 3C067F7F */ lui $a2, (0x7F7F7F7F >> 16) /* 3321E8 E001E8A8 34C67F7F */ ori $a2, $a2, (0x7F7F7F7F & 0xFFFF) /* 3321EC E001E8AC 3C080900 */ lui $t0, %hi(D_09001530_40E7C0) /* 3321F0 E001E8B0 25081530 */ addiu $t0, $t0, %lo(D_09001530_40E7C0) /* 3321F4 E001E8B4 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3321F8 E001E8B8 00118E00 */ sll $s1, $s1, 24 /* 3321FC E001E8BC 325200FF */ andi $s2, $s2, 0xFF /* 332200 E001E8C0 00129400 */ sll $s2, $s2, 16 /* 332204 E001E8C4 02328825 */ or $s1, $s1, $s2 /* 332208 E001E8C8 327300FF */ andi $s3, $s3, 0xFF /* 33220C E001E8CC 00139A00 */ sll $s3, $s3, 8 /* 332210 E001E8D0 8EE70000 */ lw $a3, 0x0($s7) /* 332214 E001E8D4 02338825 */ or $s1, $s1, $s3 /* 332218 E001E8D8 00E0202D */ daddu $a0, $a3, $zero /* 33221C E001E8DC 24E70008 */ addiu $a3, $a3, 0x8 /* 332220 E001E8E0 AEE70000 */ sw $a3, 0x0($s7) /* 332224 E001E8E4 96020000 */ lhu $v0, 0x0($s0) /* 332228 E001E8E8 363100FF */ ori $s1, $s1, 0xFF /* 33222C E001E8EC AC830000 */ sw $v1, 0x0($a0) /* 332230 E001E8F0 24430001 */ addiu $v1, $v0, 0x1 /* 332234 E001E8F4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 332238 E001E8F8 00021180 */ sll $v0, $v0, 6 /* 33223C E001E8FC A6030000 */ sh $v1, 0x0($s0) /* 332240 E001E900 8E830000 */ lw $v1, 0x0($s4) /* 332244 E001E904 00551021 */ addu $v0, $v0, $s5 /* 332248 E001E908 00621821 */ addu $v1, $v1, $v0 /* 33224C E001E90C 24E20008 */ addiu $v0, $a3, 0x8 /* 332250 E001E910 AC830004 */ sw $v1, 0x4($a0) /* 332254 E001E914 AEE20000 */ sw $v0, 0x0($s7) /* 332258 E001E918 24E20010 */ addiu $v0, $a3, 0x10 /* 33225C E001E91C ACE50000 */ sw $a1, 0x0($a3) /* 332260 E001E920 ACF10004 */ sw $s1, 0x4($a3) /* 332264 E001E924 AEE20000 */ sw $v0, 0x0($s7) /* 332268 E001E928 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 33226C E001E92C ACE6000C */ sw $a2, 0xC($a3) /* 332270 E001E930 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 332274 E001E934 ACE20008 */ sw $v0, 0x8($a3) /* 332278 E001E938 ACE60010 */ sw $a2, 0x10($a3) /* 33227C E001E93C 8EC20038 */ lw $v0, 0x38($s6) /* 332280 E001E940 24E50018 */ addiu $a1, $a3, 0x18 /* 332284 E001E944 28420002 */ slti $v0, $v0, 0x2 /* 332288 E001E948 14400003 */ bnez $v0, .LE001E958 /* 33228C E001E94C AEE50000 */ sw $a1, 0x0($s7) /* 332290 E001E950 3C080900 */ lui $t0, %hi(D_09001650_40E8E0) /* 332294 E001E954 25081650 */ addiu $t0, $t0, %lo(D_09001650_40E8E0) .LE001E958: /* 332298 E001E958 3C02D838 */ lui $v0, (0xD8380002 >> 16) /* 33229C E001E95C 34420002 */ ori $v0, $v0, (0xD8380002 & 0xFFFF) /* 3322A0 E001E960 02E0202D */ daddu $a0, $s7, $zero /* 3322A4 E001E964 24E30020 */ addiu $v1, $a3, 0x20 /* 3322A8 E001E968 ACE80014 */ sw $t0, 0x14($a3) /* 3322AC E001E96C AC830000 */ sw $v1, 0x0($a0) /* 3322B0 E001E970 ACE20018 */ sw $v0, 0x18($a3) /* 3322B4 E001E974 24020040 */ addiu $v0, $zero, 0x40 /* 3322B8 E001E978 ACA20004 */ sw $v0, 0x4($a1) /* 3322BC E001E97C 24E20028 */ addiu $v0, $a3, 0x28 /* 3322C0 E001E980 3C0FE700 */ lui $t7, (0xE7000000 >> 16) /* 3322C4 E001E984 AC820000 */ sw $v0, 0x0($a0) /* 3322C8 E001E988 24020003 */ addiu $v0, $zero, 0x3 /* 3322CC E001E98C ACEF0020 */ sw $t7, 0x20($a3) /* 3322D0 E001E990 17C20007 */ bne $fp, $v0, .LE001E9B0 /* 3322D4 E001E994 AC600004 */ sw $zero, 0x4($v1) /* 3322D8 E001E998 24E20030 */ addiu $v0, $a3, 0x30 /* 3322DC E001E99C AC820000 */ sw $v0, 0x0($a0) /* 3322E0 E001E9A0 3C020900 */ lui $v0, %hi(D_090017D0_40EA60) /* 3322E4 E001E9A4 244217D0 */ addiu $v0, $v0, %lo(D_090017D0_40EA60) /* 3322E8 E001E9A8 08007A71 */ j .LE001E9C4 /* 3322EC E001E9AC AC660008 */ sw $a2, 0x8($v1) .LE001E9B0: /* 3322F0 E001E9B0 24E20030 */ addiu $v0, $a3, 0x30 /* 3322F4 E001E9B4 AEE20000 */ sw $v0, 0x0($s7) /* 3322F8 E001E9B8 3C020900 */ lui $v0, %hi(D_09001780_40EA10) /* 3322FC E001E9BC 24421780 */ addiu $v0, $v0, %lo(D_09001780_40EA10) /* 332300 E001E9C0 AC660008 */ sw $a2, 0x8($v1) .LE001E9C4: /* 332304 E001E9C4 AC62000C */ sw $v0, 0xC($v1) /* 332308 E001E9C8 8EC2003C */ lw $v0, 0x3C($s6) /* 33230C E001E9CC 24420001 */ addiu $v0, $v0, 0x1 /* 332310 E001E9D0 AEC2003C */ sw $v0, 0x3C($s6) /* 332314 E001E9D4 28420008 */ slti $v0, $v0, 0x8 /* 332318 E001E9D8 50400001 */ beql $v0, $zero, .LE001E9E0 /* 33231C E001E9DC AEC0003C */ sw $zero, 0x3C($s6) .LE001E9E0: /* 332320 E001E9E0 C6C0001C */ lwc1 $f0, 0x1C($s6) /* 332324 E001E9E4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 332328 E001E9E8 4481B000 */ mtc1 $at, $f22 /* 33232C E001E9EC 00000000 */ nop /* 332330 E001E9F0 4616003E */ c.le.s $f0, $f22 /* 332334 E001E9F4 00000000 */ nop /* 332338 E001E9F8 450000C5 */ bc1f .LE001ED10 /* 33233C E001E9FC 00000000 */ nop /* 332340 E001EA00 8EC2003C */ lw $v0, 0x3C($s6) /* 332344 E001EA04 24440005 */ addiu $a0, $v0, 0x5 /* 332348 E001EA08 04810002 */ bgez $a0, .LE001EA14 /* 33234C E001EA0C 0080302D */ daddu $a2, $a0, $zero /* 332350 E001EA10 2446000C */ addiu $a2, $v0, 0xC .LE001EA14: /* 332354 E001EA14 000688C3 */ sra $s1, $a2, 3 /* 332358 E001EA18 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 33235C E001EA1C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 332360 E001EA20 4480A000 */ mtc1 $zero, $f20 /* 332364 E001EA24 00031080 */ sll $v0, $v1, 2 /* 332368 E001EA28 00431021 */ addu $v0, $v0, $v1 /* 33236C E001EA2C 00021080 */ sll $v0, $v0, 2 /* 332370 E001EA30 00431023 */ subu $v0, $v0, $v1 /* 332374 E001EA34 000218C0 */ sll $v1, $v0, 3 /* 332378 E001EA38 00431021 */ addu $v0, $v0, $v1 /* 33237C E001EA3C 000210C0 */ sll $v0, $v0, 3 /* 332380 E001EA40 4405A000 */ mfc1 $a1, $f20 /* 332384 E001EA44 4407A000 */ mfc1 $a3, $f20 /* 332388 E001EA48 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 33238C E001EA4C 00220821 */ addu $at, $at, $v0 /* 332390 E001EA50 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 332394 E001EA54 001110C0 */ sll $v0, $s1, 3 /* 332398 E001EA58 E7B80010 */ swc1 $f24, 0x10($sp) /* 33239C E001EA5C C6C00004 */ lwc1 $f0, 0x4($s6) /* 3323A0 E001EA60 46001087 */ neg.s $f2, $f2 /* 3323A4 E001EA64 E7A00014 */ swc1 $f0, 0x14($sp) /* 3323A8 E001EA68 C6C00008 */ lwc1 $f0, 0x8($s6) /* 3323AC E001EA6C 44061000 */ mfc1 $a2, $f2 /* 3323B0 E001EA70 00828823 */ subu $s1, $a0, $v0 /* 3323B4 E001EA74 E7A00018 */ swc1 $f0, 0x18($sp) /* 3323B8 E001EA78 C6C0000C */ lwc1 $f0, 0xC($s6) /* 3323BC E001EA7C 27A40020 */ addiu $a0, $sp, 0x20 /* 3323C0 E001EA80 0C080180 */ jal shim_guPositionF /* 3323C4 E001EA84 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3323C8 E001EA88 27B00060 */ addiu $s0, $sp, 0x60 /* 3323CC E001EA8C 4406A000 */ mfc1 $a2, $f20 /* 3323D0 E001EA90 0200202D */ daddu $a0, $s0, $zero /* 3323D4 E001EA94 E7B60010 */ swc1 $f22, 0x10($sp) /* 3323D8 E001EA98 8EC50020 */ lw $a1, 0x20($s6) /* 3323DC E001EA9C 0C080104 */ jal shim_guRotateF /* 3323E0 E001EAA0 00C0382D */ daddu $a3, $a2, $zero /* 3323E4 E001EAA4 0200202D */ daddu $a0, $s0, $zero /* 3323E8 E001EAA8 27A50020 */ addiu $a1, $sp, 0x20 /* 3323EC E001EAAC 0C080114 */ jal shim_guMtxCatF /* 3323F0 E001EAB0 00A0302D */ daddu $a2, $a1, $zero /* 3323F4 E001EAB4 8EC5003C */ lw $a1, 0x3C($s6) /* 3323F8 E001EAB8 27A40020 */ addiu $a0, $sp, 0x20 /* 3323FC E001EABC 00052980 */ sll $a1, $a1, 6 /* 332400 E001EAC0 24A50040 */ addiu $a1, $a1, 0x40 /* 332404 E001EAC4 0C080118 */ jal shim_guMtxF2L /* 332408 E001EAC8 02C52821 */ addu $a1, $s6, $a1 /* 33240C E001EACC 0000402D */ daddu $t0, $zero, $zero /* 332410 E001EAD0 3C15800A */ lui $s5, %hi(gDisplayContext) /* 332414 E001EAD4 26B5A674 */ addiu $s5, $s5, %lo(gDisplayContext) /* 332418 E001EAD8 3C0D8007 */ lui $t5, %hi(gMatrixListPos) /* 33241C E001EADC 25AD41F0 */ addiu $t5, $t5, %lo(gMatrixListPos) /* 332420 E001EAE0 3C0C0001 */ lui $t4, (0x11630 >> 16) /* 332424 E001EAE4 358C1630 */ ori $t4, $t4, (0x11630 & 0xFFFF) /* 332428 E001EAE8 3C0B800A */ lui $t3, %hi(gMainGfxPos) /* 33242C E001EAEC 256BA66C */ addiu $t3, $t3, %lo(gMainGfxPos) /* 332430 E001EAF0 3C13DA38 */ lui $s3, (0xDA380000 >> 16) /* 332434 E001EAF4 3C100100 */ lui $s0, (0x1002000 >> 16) /* 332438 E001EAF8 36102000 */ ori $s0, $s0, (0x1002000 & 0xFFFF) /* 33243C E001EAFC 3C14D838 */ lui $s4, (0xD8380002 >> 16) /* 332440 E001EB00 36940002 */ ori $s4, $s4, (0xD8380002 & 0xFFFF) /* 332444 E001EB04 24120040 */ addiu $s2, $zero, 0x40 /* 332448 E001EB08 3C0A0900 */ lui $t2, %hi(D_09001400_40E690) /* 33244C E001EB0C 254A1400 */ addiu $t2, $t2, %lo(D_09001400_40E690) /* 332450 E001EB10 24090002 */ addiu $t1, $zero, 0x2 .LE001EB14: /* 332454 E001EB14 02282023 */ subu $a0, $s1, $t0 /* 332458 E001EB18 24830008 */ addiu $v1, $a0, 0x8 /* 33245C E001EB1C 04610002 */ bgez $v1, .LE001EB28 /* 332460 E001EB20 0060102D */ daddu $v0, $v1, $zero /* 332464 E001EB24 2482000F */ addiu $v0, $a0, 0xF .LE001EB28: /* 332468 E001EB28 000210C3 */ sra $v0, $v0, 3 /* 33246C E001EB2C 000210C0 */ sll $v0, $v0, 3 /* 332470 E001EB30 00621023 */ subu $v0, $v1, $v0 /* 332474 E001EB34 00021180 */ sll $v0, $v0, 6 /* 332478 E001EB38 02C21021 */ addu $v0, $s6, $v0 /* 33247C E001EB3C 24440040 */ addiu $a0, $v0, 0x40 /* 332480 E001EB40 24450080 */ addiu $a1, $v0, 0x80 /* 332484 E001EB44 95A20000 */ lhu $v0, 0x0($t5) /* 332488 E001EB48 8EA30000 */ lw $v1, 0x0($s5) /* 33248C E001EB4C 00021180 */ sll $v0, $v0, 6 /* 332490 E001EB50 00621821 */ addu $v1, $v1, $v0 /* 332494 E001EB54 006C1821 */ addu $v1, $v1, $t4 .LE001EB58: /* 332498 E001EB58 8C980000 */ lw $t8, 0x0($a0) /* 33249C E001EB5C 8C990004 */ lw $t9, 0x4($a0) /* 3324A0 E001EB60 8C8E0008 */ lw $t6, 0x8($a0) /* 3324A4 E001EB64 8C8F000C */ lw $t7, 0xC($a0) /* 3324A8 E001EB68 AC780000 */ sw $t8, 0x0($v1) /* 3324AC E001EB6C AC790004 */ sw $t9, 0x4($v1) /* 3324B0 E001EB70 AC6E0008 */ sw $t6, 0x8($v1) /* 3324B4 E001EB74 AC6F000C */ sw $t7, 0xC($v1) /* 3324B8 E001EB78 24840010 */ addiu $a0, $a0, 0x10 /* 3324BC E001EB7C 1485FFF6 */ bne $a0, $a1, .LE001EB58 /* 3324C0 E001EB80 24630010 */ addiu $v1, $v1, 0x10 /* 3324C4 E001EB84 3126007F */ andi $a2, $t1, 0x7F /* 3324C8 E001EB88 25290002 */ addiu $t1, $t1, 0x2 /* 3324CC E001EB8C 25080001 */ addiu $t0, $t0, 0x1 /* 3324D0 E001EB90 00063040 */ sll $a2, $a2, 1 /* 3324D4 E001EB94 00D03025 */ or $a2, $a2, $s0 /* 3324D8 E001EB98 8D640000 */ lw $a0, 0x0($t3) /* 3324DC E001EB9C 95A50000 */ lhu $a1, 0x0($t5) /* 3324E0 E001EBA0 0080382D */ daddu $a3, $a0, $zero /* 3324E4 E001EBA4 24840008 */ addiu $a0, $a0, 0x8 /* 3324E8 E001EBA8 30A2FFFF */ andi $v0, $a1, 0xFFFF /* 3324EC E001EBAC 00021180 */ sll $v0, $v0, 6 /* 3324F0 E001EBB0 004C1021 */ addu $v0, $v0, $t4 /* 3324F4 E001EBB4 ACF30000 */ sw $s3, 0x0($a3) /* 3324F8 E001EBB8 8EA30000 */ lw $v1, 0x0($s5) /* 3324FC E001EBBC 24A50001 */ addiu $a1, $a1, 0x1 /* 332500 E001EBC0 00621821 */ addu $v1, $v1, $v0 /* 332504 E001EBC4 ACE30004 */ sw $v1, 0x4($a3) /* 332508 E001EBC8 AC8A0004 */ sw $t2, 0x4($a0) /* 33250C E001EBCC 254A0020 */ addiu $t2, $t2, 0x20 /* 332510 E001EBD0 24820008 */ addiu $v0, $a0, 0x8 /* 332514 E001EBD4 AD640000 */ sw $a0, 0x0($t3) /* 332518 E001EBD8 A5A50000 */ sh $a1, 0x0($t5) /* 33251C E001EBDC AD620000 */ sw $v0, 0x0($t3) /* 332520 E001EBE0 24820010 */ addiu $v0, $a0, 0x10 /* 332524 E001EBE4 AC860000 */ sw $a2, 0x0($a0) /* 332528 E001EBE8 AD620000 */ sw $v0, 0x0($t3) /* 33252C E001EBEC 29020005 */ slti $v0, $t0, 0x5 /* 332530 E001EBF0 AC940008 */ sw $s4, 0x8($a0) /* 332534 E001EBF4 1440FFC7 */ bnez $v0, .LE001EB14 /* 332538 E001EBF8 AC92000C */ sw $s2, 0xC($a0) /* 33253C E001EBFC 0000402D */ daddu $t0, $zero, $zero /* 332540 E001EC00 3C0C800A */ lui $t4, %hi(gMainGfxPos) /* 332544 E001EC04 258CA66C */ addiu $t4, $t4, %lo(gMainGfxPos) /* 332548 E001EC08 3C0B0600 */ lui $t3, (0x6000000 >> 16) /* 33254C E001EC0C 240A0001 */ addiu $t2, $zero, 0x1 /* 332550 E001EC10 3C0D0604 */ lui $t5, (0x6040602 >> 16) /* 332554 E001EC14 35AD0602 */ ori $t5, $t5, (0x6040602 & 0xFFFF) /* 332558 E001EC18 24070006 */ addiu $a3, $zero, 0x6 /* 33255C E001EC1C 24050004 */ addiu $a1, $zero, 0x4 /* 332560 E001EC20 0140302D */ daddu $a2, $t2, $zero /* 332564 E001EC24 24090002 */ addiu $t1, $zero, 0x2 .LE001EC28: /* 332568 E001EC28 8D840000 */ lw $a0, 0x0($t4) /* 33256C E001EC2C 24820008 */ addiu $v0, $a0, 0x8 /* 332570 E001EC30 AD820000 */ sw $v0, 0x0($t4) /* 332574 E001EC34 00081040 */ sll $v0, $t0, 1 /* 332578 E001EC38 14400004 */ bnez $v0, .LE001EC4C /* 33257C E001EC3C 00000000 */ nop /* 332580 E001EC40 00081440 */ sll $v0, $t0, 17 /* 332584 E001EC44 08007B1D */ j .LE001EC74 /* 332588 E001EC48 34420204 */ ori $v0, $v0, 0x204 .LE001EC4C: /* 33258C E001EC4C 144A0003 */ bne $v0, $t2, .LE001EC5C /* 332590 E001EC50 30A200FF */ andi $v0, $a1, 0xFF /* 332594 E001EC54 08007B1F */ j .LE001EC7C /* 332598 E001EC58 AC8D0000 */ sw $t5, 0x0($a0) .LE001EC5C: /* 33259C E001EC5C 00021400 */ sll $v0, $v0, 16 /* 3325A0 E001EC60 00081A80 */ sll $v1, $t0, 10 /* 3325A4 E001EC64 3063FC00 */ andi $v1, $v1, 0xFC00 /* 3325A8 E001EC68 00431025 */ or $v0, $v0, $v1 /* 3325AC E001EC6C 312300FF */ andi $v1, $t1, 0xFF /* 3325B0 E001EC70 00431025 */ or $v0, $v0, $v1 .LE001EC74: /* 3325B4 E001EC74 004B1025 */ or $v0, $v0, $t3 /* 3325B8 E001EC78 AC820000 */ sw $v0, 0x0($a0) .LE001EC7C: /* 3325BC E001EC7C 14C00004 */ bnez $a2, .LE001EC90 /* 3325C0 E001EC80 30E200FF */ andi $v0, $a3, 0xFF /* 3325C4 E001EC84 00021200 */ sll $v0, $v0, 8 /* 3325C8 E001EC88 08007B32 */ j .LE001ECC8 /* 3325CC E001EC8C 30A300FF */ andi $v1, $a1, 0xFF .LE001EC90: /* 3325D0 E001EC90 14CA0008 */ bne $a2, $t2, .LE001ECB4 /* 3325D4 E001EC94 30A200FF */ andi $v0, $a1, 0xFF /* 3325D8 E001EC98 30E300FF */ andi $v1, $a3, 0xFF /* 3325DC E001EC9C 00031C00 */ sll $v1, $v1, 16 /* 3325E0 E001ECA0 00021200 */ sll $v0, $v0, 8 /* 3325E4 E001ECA4 00621825 */ or $v1, $v1, $v0 /* 3325E8 E001ECA8 34630002 */ ori $v1, $v1, 0x2 /* 3325EC E001ECAC 08007B34 */ j .LE001ECD0 /* 3325F0 E001ECB0 AC830004 */ sw $v1, 0x4($a0) .LE001ECB4: /* 3325F4 E001ECB4 00021400 */ sll $v0, $v0, 16 /* 3325F8 E001ECB8 00061A40 */ sll $v1, $a2, 9 /* 3325FC E001ECBC 3063FE00 */ andi $v1, $v1, 0xFE00 /* 332600 E001ECC0 00431025 */ or $v0, $v0, $v1 /* 332604 E001ECC4 30E300FF */ andi $v1, $a3, 0xFF .LE001ECC8: /* 332608 E001ECC8 00431025 */ or $v0, $v0, $v1 /* 33260C E001ECCC AC820004 */ sw $v0, 0x4($a0) .LE001ECD0: /* 332610 E001ECD0 24E70004 */ addiu $a3, $a3, 0x4 /* 332614 E001ECD4 24A50004 */ addiu $a1, $a1, 0x4 /* 332618 E001ECD8 24C60002 */ addiu $a2, $a2, 0x2 /* 33261C E001ECDC 25080001 */ addiu $t0, $t0, 0x1 /* 332620 E001ECE0 29020004 */ slti $v0, $t0, 0x4 /* 332624 E001ECE4 1440FFD0 */ bnez $v0, .LE001EC28 /* 332628 E001ECE8 25290004 */ addiu $t1, $t1, 0x4 /* 33262C E001ECEC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 332630 E001ECF0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 332634 E001ECF4 8C620000 */ lw $v0, 0x0($v1) /* 332638 E001ECF8 0040202D */ daddu $a0, $v0, $zero /* 33263C E001ECFC 24420008 */ addiu $v0, $v0, 0x8 /* 332640 E001ED00 AC620000 */ sw $v0, 0x0($v1) /* 332644 E001ED04 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 332648 E001ED08 AC820000 */ sw $v0, 0x0($a0) /* 33264C E001ED0C AC800004 */ sw $zero, 0x4($a0) .LE001ED10: /* 332650 E001ED10 8FBF00C4 */ lw $ra, 0xC4($sp) /* 332654 E001ED14 8FBE00C0 */ lw $fp, 0xC0($sp) /* 332658 E001ED18 8FB700BC */ lw $s7, 0xBC($sp) /* 33265C E001ED1C 8FB600B8 */ lw $s6, 0xB8($sp) /* 332660 E001ED20 8FB500B4 */ lw $s5, 0xB4($sp) /* 332664 E001ED24 8FB400B0 */ lw $s4, 0xB0($sp) /* 332668 E001ED28 8FB300AC */ lw $s3, 0xAC($sp) /* 33266C E001ED2C 8FB200A8 */ lw $s2, 0xA8($sp) /* 332670 E001ED30 8FB100A4 */ lw $s1, 0xA4($sp) /* 332674 E001ED34 8FB000A0 */ lw $s0, 0xA0($sp) /* 332678 E001ED38 D7B800D8 */ ldc1 $f24, 0xD8($sp) /* 33267C E001ED3C D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 332680 E001ED40 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 332684 E001ED44 03E00008 */ jr $ra /* 332688 E001ED48 27BD00E0 */ addiu $sp, $sp, 0xE0 /* 33268C E001ED4C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void star_appendGfx(void* effect) { StarFXData* data = ((EffectInstance*)effect)->data.star; f32 unk_240 = data->unk_240; s32 unk_38 = data->unk_38; s32 unk_244 = data->unk_244; s32 unk_248 = data->unk_248; s32 unk_24C = data->unk_24C; s32 idx; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_240, data->unk_04, data->unk_08, data->unk_0C); shim_guRotateF(sp60, data->unk_24, 0.0f, 0.0f, 1.0f); 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); gDPSetPrimColor(gMainGfxPos++, 0, 80, unk_244, unk_248, unk_24C, 255); gDPSetEnvColor(gMainGfxPos++, 127, 127, 127, 127); gSPDisplayList(gMainGfxPos++, (data->unk_38 >= 2) ? D_09001650_333CF0 : D_09001530_333BD0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); if (unk_38 == 3) { gSPDisplayList(gMainGfxPos++, D_090017D0_333E70); } else { gSPDisplayList(gMainGfxPos++, D_09001780_333E20); } data->unk_3C++; if (data->unk_3C >= 8) { data->unk_3C = 0; } if (data->unk_1C <= 1.0f) { s32 baseIdx = (data->unk_3C + 5) % 8; shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_240, data->unk_04, data->unk_08, data->unk_0C); shim_guRotateF(sp60, data->unk_20, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &data->unk_40[data->unk_3C]); for (i = 0; i < 5; i++) { idx = (baseIdx - i + 8) % 8; gDisplayContext->matrixStack[gMatrixListPos] = data->unk_40[idx]; gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPVertex(gMainGfxPos++, &D_09001400_333AA0[i * 2], 2, i * 2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } for (i = 0; i < 4; i++) { s32 i2 = i * 2; gSP2Triangles(gMainGfxPos++, i2 , i2 + 1, i2 + 2, i2, i2 + 1, i2 + 3, i2 + 2, i2 + 1); } gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_draw_prev_frame_buffer /* CEE40 80138740 27BDFFB8 */ addiu $sp, $sp, -0x48 /* CEE44 80138744 AFB50034 */ sw $s5, 0x34($sp) /* CEE48 80138748 0080A82D */ daddu $s5, $a0, $zero /* CEE4C 8013874C AFB40030 */ sw $s4, 0x30($sp) /* CEE50 80138750 00C0A02D */ daddu $s4, $a2, $zero /* CEE54 80138754 0000C02D */ daddu $t8, $zero, $zero /* CEE58 80138758 C7A00058 */ lwc1 $f0, 0x58($sp) /* CEE5C 8013875C 02A0102D */ daddu $v0, $s5, $zero /* CEE60 80138760 AFBF0044 */ sw $ra, 0x44($sp) /* CEE64 80138764 AFBE0040 */ sw $fp, 0x40($sp) /* CEE68 80138768 AFB7003C */ sw $s7, 0x3C($sp) /* CEE6C 8013876C AFB60038 */ sw $s6, 0x38($sp) /* CEE70 80138770 AFB3002C */ sw $s3, 0x2C($sp) /* CEE74 80138774 AFB20028 */ sw $s2, 0x28($sp) /* CEE78 80138778 AFB10024 */ sw $s1, 0x24($sp) /* CEE7C 8013877C AFB00020 */ sw $s0, 0x20($sp) /* CEE80 80138780 06A10002 */ bgez $s5, .L8013878C /* CEE84 80138784 AFA5004C */ sw $a1, 0x4C($sp) /* CEE88 80138788 26A20003 */ addiu $v0, $s5, 0x3 .L8013878C: /* CEE8C 8013878C 00021083 */ sra $v0, $v0, 2 /* CEE90 80138790 0002A880 */ sll $s5, $v0, 2 /* CEE94 80138794 06810002 */ bgez $s4, .L801387A0 /* CEE98 80138798 0280102D */ daddu $v0, $s4, $zero /* CEE9C 8013879C 26820003 */ addiu $v0, $s4, 0x3 .L801387A0: /* CEEA0 801387A0 3C032AAA */ lui $v1, (0x2AAAAAAB >> 16) /* CEEA4 801387A4 3463AAAB */ ori $v1, $v1, (0x2AAAAAAB & 0xFFFF) /* CEEA8 801387A8 00021083 */ sra $v0, $v0, 2 /* CEEAC 801387AC 8FB9004C */ lw $t9, 0x4C($sp) /* CEEB0 801387B0 00021080 */ sll $v0, $v0, 2 /* CEEB4 801387B4 00F92023 */ subu $a0, $a3, $t9 /* CEEB8 801387B8 00830018 */ mult $a0, $v1 /* CEEBC 801387BC 24540004 */ addiu $s4, $v0, 0x4 /* CEEC0 801387C0 0000902D */ daddu $s2, $zero, $zero /* CEEC4 801387C4 3C058007 */ lui $a1, %hi(nuGfxCfbNum) /* CEEC8 801387C8 24A573F0 */ addiu $a1, $a1, %lo(nuGfxCfbNum) /* CEECC 801387CC 000417C3 */ sra $v0, $a0, 31 /* CEED0 801387D0 0000C810 */ mfhi $t9 /* CEED4 801387D4 0322C823 */ subu $t9, $t9, $v0 /* CEED8 801387D8 AFB90010 */ sw $t9, 0x10($sp) /* CEEDC 801387DC 0320B82D */ daddu $s7, $t9, $zero /* CEEE0 801387E0 00171040 */ sll $v0, $s7, 1 /* CEEE4 801387E4 00571021 */ addu $v0, $v0, $s7 /* CEEE8 801387E8 00021040 */ sll $v0, $v0, 1 /* CEEEC 801387EC 8CA30000 */ lw $v1, 0x0($a1) /* CEEF0 801387F0 00822023 */ subu $a0, $a0, $v0 /* CEEF4 801387F4 1060001A */ beqz $v1, .L80138860 /* CEEF8 801387F8 AFA40010 */ sw $a0, 0x10($sp) /* CEEFC 801387FC 00A0382D */ daddu $a3, $a1, $zero /* CEF00 80138800 3C05800A */ lui $a1, %hi(nuGfxCfb) /* CEF04 80138804 8CA5A658 */ lw $a1, %lo(nuGfxCfb)($a1) /* CEF08 80138808 3C06800A */ lui $a2, %hi(nuGfxCfb_ptr) /* CEF0C 8013880C 8CC6A64C */ lw $a2, %lo(nuGfxCfb_ptr)($a2) /* CEF10 80138810 00A0202D */ daddu $a0, $a1, $zero .L80138814: /* CEF14 80138814 8C820000 */ lw $v0, 0x0($a0) /* CEF18 80138818 1446000B */ bne $v0, $a2, .L80138848 /* CEF1C 8013881C 00000000 */ nop /* CEF20 80138820 8CE30000 */ lw $v1, 0x0($a3) /* CEF24 80138824 02431021 */ addu $v0, $s2, $v1 /* CEF28 80138828 2442FFFF */ addiu $v0, $v0, -0x1 /* CEF2C 8013882C 14600002 */ bnez $v1, .L80138838 /* CEF30 80138830 0043001B */ divu $zero, $v0, $v1 /* CEF34 80138834 0007000D */ break 7 .L80138838: /* CEF38 80138838 00001810 */ mfhi $v1 /* CEF3C 8013883C 00031880 */ sll $v1, $v1, 2 /* CEF40 80138840 00651821 */ addu $v1, $v1, $a1 /* CEF44 80138844 8C780000 */ lw $t8, 0x0($v1) .L80138848: /* CEF48 80138848 3C028007 */ lui $v0, %hi(nuGfxCfbNum) /* CEF4C 8013884C 8C4273F0 */ lw $v0, %lo(nuGfxCfbNum)($v0) /* CEF50 80138850 26520001 */ addiu $s2, $s2, 0x1 /* CEF54 80138854 0242102B */ sltu $v0, $s2, $v0 /* CEF58 80138858 1440FFEE */ bnez $v0, .L80138814 /* CEF5C 8013885C 24840004 */ addiu $a0, $a0, 0x4 .L80138860: /* CEF60 80138860 3C05E300 */ lui $a1, (0xE3000A01 >> 16) /* CEF64 80138864 34A50A01 */ ori $a1, $a1, (0xE3000A01 & 0xFFFF) /* CEF68 80138868 3C08FCFF */ lui $t0, (0xFCFFFFFF >> 16) /* CEF6C 8013886C 3508FFFF */ ori $t0, $t0, (0xFCFFFFFF & 0xFFFF) /* CEF70 80138870 3C06FFFC */ lui $a2, (0xFFFCF67B >> 16) /* CEF74 80138874 34C6F67B */ ori $a2, $a2, (0xFFFCF67B & 0xFFFF) /* CEF78 80138878 3C09E200 */ lui $t1, (0xE200001C >> 16) /* CEF7C 8013887C 3529001C */ ori $t1, $t1, (0xE200001C & 0xFFFF) /* CEF80 80138880 3C070050 */ lui $a3, (0x504340 >> 16) /* CEF84 80138884 34E74340 */ ori $a3, $a3, (0x504340 & 0xFFFF) /* CEF88 80138888 3C0AE300 */ lui $t2, (0xE3001801 >> 16) /* CEF8C 8013888C 354A1801 */ ori $t2, $t2, (0xE3001801 & 0xFFFF) /* CEF90 80138890 3C0BE300 */ lui $t3, (0xE3001A01 >> 16) /* CEF94 80138894 356B1A01 */ ori $t3, $t3, (0xE3001A01 & 0xFFFF) /* CEF98 80138898 3C0CE300 */ lui $t4, (0xE3001201 >> 16) /* CEF9C 8013889C 358C1201 */ ori $t4, $t4, (0xE3001201 & 0xFFFF) /* CEFA0 801388A0 3C0DE300 */ lui $t5, (0xE3000C00 >> 16) /* CEFA4 801388A4 35AD0C00 */ ori $t5, $t5, (0xE3000C00 & 0xFFFF) /* CEFA8 801388A8 3C0ED700 */ lui $t6, (0xD7000002 >> 16) /* CEFAC 801388AC 35CE0002 */ ori $t6, $t6, (0xD7000002 & 0xFFFF) /* CEFB0 801388B0 3C0FE300 */ lui $t7, (0xE3001001 >> 16) /* CEFB4 801388B4 35EF1001 */ ori $t7, $t7, (0xE3001001 & 0xFFFF) /* CEFB8 801388B8 3C10E300 */ lui $s0, (0xE3000D01 >> 16) /* CEFBC 801388BC 36100D01 */ ori $s0, $s0, (0xE3000D01 & 0xFFFF) /* CEFC0 801388C0 3C11E300 */ lui $s1, (0xE3000F00 >> 16) /* CEFC4 801388C4 3C04800A */ lui $a0, %hi(gMainGfxPos) /* CEFC8 801388C8 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* CEFCC 801388CC 36310F00 */ ori $s1, $s1, (0xE3000F00 & 0xFFFF) /* CEFD0 801388D0 8C820000 */ lw $v0, 0x0($a0) /* CEFD4 801388D4 3C014F00 */ lui $at, (0x4F000000 >> 16) /* CEFD8 801388D8 44811000 */ mtc1 $at, $f2 /* CEFDC 801388DC 0040182D */ daddu $v1, $v0, $zero /* CEFE0 801388E0 24420008 */ addiu $v0, $v0, 0x8 /* CEFE4 801388E4 AC820000 */ sw $v0, 0x0($a0) /* CEFE8 801388E8 AC650000 */ sw $a1, 0x0($v1) /* CEFEC 801388EC AC600004 */ sw $zero, 0x4($v1) /* CEFF0 801388F0 24430008 */ addiu $v1, $v0, 0x8 /* CEFF4 801388F4 AC830000 */ sw $v1, 0x0($a0) /* CEFF8 801388F8 24430010 */ addiu $v1, $v0, 0x10 /* CEFFC 801388FC AC480000 */ sw $t0, 0x0($v0) /* CF000 80138900 AC460004 */ sw $a2, 0x4($v0) /* CF004 80138904 AC830000 */ sw $v1, 0x0($a0) /* CF008 80138908 24430018 */ addiu $v1, $v0, 0x18 /* CF00C 8013890C AC490008 */ sw $t1, 0x8($v0) /* CF010 80138910 AC47000C */ sw $a3, 0xC($v0) /* CF014 80138914 AC830000 */ sw $v1, 0x0($a0) /* CF018 80138918 240300C0 */ addiu $v1, $zero, 0xC0 /* CF01C 8013891C AC430014 */ sw $v1, 0x14($v0) /* CF020 80138920 24430020 */ addiu $v1, $v0, 0x20 /* CF024 80138924 AC4A0010 */ sw $t2, 0x10($v0) /* CF028 80138928 AC830000 */ sw $v1, 0x0($a0) /* CF02C 8013892C 24030020 */ addiu $v1, $zero, 0x20 /* CF030 80138930 AC43001C */ sw $v1, 0x1C($v0) /* CF034 80138934 24430028 */ addiu $v1, $v0, 0x28 /* CF038 80138938 AC4B0018 */ sw $t3, 0x18($v0) /* CF03C 8013893C AC830000 */ sw $v1, 0x0($a0) /* CF040 80138940 24430030 */ addiu $v1, $v0, 0x30 /* CF044 80138944 AC4C0020 */ sw $t4, 0x20($v0) /* CF048 80138948 AC400024 */ sw $zero, 0x24($v0) /* CF04C 8013894C AC830000 */ sw $v1, 0x0($a0) /* CF050 80138950 24430038 */ addiu $v1, $v0, 0x38 /* CF054 80138954 AC4D0028 */ sw $t5, 0x28($v0) /* CF058 80138958 AC40002C */ sw $zero, 0x2C($v0) /* CF05C 8013895C AC830000 */ sw $v1, 0x0($a0) /* CF060 80138960 2403FFFF */ addiu $v1, $zero, -0x1 /* CF064 80138964 AC430034 */ sw $v1, 0x34($v0) /* CF068 80138968 24430040 */ addiu $v1, $v0, 0x40 /* CF06C 8013896C AC4E0030 */ sw $t6, 0x30($v0) /* CF070 80138970 AC830000 */ sw $v1, 0x0($a0) /* CF074 80138974 24430048 */ addiu $v1, $v0, 0x48 /* CF078 80138978 AC4F0038 */ sw $t7, 0x38($v0) /* CF07C 8013897C AC40003C */ sw $zero, 0x3C($v0) /* CF080 80138980 AC830000 */ sw $v1, 0x0($a0) /* CF084 80138984 24430050 */ addiu $v1, $v0, 0x50 /* CF088 80138988 AC500040 */ sw $s0, 0x40($v0) /* CF08C 8013898C AC400044 */ sw $zero, 0x44($v0) /* CF090 80138990 AC830000 */ sw $v1, 0x0($a0) /* CF094 80138994 24430058 */ addiu $v1, $v0, 0x58 /* CF098 80138998 AC510048 */ sw $s1, 0x48($v0) /* CF09C 8013899C AC40004C */ sw $zero, 0x4C($v0) /* CF0A0 801389A0 AC830000 */ sw $v1, 0x0($a0) /* CF0A4 801389A4 3C03FA00 */ lui $v1, (0xFA000000 >> 16) /* CF0A8 801389A8 24440054 */ addiu $a0, $v0, 0x54 /* CF0AC 801389AC 4600103E */ c.le.s $f2, $f0 /* CF0B0 801389B0 00000000 */ nop /* CF0B4 801389B4 45010005 */ bc1t .L801389CC /* CF0B8 801389B8 AC430050 */ sw $v1, 0x50($v0) /* CF0BC 801389BC 4600010D */ trunc.w.s $f4, $f0 /* CF0C0 801389C0 44032000 */ mfc1 $v1, $f4 /* CF0C4 801389C4 0804E27A */ j .L801389E8 /* CF0C8 801389C8 2402FF00 */ addiu $v0, $zero, -0x100 .L801389CC: /* CF0CC 801389CC 46020001 */ sub.s $f0, $f0, $f2 /* CF0D0 801389D0 3C028000 */ lui $v0, (0x80000000 >> 16) /* CF0D4 801389D4 4600010D */ trunc.w.s $f4, $f0 /* CF0D8 801389D8 44032000 */ mfc1 $v1, $f4 /* CF0DC 801389DC 00000000 */ nop /* CF0E0 801389E0 00621825 */ or $v1, $v1, $v0 /* CF0E4 801389E4 2402FF00 */ addiu $v0, $zero, -0x100 .L801389E8: /* CF0E8 801389E8 00621025 */ or $v0, $v1, $v0 /* CF0EC 801389EC AC820000 */ sw $v0, 0x0($a0) /* CF0F0 801389F0 1AE0006D */ blez $s7, .L80138BA8 /* CF0F4 801389F4 0000902D */ daddu $s2, $zero, $zero /* CF0F8 801389F8 3C11800A */ lui $s1, %hi(gMainGfxPos) /* CF0FC 801389FC 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* CF100 80138A00 02951023 */ subu $v0, $s4, $s5 /* CF104 80138A04 00021040 */ sll $v0, $v0, 1 /* CF108 80138A08 24420007 */ addiu $v0, $v0, 0x7 /* CF10C 80138A0C 000210C3 */ sra $v0, $v0, 3 /* CF110 80138A10 304201FF */ andi $v0, $v0, 0x1FF /* CF114 80138A14 00021240 */ sll $v0, $v0, 9 /* CF118 80138A18 3C03F510 */ lui $v1, (0xF5100000 >> 16) /* CF11C 80138A1C 0043B025 */ or $s6, $v0, $v1 /* CF120 80138A20 3C1E0700 */ lui $fp, (0x7000000 >> 16) /* CF124 80138A24 8FB3004C */ lw $s3, 0x4C($sp) /* CF128 80138A28 3C03FD10 */ lui $v1, (0xFD10013F >> 16) .L80138A2C: /* CF12C 80138A2C 3463013F */ ori $v1, $v1, (0xFD10013F & 0xFFFF) /* CF130 80138A30 0300202D */ daddu $a0, $t8, $zero /* CF134 80138A34 8E220000 */ lw $v0, 0x0($s1) /* CF138 80138A38 26520001 */ addiu $s2, $s2, 0x1 /* CF13C 80138A3C 0040802D */ daddu $s0, $v0, $zero /* CF140 80138A40 24420008 */ addiu $v0, $v0, 0x8 /* CF144 80138A44 AE220000 */ sw $v0, 0x0($s1) /* CF148 80138A48 AE030000 */ sw $v1, 0x0($s0) /* CF14C 80138A4C 0C0187A4 */ jal osVirtualToPhysical /* CF150 80138A50 AFB80018 */ sw $t8, 0x18($sp) /* CF154 80138A54 3C090400 */ lui $t1, (0x4000400 >> 16) /* CF158 80138A58 35290400 */ ori $t1, $t1, (0x4000400 & 0xFFFF) /* CF15C 80138A5C 00133880 */ sll $a3, $s3, 2 /* CF160 80138A60 26640005 */ addiu $a0, $s3, 0x5 /* CF164 80138A64 26630006 */ addiu $v1, $s3, 0x6 /* CF168 80138A68 00134140 */ sll $t0, $s3, 5 /* CF16C 80138A6C 0060982D */ daddu $s3, $v1, $zero /* CF170 80138A70 00153080 */ sll $a2, $s5, 2 /* CF174 80138A74 30C60FFF */ andi $a2, $a2, 0xFFF /* CF178 80138A78 00063300 */ sll $a2, $a2, 12 /* CF17C 80138A7C 30E70FFF */ andi $a3, $a3, 0xFFF /* CF180 80138A80 2683FFFF */ addiu $v1, $s4, -0x1 /* CF184 80138A84 00031880 */ sll $v1, $v1, 2 /* CF188 80138A88 30630FFF */ andi $v1, $v1, 0xFFF /* CF18C 80138A8C 00031B00 */ sll $v1, $v1, 12 /* CF190 80138A90 00042080 */ sll $a0, $a0, 2 /* CF194 80138A94 30840FFF */ andi $a0, $a0, 0xFFF /* CF198 80138A98 8E250000 */ lw $a1, 0x0($s1) /* CF19C 80138A9C 3108FFFF */ andi $t0, $t0, 0xFFFF /* CF1A0 80138AA0 AE020004 */ sw $v0, 0x4($s0) /* CF1A4 80138AA4 00A0102D */ daddu $v0, $a1, $zero /* CF1A8 80138AA8 24A50008 */ addiu $a1, $a1, 0x8 /* CF1AC 80138AAC AE250000 */ sw $a1, 0x0($s1) /* CF1B0 80138AB0 AC560000 */ sw $s6, 0x0($v0) /* CF1B4 80138AB4 AC5E0004 */ sw $fp, 0x4($v0) /* CF1B8 80138AB8 24A20008 */ addiu $v0, $a1, 0x8 /* CF1BC 80138ABC AE220000 */ sw $v0, 0x0($s1) /* CF1C0 80138AC0 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* CF1C4 80138AC4 ACA20000 */ sw $v0, 0x0($a1) /* CF1C8 80138AC8 24A20010 */ addiu $v0, $a1, 0x10 /* CF1CC 80138ACC ACA00004 */ sw $zero, 0x4($a1) /* CF1D0 80138AD0 AE220000 */ sw $v0, 0x0($s1) /* CF1D4 80138AD4 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* CF1D8 80138AD8 00E21025 */ or $v0, $a3, $v0 /* CF1DC 80138ADC 00C21025 */ or $v0, $a2, $v0 /* CF1E0 80138AE0 ACA20008 */ sw $v0, 0x8($a1) /* CF1E4 80138AE4 009E1025 */ or $v0, $a0, $fp /* CF1E8 80138AE8 00621025 */ or $v0, $v1, $v0 /* CF1EC 80138AEC ACA2000C */ sw $v0, 0xC($a1) /* CF1F0 80138AF0 24A20018 */ addiu $v0, $a1, 0x18 /* CF1F4 80138AF4 AE220000 */ sw $v0, 0x0($s1) /* CF1F8 80138AF8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* CF1FC 80138AFC ACA20010 */ sw $v0, 0x10($a1) /* CF200 80138B00 24A20020 */ addiu $v0, $a1, 0x20 /* CF204 80138B04 ACA00014 */ sw $zero, 0x14($a1) /* CF208 80138B08 AE220000 */ sw $v0, 0x0($s1) /* CF20C 80138B0C 24A20028 */ addiu $v0, $a1, 0x28 /* CF210 80138B10 ACB60018 */ sw $s6, 0x18($a1) /* CF214 80138B14 ACA0001C */ sw $zero, 0x1C($a1) /* CF218 80138B18 AE220000 */ sw $v0, 0x0($s1) /* CF21C 80138B1C 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* CF220 80138B20 00E21025 */ or $v0, $a3, $v0 /* CF224 80138B24 00C21025 */ or $v0, $a2, $v0 /* CF228 80138B28 00641825 */ or $v1, $v1, $a0 /* CF22C 80138B2C ACA20020 */ sw $v0, 0x20($a1) /* CF230 80138B30 24A20030 */ addiu $v0, $a1, 0x30 /* CF234 80138B34 ACA30024 */ sw $v1, 0x24($a1) /* CF238 80138B38 00141880 */ sll $v1, $s4, 2 /* CF23C 80138B3C 30630FFF */ andi $v1, $v1, 0xFFF /* CF240 80138B40 00031B00 */ sll $v1, $v1, 12 /* CF244 80138B44 AE220000 */ sw $v0, 0x0($s1) /* CF248 80138B48 00131080 */ sll $v0, $s3, 2 /* CF24C 80138B4C 30420FFF */ andi $v0, $v0, 0xFFF /* CF250 80138B50 3C04E400 */ lui $a0, (0xE4000000 >> 16) /* CF254 80138B54 00441025 */ or $v0, $v0, $a0 /* CF258 80138B58 00621825 */ or $v1, $v1, $v0 /* CF25C 80138B5C 00C73025 */ or $a2, $a2, $a3 /* CF260 80138B60 24A20038 */ addiu $v0, $a1, 0x38 /* CF264 80138B64 ACA30028 */ sw $v1, 0x28($a1) /* CF268 80138B68 ACA6002C */ sw $a2, 0x2C($a1) /* CF26C 80138B6C AE220000 */ sw $v0, 0x0($s1) /* CF270 80138B70 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* CF274 80138B74 ACA20030 */ sw $v0, 0x30($a1) /* CF278 80138B78 00151540 */ sll $v0, $s5, 21 /* CF27C 80138B7C 00481025 */ or $v0, $v0, $t0 /* CF280 80138B80 ACA20034 */ sw $v0, 0x34($a1) /* CF284 80138B84 24A20040 */ addiu $v0, $a1, 0x40 /* CF288 80138B88 AE220000 */ sw $v0, 0x0($s1) /* CF28C 80138B8C 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* CF290 80138B90 ACA20038 */ sw $v0, 0x38($a1) /* CF294 80138B94 0257102A */ slt $v0, $s2, $s7 /* CF298 80138B98 ACA9003C */ sw $t1, 0x3C($a1) /* CF29C 80138B9C 8FB80018 */ lw $t8, 0x18($sp) /* CF2A0 80138BA0 1440FFA2 */ bnez $v0, .L80138A2C /* CF2A4 80138BA4 3C03FD10 */ lui $v1, (0xFD10013F >> 16) .L80138BA8: /* CF2A8 80138BA8 8FB90010 */ lw $t9, 0x10($sp) /* CF2AC 80138BAC 1320006A */ beqz $t9, .L80138D58 /* CF2B0 80138BB0 3C03FD10 */ lui $v1, (0xFD10013F >> 16) /* CF2B4 80138BB4 3463013F */ ori $v1, $v1, (0xFD10013F & 0xFFFF) /* CF2B8 80138BB8 3C10800A */ lui $s0, %hi(gMainGfxPos) /* CF2BC 80138BBC 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* CF2C0 80138BC0 8E020000 */ lw $v0, 0x0($s0) /* CF2C4 80138BC4 0300202D */ daddu $a0, $t8, $zero /* CF2C8 80138BC8 0040882D */ daddu $s1, $v0, $zero /* CF2CC 80138BCC 24420008 */ addiu $v0, $v0, 0x8 /* CF2D0 80138BD0 AE020000 */ sw $v0, 0x0($s0) /* CF2D4 80138BD4 0C0187A4 */ jal osVirtualToPhysical /* CF2D8 80138BD8 AE230000 */ sw $v1, 0x0($s1) /* CF2DC 80138BDC 3C0C0400 */ lui $t4, (0x4000400 >> 16) /* CF2E0 80138BE0 358C0400 */ ori $t4, $t4, (0x4000400 & 0xFFFF) /* CF2E4 80138BE4 02952823 */ subu $a1, $s4, $s5 /* CF2E8 80138BE8 00052840 */ sll $a1, $a1, 1 /* CF2EC 80138BEC 24A50007 */ addiu $a1, $a1, 0x7 /* CF2F0 80138BF0 000528C3 */ sra $a1, $a1, 3 /* CF2F4 80138BF4 30A501FF */ andi $a1, $a1, 0x1FF /* CF2F8 80138BF8 8E040000 */ lw $a0, 0x0($s0) /* CF2FC 80138BFC 00052A40 */ sll $a1, $a1, 9 /* CF300 80138C00 AE220004 */ sw $v0, 0x4($s1) /* CF304 80138C04 3C02F510 */ lui $v0, (0xF5100000 >> 16) /* CF308 80138C08 00A22825 */ or $a1, $a1, $v0 /* CF30C 80138C0C 3C0A0700 */ lui $t2, (0x7000000 >> 16) /* CF310 80138C10 00154880 */ sll $t1, $s5, 2 /* CF314 80138C14 31290FFF */ andi $t1, $t1, 0xFFF /* CF318 80138C18 00094B00 */ sll $t1, $t1, 12 /* CF31C 80138C1C 00123840 */ sll $a3, $s2, 1 /* CF320 80138C20 00F23821 */ addu $a3, $a3, $s2 /* CF324 80138C24 00073840 */ sll $a3, $a3, 1 /* CF328 80138C28 0080182D */ daddu $v1, $a0, $zero /* CF32C 80138C2C 24840008 */ addiu $a0, $a0, 0x8 /* CF330 80138C30 24820008 */ addiu $v0, $a0, 0x8 /* CF334 80138C34 AE040000 */ sw $a0, 0x0($s0) /* CF338 80138C38 AC650000 */ sw $a1, 0x0($v1) /* CF33C 80138C3C AC6A0004 */ sw $t2, 0x4($v1) /* CF340 80138C40 AE020000 */ sw $v0, 0x0($s0) /* CF344 80138C44 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* CF348 80138C48 AC820000 */ sw $v0, 0x0($a0) /* CF34C 80138C4C 24820010 */ addiu $v0, $a0, 0x10 /* CF350 80138C50 AC800004 */ sw $zero, 0x4($a0) /* CF354 80138C54 AE020000 */ sw $v0, 0x0($s0) /* CF358 80138C58 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* CF35C 80138C5C 2683FFFF */ addiu $v1, $s4, -0x1 /* CF360 80138C60 00031880 */ sll $v1, $v1, 2 /* CF364 80138C64 30630FFF */ andi $v1, $v1, 0xFFF /* CF368 80138C68 8FB9004C */ lw $t9, 0x4C($sp) /* CF36C 80138C6C 00031B00 */ sll $v1, $v1, 12 /* CF370 80138C70 03273821 */ addu $a3, $t9, $a3 /* CF374 80138C74 00075880 */ sll $t3, $a3, 2 /* CF378 80138C78 316B0FFF */ andi $t3, $t3, 0xFFF /* CF37C 80138C7C 01621025 */ or $v0, $t3, $v0 /* CF380 80138C80 01221025 */ or $v0, $t1, $v0 /* CF384 80138C84 AC820008 */ sw $v0, 0x8($a0) /* CF388 80138C88 8FB90010 */ lw $t9, 0x10($sp) /* CF38C 80138C8C 24820018 */ addiu $v0, $a0, 0x18 /* CF390 80138C90 00F93021 */ addu $a2, $a3, $t9 /* CF394 80138C94 24C8FFFF */ addiu $t0, $a2, -0x1 /* CF398 80138C98 00084080 */ sll $t0, $t0, 2 /* CF39C 80138C9C 31080FFF */ andi $t0, $t0, 0xFFF /* CF3A0 80138CA0 010A5025 */ or $t2, $t0, $t2 /* CF3A4 80138CA4 006A5025 */ or $t2, $v1, $t2 /* CF3A8 80138CA8 AC8A000C */ sw $t2, 0xC($a0) /* CF3AC 80138CAC AE020000 */ sw $v0, 0x0($s0) /* CF3B0 80138CB0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* CF3B4 80138CB4 AC820010 */ sw $v0, 0x10($a0) /* CF3B8 80138CB8 24820020 */ addiu $v0, $a0, 0x20 /* CF3BC 80138CBC AC800014 */ sw $zero, 0x14($a0) /* CF3C0 80138CC0 AE020000 */ sw $v0, 0x0($s0) /* CF3C4 80138CC4 24820028 */ addiu $v0, $a0, 0x28 /* CF3C8 80138CC8 AC850018 */ sw $a1, 0x18($a0) /* CF3CC 80138CCC AC80001C */ sw $zero, 0x1C($a0) /* CF3D0 80138CD0 AE020000 */ sw $v0, 0x0($s0) /* CF3D4 80138CD4 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* CF3D8 80138CD8 01621025 */ or $v0, $t3, $v0 /* CF3DC 80138CDC 01221025 */ or $v0, $t1, $v0 /* CF3E0 80138CE0 00681825 */ or $v1, $v1, $t0 /* CF3E4 80138CE4 AC820020 */ sw $v0, 0x20($a0) /* CF3E8 80138CE8 24820030 */ addiu $v0, $a0, 0x30 /* CF3EC 80138CEC AC830024 */ sw $v1, 0x24($a0) /* CF3F0 80138CF0 AE020000 */ sw $v0, 0x0($s0) /* CF3F4 80138CF4 00141080 */ sll $v0, $s4, 2 /* CF3F8 80138CF8 30420FFF */ andi $v0, $v0, 0xFFF /* CF3FC 80138CFC 00021300 */ sll $v0, $v0, 12 /* CF400 80138D00 00063080 */ sll $a2, $a2, 2 /* CF404 80138D04 30C60FFF */ andi $a2, $a2, 0xFFF /* CF408 80138D08 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* CF40C 80138D0C 00C33025 */ or $a2, $a2, $v1 /* CF410 80138D10 00461025 */ or $v0, $v0, $a2 /* CF414 80138D14 012B4825 */ or $t1, $t1, $t3 /* CF418 80138D18 AC820028 */ sw $v0, 0x28($a0) /* CF41C 80138D1C 24820038 */ addiu $v0, $a0, 0x38 /* CF420 80138D20 AC89002C */ sw $t1, 0x2C($a0) /* CF424 80138D24 AE020000 */ sw $v0, 0x0($s0) /* CF428 80138D28 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* CF42C 80138D2C AC820030 */ sw $v0, 0x30($a0) /* CF430 80138D30 00151540 */ sll $v0, $s5, 21 /* CF434 80138D34 00073940 */ sll $a3, $a3, 5 /* CF438 80138D38 30E7FFFF */ andi $a3, $a3, 0xFFFF /* CF43C 80138D3C 00471025 */ or $v0, $v0, $a3 /* CF440 80138D40 AC820034 */ sw $v0, 0x34($a0) /* CF444 80138D44 24820040 */ addiu $v0, $a0, 0x40 /* CF448 80138D48 AE020000 */ sw $v0, 0x0($s0) /* CF44C 80138D4C 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* CF450 80138D50 AC820038 */ sw $v0, 0x38($a0) /* CF454 80138D54 AC8C003C */ sw $t4, 0x3C($a0) .L80138D58: /* CF458 80138D58 8FBF0044 */ lw $ra, 0x44($sp) /* CF45C 80138D5C 8FBE0040 */ lw $fp, 0x40($sp) /* CF460 80138D60 8FB7003C */ lw $s7, 0x3C($sp) /* CF464 80138D64 8FB60038 */ lw $s6, 0x38($sp) /* CF468 80138D68 8FB50034 */ lw $s5, 0x34($sp) /* CF46C 80138D6C 8FB40030 */ lw $s4, 0x30($sp) /* CF470 80138D70 8FB3002C */ lw $s3, 0x2C($sp) /* CF474 80138D74 8FB20028 */ lw $s2, 0x28($sp) /* CF478 80138D78 8FB10024 */ lw $s1, 0x24($sp) /* CF47C 80138D7C 8FB00020 */ lw $s0, 0x20($sp) /* CF480 80138D80 03E00008 */ jr $ra /* CF484 80138D84 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void appendGfx_draw_prev_frame_buffer(s32 x1, s32 y1, s32 x2, s32 y2, f32 alpha) { s32 stripY, extraY; s32 i; u16* prevGfxCfb = NULL; // round the x positions x1 = x1 - (x1 % 4); x2 = x2 - (x2 % 4) + 4; // can only load 6 rows of the color buffer at a time: 320*6*2 = 3840 bytes of the 4096 capacity stripY = (y2 - y1) / 6; extraY = (y2 - y1) % 6; // get previous color buffer for (i = 0; i < nuGfxCfbNum; i++) { if (nuGfxCfb[i] == nuGfxCfb_ptr) { prevGfxCfb = nuGfxCfb[(i + nuGfxCfbNum - 1) % nuGfxCfbNum]; } } gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); gDPSetCombineMode(gMainGfxPos++, PM_CC_10, PM_CC_10); gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE); gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE); gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha); for (i = 0; i < stripY; i++) { gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 6, x1, y1 + i * 6, x2 - 1, y1 + i * 6 + 5, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4, G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024); } if (extraY != 0) { gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, extraY, x1, y1 + i * 6, x2 - 1, y1 + i * 6 + extraY - 1, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + extraY) * 4, G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel snowman_doll_update /* 3BCEC0 E00C0160 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 3BCEC4 E00C0164 AFBF002C */ sw $ra, 0x2C($sp) /* 3BCEC8 E00C0168 AFB00028 */ sw $s0, 0x28($sp) /* 3BCECC E00C016C F7B40030 */ sdc1 $f20, 0x30($sp) /* 3BCED0 E00C0170 8C830000 */ lw $v1, 0x0($a0) /* 3BCED4 E00C0174 8C90000C */ lw $s0, 0xC($a0) /* 3BCED8 E00C0178 30620010 */ andi $v0, $v1, 0x10 /* 3BCEDC E00C017C 10400005 */ beqz $v0, .LE00C0194 /* 3BCEE0 E00C0180 2402FFEF */ addiu $v0, $zero, -0x11 /* 3BCEE4 E00C0184 00621024 */ and $v0, $v1, $v0 /* 3BCEE8 E00C0188 AC820000 */ sw $v0, 0x0($a0) /* 3BCEEC E00C018C 24020010 */ addiu $v0, $zero, 0x10 /* 3BCEF0 E00C0190 AE020010 */ sw $v0, 0x10($s0) .LE00C0194: /* 3BCEF4 E00C0194 8E030010 */ lw $v1, 0x10($s0) /* 3BCEF8 E00C0198 286203E8 */ slti $v0, $v1, 0x3E8 /* 3BCEFC E00C019C 10400002 */ beqz $v0, .LE00C01A8 /* 3BCF00 E00C01A0 2462FFFF */ addiu $v0, $v1, -0x1 /* 3BCF04 E00C01A4 AE020010 */ sw $v0, 0x10($s0) .LE00C01A8: /* 3BCF08 E00C01A8 8E020014 */ lw $v0, 0x14($s0) /* 3BCF0C E00C01AC 8E050010 */ lw $a1, 0x10($s0) /* 3BCF10 E00C01B0 24420001 */ addiu $v0, $v0, 0x1 /* 3BCF14 E00C01B4 04A10005 */ bgez $a1, .LE00C01CC /* 3BCF18 E00C01B8 AE020014 */ sw $v0, 0x14($s0) /* 3BCF1C E00C01BC 0C080128 */ jal shim_remove_effect /* 3BCF20 E00C01C0 00000000 */ nop /* 3BCF24 E00C01C4 080301BF */ j .LE00C06FC /* 3BCF28 E00C01C8 00000000 */ nop .LE00C01CC: /* 3BCF2C E00C01CC 0040302D */ daddu $a2, $v0, $zero /* 3BCF30 E00C01D0 28A20010 */ slti $v0, $a1, 0x10 /* 3BCF34 E00C01D4 10400002 */ beqz $v0, .LE00C01E0 /* 3BCF38 E00C01D8 00051100 */ sll $v0, $a1, 4 /* 3BCF3C E00C01DC AE020024 */ sw $v0, 0x24($s0) .LE00C01E0: /* 3BCF40 E00C01E0 28C20010 */ slti $v0, $a2, 0x10 /* 3BCF44 E00C01E4 10400003 */ beqz $v0, .LE00C01F4 /* 3BCF48 E00C01E8 00061100 */ sll $v0, $a2, 4 /* 3BCF4C E00C01EC 2442000F */ addiu $v0, $v0, 0xF /* 3BCF50 E00C01F0 AE020024 */ sw $v0, 0x24($s0) .LE00C01F4: /* 3BCF54 E00C01F4 C604003C */ lwc1 $f4, 0x3C($s0) /* 3BCF58 E00C01F8 44800000 */ mtc1 $zero, $f0 /* 3BCF5C E00C01FC 00000000 */ nop /* 3BCF60 E00C0200 46002032 */ c.eq.s $f4, $f0 /* 3BCF64 E00C0204 00000000 */ nop /* 3BCF68 E00C0208 45010010 */ bc1t .LE00C024C /* 3BCF6C E00C020C 00000000 */ nop /* 3BCF70 E00C0210 C6020040 */ lwc1 $f2, 0x40($s0) /* 3BCF74 E00C0214 4600103C */ c.lt.s $f2, $f0 /* 3BCF78 E00C0218 00000000 */ nop /* 3BCF7C E00C021C 45030001 */ bc1tl .LE00C0224 /* 3BCF80 E00C0220 46001087 */ neg.s $f2, $f2 .LE00C0224: /* 3BCF84 E00C0224 4600203C */ c.lt.s $f4, $f0 /* 3BCF88 E00C0228 00000000 */ nop /* 3BCF8C E00C022C 45000004 */ bc1f .LE00C0240 /* 3BCF90 E00C0230 00000000 */ nop /* 3BCF94 E00C0234 C600002C */ lwc1 $f0, 0x2C($s0) /* 3BCF98 E00C0238 08030092 */ j .LE00C0248 /* 3BCF9C E00C023C 46020001 */ sub.s $f0, $f0, $f2 .LE00C0240: /* 3BCFA0 E00C0240 C600002C */ lwc1 $f0, 0x2C($s0) /* 3BCFA4 E00C0244 46020000 */ add.s $f0, $f0, $f2 .LE00C0248: /* 3BCFA8 E00C0248 E600002C */ swc1 $f0, 0x2C($s0) .LE00C024C: /* 3BCFAC E00C024C 8E040058 */ lw $a0, 0x58($s0) /* 3BCFB0 E00C0250 24020001 */ addiu $v0, $zero, 0x1 /* 3BCFB4 E00C0254 10820028 */ beq $a0, $v0, .LE00C02F8 /* 3BCFB8 E00C0258 28820002 */ slti $v0, $a0, 0x2 /* 3BCFBC E00C025C 10400005 */ beqz $v0, .LE00C0274 /* 3BCFC0 E00C0260 24050002 */ addiu $a1, $zero, 0x2 /* 3BCFC4 E00C0264 10800009 */ beqz $a0, .LE00C028C /* 3BCFC8 E00C0268 30C30007 */ andi $v1, $a2, 0x7 /* 3BCFCC E00C026C 08030175 */ j .LE00C05D4 /* 3BCFD0 E00C0270 24020001 */ addiu $v0, $zero, 0x1 .LE00C0274: /* 3BCFD4 E00C0274 10850075 */ beq $a0, $a1, .LE00C044C /* 3BCFD8 E00C0278 24020003 */ addiu $v0, $zero, 0x3 /* 3BCFDC E00C027C 1082003B */ beq $a0, $v0, .LE00C036C /* 3BCFE0 E00C0280 30C30007 */ andi $v1, $a2, 0x7 /* 3BCFE4 E00C0284 08030175 */ j .LE00C05D4 /* 3BCFE8 E00C0288 24020001 */ addiu $v0, $zero, 0x1 .LE00C028C: /* 3BCFEC E00C028C 8E030054 */ lw $v1, 0x54($s0) /* 3BCFF0 E00C0290 3C02E00C */ lui $v0, (0xE00C0A24 >> 16) /* 3BCFF4 E00C0294 00431021 */ addu $v0, $v0, $v1 /* 3BCFF8 E00C0298 90420A24 */ lbu $v0, (0xE00C0A24 & 0xFFFF)($v0) /* 3BCFFC E00C029C 3C01E00C */ lui $at, (0xE00C0C00 >> 16) /* 3BD000 E00C02A0 D4220C00 */ ldc1 $f2, (0xE00C0C00 & 0xFFFF)($at) /* 3BD004 E00C02A4 44820000 */ mtc1 $v0, $f0 /* 3BD008 E00C02A8 00000000 */ nop /* 3BD00C E00C02AC 46800020 */ cvt.s.w $f0, $f0 /* 3BD010 E00C02B0 46000021 */ cvt.d.s $f0, $f0 /* 3BD014 E00C02B4 46220002 */ mul.d $f0, $f0, $f2 /* 3BD018 E00C02B8 00000000 */ nop /* 3BD01C E00C02BC 46200020 */ cvt.s.d $f0, $f0 /* 3BD020 E00C02C0 E600004C */ swc1 $f0, 0x4C($s0) /* 3BD024 E00C02C4 46000086 */ mov.s $f2, $f0 /* 3BD028 E00C02C8 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BD02C E00C02CC 44810000 */ mtc1 $at, $f0 /* 3BD030 E00C02D0 24630001 */ addiu $v1, $v1, 0x1 /* 3BD034 E00C02D4 AE030054 */ sw $v1, 0x54($s0) /* 3BD038 E00C02D8 46020001 */ sub.s $f0, $f0, $f2 /* 3BD03C E00C02DC 0060102D */ daddu $v0, $v1, $zero /* 3BD040 E00C02E0 2842001B */ slti $v0, $v0, 0x1B /* 3BD044 E00C02E4 144000B9 */ bnez $v0, .LE00C05CC /* 3BD048 E00C02E8 E6000048 */ swc1 $f0, 0x48($s0) /* 3BD04C E00C02EC 24020002 */ addiu $v0, $zero, 0x2 /* 3BD050 E00C02F0 08030173 */ j .LE00C05CC /* 3BD054 E00C02F4 AE020058 */ sw $v0, 0x58($s0) .LE00C02F8: /* 3BD058 E00C02F8 8E030054 */ lw $v1, 0x54($s0) /* 3BD05C E00C02FC 3C02E00C */ lui $v0, (0xE00C0A10 >> 16) /* 3BD060 E00C0300 00431021 */ addu $v0, $v0, $v1 /* 3BD064 E00C0304 80420A10 */ lb $v0, (0xE00C0A10 & 0xFFFF)($v0) /* 3BD068 E00C0308 3C01E00C */ lui $at, (0xE00C0C08 >> 16) /* 3BD06C E00C030C D4220C08 */ ldc1 $f2, (0xE00C0C08 & 0xFFFF)($at) /* 3BD070 E00C0310 44820000 */ mtc1 $v0, $f0 /* 3BD074 E00C0314 00000000 */ nop /* 3BD078 E00C0318 46800020 */ cvt.s.w $f0, $f0 /* 3BD07C E00C031C 46000021 */ cvt.d.s $f0, $f0 /* 3BD080 E00C0320 46220002 */ mul.d $f0, $f0, $f2 /* 3BD084 E00C0324 00000000 */ nop /* 3BD088 E00C0328 46200020 */ cvt.s.d $f0, $f0 /* 3BD08C E00C032C E600004C */ swc1 $f0, 0x4C($s0) /* 3BD090 E00C0330 46000086 */ mov.s $f2, $f0 /* 3BD094 E00C0334 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BD098 E00C0338 44810000 */ mtc1 $at, $f0 /* 3BD09C E00C033C 24630001 */ addiu $v1, $v1, 0x1 /* 3BD0A0 E00C0340 AE030054 */ sw $v1, 0x54($s0) /* 3BD0A4 E00C0344 46020001 */ sub.s $f0, $f0, $f2 /* 3BD0A8 E00C0348 0060102D */ daddu $v0, $v1, $zero /* 3BD0AC E00C034C 28420012 */ slti $v0, $v0, 0x12 /* 3BD0B0 E00C0350 14400003 */ bnez $v0, .LE00C0360 /* 3BD0B4 E00C0354 E6000048 */ swc1 $f0, 0x48($s0) /* 3BD0B8 E00C0358 24020002 */ addiu $v0, $zero, 0x2 /* 3BD0BC E00C035C AE020058 */ sw $v0, 0x58($s0) .LE00C0360: /* 3BD0C0 E00C0360 8E020054 */ lw $v0, 0x54($s0) /* 3BD0C4 E00C0364 080300FF */ j .LE00C03FC /* 3BD0C8 E00C0368 28420008 */ slti $v0, $v0, 0x8 .LE00C036C: /* 3BD0CC E00C036C 8E030054 */ lw $v1, 0x54($s0) /* 3BD0D0 E00C0370 3C02E00C */ lui $v0, (0xE00C0A40 >> 16) /* 3BD0D4 E00C0374 00431021 */ addu $v0, $v0, $v1 /* 3BD0D8 E00C0378 90420A40 */ lbu $v0, (0xE00C0A40 & 0xFFFF)($v0) /* 3BD0DC E00C037C 3C01E00C */ lui $at, (0xE00C0C10 >> 16) /* 3BD0E0 E00C0380 D4220C10 */ ldc1 $f2, (0xE00C0C10 & 0xFFFF)($at) /* 3BD0E4 E00C0384 44820000 */ mtc1 $v0, $f0 /* 3BD0E8 E00C0388 00000000 */ nop /* 3BD0EC E00C038C 46800020 */ cvt.s.w $f0, $f0 /* 3BD0F0 E00C0390 46000021 */ cvt.d.s $f0, $f0 /* 3BD0F4 E00C0394 46220002 */ mul.d $f0, $f0, $f2 /* 3BD0F8 E00C0398 00000000 */ nop /* 3BD0FC E00C039C 46200020 */ cvt.s.d $f0, $f0 /* 3BD100 E00C03A0 E600004C */ swc1 $f0, 0x4C($s0) /* 3BD104 E00C03A4 46000086 */ mov.s $f2, $f0 /* 3BD108 E00C03A8 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BD10C E00C03AC 44810000 */ mtc1 $at, $f0 /* 3BD110 E00C03B0 24630001 */ addiu $v1, $v1, 0x1 /* 3BD114 E00C03B4 46020001 */ sub.s $f0, $f0, $f2 /* 3BD118 E00C03B8 AE030054 */ sw $v1, 0x54($s0) /* 3BD11C E00C03BC 0060102D */ daddu $v0, $v1, $zero /* 3BD120 E00C03C0 E6000048 */ swc1 $f0, 0x48($s0) /* 3BD124 E00C03C4 3C03E00C */ lui $v1, (0xE00C0A8C >> 16) /* 3BD128 E00C03C8 00621821 */ addu $v1, $v1, $v0 /* 3BD12C E00C03CC 80630A8C */ lb $v1, (0xE00C0A8C & 0xFFFF)($v1) /* 3BD130 E00C03D0 24420001 */ addiu $v0, $v0, 0x1 /* 3BD134 E00C03D4 AE020054 */ sw $v0, 0x54($s0) /* 3BD138 E00C03D8 2842004A */ slti $v0, $v0, 0x4A /* 3BD13C E00C03DC 44830000 */ mtc1 $v1, $f0 /* 3BD140 E00C03E0 00000000 */ nop /* 3BD144 E00C03E4 46800020 */ cvt.s.w $f0, $f0 /* 3BD148 E00C03E8 14400002 */ bnez $v0, .LE00C03F4 /* 3BD14C E00C03EC E600002C */ swc1 $f0, 0x2C($s0) /* 3BD150 E00C03F0 AE050058 */ sw $a1, 0x58($s0) .LE00C03F4: /* 3BD154 E00C03F4 8E020054 */ lw $v0, 0x54($s0) /* 3BD158 E00C03F8 28420040 */ slti $v0, $v0, 0x40 .LE00C03FC: /* 3BD15C E00C03FC 14400074 */ bnez $v0, .LE00C05D0 /* 3BD160 E00C0400 30C30007 */ andi $v1, $a2, 0x7 /* 3BD164 E00C0404 C6080030 */ lwc1 $f8, 0x30($s0) /* 3BD168 E00C0408 C600003C */ lwc1 $f0, 0x3C($s0) /* 3BD16C E00C040C C6060034 */ lwc1 $f6, 0x34($s0) /* 3BD170 E00C0410 46004200 */ add.s $f8, $f8, $f0 /* 3BD174 E00C0414 C6000040 */ lwc1 $f0, 0x40($s0) /* 3BD178 E00C0418 C6020038 */ lwc1 $f2, 0x38($s0) /* 3BD17C E00C041C 46003180 */ add.s $f6, $f6, $f0 /* 3BD180 E00C0420 C6000044 */ lwc1 $f0, 0x44($s0) /* 3BD184 E00C0424 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 3BD188 E00C0428 44812000 */ mtc1 $at, $f4 /* 3BD18C E00C042C 46001080 */ add.s $f2, $f2, $f0 /* 3BD190 E00C0430 C6000040 */ lwc1 $f0, 0x40($s0) /* 3BD194 E00C0434 E6080030 */ swc1 $f8, 0x30($s0) /* 3BD198 E00C0438 46040000 */ add.s $f0, $f0, $f4 /* 3BD19C E00C043C E6060034 */ swc1 $f6, 0x34($s0) /* 3BD1A0 E00C0440 E6020038 */ swc1 $f2, 0x38($s0) /* 3BD1A4 E00C0444 08030174 */ j .LE00C05D0 /* 3BD1A8 E00C0448 E6000040 */ swc1 $f0, 0x40($s0) .LE00C044C: /* 3BD1AC E00C044C 3C02E00C */ lui $v0, (0xE00C0A21 >> 16) /* 3BD1B0 E00C0450 80420A21 */ lb $v0, (0xE00C0A21 & 0xFFFF)($v0) /* 3BD1B4 E00C0454 3C01E00C */ lui $at, (0xE00C0C18 >> 16) /* 3BD1B8 E00C0458 D4220C18 */ ldc1 $f2, (0xE00C0C18 & 0xFFFF)($at) /* 3BD1BC E00C045C 44820000 */ mtc1 $v0, $f0 /* 3BD1C0 E00C0460 00000000 */ nop /* 3BD1C4 E00C0464 46800020 */ cvt.s.w $f0, $f0 /* 3BD1C8 E00C0468 46000021 */ cvt.d.s $f0, $f0 /* 3BD1CC E00C046C 46220002 */ mul.d $f0, $f0, $f2 /* 3BD1D0 E00C0470 00000000 */ nop /* 3BD1D4 E00C0474 C6060030 */ lwc1 $f6, 0x30($s0) /* 3BD1D8 E00C0478 C602003C */ lwc1 $f2, 0x3C($s0) /* 3BD1DC E00C047C C6040034 */ lwc1 $f4, 0x34($s0) /* 3BD1E0 E00C0480 46023180 */ add.s $f6, $f6, $f2 /* 3BD1E4 E00C0484 C6020040 */ lwc1 $f2, 0x40($s0) /* 3BD1E8 E00C0488 C6080038 */ lwc1 $f8, 0x38($s0) /* 3BD1EC E00C048C 46022100 */ add.s $f4, $f4, $f2 /* 3BD1F0 E00C0490 C6020044 */ lwc1 $f2, 0x44($s0) /* 3BD1F4 E00C0494 44805000 */ mtc1 $zero, $f10 /* 3BD1F8 E00C0498 46024200 */ add.s $f8, $f8, $f2 /* 3BD1FC E00C049C C6020050 */ lwc1 $f2, 0x50($s0) /* 3BD200 E00C04A0 E6040034 */ swc1 $f4, 0x34($s0) /* 3BD204 E00C04A4 C6040040 */ lwc1 $f4, 0x40($s0) /* 3BD208 E00C04A8 E6060030 */ swc1 $f6, 0x30($s0) /* 3BD20C E00C04AC 46022100 */ add.s $f4, $f4, $f2 /* 3BD210 E00C04B0 C6060034 */ lwc1 $f6, 0x34($s0) /* 3BD214 E00C04B4 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BD218 E00C04B8 44811000 */ mtc1 $at, $f2 /* 3BD21C E00C04BC 460A303C */ c.lt.s $f6, $f10 /* 3BD220 E00C04C0 E6080038 */ swc1 $f8, 0x38($s0) /* 3BD224 E00C04C4 46200020 */ cvt.s.d $f0, $f0 /* 3BD228 E00C04C8 46001081 */ sub.s $f2, $f2, $f0 /* 3BD22C E00C04CC E6040040 */ swc1 $f4, 0x40($s0) /* 3BD230 E00C04D0 E600004C */ swc1 $f0, 0x4C($s0) /* 3BD234 E00C04D4 4500003D */ bc1f .LE00C05CC /* 3BD238 E00C04D8 E6020048 */ swc1 $f2, 0x48($s0) /* 3BD23C E00C04DC 8E03005C */ lw $v1, 0x5C($s0) /* 3BD240 E00C04E0 2C620005 */ sltiu $v0, $v1, 0x5 /* 3BD244 E00C04E4 1040002F */ beqz $v0, .LE00C05A4 /* 3BD248 E00C04E8 00031080 */ sll $v0, $v1, 2 /* 3BD24C E00C04EC 3C01E00C */ lui $at, (0xE00C0C20 >> 16) /* 3BD250 E00C04F0 00220821 */ addu $at, $at, $v0 /* 3BD254 E00C04F4 8C220C20 */ lw $v0, (0xE00C0C20 & 0xFFFF)($at) /* 3BD258 E00C04F8 00400008 */ jr $v0 /* 3BD25C E00C04FC 00000000 */ nop /* 3BD260 E00C0500 0803016E */ j .LE00C05B8 /* 3BD264 E00C0504 AE000058 */ sw $zero, 0x58($s0) /* 3BD268 E00C0508 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BD26C E00C050C 44810000 */ mtc1 $at, $f0 /* 3BD270 E00C0510 08030154 */ j .LE00C0550 /* 3BD274 E00C0514 00000000 */ nop /* 3BD278 E00C0518 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BD27C E00C051C 44810000 */ mtc1 $at, $f0 /* 3BD280 E00C0520 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 3BD284 E00C0524 44811000 */ mtc1 $at, $f2 /* 3BD288 E00C0528 3C014120 */ lui $at, (0x41200000 >> 16) /* 3BD28C E00C052C 44812000 */ mtc1 $at, $f4 /* 3BD290 E00C0530 24020001 */ addiu $v0, $zero, 0x1 /* 3BD294 E00C0534 AE020058 */ sw $v0, 0x58($s0) /* 3BD298 E00C0538 E600003C */ swc1 $f0, 0x3C($s0) /* 3BD29C E00C053C E6020044 */ swc1 $f2, 0x44($s0) /* 3BD2A0 E00C0540 0803016E */ j .LE00C05B8 /* 3BD2A4 E00C0544 E6040040 */ swc1 $f4, 0x40($s0) /* 3BD2A8 E00C0548 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 3BD2AC E00C054C 44810000 */ mtc1 $at, $f0 .LE00C0550: /* 3BD2B0 E00C0550 3C014120 */ lui $at, (0x41200000 >> 16) /* 3BD2B4 E00C0554 44811000 */ mtc1 $at, $f2 /* 3BD2B8 E00C0558 24020001 */ addiu $v0, $zero, 0x1 /* 3BD2BC E00C055C AE020058 */ sw $v0, 0x58($s0) /* 3BD2C0 E00C0560 E600003C */ swc1 $f0, 0x3C($s0) /* 3BD2C4 E00C0564 E6000044 */ swc1 $f0, 0x44($s0) /* 3BD2C8 E00C0568 0803016E */ j .LE00C05B8 /* 3BD2CC E00C056C E6020040 */ swc1 $f2, 0x40($s0) /* 3BD2D0 E00C0570 3C014120 */ lui $at, (0x41200000 >> 16) /* 3BD2D4 E00C0574 44810000 */ mtc1 $at, $f0 /* 3BD2D8 E00C0578 3C014160 */ lui $at, (0x41600000 >> 16) /* 3BD2DC E00C057C 44811000 */ mtc1 $at, $f2 /* 3BD2E0 E00C0580 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 3BD2E4 E00C0584 44812000 */ mtc1 $at, $f4 /* 3BD2E8 E00C0588 24020001 */ addiu $v0, $zero, 0x1 /* 3BD2EC E00C058C AE000044 */ sw $zero, 0x44($s0) /* 3BD2F0 E00C0590 AE020058 */ sw $v0, 0x58($s0) /* 3BD2F4 E00C0594 E600003C */ swc1 $f0, 0x3C($s0) /* 3BD2F8 E00C0598 E6020040 */ swc1 $f2, 0x40($s0) /* 3BD2FC E00C059C 0803016E */ j .LE00C05B8 /* 3BD300 E00C05A0 E6040050 */ swc1 $f4, 0x50($s0) .LE00C05A4: /* 3BD304 E00C05A4 E60A003C */ swc1 $f10, 0x3C($s0) /* 3BD308 E00C05A8 E60A0040 */ swc1 $f10, 0x40($s0) /* 3BD30C E00C05AC E60A0044 */ swc1 $f10, 0x44($s0) /* 3BD310 E00C05B0 E60A0034 */ swc1 $f10, 0x34($s0) /* 3BD314 E00C05B4 AE040058 */ sw $a0, 0x58($s0) .LE00C05B8: /* 3BD318 E00C05B8 8E02005C */ lw $v0, 0x5C($s0) /* 3BD31C E00C05BC AE000034 */ sw $zero, 0x34($s0) /* 3BD320 E00C05C0 AE000054 */ sw $zero, 0x54($s0) /* 3BD324 E00C05C4 24420001 */ addiu $v0, $v0, 0x1 /* 3BD328 E00C05C8 AE02005C */ sw $v0, 0x5C($s0) .LE00C05CC: /* 3BD32C E00C05CC 30C30007 */ andi $v1, $a2, 0x7 .LE00C05D0: /* 3BD330 E00C05D0 24020001 */ addiu $v0, $zero, 0x1 .LE00C05D4: /* 3BD334 E00C05D4 14620049 */ bne $v1, $v0, .LE00C06FC /* 3BD338 E00C05D8 00000000 */ nop /* 3BD33C E00C05DC 0C080150 */ jal shim_load_effect /* 3BD340 E00C05E0 2404006F */ addiu $a0, $zero, 0x6F /* 3BD344 E00C05E4 0C080138 */ jal shim_rand_int /* 3BD348 E00C05E8 2404003C */ addiu $a0, $zero, 0x3C /* 3BD34C E00C05EC C6140004 */ lwc1 $f20, 0x4($s0) /* 3BD350 E00C05F0 C6000030 */ lwc1 $f0, 0x30($s0) /* 3BD354 E00C05F4 4600A500 */ add.s $f20, $f20, $f0 /* 3BD358 E00C05F8 44820000 */ mtc1 $v0, $f0 /* 3BD35C E00C05FC 00000000 */ nop /* 3BD360 E00C0600 46800020 */ cvt.s.w $f0, $f0 /* 3BD364 E00C0604 4600A500 */ add.s $f20, $f20, $f0 /* 3BD368 E00C0608 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 3BD36C E00C060C 44810000 */ mtc1 $at, $f0 /* 3BD370 E00C0610 24040064 */ addiu $a0, $zero, 0x64 /* 3BD374 E00C0614 0C080138 */ jal shim_rand_int /* 3BD378 E00C0618 4600A501 */ sub.s $f20, $f20, $f0 /* 3BD37C E00C061C C602000C */ lwc1 $f2, 0xC($s0) /* 3BD380 E00C0620 C6000038 */ lwc1 $f0, 0x38($s0) /* 3BD384 E00C0624 46001080 */ add.s $f2, $f2, $f0 /* 3BD388 E00C0628 C6000034 */ lwc1 $f0, 0x34($s0) /* 3BD38C E00C062C 44071000 */ mfc1 $a3, $f2 /* 3BD390 E00C0630 C6020008 */ lwc1 $f2, 0x8($s0) /* 3BD394 E00C0634 46001080 */ add.s $f2, $f2, $f0 /* 3BD398 E00C0638 44820000 */ mtc1 $v0, $f0 /* 3BD39C E00C063C 00000000 */ nop /* 3BD3A0 E00C0640 46800020 */ cvt.s.w $f0, $f0 /* 3BD3A4 E00C0644 46001080 */ add.s $f2, $f2, $f0 /* 3BD3A8 E00C0648 3C014248 */ lui $at, (0x42480000 >> 16) /* 3BD3AC E00C064C 44810000 */ mtc1 $at, $f0 /* 3BD3B0 E00C0650 24040002 */ addiu $a0, $zero, 0x2 /* 3BD3B4 E00C0654 46001080 */ add.s $f2, $f2, $f0 /* 3BD3B8 E00C0658 4405A000 */ mfc1 $a1, $f20 /* 3BD3BC E00C065C 3C014080 */ lui $at, (0x40800000 >> 16) /* 3BD3C0 E00C0660 44810000 */ mtc1 $at, $f0 /* 3BD3C4 E00C0664 44061000 */ mfc1 $a2, $f2 /* 3BD3C8 E00C0668 24020028 */ addiu $v0, $zero, 0x28 /* 3BD3CC E00C066C AFA20014 */ sw $v0, 0x14($sp) /* 3BD3D0 E00C0670 0C037800 */ jal cold_breath_main /* 3BD3D4 E00C0674 E7A00010 */ swc1 $f0, 0x10($sp) /* 3BD3D8 E00C0678 0C080150 */ jal shim_load_effect /* 3BD3DC E00C067C 24040072 */ addiu $a0, $zero, 0x72 /* 3BD3E0 E00C0680 C6020004 */ lwc1 $f2, 0x4($s0) /* 3BD3E4 E00C0684 C6000030 */ lwc1 $f0, 0x30($s0) /* 3BD3E8 E00C0688 46001080 */ add.s $f2, $f2, $f0 /* 3BD3EC E00C068C 24040001 */ addiu $a0, $zero, 0x1 /* 3BD3F0 E00C0690 C6000034 */ lwc1 $f0, 0x34($s0) /* 3BD3F4 E00C0694 44051000 */ mfc1 $a1, $f2 /* 3BD3F8 E00C0698 C6020008 */ lwc1 $f2, 0x8($s0) /* 3BD3FC E00C069C C6080038 */ lwc1 $f8, 0x38($s0) /* 3BD400 E00C06A0 46001080 */ add.s $f2, $f2, $f0 /* 3BD404 E00C06A4 C600000C */ lwc1 $f0, 0xC($s0) /* 3BD408 E00C06A8 2402000A */ addiu $v0, $zero, 0xA /* 3BD40C E00C06AC 46080000 */ add.s $f0, $f0, $f8 /* 3BD410 E00C06B0 3C014120 */ lui $at, (0x41200000 >> 16) /* 3BD414 E00C06B4 44812000 */ mtc1 $at, $f4 /* 3BD418 E00C06B8 3C014270 */ lui $at, (0x42700000 >> 16) /* 3BD41C E00C06BC 44813000 */ mtc1 $at, $f6 /* 3BD420 E00C06C0 46041080 */ add.s $f2, $f2, $f4 /* 3BD424 E00C06C4 AFA2001C */ sw $v0, 0x1C($sp) /* 3BD428 E00C06C8 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BD42C E00C06CC 44812000 */ mtc1 $at, $f4 /* 3BD430 E00C06D0 46060000 */ add.s $f0, $f0, $f6 /* 3BD434 E00C06D4 44061000 */ mfc1 $a2, $f2 /* 3BD438 E00C06D8 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 3BD43C E00C06DC 44811000 */ mtc1 $at, $f2 /* 3BD440 E00C06E0 44070000 */ mfc1 $a3, $f0 /* 3BD444 E00C06E4 2402001E */ addiu $v0, $zero, 0x1E /* 3BD448 E00C06E8 AFA20020 */ sw $v0, 0x20($sp) /* 3BD44C E00C06EC E7A60010 */ swc1 $f6, 0x10($sp) /* 3BD450 E00C06F0 E7A40018 */ swc1 $f4, 0x18($sp) /* 3BD454 E00C06F4 0C039000 */ jal misc_particles_main /* 3BD458 E00C06F8 E7A20014 */ swc1 $f2, 0x14($sp) .LE00C06FC: /* 3BD45C E00C06FC 8FBF002C */ lw $ra, 0x2C($sp) /* 3BD460 E00C0700 8FB00028 */ lw $s0, 0x28($sp) /* 3BD464 E00C0704 D7B40030 */ ldc1 $f20, 0x30($sp) /* 3BD468 E00C0708 03E00008 */ jr $ra /* 3BD46C E00C070C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void snowman_doll_update(EffectInstance* effect) { SnowmanDollFXData* data = effect->data.snowmanDoll; s32 unk_14; s32 unk_58; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->unk_10 = 16; } if (data->unk_10 < 1000) { data->unk_10--; } data->unk_14++; if (data->unk_10 < 0) { shim_remove_effect(effect); return; } unk_14 = data->unk_14; if (data->unk_10 < 16) { data->unk_24 = data->unk_10 * 16; } if (unk_14 < 16) { data->unk_24 = unk_14 * 16 + 15; } if (data->unk_3C != 0.0f) { f32 unk_40 = data->unk_40; if (unk_40 < 0.0f) { unk_40 = -unk_40; } if (data->unk_3C < 0.0f) { data->unk_2C -= unk_40; } else { data->unk_2C += unk_40; } } unk_58 = data->unk_58; switch (unk_58) { case 0: data->unk_4C = (f32) D_E00C0A24[data->unk_54++] * 0.01; data->unk_48 = 2.0f - data->unk_4C; if (data->unk_54 >= ARRAY_COUNT(D_E00C0A24)) { data->unk_58 = 2; } break; case 1: data->unk_4C = (f32) D_E00C0A10[data->unk_54++] * 0.01; data->unk_48 = 2.0f - data->unk_4C; if (data->unk_54 >= ARRAY_COUNT(D_E00C0A10) + 1) { data->unk_58 = 2; } if (data->unk_54 >= 8) { data->unk_30 += data->unk_3C; data->unk_34 += data->unk_40; data->unk_38 += data->unk_44; data->unk_40 += -1.0f; } break; case 3: data->unk_4C = (f32) D_E00C0A40[data->unk_54++] * 0.01; data->unk_48 = 2.0f - data->unk_4C; data->unk_2C = D_E00C0A8C[data->unk_54++]; if (data->unk_54 >= ARRAY_COUNT(D_E00C0A40)) { data->unk_58 = 2; } if (data->unk_54 >= 64) { data->unk_30 += data->unk_3C; data->unk_34 += data->unk_40; data->unk_38 += data->unk_44; data->unk_40 += -1.0f; } break; case 2: data->unk_30 += data->unk_3C; data->unk_34 += data->unk_40; data->unk_38 += data->unk_44; data->unk_40 += data->unk_50; data->unk_4C = (f32) D_E00C0A21 * 0.01; data->unk_48 = 2.0f - data->unk_4C; if (data->unk_34 < 0.0f) { switch (data->unk_5C) { case 0: data->unk_58 = 0; break; case 1: data->unk_58 = 1; data->unk_3C = 2.0f; data->unk_44 = 2.0f; data->unk_40 = 10.0f; break; case 2: data->unk_58 = 1; data->unk_3C = 2.0f; data->unk_44 = -2.0f; data->unk_40 = 10.0f; break; case 3: data->unk_58 = 1; data->unk_3C = -2.0f; data->unk_44 = -2.0f; data->unk_40 = 10.0f; break; case 4: data->unk_44 = 0.0f; data->unk_58 = 1; data->unk_3C = 10.0f; data->unk_40 = 14.0f; data->unk_50 = -1.0f; break; default: data->unk_3C = 0.0f; data->unk_40 = 0.0f; data->unk_44 = 0.0f; data->unk_34 = 0.0f; data->unk_58 = unk_58; break; } data->unk_34 = 0.0f; data->unk_54 = 0; data->unk_5C++; } break; } if ((unk_14 & 7) == 1) { shim_load_effect(EFFECT_COLD_BREATH); cold_breath_main(2, data->unk_04 + data->unk_30 + shim_rand_int(60) - 30.0f, data->unk_08 + data->unk_34 + shim_rand_int(100) + 50.0f, data->unk_0C + data->unk_38, 4.0f, 40); shim_load_effect(EFFECT_MISC_PARTICLES); misc_particles_main(1, data->unk_04 + data->unk_30, data->unk_08 + data->unk_34 + 10.0f, data->unk_0C + data->unk_38 + 60.0f, 60.0f, 100.0f, 2.0f, 10, 30); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel test_ray_triangle_general /* 37284 8005BE84 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 37288 8005BE88 F7BE0038 */ sdc1 $f30, 0x38($sp) /* 3728C 8005BE8C F7BC0030 */ sdc1 $f28, 0x30($sp) /* 37290 8005BE90 F7BA0028 */ sdc1 $f26, 0x28($sp) /* 37294 8005BE94 F7B80020 */ sdc1 $f24, 0x20($sp) /* 37298 8005BE98 F7B60018 */ sdc1 $f22, 0x18($sp) /* 3729C 8005BE9C F7B40010 */ sdc1 $f20, 0x10($sp) /* 372A0 8005BEA0 C4800030 */ lwc1 $f0, 0x30($a0) /* 372A4 8005BEA4 44801000 */ mtc1 $zero, $f2 /* 372A8 8005BEA8 00000000 */ nop /* 372AC 8005BEAC 46020032 */ c.eq.s $f0, $f2 /* 372B0 8005BEB0 00000000 */ nop /* 372B4 8005BEB4 4500000B */ bc1f .L8005BEE4 /* 372B8 8005BEB8 00000000 */ nop /* 372BC 8005BEBC C4800034 */ lwc1 $f0, 0x34($a0) /* 372C0 8005BEC0 46020032 */ c.eq.s $f0, $f2 /* 372C4 8005BEC4 00000000 */ nop /* 372C8 8005BEC8 45000006 */ bc1f .L8005BEE4 /* 372CC 8005BECC 00000000 */ nop /* 372D0 8005BED0 C4800038 */ lwc1 $f0, 0x38($a0) /* 372D4 8005BED4 46020032 */ c.eq.s $f0, $f2 /* 372D8 8005BED8 00000000 */ nop /* 372DC 8005BEDC 45010167 */ bc1t .L8005C47C /* 372E0 8005BEE0 0000102D */ daddu $v0, $zero, $zero .L8005BEE4: /* 372E4 8005BEE4 8C820000 */ lw $v0, 0x0($a0) /* 372E8 8005BEE8 3C01800A */ lui $at, %hi(gCollisionRayStartX) /* 372EC 8005BEEC C43A4230 */ lwc1 $f26, %lo(gCollisionRayStartX)($at) /* 372F0 8005BEF0 C4400000 */ lwc1 $f0, 0x0($v0) /* 372F4 8005BEF4 4600D001 */ sub.s $f0, $f26, $f0 /* 372F8 8005BEF8 E7A00008 */ swc1 $f0, 0x8($sp) /* 372FC 8005BEFC C48A0030 */ lwc1 $f10, 0x30($a0) /* 37300 8005BF00 46005082 */ mul.s $f2, $f10, $f0 /* 37304 8005BF04 00000000 */ nop /* 37308 8005BF08 3C01800A */ lui $at, %hi(gCollisionRayStartY) /* 3730C 8005BF0C C43C4234 */ lwc1 $f28, %lo(gCollisionRayStartY)($at) /* 37310 8005BF10 C4400004 */ lwc1 $f0, 0x4($v0) /* 37314 8005BF14 4600E601 */ sub.s $f24, $f28, $f0 /* 37318 8005BF18 C4880034 */ lwc1 $f8, 0x34($a0) /* 3731C 8005BF1C 3C01800A */ lui $at, %hi(gCollisionRayStartZ) /* 37320 8005BF20 C4324238 */ lwc1 $f18, %lo(gCollisionRayStartZ)($at) /* 37324 8005BF24 46184102 */ mul.s $f4, $f8, $f24 /* 37328 8005BF28 00000000 */ nop /* 3732C 8005BF2C E7B20000 */ swc1 $f18, 0x0($sp) /* 37330 8005BF30 C4400008 */ lwc1 $f0, 0x8($v0) /* 37334 8005BF34 46009581 */ sub.s $f22, $f18, $f0 /* 37338 8005BF38 C4860038 */ lwc1 $f6, 0x38($a0) /* 3733C 8005BF3C 46163002 */ mul.s $f0, $f6, $f22 /* 37340 8005BF40 00000000 */ nop /* 37344 8005BF44 8C830004 */ lw $v1, 0x4($a0) /* 37348 8005BF48 46041080 */ add.s $f2, $f2, $f4 /* 3734C 8005BF4C 8C850008 */ lw $a1, 0x8($a0) /* 37350 8005BF50 8482003C */ lh $v0, 0x3C($a0) /* 37354 8005BF54 1040007E */ beqz $v0, .L8005C150 /* 37358 8005BF58 46001500 */ add.s $f20, $f2, $f0 /* 3735C 8005BF5C 4480F000 */ mtc1 $zero, $f30 /* 37360 8005BF60 00000000 */ nop /* 37364 8005BF64 461EA03C */ c.lt.s $f20, $f30 /* 37368 8005BF68 00000000 */ nop /* 3736C 8005BF6C 45030143 */ bc1tl .L8005C47C /* 37370 8005BF70 0000102D */ daddu $v0, $zero, $zero /* 37374 8005BF74 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 37378 8005BF78 C430423C */ lwc1 $f16, %lo(gCollisionRayDirX)($at) /* 3737C 8005BF7C 46105002 */ mul.s $f0, $f10, $f16 /* 37380 8005BF80 00000000 */ nop /* 37384 8005BF84 3C01800A */ lui $at, %hi(gCollisionRayDirY) /* 37388 8005BF88 C42E4240 */ lwc1 $f14, %lo(gCollisionRayDirY)($at) /* 3738C 8005BF8C 460E4102 */ mul.s $f4, $f8, $f14 /* 37390 8005BF90 00000000 */ nop /* 37394 8005BF94 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 37398 8005BF98 C42C4244 */ lwc1 $f12, %lo(gCollisionRayDirZ)($at) /* 3739C 8005BF9C 460C3082 */ mul.s $f2, $f6, $f12 /* 373A0 8005BFA0 00000000 */ nop /* 373A4 8005BFA4 46040000 */ add.s $f0, $f0, $f4 /* 373A8 8005BFA8 46020000 */ add.s $f0, $f0, $f2 /* 373AC 8005BFAC 4600F03E */ c.le.s $f30, $f0 /* 373B0 8005BFB0 00000000 */ nop /* 373B4 8005BFB4 45010131 */ bc1t .L8005C47C /* 373B8 8005BFB8 0000102D */ daddu $v0, $zero, $zero /* 373BC 8005BFBC C4880014 */ lwc1 $f8, 0x14($a0) /* 373C0 8005BFC0 460E4102 */ mul.s $f4, $f8, $f14 /* 373C4 8005BFC4 00000000 */ nop /* 373C8 8005BFC8 C4820010 */ lwc1 $f2, 0x10($a0) /* 373CC 8005BFCC 460C1002 */ mul.s $f0, $f2, $f12 /* 373D0 8005BFD0 00000000 */ nop /* 373D4 8005BFD4 46104202 */ mul.s $f8, $f8, $f16 /* 373D8 8005BFD8 00000000 */ nop /* 373DC 8005BFDC 46101082 */ mul.s $f2, $f2, $f16 /* 373E0 8005BFE0 00000000 */ nop /* 373E4 8005BFE4 46002101 */ sub.s $f4, $f4, $f0 /* 373E8 8005BFE8 C486000C */ lwc1 $f6, 0xC($a0) /* 373EC 8005BFEC 460C3002 */ mul.s $f0, $f6, $f12 /* 373F0 8005BFF0 00000000 */ nop /* 373F4 8005BFF4 460E3182 */ mul.s $f6, $f6, $f14 /* 373F8 8005BFF8 00000000 */ nop /* 373FC 8005BFFC C7B20008 */ lwc1 $f18, 0x8($sp) /* 37400 8005C000 46049102 */ mul.s $f4, $f18, $f4 /* 37404 8005C004 00000000 */ nop /* 37408 8005C008 46080001 */ sub.s $f0, $f0, $f8 /* 3740C 8005C00C 4600C002 */ mul.s $f0, $f24, $f0 /* 37410 8005C010 00000000 */ nop /* 37414 8005C014 46061081 */ sub.s $f2, $f2, $f6 /* 37418 8005C018 4602B082 */ mul.s $f2, $f22, $f2 /* 3741C 8005C01C 00000000 */ nop /* 37420 8005C020 46002100 */ add.s $f4, $f4, $f0 /* 37424 8005C024 46022100 */ add.s $f4, $f4, $f2 /* 37428 8005C028 461E203C */ c.lt.s $f4, $f30 /* 3742C 8005C02C 00000000 */ nop /* 37430 8005C030 45010112 */ bc1t .L8005C47C /* 37434 8005C034 00000000 */ nop /* 37438 8005C038 C48A0020 */ lwc1 $f10, 0x20($a0) /* 3743C 8005C03C 460E5002 */ mul.s $f0, $f10, $f14 /* 37440 8005C040 00000000 */ nop /* 37444 8005C044 C488001C */ lwc1 $f8, 0x1C($a0) /* 37448 8005C048 460C4102 */ mul.s $f4, $f8, $f12 /* 3744C 8005C04C 00000000 */ nop /* 37450 8005C050 46105282 */ mul.s $f10, $f10, $f16 /* 37454 8005C054 00000000 */ nop /* 37458 8005C058 46104202 */ mul.s $f8, $f8, $f16 /* 3745C 8005C05C 00000000 */ nop /* 37460 8005C060 C4620000 */ lwc1 $f2, 0x0($v1) /* 37464 8005C064 4602D081 */ sub.s $f2, $f26, $f2 /* 37468 8005C068 46040001 */ sub.s $f0, $f0, $f4 /* 3746C 8005C06C 46001082 */ mul.s $f2, $f2, $f0 /* 37470 8005C070 00000000 */ nop /* 37474 8005C074 C4860018 */ lwc1 $f6, 0x18($a0) /* 37478 8005C078 460C3002 */ mul.s $f0, $f6, $f12 /* 3747C 8005C07C 00000000 */ nop /* 37480 8005C080 460E3182 */ mul.s $f6, $f6, $f14 /* 37484 8005C084 00000000 */ nop /* 37488 8005C088 C4640004 */ lwc1 $f4, 0x4($v1) /* 3748C 8005C08C 4604E101 */ sub.s $f4, $f28, $f4 /* 37490 8005C090 460A0001 */ sub.s $f0, $f0, $f10 /* 37494 8005C094 46002102 */ mul.s $f4, $f4, $f0 /* 37498 8005C098 00000000 */ nop /* 3749C 8005C09C C7B20000 */ lwc1 $f18, 0x0($sp) /* 374A0 8005C0A0 46064201 */ sub.s $f8, $f8, $f6 /* 374A4 8005C0A4 C4600008 */ lwc1 $f0, 0x8($v1) /* 374A8 8005C0A8 46009001 */ sub.s $f0, $f18, $f0 /* 374AC 8005C0AC 46080002 */ mul.s $f0, $f0, $f8 /* 374B0 8005C0B0 00000000 */ nop /* 374B4 8005C0B4 46041080 */ add.s $f2, $f2, $f4 /* 374B8 8005C0B8 46001080 */ add.s $f2, $f2, $f0 /* 374BC 8005C0BC 461E103C */ c.lt.s $f2, $f30 /* 374C0 8005C0C0 00000000 */ nop /* 374C4 8005C0C4 450100ED */ bc1t .L8005C47C /* 374C8 8005C0C8 00000000 */ nop /* 374CC 8005C0CC C48A002C */ lwc1 $f10, 0x2C($a0) /* 374D0 8005C0D0 460E5002 */ mul.s $f0, $f10, $f14 /* 374D4 8005C0D4 00000000 */ nop /* 374D8 8005C0D8 C4880028 */ lwc1 $f8, 0x28($a0) /* 374DC 8005C0DC 460C4102 */ mul.s $f4, $f8, $f12 /* 374E0 8005C0E0 00000000 */ nop /* 374E4 8005C0E4 46105282 */ mul.s $f10, $f10, $f16 /* 374E8 8005C0E8 00000000 */ nop /* 374EC 8005C0EC 46104202 */ mul.s $f8, $f8, $f16 /* 374F0 8005C0F0 00000000 */ nop /* 374F4 8005C0F4 C4A20000 */ lwc1 $f2, 0x0($a1) /* 374F8 8005C0F8 4602D081 */ sub.s $f2, $f26, $f2 /* 374FC 8005C0FC 46040001 */ sub.s $f0, $f0, $f4 /* 37500 8005C100 46001082 */ mul.s $f2, $f2, $f0 /* 37504 8005C104 00000000 */ nop /* 37508 8005C108 C4860024 */ lwc1 $f6, 0x24($a0) /* 3750C 8005C10C 460C3002 */ mul.s $f0, $f6, $f12 /* 37510 8005C110 00000000 */ nop /* 37514 8005C114 460E3182 */ mul.s $f6, $f6, $f14 /* 37518 8005C118 00000000 */ nop /* 3751C 8005C11C C4A40004 */ lwc1 $f4, 0x4($a1) /* 37520 8005C120 4604E101 */ sub.s $f4, $f28, $f4 /* 37524 8005C124 460A0001 */ sub.s $f0, $f0, $f10 /* 37528 8005C128 46002102 */ mul.s $f4, $f4, $f0 /* 3752C 8005C12C 00000000 */ nop /* 37530 8005C130 46064201 */ sub.s $f8, $f8, $f6 /* 37534 8005C134 C4A00008 */ lwc1 $f0, 0x8($a1) /* 37538 8005C138 46009001 */ sub.s $f0, $f18, $f0 /* 3753C 8005C13C 46080002 */ mul.s $f0, $f0, $f8 /* 37540 8005C140 00000000 */ nop /* 37544 8005C144 46041080 */ add.s $f2, $f2, $f4 /* 37548 8005C148 080170D4 */ j .L8005C350 /* 3754C 8005C14C 46001080 */ add.s $f2, $f2, $f0 .L8005C150: /* 37550 8005C150 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 37554 8005C154 C430423C */ lwc1 $f16, %lo(gCollisionRayDirX)($at) /* 37558 8005C158 46105002 */ mul.s $f0, $f10, $f16 /* 3755C 8005C15C 00000000 */ nop /* 37560 8005C160 3C01800A */ lui $at, %hi(gCollisionRayDirY) /* 37564 8005C164 C42E4240 */ lwc1 $f14, %lo(gCollisionRayDirY)($at) /* 37568 8005C168 460E4102 */ mul.s $f4, $f8, $f14 /* 3756C 8005C16C 00000000 */ nop /* 37570 8005C170 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 37574 8005C174 C42C4244 */ lwc1 $f12, %lo(gCollisionRayDirZ)($at) /* 37578 8005C178 460C3082 */ mul.s $f2, $f6, $f12 /* 3757C 8005C17C 00000000 */ nop /* 37580 8005C180 46040000 */ add.s $f0, $f0, $f4 /* 37584 8005C184 46020000 */ add.s $f0, $f0, $f2 /* 37588 8005C188 46140002 */ mul.s $f0, $f0, $f20 /* 3758C 8005C18C 00000000 */ nop /* 37590 8005C190 4480F000 */ mtc1 $zero, $f30 /* 37594 8005C194 00000000 */ nop /* 37598 8005C198 4600F03E */ c.le.s $f30, $f0 /* 3759C 8005C19C 00000000 */ nop /* 375A0 8005C1A0 450100B6 */ bc1t .L8005C47C /* 375A4 8005C1A4 0000102D */ daddu $v0, $zero, $zero /* 375A8 8005C1A8 C4880014 */ lwc1 $f8, 0x14($a0) /* 375AC 8005C1AC 460E4002 */ mul.s $f0, $f8, $f14 /* 375B0 8005C1B0 00000000 */ nop /* 375B4 8005C1B4 C4840010 */ lwc1 $f4, 0x10($a0) /* 375B8 8005C1B8 460C2082 */ mul.s $f2, $f4, $f12 /* 375BC 8005C1BC 00000000 */ nop /* 375C0 8005C1C0 46104202 */ mul.s $f8, $f8, $f16 /* 375C4 8005C1C4 00000000 */ nop /* 375C8 8005C1C8 46102102 */ mul.s $f4, $f4, $f16 /* 375CC 8005C1CC 00000000 */ nop /* 375D0 8005C1D0 46020001 */ sub.s $f0, $f0, $f2 /* 375D4 8005C1D4 C486000C */ lwc1 $f6, 0xC($a0) /* 375D8 8005C1D8 460C3082 */ mul.s $f2, $f6, $f12 /* 375DC 8005C1DC 00000000 */ nop /* 375E0 8005C1E0 460E3182 */ mul.s $f6, $f6, $f14 /* 375E4 8005C1E4 00000000 */ nop /* 375E8 8005C1E8 C7B20008 */ lwc1 $f18, 0x8($sp) /* 375EC 8005C1EC 46009002 */ mul.s $f0, $f18, $f0 /* 375F0 8005C1F0 00000000 */ nop /* 375F4 8005C1F4 46081081 */ sub.s $f2, $f2, $f8 /* 375F8 8005C1F8 4602C082 */ mul.s $f2, $f24, $f2 /* 375FC 8005C1FC 00000000 */ nop /* 37600 8005C200 46062101 */ sub.s $f4, $f4, $f6 /* 37604 8005C204 4604B102 */ mul.s $f4, $f22, $f4 /* 37608 8005C208 00000000 */ nop /* 3760C 8005C20C 46020000 */ add.s $f0, $f0, $f2 /* 37610 8005C210 46040000 */ add.s $f0, $f0, $f4 /* 37614 8005C214 46140002 */ mul.s $f0, $f0, $f20 /* 37618 8005C218 00000000 */ nop /* 3761C 8005C21C 461E003C */ c.lt.s $f0, $f30 /* 37620 8005C220 00000000 */ nop /* 37624 8005C224 45010095 */ bc1t .L8005C47C /* 37628 8005C228 00000000 */ nop /* 3762C 8005C22C C48A0020 */ lwc1 $f10, 0x20($a0) /* 37630 8005C230 460E5002 */ mul.s $f0, $f10, $f14 /* 37634 8005C234 00000000 */ nop /* 37638 8005C238 C488001C */ lwc1 $f8, 0x1C($a0) /* 3763C 8005C23C 460C4102 */ mul.s $f4, $f8, $f12 /* 37640 8005C240 00000000 */ nop /* 37644 8005C244 46105282 */ mul.s $f10, $f10, $f16 /* 37648 8005C248 00000000 */ nop /* 3764C 8005C24C 46104202 */ mul.s $f8, $f8, $f16 /* 37650 8005C250 00000000 */ nop /* 37654 8005C254 C4620000 */ lwc1 $f2, 0x0($v1) /* 37658 8005C258 4602D081 */ sub.s $f2, $f26, $f2 /* 3765C 8005C25C 46040001 */ sub.s $f0, $f0, $f4 /* 37660 8005C260 46001082 */ mul.s $f2, $f2, $f0 /* 37664 8005C264 00000000 */ nop /* 37668 8005C268 C4860018 */ lwc1 $f6, 0x18($a0) /* 3766C 8005C26C 460C3002 */ mul.s $f0, $f6, $f12 /* 37670 8005C270 00000000 */ nop /* 37674 8005C274 460E3182 */ mul.s $f6, $f6, $f14 /* 37678 8005C278 00000000 */ nop /* 3767C 8005C27C C4640004 */ lwc1 $f4, 0x4($v1) /* 37680 8005C280 4604E101 */ sub.s $f4, $f28, $f4 /* 37684 8005C284 460A0001 */ sub.s $f0, $f0, $f10 /* 37688 8005C288 46002102 */ mul.s $f4, $f4, $f0 /* 3768C 8005C28C 00000000 */ nop /* 37690 8005C290 C7B20000 */ lwc1 $f18, 0x0($sp) /* 37694 8005C294 46064201 */ sub.s $f8, $f8, $f6 /* 37698 8005C298 C4600008 */ lwc1 $f0, 0x8($v1) /* 3769C 8005C29C 46009001 */ sub.s $f0, $f18, $f0 /* 376A0 8005C2A0 46080002 */ mul.s $f0, $f0, $f8 /* 376A4 8005C2A4 00000000 */ nop /* 376A8 8005C2A8 46041080 */ add.s $f2, $f2, $f4 /* 376AC 8005C2AC 46001080 */ add.s $f2, $f2, $f0 /* 376B0 8005C2B0 46141082 */ mul.s $f2, $f2, $f20 /* 376B4 8005C2B4 00000000 */ nop /* 376B8 8005C2B8 461E103C */ c.lt.s $f2, $f30 /* 376BC 8005C2BC 00000000 */ nop /* 376C0 8005C2C0 4501006E */ bc1t .L8005C47C /* 376C4 8005C2C4 00000000 */ nop /* 376C8 8005C2C8 C48A002C */ lwc1 $f10, 0x2C($a0) /* 376CC 8005C2CC 460E5002 */ mul.s $f0, $f10, $f14 /* 376D0 8005C2D0 00000000 */ nop /* 376D4 8005C2D4 C4880028 */ lwc1 $f8, 0x28($a0) /* 376D8 8005C2D8 460C4102 */ mul.s $f4, $f8, $f12 /* 376DC 8005C2DC 00000000 */ nop /* 376E0 8005C2E0 46105282 */ mul.s $f10, $f10, $f16 /* 376E4 8005C2E4 00000000 */ nop /* 376E8 8005C2E8 46104202 */ mul.s $f8, $f8, $f16 /* 376EC 8005C2EC 00000000 */ nop /* 376F0 8005C2F0 C4A20000 */ lwc1 $f2, 0x0($a1) /* 376F4 8005C2F4 4602D081 */ sub.s $f2, $f26, $f2 /* 376F8 8005C2F8 46040001 */ sub.s $f0, $f0, $f4 /* 376FC 8005C2FC 46001082 */ mul.s $f2, $f2, $f0 /* 37700 8005C300 00000000 */ nop /* 37704 8005C304 C4860024 */ lwc1 $f6, 0x24($a0) /* 37708 8005C308 460C3002 */ mul.s $f0, $f6, $f12 /* 3770C 8005C30C 00000000 */ nop /* 37710 8005C310 460E3182 */ mul.s $f6, $f6, $f14 /* 37714 8005C314 00000000 */ nop /* 37718 8005C318 C4A40004 */ lwc1 $f4, 0x4($a1) /* 3771C 8005C31C 4604E101 */ sub.s $f4, $f28, $f4 /* 37720 8005C320 460A0001 */ sub.s $f0, $f0, $f10 /* 37724 8005C324 46002102 */ mul.s $f4, $f4, $f0 /* 37728 8005C328 00000000 */ nop /* 3772C 8005C32C 46064201 */ sub.s $f8, $f8, $f6 /* 37730 8005C330 C4A00008 */ lwc1 $f0, 0x8($a1) /* 37734 8005C334 46009001 */ sub.s $f0, $f18, $f0 /* 37738 8005C338 46080002 */ mul.s $f0, $f0, $f8 /* 3773C 8005C33C 00000000 */ nop /* 37740 8005C340 46041080 */ add.s $f2, $f2, $f4 /* 37744 8005C344 46001080 */ add.s $f2, $f2, $f0 /* 37748 8005C348 46141082 */ mul.s $f2, $f2, $f20 /* 3774C 8005C34C 00000000 */ nop .L8005C350: /* 37750 8005C350 461E103C */ c.lt.s $f2, $f30 /* 37754 8005C354 00000000 */ nop /* 37758 8005C358 45030048 */ bc1tl .L8005C47C /* 3775C 8005C35C 0000102D */ daddu $v0, $zero, $zero /* 37760 8005C360 C4860030 */ lwc1 $f6, 0x30($a0) /* 37764 8005C364 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 37768 8005C368 C420423C */ lwc1 $f0, %lo(gCollisionRayDirX)($at) /* 3776C 8005C36C 46003182 */ mul.s $f6, $f6, $f0 /* 37770 8005C370 00000000 */ nop /* 37774 8005C374 C4820034 */ lwc1 $f2, 0x34($a0) /* 37778 8005C378 3C01800A */ lui $at, %hi(gCollisionRayDirY) /* 3777C 8005C37C C4204240 */ lwc1 $f0, %lo(gCollisionRayDirY)($at) /* 37780 8005C380 46001082 */ mul.s $f2, $f2, $f0 /* 37784 8005C384 00000000 */ nop /* 37788 8005C388 C4840038 */ lwc1 $f4, 0x38($a0) /* 3778C 8005C38C 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 37790 8005C390 C4204244 */ lwc1 $f0, %lo(gCollisionRayDirZ)($at) /* 37794 8005C394 46002102 */ mul.s $f4, $f4, $f0 /* 37798 8005C398 00000000 */ nop /* 3779C 8005C39C 3C01800A */ lui $at, %hi(gCollisionRayLength) /* 377A0 8005C3A0 C4284254 */ lwc1 $f8, %lo(gCollisionRayLength)($at) /* 377A4 8005C3A4 46023180 */ add.s $f6, $f6, $f2 /* 377A8 8005C3A8 44800000 */ mtc1 $zero, $f0 /* 377AC 8005C3AC 00000000 */ nop /* 377B0 8005C3B0 4608003E */ c.le.s $f0, $f8 /* 377B4 8005C3B4 00000000 */ nop /* 377B8 8005C3B8 45000007 */ bc1f .L8005C3D8 /* 377BC 8005C3BC 46043180 */ add.s $f6, $f6, $f4 /* 377C0 8005C3C0 4600A007 */ neg.s $f0, $f20 /* 377C4 8005C3C4 46060003 */ div.s $f0, $f0, $f6 /* 377C8 8005C3C8 4600403E */ c.le.s $f8, $f0 /* 377CC 8005C3CC 00000000 */ nop /* 377D0 8005C3D0 4501002A */ bc1t .L8005C47C /* 377D4 8005C3D4 0000102D */ daddu $v0, $zero, $zero .L8005C3D8: /* 377D8 8005C3D8 4600A007 */ neg.s $f0, $f20 /* 377DC 8005C3DC 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 377E0 8005C3E0 C422423C */ lwc1 $f2, %lo(gCollisionRayDirX)($at) /* 377E4 8005C3E4 46060003 */ div.s $f0, $f0, $f6 /* 377E8 8005C3E8 46001082 */ mul.s $f2, $f2, $f0 /* 377EC 8005C3EC 00000000 */ nop /* 377F0 8005C3F0 3C01800A */ lui $at, %hi(gCollisionRayDirY) /* 377F4 8005C3F4 C42A4240 */ lwc1 $f10, %lo(gCollisionRayDirY)($at) /* 377F8 8005C3F8 46005282 */ mul.s $f10, $f10, $f0 /* 377FC 8005C3FC 00000000 */ nop /* 37800 8005C400 3C01800A */ lui $at, %hi(gCollisionRayStartX) /* 37804 8005C404 C42C4230 */ lwc1 $f12, %lo(gCollisionRayStartX)($at) /* 37808 8005C408 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 3780C 8005C40C C4284244 */ lwc1 $f8, %lo(gCollisionRayDirZ)($at) /* 37810 8005C410 C4840030 */ lwc1 $f4, 0x30($a0) /* 37814 8005C414 C4860038 */ lwc1 $f6, 0x38($a0) /* 37818 8005C418 46004202 */ mul.s $f8, $f8, $f0 /* 3781C 8005C41C 00000000 */ nop /* 37820 8005C420 3C01800A */ lui $at, %hi(gCollisionRayLength) /* 37824 8005C424 E4204254 */ swc1 $f0, %lo(gCollisionRayLength)($at) /* 37828 8005C428 3C01800A */ lui $at, %hi(gCollisionRayStartY) /* 3782C 8005C42C C4204234 */ lwc1 $f0, %lo(gCollisionRayStartY)($at) /* 37830 8005C430 24020001 */ addiu $v0, $zero, 0x1 /* 37834 8005C434 3C01800A */ lui $at, %hi(gCollisionNormalX) /* 37838 8005C438 E4244258 */ swc1 $f4, %lo(gCollisionNormalX)($at) /* 3783C 8005C43C 46026300 */ add.s $f12, $f12, $f2 /* 37840 8005C440 C4840034 */ lwc1 $f4, 0x34($a0) /* 37844 8005C444 3C01800A */ lui $at, %hi(gCollisionRayStartZ) /* 37848 8005C448 C4224238 */ lwc1 $f2, %lo(gCollisionRayStartZ)($at) /* 3784C 8005C44C 460A0000 */ add.s $f0, $f0, $f10 /* 37850 8005C450 3C01800A */ lui $at, %hi(gCollisionNormalZ) /* 37854 8005C454 E4264260 */ swc1 $f6, %lo(gCollisionNormalZ)($at) /* 37858 8005C458 3C01800A */ lui $at, %hi(gCollisionNormalY) /* 3785C 8005C45C E424425C */ swc1 $f4, %lo(gCollisionNormalY)($at) /* 37860 8005C460 46081080 */ add.s $f2, $f2, $f8 /* 37864 8005C464 3C01800A */ lui $at, %hi(gCollisionPointX) /* 37868 8005C468 E42C4248 */ swc1 $f12, %lo(gCollisionPointX)($at) /* 3786C 8005C46C 3C01800A */ lui $at, %hi(gCollisionPointY) /* 37870 8005C470 E420424C */ swc1 $f0, %lo(gCollisionPointY)($at) /* 37874 8005C474 3C01800A */ lui $at, %hi(gCollisionPointZ) /* 37878 8005C478 E4224250 */ swc1 $f2, %lo(gCollisionPointZ)($at) .L8005C47C: /* 3787C 8005C47C D7BE0038 */ ldc1 $f30, 0x38($sp) /* 37880 8005C480 D7BC0030 */ ldc1 $f28, 0x30($sp) /* 37884 8005C484 D7BA0028 */ ldc1 $f26, 0x28($sp) /* 37888 8005C488 D7B80020 */ ldc1 $f24, 0x20($sp) /* 3788C 8005C48C D7B60018 */ ldc1 $f22, 0x18($sp) /* 37890 8005C490 D7B40010 */ ldc1 $f20, 0x10($sp) /* 37894 8005C494 03E00008 */ jr $ra /* 37898 8005C498 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: s32 test_ray_triangle_general(ColliderTriangle* triangle, Vec3f* vertices) { f32 distToTrianglePlane; f32 cosAngle; Vec3f* v1; Vec3f* v2; Vec3f* v3; if (triangle->normal.x == 0 && triangle->normal.y == 0 && triangle->normal.z == 0) return FALSE; v1 = triangle->v1; v2 = triangle->v2; v3 = triangle->v3; distToTrianglePlane = triangle->normal.x * (gCollisionRayStartX - v1->x) + triangle->normal.y * (gCollisionRayStartY - v1->y) + triangle->normal.z * (gCollisionRayStartZ - v1->z); if (triangle->oneSided) { if (distToTrianglePlane < 0) { return FALSE; } if (triangle->normal.x * gCollisionRayDirX + triangle->normal.y * gCollisionRayDirY + triangle->normal.z * gCollisionRayDirZ >= 0) { return FALSE; } if ((gCollisionRayStartX - v1->x) * (triangle->e13.z * gCollisionRayDirY - triangle->e13.y * gCollisionRayDirZ) + (gCollisionRayStartY - v1->y) * (triangle->e13.x * gCollisionRayDirZ - triangle->e13.z * gCollisionRayDirX) + (gCollisionRayStartZ - v1->z) * (triangle->e13.y * gCollisionRayDirX - triangle->e13.x * gCollisionRayDirY) < 0) { return FALSE; } if ((gCollisionRayStartX - v2->x) * (triangle->e21.z * gCollisionRayDirY - triangle->e21.y * gCollisionRayDirZ) + (gCollisionRayStartY - v2->y) * (triangle->e21.x * gCollisionRayDirZ - triangle->e21.z * gCollisionRayDirX) + (gCollisionRayStartZ - v2->z) * (triangle->e21.y * gCollisionRayDirX - triangle->e21.x * gCollisionRayDirY) < 0) { return FALSE; } if ((gCollisionRayStartX - v3->x) * (triangle->e32.z * gCollisionRayDirY - triangle->e32.y * gCollisionRayDirZ) + (gCollisionRayStartY - v3->y) * (triangle->e32.x * gCollisionRayDirZ - triangle->e32.z * gCollisionRayDirX) + (gCollisionRayStartZ - v3->z) * (triangle->e32.y * gCollisionRayDirX - triangle->e32.x * gCollisionRayDirY) < 0) { return FALSE; } } else { if ((triangle->normal.x * gCollisionRayDirX + triangle->normal.y * gCollisionRayDirY + triangle->normal.z * gCollisionRayDirZ) * distToTrianglePlane >= 0) { return FALSE; } if (((gCollisionRayStartX - v1->x) * (triangle->e13.z * gCollisionRayDirY - triangle->e13.y * gCollisionRayDirZ) + (gCollisionRayStartY - v1->y) * (triangle->e13.x * gCollisionRayDirZ - triangle->e13.z * gCollisionRayDirX) + (gCollisionRayStartZ - v1->z) * (triangle->e13.y * gCollisionRayDirX - triangle->e13.x * gCollisionRayDirY) ) * distToTrianglePlane < 0) { return FALSE; } if (((gCollisionRayStartX - v2->x) * (triangle->e21.z * gCollisionRayDirY - triangle->e21.y * gCollisionRayDirZ) + (gCollisionRayStartY - v2->y) * (triangle->e21.x * gCollisionRayDirZ - triangle->e21.z * gCollisionRayDirX) + (gCollisionRayStartZ - v2->z) * (triangle->e21.y * gCollisionRayDirX - triangle->e21.x * gCollisionRayDirY) ) * distToTrianglePlane < 0) { return FALSE; } if (((gCollisionRayStartX - v3->x) * (triangle->e32.z * gCollisionRayDirY - triangle->e32.y * gCollisionRayDirZ) + (gCollisionRayStartY - v3->y) * (triangle->e32.x * gCollisionRayDirZ - triangle->e32.z * gCollisionRayDirX) + (gCollisionRayStartZ - v3->z) * (triangle->e32.y * gCollisionRayDirX - triangle->e32.x * gCollisionRayDirY) ) * distToTrianglePlane < 0) { return FALSE; } } cosAngle = triangle->normal.x * gCollisionRayDirX + triangle->normal.y * gCollisionRayDirY + triangle->normal.z * gCollisionRayDirZ; if (gCollisionRayLength >= 0 && gCollisionRayLength <= -distToTrianglePlane / cosAngle) { return FALSE; } gCollisionRayLength = -distToTrianglePlane / cosAngle; gCollisionPointX = gCollisionRayStartX + gCollisionRayDirX * gCollisionRayLength; gCollisionPointY = gCollisionRayStartY + gCollisionRayDirY * gCollisionRayLength; gCollisionPointZ = gCollisionRayStartZ + gCollisionRayDirZ * gCollisionRayLength; gCollisionNormalX = triangle->normal.x; gCollisionNormalY = triangle->normal.y; gCollisionNormalZ = triangle->normal.z; return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel spr_component_update_commands /* 10020C 802DD11C 27BDFF88 */ addiu $sp, $sp, -0x78 /* 100210 802DD120 AFB1002C */ sw $s1, 0x2C($sp) /* 100214 802DD124 0080882D */ daddu $s1, $a0, $zero /* 100218 802DD128 AFBF0040 */ sw $ra, 0x40($sp) /* 10021C 802DD12C AFB5003C */ sw $s5, 0x3C($sp) /* 100220 802DD130 AFB40038 */ sw $s4, 0x38($sp) /* 100224 802DD134 AFB30034 */ sw $s3, 0x34($sp) /* 100228 802DD138 AFB20030 */ sw $s2, 0x30($sp) /* 10022C 802DD13C AFB00028 */ sw $s0, 0x28($sp) /* 100230 802DD140 F7BE0070 */ sdc1 $f30, 0x70($sp) /* 100234 802DD144 F7BC0068 */ sdc1 $f28, 0x68($sp) /* 100238 802DD148 F7BA0060 */ sdc1 $f26, 0x60($sp) /* 10023C 802DD14C F7B80058 */ sdc1 $f24, 0x58($sp) /* 100240 802DD150 F7B60050 */ sdc1 $f22, 0x50($sp) /* 100244 802DD154 F7B40048 */ sdc1 $f20, 0x48($sp) /* 100248 802DD158 8E220000 */ lw $v0, 0x0($s1) /* 10024C 802DD15C 10400126 */ beqz $v0, .L802DD5F8 /* 100250 802DD160 00A0982D */ daddu $s3, $a1, $zero /* 100254 802DD164 0000902D */ daddu $s2, $zero, $zero /* 100258 802DD168 2414FFFF */ addiu $s4, $zero, -0x1 /* 10025C 802DD16C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 100260 802DD170 4481A000 */ mtc1 $at, $f20 /* 100264 802DD174 8E300008 */ lw $s0, 0x8($s1) /* 100268 802DD178 C620000C */ lwc1 $f0, 0xC($s1) /* 10026C 802DD17C 3C01802E */ lui $at, %hi(spr_animUpdateTimeScale) /* 100270 802DD180 C422F4C0 */ lwc1 $f2, %lo(spr_animUpdateTimeScale)($at) /* 100274 802DD184 4600A786 */ mov.s $f30, $f20 /* 100278 802DD188 46020001 */ sub.s $f0, $f0, $f2 /* 10027C 802DD18C 44801000 */ mtc1 $zero, $f2 /* 100280 802DD190 4600A706 */ mov.s $f28, $f20 /* 100284 802DD194 4602003E */ c.le.s $f0, $f2 /* 100288 802DD198 00000000 */ nop /* 10028C 802DD19C 450000FC */ bc1f .L802DD590 /* 100290 802DD1A0 E620000C */ swc1 $f0, 0xC($s1) /* 100294 802DD1A4 46001606 */ mov.s $f24, $f2 /* 100298 802DD1A8 4600A586 */ mov.s $f22, $f20 /* 10029C 802DD1AC 0280A82D */ daddu $s5, $s4, $zero /* 1002A0 802DD1B0 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 1002A4 802DD1B4 4481D000 */ mtc1 $at, $f26 .L802DD1B8: /* 1002A8 802DD1B8 96630004 */ lhu $v1, 0x4($s3) /* 1002AC 802DD1BC 00031C00 */ sll $v1, $v1, 16 /* 1002B0 802DD1C0 00031403 */ sra $v0, $v1, 16 /* 1002B4 802DD1C4 00031FC2 */ srl $v1, $v1, 31 /* 1002B8 802DD1C8 00431021 */ addu $v0, $v0, $v1 /* 1002BC 802DD1CC 00021043 */ sra $v0, $v0, 1 /* 1002C0 802DD1D0 8E630000 */ lw $v1, 0x0($s3) /* 1002C4 802DD1D4 00021040 */ sll $v0, $v0, 1 /* 1002C8 802DD1D8 00621021 */ addu $v0, $v1, $v0 /* 1002CC 802DD1DC 0202102B */ sltu $v0, $s0, $v0 /* 1002D0 802DD1E0 14400003 */ bnez $v0, .L802DD1F0 /* 1002D4 802DD1E4 24024000 */ addiu $v0, $zero, 0x4000 /* 1002D8 802DD1E8 080B7564 */ j .L802DD590 /* 1002DC 802DD1EC 0060802D */ daddu $s0, $v1, $zero .L802DD1F0: /* 1002E0 802DD1F0 96040000 */ lhu $a0, 0x0($s0) /* 1002E4 802DD1F4 3083F000 */ andi $v1, $a0, 0xF000 /* 1002E8 802DD1F8 10620089 */ beq $v1, $v0, .L802DD420 /* 1002EC 802DD1FC 28624001 */ slti $v0, $v1, 0x4001 /* 1002F0 802DD200 1040000F */ beqz $v0, .L802DD240 /* 1002F4 802DD204 24021000 */ addiu $v0, $zero, 0x1000 /* 1002F8 802DD208 10620040 */ beq $v1, $v0, .L802DD30C /* 1002FC 802DD20C 28621001 */ slti $v0, $v1, 0x1001 /* 100300 802DD210 50400005 */ beql $v0, $zero, .L802DD228 /* 100304 802DD214 24022000 */ addiu $v0, $zero, 0x2000 /* 100308 802DD218 10600019 */ beqz $v1, .L802DD280 /* 10030C 802DD21C 30820FFF */ andi $v0, $a0, 0xFFF /* 100310 802DD220 080B755D */ j .L802DD574 /* 100314 802DD224 00000000 */ nop .L802DD228: /* 100318 802DD228 1062002C */ beq $v1, $v0, .L802DD2DC /* 10031C 802DD22C 24023000 */ addiu $v0, $zero, 0x3000 /* 100320 802DD230 1062005F */ beq $v1, $v0, .L802DD3B0 /* 100324 802DD234 3083000F */ andi $v1, $a0, 0xF /* 100328 802DD238 080B755D */ j .L802DD574 /* 10032C 802DD23C 00000000 */ nop .L802DD240: /* 100330 802DD240 24026000 */ addiu $v0, $zero, 0x6000 /* 100334 802DD244 10620039 */ beq $v1, $v0, .L802DD32C /* 100338 802DD248 28626001 */ slti $v0, $v1, 0x6001 /* 10033C 802DD24C 10400005 */ beqz $v0, .L802DD264 /* 100340 802DD250 24025000 */ addiu $v0, $zero, 0x5000 /* 100344 802DD254 10620089 */ beq $v1, $v0, .L802DD47C /* 100348 802DD258 3083000F */ andi $v1, $a0, 0xF /* 10034C 802DD25C 080B755D */ j .L802DD574 /* 100350 802DD260 00000000 */ nop .L802DD264: /* 100354 802DD264 24027000 */ addiu $v0, $zero, 0x7000 /* 100358 802DD268 106200B3 */ beq $v1, $v0, .L802DD538 /* 10035C 802DD26C 34028000 */ ori $v0, $zero, 0x8000 /* 100360 802DD270 10620036 */ beq $v1, $v0, .L802DD34C /* 100364 802DD274 24020100 */ addiu $v0, $zero, 0x100 /* 100368 802DD278 080B755D */ j .L802DD574 /* 10036C 802DD27C 00000000 */ nop .L802DD280: /* 100370 802DD280 44820000 */ mtc1 $v0, $f0 /* 100374 802DD284 00000000 */ nop /* 100378 802DD288 46800020 */ cvt.s.w $f0, $f0 /* 10037C 802DD28C E620000C */ swc1 $f0, 0xC($s1) /* 100380 802DD290 46180032 */ c.eq.s $f0, $f24 /* 100384 802DD294 00000000 */ nop /* 100388 802DD298 45000006 */ bc1f .L802DD2B4 /* 10038C 802DD29C 26100002 */ addiu $s0, $s0, 0x2 /* 100390 802DD2A0 3C01457F */ lui $at, (0x457FF000 >> 16) /* 100394 802DD2A4 3421F000 */ ori $at, $at, (0x457FF000 & 0xFFFF) /* 100398 802DD2A8 44810000 */ mtc1 $at, $f0 /* 10039C 802DD2AC 00000000 */ nop /* 1003A0 802DD2B0 E620000C */ swc1 $f0, 0xC($s1) .L802DD2B4: /* 1003A4 802DD2B4 E6380024 */ swc1 $f24, 0x24($s1) /* 1003A8 802DD2B8 E6380020 */ swc1 $f24, 0x20($s1) /* 1003AC 802DD2BC E638001C */ swc1 $f24, 0x1C($s1) /* 1003B0 802DD2C0 AE20003C */ sw $zero, 0x3C($s1) /* 1003B4 802DD2C4 AE200038 */ sw $zero, 0x38($s1) /* 1003B8 802DD2C8 AE200034 */ sw $zero, 0x34($s1) /* 1003BC 802DD2CC E6360048 */ swc1 $f22, 0x48($s1) /* 1003C0 802DD2D0 E6360044 */ swc1 $f22, 0x44($s1) /* 1003C4 802DD2D4 080B755F */ j .L802DD57C /* 1003C8 802DD2D8 E6360040 */ swc1 $f22, 0x40($s1) .L802DD2DC: /* 1003CC 802DD2DC 96040000 */ lhu $a0, 0x0($s0) /* 1003D0 802DD2E0 0C0B7437 */ jal spr_unpack_signed_12bit /* 1003D4 802DD2E4 00000000 */ nop /* 1003D8 802DD2E8 8E630000 */ lw $v1, 0x0($s3) /* 1003DC 802DD2EC 00021040 */ sll $v0, $v0, 1 /* 1003E0 802DD2F0 00628021 */ addu $s0, $v1, $v0 /* 1003E4 802DD2F4 161400A1 */ bne $s0, $s4, .L802DD57C /* 1003E8 802DD2F8 0200A02D */ daddu $s4, $s0, $zero /* 1003EC 802DD2FC 0060802D */ daddu $s0, $v1, $zero /* 1003F0 802DD300 E636000C */ swc1 $f22, 0xC($s1) /* 1003F4 802DD304 080B755F */ j .L802DD57C /* 1003F8 802DD308 0200A02D */ daddu $s4, $s0, $zero .L802DD30C: /* 1003FC 802DD30C 30850FFF */ andi $a1, $a0, 0xFFF /* 100400 802DD310 24020FFF */ addiu $v0, $zero, 0xFFF /* 100404 802DD314 10A20003 */ beq $a1, $v0, .L802DD324 /* 100408 802DD318 26100002 */ addiu $s0, $s0, 0x2 /* 10040C 802DD31C 080B74D1 */ j .L802DD344 /* 100410 802DD320 AE250014 */ sw $a1, 0x14($s1) .L802DD324: /* 100414 802DD324 080B74D1 */ j .L802DD344 /* 100418 802DD328 AE350014 */ sw $s5, 0x14($s1) .L802DD32C: /* 10041C 802DD32C 30850FFF */ andi $a1, $a0, 0xFFF /* 100420 802DD330 24020FFF */ addiu $v0, $zero, 0xFFF /* 100424 802DD334 10A20003 */ beq $a1, $v0, .L802DD344 /* 100428 802DD338 26100002 */ addiu $s0, $s0, 0x2 /* 10042C 802DD33C 080B755F */ j .L802DD57C /* 100430 802DD340 AE250018 */ sw $a1, 0x18($s1) .L802DD344: /* 100434 802DD344 080B755F */ j .L802DD57C /* 100438 802DD348 AE350018 */ sw $s5, 0x18($s1) .L802DD34C: /* 10043C 802DD34C 96050000 */ lhu $a1, 0x0($s0) /* 100440 802DD350 30A30F00 */ andi $v1, $a1, 0xF00 /* 100444 802DD354 10620006 */ beq $v1, $v0, .L802DD370 /* 100448 802DD358 26100002 */ addiu $s0, $s0, 0x2 /* 10044C 802DD35C 24020200 */ addiu $v0, $zero, 0x200 /* 100450 802DD360 10620009 */ beq $v1, $v0, .L802DD388 /* 100454 802DD364 3C04FF00 */ lui $a0, (0xFF00FFFF >> 16) /* 100458 802DD368 080B755F */ j .L802DD57C /* 10045C 802DD36C 00000000 */ nop .L802DD370: /* 100460 802DD370 8E220004 */ lw $v0, 0x4($s1) /* 100464 802DD374 3C03FFFF */ lui $v1, (0xFFFF0000 >> 16) /* 100468 802DD378 00431024 */ and $v0, $v0, $v1 /* 10046C 802DD37C 00451025 */ or $v0, $v0, $a1 /* 100470 802DD380 080B755F */ j .L802DD57C /* 100474 802DD384 AE220004 */ sw $v0, 0x4($s1) .L802DD388: /* 100478 802DD388 3484FFFF */ ori $a0, $a0, (0xFF00FFFF & 0xFFFF) /* 10047C 802DD38C 8E230004 */ lw $v1, 0x4($s1) /* 100480 802DD390 30A200FF */ andi $v0, $a1, 0xFF /* 100484 802DD394 3C01802E */ lui $at, %hi(SpriteUpdateNotifyValue) /* 100488 802DD398 AC22FEAC */ sw $v0, %lo(SpriteUpdateNotifyValue)($at) /* 10048C 802DD39C 00021400 */ sll $v0, $v0, 16 /* 100490 802DD3A0 00641824 */ and $v1, $v1, $a0 /* 100494 802DD3A4 00621825 */ or $v1, $v1, $v0 /* 100498 802DD3A8 080B755F */ j .L802DD57C /* 10049C 802DD3AC AE230004 */ sw $v1, 0x4($s1) .L802DD3B0: /* 1004A0 802DD3B0 28620002 */ slti $v0, $v1, 0x2 /* 1004A4 802DD3B4 10400071 */ beqz $v0, .L802DD57C /* 1004A8 802DD3B8 26100002 */ addiu $s0, $s0, 0x2 /* 1004AC 802DD3BC 0460006F */ bltz $v1, .L802DD57C /* 1004B0 802DD3C0 00000000 */ nop /* 1004B4 802DD3C4 96040000 */ lhu $a0, 0x0($s0) /* 1004B8 802DD3C8 26100002 */ addiu $s0, $s0, 0x2 /* 1004BC 802DD3CC 0C0B743F */ jal spr_unpack_signed_16bit /* 1004C0 802DD3D0 36520001 */ ori $s2, $s2, 0x1 /* 1004C4 802DD3D4 96040000 */ lhu $a0, 0x0($s0) /* 1004C8 802DD3D8 26100002 */ addiu $s0, $s0, 0x2 /* 1004CC 802DD3DC 44822000 */ mtc1 $v0, $f4 /* 1004D0 802DD3E0 00000000 */ nop /* 1004D4 802DD3E4 46802120 */ cvt.s.w $f4, $f4 /* 1004D8 802DD3E8 0C0B743F */ jal spr_unpack_signed_16bit /* 1004DC 802DD3EC E7A40010 */ swc1 $f4, 0x10($sp) /* 1004E0 802DD3F0 96040000 */ lhu $a0, 0x0($s0) /* 1004E4 802DD3F4 26100002 */ addiu $s0, $s0, 0x2 /* 1004E8 802DD3F8 44822000 */ mtc1 $v0, $f4 /* 1004EC 802DD3FC 00000000 */ nop /* 1004F0 802DD400 46802120 */ cvt.s.w $f4, $f4 /* 1004F4 802DD404 0C0B743F */ jal spr_unpack_signed_16bit /* 1004F8 802DD408 E7A40014 */ swc1 $f4, 0x14($sp) /* 1004FC 802DD40C 44822000 */ mtc1 $v0, $f4 /* 100500 802DD410 00000000 */ nop /* 100504 802DD414 46802120 */ cvt.s.w $f4, $f4 /* 100508 802DD418 080B755F */ j .L802DD57C /* 10050C 802DD41C E7A40018 */ swc1 $f4, 0x18($sp) .L802DD420: /* 100510 802DD420 96040000 */ lhu $a0, 0x0($s0) /* 100514 802DD424 26100002 */ addiu $s0, $s0, 0x2 /* 100518 802DD428 0C0B7437 */ jal spr_unpack_signed_12bit /* 10051C 802DD42C 36520002 */ ori $s2, $s2, 0x2 /* 100520 802DD430 96040000 */ lhu $a0, 0x0($s0) /* 100524 802DD434 26100002 */ addiu $s0, $s0, 0x2 /* 100528 802DD438 44822000 */ mtc1 $v0, $f4 /* 10052C 802DD43C 00000000 */ nop /* 100530 802DD440 46802120 */ cvt.s.w $f4, $f4 /* 100534 802DD444 0C0B743F */ jal spr_unpack_signed_16bit /* 100538 802DD448 E7A4001C */ swc1 $f4, 0x1C($sp) /* 10053C 802DD44C 96040000 */ lhu $a0, 0x0($s0) /* 100540 802DD450 26100002 */ addiu $s0, $s0, 0x2 /* 100544 802DD454 44822000 */ mtc1 $v0, $f4 /* 100548 802DD458 00000000 */ nop /* 10054C 802DD45C 46802120 */ cvt.s.w $f4, $f4 /* 100550 802DD460 0C0B743F */ jal spr_unpack_signed_16bit /* 100554 802DD464 E7A40020 */ swc1 $f4, 0x20($sp) /* 100558 802DD468 44822000 */ mtc1 $v0, $f4 /* 10055C 802DD46C 00000000 */ nop /* 100560 802DD470 46802120 */ cvt.s.w $f4, $f4 /* 100564 802DD474 080B755F */ j .L802DD57C /* 100568 802DD478 E7A40024 */ swc1 $f4, 0x24($sp) .L802DD47C: /* 10056C 802DD47C 24020001 */ addiu $v0, $zero, 0x1 /* 100570 802DD480 10620017 */ beq $v1, $v0, .L802DD4E0 /* 100574 802DD484 26100002 */ addiu $s0, $s0, 0x2 /* 100578 802DD488 28620002 */ slti $v0, $v1, 0x2 /* 10057C 802DD48C 50400005 */ beql $v0, $zero, .L802DD4A4 /* 100580 802DD490 24020002 */ addiu $v0, $zero, 0x2 /* 100584 802DD494 10600009 */ beqz $v1, .L802DD4BC /* 100588 802DD498 00000000 */ nop /* 10058C 802DD49C 080B755F */ j .L802DD57C /* 100590 802DD4A0 36520004 */ ori $s2, $s2, 0x4 .L802DD4A4: /* 100594 802DD4A4 10620015 */ beq $v1, $v0, .L802DD4FC /* 100598 802DD4A8 24020003 */ addiu $v0, $zero, 0x3 /* 10059C 802DD4AC 1062001A */ beq $v1, $v0, .L802DD518 /* 1005A0 802DD4B0 00000000 */ nop /* 1005A4 802DD4B4 080B755F */ j .L802DD57C /* 1005A8 802DD4B8 36520004 */ ori $s2, $s2, 0x4 .L802DD4BC: /* 1005AC 802DD4BC 96020000 */ lhu $v0, 0x0($s0) /* 1005B0 802DD4C0 26100002 */ addiu $s0, $s0, 0x2 /* 1005B4 802DD4C4 44820000 */ mtc1 $v0, $f0 /* 1005B8 802DD4C8 00000000 */ nop /* 1005BC 802DD4CC 46800020 */ cvt.s.w $f0, $f0 /* 1005C0 802DD4D0 461A0503 */ div.s $f20, $f0, $f26 /* 1005C4 802DD4D4 4600A786 */ mov.s $f30, $f20 /* 1005C8 802DD4D8 080B754C */ j .L802DD530 /* 1005CC 802DD4DC 4600A706 */ mov.s $f28, $f20 .L802DD4E0: /* 1005D0 802DD4E0 96020000 */ lhu $v0, 0x0($s0) /* 1005D4 802DD4E4 26100002 */ addiu $s0, $s0, 0x2 /* 1005D8 802DD4E8 44820000 */ mtc1 $v0, $f0 /* 1005DC 802DD4EC 00000000 */ nop /* 1005E0 802DD4F0 46800020 */ cvt.s.w $f0, $f0 /* 1005E4 802DD4F4 080B754C */ j .L802DD530 /* 1005E8 802DD4F8 461A0703 */ div.s $f28, $f0, $f26 .L802DD4FC: /* 1005EC 802DD4FC 96020000 */ lhu $v0, 0x0($s0) /* 1005F0 802DD500 26100002 */ addiu $s0, $s0, 0x2 /* 1005F4 802DD504 44820000 */ mtc1 $v0, $f0 /* 1005F8 802DD508 00000000 */ nop /* 1005FC 802DD50C 46800020 */ cvt.s.w $f0, $f0 /* 100600 802DD510 080B754C */ j .L802DD530 /* 100604 802DD514 461A0783 */ div.s $f30, $f0, $f26 .L802DD518: /* 100608 802DD518 96020000 */ lhu $v0, 0x0($s0) /* 10060C 802DD51C 26100002 */ addiu $s0, $s0, 0x2 /* 100610 802DD520 44820000 */ mtc1 $v0, $f0 /* 100614 802DD524 00000000 */ nop /* 100618 802DD528 46800020 */ cvt.s.w $f0, $f0 /* 10061C 802DD52C 461A0503 */ div.s $f20, $f0, $f26 .L802DD530: /* 100620 802DD530 080B755F */ j .L802DD57C /* 100624 802DD534 36520004 */ ori $s2, $s2, 0x4 .L802DD538: /* 100628 802DD538 8E220010 */ lw $v0, 0x10($s1) /* 10062C 802DD53C 10400005 */ beqz $v0, .L802DD554 /* 100630 802DD540 2442FFFF */ addiu $v0, $v0, -0x1 /* 100634 802DD544 14400005 */ bnez $v0, .L802DD55C /* 100638 802DD548 AE220010 */ sw $v0, 0x10($s1) /* 10063C 802DD54C 080B755F */ j .L802DD57C /* 100640 802DD550 26100004 */ addiu $s0, $s0, 0x4 .L802DD554: /* 100644 802DD554 96020002 */ lhu $v0, 0x2($s0) /* 100648 802DD558 AE220010 */ sw $v0, 0x10($s1) .L802DD55C: /* 10064C 802DD55C 0C0B7437 */ jal spr_unpack_signed_12bit /* 100650 802DD560 96040000 */ lhu $a0, 0x0($s0) /* 100654 802DD564 8E630000 */ lw $v1, 0x0($s3) /* 100658 802DD568 00021040 */ sll $v0, $v0, 1 /* 10065C 802DD56C 080B755F */ j .L802DD57C /* 100660 802DD570 00628021 */ addu $s0, $v1, $v0 .L802DD574: /* 100664 802DD574 8E700000 */ lw $s0, 0x0($s3) /* 100668 802DD578 E636000C */ swc1 $f22, 0xC($s1) .L802DD57C: /* 10066C 802DD57C C620000C */ lwc1 $f0, 0xC($s1) /* 100670 802DD580 4618003E */ c.le.s $f0, $f24 /* 100674 802DD584 00000000 */ nop /* 100678 802DD588 4501FF0B */ bc1t .L802DD1B8 /* 10067C 802DD58C 00000000 */ nop .L802DD590: /* 100680 802DD590 32420001 */ andi $v0, $s2, 0x1 /* 100684 802DD594 10400007 */ beqz $v0, .L802DD5B4 /* 100688 802DD598 AE300008 */ sw $s0, 0x8($s1) /* 10068C 802DD59C C7A40010 */ lwc1 $f4, 0x10($sp) /* 100690 802DD5A0 E624001C */ swc1 $f4, 0x1C($s1) /* 100694 802DD5A4 C7A40014 */ lwc1 $f4, 0x14($sp) /* 100698 802DD5A8 E6240020 */ swc1 $f4, 0x20($s1) /* 10069C 802DD5AC C7A40018 */ lwc1 $f4, 0x18($sp) /* 1006A0 802DD5B0 E6240024 */ swc1 $f4, 0x24($s1) .L802DD5B4: /* 1006A4 802DD5B4 32420002 */ andi $v0, $s2, 0x2 /* 1006A8 802DD5B8 1040000A */ beqz $v0, .L802DD5E4 /* 1006AC 802DD5BC 32420004 */ andi $v0, $s2, 0x4 /* 1006B0 802DD5C0 C7A4001C */ lwc1 $f4, 0x1C($sp) /* 1006B4 802DD5C4 4600210D */ trunc.w.s $f4, $f4 /* 1006B8 802DD5C8 E6240034 */ swc1 $f4, 0x34($s1) /* 1006BC 802DD5CC C7A40020 */ lwc1 $f4, 0x20($sp) /* 1006C0 802DD5D0 4600210D */ trunc.w.s $f4, $f4 /* 1006C4 802DD5D4 E6240038 */ swc1 $f4, 0x38($s1) /* 1006C8 802DD5D8 C7A40024 */ lwc1 $f4, 0x24($sp) /* 1006CC 802DD5DC 4600210D */ trunc.w.s $f4, $f4 /* 1006D0 802DD5E0 E624003C */ swc1 $f4, 0x3C($s1) .L802DD5E4: /* 1006D4 802DD5E4 10400004 */ beqz $v0, .L802DD5F8 /* 1006D8 802DD5E8 00000000 */ nop /* 1006DC 802DD5EC E63C0040 */ swc1 $f28, 0x40($s1) /* 1006E0 802DD5F0 E63E0044 */ swc1 $f30, 0x44($s1) /* 1006E4 802DD5F4 E6340048 */ swc1 $f20, 0x48($s1) .L802DD5F8: /* 1006E8 802DD5F8 8FBF0040 */ lw $ra, 0x40($sp) /* 1006EC 802DD5FC 8FB5003C */ lw $s5, 0x3C($sp) /* 1006F0 802DD600 8FB40038 */ lw $s4, 0x38($sp) /* 1006F4 802DD604 8FB30034 */ lw $s3, 0x34($sp) /* 1006F8 802DD608 8FB20030 */ lw $s2, 0x30($sp) /* 1006FC 802DD60C 8FB1002C */ lw $s1, 0x2C($sp) /* 100700 802DD610 8FB00028 */ lw $s0, 0x28($sp) /* 100704 802DD614 D7BE0070 */ ldc1 $f30, 0x70($sp) /* 100708 802DD618 D7BC0068 */ ldc1 $f28, 0x68($sp) /* 10070C 802DD61C D7BA0060 */ ldc1 $f26, 0x60($sp) /* 100710 802DD620 D7B80058 */ ldc1 $f24, 0x58($sp) /* 100714 802DD624 D7B60050 */ ldc1 $f22, 0x50($sp) /* 100718 802DD628 D7B40048 */ ldc1 $f20, 0x48($sp) /* 10071C 802DD62C 03E00008 */ jr $ra /* 100720 802DD630 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: void spr_component_update_commands(SpriteComponent* comp, SpriteAnimComponent* anim) { f32 posX, posY, posZ; f32 rotX, rotY, rotZ; f32 scaleX, scaleY, scaleZ; s32 changedFlags; u16* bufPos; u16* gotoPos; s32 cmdValue; if (comp->initialized) { scaleZ = 1.0f; scaleY = 1.0f; scaleX = 1.0f; changedFlags = 0; bufPos = comp->readPos; gotoPos = (u16*) -1; comp->waitTime -= spr_animUpdateTimeScale; while (comp->waitTime <= 0.0f) { // overflow check if (bufPos >= &anim->cmdList[anim->cmdListSize / 2]) { bufPos = anim->cmdList; break; } switch (*bufPos & 0xF000) { // 0VVV // Wait case 0x0000: comp->waitTime = *bufPos++ & 0xFFF; if (comp->waitTime == 0.0f) { comp->waitTime = 4095.0f; } comp->posOffset.z = 0.0f; comp->posOffset.y = 0.0f; comp->posOffset.x = 0.0f; comp->rotation.z = 0; comp->rotation.y = 0; comp->rotation.x = 0; comp->scale.z = 1.0f; comp->scale.y = 1.0f; comp->scale.x = 1.0f; break; // 2VVV // Goto -- jump to another position in the list case 0x2000: bufPos = &anim->cmdList[spr_unpack_signed_12bit(*bufPos)]; if (bufPos == gotoPos) { bufPos = anim->cmdList; comp->waitTime = 1.0f; } gotoPos = bufPos; break; // 1VVV // SetImage -- FFF is valid value for "no image" case 0x1000: cmdValue = *bufPos++ & 0xFFF; if (cmdValue != 0xFFF) { comp->currentRaster = cmdValue; } else { comp->currentRaster = -1; } comp->currentPalette = -1; break; // 6VVV // SetPalette -- FFF to clear case 0x6000: cmdValue = *bufPos++ & 0xFFF; if (cmdValue != 0xFFF) { comp->currentPalette = cmdValue; } else { comp->currentPalette = -1; } break; // 8VUU // SetProperty // 81-XX parent to component XX // 82-YY set notify value to YY case 0x8000: cmdValue = *bufPos++; switch (cmdValue & 0xF00) { case 0x100: // set parent comp->properties = (comp->properties & 0xFFFF0000) | cmdValue; break; case 0x200: // set notify value SpriteUpdateNotifyValue = cmdValue & 0xFF; comp->properties = (comp->properties & 0xFF00FFFF) | (SpriteUpdateNotifyValue << 0x10); break; } break; // 3VVV XXXX YYYY ZZZZ // SetPosition -- what does the flag do? case 0x3000: switch (*bufPos++ & 0xF) { case 0: case 1: posX = spr_unpack_signed_16bit(*bufPos++); posY = spr_unpack_signed_16bit(*bufPos++); posZ = spr_unpack_signed_16bit(*bufPos++); changedFlags |= 1; break; } break; // 4XXX YYYY ZZZZ // SetRotation (euler angles) case 0x4000: rotX = spr_unpack_signed_12bit(*bufPos++); rotY = spr_unpack_signed_16bit(*bufPos++); rotZ = spr_unpack_signed_16bit(*bufPos++); changedFlags |= 2; break; // 5VVV UUUU // SetScale (%) case 0x5000: switch (*bufPos++ & 0xF) { case 0: scaleZ = *bufPos++ / 100.0f; scaleY = scaleZ; scaleX = scaleZ; break; case 1: scaleX = *bufPos++ / 100.0f; break; case 2: scaleY = *bufPos++ / 100.0f; break; case 3: scaleZ = *bufPos++ / 100.0f; break; } changedFlags |= 4; break; // 7VVV UUUU // Loop -- VV iterations jumping back to UUUU case 0x7000: if (comp->loopCounter != 0) { comp->loopCounter--; if (comp->loopCounter == 0) { bufPos += 2; break; } } else { comp->loopCounter = bufPos[1]; } bufPos = &anim->cmdList[spr_unpack_signed_12bit(*bufPos)]; break; // invalid command default: bufPos = anim->cmdList; comp->waitTime = 1.0f; break; } } // end loop comp->readPos = bufPos; if (changedFlags & 1) { comp->posOffset.x = posX; comp->posOffset.y = posY; comp->posOffset.z = posZ; } if (changedFlags & 2) { comp->rotation.x = rotX; comp->rotation.y = rotY; comp->rotation.z = rotZ; } if (changedFlags & 4) { comp->scale.x = scaleX; comp->scale.y = scaleY; comp->scale.z = scaleZ; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80248190 /* 176A70 80248190 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 176A74 80248194 AFB50024 */ sw $s5, 0x24($sp) /* 176A78 80248198 3C15800E */ lui $s5, %hi(gBattleStatus) /* 176A7C 8024819C 26B5C070 */ addiu $s5, $s5, %lo(gBattleStatus) /* 176A80 802481A0 AFB20018 */ sw $s2, 0x18($sp) /* 176A84 802481A4 3C12800E */ lui $s2, %hi(gBattleSubState) /* 176A88 802481A8 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState) .L802481AC: /* 176A8C 802481AC AFB10014 */ sw $s1, 0x14($sp) /* 176A90 802481B0 24110001 */ addiu $s1, $zero, 0x1 /* 176A94 802481B4 AFBF0028 */ sw $ra, 0x28($sp) glabel func_802481B8 /* 176A98 802481B8 AFB40020 */ sw $s4, 0x20($sp) /* 176A9C 802481BC AFB3001C */ sw $s3, 0x1C($sp) /* 176AA0 802481C0 AFB00010 */ sw $s0, 0x10($sp) /* 176AA4 802481C4 8EB000D8 */ lw $s0, 0xD8($s5) /* 176AA8 802481C8 8E430000 */ lw $v1, 0x0($s2) /* 176AAC 802481CC 8EB400DC */ lw $s4, 0xDC($s5) /* 176AB0 802481D0 1071003E */ beq $v1, $s1, .L802482CC /* 176AB4 802481D4 28620002 */ slti $v0, $v1, 0x2 D_802481D8: /* 176AB8 802481D8 50400005 */ beql $v0, $zero, .L802481F0 /* 176ABC 802481DC 24020002 */ addiu $v0, $zero, 0x2 .L802481E0: /* 176AC0 802481E0 10600009 */ beqz $v1, .L80248208 /* 176AC4 802481E4 24040002 */ addiu $a0, $zero, 0x2 .L802481E8: /* 176AC8 802481E8 08092176 */ j .L802485D8 /* 176ACC 802481EC 00000000 */ nop .L802481F0: /* 176AD0 802481F0 10620068 */ beq $v1, $v0, .L80248394 /* 176AD4 802481F4 24020003 */ addiu $v0, $zero, 0x3 D_802481F8: /* 176AD8 802481F8 106200E1 */ beq $v1, $v0, .L80248580 /* 176ADC 802481FC 0000982D */ daddu $s3, $zero, $zero /* 176AE0 80248200 08092176 */ j .L802485D8 /* 176AE4 80248204 00000000 */ nop .L80248208: /* 176AE8 80248208 8E830008 */ lw $v1, 0x8($s4) /* 176AEC 8024820C 3C028011 */ lui $v0, %hi(gPlayerData) .L80248210: /* 176AF0 80248210 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* 176AF4 80248214 3C01802A */ lui $at, %hi(D_8029F254) /* 176AF8 80248218 AC20F254 */ sw $zero, %lo(D_8029F254)($at) D_8024821C: /* 176AFC 8024821C 80450012 */ lb $a1, 0x12($v0) /* 176B00 80248220 90630006 */ lbu $v1, 0x6($v1) /* 176B04 80248224 10A40005 */ beq $a1, $a0, .L8024823C /* 176B08 80248228 24020003 */ addiu $v0, $zero, 0x3 /* 176B0C 8024822C 10A20006 */ beq $a1, $v0, .L80248248 /* 176B10 80248230 24020005 */ addiu $v0, $zero, 0x5 /* 176B14 80248234 0809209D */ j .L80248274 /* 176B18 80248238 00000000 */ nop .L8024823C: /* 176B1C 8024823C 24020005 */ addiu $v0, $zero, 0x5 /* 176B20 80248240 08092093 */ j .L8024824C /* 176B24 80248244 24630089 */ addiu $v1, $v1, 0x89 .L80248248: /* 176B28 80248248 2463008F */ addiu $v1, $v1, 0x8F .L8024824C: /* 176B2C 8024824C A2A20178 */ sb $v0, 0x178($s5) /* 176B30 80248250 00031080 */ sll $v0, $v1, 2 /* 176B34 80248254 00431021 */ addu $v0, $v0, $v1 /* 176B38 80248258 00021080 */ sll $v0, $v0, 2 /* 176B3C 8024825C A6A0017A */ sh $zero, 0x17A($s5) /* 176B40 80248260 A6A3017C */ sh $v1, 0x17C($s5) /* 176B44 80248264 3C018009 */ lui $at, %hi(D_8008F064) /* 176B48 80248268 00220821 */ addu $at, $at, $v0 /* 176B4C 8024826C 8C22F064 */ lw $v0, %lo(D_8008F064)($at) /* 176B50 80248270 AEA20184 */ sw $v0, 0x184($s5) .L80248274: /* 176B54 80248274 0C09A75B */ jal get_actor /* 176B58 80248278 24040200 */ addiu $a0, $zero, 0x200 /* 176B5C 8024827C 0040802D */ daddu $s0, $v0, $zero /* 176B60 80248280 8E0201C8 */ lw $v0, 0x1C8($s0) .L80248284: /* 176B64 80248284 1040000C */ beqz $v0, .L802482B8 /* 176B68 80248288 2405000A */ addiu $a1, $zero, 0xA /* 176B6C 8024828C 24060020 */ addiu $a2, $zero, 0x20 /* 176B70 80248290 0040202D */ daddu $a0, $v0, $zero /* 176B74 80248294 24020038 */ addiu $v0, $zero, 0x38 /* 176B78 80248298 0C0B0CF8 */ jal start_script D_8024829C: /* 176B7C 8024829C A20201F0 */ sb $v0, 0x1F0($s0) mgm_02_panel_peach_img: /* 176B80 802482A0 0040202D */ daddu $a0, $v0, $zero /* 176B84 802482A4 AE0401D8 */ sw $a0, 0x1D8($s0) D_802482A8: /* 176B88 802482A8 8C820144 */ lw $v0, 0x144($a0) /* 176B8C 802482AC 86030192 */ lh $v1, 0x192($s0) /* 176B90 802482B0 AE0201E8 */ sw $v0, 0x1E8($s0) D_802482B4: /* 176B94 802482B4 AC830148 */ sw $v1, 0x148($a0) .L802482B8: /* 176B98 802482B8 24020001 */ addiu $v0, $zero, 0x1 /* 176B9C 802482BC 3C01800E */ lui $at, %hi(gBattleSubState) D_802482C0: /* 176BA0 802482C0 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L802482C4: /* 176BA4 802482C4 08092176 */ j .L802485D8 /* 176BA8 802482C8 00000000 */ nop .L802482CC: /* 176BAC 802482CC 0C098C0B */ jal func_8026302C /* 176BB0 802482D0 0280202D */ daddu $a0, $s4, $zero /* 176BB4 802482D4 8283040D */ lb $v1, 0x40D($s4) /* 176BB8 802482D8 00031080 */ sll $v0, $v1, 2 /* 176BBC 802482DC 00431021 */ addu $v0, $v0, $v1 /* 176BC0 802482E0 00021080 */ sll $v0, $v0, 2 D_802482E4: /* 176BC4 802482E4 2442022C */ addiu $v0, $v0, 0x22C .L802482E8: /* 176BC8 802482E8 02821021 */ addu $v0, $s4, $v0 /* 176BCC 802482EC 94430000 */ lhu $v1, 0x0($v0) /* 176BD0 802482F0 A6830428 */ sh $v1, 0x428($s4) /* 176BD4 802482F4 90420003 */ lbu $v0, 0x3($v0) D_802482F8: /* 176BD8 802482F8 A2820426 */ sb $v0, 0x426($s4) D_802482FC: /* 176BDC 802482FC 8EA40000 */ lw $a0, 0x0($s5) /* 176BE0 80248300 2402FFFD */ addiu $v0, $zero, -0x3 /* 176BE4 80248304 00822024 */ and $a0, $a0, $v0 /* 176BE8 80248308 8EA20004 */ lw $v0, 0x4($s5) glabel func_8024830C /* 176BEC 8024830C 3C030100 */ lui $v1, (0x1000000 >> 16) /* 176BF0 80248310 A2A0008C */ sb $zero, 0x8C($s5) /* 176BF4 80248314 A6A00180 */ sh $zero, 0x180($s5) /* 176BF8 80248318 A2A0019A */ sb $zero, 0x19A($s5) /* 176BFC 8024831C AEA40000 */ sw $a0, 0x0($s5) /* 176C00 80248320 00431025 */ or $v0, $v0, $v1 /* 176C04 80248324 AEA20004 */ sw $v0, 0x4($s5) /* 176C08 80248328 3C020008 */ lui $v0, (0x80000 >> 16) /* 176C0C 8024832C 00822025 */ or $a0, $a0, $v0 /* 176C10 80248330 0C03A6D5 */ jal increment_status_bar_disabled /* 176C14 80248334 AEA40000 */ sw $a0, 0x0($s5) /* 176C18 80248338 0C093903 */ jal func_8024E40C /* 176C1C 8024833C 2404000A */ addiu $a0, $zero, 0xA jtbl_80248340: /* 176C20 80248340 0C09390F */ jal func_8024E43C .L80248344: /* 176C24 80248344 24040100 */ addiu $a0, $zero, 0x100 /* 176C28 80248348 0C098F18 */ jal reset_actor_turn_info D_8024834C: /* 176C2C 8024834C 00000000 */ nop /* 176C30 80248350 2405000A */ addiu $a1, $zero, 0xA D_80248354: /* 176C34 80248354 A2B101A7 */ sb $s1, 0x1A7($s5) /* 176C38 80248358 8E8401C4 */ lw $a0, 0x1C4($s4) D_8024835C: /* 176C3C 8024835C 0C0B0CF8 */ jal start_script D_80248360: /* 176C40 80248360 0000302D */ daddu $a2, $zero, $zero D_80248364: /* 176C44 80248364 0040202D */ daddu $a0, $v0, $zero D_80248368: /* 176C48 80248368 AE8401D4 */ sw $a0, 0x1D4($s4) /* 176C4C 8024836C 8C830144 */ lw $v1, 0x144($a0) D_80248370_EB0E50: /* 176C50 80248370 24020003 */ addiu $v0, $zero, 0x3 /* 176C54 80248374 3C01802A */ lui $at, %hi(D_8029F248) D_80248378: /* 176C58 80248378 AC22F248 */ sw $v0, %lo(D_8029F248)($at) /* 176C5C 8024837C 24020002 */ addiu $v0, $zero, 0x2 kzn_19_VineRenderState: /* 176C60 80248380 AE420000 */ sw $v0, 0x0($s2) /* 176C64 80248384 24020100 */ addiu $v0, $zero, 0x100 dead_kzn_19_D_80248388: /* 176C68 80248388 AE8301E4 */ sw $v1, 0x1E4($s4) /* 176C6C 8024838C 08092176 */ j .L802485D8 .L80248390: /* 176C70 80248390 AC820148 */ sw $v0, 0x148($a0) .L80248394: /* 176C74 80248394 3C03802A */ lui $v1, %hi(D_8029F248) D_80248398: /* 176C78 80248398 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) /* 176C7C 8024839C 8C620000 */ lw $v0, 0x0($v1) D_802483A0: /* 176C80 802483A0 10400003 */ beqz $v0, D_802483B0 /* 176C84 802483A4 2442FFFF */ addiu $v0, $v0, -0x1 D_802483A8: /* 176C88 802483A8 080920EE */ j .L802483B8 /* 176C8C 802483AC AC620000 */ sw $v0, 0x0($v1) D_802483B0: /* 176C90 802483B0 3C01802A */ lui $at, %hi(D_8029F254) /* 176C94 802483B4 AC31F254 */ sw $s1, %lo(D_8029F254)($at) .L802483B8: /* 176C98 802483B8 8E8201D4 */ lw $v0, 0x1D4($s4) /* 176C9C 802483BC 10400005 */ beqz $v0, .L802483D4 kmr_22_ChapterEffect: /* 176CA0 802483C0 00000000 */ nop kmr_22_ChapterEffectTime: /* 176CA4 802483C4 0C0B1059 */ jal does_script_exist /* 176CA8 802483C8 8E8401E4 */ lw $a0, 0x1E4($s4) D_802483CC: /* 176CAC 802483CC 14400082 */ bnez $v0, .L802485D8 kmr_22_VineRenderState: /* 176CB0 802483D0 00000000 */ nop .L802483D4: /* 176CB4 802483D4 8E8201D8 */ lw $v0, 0x1D8($s4) .L802483D8: /* 176CB8 802483D8 10400006 */ beqz $v0, .L802483F4 /* 176CBC 802483DC AE8001D4 */ sw $zero, 0x1D4($s4) /* 176CC0 802483E0 8E8401E8 */ lw $a0, 0x1E8($s4) /* 176CC4 802483E4 0C0B1059 */ jal does_script_exist D_802483E8: /* 176CC8 802483E8 00000000 */ nop D_802483EC: /* 176CCC 802483EC 1440007A */ bnez $v0, .L802485D8 /* 176CD0 802483F0 00000000 */ nop .L802483F4: /* 176CD4 802483F4 AE8001D8 */ sw $zero, 0x1D8($s4) /* 176CD8 802483F8 8E0201D8 */ lw $v0, 0x1D8($s0) /* 176CDC 802483FC 50400007 */ beql $v0, $zero, .L8024841C /* 176CE0 80248400 AE0001D8 */ sw $zero, 0x1D8($s0) /* 176CE4 80248404 8E0401E8 */ lw $a0, 0x1E8($s0) /* 176CE8 80248408 0C0B1059 */ jal does_script_exist /* 176CEC 8024840C 00000000 */ nop /* 176CF0 80248410 14400071 */ bnez $v0, .L802485D8 /* 176CF4 80248414 00000000 */ nop /* 176CF8 80248418 AE0001D8 */ sw $zero, 0x1D8($s0) .L8024841C: /* 176CFC 8024841C 0000982D */ daddu $s3, $zero, $zero D_80248420: /* 176D00 80248420 0260882D */ daddu $s1, $s3, $zero /* 176D04 80248424 02A0902D */ daddu $s2, $s5, $zero .L80248428: /* 176D08 80248428 8E5000E0 */ lw $s0, 0xE0($s2) /* 176D0C 8024842C 5200000B */ beql $s0, $zero, .L8024845C /* 176D10 80248430 26310001 */ addiu $s1, $s1, 0x1 /* 176D14 80248434 8E0201D4 */ lw $v0, 0x1D4($s0) /* 176D18 80248438 50400008 */ beql $v0, $zero, .L8024845C /* 176D1C 8024843C 26310001 */ addiu $s1, $s1, 0x1 /* 176D20 80248440 8E0401E4 */ lw $a0, 0x1E4($s0) /* 176D24 80248444 0C0B1059 */ jal does_script_exist /* 176D28 80248448 00000000 */ nop /* 176D2C 8024844C 50400002 */ beql $v0, $zero, .L80248458 /* 176D30 80248450 AE0001D4 */ sw $zero, 0x1D4($s0) /* 176D34 80248454 24130001 */ addiu $s3, $zero, 0x1 .L80248458: /* 176D38 80248458 26310001 */ addiu $s1, $s1, 0x1 .L8024845C: /* 176D3C 8024845C 2A220018 */ slti $v0, $s1, 0x18 /* 176D40 80248460 1440FFF1 */ bnez $v0, .L80248428 .L80248464: /* 176D44 80248464 26520004 */ addiu $s2, $s2, 0x4 /* 176D48 80248468 1660005B */ bnez $s3, .L802485D8 /* 176D4C 8024846C 0000882D */ daddu $s1, $zero, $zero D_80248470: /* 176D50 80248470 02A0902D */ daddu $s2, $s5, $zero .L80248474: /* 176D54 80248474 8E5000E0 */ lw $s0, 0xE0($s2) /* 176D58 80248478 5200000B */ beql $s0, $zero, .L802484A8 /* 176D5C 8024847C 26310001 */ addiu $s1, $s1, 0x1 iwa_10_D_80248480: /* 176D60 80248480 8E0201D8 */ lw $v0, 0x1D8($s0) /* 176D64 80248484 50400008 */ beql $v0, $zero, .L802484A8 /* 176D68 80248488 26310001 */ addiu $s1, $s1, 0x1 .L8024848C: /* 176D6C 8024848C 8E0401E8 */ lw $a0, 0x1E8($s0) /* 176D70 80248490 0C0B1059 */ jal does_script_exist /* 176D74 80248494 00000000 */ nop /* 176D78 80248498 50400002 */ beql $v0, $zero, .L802484A4 /* 176D7C 8024849C AE0001D8 */ sw $zero, 0x1D8($s0) mgm_02_panel_peach_pal: /* 176D80 802484A0 24130001 */ addiu $s3, $zero, 0x1 .L802484A4: /* 176D84 802484A4 26310001 */ addiu $s1, $s1, 0x1 .L802484A8: /* 176D88 802484A8 2A220018 */ slti $v0, $s1, 0x18 /* 176D8C 802484AC 1440FFF1 */ bnez $v0, .L80248474 /* 176D90 802484B0 26520004 */ addiu $s2, $s2, 0x4 /* 176D94 802484B4 16600048 */ bnez $s3, .L802485D8 /* 176D98 802484B8 0000882D */ daddu $s1, $zero, $zero /* 176D9C 802484BC 3C04FFF7 */ lui $a0, (0xFFF7FFFF >> 16) mgm_02_MsgImg_PeachPanel: /* 176DA0 802484C0 3484FFFF */ ori $a0, $a0, (0xFFF7FFFF & 0xFFFF) /* 176DA4 802484C4 02A0182D */ daddu $v1, $s5, $zero .L802484C8: /* 176DA8 802484C8 8C7000E0 */ lw $s0, 0xE0($v1) /* 176DAC 802484CC 12000004 */ beqz $s0, D_802484E0_E1E260 /* 176DB0 802484D0 26310001 */ addiu $s1, $s1, 0x1 /* 176DB4 802484D4 8E020000 */ lw $v0, 0x0($s0) /* 176DB8 802484D8 00441024 */ and $v0, $v0, $a0 /* 176DBC 802484DC AE020000 */ sw $v0, 0x0($s0) D_802484E0_E1E260: /* 176DC0 802484E0 2A220018 */ slti $v0, $s1, 0x18 /* 176DC4 802484E4 1440FFF8 */ bnez $v0, .L802484C8 jtbl_802484E8: /* 176DC8 802484E8 24630004 */ addiu $v1, $v1, 0x4 /* 176DCC 802484EC 82A2008C */ lb $v0, 0x8C($s5) D_802484F0: /* 176DD0 802484F0 14400039 */ bnez $v0, .L802485D8 /* 176DD4 802484F4 00000000 */ nop D_802484F8: /* 176DD8 802484F8 0C03A6CC */ jal decrement_status_bar_disabled /* 176DDC 802484FC 00000000 */ nop /* 176DE0 80248500 0C098D19 */ jal btl_check_player_defeated D_80248504: /* 176DE4 80248504 00000000 */ nop /* 176DE8 80248508 14400033 */ bnez $v0, .L802485D8 /* 176DEC 8024850C 00000000 */ nop /* 176DF0 80248510 0C098D0D */ jal btl_check_enemies_defeated /* 176DF4 80248514 00000000 */ nop /* 176DF8 80248518 1440002F */ bnez $v0, .L802485D8 /* 176DFC 8024851C 00000000 */ nop .L80248520: /* 176E00 80248520 0C09A75B */ jal get_actor /* 176E04 80248524 86840428 */ lh $a0, 0x428($s4) /* 176E08 80248528 0040802D */ daddu $s0, $v0, $zero .L8024852C: /* 176E0C 8024852C 12000010 */ beqz $s0, D_80248570 /* 176E10 80248530 24020003 */ addiu $v0, $zero, 0x3 /* 176E14 80248534 8E0201C8 */ lw $v0, 0x1C8($s0) /* 176E18 80248538 1040000C */ beqz $v0, D_8024856C /* 176E1C 8024853C 2405000A */ addiu $a1, $zero, 0xA /* 176E20 80248540 24060020 */ addiu $a2, $zero, 0x20 /* 176E24 80248544 0040202D */ daddu $a0, $v0, $zero /* 176E28 80248548 24020035 */ addiu $v0, $zero, 0x35 dead_kzn_19_LetterDelivery_SavedNpcAnim: /* 176E2C 8024854C 0C0B0CF8 */ jal start_script /* 176E30 80248550 A20201F0 */ sb $v0, 0x1F0($s0) /* 176E34 80248554 0040202D */ daddu $a0, $v0, $zero /* 176E38 80248558 AE0401D8 */ sw $a0, 0x1D8($s0) /* 176E3C 8024855C 8C820144 */ lw $v0, 0x144($a0) /* 176E40 80248560 86030192 */ lh $v1, 0x192($s0) /* 176E44 80248564 AE0201E8 */ sw $v0, 0x1E8($s0) /* 176E48 80248568 AC830148 */ sw $v1, 0x148($a0) D_8024856C: /* 176E4C 8024856C 24020003 */ addiu $v0, $zero, 0x3 D_80248570: /* 176E50 80248570 3C01800E */ lui $at, %hi(gBattleSubState) /* 176E54 80248574 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80248578: /* 176E58 80248578 08092176 */ j .L802485D8 /* 176E5C 8024857C 00000000 */ nop .L80248580: /* 176E60 80248580 0260882D */ daddu $s1, $s3, $zero /* 176E64 80248584 02A0902D */ daddu $s2, $s5, $zero .L80248588: /* 176E68 80248588 8E5000E0 */ lw $s0, 0xE0($s2) /* 176E6C 8024858C 5200000B */ beql $s0, $zero, .L802485BC /* 176E70 80248590 26310001 */ addiu $s1, $s1, 0x1 /* 176E74 80248594 8E0201D8 */ lw $v0, 0x1D8($s0) D_80248598: /* 176E78 80248598 50400008 */ beql $v0, $zero, .L802485BC /* 176E7C 8024859C 26310001 */ addiu $s1, $s1, 0x1 /* 176E80 802485A0 8E0401E8 */ lw $a0, 0x1E8($s0) .L802485A4: /* 176E84 802485A4 0C0B1059 */ jal does_script_exist D_802485A8: /* 176E88 802485A8 00000000 */ nop /* 176E8C 802485AC 50400002 */ beql $v0, $zero, .L802485B8 /* 176E90 802485B0 AE0001D8 */ sw $zero, 0x1D8($s0) /* 176E94 802485B4 24130001 */ addiu $s3, $zero, 0x1 .L802485B8: /* 176E98 802485B8 26310001 */ addiu $s1, $s1, 0x1 .L802485BC: /* 176E9C 802485BC 2A220018 */ slti $v0, $s1, 0x18 D_802485C0: /* 176EA0 802485C0 1440FFF1 */ bnez $v0, .L80248588 /* 176EA4 802485C4 26520004 */ addiu $s2, $s2, 0x4 D_802485C8: /* 176EA8 802485C8 16600003 */ bnez $s3, .L802485D8 /* 176EAC 802485CC 00000000 */ nop jtbl_802485D0: /* 176EB0 802485D0 0C090464 */ jal func_80241190 /* 176EB4 802485D4 24040005 */ addiu $a0, $zero, 0x5 .L802485D8: /* 176EB8 802485D8 8FBF0028 */ lw $ra, 0x28($sp) /* 176EBC 802485DC 8FB50024 */ lw $s5, 0x24($sp) /* 176EC0 802485E0 8FB40020 */ lw $s4, 0x20($sp) /* 176EC4 802485E4 8FB3001C */ lw $s3, 0x1C($sp) D_802485E8: /* 176EC8 802485E8 8FB20018 */ lw $s2, 0x18($sp) /* 176ECC 802485EC 8FB10014 */ lw $s1, 0x14($sp) .L802485F0: /* 176ED0 802485F0 8FB00010 */ lw $s0, 0x10($sp) .L802485F4: /* 176ED4 802485F4 03E00008 */ jr $ra /* 176ED8 802485F8 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_partner_striking_first(void) { PlayerData* playerData = &gPlayerData; BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; Actor* actor; s32 enemyNotDone; SelectableTarget* target; Evt* script; s32 level; s32 i; switch (gBattleSubState) { case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_INIT: D_8029F254 = 0; // setup dummy 'menu selection' for partner move level = partner->actorBlueprint->level; switch (playerData->currentPartner) { case PARTNER_KOOPER: battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER; battleStatus->moveArgument = 0; battleStatus->selectedMoveID = level + MOVE_SHELL_TOSS1; battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags; break; case PARTNER_BOMBETTE: battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER; battleStatus->moveArgument = 0; battleStatus->selectedMoveID = level + MOVE_BODY_SLAM1; battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags; break; } // let the enemy know a first strike is coming actor = get_actor(ACTOR_ENEMY0); if (actor->handleEventSource != NULL) { actor->lastEventType = EVENT_BEGIN_FIRST_STRIKE; script = start_script(actor->handleEventSource, EVT_PRIORITY_A, EVT_FLAG_RUN_IMMEDIATELY); actor->handleEventScript = script; actor->handleEventScriptID = script->id; script->owner1.actorID = actor->actorID; } gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_READY; break; case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_READY: player_create_target_list(partner); target = &partner->targetData[partner->targetIndexList[0]]; partner->targetActorID = target->actorID; partner->targetPartIndex = target->partID; battleStatus->stateFreezeCount = 0; battleStatus->lastAttackDamage = 0; battleStatus->currentDamageSource = DMG_SRC_DEFAULT; gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN; gBattleStatus.flags2 |= BS_FLAGS2_1000000; gBattleStatus.flags1 |= BS_FLAGS1_PARTNER_ACTING; increment_status_bar_disabled(); btl_cam_use_preset(BTL_CAM_PRESET_10); btl_cam_target_actor(ACTOR_PARTNER); reset_actor_turn_info(); // begin the partner turn script battleStatus->battlePhase = PHASE_FIRST_STRIKE; script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0); partner->takeTurnScript = script; partner->takeTurnScriptID = script->id; script->owner1.actorID = ACTOR_PARTNER; D_8029F248 = 3; gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_SCRIPTS; break; case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_SCRIPTS: if (D_8029F248 != 0) { D_8029F248--; } else { D_8029F254 = 1; } // wait for partner move script if (partner->takeTurnScript != NULL && does_script_exist(partner->takeTurnScriptID)) { break; } partner->takeTurnScript = NULL; // wait for partner handle event script if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) { break; } partner->handleEventScript = NULL; // wait for player handle event script if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) { break; } player->handleEventScript = NULL; // wait for all enemy turn scripts 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 handle event scripts 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) { decrement_status_bar_disabled(); if (btl_check_player_defeated() || btl_check_enemies_defeated()) { return; } actor = get_actor(partner->targetActorID); if (actor != NULL) { if (actor->handleEventSource != NULL) { actor->lastEventType = EVENT_END_FIRST_STRIKE; script = start_script(actor->handleEventSource, EVT_PRIORITY_A, EVT_FLAG_RUN_IMMEDIATELY); actor->handleEventScript = script; actor->handleEventScriptID = script->id; script->owner1.actorID = actor->actorID; } } gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_DONE; } break; case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_DONE: 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) { btl_set_state(BATTLE_STATE_BEGIN_TURN); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel star_spirits_energy_update /* 40C71C E012217C 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 40C720 E0122180 AFBF001C */ sw $ra, 0x1C($sp) /* 40C724 E0122184 AFB20018 */ sw $s2, 0x18($sp) /* 40C728 E0122188 AFB10014 */ sw $s1, 0x14($sp) /* 40C72C E012218C AFB00010 */ sw $s0, 0x10($sp) /* 40C730 E0122190 8C830000 */ lw $v1, 0x0($a0) /* 40C734 E0122194 8C90000C */ lw $s0, 0xC($a0) /* 40C738 E0122198 30620010 */ andi $v0, $v1, 0x10 /* 40C73C E012219C 8E120004 */ lw $s2, 0x4($s0) /* 40C740 E01221A0 10400005 */ beqz $v0, .LE01221B8 /* 40C744 E01221A4 2402FFEF */ addiu $v0, $zero, -0x11 /* 40C748 E01221A8 00621024 */ and $v0, $v1, $v0 /* 40C74C E01221AC AC820000 */ sw $v0, 0x0($a0) /* 40C750 E01221B0 24020010 */ addiu $v0, $zero, 0x10 /* 40C754 E01221B4 AE020014 */ sw $v0, 0x14($s0) .LE01221B8: /* 40C758 E01221B8 8E030014 */ lw $v1, 0x14($s0) /* 40C75C E01221BC 286203E8 */ slti $v0, $v1, 0x3E8 /* 40C760 E01221C0 10400002 */ beqz $v0, .LE01221CC /* 40C764 E01221C4 2462FFFF */ addiu $v0, $v1, -0x1 /* 40C768 E01221C8 AE020014 */ sw $v0, 0x14($s0) .LE01221CC: /* 40C76C E01221CC 8E020018 */ lw $v0, 0x18($s0) /* 40C770 E01221D0 8E030014 */ lw $v1, 0x14($s0) /* 40C774 E01221D4 24510001 */ addiu $s1, $v0, 0x1 /* 40C778 E01221D8 04610005 */ bgez $v1, .LE01221F0 /* 40C77C E01221DC AE110018 */ sw $s1, 0x18($s0) /* 40C780 E01221E0 0C080128 */ jal shim_remove_effect /* 40C784 E01221E4 00000000 */ nop /* 40C788 E01221E8 080489AB */ j .LE01226AC /* 40C78C E01221EC 00000000 */ nop .LE01221F0: /* 40C790 E01221F0 28620010 */ slti $v0, $v1, 0x10 /* 40C794 E01221F4 10400002 */ beqz $v0, .LE0122200 /* 40C798 E01221F8 00031100 */ sll $v0, $v1, 4 /* 40C79C E01221FC AE020028 */ sw $v0, 0x28($s0) .LE0122200: /* 40C7A0 E0122200 8E030070 */ lw $v1, 0x70($s0) /* 40C7A4 E0122204 24020004 */ addiu $v0, $zero, 0x4 /* 40C7A8 E0122208 106200D5 */ beq $v1, $v0, .LE0122560 /* 40C7AC E012220C 28620005 */ slti $v0, $v1, 0x5 /* 40C7B0 E0122210 10400007 */ beqz $v0, .LE0122230 /* 40C7B4 E0122214 24020005 */ addiu $v0, $zero, 0x5 /* 40C7B8 E0122218 1060000B */ beqz $v1, .LE0122248 /* 40C7BC E012221C 24020001 */ addiu $v0, $zero, 0x1 /* 40C7C0 E0122220 10620096 */ beq $v1, $v0, .LE012247C /* 40C7C4 E0122224 00000000 */ nop /* 40C7C8 E0122228 0804898B */ j .LE012262C /* 40C7CC E012222C 00000000 */ nop .LE0122230: /* 40C7D0 E0122230 106200FE */ beq $v1, $v0, .LE012262C /* 40C7D4 E0122234 24020064 */ addiu $v0, $zero, 0x64 /* 40C7D8 E0122238 10620040 */ beq $v1, $v0, .LE012233C /* 40C7DC E012223C 00000000 */ nop /* 40C7E0 E0122240 0804898B */ j .LE012262C /* 40C7E4 E0122244 00000000 */ nop .LE0122248: /* 40C7E8 E0122248 00111080 */ sll $v0, $s1, 2 /* 40C7EC E012224C 00511021 */ addu $v0, $v0, $s1 /* 40C7F0 E0122250 00021080 */ sll $v0, $v0, 2 /* 40C7F4 E0122254 44826000 */ mtc1 $v0, $f12 /* 40C7F8 E0122258 00000000 */ nop /* 40C7FC E012225C 46806320 */ cvt.s.w $f12, $f12 /* 40C800 E0122260 32230003 */ andi $v1, $s1, 0x3 /* 40C804 E0122264 00031100 */ sll $v0, $v1, 4 /* 40C808 E0122268 00431023 */ subu $v0, $v0, $v1 /* 40C80C E012226C 00021040 */ sll $v0, $v0, 1 /* 40C810 E0122270 8E030074 */ lw $v1, 0x74($s0) /* 40C814 E0122274 244200C8 */ addiu $v0, $v0, 0xC8 /* 40C818 E0122278 AE020050 */ sw $v0, 0x50($s0) /* 40C81C E012227C 24630001 */ addiu $v1, $v1, 0x1 /* 40C820 E0122280 0C080140 */ jal shim_sin_deg /* 40C824 E0122284 AE030074 */ sw $v1, 0x74($s0) /* 40C828 E0122288 3C01E012 */ lui $at, (0xE0122CA0 >> 16) /* 40C82C E012228C D4222CA0 */ ldc1 $f2, (0xE0122CA0 & 0xFFFF)($at) /* 40C830 E0122290 46000021 */ cvt.d.s $f0, $f0 /* 40C834 E0122294 46220002 */ mul.d $f0, $f0, $f2 /* 40C838 E0122298 00000000 */ nop /* 40C83C E012229C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 40C840 E01222A0 44811800 */ mtc1 $at, $f3 /* 40C844 E01222A4 44801000 */ mtc1 $zero, $f2 /* 40C848 E01222A8 00000000 */ nop /* 40C84C E01222AC 46220000 */ add.d $f0, $f0, $f2 /* 40C850 E01222B0 8E020000 */ lw $v0, 0x0($s0) /* 40C854 E01222B4 46200020 */ cvt.s.d $f0, $f0 /* 40C858 E01222B8 104000E8 */ beqz $v0, .LE012265C /* 40C85C E01222BC E6000040 */ swc1 $f0, 0x40($s0) /* 40C860 E01222C0 44916000 */ mtc1 $s1, $f12 /* 40C864 E01222C4 00000000 */ nop /* 40C868 E01222C8 0C080140 */ jal shim_sin_deg /* 40C86C E01222CC 46806320 */ cvt.s.w $f12, $f12 /* 40C870 E01222D0 3C01E012 */ lui $at, (0xE0122CA8 >> 16) /* 40C874 E01222D4 D4222CA8 */ ldc1 $f2, (0xE0122CA8 & 0xFFFF)($at) /* 40C878 E01222D8 44916000 */ mtc1 $s1, $f12 /* 40C87C E01222DC 00000000 */ nop /* 40C880 E01222E0 46806321 */ cvt.d.w $f12, $f12 /* 40C884 E01222E4 46226302 */ mul.d $f12, $f12, $f2 /* 40C888 E01222E8 00000000 */ nop /* 40C88C E01222EC C6020008 */ lwc1 $f2, 0x8($s0) /* 40C890 E01222F0 46001080 */ add.s $f2, $f2, $f0 /* 40C894 E01222F4 E6020008 */ swc1 $f2, 0x8($s0) /* 40C898 E01222F8 0C080144 */ jal shim_cos_deg /* 40C89C E01222FC 46206320 */ cvt.s.d $f12, $f12 /* 40C8A0 E0122300 C602000C */ lwc1 $f2, 0xC($s0) /* 40C8A4 E0122304 8E020074 */ lw $v0, 0x74($s0) /* 40C8A8 E0122308 46001080 */ add.s $f2, $f2, $f0 /* 40C8AC E012230C 28420033 */ slti $v0, $v0, 0x33 /* 40C8B0 E0122310 144000D2 */ bnez $v0, .LE012265C /* 40C8B4 E0122314 E602000C */ swc1 $f2, 0xC($s0) /* 40C8B8 E0122318 24020003 */ addiu $v0, $zero, 0x3 /* 40C8BC E012231C 16420004 */ bne $s2, $v0, .LE0122330 /* 40C8C0 E0122320 AE000074 */ sw $zero, 0x74($s0) /* 40C8C4 E0122324 24020064 */ addiu $v0, $zero, 0x64 /* 40C8C8 E0122328 08048997 */ j .LE012265C /* 40C8CC E012232C AE020070 */ sw $v0, 0x70($s0) .LE0122330: /* 40C8D0 E0122330 24020001 */ addiu $v0, $zero, 0x1 /* 40C8D4 E0122334 08048997 */ j .LE012265C /* 40C8D8 E0122338 AE020070 */ sw $v0, 0x70($s0) .LE012233C: /* 40C8DC E012233C 8E030074 */ lw $v1, 0x74($s0) /* 40C8E0 E0122340 10600005 */ beqz $v1, .LE0122358 /* 40C8E4 E0122344 24020001 */ addiu $v0, $zero, 0x1 /* 40C8E8 E0122348 10620007 */ beq $v1, $v0, .LE0122368 /* 40C8EC E012234C 240200FF */ addiu $v0, $zero, 0xFF /* 40C8F0 E0122350 080488DF */ j .LE012237C /* 40C8F4 E0122354 AE00004C */ sw $zero, 0x4C($s0) .LE0122358: /* 40C8F8 E0122358 3C014080 */ lui $at, (0x40800000 >> 16) /* 40C8FC E012235C 44810000 */ mtc1 $at, $f0 /* 40C900 E0122360 080488DC */ j .LE0122370 /* 40C904 E0122364 240200FF */ addiu $v0, $zero, 0xFF .LE0122368: /* 40C908 E0122368 3C014100 */ lui $at, (0x41000000 >> 16) /* 40C90C E012236C 44810000 */ mtc1 $at, $f0 .LE0122370: /* 40C910 E0122370 AE02005C */ sw $v0, 0x5C($s0) /* 40C914 E0122374 080488E0 */ j .LE0122380 /* 40C918 E0122378 E600004C */ swc1 $f0, 0x4C($s0) .LE012237C: /* 40C91C E012237C AE00005C */ sw $zero, 0x5C($s0) .LE0122380: /* 40C920 E0122380 8E040074 */ lw $a0, 0x74($s0) /* 40C924 E0122384 2882001E */ slti $v0, $a0, 0x1E /* 40C928 E0122388 10400017 */ beqz $v0, .LE01223E8 /* 40C92C E012238C 00041880 */ sll $v1, $a0, 2 /* 40C930 E0122390 3C02E012 */ lui $v0, %hi(D_E0122BA8) /* 40C934 E0122394 24422BA8 */ addiu $v0, $v0, %lo(D_E0122BA8) /* 40C938 E0122398 00621821 */ addu $v1, $v1, $v0 /* 40C93C E012239C 94620000 */ lhu $v0, 0x0($v1) /* 40C940 E01223A0 3C01E012 */ lui $at, (0xE0122CB0 >> 16) /* 40C944 E01223A4 D4202CB0 */ ldc1 $f0, (0xE0122CB0 & 0xFFFF)($at) /* 40C948 E01223A8 44821000 */ mtc1 $v0, $f2 /* 40C94C E01223AC 00000000 */ nop /* 40C950 E01223B0 468010A0 */ cvt.s.w $f2, $f2 /* 40C954 E01223B4 460010A1 */ cvt.d.s $f2, $f2 /* 40C958 E01223B8 46201082 */ mul.d $f2, $f2, $f0 /* 40C95C E01223BC 00000000 */ nop /* 40C960 E01223C0 3C01E012 */ lui $at, (0xE0122CB8 >> 16) /* 40C964 E01223C4 D4242CB8 */ ldc1 $f4, (0xE0122CB8 & 0xFFFF)($at) /* 40C968 E01223C8 44840000 */ mtc1 $a0, $f0 /* 40C96C E01223CC 00000000 */ nop /* 40C970 E01223D0 46800021 */ cvt.d.w $f0, $f0 /* 40C974 E01223D4 46240002 */ mul.d $f0, $f0, $f4 /* 40C978 E01223D8 00000000 */ nop /* 40C97C E01223DC 90620003 */ lbu $v0, 0x3($v1) /* 40C980 E01223E0 0804890E */ j .LE0122438 /* 40C984 E01223E4 46201080 */ add.d $f2, $f2, $f0 .LE01223E8: /* 40C988 E01223E8 3C03E012 */ lui $v1, %hi(D_E0122BA8) /* 40C98C E01223EC 24632BA8 */ addiu $v1, $v1, %lo(D_E0122BA8) /* 40C990 E01223F0 94620074 */ lhu $v0, 0x74($v1) /* 40C994 E01223F4 3C01E012 */ lui $at, (0xE0122CC0 >> 16) /* 40C998 E01223F8 D4202CC0 */ ldc1 $f0, (0xE0122CC0 & 0xFFFF)($at) /* 40C99C E01223FC 44821000 */ mtc1 $v0, $f2 /* 40C9A0 E0122400 00000000 */ nop /* 40C9A4 E0122404 468010A0 */ cvt.s.w $f2, $f2 /* 40C9A8 E0122408 460010A1 */ cvt.d.s $f2, $f2 /* 40C9AC E012240C 46201082 */ mul.d $f2, $f2, $f0 /* 40C9B0 E0122410 00000000 */ nop /* 40C9B4 E0122414 3C01E012 */ lui $at, (0xE0122CC8 >> 16) /* 40C9B8 E0122418 D4242CC8 */ ldc1 $f4, (0xE0122CC8 & 0xFFFF)($at) /* 40C9BC E012241C 44840000 */ mtc1 $a0, $f0 /* 40C9C0 E0122420 00000000 */ nop /* 40C9C4 E0122424 46800021 */ cvt.d.w $f0, $f0 /* 40C9C8 E0122428 46240002 */ mul.d $f0, $f0, $f4 /* 40C9CC E012242C 00000000 */ nop /* 40C9D0 E0122430 46201080 */ add.d $f2, $f2, $f0 /* 40C9D4 E0122434 90620077 */ lbu $v0, 0x77($v1) .LE0122438: /* 40C9D8 E0122438 46201020 */ cvt.s.d $f0, $f2 /* 40C9DC E012243C 3C01E012 */ lui $at, (0xE0122CD0 >> 16) /* 40C9E0 E0122440 D4222CD0 */ ldc1 $f2, (0xE0122CD0 & 0xFFFF)($at) /* 40C9E4 E0122444 304200FF */ andi $v0, $v0, 0xFF /* 40C9E8 E0122448 AE020054 */ sw $v0, 0x54($s0) /* 40C9EC E012244C AE020058 */ sw $v0, 0x58($s0) /* 40C9F0 E0122450 8E020074 */ lw $v0, 0x74($s0) /* 40C9F4 E0122454 E6000044 */ swc1 $f0, 0x44($s0) /* 40C9F8 E0122458 46000021 */ cvt.d.s $f0, $f0 /* 40C9FC E012245C AE000050 */ sw $zero, 0x50($s0) /* 40CA00 E0122460 AE000040 */ sw $zero, 0x40($s0) /* 40CA04 E0122464 46220000 */ add.d $f0, $f0, $f2 /* 40CA08 E0122468 24420001 */ addiu $v0, $v0, 0x1 /* 40CA0C E012246C AE020074 */ sw $v0, 0x74($s0) /* 40CA10 E0122470 46200020 */ cvt.s.d $f0, $f0 /* 40CA14 E0122474 08048997 */ j .LE012265C /* 40CA18 E0122478 E6000048 */ swc1 $f0, 0x48($s0) .LE012247C: /* 40CA1C E012247C 8E020074 */ lw $v0, 0x74($s0) /* 40CA20 E0122480 10400005 */ beqz $v0, .LE0122498 /* 40CA24 E0122484 00000000 */ nop /* 40CA28 E0122488 10430007 */ beq $v0, $v1, .LE01224A8 /* 40CA2C E012248C 240200FF */ addiu $v0, $zero, 0xFF /* 40CA30 E0122490 0804892F */ j .LE01224BC /* 40CA34 E0122494 AE00004C */ sw $zero, 0x4C($s0) .LE0122498: /* 40CA38 E0122498 3C014080 */ lui $at, (0x40800000 >> 16) /* 40CA3C E012249C 44810000 */ mtc1 $at, $f0 /* 40CA40 E01224A0 0804892C */ j .LE01224B0 /* 40CA44 E01224A4 240200FF */ addiu $v0, $zero, 0xFF .LE01224A8: /* 40CA48 E01224A8 3C014100 */ lui $at, (0x41000000 >> 16) /* 40CA4C E01224AC 44810000 */ mtc1 $at, $f0 .LE01224B0: /* 40CA50 E01224B0 AE02005C */ sw $v0, 0x5C($s0) /* 40CA54 E01224B4 08048930 */ j .LE01224C0 /* 40CA58 E01224B8 E600004C */ swc1 $f0, 0x4C($s0) .LE01224BC: /* 40CA5C E01224BC AE00005C */ sw $zero, 0x5C($s0) .LE01224C0: /* 40CA60 E01224C0 8E030074 */ lw $v1, 0x74($s0) /* 40CA64 E01224C4 3C02E012 */ lui $v0, %hi(D_E0122BA8) /* 40CA68 E01224C8 24422BA8 */ addiu $v0, $v0, %lo(D_E0122BA8) /* 40CA6C E01224CC 00031880 */ sll $v1, $v1, 2 /* 40CA70 E01224D0 00621821 */ addu $v1, $v1, $v0 /* 40CA74 E01224D4 94620000 */ lhu $v0, 0x0($v1) /* 40CA78 E01224D8 3C01E012 */ lui $at, (0xE0122CD8 >> 16) /* 40CA7C E01224DC D4202CD8 */ ldc1 $f0, (0xE0122CD8 & 0xFFFF)($at) /* 40CA80 E01224E0 44821000 */ mtc1 $v0, $f2 /* 40CA84 E01224E4 00000000 */ nop /* 40CA88 E01224E8 468010A0 */ cvt.s.w $f2, $f2 /* 40CA8C E01224EC 460010A1 */ cvt.d.s $f2, $f2 /* 40CA90 E01224F0 46201082 */ mul.d $f2, $f2, $f0 /* 40CA94 E01224F4 00000000 */ nop /* 40CA98 E01224F8 3C01E012 */ lui $at, (0xE0122CE0 >> 16) /* 40CA9C E01224FC D4242CE0 */ ldc1 $f4, (0xE0122CE0 & 0xFFFF)($at) /* 40CAA0 E0122500 90630003 */ lbu $v1, 0x3($v1) /* 40CAA4 E0122504 AE000050 */ sw $zero, 0x50($s0) /* 40CAA8 E0122508 AE000040 */ sw $zero, 0x40($s0) /* 40CAAC E012250C 462010A0 */ cvt.s.d $f2, $f2 /* 40CAB0 E0122510 46001021 */ cvt.d.s $f0, $f2 /* 40CAB4 E0122514 46240002 */ mul.d $f0, $f0, $f4 /* 40CAB8 E0122518 00000000 */ nop /* 40CABC E012251C 8E020074 */ lw $v0, 0x74($s0) /* 40CAC0 E0122520 306300FF */ andi $v1, $v1, 0xFF /* 40CAC4 E0122524 AE030054 */ sw $v1, 0x54($s0) /* 40CAC8 E0122528 AE030058 */ sw $v1, 0x58($s0) /* 40CACC E012252C 3C014010 */ lui $at, (0x40100000 >> 16) /* 40CAD0 E0122530 44812800 */ mtc1 $at, $f5 /* 40CAD4 E0122534 44802000 */ mtc1 $zero, $f4 /* 40CAD8 E0122538 24420001 */ addiu $v0, $v0, 0x1 /* 40CADC E012253C AE020074 */ sw $v0, 0x74($s0) /* 40CAE0 E0122540 46240000 */ add.d $f0, $f0, $f4 /* 40CAE4 E0122544 2842001E */ slti $v0, $v0, 0x1E /* 40CAE8 E0122548 E6020044 */ swc1 $f2, 0x44($s0) /* 40CAEC E012254C 46200020 */ cvt.s.d $f0, $f0 /* 40CAF0 E0122550 14400042 */ bnez $v0, .LE012265C /* 40CAF4 E0122554 E6000048 */ swc1 $f0, 0x48($s0) /* 40CAF8 E0122558 08048988 */ j .LE0122620 /* 40CAFC E012255C 24020004 */ addiu $v0, $zero, 0x4 .LE0122560: /* 40CB00 E0122560 8E030074 */ lw $v1, 0x74($s0) /* 40CB04 E0122564 2402001D */ addiu $v0, $zero, 0x1D /* 40CB08 E0122568 00431823 */ subu $v1, $v0, $v1 /* 40CB0C E012256C 10600005 */ beqz $v1, .LE0122584 /* 40CB10 E0122570 24020001 */ addiu $v0, $zero, 0x1 /* 40CB14 E0122574 10620007 */ beq $v1, $v0, .LE0122594 /* 40CB18 E0122578 240200FF */ addiu $v0, $zero, 0xFF /* 40CB1C E012257C 0804896A */ j .LE01225A8 /* 40CB20 E0122580 AE00004C */ sw $zero, 0x4C($s0) .LE0122584: /* 40CB24 E0122584 3C014080 */ lui $at, (0x40800000 >> 16) /* 40CB28 E0122588 44810000 */ mtc1 $at, $f0 /* 40CB2C E012258C 08048967 */ j .LE012259C /* 40CB30 E0122590 240200FF */ addiu $v0, $zero, 0xFF .LE0122594: /* 40CB34 E0122594 3C014100 */ lui $at, (0x41000000 >> 16) /* 40CB38 E0122598 44810000 */ mtc1 $at, $f0 .LE012259C: /* 40CB3C E012259C AE02005C */ sw $v0, 0x5C($s0) /* 40CB40 E01225A0 0804896B */ j .LE01225AC /* 40CB44 E01225A4 E600004C */ swc1 $f0, 0x4C($s0) .LE01225A8: /* 40CB48 E01225A8 AE00005C */ sw $zero, 0x5C($s0) .LE01225AC: /* 40CB4C E01225AC 3C03E012 */ lui $v1, %hi(D_E0122C20) /* 40CB50 E01225B0 24632C20 */ addiu $v1, $v1, %lo(D_E0122C20) /* 40CB54 E01225B4 8E020074 */ lw $v0, 0x74($s0) /* 40CB58 E01225B8 3C01E012 */ lui $at, (0xE0122CE8 >> 16) /* 40CB5C E01225BC D4222CE8 */ ldc1 $f2, (0xE0122CE8 & 0xFFFF)($at) /* 40CB60 E01225C0 00021080 */ sll $v0, $v0, 2 /* 40CB64 E01225C4 00431021 */ addu $v0, $v0, $v1 /* 40CB68 E01225C8 94430000 */ lhu $v1, 0x0($v0) /* 40CB6C E01225CC 90440003 */ lbu $a0, 0x3($v0) /* 40CB70 E01225D0 8E020074 */ lw $v0, 0x74($s0) /* 40CB74 E01225D4 AE000050 */ sw $zero, 0x50($s0) /* 40CB78 E01225D8 AE000040 */ sw $zero, 0x40($s0) /* 40CB7C E01225DC 44830000 */ mtc1 $v1, $f0 /* 40CB80 E01225E0 00000000 */ nop /* 40CB84 E01225E4 46800020 */ cvt.s.w $f0, $f0 /* 40CB88 E01225E8 46000021 */ cvt.d.s $f0, $f0 /* 40CB8C E01225EC 46220002 */ mul.d $f0, $f0, $f2 /* 40CB90 E01225F0 00000000 */ nop /* 40CB94 E01225F4 AE000058 */ sw $zero, 0x58($s0) /* 40CB98 E01225F8 AE000048 */ sw $zero, 0x48($s0) /* 40CB9C E01225FC 24420001 */ addiu $v0, $v0, 0x1 /* 40CBA0 E0122600 308400FF */ andi $a0, $a0, 0xFF /* 40CBA4 E0122604 AE020074 */ sw $v0, 0x74($s0) /* 40CBA8 E0122608 2842001E */ slti $v0, $v0, 0x1E /* 40CBAC E012260C AE040054 */ sw $a0, 0x54($s0) /* 40CBB0 E0122610 46200020 */ cvt.s.d $f0, $f0 /* 40CBB4 E0122614 14400011 */ bnez $v0, .LE012265C /* 40CBB8 E0122618 E6000044 */ swc1 $f0, 0x44($s0) /* 40CBBC E012261C 24020005 */ addiu $v0, $zero, 0x5 .LE0122620: /* 40CBC0 E0122620 AE000074 */ sw $zero, 0x74($s0) /* 40CBC4 E0122624 08048997 */ j .LE012265C /* 40CBC8 E0122628 AE020070 */ sw $v0, 0x70($s0) .LE012262C: /* 40CBCC E012262C 8E020074 */ lw $v0, 0x74($s0) /* 40CBD0 E0122630 AE000040 */ sw $zero, 0x40($s0) /* 40CBD4 E0122634 AE000044 */ sw $zero, 0x44($s0) /* 40CBD8 E0122638 AE000048 */ sw $zero, 0x48($s0) /* 40CBDC E012263C AE000050 */ sw $zero, 0x50($s0) /* 40CBE0 E0122640 AE000054 */ sw $zero, 0x54($s0) /* 40CBE4 E0122644 AE000058 */ sw $zero, 0x58($s0) /* 40CBE8 E0122648 AE00004C */ sw $zero, 0x4C($s0) /* 40CBEC E012264C AE00005C */ sw $zero, 0x5C($s0) /* 40CBF0 E0122650 AE00004C */ sw $zero, 0x4C($s0) /* 40CBF4 E0122654 24420001 */ addiu $v0, $v0, 0x1 /* 40CBF8 E0122658 AE020074 */ sw $v0, 0x74($s0) .LE012265C: /* 40CBFC E012265C 0000202D */ daddu $a0, $zero, $zero /* 40CC00 E0122660 240500FF */ addiu $a1, $zero, 0xFF /* 40CC04 E0122664 44801000 */ mtc1 $zero, $f2 /* 40CC08 E0122668 0200182D */ daddu $v1, $s0, $zero .LE012266C: /* 40CC0C E012266C 8C620050 */ lw $v0, 0x50($v1) /* 40CC10 E0122670 28420100 */ slti $v0, $v0, 0x100 /* 40CC14 E0122674 50400001 */ beql $v0, $zero, .LE012267C /* 40CC18 E0122678 AC650050 */ sw $a1, 0x50($v1) .LE012267C: /* 40CC1C E012267C 8C620050 */ lw $v0, 0x50($v1) /* 40CC20 E0122680 04420001 */ bltzl $v0, .LE0122688 /* 40CC24 E0122684 AC600050 */ sw $zero, 0x50($v1) .LE0122688: /* 40CC28 E0122688 C4600040 */ lwc1 $f0, 0x40($v1) /* 40CC2C E012268C 4602003C */ c.lt.s $f0, $f2 /* 40CC30 E0122690 00000000 */ nop /* 40CC34 E0122694 45030001 */ bc1tl .LE012269C /* 40CC38 E0122698 E4620040 */ swc1 $f2, 0x40($v1) .LE012269C: /* 40CC3C E012269C 24840001 */ addiu $a0, $a0, 0x1 /* 40CC40 E01226A0 28820004 */ slti $v0, $a0, 0x4 /* 40CC44 E01226A4 1440FFF1 */ bnez $v0, .LE012266C /* 40CC48 E01226A8 24630004 */ addiu $v1, $v1, 0x4 .LE01226AC: /* 40CC4C E01226AC 8FBF001C */ lw $ra, 0x1C($sp) /* 40CC50 E01226B0 8FB20018 */ lw $s2, 0x18($sp) /* 40CC54 E01226B4 8FB10014 */ lw $s1, 0x14($sp) /* 40CC58 E01226B8 8FB00010 */ lw $s0, 0x10($sp) /* 40CC5C E01226BC 03E00008 */ jr $ra /* 40CC60 E01226C0 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void star_spirits_energy_update(EffectInstance* effect) { StarSpiritsEnergyFXData* data = effect->data.starSpiritsEnergy; s32 unk_04 = data->unk_04; s32 unk_18; s32 i; f32 var_float_1; f32 var_float_2; f32 var_float_3; u8 var_int_1; u8 var_int_2; u8 var_int_3; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->unk_14 = 16; } if (data->unk_14 < 1000) { data->unk_14--; } data->unk_18++; if (data->unk_14 < 0) { shim_remove_effect(effect); return; } unk_18 = data->unk_18; if (data->unk_14 < 16) { data->unk_28 = data->unk_14 * 16; } switch (data->unk_70) { case 0: data->unk_50[0] = (unk_18 & 3) * 30 + 200; data->unk_74++; data->unk_40[0] = shim_sin_deg(unk_18 * 20) * 0.04 + 0.5; if (data->unk_00 != 0) { data->unk_08 += shim_sin_deg(unk_18); data->unk_0C += shim_cos_deg(unk_18 * 1.235631); if (data->unk_74 > 50) { data->unk_74 = 0; if (unk_04 == 3) { data->unk_70 = 100; } else { data->unk_70 = 1; } } } break; case 100: switch (data->unk_74) { case 0: data->unk_40[3] = 4.0f; data->unk_50[3] = 255; break; case 1: data->unk_40[3] = 8.0f; data->unk_50[3] = 255; break; default: data->unk_40[3] = 0.0f; data->unk_50[3] = 0; break; } if (data->unk_74 < 30) { var_float_1 = (f32) D_E0122BA8[data->unk_74].unk_00 * 0.01 + data->unk_74 * 0.3; var_int_1 = D_E0122BA8[data->unk_74].unk_03; } else { var_float_1 = (f32) D_E0122BA8[29].unk_00 * 0.01 + data->unk_74 * 0.3; var_int_1 = D_E0122BA8[29].unk_03; } data->unk_40[0] = data->unk_50[0] = 0; data->unk_50[1] = var_int_1; data->unk_50[2] = var_int_1; data->unk_40[1] = var_float_1; data->unk_40[2] = var_float_1 + 0.6; data->unk_74++; break; case 1: switch (data->unk_74) { case 0: data->unk_40[3] = 4.0f; data->unk_50[3] = 255; break; case 1: data->unk_40[3] = 8.0f; data->unk_50[3] = 255; break; default: data->unk_40[3] = 0.0f; data->unk_50[3] = 0; break; } var_float_2 = (f32) D_E0122BA8[data->unk_74].unk_00 * 0.01; var_int_2 = D_E0122BA8[data->unk_74].unk_03; data->unk_40[0] = data->unk_50[0] = 0; data->unk_50[1] = var_int_2; data->unk_50[2] = var_int_2; data->unk_40[1] = var_float_2; data->unk_40[2] = var_float_2 * 1.2 + 4.0; data->unk_74++; if (data->unk_74 >= 30) { data->unk_74 = 0; data->unk_70 = 4; } break; case 4: switch (29 - data->unk_74) { case 0: data->unk_40[3] = 4.0f; data->unk_50[3] = 255; break; case 1: data->unk_40[3] = 8.0f; data->unk_50[3] = 255; break; default: data->unk_40[3] = 0; data->unk_50[3] = 0; break; } var_float_3 = (f32) D_E0122C20[data->unk_74].unk_00 * 0.01; var_int_3 = D_E0122C20[data->unk_74].unk_03; data->unk_40[0] = data->unk_50[0] = 0; data->unk_50[1] = var_int_3; data->unk_50[2] = 0; data->unk_40[1] = var_float_3; data->unk_40[2] = 0.0f; data->unk_74++; if (data->unk_74 >= 30) { data->unk_74 = 0; data->unk_70 = 5; } break; case 5: default: data->unk_40[0] = 0.0f; data->unk_40[1] = 0.0f; data->unk_40[2] = 0.0f; data->unk_50[0] = 0; data->unk_50[1] = 0; data->unk_50[2] = 0; data->unk_40[3] = 0; data->unk_50[3] = 0; data->unk_40[3] = 0; data->unk_74++; break; } for (i = 0; i < 4; i++) { if (data->unk_50[i] > 255) { data->unk_50[i] = 255; } if (data->unk_50[i] < 0) { data->unk_50[i] = 0; } if (data->unk_40[i] < 0.0f) { data->unk_40[i] = 0.0f; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel gfx_task_main /* 1564 80026164 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 1568 80026168 3C048007 */ lui $a0, %hi(gCurrentDisplayContextIndex) /* 156C 8002616C 8C8441F4 */ lw $a0, %lo(gCurrentDisplayContextIndex)($a0) /* 1570 80026170 3C058016 */ lui $a1, %hi(D_80164000) /* 1574 80026174 24A54000 */ addiu $a1, $a1, %lo(D_80164000) /* 1578 80026178 AFB20020 */ sw $s2, 0x20($sp) /* 157C 8002617C 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 1580 80026180 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 1584 80026184 AFBF003C */ sw $ra, 0x3C($sp) /* 1588 80026188 AFBE0038 */ sw $fp, 0x38($sp) /* 158C 8002618C AFB70034 */ sw $s7, 0x34($sp) /* 1590 80026190 AFB60030 */ sw $s6, 0x30($sp) /* 1594 80026194 AFB5002C */ sw $s5, 0x2C($sp) /* 1598 80026198 AFB40028 */ sw $s4, 0x28($sp) /* 159C 8002619C AFB30024 */ sw $s3, 0x24($sp) /* 15A0 800261A0 AFB1001C */ sw $s1, 0x1C($sp) /* 15A4 800261A4 AFB00018 */ sw $s0, 0x18($sp) /* 15A8 800261A8 3C018007 */ lui $at, %hi(gMatrixListPos) /* 15AC 800261AC A42041F0 */ sh $zero, %lo(gMatrixListPos)($at) /* 15B0 800261B0 00041040 */ sll $v0, $a0, 1 /* 15B4 800261B4 00441021 */ addu $v0, $v0, $a0 /* 15B8 800261B8 000210C0 */ sll $v0, $v0, 3 /* 15BC 800261BC 00441021 */ addu $v0, $v0, $a0 /* 15C0 800261C0 00021980 */ sll $v1, $v0, 6 /* 15C4 800261C4 00431021 */ addu $v0, $v0, $v1 /* 15C8 800261C8 00021080 */ sll $v0, $v0, 2 /* 15CC 800261CC 00441023 */ subu $v0, $v0, $a0 /* 15D0 800261D0 00021100 */ sll $v0, $v0, 4 /* 15D4 800261D4 00451021 */ addu $v0, $v0, $a1 /* 15D8 800261D8 3C01800A */ lui $at, %hi(gDisplayContext) /* 15DC 800261DC AC22A674 */ sw $v0, %lo(gDisplayContext)($at) /* 15E0 800261E0 24420230 */ addiu $v0, $v0, 0x230 /* 15E4 800261E4 AE420000 */ sw $v0, 0x0($s2) /* 15E8 800261E8 3C118007 */ lui $s1, %hi(D_80073E04) /* 15EC 800261EC 8E313E04 */ lw $s1, %lo(D_80073E04)($s1) /* 15F0 800261F0 0C009C68 */ jal gfx_init_state /* 15F4 800261F4 3C13070F */ lui $s3, (0x70FE01C >> 16) /* 15F8 800261F8 3C06FF10 */ lui $a2, (0xFF10013F >> 16) /* 15FC 800261FC 34C6013F */ ori $a2, $a2, (0xFF10013F & 0xFFFF) /* 1600 80026200 3C02FE00 */ lui $v0, (0xFE000000 >> 16) /* 1604 80026204 8E500000 */ lw $s0, 0x0($s2) /* 1608 80026208 3C038000 */ lui $v1, (0x80000000 >> 16) /* 160C 8002620C 0200282D */ daddu $a1, $s0, $zero /* 1610 80026210 26100008 */ addiu $s0, $s0, 0x8 /* 1614 80026214 AE500000 */ sw $s0, 0x0($s2) /* 1618 80026218 ACA20000 */ sw $v0, 0x0($a1) /* 161C 8002621C 3C02800A */ lui $v0, %hi(nuGfxZBuffer) /* 1620 80026220 8C42A5DC */ lw $v0, %lo(nuGfxZBuffer)($v0) /* 1624 80026224 0220202D */ daddu $a0, $s1, $zero /* 1628 80026228 00431021 */ addu $v0, $v0, $v1 /* 162C 8002622C ACA20004 */ sw $v0, 0x4($a1) /* 1630 80026230 26020008 */ addiu $v0, $s0, 0x8 /* 1634 80026234 AE420000 */ sw $v0, 0x0($s2) /* 1638 80026238 0C0187A4 */ jal osVirtualToPhysical /* 163C 8002623C AE060000 */ sw $a2, 0x0($s0) /* 1640 80026240 3C050050 */ lui $a1, (0x5003C0 >> 16) /* 1644 80026244 34A503C0 */ ori $a1, $a1, (0x5003C0 & 0xFFFF) /* 1648 80026248 3C06D700 */ lui $a2, (0xD7000002 >> 16) /* 164C 8002624C 34C60002 */ ori $a2, $a2, (0xD7000002 & 0xFFFF) /* 1650 80026250 3C07E300 */ lui $a3, (0xE3000A01 >> 16) /* 1654 80026254 34E70A01 */ ori $a3, $a3, (0xE3000A01 & 0xFFFF) /* 1658 80026258 3C08E300 */ lui $t0, (0xE3000C00 >> 16) /* 165C 8002625C 35080C00 */ ori $t0, $t0, (0xE3000C00 & 0xFFFF) /* 1660 80026260 3C09E300 */ lui $t1, (0xE3001001 >> 16) /* 1664 80026264 35291001 */ ori $t1, $t1, (0xE3001001 & 0xFFFF) /* 1668 80026268 3C0BE200 */ lui $t3, (0xE200001C >> 16) /* 166C 8002626C 356B001C */ ori $t3, $t3, (0xE200001C & 0xFFFF) /* 1670 80026270 3C0A0F0A */ lui $t2, (0xF0A4000 >> 16) /* 1674 80026274 354A4000 */ ori $t2, $t2, (0xF0A4000 & 0xFFFF) /* 1678 80026278 3C0CE300 */ lui $t4, (0xE3001201 >> 16) /* 167C 8002627C 358C1201 */ ori $t4, $t4, (0xE3001201 & 0xFFFF) /* 1680 80026280 3C0DFCFF */ lui $t5, (0xFCFFFFFF >> 16) /* 1684 80026284 35ADFFFF */ ori $t5, $t5, (0xFCFFFFFF & 0xFFFF) /* 1688 80026288 3C0EE200 */ lui $t6, (0xE2001E01 >> 16) /* 168C 8002628C 35CE1E01 */ ori $t6, $t6, (0xE2001E01 & 0xFFFF) /* 1690 80026290 3C0FFD88 */ lui $t7, (0xFD88003F >> 16) /* 1694 80026294 35EF003F */ ori $t7, $t7, (0xFD88003F & 0xFFFF) /* 1698 80026298 3C11F588 */ lui $s1, (0xF5881000 >> 16) /* 169C 8002629C 36311000 */ ori $s1, $s1, (0xF5881000 & 0xFFFF) /* 16A0 800262A0 3673E01C */ ori $s3, $s3, (0x70FE01C & 0xFFFF) /* 16A4 800262A4 3C14F580 */ lui $s4, (0xF5801000 >> 16) /* 16A8 800262A8 36941000 */ ori $s4, $s4, (0xF5801000 & 0xFFFF) /* 16AC 800262AC 3C15001F */ lui $s5, (0x1FC01C >> 16) /* 16B0 800262B0 36B5C01C */ ori $s5, $s5, (0x1FC01C & 0xFFFF) /* 16B4 800262B4 0000B02D */ daddu $s6, $zero, $zero /* 16B8 800262B8 3C17E400 */ lui $s7, (0xE4000000 >> 16) /* 16BC 800262BC 3C19E100 */ lui $t9, (0xE1000000 >> 16) /* 16C0 800262C0 3C18F100 */ lui $t8, (0xF1000000 >> 16) /* 16C4 800262C4 8E430000 */ lw $v1, 0x0($s2) /* 16C8 800262C8 241E0098 */ addiu $fp, $zero, 0x98 /* 16CC 800262CC AE020004 */ sw $v0, 0x4($s0) /* 16D0 800262D0 3C02ED00 */ lui $v0, (0xED000000 >> 16) /* 16D4 800262D4 0060202D */ daddu $a0, $v1, $zero /* 16D8 800262D8 24630008 */ addiu $v1, $v1, 0x8 /* 16DC 800262DC AE430000 */ sw $v1, 0x0($s2) /* 16E0 800262E0 AC820000 */ sw $v0, 0x0($a0) /* 16E4 800262E4 24620008 */ addiu $v0, $v1, 0x8 /* 16E8 800262E8 AC850004 */ sw $a1, 0x4($a0) /* 16EC 800262EC AE420000 */ sw $v0, 0x0($s2) /* 16F0 800262F0 2402FFFF */ addiu $v0, $zero, -0x1 /* 16F4 800262F4 AC620004 */ sw $v0, 0x4($v1) /* 16F8 800262F8 24620010 */ addiu $v0, $v1, 0x10 /* 16FC 800262FC AC660000 */ sw $a2, 0x0($v1) /* 1700 80026300 AE420000 */ sw $v0, 0x0($s2) /* 1704 80026304 24620018 */ addiu $v0, $v1, 0x18 /* 1708 80026308 AC670008 */ sw $a3, 0x8($v1) /* 170C 8002630C AC60000C */ sw $zero, 0xC($v1) /* 1710 80026310 AE420000 */ sw $v0, 0x0($s2) /* 1714 80026314 24620020 */ addiu $v0, $v1, 0x20 /* 1718 80026318 AC680010 */ sw $t0, 0x10($v1) /* 171C 8002631C AC600014 */ sw $zero, 0x14($v1) /* 1720 80026320 AE420000 */ sw $v0, 0x0($s2) /* 1724 80026324 24620028 */ addiu $v0, $v1, 0x28 /* 1728 80026328 AC690018 */ sw $t1, 0x18($v1) /* 172C 8002632C AC60001C */ sw $zero, 0x1C($v1) /* 1730 80026330 AE420000 */ sw $v0, 0x0($s2) /* 1734 80026334 24620030 */ addiu $v0, $v1, 0x30 /* 1738 80026338 AC6B0020 */ sw $t3, 0x20($v1) /* 173C 8002633C AC6A0024 */ sw $t2, 0x24($v1) /* 1740 80026340 AE420000 */ sw $v0, 0x0($s2) /* 1744 80026344 24620038 */ addiu $v0, $v1, 0x38 /* 1748 80026348 AC6C0028 */ sw $t4, 0x28($v1) /* 174C 8002634C AC60002C */ sw $zero, 0x2C($v1) /* 1750 80026350 AE420000 */ sw $v0, 0x0($s2) /* 1754 80026354 2402F3F9 */ addiu $v0, $zero, -0xC07 /* 1758 80026358 AC620034 */ sw $v0, 0x34($v1) /* 175C 8002635C 24620040 */ addiu $v0, $v1, 0x40 /* 1760 80026360 AC6D0030 */ sw $t5, 0x30($v1) /* 1764 80026364 AE420000 */ sw $v0, 0x0($s2) /* 1768 80026368 24020001 */ addiu $v0, $zero, 0x1 /* 176C 8002636C AC62003C */ sw $v0, 0x3C($v1) /* 1770 80026370 24620048 */ addiu $v0, $v1, 0x48 /* 1774 80026374 AC6E0038 */ sw $t6, 0x38($v1) /* 1778 80026378 AE420000 */ sw $v0, 0x0($s2) /* 177C 8002637C 3C02F900 */ lui $v0, (0xF9000000 >> 16) /* 1780 80026380 AC620040 */ sw $v0, 0x40($v1) /* 1784 80026384 2402007F */ addiu $v0, $zero, 0x7F /* 1788 80026388 AC620044 */ sw $v0, 0x44($v1) /* 178C 8002638C 24620050 */ addiu $v0, $v1, 0x50 /* 1790 80026390 AE420000 */ sw $v0, 0x0($s2) /* 1794 80026394 3C028007 */ lui $v0, %hi(D_80073E10) /* 1798 80026398 24423E10 */ addiu $v0, $v0, %lo(D_80073E10) /* 179C 8002639C AC6F0048 */ sw $t7, 0x48($v1) /* 17A0 800263A0 AC62004C */ sw $v0, 0x4C($v1) /* 17A4 800263A4 24620058 */ addiu $v0, $v1, 0x58 /* 17A8 800263A8 AE420000 */ sw $v0, 0x0($s2) /* 17AC 800263AC 3C020700 */ lui $v0, (0x7000000 >> 16) /* 17B0 800263B0 AC620054 */ sw $v0, 0x54($v1) /* 17B4 800263B4 24620060 */ addiu $v0, $v1, 0x60 /* 17B8 800263B8 AC710050 */ sw $s1, 0x50($v1) /* 17BC 800263BC AE420000 */ sw $v0, 0x0($s2) /* 17C0 800263C0 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 17C4 800263C4 AC620058 */ sw $v0, 0x58($v1) /* 17C8 800263C8 24620068 */ addiu $v0, $v1, 0x68 /* 17CC 800263CC AC60005C */ sw $zero, 0x5C($v1) /* 17D0 800263D0 AE420000 */ sw $v0, 0x0($s2) /* 17D4 800263D4 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* 17D8 800263D8 AC620060 */ sw $v0, 0x60($v1) /* 17DC 800263DC 24620070 */ addiu $v0, $v1, 0x70 /* 17E0 800263E0 AC730064 */ sw $s3, 0x64($v1) /* 17E4 800263E4 AE420000 */ sw $v0, 0x0($s2) /* 17E8 800263E8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 17EC 800263EC AC620068 */ sw $v0, 0x68($v1) /* 17F0 800263F0 24620078 */ addiu $v0, $v1, 0x78 /* 17F4 800263F4 AC60006C */ sw $zero, 0x6C($v1) /* 17F8 800263F8 AE420000 */ sw $v0, 0x0($s2) /* 17FC 800263FC 24620080 */ addiu $v0, $v1, 0x80 /* 1800 80026400 AC740070 */ sw $s4, 0x70($v1) /* 1804 80026404 AC600074 */ sw $zero, 0x74($v1) /* 1808 80026408 AE420000 */ sw $v0, 0x0($s2) /* 180C 8002640C 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 1810 80026410 AC620078 */ sw $v0, 0x78($v1) /* 1814 80026414 AC75007C */ sw $s5, 0x7C($v1) /* 1818 80026418 0000702D */ daddu $t6, $zero, $zero .L8002641C: /* 181C 8002641C 00161C00 */ sll $v1, $s6, 16 /* 1820 80026420 00031C03 */ sra $v1, $v1, 16 /* 1824 80026424 2474000E */ addiu $s4, $v1, 0xE /* 1828 80026428 000318C0 */ sll $v1, $v1, 3 /* 182C 8002642C 246200A8 */ addiu $v0, $v1, 0xA8 /* 1830 80026430 00021080 */ sll $v0, $v0, 2 /* 1834 80026434 30420FFF */ andi $v0, $v0, 0xFFF /* 1838 80026438 00029B00 */ sll $s3, $v0, 12 /* 183C 8002643C 246200A0 */ addiu $v0, $v1, 0xA0 /* 1840 80026440 00021080 */ sll $v0, $v0, 2 /* 1844 80026444 30420FFF */ andi $v0, $v0, 0xFFF /* 1848 80026448 00028B00 */ sll $s1, $v0, 12 /* 184C 8002644C 241500A0 */ addiu $s5, $zero, 0xA0 /* 1850 80026450 02A31023 */ subu $v0, $s5, $v1 /* 1854 80026454 00021080 */ sll $v0, $v0, 2 /* 1858 80026458 30420FFF */ andi $v0, $v0, 0xFFF /* 185C 8002645C 00028300 */ sll $s0, $v0, 12 /* 1860 80026460 03C31823 */ subu $v1, $fp, $v1 /* 1864 80026464 00031880 */ sll $v1, $v1, 2 /* 1868 80026468 30630FFF */ andi $v1, $v1, 0xFFF /* 186C 8002646C 00037B00 */ sll $t7, $v1, 12 /* 1870 80026470 000E1400 */ sll $v0, $t6, 16 .L80026474: /* 1874 80026474 00023C03 */ sra $a3, $v0, 16 /* 1878 80026478 02871823 */ subu $v1, $s4, $a3 /* 187C 8002647C 24020021 */ addiu $v0, $zero, 0x21 /* 1880 80026480 00431023 */ subu $v0, $v0, $v1 /* 1884 80026484 00021FC2 */ srl $v1, $v0, 31 /* 1888 80026488 00431021 */ addu $v0, $v0, $v1 /* 188C 8002648C 3C038007 */ lui $v1, %hi(D_80074010) /* 1890 80026490 94634010 */ lhu $v1, %lo(D_80074010)($v1) /* 1894 80026494 00021043 */ sra $v0, $v0, 1 /* 1898 80026498 2463FFF1 */ addiu $v1, $v1, -0xF /* 189C 8002649C 00431023 */ subu $v0, $v0, $v1 /* 18A0 800264A0 00021400 */ sll $v0, $v0, 16 /* 18A4 800264A4 00026C03 */ sra $t5, $v0, 16 /* 18A8 800264A8 29A20010 */ slti $v0, $t5, 0x10 /* 18AC 800264AC 1040005C */ beqz $v0, .L80026620 /* 18B0 800264B0 25C20001 */ addiu $v0, $t6, 0x1 /* 18B4 800264B4 05A2005B */ bltzl $t5, .L80026624 /* 18B8 800264B8 0040702D */ daddu $t6, $v0, $zero /* 18BC 800264BC 3C060400 */ lui $a2, (0x4000400 >> 16) /* 18C0 800264C0 34C60400 */ ori $a2, $a2, (0x4000400 & 0xFFFF) /* 18C4 800264C4 3C0A0400 */ lui $t2, (0x400FC00 >> 16) /* 18C8 800264C8 354AFC00 */ ori $t2, $t2, (0x400FC00 & 0xFFFF) /* 18CC 800264CC 3C0BFC00 */ lui $t3, (0xFC000400 >> 16) /* 18D0 800264D0 356B0400 */ ori $t3, $t3, (0xFC000400 & 0xFFFF) /* 18D4 800264D4 3C0CFC00 */ lui $t4, (0xFC00FC00 >> 16) /* 18D8 800264D8 358CFC00 */ ori $t4, $t4, (0xFC00FC00 & 0xFFFF) /* 18DC 800264DC 000748C0 */ sll $t1, $a3, 3 /* 18E0 800264E0 25240008 */ addiu $a0, $t1, 0x8 /* 18E4 800264E4 00042080 */ sll $a0, $a0, 2 /* 18E8 800264E8 30840FFF */ andi $a0, $a0, 0xFFF /* 18EC 800264EC 00972025 */ or $a0, $a0, $s7 /* 18F0 800264F0 02641025 */ or $v0, $s3, $a0 /* 18F4 800264F4 00073940 */ sll $a3, $a3, 5 /* 18F8 800264F8 30E70FFF */ andi $a3, $a3, 0xFFF /* 18FC 800264FC 000D4600 */ sll $t0, $t5, 24 /* 1900 80026500 8E430000 */ lw $v1, 0x0($s2) /* 1904 80026504 02042025 */ or $a0, $s0, $a0 /* 1908 80026508 0060282D */ daddu $a1, $v1, $zero /* 190C 8002650C 24630008 */ addiu $v1, $v1, 0x8 /* 1910 80026510 AE430000 */ sw $v1, 0x0($s2) /* 1914 80026514 ACA20000 */ sw $v0, 0x0($a1) /* 1918 80026518 02271025 */ or $v0, $s1, $a3 /* 191C 8002651C ACA20004 */ sw $v0, 0x4($a1) /* 1920 80026520 24620008 */ addiu $v0, $v1, 0x8 /* 1924 80026524 AE420000 */ sw $v0, 0x0($s2) /* 1928 80026528 24620010 */ addiu $v0, $v1, 0x10 /* 192C 8002652C AC790000 */ sw $t9, 0x0($v1) /* 1930 80026530 AC680004 */ sw $t0, 0x4($v1) /* 1934 80026534 AE420000 */ sw $v0, 0x0($s2) /* 1938 80026538 24620018 */ addiu $v0, $v1, 0x18 /* 193C 8002653C 240500F0 */ addiu $a1, $zero, 0xF0 /* 1940 80026540 00A92823 */ subu $a1, $a1, $t1 /* 1944 80026544 00052880 */ sll $a1, $a1, 2 /* 1948 80026548 30A50FFF */ andi $a1, $a1, 0xFFF /* 194C 8002654C 00B72825 */ or $a1, $a1, $s7 /* 1950 80026550 AC780008 */ sw $t8, 0x8($v1) /* 1954 80026554 AC66000C */ sw $a2, 0xC($v1) /* 1958 80026558 AE420000 */ sw $v0, 0x0($s2) /* 195C 8002655C 02651025 */ or $v0, $s3, $a1 /* 1960 80026560 240600E8 */ addiu $a2, $zero, 0xE8 /* 1964 80026564 00C93023 */ subu $a2, $a2, $t1 /* 1968 80026568 00063080 */ sll $a2, $a2, 2 /* 196C 8002656C 30C60FFF */ andi $a2, $a2, 0xFFF /* 1970 80026570 AC620010 */ sw $v0, 0x10($v1) /* 1974 80026574 02261025 */ or $v0, $s1, $a2 /* 1978 80026578 AC620014 */ sw $v0, 0x14($v1) /* 197C 8002657C 24620020 */ addiu $v0, $v1, 0x20 /* 1980 80026580 350800E0 */ ori $t0, $t0, 0xE0 /* 1984 80026584 AE420000 */ sw $v0, 0x0($s2) /* 1988 80026588 24620028 */ addiu $v0, $v1, 0x28 /* 198C 8002658C AC790018 */ sw $t9, 0x18($v1) /* 1990 80026590 AC68001C */ sw $t0, 0x1C($v1) /* 1994 80026594 AE420000 */ sw $v0, 0x0($s2) /* 1998 80026598 24620030 */ addiu $v0, $v1, 0x30 /* 199C 8002659C 01E73825 */ or $a3, $t7, $a3 /* 19A0 800265A0 AC780020 */ sw $t8, 0x20($v1) /* 19A4 800265A4 AC6A0024 */ sw $t2, 0x24($v1) /* 19A8 800265A8 AE420000 */ sw $v0, 0x0($s2) /* 19AC 800265AC 24620038 */ addiu $v0, $v1, 0x38 /* 19B0 800265B0 AC640028 */ sw $a0, 0x28($v1) /* 19B4 800265B4 000D2200 */ sll $a0, $t5, 8 /* 19B8 800265B8 348400E0 */ ori $a0, $a0, 0xE0 /* 19BC 800265BC 00042400 */ sll $a0, $a0, 16 /* 19C0 800265C0 AC67002C */ sw $a3, 0x2C($v1) /* 19C4 800265C4 AE420000 */ sw $v0, 0x0($s2) /* 19C8 800265C8 24620040 */ addiu $v0, $v1, 0x40 /* 19CC 800265CC AC790030 */ sw $t9, 0x30($v1) /* 19D0 800265D0 AC640034 */ sw $a0, 0x34($v1) /* 19D4 800265D4 AE420000 */ sw $v0, 0x0($s2) /* 19D8 800265D8 24620048 */ addiu $v0, $v1, 0x48 /* 19DC 800265DC 02052825 */ or $a1, $s0, $a1 /* 19E0 800265E0 01E63025 */ or $a2, $t7, $a2 /* 19E4 800265E4 AC780038 */ sw $t8, 0x38($v1) /* 19E8 800265E8 AC6B003C */ sw $t3, 0x3C($v1) /* 19EC 800265EC AE420000 */ sw $v0, 0x0($s2) /* 19F0 800265F0 24620050 */ addiu $v0, $v1, 0x50 /* 19F4 800265F4 348400E0 */ ori $a0, $a0, 0xE0 /* 19F8 800265F8 AC650040 */ sw $a1, 0x40($v1) /* 19FC 800265FC AC660044 */ sw $a2, 0x44($v1) /* 1A00 80026600 AE420000 */ sw $v0, 0x0($s2) /* 1A04 80026604 24620058 */ addiu $v0, $v1, 0x58 /* 1A08 80026608 AC790048 */ sw $t9, 0x48($v1) /* 1A0C 8002660C AC64004C */ sw $a0, 0x4C($v1) /* 1A10 80026610 AE420000 */ sw $v0, 0x0($s2) /* 1A14 80026614 AC780050 */ sw $t8, 0x50($v1) /* 1A18 80026618 AC6C0054 */ sw $t4, 0x54($v1) /* 1A1C 8002661C 25C20001 */ addiu $v0, $t6, 0x1 .L80026620: /* 1A20 80026620 0040702D */ daddu $t6, $v0, $zero .L80026624: /* 1A24 80026624 00021400 */ sll $v0, $v0, 16 /* 1A28 80026628 00021403 */ sra $v0, $v0, 16 /* 1A2C 8002662C 2842000F */ slti $v0, $v0, 0xF /* 1A30 80026630 1440FF90 */ bnez $v0, .L80026474 /* 1A34 80026634 000E1400 */ sll $v0, $t6, 16 /* 1A38 80026638 26C20001 */ addiu $v0, $s6, 0x1 /* 1A3C 8002663C 0040B02D */ daddu $s6, $v0, $zero /* 1A40 80026640 00021400 */ sll $v0, $v0, 16 /* 1A44 80026644 00021403 */ sra $v0, $v0, 16 /* 1A48 80026648 28420014 */ slti $v0, $v0, 0x14 /* 1A4C 8002664C 1440FF73 */ bnez $v0, .L8002641C /* 1A50 80026650 0000702D */ daddu $t6, $zero, $zero /* 1A54 80026654 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 1A58 80026658 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 1A5C 8002665C 3C038007 */ lui $v1, %hi(D_80074010) /* 1A60 80026660 24634010 */ addiu $v1, $v1, %lo(D_80074010) /* 1A64 80026664 8CC50000 */ lw $a1, 0x0($a2) /* 1A68 80026668 3C08800A */ lui $t0, %hi(gDisplayContext) /* 1A6C 8002666C 8D08A674 */ lw $t0, %lo(gDisplayContext)($t0) /* 1A70 80026670 94620000 */ lhu $v0, 0x0($v1) /* 1A74 80026674 00A0382D */ daddu $a3, $a1, $zero /* 1A78 80026678 24A50008 */ addiu $a1, $a1, 0x8 /* 1A7C 8002667C 25040230 */ addiu $a0, $t0, 0x230 /* 1A80 80026680 24420001 */ addiu $v0, $v0, 0x1 /* 1A84 80026684 A4620000 */ sh $v0, 0x0($v1) /* 1A88 80026688 3C02E900 */ lui $v0, (0xE9000000 >> 16) /* 1A8C 8002668C ACC50000 */ sw $a1, 0x0($a2) /* 1A90 80026690 ACE20000 */ sw $v0, 0x0($a3) /* 1A94 80026694 24A20008 */ addiu $v0, $a1, 0x8 /* 1A98 80026698 ACE00004 */ sw $zero, 0x4($a3) /* 1A9C 8002669C ACC20000 */ sw $v0, 0x0($a2) /* 1AA0 800266A0 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 1AA4 800266A4 ACA20000 */ sw $v0, 0x0($a1) /* 1AA8 800266A8 ACA00004 */ sw $zero, 0x4($a1) /* 1AAC 800266AC 24A5FDD8 */ addiu $a1, $a1, -0x228 /* 1AB0 800266B0 00A82823 */ subu $a1, $a1, $t0 /* 1AB4 800266B4 000528C3 */ sra $a1, $a1, 3 /* 1AB8 800266B8 000528C0 */ sll $a1, $a1, 3 /* 1ABC 800266BC 0000302D */ daddu $a2, $zero, $zero /* 1AC0 800266C0 0C00B331 */ jal nuGfxTaskStart /* 1AC4 800266C4 3C070004 */ lui $a3, (0x40000 >> 16) /* 1AC8 800266C8 3C038007 */ lui $v1, %hi(gCurrentDisplayContextIndex) /* 1ACC 800266CC 246341F4 */ addiu $v1, $v1, %lo(gCurrentDisplayContextIndex) /* 1AD0 800266D0 8C620000 */ lw $v0, 0x0($v1) /* 1AD4 800266D4 38420001 */ xori $v0, $v0, 0x1 /* 1AD8 800266D8 AC620000 */ sw $v0, 0x0($v1) /* 1ADC 800266DC 8FBF003C */ lw $ra, 0x3C($sp) /* 1AE0 800266E0 8FBE0038 */ lw $fp, 0x38($sp) /* 1AE4 800266E4 8FB70034 */ lw $s7, 0x34($sp) /* 1AE8 800266E8 8FB60030 */ lw $s6, 0x30($sp) /* 1AEC 800266EC 8FB5002C */ lw $s5, 0x2C($sp) /* 1AF0 800266F0 8FB40028 */ lw $s4, 0x28($sp) /* 1AF4 800266F4 8FB30024 */ lw $s3, 0x24($sp) /* 1AF8 800266F8 8FB20020 */ lw $s2, 0x20($sp) /* 1AFC 800266FC 8FB1001C */ lw $s1, 0x1C($sp) /* 1B00 80026700 8FB00018 */ lw $s0, 0x18($sp) /* 1B04 80026704 03E00008 */ jr $ra /* 1B08 80026708 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void gfx_task_main(void) { s16 t; s16 i; s16 j; u16* temp; gMatrixListPos = 0; gDisplayContext = &D_80164000[gCurrentDisplayContextIndex]; gMainGfxPos = gDisplayContext->mainGfx; temp = D_80073E04; gfx_init_state(); gDPSetDepthImage(gMainGfxPos++, OS_K0_TO_PHYSICAL(nuGfxZBuffer)); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(temp)); gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); 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); gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT); gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, 0, 0, 0, TEXEL0, 0, 0, 0, 0, 0, 0, 0, TEXEL0); gDPSetAlphaCompare(gMainGfxPos++, G_AC_THRESHOLD); gDPSetBlendColor(gMainGfxPos++, 0, 0, 0, 127); gDPLoadTextureTile_4b(gMainGfxPos++, D_80073E10, G_IM_FMT_I, 128, 8, 0, 0, 127, 7, 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); for (i = 0; i < 20; i++) { for (j = 0; j < 15; j++) { s32 s4 = i + 14; t = (33 - (s4 - j)) / 2 + 15 - D_80074010; if (t >= 16) { continue; } if (t < 0) { continue; } gSPTextureRectangle(gMainGfxPos++, ((i * 8) + 160) * 4, ((j * 8)) * 4, ((i * 8) + 168) * 4, ((j * 8) + 8) * 4, G_TX_RENDERTILE, (t * 8) * 32, 0, 0x0400, 0x0400); gSPTextureRectangle(gMainGfxPos++, ((i * 8) + 160) * 4, (232 - (j * 8)) * 4, ((i * 8) + 168) * 4, (240 - (j * 8)) * 4, G_TX_RENDERTILE, (t * 8) * 32, 7 * 32, 0x0400, -0x0400); gSPTextureRectangle(gMainGfxPos++, (152 - (i * 8)) * 4, ((j * 8)) * 4, (160 - (i * 8)) * 4, ((j * 8) + 8) * 4, G_TX_RENDERTILE, (t * 8 + 7) * 32, 0, -0x0400, 0x0400); gSPTextureRectangle(gMainGfxPos++, (152 - (i * 8)) * 4, (232 - (j * 8)) * 4, (160 - (i * 8)) * 4, (240 - (j * 8)) * 4, G_TX_RENDERTILE, (t * 8 + 7) * 32, 7 * 32, -0x0400, -0x0400); } } D_80074010++; gDPFullSync(gMainGfxPos++); gSPEndDisplayList(gMainGfxPos++); nuGfxTaskStart(gDisplayContext->mainGfx, (u32)(gMainGfxPos - gDisplayContext->mainGfx) * 8, NU_GFX_UCODE_F3DEX, NU_SC_TASK_LODABLE); gCurrentDisplayContextIndex ^= 1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E0090444 /* 38FD44 E0090444 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 38FD48 E0090448 0080482D */ daddu $t1, $a0, $zero /* 38FD4C E009044C AFBF00AC */ sw $ra, 0xAC($sp) /* 38FD50 E0090450 AFB400A8 */ sw $s4, 0xA8($sp) /* 38FD54 E0090454 AFB300A4 */ sw $s3, 0xA4($sp) /* 38FD58 E0090458 AFB200A0 */ sw $s2, 0xA0($sp) /* 38FD5C E009045C AFB1009C */ sw $s1, 0x9C($sp) /* 38FD60 E0090460 AFB00098 */ sw $s0, 0x98($sp) /* 38FD64 E0090464 F7B600B8 */ sdc1 $f22, 0xB8($sp) /* 38FD68 E0090468 F7B400B0 */ sdc1 $f20, 0xB0($sp) /* 38FD6C E009046C 8D33000C */ lw $s3, 0xC($t1) /* 38FD70 E0090470 8E670000 */ lw $a3, 0x0($s3) /* 38FD74 E0090474 8E620024 */ lw $v0, 0x24($s3) /* 38FD78 E0090478 8E63001C */ lw $v1, 0x1C($s3) /* 38FD7C E009047C 10400163 */ beqz $v0, .LE0090A0C /* 38FD80 E0090480 3C04DB06 */ lui $a0, (0xDB060024 >> 16) /* 38FD84 E0090484 34840024 */ ori $a0, $a0, (0xDB060024 & 0xFFFF) /* 38FD88 E0090488 3C05E200 */ lui $a1, (0xE2001D00 >> 16) /* 38FD8C E009048C 34A51D00 */ ori $a1, $a1, (0xE2001D00 & 0xFFFF) /* 38FD90 E0090490 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 38FD94 E0090494 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 38FD98 E0090498 240200C8 */ addiu $v0, $zero, 0xC8 /* 38FD9C E009049C 8E880000 */ lw $t0, 0x0($s4) /* 38FDA0 E00904A0 00433023 */ subu $a2, $v0, $v1 /* 38FDA4 E00904A4 0100182D */ daddu $v1, $t0, $zero /* 38FDA8 E00904A8 25080008 */ addiu $t0, $t0, 0x8 /* 38FDAC E00904AC AE880000 */ sw $t0, 0x0($s4) /* 38FDB0 E00904B0 C6760028 */ lwc1 $f22, 0x28($s3) /* 38FDB4 E00904B4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 38FDB8 E00904B8 AC620000 */ sw $v0, 0x0($v1) /* 38FDBC E00904BC AC600004 */ sw $zero, 0x4($v1) /* 38FDC0 E00904C0 AD040000 */ sw $a0, 0x0($t0) /* 38FDC4 E00904C4 8D230010 */ lw $v1, 0x10($t1) /* 38FDC8 E00904C8 25020008 */ addiu $v0, $t0, 0x8 /* 38FDCC E00904CC AE820000 */ sw $v0, 0x0($s4) /* 38FDD0 E00904D0 8C63001C */ lw $v1, 0x1C($v1) /* 38FDD4 E00904D4 25020010 */ addiu $v0, $t0, 0x10 /* 38FDD8 E00904D8 AE820000 */ sw $v0, 0x0($s4) /* 38FDDC E00904DC 24020004 */ addiu $v0, $zero, 0x4 /* 38FDE0 E00904E0 AD02000C */ sw $v0, 0xC($t0) /* 38FDE4 E00904E4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 38FDE8 E00904E8 AD050008 */ sw $a1, 0x8($t0) /* 38FDEC E00904EC 00621821 */ addu $v1, $v1, $v0 /* 38FDF0 E00904F0 04C10002 */ bgez $a2, .LE00904FC /* 38FDF4 E00904F4 AD030004 */ sw $v1, 0x4($t0) /* 38FDF8 E00904F8 0000302D */ daddu $a2, $zero, $zero .LE00904FC: /* 38FDFC E00904FC 25020018 */ addiu $v0, $t0, 0x18 /* 38FE00 E0090500 AE820000 */ sw $v0, 0x0($s4) /* 38FE04 E0090504 3C02EE00 */ lui $v0, (0xEE000000 >> 16) /* 38FE08 E0090508 AD020010 */ sw $v0, 0x10($t0) /* 38FE0C E009050C 00061400 */ sll $v0, $a2, 16 /* 38FE10 E0090510 AD020014 */ sw $v0, 0x14($t0) /* 38FE14 E0090514 28E20005 */ slti $v0, $a3, 0x5 /* 38FE18 E0090518 1040006F */ beqz $v0, .LE00906D8 /* 38FE1C E009051C 3C120001 */ lui $s2, (0x11630 >> 16) /* 38FE20 E0090520 27A40018 */ addiu $a0, $sp, 0x18 /* 38FE24 E0090524 8E650008 */ lw $a1, 0x8($s3) /* 38FE28 E0090528 8E66000C */ lw $a2, 0xC($s3) /* 38FE2C E009052C 8E670010 */ lw $a3, 0x10($s3) /* 38FE30 E0090530 0C080108 */ jal shim_guTranslateF /* 38FE34 E0090534 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 38FE38 E0090538 27B00058 */ addiu $s0, $sp, 0x58 /* 38FE3C E009053C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 38FE40 E0090540 4481A000 */ mtc1 $at, $f20 /* 38FE44 E0090544 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 38FE48 E0090548 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 38FE4C E009054C 44800000 */ mtc1 $zero, $f0 /* 38FE50 E0090550 00031080 */ sll $v0, $v1, 2 /* 38FE54 E0090554 00431021 */ addu $v0, $v0, $v1 /* 38FE58 E0090558 00021080 */ sll $v0, $v0, 2 /* 38FE5C E009055C 00431023 */ subu $v0, $v0, $v1 /* 38FE60 E0090560 000218C0 */ sll $v1, $v0, 3 /* 38FE64 E0090564 00431021 */ addu $v0, $v0, $v1 /* 38FE68 E0090568 000210C0 */ sll $v0, $v0, 3 /* 38FE6C E009056C 44060000 */ mfc1 $a2, $f0 /* 38FE70 E0090570 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 38FE74 E0090574 00220821 */ addu $at, $at, $v0 /* 38FE78 E0090578 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 38FE7C E009057C 4407A000 */ mfc1 $a3, $f20 /* 38FE80 E0090580 46000007 */ neg.s $f0, $f0 /* 38FE84 E0090584 44050000 */ mfc1 $a1, $f0 /* 38FE88 E0090588 0200202D */ daddu $a0, $s0, $zero /* 38FE8C E009058C 0C080104 */ jal shim_guRotateF /* 38FE90 E0090590 AFA60010 */ sw $a2, 0x10($sp) /* 38FE94 E0090594 0200202D */ daddu $a0, $s0, $zero /* 38FE98 E0090598 27A50018 */ addiu $a1, $sp, 0x18 /* 38FE9C E009059C 0C080114 */ jal shim_guMtxCatF /* 38FEA0 E00905A0 00A0302D */ daddu $a2, $a1, $zero /* 38FEA4 E00905A4 0200202D */ daddu $a0, $s0, $zero /* 38FEA8 E00905A8 4405B000 */ mfc1 $a1, $f22 /* 38FEAC E00905AC 4407A000 */ mfc1 $a3, $f20 /* 38FEB0 E00905B0 0C080110 */ jal shim_guScaleF /* 38FEB4 E00905B4 00A0302D */ daddu $a2, $a1, $zero /* 38FEB8 E00905B8 0200202D */ daddu $a0, $s0, $zero /* 38FEBC E00905BC 27A50018 */ addiu $a1, $sp, 0x18 /* 38FEC0 E00905C0 0C080114 */ jal shim_guMtxCatF /* 38FEC4 E00905C4 00A0302D */ daddu $a2, $a1, $zero /* 38FEC8 E00905C8 27A40018 */ addiu $a0, $sp, 0x18 /* 38FECC E00905CC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 38FED0 E00905D0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 38FED4 E00905D4 3C11800A */ lui $s1, %hi(gDisplayContext) /* 38FED8 E00905D8 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 38FEDC E00905DC 96050000 */ lhu $a1, 0x0($s0) /* 38FEE0 E00905E0 8E220000 */ lw $v0, 0x0($s1) /* 38FEE4 E00905E4 00052980 */ sll $a1, $a1, 6 /* 38FEE8 E00905E8 00B22821 */ addu $a1, $a1, $s2 /* 38FEEC E00905EC 0C080118 */ jal shim_guMtxF2L /* 38FEF0 E00905F0 00452821 */ addu $a1, $v0, $a1 /* 38FEF4 E00905F4 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 38FEF8 E00905F8 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 38FEFC E00905FC 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 38FF00 E0090600 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 38FF04 E0090604 8E840000 */ lw $a0, 0x0($s4) /* 38FF08 E0090608 96020000 */ lhu $v0, 0x0($s0) /* 38FF0C E009060C 0080282D */ daddu $a1, $a0, $zero /* 38FF10 E0090610 24840008 */ addiu $a0, $a0, 0x8 /* 38FF14 E0090614 AE840000 */ sw $a0, 0x0($s4) /* 38FF18 E0090618 ACA30000 */ sw $v1, 0x0($a1) /* 38FF1C E009061C 24430001 */ addiu $v1, $v0, 0x1 /* 38FF20 E0090620 3042FFFF */ andi $v0, $v0, 0xFFFF /* 38FF24 E0090624 00021180 */ sll $v0, $v0, 6 /* 38FF28 E0090628 A6030000 */ sh $v1, 0x0($s0) /* 38FF2C E009062C 8E230000 */ lw $v1, 0x0($s1) /* 38FF30 E0090630 00521021 */ addu $v0, $v0, $s2 /* 38FF34 E0090634 00621821 */ addu $v1, $v1, $v0 /* 38FF38 E0090638 24820008 */ addiu $v0, $a0, 0x8 /* 38FF3C E009063C ACA30004 */ sw $v1, 0x4($a1) /* 38FF40 E0090640 AE820000 */ sw $v0, 0x0($s4) /* 38FF44 E0090644 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 38FF48 E0090648 3C05DE00 */ lui $a1, (0xDE000000 >> 16) /* 38FF4C E009064C AC820000 */ sw $v0, 0x0($a0) /* 38FF50 E0090650 92630017 */ lbu $v1, 0x17($s3) /* 38FF54 E0090654 3C020900 */ lui $v0, %hi(D_090015A8_40E838) /* 38FF58 E0090658 244215A8 */ addiu $v0, $v0, %lo(D_090015A8_40E838) /* 38FF5C E009065C AC82000C */ sw $v0, 0xC($a0) /* 38FF60 E0090660 2402FF00 */ addiu $v0, $zero, -0x100 /* 38FF64 E0090664 AC850008 */ sw $a1, 0x8($a0) /* 38FF68 E0090668 AC850010 */ sw $a1, 0x10($a0) /* 38FF6C E009066C 00621825 */ or $v1, $v1, $v0 /* 38FF70 E0090670 AC830004 */ sw $v1, 0x4($a0) /* 38FF74 E0090674 8E620004 */ lw $v0, 0x4($s3) /* 38FF78 E0090678 24830010 */ addiu $v1, $a0, 0x10 /* 38FF7C E009067C AE830000 */ sw $v1, 0x0($s4) /* 38FF80 E0090680 00021080 */ sll $v0, $v0, 2 /* 38FF84 E0090684 3C03E009 */ lui $v1, (0xE0090A40 >> 16) /* 38FF88 E0090688 00621821 */ addu $v1, $v1, $v0 /* 38FF8C E009068C 8C630A40 */ lw $v1, (0xE0090A40 & 0xFFFF)($v1) /* 38FF90 E0090690 24820018 */ addiu $v0, $a0, 0x18 /* 38FF94 E0090694 AE820000 */ sw $v0, 0x0($s4) /* 38FF98 E0090698 AC850018 */ sw $a1, 0x18($a0) /* 38FF9C E009069C AC830014 */ sw $v1, 0x14($a0) /* 38FFA0 E00906A0 8E620004 */ lw $v0, 0x4($s3) /* 38FFA4 E00906A4 24830020 */ addiu $v1, $a0, 0x20 /* 38FFA8 E00906A8 AE830000 */ sw $v1, 0x0($s4) /* 38FFAC E00906AC 00021080 */ sll $v0, $v0, 2 /* 38FFB0 E00906B0 3C03E009 */ lui $v1, (0xE0090A54 >> 16) /* 38FFB4 E00906B4 00621821 */ addu $v1, $v1, $v0 /* 38FFB8 E00906B8 8C630A54 */ lw $v1, (0xE0090A54 & 0xFFFF)($v1) /* 38FFBC E00906BC 24820028 */ addiu $v0, $a0, 0x28 /* 38FFC0 E00906C0 AE820000 */ sw $v0, 0x0($s4) /* 38FFC4 E00906C4 24020040 */ addiu $v0, $zero, 0x40 /* 38FFC8 E00906C8 AC860020 */ sw $a2, 0x20($a0) /* 38FFCC E00906CC AC820024 */ sw $v0, 0x24($a0) /* 38FFD0 E00906D0 08024270 */ j .LE00909C0 /* 38FFD4 E00906D4 AC83001C */ sw $v1, 0x1C($a0) .LE00906D8: /* 38FFD8 E00906D8 24E7FFFB */ addiu $a3, $a3, -0x5 /* 38FFDC E00906DC 25020020 */ addiu $v0, $t0, 0x20 /* 38FFE0 E00906E0 AE820000 */ sw $v0, 0x0($s4) /* 38FFE4 E00906E4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 38FFE8 E00906E8 AD020018 */ sw $v0, 0x18($t0) /* 38FFEC E00906EC 3C02E009 */ lui $v0, %hi(D_E0090A78) /* 38FFF0 E00906F0 24420A78 */ addiu $v0, $v0, %lo(D_E0090A78) /* 38FFF4 E00906F4 00072040 */ sll $a0, $a3, 1 /* 38FFF8 E00906F8 00872021 */ addu $a0, $a0, $a3 /* 38FFFC E00906FC 00042040 */ sll $a0, $a0, 1 /* 390000 E0090700 00822021 */ addu $a0, $a0, $v0 /* 390004 E0090704 90820000 */ lbu $v0, 0x0($a0) /* 390008 E0090708 90850001 */ lbu $a1, 0x1($a0) /* 39000C E009070C 90860002 */ lbu $a2, 0x2($a0) /* 390010 E0090710 92670017 */ lbu $a3, 0x17($s3) /* 390014 E0090714 25030028 */ addiu $v1, $t0, 0x28 /* 390018 E0090718 AE830000 */ sw $v1, 0x0($s4) /* 39001C E009071C 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 390020 E0090720 AD030020 */ sw $v1, 0x20($t0) /* 390024 E0090724 00021600 */ sll $v0, $v0, 24 /* 390028 E0090728 00052C00 */ sll $a1, $a1, 16 /* 39002C E009072C 00451025 */ or $v0, $v0, $a1 /* 390030 E0090730 00063200 */ sll $a2, $a2, 8 /* 390034 E0090734 00461025 */ or $v0, $v0, $a2 /* 390038 E0090738 00471025 */ or $v0, $v0, $a3 /* 39003C E009073C 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 390040 E0090740 AD02001C */ sw $v0, 0x1C($t0) /* 390044 E0090744 90830003 */ lbu $v1, 0x3($a0) /* 390048 E0090748 90850004 */ lbu $a1, 0x4($a0) /* 39004C E009074C 90840005 */ lbu $a0, 0x5($a0) /* 390050 E0090750 3C020900 */ lui $v0, %hi(D_09001500_40E790) /* 390054 E0090754 24421500 */ addiu $v0, $v0, %lo(D_09001500_40E790) /* 390058 E0090758 AD060028 */ sw $a2, 0x28($t0) /* 39005C E009075C AD02002C */ sw $v0, 0x2C($t0) /* 390060 E0090760 AD060030 */ sw $a2, 0x30($t0) /* 390064 E0090764 00031E00 */ sll $v1, $v1, 24 /* 390068 E0090768 00052C00 */ sll $a1, $a1, 16 /* 39006C E009076C 00651825 */ or $v1, $v1, $a1 /* 390070 E0090770 00042200 */ sll $a0, $a0, 8 /* 390074 E0090774 00641825 */ or $v1, $v1, $a0 /* 390078 E0090778 AD030024 */ sw $v1, 0x24($t0) /* 39007C E009077C 8E620004 */ lw $v0, 0x4($s3) /* 390080 E0090780 3C014300 */ lui $at, (0x43000000 >> 16) /* 390084 E0090784 44811000 */ mtc1 $at, $f2 /* 390088 E0090788 00021080 */ sll $v0, $v0, 2 /* 39008C E009078C 3C01E009 */ lui $at, (0xE0090A40 >> 16) /* 390090 E0090790 00220821 */ addu $at, $at, $v0 /* 390094 E0090794 8C220A40 */ lw $v0, (0xE0090A40 & 0xFFFF)($at) /* 390098 E0090798 25030038 */ addiu $v1, $t0, 0x38 /* 39009C E009079C AD020034 */ sw $v0, 0x34($t0) /* 3900A0 E00907A0 C6600008 */ lwc1 $f0, 0x8($s3) /* 3900A4 E00907A4 46020000 */ add.s $f0, $f0, $f2 /* 3900A8 E00907A8 3C014080 */ lui $at, (0x40800000 >> 16) /* 3900AC E00907AC 44811000 */ mtc1 $at, $f2 /* 3900B0 E00907B0 25020030 */ addiu $v0, $t0, 0x30 /* 3900B4 E00907B4 46020002 */ mul.s $f0, $f0, $f2 /* 3900B8 E00907B8 00000000 */ nop /* 3900BC E00907BC AE820000 */ sw $v0, 0x0($s4) /* 3900C0 E00907C0 25020040 */ addiu $v0, $t0, 0x40 /* 3900C4 E00907C4 AE830000 */ sw $v1, 0x0($s4) /* 3900C8 E00907C8 AE820000 */ sw $v0, 0x0($s4) /* 3900CC E00907CC 4600010D */ trunc.w.s $f4, $f0 /* 3900D0 E00907D0 44022000 */ mfc1 $v0, $f4 /* 3900D4 E00907D4 00000000 */ nop /* 3900D8 E00907D8 00021400 */ sll $v0, $v0, 16 /* 3900DC E00907DC 00021403 */ sra $v0, $v0, 16 /* 3900E0 E00907E0 18400006 */ blez $v0, .LE00907FC /* 3900E4 E00907E4 0060202D */ daddu $a0, $v1, $zero /* 3900E8 E00907E8 30420FFF */ andi $v0, $v0, 0xFFF /* 3900EC E00907EC 00021300 */ sll $v0, $v0, 12 /* 3900F0 E00907F0 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* 3900F4 E00907F4 08024200 */ j .LE0090800 /* 3900F8 E00907F8 00431025 */ or $v0, $v0, $v1 .LE00907FC: /* 3900FC E00907FC 3C02E400 */ lui $v0, (0xE4000000 >> 16) .LE0090800: /* 390100 E0090800 C660000C */ lwc1 $f0, 0xC($s3) /* 390104 E0090804 3C014280 */ lui $at, (0x42800000 >> 16) /* 390108 E0090808 44811000 */ mtc1 $at, $f2 /* 39010C E009080C 00000000 */ nop /* 390110 E0090810 46020000 */ add.s $f0, $f0, $f2 /* 390114 E0090814 3C014080 */ lui $at, (0x40800000 >> 16) /* 390118 E0090818 44811000 */ mtc1 $at, $f2 /* 39011C E009081C 00000000 */ nop /* 390120 E0090820 46020002 */ mul.s $f0, $f0, $f2 /* 390124 E0090824 00000000 */ nop /* 390128 E0090828 0040182D */ daddu $v1, $v0, $zero /* 39012C E009082C 4600010D */ trunc.w.s $f4, $f0 /* 390130 E0090830 44022000 */ mfc1 $v0, $f4 /* 390134 E0090834 00000000 */ nop /* 390138 E0090838 00021400 */ sll $v0, $v0, 16 /* 39013C E009083C 00021403 */ sra $v0, $v0, 16 /* 390140 E0090840 18400002 */ blez $v0, .LE009084C /* 390144 E0090844 30420FFF */ andi $v0, $v0, 0xFFF /* 390148 E0090848 00621825 */ or $v1, $v1, $v0 .LE009084C: /* 39014C E009084C AC830000 */ sw $v1, 0x0($a0) /* 390150 E0090850 C6600008 */ lwc1 $f0, 0x8($s3) /* 390154 E0090854 46020002 */ mul.s $f0, $f0, $f2 /* 390158 E0090858 00000000 */ nop /* 39015C E009085C 4600010D */ trunc.w.s $f4, $f0 /* 390160 E0090860 44022000 */ mfc1 $v0, $f4 /* 390164 E0090864 00000000 */ nop /* 390168 E0090868 00021400 */ sll $v0, $v0, 16 /* 39016C E009086C 00021403 */ sra $v0, $v0, 16 /* 390170 E0090870 18400004 */ blez $v0, .LE0090884 /* 390174 E0090874 24860004 */ addiu $a2, $a0, 0x4 /* 390178 E0090878 30420FFF */ andi $v0, $v0, 0xFFF /* 39017C E009087C 08024222 */ j .LE0090888 /* 390180 E0090880 00021300 */ sll $v0, $v0, 12 .LE0090884: /* 390184 E0090884 0000102D */ daddu $v0, $zero, $zero .LE0090888: /* 390188 E0090888 C660000C */ lwc1 $f0, 0xC($s3) /* 39018C E009088C 3C014080 */ lui $at, (0x40800000 >> 16) /* 390190 E0090890 44811000 */ mtc1 $at, $f2 /* 390194 E0090894 00000000 */ nop /* 390198 E0090898 46020002 */ mul.s $f0, $f0, $f2 /* 39019C E009089C 00000000 */ nop /* 3901A0 E00908A0 0040202D */ daddu $a0, $v0, $zero /* 3901A4 E00908A4 4600010D */ trunc.w.s $f4, $f0 /* 3901A8 E00908A8 44022000 */ mfc1 $v0, $f4 /* 3901AC E00908AC 00000000 */ nop /* 3901B0 E00908B0 00021400 */ sll $v0, $v0, 16 /* 3901B4 E00908B4 00021403 */ sra $v0, $v0, 16 /* 3901B8 E00908B8 18400002 */ blez $v0, .LE00908C4 /* 3901BC E00908BC 30420FFF */ andi $v0, $v0, 0xFFF /* 3901C0 E00908C0 00822025 */ or $a0, $a0, $v0 .LE00908C4: /* 3901C4 E00908C4 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 3901C8 E00908C8 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 3901CC E00908CC 8CA30000 */ lw $v1, 0x0($a1) /* 3901D0 E00908D0 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 3901D4 E00908D4 ACC40000 */ sw $a0, 0x0($a2) /* 3901D8 E00908D8 0060202D */ daddu $a0, $v1, $zero /* 3901DC E00908DC AC820000 */ sw $v0, 0x0($a0) /* 3901E0 E00908E0 C6600008 */ lwc1 $f0, 0x8($s3) /* 3901E4 E00908E4 46020002 */ mul.s $f0, $f0, $f2 /* 3901E8 E00908E8 00000000 */ nop /* 3901EC E00908EC 24630008 */ addiu $v1, $v1, 0x8 /* 3901F0 E00908F0 24860004 */ addiu $a2, $a0, 0x4 /* 3901F4 E00908F4 4600010D */ trunc.w.s $f4, $f0 /* 3901F8 E00908F8 44022000 */ mfc1 $v0, $f4 /* 3901FC E00908FC 00000000 */ nop /* 390200 E0090900 00021400 */ sll $v0, $v0, 16 /* 390204 E0090904 00021403 */ sra $v0, $v0, 16 /* 390208 E0090908 04410007 */ bgez $v0, .LE0090928 /* 39020C E009090C ACA30000 */ sw $v1, 0x0($a1) /* 390210 E0090910 00021080 */ sll $v0, $v0, 2 /* 390214 E0090914 5C400001 */ bgtzl $v0, .LE009091C /* 390218 E0090918 0000102D */ daddu $v0, $zero, $zero .LE009091C: /* 39021C E009091C 00021023 */ negu $v0, $v0 /* 390220 E0090920 0802424B */ j .LE009092C /* 390224 E0090924 00022400 */ sll $a0, $v0, 16 .LE0090928: /* 390228 E0090928 0000202D */ daddu $a0, $zero, $zero .LE009092C: /* 39022C E009092C C660000C */ lwc1 $f0, 0xC($s3) /* 390230 E0090930 3C014080 */ lui $at, (0x40800000 >> 16) /* 390234 E0090934 44811000 */ mtc1 $at, $f2 /* 390238 E0090938 00000000 */ nop /* 39023C E009093C 46020082 */ mul.s $f2, $f0, $f2 /* 390240 E0090940 00000000 */ nop /* 390244 E0090944 44800000 */ mtc1 $zero, $f0 /* 390248 E0090948 00000000 */ nop /* 39024C E009094C 4600103C */ c.lt.s $f2, $f0 /* 390250 E0090950 00000000 */ nop /* 390254 E0090954 4500000E */ bc1f .LE0090990 /* 390258 E0090958 34830400 */ ori $v1, $a0, 0x400 /* 39025C E009095C 4600110D */ trunc.w.s $f4, $f2 /* 390260 E0090960 44022000 */ mfc1 $v0, $f4 /* 390264 E0090964 00000000 */ nop /* 390268 E0090968 00021400 */ sll $v0, $v0, 16 /* 39026C E009096C 000211C3 */ sra $v0, $v0, 7 /* 390270 E0090970 00021023 */ negu $v0, $v0 /* 390274 E0090974 000219C3 */ sra $v1, $v0, 7 /* 390278 E0090978 04620001 */ bltzl $v1, .LE0090980 /* 39027C E009097C 0000182D */ daddu $v1, $zero, $zero .LE0090980: /* 390280 E0090980 24020400 */ addiu $v0, $zero, 0x400 /* 390284 E0090984 00431023 */ subu $v0, $v0, $v1 /* 390288 E0090988 3042FFFF */ andi $v0, $v0, 0xFFFF /* 39028C E009098C 00821825 */ or $v1, $a0, $v0 .LE0090990: /* 390290 E0090990 3C050200 */ lui $a1, (0x200FE00 >> 16) /* 390294 E0090994 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 390298 E0090998 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 39029C E009099C 8C820000 */ lw $v0, 0x0($a0) /* 3902A0 E00909A0 34A5FE00 */ ori $a1, $a1, (0x200FE00 & 0xFFFF) /* 3902A4 E00909A4 ACC30000 */ sw $v1, 0x0($a2) /* 3902A8 E00909A8 0040182D */ daddu $v1, $v0, $zero /* 3902AC E00909AC 24420008 */ addiu $v0, $v0, 0x8 /* 3902B0 E00909B0 AC820000 */ sw $v0, 0x0($a0) /* 3902B4 E00909B4 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* 3902B8 E00909B8 AC620000 */ sw $v0, 0x0($v1) /* 3902BC E00909BC AC650004 */ sw $a1, 0x4($v1) .LE00909C0: /* 3902C0 E00909C0 3C06E200 */ lui $a2, (0xE2001D00 >> 16) /* 3902C4 E00909C4 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3902C8 E00909C8 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3902CC E00909CC 34C61D00 */ ori $a2, $a2, (0xE2001D00 & 0xFFFF) /* 3902D0 E00909D0 8C820000 */ lw $v0, 0x0($a0) /* 3902D4 E00909D4 3C05E700 */ lui $a1, (0xE7000000 >> 16) /* 3902D8 E00909D8 0040182D */ daddu $v1, $v0, $zero /* 3902DC E00909DC 24420008 */ addiu $v0, $v0, 0x8 /* 3902E0 E00909E0 AC820000 */ sw $v0, 0x0($a0) /* 3902E4 E00909E4 AC650000 */ sw $a1, 0x0($v1) /* 3902E8 E00909E8 AC600004 */ sw $zero, 0x4($v1) /* 3902EC E00909EC 24430008 */ addiu $v1, $v0, 0x8 /* 3902F0 E00909F0 AC830000 */ sw $v1, 0x0($a0) /* 3902F4 E00909F4 24430010 */ addiu $v1, $v0, 0x10 /* 3902F8 E00909F8 AC460000 */ sw $a2, 0x0($v0) /* 3902FC E00909FC AC400004 */ sw $zero, 0x4($v0) /* 390300 E0090A00 AC830000 */ sw $v1, 0x0($a0) /* 390304 E0090A04 AC450008 */ sw $a1, 0x8($v0) /* 390308 E0090A08 AC40000C */ sw $zero, 0xC($v0) .LE0090A0C: /* 39030C E0090A0C 8FBF00AC */ lw $ra, 0xAC($sp) /* 390310 E0090A10 8FB400A8 */ lw $s4, 0xA8($sp) /* 390314 E0090A14 8FB300A4 */ lw $s3, 0xA4($sp) /* 390318 E0090A18 8FB200A0 */ lw $s2, 0xA0($sp) /* 39031C E0090A1C 8FB1009C */ lw $s1, 0x9C($sp) /* 390320 E0090A20 8FB00098 */ lw $s0, 0x98($sp) /* 390324 E0090A24 D7B600B8 */ ldc1 $f22, 0xB8($sp) /* 390328 E0090A28 D7B400B0 */ ldc1 $f20, 0xB0($sp) /* 39032C E0090A2C 03E00008 */ jr $ra /* 390330 E0090A30 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 390334 E0090A34 00000000 */ nop /* 390338 E0090A38 00000000 */ nop /* 39033C E0090A3C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E0090444(EffectInstance* effect) { AttackResultTextFXData* data = effect->data.attackResultText; s32 type = data->type; s32 unk_1C = data->lifetime; Matrix4f mtxA; Matrix4f mtxB; s32 z; f32 scale; if (data->isVisible) { scale = data->scale; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data)); gDPSetDepthSource(gMainGfxPos++, G_ZS_PRIM); z = 200 - unk_1C; if (z < 0) { z = 0; } gDPSetPrimDepth(gMainGfxPos++, z, 0); if (type < 5) { shim_guTranslateF(mtxA, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(mtxB, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(mtxB, mtxA, mtxA); shim_guScaleF(mtxB, scale, scale, 1.0f); shim_guMtxCatF(mtxB, mtxA, mtxA); shim_guMtxF2L(mtxA, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->alpha); gSPDisplayList(gMainGfxPos++, D_090015A8_391978); gSPDisplayList(gMainGfxPos++, D_E0090A40[data->unk_04]); gSPDisplayList(gMainGfxPos++, D_E0090A54[data->unk_04]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } else { type -= 5; gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0090A78[type][0], D_E0090A78[type][1], D_E0090A78[type][2], data->alpha); gDPSetEnvColor(gMainGfxPos++, D_E0090A78[type][3], D_E0090A78[type][4], D_E0090A78[type][5], 0); gSPDisplayList(gMainGfxPos++, D_09001500_3918D0); gSPDisplayList(gMainGfxPos++, D_E0090A40[data->unk_04]); gSPScisTextureRectangle(gMainGfxPos++, data->pos.x * 4.0f, data->pos.y * 4.0f, (data->pos.x + 128.0f) * 4.0f, (data->pos.y + 64.0f) * 4.0f, G_TX_RENDERTILE, 0, 1024, 512, 65024); } gDPPipeSync(gMainGfxPos++); gDPSetDepthSource(gMainGfxPos++, G_ZS_PIXEL); gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_WoodenCrate_update_fragments /* 109820 802E7FA0 27BDFF78 */ addiu $sp, $sp, -0x88 /* 109824 802E7FA4 F7B80068 */ sdc1 $f24, 0x68($sp) /* 109828 802E7FA8 4480C000 */ mtc1 $zero, $f24 /* 10982C 802E7FAC F7BC0078 */ sdc1 $f28, 0x78($sp) /* 109830 802E7FB0 3C014100 */ lui $at, (0x41000000 >> 16) /* 109834 802E7FB4 4481E000 */ mtc1 $at, $f28 /* 109838 802E7FB8 AFBE0050 */ sw $fp, 0x50($sp) /* 10983C 802E7FBC 0080F02D */ daddu $fp, $a0, $zero /* 109840 802E7FC0 AFB3003C */ sw $s3, 0x3C($sp) /* 109844 802E7FC4 0000982D */ daddu $s3, $zero, $zero /* 109848 802E7FC8 AFB60048 */ sw $s6, 0x48($sp) /* 10984C 802E7FCC 27B60020 */ addiu $s6, $sp, 0x20 /* 109850 802E7FD0 AFB50044 */ sw $s5, 0x44($sp) /* 109854 802E7FD4 27B50024 */ addiu $s5, $sp, 0x24 /* 109858 802E7FD8 AFB40040 */ sw $s4, 0x40($sp) /* 10985C 802E7FDC 27B40028 */ addiu $s4, $sp, 0x28 /* 109860 802E7FE0 AFB7004C */ sw $s7, 0x4C($sp) /* 109864 802E7FE4 3C178000 */ lui $s7, (0x80000000 >> 16) /* 109868 802E7FE8 AFBF0054 */ sw $ra, 0x54($sp) /* 10986C 802E7FEC AFB20038 */ sw $s2, 0x38($sp) /* 109870 802E7FF0 AFB10034 */ sw $s1, 0x34($sp) /* 109874 802E7FF4 AFB00030 */ sw $s0, 0x30($sp) /* 109878 802E7FF8 F7BE0080 */ sdc1 $f30, 0x80($sp) /* 10987C 802E7FFC F7BA0070 */ sdc1 $f26, 0x70($sp) /* 109880 802E8000 F7B60060 */ sdc1 $f22, 0x60($sp) /* 109884 802E8004 F7B40058 */ sdc1 $f20, 0x58($sp) /* 109888 802E8008 8FD20040 */ lw $s2, 0x40($fp) /* 10988C 802E800C 4600C786 */ mov.s $f30, $f24 /* 109890 802E8010 4600C686 */ mov.s $f26, $f24 /* 109894 802E8014 0240882D */ daddu $s1, $s2, $zero /* 109898 802E8018 0240802D */ daddu $s0, $s2, $zero .L802E801C: /* 10989C 802E801C 82230010 */ lb $v1, 0x10($s1) /* 1098A0 802E8020 24020001 */ addiu $v0, $zero, 0x1 /* 1098A4 802E8024 10620028 */ beq $v1, $v0, .L802E80C8 /* 1098A8 802E8028 28620002 */ slti $v0, $v1, 0x2 /* 1098AC 802E802C 10400005 */ beqz $v0, .L802E8044 /* 1098B0 802E8030 24020002 */ addiu $v0, $zero, 0x2 /* 1098B4 802E8034 10600009 */ beqz $v1, .L802E805C /* 1098B8 802E8038 00000000 */ nop /* 1098BC 802E803C 080BA05A */ j .L802E8168 /* 1098C0 802E8040 00000000 */ nop .L802E8044: /* 1098C4 802E8044 10620029 */ beq $v1, $v0, .L802E80EC /* 1098C8 802E8048 24020003 */ addiu $v0, $zero, 0x3 /* 1098CC 802E804C 50620046 */ beql $v1, $v0, .L802E8168 /* 1098D0 802E8050 26730001 */ addiu $s3, $s3, 0x1 /* 1098D4 802E8054 080BA05A */ j .L802E8168 /* 1098D8 802E8058 00000000 */ nop .L802E805C: /* 1098DC 802E805C 3C014000 */ lui $at, (0x40000000 >> 16) /* 1098E0 802E8060 4481F000 */ mtc1 $at, $f30 /* 1098E4 802E8064 922200A0 */ lbu $v0, 0xA0($s1) /* 1098E8 802E8068 C61800C4 */ lwc1 $f24, 0xC4($s0) /* 1098EC 802E806C 3C014120 */ lui $at, (0x41200000 >> 16) /* 1098F0 802E8070 44810000 */ mtc1 $at, $f0 /* 1098F4 802E8074 44801000 */ mtc1 $zero, $f2 /* 1098F8 802E8078 44822000 */ mtc1 $v0, $f4 /* 1098FC 802E807C 00000000 */ nop /* 109900 802E8080 46802120 */ cvt.s.w $f4, $f4 /* 109904 802E8084 4618103E */ c.le.s $f2, $f24 /* 109908 802E8088 00000000 */ nop /* 10990C 802E808C 45000006 */ bc1f .L802E80A8 /* 109910 802E8090 46002683 */ div.s $f26, $f4, $f0 /* 109914 802E8094 3C01802F */ lui $at, %hi(D_802EB350) /* 109918 802E8098 D422B350 */ ldc1 $f2, %lo(D_802EB350)($at) /* 10991C 802E809C 4600C021 */ cvt.d.s $f0, $f24 /* 109920 802E80A0 080BA02F */ j .L802E80BC /* 109924 802E80A4 46220001 */ sub.d $f0, $f0, $f2 .L802E80A8: /* 109928 802E80A8 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 10992C 802E80AC 44811800 */ mtc1 $at, $f3 /* 109930 802E80B0 44801000 */ mtc1 $zero, $f2 /* 109934 802E80B4 4600C021 */ cvt.d.s $f0, $f24 /* 109938 802E80B8 46220000 */ add.d $f0, $f0, $f2 .L802E80BC: /* 10993C 802E80BC 46200020 */ cvt.s.d $f0, $f0 /* 109940 802E80C0 080BA05A */ j .L802E8168 /* 109944 802E80C4 E60000C4 */ swc1 $f0, 0xC4($s0) .L802E80C8: /* 109948 802E80C8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 10994C 802E80CC 4481D000 */ mtc1 $at, $f26 /* 109950 802E80D0 C60200C4 */ lwc1 $f2, 0xC4($s0) /* 109954 802E80D4 3C013E80 */ lui $at, (0x3E800000 >> 16) /* 109958 802E80D8 44810000 */ mtc1 $at, $f0 /* 10995C 802E80DC 4480F000 */ mtc1 $zero, $f30 /* 109960 802E80E0 46001602 */ mul.s $f24, $f2, $f0 /* 109964 802E80E4 080BA05A */ j .L802E8168 /* 109968 802E80E8 00000000 */ nop .L802E80EC: /* 10996C 802E80EC C60200C4 */ lwc1 $f2, 0xC4($s0) /* 109970 802E80F0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 109974 802E80F4 44810000 */ mtc1 $at, $f0 /* 109978 802E80F8 00000000 */ nop /* 10997C 802E80FC 46001080 */ add.s $f2, $f2, $f0 /* 109980 802E8100 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 109984 802E8104 44810000 */ mtc1 $at, $f0 /* 109988 802E8108 00000000 */ nop /* 10998C 802E810C 4602003C */ c.lt.s $f0, $f2 /* 109990 802E8110 00000000 */ nop /* 109994 802E8114 45000002 */ bc1f .L802E8120 /* 109998 802E8118 E60200C4 */ swc1 $f2, 0xC4($s0) /* 10999C 802E811C E60000C4 */ swc1 $f0, 0xC4($s0) .L802E8120: /* 1099A0 802E8120 C60200C4 */ lwc1 $f2, 0xC4($s0) /* 1099A4 802E8124 3C01428C */ lui $at, (0x428C0000 >> 16) /* 1099A8 802E8128 44812000 */ mtc1 $at, $f4 /* 1099AC 802E812C C60001E4 */ lwc1 $f0, 0x1E4($s0) /* 1099B0 802E8130 46041083 */ div.s $f2, $f2, $f4 /* 1099B4 802E8134 46020001 */ sub.s $f0, $f0, $f2 /* 1099B8 802E8138 E60001E4 */ swc1 $f0, 0x1E4($s0) /* 1099BC 802E813C 92220034 */ lbu $v0, 0x34($s1) /* 1099C0 802E8140 2442FFFB */ addiu $v0, $v0, -0x5 /* 1099C4 802E8144 A2220034 */ sb $v0, 0x34($s1) /* 1099C8 802E8148 304200FF */ andi $v0, $v0, 0xFF /* 1099CC 802E814C 2C420006 */ sltiu $v0, $v0, 0x6 /* 1099D0 802E8150 10400005 */ beqz $v0, .L802E8168 /* 1099D4 802E8154 00000000 */ nop /* 1099D8 802E8158 92220010 */ lbu $v0, 0x10($s1) /* 1099DC 802E815C A2200034 */ sb $zero, 0x34($s1) /* 1099E0 802E8160 24420001 */ addiu $v0, $v0, 0x1 /* 1099E4 802E8164 A2220010 */ sb $v0, 0x10($s1) .L802E8168: /* 1099E8 802E8168 82220010 */ lb $v0, 0x10($s1) /* 1099EC 802E816C 28420002 */ slti $v0, $v0, 0x2 /* 1099F0 802E8170 504000DB */ beql $v0, $zero, .L802E84E0 /* 1099F4 802E8174 26310001 */ addiu $s1, $s1, 0x1 /* 1099F8 802E8178 C6020304 */ lwc1 $f2, 0x304($s0) /* 1099FC 802E817C 44800000 */ mtc1 $zero, $f0 /* 109A00 802E8180 00000000 */ nop /* 109A04 802E8184 4602003E */ c.le.s $f0, $f2 /* 109A08 802E8188 3C01802F */ lui $at, %hi(D_802EB358) /* 109A0C 802E818C D420B358 */ ldc1 $f0, %lo(D_802EB358)($at) /* 109A10 802E8190 45000003 */ bc1f .L802E81A0 /* 109A14 802E8194 460010A1 */ cvt.d.s $f2, $f2 /* 109A18 802E8198 3C01802F */ lui $at, %hi(D_802EB360) /* 109A1C 802E819C D420B360 */ ldc1 $f0, %lo(D_802EB360)($at) .L802E81A0: /* 109A20 802E81A0 46201081 */ sub.d $f2, $f2, $f0 /* 109A24 802E81A4 3C01802F */ lui $at, %hi(D_802EB368) /* 109A28 802E81A8 D424B368 */ ldc1 $f4, %lo(D_802EB368)($at) /* 109A2C 802E81AC 462010A0 */ cvt.s.d $f2, $f2 /* 109A30 802E81B0 46001021 */ cvt.d.s $f0, $f2 /* 109A34 802E81B4 4624003C */ c.lt.d $f0, $f4 /* 109A38 802E81B8 00000000 */ nop /* 109A3C 802E81BC 45000006 */ bc1f .L802E81D8 /* 109A40 802E81C0 E6020304 */ swc1 $f2, 0x304($s0) /* 109A44 802E81C4 3C01C123 */ lui $at, (0xC1233333 >> 16) /* 109A48 802E81C8 34213333 */ ori $at, $at, (0xC1233333 & 0xFFFF) /* 109A4C 802E81CC 44810000 */ mtc1 $at, $f0 /* 109A50 802E81D0 00000000 */ nop /* 109A54 802E81D4 E6000304 */ swc1 $f0, 0x304($s0) .L802E81D8: /* 109A58 802E81D8 C60001E4 */ lwc1 $f0, 0x1E4($s0) /* 109A5C 802E81DC C6020304 */ lwc1 $f2, 0x304($s0) /* 109A60 802E81E0 46020000 */ add.s $f0, $f0, $f2 /* 109A64 802E81E4 E60001E4 */ swc1 $f0, 0x1E4($s0) /* 109A68 802E81E8 92220034 */ lbu $v0, 0x34($s1) /* 109A6C 802E81EC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 109A70 802E81F0 44814000 */ mtc1 $at, $f8 /* 109A74 802E81F4 4482A000 */ mtc1 $v0, $f20 /* 109A78 802E81F8 00000000 */ nop /* 109A7C 802E81FC 4680A520 */ cvt.s.w $f20, $f20 /* 109A80 802E8200 4608A502 */ mul.s $f20, $f20, $f8 /* 109A84 802E8204 00000000 */ nop /* 109A88 802E8208 3C013B80 */ lui $at, (0x3B800000 >> 16) /* 109A8C 802E820C 44814000 */ mtc1 $at, $f8 /* 109A90 802E8210 00000000 */ nop /* 109A94 802E8214 4608A502 */ mul.s $f20, $f20, $f8 /* 109A98 802E8218 00000000 */ nop /* 109A9C 802E821C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 109AA0 802E8220 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 109AA4 802E8224 44814000 */ mtc1 $at, $f8 /* 109AA8 802E8228 00000000 */ nop /* 109AAC 802E822C 4608A002 */ mul.s $f0, $f20, $f8 /* 109AB0 802E8230 00000000 */ nop /* 109AB4 802E8234 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 109AB8 802E8238 44814000 */ mtc1 $at, $f8 /* 109ABC 802E823C 00000000 */ nop /* 109AC0 802E8240 46080583 */ div.s $f22, $f0, $f8 /* 109AC4 802E8244 0C00A85B */ jal sin_rad /* 109AC8 802E8248 4600B306 */ mov.s $f12, $f22 /* 109ACC 802E824C 4600D002 */ mul.s $f0, $f26, $f0 /* 109AD0 802E8250 00000000 */ nop /* 109AD4 802E8254 C6020154 */ lwc1 $f2, 0x154($s0) /* 109AD8 802E8258 46001080 */ add.s $f2, $f2, $f0 /* 109ADC 802E825C 4600B306 */ mov.s $f12, $f22 /* 109AE0 802E8260 0C00A874 */ jal cos_rad /* 109AE4 802E8264 E6020154 */ swc1 $f2, 0x154($s0) /* 109AE8 802E8268 4600D002 */ mul.s $f0, $f26, $f0 /* 109AEC 802E826C 00000000 */ nop /* 109AF0 802E8270 3C040004 */ lui $a0, (0x40000 >> 16) /* 109AF4 802E8274 C6020274 */ lwc1 $f2, 0x274($s0) /* 109AF8 802E8278 02C0282D */ daddu $a1, $s6, $zero /* 109AFC 802E827C 46001080 */ add.s $f2, $f2, $f0 /* 109B00 802E8280 C6000154 */ lwc1 $f0, 0x154($s0) /* 109B04 802E8284 02A0302D */ daddu $a2, $s5, $zero /* 109B08 802E8288 E6020274 */ swc1 $f2, 0x274($s0) /* 109B0C 802E828C C60201E4 */ lwc1 $f2, 0x1E4($s0) /* 109B10 802E8290 C6040274 */ lwc1 $f4, 0x274($s0) /* 109B14 802E8294 0280382D */ daddu $a3, $s4, $zero /* 109B18 802E8298 E7A00020 */ swc1 $f0, 0x20($sp) /* 109B1C 802E829C E7A20024 */ swc1 $f2, 0x24($sp) /* 109B20 802E82A0 E7A40028 */ swc1 $f4, 0x28($sp) /* 109B24 802E82A4 E7BA0010 */ swc1 $f26, 0x10($sp) /* 109B28 802E82A8 E7B40014 */ swc1 $f20, 0x14($sp) /* 109B2C 802E82AC E7BC0018 */ swc1 $f28, 0x18($sp) /* 109B30 802E82B0 0C0376B9 */ jal npc_test_move_taller_with_slipping /* 109B34 802E82B4 E7BC001C */ swc1 $f28, 0x1C($sp) /* 109B38 802E82B8 10400031 */ beqz $v0, .L802E8380 /* 109B3C 802E82BC 3C040004 */ lui $a0, (0x40000 >> 16) /* 109B40 802E82C0 C7A00020 */ lwc1 $f0, 0x20($sp) /* 109B44 802E82C4 C7A20024 */ lwc1 $f2, 0x24($sp) /* 109B48 802E82C8 C7A40028 */ lwc1 $f4, 0x28($sp) /* 109B4C 802E82CC E6000154 */ swc1 $f0, 0x154($s0) /* 109B50 802E82D0 E60201E4 */ swc1 $f2, 0x1E4($s0) /* 109B54 802E82D4 E6040274 */ swc1 $f4, 0x274($s0) /* 109B58 802E82D8 92220034 */ lbu $v0, 0x34($s1) /* 109B5C 802E82DC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 109B60 802E82E0 44814000 */ mtc1 $at, $f8 /* 109B64 802E82E4 24420080 */ addiu $v0, $v0, 0x80 /* 109B68 802E82E8 A2220034 */ sb $v0, 0x34($s1) /* 109B6C 802E82EC 304200FF */ andi $v0, $v0, 0xFF /* 109B70 802E82F0 44820000 */ mtc1 $v0, $f0 /* 109B74 802E82F4 00000000 */ nop /* 109B78 802E82F8 46800020 */ cvt.s.w $f0, $f0 /* 109B7C 802E82FC 46080002 */ mul.s $f0, $f0, $f8 /* 109B80 802E8300 00000000 */ nop /* 109B84 802E8304 3C013B80 */ lui $at, (0x3B800000 >> 16) /* 109B88 802E8308 44814000 */ mtc1 $at, $f8 /* 109B8C 802E830C 00000000 */ nop /* 109B90 802E8310 46080002 */ mul.s $f0, $f0, $f8 /* 109B94 802E8314 00000000 */ nop /* 109B98 802E8318 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 109B9C 802E831C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 109BA0 802E8320 44814000 */ mtc1 $at, $f8 /* 109BA4 802E8324 00000000 */ nop /* 109BA8 802E8328 46080002 */ mul.s $f0, $f0, $f8 /* 109BAC 802E832C 00000000 */ nop /* 109BB0 802E8330 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 109BB4 802E8334 44814000 */ mtc1 $at, $f8 /* 109BB8 802E8338 00000000 */ nop /* 109BBC 802E833C 46080583 */ div.s $f22, $f0, $f8 /* 109BC0 802E8340 0C00A85B */ jal sin_rad /* 109BC4 802E8344 4600B306 */ mov.s $f12, $f22 /* 109BC8 802E8348 461C0002 */ mul.s $f0, $f0, $f28 /* 109BCC 802E834C 00000000 */ nop /* 109BD0 802E8350 C6020154 */ lwc1 $f2, 0x154($s0) /* 109BD4 802E8354 46001080 */ add.s $f2, $f2, $f0 /* 109BD8 802E8358 4600B306 */ mov.s $f12, $f22 /* 109BDC 802E835C 0C00A874 */ jal cos_rad /* 109BE0 802E8360 E6020154 */ swc1 $f2, 0x154($s0) /* 109BE4 802E8364 461C0002 */ mul.s $f0, $f0, $f28 /* 109BE8 802E8368 00000000 */ nop /* 109BEC 802E836C C6020274 */ lwc1 $f2, 0x274($s0) /* 109BF0 802E8370 46001080 */ add.s $f2, $f2, $f0 /* 109BF4 802E8374 4600E686 */ mov.s $f26, $f28 /* 109BF8 802E8378 E6020274 */ swc1 $f2, 0x274($s0) /* 109BFC 802E837C 3C040004 */ lui $a0, (0x40000 >> 16) .L802E8380: /* 109C00 802E8380 02C0282D */ daddu $a1, $s6, $zero /* 109C04 802E8384 02A0302D */ daddu $a2, $s5, $zero /* 109C08 802E8388 0280382D */ daddu $a3, $s4, $zero /* 109C0C 802E838C 27A2002C */ addiu $v0, $sp, 0x2C /* 109C10 802E8390 C60201E4 */ lwc1 $f2, 0x1E4($s0) /* 109C14 802E8394 C6060154 */ lwc1 $f6, 0x154($s0) /* 109C18 802E8398 461C1080 */ add.s $f2, $f2, $f28 /* 109C1C 802E839C C6000304 */ lwc1 $f0, 0x304($s0) /* 109C20 802E83A0 C6040274 */ lwc1 $f4, 0x274($s0) /* 109C24 802E83A4 46000005 */ abs.s $f0, $f0 /* 109C28 802E83A8 E7A60020 */ swc1 $f6, 0x20($sp) /* 109C2C 802E83AC E7A40028 */ swc1 $f4, 0x28($sp) /* 109C30 802E83B0 E7A0002C */ swc1 $f0, 0x2C($sp) /* 109C34 802E83B4 E7A20024 */ swc1 $f2, 0x24($sp) /* 109C38 802E83B8 0C0372DF */ jal npc_raycast_down_sides /* 109C3C 802E83BC AFA20010 */ sw $v0, 0x10($sp) /* 109C40 802E83C0 1440000B */ bnez $v0, .L802E83F0 /* 109C44 802E83C4 00000000 */ nop /* 109C48 802E83C8 C640000C */ lwc1 $f0, 0xC($s2) /* 109C4C 802E83CC 3C014348 */ lui $at, (0x43480000 >> 16) /* 109C50 802E83D0 44811000 */ mtc1 $at, $f2 /* 109C54 802E83D4 00000000 */ nop /* 109C58 802E83D8 46020001 */ sub.s $f0, $f0, $f2 /* 109C5C 802E83DC C7A20024 */ lwc1 $f2, 0x24($sp) /* 109C60 802E83E0 4600103C */ c.lt.s $f2, $f0 /* 109C64 802E83E4 00000000 */ nop /* 109C68 802E83E8 45000010 */ bc1f .L802E842C /* 109C6C 802E83EC 00000000 */ nop .L802E83F0: /* 109C70 802E83F0 92220010 */ lbu $v0, 0x10($s1) /* 109C74 802E83F4 24420001 */ addiu $v0, $v0, 0x1 /* 109C78 802E83F8 A2220010 */ sb $v0, 0x10($s1) /* 109C7C 802E83FC C6000304 */ lwc1 $f0, 0x304($s0) /* 109C80 802E8400 C7A20024 */ lwc1 $f2, 0x24($sp) /* 109C84 802E8404 46000005 */ abs.s $f0, $f0 /* 109C88 802E8408 46001080 */ add.s $f2, $f2, $f0 /* 109C8C 802E840C E61E0304 */ swc1 $f30, 0x304($s0) /* 109C90 802E8410 E60201E4 */ swc1 $f2, 0x1E4($s0) /* 109C94 802E8414 82230010 */ lb $v1, 0x10($s1) /* 109C98 802E8418 24020002 */ addiu $v0, $zero, 0x2 /* 109C9C 802E841C 14620003 */ bne $v1, $v0, .L802E842C /* 109CA0 802E8420 240200FE */ addiu $v0, $zero, 0xFE /* 109CA4 802E8424 A2220034 */ sb $v0, 0x34($s1) /* 109CA8 802E8428 AE0000C4 */ sw $zero, 0xC4($s0) .L802E842C: /* 109CAC 802E842C 92220058 */ lbu $v0, 0x58($s1) /* 109CB0 802E8430 44820000 */ mtc1 $v0, $f0 /* 109CB4 802E8434 00000000 */ nop /* 109CB8 802E8438 46800020 */ cvt.s.w $f0, $f0 /* 109CBC 802E843C 46180000 */ add.s $f0, $f0, $f24 /* 109CC0 802E8440 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 109CC4 802E8444 44814000 */ mtc1 $at, $f8 /* 109CC8 802E8448 00000000 */ nop /* 109CCC 802E844C 4600403E */ c.le.s $f8, $f0 /* 109CD0 802E8450 00000000 */ nop /* 109CD4 802E8454 45010005 */ bc1t .L802E846C /* 109CD8 802E8458 26230058 */ addiu $v1, $s1, 0x58 /* 109CDC 802E845C 4600020D */ trunc.w.s $f8, $f0 /* 109CE0 802E8460 44024000 */ mfc1 $v0, $f8 /* 109CE4 802E8464 080BA121 */ j .L802E8484 /* 109CE8 802E8468 A0620000 */ sb $v0, 0x0($v1) .L802E846C: /* 109CEC 802E846C 46080001 */ sub.s $f0, $f0, $f8 /* 109CF0 802E8470 4600020D */ trunc.w.s $f8, $f0 /* 109CF4 802E8474 44024000 */ mfc1 $v0, $f8 /* 109CF8 802E8478 00000000 */ nop /* 109CFC 802E847C 00571025 */ or $v0, $v0, $s7 /* 109D00 802E8480 A0620000 */ sb $v0, 0x0($v1) .L802E8484: /* 109D04 802E8484 9222007C */ lbu $v0, 0x7C($s1) /* 109D08 802E8488 44820000 */ mtc1 $v0, $f0 /* 109D0C 802E848C 00000000 */ nop /* 109D10 802E8490 46800020 */ cvt.s.w $f0, $f0 /* 109D14 802E8494 46180001 */ sub.s $f0, $f0, $f24 /* 109D18 802E8498 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 109D1C 802E849C 44814000 */ mtc1 $at, $f8 /* 109D20 802E84A0 00000000 */ nop /* 109D24 802E84A4 4600403E */ c.le.s $f8, $f0 /* 109D28 802E84A8 00000000 */ nop /* 109D2C 802E84AC 45010005 */ bc1t .L802E84C4 /* 109D30 802E84B0 2623007C */ addiu $v1, $s1, 0x7C /* 109D34 802E84B4 4600020D */ trunc.w.s $f8, $f0 /* 109D38 802E84B8 44024000 */ mfc1 $v0, $f8 /* 109D3C 802E84BC 080BA137 */ j .L802E84DC /* 109D40 802E84C0 A0620000 */ sb $v0, 0x0($v1) .L802E84C4: /* 109D44 802E84C4 46080001 */ sub.s $f0, $f0, $f8 /* 109D48 802E84C8 4600020D */ trunc.w.s $f8, $f0 /* 109D4C 802E84CC 44024000 */ mfc1 $v0, $f8 /* 109D50 802E84D0 00000000 */ nop /* 109D54 802E84D4 00571025 */ or $v0, $v0, $s7 /* 109D58 802E84D8 A0620000 */ sb $v0, 0x0($v1) .L802E84DC: /* 109D5C 802E84DC 26310001 */ addiu $s1, $s1, 0x1 .L802E84E0: /* 109D60 802E84E0 26420023 */ addiu $v0, $s2, 0x23 /* 109D64 802E84E4 0222102A */ slt $v0, $s1, $v0 /* 109D68 802E84E8 1440FECC */ bnez $v0, .L802E801C /* 109D6C 802E84EC 26100004 */ addiu $s0, $s0, 0x4 /* 109D70 802E84F0 2A620023 */ slti $v0, $s3, 0x23 /* 109D74 802E84F4 14400003 */ bnez $v0, .L802E8504 /* 109D78 802E84F8 00000000 */ nop /* 109D7C 802E84FC 0C043F5A */ jal exec_entity_commandlist /* 109D80 802E8500 03C0202D */ daddu $a0, $fp, $zero .L802E8504: /* 109D84 802E8504 8FBF0054 */ lw $ra, 0x54($sp) /* 109D88 802E8508 8FBE0050 */ lw $fp, 0x50($sp) /* 109D8C 802E850C 8FB7004C */ lw $s7, 0x4C($sp) /* 109D90 802E8510 8FB60048 */ lw $s6, 0x48($sp) /* 109D94 802E8514 8FB50044 */ lw $s5, 0x44($sp) /* 109D98 802E8518 8FB40040 */ lw $s4, 0x40($sp) /* 109D9C 802E851C 8FB3003C */ lw $s3, 0x3C($sp) /* 109DA0 802E8520 8FB20038 */ lw $s2, 0x38($sp) /* 109DA4 802E8524 8FB10034 */ lw $s1, 0x34($sp) /* 109DA8 802E8528 8FB00030 */ lw $s0, 0x30($sp) /* 109DAC 802E852C D7BE0080 */ ldc1 $f30, 0x80($sp) /* 109DB0 802E8530 D7BC0078 */ ldc1 $f28, 0x78($sp) /* 109DB4 802E8534 D7BA0070 */ ldc1 $f26, 0x70($sp) /* 109DB8 802E8538 D7B80068 */ ldc1 $f24, 0x68($sp) /* 109DBC 802E853C D7B60060 */ ldc1 $f22, 0x60($sp) /* 109DC0 802E8540 D7B40058 */ ldc1 $f20, 0x58($sp) /* 109DC4 802E8544 03E00008 */ jr $ra /* 109DC8 802E8548 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: void entity_WoodenCrate_update_fragments(Entity* entity) { WoodenCrateData* data = entity->dataBuf.crate; f32 rotSpeed, lateralSpeed, reboundSpeed; f32 moveAngle, yawRad; s32 i; s32 numFragmentsDisappeared; f32 hitX, hitY, hitZ, hitDepth; numFragmentsDisappeared = 0; rotSpeed = 0.0f; reboundSpeed = 0.0f; lateralSpeed = 0.0f; for (i = 0; i < 35; i++) { switch (data->fragmentRebounds[i]) { case 0: reboundSpeed = 2.0f; rotSpeed = data->fragmentRotationSpeed[i]; lateralSpeed = data->fragmentLateralSpeed[i] / 10.0f; if (rotSpeed >= 0.0f) { data->fragmentRotationSpeed[i] = rotSpeed - 0.4; } else { data->fragmentRotationSpeed[i] = rotSpeed + 0.5; } break; case 1: lateralSpeed = 1.0f; reboundSpeed = 0.0f; rotSpeed = data->fragmentRotationSpeed[i] * 0.25f; break; case 2: data->fragmentRotationSpeed[i] += 1.0f; if (data->fragmentRotationSpeed[i] > 20.0f) { data->fragmentRotationSpeed[i] = 20.0f; } data->fragmentPosY[i] -= data->fragmentRotationSpeed[i] / 70.0f; data->fragmentMoveAngle[i] -= 5; if (data->fragmentMoveAngle[i] <= 5) { data->fragmentMoveAngle[i] = 0; data->fragmentRebounds[i]++; } break; case 3: numFragmentsDisappeared++; break; } if (data->fragmentRebounds[i] < 2) { if (data->fragmentFallSpeed[i] >= 0.0f) { data->fragmentFallSpeed[i] -= 0.8; if (data->fragmentFallSpeed[i] < -10.2) { data->fragmentFallSpeed[i] = -10.2f; } } else { data->fragmentFallSpeed[i] -= 1.6; if (data->fragmentFallSpeed[i] < -10.2) { data->fragmentFallSpeed[i] = -10.2f; } } data->fragmentPosY[i] += data->fragmentFallSpeed[i]; yawRad = data->fragmentMoveAngle[i] * 360.0f / 256; moveAngle = DEG_TO_RAD(yawRad); data->fragmentPosX[i] += lateralSpeed * sin_rad(moveAngle); data->fragmentPosZ[i] += lateralSpeed * cos_rad(moveAngle); hitX = data->fragmentPosX[i]; hitY = data->fragmentPosY[i]; hitZ = data->fragmentPosZ[i]; if (npc_test_move_taller_with_slipping(COLLISION_IGNORE_ENTITIES, &hitX, &hitY, &hitZ, lateralSpeed, yawRad, 8.0f, 8.0f)) { data->fragmentPosX[i] = hitX; data->fragmentPosY[i] = hitY; data->fragmentPosZ[i] = hitZ; data->fragmentMoveAngle[i] += 0x80; // inverse yaw moveAngle = DEG_TO_RAD(data->fragmentMoveAngle[i] * 360.0f / 256); lateralSpeed = 8.0f; data->fragmentPosX[i] += lateralSpeed * sin_rad(moveAngle); data->fragmentPosZ[i] += lateralSpeed * cos_rad(moveAngle); } hitX = data->fragmentPosX[i]; hitY = data->fragmentPosY[i] + 8.0f; hitZ = data->fragmentPosZ[i]; hitDepth = fabsf(data->fragmentFallSpeed[i]); if (npc_raycast_down_sides(COLLISION_IGNORE_ENTITIES, &hitX, &hitY, &hitZ, &hitDepth) || hitY < data->basePosY - 200.0f) { data->fragmentRebounds[i]++; data->fragmentPosY[i] = hitY + fabsf(data->fragmentFallSpeed[i]); data->fragmentFallSpeed[i] = reboundSpeed; if (data->fragmentRebounds[i] == 2) { data->fragmentMoveAngle[i] = 254; data->fragmentRotationSpeed[i] = 0.0f; } } data->fragmentRotX[i] += rotSpeed; data->fragmentRotY[i] -= rotSpeed; } } if (numFragmentsDisappeared >= 35) { exec_entity_commandlist(entity); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel bombette_breaking_main /* 388A54 E0084084 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 388A58 E0084088 AFB5007C */ sw $s5, 0x7C($sp) /* 388A5C E008408C 0080A82D */ daddu $s5, $a0, $zero /* 388A60 E0084090 30A4FFFF */ andi $a0, $a1, 0xFFFF /* 388A64 E0084094 27A20044 */ addiu $v0, $sp, 0x44 /* 388A68 E0084098 AFA20010 */ sw $v0, 0x10($sp) /* 388A6C E008409C 27A20048 */ addiu $v0, $sp, 0x48 /* 388A70 E00840A0 AFA20014 */ sw $v0, 0x14($sp) /* 388A74 E00840A4 27A2004C */ addiu $v0, $sp, 0x4C /* 388A78 E00840A8 AFB60080 */ sw $s6, 0x80($sp) /* 388A7C E00840AC 00C0B02D */ daddu $s6, $a2, $zero /* 388A80 E00840B0 27A50038 */ addiu $a1, $sp, 0x38 /* 388A84 E00840B4 27A6003C */ addiu $a2, $sp, 0x3C /* 388A88 E00840B8 F7B60090 */ sdc1 $f22, 0x90($sp) /* 388A8C E00840BC 4487B000 */ mtc1 $a3, $f22 /* 388A90 E00840C0 27A70040 */ addiu $a3, $sp, 0x40 /* 388A94 E00840C4 AFBF0084 */ sw $ra, 0x84($sp) /* 388A98 E00840C8 AFB40078 */ sw $s4, 0x78($sp) /* 388A9C E00840CC AFB30074 */ sw $s3, 0x74($sp) /* 388AA0 E00840D0 AFB20070 */ sw $s2, 0x70($sp) /* 388AA4 E00840D4 AFB1006C */ sw $s1, 0x6C($sp) /* 388AA8 E00840D8 AFB00068 */ sw $s0, 0x68($sp) /* 388AAC E00840DC F7BE00B0 */ sdc1 $f30, 0xB0($sp) /* 388AB0 E00840E0 F7BC00A8 */ sdc1 $f28, 0xA8($sp) /* 388AB4 E00840E4 F7BA00A0 */ sdc1 $f26, 0xA0($sp) /* 388AB8 E00840E8 F7B80098 */ sdc1 $f24, 0x98($sp) /* 388ABC E00840EC F7B40088 */ sdc1 $f20, 0x88($sp) /* 388AC0 E00840F0 0C021000 */ jal bombette_breaking_get_model_center_and_size /* 388AC4 E00840F4 AFA20018 */ sw $v0, 0x18($sp) /* 388AC8 E00840F8 C7A80044 */ lwc1 $f8, 0x44($sp) /* 388ACC E00840FC 3C013D80 */ lui $at, (0x3D800000 >> 16) /* 388AD0 E0084100 44810000 */ mtc1 $at, $f0 /* 388AD4 E0084104 00000000 */ nop /* 388AD8 E0084108 46004182 */ mul.s $f6, $f8, $f0 /* 388ADC E008410C 00000000 */ nop /* 388AE0 E0084110 C7AA0048 */ lwc1 $f10, 0x48($sp) /* 388AE4 E0084114 46005102 */ mul.s $f4, $f10, $f0 /* 388AE8 E0084118 00000000 */ nop /* 388AEC E008411C C7AC004C */ lwc1 $f12, 0x4C($sp) /* 388AF0 E0084120 46006002 */ mul.s $f0, $f12, $f0 /* 388AF4 E0084124 00000000 */ nop /* 388AF8 E0084128 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 388AFC E008412C 44811000 */ mtc1 $at, $f2 /* 388B00 E0084130 00000000 */ nop /* 388B04 E0084134 46023180 */ add.s $f6, $f6, $f2 /* 388B08 E0084138 27B00020 */ addiu $s0, $sp, 0x20 /* 388B0C E008413C 46022100 */ add.s $f4, $f4, $f2 /* 388B10 E0084140 4600470D */ trunc.w.s $f28, $f8 /* 388B14 E0084144 4403E000 */ mfc1 $v1, $f28 /* 388B18 E0084148 46020000 */ add.s $f0, $f0, $f2 /* 388B1C E008414C 4600370D */ trunc.w.s $f28, $f6 /* 388B20 E0084150 4412E000 */ mfc1 $s2, $f28 /* 388B24 E0084154 4600270D */ trunc.w.s $f28, $f4 /* 388B28 E0084158 4413E000 */ mfc1 $s3, $f28 /* 388B2C E008415C 4600070D */ trunc.w.s $f28, $f0 /* 388B30 E0084160 4411E000 */ mfc1 $s1, $f28 /* 388B34 E0084164 04610002 */ bgez $v1, .LE0084170 /* 388B38 E0084168 0060102D */ daddu $v0, $v1, $zero /* 388B3C E008416C 2462000F */ addiu $v0, $v1, 0xF .LE0084170: /* 388B40 E0084170 00021103 */ sra $v0, $v0, 4 /* 388B44 E0084174 00021100 */ sll $v0, $v0, 4 /* 388B48 E0084178 00621023 */ subu $v0, $v1, $v0 /* 388B4C E008417C 4482A000 */ mtc1 $v0, $f20 /* 388B50 E0084180 00000000 */ nop /* 388B54 E0084184 4680A520 */ cvt.s.w $f20, $f20 /* 388B58 E0084188 4600570D */ trunc.w.s $f28, $f10 /* 388B5C E008418C 4403E000 */ mfc1 $v1, $f28 /* 388B60 E0084190 00000000 */ nop /* 388B64 E0084194 04610002 */ bgez $v1, .LE00841A0 /* 388B68 E0084198 0060102D */ daddu $v0, $v1, $zero /* 388B6C E008419C 2462000F */ addiu $v0, $v1, 0xF .LE00841A0: /* 388B70 E00841A0 00021103 */ sra $v0, $v0, 4 /* 388B74 E00841A4 00021100 */ sll $v0, $v0, 4 /* 388B78 E00841A8 00621023 */ subu $v0, $v1, $v0 /* 388B7C E00841AC 4482F000 */ mtc1 $v0, $f30 /* 388B80 E00841B0 00000000 */ nop /* 388B84 E00841B4 4680F7A0 */ cvt.s.w $f30, $f30 /* 388B88 E00841B8 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 388B8C E00841BC 44810800 */ mtc1 $at, $f1 /* 388B90 E00841C0 44800000 */ mtc1 $zero, $f0 /* 388B94 E00841C4 4600A121 */ cvt.d.s $f4, $f20 /* 388B98 E00841C8 46202102 */ mul.d $f4, $f4, $f0 /* 388B9C E00841CC 00000000 */ nop /* 388BA0 E00841D0 4600F0A1 */ cvt.d.s $f2, $f30 /* 388BA4 E00841D4 46201082 */ mul.d $f2, $f2, $f0 /* 388BA8 E00841D8 00000000 */ nop /* 388BAC E00841DC 0200202D */ daddu $a0, $s0, $zero /* 388BB0 E00841E0 3C02E008 */ lui $v0, %hi(bombette_breaking_init) /* 388BB4 E00841E4 24424658 */ addiu $v0, $v0, %lo(bombette_breaking_init) /* 388BB8 E00841E8 AFA20028 */ sw $v0, 0x28($sp) /* 388BBC E00841EC 02530018 */ mult $s2, $s3 /* 388BC0 E00841F0 3C02E008 */ lui $v0, %hi(bombette_breaking_update) /* 388BC4 E00841F4 24424660 */ addiu $v0, $v0, %lo(bombette_breaking_update) /* 388BC8 E00841F8 AFA2002C */ sw $v0, 0x2C($sp) /* 388BCC E00841FC 3C02E008 */ lui $v0, %hi(bombette_breaking_render) /* 388BD0 E0084200 244248E4 */ addiu $v0, $v0, %lo(bombette_breaking_render) /* 388BD4 E0084204 AFA20030 */ sw $v0, 0x30($sp) /* 388BD8 E0084208 00004012 */ mflo $t0 /* 388BDC E008420C 24020042 */ addiu $v0, $zero, 0x42 /* 388BE0 E0084210 AFA00020 */ sw $zero, 0x20($sp) /* 388BE4 E0084214 01110018 */ mult $t0, $s1 /* 388BE8 E0084218 AFA00034 */ sw $zero, 0x34($sp) /* 388BEC E008421C AFA20024 */ sw $v0, 0x24($sp) /* 388BF0 E0084220 46202520 */ cvt.s.d $f20, $f4 /* 388BF4 E0084224 462017A0 */ cvt.s.d $f30, $f2 /* 388BF8 E0084228 00004012 */ mflo $t0 /* 388BFC E008422C 0C080124 */ jal shim_create_effect_instance /* 388C00 E0084230 25100001 */ addiu $s0, $t0, 0x1 /* 388C04 E0084234 00102080 */ sll $a0, $s0, 2 /* 388C08 E0084238 00902021 */ addu $a0, $a0, $s0 /* 388C0C E008423C 00042100 */ sll $a0, $a0, 4 /* 388C10 E0084240 0040A02D */ daddu $s4, $v0, $zero /* 388C14 E0084244 0C08012C */ jal shim_general_heap_malloc /* 388C18 E0084248 AE900008 */ sw $s0, 0x8($s4) /* 388C1C E008424C 0040202D */ daddu $a0, $v0, $zero /* 388C20 E0084250 14800003 */ bnez $a0, .LE0084260 /* 388C24 E0084254 AE84000C */ sw $a0, 0xC($s4) .LE0084258: /* 388C28 E0084258 08021096 */ j .LE0084258 /* 388C2C E008425C 00000000 */ nop .LE0084260: /* 388C30 E0084260 C7A00048 */ lwc1 $f0, 0x48($sp) /* 388C34 E0084264 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 388C38 E0084268 44815800 */ mtc1 $at, $f11 /* 388C3C E008426C 44805000 */ mtc1 $zero, $f10 /* 388C40 E0084270 46000107 */ neg.s $f4, $f0 /* 388C44 E0084274 46002121 */ cvt.d.s $f4, $f4 /* 388C48 E0084278 462A2102 */ mul.d $f4, $f4, $f10 /* 388C4C E008427C 00000000 */ nop /* 388C50 E0084280 8FA200CC */ lw $v0, 0xCC($sp) /* 388C54 E0084284 3C01E008 */ lui $at, (0xE0084E40 >> 16) /* 388C58 E0084288 D4224E40 */ ldc1 $f2, (0xE0084E40 & 0xFFFF)($at) /* 388C5C E008428C AC800048 */ sw $zero, 0x48($a0) /* 388C60 E0084290 A4950000 */ sh $s5, 0x0($a0) /* 388C64 E0084294 E4960038 */ swc1 $f22, 0x38($a0) /* 388C68 E0084298 46000021 */ cvt.d.s $f0, $f0 /* 388C6C E008429C 46220002 */ mul.d $f0, $f0, $f2 /* 388C70 E00842A0 00000000 */ nop /* 388C74 E00842A4 AC820044 */ sw $v0, 0x44($a0) /* 388C78 E00842A8 C7A20038 */ lwc1 $f2, 0x38($sp) /* 388C7C E00842AC 240200FF */ addiu $v0, $zero, 0xFF /* 388C80 E00842B0 AC82004C */ sw $v0, 0x4C($a0) /* 388C84 E00842B4 A4960002 */ sh $s6, 0x2($a0) /* 388C88 E00842B8 E4820008 */ swc1 $f2, 0x8($a0) /* 388C8C E00842BC C7A2003C */ lwc1 $f2, 0x3C($sp) /* 388C90 E00842C0 C7A60040 */ lwc1 $f6, 0x40($sp) /* 388C94 E00842C4 4616B200 */ add.s $f8, $f22, $f22 /* 388C98 E00842C8 E482000C */ swc1 $f2, 0xC($a0) /* 388C9C E00842CC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 388CA0 E00842D0 44811000 */ mtc1 $at, $f2 /* 388CA4 E00842D4 E488003C */ swc1 $f8, 0x3C($a0) /* 388CA8 E00842D8 E4860010 */ swc1 $f6, 0x10($a0) /* 388CAC E00842DC 46200020 */ cvt.s.d $f0, $f0 /* 388CB0 E00842E0 46202120 */ cvt.s.d $f4, $f4 /* 388CB4 E00842E4 4602003C */ c.lt.s $f0, $f2 /* 388CB8 E00842E8 E4840004 */ swc1 $f4, 0x4($a0) /* 388CBC E00842EC 45000002 */ bc1f .LE00842F8 /* 388CC0 E00842F0 E4800040 */ swc1 $f0, 0x40($a0) /* 388CC4 E00842F4 E4820040 */ swc1 $f2, 0x40($a0) .LE00842F8: /* 388CC8 E00842F8 24840050 */ addiu $a0, $a0, 0x50 /* 388CCC E00842FC 1A4000C5 */ blez $s2, .LE0084614 /* 388CD0 E0084300 0000382D */ daddu $a3, $zero, $zero /* 388CD4 E0084304 C7BA0044 */ lwc1 $f26, 0x44($sp) /* 388CD8 E0084308 46205486 */ mov.d $f18, $f10 /* 388CDC E008430C 4600D0A1 */ cvt.d.s $f2, $f26 /* 388CE0 E0084310 46321082 */ mul.d $f2, $f2, $f18 /* 388CE4 E0084314 00000000 */ nop /* 388CE8 E0084318 C7BC0048 */ lwc1 $f28, 0x48($sp) /* 388CEC E008431C C7B6004C */ lwc1 $f22, 0x4C($sp) /* 388CF0 E0084320 3C01E008 */ lui $at, (0xE0084E48 >> 16) /* 388CF4 E0084324 D42C4E48 */ ldc1 $f12, (0xE0084E48 & 0xFFFF)($at) /* 388CF8 E0084328 4480C000 */ mtc1 $zero, $f24 /* 388CFC E008432C 4600A021 */ cvt.d.s $f0, $f20 /* 388D00 E0084330 E7BC0058 */ swc1 $f28, 0x58($sp) /* 388D04 E0084334 46220001 */ sub.d $f0, $f0, $f2 /* 388D08 E0084338 F7A00050 */ sdc1 $f0, 0x50($sp) .LE008433C: /* 388D0C E008433C 3C014180 */ lui $at, (0x41800000 >> 16) /* 388D10 E0084340 4481E000 */ mtc1 $at, $f28 /* 388D14 E0084344 44870000 */ mtc1 $a3, $f0 /* 388D18 E0084348 00000000 */ nop /* 388D1C E008434C 46800020 */ cvt.s.w $f0, $f0 /* 388D20 E0084350 461C0002 */ mul.s $f0, $f0, $f28 /* 388D24 E0084354 00000000 */ nop /* 388D28 E0084358 D7BC0050 */ ldc1 $f28, 0x50($sp) /* 388D2C E008435C 46000021 */ cvt.d.s $f0, $f0 /* 388D30 E0084360 4620E000 */ add.d $f0, $f28, $f0 /* 388D34 E0084364 0000302D */ daddu $a2, $zero, $zero /* 388D38 E0084368 46200020 */ cvt.s.d $f0, $f0 /* 388D3C E008436C 1A6000A5 */ blez $s3, .LE0084604 /* 388D40 E0084370 E7A00038 */ swc1 $f0, 0x38($sp) /* 388D44 E0084374 C7BC0058 */ lwc1 $f28, 0x58($sp) /* 388D48 E0084378 4600E0A1 */ cvt.d.s $f2, $f28 /* 388D4C E008437C 46321082 */ mul.d $f2, $f2, $f18 /* 388D50 E0084380 00000000 */ nop /* 388D54 E0084384 46000186 */ mov.s $f6, $f0 /* 388D58 E0084388 4600F021 */ cvt.d.s $f0, $f30 /* 388D5C E008438C 46220001 */ sub.d $f0, $f0, $f2 /* 388D60 E0084390 F7A00060 */ sdc1 $f0, 0x60($sp) .LE0084394: /* 388D64 E0084394 3C014180 */ lui $at, (0x41800000 >> 16) /* 388D68 E0084398 4481E000 */ mtc1 $at, $f28 /* 388D6C E008439C 44860000 */ mtc1 $a2, $f0 /* 388D70 E00843A0 00000000 */ nop /* 388D74 E00843A4 46800020 */ cvt.s.w $f0, $f0 /* 388D78 E00843A8 461C0002 */ mul.s $f0, $f0, $f28 /* 388D7C E00843AC 00000000 */ nop /* 388D80 E00843B0 D7BC0060 */ ldc1 $f28, 0x60($sp) /* 388D84 E00843B4 46000021 */ cvt.d.s $f0, $f0 /* 388D88 E00843B8 4620E000 */ add.d $f0, $f28, $f0 /* 388D8C E00843BC 0000282D */ daddu $a1, $zero, $zero /* 388D90 E00843C0 46200020 */ cvt.s.d $f0, $f0 /* 388D94 E00843C4 1A20008B */ blez $s1, .LE00845F4 /* 388D98 E00843C8 E7A0003C */ swc1 $f0, 0x3C($sp) /* 388D9C E00843CC 4600B0A1 */ cvt.d.s $f2, $f22 /* 388DA0 E00843D0 46321082 */ mul.d $f2, $f2, $f18 /* 388DA4 E00843D4 00000000 */ nop /* 388DA8 E00843D8 46000286 */ mov.s $f10, $f0 /* 388DAC E00843DC 2483004C */ addiu $v1, $a0, 0x4C /* 388DB0 E00843E0 4600F021 */ cvt.d.s $f0, $f30 /* 388DB4 E00843E4 3C01BFF0 */ lui $at, (0xBFF00000 >> 16) /* 388DB8 E00843E8 44818800 */ mtc1 $at, $f17 /* 388DBC E00843EC 44808000 */ mtc1 $zero, $f16 /* 388DC0 E00843F0 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 388DC4 E00843F4 44817800 */ mtc1 $at, $f15 /* 388DC8 E00843F8 44807000 */ mtc1 $zero, $f14 /* 388DCC E00843FC 44804000 */ mtc1 $zero, $f8 /* 388DD0 E0084400 44804800 */ mtc1 $zero, $f9 /* 388DD4 E0084404 46220501 */ sub.d $f20, $f0, $f2 .LE0084408: /* 388DD8 E0084408 3C014180 */ lui $at, (0x41800000 >> 16) /* 388DDC E008440C 4481E000 */ mtc1 $at, $f28 /* 388DE0 E0084410 44850000 */ mtc1 $a1, $f0 /* 388DE4 E0084414 00000000 */ nop /* 388DE8 E0084418 46800020 */ cvt.s.w $f0, $f0 /* 388DEC E008441C 461C0002 */ mul.s $f0, $f0, $f28 /* 388DF0 E0084420 00000000 */ nop /* 388DF4 E0084424 4616D03C */ c.lt.s $f26, $f22 /* 388DF8 E0084428 E466FFC8 */ swc1 $f6, -0x38($v1) /* 388DFC E008442C E466FFBC */ swc1 $f6, -0x44($v1) /* 388E00 E0084430 46000021 */ cvt.d.s $f0, $f0 /* 388E04 E0084434 4620A000 */ add.d $f0, $f20, $f0 /* 388E08 E0084438 E46AFFCC */ swc1 $f10, -0x34($v1) /* 388E0C E008443C E46AFFC0 */ swc1 $f10, -0x40($v1) /* 388E10 E0084440 46200020 */ cvt.s.d $f0, $f0 /* 388E14 E0084444 E7A00040 */ swc1 $f0, 0x40($sp) /* 388E18 E0084448 E460FFD0 */ swc1 $f0, -0x30($v1) /* 388E1C E008444C 45000017 */ bc1f .LE00844AC /* 388E20 E0084450 E460FFC4 */ swc1 $f0, -0x3C($v1) /* 388E24 E0084454 2A420002 */ slti $v0, $s2, 0x2 /* 388E28 E0084458 5440000A */ bnel $v0, $zero, .LE0084484 /* 388E2C E008445C 30A20001 */ andi $v0, $a1, 0x1 /* 388E30 E0084460 4600D0A1 */ cvt.d.s $f2, $f26 /* 388E34 E0084464 46321082 */ mul.d $f2, $f2, $f18 /* 388E38 E0084468 00000000 */ nop /* 388E3C E008446C 46003021 */ cvt.d.s $f0, $f6 /* 388E40 E0084470 46220003 */ div.d $f0, $f0, $f2 /* 388E44 E0084474 46200000 */ add.d $f0, $f0, $f0 /* 388E48 E0084478 46200020 */ cvt.s.d $f0, $f0 /* 388E4C E008447C 08021129 */ j .LE00844A4 /* 388E50 E0084480 E460FFD4 */ swc1 $f0, -0x2C($v1) .LE0084484: /* 388E54 E0084484 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 388E58 E0084488 4481E000 */ mtc1 $at, $f28 /* 388E5C E008448C 50400005 */ beql $v0, $zero, .LE00844A4 /* 388E60 E0084490 E47CFFD4 */ swc1 $f28, -0x2C($v1) /* 388E64 E0084494 3C014000 */ lui $at, (0x40000000 >> 16) /* 388E68 E0084498 4481E000 */ mtc1 $at, $f28 /* 388E6C E008449C 00000000 */ nop /* 388E70 E00844A0 E47CFFD4 */ swc1 $f28, -0x2C($v1) .LE00844A4: /* 388E74 E00844A4 08021140 */ j .LE0084500 /* 388E78 E00844A8 AC60FFDC */ sw $zero, -0x24($v1) .LE00844AC: /* 388E7C E00844AC 2A220002 */ slti $v0, $s1, 0x2 /* 388E80 E00844B0 1440000A */ bnez $v0, .LE00844DC /* 388E84 E00844B4 AC60FFD4 */ sw $zero, -0x2C($v1) /* 388E88 E00844B8 4600B0A1 */ cvt.d.s $f2, $f22 /* 388E8C E00844BC 46321082 */ mul.d $f2, $f2, $f18 /* 388E90 E00844C0 00000000 */ nop /* 388E94 E00844C4 46000021 */ cvt.d.s $f0, $f0 /* 388E98 E00844C8 46220003 */ div.d $f0, $f0, $f2 /* 388E9C E00844CC 46200000 */ add.d $f0, $f0, $f0 /* 388EA0 E00844D0 46200020 */ cvt.s.d $f0, $f0 /* 388EA4 E00844D4 08021140 */ j .LE0084500 /* 388EA8 E00844D8 E460FFDC */ swc1 $f0, -0x24($v1) .LE00844DC: /* 388EAC E00844DC 30E20001 */ andi $v0, $a3, 0x1 /* 388EB0 E00844E0 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 388EB4 E00844E4 4481E000 */ mtc1 $at, $f28 /* 388EB8 E00844E8 50400005 */ beql $v0, $zero, .LE0084500 /* 388EBC E00844EC E47CFFDC */ swc1 $f28, -0x24($v1) /* 388EC0 E00844F0 3C014000 */ lui $at, (0x40000000 >> 16) /* 388EC4 E00844F4 4481E000 */ mtc1 $at, $f28 /* 388EC8 E00844F8 00000000 */ nop /* 388ECC E00844FC E47CFFDC */ swc1 $f28, -0x24($v1) .LE0084500: /* 388ED0 E0084500 46005021 */ cvt.d.s $f0, $f10 /* 388ED4 E0084504 462C0002 */ mul.d $f0, $f0, $f12 /* 388ED8 E0084508 00000000 */ nop /* 388EDC E008450C C7A20040 */ lwc1 $f2, 0x40($sp) /* 388EE0 E0084510 4602303C */ c.lt.s $f6, $f2 /* 388EE4 E0084514 46200020 */ cvt.s.d $f0, $f0 /* 388EE8 E0084518 E460FFD8 */ swc1 $f0, -0x28($v1) /* 388EEC E008451C 46001021 */ cvt.d.s $f0, $f2 /* 388EF0 E0084520 462C0002 */ mul.d $f0, $f0, $f12 /* 388EF4 E0084524 00000000 */ nop /* 388EF8 E0084528 4500000D */ bc1f .LE0084560 /* 388EFC E008452C 2482002C */ addiu $v0, $a0, 0x2C /* 388F00 E0084530 4618103C */ c.lt.s $f2, $f24 /* 388F04 E0084534 00000000 */ nop /* 388F08 E0084538 45000003 */ bc1f .LE0084548 /* 388F0C E008453C 00000000 */ nop /* 388F10 E0084540 08021159 */ j .LE0084564 /* 388F14 E0084544 46300080 */ add.d $f2, $f0, $f16 .LE0084548: /* 388F18 E0084548 4602C03C */ c.lt.s $f24, $f2 /* 388F1C E008454C 00000000 */ nop /* 388F20 E0084550 45020004 */ bc1fl .LE0084564 /* 388F24 E0084554 46280080 */ add.d $f2, $f0, $f8 /* 388F28 E0084558 08021159 */ j .LE0084564 /* 388F2C E008455C 462E0080 */ add.d $f2, $f0, $f14 .LE0084560: /* 388F30 E0084560 46280080 */ add.d $f2, $f0, $f8 .LE0084564: /* 388F34 E0084564 46005021 */ cvt.d.s $f0, $f10 /* 388F38 E0084568 462C0002 */ mul.d $f0, $f0, $f12 /* 388F3C E008456C 00000000 */ nop /* 388F40 E0084570 C7A40040 */ lwc1 $f4, 0x40($sp) /* 388F44 E0084574 462010A0 */ cvt.s.d $f2, $f2 /* 388F48 E0084578 E4420000 */ swc1 $f2, 0x0($v0) /* 388F4C E008457C 4606203C */ c.lt.s $f4, $f6 /* 388F50 E0084580 46200020 */ cvt.s.d $f0, $f0 /* 388F54 E0084584 E460FFE4 */ swc1 $f0, -0x1C($v1) /* 388F58 E0084588 46003021 */ cvt.d.s $f0, $f6 /* 388F5C E008458C 462C0002 */ mul.d $f0, $f0, $f12 /* 388F60 E0084590 00000000 */ nop /* 388F64 E0084594 4500000D */ bc1f .LE00845CC /* 388F68 E0084598 24820034 */ addiu $v0, $a0, 0x34 /* 388F6C E008459C 4618303C */ c.lt.s $f6, $f24 /* 388F70 E00845A0 00000000 */ nop /* 388F74 E00845A4 45000003 */ bc1f .LE00845B4 /* 388F78 E00845A8 00000000 */ nop /* 388F7C E00845AC 08021174 */ j .LE00845D0 /* 388F80 E00845B0 46300000 */ add.d $f0, $f0, $f16 .LE00845B4: /* 388F84 E00845B4 4606C03C */ c.lt.s $f24, $f6 /* 388F88 E00845B8 00000000 */ nop /* 388F8C E00845BC 45020004 */ bc1fl .LE00845D0 /* 388F90 E00845C0 46280000 */ add.d $f0, $f0, $f8 /* 388F94 E00845C4 08021174 */ j .LE00845D0 /* 388F98 E00845C8 462E0000 */ add.d $f0, $f0, $f14 .LE00845CC: /* 388F9C E00845CC 46280000 */ add.d $f0, $f0, $f8 .LE00845D0: /* 388FA0 E00845D0 46200020 */ cvt.s.d $f0, $f0 /* 388FA4 E00845D4 E4400000 */ swc1 $f0, 0x0($v0) /* 388FA8 E00845D8 240200FF */ addiu $v0, $zero, 0xFF /* 388FAC E00845DC AC620000 */ sw $v0, 0x0($v1) /* 388FB0 E00845E0 24630050 */ addiu $v1, $v1, 0x50 /* 388FB4 E00845E4 24A50001 */ addiu $a1, $a1, 0x1 /* 388FB8 E00845E8 00B1102A */ slt $v0, $a1, $s1 /* 388FBC E00845EC 1440FF86 */ bnez $v0, .LE0084408 /* 388FC0 E00845F0 24840050 */ addiu $a0, $a0, 0x50 .LE00845F4: /* 388FC4 E00845F4 24C60001 */ addiu $a2, $a2, 0x1 /* 388FC8 E00845F8 00D3102A */ slt $v0, $a2, $s3 /* 388FCC E00845FC 1440FF65 */ bnez $v0, .LE0084394 /* 388FD0 E0084600 00000000 */ nop .LE0084604: /* 388FD4 E0084604 24E70001 */ addiu $a3, $a3, 0x1 /* 388FD8 E0084608 00F2102A */ slt $v0, $a3, $s2 /* 388FDC E008460C 1440FF4B */ bnez $v0, .LE008433C /* 388FE0 E0084610 00000000 */ nop .LE0084614: /* 388FE4 E0084614 0280102D */ daddu $v0, $s4, $zero /* 388FE8 E0084618 8FBF0084 */ lw $ra, 0x84($sp) /* 388FEC E008461C 8FB60080 */ lw $s6, 0x80($sp) /* 388FF0 E0084620 8FB5007C */ lw $s5, 0x7C($sp) /* 388FF4 E0084624 8FB40078 */ lw $s4, 0x78($sp) /* 388FF8 E0084628 8FB30074 */ lw $s3, 0x74($sp) /* 388FFC E008462C 8FB20070 */ lw $s2, 0x70($sp) /* 389000 E0084630 8FB1006C */ lw $s1, 0x6C($sp) /* 389004 E0084634 8FB00068 */ lw $s0, 0x68($sp) /* 389008 E0084638 D7BE00B0 */ ldc1 $f30, 0xB0($sp) /* 38900C E008463C D7BC00A8 */ ldc1 $f28, 0xA8($sp) /* 389010 E0084640 D7BA00A0 */ ldc1 $f26, 0xA0($sp) /* 389014 E0084644 D7B80098 */ ldc1 $f24, 0x98($sp) /* 389018 E0084648 D7B60090 */ ldc1 $f22, 0x90($sp) /* 38901C E008464C D7B40088 */ ldc1 $f20, 0x88($sp) /* 389020 E0084650 03E00008 */ jr $ra /* 389024 E0084654 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: EffectInstance* bombette_breaking_main(s32 type, s32 modelID, s32 treeIndex, f32 arg3, s32 arg4, s32 time) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; s32 numParts; BombetteBreakingFXData* data; f32 centerX, centerY, centerZ; f32 sizeX, sizeY, sizeZ; s32 xParts, yParts, zParts; s32 iX, iY, iZ; f32 f20, f30, f40; bombette_breaking_get_model_center_and_size(modelID & 0xFFFF, &centerX, &centerY, &centerZ, &sizeX, &sizeY, &sizeZ); xParts = (sizeX * 0.0625f) + 1.0f; yParts = (sizeY * 0.0625f) + 1.0f; zParts = (sizeZ * 0.0625f) + 1.0f; f20 = (s32)sizeX % 16; f30 = (s32)sizeY % 16; f40 = (s32)sizeZ % 16; bp.unk_00 = 0; bp.init = bombette_breaking_init; bp.update = bombette_breaking_update; bp.renderWorld = bombette_breaking_render; bp.renderUI = NULL; bp.effectID = EFFECT_BOMBETTE_BREAKING; f20 *= 0.5; f30 *= 0.5; f40 *= 0.5; numParts = (xParts * yParts * zParts) + 1; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; effect->data.bombetteBreaking = data = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(data != NULL); data->unk_04 = -sizeY * 0.5; data->timeLeft = time; data->unk_48 = 0; data->type = type; data->unk_38 = arg3; data->alpha = 255; data->treeIndex = treeIndex; data->unk_3C = 2.0f * arg3; data->center.x = centerX; data->center.y = centerY; data->center.z = centerZ; data->unk_40 = sizeY * 0.05; if (data->unk_40 < 1.0f) { data->unk_40 = 1.0f; } data++; for (iX = 0; iX < xParts; iX++) { centerX = f20 - (sizeX * 0.5) + (iX * 16.0f); for (iY = 0; iY < yParts; iY++) { centerY = f30 - (sizeY * 0.5) + (iY * 16.0f); for (iZ = 0; iZ < zParts; iZ++) { centerZ = f30 - (sizeZ * 0.5) + (iZ * 16.0f); data->center.x = data->unk_14.x = centerX; data->center.y = data->unk_14.y = centerY; data->center.z = data->unk_14.z = centerZ; if (sizeX < sizeZ) { if (xParts >= 2) { data->unk_20.x = 2.0 * (centerX / (sizeX * 0.5)); } else { if (iZ & 1) { data->unk_20.x = 2.0f; } else { data->unk_20.x = -2.0f; } } data->unk_20.z = 0.0f; } else { data->unk_20.x = 0.0f; if (zParts >= 2) { data->unk_20.z = 2.0 * (centerZ / (sizeZ * 0.5)); } else { if (iX & 1) { data->unk_20.z = 2.0f; } else { data->unk_20.z = -2.0f; } } } data->unk_20.y = centerY * 0.2; data->unk_2C.x = centerZ * 0.2 + (centerX < centerZ ? (centerZ < 0 ? -1.0 : (centerZ > 0 ? 1.0 : 0.0)) : 0.0); data->unk_2C.y = centerY * 0.2; data->unk_2C.z = centerX * 0.2 + (centerZ < centerX ? (centerX < 0 ? -1.0 : (centerX > 0 ? 1.0 : 0.0)) : 0.0); data->alpha = 255; data++; } } } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80219188_59F868 /* 465618 80219188 27BDFFB8 */ addiu $sp, $sp, -0x48 .L8021918C_59F86C: /* 46561C 8021918C AFBF002C */ sw $ra, 0x2C($sp) glabel func_80219190_5CF820 /* 465620 80219190 AFB20028 */ sw $s2, 0x28($sp) .L80219194: /* 465624 80219194 AFB10024 */ sw $s1, 0x24($sp) glabel func_80219198 /* 465628 80219198 AFB00020 */ sw $s0, 0x20($sp) /* 46562C 8021919C F7B80040 */ sdc1 $f24, 0x40($sp) D_802191A0: /* 465630 802191A0 F7B60038 */ sdc1 $f22, 0x38($sp) /* 465634 802191A4 F7B40030 */ sdc1 $f20, 0x30($sp) /* 465638 802191A8 8C840148 */ lw $a0, 0x148($a0) D_802191AC: /* 46563C 802191AC 0C09A75B */ jal get_actor .L802191B0: /* 465640 802191B0 00A0802D */ daddu $s0, $a1, $zero .L802191B4_59F894: /* 465644 802191B4 0040882D */ daddu $s1, $v0, $zero /* 465648 802191B8 1200003D */ beqz $s0, .L802192B0_59F990 .L802191BC: /* 46564C 802191BC 2632000C */ addiu $s2, $s1, 0xC glabel b_area_sam2_sam_02b_UnkModelStuff_func1 /* 465650 802191C0 0C00AB39 */ jal heap_malloc /* 465654 802191C4 24040020 */ addiu $a0, $zero, 0x20 /* 465658 802191C8 0040802D */ daddu $s0, $v0, $zero .L802191CC_59F8AC: /* 46565C 802191CC 24020001 */ addiu $v0, $zero, 0x1 D_802191D0_59F8B0: /* 465660 802191D0 26250144 */ addiu $a1, $s1, 0x144 .L802191D4: /* 465664 802191D4 26260148 */ addiu $a2, $s1, 0x148 .L802191D8: /* 465668 802191D8 AE300094 */ sw $s0, 0x94($s1) /* 46566C 802191DC AE020004 */ sw $v0, 0x4($s0) D_802191E0: /* 465670 802191E0 AE000008 */ sw $zero, 0x8($s0) D_802191E4_59F8C4: /* 465674 802191E4 AE02000C */ sw $v0, 0xC($s0) glabel func_802191E8 /* 465678 802191E8 AE000010 */ sw $zero, 0x10($s0) /* 46567C 802191EC 82230210 */ lb $v1, 0x210($s1) .L802191F0: /* 465680 802191F0 2402000A */ addiu $v0, $zero, 0xA D_802191F4_59F8D4: /* 465684 802191F4 10620005 */ beq $v1, $v0, .L8021920C /* 465688 802191F8 2627014C */ addiu $a3, $s1, 0x14C D_802191FC: /* 46568C 802191FC 3C013F80 */ lui $at, (0x3F800000 >> 16) .L80219200: /* 465690 80219200 44810000 */ mtc1 $at, $f0 D_80219204_59F8E4: /* 465694 80219204 08086488 */ j .L80219220_59F900 glabel dup3_b_area_flo_GetSelectedMoveID /* 465698 80219208 E7A00010 */ swc1 $f0, 0x10($sp) .L8021920C: /* 46569C 8021920C 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) D_80219210: /* 4656A0 80219210 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) .L80219214: /* 4656A4 80219214 44810000 */ mtc1 $at, $f0 glabel dup_b_area_pra_GetSelectedMoveID /* 4656A8 80219218 00000000 */ nop .L8021921C: /* 4656AC 8021921C E7A00010 */ swc1 $f0, 0x10($sp) .L80219220_59F900: /* 4656B0 80219220 24020005 */ addiu $v0, $zero, 0x5 D_80219224: /* 4656B4 80219224 AFA20014 */ sw $v0, 0x14($sp) /* 4656B8 80219228 AFA00018 */ sw $zero, 0x18($sp) /* 4656BC 8021922C 8CA50000 */ lw $a1, 0x0($a1) glabel func_80219230_59F910 /* 4656C0 80219230 8CC60000 */ lw $a2, 0x0($a2) glabel func_80219234 /* 4656C4 80219234 8CE70000 */ lw $a3, 0x0($a3) D_80219238_59F918: /* 4656C8 80219238 0C01C8EC */ jal fx_static_status .L8021923C: /* 4656CC 8021923C 0000202D */ daddu $a0, $zero, $zero /* 4656D0 80219240 26250144 */ addiu $a1, $s1, 0x144 glabel dup5_b_area_pra_SetAbsoluteStatusOffsets /* 4656D4 80219244 AE020014 */ sw $v0, 0x14($s0) D_80219248: /* 4656D8 80219248 82220210 */ lb $v0, 0x210($s1) /* 4656DC 8021924C 2403000A */ addiu $v1, $zero, 0xA glabel func_80219250 /* 4656E0 80219250 10430005 */ beq $v0, $v1, .L80219268_59F948 .L80219254_59F934: /* 4656E4 80219254 2627014C */ addiu $a3, $s1, 0x14C /* 4656E8 80219258 3C013F80 */ lui $at, (0x3F800000 >> 16) .L8021925C: /* 4656EC 8021925C 44810000 */ mtc1 $at, $f0 /* 4656F0 80219260 0808649F */ j .L8021927C .L80219264: /* 4656F4 80219264 E7A00010 */ swc1 $f0, 0x10($sp) .L80219268_59F948: /* 4656F8 80219268 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) .L8021926C: /* 4656FC 8021926C 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) D_80219270: /* 465700 80219270 44810000 */ mtc1 $at, $f0 .L80219274: /* 465704 80219274 00000000 */ nop /* 465708 80219278 E7A00010 */ swc1 $f0, 0x10($sp) .L8021927C: /* 46570C 8021927C 24020005 */ addiu $v0, $zero, 0x5 .L80219280: /* 465710 80219280 AFA20014 */ sw $v0, 0x14($sp) /* 465714 80219284 AFA00018 */ sw $zero, 0x18($sp) D_80219288_59F968: /* 465718 80219288 8CA50000 */ lw $a1, 0x0($a1) .L8021928C: /* 46571C 8021928C 3C06C47A */ lui $a2, (0xC47A0000 >> 16) /* 465720 80219290 8CE70000 */ lw $a3, 0x0($a3) /* 465724 80219294 0C01C8EC */ jal fx_static_status .L80219298: /* 465728 80219298 24040001 */ addiu $a0, $zero, 0x1 D_8021929C: /* 46572C 8021929C AE020018 */ sw $v0, 0x18($s0) /* 465730 802192A0 24020001 */ addiu $v0, $zero, 0x1 /* 465734 802192A4 AE020000 */ sw $v0, 0x0($s0) /* 465738 802192A8 82220210 */ lb $v0, 0x210($s1) /* 46573C 802192AC AE02001C */ sw $v0, 0x1C($s0) .L802192B0_59F990: /* 465740 802192B0 8E500088 */ lw $s0, 0x88($s2) /* 465744 802192B4 8E020000 */ lw $v0, 0x0($s0) .L802192B8: /* 465748 802192B8 104000C9 */ beqz $v0, .L802195E0_59FCC0 /* 46574C 802192BC 24020002 */ addiu $v0, $zero, 0x2 D_802192C0: /* 465750 802192C0 8E020004 */ lw $v0, 0x4($s0) .L802192C4: /* 465754 802192C4 1040000D */ beqz $v0, dup3_b_area_kpa2_FadeBackgroundToBlack /* 465758 802192C8 24020008 */ addiu $v0, $zero, 0x8 .L802192CC: /* 46575C 802192CC 82230210 */ lb $v1, 0x210($s1) D_802192D0_59F9B0: /* 465760 802192D0 1062000A */ beq $v1, $v0, dup3_b_area_kpa2_FadeBackgroundToBlack .L802192D4: /* 465764 802192D4 00000000 */ nop .L802192D8_59F9B8: /* 465768 802192D8 8E020008 */ lw $v0, 0x8($s0) .L802192DC: /* 46576C 802192DC 2442000F */ addiu $v0, $v0, 0xF D_802192E0: /* 465770 802192E0 44826000 */ mtc1 $v0, $f12 /* 465774 802192E4 00000000 */ nop /* 465778 802192E8 46806320 */ cvt.s.w $f12, $f12 .L802192EC_59F9CC: /* 46577C 802192EC 0C00A6C9 */ jal clamp_angle /* 465780 802192F0 AE020008 */ sw $v0, 0x8($s0) D_802192F4: /* 465784 802192F4 4600018D */ trunc.w.s $f6, $f0 .L802192F8: /* 465788 802192F8 E6060008 */ swc1 $f6, 0x8($s0) glabel dup3_b_area_kpa2_FadeBackgroundToBlack /* 46578C 802192FC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) glabel dup3_b_area_flo_StartRumbleWithParams /* 465790 80219300 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) glabel b_area_pra3_duplighost_UnkWattEffectFunc2 /* 465794 80219304 44810000 */ mtc1 $at, $f0 glabel func_80219308_59F9E8 /* 465798 80219308 C60C0008 */ lwc1 $f12, 0x8($s0) D_8021930C: /* 46579C 8021930C 46806320 */ cvt.s.w $f12, $f12 glabel dup4_b_area_pra_StartRumbleWithParams /* 4657A0 80219310 46006302 */ mul.s $f12, $f12, $f0 /* 4657A4 80219314 00000000 */ nop .L80219318: /* 4657A8 80219318 3C0143B4 */ lui $at, (0x43B40000 >> 16) D_8021931C_59F9FC: /* 4657AC 8021931C 44810000 */ mtc1 $at, $f0 .L80219320: /* 4657B0 80219320 0C00A85B */ jal sin_rad /* 4657B4 80219324 46006303 */ div.s $f12, $f12, $f0 /* 4657B8 80219328 3C014040 */ lui $at, (0x40400000 >> 16) /* 4657BC 8021932C 44811000 */ mtc1 $at, $f2 D_80219330: /* 4657C0 80219330 00000000 */ nop .L80219334: /* 4657C4 80219334 46020002 */ mul.s $f0, $f0, $f2 D_80219338_59FA18: /* 4657C8 80219338 00000000 */ nop /* 4657CC 8021933C 86220152 */ lh $v0, 0x152($s1) /* 4657D0 80219340 44821000 */ mtc1 $v0, $f2 D_80219344: /* 4657D4 80219344 00000000 */ nop .L80219348: /* 4657D8 80219348 468010A0 */ cvt.s.w $f2, $f2 /* 4657DC 8021934C 4600018D */ trunc.w.s $f6, $f0 .L80219350: /* 4657E0 80219350 44033000 */ mfc1 $v1, $f6 /* 4657E4 80219354 00000000 */ nop glabel b_area_pra3_duplighost_UnkWattEffectFunc3 /* 4657E8 80219358 00031600 */ sll $v0, $v1, 24 /* 4657EC 8021935C C6200148 */ lwc1 $f0, 0x148($s1) glabel func_80219360_59FA40 /* 4657F0 80219360 00021603 */ sra $v0, $v0, 24 /* 4657F4 80219364 A223019A */ sb $v1, 0x19A($s1) glabel dup4_b_area_pra_UnkFunc52 /* 4657F8 80219368 46020000 */ add.s $f0, $f0, $f2 .L8021936C: /* 4657FC 8021936C 44821000 */ mtc1 $v0, $f2 /* 465800 80219370 00000000 */ nop /* 465804 80219374 468010A0 */ cvt.s.w $f2, $f2 .L80219378: /* 465808 80219378 86220150 */ lh $v0, 0x150($s1) D_8021937C_59FA5C: /* 46580C 8021937C 46020000 */ add.s $f0, $f0, $f2 D_80219380: /* 465810 80219380 2403000A */ addiu $v1, $zero, 0xA .L80219384: /* 465814 80219384 44821000 */ mtc1 $v0, $f2 .L80219388: /* 465818 80219388 00000000 */ nop .L8021938C: /* 46581C 8021938C 468010A0 */ cvt.s.w $f2, $f2 D_80219390: /* 465820 80219390 46000121 */ cvt.d.s $f4, $f0 glabel dup3_b_area_kpa2_UnfadeBackgroundToBlack /* 465824 80219394 C6200144 */ lwc1 $f0, 0x144($s1) /* 465828 80219398 82220210 */ lb $v0, 0x210($s1) /* 46582C 8021939C 46020580 */ add.s $f22, $f0, $f2 .L802193A0: /* 465830 802193A0 3C018023 */ lui $at, %hi(D_80232B38_6848B8) glabel func_802193A4 /* 465834 802193A4 D4202B38 */ ldc1 $f0, %lo(D_80232B38_6848B8)($at) /* 465838 802193A8 50430006 */ beql $v0, $v1, .L802193C4_59FAA4 .L802193AC: /* 46583C 802193AC 46202000 */ add.d $f0, $f4, $f0 .L802193B0: /* 465840 802193B0 3C014028 */ lui $at, (0x40280000 >> 16) D_802193B4_59FA94: /* 465844 802193B4 44810800 */ mtc1 $at, $f1 glabel b_area_sam2_sam_02b_Set80071270_0_16 /* 465848 802193B8 44800000 */ mtc1 $zero, $f0 /* 46584C 802193BC 00000000 */ nop .L802193C0_59FAA0: /* 465850 802193C0 46202000 */ add.d $f0, $f4, $f0 .L802193C4_59FAA4: /* 465854 802193C4 46200520 */ cvt.s.d $f20, $f0 /* 465858 802193C8 86220154 */ lh $v0, 0x154($s1) /* 46585C 802193CC C620014C */ lwc1 $f0, 0x14C($s1) D_802193D0_59FAB0: /* 465860 802193D0 44821000 */ mtc1 $v0, $f2 glabel func_802193D4_6BCF64 /* 465864 802193D4 00000000 */ nop D_802193D8: /* 465868 802193D8 468010A0 */ cvt.s.w $f2, $f2 glabel b_area_sam2_sam_02b_UnkFloatFunc2 /* 46586C 802193DC 8E02000C */ lw $v0, 0xC($s0) .L802193E0_59FAC0: /* 465870 802193E0 10400059 */ beqz $v0, .L80219548_59FC28 .L802193E4: /* 465874 802193E4 46020600 */ add.s $f24, $f0, $f2 D_802193E8_59FAC8: /* 465878 802193E8 8E030010 */ lw $v1, 0x10($s0) .L802193EC: /* 46587C 802193EC 10600005 */ beqz $v1, .L80219404 glabel b_area_pra3_duplighost_UnkWattEffectFunc5 /* 465880 802193F0 24020001 */ addiu $v0, $zero, 0x1 D_802193F4: /* 465884 802193F4 1062002A */ beq $v1, $v0, dup3_b_area_flo2_CosInterpMinMax /* 465888 802193F8 00000000 */ nop .L802193FC: /* 46588C 802193FC 08086560 */ j .L80219580 .L80219400: /* 465890 80219400 00000000 */ nop .L80219404: /* 465894 80219404 8E020014 */ lw $v0, 0x14($s0) .L80219408: /* 465898 80219408 14400016 */ bnez $v0, D_80219464_59FB44 .L8021940C: /* 46589C 8021940C 2402000A */ addiu $v0, $zero, 0xA /* 4658A0 80219410 82230210 */ lb $v1, 0x210($s1) glabel dup3_b_area_kpa2_RemoveChillOut /* 4658A4 80219414 10620005 */ beq $v1, $v0, b_area_pra_GetBootsHammerLevel .L80219418: /* 4658A8 80219418 00000000 */ nop glabel func_8021941C /* 4658AC 8021941C 3C013F80 */ lui $at, (0x3F800000 >> 16) glabel func_80219420_5B28D0 /* 4658B0 80219420 44810000 */ mtc1 $at, $f0 /* 4658B4 80219424 08086510 */ j D_80219440_59FB20 glabel func_80219428_6BCFB8 /* 4658B8 80219428 E7A00010 */ swc1 $f0, 0x10($sp) glabel b_area_pra_GetBootsHammerLevel /* 4658BC 8021942C 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 4658C0 80219430 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 4658C4 80219434 44810000 */ mtc1 $at, $f0 /* 4658C8 80219438 00000000 */ nop glabel b_area_pra3_duplighost_UnkBackgroundFunc3 /* 4658CC 8021943C E7A00010 */ swc1 $f0, 0x10($sp) D_80219440_59FB20: /* 4658D0 80219440 0000202D */ daddu $a0, $zero, $zero glabel func_80219444_6A0644 /* 4658D4 80219444 4405B000 */ mfc1 $a1, $f22 /* 4658D8 80219448 4406A000 */ mfc1 $a2, $f20 /* 4658DC 8021944C 4407C000 */ mfc1 $a3, $f24 .L80219450: /* 4658E0 80219450 24020005 */ addiu $v0, $zero, 0x5 .L80219454_59FB34: /* 4658E4 80219454 AFA20014 */ sw $v0, 0x14($sp) /* 4658E8 80219458 0C01C8EC */ jal fx_static_status D_8021945C_59FB3C: /* 4658EC 8021945C AFA00018 */ sw $zero, 0x18($sp) .L80219460: /* 4658F0 80219460 AE020014 */ sw $v0, 0x14($s0) D_80219464_59FB44: /* 4658F4 80219464 8E030018 */ lw $v1, 0x18($s0) .L80219468: /* 4658F8 80219468 10600005 */ beqz $v1, b_area_pra3_duplighost_SetBackgroundAlpha /* 4658FC 8021946C 00000000 */ nop .L80219470: /* 465900 80219470 8C620000 */ lw $v0, 0x0($v1) glabel func_80219474_6BD004 /* 465904 80219474 34420010 */ ori $v0, $v0, 0x10 /* 465908 80219478 AC620000 */ sw $v0, 0x0($v1) .L8021947C: /* 46590C 8021947C AE000018 */ sw $zero, 0x18($s0) glabel b_area_pra3_duplighost_SetBackgroundAlpha /* 465910 80219480 8E020014 */ lw $v0, 0x14($s0) /* 465914 80219484 8C42000C */ lw $v0, 0xC($v0) /* 465918 80219488 E4560004 */ swc1 $f22, 0x4($v0) glabel b_area_pra_UnkBattleFunc5 /* 46591C 8021948C 8E020014 */ lw $v0, 0x14($s0) glabel func_80219490 /* 465920 80219490 8C42000C */ lw $v0, 0xC($v0) D_80219494_59FB74: /* 465924 80219494 E4540008 */ swc1 $f20, 0x8($v0) /* 465928 80219498 0808654F */ j .L8021953C_59FC1C D_8021949C: /* 46592C 8021949C 8E020014 */ lw $v0, 0x14($s0) glabel dup3_b_area_flo2_CosInterpMinMax /* 465930 802194A0 8E030014 */ lw $v1, 0x14($s0) /* 465934 802194A4 10600005 */ beqz $v1, .L802194BC_59FB9C /* 465938 802194A8 00000000 */ nop /* 46593C 802194AC 8C620000 */ lw $v0, 0x0($v1) /* 465940 802194B0 34420010 */ ori $v0, $v0, 0x10 /* 465944 802194B4 AC620000 */ sw $v0, 0x0($v1) glabel b_area_pra3_duplighost_GetPartnerAndLevel /* 465948 802194B8 AE000014 */ sw $zero, 0x14($s0) .L802194BC_59FB9C: /* 46594C 802194BC 8E020018 */ lw $v0, 0x18($s0) glabel func_802194C0_6BD050 /* 465950 802194C0 14400018 */ bnez $v0, b_area_pra3_duplighost_CopyPriority D_802194C4_59FBA4: /* 465954 802194C4 00000000 */ nop /* 465958 802194C8 82230210 */ lb $v1, 0x210($s1) /* 46595C 802194CC 2402000A */ addiu $v0, $zero, 0xA .L802194D0: /* 465960 802194D0 10620005 */ beq $v1, $v0, .L802194E8_59FBC8 D_802194D4_59FBB4: /* 465964 802194D4 00000000 */ nop /* 465968 802194D8 3C013F80 */ lui $at, (0x3F800000 >> 16) .L802194DC: /* 46596C 802194DC 44810000 */ mtc1 $at, $f0 glabel func_802194E0 /* 465970 802194E0 0808653F */ j .L802194FC_59FBDC /* 465974 802194E4 E7A00010 */ swc1 $f0, 0x10($sp) .L802194E8_59FBC8: /* 465978 802194E8 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 46597C 802194EC 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) .L802194F0: /* 465980 802194F0 44810000 */ mtc1 $at, $f0 /* 465984 802194F4 00000000 */ nop /* 465988 802194F8 E7A00010 */ swc1 $f0, 0x10($sp) .L802194FC_59FBDC: /* 46598C 802194FC 24040001 */ addiu $a0, $zero, 0x1 D_80219500_59FBE0: /* 465990 80219500 4405B000 */ mfc1 $a1, $f22 D_80219504_59FBE4: /* 465994 80219504 4406A000 */ mfc1 $a2, $f20 /* 465998 80219508 4407C000 */ mfc1 $a3, $f24 glabel b_area_kpa3_UnkBackgroundFunc3 /* 46599C 8021950C 24020005 */ addiu $v0, $zero, 0x5 .L80219510: /* 4659A0 80219510 AFA20014 */ sw $v0, 0x14($sp) /* 4659A4 80219514 0C01C8EC */ jal fx_static_status /* 4659A8 80219518 AFA00018 */ sw $zero, 0x18($sp) /* 4659AC 8021951C AE020018 */ sw $v0, 0x18($s0) glabel dup2_b_area_tik2_UnkFunc56 /* 4659B0 80219520 8E020018 */ lw $v0, 0x18($s0) glabel b_area_pra3_duplighost_CopyPriority /* 4659B4 80219524 8C42000C */ lw $v0, 0xC($v0) D_80219528_59FC08: /* 4659B8 80219528 E4560004 */ swc1 $f22, 0x4($v0) D_8021952C_59FC0C: /* 4659BC 8021952C 8E020018 */ lw $v0, 0x18($s0) glabel func_80219530 /* 4659C0 80219530 8C42000C */ lw $v0, 0xC($v0) .L80219534: /* 4659C4 80219534 E4540008 */ swc1 $f20, 0x8($v0) /* 4659C8 80219538 8E020018 */ lw $v0, 0x18($s0) .L8021953C_59FC1C: /* 4659CC 8021953C 8C42000C */ lw $v0, 0xC($v0) glabel b_area_tik3_UpdateTexturePanSmooth /* 4659D0 80219540 08086560 */ j .L80219580 .L80219544: /* 4659D4 80219544 E458000C */ swc1 $f24, 0xC($v0) .L80219548_59FC28: /* 4659D8 80219548 8E030014 */ lw $v1, 0x14($s0) /* 4659DC 8021954C 10600005 */ beqz $v1, .L80219564_59FC44 glabel b_area_kpa3_SetBackgroundAlpha /* 4659E0 80219550 00000000 */ nop /* 4659E4 80219554 8C620000 */ lw $v0, 0x0($v1) /* 4659E8 80219558 34420010 */ ori $v0, $v0, 0x10 .L8021955C: /* 4659EC 8021955C AC620000 */ sw $v0, 0x0($v1) /* 4659F0 80219560 AE000014 */ sw $zero, 0x14($s0) .L80219564_59FC44: /* 4659F4 80219564 8E030018 */ lw $v1, 0x18($s0) /* 4659F8 80219568 10600005 */ beqz $v1, .L80219580 /* 4659FC 8021956C 00000000 */ nop .L80219570: /* 465A00 80219570 8C620000 */ lw $v0, 0x0($v1) /* 465A04 80219574 34420010 */ ori $v0, $v0, 0x10 glabel .L80219578 /* 465A08 80219578 AC620000 */ sw $v0, 0x0($v1) .L8021957C_59FC5C: /* 465A0C 8021957C AE000018 */ sw $zero, 0x18($s0) .L80219580: /* 465A10 80219580 82230210 */ lb $v1, 0x210($s1) glabel .L80219584 /* 465A14 80219584 8E02001C */ lw $v0, 0x1C($s0) glabel func_80219588_6BD118 /* 465A18 80219588 10430014 */ beq $v0, $v1, .L802195DC_59FCBC /* 465A1C 8021958C 0000102D */ daddu $v0, $zero, $zero glabel .L80219590_59FC70 /* 465A20 80219590 8E02000C */ lw $v0, 0xC($s0) /* 465A24 80219594 10400011 */ beqz $v0, .L802195DC_59FCBC /* 465A28 80219598 0000102D */ daddu $v0, $zero, $zero glabel .L8021959C /* 465A2C 8021959C 8E030014 */ lw $v1, 0x14($s0) glabel func_802195A0_5B2A50 /* 465A30 802195A0 10600005 */ beqz $v1, .L802195B8 .L802195A4: /* 465A34 802195A4 00000000 */ nop glabel .L802195A8 /* 465A38 802195A8 8C620000 */ lw $v0, 0x0($v1) /* 465A3C 802195AC 34420010 */ ori $v0, $v0, 0x10 /* 465A40 802195B0 AC620000 */ sw $v0, 0x0($v1) glabel .L802195B4 /* 465A44 802195B4 AE000014 */ sw $zero, 0x14($s0) .L802195B8: /* 465A48 802195B8 8E030018 */ lw $v1, 0x18($s0) .L802195BC: /* 465A4C 802195BC 10600005 */ beqz $v1, .L802195D4 glabel .L802195C0 /* 465A50 802195C0 00000000 */ nop /* 465A54 802195C4 8C620000 */ lw $v0, 0x0($v1) /* 465A58 802195C8 34420010 */ ori $v0, $v0, 0x10 glabel .L802195CC /* 465A5C 802195CC AC620000 */ sw $v0, 0x0($v1) .L802195D0: /* 465A60 802195D0 AE000018 */ sw $zero, 0x18($s0) glabel .L802195D4 /* 465A64 802195D4 82230210 */ lb $v1, 0x210($s1) D_802195D8: /* 465A68 802195D8 0000102D */ daddu $v0, $zero, $zero .L802195DC_59FCBC: /* 465A6C 802195DC AE03001C */ sw $v1, 0x1C($s0) .L802195E0_59FCC0: /* 465A70 802195E0 8FBF002C */ lw $ra, 0x2C($sp) /* 465A74 802195E4 8FB20028 */ lw $s2, 0x28($sp) .L802195E8: /* 465A78 802195E8 8FB10024 */ lw $s1, 0x24($sp) .L802195EC: /* 465A7C 802195EC 8FB00020 */ lw $s0, 0x20($sp) glabel b_area_pra3_swoopula_SetAbsoluteStatusOffsets /* 465A80 802195F0 D7B80040 */ ldc1 $f24, 0x40($sp) glabel func_802195F4_6BD184 /* 465A84 802195F4 D7B60038 */ ldc1 $f22, 0x38($sp) /* 465A88 802195F8 D7B40030 */ ldc1 $f20, 0x30($sp) /* 465A8C 802195FC 03E00008 */ jr $ra /* 465A90 80219600 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(func_80219188_465618) { WattEffectData* wattEffectData; f32 x, y, z; Actor* actor = get_actor(script->owner1.enemyID); ActorState* state = &actor->state; if (isInitialCall) { wattEffectData = heap_malloc(sizeof(*wattEffectData)); actor->state.varTablePtr[3] = wattEffectData; wattEffectData->unk_04 = TRUE; wattEffectData->angle = 0; wattEffectData->unk_0C = TRUE; wattEffectData->unk_10 = 0; wattEffectData->effect1 = fx_static_status(0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z, (actor->debuff != STATUS_KEY_SHRINK) ? 1.0f : 0.4f, 5, 0); wattEffectData->effect2 = fx_static_status(1, actor->currentPos.x, NPC_DISPOSE_POS_Y, actor->currentPos.z, (actor->debuff != STATUS_KEY_SHRINK) ? 1.0f : 0.4f, 5, 0); wattEffectData->flags = TRUE; wattEffectData->debuff = actor->debuff; } wattEffectData = state->varTablePtr[3]; if (wattEffectData->flags) { if (wattEffectData->unk_04 && actor->debuff != STATUS_KEY_STOP) { wattEffectData->angle += 15; wattEffectData->angle = clamp_angle(wattEffectData->angle); } actor->verticalRenderOffset = sin_rad(DEG_TO_RAD(wattEffectData->angle)) * 3.0f; x = actor->currentPos.x + actor->headOffset.x; y = actor->currentPos.y + actor->headOffset.y + actor->verticalRenderOffset + (actor->debuff != STATUS_KEY_SHRINK ? 12.0 : 4.800000000000001); // 4.8 doesn't match z = actor->currentPos.z + actor->headOffset.z; if (wattEffectData->unk_0C) { switch (wattEffectData->unk_10) { case 0: if (wattEffectData->effect1 == NULL) { wattEffectData->effect1 = fx_static_status(0, x, y, z, (actor->debuff != STATUS_KEY_SHRINK) ? 1.0f : 0.4f, 5, 0); } if (wattEffectData->effect2 != NULL) { wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS; wattEffectData->effect2 = NULL; } wattEffectData->effect1->data.staticStatus->pos.x = x; wattEffectData->effect1->data.staticStatus->pos.y = y; wattEffectData->effect1->data.staticStatus->pos.z = z; break; case 1: if (wattEffectData->effect1 != NULL) { wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS; wattEffectData->effect1 = NULL; } if (wattEffectData->effect2 == NULL) { wattEffectData->effect2 = fx_static_status(1, x, y, z, (actor->debuff != STATUS_KEY_SHRINK) ? 1.0f : 0.4f, 5, 0); } wattEffectData->effect2->data.staticStatus->pos.x = x; wattEffectData->effect2->data.staticStatus->pos.y = y; wattEffectData->effect2->data.staticStatus->pos.z = z; break; } } else { if (wattEffectData->effect1 != NULL) { wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS; wattEffectData->effect1 = NULL; } if (wattEffectData->effect2 != NULL) { wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS; wattEffectData->effect2 = NULL; } } if (wattEffectData->debuff != actor->debuff && wattEffectData->unk_0C) { if (wattEffectData->effect1 != NULL) { wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS; wattEffectData->effect1 = NULL; } if (wattEffectData->effect2 != NULL) { wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS; wattEffectData->effect2 = NULL; } } wattEffectData->debuff = actor->debuff; return ApiStatus_BLOCK; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_hit_data /* 3663C 8005B23C 27BDFF90 */ addiu $sp, $sp, -0x70 /* 36640 8005B240 AFB60038 */ sw $s6, 0x38($sp) /* 36644 8005B244 0000B02D */ daddu $s6, $zero, $zero /* 36648 8005B248 AFBE0040 */ sw $fp, 0x40($sp) /* 3664C 8005B24C 02C0F02D */ daddu $fp, $s6, $zero /* 36650 8005B250 AFBF0044 */ sw $ra, 0x44($sp) /* 36654 8005B254 AFB7003C */ sw $s7, 0x3C($sp) /* 36658 8005B258 AFB50034 */ sw $s5, 0x34($sp) /* 3665C 8005B25C AFB40030 */ sw $s4, 0x30($sp) /* 36660 8005B260 AFB3002C */ sw $s3, 0x2C($sp) /* 36664 8005B264 AFB20028 */ sw $s2, 0x28($sp) /* 36668 8005B268 AFB10024 */ sw $s1, 0x24($sp) /* 3666C 8005B26C AFB00020 */ sw $s0, 0x20($sp) /* 36670 8005B270 F7BC0068 */ sdc1 $f28, 0x68($sp) /* 36674 8005B274 F7BA0060 */ sdc1 $f26, 0x60($sp) /* 36678 8005B278 F7B80058 */ sdc1 $f24, 0x58($sp) /* 3667C 8005B27C F7B60050 */ sdc1 $f22, 0x50($sp) /* 36680 8005B280 F7B40048 */ sdc1 $f20, 0x48($sp) /* 36684 8005B284 AFA40070 */ sw $a0, 0x70($sp) /* 36688 8005B288 0C016AFA */ jal get_current_map_settings /* 3668C 8005B28C AFA50074 */ sw $a1, 0x74($sp) /* 36690 8005B290 8FA80070 */ lw $t0, 0x70($sp) /* 36694 8005B294 11000006 */ beqz $t0, .L8005B2B0 /* 36698 8005B298 0040182D */ daddu $v1, $v0, $zero /* 3669C 8005B29C 24020001 */ addiu $v0, $zero, 0x1 /* 366A0 8005B2A0 1102000B */ beq $t0, $v0, .L8005B2D0 /* 366A4 8005B2A4 0000A02D */ daddu $s4, $zero, $zero /* 366A8 8005B2A8 08016CBC */ j .L8005B2F0 /* 366AC 8005B2AC 00000000 */ nop .L8005B2B0: /* 366B0 8005B2B0 8C620004 */ lw $v0, 0x4($v1) /* 366B4 8005B2B4 10400121 */ beqz $v0, .L8005B73C /* 366B8 8005B2B8 00000000 */ nop /* 366BC 8005B2BC 8FA80074 */ lw $t0, 0x74($sp) /* 366C0 8005B2C0 3C1E800B */ lui $fp, %hi(gCollisionData) /* 366C4 8005B2C4 27DE42E0 */ addiu $fp, $fp, %lo(gCollisionData) /* 366C8 8005B2C8 08016CBB */ j .L8005B2EC /* 366CC 8005B2CC 0102B021 */ addu $s6, $t0, $v0 .L8005B2D0: /* 366D0 8005B2D0 8C620008 */ lw $v0, 0x8($v1) /* 366D4 8005B2D4 10400119 */ beqz $v0, .L8005B73C /* 366D8 8005B2D8 00000000 */ nop /* 366DC 8005B2DC 8FA80074 */ lw $t0, 0x74($sp) /* 366E0 8005B2E0 0102B021 */ addu $s6, $t0, $v0 /* 366E4 8005B2E4 3C1E800E */ lui $fp, %hi(gZoneCollisionData) /* 366E8 8005B2E8 27DE91D0 */ addiu $fp, $fp, %lo(gZoneCollisionData) .L8005B2EC: /* 366EC 8005B2EC 0000A02D */ daddu $s4, $zero, $zero .L8005B2F0: /* 366F0 8005B2F0 8EC20014 */ lw $v0, 0x14($s6) /* 366F4 8005B2F4 8FA80074 */ lw $t0, 0x74($sp) /* 366F8 8005B2F8 86C40010 */ lh $a0, 0x10($s6) /* 366FC 8005B2FC 01028021 */ addu $s0, $t0, $v0 /* 36700 8005B300 0C00AB6C */ jal collision_heap_malloc /* 36704 8005B304 00042080 */ sll $a0, $a0, 2 /* 36708 8005B308 AFC20008 */ sw $v0, 0x8($fp) /* 3670C 8005B30C 86C30010 */ lh $v1, 0x10($s6) /* 36710 8005B310 18600009 */ blez $v1, .L8005B338 /* 36714 8005B314 0040202D */ daddu $a0, $v0, $zero .L8005B318: /* 36718 8005B318 8E020000 */ lw $v0, 0x0($s0) /* 3671C 8005B31C 26100004 */ addiu $s0, $s0, 0x4 /* 36720 8005B320 26940001 */ addiu $s4, $s4, 0x1 /* 36724 8005B324 AC820000 */ sw $v0, 0x0($a0) /* 36728 8005B328 86C20010 */ lh $v0, 0x10($s6) /* 3672C 8005B32C 0282102A */ slt $v0, $s4, $v0 /* 36730 8005B330 1440FFF9 */ bnez $v0, .L8005B318 /* 36734 8005B334 24840004 */ addiu $a0, $a0, 0x4 .L8005B338: /* 36738 8005B338 0000A02D */ daddu $s4, $zero, $zero /* 3673C 8005B33C 8EC2000C */ lw $v0, 0xC($s6) /* 36740 8005B340 8FA80074 */ lw $t0, 0x74($sp) /* 36744 8005B344 86C30008 */ lh $v1, 0x8($s6) /* 36748 8005B348 01028021 */ addu $s0, $t0, $v0 /* 3674C 8005B34C 00032040 */ sll $a0, $v1, 1 /* 36750 8005B350 00832021 */ addu $a0, $a0, $v1 /* 36754 8005B354 0C00AB6C */ jal collision_heap_malloc /* 36758 8005B358 00042080 */ sll $a0, $a0, 2 /* 3675C 8005B35C AFC20000 */ sw $v0, 0x0($fp) /* 36760 8005B360 86C30008 */ lh $v1, 0x8($s6) /* 36764 8005B364 1860001A */ blez $v1, .L8005B3D0 /* 36768 8005B368 0040282D */ daddu $a1, $v0, $zero /* 3676C 8005B36C 26040004 */ addiu $a0, $s0, 0x4 /* 36770 8005B370 24A30008 */ addiu $v1, $a1, 0x8 .L8005B374: /* 36774 8005B374 86020000 */ lh $v0, 0x0($s0) /* 36778 8005B378 26100006 */ addiu $s0, $s0, 0x6 /* 3677C 8005B37C 26940001 */ addiu $s4, $s4, 0x1 /* 36780 8005B380 44820000 */ mtc1 $v0, $f0 /* 36784 8005B384 00000000 */ nop /* 36788 8005B388 46800020 */ cvt.s.w $f0, $f0 /* 3678C 8005B38C E4A00000 */ swc1 $f0, 0x0($a1) /* 36790 8005B390 8482FFFE */ lh $v0, -0x2($a0) /* 36794 8005B394 24A5000C */ addiu $a1, $a1, 0xC /* 36798 8005B398 44820000 */ mtc1 $v0, $f0 /* 3679C 8005B39C 00000000 */ nop /* 367A0 8005B3A0 46800020 */ cvt.s.w $f0, $f0 /* 367A4 8005B3A4 E460FFFC */ swc1 $f0, -0x4($v1) /* 367A8 8005B3A8 84820000 */ lh $v0, 0x0($a0) /* 367AC 8005B3AC 24840006 */ addiu $a0, $a0, 0x6 /* 367B0 8005B3B0 44820000 */ mtc1 $v0, $f0 /* 367B4 8005B3B4 00000000 */ nop /* 367B8 8005B3B8 46800020 */ cvt.s.w $f0, $f0 /* 367BC 8005B3BC E4600000 */ swc1 $f0, 0x0($v1) /* 367C0 8005B3C0 86C20008 */ lh $v0, 0x8($s6) /* 367C4 8005B3C4 0282102A */ slt $v0, $s4, $v0 /* 367C8 8005B3C8 1440FFEA */ bnez $v0, .L8005B374 /* 367CC 8005B3CC 2463000C */ addiu $v1, $v1, 0xC .L8005B3D0: /* 367D0 8005B3D0 8EC20004 */ lw $v0, 0x4($s6) /* 367D4 8005B3D4 8FA80074 */ lw $t0, 0x74($sp) /* 367D8 8005B3D8 86C30000 */ lh $v1, 0x0($s6) /* 367DC 8005B3DC 01021021 */ addu $v0, $t0, $v0 /* 367E0 8005B3E0 000320C0 */ sll $a0, $v1, 3 /* 367E4 8005B3E4 00832023 */ subu $a0, $a0, $v1 /* 367E8 8005B3E8 00042080 */ sll $a0, $a0, 2 /* 367EC 8005B3EC 0C00AB6C */ jal collision_heap_malloc /* 367F0 8005B3F0 AFA20010 */ sw $v0, 0x10($sp) /* 367F4 8005B3F4 AFC20004 */ sw $v0, 0x4($fp) /* 367F8 8005B3F8 96C30000 */ lhu $v1, 0x0($s6) /* 367FC 8005B3FC 0000A02D */ daddu $s4, $zero, $zero /* 36800 8005B400 A7C3000C */ sh $v1, 0xC($fp) /* 36804 8005B404 86C30000 */ lh $v1, 0x0($s6) /* 36808 8005B408 186000CC */ blez $v1, .L8005B73C /* 3680C 8005B40C 0040382D */ daddu $a3, $v0, $zero /* 36810 8005B410 24F20010 */ addiu $s2, $a3, 0x10 /* 36814 8005B414 8FA80010 */ lw $t0, 0x10($sp) /* 36818 8005B418 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3681C 8005B41C 4481D000 */ mtc1 $at, $f26 /* 36820 8005B420 4480E000 */ mtc1 $zero, $f28 /* 36824 8005B424 25130006 */ addiu $s3, $t0, 0x6 .L8005B428: /* 36828 8005B428 ACE00000 */ sw $zero, 0x0($a3) /* 3682C 8005B42C 9662FFFC */ lhu $v0, -0x4($s3) /* 36830 8005B430 A642FFF4 */ sh $v0, -0xC($s2) /* 36834 8005B434 9662FFFE */ lhu $v0, -0x2($s3) /* 36838 8005B438 A642FFF6 */ sh $v0, -0xA($s2) /* 3683C 8005B43C 96620000 */ lhu $v0, 0x0($s3) /* 36840 8005B440 A642FFFA */ sh $v0, -0x6($s2) /* 36844 8005B444 00021400 */ sll $v0, $v0, 16 /* 36848 8005B448 504000B3 */ beql $v0, $zero, .L8005B718 /* 3684C 8005B44C 2673000C */ addiu $s3, $s3, 0xC /* 36850 8005B450 86640000 */ lh $a0, 0x0($s3) /* 36854 8005B454 AFA70018 */ sw $a3, 0x18($sp) /* 36858 8005B458 0C00AB6C */ jal collision_heap_malloc /* 3685C 8005B45C 00042180 */ sll $a0, $a0, 6 /* 36860 8005B460 0040B82D */ daddu $s7, $v0, $zero /* 36864 8005B464 AE57FFFC */ sw $s7, -0x4($s2) /* 36868 8005B468 8FA80010 */ lw $t0, 0x10($sp) /* 3686C 8005B46C 85020000 */ lh $v0, 0x0($t0) /* 36870 8005B470 8FA70018 */ lw $a3, 0x18($sp) /* 36874 8005B474 04410003 */ bgez $v0, .L8005B484 /* 36878 8005B478 00021080 */ sll $v0, $v0, 2 /* 3687C 8005B47C 08016D41 */ j .L8005B504 /* 36880 8005B480 AE400000 */ sw $zero, 0x0($s2) .L8005B484: /* 36884 8005B484 8FC30008 */ lw $v1, 0x8($fp) /* 36888 8005B488 00621821 */ addu $v1, $v1, $v0 /* 3688C 8005B48C AE430000 */ sw $v1, 0x0($s2) /* 36890 8005B490 8FA80070 */ lw $t0, 0x70($sp) /* 36894 8005B494 1500001C */ bnez $t0, .L8005B508 /* 36898 8005B498 0000A82D */ daddu $s5, $zero, $zero /* 3689C 8005B49C C4600000 */ lwc1 $f0, 0x0($v1) /* 368A0 8005B4A0 461A0001 */ sub.s $f0, $f0, $f26 /* 368A4 8005B4A4 E4600000 */ swc1 $f0, 0x0($v1) /* 368A8 8005B4A8 8E420000 */ lw $v0, 0x0($s2) /* 368AC 8005B4AC C4400004 */ lwc1 $f0, 0x4($v0) /* 368B0 8005B4B0 461A0001 */ sub.s $f0, $f0, $f26 /* 368B4 8005B4B4 E4400004 */ swc1 $f0, 0x4($v0) /* 368B8 8005B4B8 8E420000 */ lw $v0, 0x0($s2) /* 368BC 8005B4BC C4400008 */ lwc1 $f0, 0x8($v0) /* 368C0 8005B4C0 461A0001 */ sub.s $f0, $f0, $f26 /* 368C4 8005B4C4 E4400008 */ swc1 $f0, 0x8($v0) /* 368C8 8005B4C8 8E420000 */ lw $v0, 0x0($s2) /* 368CC 8005B4CC C440000C */ lwc1 $f0, 0xC($v0) /* 368D0 8005B4D0 461A0000 */ add.s $f0, $f0, $f26 /* 368D4 8005B4D4 E440000C */ swc1 $f0, 0xC($v0) /* 368D8 8005B4D8 8E420000 */ lw $v0, 0x0($s2) /* 368DC 8005B4DC C4400010 */ lwc1 $f0, 0x10($v0) /* 368E0 8005B4E0 461A0000 */ add.s $f0, $f0, $f26 /* 368E4 8005B4E4 E4400010 */ swc1 $f0, 0x10($v0) /* 368E8 8005B4E8 8E420000 */ lw $v0, 0x0($s2) /* 368EC 8005B4EC C4400014 */ lwc1 $f0, 0x14($v0) /* 368F0 8005B4F0 461A0000 */ add.s $f0, $f0, $f26 /* 368F4 8005B4F4 E4400014 */ swc1 $f0, 0x14($v0) /* 368F8 8005B4F8 8E420000 */ lw $v0, 0x0($s2) /* 368FC 8005B4FC 8C420018 */ lw $v0, 0x18($v0) /* 36900 8005B500 ACE20000 */ sw $v0, 0x0($a3) .L8005B504: /* 36904 8005B504 0000A82D */ daddu $s5, $zero, $zero .L8005B508: /* 36908 8005B508 8E620002 */ lw $v0, 0x2($s3) /* 3690C 8005B50C 8FA80074 */ lw $t0, 0x74($sp) /* 36910 8005B510 86630000 */ lh $v1, 0x0($s3) /* 36914 8005B514 1860007F */ blez $v1, .L8005B714 /* 36918 8005B518 01028821 */ addu $s1, $t0, $v0 /* 3691C 8005B51C 26F00038 */ addiu $s0, $s7, 0x38 .L8005B520: /* 36920 8005B520 8E230000 */ lw $v1, 0x0($s1) /* 36924 8005B524 8FC40000 */ lw $a0, 0x0($fp) /* 36928 8005B528 306303FF */ andi $v1, $v1, 0x3FF /* 3692C 8005B52C 00031040 */ sll $v0, $v1, 1 /* 36930 8005B530 00431021 */ addu $v0, $v0, $v1 /* 36934 8005B534 00021080 */ sll $v0, $v0, 2 /* 36938 8005B538 00822021 */ addu $a0, $a0, $v0 /* 3693C 8005B53C AEE40000 */ sw $a0, 0x0($s7) /* 36940 8005B540 8E220000 */ lw $v0, 0x0($s1) /* 36944 8005B544 8FC60000 */ lw $a2, 0x0($fp) /* 36948 8005B548 00021283 */ sra $v0, $v0, 10 /* 3694C 8005B54C 304203FF */ andi $v0, $v0, 0x3FF /* 36950 8005B550 00021840 */ sll $v1, $v0, 1 /* 36954 8005B554 00621821 */ addu $v1, $v1, $v0 /* 36958 8005B558 00031880 */ sll $v1, $v1, 2 /* 3695C 8005B55C 00C33021 */ addu $a2, $a2, $v1 /* 36960 8005B560 AE06FFCC */ sw $a2, -0x34($s0) /* 36964 8005B564 8E220000 */ lw $v0, 0x0($s1) /* 36968 8005B568 8FC50000 */ lw $a1, 0x0($fp) /* 3696C 8005B56C 00021503 */ sra $v0, $v0, 20 /* 36970 8005B570 304203FF */ andi $v0, $v0, 0x3FF /* 36974 8005B574 00021840 */ sll $v1, $v0, 1 /* 36978 8005B578 00621821 */ addu $v1, $v1, $v0 /* 3697C 8005B57C 00031880 */ sll $v1, $v1, 2 /* 36980 8005B580 00A32821 */ addu $a1, $a1, $v1 /* 36984 8005B584 AE05FFD0 */ sw $a1, -0x30($s0) /* 36988 8005B588 8E220000 */ lw $v0, 0x0($s1) /* 3698C 8005B58C 00021783 */ sra $v0, $v0, 30 /* 36990 8005B590 30420001 */ andi $v0, $v0, 0x1 /* 36994 8005B594 A6020004 */ sh $v0, 0x4($s0) /* 36998 8005B598 C4A00000 */ lwc1 $f0, 0x0($a1) /* 3699C 8005B59C C4820000 */ lwc1 $f2, 0x0($a0) /* 369A0 8005B5A0 46020001 */ sub.s $f0, $f0, $f2 /* 369A4 8005B5A4 E600FFD4 */ swc1 $f0, -0x2C($s0) /* 369A8 8005B5A8 C4A00004 */ lwc1 $f0, 0x4($a1) /* 369AC 8005B5AC C4820004 */ lwc1 $f2, 0x4($a0) /* 369B0 8005B5B0 46020001 */ sub.s $f0, $f0, $f2 /* 369B4 8005B5B4 E600FFD8 */ swc1 $f0, -0x28($s0) /* 369B8 8005B5B8 C4A00008 */ lwc1 $f0, 0x8($a1) /* 369BC 8005B5BC C4820008 */ lwc1 $f2, 0x8($a0) /* 369C0 8005B5C0 46020001 */ sub.s $f0, $f0, $f2 /* 369C4 8005B5C4 E600FFDC */ swc1 $f0, -0x24($s0) /* 369C8 8005B5C8 C4800000 */ lwc1 $f0, 0x0($a0) /* 369CC 8005B5CC C4C20000 */ lwc1 $f2, 0x0($a2) /* 369D0 8005B5D0 46020001 */ sub.s $f0, $f0, $f2 /* 369D4 8005B5D4 E600FFE0 */ swc1 $f0, -0x20($s0) /* 369D8 8005B5D8 C4800004 */ lwc1 $f0, 0x4($a0) /* 369DC 8005B5DC C4C20004 */ lwc1 $f2, 0x4($a2) /* 369E0 8005B5E0 46020001 */ sub.s $f0, $f0, $f2 /* 369E4 8005B5E4 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 369E8 8005B5E8 C4800008 */ lwc1 $f0, 0x8($a0) /* 369EC 8005B5EC C4C20008 */ lwc1 $f2, 0x8($a2) /* 369F0 8005B5F0 46020001 */ sub.s $f0, $f0, $f2 /* 369F4 8005B5F4 E600FFE8 */ swc1 $f0, -0x18($s0) /* 369F8 8005B5F8 C4C00000 */ lwc1 $f0, 0x0($a2) /* 369FC 8005B5FC C4A20000 */ lwc1 $f2, 0x0($a1) /* 36A00 8005B600 46020001 */ sub.s $f0, $f0, $f2 /* 36A04 8005B604 E600FFEC */ swc1 $f0, -0x14($s0) /* 36A08 8005B608 C4C00004 */ lwc1 $f0, 0x4($a2) /* 36A0C 8005B60C C4A20004 */ lwc1 $f2, 0x4($a1) /* 36A10 8005B610 46020001 */ sub.s $f0, $f0, $f2 /* 36A14 8005B614 E600FFF0 */ swc1 $f0, -0x10($s0) /* 36A18 8005B618 C60AFFD8 */ lwc1 $f10, -0x28($s0) /* 36A1C 8005B61C C608FFE8 */ lwc1 $f8, -0x18($s0) /* 36A20 8005B620 46085382 */ mul.s $f14, $f10, $f8 /* 36A24 8005B624 00000000 */ nop /* 36A28 8005B628 C606FFDC */ lwc1 $f6, -0x24($s0) /* 36A2C 8005B62C C604FFE4 */ lwc1 $f4, -0x1C($s0) /* 36A30 8005B630 46043302 */ mul.s $f12, $f6, $f4 /* 36A34 8005B634 00000000 */ nop /* 36A38 8005B638 C602FFE0 */ lwc1 $f2, -0x20($s0) /* 36A3C 8005B63C 46023182 */ mul.s $f6, $f6, $f2 /* 36A40 8005B640 00000000 */ nop /* 36A44 8005B644 C600FFD4 */ lwc1 $f0, -0x2C($s0) /* 36A48 8005B648 46080202 */ mul.s $f8, $f0, $f8 /* 36A4C 8005B64C 00000000 */ nop /* 36A50 8005B650 46040002 */ mul.s $f0, $f0, $f4 /* 36A54 8005B654 00000000 */ nop /* 36A58 8005B658 46025282 */ mul.s $f10, $f10, $f2 /* 36A5C 8005B65C 00000000 */ nop /* 36A60 8005B660 460C7601 */ sub.s $f24, $f14, $f12 /* 36A64 8005B664 4618C102 */ mul.s $f4, $f24, $f24 /* 36A68 8005B668 00000000 */ nop /* 36A6C 8005B66C 46083501 */ sub.s $f20, $f6, $f8 /* 36A70 8005B670 4614A182 */ mul.s $f6, $f20, $f20 /* 36A74 8005B674 00000000 */ nop /* 36A78 8005B678 460A0581 */ sub.s $f22, $f0, $f10 /* 36A7C 8005B67C 4616B202 */ mul.s $f8, $f22, $f22 /* 36A80 8005B680 00000000 */ nop /* 36A84 8005B684 C4C20008 */ lwc1 $f2, 0x8($a2) /* 36A88 8005B688 C4A00008 */ lwc1 $f0, 0x8($a1) /* 36A8C 8005B68C 46001081 */ sub.s $f2, $f2, $f0 /* 36A90 8005B690 46062100 */ add.s $f4, $f4, $f6 /* 36A94 8005B694 46082300 */ add.s $f12, $f4, $f8 /* 36A98 8005B698 461C6032 */ c.eq.s $f12, $f28 /* 36A9C 8005B69C 00000000 */ nop /* 36AA0 8005B6A0 4501000B */ bc1t .L8005B6D0 /* 36AA4 8005B6A4 E602FFF4 */ swc1 $f2, -0xC($s0) /* 36AA8 8005B6A8 46006004 */ sqrt.s $f0, $f12 /* 36AAC 8005B6AC 46000032 */ c.eq.s $f0, $f0 /* 36AB0 8005B6B0 00000000 */ nop /* 36AB4 8005B6B4 45030007 */ bc1tl .L8005B6D4 /* 36AB8 8005B6B8 4600D303 */ div.s $f12, $f26, $f0 /* 36ABC 8005B6BC 0C0187BC */ jal sqrtf /* 36AC0 8005B6C0 AFA70018 */ sw $a3, 0x18($sp) /* 36AC4 8005B6C4 8FA70018 */ lw $a3, 0x18($sp) /* 36AC8 8005B6C8 08016DB5 */ j .L8005B6D4 /* 36ACC 8005B6CC 4600D303 */ div.s $f12, $f26, $f0 .L8005B6D0: /* 36AD0 8005B6D0 4600E306 */ mov.s $f12, $f28 .L8005B6D4: /* 36AD4 8005B6D4 460CC082 */ mul.s $f2, $f24, $f12 /* 36AD8 8005B6D8 00000000 */ nop /* 36ADC 8005B6DC 460CA102 */ mul.s $f4, $f20, $f12 /* 36AE0 8005B6E0 00000000 */ nop /* 36AE4 8005B6E4 26310004 */ addiu $s1, $s1, 0x4 /* 36AE8 8005B6E8 460CB002 */ mul.s $f0, $f22, $f12 /* 36AEC 8005B6EC 00000000 */ nop /* 36AF0 8005B6F0 26F70040 */ addiu $s7, $s7, 0x40 /* 36AF4 8005B6F4 26B50001 */ addiu $s5, $s5, 0x1 /* 36AF8 8005B6F8 E602FFF8 */ swc1 $f2, -0x8($s0) /* 36AFC 8005B6FC E604FFFC */ swc1 $f4, -0x4($s0) /* 36B00 8005B700 E6000000 */ swc1 $f0, 0x0($s0) /* 36B04 8005B704 86620000 */ lh $v0, 0x0($s3) /* 36B08 8005B708 02A2102A */ slt $v0, $s5, $v0 /* 36B0C 8005B70C 1440FF84 */ bnez $v0, .L8005B520 /* 36B10 8005B710 26100040 */ addiu $s0, $s0, 0x40 .L8005B714: /* 36B14 8005B714 2673000C */ addiu $s3, $s3, 0xC .L8005B718: /* 36B18 8005B718 2652001C */ addiu $s2, $s2, 0x1C /* 36B1C 8005B71C 8FA80010 */ lw $t0, 0x10($sp) /* 36B20 8005B720 2508000C */ addiu $t0, $t0, 0xC /* 36B24 8005B724 AFA80010 */ sw $t0, 0x10($sp) /* 36B28 8005B728 86C20000 */ lh $v0, 0x0($s6) /* 36B2C 8005B72C 26940001 */ addiu $s4, $s4, 0x1 /* 36B30 8005B730 0282102A */ slt $v0, $s4, $v0 /* 36B34 8005B734 1440FF3C */ bnez $v0, .L8005B428 /* 36B38 8005B738 24E7001C */ addiu $a3, $a3, 0x1C .L8005B73C: /* 36B3C 8005B73C 8FBF0044 */ lw $ra, 0x44($sp) /* 36B40 8005B740 8FBE0040 */ lw $fp, 0x40($sp) /* 36B44 8005B744 8FB7003C */ lw $s7, 0x3C($sp) /* 36B48 8005B748 8FB60038 */ lw $s6, 0x38($sp) /* 36B4C 8005B74C 8FB50034 */ lw $s5, 0x34($sp) /* 36B50 8005B750 8FB40030 */ lw $s4, 0x30($sp) /* 36B54 8005B754 8FB3002C */ lw $s3, 0x2C($sp) /* 36B58 8005B758 8FB20028 */ lw $s2, 0x28($sp) /* 36B5C 8005B75C 8FB10024 */ lw $s1, 0x24($sp) /* 36B60 8005B760 8FB00020 */ lw $s0, 0x20($sp) /* 36B64 8005B764 D7BC0068 */ ldc1 $f28, 0x68($sp) /* 36B68 8005B768 D7BA0060 */ ldc1 $f26, 0x60($sp) /* 36B6C 8005B76C D7B80058 */ ldc1 $f24, 0x58($sp) /* 36B70 8005B770 D7B60050 */ ldc1 $f22, 0x50($sp) /* 36B74 8005B774 D7B40048 */ ldc1 $f20, 0x48($sp) /* 36B78 8005B778 03E00008 */ jr $ra /* 36B7C 8005B77C 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: void load_hit_data(s32 idx, HitFile* hit) { s32 collisionOffset; MapSettings* map; CollisionData* collisionData; HitFileHeader* assetCollisionData; Vec3f* vertices; Vec3s* assetVertices; u32* boundingBox; u32* assetBoundingBox; Collider* collider; HitAssetCollider* assetCollider; ColliderTriangle* triangle; s32* trianglePacked; s16 numTriangles; s32 i,j; f32 e13_y, e21_z, e13_z, e21_y, e21_x, e13_x, normalX, normalY, normalZ, coeff; assetCollisionData = NULL; collisionData = NULL; map = get_current_map_settings(); switch (idx) { case 0: // Colliders collisionOffset = map->hitAssetCollisionOffset; if (collisionOffset == 0) { return; } assetCollisionData = (HitFileHeader*)((void*)hit + collisionOffset); collisionData = &gCollisionData; break; case 1: // Zones collisionOffset = map->hitAssetZoneOffset; if (collisionOffset == 0) { return; } assetCollisionData = (HitFileHeader*)((void*)hit + collisionOffset); collisionData = &gZoneCollisionData; break; } assetBoundingBox = (u32*)((void*)hit + assetCollisionData->boundingBoxesOffset); collisionData->aabbs = collision_heap_malloc(assetCollisionData->boundingBoxesDataSize * 4); for (i = 0, boundingBox = (u32*)(collisionData->aabbs); i < assetCollisionData->boundingBoxesDataSize; assetBoundingBox++, boundingBox++, i++) { *boundingBox = *assetBoundingBox; } assetVertices = (Vec3s*)((void*)hit + assetCollisionData->verticesOffset); collisionData->vertices = collision_heap_malloc(assetCollisionData->numVertices * sizeof(Vec3f)); for (i = 0, vertices = collisionData->vertices; i < assetCollisionData->numVertices; vertices++, assetVertices++, i++) { vertices->x = assetVertices->x; vertices->y = assetVertices->y; vertices->z = assetVertices->z; } assetCollider = (HitAssetCollider*)((void*)hit + assetCollisionData->collidersOffset); collider = collisionData->colliderList = collision_heap_malloc(assetCollisionData->numColliders * sizeof(Collider)); collisionData->numColliders = assetCollisionData->numColliders; for (i = 0; i < assetCollisionData->numColliders; assetCollider++, collider++, i++) { collider->flags = 0; collider->nextSibling = assetCollider->nextSibling; collider->firstChild = assetCollider->firstChild; collider->numTriangles = assetCollider->numTriangles; numTriangles = collider->numTriangles; if (numTriangles) { collider->triangleTable = triangle = collision_heap_malloc(assetCollider->numTriangles * sizeof(ColliderTriangle)); if (assetCollider->boundingBoxOffset < 0) { collider->aabb = NULL; } else { collider->aabb = (ColliderBoundingBox*)((u32*)(collisionData->aabbs) + assetCollider->boundingBoxOffset); if (idx == 0) { collider->aabb->min.x -= 1; collider->aabb->min.y -= 1; collider->aabb->min.z -= 1; collider->aabb->max.x += 1; collider->aabb->max.y += 1; collider->aabb->max.z += 1; collider->flags = collider->aabb->flagsForCollider; } } trianglePacked = (s32*)((void*)hit + assetCollider->trianglesOffset); for (j = 0; j < assetCollider->numTriangles; trianglePacked++, triangle++, j++) { Vec3f* v1 = triangle->v1 = &collisionData->vertices[(*trianglePacked) & 0x3FF]; Vec3f* v2 = triangle->v2 = &collisionData->vertices[(*trianglePacked >> 10) & 0x3FF]; Vec3f* v3 = triangle->v3 = &collisionData->vertices[(*trianglePacked >> 20) & 0x3FF]; triangle->oneSided = (*trianglePacked >> 30) & 1; triangle->e13.x = v3->x - v1->x; triangle->e13.y = v3->y - v1->y; triangle->e13.z = v3->z - v1->z; triangle->e21.x = v1->x - v2->x; triangle->e21.y = v1->y - v2->y; triangle->e21.z = v1->z - v2->z; triangle->e32.x = v2->x - v3->x; triangle->e32.y = v2->y - v3->y; triangle->e32.z = v2->z - v3->z; e13_x = triangle->e13.x; e13_y = triangle->e13.y; e13_z = triangle->e13.z; e21_x = triangle->e21.x; e21_y = triangle->e21.y; e21_z = triangle->e21.z; // cross product normalX = e13_y * e21_z - e13_z * e21_y; normalY = e13_z * e21_x - e13_x * e21_z; normalZ = e13_x * e21_y - e13_y * e21_x; coeff = SQ(normalX) + SQ(normalY) + SQ(normalZ); if (coeff != 0) { coeff = 1.0f / sqrtf(coeff); } else { coeff = 0.0f; } triangle->normal.x = normalX * coeff; triangle->normal.y = normalY * coeff; triangle->normal.z = normalZ * coeff; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_animator /* B5BD4 8011F4D4 27BDFFA8 */ addiu $sp, $sp, -0x58 /* B5BD8 8011F4D8 AFB00050 */ sw $s0, 0x50($sp) /* B5BDC 8011F4DC 0080802D */ daddu $s0, $a0, $zero /* B5BE0 8011F4E0 AFBF0054 */ sw $ra, 0x54($sp) /* B5BE4 8011F4E4 8E0200D8 */ lw $v0, 0xD8($s0) /* B5BE8 8011F4E8 10400013 */ beqz $v0, .L8011F538 /* B5BEC 8011F4EC 3C020001 */ lui $v0, (0x11630 >> 16) /* B5BF0 8011F4F0 3C04800A */ lui $a0, %hi(gMainGfxPos) /* B5BF4 8011F4F4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* B5BF8 8011F4F8 8C830000 */ lw $v1, 0x0($a0) /* B5BFC 8011F4FC 3C028015 */ lui $v0, %hi(gAnimVtxSegment) /* B5C00 8011F500 8C423A60 */ lw $v0, %lo(gAnimVtxSegment)($v0) /* B5C04 8011F504 0060282D */ daddu $a1, $v1, $zero /* B5C08 8011F508 24630008 */ addiu $v1, $v1, 0x8 /* B5C0C 8011F50C 00021080 */ sll $v0, $v0, 2 /* B5C10 8011F510 3042FFFF */ andi $v0, $v0, 0xFFFF /* B5C14 8011F514 AC830000 */ sw $v1, 0x0($a0) /* B5C18 8011F518 3C03DB06 */ lui $v1, (0xDB060000 >> 16) /* B5C1C 8011F51C 00431025 */ or $v0, $v0, $v1 /* B5C20 8011F520 ACA20000 */ sw $v0, 0x0($a1) /* B5C24 8011F524 8E0200D8 */ lw $v0, 0xD8($s0) /* B5C28 8011F528 3C038000 */ lui $v1, (0x80000000 >> 16) /* B5C2C 8011F52C 00431021 */ addu $v0, $v0, $v1 /* B5C30 8011F530 ACA20004 */ sw $v0, 0x4($a1) /* B5C34 8011F534 3C020001 */ lui $v0, (0x11630 >> 16) .L8011F538: /* B5C38 8011F538 34421630 */ ori $v0, $v0, (0x11630 & 0xFFFF) /* B5C3C 8011F53C 26050098 */ addiu $a1, $s0, 0x98 /* B5C40 8011F540 260600D8 */ addiu $a2, $s0, 0xD8 /* B5C44 8011F544 3C038007 */ lui $v1, %hi(gMatrixListPos) /* B5C48 8011F548 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1) /* B5C4C 8011F54C 3C04800A */ lui $a0, %hi(gDisplayContext) /* B5C50 8011F550 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0) /* B5C54 8011F554 00031980 */ sll $v1, $v1, 6 /* B5C58 8011F558 00832021 */ addu $a0, $a0, $v1 /* B5C5C 8011F55C 00822021 */ addu $a0, $a0, $v0 .L8011F560: /* B5C60 8011F560 8CAA0000 */ lw $t2, 0x0($a1) /* B5C64 8011F564 8CAB0004 */ lw $t3, 0x4($a1) /* B5C68 8011F568 8CAC0008 */ lw $t4, 0x8($a1) /* B5C6C 8011F56C 8CAD000C */ lw $t5, 0xC($a1) /* B5C70 8011F570 AC8A0000 */ sw $t2, 0x0($a0) /* B5C74 8011F574 AC8B0004 */ sw $t3, 0x4($a0) /* B5C78 8011F578 AC8C0008 */ sw $t4, 0x8($a0) /* B5C7C 8011F57C AC8D000C */ sw $t5, 0xC($a0) /* B5C80 8011F580 24A50010 */ addiu $a1, $a1, 0x10 /* B5C84 8011F584 14A6FFF6 */ bne $a1, $a2, .L8011F560 /* B5C88 8011F588 24840010 */ addiu $a0, $a0, 0x10 /* B5C8C 8011F58C 3C07DA38 */ lui $a3, (0xDA380002 >> 16) /* B5C90 8011F590 34E70002 */ ori $a3, $a3, (0xDA380002 & 0xFFFF) /* B5C94 8011F594 3C080001 */ lui $t0, (0x11630 >> 16) /* B5C98 8011F598 3C05800A */ lui $a1, %hi(gMainGfxPos) /* B5C9C 8011F59C 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* B5CA0 8011F5A0 35081630 */ ori $t0, $t0, (0x11630 & 0xFFFF) /* B5CA4 8011F5A4 3C048007 */ lui $a0, %hi(gMatrixListPos) /* B5CA8 8011F5A8 248441F0 */ addiu $a0, $a0, %lo(gMatrixListPos) /* B5CAC 8011F5AC 8CA20000 */ lw $v0, 0x0($a1) /* B5CB0 8011F5B0 94830000 */ lhu $v1, 0x0($a0) /* B5CB4 8011F5B4 0040302D */ daddu $a2, $v0, $zero /* B5CB8 8011F5B8 24420008 */ addiu $v0, $v0, 0x8 /* B5CBC 8011F5BC ACA20000 */ sw $v0, 0x0($a1) /* B5CC0 8011F5C0 24620001 */ addiu $v0, $v1, 0x1 /* B5CC4 8011F5C4 3063FFFF */ andi $v1, $v1, 0xFFFF /* B5CC8 8011F5C8 00031980 */ sll $v1, $v1, 6 /* B5CCC 8011F5CC 00681821 */ addu $v1, $v1, $t0 /* B5CD0 8011F5D0 ACC70000 */ sw $a3, 0x0($a2) /* B5CD4 8011F5D4 A4820000 */ sh $v0, 0x0($a0) /* B5CD8 8011F5D8 3C02800A */ lui $v0, %hi(gDisplayContext) /* B5CDC 8011F5DC 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* B5CE0 8011F5E0 3C048015 */ lui $a0, %hi(gAnimModelFogEnabled) /* B5CE4 8011F5E4 8C843A44 */ lw $a0, %lo(gAnimModelFogEnabled)($a0) /* B5CE8 8011F5E8 00431021 */ addu $v0, $v0, $v1 /* B5CEC 8011F5EC 0004202B */ sltu $a0, $zero, $a0 /* B5CF0 8011F5F0 10800006 */ beqz $a0, .L8011F60C /* B5CF4 8011F5F4 ACC20004 */ sw $v0, 0x4($a2) /* B5CF8 8011F5F8 24020001 */ addiu $v0, $zero, 0x1 /* B5CFC 8011F5FC 10820063 */ beq $a0, $v0, .L8011F78C /* B5D00 8011F600 27A40010 */ addiu $a0, $sp, 0x10 /* B5D04 8011F604 08047E80 */ j .L8011FA00 /* B5D08 8011F608 00000000 */ nop .L8011F60C: /* B5D0C 8011F60C 92020004 */ lbu $v0, 0x4($s0) /* B5D10 8011F610 2442FFFF */ addiu $v0, $v0, -0x1 /* B5D14 8011F614 00021600 */ sll $v0, $v0, 24 /* B5D18 8011F618 00021E03 */ sra $v1, $v0, 24 /* B5D1C 8011F61C 2C620026 */ sltiu $v0, $v1, 0x26 /* B5D20 8011F620 104000F6 */ beqz $v0, .L8011F9FC /* B5D24 8011F624 00031080 */ sll $v0, $v1, 2 /* B5D28 8011F628 3C018015 */ lui $at, %hi(jtbl_8014FEE0) /* B5D2C 8011F62C 00220821 */ addu $at, $at, $v0 /* B5D30 8011F630 8C22FEE0 */ lw $v0, %lo(jtbl_8014FEE0)($at) /* B5D34 8011F634 00400008 */ jr $v0 /* B5D38 8011F638 00000000 */ nop glabel .L8011F63C /* B5D3C 8011F63C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5D40 8011F640 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5D44 8011F644 8C620000 */ lw $v0, 0x0($v1) /* B5D48 8011F648 0040202D */ daddu $a0, $v0, $zero /* B5D4C 8011F64C 24420008 */ addiu $v0, $v0, 0x8 /* B5D50 8011F650 AC620000 */ sw $v0, 0x0($v1) /* B5D54 8011F654 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5D58 8011F658 AC820000 */ sw $v0, 0x0($a0) /* B5D5C 8011F65C 3C028015 */ lui $v0, %hi(D_8014B7F8) /* B5D60 8011F660 2442B7F8 */ addiu $v0, $v0, %lo(D_8014B7F8) /* B5D64 8011F664 08047E7F */ j .L8011F9FC /* B5D68 8011F668 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F66C /* B5D6C 8011F66C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5D70 8011F670 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5D74 8011F674 8C620000 */ lw $v0, 0x0($v1) /* B5D78 8011F678 0040202D */ daddu $a0, $v0, $zero /* B5D7C 8011F67C 24420008 */ addiu $v0, $v0, 0x8 /* B5D80 8011F680 AC620000 */ sw $v0, 0x0($v1) /* B5D84 8011F684 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5D88 8011F688 AC820000 */ sw $v0, 0x0($a0) /* B5D8C 8011F68C 3C028015 */ lui $v0, %hi(D_8014B820) /* B5D90 8011F690 2442B820 */ addiu $v0, $v0, %lo(D_8014B820) /* B5D94 8011F694 08047E7F */ j .L8011F9FC /* B5D98 8011F698 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F69C /* B5D9C 8011F69C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5DA0 8011F6A0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5DA4 8011F6A4 8C620000 */ lw $v0, 0x0($v1) /* B5DA8 8011F6A8 0040202D */ daddu $a0, $v0, $zero /* B5DAC 8011F6AC 24420008 */ addiu $v0, $v0, 0x8 /* B5DB0 8011F6B0 AC620000 */ sw $v0, 0x0($v1) /* B5DB4 8011F6B4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5DB8 8011F6B8 AC820000 */ sw $v0, 0x0($a0) /* B5DBC 8011F6BC 3C028015 */ lui $v0, %hi(D_8014B848) /* B5DC0 8011F6C0 2442B848 */ addiu $v0, $v0, %lo(D_8014B848) /* B5DC4 8011F6C4 08047E7F */ j .L8011F9FC /* B5DC8 8011F6C8 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F6CC /* B5DCC 8011F6CC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5DD0 8011F6D0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5DD4 8011F6D4 8C620000 */ lw $v0, 0x0($v1) /* B5DD8 8011F6D8 0040202D */ daddu $a0, $v0, $zero /* B5DDC 8011F6DC 24420008 */ addiu $v0, $v0, 0x8 /* B5DE0 8011F6E0 AC620000 */ sw $v0, 0x0($v1) /* B5DE4 8011F6E4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5DE8 8011F6E8 AC820000 */ sw $v0, 0x0($a0) /* B5DEC 8011F6EC 3C028015 */ lui $v0, %hi(D_8014B870) /* B5DF0 8011F6F0 2442B870 */ addiu $v0, $v0, %lo(D_8014B870) /* B5DF4 8011F6F4 08047E7F */ j .L8011F9FC /* B5DF8 8011F6F8 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F6FC /* B5DFC 8011F6FC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5E00 8011F700 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5E04 8011F704 8C620000 */ lw $v0, 0x0($v1) /* B5E08 8011F708 0040202D */ daddu $a0, $v0, $zero /* B5E0C 8011F70C 24420008 */ addiu $v0, $v0, 0x8 /* B5E10 8011F710 AC620000 */ sw $v0, 0x0($v1) /* B5E14 8011F714 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5E18 8011F718 AC820000 */ sw $v0, 0x0($a0) /* B5E1C 8011F71C 3C028015 */ lui $v0, %hi(D_8014B898) /* B5E20 8011F720 2442B898 */ addiu $v0, $v0, %lo(D_8014B898) /* B5E24 8011F724 08047E7F */ j .L8011F9FC /* B5E28 8011F728 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F72C /* B5E2C 8011F72C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5E30 8011F730 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5E34 8011F734 8C620000 */ lw $v0, 0x0($v1) /* B5E38 8011F738 0040202D */ daddu $a0, $v0, $zero /* B5E3C 8011F73C 24420008 */ addiu $v0, $v0, 0x8 /* B5E40 8011F740 AC620000 */ sw $v0, 0x0($v1) /* B5E44 8011F744 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5E48 8011F748 AC820000 */ sw $v0, 0x0($a0) /* B5E4C 8011F74C 3C028015 */ lui $v0, %hi(D_8014B8C0) /* B5E50 8011F750 2442B8C0 */ addiu $v0, $v0, %lo(D_8014B8C0) /* B5E54 8011F754 08047E7F */ j .L8011F9FC /* B5E58 8011F758 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F75C /* B5E5C 8011F75C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5E60 8011F760 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5E64 8011F764 8C620000 */ lw $v0, 0x0($v1) /* B5E68 8011F768 0040202D */ daddu $a0, $v0, $zero /* B5E6C 8011F76C 24420008 */ addiu $v0, $v0, 0x8 /* B5E70 8011F770 AC620000 */ sw $v0, 0x0($v1) /* B5E74 8011F774 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5E78 8011F778 AC820000 */ sw $v0, 0x0($a0) /* B5E7C 8011F77C 3C028015 */ lui $v0, %hi(D_8014B8E8) /* B5E80 8011F780 2442B8E8 */ addiu $v0, $v0, %lo(D_8014B8E8) /* B5E84 8011F784 08047E7F */ j .L8011F9FC /* B5E88 8011F788 AC820004 */ sw $v0, 0x4($a0) .L8011F78C: /* B5E8C 8011F78C 92020004 */ lbu $v0, 0x4($s0) /* B5E90 8011F790 2442FFFF */ addiu $v0, $v0, -0x1 /* B5E94 8011F794 00021600 */ sll $v0, $v0, 24 /* B5E98 8011F798 00021E03 */ sra $v1, $v0, 24 /* B5E9C 8011F79C 2C620026 */ sltiu $v0, $v1, 0x26 /* B5EA0 8011F7A0 10400059 */ beqz $v0, .L8011F908 /* B5EA4 8011F7A4 00031080 */ sll $v0, $v1, 2 /* B5EA8 8011F7A8 3C018015 */ lui $at, %hi(jtbl_8014FF78) /* B5EAC 8011F7AC 00220821 */ addu $at, $at, $v0 /* B5EB0 8011F7B0 8C22FF78 */ lw $v0, %lo(jtbl_8014FF78)($at) /* B5EB4 8011F7B4 00400008 */ jr $v0 /* B5EB8 8011F7B8 00000000 */ nop glabel .L8011F7BC /* B5EBC 8011F7BC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5EC0 8011F7C0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5EC4 8011F7C4 8C620000 */ lw $v0, 0x0($v1) /* B5EC8 8011F7C8 0040202D */ daddu $a0, $v0, $zero /* B5ECC 8011F7CC 24420008 */ addiu $v0, $v0, 0x8 /* B5ED0 8011F7D0 AC620000 */ sw $v0, 0x0($v1) /* B5ED4 8011F7D4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5ED8 8011F7D8 AC820000 */ sw $v0, 0x0($a0) /* B5EDC 8011F7DC 3C028015 */ lui $v0, %hi(D_8014BE78) /* B5EE0 8011F7E0 2442BE78 */ addiu $v0, $v0, %lo(D_8014BE78) /* B5EE4 8011F7E4 08047E42 */ j .L8011F908 /* B5EE8 8011F7E8 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F7EC /* B5EEC 8011F7EC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5EF0 8011F7F0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5EF4 8011F7F4 8C620000 */ lw $v0, 0x0($v1) /* B5EF8 8011F7F8 0040202D */ daddu $a0, $v0, $zero /* B5EFC 8011F7FC 24420008 */ addiu $v0, $v0, 0x8 /* B5F00 8011F800 AC620000 */ sw $v0, 0x0($v1) /* B5F04 8011F804 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5F08 8011F808 AC820000 */ sw $v0, 0x0($a0) /* B5F0C 8011F80C 3C028015 */ lui $v0, %hi(D_8014BEA0) /* B5F10 8011F810 2442BEA0 */ addiu $v0, $v0, %lo(D_8014BEA0) /* B5F14 8011F814 08047E42 */ j .L8011F908 /* B5F18 8011F818 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F81C /* B5F1C 8011F81C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5F20 8011F820 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5F24 8011F824 8C620000 */ lw $v0, 0x0($v1) /* B5F28 8011F828 0040202D */ daddu $a0, $v0, $zero /* B5F2C 8011F82C 24420008 */ addiu $v0, $v0, 0x8 /* B5F30 8011F830 AC620000 */ sw $v0, 0x0($v1) /* B5F34 8011F834 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5F38 8011F838 AC820000 */ sw $v0, 0x0($a0) /* B5F3C 8011F83C 3C028015 */ lui $v0, %hi(D_8014BEC8) /* B5F40 8011F840 2442BEC8 */ addiu $v0, $v0, %lo(D_8014BEC8) /* B5F44 8011F844 08047E42 */ j .L8011F908 /* B5F48 8011F848 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F84C /* B5F4C 8011F84C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5F50 8011F850 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5F54 8011F854 8C620000 */ lw $v0, 0x0($v1) /* B5F58 8011F858 0040202D */ daddu $a0, $v0, $zero /* B5F5C 8011F85C 24420008 */ addiu $v0, $v0, 0x8 /* B5F60 8011F860 AC620000 */ sw $v0, 0x0($v1) /* B5F64 8011F864 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5F68 8011F868 AC820000 */ sw $v0, 0x0($a0) /* B5F6C 8011F86C 3C028015 */ lui $v0, %hi(D_8014BEF0) /* B5F70 8011F870 2442BEF0 */ addiu $v0, $v0, %lo(D_8014BEF0) /* B5F74 8011F874 08047E42 */ j .L8011F908 /* B5F78 8011F878 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F87C /* B5F7C 8011F87C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5F80 8011F880 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5F84 8011F884 8C620000 */ lw $v0, 0x0($v1) /* B5F88 8011F888 0040202D */ daddu $a0, $v0, $zero /* B5F8C 8011F88C 24420008 */ addiu $v0, $v0, 0x8 /* B5F90 8011F890 AC620000 */ sw $v0, 0x0($v1) /* B5F94 8011F894 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5F98 8011F898 AC820000 */ sw $v0, 0x0($a0) /* B5F9C 8011F89C 3C028015 */ lui $v0, %hi(D_8014BF18) /* B5FA0 8011F8A0 2442BF18 */ addiu $v0, $v0, %lo(D_8014BF18) /* B5FA4 8011F8A4 08047E42 */ j .L8011F908 /* B5FA8 8011F8A8 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F8AC /* B5FAC 8011F8AC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5FB0 8011F8B0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5FB4 8011F8B4 8C620000 */ lw $v0, 0x0($v1) /* B5FB8 8011F8B8 0040202D */ daddu $a0, $v0, $zero /* B5FBC 8011F8BC 24420008 */ addiu $v0, $v0, 0x8 /* B5FC0 8011F8C0 AC620000 */ sw $v0, 0x0($v1) /* B5FC4 8011F8C4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5FC8 8011F8C8 AC820000 */ sw $v0, 0x0($a0) /* B5FCC 8011F8CC 3C028015 */ lui $v0, %hi(D_8014BF40) /* B5FD0 8011F8D0 2442BF40 */ addiu $v0, $v0, %lo(D_8014BF40) /* B5FD4 8011F8D4 08047E42 */ j .L8011F908 /* B5FD8 8011F8D8 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F8DC /* B5FDC 8011F8DC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B5FE0 8011F8E0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B5FE4 8011F8E4 8C620000 */ lw $v0, 0x0($v1) /* B5FE8 8011F8E8 0040202D */ daddu $a0, $v0, $zero /* B5FEC 8011F8EC 24420008 */ addiu $v0, $v0, 0x8 /* B5FF0 8011F8F0 AC620000 */ sw $v0, 0x0($v1) /* B5FF4 8011F8F4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B5FF8 8011F8F8 AC820000 */ sw $v0, 0x0($a0) /* B5FFC 8011F8FC 3C028015 */ lui $v0, %hi(D_8014BF68) /* B6000 8011F900 2442BF68 */ addiu $v0, $v0, %lo(D_8014BF68) /* B6004 8011F904 AC820004 */ sw $v0, 0x4($a0) glabel .L8011F908 /* B6008 8011F908 3C070001 */ lui $a3, (0x1F400 >> 16) /* B600C 8011F90C 3C028015 */ lui $v0, %hi(gAnimModelFogEnd) /* B6010 8011F910 8C423A5C */ lw $v0, %lo(gAnimModelFogEnd)($v0) /* B6014 8011F914 3C038015 */ lui $v1, %hi(gAnimModelFogStart) /* B6018 8011F918 8C633A58 */ lw $v1, %lo(gAnimModelFogStart)($v1) /* B601C 8011F91C 34E7F400 */ ori $a3, $a3, (0x1F400 & 0xFFFF) /* B6020 8011F920 00431023 */ subu $v0, $v0, $v1 /* B6024 8011F924 14400002 */ bnez $v0, .L8011F930 /* B6028 8011F928 00E2001A */ div $zero, $a3, $v0 /* B602C 8011F92C 0007000D */ break 7 .L8011F930: /* B6030 8011F930 2401FFFF */ addiu $at, $zero, -0x1 /* B6034 8011F934 14410004 */ bne $v0, $at, .L8011F948 /* B6038 8011F938 3C018000 */ lui $at, (0x80000000 >> 16) /* B603C 8011F93C 14E10002 */ bne $a3, $at, .L8011F948 /* B6040 8011F940 00000000 */ nop /* B6044 8011F944 0006000D */ break 6 .L8011F948: /* B6048 8011F948 00003812 */ mflo $a3 /* B604C 8011F94C 240501F4 */ addiu $a1, $zero, 0x1F4 /* B6050 8011F950 00A32823 */ subu $a1, $a1, $v1 /* B6054 8011F954 00052A00 */ sll $a1, $a1, 8 /* B6058 8011F958 14400002 */ bnez $v0, .L8011F964 /* B605C 8011F95C 00A2001A */ div $zero, $a1, $v0 /* B6060 8011F960 0007000D */ break 7 .L8011F964: /* B6064 8011F964 2401FFFF */ addiu $at, $zero, -0x1 /* B6068 8011F968 14410004 */ bne $v0, $at, .L8011F97C /* B606C 8011F96C 3C018000 */ lui $at, (0x80000000 >> 16) /* B6070 8011F970 14A10002 */ bne $a1, $at, .L8011F97C /* B6074 8011F974 00000000 */ nop /* B6078 8011F978 0006000D */ break 6 .L8011F97C: /* B607C 8011F97C 00002812 */ mflo $a1 /* B6080 8011F980 3C08800A */ lui $t0, %hi(gMainGfxPos) /* B6084 8011F984 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* B6088 8011F988 8D060000 */ lw $a2, 0x0($t0) /* B608C 8011F98C 00C0482D */ daddu $t1, $a2, $zero /* B6090 8011F990 24C60008 */ addiu $a2, $a2, 0x8 /* B6094 8011F994 3C02F800 */ lui $v0, (0xF8000000 >> 16) /* B6098 8011F998 AD060000 */ sw $a2, 0x0($t0) /* B609C 8011F99C AD220000 */ sw $v0, 0x0($t1) /* B60A0 8011F9A0 3C028015 */ lui $v0, %hi(D_80153A4B) /* B60A4 8011F9A4 90423A4B */ lbu $v0, %lo(D_80153A4B)($v0) /* B60A8 8011F9A8 3C038015 */ lui $v1, %hi(D_80153A4F) /* B60AC 8011F9AC 90633A4F */ lbu $v1, %lo(D_80153A4F)($v1) /* B60B0 8011F9B0 3C048015 */ lui $a0, %hi(D_80153A53) /* B60B4 8011F9B4 90843A53 */ lbu $a0, %lo(D_80153A53)($a0) /* B60B8 8011F9B8 00021600 */ sll $v0, $v0, 24 /* B60BC 8011F9BC 00031C00 */ sll $v1, $v1, 16 /* B60C0 8011F9C0 00431025 */ or $v0, $v0, $v1 /* B60C4 8011F9C4 00042200 */ sll $a0, $a0, 8 /* B60C8 8011F9C8 3C038015 */ lui $v1, %hi(D_80153A57) /* B60CC 8011F9CC 90633A57 */ lbu $v1, %lo(D_80153A57)($v1) /* B60D0 8011F9D0 00441025 */ or $v0, $v0, $a0 /* B60D4 8011F9D4 00431025 */ or $v0, $v0, $v1 /* B60D8 8011F9D8 AD220004 */ sw $v0, 0x4($t1) /* B60DC 8011F9DC 24C20008 */ addiu $v0, $a2, 0x8 /* B60E0 8011F9E0 AD020000 */ sw $v0, 0x0($t0) /* B60E4 8011F9E4 3C02DB08 */ lui $v0, (0xDB080000 >> 16) /* B60E8 8011F9E8 ACC20000 */ sw $v0, 0x0($a2) /* B60EC 8011F9EC 00073C00 */ sll $a3, $a3, 16 /* B60F0 8011F9F0 30A5FFFF */ andi $a1, $a1, 0xFFFF /* B60F4 8011F9F4 00E53825 */ or $a3, $a3, $a1 /* B60F8 8011F9F8 ACC70004 */ sw $a3, 0x4($a2) glabel .L8011F9FC /* B60FC 8011F9FC 27A40010 */ addiu $a0, $sp, 0x10 .L8011FA00: /* B6100 8011FA00 0C019D60 */ jal guMtxL2F /* B6104 8011FA04 26050098 */ addiu $a1, $s0, 0x98 /* B6108 8011FA08 0200202D */ daddu $a0, $s0, $zero /* B610C 8011FA0C 8C850010 */ lw $a1, 0x10($a0) /* B6110 8011FA10 0C047E95 */ jal appendGfx_animator_node /* B6114 8011FA14 27A60010 */ addiu $a2, $sp, 0x10 /* B6118 8011FA18 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* B611C 8011FA1C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B6120 8011FA20 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B6124 8011FA24 8C620000 */ lw $v0, 0x0($v1) /* B6128 8011FA28 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* B612C 8011FA2C 0040202D */ daddu $a0, $v0, $zero /* B6130 8011FA30 24420008 */ addiu $v0, $v0, 0x8 /* B6134 8011FA34 AC620000 */ sw $v0, 0x0($v1) /* B6138 8011FA38 24020040 */ addiu $v0, $zero, 0x40 /* B613C 8011FA3C AC850000 */ sw $a1, 0x0($a0) /* B6140 8011FA40 AC820004 */ sw $v0, 0x4($a0) /* B6144 8011FA44 8FBF0054 */ lw $ra, 0x54($sp) /* B6148 8011FA48 8FB00050 */ lw $s0, 0x50($sp) /* B614C 8011FA4C 03E00008 */ jr $ra /* B6150 8011FA50 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void appendGfx_animator(ModelAnimator* animator) { Matrix4f sp10; if (animator->baseAddr != NULL) { gSPSegment(gMainGfxPos++, gAnimVtxSegment, VIRTUAL_TO_PHYSICAL(animator->baseAddr)); } gDisplayContext->matrixStack[gMatrixListPos] = animator->mtx; gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); //TODO find better match switch (gAnimModelFogEnabled != 0) { case FALSE: switch (animator->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: gSPDisplayList(gMainGfxPos++, D_8014B898); break; case RENDER_MODE_DECAL_XLU: gSPDisplayList(gMainGfxPos++, D_8014B8C0); break; case RENDER_MODE_INTERSECTING_XLU: gSPDisplayList(gMainGfxPos++, D_8014B8E8); break; } break; case TRUE: switch (animator->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++, gAnimModelFogR, gAnimModelFogG, gAnimModelFogB, gAnimModelFogA); gSPFogPosition(gMainGfxPos++, gAnimModelFogStart, gAnimModelFogEnd); break; } guMtxL2F(sp10, &animator->mtx); appendGfx_animator_node(animator, animator->rootNode, sp10); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_camera_mode_1 /* A690 8002F290 27BDFF90 */ addiu $sp, $sp, -0x70 /* A694 8002F294 AFB10034 */ sw $s1, 0x34($sp) /* A698 8002F298 0080882D */ daddu $s1, $a0, $zero /* A69C 8002F29C AFBF0038 */ sw $ra, 0x38($sp) /* A6A0 8002F2A0 AFB00030 */ sw $s0, 0x30($sp) /* A6A4 8002F2A4 F7BE0068 */ sdc1 $f30, 0x68($sp) /* A6A8 8002F2A8 F7BC0060 */ sdc1 $f28, 0x60($sp) /* A6AC 8002F2AC F7BA0058 */ sdc1 $f26, 0x58($sp) /* A6B0 8002F2B0 F7B80050 */ sdc1 $f24, 0x50($sp) /* A6B4 8002F2B4 F7B60048 */ sdc1 $f22, 0x48($sp) /* A6B8 8002F2B8 F7B40040 */ sdc1 $f20, 0x40($sp) /* A6BC 8002F2BC 86220006 */ lh $v0, 0x6($s1) /* A6C0 8002F2C0 10400089 */ beqz $v0, .L8002F4E8 /* A6C4 8002F2C4 00000000 */ nop /* A6C8 8002F2C8 C63E0054 */ lwc1 $f30, 0x54($s1) /* A6CC 8002F2CC C63C005C */ lwc1 $f28, 0x5C($s1) /* A6D0 8002F2D0 C6380060 */ lwc1 $f24, 0x60($s1) /* A6D4 8002F2D4 C6360068 */ lwc1 $f22, 0x68($s1) /* A6D8 8002F2D8 8622001C */ lh $v0, 0x1C($s1) /* A6DC 8002F2DC 86230020 */ lh $v1, 0x20($s1) /* A6E0 8002F2E0 3C10800A */ lui $s0, %hi(D_8009A5EC) /* A6E4 8002F2E4 2610A5EC */ addiu $s0, $s0, %lo(D_8009A5EC) /* A6E8 8002F2E8 A6200006 */ sh $zero, 0x6($s1) /* A6EC 8002F2EC 4600F306 */ mov.s $f12, $f30 /* A6F0 8002F2F0 4600E386 */ mov.s $f14, $f28 /* A6F4 8002F2F4 44820000 */ mtc1 $v0, $f0 /* A6F8 8002F2F8 00000000 */ nop /* A6FC 8002F2FC 46800020 */ cvt.s.w $f0, $f0 /* A700 8002F300 00031040 */ sll $v0, $v1, 1 /* A704 8002F304 00431021 */ addu $v0, $v0, $v1 /* A708 8002F308 000210C0 */ sll $v0, $v0, 3 /* A70C 8002F30C 00431021 */ addu $v0, $v0, $v1 /* A710 8002F310 00021080 */ sll $v0, $v0, 2 /* A714 8002F314 E6200074 */ swc1 $f0, 0x74($s1) /* A718 8002F318 44820000 */ mtc1 $v0, $f0 /* A71C 8002F31C 00000000 */ nop /* A720 8002F320 46800020 */ cvt.s.w $f0, $f0 /* A724 8002F324 4406C000 */ mfc1 $a2, $f24 /* A728 8002F328 4407B000 */ mfc1 $a3, $f22 /* A72C 8002F32C C6020000 */ lwc1 $f2, 0x0($s0) /* A730 8002F330 86230022 */ lh $v1, 0x22($s1) /* A734 8002F334 46020003 */ div.s $f0, $f0, $f2 /* A738 8002F338 00031080 */ sll $v0, $v1, 2 /* A73C 8002F33C 00431021 */ addu $v0, $v0, $v1 /* A740 8002F340 00021080 */ sll $v0, $v0, 2 /* A744 8002F344 E6200078 */ swc1 $f0, 0x78($s1) /* A748 8002F348 44820000 */ mtc1 $v0, $f0 /* A74C 8002F34C 00000000 */ nop /* A750 8002F350 46800020 */ cvt.s.w $f0, $f0 /* A754 8002F354 46020003 */ div.s $f0, $f0, $f2 /* A758 8002F358 0C00A720 */ jal atan2 /* A75C 8002F35C E620007C */ swc1 $f0, 0x7C($s1) /* A760 8002F360 46000506 */ mov.s $f20, $f0 /* A764 8002F364 4600F306 */ mov.s $f12, $f30 /* A768 8002F368 4406C000 */ mfc1 $a2, $f24 /* A76C 8002F36C 4407B000 */ mfc1 $a3, $f22 /* A770 8002F370 0C00A7B5 */ jal dist2D /* A774 8002F374 4600E386 */ mov.s $f14, $f28 /* A778 8002F378 8623001E */ lh $v1, 0x1E($s1) /* A77C 8002F37C C6040000 */ lwc1 $f4, 0x0($s0) /* A780 8002F380 00031040 */ sll $v0, $v1, 1 /* A784 8002F384 00431021 */ addu $v0, $v0, $v1 /* A788 8002F388 000210C0 */ sll $v0, $v0, 3 /* A78C 8002F38C 00431021 */ addu $v0, $v0, $v1 /* A790 8002F390 00021080 */ sll $v0, $v0, 2 /* A794 8002F394 44821000 */ mtc1 $v0, $f2 /* A798 8002F398 00000000 */ nop /* A79C 8002F39C 468010A0 */ cvt.s.w $f2, $f2 /* A7A0 8002F3A0 46041083 */ div.s $f2, $f2, $f4 /* A7A4 8002F3A4 4602003C */ c.lt.s $f0, $f2 /* A7A8 8002F3A8 00000000 */ nop /* A7AC 8002F3AC 45020004 */ bc1fl .L8002F3C0 /* A7B0 8002F3B0 E6340084 */ swc1 $f20, 0x84($s1) /* A7B4 8002F3B4 C6340084 */ lwc1 $f20, 0x84($s1) /* A7B8 8002F3B8 0800BCF1 */ j .L8002F3C4 /* A7BC 8002F3BC AFA00010 */ sw $zero, 0x10($sp) .L8002F3C0: /* A7C0 8002F3C0 AFA00010 */ sw $zero, 0x10($sp) .L8002F3C4: /* A7C4 8002F3C4 C6220074 */ lwc1 $f2, 0x74($s1) /* A7C8 8002F3C8 C6280054 */ lwc1 $f8, 0x54($s1) /* A7CC 8002F3CC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* A7D0 8002F3D0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* A7D4 8002F3D4 44815000 */ mtc1 $at, $f10 /* A7D8 8002F3D8 C6200058 */ lwc1 $f0, 0x58($s1) /* A7DC 8002F3DC C624007C */ lwc1 $f4, 0x7C($s1) /* A7E0 8002F3E0 460A1082 */ mul.s $f2, $f2, $f10 /* A7E4 8002F3E4 00000000 */ nop /* A7E8 8002F3E8 C626005C */ lwc1 $f6, 0x5C($s1) /* A7EC 8002F3EC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* A7F0 8002F3F0 4481B000 */ mtc1 $at, $f22 /* A7F4 8002F3F4 E6340088 */ swc1 $f20, 0x88($s1) /* A7F8 8002F3F8 46040000 */ add.s $f0, $f0, $f4 /* A7FC 8002F3FC E6280048 */ swc1 $f8, 0x48($s1) /* A800 8002F400 E6260050 */ swc1 $f6, 0x50($s1) /* A804 8002F404 E620004C */ swc1 $f0, 0x4C($s1) /* A808 8002F408 46161603 */ div.s $f24, $f2, $f22 /* A80C 8002F40C 0C00A85B */ jal sin_rad /* A810 8002F410 4600C306 */ mov.s $f12, $f24 /* A814 8002F414 46000686 */ mov.s $f26, $f0 /* A818 8002F418 0C00A874 */ jal cos_rad /* A81C 8002F41C 4600C306 */ mov.s $f12, $f24 /* A820 8002F420 C7B00010 */ lwc1 $f16, 0x10($sp) /* A824 8002F424 46000206 */ mov.s $f8, $f0 /* A828 8002F428 46104182 */ mul.s $f6, $f8, $f16 /* A82C 8002F42C 00000000 */ nop /* A830 8002F430 C63C0078 */ lwc1 $f28, 0x78($s1) /* A834 8002F434 461AE082 */ mul.s $f2, $f28, $f26 /* A838 8002F438 00000000 */ nop /* A83C 8002F43C 46008007 */ neg.s $f0, $f16 /* A840 8002F440 4600D002 */ mul.s $f0, $f26, $f0 /* A844 8002F444 00000000 */ nop /* A848 8002F448 4608E102 */ mul.s $f4, $f28, $f8 /* A84C 8002F44C 00000000 */ nop /* A850 8002F450 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* A854 8002F454 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* A858 8002F458 44815000 */ mtc1 $at, $f10 /* A85C 8002F45C 00000000 */ nop /* A860 8002F460 460AA282 */ mul.s $f10, $f20, $f10 /* A864 8002F464 00000000 */ nop /* A868 8002F468 46008606 */ mov.s $f24, $f16 /* A86C 8002F46C 4600C786 */ mov.s $f30, $f24 /* A870 8002F470 46023180 */ add.s $f6, $f6, $f2 /* A874 8002F474 46165603 */ div.s $f24, $f10, $f22 /* A878 8002F478 4600C306 */ mov.s $f12, $f24 /* A87C 8002F47C 46040700 */ add.s $f28, $f0, $f4 /* A880 8002F480 0C00A85B */ jal sin_rad /* A884 8002F484 E7A60010 */ swc1 $f6, 0x10($sp) /* A888 8002F488 46000686 */ mov.s $f26, $f0 /* A88C 8002F48C 0C00A874 */ jal cos_rad /* A890 8002F490 4600C306 */ mov.s $f12, $f24 /* A894 8002F494 46000206 */ mov.s $f8, $f0 /* A898 8002F498 461E4182 */ mul.s $f6, $f8, $f30 /* A89C 8002F49C 00000000 */ nop /* A8A0 8002F4A0 461AE082 */ mul.s $f2, $f28, $f26 /* A8A4 8002F4A4 00000000 */ nop /* A8A8 8002F4A8 461ED102 */ mul.s $f4, $f26, $f30 /* A8AC 8002F4AC 00000000 */ nop /* A8B0 8002F4B0 4608E002 */ mul.s $f0, $f28, $f8 /* A8B4 8002F4B4 00000000 */ nop /* A8B8 8002F4B8 46023601 */ sub.s $f24, $f6, $f2 /* A8BC 8002F4BC C7B00010 */ lwc1 $f16, 0x10($sp) /* A8C0 8002F4C0 46002580 */ add.s $f22, $f4, $f0 /* A8C4 8002F4C4 C620004C */ lwc1 $f0, 0x4C($s1) /* A8C8 8002F4C8 46100000 */ add.s $f0, $f0, $f16 /* A8CC 8002F4CC C6240048 */ lwc1 $f4, 0x48($s1) /* A8D0 8002F4D0 46182100 */ add.s $f4, $f4, $f24 /* A8D4 8002F4D4 C6220050 */ lwc1 $f2, 0x50($s1) /* A8D8 8002F4D8 46161080 */ add.s $f2, $f2, $f22 /* A8DC 8002F4DC E6200040 */ swc1 $f0, 0x40($s1) /* A8E0 8002F4E0 E624003C */ swc1 $f4, 0x3C($s1) /* A8E4 8002F4E4 E6220044 */ swc1 $f2, 0x44($s1) .L8002F4E8: /* A8E8 8002F4E8 C62A0054 */ lwc1 $f10, 0x54($s1) /* A8EC 8002F4EC 3C10800A */ lui $s0, %hi(D_8009A5EC) /* A8F0 8002F4F0 2610A5EC */ addiu $s0, $s0, %lo(D_8009A5EC) /* A8F4 8002F4F4 E7AA0028 */ swc1 $f10, 0x28($sp) /* A8F8 8002F4F8 C632005C */ lwc1 $f18, 0x5C($s1) /* A8FC 8002F4FC C63E0054 */ lwc1 $f30, 0x54($s1) /* A900 8002F500 C6380060 */ lwc1 $f24, 0x60($s1) /* A904 8002F504 C6360068 */ lwc1 $f22, 0x68($s1) /* A908 8002F508 86230022 */ lh $v1, 0x22($s1) /* A90C 8002F50C C6260058 */ lwc1 $f6, 0x58($s1) /* A910 8002F510 C60A0000 */ lwc1 $f10, 0x0($s0) /* A914 8002F514 C6280048 */ lwc1 $f8, 0x48($s1) /* A918 8002F518 46009706 */ mov.s $f28, $f18 /* A91C 8002F51C 00031080 */ sll $v0, $v1, 2 /* A920 8002F520 00431021 */ addu $v0, $v0, $v1 /* A924 8002F524 00021080 */ sll $v0, $v0, 2 /* A928 8002F528 44828000 */ mtc1 $v0, $f16 /* A92C 8002F52C 00000000 */ nop /* A930 8002F530 46808420 */ cvt.s.w $f16, $f16 /* A934 8002F534 460A8283 */ div.s $f10, $f16, $f10 /* A938 8002F538 4600F306 */ mov.s $f12, $f30 /* A93C 8002F53C E62A007C */ swc1 $f10, 0x7C($s1) /* A940 8002F540 C7B00028 */ lwc1 $f16, 0x28($sp) /* A944 8002F544 4600E386 */ mov.s $f14, $f28 /* A948 8002F548 46088401 */ sub.s $f16, $f16, $f8 /* A94C 8002F54C 4406C000 */ mfc1 $a2, $f24 /* A950 8002F550 4407B000 */ mfc1 $a3, $f22 /* A954 8002F554 460A3180 */ add.s $f6, $f6, $f10 /* A958 8002F558 E7B00028 */ swc1 $f16, 0x28($sp) /* A95C 8002F55C C6200050 */ lwc1 $f0, 0x50($s1) /* A960 8002F560 8622001C */ lh $v0, 0x1C($s1) /* A964 8002F564 46009481 */ sub.s $f18, $f18, $f0 /* A968 8002F568 44820000 */ mtc1 $v0, $f0 /* A96C 8002F56C 00000000 */ nop /* A970 8002F570 46800020 */ cvt.s.w $f0, $f0 /* A974 8002F574 E6200074 */ swc1 $f0, 0x74($s1) /* A978 8002F578 3C013F00 */ lui $at, (0x3F000000 >> 16) /* A97C 8002F57C 44810000 */ mtc1 $at, $f0 /* A980 8002F580 86230020 */ lh $v1, 0x20($s1) /* A984 8002F584 46008282 */ mul.s $f10, $f16, $f0 /* A988 8002F588 00000000 */ nop /* A98C 8002F58C C622004C */ lwc1 $f2, 0x4C($s1) /* A990 8002F590 00031040 */ sll $v0, $v1, 1 /* A994 8002F594 00431021 */ addu $v0, $v0, $v1 /* A998 8002F598 000210C0 */ sll $v0, $v0, 3 /* A99C 8002F59C 46023181 */ sub.s $f6, $f6, $f2 /* A9A0 8002F5A0 00431021 */ addu $v0, $v0, $v1 /* A9A4 8002F5A4 00021080 */ sll $v0, $v0, 2 /* A9A8 8002F5A8 46009482 */ mul.s $f18, $f18, $f0 /* A9AC 8002F5AC 00000000 */ nop /* A9B0 8002F5B0 3C014120 */ lui $at, (0x41200000 >> 16) /* A9B4 8002F5B4 44810000 */ mtc1 $at, $f0 /* A9B8 8002F5B8 44822000 */ mtc1 $v0, $f4 /* A9BC 8002F5BC 00000000 */ nop /* A9C0 8002F5C0 46802120 */ cvt.s.w $f4, $f4 /* A9C4 8002F5C4 46003183 */ div.s $f6, $f6, $f0 /* A9C8 8002F5C8 46001006 */ mov.s $f0, $f2 /* A9CC 8002F5CC 46060000 */ add.s $f0, $f0, $f6 /* A9D0 8002F5D0 C6100000 */ lwc1 $f16, 0x0($s0) /* A9D4 8002F5D4 C6220050 */ lwc1 $f2, 0x50($s1) /* A9D8 8002F5D8 460A4200 */ add.s $f8, $f8, $f10 /* A9DC 8002F5DC 46102103 */ div.s $f4, $f4, $f16 /* A9E0 8002F5E0 E6240078 */ swc1 $f4, 0x78($s1) /* A9E4 8002F5E4 46121080 */ add.s $f2, $f2, $f18 /* A9E8 8002F5E8 E620004C */ swc1 $f0, 0x4C($s1) /* A9EC 8002F5EC E6280048 */ swc1 $f8, 0x48($s1) /* A9F0 8002F5F0 0C00A720 */ jal atan2 /* A9F4 8002F5F4 E6220050 */ swc1 $f2, 0x50($s1) /* A9F8 8002F5F8 46000506 */ mov.s $f20, $f0 /* A9FC 8002F5FC 4600F306 */ mov.s $f12, $f30 /* AA00 8002F600 4406C000 */ mfc1 $a2, $f24 /* AA04 8002F604 4407B000 */ mfc1 $a3, $f22 /* AA08 8002F608 0C00A7B5 */ jal dist2D /* AA0C 8002F60C 4600E386 */ mov.s $f14, $f28 /* AA10 8002F610 8623001E */ lh $v1, 0x1E($s1) /* AA14 8002F614 C6040000 */ lwc1 $f4, 0x0($s0) /* AA18 8002F618 00031040 */ sll $v0, $v1, 1 /* AA1C 8002F61C 00431021 */ addu $v0, $v0, $v1 /* AA20 8002F620 000210C0 */ sll $v0, $v0, 3 /* AA24 8002F624 00431021 */ addu $v0, $v0, $v1 /* AA28 8002F628 00021080 */ sll $v0, $v0, 2 /* AA2C 8002F62C 44821000 */ mtc1 $v0, $f2 /* AA30 8002F630 00000000 */ nop /* AA34 8002F634 468010A0 */ cvt.s.w $f2, $f2 /* AA38 8002F638 46041083 */ div.s $f2, $f2, $f4 /* AA3C 8002F63C 4602003C */ c.lt.s $f0, $f2 /* AA40 8002F640 00000000 */ nop /* AA44 8002F644 45020002 */ bc1fl .L8002F650 /* AA48 8002F648 E6340084 */ swc1 $f20, 0x84($s1) /* AA4C 8002F64C C6340084 */ lwc1 $f20, 0x84($s1) .L8002F650: /* AA50 8002F650 C62E0088 */ lwc1 $f14, 0x88($s1) /* AA54 8002F654 0C00A70A */ jal get_clamped_angle_diff /* AA58 8002F658 4600A306 */ mov.s $f12, $f20 /* AA5C 8002F65C C6240074 */ lwc1 $f4, 0x74($s1) /* AA60 8002F660 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* AA64 8002F664 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* AA68 8002F668 44815000 */ mtc1 $at, $f10 /* AA6C 8002F66C 3C014120 */ lui $at, (0x41200000 >> 16) /* AA70 8002F670 44811000 */ mtc1 $at, $f2 /* AA74 8002F674 460A2102 */ mul.s $f4, $f4, $f10 /* AA78 8002F678 00000000 */ nop /* AA7C 8002F67C 46020003 */ div.s $f0, $f0, $f2 /* AA80 8002F680 C6220088 */ lwc1 $f2, 0x88($s1) /* AA84 8002F684 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* AA88 8002F688 4481B000 */ mtc1 $at, $f22 /* AA8C 8002F68C 46001081 */ sub.s $f2, $f2, $f0 /* AA90 8002F690 AFA00010 */ sw $zero, 0x10($sp) /* AA94 8002F694 46001506 */ mov.s $f20, $f2 /* AA98 8002F698 E6340088 */ swc1 $f20, 0x88($s1) /* AA9C 8002F69C 46162603 */ div.s $f24, $f4, $f22 /* AAA0 8002F6A0 0C00A85B */ jal sin_rad /* AAA4 8002F6A4 4600C306 */ mov.s $f12, $f24 /* AAA8 8002F6A8 46000686 */ mov.s $f26, $f0 /* AAAC 8002F6AC 0C00A874 */ jal cos_rad /* AAB0 8002F6B0 4600C306 */ mov.s $f12, $f24 /* AAB4 8002F6B4 C7B00010 */ lwc1 $f16, 0x10($sp) /* AAB8 8002F6B8 46000206 */ mov.s $f8, $f0 /* AABC 8002F6BC 46104182 */ mul.s $f6, $f8, $f16 /* AAC0 8002F6C0 00000000 */ nop /* AAC4 8002F6C4 C63C0078 */ lwc1 $f28, 0x78($s1) /* AAC8 8002F6C8 461AE082 */ mul.s $f2, $f28, $f26 /* AACC 8002F6CC 00000000 */ nop /* AAD0 8002F6D0 46008007 */ neg.s $f0, $f16 /* AAD4 8002F6D4 4600D002 */ mul.s $f0, $f26, $f0 /* AAD8 8002F6D8 00000000 */ nop /* AADC 8002F6DC 4608E102 */ mul.s $f4, $f28, $f8 /* AAE0 8002F6E0 00000000 */ nop /* AAE4 8002F6E4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* AAE8 8002F6E8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* AAEC 8002F6EC 44815000 */ mtc1 $at, $f10 /* AAF0 8002F6F0 00000000 */ nop /* AAF4 8002F6F4 460AA282 */ mul.s $f10, $f20, $f10 /* AAF8 8002F6F8 00000000 */ nop /* AAFC 8002F6FC 46008606 */ mov.s $f24, $f16 /* AB00 8002F700 4600C786 */ mov.s $f30, $f24 /* AB04 8002F704 46023180 */ add.s $f6, $f6, $f2 /* AB08 8002F708 46165603 */ div.s $f24, $f10, $f22 /* AB0C 8002F70C 4600C306 */ mov.s $f12, $f24 /* AB10 8002F710 46040700 */ add.s $f28, $f0, $f4 /* AB14 8002F714 0C00A85B */ jal sin_rad /* AB18 8002F718 E7A60010 */ swc1 $f6, 0x10($sp) /* AB1C 8002F71C 46000686 */ mov.s $f26, $f0 /* AB20 8002F720 0C00A874 */ jal cos_rad /* AB24 8002F724 4600C306 */ mov.s $f12, $f24 /* AB28 8002F728 46000206 */ mov.s $f8, $f0 /* AB2C 8002F72C 461E4102 */ mul.s $f4, $f8, $f30 /* AB30 8002F730 00000000 */ nop /* AB34 8002F734 461AE002 */ mul.s $f0, $f28, $f26 /* AB38 8002F738 00000000 */ nop /* AB3C 8002F73C 461ED182 */ mul.s $f6, $f26, $f30 /* AB40 8002F740 00000000 */ nop /* AB44 8002F744 4608E082 */ mul.s $f2, $f28, $f8 /* AB48 8002F748 00000000 */ nop /* AB4C 8002F74C 46002601 */ sub.s $f24, $f4, $f0 /* AB50 8002F750 C7B00010 */ lwc1 $f16, 0x10($sp) /* AB54 8002F754 46023580 */ add.s $f22, $f6, $f2 /* AB58 8002F758 C622004C */ lwc1 $f2, 0x4C($s1) /* AB5C 8002F75C 46101080 */ add.s $f2, $f2, $f16 /* AB60 8002F760 C6200048 */ lwc1 $f0, 0x48($s1) /* AB64 8002F764 8E260048 */ lw $a2, 0x48($s1) /* AB68 8002F768 46180000 */ add.s $f0, $f0, $f24 /* AB6C 8002F76C C62E0050 */ lwc1 $f14, 0x50($s1) /* AB70 8002F770 8E270050 */ lw $a3, 0x50($s1) /* AB74 8002F774 46167380 */ add.s $f14, $f14, $f22 /* AB78 8002F778 E6220040 */ swc1 $f2, 0x40($s1) /* AB7C 8002F77C E620003C */ swc1 $f0, 0x3C($s1) /* AB80 8002F780 46000306 */ mov.s $f12, $f0 /* AB84 8002F784 0C00A720 */ jal atan2 /* AB88 8002F788 E62E0044 */ swc1 $f14, 0x44($s1) /* AB8C 8002F78C C6240048 */ lwc1 $f4, 0x48($s1) /* AB90 8002F790 C622003C */ lwc1 $f2, 0x3C($s1) /* AB94 8002F794 4480A000 */ mtc1 $zero, $f20 /* AB98 8002F798 46022781 */ sub.s $f30, $f4, $f2 /* AB9C 8002F79C C6240050 */ lwc1 $f4, 0x50($s1) /* ABA0 8002F7A0 C6220044 */ lwc1 $f2, 0x44($s1) /* ABA4 8002F7A4 4600A306 */ mov.s $f12, $f20 /* ABA8 8002F7A8 46022701 */ sub.s $f28, $f4, $f2 /* ABAC 8002F7AC C624004C */ lwc1 $f4, 0x4C($s1) /* ABB0 8002F7B0 C6220040 */ lwc1 $f2, 0x40($s1) /* ABB4 8002F7B4 4406F000 */ mfc1 $a2, $f30 /* ABB8 8002F7B8 46022101 */ sub.s $f4, $f4, $f2 /* ABBC 8002F7BC 4407E000 */ mfc1 $a3, $f28 /* ABC0 8002F7C0 4600A386 */ mov.s $f14, $f20 /* ABC4 8002F7C4 E7A40010 */ swc1 $f4, 0x10($sp) /* ABC8 8002F7C8 0C00A720 */ jal atan2 /* ABCC 8002F7CC E620006C */ swc1 $f0, 0x6C($s1) /* ABD0 8002F7D0 461EF102 */ mul.s $f4, $f30, $f30 /* ABD4 8002F7D4 00000000 */ nop /* ABD8 8002F7D8 461CE082 */ mul.s $f2, $f28, $f28 /* ABDC 8002F7DC 00000000 */ nop /* ABE0 8002F7E0 46022300 */ add.s $f12, $f4, $f2 /* ABE4 8002F7E4 46000007 */ neg.s $f0, $f0 /* ABE8 8002F7E8 E6200090 */ swc1 $f0, 0x90($s1) /* ABEC 8002F7EC 46006004 */ sqrt.s $f0, $f12 /* ABF0 8002F7F0 46000032 */ c.eq.s $f0, $f0 /* ABF4 8002F7F4 00000000 */ nop /* ABF8 8002F7F8 45030004 */ bc1tl .L8002F80C /* ABFC 8002F7FC 4600A306 */ mov.s $f12, $f20 /* AC00 8002F800 0C0187BC */ jal sqrtf /* AC04 8002F804 00000000 */ nop /* AC08 8002F808 4600A306 */ mov.s $f12, $f20 .L8002F80C: /* AC0C 8002F80C 46000007 */ neg.s $f0, $f0 /* AC10 8002F810 8FA60010 */ lw $a2, 0x10($sp) /* AC14 8002F814 44070000 */ mfc1 $a3, $f0 /* AC18 8002F818 0C00A720 */ jal atan2 /* AC1C 8002F81C 46006386 */ mov.s $f14, $f12 /* AC20 8002F820 E6200094 */ swc1 $f0, 0x94($s1) /* AC24 8002F824 8FBF0038 */ lw $ra, 0x38($sp) /* AC28 8002F828 8FB10034 */ lw $s1, 0x34($sp) /* AC2C 8002F82C 8FB00030 */ lw $s0, 0x30($sp) /* AC30 8002F830 D7BE0068 */ ldc1 $f30, 0x68($sp) /* AC34 8002F834 D7BC0060 */ ldc1 $f28, 0x60($sp) /* AC38 8002F838 D7BA0058 */ ldc1 $f26, 0x58($sp) /* AC3C 8002F83C D7B80050 */ ldc1 $f24, 0x50($sp) /* AC40 8002F840 D7B60048 */ ldc1 $f22, 0x48($sp) /* AC44 8002F844 D7B40040 */ ldc1 $f20, 0x40($sp) /* AC48 8002F848 03E00008 */ jr $ra /* AC4C 8002F84C 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: void update_camera_mode_1(Camera* camera) { f32 sinBoom, cosBoom; f32 f20; f32 boomYaw; f32 deltaX, deltaY, deltaZ; f32 deltaX2, deltaY2, deltaZ2; f32 x3, y3, z3; f32 x2, y2, z2; f32 new_var2; f32 tmp1; if (camera->needsInit) { camera->needsInit = FALSE; deltaX = camera->lookAt_obj_target.x; deltaZ2 = camera->lookAt_obj_target.z; deltaX2 = camera->targetPos.x; deltaZ = camera->targetPos.z; camera->currentBoomYaw = camera->auxPitch; camera->currentBoomLength = camera->lookAt_dist * 100 / D_8009A5EC; camera->currentYOffset = camera->auxBoomPitch * 20 / D_8009A5EC; f20 = atan2(deltaX, deltaZ2, deltaX2, deltaZ); if ((dist2D(deltaX, deltaZ2, deltaX2, deltaZ) < camera->auxBoomLength * 100 / D_8009A5EC)) { f20 = camera->trueRotation.x; camera->trueRotation.x = f20; } else { camera->trueRotation.x = f20; } camera->trueRotation.y = f20; camera->lookAt_obj.x = camera->lookAt_obj_target.x; camera->lookAt_obj.y = camera->lookAt_obj_target.y + camera->currentYOffset; camera->lookAt_obj.z = camera->lookAt_obj_target.z; boomYaw = DEG_TO_RAD(camera->currentBoomYaw); sinBoom = sin_rad(boomYaw); deltaX = 0.0f; deltaY = 0.0f; new_var2 = -deltaY; cosBoom = cos_rad(boomYaw); boomYaw = new_var2; deltaZ = camera->currentBoomLength; deltaX2 = deltaX; deltaY2 = new_var2; deltaZ2 = deltaZ; deltaX = deltaX2; deltaY = cosBoom * -deltaY2 + deltaZ2 * sinBoom; deltaZ = sinBoom * deltaY2 + deltaZ2 * cosBoom; boomYaw = DEG_TO_RAD(f20); deltaZ2 = deltaZ; sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX2 = cosBoom * deltaX - deltaZ * sinBoom; deltaY2 = deltaY; deltaZ = sinBoom * deltaX + deltaZ * cosBoom; camera->lookAt_eye.x = camera->lookAt_obj.x + deltaX2; camera->lookAt_eye.y = camera->lookAt_obj.y + deltaY2; camera->lookAt_eye.z = camera->lookAt_obj.z + deltaZ; } tmp1 = camera->lookAt_obj_target.y; x3 = camera->lookAt_obj_target.x; y3 = tmp1; z3 = camera->lookAt_obj_target.z; camera->currentBoomYaw = camera->auxPitch; camera->currentBoomLength = camera->lookAt_dist * 100 / D_8009A5EC; camera->currentYOffset = camera->auxBoomPitch * 20 / D_8009A5EC; y3 += camera->currentYOffset; x3 -= camera->lookAt_obj.x; y3 -= camera->lookAt_obj.y; z3 -= camera->lookAt_obj.z; deltaX = camera->lookAt_obj_target.x; deltaY = camera->lookAt_obj_target.y; deltaZ2 = camera->lookAt_obj_target.z; deltaX2 = camera->targetPos.x; deltaY2 = camera->targetPos.y; deltaZ = camera->targetPos.z; camera->lookAt_obj.x += x3 * 0.5f; camera->lookAt_obj.y += y3 / 10.0f; camera->lookAt_obj.z += z3 * 0.5f; f20 = atan2(deltaX, deltaZ2, deltaX2, deltaZ); if ((dist2D(deltaX, deltaZ2, deltaX2, deltaZ) < camera->auxBoomLength * 100 / D_8009A5EC)) { f20 = camera->trueRotation.x; } else { camera->trueRotation.x = f20; } camera->trueRotation.y -= get_clamped_angle_diff(f20, camera->trueRotation.y) / 10.0f; f20 = camera->trueRotation.y; boomYaw = DEG_TO_RAD(camera->currentBoomYaw); sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX = 0.0f; deltaY = 0.0f; deltaZ = camera->currentBoomLength; deltaX2 = deltaX; deltaY2 = -deltaY; deltaZ2 = deltaZ; deltaX = deltaX2; deltaY = -deltaY2; deltaY = (cosBoom * deltaY) + (deltaZ2 * sinBoom); deltaZ = sinBoom * deltaY2 + deltaZ2 * cosBoom; deltaY2 = deltaY; boomYaw = DEG_TO_RAD((f20)); deltaZ2 = deltaZ; sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX2 = cosBoom * deltaX - deltaZ * sinBoom; deltaZ = sinBoom * deltaX + deltaZ * cosBoom; camera->lookAt_eye.x = camera->lookAt_obj.x + deltaX2; camera->lookAt_eye.y = camera->lookAt_obj.y + deltaY2; camera->lookAt_eye.z = camera->lookAt_obj.z + deltaZ; camera->currentYaw = atan2(camera->lookAt_eye.x, camera->lookAt_eye.z, camera->lookAt_obj.x, camera->lookAt_obj.z); deltaX = camera->lookAt_obj.x - camera->lookAt_eye.x; deltaY = camera->lookAt_obj.y - camera->lookAt_eye.y; deltaZ2 = camera->lookAt_obj.z - camera->lookAt_eye.z; camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, deltaX, deltaZ2); camera->currentPitch = atan2(0.0f, 0.0f, deltaY, -sqrtf((deltaX * deltaX) + (deltaZ2 * deltaZ2))); }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_pull_fx /* 34710 80059310 27BDFF98 */ addiu $sp, $sp, -0x68 /* 34714 80059314 AFB00030 */ sw $s0, 0x30($sp) /* 34718 80059318 00A0802D */ daddu $s0, $a1, $zero /* 3471C 8005931C AFB10034 */ sw $s1, 0x34($sp) /* 34720 80059320 00C0882D */ daddu $s1, $a2, $zero /* 34724 80059324 AFB60048 */ sw $s6, 0x48($sp) /* 34728 80059328 24F60170 */ addiu $s6, $a3, 0x170 /* 3472C 8005932C 32220FFF */ andi $v0, $s1, 0xFFF /* 34730 80059330 3C030617 */ lui $v1, (0x6170000 >> 16) /* 34734 80059334 00431025 */ or $v0, $v0, $v1 /* 34738 80059338 AFBF0054 */ sw $ra, 0x54($sp) /* 3473C 8005933C AFBE0050 */ sw $fp, 0x50($sp) /* 34740 80059340 AFB7004C */ sw $s7, 0x4C($sp) /* 34744 80059344 AFB50044 */ sw $s5, 0x44($sp) /* 34748 80059348 AFB40040 */ sw $s4, 0x40($sp) /* 3474C 8005934C AFB3003C */ sw $s3, 0x3C($sp) /* 34750 80059350 AFB20038 */ sw $s2, 0x38($sp) /* 34754 80059354 F7B60060 */ sdc1 $f22, 0x60($sp) /* 34758 80059358 F7B40058 */ sdc1 $f20, 0x58($sp) /* 3475C 8005935C AFA40068 */ sw $a0, 0x68($sp) /* 34760 80059360 A7A70026 */ sh $a3, 0x26($sp) /* 34764 80059364 A7A0001E */ sh $zero, 0x1E($sp) /* 34768 80059368 AE020000 */ sw $v0, 0x0($s0) /* 3476C 8005936C 8FA80068 */ lw $t0, 0x68($sp) /* 34770 80059370 26120008 */ addiu $s2, $s0, 0x8 /* 34774 80059374 8D040004 */ lw $a0, 0x4($t0) /* 34778 80059378 0C0187A4 */ jal osVirtualToPhysical /* 3477C 8005937C 24F302E0 */ addiu $s3, $a3, 0x2E0 /* 34780 80059380 0240202D */ daddu $a0, $s2, $zero /* 34784 80059384 3C0300FF */ lui $v1, (0xFFFFFF >> 16) /* 34788 80059388 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF) /* 3478C 8005938C AE020004 */ sw $v0, 0x4($s0) /* 34790 80059390 00111400 */ sll $v0, $s1, 16 /* 34794 80059394 00021403 */ sra $v0, $v0, 16 /* 34798 80059398 00431024 */ and $v0, $v0, $v1 /* 3479C 8005939C 3C030200 */ lui $v1, (0x2000000 >> 16) /* 347A0 800593A0 00431025 */ or $v0, $v0, $v1 /* 347A4 800593A4 AC820000 */ sw $v0, 0x0($a0) /* 347A8 800593A8 24020170 */ addiu $v0, $zero, 0x170 /* 347AC 800593AC AC820004 */ sw $v0, 0x4($a0) /* 347B0 800593B0 8FA80068 */ lw $t0, 0x68($sp) /* 347B4 800593B4 0000A02D */ daddu $s4, $zero, $zero /* 347B8 800593B8 91020010 */ lbu $v0, 0x10($t0) /* 347BC 800593BC 26520008 */ addiu $s2, $s2, 0x8 /* 347C0 800593C0 1040011D */ beqz $v0, .L80059838 /* 347C4 800593C4 A7B10028 */ sh $s1, 0x28($sp) /* 347C8 800593C8 00131400 */ sll $v0, $s3, 16 /* 347CC 800593CC 3C014700 */ lui $at, (0x47000000 >> 16) /* 347D0 800593D0 4481B000 */ mtc1 $at, $f22 /* 347D4 800593D4 00021403 */ sra $v0, $v0, 16 /* 347D8 800593D8 AFA2002C */ sw $v0, 0x2C($sp) .L800593DC: /* 347DC 800593DC 97A8001E */ lhu $t0, 0x1E($sp) /* 347E0 800593E0 00081400 */ sll $v0, $t0, 16 /* 347E4 800593E4 00021403 */ sra $v0, $v0, 16 /* 347E8 800593E8 00021840 */ sll $v1, $v0, 1 /* 347EC 800593EC 00621821 */ addu $v1, $v1, $v0 /* 347F0 800593F0 8FA80068 */ lw $t0, 0x68($sp) /* 347F4 800593F4 00031900 */ sll $v1, $v1, 4 /* 347F8 800593F8 8D02000C */ lw $v0, 0xC($t0) /* 347FC 800593FC 8D040004 */ lw $a0, 0x4($t0) /* 34800 80059400 00439821 */ addu $s3, $v0, $v1 /* 34804 80059404 8E620000 */ lw $v0, 0x0($s3) /* 34808 80059408 8D030000 */ lw $v1, 0x0($t0) /* 3480C 8005940C 00021040 */ sll $v0, $v0, 1 /* 34810 80059410 0082B823 */ subu $s7, $a0, $v0 /* 34814 80059414 02E3102B */ sltu $v0, $s7, $v1 /* 34818 80059418 10400004 */ beqz $v0, .L8005942C /* 3481C 8005941C 00000000 */ nop /* 34820 80059420 8D020008 */ lw $v0, 0x8($t0) /* 34824 80059424 00021040 */ sll $v0, $v0, 1 /* 34828 80059428 02E2B821 */ addu $s7, $s7, $v0 .L8005942C: /* 3482C 8005942C 8E620004 */ lw $v0, 0x4($s3) /* 34830 80059430 00021040 */ sll $v0, $v0, 1 /* 34834 80059434 0082F023 */ subu $fp, $a0, $v0 /* 34838 80059438 03C3102B */ sltu $v0, $fp, $v1 /* 3483C 8005943C 10400005 */ beqz $v0, .L80059454 /* 34840 80059440 00000000 */ nop /* 34844 80059444 8FA80068 */ lw $t0, 0x68($sp) /* 34848 80059448 8D020008 */ lw $v0, 0x8($t0) /* 3484C 8005944C 00021040 */ sll $v0, $v0, 1 /* 34850 80059450 03C2F021 */ addu $fp, $fp, $v0 .L80059454: /* 34854 80059454 16F40005 */ bne $s7, $s4, .L8005946C /* 34858 80059458 0240802D */ daddu $s0, $s2, $zero /* 3485C 8005945C 02C0102D */ daddu $v0, $s6, $zero /* 34860 80059460 97B60026 */ lhu $s6, 0x26($sp) /* 34864 80059464 08016524 */ j .L80059490 /* 34868 80059468 A7A20026 */ sh $v0, 0x26($sp) .L8005946C: /* 3486C 8005946C 26520008 */ addiu $s2, $s2, 0x8 /* 34870 80059470 02E0202D */ daddu $a0, $s7, $zero /* 34874 80059474 97A80026 */ lhu $t0, 0x26($sp) /* 34878 80059478 3C030417 */ lui $v1, (0x4170000 >> 16) /* 3487C 8005947C 31020FFF */ andi $v0, $t0, 0xFFF /* 34880 80059480 00431025 */ or $v0, $v0, $v1 /* 34884 80059484 0C0187A4 */ jal osVirtualToPhysical /* 34888 80059488 AE020000 */ sw $v0, 0x0($s0) /* 3488C 8005948C AE020004 */ sw $v0, 0x4($s0) .L80059490: /* 34890 80059490 8E620028 */ lw $v0, 0x28($s3) /* 34894 80059494 10400068 */ beqz $v0, .L80059638 /* 34898 80059498 0260202D */ daddu $a0, $s3, $zero /* 3489C 8005949C 8E700004 */ lw $s0, 0x4($s3) /* 348A0 800594A0 8E620000 */ lw $v0, 0x0($s3) /* 348A4 800594A4 240500B8 */ addiu $a1, $zero, 0xB8 /* 348A8 800594A8 0C0166F5 */ jal func_80059BD4 /* 348AC 800594AC 02028023 */ subu $s0, $s0, $v0 /* 348B0 800594B0 44901000 */ mtc1 $s0, $f2 /* 348B4 800594B4 00000000 */ nop /* 348B8 800594B8 468010A0 */ cvt.s.w $f2, $f2 /* 348BC 800594BC 46020103 */ div.s $f4, $f0, $f2 /* 348C0 800594C0 46162002 */ mul.s $f0, $f4, $f22 /* 348C4 800594C4 00000000 */ nop /* 348C8 800594C8 4600018D */ trunc.w.s $f6, $f0 /* 348CC 800594CC 44023000 */ mfc1 $v0, $f6 /* 348D0 800594D0 3C013800 */ lui $at, (0x38000000 >> 16) /* 348D4 800594D4 44810000 */ mtc1 $at, $f0 /* 348D8 800594D8 44822000 */ mtc1 $v0, $f4 /* 348DC 800594DC 00000000 */ nop /* 348E0 800594E0 46802120 */ cvt.s.w $f4, $f4 /* 348E4 800594E4 46002102 */ mul.s $f4, $f4, $f0 /* 348E8 800594E8 00000000 */ nop /* 348EC 800594EC 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 348F0 800594F0 44811800 */ mtc1 $at, $f3 /* 348F4 800594F4 44801000 */ mtc1 $zero, $f2 /* 348F8 800594F8 46002021 */ cvt.d.s $f0, $f4 /* 348FC 800594FC 46201081 */ sub.d $f2, $f2, $f0 /* 34900 80059500 3C014338 */ lui $at, (0x43380000 >> 16) /* 34904 80059504 44812000 */ mtc1 $at, $f4 /* 34908 80059508 46201520 */ cvt.s.d $f20, $f2 /* 3490C 8005950C 4604A102 */ mul.s $f4, $f20, $f4 /* 34910 80059510 00000000 */ nop /* 34914 80059514 8E620028 */ lw $v0, 0x28($s3) /* 34918 80059518 C4400008 */ lwc1 $f0, 0x8($v0) /* 3491C 8005951C 46040000 */ add.s $f0, $f0, $f4 /* 34920 80059520 4600018D */ trunc.w.s $f6, $f0 /* 34924 80059524 44143000 */ mfc1 $s4, $f6 /* 34928 80059528 00000000 */ nop /* 3492C 8005952C 44941000 */ mtc1 $s4, $f2 /* 34930 80059530 00000000 */ nop /* 34934 80059534 468010A0 */ cvt.s.w $f2, $f2 /* 34938 80059538 46020001 */ sub.s $f0, $f0, $f2 /* 3493C 8005953C E4400008 */ swc1 $f0, 0x8($v0) /* 34940 80059540 8E630018 */ lw $v1, 0x18($s3) /* 34944 80059544 8E620004 */ lw $v0, 0x4($s3) /* 34948 80059548 8FA80068 */ lw $t0, 0x68($sp) /* 3494C 8005954C 00621823 */ subu $v1, $v1, $v0 /* 34950 80059550 8D020004 */ lw $v0, 0x4($t0) /* 34954 80059554 00031840 */ sll $v1, $v1, 1 /* 34958 80059558 00432821 */ addu $a1, $v0, $v1 /* 3495C 8005955C 30A20007 */ andi $v0, $a1, 0x7 /* 34960 80059560 00021843 */ sra $v1, $v0, 1 /* 34964 80059564 0003A840 */ sll $s5, $v1, 1 /* 34968 80059568 8D020000 */ lw $v0, 0x0($t0) /* 3496C 8005956C 00B52823 */ subu $a1, $a1, $s5 /* 34970 80059570 00A2102B */ sltu $v0, $a1, $v0 /* 34974 80059574 10400004 */ beqz $v0, .L80059588 /* 34978 80059578 00000000 */ nop /* 3497C 8005957C 8D020008 */ lw $v0, 0x8($t0) /* 34980 80059580 00021040 */ sll $v0, $v0, 1 /* 34984 80059584 00A22821 */ addu $a1, $a1, $v0 .L80059588: /* 34988 80059588 8FA40068 */ lw $a0, 0x68($sp) /* 3498C 8005958C 8FA6002C */ lw $a2, 0x2C($sp) /* 34990 80059590 02833821 */ addu $a3, $s4, $v1 /* 34994 80059594 0C0166AE */ jal _saveBuffer /* 34998 80059598 AFB20010 */ sw $s2, 0x10($sp) /* 3499C 8005959C 0040902D */ daddu $s2, $v0, $zero /* 349A0 800595A0 4616A002 */ mul.s $f0, $f20, $f22 /* 349A4 800595A4 00000000 */ nop /* 349A8 800595A8 00168C00 */ sll $s1, $s6, 16 /* 349AC 800595AC 8E630028 */ lw $v1, 0x28($s3) /* 349B0 800595B0 8C640000 */ lw $a0, 0x0($v1) /* 349B4 800595B4 4600018D */ trunc.w.s $f6, $f0 /* 349B8 800595B8 44103000 */ mfc1 $s0, $f6 /* 349BC 800595BC 0C0187A4 */ jal osVirtualToPhysical /* 349C0 800595C0 00118E03 */ sra $s1, $s1, 24 /* 349C4 800595C4 3C0300FF */ lui $v1, (0xFFFFFF >> 16) /* 349C8 800595C8 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF) /* 349CC 800595CC 0240202D */ daddu $a0, $s2, $zero /* 349D0 800595D0 00431024 */ and $v0, $v0, $v1 /* 349D4 800595D4 3C030500 */ lui $v1, (0x5000000 >> 16) /* 349D8 800595D8 00431025 */ or $v0, $v0, $v1 /* 349DC 800595DC 3210FFFF */ andi $s0, $s0, 0xFFFF /* 349E0 800595E0 00108380 */ sll $s0, $s0, 14 /* 349E4 800595E4 32310003 */ andi $s1, $s1, 0x3 /* 349E8 800595E8 AC820000 */ sw $v0, 0x0($a0) /* 349EC 800595EC 8E620028 */ lw $v0, 0x28($s3) /* 349F0 800595F0 8FA8002C */ lw $t0, 0x2C($sp) /* 349F4 800595F4 8C43000C */ lw $v1, 0xC($v0) /* 349F8 800595F8 01151021 */ addu $v0, $t0, $s5 /* 349FC 800595FC 30420FFF */ andi $v0, $v0, 0xFFF /* 34A00 80059600 00021080 */ sll $v0, $v0, 2 /* 34A04 80059604 00031F80 */ sll $v1, $v1, 30 /* 34A08 80059608 00701825 */ or $v1, $v1, $s0 /* 34A0C 8005960C 00621825 */ or $v1, $v1, $v0 /* 34A10 80059610 00711825 */ or $v1, $v1, $s1 /* 34A14 80059614 AC830004 */ sw $v1, 0x4($a0) /* 34A18 80059618 8E620028 */ lw $v0, 0x28($s3) /* 34A1C 8005961C AC40000C */ sw $zero, 0xC($v0) /* 34A20 80059620 8E620018 */ lw $v0, 0x18($s3) /* 34A24 80059624 26520008 */ addiu $s2, $s2, 0x8 /* 34A28 80059628 2442FF48 */ addiu $v0, $v0, -0xB8 /* 34A2C 8005962C 00541021 */ addu $v0, $v0, $s4 /* 34A30 80059630 08016597 */ j .L8005965C /* 34A34 80059634 AE620018 */ sw $v0, 0x18($s3) .L80059638: /* 34A38 80059638 0240802D */ daddu $s0, $s2, $zero /* 34A3C 8005963C 26520008 */ addiu $s2, $s2, 0x8 /* 34A40 80059640 03C0202D */ daddu $a0, $fp, $zero /* 34A44 80059644 32C20FFF */ andi $v0, $s6, 0xFFF /* 34A48 80059648 3C030417 */ lui $v1, (0x4170000 >> 16) /* 34A4C 8005964C 00431025 */ or $v0, $v0, $v1 /* 34A50 80059650 0C0187A4 */ jal osVirtualToPhysical /* 34A54 80059654 AE020000 */ sw $v0, 0x0($s0) /* 34A58 80059658 AE020004 */ sw $v0, 0x4($s0) .L8005965C: /* 34A5C 8005965C 86620008 */ lh $v0, 0x8($s3) /* 34A60 80059660 10400018 */ beqz $v0, .L800596C4 /* 34A64 80059664 0240282D */ daddu $a1, $s2, $zero /* 34A68 80059668 32C4FFFF */ andi $a0, $s6, 0xFFFF /* 34A6C 8005966C 97A80026 */ lhu $t0, 0x26($sp) /* 34A70 80059670 96630008 */ lhu $v1, 0x8($s3) /* 34A74 80059674 00081400 */ sll $v0, $t0, 16 /* 34A78 80059678 00441025 */ or $v0, $v0, $a0 /* 34A7C 8005967C 3C080C00 */ lui $t0, (0xC000000 >> 16) /* 34A80 80059680 00681825 */ or $v1, $v1, $t0 /* 34A84 80059684 ACA20004 */ sw $v0, 0x4($a1) /* 34A88 80059688 ACA30000 */ sw $v1, 0x0($a1) /* 34A8C 8005968C 8E620028 */ lw $v0, 0x28($s3) /* 34A90 80059690 1440000C */ bnez $v0, .L800596C4 /* 34A94 80059694 26520008 */ addiu $s2, $s2, 0x8 /* 34A98 80059698 8E620020 */ lw $v0, 0x20($s3) /* 34A9C 8005969C 14400009 */ bnez $v0, .L800596C4 /* 34AA0 800596A0 0240802D */ daddu $s0, $s2, $zero /* 34AA4 800596A4 26520008 */ addiu $s2, $s2, 0x8 /* 34AA8 800596A8 03C0202D */ daddu $a0, $fp, $zero /* 34AAC 800596AC 32C20FFF */ andi $v0, $s6, 0xFFF /* 34AB0 800596B0 3C080617 */ lui $t0, (0x6170000 >> 16) /* 34AB4 800596B4 00481025 */ or $v0, $v0, $t0 /* 34AB8 800596B8 0C0187A4 */ jal osVirtualToPhysical /* 34ABC 800596BC AE020000 */ sw $v0, 0x0($s0) /* 34AC0 800596C0 AE020004 */ sw $v0, 0x4($s0) .L800596C4: /* 34AC4 800596C4 8662000A */ lh $v0, 0xA($s3) /* 34AC8 800596C8 10400014 */ beqz $v0, .L8005971C /* 34ACC 800596CC 0240302D */ daddu $a2, $s2, $zero /* 34AD0 800596D0 26520008 */ addiu $s2, $s2, 0x8 /* 34AD4 800596D4 0240802D */ daddu $s0, $s2, $zero /* 34AD8 800596D8 26520008 */ addiu $s2, $s2, 0x8 /* 34ADC 800596DC 00161400 */ sll $v0, $s6, 16 /* 34AE0 800596E0 3C080C00 */ lui $t0, (0xC000000 >> 16) /* 34AE4 800596E4 97A50026 */ lhu $a1, 0x26($sp) /* 34AE8 800596E8 9663000A */ lhu $v1, 0xA($s3) /* 34AEC 800596EC 00451025 */ or $v0, $v0, $a1 /* 34AF0 800596F0 00681825 */ or $v1, $v1, $t0 /* 34AF4 800596F4 ACC20004 */ sw $v0, 0x4($a2) /* 34AF8 800596F8 ACC30000 */ sw $v1, 0x0($a2) /* 34AFC 800596FC 97A80026 */ lhu $t0, 0x26($sp) /* 34B00 80059700 02E0202D */ daddu $a0, $s7, $zero /* 34B04 80059704 31020FFF */ andi $v0, $t0, 0xFFF /* 34B08 80059708 3C080617 */ lui $t0, (0x6170000 >> 16) /* 34B0C 8005970C 00481025 */ or $v0, $v0, $t0 /* 34B10 80059710 0C0187A4 */ jal osVirtualToPhysical /* 34B14 80059714 AE020000 */ sw $v0, 0x0($s0) /* 34B18 80059718 AE020004 */ sw $v0, 0x4($s0) .L8005971C: /* 34B1C 8005971C 8E620020 */ lw $v0, 0x20($s3) /* 34B20 80059720 10400020 */ beqz $v0, .L800597A4 /* 34B24 80059724 3C020B00 */ lui $v0, (0xB000020 >> 16) /* 34B28 80059728 34420020 */ ori $v0, $v0, (0xB000020 & 0xFFFF) /* 34B2C 8005972C 0240882D */ daddu $s1, $s2, $zero /* 34B30 80059730 00168400 */ sll $s0, $s6, 16 /* 34B34 80059734 AE220000 */ sw $v0, 0x0($s1) /* 34B38 80059738 8E640020 */ lw $a0, 0x20($s3) /* 34B3C 8005973C 00108603 */ sra $s0, $s0, 24 /* 34B40 80059740 0C0187A4 */ jal osVirtualToPhysical /* 34B44 80059744 24840008 */ addiu $a0, $a0, 0x8 /* 34B48 80059748 26520008 */ addiu $s2, $s2, 0x8 /* 34B4C 8005974C AE220004 */ sw $v0, 0x4($s1) /* 34B50 80059750 0240882D */ daddu $s1, $s2, $zero /* 34B54 80059754 8E620020 */ lw $v0, 0x20($s3) /* 34B58 80059758 3C030E00 */ lui $v1, (0xE000000 >> 16) /* 34B5C 8005975C 9044002F */ lbu $a0, 0x2F($v0) /* 34B60 80059760 94420002 */ lhu $v0, 0x2($v0) /* 34B64 80059764 00042400 */ sll $a0, $a0, 16 /* 34B68 80059768 00431025 */ or $v0, $v0, $v1 /* 34B6C 8005976C 00822025 */ or $a0, $a0, $v0 /* 34B70 80059770 AE240000 */ sw $a0, 0x0($s1) /* 34B74 80059774 8E620020 */ lw $v0, 0x20($s3) /* 34B78 80059778 8C440028 */ lw $a0, 0x28($v0) /* 34B7C 8005977C 0C0187A4 */ jal osVirtualToPhysical /* 34B80 80059780 00108600 */ sll $s0, $s0, 24 /* 34B84 80059784 3C0300FF */ lui $v1, (0xFFFFFF >> 16) /* 34B88 80059788 3463FFFF */ ori $v1, $v1, (0xFFFFFF & 0xFFFF) /* 34B8C 8005978C 00431024 */ and $v0, $v0, $v1 /* 34B90 80059790 02028025 */ or $s0, $s0, $v0 /* 34B94 80059794 AE300004 */ sw $s0, 0x4($s1) /* 34B98 80059798 8E620020 */ lw $v0, 0x20($s3) /* 34B9C 8005979C 26520008 */ addiu $s2, $s2, 0x8 /* 34BA0 800597A0 AC40002C */ sw $zero, 0x2C($v0) .L800597A4: /* 34BA4 800597A4 8E620028 */ lw $v0, 0x28($s3) /* 34BA8 800597A8 14400009 */ bnez $v0, .L800597D0 /* 34BAC 800597AC 0240802D */ daddu $s0, $s2, $zero /* 34BB0 800597B0 26520008 */ addiu $s2, $s2, 0x8 /* 34BB4 800597B4 03C0202D */ daddu $a0, $fp, $zero /* 34BB8 800597B8 32C20FFF */ andi $v0, $s6, 0xFFF /* 34BBC 800597BC 3C080617 */ lui $t0, (0x6170000 >> 16) /* 34BC0 800597C0 00481025 */ or $v0, $v0, $t0 /* 34BC4 800597C4 0C0187A4 */ jal osVirtualToPhysical /* 34BC8 800597C8 AE020000 */ sw $v0, 0x0($s0) /* 34BCC 800597CC AE020004 */ sw $v0, 0x4($s0) .L800597D0: /* 34BD0 800597D0 8662000C */ lh $v0, 0xC($s3) /* 34BD4 800597D4 1040000A */ beqz $v0, .L80059800 /* 34BD8 800597D8 0240282D */ daddu $a1, $s2, $zero /* 34BDC 800597DC 26520008 */ addiu $s2, $s2, 0x8 /* 34BE0 800597E0 00161400 */ sll $v0, $s6, 16 /* 34BE4 800597E4 3C080C00 */ lui $t0, (0xC000000 >> 16) /* 34BE8 800597E8 97A40028 */ lhu $a0, 0x28($sp) /* 34BEC 800597EC 9663000C */ lhu $v1, 0xC($s3) /* 34BF0 800597F0 00441025 */ or $v0, $v0, $a0 /* 34BF4 800597F4 00681825 */ or $v1, $v1, $t0 /* 34BF8 800597F8 ACA20004 */ sw $v0, 0x4($a1) /* 34BFC 800597FC ACA30000 */ sw $v1, 0x0($a1) .L80059800: /* 34C00 80059800 97A8001E */ lhu $t0, 0x1E($sp) /* 34C04 80059804 25030001 */ addiu $v1, $t0, 0x1 /* 34C08 80059808 A7A3001E */ sh $v1, 0x1E($sp) /* 34C0C 8005980C 00031C00 */ sll $v1, $v1, 16 /* 34C10 80059810 8FA80068 */ lw $t0, 0x68($sp) /* 34C14 80059814 8E620004 */ lw $v0, 0x4($s3) /* 34C18 80059818 8D040004 */ lw $a0, 0x4($t0) /* 34C1C 8005981C 00021040 */ sll $v0, $v0, 1 /* 34C20 80059820 0082A021 */ addu $s4, $a0, $v0 /* 34C24 80059824 91020010 */ lbu $v0, 0x10($t0) /* 34C28 80059828 00031C03 */ sra $v1, $v1, 16 /* 34C2C 8005982C 0062182A */ slt $v1, $v1, $v0 /* 34C30 80059830 1460FEEA */ bnez $v1, .L800593DC /* 34C34 80059834 00000000 */ nop .L80059838: /* 34C38 80059838 8FA80068 */ lw $t0, 0x68($sp) /* 34C3C 8005983C 8D030004 */ lw $v1, 0x4($t0) /* 34C40 80059840 8D020008 */ lw $v0, 0x8($t0) /* 34C44 80059844 8D040000 */ lw $a0, 0x0($t0) /* 34C48 80059848 24630170 */ addiu $v1, $v1, 0x170 /* 34C4C 8005984C 00021040 */ sll $v0, $v0, 1 /* 34C50 80059850 00821021 */ addu $v0, $a0, $v0 /* 34C54 80059854 AD030004 */ sw $v1, 0x4($t0) /* 34C58 80059858 0062182B */ sltu $v1, $v1, $v0 /* 34C5C 8005985C 50600001 */ beql $v1, $zero, .L80059864 /* 34C60 80059860 AD040004 */ sw $a0, 0x4($t0) .L80059864: /* 34C64 80059864 0240102D */ daddu $v0, $s2, $zero /* 34C68 80059868 8FBF0054 */ lw $ra, 0x54($sp) /* 34C6C 8005986C 8FBE0050 */ lw $fp, 0x50($sp) /* 34C70 80059870 8FB7004C */ lw $s7, 0x4C($sp) /* 34C74 80059874 8FB60048 */ lw $s6, 0x48($sp) /* 34C78 80059878 8FB50044 */ lw $s5, 0x44($sp) /* 34C7C 8005987C 8FB40040 */ lw $s4, 0x40($sp) /* 34C80 80059880 8FB3003C */ lw $s3, 0x3C($sp) /* 34C84 80059884 8FB20038 */ lw $s2, 0x38($sp) /* 34C88 80059888 8FB10034 */ lw $s1, 0x34($sp) /* 34C8C 8005988C 8FB00030 */ lw $s0, 0x30($sp) /* 34C90 80059890 D7B60060 */ ldc1 $f22, 0x60($sp) /* 34C94 80059894 D7B40058 */ ldc1 $f20, 0x58($sp) /* 34C98 80059898 03E00008 */ jr $ra /* 34C9C 8005989C 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: Acmd* au_pull_fx(AuFX* fx, Acmd* ptr, s16 outputBuf, s16 arg3) { Acmd* cmdBufPos = ptr; s16 delayIdx; s16* inPtr; s16* outPtr; s16 buff1 = arg3 + N_AL_TEMP_0; s16 buff2 = arg3 + N_AL_TEMP_1; s16 rbuff = arg3 + N_AL_TEMP_2; s16* prevOutPtr = 0; s16 outputBufCopy = outputBuf; n_aSaveBuffer(cmdBufPos++, FIXED_SAMPLE<<1, outputBuf, osVirtualToPhysical(fx->input)); aClearBuffer(cmdBufPos++, outputBuf, FIXED_SAMPLE<<1); for (delayIdx = 0; delayIdx < fx->delayCount; delayIdx++) { AuDelay* delay = &fx->delays[delayIdx]; f32 fUnityPitch = UNITY_PITCH; inPtr = &fx->input[-delay->input]; if (inPtr < fx->base) { inPtr += fx->length; } outPtr = &fx->input[-delay->output]; if (outPtr < fx->base) { outPtr += fx->length; } if (inPtr == prevOutPtr) { SWAP16(buff1, buff2); } else { n_aLoadBuffer(cmdBufPos++, FIXED_SAMPLE<<1, buff1, osVirtualToPhysical(inPtr)); } if (delay->resampler_28) { // modified _n_loadOutputBuffer s32 ratio; s32 length, count; f32 delta, fratio, fincount; s32 ramAlign; s16 tmp; s16* rsOutPtr; length = delay->output - delay->input; delta = func_80059BD4(delay, AUDIO_SAMPLES); delta /= length; delta = (s32)(delta * fUnityPitch); delta = delta / UNITY_PITCH; fratio = 1.0 - delta; fincount = delay->resampler_28->delta + (fratio * AUDIO_SAMPLES); count = (s32) fincount; delay->resampler_28->delta = fincount - count; rsOutPtr = &fx->input[-(delay->output - delay->rsdelta)]; ramAlign = ((s32) rsOutPtr & 7) >> 1; rsOutPtr -= ramAlign; if (rsOutPtr < fx->base) { rsOutPtr += fx->length; } cmdBufPos = _saveBuffer(fx, rsOutPtr, rbuff, count + ramAlign, cmdBufPos); ratio = fratio * fUnityPitch; tmp = buff2 >> 8; n_aResample(cmdBufPos++, osVirtualToPhysical(delay->resampler_28->state), delay->resampler_28->first, ratio, rbuff + (ramAlign<<1), tmp); delay->resampler_28->first = 0; delay->rsdelta += count - AUDIO_SAMPLES; } else { n_aLoadBuffer(cmdBufPos++, FIXED_SAMPLE<<1, buff2, osVirtualToPhysical(outPtr)); } if (delay->ffcoef) { aMix(cmdBufPos++, 0, (u16)delay->ffcoef, buff1, buff2); if (delay->resampler_28 == NULL && delay->lowpass_20 == NULL) { n_aSaveBuffer(cmdBufPos++, FIXED_SAMPLE<<1, buff2, osVirtualToPhysical(outPtr)); } } if (delay->fbcoef) { aMix(cmdBufPos++, 0, (u16)delay->fbcoef, buff2, buff1); n_aSaveBuffer(cmdBufPos++, FIXED_SAMPLE<<1, buff1, osVirtualToPhysical(inPtr)); } if (delay->lowpass_20 != NULL) { // modified _n_filterBuffer s16 tmp = buff2 >> 8; n_aLoadADPCM(cmdBufPos++, 32, osVirtualToPhysical(delay->lowpass_20->fccoef)); n_aPoleFilter(cmdBufPos++, delay->lowpass_20->first, delay->lowpass_20->fgain, tmp, osVirtualToPhysical(delay->lowpass_20->fstate)); delay->lowpass_20->first = 0; } if (!delay->resampler_28) { n_aSaveBuffer(cmdBufPos++, FIXED_SAMPLE<<1, buff2, osVirtualToPhysical(outPtr)); } if (delay->gain) { aMix(cmdBufPos++, 0, (u16)delay->gain, buff2, outputBufCopy); } prevOutPtr = &fx->input[delay->output]; } fx->input += AUDIO_SAMPLES; if (fx->input >= &fx->base[fx->length]) { fx->input = fx->base; } return cmdBufPos; }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_intro_logos /* F7A4 800343A4 27BDFFE8 */ addiu $sp, $sp, -0x18 /* F7A8 800343A8 3C05E200 */ lui $a1, (0xE200001C >> 16) /* F7AC 800343AC 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF) /* F7B0 800343B0 3C08FCFF */ lui $t0, (0xFCFFFFFF >> 16) /* F7B4 800343B4 3508FFFF */ ori $t0, $t0, (0xFCFFFFFF & 0xFFFF) /* F7B8 800343B8 3C07FFFC */ lui $a3, (0xFFFCF87C >> 16) /* F7BC 800343BC 34E7F87C */ ori $a3, $a3, (0xFFFCF87C & 0xFFFF) /* F7C0 800343C0 3C09E300 */ lui $t1, (0xE3000A01 >> 16) /* F7C4 800343C4 35290A01 */ ori $t1, $t1, (0xE3000A01 & 0xFFFF) /* F7C8 800343C8 3C0AE739 */ lui $t2, (0xE739E739 >> 16) /* F7CC 800343CC 354AE739 */ ori $t2, $t2, (0xE739E739 & 0xFFFF) /* F7D0 800343D0 3C0BF64F */ lui $t3, (0xF64FC3BC >> 16) /* F7D4 800343D4 3C04800A */ lui $a0, %hi(gMainGfxPos) /* F7D8 800343D8 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* F7DC 800343DC 356BC3BC */ ori $t3, $t3, (0xF64FC3BC & 0xFFFF) /* F7E0 800343E0 AFB50014 */ sw $s5, 0x14($sp) /* F7E4 800343E4 AFB40010 */ sw $s4, 0x10($sp) /* F7E8 800343E8 AFB3000C */ sw $s3, 0xC($sp) /* F7EC 800343EC AFB20008 */ sw $s2, 0x8($sp) /* F7F0 800343F0 AFB10004 */ sw $s1, 0x4($sp) /* F7F4 800343F4 AFB00000 */ sw $s0, 0x0($sp) /* F7F8 800343F8 8C820000 */ lw $v0, 0x0($a0) /* F7FC 800343FC 3C06E700 */ lui $a2, (0xE7000000 >> 16) /* F800 80034400 0040182D */ daddu $v1, $v0, $zero /* F804 80034404 24420008 */ addiu $v0, $v0, 0x8 /* F808 80034408 AC820000 */ sw $v0, 0x0($a0) /* F80C 8003440C AC660000 */ sw $a2, 0x0($v1) /* F810 80034410 AC600004 */ sw $zero, 0x4($v1) /* F814 80034414 24430008 */ addiu $v1, $v0, 0x8 /* F818 80034418 AC830000 */ sw $v1, 0x0($a0) /* F81C 8003441C 24430010 */ addiu $v1, $v0, 0x10 /* F820 80034420 AC450000 */ sw $a1, 0x0($v0) /* F824 80034424 AC400004 */ sw $zero, 0x4($v0) /* F828 80034428 AC830000 */ sw $v1, 0x0($a0) /* F82C 8003442C 24430018 */ addiu $v1, $v0, 0x18 /* F830 80034430 AC480008 */ sw $t0, 0x8($v0) /* F834 80034434 AC47000C */ sw $a3, 0xC($v0) /* F838 80034438 AC830000 */ sw $v1, 0x0($a0) /* F83C 8003443C 3C030030 */ lui $v1, (0x300000 >> 16) /* F840 80034440 AC430014 */ sw $v1, 0x14($v0) /* F844 80034444 24430020 */ addiu $v1, $v0, 0x20 /* F848 80034448 AC490010 */ sw $t1, 0x10($v0) /* F84C 8003444C AC830000 */ sw $v1, 0x0($a0) /* F850 80034450 3C03F700 */ lui $v1, (0xF7000000 >> 16) /* F854 80034454 AC430018 */ sw $v1, 0x18($v0) /* F858 80034458 24430028 */ addiu $v1, $v0, 0x28 /* F85C 8003445C AC4A001C */ sw $t2, 0x1C($v0) /* F860 80034460 AC830000 */ sw $v1, 0x0($a0) /* F864 80034464 3C058007 */ lui $a1, %hi(gGameStatusPtr) /* F868 80034468 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) /* F86C 8003446C 24430030 */ addiu $v1, $v0, 0x30 /* F870 80034470 AC4B0020 */ sw $t3, 0x20($v0) /* F874 80034474 AC400024 */ sw $zero, 0x24($v0) /* F878 80034478 AC830000 */ sw $v1, 0x0($a0) /* F87C 8003447C AC460028 */ sw $a2, 0x28($v0) /* F880 80034480 AC40002C */ sw $zero, 0x2C($v0) /* F884 80034484 80A300AC */ lb $v1, 0xAC($a1) /* F888 80034488 2C62000A */ sltiu $v0, $v1, 0xA /* F88C 8003448C 10400124 */ beqz $v0, .L80034920 /* F890 80034490 00031080 */ sll $v0, $v1, 2 /* F894 80034494 3C01800A */ lui $at, %hi(jtbl_800982C0) /* F898 80034498 00220821 */ addu $at, $at, $v0 /* F89C 8003449C 8C2282C0 */ lw $v0, %lo(jtbl_800982C0)($at) /* F8A0 800344A0 00400008 */ jr $v0 /* F8A4 800344A4 00000000 */ nop glabel .L800344A8 /* F8A8 800344A8 0000502D */ daddu $t2, $zero, $zero /* F8AC 800344AC 3C02800A */ lui $v0, %hi(gMainGfxPos) /* F8B0 800344B0 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* F8B4 800344B4 0040482D */ daddu $t1, $v0, $zero /* F8B8 800344B8 3C19FD10 */ lui $t9, (0xFD10007F >> 16) /* F8BC 800344BC 3739007F */ ori $t9, $t9, (0xFD10007F & 0xFFFF) /* F8C0 800344C0 3C15800A */ lui $s5, %hi(gLogosImage1) /* F8C4 800344C4 26B50918 */ addiu $s5, $s5, %lo(gLogosImage1) /* F8C8 800344C8 3C0DF510 */ lui $t5, (0xF5104000 >> 16) /* F8CC 800344CC 35AD4000 */ ori $t5, $t5, (0xF5104000 & 0xFFFF) /* F8D0 800344D0 3C140700 */ lui $s4, (0x7000000 >> 16) /* F8D4 800344D4 3C13E600 */ lui $s3, (0xE6000000 >> 16) /* F8D8 800344D8 3C12F400 */ lui $s2, (0xF4000000 >> 16) /* F8DC 800344DC 3C18071F */ lui $t8, (0x71FC03C >> 16) /* F8E0 800344E0 3718C03C */ ori $t8, $t8, (0x71FC03C & 0xFFFF) /* F8E4 800344E4 3C0EE700 */ lui $t6, (0xE7000000 >> 16) /* F8E8 800344E8 3C11F200 */ lui $s1, (0xF2000000 >> 16) /* F8EC 800344EC 3C0F001F */ lui $t7, (0x1FC03C >> 16) /* F8F0 800344F0 35EFC03C */ ori $t7, $t7, (0x1FC03C & 0xFFFF) /* F8F4 800344F4 3C10E438 */ lui $s0, (0xE4380000 >> 16) /* F8F8 800344F8 240C0100 */ addiu $t4, $zero, 0x100 /* F8FC 800344FC 8D220000 */ lw $v0, 0x0($t1) /* F900 80034500 240B0140 */ addiu $t3, $zero, 0x140 /* F904 80034504 0040182D */ daddu $v1, $v0, $zero /* F908 80034508 24420008 */ addiu $v0, $v0, 0x8 /* F90C 8003450C AD220000 */ sw $v0, 0x0($t1) /* F910 80034510 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* F914 80034514 AC620000 */ sw $v0, 0x0($v1) /* F918 80034518 3C028007 */ lui $v0, %hi(D_80077908) /* F91C 8003451C 24427908 */ addiu $v0, $v0, %lo(D_80077908) /* F920 80034520 AC620004 */ sw $v0, 0x4($v1) .L80034524: /* F924 80034524 3C080400 */ lui $t0, (0x4000400 >> 16) /* F928 80034528 35080400 */ ori $t0, $t0, (0x4000400 & 0xFFFF) /* F92C 8003452C 31870FFF */ andi $a3, $t4, 0xFFF /* F930 80034530 258C0040 */ addiu $t4, $t4, 0x40 /* F934 80034534 31660FFF */ andi $a2, $t3, 0xFFF /* F938 80034538 256B0040 */ addiu $t3, $t3, 0x40 /* F93C 8003453C 000A2B00 */ sll $a1, $t2, 12 /* F940 80034540 254A0001 */ addiu $t2, $t2, 0x1 /* F944 80034544 00D03025 */ or $a2, $a2, $s0 /* F948 80034548 8D230000 */ lw $v1, 0x0($t1) /* F94C 8003454C 8EA20000 */ lw $v0, 0x0($s5) /* F950 80034550 0060202D */ daddu $a0, $v1, $zero /* F954 80034554 24630008 */ addiu $v1, $v1, 0x8 /* F958 80034558 00451021 */ addu $v0, $v0, $a1 /* F95C 8003455C AD230000 */ sw $v1, 0x0($t1) /* F960 80034560 AC820004 */ sw $v0, 0x4($a0) /* F964 80034564 24620008 */ addiu $v0, $v1, 0x8 /* F968 80034568 AC990000 */ sw $t9, 0x0($a0) /* F96C 8003456C AD220000 */ sw $v0, 0x0($t1) /* F970 80034570 24620010 */ addiu $v0, $v1, 0x10 /* F974 80034574 AC6D0000 */ sw $t5, 0x0($v1) /* F978 80034578 AC740004 */ sw $s4, 0x4($v1) /* F97C 8003457C AD220000 */ sw $v0, 0x0($t1) /* F980 80034580 24620018 */ addiu $v0, $v1, 0x18 /* F984 80034584 AC730008 */ sw $s3, 0x8($v1) /* F988 80034588 AC60000C */ sw $zero, 0xC($v1) /* F98C 8003458C AD220000 */ sw $v0, 0x0($t1) /* F990 80034590 24620020 */ addiu $v0, $v1, 0x20 /* F994 80034594 AC720010 */ sw $s2, 0x10($v1) /* F998 80034598 AC780014 */ sw $t8, 0x14($v1) /* F99C 8003459C AD220000 */ sw $v0, 0x0($t1) /* F9A0 800345A0 24620028 */ addiu $v0, $v1, 0x28 /* F9A4 800345A4 AC6E0018 */ sw $t6, 0x18($v1) /* F9A8 800345A8 AC60001C */ sw $zero, 0x1C($v1) /* F9AC 800345AC AD220000 */ sw $v0, 0x0($t1) /* F9B0 800345B0 24620030 */ addiu $v0, $v1, 0x30 /* F9B4 800345B4 AC6D0020 */ sw $t5, 0x20($v1) /* F9B8 800345B8 AC600024 */ sw $zero, 0x24($v1) /* F9BC 800345BC AD220000 */ sw $v0, 0x0($t1) /* F9C0 800345C0 24620038 */ addiu $v0, $v1, 0x38 /* F9C4 800345C4 AC710028 */ sw $s1, 0x28($v1) /* F9C8 800345C8 AC6F002C */ sw $t7, 0x2C($v1) /* F9CC 800345CC AD220000 */ sw $v0, 0x0($t1) /* F9D0 800345D0 3C020018 */ lui $v0, (0x180000 >> 16) /* F9D4 800345D4 00E23825 */ or $a3, $a3, $v0 /* F9D8 800345D8 24620040 */ addiu $v0, $v1, 0x40 /* F9DC 800345DC AC660030 */ sw $a2, 0x30($v1) /* F9E0 800345E0 AC670034 */ sw $a3, 0x34($v1) /* F9E4 800345E4 AD220000 */ sw $v0, 0x0($t1) /* F9E8 800345E8 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* F9EC 800345EC AC620038 */ sw $v0, 0x38($v1) /* F9F0 800345F0 24620048 */ addiu $v0, $v1, 0x48 /* F9F4 800345F4 AC60003C */ sw $zero, 0x3C($v1) /* F9F8 800345F8 AD220000 */ sw $v0, 0x0($t1) /* F9FC 800345FC 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* FA00 80034600 AC620040 */ sw $v0, 0x40($v1) /* FA04 80034604 24620050 */ addiu $v0, $v1, 0x50 /* FA08 80034608 AC680044 */ sw $t0, 0x44($v1) /* FA0C 8003460C AD220000 */ sw $v0, 0x0($t1) /* FA10 80034610 29420007 */ slti $v0, $t2, 0x7 /* FA14 80034614 AC6E0048 */ sw $t6, 0x48($v1) /* FA18 80034618 1440FFC2 */ bnez $v0, .L80034524 /* FA1C 8003461C AC60004C */ sw $zero, 0x4C($v1) /* FA20 80034620 0800D248 */ j .L80034920 /* FA24 80034624 00000000 */ nop glabel .L80034628 /* FA28 80034628 0000502D */ daddu $t2, $zero, $zero /* FA2C 8003462C 3C02800A */ lui $v0, %hi(gMainGfxPos) /* FA30 80034630 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* FA34 80034634 0040482D */ daddu $t1, $v0, $zero /* FA38 80034638 3C19FD10 */ lui $t9, (0xFD1000FF >> 16) /* FA3C 8003463C 373900FF */ ori $t9, $t9, (0xFD1000FF & 0xFFFF) /* FA40 80034640 3C15800A */ lui $s5, %hi(gLogosImage2) /* FA44 80034644 26B5091C */ addiu $s5, $s5, %lo(gLogosImage2) /* FA48 80034648 3C0DF510 */ lui $t5, (0xF5108000 >> 16) /* FA4C 8003464C 35AD8000 */ ori $t5, $t5, (0xF5108000 & 0xFFFF) /* FA50 80034650 3C140700 */ lui $s4, (0x7000000 >> 16) /* FA54 80034654 3C13E600 */ lui $s3, (0xE6000000 >> 16) /* FA58 80034658 3C12F400 */ lui $s2, (0xF4000000 >> 16) /* FA5C 8003465C 3C18073F */ lui $t8, (0x73FC01C >> 16) /* FA60 80034660 3718C01C */ ori $t8, $t8, (0x73FC01C & 0xFFFF) /* FA64 80034664 3C0EE700 */ lui $t6, (0xE7000000 >> 16) /* FA68 80034668 3C11F200 */ lui $s1, (0xF2000000 >> 16) /* FA6C 8003466C 3C0F003F */ lui $t7, (0x3FC01C >> 16) /* FA70 80034670 35EFC01C */ ori $t7, $t7, (0x3FC01C & 0xFFFF) /* FA74 80034674 3C10E448 */ lui $s0, (0xE4480000 >> 16) /* FA78 80034678 240C0164 */ addiu $t4, $zero, 0x164 /* FA7C 8003467C 8D220000 */ lw $v0, 0x0($t1) /* FA80 80034680 240B0184 */ addiu $t3, $zero, 0x184 /* FA84 80034684 0040182D */ daddu $v1, $v0, $zero /* FA88 80034688 24420008 */ addiu $v0, $v0, 0x8 /* FA8C 8003468C AD220000 */ sw $v0, 0x0($t1) /* FA90 80034690 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* FA94 80034694 AC620000 */ sw $v0, 0x0($v1) /* FA98 80034698 3C028007 */ lui $v0, %hi(D_80077908) /* FA9C 8003469C 24427908 */ addiu $v0, $v0, %lo(D_80077908) /* FAA0 800346A0 AC620004 */ sw $v0, 0x4($v1) .L800346A4: /* FAA4 800346A4 3C080400 */ lui $t0, (0x4000400 >> 16) /* FAA8 800346A8 35080400 */ ori $t0, $t0, (0x4000400 & 0xFFFF) /* FAAC 800346AC 31870FFF */ andi $a3, $t4, 0xFFF /* FAB0 800346B0 258C0020 */ addiu $t4, $t4, 0x20 /* FAB4 800346B4 31660FFF */ andi $a2, $t3, 0xFFF /* FAB8 800346B8 256B0020 */ addiu $t3, $t3, 0x20 /* FABC 800346BC 000A2B00 */ sll $a1, $t2, 12 /* FAC0 800346C0 254A0001 */ addiu $t2, $t2, 0x1 /* FAC4 800346C4 00D03025 */ or $a2, $a2, $s0 /* FAC8 800346C8 8D230000 */ lw $v1, 0x0($t1) /* FACC 800346CC 8EA20000 */ lw $v0, 0x0($s5) /* FAD0 800346D0 0060202D */ daddu $a0, $v1, $zero /* FAD4 800346D4 24630008 */ addiu $v1, $v1, 0x8 /* FAD8 800346D8 00451021 */ addu $v0, $v0, $a1 /* FADC 800346DC AD230000 */ sw $v1, 0x0($t1) /* FAE0 800346E0 AC820004 */ sw $v0, 0x4($a0) /* FAE4 800346E4 24620008 */ addiu $v0, $v1, 0x8 /* FAE8 800346E8 AC990000 */ sw $t9, 0x0($a0) /* FAEC 800346EC AD220000 */ sw $v0, 0x0($t1) /* FAF0 800346F0 24620010 */ addiu $v0, $v1, 0x10 /* FAF4 800346F4 AC6D0000 */ sw $t5, 0x0($v1) /* FAF8 800346F8 AC740004 */ sw $s4, 0x4($v1) /* FAFC 800346FC AD220000 */ sw $v0, 0x0($t1) /* FB00 80034700 24620018 */ addiu $v0, $v1, 0x18 /* FB04 80034704 AC730008 */ sw $s3, 0x8($v1) /* FB08 80034708 AC60000C */ sw $zero, 0xC($v1) /* FB0C 8003470C AD220000 */ sw $v0, 0x0($t1) /* FB10 80034710 24620020 */ addiu $v0, $v1, 0x20 /* FB14 80034714 AC720010 */ sw $s2, 0x10($v1) /* FB18 80034718 AC780014 */ sw $t8, 0x14($v1) /* FB1C 8003471C AD220000 */ sw $v0, 0x0($t1) /* FB20 80034720 24620028 */ addiu $v0, $v1, 0x28 /* FB24 80034724 AC6E0018 */ sw $t6, 0x18($v1) /* FB28 80034728 AC60001C */ sw $zero, 0x1C($v1) /* FB2C 8003472C AD220000 */ sw $v0, 0x0($t1) /* FB30 80034730 24620030 */ addiu $v0, $v1, 0x30 /* FB34 80034734 AC6D0020 */ sw $t5, 0x20($v1) /* FB38 80034738 AC600024 */ sw $zero, 0x24($v1) /* FB3C 8003473C AD220000 */ sw $v0, 0x0($t1) /* FB40 80034740 24620038 */ addiu $v0, $v1, 0x38 /* FB44 80034744 AC710028 */ sw $s1, 0x28($v1) /* FB48 80034748 AC6F002C */ sw $t7, 0x2C($v1) /* FB4C 8003474C AD220000 */ sw $v0, 0x0($t1) /* FB50 80034750 3C020008 */ lui $v0, (0x80000 >> 16) /* FB54 80034754 00E23825 */ or $a3, $a3, $v0 /* FB58 80034758 24620040 */ addiu $v0, $v1, 0x40 /* FB5C 8003475C AC660030 */ sw $a2, 0x30($v1) /* FB60 80034760 AC670034 */ sw $a3, 0x34($v1) /* FB64 80034764 AD220000 */ sw $v0, 0x0($t1) /* FB68 80034768 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* FB6C 8003476C AC620038 */ sw $v0, 0x38($v1) /* FB70 80034770 24620048 */ addiu $v0, $v1, 0x48 /* FB74 80034774 AC60003C */ sw $zero, 0x3C($v1) /* FB78 80034778 AD220000 */ sw $v0, 0x0($t1) /* FB7C 8003477C 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* FB80 80034780 AC620040 */ sw $v0, 0x40($v1) /* FB84 80034784 24620050 */ addiu $v0, $v1, 0x50 /* FB88 80034788 AC680044 */ sw $t0, 0x44($v1) /* FB8C 8003478C AD220000 */ sw $v0, 0x0($t1) /* FB90 80034790 29420006 */ slti $v0, $t2, 0x6 /* FB94 80034794 AC6E0048 */ sw $t6, 0x48($v1) /* FB98 80034798 1440FFC2 */ bnez $v0, .L800346A4 /* FB9C 8003479C AC60004C */ sw $zero, 0x4C($v1) /* FBA0 800347A0 0800D248 */ j .L80034920 /* FBA4 800347A4 00000000 */ nop glabel .L800347A8 /* FBA8 800347A8 0000502D */ daddu $t2, $zero, $zero /* FBAC 800347AC 3C02800A */ lui $v0, %hi(gMainGfxPos) /* FBB0 800347B0 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* FBB4 800347B4 0040482D */ daddu $t1, $v0, $zero /* FBB8 800347B8 3C19FD10 */ lui $t9, (0xFD1000FF >> 16) /* FBBC 800347BC 373900FF */ ori $t9, $t9, (0xFD1000FF & 0xFFFF) /* FBC0 800347C0 3C15800A */ lui $s5, %hi(gLogosImage3) /* FBC4 800347C4 26B50914 */ addiu $s5, $s5, %lo(gLogosImage3) /* FBC8 800347C8 3C0DF510 */ lui $t5, (0xF5108000 >> 16) /* FBCC 800347CC 35AD8000 */ ori $t5, $t5, (0xF5108000 & 0xFFFF) /* FBD0 800347D0 3C140700 */ lui $s4, (0x7000000 >> 16) /* FBD4 800347D4 3C13E600 */ lui $s3, (0xE6000000 >> 16) /* FBD8 800347D8 3C12F400 */ lui $s2, (0xF4000000 >> 16) /* FBDC 800347DC 3C18073F */ lui $t8, (0x73FC01C >> 16) /* FBE0 800347E0 3718C01C */ ori $t8, $t8, (0x73FC01C & 0xFFFF) /* FBE4 800347E4 3C0EE700 */ lui $t6, (0xE7000000 >> 16) /* FBE8 800347E8 3C11F200 */ lui $s1, (0xF2000000 >> 16) /* FBEC 800347EC 3C0F003F */ lui $t7, (0x3FC01C >> 16) /* FBF0 800347F0 35EFC01C */ ori $t7, $t7, (0x3FC01C & 0xFFFF) /* FBF4 800347F4 3C10E448 */ lui $s0, (0xE4480000 >> 16) /* FBF8 800347F8 240C00EC */ addiu $t4, $zero, 0xEC /* FBFC 800347FC 8D220000 */ lw $v0, 0x0($t1) /* FC00 80034800 240B010C */ addiu $t3, $zero, 0x10C /* FC04 80034804 0040182D */ daddu $v1, $v0, $zero /* FC08 80034808 24420008 */ addiu $v0, $v0, 0x8 /* FC0C 8003480C AD220000 */ sw $v0, 0x0($t1) /* FC10 80034810 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* FC14 80034814 AC620000 */ sw $v0, 0x0($v1) /* FC18 80034818 3C028007 */ lui $v0, %hi(D_80077908) /* FC1C 8003481C 24427908 */ addiu $v0, $v0, %lo(D_80077908) /* FC20 80034820 AC620004 */ sw $v0, 0x4($v1) .L80034824: /* FC24 80034824 3C080400 */ lui $t0, (0x4000400 >> 16) /* FC28 80034828 35080400 */ ori $t0, $t0, (0x4000400 & 0xFFFF) /* FC2C 8003482C 31870FFF */ andi $a3, $t4, 0xFFF /* FC30 80034830 258C0020 */ addiu $t4, $t4, 0x20 /* FC34 80034834 31660FFF */ andi $a2, $t3, 0xFFF /* FC38 80034838 256B0020 */ addiu $t3, $t3, 0x20 /* FC3C 8003483C 000A2B00 */ sll $a1, $t2, 12 /* FC40 80034840 254A0001 */ addiu $t2, $t2, 0x1 /* FC44 80034844 00D03025 */ or $a2, $a2, $s0 /* FC48 80034848 8D230000 */ lw $v1, 0x0($t1) /* FC4C 8003484C 8EA20000 */ lw $v0, 0x0($s5) /* FC50 80034850 0060202D */ daddu $a0, $v1, $zero /* FC54 80034854 24630008 */ addiu $v1, $v1, 0x8 /* FC58 80034858 00451021 */ addu $v0, $v0, $a1 /* FC5C 8003485C AD230000 */ sw $v1, 0x0($t1) /* FC60 80034860 AC820004 */ sw $v0, 0x4($a0) /* FC64 80034864 24620008 */ addiu $v0, $v1, 0x8 /* FC68 80034868 AC990000 */ sw $t9, 0x0($a0) /* FC6C 8003486C AD220000 */ sw $v0, 0x0($t1) /* FC70 80034870 24620010 */ addiu $v0, $v1, 0x10 /* FC74 80034874 AC6D0000 */ sw $t5, 0x0($v1) /* FC78 80034878 AC740004 */ sw $s4, 0x4($v1) /* FC7C 8003487C AD220000 */ sw $v0, 0x0($t1) /* FC80 80034880 24620018 */ addiu $v0, $v1, 0x18 /* FC84 80034884 AC730008 */ sw $s3, 0x8($v1) /* FC88 80034888 AC60000C */ sw $zero, 0xC($v1) /* FC8C 8003488C AD220000 */ sw $v0, 0x0($t1) /* FC90 80034890 24620020 */ addiu $v0, $v1, 0x20 /* FC94 80034894 AC720010 */ sw $s2, 0x10($v1) /* FC98 80034898 AC780014 */ sw $t8, 0x14($v1) /* FC9C 8003489C AD220000 */ sw $v0, 0x0($t1) /* FCA0 800348A0 24620028 */ addiu $v0, $v1, 0x28 /* FCA4 800348A4 AC6E0018 */ sw $t6, 0x18($v1) /* FCA8 800348A8 AC60001C */ sw $zero, 0x1C($v1) /* FCAC 800348AC AD220000 */ sw $v0, 0x0($t1) /* FCB0 800348B0 24620030 */ addiu $v0, $v1, 0x30 /* FCB4 800348B4 AC6D0020 */ sw $t5, 0x20($v1) /* FCB8 800348B8 AC600024 */ sw $zero, 0x24($v1) /* FCBC 800348BC AD220000 */ sw $v0, 0x0($t1) /* FCC0 800348C0 24620038 */ addiu $v0, $v1, 0x38 /* FCC4 800348C4 AC710028 */ sw $s1, 0x28($v1) /* FCC8 800348C8 AC6F002C */ sw $t7, 0x2C($v1) /* FCCC 800348CC AD220000 */ sw $v0, 0x0($t1) /* FCD0 800348D0 3C020008 */ lui $v0, (0x80000 >> 16) /* FCD4 800348D4 00E23825 */ or $a3, $a3, $v0 /* FCD8 800348D8 24620040 */ addiu $v0, $v1, 0x40 /* FCDC 800348DC AC660030 */ sw $a2, 0x30($v1) /* FCE0 800348E0 AC670034 */ sw $a3, 0x34($v1) /* FCE4 800348E4 AD220000 */ sw $v0, 0x0($t1) /* FCE8 800348E8 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* FCEC 800348EC AC620038 */ sw $v0, 0x38($v1) /* FCF0 800348F0 24620048 */ addiu $v0, $v1, 0x48 /* FCF4 800348F4 AC60003C */ sw $zero, 0x3C($v1) /* FCF8 800348F8 AD220000 */ sw $v0, 0x0($t1) /* FCFC 800348FC 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* FD00 80034900 AC620040 */ sw $v0, 0x40($v1) /* FD04 80034904 24620050 */ addiu $v0, $v1, 0x50 /* FD08 80034908 AC680044 */ sw $t0, 0x44($v1) /* FD0C 8003490C AD220000 */ sw $v0, 0x0($t1) /* FD10 80034910 2942000E */ slti $v0, $t2, 0xE /* FD14 80034914 AC6E0048 */ sw $t6, 0x48($v1) /* FD18 80034918 1440FFC2 */ bnez $v0, .L80034824 /* FD1C 8003491C AC60004C */ sw $zero, 0x4C($v1) .L80034920: /* FD20 80034920 8FB50014 */ lw $s5, 0x14($sp) /* FD24 80034924 8FB40010 */ lw $s4, 0x10($sp) /* FD28 80034928 8FB3000C */ lw $s3, 0xC($sp) /* FD2C 8003492C 8FB20008 */ lw $s2, 0x8($sp) /* FD30 80034930 8FB10004 */ lw $s1, 0x4($sp) /* FD34 80034934 8FB00000 */ lw $s0, 0x0($sp) /* FD38 80034938 03E00008 */ jr $ra /* FD3C 8003493C 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void appendGfx_intro_logos(void) { s32 i; gDPPipeSync(gMainGfxPos++); gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB); gDPSetCycleType(gMainGfxPos++, G_CYC_FILL); gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(224, 224, 224, 1)); gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); gDPPipeSync(gMainGfxPos++); switch (gGameStatusPtr->introState) { case INTRO_STATE_0: case INTRO_STATE_1: case INTRO_STATE_2: gSPDisplayList(gMainGfxPos++, D_80077908); for (i = 0; i < 7; i++) { gDPLoadTextureTile(gMainGfxPos++, gLogosImage1 + i * 0x1000, G_IM_FMT_RGBA, G_IM_SIZ_16b, 128, 112, 0, 0, 127, 15, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(gMainGfxPos++, 96 * 4, (64 + i * 16) * 4, 224 * 4, (80 + i * 16) * 4, G_TX_RENDERTILE, 0, 0, 1024, 1024); gDPPipeSync(gMainGfxPos++); } break; case INTRO_STATE_3: case INTRO_STATE_4: case INTRO_STATE_5: #if VERSION_JP break; case INTRO_STATE_6: case INTRO_STATE_7: case INTRO_STATE_8: case INTRO_STATE_9: #endif gSPDisplayList(gMainGfxPos++, D_80077908); for (i = 0; i < 6; i++) { gDPLoadTextureTile(gMainGfxPos++, gLogosImage2 + i * 0x1000, G_IM_FMT_RGBA, G_IM_SIZ_16b, 256, 48, 0, 0, 255, 7, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle( gMainGfxPos++, 32 * 4, (LOGO_1_Y + i * 8) * 4, 288 * 4, (LOGO_1_Y + 8 + i * 8) * 4, G_TX_RENDERTILE, 0, 0, 1024, 1024); gDPPipeSync(gMainGfxPos++); } #if !VERSION_JP break; case INTRO_STATE_6: case INTRO_STATE_7: case INTRO_STATE_8: case INTRO_STATE_9: gSPDisplayList(gMainGfxPos++, D_80077908); #endif for (i = 0; i < 14; i++) { gDPLoadTextureTile(gMainGfxPos++, gLogosImage3 + i * 0x1000, G_IM_FMT_RGBA, G_IM_SIZ_16b, 256, 112, 0, 0, 255, 7, 0, G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(gMainGfxPos++, 32 * 4, (LOGO_2_Y + i * 8) * 4, 288 * 4, (LOGO_2_Y + 8 + i * 8) * 4, G_TX_RENDERTILE, 0, 0, 1024, 1024); gDPPipeSync(gMainGfxPos++); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80248660 /* 176F40 80248660 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 176F44 80248664 3C058011 */ lui $a1, %hi(gPlayerData) .L80248668: /* 176F48 80248668 24A5F290 */ addiu $a1, $a1, %lo(gPlayerData) .L8024866C: /* 176F4C 8024866C AFB3001C */ sw $s3, 0x1C($sp) /* 176F50 80248670 3C13800E */ lui $s3, %hi(gBattleStatus) .L80248674: /* 176F54 80248674 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus) .L80248678: /* 176F58 80248678 AFBF0024 */ sw $ra, 0x24($sp) /* 176F5C 8024867C AFB40020 */ sw $s4, 0x20($sp) .L80248680: /* 176F60 80248680 AFB20018 */ sw $s2, 0x18($sp) /* 176F64 80248684 AFB10014 */ sw $s1, 0x14($sp) /* 176F68 80248688 AFB00010 */ sw $s0, 0x10($sp) .L8024868C: /* 176F6C 8024868C 8E7200D8 */ lw $s2, 0xD8($s3) /* 176F70 80248690 3C03800E */ lui $v1, %hi(gBattleSubState) /* 176F74 80248694 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) /* 176F78 80248698 8E7100DC */ lw $s1, 0xDC($s3) /* 176F7C 8024869C 10600005 */ beqz $v1, .L802486B4 /* 176F80 802486A0 24020002 */ addiu $v0, $zero, 0x2 /* 176F84 802486A4 1062008A */ beq $v1, $v0, .L802488D0 .L802486A8: /* 176F88 802486A8 00000000 */ nop /* 176F8C 802486AC 080922A1 */ j .L80248A84 .L802486B0: /* 176F90 802486B0 00000000 */ nop .L802486B4: /* 176F94 802486B4 94A2029E */ lhu $v0, 0x29E($a1) /* 176F98 802486B8 3C04F7FF */ lui $a0, (0xF7FFFFFF >> 16) /* 176F9C 802486BC A260008C */ sb $zero, 0x8C($s3) /* 176FA0 802486C0 A6600180 */ sh $zero, 0x180($s3) /* 176FA4 802486C4 A260019A */ sb $zero, 0x19A($s3) /* 176FA8 802486C8 24420001 */ addiu $v0, $v0, 0x1 /* 176FAC 802486CC A4A2029E */ sh $v0, 0x29E($a1) /* 176FB0 802486D0 8E620000 */ lw $v0, 0x0($s3) /* 176FB4 802486D4 2403FFFD */ addiu $v1, $zero, -0x3 /* 176FB8 802486D8 00431024 */ and $v0, $v0, $v1 /* 176FBC 802486DC AE620000 */ sw $v0, 0x0($s3) /* 176FC0 802486E0 8E420000 */ lw $v0, 0x0($s2) /* 176FC4 802486E4 3484FFFF */ ori $a0, $a0, (0xF7FFFFFF & 0xFFFF) .L802486E8: /* 176FC8 802486E8 3C01802A */ lui $at, %hi(D_8029F254) /* 176FCC 802486EC AC20F254 */ sw $zero, %lo(D_8029F254)($at) /* 176FD0 802486F0 00441024 */ and $v0, $v0, $a0 /* 176FD4 802486F4 12200004 */ beqz $s1, .L80248708 /* 176FD8 802486F8 AE420000 */ sw $v0, 0x0($s2) .L802486FC: /* 176FDC 802486FC 8E220000 */ lw $v0, 0x0($s1) /* 176FE0 80248700 00441024 */ and $v0, $v0, $a0 /* 176FE4 80248704 AE220000 */ sw $v0, 0x0($s1) .L80248708: /* 176FE8 80248708 3C030100 */ lui $v1, (0x1004000 >> 16) /* 176FEC 8024870C 34634000 */ ori $v1, $v1, (0x1004000 & 0xFFFF) /* 176FF0 80248710 0000502D */ daddu $t2, $zero, $zero D_80248714: /* 176FF4 80248714 0140882D */ daddu $s1, $t2, $zero /* 176FF8 80248718 0260282D */ daddu $a1, $s3, $zero /* 176FFC 8024871C 8E620004 */ lw $v0, 0x4($s3) D_80248720: /* 177000 80248720 0260202D */ daddu $a0, $s3, $zero /* 177004 80248724 00431025 */ or $v0, $v0, $v1 /* 177008 80248728 AE620004 */ sw $v0, 0x4($s3) .L8024872C: /* 17700C 8024872C 8CB000E0 */ lw $s0, 0xE0($a1) /* 177010 80248730 52000006 */ beql $s0, $zero, .L8024874C /* 177014 80248734 26310001 */ addiu $s1, $s1, 0x1 .L80248738: /* 177018 80248738 36220200 */ ori $v0, $s1, 0x200 /* 17701C 8024873C A4820140 */ sh $v0, 0x140($a0) /* 177020 80248740 24840002 */ addiu $a0, $a0, 0x2 /* 177024 80248744 254A0001 */ addiu $t2, $t2, 0x1 /* 177028 80248748 26310001 */ addiu $s1, $s1, 0x1 .L8024874C: /* 17702C 8024874C 2A220018 */ slti $v0, $s1, 0x18 /* 177030 80248750 1440FFF6 */ bnez $v0, .L8024872C D_80248754: /* 177034 80248754 24A50004 */ addiu $a1, $a1, 0x4 /* 177038 80248758 A26A0171 */ sb $t2, 0x171($s3) /* 17703C 8024875C 0000882D */ daddu $s1, $zero, $zero D_80248760_jan_02: /* 177040 80248760 2542FFFF */ addiu $v0, $t2, -0x1 /* 177044 80248764 18400022 */ blez $v0, .L802487F0 D_80248768_DCCB38: /* 177048 80248768 266C0140 */ addiu $t4, $s3, 0x140 /* 17704C 8024876C 0040682D */ daddu $t5, $v0, $zero jtbl_80248770: /* 177050 80248770 0180582D */ daddu $t3, $t4, $zero .L80248774: /* 177054 80248774 26270001 */ addiu $a3, $s1, 0x1 D_80248778: /* 177058 80248778 00EA102A */ slt $v0, $a3, $t2 D_8024877C: /* 17705C 8024877C 50400019 */ beql $v0, $zero, .L802487E4 D_80248780: /* 177060 80248780 26310001 */ addiu $s1, $s1, 0x1 D_80248784: /* 177064 80248784 0160482D */ daddu $t1, $t3, $zero D_80248788: /* 177068 80248788 00071040 */ sll $v0, $a3, 1 /* 17706C 8024878C 004C3021 */ addu $a2, $v0, $t4 .L80248790: /* 177070 80248790 95280000 */ lhu $t0, 0x0($t1) /* 177074 80248794 94C50000 */ lhu $a1, 0x0($a2) /* 177078 80248798 310300FF */ andi $v1, $t0, 0xFF D_8024879C: /* 17707C 8024879C 00031880 */ sll $v1, $v1, 2 /* 177080 802487A0 02631821 */ addu $v1, $s3, $v1 /* 177084 802487A4 30A200FF */ andi $v0, $a1, 0xFF /* 177088 802487A8 00021080 */ sll $v0, $v0, 2 /* 17708C 802487AC 02621021 */ addu $v0, $s3, $v0 /* 177090 802487B0 8C6300E0 */ lw $v1, 0xE0($v1) /* 177094 802487B4 8C4400E0 */ lw $a0, 0xE0($v0) /* 177098 802487B8 806201F1 */ lb $v0, 0x1F1($v1) /* 17709C 802487BC 808301F1 */ lb $v1, 0x1F1($a0) /* 1770A0 802487C0 0043102A */ slt $v0, $v0, $v1 /* 1770A4 802487C4 10400003 */ beqz $v0, .L802487D4 /* 1770A8 802487C8 24E70001 */ addiu $a3, $a3, 0x1 /* 1770AC 802487CC A5250000 */ sh $a1, 0x0($t1) /* 1770B0 802487D0 A4C80000 */ sh $t0, 0x0($a2) .L802487D4: /* 1770B4 802487D4 00EA102A */ slt $v0, $a3, $t2 /* 1770B8 802487D8 1440FFED */ bnez $v0, .L80248790 /* 1770BC 802487DC 24C60002 */ addiu $a2, $a2, 0x2 /* 1770C0 802487E0 26310001 */ addiu $s1, $s1, 0x1 .L802487E4: /* 1770C4 802487E4 022D102A */ slt $v0, $s1, $t5 /* 1770C8 802487E8 1440FFE2 */ bnez $v0, .L80248774 /* 1770CC 802487EC 256B0002 */ addiu $t3, $t3, 0x2 .L802487F0: /* 1770D0 802487F0 A2600170 */ sb $zero, 0x170($s3) .L802487F4: /* 1770D4 802487F4 0000282D */ daddu $a1, $zero, $zero /* 1770D8 802487F8 3C030020 */ lui $v1, (0x204000 >> 16) /* 1770DC 802487FC 34634000 */ ori $v1, $v1, (0x204000 & 0xFFFF) .L80248800: /* 1770E0 80248800 00051040 */ sll $v0, $a1, 1 .L80248804: /* 1770E4 80248804 02621021 */ addu $v0, $s3, $v0 /* 1770E8 80248808 90420141 */ lbu $v0, 0x141($v0) /* 1770EC 8024880C 00021080 */ sll $v0, $v0, 2 /* 1770F0 80248810 02621021 */ addu $v0, $s3, $v0 /* 1770F4 80248814 8C5000E0 */ lw $s0, 0xE0($v0) D_80248818: /* 1770F8 80248818 12000005 */ beqz $s0, .L80248830 .L8024881C: /* 1770FC 8024881C 00000000 */ nop /* 177100 80248820 8E020000 */ lw $v0, 0x0($s0) /* 177104 80248824 00431024 */ and $v0, $v0, $v1 /* 177108 80248828 10400008 */ beqz $v0, D_8024884C .L8024882C: /* 17710C 8024882C 00051040 */ sll $v0, $a1, 1 .L80248830: /* 177110 80248830 82620171 */ lb $v0, 0x171($s3) /* 177114 80248834 24A50001 */ addiu $a1, $a1, 0x1 /* 177118 80248838 00A2102A */ slt $v0, $a1, $v0 /* 17711C 8024883C 5040FFF0 */ beql $v0, $zero, .L80248800 /* 177120 80248840 0000282D */ daddu $a1, $zero, $zero /* 177124 80248844 08092201 */ j .L80248804 .L80248848: /* 177128 80248848 00051040 */ sll $v0, $a1, 1 D_8024884C: /* 17712C 8024884C 02621021 */ addu $v0, $s3, $v0 D_80248850: /* 177130 80248850 94430140 */ lhu $v1, 0x140($v0) /* 177134 80248854 82620171 */ lb $v0, 0x171($s3) /* 177138 80248858 24A50001 */ addiu $a1, $a1, 0x1 /* 17713C 8024885C AE700174 */ sw $s0, 0x174($s3) D_80248860: /* 177140 80248860 00A2102A */ slt $v0, $a1, $v0 D_80248864: /* 177144 80248864 14400002 */ bnez $v0, .L80248870 D_80248868: /* 177148 80248868 A6630172 */ sh $v1, 0x172($s3) /* 17714C 8024886C 0000282D */ daddu $a1, $zero, $zero .L80248870: /* 177150 80248870 86640172 */ lh $a0, 0x172($s3) /* 177154 80248874 0C09390F */ jal func_8024E43C D_80248878: /* 177158 80248878 A2650170 */ sb $a1, 0x170($s3) /* 17715C 8024887C 8E700174 */ lw $s0, 0x174($s3) /* 177160 80248880 0C098F18 */ jal reset_actor_turn_info /* 177164 80248884 00000000 */ nop /* 177168 80248888 24020001 */ addiu $v0, $zero, 0x1 /* 17716C 8024888C 2405000A */ addiu $a1, $zero, 0xA .L80248890: /* 177170 80248890 A26201A7 */ sb $v0, 0x1A7($s3) /* 177174 80248894 8E0401C4 */ lw $a0, 0x1C4($s0) /* 177178 80248898 0C0B0CF8 */ jal start_script /* 17717C 8024889C 0000302D */ daddu $a2, $zero, $zero /* 177180 802488A0 AE0201D4 */ sw $v0, 0x1D4($s0) /* 177184 802488A4 8C440144 */ lw $a0, 0x144($v0) D_802488A8: /* 177188 802488A8 24030003 */ addiu $v1, $zero, 0x3 /* 17718C 802488AC 3C01802A */ lui $at, %hi(D_8029F248) /* 177190 802488B0 AC23F248 */ sw $v1, %lo(D_8029F248)($at) /* 177194 802488B4 AE0401E4 */ sw $a0, 0x1E4($s0) D_802488B8: /* 177198 802488B8 86640172 */ lh $a0, 0x172($s3) .L802488BC: /* 17719C 802488BC 24030002 */ addiu $v1, $zero, 0x2 .L802488C0: /* 1771A0 802488C0 3C01800E */ lui $at, %hi(gBattleSubState) /* 1771A4 802488C4 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at) .L802488C8: /* 1771A8 802488C8 080922A1 */ j .L80248A84 D_802488CC: /* 1771AC 802488CC AC440148 */ sw $a0, 0x148($v0) .L802488D0: /* 1771B0 802488D0 3C03802A */ lui $v1, %hi(D_8029F248) /* 1771B4 802488D4 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) /* 1771B8 802488D8 8C620000 */ lw $v0, 0x0($v1) /* 1771BC 802488DC 10400003 */ beqz $v0, .L802488EC /* 1771C0 802488E0 2442FFFF */ addiu $v0, $v0, -0x1 /* 1771C4 802488E4 0809223E */ j .L802488F8 /* 1771C8 802488E8 AC620000 */ sw $v0, 0x0($v1) .L802488EC: /* 1771CC 802488EC 24020001 */ addiu $v0, $zero, 0x1 /* 1771D0 802488F0 3C01802A */ lui $at, %hi(D_8029F254) /* 1771D4 802488F4 AC22F254 */ sw $v0, %lo(D_8029F254)($at) .L802488F8: /* 1771D8 802488F8 8E700174 */ lw $s0, 0x174($s3) /* 1771DC 802488FC 8E0201D4 */ lw $v0, 0x1D4($s0) .L80248900: /* 1771E0 80248900 50400007 */ beql $v0, $zero, .L80248920 .L80248904: /* 1771E4 80248904 AE0001D4 */ sw $zero, 0x1D4($s0) /* 1771E8 80248908 8E0401E4 */ lw $a0, 0x1E4($s0) /* 1771EC 8024890C 0C0B1059 */ jal does_script_exist D_80248910: /* 1771F0 80248910 00000000 */ nop /* 1771F4 80248914 1440005B */ bnez $v0, .L80248A84 /* 1771F8 80248918 00000000 */ nop D_8024891C: /* 1771FC 8024891C AE0001D4 */ sw $zero, 0x1D4($s0) .L80248920: /* 177200 80248920 8E4201D8 */ lw $v0, 0x1D8($s2) jan_02_Quizmo_Worker: /* 177204 80248924 10400005 */ beqz $v0, .L8024893C .L80248928: /* 177208 80248928 00000000 */ nop /* 17720C 8024892C 0C0B1059 */ jal does_script_exist .L80248930: /* 177210 80248930 8E4401E8 */ lw $a0, 0x1E8($s2) /* 177214 80248934 14400053 */ bnez $v0, .L80248A84 jan_02_Quizmo_AnswerResult: /* 177218 80248938 00000000 */ nop .L8024893C: /* 17721C 8024893C 1220000A */ beqz $s1, .L80248968 jan_02_Quizmo_StageEffect: /* 177220 80248940 AE4001D8 */ sw $zero, 0x1D8($s2) jan_02_Quizmo_AudienceEffect: /* 177224 80248944 8E2201D8 */ lw $v0, 0x1D8($s1) jan_02_Quizmo_VannaTEffect: /* 177228 80248948 50400007 */ beql $v0, $zero, .L80248968 /* 17722C 8024894C AE2001D8 */ sw $zero, 0x1D8($s1) /* 177230 80248950 8E2401E8 */ lw $a0, 0x1E8($s1) /* 177234 80248954 0C0B1059 */ jal does_script_exist /* 177238 80248958 00000000 */ nop /* 17723C 8024895C 14400049 */ bnez $v0, .L80248A84 /* 177240 80248960 00000000 */ nop .L80248964: /* 177244 80248964 AE2001D8 */ sw $zero, 0x1D8($s1) .L80248968: /* 177248 80248968 0000A02D */ daddu $s4, $zero, $zero .L8024896C: /* 17724C 8024896C 0280882D */ daddu $s1, $s4, $zero D_80248970: /* 177250 80248970 0260902D */ daddu $s2, $s3, $zero .L80248974: /* 177254 80248974 8E5000E0 */ lw $s0, 0xE0($s2) D_80248978: /* 177258 80248978 5200000B */ beql $s0, $zero, .L802489A8 /* 17725C 8024897C 26310001 */ addiu $s1, $s1, 0x1 D_80248980: /* 177260 80248980 8E0201D4 */ lw $v0, 0x1D4($s0) .L80248984: /* 177264 80248984 50400008 */ beql $v0, $zero, .L802489A8 /* 177268 80248988 26310001 */ addiu $s1, $s1, 0x1 /* 17726C 8024898C 8E0401E4 */ lw $a0, 0x1E4($s0) /* 177270 80248990 0C0B1059 */ jal does_script_exist .L80248994: /* 177274 80248994 00000000 */ nop /* 177278 80248998 50400002 */ beql $v0, $zero, .L802489A4 /* 17727C 8024899C AE0001D4 */ sw $zero, 0x1D4($s0) D_802489A0: /* 177280 802489A0 24140001 */ addiu $s4, $zero, 0x1 .L802489A4: /* 177284 802489A4 26310001 */ addiu $s1, $s1, 0x1 .L802489A8: /* 177288 802489A8 2A220018 */ slti $v0, $s1, 0x18 /* 17728C 802489AC 1440FFF1 */ bnez $v0, .L80248974 /* 177290 802489B0 26520004 */ addiu $s2, $s2, 0x4 /* 177294 802489B4 16800033 */ bnez $s4, .L80248A84 /* 177298 802489B8 0000882D */ daddu $s1, $zero, $zero /* 17729C 802489BC 0260902D */ daddu $s2, $s3, $zero .L802489C0: /* 1772A0 802489C0 8E5000E0 */ lw $s0, 0xE0($s2) /* 1772A4 802489C4 5200000B */ beql $s0, $zero, .L802489F4 .L802489C8: /* 1772A8 802489C8 26310001 */ addiu $s1, $s1, 0x1 /* 1772AC 802489CC 8E0201D8 */ lw $v0, 0x1D8($s0) D_802489D0: /* 1772B0 802489D0 50400008 */ beql $v0, $zero, .L802489F4 /* 1772B4 802489D4 26310001 */ addiu $s1, $s1, 0x1 .L802489D8: /* 1772B8 802489D8 8E0401E8 */ lw $a0, 0x1E8($s0) .L802489DC: /* 1772BC 802489DC 0C0B1059 */ jal does_script_exist /* 1772C0 802489E0 00000000 */ nop /* 1772C4 802489E4 50400002 */ beql $v0, $zero, .L802489F0 /* 1772C8 802489E8 AE0001D8 */ sw $zero, 0x1D8($s0) /* 1772CC 802489EC 24140001 */ addiu $s4, $zero, 0x1 .L802489F0: /* 1772D0 802489F0 26310001 */ addiu $s1, $s1, 0x1 .L802489F4: /* 1772D4 802489F4 2A220018 */ slti $v0, $s1, 0x18 /* 1772D8 802489F8 1440FFF1 */ bnez $v0, .L802489C0 .L802489FC: /* 1772DC 802489FC 26520004 */ addiu $s2, $s2, 0x4 /* 1772E0 80248A00 16800020 */ bnez $s4, .L80248A84 /* 1772E4 80248A04 0000882D */ daddu $s1, $zero, $zero /* 1772E8 80248A08 3C06FFF7 */ lui $a2, (0xFFF7FFFF >> 16) /* 1772EC 80248A0C 34C6FFFF */ ori $a2, $a2, (0xFFF7FFFF & 0xFFFF) /* 1772F0 80248A10 0260282D */ daddu $a1, $s3, $zero /* 1772F4 80248A14 3C02800E */ lui $v0, %hi(gBattleStatus) D_80248A18: /* 1772F8 80248A18 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1772FC 80248A1C 8C430004 */ lw $v1, 0x4($v0) /* 177300 80248A20 2404BFFF */ addiu $a0, $zero, -0x4001 /* 177304 80248A24 00641824 */ and $v1, $v1, $a0 /* 177308 80248A28 AC430004 */ sw $v1, 0x4($v0) .L80248A2C: /* 17730C 80248A2C 8CB000E0 */ lw $s0, 0xE0($a1) /* 177310 80248A30 12000004 */ beqz $s0, .L80248A44 D_80248A34: /* 177314 80248A34 26310001 */ addiu $s1, $s1, 0x1 /* 177318 80248A38 8E020000 */ lw $v0, 0x0($s0) /* 17731C 80248A3C 00461024 */ and $v0, $v0, $a2 /* 177320 80248A40 AE020000 */ sw $v0, 0x0($s0) .L80248A44: /* 177324 80248A44 2A220018 */ slti $v0, $s1, 0x18 .L80248A48: /* 177328 80248A48 1440FFF8 */ bnez $v0, .L80248A2C .L80248A4C: /* 17732C 80248A4C 24A50004 */ addiu $a1, $a1, 0x4 D_80248A50: /* 177330 80248A50 8262008C */ lb $v0, 0x8C($s3) /* 177334 80248A54 1440000B */ bnez $v0, .L80248A84 /* 177338 80248A58 00000000 */ nop .L80248A5C: /* 17733C 80248A5C 0C098D19 */ jal btl_check_player_defeated /* 177340 80248A60 00000000 */ nop /* 177344 80248A64 14400007 */ bnez $v0, .L80248A84 D_80248A68: /* 177348 80248A68 00000000 */ nop /* 17734C 80248A6C 0C098D0D */ jal btl_check_enemies_defeated /* 177350 80248A70 00000000 */ nop /* 177354 80248A74 14400003 */ bnez $v0, .L80248A84 /* 177358 80248A78 00000000 */ nop /* 17735C 80248A7C 0C090464 */ jal func_80241190 glabel func_80248A80 /* 177360 80248A80 24040005 */ addiu $a0, $zero, 0x5 .L80248A84: /* 177364 80248A84 8FBF0024 */ lw $ra, 0x24($sp) .L80248A88: /* 177368 80248A88 8FB40020 */ lw $s4, 0x20($sp) /* 17736C 80248A8C 8FB3001C */ lw $s3, 0x1C($sp) /* 177370 80248A90 8FB20018 */ lw $s2, 0x18($sp) /* 177374 80248A94 8FB10014 */ lw $s1, 0x14($sp) D_80248A98: /* 177378 80248A98 8FB00010 */ lw $s0, 0x10($sp) .L80248A9C: /* 17737C 80248A9C 03E00008 */ jr $ra D_80248AA0: /* 177380 80248AA0 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_enemy_striking_first(void) { PlayerData* playerData = &gPlayerData; BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; Evt* script; Actor* actor; u16* enemyIDs; s16 activeEnemyActorID; s32 nextEnemyIdx; s32 count; s32 flags; s32 cond; s32 i; s32 j; switch (gBattleSubState) { case BTL_SUBSTATE_ENEMY_FIRST_STRIKE_INIT: battleStatus->stateFreezeCount = 0; battleStatus->lastAttackDamage = 0; battleStatus->currentDamageSource = DMG_SRC_DEFAULT; playerData->enemyFirstStrikes++; battleStatus->flags1 &= ~BS_FLAGS1_MENU_OPEN; D_8029F254 = 0; player->flags &= ~ACTOR_FLAG_8000000; if (partner != NULL) { partner->flags &= ~ACTOR_FLAG_8000000; } battleStatus->flags2 |= BS_FLAGS2_1000000; battleStatus->flags2 |= BS_FLAGS2_4000; count = 0; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { actor = battleStatus->enemyActors[i]; if (actor != NULL) { battleStatus->enemyIDs[count] = i | ACTOR_ENEMY0; count++; } } battleStatus->numEnemyActors = count; enemyIDs = battleStatus->enemyIDs; for (i = 0; i < count - 1; i++) { for (j = i + 1; j < count; j++) { s32 iVal = enemyIDs[i]; s32 jVal = enemyIDs[j]; if (battleStatus->enemyActors[iVal & 0xFF]->turnPriority < battleStatus->enemyActors[jVal & 0xFF]->turnPriority) { enemyIDs[i] = jVal; enemyIDs[j] = iVal; } } } battleStatus->nextEnemyIndex = 0; nextEnemyIdx = 0; flags = ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_TARGET_ONLY; while (TRUE) { actor = battleStatus->enemyActors[battleStatus->enemyIDs[nextEnemyIdx] & 0xFF]; if (actor == NULL || (actor->flags & flags)) { nextEnemyIdx++; if (nextEnemyIdx >= battleStatus->numEnemyActors) { nextEnemyIdx = 0; } } else { break; } } activeEnemyActorID = battleStatus->enemyIDs[nextEnemyIdx]; nextEnemyIdx++; battleStatus->currentTurnEnemy = actor; battleStatus->activeEnemyActorID = activeEnemyActorID; if (nextEnemyIdx >= battleStatus->numEnemyActors) { nextEnemyIdx = 0; } battleStatus->nextEnemyIndex = nextEnemyIdx; btl_cam_target_actor(battleStatus->activeEnemyActorID); actor = battleStatus->currentTurnEnemy; reset_actor_turn_info(); battleStatus->battlePhase = PHASE_FIRST_STRIKE; script = start_script(actor->takeTurnSource, EVT_PRIORITY_A, 0); actor->takeTurnScript = script; D_8029F248 = 3; actor->takeTurnScriptID = script->id; gBattleSubState = BTL_SUBSTATE_ENEMY_FIRST_STRIKE_AWAIT_SCRIPTS; script->owner1.actorID = battleStatus->activeEnemyActorID; break; case BTL_SUBSTATE_ENEMY_FIRST_STRIKE_AWAIT_SCRIPTS: if (D_8029F248 != 0) { D_8029F248--; } else { D_8029F254 = 1; } actor = battleStatus->currentTurnEnemy; if (actor->takeTurnScript == NULL || !does_script_exist(actor->takeTurnScriptID)) { actor->takeTurnScript = NULL; 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; } else { return; } } cond = 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)) { cond = TRUE; } else { actor->takeTurnScript = NULL; } } } if (!cond) { 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) { gBattleStatus.flags2 &= ~BS_FLAGS2_4000; 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) { if (btl_check_player_defeated() || btl_check_enemies_defeated()) { return; } btl_set_state(BATTLE_STATE_BEGIN_TURN); } } } } } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_animator_node /* B6154 8011FA54 27BDFFC0 */ addiu $sp, $sp, -0x40 /* B6158 8011FA58 AFB60030 */ sw $s6, 0x30($sp) /* B615C 8011FA5C 00A0B02D */ daddu $s6, $a1, $zero /* B6160 8011FA60 AFBF003C */ sw $ra, 0x3C($sp) /* B6164 8011FA64 AFBE0038 */ sw $fp, 0x38($sp) /* B6168 8011FA68 AFB70034 */ sw $s7, 0x34($sp) /* B616C 8011FA6C AFB5002C */ sw $s5, 0x2C($sp) /* B6170 8011FA70 AFB40028 */ sw $s4, 0x28($sp) /* B6174 8011FA74 AFB30024 */ sw $s3, 0x24($sp) /* B6178 8011FA78 AFB20020 */ sw $s2, 0x20($sp) /* B617C 8011FA7C AFB1001C */ sw $s1, 0x1C($sp) /* B6180 8011FA80 AFB00018 */ sw $s0, 0x18($sp) /* B6184 8011FA84 AFA40040 */ sw $a0, 0x40($sp) /* B6188 8011FA88 96C200F4 */ lhu $v0, 0xF4($s6) /* B618C 8011FA8C 30420080 */ andi $v0, $v0, 0x80 /* B6190 8011FA90 10400015 */ beqz $v0, .L8011FAE8 /* B6194 8011FA94 00C0982D */ daddu $s3, $a2, $zero /* B6198 8011FA98 0000882D */ daddu $s1, $zero, $zero /* B619C 8011FA9C 26D200B4 */ addiu $s2, $s6, 0xB4 /* B61A0 8011FAA0 02C0802D */ daddu $s0, $s6, $zero .L8011FAA4: /* B61A4 8011FAA4 8E020004 */ lw $v0, 0x4($s0) /* B61A8 8011FAA8 5040000A */ beql $v0, $zero, .L8011FAD4 /* B61AC 8011FAAC 26310001 */ addiu $s1, $s1, 0x1 /* B61B0 8011FAB0 0240202D */ daddu $a0, $s2, $zero /* B61B4 8011FAB4 0260282D */ daddu $a1, $s3, $zero /* B61B8 8011FAB8 0C019D80 */ jal guMtxCatF /* B61BC 8011FABC 0240302D */ daddu $a2, $s2, $zero /* B61C0 8011FAC0 8FA40040 */ lw $a0, 0x40($sp) /* B61C4 8011FAC4 8E050004 */ lw $a1, 0x4($s0) /* B61C8 8011FAC8 0C047E95 */ jal appendGfx_animator_node /* B61CC 8011FACC 0240302D */ daddu $a2, $s2, $zero /* B61D0 8011FAD0 26310001 */ addiu $s1, $s1, 0x1 .L8011FAD4: /* B61D4 8011FAD4 2A220020 */ slti $v0, $s1, 0x20 /* B61D8 8011FAD8 1440FFF2 */ bnez $v0, .L8011FAA4 /* B61DC 8011FADC 26100004 */ addiu $s0, $s0, 0x4 /* B61E0 8011FAE0 08047FD1 */ j .L8011FF44 /* B61E4 8011FAE4 00000000 */ nop .L8011FAE8: /* B61E8 8011FAE8 26D000B4 */ addiu $s0, $s6, 0xB4 /* B61EC 8011FAEC 0200202D */ daddu $a0, $s0, $zero /* B61F0 8011FAF0 0260282D */ daddu $a1, $s3, $zero /* B61F4 8011FAF4 0C019D80 */ jal guMtxCatF /* B61F8 8011FAF8 0200302D */ daddu $a2, $s0, $zero /* B61FC 8011FAFC 3C120001 */ lui $s2, (0x11630 >> 16) /* B6200 8011FB00 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* B6204 8011FB04 0200202D */ daddu $a0, $s0, $zero /* B6208 8011FB08 3C108007 */ lui $s0, %hi(gMatrixListPos) /* B620C 8011FB0C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* B6210 8011FB10 3C11800A */ lui $s1, %hi(gDisplayContext) /* B6214 8011FB14 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* B6218 8011FB18 96050000 */ lhu $a1, 0x0($s0) /* B621C 8011FB1C 8E220000 */ lw $v0, 0x0($s1) /* B6220 8011FB20 00052980 */ sll $a1, $a1, 6 /* B6224 8011FB24 00B22821 */ addu $a1, $a1, $s2 /* B6228 8011FB28 0C019D40 */ jal guMtxF2L /* B622C 8011FB2C 00452821 */ addu $a1, $v0, $a1 /* B6230 8011FB30 3C03DA38 */ lui $v1, (0xDA380003 >> 16) /* B6234 8011FB34 34630003 */ ori $v1, $v1, (0xDA380003 & 0xFFFF) /* B6238 8011FB38 3C05E300 */ lui $a1, (0xE3000F00 >> 16) /* B623C 8011FB3C 34A50F00 */ ori $a1, $a1, (0xE3000F00 & 0xFFFF) /* B6240 8011FB40 3C06E300 */ lui $a2, (0xE3001001 >> 16) /* B6244 8011FB44 34C61001 */ ori $a2, $a2, (0xE3001001 & 0xFFFF) /* B6248 8011FB48 3C07D9FD */ lui $a3, (0xD9FDFFFF >> 16) /* B624C 8011FB4C 3C09800A */ lui $t1, %hi(gMainGfxPos) /* B6250 8011FB50 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos) /* B6254 8011FB54 34E7FFFF */ ori $a3, $a3, (0xD9FDFFFF & 0xFFFF) /* B6258 8011FB58 8D280000 */ lw $t0, 0x0($t1) /* B625C 8011FB5C 96020000 */ lhu $v0, 0x0($s0) /* B6260 8011FB60 0100202D */ daddu $a0, $t0, $zero /* B6264 8011FB64 25080008 */ addiu $t0, $t0, 0x8 /* B6268 8011FB68 AD280000 */ sw $t0, 0x0($t1) /* B626C 8011FB6C AC830000 */ sw $v1, 0x0($a0) /* B6270 8011FB70 24430001 */ addiu $v1, $v0, 0x1 /* B6274 8011FB74 3042FFFF */ andi $v0, $v0, 0xFFFF /* B6278 8011FB78 00021180 */ sll $v0, $v0, 6 /* B627C 8011FB7C A6030000 */ sh $v1, 0x0($s0) /* B6280 8011FB80 8E230000 */ lw $v1, 0x0($s1) /* B6284 8011FB84 00521021 */ addu $v0, $v0, $s2 /* B6288 8011FB88 00621821 */ addu $v1, $v1, $v0 /* B628C 8011FB8C 25020008 */ addiu $v0, $t0, 0x8 /* B6290 8011FB90 AC830004 */ sw $v1, 0x4($a0) /* B6294 8011FB94 AD220000 */ sw $v0, 0x0($t1) /* B6298 8011FB98 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* B629C 8011FB9C AD020000 */ sw $v0, 0x0($t0) /* B62A0 8011FBA0 25020010 */ addiu $v0, $t0, 0x10 /* B62A4 8011FBA4 AD000004 */ sw $zero, 0x4($t0) /* B62A8 8011FBA8 AD220000 */ sw $v0, 0x0($t1) /* B62AC 8011FBAC 3C02D700 */ lui $v0, (0xD7000000 >> 16) /* B62B0 8011FBB0 AD020008 */ sw $v0, 0x8($t0) /* B62B4 8011FBB4 25020018 */ addiu $v0, $t0, 0x18 /* B62B8 8011FBB8 AD00000C */ sw $zero, 0xC($t0) /* B62BC 8011FBBC AD220000 */ sw $v0, 0x0($t1) /* B62C0 8011FBC0 25020020 */ addiu $v0, $t0, 0x20 /* B62C4 8011FBC4 AD050010 */ sw $a1, 0x10($t0) /* B62C8 8011FBC8 AD000014 */ sw $zero, 0x14($t0) /* B62CC 8011FBCC AD220000 */ sw $v0, 0x0($t1) /* B62D0 8011FBD0 25020028 */ addiu $v0, $t0, 0x28 /* B62D4 8011FBD4 AD060018 */ sw $a2, 0x18($t0) /* B62D8 8011FBD8 AD00001C */ sw $zero, 0x1C($t0) /* B62DC 8011FBDC AD220000 */ sw $v0, 0x0($t1) /* B62E0 8011FBE0 AD070020 */ sw $a3, 0x20($t0) /* B62E4 8011FBE4 AD000024 */ sw $zero, 0x24($t0) /* B62E8 8011FBE8 8FAA0040 */ lw $t2, 0x40($sp) /* B62EC 8011FBEC 8D420000 */ lw $v0, 0x0($t2) /* B62F0 8011FBF0 3C030001 */ lui $v1, (0x10000 >> 16) /* B62F4 8011FBF4 00431024 */ and $v0, $v0, $v1 /* B62F8 8011FBF8 10400007 */ beqz $v0, .L8011FC18 /* B62FC 8011FBFC 3C02D9FF */ lui $v0, (0xD9FFFFFF >> 16) /* B6300 8011FC00 3442FFFF */ ori $v0, $v0, (0xD9FFFFFF & 0xFFFF) /* B6304 8011FC04 25030030 */ addiu $v1, $t0, 0x30 /* B6308 8011FC08 AD230000 */ sw $v1, 0x0($t1) /* B630C 8011FC0C AD020028 */ sw $v0, 0x28($t0) /* B6310 8011FC10 24020400 */ addiu $v0, $zero, 0x400 /* B6314 8011FC14 AD02002C */ sw $v0, 0x2C($t0) .L8011FC18: /* B6318 8011FC18 3C028015 */ lui $v0, %hi(gAnimModelFogEnabled) /* B631C 8011FC1C 8C423A44 */ lw $v0, %lo(gAnimModelFogEnabled)($v0) /* B6320 8011FC20 1440000C */ bnez $v0, .L8011FC54 /* B6324 8011FC24 3C04FC12 */ lui $a0, (0xFC121E04 >> 16) /* B6328 8011FC28 3C05FCFF */ lui $a1, (0xFCFFFFFF >> 16) /* B632C 8011FC2C 34A5FFFF */ ori $a1, $a1, (0xFCFFFFFF & 0xFFFF) /* B6330 8011FC30 3C04FFFC */ lui $a0, (0xFFFCF279 >> 16) /* B6334 8011FC34 8D220000 */ lw $v0, 0x0($t1) /* B6338 8011FC38 3484F279 */ ori $a0, $a0, (0xFFFCF279 & 0xFFFF) /* B633C 8011FC3C 0040182D */ daddu $v1, $v0, $zero /* B6340 8011FC40 24420008 */ addiu $v0, $v0, 0x8 /* B6344 8011FC44 AD220000 */ sw $v0, 0x0($t1) /* B6348 8011FC48 AC650000 */ sw $a1, 0x0($v1) /* B634C 8011FC4C 08047F1D */ j .L8011FC74 /* B6350 8011FC50 AC640004 */ sw $a0, 0x4($v1) .L8011FC54: /* B6354 8011FC54 8D220000 */ lw $v0, 0x0($t1) /* B6358 8011FC58 34841E04 */ ori $a0, $a0, (0xFC121E04 & 0xFFFF) /* B635C 8011FC5C 0040182D */ daddu $v1, $v0, $zero /* B6360 8011FC60 24420008 */ addiu $v0, $v0, 0x8 /* B6364 8011FC64 AD220000 */ sw $v0, 0x0($t1) /* B6368 8011FC68 2402F3F8 */ addiu $v0, $zero, -0xC08 /* B636C 8011FC6C AC640000 */ sw $a0, 0x0($v1) /* B6370 8011FC70 AC620004 */ sw $v0, 0x4($v1) .L8011FC74: /* B6374 8011FC74 3C10800A */ lui $s0, %hi(gMainGfxPos) /* B6378 8011FC78 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* B637C 8011FC7C 8E020000 */ lw $v0, 0x0($s0) /* B6380 8011FC80 3C11E700 */ lui $s1, (0xE7000000 >> 16) /* B6384 8011FC84 0040182D */ daddu $v1, $v0, $zero /* B6388 8011FC88 AC710000 */ sw $s1, 0x0($v1) /* B638C 8011FC8C AC600004 */ sw $zero, 0x4($v1) /* B6390 8011FC90 8FAA0040 */ lw $t2, 0x40($sp) /* B6394 8011FC94 8D4302D4 */ lw $v1, 0x2D4($t2) /* B6398 8011FC98 24420008 */ addiu $v0, $v0, 0x8 /* B639C 8011FC9C 10600004 */ beqz $v1, .L8011FCB0 /* B63A0 8011FCA0 AE020000 */ sw $v0, 0x0($s0) /* B63A4 8011FCA4 8D4402D8 */ lw $a0, 0x2D8($t2) /* B63A8 8011FCA8 0060F809 */ jalr $v1 /* B63AC 8011FCAC 00000000 */ nop .L8011FCB0: /* B63B0 8011FCB0 8E040000 */ lw $a0, 0x0($s0) /* B63B4 8011FCB4 0080102D */ daddu $v0, $a0, $zero /* B63B8 8011FCB8 AC510000 */ sw $s1, 0x0($v0) /* B63BC 8011FCBC AC400004 */ sw $zero, 0x4($v0) /* B63C0 8011FCC0 8EC50000 */ lw $a1, 0x0($s6) /* B63C4 8011FCC4 24840008 */ addiu $a0, $a0, 0x8 /* B63C8 8011FCC8 10A00089 */ beqz $a1, .L8011FEF0 /* B63CC 8011FCCC AE040000 */ sw $a0, 0x0($s0) /* B63D0 8011FCD0 86C200F8 */ lh $v0, 0xF8($s6) /* B63D4 8011FCD4 04410008 */ bgez $v0, .L8011FCF8 /* B63D8 8011FCD8 240200DF */ addiu $v0, $zero, 0xDF /* B63DC 8011FCDC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B63E0 8011FCE0 AC820000 */ sw $v0, 0x0($a0) /* B63E4 8011FCE4 8EC30000 */ lw $v1, 0x0($s6) /* B63E8 8011FCE8 24820008 */ addiu $v0, $a0, 0x8 /* B63EC 8011FCEC AE020000 */ sw $v0, 0x0($s0) /* B63F0 8011FCF0 08047FBC */ j .L8011FEF0 /* B63F4 8011FCF4 AC830004 */ sw $v1, 0x4($a0) .L8011FCF8: /* B63F8 8011FCF8 90A30000 */ lbu $v1, 0x0($a1) /* B63FC 8011FCFC 10620008 */ beq $v1, $v0, .L8011FD20 /* B6400 8011FD00 0000202D */ daddu $a0, $zero, $zero /* B6404 8011FD04 0040302D */ daddu $a2, $v0, $zero /* B6408 8011FD08 24A20008 */ addiu $v0, $a1, 0x8 .L8011FD0C: /* B640C 8011FD0C 24840001 */ addiu $a0, $a0, 0x1 /* B6410 8011FD10 8C450000 */ lw $a1, 0x0($v0) /* B6414 8011FD14 00051E02 */ srl $v1, $a1, 24 /* B6418 8011FD18 1466FFFC */ bne $v1, $a2, .L8011FD0C /* B641C 8011FD1C 24420008 */ addiu $v0, $v0, 0x8 .L8011FD20: /* B6420 8011FD20 24840001 */ addiu $a0, $a0, 0x1 /* B6424 8011FD24 0000182D */ daddu $v1, $zero, $zero /* B6428 8011FD28 3C058015 */ lui $a1, %hi(D_801536C0) /* B642C 8011FD2C 24A536C0 */ addiu $a1, $a1, %lo(D_801536C0) /* B6430 8011FD30 000310C0 */ sll $v0, $v1, 3 .L8011FD34: /* B6434 8011FD34 0045B821 */ addu $s7, $v0, $a1 /* B6438 8011FD38 8EE20000 */ lw $v0, 0x0($s7) /* B643C 8011FD3C 04400006 */ bltz $v0, .L8011FD58 /* B6440 8011FD40 28620060 */ slti $v0, $v1, 0x60 /* B6444 8011FD44 24630001 */ addiu $v1, $v1, 0x1 /* B6448 8011FD48 28620060 */ slti $v0, $v1, 0x60 /* B644C 8011FD4C 1440FFF9 */ bnez $v0, .L8011FD34 /* B6450 8011FD50 000310C0 */ sll $v0, $v1, 3 /* B6454 8011FD54 28620060 */ slti $v0, $v1, 0x60 .L8011FD58: /* B6458 8011FD58 14400003 */ bnez $v0, .L8011FD68 /* B645C 8011FD5C 00000000 */ nop .L8011FD60: /* B6460 8011FD60 08047F58 */ j .L8011FD60 /* B6464 8011FD64 00000000 */ nop .L8011FD68: /* B6468 8011FD68 0C00AB0A */ jal general_heap_malloc /* B646C 8011FD6C 000420C0 */ sll $a0, $a0, 3 /* B6470 8011FD70 0040982D */ daddu $s3, $v0, $zero /* B6474 8011FD74 16600003 */ bnez $s3, .L8011FD84 /* B6478 8011FD78 AEF30004 */ sw $s3, 0x4($s7) .L8011FD7C: /* B647C 8011FD7C 08047F5F */ j .L8011FD7C /* B6480 8011FD80 00000000 */ nop .L8011FD84: /* B6484 8011FD84 0000A82D */ daddu $s5, $zero, $zero /* B6488 8011FD88 24020003 */ addiu $v0, $zero, 0x3 /* B648C 8011FD8C AEE20000 */ sw $v0, 0x0($s7) /* B6490 8011FD90 8EC20000 */ lw $v0, 0x0($s6) /* B6494 8011FD94 8C450000 */ lw $a1, 0x0($v0) /* B6498 8011FD98 8C470004 */ lw $a3, 0x4($v0) /* B649C 8011FD9C 240200DF */ addiu $v0, $zero, 0xDF /* B64A0 8011FDA0 00051E02 */ srl $v1, $a1, 24 /* B64A4 8011FDA4 10620044 */ beq $v1, $v0, .L8011FEB8 /* B64A8 8011FDA8 24140002 */ addiu $s4, $zero, 0x2 /* B64AC 8011FDAC 3C1E0100 */ lui $fp, (0x1000000 >> 16) /* B64B0 8011FDB0 2672FFFC */ addiu $s2, $s3, -0x4 .L8011FDB4: /* B64B4 8011FDB4 24020001 */ addiu $v0, $zero, 0x1 /* B64B8 8011FDB8 5462002F */ bnel $v1, $v0, .L8011FE78 /* B64BC 8011FDBC 0260102D */ daddu $v0, $s3, $zero /* B64C0 8011FDC0 00451006 */ srlv $v0, $a1, $v0 /* B64C4 8011FDC4 3051007F */ andi $s1, $v0, 0x7F /* B64C8 8011FDC8 00051302 */ srl $v0, $a1, 12 /* B64CC 8011FDCC 305000FF */ andi $s0, $v0, 0xFF /* B64D0 8011FDD0 8EC200FC */ lw $v0, 0xFC($s6) /* B64D4 8011FDD4 14400010 */ bnez $v0, .L8011FE18 /* B64D8 8011FDD8 02308823 */ subu $s1, $s1, $s0 /* B64DC 8011FDDC 26520008 */ addiu $s2, $s2, 0x8 /* B64E0 8011FDE0 26730008 */ addiu $s3, $s3, 0x8 /* B64E4 8011FDE4 00101300 */ sll $v0, $s0, 12 /* B64E8 8011FDE8 02301821 */ addu $v1, $s1, $s0 /* B64EC 8011FDEC 3063007F */ andi $v1, $v1, 0x7F /* B64F0 8011FDF0 00031840 */ sll $v1, $v1, 1 /* B64F4 8011FDF4 007E1825 */ or $v1, $v1, $fp /* B64F8 8011FDF8 86C400F8 */ lh $a0, 0xF8($s6) /* B64FC 8011FDFC 00431025 */ or $v0, $v0, $v1 /* B6500 8011FE00 AE42FFFC */ sw $v0, -0x4($s2) /* B6504 8011FE04 00952021 */ addu $a0, $a0, $s5 /* B6508 8011FE08 00042100 */ sll $a0, $a0, 4 /* B650C 8011FE0C 00E41821 */ addu $v1, $a3, $a0 /* B6510 8011FE10 08047F9C */ j .L8011FE70 /* B6514 8011FE14 AE430000 */ sw $v1, 0x0($s2) .L8011FE18: /* B6518 8011FE18 02C0282D */ daddu $a1, $s6, $zero /* B651C 8011FE1C 26520008 */ addiu $s2, $s2, 0x8 /* B6520 8011FE20 8FA40040 */ lw $a0, 0x40($sp) /* B6524 8011FE24 86C200F8 */ lh $v0, 0xF8($s6) /* B6528 8011FE28 26730008 */ addiu $s3, $s3, 0x8 /* B652C 8011FE2C AFB10010 */ sw $s1, 0x10($sp) /* B6530 8011FE30 AFB50014 */ sw $s5, 0x14($sp) /* B6534 8011FE34 00551021 */ addu $v0, $v0, $s5 /* B6538 8011FE38 00023040 */ sll $a2, $v0, 1 /* B653C 8011FE3C 00C23021 */ addu $a2, $a2, $v0 /* B6540 8011FE40 00063040 */ sll $a2, $a2, 1 /* B6544 8011FE44 00E63021 */ addu $a2, $a3, $a2 /* B6548 8011FE48 0C0477A0 */ jal animator_copy_vertices_to_buffer /* B654C 8011FE4C 0200382D */ daddu $a3, $s0, $zero /* B6550 8011FE50 00102300 */ sll $a0, $s0, 12 /* B6554 8011FE54 02301821 */ addu $v1, $s1, $s0 /* B6558 8011FE58 3063007F */ andi $v1, $v1, 0x7F /* B655C 8011FE5C 00031840 */ sll $v1, $v1, 1 /* B6560 8011FE60 007E1825 */ or $v1, $v1, $fp /* B6564 8011FE64 00832025 */ or $a0, $a0, $v1 /* B6568 8011FE68 AE44FFFC */ sw $a0, -0x4($s2) /* B656C 8011FE6C AE420000 */ sw $v0, 0x0($s2) .L8011FE70: /* B6570 8011FE70 08047FA2 */ j .L8011FE88 /* B6574 8011FE74 02B0A821 */ addu $s5, $s5, $s0 .L8011FE78: /* B6578 8011FE78 26520008 */ addiu $s2, $s2, 0x8 /* B657C 8011FE7C 26730008 */ addiu $s3, $s3, 0x8 /* B6580 8011FE80 AC450000 */ sw $a1, 0x0($v0) /* B6584 8011FE84 AC470004 */ sw $a3, 0x4($v0) .L8011FE88: /* B6588 8011FE88 00141080 */ sll $v0, $s4, 2 /* B658C 8011FE8C 26940001 */ addiu $s4, $s4, 0x1 /* B6590 8011FE90 00141880 */ sll $v1, $s4, 2 /* B6594 8011FE94 8EC40000 */ lw $a0, 0x0($s6) /* B6598 8011FE98 00441021 */ addu $v0, $v0, $a0 /* B659C 8011FE9C 00641821 */ addu $v1, $v1, $a0 /* B65A0 8011FEA0 8C450000 */ lw $a1, 0x0($v0) /* B65A4 8011FEA4 240200DF */ addiu $v0, $zero, 0xDF /* B65A8 8011FEA8 8C670000 */ lw $a3, 0x0($v1) /* B65AC 8011FEAC 00051E02 */ srl $v1, $a1, 24 /* B65B0 8011FEB0 1462FFC0 */ bne $v1, $v0, .L8011FDB4 /* B65B4 8011FEB4 26940001 */ addiu $s4, $s4, 0x1 .L8011FEB8: /* B65B8 8011FEB8 3C05800A */ lui $a1, %hi(gMainGfxPos) /* B65BC 8011FEBC 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* B65C0 8011FEC0 0260202D */ daddu $a0, $s3, $zero /* B65C4 8011FEC4 8CA30000 */ lw $v1, 0x0($a1) /* B65C8 8011FEC8 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* B65CC 8011FECC AC820000 */ sw $v0, 0x0($a0) /* B65D0 8011FED0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* B65D4 8011FED4 AC800004 */ sw $zero, 0x4($a0) /* B65D8 8011FED8 0060202D */ daddu $a0, $v1, $zero /* B65DC 8011FEDC AC820000 */ sw $v0, 0x0($a0) /* B65E0 8011FEE0 8EE20004 */ lw $v0, 0x4($s7) /* B65E4 8011FEE4 24630008 */ addiu $v1, $v1, 0x8 /* B65E8 8011FEE8 ACA30000 */ sw $v1, 0x0($a1) /* B65EC 8011FEEC AC820004 */ sw $v0, 0x4($a0) .L8011FEF0: /* B65F0 8011FEF0 0000882D */ daddu $s1, $zero, $zero /* B65F4 8011FEF4 3C03800A */ lui $v1, %hi(gMainGfxPos) /* B65F8 8011FEF8 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* B65FC 8011FEFC 8C620000 */ lw $v0, 0x0($v1) /* B6600 8011FF00 02C0802D */ daddu $s0, $s6, $zero /* B6604 8011FF04 0040202D */ daddu $a0, $v0, $zero /* B6608 8011FF08 24420008 */ addiu $v0, $v0, 0x8 /* B660C 8011FF0C AC620000 */ sw $v0, 0x0($v1) /* B6610 8011FF10 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* B6614 8011FF14 AC820000 */ sw $v0, 0x0($a0) /* B6618 8011FF18 AC800004 */ sw $zero, 0x4($a0) .L8011FF1C: /* B661C 8011FF1C 8E050004 */ lw $a1, 0x4($s0) /* B6620 8011FF20 50A00005 */ beql $a1, $zero, .L8011FF38 /* B6624 8011FF24 26310001 */ addiu $s1, $s1, 0x1 /* B6628 8011FF28 8FA40040 */ lw $a0, 0x40($sp) /* B662C 8011FF2C 0C047E95 */ jal appendGfx_animator_node /* B6630 8011FF30 26C600B4 */ addiu $a2, $s6, 0xB4 /* B6634 8011FF34 26310001 */ addiu $s1, $s1, 0x1 .L8011FF38: /* B6638 8011FF38 2A220020 */ slti $v0, $s1, 0x20 /* B663C 8011FF3C 1440FFF7 */ bnez $v0, .L8011FF1C /* B6640 8011FF40 26100004 */ addiu $s0, $s0, 0x4 .L8011FF44: /* B6644 8011FF44 8FBF003C */ lw $ra, 0x3C($sp) /* B6648 8011FF48 8FBE0038 */ lw $fp, 0x38($sp) /* B664C 8011FF4C 8FB70034 */ lw $s7, 0x34($sp) /* B6650 8011FF50 8FB60030 */ lw $s6, 0x30($sp) /* B6654 8011FF54 8FB5002C */ lw $s5, 0x2C($sp) /* B6658 8011FF58 8FB40028 */ lw $s4, 0x28($sp) /* B665C 8011FF5C 8FB30024 */ lw $s3, 0x24($sp) /* B6660 8011FF60 8FB20020 */ lw $s2, 0x20($sp) /* B6664 8011FF64 8FB1001C */ lw $s1, 0x1C($sp) /* B6668 8011FF68 8FB00018 */ lw $s0, 0x18($sp) /* B666C 8011FF6C 03E00008 */ jr $ra /* B6670 8011FF70 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix4f mtx) { DisplayListBufferHandle* bufferHandle; u32 w0,w1; s32 cmd; s32 i; if (node->flags & MODEL_ANIMATOR_FLAG_HIDDEN) { for (i = 0; i < ARRAY_COUNT(node->children); i++) { if (node->children[i] != NULL) { guMtxCatF(node->mtx, mtx, node->mtx); appendGfx_animator_node(animator, node->children[i], node->mtx); } } return; } guMtxCatF(node->mtx, mtx, node->mtx); guMtxF2L(node->mtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); gSPTexture(gMainGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING); if (animator->flags & MODEL_ANIMATOR_FLAG_CULL_BACK) { gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK); } if (!gAnimModelFogEnabled) { gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); } else { gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED); } gDPPipeSync(gMainGfxPos++); if (animator->fpRenderCallback != NULL) animator->fpRenderCallback(animator->renderCallbackArg); gDPPipeSync(gMainGfxPos++); if (node->displayList != NULL) { if (node->vertexStartOffset < 0) { gSPDisplayList(gMainGfxPos++, node->displayList); } else { Gfx* gfxPos; s32 vtxIdx, dlIdx; s32 j = 0; s32 k; if ((node->displayList[0].words.w0 >> 0x18) != G_ENDDL) { Gfx* gfxPtr = node->displayList; s32 endDL = G_ENDDL; for(;; j++) { w0 = gfxPtr->words.w0; gfxPtr++; cmd = w0 >> 0x18; if (cmd == endDL) { break; } } } j++; for (k = 0; k < ARRAY_COUNT(D_801536C0); k++) { bufferHandle = &D_801536C0[k]; if (bufferHandle->ttl < 0) { break; } } ASSERT(k < ARRAY_COUNT(D_801536C0)); bufferHandle->addr = gfxPos = general_heap_malloc(j * sizeof(Gfx)); ASSERT(gfxPos != NULL); bufferHandle->ttl = 3; vtxIdx = 0; dlIdx = 0; do { w0 = ((s32*)node->displayList)[dlIdx++]; w1 = ((s32*)node->displayList)[dlIdx++]; cmd = w0 >> 0x18; if (cmd == G_ENDDL) { break; } if (cmd == G_VTX) { s32 startIdx = _SHIFTR(w0,1,7); s32 vtxCount = _SHIFTR(w0,12,8); Vtx* newBuffer; startIdx -= vtxCount; if (node->fcData.vtxList == NULL) { newBuffer = &((Vtx*)w1)[node->vertexStartOffset + vtxIdx]; gSPVertex(gfxPos++, newBuffer, vtxCount, startIdx); } else { newBuffer = animator_copy_vertices_to_buffer( animator, node, (Vec3s*)(w1 + (node->vertexStartOffset + vtxIdx) * 0x6), vtxCount, startIdx, vtxIdx ); gSPVertex(gfxPos++, newBuffer, vtxCount, startIdx); } vtxIdx += vtxCount; } else { Gfx* temp[1] = {gfxPos++}; // required to match temp[0]->words.w0 = w0; temp[0]->words.w1 = w1; } } while (TRUE); gSPEndDisplayList(gfxPos++); gSPDisplayList(gMainGfxPos++, bufferHandle->addr); } } gDPPipeSync(gMainGfxPos++); for (i = 0; i < ARRAY_COUNT(node->children); i++) { if (node->children[i] != NULL) { appendGfx_animator_node(animator, node->children[i], node->mtx); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel thunderbolt_ring_appendGfx /* 3B40E4 E00B0234 27BDFF10 */ addiu $sp, $sp, -0xF0 /* 3B40E8 E00B0238 0080402D */ daddu $t0, $a0, $zero /* 3B40EC E00B023C 3C09DB06 */ lui $t1, (0xDB060024 >> 16) /* 3B40F0 E00B0240 35290024 */ ori $t1, $t1, (0xDB060024 & 0xFFFF) /* 3B40F4 E00B0244 27A40020 */ addiu $a0, $sp, 0x20 /* 3B40F8 E00B0248 AFB000B0 */ sw $s0, 0xB0($sp) /* 3B40FC E00B024C 3C100001 */ lui $s0, (0x11630 >> 16) /* 3B4100 E00B0250 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 3B4104 E00B0254 AFB100B4 */ sw $s1, 0xB4($sp) /* 3B4108 E00B0258 0000882D */ daddu $s1, $zero, $zero /* 3B410C E00B025C AFB400C0 */ sw $s4, 0xC0($sp) /* 3B4110 E00B0260 27B40060 */ addiu $s4, $sp, 0x60 /* 3B4114 E00B0264 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 3B4118 E00B0268 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos) /* 3B411C E00B026C AFB500C4 */ sw $s5, 0xC4($sp) /* 3B4120 E00B0270 0040A82D */ daddu $s5, $v0, $zero /* 3B4124 E00B0274 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3B4128 E00B0278 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3B412C E00B027C AFB200B8 */ sw $s2, 0xB8($sp) /* 3B4130 E00B0280 0040902D */ daddu $s2, $v0, $zero /* 3B4134 E00B0284 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3B4138 E00B0288 AFBF00D4 */ sw $ra, 0xD4($sp) /* 3B413C E00B028C AFBE00D0 */ sw $fp, 0xD0($sp) /* 3B4140 E00B0290 AFB700CC */ sw $s7, 0xCC($sp) /* 3B4144 E00B0294 AFB600C8 */ sw $s6, 0xC8($sp) /* 3B4148 E00B0298 AFB300BC */ sw $s3, 0xBC($sp) /* 3B414C E00B029C F7B800E8 */ sdc1 $f24, 0xE8($sp) /* 3B4150 E00B02A0 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 3B4154 E00B02A4 F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 3B4158 E00B02A8 8E460000 */ lw $a2, 0x0($s2) /* 3B415C E00B02AC 44800000 */ mtc1 $zero, $f0 /* 3B4160 E00B02B0 8D13000C */ lw $s3, 0xC($t0) /* 3B4164 E00B02B4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3B4168 E00B02B8 4481C000 */ mtc1 $at, $f24 /* 3B416C E00B02BC 44050000 */ mfc1 $a1, $f0 /* 3B4170 E00B02C0 8E6A0014 */ lw $t2, 0x14($s3) /* 3B4174 E00B02C4 00C0182D */ daddu $v1, $a2, $zero /* 3B4178 E00B02C8 AFAA00A0 */ sw $t2, 0xA0($sp) /* 3B417C E00B02CC 8E6A0024 */ lw $t2, 0x24($s3) /* 3B4180 E00B02D0 4485A000 */ mtc1 $a1, $f20 /* 3B4184 E00B02D4 24C60008 */ addiu $a2, $a2, 0x8 /* 3B4188 E00B02D8 AFAA00A4 */ sw $t2, 0xA4($sp) /* 3B418C E00B02DC AC620000 */ sw $v0, 0x0($v1) /* 3B4190 E00B02E0 AC600004 */ sw $zero, 0x4($v1) /* 3B4194 E00B02E4 ACC90000 */ sw $t1, 0x0($a2) /* 3B4198 E00B02E8 8D020010 */ lw $v0, 0x10($t0) /* 3B419C E00B02EC 3C088000 */ lui $t0, (0x80000000 >> 16) /* 3B41A0 E00B02F0 8C42001C */ lw $v0, 0x1C($v0) /* 3B41A4 E00B02F4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3B41A8 E00B02F8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3B41AC E00B02FC 00481021 */ addu $v0, $v0, $t0 /* 3B41B0 E00B0300 ACC20004 */ sw $v0, 0x4($a2) /* 3B41B4 E00B0304 00031080 */ sll $v0, $v1, 2 /* 3B41B8 E00B0308 00431021 */ addu $v0, $v0, $v1 /* 3B41BC E00B030C 00021080 */ sll $v0, $v0, 2 /* 3B41C0 E00B0310 00431023 */ subu $v0, $v0, $v1 /* 3B41C4 E00B0314 000218C0 */ sll $v1, $v0, 3 /* 3B41C8 E00B0318 00431021 */ addu $v0, $v0, $v1 /* 3B41CC E00B031C 000210C0 */ sll $v0, $v0, 3 /* 3B41D0 E00B0320 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3B41D4 E00B0324 00220821 */ addu $at, $at, $v0 /* 3B41D8 E00B0328 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 3B41DC E00B032C C6600028 */ lwc1 $f0, 0x28($s3) /* 3B41E0 E00B0330 3C1E0001 */ lui $fp, (0x11630 >> 16) /* 3B41E4 E00B0334 E7A00010 */ swc1 $f0, 0x10($sp) /* 3B41E8 E00B0338 C6600004 */ lwc1 $f0, 0x4($s3) /* 3B41EC E00B033C 37DE1630 */ ori $fp, $fp, (0x11630 & 0xFFFF) /* 3B41F0 E00B0340 AE460000 */ sw $a2, 0x0($s2) /* 3B41F4 E00B0344 24C60008 */ addiu $a2, $a2, 0x8 /* 3B41F8 E00B0348 E7A00014 */ swc1 $f0, 0x14($sp) /* 3B41FC E00B034C C6600008 */ lwc1 $f0, 0x8($s3) /* 3B4200 E00B0350 46001087 */ neg.s $f2, $f2 /* 3B4204 E00B0354 AE460000 */ sw $a2, 0x0($s2) /* 3B4208 E00B0358 44061000 */ mfc1 $a2, $f2 /* 3B420C E00B035C 2416005A */ addiu $s6, $zero, 0x5A /* 3B4210 E00B0360 E7A00018 */ swc1 $f0, 0x18($sp) /* 3B4214 E00B0364 C660000C */ lwc1 $f0, 0xC($s3) /* 3B4218 E00B0368 00A0382D */ daddu $a3, $a1, $zero /* 3B421C E00B036C 0C080180 */ jal shim_guPositionF /* 3B4220 E00B0370 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3B4224 E00B0374 27A40020 */ addiu $a0, $sp, 0x20 /* 3B4228 E00B0378 96A50000 */ lhu $a1, 0x0($s5) /* 3B422C E00B037C 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3B4230 E00B0380 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3B4234 E00B0384 00052980 */ sll $a1, $a1, 6 /* 3B4238 E00B0388 00B02821 */ addu $a1, $a1, $s0 /* 3B423C E00B038C 0C080118 */ jal shim_guMtxF2L /* 3B4240 E00B0390 00452821 */ addu $a1, $v0, $a1 /* 3B4244 E00B0394 3C06DA38 */ lui $a2, (0xDA380002 >> 16) /* 3B4248 E00B0398 8E440000 */ lw $a0, 0x0($s2) /* 3B424C E00B039C 34C60002 */ ori $a2, $a2, (0xDA380002 & 0xFFFF) /* 3B4250 E00B03A0 0080282D */ daddu $a1, $a0, $zero /* 3B4254 E00B03A4 24840008 */ addiu $a0, $a0, 0x8 /* 3B4258 E00B03A8 24820008 */ addiu $v0, $a0, 0x8 /* 3B425C E00B03AC 0040B82D */ daddu $s7, $v0, $zero /* 3B4260 E00B03B0 96A20000 */ lhu $v0, 0x0($s5) /* 3B4264 E00B03B4 24830010 */ addiu $v1, $a0, 0x10 /* 3B4268 E00B03B8 AFA300A8 */ sw $v1, 0xA8($sp) /* 3B426C E00B03BC AE440000 */ sw $a0, 0x0($s2) /* 3B4270 E00B03C0 ACA60000 */ sw $a2, 0x0($a1) /* 3B4274 E00B03C4 24430001 */ addiu $v1, $v0, 0x1 /* 3B4278 E00B03C8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B427C E00B03CC 00021180 */ sll $v0, $v0, 6 /* 3B4280 E00B03D0 A6A30000 */ sh $v1, 0x0($s5) /* 3B4284 E00B03D4 3C03800A */ lui $v1, %hi(gDisplayContext) /* 3B4288 E00B03D8 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 3B428C E00B03DC 00501021 */ addu $v0, $v0, $s0 /* 3B4290 E00B03E0 00621821 */ addu $v1, $v1, $v0 /* 3B4294 E00B03E4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B4298 E00B03E8 ACA30004 */ sw $v1, 0x4($a1) /* 3B429C E00B03EC AE570000 */ sw $s7, 0x0($s2) /* 3B42A0 E00B03F0 AC820000 */ sw $v0, 0x0($a0) /* 3B42A4 E00B03F4 3C020900 */ lui $v0, %hi(D_09000000_415060) /* 3B42A8 E00B03F8 24420000 */ addiu $v0, $v0, %lo(D_09000000_415060) /* 3B42AC E00B03FC AC820004 */ sw $v0, 0x4($a0) /* 3B42B0 E00B0400 8FAA00A8 */ lw $t2, 0xA8($sp) /* 3B42B4 E00B0404 4600C586 */ mov.s $f22, $f24 /* 3B42B8 E00B0408 AE4A0000 */ sw $t2, 0x0($s2) .LE00B040C: /* 3B42BC E00B040C 27A40020 */ addiu $a0, $sp, 0x20 /* 3B42C0 E00B0410 44962000 */ mtc1 $s6, $f4 /* 3B42C4 E00B0414 00000000 */ nop /* 3B42C8 E00B0418 46802120 */ cvt.s.w $f4, $f4 /* 3B42CC E00B041C 26D60048 */ addiu $s6, $s6, 0x48 /* 3B42D0 E00B0420 44052000 */ mfc1 $a1, $f4 /* 3B42D4 E00B0424 4406A000 */ mfc1 $a2, $f20 /* 3B42D8 E00B0428 4407A000 */ mfc1 $a3, $f20 /* 3B42DC E00B042C 26310001 */ addiu $s1, $s1, 0x1 /* 3B42E0 E00B0430 0C080104 */ jal shim_guRotateF /* 3B42E4 E00B0434 E7B60010 */ swc1 $f22, 0x10($sp) /* 3B42E8 E00B0438 4405B000 */ mfc1 $a1, $f22 /* 3B42EC E00B043C 4406C000 */ mfc1 $a2, $f24 /* 3B42F0 E00B0440 4407B000 */ mfc1 $a3, $f22 /* 3B42F4 E00B0444 0C080110 */ jal shim_guScaleF /* 3B42F8 E00B0448 0280202D */ daddu $a0, $s4, $zero /* 3B42FC E00B044C 0280202D */ daddu $a0, $s4, $zero /* 3B4300 E00B0450 27A50020 */ addiu $a1, $sp, 0x20 /* 3B4304 E00B0454 0C080114 */ jal shim_guMtxCatF /* 3B4308 E00B0458 00A0302D */ daddu $a2, $a1, $zero /* 3B430C E00B045C 4405A000 */ mfc1 $a1, $f20 /* 3B4310 E00B0460 4406A000 */ mfc1 $a2, $f20 /* 3B4314 E00B0464 4407A000 */ mfc1 $a3, $f20 /* 3B4318 E00B0468 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 3B431C E00B046C 44810000 */ mtc1 $at, $f0 /* 3B4320 E00B0470 0280202D */ daddu $a0, $s4, $zero /* 3B4324 E00B0474 E7B60010 */ swc1 $f22, 0x10($sp) /* 3B4328 E00B0478 E7B40018 */ swc1 $f20, 0x18($sp) /* 3B432C E00B047C E7B4001C */ swc1 $f20, 0x1C($sp) /* 3B4330 E00B0480 0C080180 */ jal shim_guPositionF /* 3B4334 E00B0484 E7A00014 */ swc1 $f0, 0x14($sp) /* 3B4338 E00B0488 0280202D */ daddu $a0, $s4, $zero /* 3B433C E00B048C 27A50020 */ addiu $a1, $sp, 0x20 /* 3B4340 E00B0490 0C080114 */ jal shim_guMtxCatF /* 3B4344 E00B0494 00A0302D */ daddu $a2, $a1, $zero /* 3B4348 E00B0498 27A40020 */ addiu $a0, $sp, 0x20 /* 3B434C E00B049C 96A50000 */ lhu $a1, 0x0($s5) /* 3B4350 E00B04A0 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3B4354 E00B04A4 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3B4358 E00B04A8 00052980 */ sll $a1, $a1, 6 /* 3B435C E00B04AC 00BE2821 */ addu $a1, $a1, $fp /* 3B4360 E00B04B0 0C080118 */ jal shim_guMtxF2L /* 3B4364 E00B04B4 00452821 */ addu $a1, $v0, $a1 /* 3B4368 E00B04B8 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3B436C E00B04BC 8E440000 */ lw $a0, 0x0($s2) /* 3B4370 E00B04C0 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3B4374 E00B04C4 0080282D */ daddu $a1, $a0, $zero /* 3B4378 E00B04C8 24840008 */ addiu $a0, $a0, 0x8 /* 3B437C E00B04CC AE440000 */ sw $a0, 0x0($s2) /* 3B4380 E00B04D0 96A20000 */ lhu $v0, 0x0($s5) /* 3B4384 E00B04D4 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3B4388 E00B04D8 ACA30000 */ sw $v1, 0x0($a1) /* 3B438C E00B04DC 24430001 */ addiu $v1, $v0, 0x1 /* 3B4390 E00B04E0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B4394 E00B04E4 00021180 */ sll $v0, $v0, 6 /* 3B4398 E00B04E8 A6A30000 */ sh $v1, 0x0($s5) /* 3B439C E00B04EC 3C03800A */ lui $v1, %hi(gDisplayContext) /* 3B43A0 E00B04F0 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 3B43A4 E00B04F4 005E1021 */ addu $v0, $v0, $fp /* 3B43A8 E00B04F8 00621821 */ addu $v1, $v1, $v0 /* 3B43AC E00B04FC 24820008 */ addiu $v0, $a0, 0x8 /* 3B43B0 E00B0500 ACA30004 */ sw $v1, 0x4($a1) /* 3B43B4 E00B0504 AE420000 */ sw $v0, 0x0($s2) /* 3B43B8 E00B0508 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B43BC E00B050C AC820000 */ sw $v0, 0x0($a0) /* 3B43C0 E00B0510 3C020900 */ lui $v0, %hi(D_090000C8_415128) /* 3B43C4 E00B0514 244200C8 */ addiu $v0, $v0, %lo(D_090000C8_415128) /* 3B43C8 E00B0518 AC820004 */ sw $v0, 0x4($a0) /* 3B43CC E00B051C 24820010 */ addiu $v0, $a0, 0x10 /* 3B43D0 E00B0520 AE420000 */ sw $v0, 0x0($s2) /* 3B43D4 E00B0524 24020040 */ addiu $v0, $zero, 0x40 /* 3B43D8 E00B0528 AC82000C */ sw $v0, 0xC($a0) /* 3B43DC E00B052C 2A220005 */ slti $v0, $s1, 0x5 /* 3B43E0 E00B0530 1440FFB6 */ bnez $v0, .LE00B040C /* 3B43E4 E00B0534 AC860008 */ sw $a2, 0x8($a0) /* 3B43E8 E00B0538 3C07800A */ lui $a3, %hi(gMainGfxPos) /* 3B43EC E00B053C 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* 3B43F0 E00B0540 0000882D */ daddu $s1, $zero, $zero /* 3B43F4 E00B0544 8CE40000 */ lw $a0, 0x0($a3) /* 3B43F8 E00B0548 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 3B43FC E00B054C 0080182D */ daddu $v1, $a0, $zero /* 3B4400 E00B0550 24840008 */ addiu $a0, $a0, 0x8 /* 3B4404 E00B0554 ACE40000 */ sw $a0, 0x0($a3) /* 3B4408 E00B0558 AC620000 */ sw $v0, 0x0($v1) /* 3B440C E00B055C 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3B4410 E00B0560 AC600004 */ sw $zero, 0x4($v1) /* 3B4414 E00B0564 AEE20000 */ sw $v0, 0x0($s7) /* 3B4418 E00B0568 24820008 */ addiu $v0, $a0, 0x8 /* 3B441C E00B056C AEE40004 */ sw $a0, 0x4($s7) /* 3B4420 E00B0570 ACE20000 */ sw $v0, 0x0($a3) /* 3B4424 E00B0574 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B4428 E00B0578 AC820000 */ sw $v0, 0x0($a0) /* 3B442C E00B057C 9262001B */ lbu $v0, 0x1B($s3) /* 3B4430 E00B0580 9265001F */ lbu $a1, 0x1F($s3) /* 3B4434 E00B0584 92660023 */ lbu $a2, 0x23($s3) /* 3B4438 E00B0588 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3B443C E00B058C AC830008 */ sw $v1, 0x8($a0) /* 3B4440 E00B0590 2403FF00 */ addiu $v1, $zero, -0x100 /* 3B4444 E00B0594 AC83000C */ sw $v1, 0xC($a0) /* 3B4448 E00B0598 8FAA00A4 */ lw $t2, 0xA4($sp) /* 3B444C E00B059C 00021600 */ sll $v0, $v0, 24 /* 3B4450 E00B05A0 00052C00 */ sll $a1, $a1, 16 /* 3B4454 E00B05A4 00451025 */ or $v0, $v0, $a1 /* 3B4458 E00B05A8 00063200 */ sll $a2, $a2, 8 /* 3B445C E00B05AC 00461025 */ or $v0, $v0, $a2 /* 3B4460 E00B05B0 314300FF */ andi $v1, $t2, 0xFF /* 3B4464 E00B05B4 00431025 */ or $v0, $v0, $v1 /* 3B4468 E00B05B8 AC820004 */ sw $v0, 0x4($a0) /* 3B446C E00B05BC 8E660030 */ lw $a2, 0x30($s3) /* 3B4470 E00B05C0 24840010 */ addiu $a0, $a0, 0x10 /* 3B4474 E00B05C4 24C20001 */ addiu $v0, $a2, 0x1 /* 3B4478 E00B05C8 18400065 */ blez $v0, .LE00B0760 /* 3B447C E00B05CC ACE40000 */ sw $a0, 0x0($a3) /* 3B4480 E00B05D0 8FAA00A0 */ lw $t2, 0xA0($sp) /* 3B4484 E00B05D4 000AB8C0 */ sll $s7, $t2, 3 /* 3B4488 E00B05D8 3C16800A */ lui $s6, %hi(gDisplayContext) /* 3B448C E00B05DC 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 3B4490 E00B05E0 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 3B4494 E00B05E4 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 3B4498 E00B05E8 3C140001 */ lui $s4, (0x11630 >> 16) /* 3B449C E00B05EC 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 3B44A0 E00B05F0 00E0902D */ daddu $s2, $a3, $zero .LE00B05F4: /* 3B44A4 E00B05F4 00111840 */ sll $v1, $s1, 1 /* 3B44A8 E00B05F8 00711821 */ addu $v1, $v1, $s1 /* 3B44AC E00B05FC 00031100 */ sll $v0, $v1, 4 /* 3B44B0 E00B0600 00431023 */ subu $v0, $v0, $v1 /* 3B44B4 E00B0604 00021080 */ sll $v0, $v0, 2 /* 3B44B8 E00B0608 24C30001 */ addiu $v1, $a2, 0x1 /* 3B44BC E00B060C 14600002 */ bnez $v1, .LE00B0618 /* 3B44C0 E00B0610 0043001A */ div $zero, $v0, $v1 /* 3B44C4 E00B0614 0007000D */ break 7 .LE00B0618: /* 3B44C8 E00B0618 2401FFFF */ addiu $at, $zero, -0x1 /* 3B44CC E00B061C 14610004 */ bne $v1, $at, .LE00B0630 /* 3B44D0 E00B0620 3C018000 */ lui $at, (0x80000000 >> 16) /* 3B44D4 E00B0624 14410002 */ bne $v0, $at, .LE00B0630 /* 3B44D8 E00B0628 00000000 */ nop /* 3B44DC E00B062C 0006000D */ break 6 .LE00B0630: /* 3B44E0 E00B0630 00001012 */ mflo $v0 /* 3B44E4 E00B0634 02E21021 */ addu $v0, $s7, $v0 /* 3B44E8 E00B0638 44826000 */ mtc1 $v0, $f12 /* 3B44EC E00B063C 00000000 */ nop /* 3B44F0 E00B0640 46806320 */ cvt.s.w $f12, $f12 /* 3B44F4 E00B0644 0C080144 */ jal shim_cos_deg /* 3B44F8 E00B0648 26300001 */ addiu $s0, $s1, 0x1 /* 3B44FC E00B064C 46000021 */ cvt.d.s $f0, $f0 /* 3B4500 E00B0650 3C01E00B */ lui $at, (0xE00B07E8 >> 16) /* 3B4504 E00B0654 D42207E8 */ ldc1 $f2, (0xE00B07E8 & 0xFFFF)($at) /* 3B4508 E00B0658 001110C0 */ sll $v0, $s1, 3 /* 3B450C E00B065C 46220002 */ mul.d $f0, $f0, $f2 /* 3B4510 E00B0660 00000000 */ nop /* 3B4514 E00B0664 00511021 */ addu $v0, $v0, $s1 /* 3B4518 E00B0668 00021080 */ sll $v0, $v0, 2 /* 3B451C E00B066C 44822000 */ mtc1 $v0, $f4 /* 3B4520 E00B0670 00000000 */ nop /* 3B4524 E00B0674 46802120 */ cvt.s.w $f4, $f4 /* 3B4528 E00B0678 4405A000 */ mfc1 $a1, $f20 /* 3B452C E00B067C 4406A000 */ mfc1 $a2, $f20 /* 3B4530 E00B0680 44901000 */ mtc1 $s0, $f2 /* 3B4534 E00B0684 00000000 */ nop /* 3B4538 E00B0688 468010A0 */ cvt.s.w $f2, $f2 /* 3B453C E00B068C 460010A1 */ cvt.d.s $f2, $f2 /* 3B4540 E00B0690 46201080 */ add.d $f2, $f2, $f0 /* 3B4544 E00B0694 44072000 */ mfc1 $a3, $f4 /* 3B4548 E00B0698 C660002C */ lwc1 $f0, 0x2C($s3) /* 3B454C E00B069C 462010A0 */ cvt.s.d $f2, $f2 /* 3B4550 E00B06A0 46001082 */ mul.s $f2, $f2, $f0 /* 3B4554 E00B06A4 00000000 */ nop /* 3B4558 E00B06A8 27A40020 */ addiu $a0, $sp, 0x20 /* 3B455C E00B06AC E7B40014 */ swc1 $f20, 0x14($sp) /* 3B4560 E00B06B0 E7B40018 */ swc1 $f20, 0x18($sp) /* 3B4564 E00B06B4 E7B4001C */ swc1 $f20, 0x1C($sp) /* 3B4568 E00B06B8 0C080180 */ jal shim_guPositionF /* 3B456C E00B06BC E7A20010 */ swc1 $f2, 0x10($sp) /* 3B4570 E00B06C0 27A40020 */ addiu $a0, $sp, 0x20 /* 3B4574 E00B06C4 96A50000 */ lhu $a1, 0x0($s5) /* 3B4578 E00B06C8 8EC20000 */ lw $v0, 0x0($s6) /* 3B457C E00B06CC 00052980 */ sll $a1, $a1, 6 /* 3B4580 E00B06D0 00B42821 */ addu $a1, $a1, $s4 /* 3B4584 E00B06D4 0C080118 */ jal shim_guMtxF2L /* 3B4588 E00B06D8 00452821 */ addu $a1, $v0, $a1 /* 3B458C E00B06DC 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3B4590 E00B06E0 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3B4594 E00B06E4 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 3B4598 E00B06E8 0200882D */ daddu $s1, $s0, $zero /* 3B459C E00B06EC 8E440000 */ lw $a0, 0x0($s2) /* 3B45A0 E00B06F0 96A50000 */ lhu $a1, 0x0($s5) /* 3B45A4 E00B06F4 0080302D */ daddu $a2, $a0, $zero /* 3B45A8 E00B06F8 24840008 */ addiu $a0, $a0, 0x8 /* 3B45AC E00B06FC ACC20000 */ sw $v0, 0x0($a2) /* 3B45B0 E00B0700 30A2FFFF */ andi $v0, $a1, 0xFFFF /* 3B45B4 E00B0704 00021180 */ sll $v0, $v0, 6 /* 3B45B8 E00B0708 00541021 */ addu $v0, $v0, $s4 /* 3B45BC E00B070C 8EC30000 */ lw $v1, 0x0($s6) /* 3B45C0 E00B0710 24A50001 */ addiu $a1, $a1, 0x1 /* 3B45C4 E00B0714 00621821 */ addu $v1, $v1, $v0 /* 3B45C8 E00B0718 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B45CC E00B071C ACC30004 */ sw $v1, 0x4($a2) /* 3B45D0 E00B0720 AC820000 */ sw $v0, 0x0($a0) /* 3B45D4 E00B0724 8FAA00A8 */ lw $t2, 0xA8($sp) /* 3B45D8 E00B0728 24020040 */ addiu $v0, $zero, 0x40 /* 3B45DC E00B072C AC870008 */ sw $a3, 0x8($a0) /* 3B45E0 E00B0730 AC82000C */ sw $v0, 0xC($a0) /* 3B45E4 E00B0734 AC8A0004 */ sw $t2, 0x4($a0) /* 3B45E8 E00B0738 8E660030 */ lw $a2, 0x30($s3) /* 3B45EC E00B073C 24820008 */ addiu $v0, $a0, 0x8 /* 3B45F0 E00B0740 AE440000 */ sw $a0, 0x0($s2) /* 3B45F4 E00B0744 24840010 */ addiu $a0, $a0, 0x10 /* 3B45F8 E00B0748 A6A50000 */ sh $a1, 0x0($s5) /* 3B45FC E00B074C AE420000 */ sw $v0, 0x0($s2) /* 3B4600 E00B0750 24C20001 */ addiu $v0, $a2, 0x1 /* 3B4604 E00B0754 0222102A */ slt $v0, $s1, $v0 /* 3B4608 E00B0758 1440FFA6 */ bnez $v0, .LE00B05F4 /* 3B460C E00B075C AE440000 */ sw $a0, 0x0($s2) .LE00B0760: /* 3B4610 E00B0760 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 3B4614 E00B0764 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3B4618 E00B0768 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3B461C E00B076C 8C820000 */ lw $v0, 0x0($a0) /* 3B4620 E00B0770 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 3B4624 E00B0774 0040282D */ daddu $a1, $v0, $zero /* 3B4628 E00B0778 24420008 */ addiu $v0, $v0, 0x8 /* 3B462C E00B077C AC820000 */ sw $v0, 0x0($a0) /* 3B4630 E00B0780 ACA30000 */ sw $v1, 0x0($a1) /* 3B4634 E00B0784 24030040 */ addiu $v1, $zero, 0x40 /* 3B4638 E00B0788 ACA30004 */ sw $v1, 0x4($a1) /* 3B463C E00B078C 24430008 */ addiu $v1, $v0, 0x8 /* 3B4640 E00B0790 AC830000 */ sw $v1, 0x0($a0) /* 3B4644 E00B0794 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 3B4648 E00B0798 AC430000 */ sw $v1, 0x0($v0) /* 3B464C E00B079C AC400004 */ sw $zero, 0x4($v0) /* 3B4650 E00B07A0 8FBF00D4 */ lw $ra, 0xD4($sp) /* 3B4654 E00B07A4 8FBE00D0 */ lw $fp, 0xD0($sp) /* 3B4658 E00B07A8 8FB700CC */ lw $s7, 0xCC($sp) /* 3B465C E00B07AC 8FB600C8 */ lw $s6, 0xC8($sp) /* 3B4660 E00B07B0 8FB500C4 */ lw $s5, 0xC4($sp) /* 3B4664 E00B07B4 8FB400C0 */ lw $s4, 0xC0($sp) /* 3B4668 E00B07B8 8FB300BC */ lw $s3, 0xBC($sp) /* 3B466C E00B07BC 8FB200B8 */ lw $s2, 0xB8($sp) /* 3B4670 E00B07C0 8FB100B4 */ lw $s1, 0xB4($sp) /* 3B4674 E00B07C4 8FB000B0 */ lw $s0, 0xB0($sp) /* 3B4678 E00B07C8 D7B800E8 */ ldc1 $f24, 0xE8($sp) /* 3B467C E00B07CC D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 3B4680 E00B07D0 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 3B4684 E00B07D4 03E00008 */ jr $ra /* 3B4688 E00B07D8 27BD00F0 */ addiu $sp, $sp, 0xF0 /* 3B468C E00B07DC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void thunderbolt_ring_appendGfx(void* effect) { ThunderboltRingFXData* data = ((EffectInstance*)effect)->data.thunderboltRing; s32 lifeTime = data->lifeTime; s32 unk_24 = data->unk_24; f32 scaleY = 1.0f; Gfx* savedGfxPos; Gfx* savedGfxPos2; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->unk_28, 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_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000000_3B46A0); savedGfxPos = gMainGfxPos++; savedGfxPos2 = gMainGfxPos; for (i = 0; i < 5; i++) { shim_guRotateF(sp20, i * 72 + 90, 0.0f, 0.0f, 1.0f); shim_guScaleF(sp60, 1.0f, scaleY, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guPositionF(sp60, 0.0f, 0.0f, 0.0f, 1.0f, 30.0f, 0.0f, 0.0f); 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); gSPDisplayList(gMainGfxPos++, D_090000C8_3B4768); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24); gDPSetEnvColor(gMainGfxPos++, 255, 255, 255, 0); for (i = 0; i < data->unk_30 + 1; i++) { f32 angle = lifeTime * 8 + i * 180 / (data->unk_30 + 1); f32 temp = (f32) (i + 1) + shim_cos_deg(angle) * 0.1; shim_guPositionF(sp20, 0.0f, 0.0f, i * 36, temp * data->unk_2C, 0.0f, 0.0f, 0.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, savedGfxPos2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80259D9C /* 18867C 80259D9C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 188680 80259DA0 AFB20018 */ sw $s2, 0x18($sp) /* 188684 80259DA4 0080902D */ daddu $s2, $a0, $zero /* 188688 80259DA8 AFB10014 */ sw $s1, 0x14($sp) /* 18868C 80259DAC 00A0882D */ daddu $s1, $a1, $zero /* 188690 80259DB0 AFB3001C */ sw $s3, 0x1C($sp) /* 188694 80259DB4 00C0982D */ daddu $s3, $a2, $zero /* 188698 80259DB8 AFBF0028 */ sw $ra, 0x28($sp) /* 18869C 80259DBC AFB50024 */ sw $s5, 0x24($sp) /* 1886A0 80259DC0 AFB40020 */ sw $s4, 0x20($sp) /* 1886A4 80259DC4 AFB00010 */ sw $s0, 0x10($sp) /* 1886A8 80259DC8 8E3000C0 */ lw $s0, 0xC0($s1) /* 1886AC 80259DCC 820206C1 */ lb $v0, 0x6C1($s0) /* 1886B0 80259DD0 8FB50040 */ lw $s5, 0x40($sp) /* 1886B4 80259DD4 1040004B */ beqz $v0, .L80259F04 /* 1886B8 80259DD8 00E0A02D */ daddu $s4, $a3, $zero /* 1886BC 80259DDC 16400016 */ bnez $s2, .L80259E38 /* 1886C0 80259DE0 00000000 */ nop /* 1886C4 80259DE4 0C0B7830 */ jal spr_get_player_palettes /* 1886C8 80259DE8 96240088 */ lhu $a0, 0x88($s1) /* 1886CC 80259DEC AE0206D0 */ sw $v0, 0x6D0($s0) /* 1886D0 80259DF0 0040202D */ daddu $a0, $v0, $zero /* 1886D4 80259DF4 A20006CD */ sb $zero, 0x6CD($s0) /* 1886D8 80259DF8 8C830000 */ lw $v1, 0x0($a0) /* 1886DC 80259DFC 2402FFFF */ addiu $v0, $zero, -0x1 /* 1886E0 80259E00 1062000B */ beq $v1, $v0, .L80259E30 /* 1886E4 80259E04 0080182D */ daddu $v1, $a0, $zero /* 1886E8 80259E08 0040202D */ daddu $a0, $v0, $zero .L80259E0C: /* 1886EC 80259E0C 920206CD */ lbu $v0, 0x6CD($s0) /* 1886F0 80259E10 24420001 */ addiu $v0, $v0, 0x1 /* 1886F4 80259E14 A20206CD */ sb $v0, 0x6CD($s0) /* 1886F8 80259E18 00021600 */ sll $v0, $v0, 24 /* 1886FC 80259E1C 00021583 */ sra $v0, $v0, 22 /* 188700 80259E20 00431021 */ addu $v0, $v0, $v1 /* 188704 80259E24 8C420000 */ lw $v0, 0x0($v0) /* 188708 80259E28 1444FFF8 */ bne $v0, $a0, .L80259E0C /* 18870C 80259E2C 00000000 */ nop .L80259E30: /* 188710 80259E30 080967A4 */ j .L80259E90 /* 188714 80259E34 24020006 */ addiu $v0, $zero, 0x6 .L80259E38: /* 188718 80259E38 96240088 */ lhu $a0, 0x88($s1) /* 18871C 80259E3C 0C0B7A90 */ jal spr_get_npc_palettes /* 188720 80259E40 00000000 */ nop /* 188724 80259E44 AE0206D0 */ sw $v0, 0x6D0($s0) /* 188728 80259E48 0040202D */ daddu $a0, $v0, $zero /* 18872C 80259E4C A20006CD */ sb $zero, 0x6CD($s0) /* 188730 80259E50 8C830000 */ lw $v1, 0x0($a0) /* 188734 80259E54 2402FFFF */ addiu $v0, $zero, -0x1 /* 188738 80259E58 1062000B */ beq $v1, $v0, .L80259E88 /* 18873C 80259E5C 0080182D */ daddu $v1, $a0, $zero /* 188740 80259E60 0040202D */ daddu $a0, $v0, $zero .L80259E64: /* 188744 80259E64 920206CD */ lbu $v0, 0x6CD($s0) /* 188748 80259E68 24420001 */ addiu $v0, $v0, 0x1 /* 18874C 80259E6C A20206CD */ sb $v0, 0x6CD($s0) /* 188750 80259E70 00021600 */ sll $v0, $v0, 24 /* 188754 80259E74 00021583 */ sra $v0, $v0, 22 /* 188758 80259E78 00431021 */ addu $v0, $v0, $v1 /* 18875C 80259E7C 8C420000 */ lw $v0, 0x0($v0) /* 188760 80259E80 1444FFF8 */ bne $v0, $a0, .L80259E64 /* 188764 80259E84 00000000 */ nop .L80259E88: /* 188768 80259E88 0C0B7A9B */ jal spr_get_npc_color_variations /* 18876C 80259E8C 96240088 */ lhu $a0, 0x88($s1) .L80259E90: /* 188770 80259E90 A20206CC */ sb $v0, 0x6CC($s0) /* 188774 80259E94 820206CD */ lb $v0, 0x6CD($s0) /* 188778 80259E98 18400015 */ blez $v0, .L80259EF0 /* 18877C 80259E9C 0000482D */ daddu $t1, $zero, $zero .L80259EA0: /* 188780 80259EA0 8E0206D0 */ lw $v0, 0x6D0($s0) /* 188784 80259EA4 00091880 */ sll $v1, $t1, 2 /* 188788 80259EA8 00621821 */ addu $v1, $v1, $v0 /* 18878C 80259EAC 00091140 */ sll $v0, $t1, 5 /* 188790 80259EB0 8C660000 */ lw $a2, 0x0($v1) /* 188794 80259EB4 10C00009 */ beqz $a2, .L80259EDC /* 188798 80259EB8 02024021 */ addu $t0, $s0, $v0 /* 18879C 80259EBC 0000382D */ daddu $a3, $zero, $zero .L80259EC0: /* 1887A0 80259EC0 94C20000 */ lhu $v0, 0x0($a2) /* 1887A4 80259EC4 24C60002 */ addiu $a2, $a2, 0x2 /* 1887A8 80259EC8 24E70001 */ addiu $a3, $a3, 0x1 /* 1887AC 80259ECC A5020000 */ sh $v0, 0x0($t0) /* 1887B0 80259ED0 28E20010 */ slti $v0, $a3, 0x10 /* 1887B4 80259ED4 1440FFFA */ bnez $v0, .L80259EC0 /* 1887B8 80259ED8 25080002 */ addiu $t0, $t0, 0x2 .L80259EDC: /* 1887BC 80259EDC 820206CD */ lb $v0, 0x6CD($s0) /* 1887C0 80259EE0 25290001 */ addiu $t1, $t1, 0x1 /* 1887C4 80259EE4 0122102A */ slt $v0, $t1, $v0 /* 1887C8 80259EE8 1440FFED */ bnez $v0, .L80259EA0 /* 1887CC 80259EEC 00000000 */ nop .L80259EF0: /* 1887D0 80259EF0 2402FFFE */ addiu $v0, $zero, -0x2 /* 1887D4 80259EF4 A20206C2 */ sb $v0, 0x6C2($s0) /* 1887D8 80259EF8 A60006CA */ sh $zero, 0x6CA($s0) /* 1887DC 80259EFC A20006C1 */ sb $zero, 0x6C1($s0) /* 1887E0 80259F00 A60006C8 */ sh $zero, 0x6C8($s0) .L80259F04: /* 1887E4 80259F04 16A0001E */ bnez $s5, .L80259F80 /* 1887E8 80259F08 00000000 */ nop /* 1887EC 80259F0C 860206C8 */ lh $v0, 0x6C8($s0) /* 1887F0 80259F10 14400013 */ bnez $v0, .L80259F60 /* 1887F4 80259F14 00000000 */ nop /* 1887F8 80259F18 920206C2 */ lbu $v0, 0x6C2($s0) /* 1887FC 80259F1C 3C048028 */ lui $a0, %hi(D_80284080) /* 188800 80259F20 24844080 */ addiu $a0, $a0, %lo(D_80284080) /* 188804 80259F24 24420002 */ addiu $v0, $v0, 0x2 /* 188808 80259F28 A20206C2 */ sb $v0, 0x6C2($s0) /* 18880C 80259F2C 00021600 */ sll $v0, $v0, 24 /* 188810 80259F30 00021603 */ sra $v0, $v0, 24 /* 188814 80259F34 3C038028 */ lui $v1, %hi(D_80284080) /* 188818 80259F38 00621821 */ addu $v1, $v1, $v0 /* 18881C 80259F3C 90634080 */ lbu $v1, %lo(D_80284080)($v1) /* 188820 80259F40 240200FF */ addiu $v0, $zero, 0xFF /* 188824 80259F44 50620001 */ beql $v1, $v0, .L80259F4C /* 188828 80259F48 A20006C2 */ sb $zero, 0x6C2($s0) .L80259F4C: /* 18882C 80259F4C 820206C2 */ lb $v0, 0x6C2($s0) /* 188830 80259F50 00441021 */ addu $v0, $v0, $a0 /* 188834 80259F54 90420001 */ lbu $v0, 0x1($v0) /* 188838 80259F58 00021042 */ srl $v0, $v0, 1 /* 18883C 80259F5C A60206C8 */ sh $v0, 0x6C8($s0) .L80259F60: /* 188840 80259F60 820306C2 */ lb $v1, 0x6C2($s0) /* 188844 80259F64 960206C8 */ lhu $v0, 0x6C8($s0) /* 188848 80259F68 3C018028 */ lui $at, %hi(D_80284080) /* 18884C 80259F6C 00230821 */ addu $at, $at, $v1 /* 188850 80259F70 90234080 */ lbu $v1, %lo(D_80284080)($at) /* 188854 80259F74 2442FFFF */ addiu $v0, $v0, -0x1 /* 188858 80259F78 080967E4 */ j .L80259F90 /* 18885C 80259F7C A60206C8 */ sh $v0, 0x6C8($s0) .L80259F80: /* 188860 80259F80 820206C2 */ lb $v0, 0x6C2($s0) /* 188864 80259F84 3C038028 */ lui $v1, %hi(D_80284080) /* 188868 80259F88 00621821 */ addu $v1, $v1, $v0 /* 18886C 80259F8C 90634080 */ lbu $v1, %lo(D_80284080)($v1) .L80259F90: /* 188870 80259F90 24020001 */ addiu $v0, $zero, 0x1 /* 188874 80259F94 10620024 */ beq $v1, $v0, .L8025A028 /* 188878 80259F98 28620002 */ slti $v0, $v1, 0x2 /* 18887C 80259F9C 10400005 */ beqz $v0, .L80259FB4 /* 188880 80259FA0 24020002 */ addiu $v0, $zero, 0x2 /* 188884 80259FA4 10600007 */ beqz $v1, .L80259FC4 /* 188888 80259FA8 00000000 */ nop /* 18888C 80259FAC 0809688D */ j .L8025A234 /* 188890 80259FB0 00000000 */ nop .L80259FB4: /* 188894 80259FB4 1062003C */ beq $v1, $v0, .L8025A0A8 /* 188898 80259FB8 00000000 */ nop /* 18889C 80259FBC 0809688D */ j .L8025A234 /* 1888A0 80259FC0 00000000 */ nop .L80259FC4: /* 1888A4 80259FC4 820206CC */ lb $v0, 0x6CC($s0) /* 1888A8 80259FC8 1840009A */ blez $v0, .L8025A234 /* 1888AC 80259FCC 0000482D */ daddu $t1, $zero, $zero .L80259FD0: /* 1888B0 80259FD0 8E0206D0 */ lw $v0, 0x6D0($s0) /* 1888B4 80259FD4 00091880 */ sll $v1, $t1, 2 /* 1888B8 80259FD8 00621821 */ addu $v1, $v1, $v0 /* 1888BC 80259FDC 00091140 */ sll $v0, $t1, 5 /* 1888C0 80259FE0 8C660000 */ lw $a2, 0x0($v1) /* 1888C4 80259FE4 10C00009 */ beqz $a2, .L8025A00C /* 1888C8 80259FE8 02024021 */ addu $t0, $s0, $v0 /* 1888CC 80259FEC 0000382D */ daddu $a3, $zero, $zero .L80259FF0: /* 1888D0 80259FF0 94C20000 */ lhu $v0, 0x0($a2) /* 1888D4 80259FF4 24C60002 */ addiu $a2, $a2, 0x2 /* 1888D8 80259FF8 24E70001 */ addiu $a3, $a3, 0x1 /* 1888DC 80259FFC A5020000 */ sh $v0, 0x0($t0) /* 1888E0 8025A000 28E20010 */ slti $v0, $a3, 0x10 D_8025A004: /* 1888E4 8025A004 1440FFFA */ bnez $v0, .L80259FF0 /* 1888E8 8025A008 25080002 */ addiu $t0, $t0, 0x2 .L8025A00C: /* 1888EC 8025A00C 820206CC */ lb $v0, 0x6CC($s0) /* 1888F0 8025A010 25290001 */ addiu $t1, $t1, 0x1 /* 1888F4 8025A014 0122102A */ slt $v0, $t1, $v0 /* 1888F8 8025A018 10400086 */ beqz $v0, .L8025A234 /* 1888FC 8025A01C 00000000 */ nop /* 188900 8025A020 080967F4 */ j .L80259FD0 /* 188904 8025A024 00000000 */ nop .L8025A028: /* 188908 8025A028 820206CC */ lb $v0, 0x6CC($s0) /* 18890C 8025A02C 920306CC */ lbu $v1, 0x6CC($s0) /* 188910 8025A030 18400080 */ blez $v0, .L8025A234 /* 188914 8025A034 0000482D */ daddu $t1, $zero, $zero /* 188918 8025A038 00031E00 */ sll $v1, $v1, 24 .L8025A03C: /* 18891C 8025A03C 00031E03 */ sra $v1, $v1, 24 /* 188920 8025A040 00031040 */ sll $v0, $v1, 1 /* 188924 8025A044 00431021 */ addu $v0, $v0, $v1 /* 188928 8025A048 00491021 */ addu $v0, $v0, $t1 /* 18892C 8025A04C 8E0306D0 */ lw $v1, 0x6D0($s0) /* 188930 8025A050 00021080 */ sll $v0, $v0, 2 /* 188934 8025A054 00431021 */ addu $v0, $v0, $v1 /* 188938 8025A058 8C460000 */ lw $a2, 0x0($v0) /* 18893C 8025A05C 00091140 */ sll $v0, $t1, 5 /* 188940 8025A060 10C00009 */ beqz $a2, .L8025A088 /* 188944 8025A064 02024021 */ addu $t0, $s0, $v0 /* 188948 8025A068 0000382D */ daddu $a3, $zero, $zero .L8025A06C: /* 18894C 8025A06C 94C20000 */ lhu $v0, 0x0($a2) /* 188950 8025A070 24C60002 */ addiu $a2, $a2, 0x2 /* 188954 8025A074 24E70001 */ addiu $a3, $a3, 0x1 /* 188958 8025A078 A5020000 */ sh $v0, 0x0($t0) /* 18895C 8025A07C 28E20010 */ slti $v0, $a3, 0x10 /* 188960 8025A080 1440FFFA */ bnez $v0, .L8025A06C /* 188964 8025A084 25080002 */ addiu $t0, $t0, 0x2 .L8025A088: /* 188968 8025A088 25290001 */ addiu $t1, $t1, 0x1 /* 18896C 8025A08C 820206CC */ lb $v0, 0x6CC($s0) /* 188970 8025A090 920306CC */ lbu $v1, 0x6CC($s0) /* 188974 8025A094 0122102A */ slt $v0, $t1, $v0 /* 188978 8025A098 1440FFE8 */ bnez $v0, .L8025A03C /* 18897C 8025A09C 00031E00 */ sll $v1, $v1, 24 /* 188980 8025A0A0 0809688D */ j .L8025A234 /* 188984 8025A0A4 00000000 */ nop .L8025A0A8: /* 188988 8025A0A8 820206CC */ lb $v0, 0x6CC($s0) /* 18898C 8025A0AC 18400061 */ blez $v0, .L8025A234 /* 188990 8025A0B0 0000482D */ daddu $t1, $zero, $zero /* 188994 8025A0B4 3C0B8000 */ lui $t3, (0x80000000 >> 16) /* 188998 8025A0B8 3C01802A */ lui $at, %hi(D_8029D400) /* 18899C 8025A0BC D424D400 */ ldc1 $f4, %lo(D_8029D400)($at) /* 1889A0 8025A0C0 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* 1889A4 8025A0C4 44811800 */ mtc1 $at, $f3 /* 1889A8 8025A0C8 44801000 */ mtc1 $zero, $f2 .L8025A0CC: /* 1889AC 8025A0CC 8E0206D0 */ lw $v0, 0x6D0($s0) /* 1889B0 8025A0D0 00091880 */ sll $v1, $t1, 2 /* 1889B4 8025A0D4 00621821 */ addu $v1, $v1, $v0 /* 1889B8 8025A0D8 00091140 */ sll $v0, $t1, 5 /* 1889BC 8025A0DC 8C660000 */ lw $a2, 0x0($v1) /* 1889C0 8025A0E0 10C0004F */ beqz $a2, .L8025A220 /* 1889C4 8025A0E4 02024021 */ addu $t0, $s0, $v0 /* 1889C8 8025A0E8 0000382D */ daddu $a3, $zero, $zero .L8025A0EC: /* 1889CC 8025A0EC 94C30000 */ lhu $v1, 0x0($a2) /* 1889D0 8025A0F0 000312C2 */ srl $v0, $v1, 11 /* 1889D4 8025A0F4 44820000 */ mtc1 $v0, $f0 /* 1889D8 8025A0F8 00000000 */ nop /* 1889DC 8025A0FC 46800021 */ cvt.d.w $f0, $f0 /* 1889E0 8025A100 46240002 */ mul.d $f0, $f0, $f4 /* 1889E4 8025A104 00000000 */ nop /* 1889E8 8025A108 90C40001 */ lbu $a0, 0x1($a2) /* 1889EC 8025A10C 24C60002 */ addiu $a2, $a2, 0x2 /* 1889F0 8025A110 00031182 */ srl $v0, $v1, 6 /* 1889F4 8025A114 3042001F */ andi $v0, $v0, 0x1F /* 1889F8 8025A118 00031842 */ srl $v1, $v1, 1 /* 1889FC 8025A11C 306A001F */ andi $t2, $v1, 0x1F /* 188A00 8025A120 4620103E */ c.le.d $f2, $f0 /* 188A04 8025A124 00000000 */ nop /* 188A08 8025A128 45010005 */ bc1t .L8025A140 /* 188A0C 8025A12C 30840001 */ andi $a0, $a0, 0x1 /* 188A10 8025A130 4620018D */ trunc.w.d $f6, $f0 /* 188A14 8025A134 44033000 */ mfc1 $v1, $f6 /* 188A18 8025A138 08096856 */ j .L8025A158 /* 188A1C 8025A13C 304200FF */ andi $v0, $v0, 0xFF .L8025A140: /* 188A20 8025A140 46220001 */ sub.d $f0, $f0, $f2 /* 188A24 8025A144 4620018D */ trunc.w.d $f6, $f0 /* 188A28 8025A148 44033000 */ mfc1 $v1, $f6 /* 188A2C 8025A14C 00000000 */ nop /* 188A30 8025A150 006B1825 */ or $v1, $v1, $t3 /* 188A34 8025A154 304200FF */ andi $v0, $v0, 0xFF .L8025A158: /* 188A38 8025A158 44820000 */ mtc1 $v0, $f0 /* 188A3C 8025A15C 00000000 */ nop /* 188A40 8025A160 46800021 */ cvt.d.w $f0, $f0 /* 188A44 8025A164 46240002 */ mul.d $f0, $f0, $f4 /* 188A48 8025A168 00000000 */ nop /* 188A4C 8025A16C 4620103E */ c.le.d $f2, $f0 /* 188A50 8025A170 00000000 */ nop /* 188A54 8025A174 45030005 */ bc1tl .L8025A18C /* 188A58 8025A178 46220001 */ sub.d $f0, $f0, $f2 /* 188A5C 8025A17C 4620018D */ trunc.w.d $f6, $f0 /* 188A60 8025A180 44053000 */ mfc1 $a1, $f6 /* 188A64 8025A184 08096868 */ j .L8025A1A0 /* 188A68 8025A188 314200FF */ andi $v0, $t2, 0xFF .L8025A18C: /* 188A6C 8025A18C 4620018D */ trunc.w.d $f6, $f0 /* 188A70 8025A190 44053000 */ mfc1 $a1, $f6 /* 188A74 8025A194 00000000 */ nop /* 188A78 8025A198 00AB2825 */ or $a1, $a1, $t3 /* 188A7C 8025A19C 314200FF */ andi $v0, $t2, 0xFF .L8025A1A0: /* 188A80 8025A1A0 44820000 */ mtc1 $v0, $f0 /* 188A84 8025A1A4 00000000 */ nop /* 188A88 8025A1A8 46800021 */ cvt.d.w $f0, $f0 /* 188A8C 8025A1AC 46240002 */ mul.d $f0, $f0, $f4 /* 188A90 8025A1B0 00000000 */ nop /* 188A94 8025A1B4 4620103E */ c.le.d $f2, $f0 /* 188A98 8025A1B8 00000000 */ nop /* 188A9C 8025A1BC 45010005 */ bc1t .L8025A1D4 /* 188AA0 8025A1C0 00A0102D */ daddu $v0, $a1, $zero /* 188AA4 8025A1C4 4620018D */ trunc.w.d $f6, $f0 /* 188AA8 8025A1C8 44053000 */ mfc1 $a1, $f6 /* 188AAC 8025A1CC 0809687B */ j .L8025A1EC /* 188AB0 8025A1D0 306300FF */ andi $v1, $v1, 0xFF .L8025A1D4: /* 188AB4 8025A1D4 46220001 */ sub.d $f0, $f0, $f2 /* 188AB8 8025A1D8 4620018D */ trunc.w.d $f6, $f0 /* 188ABC 8025A1DC 44053000 */ mfc1 $a1, $f6 /* 188AC0 8025A1E0 00000000 */ nop /* 188AC4 8025A1E4 00AB2825 */ or $a1, $a1, $t3 /* 188AC8 8025A1E8 306300FF */ andi $v1, $v1, 0xFF .L8025A1EC: /* 188ACC 8025A1EC 00031AC0 */ sll $v1, $v1, 11 /* 188AD0 8025A1F0 304200FF */ andi $v0, $v0, 0xFF /* 188AD4 8025A1F4 00021180 */ sll $v0, $v0, 6 /* 188AD8 8025A1F8 00621825 */ or $v1, $v1, $v0 /* 188ADC 8025A1FC 30A200FF */ andi $v0, $a1, 0xFF /* 188AE0 8025A200 00021040 */ sll $v0, $v0, 1 /* 188AE4 8025A204 00621825 */ or $v1, $v1, $v0 /* 188AE8 8025A208 00831825 */ or $v1, $a0, $v1 /* 188AEC 8025A20C A5030000 */ sh $v1, 0x0($t0) /* 188AF0 8025A210 24E70001 */ addiu $a3, $a3, 0x1 /* 188AF4 8025A214 28E20010 */ slti $v0, $a3, 0x10 /* 188AF8 8025A218 1440FFB4 */ bnez $v0, .L8025A0EC /* 188AFC 8025A21C 25080002 */ addiu $t0, $t0, 0x2 .L8025A220: /* 188B00 8025A220 820206CC */ lb $v0, 0x6CC($s0) /* 188B04 8025A224 25290001 */ addiu $t1, $t1, 0x1 /* 188B08 8025A228 0122102A */ slt $v0, $t1, $v0 /* 188B0C 8025A22C 1440FFA7 */ bnez $v0, .L8025A0CC /* 188B10 8025A230 00000000 */ nop .L8025A234: /* 188B14 8025A234 820206CD */ lb $v0, 0x6CD($s0) /* 188B18 8025A238 1840000A */ blez $v0, .L8025A264 /* 188B1C 8025A23C 0000482D */ daddu $t1, $zero, $zero /* 188B20 8025A240 0200202D */ daddu $a0, $s0, $zero /* 188B24 8025A244 0200182D */ daddu $v1, $s0, $zero .L8025A248: /* 188B28 8025A248 AC6406D4 */ sw $a0, 0x6D4($v1) /* 188B2C 8025A24C 24840020 */ addiu $a0, $a0, 0x20 /* 188B30 8025A250 820206CD */ lb $v0, 0x6CD($s0) /* 188B34 8025A254 25290001 */ addiu $t1, $t1, 0x1 /* 188B38 8025A258 0122102A */ slt $v0, $t1, $v0 /* 188B3C 8025A25C 1440FFFA */ bnez $v0, .L8025A248 /* 188B40 8025A260 24630004 */ addiu $v1, $v1, 0x4 .L8025A264: /* 188B44 8025A264 16400006 */ bnez $s2, .L8025A280 /* 188B48 8025A268 0220202D */ daddu $a0, $s1, $zero /* 188B4C 8025A26C 0260282D */ daddu $a1, $s3, $zero /* 188B50 8025A270 0C096657 */ jal func_8025995C /* 188B54 8025A274 0280302D */ daddu $a2, $s4, $zero /* 188B58 8025A278 080968A3 */ j .L8025A28C /* 188B5C 8025A27C 00000000 */ nop .L8025A280: /* 188B60 8025A280 0260282D */ daddu $a1, $s3, $zero /* 188B64 8025A284 0C0965B0 */ jal func_802596C0 /* 188B68 8025A288 0280302D */ daddu $a2, $s4, $zero .L8025A28C: /* 188B6C 8025A28C 16A00004 */ bnez $s5, .L8025A2A0 /* 188B70 8025A290 00000000 */ nop /* 188B74 8025A294 960206CA */ lhu $v0, 0x6CA($s0) /* 188B78 8025A298 2442FFFF */ addiu $v0, $v0, -0x1 /* 188B7C 8025A29C A60206CA */ sh $v0, 0x6CA($s0) .L8025A2A0: /* 188B80 8025A2A0 8FBF0028 */ lw $ra, 0x28($sp) /* 188B84 8025A2A4 8FB50024 */ lw $s5, 0x24($sp) /* 188B88 8025A2A8 8FB40020 */ lw $s4, 0x20($sp) /* 188B8C 8025A2AC 8FB3001C */ lw $s3, 0x1C($sp) /* 188B90 8025A2B0 8FB20018 */ lw $s2, 0x18($sp) /* 188B94 8025A2B4 8FB10014 */ lw $s1, 0x14($sp) /* 188B98 8025A2B8 8FB00010 */ lw $s0, 0x10($sp) /* 188B9C 8025A2BC 03E00008 */ jr $ra /* 188BA0 8025A2C0 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void render_with_static_palettes(b32 isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, b32 skipAnimation) { DecorationTable* decorationTable = part->decorationTable; PAL_PTR palIn; PAL_PTR palOut; s32 i, j; s32 paletteType; s32 staticPalIdx; if (decorationTable->resetPalAdjust) { if (isNpcSprite == SPRITE_MODE_PLAYER) { decorationTable->originalPalettesList = spr_get_player_palettes(part->currentAnimation >> 16); decorationTable->originalPalettesCount = 0; while ((s32)decorationTable->originalPalettesList[decorationTable->originalPalettesCount] != -1) { decorationTable->originalPalettesCount++; } decorationTable->spriteColorVariations = SPR_PLAYER_COLOR_VARIATIONS; } else { decorationTable->originalPalettesList = spr_get_npc_palettes(part->currentAnimation >> 16); decorationTable->originalPalettesCount = 0; while ((s32)decorationTable->originalPalettesList[decorationTable->originalPalettesCount] != -1) { decorationTable->originalPalettesCount++; } decorationTable->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); } for (i = 0; i < decorationTable->originalPalettesCount; i++) { palIn = decorationTable->originalPalettesList[i]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } decorationTable->palAnimState = -2; decorationTable->palBlendAlpha = 0; decorationTable->resetPalAdjust = FALSE; decorationTable->nextPalTime = 0; } if (!skipAnimation) { if (decorationTable->nextPalTime == 0) { decorationTable->palAnimState += 2; if (StaticPalettesAnim[decorationTable->palAnimState] == PAL_ANIM_END) { decorationTable->palAnimState = 0; } decorationTable->nextPalTime = StaticPalettesAnim[decorationTable->palAnimState + 1] / 2; } paletteType = StaticPalettesAnim[decorationTable->palAnimState]; decorationTable->nextPalTime--; } else { paletteType = StaticPalettesAnim[decorationTable->palAnimState]; } switch (paletteType) { case STATIC_DEFAULT: // no change for (i = 0; i < decorationTable->spriteColorVariations; i++) { palIn = decorationTable->originalPalettesList[i]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } break; case STATIC_BRIGHT: // bright yellow for (i = 0; i < decorationTable->spriteColorVariations; i++) { staticPalIdx = decorationTable->spriteColorVariations * STANDARD_PAL_STATIC + i; palIn = decorationTable->originalPalettesList[staticPalIdx]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } break; case STATIC_DARK: // darkened via code for (i = 0; i < decorationTable->spriteColorVariations; i++) { palIn = decorationTable->originalPalettesList[i]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { u8 r = UNPACK_PAL_R(*palIn); u8 g = UNPACK_PAL_G(*palIn); u8 b = UNPACK_PAL_B(*palIn); u8 a = UNPACK_PAL_A(*palIn); palIn++; r *= 0.1; g *= 0.1; b *= 0.1; *palOut++ = PACK_PAL_RGBA(r, g, b, a); } } } break; } for (i = 0; i < decorationTable->originalPalettesCount; i++) { decorationTable->adjustedPalettes[i] = decorationTable->copiedPalettes[0][i]; } if (isNpcSprite == SPRITE_MODE_PLAYER) { func_8025995C(part, yaw, mtx); } else { func_802596C0(part, yaw, mtx); } if (!skipAnimation) { decorationTable->palBlendAlpha--; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel sleep_bubble_appendGfx /* 35CEE0 E0052460 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 35CEE4 E0052464 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 35CEE8 E0052468 3C07800A */ lui $a3, %hi(gMainGfxPos) /* 35CEEC E005246C 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* 35CEF0 E0052470 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 35CEF4 E0052474 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 35CEF8 E0052478 AFBF00C4 */ sw $ra, 0xC4($sp) /* 35CEFC E005247C AFBE00C0 */ sw $fp, 0xC0($sp) /* 35CF00 E0052480 AFB700BC */ sw $s7, 0xBC($sp) /* 35CF04 E0052484 AFB600B8 */ sw $s6, 0xB8($sp) /* 35CF08 E0052488 AFB500B4 */ sw $s5, 0xB4($sp) /* 35CF0C E005248C AFB400B0 */ sw $s4, 0xB0($sp) /* 35CF10 E0052490 AFB300AC */ sw $s3, 0xAC($sp) /* 35CF14 E0052494 AFB200A8 */ sw $s2, 0xA8($sp) /* 35CF18 E0052498 AFB100A4 */ sw $s1, 0xA4($sp) /* 35CF1C E005249C AFB000A0 */ sw $s0, 0xA0($sp) /* 35CF20 E00524A0 F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 35CF24 E00524A4 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 35CF28 E00524A8 8CE60000 */ lw $a2, 0x0($a3) /* 35CF2C E00524AC 8C88000C */ lw $t0, 0xC($a0) /* 35CF30 E00524B0 00C0182D */ daddu $v1, $a2, $zero /* 35CF34 E00524B4 24C60008 */ addiu $a2, $a2, 0x8 /* 35CF38 E00524B8 AC620000 */ sw $v0, 0x0($v1) /* 35CF3C E00524BC AC600004 */ sw $zero, 0x4($v1) /* 35CF40 E00524C0 ACC50000 */ sw $a1, 0x0($a2) /* 35CF44 E00524C4 8C820010 */ lw $v0, 0x10($a0) /* 35CF48 E00524C8 ACE60000 */ sw $a2, 0x0($a3) /* 35CF4C E00524CC 8C42001C */ lw $v0, 0x1C($v0) /* 35CF50 E00524D0 3C038000 */ lui $v1, (0x80000000 >> 16) /* 35CF54 E00524D4 00431021 */ addu $v0, $v0, $v1 /* 35CF58 E00524D8 ACC20004 */ sw $v0, 0x4($a2) /* 35CF5C E00524DC 8D0A001C */ lw $t2, 0x1C($t0) /* 35CF60 E00524E0 24C20008 */ addiu $v0, $a2, 0x8 /* 35CF64 E00524E4 AFAA0098 */ sw $t2, 0x98($sp) /* 35CF68 E00524E8 15400009 */ bnez $t2, .LE0052510 /* 35CF6C E00524EC ACE20000 */ sw $v0, 0x0($a3) /* 35CF70 E00524F0 24C20010 */ addiu $v0, $a2, 0x10 /* 35CF74 E00524F4 ACE20000 */ sw $v0, 0x0($a3) /* 35CF78 E00524F8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35CF7C E00524FC ACC20008 */ sw $v0, 0x8($a2) /* 35CF80 E0052500 3C020900 */ lui $v0, %hi(D_09000440_4154A0) /* 35CF84 E0052504 24420440 */ addiu $v0, $v0, %lo(D_09000440_4154A0) /* 35CF88 E0052508 08014955 */ j .LE0052554 /* 35CF8C E005250C ACC2000C */ sw $v0, 0xC($a2) .LE0052510: /* 35CF90 E0052510 8FAA0098 */ lw $t2, 0x98($sp) /* 35CF94 E0052514 24020001 */ addiu $v0, $zero, 0x1 /* 35CF98 E0052518 15420008 */ bne $t2, $v0, .LE005253C /* 35CF9C E005251C 24C20010 */ addiu $v0, $a2, 0x10 /* 35CFA0 E0052520 ACE20000 */ sw $v0, 0x0($a3) /* 35CFA4 E0052524 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35CFA8 E0052528 ACC20008 */ sw $v0, 0x8($a2) /* 35CFAC E005252C 3C020900 */ lui $v0, %hi(D_09000390_4153F0) /* 35CFB0 E0052530 24420390 */ addiu $v0, $v0, %lo(D_09000390_4153F0) /* 35CFB4 E0052534 08014955 */ j .LE0052554 /* 35CFB8 E0052538 ACC2000C */ sw $v0, 0xC($a2) .LE005253C: /* 35CFBC E005253C ACE20000 */ sw $v0, 0x0($a3) /* 35CFC0 E0052540 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35CFC4 E0052544 ACC20008 */ sw $v0, 0x8($a2) /* 35CFC8 E0052548 3C020900 */ lui $v0, %hi(D_090002E0_415340) /* 35CFCC E005254C 244202E0 */ addiu $v0, $v0, %lo(D_090002E0_415340) /* 35CFD0 E0052550 ACC2000C */ sw $v0, 0xC($a2) .LE0052554: /* 35CFD4 E0052554 27A40018 */ addiu $a0, $sp, 0x18 /* 35CFD8 E0052558 3C120001 */ lui $s2, (0x11630 >> 16) /* 35CFDC E005255C 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 35CFE0 E0052560 0000982D */ daddu $s3, $zero, $zero /* 35CFE4 E0052564 3C02800A */ lui $v0, %hi(gDisplayContext) /* 35CFE8 E0052568 2442A674 */ addiu $v0, $v0, %lo(gDisplayContext) /* 35CFEC E005256C 0040B82D */ daddu $s7, $v0, $zero /* 35CFF0 E0052570 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 35CFF4 E0052574 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos) /* 35CFF8 E0052578 0040B02D */ daddu $s6, $v0, $zero /* 35CFFC E005257C 3C1E0001 */ lui $fp, (0x11630 >> 16) /* 35D000 E0052580 37DE1630 */ ori $fp, $fp, (0x11630 & 0xFFFF) /* 35D004 E0052584 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 35D008 E0052588 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 35D00C E005258C 0040A82D */ daddu $s5, $v0, $zero /* 35D010 E0052590 8D050004 */ lw $a1, 0x4($t0) /* 35D014 E0052594 8D060008 */ lw $a2, 0x8($t0) /* 35D018 E0052598 8D07000C */ lw $a3, 0xC($t0) /* 35D01C E005259C 0C080108 */ jal shim_guTranslateF /* 35D020 E00525A0 0100A02D */ daddu $s4, $t0, $zero /* 35D024 E00525A4 27A40018 */ addiu $a0, $sp, 0x18 /* 35D028 E00525A8 96C50000 */ lhu $a1, 0x0($s6) /* 35D02C E00525AC 8EE20000 */ lw $v0, 0x0($s7) /* 35D030 E00525B0 00052980 */ sll $a1, $a1, 6 /* 35D034 E00525B4 00B22821 */ addu $a1, $a1, $s2 /* 35D038 E00525B8 0C080118 */ jal shim_guMtxF2L /* 35D03C E00525BC 00452821 */ addu $a1, $v0, $a1 /* 35D040 E00525C0 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 35D044 E00525C4 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 35D048 E00525C8 3C050100 */ lui $a1, (0x1001002 >> 16) /* 35D04C E00525CC 34A51002 */ ori $a1, $a1, (0x1001002 & 0xFFFF) /* 35D050 E00525D0 3C110900 */ lui $s1, %hi(D_09000190_4151F0) /* 35D054 E00525D4 26310190 */ addiu $s1, $s1, %lo(D_09000190_4151F0) /* 35D058 E00525D8 4480A000 */ mtc1 $zero, $f20 /* 35D05C E00525DC 8EA80000 */ lw $t0, 0x0($s5) /* 35D060 E00525E0 96C90000 */ lhu $t1, 0x0($s6) /* 35D064 E00525E4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 35D068 E00525E8 4481B000 */ mtc1 $at, $f22 /* 35D06C E00525EC 0100202D */ daddu $a0, $t0, $zero /* 35D070 E00525F0 25080008 */ addiu $t0, $t0, 0x8 /* 35D074 E00525F4 AC820000 */ sw $v0, 0x0($a0) /* 35D078 E00525F8 3122FFFF */ andi $v0, $t1, 0xFFFF /* 35D07C E00525FC 00021180 */ sll $v0, $v0, 6 /* 35D080 E0052600 00521021 */ addu $v0, $v0, $s2 /* 35D084 E0052604 25290001 */ addiu $t1, $t1, 0x1 /* 35D088 E0052608 4406A000 */ mfc1 $a2, $f20 /* 35D08C E005260C 8EE30000 */ lw $v1, 0x0($s7) /* 35D090 E0052610 4407A000 */ mfc1 $a3, $f20 /* 35D094 E0052614 00621821 */ addu $v1, $v1, $v0 /* 35D098 E0052618 AC830004 */ sw $v1, 0x4($a0) /* 35D09C E005261C AD050000 */ sw $a1, 0x0($t0) /* 35D0A0 E0052620 AD110004 */ sw $s1, 0x4($t0) /* 35D0A4 E0052624 E7B60010 */ swc1 $f22, 0x10($sp) /* 35D0A8 E0052628 8E850010 */ lw $a1, 0x10($s4) /* 35D0AC E005262C 27A40018 */ addiu $a0, $sp, 0x18 /* 35D0B0 E0052630 AEA80000 */ sw $t0, 0x0($s5) /* 35D0B4 E0052634 25080008 */ addiu $t0, $t0, 0x8 /* 35D0B8 E0052638 A6C90000 */ sh $t1, 0x0($s6) /* 35D0BC E005263C 0C080104 */ jal shim_guRotateF /* 35D0C0 E0052640 AEA80000 */ sw $t0, 0x0($s5) /* 35D0C4 E0052644 27A40018 */ addiu $a0, $sp, 0x18 /* 35D0C8 E0052648 96C50000 */ lhu $a1, 0x0($s6) /* 35D0CC E005264C 8EE20000 */ lw $v0, 0x0($s7) /* 35D0D0 E0052650 00052980 */ sll $a1, $a1, 6 /* 35D0D4 E0052654 00B22821 */ addu $a1, $a1, $s2 /* 35D0D8 E0052658 0C080118 */ jal shim_guMtxF2L /* 35D0DC E005265C 00452821 */ addu $a1, $v0, $a1 /* 35D0E0 E0052660 3C03DA38 */ lui $v1, (0xDA380001 >> 16) /* 35D0E4 E0052664 34630001 */ ori $v1, $v1, (0xDA380001 & 0xFFFF) /* 35D0E8 E0052668 27A40018 */ addiu $a0, $sp, 0x18 /* 35D0EC E005266C 8EA20000 */ lw $v0, 0x0($s5) /* 35D0F0 E0052670 4406A000 */ mfc1 $a2, $f20 /* 35D0F4 E0052674 96C80000 */ lhu $t0, 0x0($s6) /* 35D0F8 E0052678 0040482D */ daddu $t1, $v0, $zero /* 35D0FC E005267C 24420008 */ addiu $v0, $v0, 0x8 /* 35D100 E0052680 AEA20000 */ sw $v0, 0x0($s5) /* 35D104 E0052684 AD230000 */ sw $v1, 0x0($t1) /* 35D108 E0052688 3103FFFF */ andi $v1, $t0, 0xFFFF /* 35D10C E005268C 00031980 */ sll $v1, $v1, 6 /* 35D110 E0052690 00721821 */ addu $v1, $v1, $s2 /* 35D114 E0052694 8EE20000 */ lw $v0, 0x0($s7) /* 35D118 E0052698 3C058007 */ lui $a1, %hi(gCurrentCameraID) /* 35D11C E005269C 8CA57410 */ lw $a1, %lo(gCurrentCameraID)($a1) /* 35D120 E00526A0 00431021 */ addu $v0, $v0, $v1 /* 35D124 E00526A4 AD220004 */ sw $v0, 0x4($t1) /* 35D128 E00526A8 00051080 */ sll $v0, $a1, 2 /* 35D12C E00526AC 00451021 */ addu $v0, $v0, $a1 /* 35D130 E00526B0 00021080 */ sll $v0, $v0, 2 /* 35D134 E00526B4 00451023 */ subu $v0, $v0, $a1 /* 35D138 E00526B8 000218C0 */ sll $v1, $v0, 3 /* 35D13C E00526BC 00431021 */ addu $v0, $v0, $v1 /* 35D140 E00526C0 000210C0 */ sll $v0, $v0, 3 /* 35D144 E00526C4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 35D148 E00526C8 00220821 */ addu $at, $at, $v0 /* 35D14C E00526CC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 35D150 E00526D0 4407B000 */ mfc1 $a3, $f22 /* 35D154 E00526D4 46000007 */ neg.s $f0, $f0 /* 35D158 E00526D8 44050000 */ mfc1 $a1, $f0 /* 35D15C E00526DC 25080001 */ addiu $t0, $t0, 0x1 /* 35D160 E00526E0 A6C80000 */ sh $t0, 0x0($s6) /* 35D164 E00526E4 0C080104 */ jal shim_guRotateF /* 35D168 E00526E8 E7B40010 */ swc1 $f20, 0x10($sp) /* 35D16C E00526EC 27B00058 */ addiu $s0, $sp, 0x58 /* 35D170 E00526F0 8E8500C4 */ lw $a1, 0xC4($s4) /* 35D174 E00526F4 8E8600C8 */ lw $a2, 0xC8($s4) /* 35D178 E00526F8 4407A000 */ mfc1 $a3, $f20 /* 35D17C E00526FC 0C080108 */ jal shim_guTranslateF /* 35D180 E0052700 0200202D */ daddu $a0, $s0, $zero /* 35D184 E0052704 0200202D */ daddu $a0, $s0, $zero /* 35D188 E0052708 27A50018 */ addiu $a1, $sp, 0x18 /* 35D18C E005270C 0C080114 */ jal shim_guMtxCatF /* 35D190 E0052710 00A0302D */ daddu $a2, $a1, $zero /* 35D194 E0052714 27A40018 */ addiu $a0, $sp, 0x18 /* 35D198 E0052718 96C50000 */ lhu $a1, 0x0($s6) /* 35D19C E005271C 8EE20000 */ lw $v0, 0x0($s7) /* 35D1A0 E0052720 00052980 */ sll $a1, $a1, 6 /* 35D1A4 E0052724 00B22821 */ addu $a1, $a1, $s2 /* 35D1A8 E0052728 0C080118 */ jal shim_guMtxF2L /* 35D1AC E005272C 00452821 */ addu $a1, $v0, $a1 /* 35D1B0 E0052730 3C060100 */ lui $a2, (0x1001004 >> 16) /* 35D1B4 E0052734 34C61004 */ ori $a2, $a2, (0x1001004 & 0xFFFF) /* 35D1B8 E0052738 8EA40000 */ lw $a0, 0x0($s5) /* 35D1BC E005273C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 35D1C0 E0052740 0080282D */ daddu $a1, $a0, $zero /* 35D1C4 E0052744 24840008 */ addiu $a0, $a0, 0x8 /* 35D1C8 E0052748 AEA40000 */ sw $a0, 0x0($s5) /* 35D1CC E005274C 96C20000 */ lhu $v0, 0x0($s6) /* 35D1D0 E0052750 2631FFF0 */ addiu $s1, $s1, -0x10 /* 35D1D4 E0052754 ACA30000 */ sw $v1, 0x0($a1) /* 35D1D8 E0052758 24430001 */ addiu $v1, $v0, 0x1 /* 35D1DC E005275C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 35D1E0 E0052760 00021180 */ sll $v0, $v0, 6 /* 35D1E4 E0052764 A6C30000 */ sh $v1, 0x0($s6) /* 35D1E8 E0052768 8EE30000 */ lw $v1, 0x0($s7) /* 35D1EC E005276C 00521021 */ addu $v0, $v0, $s2 /* 35D1F0 E0052770 00621821 */ addu $v1, $v1, $v0 /* 35D1F4 E0052774 24820008 */ addiu $v0, $a0, 0x8 /* 35D1F8 E0052778 ACA30004 */ sw $v1, 0x4($a1) /* 35D1FC E005277C AEA20000 */ sw $v0, 0x0($s5) /* 35D200 E0052780 AC860000 */ sw $a2, 0x0($a0) /* 35D204 E0052784 AC910004 */ sw $s1, 0x4($a0) .LE0052788: /* 35D208 E0052788 27A40018 */ addiu $a0, $sp, 0x18 /* 35D20C E005278C 0000382D */ daddu $a3, $zero, $zero /* 35D210 E0052790 8E850024 */ lw $a1, 0x24($s4) /* 35D214 E0052794 8E860028 */ lw $a2, 0x28($s4) /* 35D218 E0052798 0C080108 */ jal shim_guTranslateF /* 35D21C E005279C 26940008 */ addiu $s4, $s4, 0x8 /* 35D220 E00527A0 27A40018 */ addiu $a0, $sp, 0x18 /* 35D224 E00527A4 96C50000 */ lhu $a1, 0x0($s6) /* 35D228 E00527A8 8EE20000 */ lw $v0, 0x0($s7) /* 35D22C E00527AC 00052980 */ sll $a1, $a1, 6 /* 35D230 E00527B0 00BE2821 */ addu $a1, $a1, $fp /* 35D234 E00527B4 0C080118 */ jal shim_guMtxF2L /* 35D238 E00527B8 00452821 */ addu $a1, $v0, $a1 /* 35D23C E00527BC 3C080100 */ lui $t0, (0x1001000 >> 16) /* 35D240 E00527C0 35081000 */ ori $t0, $t0, (0x1001000 & 0xFFFF) /* 35D244 E00527C4 3C09D838 */ lui $t1, (0xD8380002 >> 16) /* 35D248 E00527C8 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF) /* 35D24C E00527CC 26640003 */ addiu $a0, $s3, 0x3 /* 35D250 E00527D0 00133100 */ sll $a2, $s3, 4 /* 35D254 E00527D4 26730001 */ addiu $s3, $s3, 0x1 /* 35D258 E00527D8 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 35D25C E00527DC 3084007F */ andi $a0, $a0, 0x7F /* 35D260 E00527E0 8EA50000 */ lw $a1, 0x0($s5) /* 35D264 E00527E4 00042040 */ sll $a0, $a0, 1 /* 35D268 E00527E8 00A0382D */ daddu $a3, $a1, $zero /* 35D26C E00527EC 24A50008 */ addiu $a1, $a1, 0x8 /* 35D270 E00527F0 AEA50000 */ sw $a1, 0x0($s5) /* 35D274 E00527F4 96C20000 */ lhu $v0, 0x0($s6) /* 35D278 E00527F8 00882025 */ or $a0, $a0, $t0 /* 35D27C E00527FC ACE30000 */ sw $v1, 0x0($a3) /* 35D280 E0052800 24430001 */ addiu $v1, $v0, 0x1 /* 35D284 E0052804 3042FFFF */ andi $v0, $v0, 0xFFFF /* 35D288 E0052808 00021180 */ sll $v0, $v0, 6 /* 35D28C E005280C A6C30000 */ sh $v1, 0x0($s6) /* 35D290 E0052810 8EE30000 */ lw $v1, 0x0($s7) /* 35D294 E0052814 005E1021 */ addu $v0, $v0, $fp /* 35D298 E0052818 00621821 */ addu $v1, $v1, $v0 /* 35D29C E005281C 24A20008 */ addiu $v0, $a1, 0x8 /* 35D2A0 E0052820 ACE30004 */ sw $v1, 0x4($a3) /* 35D2A4 E0052824 AEA20000 */ sw $v0, 0x0($s5) /* 35D2A8 E0052828 3C020900 */ lui $v0, %hi(D_090001A0_415200) /* 35D2AC E005282C 244201A0 */ addiu $v0, $v0, %lo(D_090001A0_415200) /* 35D2B0 E0052830 00C23021 */ addu $a2, $a2, $v0 /* 35D2B4 E0052834 24A20010 */ addiu $v0, $a1, 0x10 /* 35D2B8 E0052838 24030040 */ addiu $v1, $zero, 0x40 /* 35D2BC E005283C ACA40000 */ sw $a0, 0x0($a1) /* 35D2C0 E0052840 ACA60004 */ sw $a2, 0x4($a1) /* 35D2C4 E0052844 AEA20000 */ sw $v0, 0x0($s5) /* 35D2C8 E0052848 2A620014 */ slti $v0, $s3, 0x14 /* 35D2CC E005284C ACA90008 */ sw $t1, 0x8($a1) /* 35D2D0 E0052850 1440FFCD */ bnez $v0, .LE0052788 /* 35D2D4 E0052854 ACA3000C */ sw $v1, 0xC($a1) /* 35D2D8 E0052858 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 35D2DC E005285C 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 35D2E0 E0052860 8CC50000 */ lw $a1, 0x0($a2) /* 35D2E4 E0052864 00A0102D */ daddu $v0, $a1, $zero /* 35D2E8 E0052868 24A50008 */ addiu $a1, $a1, 0x8 /* 35D2EC E005286C ACC50000 */ sw $a1, 0x0($a2) /* 35D2F0 E0052870 AC490000 */ sw $t1, 0x0($v0) /* 35D2F4 E0052874 AC430004 */ sw $v1, 0x4($v0) /* 35D2F8 E0052878 24A20008 */ addiu $v0, $a1, 0x8 /* 35D2FC E005287C ACC20000 */ sw $v0, 0x0($a2) /* 35D300 E0052880 ACA90000 */ sw $t1, 0x0($a1) /* 35D304 E0052884 ACA30004 */ sw $v1, 0x4($a1) /* 35D308 E0052888 8FAA0098 */ lw $t2, 0x98($sp) /* 35D30C E005288C 29420064 */ slti $v0, $t2, 0x64 /* 35D310 E0052890 1040001F */ beqz $v0, .LE0052910 /* 35D314 E0052894 3C03052A */ lui $v1, (0x52A0402 >> 16) /* 35D318 E0052898 34630402 */ ori $v1, $v1, (0x52A0402 & 0xFFFF) /* 35D31C E005289C 0000982D */ daddu $s3, $zero, $zero /* 35D320 E00528A0 00C0402D */ daddu $t0, $a2, $zero /* 35D324 E00528A4 3C090500 */ lui $t1, (0x5000002 >> 16) /* 35D328 E00528A8 35290002 */ ori $t1, $t1, (0x5000002 & 0xFFFF) /* 35D32C E00528AC 24070006 */ addiu $a3, $zero, 0x6 /* 35D330 E00528B0 24060004 */ addiu $a2, $zero, 0x4 /* 35D334 E00528B4 24A20010 */ addiu $v0, $a1, 0x10 /* 35D338 E00528B8 AD020000 */ sw $v0, 0x0($t0) /* 35D33C E00528BC ACA30008 */ sw $v1, 0x8($a1) /* 35D340 E00528C0 ACA0000C */ sw $zero, 0xC($a1) .LE00528C4: /* 35D344 E00528C4 30E400FF */ andi $a0, $a3, 0xFF /* 35D348 E00528C8 24E70002 */ addiu $a3, $a3, 0x2 /* 35D34C E00528CC 30C300FF */ andi $v1, $a2, 0xFF /* 35D350 E00528D0 24C60002 */ addiu $a2, $a2, 0x2 /* 35D354 E00528D4 26730001 */ addiu $s3, $s3, 0x1 /* 35D358 E00528D8 00031C00 */ sll $v1, $v1, 16 /* 35D35C E00528DC 00042200 */ sll $a0, $a0, 8 /* 35D360 E00528E0 00641825 */ or $v1, $v1, $a0 /* 35D364 E00528E4 8D020000 */ lw $v0, 0x0($t0) /* 35D368 E00528E8 00691825 */ or $v1, $v1, $t1 /* 35D36C E00528EC 0040282D */ daddu $a1, $v0, $zero /* 35D370 E00528F0 24420008 */ addiu $v0, $v0, 0x8 /* 35D374 E00528F4 AD020000 */ sw $v0, 0x0($t0) /* 35D378 E00528F8 2A620013 */ slti $v0, $s3, 0x13 /* 35D37C E00528FC ACA30000 */ sw $v1, 0x0($a1) /* 35D380 E0052900 1440FFF0 */ bnez $v0, .LE00528C4 /* 35D384 E0052904 ACA00004 */ sw $zero, 0x4($a1) /* 35D388 E0052908 08014A67 */ j .LE005299C /* 35D38C E005290C 00000000 */ nop .LE0052910: /* 35D390 E0052910 3C030500 */ lui $v1, (0x5000204 >> 16) /* 35D394 E0052914 34630204 */ ori $v1, $v1, (0x5000204 & 0xFFFF) /* 35D398 E0052918 3C040500 */ lui $a0, (0x5002A02 >> 16) /* 35D39C E005291C 34842A02 */ ori $a0, $a0, (0x5002A02 & 0xFFFF) /* 35D3A0 E0052920 0000982D */ daddu $s3, $zero, $zero /* 35D3A4 E0052924 00C0402D */ daddu $t0, $a2, $zero /* 35D3A8 E0052928 3C090500 */ lui $t1, (0x5000002 >> 16) /* 35D3AC E005292C 35290002 */ ori $t1, $t1, (0x5000002 & 0xFFFF) /* 35D3B0 E0052930 24070006 */ addiu $a3, $zero, 0x6 /* 35D3B4 E0052934 24060004 */ addiu $a2, $zero, 0x4 /* 35D3B8 E0052938 24A20010 */ addiu $v0, $a1, 0x10 /* 35D3BC E005293C AD020000 */ sw $v0, 0x0($t0) /* 35D3C0 E0052940 24A20018 */ addiu $v0, $a1, 0x18 /* 35D3C4 E0052944 ACA30008 */ sw $v1, 0x8($a1) /* 35D3C8 E0052948 ACA0000C */ sw $zero, 0xC($a1) /* 35D3CC E005294C AD020000 */ sw $v0, 0x0($t0) /* 35D3D0 E0052950 ACA40010 */ sw $a0, 0x10($a1) /* 35D3D4 E0052954 ACA00014 */ sw $zero, 0x14($a1) .LE0052958: /* 35D3D8 E0052958 30E400FF */ andi $a0, $a3, 0xFF /* 35D3DC E005295C 24E70002 */ addiu $a3, $a3, 0x2 /* 35D3E0 E0052960 30C300FF */ andi $v1, $a2, 0xFF /* 35D3E4 E0052964 24C60002 */ addiu $a2, $a2, 0x2 /* 35D3E8 E0052968 26730001 */ addiu $s3, $s3, 0x1 /* 35D3EC E005296C 00031C00 */ sll $v1, $v1, 16 /* 35D3F0 E0052970 00042200 */ sll $a0, $a0, 8 /* 35D3F4 E0052974 00641825 */ or $v1, $v1, $a0 /* 35D3F8 E0052978 8D020000 */ lw $v0, 0x0($t0) /* 35D3FC E005297C 00691825 */ or $v1, $v1, $t1 /* 35D400 E0052980 0040282D */ daddu $a1, $v0, $zero /* 35D404 E0052984 24420008 */ addiu $v0, $v0, 0x8 /* 35D408 E0052988 AD020000 */ sw $v0, 0x0($t0) /* 35D40C E005298C 2A620013 */ slti $v0, $s3, 0x13 /* 35D410 E0052990 ACA30000 */ sw $v1, 0x0($a1) /* 35D414 E0052994 1440FFF0 */ bnez $v0, .LE0052958 /* 35D418 E0052998 ACA00004 */ sw $zero, 0x4($a1) .LE005299C: /* 35D41C E005299C 8FBF00C4 */ lw $ra, 0xC4($sp) /* 35D420 E00529A0 8FBE00C0 */ lw $fp, 0xC0($sp) /* 35D424 E00529A4 8FB700BC */ lw $s7, 0xBC($sp) /* 35D428 E00529A8 8FB600B8 */ lw $s6, 0xB8($sp) /* 35D42C E00529AC 8FB500B4 */ lw $s5, 0xB4($sp) /* 35D430 E00529B0 8FB400B0 */ lw $s4, 0xB0($sp) /* 35D434 E00529B4 8FB300AC */ lw $s3, 0xAC($sp) /* 35D438 E00529B8 8FB200A8 */ lw $s2, 0xA8($sp) /* 35D43C E00529BC 8FB100A4 */ lw $s1, 0xA4($sp) /* 35D440 E00529C0 8FB000A0 */ lw $s0, 0xA0($sp) /* 35D444 E00529C4 D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 35D448 E00529C8 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 35D44C E00529CC 03E00008 */ jr $ra /* 35D450 E00529D0 27BD00D8 */ addiu $sp, $sp, 0xD8 /* 35D454 E00529D4 00000000 */ nop /* 35D458 E00529D8 00000000 */ nop /* 35D45C E00529DC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void sleep_bubble_appendGfx(void* effect) { SleepBubbleFXData* data = ((EffectInstance*)effect)->data.sleepBubble; Matrix4f sp18, sp58; s32 timeLeft; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); timeLeft = data->timeLeft; if (timeLeft == 0) { gSPDisplayList(gMainGfxPos++, D_09000440_35D950); } else if (timeLeft == 1) { gSPDisplayList(gMainGfxPos++, D_09000390_35D8A0); } else { gSPDisplayList(gMainGfxPos++, D_090002E0_35D7F0); } shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPVertex(gMainGfxPos++, &D_09000180_35D690[1], 1, 0); shim_guRotateF(sp18, data->unk_10, 0.0f, 0.0f, 1.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); shim_guRotateF(sp18, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guTranslateF(sp58, data->unk_C4, data->unk_C8, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPVertex(gMainGfxPos++, &D_09000180_35D690[0], 1, 1); for (i = 0; i < ARRAY_COUNT(data->points); i++) { shim_guTranslateF(sp18, data->points[i].x, data->points[i].y, 0.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPVertex(gMainGfxPos++, &D_09000180_35D690[i + 2], 1, i + 2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); if (timeLeft < 100) { gSP1Triangle(gMainGfxPos++, 21, 2, 1, 0); for (i = 0; i < ARRAY_COUNT(data->points) - 1; i++) { gSP1Triangle(gMainGfxPos++, i + 2, i + 3, 1, 0); } } else { gSP1Triangle(gMainGfxPos++, 0, 1, 2, 0); gSP1Triangle(gMainGfxPos++, 0, 21, 1, 0); for (i = 0; i < ARRAY_COUNT(data->points) - 1; i++) { gSP1Triangle(gMainGfxPos++, i + 2, i + 3, 1, 0); } } }