text
stringlengths
6.38k
228k
### RAW ASSEMBLY INSTRUCTIONS: glabel render_hud_elements_backUI /* D8910 80142210 27BDFAB0 */ addiu $sp, $sp, -0x550 /* D8914 80142214 3C038016 */ lui $v1, %hi(D_80159180) /* D8918 80142218 24639180 */ addiu $v1, $v1, %lo(D_80159180) /* D891C 8014221C AFBF054C */ sw $ra, 0x54C($sp) /* D8920 80142220 AFBE0548 */ sw $fp, 0x548($sp) /* D8924 80142224 AFB70544 */ sw $s7, 0x544($sp) /* D8928 80142228 AFB60540 */ sw $s6, 0x540($sp) /* D892C 8014222C AFB5053C */ sw $s5, 0x53C($sp) /* D8930 80142230 AFB40538 */ sw $s4, 0x538($sp) /* D8934 80142234 AFB30534 */ sw $s3, 0x534($sp) /* D8938 80142238 AFB20530 */ sw $s2, 0x530($sp) /* D893C 8014223C AFB1052C */ sw $s1, 0x52C($sp) /* D8940 80142240 AFB00528 */ sw $s0, 0x528($sp) /* D8944 80142244 8C620000 */ lw $v0, 0x0($v1) /* D8948 80142248 24420001 */ addiu $v0, $v0, 0x1 /* D894C 8014224C AC620000 */ sw $v0, 0x0($v1) /* D8950 80142250 28420003 */ slti $v0, $v0, 0x3 /* D8954 80142254 50400001 */ beql $v0, $zero, .L8014225C /* D8958 80142258 AC600000 */ sw $zero, 0x0($v1) .L8014225C: /* D895C 8014225C 0000F02D */ daddu $fp, $zero, $zero /* D8960 80142260 03C0B82D */ daddu $s7, $fp, $zero /* D8964 80142264 3C075021 */ lui $a3, (0x50210080 >> 16) /* D8968 80142268 34E70080 */ ori $a3, $a3, (0x50210080 & 0xFFFF) /* D896C 8014226C 27A60028 */ addiu $a2, $sp, 0x28 /* D8970 80142270 3C03800A */ lui $v1, %hi(gMainGfxPos) /* D8974 80142274 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* D8978 80142278 8C620000 */ lw $v0, 0x0($v1) /* D897C 8014227C 3C058015 */ lui $a1, %hi(gHudElements) /* D8980 80142280 8CA57960 */ lw $a1, %lo(gHudElements)($a1) /* D8984 80142284 0040202D */ daddu $a0, $v0, $zero /* D8988 80142288 24420008 */ addiu $v0, $v0, 0x8 /* D898C 8014228C AC620000 */ sw $v0, 0x0($v1) /* D8990 80142290 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* D8994 80142294 AC820000 */ sw $v0, 0x0($a0) /* D8998 80142298 3C020015 */ lui $v0, %hi(D_14F078) /* D899C 8014229C 2442F078 */ addiu $v0, $v0, %lo(D_14F078) /* D89A0 801422A0 AC820004 */ sw $v0, 0x4($a0) .L801422A4: /* D89A4 801422A4 8CB00000 */ lw $s0, 0x0($a1) /* D89A8 801422A8 52000014 */ beql $s0, $zero, .L801422FC /* D89AC 801422AC 26F70001 */ addiu $s7, $s7, 0x1 /* D89B0 801422B0 8E030000 */ lw $v1, 0x0($s0) /* D89B4 801422B4 50600011 */ beql $v1, $zero, .L801422FC /* D89B8 801422B8 26F70001 */ addiu $s7, $s7, 0x1 /* D89BC 801422BC 30620002 */ andi $v0, $v1, 0x2 /* D89C0 801422C0 5440000E */ bnel $v0, $zero, .L801422FC /* D89C4 801422C4 26F70001 */ addiu $s7, $s7, 0x1 /* D89C8 801422C8 00671024 */ and $v0, $v1, $a3 /* D89CC 801422CC 5440000B */ bnel $v0, $zero, .L801422FC /* D89D0 801422D0 26F70001 */ addiu $s7, $s7, 0x1 /* D89D4 801422D4 30620040 */ andi $v0, $v1, 0x40 /* D89D8 801422D8 54400008 */ bnel $v0, $zero, .L801422FC /* D89DC 801422DC 26F70001 */ addiu $s7, $s7, 0x1 /* D89E0 801422E0 82020045 */ lb $v0, 0x45($s0) /* D89E4 801422E4 04420005 */ bltzl $v0, .L801422FC /* D89E8 801422E8 26F70001 */ addiu $s7, $s7, 0x1 /* D89EC 801422EC ACD70000 */ sw $s7, 0x0($a2) /* D89F0 801422F0 24C60004 */ addiu $a2, $a2, 0x4 /* D89F4 801422F4 27DE0001 */ addiu $fp, $fp, 0x1 /* D89F8 801422F8 26F70001 */ addiu $s7, $s7, 0x1 .L801422FC: /* D89FC 801422FC 2AE20140 */ slti $v0, $s7, 0x140 /* D8A00 80142300 1440FFE8 */ bnez $v0, .L801422A4 /* D8A04 80142304 24A50004 */ addiu $a1, $a1, 0x4 /* D8A08 80142308 27C2FFFF */ addiu $v0, $fp, -0x1 /* D8A0C 8014230C 18400024 */ blez $v0, .L801423A0 /* D8A10 80142310 0000B82D */ daddu $s7, $zero, $zero /* D8A14 80142314 3C0D8015 */ lui $t5, %hi(gHudElements) /* D8A18 80142318 25AD7960 */ addiu $t5, $t5, %lo(gHudElements) /* D8A1C 8014231C 27AC0028 */ addiu $t4, $sp, 0x28 /* D8A20 80142320 0180582D */ daddu $t3, $t4, $zero .L80142324: /* D8A24 80142324 26E80001 */ addiu $t0, $s7, 0x1 /* D8A28 80142328 011E102A */ slt $v0, $t0, $fp /* D8A2C 8014232C 50400018 */ beql $v0, $zero, .L80142390 /* D8A30 80142330 26F70001 */ addiu $s7, $s7, 0x1 /* D8A34 80142334 0160502D */ daddu $t2, $t3, $zero /* D8A38 80142338 8DA90000 */ lw $t1, 0x0($t5) /* D8A3C 8014233C 00081080 */ sll $v0, $t0, 2 /* D8A40 80142340 004C3021 */ addu $a2, $v0, $t4 .L80142344: /* D8A44 80142344 8D470000 */ lw $a3, 0x0($t2) /* D8A48 80142348 8CC50000 */ lw $a1, 0x0($a2) /* D8A4C 8014234C 00071880 */ sll $v1, $a3, 2 /* D8A50 80142350 00691821 */ addu $v1, $v1, $t1 /* D8A54 80142354 00051080 */ sll $v0, $a1, 2 /* D8A58 80142358 00491021 */ addu $v0, $v0, $t1 /* D8A5C 8014235C 8C630000 */ lw $v1, 0x0($v1) /* D8A60 80142360 8C440000 */ lw $a0, 0x0($v0) /* D8A64 80142364 80620044 */ lb $v0, 0x44($v1) /* D8A68 80142368 80830044 */ lb $v1, 0x44($a0) /* D8A6C 8014236C 0043102A */ slt $v0, $v0, $v1 /* D8A70 80142370 10400003 */ beqz $v0, .L80142380 /* D8A74 80142374 25080001 */ addiu $t0, $t0, 0x1 /* D8A78 80142378 AD450000 */ sw $a1, 0x0($t2) /* D8A7C 8014237C ACC70000 */ sw $a3, 0x0($a2) .L80142380: /* D8A80 80142380 011E102A */ slt $v0, $t0, $fp /* D8A84 80142384 1440FFEF */ bnez $v0, .L80142344 /* D8A88 80142388 24C60004 */ addiu $a2, $a2, 0x4 /* D8A8C 8014238C 26F70001 */ addiu $s7, $s7, 0x1 .L80142390: /* D8A90 80142390 27C2FFFF */ addiu $v0, $fp, -0x1 /* D8A94 80142394 02E2102A */ slt $v0, $s7, $v0 /* D8A98 80142398 1440FFE2 */ bnez $v0, .L80142324 /* D8A9C 8014239C 256B0004 */ addiu $t3, $t3, 0x4 .L801423A0: /* D8AA0 801423A0 1BC000D2 */ blez $fp, .L801426EC /* D8AA4 801423A4 0000B82D */ daddu $s7, $zero, $zero /* D8AA8 801423A8 00171080 */ sll $v0, $s7, 2 .L801423AC: /* D8AAC 801423AC 03A21021 */ addu $v0, $sp, $v0 /* D8AB0 801423B0 8C420028 */ lw $v0, 0x28($v0) /* D8AB4 801423B4 3C038015 */ lui $v1, %hi(gHudElements) /* D8AB8 801423B8 8C637960 */ lw $v1, %lo(gHudElements)($v1) /* D8ABC 801423BC 00021080 */ sll $v0, $v0, 2 /* D8AC0 801423C0 00431021 */ addu $v0, $v0, $v1 /* D8AC4 801423C4 8C500000 */ lw $s0, 0x0($v0) /* D8AC8 801423C8 8E020004 */ lw $v0, 0x4($s0) /* D8ACC 801423CC 104000C7 */ beqz $v0, .L801426EC /* D8AD0 801423D0 00000000 */ nop /* D8AD4 801423D4 8E030000 */ lw $v1, 0x0($s0) /* D8AD8 801423D8 30620100 */ andi $v0, $v1, 0x100 /* D8ADC 801423DC 1440005B */ bnez $v0, .L8014254C /* D8AE0 801423E0 3C0E0010 */ lui $t6, (0x100000 >> 16) /* D8AE4 801423E4 006E1024 */ and $v0, $v1, $t6 /* D8AE8 801423E8 1440000B */ bnez $v0, .L80142418 /* D8AEC 801423EC 00000000 */ nop /* D8AF0 801423F0 82030046 */ lb $v1, 0x46($s0) /* D8AF4 801423F4 3C0E8015 */ lui $t6, %hi(gHudElementSizes) /* D8AF8 801423F8 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) /* D8AFC 801423FC 00031040 */ sll $v0, $v1, 1 /* D8B00 80142400 00431021 */ addu $v0, $v0, $v1 /* D8B04 80142404 00021040 */ sll $v0, $v0, 1 /* D8B08 80142408 004E1021 */ addu $v0, $v0, $t6 /* D8B0C 8014240C 84560000 */ lh $s6, 0x0($v0) /* D8B10 80142410 08050908 */ j .L80142420 /* D8B14 80142414 84550002 */ lh $s5, 0x2($v0) .L80142418: /* D8B18 80142418 9216004E */ lbu $s6, 0x4E($s0) /* D8B1C 8014241C 9215004F */ lbu $s5, 0x4F($s0) .L80142420: /* D8B20 80142420 8E030000 */ lw $v1, 0x0($s0) /* D8B24 80142424 30620010 */ andi $v0, $v1, 0x10 /* D8B28 80142428 14400013 */ bnez $v0, .L80142478 /* D8B2C 8014242C 3C0E0010 */ lui $t6, (0x100000 >> 16) /* D8B30 80142430 006E1024 */ and $v0, $v1, $t6 /* D8B34 80142434 1440000C */ bnez $v0, .L80142468 /* D8B38 80142438 00000000 */ nop /* D8B3C 8014243C 82030045 */ lb $v1, 0x45($s0) /* D8B40 80142440 3C0E8015 */ lui $t6, %hi(gHudElementSizes) /* D8B44 80142444 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) /* D8B48 80142448 00031040 */ sll $v0, $v1, 1 /* D8B4C 8014244C 00431021 */ addu $v0, $v0, $v1 /* D8B50 80142450 00021040 */ sll $v0, $v0, 1 /* D8B54 80142454 004E1021 */ addu $v0, $v0, $t6 /* D8B58 80142458 84510000 */ lh $s1, 0x0($v0) /* D8B5C 8014245C 84520002 */ lh $s2, 0x2($v0) /* D8B60 80142460 08050921 */ j .L80142484 /* D8B64 80142464 00111023 */ negu $v0, $s1 .L80142468: /* D8B68 80142468 92110050 */ lbu $s1, 0x50($s0) /* D8B6C 8014246C 92120051 */ lbu $s2, 0x51($s0) /* D8B70 80142470 08050921 */ j .L80142484 /* D8B74 80142474 00111023 */ negu $v0, $s1 .L80142478: /* D8B78 80142478 92110048 */ lbu $s1, 0x48($s0) /* D8B7C 8014247C 92120049 */ lbu $s2, 0x49($s0) /* D8B80 80142480 00111023 */ negu $v0, $s1 .L80142484: /* D8B84 80142484 00021FC2 */ srl $v1, $v0, 31 /* D8B88 80142488 00431021 */ addu $v0, $v0, $v1 /* D8B8C 8014248C 00029843 */ sra $s3, $v0, 1 /* D8B90 80142490 00121023 */ negu $v0, $s2 /* D8B94 80142494 00021FC2 */ srl $v1, $v0, 31 /* D8B98 80142498 00431021 */ addu $v0, $v0, $v1 /* D8B9C 8014249C 0002A043 */ sra $s4, $v0, 1 /* D8BA0 801424A0 8E030000 */ lw $v1, 0x0($s0) /* D8BA4 801424A4 30620800 */ andi $v0, $v1, 0x800 /* D8BA8 801424A8 14400026 */ bnez $v0, .L80142544 /* D8BAC 801424AC 3C0E2000 */ lui $t6, (0x20000000 >> 16) /* D8BB0 801424B0 006E1024 */ and $v0, $v1, $t6 /* D8BB4 801424B4 10400012 */ beqz $v0, .L80142500 /* D8BB8 801424B8 0200202D */ daddu $a0, $s0, $zero /* D8BBC 801424BC 02C0282D */ daddu $a1, $s6, $zero /* D8BC0 801424C0 02A0302D */ daddu $a2, $s5, $zero /* D8BC4 801424C4 00113C00 */ sll $a3, $s1, 16 /* D8BC8 801424C8 00073C03 */ sra $a3, $a3, 16 /* D8BCC 801424CC 00121400 */ sll $v0, $s2, 16 /* D8BD0 801424D0 00021403 */ sra $v0, $v0, 16 /* D8BD4 801424D4 AFA20010 */ sw $v0, 0x10($sp) /* D8BD8 801424D8 00131400 */ sll $v0, $s3, 16 /* D8BDC 801424DC 00021403 */ sra $v0, $v0, 16 /* D8BE0 801424E0 AFA20014 */ sw $v0, 0x14($sp) /* D8BE4 801424E4 00141400 */ sll $v0, $s4, 16 /* D8BE8 801424E8 00021403 */ sra $v0, $v0, 16 /* D8BEC 801424EC 240E0001 */ addiu $t6, $zero, 0x1 /* D8BF0 801424F0 AFA20018 */ sw $v0, 0x18($sp) /* D8BF4 801424F4 AFAE001C */ sw $t6, 0x1C($sp) /* D8BF8 801424F8 0C04FDC1 */ jal hud_element_draw_rect /* D8BFC 801424FC AFAE0020 */ sw $t6, 0x20($sp) .L80142500: /* D8C00 80142500 0200202D */ daddu $a0, $s0, $zero /* D8C04 80142504 02C0282D */ daddu $a1, $s6, $zero /* D8C08 80142508 02A0302D */ daddu $a2, $s5, $zero /* D8C0C 8014250C 00113C00 */ sll $a3, $s1, 16 /* D8C10 80142510 00073C03 */ sra $a3, $a3, 16 /* D8C14 80142514 00121400 */ sll $v0, $s2, 16 /* D8C18 80142518 00021403 */ sra $v0, $v0, 16 /* D8C1C 8014251C AFA20010 */ sw $v0, 0x10($sp) /* D8C20 80142520 00131400 */ sll $v0, $s3, 16 /* D8C24 80142524 00021403 */ sra $v0, $v0, 16 /* D8C28 80142528 AFA20014 */ sw $v0, 0x14($sp) /* D8C2C 8014252C 00141400 */ sll $v0, $s4, 16 /* D8C30 80142530 00021403 */ sra $v0, $v0, 16 /* D8C34 80142534 240E0001 */ addiu $t6, $zero, 0x1 /* D8C38 80142538 AFA20018 */ sw $v0, 0x18($sp) /* D8C3C 8014253C 080509B5 */ j .L801426D4 /* D8C40 80142540 AFAE001C */ sw $t6, 0x1C($sp) .L80142544: /* D8C44 80142544 08050993 */ j .L8014264C /* D8C48 80142548 006E1024 */ and $v0, $v1, $t6 .L8014254C: /* D8C4C 8014254C 006E1024 */ and $v0, $v1, $t6 /* D8C50 80142550 1440000B */ bnez $v0, .L80142580 /* D8C54 80142554 00000000 */ nop /* D8C58 80142558 82030046 */ lb $v1, 0x46($s0) /* D8C5C 8014255C 3C0E8015 */ lui $t6, %hi(gHudElementSizes) /* D8C60 80142560 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) /* D8C64 80142564 00031040 */ sll $v0, $v1, 1 /* D8C68 80142568 00431021 */ addu $v0, $v0, $v1 /* D8C6C 8014256C 00021040 */ sll $v0, $v0, 1 /* D8C70 80142570 004E1021 */ addu $v0, $v0, $t6 /* D8C74 80142574 84560000 */ lh $s6, 0x0($v0) /* D8C78 80142578 08050962 */ j .L80142588 /* D8C7C 8014257C 84550002 */ lh $s5, 0x2($v0) .L80142580: /* D8C80 80142580 9216004E */ lbu $s6, 0x4E($s0) /* D8C84 80142584 9215004F */ lbu $s5, 0x4F($s0) .L80142588: /* D8C88 80142588 C6000028 */ lwc1 $f0, 0x28($s0) /* D8C8C 8014258C C606002C */ lwc1 $f6, 0x2C($s0) /* D8C90 80142590 3C013F00 */ lui $at, (0x3F000000 >> 16) /* D8C94 80142594 44811000 */ mtc1 $at, $f2 /* D8C98 80142598 46000307 */ neg.s $f12, $f0 /* D8C9C 8014259C 46026302 */ mul.s $f12, $f12, $f2 /* D8CA0 801425A0 00000000 */ nop /* D8CA4 801425A4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* D8CA8 801425A8 44814000 */ mtc1 $at, $f8 /* D8CAC 801425AC 3C014480 */ lui $at, (0x44800000 >> 16) /* D8CB0 801425B0 44815000 */ mtc1 $at, $f10 /* D8CB4 801425B4 4600038D */ trunc.w.s $f14, $f0 /* D8CB8 801425B8 44117000 */ mfc1 $s1, $f14 /* D8CBC 801425BC 4600338D */ trunc.w.s $f14, $f6 /* D8CC0 801425C0 44127000 */ mfc1 $s2, $f14 /* D8CC4 801425C4 46003187 */ neg.s $f6, $f6 /* D8CC8 801425C8 46023182 */ mul.s $f6, $f6, $f2 /* D8CCC 801425CC 00000000 */ nop /* D8CD0 801425D0 44912000 */ mtc1 $s1, $f4 /* D8CD4 801425D4 00000000 */ nop /* D8CD8 801425D8 46802120 */ cvt.s.w $f4, $f4 /* D8CDC 801425DC 44960000 */ mtc1 $s6, $f0 /* D8CE0 801425E0 00000000 */ nop /* D8CE4 801425E4 46800020 */ cvt.s.w $f0, $f0 /* D8CE8 801425E8 46002103 */ div.s $f4, $f4, $f0 /* D8CEC 801425EC 46044103 */ div.s $f4, $f8, $f4 /* D8CF0 801425F0 460A2102 */ mul.s $f4, $f4, $f10 /* D8CF4 801425F4 00000000 */ nop /* D8CF8 801425F8 44921000 */ mtc1 $s2, $f2 /* D8CFC 801425FC 00000000 */ nop /* D8D00 80142600 468010A0 */ cvt.s.w $f2, $f2 /* D8D04 80142604 44950000 */ mtc1 $s5, $f0 /* D8D08 80142608 00000000 */ nop /* D8D0C 8014260C 46800020 */ cvt.s.w $f0, $f0 /* D8D10 80142610 46001083 */ div.s $f2, $f2, $f0 /* D8D14 80142614 46024083 */ div.s $f2, $f8, $f2 /* D8D18 80142618 460A1082 */ mul.s $f2, $f2, $f10 /* D8D1C 8014261C 00000000 */ nop /* D8D20 80142620 8E020000 */ lw $v0, 0x0($s0) /* D8D24 80142624 4600638D */ trunc.w.s $f14, $f12 /* D8D28 80142628 44137000 */ mfc1 $s3, $f14 /* D8D2C 8014262C 4600338D */ trunc.w.s $f14, $f6 /* D8D30 80142630 44147000 */ mfc1 $s4, $f14 /* D8D34 80142634 4600238D */ trunc.w.s $f14, $f4 /* D8D38 80142638 E60E0034 */ swc1 $f14, 0x34($s0) /* D8D3C 8014263C 4600138D */ trunc.w.s $f14, $f2 /* D8D40 80142640 E60E0038 */ swc1 $f14, 0x38($s0) /* D8D44 80142644 3C0E2000 */ lui $t6, (0x20000000 >> 16) /* D8D48 80142648 004E1024 */ and $v0, $v0, $t6 .L8014264C: /* D8D4C 8014264C 10400012 */ beqz $v0, .L80142698 /* D8D50 80142650 0200202D */ daddu $a0, $s0, $zero /* D8D54 80142654 02C0282D */ daddu $a1, $s6, $zero /* D8D58 80142658 02A0302D */ daddu $a2, $s5, $zero /* D8D5C 8014265C 00113C00 */ sll $a3, $s1, 16 /* D8D60 80142660 00073C03 */ sra $a3, $a3, 16 /* D8D64 80142664 00121400 */ sll $v0, $s2, 16 /* D8D68 80142668 00021403 */ sra $v0, $v0, 16 /* D8D6C 8014266C AFA20010 */ sw $v0, 0x10($sp) /* D8D70 80142670 00131400 */ sll $v0, $s3, 16 /* D8D74 80142674 00021403 */ sra $v0, $v0, 16 /* D8D78 80142678 AFA20014 */ sw $v0, 0x14($sp) /* D8D7C 8014267C 00141400 */ sll $v0, $s4, 16 /* D8D80 80142680 00021403 */ sra $v0, $v0, 16 /* D8D84 80142684 240E0001 */ addiu $t6, $zero, 0x1 /* D8D88 80142688 AFA20018 */ sw $v0, 0x18($sp) /* D8D8C 8014268C AFA0001C */ sw $zero, 0x1C($sp) /* D8D90 80142690 0C04FDC1 */ jal hud_element_draw_rect /* D8D94 80142694 AFAE0020 */ sw $t6, 0x20($sp) .L80142698: /* D8D98 80142698 0200202D */ daddu $a0, $s0, $zero /* D8D9C 8014269C 02C0282D */ daddu $a1, $s6, $zero /* D8DA0 801426A0 02A0302D */ daddu $a2, $s5, $zero /* D8DA4 801426A4 00113C00 */ sll $a3, $s1, 16 /* D8DA8 801426A8 00073C03 */ sra $a3, $a3, 16 /* D8DAC 801426AC 00121400 */ sll $v0, $s2, 16 /* D8DB0 801426B0 00021403 */ sra $v0, $v0, 16 /* D8DB4 801426B4 AFA20010 */ sw $v0, 0x10($sp) /* D8DB8 801426B8 00131400 */ sll $v0, $s3, 16 /* D8DBC 801426BC 00021403 */ sra $v0, $v0, 16 /* D8DC0 801426C0 AFA20014 */ sw $v0, 0x14($sp) /* D8DC4 801426C4 00141400 */ sll $v0, $s4, 16 /* D8DC8 801426C8 00021403 */ sra $v0, $v0, 16 /* D8DCC 801426CC AFA20018 */ sw $v0, 0x18($sp) /* D8DD0 801426D0 AFA0001C */ sw $zero, 0x1C($sp) .L801426D4: /* D8DD4 801426D4 0C04FDC1 */ jal hud_element_draw_rect /* D8DD8 801426D8 AFA00020 */ sw $zero, 0x20($sp) /* D8DDC 801426DC 26F70001 */ addiu $s7, $s7, 0x1 /* D8DE0 801426E0 02FE102A */ slt $v0, $s7, $fp /* D8DE4 801426E4 1440FF31 */ bnez $v0, .L801423AC /* D8DE8 801426E8 00171080 */ sll $v0, $s7, 2 .L801426EC: /* D8DEC 801426EC 8FBF054C */ lw $ra, 0x54C($sp) /* D8DF0 801426F0 8FBE0548 */ lw $fp, 0x548($sp) /* D8DF4 801426F4 8FB70544 */ lw $s7, 0x544($sp) /* D8DF8 801426F8 8FB60540 */ lw $s6, 0x540($sp) /* D8DFC 801426FC 8FB5053C */ lw $s5, 0x53C($sp) /* D8E00 80142700 8FB40538 */ lw $s4, 0x538($sp) /* D8E04 80142704 8FB30534 */ lw $s3, 0x534($sp) /* D8E08 80142708 8FB20530 */ lw $s2, 0x530($sp) /* D8E0C 8014270C 8FB1052C */ lw $s1, 0x52C($sp) /* D8E10 80142710 8FB00528 */ lw $s0, 0x528($sp) /* D8E14 80142714 03E00008 */ jr $ra /* D8E18 80142718 27BD0550 */ addiu $sp, $sp, 0x550 ### DECOMPILED C INSTRUCTIONS: void render_hud_elements_backUI(void) { s32 i, count, j; s32 sortedElements[ARRAY_COUNT(*gHudElements)]; s32 el1, el2; s32 texSizeX, texSizeY; s32 drawSizeX, drawSizeY, offsetX, offsetY; HudElement* hudElement; D_80159180++; if (D_80159180 > 2) { D_80159180 = 0; } gSPDisplayList(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(gHudElementsDLBackUI)); count = 0; for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) { hudElement = (*gHudElements)[i]; if (hudElement != NULL) { s32 flags = hudElement->flags; if (flags && !(flags & HUD_ELEMENT_FLAG_DISABLED)) { if (!(flags & (HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_TRANSFORM | HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_10000000 | HUD_ELEMENT_FLAG_40000000))) { if (!(flags & HUD_ELEMENT_FLAG_FRONTUI) && hudElement->drawSizePreset >= 0) { sortedElements[count++] = i; } } } } } for (i = 0; i < count - 1; i++) { for (j = i + 1; j < count; j++) { el1 = sortedElements[i]; el2 = sortedElements[j]; if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) { sortedElements[i] = el2; sortedElements[j] = el1; } } } for (i = 0; i < count; i++) { hudElement = (*gHudElements)[sortedElements[i]]; if (hudElement->readPos == NULL) { break; } if (!(hudElement->flags & HUD_ELEMENT_FLAG_FIXEDSCALE)) { if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { texSizeX = gHudElementSizes[hudElement->tileSizePreset].width; texSizeY = gHudElementSizes[hudElement->tileSizePreset].height; } else { texSizeX = hudElement->customImageSize.x; texSizeY = hudElement->customImageSize.y; } if (!(hudElement->flags & HUD_ELEMENT_FLAG_SCALED)) { if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { drawSizeX = gHudElementSizes[hudElement->drawSizePreset].width; drawSizeY = gHudElementSizes[hudElement->drawSizePreset].height; offsetX = -drawSizeX / 2; offsetY = -drawSizeY / 2; } else { // TODO find better match do { drawSizeX = hudElement->customDrawSize.x; drawSizeY = hudElement->customDrawSize.y; offsetX = -drawSizeX / 2; } while (0); offsetY = -drawSizeY / 2; } } else { drawSizeX = hudElement->sizeX; drawSizeY = hudElement->sizeY; offsetX = -drawSizeX / 2; offsetY = -drawSizeY / 2; } if (!(hudElement->flags & HUD_ELEMENT_FLAG_REPEATED)) { if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE); } hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE); } else { if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); } } else { f32 xScaled, yScaled; if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { texSizeX = gHudElementSizes[hudElement->tileSizePreset].width; texSizeY = gHudElementSizes[hudElement->tileSizePreset].height; } else { texSizeX = hudElement->customImageSize.x; texSizeY = hudElement->customImageSize.y; } drawSizeX = hudElement->unkImgScale[0]; drawSizeY = hudElement->unkImgScale[1]; offsetX = -hudElement->unkImgScale[0] / 2; offsetY = -hudElement->unkImgScale[1] / 2; xScaled = (f32) drawSizeX / (f32) texSizeX; yScaled = (f32) drawSizeY / (f32) texSizeY; xScaled = 1.0f / xScaled; yScaled = 1.0f / yScaled; hudElement->widthScale = X10(xScaled); hudElement->heightScale = X10(yScaled); if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel lightning_appendGfx /* 36E7B8 E006C5E8 27BDFF18 */ addiu $sp, $sp, -0xE8 /* 36E7BC E006C5EC 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 36E7C0 E006C5F0 AFB400C0 */ sw $s4, 0xC0($sp) /* 36E7C4 E006C5F4 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 36E7C8 E006C5F8 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 36E7CC E006C5FC AFBF00D4 */ sw $ra, 0xD4($sp) /* 36E7D0 E006C600 AFBE00D0 */ sw $fp, 0xD0($sp) /* 36E7D4 E006C604 AFB700CC */ sw $s7, 0xCC($sp) /* 36E7D8 E006C608 AFB600C8 */ sw $s6, 0xC8($sp) /* 36E7DC E006C60C AFB500C4 */ sw $s5, 0xC4($sp) /* 36E7E0 E006C610 AFB300BC */ sw $s3, 0xBC($sp) /* 36E7E4 E006C614 AFB200B8 */ sw $s2, 0xB8($sp) /* 36E7E8 E006C618 AFB100B4 */ sw $s1, 0xB4($sp) /* 36E7EC E006C61C AFB000B0 */ sw $s0, 0xB0($sp) /* 36E7F0 E006C620 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 36E7F4 E006C624 F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 36E7F8 E006C628 8E860000 */ lw $a2, 0x0($s4) /* 36E7FC E006C62C 8C93000C */ lw $s3, 0xC($a0) /* 36E800 E006C630 00C0182D */ daddu $v1, $a2, $zero /* 36E804 E006C634 8E750000 */ lw $s5, 0x0($s3) /* 36E808 E006C638 24C60008 */ addiu $a2, $a2, 0x8 /* 36E80C E006C63C AE860000 */ sw $a2, 0x0($s4) /* 36E810 E006C640 8E670018 */ lw $a3, 0x18($s3) /* 36E814 E006C644 00151080 */ sll $v0, $s5, 2 /* 36E818 E006C648 3C0AE007 */ lui $t2, (0xE0070000 >> 16) /* 36E81C E006C64C 01425021 */ addu $t2, $t2, $v0 /* 36E820 E006C650 8D4ACB60 */ lw $t2, -0x34A0($t2) /* 36E824 E006C654 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 36E828 E006C658 AFAA00A4 */ sw $t2, 0xA4($sp) /* 36E82C E006C65C 3C08E007 */ lui $t0, (0xE0070000 >> 16) /* 36E830 E006C660 01024021 */ addu $t0, $t0, $v0 /* 36E834 E006C664 8D08CB78 */ lw $t0, -0x3488($t0) /* 36E838 E006C668 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 36E83C E006C66C AC620000 */ sw $v0, 0x0($v1) /* 36E840 E006C670 AC600004 */ sw $zero, 0x4($v1) /* 36E844 E006C674 ACC50000 */ sw $a1, 0x0($a2) /* 36E848 E006C678 8C830010 */ lw $v1, 0x10($a0) /* 36E84C E006C67C 24C20008 */ addiu $v0, $a2, 0x8 /* 36E850 E006C680 AE820000 */ sw $v0, 0x0($s4) /* 36E854 E006C684 8C62001C */ lw $v0, 0x1C($v1) /* 36E858 E006C688 3C038000 */ lui $v1, (0x80000000 >> 16) /* 36E85C E006C68C 00431021 */ addu $v0, $v0, $v1 /* 36E860 E006C690 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 36E864 E006C694 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 36E868 E006C698 3C04800B */ lui $a0, %hi(gCameras) /* 36E86C E006C69C 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 36E870 E006C6A0 ACC20004 */ sw $v0, 0x4($a2) /* 36E874 E006C6A4 00031080 */ sll $v0, $v1, 2 /* 36E878 E006C6A8 00431021 */ addu $v0, $v0, $v1 /* 36E87C E006C6AC 00021080 */ sll $v0, $v0, 2 /* 36E880 E006C6B0 00431023 */ subu $v0, $v0, $v1 /* 36E884 E006C6B4 000218C0 */ sll $v1, $v0, 3 /* 36E888 E006C6B8 00431021 */ addu $v0, $v0, $v1 /* 36E88C E006C6BC 000210C0 */ sll $v0, $v0, 3 /* 36E890 E006C6C0 00441821 */ addu $v1, $v0, $a0 /* 36E894 E006C6C4 24020001 */ addiu $v0, $zero, 0x1 /* 36E898 E006C6C8 16A20004 */ bne $s5, $v0, .LE006C6DC /* 36E89C E006C6CC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 36E8A0 E006C6D0 28E20012 */ slti $v0, $a3, 0x12 /* 36E8A4 E006C6D4 14400111 */ bnez $v0, .LE006CB1C /* 36E8A8 E006C6D8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) .LE006C6DC: /* 36E8AC E006C6DC ACC20008 */ sw $v0, 0x8($a2) /* 36E8B0 E006C6E0 ACC8000C */ sw $t0, 0xC($a2) /* 36E8B4 E006C6E4 C666001C */ lwc1 $f6, 0x1C($s3) /* 36E8B8 E006C6E8 3C014080 */ lui $at, (0x40800000 >> 16) /* 36E8BC E006C6EC 44814000 */ mtc1 $at, $f8 /* 36E8C0 E006C6F0 00000000 */ nop /* 36E8C4 E006C6F4 46083182 */ mul.s $f6, $f6, $f8 /* 36E8C8 E006C6F8 00000000 */ nop /* 36E8CC E006C6FC C6640020 */ lwc1 $f4, 0x20($s3) /* 36E8D0 E006C700 46082102 */ mul.s $f4, $f4, $f8 /* 36E8D4 E006C704 00000000 */ nop /* 36E8D8 E006C708 C6620024 */ lwc1 $f2, 0x24($s3) /* 36E8DC E006C70C 46081082 */ mul.s $f2, $f2, $f8 /* 36E8E0 E006C710 00000000 */ nop /* 36E8E4 E006C714 24C20010 */ addiu $v0, $a2, 0x10 /* 36E8E8 E006C718 AE820000 */ sw $v0, 0x0($s4) /* 36E8EC E006C71C C6600028 */ lwc1 $f0, 0x28($s3) /* 36E8F0 E006C720 46080002 */ mul.s $f0, $f0, $f8 /* 36E8F4 E006C724 00000000 */ nop /* 36E8F8 E006C728 2AA20003 */ slti $v0, $s5, 0x3 /* 36E8FC E006C72C 4600328D */ trunc.w.s $f10, $f6 /* 36E900 E006C730 44165000 */ mfc1 $s6, $f10 /* 36E904 E006C734 4600228D */ trunc.w.s $f10, $f4 /* 36E908 E006C738 44175000 */ mfc1 $s7, $f10 /* 36E90C E006C73C 4600128D */ trunc.w.s $f10, $f2 /* 36E910 E006C740 441E5000 */ mfc1 $fp, $f10 /* 36E914 E006C744 4600028D */ trunc.w.s $f10, $f0 /* 36E918 E006C748 E7AA00A8 */ swc1 $f10, 0xA8($sp) /* 36E91C E006C74C 10400057 */ beqz $v0, .LE006C8AC /* 36E920 E006C750 27A40020 */ addiu $a0, $sp, 0x20 /* 36E924 E006C754 06A00056 */ bltz $s5, .LE006C8B0 /* 36E928 E006C758 3C120001 */ lui $s2, (0x11630 >> 16) /* 36E92C E006C75C 27A500A0 */ addiu $a1, $sp, 0xA0 /* 36E930 E006C760 3C0641F0 */ lui $a2, (0x41F00000 >> 16) /* 36E934 E006C764 8462000A */ lh $v0, 0xA($v1) /* 36E938 E006C768 8463000C */ lh $v1, 0xC($v1) /* 36E93C E006C76C 3C014680 */ lui $at, (0x46800000 >> 16) /* 36E940 E006C770 44811000 */ mtc1 $at, $f2 /* 36E944 E006C774 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 36E948 E006C778 44812000 */ mtc1 $at, $f4 /* 36E94C E006C77C 44823000 */ mtc1 $v0, $f6 /* 36E950 E006C780 00000000 */ nop /* 36E954 E006C784 468031A0 */ cvt.s.w $f6, $f6 /* 36E958 E006C788 44830000 */ mtc1 $v1, $f0 /* 36E95C E006C78C 00000000 */ nop /* 36E960 E006C790 46800020 */ cvt.s.w $f0, $f0 /* 36E964 E006C794 46003183 */ div.s $f6, $f6, $f0 /* 36E968 E006C798 44073000 */ mfc1 $a3, $f6 /* 36E96C E006C79C 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 36E970 E006C7A0 E7A80010 */ swc1 $f8, 0x10($sp) /* 36E974 E006C7A4 E7A20014 */ swc1 $f2, 0x14($sp) /* 36E978 E006C7A8 0C080160 */ jal shim_guPerspectiveF /* 36E97C E006C7AC E7A40018 */ swc1 $f4, 0x18($sp) /* 36E980 E006C7B0 27A40020 */ addiu $a0, $sp, 0x20 /* 36E984 E006C7B4 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 36E988 E006C7B8 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 36E98C E006C7BC 3C11800A */ lui $s1, %hi(gDisplayContext) /* 36E990 E006C7C0 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 36E994 E006C7C4 96050000 */ lhu $a1, 0x0($s0) /* 36E998 E006C7C8 8E220000 */ lw $v0, 0x0($s1) /* 36E99C E006C7CC 00052980 */ sll $a1, $a1, 6 /* 36E9A0 E006C7D0 00B22821 */ addu $a1, $a1, $s2 /* 36E9A4 E006C7D4 0C080118 */ jal shim_guMtxF2L /* 36E9A8 E006C7D8 00452821 */ addu $a1, $v0, $a1 /* 36E9AC E006C7DC 3C02DA38 */ lui $v0, (0xDA380007 >> 16) /* 36E9B0 E006C7E0 34420007 */ ori $v0, $v0, (0xDA380007 & 0xFFFF) /* 36E9B4 E006C7E4 27A40020 */ addiu $a0, $sp, 0x20 /* 36E9B8 E006C7E8 8E880000 */ lw $t0, 0x0($s4) /* 36E9BC E006C7EC 3C07C3FA */ lui $a3, (0xC3FA0000 >> 16) /* 36E9C0 E006C7F0 96090000 */ lhu $t1, 0x0($s0) /* 36E9C4 E006C7F4 0100282D */ daddu $a1, $t0, $zero /* 36E9C8 E006C7F8 ACA20000 */ sw $v0, 0x0($a1) /* 36E9CC E006C7FC 3122FFFF */ andi $v0, $t1, 0xFFFF /* 36E9D0 E006C800 00021180 */ sll $v0, $v0, 6 /* 36E9D4 E006C804 00521021 */ addu $v0, $v0, $s2 /* 36E9D8 E006C808 8E230000 */ lw $v1, 0x0($s1) /* 36E9DC E006C80C 25080008 */ addiu $t0, $t0, 0x8 /* 36E9E0 E006C810 00621821 */ addu $v1, $v1, $v0 /* 36E9E4 E006C814 ACA30004 */ sw $v1, 0x4($a1) /* 36E9E8 E006C818 8E650004 */ lw $a1, 0x4($s3) /* 36E9EC E006C81C 8E660008 */ lw $a2, 0x8($s3) /* 36E9F0 E006C820 25290001 */ addiu $t1, $t1, 0x1 /* 36E9F4 E006C824 AE880000 */ sw $t0, 0x0($s4) /* 36E9F8 E006C828 0C080108 */ jal shim_guTranslateF /* 36E9FC E006C82C A6090000 */ sh $t1, 0x0($s0) /* 36EA00 E006C830 27A40020 */ addiu $a0, $sp, 0x20 /* 36EA04 E006C834 96050000 */ lhu $a1, 0x0($s0) /* 36EA08 E006C838 8E220000 */ lw $v0, 0x0($s1) /* 36EA0C E006C83C 00052980 */ sll $a1, $a1, 6 /* 36EA10 E006C840 00B22821 */ addu $a1, $a1, $s2 /* 36EA14 E006C844 0C080118 */ jal shim_guMtxF2L /* 36EA18 E006C848 00452821 */ addu $a1, $v0, $a1 /* 36EA1C E006C84C 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 36EA20 E006C850 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 36EA24 E006C854 3C06FF2F */ lui $a2, (0xFF2FC6FF >> 16) /* 36EA28 E006C858 34C6C6FF */ ori $a2, $a2, (0xFF2FC6FF & 0xFFFF) /* 36EA2C E006C85C 8E840000 */ lw $a0, 0x0($s4) /* 36EA30 E006C860 96020000 */ lhu $v0, 0x0($s0) /* 36EA34 E006C864 0080282D */ daddu $a1, $a0, $zero /* 36EA38 E006C868 24840008 */ addiu $a0, $a0, 0x8 /* 36EA3C E006C86C AE840000 */ sw $a0, 0x0($s4) /* 36EA40 E006C870 ACA30000 */ sw $v1, 0x0($a1) /* 36EA44 E006C874 24430001 */ addiu $v1, $v0, 0x1 /* 36EA48 E006C878 3042FFFF */ andi $v0, $v0, 0xFFFF /* 36EA4C E006C87C 00021180 */ sll $v0, $v0, 6 /* 36EA50 E006C880 A6030000 */ sh $v1, 0x0($s0) /* 36EA54 E006C884 8E230000 */ lw $v1, 0x0($s1) /* 36EA58 E006C888 00521021 */ addu $v0, $v0, $s2 /* 36EA5C E006C88C 00621821 */ addu $v1, $v1, $v0 /* 36EA60 E006C890 24820008 */ addiu $v0, $a0, 0x8 /* 36EA64 E006C894 ACA30004 */ sw $v1, 0x4($a1) /* 36EA68 E006C898 AE820000 */ sw $v0, 0x0($s4) /* 36EA6C E006C89C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 36EA70 E006C8A0 AC820000 */ sw $v0, 0x0($a0) /* 36EA74 E006C8A4 0801B27A */ j .LE006C9E8 /* 36EA78 E006C8A8 AC860004 */ sw $a2, 0x4($a0) .LE006C8AC: /* 36EA7C E006C8AC 3C120001 */ lui $s2, (0x11630 >> 16) .LE006C8B0: /* 36EA80 E006C8B0 8E650004 */ lw $a1, 0x4($s3) /* 36EA84 E006C8B4 8E660008 */ lw $a2, 0x8($s3) /* 36EA88 E006C8B8 8E67000C */ lw $a3, 0xC($s3) /* 36EA8C E006C8BC 0C080108 */ jal shim_guTranslateF /* 36EA90 E006C8C0 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 36EA94 E006C8C4 27B00060 */ addiu $s0, $sp, 0x60 /* 36EA98 E006C8C8 4480A000 */ mtc1 $zero, $f20 /* 36EA9C E006C8CC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 36EAA0 E006C8D0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 36EAA4 E006C8D4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 36EAA8 E006C8D8 4481B000 */ mtc1 $at, $f22 /* 36EAAC E006C8DC 00031080 */ sll $v0, $v1, 2 /* 36EAB0 E006C8E0 00431021 */ addu $v0, $v0, $v1 /* 36EAB4 E006C8E4 00021080 */ sll $v0, $v0, 2 /* 36EAB8 E006C8E8 00431023 */ subu $v0, $v0, $v1 /* 36EABC E006C8EC 000218C0 */ sll $v1, $v0, 3 /* 36EAC0 E006C8F0 00431021 */ addu $v0, $v0, $v1 /* 36EAC4 E006C8F4 000210C0 */ sll $v0, $v0, 3 /* 36EAC8 E006C8F8 4406A000 */ mfc1 $a2, $f20 /* 36EACC E006C8FC 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 36EAD0 E006C900 00220821 */ addu $at, $at, $v0 /* 36EAD4 E006C904 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 36EAD8 E006C908 4407B000 */ mfc1 $a3, $f22 /* 36EADC E006C90C 46000007 */ neg.s $f0, $f0 /* 36EAE0 E006C910 44050000 */ mfc1 $a1, $f0 /* 36EAE4 E006C914 0200202D */ daddu $a0, $s0, $zero /* 36EAE8 E006C918 0C080104 */ jal shim_guRotateF /* 36EAEC E006C91C E7B40010 */ swc1 $f20, 0x10($sp) /* 36EAF0 E006C920 0200202D */ daddu $a0, $s0, $zero /* 36EAF4 E006C924 27A50020 */ addiu $a1, $sp, 0x20 /* 36EAF8 E006C928 0C080114 */ jal shim_guMtxCatF /* 36EAFC E006C92C 00A0302D */ daddu $a2, $a1, $zero /* 36EB00 E006C930 0200202D */ daddu $a0, $s0, $zero /* 36EB04 E006C934 4405A000 */ mfc1 $a1, $f20 /* 36EB08 E006C938 4407B000 */ mfc1 $a3, $f22 /* 36EB0C E006C93C 0C080108 */ jal shim_guTranslateF /* 36EB10 E006C940 00A0302D */ daddu $a2, $a1, $zero /* 36EB14 E006C944 0200202D */ daddu $a0, $s0, $zero /* 36EB18 E006C948 27A50020 */ addiu $a1, $sp, 0x20 /* 36EB1C E006C94C 0C080114 */ jal shim_guMtxCatF /* 36EB20 E006C950 00A0302D */ daddu $a2, $a1, $zero /* 36EB24 E006C954 27A40020 */ addiu $a0, $sp, 0x20 /* 36EB28 E006C958 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 36EB2C E006C95C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 36EB30 E006C960 3C11800A */ lui $s1, %hi(gDisplayContext) /* 36EB34 E006C964 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 36EB38 E006C968 96050000 */ lhu $a1, 0x0($s0) /* 36EB3C E006C96C 8E220000 */ lw $v0, 0x0($s1) /* 36EB40 E006C970 00052980 */ sll $a1, $a1, 6 /* 36EB44 E006C974 00B22821 */ addu $a1, $a1, $s2 /* 36EB48 E006C978 0C080118 */ jal shim_guMtxF2L /* 36EB4C E006C97C 00452821 */ addu $a1, $v0, $a1 /* 36EB50 E006C980 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 36EB54 E006C984 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 36EB58 E006C988 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 36EB5C E006C98C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 36EB60 E006C990 8CA40000 */ lw $a0, 0x0($a1) /* 36EB64 E006C994 96020000 */ lhu $v0, 0x0($s0) /* 36EB68 E006C998 0080302D */ daddu $a2, $a0, $zero /* 36EB6C E006C99C 24840008 */ addiu $a0, $a0, 0x8 /* 36EB70 E006C9A0 ACA40000 */ sw $a0, 0x0($a1) /* 36EB74 E006C9A4 ACC30000 */ sw $v1, 0x0($a2) /* 36EB78 E006C9A8 24430001 */ addiu $v1, $v0, 0x1 /* 36EB7C E006C9AC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 36EB80 E006C9B0 00021180 */ sll $v0, $v0, 6 /* 36EB84 E006C9B4 A6030000 */ sh $v1, 0x0($s0) /* 36EB88 E006C9B8 8E230000 */ lw $v1, 0x0($s1) /* 36EB8C E006C9BC 00521021 */ addu $v0, $v0, $s2 /* 36EB90 E006C9C0 00621821 */ addu $v1, $v1, $v0 /* 36EB94 E006C9C4 24820008 */ addiu $v0, $a0, 0x8 /* 36EB98 E006C9C8 ACC30004 */ sw $v1, 0x4($a2) /* 36EB9C E006C9CC ACA20000 */ sw $v0, 0x0($a1) /* 36EBA0 E006C9D0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 36EBA4 E006C9D4 AC820000 */ sw $v0, 0x0($a0) /* 36EBA8 E006C9D8 92620013 */ lbu $v0, 0x13($s3) /* 36EBAC E006C9DC 3C03FFFF */ lui $v1, (0xFFFF0000 >> 16) /* 36EBB0 E006C9E0 00431025 */ or $v0, $v0, $v1 /* 36EBB4 E006C9E4 AC820004 */ sw $v0, 0x4($a0) .LE006C9E8: /* 36EBB8 E006C9E8 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 36EBBC E006C9EC 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 36EBC0 E006C9F0 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 36EBC4 E006C9F4 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 36EBC8 E006C9F8 32C30FFF */ andi $v1, $s6, 0xFFF /* 36EBCC E006C9FC 00031B00 */ sll $v1, $v1, 12 /* 36EBD0 E006CA00 32E20FFF */ andi $v0, $s7, 0xFFF /* 36EBD4 E006CA04 3C05F200 */ lui $a1, (0xF2000000 >> 16) /* 36EBD8 E006CA08 00451025 */ or $v0, $v0, $a1 /* 36EBDC E006CA0C 00621825 */ or $v1, $v1, $v0 /* 36EBE0 E006CA10 26C203FC */ addiu $v0, $s6, 0x3FC /* 36EBE4 E006CA14 30420FFF */ andi $v0, $v0, 0xFFF /* 36EBE8 E006CA18 8D070000 */ lw $a3, 0x0($t0) /* 36EBEC E006CA1C 00021300 */ sll $v0, $v0, 12 /* 36EBF0 E006CA20 00E0202D */ daddu $a0, $a3, $zero /* 36EBF4 E006CA24 24E70008 */ addiu $a3, $a3, 0x8 /* 36EBF8 E006CA28 AD070000 */ sw $a3, 0x0($t0) /* 36EBFC E006CA2C AC830000 */ sw $v1, 0x0($a0) /* 36EC00 E006CA30 26E3007C */ addiu $v1, $s7, 0x7C /* 36EC04 E006CA34 30630FFF */ andi $v1, $v1, 0xFFF /* 36EC08 E006CA38 00431025 */ or $v0, $v0, $v1 /* 36EC0C E006CA3C AC820004 */ sw $v0, 0x4($a0) /* 36EC10 E006CA40 24E20008 */ addiu $v0, $a3, 0x8 /* 36EC14 E006CA44 33C30FFF */ andi $v1, $fp, 0xFFF /* 36EC18 E006CA48 00031B00 */ sll $v1, $v1, 12 /* 36EC1C E006CA4C AD020000 */ sw $v0, 0x0($t0) /* 36EC20 E006CA50 8FAA00A8 */ lw $t2, 0xA8($sp) /* 36EC24 E006CA54 3C040100 */ lui $a0, (0x1000000 >> 16) /* 36EC28 E006CA58 31420FFF */ andi $v0, $t2, 0xFFF /* 36EC2C E006CA5C 00451025 */ or $v0, $v0, $a1 /* 36EC30 E006CA60 00621825 */ or $v1, $v1, $v0 /* 36EC34 E006CA64 27C203FC */ addiu $v0, $fp, 0x3FC /* 36EC38 E006CA68 30420FFF */ andi $v0, $v0, 0xFFF /* 36EC3C E006CA6C 00021300 */ sll $v0, $v0, 12 /* 36EC40 E006CA70 ACE30000 */ sw $v1, 0x0($a3) /* 36EC44 E006CA74 2543007C */ addiu $v1, $t2, 0x7C /* 36EC48 E006CA78 30630FFF */ andi $v1, $v1, 0xFFF /* 36EC4C E006CA7C 00641825 */ or $v1, $v1, $a0 /* 36EC50 E006CA80 00431025 */ or $v0, $v0, $v1 /* 36EC54 E006CA84 ACE20004 */ sw $v0, 0x4($a3) /* 36EC58 E006CA88 24E20010 */ addiu $v0, $a3, 0x10 /* 36EC5C E006CA8C AD020000 */ sw $v0, 0x0($t0) /* 36EC60 E006CA90 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 36EC64 E006CA94 ACE20008 */ sw $v0, 0x8($a3) /* 36EC68 E006CA98 24E20018 */ addiu $v0, $a3, 0x18 /* 36EC6C E006CA9C 8FAA00A4 */ lw $t2, 0xA4($sp) /* 36EC70 E006CAA0 3C05E700 */ lui $a1, (0xE7000000 >> 16) /* 36EC74 E006CAA4 ACEA000C */ sw $t2, 0xC($a3) /* 36EC78 E006CAA8 AD020000 */ sw $v0, 0x0($t0) /* 36EC7C E006CAAC 24E20020 */ addiu $v0, $a3, 0x20 /* 36EC80 E006CAB0 ACE50010 */ sw $a1, 0x10($a3) /* 36EC84 E006CAB4 ACE00014 */ sw $zero, 0x14($a3) /* 36EC88 E006CAB8 AD020000 */ sw $v0, 0x0($t0) /* 36EC8C E006CABC 24020040 */ addiu $v0, $zero, 0x40 /* 36EC90 E006CAC0 ACE2001C */ sw $v0, 0x1C($a3) /* 36EC94 E006CAC4 2AA20003 */ slti $v0, $s5, 0x3 /* 36EC98 E006CAC8 1040000E */ beqz $v0, .LE006CB04 /* 36EC9C E006CACC ACE60018 */ sw $a2, 0x18($a3) /* 36ECA0 E006CAD0 3C04DA38 */ lui $a0, (0xDA380007 >> 16) /* 36ECA4 E006CAD4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 36ECA8 E006CAD8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 36ECAC E006CADC 24E20028 */ addiu $v0, $a3, 0x28 /* 36ECB0 E006CAE0 AD020000 */ sw $v0, 0x0($t0) /* 36ECB4 E006CAE4 3C02800A */ lui $v0, %hi(gDisplayContext) /* 36ECB8 E006CAE8 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 36ECBC E006CAEC 34840007 */ ori $a0, $a0, (0xDA380007 & 0xFFFF) /* 36ECC0 E006CAF0 ACE40020 */ sw $a0, 0x20($a3) /* 36ECC4 E006CAF4 00031980 */ sll $v1, $v1, 6 /* 36ECC8 E006CAF8 24630030 */ addiu $v1, $v1, 0x30 /* 36ECCC E006CAFC 00431021 */ addu $v0, $v0, $v1 /* 36ECD0 E006CB00 ACE20024 */ sw $v0, 0x24($a3) .LE006CB04: /* 36ECD4 E006CB04 8D020000 */ lw $v0, 0x0($t0) /* 36ECD8 E006CB08 0040182D */ daddu $v1, $v0, $zero /* 36ECDC E006CB0C 24420008 */ addiu $v0, $v0, 0x8 /* 36ECE0 E006CB10 AD020000 */ sw $v0, 0x0($t0) /* 36ECE4 E006CB14 AC650000 */ sw $a1, 0x0($v1) /* 36ECE8 E006CB18 AC600004 */ sw $zero, 0x4($v1) .LE006CB1C: /* 36ECEC E006CB1C 8FBF00D4 */ lw $ra, 0xD4($sp) /* 36ECF0 E006CB20 8FBE00D0 */ lw $fp, 0xD0($sp) /* 36ECF4 E006CB24 8FB700CC */ lw $s7, 0xCC($sp) /* 36ECF8 E006CB28 8FB600C8 */ lw $s6, 0xC8($sp) /* 36ECFC E006CB2C 8FB500C4 */ lw $s5, 0xC4($sp) /* 36ED00 E006CB30 8FB400C0 */ lw $s4, 0xC0($sp) /* 36ED04 E006CB34 8FB300BC */ lw $s3, 0xBC($sp) /* 36ED08 E006CB38 8FB200B8 */ lw $s2, 0xB8($sp) /* 36ED0C E006CB3C 8FB100B4 */ lw $s1, 0xB4($sp) /* 36ED10 E006CB40 8FB000B0 */ lw $s0, 0xB0($sp) /* 36ED14 E006CB44 D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 36ED18 E006CB48 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 36ED1C E006CB4C 03E00008 */ jr $ra /* 36ED20 E006CB50 27BD00E8 */ addiu $sp, $sp, 0xE8 /* 36ED24 E006CB54 00000000 */ nop /* 36ED28 E006CB58 00000000 */ nop /* 36ED2C E006CB5C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void lightning_appendGfx(void* effect) { LightningFXData* data = ((EffectInstance*)effect)->data.lightning; s32 unk_00 = data->unk_00; s32 unk_18 = data->unk_18; Gfx* dlist = D_E006CB60[unk_00]; Gfx* dlist2 = D_E006CB78[unk_00]; Camera* camera = &gCameras[gCurrentCameraID]; Matrix4f sp20; Matrix4f sp60; u16 perspNorm; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); if (unk_00 != 1 || unk_18 >= 18) { s32 ult2; s32 uls2; s32 uls; s32 ult; f32* unk_28; // TODO required to match gSPDisplayList(gMainGfxPos++, dlist2); uls = data->unk_1C * 4.0f; ult = data->unk_20 * 4.0f; uls2 = data->unk_24 * 4.0f; unk_28 = &data->unk_28; // TODO dumb pointer temp required to match ult2 = *(unk_28) * 4.0f; switch (unk_00) { case 0: case 1: case 2: shim_guPerspectiveF(sp20, &perspNorm, 30.0f, (f32) camera->viewportW / (f32) camera->viewportH, 4.0f, 16384.0f, 1.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); shim_guTranslateF(sp20, data->unk_04, data->unk_08, -500.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 47, 198, 255); break; default: shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C); shim_guRotateF(sp60, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guTranslateF(sp60, 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_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 0, data->unk_10); break; } gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 1020, ult + 124); gDPSetTileSize(gMainGfxPos++, 1, uls2, ult2, uls2 + 1020, ult2 + 124); gSPDisplayList(gMainGfxPos++, dlist); gDPPipeSync(gMainGfxPos++); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); if (unk_00 < 3) { gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); } gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel draw_hud_element_internal /* DA998 80144298 27BDFFB8 */ addiu $sp, $sp, -0x48 /* DA99C 8014429C 2402F7FF */ addiu $v0, $zero, -0x801 /* DA9A0 801442A0 00822024 */ and $a0, $a0, $v0 /* DA9A4 801442A4 3C028015 */ lui $v0, %hi(gHudElements) /* DA9A8 801442A8 8C427960 */ lw $v0, %lo(gHudElements)($v0) /* DA9AC 801442AC 00042080 */ sll $a0, $a0, 2 /* DA9B0 801442B0 AFBF0044 */ sw $ra, 0x44($sp) /* DA9B4 801442B4 AFB60040 */ sw $s6, 0x40($sp) /* DA9B8 801442B8 AFB5003C */ sw $s5, 0x3C($sp) /* DA9BC 801442BC AFB40038 */ sw $s4, 0x38($sp) /* DA9C0 801442C0 AFB30034 */ sw $s3, 0x34($sp) /* DA9C4 801442C4 AFB20030 */ sw $s2, 0x30($sp) /* DA9C8 801442C8 AFB1002C */ sw $s1, 0x2C($sp) /* DA9CC 801442CC AFB00028 */ sw $s0, 0x28($sp) /* DA9D0 801442D0 00822021 */ addu $a0, $a0, $v0 /* DA9D4 801442D4 8C900000 */ lw $s0, 0x0($a0) /* DA9D8 801442D8 8E030000 */ lw $v1, 0x0($s0) /* DA9DC 801442DC 10600128 */ beqz $v1, .L80144780 /* DA9E0 801442E0 30620002 */ andi $v0, $v1, 0x2 /* DA9E4 801442E4 14400126 */ bnez $v0, .L80144780 /* DA9E8 801442E8 3C021020 */ lui $v0, (0x10200000 >> 16) /* DA9EC 801442EC 00621024 */ and $v0, $v1, $v0 /* DA9F0 801442F0 14400123 */ bnez $v0, .L80144780 /* DA9F4 801442F4 00000000 */ nop /* DA9F8 801442F8 82020045 */ lb $v0, 0x45($s0) /* DA9FC 801442FC 04400120 */ bltz $v0, .L80144780 /* DAA00 80144300 24020001 */ addiu $v0, $zero, 0x1 /* DAA04 80144304 10A2005E */ beq $a1, $v0, .L80144480 /* DAA08 80144308 30620100 */ andi $v0, $v1, 0x100 /* DAA0C 8014430C 14A0000E */ bnez $a1, .L80144348 /* DAA10 80144310 3C06E300 */ lui $a2, (0xE3000A01 >> 16) /* DAA14 80144314 3C06ED03 */ lui $a2, (0xED030050 >> 16) /* DAA18 80144318 34C60050 */ ori $a2, $a2, (0xED030050 & 0xFFFF) /* DAA1C 8014431C 3C05004D */ lui $a1, (0x4D0370 >> 16) /* DAA20 80144320 3C04800A */ lui $a0, %hi(gMainGfxPos) /* DAA24 80144324 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* DAA28 80144328 8C820000 */ lw $v0, 0x0($a0) /* DAA2C 8014432C 34A50370 */ ori $a1, $a1, (0x4D0370 & 0xFFFF) /* DAA30 80144330 0040182D */ daddu $v1, $v0, $zero /* DAA34 80144334 24420008 */ addiu $v0, $v0, 0x8 /* DAA38 80144338 AC820000 */ sw $v0, 0x0($a0) /* DAA3C 8014433C AC660000 */ sw $a2, 0x0($v1) /* DAA40 80144340 AC650004 */ sw $a1, 0x4($v1) /* DAA44 80144344 3C06E300 */ lui $a2, (0xE3000A01 >> 16) .L80144348: /* DAA48 80144348 34C60A01 */ ori $a2, $a2, (0xE3000A01 & 0xFFFF) /* DAA4C 8014434C 3C07E300 */ lui $a3, (0xE3000C00 >> 16) /* DAA50 80144350 34E70C00 */ ori $a3, $a3, (0xE3000C00 & 0xFFFF) /* DAA54 80144354 3C08E300 */ lui $t0, (0xE3000F00 >> 16) /* DAA58 80144358 35080F00 */ ori $t0, $t0, (0xE3000F00 & 0xFFFF) /* DAA5C 8014435C 3C09E300 */ lui $t1, (0xE3000D01 >> 16) /* DAA60 80144360 35290D01 */ ori $t1, $t1, (0xE3000D01 & 0xFFFF) /* DAA64 80144364 3C0AE300 */ lui $t2, (0xE3001402 >> 16) /* DAA68 80144368 354A1402 */ ori $t2, $t2, (0xE3001402 & 0xFFFF) /* DAA6C 8014436C 3C0BE300 */ lui $t3, (0xE3001700 >> 16) /* DAA70 80144370 356B1700 */ ori $t3, $t3, (0xE3001700 & 0xFFFF) /* DAA74 80144374 3C0CE200 */ lui $t4, (0xE2001E01 >> 16) /* DAA78 80144378 358C1E01 */ ori $t4, $t4, (0xE2001E01 & 0xFFFF) /* DAA7C 8014437C 3C0DE300 */ lui $t5, (0xE3001801 >> 16) /* DAA80 80144380 35AD1801 */ ori $t5, $t5, (0xE3001801 & 0xFFFF) /* DAA84 80144384 3C0EE300 */ lui $t6, (0xE3001A01 >> 16) /* DAA88 80144388 35CE1A01 */ ori $t6, $t6, (0xE3001A01 & 0xFFFF) /* DAA8C 8014438C 3C0FD700 */ lui $t7, (0xD7000002 >> 16) /* DAA90 80144390 3C04800A */ lui $a0, %hi(gMainGfxPos) /* DAA94 80144394 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* DAA98 80144398 35EF0002 */ ori $t7, $t7, (0xD7000002 & 0xFFFF) /* DAA9C 8014439C 8C820000 */ lw $v0, 0x0($a0) /* DAAA0 801443A0 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* DAAA4 801443A4 0040282D */ daddu $a1, $v0, $zero /* DAAA8 801443A8 24420008 */ addiu $v0, $v0, 0x8 /* DAAAC 801443AC AC820000 */ sw $v0, 0x0($a0) /* DAAB0 801443B0 ACA30000 */ sw $v1, 0x0($a1) /* DAAB4 801443B4 24430008 */ addiu $v1, $v0, 0x8 /* DAAB8 801443B8 ACA00004 */ sw $zero, 0x4($a1) /* DAABC 801443BC AC830000 */ sw $v1, 0x0($a0) /* DAAC0 801443C0 24430010 */ addiu $v1, $v0, 0x10 /* DAAC4 801443C4 AC460000 */ sw $a2, 0x0($v0) /* DAAC8 801443C8 AC400004 */ sw $zero, 0x4($v0) /* DAACC 801443CC AC830000 */ sw $v1, 0x0($a0) /* DAAD0 801443D0 24430018 */ addiu $v1, $v0, 0x18 /* DAAD4 801443D4 AC470008 */ sw $a3, 0x8($v0) /* DAAD8 801443D8 AC40000C */ sw $zero, 0xC($v0) /* DAADC 801443DC AC830000 */ sw $v1, 0x0($a0) /* DAAE0 801443E0 24430020 */ addiu $v1, $v0, 0x20 /* DAAE4 801443E4 AC480010 */ sw $t0, 0x10($v0) /* DAAE8 801443E8 AC400014 */ sw $zero, 0x14($v0) /* DAAEC 801443EC AC830000 */ sw $v1, 0x0($a0) /* DAAF0 801443F0 24430028 */ addiu $v1, $v0, 0x28 /* DAAF4 801443F4 AC490018 */ sw $t1, 0x18($v0) /* DAAF8 801443F8 AC40001C */ sw $zero, 0x1C($v0) /* DAAFC 801443FC AC830000 */ sw $v1, 0x0($a0) /* DAB00 80144400 24030C00 */ addiu $v1, $zero, 0xC00 /* DAB04 80144404 AC430024 */ sw $v1, 0x24($v0) /* DAB08 80144408 24430030 */ addiu $v1, $v0, 0x30 /* DAB0C 8014440C AC4A0020 */ sw $t2, 0x20($v0) /* DAB10 80144410 AC830000 */ sw $v1, 0x0($a0) /* DAB14 80144414 24430038 */ addiu $v1, $v0, 0x38 /* DAB18 80144418 AC4B0028 */ sw $t3, 0x28($v0) /* DAB1C 8014441C AC40002C */ sw $zero, 0x2C($v0) /* DAB20 80144420 AC830000 */ sw $v1, 0x0($a0) /* DAB24 80144424 24430040 */ addiu $v1, $v0, 0x40 /* DAB28 80144428 AC4C0030 */ sw $t4, 0x30($v0) /* DAB2C 8014442C AC400034 */ sw $zero, 0x34($v0) /* DAB30 80144430 AC830000 */ sw $v1, 0x0($a0) /* DAB34 80144434 24430048 */ addiu $v1, $v0, 0x48 /* DAB38 80144438 AC400038 */ sw $zero, 0x38($v0) /* DAB3C 8014443C AC40003C */ sw $zero, 0x3C($v0) /* DAB40 80144440 AC830000 */ sw $v1, 0x0($a0) /* DAB44 80144444 240300C0 */ addiu $v1, $zero, 0xC0 /* DAB48 80144448 AC430044 */ sw $v1, 0x44($v0) /* DAB4C 8014444C 24430050 */ addiu $v1, $v0, 0x50 /* DAB50 80144450 AC4D0040 */ sw $t5, 0x40($v0) /* DAB54 80144454 AC830000 */ sw $v1, 0x0($a0) /* DAB58 80144458 24030030 */ addiu $v1, $zero, 0x30 /* DAB5C 8014445C AC4E0048 */ sw $t6, 0x48($v0) /* DAB60 80144460 AC43004C */ sw $v1, 0x4C($v0) /* DAB64 80144464 24430058 */ addiu $v1, $v0, 0x58 /* DAB68 80144468 AC830000 */ sw $v1, 0x0($a0) /* DAB6C 8014446C 2403FFFF */ addiu $v1, $zero, -0x1 /* DAB70 80144470 AC4F0050 */ sw $t7, 0x50($v0) /* DAB74 80144474 AC430054 */ sw $v1, 0x54($v0) /* DAB78 80144478 8E030000 */ lw $v1, 0x0($s0) /* DAB7C 8014447C 30620100 */ andi $v0, $v1, 0x100 .L80144480: /* DAB80 80144480 1440005B */ bnez $v0, .L801445F0 /* DAB84 80144484 3C020010 */ lui $v0, (0x100000 >> 16) /* DAB88 80144488 00621024 */ and $v0, $v1, $v0 /* DAB8C 8014448C 1440000B */ bnez $v0, .L801444BC /* DAB90 80144490 00000000 */ nop /* DAB94 80144494 82040046 */ lb $a0, 0x46($s0) /* DAB98 80144498 3C038015 */ lui $v1, %hi(gHudElementSizes) /* DAB9C 8014449C 2463EFCC */ addiu $v1, $v1, %lo(gHudElementSizes) /* DABA0 801444A0 00041040 */ sll $v0, $a0, 1 /* DABA4 801444A4 00441021 */ addu $v0, $v0, $a0 /* DABA8 801444A8 00021040 */ sll $v0, $v0, 1 /* DABAC 801444AC 00431021 */ addu $v0, $v0, $v1 /* DABB0 801444B0 84560000 */ lh $s6, 0x0($v0) /* DABB4 801444B4 08051131 */ j .L801444C4 /* DABB8 801444B8 84550002 */ lh $s5, 0x2($v0) .L801444BC: /* DABBC 801444BC 9216004E */ lbu $s6, 0x4E($s0) /* DABC0 801444C0 9215004F */ lbu $s5, 0x4F($s0) .L801444C4: /* DABC4 801444C4 8E030000 */ lw $v1, 0x0($s0) /* DABC8 801444C8 30620010 */ andi $v0, $v1, 0x10 /* DABCC 801444CC 14400013 */ bnez $v0, .L8014451C /* DABD0 801444D0 3C020010 */ lui $v0, (0x100000 >> 16) /* DABD4 801444D4 00621024 */ and $v0, $v1, $v0 /* DABD8 801444D8 1440000C */ bnez $v0, .L8014450C /* DABDC 801444DC 00000000 */ nop /* DABE0 801444E0 82020045 */ lb $v0, 0x45($s0) /* DABE4 801444E4 3C048015 */ lui $a0, %hi(gHudElementSizes) /* DABE8 801444E8 2484EFCC */ addiu $a0, $a0, %lo(gHudElementSizes) /* DABEC 801444EC 00021840 */ sll $v1, $v0, 1 /* DABF0 801444F0 00621821 */ addu $v1, $v1, $v0 /* DABF4 801444F4 00031840 */ sll $v1, $v1, 1 /* DABF8 801444F8 00641821 */ addu $v1, $v1, $a0 /* DABFC 801444FC 84710000 */ lh $s1, 0x0($v1) /* DAC00 80144500 84720002 */ lh $s2, 0x2($v1) /* DAC04 80144504 0805114A */ j .L80144528 /* DAC08 80144508 00111023 */ negu $v0, $s1 .L8014450C: /* DAC0C 8014450C 92110050 */ lbu $s1, 0x50($s0) /* DAC10 80144510 92120051 */ lbu $s2, 0x51($s0) /* DAC14 80144514 0805114A */ j .L80144528 /* DAC18 80144518 00111023 */ negu $v0, $s1 .L8014451C: /* DAC1C 8014451C 92110048 */ lbu $s1, 0x48($s0) /* DAC20 80144520 92120049 */ lbu $s2, 0x49($s0) /* DAC24 80144524 00111023 */ negu $v0, $s1 .L80144528: /* DAC28 80144528 00021FC2 */ srl $v1, $v0, 31 /* DAC2C 8014452C 00431021 */ addu $v0, $v0, $v1 /* DAC30 80144530 00029843 */ sra $s3, $v0, 1 /* DAC34 80144534 00121023 */ negu $v0, $s2 /* DAC38 80144538 00021FC2 */ srl $v1, $v0, 31 /* DAC3C 8014453C 00431021 */ addu $v0, $v0, $v1 /* DAC40 80144540 0002A043 */ sra $s4, $v0, 1 /* DAC44 80144544 8E030000 */ lw $v1, 0x0($s0) /* DAC48 80144548 30620800 */ andi $v0, $v1, 0x800 /* DAC4C 8014454C 14400026 */ bnez $v0, .L801445E8 /* DAC50 80144550 3C022000 */ lui $v0, (0x20000000 >> 16) /* DAC54 80144554 00621024 */ and $v0, $v1, $v0 /* DAC58 80144558 10400012 */ beqz $v0, .L801445A4 /* DAC5C 8014455C 0200202D */ daddu $a0, $s0, $zero /* DAC60 80144560 02C0282D */ daddu $a1, $s6, $zero /* DAC64 80144564 02A0302D */ daddu $a2, $s5, $zero /* DAC68 80144568 00113C00 */ sll $a3, $s1, 16 /* DAC6C 8014456C 00073C03 */ sra $a3, $a3, 16 /* DAC70 80144570 00121400 */ sll $v0, $s2, 16 /* DAC74 80144574 00021403 */ sra $v0, $v0, 16 /* DAC78 80144578 AFA20010 */ sw $v0, 0x10($sp) /* DAC7C 8014457C 00131400 */ sll $v0, $s3, 16 /* DAC80 80144580 00021403 */ sra $v0, $v0, 16 /* DAC84 80144584 AFA20014 */ sw $v0, 0x14($sp) /* DAC88 80144588 00141400 */ sll $v0, $s4, 16 /* DAC8C 8014458C 00021403 */ sra $v0, $v0, 16 /* DAC90 80144590 AFA20018 */ sw $v0, 0x18($sp) /* DAC94 80144594 24020001 */ addiu $v0, $zero, 0x1 /* DAC98 80144598 AFA2001C */ sw $v0, 0x1C($sp) /* DAC9C 8014459C 0C04FDC1 */ jal hud_element_draw_rect /* DACA0 801445A0 AFA20020 */ sw $v0, 0x20($sp) .L801445A4: /* DACA4 801445A4 0200202D */ daddu $a0, $s0, $zero /* DACA8 801445A8 02C0282D */ daddu $a1, $s6, $zero /* DACAC 801445AC 02A0302D */ daddu $a2, $s5, $zero /* DACB0 801445B0 00113C00 */ sll $a3, $s1, 16 /* DACB4 801445B4 00073C03 */ sra $a3, $a3, 16 /* DACB8 801445B8 00121400 */ sll $v0, $s2, 16 /* DACBC 801445BC 00021403 */ sra $v0, $v0, 16 /* DACC0 801445C0 AFA20010 */ sw $v0, 0x10($sp) /* DACC4 801445C4 00131400 */ sll $v0, $s3, 16 /* DACC8 801445C8 00021403 */ sra $v0, $v0, 16 /* DACCC 801445CC AFA20014 */ sw $v0, 0x14($sp) /* DACD0 801445D0 00141400 */ sll $v0, $s4, 16 /* DACD4 801445D4 00021403 */ sra $v0, $v0, 16 /* DACD8 801445D8 AFA20018 */ sw $v0, 0x18($sp) /* DACDC 801445DC 24020001 */ addiu $v0, $zero, 0x1 /* DACE0 801445E0 080511DE */ j .L80144778 /* DACE4 801445E4 AFA2001C */ sw $v0, 0x1C($sp) .L801445E8: /* DACE8 801445E8 080511BC */ j .L801446F0 /* DACEC 801445EC 00621024 */ and $v0, $v1, $v0 .L801445F0: /* DACF0 801445F0 00621024 */ and $v0, $v1, $v0 /* DACF4 801445F4 1440000C */ bnez $v0, .L80144628 /* DACF8 801445F8 3C032000 */ lui $v1, (0x20000000 >> 16) /* DACFC 801445FC 82040046 */ lb $a0, 0x46($s0) /* DAD00 80144600 3C038015 */ lui $v1, %hi(gHudElementSizes) /* DAD04 80144604 2463EFCC */ addiu $v1, $v1, %lo(gHudElementSizes) /* DAD08 80144608 00041040 */ sll $v0, $a0, 1 /* DAD0C 8014460C 00441021 */ addu $v0, $v0, $a0 /* DAD10 80144610 00021040 */ sll $v0, $v0, 1 /* DAD14 80144614 00431021 */ addu $v0, $v0, $v1 /* DAD18 80144618 84560000 */ lh $s6, 0x0($v0) /* DAD1C 8014461C 84550002 */ lh $s5, 0x2($v0) /* DAD20 80144620 0805118C */ j .L80144630 /* DAD24 80144624 3C032000 */ lui $v1, (0x20000000 >> 16) .L80144628: /* DAD28 80144628 9216004E */ lbu $s6, 0x4E($s0) /* DAD2C 8014462C 9215004F */ lbu $s5, 0x4F($s0) .L80144630: /* DAD30 80144630 C6000028 */ lwc1 $f0, 0x28($s0) /* DAD34 80144634 C606002C */ lwc1 $f6, 0x2C($s0) /* DAD38 80144638 3C013F00 */ lui $at, (0x3F000000 >> 16) /* DAD3C 8014463C 44811000 */ mtc1 $at, $f2 /* DAD40 80144640 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DAD44 80144644 44815000 */ mtc1 $at, $f10 /* DAD48 80144648 46000207 */ neg.s $f8, $f0 /* DAD4C 8014464C 46024202 */ mul.s $f8, $f8, $f2 /* DAD50 80144650 00000000 */ nop /* DAD54 80144654 3C014480 */ lui $at, (0x44800000 >> 16) /* DAD58 80144658 44816000 */ mtc1 $at, $f12 /* DAD5C 8014465C 8E020000 */ lw $v0, 0x0($s0) /* DAD60 80144660 4600038D */ trunc.w.s $f14, $f0 /* DAD64 80144664 44117000 */ mfc1 $s1, $f14 /* DAD68 80144668 4600338D */ trunc.w.s $f14, $f6 /* DAD6C 8014466C 44127000 */ mfc1 $s2, $f14 /* DAD70 80144670 46003187 */ neg.s $f6, $f6 /* DAD74 80144674 46023182 */ mul.s $f6, $f6, $f2 /* DAD78 80144678 00000000 */ nop /* DAD7C 8014467C 44912000 */ mtc1 $s1, $f4 /* DAD80 80144680 00000000 */ nop /* DAD84 80144684 46802120 */ cvt.s.w $f4, $f4 /* DAD88 80144688 44960000 */ mtc1 $s6, $f0 /* DAD8C 8014468C 00000000 */ nop /* DAD90 80144690 46800020 */ cvt.s.w $f0, $f0 /* DAD94 80144694 46002103 */ div.s $f4, $f4, $f0 /* DAD98 80144698 46045103 */ div.s $f4, $f10, $f4 /* DAD9C 8014469C 460C2102 */ mul.s $f4, $f4, $f12 /* DADA0 801446A0 00000000 */ nop /* DADA4 801446A4 44920000 */ mtc1 $s2, $f0 /* DADA8 801446A8 00000000 */ nop /* DADAC 801446AC 46800020 */ cvt.s.w $f0, $f0 /* DADB0 801446B0 44951000 */ mtc1 $s5, $f2 /* DADB4 801446B4 00000000 */ nop /* DADB8 801446B8 468010A0 */ cvt.s.w $f2, $f2 /* DADBC 801446BC 46020003 */ div.s $f0, $f0, $f2 /* DADC0 801446C0 46005003 */ div.s $f0, $f10, $f0 /* DADC4 801446C4 460C0002 */ mul.s $f0, $f0, $f12 /* DADC8 801446C8 00000000 */ nop /* DADCC 801446CC 00431024 */ and $v0, $v0, $v1 /* DADD0 801446D0 4600438D */ trunc.w.s $f14, $f8 /* DADD4 801446D4 44137000 */ mfc1 $s3, $f14 /* DADD8 801446D8 4600338D */ trunc.w.s $f14, $f6 /* DADDC 801446DC 44147000 */ mfc1 $s4, $f14 /* DADE0 801446E0 4600238D */ trunc.w.s $f14, $f4 /* DADE4 801446E4 E60E0034 */ swc1 $f14, 0x34($s0) /* DADE8 801446E8 4600038D */ trunc.w.s $f14, $f0 /* DADEC 801446EC E60E0038 */ swc1 $f14, 0x38($s0) .L801446F0: /* DADF0 801446F0 10400012 */ beqz $v0, .L8014473C /* DADF4 801446F4 0200202D */ daddu $a0, $s0, $zero /* DADF8 801446F8 02C0282D */ daddu $a1, $s6, $zero /* DADFC 801446FC 02A0302D */ daddu $a2, $s5, $zero /* DAE00 80144700 00113C00 */ sll $a3, $s1, 16 /* DAE04 80144704 00073C03 */ sra $a3, $a3, 16 /* DAE08 80144708 00121400 */ sll $v0, $s2, 16 /* DAE0C 8014470C 00021403 */ sra $v0, $v0, 16 /* DAE10 80144710 AFA20010 */ sw $v0, 0x10($sp) /* DAE14 80144714 00131400 */ sll $v0, $s3, 16 /* DAE18 80144718 00021403 */ sra $v0, $v0, 16 /* DAE1C 8014471C AFA20014 */ sw $v0, 0x14($sp) /* DAE20 80144720 00141400 */ sll $v0, $s4, 16 /* DAE24 80144724 00021403 */ sra $v0, $v0, 16 /* DAE28 80144728 AFA20018 */ sw $v0, 0x18($sp) /* DAE2C 8014472C 24020001 */ addiu $v0, $zero, 0x1 /* DAE30 80144730 AFA0001C */ sw $zero, 0x1C($sp) /* DAE34 80144734 0C04FDC1 */ jal hud_element_draw_rect /* DAE38 80144738 AFA20020 */ sw $v0, 0x20($sp) .L8014473C: /* DAE3C 8014473C 0200202D */ daddu $a0, $s0, $zero /* DAE40 80144740 02C0282D */ daddu $a1, $s6, $zero /* DAE44 80144744 02A0302D */ daddu $a2, $s5, $zero /* DAE48 80144748 00113C00 */ sll $a3, $s1, 16 /* DAE4C 8014474C 00073C03 */ sra $a3, $a3, 16 /* DAE50 80144750 00121400 */ sll $v0, $s2, 16 /* DAE54 80144754 00021403 */ sra $v0, $v0, 16 /* DAE58 80144758 AFA20010 */ sw $v0, 0x10($sp) /* DAE5C 8014475C 00131400 */ sll $v0, $s3, 16 /* DAE60 80144760 00021403 */ sra $v0, $v0, 16 /* DAE64 80144764 AFA20014 */ sw $v0, 0x14($sp) /* DAE68 80144768 00141400 */ sll $v0, $s4, 16 /* DAE6C 8014476C 00021403 */ sra $v0, $v0, 16 /* DAE70 80144770 AFA20018 */ sw $v0, 0x18($sp) /* DAE74 80144774 AFA0001C */ sw $zero, 0x1C($sp) .L80144778: /* DAE78 80144778 0C04FDC1 */ jal hud_element_draw_rect /* DAE7C 8014477C AFA00020 */ sw $zero, 0x20($sp) .L80144780: /* DAE80 80144780 8FBF0044 */ lw $ra, 0x44($sp) /* DAE84 80144784 8FB60040 */ lw $s6, 0x40($sp) /* DAE88 80144788 8FB5003C */ lw $s5, 0x3C($sp) /* DAE8C 8014478C 8FB40038 */ lw $s4, 0x38($sp) /* DAE90 80144790 8FB30034 */ lw $s3, 0x34($sp) /* DAE94 80144794 8FB20030 */ lw $s2, 0x30($sp) /* DAE98 80144798 8FB1002C */ lw $s1, 0x2C($sp) /* DAE9C 8014479C 8FB00028 */ lw $s0, 0x28($sp) /* DAEA0 801447A0 03E00008 */ jr $ra /* DAEA4 801447A4 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void draw_hud_element_internal(s32 id, s32 clipMode) { HudElement* elem = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]; s32 texSizeX, texSizeY; s32 drawSizeX, drawSizeY; s32 offsetX, offsetY; s32 preset; if (elem->flags && !(elem->flags & HUD_ELEMENT_FLAG_DISABLED)) { if (!(elem->flags & (HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_10000000)) && (elem->drawSizePreset >= 0)) { if (clipMode != HUD_ELEMENT_DRAW_NEXT) { if (clipMode == HUD_ELEMENT_DRAW_FIRST_WITH_CLIPPING) { gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20); } gDPPipeSync(gMainGfxPos++); gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP); gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT); gDPSetCombineKey(gMainGfxPos++, G_CK_NONE); gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); gDPNoOp(gMainGfxPos++); gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE); gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); } if (!(elem->flags & HUD_ELEMENT_FLAG_FIXEDSCALE)) { if (!(elem->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { preset = elem->tileSizePreset; texSizeX = gHudElementSizes[preset].width; texSizeY = gHudElementSizes[preset].height; } else { texSizeX = elem->customImageSize.x; texSizeY = elem->customImageSize.y; } if (!(elem->flags & HUD_ELEMENT_FLAG_SCALED)) { if (!(elem->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { drawSizeX = gHudElementSizes[elem->drawSizePreset].width; drawSizeY = gHudElementSizes[elem->drawSizePreset].height; } else { drawSizeX = elem->customDrawSize.x; drawSizeY = elem->customDrawSize.y; } } else { drawSizeX = elem->sizeX; drawSizeY = elem->sizeY; } do { offsetX = -drawSizeX / 2; offsetY = -drawSizeY / 2; } while (0); // required to match if (!(elem->flags & HUD_ELEMENT_FLAG_REPEATED)) { if (elem->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE); } hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE); } else { if (elem->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); } } else { f32 xScaled, yScaled; if (!(elem->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { preset = elem->tileSizePreset; texSizeX = gHudElementSizes[preset].width; texSizeY = gHudElementSizes[preset].height; } else { texSizeX = elem->customImageSize.x; texSizeY = elem->customImageSize.y; } drawSizeX = elem->unkImgScale[0]; drawSizeY = elem->unkImgScale[1]; offsetX = -elem->unkImgScale[0] / 2; offsetY = -elem->unkImgScale[1] / 2; xScaled = (f32) drawSizeX / (f32) texSizeX; yScaled = (f32) drawSizeY / (f32) texSizeY; xScaled = 1.0f / xScaled; yScaled = 1.0f / yScaled; elem->widthScale = X10(xScaled); elem->heightScale = X10(yScaled); if (elem->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel shimmer_burst_appendGfx /* 3747F0 E0070740 27BDFF10 */ addiu $sp, $sp, -0xF0 /* 3747F4 E0070744 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3747F8 E0070748 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3747FC E007074C AFA400F0 */ sw $a0, 0xF0($sp) /* 374800 E0070750 27A40020 */ addiu $a0, $sp, 0x20 /* 374804 E0070754 AFB100B4 */ sw $s1, 0xB4($sp) /* 374808 E0070758 3C110001 */ lui $s1, (0x11630 >> 16) /* 37480C E007075C 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 374810 E0070760 AFB500C4 */ sw $s5, 0xC4($sp) /* 374814 E0070764 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 374818 E0070768 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 37481C E007076C AFBF00D4 */ sw $ra, 0xD4($sp) /* 374820 E0070770 AFBE00D0 */ sw $fp, 0xD0($sp) /* 374824 E0070774 AFB700CC */ sw $s7, 0xCC($sp) /* 374828 E0070778 AFB600C8 */ sw $s6, 0xC8($sp) /* 37482C E007077C AFB400C0 */ sw $s4, 0xC0($sp) /* 374830 E0070780 AFB300BC */ sw $s3, 0xBC($sp) /* 374834 E0070784 AFB200B8 */ sw $s2, 0xB8($sp) /* 374838 E0070788 AFB000B0 */ sw $s0, 0xB0($sp) /* 37483C E007078C F7B800E8 */ sdc1 $f24, 0xE8($sp) /* 374840 E0070790 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 374844 E0070794 F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 374848 E0070798 8EA50000 */ lw $a1, 0x0($s5) /* 37484C E007079C 8FAA00F0 */ lw $t2, 0xF0($sp) /* 374850 E00707A0 00A0182D */ daddu $v1, $a1, $zero /* 374854 E00707A4 8D52000C */ lw $s2, 0xC($t2) /* 374858 E00707A8 24A50008 */ addiu $a1, $a1, 0x8 /* 37485C E00707AC AEA50000 */ sw $a1, 0x0($s5) /* 374860 E00707B0 8E4A0050 */ lw $t2, 0x50($s2) /* 374864 E00707B4 C642004C */ lwc1 $f2, 0x4C($s2) /* 374868 E00707B8 468010A0 */ cvt.s.w $f2, $f2 /* 37486C E00707BC AFAA00A0 */ sw $t2, 0xA0($sp) /* 374870 E00707C0 8E4A0054 */ lw $t2, 0x54($s2) /* 374874 E00707C4 24130001 */ addiu $s3, $zero, 0x1 /* 374878 E00707C8 AFAA00A4 */ sw $t2, 0xA4($sp) /* 37487C E00707CC 8E4A0058 */ lw $t2, 0x58($s2) /* 374880 E00707D0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 374884 E00707D4 AFAA00A8 */ sw $t2, 0xA8($sp) /* 374888 E00707D8 AC620000 */ sw $v0, 0x0($v1) /* 37488C E00707DC AC600004 */ sw $zero, 0x4($v1) /* 374890 E00707E0 ACA60000 */ sw $a2, 0x0($a1) /* 374894 E00707E4 8FAA00F0 */ lw $t2, 0xF0($sp) /* 374898 E00707E8 3C01437F */ lui $at, (0x437F0000 >> 16) /* 37489C E00707EC 44810000 */ mtc1 $at, $f0 /* 3748A0 E00707F0 8D430010 */ lw $v1, 0x10($t2) /* 3748A4 E00707F4 24A20008 */ addiu $v0, $a1, 0x8 /* 3748A8 E00707F8 AEA20000 */ sw $v0, 0x0($s5) /* 3748AC E00707FC 8C62001C */ lw $v0, 0x1C($v1) /* 3748B0 E0070800 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3748B4 E0070804 00431021 */ addu $v0, $v0, $v1 /* 3748B8 E0070808 ACA20004 */ sw $v0, 0x4($a1) /* 3748BC E007080C 8E450004 */ lw $a1, 0x4($s2) /* 3748C0 E0070810 8E460008 */ lw $a2, 0x8($s2) /* 3748C4 E0070814 8E47000C */ lw $a3, 0xC($s2) /* 3748C8 E0070818 0C080108 */ jal shim_guTranslateF /* 3748CC E007081C 46001503 */ div.s $f20, $f2, $f0 /* 3748D0 E0070820 27B00060 */ addiu $s0, $sp, 0x60 /* 3748D4 E0070824 8E450060 */ lw $a1, 0x60($s2) /* 3748D8 E0070828 0200202D */ daddu $a0, $s0, $zero /* 3748DC E007082C 00A0302D */ daddu $a2, $a1, $zero /* 3748E0 E0070830 0C080110 */ jal shim_guScaleF /* 3748E4 E0070834 00A0382D */ daddu $a3, $a1, $zero /* 3748E8 E0070838 0200202D */ daddu $a0, $s0, $zero /* 3748EC E007083C 27A50020 */ addiu $a1, $sp, 0x20 /* 3748F0 E0070840 0C080114 */ jal shim_guMtxCatF /* 3748F4 E0070844 00A0302D */ daddu $a2, $a1, $zero /* 3748F8 E0070848 27A40020 */ addiu $a0, $sp, 0x20 /* 3748FC E007084C 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 374900 E0070850 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 374904 E0070854 3C16800A */ lui $s6, %hi(gDisplayContext) /* 374908 E0070858 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 37490C E007085C 96050000 */ lhu $a1, 0x0($s0) /* 374910 E0070860 8EC20000 */ lw $v0, 0x0($s6) /* 374914 E0070864 00052980 */ sll $a1, $a1, 6 /* 374918 E0070868 00B12821 */ addu $a1, $a1, $s1 /* 37491C E007086C 0C080118 */ jal shim_guMtxF2L /* 374920 E0070870 00452821 */ addu $a1, $v0, $a1 /* 374924 E0070874 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 374928 E0070878 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 37492C E007087C 8EA40000 */ lw $a0, 0x0($s5) /* 374930 E0070880 96020000 */ lhu $v0, 0x0($s0) /* 374934 E0070884 0080282D */ daddu $a1, $a0, $zero /* 374938 E0070888 24840008 */ addiu $a0, $a0, 0x8 /* 37493C E007088C AEA40000 */ sw $a0, 0x0($s5) /* 374940 E0070890 ACA30000 */ sw $v1, 0x0($a1) /* 374944 E0070894 00531821 */ addu $v1, $v0, $s3 /* 374948 E0070898 3042FFFF */ andi $v0, $v0, 0xFFFF /* 37494C E007089C 00021180 */ sll $v0, $v0, 6 /* 374950 E00708A0 00511021 */ addu $v0, $v0, $s1 /* 374954 E00708A4 A6030000 */ sh $v1, 0x0($s0) /* 374958 E00708A8 8EC30000 */ lw $v1, 0x0($s6) /* 37495C E00708AC 24870010 */ addiu $a3, $a0, 0x10 /* 374960 E00708B0 00621821 */ addu $v1, $v1, $v0 /* 374964 E00708B4 24820008 */ addiu $v0, $a0, 0x8 /* 374968 E00708B8 ACA30004 */ sw $v1, 0x4($a1) /* 37496C E00708BC AEA20000 */ sw $v0, 0x0($s5) /* 374970 E00708C0 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 374974 E00708C4 AC820000 */ sw $v0, 0x0($a0) /* 374978 E00708C8 92430043 */ lbu $v1, 0x43($s2) /* 37497C E00708CC 92450047 */ lbu $a1, 0x47($s2) /* 374980 E00708D0 9246004B */ lbu $a2, 0x4B($s2) /* 374984 E00708D4 9248005F */ lbu $t0, 0x5F($s2) /* 374988 E00708D8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 37498C E00708DC AEA70000 */ sw $a3, 0x0($s5) /* 374990 E00708E0 AC820008 */ sw $v0, 0x8($a0) /* 374994 E00708E4 3C020900 */ lui $v0, %hi(D_09000F20_327330) /* 374998 E00708E8 24420F20 */ addiu $v0, $v0, %lo(D_09000F20_327330) /* 37499C E00708EC AC82000C */ sw $v0, 0xC($a0) /* 3749A0 E00708F0 24820018 */ addiu $v0, $a0, 0x18 /* 3749A4 E00708F4 AEA20000 */ sw $v0, 0x0($s5) /* 3749A8 E00708F8 00031E00 */ sll $v1, $v1, 24 /* 3749AC E00708FC 00052C00 */ sll $a1, $a1, 16 /* 3749B0 E0070900 00651825 */ or $v1, $v1, $a1 /* 3749B4 E0070904 00063200 */ sll $a2, $a2, 8 /* 3749B8 E0070908 00661825 */ or $v1, $v1, $a2 /* 3749BC E007090C 00681825 */ or $v1, $v1, $t0 /* 3749C0 E0070910 AC830004 */ sw $v1, 0x4($a0) /* 3749C4 E0070914 8FAA00F0 */ lw $t2, 0xF0($sp) /* 3749C8 E0070918 00E0A02D */ daddu $s4, $a3, $zero /* 3749CC E007091C 8D420008 */ lw $v0, 0x8($t2) /* 3749D0 E0070920 0262102A */ slt $v0, $s3, $v0 /* 3749D4 E0070924 1040006E */ beqz $v0, .LE0070AE0 /* 3749D8 E0070928 2652006C */ addiu $s2, $s2, 0x6C /* 3749DC E007092C 02C0F02D */ daddu $fp, $s6, $zero /* 3749E0 E0070930 0200B82D */ daddu $s7, $s0, $zero /* 3749E4 E0070934 3C160001 */ lui $s6, (0x11630 >> 16) /* 3749E8 E0070938 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 3749EC E007093C 02A0882D */ daddu $s1, $s5, $zero /* 3749F0 E0070940 2650004C */ addiu $s0, $s2, 0x4C /* 3749F4 E0070944 8FAA00A0 */ lw $t2, 0xA0($sp) /* 3749F8 E0070948 4480C000 */ mtc1 $zero, $f24 /* 3749FC E007094C 000A1600 */ sll $v0, $t2, 24 /* 374A00 E0070950 8FAA00A4 */ lw $t2, 0xA4($sp) /* 374A04 E0070954 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 374A08 E0070958 4481B000 */ mtc1 $at, $f22 /* 374A0C E007095C 314300FF */ andi $v1, $t2, 0xFF /* 374A10 E0070960 00031C00 */ sll $v1, $v1, 16 /* 374A14 E0070964 8FAA00A8 */ lw $t2, 0xA8($sp) /* 374A18 E0070968 00431025 */ or $v0, $v0, $v1 /* 374A1C E007096C 314300FF */ andi $v1, $t2, 0xFF /* 374A20 E0070970 00031A00 */ sll $v1, $v1, 8 /* 374A24 E0070974 0043A825 */ or $s5, $v0, $v1 .LE0070978: /* 374A28 E0070978 8E02FFE4 */ lw $v0, -0x1C($s0) /* 374A2C E007097C 04400052 */ bltz $v0, .LE0070AC8 /* 374A30 E0070980 00000000 */ nop /* 374A34 E0070984 C6000014 */ lwc1 $f0, 0x14($s0) /* 374A38 E0070988 46140002 */ mul.s $f0, $f0, $f20 /* 374A3C E007098C 00000000 */ nop /* 374A40 E0070990 4405C000 */ mfc1 $a1, $f24 /* 374A44 E0070994 4406C000 */ mfc1 $a2, $f24 /* 374A48 E0070998 E7A00010 */ swc1 $f0, 0x10($sp) /* 374A4C E007099C C600FFB8 */ lwc1 $f0, -0x48($s0) /* 374A50 E00709A0 E7A00014 */ swc1 $f0, 0x14($sp) /* 374A54 E00709A4 C600FFBC */ lwc1 $f0, -0x44($s0) /* 374A58 E00709A8 E7A00018 */ swc1 $f0, 0x18($sp) /* 374A5C E00709AC C600FFC0 */ lwc1 $f0, -0x40($s0) /* 374A60 E00709B0 E7A0001C */ swc1 $f0, 0x1C($sp) /* 374A64 E00709B4 8E07FFE8 */ lw $a3, -0x18($s0) /* 374A68 E00709B8 0C080180 */ jal shim_guPositionF /* 374A6C E00709BC 27A40020 */ addiu $a0, $sp, 0x20 /* 374A70 E00709C0 27A40020 */ addiu $a0, $sp, 0x20 /* 374A74 E00709C4 96E50000 */ lhu $a1, 0x0($s7) /* 374A78 E00709C8 8FC20000 */ lw $v0, 0x0($fp) /* 374A7C E00709CC 00052980 */ sll $a1, $a1, 6 /* 374A80 E00709D0 00B62821 */ addu $a1, $a1, $s6 /* 374A84 E00709D4 0C080118 */ jal shim_guMtxF2L /* 374A88 E00709D8 00452821 */ addu $a1, $v0, $a1 /* 374A8C E00709DC 8E240000 */ lw $a0, 0x0($s1) /* 374A90 E00709E0 0080302D */ daddu $a2, $a0, $zero /* 374A94 E00709E4 24840008 */ addiu $a0, $a0, 0x8 /* 374A98 E00709E8 AE240000 */ sw $a0, 0x0($s1) /* 374A9C E00709EC 96E50000 */ lhu $a1, 0x0($s7) /* 374AA0 E00709F0 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 374AA4 E00709F4 ACC20000 */ sw $v0, 0x0($a2) /* 374AA8 E00709F8 8FC30000 */ lw $v1, 0x0($fp) /* 374AAC E00709FC 30A2FFFF */ andi $v0, $a1, 0xFFFF /* 374AB0 E0070A00 00021180 */ sll $v0, $v0, 6 /* 374AB4 E0070A04 00561021 */ addu $v0, $v0, $s6 /* 374AB8 E0070A08 00621821 */ addu $v1, $v1, $v0 /* 374ABC E0070A0C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 374AC0 E0070A10 24A50001 */ addiu $a1, $a1, 0x1 /* 374AC4 E0070A14 ACC30004 */ sw $v1, 0x4($a2) /* 374AC8 E0070A18 AC820000 */ sw $v0, 0x0($a0) /* 374ACC E0070A1C C6000000 */ lwc1 $f0, 0x0($s0) /* 374AD0 E0070A20 46800020 */ cvt.s.w $f0, $f0 /* 374AD4 E0070A24 46140002 */ mul.s $f0, $f0, $f20 /* 374AD8 E0070A28 00000000 */ nop /* 374ADC E0070A2C 24820008 */ addiu $v0, $a0, 0x8 /* 374AE0 E0070A30 24840004 */ addiu $a0, $a0, 0x4 /* 374AE4 E0070A34 A6E50000 */ sh $a1, 0x0($s7) /* 374AE8 E0070A38 4600B03E */ c.le.s $f22, $f0 /* 374AEC E0070A3C 00000000 */ nop /* 374AF0 E0070A40 45010005 */ bc1t .LE0070A58 /* 374AF4 E0070A44 AE220000 */ sw $v0, 0x0($s1) /* 374AF8 E0070A48 4600010D */ trunc.w.s $f4, $f0 /* 374AFC E0070A4C 44052000 */ mfc1 $a1, $f4 /* 374B00 E0070A50 0801C29D */ j .LE0070A74 /* 374B04 E0070A54 3C06D838 */ lui $a2, (0xD8380002 >> 16) .LE0070A58: /* 374B08 E0070A58 46160001 */ sub.s $f0, $f0, $f22 /* 374B0C E0070A5C 3C028000 */ lui $v0, (0x80000000 >> 16) /* 374B10 E0070A60 4600010D */ trunc.w.s $f4, $f0 /* 374B14 E0070A64 44052000 */ mfc1 $a1, $f4 /* 374B18 E0070A68 00000000 */ nop /* 374B1C E0070A6C 00A22825 */ or $a1, $a1, $v0 /* 374B20 E0070A70 3C06D838 */ lui $a2, (0xD8380002 >> 16) .LE0070A74: /* 374B24 E0070A74 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 374B28 E0070A78 30A200FF */ andi $v0, $a1, 0xFF /* 374B2C E0070A7C 8E230000 */ lw $v1, 0x0($s1) /* 374B30 E0070A80 02A21025 */ or $v0, $s5, $v0 /* 374B34 E0070A84 AC820000 */ sw $v0, 0x0($a0) /* 374B38 E0070A88 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 374B3C E0070A8C 0060282D */ daddu $a1, $v1, $zero /* 374B40 E0070A90 24630008 */ addiu $v1, $v1, 0x8 /* 374B44 E0070A94 AE230000 */ sw $v1, 0x0($s1) /* 374B48 E0070A98 ACA20000 */ sw $v0, 0x0($a1) /* 374B4C E0070A9C 32620007 */ andi $v0, $s3, 0x7 /* 374B50 E0070AA0 00021080 */ sll $v0, $v0, 2 /* 374B54 E0070AA4 3C04E007 */ lui $a0, (0xE0070CD0 >> 16) /* 374B58 E0070AA8 00822021 */ addu $a0, $a0, $v0 /* 374B5C E0070AAC 8C840CD0 */ lw $a0, (0xE0070CD0 & 0xFFFF)($a0) /* 374B60 E0070AB0 24620008 */ addiu $v0, $v1, 0x8 /* 374B64 E0070AB4 AE220000 */ sw $v0, 0x0($s1) /* 374B68 E0070AB8 24020040 */ addiu $v0, $zero, 0x40 /* 374B6C E0070ABC ACA40004 */ sw $a0, 0x4($a1) /* 374B70 E0070AC0 AC660000 */ sw $a2, 0x0($v1) /* 374B74 E0070AC4 AC620004 */ sw $v0, 0x4($v1) .LE0070AC8: /* 374B78 E0070AC8 8FAA00F0 */ lw $t2, 0xF0($sp) /* 374B7C E0070ACC 26730001 */ addiu $s3, $s3, 0x1 /* 374B80 E0070AD0 8D420008 */ lw $v0, 0x8($t2) /* 374B84 E0070AD4 0262102A */ slt $v0, $s3, $v0 /* 374B88 E0070AD8 1440FFA7 */ bnez $v0, .LE0070978 /* 374B8C E0070ADC 2610006C */ addiu $s0, $s0, 0x6C .LE0070AE0: /* 374B90 E0070AE0 27A40020 */ addiu $a0, $sp, 0x20 /* 374B94 E0070AE4 3C150001 */ lui $s5, (0x11630 >> 16) /* 374B98 E0070AE8 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 374B9C E0070AEC 3C1ED838 */ lui $fp, (0xD8380002 >> 16) /* 374BA0 E0070AF0 37DE0002 */ ori $fp, $fp, (0xD8380002 & 0xFFFF) /* 374BA4 E0070AF4 3C10800A */ lui $s0, %hi(gMainGfxPos) /* 374BA8 E0070AF8 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* 374BAC E0070AFC 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 374BB0 E0070B00 3C16DE00 */ lui $s6, (0xDE000000 >> 16) /* 374BB4 E0070B04 8E030000 */ lw $v1, 0x0($s0) /* 374BB8 E0070B08 3C0542F0 */ lui $a1, (0x42F00000 >> 16) /* 374BBC E0070B0C 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 374BC0 E0070B10 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 374BC4 E0070B14 4481A000 */ mtc1 $at, $f20 /* 374BC8 E0070B18 4480B000 */ mtc1 $zero, $f22 /* 374BCC E0070B1C 3C013F4C */ lui $at, (0x3F4CCCCD >> 16) /* 374BD0 E0070B20 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF) /* 374BD4 E0070B24 4481C000 */ mtc1 $at, $f24 /* 374BD8 E0070B28 0060402D */ daddu $t0, $v1, $zero /* 374BDC E0070B2C 4406A000 */ mfc1 $a2, $f20 /* 374BE0 E0070B30 4407B000 */ mfc1 $a3, $f22 /* 374BE4 E0070B34 24630008 */ addiu $v1, $v1, 0x8 /* 374BE8 E0070B38 AE030000 */ sw $v1, 0x0($s0) /* 374BEC E0070B3C AD020000 */ sw $v0, 0x0($t0) /* 374BF0 E0070B40 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 374BF4 E0070B44 AD000004 */ sw $zero, 0x4($t0) /* 374BF8 E0070B48 AE820000 */ sw $v0, 0x0($s4) /* 374BFC E0070B4C 24620008 */ addiu $v0, $v1, 0x8 /* 374C00 E0070B50 AE830004 */ sw $v1, 0x4($s4) /* 374C04 E0070B54 26940008 */ addiu $s4, $s4, 0x8 /* 374C08 E0070B58 AE020000 */ sw $v0, 0x0($s0) /* 374C0C E0070B5C AC760000 */ sw $s6, 0x0($v1) /* 374C10 E0070B60 AC740004 */ sw $s4, 0x4($v1) /* 374C14 E0070B64 0C080104 */ jal shim_guRotateF /* 374C18 E0070B68 E7B80010 */ swc1 $f24, 0x10($sp) /* 374C1C E0070B6C 27A40020 */ addiu $a0, $sp, 0x20 /* 374C20 E0070B70 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 374C24 E0070B74 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 374C28 E0070B78 3C13800A */ lui $s3, %hi(gDisplayContext) /* 374C2C E0070B7C 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 374C30 E0070B80 96250000 */ lhu $a1, 0x0($s1) /* 374C34 E0070B84 8E620000 */ lw $v0, 0x0($s3) /* 374C38 E0070B88 00052980 */ sll $a1, $a1, 6 /* 374C3C E0070B8C 00B52821 */ addu $a1, $a1, $s5 /* 374C40 E0070B90 0C080118 */ jal shim_guMtxF2L /* 374C44 E0070B94 00452821 */ addu $a1, $v0, $a1 /* 374C48 E0070B98 27A40020 */ addiu $a0, $sp, 0x20 /* 374C4C E0070B9C 3C17DA38 */ lui $s7, (0xDA380000 >> 16) /* 374C50 E0070BA0 8E080000 */ lw $t0, 0x0($s0) /* 374C54 E0070BA4 3C05C2F0 */ lui $a1, (0xC2F00000 >> 16) /* 374C58 E0070BA8 4406A000 */ mfc1 $a2, $f20 /* 374C5C E0070BAC 4407B000 */ mfc1 $a3, $f22 /* 374C60 E0070BB0 0100482D */ daddu $t1, $t0, $zero /* 374C64 E0070BB4 25080008 */ addiu $t0, $t0, 0x8 /* 374C68 E0070BB8 AE080000 */ sw $t0, 0x0($s0) /* 374C6C E0070BBC 96220000 */ lhu $v0, 0x0($s1) /* 374C70 E0070BC0 24120040 */ addiu $s2, $zero, 0x40 /* 374C74 E0070BC4 AD370000 */ sw $s7, 0x0($t1) /* 374C78 E0070BC8 24430001 */ addiu $v1, $v0, 0x1 /* 374C7C E0070BCC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 374C80 E0070BD0 00021180 */ sll $v0, $v0, 6 /* 374C84 E0070BD4 A6230000 */ sh $v1, 0x0($s1) /* 374C88 E0070BD8 8E630000 */ lw $v1, 0x0($s3) /* 374C8C E0070BDC 00551021 */ addu $v0, $v0, $s5 /* 374C90 E0070BE0 00621821 */ addu $v1, $v1, $v0 /* 374C94 E0070BE4 25020008 */ addiu $v0, $t0, 0x8 /* 374C98 E0070BE8 AD230004 */ sw $v1, 0x4($t1) /* 374C9C E0070BEC AE020000 */ sw $v0, 0x0($s0) /* 374CA0 E0070BF0 25020010 */ addiu $v0, $t0, 0x10 /* 374CA4 E0070BF4 AD160000 */ sw $s6, 0x0($t0) /* 374CA8 E0070BF8 AD140004 */ sw $s4, 0x4($t0) /* 374CAC E0070BFC AE020000 */ sw $v0, 0x0($s0) /* 374CB0 E0070C00 AD1E0008 */ sw $fp, 0x8($t0) /* 374CB4 E0070C04 AD12000C */ sw $s2, 0xC($t0) /* 374CB8 E0070C08 0C080104 */ jal shim_guRotateF /* 374CBC E0070C0C E7B80010 */ swc1 $f24, 0x10($sp) /* 374CC0 E0070C10 27A40020 */ addiu $a0, $sp, 0x20 /* 374CC4 E0070C14 96250000 */ lhu $a1, 0x0($s1) /* 374CC8 E0070C18 8E620000 */ lw $v0, 0x0($s3) /* 374CCC E0070C1C 00052980 */ sll $a1, $a1, 6 /* 374CD0 E0070C20 00B52821 */ addu $a1, $a1, $s5 /* 374CD4 E0070C24 0C080118 */ jal shim_guMtxF2L /* 374CD8 E0070C28 00452821 */ addu $a1, $v0, $a1 /* 374CDC E0070C2C 8E040000 */ lw $a0, 0x0($s0) /* 374CE0 E0070C30 96220000 */ lhu $v0, 0x0($s1) /* 374CE4 E0070C34 0080282D */ daddu $a1, $a0, $zero /* 374CE8 E0070C38 24840008 */ addiu $a0, $a0, 0x8 /* 374CEC E0070C3C 24430001 */ addiu $v1, $v0, 0x1 /* 374CF0 E0070C40 3042FFFF */ andi $v0, $v0, 0xFFFF /* 374CF4 E0070C44 00021180 */ sll $v0, $v0, 6 /* 374CF8 E0070C48 AE040000 */ sw $a0, 0x0($s0) /* 374CFC E0070C4C ACB70000 */ sw $s7, 0x0($a1) /* 374D00 E0070C50 A6230000 */ sh $v1, 0x0($s1) /* 374D04 E0070C54 8E630000 */ lw $v1, 0x0($s3) /* 374D08 E0070C58 00551021 */ addu $v0, $v0, $s5 /* 374D0C E0070C5C 00621821 */ addu $v1, $v1, $v0 /* 374D10 E0070C60 24820008 */ addiu $v0, $a0, 0x8 /* 374D14 E0070C64 ACA30004 */ sw $v1, 0x4($a1) /* 374D18 E0070C68 AE020000 */ sw $v0, 0x0($s0) /* 374D1C E0070C6C 24820010 */ addiu $v0, $a0, 0x10 /* 374D20 E0070C70 AC960000 */ sw $s6, 0x0($a0) /* 374D24 E0070C74 AC940004 */ sw $s4, 0x4($a0) /* 374D28 E0070C78 AE020000 */ sw $v0, 0x0($s0) /* 374D2C E0070C7C 24820018 */ addiu $v0, $a0, 0x18 /* 374D30 E0070C80 AC9E0008 */ sw $fp, 0x8($a0) /* 374D34 E0070C84 AC92000C */ sw $s2, 0xC($a0) /* 374D38 E0070C88 AE020000 */ sw $v0, 0x0($s0) /* 374D3C E0070C8C AC9E0010 */ sw $fp, 0x10($a0) /* 374D40 E0070C90 AC920014 */ sw $s2, 0x14($a0) /* 374D44 E0070C94 8FBF00D4 */ lw $ra, 0xD4($sp) /* 374D48 E0070C98 8FBE00D0 */ lw $fp, 0xD0($sp) /* 374D4C E0070C9C 8FB700CC */ lw $s7, 0xCC($sp) /* 374D50 E0070CA0 8FB600C8 */ lw $s6, 0xC8($sp) /* 374D54 E0070CA4 8FB500C4 */ lw $s5, 0xC4($sp) /* 374D58 E0070CA8 8FB400C0 */ lw $s4, 0xC0($sp) /* 374D5C E0070CAC 8FB300BC */ lw $s3, 0xBC($sp) /* 374D60 E0070CB0 8FB200B8 */ lw $s2, 0xB8($sp) /* 374D64 E0070CB4 8FB100B4 */ lw $s1, 0xB4($sp) /* 374D68 E0070CB8 8FB000B0 */ lw $s0, 0xB0($sp) /* 374D6C E0070CBC D7B800E8 */ ldc1 $f24, 0xE8($sp) /* 374D70 E0070CC0 D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 374D74 E0070CC4 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 374D78 E0070CC8 03E00008 */ jr $ra /* 374D7C E0070CCC 27BD00F0 */ addiu $sp, $sp, 0xF0 ### DECOMPILED C INSTRUCTIONS: void shimmer_burst_appendGfx(void* effect) { ShimmerBurstFXData* part = ((EffectInstance*)effect)->data.shimmerBurst; s32 unk_50 = part->unk_50; s32 unk_54 = part->unk_54; s32 unk_58 = part->unk_58; f32 temp_f20 = part->unk_4C / 255.0f; Gfx* savedGfxPos; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp20, part->unk_04, part->unk_08, part->unk_0C); shim_guScaleF(sp60, part->unk_60, part->unk_60, part->unk_60); 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); gDPSetEnvColor(gMainGfxPos++, part->unk_40, part->unk_44, part->unk_48, part->unk_5C); gSPDisplayList(gMainGfxPos++, D_09000F20_338EE0); savedGfxPos = gMainGfxPos; gMainGfxPos++; part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_30 >= 0) { shim_guPositionF(sp20, 0.0f, 0.0f, part->unk_34, part->unk_60 * temp_f20, 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); gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_50, unk_54, unk_58, part->unk_4C * temp_f20); gSPDisplayList(gMainGfxPos++, D_E0070CD0[i & 7]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); shim_guRotateF(sp20, 120.0f, 0.4f, 0.0f, 0.8f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); shim_guRotateF(sp20, -120.0f, 0.4f, 0.0f, 0.8f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_title_screen /* 124B4 800370B4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 124B8 800370B8 AFB00018 */ sw $s0, 0x18($sp) /* 124BC 800370BC 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 124C0 800370C0 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 124C4 800370C4 AFBF0020 */ sw $ra, 0x20($sp) /* 124C8 800370C8 AFB1001C */ sw $s1, 0x1C($sp) /* 124CC 800370CC 8E020000 */ lw $v0, 0x0($s0) /* 124D0 800370D0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 124D4 800370D4 44816000 */ mtc1 $at, $f12 /* 124D8 800370D8 0C00AFBB */ jal set_curtain_scale /* 124DC 800370DC 8C510010 */ lw $s1, 0x10($v0) /* 124E0 800370E0 44806000 */ mtc1 $zero, $f12 /* 124E4 800370E4 0C00AFC9 */ jal set_curtain_fade /* 124E8 800370E8 00000000 */ nop /* 124EC 800370EC 3C04800A */ lui $a0, %hi(D_800A0988) /* 124F0 800370F0 24840988 */ addiu $a0, $a0, %lo(D_800A0988) /* 124F4 800370F4 84820000 */ lh $v0, 0x0($a0) /* 124F8 800370F8 94830000 */ lhu $v1, 0x0($a0) /* 124FC 800370FC 18400002 */ blez $v0, .L80037108 /* 12500 80037100 2462FFFF */ addiu $v0, $v1, -0x1 /* 12504 80037104 A4820000 */ sh $v0, 0x0($a0) .L80037108: /* 12508 80037108 8E020000 */ lw $v0, 0x0($s0) /* 1250C 8003710C 804300AC */ lb $v1, 0xAC($v0) /* 12510 80037110 2C620007 */ sltiu $v0, $v1, 0x7 /* 12514 80037114 10400115 */ beqz $v0, .L8003756C /* 12518 80037118 00031080 */ sll $v0, $v1, 2 /* 1251C 8003711C 3C01800A */ lui $at, %hi(jtbl_800983A8) /* 12520 80037120 00220821 */ addu $at, $at, $v0 /* 12524 80037124 8C2283A8 */ lw $v0, %lo(jtbl_800983A8)($at) /* 12528 80037128 00400008 */ jr $v0 /* 1252C 8003712C 00000000 */ nop glabel .L80037130 /* 12530 80037130 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 12534 80037134 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 12538 80037138 8C820000 */ lw $v0, 0x0($a0) /* 1253C 8003713C 24030003 */ addiu $v1, $zero, 0x3 /* 12540 80037140 3C01800A */ lui $at, %hi(D_800A0970) /* 12544 80037144 A4230970 */ sh $v1, %lo(D_800A0970)($at) /* 12548 80037148 34420008 */ ori $v0, $v0, 0x8 /* 1254C 8003714C AC820000 */ sw $v0, 0x0($a0) /* 12550 80037150 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 12554 80037154 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* 12558 80037158 8C830000 */ lw $v1, 0x0($a0) /* 1255C 8003715C 24020014 */ addiu $v0, $zero, 0x14 /* 12560 80037160 A06200B0 */ sb $v0, 0xB0($v1) /* 12564 80037164 8C830000 */ lw $v1, 0x0($a0) /* 12568 80037168 906200B0 */ lbu $v0, 0xB0($v1) /* 1256C 8003716C A06200AF */ sb $v0, 0xAF($v1) /* 12570 80037170 8C830000 */ lw $v1, 0x0($a0) /* 12574 80037174 906200AC */ lbu $v0, 0xAC($v1) /* 12578 80037178 24420001 */ addiu $v0, $v0, 0x1 /* 1257C 8003717C 0800DD5B */ j .L8003756C /* 12580 80037180 A06200AC */ sb $v0, 0xAC($v1) glabel .L80037184 /* 12584 80037184 3C04800A */ lui $a0, %hi(D_800A0970) /* 12588 80037188 24840970 */ addiu $a0, $a0, %lo(D_800A0970) /* 1258C 8003718C 84820000 */ lh $v0, 0x0($a0) /* 12590 80037190 94830000 */ lhu $v1, 0x0($a0) /* 12594 80037194 10400003 */ beqz $v0, .L800371A4 /* 12598 80037198 2462FFFF */ addiu $v0, $v1, -0x1 /* 1259C 8003719C 0800DD5B */ j .L8003756C /* 125A0 800371A0 A4820000 */ sh $v0, 0x0($a0) .L800371A4: /* 125A4 800371A4 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 125A8 800371A8 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 125AC 800371AC 8E040000 */ lw $a0, 0x0($s0) /* 125B0 800371B0 808200AF */ lb $v0, 0xAF($a0) /* 125B4 800371B4 908300AF */ lbu $v1, 0xAF($a0) /* 125B8 800371B8 10400002 */ beqz $v0, .L800371C4 /* 125BC 800371BC 2462FFFF */ addiu $v0, $v1, -0x1 /* 125C0 800371C0 A08200AF */ sb $v0, 0xAF($a0) .L800371C4: /* 125C4 800371C4 24040006 */ addiu $a0, $zero, 0x6 /* 125C8 800371C8 3C02800A */ lui $v0, %hi(gOverrideFlags) /* 125CC 800371CC 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags) /* 125D0 800371D0 8C430000 */ lw $v1, 0x0($v0) /* 125D4 800371D4 2405FFF7 */ addiu $a1, $zero, -0x9 /* 125D8 800371D8 00651824 */ and $v1, $v1, $a1 /* 125DC 800371DC 0C00CDFE */ jal intro_logos_fade_in /* 125E0 800371E0 AC430000 */ sw $v1, 0x0($v0) /* 125E4 800371E4 10400074 */ beqz $v0, .L800373B8 /* 125E8 800371E8 00000000 */ nop /* 125EC 800371EC 8E030000 */ lw $v1, 0x0($s0) /* 125F0 800371F0 806200AF */ lb $v0, 0xAF($v1) /* 125F4 800371F4 14400070 */ bnez $v0, .L800373B8 /* 125F8 800371F8 24020002 */ addiu $v0, $zero, 0x2 /* 125FC 800371FC 0800DCEE */ j .L800373B8 /* 12600 80037200 A06200AC */ sb $v0, 0xAC($v1) glabel .L80037204 /* 12604 80037204 3C028007 */ lui $v0, %hi(D_80077A34) /* 12608 80037208 8C427A34 */ lw $v0, %lo(D_80077A34)($v0) /* 1260C 8003720C 1040000B */ beqz $v0, .L8003723C /* 12610 80037210 24020078 */ addiu $v0, $zero, 0x78 /* 12614 80037214 3C03800A */ lui $v1, %hi(D_800A0988) /* 12618 80037218 84630988 */ lh $v1, %lo(D_800A0988)($v1) /* 1261C 8003721C 14620007 */ bne $v1, $v0, .L8003723C /* 12620 80037220 24020008 */ addiu $v0, $zero, 0x8 /* 12624 80037224 AFA20010 */ sw $v0, 0x10($sp) /* 12628 80037228 0000202D */ daddu $a0, $zero, $zero /* 1262C 8003722C 2405FFFF */ addiu $a1, $zero, -0x1 /* 12630 80037230 0080302D */ daddu $a2, $a0, $zero /* 12634 80037234 0C052A46 */ jal bgm_set_song /* 12638 80037238 24070F3C */ addiu $a3, $zero, 0xF3C .L8003723C: /* 1263C 8003723C 3C02800A */ lui $v0, %hi(D_800A0988) /* 12640 80037240 84420988 */ lh $v0, %lo(D_800A0988)($v0) /* 12644 80037244 14400012 */ bnez $v0, .L80037290 /* 12648 80037248 32229000 */ andi $v0, $s1, 0x9000 /* 1264C 8003724C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 12650 80037250 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 12654 80037254 24030004 */ addiu $v1, $zero, 0x4 /* 12658 80037258 A04300AC */ sb $v1, 0xAC($v0) /* 1265C 8003725C 3C028007 */ lui $v0, %hi(D_80077A34) /* 12660 80037260 8C427A34 */ lw $v0, %lo(D_80077A34)($v0) /* 12664 80037264 14400002 */ bnez $v0, .L80037270 /* 12668 80037268 24020009 */ addiu $v0, $zero, 0x9 /* 1266C 8003726C 2402000A */ addiu $v0, $zero, 0xA .L80037270: /* 12670 80037270 3C018007 */ lui $at, %hi(D_800779C0) /* 12674 80037274 A42279C0 */ sh $v0, %lo(D_800779C0)($at) /* 12678 80037278 3C038007 */ lui $v1, %hi(D_80077A34) /* 1267C 8003727C 24637A34 */ addiu $v1, $v1, %lo(D_80077A34) /* 12680 80037280 8C620000 */ lw $v0, 0x0($v1) /* 12684 80037284 38420001 */ xori $v0, $v0, 0x1 /* 12688 80037288 0800DD64 */ j .L80037590 /* 1268C 8003728C AC620000 */ sw $v0, 0x0($v1) .L80037290: /* 12690 80037290 104000B6 */ beqz $v0, .L8003756C /* 12694 80037294 24020004 */ addiu $v0, $zero, 0x4 /* 12698 80037298 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 1269C 8003729C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 126A0 800372A0 A06200AC */ sb $v0, 0xAC($v1) /* 126A4 800372A4 24020005 */ addiu $v0, $zero, 0x5 /* 126A8 800372A8 3C018007 */ lui $at, %hi(D_800779C0) /* 126AC 800372AC A42279C0 */ sh $v0, %lo(D_800779C0)($at) /* 126B0 800372B0 0C05272D */ jal sfx_play_sound /* 126B4 800372B4 240400D5 */ addiu $a0, $zero, 0xD5 /* 126B8 800372B8 0000202D */ daddu $a0, $zero, $zero /* 126BC 800372BC 24050069 */ addiu $a1, $zero, 0x69 /* 126C0 800372C0 0080302D */ daddu $a2, $a0, $zero /* 126C4 800372C4 240701F4 */ addiu $a3, $zero, 0x1F4 /* 126C8 800372C8 24020008 */ addiu $v0, $zero, 0x8 /* 126CC 800372CC 0C052A46 */ jal bgm_set_song /* 126D0 800372D0 AFA20010 */ sw $v0, 0x10($sp) /* 126D4 800372D4 0800DD64 */ j .L80037590 /* 126D8 800372D8 00000000 */ nop glabel .L800372DC /* 126DC 800372DC 240400D0 */ addiu $a0, $zero, 0xD0 /* 126E0 800372E0 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 126E4 800372E4 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 126E8 800372E8 8E030000 */ lw $v1, 0x0($s0) /* 126EC 800372EC 24020005 */ addiu $v0, $zero, 0x5 /* 126F0 800372F0 0C00CDF8 */ jal intro_logos_set_fade_color /* 126F4 800372F4 A06200AC */ sb $v0, 0xAC($v1) /* 126F8 800372F8 3C028007 */ lui $v0, %hi(D_800779C0) /* 126FC 800372FC 944279C0 */ lhu $v0, %lo(D_800779C0)($v0) /* 12700 80037300 2442FFF7 */ addiu $v0, $v0, -0x9 /* 12704 80037304 2C420002 */ sltiu $v0, $v0, 0x2 /* 12708 80037308 10400004 */ beqz $v0, .L8003731C /* 1270C 8003730C 24020014 */ addiu $v0, $zero, 0x14 /* 12710 80037310 8E030000 */ lw $v1, 0x0($s0) /* 12714 80037314 0800DCCA */ j .L80037328 /* 12718 80037318 A06200B0 */ sb $v0, 0xB0($v1) .L8003731C: /* 1271C 8003731C 8E030000 */ lw $v1, 0x0($s0) /* 12720 80037320 2402000A */ addiu $v0, $zero, 0xA /* 12724 80037324 A06200B0 */ sb $v0, 0xB0($v1) .L80037328: /* 12728 80037328 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 1272C 8003732C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 12730 80037330 906200B0 */ lbu $v0, 0xB0($v1) /* 12734 80037334 0800DD5B */ j .L8003756C /* 12738 80037338 A06200AF */ sb $v0, 0xAF($v1) glabel .L8003733C /* 1273C 8003733C 3C038007 */ lui $v1, %hi(D_800779C0) /* 12740 80037340 946379C0 */ lhu $v1, %lo(D_800779C0)($v1) /* 12744 80037344 2462FFF7 */ addiu $v0, $v1, -0x9 /* 12748 80037348 2C420002 */ sltiu $v0, $v0, 0x2 /* 1274C 8003734C 1040001E */ beqz $v0, .L800373C8 /* 12750 80037350 00031400 */ sll $v0, $v1, 16 /* 12754 80037354 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 12758 80037358 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 1275C 8003735C 8E040000 */ lw $a0, 0x0($s0) /* 12760 80037360 808200AF */ lb $v0, 0xAF($a0) /* 12764 80037364 908300AF */ lbu $v1, 0xAF($a0) /* 12768 80037368 10400002 */ beqz $v0, .L80037374 /* 1276C 8003736C 2462FFFF */ addiu $v0, $v1, -0x1 /* 12770 80037370 A08200AF */ sb $v0, 0xAF($a0) .L80037374: /* 12774 80037374 0C00CE0C */ jal intro_logos_fade_out /* 12778 80037378 2404000A */ addiu $a0, $zero, 0xA /* 1277C 8003737C 1040000E */ beqz $v0, .L800373B8 /* 12780 80037380 00000000 */ nop /* 12784 80037384 8E030000 */ lw $v1, 0x0($s0) /* 12788 80037388 806200AF */ lb $v0, 0xAF($v1) /* 1278C 8003738C 1440000A */ bnez $v0, .L800373B8 /* 12790 80037390 24020003 */ addiu $v0, $zero, 0x3 /* 12794 80037394 A06200AF */ sb $v0, 0xAF($v1) /* 12798 80037398 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 1279C 8003739C 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 127A0 800373A0 8C620000 */ lw $v0, 0x0($v1) /* 127A4 800373A4 34420008 */ ori $v0, $v0, 0x8 /* 127A8 800373A8 AC620000 */ sw $v0, 0x0($v1) /* 127AC 800373AC 8E030000 */ lw $v1, 0x0($s0) /* 127B0 800373B0 24020006 */ addiu $v0, $zero, 0x6 /* 127B4 800373B4 A06200AC */ sb $v0, 0xAC($v1) .L800373B8: /* 127B8 800373B8 0C00CE1D */ jal intro_logos_update_fade /* 127BC 800373BC 00000000 */ nop /* 127C0 800373C0 0800DD5B */ j .L8003756C /* 127C4 800373C4 00000000 */ nop .L800373C8: /* 127C8 800373C8 00021403 */ sra $v0, $v0, 16 /* 127CC 800373CC 24030005 */ addiu $v1, $zero, 0x5 /* 127D0 800373D0 14430012 */ bne $v0, $v1, .L8003741C /* 127D4 800373D4 24020003 */ addiu $v0, $zero, 0x3 /* 127D8 800373D8 3C058007 */ lui $a1, %hi(gGameStatusPtr) /* 127DC 800373DC 24A5419C */ addiu $a1, $a1, %lo(gGameStatusPtr) /* 127E0 800373E0 8CA40000 */ lw $a0, 0x0($a1) /* 127E4 800373E4 808200AF */ lb $v0, 0xAF($a0) /* 127E8 800373E8 908300AF */ lbu $v1, 0xAF($a0) /* 127EC 800373EC 1440001F */ bnez $v0, .L8003746C /* 127F0 800373F0 2462FFFF */ addiu $v0, $v1, -0x1 /* 127F4 800373F4 24020003 */ addiu $v0, $zero, 0x3 /* 127F8 800373F8 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 127FC 800373FC 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 12800 80037400 A08200AF */ sb $v0, 0xAF($a0) /* 12804 80037404 8C620000 */ lw $v0, 0x0($v1) /* 12808 80037408 34420008 */ ori $v0, $v0, 0x8 /* 1280C 8003740C AC620000 */ sw $v0, 0x0($v1) /* 12810 80037410 8CA30000 */ lw $v1, 0x0($a1) /* 12814 80037414 0800DD12 */ j .L80037448 /* 12818 80037418 24020006 */ addiu $v0, $zero, 0x6 .L8003741C: /* 1281C 8003741C 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 12820 80037420 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* 12824 80037424 8C830000 */ lw $v1, 0x0($a0) /* 12828 80037428 A06200AF */ sb $v0, 0xAF($v1) /* 1282C 8003742C 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 12830 80037430 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 12834 80037434 8C620000 */ lw $v0, 0x0($v1) /* 12838 80037438 34420008 */ ori $v0, $v0, 0x8 /* 1283C 8003743C AC620000 */ sw $v0, 0x0($v1) /* 12840 80037440 8C830000 */ lw $v1, 0x0($a0) /* 12844 80037444 24020006 */ addiu $v0, $zero, 0x6 .L80037448: /* 12848 80037448 0800DD5B */ j .L8003756C /* 1284C 8003744C A06200AC */ sb $v0, 0xAC($v1) glabel .L80037450 /* 12850 80037450 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 12854 80037454 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 12858 80037458 8E040000 */ lw $a0, 0x0($s0) /* 1285C 8003745C 808200AF */ lb $v0, 0xAF($a0) /* 12860 80037460 908300AF */ lbu $v1, 0xAF($a0) /* 12864 80037464 10400003 */ beqz $v0, .L80037474 /* 12868 80037468 2462FFFF */ addiu $v0, $v1, -0x1 .L8003746C: /* 1286C 8003746C 0800DD5B */ j .L8003756C /* 12870 80037470 A08200AF */ sb $v0, 0xAF($a0) .L80037474: /* 12874 80037474 0C00AB00 */ jal general_heap_create /* 12878 80037478 00000000 */ nop /* 1287C 8003747C 0C047624 */ jal clear_render_tasks /* 12880 80037480 00000000 */ nop /* 12884 80037484 0C00B7BD */ jal create_cameras_a /* 12888 80037488 00000000 */ nop /* 1288C 8003748C 0C0482EC */ jal clear_entity_models /* 12890 80037490 00000000 */ nop /* 12894 80037494 0C047889 */ jal clear_animator_list /* 12898 80037498 00000000 */ nop /* 1289C 8003749C 0C00E12F */ jal clear_npcs /* 128A0 800374A0 00000000 */ nop /* 128A4 800374A4 0C050440 */ jal hud_element_clear_cache /* 128A8 800374A8 00000000 */ nop /* 128AC 800374AC 0C0B763E */ jal spr_init_sprites /* 128B0 800374B0 0000202D */ daddu $a0, $zero, $zero /* 128B4 800374B4 0C04432E */ jal clear_entity_data /* 128B8 800374B8 24040001 */ addiu $a0, $zero, 0x1 /* 128BC 800374BC 0C051CFC */ jal clear_windows /* 128C0 800374C0 00000000 */ nop /* 128C4 800374C4 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 128C8 800374C8 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 128CC 800374CC 2403FFF7 */ addiu $v1, $zero, -0x9 /* 128D0 800374D0 8C820000 */ lw $v0, 0x0($a0) /* 128D4 800374D4 8E050000 */ lw $a1, 0x0($s0) /* 128D8 800374D8 00431024 */ and $v0, $v0, $v1 /* 128DC 800374DC 2403FFFD */ addiu $v1, $zero, -0x3 /* 128E0 800374E0 00431024 */ and $v0, $v0, $v1 /* 128E4 800374E4 AC820000 */ sw $v0, 0x0($a0) /* 128E8 800374E8 3C038007 */ lui $v1, %hi(D_800779C0) /* 128EC 800374EC 846379C0 */ lh $v1, %lo(D_800779C0)($v1) /* 128F0 800374F0 24020009 */ addiu $v0, $zero, 0x9 /* 128F4 800374F4 1062000D */ beq $v1, $v0, .L8003752C /* 128F8 800374F8 A4A0008E */ sh $zero, 0x8E($a1) /* 128FC 800374FC 2862000A */ slti $v0, $v1, 0xA /* 12900 80037500 10400005 */ beqz $v0, .L80037518 /* 12904 80037504 24020005 */ addiu $v0, $zero, 0x5 /* 12908 80037508 10620011 */ beq $v1, $v0, .L80037550 /* 1290C 8003750C 2404000E */ addiu $a0, $zero, 0xE /* 12910 80037510 0800DD64 */ j .L80037590 /* 12914 80037514 00000000 */ nop .L80037518: /* 12918 80037518 2402000A */ addiu $v0, $zero, 0xA /* 1291C 8003751C 10620008 */ beq $v1, $v0, .L80037540 /* 12920 80037520 00000000 */ nop /* 12924 80037524 0800DD64 */ j .L80037590 /* 12928 80037528 00000000 */ nop .L8003752C: /* 1292C 8003752C A0A000A8 */ sb $zero, 0xA8($a1) /* 12930 80037530 0C00CD3C */ jal set_game_mode /* 12934 80037534 24040010 */ addiu $a0, $zero, 0x10 /* 12938 80037538 0800DD64 */ j .L80037590 /* 1293C 8003753C 00000000 */ nop .L80037540: /* 12940 80037540 0C00CD3C */ jal set_game_mode /* 12944 80037544 24040011 */ addiu $a0, $zero, 0x11 /* 12948 80037548 0800DD64 */ j .L80037590 /* 1294C 8003754C 00000000 */ nop .L80037550: /* 12950 80037550 2402000B */ addiu $v0, $zero, 0xB /* 12954 80037554 A4A00086 */ sh $zero, 0x86($a1) /* 12958 80037558 A4A2008C */ sh $v0, 0x8C($a1) /* 1295C 8003755C 0C00CD3C */ jal set_game_mode /* 12960 80037560 A4A0008E */ sh $zero, 0x8E($a1) /* 12964 80037564 0800DD64 */ j .L80037590 /* 12968 80037568 00000000 */ nop glabel .L8003756C /* 1296C 8003756C 3C02800A */ lui $v0, %hi(gOverrideFlags) /* 12970 80037570 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) /* 12974 80037574 30420008 */ andi $v0, $v0, 0x8 /* 12978 80037578 14400005 */ bnez $v0, .L80037590 /* 1297C 8003757C 00000000 */ nop /* 12980 80037580 0C00E64C */ jal update_npcs /* 12984 80037584 00000000 */ nop /* 12988 80037588 0C00B500 */ jal update_cameras /* 1298C 8003758C 00000000 */ nop .L80037590: /* 12990 80037590 8FBF0020 */ lw $ra, 0x20($sp) /* 12994 80037594 8FB1001C */ lw $s1, 0x1C($sp) /* 12998 80037598 8FB00018 */ lw $s0, 0x18($sp) /* 1299C 8003759C 03E00008 */ jr $ra /* 129A0 800375A0 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void state_step_title_screen(void) { s16* temp; u32 pressedButtons = gGameStatusPtr->pressedButtons[0]; set_curtain_scale(1.0f); set_curtain_fade(0.0f); if (D_800A0988 > 0) { D_800A0988--; } switch (gGameStatusPtr->introState) { case INTRO_STATE_0: D_800A0970 = 3; gOverrideFlags |= GLOBAL_OVERRIDES_8; gGameStatusPtr->unk_B0 = 20; gGameStatusPtr->unk_AF = gGameStatusPtr->unk_B0; gGameStatusPtr->introState++; break; case INTRO_STATE_1: if (D_800A0970 != 0) { D_800A0970--; } else { if (gGameStatusPtr->unk_AF != 0) { gGameStatusPtr->unk_AF--; } gOverrideFlags &= ~GLOBAL_OVERRIDES_8; if (intro_logos_fade_in(6) != 0) { if (gGameStatusPtr->unk_AF == 0) { gGameStatusPtr->introState = INTRO_STATE_2; } } intro_logos_update_fade(); } break; case INTRO_STATE_2: if (D_80077A34[0] != NULL && D_800A0988 == 120) { bgm_set_song(0, -1, 0, 3900, 8); } if (D_800A0988 == 0) { gGameStatusPtr->introState = INTRO_STATE_4; if (D_80077A34[0] == NULL) { *D_800779C0 = 10; } else { *D_800779C0 = 9; } D_80077A34[0] ^= 1; return; } if (pressedButtons & (BUTTON_A | BUTTON_START)) { gGameStatusPtr->introState = INTRO_STATE_4; *D_800779C0 = 5; sfx_play_sound(SOUND_D5); bgm_set_song(0, SONG_FILE_SELECT, 0, 500, 8); return; } break; case INTRO_STATE_4: gGameStatusPtr->introState = INTRO_STATE_5; intro_logos_set_fade_color(0xD0); if (*D_800779C0 == 9 || *D_800779C0 == 10) { gGameStatusPtr->unk_B0 = 20; } else { gGameStatusPtr->unk_B0 = 10; } gGameStatusPtr->unk_AF = gGameStatusPtr->unk_B0; break; case INTRO_STATE_5: if (*D_800779C0 == 9 || *D_800779C0 == 10) { if (gGameStatusPtr->unk_AF != 0) { gGameStatusPtr->unk_AF--; } if (intro_logos_fade_out(0xA) != 0) { if (gGameStatusPtr->unk_AF == 0) { gGameStatusPtr->unk_AF = 3; gOverrideFlags |= GLOBAL_OVERRIDES_8; gGameStatusPtr->introState = INTRO_STATE_6; } } intro_logos_update_fade(); } else if (*D_800779C0 == 5) { if (gGameStatusPtr->unk_AF == 0) { gGameStatusPtr->unk_AF = 3; gOverrideFlags |= GLOBAL_OVERRIDES_8; gGameStatusPtr->introState = INTRO_STATE_6; } else { gGameStatusPtr->unk_AF--; } } else { gGameStatusPtr->unk_AF = 3; gOverrideFlags |= GLOBAL_OVERRIDES_8; gGameStatusPtr->introState = INTRO_STATE_6; } break; case INTRO_STATE_6: if (gGameStatusPtr->unk_AF != 0) { gGameStatusPtr->unk_AF--; break; } general_heap_create(); clear_render_tasks(); create_cameras_a(); clear_entity_models(); clear_animator_list(); clear_npcs(); hud_element_clear_cache(); spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD); clear_entity_data(1); clear_windows(); gOverrideFlags &= ~GLOBAL_OVERRIDES_8; gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD; temp = D_800779C0; gGameStatusPtr->entryID = 0; switch (temp[0]) { case 9: gGameStatusPtr->creditsViewportMode = 0; set_game_mode(GAME_MODE_INTRO); break; case 10: set_game_mode(GAME_MODE_DEMO); break; case 5: gGameStatusPtr->areaID = 0; gGameStatusPtr->mapID = 0xB; gGameStatusPtr->entryID = 0; set_game_mode(GAME_MODE_FILE_SELECT); break; } return; } if (!(gOverrideFlags & GLOBAL_OVERRIDES_8)) { update_npcs(); update_cameras(); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel is_ability_active /* 831F8 800E9D48 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 831FC 800E9D4C AFBF0028 */ sw $ra, 0x28($sp) /* 83200 800E9D50 0080482D */ daddu $t1, $a0, $zero /* 83204 800E9D54 3C088011 */ lui $t0, %hi(gPlayerData) /* 83208 800E9D58 2508F290 */ addiu $t0, $t0, %lo(gPlayerData) /* 8320C 800E9D5C 0000282D */ daddu $a1, $zero, $zero /* 83210 800E9D60 00A0202D */ daddu $a0, $a1, $zero /* 83214 800E9D64 24070005 */ addiu $a3, $zero, 0x5 /* 83218 800E9D68 27A20024 */ addiu $v0, $sp, 0x24 .L800E9D6C: /* 8321C 800E9D6C AC400000 */ sw $zero, 0x0($v0) /* 83220 800E9D70 24E7FFFF */ addiu $a3, $a3, -0x1 /* 83224 800E9D74 04E1FFFD */ bgez $a3, .L800E9D6C /* 83228 800E9D78 2442FFFC */ addiu $v0, $v0, -0x4 /* 8322C 800E9D7C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 83230 800E9D80 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 83234 800E9D84 9042007E */ lbu $v0, 0x7E($v0) /* 83238 800E9D88 30420001 */ andi $v0, $v0, 0x1 /* 8323C 800E9D8C 144000C7 */ bnez $v0, .L800EA0AC /* 83240 800E9D90 0000102D */ daddu $v0, $zero, $zero /* 83244 800E9D94 0000382D */ daddu $a3, $zero, $zero /* 83248 800E9D98 3C038011 */ lui $v1, %hi(D_8010BF60) /* 8324C 800E9D9C 2463BF60 */ addiu $v1, $v1, %lo(D_8010BF60) /* 83250 800E9DA0 00091080 */ sll $v0, $t1, 2 /* 83254 800E9DA4 00435021 */ addu $t2, $v0, $v1 /* 83258 800E9DA8 27A30010 */ addiu $v1, $sp, 0x10 /* 8325C 800E9DAC 00041080 */ sll $v0, $a0, 2 /* 83260 800E9DB0 00433021 */ addu $a2, $v0, $v1 /* 83264 800E9DB4 00071040 */ sll $v0, $a3, 1 .L800E9DB8: /* 83268 800E9DB8 01021021 */ addu $v0, $t0, $v0 /* 8326C 800E9DBC 84430208 */ lh $v1, 0x208($v0) /* 83270 800E9DC0 10600004 */ beqz $v1, .L800E9DD4 /* 83274 800E9DC4 00031140 */ sll $v0, $v1, 5 /* 83278 800E9DC8 3C038008 */ lui $v1, %hi(gItemTable + 0x1A) /* 8327C 800E9DCC 00621821 */ addu $v1, $v1, $v0 /* 83280 800E9DD0 906378FA */ lbu $v1, %lo(gItemTable + 0x1A)($v1) .L800E9DD4: /* 83284 800E9DD4 2D220038 */ sltiu $v0, $t1, 0x38 /* 83288 800E9DD8 504000A9 */ beql $v0, $zero, .L800EA080 /* 8328C 800E9DDC 24E70001 */ addiu $a3, $a3, 0x1 /* 83290 800E9DE0 8D420000 */ lw $v0, 0x0($t2) /* 83294 800E9DE4 00400008 */ jr $v0 /* 83298 800E9DE8 00000000 */ nop /* 8329C 800E9DEC 0803A81D */ j .L800EA074 /* 832A0 800E9DF0 2402004C */ addiu $v0, $zero, 0x4C /* 832A4 800E9DF4 0803A81D */ j .L800EA074 /* 832A8 800E9DF8 24020040 */ addiu $v0, $zero, 0x40 /* 832AC 800E9DFC 0803A81D */ j .L800EA074 /* 832B0 800E9E00 2402004D */ addiu $v0, $zero, 0x4D /* 832B4 800E9E04 0803A81D */ j .L800EA074 /* 832B8 800E9E08 24020052 */ addiu $v0, $zero, 0x52 /* 832BC 800E9E0C 0803A81D */ j .L800EA074 /* 832C0 800E9E10 24020035 */ addiu $v0, $zero, 0x35 /* 832C4 800E9E14 24020053 */ addiu $v0, $zero, 0x53 /* 832C8 800E9E18 50620001 */ beql $v1, $v0, .L800E9E20 /* 832CC 800E9E1C 24A50001 */ addiu $a1, $a1, 0x1 .L800E9E20: /* 832D0 800E9E20 8102000A */ lb $v0, 0xA($t0) /* 832D4 800E9E24 50400096 */ beql $v0, $zero, .L800EA080 /* 832D8 800E9E28 24E70001 */ addiu $a3, $a3, 0x1 /* 832DC 800E9E2C 0803A81F */ j .L800EA07C /* 832E0 800E9E30 24A50001 */ addiu $a1, $a1, 0x1 /* 832E4 800E9E34 0803A81D */ j .L800EA074 /* 832E8 800E9E38 24020041 */ addiu $v0, $zero, 0x41 /* 832EC 800E9E3C 0803A81D */ j .L800EA074 /* 832F0 800E9E40 24020042 */ addiu $v0, $zero, 0x42 /* 832F4 800E9E44 0803A81D */ j .L800EA074 /* 832F8 800E9E48 2402005A */ addiu $v0, $zero, 0x5A /* 832FC 800E9E4C 0803A81D */ j .L800EA074 /* 83300 800E9E50 2402003C */ addiu $v0, $zero, 0x3C /* 83304 800E9E54 0803A81D */ j .L800EA074 /* 83308 800E9E58 2402004E */ addiu $v0, $zero, 0x4E /* 8330C 800E9E5C 0803A81D */ j .L800EA074 /* 83310 800E9E60 2402005B */ addiu $v0, $zero, 0x5B /* 83314 800E9E64 0803A81D */ j .L800EA074 /* 83318 800E9E68 2402003D */ addiu $v0, $zero, 0x3D /* 8331C 800E9E6C 0803A81D */ j .L800EA074 /* 83320 800E9E70 24020043 */ addiu $v0, $zero, 0x43 /* 83324 800E9E74 24020054 */ addiu $v0, $zero, 0x54 /* 83328 800E9E78 14620007 */ bne $v1, $v0, .L800E9E98 /* 8332C 800E9E7C 24020055 */ addiu $v0, $zero, 0x55 /* 83330 800E9E80 24020001 */ addiu $v0, $zero, 0x1 /* 83334 800E9E84 ACC20000 */ sw $v0, 0x0($a2) /* 83338 800E9E88 24C60004 */ addiu $a2, $a2, 0x4 /* 8333C 800E9E8C 00822021 */ addu $a0, $a0, $v0 /* 83340 800E9E90 2405FFFF */ addiu $a1, $zero, -0x1 /* 83344 800E9E94 24020055 */ addiu $v0, $zero, 0x55 .L800E9E98: /* 83348 800E9E98 14620007 */ bne $v1, $v0, .L800E9EB8 /* 8334C 800E9E9C 24020056 */ addiu $v0, $zero, 0x56 /* 83350 800E9EA0 24020002 */ addiu $v0, $zero, 0x2 /* 83354 800E9EA4 ACC20000 */ sw $v0, 0x0($a2) /* 83358 800E9EA8 24C60004 */ addiu $a2, $a2, 0x4 /* 8335C 800E9EAC 24840001 */ addiu $a0, $a0, 0x1 /* 83360 800E9EB0 2405FFFF */ addiu $a1, $zero, -0x1 /* 83364 800E9EB4 24020056 */ addiu $v0, $zero, 0x56 .L800E9EB8: /* 83368 800E9EB8 14620007 */ bne $v1, $v0, .L800E9ED8 /* 8336C 800E9EBC 24020057 */ addiu $v0, $zero, 0x57 /* 83370 800E9EC0 24020003 */ addiu $v0, $zero, 0x3 /* 83374 800E9EC4 ACC20000 */ sw $v0, 0x0($a2) /* 83378 800E9EC8 24C60004 */ addiu $a2, $a2, 0x4 /* 8337C 800E9ECC 24840001 */ addiu $a0, $a0, 0x1 /* 83380 800E9ED0 2405FFFF */ addiu $a1, $zero, -0x1 /* 83384 800E9ED4 24020057 */ addiu $v0, $zero, 0x57 .L800E9ED8: /* 83388 800E9ED8 14620007 */ bne $v1, $v0, .L800E9EF8 /* 8338C 800E9EDC 24020058 */ addiu $v0, $zero, 0x58 /* 83390 800E9EE0 24020004 */ addiu $v0, $zero, 0x4 /* 83394 800E9EE4 ACC20000 */ sw $v0, 0x0($a2) /* 83398 800E9EE8 00C23021 */ addu $a2, $a2, $v0 /* 8339C 800E9EEC 24840001 */ addiu $a0, $a0, 0x1 /* 833A0 800E9EF0 2405FFFF */ addiu $a1, $zero, -0x1 /* 833A4 800E9EF4 24020058 */ addiu $v0, $zero, 0x58 .L800E9EF8: /* 833A8 800E9EF8 14620007 */ bne $v1, $v0, .L800E9F18 /* 833AC 800E9EFC 24020059 */ addiu $v0, $zero, 0x59 /* 833B0 800E9F00 24020005 */ addiu $v0, $zero, 0x5 /* 833B4 800E9F04 ACC20000 */ sw $v0, 0x0($a2) /* 833B8 800E9F08 24C60004 */ addiu $a2, $a2, 0x4 /* 833BC 800E9F0C 24840001 */ addiu $a0, $a0, 0x1 /* 833C0 800E9F10 2405FFFF */ addiu $a1, $zero, -0x1 /* 833C4 800E9F14 24020059 */ addiu $v0, $zero, 0x59 .L800E9F18: /* 833C8 800E9F18 54620059 */ bnel $v1, $v0, .L800EA080 /* 833CC 800E9F1C 24E70001 */ addiu $a3, $a3, 0x1 /* 833D0 800E9F20 24020006 */ addiu $v0, $zero, 0x6 /* 833D4 800E9F24 ACC20000 */ sw $v0, 0x0($a2) /* 833D8 800E9F28 24C60004 */ addiu $a2, $a2, 0x4 /* 833DC 800E9F2C 24840001 */ addiu $a0, $a0, 0x1 /* 833E0 800E9F30 0803A81F */ j .L800EA07C /* 833E4 800E9F34 2405FFFF */ addiu $a1, $zero, -0x1 /* 833E8 800E9F38 0803A81D */ j .L800EA074 /* 833EC 800E9F3C 2402005C */ addiu $v0, $zero, 0x5C /* 833F0 800E9F40 0803A81D */ j .L800EA074 /* 833F4 800E9F44 2402005D */ addiu $v0, $zero, 0x5D /* 833F8 800E9F48 0803A81D */ j .L800EA074 /* 833FC 800E9F4C 2402005E */ addiu $v0, $zero, 0x5E /* 83400 800E9F50 0803A81D */ j .L800EA074 /* 83404 800E9F54 24020044 */ addiu $v0, $zero, 0x44 /* 83408 800E9F58 0803A81D */ j .L800EA074 /* 8340C 800E9F5C 2402005F */ addiu $v0, $zero, 0x5F /* 83410 800E9F60 0803A81D */ j .L800EA074 /* 83414 800E9F64 24020060 */ addiu $v0, $zero, 0x60 /* 83418 800E9F68 0803A81D */ j .L800EA074 /* 8341C 800E9F6C 2402004F */ addiu $v0, $zero, 0x4F /* 83420 800E9F70 0803A81D */ j .L800EA074 /* 83424 800E9F74 24020061 */ addiu $v0, $zero, 0x61 /* 83428 800E9F78 0803A81D */ j .L800EA074 /* 8342C 800E9F7C 24020062 */ addiu $v0, $zero, 0x62 /* 83430 800E9F80 0803A81D */ j .L800EA074 /* 83434 800E9F84 24020063 */ addiu $v0, $zero, 0x63 /* 83438 800E9F88 0803A81D */ j .L800EA074 /* 8343C 800E9F8C 24020045 */ addiu $v0, $zero, 0x45 /* 83440 800E9F90 0803A81D */ j .L800EA074 /* 83444 800E9F94 2402003B */ addiu $v0, $zero, 0x3B /* 83448 800E9F98 0803A81D */ j .L800EA074 /* 8344C 800E9F9C 2402006E */ addiu $v0, $zero, 0x6E /* 83450 800E9FA0 0803A81D */ j .L800EA074 /* 83454 800E9FA4 24020064 */ addiu $v0, $zero, 0x64 /* 83458 800E9FA8 0803A81D */ j .L800EA074 /* 8345C 800E9FAC 24020065 */ addiu $v0, $zero, 0x65 /* 83460 800E9FB0 0803A81D */ j .L800EA074 /* 83464 800E9FB4 24020046 */ addiu $v0, $zero, 0x46 /* 83468 800E9FB8 0803A81D */ j .L800EA074 /* 8346C 800E9FBC 24020047 */ addiu $v0, $zero, 0x47 /* 83470 800E9FC0 0803A81D */ j .L800EA074 /* 83474 800E9FC4 2402003E */ addiu $v0, $zero, 0x3E /* 83478 800E9FC8 0803A81D */ j .L800EA074 /* 8347C 800E9FCC 24020048 */ addiu $v0, $zero, 0x48 /* 83480 800E9FD0 0803A81D */ j .L800EA074 /* 83484 800E9FD4 24020066 */ addiu $v0, $zero, 0x66 /* 83488 800E9FD8 0803A81D */ j .L800EA074 /* 8348C 800E9FDC 24020049 */ addiu $v0, $zero, 0x49 /* 83490 800E9FE0 0803A81D */ j .L800EA074 /* 83494 800E9FE4 24020067 */ addiu $v0, $zero, 0x67 /* 83498 800E9FE8 0803A81D */ j .L800EA074 /* 8349C 800E9FEC 2402006D */ addiu $v0, $zero, 0x6D /* 834A0 800E9FF0 0803A81D */ j .L800EA074 /* 834A4 800E9FF4 2402006A */ addiu $v0, $zero, 0x6A /* 834A8 800E9FF8 0803A81D */ j .L800EA074 /* 834AC 800E9FFC 2402006C */ addiu $v0, $zero, 0x6C /* 834B0 800EA000 0803A81D */ j .L800EA074 /* 834B4 800EA004 24020050 */ addiu $v0, $zero, 0x50 /* 834B8 800EA008 0803A81D */ j .L800EA074 /* 834BC 800EA00C 24020038 */ addiu $v0, $zero, 0x38 /* 834C0 800EA010 0803A81D */ j .L800EA074 /* 834C4 800EA014 24020068 */ addiu $v0, $zero, 0x68 /* 834C8 800EA018 0803A81D */ j .L800EA074 /* 834CC 800EA01C 24020069 */ addiu $v0, $zero, 0x69 /* 834D0 800EA020 0803A81D */ j .L800EA074 /* 834D4 800EA024 2402006B */ addiu $v0, $zero, 0x6B /* 834D8 800EA028 0803A81D */ j .L800EA074 /* 834DC 800EA02C 2402006F */ addiu $v0, $zero, 0x6F /* 834E0 800EA030 0803A81D */ j .L800EA074 /* 834E4 800EA034 24020070 */ addiu $v0, $zero, 0x70 /* 834E8 800EA038 0803A81D */ j .L800EA074 /* 834EC 800EA03C 24020071 */ addiu $v0, $zero, 0x71 /* 834F0 800EA040 0803A81D */ j .L800EA074 /* 834F4 800EA044 24020072 */ addiu $v0, $zero, 0x72 /* 834F8 800EA048 0803A81D */ j .L800EA074 /* 834FC 800EA04C 24020073 */ addiu $v0, $zero, 0x73 /* 83500 800EA050 0803A81D */ j .L800EA074 /* 83504 800EA054 24020033 */ addiu $v0, $zero, 0x33 /* 83508 800EA058 0803A81D */ j .L800EA074 /* 8350C 800EA05C 24020074 */ addiu $v0, $zero, 0x74 /* 83510 800EA060 0803A81D */ j .L800EA074 /* 83514 800EA064 24020075 */ addiu $v0, $zero, 0x75 /* 83518 800EA068 0803A81D */ j .L800EA074 /* 8351C 800EA06C 24020076 */ addiu $v0, $zero, 0x76 /* 83520 800EA070 2402004A */ addiu $v0, $zero, 0x4A .L800EA074: /* 83524 800EA074 50620001 */ beql $v1, $v0, .L800EA07C /* 83528 800EA078 24A50001 */ addiu $a1, $a1, 0x1 .L800EA07C: /* 8352C 800EA07C 24E70001 */ addiu $a3, $a3, 0x1 .L800EA080: /* 83530 800EA080 28E20040 */ slti $v0, $a3, 0x40 /* 83534 800EA084 1440FF4C */ bnez $v0, .L800E9DB8 /* 83538 800EA088 00071040 */ sll $v0, $a3, 1 /* 8353C 800EA08C 04A10007 */ bgez $a1, .L800EA0AC /* 83540 800EA090 00A0102D */ daddu $v0, $a1, $zero /* 83544 800EA094 0C00A67F */ jal rand_int /* 83548 800EA098 2484FFFF */ addiu $a0, $a0, -0x1 /* 8354C 800EA09C 00021080 */ sll $v0, $v0, 2 /* 83550 800EA0A0 03A21021 */ addu $v0, $sp, $v0 /* 83554 800EA0A4 8C450010 */ lw $a1, 0x10($v0) /* 83558 800EA0A8 00A0102D */ daddu $v0, $a1, $zero .L800EA0AC: /* 8355C 800EA0AC 8FBF0028 */ lw $ra, 0x28($sp) /* 83560 800EA0B0 03E00008 */ jr $ra /* 83564 800EA0B4 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: s32 is_ability_active(s32 ability) { PlayerData* playerData = &gPlayerData; s32 attackFXArray[6]; s32 ret; s32 attackFXIndex; s32 badgeMoveID; u8* moveID; s32 i; ret = 0; attackFXIndex = 0; for (i = 0; i < ARRAY_COUNT(attackFXArray); i++) { attackFXArray[i] = 0; } if (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH) { return 0; } for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) { badgeMoveID = playerData->equippedBadges[i]; if (badgeMoveID != 0) { moveID = &gItemTable[badgeMoveID].moveID; badgeMoveID = *moveID; } switch (ability) { case ABILITY_DODGE_MASTER: if (badgeMoveID == MOVE_DODGE_MASTER) { ret++; } break; case ABILITY_SPIKE_SHIELD: if (badgeMoveID == MOVE_SPIKE_SHIELD) { ret++; } break; case ABILITY_FIRST_ATTACK: if (badgeMoveID == MOVE_FIRST_ATTACK) { ret++; } break; case ABILITY_HP_PLUS: if (badgeMoveID == MOVE_HP_PLUS) { ret++; } break; case ABILITY_DOUBLE_DIP: if (badgeMoveID == MOVE_DOUBLE_DIP) { ret++; } break; case ABILITY_MYSTERY_SCROLL: if (badgeMoveID == MOVE_MYSTERY_SCROLL) { ret++; } if (playerData->hasActionCommands) { ret++; } break; case ABILITY_FIRE_SHIELD: if (badgeMoveID == MOVE_FIRE_SHIELD) { ret++; } break; case ABILITY_PRETTY_LUCKY: if (badgeMoveID == MOVE_PRETTY_LUCKY) { ret++; } break; case ABILITY_HP_DRAIN: if (badgeMoveID == MOVE_HP_DRAIN) { ret++; } break; case ABILITY_ALL_OR_NOTHING: if (badgeMoveID == MOVE_ALLOR_NOTHING) { ret++; } break; case ABILITY_SLOW_GO: if (badgeMoveID == MOVE_SLOW_GO) { ret++; } break; case ABILITY_FP_PLUS: if (badgeMoveID == MOVE_FP_PLUS) { ret++; } break; case ABILITY_ICE_POWER: if (badgeMoveID == MOVE_ICE_POWER) { ret++; } break; case ABILITY_FEELING_FINE: if (badgeMoveID == MOVE_FEELING_FINE) { ret++; } break; case ABILITY_ATTACK_FX: if (badgeMoveID == MOVE_ATTACK_FX_A) { attackFXArray[attackFXIndex++] = 1; ret = -1; } if (badgeMoveID == MOVE_ATTACK_FX_D) { attackFXArray[attackFXIndex++] = 2; ret = -1; } if (badgeMoveID == MOVE_ATTACK_FX_B) { attackFXArray[attackFXIndex++] = 3; ret = -1; } if (badgeMoveID == MOVE_ATTACK_FX_E) { attackFXArray[attackFXIndex++] = 4; ret = -1; } if (badgeMoveID == MOVE_ATTACK_FX_C) { attackFXArray[attackFXIndex++] = 5; ret = -1; } if (badgeMoveID == MOVE_ATTACK_FX_F) { attackFXArray[attackFXIndex++] = 6; ret = -1; } break; case ABILITY_MONEY_MONEY: if (badgeMoveID == MOVE_MONEY_MONEY) { ret++; } break; case ABILITY_CHILL_OUT: if (badgeMoveID == MOVE_CHILL_OUT_BADGE) { ret++; } break; case ABILITY_HAPPY_HEART: if (badgeMoveID == MOVE_HAPPY_HEART) { ret++; } break; case ABILITY_ZAP_TAP: if (badgeMoveID == MOVE_ZAP_TAP) { ret++; } break; case ABILITY_MEGA_RUSH: if (badgeMoveID == MOVE_MEGA_RUSH) { ret++; } break; case ABILITY_BERSERKER: if (badgeMoveID == MOVE_BERSERKER) { ret++; } break; case ABILITY_RIGHT_ON: if (badgeMoveID == MOVE_RIGHT_ON) { ret++; } break; case ABILITY_RUNAWAY_PAY: if (badgeMoveID == MOVE_RUNAWAY_PAY) { ret++; } break; case ABILITY_FLOWER_SAVER: if (badgeMoveID == MOVE_FLOWER_SAVER) { ret++; } break; case ABILITY_PAY_OFF: if (badgeMoveID == MOVE_PAY_OFF) { ret++; } break; case ABILITY_DEFEND_PLUS: if (badgeMoveID == MOVE_DEFEND_PLUS) { ret++; } break; case ABILITY_POWER_PLUS: if (badgeMoveID == MOVE_POWER_PLUS) { ret++; } break; case ABILITY_REFUND: if (badgeMoveID == MOVE_REFUND) { ret++; } break; case ABILITY_POWER_RUSH: if (badgeMoveID == MOVE_POWER_RUSH) { ret++; } break; case ABILITY_CRAZY_HEART: if (badgeMoveID == MOVE_CRAZY_HEART) { ret++; } break; case ABILITY_LAST_STAND: if (badgeMoveID == MOVE_LAST_STAND) { ret++; } break; case ABILITY_CLOSE_CALL: if (badgeMoveID == MOVE_CLOSE_CALL) { ret++; } break; case ABILITY_P_UP_D_DOWN: if (badgeMoveID == MOVE_P_UP_D_DOWN) { ret++; } break; case ABILITY_LUCKY_DAY: if (badgeMoveID == MOVE_LUCKY_DAY) { ret++; } break; case ABILITY_MEGA_HP_DRAIN: if (badgeMoveID == MOVE_MEGA_HP_DRAIN) { ret++; } break; case ABILITY_P_DOWN_D_UP: if (badgeMoveID == MOVE_P_DOWN_D_UP) { ret++; } break; case ABILITY_FLOWER_FANATIC: if (badgeMoveID == MOVE_FLOWER_FANATIC) { ret++; } break; case ABILITY_SPEEDY_SPIN: if (badgeMoveID == MOVE_SPEEDY_SPIN) { ret++; } break; case ABILITY_SPIN_ATTACK: if (badgeMoveID == MOVE_SPIN_ATTACK) { ret++; } break; case ABILITY_I_SPY: if (badgeMoveID == MOVE_I_SPY) { ret++; } break; case ABILITY_BUMP_ATTACK: if (badgeMoveID == MOVE_BUMP_ATTACK) { ret++; } break; case ABILITY_QUICK_CHANGE: if (badgeMoveID == MOVE_QUICK_CHANGE) { ret++; } break; case ABILITY_HEART_FINDER: if (badgeMoveID == MOVE_HEART_FINDER) { ret++; } break; case ABILITY_FLOWER_FINDER: if (badgeMoveID == MOVE_FLOWER_FINDER) { ret++; } break; case ABILITY_DIZZY_ATTACK: if (badgeMoveID == MOVE_DIZZY_ATTACK) { ret++; } break; case ABILITY_FINAL_GOOMPA: if (badgeMoveID == MOVE_UNUSED_FINAL_GOOMPA) { ret++; } break; case ABILITY_FINAL_BOBOMB: if (badgeMoveID == MOVE_UNUSED_FINAL_BOBOMB) { ret++; } break; case ABILITY_DEEP_FOCUS: if (badgeMoveID == MOVE_DEEP_FOCUS) { ret++; } break; case ABILITY_SUPER_FOCUS: if (badgeMoveID == MOVE_SUPER_FOCUS) { ret++; } break; case ABILITY_KAIDEN: if (badgeMoveID == MOVE_KAIDEN) { ret++; } break; case ABILITY_DAMAGE_DODGE: if (badgeMoveID == MOVE_DAMAGE_DODGE) { ret++; } break; case ABILITY_HAPPY_FLOWER: if (badgeMoveID == MOVE_HAPPY_FLOWER) { ret++; } break; case ABILITY_GROUP_FOCUS: if (badgeMoveID == MOVE_GROUP_FOCUS) { ret++; } break; case ABILITY_PEEKABOO: if (badgeMoveID == MOVE_PEEKABOO) { ret++; } break; case ABILITY_HEALTHY_HEALTHY: if (badgeMoveID == MOVE_HEALTHY_HEALTHY) { ret++; } break; } } if (ret < 0) { ret = attackFXArray[rand_int(attackFXIndex - 1)]; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025B5C0 /* 189EA0 8025B5C0 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 189EA4 8025B5C4 AFB40028 */ sw $s4, 0x28($sp) /* 189EA8 8025B5C8 0080A02D */ daddu $s4, $a0, $zero /* 189EAC 8025B5CC AFB1001C */ sw $s1, 0x1C($sp) /* 189EB0 8025B5D0 00A0882D */ daddu $s1, $a1, $zero /* 189EB4 8025B5D4 AFB5002C */ sw $s5, 0x2C($sp) /* 189EB8 8025B5D8 00C0A82D */ daddu $s5, $a2, $zero /* 189EBC 8025B5DC AFB60030 */ sw $s6, 0x30($sp) /* 189EC0 8025B5E0 AFBF0038 */ sw $ra, 0x38($sp) /* 189EC4 8025B5E4 AFB70034 */ sw $s7, 0x34($sp) /* 189EC8 8025B5E8 AFB30024 */ sw $s3, 0x24($sp) /* 189ECC 8025B5EC AFB20020 */ sw $s2, 0x20($sp) /* 189ED0 8025B5F0 AFB00018 */ sw $s0, 0x18($sp) /* 189ED4 8025B5F4 8E3000C0 */ lw $s0, 0xC0($s1) /* 189ED8 8025B5F8 8FB30050 */ lw $s3, 0x50($sp) /* 189EDC 8025B5FC 820206C1 */ lb $v0, 0x6C1($s0) /* 189EE0 8025B600 8FB20054 */ lw $s2, 0x54($sp) /* 189EE4 8025B604 10400078 */ beqz $v0, .L8025B7E8 /* 189EE8 8025B608 00E0B02D */ daddu $s6, $a3, $zero /* 189EEC 8025B60C 1680001B */ bnez $s4, .L8025B67C /* 189EF0 8025B610 00000000 */ nop /* 189EF4 8025B614 0C0B7830 */ jal spr_get_player_palettes /* 189EF8 8025B618 96240088 */ lhu $a0, 0x88($s1) /* 189EFC 8025B61C AE0206D0 */ sw $v0, 0x6D0($s0) /* 189F00 8025B620 0040202D */ daddu $a0, $v0, $zero /* 189F04 8025B624 A20006CD */ sb $zero, 0x6CD($s0) /* 189F08 8025B628 8C830000 */ lw $v1, 0x0($a0) /* 189F0C 8025B62C 2402FFFF */ addiu $v0, $zero, -0x1 /* 189F10 8025B630 1062000B */ beq $v1, $v0, .L8025B660 /* 189F14 8025B634 0080182D */ daddu $v1, $a0, $zero /* 189F18 8025B638 0040202D */ daddu $a0, $v0, $zero .L8025B63C: /* 189F1C 8025B63C 920206CD */ lbu $v0, 0x6CD($s0) /* 189F20 8025B640 24420001 */ addiu $v0, $v0, 0x1 /* 189F24 8025B644 A20206CD */ sb $v0, 0x6CD($s0) /* 189F28 8025B648 00021600 */ sll $v0, $v0, 24 /* 189F2C 8025B64C 00021583 */ sra $v0, $v0, 22 /* 189F30 8025B650 00431021 */ addu $v0, $v0, $v1 /* 189F34 8025B654 8C420000 */ lw $v0, 0x0($v0) /* 189F38 8025B658 1444FFF8 */ bne $v0, $a0, .L8025B63C /* 189F3C 8025B65C 00000000 */ nop .L8025B660: /* 189F40 8025B660 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) /* 189F44 8025B664 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) /* 189F48 8025B668 30420040 */ andi $v0, $v0, 0x40 /* 189F4C 8025B66C 14400019 */ bnez $v0, .L8025B6D4 /* 189F50 8025B670 24020004 */ addiu $v0, $zero, 0x4 /* 189F54 8025B674 08096DB5 */ j .L8025B6D4 /* 189F58 8025B678 24020006 */ addiu $v0, $zero, 0x6 .L8025B67C: /* 189F5C 8025B67C 96240088 */ lhu $a0, 0x88($s1) /* 189F60 8025B680 0C0B7A90 */ jal spr_get_npc_palettes /* 189F64 8025B684 00000000 */ nop /* 189F68 8025B688 AE0206D0 */ sw $v0, 0x6D0($s0) /* 189F6C 8025B68C 0040202D */ daddu $a0, $v0, $zero /* 189F70 8025B690 A20006CD */ sb $zero, 0x6CD($s0) /* 189F74 8025B694 8C830000 */ lw $v1, 0x0($a0) /* 189F78 8025B698 2402FFFF */ addiu $v0, $zero, -0x1 /* 189F7C 8025B69C 1062000B */ beq $v1, $v0, .L8025B6CC /* 189F80 8025B6A0 0080182D */ daddu $v1, $a0, $zero /* 189F84 8025B6A4 0040202D */ daddu $a0, $v0, $zero .L8025B6A8: /* 189F88 8025B6A8 920206CD */ lbu $v0, 0x6CD($s0) /* 189F8C 8025B6AC 24420001 */ addiu $v0, $v0, 0x1 /* 189F90 8025B6B0 A20206CD */ sb $v0, 0x6CD($s0) /* 189F94 8025B6B4 00021600 */ sll $v0, $v0, 24 /* 189F98 8025B6B8 00021583 */ sra $v0, $v0, 22 /* 189F9C 8025B6BC 00431021 */ addu $v0, $v0, $v1 /* 189FA0 8025B6C0 8C420000 */ lw $v0, 0x0($v0) /* 189FA4 8025B6C4 1444FFF8 */ bne $v0, $a0, .L8025B6A8 /* 189FA8 8025B6C8 00000000 */ nop .L8025B6CC: /* 189FAC 8025B6CC 0C0B7A9B */ jal spr_get_npc_color_variations /* 189FB0 8025B6D0 96240088 */ lhu $a0, 0x88($s1) .L8025B6D4: /* 189FB4 8025B6D4 A20206CC */ sb $v0, 0x6CC($s0) /* 189FB8 8025B6D8 820306C1 */ lb $v1, 0x6C1($s0) /* 189FBC 8025B6DC 24020001 */ addiu $v0, $zero, 0x1 /* 189FC0 8025B6E0 14620004 */ bne $v1, $v0, .L8025B6F4 /* 189FC4 8025B6E4 240200FF */ addiu $v0, $zero, 0xFF /* 189FC8 8025B6E8 A20006C2 */ sb $zero, 0x6C2($s0) /* 189FCC 8025B6EC 08096DBF */ j .L8025B6FC /* 189FD0 8025B6F0 A60006CA */ sh $zero, 0x6CA($s0) .L8025B6F4: /* 189FD4 8025B6F4 A20006C2 */ sb $zero, 0x6C2($s0) /* 189FD8 8025B6F8 A60206CA */ sh $v0, 0x6CA($s0) .L8025B6FC: /* 189FDC 8025B6FC 820206CD */ lb $v0, 0x6CD($s0) /* 189FE0 8025B700 18400017 */ blez $v0, .L8025B760 /* 189FE4 8025B704 0000502D */ daddu $t2, $zero, $zero /* 189FE8 8025B708 0200202D */ daddu $a0, $s0, $zero .L8025B70C: /* 189FEC 8025B70C 8E0206D0 */ lw $v0, 0x6D0($s0) /* 189FF0 8025B710 000A1880 */ sll $v1, $t2, 2 /* 189FF4 8025B714 00621821 */ addu $v1, $v1, $v0 /* 189FF8 8025B718 000A1140 */ sll $v0, $t2, 5 /* 189FFC 8025B71C 8C670000 */ lw $a3, 0x0($v1) /* 18A000 8025B720 02024821 */ addu $t1, $s0, $v0 /* 18A004 8025B724 10E00009 */ beqz $a3, .L8025B74C /* 18A008 8025B728 AC8906D4 */ sw $t1, 0x6D4($a0) /* 18A00C 8025B72C 0000402D */ daddu $t0, $zero, $zero .L8025B730: /* 18A010 8025B730 94E20000 */ lhu $v0, 0x0($a3) /* 18A014 8025B734 24E70002 */ addiu $a3, $a3, 0x2 /* 18A018 8025B738 25080001 */ addiu $t0, $t0, 0x1 D_8025B73C: /* 18A01C 8025B73C A5220000 */ sh $v0, 0x0($t1) /* 18A020 8025B740 29020010 */ slti $v0, $t0, 0x10 /* 18A024 8025B744 1440FFFA */ bnez $v0, .L8025B730 /* 18A028 8025B748 25290002 */ addiu $t1, $t1, 0x2 .L8025B74C: /* 18A02C 8025B74C 820206CD */ lb $v0, 0x6CD($s0) /* 18A030 8025B750 254A0001 */ addiu $t2, $t2, 0x1 /* 18A034 8025B754 0142102A */ slt $v0, $t2, $v0 /* 18A038 8025B758 1440FFEC */ bnez $v0, .L8025B70C /* 18A03C 8025B75C 24840004 */ addiu $a0, $a0, 0x4 .L8025B760: /* 18A040 8025B760 1240001D */ beqz $s2, .L8025B7D8 /* 18A044 8025B764 2402000A */ addiu $v0, $zero, 0xA /* 18A048 8025B768 820206CC */ lb $v0, 0x6CC($s0) /* 18A04C 8025B76C 920306CC */ lbu $v1, 0x6CC($s0) /* 18A050 8025B770 18400018 */ blez $v0, .L8025B7D4 /* 18A054 8025B774 0000502D */ daddu $t2, $zero, $zero /* 18A058 8025B778 000A1140 */ sll $v0, $t2, 5 .L8025B77C: /* 18A05C 8025B77C 02025821 */ addu $t3, $s0, $v0 /* 18A060 8025B780 0000402D */ daddu $t0, $zero, $zero /* 18A064 8025B784 00031600 */ sll $v0, $v1, 24 /* 18A068 8025B788 00021603 */ sra $v0, $v0, 24 /* 18A06C 8025B78C 004A1021 */ addu $v0, $v0, $t2 /* 18A070 8025B790 8E0306D0 */ lw $v1, 0x6D0($s0) /* 18A074 8025B794 00021080 */ sll $v0, $v0, 2 /* 18A078 8025B798 00431021 */ addu $v0, $v0, $v1 /* 18A07C 8025B79C 8C470000 */ lw $a3, 0x0($v0) .L8025B7A0: /* 18A080 8025B7A0 94E20000 */ lhu $v0, 0x0($a3) /* 18A084 8025B7A4 24E70002 */ addiu $a3, $a3, 0x2 /* 18A088 8025B7A8 25080001 */ addiu $t0, $t0, 0x1 /* 18A08C 8025B7AC A5620000 */ sh $v0, 0x0($t3) /* 18A090 8025B7B0 29020010 */ slti $v0, $t0, 0x10 /* 18A094 8025B7B4 1440FFFA */ bnez $v0, .L8025B7A0 /* 18A098 8025B7B8 256B0002 */ addiu $t3, $t3, 0x2 /* 18A09C 8025B7BC 254A0001 */ addiu $t2, $t2, 0x1 /* 18A0A0 8025B7C0 820206CC */ lb $v0, 0x6CC($s0) /* 18A0A4 8025B7C4 920306CC */ lbu $v1, 0x6CC($s0) /* 18A0A8 8025B7C8 0142102A */ slt $v0, $t2, $v0 /* 18A0AC 8025B7CC 1440FFEB */ bnez $v0, .L8025B77C /* 18A0B0 8025B7D0 000A1140 */ sll $v0, $t2, 5 .L8025B7D4: /* 18A0B4 8025B7D4 2402000A */ addiu $v0, $zero, 0xA .L8025B7D8: /* 18A0B8 8025B7D8 A60206C8 */ sh $v0, 0x6C8($s0) /* 18A0BC 8025B7DC A60006CA */ sh $zero, 0x6CA($s0) /* 18A0C0 8025B7E0 A20006C2 */ sb $zero, 0x6C2($s0) /* 18A0C4 8025B7E4 A20006C1 */ sb $zero, 0x6C1($s0) .L8025B7E8: /* 18A0C8 8025B7E8 820206C2 */ lb $v0, 0x6C2($s0) /* 18A0CC 8025B7EC 14400085 */ bnez $v0, .L8025BA04 /* 18A0D0 8025B7F0 00000000 */ nop /* 18A0D4 8025B7F4 56600011 */ bnel $s3, $zero, .L8025B83C /* 18A0D8 8025B7F8 3C0451EB */ lui $a0, (0x51EB851F >> 16) /* 18A0DC 8025B7FC 860206C8 */ lh $v0, 0x6C8($s0) /* 18A0E0 8025B800 960306C8 */ lhu $v1, 0x6C8($s0) /* 18A0E4 8025B804 10400003 */ beqz $v0, .L8025B814 /* 18A0E8 8025B808 2462FFFF */ addiu $v0, $v1, -0x1 /* 18A0EC 8025B80C 08096E81 */ j .L8025BA04 /* 18A0F0 8025B810 A60206C8 */ sh $v0, 0x6C8($s0) .L8025B814: /* 18A0F4 8025B814 960206CA */ lhu $v0, 0x6CA($s0) /* 18A0F8 8025B818 24420A00 */ addiu $v0, $v0, 0xA00 /* 18A0FC 8025B81C A60206CA */ sh $v0, 0x6CA($s0) /* 18A100 8025B820 00021400 */ sll $v0, $v0, 16 /* 18A104 8025B824 00021403 */ sra $v0, $v0, 16 /* 18A108 8025B828 2842639D */ slti $v0, $v0, 0x639D /* 18A10C 8025B82C 14400003 */ bnez $v0, .L8025B83C /* 18A110 8025B830 3C0451EB */ lui $a0, (0x51EB851F >> 16) /* 18A114 8025B834 2402639C */ addiu $v0, $zero, 0x639C /* 18A118 8025B838 A60206CA */ sh $v0, 0x6CA($s0) .L8025B83C: /* 18A11C 8025B83C 960306CA */ lhu $v1, 0x6CA($s0) /* 18A120 8025B840 3484851F */ ori $a0, $a0, (0x51EB851F & 0xFFFF) /* 18A124 8025B844 00031C00 */ sll $v1, $v1, 16 /* 18A128 8025B848 00031403 */ sra $v0, $v1, 16 /* 18A12C 8025B84C 00440018 */ mult $v0, $a0 /* 18A130 8025B850 0000502D */ daddu $t2, $zero, $zero D_8025B854: /* 18A134 8025B854 00031FC3 */ sra $v1, $v1, 31 /* 18A138 8025B858 820206CC */ lb $v0, 0x6CC($s0) /* 18A13C 8025B85C 0000B810 */ mfhi $s7 /* 18A140 8025B860 00172143 */ sra $a0, $s7, 5 /* 18A144 8025B864 18400062 */ blez $v0, .L8025B9F0 /* 18A148 8025B868 0083C823 */ subu $t9, $a0, $v1 /* 18A14C 8025B86C 332E00FF */ andi $t6, $t9, 0xFF /* 18A150 8025B870 240200FF */ addiu $v0, $zero, 0xFF /* 18A154 8025B874 004EC023 */ subu $t8, $v0, $t6 /* 18A158 8025B878 3C0F8080 */ lui $t7, (0x80808081 >> 16) /* 18A15C 8025B87C 35EF8081 */ ori $t7, $t7, (0x80808081 & 0xFFFF) .L8025B880: /* 18A160 8025B880 16400004 */ bnez $s2, .L8025B894 /* 18A164 8025B884 000A1080 */ sll $v0, $t2, 2 /* 18A168 8025B888 8E0306D0 */ lw $v1, 0x6D0($s0) /* 18A16C 8025B88C 08096E2A */ j .L8025B8A8 /* 18A170 8025B890 00431021 */ addu $v0, $v0, $v1 .L8025B894: /* 18A174 8025B894 820206CC */ lb $v0, 0x6CC($s0) /* 18A178 8025B898 8E0306D0 */ lw $v1, 0x6D0($s0) /* 18A17C 8025B89C 004A1021 */ addu $v0, $v0, $t2 /* 18A180 8025B8A0 00021080 */ sll $v0, $v0, 2 /* 18A184 8025B8A4 00431021 */ addu $v0, $v0, $v1 .L8025B8A8: /* 18A188 8025B8A8 8C470000 */ lw $a3, 0x0($v0) /* 18A18C 8025B8AC 000A1140 */ sll $v0, $t2, 5 /* 18A190 8025B8B0 02025821 */ addu $t3, $s0, $v0 /* 18A194 8025B8B4 0000402D */ daddu $t0, $zero, $zero /* 18A198 8025B8B8 820206CC */ lb $v0, 0x6CC($s0) /* 18A19C 8025B8BC 8E0306D0 */ lw $v1, 0x6D0($s0) /* 18A1A0 8025B8C0 00021040 */ sll $v0, $v0, 1 /* 18A1A4 8025B8C4 004A1021 */ addu $v0, $v0, $t2 /* 18A1A8 8025B8C8 00021080 */ sll $v0, $v0, 2 /* 18A1AC 8025B8CC 00431021 */ addu $v0, $v0, $v1 /* 18A1B0 8025B8D0 8C490000 */ lw $t1, 0x0($v0) .L8025B8D4: /* 18A1B4 8025B8D4 94E30000 */ lhu $v1, 0x0($a3) /* 18A1B8 8025B8D8 000312C2 */ srl $v0, $v1, 11 /* 18A1BC 8025B8DC 00580018 */ mult $v0, $t8 /* 18A1C0 8025B8E0 95240000 */ lhu $a0, 0x0($t1) /* 18A1C4 8025B8E4 00002812 */ mflo $a1 /* 18A1C8 8025B8E8 000412C2 */ srl $v0, $a0, 11 /* 18A1CC 8025B8EC 00000000 */ nop /* 18A1D0 8025B8F0 004E0018 */ mult $v0, $t6 /* 18A1D4 8025B8F4 00006012 */ mflo $t4 /* 18A1D8 8025B8F8 00AC2821 */ addu $a1, $a1, $t4 /* 18A1DC 8025B8FC 00000000 */ nop /* 18A1E0 8025B900 00AF0018 */ mult $a1, $t7 /* 18A1E4 8025B904 00009810 */ mfhi $s3 /* 18A1E8 8025B908 00031182 */ srl $v0, $v1, 6 /* 18A1EC 8025B90C 3042001F */ andi $v0, $v0, 0x1F /* 18A1F0 8025B910 00580018 */ mult $v0, $t8 /* 18A1F4 8025B914 00006812 */ mflo $t5 /* 18A1F8 8025B918 00041182 */ srl $v0, $a0, 6 /* 18A1FC 8025B91C 3042001F */ andi $v0, $v0, 0x1F /* 18A200 8025B920 004E0018 */ mult $v0, $t6 /* 18A204 8025B924 00001012 */ mflo $v0 /* 18A208 8025B928 00031842 */ srl $v1, $v1, 1 /* 18A20C 8025B92C 3063001F */ andi $v1, $v1, 0x1F /* 18A210 8025B930 00780018 */ mult $v1, $t8 /* 18A214 8025B934 24E70002 */ addiu $a3, $a3, 0x2 /* 18A218 8025B938 91260001 */ lbu $a2, 0x1($t1) /* 18A21C 8025B93C 25290002 */ addiu $t1, $t1, 0x2 /* 18A220 8025B940 25080001 */ addiu $t0, $t0, 0x1 /* 18A224 8025B944 00006012 */ mflo $t4 /* 18A228 8025B948 00042042 */ srl $a0, $a0, 1 /* 18A22C 8025B94C 3084001F */ andi $a0, $a0, 0x1F /* 18A230 8025B950 008E0018 */ mult $a0, $t6 /* 18A234 8025B954 30C60001 */ andi $a2, $a2, 0x1 /* 18A238 8025B958 01A21021 */ addu $v0, $t5, $v0 /* 18A23C 8025B95C 02652021 */ addu $a0, $s3, $a1 /* 18A240 8025B960 000421C3 */ sra $a0, $a0, 7 /* 18A244 8025B964 0000B812 */ mflo $s7 /* 18A248 8025B968 00052FC3 */ sra $a1, $a1, 31 /* 18A24C 8025B96C 00852023 */ subu $a0, $a0, $a1 /* 18A250 8025B970 004F0018 */ mult $v0, $t7 /* 18A254 8025B974 308400FF */ andi $a0, $a0, 0xFF /* 18A258 8025B978 000422C0 */ sll $a0, $a0, 11 /* 18A25C 8025B97C AFB70010 */ sw $s7, 0x10($sp) /* 18A260 8025B980 01972821 */ addu $a1, $t4, $s7 /* 18A264 8025B984 00001810 */ mfhi $v1 /* 18A268 8025B988 00621821 */ addu $v1, $v1, $v0 /* 18A26C 8025B98C 000319C3 */ sra $v1, $v1, 7 /* 18A270 8025B990 000217C3 */ sra $v0, $v0, 31 /* 18A274 8025B994 00AF0018 */ mult $a1, $t7 /* 18A278 8025B998 00621823 */ subu $v1, $v1, $v0 /* 18A27C 8025B99C 306300FF */ andi $v1, $v1, 0xFF /* 18A280 8025B9A0 00031980 */ sll $v1, $v1, 6 /* 18A284 8025B9A4 00832025 */ or $a0, $a0, $v1 /* 18A288 8025B9A8 00006010 */ mfhi $t4 /* 18A28C 8025B9AC 01851021 */ addu $v0, $t4, $a1 /* 18A290 8025B9B0 000211C3 */ sra $v0, $v0, 7 /* 18A294 8025B9B4 00052FC3 */ sra $a1, $a1, 31 /* 18A298 8025B9B8 00451023 */ subu $v0, $v0, $a1 /* 18A29C 8025B9BC 304200FF */ andi $v0, $v0, 0xFF /* 18A2A0 8025B9C0 00021040 */ sll $v0, $v0, 1 /* 18A2A4 8025B9C4 00822025 */ or $a0, $a0, $v0 /* 18A2A8 8025B9C8 00C43025 */ or $a2, $a2, $a0 /* 18A2AC 8025B9CC A5660000 */ sh $a2, 0x0($t3) /* 18A2B0 8025B9D0 29020010 */ slti $v0, $t0, 0x10 /* 18A2B4 8025B9D4 1440FFBF */ bnez $v0, .L8025B8D4 /* 18A2B8 8025B9D8 256B0002 */ addiu $t3, $t3, 0x2 /* 18A2BC 8025B9DC 820206CC */ lb $v0, 0x6CC($s0) /* 18A2C0 8025B9E0 254A0001 */ addiu $t2, $t2, 0x1 /* 18A2C4 8025B9E4 0142102A */ slt $v0, $t2, $v0 /* 18A2C8 8025B9E8 1440FFA5 */ bnez $v0, .L8025B880 /* 18A2CC 8025B9EC 00000000 */ nop .L8025B9F0: /* 18A2D0 8025B9F0 332300FF */ andi $v1, $t9, 0xFF D_8025B9F4: /* 18A2D4 8025B9F4 240200FF */ addiu $v0, $zero, 0xFF /* 18A2D8 8025B9F8 14620002 */ bne $v1, $v0, .L8025BA04 /* 18A2DC 8025B9FC 24020001 */ addiu $v0, $zero, 0x1 /* 18A2E0 8025BA00 A20206C2 */ sb $v0, 0x6C2($s0) .L8025BA04: /* 18A2E4 8025BA04 820206CD */ lb $v0, 0x6CD($s0) /* 18A2E8 8025BA08 1840000A */ blez $v0, .L8025BA34 /* 18A2EC 8025BA0C 0000502D */ daddu $t2, $zero, $zero /* 18A2F0 8025BA10 0200202D */ daddu $a0, $s0, $zero /* 18A2F4 8025BA14 0200182D */ daddu $v1, $s0, $zero .L8025BA18: /* 18A2F8 8025BA18 AC6406D4 */ sw $a0, 0x6D4($v1) /* 18A2FC 8025BA1C 24840020 */ addiu $a0, $a0, 0x20 /* 18A300 8025BA20 820206CD */ lb $v0, 0x6CD($s0) /* 18A304 8025BA24 254A0001 */ addiu $t2, $t2, 0x1 /* 18A308 8025BA28 0142102A */ slt $v0, $t2, $v0 /* 18A30C 8025BA2C 1440FFFA */ bnez $v0, .L8025BA18 /* 18A310 8025BA30 24630004 */ addiu $v1, $v1, 0x4 .L8025BA34: /* 18A314 8025BA34 820306C2 */ lb $v1, 0x6C2($s0) /* 18A318 8025BA38 28620002 */ slti $v0, $v1, 0x2 /* 18A31C 8025BA3C 1040000D */ beqz $v0, .L8025BA74 /* 18A320 8025BA40 00000000 */ nop /* 18A324 8025BA44 0460000B */ bltz $v1, .L8025BA74 /* 18A328 8025BA48 00000000 */ nop /* 18A32C 8025BA4C 16800006 */ bnez $s4, .L8025BA68 /* 18A330 8025BA50 0220202D */ daddu $a0, $s1, $zero /* 18A334 8025BA54 02A0282D */ daddu $a1, $s5, $zero /* 18A338 8025BA58 0C096657 */ jal func_8025995C /* 18A33C 8025BA5C 02C0302D */ daddu $a2, $s6, $zero /* 18A340 8025BA60 08096E9D */ j .L8025BA74 /* 18A344 8025BA64 00000000 */ nop .L8025BA68: /* 18A348 8025BA68 02A0282D */ daddu $a1, $s5, $zero /* 18A34C 8025BA6C 0C0965B0 */ jal func_802596C0 /* 18A350 8025BA70 02C0302D */ daddu $a2, $s6, $zero .L8025BA74: /* 18A354 8025BA74 8FBF0038 */ lw $ra, 0x38($sp) /* 18A358 8025BA78 8FB70034 */ lw $s7, 0x34($sp) /* 18A35C 8025BA7C 8FB60030 */ lw $s6, 0x30($sp) D_8025BA80: /* 18A360 8025BA80 8FB5002C */ lw $s5, 0x2C($sp) /* 18A364 8025BA84 8FB40028 */ lw $s4, 0x28($sp) /* 18A368 8025BA88 8FB30024 */ lw $s3, 0x24($sp) /* 18A36C 8025BA8C 8FB20020 */ lw $s2, 0x20($sp) /* 18A370 8025BA90 8FB1001C */ lw $s1, 0x1C($sp) /* 18A374 8025BA94 8FB00018 */ lw $s0, 0x18($sp) /* 18A378 8025BA98 03E00008 */ jr $ra /* 18A37C 8025BA9C 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void render_with_player_debuff_palettes(b32 isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, b32 skipAnimation, b32 isPoison) { DecorationTable* decorationTable = part->decorationTable; PAL_PTR color2; PAL_PTR color1; PAL_PTR palOut; s32 i, j; u8 blendAlpha; 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++; } if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) { decorationTable->spriteColorVariations = SPR_PEACH_BTL_PAL_STRIDE; } else { 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); } if (decorationTable->resetPalAdjust == TRUE) { decorationTable->palAnimState = 0; decorationTable->palBlendAlpha = 0; } else { decorationTable->palAnimState = 0; decorationTable->palBlendAlpha = 255; } for (i = 0; i < decorationTable->originalPalettesCount; i++) { color2 = decorationTable->originalPalettesList[i]; color1 = decorationTable->copiedPalettes[0][i]; decorationTable->adjustedPalettes[i] = color1; if (color2 != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *color1++ = *color2++; } } } if (isPoison) { for (i = 0; i < decorationTable->spriteColorVariations; i++) { color2 = decorationTable->originalPalettesList[decorationTable->spriteColorVariations + i]; palOut = decorationTable->copiedPalettes[0][i]; for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *color2++; } } } decorationTable->nextPalTime = 10; decorationTable->palBlendAlpha = 0; decorationTable->palAnimState = 0; decorationTable->resetPalAdjust = FALSE; } if (decorationTable->palAnimState == 0) { if (!skipAnimation && decorationTable->nextPalTime != 0) { decorationTable->nextPalTime--; } else { if (!skipAnimation) { decorationTable->palBlendAlpha += 2560; if (decorationTable->palBlendAlpha > 255 * 100) { decorationTable->palBlendAlpha = 255 * 100; } } blendAlpha = decorationTable->palBlendAlpha / 100; for (i = 0; i < decorationTable->spriteColorVariations; i++) { if (!isPoison) { color2 = decorationTable->originalPalettesList[i]; } else { color2 = decorationTable->originalPalettesList[decorationTable->spriteColorVariations * STANDARD_PAL_POISON + i]; } color1 = decorationTable->originalPalettesList[decorationTable->spriteColorVariations * STANDARD_PAL_DIZZY + i]; palOut = decorationTable->copiedPalettes[0][i]; for (j = 0; j < SPR_PAL_SIZE; j++) { u8 r2 = UNPACK_PAL_R(*color2); u8 g2 = UNPACK_PAL_G(*color2); u8 b2 = UNPACK_PAL_B(*color2); u8 r1 = UNPACK_PAL_R(*color1); u8 g1 = UNPACK_PAL_G(*color1); u8 b1 = UNPACK_PAL_B(*color1); u8 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); *palOut++ = PACK_PAL_RGBA(r1, g1, b1, a1); } } if (blendAlpha == 255) { decorationTable->palAnimState = 1; } } } for (i = 0; i < decorationTable->originalPalettesCount; i++) { decorationTable->adjustedPalettes[i] = decorationTable->copiedPalettes[0][i]; } switch (decorationTable->palAnimState) { case 0: case 1: if (isNpcSprite == SPRITE_MODE_PLAYER) { func_8025995C(part, yaw, mtx); } else { func_802596C0(part, yaw, mtx); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel shimmer_wave_appendGfx /* 376A40 E00745E0 27BDFF10 */ addiu $sp, $sp, -0xF0 /* 376A44 E00745E4 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 376A48 E00745E8 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 376A4C E00745EC AFA400F0 */ sw $a0, 0xF0($sp) /* 376A50 E00745F0 27A40020 */ addiu $a0, $sp, 0x20 /* 376A54 E00745F4 AFB100B4 */ sw $s1, 0xB4($sp) /* 376A58 E00745F8 3C110001 */ lui $s1, (0x11630 >> 16) /* 376A5C E00745FC 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 376A60 E0074600 AFB500C4 */ sw $s5, 0xC4($sp) /* 376A64 E0074604 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 376A68 E0074608 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 376A6C E007460C AFBF00D4 */ sw $ra, 0xD4($sp) /* 376A70 E0074610 AFBE00D0 */ sw $fp, 0xD0($sp) /* 376A74 E0074614 AFB700CC */ sw $s7, 0xCC($sp) /* 376A78 E0074618 AFB600C8 */ sw $s6, 0xC8($sp) /* 376A7C E007461C AFB400C0 */ sw $s4, 0xC0($sp) /* 376A80 E0074620 AFB300BC */ sw $s3, 0xBC($sp) /* 376A84 E0074624 AFB200B8 */ sw $s2, 0xB8($sp) /* 376A88 E0074628 AFB000B0 */ sw $s0, 0xB0($sp) /* 376A8C E007462C F7B800E8 */ sdc1 $f24, 0xE8($sp) /* 376A90 E0074630 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 376A94 E0074634 F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 376A98 E0074638 8EA50000 */ lw $a1, 0x0($s5) /* 376A9C E007463C 8FAA00F0 */ lw $t2, 0xF0($sp) /* 376AA0 E0074640 00A0182D */ daddu $v1, $a1, $zero /* 376AA4 E0074644 8D52000C */ lw $s2, 0xC($t2) /* 376AA8 E0074648 24A50008 */ addiu $a1, $a1, 0x8 /* 376AAC E007464C AEA50000 */ sw $a1, 0x0($s5) /* 376AB0 E0074650 8E4A0050 */ lw $t2, 0x50($s2) /* 376AB4 E0074654 C642004C */ lwc1 $f2, 0x4C($s2) /* 376AB8 E0074658 468010A0 */ cvt.s.w $f2, $f2 /* 376ABC E007465C AFAA00A0 */ sw $t2, 0xA0($sp) /* 376AC0 E0074660 8E4A0054 */ lw $t2, 0x54($s2) /* 376AC4 E0074664 24130001 */ addiu $s3, $zero, 0x1 /* 376AC8 E0074668 AFAA00A4 */ sw $t2, 0xA4($sp) /* 376ACC E007466C 8E4A0058 */ lw $t2, 0x58($s2) /* 376AD0 E0074670 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 376AD4 E0074674 AFAA00A8 */ sw $t2, 0xA8($sp) /* 376AD8 E0074678 AC620000 */ sw $v0, 0x0($v1) /* 376ADC E007467C AC600004 */ sw $zero, 0x4($v1) /* 376AE0 E0074680 ACA60000 */ sw $a2, 0x0($a1) /* 376AE4 E0074684 8FAA00F0 */ lw $t2, 0xF0($sp) /* 376AE8 E0074688 3C01437F */ lui $at, (0x437F0000 >> 16) /* 376AEC E007468C 44810000 */ mtc1 $at, $f0 /* 376AF0 E0074690 8D430010 */ lw $v1, 0x10($t2) /* 376AF4 E0074694 24A20008 */ addiu $v0, $a1, 0x8 /* 376AF8 E0074698 AEA20000 */ sw $v0, 0x0($s5) /* 376AFC E007469C 8C62001C */ lw $v0, 0x1C($v1) /* 376B00 E00746A0 3C038000 */ lui $v1, (0x80000000 >> 16) /* 376B04 E00746A4 00431021 */ addu $v0, $v0, $v1 /* 376B08 E00746A8 ACA20004 */ sw $v0, 0x4($a1) /* 376B0C E00746AC 8E450004 */ lw $a1, 0x4($s2) /* 376B10 E00746B0 8E460008 */ lw $a2, 0x8($s2) /* 376B14 E00746B4 8E47000C */ lw $a3, 0xC($s2) /* 376B18 E00746B8 0C080108 */ jal shim_guTranslateF /* 376B1C E00746BC 46001503 */ div.s $f20, $f2, $f0 /* 376B20 E00746C0 27B00060 */ addiu $s0, $sp, 0x60 /* 376B24 E00746C4 8E450060 */ lw $a1, 0x60($s2) /* 376B28 E00746C8 0200202D */ daddu $a0, $s0, $zero /* 376B2C E00746CC 00A0302D */ daddu $a2, $a1, $zero /* 376B30 E00746D0 0C080110 */ jal shim_guScaleF /* 376B34 E00746D4 00A0382D */ daddu $a3, $a1, $zero /* 376B38 E00746D8 0200202D */ daddu $a0, $s0, $zero /* 376B3C E00746DC 27A50020 */ addiu $a1, $sp, 0x20 /* 376B40 E00746E0 0C080114 */ jal shim_guMtxCatF /* 376B44 E00746E4 00A0302D */ daddu $a2, $a1, $zero /* 376B48 E00746E8 27A40020 */ addiu $a0, $sp, 0x20 /* 376B4C E00746EC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 376B50 E00746F0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 376B54 E00746F4 3C16800A */ lui $s6, %hi(gDisplayContext) /* 376B58 E00746F8 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 376B5C E00746FC 96050000 */ lhu $a1, 0x0($s0) /* 376B60 E0074700 8EC20000 */ lw $v0, 0x0($s6) /* 376B64 E0074704 00052980 */ sll $a1, $a1, 6 /* 376B68 E0074708 00B12821 */ addu $a1, $a1, $s1 /* 376B6C E007470C 0C080118 */ jal shim_guMtxF2L /* 376B70 E0074710 00452821 */ addu $a1, $v0, $a1 /* 376B74 E0074714 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 376B78 E0074718 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 376B7C E007471C 8EA40000 */ lw $a0, 0x0($s5) /* 376B80 E0074720 96020000 */ lhu $v0, 0x0($s0) /* 376B84 E0074724 0080282D */ daddu $a1, $a0, $zero /* 376B88 E0074728 24840008 */ addiu $a0, $a0, 0x8 /* 376B8C E007472C AEA40000 */ sw $a0, 0x0($s5) /* 376B90 E0074730 ACA30000 */ sw $v1, 0x0($a1) /* 376B94 E0074734 00531821 */ addu $v1, $v0, $s3 /* 376B98 E0074738 3042FFFF */ andi $v0, $v0, 0xFFFF /* 376B9C E007473C 00021180 */ sll $v0, $v0, 6 /* 376BA0 E0074740 00511021 */ addu $v0, $v0, $s1 /* 376BA4 E0074744 A6030000 */ sh $v1, 0x0($s0) /* 376BA8 E0074748 8EC30000 */ lw $v1, 0x0($s6) /* 376BAC E007474C 24870010 */ addiu $a3, $a0, 0x10 /* 376BB0 E0074750 00621821 */ addu $v1, $v1, $v0 /* 376BB4 E0074754 24820008 */ addiu $v0, $a0, 0x8 /* 376BB8 E0074758 ACA30004 */ sw $v1, 0x4($a1) /* 376BBC E007475C AEA20000 */ sw $v0, 0x0($s5) /* 376BC0 E0074760 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 376BC4 E0074764 AC820000 */ sw $v0, 0x0($a0) /* 376BC8 E0074768 92430043 */ lbu $v1, 0x43($s2) /* 376BCC E007476C 92450047 */ lbu $a1, 0x47($s2) /* 376BD0 E0074770 9246004B */ lbu $a2, 0x4B($s2) /* 376BD4 E0074774 9248005F */ lbu $t0, 0x5F($s2) /* 376BD8 E0074778 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 376BDC E007477C AEA70000 */ sw $a3, 0x0($s5) /* 376BE0 E0074780 AC820008 */ sw $v0, 0x8($a0) /* 376BE4 E0074784 3C020900 */ lui $v0, %hi(D_09000F20_327330) /* 376BE8 E0074788 24420F20 */ addiu $v0, $v0, %lo(D_09000F20_327330) /* 376BEC E007478C AC82000C */ sw $v0, 0xC($a0) /* 376BF0 E0074790 24820018 */ addiu $v0, $a0, 0x18 /* 376BF4 E0074794 AEA20000 */ sw $v0, 0x0($s5) /* 376BF8 E0074798 00031E00 */ sll $v1, $v1, 24 /* 376BFC E007479C 00052C00 */ sll $a1, $a1, 16 /* 376C00 E00747A0 00651825 */ or $v1, $v1, $a1 /* 376C04 E00747A4 00063200 */ sll $a2, $a2, 8 /* 376C08 E00747A8 00661825 */ or $v1, $v1, $a2 /* 376C0C E00747AC 00681825 */ or $v1, $v1, $t0 /* 376C10 E00747B0 AC830004 */ sw $v1, 0x4($a0) /* 376C14 E00747B4 8FAA00F0 */ lw $t2, 0xF0($sp) /* 376C18 E00747B8 00E0A02D */ daddu $s4, $a3, $zero /* 376C1C E00747BC 8D420008 */ lw $v0, 0x8($t2) /* 376C20 E00747C0 0262102A */ slt $v0, $s3, $v0 /* 376C24 E00747C4 1040006E */ beqz $v0, .LE0074980 /* 376C28 E00747C8 2652006C */ addiu $s2, $s2, 0x6C /* 376C2C E00747CC 02C0F02D */ daddu $fp, $s6, $zero /* 376C30 E00747D0 0200B82D */ daddu $s7, $s0, $zero /* 376C34 E00747D4 3C160001 */ lui $s6, (0x11630 >> 16) /* 376C38 E00747D8 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 376C3C E00747DC 02A0882D */ daddu $s1, $s5, $zero /* 376C40 E00747E0 2650004C */ addiu $s0, $s2, 0x4C /* 376C44 E00747E4 8FAA00A0 */ lw $t2, 0xA0($sp) /* 376C48 E00747E8 4480C000 */ mtc1 $zero, $f24 /* 376C4C E00747EC 000A1600 */ sll $v0, $t2, 24 /* 376C50 E00747F0 8FAA00A4 */ lw $t2, 0xA4($sp) /* 376C54 E00747F4 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 376C58 E00747F8 4481B000 */ mtc1 $at, $f22 /* 376C5C E00747FC 314300FF */ andi $v1, $t2, 0xFF /* 376C60 E0074800 00031C00 */ sll $v1, $v1, 16 /* 376C64 E0074804 8FAA00A8 */ lw $t2, 0xA8($sp) /* 376C68 E0074808 00431025 */ or $v0, $v0, $v1 /* 376C6C E007480C 314300FF */ andi $v1, $t2, 0xFF /* 376C70 E0074810 00031A00 */ sll $v1, $v1, 8 /* 376C74 E0074814 0043A825 */ or $s5, $v0, $v1 .LE0074818: /* 376C78 E0074818 8E02FFE4 */ lw $v0, -0x1C($s0) /* 376C7C E007481C 04400052 */ bltz $v0, .LE0074968 /* 376C80 E0074820 00000000 */ nop /* 376C84 E0074824 C6000014 */ lwc1 $f0, 0x14($s0) /* 376C88 E0074828 46140002 */ mul.s $f0, $f0, $f20 /* 376C8C E007482C 00000000 */ nop /* 376C90 E0074830 4405C000 */ mfc1 $a1, $f24 /* 376C94 E0074834 4406C000 */ mfc1 $a2, $f24 /* 376C98 E0074838 E7A00010 */ swc1 $f0, 0x10($sp) /* 376C9C E007483C C600FFB8 */ lwc1 $f0, -0x48($s0) /* 376CA0 E0074840 E7A00014 */ swc1 $f0, 0x14($sp) /* 376CA4 E0074844 C600FFBC */ lwc1 $f0, -0x44($s0) /* 376CA8 E0074848 E7A00018 */ swc1 $f0, 0x18($sp) /* 376CAC E007484C C600FFC0 */ lwc1 $f0, -0x40($s0) /* 376CB0 E0074850 E7A0001C */ swc1 $f0, 0x1C($sp) /* 376CB4 E0074854 8E07FFE8 */ lw $a3, -0x18($s0) /* 376CB8 E0074858 0C080180 */ jal shim_guPositionF /* 376CBC E007485C 27A40020 */ addiu $a0, $sp, 0x20 /* 376CC0 E0074860 27A40020 */ addiu $a0, $sp, 0x20 /* 376CC4 E0074864 96E50000 */ lhu $a1, 0x0($s7) /* 376CC8 E0074868 8FC20000 */ lw $v0, 0x0($fp) /* 376CCC E007486C 00052980 */ sll $a1, $a1, 6 /* 376CD0 E0074870 00B62821 */ addu $a1, $a1, $s6 /* 376CD4 E0074874 0C080118 */ jal shim_guMtxF2L /* 376CD8 E0074878 00452821 */ addu $a1, $v0, $a1 /* 376CDC E007487C 8E240000 */ lw $a0, 0x0($s1) /* 376CE0 E0074880 0080302D */ daddu $a2, $a0, $zero /* 376CE4 E0074884 24840008 */ addiu $a0, $a0, 0x8 /* 376CE8 E0074888 AE240000 */ sw $a0, 0x0($s1) /* 376CEC E007488C 96E50000 */ lhu $a1, 0x0($s7) /* 376CF0 E0074890 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 376CF4 E0074894 ACC20000 */ sw $v0, 0x0($a2) /* 376CF8 E0074898 8FC30000 */ lw $v1, 0x0($fp) /* 376CFC E007489C 30A2FFFF */ andi $v0, $a1, 0xFFFF /* 376D00 E00748A0 00021180 */ sll $v0, $v0, 6 /* 376D04 E00748A4 00561021 */ addu $v0, $v0, $s6 /* 376D08 E00748A8 00621821 */ addu $v1, $v1, $v0 /* 376D0C E00748AC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 376D10 E00748B0 24A50001 */ addiu $a1, $a1, 0x1 /* 376D14 E00748B4 ACC30004 */ sw $v1, 0x4($a2) /* 376D18 E00748B8 AC820000 */ sw $v0, 0x0($a0) /* 376D1C E00748BC C6000000 */ lwc1 $f0, 0x0($s0) /* 376D20 E00748C0 46800020 */ cvt.s.w $f0, $f0 /* 376D24 E00748C4 46140002 */ mul.s $f0, $f0, $f20 /* 376D28 E00748C8 00000000 */ nop /* 376D2C E00748CC 24820008 */ addiu $v0, $a0, 0x8 /* 376D30 E00748D0 24840004 */ addiu $a0, $a0, 0x4 /* 376D34 E00748D4 A6E50000 */ sh $a1, 0x0($s7) /* 376D38 E00748D8 4600B03E */ c.le.s $f22, $f0 /* 376D3C E00748DC 00000000 */ nop /* 376D40 E00748E0 45010005 */ bc1t .LE00748F8 /* 376D44 E00748E4 AE220000 */ sw $v0, 0x0($s1) /* 376D48 E00748E8 4600010D */ trunc.w.s $f4, $f0 /* 376D4C E00748EC 44052000 */ mfc1 $a1, $f4 /* 376D50 E00748F0 0801D245 */ j .LE0074914 /* 376D54 E00748F4 3C06D838 */ lui $a2, (0xD8380002 >> 16) .LE00748F8: /* 376D58 E00748F8 46160001 */ sub.s $f0, $f0, $f22 /* 376D5C E00748FC 3C028000 */ lui $v0, (0x80000000 >> 16) /* 376D60 E0074900 4600010D */ trunc.w.s $f4, $f0 /* 376D64 E0074904 44052000 */ mfc1 $a1, $f4 /* 376D68 E0074908 00000000 */ nop /* 376D6C E007490C 00A22825 */ or $a1, $a1, $v0 /* 376D70 E0074910 3C06D838 */ lui $a2, (0xD8380002 >> 16) .LE0074914: /* 376D74 E0074914 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 376D78 E0074918 30A200FF */ andi $v0, $a1, 0xFF /* 376D7C E007491C 8E230000 */ lw $v1, 0x0($s1) /* 376D80 E0074920 02A21025 */ or $v0, $s5, $v0 /* 376D84 E0074924 AC820000 */ sw $v0, 0x0($a0) /* 376D88 E0074928 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 376D8C E007492C 0060282D */ daddu $a1, $v1, $zero /* 376D90 E0074930 24630008 */ addiu $v1, $v1, 0x8 /* 376D94 E0074934 AE230000 */ sw $v1, 0x0($s1) /* 376D98 E0074938 ACA20000 */ sw $v0, 0x0($a1) /* 376D9C E007493C 32620007 */ andi $v0, $s3, 0x7 /* 376DA0 E0074940 00021080 */ sll $v0, $v0, 2 /* 376DA4 E0074944 3C04E007 */ lui $a0, (0xE0074B60 >> 16) /* 376DA8 E0074948 00822021 */ addu $a0, $a0, $v0 /* 376DAC E007494C 8C844B60 */ lw $a0, (0xE0074B60 & 0xFFFF)($a0) /* 376DB0 E0074950 24620008 */ addiu $v0, $v1, 0x8 /* 376DB4 E0074954 AE220000 */ sw $v0, 0x0($s1) /* 376DB8 E0074958 24020040 */ addiu $v0, $zero, 0x40 /* 376DBC E007495C ACA40004 */ sw $a0, 0x4($a1) /* 376DC0 E0074960 AC660000 */ sw $a2, 0x0($v1) /* 376DC4 E0074964 AC620004 */ sw $v0, 0x4($v1) .LE0074968: /* 376DC8 E0074968 8FAA00F0 */ lw $t2, 0xF0($sp) /* 376DCC E007496C 26730001 */ addiu $s3, $s3, 0x1 /* 376DD0 E0074970 8D420008 */ lw $v0, 0x8($t2) /* 376DD4 E0074974 0262102A */ slt $v0, $s3, $v0 /* 376DD8 E0074978 1440FFA7 */ bnez $v0, .LE0074818 /* 376DDC E007497C 2610006C */ addiu $s0, $s0, 0x6C .LE0074980: /* 376DE0 E0074980 27A40020 */ addiu $a0, $sp, 0x20 /* 376DE4 E0074984 3C150001 */ lui $s5, (0x11630 >> 16) /* 376DE8 E0074988 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 376DEC E007498C 3C1ED838 */ lui $fp, (0xD8380002 >> 16) /* 376DF0 E0074990 37DE0002 */ ori $fp, $fp, (0xD8380002 & 0xFFFF) /* 376DF4 E0074994 3C10800A */ lui $s0, %hi(gMainGfxPos) /* 376DF8 E0074998 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* 376DFC E007499C 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 376E00 E00749A0 3C16DE00 */ lui $s6, (0xDE000000 >> 16) /* 376E04 E00749A4 8E030000 */ lw $v1, 0x0($s0) /* 376E08 E00749A8 3C0542F0 */ lui $a1, (0x42F00000 >> 16) /* 376E0C E00749AC 4480A000 */ mtc1 $zero, $f20 /* 376E10 E00749B0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 376E14 E00749B4 4481B000 */ mtc1 $at, $f22 /* 376E18 E00749B8 0060402D */ daddu $t0, $v1, $zero /* 376E1C E00749BC 4406A000 */ mfc1 $a2, $f20 /* 376E20 E00749C0 4407B000 */ mfc1 $a3, $f22 /* 376E24 E00749C4 24630008 */ addiu $v1, $v1, 0x8 /* 376E28 E00749C8 AE030000 */ sw $v1, 0x0($s0) /* 376E2C E00749CC AD020000 */ sw $v0, 0x0($t0) /* 376E30 E00749D0 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 376E34 E00749D4 AD000004 */ sw $zero, 0x4($t0) /* 376E38 E00749D8 AE820000 */ sw $v0, 0x0($s4) /* 376E3C E00749DC 24620008 */ addiu $v0, $v1, 0x8 /* 376E40 E00749E0 AE830004 */ sw $v1, 0x4($s4) /* 376E44 E00749E4 26940008 */ addiu $s4, $s4, 0x8 /* 376E48 E00749E8 AE020000 */ sw $v0, 0x0($s0) /* 376E4C E00749EC AC760000 */ sw $s6, 0x0($v1) /* 376E50 E00749F0 AC740004 */ sw $s4, 0x4($v1) /* 376E54 E00749F4 0C080104 */ jal shim_guRotateF /* 376E58 E00749F8 E7B40010 */ swc1 $f20, 0x10($sp) /* 376E5C E00749FC 27A40020 */ addiu $a0, $sp, 0x20 /* 376E60 E0074A00 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 376E64 E0074A04 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 376E68 E0074A08 3C13800A */ lui $s3, %hi(gDisplayContext) /* 376E6C E0074A0C 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 376E70 E0074A10 96250000 */ lhu $a1, 0x0($s1) /* 376E74 E0074A14 8E620000 */ lw $v0, 0x0($s3) /* 376E78 E0074A18 00052980 */ sll $a1, $a1, 6 /* 376E7C E0074A1C 00B52821 */ addu $a1, $a1, $s5 /* 376E80 E0074A20 0C080118 */ jal shim_guMtxF2L /* 376E84 E0074A24 00452821 */ addu $a1, $v0, $a1 /* 376E88 E0074A28 27A40020 */ addiu $a0, $sp, 0x20 /* 376E8C E0074A2C 3C17DA38 */ lui $s7, (0xDA380000 >> 16) /* 376E90 E0074A30 8E080000 */ lw $t0, 0x0($s0) /* 376E94 E0074A34 3C05C2F0 */ lui $a1, (0xC2F00000 >> 16) /* 376E98 E0074A38 4406A000 */ mfc1 $a2, $f20 /* 376E9C E0074A3C 4407B000 */ mfc1 $a3, $f22 /* 376EA0 E0074A40 0100482D */ daddu $t1, $t0, $zero /* 376EA4 E0074A44 25080008 */ addiu $t0, $t0, 0x8 /* 376EA8 E0074A48 AE080000 */ sw $t0, 0x0($s0) /* 376EAC E0074A4C 96220000 */ lhu $v0, 0x0($s1) /* 376EB0 E0074A50 24120040 */ addiu $s2, $zero, 0x40 /* 376EB4 E0074A54 AD370000 */ sw $s7, 0x0($t1) /* 376EB8 E0074A58 24430001 */ addiu $v1, $v0, 0x1 /* 376EBC E0074A5C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 376EC0 E0074A60 00021180 */ sll $v0, $v0, 6 /* 376EC4 E0074A64 A6230000 */ sh $v1, 0x0($s1) /* 376EC8 E0074A68 8E630000 */ lw $v1, 0x0($s3) /* 376ECC E0074A6C 00551021 */ addu $v0, $v0, $s5 /* 376ED0 E0074A70 00621821 */ addu $v1, $v1, $v0 /* 376ED4 E0074A74 25020008 */ addiu $v0, $t0, 0x8 /* 376ED8 E0074A78 AD230004 */ sw $v1, 0x4($t1) /* 376EDC E0074A7C AE020000 */ sw $v0, 0x0($s0) /* 376EE0 E0074A80 25020010 */ addiu $v0, $t0, 0x10 /* 376EE4 E0074A84 AD160000 */ sw $s6, 0x0($t0) /* 376EE8 E0074A88 AD140004 */ sw $s4, 0x4($t0) /* 376EEC E0074A8C AE020000 */ sw $v0, 0x0($s0) /* 376EF0 E0074A90 AD1E0008 */ sw $fp, 0x8($t0) /* 376EF4 E0074A94 AD12000C */ sw $s2, 0xC($t0) /* 376EF8 E0074A98 0C080104 */ jal shim_guRotateF /* 376EFC E0074A9C AFA60010 */ sw $a2, 0x10($sp) /* 376F00 E0074AA0 27A40020 */ addiu $a0, $sp, 0x20 /* 376F04 E0074AA4 96250000 */ lhu $a1, 0x0($s1) /* 376F08 E0074AA8 8E620000 */ lw $v0, 0x0($s3) /* 376F0C E0074AAC 00052980 */ sll $a1, $a1, 6 /* 376F10 E0074AB0 00B52821 */ addu $a1, $a1, $s5 /* 376F14 E0074AB4 0C080118 */ jal shim_guMtxF2L /* 376F18 E0074AB8 00452821 */ addu $a1, $v0, $a1 /* 376F1C E0074ABC 8E040000 */ lw $a0, 0x0($s0) /* 376F20 E0074AC0 96220000 */ lhu $v0, 0x0($s1) /* 376F24 E0074AC4 0080282D */ daddu $a1, $a0, $zero /* 376F28 E0074AC8 24840008 */ addiu $a0, $a0, 0x8 /* 376F2C E0074ACC 24430001 */ addiu $v1, $v0, 0x1 /* 376F30 E0074AD0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 376F34 E0074AD4 00021180 */ sll $v0, $v0, 6 /* 376F38 E0074AD8 AE040000 */ sw $a0, 0x0($s0) /* 376F3C E0074ADC ACB70000 */ sw $s7, 0x0($a1) /* 376F40 E0074AE0 A6230000 */ sh $v1, 0x0($s1) /* 376F44 E0074AE4 8E630000 */ lw $v1, 0x0($s3) /* 376F48 E0074AE8 00551021 */ addu $v0, $v0, $s5 /* 376F4C E0074AEC 00621821 */ addu $v1, $v1, $v0 /* 376F50 E0074AF0 24820008 */ addiu $v0, $a0, 0x8 /* 376F54 E0074AF4 ACA30004 */ sw $v1, 0x4($a1) /* 376F58 E0074AF8 AE020000 */ sw $v0, 0x0($s0) /* 376F5C E0074AFC 24820010 */ addiu $v0, $a0, 0x10 /* 376F60 E0074B00 AC960000 */ sw $s6, 0x0($a0) /* 376F64 E0074B04 AC940004 */ sw $s4, 0x4($a0) /* 376F68 E0074B08 AE020000 */ sw $v0, 0x0($s0) /* 376F6C E0074B0C 24820018 */ addiu $v0, $a0, 0x18 /* 376F70 E0074B10 AC9E0008 */ sw $fp, 0x8($a0) /* 376F74 E0074B14 AC92000C */ sw $s2, 0xC($a0) /* 376F78 E0074B18 AE020000 */ sw $v0, 0x0($s0) /* 376F7C E0074B1C AC9E0010 */ sw $fp, 0x10($a0) /* 376F80 E0074B20 AC920014 */ sw $s2, 0x14($a0) /* 376F84 E0074B24 8FBF00D4 */ lw $ra, 0xD4($sp) /* 376F88 E0074B28 8FBE00D0 */ lw $fp, 0xD0($sp) /* 376F8C E0074B2C 8FB700CC */ lw $s7, 0xCC($sp) /* 376F90 E0074B30 8FB600C8 */ lw $s6, 0xC8($sp) /* 376F94 E0074B34 8FB500C4 */ lw $s5, 0xC4($sp) /* 376F98 E0074B38 8FB400C0 */ lw $s4, 0xC0($sp) /* 376F9C E0074B3C 8FB300BC */ lw $s3, 0xBC($sp) /* 376FA0 E0074B40 8FB200B8 */ lw $s2, 0xB8($sp) /* 376FA4 E0074B44 8FB100B4 */ lw $s1, 0xB4($sp) /* 376FA8 E0074B48 8FB000B0 */ lw $s0, 0xB0($sp) /* 376FAC E0074B4C D7B800E8 */ ldc1 $f24, 0xE8($sp) /* 376FB0 E0074B50 D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 376FB4 E0074B54 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 376FB8 E0074B58 03E00008 */ jr $ra /* 376FBC E0074B5C 27BD00F0 */ addiu $sp, $sp, 0xF0 ### DECOMPILED C INSTRUCTIONS: void shimmer_wave_appendGfx(void* effect) { ShimmerWaveFXData* part = ((EffectInstance*)effect)->data.shimmerWave; s32 unk_50 = part->unk_50; s32 unk_54 = part->unk_54; s32 unk_58 = part->unk_58; f32 temp_4C = part->unk_4C / 255.0f; Gfx* savedGfxPos; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp20, part->unk_04, part->unk_08, part->unk_0C); shim_guScaleF(sp60, part->unk_60, part->unk_60, part->unk_60); 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); gDPSetEnvColor(gMainGfxPos++, part->unk_40, part->unk_44, part->unk_48, part->unk_5C); gSPDisplayList(gMainGfxPos++, D_09000F20_338EE0); savedGfxPos = gMainGfxPos; gMainGfxPos++; part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_30 >= 0) { shim_guPositionF(sp20, 0.0f, 0.0f, part->unk_34, part->unk_60 * temp_4C, 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); gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_50, unk_54, unk_58, part->unk_4C * temp_4C); gSPDisplayList(gMainGfxPos++, D_E0074B60[i & 7]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); shim_guRotateF(sp20, 120.0f, 0.0f, 1.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++, savedGfxPos + 1); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); shim_guRotateF(sp20, -120.0f, 0.0f, 1.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++, savedGfxPos + 1); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_camera_mode_2 /* A0F8 8002ECF8 27BDFFB8 */ addiu $sp, $sp, -0x48 /* A0FC 8002ECFC AFB00010 */ sw $s0, 0x10($sp) /* A100 8002ED00 0080802D */ daddu $s0, $a0, $zero /* A104 8002ED04 AFBF0014 */ sw $ra, 0x14($sp) /* A108 8002ED08 F7BE0040 */ sdc1 $f30, 0x40($sp) /* A10C 8002ED0C F7BC0038 */ sdc1 $f28, 0x38($sp) /* A110 8002ED10 F7BA0030 */ sdc1 $f26, 0x30($sp) /* A114 8002ED14 F7B80028 */ sdc1 $f24, 0x28($sp) /* A118 8002ED18 F7B60020 */ sdc1 $f22, 0x20($sp) /* A11C 8002ED1C F7B40018 */ sdc1 $f20, 0x18($sp) /* A120 8002ED20 86020020 */ lh $v0, 0x20($s0) /* A124 8002ED24 3C01800A */ lui $at, %hi(D_8009A5EC) /* A128 8002ED28 C426A5EC */ lwc1 $f6, %lo(D_8009A5EC)($at) /* A12C 8002ED2C 86030022 */ lh $v1, 0x22($s0) /* A130 8002ED30 44822000 */ mtc1 $v0, $f4 /* A134 8002ED34 00000000 */ nop /* A138 8002ED38 46802120 */ cvt.s.w $f4, $f4 /* A13C 8002ED3C 44831000 */ mtc1 $v1, $f2 /* A140 8002ED40 00000000 */ nop /* A144 8002ED44 468010A0 */ cvt.s.w $f2, $f2 /* A148 8002ED48 46062102 */ mul.s $f4, $f4, $f6 /* A14C 8002ED4C 00000000 */ nop /* A150 8002ED50 8602001E */ lh $v0, 0x1E($s0) /* A154 8002ED54 86030006 */ lh $v1, 0x6($s0) /* A158 8002ED58 44820000 */ mtc1 $v0, $f0 /* A15C 8002ED5C 00000000 */ nop /* A160 8002ED60 46800020 */ cvt.s.w $f0, $f0 /* A164 8002ED64 8602001C */ lh $v0, 0x1C($s0) /* A168 8002ED68 46061082 */ mul.s $f2, $f2, $f6 /* A16C 8002ED6C 00000000 */ nop /* A170 8002ED70 E6000070 */ swc1 $f0, 0x70($s0) /* A174 8002ED74 46000186 */ mov.s $f6, $f0 /* A178 8002ED78 E6060084 */ swc1 $f6, 0x84($s0) /* A17C 8002ED7C 44820000 */ mtc1 $v0, $f0 /* A180 8002ED80 00000000 */ nop /* A184 8002ED84 46800020 */ cvt.s.w $f0, $f0 /* A188 8002ED88 E6000074 */ swc1 $f0, 0x74($s0) /* A18C 8002ED8C E6040078 */ swc1 $f4, 0x78($s0) /* A190 8002ED90 10600047 */ beqz $v1, .L8002EEB0 /* A194 8002ED94 E602007C */ swc1 $f2, 0x7C($s0) /* A198 8002ED98 46000086 */ mov.s $f2, $f0 /* A19C 8002ED9C 4480C000 */ mtc1 $zero, $f24 /* A1A0 8002EDA0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* A1A4 8002EDA4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* A1A8 8002EDA8 4481B000 */ mtc1 $at, $f22 /* A1AC 8002EDAC C6080054 */ lwc1 $f8, 0x54($s0) /* A1B0 8002EDB0 C6000058 */ lwc1 $f0, 0x58($s0) /* A1B4 8002EDB4 C604007C */ lwc1 $f4, 0x7C($s0) /* A1B8 8002EDB8 C606005C */ lwc1 $f6, 0x5C($s0) /* A1BC 8002EDBC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* A1C0 8002EDC0 4481A000 */ mtc1 $at, $f20 /* A1C4 8002EDC4 46161082 */ mul.s $f2, $f2, $f22 /* A1C8 8002EDC8 00000000 */ nop /* A1CC 8002EDCC A6000006 */ sh $zero, 0x6($s0) /* A1D0 8002EDD0 E6180098 */ swc1 $f24, 0x98($s0) /* A1D4 8002EDD4 E618009C */ swc1 $f24, 0x9C($s0) /* A1D8 8002EDD8 46040000 */ add.s $f0, $f0, $f4 /* A1DC 8002EDDC E6080048 */ swc1 $f8, 0x48($s0) /* A1E0 8002EDE0 E6060050 */ swc1 $f6, 0x50($s0) /* A1E4 8002EDE4 E600004C */ swc1 $f0, 0x4C($s0) /* A1E8 8002EDE8 46141683 */ div.s $f26, $f2, $f20 /* A1EC 8002EDEC 0C00A85B */ jal sin_rad /* A1F0 8002EDF0 4600D306 */ mov.s $f12, $f26 /* A1F4 8002EDF4 46000786 */ mov.s $f30, $f0 /* A1F8 8002EDF8 0C00A874 */ jal cos_rad /* A1FC 8002EDFC 4600D306 */ mov.s $f12, $f26 /* A200 8002EE00 46000306 */ mov.s $f12, $f0 /* A204 8002EE04 46186202 */ mul.s $f8, $f12, $f24 /* A208 8002EE08 00000000 */ nop /* A20C 8002EE0C 4600C087 */ neg.s $f2, $f24 /* A210 8002EE10 4602F082 */ mul.s $f2, $f30, $f2 /* A214 8002EE14 00000000 */ nop /* A218 8002EE18 C61C0078 */ lwc1 $f28, 0x78($s0) /* A21C 8002EE1C 461EE102 */ mul.s $f4, $f28, $f30 /* A220 8002EE20 00000000 */ nop /* A224 8002EE24 460CE182 */ mul.s $f6, $f28, $f12 /* A228 8002EE28 00000000 */ nop /* A22C 8002EE2C C6000070 */ lwc1 $f0, 0x70($s0) /* A230 8002EE30 46160002 */ mul.s $f0, $f0, $f22 /* A234 8002EE34 00000000 */ nop /* A238 8002EE38 4600C286 */ mov.s $f10, $f24 /* A23C 8002EE3C 46005586 */ mov.s $f22, $f10 /* A240 8002EE40 46044600 */ add.s $f24, $f8, $f4 /* A244 8002EE44 46140683 */ div.s $f26, $f0, $f20 /* A248 8002EE48 4600D306 */ mov.s $f12, $f26 /* A24C 8002EE4C 0C00A85B */ jal sin_rad /* A250 8002EE50 46061700 */ add.s $f28, $f2, $f6 /* A254 8002EE54 46000786 */ mov.s $f30, $f0 /* A258 8002EE58 0C00A874 */ jal cos_rad /* A25C 8002EE5C 4600D306 */ mov.s $f12, $f26 /* A260 8002EE60 46000306 */ mov.s $f12, $f0 /* A264 8002EE64 46166202 */ mul.s $f8, $f12, $f22 /* A268 8002EE68 00000000 */ nop /* A26C 8002EE6C 4616F182 */ mul.s $f6, $f30, $f22 /* A270 8002EE70 00000000 */ nop /* A274 8002EE74 461EE102 */ mul.s $f4, $f28, $f30 /* A278 8002EE78 00000000 */ nop /* A27C 8002EE7C 460CE082 */ mul.s $f2, $f28, $f12 /* A280 8002EE80 00000000 */ nop /* A284 8002EE84 C600004C */ lwc1 $f0, 0x4C($s0) /* A288 8002EE88 46180400 */ add.s $f16, $f0, $f24 /* A28C 8002EE8C 46044281 */ sub.s $f10, $f8, $f4 /* A290 8002EE90 46023080 */ add.s $f2, $f6, $f2 /* A294 8002EE94 C6000048 */ lwc1 $f0, 0x48($s0) /* A298 8002EE98 460A0100 */ add.s $f4, $f0, $f10 /* A29C 8002EE9C C6000050 */ lwc1 $f0, 0x50($s0) /* A2A0 8002EEA0 46020200 */ add.s $f8, $f0, $f2 /* A2A4 8002EEA4 E6100040 */ swc1 $f16, 0x40($s0) /* A2A8 8002EEA8 E604003C */ swc1 $f4, 0x3C($s0) /* A2AC 8002EEAC E6080044 */ swc1 $f8, 0x44($s0) .L8002EEB0: /* A2B0 8002EEB0 C6020054 */ lwc1 $f2, 0x54($s0) /* A2B4 8002EEB4 C6000048 */ lwc1 $f0, 0x48($s0) /* A2B8 8002EEB8 46001101 */ sub.s $f4, $f2, $f0 /* A2BC 8002EEBC C602005C */ lwc1 $f2, 0x5C($s0) /* A2C0 8002EEC0 C6000050 */ lwc1 $f0, 0x50($s0) /* A2C4 8002EEC4 46001201 */ sub.s $f8, $f2, $f0 /* A2C8 8002EEC8 C6000058 */ lwc1 $f0, 0x58($s0) /* A2CC 8002EECC C602007C */ lwc1 $f2, 0x7C($s0) /* A2D0 8002EED0 46020000 */ add.s $f0, $f0, $f2 /* A2D4 8002EED4 C602004C */ lwc1 $f2, 0x4C($s0) /* A2D8 8002EED8 46020401 */ sub.s $f16, $f0, $f2 /* A2DC 8002EEDC 3C014180 */ lui $at, (0x41800000 >> 16) /* A2E0 8002EEE0 44811000 */ mtc1 $at, $f2 /* A2E4 8002EEE4 46002005 */ abs.s $f0, $f4 /* A2E8 8002EEE8 4600103C */ c.lt.s $f2, $f0 /* A2EC 8002EEEC 00000000 */ nop /* A2F0 8002EEF0 4502000C */ bc1fl .L8002EF24 /* A2F4 8002EEF4 46008005 */ abs.s $f0, $f16 /* A2F8 8002EEF8 44800000 */ mtc1 $zero, $f0 /* A2FC 8002EEFC 00000000 */ nop /* A300 8002EF00 4600203C */ c.lt.s $f4, $f0 /* A304 8002EF04 00000000 */ nop /* A308 8002EF08 45000005 */ bc1f .L8002EF20 /* A30C 8002EF0C 46001106 */ mov.s $f4, $f2 /* A310 8002EF10 3C01C180 */ lui $at, (0xC1800000 >> 16) /* A314 8002EF14 44812000 */ mtc1 $at, $f4 /* A318 8002EF18 3C014180 */ lui $at, (0x41800000 >> 16) /* A31C 8002EF1C 44811000 */ mtc1 $at, $f2 .L8002EF20: /* A320 8002EF20 46008005 */ abs.s $f0, $f16 .L8002EF24: /* A324 8002EF24 4600103C */ c.lt.s $f2, $f0 /* A328 8002EF28 00000000 */ nop /* A32C 8002EF2C 45000009 */ bc1f .L8002EF54 /* A330 8002EF30 00000000 */ nop /* A334 8002EF34 44800000 */ mtc1 $zero, $f0 /* A338 8002EF38 00000000 */ nop /* A33C 8002EF3C 4600803C */ c.lt.s $f16, $f0 /* A340 8002EF40 00000000 */ nop /* A344 8002EF44 45000003 */ bc1f .L8002EF54 /* A348 8002EF48 46001406 */ mov.s $f16, $f2 /* A34C 8002EF4C 3C01C180 */ lui $at, (0xC1800000 >> 16) /* A350 8002EF50 44818000 */ mtc1 $at, $f16 .L8002EF54: /* A354 8002EF54 3C014180 */ lui $at, (0x41800000 >> 16) /* A358 8002EF58 44811000 */ mtc1 $at, $f2 /* A35C 8002EF5C 46004005 */ abs.s $f0, $f8 /* A360 8002EF60 4600103C */ c.lt.s $f2, $f0 /* A364 8002EF64 00000000 */ nop /* A368 8002EF68 45000009 */ bc1f .L8002EF90 /* A36C 8002EF6C 00000000 */ nop /* A370 8002EF70 44800000 */ mtc1 $zero, $f0 /* A374 8002EF74 00000000 */ nop /* A378 8002EF78 4600403C */ c.lt.s $f8, $f0 /* A37C 8002EF7C 00000000 */ nop /* A380 8002EF80 45000003 */ bc1f .L8002EF90 /* A384 8002EF84 46001206 */ mov.s $f8, $f2 /* A388 8002EF88 3C01C180 */ lui $at, (0xC1800000 >> 16) /* A38C 8002EF8C 44814000 */ mtc1 $at, $f8 .L8002EF90: /* A390 8002EF90 3C013F00 */ lui $at, (0x3F000000 >> 16) /* A394 8002EF94 4481A000 */ mtc1 $at, $f20 /* A398 8002EF98 00000000 */ nop /* A39C 8002EF9C 46142082 */ mul.s $f2, $f4, $f20 /* A3A0 8002EFA0 00000000 */ nop /* A3A4 8002EFA4 46148182 */ mul.s $f6, $f16, $f20 /* A3A8 8002EFA8 00000000 */ nop /* A3AC 8002EFAC 46144202 */ mul.s $f8, $f8, $f20 /* A3B0 8002EFB0 00000000 */ nop /* A3B4 8002EFB4 C6000074 */ lwc1 $f0, 0x74($s0) /* A3B8 8002EFB8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* A3BC 8002EFBC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* A3C0 8002EFC0 4481B000 */ mtc1 $at, $f22 /* A3C4 8002EFC4 00000000 */ nop /* A3C8 8002EFC8 46160002 */ mul.s $f0, $f0, $f22 /* A3CC 8002EFCC 00000000 */ nop /* A3D0 8002EFD0 4480C000 */ mtc1 $zero, $f24 /* A3D4 8002EFD4 C6040048 */ lwc1 $f4, 0x48($s0) /* A3D8 8002EFD8 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* A3DC 8002EFDC 44819000 */ mtc1 $at, $f18 /* A3E0 8002EFE0 46022100 */ add.s $f4, $f4, $f2 /* A3E4 8002EFE4 C602004C */ lwc1 $f2, 0x4C($s0) /* A3E8 8002EFE8 46120683 */ div.s $f26, $f0, $f18 /* A3EC 8002EFEC 46061080 */ add.s $f2, $f2, $f6 /* A3F0 8002EFF0 C6000050 */ lwc1 $f0, 0x50($s0) /* A3F4 8002EFF4 4600D306 */ mov.s $f12, $f26 /* A3F8 8002EFF8 46080000 */ add.s $f0, $f0, $f8 /* A3FC 8002EFFC E6040048 */ swc1 $f4, 0x48($s0) /* A400 8002F000 E602004C */ swc1 $f2, 0x4C($s0) /* A404 8002F004 0C00A85B */ jal sin_rad /* A408 8002F008 E6000050 */ swc1 $f0, 0x50($s0) /* A40C 8002F00C 46000786 */ mov.s $f30, $f0 /* A410 8002F010 0C00A874 */ jal cos_rad /* A414 8002F014 4600D306 */ mov.s $f12, $f26 /* A418 8002F018 46000306 */ mov.s $f12, $f0 /* A41C 8002F01C 46186202 */ mul.s $f8, $f12, $f24 /* A420 8002F020 00000000 */ nop /* A424 8002F024 4600C087 */ neg.s $f2, $f24 /* A428 8002F028 4602F082 */ mul.s $f2, $f30, $f2 /* A42C 8002F02C 00000000 */ nop /* A430 8002F030 C61C0078 */ lwc1 $f28, 0x78($s0) /* A434 8002F034 461EE102 */ mul.s $f4, $f28, $f30 /* A438 8002F038 00000000 */ nop /* A43C 8002F03C 460CE182 */ mul.s $f6, $f28, $f12 /* A440 8002F040 00000000 */ nop /* A444 8002F044 C6000070 */ lwc1 $f0, 0x70($s0) /* A448 8002F048 46160002 */ mul.s $f0, $f0, $f22 /* A44C 8002F04C 00000000 */ nop /* A450 8002F050 4600C286 */ mov.s $f10, $f24 /* A454 8002F054 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* A458 8002F058 44819000 */ mtc1 $at, $f18 /* A45C 8002F05C 46005586 */ mov.s $f22, $f10 /* A460 8002F060 46044600 */ add.s $f24, $f8, $f4 /* A464 8002F064 46120683 */ div.s $f26, $f0, $f18 /* A468 8002F068 4600D306 */ mov.s $f12, $f26 /* A46C 8002F06C 0C00A85B */ jal sin_rad /* A470 8002F070 46061700 */ add.s $f28, $f2, $f6 /* A474 8002F074 46000786 */ mov.s $f30, $f0 /* A478 8002F078 0C00A874 */ jal cos_rad /* A47C 8002F07C 4600D306 */ mov.s $f12, $f26 /* A480 8002F080 46000306 */ mov.s $f12, $f0 /* A484 8002F084 461EE002 */ mul.s $f0, $f28, $f30 /* A488 8002F088 00000000 */ nop /* A48C 8002F08C C602004C */ lwc1 $f2, 0x4C($s0) /* A490 8002F090 46181400 */ add.s $f16, $f2, $f24 /* A494 8002F094 C6020040 */ lwc1 $f2, 0x40($s0) /* A498 8002F098 46028081 */ sub.s $f2, $f16, $f2 /* A49C 8002F09C 46141402 */ mul.s $f16, $f2, $f20 /* A4A0 8002F0A0 00000000 */ nop /* A4A4 8002F0A4 46166082 */ mul.s $f2, $f12, $f22 /* A4A8 8002F0A8 00000000 */ nop /* A4AC 8002F0AC 46001281 */ sub.s $f10, $f2, $f0 /* A4B0 8002F0B0 4616F082 */ mul.s $f2, $f30, $f22 /* A4B4 8002F0B4 00000000 */ nop /* A4B8 8002F0B8 C6000048 */ lwc1 $f0, 0x48($s0) /* A4BC 8002F0BC 460A0100 */ add.s $f4, $f0, $f10 /* A4C0 8002F0C0 C600003C */ lwc1 $f0, 0x3C($s0) /* A4C4 8002F0C4 46002001 */ sub.s $f0, $f4, $f0 /* A4C8 8002F0C8 46140102 */ mul.s $f4, $f0, $f20 /* A4CC 8002F0CC 00000000 */ nop /* A4D0 8002F0D0 460CE002 */ mul.s $f0, $f28, $f12 /* A4D4 8002F0D4 00000000 */ nop /* A4D8 8002F0D8 46001080 */ add.s $f2, $f2, $f0 /* A4DC 8002F0DC C6000050 */ lwc1 $f0, 0x50($s0) /* A4E0 8002F0E0 46020200 */ add.s $f8, $f0, $f2 /* A4E4 8002F0E4 C6000044 */ lwc1 $f0, 0x44($s0) /* A4E8 8002F0E8 46004001 */ sub.s $f0, $f8, $f0 /* A4EC 8002F0EC 46140202 */ mul.s $f8, $f0, $f20 /* A4F0 8002F0F0 00000000 */ nop /* A4F4 8002F0F4 3C014180 */ lui $at, (0x41800000 >> 16) /* A4F8 8002F0F8 44811000 */ mtc1 $at, $f2 /* A4FC 8002F0FC 46002005 */ abs.s $f0, $f4 /* A500 8002F100 4600103C */ c.lt.s $f2, $f0 /* A504 8002F104 00000000 */ nop /* A508 8002F108 4502000A */ bc1fl .L8002F134 /* A50C 8002F10C 46008005 */ abs.s $f0, $f16 /* A510 8002F110 4616203C */ c.lt.s $f4, $f22 /* A514 8002F114 00000000 */ nop /* A518 8002F118 45000005 */ bc1f .L8002F130 /* A51C 8002F11C 46001106 */ mov.s $f4, $f2 /* A520 8002F120 3C01C180 */ lui $at, (0xC1800000 >> 16) /* A524 8002F124 44812000 */ mtc1 $at, $f4 /* A528 8002F128 3C014180 */ lui $at, (0x41800000 >> 16) /* A52C 8002F12C 44811000 */ mtc1 $at, $f2 .L8002F130: /* A530 8002F130 46008005 */ abs.s $f0, $f16 .L8002F134: /* A534 8002F134 4600103C */ c.lt.s $f2, $f0 /* A538 8002F138 00000000 */ nop /* A53C 8002F13C 45000009 */ bc1f .L8002F164 /* A540 8002F140 00000000 */ nop /* A544 8002F144 44800000 */ mtc1 $zero, $f0 /* A548 8002F148 00000000 */ nop /* A54C 8002F14C 4600803C */ c.lt.s $f16, $f0 /* A550 8002F150 00000000 */ nop /* A554 8002F154 45000003 */ bc1f .L8002F164 /* A558 8002F158 46001406 */ mov.s $f16, $f2 /* A55C 8002F15C 3C01C180 */ lui $at, (0xC1800000 >> 16) /* A560 8002F160 44818000 */ mtc1 $at, $f16 .L8002F164: /* A564 8002F164 3C014180 */ lui $at, (0x41800000 >> 16) /* A568 8002F168 44811000 */ mtc1 $at, $f2 /* A56C 8002F16C 46004005 */ abs.s $f0, $f8 /* A570 8002F170 4600103C */ c.lt.s $f2, $f0 /* A574 8002F174 00000000 */ nop /* A578 8002F178 45000009 */ bc1f .L8002F1A0 /* A57C 8002F17C 00000000 */ nop /* A580 8002F180 44800000 */ mtc1 $zero, $f0 /* A584 8002F184 00000000 */ nop /* A588 8002F188 4600403C */ c.lt.s $f8, $f0 /* A58C 8002F18C 00000000 */ nop /* A590 8002F190 45000003 */ bc1f .L8002F1A0 /* A594 8002F194 46001206 */ mov.s $f8, $f2 /* A598 8002F198 3C01C180 */ lui $at, (0xC1800000 >> 16) /* A59C 8002F19C 44814000 */ mtc1 $at, $f8 .L8002F1A0: /* A5A0 8002F1A0 C600003C */ lwc1 $f0, 0x3C($s0) /* A5A4 8002F1A4 46040000 */ add.s $f0, $f0, $f4 /* A5A8 8002F1A8 C60E0044 */ lwc1 $f14, 0x44($s0) /* A5AC 8002F1AC 8E060048 */ lw $a2, 0x48($s0) /* A5B0 8002F1B0 46087380 */ add.s $f14, $f14, $f8 /* A5B4 8002F1B4 C6020040 */ lwc1 $f2, 0x40($s0) /* A5B8 8002F1B8 8E070050 */ lw $a3, 0x50($s0) /* A5BC 8002F1BC 46101080 */ add.s $f2, $f2, $f16 /* A5C0 8002F1C0 E600003C */ swc1 $f0, 0x3C($s0) /* A5C4 8002F1C4 46000306 */ mov.s $f12, $f0 /* A5C8 8002F1C8 E6020040 */ swc1 $f2, 0x40($s0) /* A5CC 8002F1CC 0C00A720 */ jal atan2 /* A5D0 8002F1D0 E60E0044 */ swc1 $f14, 0x44($s0) /* A5D4 8002F1D4 C6040048 */ lwc1 $f4, 0x48($s0) /* A5D8 8002F1D8 4480A000 */ mtc1 $zero, $f20 /* A5DC 8002F1DC C602003C */ lwc1 $f2, 0x3C($s0) /* A5E0 8002F1E0 E600006C */ swc1 $f0, 0x6C($s0) /* A5E4 8002F1E4 46022581 */ sub.s $f22, $f4, $f2 /* A5E8 8002F1E8 C6040050 */ lwc1 $f4, 0x50($s0) /* A5EC 8002F1EC C6020044 */ lwc1 $f2, 0x44($s0) /* A5F0 8002F1F0 4600A306 */ mov.s $f12, $f20 /* A5F4 8002F1F4 46022701 */ sub.s $f28, $f4, $f2 /* A5F8 8002F1F8 C604004C */ lwc1 $f4, 0x4C($s0) /* A5FC 8002F1FC C6020040 */ lwc1 $f2, 0x40($s0) /* A600 8002F200 4406B000 */ mfc1 $a2, $f22 /* A604 8002F204 46022601 */ sub.s $f24, $f4, $f2 /* A608 8002F208 4407E000 */ mfc1 $a3, $f28 /* A60C 8002F20C 0C00A720 */ jal atan2 /* A610 8002F210 4600A386 */ mov.s $f14, $f20 /* A614 8002F214 4616B102 */ mul.s $f4, $f22, $f22 /* A618 8002F218 00000000 */ nop /* A61C 8002F21C 461CE082 */ mul.s $f2, $f28, $f28 /* A620 8002F220 00000000 */ nop /* A624 8002F224 46022300 */ add.s $f12, $f4, $f2 /* A628 8002F228 46000007 */ neg.s $f0, $f0 /* A62C 8002F22C E6000090 */ swc1 $f0, 0x90($s0) /* A630 8002F230 46006004 */ sqrt.s $f0, $f12 /* A634 8002F234 46000032 */ c.eq.s $f0, $f0 /* A638 8002F238 00000000 */ nop /* A63C 8002F23C 45030004 */ bc1tl .L8002F250 /* A640 8002F240 4600A306 */ mov.s $f12, $f20 /* A644 8002F244 0C0187BC */ jal sqrtf /* A648 8002F248 00000000 */ nop /* A64C 8002F24C 4600A306 */ mov.s $f12, $f20 .L8002F250: /* A650 8002F250 46000007 */ neg.s $f0, $f0 /* A654 8002F254 4406C000 */ mfc1 $a2, $f24 /* A658 8002F258 44070000 */ mfc1 $a3, $f0 /* A65C 8002F25C 0C00A720 */ jal atan2 /* A660 8002F260 46006386 */ mov.s $f14, $f12 /* A664 8002F264 E6000094 */ swc1 $f0, 0x94($s0) /* A668 8002F268 8FBF0014 */ lw $ra, 0x14($sp) /* A66C 8002F26C 8FB00010 */ lw $s0, 0x10($sp) /* A670 8002F270 D7BE0040 */ ldc1 $f30, 0x40($sp) /* A674 8002F274 D7BC0038 */ ldc1 $f28, 0x38($sp) /* A678 8002F278 D7BA0030 */ ldc1 $f26, 0x30($sp) /* A67C 8002F27C D7B80028 */ ldc1 $f24, 0x28($sp) /* A680 8002F280 D7B60020 */ ldc1 $f22, 0x20($sp) /* A684 8002F284 D7B40018 */ ldc1 $f20, 0x18($sp) /* A688 8002F288 03E00008 */ jr $ra /* A68C 8002F28C 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void update_camera_mode_2(Camera *camera) { f32 cosBoom; f32 sinBoom; f32 boomYaw; f32 deltaX; f32 deltaY; f32 deltaZ; f32 deltaX2; f32 deltaY2; f32 deltaZ2; f32 deltaX3; f32 deltaY3; f32 deltaZ3; f32 tmp; camera->unk_70 = camera->auxBoomLength; camera->currentBoomLength = camera->lookAt_dist * D_8009A5EC; camera->currentYOffset = camera->auxBoomPitch * D_8009A5EC; camera->currentBoomYaw = camera->auxPitch; camera->trueRotation.x = camera->unk_70; if (camera->needsInit) { camera->needsInit = FALSE; camera->unk_98 = 0.0f; camera->unk_9C = 0.0f; 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); cosBoom = cos_rad(boomYaw); deltaX = 0.0f; deltaY = 0.0f; deltaZ = camera->currentBoomLength; deltaX3 = deltaX; deltaY3 = -deltaY; tmp = -0.0f; //required to match deltaZ3 = deltaZ; deltaX = deltaX3; deltaY = cosBoom * -deltaY3 + deltaZ3 * sinBoom; deltaZ = sinBoom * deltaY3 + deltaZ3 * cosBoom; boomYaw = DEG_TO_RAD(camera->unk_70); sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX3 = cosBoom * deltaX - deltaZ * sinBoom; deltaY3 = deltaY; deltaZ3 = sinBoom * deltaX + deltaZ * cosBoom; deltaX2 = camera->lookAt_obj.x + deltaX3; deltaY2 = camera->lookAt_obj.y + deltaY3; deltaZ2 = camera->lookAt_obj.z + deltaZ3; camera->lookAt_eye.x = deltaX2; camera->lookAt_eye.y = deltaY2; camera->lookAt_eye.z = deltaZ2; } deltaX2 = camera->lookAt_obj_target.x - camera->lookAt_obj.x; deltaY2 = (camera->lookAt_obj_target.y + camera->currentYOffset) - camera->lookAt_obj.y; deltaZ2 = camera->lookAt_obj_target.z - camera->lookAt_obj.z; if (fabsf(deltaX2) > 16.0f) { if (deltaX2 < 0.0f) { deltaX2 = -16.0f; } else { deltaX2 = 16.0f; } } if (fabsf(deltaY2) > 16.0f) { if (deltaY2 < 0.0f) { deltaY2 = -16.0f; } else { deltaY2 = 16.0f; } } if (fabsf(deltaZ2) > 16.0f) { if (deltaZ2 < 0.0f) { deltaZ2 = -16.0f; } else { deltaZ2 = 16.0f; } } camera->lookAt_obj.x += deltaX2 * 0.5f; camera->lookAt_obj.y += deltaY2 * 0.5f; camera->lookAt_obj.z += deltaZ2 * 0.5f; boomYaw = DEG_TO_RAD(camera->currentBoomYaw); sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX = 0.0f; deltaY = 0.0f; deltaZ = camera->currentBoomLength; deltaX3 = deltaX; deltaY3 = -deltaY; deltaZ3 = deltaZ; deltaX = deltaX3; deltaY = cosBoom * -deltaY3 + deltaZ3 * sinBoom; deltaZ = sinBoom * deltaY3 + deltaZ3 * cosBoom; boomYaw = DEG_TO_RAD(camera->unk_70); sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX3 = cosBoom * deltaX - deltaZ * sinBoom; deltaY3 = deltaY; deltaZ3 = sinBoom * deltaX + deltaZ * cosBoom; deltaX2 = camera->lookAt_obj.x + deltaX3; deltaY2 = camera->lookAt_obj.y + deltaY3; deltaZ2 = camera->lookAt_obj.z + deltaZ3; deltaX2 = (deltaX2 - camera->lookAt_eye.x) * 0.5f; deltaY2 = (deltaY2 - camera->lookAt_eye.y) * 0.5f; deltaZ2 = (deltaZ2 - camera->lookAt_eye.z) * 0.5f; tmp = 0.0f; //required to match if (fabsf(deltaX2) > 16.0f) { if (deltaX2 < 0.0f) { deltaX2 = -16.0f; } else { deltaX2 = 16.0f; } } if (fabsf(deltaY2) > 16.0f) { if (deltaY2 < 0.0f) { deltaY2 = -16.0f; } else { deltaY2 = 16.0f; } } if (fabsf(deltaZ2) > 16.0f) { if (deltaZ2 < 0.0f) { deltaZ2 = -16.0f; } else { deltaZ2 = 16.0f; } } camera->lookAt_eye.x += deltaX2; camera->lookAt_eye.y += deltaY2; camera->lookAt_eye.z += deltaZ2; 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; deltaZ = camera->lookAt_obj.z - camera->lookAt_eye.z; camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, deltaX, deltaZ); camera->currentPitch = atan2(0.0f, 0.0f, deltaY, -sqrtf(SQ(deltaX) + SQ(deltaZ))); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel D_8024A7D8_DD74A8 /* 13DB18 8024A7D8 3C038027 */ lui $v1, %hi(gPauseItemsCurrentPage) /* 13DB1C 8024A7DC 8C6304C8 */ lw $v1, %lo(gPauseItemsCurrentPage)($v1) jtbl_8024A7E0: /* 13DB20 8024A7E0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 13DB24 8024A7E4 AFBF0014 */ sw $ra, 0x14($sp) /* 13DB28 8024A7E8 AFB00010 */ sw $s0, 0x10($sp) /* 13DB2C 8024A7EC 00031040 */ sll $v0, $v1, 1 /* 13DB30 8024A7F0 00431021 */ addu $v0, $v0, $v1 /* 13DB34 8024A7F4 00021080 */ sll $v0, $v0, 2 /* 13DB38 8024A7F8 3C038027 */ lui $v1, %hi(D_802704D2) /* 13DB3C 8024A7FC 00621821 */ addu $v1, $v1, $v0 /* 13DB40 8024A800 906304D2 */ lbu $v1, %lo(D_802704D2)($v1) /* 13DB44 8024A804 3C028027 */ lui $v0, %hi(gPausePressedButtons) /* 13DB48 8024A808 8C4200C4 */ lw $v0, %lo(gPausePressedButtons)($v0) /* 13DB4C 8024A80C 3C098027 */ lui $t1, %hi(gPauseItemsSelectedIndex) /* 13DB50 8024A810 8D2905C0 */ lw $t1, %lo(gPauseItemsSelectedIndex)($t1) /* 13DB54 8024A814 30428000 */ andi $v0, $v0, 0x8000 /* 13DB58 8024A818 14600002 */ bnez $v1, .L8024A824 /* 13DB5C 8024A81C 0123001A */ div $zero, $t1, $v1 /* 13DB60 8024A820 0007000D */ break 7 .L8024A824: /* 13DB64 8024A824 2401FFFF */ addiu $at, $zero, -0x1 /* 13DB68 8024A828 14610004 */ bne $v1, $at, .L8024A83C /* 13DB6C 8024A82C 3C018000 */ lui $at, (0x80000000 >> 16) /* 13DB70 8024A830 15210002 */ bne $t1, $at, .L8024A83C /* 13DB74 8024A834 00000000 */ nop /* 13DB78 8024A838 0006000D */ break 6 .L8024A83C: /* 13DB7C 8024A83C 00002812 */ mflo $a1 /* 13DB80 8024A840 00004010 */ mfhi $t0 /* 13DB84 8024A844 10400015 */ beqz $v0, .L8024A89C /* 13DB88 8024A848 00000000 */ nop /* 13DB8C 8024A84C 3C048027 */ lui $a0, %hi(gPauseItemsLevel) /* 13DB90 8024A850 248405E0 */ addiu $a0, $a0, %lo(gPauseItemsLevel) /* 13DB94 8024A854 8C820000 */ lw $v0, 0x0($a0) /* 13DB98 8024A858 14400010 */ bnez $v0, .L8024A89C /* 13DB9C 8024A85C 00091040 */ sll $v0, $t1, 1 /* 13DBA0 8024A860 3C038027 */ lui $v1, %hi(gPauseItemsItemIDs) /* 13DBA4 8024A864 00621821 */ addu $v1, $v1, $v0 /* 13DBA8 8024A868 84630400 */ lh $v1, %lo(gPauseItemsItemIDs)($v1) /* 13DBAC 8024A86C 24027FFE */ addiu $v0, $zero, 0x7FFE /* 13DBB0 8024A870 14620005 */ bne $v1, $v0, .L8024A888 /* 13DBB4 8024A874 24020001 */ addiu $v0, $zero, 0x1 /* 13DBB8 8024A878 0C05272D */ jal sfx_play_sound /* 13DBBC 8024A87C 2404021D */ addiu $a0, $zero, 0x21D /* 13DBC0 8024A880 08092B11 */ j .L8024AC44 /* 13DBC4 8024A884 00000000 */ nop .L8024A888: /* 13DBC8 8024A888 AC820000 */ sw $v0, 0x0($a0) D_8024A88C: /* 13DBCC 8024A88C 0C05272D */ jal sfx_play_sound /* 13DBD0 8024A890 240400C9 */ addiu $a0, $zero, 0xC9 /* 13DBD4 8024A894 08092B11 */ j .L8024AC44 /* 13DBD8 8024A898 00000000 */ nop .L8024A89C: /* 13DBDC 8024A89C 3C028027 */ lui $v0, %hi(gPauseItemsNumItems) /* 13DBE0 8024A8A0 844205CC */ lh $v0, %lo(gPauseItemsNumItems)($v0) /* 13DBE4 8024A8A4 104000B1 */ beqz $v0, .L8024AB6C /* 13DBE8 8024A8A8 00000000 */ nop /* 13DBEC 8024A8AC 3C028027 */ lui $v0, %hi(gPauseItemsLevel) D_8024A8B0: /* 13DBF0 8024A8B0 8C4205E0 */ lw $v0, %lo(gPauseItemsLevel)($v0) /* 13DBF4 8024A8B4 14400015 */ bnez $v0, .L8024A90C /* 13DBF8 8024A8B8 3C020001 */ lui $v0, (0x12000 >> 16) /* 13DBFC 8024A8BC 3C108027 */ lui $s0, %hi(gPauseItemsCurrentTab) /* 13DC00 8024A8C0 261005E4 */ addiu $s0, $s0, %lo(gPauseItemsCurrentTab) /* 13DC04 8024A8C4 3C028027 */ lui $v0, %hi(gPauseHeldButtons) /* 13DC08 8024A8C8 8C4200C0 */ lw $v0, %lo(gPauseHeldButtons)($v0) /* 13DC0C 8024A8CC 3C030003 */ lui $v1, (0x30000 >> 16) /* 13DC10 8024A8D0 00431024 */ and $v0, $v0, $v1 /* 13DC14 8024A8D4 8E030000 */ lw $v1, 0x0($s0) /* 13DC18 8024A8D8 10400002 */ beqz $v0, .L8024A8E4 D_8024A8DC: /* 13DC1C 8024A8DC 38620001 */ xori $v0, $v1, 0x1 /* 13DC20 8024A8E0 AE020000 */ sw $v0, 0x0($s0) .L8024A8E4: /* 13DC24 8024A8E4 8E020000 */ lw $v0, 0x0($s0) /* 13DC28 8024A8E8 106200A0 */ beq $v1, $v0, .L8024AB6C /* 13DC2C 8024A8EC 00000000 */ nop /* 13DC30 8024A8F0 0C05272D */ jal sfx_play_sound /* 13DC34 8024A8F4 240400C8 */ addiu $a0, $zero, 0xC8 /* 13DC38 8024A8F8 8E040000 */ lw $a0, 0x0($s0) /* 13DC3C 8024A8FC 0C092937 */ jal func_8024A4DC /* 13DC40 8024A900 00000000 */ nop /* 13DC44 8024A904 08092ADB */ j .L8024AB6C D_8024A908: /* 13DC48 8024A908 00000000 */ nop .L8024A90C: /* 13DC4C 8024A90C 3C038027 */ lui $v1, %hi(gPauseHeldButtons) /* 13DC50 8024A910 8C6300C0 */ lw $v1, %lo(gPauseHeldButtons)($v1) /* 13DC54 8024A914 34422000 */ ori $v0, $v0, (0x12000 & 0xFFFF) /* 13DC58 8024A918 00621024 */ and $v0, $v1, $v0 /* 13DC5C 8024A91C 10400022 */ beqz $v0, .L8024A9A8 /* 13DC60 8024A920 3C020001 */ lui $v0, (0x10000 >> 16) /* 13DC64 8024A924 00621024 */ and $v0, $v1, $v0 /* 13DC68 8024A928 10400011 */ beqz $v0, D_8024A970_DD7640 /* 13DC6C 8024A92C 24A5FFFF */ addiu $a1, $a1, -0x1 /* 13DC70 8024A930 04A20001 */ bltzl $a1, .L8024A938 /* 13DC74 8024A934 0000282D */ daddu $a1, $zero, $zero .L8024A938: /* 13DC78 8024A938 3C048027 */ lui $a0, %hi(gPauseItemsCurrentPage) /* 13DC7C 8024A93C 248404C8 */ addiu $a0, $a0, %lo(gPauseItemsCurrentPage) /* 13DC80 8024A940 8C830000 */ lw $v1, 0x0($a0) /* 13DC84 8024A944 00031040 */ sll $v0, $v1, 1 /* 13DC88 8024A948 00431021 */ addu $v0, $v0, $v1 /* 13DC8C 8024A94C 00021080 */ sll $v0, $v0, 2 /* 13DC90 8024A950 3C018027 */ lui $at, %hi(D_802704D1) /* 13DC94 8024A954 00220821 */ addu $at, $at, $v0 .L8024A958: /* 13DC98 8024A958 902204D1 */ lbu $v0, %lo(D_802704D1)($at) /* 13DC9C 8024A95C 00A2102A */ slt $v0, $a1, $v0 .L8024A960: /* 13DCA0 8024A960 10400011 */ beqz $v0, .L8024A9A8 /* 13DCA4 8024A964 2462FFFF */ addiu $v0, $v1, -0x1 /* 13DCA8 8024A968 08092A6A */ j .L8024A9A8 D_8024A96C: /* 13DCAC 8024A96C AC820000 */ sw $v0, 0x0($a0) D_8024A970_DD7640: /* 13DCB0 8024A970 3C038027 */ lui $v1, %hi(gPauseItemsCurrentPage) /* 13DCB4 8024A974 246304C8 */ addiu $v1, $v1, %lo(gPauseItemsCurrentPage) D_8024A978_DD7648: /* 13DCB8 8024A978 8C620000 */ lw $v0, 0x0($v1) /* 13DCBC 8024A97C 2442FFFF */ addiu $v0, $v0, -0x1 jtbl_8024A980: /* 13DCC0 8024A980 04410002 */ bgez $v0, .L8024A98C /* 13DCC4 8024A984 AC620000 */ sw $v0, 0x0($v1) /* 13DCC8 8024A988 AC600000 */ sw $zero, 0x0($v1) .L8024A98C: /* 13DCCC 8024A98C 8C630000 */ lw $v1, 0x0($v1) glabel func_8024A990 /* 13DCD0 8024A990 00031040 */ sll $v0, $v1, 1 /* 13DCD4 8024A994 00431021 */ addu $v0, $v0, $v1 /* 13DCD8 8024A998 00021080 */ sll $v0, $v0, 2 /* 13DCDC 8024A99C 3C058027 */ lui $a1, %hi(D_802704D1) /* 13DCE0 8024A9A0 00A22821 */ addu $a1, $a1, $v0 /* 13DCE4 8024A9A4 90A504D1 */ lbu $a1, %lo(D_802704D1)($a1) .L8024A9A8: /* 13DCE8 8024A9A8 3C020002 */ lui $v0, (0x20010 >> 16) /* 13DCEC 8024A9AC 3C038027 */ lui $v1, %hi(gPauseHeldButtons) /* 13DCF0 8024A9B0 8C6300C0 */ lw $v1, %lo(gPauseHeldButtons)($v1) D_8024A9B4: /* 13DCF4 8024A9B4 34420010 */ ori $v0, $v0, (0x20010 & 0xFFFF) /* 13DCF8 8024A9B8 00621024 */ and $v0, $v1, $v0 /* 13DCFC 8024A9BC 10400030 */ beqz $v0, .L8024AA80 /* 13DD00 8024A9C0 3C020002 */ lui $v0, (0x20000 >> 16) /* 13DD04 8024A9C4 00621024 */ and $v0, $v1, $v0 D_8024A9C8: /* 13DD08 8024A9C8 1040001C */ beqz $v0, .L8024AA3C D_8024A9CC: /* 13DD0C 8024A9CC 00000000 */ nop /* 13DD10 8024A9D0 3C068027 */ lui $a2, %hi(gPauseItemsCurrentPage) /* 13DD14 8024A9D4 24C604C8 */ addiu $a2, $a2, %lo(gPauseItemsCurrentPage) /* 13DD18 8024A9D8 8CC40000 */ lw $a0, 0x0($a2) /* 13DD1C 8024A9DC 3C078027 */ lui $a3, %hi(gPauseItemsPages) /* 13DD20 8024A9E0 24E704D0 */ addiu $a3, $a3, %lo(gPauseItemsPages) /* 13DD24 8024A9E4 00041040 */ sll $v0, $a0, 1 /* 13DD28 8024A9E8 00441021 */ addu $v0, $v0, $a0 /* 13DD2C 8024A9EC 00021080 */ sll $v0, $v0, 2 /* 13DD30 8024A9F0 00471021 */ addu $v0, $v0, $a3 /* 13DD34 8024A9F4 90430001 */ lbu $v1, 0x1($v0) .L8024A9F8: /* 13DD38 8024A9F8 90420003 */ lbu $v0, 0x3($v0) /* 13DD3C 8024A9FC 24A50001 */ addiu $a1, $a1, 0x1 /* 13DD40 8024AA00 00621821 */ addu $v1, $v1, $v0 /* 13DD44 8024AA04 00A3182A */ slt $v1, $a1, $v1 .L8024AA08: /* 13DD48 8024AA08 1460001D */ bnez $v1, .L8024AA80 /* 13DD4C 8024AA0C 24820001 */ addiu $v0, $a0, 0x1 /* 13DD50 8024AA10 00021840 */ sll $v1, $v0, 1 .L8024AA14: /* 13DD54 8024AA14 00621821 */ addu $v1, $v1, $v0 /* 13DD58 8024AA18 00031880 */ sll $v1, $v1, 2 /* 13DD5C 8024AA1C 00671821 */ addu $v1, $v1, $a3 D_8024AA20: /* 13DD60 8024AA20 ACC20000 */ sw $v0, 0x0($a2) .L8024AA24: /* 13DD64 8024AA24 90620000 */ lbu $v0, 0x0($v1) D_8024AA28: /* 13DD68 8024AA28 14400015 */ bnez $v0, .L8024AA80 /* 13DD6C 8024AA2C 00000000 */ nop /* 13DD70 8024AA30 ACC40000 */ sw $a0, 0x0($a2) /* 13DD74 8024AA34 08092AA0 */ j .L8024AA80 /* 13DD78 8024AA38 24A5FFFF */ addiu $a1, $a1, -0x1 .L8024AA3C: /* 13DD7C 8024AA3C 3C068027 */ lui $a2, %hi(gPauseItemsCurrentPage) /* 13DD80 8024AA40 24C604C8 */ addiu $a2, $a2, %lo(gPauseItemsCurrentPage) /* 13DD84 8024AA44 8CC70000 */ lw $a3, 0x0($a2) /* 13DD88 8024AA48 3C048027 */ lui $a0, %hi(gPauseItemsPages) /* 13DD8C 8024AA4C 248404D0 */ addiu $a0, $a0, %lo(gPauseItemsPages) /* 13DD90 8024AA50 24E30001 */ addiu $v1, $a3, 0x1 /* 13DD94 8024AA54 00031040 */ sll $v0, $v1, 1 /* 13DD98 8024AA58 00431021 */ addu $v0, $v0, $v1 /* 13DD9C 8024AA5C 00021080 */ sll $v0, $v0, 2 /* 13DDA0 8024AA60 ACC30000 */ sw $v1, 0x0($a2) /* 13DDA4 8024AA64 00441821 */ addu $v1, $v0, $a0 /* 13DDA8 8024AA68 90620000 */ lbu $v0, 0x0($v1) /* 13DDAC 8024AA6C 14400003 */ bnez $v0, .L8024AA7C /* 13DDB0 8024AA70 00000000 */ nop /* 13DDB4 8024AA74 08092AA0 */ j .L8024AA80 /* 13DDB8 8024AA78 ACC70000 */ sw $a3, 0x0($a2) .L8024AA7C: /* 13DDBC 8024AA7C 90650001 */ lbu $a1, 0x1($v1) .L8024AA80: /* 13DDC0 8024AA80 3C038027 */ lui $v1, %hi(gPauseItemsCurrentPage) /* 13DDC4 8024AA84 8C6304C8 */ lw $v1, %lo(gPauseItemsCurrentPage)($v1) .L8024AA88: /* 13DDC8 8024AA88 00031040 */ sll $v0, $v1, 1 /* 13DDCC 8024AA8C 00431021 */ addu $v0, $v0, $v1 /* 13DDD0 8024AA90 00021080 */ sll $v0, $v0, 2 .L8024AA94: /* 13DDD4 8024AA94 3C048027 */ lui $a0, %hi(D_802704D2) /* 13DDD8 8024AA98 00822021 */ addu $a0, $a0, $v0 /* 13DDDC 8024AA9C 908404D2 */ lbu $a0, %lo(D_802704D2)($a0) .L8024AAA0: /* 13DDE0 8024AAA0 00A40018 */ mult $a1, $a0 /* 13DDE4 8024AAA4 00005012 */ mflo $t2 /* 13DDE8 8024AAA8 000A1040 */ sll $v0, $t2, 1 /* 13DDEC 8024AAAC 3C038027 */ lui $v1, %hi(gPauseItemsItemIDs) D_8024AAB0: /* 13DDF0 8024AAB0 00621821 */ addu $v1, $v1, $v0 D_8024AAB4: /* 13DDF4 8024AAB4 84630400 */ lh $v1, %lo(gPauseItemsItemIDs)($v1) D_8024AAB8: /* 13DDF8 8024AAB8 24027FFE */ addiu $v0, $zero, 0x7FFE D_8024AABC: /* 13DDFC 8024AABC 10620012 */ beq $v1, $v0, .L8024AB08 D_8024AAC0: /* 13DE00 8024AAC0 3C020004 */ lui $v0, (0x40000 >> 16) /* 13DE04 8024AAC4 3C038027 */ lui $v1, %hi(gPauseHeldButtons) /* 13DE08 8024AAC8 8C6300C0 */ lw $v1, %lo(gPauseHeldButtons)($v1) /* 13DE0C 8024AACC 00621024 */ and $v0, $v1, $v0 /* 13DE10 8024AAD0 10400006 */ beqz $v0, .L8024AAEC /* 13DE14 8024AAD4 3C020008 */ lui $v0, (0x80000 >> 16) /* 13DE18 8024AAD8 2508FFFF */ addiu $t0, $t0, -0x1 /* 13DE1C 8024AADC 0502000B */ bltzl $t0, .L8024AB0C /* 13DE20 8024AAE0 2488FFFF */ addiu $t0, $a0, -0x1 /* 13DE24 8024AAE4 08092AC3 */ j .L8024AB0C /* 13DE28 8024AAE8 00000000 */ nop .L8024AAEC: /* 13DE2C 8024AAEC 00621024 */ and $v0, $v1, $v0 /* 13DE30 8024AAF0 10400006 */ beqz $v0, .L8024AB0C /* 13DE34 8024AAF4 00000000 */ nop /* 13DE38 8024AAF8 25080001 */ addiu $t0, $t0, 0x1 /* 13DE3C 8024AAFC 0104102A */ slt $v0, $t0, $a0 /* 13DE40 8024AB00 14400002 */ bnez $v0, .L8024AB0C /* 13DE44 8024AB04 00000000 */ nop .L8024AB08: /* 13DE48 8024AB08 0000402D */ daddu $t0, $zero, $zero .L8024AB0C: /* 13DE4C 8024AB0C 3C038027 */ lui $v1, %hi(gPauseItemsCurrentPage) D_8024AB10_DD77E0: /* 13DE50 8024AB10 8C6304C8 */ lw $v1, %lo(gPauseItemsCurrentPage)($v1) /* 13DE54 8024AB14 00031040 */ sll $v0, $v1, 1 D_8024AB18_DD77E8: /* 13DE58 8024AB18 00431021 */ addu $v0, $v0, $v1 /* 13DE5C 8024AB1C 00021080 */ sll $v0, $v0, 2 D_8024AB20_DD77F0: /* 13DE60 8024AB20 3C018027 */ lui $at, %hi(D_802704D2) /* 13DE64 8024AB24 00220821 */ addu $at, $at, $v0 D_8024AB28_DD77F8: /* 13DE68 8024AB28 902204D2 */ lbu $v0, %lo(D_802704D2)($at) /* 13DE6C 8024AB2C 00A20018 */ mult $a1, $v0 D_8024AB30_DD7800: /* 13DE70 8024AB30 3C108027 */ lui $s0, %hi(gPauseItemsSelectedIndex) /* 13DE74 8024AB34 261005C0 */ addiu $s0, $s0, %lo(gPauseItemsSelectedIndex) jtbl_8024AB38: /* 13DE78 8024AB38 00005012 */ mflo $t2 D_8024AB3C: /* 13DE7C 8024AB3C 010A1021 */ addu $v0, $t0, $t2 /* 13DE80 8024AB40 10490003 */ beq $v0, $t1, .L8024AB50 /* 13DE84 8024AB44 AE020000 */ sw $v0, 0x0($s0) /* 13DE88 8024AB48 0C05272D */ jal sfx_play_sound /* 13DE8C 8024AB4C 240400C7 */ addiu $a0, $zero, 0xC7 .L8024AB50: /* 13DE90 8024AB50 8E020000 */ lw $v0, 0x0($s0) /* 13DE94 8024AB54 00021040 */ sll $v0, $v0, 1 /* 13DE98 8024AB58 3C018027 */ lui $at, %hi(gPauseItemsItemIDs) /* 13DE9C 8024AB5C 00220821 */ addu $at, $at, $v0 /* 13DEA0 8024AB60 84220400 */ lh $v0, %lo(gPauseItemsItemIDs)($at) /* 13DEA4 8024AB64 3C018027 */ lui $at, %hi(gPauseItemsSelectedItem) /* 13DEA8 8024AB68 AC2205C8 */ sw $v0, %lo(gPauseItemsSelectedItem)($at) .L8024AB6C: /* 13DEAC 8024AB6C 3C028027 */ lui $v0, %hi(gPauseItemsLevel) /* 13DEB0 8024AB70 8C4205E0 */ lw $v0, %lo(gPauseItemsLevel)($v0) /* 13DEB4 8024AB74 24030001 */ addiu $v1, $zero, 0x1 /* 13DEB8 8024AB78 14430014 */ bne $v0, $v1, .L8024ABCC /* 13DEBC 8024AB7C 00000000 */ nop /* 13DEC0 8024AB80 3C038027 */ lui $v1, %hi(gPauseItemsSelectedItem) .L8024AB84: /* 13DEC4 8024AB84 8C6305C8 */ lw $v1, %lo(gPauseItemsSelectedItem)($v1) /* 13DEC8 8024AB88 24628002 */ addiu $v0, $v1, -0x7FFE /* 13DECC 8024AB8C 2C420002 */ sltiu $v0, $v0, 0x2 /* 13DED0 8024AB90 1440000A */ bnez $v0, .L8024ABBC /* 13DED4 8024AB94 00000000 */ nop /* 13DED8 8024AB98 10600008 */ beqz $v1, .L8024ABBC /* 13DEDC 8024AB9C 00031140 */ sll $v0, $v1, 5 /* 13DEE0 8024ABA0 3C018008 */ lui $at, %hi(gItemTable + 0x10) /* 13DEE4 8024ABA4 00220821 */ addu $at, $at, $v0 /* 13DEE8 8024ABA8 8C2278F0 */ lw $v0, %lo(gItemTable + 0x10)($at) /* 13DEEC 8024ABAC 3C018027 */ lui $at, %hi(gPauseCurrentDescMsg) .L8024ABB0: /* 13DEF0 8024ABB0 AC2200C8 */ sw $v0, %lo(gPauseCurrentDescMsg)($at) /* 13DEF4 8024ABB4 08092AFE */ j .L8024ABF8 /* 13DEF8 8024ABB8 00000000 */ nop .L8024ABBC: /* 13DEFC 8024ABBC 3C018027 */ lui $at, %hi(gPauseCurrentDescMsg) /* 13DF00 8024ABC0 AC2000C8 */ sw $zero, %lo(gPauseCurrentDescMsg)($at) /* 13DF04 8024ABC4 08092AFC */ j .L8024ABF0 /* 13DF08 8024ABC8 00000000 */ nop .L8024ABCC: /* 13DF0C 8024ABCC 3C028027 */ lui $v0, %hi(gPauseItemsCurrentTab) /* 13DF10 8024ABD0 8C4205E4 */ lw $v0, %lo(gPauseItemsCurrentTab)($v0) /* 13DF14 8024ABD4 14430002 */ bne $v0, $v1, .L8024ABE0 /* 13DF18 8024ABD8 24040052 */ addiu $a0, $zero, 0x52 /* 13DF1C 8024ABDC 24040051 */ addiu $a0, $zero, 0x51 .L8024ABE0: /* 13DF20 8024ABE0 0C093BA0 */ jal func_8024EE80 .L8024ABE4: /* 13DF24 8024ABE4 00000000 */ nop /* 13DF28 8024ABE8 3C018027 */ lui $at, %hi(gPauseCurrentDescMsg) /* 13DF2C 8024ABEC AC2200C8 */ sw $v0, %lo(gPauseCurrentDescMsg)($at) .L8024ABF0: /* 13DF30 8024ABF0 3C018027 */ lui $at, %hi(gPauseCurrentDescIconScript) .L8024ABF4: /* 13DF34 8024ABF4 AC2000CC */ sw $zero, %lo(gPauseCurrentDescIconScript)($at) .L8024ABF8: /* 13DF38 8024ABF8 3C028027 */ lui $v0, %hi(gPausePressedButtons) /* 13DF3C 8024ABFC 8C4200C4 */ lw $v0, %lo(gPausePressedButtons)($v0) /* 13DF40 8024AC00 30424000 */ andi $v0, $v0, 0x4000 /* 13DF44 8024AC04 1040000F */ beqz $v0, .L8024AC44 /* 13DF48 8024AC08 00000000 */ nop /* 13DF4C 8024AC0C 3C108027 */ lui $s0, %hi(gPauseItemsLevel) /* 13DF50 8024AC10 261005E0 */ addiu $s0, $s0, %lo(gPauseItemsLevel) D_8024AC14: /* 13DF54 8024AC14 8E020000 */ lw $v0, 0x0($s0) /* 13DF58 8024AC18 14400007 */ bnez $v0, .L8024AC38 /* 13DF5C 8024AC1C 00000000 */ nop /* 13DF60 8024AC20 0C05272D */ jal sfx_play_sound /* 13DF64 8024AC24 240400CA */ addiu $a0, $zero, 0xCA /* 13DF68 8024AC28 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab) /* 13DF6C 8024AC2C A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at) /* 13DF70 8024AC30 08092B11 */ j .L8024AC44 D_8024AC34: /* 13DF74 8024AC34 00000000 */ nop .L8024AC38: /* 13DF78 8024AC38 0C05272D */ jal sfx_play_sound /* 13DF7C 8024AC3C 240400CA */ addiu $a0, $zero, 0xCA /* 13DF80 8024AC40 AE000000 */ sw $zero, 0x0($s0) .L8024AC44: /* 13DF84 8024AC44 8FBF0014 */ lw $ra, 0x14($sp) /* 13DF88 8024AC48 8FB00010 */ lw $s0, 0x10($sp) /* 13DF8C 8024AC4C 03E00008 */ jr $ra /* 13DF90 8024AC50 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void pause_items_handle_input(MenuPanel* panel) { s32 oldTab; s32 oldSelectedIndex = gPauseItemsSelectedIndex; s32 row = gPauseItemsSelectedIndex / gPauseItemsPages[gPauseItemsCurrentPage].numCols; s32 column = gPauseItemsSelectedIndex % gPauseItemsPages[gPauseItemsCurrentPage].numCols; if ((gPausePressedButtons & BUTTON_A) && gPauseItemsLevel == 0) { if (gPauseItemsItemIDs[gPauseItemsSelectedIndex] == ITEM_NONE_STANDIN) { sfx_play_sound(SOUND_MENU_ERROR); } else { gPauseItemsLevel = 1; sfx_play_sound(SOUND_MENU_NEXT); } return; } if (gPauseItemsNumItems != 0) { if (gPauseItemsLevel == 0) { oldTab = gPauseItemsCurrentTab; if (gPauseHeldButtons & (BUTTON_STICK_UP|BUTTON_STICK_DOWN)) { gPauseItemsCurrentTab ^= 1; } if (oldTab != gPauseItemsCurrentTab) { sfx_play_sound(SOUND_MENU_CHANGE_TAB); pause_items_load_items(gPauseItemsCurrentTab); } } else { if (gPauseHeldButtons & (BUTTON_STICK_UP|BUTTON_Z)) { row--; if (gPauseHeldButtons & BUTTON_STICK_UP) { if (row < 0) { row = 0; } if (row < gPauseItemsPages[gPauseItemsCurrentPage].listStart) { gPauseItemsCurrentPage--; } } else { gPauseItemsCurrentPage--; if (gPauseItemsCurrentPage < 0) { gPauseItemsCurrentPage = 0; } row = gPauseItemsPages[gPauseItemsCurrentPage].listStart; } } if (gPauseHeldButtons & (BUTTON_STICK_DOWN|BUTTON_R)) { if (gPauseHeldButtons & BUTTON_STICK_DOWN) { row++; if (row >= gPauseItemsPages[gPauseItemsCurrentPage].listStart + gPauseItemsPages[gPauseItemsCurrentPage].numRows) { gPauseItemsCurrentPage++; if (!gPauseItemsPages[gPauseItemsCurrentPage].enabled) { gPauseItemsCurrentPage--; row--; } } } else { gPauseItemsCurrentPage++; if (!gPauseItemsPages[gPauseItemsCurrentPage].enabled) { gPauseItemsCurrentPage--; } else { row = gPauseItemsPages[gPauseItemsCurrentPage].listStart; } } } if (gPauseItemsItemIDs[row * gPauseItemsPages[gPauseItemsCurrentPage].numCols] != ITEM_NONE_STANDIN) { if (gPauseHeldButtons & BUTTON_STICK_LEFT) { column--; if (column < 0) { column = gPauseItemsPages[gPauseItemsCurrentPage].numCols - 1; } } else if (gPauseHeldButtons & BUTTON_STICK_RIGHT) { column++; if (column >= gPauseItemsPages[gPauseItemsCurrentPage].numCols) { column = 0; } } } else { column = 0; } gPauseItemsSelectedIndex = column + row * gPauseItemsPages[gPauseItemsCurrentPage].numCols; if (gPauseItemsSelectedIndex != oldSelectedIndex) { sfx_play_sound(SOUND_MENU_CHANGE_SELECTION); } gPauseItemsSelectedItem = gPauseItemsItemIDs[gPauseItemsSelectedIndex]; } } if (gPauseItemsLevel == 1) { if (gPauseItemsSelectedItem != ITEM_NONE_STANDIN && gPauseItemsSelectedItem != ITEM_INVALID && gPauseItemsSelectedItem != 0) { gPauseCurrentDescMsg = gItemTable[gPauseItemsSelectedItem].fullDescMsg; } else { gPauseCurrentDescMsg = MSG_NONE; gPauseCurrentDescIconScript = NULL; } } else { if (gPauseItemsCurrentTab == 1) { gPauseCurrentDescMsg = pause_get_menu_msg(PAUSE_MSG_DESC_CONSUMABLES); } else { gPauseCurrentDescMsg = pause_get_menu_msg(PAUSE_MSG_DESC_KEY_ITEMS); } gPauseCurrentDescIconScript = NULL; } if (gPausePressedButtons & BUTTON_B) { if (gPauseItemsLevel == 0) { sfx_play_sound(SOUND_MENU_BACK); gPauseMenuCurrentTab = 0; } else { sfx_play_sound(SOUND_MENU_BACK); gPauseItemsLevel = 0; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_draw_palswap_mode_4 /* 172D8 8003BED8 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 172DC 8003BEDC AFB40030 */ sw $s4, 0x30($sp) /* 172E0 8003BEE0 0080A02D */ daddu $s4, $a0, $zero /* 172E4 8003BEE4 AFB60038 */ sw $s6, 0x38($sp) /* 172E8 8003BEE8 00A0B02D */ daddu $s6, $a1, $zero /* 172EC 8003BEEC AFBF0040 */ sw $ra, 0x40($sp) /* 172F0 8003BEF0 AFB7003C */ sw $s7, 0x3C($sp) /* 172F4 8003BEF4 AFB50034 */ sw $s5, 0x34($sp) /* 172F8 8003BEF8 AFB3002C */ sw $s3, 0x2C($sp) /* 172FC 8003BEFC AFB20028 */ sw $s2, 0x28($sp) /* 17300 8003BF00 AFB10024 */ sw $s1, 0x24($sp) /* 17304 8003BF04 AFB00020 */ sw $s0, 0x20($sp) /* 17308 8003BF08 828200B6 */ lb $v0, 0xB6($s4) /* 1730C 8003BF0C 10400041 */ beqz $v0, .L8003C014 /* 17310 8003BF10 00C0B82D */ daddu $s7, $a2, $zero /* 17314 8003BF14 8E820000 */ lw $v0, 0x0($s4) /* 17318 8003BF18 3C034000 */ lui $v1, (0x40000000 >> 16) /* 1731C 8003BF1C 00431024 */ and $v0, $v0, $v1 /* 17320 8003BF20 14400004 */ bnez $v0, .L8003BF34 /* 17324 8003BF24 00000000 */ nop /* 17328 8003BF28 0C0B7A90 */ jal spr_get_npc_palettes /* 1732C 8003BF2C 96840028 */ lhu $a0, 0x28($s4) /* 17330 8003BF30 AE8200C4 */ sw $v0, 0xC4($s4) .L8003BF34: /* 17334 8003BF34 8E8400C4 */ lw $a0, 0xC4($s4) /* 17338 8003BF38 A28000C1 */ sb $zero, 0xC1($s4) /* 1733C 8003BF3C 8C830000 */ lw $v1, 0x0($a0) /* 17340 8003BF40 2402FFFF */ addiu $v0, $zero, -0x1 /* 17344 8003BF44 1062000B */ beq $v1, $v0, .L8003BF74 /* 17348 8003BF48 0080182D */ daddu $v1, $a0, $zero /* 1734C 8003BF4C 0040202D */ daddu $a0, $v0, $zero .L8003BF50: /* 17350 8003BF50 928200C1 */ lbu $v0, 0xC1($s4) /* 17354 8003BF54 24420001 */ addiu $v0, $v0, 0x1 /* 17358 8003BF58 A28200C1 */ sb $v0, 0xC1($s4) /* 1735C 8003BF5C 00021600 */ sll $v0, $v0, 24 /* 17360 8003BF60 00021583 */ sra $v0, $v0, 22 /* 17364 8003BF64 00431021 */ addu $v0, $v0, $v1 /* 17368 8003BF68 8C420000 */ lw $v0, 0x0($v0) /* 1736C 8003BF6C 1444FFF8 */ bne $v0, $a0, .L8003BF50 /* 17370 8003BF70 00000000 */ nop .L8003BF74: /* 17374 8003BF74 828300B6 */ lb $v1, 0xB6($s4) /* 17378 8003BF78 24020001 */ addiu $v0, $zero, 0x1 /* 1737C 8003BF7C 14620004 */ bne $v1, $v0, .L8003BF90 /* 17380 8003BF80 240200FF */ addiu $v0, $zero, 0xFF /* 17384 8003BF84 A28000B7 */ sb $zero, 0xB7($s4) /* 17388 8003BF88 0800EFE6 */ j .L8003BF98 /* 1738C 8003BF8C A68000BE */ sh $zero, 0xBE($s4) .L8003BF90: /* 17390 8003BF90 A28000B7 */ sb $zero, 0xB7($s4) /* 17394 8003BF94 A68200BE */ sh $v0, 0xBE($s4) .L8003BF98: /* 17398 8003BF98 828200C1 */ lb $v0, 0xC1($s4) /* 1739C 8003BF9C 18400018 */ blez $v0, .L8003C000 /* 173A0 8003BFA0 0000202D */ daddu $a0, $zero, $zero /* 173A4 8003BFA4 0280302D */ daddu $a2, $s4, $zero /* 173A8 8003BFA8 240500C8 */ addiu $a1, $zero, 0xC8 .L8003BFAC: /* 173AC 8003BFAC 8E8300C4 */ lw $v1, 0xC4($s4) /* 173B0 8003BFB0 00041080 */ sll $v0, $a0, 2 /* 173B4 8003BFB4 00431021 */ addu $v0, $v0, $v1 /* 173B8 8003BFB8 8C520000 */ lw $s2, 0x0($v0) /* 173BC 8003BFBC 02858021 */ addu $s0, $s4, $a1 /* 173C0 8003BFC0 12400009 */ beqz $s2, .L8003BFE8 /* 173C4 8003BFC4 ACD002C8 */ sw $s0, 0x2C8($a2) /* 173C8 8003BFC8 0000882D */ daddu $s1, $zero, $zero .L8003BFCC: /* 173CC 8003BFCC 96420000 */ lhu $v0, 0x0($s2) /* 173D0 8003BFD0 26520002 */ addiu $s2, $s2, 0x2 /* 173D4 8003BFD4 26310001 */ addiu $s1, $s1, 0x1 /* 173D8 8003BFD8 A6020000 */ sh $v0, 0x0($s0) /* 173DC 8003BFDC 2A220010 */ slti $v0, $s1, 0x10 /* 173E0 8003BFE0 1440FFFA */ bnez $v0, .L8003BFCC /* 173E4 8003BFE4 26100002 */ addiu $s0, $s0, 0x2 .L8003BFE8: /* 173E8 8003BFE8 24C60004 */ addiu $a2, $a2, 0x4 /* 173EC 8003BFEC 828200C1 */ lb $v0, 0xC1($s4) /* 173F0 8003BFF0 24840001 */ addiu $a0, $a0, 0x1 /* 173F4 8003BFF4 0082102A */ slt $v0, $a0, $v0 /* 173F8 8003BFF8 1440FFEC */ bnez $v0, .L8003BFAC /* 173FC 8003BFFC 24A50020 */ addiu $a1, $a1, 0x20 .L8003C000: /* 17400 8003C000 9682030C */ lhu $v0, 0x30C($s4) /* 17404 8003C004 A68000BE */ sh $zero, 0xBE($s4) /* 17408 8003C008 A28000B7 */ sb $zero, 0xB7($s4) /* 1740C 8003C00C A28000B6 */ sb $zero, 0xB6($s4) /* 17410 8003C010 A68200BC */ sh $v0, 0xBC($s4) .L8003C014: /* 17414 8003C014 828300B7 */ lb $v1, 0xB7($s4) /* 17418 8003C018 10600005 */ beqz $v1, .L8003C030 /* 1741C 8003C01C 24020001 */ addiu $v0, $zero, 0x1 /* 17420 8003C020 1062000C */ beq $v1, $v0, .L8003C054 /* 17424 8003C024 24020002 */ addiu $v0, $zero, 0x2 /* 17428 8003C028 0800F06B */ j .L8003C1AC /* 1742C 8003C02C 00000000 */ nop .L8003C030: /* 17430 8003C030 868200BC */ lh $v0, 0xBC($s4) /* 17434 8003C034 968300BC */ lhu $v1, 0xBC($s4) /* 17438 8003C038 10400003 */ beqz $v0, .L8003C048 /* 1743C 8003C03C 2462FFFF */ addiu $v0, $v1, -0x1 /* 17440 8003C040 0800F069 */ j .L8003C1A4 /* 17444 8003C044 A68200BC */ sh $v0, 0xBC($s4) .L8003C048: /* 17448 8003C048 24020001 */ addiu $v0, $zero, 0x1 /* 1744C 8003C04C A68000BE */ sh $zero, 0xBE($s4) /* 17450 8003C050 A28200B7 */ sb $v0, 0xB7($s4) .L8003C054: /* 17454 8003C054 8682030E */ lh $v0, 0x30E($s4) /* 17458 8003C058 24036400 */ addiu $v1, $zero, 0x6400 /* 1745C 8003C05C 14400002 */ bnez $v0, .L8003C068 /* 17460 8003C060 0062001A */ div $zero, $v1, $v0 /* 17464 8003C064 0007000D */ break 7 .L8003C068: /* 17468 8003C068 2401FFFF */ addiu $at, $zero, -0x1 /* 1746C 8003C06C 14410004 */ bne $v0, $at, .L8003C080 /* 17470 8003C070 3C018000 */ lui $at, (0x80000000 >> 16) /* 17474 8003C074 14610002 */ bne $v1, $at, .L8003C080 /* 17478 8003C078 00000000 */ nop /* 1747C 8003C07C 0006000D */ break 6 .L8003C080: /* 17480 8003C080 00001812 */ mflo $v1 /* 17484 8003C084 968200BE */ lhu $v0, 0xBE($s4) /* 17488 8003C088 00431021 */ addu $v0, $v0, $v1 /* 1748C 8003C08C A68200BE */ sh $v0, 0xBE($s4) /* 17490 8003C090 00021400 */ sll $v0, $v0, 16 /* 17494 8003C094 00021403 */ sra $v0, $v0, 16 /* 17498 8003C098 2842639D */ slti $v0, $v0, 0x639D /* 1749C 8003C09C 14400003 */ bnez $v0, .L8003C0AC /* 174A0 8003C0A0 3C0651EB */ lui $a2, (0x51EB851F >> 16) /* 174A4 8003C0A4 2402639C */ addiu $v0, $zero, 0x639C /* 174A8 8003C0A8 A68200BE */ sh $v0, 0xBE($s4) .L8003C0AC: /* 174AC 8003C0AC 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) /* 174B0 8003C0B0 269300C8 */ addiu $s3, $s4, 0xC8 /* 174B4 8003C0B4 0000882D */ daddu $s1, $zero, $zero /* 174B8 8003C0B8 86820308 */ lh $v0, 0x308($s4) /* 174BC 8003C0BC 8E8500C4 */ lw $a1, 0xC4($s4) /* 174C0 8003C0C0 968300BE */ lhu $v1, 0xBE($s4) /* 174C4 8003C0C4 00021080 */ sll $v0, $v0, 2 /* 174C8 8003C0C8 00451021 */ addu $v0, $v0, $a1 /* 174CC 8003C0CC 00031C00 */ sll $v1, $v1, 16 /* 174D0 8003C0D0 00032403 */ sra $a0, $v1, 16 /* 174D4 8003C0D4 8C520000 */ lw $s2, 0x0($v0) /* 174D8 8003C0D8 8682030A */ lh $v0, 0x30A($s4) /* 174DC 8003C0DC 00860018 */ mult $a0, $a2 /* 174E0 8003C0E0 00021080 */ sll $v0, $v0, 2 /* 174E4 8003C0E4 00451021 */ addu $v0, $v0, $a1 /* 174E8 8003C0E8 8C500000 */ lw $s0, 0x0($v0) /* 174EC 8003C0EC 00031FC3 */ sra $v1, $v1, 31 /* 174F0 8003C0F0 AE9302C8 */ sw $s3, 0x2C8($s4) /* 174F4 8003C0F4 00004010 */ mfhi $t0 /* 174F8 8003C0F8 00081143 */ sra $v0, $t0, 5 /* 174FC 8003C0FC 0043A823 */ subu $s5, $v0, $v1 .L8003C100: /* 17500 8003C100 96440000 */ lhu $a0, 0x0($s2) /* 17504 8003C104 26520002 */ addiu $s2, $s2, 0x2 /* 17508 8003C108 96050000 */ lhu $a1, 0x0($s0) /* 1750C 8003C10C 26100002 */ addiu $s0, $s0, 0x2 /* 17510 8003C110 32A600FF */ andi $a2, $s5, 0xFF /* 17514 8003C114 0C00EE5B */ jal npc_blend_palette_colors /* 17518 8003C118 26310001 */ addiu $s1, $s1, 0x1 /* 1751C 8003C11C A6620000 */ sh $v0, 0x0($s3) /* 17520 8003C120 2A220010 */ slti $v0, $s1, 0x10 /* 17524 8003C124 1440FFF6 */ bnez $v0, .L8003C100 /* 17528 8003C128 26730002 */ addiu $s3, $s3, 0x2 /* 1752C 8003C12C 26930128 */ addiu $s3, $s4, 0x128 /* 17530 8003C130 86820314 */ lh $v0, 0x314($s4) /* 17534 8003C134 8E8400C4 */ lw $a0, 0xC4($s4) /* 17538 8003C138 86830316 */ lh $v1, 0x316($s4) /* 1753C 8003C13C 00021080 */ sll $v0, $v0, 2 /* 17540 8003C140 00441021 */ addu $v0, $v0, $a0 /* 17544 8003C144 00031880 */ sll $v1, $v1, 2 /* 17548 8003C148 00641821 */ addu $v1, $v1, $a0 /* 1754C 8003C14C 8C520000 */ lw $s2, 0x0($v0) /* 17550 8003C150 8C700000 */ lw $s0, 0x0($v1) /* 17554 8003C154 0000882D */ daddu $s1, $zero, $zero /* 17558 8003C158 AE9302D4 */ sw $s3, 0x2D4($s4) .L8003C15C: /* 1755C 8003C15C 96440000 */ lhu $a0, 0x0($s2) /* 17560 8003C160 26520002 */ addiu $s2, $s2, 0x2 /* 17564 8003C164 96050000 */ lhu $a1, 0x0($s0) /* 17568 8003C168 26100002 */ addiu $s0, $s0, 0x2 /* 1756C 8003C16C 32A600FF */ andi $a2, $s5, 0xFF /* 17570 8003C170 0C00EE5B */ jal npc_blend_palette_colors /* 17574 8003C174 26310001 */ addiu $s1, $s1, 0x1 /* 17578 8003C178 A6620000 */ sh $v0, 0x0($s3) /* 1757C 8003C17C 2A220010 */ slti $v0, $s1, 0x10 /* 17580 8003C180 1440FFF6 */ bnez $v0, .L8003C15C /* 17584 8003C184 26730002 */ addiu $s3, $s3, 0x2 /* 17588 8003C188 32A300FF */ andi $v1, $s5, 0xFF /* 1758C 8003C18C 240200FF */ addiu $v0, $zero, 0xFF /* 17590 8003C190 14620004 */ bne $v1, $v0, .L8003C1A4 /* 17594 8003C194 24020002 */ addiu $v0, $zero, 0x2 /* 17598 8003C198 96830310 */ lhu $v1, 0x310($s4) /* 1759C 8003C19C A28200B7 */ sb $v0, 0xB7($s4) /* 175A0 8003C1A0 A68300BC */ sh $v1, 0xBC($s4) .L8003C1A4: /* 175A4 8003C1A4 828300B7 */ lb $v1, 0xB7($s4) /* 175A8 8003C1A8 24020002 */ addiu $v0, $zero, 0x2 .L8003C1AC: /* 175AC 8003C1AC 10620005 */ beq $v1, $v0, .L8003C1C4 /* 175B0 8003C1B0 24020003 */ addiu $v0, $zero, 0x3 /* 175B4 8003C1B4 1062000A */ beq $v1, $v0, .L8003C1E0 /* 175B8 8003C1B8 00000000 */ nop /* 175BC 8003C1BC 0800F0CD */ j .L8003C334 /* 175C0 8003C1C0 00000000 */ nop .L8003C1C4: /* 175C4 8003C1C4 868200BC */ lh $v0, 0xBC($s4) /* 175C8 8003C1C8 968300BC */ lhu $v1, 0xBC($s4) /* 175CC 8003C1CC 14400058 */ bnez $v0, .L8003C330 /* 175D0 8003C1D0 2462FFFF */ addiu $v0, $v1, -0x1 /* 175D4 8003C1D4 24020003 */ addiu $v0, $zero, 0x3 /* 175D8 8003C1D8 A68000BE */ sh $zero, 0xBE($s4) /* 175DC 8003C1DC A28200B7 */ sb $v0, 0xB7($s4) .L8003C1E0: /* 175E0 8003C1E0 86820312 */ lh $v0, 0x312($s4) /* 175E4 8003C1E4 24036400 */ addiu $v1, $zero, 0x6400 /* 175E8 8003C1E8 14400002 */ bnez $v0, .L8003C1F4 /* 175EC 8003C1EC 0062001A */ div $zero, $v1, $v0 /* 175F0 8003C1F0 0007000D */ break 7 .L8003C1F4: /* 175F4 8003C1F4 2401FFFF */ addiu $at, $zero, -0x1 /* 175F8 8003C1F8 14410004 */ bne $v0, $at, .L8003C20C /* 175FC 8003C1FC 3C018000 */ lui $at, (0x80000000 >> 16) /* 17600 8003C200 14610002 */ bne $v1, $at, .L8003C20C /* 17604 8003C204 00000000 */ nop /* 17608 8003C208 0006000D */ break 6 .L8003C20C: /* 1760C 8003C20C 00001812 */ mflo $v1 /* 17610 8003C210 968200BE */ lhu $v0, 0xBE($s4) /* 17614 8003C214 00431021 */ addu $v0, $v0, $v1 /* 17618 8003C218 A68200BE */ sh $v0, 0xBE($s4) /* 1761C 8003C21C 00021400 */ sll $v0, $v0, 16 /* 17620 8003C220 00021403 */ sra $v0, $v0, 16 /* 17624 8003C224 2842639D */ slti $v0, $v0, 0x639D /* 17628 8003C228 14400003 */ bnez $v0, .L8003C238 /* 1762C 8003C22C 3C0651EB */ lui $a2, (0x51EB851F >> 16) /* 17630 8003C230 2402639C */ addiu $v0, $zero, 0x639C /* 17634 8003C234 A68200BE */ sh $v0, 0xBE($s4) .L8003C238: /* 17638 8003C238 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) /* 1763C 8003C23C 269300C8 */ addiu $s3, $s4, 0xC8 /* 17640 8003C240 0000882D */ daddu $s1, $zero, $zero /* 17644 8003C244 8682030A */ lh $v0, 0x30A($s4) /* 17648 8003C248 8E8500C4 */ lw $a1, 0xC4($s4) /* 1764C 8003C24C 968300BE */ lhu $v1, 0xBE($s4) /* 17650 8003C250 00021080 */ sll $v0, $v0, 2 /* 17654 8003C254 00451021 */ addu $v0, $v0, $a1 /* 17658 8003C258 00031C00 */ sll $v1, $v1, 16 /* 1765C 8003C25C 00032403 */ sra $a0, $v1, 16 /* 17660 8003C260 8C520000 */ lw $s2, 0x0($v0) /* 17664 8003C264 86820308 */ lh $v0, 0x308($s4) /* 17668 8003C268 00860018 */ mult $a0, $a2 /* 1766C 8003C26C 00021080 */ sll $v0, $v0, 2 /* 17670 8003C270 00451021 */ addu $v0, $v0, $a1 /* 17674 8003C274 8C500000 */ lw $s0, 0x0($v0) /* 17678 8003C278 00031FC3 */ sra $v1, $v1, 31 /* 1767C 8003C27C AE9302C8 */ sw $s3, 0x2C8($s4) /* 17680 8003C280 00004010 */ mfhi $t0 /* 17684 8003C284 00081143 */ sra $v0, $t0, 5 /* 17688 8003C288 0043A823 */ subu $s5, $v0, $v1 .L8003C28C: /* 1768C 8003C28C 96440000 */ lhu $a0, 0x0($s2) /* 17690 8003C290 26520002 */ addiu $s2, $s2, 0x2 /* 17694 8003C294 96050000 */ lhu $a1, 0x0($s0) /* 17698 8003C298 26100002 */ addiu $s0, $s0, 0x2 /* 1769C 8003C29C 32A600FF */ andi $a2, $s5, 0xFF /* 176A0 8003C2A0 0C00EE5B */ jal npc_blend_palette_colors /* 176A4 8003C2A4 26310001 */ addiu $s1, $s1, 0x1 /* 176A8 8003C2A8 A6620000 */ sh $v0, 0x0($s3) /* 176AC 8003C2AC 2A220010 */ slti $v0, $s1, 0x10 /* 176B0 8003C2B0 1440FFF6 */ bnez $v0, .L8003C28C /* 176B4 8003C2B4 26730002 */ addiu $s3, $s3, 0x2 /* 176B8 8003C2B8 269300E8 */ addiu $s3, $s4, 0xE8 /* 176BC 8003C2BC 0000882D */ daddu $s1, $zero, $zero /* 176C0 8003C2C0 86830316 */ lh $v1, 0x316($s4) /* 176C4 8003C2C4 8E8400C4 */ lw $a0, 0xC4($s4) /* 176C8 8003C2C8 86820314 */ lh $v0, 0x314($s4) /* 176CC 8003C2CC 00031880 */ sll $v1, $v1, 2 /* 176D0 8003C2D0 00641821 */ addu $v1, $v1, $a0 /* 176D4 8003C2D4 00021080 */ sll $v0, $v0, 2 /* 176D8 8003C2D8 00441021 */ addu $v0, $v0, $a0 /* 176DC 8003C2DC 8C720000 */ lw $s2, 0x0($v1) /* 176E0 8003C2E0 8C500000 */ lw $s0, 0x0($v0) /* 176E4 8003C2E4 26820128 */ addiu $v0, $s4, 0x128 /* 176E8 8003C2E8 AE8202D4 */ sw $v0, 0x2D4($s4) .L8003C2EC: /* 176EC 8003C2EC 96440000 */ lhu $a0, 0x0($s2) /* 176F0 8003C2F0 26520002 */ addiu $s2, $s2, 0x2 /* 176F4 8003C2F4 96050000 */ lhu $a1, 0x0($s0) /* 176F8 8003C2F8 26100002 */ addiu $s0, $s0, 0x2 /* 176FC 8003C2FC 32A600FF */ andi $a2, $s5, 0xFF /* 17700 8003C300 0C00EE5B */ jal npc_blend_palette_colors /* 17704 8003C304 26310001 */ addiu $s1, $s1, 0x1 /* 17708 8003C308 A6620000 */ sh $v0, 0x0($s3) /* 1770C 8003C30C 2A220010 */ slti $v0, $s1, 0x10 /* 17710 8003C310 1440FFF6 */ bnez $v0, .L8003C2EC /* 17714 8003C314 26730002 */ addiu $s3, $s3, 0x2 /* 17718 8003C318 32A300FF */ andi $v1, $s5, 0xFF /* 1771C 8003C31C 240200FF */ addiu $v0, $zero, 0xFF /* 17720 8003C320 14620004 */ bne $v1, $v0, .L8003C334 /* 17724 8003C324 00000000 */ nop /* 17728 8003C328 9682030C */ lhu $v0, 0x30C($s4) /* 1772C 8003C32C A28000B7 */ sb $zero, 0xB7($s4) .L8003C330: /* 17730 8003C330 A68200BC */ sh $v0, 0xBC($s4) .L8003C334: /* 17734 8003C334 828300B7 */ lb $v1, 0xB7($s4) /* 17738 8003C338 28620004 */ slti $v0, $v1, 0x4 /* 1773C 8003C33C 1040001B */ beqz $v0, .L8003C3AC /* 17740 8003C340 00000000 */ nop /* 17744 8003C344 04600019 */ bltz $v1, .L8003C3AC /* 17748 8003C348 3C034000 */ lui $v1, (0x40000000 >> 16) /* 1774C 8003C34C 8E820000 */ lw $v0, 0x0($s4) /* 17750 8003C350 00431024 */ and $v0, $v0, $v1 /* 17754 8003C354 14400015 */ bnez $v0, .L8003C3AC /* 17758 8003C358 02C0282D */ daddu $a1, $s6, $zero /* 1775C 8003C35C 928200AC */ lbu $v0, 0xAC($s4) /* 17760 8003C360 928300AD */ lbu $v1, 0xAD($s4) /* 17764 8003C364 00430018 */ mult $v0, $v1 /* 17768 8003C368 00001012 */ mflo $v0 /* 1776C 8003C36C 3C038080 */ lui $v1, (0x80808081 >> 16) /* 17770 8003C370 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF) /* 17774 8003C374 00430018 */ mult $v0, $v1 /* 17778 8003C378 8E830024 */ lw $v1, 0x24($s4) /* 1777C 8003C37C 268702C8 */ addiu $a3, $s4, 0x2C8 /* 17780 8003C380 AFB70010 */ sw $s7, 0x10($sp) /* 17784 8003C384 00004810 */ mfhi $t1 /* 17788 8003C388 01221021 */ addu $v0, $t1, $v0 /* 1778C 8003C38C 0002A9C2 */ srl $s5, $v0, 7 /* 17790 8003C390 32A600FF */ andi $a2, $s5, 0xFF /* 17794 8003C394 2CC400FF */ sltiu $a0, $a2, 0xFF /* 17798 8003C398 000427C0 */ sll $a0, $a0, 31 /* 1779C 8003C39C 3C022000 */ lui $v0, (0x20000000 >> 16) /* 177A0 8003C3A0 00822025 */ or $a0, $a0, $v0 /* 177A4 8003C3A4 0C0B78F6 */ jal spr_draw_npc_sprite /* 177A8 8003C3A8 00642025 */ or $a0, $v1, $a0 .L8003C3AC: /* 177AC 8003C3AC 8FBF0040 */ lw $ra, 0x40($sp) /* 177B0 8003C3B0 8FB7003C */ lw $s7, 0x3C($sp) /* 177B4 8003C3B4 8FB60038 */ lw $s6, 0x38($sp) /* 177B8 8003C3B8 8FB50034 */ lw $s5, 0x34($sp) /* 177BC 8003C3BC 8FB40030 */ lw $s4, 0x30($sp) /* 177C0 8003C3C0 8FB3002C */ lw $s3, 0x2C($sp) /* 177C4 8003C3C4 8FB20028 */ lw $s2, 0x28($sp) /* 177C8 8003C3C8 8FB10024 */ lw $s1, 0x24($sp) /* 177CC 8003C3CC 8FB00020 */ lw $s0, 0x20($sp) /* 177D0 8003C3D0 03E00008 */ jr $ra /* 177D4 8003C3D4 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 npc_draw_palswap_mode_4(Npc* npc, s32 arg1, Matrix4f mtx) { s32 i, j; PAL_PTR src; PAL_PTR src2; PAL_PTR dst; u8 blendAlpha; if (npc->dirtyPalettes != 0) { if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { npc->spritePaletteList = spr_get_npc_palettes(npc->currentAnim >> 16); } npc->paletteCount = 0; while ((s32)npc->spritePaletteList[npc->paletteCount] != -1) { npc->paletteCount++; } if (npc->dirtyPalettes == 1) { npc->palSwapState = 0; npc->palSwapLerpAlpha = 0; } else { npc->palSwapState = 0; npc->palSwapLerpAlpha = 255; } for (i = 0; i < npc->paletteCount; i++) { src2 = npc->localPaletteData[i]; src = npc->spritePaletteList[i]; npc->localPalettes[i] = src2; if (src != NULL) { for (j = 0; j < 16; j++) { *src2++ = *src++; } } } npc->palSwapLerpAlpha = 0; npc->palSwapState = 0; npc->dirtyPalettes = 0; npc->palSwapTimer = npc->unk_30C; } switch (npc->palSwapState) { case 0: if (npc->palSwapTimer != 0) { npc->palSwapTimer--; break; } else { npc->palSwapLerpAlpha = 0; npc->palSwapState = 1; } // fallthrough case 1: npc->palSwapLerpAlpha += 25600 / npc->unk_30E; if (npc->palSwapLerpAlpha > 25500) { npc->palSwapLerpAlpha = 25500; } blendAlpha = npc->palSwapLerpAlpha / 100; dst = npc->localPaletteData[0]; src = npc->spritePaletteList[npc->unk_308]; src2 = npc->spritePaletteList[npc->unk_30A]; npc->localPalettes[0] = dst; for (j = 0; j < 16; j++) { *dst++ = npc_blend_palette_colors(*src++, *src2++, blendAlpha); } dst = npc->localPaletteData[3]; src = npc->spritePaletteList[npc->unk_314]; src2 = npc->spritePaletteList[npc->unk_316]; npc->localPalettes[3] = dst; for (j = 0; j < 16; j++) { *dst++ = npc_blend_palette_colors(*src++, *src2++, blendAlpha); } if (blendAlpha == 255) { npc->palSwapState = 2; npc->palSwapTimer = npc->unk_310; } break; } switch (npc->palSwapState) { case 2: if (npc->palSwapTimer != 0) { npc->palSwapTimer--; break; } else { npc->palSwapLerpAlpha = 0; npc->palSwapState = 3; } // fallthrough case 3: npc->palSwapLerpAlpha += 25600 / npc->unk_312; if (npc->palSwapLerpAlpha > 25500) { npc->palSwapLerpAlpha = 25500; } blendAlpha = npc->palSwapLerpAlpha / 100; dst = npc->localPaletteData[0]; src = npc->spritePaletteList[npc->unk_30A]; src2 = npc->spritePaletteList[npc->unk_308]; npc->localPalettes[0] = dst; for (j = 0; j < 16; j++) { *dst++ = npc_blend_palette_colors(*src++, *src2++, blendAlpha); } dst = npc->localPaletteData[1]; src = npc->spritePaletteList[npc->unk_316]; src2 = npc->spritePaletteList[npc->unk_314]; npc->localPalettes[3] = npc->localPaletteData[3]; for (j = 0; j < 16; j++) { *dst++ = npc_blend_palette_colors(*src++, *src2++, blendAlpha); } if (blendAlpha == 255) { npc->palSwapState = 0; npc->palSwapTimer = npc->unk_30C; } break; } if (npc->palSwapState < 4) { if (npc->palSwapState >= 0) { if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { s32 temp; u32 spriteInstanceMask; blendAlpha = npc->alpha * npc->alpha2 / 255; temp = blendAlpha < 255; spriteInstanceMask = ((temp) << 31) | DRAW_SPRITE_OVERRIDE_PALETTES; spr_draw_npc_sprite(npc->spriteInstanceID | spriteInstanceMask, arg1, blendAlpha, npc->localPalettes, mtx); } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80250EA4 /* 17F784 80250EA4 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 17F788 80250EA8 AFB30034 */ sw $s3, 0x34($sp) /* 17F78C 80250EAC 0080982D */ daddu $s3, $a0, $zero /* 17F790 80250EB0 AFBF003C */ sw $ra, 0x3C($sp) /* 17F794 80250EB4 AFB40038 */ sw $s4, 0x38($sp) /* 17F798 80250EB8 AFB20030 */ sw $s2, 0x30($sp) /* 17F79C 80250EBC AFB1002C */ sw $s1, 0x2C($sp) /* 17F7A0 80250EC0 AFB00028 */ sw $s0, 0x28($sp) /* 17F7A4 80250EC4 86630012 */ lh $v1, 0x12($s3) /* 17F7A8 80250EC8 2C620055 */ sltiu $v0, $v1, 0x55 /* 17F7AC 80250ECC 104000F1 */ beqz $v0, .L80251294 /* 17F7B0 80250ED0 24140050 */ addiu $s4, $zero, 0x50 /* 17F7B4 80250ED4 00031080 */ sll $v0, $v1, 2 /* 17F7B8 80250ED8 3C01802A */ lui $at, %hi(jtbl_8029D1F0) /* 17F7BC 80250EDC 00220821 */ addu $at, $at, $v0 /* 17F7C0 80250EE0 8C22D1F0 */ lw $v0, %lo(jtbl_8029D1F0)($at) /* 17F7C4 80250EE4 00400008 */ jr $v0 /* 17F7C8 80250EE8 00000000 */ nop glabel .L80250EEC /* 17F7CC 80250EEC 82620017 */ lb $v0, 0x17($s3) end_00_CreditsProjMatrices: /* 17F7D0 80250EF0 104000E8 */ beqz $v0, .L80251294 /* 17F7D4 80250EF4 0000282D */ daddu $a1, $zero, $zero /* 17F7D8 80250EF8 86620012 */ lh $v0, 0x12($s3) /* 17F7DC 80250EFC A2600017 */ sb $zero, 0x17($s3) /* 17F7E0 80250F00 00021080 */ sll $v0, $v0, 2 /* 17F7E4 80250F04 3C108028 */ lui $s0, %hi(bMessages) /* 17F7E8 80250F08 02028021 */ addu $s0, $s0, $v0 /* 17F7EC 80250F0C 8E103770 */ lw $s0, %lo(bMessages)($s0) /* 17F7F0 80250F10 0C04991D */ jal get_msg_width /* 17F7F4 80250F14 0200202D */ daddu $a0, $s0, $zero /* 17F7F8 80250F18 2447001E */ addiu $a3, $v0, 0x1E /* 17F7FC 80250F1C 000717C2 */ srl $v0, $a3, 31 /* 17F800 80250F20 00E21021 */ addu $v0, $a3, $v0 /* 17F804 80250F24 00021043 */ sra $v0, $v0, 1 /* 17F808 80250F28 240300A0 */ addiu $v1, $zero, 0xA0 /* 17F80C 80250F2C 00628823 */ subu $s1, $v1, $v0 /* 17F810 80250F30 00E0902D */ daddu $s2, $a3, $zero /* 17F814 80250F34 0C04992C */ jal get_msg_lines /* 17F818 80250F38 0200202D */ daddu $a0, $s0, $zero /* 17F81C 80250F3C 2442FFFF */ addiu $v0, $v0, -0x1 D_80250F40_C0E7C0: /* 17F820 80250F40 24040009 */ addiu $a0, $zero, 0x9 /* 17F824 80250F44 0220282D */ daddu $a1, $s1, $zero /* 17F828 80250F48 0280302D */ daddu $a2, $s4, $zero /* 17F82C 80250F4C 00021040 */ sll $v0, $v0, 1 /* 17F830 80250F50 0240382D */ daddu $a3, $s2, $zero /* 17F834 80250F54 3C088028 */ lui $t0, %hi(bMsgHeights) /* 17F838 80250F58 01024021 */ addu $t0, $t0, $v0 /* 17F83C 80250F5C 850835D0 */ lh $t0, %lo(bMsgHeights)($t0) /* 17F840 80250F60 3C028025 */ lui $v0, %hi(func_80250818) /* 17F844 80250F64 24420818 */ addiu $v0, $v0, %lo(func_80250818) /* 17F848 80250F68 AFA20018 */ sw $v0, 0x18($sp) /* 17F84C 80250F6C 2402FFFF */ addiu $v0, $zero, -0x1 /* 17F850 80250F70 AFA00014 */ sw $zero, 0x14($sp) /* 17F854 80250F74 AFB3001C */ sw $s3, 0x1C($sp) /* 17F858 80250F78 AFA20020 */ sw $v0, 0x20($sp) /* 17F85C 80250F7C 0C051F32 */ jal set_window_properties /* 17F860 80250F80 AFA80010 */ sw $t0, 0x10($sp) /* 17F864 80250F84 24040009 */ addiu $a0, $zero, 0x9 /* 17F868 80250F88 080944A3 */ j .L8025128C /* 17F86C 80250F8C 24050001 */ addiu $a1, $zero, 0x1 glabel .L80250F90 /* 17F870 80250F90 82620017 */ lb $v0, 0x17($s3) /* 17F874 80250F94 104000BF */ beqz $v0, .L80251294 /* 17F878 80250F98 00000000 */ nop /* 17F87C 80250F9C 86620012 */ lh $v0, 0x12($s3) /* 17F880 80250FA0 A2600017 */ sb $zero, 0x17($s3) /* 17F884 80250FA4 00021080 */ sll $v0, $v0, 2 /* 17F888 80250FA8 3C048028 */ lui $a0, %hi(bMessages) /* 17F88C 80250FAC 00822021 */ addu $a0, $a0, $v0 /* 17F890 80250FB0 8C843770 */ lw $a0, %lo(bMessages)($a0) /* 17F894 80250FB4 0C04991D */ jal get_msg_width /* 17F898 80250FB8 0000282D */ daddu $a1, $zero, $zero /* 17F89C 80250FBC 24470037 */ addiu $a3, $v0, 0x37 D_80250FC0: /* 17F8A0 80250FC0 24080028 */ addiu $t0, $zero, 0x28 /* 17F8A4 80250FC4 24040009 */ addiu $a0, $zero, 0x9 D_80250FC8_C0E848: /* 17F8A8 80250FC8 00072FC2 */ srl $a1, $a3, 31 /* 17F8AC 80250FCC 00E52821 */ addu $a1, $a3, $a1 /* 17F8B0 80250FD0 00052843 */ sra $a1, $a1, 1 /* 17F8B4 80250FD4 240200A0 */ addiu $v0, $zero, 0xA0 /* 17F8B8 80250FD8 00452823 */ subu $a1, $v0, $a1 /* 17F8BC 80250FDC 0280302D */ daddu $a2, $s4, $zero /* 17F8C0 80250FE0 3C028025 */ lui $v0, %hi(func_80250818) /* 17F8C4 80250FE4 24420818 */ addiu $v0, $v0, %lo(func_80250818) /* 17F8C8 80250FE8 AFA20018 */ sw $v0, 0x18($sp) /* 17F8CC 80250FEC 2402FFFF */ addiu $v0, $zero, -0x1 /* 17F8D0 80250FF0 AFA80010 */ sw $t0, 0x10($sp) /* 17F8D4 80250FF4 AFA00014 */ sw $zero, 0x14($sp) /* 17F8D8 80250FF8 AFB3001C */ sw $s3, 0x1C($sp) /* 17F8DC 80250FFC 0C051F32 */ jal set_window_properties /* 17F8E0 80251000 AFA20020 */ sw $v0, 0x20($sp) /* 17F8E4 80251004 24040009 */ addiu $a0, $zero, 0x9 /* 17F8E8 80251008 080944A3 */ j .L8025128C /* 17F8EC 8025100C 24050001 */ addiu $a1, $zero, 0x1 glabel .L80251010 /* 17F8F0 80251010 82620017 */ lb $v0, 0x17($s3) /* 17F8F4 80251014 1040009F */ beqz $v0, .L80251294 /* 17F8F8 80251018 00000000 */ nop /* 17F8FC 8025101C 86620012 */ lh $v0, 0x12($s3) /* 17F900 80251020 A2600017 */ sb $zero, 0x17($s3) /* 17F904 80251024 3C04802A */ lui $a0, %hi(D_8029F640) /* 17F908 80251028 8484F640 */ lh $a0, %lo(D_8029F640)($a0) /* 17F90C 8025102C 00021080 */ sll $v0, $v0, 2 /* 17F910 80251030 3C108028 */ lui $s0, %hi(bMessages) /* 17F914 80251034 02028021 */ addu $s0, $s0, $v0 /* 17F918 80251038 8E103770 */ lw $s0, %lo(bMessages)($s0) /* 17F91C 8025103C 0C0496FA */ jal set_message_value /* 17F920 80251040 0000282D */ daddu $a1, $zero, $zero /* 17F924 80251044 0000282D */ daddu $a1, $zero, $zero /* 17F928 80251048 0C04991D */ jal get_msg_width /* 17F92C 8025104C 0200202D */ daddu $a0, $s0, $zero D_80251050_C0E8D0: /* 17F930 80251050 2447001F */ addiu $a3, $v0, 0x1F /* 17F934 80251054 000717C2 */ srl $v0, $a3, 31 /* 17F938 80251058 00E21021 */ addu $v0, $a3, $v0 /* 17F93C 8025105C 00021043 */ sra $v0, $v0, 1 /* 17F940 80251060 240300A0 */ addiu $v1, $zero, 0xA0 /* 17F944 80251064 00628823 */ subu $s1, $v1, $v0 /* 17F948 80251068 00E0902D */ daddu $s2, $a3, $zero /* 17F94C 8025106C 0C04992C */ jal get_msg_lines /* 17F950 80251070 0200202D */ daddu $a0, $s0, $zero /* 17F954 80251074 2442FFFF */ addiu $v0, $v0, -0x1 /* 17F958 80251078 24040009 */ addiu $a0, $zero, 0x9 /* 17F95C 8025107C 0220282D */ daddu $a1, $s1, $zero /* 17F960 80251080 0280302D */ daddu $a2, $s4, $zero /* 17F964 80251084 00021040 */ sll $v0, $v0, 1 /* 17F968 80251088 0240382D */ daddu $a3, $s2, $zero /* 17F96C 8025108C 3C088028 */ lui $t0, %hi(bMsgHeights) /* 17F970 80251090 01024021 */ addu $t0, $t0, $v0 /* 17F974 80251094 850835D0 */ lh $t0, %lo(bMsgHeights)($t0) /* 17F978 80251098 3C028025 */ lui $v0, %hi(func_80250818) /* 17F97C 8025109C 24420818 */ addiu $v0, $v0, %lo(func_80250818) /* 17F980 802510A0 AFA20018 */ sw $v0, 0x18($sp) /* 17F984 802510A4 2402FFFF */ addiu $v0, $zero, -0x1 /* 17F988 802510A8 AFA00014 */ sw $zero, 0x14($sp) /* 17F98C 802510AC AFB3001C */ sw $s3, 0x1C($sp) D_802510B0: /* 17F990 802510B0 AFA20020 */ sw $v0, 0x20($sp) /* 17F994 802510B4 0C051F32 */ jal set_window_properties D_802510B8: /* 17F998 802510B8 AFA80010 */ sw $t0, 0x10($sp) /* 17F99C 802510BC 24040009 */ addiu $a0, $zero, 0x9 D_802510C0: /* 17F9A0 802510C0 080944A3 */ j .L8025128C /* 17F9A4 802510C4 24050001 */ addiu $a1, $zero, 0x1 D_802510C8_C0E948: /* 17F9A8 802510C8 82620017 */ lb $v0, 0x17($s3) /* 17F9AC 802510CC 10400071 */ beqz $v0, .L80251294 /* 17F9B0 802510D0 00000000 */ nop /* 17F9B4 802510D4 A2600017 */ sb $zero, 0x17($s3) /* 17F9B8 802510D8 3C03802A */ lui $v1, %hi(D_8029F640) /* 17F9BC 802510DC 8463F640 */ lh $v1, %lo(D_8029F640)($v1) /* 17F9C0 802510E0 86620012 */ lh $v0, 0x12($s3) /* 17F9C4 802510E4 00031880 */ sll $v1, $v1, 2 /* 17F9C8 802510E8 00021080 */ sll $v0, $v0, 2 /* 17F9CC 802510EC 3C048028 */ lui $a0, %hi(bActorMessages) /* 17F9D0 802510F0 00832021 */ addu $a0, $a0, $v1 /* 17F9D4 802510F4 8C8438C4 */ lw $a0, %lo(bActorMessages)($a0) /* 17F9D8 802510F8 3C108028 */ lui $s0, %hi(bMessages) /* 17F9DC 802510FC 02028021 */ addu $s0, $s0, $v0 /* 17F9E0 80251100 8E103770 */ lw $s0, %lo(bMessages)($s0) /* 17F9E4 80251104 0C0496CF */ jal set_message_msg /* 17F9E8 80251108 0000282D */ daddu $a1, $zero, $zero /* 17F9EC 8025110C 0200202D */ daddu $a0, $s0, $zero /* 17F9F0 80251110 0C04991D */ jal get_msg_width /* 17F9F4 80251114 0000282D */ daddu $a1, $zero, $zero /* 17F9F8 80251118 2447001F */ addiu $a3, $v0, 0x1F /* 17F9FC 8025111C 000717C2 */ srl $v0, $a3, 31 /* 17FA00 80251120 00E21021 */ addu $v0, $a3, $v0 /* 17FA04 80251124 00021043 */ sra $v0, $v0, 1 /* 17FA08 80251128 240300A0 */ addiu $v1, $zero, 0xA0 /* 17FA0C 8025112C 00628823 */ subu $s1, $v1, $v0 /* 17FA10 80251130 00E0902D */ daddu $s2, $a3, $zero /* 17FA14 80251134 0C04992C */ jal get_msg_lines /* 17FA18 80251138 0200202D */ daddu $a0, $s0, $zero /* 17FA1C 8025113C 2442FFFF */ addiu $v0, $v0, -0x1 /* 17FA20 80251140 24040009 */ addiu $a0, $zero, 0x9 /* 17FA24 80251144 0220282D */ daddu $a1, $s1, $zero /* 17FA28 80251148 0280302D */ daddu $a2, $s4, $zero /* 17FA2C 8025114C 00021040 */ sll $v0, $v0, 1 /* 17FA30 80251150 0240382D */ daddu $a3, $s2, $zero /* 17FA34 80251154 3C088028 */ lui $t0, %hi(bMsgHeights) /* 17FA38 80251158 01024021 */ addu $t0, $t0, $v0 /* 17FA3C 8025115C 850835D0 */ lh $t0, %lo(bMsgHeights)($t0) /* 17FA40 80251160 3C028025 */ lui $v0, %hi(func_80250818) /* 17FA44 80251164 24420818 */ addiu $v0, $v0, %lo(func_80250818) /* 17FA48 80251168 AFA20018 */ sw $v0, 0x18($sp) /* 17FA4C 8025116C 2402FFFF */ addiu $v0, $zero, -0x1 /* 17FA50 80251170 AFA00014 */ sw $zero, 0x14($sp) /* 17FA54 80251174 AFB3001C */ sw $s3, 0x1C($sp) /* 17FA58 80251178 AFA20020 */ sw $v0, 0x20($sp) /* 17FA5C 8025117C 0C051F32 */ jal set_window_properties /* 17FA60 80251180 AFA80010 */ sw $t0, 0x10($sp) /* 17FA64 80251184 24040009 */ addiu $a0, $zero, 0x9 /* 17FA68 80251188 080944A3 */ j .L8025128C /* 17FA6C 8025118C 24050001 */ addiu $a1, $zero, 0x1 glabel .L80251190 /* 17FA70 80251190 82620017 */ lb $v0, 0x17($s3) /* 17FA74 80251194 1040003F */ beqz $v0, .L80251294 /* 17FA78 80251198 0000282D */ daddu $a1, $zero, $zero /* 17FA7C 8025119C 86620012 */ lh $v0, 0x12($s3) /* 17FA80 802511A0 A2600017 */ sb $zero, 0x17($s3) /* 17FA84 802511A4 00021080 */ sll $v0, $v0, 2 /* 17FA88 802511A8 3C108028 */ lui $s0, %hi(bMessages) /* 17FA8C 802511AC 02028021 */ addu $s0, $s0, $v0 /* 17FA90 802511B0 8E103770 */ lw $s0, %lo(bMessages)($s0) /* 17FA94 802511B4 241400C0 */ addiu $s4, $zero, 0xC0 /* 17FA98 802511B8 0C04991D */ jal get_msg_width /* 17FA9C 802511BC 0200202D */ daddu $a0, $s0, $zero /* 17FAA0 802511C0 2447001F */ addiu $a3, $v0, 0x1F /* 17FAA4 802511C4 000717C2 */ srl $v0, $a3, 31 /* 17FAA8 802511C8 00E21021 */ addu $v0, $a3, $v0 /* 17FAAC 802511CC 00021043 */ sra $v0, $v0, 1 /* 17FAB0 802511D0 240300A0 */ addiu $v1, $zero, 0xA0 /* 17FAB4 802511D4 00628823 */ subu $s1, $v1, $v0 /* 17FAB8 802511D8 00E0902D */ daddu $s2, $a3, $zero /* 17FABC 802511DC 0C04992C */ jal get_msg_lines /* 17FAC0 802511E0 0200202D */ daddu $a0, $s0, $zero /* 17FAC4 802511E4 2442FFFF */ addiu $v0, $v0, -0x1 /* 17FAC8 802511E8 00021840 */ sll $v1, $v0, 1 /* 17FACC 802511EC 2410003B */ addiu $s0, $zero, 0x3B /* 17FAD0 802511F0 86620012 */ lh $v0, 0x12($s3) /* 17FAD4 802511F4 3C088028 */ lui $t0, %hi(bMsgHeights) /* 17FAD8 802511F8 01034021 */ addu $t0, $t0, $v1 /* 17FADC 802511FC 850835D0 */ lh $t0, %lo(bMsgHeights)($t0) /* 17FAE0 80251200 14500005 */ bne $v0, $s0, .L80251218 /* 17FAE4 80251204 24040009 */ addiu $a0, $zero, 0x9 /* 17FAE8 80251208 24140078 */ addiu $s4, $zero, 0x78 /* 17FAEC 8025120C 24020001 */ addiu $v0, $zero, 0x1 /* 17FAF0 80251210 3C01802A */ lui $at, %hi(D_8029F64C) /* 17FAF4 80251214 A422F64C */ sh $v0, %lo(D_8029F64C)($at) .L80251218: /* 17FAF8 80251218 0220282D */ daddu $a1, $s1, $zero /* 17FAFC 8025121C 0240382D */ daddu $a3, $s2, $zero /* 17FB00 80251220 3C018028 */ lui $at, %hi(D_802835D8) /* 17FB04 80251224 00230821 */ addu $at, $at, $v1 /* 17FB08 80251228 942335D8 */ lhu $v1, %lo(D_802835D8)($at) /* 17FB0C 8025122C 3C028025 */ lui $v0, %hi(func_80250818) /* 17FB10 80251230 24420818 */ addiu $v0, $v0, %lo(func_80250818) /* 17FB14 80251234 AFA20018 */ sw $v0, 0x18($sp) /* 17FB18 80251238 2402FFFF */ addiu $v0, $zero, -0x1 /* 17FB1C 8025123C AFA20020 */ sw $v0, 0x20($sp) /* 17FB20 80251240 00141400 */ sll $v0, $s4, 16 /* 17FB24 80251244 00021403 */ sra $v0, $v0, 16 /* 17FB28 80251248 3C01802A */ lui $at, %hi(D_8029F64E) /* 17FB2C 8025124C A434F64E */ sh $s4, %lo(D_8029F64E)($at) /* 17FB30 80251250 AFA80010 */ sw $t0, 0x10($sp) /* 17FB34 80251254 AFA00014 */ sw $zero, 0x14($sp) /* 17FB38 80251258 AFB3001C */ sw $s3, 0x1C($sp) /* 17FB3C 8025125C 00033400 */ sll $a2, $v1, 16 /* 17FB40 80251260 00063403 */ sra $a2, $a2, 16 /* 17FB44 80251264 3C01802A */ lui $at, %hi(D_8029F650) /* 17FB48 80251268 A423F650 */ sh $v1, %lo(D_8029F650)($at) /* 17FB4C 8025126C 0C051F32 */ jal set_window_properties /* 17FB50 80251270 00463021 */ addu $a2, $v0, $a2 /* 17FB54 80251274 86620012 */ lh $v0, 0x12($s3) /* 17FB58 80251278 14500003 */ bne $v0, $s0, .L80251288 /* 17FB5C 8025127C 24040009 */ addiu $a0, $zero, 0x9 /* 17FB60 80251280 080944A3 */ j .L8025128C /* 17FB64 80251284 24050001 */ addiu $a1, $zero, 0x1 .L80251288: /* 17FB68 80251288 24050008 */ addiu $a1, $zero, 0x8 .L8025128C: /* 17FB6C 8025128C 0C051F9F */ jal set_window_update /* 17FB70 80251290 00000000 */ nop .L80251294: /* 17FB74 80251294 8FBF003C */ lw $ra, 0x3C($sp) /* 17FB78 80251298 8FB40038 */ lw $s4, 0x38($sp) /* 17FB7C 8025129C 8FB30034 */ lw $s3, 0x34($sp) /* 17FB80 802512A0 8FB20030 */ lw $s2, 0x30($sp) /* 17FB84 802512A4 8FB1002C */ lw $s1, 0x2C($sp) /* 17FB88 802512A8 8FB00028 */ lw $s0, 0x28($sp) /* 17FB8C 802512AC 03E00008 */ jr $ra /* 17FB90 802512B0 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void btl_show_message_popup(void* data) { PopupMessage* popup = data; s32 numLines; s32 posX; s32 posY = 80; s32 width; s32 msgWidth; s32 height; switch (popup->messageIndex) { case BTL_MSG_MERLEE_ATK_UP: case BTL_MSG_MERLEE_DEF_UP: case BTL_MSG_MERLEE_EXP_UP: case BTL_MSG_MERLEE_DONE: case BTL_MSG_CANT_CHARGE: case BTL_MSG_ENEMY_MISSED: case BTL_MSG_PLAYER_DAZED: case BTL_MSG_PLAYER_ASLEEP: case BTL_MSG_PLAYER_FROZEN: case BTL_MSG_PLAYER_POISONED: case BTL_MSG_PLAYER_SHRUNK: case BTL_MSG_PLAYER_PARALYZED: case BTL_MSG_PLAYER_CHARGED: case BTL_MSG_PLAYER_TRANSPARENT: case BTL_MSG_ENEMY_DAZED: case BTL_MSG_ENEMY_ASLEEP: case BTL_MSG_ENEMY_FROZEN: case BTL_MSG_ENEMY_POISONED: case BTL_MSG_ENEMY_SHRUNK: case BTL_MSG_ENEMY_PARALYZED: case BTL_MSG_ENEMY_ELECTRIFIED: case BTL_MSG_ENEMY_CANT_MOVE: case BTL_MSG_STAR_POWER_RECHARGED: case BTL_MSG_STAR_POWER_MAXED: case BTL_MSG_STAR_POWER_FILLED: case BTL_MSG_PARTNER_INJURED: case BTL_MSG_CHARGE_GOOMBARIO: case BTL_MSG_CHARGE_GOOMBARIO_MORE: case BTL_MSG_WATER_BLOCK_BEGIN: case BTL_MSG_WATER_BLOCK_END: case BTL_MSG_CLOUD_NINE_BEGIN: case BTL_MSG_CLOUD_NINE_END: case BTL_MSG_TURBO_CHARGE_BEGIN: case BTL_MSG_TURBO_CHARGE_END: case BTL_MSG_CHILL_OUT_BEGIN: case BTL_MSG_UNUSED_CLOUD_NINE: case BTL_MSG_NO_JUMP_TARGET: case BTL_MSG_NO_HAMMER_TARGET: case BTL_MSG_NO_ITEM_TARGET: case BTL_MSG_46: case BTL_MSG_47: case BTL_MSG_CANT_SELECT_NOW: case BTL_MSG_CANT_SWITCH: case BTL_MSG_CANT_SWITCH_UNUSED: case BTL_MSG_CANT_MOVE_UNUSED: case BTL_MSG_CANT_SELECT_NOW_ALT: if (popup->needsInit) { s32 messageID; popup->needsInit = FALSE; messageID = bMessages[popup->messageIndex]; msgWidth = get_msg_width(messageID, 0) + 30; posX = 160 - (msgWidth / 2); width = msgWidth; numLines = get_msg_lines(messageID) - 1; height = bMsgHeights[numLines]; set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, func_80250818, popup, -1); set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_HAMMER_DISABLED_1: case BTL_MSG_HAMMER_DISABLED_2: case BTL_MSG_HAMMER_DISABLED_3: case BTL_MSG_JUMP_DISABLED_1: case BTL_MSG_JUMP_DISABLED_2: case BTL_MSG_JUMP_DISABLED_3: case BTL_MSG_ITEMS_DISABLED: if (popup->needsInit) { popup->needsInit = FALSE; msgWidth = get_msg_width(bMessages[popup->messageIndex], 0) + 55; posX = 160 - (msgWidth / 2); width = msgWidth; height = 40; set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, func_80250818, popup, -1); set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_CHARGE_HAMMER: case BTL_MSG_CHARGE_HAMMER_MORE: case BTL_MSG_CHARGE_JUMP: case BTL_MSG_CHARGE_JUMP_MORE: case BTL_MSG_ATTACK_UP: case BTL_MSG_DEFENCE_UP: case BTL_MSG_1F: case BTL_MSG_20: case BTL_MSG_ENEMY_TRANSPARENT: case BTL_MSG_ENEMY_CHARGED: if (popup->needsInit) { s32 messageID; popup->needsInit = FALSE; messageID = bMessages[popup->messageIndex]; set_message_value(D_8029F640, 0); msgWidth = get_msg_width(messageID, 0) + 31; posX = 160 - (msgWidth / 2); width = msgWidth; numLines = get_msg_lines(messageID) - 1; height = bMsgHeights[numLines]; set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, func_80250818, popup, -1); set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_CANT_MOVE: if (popup->needsInit) { s32 messageID; popup->needsInit = FALSE; messageID = bMessages[popup->messageIndex]; set_message_msg(bActorMessages[D_8029F640], 0); msgWidth = get_msg_width(messageID, 0) + 31; posX = 160 - (msgWidth / 2); width = msgWidth; numLines = get_msg_lines(messageID) - 1; height = bMsgHeights[numLines]; set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, func_80250818, popup, -1); set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_ACTION_TIP_00: case BTL_MSG_ACTION_TIP_01: case BTL_MSG_ACTION_TIP_02: case BTL_MSG_ACTION_TIP_03: case BTL_MSG_ACTION_TIP_04: case BTL_MSG_ACTION_TIP_05: case BTL_MSG_ACTION_TIP_06: case BTL_MSG_ACTION_TIP_07: case BTL_MSG_ACTION_TIP_08: case BTL_MSG_ACTION_TIP_09: case BTL_MSG_ACTION_TIP_0A: case BTL_MSG_ACTION_TIP_0B: case BTL_MSG_ACTION_TIP_0C: case BTL_MSG_ACTION_TIP_0D: case BTL_MSG_ACTION_TIP_0E: case BTL_MSG_ACTION_TIP_0F: case BTL_MSG_ACTION_TIP_10: case BTL_MSG_ACTION_TIP_11: case BTL_MSG_ACTION_TIP_12: case BTL_MSG_ACTION_TIP_13: case BTL_MSG_ACTION_TIP_14: if (popup->needsInit) { s32 messageID; popup->needsInit = FALSE; messageID = bMessages[popup->messageIndex]; msgWidth = get_msg_width(messageID, 0) + 31; posX = 160 - (msgWidth / 2); posY = 192; width = msgWidth; numLines = get_msg_lines(messageID) - 1; height = bMsgHeights[numLines]; if (popup->messageIndex == BTL_MSG_ACTION_TIP_0D) { posY = 120; D_8029F64C = 1; } D_8029F64E = posY; D_8029F650 = D_802835D8[numLines]; posY = D_8029F64E + D_8029F650; set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, func_80250818, popup, -1); if (popup->messageIndex == BTL_MSG_ACTION_TIP_0D) { set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); } else { set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_DARKENED); } } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_shattering_idle /* 103EBC 802E263C 27BDFF68 */ addiu $sp, $sp, -0x98 /* 103EC0 802E2640 F7B80078 */ sdc1 $f24, 0x78($sp) /* 103EC4 802E2644 4480C000 */ mtc1 $zero, $f24 /* 103EC8 802E2648 F7BC0088 */ sdc1 $f28, 0x88($sp) /* 103ECC 802E264C 3C01802F */ lui $at, %hi(D_802EB138) /* 103ED0 802E2650 D43CB138 */ ldc1 $f28, %lo(D_802EB138)($at) /* 103ED4 802E2654 AFB40050 */ sw $s4, 0x50($sp) /* 103ED8 802E2658 0000A02D */ daddu $s4, $zero, $zero /* 103EDC 802E265C F7BE0090 */ sdc1 $f30, 0x90($sp) /* 103EE0 802E2660 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 103EE4 802E2664 4481F000 */ mtc1 $at, $f30 /* 103EE8 802E2668 27A80020 */ addiu $t0, $sp, 0x20 /* 103EEC 802E266C AFBE0060 */ sw $fp, 0x60($sp) /* 103EF0 802E2670 27BE0024 */ addiu $fp, $sp, 0x24 /* 103EF4 802E2674 AFB7005C */ sw $s7, 0x5C($sp) /* 103EF8 802E2678 27B70028 */ addiu $s7, $sp, 0x28 /* 103EFC 802E267C AFB60058 */ sw $s6, 0x58($sp) /* 103F00 802E2680 27B6002C */ addiu $s6, $sp, 0x2C /* 103F04 802E2684 AFB50054 */ sw $s5, 0x54($sp) /* 103F08 802E2688 27B50030 */ addiu $s5, $sp, 0x30 /* 103F0C 802E268C AFBF0064 */ sw $ra, 0x64($sp) /* 103F10 802E2690 AFB3004C */ sw $s3, 0x4C($sp) /* 103F14 802E2694 AFB20048 */ sw $s2, 0x48($sp) /* 103F18 802E2698 AFB10044 */ sw $s1, 0x44($sp) /* 103F1C 802E269C AFB00040 */ sw $s0, 0x40($sp) /* 103F20 802E26A0 F7BA0080 */ sdc1 $f26, 0x80($sp) /* 103F24 802E26A4 F7B60070 */ sdc1 $f22, 0x70($sp) /* 103F28 802E26A8 F7B40068 */ sdc1 $f20, 0x68($sp) /* 103F2C 802E26AC AFA40098 */ sw $a0, 0x98($sp) /* 103F30 802E26B0 AFA80038 */ sw $t0, 0x38($sp) /* 103F34 802E26B4 8C920040 */ lw $s2, 0x40($a0) /* 103F38 802E26B8 4600C686 */ mov.s $f26, $f24 /* 103F3C 802E26BC 4600C586 */ mov.s $f22, $f24 /* 103F40 802E26C0 0240882D */ daddu $s1, $s2, $zero /* 103F44 802E26C4 0240802D */ daddu $s0, $s2, $zero /* 103F48 802E26C8 0240982D */ daddu $s3, $s2, $zero .L802E26CC: /* 103F4C 802E26CC 24020001 */ addiu $v0, $zero, 0x1 /* 103F50 802E26D0 82230040 */ lb $v1, 0x40($s1) /* 103F54 802E26D4 92240040 */ lbu $a0, 0x40($s1) /* 103F58 802E26D8 1062001D */ beq $v1, $v0, .L802E2750 /* 103F5C 802E26DC 28620002 */ slti $v0, $v1, 0x2 /* 103F60 802E26E0 50400005 */ beql $v0, $zero, .L802E26F8 /* 103F64 802E26E4 24020002 */ addiu $v0, $zero, 0x2 /* 103F68 802E26E8 10600009 */ beqz $v1, .L802E2710 /* 103F6C 802E26EC 00000000 */ nop /* 103F70 802E26F0 080B89F7 */ j .L802E27DC /* 103F74 802E26F4 00000000 */ nop .L802E26F8: /* 103F78 802E26F8 10620021 */ beq $v1, $v0, .L802E2780 /* 103F7C 802E26FC 24020003 */ addiu $v0, $zero, 0x3 /* 103F80 802E2700 1062002E */ beq $v1, $v0, .L802E27BC /* 103F84 802E2704 00000000 */ nop /* 103F88 802E2708 080B89F7 */ j .L802E27DC /* 103F8C 802E270C 00000000 */ nop .L802E2710: /* 103F90 802E2710 96620000 */ lhu $v0, 0x0($s3) /* 103F94 802E2714 3C014019 */ lui $at, (0x4019999A >> 16) /* 103F98 802E2718 3421999A */ ori $at, $at, (0x4019999A & 0xFFFF) /* 103F9C 802E271C 4481B000 */ mtc1 $at, $f22 /* 103FA0 802E2720 30420001 */ andi $v0, $v0, 0x1 /* 103FA4 802E2724 10400003 */ beqz $v0, .L802E2734 /* 103FA8 802E2728 00000000 */ nop /* 103FAC 802E272C 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 103FB0 802E2730 4481B000 */ mtc1 $at, $f22 .L802E2734: /* 103FB4 802E2734 82220059 */ lb $v0, 0x59($s1) /* 103FB8 802E2738 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 103FBC 802E273C 4481D000 */ mtc1 $at, $f26 /* 103FC0 802E2740 4482C000 */ mtc1 $v0, $f24 /* 103FC4 802E2744 00000000 */ nop /* 103FC8 802E2748 080B89F7 */ j .L802E27DC /* 103FCC 802E274C 4680C620 */ cvt.s.w $f24, $f24 .L802E2750: /* 103FD0 802E2750 3C013F99 */ lui $at, (0x3F99999A >> 16) /* 103FD4 802E2754 3421999A */ ori $at, $at, (0x3F99999A & 0xFFFF) /* 103FD8 802E2758 4481B000 */ mtc1 $at, $f22 /* 103FDC 802E275C 92220059 */ lbu $v0, 0x59($s1) /* 103FE0 802E2760 3C014040 */ lui $at, (0x40400000 >> 16) /* 103FE4 802E2764 4481D000 */ mtc1 $at, $f26 /* 103FE8 802E2768 00021600 */ sll $v0, $v0, 24 /* 103FEC 802E276C 00021683 */ sra $v0, $v0, 26 /* 103FF0 802E2770 4482C000 */ mtc1 $v0, $f24 /* 103FF4 802E2774 00000000 */ nop /* 103FF8 802E2778 080B89F7 */ j .L802E27DC /* 103FFC 802E277C 4680C620 */ cvt.s.w $f24, $f24 .L802E2780: /* 104000 802E2780 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 104004 802E2784 4481B000 */ mtc1 $at, $f22 /* 104008 802E2788 92220059 */ lbu $v0, 0x59($s1) /* 10400C 802E278C 3C014000 */ lui $at, (0x40000000 >> 16) /* 104010 802E2790 4481D000 */ mtc1 $at, $f26 /* 104014 802E2794 8643003C */ lh $v1, 0x3C($s2) /* 104018 802E2798 00021600 */ sll $v0, $v0, 24 /* 10401C 802E279C 00021683 */ sra $v0, $v0, 26 /* 104020 802E27A0 4482C000 */ mtc1 $v0, $f24 /* 104024 802E27A4 00000000 */ nop /* 104028 802E27A8 4680C620 */ cvt.s.w $f24, $f24 /* 10402C 802E27AC 1460000B */ bnez $v1, .L802E27DC /* 104030 802E27B0 24820001 */ addiu $v0, $a0, 0x1 /* 104034 802E27B4 080B89F7 */ j .L802E27DC /* 104038 802E27B8 A2220040 */ sb $v0, 0x40($s1) .L802E27BC: /* 10403C 802E27BC C6000124 */ lwc1 $f0, 0x124($s0) /* 104040 802E27C0 3C01802F */ lui $at, %hi(D_802EB140) /* 104044 802E27C4 D422B140 */ ldc1 $f2, %lo(D_802EB140)($at) /* 104048 802E27C8 46000021 */ cvt.d.s $f0, $f0 /* 10404C 802E27CC 46220001 */ sub.d $f0, $f0, $f2 /* 104050 802E27D0 46200020 */ cvt.s.d $f0, $f0 /* 104054 802E27D4 080B8ABF */ j .L802E2AFC /* 104058 802E27D8 E6000124 */ swc1 $f0, 0x124($s0) .L802E27DC: /* 10405C 802E27DC C60001EC */ lwc1 $f0, 0x1EC($s0) /* 104060 802E27E0 3C01802F */ lui $at, %hi(D_802EB148) /* 104064 802E27E4 D422B148 */ ldc1 $f2, %lo(D_802EB148)($at) /* 104068 802E27E8 46000021 */ cvt.d.s $f0, $f0 /* 10406C 802E27EC 46220001 */ sub.d $f0, $f0, $f2 /* 104070 802E27F0 3C01802F */ lui $at, %hi(D_802EB150) /* 104074 802E27F4 D424B150 */ ldc1 $f4, %lo(D_802EB150)($at) /* 104078 802E27F8 46200020 */ cvt.s.d $f0, $f0 /* 10407C 802E27FC 460000A1 */ cvt.d.s $f2, $f0 /* 104080 802E2800 4624103C */ c.lt.d $f2, $f4 /* 104084 802E2804 00000000 */ nop /* 104088 802E2808 45000006 */ bc1f .L802E2824 /* 10408C 802E280C E60001EC */ swc1 $f0, 0x1EC($s0) /* 104090 802E2810 3C01C143 */ lui $at, (0xC1433333 >> 16) /* 104094 802E2814 34213333 */ ori $at, $at, (0xC1433333 & 0xFFFF) /* 104098 802E2818 44810000 */ mtc1 $at, $f0 /* 10409C 802E281C 00000000 */ nop /* 1040A0 802E2820 E60001EC */ swc1 $f0, 0x1EC($s0) .L802E2824: /* 1040A4 802E2824 C6000124 */ lwc1 $f0, 0x124($s0) /* 1040A8 802E2828 C60201EC */ lwc1 $f2, 0x1EC($s0) /* 1040AC 802E282C 46020000 */ add.s $f0, $f0, $f2 /* 1040B0 802E2830 E6000124 */ swc1 $f0, 0x124($s0) /* 1040B4 802E2834 92220072 */ lbu $v0, 0x72($s1) /* 1040B8 802E2838 4482A000 */ mtc1 $v0, $f20 /* 1040BC 802E283C 00000000 */ nop /* 1040C0 802E2840 4680A521 */ cvt.d.w $f20, $f20 /* 1040C4 802E2844 463CA502 */ mul.d $f20, $f20, $f28 /* 1040C8 802E2848 00000000 */ nop /* 1040CC 802E284C 3C013F70 */ lui $at, (0x3F700000 >> 16) /* 1040D0 802E2850 44814800 */ mtc1 $at, $f9 /* 1040D4 802E2854 44804000 */ mtc1 $zero, $f8 /* 1040D8 802E2858 00000000 */ nop /* 1040DC 802E285C 4628A502 */ mul.d $f20, $f20, $f8 /* 1040E0 802E2860 00000000 */ nop /* 1040E4 802E2864 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 1040E8 802E2868 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 1040EC 802E286C 44816000 */ mtc1 $at, $f12 /* 1040F0 802E2870 4620A520 */ cvt.s.d $f20, $f20 /* 1040F4 802E2874 460CA302 */ mul.s $f12, $f20, $f12 /* 1040F8 802E2878 00000000 */ nop /* 1040FC 802E287C 03C0302D */ daddu $a2, $fp, $zero /* 104100 802E2880 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 104104 802E2884 44810000 */ mtc1 $at, $f0 /* 104108 802E2888 8FA50038 */ lw $a1, 0x38($sp) /* 10410C 802E288C 0C00A82D */ jal sin_cos_rad /* 104110 802E2890 46006303 */ div.s $f12, $f12, $f0 /* 104114 802E2894 C7A00020 */ lwc1 $f0, 0x20($sp) /* 104118 802E2898 4600B002 */ mul.s $f0, $f22, $f0 /* 10411C 802E289C 00000000 */ nop /* 104120 802E28A0 C7A20024 */ lwc1 $f2, 0x24($sp) /* 104124 802E28A4 4602B082 */ mul.s $f2, $f22, $f2 /* 104128 802E28A8 00000000 */ nop /* 10412C 802E28AC C60400C0 */ lwc1 $f4, 0xC0($s0) /* 104130 802E28B0 46002100 */ add.s $f4, $f4, $f0 /* 104134 802E28B4 C6000188 */ lwc1 $f0, 0x188($s0) /* 104138 802E28B8 46020000 */ add.s $f0, $f0, $f2 /* 10413C 802E28BC 3C040004 */ lui $a0, (0x40000 >> 16) /* 104140 802E28C0 02E0282D */ daddu $a1, $s7, $zero /* 104144 802E28C4 E6000188 */ swc1 $f0, 0x188($s0) /* 104148 802E28C8 C6000124 */ lwc1 $f0, 0x124($s0) /* 10414C 802E28CC C6020188 */ lwc1 $f2, 0x188($s0) /* 104150 802E28D0 02C0302D */ daddu $a2, $s6, $zero /* 104154 802E28D4 E60400C0 */ swc1 $f4, 0xC0($s0) /* 104158 802E28D8 E7A40028 */ swc1 $f4, 0x28($sp) /* 10415C 802E28DC E7A0002C */ swc1 $f0, 0x2C($sp) /* 104160 802E28E0 E7A20030 */ swc1 $f2, 0x30($sp) /* 104164 802E28E4 3C014100 */ lui $at, (0x41000000 >> 16) /* 104168 802E28E8 44814000 */ mtc1 $at, $f8 /* 10416C 802E28EC 02A0382D */ daddu $a3, $s5, $zero /* 104170 802E28F0 E7B60010 */ swc1 $f22, 0x10($sp) /* 104174 802E28F4 E7B40014 */ swc1 $f20, 0x14($sp) /* 104178 802E28F8 E7A80018 */ swc1 $f8, 0x18($sp) /* 10417C 802E28FC 0C0376B9 */ jal npc_test_move_taller_with_slipping /* 104180 802E2900 E7A8001C */ swc1 $f8, 0x1C($sp) /* 104184 802E2904 1040002D */ beqz $v0, .L802E29BC /* 104188 802E2908 03C0302D */ daddu $a2, $fp, $zero /* 10418C 802E290C C7A00028 */ lwc1 $f0, 0x28($sp) /* 104190 802E2910 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 104194 802E2914 C7A40030 */ lwc1 $f4, 0x30($sp) /* 104198 802E2918 E60000C0 */ swc1 $f0, 0xC0($s0) /* 10419C 802E291C E6020124 */ swc1 $f2, 0x124($s0) /* 1041A0 802E2920 E6040188 */ swc1 $f4, 0x188($s0) /* 1041A4 802E2924 92220072 */ lbu $v0, 0x72($s1) /* 1041A8 802E2928 24420080 */ addiu $v0, $v0, 0x80 /* 1041AC 802E292C A2220072 */ sb $v0, 0x72($s1) /* 1041B0 802E2930 304200FF */ andi $v0, $v0, 0xFF /* 1041B4 802E2934 44826000 */ mtc1 $v0, $f12 /* 1041B8 802E2938 00000000 */ nop /* 1041BC 802E293C 46806321 */ cvt.d.w $f12, $f12 /* 1041C0 802E2940 463C6302 */ mul.d $f12, $f12, $f28 /* 1041C4 802E2944 00000000 */ nop /* 1041C8 802E2948 3C013F70 */ lui $at, (0x3F700000 >> 16) /* 1041CC 802E294C 44814800 */ mtc1 $at, $f9 /* 1041D0 802E2950 44804000 */ mtc1 $zero, $f8 /* 1041D4 802E2954 00000000 */ nop /* 1041D8 802E2958 46286302 */ mul.d $f12, $f12, $f8 /* 1041DC 802E295C 00000000 */ nop /* 1041E0 802E2960 3C01802F */ lui $at, %hi(D_802EB158) /* 1041E4 802E2964 D420B158 */ ldc1 $f0, %lo(D_802EB158)($at) /* 1041E8 802E2968 46206302 */ mul.d $f12, $f12, $f0 /* 1041EC 802E296C 00000000 */ nop /* 1041F0 802E2970 8FA50038 */ lw $a1, 0x38($sp) /* 1041F4 802E2974 463C6303 */ div.d $f12, $f12, $f28 /* 1041F8 802E2978 0C00A82D */ jal sin_cos_rad /* 1041FC 802E297C 46206320 */ cvt.s.d $f12, $f12 /* 104200 802E2980 C7A00020 */ lwc1 $f0, 0x20($sp) /* 104204 802E2984 3C014100 */ lui $at, (0x41000000 >> 16) /* 104208 802E2988 4481B000 */ mtc1 $at, $f22 /* 10420C 802E298C 00000000 */ nop /* 104210 802E2990 46160002 */ mul.s $f0, $f0, $f22 /* 104214 802E2994 00000000 */ nop /* 104218 802E2998 C7A40024 */ lwc1 $f4, 0x24($sp) /* 10421C 802E299C 46162102 */ mul.s $f4, $f4, $f22 /* 104220 802E29A0 00000000 */ nop /* 104224 802E29A4 C60200C0 */ lwc1 $f2, 0xC0($s0) /* 104228 802E29A8 46001080 */ add.s $f2, $f2, $f0 /* 10422C 802E29AC C6000188 */ lwc1 $f0, 0x188($s0) /* 104230 802E29B0 46040000 */ add.s $f0, $f0, $f4 /* 104234 802E29B4 E60200C0 */ swc1 $f2, 0xC0($s0) /* 104238 802E29B8 E6000188 */ swc1 $f0, 0x188($s0) .L802E29BC: /* 10423C 802E29BC 3C040004 */ lui $a0, (0x40000 >> 16) /* 104240 802E29C0 02E0282D */ daddu $a1, $s7, $zero /* 104244 802E29C4 02C0302D */ daddu $a2, $s6, $zero /* 104248 802E29C8 02A0382D */ daddu $a3, $s5, $zero /* 10424C 802E29CC 27A20034 */ addiu $v0, $sp, 0x34 /* 104250 802E29D0 C60200C0 */ lwc1 $f2, 0xC0($s0) /* 104254 802E29D4 C6040124 */ lwc1 $f4, 0x124($s0) /* 104258 802E29D8 C60001EC */ lwc1 $f0, 0x1EC($s0) /* 10425C 802E29DC C6060188 */ lwc1 $f6, 0x188($s0) /* 104260 802E29E0 46000005 */ abs.s $f0, $f0 /* 104264 802E29E4 E7A20028 */ swc1 $f2, 0x28($sp) /* 104268 802E29E8 E7A4002C */ swc1 $f4, 0x2C($sp) /* 10426C 802E29EC E7A60030 */ swc1 $f6, 0x30($sp) /* 104270 802E29F0 E7A00034 */ swc1 $f0, 0x34($sp) /* 104274 802E29F4 0C0372DF */ jal npc_raycast_down_sides /* 104278 802E29F8 AFA20010 */ sw $v0, 0x10($sp) /* 10427C 802E29FC 1440000B */ bnez $v0, .L802E2A2C /* 104280 802E2A00 00000000 */ nop /* 104284 802E2A04 C6400038 */ lwc1 $f0, 0x38($s2) /* 104288 802E2A08 3C014348 */ lui $at, (0x43480000 >> 16) /* 10428C 802E2A0C 44811000 */ mtc1 $at, $f2 /* 104290 802E2A10 00000000 */ nop /* 104294 802E2A14 46020001 */ sub.s $f0, $f0, $f2 /* 104298 802E2A18 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 10429C 802E2A1C 4600103C */ c.lt.s $f2, $f0 /* 1042A0 802E2A20 00000000 */ nop /* 1042A4 802E2A24 4500000F */ bc1f .L802E2A64 /* 1042A8 802E2A28 00000000 */ nop .L802E2A2C: /* 1042AC 802E2A2C 92220040 */ lbu $v0, 0x40($s1) /* 1042B0 802E2A30 24420001 */ addiu $v0, $v0, 0x1 /* 1042B4 802E2A34 A2220040 */ sb $v0, 0x40($s1) /* 1042B8 802E2A38 C60201EC */ lwc1 $f2, 0x1EC($s0) /* 1042BC 802E2A3C 3C013F99 */ lui $at, (0x3F99999A >> 16) /* 1042C0 802E2A40 3421999A */ ori $at, $at, (0x3F99999A & 0xFFFF) /* 1042C4 802E2A44 44810000 */ mtc1 $at, $f0 /* 1042C8 802E2A48 46001085 */ abs.s $f2, $f2 /* 1042CC 802E2A4C 46001082 */ mul.s $f2, $f2, $f0 /* 1042D0 802E2A50 00000000 */ nop /* 1042D4 802E2A54 C7A0002C */ lwc1 $f0, 0x2C($sp) /* 1042D8 802E2A58 46020000 */ add.s $f0, $f0, $f2 /* 1042DC 802E2A5C E61A01EC */ swc1 $f26, 0x1EC($s0) /* 1042E0 802E2A60 E6000124 */ swc1 $f0, 0x124($s0) .L802E2A64: /* 1042E4 802E2A64 9222008B */ lbu $v0, 0x8B($s1) /* 1042E8 802E2A68 44820000 */ mtc1 $v0, $f0 /* 1042EC 802E2A6C 00000000 */ nop /* 1042F0 802E2A70 46800020 */ cvt.s.w $f0, $f0 /* 1042F4 802E2A74 46180000 */ add.s $f0, $f0, $f24 /* 1042F8 802E2A78 4600F03E */ c.le.s $f30, $f0 /* 1042FC 802E2A7C 00000000 */ nop glabel func_802E2A80 /* 104300 802E2A80 45010005 */ bc1t .L802E2A98 /* 104304 802E2A84 2623008B */ addiu $v1, $s1, 0x8B /* 104308 802E2A88 4600020D */ trunc.w.s $f8, $f0 /* 10430C 802E2A8C 44024000 */ mfc1 $v0, $f8 /* 104310 802E2A90 080B8AAC */ j .L802E2AB0 /* 104314 802E2A94 A0620000 */ sb $v0, 0x0($v1) .L802E2A98: /* 104318 802E2A98 461E0001 */ sub.s $f0, $f0, $f30 /* 10431C 802E2A9C 4600020D */ trunc.w.s $f8, $f0 /* 104320 802E2AA0 44024000 */ mfc1 $v0, $f8 /* 104324 802E2AA4 3C088000 */ lui $t0, (0x80000000 >> 16) /* 104328 802E2AA8 00481025 */ or $v0, $v0, $t0 /* 10432C 802E2AAC A0620000 */ sb $v0, 0x0($v1) .L802E2AB0: /* 104330 802E2AB0 922200A4 */ lbu $v0, 0xA4($s1) /* 104334 802E2AB4 44820000 */ mtc1 $v0, $f0 /* 104338 802E2AB8 00000000 */ nop /* 10433C 802E2ABC 46800020 */ cvt.s.w $f0, $f0 /* 104340 802E2AC0 46180001 */ sub.s $f0, $f0, $f24 /* 104344 802E2AC4 4600F03E */ c.le.s $f30, $f0 /* 104348 802E2AC8 00000000 */ nop /* 10434C 802E2ACC 45010005 */ bc1t .L802E2AE4 /* 104350 802E2AD0 262300A4 */ addiu $v1, $s1, 0xA4 /* 104354 802E2AD4 4600020D */ trunc.w.s $f8, $f0 /* 104358 802E2AD8 44024000 */ mfc1 $v0, $f8 /* 10435C 802E2ADC 080B8ABF */ j .L802E2AFC /* 104360 802E2AE0 A0620000 */ sb $v0, 0x0($v1) .L802E2AE4: /* 104364 802E2AE4 461E0001 */ sub.s $f0, $f0, $f30 /* 104368 802E2AE8 4600020D */ trunc.w.s $f8, $f0 /* 10436C 802E2AEC 44024000 */ mfc1 $v0, $f8 /* 104370 802E2AF0 3C088000 */ lui $t0, (0x80000000 >> 16) /* 104374 802E2AF4 00481025 */ or $v0, $v0, $t0 /* 104378 802E2AF8 A0620000 */ sb $v0, 0x0($v1) .L802E2AFC: /* 10437C 802E2AFC 26310001 */ addiu $s1, $s1, 0x1 /* 104380 802E2B00 26100004 */ addiu $s0, $s0, 0x4 /* 104384 802E2B04 26940001 */ addiu $s4, $s4, 0x1 /* 104388 802E2B08 2A820018 */ slti $v0, $s4, 0x18 /* 10438C 802E2B0C 1440FEEF */ bnez $v0, .L802E26CC /* 104390 802E2B10 26730002 */ addiu $s3, $s3, 0x2 /* 104394 802E2B14 9642003E */ lhu $v0, 0x3E($s2) /* 104398 802E2B18 24420001 */ addiu $v0, $v0, 0x1 /* 10439C 802E2B1C A642003E */ sh $v0, 0x3E($s2) /* 1043A0 802E2B20 00021400 */ sll $v0, $v0, 16 /* 1043A4 802E2B24 00021403 */ sra $v0, $v0, 16 /* 1043A8 802E2B28 2842000A */ slti $v0, $v0, 0xA /* 1043AC 802E2B2C 1440000B */ bnez $v0, .L802E2B5C /* 1043B0 802E2B30 2403000A */ addiu $v1, $zero, 0xA /* 1043B4 802E2B34 9642003C */ lhu $v0, 0x3C($s2) /* 1043B8 802E2B38 A643003E */ sh $v1, 0x3E($s2) /* 1043BC 802E2B3C 2442FFF8 */ addiu $v0, $v0, -0x8 /* 1043C0 802E2B40 A642003C */ sh $v0, 0x3C($s2) /* 1043C4 802E2B44 00021400 */ sll $v0, $v0, 16 /* 1043C8 802E2B48 1C400004 */ bgtz $v0, .L802E2B5C /* 1043CC 802E2B4C 00000000 */ nop /* 1043D0 802E2B50 A640003C */ sh $zero, 0x3C($s2) /* 1043D4 802E2B54 0C043F5A */ jal exec_entity_commandlist /* 1043D8 802E2B58 8FA40098 */ lw $a0, 0x98($sp) .L802E2B5C: /* 1043DC 802E2B5C 8FBF0064 */ lw $ra, 0x64($sp) /* 1043E0 802E2B60 8FBE0060 */ lw $fp, 0x60($sp) /* 1043E4 802E2B64 8FB7005C */ lw $s7, 0x5C($sp) /* 1043E8 802E2B68 8FB60058 */ lw $s6, 0x58($sp) /* 1043EC 802E2B6C 8FB50054 */ lw $s5, 0x54($sp) /* 1043F0 802E2B70 8FB40050 */ lw $s4, 0x50($sp) glabel func_802E2B74 /* 1043F4 802E2B74 8FB3004C */ lw $s3, 0x4C($sp) /* 1043F8 802E2B78 8FB20048 */ lw $s2, 0x48($sp) /* 1043FC 802E2B7C 8FB10044 */ lw $s1, 0x44($sp) /* 104400 802E2B80 8FB00040 */ lw $s0, 0x40($sp) /* 104404 802E2B84 D7BE0090 */ ldc1 $f30, 0x90($sp) /* 104408 802E2B88 D7BC0088 */ ldc1 $f28, 0x88($sp) /* 10440C 802E2B8C D7BA0080 */ ldc1 $f26, 0x80($sp) /* 104410 802E2B90 D7B80078 */ ldc1 $f24, 0x78($sp) /* 104414 802E2B94 D7B60070 */ ldc1 $f22, 0x70($sp) /* 104418 802E2B98 D7B40068 */ ldc1 $f20, 0x68($sp) /* 10441C 802E2B9C 03E00008 */ jr $ra /* 104420 802E2BA0 27BD0098 */ addiu $sp, $sp, 0x98 ### DECOMPILED C INSTRUCTIONS: void entity_shattering_idle(Entity* entity) { ShatteringBlockData* data = entity->dataBuf.shatteringBlock; f32 rotSpeed = 0.0f; f32 reboundSpeed = 0.0f; f32 lateralSpeed = 0.0f; f32 angle; s32 i; f32 sinTheta; f32 cosTheta; f32 hitX, hitY, hitZ, hitDepth; for (i = 0; i < 24; i++) { switch (data->fragmentRebounds[i]) { case 0: if (data->fragmentFlags[i] & 1) { lateralSpeed = 1.5f; } else { lateralSpeed = 2.4f; } reboundSpeed = 6.0f; rotSpeed = data->fragmentRotSpeed[i]; break; case 1: lateralSpeed = 1.2f; reboundSpeed = 3.0f; rotSpeed = data->fragmentRotSpeed[i] >> 2; break; case 2: lateralSpeed = 1.0f; reboundSpeed = 2.0f; rotSpeed = data->fragmentRotSpeed[i] >> 2; if (data->alpha == 0) { data->fragmentRebounds[i]++; } break; case 3: data->fragmentPosY[i] -= 0.3; continue; } data->fragmentFallSpeed[i] -= 1.2; if (data->fragmentFallSpeed[i] < -12.2) { data->fragmentFallSpeed[i] = -12.2f; } data->fragmentPosY[i] += data->fragmentFallSpeed[i]; angle = data->fragmentMoveAngle[i] * 360.0 / 256; sin_cos_rad(DEG_TO_RAD(angle), &sinTheta, &cosTheta); data->fragmentPosX[i] += lateralSpeed * sinTheta; data->fragmentPosZ[i] += lateralSpeed * cosTheta; 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, angle, 8.0f, 8.0f)) { data->fragmentPosX[i] = hitX; data->fragmentPosY[i] = hitY; data->fragmentPosZ[i] = hitZ; data->fragmentMoveAngle[i] += 0x80; // inverse yaw sin_cos_rad(DEG_TO_RAD(data->fragmentMoveAngle[i] * 360.0 / 256), &sinTheta, &cosTheta); lateralSpeed = 8.0f; data->fragmentPosX[i] += lateralSpeed * sinTheta; data->fragmentPosZ[i] += lateralSpeed * cosTheta; } hitX = data->fragmentPosX[i]; hitY = data->fragmentPosY[i]; hitZ = data->fragmentPosZ[i]; hitDepth = fabsf(data->fragmentFallSpeed[i]); if (npc_raycast_down_sides(COLLISION_IGNORE_ENTITIES, &hitX, &hitY, &hitZ, &hitDepth) || hitY < data->originalPosY - 200.0f) { data->fragmentRebounds[i]++; data->fragmentPosY[i] = hitY + fabsf(data->fragmentFallSpeed[i]) * 1.2f; data->fragmentFallSpeed[i] = reboundSpeed; } data->fragmentRotX[i] += rotSpeed; data->fragmentRotY[i] -= rotSpeed; } data->fadeOutCounter++; if (data->fadeOutCounter >= 10) { data->fadeOutCounter = 10; data->alpha -= 8; if (data->alpha <= 0) { data->alpha = 0; exec_entity_commandlist(entity); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_hud_elements_frontUI /* D8E1C 8014271C 27BDFAB0 */ addiu $sp, $sp, -0x550 /* D8E20 80142720 AFBE0548 */ sw $fp, 0x548($sp) /* D8E24 80142724 0000F02D */ daddu $fp, $zero, $zero /* D8E28 80142728 AFB70544 */ sw $s7, 0x544($sp) /* D8E2C 8014272C 03C0B82D */ daddu $s7, $fp, $zero /* D8E30 80142730 3C071021 */ lui $a3, (0x10210080 >> 16) /* D8E34 80142734 34E70080 */ ori $a3, $a3, (0x10210080 & 0xFFFF) /* D8E38 80142738 27A60028 */ addiu $a2, $sp, 0x28 /* D8E3C 8014273C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* D8E40 80142740 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* D8E44 80142744 AFBF054C */ sw $ra, 0x54C($sp) /* D8E48 80142748 AFB60540 */ sw $s6, 0x540($sp) /* D8E4C 8014274C AFB5053C */ sw $s5, 0x53C($sp) /* D8E50 80142750 AFB40538 */ sw $s4, 0x538($sp) /* D8E54 80142754 AFB30534 */ sw $s3, 0x534($sp) /* D8E58 80142758 AFB20530 */ sw $s2, 0x530($sp) /* D8E5C 8014275C AFB1052C */ sw $s1, 0x52C($sp) /* D8E60 80142760 AFB00528 */ sw $s0, 0x528($sp) /* D8E64 80142764 8C620000 */ lw $v0, 0x0($v1) /* D8E68 80142768 3C058015 */ lui $a1, %hi(gHudElements) /* D8E6C 8014276C 8CA57960 */ lw $a1, %lo(gHudElements)($a1) /* D8E70 80142770 0040202D */ daddu $a0, $v0, $zero /* D8E74 80142774 24420008 */ addiu $v0, $v0, 0x8 /* D8E78 80142778 AC620000 */ sw $v0, 0x0($v1) /* D8E7C 8014277C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* D8E80 80142780 AC820000 */ sw $v0, 0x0($a0) /* D8E84 80142784 3C020015 */ lui $v0, %hi(D_14F0A0) /* D8E88 80142788 2442F0A0 */ addiu $v0, $v0, %lo(D_14F0A0) /* D8E8C 8014278C AC820004 */ sw $v0, 0x4($a0) .L80142790: /* D8E90 80142790 8CB00000 */ lw $s0, 0x0($a1) /* D8E94 80142794 52000014 */ beql $s0, $zero, .L801427E8 /* D8E98 80142798 26F70001 */ addiu $s7, $s7, 0x1 /* D8E9C 8014279C 8E030000 */ lw $v1, 0x0($s0) /* D8EA0 801427A0 50600011 */ beql $v1, $zero, .L801427E8 /* D8EA4 801427A4 26F70001 */ addiu $s7, $s7, 0x1 /* D8EA8 801427A8 30620002 */ andi $v0, $v1, 0x2 /* D8EAC 801427AC 5440000E */ bnel $v0, $zero, .L801427E8 /* D8EB0 801427B0 26F70001 */ addiu $s7, $s7, 0x1 /* D8EB4 801427B4 00671024 */ and $v0, $v1, $a3 /* D8EB8 801427B8 5440000B */ bnel $v0, $zero, .L801427E8 /* D8EBC 801427BC 26F70001 */ addiu $s7, $s7, 0x1 /* D8EC0 801427C0 30620040 */ andi $v0, $v1, 0x40 /* D8EC4 801427C4 50400008 */ beql $v0, $zero, .L801427E8 /* D8EC8 801427C8 26F70001 */ addiu $s7, $s7, 0x1 /* D8ECC 801427CC 82020045 */ lb $v0, 0x45($s0) /* D8ED0 801427D0 04420005 */ bltzl $v0, .L801427E8 /* D8ED4 801427D4 26F70001 */ addiu $s7, $s7, 0x1 /* D8ED8 801427D8 ACD70000 */ sw $s7, 0x0($a2) /* D8EDC 801427DC 24C60004 */ addiu $a2, $a2, 0x4 /* D8EE0 801427E0 27DE0001 */ addiu $fp, $fp, 0x1 /* D8EE4 801427E4 26F70001 */ addiu $s7, $s7, 0x1 .L801427E8: /* D8EE8 801427E8 2AE20140 */ slti $v0, $s7, 0x140 /* D8EEC 801427EC 1440FFE8 */ bnez $v0, .L80142790 /* D8EF0 801427F0 24A50004 */ addiu $a1, $a1, 0x4 /* D8EF4 801427F4 27C2FFFF */ addiu $v0, $fp, -0x1 /* D8EF8 801427F8 18400024 */ blez $v0, .L8014288C /* D8EFC 801427FC 0000B82D */ daddu $s7, $zero, $zero /* D8F00 80142800 3C0D8015 */ lui $t5, %hi(gHudElements) /* D8F04 80142804 25AD7960 */ addiu $t5, $t5, %lo(gHudElements) /* D8F08 80142808 27AC0028 */ addiu $t4, $sp, 0x28 /* D8F0C 8014280C 0180582D */ daddu $t3, $t4, $zero .L80142810: /* D8F10 80142810 26E80001 */ addiu $t0, $s7, 0x1 /* D8F14 80142814 011E102A */ slt $v0, $t0, $fp /* D8F18 80142818 50400018 */ beql $v0, $zero, .L8014287C /* D8F1C 8014281C 26F70001 */ addiu $s7, $s7, 0x1 /* D8F20 80142820 0160502D */ daddu $t2, $t3, $zero /* D8F24 80142824 8DA90000 */ lw $t1, 0x0($t5) /* D8F28 80142828 00081080 */ sll $v0, $t0, 2 /* D8F2C 8014282C 004C3021 */ addu $a2, $v0, $t4 .L80142830: /* D8F30 80142830 8D470000 */ lw $a3, 0x0($t2) /* D8F34 80142834 8CC50000 */ lw $a1, 0x0($a2) /* D8F38 80142838 00071880 */ sll $v1, $a3, 2 /* D8F3C 8014283C 00691821 */ addu $v1, $v1, $t1 /* D8F40 80142840 00051080 */ sll $v0, $a1, 2 /* D8F44 80142844 00491021 */ addu $v0, $v0, $t1 /* D8F48 80142848 8C630000 */ lw $v1, 0x0($v1) /* D8F4C 8014284C 8C440000 */ lw $a0, 0x0($v0) /* D8F50 80142850 80620044 */ lb $v0, 0x44($v1) /* D8F54 80142854 80830044 */ lb $v1, 0x44($a0) /* D8F58 80142858 0043102A */ slt $v0, $v0, $v1 /* D8F5C 8014285C 10400003 */ beqz $v0, .L8014286C /* D8F60 80142860 25080001 */ addiu $t0, $t0, 0x1 /* D8F64 80142864 AD450000 */ sw $a1, 0x0($t2) /* D8F68 80142868 ACC70000 */ sw $a3, 0x0($a2) .L8014286C: /* D8F6C 8014286C 011E102A */ slt $v0, $t0, $fp /* D8F70 80142870 1440FFEF */ bnez $v0, .L80142830 /* D8F74 80142874 24C60004 */ addiu $a2, $a2, 0x4 /* D8F78 80142878 26F70001 */ addiu $s7, $s7, 0x1 .L8014287C: /* D8F7C 8014287C 27C2FFFF */ addiu $v0, $fp, -0x1 /* D8F80 80142880 02E2102A */ slt $v0, $s7, $v0 /* D8F84 80142884 1440FFE2 */ bnez $v0, .L80142810 /* D8F88 80142888 256B0004 */ addiu $t3, $t3, 0x4 .L8014288C: /* D8F8C 8014288C 1BC000CF */ blez $fp, .L80142BCC /* D8F90 80142890 0000B82D */ daddu $s7, $zero, $zero /* D8F94 80142894 00171080 */ sll $v0, $s7, 2 .L80142898: /* D8F98 80142898 03A21021 */ addu $v0, $sp, $v0 /* D8F9C 8014289C 8C420028 */ lw $v0, 0x28($v0) /* D8FA0 801428A0 3C038015 */ lui $v1, %hi(gHudElements) /* D8FA4 801428A4 8C637960 */ lw $v1, %lo(gHudElements)($v1) /* D8FA8 801428A8 00021080 */ sll $v0, $v0, 2 /* D8FAC 801428AC 00431021 */ addu $v0, $v0, $v1 /* D8FB0 801428B0 8C500000 */ lw $s0, 0x0($v0) /* D8FB4 801428B4 8E030000 */ lw $v1, 0x0($s0) /* D8FB8 801428B8 30620100 */ andi $v0, $v1, 0x100 /* D8FBC 801428BC 1440005B */ bnez $v0, .L80142A2C /* D8FC0 801428C0 3C0E0010 */ lui $t6, (0x100000 >> 16) /* D8FC4 801428C4 006E1024 */ and $v0, $v1, $t6 /* D8FC8 801428C8 1440000B */ bnez $v0, .L801428F8 /* D8FCC 801428CC 00000000 */ nop /* D8FD0 801428D0 82030046 */ lb $v1, 0x46($s0) /* D8FD4 801428D4 3C0E8015 */ lui $t6, %hi(gHudElementSizes) /* D8FD8 801428D8 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) /* D8FDC 801428DC 00031040 */ sll $v0, $v1, 1 /* D8FE0 801428E0 00431021 */ addu $v0, $v0, $v1 /* D8FE4 801428E4 00021040 */ sll $v0, $v0, 1 /* D8FE8 801428E8 004E1021 */ addu $v0, $v0, $t6 /* D8FEC 801428EC 84560000 */ lh $s6, 0x0($v0) /* D8FF0 801428F0 08050A40 */ j .L80142900 /* D8FF4 801428F4 84550002 */ lh $s5, 0x2($v0) .L801428F8: /* D8FF8 801428F8 9216004E */ lbu $s6, 0x4E($s0) /* D8FFC 801428FC 9215004F */ lbu $s5, 0x4F($s0) .L80142900: /* D9000 80142900 8E030000 */ lw $v1, 0x0($s0) /* D9004 80142904 30620010 */ andi $v0, $v1, 0x10 /* D9008 80142908 14400013 */ bnez $v0, .L80142958 /* D900C 8014290C 3C0E0010 */ lui $t6, (0x100000 >> 16) /* D9010 80142910 006E1024 */ and $v0, $v1, $t6 /* D9014 80142914 1440000C */ bnez $v0, .L80142948 /* D9018 80142918 00000000 */ nop /* D901C 8014291C 82030045 */ lb $v1, 0x45($s0) /* D9020 80142920 3C0E8015 */ lui $t6, %hi(gHudElementSizes) /* D9024 80142924 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) /* D9028 80142928 00031040 */ sll $v0, $v1, 1 /* D902C 8014292C 00431021 */ addu $v0, $v0, $v1 /* D9030 80142930 00021040 */ sll $v0, $v0, 1 /* D9034 80142934 004E1021 */ addu $v0, $v0, $t6 /* D9038 80142938 84510000 */ lh $s1, 0x0($v0) /* D903C 8014293C 84520002 */ lh $s2, 0x2($v0) /* D9040 80142940 08050A59 */ j .L80142964 /* D9044 80142944 00111023 */ negu $v0, $s1 .L80142948: /* D9048 80142948 92110050 */ lbu $s1, 0x50($s0) /* D904C 8014294C 92120051 */ lbu $s2, 0x51($s0) /* D9050 80142950 08050A59 */ j .L80142964 /* D9054 80142954 00111023 */ negu $v0, $s1 .L80142958: /* D9058 80142958 92110048 */ lbu $s1, 0x48($s0) /* D905C 8014295C 92120049 */ lbu $s2, 0x49($s0) /* D9060 80142960 00111023 */ negu $v0, $s1 .L80142964: /* D9064 80142964 00021FC2 */ srl $v1, $v0, 31 /* D9068 80142968 00431021 */ addu $v0, $v0, $v1 /* D906C 8014296C 00029843 */ sra $s3, $v0, 1 /* D9070 80142970 00121023 */ negu $v0, $s2 /* D9074 80142974 00021FC2 */ srl $v1, $v0, 31 /* D9078 80142978 00431021 */ addu $v0, $v0, $v1 /* D907C 8014297C 0002A043 */ sra $s4, $v0, 1 /* D9080 80142980 8E030000 */ lw $v1, 0x0($s0) /* D9084 80142984 30620800 */ andi $v0, $v1, 0x800 /* D9088 80142988 14400026 */ bnez $v0, .L80142A24 /* D908C 8014298C 3C0E2000 */ lui $t6, (0x20000000 >> 16) /* D9090 80142990 006E1024 */ and $v0, $v1, $t6 /* D9094 80142994 10400012 */ beqz $v0, .L801429E0 /* D9098 80142998 0200202D */ daddu $a0, $s0, $zero /* D909C 8014299C 02C0282D */ daddu $a1, $s6, $zero /* D90A0 801429A0 02A0302D */ daddu $a2, $s5, $zero /* D90A4 801429A4 00113C00 */ sll $a3, $s1, 16 /* D90A8 801429A8 00073C03 */ sra $a3, $a3, 16 /* D90AC 801429AC 00121400 */ sll $v0, $s2, 16 /* D90B0 801429B0 00021403 */ sra $v0, $v0, 16 /* D90B4 801429B4 AFA20010 */ sw $v0, 0x10($sp) /* D90B8 801429B8 00131400 */ sll $v0, $s3, 16 /* D90BC 801429BC 00021403 */ sra $v0, $v0, 16 /* D90C0 801429C0 AFA20014 */ sw $v0, 0x14($sp) /* D90C4 801429C4 00141400 */ sll $v0, $s4, 16 /* D90C8 801429C8 00021403 */ sra $v0, $v0, 16 /* D90CC 801429CC 240E0001 */ addiu $t6, $zero, 0x1 /* D90D0 801429D0 AFA20018 */ sw $v0, 0x18($sp) /* D90D4 801429D4 AFAE001C */ sw $t6, 0x1C($sp) /* D90D8 801429D8 0C04FDC1 */ jal hud_element_draw_rect /* D90DC 801429DC AFAE0020 */ sw $t6, 0x20($sp) .L801429E0: /* D90E0 801429E0 0200202D */ daddu $a0, $s0, $zero /* D90E4 801429E4 02C0282D */ daddu $a1, $s6, $zero /* D90E8 801429E8 02A0302D */ daddu $a2, $s5, $zero /* D90EC 801429EC 00113C00 */ sll $a3, $s1, 16 /* D90F0 801429F0 00073C03 */ sra $a3, $a3, 16 /* D90F4 801429F4 00121400 */ sll $v0, $s2, 16 /* D90F8 801429F8 00021403 */ sra $v0, $v0, 16 /* D90FC 801429FC AFA20010 */ sw $v0, 0x10($sp) /* D9100 80142A00 00131400 */ sll $v0, $s3, 16 /* D9104 80142A04 00021403 */ sra $v0, $v0, 16 /* D9108 80142A08 AFA20014 */ sw $v0, 0x14($sp) /* D910C 80142A0C 00141400 */ sll $v0, $s4, 16 /* D9110 80142A10 00021403 */ sra $v0, $v0, 16 /* D9114 80142A14 240E0001 */ addiu $t6, $zero, 0x1 /* D9118 80142A18 AFA20018 */ sw $v0, 0x18($sp) /* D911C 80142A1C 08050AED */ j .L80142BB4 /* D9120 80142A20 AFAE001C */ sw $t6, 0x1C($sp) .L80142A24: /* D9124 80142A24 08050ACB */ j .L80142B2C /* D9128 80142A28 006E1024 */ and $v0, $v1, $t6 .L80142A2C: /* D912C 80142A2C 006E1024 */ and $v0, $v1, $t6 /* D9130 80142A30 1440000B */ bnez $v0, .L80142A60 /* D9134 80142A34 00000000 */ nop /* D9138 80142A38 82030045 */ lb $v1, 0x45($s0) /* D913C 80142A3C 3C0E8015 */ lui $t6, %hi(gHudElementSizes) /* D9140 80142A40 25CEEFCC */ addiu $t6, $t6, %lo(gHudElementSizes) /* D9144 80142A44 00031040 */ sll $v0, $v1, 1 /* D9148 80142A48 00431021 */ addu $v0, $v0, $v1 /* D914C 80142A4C 00021040 */ sll $v0, $v0, 1 /* D9150 80142A50 004E1021 */ addu $v0, $v0, $t6 /* D9154 80142A54 84560000 */ lh $s6, 0x0($v0) /* D9158 80142A58 08050A9A */ j .L80142A68 /* D915C 80142A5C 84550002 */ lh $s5, 0x2($v0) .L80142A60: /* D9160 80142A60 9216004E */ lbu $s6, 0x4E($s0) /* D9164 80142A64 9215004F */ lbu $s5, 0x4F($s0) .L80142A68: /* D9168 80142A68 C6000028 */ lwc1 $f0, 0x28($s0) /* D916C 80142A6C C606002C */ lwc1 $f6, 0x2C($s0) /* D9170 80142A70 3C013F00 */ lui $at, (0x3F000000 >> 16) /* D9174 80142A74 44811000 */ mtc1 $at, $f2 /* D9178 80142A78 46000307 */ neg.s $f12, $f0 /* D917C 80142A7C 46026302 */ mul.s $f12, $f12, $f2 /* D9180 80142A80 00000000 */ nop /* D9184 80142A84 3C013F80 */ lui $at, (0x3F800000 >> 16) /* D9188 80142A88 44814000 */ mtc1 $at, $f8 /* D918C 80142A8C 3C014480 */ lui $at, (0x44800000 >> 16) /* D9190 80142A90 44815000 */ mtc1 $at, $f10 /* D9194 80142A94 4600038D */ trunc.w.s $f14, $f0 /* D9198 80142A98 44117000 */ mfc1 $s1, $f14 /* D919C 80142A9C 4600338D */ trunc.w.s $f14, $f6 /* D91A0 80142AA0 44127000 */ mfc1 $s2, $f14 /* D91A4 80142AA4 46003187 */ neg.s $f6, $f6 /* D91A8 80142AA8 46023182 */ mul.s $f6, $f6, $f2 /* D91AC 80142AAC 00000000 */ nop /* D91B0 80142AB0 44912000 */ mtc1 $s1, $f4 /* D91B4 80142AB4 00000000 */ nop /* D91B8 80142AB8 46802120 */ cvt.s.w $f4, $f4 /* D91BC 80142ABC 44960000 */ mtc1 $s6, $f0 /* D91C0 80142AC0 00000000 */ nop /* D91C4 80142AC4 46800020 */ cvt.s.w $f0, $f0 /* D91C8 80142AC8 46002103 */ div.s $f4, $f4, $f0 /* D91CC 80142ACC 46044103 */ div.s $f4, $f8, $f4 /* D91D0 80142AD0 460A2102 */ mul.s $f4, $f4, $f10 /* D91D4 80142AD4 00000000 */ nop /* D91D8 80142AD8 44921000 */ mtc1 $s2, $f2 /* D91DC 80142ADC 00000000 */ nop /* D91E0 80142AE0 468010A0 */ cvt.s.w $f2, $f2 /* D91E4 80142AE4 44950000 */ mtc1 $s5, $f0 /* D91E8 80142AE8 00000000 */ nop /* D91EC 80142AEC 46800020 */ cvt.s.w $f0, $f0 /* D91F0 80142AF0 46001083 */ div.s $f2, $f2, $f0 /* D91F4 80142AF4 46024083 */ div.s $f2, $f8, $f2 /* D91F8 80142AF8 460A1082 */ mul.s $f2, $f2, $f10 /* D91FC 80142AFC 00000000 */ nop /* D9200 80142B00 8E020000 */ lw $v0, 0x0($s0) /* D9204 80142B04 4600638D */ trunc.w.s $f14, $f12 /* D9208 80142B08 44137000 */ mfc1 $s3, $f14 /* D920C 80142B0C 4600338D */ trunc.w.s $f14, $f6 /* D9210 80142B10 44147000 */ mfc1 $s4, $f14 /* D9214 80142B14 4600238D */ trunc.w.s $f14, $f4 /* D9218 80142B18 E60E0034 */ swc1 $f14, 0x34($s0) /* D921C 80142B1C 4600138D */ trunc.w.s $f14, $f2 /* D9220 80142B20 E60E0038 */ swc1 $f14, 0x38($s0) /* D9224 80142B24 3C0E2000 */ lui $t6, (0x20000000 >> 16) /* D9228 80142B28 004E1024 */ and $v0, $v0, $t6 .L80142B2C: /* D922C 80142B2C 10400012 */ beqz $v0, .L80142B78 /* D9230 80142B30 0200202D */ daddu $a0, $s0, $zero /* D9234 80142B34 02C0282D */ daddu $a1, $s6, $zero /* D9238 80142B38 02A0302D */ daddu $a2, $s5, $zero /* D923C 80142B3C 00113C00 */ sll $a3, $s1, 16 /* D9240 80142B40 00073C03 */ sra $a3, $a3, 16 /* D9244 80142B44 00121400 */ sll $v0, $s2, 16 /* D9248 80142B48 00021403 */ sra $v0, $v0, 16 /* D924C 80142B4C AFA20010 */ sw $v0, 0x10($sp) /* D9250 80142B50 00131400 */ sll $v0, $s3, 16 /* D9254 80142B54 00021403 */ sra $v0, $v0, 16 /* D9258 80142B58 AFA20014 */ sw $v0, 0x14($sp) /* D925C 80142B5C 00141400 */ sll $v0, $s4, 16 /* D9260 80142B60 00021403 */ sra $v0, $v0, 16 /* D9264 80142B64 240E0001 */ addiu $t6, $zero, 0x1 /* D9268 80142B68 AFA20018 */ sw $v0, 0x18($sp) /* D926C 80142B6C AFA0001C */ sw $zero, 0x1C($sp) /* D9270 80142B70 0C04FDC1 */ jal hud_element_draw_rect /* D9274 80142B74 AFAE0020 */ sw $t6, 0x20($sp) .L80142B78: /* D9278 80142B78 0200202D */ daddu $a0, $s0, $zero /* D927C 80142B7C 02C0282D */ daddu $a1, $s6, $zero /* D9280 80142B80 02A0302D */ daddu $a2, $s5, $zero /* D9284 80142B84 00113C00 */ sll $a3, $s1, 16 /* D9288 80142B88 00073C03 */ sra $a3, $a3, 16 /* D928C 80142B8C 00121400 */ sll $v0, $s2, 16 /* D9290 80142B90 00021403 */ sra $v0, $v0, 16 /* D9294 80142B94 AFA20010 */ sw $v0, 0x10($sp) /* D9298 80142B98 00131400 */ sll $v0, $s3, 16 /* D929C 80142B9C 00021403 */ sra $v0, $v0, 16 /* D92A0 80142BA0 AFA20014 */ sw $v0, 0x14($sp) /* D92A4 80142BA4 00141400 */ sll $v0, $s4, 16 /* D92A8 80142BA8 00021403 */ sra $v0, $v0, 16 /* D92AC 80142BAC AFA20018 */ sw $v0, 0x18($sp) /* D92B0 80142BB0 AFA0001C */ sw $zero, 0x1C($sp) .L80142BB4: /* D92B4 80142BB4 0C04FDC1 */ jal hud_element_draw_rect /* D92B8 80142BB8 AFA00020 */ sw $zero, 0x20($sp) /* D92BC 80142BBC 26F70001 */ addiu $s7, $s7, 0x1 /* D92C0 80142BC0 02FE102A */ slt $v0, $s7, $fp /* D92C4 80142BC4 1440FF34 */ bnez $v0, .L80142898 /* D92C8 80142BC8 00171080 */ sll $v0, $s7, 2 .L80142BCC: /* D92CC 80142BCC 8FBF054C */ lw $ra, 0x54C($sp) /* D92D0 80142BD0 8FBE0548 */ lw $fp, 0x548($sp) /* D92D4 80142BD4 8FB70544 */ lw $s7, 0x544($sp) /* D92D8 80142BD8 8FB60540 */ lw $s6, 0x540($sp) /* D92DC 80142BDC 8FB5053C */ lw $s5, 0x53C($sp) /* D92E0 80142BE0 8FB40538 */ lw $s4, 0x538($sp) /* D92E4 80142BE4 8FB30534 */ lw $s3, 0x534($sp) /* D92E8 80142BE8 8FB20530 */ lw $s2, 0x530($sp) /* D92EC 80142BEC 8FB1052C */ lw $s1, 0x52C($sp) /* D92F0 80142BF0 8FB00528 */ lw $s0, 0x528($sp) /* D92F4 80142BF4 03E00008 */ jr $ra /* D92F8 80142BF8 27BD0550 */ addiu $sp, $sp, 0x550 ### DECOMPILED C INSTRUCTIONS: void render_hud_elements_frontUI(void) { s32 i, count, j; s32 sortedElements[ARRAY_COUNT(*gHudElements)]; s32 el1, el2; s32 texSizeX, texSizeY; s32 drawSizeX, drawSizeY, offsetX, offsetY; HudElement* hudElement; gSPDisplayList(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(gHudElementsDLFrontUI)); count = 0; for (i = 0; i < ARRAY_COUNT(*gHudElements); i++) { hudElement = (*gHudElements)[i]; if (hudElement != NULL) { s32 flags = hudElement->flags; if (flags && !(flags & HUD_ELEMENT_FLAG_DISABLED)) { if (!(flags & (HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_TRANSFORM | HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_10000000))) { if ((flags & HUD_ELEMENT_FLAG_FRONTUI) && hudElement->drawSizePreset >= 0) { sortedElements[count++] = i; } } } } } for (i = 0; i < count - 1; i++) { for (j = i + 1; j < count; j++) { el1 = sortedElements[i]; el2 = sortedElements[j]; if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) { sortedElements[i] = el2; sortedElements[j] = el1; } } } for (i = 0; i < count; i++) { hudElement = (*gHudElements)[sortedElements[i]]; if (!(hudElement->flags & HUD_ELEMENT_FLAG_FIXEDSCALE)) { if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { texSizeX = gHudElementSizes[hudElement->tileSizePreset].width; texSizeY = gHudElementSizes[hudElement->tileSizePreset].height; } else { texSizeX = hudElement->customImageSize.x; texSizeY = hudElement->customImageSize.y; } if (!(hudElement->flags & HUD_ELEMENT_FLAG_SCALED)) { if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { drawSizeX = gHudElementSizes[hudElement->drawSizePreset].width; drawSizeY = gHudElementSizes[hudElement->drawSizePreset].height; offsetX = -drawSizeX / 2; offsetY = -drawSizeY / 2; } else { // TODO find better match do { drawSizeX = hudElement->customDrawSize.x; drawSizeY = hudElement->customDrawSize.y; offsetX = -drawSizeX / 2; } while (0); offsetY = -drawSizeY / 2; } } else { drawSizeX = hudElement->sizeX; drawSizeY = hudElement->sizeY; offsetX = -drawSizeX / 2; offsetY = -drawSizeY / 2; } if (!(hudElement->flags & HUD_ELEMENT_FLAG_REPEATED)) { if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE); } hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE); } else { if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); } } else { f32 xScaled, yScaled; if (!(hudElement->flags & HUD_ELEMENT_FLAG_CUSTOM_SIZE)) { texSizeX = gHudElementSizes[hudElement->drawSizePreset].width; texSizeY = gHudElementSizes[hudElement->drawSizePreset].height; } else { texSizeX = hudElement->customImageSize.x; texSizeY = hudElement->customImageSize.y; } drawSizeX = hudElement->unkImgScale[0]; drawSizeY = hudElement->unkImgScale[1]; offsetX = -hudElement->unkImgScale[0] / 2; offsetY = -hudElement->unkImgScale[1] / 2; xScaled = (f32) drawSizeX / (f32) texSizeX; yScaled = (f32) drawSizeY / (f32) texSizeY; xScaled = 1.0f / xScaled; yScaled = 1.0f / yScaled; hudElement->widthScale = X10(xScaled); hudElement->heightScale = X10(yScaled); if (hudElement->flags & HUD_ELEMENT_FLAG_DROP_SHADOW) { hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE); } hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_HeartBlockContent__anim_heal /* 106684 802E4E04 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 106688 802E4E08 AFB1001C */ sw $s1, 0x1C($sp) /* 10668C 802E4E0C 0080882D */ daddu $s1, $a0, $zero /* 106690 802E4E10 AFBF0024 */ sw $ra, 0x24($sp) /* 106694 802E4E14 AFB20020 */ sw $s2, 0x20($sp) /* 106698 802E4E18 AFB00018 */ sw $s0, 0x18($sp) /* 10669C 802E4E1C F7B60030 */ sdc1 $f22, 0x30($sp) /* 1066A0 802E4E20 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1066A4 802E4E24 8E300040 */ lw $s0, 0x40($s1) /* 1066A8 802E4E28 92030001 */ lbu $v1, 0x1($s0) /* 1066AC 802E4E2C 3C128011 */ lui $s2, %hi(gPlayerStatus) /* 1066B0 802E4E30 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* 1066B4 802E4E34 2C620006 */ sltiu $v0, $v1, 0x6 /* 1066B8 802E4E38 1040012B */ beqz $v0, .L802E52E8 /* 1066BC 802E4E3C 00031080 */ sll $v0, $v1, 2 /* 1066C0 802E4E40 3C01802F */ lui $at, %hi(jtbl_802EB278) /* 1066C4 802E4E44 00220821 */ addu $at, $at, $v0 /* 1066C8 802E4E48 8C22B278 */ lw $v0, %lo(jtbl_802EB278)($at) /* 1066CC 802E4E4C 00400008 */ jr $v0 /* 1066D0 802E4E50 00000000 */ nop glabel .L802E4E54 /* 1066D4 802E4E54 3C014000 */ lui $at, (0x40000000 >> 16) /* 1066D8 802E4E58 44810000 */ mtc1 $at, $f0 /* 1066DC 802E4E5C 00000000 */ nop /* 1066E0 802E4E60 E7A00010 */ swc1 $f0, 0x10($sp) /* 1066E4 802E4E64 8E250048 */ lw $a1, 0x48($s1) /* 1066E8 802E4E68 8E26004C */ lw $a2, 0x4C($s1) /* 1066EC 802E4E6C 8E270050 */ lw $a3, 0x50($s1) /* 1066F0 802E4E70 0C01BFBC */ jal fx_sparkles /* 1066F4 802E4E74 0000202D */ daddu $a0, $zero, $zero /* 1066F8 802E4E78 92020001 */ lbu $v0, 0x1($s0) /* 1066FC 802E4E7C 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 106700 802E4E80 44810000 */ mtc1 $at, $f0 /* 106704 802E4E84 AE000020 */ sw $zero, 0x20($s0) /* 106708 802E4E88 24420001 */ addiu $v0, $v0, 0x1 /* 10670C 802E4E8C A2020001 */ sb $v0, 0x1($s0) /* 106710 802E4E90 080B94BA */ j .L802E52E8 /* 106714 802E4E94 E6000014 */ swc1 $f0, 0x14($s0) glabel .L802E4E98 /* 106718 802E4E98 C620004C */ lwc1 $f0, 0x4C($s1) /* 10671C 802E4E9C C6020014 */ lwc1 $f2, 0x14($s0) /* 106720 802E4EA0 46020000 */ add.s $f0, $f0, $f2 /* 106724 802E4EA4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 106728 802E4EA8 44811000 */ mtc1 $at, $f2 /* 10672C 802E4EAC E620004C */ swc1 $f0, 0x4C($s1) /* 106730 802E4EB0 C6000014 */ lwc1 $f0, 0x14($s0) /* 106734 802E4EB4 46020001 */ sub.s $f0, $f0, $f2 /* 106738 802E4EB8 3C014000 */ lui $at, (0x40000000 >> 16) /* 10673C 802E4EBC 44811000 */ mtc1 $at, $f2 /* 106740 802E4EC0 00000000 */ nop /* 106744 802E4EC4 4602003E */ c.le.s $f0, $f2 /* 106748 802E4EC8 00000000 */ nop /* 10674C 802E4ECC 45000106 */ bc1f .L802E52E8 /* 106750 802E4ED0 E6000014 */ swc1 $f0, 0x14($s0) /* 106754 802E4ED4 0220202D */ daddu $a0, $s1, $zero /* 106758 802E4ED8 3C05802F */ lui $a1, %hi(D_802EA744) /* 10675C 802E4EDC 24A5A744 */ addiu $a1, $a1, %lo(D_802EA744) /* 106760 802E4EE0 92020001 */ lbu $v0, 0x1($s0) /* 106764 802E4EE4 2403DFFF */ addiu $v1, $zero, -0x2001 /* 106768 802E4EE8 24420001 */ addiu $v0, $v0, 0x1 /* 10676C 802E4EEC A2020001 */ sb $v0, 0x1($s0) /* 106770 802E4EF0 8E220000 */ lw $v0, 0x0($s1) /* 106774 802E4EF4 3C01C120 */ lui $at, (0xC1200000 >> 16) /* 106778 802E4EF8 44810000 */ mtc1 $at, $f0 /* 10677C 802E4EFC 00431024 */ and $v0, $v0, $v1 /* 106780 802E4F00 AE220000 */ sw $v0, 0x0($s1) /* 106784 802E4F04 0C0442F3 */ jal entity_set_render_script /* 106788 802E4F08 E6000054 */ swc1 $f0, 0x54($s0) /* 10678C 802E4F0C 3C02802E */ lui $v0, %hi(entity_HeartBlockContent_setupGfx) /* 106790 802E4F10 24424AEC */ addiu $v0, $v0, %lo(entity_HeartBlockContent_setupGfx) /* 106794 802E4F14 080B94BA */ j .L802E52E8 /* 106798 802E4F18 AE22003C */ sw $v0, 0x3C($s1) glabel .L802E4F1C /* 10679C 802E4F1C C60C0020 */ lwc1 $f12, 0x20($s0) /* 1067A0 802E4F20 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 1067A4 802E4F24 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 1067A8 802E4F28 44810000 */ mtc1 $at, $f0 /* 1067AC 802E4F2C 00000000 */ nop /* 1067B0 802E4F30 46006302 */ mul.s $f12, $f12, $f0 /* 1067B4 802E4F34 00000000 */ nop /* 1067B8 802E4F38 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 1067BC 802E4F3C 4481A000 */ mtc1 $at, $f20 /* 1067C0 802E4F40 0C00A85B */ jal sin_rad /* 1067C4 802E4F44 46146303 */ div.s $f12, $f12, $f20 /* 1067C8 802E4F48 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1067CC 802E4F4C 44811000 */ mtc1 $at, $f2 /* 1067D0 802E4F50 00000000 */ nop /* 1067D4 802E4F54 46020002 */ mul.s $f0, $f0, $f2 /* 1067D8 802E4F58 00000000 */ nop /* 1067DC 802E4F5C C622004C */ lwc1 $f2, 0x4C($s1) /* 1067E0 802E4F60 46001080 */ add.s $f2, $f2, $f0 /* 1067E4 802E4F64 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 1067E8 802E4F68 44810000 */ mtc1 $at, $f0 /* 1067EC 802E4F6C E622004C */ swc1 $f2, 0x4C($s1) /* 1067F0 802E4F70 C6020020 */ lwc1 $f2, 0x20($s0) /* 1067F4 802E4F74 46001001 */ sub.s $f0, $f2, $f0 /* 1067F8 802E4F78 44802000 */ mtc1 $zero, $f4 /* 1067FC 802E4F7C 00000000 */ nop /* 106800 802E4F80 4604003C */ c.lt.s $f0, $f4 /* 106804 802E4F84 00000000 */ nop /* 106808 802E4F88 45000003 */ bc1f .L802E4F98 /* 10680C 802E4F8C E6000020 */ swc1 $f0, 0x20($s0) /* 106810 802E4F90 46140000 */ add.s $f0, $f0, $f20 /* 106814 802E4F94 E6000020 */ swc1 $f0, 0x20($s0) .L802E4F98: /* 106818 802E4F98 C6200064 */ lwc1 $f0, 0x64($s1) /* 10681C 802E4F9C C6020054 */ lwc1 $f2, 0x54($s0) /* 106820 802E4FA0 46020000 */ add.s $f0, $f0, $f2 /* 106824 802E4FA4 3C014000 */ lui $at, (0x40000000 >> 16) /* 106828 802E4FA8 44811000 */ mtc1 $at, $f2 /* 10682C 802E4FAC E6200064 */ swc1 $f0, 0x64($s1) /* 106830 802E4FB0 C6000054 */ lwc1 $f0, 0x54($s0) /* 106834 802E4FB4 46020000 */ add.s $f0, $f0, $f2 /* 106838 802E4FB8 4600203E */ c.le.s $f4, $f0 /* 10683C 802E4FBC 00000000 */ nop /* 106840 802E4FC0 450000AC */ bc1f .L802E5274 /* 106844 802E4FC4 E6000054 */ swc1 $f0, 0x54($s0) /* 106848 802E4FC8 92020001 */ lbu $v0, 0x1($s0) /* 10684C 802E4FCC E6040018 */ swc1 $f4, 0x18($s0) /* 106850 802E4FD0 E604001C */ swc1 $f4, 0x1C($s0) /* 106854 802E4FD4 24420001 */ addiu $v0, $v0, 0x1 /* 106858 802E4FD8 A2020001 */ sb $v0, 0x1($s0) /* 10685C 802E4FDC 864200B0 */ lh $v0, 0xB0($s2) /* 106860 802E4FE0 2404FFFF */ addiu $a0, $zero, -0x1 /* 106864 802E4FE4 A2000003 */ sb $zero, 0x3($s0) /* 106868 802E4FE8 24420005 */ addiu $v0, $v0, 0x5 /* 10686C 802E4FEC 44820000 */ mtc1 $v0, $f0 /* 106870 802E4FF0 00000000 */ nop /* 106874 802E4FF4 46800020 */ cvt.s.w $f0, $f0 /* 106878 802E4FF8 0C03A8B3 */ jal recover_hp /* 10687C 802E4FFC E6000004 */ swc1 $f0, 0x4($s0) /* 106880 802E5000 0C03A899 */ jal recover_fp /* 106884 802E5004 2404FFFF */ addiu $a0, $zero, -0x1 /* 106888 802E5008 0C05272D */ jal sfx_play_sound /* 10688C 802E500C 24040131 */ addiu $a0, $zero, 0x131 /* 106890 802E5010 080B949D */ j .L802E5274 /* 106894 802E5014 00000000 */ nop glabel .L802E5018 /* 106898 802E5018 C600001C */ lwc1 $f0, 0x1C($s0) /* 10689C 802E501C 3C014000 */ lui $at, (0x40000000 >> 16) /* 1068A0 802E5020 44811800 */ mtc1 $at, $f3 /* 1068A4 802E5024 44801000 */ mtc1 $zero, $f2 /* 1068A8 802E5028 46000021 */ cvt.d.s $f0, $f0 /* 1068AC 802E502C 46220000 */ add.d $f0, $f0, $f2 /* 1068B0 802E5030 3C014120 */ lui $at, (0x41200000 >> 16) /* 1068B4 802E5034 44811000 */ mtc1 $at, $f2 /* 1068B8 802E5038 46200020 */ cvt.s.d $f0, $f0 /* 1068BC 802E503C 4600103E */ c.le.s $f2, $f0 /* 1068C0 802E5040 00000000 */ nop /* 1068C4 802E5044 45000002 */ bc1f .L802E5050 /* 1068C8 802E5048 E600001C */ swc1 $f0, 0x1C($s0) /* 1068CC 802E504C E602001C */ swc1 $f2, 0x1C($s0) .L802E5050: /* 1068D0 802E5050 C6020018 */ lwc1 $f2, 0x18($s0) /* 1068D4 802E5054 3C014190 */ lui $at, (0x41900000 >> 16) /* 1068D8 802E5058 44810000 */ mtc1 $at, $f0 /* 1068DC 802E505C 00000000 */ nop /* 1068E0 802E5060 46001000 */ add.s $f0, $f2, $f0 /* 1068E4 802E5064 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 1068E8 802E5068 4481B000 */ mtc1 $at, $f22 /* 1068EC 802E506C 00000000 */ nop /* 1068F0 802E5070 4600B03E */ c.le.s $f22, $f0 /* 1068F4 802E5074 00000000 */ nop /* 1068F8 802E5078 45000003 */ bc1f .L802E5088 /* 1068FC 802E507C E6000018 */ swc1 $f0, 0x18($s0) /* 106900 802E5080 46160001 */ sub.s $f0, $f0, $f22 /* 106904 802E5084 E6000018 */ swc1 $f0, 0x18($s0) .L802E5088: /* 106908 802E5088 C60C0018 */ lwc1 $f12, 0x18($s0) /* 10690C 802E508C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 106910 802E5090 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 106914 802E5094 4481A000 */ mtc1 $at, $f20 /* 106918 802E5098 00000000 */ nop /* 10691C 802E509C 46146302 */ mul.s $f12, $f12, $f20 /* 106920 802E50A0 00000000 */ nop /* 106924 802E50A4 0C00A85B */ jal sin_rad /* 106928 802E50A8 46166303 */ div.s $f12, $f12, $f22 /* 10692C 802E50AC C60C0018 */ lwc1 $f12, 0x18($s0) /* 106930 802E50B0 46146302 */ mul.s $f12, $f12, $f20 /* 106934 802E50B4 00000000 */ nop /* 106938 802E50B8 C602001C */ lwc1 $f2, 0x1C($s0) /* 10693C 802E50BC 46001502 */ mul.s $f20, $f2, $f0 /* 106940 802E50C0 00000000 */ nop /* 106944 802E50C4 0C00A874 */ jal cos_rad /* 106948 802E50C8 46166303 */ div.s $f12, $f12, $f22 /* 10694C 802E50CC C6060004 */ lwc1 $f6, 0x4($s0) /* 106950 802E50D0 3C01802F */ lui $at, %hi(D_802EB290) /* 106954 802E50D4 D424B290 */ ldc1 $f4, %lo(D_802EB290)($at) /* 106958 802E50D8 92030003 */ lbu $v1, 0x3($s0) /* 10695C 802E50DC 460030A1 */ cvt.d.s $f2, $f6 /* 106960 802E50E0 46241081 */ sub.d $f2, $f2, $f4 /* 106964 802E50E4 24620001 */ addiu $v0, $v1, 0x1 /* 106968 802E50E8 462010A0 */ cvt.s.d $f2, $f2 /* 10696C 802E50EC E6020004 */ swc1 $f2, 0x4($s0) /* 106970 802E50F0 C602001C */ lwc1 $f2, 0x1C($s0) /* 106974 802E50F4 30630001 */ andi $v1, $v1, 0x1 /* 106978 802E50F8 46001082 */ mul.s $f2, $f2, $f0 /* 10697C 802E50FC 00000000 */ nop /* 106980 802E5100 1060000F */ beqz $v1, .L802E5140 /* 106984 802E5104 A2020003 */ sb $v0, 0x3($s0) /* 106988 802E5108 C6400028 */ lwc1 $f0, 0x28($s2) /* 10698C 802E510C 46140000 */ add.s $f0, $f0, $f20 /* 106990 802E5110 44050000 */ mfc1 $a1, $f0 /* 106994 802E5114 C640002C */ lwc1 $f0, 0x2C($s2) /* 106998 802E5118 46060000 */ add.s $f0, $f0, $f6 /* 10699C 802E511C 44060000 */ mfc1 $a2, $f0 /* 1069A0 802E5120 C6400030 */ lwc1 $f0, 0x30($s2) /* 1069A4 802E5124 46020001 */ sub.s $f0, $f0, $f2 /* 1069A8 802E5128 44070000 */ mfc1 $a3, $f0 /* 1069AC 802E512C 3C014100 */ lui $at, (0x41000000 >> 16) /* 1069B0 802E5130 44810000 */ mtc1 $at, $f0 /* 1069B4 802E5134 24040003 */ addiu $a0, $zero, 0x3 /* 1069B8 802E5138 0C01BFBC */ jal fx_sparkles /* 1069BC 802E513C E7A00010 */ swc1 $f0, 0x10($sp) .L802E5140: /* 1069C0 802E5140 C6000004 */ lwc1 $f0, 0x4($s0) /* 1069C4 802E5144 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 1069C8 802E5148 44811000 */ mtc1 $at, $f2 /* 1069CC 802E514C 00000000 */ nop /* 1069D0 802E5150 4602003C */ c.lt.s $f0, $f2 /* 1069D4 802E5154 00000000 */ nop /* 1069D8 802E5158 45000005 */ bc1f .L802E5170 /* 1069DC 802E515C 00000000 */ nop /* 1069E0 802E5160 92020001 */ lbu $v0, 0x1($s0) /* 1069E4 802E5164 E6020004 */ swc1 $f2, 0x4($s0) /* 1069E8 802E5168 24420001 */ addiu $v0, $v0, 0x1 /* 1069EC 802E516C A2020001 */ sb $v0, 0x1($s0) glabel .L802E5170 /* 1069F0 802E5170 C60C0020 */ lwc1 $f12, 0x20($s0) /* 1069F4 802E5174 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 1069F8 802E5178 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 1069FC 802E517C 44810000 */ mtc1 $at, $f0 /* 106A00 802E5180 00000000 */ nop /* 106A04 802E5184 46006302 */ mul.s $f12, $f12, $f0 /* 106A08 802E5188 00000000 */ nop /* 106A0C 802E518C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 106A10 802E5190 4481A000 */ mtc1 $at, $f20 /* 106A14 802E5194 0C00A85B */ jal sin_rad /* 106A18 802E5198 46146303 */ div.s $f12, $f12, $f20 /* 106A1C 802E519C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 106A20 802E51A0 44811000 */ mtc1 $at, $f2 /* 106A24 802E51A4 00000000 */ nop /* 106A28 802E51A8 46020002 */ mul.s $f0, $f0, $f2 /* 106A2C 802E51AC 00000000 */ nop /* 106A30 802E51B0 C622004C */ lwc1 $f2, 0x4C($s1) /* 106A34 802E51B4 46001080 */ add.s $f2, $f2, $f0 /* 106A38 802E51B8 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 106A3C 802E51BC 44812000 */ mtc1 $at, $f4 /* 106A40 802E51C0 E622004C */ swc1 $f2, 0x4C($s1) /* 106A44 802E51C4 C6000020 */ lwc1 $f0, 0x20($s0) /* 106A48 802E51C8 46040081 */ sub.s $f2, $f0, $f4 /* 106A4C 802E51CC 44800000 */ mtc1 $zero, $f0 /* 106A50 802E51D0 00000000 */ nop /* 106A54 802E51D4 4600103C */ c.lt.s $f2, $f0 /* 106A58 802E51D8 00000000 */ nop /* 106A5C 802E51DC 45000003 */ bc1f .L802E51EC /* 106A60 802E51E0 E6020020 */ swc1 $f2, 0x20($s0) /* 106A64 802E51E4 46141000 */ add.s $f0, $f2, $f20 /* 106A68 802E51E8 E6000020 */ swc1 $f0, 0x20($s0) .L802E51EC: /* 106A6C 802E51EC C6000054 */ lwc1 $f0, 0x54($s0) /* 106A70 802E51F0 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 106A74 802E51F4 44811800 */ mtc1 $at, $f3 /* 106A78 802E51F8 44801000 */ mtc1 $zero, $f2 /* 106A7C 802E51FC 46000021 */ cvt.d.s $f0, $f0 /* 106A80 802E5200 46220000 */ add.d $f0, $f0, $f2 /* 106A84 802E5204 46200020 */ cvt.s.d $f0, $f0 /* 106A88 802E5208 4600203C */ c.lt.s $f4, $f0 /* 106A8C 802E520C 00000000 */ nop /* 106A90 802E5210 45000002 */ bc1f .L802E521C /* 106A94 802E5214 E6000054 */ swc1 $f0, 0x54($s0) /* 106A98 802E5218 E6040054 */ swc1 $f4, 0x54($s0) .L802E521C: /* 106A9C 802E521C C6220064 */ lwc1 $f2, 0x64($s1) /* 106AA0 802E5220 C6000054 */ lwc1 $f0, 0x54($s0) /* 106AA4 802E5224 46001000 */ add.s $f0, $f2, $f0 /* 106AA8 802E5228 4600A03E */ c.le.s $f20, $f0 /* 106AAC 802E522C 00000000 */ nop /* 106AB0 802E5230 45000003 */ bc1f .L802E5240 /* 106AB4 802E5234 E6200064 */ swc1 $f0, 0x64($s1) /* 106AB8 802E5238 46140001 */ sub.s $f0, $f0, $f20 /* 106ABC 802E523C E6200064 */ swc1 $f0, 0x64($s1) .L802E5240: /* 106AC0 802E5240 9222000B */ lbu $v0, 0xB($s1) /* 106AC4 802E5244 2442FFFB */ addiu $v0, $v0, -0x5 /* 106AC8 802E5248 A222000B */ sb $v0, 0xB($s1) /* 106ACC 802E524C 304200FF */ andi $v0, $v0, 0xFF /* 106AD0 802E5250 2C420007 */ sltiu $v0, $v0, 0x7 /* 106AD4 802E5254 10400007 */ beqz $v0, .L802E5274 /* 106AD8 802E5258 24020005 */ addiu $v0, $zero, 0x5 /* 106ADC 802E525C A222000B */ sb $v0, 0xB($s1) /* 106AE0 802E5260 92030001 */ lbu $v1, 0x1($s0) /* 106AE4 802E5264 24020004 */ addiu $v0, $zero, 0x4 /* 106AE8 802E5268 14620002 */ bne $v1, $v0, .L802E5274 /* 106AEC 802E526C 24620001 */ addiu $v0, $v1, 0x1 /* 106AF0 802E5270 A2020001 */ sb $v0, 0x1($s0) .L802E5274: /* 106AF4 802E5274 96020024 */ lhu $v0, 0x24($s0) /* 106AF8 802E5278 C6200064 */ lwc1 $f0, 0x64($s1) /* 106AFC 802E527C 00021080 */ sll $v0, $v0, 2 /* 106B00 802E5280 02021021 */ addu $v0, $s0, $v0 /* 106B04 802E5284 E4400028 */ swc1 $f0, 0x28($v0) /* 106B08 802E5288 96020024 */ lhu $v0, 0x24($s0) /* 106B0C 802E528C 24420001 */ addiu $v0, $v0, 0x1 /* 106B10 802E5290 A6020024 */ sh $v0, 0x24($s0) /* 106B14 802E5294 3042FFFF */ andi $v0, $v0, 0xFFFF /* 106B18 802E5298 2C42000B */ sltiu $v0, $v0, 0xB /* 106B1C 802E529C 50400012 */ beql $v0, $zero, .L802E52E8 /* 106B20 802E52A0 A6000024 */ sh $zero, 0x24($s0) /* 106B24 802E52A4 080B94BA */ j .L802E52E8 /* 106B28 802E52A8 00000000 */ nop glabel .L802E52AC /* 106B2C 802E52AC 8E420004 */ lw $v0, 0x4($s2) /* 106B30 802E52B0 2403FDFF */ addiu $v1, $zero, -0x201 /* 106B34 802E52B4 00431024 */ and $v0, $v0, $v1 /* 106B38 802E52B8 0C038069 */ jal enable_player_input /* 106B3C 802E52BC AE420004 */ sw $v0, 0x4($s2) /* 106B40 802E52C0 0C009C22 */ jal set_time_freeze_mode /* 106B44 802E52C4 0000202D */ daddu $a0, $zero, $zero /* 106B48 802E52C8 0220202D */ daddu $a0, $s1, $zero /* 106B4C 802E52CC 3C05800A */ lui $a1, %hi(gOverrideFlags) /* 106B50 802E52D0 24A5A650 */ addiu $a1, $a1, %lo(gOverrideFlags) /* 106B54 802E52D4 8CA20000 */ lw $v0, 0x0($a1) /* 106B58 802E52D8 2403FFBF */ addiu $v1, $zero, -0x41 /* 106B5C 802E52DC 00431024 */ and $v0, $v0, $v1 /* 106B60 802E52E0 0C043F5A */ jal exec_entity_commandlist /* 106B64 802E52E4 ACA20000 */ sw $v0, 0x0($a1) .L802E52E8: /* 106B68 802E52E8 8FBF0024 */ lw $ra, 0x24($sp) /* 106B6C 802E52EC 8FB20020 */ lw $s2, 0x20($sp) /* 106B70 802E52F0 8FB1001C */ lw $s1, 0x1C($sp) /* 106B74 802E52F4 8FB00018 */ lw $s0, 0x18($sp) /* 106B78 802E52F8 D7B60030 */ ldc1 $f22, 0x30($sp) /* 106B7C 802E52FC D7B40028 */ ldc1 $f20, 0x28($sp) /* 106B80 802E5300 03E00008 */ jr $ra /* 106B84 802E5304 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void entity_HeartBlockContent__anim_heal(Entity* entity, s32 arg1) { PlayerStatus* playerStatus = &gPlayerStatus; HeartBlockContentData* data = entity->dataBuf.heartBlockContent; f32 offsetX, offsetY, offsetZ; switch (data->state) { case 0: fx_sparkles(FX_SPARKLES_0, entity->position.x, entity->position.y, entity->position.z, 2.0f); data->bouncePhase = 0.0f; data->state++; data->riseVelocity = 6.0f; break; case 1: entity->position.y = entity->position.y + data->riseVelocity; data->riseVelocity -= 1.0f; if (data->riseVelocity <= 2.0f) { data->state++; entity->flags &= ~ENTITY_FLAG_ALWAYS_FACE_CAMERA; data->rotationRate = -10.0f; entity_set_render_script(entity, &Entity_HeartBlockContent_RenderScriptHit); entity->renderSetupFunc = entity_HeartBlockContent_setupGfx; } break; case 2: entity->position.y += sin_rad(DEG_TO_RAD(data->bouncePhase)) * 0.5f; data->bouncePhase -= 30.0f; if (data->bouncePhase < 0.0f) { data->bouncePhase += 360.0f; } entity->rotation.y += data->rotationRate; data->rotationRate += 2.0f; if (data->rotationRate >= 0.0f) { data->sparkleTrailAngle = 0.0f; data->sparkleTrailRadius = 0.0f; data->state++; data->sparkleTrailPosY = playerStatus->colliderHeight + 5; data->sparkleTrailTimer = 0; recover_hp(-1); recover_fp(-1); sfx_play_sound(SOUND_131); } data->yawBuffer[data->yawBufferPos] = entity->rotation.y; data->yawBufferPos++; if (data->yawBufferPos > ARRAY_COUNT(data->yawBuffer)) { data->yawBufferPos = 0; } break; case 3: data->sparkleTrailRadius += 2.0; if (data->sparkleTrailRadius >= 10.0f) { data->sparkleTrailRadius = 10.0f; } data->sparkleTrailAngle += 18.0f; if (data->sparkleTrailAngle >= 360.0f) { data->sparkleTrailAngle -= 360.0f; } offsetX = data->sparkleTrailRadius * sin_rad(DEG_TO_RAD(data->sparkleTrailAngle)); offsetZ = data->sparkleTrailRadius * cos_rad(DEG_TO_RAD(data->sparkleTrailAngle)); offsetY = data->sparkleTrailPosY; data->sparkleTrailPosY -= 0.7; if ((data->sparkleTrailTimer++ & 1) != 0) { fx_sparkles(FX_SPARKLES_3, playerStatus->position.x + offsetX, playerStatus->position.y + offsetY, playerStatus->position.z - offsetZ, 8.0f ); } if (data->sparkleTrailPosY < 20.0f) { data->sparkleTrailPosY = 20.0f; data->state++; } // fallthrough case 4: entity->position.y += sin_rad(DEG_TO_RAD(data->bouncePhase)) * 0.5f; data->bouncePhase -= 30.0f; if (data->bouncePhase < 0.0f) { data->bouncePhase += 360.0f; } data->rotationRate += 1.0; if (data->rotationRate > 30.0f) { data->rotationRate = 30.0f; } entity->rotation.y += data->rotationRate; if (entity->rotation.y >= 360.0f) { entity->rotation.y -= 360.0f; } entity->alpha -= 5; if (entity->alpha < 7) { entity->alpha = 5; if (data->state == 4) { data->state++; } } data->yawBuffer[data->yawBufferPos] = entity->rotation.y; data->yawBufferPos++; if (data->yawBufferPos > ARRAY_COUNT(data->yawBuffer)) { data->yawBufferPos = 0; } break; case 5: playerStatus->animFlags &= ~PA_FLAG_RAISED_ARMS; enable_player_input(); set_time_freeze_mode(TIME_FREEZE_NORMAL); gOverrideFlags &= ~GLOBAL_OVERRIDES_40; exec_entity_commandlist(entity); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel landing_dust_main /* 328270 E000C160 27BDFF90 */ addiu $sp, $sp, -0x70 /* 328274 E000C164 F7B40040 */ sdc1 $f20, 0x40($sp) /* 328278 E000C168 4485A000 */ mtc1 $a1, $f20 /* 32827C E000C16C AFB20030 */ sw $s2, 0x30($sp) /* 328280 E000C170 0080902D */ daddu $s2, $a0, $zero /* 328284 E000C174 F7B60048 */ sdc1 $f22, 0x48($sp) /* 328288 E000C178 4486B000 */ mtc1 $a2, $f22 /* 32828C E000C17C F7B80050 */ sdc1 $f24, 0x50($sp) /* 328290 E000C180 4487C000 */ mtc1 $a3, $f24 /* 328294 E000C184 24020003 */ addiu $v0, $zero, 0x3 /* 328298 E000C188 AFBF003C */ sw $ra, 0x3C($sp) /* 32829C E000C18C AFB40038 */ sw $s4, 0x38($sp) /* 3282A0 E000C190 AFB30034 */ sw $s3, 0x34($sp) /* 3282A4 E000C194 AFB1002C */ sw $s1, 0x2C($sp) /* 3282A8 E000C198 AFB00028 */ sw $s0, 0x28($sp) /* 3282AC E000C19C F7BE0068 */ sdc1 $f30, 0x68($sp) /* 3282B0 E000C1A0 F7BC0060 */ sdc1 $f28, 0x60($sp) /* 3282B4 E000C1A4 F7BA0058 */ sdc1 $f26, 0x58($sp) /* 3282B8 E000C1A8 1242000F */ beq $s2, $v0, .LE000C1E8 /* 3282BC E000C1AC 27A40010 */ addiu $a0, $sp, 0x10 /* 3282C0 E000C1B0 2A420004 */ slti $v0, $s2, 0x4 /* 3282C4 E000C1B4 10400005 */ beqz $v0, .LE000C1CC /* 3282C8 E000C1B8 24020002 */ addiu $v0, $zero, 0x2 /* 3282CC E000C1BC 12420008 */ beq $s2, $v0, .LE000C1E0 /* 3282D0 E000C1C0 24130003 */ addiu $s3, $zero, 0x3 /* 3282D4 E000C1C4 0800307D */ j .LE000C1F4 /* 3282D8 E000C1C8 00000000 */ nop .LE000C1CC: /* 3282DC E000C1CC 24020004 */ addiu $v0, $zero, 0x4 /* 3282E0 E000C1D0 12420007 */ beq $s2, $v0, .LE000C1F0 /* 3282E4 E000C1D4 24130003 */ addiu $s3, $zero, 0x3 /* 3282E8 E000C1D8 0800307D */ j .LE000C1F4 /* 3282EC E000C1DC 00000000 */ nop .LE000C1E0: /* 3282F0 E000C1E0 0800307D */ j .LE000C1F4 /* 3282F4 E000C1E4 24130001 */ addiu $s3, $zero, 0x1 .LE000C1E8: /* 3282F8 E000C1E8 0800307D */ j .LE000C1F4 /* 3282FC E000C1EC 24130004 */ addiu $s3, $zero, 0x4 .LE000C1F0: /* 328300 E000C1F0 24130009 */ addiu $s3, $zero, 0x9 .LE000C1F4: /* 328304 E000C1F4 3C02E001 */ lui $v0, %hi(landing_dust_init) /* 328308 E000C1F8 2442C64C */ addiu $v0, $v0, %lo(landing_dust_init) /* 32830C E000C1FC AC820008 */ sw $v0, 0x8($a0) /* 328310 E000C200 3C02E001 */ lui $v0, %hi(landing_dust_update) /* 328314 E000C204 2442C654 */ addiu $v0, $v0, %lo(landing_dust_update) /* 328318 E000C208 AC82000C */ sw $v0, 0xC($a0) /* 32831C E000C20C 3C02E001 */ lui $v0, %hi(landing_dust_render) /* 328320 E000C210 2442C754 */ addiu $v0, $v0, %lo(landing_dust_render) /* 328324 E000C214 AC820010 */ sw $v0, 0x10($a0) /* 328328 E000C218 24020006 */ addiu $v0, $zero, 0x6 /* 32832C E000C21C AC800000 */ sw $zero, 0x0($a0) /* 328330 E000C220 AC800014 */ sw $zero, 0x14($a0) /* 328334 E000C224 0C080124 */ jal shim_create_effect_instance /* 328338 E000C228 AC820004 */ sw $v0, 0x4($a0) /* 32833C E000C22C 00132100 */ sll $a0, $s3, 4 /* 328340 E000C230 00932021 */ addu $a0, $a0, $s3 /* 328344 E000C234 00042080 */ sll $a0, $a0, 2 /* 328348 E000C238 0040802D */ daddu $s0, $v0, $zero /* 32834C E000C23C 0C08012C */ jal shim_general_heap_malloc /* 328350 E000C240 AE130008 */ sw $s3, 0x8($s0) /* 328354 E000C244 0040882D */ daddu $s1, $v0, $zero /* 328358 E000C248 16200003 */ bnez $s1, .LE000C258 /* 32835C E000C24C AE11000C */ sw $s1, 0xC($s0) .LE000C250: /* 328360 E000C250 08003094 */ j .LE000C250 /* 328364 E000C254 00000000 */ nop .LE000C258: /* 328368 E000C258 0220202D */ daddu $a0, $s1, $zero /* 32836C E000C25C 00132900 */ sll $a1, $s3, 4 /* 328370 E000C260 00B32821 */ addu $a1, $a1, $s3 /* 328374 E000C264 0C080130 */ jal shim_mem_clear /* 328378 E000C268 00052880 */ sll $a1, $a1, 2 /* 32837C E000C26C 2E420005 */ sltiu $v0, $s2, 0x5 /* 328380 E000C270 1040000C */ beqz $v0, .LE000C2A4 /* 328384 E000C274 00121080 */ sll $v0, $s2, 2 /* 328388 E000C278 3C01E001 */ lui $at, (0xE0010000 >> 16) /* 32838C E000C27C 00220821 */ addu $at, $at, $v0 /* 328390 E000C280 8C22CD40 */ lw $v0, -0x32C0($at) /* 328394 E000C284 00400008 */ jr $v0 /* 328398 E000C288 00000000 */ nop /* 32839C E000C28C 080030A9 */ j .LE000C2A4 /* 3283A0 E000C290 AE200038 */ sw $zero, 0x38($s1) /* 3283A4 E000C294 080030A8 */ j .LE000C2A0 /* 3283A8 E000C298 24020002 */ addiu $v0, $zero, 0x2 /* 3283AC E000C29C 24020003 */ addiu $v0, $zero, 0x3 .LE000C2A0: /* 3283B0 E000C2A0 AE220038 */ sw $v0, 0x38($s1) .LE000C2A4: /* 3283B4 E000C2A4 AE20003C */ sw $zero, 0x3C($s1) /* 3283B8 E000C2A8 A6320000 */ sh $s2, 0x0($s1) /* 3283BC E000C2AC E6340004 */ swc1 $f20, 0x4($s1) /* 3283C0 E000C2B0 E6360008 */ swc1 $f22, 0x8($s1) /* 3283C4 E000C2B4 E638000C */ swc1 $f24, 0xC($s1) /* 3283C8 E000C2B8 2E420005 */ sltiu $v0, $s2, 0x5 /* 3283CC E000C2BC 104000D5 */ beqz $v0, .LE000C614 /* 3283D0 E000C2C0 26310044 */ addiu $s1, $s1, 0x44 /* 3283D4 E000C2C4 00121080 */ sll $v0, $s2, 2 /* 3283D8 E000C2C8 3C01E001 */ lui $at, (0xE0010000 >> 16) /* 3283DC E000C2CC 00220821 */ addu $at, $at, $v0 /* 3283E0 E000C2D0 8C22CD58 */ lw $v0, -0x32A8($at) /* 3283E4 E000C2D4 00400008 */ jr $v0 /* 3283E8 E000C2D8 00000000 */ nop /* 3283EC E000C2DC 24120001 */ addiu $s2, $zero, 0x1 /* 3283F0 E000C2E0 0253102A */ slt $v0, $s2, $s3 /* 3283F4 E000C2E4 104000CB */ beqz $v0, .LE000C614 /* 3283F8 E000C2E8 26300034 */ addiu $s0, $s1, 0x34 /* 3283FC E000C2EC 2411005A */ addiu $s1, $zero, 0x5A /* 328400 E000C2F0 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 328404 E000C2F4 4481F000 */ mtc1 $at, $f30 /* 328408 E000C2F8 3C013E99 */ lui $at, (0x3E999999 >> 16) /* 32840C E000C2FC 34219999 */ ori $at, $at, (0x3E999999 & 0xFFFF) /* 328410 E000C300 4481E000 */ mtc1 $at, $f28 /* 328414 E000C304 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 328418 E000C308 4481D000 */ mtc1 $at, $f26 /* 32841C E000C30C 3C01BE23 */ lui $at, (0xBE23D70A >> 16) /* 328420 E000C310 3421D70A */ ori $at, $at, (0xBE23D70A & 0xFFFF) /* 328424 E000C314 4481C000 */ mtc1 $at, $f24 /* 328428 E000C318 3C014080 */ lui $at, (0x40800000 >> 16) /* 32842C E000C31C 4481B000 */ mtc1 $at, $f22 .LE000C320: /* 328430 E000C320 44916000 */ mtc1 $s1, $f12 /* 328434 E000C324 00000000 */ nop /* 328438 E000C328 46806320 */ cvt.s.w $f12, $f12 /* 32843C E000C32C E61EFFDC */ swc1 $f30, -0x24($s0) /* 328440 E000C330 E61CFFE0 */ swc1 $f28, -0x20($s0) /* 328444 E000C334 AE00FFE4 */ sw $zero, -0x1C($s0) /* 328448 E000C338 AE00FFE8 */ sw $zero, -0x18($s0) /* 32844C E000C33C E61AFFEC */ swc1 $f26, -0x14($s0) /* 328450 E000C340 E618FFF0 */ swc1 $f24, -0x10($s0) /* 328454 E000C344 AE00FFF4 */ sw $zero, -0xC($s0) /* 328458 E000C348 AE00FFF8 */ sw $zero, -0x8($s0) /* 32845C E000C34C AE00FFD0 */ sw $zero, -0x30($s0) /* 328460 E000C350 AE00FFD4 */ sw $zero, -0x2C($s0) /* 328464 E000C354 0C08013C */ jal shim_clamp_angle /* 328468 E000C358 E616FFD8 */ swc1 $f22, -0x28($s0) /* 32846C E000C35C 46000506 */ mov.s $f20, $f0 /* 328470 E000C360 0C080140 */ jal shim_sin_deg /* 328474 E000C364 4600A306 */ mov.s $f12, $f20 /* 328478 E000C368 4600A306 */ mov.s $f12, $f20 /* 32847C E000C36C 0C080144 */ jal shim_cos_deg /* 328480 E000C370 E600FFFC */ swc1 $f0, -0x4($s0) /* 328484 E000C374 263100B4 */ addiu $s1, $s1, 0xB4 /* 328488 E000C378 26520001 */ addiu $s2, $s2, 0x1 /* 32848C E000C37C E6000000 */ swc1 $f0, 0x0($s0) /* 328490 E000C380 0253102A */ slt $v0, $s2, $s3 /* 328494 E000C384 1440FFE6 */ bnez $v0, .LE000C320 /* 328498 E000C388 26100044 */ addiu $s0, $s0, 0x44 /* 32849C E000C38C 08003185 */ j .LE000C614 /* 3284A0 E000C390 00000000 */ nop /* 3284A4 E000C394 24120001 */ addiu $s2, $zero, 0x1 /* 3284A8 E000C398 0253102A */ slt $v0, $s2, $s3 /* 3284AC E000C39C 1040009D */ beqz $v0, .LE000C614 /* 3284B0 E000C3A0 26300034 */ addiu $s0, $s1, 0x34 /* 3284B4 E000C3A4 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 3284B8 E000C3A8 4481B000 */ mtc1 $at, $f22 /* 3284BC E000C3AC 3C01BD23 */ lui $at, (0xBD23D70A >> 16) /* 3284C0 E000C3B0 3421D70A */ ori $at, $at, (0xBD23D70A & 0xFFFF) /* 3284C4 E000C3B4 4481D000 */ mtc1 $at, $f26 /* 3284C8 E000C3B8 3C013F70 */ lui $at, (0x3F70A3D7 >> 16) /* 3284CC E000C3BC 3421A3D7 */ ori $at, $at, (0x3F70A3D7 & 0xFFFF) /* 3284D0 E000C3C0 4481C000 */ mtc1 $at, $f24 .LE000C3C4: /* 3284D4 E000C3C4 2643FFFF */ addiu $v1, $s2, -0x1 /* 3284D8 E000C3C8 24020001 */ addiu $v0, $zero, 0x1 /* 3284DC E000C3CC 1062001E */ beq $v1, $v0, .LE000C448 /* 3284E0 E000C3D0 28620002 */ slti $v0, $v1, 0x2 /* 3284E4 E000C3D4 10400005 */ beqz $v0, .LE000C3EC /* 3284E8 E000C3D8 24020002 */ addiu $v0, $zero, 0x2 /* 3284EC E000C3DC 10600007 */ beqz $v1, .LE000C3FC /* 3284F0 E000C3E0 00000000 */ nop /* 3284F4 E000C3E4 0800313E */ j .LE000C4F8 /* 3284F8 E000C3E8 26520001 */ addiu $s2, $s2, 0x1 .LE000C3EC: /* 3284FC E000C3EC 1062002B */ beq $v1, $v0, .LE000C49C /* 328500 E000C3F0 00000000 */ nop /* 328504 E000C3F4 0800313E */ j .LE000C4F8 /* 328508 E000C3F8 26520001 */ addiu $s2, $s2, 0x1 .LE000C3FC: /* 32850C E000C3FC 3C014307 */ lui $at, (0x43070000 >> 16) /* 328510 E000C400 4481A000 */ mtc1 $at, $f20 /* 328514 E000C404 0C080140 */ jal shim_sin_deg /* 328518 E000C408 4600A306 */ mov.s $f12, $f20 /* 32851C E000C40C 46000007 */ neg.s $f0, $f0 /* 328520 E000C410 46160002 */ mul.s $f0, $f0, $f22 /* 328524 E000C414 00000000 */ nop /* 328528 E000C418 4600A306 */ mov.s $f12, $f20 /* 32852C E000C41C AE00FFD4 */ sw $zero, -0x2C($s0) /* 328530 E000C420 0C080144 */ jal shim_cos_deg /* 328534 E000C424 E600FFD0 */ swc1 $f0, -0x30($s0) /* 328538 E000C428 46000007 */ neg.s $f0, $f0 /* 32853C E000C42C 46160002 */ mul.s $f0, $f0, $f22 /* 328540 E000C430 00000000 */ nop /* 328544 E000C434 3C013F73 */ lui $at, (0x3F733333 >> 16) /* 328548 E000C438 34213333 */ ori $at, $at, (0x3F733333 & 0xFFFF) /* 32854C E000C43C 44811000 */ mtc1 $at, $f2 /* 328550 E000C440 0800313A */ j .LE000C4E8 /* 328554 E000C444 E61AFFF0 */ swc1 $f26, -0x10($s0) .LE000C448: /* 328558 E000C448 3C01C307 */ lui $at, (0xC3070000 >> 16) /* 32855C E000C44C 4481A000 */ mtc1 $at, $f20 /* 328560 E000C450 0C080140 */ jal shim_sin_deg /* 328564 E000C454 4600A306 */ mov.s $f12, $f20 /* 328568 E000C458 46000007 */ neg.s $f0, $f0 /* 32856C E000C45C 46160002 */ mul.s $f0, $f0, $f22 /* 328570 E000C460 00000000 */ nop /* 328574 E000C464 3C014080 */ lui $at, (0x40800000 >> 16) /* 328578 E000C468 44811000 */ mtc1 $at, $f2 /* 32857C E000C46C 4600A306 */ mov.s $f12, $f20 /* 328580 E000C470 E602FFD4 */ swc1 $f2, -0x2C($s0) /* 328584 E000C474 0C080144 */ jal shim_cos_deg /* 328588 E000C478 E600FFD0 */ swc1 $f0, -0x30($s0) /* 32858C E000C47C 46000007 */ neg.s $f0, $f0 /* 328590 E000C480 46160002 */ mul.s $f0, $f0, $f22 /* 328594 E000C484 00000000 */ nop /* 328598 E000C488 3C013F59 */ lui $at, (0x3F599999 >> 16) /* 32859C E000C48C 34219999 */ ori $at, $at, (0x3F599999 & 0xFFFF) /* 3285A0 E000C490 44811000 */ mtc1 $at, $f2 /* 3285A4 E000C494 0800313A */ j .LE000C4E8 /* 3285A8 E000C498 E61AFFF0 */ swc1 $f26, -0x10($s0) .LE000C49C: /* 3285AC E000C49C 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 3285B0 E000C4A0 4481A000 */ mtc1 $at, $f20 /* 3285B4 E000C4A4 0C080140 */ jal shim_sin_deg /* 3285B8 E000C4A8 4600A306 */ mov.s $f12, $f20 /* 3285BC E000C4AC 46000007 */ neg.s $f0, $f0 /* 3285C0 E000C4B0 46160002 */ mul.s $f0, $f0, $f22 /* 3285C4 E000C4B4 00000000 */ nop /* 3285C8 E000C4B8 3C014120 */ lui $at, (0x41200000 >> 16) /* 3285CC E000C4BC 44811000 */ mtc1 $at, $f2 /* 3285D0 E000C4C0 4600A306 */ mov.s $f12, $f20 /* 3285D4 E000C4C4 E602FFD4 */ swc1 $f2, -0x2C($s0) /* 3285D8 E000C4C8 0C080144 */ jal shim_cos_deg /* 3285DC E000C4CC E600FFD0 */ swc1 $f0, -0x30($s0) /* 3285E0 E000C4D0 46000007 */ neg.s $f0, $f0 /* 3285E4 E000C4D4 46160002 */ mul.s $f0, $f0, $f22 /* 3285E8 E000C4D8 00000000 */ nop /* 3285EC E000C4DC 3C013F40 */ lui $at, (0x3F400000 >> 16) /* 3285F0 E000C4E0 44811000 */ mtc1 $at, $f2 /* 3285F4 E000C4E4 E61AFFF0 */ swc1 $f26, -0x10($s0) .LE000C4E8: /* 3285F8 E000C4E8 E618FFF4 */ swc1 $f24, -0xC($s0) /* 3285FC E000C4EC E602FFEC */ swc1 $f2, -0x14($s0) /* 328600 E000C4F0 E600FFD8 */ swc1 $f0, -0x28($s0) /* 328604 E000C4F4 26520001 */ addiu $s2, $s2, 0x1 .LE000C4F8: /* 328608 E000C4F8 AE00FFFC */ sw $zero, -0x4($s0) /* 32860C E000C4FC AE000000 */ sw $zero, 0x0($s0) /* 328610 E000C500 0253102A */ slt $v0, $s2, $s3 /* 328614 E000C504 1440FFAF */ bnez $v0, .LE000C3C4 /* 328618 E000C508 26100044 */ addiu $s0, $s0, 0x44 /* 32861C E000C50C 08003185 */ j .LE000C614 /* 328620 E000C510 00000000 */ nop /* 328624 E000C514 24120001 */ addiu $s2, $zero, 0x1 /* 328628 E000C518 0253102A */ slt $v0, $s2, $s3 /* 32862C E000C51C 1040003D */ beqz $v0, .LE000C614 /* 328630 E000C520 2674FFFF */ addiu $s4, $s3, -0x1 /* 328634 E000C524 26300034 */ addiu $s0, $s1, 0x34 /* 328638 E000C528 0000882D */ daddu $s1, $zero, $zero /* 32863C E000C52C 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 328640 E000C530 4481F000 */ mtc1 $at, $f30 /* 328644 E000C534 3C013F6E */ lui $at, (0x3F6E147B >> 16) /* 328648 E000C538 3421147B */ ori $at, $at, (0x3F6E147B & 0xFFFF) /* 32864C E000C53C 4481E000 */ mtc1 $at, $f28 /* 328650 E000C540 3C013DCC */ lui $at, (0x3DCCCCCC >> 16) /* 328654 E000C544 3421CCCC */ ori $at, $at, (0x3DCCCCCC & 0xFFFF) /* 328658 E000C548 4481D000 */ mtc1 $at, $f26 /* 32865C E000C54C 3C013F70 */ lui $at, (0x3F70A3D7 >> 16) /* 328660 E000C550 3421A3D7 */ ori $at, $at, (0x3F70A3D7 & 0xFFFF) /* 328664 E000C554 4481C000 */ mtc1 $at, $f24 /* 328668 E000C558 3C014120 */ lui $at, (0x41200000 >> 16) /* 32866C E000C55C 4481B000 */ mtc1 $at, $f22 .LE000C560: /* 328670 E000C560 16800002 */ bnez $s4, .LE000C56C /* 328674 E000C564 0234001A */ div $zero, $s1, $s4 /* 328678 E000C568 0007000D */ break 7 .LE000C56C: /* 32867C E000C56C 2401FFFF */ addiu $at, $zero, -0x1 /* 328680 E000C570 16810004 */ bne $s4, $at, .LE000C584 /* 328684 E000C574 3C018000 */ lui $at, (0x80000000 >> 16) /* 328688 E000C578 16210002 */ bne $s1, $at, .LE000C584 /* 32868C E000C57C 00000000 */ nop /* 328690 E000C580 0006000D */ break 6 .LE000C584: /* 328694 E000C584 00001812 */ mflo $v1 /* 328698 E000C588 E61EFFDC */ swc1 $f30, -0x24($s0) /* 32869C E000C58C E61CFFE0 */ swc1 $f28, -0x20($s0) /* 3286A0 E000C590 AE00FFEC */ sw $zero, -0x14($s0) /* 3286A4 E000C594 E61AFFF0 */ swc1 $f26, -0x10($s0) /* 3286A8 E000C598 C7A40080 */ lwc1 $f4, 0x80($sp) /* 3286AC E000C59C 44830000 */ mtc1 $v1, $f0 /* 3286B0 E000C5A0 00000000 */ nop /* 3286B4 E000C5A4 46800020 */ cvt.s.w $f0, $f0 /* 3286B8 E000C5A8 46002500 */ add.s $f20, $f4, $f0 /* 3286BC E000C5AC E618FFF4 */ swc1 $f24, -0xC($s0) /* 3286C0 E000C5B0 E618FFF8 */ swc1 $f24, -0x8($s0) /* 3286C4 E000C5B4 0C080140 */ jal shim_sin_deg /* 3286C8 E000C5B8 4600A306 */ mov.s $f12, $f20 /* 3286CC E000C5BC 46000007 */ neg.s $f0, $f0 /* 3286D0 E000C5C0 46160002 */ mul.s $f0, $f0, $f22 /* 3286D4 E000C5C4 00000000 */ nop /* 3286D8 E000C5C8 4600A306 */ mov.s $f12, $f20 /* 3286DC E000C5CC AE00FFD4 */ sw $zero, -0x2C($s0) /* 3286E0 E000C5D0 0C080144 */ jal shim_cos_deg /* 3286E4 E000C5D4 E600FFD0 */ swc1 $f0, -0x30($s0) /* 3286E8 E000C5D8 46000007 */ neg.s $f0, $f0 /* 3286EC E000C5DC 46160002 */ mul.s $f0, $f0, $f22 /* 3286F0 E000C5E0 00000000 */ nop /* 3286F4 E000C5E4 26310168 */ addiu $s1, $s1, 0x168 /* 3286F8 E000C5E8 26520001 */ addiu $s2, $s2, 0x1 /* 3286FC E000C5EC 4600A306 */ mov.s $f12, $f20 /* 328700 E000C5F0 0C080140 */ jal shim_sin_deg /* 328704 E000C5F4 E600FFD8 */ swc1 $f0, -0x28($s0) /* 328708 E000C5F8 4600A306 */ mov.s $f12, $f20 /* 32870C E000C5FC 0C080144 */ jal shim_cos_deg /* 328710 E000C600 E600FFFC */ swc1 $f0, -0x4($s0) /* 328714 E000C604 E6000000 */ swc1 $f0, 0x0($s0) /* 328718 E000C608 0253102A */ slt $v0, $s2, $s3 /* 32871C E000C60C 1440FFD4 */ bnez $v0, .LE000C560 /* 328720 E000C610 26100044 */ addiu $s0, $s0, 0x44 .LE000C614: /* 328724 E000C614 8FBF003C */ lw $ra, 0x3C($sp) /* 328728 E000C618 8FB40038 */ lw $s4, 0x38($sp) /* 32872C E000C61C 8FB30034 */ lw $s3, 0x34($sp) /* 328730 E000C620 8FB20030 */ lw $s2, 0x30($sp) /* 328734 E000C624 8FB1002C */ lw $s1, 0x2C($sp) /* 328738 E000C628 8FB00028 */ lw $s0, 0x28($sp) /* 32873C E000C62C D7BE0068 */ ldc1 $f30, 0x68($sp) /* 328740 E000C630 D7BC0060 */ ldc1 $f28, 0x60($sp) /* 328744 E000C634 D7BA0058 */ ldc1 $f26, 0x58($sp) /* 328748 E000C638 D7B80050 */ ldc1 $f24, 0x50($sp) /* 32874C E000C63C D7B60048 */ ldc1 $f22, 0x48($sp) /* 328750 E000C640 D7B40040 */ ldc1 $f20, 0x40($sp) /* 328754 E000C644 03E00008 */ jr $ra /* 328758 E000C648 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: void landing_dust_main(s32 type, f32 x, f32 y, f32 z, f32 arg4) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; LandingDustFXData* data; f32 theta; f32 temp_f20_2; s32 numParts; s32 i; switch (type) { case 2: numParts = 1; break; case 3: numParts = 4; break; case 4: numParts = 9; break; default: numParts = 3; break; } bpPtr->init = landing_dust_init; bpPtr->update = landing_dust_update; bpPtr->renderWorld = landing_dust_render; bpPtr->unk_00 = 0; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_LANDING_DUST; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; data = shim_general_heap_malloc(numParts * sizeof(*data)); effect->data.landingDust = data; ASSERT(effect->data.landingDust != NULL); shim_mem_clear(data, numParts * sizeof(*data)); switch (type) { case 0: case 1: data->unk_38 = 0; break; case 3: data->unk_38 = 2; break; case 2: case 4: data->unk_38 = 3; break; } data->unk_3C = 0; data->type = type; data->x = x; data->y = y; data->z = z; data++; switch (type) { case 0: case 1: for (i = 1; i < numParts; i++, data++) { data->unk_10 = -3.0f; data->unk_14 = 0.29999998f; data->unk_18 = 0; data->unk_1C = 0; data->unk_20 = 1.75f; data->unk_24 = -0.16f; data->unk_28 = 0.0f; data->unk_2C = 0.0f; data->x = 0.0f; data->y = 0.0f; data->z = 4.0f; theta = shim_clamp_angle(90 + (180 * (i - 1))); data->unk_30 = shim_sin_deg(theta); data->unk_34 = shim_cos_deg(theta); } break; case 2: break; case 3: for (i = 1; i < numParts; i++, data++) { switch (i - 1) { case 0: theta = 135.0f; data->x = -shim_sin_deg(theta) * 25.0f; data->y = 0.0f; data->z = -shim_cos_deg(theta) * 25.0f; data->unk_24 = -0.04f; data->unk_28 = 0.94f; data->unk_20 = 0.95f; break; case 1: theta = -135.0f; data->x = -shim_sin_deg(theta) * 25.0f; data->y = 4.0f; data->z = -shim_cos_deg(theta) * 25.0f; data->unk_24 = -0.04f; data->unk_28 = 0.94f; data->unk_20 = 0.84999996f; break; case 2: theta = 20.0f; data->x = -shim_sin_deg(theta) * 25.0f; data->y = 10.0f; data->z = -shim_cos_deg(theta) * 25.0f; data->unk_24 = -0.04f; data->unk_28 = 0.94f; data->unk_20 = 0.75f; break; } data->unk_30 = 0.0f; data->unk_34 = 0.0f; } break; case 4: for (i = 1; i < numParts; i++, data++) { data->unk_10 = -3.0f; data->unk_14 = 0.93f; data->unk_20 = 0.0f; data->unk_24 = 0.099999994f; data->unk_28 = 0.94f; data->unk_2C = 0.94f; theta = arg4 + ((i - 1) * 360 / (numParts - 1)); data->x = -shim_sin_deg(theta) * 10.0f; data->y = 0.0f; data->z = -shim_cos_deg(theta) * 10.0f; data->unk_30 = shim_sin_deg(theta); data->unk_34 = shim_cos_deg(theta); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel cold_breath_appendGfx /* 3D89C8 E00DE2A8 27BDFF38 */ addiu $sp, $sp, -0xC8 /* 3D89CC E00DE2AC 0080302D */ daddu $a2, $a0, $zero /* 3D89D0 E00DE2B0 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3D89D4 E00DE2B4 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3D89D8 E00DE2B8 27A40020 */ addiu $a0, $sp, 0x20 /* 3D89DC E00DE2BC AFB400B0 */ sw $s4, 0xB0($sp) /* 3D89E0 E00DE2C0 3C140001 */ lui $s4, (0x11630 >> 16) /* 3D89E4 E00DE2C4 AFB200A8 */ sw $s2, 0xA8($sp) /* 3D89E8 E00DE2C8 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 3D89EC E00DE2CC 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 3D89F0 E00DE2D0 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 3D89F4 E00DE2D4 AFBF00C4 */ sw $ra, 0xC4($sp) /* 3D89F8 E00DE2D8 AFBE00C0 */ sw $fp, 0xC0($sp) /* 3D89FC E00DE2DC AFB700BC */ sw $s7, 0xBC($sp) /* 3D8A00 E00DE2E0 AFB600B8 */ sw $s6, 0xB8($sp) /* 3D8A04 E00DE2E4 AFB500B4 */ sw $s5, 0xB4($sp) /* 3D8A08 E00DE2E8 AFB300AC */ sw $s3, 0xAC($sp) /* 3D8A0C E00DE2EC AFB100A4 */ sw $s1, 0xA4($sp) /* 3D8A10 E00DE2F0 AFB000A0 */ sw $s0, 0xA0($sp) /* 3D8A14 E00DE2F4 8E430000 */ lw $v1, 0x0($s2) /* 3D8A18 E00DE2F8 8CD6000C */ lw $s6, 0xC($a2) /* 3D8A1C E00DE2FC 0060282D */ daddu $a1, $v1, $zero /* 3D8A20 E00DE300 24630008 */ addiu $v1, $v1, 0x8 /* 3D8A24 E00DE304 AE430000 */ sw $v1, 0x0($s2) /* 3D8A28 E00DE308 8EDE0014 */ lw $fp, 0x14($s6) /* 3D8A2C E00DE30C 8ED50024 */ lw $s5, 0x24($s6) /* 3D8A30 E00DE310 8ED70000 */ lw $s7, 0x0($s6) /* 3D8A34 E00DE314 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D8A38 E00DE318 ACA20000 */ sw $v0, 0x0($a1) /* 3D8A3C E00DE31C ACA00004 */ sw $zero, 0x4($a1) /* 3D8A40 E00DE320 AC670000 */ sw $a3, 0x0($v1) /* 3D8A44 E00DE324 8CC50010 */ lw $a1, 0x10($a2) /* 3D8A48 E00DE328 24620008 */ addiu $v0, $v1, 0x8 /* 3D8A4C E00DE32C AE420000 */ sw $v0, 0x0($s2) /* 3D8A50 E00DE330 8CA2001C */ lw $v0, 0x1C($a1) /* 3D8A54 E00DE334 3C0A8000 */ lui $t2, (0x80000000 >> 16) /* 3D8A58 E00DE338 004A1021 */ addu $v0, $v0, $t2 /* 3D8A5C E00DE33C AC620004 */ sw $v0, 0x4($v1) /* 3D8A60 E00DE340 3C03800B */ lui $v1, %hi(gCameras) /* 3D8A64 E00DE344 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3D8A68 E00DE348 8EC50004 */ lw $a1, 0x4($s6) /* 3D8A6C E00DE34C 8EC60008 */ lw $a2, 0x8($s6) /* 3D8A70 E00DE350 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3D8A74 E00DE354 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3D8A78 E00DE358 8EC7000C */ lw $a3, 0xC($s6) /* 3D8A7C E00DE35C 00028080 */ sll $s0, $v0, 2 /* 3D8A80 E00DE360 02028021 */ addu $s0, $s0, $v0 /* 3D8A84 E00DE364 00108080 */ sll $s0, $s0, 2 /* 3D8A88 E00DE368 02028023 */ subu $s0, $s0, $v0 /* 3D8A8C E00DE36C 001010C0 */ sll $v0, $s0, 3 /* 3D8A90 E00DE370 02028021 */ addu $s0, $s0, $v0 /* 3D8A94 E00DE374 001080C0 */ sll $s0, $s0, 3 /* 3D8A98 E00DE378 0C080108 */ jal shim_guTranslateF /* 3D8A9C E00DE37C 02038021 */ addu $s0, $s0, $v1 /* 3D8AA0 E00DE380 27B10060 */ addiu $s1, $sp, 0x60 /* 3D8AA4 E00DE384 8EC50040 */ lw $a1, 0x40($s6) /* 3D8AA8 E00DE388 0220202D */ daddu $a0, $s1, $zero /* 3D8AAC E00DE38C 00A0302D */ daddu $a2, $a1, $zero /* 3D8AB0 E00DE390 0C080110 */ jal shim_guScaleF /* 3D8AB4 E00DE394 00A0382D */ daddu $a3, $a1, $zero /* 3D8AB8 E00DE398 0220202D */ daddu $a0, $s1, $zero /* 3D8ABC E00DE39C 27A50020 */ addiu $a1, $sp, 0x20 /* 3D8AC0 E00DE3A0 0C080114 */ jal shim_guMtxCatF /* 3D8AC4 E00DE3A4 00A0302D */ daddu $a2, $a1, $zero /* 3D8AC8 E00DE3A8 27A40020 */ addiu $a0, $sp, 0x20 /* 3D8ACC E00DE3AC 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 3D8AD0 E00DE3B0 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 3D8AD4 E00DE3B4 3C13800A */ lui $s3, %hi(gDisplayContext) /* 3D8AD8 E00DE3B8 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 3D8ADC E00DE3BC 96250000 */ lhu $a1, 0x0($s1) /* 3D8AE0 E00DE3C0 8E620000 */ lw $v0, 0x0($s3) /* 3D8AE4 E00DE3C4 00052980 */ sll $a1, $a1, 6 /* 3D8AE8 E00DE3C8 00B42821 */ addu $a1, $a1, $s4 /* 3D8AEC E00DE3CC 0C080118 */ jal shim_guMtxF2L /* 3D8AF0 E00DE3D0 00452821 */ addu $a1, $v0, $a1 /* 3D8AF4 E00DE3D4 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3D8AF8 E00DE3D8 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3D8AFC E00DE3DC 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 3D8B00 E00DE3E0 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 3D8B04 E00DE3E4 44950000 */ mtc1 $s5, $f0 /* 3D8B08 E00DE3E8 00000000 */ nop /* 3D8B0C E00DE3EC 46800021 */ cvt.d.w $f0, $f0 /* 3D8B10 E00DE3F0 8E440000 */ lw $a0, 0x0($s2) /* 3D8B14 E00DE3F4 96220000 */ lhu $v0, 0x0($s1) /* 3D8B18 E00DE3F8 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3D8B1C E00DE3FC 44811800 */ mtc1 $at, $f3 /* 3D8B20 E00DE400 44801000 */ mtc1 $zero, $f2 /* 3D8B24 E00DE404 0080282D */ daddu $a1, $a0, $zero /* 3D8B28 E00DE408 24840008 */ addiu $a0, $a0, 0x8 /* 3D8B2C E00DE40C AE440000 */ sw $a0, 0x0($s2) /* 3D8B30 E00DE410 ACA30000 */ sw $v1, 0x0($a1) /* 3D8B34 E00DE414 24430001 */ addiu $v1, $v0, 0x1 /* 3D8B38 E00DE418 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D8B3C E00DE41C 00021180 */ sll $v0, $v0, 6 /* 3D8B40 E00DE420 00541021 */ addu $v0, $v0, $s4 /* 3D8B44 E00DE424 2487000C */ addiu $a3, $a0, 0xC /* 3D8B48 E00DE428 46220002 */ mul.d $f0, $f0, $f2 /* 3D8B4C E00DE42C 00000000 */ nop /* 3D8B50 E00DE430 A6230000 */ sh $v1, 0x0($s1) /* 3D8B54 E00DE434 8E630000 */ lw $v1, 0x0($s3) /* 3D8B58 E00DE438 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* 3D8B5C E00DE43C 44811800 */ mtc1 $at, $f3 /* 3D8B60 E00DE440 44801000 */ mtc1 $zero, $f2 /* 3D8B64 E00DE444 00621821 */ addu $v1, $v1, $v0 /* 3D8B68 E00DE448 24820008 */ addiu $v0, $a0, 0x8 /* 3D8B6C E00DE44C ACA30004 */ sw $v1, 0x4($a1) /* 3D8B70 E00DE450 AE420000 */ sw $v0, 0x0($s2) /* 3D8B74 E00DE454 24820010 */ addiu $v0, $a0, 0x10 /* 3D8B78 E00DE458 AC860000 */ sw $a2, 0x0($a0) /* 3D8B7C E00DE45C AE420000 */ sw $v0, 0x0($s2) /* 3D8B80 E00DE460 8E030204 */ lw $v1, 0x204($s0) /* 3D8B84 E00DE464 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3D8B88 E00DE468 AC820008 */ sw $v0, 0x8($a0) /* 3D8B8C E00DE46C AC830004 */ sw $v1, 0x4($a0) /* 3D8B90 E00DE470 92C4001B */ lbu $a0, 0x1B($s6) /* 3D8B94 E00DE474 92C2001F */ lbu $v0, 0x1F($s6) /* 3D8B98 E00DE478 92C30023 */ lbu $v1, 0x23($s6) /* 3D8B9C E00DE47C 00042600 */ sll $a0, $a0, 24 /* 3D8BA0 E00DE480 00021400 */ sll $v0, $v0, 16 /* 3D8BA4 E00DE484 00822025 */ or $a0, $a0, $v0 /* 3D8BA8 E00DE488 00031A00 */ sll $v1, $v1, 8 /* 3D8BAC E00DE48C 4620103E */ c.le.d $f2, $f0 /* 3D8BB0 E00DE490 00000000 */ nop /* 3D8BB4 E00DE494 45010005 */ bc1t .LE00DE4AC /* 3D8BB8 E00DE498 00832025 */ or $a0, $a0, $v1 /* 3D8BBC E00DE49C 4620010D */ trunc.w.d $f4, $f0 /* 3D8BC0 E00DE4A0 44022000 */ mfc1 $v0, $f4 /* 3D8BC4 E00DE4A4 08037931 */ j .LE00DE4C4 /* 3D8BC8 E00DE4A8 3C05E300 */ lui $a1, (0xE3001A01 >> 16) .LE00DE4AC: /* 3D8BCC E00DE4AC 46220001 */ sub.d $f0, $f0, $f2 /* 3D8BD0 E00DE4B0 4620010D */ trunc.w.d $f4, $f0 /* 3D8BD4 E00DE4B4 44022000 */ mfc1 $v0, $f4 /* 3D8BD8 E00DE4B8 3C0A8000 */ lui $t2, (0x80000000 >> 16) /* 3D8BDC E00DE4BC 004A1025 */ or $v0, $v0, $t2 /* 3D8BE0 E00DE4C0 3C05E300 */ lui $a1, (0xE3001A01 >> 16) .LE00DE4C4: /* 3D8BE4 E00DE4C4 34A51A01 */ ori $a1, $a1, (0xE3001A01 & 0xFFFF) /* 3D8BE8 E00DE4C8 03C0302D */ daddu $a2, $fp, $zero /* 3D8BEC E00DE4CC 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 3D8BF0 E00DE4D0 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 3D8BF4 E00DE4D4 304200FF */ andi $v0, $v0, 0xFF /* 3D8BF8 E00DE4D8 8E830000 */ lw $v1, 0x0($s4) /* 3D8BFC E00DE4DC 00821025 */ or $v0, $a0, $v0 /* 3D8C00 E00DE4E0 ACE20000 */ sw $v0, 0x0($a3) /* 3D8C04 E00DE4E4 24020020 */ addiu $v0, $zero, 0x20 /* 3D8C08 E00DE4E8 0060202D */ daddu $a0, $v1, $zero /* 3D8C0C E00DE4EC 24630008 */ addiu $v1, $v1, 0x8 /* 3D8C10 E00DE4F0 AE830000 */ sw $v1, 0x0($s4) /* 3D8C14 E00DE4F4 AC820004 */ sw $v0, 0x4($a0) /* 3D8C18 E00DE4F8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D8C1C E00DE4FC AC850000 */ sw $a1, 0x0($a0) /* 3D8C20 E00DE500 AC620000 */ sw $v0, 0x0($v1) /* 3D8C24 E00DE504 00171080 */ sll $v0, $s7, 2 /* 3D8C28 E00DE508 3C04E00E */ lui $a0, (0xE00E0000 >> 16) /* 3D8C2C E00DE50C 00822021 */ addu $a0, $a0, $v0 /* 3D8C30 E00DE510 8C84E84C */ lw $a0, -0x17B4($a0) /* 3D8C34 E00DE514 24620008 */ addiu $v0, $v1, 0x8 /* 3D8C38 E00DE518 AE820000 */ sw $v0, 0x0($s4) /* 3D8C3C E00DE51C 28C2001E */ slti $v0, $a2, 0x1E /* 3D8C40 E00DE520 14400002 */ bnez $v0, .LE00DE52C /* 3D8C44 E00DE524 AC640004 */ sw $a0, 0x4($v1) /* 3D8C48 E00DE528 2406001D */ addiu $a2, $zero, 0x1D .LE00DE52C: /* 3D8C4C E00DE52C 27A40020 */ addiu $a0, $sp, 0x20 /* 3D8C50 E00DE530 3C130001 */ lui $s3, (0x11630 >> 16) /* 3D8C54 E00DE534 00178100 */ sll $s0, $s7, 4 /* 3D8C58 E00DE538 02178023 */ subu $s0, $s0, $s7 /* 3D8C5C E00DE53C 00108040 */ sll $s0, $s0, 1 /* 3D8C60 E00DE540 00D08021 */ addu $s0, $a2, $s0 /* 3D8C64 E00DE544 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3D8C68 E00DE548 3C02E00E */ lui $v0, (0xE00E0000 >> 16) /* 3D8C6C E00DE54C 00501021 */ addu $v0, $v0, $s0 /* 3D8C70 E00DE550 9042E96C */ lbu $v0, -0x1694($v0) /* 3D8C74 E00DE554 44801000 */ mtc1 $zero, $f2 /* 3D8C78 E00DE558 44820000 */ mtc1 $v0, $f0 /* 3D8C7C E00DE55C 00000000 */ nop /* 3D8C80 E00DE560 46800020 */ cvt.s.w $f0, $f0 /* 3D8C84 E00DE564 46000007 */ neg.s $f0, $f0 /* 3D8C88 E00DE568 44070000 */ mfc1 $a3, $f0 /* 3D8C8C E00DE56C 44051000 */ mfc1 $a1, $f2 /* 3D8C90 E00DE570 3C02E00E */ lui $v0, (0xE00E0000 >> 16) /* 3D8C94 E00DE574 00501021 */ addu $v0, $v0, $s0 /* 3D8C98 E00DE578 9042E8B4 */ lbu $v0, -0x174C($v0) /* 3D8C9C E00DE57C 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 3D8CA0 E00DE580 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 3D8CA4 E00DE584 44810000 */ mtc1 $at, $f0 /* 3D8CA8 E00DE588 00A0302D */ daddu $a2, $a1, $zero /* 3D8CAC E00DE58C 44821000 */ mtc1 $v0, $f2 /* 3D8CB0 E00DE590 00000000 */ nop /* 3D8CB4 E00DE594 468010A0 */ cvt.s.w $f2, $f2 /* 3D8CB8 E00DE598 3C02E00E */ lui $v0, (0xE00E0000 >> 16) /* 3D8CBC E00DE59C 00501021 */ addu $v0, $v0, $s0 /* 3D8CC0 E00DE5A0 8042E858 */ lb $v0, -0x17A8($v0) /* 3D8CC4 E00DE5A4 46001082 */ mul.s $f2, $f2, $f0 /* 3D8CC8 E00DE5A8 00000000 */ nop /* 3D8CCC E00DE5AC AFA50018 */ sw $a1, 0x18($sp) /* 3D8CD0 E00DE5B0 AFA5001C */ sw $a1, 0x1C($sp) /* 3D8CD4 E00DE5B4 44820000 */ mtc1 $v0, $f0 /* 3D8CD8 E00DE5B8 00000000 */ nop /* 3D8CDC E00DE5BC 46800020 */ cvt.s.w $f0, $f0 /* 3D8CE0 E00DE5C0 E7A00014 */ swc1 $f0, 0x14($sp) /* 3D8CE4 E00DE5C4 0C080180 */ jal shim_guPositionF /* 3D8CE8 E00DE5C8 E7A20010 */ swc1 $f2, 0x10($sp) /* 3D8CEC E00DE5CC 27A40020 */ addiu $a0, $sp, 0x20 /* 3D8CF0 E00DE5D0 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 3D8CF4 E00DE5D4 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 3D8CF8 E00DE5D8 3C12800A */ lui $s2, %hi(gDisplayContext) /* 3D8CFC E00DE5DC 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 3D8D00 E00DE5E0 96250000 */ lhu $a1, 0x0($s1) /* 3D8D04 E00DE5E4 8E420000 */ lw $v0, 0x0($s2) /* 3D8D08 E00DE5E8 00052980 */ sll $a1, $a1, 6 /* 3D8D0C E00DE5EC 00B32821 */ addu $a1, $a1, $s3 /* 3D8D10 E00DE5F0 0C080118 */ jal shim_guMtxF2L /* 3D8D14 E00DE5F4 00452821 */ addu $a1, $v0, $a1 /* 3D8D18 E00DE5F8 8E850000 */ lw $a1, 0x0($s4) /* 3D8D1C E00DE5FC 00A0202D */ daddu $a0, $a1, $zero /* 3D8D20 E00DE600 24A50008 */ addiu $a1, $a1, 0x8 /* 3D8D24 E00DE604 AE850000 */ sw $a1, 0x0($s4) /* 3D8D28 E00DE608 96220000 */ lhu $v0, 0x0($s1) /* 3D8D2C E00DE60C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3D8D30 E00DE610 AC830000 */ sw $v1, 0x0($a0) /* 3D8D34 E00DE614 24430001 */ addiu $v1, $v0, 0x1 /* 3D8D38 E00DE618 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D8D3C E00DE61C 00021180 */ sll $v0, $v0, 6 /* 3D8D40 E00DE620 A6230000 */ sh $v1, 0x0($s1) /* 3D8D44 E00DE624 8E430000 */ lw $v1, 0x0($s2) /* 3D8D48 E00DE628 00531021 */ addu $v0, $v0, $s3 /* 3D8D4C E00DE62C 00621821 */ addu $v1, $v1, $v0 /* 3D8D50 E00DE630 AC830004 */ sw $v1, 0x4($a0) /* 3D8D54 E00DE634 3C02E00E */ lui $v0, (0xE00E0000 >> 16) /* 3D8D58 E00DE638 00501021 */ addu $v0, $v0, $s0 /* 3D8D5C E00DE63C 9042E910 */ lbu $v0, -0x16F0($v0) /* 3D8D60 E00DE640 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 3D8D64 E00DE644 44811000 */ mtc1 $at, $f2 /* 3D8D68 E00DE648 44820000 */ mtc1 $v0, $f0 /* 3D8D6C E00DE64C 00000000 */ nop /* 3D8D70 E00DE650 46800020 */ cvt.s.w $f0, $f0 /* 3D8D74 E00DE654 46020002 */ mul.s $f0, $f0, $f2 /* 3D8D78 E00DE658 00000000 */ nop /* 3D8D7C E00DE65C 3C013B80 */ lui $at, (0x3B800000 >> 16) /* 3D8D80 E00DE660 44811000 */ mtc1 $at, $f2 /* 3D8D84 E00DE664 00000000 */ nop /* 3D8D88 E00DE668 46020002 */ mul.s $f0, $f0, $f2 /* 3D8D8C E00DE66C 00000000 */ nop /* 3D8D90 E00DE670 4600010D */ trunc.w.s $f4, $f0 /* 3D8D94 E00DE674 44082000 */ mfc1 $t0, $f4 /* 3D8D98 E00DE678 00000000 */ nop /* 3D8D9C E00DE67C 44881000 */ mtc1 $t0, $f2 /* 3D8DA0 E00DE680 00000000 */ nop /* 3D8DA4 E00DE684 468010A0 */ cvt.s.w $f2, $f2 /* 3D8DA8 E00DE688 46020001 */ sub.s $f0, $f0, $f2 /* 3D8DAC E00DE68C 3C014380 */ lui $at, (0x43800000 >> 16) /* 3D8DB0 E00DE690 44811000 */ mtc1 $at, $f2 /* 3D8DB4 E00DE694 00000000 */ nop /* 3D8DB8 E00DE698 46020002 */ mul.s $f0, $f0, $f2 /* 3D8DBC E00DE69C 00000000 */ nop /* 3D8DC0 E00DE6A0 29020004 */ slti $v0, $t0, 0x4 /* 3D8DC4 E00DE6A4 38430001 */ xori $v1, $v0, 0x1 /* 3D8DC8 E00DE6A8 29020005 */ slti $v0, $t0, 0x5 /* 3D8DCC E00DE6AC 4600010D */ trunc.w.s $f4, $f0 /* 3D8DD0 E00DE6B0 44092000 */ mfc1 $t1, $f4 /* 3D8DD4 E00DE6B4 1040002F */ beqz $v0, .LE00DE774 /* 3D8DD8 E00DE6B8 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3D8DDC E00DE6BC 10600006 */ beqz $v1, .LE00DE6D8 /* 3D8DE0 E00DE6C0 24A20008 */ addiu $v0, $a1, 0x8 /* 3D8DE4 E00DE6C4 AE820000 */ sw $v0, 0x0($s4) /* 3D8DE8 E00DE6C8 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 3D8DEC E00DE6CC ACA20000 */ sw $v0, 0x0($a1) /* 3D8DF0 E00DE6D0 080379BC */ j .LE00DE6F0 /* 3D8DF4 E00DE6D4 3C020100 */ lui $v0, (0x1000000 >> 16) .LE00DE6D8: /* 3D8DF8 E00DE6D8 3C020107 */ lui $v0, (0x107C1FC >> 16) /* 3D8DFC E00DE6DC 3442C1FC */ ori $v0, $v0, (0x107C1FC & 0xFFFF) /* 3D8E00 E00DE6E0 24A30008 */ addiu $v1, $a1, 0x8 /* 3D8E04 E00DE6E4 AE830000 */ sw $v1, 0x0($s4) /* 3D8E08 E00DE6E8 3C03F200 */ lui $v1, (0xF2000000 >> 16) /* 3D8E0C E00DE6EC ACA30000 */ sw $v1, 0x0($a1) .LE00DE6F0: /* 3D8E10 E00DE6F0 ACA20004 */ sw $v0, 0x4($a1) /* 3D8E14 E00DE6F4 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 3D8E18 E00DE6F8 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 3D8E1C E00DE6FC 8CC50000 */ lw $a1, 0x0($a2) /* 3D8E20 E00DE700 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3D8E24 E00DE704 00A0382D */ daddu $a3, $a1, $zero /* 3D8E28 E00DE708 24A50008 */ addiu $a1, $a1, 0x8 /* 3D8E2C E00DE70C ACC50000 */ sw $a1, 0x0($a2) /* 3D8E30 E00DE710 ACE20000 */ sw $v0, 0x0($a3) /* 3D8E34 E00DE714 92C2002B */ lbu $v0, 0x2B($s6) /* 3D8E38 E00DE718 92C4002F */ lbu $a0, 0x2F($s6) /* 3D8E3C E00DE71C 92C30033 */ lbu $v1, 0x33($s6) /* 3D8E40 E00DE720 00021600 */ sll $v0, $v0, 24 /* 3D8E44 E00DE724 00042400 */ sll $a0, $a0, 16 /* 3D8E48 E00DE728 00441025 */ or $v0, $v0, $a0 /* 3D8E4C E00DE72C 00031A00 */ sll $v1, $v1, 8 /* 3D8E50 E00DE730 00431025 */ or $v0, $v0, $v1 /* 3D8E54 E00DE734 312300FF */ andi $v1, $t1, 0xFF /* 3D8E58 E00DE738 00431025 */ or $v0, $v0, $v1 /* 3D8E5C E00DE73C ACE20004 */ sw $v0, 0x4($a3) /* 3D8E60 E00DE740 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D8E64 E00DE744 ACA20000 */ sw $v0, 0x0($a1) /* 3D8E68 E00DE748 00171080 */ sll $v0, $s7, 2 /* 3D8E6C E00DE74C 00571021 */ addu $v0, $v0, $s7 /* 3D8E70 E00DE750 00481021 */ addu $v0, $v0, $t0 /* 3D8E74 E00DE754 00021080 */ sll $v0, $v0, 2 /* 3D8E78 E00DE758 3C03E00E */ lui $v1, (0xE00E0000 >> 16) /* 3D8E7C E00DE75C 00621821 */ addu $v1, $v1, $v0 /* 3D8E80 E00DE760 8C63E810 */ lw $v1, -0x17F0($v1) /* 3D8E84 E00DE764 24A20008 */ addiu $v0, $a1, 0x8 /* 3D8E88 E00DE768 ACC20000 */ sw $v0, 0x0($a2) /* 3D8E8C E00DE76C ACA30004 */ sw $v1, 0x4($a1) /* 3D8E90 E00DE770 3C06D838 */ lui $a2, (0xD8380002 >> 16) .LE00DE774: /* 3D8E94 E00DE774 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3D8E98 E00DE778 3C07E300 */ lui $a3, (0xE3001A01 >> 16) /* 3D8E9C E00DE77C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3D8EA0 E00DE780 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3D8EA4 E00DE784 34E71A01 */ ori $a3, $a3, (0xE3001A01 & 0xFFFF) /* 3D8EA8 E00DE788 8C820000 */ lw $v0, 0x0($a0) /* 3D8EAC E00DE78C 24050040 */ addiu $a1, $zero, 0x40 /* 3D8EB0 E00DE790 0040182D */ daddu $v1, $v0, $zero /* 3D8EB4 E00DE794 24420008 */ addiu $v0, $v0, 0x8 /* 3D8EB8 E00DE798 AC820000 */ sw $v0, 0x0($a0) /* 3D8EBC E00DE79C AC660000 */ sw $a2, 0x0($v1) /* 3D8EC0 E00DE7A0 AC650004 */ sw $a1, 0x4($v1) /* 3D8EC4 E00DE7A4 24430008 */ addiu $v1, $v0, 0x8 /* 3D8EC8 E00DE7A8 AC830000 */ sw $v1, 0x0($a0) /* 3D8ECC E00DE7AC 24430010 */ addiu $v1, $v0, 0x10 /* 3D8ED0 E00DE7B0 AC460000 */ sw $a2, 0x0($v0) /* 3D8ED4 E00DE7B4 AC450004 */ sw $a1, 0x4($v0) /* 3D8ED8 E00DE7B8 AC830000 */ sw $v1, 0x0($a0) /* 3D8EDC E00DE7BC 24030030 */ addiu $v1, $zero, 0x30 /* 3D8EE0 E00DE7C0 AC43000C */ sw $v1, 0xC($v0) /* 3D8EE4 E00DE7C4 24430018 */ addiu $v1, $v0, 0x18 /* 3D8EE8 E00DE7C8 AC470008 */ sw $a3, 0x8($v0) /* 3D8EEC E00DE7CC AC830000 */ sw $v1, 0x0($a0) /* 3D8EF0 E00DE7D0 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 3D8EF4 E00DE7D4 AC430010 */ sw $v1, 0x10($v0) /* 3D8EF8 E00DE7D8 AC400014 */ sw $zero, 0x14($v0) /* 3D8EFC E00DE7DC 8FBF00C4 */ lw $ra, 0xC4($sp) /* 3D8F00 E00DE7E0 8FBE00C0 */ lw $fp, 0xC0($sp) /* 3D8F04 E00DE7E4 8FB700BC */ lw $s7, 0xBC($sp) /* 3D8F08 E00DE7E8 8FB600B8 */ lw $s6, 0xB8($sp) /* 3D8F0C E00DE7EC 8FB500B4 */ lw $s5, 0xB4($sp) /* 3D8F10 E00DE7F0 8FB400B0 */ lw $s4, 0xB0($sp) /* 3D8F14 E00DE7F4 8FB300AC */ lw $s3, 0xAC($sp) /* 3D8F18 E00DE7F8 8FB200A8 */ lw $s2, 0xA8($sp) /* 3D8F1C E00DE7FC 8FB100A4 */ lw $s1, 0xA4($sp) /* 3D8F20 E00DE800 8FB000A0 */ lw $s0, 0xA0($sp) /* 3D8F24 E00DE804 03E00008 */ jr $ra /* 3D8F28 E00DE808 27BD00C8 */ addiu $sp, $sp, 0xC8 /* 3D8F2C E00DE80C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void cold_breath_appendGfx(void* effect) { ColdBreathFXData* data = ((EffectInstance*)effect)->data.coldBreath; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk14 = data->unk_14; s32 unk24 = data->unk_24; s32 unk00 = data->unk_00; Matrix4f sp20; Matrix4f sp60; s32 unkIndex; f32 temp1; f32 temp2; f32 temp3; f32 temp_f32; s32 temp_s32; s32 envAlpha; s32 cond; 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_40, data->unk_40, data->unk_40); 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, 0.5 * unk24); gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE); gSPDisplayList(gMainGfxPos++, D_E00DE84C[unk00]); unkIndex = (unk14 < 30 ? unk14 : 29) + unk00 * 30; temp1 = D_E00DE96C[unkIndex]; temp2 = D_E00DE8B4[unkIndex]; temp3 = D_E00DE858[unkIndex]; shim_guPositionF(sp20, 0.0f, 0.0f, -temp1, temp2 * 0.01f, temp3, 0.0f, 0.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); temp_f32 = D_E00DE910[unkIndex] * 5.0f / 256.0f; temp_s32 = temp_f32; envAlpha = (temp_f32 - temp_s32) * 256.0f; cond = temp_s32 >= 4; if (temp_s32 < 5) { if (cond) { gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 0, 0); } else { gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 31 << 2, 127 << 2); } gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, envAlpha); gSPDisplayList(gMainGfxPos++, D_E00DE810[unk00][temp_s32]); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80116698 /* ACD98 80116698 27BDFF20 */ addiu $sp, $sp, -0xE0 /* ACD9C 8011669C AFB200C0 */ sw $s2, 0xC0($sp) /* ACDA0 801166A0 0000902D */ daddu $s2, $zero, $zero /* ACDA4 801166A4 AFB300C4 */ sw $s3, 0xC4($sp) /* ACDA8 801166A8 3C138007 */ lui $s3, %hi(gMatrixListPos) /* ACDAC 801166AC 267341F0 */ addiu $s3, $s3, %lo(gMatrixListPos) /* ACDB0 801166B0 AFB400C8 */ sw $s4, 0xC8($sp) /* ACDB4 801166B4 3C140001 */ lui $s4, (0x11630 >> 16) /* ACDB8 801166B8 F7B400D8 */ sdc1 $f20, 0xD8($sp) /* ACDBC 801166BC 3C013F00 */ lui $at, (0x3F000000 >> 16) /* ACDC0 801166C0 4481A000 */ mtc1 $at, $f20 /* ACDC4 801166C4 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* ACDC8 801166C8 AFBF00D0 */ sw $ra, 0xD0($sp) /* ACDCC 801166CC AFB500CC */ sw $s5, 0xCC($sp) /* ACDD0 801166D0 AFB100BC */ sw $s1, 0xBC($sp) /* ACDD4 801166D4 AFB000B8 */ sw $s0, 0xB8($sp) .L801166D8: /* ACDD8 801166D8 3C038015 */ lui $v1, %hi(gCurrentModels) /* ACDDC 801166DC 8C6312CC */ lw $v1, %lo(gCurrentModels)($v1) /* ACDE0 801166E0 00121080 */ sll $v0, $s2, 2 /* ACDE4 801166E4 00431021 */ addu $v0, $v0, $v1 /* ACDE8 801166E8 8C500000 */ lw $s0, 0x0($v0) /* ACDEC 801166EC 52000088 */ beql $s0, $zero, .L80116910 /* ACDF0 801166F0 26520001 */ addiu $s2, $s2, 0x1 /* ACDF4 801166F4 96030000 */ lhu $v1, 0x0($s0) /* ACDF8 801166F8 50600085 */ beql $v1, $zero, .L80116910 /* ACDFC 801166FC 26520001 */ addiu $s2, $s2, 0x1 /* ACE00 80116700 30620004 */ andi $v0, $v1, 0x4 /* ACE04 80116704 54400082 */ bnel $v0, $zero, .L80116910 /* ACE08 80116708 26520001 */ addiu $s2, $s2, 0x1 /* ACE0C 8011670C 30621000 */ andi $v0, $v1, 0x1000 /* ACE10 80116710 14400034 */ bnez $v0, .L801167E4 /* ACE14 80116714 24020002 */ addiu $v0, $zero, 0x2 /* ACE18 80116718 920200A7 */ lbu $v0, 0xA7($s0) /* ACE1C 8011671C 1040002E */ beqz $v0, .L801167D8 /* ACE20 80116720 2442FFFF */ addiu $v0, $v0, -0x1 /* ACE24 80116724 A20200A7 */ sb $v0, 0xA7($s0) /* ACE28 80116728 304200FF */ andi $v0, $v0, 0xFF /* ACE2C 8011672C 1440000F */ bnez $v0, .L8011676C /* ACE30 80116730 00000000 */ nop /* ACE34 80116734 8E020010 */ lw $v0, 0x10($s0) /* ACE38 80116738 26030018 */ addiu $v1, $s0, 0x18 /* ACE3C 8011673C 24440040 */ addiu $a0, $v0, 0x40 .L80116740: /* ACE40 80116740 8C480000 */ lw $t0, 0x0($v0) /* ACE44 80116744 8C490004 */ lw $t1, 0x4($v0) /* ACE48 80116748 8C4A0008 */ lw $t2, 0x8($v0) /* ACE4C 8011674C 8C4B000C */ lw $t3, 0xC($v0) /* ACE50 80116750 AC680000 */ sw $t0, 0x0($v1) /* ACE54 80116754 AC690004 */ sw $t1, 0x4($v1) /* ACE58 80116758 AC6A0008 */ sw $t2, 0x8($v1) /* ACE5C 8011675C AC6B000C */ sw $t3, 0xC($v1) /* ACE60 80116760 24420010 */ addiu $v0, $v0, 0x10 /* ACE64 80116764 1444FFF6 */ bne $v0, $a0, .L80116740 /* ACE68 80116768 24630010 */ addiu $v1, $v1, 0x10 .L8011676C: /* ACE6C 8011676C 96620000 */ lhu $v0, 0x0($s3) /* ACE70 80116770 8E110010 */ lw $s1, 0x10($s0) /* ACE74 80116774 3C04800A */ lui $a0, %hi(gDisplayContext) /* ACE78 80116778 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0) /* ACE7C 8011677C 3043FFFF */ andi $v1, $v0, 0xFFFF /* ACE80 80116780 00031980 */ sll $v1, $v1, 6 /* ACE84 80116784 00741821 */ addu $v1, $v1, $s4 /* ACE88 80116788 00832021 */ addu $a0, $a0, $v1 /* ACE8C 8011678C 0080182D */ daddu $v1, $a0, $zero /* ACE90 80116790 0220202D */ daddu $a0, $s1, $zero /* ACE94 80116794 24850040 */ addiu $a1, $a0, 0x40 /* ACE98 80116798 24420001 */ addiu $v0, $v0, 0x1 /* ACE9C 8011679C A6620000 */ sh $v0, 0x0($s3) /* ACEA0 801167A0 AE030010 */ sw $v1, 0x10($s0) .L801167A4: /* ACEA4 801167A4 8C880000 */ lw $t0, 0x0($a0) /* ACEA8 801167A8 8C890004 */ lw $t1, 0x4($a0) /* ACEAC 801167AC 8C8A0008 */ lw $t2, 0x8($a0) /* ACEB0 801167B0 8C8B000C */ lw $t3, 0xC($a0) /* ACEB4 801167B4 AC680000 */ sw $t0, 0x0($v1) /* ACEB8 801167B8 AC690004 */ sw $t1, 0x4($v1) /* ACEBC 801167BC AC6A0008 */ sw $t2, 0x8($v1) /* ACEC0 801167C0 AC6B000C */ sw $t3, 0xC($v1) /* ACEC4 801167C4 24840010 */ addiu $a0, $a0, 0x10 /* ACEC8 801167C8 1485FFF6 */ bne $a0, $a1, .L801167A4 /* ACECC 801167CC 24630010 */ addiu $v1, $v1, 0x10 /* ACED0 801167D0 08045A44 */ j .L80116910 /* ACED4 801167D4 26520001 */ addiu $s2, $s2, 0x1 .L801167D8: /* ACED8 801167D8 26020018 */ addiu $v0, $s0, 0x18 /* ACEDC 801167DC 08045A43 */ j .L8011690C /* ACEE0 801167E0 AE020010 */ sw $v0, 0x10($s0) .L801167E4: /* ACEE4 801167E4 A20200A7 */ sb $v0, 0xA7($s0) /* ACEE8 801167E8 3062EFFF */ andi $v0, $v1, 0xEFFF /* ACEEC 801167EC 96640000 */ lhu $a0, 0x0($s3) /* ACEF0 801167F0 3C03800A */ lui $v1, %hi(gDisplayContext) /* ACEF4 801167F4 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* ACEF8 801167F8 8E050004 */ lw $a1, 0x4($s0) /* ACEFC 801167FC A6020000 */ sh $v0, 0x0($s0) /* ACF00 80116800 3082FFFF */ andi $v0, $a0, 0xFFFF /* ACF04 80116804 00021180 */ sll $v0, $v0, 6 /* ACF08 80116808 00541021 */ addu $v0, $v0, $s4 /* ACF0C 8011680C 00628821 */ addu $s1, $v1, $v0 /* ACF10 80116810 24840001 */ addiu $a0, $a0, 0x1 /* ACF14 80116814 10A00005 */ beqz $a1, .L8011682C /* ACF18 80116818 A6640000 */ sh $a0, 0x0($s3) /* ACF1C 8011681C 96020000 */ lhu $v0, 0x0($s0) /* ACF20 80116820 30420008 */ andi $v0, $v0, 0x8 /* ACF24 80116824 10400003 */ beqz $v0, .L80116834 /* ACF28 80116828 00000000 */ nop .L8011682C: /* ACF2C 8011682C 08045A14 */ j .L80116850 /* ACF30 80116830 26040058 */ addiu $a0, $s0, 0x58 .L80116834: /* ACF34 80116834 0C019D60 */ jal guMtxL2F /* ACF38 80116838 27A40020 */ addiu $a0, $sp, 0x20 /* ACF3C 8011683C 26040058 */ addiu $a0, $s0, 0x58 /* ACF40 80116840 27A50020 */ addiu $a1, $sp, 0x20 /* ACF44 80116844 0C019D80 */ jal guMtxCatF /* ACF48 80116848 00A0302D */ daddu $a2, $a1, $zero /* ACF4C 8011684C 27A40020 */ addiu $a0, $sp, 0x20 .L80116850: /* ACF50 80116850 0C019D40 */ jal guMtxF2L /* ACF54 80116854 0220282D */ daddu $a1, $s1, $zero /* ACF58 80116858 24050061 */ addiu $a1, $zero, 0x61 /* ACF5C 8011685C 96020000 */ lhu $v0, 0x0($s0) /* ACF60 80116860 8E040008 */ lw $a0, 0x8($s0) /* ACF64 80116864 3042DFFF */ andi $v0, $v0, 0xDFFF /* ACF68 80116868 0C0456C3 */ jal get_model_property /* ACF6C 8011686C A6020000 */ sh $v0, 0x0($s0) /* ACF70 80116870 C4460008 */ lwc1 $f6, 0x8($v0) /* ACF74 80116874 C440002C */ lwc1 $f0, 0x2C($v0) /* ACF78 80116878 46003180 */ add.s $f6, $f6, $f0 /* ACF7C 8011687C 46143182 */ mul.s $f6, $f6, $f20 /* ACF80 80116880 00000000 */ nop /* ACF84 80116884 C4440014 */ lwc1 $f4, 0x14($v0) /* ACF88 80116888 C4400038 */ lwc1 $f0, 0x38($v0) /* ACF8C 8011688C 46002100 */ add.s $f4, $f4, $f0 /* ACF90 80116890 46142102 */ mul.s $f4, $f4, $f20 /* ACF94 80116894 00000000 */ nop /* ACF98 80116898 C4420020 */ lwc1 $f2, 0x20($v0) /* ACF9C 8011689C C4400044 */ lwc1 $f0, 0x44($v0) /* ACFA0 801168A0 46001080 */ add.s $f2, $f2, $f0 /* ACFA4 801168A4 46141082 */ mul.s $f2, $f2, $f20 /* ACFA8 801168A8 00000000 */ nop /* ACFAC 801168AC 0220202D */ daddu $a0, $s1, $zero /* ACFB0 801168B0 44053000 */ mfc1 $a1, $f6 /* ACFB4 801168B4 44062000 */ mfc1 $a2, $f4 /* ACFB8 801168B8 44071000 */ mfc1 $a3, $f2 /* ACFBC 801168BC 27A200A0 */ addiu $v0, $sp, 0xA0 /* ACFC0 801168C0 AFA500A0 */ sw $a1, 0xA0($sp) /* ACFC4 801168C4 AFA600A4 */ sw $a2, 0xA4($sp) /* ACFC8 801168C8 AFA700A8 */ sw $a3, 0xA8($sp) /* ACFCC 801168CC AFA20010 */ sw $v0, 0x10($sp) /* ACFD0 801168D0 27A200A4 */ addiu $v0, $sp, 0xA4 /* ACFD4 801168D4 AFA20014 */ sw $v0, 0x14($sp) /* ACFD8 801168D8 27A200A8 */ addiu $v0, $sp, 0xA8 /* ACFDC 801168DC 0C019E78 */ jal guMtxXFML /* ACFE0 801168E0 AFA20018 */ sw $v0, 0x18($sp) /* ACFE4 801168E4 C7A000A0 */ lwc1 $f0, 0xA0($sp) /* ACFE8 801168E8 C7A200A4 */ lwc1 $f2, 0xA4($sp) /* ACFEC 801168EC C7A400A8 */ lwc1 $f4, 0xA8($sp) /* ACFF0 801168F0 96020000 */ lhu $v0, 0x0($s0) /* ACFF4 801168F4 AE110010 */ sw $s1, 0x10($s0) /* ACFF8 801168F8 3042FDFF */ andi $v0, $v0, 0xFDFF /* ACFFC 801168FC E6000098 */ swc1 $f0, 0x98($s0) /* AD000 80116900 E602009C */ swc1 $f2, 0x9C($s0) /* AD004 80116904 E60400A0 */ swc1 $f4, 0xA0($s0) /* AD008 80116908 A6020000 */ sh $v0, 0x0($s0) .L8011690C: /* AD00C 8011690C 26520001 */ addiu $s2, $s2, 0x1 .L80116910: /* AD010 80116910 2A420100 */ slti $v0, $s2, 0x100 /* AD014 80116914 1440FF70 */ bnez $v0, .L801166D8 /* AD018 80116918 3C150001 */ lui $s5, (0x11630 >> 16) /* AD01C 8011691C 0000902D */ daddu $s2, $zero, $zero /* AD020 80116920 3C148007 */ lui $s4, %hi(gMatrixListPos) /* AD024 80116924 269441F0 */ addiu $s4, $s4, %lo(gMatrixListPos) /* AD028 80116928 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* AD02C 8011692C 27B30060 */ addiu $s3, $sp, 0x60 /* AD030 80116930 3C013F00 */ lui $at, (0x3F000000 >> 16) /* AD034 80116934 4481A000 */ mtc1 $at, $f20 .L80116938: /* AD038 80116938 3C038015 */ lui $v1, %hi(gCurrentTransformGroups) /* AD03C 8011693C 8C6312E0 */ lw $v1, %lo(gCurrentTransformGroups)($v1) /* AD040 80116940 00121080 */ sll $v0, $s2, 2 /* AD044 80116944 00431021 */ addu $v0, $v0, $v1 /* AD048 80116948 8C500000 */ lw $s0, 0x0($v0) /* AD04C 8011694C 52000081 */ beql $s0, $zero, .L80116B54 /* AD050 80116950 26520001 */ addiu $s2, $s2, 0x1 /* AD054 80116954 96030000 */ lhu $v1, 0x0($s0) /* AD058 80116958 5060007E */ beql $v1, $zero, .L80116B54 /* AD05C 8011695C 26520001 */ addiu $s2, $s2, 0x1 /* AD060 80116960 30620004 */ andi $v0, $v1, 0x4 /* AD064 80116964 5440007B */ bnel $v0, $zero, .L80116B54 /* AD068 80116968 26520001 */ addiu $s2, $s2, 0x1 /* AD06C 8011696C 30621000 */ andi $v0, $v1, 0x1000 /* AD070 80116970 14400034 */ bnez $v0, .L80116A44 /* AD074 80116974 24020002 */ addiu $v0, $zero, 0x2 /* AD078 80116978 9202009F */ lbu $v0, 0x9F($s0) /* AD07C 8011697C 1040002E */ beqz $v0, .L80116A38 /* AD080 80116980 2442FFFF */ addiu $v0, $v0, -0x1 /* AD084 80116984 A202009F */ sb $v0, 0x9F($s0) /* AD088 80116988 304200FF */ andi $v0, $v0, 0xFF /* AD08C 8011698C 1440000F */ bnez $v0, .L801169CC /* AD090 80116990 00000000 */ nop /* AD094 80116994 8E02000C */ lw $v0, 0xC($s0) /* AD098 80116998 26030010 */ addiu $v1, $s0, 0x10 /* AD09C 8011699C 24440040 */ addiu $a0, $v0, 0x40 .L801169A0: /* AD0A0 801169A0 8C480000 */ lw $t0, 0x0($v0) /* AD0A4 801169A4 8C490004 */ lw $t1, 0x4($v0) /* AD0A8 801169A8 8C4A0008 */ lw $t2, 0x8($v0) /* AD0AC 801169AC 8C4B000C */ lw $t3, 0xC($v0) /* AD0B0 801169B0 AC680000 */ sw $t0, 0x0($v1) /* AD0B4 801169B4 AC690004 */ sw $t1, 0x4($v1) /* AD0B8 801169B8 AC6A0008 */ sw $t2, 0x8($v1) /* AD0BC 801169BC AC6B000C */ sw $t3, 0xC($v1) /* AD0C0 801169C0 24420010 */ addiu $v0, $v0, 0x10 /* AD0C4 801169C4 1444FFF6 */ bne $v0, $a0, .L801169A0 /* AD0C8 801169C8 24630010 */ addiu $v1, $v1, 0x10 .L801169CC: /* AD0CC 801169CC 96820000 */ lhu $v0, 0x0($s4) /* AD0D0 801169D0 8E11000C */ lw $s1, 0xC($s0) /* AD0D4 801169D4 3C04800A */ lui $a0, %hi(gDisplayContext) /* AD0D8 801169D8 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0) /* AD0DC 801169DC 3043FFFF */ andi $v1, $v0, 0xFFFF /* AD0E0 801169E0 00031980 */ sll $v1, $v1, 6 /* AD0E4 801169E4 00751821 */ addu $v1, $v1, $s5 /* AD0E8 801169E8 00832021 */ addu $a0, $a0, $v1 /* AD0EC 801169EC 0080182D */ daddu $v1, $a0, $zero /* AD0F0 801169F0 0220202D */ daddu $a0, $s1, $zero /* AD0F4 801169F4 24850040 */ addiu $a1, $a0, 0x40 /* AD0F8 801169F8 24420001 */ addiu $v0, $v0, 0x1 /* AD0FC 801169FC A6820000 */ sh $v0, 0x0($s4) /* AD100 80116A00 AE03000C */ sw $v1, 0xC($s0) .L80116A04: /* AD104 80116A04 8C880000 */ lw $t0, 0x0($a0) /* AD108 80116A08 8C890004 */ lw $t1, 0x4($a0) /* AD10C 80116A0C 8C8A0008 */ lw $t2, 0x8($a0) /* AD110 80116A10 8C8B000C */ lw $t3, 0xC($a0) /* AD114 80116A14 AC680000 */ sw $t0, 0x0($v1) /* AD118 80116A18 AC690004 */ sw $t1, 0x4($v1) /* AD11C 80116A1C AC6A0008 */ sw $t2, 0x8($v1) /* AD120 80116A20 AC6B000C */ sw $t3, 0xC($v1) /* AD124 80116A24 24840010 */ addiu $a0, $a0, 0x10 /* AD128 80116A28 1485FFF6 */ bne $a0, $a1, .L80116A04 /* AD12C 80116A2C 24630010 */ addiu $v1, $v1, 0x10 /* AD130 80116A30 08045AD5 */ j .L80116B54 /* AD134 80116A34 26520001 */ addiu $s2, $s2, 0x1 .L80116A38: /* AD138 80116A38 26020010 */ addiu $v0, $s0, 0x10 /* AD13C 80116A3C 08045AD4 */ j .L80116B50 /* AD140 80116A40 AE02000C */ sw $v0, 0xC($s0) .L80116A44: /* AD144 80116A44 A202009F */ sb $v0, 0x9F($s0) /* AD148 80116A48 3062EFFF */ andi $v0, $v1, 0xEFFF /* AD14C 80116A4C 96840000 */ lhu $a0, 0x0($s4) /* AD150 80116A50 3C03800A */ lui $v1, %hi(gDisplayContext) /* AD154 80116A54 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* AD158 80116A58 8E050004 */ lw $a1, 0x4($s0) /* AD15C 80116A5C A6020000 */ sh $v0, 0x0($s0) /* AD160 80116A60 3082FFFF */ andi $v0, $a0, 0xFFFF /* AD164 80116A64 00021180 */ sll $v0, $v0, 6 /* AD168 80116A68 00551021 */ addu $v0, $v0, $s5 /* AD16C 80116A6C 00628821 */ addu $s1, $v1, $v0 /* AD170 80116A70 24840001 */ addiu $a0, $a0, 0x1 /* AD174 80116A74 14A00003 */ bnez $a1, .L80116A84 /* AD178 80116A78 A6840000 */ sh $a0, 0x0($s4) /* AD17C 80116A7C 08045AA8 */ j .L80116AA0 /* AD180 80116A80 26040050 */ addiu $a0, $s0, 0x50 .L80116A84: /* AD184 80116A84 0C019D60 */ jal guMtxL2F /* AD188 80116A88 0260202D */ daddu $a0, $s3, $zero /* AD18C 80116A8C 26040050 */ addiu $a0, $s0, 0x50 /* AD190 80116A90 0260282D */ daddu $a1, $s3, $zero /* AD194 80116A94 0C019D80 */ jal guMtxCatF /* AD198 80116A98 0260302D */ daddu $a2, $s3, $zero /* AD19C 80116A9C 0260202D */ daddu $a0, $s3, $zero .L80116AA0: /* AD1A0 80116AA0 0C019D40 */ jal guMtxF2L /* AD1A4 80116AA4 0220282D */ daddu $a1, $s1, $zero /* AD1A8 80116AA8 24050061 */ addiu $a1, $zero, 0x61 /* AD1AC 80116AAC 96020000 */ lhu $v0, 0x0($s0) /* AD1B0 80116AB0 8E040008 */ lw $a0, 0x8($s0) /* AD1B4 80116AB4 3042DFFF */ andi $v0, $v0, 0xDFFF /* AD1B8 80116AB8 0C0456C3 */ jal get_model_property /* AD1BC 80116ABC A6020000 */ sh $v0, 0x0($s0) /* AD1C0 80116AC0 C4460008 */ lwc1 $f6, 0x8($v0) /* AD1C4 80116AC4 C440002C */ lwc1 $f0, 0x2C($v0) /* AD1C8 80116AC8 46003180 */ add.s $f6, $f6, $f0 /* AD1CC 80116ACC 46143182 */ mul.s $f6, $f6, $f20 /* AD1D0 80116AD0 00000000 */ nop /* AD1D4 80116AD4 C4440014 */ lwc1 $f4, 0x14($v0) /* AD1D8 80116AD8 C4400038 */ lwc1 $f0, 0x38($v0) /* AD1DC 80116ADC 46002100 */ add.s $f4, $f4, $f0 /* AD1E0 80116AE0 46142102 */ mul.s $f4, $f4, $f20 /* AD1E4 80116AE4 00000000 */ nop /* AD1E8 80116AE8 C4420020 */ lwc1 $f2, 0x20($v0) /* AD1EC 80116AEC C4400044 */ lwc1 $f0, 0x44($v0) /* AD1F0 80116AF0 46001080 */ add.s $f2, $f2, $f0 /* AD1F4 80116AF4 46141082 */ mul.s $f2, $f2, $f20 /* AD1F8 80116AF8 00000000 */ nop /* AD1FC 80116AFC 0220202D */ daddu $a0, $s1, $zero /* AD200 80116B00 44053000 */ mfc1 $a1, $f6 /* AD204 80116B04 44062000 */ mfc1 $a2, $f4 /* AD208 80116B08 44071000 */ mfc1 $a3, $f2 /* AD20C 80116B0C 27A200AC */ addiu $v0, $sp, 0xAC /* AD210 80116B10 AFA500AC */ sw $a1, 0xAC($sp) /* AD214 80116B14 AFA600B0 */ sw $a2, 0xB0($sp) /* AD218 80116B18 AFA700B4 */ sw $a3, 0xB4($sp) /* AD21C 80116B1C AFA20010 */ sw $v0, 0x10($sp) /* AD220 80116B20 27A200B0 */ addiu $v0, $sp, 0xB0 /* AD224 80116B24 AFA20014 */ sw $v0, 0x14($sp) /* AD228 80116B28 27A200B4 */ addiu $v0, $sp, 0xB4 /* AD22C 80116B2C 0C019E78 */ jal guMtxXFML /* AD230 80116B30 AFA20018 */ sw $v0, 0x18($sp) /* AD234 80116B34 C7A000AC */ lwc1 $f0, 0xAC($sp) /* AD238 80116B38 C7A200B0 */ lwc1 $f2, 0xB0($sp) /* AD23C 80116B3C C7A400B4 */ lwc1 $f4, 0xB4($sp) /* AD240 80116B40 AE11000C */ sw $s1, 0xC($s0) /* AD244 80116B44 E6000090 */ swc1 $f0, 0x90($s0) /* AD248 80116B48 E6020094 */ swc1 $f2, 0x94($s0) /* AD24C 80116B4C E6040098 */ swc1 $f4, 0x98($s0) .L80116B50: /* AD250 80116B50 26520001 */ addiu $s2, $s2, 0x1 .L80116B54: /* AD254 80116B54 2A420004 */ slti $v0, $s2, 0x4 /* AD258 80116B58 1440FF77 */ bnez $v0, .L80116938 /* AD25C 80116B5C 00000000 */ nop /* AD260 80116B60 0C046F3B */ jal build_custom_gfx /* AD264 80116B64 00000000 */ nop /* AD268 80116B68 8FBF00D0 */ lw $ra, 0xD0($sp) /* AD26C 80116B6C 8FB500CC */ lw $s5, 0xCC($sp) /* AD270 80116B70 8FB400C8 */ lw $s4, 0xC8($sp) /* AD274 80116B74 8FB300C4 */ lw $s3, 0xC4($sp) /* AD278 80116B78 8FB200C0 */ lw $s2, 0xC0($sp) /* AD27C 80116B7C 8FB100BC */ lw $s1, 0xBC($sp) /* AD280 80116B80 8FB000B8 */ lw $s0, 0xB8($sp) /* AD284 80116B84 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* AD288 80116B88 03E00008 */ jr $ra /* AD28C 80116B8C 27BD00E0 */ addiu $sp, $sp, 0xE0 ### DECOMPILED C INSTRUCTIONS: void func_80116698(void) { Matrix4f sp20; Matrix4f sp60; f32 mX, mY, mZ; f32 mtgX, mtgY, mtgZ; Model* model; Mtx* mtx; ModelBoundingBox* bb; ModelTransformGroup* mtg; s32 i; for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) { model = (*gCurrentModels)[i]; if (model != NULL && (model->flags != 0) && !(model->flags & MODEL_FLAG_FLAG_4)) { if (!(model->flags & MODEL_FLAG_USES_TRANSFORM_MATRIX)) { if (model->matrixMode != 0) { model->matrixMode--; if (model->matrixMode <= 0) { model->specialMatrix = *model->currentSpecialMatrix; } mtx = model->currentSpecialMatrix; model->currentSpecialMatrix = &gDisplayContext->matrixStack[gMatrixListPos++]; *model->currentSpecialMatrix = *mtx; } else { model->currentSpecialMatrix = &model->specialMatrix; } } else { model->flags &= ~MODEL_FLAG_USES_TRANSFORM_MATRIX; model->matrixMode = 2; mtx = &gDisplayContext->matrixStack[gMatrixListPos++]; if (model->currentMatrix == NULL || (model->flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER)) { guMtxF2L(model->transformMatrix, mtx); } else { guMtxL2F(sp20, model->currentMatrix); guMtxCatF(model->transformMatrix, sp20, sp20); guMtxF2L(sp20, mtx); } model->flags &= ~MODEL_FLAG_FLAG_2000; bb = (ModelBoundingBox*) get_model_property(model->modelNode, MODEL_PROP_KEY_BOUNDING_BOX); mX = (bb->minX + bb->maxX) * 0.5f; mY = (bb->minY + bb->maxY) * 0.5f; mZ = (bb->minZ + bb->maxZ) * 0.5f; guMtxXFML(mtx, mX, mY, mZ, &mX, &mY, &mZ); model->currentSpecialMatrix = mtx; model->center.x = mX; model->center.y = mY; model->center.z = mZ; model->flags &= ~MODEL_FLAG_FLAG_200; } } } for (i = 0; i < ARRAY_COUNT((*gCurrentTransformGroups)); i++) { mtg = (*gCurrentTransformGroups)[i]; if (mtg != NULL && mtg->flags != 0 && !(mtg->flags & MODEL_TRANSFORM_GROUP_FLAG_4)) { if (!(mtg->flags & MODEL_TRANSFORM_GROUP_FLAG_1000)) { if (mtg->matrixMode != 0) { mtg->matrixMode--; if (mtg->matrixMode == 0) { mtg->matrixA = *mtg->transformMtx; } // store transformMtx on stack mtx = mtg->transformMtx; mtg->transformMtx = &gDisplayContext->matrixStack[gMatrixListPos++]; *mtg->transformMtx = *mtx; } else { mtg->transformMtx = &mtg->matrixA; } } else { mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAG_1000; mtg->matrixMode = 2; mtx = &gDisplayContext->matrixStack[gMatrixListPos++]; if (mtg->matrixRDP_N == NULL) { guMtxF2L(mtg->matrixB, mtx); } else { guMtxL2F(sp60, mtg->matrixRDP_N); guMtxCatF(mtg->matrixB, sp60, sp60); guMtxF2L(sp60, mtx); } mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAG_2000; bb = (ModelBoundingBox*) get_model_property(mtg->modelNode, MODEL_PROP_KEY_BOUNDING_BOX); mtgX = (bb->minX + bb->maxX) * 0.5f; mtgY = (bb->minY + bb->maxY) * 0.5f; mtgZ = (bb->minZ + bb->maxZ) * 0.5f; guMtxXFML(mtx, mtgX, mtgY, mtgZ, &mtgX, &mtgY, &mtgZ); mtg->transformMtx = mtx; mtg->center.x = mtgX; mtg->center.y = mtgY; mtg->center.z = mtgZ; } } } build_custom_gfx(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_map_by_IDs /* 35AF4 8005A6F4 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 35AF8 8005A6F8 AFB00038 */ sw $s0, 0x38($sp) /* 35AFC 8005A6FC 00C0802D */ daddu $s0, $a2, $zero /* 35B00 8005A700 AFB1003C */ sw $s1, 0x3C($sp) /* 35B04 8005A704 0080882D */ daddu $s1, $a0, $zero /* 35B08 8005A708 AFB30044 */ sw $s3, 0x44($sp) /* 35B0C 8005A70C 00A0982D */ daddu $s3, $a1, $zero /* 35B10 8005A710 AFB40048 */ sw $s4, 0x48($sp) /* 35B14 8005A714 0000A02D */ daddu $s4, $zero, $zero /* 35B18 8005A718 AFBF004C */ sw $ra, 0x4C($sp) /* 35B1C 8005A71C 0C05260E */ jal sfx_stop_env_sounds /* 35B20 8005A720 AFB20040 */ sw $s2, 0x40($sp) /* 35B24 8005A724 3C05800A */ lui $a1, %hi(gOverrideFlags) /* 35B28 8005A728 24A5A650 */ addiu $a1, $a1, %lo(gOverrideFlags) /* 35B2C 8005A72C 2402FFBF */ addiu $v0, $zero, -0x41 /* 35B30 8005A730 3C128007 */ lui $s2, %hi(gGameStatusPtr) /* 35B34 8005A734 2652419C */ addiu $s2, $s2, %lo(gGameStatusPtr) /* 35B38 8005A738 8CA30000 */ lw $v1, 0x0($a1) /* 35B3C 8005A73C 8E440000 */ lw $a0, 0x0($s2) /* 35B40 8005A740 00621824 */ and $v1, $v1, $v0 /* 35B44 8005A744 2402FF7F */ addiu $v0, $zero, -0x81 /* 35B48 8005A748 00621824 */ and $v1, $v1, $v0 /* 35B4C 8005A74C ACA30000 */ sw $v1, 0x0($a1) /* 35B50 8005A750 0C00B458 */ jal load_obfuscation_shims /* 35B54 8005A754 A0800084 */ sb $zero, 0x84($a0) /* 35B58 8005A758 0C0AC81E */ jal shim_general_heap_create_obfuscated /* 35B5C 8005A75C 00108400 */ sll $s0, $s0, 16 /* 35B60 8005A760 0C047624 */ jal clear_render_tasks /* 35B64 8005A764 00108403 */ sra $s0, $s0, 16 /* 35B68 8005A768 0C048C2E */ jal clear_worker_list /* 35B6C 8005A76C 00000000 */ nop /* 35B70 8005A770 0C0B0C77 */ jal clear_script_list /* 35B74 8005A774 00000000 */ nop /* 35B78 8005A778 12000005 */ beqz $s0, .L8005A790 /* 35B7C 8005A77C 24020001 */ addiu $v0, $zero, 0x1 /* 35B80 8005A780 12020008 */ beq $s0, $v0, .L8005A7A4 /* 35B84 8005A784 00000000 */ nop /* 35B88 8005A788 080169F0 */ j .L8005A7C0 /* 35B8C 8005A78C 00000000 */ nop .L8005A790: /* 35B90 8005A790 0C0514E4 */ jal clear_area_flags /* 35B94 8005A794 00000000 */ nop /* 35B98 8005A798 8E420000 */ lw $v0, 0x0($s2) /* 35B9C 8005A79C 080169F0 */ j .L8005A7C0 /* 35BA0 8005A7A0 A0400167 */ sb $zero, 0x167($v0) .L8005A7A4: /* 35BA4 8005A7A4 0C00AD24 */ jal fio_deserialize_state /* 35BA8 8005A7A8 00000000 */ nop /* 35BAC 8005A7AC 8E420000 */ lw $v0, 0x0($s2) /* 35BB0 8005A7B0 94510086 */ lhu $s1, 0x86($v0) /* 35BB4 8005A7B4 9453008C */ lhu $s3, 0x8C($v0) /* 35BB8 8005A7B8 A0500167 */ sb $s0, 0x167($v0) /* 35BBC 8005A7BC A4510088 */ sh $s1, 0x88($v0) .L8005A7C0: /* 35BC0 8005A7C0 3C04800E */ lui $a0, %hi(wMapShapeName) /* 35BC4 8005A7C4 24849230 */ addiu $a0, $a0, %lo(wMapShapeName) /* 35BC8 8005A7C8 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 35BCC 8005A7CC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 35BD0 8005A7D0 00131C00 */ sll $v1, $s3, 16 /* 35BD4 8005A7D4 AC400144 */ sw $zero, 0x144($v0) /* 35BD8 8005A7D8 00111400 */ sll $v0, $s1, 16 /* 35BDC 8005A7DC 00021303 */ sra $v0, $v0, 12 /* 35BE0 8005A7E0 3C018009 */ lui $at, %hi(gAreas + 0x4) /* 35BE4 8005A7E4 00220821 */ addu $at, $at, $v0 /* 35BE8 8005A7E8 8C2234F4 */ lw $v0, %lo(gAreas + 0x4)($at) /* 35BEC 8005A7EC 00031AC3 */ sra $v1, $v1, 11 /* 35BF0 8005A7F0 00439021 */ addu $s2, $v0, $v1 /* 35BF4 8005A7F4 8E460000 */ lw $a2, 0x0($s2) /* 35BF8 8005A7F8 3C05800A */ lui $a1, %hi(D_80098A10) /* 35BFC 8005A7FC 0C01953C */ jal sprintf /* 35C00 8005A800 24A58A10 */ addiu $a1, $a1, %lo(D_80098A10) /* 35C04 8005A804 3C04800E */ lui $a0, %hi(wMapHitName) /* 35C08 8005A808 248491E0 */ addiu $a0, $a0, %lo(wMapHitName) /* 35C0C 8005A80C 8E460000 */ lw $a2, 0x0($s2) /* 35C10 8005A810 3C05800A */ lui $a1, %hi(D_80098A1C) /* 35C14 8005A814 0C01953C */ jal sprintf /* 35C18 8005A818 24A58A1C */ addiu $a1, $a1, %lo(D_80098A1C) /* 35C1C 8005A81C 8E450000 */ lw $a1, 0x0($s2) /* 35C20 8005A820 0C01BB50 */ jal strcpy /* 35C24 8005A824 27A40018 */ addiu $a0, $sp, 0x18 /* 35C28 8005A828 3C04800B */ lui $a0, %hi(wMapTexName) /* 35C2C 8005A82C 24840CF0 */ addiu $a0, $a0, %lo(wMapTexName) /* 35C30 8005A830 3C05800A */ lui $a1, %hi(D_80098A24) /* 35C34 8005A834 24A58A24 */ addiu $a1, $a1, %lo(D_80098A24) /* 35C38 8005A838 27A60018 */ addiu $a2, $sp, 0x18 /* 35C3C 8005A83C 0C01953C */ jal sprintf /* 35C40 8005A840 A3A0001B */ sb $zero, 0x1B($sp) /* 35C44 8005A844 8E450014 */ lw $a1, 0x14($s2) /* 35C48 8005A848 3C01800A */ lui $at, %hi(gMap) /* 35C4C 8005A84C AC3241E0 */ sw $s2, %lo(gMap)($at) /* 35C50 8005A850 10A00005 */ beqz $a1, .L8005A868 /* 35C54 8005A854 00000000 */ nop /* 35C58 8005A858 3C04800E */ lui $a0, %hi(wMapBgName) /* 35C5C 8005A85C 24849668 */ addiu $a0, $a0, %lo(wMapBgName) /* 35C60 8005A860 0C01BB50 */ jal strcpy /* 35C64 8005A864 00000000 */ nop .L8005A868: /* 35C68 8005A868 0C0169B0 */ jal load_map_script_lib /* 35C6C 8005A86C 00000000 */ nop /* 35C70 8005A870 8E440008 */ lw $a0, 0x8($s2) /* 35C74 8005A874 10800004 */ beqz $a0, .L8005A888 /* 35C78 8005A878 00000000 */ nop /* 35C7C 8005A87C 8E45000C */ lw $a1, 0xC($s2) /* 35C80 8005A880 0C00A5CF */ jal dma_copy /* 35C84 8005A884 8E460010 */ lw $a2, 0x10($s2) .L8005A888: /* 35C88 8005A888 8E420004 */ lw $v0, 0x4($s2) /* 35C8C 8005A88C 3C03800A */ lui $v1, %hi(gMapSettings) /* 35C90 8005A890 246341E8 */ addiu $v1, $v1, %lo(gMapSettings) /* 35C94 8005A894 24440040 */ addiu $a0, $v0, 0x40 .L8005A898: /* 35C98 8005A898 8C480000 */ lw $t0, 0x0($v0) /* 35C9C 8005A89C 8C490004 */ lw $t1, 0x4($v0) /* 35CA0 8005A8A0 8C4A0008 */ lw $t2, 0x8($v0) /* 35CA4 8005A8A4 8C4B000C */ lw $t3, 0xC($v0) /* 35CA8 8005A8A8 AC680000 */ sw $t0, 0x0($v1) /* 35CAC 8005A8AC AC690004 */ sw $t1, 0x4($v1) /* 35CB0 8005A8B0 AC6A0008 */ sw $t2, 0x8($v1) /* 35CB4 8005A8B4 AC6B000C */ sw $t3, 0xC($v1) /* 35CB8 8005A8B8 24420010 */ addiu $v0, $v0, 0x10 /* 35CBC 8005A8BC 1444FFF6 */ bne $v0, $a0, .L8005A898 /* 35CC0 8005A8C0 24630010 */ addiu $v1, $v1, 0x10 /* 35CC4 8005A8C4 8E420018 */ lw $v0, 0x18($s2) /* 35CC8 8005A8C8 3C13800A */ lui $s3, %hi(gMapSettings) /* 35CCC 8005A8CC 267341E8 */ addiu $s3, $s3, %lo(gMapSettings) /* 35CD0 8005A8D0 10400004 */ beqz $v0, .L8005A8E4 /* 35CD4 8005A8D4 00000000 */ nop /* 35CD8 8005A8D8 0040F809 */ jalr $v0 /* 35CDC 8005A8DC 00000000 */ nop /* 35CE0 8005A8E0 0040A02D */ daddu $s4, $v0, $zero .L8005A8E4: /* 35CE4 8005A8E4 16800015 */ bnez $s4, .L8005A93C /* 35CE8 8005A8E8 00000000 */ nop /* 35CEC 8005A8EC 3C04800E */ lui $a0, %hi(wMapShapeName) /* 35CF0 8005A8F0 24849230 */ addiu $a0, $a0, %lo(wMapShapeName) /* 35CF4 8005A8F4 0C016B3A */ jal load_asset_by_name /* 35CF8 8005A8F8 27A50030 */ addiu $a1, $sp, 0x30 /* 35CFC 8005A8FC 0040882D */ daddu $s1, $v0, $zero /* 35D00 8005A900 0220202D */ daddu $a0, $s1, $zero /* 35D04 8005A904 3C108021 */ lui $s0, %hi(gMapShapeData) /* 35D08 8005A908 26100000 */ addiu $s0, $s0, %lo(gMapShapeData) /* 35D0C 8005A90C 0C01BB7C */ jal decode_yay0 /* 35D10 8005A910 0200282D */ daddu $a1, $s0, $zero /* 35D14 8005A914 0C00AB1E */ jal general_heap_free /* 35D18 8005A918 0220202D */ daddu $a0, $s1, $zero /* 35D1C 8005A91C 8E020000 */ lw $v0, 0x0($s0) /* 35D20 8005A920 8E030008 */ lw $v1, 0x8($s0) /* 35D24 8005A924 8E04000C */ lw $a0, 0xC($s0) /* 35D28 8005A928 8E050010 */ lw $a1, 0x10($s0) /* 35D2C 8005A92C AE620000 */ sw $v0, 0x0($s3) /* 35D30 8005A930 AE630028 */ sw $v1, 0x28($s3) /* 35D34 8005A934 AE64002C */ sw $a0, 0x2C($s3) /* 35D38 8005A938 AE650030 */ sw $a1, 0x30($s3) .L8005A93C: /* 35D3C 8005A93C 8E420014 */ lw $v0, 0x14($s2) /* 35D40 8005A940 10400005 */ beqz $v0, .L8005A958 /* 35D44 8005A944 00000000 */ nop /* 35D48 8005A948 3C04800E */ lui $a0, %hi(wMapBgName) /* 35D4C 8005A94C 24849668 */ addiu $a0, $a0, %lo(wMapBgName) /* 35D50 8005A950 0C05175C */ jal load_map_bg /* 35D54 8005A954 00000000 */ nop .L8005A958: /* 35D58 8005A958 0C00B458 */ jal load_obfuscation_shims /* 35D5C 8005A95C 00000000 */ nop /* 35D60 8005A960 0C0AC81E */ jal shim_general_heap_create_obfuscated /* 35D64 8005A964 00000000 */ nop /* 35D68 8005A968 0C05259C */ jal sfx_clear_env_sounds /* 35D6C 8005A96C 0000202D */ daddu $a0, $zero, $zero /* 35D70 8005A970 0C048C2E */ jal clear_worker_list /* 35D74 8005A974 00000000 */ nop /* 35D78 8005A978 0C0B0C77 */ jal clear_script_list /* 35D7C 8005A97C 00000000 */ nop /* 35D80 8005A980 0C00B7BD */ jal create_cameras_a /* 35D84 8005A984 00000000 */ nop /* 35D88 8005A988 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 35D8C 8005A98C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 35D90 8005A990 8E020000 */ lw $v0, 0x0($s0) /* 35D94 8005A994 0C0B763E */ jal spr_init_sprites /* 35D98 8005A998 80440084 */ lb $a0, 0x84($v0) /* 35D9C 8005A99C 0C047889 */ jal clear_animator_list /* 35DA0 8005A9A0 00000000 */ nop /* 35DA4 8005A9A4 0C0482EC */ jal clear_entity_models /* 35DA8 8005A9A8 00000000 */ nop /* 35DAC 8005A9AC 0C00E12F */ jal clear_npcs /* 35DB0 8005A9B0 00000000 */ nop /* 35DB4 8005A9B4 0C050440 */ jal hud_element_clear_cache /* 35DB8 8005A9B8 00000000 */ nop /* 35DBC 8005A9BC 0C0515A0 */ jal clear_trigger_data /* 35DC0 8005A9C0 00000000 */ nop /* 35DC4 8005A9C4 0C045751 */ jal clear_model_data /* 35DC8 8005A9C8 00000000 */ nop /* 35DCC 8005A9CC 0C052010 */ jal clear_sprite_shading_data /* 35DD0 8005A9D0 00000000 */ nop /* 35DD4 8005A9D4 0C05177E */ jal reset_background_settings /* 35DD8 8005A9D8 00000000 */ nop /* 35DDC 8005A9DC 8E020000 */ lw $v0, 0x0($s0) /* 35DE0 8005A9E0 804300A8 */ lb $v1, 0xA8($v0) /* 35DE4 8005A9E4 2402FFFF */ addiu $v0, $zero, -0x1 /* 35DE8 8005A9E8 14620003 */ bne $v1, $v0, .L8005A9F8 /* 35DEC 8005A9EC 00000000 */ nop /* 35DF0 8005A9F0 0C04E062 */ jal func_80138188 /* 35DF4 8005A9F4 00000000 */ nop .L8005A9F8: /* 35DF8 8005A9F8 16800005 */ bnez $s4, .L8005AA10 /* 35DFC 8005A9FC 00000000 */ nop /* 35E00 8005AA00 0C016BE5 */ jal initialize_collision /* 35E04 8005AA04 00000000 */ nop /* 35E08 8005AA08 0C016BF0 */ jal load_map_hit_asset /* 35E0C 8005AA0C 00000000 */ nop .L8005AA10: /* 35E10 8005AA10 0C01CACC */ jal reset_battle_status /* 35E14 8005AA14 00000000 */ nop /* 35E18 8005AA18 0C00F900 */ jal clear_encounter_status /* 35E1C 8005AA1C 00000000 */ nop /* 35E20 8005AA20 0C04432E */ jal clear_entity_data /* 35E24 8005AA24 24040001 */ addiu $a0, $zero, 0x1 /* 35E28 8005AA28 0C016727 */ jal clear_effect_data /* 35E2C 8005AA2C 00000000 */ nop /* 35E30 8005AA30 0C037F14 */ jal clear_player_status /* 35E34 8005AA34 00000000 */ nop /* 35E38 8005AA38 0C037F1D */ jal player_reset_data /* 35E3C 8005AA3C 00000000 */ nop /* 35E40 8005AA40 0C03AD1D */ jal partner_reset_data /* 35E44 8005AA44 00000000 */ nop /* 35E48 8005AA48 0C048D9D */ jal clear_printers /* 35E4C 8005AA4C 00000000 */ nop /* 35E50 8005AA50 0C04C3FC */ jal clear_item_entity_data /* 35E54 8005AA54 00000000 */ nop /* 35E58 8005AA58 3C028011 */ lui $v0, %hi(gPlayerStatus) /* 35E5C 8005AA5C 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) /* 35E60 8005AA60 C4400084 */ lwc1 $f0, 0x84($v0) /* 35E64 8005AA64 E4400080 */ swc1 $f0, 0x80($v0) /* 35E68 8005AA68 8E42001C */ lw $v0, 0x1C($s2) /* 35E6C 8005AA6C 30420003 */ andi $v0, $v0, 0x3 /* 35E70 8005AA70 00021080 */ sll $v0, $v0, 2 /* 35E74 8005AA74 3C048009 */ lui $a0, %hi(WorldReverbModeMapping) /* 35E78 8005AA78 00822021 */ addu $a0, $a0, $v0 /* 35E7C 8005AA7C 0C0525FF */ jal sfx_set_reverb_mode /* 35E80 8005AA80 8C84FF60 */ lw $a0, %lo(WorldReverbModeMapping)($a0) /* 35E84 8005AA84 0C052580 */ jal sfx_reset_door_sounds /* 35E88 8005AA88 00000000 */ nop /* 35E8C 8005AA8C 1680000B */ bnez $s4, .L8005AABC /* 35E90 8005AA90 00000000 */ nop /* 35E94 8005AA94 3C04800B */ lui $a0, %hi(wMapTexName) /* 35E98 8005AA98 24840CF0 */ addiu $a0, $a0, %lo(wMapTexName) /* 35E9C 8005AA9C 0C016B74 */ jal get_asset_offset /* 35EA0 8005AAA0 27A50030 */ addiu $a1, $sp, 0x30 /* 35EA4 8005AAA4 8E640000 */ lw $a0, 0x0($s3) /* 35EA8 8005AAA8 10800004 */ beqz $a0, .L8005AABC /* 35EAC 8005AAAC 00000000 */ nop /* 35EB0 8005AAB0 8FA60030 */ lw $a2, 0x30($sp) /* 35EB4 8005AAB4 0C046B52 */ jal load_data_for_models /* 35EB8 8005AAB8 0040282D */ daddu $a1, $v0, $zero .L8005AABC: /* 35EBC 8005AABC 8E640038 */ lw $a0, 0x38($s3) /* 35EC0 8005AAC0 50800005 */ beql $a0, $zero, .L8005AAD8 /* 35EC4 8005AAC4 24040128 */ addiu $a0, $zero, 0x128 /* 35EC8 8005AAC8 0C05178A */ jal read_background_size /* 35ECC 8005AACC 00000000 */ nop /* 35ED0 8005AAD0 08016ABA */ j .L8005AAE8 /* 35ED4 8005AAD4 00000000 */ nop .L8005AAD8: /* 35ED8 8005AAD8 240500C8 */ addiu $a1, $zero, 0xC8 /* 35EDC 8005AADC 2406000C */ addiu $a2, $zero, 0xC /* 35EE0 8005AAE0 0C05179C */ jal set_background_size /* 35EE4 8005AAE4 24070014 */ addiu $a3, $zero, 0x14 .L8005AAE8: /* 35EE8 8005AAE8 3C04800B */ lui $a0, %hi(gCameras) /* 35EEC 8005AAEC 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 35EF0 8005AAF0 94820000 */ lhu $v0, 0x0($a0) /* 35EF4 8005AAF4 94830AB0 */ lhu $v1, 0xAB0($a0) /* 35EF8 8005AAF8 3C018007 */ lui $at, %hi(gCurrentCameraID) /* 35EFC 8005AAFC AC207410 */ sw $zero, %lo(gCurrentCameraID)($at) /* 35F00 8005AB00 34420002 */ ori $v0, $v0, 0x2 /* 35F04 8005AB04 A4820000 */ sh $v0, 0x0($a0) /* 35F08 8005AB08 94820558 */ lhu $v0, 0x558($a0) /* 35F0C 8005AB0C 34630002 */ ori $v1, $v1, 0x2 /* 35F10 8005AB10 A4830AB0 */ sh $v1, 0xAB0($a0) /* 35F14 8005AB14 34420002 */ ori $v0, $v0, 0x2 /* 35F18 8005AB18 A4820558 */ sh $v0, 0x558($a0) /* 35F1C 8005AB1C 94821008 */ lhu $v0, 0x1008($a0) /* 35F20 8005AB20 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 35F24 8005AB24 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 35F28 8005AB28 34420002 */ ori $v0, $v0, 0x2 /* 35F2C 8005AB2C A4821008 */ sh $v0, 0x1008($a0) /* 35F30 8005AB30 806300A8 */ lb $v1, 0xA8($v1) /* 35F34 8005AB34 2402FFFF */ addiu $v0, $zero, -0x1 /* 35F38 8005AB38 14620008 */ bne $v1, $v0, .L8005AB5C /* 35F3C 8005AB3C 240200A2 */ addiu $v0, $zero, 0xA2 /* 35F40 8005AB40 240200C8 */ addiu $v0, $zero, 0xC8 /* 35F44 8005AB44 AFA20010 */ sw $v0, 0x10($sp) /* 35F48 8005AB48 0000202D */ daddu $a0, $zero, $zero /* 35F4C 8005AB4C 2405000C */ addiu $a1, $zero, 0xC /* 35F50 8005AB50 24060014 */ addiu $a2, $zero, 0x14 /* 35F54 8005AB54 08016ADC */ j .L8005AB70 /* 35F58 8005AB58 24070128 */ addiu $a3, $zero, 0x128 .L8005AB5C: /* 35F5C 8005AB5C AFA20010 */ sw $v0, 0x10($sp) /* 35F60 8005AB60 0000202D */ daddu $a0, $zero, $zero /* 35F64 8005AB64 2405001D */ addiu $a1, $zero, 0x1D /* 35F68 8005AB68 2406001C */ addiu $a2, $zero, 0x1C /* 35F6C 8005AB6C 24070106 */ addiu $a3, $zero, 0x106 .L8005AB70: /* 35F70 8005AB70 0C00B8C5 */ jal set_cam_viewport /* 35F74 8005AB74 00000000 */ nop /* 35F78 8005AB78 0C039E4D */ jal initialize_status_bar /* 35F7C 8005AB7C 00000000 */ nop /* 35F80 8005AB80 0000282D */ daddu $a1, $zero, $zero /* 35F84 8005AB84 00A0302D */ daddu $a2, $a1, $zero /* 35F88 8005AB88 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 35F8C 8005AB8C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 35F90 8005AB90 8E030000 */ lw $v1, 0x0($s0) /* 35F94 8005AB94 240203E8 */ addiu $v0, $zero, 0x3E8 /* 35F98 8005AB98 A4620090 */ sh $v0, 0x90($v1) /* 35F9C 8005AB9C A4620092 */ sh $v0, 0x92($v1) /* 35FA0 8005ABA0 8E640010 */ lw $a0, 0x10($s3) /* 35FA4 8005ABA4 0C0B0D74 */ jal start_script_in_group /* 35FA8 8005ABA8 00A0382D */ daddu $a3, $a1, $zero /* 35FAC 8005ABAC 8E030000 */ lw $v1, 0x0($s0) /* 35FB0 8005ABB0 8C420144 */ lw $v0, 0x144($v0) /* 35FB4 8005ABB4 AC62006C */ sw $v0, 0x6C($v1) /* 35FB8 8005ABB8 8FBF004C */ lw $ra, 0x4C($sp) /* 35FBC 8005ABBC 8FB40048 */ lw $s4, 0x48($sp) /* 35FC0 8005ABC0 8FB30044 */ lw $s3, 0x44($sp) /* 35FC4 8005ABC4 8FB20040 */ lw $s2, 0x40($sp) /* 35FC8 8005ABC8 8FB1003C */ lw $s1, 0x3C($sp) /* 35FCC 8005ABCC 8FB00038 */ lw $s0, 0x38($sp) /* 35FD0 8005ABD0 03E00008 */ jr $ra /* 35FD4 8005ABD4 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) { s32 skipLoadingAssets = 0; MapConfig* mapConfig; MapSettings* mapSettings; char texStr[17]; s32 decompressedSize; sfx_stop_env_sounds(); gOverrideFlags &= ~GLOBAL_OVERRIDES_40; gOverrideFlags &= ~GLOBAL_OVERRIDES_ENABLE_FLOOR_REFLECTION; gGameStatusPtr->playerSpriteSet = PLAYER_SPRITES_MARIO_WORLD; #if VERSION_IQUE general_heap_create(); #else load_obfuscation_shims(); shim_general_heap_create_obfuscated(); #endif #if VERSION_JP reset_max_rumble_duration(); #endif clear_render_tasks(); clear_worker_list(); clear_script_list(); switch (loadType) { case LOAD_FROM_MAP: clear_area_flags(); gGameStatusPtr->loadType = LOAD_FROM_MAP; break; case LOAD_FROM_FILE_SELECT: fio_deserialize_state(); areaID = gGameStatusPtr->areaID; mapID = gGameStatusPtr->mapID; gGameStatusPtr->prevArea = areaID; gGameStatusPtr->loadType = LOAD_FROM_FILE_SELECT; break; } gGameStatusPtr->mapShop = NULL; mapConfig = &gAreas[areaID].maps[mapID]; sprintf(wMapShapeName, "%s_shape", mapConfig->id); sprintf(wMapHitName, "%s_hit", mapConfig->id); strcpy(texStr, mapConfig->id); texStr[3] = '\0'; sprintf(wMapTexName, "%s_tex", texStr); gMapConfig = mapConfig; if (mapConfig->bgName != NULL) { strcpy(wMapBgName, mapConfig->bgName); } load_map_script_lib(); if (mapConfig->dmaStart != NULL) { dma_copy(mapConfig->dmaStart, mapConfig->dmaEnd, mapConfig->dmaDest); } gMapSettings = *mapConfig->settings; mapSettings = &gMapSettings; if (mapConfig->init != NULL) { skipLoadingAssets = mapConfig->init(); } if (!skipLoadingAssets) { ShapeFile* shapeFile = &gMapShapeData; void* yay0Asset = load_asset_by_name(wMapShapeName, &decompressedSize); decode_yay0(yay0Asset, shapeFile); general_heap_free(yay0Asset); mapSettings->modelTreeRoot = shapeFile->header.root; mapSettings->modelNameList = shapeFile->header.modelNames; mapSettings->colliderNameList = shapeFile->header.colliderNames; mapSettings->zoneNameList = shapeFile->header.zoneNames; } if (mapConfig->bgName != NULL) { load_map_bg(wMapBgName); } #if VERSION_IQUE general_heap_create(); #else load_obfuscation_shims(); shim_general_heap_create_obfuscated(); #endif sfx_clear_env_sounds(0); clear_worker_list(); clear_script_list(); create_cameras_a(); spr_init_sprites(gGameStatusPtr->playerSpriteSet); clear_animator_list(); clear_entity_models(); clear_npcs(); hud_element_clear_cache(); clear_trigger_data(); clear_model_data(); clear_sprite_shading_data(); reset_background_settings(); if (gGameStatusPtr->creditsViewportMode == -1) { func_80138188(); } if (!skipLoadingAssets) { initialize_collision(); load_map_hit_asset(); } reset_battle_status(); clear_encounter_status(); clear_entity_data(1); clear_effect_data(); clear_player_status(); player_reset_data(); partner_reset_data(); clear_printers(); clear_item_entity_data(); gPlayerStatus.targetYaw = gPlayerStatus.currentYaw; sfx_set_reverb_mode(WorldReverbModeMapping[*(s32*)mapConfig->unk_1C & 0x3]); sfx_reset_door_sounds(); if (!skipLoadingAssets) { s32 thing = get_asset_offset(wMapTexName, &decompressedSize); if (mapSettings->modelTreeRoot != NULL) { load_data_for_models(mapSettings->modelTreeRoot, thing, decompressedSize); } } if (mapSettings->background != NULL) { read_background_size(mapSettings->background); } else { set_background_size(296, 200, 12, 20); } gCurrentCameraID = CAM_DEFAULT; gCameras[CAM_DEFAULT].flags |= CAMERA_FLAG_DISABLED; gCameras[CAM_BATTLE].flags |= CAMERA_FLAG_DISABLED; gCameras[CAM_TATTLE].flags |= CAMERA_FLAG_DISABLED; gCameras[CAM_3].flags |= CAMERA_FLAG_DISABLED; if (gGameStatusPtr->creditsViewportMode == -1) { set_cam_viewport(0, 12, 20, 296, 200); } else { set_cam_viewport(0, 29, 28, 262, 162); } initialize_status_bar(); gGameStatusPtr->unk_90 = 1000; gGameStatusPtr->unk_92 = 1000; gGameStatusPtr->mainScriptID = start_script_in_group(mapSettings->main, EVT_PRIORITY_0, 0, 0)->id; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_npcs /* 14D30 80039930 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 14D34 80039934 3C02FFFF */ lui $v0, (0xFFFF7FFF >> 16) /* 14D38 80039938 34427FFF */ ori $v0, $v0, (0xFFFF7FFF & 0xFFFF) /* 14D3C 8003993C AFB3003C */ sw $s3, 0x3C($sp) /* 14D40 80039940 3C138011 */ lui $s3, %hi(gPlayerStatus) /* 14D44 80039944 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* 14D48 80039948 AFBF0040 */ sw $ra, 0x40($sp) /* 14D4C 8003994C AFB20038 */ sw $s2, 0x38($sp) /* 14D50 80039950 AFB10034 */ sw $s1, 0x34($sp) /* 14D54 80039954 AFB00030 */ sw $s0, 0x30($sp) /* 14D58 80039958 F7B40048 */ sdc1 $f20, 0x48($sp) /* 14D5C 8003995C 8E630004 */ lw $v1, 0x4($s3) /* 14D60 80039960 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 14D64 80039964 8C84A650 */ lw $a0, %lo(gOverrideFlags)($a0) /* 14D68 80039968 00621824 */ and $v1, $v1, $v0 /* 14D6C 8003996C 30840C00 */ andi $a0, $a0, 0xC00 /* 14D70 80039970 14800104 */ bnez $a0, .L80039D84 /* 14D74 80039974 AE630004 */ sw $v1, 0x4($s3) /* 14D78 80039978 0000902D */ daddu $s2, $zero, $zero /* 14D7C 8003997C 4480A000 */ mtc1 $zero, $f20 .L80039980: /* 14D80 80039980 3C03800A */ lui $v1, %hi(gCurrentNpcListPtr) /* 14D84 80039984 8C630B90 */ lw $v1, %lo(gCurrentNpcListPtr)($v1) /* 14D88 80039988 00121080 */ sll $v0, $s2, 2 /* 14D8C 8003998C 00431021 */ addu $v0, $v0, $v1 /* 14D90 80039990 8C500000 */ lw $s0, 0x0($v0) /* 14D94 80039994 520000F8 */ beql $s0, $zero, .L80039D78 /* 14D98 80039998 26520001 */ addiu $s2, $s2, 0x1 /* 14D9C 8003999C 8E030000 */ lw $v1, 0x0($s0) /* 14DA0 800399A0 506000F5 */ beql $v1, $zero, .L80039D78 /* 14DA4 800399A4 26520001 */ addiu $s2, $s2, 0x1 /* 14DA8 800399A8 3C028000 */ lui $v0, (0x80000004 >> 16) /* 14DAC 800399AC 34420004 */ ori $v0, $v0, (0x80000004 & 0xFFFF) /* 14DB0 800399B0 00621024 */ and $v0, $v1, $v0 /* 14DB4 800399B4 10400005 */ beqz $v0, .L800399CC /* 14DB8 800399B8 00000000 */ nop /* 14DBC 800399BC 0C00E2BF */ jal npc_do_world_collision /* 14DC0 800399C0 0200202D */ daddu $a0, $s0, $zero /* 14DC4 800399C4 0800E75E */ j .L80039D78 /* 14DC8 800399C8 26520001 */ addiu $s2, $s2, 0x1 .L800399CC: /* 14DCC 800399CC 8E020004 */ lw $v0, 0x4($s0) /* 14DD0 800399D0 0040F809 */ jalr $v0 /* 14DD4 800399D4 0200202D */ daddu $a0, $s0, $zero /* 14DD8 800399D8 8E020000 */ lw $v0, 0x0($s0) /* 14DDC 800399DC 30428000 */ andi $v0, $v0, 0x8000 /* 14DE0 800399E0 10400004 */ beqz $v0, .L800399F4 /* 14DE4 800399E4 3C030004 */ lui $v1, (0x40000 >> 16) /* 14DE8 800399E8 8E020080 */ lw $v0, 0x80($s0) /* 14DEC 800399EC 0800E681 */ j .L80039A04 /* 14DF0 800399F0 00431025 */ or $v0, $v0, $v1 .L800399F4: /* 14DF4 800399F4 3C03FFFB */ lui $v1, (0xFFFBFFFF >> 16) /* 14DF8 800399F8 8E020080 */ lw $v0, 0x80($s0) /* 14DFC 800399FC 3463FFFF */ ori $v1, $v1, (0xFFFBFFFF & 0xFFFF) /* 14E00 80039A00 00431024 */ and $v0, $v0, $v1 .L80039A04: /* 14E04 80039A04 AE020080 */ sw $v0, 0x80($s0) /* 14E08 80039A08 0200202D */ daddu $a0, $s0, $zero /* 14E0C 80039A0C 2402FFFF */ addiu $v0, $zero, -0x1 /* 14E10 80039A10 A6020084 */ sh $v0, 0x84($s0) /* 14E14 80039A14 A6020086 */ sh $v0, 0x86($s0) /* 14E18 80039A18 8E020000 */ lw $v0, 0x0($s0) /* 14E1C 80039A1C 24039FFF */ addiu $v1, $zero, -0x6001 /* 14E20 80039A20 00431024 */ and $v0, $v0, $v1 /* 14E24 80039A24 0C00E2BF */ jal npc_do_world_collision /* 14E28 80039A28 AE020000 */ sw $v0, 0x0($s0) /* 14E2C 80039A2C 0C00E5A2 */ jal npc_try_apply_gravity /* 14E30 80039A30 0200202D */ daddu $a0, $s0, $zero /* 14E34 80039A34 4405A000 */ mfc1 $a1, $f20 /* 14E38 80039A38 0C00E5FA */ jal npc_try_snap_to_ground /* 14E3C 80039A3C 0200202D */ daddu $a0, $s0, $zero /* 14E40 80039A40 0C00E4B6 */ jal npc_do_player_collision /* 14E44 80039A44 0200202D */ daddu $a0, $s0, $zero /* 14E48 80039A48 0C00E403 */ jal npc_do_other_npc_collision /* 14E4C 80039A4C 0200202D */ daddu $a0, $s0, $zero /* 14E50 80039A50 8E020000 */ lw $v0, 0x0($s0) /* 14E54 80039A54 3C030010 */ lui $v1, (0x100000 >> 16) /* 14E58 80039A58 00431024 */ and $v0, $v0, $v1 /* 14E5C 80039A5C 10400003 */ beqz $v0, .L80039A6C /* 14E60 80039A60 00000000 */ nop /* 14E64 80039A64 0C00EB7E */ jal update_npc_blur /* 14E68 80039A68 0200202D */ daddu $a0, $s0, $zero .L80039A6C: /* 14E6C 80039A6C C602003C */ lwc1 $f2, 0x3C($s0) /* 14E70 80039A70 3C01C4FA */ lui $at, (0xC4FA0000 >> 16) /* 14E74 80039A74 44810000 */ mtc1 $at, $f0 /* 14E78 80039A78 00000000 */ nop /* 14E7C 80039A7C 4600103C */ c.lt.s $f2, $f0 /* 14E80 80039A80 00000000 */ nop /* 14E84 80039A84 4500000D */ bc1f .L80039ABC /* 14E88 80039A88 3C030400 */ lui $v1, (0x4000000 >> 16) /* 14E8C 80039A8C 8E020000 */ lw $v0, 0x0($s0) /* 14E90 80039A90 00431024 */ and $v0, $v0, $v1 /* 14E94 80039A94 14400009 */ bnez $v0, .L80039ABC /* 14E98 80039A98 2403F7FF */ addiu $v1, $zero, -0x801 /* 14E9C 80039A9C C660002C */ lwc1 $f0, 0x2C($s3) /* 14EA0 80039AA0 8E020000 */ lw $v0, 0x0($s0) /* 14EA4 80039AA4 E614001C */ swc1 $f20, 0x1C($s0) /* 14EA8 80039AA8 E6140018 */ swc1 $f20, 0x18($s0) /* 14EAC 80039AAC E6140014 */ swc1 $f20, 0x14($s0) /* 14EB0 80039AB0 00431024 */ and $v0, $v0, $v1 /* 14EB4 80039AB4 E600003C */ swc1 $f0, 0x3C($s0) /* 14EB8 80039AB8 AE020000 */ sw $v0, 0x0($s0) .L80039ABC: /* 14EBC 80039ABC 8E030000 */ lw $v1, 0x0($s0) /* 14EC0 80039AC0 3C024000 */ lui $v0, (0x40000000 >> 16) /* 14EC4 80039AC4 00621024 */ and $v0, $v1, $v0 /* 14EC8 80039AC8 1440000E */ bnez $v0, .L80039B04 /* 14ECC 80039ACC 3C020100 */ lui $v0, (0x1000000 >> 16) /* 14ED0 80039AD0 00621024 */ and $v0, $v1, $v0 /* 14ED4 80039AD4 1440000F */ bnez $v0, .L80039B14 /* 14ED8 80039AD8 00000000 */ nop /* 14EDC 80039ADC 8E050028 */ lw $a1, 0x28($s0) /* 14EE0 80039AE0 10A0000C */ beqz $a1, .L80039B14 /* 14EE4 80039AE4 00000000 */ nop /* 14EE8 80039AE8 8E040024 */ lw $a0, 0x24($s0) /* 14EEC 80039AEC 04800009 */ bltz $a0, .L80039B14 /* 14EF0 80039AF0 00000000 */ nop /* 14EF4 80039AF4 0C0B78AB */ jal spr_update_sprite /* 14EF8 80039AF8 8E060030 */ lw $a2, 0x30($s0) /* 14EFC 80039AFC 0800E6C5 */ j .L80039B14 /* 14F00 80039B00 00000000 */ nop .L80039B04: /* 14F04 80039B04 8E050028 */ lw $a1, 0x28($s0) /* 14F08 80039B08 8E060030 */ lw $a2, 0x30($s0) /* 14F0C 80039B0C 0C0B76A3 */ jal spr_update_player_sprite /* 14F10 80039B10 24040001 */ addiu $a0, $zero, 0x1 .L80039B14: /* 14F14 80039B14 8E020000 */ lw $v0, 0x0($s0) /* 14F18 80039B18 30420010 */ andi $v0, $v0, 0x10 /* 14F1C 80039B1C 10400072 */ beqz $v0, .L80039CE8 /* 14F20 80039B20 00000000 */ nop /* 14F24 80039B24 0C044181 */ jal get_shadow_by_index /* 14F28 80039B28 8E040078 */ lw $a0, 0x78($s0) /* 14F2C 80039B2C 84440008 */ lh $a0, 0x8($v0) /* 14F30 80039B30 0C048B77 */ jal get_entity_model /* 14F34 80039B34 0040882D */ daddu $s1, $v0, $zero /* 14F38 80039B38 0040202D */ daddu $a0, $v0, $zero /* 14F3C 80039B3C 8C430000 */ lw $v1, 0x0($v0) /* 14F40 80039B40 2402FDFF */ addiu $v0, $zero, -0x201 /* 14F44 80039B44 00622824 */ and $a1, $v1, $v0 /* 14F48 80039B48 AC850000 */ sw $a1, 0x0($a0) /* 14F4C 80039B4C 8E020000 */ lw $v0, 0x0($s0) /* 14F50 80039B50 3C030002 */ lui $v1, (0x20000 >> 16) /* 14F54 80039B54 00431024 */ and $v0, $v0, $v1 /* 14F58 80039B58 10400002 */ beqz $v0, .L80039B64 /* 14F5C 80039B5C 34A20200 */ ori $v0, $a1, 0x200 /* 14F60 80039B60 AC820000 */ sw $v0, 0x0($a0) .L80039B64: /* 14F64 80039B64 C6020038 */ lwc1 $f2, 0x38($s0) /* 14F68 80039B68 C604003C */ lwc1 $f4, 0x3C($s0) /* 14F6C 80039B6C 8E030000 */ lw $v1, 0x0($s0) /* 14F70 80039B70 C6060040 */ lwc1 $f6, 0x40($s0) /* 14F74 80039B74 30620020 */ andi $v0, $v1, 0x20 /* 14F78 80039B78 E7A20018 */ swc1 $f2, 0x18($sp) /* 14F7C 80039B7C E7A4001C */ swc1 $f4, 0x1C($sp) /* 14F80 80039B80 1440004D */ bnez $v0, .L80039CB8 /* 14F84 80039B84 E7A60020 */ swc1 $f6, 0x20($sp) /* 14F88 80039B88 C600006C */ lwc1 $f0, 0x6C($s0) /* 14F8C 80039B8C 46001032 */ c.eq.s $f2, $f0 /* 14F90 80039B90 00000000 */ nop /* 14F94 80039B94 4500000E */ bc1f .L80039BD0 /* 14F98 80039B98 27A40018 */ addiu $a0, $sp, 0x18 /* 14F9C 80039B9C C6000070 */ lwc1 $f0, 0x70($s0) /* 14FA0 80039BA0 46002032 */ c.eq.s $f4, $f0 /* 14FA4 80039BA4 00000000 */ nop /* 14FA8 80039BA8 4502000A */ bc1fl .L80039BD4 /* 14FAC 80039BAC 27A5001C */ addiu $a1, $sp, 0x1C /* 14FB0 80039BB0 C6000074 */ lwc1 $f0, 0x74($s0) /* 14FB4 80039BB4 46003032 */ c.eq.s $f6, $f0 /* 14FB8 80039BB8 00000000 */ nop /* 14FBC 80039BBC 45000004 */ bc1f .L80039BD0 /* 14FC0 80039BC0 3C020001 */ lui $v0, (0x10000 >> 16) /* 14FC4 80039BC4 00621024 */ and $v0, $v1, $v0 /* 14FC8 80039BC8 10400047 */ beqz $v0, .L80039CE8 /* 14FCC 80039BCC 00000000 */ nop .L80039BD0: /* 14FD0 80039BD0 27A5001C */ addiu $a1, $sp, 0x1C .L80039BD4: /* 14FD4 80039BD4 27A60020 */ addiu $a2, $sp, 0x20 /* 14FD8 80039BD8 27A70024 */ addiu $a3, $sp, 0x24 /* 14FDC 80039BDC C6000038 */ lwc1 $f0, 0x38($s0) /* 14FE0 80039BE0 960300A8 */ lhu $v1, 0xA8($s0) /* 14FE4 80039BE4 3C01447A */ lui $at, (0x447A0000 >> 16) /* 14FE8 80039BE8 44812000 */ mtc1 $at, $f4 /* 14FEC 80039BEC 00031C00 */ sll $v1, $v1, 16 /* 14FF0 80039BF0 00031403 */ sra $v0, $v1, 16 /* 14FF4 80039BF4 00031FC2 */ srl $v1, $v1, 31 /* 14FF8 80039BF8 00431021 */ addu $v0, $v0, $v1 /* 14FFC 80039BFC 00021043 */ sra $v0, $v0, 1 /* 15000 80039C00 44823000 */ mtc1 $v0, $f6 /* 15004 80039C04 00000000 */ nop /* 15008 80039C08 468031A0 */ cvt.s.w $f6, $f6 /* 1500C 80039C0C 27A20028 */ addiu $v0, $sp, 0x28 /* 15010 80039C10 E7A00018 */ swc1 $f0, 0x18($sp) /* 15014 80039C14 C600003C */ lwc1 $f0, 0x3C($s0) /* 15018 80039C18 C6020040 */ lwc1 $f2, 0x40($s0) /* 1501C 80039C1C 46060000 */ add.s $f0, $f0, $f6 /* 15020 80039C20 E7A4002C */ swc1 $f4, 0x2C($sp) /* 15024 80039C24 E7A20020 */ swc1 $f2, 0x20($sp) /* 15028 80039C28 E7A0001C */ swc1 $f0, 0x1C($sp) /* 1502C 80039C2C AFA20010 */ sw $v0, 0x10($sp) /* 15030 80039C30 27A2002C */ addiu $v0, $sp, 0x2C /* 15034 80039C34 0C04497A */ jal entity_raycast_down /* 15038 80039C38 AFA20014 */ sw $v0, 0x14($sp) /* 1503C 80039C3C 860200A6 */ lh $v0, 0xA6($s0) /* 15040 80039C40 8FA5002C */ lw $a1, 0x2C($sp) /* 15044 80039C44 44824000 */ mtc1 $v0, $f8 /* 15048 80039C48 00000000 */ nop /* 1504C 80039C4C 46804220 */ cvt.s.w $f8, $f8 /* 15050 80039C50 44064000 */ mfc1 $a2, $f8 /* 15054 80039C54 0C044A40 */ jal set_npc_shadow_scale /* 15058 80039C58 0220202D */ daddu $a0, $s1, $zero /* 1505C 80039C5C C7A00018 */ lwc1 $f0, 0x18($sp) /* 15060 80039C60 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 15064 80039C64 C7A40020 */ lwc1 $f4, 0x20($sp) /* 15068 80039C68 C7A60024 */ lwc1 $f6, 0x24($sp) /* 1506C 80039C6C E6200010 */ swc1 $f0, 0x10($s1) /* 15070 80039C70 E6220014 */ swc1 $f2, 0x14($s1) /* 15074 80039C74 E6240018 */ swc1 $f4, 0x18($s1) /* 15078 80039C78 E6260028 */ swc1 $f6, 0x28($s1) /* 1507C 80039C7C C6020034 */ lwc1 $f2, 0x34($s0) /* 15080 80039C80 C7A00028 */ lwc1 $f0, 0x28($sp) /* 15084 80039C84 E622002C */ swc1 $f2, 0x2C($s1) /* 15088 80039C88 C622001C */ lwc1 $f2, 0x1C($s1) /* 1508C 80039C8C E6200030 */ swc1 $f0, 0x30($s1) /* 15090 80039C90 C600007C */ lwc1 $f0, 0x7C($s0) /* 15094 80039C94 46001082 */ mul.s $f2, $f2, $f0 /* 15098 80039C98 00000000 */ nop /* 1509C 80039C9C 3C03FFFE */ lui $v1, (0xFFFEFFFF >> 16) /* 150A0 80039CA0 E622001C */ swc1 $f2, 0x1C($s1) /* 150A4 80039CA4 8E020000 */ lw $v0, 0x0($s0) /* 150A8 80039CA8 3463FFFF */ ori $v1, $v1, (0xFFFEFFFF & 0xFFFF) /* 150AC 80039CAC 00431024 */ and $v0, $v0, $v1 /* 150B0 80039CB0 0800E73A */ j .L80039CE8 /* 150B4 80039CB4 AE020000 */ sw $v0, 0x0($s0) .L80039CB8: /* 150B8 80039CB8 30620400 */ andi $v0, $v1, 0x400 /* 150BC 80039CBC 10400004 */ beqz $v0, .L80039CD0 /* 150C0 80039CC0 00000000 */ nop /* 150C4 80039CC4 C6000038 */ lwc1 $f0, 0x38($s0) /* 150C8 80039CC8 0800E738 */ j .L80039CE0 /* 150CC 80039CCC E6200010 */ swc1 $f0, 0x10($s1) .L80039CD0: /* 150D0 80039CD0 C6000038 */ lwc1 $f0, 0x38($s0) /* 150D4 80039CD4 E6200010 */ swc1 $f0, 0x10($s1) /* 150D8 80039CD8 C600003C */ lwc1 $f0, 0x3C($s0) /* 150DC 80039CDC E6200014 */ swc1 $f0, 0x14($s1) .L80039CE0: /* 150E0 80039CE0 C6000040 */ lwc1 $f0, 0x40($s0) /* 150E4 80039CE4 E6200018 */ swc1 $f0, 0x18($s1) .L80039CE8: /* 150E8 80039CE8 C6000038 */ lwc1 $f0, 0x38($s0) /* 150EC 80039CEC C602003C */ lwc1 $f2, 0x3C($s0) /* 150F0 80039CF0 C6040040 */ lwc1 $f4, 0x40($s0) /* 150F4 80039CF4 0200202D */ daddu $a0, $s0, $zero /* 150F8 80039CF8 E600006C */ swc1 $f0, 0x6C($s0) /* 150FC 80039CFC E6020070 */ swc1 $f2, 0x70($s0) /* 15100 80039D00 0C00F111 */ jal npc_update_decorations /* 15104 80039D04 E6040074 */ swc1 $f4, 0x74($s0) /* 15108 80039D08 8E030000 */ lw $v1, 0x0($s0) /* 1510C 80039D0C 3C024000 */ lui $v0, (0x40000000 >> 16) /* 15110 80039D10 00621024 */ and $v0, $v1, $v0 /* 15114 80039D14 54400018 */ bnel $v0, $zero, .L80039D78 /* 15118 80039D18 26520001 */ addiu $s2, $s2, 0x1 /* 1511C 80039D1C 3C020100 */ lui $v0, (0x1000000 >> 16) /* 15120 80039D20 00621024 */ and $v0, $v1, $v0 /* 15124 80039D24 54400014 */ bnel $v0, $zero, .L80039D78 /* 15128 80039D28 26520001 */ addiu $s2, $s2, 0x1 /* 1512C 80039D2C 8E030024 */ lw $v1, 0x24($s0) /* 15130 80039D30 04630011 */ bgezl $v1, .L80039D78 /* 15134 80039D34 26520001 */ addiu $s2, $s2, 0x1 /* 15138 80039D38 24630001 */ addiu $v1, $v1, 0x1 /* 1513C 80039D3C 2402FFFF */ addiu $v0, $zero, -0x1 /* 15140 80039D40 1462000C */ bne $v1, $v0, .L80039D74 /* 15144 80039D44 AE030024 */ sw $v1, 0x24($s0) /* 15148 80039D48 8E040028 */ lw $a0, 0x28($s0) /* 1514C 80039D4C 0C0B783B */ jal spr_load_npc_sprite /* 15150 80039D50 8E0500B0 */ lw $a1, 0xB0($s0) /* 15154 80039D54 04410003 */ bgez $v0, .L80039D64 /* 15158 80039D58 AE020024 */ sw $v0, 0x24($s0) .L80039D5C: /* 1515C 80039D5C 0800E757 */ j .L80039D5C /* 15160 80039D60 00000000 */ nop .L80039D64: /* 15164 80039D64 8E040024 */ lw $a0, 0x24($s0) /* 15168 80039D68 8E050028 */ lw $a1, 0x28($s0) /* 1516C 80039D6C 0C0B78AB */ jal spr_update_sprite /* 15170 80039D70 8E060030 */ lw $a2, 0x30($s0) .L80039D74: /* 15174 80039D74 26520001 */ addiu $s2, $s2, 0x1 .L80039D78: /* 15178 80039D78 2A420040 */ slti $v0, $s2, 0x40 /* 1517C 80039D7C 1440FF00 */ bnez $v0, .L80039980 /* 15180 80039D80 00000000 */ nop .L80039D84: /* 15184 80039D84 8FBF0040 */ lw $ra, 0x40($sp) /* 15188 80039D88 8FB3003C */ lw $s3, 0x3C($sp) /* 1518C 80039D8C 8FB20038 */ lw $s2, 0x38($sp) /* 15190 80039D90 8FB10034 */ lw $s1, 0x34($sp) /* 15194 80039D94 8FB00030 */ lw $s0, 0x30($sp) /* 15198 80039D98 D7B40048 */ ldc1 $f20, 0x48($sp) /* 1519C 80039D9C 03E00008 */ jr $ra /* 151A0 80039DA0 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void update_npcs(void) { PlayerStatus* playerStatus = &gPlayerStatus; f32 x, y, z; f32 hitYaw, hitPitch, hitLength; playerStatus->animFlags &= ~PA_FLAG_NPC_COLLIDED; if (!(gOverrideFlags & (GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400))) { s32 i; for (i = 0; i < MAX_NPCS; i++) { Npc* npc = (*gCurrentNpcListPtr)[i]; if (npc != NULL) { if (npc->flags != 0) { if (npc->flags & (NPC_FLAG_SUSPENDED | NPC_FLAG_INACTIVE)) { npc_do_world_collision(npc); continue; } npc->onUpdate(npc); if (npc->flags & NPC_FLAG_IGNORE_ENTITY_COLLISION) { npc->collisionChannel |= COLLISION_IGNORE_ENTITIES; } else { npc->collisionChannel &= ~COLLISION_IGNORE_ENTITIES; } npc->currentFloor = NO_COLLIDER; npc->currentWall = NO_COLLIDER; npc->flags &= ~(NPC_FLAG_COLLDING_FORWARD_WITH_WORLD | NPC_FLAG_COLLDING_WITH_WORLD); npc_do_world_collision(npc); npc_try_apply_gravity(npc); npc_try_snap_to_ground(npc, 0.0f); npc_do_player_collision(npc); npc_do_other_npc_collision(npc); if (npc->flags & NPC_FLAG_MOTION_BLUR) { update_npc_blur(npc); } if ((npc->pos.y < -2000.0f) && !(npc->flags & NPC_FLAG_PARTNER)) { npc->pos.y = playerStatus->position.y; npc->jumpVelocity = 0.0f; npc->moveSpeed = 0.0f; npc->jumpScale = 0.0f; npc->flags &= ~NPC_FLAG_JUMPING; } if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { if (!(npc->flags & NPC_FLAG_HAS_NO_SPRITE)) { if (npc->currentAnim != 0) { if (npc->spriteInstanceID >= 0) { spr_update_sprite(npc->spriteInstanceID, npc->currentAnim, npc->animationSpeed); } } } } else { spr_update_player_sprite(PLAYER_SPRITE_AUX1, npc->currentAnim, npc->animationSpeed); } if (npc->flags & NPC_FLAG_HAS_SHADOW) { Shadow* shadow = get_shadow_by_index(npc->shadowIndex); EntityModel* entityModel = get_entity_model(shadow->entityModelID); entityModel->flags &= ~ENTITY_MODEL_FLAG_REFLECT; if (npc->flags & NPC_FLAG_REFLECT_WALL) { entityModel->flags |= ENTITY_MODEL_FLAG_REFLECT; } x = npc->pos.x; y = npc->pos.y; z = npc->pos.z; if (!(npc->flags & NPC_FLAG_NO_SHADOW_RAYCAST)) { if ( x != npc->colliderPos.x || y != npc->colliderPos.y || z != npc->colliderPos.z || (npc->flags & NPC_FLAG_DIRTY_SHADOW) ) { x = npc->pos.x; y = npc->pos.y + (npc->collisionHeight / 2); z = npc->pos.z; hitLength = 1000.0f; entity_raycast_down(&x, &y, &z, &hitYaw, &hitPitch, &hitLength); set_npc_shadow_scale(shadow, hitLength, npc->collisionDiameter); shadow->position.x = x; shadow->position.y = y; shadow->position.z = z; shadow->rotation.x = hitYaw; shadow->rotation.y = npc->renderYaw; shadow->rotation.z = hitPitch; shadow->scale.x *= npc->shadowScale; npc->flags &= ~NPC_FLAG_DIRTY_SHADOW; } } else { if (npc->flags & NPC_FLAG_DONT_UPDATE_SHADOW_Y) { shadow->position.x = npc->pos.x; shadow->position.z = npc->pos.z; } else { shadow->position.x = npc->pos.x; shadow->position.y = npc->pos.y; shadow->position.z = npc->pos.z; } } } npc->colliderPos.x = npc->pos.x; npc->colliderPos.y = npc->pos.y; npc->colliderPos.z = npc->pos.z; npc_update_decorations(npc); if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { if (!(npc->flags & NPC_FLAG_HAS_NO_SPRITE)) { if (npc->spriteInstanceID < 0) { npc->spriteInstanceID++; if (npc->spriteInstanceID == -1) { npc->spriteInstanceID = spr_load_npc_sprite(npc->currentAnim, npc->extraAnimList); ASSERT(npc->spriteInstanceID >= 0); spr_update_sprite(npc->spriteInstanceID, npc->currentAnim, npc->animationSpeed); } } } } } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_do_world_collision /* 13EFC 80038AFC 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 13F00 80038B00 AFB00030 */ sw $s0, 0x30($sp) /* 13F04 80038B04 0080802D */ daddu $s0, $a0, $zero /* 13F08 80038B08 AFBF0034 */ sw $ra, 0x34($sp) /* 13F0C 80038B0C 8E030000 */ lw $v1, 0x0($s0) /* 13F10 80038B10 30620040 */ andi $v0, $v1, 0x40 /* 13F14 80038B14 10400003 */ beqz $v0, .L80038B24 /* 13F18 80038B18 3C020800 */ lui $v0, (0x8000000 >> 16) /* 13F1C 80038B1C 0800E3FE */ j .L80038FF8 /* 13F20 80038B20 00621025 */ or $v0, $v1, $v0 .L80038B24: /* 13F24 80038B24 C6020038 */ lwc1 $f2, 0x38($s0) /* 13F28 80038B28 C600006C */ lwc1 $f0, 0x6C($s0) /* 13F2C 80038B2C 46001032 */ c.eq.s $f2, $f0 /* 13F30 80038B30 00000000 */ nop /* 13F34 80038B34 45020011 */ bc1fl .L80038B7C /* 13F38 80038B38 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) /* 13F3C 80038B3C C602003C */ lwc1 $f2, 0x3C($s0) /* 13F40 80038B40 C6000070 */ lwc1 $f0, 0x70($s0) /* 13F44 80038B44 46001032 */ c.eq.s $f2, $f0 /* 13F48 80038B48 00000000 */ nop /* 13F4C 80038B4C 4502000B */ bc1fl .L80038B7C /* 13F50 80038B50 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) /* 13F54 80038B54 C6020040 */ lwc1 $f2, 0x40($s0) /* 13F58 80038B58 C6000074 */ lwc1 $f0, 0x74($s0) /* 13F5C 80038B5C 46001032 */ c.eq.s $f2, $f0 /* 13F60 80038B60 00000000 */ nop /* 13F64 80038B64 45000004 */ bc1f .L80038B78 /* 13F68 80038B68 3C020800 */ lui $v0, (0x8000000 >> 16) /* 13F6C 80038B6C 00621024 */ and $v0, $v1, $v0 /* 13F70 80038B70 10400122 */ beqz $v0, .L80038FFC /* 13F74 80038B74 00000000 */ nop .L80038B78: /* 13F78 80038B78 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) .L80038B7C: /* 13F7C 80038B7C 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF) /* 13F80 80038B80 8E020000 */ lw $v0, 0x0($s0) /* 13F84 80038B84 C60C000C */ lwc1 $f12, 0xC($s0) /* 13F88 80038B88 00431024 */ and $v0, $v0, $v1 /* 13F8C 80038B8C 0C00A6C9 */ jal clamp_angle /* 13F90 80038B90 AE020000 */ sw $v0, 0x0($s0) /* 13F94 80038B94 C6020038 */ lwc1 $f2, 0x38($s0) /* 13F98 80038B98 C604003C */ lwc1 $f4, 0x3C($s0) /* 13F9C 80038B9C C6060040 */ lwc1 $f6, 0x40($s0) /* 13FA0 80038BA0 E7A20020 */ swc1 $f2, 0x20($sp) /* 13FA4 80038BA4 E7A40024 */ swc1 $f4, 0x24($sp) /* 13FA8 80038BA8 E7A60028 */ swc1 $f6, 0x28($sp) /* 13FAC 80038BAC 8E020000 */ lw $v0, 0x0($s0) /* 13FB0 80038BB0 3C030400 */ lui $v1, (0x4000000 >> 16) /* 13FB4 80038BB4 00431024 */ and $v0, $v0, $v1 /* 13FB8 80038BB8 14400013 */ bnez $v0, .L80038C08 /* 13FBC 80038BBC AFA00010 */ sw $zero, 0x10($sp) /* 13FC0 80038BC0 E7A00014 */ swc1 $f0, 0x14($sp) /* 13FC4 80038BC4 860200A8 */ lh $v0, 0xA8($s0) /* 13FC8 80038BC8 27A50020 */ addiu $a1, $sp, 0x20 /* 13FCC 80038BCC 44820000 */ mtc1 $v0, $f0 /* 13FD0 80038BD0 00000000 */ nop /* 13FD4 80038BD4 46800020 */ cvt.s.w $f0, $f0 /* 13FD8 80038BD8 E7A00018 */ swc1 $f0, 0x18($sp) /* 13FDC 80038BDC 860200A6 */ lh $v0, 0xA6($s0) /* 13FE0 80038BE0 27A60024 */ addiu $a2, $sp, 0x24 /* 13FE4 80038BE4 44820000 */ mtc1 $v0, $f0 /* 13FE8 80038BE8 00000000 */ nop /* 13FEC 80038BEC 46800020 */ cvt.s.w $f0, $f0 /* 13FF0 80038BF0 E7A0001C */ swc1 $f0, 0x1C($sp) /* 13FF4 80038BF4 8E040080 */ lw $a0, 0x80($s0) /* 13FF8 80038BF8 0C037711 */ jal npc_test_move_simple_with_slipping /* 13FFC 80038BFC 27A70028 */ addiu $a3, $sp, 0x28 /* 14000 80038C00 0800E312 */ j .L80038C48 /* 14004 80038C04 00000000 */ nop .L80038C08: /* 14008 80038C08 E7A00014 */ swc1 $f0, 0x14($sp) /* 1400C 80038C0C 860200A8 */ lh $v0, 0xA8($s0) /* 14010 80038C10 27A50020 */ addiu $a1, $sp, 0x20 /* 14014 80038C14 44820000 */ mtc1 $v0, $f0 /* 14018 80038C18 00000000 */ nop /* 1401C 80038C1C 46800020 */ cvt.s.w $f0, $f0 /* 14020 80038C20 E7A00018 */ swc1 $f0, 0x18($sp) /* 14024 80038C24 860200A6 */ lh $v0, 0xA6($s0) /* 14028 80038C28 27A60024 */ addiu $a2, $sp, 0x24 /* 1402C 80038C2C 44820000 */ mtc1 $v0, $f0 /* 14030 80038C30 00000000 */ nop /* 14034 80038C34 46800020 */ cvt.s.w $f0, $f0 /* 14038 80038C38 E7A0001C */ swc1 $f0, 0x1C($sp) /* 1403C 80038C3C 8E040080 */ lw $a0, 0x80($s0) /* 14040 80038C40 0C037765 */ jal npc_test_move_complex_with_slipping /* 14044 80038C44 27A70028 */ addiu $a3, $sp, 0x28 .L80038C48: /* 14048 80038C48 1040000C */ beqz $v0, .L80038C7C /* 1404C 80038C4C 24039FFF */ addiu $v1, $zero, -0x6001 /* 14050 80038C50 8E020000 */ lw $v0, 0x0($s0) /* 14054 80038C54 3C038011 */ lui $v1, %hi(D_8010C97A) /* 14058 80038C58 9463C97A */ lhu $v1, %lo(D_8010C97A)($v1) /* 1405C 80038C5C C7A00020 */ lwc1 $f0, 0x20($sp) /* 14060 80038C60 C7A20028 */ lwc1 $f2, 0x28($sp) /* 14064 80038C64 34426000 */ ori $v0, $v0, 0x6000 /* 14068 80038C68 AE020000 */ sw $v0, 0x0($s0) /* 1406C 80038C6C A6030086 */ sh $v1, 0x86($s0) /* 14070 80038C70 E6000038 */ swc1 $f0, 0x38($s0) /* 14074 80038C74 0800E322 */ j .L80038C88 /* 14078 80038C78 E6020040 */ swc1 $f2, 0x40($s0) .L80038C7C: /* 1407C 80038C7C 8E020000 */ lw $v0, 0x0($s0) /* 14080 80038C80 00431024 */ and $v0, $v0, $v1 /* 14084 80038C84 AE020000 */ sw $v0, 0x0($s0) .L80038C88: /* 14088 80038C88 C600000C */ lwc1 $f0, 0xC($s0) /* 1408C 80038C8C 3C014234 */ lui $at, (0x42340000 >> 16) /* 14090 80038C90 44816000 */ mtc1 $at, $f12 /* 14094 80038C94 0C00A6C9 */ jal clamp_angle /* 14098 80038C98 460C0300 */ add.s $f12, $f0, $f12 /* 1409C 80038C9C C6020038 */ lwc1 $f2, 0x38($s0) /* 140A0 80038CA0 C604003C */ lwc1 $f4, 0x3C($s0) /* 140A4 80038CA4 C6060040 */ lwc1 $f6, 0x40($s0) /* 140A8 80038CA8 E7A20020 */ swc1 $f2, 0x20($sp) /* 140AC 80038CAC E7A40024 */ swc1 $f4, 0x24($sp) /* 140B0 80038CB0 E7A60028 */ swc1 $f6, 0x28($sp) /* 140B4 80038CB4 8E020000 */ lw $v0, 0x0($s0) /* 140B8 80038CB8 3C030400 */ lui $v1, (0x4000000 >> 16) /* 140BC 80038CBC 00431024 */ and $v0, $v0, $v1 /* 140C0 80038CC0 14400013 */ bnez $v0, .L80038D10 /* 140C4 80038CC4 AFA00010 */ sw $zero, 0x10($sp) /* 140C8 80038CC8 E7A00014 */ swc1 $f0, 0x14($sp) /* 140CC 80038CCC 860200A8 */ lh $v0, 0xA8($s0) /* 140D0 80038CD0 27A50020 */ addiu $a1, $sp, 0x20 /* 140D4 80038CD4 44820000 */ mtc1 $v0, $f0 /* 140D8 80038CD8 00000000 */ nop /* 140DC 80038CDC 46800020 */ cvt.s.w $f0, $f0 /* 140E0 80038CE0 E7A00018 */ swc1 $f0, 0x18($sp) /* 140E4 80038CE4 860200A6 */ lh $v0, 0xA6($s0) /* 140E8 80038CE8 27A60024 */ addiu $a2, $sp, 0x24 /* 140EC 80038CEC 44820000 */ mtc1 $v0, $f0 /* 140F0 80038CF0 00000000 */ nop /* 140F4 80038CF4 46800020 */ cvt.s.w $f0, $f0 /* 140F8 80038CF8 E7A0001C */ swc1 $f0, 0x1C($sp) /* 140FC 80038CFC 8E040080 */ lw $a0, 0x80($s0) /* 14100 80038D00 0C037711 */ jal npc_test_move_simple_with_slipping /* 14104 80038D04 27A70028 */ addiu $a3, $sp, 0x28 /* 14108 80038D08 0800E354 */ j .L80038D50 /* 1410C 80038D0C 00000000 */ nop .L80038D10: /* 14110 80038D10 E7A00014 */ swc1 $f0, 0x14($sp) /* 14114 80038D14 860200A8 */ lh $v0, 0xA8($s0) /* 14118 80038D18 27A50020 */ addiu $a1, $sp, 0x20 /* 1411C 80038D1C 44820000 */ mtc1 $v0, $f0 /* 14120 80038D20 00000000 */ nop /* 14124 80038D24 46800020 */ cvt.s.w $f0, $f0 /* 14128 80038D28 E7A00018 */ swc1 $f0, 0x18($sp) /* 1412C 80038D2C 860200A6 */ lh $v0, 0xA6($s0) /* 14130 80038D30 27A60024 */ addiu $a2, $sp, 0x24 /* 14134 80038D34 44820000 */ mtc1 $v0, $f0 /* 14138 80038D38 00000000 */ nop /* 1413C 80038D3C 46800020 */ cvt.s.w $f0, $f0 /* 14140 80038D40 E7A0001C */ swc1 $f0, 0x1C($sp) /* 14144 80038D44 8E040080 */ lw $a0, 0x80($s0) /* 14148 80038D48 0C0376B9 */ jal npc_test_move_taller_with_slipping /* 1414C 80038D4C 27A70028 */ addiu $a3, $sp, 0x28 .L80038D50: /* 14150 80038D50 10400009 */ beqz $v0, .L80038D78 /* 14154 80038D54 2403DFFF */ addiu $v1, $zero, -0x2001 /* 14158 80038D58 8E020000 */ lw $v0, 0x0($s0) /* 1415C 80038D5C C7A00020 */ lwc1 $f0, 0x20($sp) /* 14160 80038D60 C7A20028 */ lwc1 $f2, 0x28($sp) /* 14164 80038D64 34422000 */ ori $v0, $v0, 0x2000 /* 14168 80038D68 AE020000 */ sw $v0, 0x0($s0) /* 1416C 80038D6C E6000038 */ swc1 $f0, 0x38($s0) /* 14170 80038D70 0800E361 */ j .L80038D84 /* 14174 80038D74 E6020040 */ swc1 $f2, 0x40($s0) .L80038D78: /* 14178 80038D78 8E020000 */ lw $v0, 0x0($s0) /* 1417C 80038D7C 00431024 */ and $v0, $v0, $v1 /* 14180 80038D80 AE020000 */ sw $v0, 0x0($s0) .L80038D84: /* 14184 80038D84 C600000C */ lwc1 $f0, 0xC($s0) /* 14188 80038D88 3C014234 */ lui $at, (0x42340000 >> 16) /* 1418C 80038D8C 44816000 */ mtc1 $at, $f12 /* 14190 80038D90 0C00A6C9 */ jal clamp_angle /* 14194 80038D94 460C0301 */ sub.s $f12, $f0, $f12 /* 14198 80038D98 C6020038 */ lwc1 $f2, 0x38($s0) /* 1419C 80038D9C C604003C */ lwc1 $f4, 0x3C($s0) /* 141A0 80038DA0 C6060040 */ lwc1 $f6, 0x40($s0) /* 141A4 80038DA4 E7A20020 */ swc1 $f2, 0x20($sp) /* 141A8 80038DA8 E7A40024 */ swc1 $f4, 0x24($sp) /* 141AC 80038DAC E7A60028 */ swc1 $f6, 0x28($sp) /* 141B0 80038DB0 8E020000 */ lw $v0, 0x0($s0) /* 141B4 80038DB4 3C030400 */ lui $v1, (0x4000000 >> 16) /* 141B8 80038DB8 00431024 */ and $v0, $v0, $v1 /* 141BC 80038DBC 14400013 */ bnez $v0, .L80038E0C /* 141C0 80038DC0 AFA00010 */ sw $zero, 0x10($sp) /* 141C4 80038DC4 E7A00014 */ swc1 $f0, 0x14($sp) /* 141C8 80038DC8 860200A8 */ lh $v0, 0xA8($s0) /* 141CC 80038DCC 27A50020 */ addiu $a1, $sp, 0x20 /* 141D0 80038DD0 44820000 */ mtc1 $v0, $f0 /* 141D4 80038DD4 00000000 */ nop /* 141D8 80038DD8 46800020 */ cvt.s.w $f0, $f0 /* 141DC 80038DDC E7A00018 */ swc1 $f0, 0x18($sp) /* 141E0 80038DE0 860200A6 */ lh $v0, 0xA6($s0) /* 141E4 80038DE4 27A60024 */ addiu $a2, $sp, 0x24 /* 141E8 80038DE8 44820000 */ mtc1 $v0, $f0 /* 141EC 80038DEC 00000000 */ nop /* 141F0 80038DF0 46800020 */ cvt.s.w $f0, $f0 /* 141F4 80038DF4 E7A0001C */ swc1 $f0, 0x1C($sp) /* 141F8 80038DF8 8E040080 */ lw $a0, 0x80($s0) /* 141FC 80038DFC 0C037711 */ jal npc_test_move_simple_with_slipping /* 14200 80038E00 27A70028 */ addiu $a3, $sp, 0x28 /* 14204 80038E04 0800E393 */ j .L80038E4C /* 14208 80038E08 00000000 */ nop .L80038E0C: /* 1420C 80038E0C E7A00014 */ swc1 $f0, 0x14($sp) /* 14210 80038E10 860200A8 */ lh $v0, 0xA8($s0) /* 14214 80038E14 27A50020 */ addiu $a1, $sp, 0x20 /* 14218 80038E18 44820000 */ mtc1 $v0, $f0 /* 1421C 80038E1C 00000000 */ nop /* 14220 80038E20 46800020 */ cvt.s.w $f0, $f0 /* 14224 80038E24 E7A00018 */ swc1 $f0, 0x18($sp) /* 14228 80038E28 860200A6 */ lh $v0, 0xA6($s0) /* 1422C 80038E2C 27A60024 */ addiu $a2, $sp, 0x24 /* 14230 80038E30 44820000 */ mtc1 $v0, $f0 /* 14234 80038E34 00000000 */ nop /* 14238 80038E38 46800020 */ cvt.s.w $f0, $f0 /* 1423C 80038E3C E7A0001C */ swc1 $f0, 0x1C($sp) /* 14240 80038E40 8E040080 */ lw $a0, 0x80($s0) /* 14244 80038E44 0C0376B9 */ jal npc_test_move_taller_with_slipping /* 14248 80038E48 27A70028 */ addiu $a3, $sp, 0x28 .L80038E4C: /* 1424C 80038E4C 10400009 */ beqz $v0, .L80038E74 /* 14250 80038E50 2403DFFF */ addiu $v1, $zero, -0x2001 /* 14254 80038E54 8E020000 */ lw $v0, 0x0($s0) /* 14258 80038E58 C7A00020 */ lwc1 $f0, 0x20($sp) /* 1425C 80038E5C C7A20028 */ lwc1 $f2, 0x28($sp) /* 14260 80038E60 34422000 */ ori $v0, $v0, 0x2000 /* 14264 80038E64 AE020000 */ sw $v0, 0x0($s0) /* 14268 80038E68 E6000038 */ swc1 $f0, 0x38($s0) /* 1426C 80038E6C 0800E3A0 */ j .L80038E80 /* 14270 80038E70 E6020040 */ swc1 $f2, 0x40($s0) .L80038E74: /* 14274 80038E74 8E020000 */ lw $v0, 0x0($s0) /* 14278 80038E78 00431024 */ and $v0, $v0, $v1 /* 1427C 80038E7C AE020000 */ sw $v0, 0x0($s0) .L80038E80: /* 14280 80038E80 8E020000 */ lw $v0, 0x0($s0) /* 14284 80038E84 3C030400 */ lui $v1, (0x4000000 >> 16) /* 14288 80038E88 00431024 */ and $v0, $v0, $v1 /* 1428C 80038E8C 1040005B */ beqz $v0, .L80038FFC /* 14290 80038E90 00000000 */ nop /* 14294 80038E94 C60C000C */ lwc1 $f12, 0xC($s0) /* 14298 80038E98 3C014234 */ lui $at, (0x42340000 >> 16) /* 1429C 80038E9C 44810000 */ mtc1 $at, $f0 /* 142A0 80038EA0 00000000 */ nop /* 142A4 80038EA4 46006300 */ add.s $f12, $f12, $f0 /* 142A8 80038EA8 3C014334 */ lui $at, (0x43340000 >> 16) /* 142AC 80038EAC 44810000 */ mtc1 $at, $f0 /* 142B0 80038EB0 0C00A6C9 */ jal clamp_angle /* 142B4 80038EB4 46006300 */ add.s $f12, $f12, $f0 /* 142B8 80038EB8 C6020038 */ lwc1 $f2, 0x38($s0) /* 142BC 80038EBC C604003C */ lwc1 $f4, 0x3C($s0) /* 142C0 80038EC0 C6060040 */ lwc1 $f6, 0x40($s0) /* 142C4 80038EC4 E7A20020 */ swc1 $f2, 0x20($sp) /* 142C8 80038EC8 E7A40024 */ swc1 $f4, 0x24($sp) /* 142CC 80038ECC E7A60028 */ swc1 $f6, 0x28($sp) /* 142D0 80038ED0 AFA00010 */ sw $zero, 0x10($sp) /* 142D4 80038ED4 E7A00014 */ swc1 $f0, 0x14($sp) /* 142D8 80038ED8 860200A8 */ lh $v0, 0xA8($s0) /* 142DC 80038EDC 27A50020 */ addiu $a1, $sp, 0x20 /* 142E0 80038EE0 44820000 */ mtc1 $v0, $f0 /* 142E4 80038EE4 00000000 */ nop /* 142E8 80038EE8 46800020 */ cvt.s.w $f0, $f0 /* 142EC 80038EEC E7A00018 */ swc1 $f0, 0x18($sp) /* 142F0 80038EF0 860200A6 */ lh $v0, 0xA6($s0) /* 142F4 80038EF4 27A60024 */ addiu $a2, $sp, 0x24 /* 142F8 80038EF8 44820000 */ mtc1 $v0, $f0 /* 142FC 80038EFC 00000000 */ nop /* 14300 80038F00 46800020 */ cvt.s.w $f0, $f0 /* 14304 80038F04 E7A0001C */ swc1 $f0, 0x1C($sp) /* 14308 80038F08 8E040080 */ lw $a0, 0x80($s0) /* 1430C 80038F0C 0C037711 */ jal npc_test_move_simple_with_slipping /* 14310 80038F10 27A70028 */ addiu $a3, $sp, 0x28 /* 14314 80038F14 10400009 */ beqz $v0, .L80038F3C /* 14318 80038F18 2403DFFF */ addiu $v1, $zero, -0x2001 /* 1431C 80038F1C 8E020000 */ lw $v0, 0x0($s0) /* 14320 80038F20 C7A00020 */ lwc1 $f0, 0x20($sp) /* 14324 80038F24 C7A20028 */ lwc1 $f2, 0x28($sp) /* 14328 80038F28 34422000 */ ori $v0, $v0, 0x2000 /* 1432C 80038F2C AE020000 */ sw $v0, 0x0($s0) /* 14330 80038F30 E6000038 */ swc1 $f0, 0x38($s0) /* 14334 80038F34 0800E3D2 */ j .L80038F48 /* 14338 80038F38 E6020040 */ swc1 $f2, 0x40($s0) .L80038F3C: /* 1433C 80038F3C 8E020000 */ lw $v0, 0x0($s0) /* 14340 80038F40 00431024 */ and $v0, $v0, $v1 /* 14344 80038F44 AE020000 */ sw $v0, 0x0($s0) .L80038F48: /* 14348 80038F48 C60C000C */ lwc1 $f12, 0xC($s0) /* 1434C 80038F4C 3C014234 */ lui $at, (0x42340000 >> 16) /* 14350 80038F50 44810000 */ mtc1 $at, $f0 /* 14354 80038F54 00000000 */ nop /* 14358 80038F58 46006301 */ sub.s $f12, $f12, $f0 /* 1435C 80038F5C 3C014334 */ lui $at, (0x43340000 >> 16) /* 14360 80038F60 44810000 */ mtc1 $at, $f0 /* 14364 80038F64 0C00A6C9 */ jal clamp_angle /* 14368 80038F68 46006300 */ add.s $f12, $f12, $f0 /* 1436C 80038F6C C6020038 */ lwc1 $f2, 0x38($s0) /* 14370 80038F70 C604003C */ lwc1 $f4, 0x3C($s0) /* 14374 80038F74 C6060040 */ lwc1 $f6, 0x40($s0) /* 14378 80038F78 E7A20020 */ swc1 $f2, 0x20($sp) /* 1437C 80038F7C E7A40024 */ swc1 $f4, 0x24($sp) /* 14380 80038F80 E7A60028 */ swc1 $f6, 0x28($sp) /* 14384 80038F84 AFA00010 */ sw $zero, 0x10($sp) /* 14388 80038F88 E7A00014 */ swc1 $f0, 0x14($sp) /* 1438C 80038F8C 860200A8 */ lh $v0, 0xA8($s0) /* 14390 80038F90 27A50020 */ addiu $a1, $sp, 0x20 /* 14394 80038F94 44820000 */ mtc1 $v0, $f0 /* 14398 80038F98 00000000 */ nop /* 1439C 80038F9C 46800020 */ cvt.s.w $f0, $f0 /* 143A0 80038FA0 E7A00018 */ swc1 $f0, 0x18($sp) /* 143A4 80038FA4 860200A6 */ lh $v0, 0xA6($s0) /* 143A8 80038FA8 27A60024 */ addiu $a2, $sp, 0x24 /* 143AC 80038FAC 44820000 */ mtc1 $v0, $f0 /* 143B0 80038FB0 00000000 */ nop /* 143B4 80038FB4 46800020 */ cvt.s.w $f0, $f0 /* 143B8 80038FB8 E7A0001C */ swc1 $f0, 0x1C($sp) /* 143BC 80038FBC 8E040080 */ lw $a0, 0x80($s0) /* 143C0 80038FC0 0C037711 */ jal npc_test_move_simple_with_slipping /* 143C4 80038FC4 27A70028 */ addiu $a3, $sp, 0x28 /* 143C8 80038FC8 10400009 */ beqz $v0, .L80038FF0 /* 143CC 80038FCC 2403DFFF */ addiu $v1, $zero, -0x2001 /* 143D0 80038FD0 8E020000 */ lw $v0, 0x0($s0) /* 143D4 80038FD4 C7A00020 */ lwc1 $f0, 0x20($sp) /* 143D8 80038FD8 C7A20028 */ lwc1 $f2, 0x28($sp) /* 143DC 80038FDC 34422000 */ ori $v0, $v0, 0x2000 /* 143E0 80038FE0 AE020000 */ sw $v0, 0x0($s0) /* 143E4 80038FE4 E6000038 */ swc1 $f0, 0x38($s0) /* 143E8 80038FE8 0800E3FF */ j .L80038FFC /* 143EC 80038FEC E6020040 */ swc1 $f2, 0x40($s0) .L80038FF0: /* 143F0 80038FF0 8E020000 */ lw $v0, 0x0($s0) /* 143F4 80038FF4 00431024 */ and $v0, $v0, $v1 .L80038FF8: /* 143F8 80038FF8 AE020000 */ sw $v0, 0x0($s0) .L80038FFC: /* 143FC 80038FFC 8FBF0034 */ lw $ra, 0x34($sp) /* 14400 80039000 8FB00030 */ lw $s0, 0x30($sp) /* 14404 80039004 03E00008 */ jr $ra /* 14408 80039008 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void npc_do_world_collision(Npc* npc) { f32 testAngle; s32 hit; f32 testX; f32 testY; f32 testZ; if (npc->flags & NPC_FLAG_IGNORE_WORLD_COLLISION) { npc->flags |= NPC_FLAG_WORLD_COLLISION_DIRTY; } else if ( (npc->pos.x != npc->colliderPos.x) || (npc->pos.y != npc->colliderPos.y) || (npc->pos.z != npc->colliderPos.z) || npc->flags & NPC_FLAG_WORLD_COLLISION_DIRTY ) { npc->flags &= ~NPC_FLAG_WORLD_COLLISION_DIRTY; testAngle = clamp_angle(npc->yaw); testX = npc->pos.x; testY = npc->pos.y; testZ = npc->pos.z; if (!(npc->flags & NPC_FLAG_PARTNER)) { hit = npc_test_move_simple_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter); } else { hit = npc_test_move_complex_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter); } if (hit) { npc->flags |= (NPC_FLAG_COLLDING_WITH_WORLD | NPC_FLAG_COLLDING_FORWARD_WITH_WORLD); npc->currentWall = NpcHitQueryColliderID; npc->pos.x = testX; npc->pos.z = testZ; } else { npc->flags &= ~(NPC_FLAG_COLLDING_WITH_WORLD | NPC_FLAG_COLLDING_FORWARD_WITH_WORLD); } testAngle = clamp_angle(npc->yaw + 45.0f); testX = npc->pos.x; testY = npc->pos.y; testZ = npc->pos.z; if (!(npc->flags & NPC_FLAG_PARTNER)) { hit = npc_test_move_simple_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter); } else { hit = npc_test_move_taller_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter); } if (hit) { npc->flags |= NPC_FLAG_COLLDING_WITH_WORLD; npc->pos.x = testX; npc->pos.z = testZ; } else { npc->flags &= ~NPC_FLAG_COLLDING_WITH_WORLD; } testAngle = clamp_angle(npc->yaw - 45.0f); testX = npc->pos.x; testY = npc->pos.y; testZ = npc->pos.z; if (!(npc->flags & NPC_FLAG_PARTNER)) { hit = npc_test_move_simple_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter); } else { hit = npc_test_move_taller_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter); } if (hit != 0) { npc->flags |= NPC_FLAG_COLLDING_WITH_WORLD; npc->pos.x = testX; npc->pos.z = testZ; } else { npc->flags &= ~NPC_FLAG_COLLDING_WITH_WORLD; } if (npc->flags & NPC_FLAG_PARTNER) { testAngle = clamp_angle(npc->yaw + 45.0f + 180.0f); testX = npc->pos.x; testY = npc->pos.y; testZ = npc->pos.z; if (npc_test_move_simple_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter) != 0) { npc->flags |= NPC_FLAG_COLLDING_WITH_WORLD; npc->pos.x = testX; npc->pos.z = testZ; } else { npc->flags &= ~NPC_FLAG_COLLDING_WITH_WORLD; } testAngle = clamp_angle((npc->yaw - 45.0f) + 180.0f); testX = npc->pos.x; testY = npc->pos.y; testZ = npc->pos.z; if (npc_test_move_simple_with_slipping(npc->collisionChannel, &testX, &testY, &testZ, 0, testAngle, npc->collisionHeight, npc->collisionDiameter) != 0) { npc->flags |= NPC_FLAG_COLLDING_WITH_WORLD; npc->pos.x = testX; npc->pos.z = testZ; return; } npc->flags &= ~NPC_FLAG_COLLDING_WITH_WORLD; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel shattering_stones_appendGfx /* 340294 E002C414 27BDFEA0 */ addiu $sp, $sp, -0x160 /* 340298 E002C418 3C02DB06 */ lui $v0, (0xDB060024 >> 16) /* 34029C E002C41C 34420024 */ ori $v0, $v0, (0xDB060024 & 0xFFFF) /* 3402A0 E002C420 AFB40138 */ sw $s4, 0x138($sp) /* 3402A4 E002C424 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 3402A8 E002C428 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 3402AC E002C42C AFA40160 */ sw $a0, 0x160($sp) /* 3402B0 E002C430 8FA80160 */ lw $t0, 0x160($sp) /* 3402B4 E002C434 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3402B8 E002C438 AFBF014C */ sw $ra, 0x14C($sp) /* 3402BC E002C43C AFBE0148 */ sw $fp, 0x148($sp) /* 3402C0 E002C440 AFB70144 */ sw $s7, 0x144($sp) /* 3402C4 E002C444 AFB60140 */ sw $s6, 0x140($sp) /* 3402C8 E002C448 AFB5013C */ sw $s5, 0x13C($sp) /* 3402CC E002C44C AFB30134 */ sw $s3, 0x134($sp) /* 3402D0 E002C450 AFB20130 */ sw $s2, 0x130($sp) /* 3402D4 E002C454 AFB1012C */ sw $s1, 0x12C($sp) /* 3402D8 E002C458 AFB00128 */ sw $s0, 0x128($sp) /* 3402DC E002C45C F7B60158 */ sdc1 $f22, 0x158($sp) /* 3402E0 E002C460 F7B40150 */ sdc1 $f20, 0x150($sp) /* 3402E4 E002C464 8E840000 */ lw $a0, 0x0($s4) /* 3402E8 E002C468 8D13000C */ lw $s3, 0xC($t0) /* 3402EC E002C46C 0080282D */ daddu $a1, $a0, $zero /* 3402F0 E002C470 ACA20000 */ sw $v0, 0x0($a1) /* 3402F4 E002C474 8D020010 */ lw $v0, 0x10($t0) /* 3402F8 E002C478 24840008 */ addiu $a0, $a0, 0x8 /* 3402FC E002C47C AE840000 */ sw $a0, 0x0($s4) /* 340300 E002C480 8C42001C */ lw $v0, 0x1C($v0) /* 340304 E002C484 3C15DE00 */ lui $s5, (0xDE000000 >> 16) /* 340308 E002C488 00431021 */ addu $v0, $v0, $v1 /* 34030C E002C48C ACA20004 */ sw $v0, 0x4($a1) /* 340310 E002C490 3C020900 */ lui $v0, %hi(D_09000C00_415C60) /* 340314 E002C494 24420C00 */ addiu $v0, $v0, %lo(D_09000C00_415C60) /* 340318 E002C498 AC950000 */ sw $s5, 0x0($a0) /* 34031C E002C49C AC820004 */ sw $v0, 0x4($a0) /* 340320 E002C4A0 8E620024 */ lw $v0, 0x24($s3) /* 340324 E002C4A4 24840008 */ addiu $a0, $a0, 0x8 /* 340328 E002C4A8 1440007E */ bnez $v0, .LE002C6A4 /* 34032C E002C4AC AE840000 */ sw $a0, 0x0($s4) /* 340330 E002C4B0 27A40020 */ addiu $a0, $sp, 0x20 /* 340334 E002C4B4 8E650000 */ lw $a1, 0x0($s3) /* 340338 E002C4B8 8E660004 */ lw $a2, 0x4($s3) /* 34033C E002C4BC 8E670008 */ lw $a3, 0x8($s3) /* 340340 E002C4C0 0C080108 */ jal shim_guTranslateF /* 340344 E002C4C4 3C120001 */ lui $s2, (0x11630 >> 16) /* 340348 E002C4C8 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 34034C E002C4CC 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 340350 E002C4D0 44810000 */ mtc1 $at, $f0 /* 340354 E002C4D4 27B10060 */ addiu $s1, $sp, 0x60 /* 340358 E002C4D8 44050000 */ mfc1 $a1, $f0 /* 34035C E002C4DC 0220202D */ daddu $a0, $s1, $zero /* 340360 E002C4E0 00A0302D */ daddu $a2, $a1, $zero /* 340364 E002C4E4 0C080110 */ jal shim_guScaleF /* 340368 E002C4E8 00A0382D */ daddu $a3, $a1, $zero /* 34036C E002C4EC 0220202D */ daddu $a0, $s1, $zero /* 340370 E002C4F0 27A50020 */ addiu $a1, $sp, 0x20 /* 340374 E002C4F4 27B000A0 */ addiu $s0, $sp, 0xA0 /* 340378 E002C4F8 0C080114 */ jal shim_guMtxCatF /* 34037C E002C4FC 0200302D */ daddu $a2, $s0, $zero /* 340380 E002C500 4480A000 */ mtc1 $zero, $f20 /* 340384 E002C504 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 340388 E002C508 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 34038C E002C50C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 340390 E002C510 4481B000 */ mtc1 $at, $f22 /* 340394 E002C514 00031080 */ sll $v0, $v1, 2 /* 340398 E002C518 00431021 */ addu $v0, $v0, $v1 /* 34039C E002C51C 00021080 */ sll $v0, $v0, 2 /* 3403A0 E002C520 00431023 */ subu $v0, $v0, $v1 /* 3403A4 E002C524 000218C0 */ sll $v1, $v0, 3 /* 3403A8 E002C528 00431021 */ addu $v0, $v0, $v1 /* 3403AC E002C52C 000210C0 */ sll $v0, $v0, 3 /* 3403B0 E002C530 4406A000 */ mfc1 $a2, $f20 /* 3403B4 E002C534 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3403B8 E002C538 00220821 */ addu $at, $at, $v0 /* 3403BC E002C53C C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 3403C0 E002C540 4407B000 */ mfc1 $a3, $f22 /* 3403C4 E002C544 46000007 */ neg.s $f0, $f0 /* 3403C8 E002C548 44050000 */ mfc1 $a1, $f0 /* 3403CC E002C54C 0220202D */ daddu $a0, $s1, $zero /* 3403D0 E002C550 0C080104 */ jal shim_guRotateF /* 3403D4 E002C554 E7B40010 */ swc1 $f20, 0x10($sp) /* 3403D8 E002C558 0220202D */ daddu $a0, $s1, $zero /* 3403DC E002C55C 0200282D */ daddu $a1, $s0, $zero /* 3403E0 E002C560 0C080114 */ jal shim_guMtxCatF /* 3403E4 E002C564 0200302D */ daddu $a2, $s0, $zero /* 3403E8 E002C568 E7B60010 */ swc1 $f22, 0x10($sp) /* 3403EC E002C56C 8E650034 */ lw $a1, 0x34($s3) /* 3403F0 E002C570 4406A000 */ mfc1 $a2, $f20 /* 3403F4 E002C574 4407A000 */ mfc1 $a3, $f20 /* 3403F8 E002C578 0C080104 */ jal shim_guRotateF /* 3403FC E002C57C 0220202D */ daddu $a0, $s1, $zero /* 340400 E002C580 0220202D */ daddu $a0, $s1, $zero /* 340404 E002C584 0200282D */ daddu $a1, $s0, $zero /* 340408 E002C588 0C080114 */ jal shim_guMtxCatF /* 34040C E002C58C 0200302D */ daddu $a2, $s0, $zero /* 340410 E002C590 E7B40010 */ swc1 $f20, 0x10($sp) /* 340414 E002C594 8E65002C */ lw $a1, 0x2C($s3) /* 340418 E002C598 4406B000 */ mfc1 $a2, $f22 /* 34041C E002C59C 4407A000 */ mfc1 $a3, $f20 /* 340420 E002C5A0 0C080104 */ jal shim_guRotateF /* 340424 E002C5A4 0220202D */ daddu $a0, $s1, $zero /* 340428 E002C5A8 0220202D */ daddu $a0, $s1, $zero /* 34042C E002C5AC 0200282D */ daddu $a1, $s0, $zero /* 340430 E002C5B0 0C080114 */ jal shim_guMtxCatF /* 340434 E002C5B4 0200302D */ daddu $a2, $s0, $zero /* 340438 E002C5B8 E7B40010 */ swc1 $f20, 0x10($sp) /* 34043C E002C5BC 8E650030 */ lw $a1, 0x30($s3) /* 340440 E002C5C0 4406A000 */ mfc1 $a2, $f20 /* 340444 E002C5C4 4407B000 */ mfc1 $a3, $f22 /* 340448 E002C5C8 0C080104 */ jal shim_guRotateF /* 34044C E002C5CC 0220202D */ daddu $a0, $s1, $zero /* 340450 E002C5D0 0220202D */ daddu $a0, $s1, $zero /* 340454 E002C5D4 0200282D */ daddu $a1, $s0, $zero /* 340458 E002C5D8 0C080114 */ jal shim_guMtxCatF /* 34045C E002C5DC 0200302D */ daddu $a2, $s0, $zero /* 340460 E002C5E0 0200202D */ daddu $a0, $s0, $zero /* 340464 E002C5E4 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 340468 E002C5E8 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 34046C E002C5EC 3C11800A */ lui $s1, %hi(gDisplayContext) /* 340470 E002C5F0 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 340474 E002C5F4 96050000 */ lhu $a1, 0x0($s0) /* 340478 E002C5F8 8E220000 */ lw $v0, 0x0($s1) /* 34047C E002C5FC 00052980 */ sll $a1, $a1, 6 /* 340480 E002C600 00B22821 */ addu $a1, $a1, $s2 /* 340484 E002C604 0C080118 */ jal shim_guMtxF2L /* 340488 E002C608 00452821 */ addu $a1, $v0, $a1 /* 34048C E002C60C 3C06666D */ lui $a2, (0x666D7B00 >> 16) /* 340490 E002C610 34C67B00 */ ori $a2, $a2, (0x666D7B00 & 0xFFFF) /* 340494 E002C614 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 340498 E002C618 8E840000 */ lw $a0, 0x0($s4) /* 34049C E002C61C 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3404A0 E002C620 0080282D */ daddu $a1, $a0, $zero /* 3404A4 E002C624 24840008 */ addiu $a0, $a0, 0x8 /* 3404A8 E002C628 AE840000 */ sw $a0, 0x0($s4) /* 3404AC E002C62C 96020000 */ lhu $v0, 0x0($s0) /* 3404B0 E002C630 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3404B4 E002C634 ACA30000 */ sw $v1, 0x0($a1) /* 3404B8 E002C638 24430001 */ addiu $v1, $v0, 0x1 /* 3404BC E002C63C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3404C0 E002C640 00021180 */ sll $v0, $v0, 6 /* 3404C4 E002C644 A6030000 */ sh $v1, 0x0($s0) /* 3404C8 E002C648 8E230000 */ lw $v1, 0x0($s1) /* 3404CC E002C64C 00521021 */ addu $v0, $v0, $s2 /* 3404D0 E002C650 00621821 */ addu $v1, $v1, $v0 /* 3404D4 E002C654 24820008 */ addiu $v0, $a0, 0x8 /* 3404D8 E002C658 ACA30004 */ sw $v1, 0x4($a1) /* 3404DC E002C65C AE820000 */ sw $v0, 0x0($s4) /* 3404E0 E002C660 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3404E4 E002C664 AC820000 */ sw $v0, 0x0($a0) /* 3404E8 E002C668 9263002B */ lbu $v1, 0x2B($s3) /* 3404EC E002C66C 24820010 */ addiu $v0, $a0, 0x10 /* 3404F0 E002C670 AE820000 */ sw $v0, 0x0($s4) /* 3404F4 E002C674 AC950008 */ sw $s5, 0x8($a0) /* 3404F8 E002C678 00661825 */ or $v1, $v1, $a2 /* 3404FC E002C67C AC830004 */ sw $v1, 0x4($a0) /* 340500 E002C680 3C03E003 */ lui $v1, (0xE0030000 >> 16) /* 340504 E002C684 8C63C940 */ lw $v1, -0x36C0($v1) /* 340508 E002C688 24820018 */ addiu $v0, $a0, 0x18 /* 34050C E002C68C AE820000 */ sw $v0, 0x0($s4) /* 340510 E002C690 24020040 */ addiu $v0, $zero, 0x40 /* 340514 E002C694 AC870010 */ sw $a3, 0x10($a0) /* 340518 E002C698 AC820014 */ sw $v0, 0x14($a0) /* 34051C E002C69C 0800B241 */ j .LE002C904 /* 340520 E002C6A0 AC83000C */ sw $v1, 0xC($a0) .LE002C6A4: /* 340524 E002C6A4 8E650000 */ lw $a1, 0x0($s3) /* 340528 E002C6A8 8E660004 */ lw $a2, 0x4($s3) /* 34052C E002C6AC 8E670008 */ lw $a3, 0x8($s3) /* 340530 E002C6B0 8E760028 */ lw $s6, 0x28($s3) /* 340534 E002C6B4 0C080108 */ jal shim_guTranslateF /* 340538 E002C6B8 27A40020 */ addiu $a0, $sp, 0x20 /* 34053C E002C6BC 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 340540 E002C6C0 44810000 */ mtc1 $at, $f0 /* 340544 E002C6C4 27B10060 */ addiu $s1, $sp, 0x60 /* 340548 E002C6C8 44050000 */ mfc1 $a1, $f0 /* 34054C E002C6CC 0220202D */ daddu $a0, $s1, $zero /* 340550 E002C6D0 00A0302D */ daddu $a2, $a1, $zero /* 340554 E002C6D4 0C080110 */ jal shim_guScaleF /* 340558 E002C6D8 00A0382D */ daddu $a3, $a1, $zero /* 34055C E002C6DC 0220202D */ daddu $a0, $s1, $zero /* 340560 E002C6E0 27A50020 */ addiu $a1, $sp, 0x20 /* 340564 E002C6E4 27B000A0 */ addiu $s0, $sp, 0xA0 /* 340568 E002C6E8 0C080114 */ jal shim_guMtxCatF /* 34056C E002C6EC 0200302D */ daddu $a2, $s0, $zero /* 340570 E002C6F0 4480B000 */ mtc1 $zero, $f22 /* 340574 E002C6F4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 340578 E002C6F8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 34057C E002C6FC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 340580 E002C700 4481A000 */ mtc1 $at, $f20 /* 340584 E002C704 00031080 */ sll $v0, $v1, 2 /* 340588 E002C708 00431021 */ addu $v0, $v0, $v1 /* 34058C E002C70C 00021080 */ sll $v0, $v0, 2 /* 340590 E002C710 00431023 */ subu $v0, $v0, $v1 /* 340594 E002C714 000218C0 */ sll $v1, $v0, 3 /* 340598 E002C718 00431021 */ addu $v0, $v0, $v1 /* 34059C E002C71C 000210C0 */ sll $v0, $v0, 3 /* 3405A0 E002C720 4406B000 */ mfc1 $a2, $f22 /* 3405A4 E002C724 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3405A8 E002C728 00220821 */ addu $at, $at, $v0 /* 3405AC E002C72C C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 3405B0 E002C730 4407A000 */ mfc1 $a3, $f20 /* 3405B4 E002C734 46000007 */ neg.s $f0, $f0 /* 3405B8 E002C738 44050000 */ mfc1 $a1, $f0 /* 3405BC E002C73C 0220202D */ daddu $a0, $s1, $zero /* 3405C0 E002C740 0C080104 */ jal shim_guRotateF /* 3405C4 E002C744 E7B60010 */ swc1 $f22, 0x10($sp) /* 3405C8 E002C748 0220202D */ daddu $a0, $s1, $zero /* 3405CC E002C74C 0200282D */ daddu $a1, $s0, $zero /* 3405D0 E002C750 0C080114 */ jal shim_guMtxCatF /* 3405D4 E002C754 00A0302D */ daddu $a2, $a1, $zero /* 3405D8 E002C758 E7B60010 */ swc1 $f22, 0x10($sp) /* 3405DC E002C75C 8E65002C */ lw $a1, 0x2C($s3) /* 3405E0 E002C760 4406A000 */ mfc1 $a2, $f20 /* 3405E4 E002C764 4407B000 */ mfc1 $a3, $f22 /* 3405E8 E002C768 0C080104 */ jal shim_guRotateF /* 3405EC E002C76C 27A400E0 */ addiu $a0, $sp, 0xE0 /* 3405F0 E002C770 8FA80160 */ lw $t0, 0x160($sp) /* 3405F4 E002C774 24150001 */ addiu $s5, $zero, 0x1 /* 3405F8 E002C778 8D020008 */ lw $v0, 0x8($t0) /* 3405FC E002C77C 02A2102A */ slt $v0, $s5, $v0 /* 340600 E002C780 10400060 */ beqz $v0, .LE002C904 /* 340604 E002C784 26730040 */ addiu $s3, $s3, 0x40 /* 340608 E002C788 0220902D */ daddu $s2, $s1, $zero /* 34060C E002C78C 4600B506 */ mov.s $f20, $f22 /* 340610 E002C790 3C1E8007 */ lui $fp, %hi(gMatrixListPos) /* 340614 E002C794 27DE41F0 */ addiu $fp, $fp, %lo(gMatrixListPos) /* 340618 E002C798 3C170001 */ lui $s7, (0x11630 >> 16) /* 34061C E002C79C 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* 340620 E002C7A0 3C039696 */ lui $v1, (0x9696C800 >> 16) /* 340624 E002C7A4 3463C800 */ ori $v1, $v1, (0x9696C800 & 0xFFFF) /* 340628 E002C7A8 32C200FF */ andi $v0, $s6, 0xFF /* 34062C E002C7AC 00431025 */ or $v0, $v0, $v1 /* 340630 E002C7B0 AFA20120 */ sw $v0, 0x120($sp) /* 340634 E002C7B4 26710034 */ addiu $s1, $s3, 0x34 /* 340638 E002C7B8 3C16E003 */ lui $s6, %hi(D_E002C944) /* 34063C E002C7BC 26D6C944 */ addiu $s6, $s6, %lo(D_E002C944) .LE002C7C0: /* 340640 E002C7C0 8E650000 */ lw $a1, 0x0($s3) /* 340644 E002C7C4 8E26FFD0 */ lw $a2, -0x30($s1) /* 340648 E002C7C8 8E27FFD4 */ lw $a3, -0x2C($s1) /* 34064C E002C7CC 8ED00000 */ lw $s0, 0x0($s6) /* 340650 E002C7D0 0C080108 */ jal shim_guTranslateF /* 340654 E002C7D4 0240202D */ daddu $a0, $s2, $zero /* 340658 E002C7D8 0240202D */ daddu $a0, $s2, $zero /* 34065C E002C7DC 27A500A0 */ addiu $a1, $sp, 0xA0 /* 340660 E002C7E0 0C080114 */ jal shim_guMtxCatF /* 340664 E002C7E4 27A60020 */ addiu $a2, $sp, 0x20 /* 340668 E002C7E8 27A400E0 */ addiu $a0, $sp, 0xE0 /* 34066C E002C7EC 27A50020 */ addiu $a1, $sp, 0x20 /* 340670 E002C7F0 0C080114 */ jal shim_guMtxCatF /* 340674 E002C7F4 00A0302D */ daddu $a2, $a1, $zero /* 340678 E002C7F8 4406A000 */ mfc1 $a2, $f20 /* 34067C E002C7FC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 340680 E002C800 44810000 */ mtc1 $at, $f0 /* 340684 E002C804 26D60004 */ addiu $s6, $s6, 0x4 /* 340688 E002C808 E7A00010 */ swc1 $f0, 0x10($sp) /* 34068C E002C80C C620FFE4 */ lwc1 $f0, -0x1C($s1) /* 340690 E002C810 26B50001 */ addiu $s5, $s5, 0x1 /* 340694 E002C814 E7A00014 */ swc1 $f0, 0x14($sp) /* 340698 E002C818 C620FFE8 */ lwc1 $f0, -0x18($s1) /* 34069C E002C81C 26730040 */ addiu $s3, $s3, 0x40 /* 3406A0 E002C820 E7B4001C */ swc1 $f20, 0x1C($sp) /* 3406A4 E002C824 E7A00018 */ swc1 $f0, 0x18($sp) /* 3406A8 E002C828 8E25FFF8 */ lw $a1, -0x8($s1) /* 3406AC E002C82C 8E270000 */ lw $a3, 0x0($s1) /* 3406B0 E002C830 0C080180 */ jal shim_guPositionF /* 3406B4 E002C834 0240202D */ daddu $a0, $s2, $zero /* 3406B8 E002C838 0240202D */ daddu $a0, $s2, $zero /* 3406BC E002C83C 27A50020 */ addiu $a1, $sp, 0x20 /* 3406C0 E002C840 0C080114 */ jal shim_guMtxCatF /* 3406C4 E002C844 00A0302D */ daddu $a2, $a1, $zero /* 3406C8 E002C848 27A40020 */ addiu $a0, $sp, 0x20 /* 3406CC E002C84C 97C50000 */ lhu $a1, 0x0($fp) /* 3406D0 E002C850 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3406D4 E002C854 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3406D8 E002C858 00052980 */ sll $a1, $a1, 6 /* 3406DC E002C85C 00B72821 */ addu $a1, $a1, $s7 /* 3406E0 E002C860 0C080118 */ jal shim_guMtxF2L /* 3406E4 E002C864 00452821 */ addu $a1, $v0, $a1 /* 3406E8 E002C868 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3406EC E002C86C 8E840000 */ lw $a0, 0x0($s4) /* 3406F0 E002C870 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3406F4 E002C874 0080282D */ daddu $a1, $a0, $zero /* 3406F8 E002C878 24840008 */ addiu $a0, $a0, 0x8 /* 3406FC E002C87C AE840000 */ sw $a0, 0x0($s4) /* 340700 E002C880 97C20000 */ lhu $v0, 0x0($fp) /* 340704 E002C884 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 340708 E002C888 ACA30000 */ sw $v1, 0x0($a1) /* 34070C E002C88C 24430001 */ addiu $v1, $v0, 0x1 /* 340710 E002C890 3042FFFF */ andi $v0, $v0, 0xFFFF /* 340714 E002C894 00021180 */ sll $v0, $v0, 6 /* 340718 E002C898 A7C30000 */ sh $v1, 0x0($fp) /* 34071C E002C89C 3C03800A */ lui $v1, %hi(gDisplayContext) /* 340720 E002C8A0 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 340724 E002C8A4 00571021 */ addu $v0, $v0, $s7 /* 340728 E002C8A8 00621821 */ addu $v1, $v1, $v0 /* 34072C E002C8AC 24820008 */ addiu $v0, $a0, 0x8 /* 340730 E002C8B0 ACA30004 */ sw $v1, 0x4($a1) /* 340734 E002C8B4 AE820000 */ sw $v0, 0x0($s4) /* 340738 E002C8B8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 34073C E002C8BC AC820000 */ sw $v0, 0x0($a0) /* 340740 E002C8C0 8FA80120 */ lw $t0, 0x120($sp) /* 340744 E002C8C4 24820010 */ addiu $v0, $a0, 0x10 /* 340748 E002C8C8 AC880004 */ sw $t0, 0x4($a0) /* 34074C E002C8CC AE820000 */ sw $v0, 0x0($s4) /* 340750 E002C8D0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 340754 E002C8D4 AC820008 */ sw $v0, 0x8($a0) /* 340758 E002C8D8 24020040 */ addiu $v0, $zero, 0x40 /* 34075C E002C8DC AC90000C */ sw $s0, 0xC($a0) /* 340760 E002C8E0 AC860010 */ sw $a2, 0x10($a0) /* 340764 E002C8E4 AC820014 */ sw $v0, 0x14($a0) /* 340768 E002C8E8 8FA80160 */ lw $t0, 0x160($sp) /* 34076C E002C8EC 26310040 */ addiu $s1, $s1, 0x40 /* 340770 E002C8F0 8D020008 */ lw $v0, 0x8($t0) /* 340774 E002C8F4 24840018 */ addiu $a0, $a0, 0x18 /* 340778 E002C8F8 02A2102A */ slt $v0, $s5, $v0 /* 34077C E002C8FC 1440FFB0 */ bnez $v0, .LE002C7C0 /* 340780 E002C900 AE840000 */ sw $a0, 0x0($s4) .LE002C904: /* 340784 E002C904 8FBF014C */ lw $ra, 0x14C($sp) /* 340788 E002C908 8FBE0148 */ lw $fp, 0x148($sp) /* 34078C E002C90C 8FB70144 */ lw $s7, 0x144($sp) /* 340790 E002C910 8FB60140 */ lw $s6, 0x140($sp) /* 340794 E002C914 8FB5013C */ lw $s5, 0x13C($sp) /* 340798 E002C918 8FB40138 */ lw $s4, 0x138($sp) /* 34079C E002C91C 8FB30134 */ lw $s3, 0x134($sp) /* 3407A0 E002C920 8FB20130 */ lw $s2, 0x130($sp) /* 3407A4 E002C924 8FB1012C */ lw $s1, 0x12C($sp) /* 3407A8 E002C928 8FB00128 */ lw $s0, 0x128($sp) /* 3407AC E002C92C D7B60158 */ ldc1 $f22, 0x158($sp) /* 3407B0 E002C930 D7B40150 */ ldc1 $f20, 0x150($sp) /* 3407B4 E002C934 03E00008 */ jr $ra /* 3407B8 E002C938 27BD0160 */ addiu $sp, $sp, 0x160 /* 3407BC E002C93C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void shattering_stones_appendGfx(void* effect) { ShatteringStonesFXData* part = ((EffectInstance*)effect)->data.shatteringStones; Matrix4f sp20; Matrix4f sp60; Matrix4f spA0; Matrix4f spE0; s32 i; gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000C00_341480); if (part->unk_24 == 0) { shim_guTranslateF(sp20, part->unk_00, part->unk_04, part->unk_08); shim_guScaleF(sp60, 1.5f, 1.5f, 1.5f); shim_guMtxCatF(sp60, sp20, spA0); shim_guRotateF(sp60, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, spA0, spA0); shim_guRotateF(sp60, part->unk_34, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, spA0, spA0); shim_guRotateF(sp60, part->unk_2C, 1.0f, 0.0f, 0.0f); shim_guMtxCatF(sp60, spA0, spA0); shim_guRotateF(sp60, part->unk_30, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, spA0, spA0); shim_guMtxF2L(spA0, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 102, 109, 123, part->unk_28); gSPDisplayList(gMainGfxPos++, D_E002C940[0]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } else { s32 unk_28 = part->unk_28; shim_guTranslateF(sp20, part->unk_00, part->unk_04, part->unk_08); shim_guScaleF(sp60, 1.5f, 1.5f, 1.5f); shim_guMtxCatF(sp60, sp20, spA0); shim_guRotateF(sp60, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp60, spA0, spA0); shim_guRotateF(spE0, part->unk_2C, 1.0f, 0.0f, 0.0f); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { Gfx* dlist = D_E002C940[i]; shim_guTranslateF(sp60, part->unk_00, part->unk_04, part->unk_08); shim_guMtxCatF(sp60, spA0, sp20); shim_guMtxCatF(spE0, sp20, sp20); shim_guPositionF(sp60, part->unk_2C, 0.0f, part->unk_34, 1.0f, part->unk_18, part->unk_1C, 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); gDPSetPrimColor(gMainGfxPos++, 0, 0, 150, 150, 200, unk_28); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel sparkles_main /* 337240 E0022000 27BDFF80 */ addiu $sp, $sp, -0x80 /* 337244 E0022004 F7B40050 */ sdc1 $f20, 0x50($sp) /* 337248 E0022008 4485A000 */ mtc1 $a1, $f20 /* 33724C E002200C AFB5003C */ sw $s5, 0x3C($sp) /* 337250 E0022010 0080A82D */ daddu $s5, $a0, $zero /* 337254 E0022014 F7B60058 */ sdc1 $f22, 0x58($sp) /* 337258 E0022018 4486B000 */ mtc1 $a2, $f22 /* 33725C E002201C F7B80060 */ sdc1 $f24, 0x60($sp) /* 337260 E0022020 4487C000 */ mtc1 $a3, $f24 /* 337264 E0022024 24020001 */ addiu $v0, $zero, 0x1 /* 337268 E0022028 AFBF0048 */ sw $ra, 0x48($sp) /* 33726C E002202C AFB70044 */ sw $s7, 0x44($sp) /* 337270 E0022030 AFB60040 */ sw $s6, 0x40($sp) /* 337274 E0022034 AFB40038 */ sw $s4, 0x38($sp) /* 337278 E0022038 AFB30034 */ sw $s3, 0x34($sp) /* 33727C E002203C AFB20030 */ sw $s2, 0x30($sp) /* 337280 E0022040 AFB1002C */ sw $s1, 0x2C($sp) /* 337284 E0022044 AFB00028 */ sw $s0, 0x28($sp) /* 337288 E0022048 F7BE0078 */ sdc1 $f30, 0x78($sp) /* 33728C E002204C F7BC0070 */ sdc1 $f28, 0x70($sp) /* 337290 E0022050 F7BA0068 */ sdc1 $f26, 0x68($sp) /* 337294 E0022054 12A20011 */ beq $s5, $v0, .LE002209C /* 337298 E0022058 27A40010 */ addiu $a0, $sp, 0x10 /* 33729C E002205C 2AA20002 */ slti $v0, $s5, 0x2 /* 3372A0 E0022060 10400005 */ beqz $v0, .LE0022078 /* 3372A4 E0022064 24020002 */ addiu $v0, $zero, 0x2 /* 3372A8 E0022068 12A00009 */ beqz $s5, .LE0022090 /* 3372AC E002206C 24120008 */ addiu $s2, $zero, 0x8 /* 3372B0 E0022070 0800882E */ j .LE00220B8 /* 3372B4 E0022074 00000000 */ nop .LE0022078: /* 3372B8 E0022078 12A2000B */ beq $s5, $v0, .LE00220A8 /* 3372BC E002207C 24020003 */ addiu $v0, $zero, 0x3 /* 3372C0 E0022080 12A2000C */ beq $s5, $v0, .LE00220B4 /* 3372C4 E0022084 24120008 */ addiu $s2, $zero, 0x8 /* 3372C8 E0022088 0800882E */ j .LE00220B8 /* 3372CC E002208C 00000000 */ nop .LE0022090: /* 3372D0 E0022090 C7BE0090 */ lwc1 $f30, 0x90($sp) /* 3372D4 E0022094 08008830 */ j .LE00220C0 /* 3372D8 E0022098 24120024 */ addiu $s2, $zero, 0x24 .LE002209C: /* 3372DC E002209C C7BE0090 */ lwc1 $f30, 0x90($sp) /* 3372E0 E00220A0 08008830 */ j .LE00220C0 /* 3372E4 E00220A4 24120004 */ addiu $s2, $zero, 0x4 .LE00220A8: /* 3372E8 E00220A8 C7BE0090 */ lwc1 $f30, 0x90($sp) /* 3372EC E00220AC 08008830 */ j .LE00220C0 /* 3372F0 E00220B0 24120008 */ addiu $s2, $zero, 0x8 .LE00220B4: /* 3372F4 E00220B4 24120004 */ addiu $s2, $zero, 0x4 .LE00220B8: /* 3372F8 E00220B8 3C014100 */ lui $at, (0x41000000 >> 16) /* 3372FC E00220BC 4481F000 */ mtc1 $at, $f30 .LE00220C0: /* 337300 E00220C0 26520001 */ addiu $s2, $s2, 0x1 /* 337304 E00220C4 3C02E002 */ lui $v0, %hi(sparkles_init) /* 337308 E00220C8 24422544 */ addiu $v0, $v0, %lo(sparkles_init) /* 33730C E00220CC AC820008 */ sw $v0, 0x8($a0) /* 337310 E00220D0 3C02E002 */ lui $v0, %hi(sparkles_update) /* 337314 E00220D4 2442254C */ addiu $v0, $v0, %lo(sparkles_update) /* 337318 E00220D8 AC82000C */ sw $v0, 0xC($a0) /* 33731C E00220DC 3C02E002 */ lui $v0, %hi(sparkles_render) /* 337320 E00220E0 24422960 */ addiu $v0, $v0, %lo(sparkles_render) /* 337324 E00220E4 AC820010 */ sw $v0, 0x10($a0) /* 337328 E00220E8 24020011 */ addiu $v0, $zero, 0x11 /* 33732C E00220EC AC800000 */ sw $zero, 0x0($a0) /* 337330 E00220F0 AC800014 */ sw $zero, 0x14($a0) /* 337334 E00220F4 0C080124 */ jal shim_create_effect_instance /* 337338 E00220F8 AC820004 */ sw $v0, 0x4($a0) /* 33733C E00220FC 00122040 */ sll $a0, $s2, 1 /* 337340 E0022100 00922021 */ addu $a0, $a0, $s2 /* 337344 E0022104 00042100 */ sll $a0, $a0, 4 /* 337348 E0022108 0040802D */ daddu $s0, $v0, $zero /* 33734C E002210C 0C08012C */ jal shim_general_heap_malloc /* 337350 E0022110 AE120008 */ sw $s2, 0x8($s0) /* 337354 E0022114 0040202D */ daddu $a0, $v0, $zero /* 337358 E0022118 14800003 */ bnez $a0, .LE0022128 /* 33735C E002211C AE04000C */ sw $a0, 0xC($s0) .LE0022120: /* 337360 E0022120 08008848 */ j .LE0022120 /* 337364 E0022124 00000000 */ nop .LE0022128: /* 337368 E0022128 2402001E */ addiu $v0, $zero, 0x1E /* 33736C E002212C E4940004 */ swc1 $f20, 0x4($a0) /* 337370 E0022130 E4960008 */ swc1 $f22, 0x8($a0) /* 337374 E0022134 E498000C */ swc1 $f24, 0xC($a0) /* 337378 E0022138 AC800020 */ sw $zero, 0x20($a0) /* 33737C E002213C AC950000 */ sw $s5, 0x0($a0) /* 337380 E0022140 AC820024 */ sw $v0, 0x24($a0) /* 337384 E0022144 24110001 */ addiu $s1, $zero, 0x1 /* 337388 E0022148 0232102A */ slt $v0, $s1, $s2 /* 33738C E002214C 104000EC */ beqz $v0, .LE0022500 /* 337390 E0022150 24840030 */ addiu $a0, $a0, 0x30 /* 337394 E0022154 3C03E002 */ lui $v1, %hi(jtbl_E0022D30) /* 337398 E0022158 24632D30 */ addiu $v1, $v1, %lo(jtbl_E0022D30) /* 33739C E002215C 3C01447A */ lui $at, (0x447A0000 >> 16) /* 3373A0 E0022160 4481E000 */ mtc1 $at, $f28 /* 3373A4 E0022164 C7A60090 */ lwc1 $f6, 0x90($sp) /* 3373A8 E0022168 00151080 */ sll $v0, $s5, 2 /* 3373AC E002216C 461C3002 */ mul.s $f0, $f6, $f28 /* 3373B0 E0022170 00000000 */ nop /* 3373B4 E0022174 0043B821 */ addu $s7, $v0, $v1 /* 3373B8 E0022178 2654FFFF */ addiu $s4, $s2, -0x1 /* 3373BC E002217C 24900020 */ addiu $s0, $a0, 0x20 /* 3373C0 E0022180 24130002 */ addiu $s3, $zero, 0x2 /* 3373C4 E0022184 4600018D */ trunc.w.s $f6, $f0 /* 3373C8 E0022188 44163000 */ mfc1 $s6, $f6 .LE002218C: /* 3373CC E002218C 0C080138 */ jal shim_rand_int /* 3373D0 E0022190 02C0202D */ daddu $a0, $s6, $zero /* 3373D4 E0022194 461CF002 */ mul.s $f0, $f30, $f28 /* 3373D8 E0022198 00000000 */ nop /* 3373DC E002219C 4600018D */ trunc.w.s $f6, $f0 /* 3373E0 E00221A0 44043000 */ mfc1 $a0, $f6 /* 3373E4 E00221A4 44820000 */ mtc1 $v0, $f0 /* 3373E8 E00221A8 00000000 */ nop /* 3373EC E00221AC 46800020 */ cvt.s.w $f0, $f0 /* 3373F0 E00221B0 0C080138 */ jal shim_rand_int /* 3373F4 E00221B4 461C0503 */ div.s $f20, $f0, $f28 /* 3373F8 E00221B8 44820000 */ mtc1 $v0, $f0 /* 3373FC E00221BC 00000000 */ nop /* 337400 E00221C0 46800020 */ cvt.s.w $f0, $f0 /* 337404 E00221C4 2EA20005 */ sltiu $v0, $s5, 0x5 /* 337408 E00221C8 10400088 */ beqz $v0, .LE00223EC /* 33740C E00221CC 461C0583 */ div.s $f22, $f0, $f28 /* 337410 E00221D0 8EE20000 */ lw $v0, 0x0($s7) /* 337414 E00221D4 00400008 */ jr $v0 /* 337418 E00221D8 00000000 */ nop glabel .LE00221DC /* 33741C E00221DC 44942000 */ mtc1 $s4, $f4 /* 337420 E00221E0 00000000 */ nop /* 337424 E00221E4 46802120 */ cvt.s.w $f4, $f4 /* 337428 E00221E8 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 33742C E00221EC 44813000 */ mtc1 $at, $f6 /* 337430 E00221F0 44911000 */ mtc1 $s1, $f2 /* 337434 E00221F4 00000000 */ nop /* 337438 E00221F8 468010A0 */ cvt.s.w $f2, $f2 /* 33743C E00221FC 46043003 */ div.s $f0, $f6, $f4 /* 337440 E0022200 46020682 */ mul.s $f26, $f0, $f2 /* 337444 E0022204 00000000 */ nop /* 337448 E0022208 3C0144E1 */ lui $at, (0x44E10000 >> 16) /* 33744C E002220C 4481B000 */ mtc1 $at, $f22 /* 337450 E0022210 00000000 */ nop /* 337454 E0022214 4604B583 */ div.s $f22, $f22, $f4 /* 337458 E0022218 4602B582 */ mul.s $f22, $f22, $f2 /* 33745C E002221C 00000000 */ nop /* 337460 E0022220 AE00FFF8 */ sw $zero, -0x8($s0) /* 337464 E0022224 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 337468 E0022228 44810000 */ mtc1 $at, $f0 /* 33746C E002222C 4600D306 */ mov.s $f12, $f26 /* 337470 E0022230 0C080140 */ jal shim_sin_deg /* 337474 E0022234 4600B581 */ sub.s $f22, $f22, $f0 /* 337478 E0022238 46000506 */ mov.s $f20, $f0 /* 33747C E002223C 0C080140 */ jal shim_sin_deg /* 337480 E0022240 4600B306 */ mov.s $f12, $f22 /* 337484 E0022244 3C014170 */ lui $at, (0x41700000 >> 16) /* 337488 E0022248 44813000 */ mtc1 $at, $f6 /* 33748C E002224C 00000000 */ nop /* 337490 E0022250 46060002 */ mul.s $f0, $f0, $f6 /* 337494 E0022254 00000000 */ nop /* 337498 E0022258 32230001 */ andi $v1, $s1, 0x1 /* 33749C E002225C 3C0142AA */ lui $at, (0x42AA0000 >> 16) /* 3374A0 E0022260 44813000 */ mtc1 $at, $f6 /* 3374A4 E0022264 00031080 */ sll $v0, $v1, 2 /* 3374A8 E0022268 46003001 */ sub.s $f0, $f6, $f0 /* 3374AC E002226C 00431021 */ addu $v0, $v0, $v1 /* 3374B0 E0022270 4482C000 */ mtc1 $v0, $f24 /* 3374B4 E0022274 00000000 */ nop /* 3374B8 E0022278 4680C620 */ cvt.s.w $f24, $f24 /* 3374BC E002227C 46180001 */ sub.s $f0, $f0, $f24 /* 3374C0 E0022280 4600A502 */ mul.s $f20, $f20, $f0 /* 3374C4 E0022284 00000000 */ nop /* 3374C8 E0022288 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 3374CC E002228C 44813000 */ mtc1 $at, $f6 /* 3374D0 E0022290 00000000 */ nop /* 3374D4 E0022294 4606A503 */ div.s $f20, $f20, $f6 /* 3374D8 E0022298 C7A60090 */ lwc1 $f6, 0x90($sp) /* 3374DC E002229C 4606A502 */ mul.s $f20, $f20, $f6 /* 3374E0 E00222A0 00000000 */ nop /* 3374E4 E00222A4 4600D306 */ mov.s $f12, $f26 /* 3374E8 E00222A8 0C080144 */ jal shim_cos_deg /* 3374EC E00222AC E614FFF0 */ swc1 $f20, -0x10($s0) /* 3374F0 E00222B0 4600B306 */ mov.s $f12, $f22 /* 3374F4 E00222B4 0C080140 */ jal shim_sin_deg /* 3374F8 E00222B8 46000506 */ mov.s $f20, $f0 /* 3374FC E00222BC 3C014170 */ lui $at, (0x41700000 >> 16) /* 337500 E00222C0 44813000 */ mtc1 $at, $f6 /* 337504 E00222C4 00000000 */ nop /* 337508 E00222C8 46060002 */ mul.s $f0, $f0, $f6 /* 33750C E00222CC 00000000 */ nop /* 337510 E00222D0 3C0142AA */ lui $at, (0x42AA0000 >> 16) /* 337514 E00222D4 44813000 */ mtc1 $at, $f6 /* 337518 E00222D8 00000000 */ nop /* 33751C E00222DC 46003001 */ sub.s $f0, $f6, $f0 /* 337520 E00222E0 46180001 */ sub.s $f0, $f0, $f24 /* 337524 E00222E4 4600A502 */ mul.s $f20, $f20, $f0 /* 337528 E00222E8 00000000 */ nop /* 33752C E00222EC 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 337530 E00222F0 44813000 */ mtc1 $at, $f6 /* 337534 E00222F4 00000000 */ nop /* 337538 E00222F8 4606A503 */ div.s $f20, $f20, $f6 /* 33753C E00222FC C7A60090 */ lwc1 $f6, 0x90($sp) /* 337540 E0022300 4606A502 */ mul.s $f20, $f20, $f6 /* 337544 E0022304 00000000 */ nop /* 337548 E0022308 AE00FFEC */ sw $zero, -0x14($s0) /* 33754C E002230C AE000008 */ sw $zero, 0x8($s0) /* 337550 E0022310 0800893B */ j .LE00224EC /* 337554 E0022314 E614FFF4 */ swc1 $f20, -0xC($s0) glabel .LE0022318 /* 337558 E0022318 0C080138 */ jal shim_rand_int /* 33755C E002231C 24040167 */ addiu $a0, $zero, 0x167 /* 337560 E0022320 44941000 */ mtc1 $s4, $f2 /* 337564 E0022324 00000000 */ nop /* 337568 E0022328 468010A0 */ cvt.s.w $f2, $f2 /* 33756C E002232C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 337570 E0022330 44813000 */ mtc1 $at, $f6 /* 337574 E0022334 44910000 */ mtc1 $s1, $f0 /* 337578 E0022338 00000000 */ nop /* 33757C E002233C 46800020 */ cvt.s.w $f0, $f0 /* 337580 E0022340 46023083 */ div.s $f2, $f6, $f2 /* 337584 E0022344 46001082 */ mul.s $f2, $f2, $f0 /* 337588 E0022348 00000000 */ nop /* 33758C E002234C 44820000 */ mtc1 $v0, $f0 /* 337590 E0022350 00000000 */ nop /* 337594 E0022354 46800020 */ cvt.s.w $f0, $f0 /* 337598 E0022358 32220001 */ andi $v0, $s1, 0x1 /* 33759C E002235C 10400014 */ beqz $v0, .LE00223B0 /* 3375A0 E0022360 46001680 */ add.s $f26, $f2, $f0 /* 3375A4 E0022364 0C080138 */ jal shim_rand_int /* 3375A8 E0022368 24040032 */ addiu $a0, $zero, 0x32 /* 3375AC E002236C 3C031062 */ lui $v1, (0x10624DD3 >> 16) /* 3375B0 E0022370 34634DD3 */ ori $v1, $v1, (0x10624DD3 & 0xFFFF) /* 3375B4 E0022374 00430018 */ mult $v0, $v1 /* 3375B8 E0022378 000217C3 */ sra $v0, $v0, 31 /* 3375BC E002237C 3C01E002 */ lui $at, (0xE0022D48 >> 16) /* 3375C0 E0022380 D4222D48 */ ldc1 $f2, (0xE0022D48 & 0xFFFF)($at) /* 3375C4 E0022384 00004010 */ mfhi $t0 /* 3375C8 E0022388 00081983 */ sra $v1, $t0, 6 /* 3375CC E002238C 00621823 */ subu $v1, $v1, $v0 /* 3375D0 E0022390 44830000 */ mtc1 $v1, $f0 /* 3375D4 E0022394 00000000 */ nop /* 3375D8 E0022398 46800021 */ cvt.d.w $f0, $f0 /* 3375DC E002239C 46220000 */ add.d $f0, $f0, $f2 /* 3375E0 E00223A0 46200007 */ neg.d $f0, $f0 /* 3375E4 E00223A4 46200020 */ cvt.s.d $f0, $f0 /* 3375E8 E00223A8 080088ED */ j .LE00223B4 /* 3375EC E00223AC E600FFF8 */ swc1 $f0, -0x8($s0) .LE00223B0: /* 3375F0 E00223B0 AE00FFF8 */ sw $zero, -0x8($s0) .LE00223B4: /* 3375F4 E00223B4 4600D306 */ mov.s $f12, $f26 /* 3375F8 E00223B8 AE00FFF0 */ sw $zero, -0x10($s0) /* 3375FC E00223BC 0C080140 */ jal shim_sin_deg /* 337600 E00223C0 AE00FFF4 */ sw $zero, -0xC($s0) /* 337604 E00223C4 4600A002 */ mul.s $f0, $f20, $f0 /* 337608 E00223C8 00000000 */ nop /* 33760C E00223CC 4600D306 */ mov.s $f12, $f26 /* 337610 E00223D0 0C080144 */ jal shim_cos_deg /* 337614 E00223D4 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 337618 E00223D8 3C035555 */ lui $v1, (0x55555556 >> 16) /* 33761C E00223DC 34635556 */ ori $v1, $v1, (0x55555556 & 0xFFFF) /* 337620 E00223E0 02230018 */ mult $s1, $v1 /* 337624 E00223E4 0800892B */ j .LE00224AC /* 337628 E00223E8 2662001E */ addiu $v0, $s3, 0x1E glabel .LE00223EC /* 33762C E00223EC 0C080138 */ jal shim_rand_int /* 337630 E00223F0 24040167 */ addiu $a0, $zero, 0x167 /* 337634 E00223F4 44941000 */ mtc1 $s4, $f2 /* 337638 E00223F8 00000000 */ nop /* 33763C E00223FC 468010A0 */ cvt.s.w $f2, $f2 /* 337640 E0022400 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 337644 E0022404 44813000 */ mtc1 $at, $f6 /* 337648 E0022408 44910000 */ mtc1 $s1, $f0 /* 33764C E002240C 00000000 */ nop /* 337650 E0022410 46800020 */ cvt.s.w $f0, $f0 /* 337654 E0022414 46023083 */ div.s $f2, $f6, $f2 /* 337658 E0022418 46001082 */ mul.s $f2, $f2, $f0 /* 33765C E002241C 00000000 */ nop /* 337660 E0022420 24040032 */ addiu $a0, $zero, 0x32 /* 337664 E0022424 44820000 */ mtc1 $v0, $f0 /* 337668 E0022428 00000000 */ nop /* 33766C E002242C 46800020 */ cvt.s.w $f0, $f0 /* 337670 E0022430 0C080138 */ jal shim_rand_int /* 337674 E0022434 46001680 */ add.s $f26, $f2, $f0 /* 337678 E0022438 3C031062 */ lui $v1, (0x10624DD3 >> 16) /* 33767C E002243C 34634DD3 */ ori $v1, $v1, (0x10624DD3 & 0xFFFF) /* 337680 E0022440 00430018 */ mult $v0, $v1 /* 337684 E0022444 3C01E002 */ lui $at, (0xE0022D50 >> 16) /* 337688 E0022448 D4222D50 */ ldc1 $f2, (0xE0022D50 & 0xFFFF)($at) /* 33768C E002244C 000217C3 */ sra $v0, $v0, 31 /* 337690 E0022450 AE00FFF0 */ sw $zero, -0x10($s0) /* 337694 E0022454 00004010 */ mfhi $t0 /* 337698 E0022458 00081983 */ sra $v1, $t0, 6 /* 33769C E002245C 00621823 */ subu $v1, $v1, $v0 /* 3376A0 E0022460 44830000 */ mtc1 $v1, $f0 /* 3376A4 E0022464 00000000 */ nop /* 3376A8 E0022468 46800021 */ cvt.d.w $f0, $f0 /* 3376AC E002246C 46220000 */ add.d $f0, $f0, $f2 /* 3376B0 E0022470 AE00FFF4 */ sw $zero, -0xC($s0) /* 3376B4 E0022474 4600D306 */ mov.s $f12, $f26 /* 3376B8 E0022478 46200007 */ neg.d $f0, $f0 /* 3376BC E002247C 46200020 */ cvt.s.d $f0, $f0 /* 3376C0 E0022480 0C080140 */ jal shim_sin_deg /* 3376C4 E0022484 E600FFF8 */ swc1 $f0, -0x8($s0) /* 3376C8 E0022488 4600A002 */ mul.s $f0, $f20, $f0 /* 3376CC E002248C 00000000 */ nop /* 3376D0 E0022490 4600D306 */ mov.s $f12, $f26 /* 3376D4 E0022494 0C080144 */ jal shim_cos_deg /* 3376D8 E0022498 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 3376DC E002249C 3C035555 */ lui $v1, (0x55555556 >> 16) /* 3376E0 E00224A0 34635556 */ ori $v1, $v1, (0x55555556 & 0xFFFF) /* 3376E4 E00224A4 02230018 */ mult $s1, $v1 /* 3376E8 E00224A8 26620012 */ addiu $v0, $s3, 0x12 .LE00224AC: /* 3376EC E00224AC 00111FC3 */ sra $v1, $s1, 31 /* 3376F0 E00224B0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3376F4 E00224B4 44811000 */ mtc1 $at, $f2 /* 3376F8 E00224B8 4600B002 */ mul.s $f0, $f22, $f0 /* 3376FC E00224BC 00000000 */ nop /* 337700 E00224C0 AE00FFEC */ sw $zero, -0x14($s0) /* 337704 E00224C4 AE020004 */ sw $v0, 0x4($s0) /* 337708 E00224C8 AE000000 */ sw $zero, 0x0($s0) /* 33770C E00224CC E602FFFC */ swc1 $f2, -0x4($s0) /* 337710 E00224D0 00004010 */ mfhi $t0 /* 337714 E00224D4 01031823 */ subu $v1, $t0, $v1 /* 337718 E00224D8 00031040 */ sll $v0, $v1, 1 /* 33771C E00224DC 00431021 */ addu $v0, $v0, $v1 /* 337720 E00224E0 02221023 */ subu $v0, $s1, $v0 /* 337724 E00224E4 E600FFE8 */ swc1 $f0, -0x18($s0) /* 337728 E00224E8 AE020008 */ sw $v0, 0x8($s0) .LE00224EC: /* 33772C E00224EC 26730002 */ addiu $s3, $s3, 0x2 /* 337730 E00224F0 26310001 */ addiu $s1, $s1, 0x1 /* 337734 E00224F4 0232102A */ slt $v0, $s1, $s2 /* 337738 E00224F8 1440FF24 */ bnez $v0, .LE002218C /* 33773C E00224FC 26100030 */ addiu $s0, $s0, 0x30 .LE0022500: /* 337740 E0022500 8FBF0048 */ lw $ra, 0x48($sp) /* 337744 E0022504 8FB70044 */ lw $s7, 0x44($sp) /* 337748 E0022508 8FB60040 */ lw $s6, 0x40($sp) /* 33774C E002250C 8FB5003C */ lw $s5, 0x3C($sp) /* 337750 E0022510 8FB40038 */ lw $s4, 0x38($sp) /* 337754 E0022514 8FB30034 */ lw $s3, 0x34($sp) /* 337758 E0022518 8FB20030 */ lw $s2, 0x30($sp) /* 33775C E002251C 8FB1002C */ lw $s1, 0x2C($sp) /* 337760 E0022520 8FB00028 */ lw $s0, 0x28($sp) /* 337764 E0022524 D7BE0078 */ ldc1 $f30, 0x78($sp) /* 337768 E0022528 D7BC0070 */ ldc1 $f28, 0x70($sp) /* 33776C E002252C D7BA0068 */ ldc1 $f26, 0x68($sp) /* 337770 E0022530 D7B80060 */ ldc1 $f24, 0x60($sp) /* 337774 E0022534 D7B60058 */ ldc1 $f22, 0x58($sp) /* 337778 E0022538 D7B40050 */ ldc1 $f20, 0x50($sp) /* 33777C E002253C 03E00008 */ jr $ra /* 337780 E0022540 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: void sparkles_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; SparklesFXData* part; s32 numParts; f32 var_f30; f32 angle; f32 angle2; s32 i; switch (arg0) { case 0: numParts = 36; var_f30 = arg4; break; case 1: numParts = 4; var_f30 = arg4; break; case 2: numParts = 8; var_f30 = arg4; break; case 3: numParts = 4; var_f30 = 8.0f; break; default: numParts = 8; var_f30 = 8.0f; break; } numParts++; bpPtr->init = sparkles_init; bpPtr->update = sparkles_update; bpPtr->renderWorld = sparkles_render; bpPtr->unk_00 = 0; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_SPARKLES; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.sparkles = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.sparkles != NULL); part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; part->unk_20 = 0; part->unk_00 = arg0; part->unk_24 = 30; part++; for (i = 1; i < numParts; i++, part++) { f32 rand1 = shim_rand_int(arg4 * 1000.0f) / 1000.0f; f32 rand2 = shim_rand_int(var_f30 * 1000.0f) / 1000.0f; switch (arg0) { case 0: angle = (360.0f / (numParts - 1)) * i; angle2 = (1800.0f / (numParts - 1)) * i - 90.0f; part->unk_18 = 0.0f; part->unk_10 = (shim_sin_deg(angle) * (85.0f - shim_sin_deg(angle2) * 15.0f - (i & 1) * 5) / 100.0f) * arg4; part->unk_14 = (shim_cos_deg(angle) * (85.0f - shim_sin_deg(angle2) * 15.0f - (i & 1) * 5) / 100.0f) * arg4; part->unk_0C = 0; part->unk_28 = 0; break; case 1: case 2: angle = (360.0f / (numParts - 1)) * i + shim_rand_int(359); if (i & 1) { part->unk_18 = -(shim_rand_int(50) / 1000 + 0.05); } else { part->unk_18 = 0; } part->unk_10 = 0; part->unk_14 = 0; part->unk_04 = rand1 * shim_sin_deg(angle); part->unk_08 = rand2 * shim_cos_deg(angle); part->unk_0C = 0; part->unk_1C = 1.0f; part->unk_24 = i * 2 + 30; part->unk_28 = i % 3; part->unk_20 = 0; break; case 3: case 4: default: angle = (360.0f / (numParts - 1)) * i + shim_rand_int(359); part->unk_18 = -(shim_rand_int(50) / 1000 + 0.05); part->unk_10 = 0.0f; part->unk_14 = 0.0f; part->unk_04 = rand1 * shim_sin_deg(angle); part->unk_08 = rand2 * shim_cos_deg(angle); part->unk_0C = 0; part->unk_1C = 1.0f; part->unk_24 = i * 2 + 18; part->unk_28 = i % 3; part->unk_20 = 0; break; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel check_conversation_trigger /* 1E5DC 800431DC 27BDFF58 */ addiu $sp, $sp, -0xA8 /* 1E5E0 800431E0 3C03FDFF */ lui $v1, (0xFDFFFFFF >> 16) /* 1E5E4 800431E4 AFB40060 */ sw $s4, 0x60($sp) /* 1E5E8 800431E8 3C148011 */ lui $s4, %hi(gPlayerStatus) /* 1E5EC 800431EC 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) /* 1E5F0 800431F0 AFBF0074 */ sw $ra, 0x74($sp) /* 1E5F4 800431F4 AFBE0070 */ sw $fp, 0x70($sp) /* 1E5F8 800431F8 AFB7006C */ sw $s7, 0x6C($sp) /* 1E5FC 800431FC AFB60068 */ sw $s6, 0x68($sp) /* 1E600 80043200 AFB50064 */ sw $s5, 0x64($sp) /* 1E604 80043204 AFB3005C */ sw $s3, 0x5C($sp) /* 1E608 80043208 AFB20058 */ sw $s2, 0x58($sp) /* 1E60C 8004320C AFB10054 */ sw $s1, 0x54($sp) /* 1E610 80043210 AFB00050 */ sw $s0, 0x50($sp) /* 1E614 80043214 F7BE00A0 */ sdc1 $f30, 0xA0($sp) /* 1E618 80043218 F7BC0098 */ sdc1 $f28, 0x98($sp) /* 1E61C 8004321C F7BA0090 */ sdc1 $f26, 0x90($sp) /* 1E620 80043220 F7B80088 */ sdc1 $f24, 0x88($sp) /* 1E624 80043224 F7B60080 */ sdc1 $f22, 0x80($sp) /* 1E628 80043228 F7B40078 */ sdc1 $f20, 0x78($sp) /* 1E62C 8004322C 8E820000 */ lw $v0, 0x0($s4) /* 1E630 80043230 3463FFFF */ ori $v1, $v1, (0xFDFFFFFF & 0xFFFF) /* 1E634 80043234 00431024 */ and $v0, $v0, $v1 /* 1E638 80043238 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 1E63C 8004323C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 1E640 80043240 3C04800B */ lui $a0, %hi(gCameras) /* 1E644 80043244 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 1E648 80043248 AE8000C8 */ sw $zero, 0xC8($s4) /* 1E64C 8004324C AE820000 */ sw $v0, 0x0($s4) /* 1E650 80043250 00031080 */ sll $v0, $v1, 2 /* 1E654 80043254 00431021 */ addu $v0, $v0, $v1 /* 1E658 80043258 00021080 */ sll $v0, $v0, 2 /* 1E65C 8004325C 00431023 */ subu $v0, $v0, $v1 /* 1E660 80043260 000218C0 */ sll $v1, $v0, 3 /* 1E664 80043264 00431021 */ addu $v0, $v0, $v1 /* 1E668 80043268 000210C0 */ sll $v0, $v0, 3 /* 1E66C 8004326C 0044B821 */ addu $s7, $v0, $a0 /* 1E670 80043270 868200B0 */ lh $v0, 0xB0($s4) /* 1E674 80043274 968300B2 */ lhu $v1, 0xB2($s4) /* 1E678 80043278 44823000 */ mtc1 $v0, $f6 /* 1E67C 8004327C 00000000 */ nop /* 1E680 80043280 468031A0 */ cvt.s.w $f6, $f6 /* 1E684 80043284 00031C00 */ sll $v1, $v1, 16 /* 1E688 80043288 00031403 */ sra $v0, $v1, 16 /* 1E68C 8004328C 00031FC2 */ srl $v1, $v1, 31 /* 1E690 80043290 00431021 */ addu $v0, $v0, $v1 /* 1E694 80043294 00021043 */ sra $v0, $v0, 1 /* 1E698 80043298 44824000 */ mtc1 $v0, $f8 /* 1E69C 8004329C 00000000 */ nop /* 1E6A0 800432A0 46804220 */ cvt.s.w $f8, $f8 /* 1E6A4 800432A4 E7A6003C */ swc1 $f6, 0x3C($sp) /* 1E6A8 800432A8 E7A80040 */ swc1 $f8, 0x40($sp) /* 1E6AC 800432AC C6860028 */ lwc1 $f6, 0x28($s4) /* 1E6B0 800432B0 3C028011 */ lui $v0, %hi(gPartnerStatus) /* 1E6B4 800432B4 8042EBB0 */ lb $v0, %lo(gPartnerStatus)($v0) /* 1E6B8 800432B8 E7A60030 */ swc1 $f6, 0x30($sp) /* 1E6BC 800432BC C688002C */ lwc1 $f8, 0x2C($s4) /* 1E6C0 800432C0 E7A80034 */ swc1 $f8, 0x34($sp) /* 1E6C4 800432C4 C6860030 */ lwc1 $f6, 0x30($s4) /* 1E6C8 800432C8 144000E6 */ bnez $v0, .L80043664 /* 1E6CC 800432CC E7A60038 */ swc1 $f6, 0x38($sp) /* 1E6D0 800432D0 0000F02D */ daddu $fp, $zero, $zero /* 1E6D4 800432D4 03C0A82D */ daddu $s5, $fp, $zero /* 1E6D8 800432D8 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C) /* 1E6DC 800432DC 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0) /* 1E6E0 800432E0 3C01477F */ lui $at, (0x477FFF00 >> 16) /* 1E6E4 800432E4 3421FF00 */ ori $at, $at, (0x477FFF00 & 0xFFFF) /* 1E6E8 800432E8 44814000 */ mtc1 $at, $f8 /* 1E6EC 800432EC 03C0B02D */ daddu $s6, $fp, $zero /* 1E6F0 800432F0 AFA0002C */ sw $zero, 0x2C($sp) /* 1E6F4 800432F4 184000B8 */ blez $v0, .L800435D8 /* 1E6F8 800432F8 E7A80048 */ swc1 $f8, 0x48($sp) /* 1E6FC 800432FC 00151080 */ sll $v0, $s5, 2 .L80043300: /* 1E700 80043300 3C08800B */ lui $t0, %hi(gCurrentEncounter) /* 1E704 80043304 25080F10 */ addiu $t0, $t0, %lo(gCurrentEncounter) /* 1E708 80043308 01021021 */ addu $v0, $t0, $v0 /* 1E70C 8004330C 8C530028 */ lw $s3, 0x28($v0) /* 1E710 80043310 126000AB */ beqz $s3, .L800435C0 /* 1E714 80043314 00000000 */ nop /* 1E718 80043318 8E620000 */ lw $v0, 0x0($s3) /* 1E71C 8004331C 184000A8 */ blez $v0, .L800435C0 /* 1E720 80043320 0000902D */ daddu $s2, $zero, $zero /* 1E724 80043324 00121080 */ sll $v0, $s2, 2 .L80043328: /* 1E728 80043328 02621021 */ addu $v0, $s3, $v0 /* 1E72C 8004332C 8C510004 */ lw $s1, 0x4($v0) /* 1E730 80043330 1220009E */ beqz $s1, .L800435AC /* 1E734 80043334 3C028000 */ lui $v0, (0x80000020 >> 16) /* 1E738 80043338 8E230000 */ lw $v1, 0x0($s1) /* 1E73C 8004333C 34420020 */ ori $v0, $v0, (0x80000020 & 0xFFFF) /* 1E740 80043340 00621024 */ and $v0, $v1, $v0 /* 1E744 80043344 14400099 */ bnez $v0, .L800435AC /* 1E748 80043348 30620001 */ andi $v0, $v1, 0x1 /* 1E74C 8004334C 10400097 */ beqz $v0, .L800435AC /* 1E750 80043350 3C020800 */ lui $v0, (0x8000000 >> 16) /* 1E754 80043354 00621024 */ and $v0, $v1, $v0 /* 1E758 80043358 14400094 */ bnez $v0, .L800435AC /* 1E75C 8004335C 00000000 */ nop /* 1E760 80043360 8E220020 */ lw $v0, 0x20($s1) /* 1E764 80043364 10400091 */ beqz $v0, .L800435AC /* 1E768 80043368 00000000 */ nop /* 1E76C 8004336C 0C00EABB */ jal get_npc_unsafe /* 1E770 80043370 86240008 */ lh $a0, 0x8($s1) /* 1E774 80043374 0040802D */ daddu $s0, $v0, $zero /* 1E778 80043378 C45A0038 */ lwc1 $f26, 0x38($v0) /* 1E77C 8004337C C7A60030 */ lwc1 $f6, 0x30($sp) /* 1E780 80043380 4606D081 */ sub.s $f2, $f26, $f6 /* 1E784 80043384 46021082 */ mul.s $f2, $f2, $f2 /* 1E788 80043388 00000000 */ nop /* 1E78C 8004338C C61C0040 */ lwc1 $f28, 0x40($s0) /* 1E790 80043390 C7A80038 */ lwc1 $f8, 0x38($sp) /* 1E794 80043394 4608E001 */ sub.s $f0, $f28, $f8 /* 1E798 80043398 46000002 */ mul.s $f0, $f0, $f0 /* 1E79C 8004339C 00000000 */ nop /* 1E7A0 800433A0 860200A8 */ lh $v0, 0xA8($s0) /* 1E7A4 800433A4 860300A6 */ lh $v1, 0xA6($s0) /* 1E7A8 800433A8 44823000 */ mtc1 $v0, $f6 /* 1E7AC 800433AC 00000000 */ nop /* 1E7B0 800433B0 468031A0 */ cvt.s.w $f6, $f6 /* 1E7B4 800433B4 4483F000 */ mtc1 $v1, $f30 /* 1E7B8 800433B8 00000000 */ nop /* 1E7BC 800433BC 4680F7A0 */ cvt.s.w $f30, $f30 /* 1E7C0 800433C0 46001300 */ add.s $f12, $f2, $f0 /* 1E7C4 800433C4 E7A60044 */ swc1 $f6, 0x44($sp) /* 1E7C8 800433C8 C618003C */ lwc1 $f24, 0x3C($s0) /* 1E7CC 800433CC 46006104 */ sqrt.s $f4, $f12 /* 1E7D0 800433D0 46042032 */ c.eq.s $f4, $f4 /* 1E7D4 800433D4 00000000 */ nop /* 1E7D8 800433D8 45010004 */ bc1t .L800433EC /* 1E7DC 800433DC 00000000 */ nop /* 1E7E0 800433E0 0C0187BC */ jal sqrtf /* 1E7E4 800433E4 00000000 */ nop /* 1E7E8 800433E8 46000106 */ mov.s $f4, $f0 .L800433EC: /* 1E7EC 800433EC C7A80040 */ lwc1 $f8, 0x40($sp) /* 1E7F0 800433F0 461E4000 */ add.s $f0, $f8, $f30 /* 1E7F4 800433F4 46002586 */ mov.s $f22, $f4 /* 1E7F8 800433F8 4616003E */ c.le.s $f0, $f22 /* 1E7FC 800433FC 00000000 */ nop /* 1E800 80043400 4501006A */ bc1t .L800435AC /* 1E804 80043404 00000000 */ nop /* 1E808 80043408 C7A60044 */ lwc1 $f6, 0x44($sp) /* 1E80C 8004340C 4606C000 */ add.s $f0, $f24, $f6 /* 1E810 80043410 C7A80034 */ lwc1 $f8, 0x34($sp) /* 1E814 80043414 4608003C */ c.lt.s $f0, $f8 /* 1E818 80043418 00000000 */ nop /* 1E81C 8004341C 45010063 */ bc1t .L800435AC /* 1E820 80043420 00000000 */ nop /* 1E824 80043424 C7A6003C */ lwc1 $f6, 0x3C($sp) /* 1E828 80043428 46064000 */ add.s $f0, $f8, $f6 /* 1E82C 8004342C 4618003C */ c.lt.s $f0, $f24 /* 1E830 80043430 00000000 */ nop /* 1E834 80043434 4501005D */ bc1t .L800435AC /* 1E838 80043438 00000000 */ nop /* 1E83C 8004343C 0C00A6C9 */ jal clamp_angle /* 1E840 80043440 C68C00A8 */ lwc1 $f12, 0xA8($s4) /* 1E844 80043444 3C014334 */ lui $at, (0x43340000 >> 16) /* 1E848 80043448 44811000 */ mtc1 $at, $f2 /* 1E84C 8004344C 00000000 */ nop /* 1E850 80043450 4602003C */ c.lt.s $f0, $f2 /* 1E854 80043454 00000000 */ nop /* 1E858 80043458 4500000F */ bc1f .L80043498 /* 1E85C 8004345C 00000000 */ nop /* 1E860 80043460 C6EC006C */ lwc1 $f12, 0x6C($s7) /* 1E864 80043464 3C0142F0 */ lui $at, (0x42F00000 >> 16) /* 1E868 80043468 44814000 */ mtc1 $at, $f8 /* 1E86C 8004346C 0C00A6C9 */ jal clamp_angle /* 1E870 80043470 46086301 */ sub.s $f12, $f12, $f8 /* 1E874 80043474 8E8200A4 */ lw $v0, 0xA4($s4) /* 1E878 80043478 3C080100 */ lui $t0, (0x1000000 >> 16) /* 1E87C 8004347C 00481024 */ and $v0, $v0, $t0 /* 1E880 80043480 10400016 */ beqz $v0, .L800434DC /* 1E884 80043484 46000506 */ mov.s $f20, $f0 /* 1E888 80043488 3C014270 */ lui $at, (0x42700000 >> 16) /* 1E88C 8004348C 44813000 */ mtc1 $at, $f6 /* 1E890 80043490 08010D34 */ j .L800434D0 /* 1E894 80043494 4606A300 */ add.s $f12, $f20, $f6 .L80043498: /* 1E898 80043498 C6EC006C */ lwc1 $f12, 0x6C($s7) /* 1E89C 8004349C 3C0142F0 */ lui $at, (0x42F00000 >> 16) /* 1E8A0 800434A0 44814000 */ mtc1 $at, $f8 /* 1E8A4 800434A4 0C00A6C9 */ jal clamp_angle /* 1E8A8 800434A8 46086300 */ add.s $f12, $f12, $f8 /* 1E8AC 800434AC 8E8200A4 */ lw $v0, 0xA4($s4) /* 1E8B0 800434B0 3C080100 */ lui $t0, (0x1000000 >> 16) /* 1E8B4 800434B4 00481024 */ and $v0, $v0, $t0 /* 1E8B8 800434B8 10400008 */ beqz $v0, .L800434DC /* 1E8BC 800434BC 46000506 */ mov.s $f20, $f0 /* 1E8C0 800434C0 3C014270 */ lui $at, (0x42700000 >> 16) /* 1E8C4 800434C4 44813000 */ mtc1 $at, $f6 /* 1E8C8 800434C8 00000000 */ nop /* 1E8CC 800434CC 4606A301 */ sub.s $f12, $f20, $f6 .L800434D0: /* 1E8D0 800434D0 0C00A6C9 */ jal clamp_angle /* 1E8D4 800434D4 00000000 */ nop /* 1E8D8 800434D8 46000506 */ mov.s $f20, $f0 .L800434DC: /* 1E8DC 800434DC C7AC0030 */ lwc1 $f12, 0x30($sp) /* 1E8E0 800434E0 4406D000 */ mfc1 $a2, $f26 /* 1E8E4 800434E4 4407E000 */ mfc1 $a3, $f28 /* 1E8E8 800434E8 0C00A720 */ jal atan2 /* 1E8EC 800434EC C7AE0038 */ lwc1 $f14, 0x38($sp) /* 1E8F0 800434F0 4600A306 */ mov.s $f12, $f20 /* 1E8F4 800434F4 0C00A70A */ jal get_clamped_angle_diff /* 1E8F8 800434F8 46000386 */ mov.s $f14, $f0 /* 1E8FC 800434FC 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 1E900 80043500 44811000 */ mtc1 $at, $f2 /* 1E904 80043504 46000005 */ abs.s $f0, $f0 /* 1E908 80043508 4600103C */ c.lt.s $f2, $f0 /* 1E90C 8004350C 00000000 */ nop /* 1E910 80043510 45010026 */ bc1t .L800435AC /* 1E914 80043514 3C030001 */ lui $v1, (0x10000 >> 16) /* 1E918 80043518 8E220000 */ lw $v0, 0x0($s1) /* 1E91C 8004351C 00431024 */ and $v0, $v0, $v1 /* 1E920 80043520 14400019 */ bnez $v0, .L80043588 /* 1E924 80043524 3C032000 */ lui $v1, (0x20000000 >> 16) /* 1E928 80043528 8E020000 */ lw $v0, 0x0($s0) /* 1E92C 8004352C 00431024 */ and $v0, $v0, $v1 /* 1E930 80043530 10400015 */ beqz $v0, .L80043588 /* 1E934 80043534 4600D306 */ mov.s $f12, $f26 /* 1E938 80043538 8FA60030 */ lw $a2, 0x30($sp) /* 1E93C 8004353C 8FA70038 */ lw $a3, 0x38($sp) /* 1E940 80043540 4600E386 */ mov.s $f14, $f28 /* 1E944 80043544 E7AC0020 */ swc1 $f12, 0x20($sp) /* 1E948 80043548 E7B80024 */ swc1 $f24, 0x24($sp) /* 1E94C 8004354C 0C00A720 */ jal atan2 /* 1E950 80043550 E7AE0028 */ swc1 $f14, 0x28($sp) /* 1E954 80043554 0000202D */ daddu $a0, $zero, $zero /* 1E958 80043558 27A60024 */ addiu $a2, $sp, 0x24 /* 1E95C 8004355C 27A70028 */ addiu $a3, $sp, 0x28 /* 1E960 80043560 27A50020 */ addiu $a1, $sp, 0x20 /* 1E964 80043564 C7A80044 */ lwc1 $f8, 0x44($sp) /* 1E968 80043568 461EF080 */ add.s $f2, $f30, $f30 /* 1E96C 8004356C E7B60010 */ swc1 $f22, 0x10($sp) /* 1E970 80043570 E7A00014 */ swc1 $f0, 0x14($sp) /* 1E974 80043574 E7A80018 */ swc1 $f8, 0x18($sp) /* 1E978 80043578 0C0376B9 */ jal npc_test_move_taller_with_slipping /* 1E97C 8004357C E7A2001C */ swc1 $f2, 0x1C($sp) /* 1E980 80043580 1440000A */ bnez $v0, .L800435AC /* 1E984 80043584 00000000 */ nop .L80043588: /* 1E988 80043588 C7A60048 */ lwc1 $f6, 0x48($sp) /* 1E98C 8004358C 4606B03C */ c.lt.s $f22, $f6 /* 1E990 80043590 00000000 */ nop /* 1E994 80043594 45000005 */ bc1f .L800435AC /* 1E998 80043598 00000000 */ nop /* 1E99C 8004359C 0200F02D */ daddu $fp, $s0, $zero /* 1E9A0 800435A0 0220B02D */ daddu $s6, $s1, $zero /* 1E9A4 800435A4 E7B60048 */ swc1 $f22, 0x48($sp) /* 1E9A8 800435A8 AFB3002C */ sw $s3, 0x2C($sp) .L800435AC: /* 1E9AC 800435AC 8E620000 */ lw $v0, 0x0($s3) /* 1E9B0 800435B0 26520001 */ addiu $s2, $s2, 0x1 /* 1E9B4 800435B4 0242102A */ slt $v0, $s2, $v0 /* 1E9B8 800435B8 1440FF5B */ bnez $v0, .L80043328 /* 1E9BC 800435BC 00121080 */ sll $v0, $s2, 2 .L800435C0: /* 1E9C0 800435C0 3C02800B */ lui $v0, %hi(gCurrentEncounter + 0x1C) /* 1E9C4 800435C4 80420F2C */ lb $v0, %lo(gCurrentEncounter + 0x1C)($v0) /* 1E9C8 800435C8 26B50001 */ addiu $s5, $s5, 0x1 /* 1E9CC 800435CC 02A2102A */ slt $v0, $s5, $v0 /* 1E9D0 800435D0 1440FF4B */ bnez $v0, .L80043300 /* 1E9D4 800435D4 00151080 */ sll $v0, $s5, 2 .L800435D8: /* 1E9D8 800435D8 8E820004 */ lw $v0, 0x4($s4) /* 1E9DC 800435DC 30424000 */ andi $v0, $v0, 0x4000 /* 1E9E0 800435E0 14400021 */ bnez $v0, .L80043668 /* 1E9E4 800435E4 0000102D */ daddu $v0, $zero, $zero /* 1E9E8 800435E8 13C0001F */ beqz $fp, .L80043668 /* 1E9EC 800435EC 00000000 */ nop /* 1E9F0 800435F0 0C04D07A */ jal is_picking_up_item /* 1E9F4 800435F4 00000000 */ nop /* 1E9F8 800435F8 1440001B */ bnez $v0, .L80043668 /* 1E9FC 800435FC 0000102D */ daddu $v0, $zero, $zero /* 1EA00 80043600 8E830000 */ lw $v1, 0x0($s4) /* 1EA04 80043604 8E8400E0 */ lw $a0, 0xE0($s4) /* 1EA08 80043608 3C020200 */ lui $v0, (0x2000000 >> 16) /* 1EA0C 8004360C AE9E00C8 */ sw $fp, 0xC8($s4) /* 1EA10 80043610 00621825 */ or $v1, $v1, $v0 /* 1EA14 80043614 30848000 */ andi $a0, $a0, 0x8000 /* 1EA18 80043618 10800012 */ beqz $a0, .L80043664 /* 1EA1C 8004361C AE830000 */ sw $v1, 0x0($s4) /* 1EA20 80043620 0C03A5EE */ jal close_status_bar /* 1EA24 80043624 00000000 */ nop /* 1EA28 80043628 24020001 */ addiu $v0, $zero, 0x1 /* 1EA2C 8004362C 24030005 */ addiu $v1, $zero, 0x5 /* 1EA30 80043630 3C01800B */ lui $at, %hi(gCurrentEncounter + 0x5) /* 1EA34 80043634 A0230F15 */ sb $v1, %lo(gCurrentEncounter + 0x5)($at) /* 1EA38 80043638 A2C30005 */ sb $v1, 0x5($s6) /* 1EA3C 8004363C 8FA8002C */ lw $t0, 0x2C($sp) /* 1EA40 80043640 0040182D */ daddu $v1, $v0, $zero /* 1EA44 80043644 3C01800B */ lui $at, %hi(gCurrentEncounter + 0x8C) /* 1EA48 80043648 AC360F9C */ sw $s6, %lo(gCurrentEncounter + 0x8C)($at) /* 1EA4C 8004364C 3C01800B */ lui $at, %hi(gCurrentEncounter + 0x4) /* 1EA50 80043650 A0230F14 */ sb $v1, %lo(gCurrentEncounter + 0x4)($at) /* 1EA54 80043654 3C01800B */ lui $at, %hi(gCurrentEncounter + 0x88) /* 1EA58 80043658 AC280F98 */ sw $t0, %lo(gCurrentEncounter + 0x88)($at) /* 1EA5C 8004365C 08010D9A */ j .L80043668 /* 1EA60 80043660 00000000 */ nop .L80043664: /* 1EA64 80043664 0000102D */ daddu $v0, $zero, $zero .L80043668: /* 1EA68 80043668 8FBF0074 */ lw $ra, 0x74($sp) /* 1EA6C 8004366C 8FBE0070 */ lw $fp, 0x70($sp) /* 1EA70 80043670 8FB7006C */ lw $s7, 0x6C($sp) /* 1EA74 80043674 8FB60068 */ lw $s6, 0x68($sp) /* 1EA78 80043678 8FB50064 */ lw $s5, 0x64($sp) /* 1EA7C 8004367C 8FB40060 */ lw $s4, 0x60($sp) /* 1EA80 80043680 8FB3005C */ lw $s3, 0x5C($sp) /* 1EA84 80043684 8FB20058 */ lw $s2, 0x58($sp) /* 1EA88 80043688 8FB10054 */ lw $s1, 0x54($sp) /* 1EA8C 8004368C 8FB00050 */ lw $s0, 0x50($sp) /* 1EA90 80043690 D7BE00A0 */ ldc1 $f30, 0xA0($sp) /* 1EA94 80043694 D7BC0098 */ ldc1 $f28, 0x98($sp) /* 1EA98 80043698 D7BA0090 */ ldc1 $f26, 0x90($sp) /* 1EA9C 8004369C D7B80088 */ ldc1 $f24, 0x88($sp) /* 1EAA0 800436A0 D7B60080 */ ldc1 $f22, 0x80($sp) /* 1EAA4 800436A4 D7B40078 */ ldc1 $f20, 0x78($sp) /* 1EAA8 800436A8 03E00008 */ jr $ra /* 1EAAC 800436AC 27BD00A8 */ addiu $sp, $sp, 0xA8 ### DECOMPILED C INSTRUCTIONS: s32 check_conversation_trigger(void) { PlayerStatus* playerStatus = &gPlayerStatus; Camera* camera = &gCameras[gCurrentCameraID]; EncounterStatus* encounterStatus = &gCurrentEncounter; f32 npcX, npcY, npcZ; f32 angle; f32 deltaX, deltaZ; Encounter* encounter; f32 playerX, playerY, playerZ; f32 playerColliderHeight; f32 playerColliderRadius; f32 length; f32 npcCollisionHeight; f32 npcCollisionRadius; Encounter* encounterTemp; Npc* npc; Npc* encounterNpc; Enemy* enemy; Enemy* encounterEnemy; f32 minLength; f32 xTemp, yTemp, zTemp; s32 i, j; playerStatus->encounteredNPC = NULL; playerStatus->flags &= ~PS_FLAG_HAS_CONVERSATION_NPC; playerColliderHeight = playerStatus->colliderHeight; playerColliderRadius = playerStatus->colliderDiameter / 2; playerX = playerStatus->position.x; playerY = playerStatus->position.y; playerZ = playerStatus->position.z; if (gPartnerStatus.partnerActionState != PARTNER_ACTION_NONE) { return FALSE; } encounter = NULL; npc = NULL; enemy = NULL; minLength = 65535.0f; for (i = 0; i < encounterStatus->numEncounters; i++) { encounterTemp = encounterStatus->encounterList[i]; if (encounterTemp == NULL) { continue; } for (j = 0; j < encounterTemp->count; j++) { encounterEnemy = encounterTemp->enemy[j]; if (encounterEnemy == NULL) { continue; } if (encounterEnemy->flags & (ENEMY_FLAG_SUSPENDED | ENEMY_FLAG_DISABLE_AI)) { continue; } if (!(encounterEnemy->flags & ENEMY_FLAG_PASSIVE)) { continue; } if ((encounterEnemy->flags & ENEMY_FLAG_CANT_INTERACT) || encounterEnemy->interactBytecode == NULL) { continue; } encounterNpc = get_npc_unsafe(encounterEnemy->npcID); npcX = encounterNpc->pos.x; npcY = encounterNpc->pos.y; npcZ = encounterNpc->pos.z; deltaX = npcX - playerX; deltaZ = npcZ - playerZ; npcCollisionHeight = encounterNpc->collisionHeight; npcCollisionRadius = encounterNpc->collisionDiameter; length = sqrtf(SQ(deltaX) + SQ(deltaZ)); if ((playerColliderRadius + npcCollisionRadius <= length) || (npcY + npcCollisionHeight < playerY) || (playerY + playerColliderHeight < npcY)) { continue; } if (clamp_angle(playerStatus->spriteFacingAngle) < 180.0f) { angle = clamp_angle(camera->currentYaw - 120.0f); if (playerStatus->trueAnimation & SPRITE_ID_BACK_FACING) { angle = clamp_angle(angle + 60.0f); } } else { angle = clamp_angle(camera->currentYaw + 120.0f); if (playerStatus->trueAnimation & SPRITE_ID_BACK_FACING) { angle = clamp_angle(angle - 60.0f); } } if (fabsf(get_clamped_angle_diff(angle, atan2(playerX, playerZ, npcX, npcZ))) > 90.0f) { continue; } if (!(encounterEnemy->flags & ENEMY_FLAG_10000) && encounterNpc->flags & NPC_FLAG_20000000) { xTemp = npcX; yTemp = npcY; zTemp = npcZ; if (npc_test_move_taller_with_slipping(0, &xTemp, &yTemp, &zTemp, length, atan2(npcX, npcZ, playerX, playerZ), npcCollisionHeight, 2.0f * npcCollisionRadius)) { continue; } } if (length < minLength) { minLength = length; encounter = encounterTemp; npc = encounterNpc; enemy = encounterEnemy; } } } if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO) && npc != NULL && !is_picking_up_item()) { playerStatus->encounteredNPC = npc; playerStatus->flags |= PS_FLAG_HAS_CONVERSATION_NPC; if (playerStatus->pressedButtons & BUTTON_A) { close_status_bar(); gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_CONVERSATION; enemy->encountered = ENCOUNTER_TRIGGER_CONVERSATION; encounterStatus->currentEncounter = encounter; encounterStatus->currentEnemy = enemy; encounterStatus->firstStrikeType = FIRST_STRIKE_PLAYER; return TRUE; } } return FALSE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel ShowShopPurchaseDialog /* 7E139C 8028051C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 7E13A0 80280520 AFB3001C */ sw $s3, 0x1C($sp) /* 7E13A4 80280524 0080982D */ daddu $s3, $a0, $zero /* 7E13A8 80280528 AFB00010 */ sw $s0, 0x10($sp) /* 7E13AC 8028052C 00A0802D */ daddu $s0, $a1, $zero /* 7E13B0 80280530 AFB60028 */ sw $s6, 0x28($sp) /* 7E13B4 80280534 3C168011 */ lui $s6, %hi(gPlayerData) /* 7E13B8 80280538 26D6F290 */ addiu $s6, $s6, %lo(gPlayerData) /* 7E13BC 8028053C AFBF002C */ sw $ra, 0x2C($sp) /* 7E13C0 80280540 AFB50024 */ sw $s5, 0x24($sp) /* 7E13C4 80280544 AFB40020 */ sw $s4, 0x20($sp) /* 7E13C8 80280548 AFB20018 */ sw $s2, 0x18($sp) /* 7E13CC 8028054C AFB10014 */ sw $s1, 0x14($sp) /* 7E13D0 80280550 8E750084 */ lw $s5, 0x84($s3) /* 7E13D4 80280554 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 7E13D8 80280558 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 7E13DC 8028055C 00151040 */ sll $v0, $s5, 1 /* 7E13E0 80280560 8C740144 */ lw $s4, 0x144($v1) /* 7E13E4 80280564 00551021 */ addu $v0, $v0, $s5 /* 7E13E8 80280568 8E830018 */ lw $v1, 0x18($s4) .L8028056C: /* 7E13EC 8028056C 00021080 */ sll $v0, $v0, 2 /* 7E13F0 80280570 00629021 */ addu $s2, $v1, $v0 /* 7E13F4 80280574 96820000 */ lhu $v0, 0x0($s4) /* 7E13F8 80280578 8E430000 */ lw $v1, 0x0($s2) /* 7E13FC 8028057C 3042FFFE */ andi $v0, $v0, 0xFFFE .L80280580: /* 7E1400 80280580 A6820000 */ sh $v0, 0x0($s4) /* 7E1404 80280584 3C028008 */ lui $v0, %hi(gItemTable) /* 7E1408 80280588 244278E0 */ addiu $v0, $v0, %lo(gItemTable) /* 7E140C 8028058C 00031940 */ sll $v1, $v1, 5 /* 7E1410 80280590 0C03A640 */ jal func_800E9900 /* 7E1414 80280594 00628821 */ addu $s1, $v1, $v0 /* 7E1418 80280598 1200001B */ beqz $s0, .L80280608 .L8028059C: /* 7E141C 8028059C 00000000 */ nop /* 7E1420 802805A0 96220018 */ lhu $v0, 0x18($s1) /* 7E1424 802805A4 3C018028 */ lui $at, %hi(wShopSelectedItem) .L802805A8: /* 7E1428 802805A8 AC206530 */ sw $zero, %lo(wShopSelectedItem)($at) .L802805AC: /* 7E142C 802805AC 3C018028 */ lui $at, %hi(wShopBuyResult) /* 7E1430 802805B0 AC206534 */ sw $zero, %lo(wShopBuyResult)($at) /* 7E1434 802805B4 30420040 */ andi $v0, $v0, 0x40 /* 7E1438 802805B8 10400008 */ beqz $v0, .L802805DC /* 7E143C 802805BC 2407FFFF */ addiu $a3, $zero, -0x1 /* 7E1440 802805C0 9223001A */ lbu $v1, 0x1A($s1) /* 7E1444 802805C4 00031080 */ sll $v0, $v1, 2 /* 7E1448 802805C8 00431021 */ addu $v0, $v0, $v1 /* 7E144C 802805CC 00021080 */ sll $v0, $v0, 2 /* 7E1450 802805D0 3C078009 */ lui $a3, %hi(D_8008F072) .L802805D4: /* 7E1454 802805D4 00E23821 */ addu $a3, $a3, $v0 /* 7E1458 802805D8 80E7F072 */ lb $a3, %lo(D_8008F072)($a3) .L802805DC: /* 7E145C 802805DC 8E250000 */ lw $a1, 0x0($s1) /* 7E1460 802805E0 8E460004 */ lw $a2, 0x4($s2) /* 7E1464 802805E4 0C0A0022 */ jal shop_owner_buy_dialog .L802805E8: /* 7E1468 802805E8 0000202D */ daddu $a0, $zero, $zero /* 7E146C 802805EC AE620074 */ sw $v0, 0x74($s3) /* 7E1470 802805F0 0C03A6D5 */ jal increment_status_bar_disabled /* 7E1474 802805F4 AE600070 */ sw $zero, 0x70($s3) /* 7E1478 802805F8 0C03A640 */ jal func_800E9900 /* 7E147C 802805FC 00000000 */ nop /* 7E1480 80280600 0C03A546 */ jal show_coin_counter /* 7E1484 80280604 00000000 */ nop .L80280608: /* 7E1488 80280608 8E630070 */ lw $v1, 0x70($s3) .L8028060C: /* 7E148C 8028060C 24100005 */ addiu $s0, $zero, 0x5 /* 7E1490 80280610 10700085 */ beq $v1, $s0, .L80280828 /* 7E1494 80280614 28620006 */ slti $v0, $v1, 0x6 /* 7E1498 80280618 1040000D */ beqz $v0, .L80280650 /* 7E149C 8028061C 24020001 */ addiu $v0, $zero, 0x1 .L80280620: /* 7E14A0 80280620 1062006D */ beq $v1, $v0, .L802807D8 /* 7E14A4 80280624 28620002 */ slti $v0, $v1, 0x2 /* 7E14A8 80280628 10400005 */ beqz $v0, .L80280640 /* 7E14AC 8028062C 24020004 */ addiu $v0, $zero, 0x4 /* 7E14B0 80280630 10600017 */ beqz $v1, .L80280690 /* 7E14B4 80280634 0000102D */ daddu $v0, $zero, $zero /* 7E14B8 80280638 080A024B */ j .L8028092C /* 7E14BC 8028063C 00000000 */ nop .L80280640: /* 7E14C0 80280640 1062006F */ beq $v1, $v0, .L80280800 .L80280644: /* 7E14C4 80280644 0000102D */ daddu $v0, $zero, $zero /* 7E14C8 80280648 080A024B */ j .L8028092C /* 7E14CC 8028064C 00000000 */ nop .L80280650: /* 7E14D0 80280650 2410000A */ addiu $s0, $zero, 0xA /* 7E14D4 80280654 10700091 */ beq $v1, $s0, .L8028089C .L80280658: /* 7E14D8 80280658 2862000B */ slti $v0, $v1, 0xB /* 7E14DC 8028065C 10400005 */ beqz $v0, .L80280674 /* 7E14E0 80280660 24020006 */ addiu $v0, $zero, 0x6 /* 7E14E4 80280664 1062007F */ beq $v1, $v0, .L80280864 /* 7E14E8 80280668 0000102D */ daddu $v0, $zero, $zero /* 7E14EC 8028066C 080A024B */ j .L8028092C /* 7E14F0 80280670 00000000 */ nop .L80280674: /* 7E14F4 80280674 2402000B */ addiu $v0, $zero, 0xB /* 7E14F8 80280678 1062009D */ beq $v1, $v0, .L802808F0 .L8028067C: /* 7E14FC 8028067C 24020064 */ addiu $v0, $zero, 0x64 /* 7E1500 80280680 10620012 */ beq $v1, $v0, .L802806CC /* 7E1504 80280684 0000102D */ daddu $v0, $zero, $zero /* 7E1508 80280688 080A024B */ j .L8028092C /* 7E150C 8028068C 00000000 */ nop .L80280690: /* 7E1510 80280690 0C0B1059 */ jal does_script_exist /* 7E1514 80280694 8E640074 */ lw $a0, 0x74($s3) /* 7E1518 80280698 144000A4 */ bnez $v0, .L8028092C /* 7E151C 8028069C 0000102D */ daddu $v0, $zero, $zero /* 7E1520 802806A0 3C04001E */ lui $a0, (0x1E0001 >> 16) /* 7E1524 802806A4 34840001 */ ori $a0, $a0, (0x1E0001 & 0xFFFF) /* 7E1528 802806A8 26650078 */ addiu $a1, $s3, 0x78 /* 7E152C 802806AC 24020064 */ addiu $v0, $zero, 0x64 /* 7E1530 802806B0 AE620070 */ sw $v0, 0x70($s3) /* 7E1534 802806B4 0C049640 */ jal msg_get_printer_for_msg .L802806B8: /* 7E1538 802806B8 AE600078 */ sw $zero, 0x78($s3) /* 7E153C 802806BC 3C018028 */ lui $at, %hi(D_80286528) /* 7E1540 802806C0 AC226528 */ sw $v0, %lo(D_80286528)($at) /* 7E1544 802806C4 080A024B */ j .L8028092C /* 7E1548 802806C8 0000102D */ daddu $v0, $zero, $zero .L802806CC: /* 7E154C 802806CC 8E700078 */ lw $s0, 0x78($s3) /* 7E1550 802806D0 24020001 */ addiu $v0, $zero, 0x1 /* 7E1554 802806D4 16020095 */ bne $s0, $v0, .L8028092C /* 7E1558 802806D8 0000102D */ daddu $v0, $zero, $zero /* 7E155C 802806DC 3C028028 */ lui $v0, %hi(D_80286528) /* 7E1560 802806E0 8C426528 */ lw $v0, %lo(D_80286528)($v0) /* 7E1564 802806E4 904204E8 */ lbu $v0, 0x4E8($v0) .L802806E8: /* 7E1568 802806E8 14400035 */ bnez $v0, .L802807C0 .L802806EC: /* 7E156C 802806EC 00000000 */ nop /* 7E1570 802806F0 86C2000C */ lh $v0, 0xC($s6) /* 7E1574 802806F4 8E430004 */ lw $v1, 0x4($s2) /* 7E1578 802806F8 0043102A */ slt $v0, $v0, $v1 /* 7E157C 802806FC 10400006 */ beqz $v0, .L80280718 /* 7E1580 80280700 00000000 */ nop /* 7E1584 80280704 0C0A005F */ jal shop_owner_continue_speech /* 7E1588 80280708 24040001 */ addiu $a0, $zero, 0x1 glabel func_8028070C /* 7E158C 8028070C AE620074 */ sw $v0, 0x74($s3) /* 7E1590 80280710 080A024A */ j .L80280928 /* 7E1594 80280714 AE700070 */ sw $s0, 0x70($s3) .L80280718: /* 7E1598 80280718 8E420000 */ lw $v0, 0x0($s2) /* 7E159C 8028071C 2442FF20 */ addiu $v0, $v0, -0xE0 /* 7E15A0 80280720 2C420075 */ sltiu $v0, $v0, 0x75 /* 7E15A4 80280724 1440000C */ bnez $v0, .L80280758 /* 7E15A8 80280728 00000000 */ nop /* 7E15AC 8028072C 0C039D5D */ jal add_item /* 7E15B0 80280730 0000202D */ daddu $a0, $zero, $zero /* 7E15B4 80280734 2403FFFF */ addiu $v1, $zero, -0x1 /* 7E15B8 80280738 14430007 */ bne $v0, $v1, .L80280758 /* 7E15BC 8028073C 00000000 */ nop /* 7E15C0 80280740 0C0A005F */ jal shop_owner_continue_speech /* 7E15C4 80280744 24040002 */ addiu $a0, $zero, 0x2 /* 7E15C8 80280748 AE620074 */ sw $v0, 0x74($s3) /* 7E15CC 8028074C 24020004 */ addiu $v0, $zero, 0x4 /* 7E15D0 80280750 080A024A */ j .L80280928 /* 7E15D4 80280754 AE620070 */ sw $v0, 0x70($s3) .L80280758: /* 7E15D8 80280758 96C2000C */ lhu $v0, 0xC($s6) /* 7E15DC 8028075C 96430006 */ lhu $v1, 0x6($s2) /* 7E15E0 80280760 00431023 */ subu $v0, $v0, $v1 /* 7E15E4 80280764 A6C2000C */ sh $v0, 0xC($s6) /* 7E15E8 80280768 8E440000 */ lw $a0, 0x0($s2) /* 7E15EC 8028076C 2482FF20 */ addiu $v0, $a0, -0xE0 /* 7E15F0 80280770 2C420075 */ sltiu $v0, $v0, 0x75 /* 7E15F4 80280774 1040000A */ beqz $v0, .L802807A0 /* 7E15F8 80280778 00000000 */ nop /* 7E15FC 8028077C 0C039DCF */ jal add_badge /* 7E1600 80280780 00000000 */ nop /* 7E1604 80280784 0000202D */ daddu $a0, $zero, $zero /* 7E1608 80280788 3C05F840 */ lui $a1, (0xF8405CF0 >> 16) /* 7E160C 8028078C 34A55CF0 */ ori $a1, $a1, (0xF8405CF0 & 0xFFFF) .L80280790: /* 7E1610 80280790 0C0B2026 */ jal evt_set_variable /* 7E1614 80280794 24060001 */ addiu $a2, $zero, 0x1 /* 7E1618 80280798 080A01EA */ j func_802807A8 /* 7E161C 8028079C 00000000 */ nop .L802807A0: /* 7E1620 802807A0 0C039D5D */ jal add_item /* 7E1624 802807A4 00000000 */ nop glabel func_802807A8 /* 7E1628 802807A8 0C0A005F */ jal shop_owner_continue_speech /* 7E162C 802807AC 24040003 */ addiu $a0, $zero, 0x3 /* 7E1630 802807B0 AE620074 */ sw $v0, 0x74($s3) /* 7E1634 802807B4 24020005 */ addiu $v0, $zero, 0x5 /* 7E1638 802807B8 080A024A */ j .L80280928 /* 7E163C 802807BC AE620070 */ sw $v0, 0x70($s3) .L802807C0: /* 7E1640 802807C0 0C0A00B4 */ jal shop_owner_reset_speech /* 7E1644 802807C4 24040016 */ addiu $a0, $zero, 0x16 /* 7E1648 802807C8 AE620074 */ sw $v0, 0x74($s3) /* 7E164C 802807CC 24020006 */ addiu $v0, $zero, 0x6 glabel GetActionCommandResult /* 7E1650 802807D0 080A024A */ j .L80280928 /* 7E1654 802807D4 AE620070 */ sw $v0, 0x70($s3) .L802807D8: /* 7E1658 802807D8 8E640074 */ lw $a0, 0x74($s3) /* 7E165C 802807DC 0C0B1059 */ jal does_script_exist /* 7E1660 802807E0 00000000 */ nop /* 7E1664 802807E4 14400051 */ bnez $v0, .L8028092C /* 7E1668 802807E8 0000102D */ daddu $v0, $zero, $zero /* 7E166C 802807EC 8E430000 */ lw $v1, 0x0($s2) /* 7E1670 802807F0 3C018028 */ lui $at, %hi(wShopBuyResult) .L802807F4: /* 7E1674 802807F4 AC206534 */ sw $zero, %lo(wShopBuyResult)($at) /* 7E1678 802807F8 080A0214 */ j .L80280850 /* 7E167C 802807FC 2402000A */ addiu $v0, $zero, 0xA .L80280800: /* 7E1680 80280800 8E640074 */ lw $a0, 0x74($s3) /* 7E1684 80280804 0C0B1059 */ jal does_script_exist /* 7E1688 80280808 00000000 */ nop /* 7E168C 8028080C 14400047 */ bnez $v0, .L8028092C /* 7E1690 80280810 0000102D */ daddu $v0, $zero, $zero /* 7E1694 80280814 8E430000 */ lw $v1, 0x0($s2) glabel PartnerYieldTurn /* 7E1698 80280818 3C018028 */ lui $at, %hi(wShopBuyResult) /* 7E169C 8028081C AC306534 */ sw $s0, %lo(wShopBuyResult)($at) /* 7E16A0 80280820 080A0214 */ j .L80280850 /* 7E16A4 80280824 2402000A */ addiu $v0, $zero, 0xA .L80280828: /* 7E16A8 80280828 8E640074 */ lw $a0, 0x74($s3) /* 7E16AC 8028082C 0C0B1059 */ jal does_script_exist /* 7E16B0 80280830 00000000 */ nop /* 7E16B4 80280834 1440003D */ bnez $v0, .L8028092C /* 7E16B8 80280838 0000102D */ daddu $v0, $zero, $zero /* 7E16BC 8028083C 8E430000 */ lw $v1, 0x0($s2) glabel GetDamageIntensity /* 7E16C0 80280840 24020001 */ addiu $v0, $zero, 0x1 /* 7E16C4 80280844 3C018028 */ lui $at, %hi(wShopBuyResult) /* 7E16C8 80280848 AC226534 */ sw $v0, %lo(wShopBuyResult)($at) /* 7E16CC 8028084C 2402000A */ addiu $v0, $zero, 0xA .L80280850: /* 7E16D0 80280850 AE620070 */ sw $v0, 0x70($s3) /* 7E16D4 80280854 3C018028 */ lui $at, %hi(wShopSelectedItem) /* 7E16D8 80280858 AC236530 */ sw $v1, %lo(wShopSelectedItem)($at) .L8028085C: /* 7E16DC 8028085C 080A024B */ j .L8028092C /* 7E16E0 80280860 0000102D */ daddu $v0, $zero, $zero .L80280864: /* 7E16E4 80280864 8E640074 */ lw $a0, 0x74($s3) /* 7E16E8 80280868 0C0B1059 */ jal does_script_exist /* 7E16EC 8028086C 00000000 */ nop /* 7E16F0 80280870 1440002E */ bnez $v0, .L8028092C .L80280874: /* 7E16F4 80280874 0000102D */ daddu $v0, $zero, $zero .L80280878: /* 7E16F8 80280878 8E430000 */ lw $v1, 0x0($s2) /* 7E16FC 8028087C 24020003 */ addiu $v0, $zero, 0x3 glabel AddEffectOffset /* 7E1700 80280880 3C018028 */ lui $at, %hi(wShopBuyResult) /* 7E1704 80280884 AC226534 */ sw $v0, %lo(wShopBuyResult)($at) /* 7E1708 80280888 AE700070 */ sw $s0, 0x70($s3) /* 7E170C 8028088C 3C018028 */ lui $at, %hi(wShopSelectedItem) /* 7E1710 80280890 AC236530 */ sw $v1, %lo(wShopSelectedItem)($at) /* 7E1714 80280894 080A024B */ j .L8028092C /* 7E1718 80280898 0000102D */ daddu $v0, $zero, $zero .L8028089C: /* 7E171C 8028089C 8E820010 */ lw $v0, 0x10($s4) /* 7E1720 802808A0 3C108028 */ lui $s0, %hi(wShopBuyCallbackScript) /* 7E1724 802808A4 2610652C */ addiu $s0, $s0, %lo(wShopBuyCallbackScript) /* 7E1728 802808A8 1040000E */ beqz $v0, .L802808E4 /* 7E172C 802808AC AE000000 */ sw $zero, 0x0($s0) /* 7E1730 802808B0 8C44000C */ lw $a0, 0xC($v0) /* 7E1734 802808B4 1080000B */ beqz $a0, .L802808E4 /* 7E1738 802808B8 24050001 */ addiu $a1, $zero, 0x1 /* 7E173C 802808BC 0C0B0CF8 */ jal start_script /* 7E1740 802808C0 0000302D */ daddu $a2, $zero, $zero /* 7E1744 802808C4 3C038028 */ lui $v1, %hi(wShopBuyResult) /* 7E1748 802808C8 8C636534 */ lw $v1, %lo(wShopBuyResult)($v1) /* 7E174C 802808CC 3C048028 */ lui $a0, %hi(wShopSelectedItem) /* 7E1750 802808D0 8C846530 */ lw $a0, %lo(wShopSelectedItem)($a0) /* 7E1754 802808D4 AE020000 */ sw $v0, 0x0($s0) /* 7E1758 802808D8 AC55008C */ sw $s5, 0x8C($v0) /* 7E175C 802808DC AC430084 */ sw $v1, 0x84($v0) /* 7E1760 802808E0 AC440088 */ sw $a0, 0x88($v0) .L802808E4: /* 7E1764 802808E4 2402000B */ addiu $v0, $zero, 0xB /* 7E1768 802808E8 080A024A */ j .L80280928 /* 7E176C 802808EC AE620070 */ sw $v0, 0x70($s3) .L802808F0: /* 7E1770 802808F0 3C028028 */ lui $v0, %hi(wShopBuyCallbackScript) /* 7E1774 802808F4 8C42652C */ lw $v0, %lo(wShopBuyCallbackScript)($v0) /* 7E1778 802808F8 10400005 */ beqz $v0, .L80280910 /* 7E177C 802808FC 00000000 */ nop /* 7E1780 80280900 0C0B1059 */ jal does_script_exist /* 7E1784 80280904 8C440144 */ lw $a0, 0x144($v0) /* 7E1788 80280908 14400008 */ bnez $v0, .L8028092C /* 7E178C 8028090C 0000102D */ daddu $v0, $zero, $zero .L80280910: /* 7E1790 80280910 0C03A6CC */ jal decrement_status_bar_disabled /* 7E1794 80280914 00000000 */ nop /* 7E1798 80280918 0C03A5B2 */ jal hide_coin_counter_immediately /* 7E179C 8028091C 00000000 */ nop /* 7E17A0 80280920 080A024B */ j .L8028092C /* 7E17A4 80280924 24020001 */ addiu $v0, $zero, 0x1 .L80280928: /* 7E17A8 80280928 0000102D */ daddu $v0, $zero, $zero .L8028092C: /* 7E17AC 8028092C 8FBF002C */ lw $ra, 0x2C($sp) /* 7E17B0 80280930 8FB60028 */ lw $s6, 0x28($sp) /* 7E17B4 80280934 8FB50024 */ lw $s5, 0x24($sp) /* 7E17B8 80280938 8FB40020 */ lw $s4, 0x20($sp) /* 7E17BC 8028093C 8FB3001C */ lw $s3, 0x1C($sp) /* 7E17C0 80280940 8FB20018 */ lw $s2, 0x18($sp) /* 7E17C4 80280944 8FB10014 */ lw $s1, 0x14($sp) /* 7E17C8 80280948 8FB00010 */ lw $s0, 0x10($sp) /* 7E17CC 8028094C 03E00008 */ jr $ra glabel LoadStarPowerScript /* 7E17D0 80280950 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(ShowShopPurchaseDialog) { PlayerData* playerData = &gPlayerData; s32 shopItemSlot = script->varTable[0]; Shop* shop = gGameStatusPtr->mapShop; ShopItemData* shopInventory = &shop->staticInventory[shopItemSlot]; ItemData* shopItem = &gItemTable[shopInventory->itemID]; s32 bpCost; static MessagePrintState* D_80286528; static Evt* wShopBuyCallbackScript; static s32 wShopSelectedItem; static s32 wShopBuyResult; // functionTemp[0] is PurchaseDialogState // functionTemp[1] is speech script ID // functionTemp[2] is speech printer isClosed writeback shop->flags &= ~SHOP_FLAG_1; func_800E9900(); if (isInitialCall) { wShopSelectedItem = ITEM_NONE; wShopBuyResult = SHOP_BUY_RESULT_NOT_ENOUGH_COINS; bpCost = -1; if (shopItem->typeFlags & ITEM_TYPE_FLAG_BADGE) { bpCost = gMoveTable[shopItem->moveID].costBP; } script->functionTemp[1] = shop_owner_buy_dialog(SHOP_MSG_BUY_CONFIRM, shopItem->nameMsg, shopInventory->price, bpCost); script->functionTemp[0] = PURCHASE_DIALOG_STATE_INIT; increment_status_bar_disabled(); func_800E9900(); show_coin_counter(); } switch (script->functionTemp[0]) { case PURCHASE_DIALOG_STATE_INIT: if (!does_script_exist(script->functionTemp[1])) { script->functionTemp[0] = PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH; script->functionTemp[2] = FALSE; D_80286528 = msg_get_printer_for_msg(MSG_Choice_0001, &script->functionTemp[2]); } break; case PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH: if (script->functionTemp[2] == TRUE) { if (D_80286528->currentOption == 0) { if (playerData->coins < shopInventory->price) { script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOT_ENOUGH_COINS); script->functionTemp[0] = PURCHASE_DIALOG_STATE_NOT_ENOUGH_COINS; } else if (!IS_BADGE(shopInventory->itemID) && add_item(ITEM_NONE) == -1) { script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOT_ENOUGH_ROOM); script->functionTemp[0] = PURCHASE_DIALOG_STATE_NOT_ENOUGH_ROOM; } else { playerData->coins -= shopInventory->price; if (IS_BADGE(shopInventory->itemID)) { add_badge(shopInventory->itemID); evt_set_variable(NULL, GF_MAC01_BoughtBadgeFromRowf, TRUE); } else { add_item(shopInventory->itemID); } script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_BUY_THANK_YOU); script->functionTemp[0] = PURCHASE_DIALOG_STATE_ACCEPTED; } } else { script->functionTemp[1] = shop_owner_reset_speech(SHOP_MSG_FAREWELL); script->functionTemp[0] = PURCHASE_DIALOG_STATE_CANCEL; } } break; case PURCHASE_DIALOG_STATE_NOT_ENOUGH_COINS: if (!does_script_exist(script->functionTemp[1])) { wShopBuyResult = SHOP_BUY_RESULT_NOT_ENOUGH_COINS; wShopSelectedItem = shopInventory->itemID; script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK; } break; case PURCHASE_DIALOG_STATE_NOT_ENOUGH_ROOM: if (!does_script_exist(script->functionTemp[1])) { wShopBuyResult = SHOP_BUY_RESULT_NOT_ENOUGH_ROOM; wShopSelectedItem = shopInventory->itemID; script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK; } break; case PURCHASE_DIALOG_STATE_ACCEPTED: if (!does_script_exist(script->functionTemp[1])) { wShopBuyResult = SHOP_BUY_RESULT_OK; wShopSelectedItem = shopInventory->itemID; script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK; } break; case PURCHASE_DIALOG_STATE_CANCEL: if (!does_script_exist(script->functionTemp[1])) { wShopBuyResult = SHOP_BUY_RESULT_CANCEL; wShopSelectedItem = shopInventory->itemID; script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK; } break; case PURCHASE_DIALOG_STATE_EXEC_CALLBACK: wShopBuyCallbackScript = NULL; if (shop->owner != NULL) { if (shop->owner->onBuyEvt != NULL) { wShopBuyCallbackScript = start_script(shop->owner->onBuyEvt, EVT_PRIORITY_1, 0); wShopBuyCallbackScript->varTable[0] = wShopBuyResult; wShopBuyCallbackScript->varTable[1] = wShopSelectedItem; wShopBuyCallbackScript->varTable[2] = shopItemSlot; } } script->functionTemp[0] = PURCHASE_DIALOG_STATE_AWAIT_CALLBACK; break; case PURCHASE_DIALOG_STATE_AWAIT_CALLBACK: if (wShopBuyCallbackScript != NULL && does_script_exist(wShopBuyCallbackScript->id)) { break; } decrement_status_bar_disabled(); hide_coin_counter_immediately(); return ApiStatus_DONE1; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel water_splash_appendGfx /* 3BC51C E00BE5BC 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 3BC520 E00BE5C0 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 3BC524 E00BE5C4 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 3BC528 E00BE5C8 AFA400C0 */ sw $a0, 0xC0($sp) /* 3BC52C E00BE5CC 27A40010 */ addiu $a0, $sp, 0x10 /* 3BC530 E00BE5D0 AFB1009C */ sw $s1, 0x9C($sp) /* 3BC534 E00BE5D4 3C110001 */ lui $s1, (0x11630 >> 16) /* 3BC538 E00BE5D8 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 3BC53C E00BE5DC AFB300A4 */ sw $s3, 0xA4($sp) /* 3BC540 E00BE5E0 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3BC544 E00BE5E4 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3BC548 E00BE5E8 AFBF00BC */ sw $ra, 0xBC($sp) /* 3BC54C E00BE5EC AFBE00B8 */ sw $fp, 0xB8($sp) /* 3BC550 E00BE5F0 AFB700B4 */ sw $s7, 0xB4($sp) /* 3BC554 E00BE5F4 AFB600B0 */ sw $s6, 0xB0($sp) /* 3BC558 E00BE5F8 AFB500AC */ sw $s5, 0xAC($sp) /* 3BC55C E00BE5FC AFB400A8 */ sw $s4, 0xA8($sp) /* 3BC560 E00BE600 AFB200A0 */ sw $s2, 0xA0($sp) /* 3BC564 E00BE604 AFB00098 */ sw $s0, 0x98($sp) /* 3BC568 E00BE608 8E670000 */ lw $a3, 0x0($s3) /* 3BC56C E00BE60C 8FAC00C0 */ lw $t4, 0xC0($sp) /* 3BC570 E00BE610 00E0182D */ daddu $v1, $a3, $zero /* 3BC574 E00BE614 8D92000C */ lw $s2, 0xC($t4) /* 3BC578 E00BE618 24E70008 */ addiu $a3, $a3, 0x8 /* 3BC57C E00BE61C AE670000 */ sw $a3, 0x0($s3) /* 3BC580 E00BE620 8E4C0030 */ lw $t4, 0x30($s2) /* 3BC584 E00BE624 24160001 */ addiu $s6, $zero, 0x1 /* 3BC588 E00BE628 AFAC0090 */ sw $t4, 0x90($sp) /* 3BC58C E00BE62C C6400004 */ lwc1 $f0, 0x4($s2) /* 3BC590 E00BE630 C6420008 */ lwc1 $f2, 0x8($s2) /* 3BC594 E00BE634 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3BC598 E00BE638 AC620000 */ sw $v0, 0x0($v1) /* 3BC59C E00BE63C 24E20008 */ addiu $v0, $a3, 0x8 /* 3BC5A0 E00BE640 AC600004 */ sw $zero, 0x4($v1) /* 3BC5A4 E00BE644 AE620000 */ sw $v0, 0x0($s3) /* 3BC5A8 E00BE648 ACE50000 */ sw $a1, 0x0($a3) /* 3BC5AC E00BE64C 4600010D */ trunc.w.s $f4, $f0 /* 3BC5B0 E00BE650 E7A40094 */ swc1 $f4, 0x94($sp) /* 3BC5B4 E00BE654 C7A40094 */ lwc1 $f4, 0x94($sp) /* 3BC5B8 E00BE658 46802120 */ cvt.s.w $f4, $f4 /* 3BC5BC E00BE65C 44052000 */ mfc1 $a1, $f4 /* 3BC5C0 E00BE660 4600110D */ trunc.w.s $f4, $f2 /* 3BC5C4 E00BE664 441E2000 */ mfc1 $fp, $f4 /* 3BC5C8 E00BE668 8FAC00C0 */ lw $t4, 0xC0($sp) /* 3BC5CC E00BE66C 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3BC5D0 E00BE670 8D820010 */ lw $v0, 0x10($t4) /* 3BC5D4 E00BE674 449E2000 */ mtc1 $fp, $f4 /* 3BC5D8 E00BE678 00000000 */ nop /* 3BC5DC E00BE67C 46802120 */ cvt.s.w $f4, $f4 /* 3BC5E0 E00BE680 8C42001C */ lw $v0, 0x1C($v0) /* 3BC5E4 E00BE684 44062000 */ mfc1 $a2, $f4 /* 3BC5E8 E00BE688 00431021 */ addu $v0, $v0, $v1 /* 3BC5EC E00BE68C 3C03800B */ lui $v1, %hi(gCameras) /* 3BC5F0 E00BE690 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3BC5F4 E00BE694 ACE20004 */ sw $v0, 0x4($a3) /* 3BC5F8 E00BE698 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3BC5FC E00BE69C 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3BC600 E00BE6A0 8E47000C */ lw $a3, 0xC($s2) /* 3BC604 E00BE6A4 00028080 */ sll $s0, $v0, 2 /* 3BC608 E00BE6A8 02028021 */ addu $s0, $s0, $v0 /* 3BC60C E00BE6AC 00108080 */ sll $s0, $s0, 2 /* 3BC610 E00BE6B0 02028023 */ subu $s0, $s0, $v0 /* 3BC614 E00BE6B4 001010C0 */ sll $v0, $s0, 3 /* 3BC618 E00BE6B8 02028021 */ addu $s0, $s0, $v0 /* 3BC61C E00BE6BC 001080C0 */ sll $s0, $s0, 3 /* 3BC620 E00BE6C0 0C080108 */ jal shim_guTranslateF /* 3BC624 E00BE6C4 02038021 */ addu $s0, $s0, $v1 /* 3BC628 E00BE6C8 27B40050 */ addiu $s4, $sp, 0x50 /* 3BC62C E00BE6CC 8E450034 */ lw $a1, 0x34($s2) /* 3BC630 E00BE6D0 0280202D */ daddu $a0, $s4, $zero /* 3BC634 E00BE6D4 00A0302D */ daddu $a2, $a1, $zero /* 3BC638 E00BE6D8 0C080110 */ jal shim_guScaleF /* 3BC63C E00BE6DC 00A0382D */ daddu $a3, $a1, $zero /* 3BC640 E00BE6E0 0280202D */ daddu $a0, $s4, $zero /* 3BC644 E00BE6E4 27A50010 */ addiu $a1, $sp, 0x10 /* 3BC648 E00BE6E8 0C080114 */ jal shim_guMtxCatF /* 3BC64C E00BE6EC 00A0302D */ daddu $a2, $a1, $zero /* 3BC650 E00BE6F0 27A40010 */ addiu $a0, $sp, 0x10 /* 3BC654 E00BE6F4 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 3BC658 E00BE6F8 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 3BC65C E00BE6FC 3C17800A */ lui $s7, %hi(gDisplayContext) /* 3BC660 E00BE700 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext) /* 3BC664 E00BE704 96A50000 */ lhu $a1, 0x0($s5) /* 3BC668 E00BE708 8EE20000 */ lw $v0, 0x0($s7) /* 3BC66C E00BE70C 00052980 */ sll $a1, $a1, 6 /* 3BC670 E00BE710 00B12821 */ addu $a1, $a1, $s1 /* 3BC674 E00BE714 0C080118 */ jal shim_guMtxF2L /* 3BC678 E00BE718 00452821 */ addu $a1, $v0, $a1 /* 3BC67C E00BE71C 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3BC680 E00BE720 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3BC684 E00BE724 3C06DA38 */ lui $a2, (0xDA380000 >> 16) /* 3BC688 E00BE728 00D63025 */ or $a2, $a2, $s6 /* 3BC68C E00BE72C 8E640000 */ lw $a0, 0x0($s3) /* 3BC690 E00BE730 96A20000 */ lhu $v0, 0x0($s5) /* 3BC694 E00BE734 0080282D */ daddu $a1, $a0, $zero /* 3BC698 E00BE738 24840008 */ addiu $a0, $a0, 0x8 /* 3BC69C E00BE73C AE640000 */ sw $a0, 0x0($s3) /* 3BC6A0 E00BE740 ACA30000 */ sw $v1, 0x0($a1) /* 3BC6A4 E00BE744 00561821 */ addu $v1, $v0, $s6 /* 3BC6A8 E00BE748 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3BC6AC E00BE74C 00021180 */ sll $v0, $v0, 6 /* 3BC6B0 E00BE750 A6A30000 */ sh $v1, 0x0($s5) /* 3BC6B4 E00BE754 8EE30000 */ lw $v1, 0x0($s7) /* 3BC6B8 E00BE758 00511021 */ addu $v0, $v0, $s1 /* 3BC6BC E00BE75C 00621821 */ addu $v1, $v1, $v0 /* 3BC6C0 E00BE760 24820008 */ addiu $v0, $a0, 0x8 /* 3BC6C4 E00BE764 ACA30004 */ sw $v1, 0x4($a1) /* 3BC6C8 E00BE768 AE620000 */ sw $v0, 0x0($s3) /* 3BC6CC E00BE76C AC860000 */ sw $a2, 0x0($a0) /* 3BC6D0 E00BE770 8E030204 */ lw $v1, 0x204($s0) /* 3BC6D4 E00BE774 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3BC6D8 E00BE778 AC820008 */ sw $v0, 0x8($a0) /* 3BC6DC E00BE77C 3C020900 */ lui $v0, %hi(D_09000100_415160) /* 3BC6E0 E00BE780 24420100 */ addiu $v0, $v0, %lo(D_09000100_415160) /* 3BC6E4 E00BE784 AC82000C */ sw $v0, 0xC($a0) /* 3BC6E8 E00BE788 AC830004 */ sw $v1, 0x4($a0) /* 3BC6EC E00BE78C 8FAC00C0 */ lw $t4, 0xC0($sp) /* 3BC6F0 E00BE790 26520038 */ addiu $s2, $s2, 0x38 /* 3BC6F4 E00BE794 8D820008 */ lw $v0, 0x8($t4) /* 3BC6F8 E00BE798 24840010 */ addiu $a0, $a0, 0x10 /* 3BC6FC E00BE79C 02C2102A */ slt $v0, $s6, $v0 /* 3BC700 E00BE7A0 104000BB */ beqz $v0, .LE00BEA90 /* 3BC704 E00BE7A4 AE640000 */ sw $a0, 0x0($s3) /* 3BC708 E00BE7A8 0260882D */ daddu $s1, $s3, $zero /* 3BC70C E00BE7AC 3C130001 */ lui $s3, (0x11630 >> 16) /* 3BC710 E00BE7B0 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3BC714 E00BE7B4 26500030 */ addiu $s0, $s2, 0x30 .LE00BE7B8: /* 3BC718 E00BE7B8 C600FFD4 */ lwc1 $f0, -0x2C($s0) /* 3BC71C E00BE7BC 4600010D */ trunc.w.s $f4, $f0 /* 3BC720 E00BE7C0 44022000 */ mfc1 $v0, $f4 /* 3BC724 E00BE7C4 8FAC0094 */ lw $t4, 0x94($sp) /* 3BC728 E00BE7C8 C600FFD8 */ lwc1 $f0, -0x28($s0) /* 3BC72C E00BE7CC 004C5021 */ addu $t2, $v0, $t4 /* 3BC730 E00BE7D0 4600010D */ trunc.w.s $f4, $f0 /* 3BC734 E00BE7D4 44022000 */ mfc1 $v0, $f4 /* 3BC738 E00BE7D8 05410004 */ bgez $t2, .LE00BE7EC /* 3BC73C E00BE7DC 005E5821 */ addu $t3, $v0, $fp /* 3BC740 E00BE7E0 3142007F */ andi $v0, $t2, 0x7F /* 3BC744 E00BE7E4 0802F9FC */ j .LE00BE7F0 /* 3BC748 E00BE7E8 00025023 */ negu $t2, $v0 .LE00BE7EC: /* 3BC74C E00BE7EC 314A007F */ andi $t2, $t2, 0x7F .LE00BE7F0: /* 3BC750 E00BE7F0 19600003 */ blez $t3, .LE00BE800 /* 3BC754 E00BE7F4 3162003F */ andi $v0, $t3, 0x3F /* 3BC758 E00BE7F8 0802FA01 */ j .LE00BE804 /* 3BC75C E00BE7FC 00025823 */ negu $t3, $v0 .LE00BE800: /* 3BC760 E00BE800 316B003F */ andi $t3, $t3, 0x3F .LE00BE804: /* 3BC764 E00BE804 3C02FD10 */ lui $v0, (0xFD10013F >> 16) /* 3BC768 E00BE808 3442013F */ ori $v0, $v0, (0xFD10013F & 0xFFFF) /* 3BC76C E00BE80C 3C07F510 */ lui $a3, (0xF5101100 >> 16) /* 3BC770 E00BE810 34E71100 */ ori $a3, $a3, (0xF5101100 & 0xFFFF) /* 3BC774 E00BE814 3C050701 */ lui $a1, (0x7014050 >> 16) /* 3BC778 E00BE818 34A54050 */ ori $a1, $a1, (0x7014050 & 0xFFFF) /* 3BC77C E00BE81C 3C090101 */ lui $t1, (0x1014050 >> 16) /* 3BC780 E00BE820 35294050 */ ori $t1, $t1, (0x1014050 & 0xFFFF) /* 3BC784 E00BE824 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3BC788 E00BE828 25660078 */ addiu $a2, $t3, 0x78 /* 3BC78C E00BE82C 00063080 */ sll $a2, $a2, 2 /* 3BC790 E00BE830 8E280000 */ lw $t0, 0x0($s1) /* 3BC794 E00BE834 30C60FFF */ andi $a2, $a2, 0xFFF /* 3BC798 E00BE838 0100202D */ daddu $a0, $t0, $zero /* 3BC79C E00BE83C AC820000 */ sw $v0, 0x0($a0) /* 3BC7A0 E00BE840 3C02800A */ lui $v0, %hi(nuGfxCfb_ptr) /* 3BC7A4 E00BE844 8C42A64C */ lw $v0, %lo(nuGfxCfb_ptr)($v0) /* 3BC7A8 E00BE848 25080008 */ addiu $t0, $t0, 0x8 /* 3BC7AC E00BE84C 00431021 */ addu $v0, $v0, $v1 /* 3BC7B0 E00BE850 AC820004 */ sw $v0, 0x4($a0) /* 3BC7B4 E00BE854 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* 3BC7B8 E00BE858 AD050004 */ sw $a1, 0x4($t0) /* 3BC7BC E00BE85C 254500A0 */ addiu $a1, $t2, 0xA0 /* 3BC7C0 E00BE860 00052880 */ sll $a1, $a1, 2 /* 3BC7C4 E00BE864 30A50FFF */ andi $a1, $a1, 0xFFF /* 3BC7C8 E00BE868 00052B00 */ sll $a1, $a1, 12 /* 3BC7CC E00BE86C AD020008 */ sw $v0, 0x8($t0) /* 3BC7D0 E00BE870 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* 3BC7D4 E00BE874 00C21025 */ or $v0, $a2, $v0 /* 3BC7D8 E00BE878 00A21025 */ or $v0, $a1, $v0 /* 3BC7DC E00BE87C 254400BF */ addiu $a0, $t2, 0xBF /* 3BC7E0 E00BE880 00042080 */ sll $a0, $a0, 2 /* 3BC7E4 E00BE884 30840FFF */ andi $a0, $a0, 0xFFF /* 3BC7E8 E00BE888 00042300 */ sll $a0, $a0, 12 /* 3BC7EC E00BE88C 25630097 */ addiu $v1, $t3, 0x97 /* 3BC7F0 E00BE890 00031880 */ sll $v1, $v1, 2 /* 3BC7F4 E00BE894 30630FFF */ andi $v1, $v1, 0xFFF /* 3BC7F8 E00BE898 AD020010 */ sw $v0, 0x10($t0) /* 3BC7FC E00BE89C 3C020700 */ lui $v0, (0x7000000 >> 16) /* 3BC800 E00BE8A0 00621025 */ or $v0, $v1, $v0 /* 3BC804 E00BE8A4 00821025 */ or $v0, $a0, $v0 /* 3BC808 E00BE8A8 AD020014 */ sw $v0, 0x14($t0) /* 3BC80C E00BE8AC 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3BC810 E00BE8B0 AD020018 */ sw $v0, 0x18($t0) /* 3BC814 E00BE8B4 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 3BC818 E00BE8B8 00C23025 */ or $a2, $a2, $v0 /* 3BC81C E00BE8BC 00A62825 */ or $a1, $a1, $a2 /* 3BC820 E00BE8C0 3C020100 */ lui $v0, (0x1000000 >> 16) /* 3BC824 E00BE8C4 00621825 */ or $v1, $v1, $v0 /* 3BC828 E00BE8C8 00832025 */ or $a0, $a0, $v1 /* 3BC82C E00BE8CC AD04002C */ sw $a0, 0x2C($t0) /* 3BC830 E00BE8D0 27A40010 */ addiu $a0, $sp, 0x10 /* 3BC834 E00BE8D4 AD070000 */ sw $a3, 0x0($t0) /* 3BC838 E00BE8D8 AD00000C */ sw $zero, 0xC($t0) /* 3BC83C E00BE8DC AD00001C */ sw $zero, 0x1C($t0) /* 3BC840 E00BE8E0 AD070020 */ sw $a3, 0x20($t0) /* 3BC844 E00BE8E4 AD090024 */ sw $t1, 0x24($t0) /* 3BC848 E00BE8E8 AD050028 */ sw $a1, 0x28($t0) /* 3BC84C E00BE8EC 8E05FFD4 */ lw $a1, -0x2C($s0) /* 3BC850 E00BE8F0 8E06FFD8 */ lw $a2, -0x28($s0) /* 3BC854 E00BE8F4 8E07FFDC */ lw $a3, -0x24($s0) /* 3BC858 E00BE8F8 25020008 */ addiu $v0, $t0, 0x8 /* 3BC85C E00BE8FC AE280000 */ sw $t0, 0x0($s1) /* 3BC860 E00BE900 AE220000 */ sw $v0, 0x0($s1) /* 3BC864 E00BE904 25020010 */ addiu $v0, $t0, 0x10 /* 3BC868 E00BE908 AE220000 */ sw $v0, 0x0($s1) /* 3BC86C E00BE90C 25020018 */ addiu $v0, $t0, 0x18 /* 3BC870 E00BE910 AE220000 */ sw $v0, 0x0($s1) /* 3BC874 E00BE914 25020020 */ addiu $v0, $t0, 0x20 /* 3BC878 E00BE918 AE220000 */ sw $v0, 0x0($s1) /* 3BC87C E00BE91C 25020028 */ addiu $v0, $t0, 0x28 /* 3BC880 E00BE920 25080030 */ addiu $t0, $t0, 0x30 /* 3BC884 E00BE924 AE220000 */ sw $v0, 0x0($s1) /* 3BC888 E00BE928 0C080108 */ jal shim_guTranslateF /* 3BC88C E00BE92C AE280000 */ sw $t0, 0x0($s1) /* 3BC890 E00BE930 8E050004 */ lw $a1, 0x4($s0) /* 3BC894 E00BE934 0280202D */ daddu $a0, $s4, $zero /* 3BC898 E00BE938 00A0302D */ daddu $a2, $a1, $zero /* 3BC89C E00BE93C 0C080110 */ jal shim_guScaleF /* 3BC8A0 E00BE940 00A0382D */ daddu $a3, $a1, $zero /* 3BC8A4 E00BE944 0280202D */ daddu $a0, $s4, $zero /* 3BC8A8 E00BE948 27A50010 */ addiu $a1, $sp, 0x10 /* 3BC8AC E00BE94C 0C080114 */ jal shim_guMtxCatF /* 3BC8B0 E00BE950 00A0302D */ daddu $a2, $a1, $zero /* 3BC8B4 E00BE954 27A40010 */ addiu $a0, $sp, 0x10 /* 3BC8B8 E00BE958 96A50000 */ lhu $a1, 0x0($s5) /* 3BC8BC E00BE95C 8EE20000 */ lw $v0, 0x0($s7) /* 3BC8C0 E00BE960 00052980 */ sll $a1, $a1, 6 /* 3BC8C4 E00BE964 00B32821 */ addu $a1, $a1, $s3 /* 3BC8C8 E00BE968 0C080118 */ jal shim_guMtxF2L /* 3BC8CC E00BE96C 00452821 */ addu $a1, $v0, $a1 /* 3BC8D0 E00BE970 3C088080 */ lui $t0, (0x80808081 >> 16) /* 3BC8D4 E00BE974 35088081 */ ori $t0, $t0, (0x80808081 & 0xFFFF) /* 3BC8D8 E00BE978 3C09C8FF */ lui $t1, (0xC8FFFF00 >> 16) /* 3BC8DC E00BE97C 3529FF00 */ ori $t1, $t1, (0xC8FFFF00 & 0xFFFF) /* 3BC8E0 E00BE980 3C070020 */ lui $a3, (0x202000 >> 16) /* 3BC8E4 E00BE984 34E72000 */ ori $a3, $a3, (0x202000 & 0xFFFF) /* 3BC8E8 E00BE988 3C0AD838 */ lui $t2, (0xD8380002 >> 16) /* 3BC8EC E00BE98C 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 3BC8F0 E00BE990 8E240000 */ lw $a0, 0x0($s1) /* 3BC8F4 E00BE994 96A50000 */ lhu $a1, 0x0($s5) /* 3BC8F8 E00BE998 0080302D */ daddu $a2, $a0, $zero /* 3BC8FC E00BE99C 24840008 */ addiu $a0, $a0, 0x8 /* 3BC900 E00BE9A0 ACC20000 */ sw $v0, 0x0($a2) /* 3BC904 E00BE9A4 30A2FFFF */ andi $v0, $a1, 0xFFFF /* 3BC908 E00BE9A8 00021180 */ sll $v0, $v0, 6 /* 3BC90C E00BE9AC 8EE30000 */ lw $v1, 0x0($s7) /* 3BC910 E00BE9B0 00531021 */ addu $v0, $v0, $s3 /* 3BC914 E00BE9B4 00621821 */ addu $v1, $v1, $v0 /* 3BC918 E00BE9B8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3BC91C E00BE9BC ACC30004 */ sw $v1, 0x4($a2) /* 3BC920 E00BE9C0 AC820000 */ sw $v0, 0x0($a0) /* 3BC924 E00BE9C4 8E030000 */ lw $v1, 0x0($s0) /* 3BC928 E00BE9C8 24A50001 */ addiu $a1, $a1, 0x1 /* 3BC92C E00BE9CC AE240000 */ sw $a0, 0x0($s1) /* 3BC930 E00BE9D0 A6A50000 */ sh $a1, 0x0($s5) /* 3BC934 E00BE9D4 8FAC0090 */ lw $t4, 0x90($sp) /* 3BC938 E00BE9D8 354A0002 */ ori $t2, $t2, (0xD8380002 & 0xFFFF) /* 3BC93C E00BE9DC 01830018 */ mult $t4, $v1 /* 3BC940 E00BE9E0 24820008 */ addiu $v0, $a0, 0x8 /* 3BC944 E00BE9E4 AE220000 */ sw $v0, 0x0($s1) /* 3BC948 E00BE9E8 24820010 */ addiu $v0, $a0, 0x10 /* 3BC94C E00BE9EC AE220000 */ sw $v0, 0x0($s1) /* 3BC950 E00BE9F0 00001812 */ mflo $v1 /* 3BC954 E00BE9F4 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3BC958 E00BE9F8 AC820008 */ sw $v0, 0x8($a0) /* 3BC95C E00BE9FC 00680018 */ mult $v1, $t0 /* 3BC960 E00BEA00 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3BC964 E00BEA04 AC87000C */ sw $a3, 0xC($a0) /* 3BC968 E00BEA08 AC820010 */ sw $v0, 0x10($a0) /* 3BC96C E00BEA0C 3C0CE00C */ lui $t4, %hi(D_E00BEAF0) /* 3BC970 E00BEA10 258CEAF0 */ addiu $t4, $t4, %lo(D_E00BEAF0) /* 3BC974 E00BEA14 00004010 */ mfhi $t0 /* 3BC978 E00BEA18 01031021 */ addu $v0, $t0, $v1 /* 3BC97C E00BEA1C 000211C3 */ sra $v0, $v0, 7 /* 3BC980 E00BEA20 00031FC3 */ sra $v1, $v1, 31 /* 3BC984 E00BEA24 00431023 */ subu $v0, $v0, $v1 /* 3BC988 E00BEA28 304200FF */ andi $v0, $v0, 0xFF /* 3BC98C E00BEA2C 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 3BC990 E00BEA30 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 3BC994 E00BEA34 00491025 */ or $v0, $v0, $t1 /* 3BC998 E00BEA38 AC820004 */ sw $v0, 0x4($a0) /* 3BC99C E00BEA3C 94620134 */ lhu $v0, 0x134($v1) /* 3BC9A0 E00BEA40 24830018 */ addiu $v1, $a0, 0x18 /* 3BC9A4 E00BEA44 AE230000 */ sw $v1, 0x0($s1) /* 3BC9A8 E00BEA48 00021042 */ srl $v0, $v0, 1 /* 3BC9AC E00BEA4C 02C21021 */ addu $v0, $s6, $v0 /* 3BC9B0 E00BEA50 30420003 */ andi $v0, $v0, 0x3 /* 3BC9B4 E00BEA54 00021080 */ sll $v0, $v0, 2 /* 3BC9B8 E00BEA58 004C1021 */ addu $v0, $v0, $t4 /* 3BC9BC E00BEA5C 8C430000 */ lw $v1, 0x0($v0) /* 3BC9C0 E00BEA60 24820020 */ addiu $v0, $a0, 0x20 /* 3BC9C4 E00BEA64 AE220000 */ sw $v0, 0x0($s1) /* 3BC9C8 E00BEA68 24020040 */ addiu $v0, $zero, 0x40 /* 3BC9CC E00BEA6C AC8A0018 */ sw $t2, 0x18($a0) /* 3BC9D0 E00BEA70 AC82001C */ sw $v0, 0x1C($a0) /* 3BC9D4 E00BEA74 AC830014 */ sw $v1, 0x14($a0) /* 3BC9D8 E00BEA78 8FAC00C0 */ lw $t4, 0xC0($sp) /* 3BC9DC E00BEA7C 8D820008 */ lw $v0, 0x8($t4) /* 3BC9E0 E00BEA80 26D60001 */ addiu $s6, $s6, 0x1 /* 3BC9E4 E00BEA84 02C2102A */ slt $v0, $s6, $v0 /* 3BC9E8 E00BEA88 1440FF4B */ bnez $v0, .LE00BE7B8 /* 3BC9EC E00BEA8C 26100038 */ addiu $s0, $s0, 0x38 .LE00BEA90: /* 3BC9F0 E00BEA90 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3BC9F4 E00BEA94 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3BC9F8 E00BEA98 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3BC9FC E00BEA9C 8C620000 */ lw $v0, 0x0($v1) /* 3BCA00 E00BEAA0 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3BCA04 E00BEAA4 0040202D */ daddu $a0, $v0, $zero /* 3BCA08 E00BEAA8 24420008 */ addiu $v0, $v0, 0x8 /* 3BCA0C E00BEAAC AC620000 */ sw $v0, 0x0($v1) /* 3BCA10 E00BEAB0 24020040 */ addiu $v0, $zero, 0x40 /* 3BCA14 E00BEAB4 AC850000 */ sw $a1, 0x0($a0) /* 3BCA18 E00BEAB8 AC820004 */ sw $v0, 0x4($a0) /* 3BCA1C E00BEABC 8FBF00BC */ lw $ra, 0xBC($sp) /* 3BCA20 E00BEAC0 8FBE00B8 */ lw $fp, 0xB8($sp) /* 3BCA24 E00BEAC4 8FB700B4 */ lw $s7, 0xB4($sp) /* 3BCA28 E00BEAC8 8FB600B0 */ lw $s6, 0xB0($sp) /* 3BCA2C E00BEACC 8FB500AC */ lw $s5, 0xAC($sp) /* 3BCA30 E00BEAD0 8FB400A8 */ lw $s4, 0xA8($sp) /* 3BCA34 E00BEAD4 8FB300A4 */ lw $s3, 0xA4($sp) /* 3BCA38 E00BEAD8 8FB200A0 */ lw $s2, 0xA0($sp) /* 3BCA3C E00BEADC 8FB1009C */ lw $s1, 0x9C($sp) /* 3BCA40 E00BEAE0 8FB00098 */ lw $s0, 0x98($sp) /* 3BCA44 E00BEAE4 03E00008 */ jr $ra /* 3BCA48 E00BEAE8 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 3BCA4C E00BEAEC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void water_splash_appendGfx(void* effect) { Matrix4f sp10; Matrix4f sp50; WaterSplashFXData* data = ((EffectInstance*)effect)->data.waterSplash; s32 sp90 = data->unk_30; s32 sp94 = data->unk_04.x; s32 temp_fp = data->unk_04.y; Camera* currentCamera = &gCameras[gCurrentCameraID]; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, OS_K0_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp10, sp94, temp_fp, data->unk_04.z); shim_guScaleF(sp50, data->unk_34, data->unk_34, data->unk_34); 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++, currentCamera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000100_3BCB90); data++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) { s32 temp_t2 = (s32)data->unk_04.x + sp94; s32 temp_t3 = (s32)data->unk_04.y + temp_fp; if (temp_t2 < 0) { temp_t2 = -(temp_t2 & 0x7F); } else { temp_t2 = temp_t2 & 0x7F; } if (temp_t3 > 0) { temp_t3 = -(temp_t3 & 0x3F); } else { temp_t3 = temp_t3 & 0x3F; } gDPLoadMultiTile(gMainGfxPos++, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr), 0x100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, temp_t2 + 0xA0, temp_t3 + 0x78, temp_t2 + 0xBF, temp_t3 + 0x97, 0, G_TX_WRAP, G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); shim_guTranslateF(sp10, data->unk_04.x, data->unk_04.y, data->unk_04.z); shim_guScaleF(sp50, data->unk_34, data->unk_34, data->unk_34); shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 200, 255, 255, (sp90 * data->unk_30) / 255); gDPSetEnvColor(gMainGfxPos++, 0, 32, 32, 0); gSPDisplayList(gMainGfxPos++, D_E00BEAF0[(i + (gGameStatusPtr->frameCounter / 2)) & 3]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E00AC2A4 /* 3AF0C4 E00AC2A4 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 3AF0C8 E00AC2A8 0080482D */ daddu $t1, $a0, $zero /* 3AF0CC E00AC2AC AFBF00C4 */ sw $ra, 0xC4($sp) /* 3AF0D0 E00AC2B0 AFBE00C0 */ sw $fp, 0xC0($sp) /* 3AF0D4 E00AC2B4 AFB700BC */ sw $s7, 0xBC($sp) /* 3AF0D8 E00AC2B8 AFB600B8 */ sw $s6, 0xB8($sp) /* 3AF0DC E00AC2BC AFB500B4 */ sw $s5, 0xB4($sp) /* 3AF0E0 E00AC2C0 AFB400B0 */ sw $s4, 0xB0($sp) /* 3AF0E4 E00AC2C4 AFB300AC */ sw $s3, 0xAC($sp) /* 3AF0E8 E00AC2C8 AFB200A8 */ sw $s2, 0xA8($sp) /* 3AF0EC E00AC2CC AFB100A4 */ sw $s1, 0xA4($sp) /* 3AF0F0 E00AC2D0 AFB000A0 */ sw $s0, 0xA0($sp) /* 3AF0F4 E00AC2D4 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 3AF0F8 E00AC2D8 8D34000C */ lw $s4, 0xC($t1) /* 3AF0FC E00AC2DC 44801000 */ mtc1 $zero, $f2 /* 3AF100 E00AC2E0 C6800028 */ lwc1 $f0, 0x28($s4) /* 3AF104 E00AC2E4 8E9E001C */ lw $fp, 0x1C($s4) /* 3AF108 E00AC2E8 8E970020 */ lw $s7, 0x20($s4) /* 3AF10C E00AC2EC 46020032 */ c.eq.s $f0, $f2 /* 3AF110 E00AC2F0 00000000 */ nop /* 3AF114 E00AC2F4 4501011F */ bc1t .LE00AC774 /* 3AF118 E00AC2F8 00000000 */ nop /* 3AF11C E00AC2FC C680002C */ lwc1 $f0, 0x2C($s4) /* 3AF120 E00AC300 46020032 */ c.eq.s $f0, $f2 /* 3AF124 E00AC304 00000000 */ nop /* 3AF128 E00AC308 4501011A */ bc1t .LE00AC774 /* 3AF12C E00AC30C 3C08DB06 */ lui $t0, (0xDB060024 >> 16) /* 3AF130 E00AC310 35080024 */ ori $t0, $t0, (0xDB060024 & 0xFFFF) /* 3AF134 E00AC314 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3AF138 E00AC318 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3AF13C E00AC31C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3AF140 E00AC320 8E660000 */ lw $a2, 0x0($s3) /* 3AF144 E00AC324 44051000 */ mfc1 $a1, $f2 /* 3AF148 E00AC328 00C0182D */ daddu $v1, $a2, $zero /* 3AF14C E00AC32C 24C60008 */ addiu $a2, $a2, 0x8 /* 3AF150 E00AC330 AC620000 */ sw $v0, 0x0($v1) /* 3AF154 E00AC334 AC600004 */ sw $zero, 0x4($v1) /* 3AF158 E00AC338 ACC80000 */ sw $t0, 0x0($a2) /* 3AF15C E00AC33C 8D220010 */ lw $v0, 0x10($t1) /* 3AF160 E00AC340 3C088000 */ lui $t0, (0x80000000 >> 16) /* 3AF164 E00AC344 8C42001C */ lw $v0, 0x1C($v0) /* 3AF168 E00AC348 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3AF16C E00AC34C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3AF170 E00AC350 00481021 */ addu $v0, $v0, $t0 /* 3AF174 E00AC354 ACC20004 */ sw $v0, 0x4($a2) /* 3AF178 E00AC358 00031080 */ sll $v0, $v1, 2 /* 3AF17C E00AC35C 00431021 */ addu $v0, $v0, $v1 /* 3AF180 E00AC360 00021080 */ sll $v0, $v0, 2 /* 3AF184 E00AC364 00431023 */ subu $v0, $v0, $v1 /* 3AF188 E00AC368 000218C0 */ sll $v1, $v0, 3 /* 3AF18C E00AC36C 00431021 */ addu $v0, $v0, $v1 /* 3AF190 E00AC370 000210C0 */ sll $v0, $v0, 3 /* 3AF194 E00AC374 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3AF198 E00AC378 00220821 */ addu $at, $at, $v0 /* 3AF19C E00AC37C C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 3AF1A0 E00AC380 C6800010 */ lwc1 $f0, 0x10($s4) /* 3AF1A4 E00AC384 27A40020 */ addiu $a0, $sp, 0x20 /* 3AF1A8 E00AC388 E7A00010 */ swc1 $f0, 0x10($sp) /* 3AF1AC E00AC38C C6800004 */ lwc1 $f0, 0x4($s4) /* 3AF1B0 E00AC390 3C120001 */ lui $s2, (0x11630 >> 16) /* 3AF1B4 E00AC394 AE660000 */ sw $a2, 0x0($s3) /* 3AF1B8 E00AC398 24C60008 */ addiu $a2, $a2, 0x8 /* 3AF1BC E00AC39C E7A00014 */ swc1 $f0, 0x14($sp) /* 3AF1C0 E00AC3A0 C6800008 */ lwc1 $f0, 0x8($s4) /* 3AF1C4 E00AC3A4 46001087 */ neg.s $f2, $f2 /* 3AF1C8 E00AC3A8 AE660000 */ sw $a2, 0x0($s3) /* 3AF1CC E00AC3AC 44061000 */ mfc1 $a2, $f2 /* 3AF1D0 E00AC3B0 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3AF1D4 E00AC3B4 E7A00018 */ swc1 $f0, 0x18($sp) /* 3AF1D8 E00AC3B8 C680000C */ lwc1 $f0, 0xC($s4) /* 3AF1DC E00AC3BC 00A0382D */ daddu $a3, $a1, $zero /* 3AF1E0 E00AC3C0 0C080180 */ jal shim_guPositionF /* 3AF1E4 E00AC3C4 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3AF1E8 E00AC3C8 27A40020 */ addiu $a0, $sp, 0x20 /* 3AF1EC E00AC3CC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3AF1F0 E00AC3D0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3AF1F4 E00AC3D4 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3AF1F8 E00AC3D8 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3AF1FC E00AC3DC 96050000 */ lhu $a1, 0x0($s0) /* 3AF200 E00AC3E0 8E220000 */ lw $v0, 0x0($s1) /* 3AF204 E00AC3E4 00052980 */ sll $a1, $a1, 6 /* 3AF208 E00AC3E8 00B22821 */ addu $a1, $a1, $s2 /* 3AF20C E00AC3EC 0C080118 */ jal shim_guMtxF2L /* 3AF210 E00AC3F0 00452821 */ addu $a1, $v0, $a1 /* 3AF214 E00AC3F4 8E670000 */ lw $a3, 0x0($s3) /* 3AF218 E00AC3F8 00E0202D */ daddu $a0, $a3, $zero /* 3AF21C E00AC3FC 24E70008 */ addiu $a3, $a3, 0x8 /* 3AF220 E00AC400 AE670000 */ sw $a3, 0x0($s3) /* 3AF224 E00AC404 96020000 */ lhu $v0, 0x0($s0) /* 3AF228 E00AC408 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3AF22C E00AC40C AC830000 */ sw $v1, 0x0($a0) /* 3AF230 E00AC410 24430001 */ addiu $v1, $v0, 0x1 /* 3AF234 E00AC414 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3AF238 E00AC418 00021180 */ sll $v0, $v0, 6 /* 3AF23C E00AC41C A6030000 */ sh $v1, 0x0($s0) /* 3AF240 E00AC420 8E230000 */ lw $v1, 0x0($s1) /* 3AF244 E00AC424 00521021 */ addu $v0, $v0, $s2 /* 3AF248 E00AC428 00621821 */ addu $v1, $v1, $v0 /* 3AF24C E00AC42C AC830004 */ sw $v1, 0x4($a0) /* 3AF250 E00AC430 8E830024 */ lw $v1, 0x24($s4) /* 3AF254 E00AC434 240200FF */ addiu $v0, $zero, 0xFF /* 3AF258 E00AC438 54620011 */ bnel $v1, $v0, .LE00AC480 /* 3AF25C E00AC43C 3C05E200 */ lui $a1, (0xE200001C >> 16) /* 3AF260 E00AC440 3C04E200 */ lui $a0, (0xE200001C >> 16) /* 3AF264 E00AC444 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 3AF268 E00AC448 3C030055 */ lui $v1, (0x551208 >> 16) /* 3AF26C E00AC44C 34631208 */ ori $v1, $v1, (0x551208 & 0xFFFF) /* 3AF270 E00AC450 3C05FC12 */ lui $a1, (0xFC127E24 >> 16) /* 3AF274 E00AC454 34A57E24 */ ori $a1, $a1, (0xFC127E24 & 0xFFFF) /* 3AF278 E00AC458 24E20008 */ addiu $v0, $a3, 0x8 /* 3AF27C E00AC45C AE620000 */ sw $v0, 0x0($s3) /* 3AF280 E00AC460 24E20010 */ addiu $v0, $a3, 0x10 /* 3AF284 E00AC464 ACE40000 */ sw $a0, 0x0($a3) /* 3AF288 E00AC468 ACE30004 */ sw $v1, 0x4($a3) /* 3AF28C E00AC46C AE620000 */ sw $v0, 0x0($s3) /* 3AF290 E00AC470 2402F3F9 */ addiu $v0, $zero, -0xC07 /* 3AF294 E00AC474 ACE50008 */ sw $a1, 0x8($a3) /* 3AF298 E00AC478 0802B12F */ j .LE00AC4BC /* 3AF29C E00AC47C ACE2000C */ sw $v0, 0xC($a3) .LE00AC480: /* 3AF2A0 E00AC480 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF) /* 3AF2A4 E00AC484 3C030050 */ lui $v1, (0x504340 >> 16) /* 3AF2A8 E00AC488 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF) /* 3AF2AC E00AC48C 3C06FC12 */ lui $a2, (0xFC123224 >> 16) /* 3AF2B0 E00AC490 34C63224 */ ori $a2, $a2, (0xFC123224 & 0xFFFF) /* 3AF2B4 E00AC494 3C04FF67 */ lui $a0, (0xFF67FFFF >> 16) /* 3AF2B8 E00AC498 3484FFFF */ ori $a0, $a0, (0xFF67FFFF & 0xFFFF) /* 3AF2BC E00AC49C 24E20008 */ addiu $v0, $a3, 0x8 /* 3AF2C0 E00AC4A0 AE620000 */ sw $v0, 0x0($s3) /* 3AF2C4 E00AC4A4 24E20010 */ addiu $v0, $a3, 0x10 /* 3AF2C8 E00AC4A8 ACE50000 */ sw $a1, 0x0($a3) /* 3AF2CC E00AC4AC ACE30004 */ sw $v1, 0x4($a3) /* 3AF2D0 E00AC4B0 AE620000 */ sw $v0, 0x0($s3) /* 3AF2D4 E00AC4B4 ACE60008 */ sw $a2, 0x8($a3) /* 3AF2D8 E00AC4B8 ACE4000C */ sw $a0, 0xC($a3) .LE00AC4BC: /* 3AF2DC E00AC4BC 27A40020 */ addiu $a0, $sp, 0x20 /* 3AF2E0 E00AC4C0 3C120001 */ lui $s2, (0x11630 >> 16) /* 3AF2E4 E00AC4C4 4480A000 */ mtc1 $zero, $f20 /* 3AF2E8 E00AC4C8 8E860040 */ lw $a2, 0x40($s4) /* 3AF2EC E00AC4CC 4405A000 */ mfc1 $a1, $f20 /* 3AF2F0 E00AC4D0 4407A000 */ mfc1 $a3, $f20 /* 3AF2F4 E00AC4D4 0C080108 */ jal shim_guTranslateF /* 3AF2F8 E00AC4D8 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3AF2FC E00AC4DC 27B00060 */ addiu $s0, $sp, 0x60 /* 3AF300 E00AC4E0 8E850028 */ lw $a1, 0x28($s4) /* 3AF304 E00AC4E4 8E86002C */ lw $a2, 0x2C($s4) /* 3AF308 E00AC4E8 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 3AF30C E00AC4EC 0C080110 */ jal shim_guScaleF /* 3AF310 E00AC4F0 0200202D */ daddu $a0, $s0, $zero /* 3AF314 E00AC4F4 0200202D */ daddu $a0, $s0, $zero /* 3AF318 E00AC4F8 27A50020 */ addiu $a1, $sp, 0x20 /* 3AF31C E00AC4FC 0C080114 */ jal shim_guMtxCatF /* 3AF320 E00AC500 00A0302D */ daddu $a2, $a1, $zero /* 3AF324 E00AC504 27A40020 */ addiu $a0, $sp, 0x20 /* 3AF328 E00AC508 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3AF32C E00AC50C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3AF330 E00AC510 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3AF334 E00AC514 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3AF338 E00AC518 96050000 */ lhu $a1, 0x0($s0) /* 3AF33C E00AC51C 8E220000 */ lw $v0, 0x0($s1) /* 3AF340 E00AC520 00052980 */ sll $a1, $a1, 6 /* 3AF344 E00AC524 00B22821 */ addu $a1, $a1, $s2 /* 3AF348 E00AC528 0C080118 */ jal shim_guMtxF2L /* 3AF34C E00AC52C 00452821 */ addu $a1, $v0, $a1 /* 3AF350 E00AC530 3C09D838 */ lui $t1, (0xD8380002 >> 16) /* 3AF354 E00AC534 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF) /* 3AF358 E00AC538 27A40020 */ addiu $a0, $sp, 0x20 /* 3AF35C E00AC53C 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 3AF360 E00AC540 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 3AF364 E00AC544 3C13DA38 */ lui $s3, (0xDA380000 >> 16) /* 3AF368 E00AC548 3C16DE00 */ lui $s6, (0xDE000000 >> 16) /* 3AF36C E00AC54C 8EA80000 */ lw $t0, 0x0($s5) /* 3AF370 E00AC550 4405A000 */ mfc1 $a1, $f20 /* 3AF374 E00AC554 0100302D */ daddu $a2, $t0, $zero /* 3AF378 E00AC558 25080008 */ addiu $t0, $t0, 0x8 /* 3AF37C E00AC55C AEA80000 */ sw $t0, 0x0($s5) /* 3AF380 E00AC560 96020000 */ lhu $v0, 0x0($s0) /* 3AF384 E00AC564 00A0382D */ daddu $a3, $a1, $zero /* 3AF388 E00AC568 ACD30000 */ sw $s3, 0x0($a2) /* 3AF38C E00AC56C 24430001 */ addiu $v1, $v0, 0x1 /* 3AF390 E00AC570 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3AF394 E00AC574 00021180 */ sll $v0, $v0, 6 /* 3AF398 E00AC578 A6030000 */ sh $v1, 0x0($s0) /* 3AF39C E00AC57C 8E230000 */ lw $v1, 0x0($s1) /* 3AF3A0 E00AC580 00521021 */ addu $v0, $v0, $s2 /* 3AF3A4 E00AC584 00621821 */ addu $v1, $v1, $v0 /* 3AF3A8 E00AC588 25020008 */ addiu $v0, $t0, 0x8 /* 3AF3AC E00AC58C ACC30004 */ sw $v1, 0x4($a2) /* 3AF3B0 E00AC590 AEA20000 */ sw $v0, 0x0($s5) /* 3AF3B4 E00AC594 25020010 */ addiu $v0, $t0, 0x10 /* 3AF3B8 E00AC598 001E3080 */ sll $a2, $fp, 2 /* 3AF3BC E00AC59C AD160000 */ sw $s6, 0x0($t0) /* 3AF3C0 E00AC5A0 AEA20000 */ sw $v0, 0x0($s5) /* 3AF3C4 E00AC5A4 3C03E00B */ lui $v1, (0xE00B0000 >> 16) /* 3AF3C8 E00AC5A8 00661821 */ addu $v1, $v1, $a2 /* 3AF3CC E00AC5AC 8C63C7B0 */ lw $v1, -0x3850($v1) /* 3AF3D0 E00AC5B0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3AF3D4 E00AC5B4 AD020008 */ sw $v0, 0x8($t0) /* 3AF3D8 E00AC5B8 AD030004 */ sw $v1, 0x4($t0) /* 3AF3DC E00AC5BC 92830027 */ lbu $v1, 0x27($s4) /* 3AF3E0 E00AC5C0 25020018 */ addiu $v0, $t0, 0x18 /* 3AF3E4 E00AC5C4 AEA20000 */ sw $v0, 0x0($s5) /* 3AF3E8 E00AC5C8 AD160010 */ sw $s6, 0x10($t0) /* 3AF3EC E00AC5CC AD03000C */ sw $v1, 0xC($t0) /* 3AF3F0 E00AC5D0 3C03E00B */ lui $v1, (0xE00B0000 >> 16) /* 3AF3F4 E00AC5D4 00661821 */ addu $v1, $v1, $a2 /* 3AF3F8 E00AC5D8 8C63C7BC */ lw $v1, -0x3844($v1) /* 3AF3FC E00AC5DC 25020020 */ addiu $v0, $t0, 0x20 /* 3AF400 E00AC5E0 AEA20000 */ sw $v0, 0x0($s5) /* 3AF404 E00AC5E4 24020040 */ addiu $v0, $zero, 0x40 /* 3AF408 E00AC5E8 AD02001C */ sw $v0, 0x1C($t0) /* 3AF40C E00AC5EC 3C020900 */ lui $v0, %hi(D_090028E0_40FB70) /* 3AF410 E00AC5F0 244228E0 */ addiu $v0, $v0, %lo(D_090028E0_40FB70) /* 3AF414 E00AC5F4 AD090018 */ sw $t1, 0x18($t0) /* 3AF418 E00AC5F8 AD160020 */ sw $s6, 0x20($t0) /* 3AF41C E00AC5FC AD020024 */ sw $v0, 0x24($t0) /* 3AF420 E00AC600 AD030014 */ sw $v1, 0x14($t0) /* 3AF424 E00AC604 8E86003C */ lw $a2, 0x3C($s4) /* 3AF428 E00AC608 25080028 */ addiu $t0, $t0, 0x28 /* 3AF42C E00AC60C 0C080108 */ jal shim_guTranslateF /* 3AF430 E00AC610 AEA80000 */ sw $t0, 0x0($s5) /* 3AF434 E00AC614 27A40020 */ addiu $a0, $sp, 0x20 /* 3AF438 E00AC618 96050000 */ lhu $a1, 0x0($s0) /* 3AF43C E00AC61C 8E220000 */ lw $v0, 0x0($s1) /* 3AF440 E00AC620 00052980 */ sll $a1, $a1, 6 /* 3AF444 E00AC624 00B22821 */ addu $a1, $a1, $s2 /* 3AF448 E00AC628 0C080118 */ jal shim_guMtxF2L /* 3AF44C E00AC62C 00452821 */ addu $a1, $v0, $a1 /* 3AF450 E00AC630 02E0302D */ daddu $a2, $s7, $zero /* 3AF454 E00AC634 8EA50000 */ lw $a1, 0x0($s5) /* 3AF458 E00AC638 96020000 */ lhu $v0, 0x0($s0) /* 3AF45C E00AC63C 00A0202D */ daddu $a0, $a1, $zero /* 3AF460 E00AC640 24A50008 */ addiu $a1, $a1, 0x8 /* 3AF464 E00AC644 24430001 */ addiu $v1, $v0, 0x1 /* 3AF468 E00AC648 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3AF46C E00AC64C 00021180 */ sll $v0, $v0, 6 /* 3AF470 E00AC650 AEA50000 */ sw $a1, 0x0($s5) /* 3AF474 E00AC654 AC930000 */ sw $s3, 0x0($a0) /* 3AF478 E00AC658 A6030000 */ sh $v1, 0x0($s0) /* 3AF47C E00AC65C 8E230000 */ lw $v1, 0x0($s1) /* 3AF480 E00AC660 00521021 */ addu $v0, $v0, $s2 /* 3AF484 E00AC664 00621821 */ addu $v1, $v1, $v0 /* 3AF488 E00AC668 06E10002 */ bgez $s7, .LE00AC674 /* 3AF48C E00AC66C AC830004 */ sw $v1, 0x4($a0) /* 3AF490 E00AC670 00173023 */ negu $a2, $s7 .LE00AC674: /* 3AF494 E00AC674 3C026666 */ lui $v0, (0x66666667 >> 16) /* 3AF498 E00AC678 34426667 */ ori $v0, $v0, (0x66666667 & 0xFFFF) /* 3AF49C E00AC67C 00C20018 */ mult $a2, $v0 /* 3AF4A0 E00AC680 24A20008 */ addiu $v0, $a1, 0x8 /* 3AF4A4 E00AC684 AEA20000 */ sw $v0, 0x0($s5) /* 3AF4A8 E00AC688 000617C3 */ sra $v0, $a2, 31 /* 3AF4AC E00AC68C ACB60000 */ sw $s6, 0x0($a1) /* 3AF4B0 E00AC690 00005010 */ mfhi $t2 /* 3AF4B4 E00AC694 000A1883 */ sra $v1, $t2, 2 /* 3AF4B8 E00AC698 00621823 */ subu $v1, $v1, $v0 /* 3AF4BC E00AC69C 00031080 */ sll $v0, $v1, 2 /* 3AF4C0 E00AC6A0 00431021 */ addu $v0, $v0, $v1 /* 3AF4C4 E00AC6A4 00021040 */ sll $v0, $v0, 1 /* 3AF4C8 E00AC6A8 00C21023 */ subu $v0, $a2, $v0 /* 3AF4CC E00AC6AC 00021080 */ sll $v0, $v0, 2 /* 3AF4D0 E00AC6B0 3C03E00B */ lui $v1, (0xE00B0000 >> 16) /* 3AF4D4 E00AC6B4 00621821 */ addu $v1, $v1, $v0 /* 3AF4D8 E00AC6B8 8C63C7C8 */ lw $v1, -0x3838($v1) /* 3AF4DC E00AC6BC 24A20010 */ addiu $v0, $a1, 0x10 /* 3AF4E0 E00AC6C0 AEA20000 */ sw $v0, 0x0($s5) /* 3AF4E4 E00AC6C4 3C020900 */ lui $v0, %hi(D_090028C0_40FB50) /* 3AF4E8 E00AC6C8 244228C0 */ addiu $v0, $v0, %lo(D_090028C0_40FB50) /* 3AF4EC E00AC6CC ACA2000C */ sw $v0, 0xC($a1) /* 3AF4F0 E00AC6D0 3C02E00B */ lui $v0, %hi(D_E00AC7C8) /* 3AF4F4 E00AC6D4 2442C7C8 */ addiu $v0, $v0, %lo(D_E00AC7C8) /* 3AF4F8 E00AC6D8 ACB60008 */ sw $s6, 0x8($a1) /* 3AF4FC E00AC6DC 06E00005 */ bltz $s7, .LE00AC6F4 /* 3AF500 E00AC6E0 ACA30004 */ sw $v1, 0x4($a1) /* 3AF504 E00AC6E4 ACB60010 */ sw $s6, 0x10($a1) /* 3AF508 E00AC6E8 8C43002C */ lw $v1, 0x2C($v0) /* 3AF50C E00AC6EC 0802B1C0 */ j .LE00AC700 /* 3AF510 E00AC6F0 24A20018 */ addiu $v0, $a1, 0x18 .LE00AC6F4: /* 3AF514 E00AC6F4 ACB60010 */ sw $s6, 0x10($a1) /* 3AF518 E00AC6F8 8C430028 */ lw $v1, 0x28($v0) /* 3AF51C E00AC6FC 24A20018 */ addiu $v0, $a1, 0x18 .LE00AC700: /* 3AF520 E00AC700 AEA20000 */ sw $v0, 0x0($s5) /* 3AF524 E00AC704 ACA30014 */ sw $v1, 0x14($a1) /* 3AF528 E00AC708 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3AF52C E00AC70C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3AF530 E00AC710 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3AF534 E00AC714 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3AF538 E00AC718 8C830000 */ lw $v1, 0x0($a0) /* 3AF53C E00AC71C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3AF540 E00AC720 0060282D */ daddu $a1, $v1, $zero /* 3AF544 E00AC724 24630008 */ addiu $v1, $v1, 0x8 /* 3AF548 E00AC728 AC830000 */ sw $v1, 0x0($a0) /* 3AF54C E00AC72C ACA20000 */ sw $v0, 0x0($a1) /* 3AF550 E00AC730 3C020900 */ lui $v0, %hi(D_090028A0_40FB30) /* 3AF554 E00AC734 244228A0 */ addiu $v0, $v0, %lo(D_090028A0_40FB30) /* 3AF558 E00AC738 ACA20004 */ sw $v0, 0x4($a1) /* 3AF55C E00AC73C 24620008 */ addiu $v0, $v1, 0x8 /* 3AF560 E00AC740 24050040 */ addiu $a1, $zero, 0x40 /* 3AF564 E00AC744 AC820000 */ sw $v0, 0x0($a0) /* 3AF568 E00AC748 24620010 */ addiu $v0, $v1, 0x10 /* 3AF56C E00AC74C AC660000 */ sw $a2, 0x0($v1) /* 3AF570 E00AC750 AC650004 */ sw $a1, 0x4($v1) /* 3AF574 E00AC754 AC820000 */ sw $v0, 0x0($a0) /* 3AF578 E00AC758 24620018 */ addiu $v0, $v1, 0x18 /* 3AF57C E00AC75C AC660008 */ sw $a2, 0x8($v1) /* 3AF580 E00AC760 AC65000C */ sw $a1, 0xC($v1) /* 3AF584 E00AC764 AC820000 */ sw $v0, 0x0($a0) /* 3AF588 E00AC768 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3AF58C E00AC76C AC620010 */ sw $v0, 0x10($v1) /* 3AF590 E00AC770 AC600014 */ sw $zero, 0x14($v1) .LE00AC774: /* 3AF594 E00AC774 8FBF00C4 */ lw $ra, 0xC4($sp) /* 3AF598 E00AC778 8FBE00C0 */ lw $fp, 0xC0($sp) /* 3AF59C E00AC77C 8FB700BC */ lw $s7, 0xBC($sp) /* 3AF5A0 E00AC780 8FB600B8 */ lw $s6, 0xB8($sp) /* 3AF5A4 E00AC784 8FB500B4 */ lw $s5, 0xB4($sp) /* 3AF5A8 E00AC788 8FB400B0 */ lw $s4, 0xB0($sp) /* 3AF5AC E00AC78C 8FB300AC */ lw $s3, 0xAC($sp) /* 3AF5B0 E00AC790 8FB200A8 */ lw $s2, 0xA8($sp) /* 3AF5B4 E00AC794 8FB100A4 */ lw $s1, 0xA4($sp) /* 3AF5B8 E00AC798 8FB000A0 */ lw $s0, 0xA0($sp) /* 3AF5BC E00AC79C D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 3AF5C0 E00AC7A0 03E00008 */ jr $ra /* 3AF5C4 E00AC7A4 27BD00D0 */ addiu $sp, $sp, 0xD0 /* 3AF5C8 E00AC7A8 00000000 */ nop /* 3AF5CC E00AC7AC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E00AC2A4(EffectInstance* effect) { StatChangeFXData* data = effect->data.statChange; s32 arrowType = data->arrowType; s32 arrowValue = data->arrowValue; s32 idx; Matrix4f sp20; Matrix4f sp60; if (data->scaleX != 0.0f && data->scaleY != 0.0f) { gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale, data->pos.x, data->pos.y, data->pos.z); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); if (data->unk_24 == 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); } shim_guTranslateF(sp20, 0.0f, data->unk_40, 0.0f); shim_guScaleF(sp60, data->scaleX, data->scaleY, 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); gSPDisplayList(gMainGfxPos++, D_E00AC7B0[arrowType]); gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, data->unk_24); gSPDisplayList(gMainGfxPos++, D_E00AC7BC[arrowType]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090028E0_3B1FE0); shim_guTranslateF(sp20, 0.0f, data->unk_3C, 0.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); if (arrowValue < 0) { idx = -arrowValue; } else { idx = arrowValue; } gSPDisplayList(gMainGfxPos++, D_E00AC7C8[idx % 10]); gSPDisplayList(gMainGfxPos++, D_090028C0_3B1FC0); if (arrowValue >= 0) { gSPDisplayList(gMainGfxPos++, D_E00AC7C8[11]); } else { gSPDisplayList(gMainGfxPos++, D_E00AC7C8[10]); } gSPDisplayList(gMainGfxPos++, D_090028A0_3B1FA0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_engine_init /* 2E25C 80052E5C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 2E260 80052E60 AFB60040 */ sw $s6, 0x40($sp) /* 2E264 80052E64 0080B02D */ daddu $s6, $a0, $zero /* 2E268 80052E68 24050001 */ addiu $a1, $zero, 0x1 /* 2E26C 80052E6C 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 2E270 80052E70 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 2E274 80052E74 240619E0 */ addiu $a2, $zero, 0x19E0 /* 2E278 80052E78 AFBF0044 */ sw $ra, 0x44($sp) /* 2E27C 80052E7C AFB5003C */ sw $s5, 0x3C($sp) /* 2E280 80052E80 AFB40038 */ sw $s4, 0x38($sp) /* 2E284 80052E84 AFB30034 */ sw $s3, 0x34($sp) /* 2E288 80052E88 AFB20030 */ sw $s2, 0x30($sp) /* 2E28C 80052E8C AFB1002C */ sw $s1, 0x2C($sp) /* 2E290 80052E90 AFB00028 */ sw $s0, 0x28($sp) /* 2E294 80052E94 8C550018 */ lw $s5, 0x18($v0) /* 2E298 80052E98 0000982D */ daddu $s3, $zero, $zero /* 2E29C 80052E9C 0C015FE4 */ jal alHeapAlloc /* 2E2A0 80052EA0 02A0202D */ daddu $a0, $s5, $zero /* 2E2A4 80052EA4 02A0202D */ daddu $a0, $s5, $zero /* 2E2A8 80052EA8 24050001 */ addiu $a1, $zero, 0x1 /* 2E2AC 80052EAC 24060A9C */ addiu $a2, $zero, 0xA9C /* 2E2B0 80052EB0 3C12800A */ lui $s2, %hi(gSoundGlobals) /* 2E2B4 80052EB4 2652A5C0 */ addiu $s2, $s2, %lo(gSoundGlobals) /* 2E2B8 80052EB8 0C015FE4 */ jal alHeapAlloc /* 2E2BC 80052EBC AE420000 */ sw $v0, 0x0($s2) /* 2E2C0 80052EC0 02A0202D */ daddu $a0, $s5, $zero /* 2E2C4 80052EC4 24050001 */ addiu $a1, $zero, 0x1 /* 2E2C8 80052EC8 24060A9C */ addiu $a2, $zero, 0xA9C /* 2E2CC 80052ECC 3C11800A */ lui $s1, %hi(gBGMPlayerA) /* 2E2D0 80052ED0 2631A664 */ addiu $s1, $s1, %lo(gBGMPlayerA) /* 2E2D4 80052ED4 0C015FE4 */ jal alHeapAlloc /* 2E2D8 80052ED8 AE220000 */ sw $v0, 0x0($s1) /* 2E2DC 80052EDC 02A0202D */ daddu $a0, $s5, $zero /* 2E2E0 80052EE0 24050001 */ addiu $a1, $zero, 0x1 /* 2E2E4 80052EE4 3C01800A */ lui $at, %hi(gBGMPlayerB) /* 2E2E8 80052EE8 AC22A5FC */ sw $v0, %lo(gBGMPlayerB)($at) /* 2E2EC 80052EEC 0C015FE4 */ jal alHeapAlloc /* 2E2F0 80052EF0 24060A9C */ addiu $a2, $zero, 0xA9C /* 2E2F4 80052EF4 02A0202D */ daddu $a0, $s5, $zero /* 2E2F8 80052EF8 24050001 */ addiu $a1, $zero, 0x1 /* 2E2FC 80052EFC 3C01800A */ lui $at, %hi(gBGMPlayerC) /* 2E300 80052F00 AC22A5CC */ sw $v0, %lo(gBGMPlayerC)($at) /* 2E304 80052F04 0C015FE4 */ jal alHeapAlloc /* 2E308 80052F08 240606CC */ addiu $a2, $zero, 0x6CC /* 2E30C 80052F0C 02A0202D */ daddu $a0, $s5, $zero /* 2E310 80052F10 24050001 */ addiu $a1, $zero, 0x1 /* 2E314 80052F14 24060834 */ addiu $a2, $zero, 0x834 /* 2E318 80052F18 3C10800A */ lui $s0, %hi(gSoundManager) /* 2E31C 80052F1C 2610A640 */ addiu $s0, $s0, %lo(gSoundManager) /* 2E320 80052F20 0C015FE4 */ jal alHeapAlloc /* 2E324 80052F24 AE020000 */ sw $v0, 0x0($s0) /* 2E328 80052F28 02A0202D */ daddu $a0, $s5, $zero /* 2E32C 80052F2C 24050001 */ addiu $a1, $zero, 0x1 /* 2E330 80052F30 8E280000 */ lw $t0, 0x0($s1) /* 2E334 80052F34 8E070000 */ lw $a3, 0x0($s0) /* 2E338 80052F38 8E430000 */ lw $v1, 0x0($s2) /* 2E33C 80052F3C 34068000 */ ori $a2, $zero, 0x8000 /* 2E340 80052F40 3C01800A */ lui $at, %hi(gAuAmbienceManager) /* 2E344 80052F44 AC22A628 */ sw $v0, %lo(gAuAmbienceManager)($at) /* 2E348 80052F48 0060A02D */ daddu $s4, $v1, $zero /* 2E34C 80052F4C AD070004 */ sw $a3, 0x4($t0) /* 2E350 80052F50 0C015FE4 */ jal alHeapAlloc /* 2E354 80052F54 AC430000 */ sw $v1, 0x0($v0) /* 2E358 80052F58 0280802D */ daddu $s0, $s4, $zero /* 2E35C 80052F5C 24435000 */ addiu $v1, $v0, 0x5000 /* 2E360 80052F60 AE82005C */ sw $v0, 0x5C($s4) /* 2E364 80052F64 24427000 */ addiu $v0, $v0, 0x7000 /* 2E368 80052F68 AE830060 */ sw $v1, 0x60($s4) /* 2E36C 80052F6C AE820064 */ sw $v0, 0x64($s4) /* 2E370 80052F70 AE830068 */ sw $v1, 0x68($s4) .L80052F74: /* 2E374 80052F74 02A0202D */ daddu $a0, $s5, $zero /* 2E378 80052F78 24050001 */ addiu $a1, $zero, 0x1 /* 2E37C 80052F7C 0C015FE4 */ jal alHeapAlloc /* 2E380 80052F80 24060A9C */ addiu $a2, $zero, 0xA9C /* 2E384 80052F84 AE02006C */ sw $v0, 0x6C($s0) /* 2E388 80052F88 26730001 */ addiu $s3, $s3, 0x1 /* 2E38C 80052F8C 1260FFF9 */ beqz $s3, .L80052F74 /* 2E390 80052F90 26100008 */ addiu $s0, $s0, 0x8 /* 2E394 80052F94 02A0202D */ daddu $a0, $s5, $zero /* 2E398 80052F98 24050001 */ addiu $a1, $zero, 0x1 /* 2E39C 80052F9C 0C015FE4 */ jal alHeapAlloc /* 2E3A0 80052FA0 24065200 */ addiu $a2, $zero, 0x5200 /* 2E3A4 80052FA4 02A0202D */ daddu $a0, $s5, $zero /* 2E3A8 80052FA8 24050001 */ addiu $a1, $zero, 0x1 /* 2E3AC 80052FAC 24060030 */ addiu $a2, $zero, 0x30 /* 2E3B0 80052FB0 0C015FE4 */ jal alHeapAlloc /* 2E3B4 80052FB4 AE8200A0 */ sw $v0, 0xA0($s4) /* 2E3B8 80052FB8 02A0202D */ daddu $a0, $s5, $zero /* 2E3BC 80052FBC 24050001 */ addiu $a1, $zero, 0x1 /* 2E3C0 80052FC0 24060360 */ addiu $a2, $zero, 0x360 /* 2E3C4 80052FC4 0C015FE4 */ jal alHeapAlloc /* 2E3C8 80052FC8 AE820004 */ sw $v0, 0x4($s4) /* 2E3CC 80052FCC 02A0202D */ daddu $a0, $s5, $zero /* 2E3D0 80052FD0 24050001 */ addiu $a1, $zero, 0x1 /* 2E3D4 80052FD4 24060200 */ addiu $a2, $zero, 0x200 /* 2E3D8 80052FD8 0C015FE4 */ jal alHeapAlloc /* 2E3DC 80052FDC AE820054 */ sw $v0, 0x54($s4) /* 2E3E0 80052FE0 02A0202D */ daddu $a0, $s5, $zero /* 2E3E4 80052FE4 24050001 */ addiu $a1, $zero, 0x1 /* 2E3E8 80052FE8 24060040 */ addiu $a2, $zero, 0x40 /* 2E3EC 80052FEC 0C015FE4 */ jal alHeapAlloc /* 2E3F0 80052FF0 AE820058 */ sw $v0, 0x58($s4) /* 2E3F4 80052FF4 0000982D */ daddu $s3, $zero, $zero /* 2E3F8 80052FF8 8E840004 */ lw $a0, 0x4($s4) /* 2E3FC 80052FFC 44960000 */ mtc1 $s6, $f0 /* 2E400 80053000 00000000 */ nop /* 2E404 80053004 46800020 */ cvt.s.w $f0, $f0 /* 2E408 80053008 AE820094 */ sw $v0, 0x94($s4) /* 2E40C 8005300C 0C014CBD */ jal au_reset_instrument /* 2E410 80053010 E6800000 */ swc1 $f0, 0x0($s4) /* 2E414 80053014 0C014CDC */ jal au_reset_drum_entry /* 2E418 80053018 26840008 */ addiu $a0, $s4, 0x8 /* 2E41C 8005301C 0C014CEA */ jal au_reset_instrument_entry /* 2E420 80053020 26840014 */ addiu $a0, $s4, 0x14 /* 2E424 80053024 0C015843 */ jal func_8005610C /* 2E428 80053028 00000000 */ nop /* 2E42C 8005302C 0280102D */ daddu $v0, $s4, $zero /* 2E430 80053030 AE8000A4 */ sw $zero, 0xA4($s4) /* 2E434 80053034 AE8000A8 */ sw $zero, 0xA8($s4) .L80053038: /* 2E438 80053038 A0400070 */ sb $zero, 0x70($v0) /* 2E43C 8005303C A0400071 */ sb $zero, 0x71($v0) /* 2E440 80053040 26730001 */ addiu $s3, $s3, 0x1 /* 2E444 80053044 1260FFFC */ beqz $s3, .L80053038 /* 2E448 80053048 24420008 */ addiu $v0, $v0, 0x8 /* 2E44C 8005304C 0000982D */ daddu $s3, $zero, $zero /* 2E450 80053050 0280182D */ daddu $v1, $s4, $zero .L80053054: /* 2E454 80053054 A0600040 */ sb $zero, 0x40($v1) /* 2E458 80053058 A0600041 */ sb $zero, 0x41($v1) /* 2E45C 8005305C 26730001 */ addiu $s3, $s3, 0x1 /* 2E460 80053060 2E620004 */ sltiu $v0, $s3, 0x4 /* 2E464 80053064 1440FFFB */ bnez $v0, .L80053054 /* 2E468 80053068 24630004 */ addiu $v1, $v1, 0x4 /* 2E46C 8005306C 0000982D */ daddu $s3, $zero, $zero /* 2E470 80053070 2416FFFF */ addiu $s6, $zero, -0x1 /* 2E474 80053074 241200FF */ addiu $s2, $zero, 0xFF /* 2E478 80053078 24111320 */ addiu $s1, $zero, 0x1320 .L8005307C: /* 2E47C 8005307C 327000FF */ andi $s0, $s3, 0xFF /* 2E480 80053080 0200202D */ daddu $a0, $s0, $zero /* 2E484 80053084 0C015BB0 */ jal au_pvoice_set_bus /* 2E488 80053088 0000282D */ daddu $a1, $zero, $zero /* 2E48C 8005308C 0200202D */ daddu $a0, $s0, $zero /* 2E490 80053090 8E850004 */ lw $a1, 0x4($s4) /* 2E494 80053094 0C015C89 */ jal func_80057224 /* 2E498 80053098 26730001 */ addiu $s3, $s3, 0x1 /* 2E49C 8005309C 02911021 */ addu $v0, $s4, $s1 /* 2E4A0 800530A0 AC400000 */ sw $zero, 0x0($v0) /* 2E4A4 800530A4 AC400004 */ sw $zero, 0x4($v0) /* 2E4A8 800530A8 A456000C */ sh $s6, 0xC($v0) /* 2E4AC 800530AC A052000E */ sb $s2, 0xE($v0) /* 2E4B0 800530B0 A052000F */ sb $s2, 0xF($v0) /* 2E4B4 800530B4 A0400010 */ sb $zero, 0x10($v0) /* 2E4B8 800530B8 A0400042 */ sb $zero, 0x42($v0) /* 2E4BC 800530BC A0400043 */ sb $zero, 0x43($v0) /* 2E4C0 800530C0 A0400044 */ sb $zero, 0x44($v0) /* 2E4C4 800530C4 A0400045 */ sb $zero, 0x45($v0) /* 2E4C8 800530C8 2E620018 */ sltiu $v0, $s3, 0x18 /* 2E4CC 800530CC 1440FFEB */ bnez $v0, .L8005307C /* 2E4D0 800530D0 26310048 */ addiu $s1, $s1, 0x48 /* 2E4D4 800530D4 0280202D */ daddu $a0, $s4, $zero /* 2E4D8 800530D8 3C0500F0 */ lui $a1, (0xF00000 >> 16) /* 2E4DC 800530DC 0C0150AF */ jal au_load_INIT /* 2E4E0 800530E0 02A0302D */ daddu $a2, $s5, $zero /* 2E4E4 800530E4 0000982D */ daddu $s3, $zero, $zero /* 2E4E8 800530E8 0280802D */ daddu $s0, $s4, $zero .L800530EC: /* 2E4EC 800530EC 02A0202D */ daddu $a0, $s5, $zero /* 2E4F0 800530F0 24050001 */ addiu $a1, $zero, 0x1 /* 2E4F4 800530F4 0C015FE4 */ jal alHeapAlloc /* 2E4F8 800530F8 24060840 */ addiu $a2, $zero, 0x840 /* 2E4FC 800530FC AE021310 */ sw $v0, 0x1310($s0) /* 2E500 80053100 26730001 */ addiu $s3, $s3, 0x1 /* 2E504 80053104 2E620003 */ sltiu $v0, $s3, 0x3 /* 2E508 80053108 1440FFF8 */ bnez $v0, .L800530EC /* 2E50C 8005310C 26100004 */ addiu $s0, $s0, 0x4 /* 2E510 80053110 24050001 */ addiu $a1, $zero, 0x1 /* 2E514 80053114 0000302D */ daddu $a2, $zero, $zero /* 2E518 80053118 3C10800A */ lui $s0, %hi(gBGMPlayerA) /* 2E51C 8005311C 2610A664 */ addiu $s0, $s0, %lo(gBGMPlayerA) /* 2E520 80053120 8E040000 */ lw $a0, 0x0($s0) /* 2E524 80053124 0C013856 */ jal au_bgm_player_init /* 2E528 80053128 0280382D */ daddu $a3, $s4, $zero /* 2E52C 8005312C 27B20020 */ addiu $s2, $sp, 0x20 /* 2E530 80053130 0240282D */ daddu $a1, $s2, $zero /* 2E534 80053134 24020003 */ addiu $v0, $zero, 0x3 /* 2E538 80053138 8E040000 */ lw $a0, 0x0($s0) /* 2E53C 8005313C 241000FF */ addiu $s0, $zero, 0xFF /* 2E540 80053140 A3A00020 */ sb $zero, 0x20($sp) /* 2E544 80053144 A3A20021 */ sb $v0, 0x21($sp) /* 2E548 80053148 A3B00022 */ sb $s0, 0x22($sp) /* 2E54C 8005314C 0C0138D1 */ jal au_bgm_set_effect_indices /* 2E550 80053150 A3B00023 */ sb $s0, 0x23($sp) /* 2E554 80053154 24050002 */ addiu $a1, $zero, 0x2 /* 2E558 80053158 00A0302D */ daddu $a2, $a1, $zero /* 2E55C 8005315C 3C11800A */ lui $s1, %hi(gBGMPlayerB) /* 2E560 80053160 2631A5FC */ addiu $s1, $s1, %lo(gBGMPlayerB) /* 2E564 80053164 8E240000 */ lw $a0, 0x0($s1) /* 2E568 80053168 0C013856 */ jal au_bgm_player_init /* 2E56C 8005316C 0280382D */ daddu $a3, $s4, $zero /* 2E570 80053170 0240282D */ daddu $a1, $s2, $zero /* 2E574 80053174 8E240000 */ lw $a0, 0x0($s1) /* 2E578 80053178 24020002 */ addiu $v0, $zero, 0x2 /* 2E57C 8005317C A3A20020 */ sb $v0, 0x20($sp) /* 2E580 80053180 A3B00021 */ sb $s0, 0x21($sp) /* 2E584 80053184 A3B00022 */ sb $s0, 0x22($sp) /* 2E588 80053188 0C0138D1 */ jal au_bgm_set_effect_indices /* 2E58C 8005318C A3B00023 */ sb $s0, 0x23($sp) /* 2E590 80053190 24050004 */ addiu $a1, $zero, 0x4 /* 2E594 80053194 24060001 */ addiu $a2, $zero, 0x1 /* 2E598 80053198 0280382D */ daddu $a3, $s4, $zero /* 2E59C 8005319C 3C10800A */ lui $s0, %hi(gSoundManager) /* 2E5A0 800531A0 2610A640 */ addiu $s0, $s0, %lo(gSoundManager) /* 2E5A4 800531A4 8E040000 */ lw $a0, 0x0($s0) /* 2E5A8 800531A8 24020010 */ addiu $v0, $zero, 0x10 /* 2E5AC 800531AC 0C012D10 */ jal au_sfx_init /* 2E5B0 800531B0 AFA20010 */ sw $v0, 0x10($sp) /* 2E5B4 800531B4 24050006 */ addiu $a1, $zero, 0x6 /* 2E5B8 800531B8 24060001 */ addiu $a2, $zero, 0x1 /* 2E5BC 800531BC 3C04800A */ lui $a0, %hi(gAuAmbienceManager) /* 2E5C0 800531C0 8C84A628 */ lw $a0, %lo(gAuAmbienceManager)($a0) /* 2E5C4 800531C4 0C0142E4 */ jal au_amb_manager_init /* 2E5C8 800531C8 0280382D */ daddu $a3, $s4, $zero /* 2E5CC 800531CC 0C014985 */ jal au_init_voices /* 2E5D0 800531D0 0280202D */ daddu $a0, $s4, $zero /* 2E5D4 800531D4 0280202D */ daddu $a0, $s4, $zero /* 2E5D8 800531D8 0C0153F0 */ jal au_load_BK_headers /* 2E5DC 800531DC 02A0282D */ daddu $a1, $s5, $zero /* 2E5E0 800531E0 8E82003C */ lw $v0, 0x3C($s4) /* 2E5E4 800531E4 24050020 */ addiu $a1, $zero, 0x20 /* 2E5E8 800531E8 94440000 */ lhu $a0, 0x0($v0) /* 2E5EC 800531EC 0C01511F */ jal au_fetch_SBN_file /* 2E5F0 800531F0 27A60018 */ addiu $a2, $sp, 0x18 /* 2E5F4 800531F4 14400007 */ bnez $v0, .L80053214 /* 2E5F8 800531F8 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 2E5FC 800531FC 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 2E600 80053200 8FA40018 */ lw $a0, 0x18($sp) /* 2E604 80053204 8FA6001C */ lw $a2, 0x1C($sp) /* 2E608 80053208 8E8500A0 */ lw $a1, 0xA0($s4) /* 2E60C 8005320C 0C015380 */ jal au_read_rom /* 2E610 80053210 00C23024 */ and $a2, $a2, $v0 .L80053214: /* 2E614 80053214 8E040000 */ lw $a0, 0x0($s0) /* 2E618 80053218 0C012D8B */ jal au_sfx_load_groups_from_SEF /* 2E61C 8005321C 00000000 */ nop /* 2E620 80053220 8E82003C */ lw $v0, 0x3C($s4) /* 2E624 80053224 24050040 */ addiu $a1, $zero, 0x40 /* 2E628 80053228 94440002 */ lhu $a0, 0x2($v0) /* 2E62C 8005322C 0C01511F */ jal au_fetch_SBN_file /* 2E630 80053230 27A60018 */ addiu $a2, $sp, 0x18 /* 2E634 80053234 14400004 */ bnez $v0, .L80053248 /* 2E638 80053238 00000000 */ nop /* 2E63C 8005323C 8FA50018 */ lw $a1, 0x18($sp) /* 2E640 80053240 0C01513E */ jal au_load_PER /* 2E644 80053244 0280202D */ daddu $a0, $s4, $zero .L80053248: /* 2E648 80053248 8E82003C */ lw $v0, 0x3C($s4) /* 2E64C 8005324C 24050040 */ addiu $a1, $zero, 0x40 /* 2E650 80053250 94440004 */ lhu $a0, 0x4($v0) /* 2E654 80053254 0C01511F */ jal au_fetch_SBN_file /* 2E658 80053258 27A60018 */ addiu $a2, $sp, 0x18 /* 2E65C 8005325C 54400005 */ bnel $v0, $zero, .L80053274 /* 2E660 80053260 0000202D */ daddu $a0, $zero, $zero /* 2E664 80053264 8FA50018 */ lw $a1, 0x18($sp) /* 2E668 80053268 0C01516D */ jal au_load_PRG /* 2E66C 8005326C 0280202D */ daddu $a0, $s4, $zero /* 2E670 80053270 0000202D */ daddu $a0, $zero, $zero .L80053274: /* 2E674 80053274 268304EC */ addiu $v1, $s4, 0x4EC /* 2E678 80053278 268205EC */ addiu $v0, $s4, 0x5EC /* 2E67C 8005327C AE8212F0 */ sw $v0, 0x12F0($s4) /* 2E680 80053280 268200AC */ addiu $v0, $s4, 0xAC /* 2E684 80053284 AE8212F4 */ sw $v0, 0x12F4($s4) /* 2E688 80053288 268200EC */ addiu $v0, $s4, 0xEC /* 2E68C 8005328C AE8212F8 */ sw $v0, 0x12F8($s4) /* 2E690 80053290 268209EC */ addiu $v0, $s4, 0x9EC /* 2E694 80053294 AE8212FC */ sw $v0, 0x12FC($s4) /* 2E698 80053298 26820DEC */ addiu $v0, $s4, 0xDEC /* 2E69C 8005329C AE821300 */ sw $v0, 0x1300($s4) /* 2E6A0 800532A0 268211EC */ addiu $v0, $s4, 0x11EC /* 2E6A4 800532A4 AE8312EC */ sw $v1, 0x12EC($s4) /* 2E6A8 800532A8 AE821304 */ sw $v0, 0x1304($s4) /* 2E6AC 800532AC AE831308 */ sw $v1, 0x1308($s4) /* 2E6B0 800532B0 A2800053 */ sb $zero, 0x53($s4) /* 2E6B4 800532B4 A2800052 */ sb $zero, 0x52($s4) /* 2E6B8 800532B8 A2800051 */ sb $zero, 0x51($s4) /* 2E6BC 800532BC 0C015FB4 */ jal au_delay_channel /* 2E6C0 800532C0 A2800050 */ sb $zero, 0x50($s4) /* 2E6C4 800532C4 0C015414 */ jal func_80055050 /* 2E6C8 800532C8 02A0202D */ daddu $a0, $s5, $zero /* 2E6CC 800532CC 8FBF0044 */ lw $ra, 0x44($sp) /* 2E6D0 800532D0 8FB60040 */ lw $s6, 0x40($sp) /* 2E6D4 800532D4 8FB5003C */ lw $s5, 0x3C($sp) /* 2E6D8 800532D8 8FB40038 */ lw $s4, 0x38($sp) /* 2E6DC 800532DC 8FB30034 */ lw $s3, 0x34($sp) /* 2E6E0 800532E0 8FB20030 */ lw $s2, 0x30($sp) /* 2E6E4 800532E4 8FB1002C */ lw $s1, 0x2C($sp) /* 2E6E8 800532E8 8FB00028 */ lw $s0, 0x28($sp) /* 2E6EC 800532EC 03E00008 */ jr $ra /* 2E6F0 800532F0 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void au_engine_init(s32 outputRate) { AuGlobals* globals; ALHeap* alHeap; SBNFileEntry fileEntry; s32* dummyTrackData; u8 effects[4]; u32 i; alHeap = gSynDriverPtr->heap; gSoundGlobals = alHeapAlloc(alHeap, 1, sizeof(*gSoundGlobals)); gBGMPlayerA = alHeapAlloc(alHeap, 1, sizeof(*gBGMPlayerA)); gBGMPlayerB = alHeapAlloc(alHeap, 1, sizeof(*gBGMPlayerB)); gBGMPlayerC = alHeapAlloc(alHeap, 1, sizeof(*gBGMPlayerC)); gSoundManager = alHeapAlloc(alHeap, 1, sizeof(*gSoundManager)); gAuAmbienceManager = alHeapAlloc(alHeap, 1, sizeof(*gAuAmbienceManager)); gBGMPlayerA->soundManager = gSoundManager; gAuAmbienceManager->globals = gSoundGlobals; globals = gSoundGlobals; dummyTrackData = alHeapAlloc(alHeap, 1, 0x8000); globals->dataBGM[0] = (BGMHeader*) &dummyTrackData[0]; globals->dataBGM[1] = (BGMHeader*) &dummyTrackData[0x1400]; globals->dataMSEQ[0] = (MSEQHeader*) &dummyTrackData[0x1C00]; globals->dataMSEQ[1] = (MSEQHeader*) &dummyTrackData[0x1400]; for (i = 0; i < ARRAY_COUNT(globals->unk_globals_6C); i++) { globals->unk_globals_6C[i].bgmPlayer = alHeapAlloc(alHeap, 1, sizeof(BGMPlayer)); } globals->dataSEF = alHeapAlloc(alHeap, 1, 0x5200); globals->defaultInstrument = alHeapAlloc(alHeap, 1, sizeof(Instrument)); globals->dataPER = alHeapAlloc(alHeap, 1, 6 * sizeof(PEREntry)); globals->dataPRG = alHeapAlloc(alHeap, 1, 64 * sizeof(BGMInstrumentInfo)); globals->musicEventQueue = alHeapAlloc(alHeap, 1, 16 * sizeof(MusicEventTrigger)); globals->outputRate = outputRate; au_reset_instrument(globals->defaultInstrument); au_reset_drum_entry(&globals->defaultDrumEntry); au_reset_instrument_entry(&globals->defaultPRGEntry); bgm_clear_music_events(); globals->audioThreadCallbacks[0] = NULL; globals->audioThreadCallbacks[1] = NULL; for (i = 0; i < ARRAY_COUNT(globals->unk_globals_6C); i++) { globals->unk_globals_6C[i].unk_4 = 0; globals->unk_globals_6C[i].unk_5 = 0; } for (i = 0; i < 4; i++) { globals->effectChanges[i].type = AU_FX_NONE; globals->effectChanges[i].changed = FALSE; } for (i = 0; i < ARRAY_COUNT(globals->voices); i++) { AuVoice* voice; au_pvoice_set_bus(i, 0); au_syn_set_wavetable(i, globals->defaultInstrument); voice = &globals->voices[i]; voice->instrument = NULL; voice->pitchRatio = 0; voice->p_volume = -1; voice->pan = 0xFF; voice->reverb = 0xFF; voice->busId = 0; voice->stopPending = FALSE; voice->syncFlags = 0; voice->clientPriority = AU_PRIORITY_FREE; voice->priority = AU_PRIORITY_FREE; } au_load_INIT(globals, SBN_ROM_OFFSET, alHeap); for (i = 0; i < ARRAY_COUNT(globals->banks); i++) { globals->banks[i] = alHeapAlloc(alHeap, 1, 0x840); } au_bgm_player_init(gBGMPlayerA, AU_PRIORITY_BGM_PLAYER_MAIN, FX_BUS_BGMA_MAIN, globals); effects[0] = FX_BUS_BGMA_MAIN; effects[1] = FX_BUS_BGMA_AUX; effects[2] = -1; effects[3] = -1; au_bgm_set_effect_indices(gBGMPlayerA, effects); au_bgm_player_init(gBGMPlayerB, AU_PRIORITY_BGM_PLAYER_AUX, FX_BUS_BGMB, globals); effects[0] = FX_BUS_BGMB; effects[1] = -1; effects[2] = -1; effects[3] = -1; au_bgm_set_effect_indices(gBGMPlayerB, effects); au_sfx_init(gSoundManager, AU_PRIORITY_SFX_MANAGER, FX_BUS_SOUND, globals, 16); au_amb_manager_init(gAuAmbienceManager, AU_PRIORITY_MSEQ_MANAGER, FX_BUS_SOUND, globals); au_init_voices(globals); au_load_BK_headers(globals, alHeap); if (au_fetch_SBN_file(globals->mseqFileList[0], AU_FMT_SEF, &fileEntry) == AU_RESULT_OK) { au_read_rom(fileEntry.offset, globals->dataSEF, fileEntry.data & 0xFFFFFF); } au_sfx_load_groups_from_SEF(gSoundManager); if (au_fetch_SBN_file(globals->mseqFileList[1], AU_FMT_PER, &fileEntry) == AU_RESULT_OK) { au_load_PER(globals, fileEntry.offset); } if (au_fetch_SBN_file(globals->mseqFileList[2], AU_FMT_PRG, &fileEntry) == AU_RESULT_OK) { au_load_PRG(globals, fileEntry.offset); } globals->instrumentGroups[0] = globals->instrumentGroup1; globals->instrumentGroups[1] = globals->instrumentGroup2; globals->instrumentGroups[2] = globals->instrumentGroupX; globals->instrumentGroups[3] = globals->instrumentGroup3; globals->instrumentGroups[4] = globals->instrumentGroup4; globals->instrumentGroups[5] = globals->instrumentGroup5; globals->instrumentGroups[6] = globals->instrumentGroup6; globals->instrumentGroups[7] = globals->instrumentGroup1; globals->channelDelaySide = 0; globals->channelDelayTime = 0; globals->channelDelayBusId = 0; globals->channelDelayPending = 0; au_delay_channel(0); func_80055050(alHeap); }
### RAW ASSEMBLY INSTRUCTIONS: glabel execute_render_tasks /* B40B8 8011D9B8 27BDFB88 */ addiu $sp, $sp, -0x478 /* B40BC 8011D9BC 3C048015 */ lui $a0, %hi(mdl_renderTaskCount) /* B40C0 8011D9C0 248433B0 */ addiu $a0, $a0, %lo(mdl_renderTaskCount) /* B40C4 8011D9C4 AFBF0470 */ sw $ra, 0x470($sp) /* B40C8 8011D9C8 AFB7046C */ sw $s7, 0x46C($sp) /* B40CC 8011D9CC AFB60468 */ sw $s6, 0x468($sp) /* B40D0 8011D9D0 AFB50464 */ sw $s5, 0x464($sp) /* B40D4 8011D9D4 AFB40460 */ sw $s4, 0x460($sp) /* B40D8 8011D9D8 AFB3045C */ sw $s3, 0x45C($sp) /* B40DC 8011D9DC AFB20458 */ sw $s2, 0x458($sp) /* B40E0 8011D9E0 AFB10454 */ sw $s1, 0x454($sp) /* B40E4 8011D9E4 AFB00450 */ sw $s0, 0x450($sp) /* B40E8 8011D9E8 8C820000 */ lw $v0, 0x0($a0) /* B40EC 8011D9EC 10400118 */ beqz $v0, .L8011DE50 /* B40F0 8011D9F0 0000982D */ daddu $s3, $zero, $zero /* B40F4 8011D9F4 18400009 */ blez $v0, .L8011DA1C /* B40F8 8011D9F8 0260A82D */ daddu $s5, $s3, $zero /* B40FC 8011D9FC 27A30010 */ addiu $v1, $sp, 0x10 .L8011DA00: /* B4100 8011DA00 AC730000 */ sw $s3, 0x0($v1) /* B4104 8011DA04 24630004 */ addiu $v1, $v1, 0x4 /* B4108 8011DA08 8C820000 */ lw $v0, 0x0($a0) /* B410C 8011DA0C 26730001 */ addiu $s3, $s3, 0x1 /* B4110 8011DA10 0262102A */ slt $v0, $s3, $v0 /* B4114 8011DA14 1440FFFA */ bnez $v0, .L8011DA00 /* B4118 8011DA18 26B50001 */ addiu $s5, $s5, 0x1 .L8011DA1C: /* B411C 8011DA1C 3C028015 */ lui $v0, %hi(mdl_renderTaskQueueIdx) /* B4120 8011DA20 8C4233AC */ lw $v0, %lo(mdl_renderTaskQueueIdx)($v0) /* B4124 8011DA24 00021080 */ sll $v0, $v0, 2 /* B4128 8011DA28 3C148015 */ lui $s4, %hi(mdl_renderTaskLists) /* B412C 8011DA2C 0282A021 */ addu $s4, $s4, $v0 /* B4130 8011DA30 8E9433A0 */ lw $s4, %lo(mdl_renderTaskLists)($s4) /* B4134 8011DA34 26A2FFFF */ addiu $v0, $s5, -0x1 /* B4138 8011DA38 1840001F */ blez $v0, .L8011DAB8 /* B413C 8011DA3C 0000982D */ daddu $s3, $zero, $zero /* B4140 8011DA40 0040602D */ daddu $t4, $v0, $zero /* B4144 8011DA44 27AB0010 */ addiu $t3, $sp, 0x10 /* B4148 8011DA48 0160502D */ daddu $t2, $t3, $zero .L8011DA4C: /* B414C 8011DA4C 26650001 */ addiu $a1, $s3, 0x1 /* B4150 8011DA50 00B5102A */ slt $v0, $a1, $s5 /* B4154 8011DA54 50400015 */ beql $v0, $zero, .L8011DAAC /* B4158 8011DA58 26730001 */ addiu $s3, $s3, 0x1 /* B415C 8011DA5C 0140482D */ daddu $t1, $t2, $zero /* B4160 8011DA60 00051080 */ sll $v0, $a1, 2 /* B4164 8011DA64 004B3821 */ addu $a3, $v0, $t3 .L8011DA68: /* B4168 8011DA68 8D280000 */ lw $t0, 0x0($t1) /* B416C 8011DA6C 8CE60000 */ lw $a2, 0x0($a3) /* B4170 8011DA70 00081100 */ sll $v0, $t0, 4 /* B4174 8011DA74 02828021 */ addu $s0, $s4, $v0 /* B4178 8011DA78 00061100 */ sll $v0, $a2, 4 /* B417C 8011DA7C 02822021 */ addu $a0, $s4, $v0 /* B4180 8011DA80 8E030004 */ lw $v1, 0x4($s0) /* B4184 8011DA84 8C820004 */ lw $v0, 0x4($a0) /* B4188 8011DA88 0043102A */ slt $v0, $v0, $v1 /* B418C 8011DA8C 10400003 */ beqz $v0, .L8011DA9C /* B4190 8011DA90 24A50001 */ addiu $a1, $a1, 0x1 /* B4194 8011DA94 AD260000 */ sw $a2, 0x0($t1) /* B4198 8011DA98 ACE80000 */ sw $t0, 0x0($a3) .L8011DA9C: /* B419C 8011DA9C 00B5102A */ slt $v0, $a1, $s5 /* B41A0 8011DAA0 1440FFF1 */ bnez $v0, .L8011DA68 /* B41A4 8011DAA4 24E70004 */ addiu $a3, $a3, 0x4 /* B41A8 8011DAA8 26730001 */ addiu $s3, $s3, 0x1 .L8011DAAC: /* B41AC 8011DAAC 026C102A */ slt $v0, $s3, $t4 /* B41B0 8011DAB0 1440FFE6 */ bnez $v0, .L8011DA4C /* B41B4 8011DAB4 254A0004 */ addiu $t2, $t2, 0x4 .L8011DAB8: /* B41B8 8011DAB8 3C028015 */ lui $v0, %hi(mdl_renderTaskQueueIdx) /* B41BC 8011DABC 8C4233AC */ lw $v0, %lo(mdl_renderTaskQueueIdx)($v0) /* B41C0 8011DAC0 00021080 */ sll $v0, $v0, 2 /* B41C4 8011DAC4 3C148015 */ lui $s4, %hi(mdl_renderTaskLists) /* B41C8 8011DAC8 0282A021 */ addu $s4, $s4, $v0 /* B41CC 8011DACC 8E9433A0 */ lw $s4, %lo(mdl_renderTaskLists)($s4) /* B41D0 8011DAD0 26A2FFFF */ addiu $v0, $s5, -0x1 /* B41D4 8011DAD4 18400027 */ blez $v0, .L8011DB74 /* B41D8 8011DAD8 0000982D */ daddu $s3, $zero, $zero /* B41DC 8011DADC 3C0D002D */ lui $t5, (0x2DC6BF >> 16) /* B41E0 8011DAE0 35ADC6BF */ ori $t5, $t5, (0x2DC6BF & 0xFFFF) /* B41E4 8011DAE4 0040602D */ daddu $t4, $v0, $zero /* B41E8 8011DAE8 27AB0010 */ addiu $t3, $sp, 0x10 /* B41EC 8011DAEC 0160502D */ daddu $t2, $t3, $zero .L8011DAF0: /* B41F0 8011DAF0 8D420000 */ lw $v0, 0x0($t2) /* B41F4 8011DAF4 00021100 */ sll $v0, $v0, 4 /* B41F8 8011DAF8 02828021 */ addu $s0, $s4, $v0 /* B41FC 8011DAFC 8E020004 */ lw $v0, 0x4($s0) /* B4200 8011DB00 01A2102A */ slt $v0, $t5, $v0 /* B4204 8011DB04 50400018 */ beql $v0, $zero, .L8011DB68 /* B4208 8011DB08 26730001 */ addiu $s3, $s3, 0x1 /* B420C 8011DB0C 26650001 */ addiu $a1, $s3, 0x1 /* B4210 8011DB10 00B5102A */ slt $v0, $a1, $s5 /* B4214 8011DB14 10400013 */ beqz $v0, .L8011DB64 /* B4218 8011DB18 00051080 */ sll $v0, $a1, 2 /* B421C 8011DB1C 0140482D */ daddu $t1, $t2, $zero /* B4220 8011DB20 004B3821 */ addu $a3, $v0, $t3 .L8011DB24: /* B4224 8011DB24 8D280000 */ lw $t0, 0x0($t1) /* B4228 8011DB28 8CE60000 */ lw $a2, 0x0($a3) /* B422C 8011DB2C 00081100 */ sll $v0, $t0, 4 /* B4230 8011DB30 02828021 */ addu $s0, $s4, $v0 /* B4234 8011DB34 00061100 */ sll $v0, $a2, 4 /* B4238 8011DB38 02822021 */ addu $a0, $s4, $v0 /* B423C 8011DB3C 8E020004 */ lw $v0, 0x4($s0) /* B4240 8011DB40 8C830004 */ lw $v1, 0x4($a0) /* B4244 8011DB44 0043102A */ slt $v0, $v0, $v1 /* B4248 8011DB48 10400003 */ beqz $v0, .L8011DB58 /* B424C 8011DB4C 24A50001 */ addiu $a1, $a1, 0x1 /* B4250 8011DB50 AD260000 */ sw $a2, 0x0($t1) /* B4254 8011DB54 ACE80000 */ sw $t0, 0x0($a3) .L8011DB58: /* B4258 8011DB58 00B5102A */ slt $v0, $a1, $s5 /* B425C 8011DB5C 1440FFF1 */ bnez $v0, .L8011DB24 /* B4260 8011DB60 24E70004 */ addiu $a3, $a3, 0x4 .L8011DB64: /* B4264 8011DB64 26730001 */ addiu $s3, $s3, 0x1 .L8011DB68: /* B4268 8011DB68 026C102A */ slt $v0, $s3, $t4 /* B426C 8011DB6C 1440FFE0 */ bnez $v0, .L8011DAF0 /* B4270 8011DB70 254A0004 */ addiu $t2, $t2, 0x4 .L8011DB74: /* B4274 8011DB74 3C028015 */ lui $v0, %hi(mdl_renderTaskQueueIdx) /* B4278 8011DB78 8C4233AC */ lw $v0, %lo(mdl_renderTaskQueueIdx)($v0) /* B427C 8011DB7C 00021080 */ sll $v0, $v0, 2 /* B4280 8011DB80 3C148015 */ lui $s4, %hi(mdl_renderTaskLists) /* B4284 8011DB84 0282A021 */ addu $s4, $s4, $v0 /* B4288 8011DB88 8E9433A0 */ lw $s4, %lo(mdl_renderTaskLists)($s4) /* B428C 8011DB8C 26A2FFFF */ addiu $v0, $s5, -0x1 /* B4290 8011DB90 1840002A */ blez $v0, .L8011DC3C /* B4294 8011DB94 0000982D */ daddu $s3, $zero, $zero /* B4298 8011DB98 3C0B000C */ lui $t3, (0xC3500 >> 16) /* B429C 8011DB9C 356B3500 */ ori $t3, $t3, (0xC3500 & 0xFFFF) /* B42A0 8011DBA0 0040682D */ daddu $t5, $v0, $zero /* B42A4 8011DBA4 27AC0010 */ addiu $t4, $sp, 0x10 /* B42A8 8011DBA8 0180502D */ daddu $t2, $t4, $zero .L8011DBAC: /* B42AC 8011DBAC 8D420000 */ lw $v0, 0x0($t2) /* B42B0 8011DBB0 00021100 */ sll $v0, $v0, 4 /* B42B4 8011DBB4 02828021 */ addu $s0, $s4, $v0 /* B42B8 8011DBB8 8E020004 */ lw $v0, 0x4($s0) /* B42BC 8011DBBC 0162102A */ slt $v0, $t3, $v0 /* B42C0 8011DBC0 1440001E */ bnez $v0, .L8011DC3C /* B42C4 8011DBC4 00000000 */ nop /* B42C8 8011DBC8 26650001 */ addiu $a1, $s3, 0x1 /* B42CC 8011DBCC 00B5102A */ slt $v0, $a1, $s5 /* B42D0 8011DBD0 10400016 */ beqz $v0, .L8011DC2C /* B42D4 8011DBD4 00051080 */ sll $v0, $a1, 2 /* B42D8 8011DBD8 0140482D */ daddu $t1, $t2, $zero /* B42DC 8011DBDC 004C3821 */ addu $a3, $v0, $t4 .L8011DBE0: /* B42E0 8011DBE0 8CE80000 */ lw $t0, 0x0($a3) /* B42E4 8011DBE4 8D260000 */ lw $a2, 0x0($t1) /* B42E8 8011DBE8 00081100 */ sll $v0, $t0, 4 /* B42EC 8011DBEC 02822021 */ addu $a0, $s4, $v0 /* B42F0 8011DBF0 00061100 */ sll $v0, $a2, 4 /* B42F4 8011DBF4 8C830004 */ lw $v1, 0x4($a0) /* B42F8 8011DBF8 02828021 */ addu $s0, $s4, $v0 /* B42FC 8011DBFC 0163102A */ slt $v0, $t3, $v1 /* B4300 8011DC00 5440000B */ bnel $v0, $zero, .L8011DC30 /* B4304 8011DC04 26730001 */ addiu $s3, $s3, 0x1 /* B4308 8011DC08 8E020004 */ lw $v0, 0x4($s0) /* B430C 8011DC0C 0043102A */ slt $v0, $v0, $v1 /* B4310 8011DC10 10400003 */ beqz $v0, .L8011DC20 /* B4314 8011DC14 24A50001 */ addiu $a1, $a1, 0x1 /* B4318 8011DC18 AD280000 */ sw $t0, 0x0($t1) /* B431C 8011DC1C ACE60000 */ sw $a2, 0x0($a3) .L8011DC20: /* B4320 8011DC20 00B5102A */ slt $v0, $a1, $s5 /* B4324 8011DC24 1440FFEE */ bnez $v0, .L8011DBE0 /* B4328 8011DC28 24E70004 */ addiu $a3, $a3, 0x4 .L8011DC2C: /* B432C 8011DC2C 26730001 */ addiu $s3, $s3, 0x1 .L8011DC30: /* B4330 8011DC30 026D102A */ slt $v0, $s3, $t5 /* B4334 8011DC34 1440FFDD */ bnez $v0, .L8011DBAC /* B4338 8011DC38 254A0004 */ addiu $t2, $t2, 0x4 .L8011DC3C: /* B433C 8011DC3C 3C038015 */ lui $v1, %hi(mdl_renderTaskQueueIdx) /* B4340 8011DC40 8C6333AC */ lw $v1, %lo(mdl_renderTaskQueueIdx)($v1) /* B4344 8011DC44 3C02800A */ lui $v0, %hi(gOverrideFlags) /* B4348 8011DC48 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) /* B434C 8011DC4C 3C018015 */ lui $at, %hi(gLastRenderTaskCount) /* B4350 8011DC50 AC35B7F0 */ sw $s5, %lo(gLastRenderTaskCount)($at) /* B4354 8011DC54 00031880 */ sll $v1, $v1, 2 /* B4358 8011DC58 30420080 */ andi $v0, $v0, 0x80 /* B435C 8011DC5C 3C148015 */ lui $s4, %hi(mdl_renderTaskLists) /* B4360 8011DC60 0283A021 */ addu $s4, $s4, $v1 /* B4364 8011DC64 8E9433A0 */ lw $s4, %lo(mdl_renderTaskLists)($s4) /* B4368 8011DC68 10400061 */ beqz $v0, .L8011DDF0 /* B436C 8011DC6C 0000B02D */ daddu $s6, $zero, $zero /* B4370 8011DC70 27B00410 */ addiu $s0, $sp, 0x410 /* B4374 8011DC74 0200202D */ daddu $a0, $s0, $zero /* B4378 8011DC78 3C120001 */ lui $s2, (0x11630 >> 16) /* B437C 8011DC7C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* B4380 8011DC80 44810000 */ mtc1 $at, $f0 /* B4384 8011DC84 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* B4388 8011DC88 44050000 */ mfc1 $a1, $f0 /* B438C 8011DC8C 3C06BF80 */ lui $a2, (0xBF800000 >> 16) /* B4390 8011DC90 0C019DF0 */ jal guScaleF /* B4394 8011DC94 00A0382D */ daddu $a3, $a1, $zero /* B4398 8011DC98 0200202D */ daddu $a0, $s0, $zero /* B439C 8011DC9C 3C108007 */ lui $s0, %hi(gMatrixListPos) /* B43A0 8011DCA0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* B43A4 8011DCA4 3C11800A */ lui $s1, %hi(gDisplayContext) /* B43A8 8011DCA8 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* B43AC 8011DCAC 96050000 */ lhu $a1, 0x0($s0) /* B43B0 8011DCB0 8E220000 */ lw $v0, 0x0($s1) /* B43B4 8011DCB4 00052980 */ sll $a1, $a1, 6 /* B43B8 8011DCB8 00B22821 */ addu $a1, $a1, $s2 /* B43BC 8011DCBC 0C019D40 */ jal guMtxF2L /* B43C0 8011DCC0 00452821 */ addu $a1, $v0, $a1 /* B43C4 8011DCC4 96020000 */ lhu $v0, 0x0($s0) /* B43C8 8011DCC8 02C0982D */ daddu $s3, $s6, $zero /* B43CC 8011DCCC 24430001 */ addiu $v1, $v0, 0x1 /* B43D0 8011DCD0 3042FFFF */ andi $v0, $v0, 0xFFFF /* B43D4 8011DCD4 00021180 */ sll $v0, $v0, 6 /* B43D8 8011DCD8 A6030000 */ sh $v1, 0x0($s0) /* B43DC 8011DCDC 8E230000 */ lw $v1, 0x0($s1) /* B43E0 8011DCE0 00521021 */ addu $v0, $v0, $s2 /* B43E4 8011DCE4 1AA00050 */ blez $s5, .L8011DE28 /* B43E8 8011DCE8 0062B821 */ addu $s7, $v1, $v0 /* B43EC 8011DCEC 3C11800A */ lui $s1, %hi(gMainGfxPos) /* B43F0 8011DCF0 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* B43F4 8011DCF4 3C12DE00 */ lui $s2, (0xDE000000 >> 16) /* B43F8 8011DCF8 00131080 */ sll $v0, $s3, 2 .L8011DCFC: /* B43FC 8011DCFC 03A21021 */ addu $v0, $sp, $v0 /* B4400 8011DD00 8C420010 */ lw $v0, 0x10($v0) /* B4404 8011DD04 00021100 */ sll $v0, $v0, 4 /* B4408 8011DD08 02828021 */ addu $s0, $s4, $v0 /* B440C 8011DD0C 8E020000 */ lw $v0, 0x0($s0) /* B4410 8011DD10 8E03000C */ lw $v1, 0xC($s0) /* B4414 8011DD14 30420002 */ andi $v0, $v0, 0x2 /* B4418 8011DD18 10400004 */ beqz $v0, .L8011DD2C /* B441C 8011DD1C 00000000 */ nop /* B4420 8011DD20 8E360000 */ lw $s6, 0x0($s1) /* B4424 8011DD24 26C20008 */ addiu $v0, $s6, 0x8 /* B4428 8011DD28 AE220000 */ sw $v0, 0x0($s1) .L8011DD2C: /* B442C 8011DD2C 0060F809 */ jalr $v1 /* B4430 8011DD30 8E040008 */ lw $a0, 0x8($s0) /* B4434 8011DD34 8E020000 */ lw $v0, 0x0($s0) /* B4438 8011DD38 30420002 */ andi $v0, $v0, 0x2 /* B443C 8011DD3C 10400027 */ beqz $v0, .L8011DDDC /* B4440 8011DD40 26730001 */ addiu $s3, $s3, 0x1 /* B4444 8011DD44 3C05DA38 */ lui $a1, (0xDA380005 >> 16) /* B4448 8011DD48 34A50005 */ ori $a1, $a1, (0xDA380005 & 0xFFFF) /* B444C 8011DD4C 3C06DA38 */ lui $a2, (0xDA380007 >> 16) /* B4450 8011DD50 8E230000 */ lw $v1, 0x0($s1) /* B4454 8011DD54 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* B4458 8011DD58 0060202D */ daddu $a0, $v1, $zero /* B445C 8011DD5C 24630008 */ addiu $v1, $v1, 0x8 /* B4460 8011DD60 AE230000 */ sw $v1, 0x0($s1) /* B4464 8011DD64 AC820000 */ sw $v0, 0x0($a0) /* B4468 8011DD68 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* B446C 8011DD6C AC800004 */ sw $zero, 0x4($a0) /* B4470 8011DD70 AEC20000 */ sw $v0, 0x0($s6) /* B4474 8011DD74 24620008 */ addiu $v0, $v1, 0x8 /* B4478 8011DD78 26C40008 */ addiu $a0, $s6, 0x8 /* B447C 8011DD7C AEC30004 */ sw $v1, 0x4($s6) /* B4480 8011DD80 AE220000 */ sw $v0, 0x0($s1) /* B4484 8011DD84 24620010 */ addiu $v0, $v1, 0x10 /* B4488 8011DD88 AC720000 */ sw $s2, 0x0($v1) /* B448C 8011DD8C AC640004 */ sw $a0, 0x4($v1) /* B4490 8011DD90 AE220000 */ sw $v0, 0x0($s1) /* B4494 8011DD94 24620018 */ addiu $v0, $v1, 0x18 /* B4498 8011DD98 AC650008 */ sw $a1, 0x8($v1) /* B449C 8011DD9C AC77000C */ sw $s7, 0xC($v1) /* B44A0 8011DDA0 AE220000 */ sw $v0, 0x0($s1) /* B44A4 8011DDA4 AC640014 */ sw $a0, 0x14($v1) /* B44A8 8011DDA8 3C04800A */ lui $a0, %hi(gCurrentCamID) /* B44AC 8011DDAC 8484A634 */ lh $a0, %lo(gCurrentCamID)($a0) /* B44B0 8011DDB0 24620020 */ addiu $v0, $v1, 0x20 /* B44B4 8011DDB4 AC720010 */ sw $s2, 0x10($v1) /* B44B8 8011DDB8 AE220000 */ sw $v0, 0x0($s1) /* B44BC 8011DDBC 3C02800A */ lui $v0, %hi(gDisplayContext) /* B44C0 8011DDC0 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* B44C4 8011DDC4 34C60007 */ ori $a2, $a2, (0xDA380007 & 0xFFFF) /* B44C8 8011DDC8 AC660018 */ sw $a2, 0x18($v1) /* B44CC 8011DDCC 00042180 */ sll $a0, $a0, 6 /* B44D0 8011DDD0 24840030 */ addiu $a0, $a0, 0x30 /* B44D4 8011DDD4 00441021 */ addu $v0, $v0, $a0 /* B44D8 8011DDD8 AC62001C */ sw $v0, 0x1C($v1) .L8011DDDC: /* B44DC 8011DDDC 0275102A */ slt $v0, $s3, $s5 /* B44E0 8011DDE0 1440FFC6 */ bnez $v0, .L8011DCFC /* B44E4 8011DDE4 00131080 */ sll $v0, $s3, 2 /* B44E8 8011DDE8 0804778A */ j .L8011DE28 /* B44EC 8011DDEC 00000000 */ nop .L8011DDF0: /* B44F0 8011DDF0 1AA0000D */ blez $s5, .L8011DE28 /* B44F4 8011DDF4 0000982D */ daddu $s3, $zero, $zero /* B44F8 8011DDF8 27B10010 */ addiu $s1, $sp, 0x10 .L8011DDFC: /* B44FC 8011DDFC 8E220000 */ lw $v0, 0x0($s1) /* B4500 8011DE00 26310004 */ addiu $s1, $s1, 0x4 /* B4504 8011DE04 00021100 */ sll $v0, $v0, 4 /* B4508 8011DE08 02828021 */ addu $s0, $s4, $v0 /* B450C 8011DE0C 8E03000C */ lw $v1, 0xC($s0) /* B4510 8011DE10 8E040008 */ lw $a0, 0x8($s0) /* B4514 8011DE14 0060F809 */ jalr $v1 /* B4518 8011DE18 26730001 */ addiu $s3, $s3, 0x1 /* B451C 8011DE1C 0275102A */ slt $v0, $s3, $s5 /* B4520 8011DE20 1440FFF6 */ bnez $v0, .L8011DDFC /* B4524 8011DE24 00000000 */ nop .L8011DE28: /* B4528 8011DE28 3C038015 */ lui $v1, %hi(mdl_renderTaskQueueIdx) /* B452C 8011DE2C 246333AC */ addiu $v1, $v1, %lo(mdl_renderTaskQueueIdx) /* B4530 8011DE30 8C620000 */ lw $v0, 0x0($v1) /* B4534 8011DE34 24420001 */ addiu $v0, $v0, 0x1 /* B4538 8011DE38 AC620000 */ sw $v0, 0x0($v1) /* B453C 8011DE3C 28420003 */ slti $v0, $v0, 0x3 /* B4540 8011DE40 50400001 */ beql $v0, $zero, .L8011DE48 /* B4544 8011DE44 AC600000 */ sw $zero, 0x0($v1) .L8011DE48: /* B4548 8011DE48 3C018015 */ lui $at, %hi(mdl_renderTaskCount) /* B454C 8011DE4C AC2033B0 */ sw $zero, %lo(mdl_renderTaskCount)($at) .L8011DE50: /* B4550 8011DE50 8FBF0470 */ lw $ra, 0x470($sp) /* B4554 8011DE54 8FB7046C */ lw $s7, 0x46C($sp) /* B4558 8011DE58 8FB60468 */ lw $s6, 0x468($sp) /* B455C 8011DE5C 8FB50464 */ lw $s5, 0x464($sp) /* B4560 8011DE60 8FB40460 */ lw $s4, 0x460($sp) /* B4564 8011DE64 8FB3045C */ lw $s3, 0x45C($sp) /* B4568 8011DE68 8FB20458 */ lw $s2, 0x458($sp) /* B456C 8011DE6C 8FB10454 */ lw $s1, 0x454($sp) /* B4570 8011DE70 8FB00450 */ lw $s0, 0x450($sp) /* B4574 8011DE74 03E00008 */ jr $ra /* B4578 8011DE78 27BD0478 */ addiu $sp, $sp, 0x478 /* B457C 8011DE7C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void execute_render_tasks(void) { s32 i, j, taskCount; s32 sorted[ARRAY_COUNT(*mdl_clearRenderTasks)]; RenderTask* taskList; RenderTask* task; RenderTask* task2; Matrix4f mtxFlipY; void (*appendGfx)(void*); if (mdl_renderTaskCount == 0) { return; } for (i = taskCount = 0; i < mdl_renderTaskCount; i++) { sorted[taskCount++] = i; } // sort in ascending order taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx]; for (i = 0; i < taskCount - 1; i++) { for (j = i + 1; j < taskCount; j++) { s32 t1 = sorted[i]; s32 t2 = sorted[j]; task = &taskList[t1]; task2 = &taskList[t2]; if (task->distance > task2->distance) { sorted[i] = t2; sorted[j] = t1; } } } // tasks with dist >= 3M sort in descending order taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx]; for (i = 0; i < taskCount - 1; i++) { task = &taskList[sorted[i]]; if (task->distance >= 3000000) { for (j = i + 1; j < taskCount; j++) { s32 t1 = sorted[i]; s32 t2 = sorted[j]; task = &taskList[t1]; task2 = &taskList[t2]; if (task->distance < task2->distance) { sorted[i] = t2; sorted[j] = t1; } } } } // tasks with dist <= 800k sort in descending order taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx]; for (i = 0; i < taskCount - 1; i++) { task = &taskList[sorted[i]]; if (task->distance > 800000) { break; } for (j = i + 1; j < taskCount; j++) { s32 t1 = sorted[i]; s32 t2 = sorted[j]; task = &taskList[t1]; task2 = &taskList[t2]; if (task2->distance > 800000) { break; } if (task->distance < task2->distance) { sorted[i] = t2; sorted[j] = t1; } } } gLastRenderTaskCount = taskCount; taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx]; if (gOverrideFlags & GLOBAL_OVERRIDES_ENABLE_FLOOR_REFLECTION) { Mtx* dispMtx; Gfx* savedGfxPos = NULL; guScaleF(mtxFlipY, 1.0f, -1.0f, 1.0f); guMtxF2L(mtxFlipY, &gDisplayContext->matrixStack[gMatrixListPos]); dispMtx = &gDisplayContext->matrixStack[gMatrixListPos++]; for (i = 0; i < taskCount; i++) { task = &taskList[sorted[i]]; appendGfx = task->appendGfx; if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) { savedGfxPos = gMainGfxPos++; } appendGfx(task->appendGfxArg); if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) { gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); gSPMatrix(gMainGfxPos++, dispMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); gSPDisplayList(gMainGfxPos++, savedGfxPos + 1); gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); } } } else { for (i = 0; i < taskCount; i++) { task = &taskList[sorted[i]]; appendGfx = task->appendGfx; appendGfx(task->appendGfxArg); } } mdl_renderTaskQueueIdx++; if (mdl_renderTaskQueueIdx > ARRAY_COUNT(mdl_renderTaskLists) - 1) { mdl_renderTaskQueueIdx = 0; } mdl_renderTaskCount = 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel _Printf /* 3FEA0 80064AA0 27BDFF50 */ addiu $sp, $sp, -0xB0 /* 3FEA4 80064AA4 AFB400A0 */ sw $s4, 0xA0($sp) /* 3FEA8 80064AA8 0080A021 */ addu $s4, $a0, $zero /* 3FEAC 80064AAC AFB3009C */ sw $s3, 0x9C($sp) /* 3FEB0 80064AB0 00A09821 */ addu $s3, $a1, $zero /* 3FEB4 80064AB4 00C02821 */ addu $a1, $a2, $zero /* 3FEB8 80064AB8 AFB500A4 */ sw $s5, 0xA4($sp) /* 3FEBC 80064ABC 3C15800A */ lui $s5, %hi(D_80099BF0) /* 3FEC0 80064AC0 26B59BF0 */ addiu $s5, $s5, %lo(D_80099BF0) /* 3FEC4 80064AC4 AFBF00A8 */ sw $ra, 0xA8($sp) /* 3FEC8 80064AC8 AFB20098 */ sw $s2, 0x98($sp) /* 3FECC 80064ACC AFB10094 */ sw $s1, 0x94($sp) /* 3FED0 80064AD0 AFB00090 */ sw $s0, 0x90($sp) /* 3FED4 80064AD4 AFA700BC */ sw $a3, 0xBC($sp) /* 3FED8 80064AD8 AFA0003C */ sw $zero, 0x3C($sp) .L80064ADC: /* 3FEDC 80064ADC 80A20000 */ lb $v0, 0x0($a1) /* 3FEE0 80064AE0 90B10000 */ lbu $s1, 0x0($a1) /* 3FEE4 80064AE4 080192BD */ j .L80064AF4 /* 3FEE8 80064AE8 00A09021 */ addu $s2, $a1, $zero .L80064AEC: /* 3FEEC 80064AEC 82420000 */ lb $v0, 0x0($s2) /* 3FEF0 80064AF0 92510000 */ lbu $s1, 0x0($s2) .L80064AF4: /* 3FEF4 80064AF4 0002182B */ sltu $v1, $zero, $v0 /* 3FEF8 80064AF8 38420025 */ xori $v0, $v0, 0x25 /* 3FEFC 80064AFC 0002102B */ sltu $v0, $zero, $v0 /* 3FF00 80064B00 00621824 */ and $v1, $v1, $v0 /* 3FF04 80064B04 5460FFF9 */ bnel $v1, $zero, .L80064AEC /* 3FF08 80064B08 26520001 */ addiu $s2, $s2, 0x1 /* 3FF0C 80064B0C 02458023 */ subu $s0, $s2, $a1 /* 3FF10 80064B10 1A000009 */ blez $s0, .L80064B38 /* 3FF14 80064B14 02602021 */ addu $a0, $s3, $zero /* 3FF18 80064B18 0280F809 */ jalr $s4 /* 3FF1C 80064B1C 02003021 */ addu $a2, $s0, $zero /* 3FF20 80064B20 00409821 */ addu $s3, $v0, $zero /* 3FF24 80064B24 12600134 */ beqz $s3, .L80064FF8 /* 3FF28 80064B28 00000000 */ nop /* 3FF2C 80064B2C 8FA2003C */ lw $v0, 0x3C($sp) /* 3FF30 80064B30 00501021 */ addu $v0, $v0, $s0 /* 3FF34 80064B34 AFA2003C */ sw $v0, 0x3C($sp) .L80064B38: /* 3FF38 80064B38 1220012F */ beqz $s1, .L80064FF8 /* 3FF3C 80064B3C 26520001 */ addiu $s2, $s2, 0x1 /* 3FF40 80064B40 AFA00040 */ sw $zero, 0x40($sp) /* 3FF44 80064B44 3C10800A */ lui $s0, %hi(D_80099BF8) /* 3FF48 80064B48 26109BF8 */ addiu $s0, $s0, %lo(D_80099BF8) .L80064B4C: /* 3FF4C 80064B4C 82450000 */ lb $a1, 0x0($s2) /* 3FF50 80064B50 0C019284 */ jal strchr /* 3FF54 80064B54 02A02021 */ addu $a0, $s5, $zero /* 3FF58 80064B58 10400009 */ beqz $v0, .L80064B80 /* 3FF5C 80064B5C 00551023 */ subu $v0, $v0, $s5 /* 3FF60 80064B60 00021080 */ sll $v0, $v0, 2 /* 3FF64 80064B64 00501021 */ addu $v0, $v0, $s0 /* 3FF68 80064B68 8FA30040 */ lw $v1, 0x40($sp) /* 3FF6C 80064B6C 8C420000 */ lw $v0, 0x0($v0) /* 3FF70 80064B70 26520001 */ addiu $s2, $s2, 0x1 /* 3FF74 80064B74 00621825 */ or $v1, $v1, $v0 /* 3FF78 80064B78 080192D3 */ j .L80064B4C /* 3FF7C 80064B7C AFA30040 */ sw $v1, 0x40($sp) .L80064B80: /* 3FF80 80064B80 82430000 */ lb $v1, 0x0($s2) /* 3FF84 80064B84 2402002A */ addiu $v0, $zero, 0x2A /* 3FF88 80064B88 14620011 */ bne $v1, $v0, .L80064BD0 /* 3FF8C 80064B8C 00602021 */ addu $a0, $v1, $zero /* 3FF90 80064B90 8FA200BC */ lw $v0, 0xBC($sp) /* 3FF94 80064B94 2403FFFC */ addiu $v1, $zero, -0x4 /* 3FF98 80064B98 24420003 */ addiu $v0, $v0, 0x3 /* 3FF9C 80064B9C 00431024 */ and $v0, $v0, $v1 /* 3FFA0 80064BA0 24430004 */ addiu $v1, $v0, 0x4 /* 3FFA4 80064BA4 AFA300BC */ sw $v1, 0xBC($sp) /* 3FFA8 80064BA8 8C420000 */ lw $v0, 0x0($v0) /* 3FFAC 80064BAC 04410006 */ bgez $v0, .L80064BC8 /* 3FFB0 80064BB0 AFA20038 */ sw $v0, 0x38($sp) /* 3FFB4 80064BB4 8FA30040 */ lw $v1, 0x40($sp) /* 3FFB8 80064BB8 00021023 */ negu $v0, $v0 /* 3FFBC 80064BBC AFA20038 */ sw $v0, 0x38($sp) /* 3FFC0 80064BC0 34630004 */ ori $v1, $v1, 0x4 /* 3FFC4 80064BC4 AFA30040 */ sw $v1, 0x40($sp) .L80064BC8: /* 3FFC8 80064BC8 0801930A */ j .L80064C28 /* 3FFCC 80064BCC 26520001 */ addiu $s2, $s2, 0x1 .L80064BD0: /* 3FFD0 80064BD0 2482FFD0 */ addiu $v0, $a0, -0x30 /* 3FFD4 80064BD4 304200FF */ andi $v0, $v0, 0xFF /* 3FFD8 80064BD8 2C42000A */ sltiu $v0, $v0, 0xA /* 3FFDC 80064BDC 10400012 */ beqz $v0, .L80064C28 /* 3FFE0 80064BE0 AFA00038 */ sw $zero, 0x38($sp) .L80064BE4: /* 3FFE4 80064BE4 8FA40038 */ lw $a0, 0x38($sp) /* 3FFE8 80064BE8 288203E7 */ slti $v0, $a0, 0x3E7 /* 3FFEC 80064BEC 50400009 */ beql $v0, $zero, .L80064C14 /* 3FFF0 80064BF0 26520001 */ addiu $s2, $s2, 0x1 /* 3FFF4 80064BF4 00041080 */ sll $v0, $a0, 2 /* 3FFF8 80064BF8 82430000 */ lb $v1, 0x0($s2) /* 3FFFC 80064BFC 00441021 */ addu $v0, $v0, $a0 /* 40000 80064C00 00021040 */ sll $v0, $v0, 1 /* 40004 80064C04 00431021 */ addu $v0, $v0, $v1 /* 40008 80064C08 2442FFD0 */ addiu $v0, $v0, -0x30 /* 4000C 80064C0C AFA20038 */ sw $v0, 0x38($sp) /* 40010 80064C10 26520001 */ addiu $s2, $s2, 0x1 .L80064C14: /* 40014 80064C14 92420000 */ lbu $v0, 0x0($s2) /* 40018 80064C18 2442FFD0 */ addiu $v0, $v0, -0x30 /* 4001C 80064C1C 2C42000A */ sltiu $v0, $v0, 0xA /* 40020 80064C20 1440FFF0 */ bnez $v0, .L80064BE4 /* 40024 80064C24 00000000 */ nop .L80064C28: /* 40028 80064C28 82430000 */ lb $v1, 0x0($s2) /* 4002C 80064C2C 2402002E */ addiu $v0, $zero, 0x2E /* 40030 80064C30 10620003 */ beq $v1, $v0, .L80064C40 /* 40034 80064C34 2402FFFF */ addiu $v0, $zero, -0x1 /* 40038 80064C38 08019335 */ j .L80064CD4 /* 4003C 80064C3C AFA20034 */ sw $v0, 0x34($sp) .L80064C40: /* 40040 80064C40 26520001 */ addiu $s2, $s2, 0x1 /* 40044 80064C44 82430000 */ lb $v1, 0x0($s2) /* 40048 80064C48 2402002A */ addiu $v0, $zero, 0x2A /* 4004C 80064C4C 1462000B */ bne $v1, $v0, .L80064C7C /* 40050 80064C50 00602021 */ addu $a0, $v1, $zero /* 40054 80064C54 8FA300BC */ lw $v1, 0xBC($sp) /* 40058 80064C58 2402FFFC */ addiu $v0, $zero, -0x4 /* 4005C 80064C5C 24630003 */ addiu $v1, $v1, 0x3 /* 40060 80064C60 00621824 */ and $v1, $v1, $v0 /* 40064 80064C64 24620004 */ addiu $v0, $v1, 0x4 /* 40068 80064C68 AFA200BC */ sw $v0, 0xBC($sp) /* 4006C 80064C6C 8C620000 */ lw $v0, 0x0($v1) /* 40070 80064C70 26520001 */ addiu $s2, $s2, 0x1 /* 40074 80064C74 08019335 */ j .L80064CD4 /* 40078 80064C78 AFA20034 */ sw $v0, 0x34($sp) .L80064C7C: /* 4007C 80064C7C 2482FFD0 */ addiu $v0, $a0, -0x30 /* 40080 80064C80 304200FF */ andi $v0, $v0, 0xFF /* 40084 80064C84 2C42000A */ sltiu $v0, $v0, 0xA /* 40088 80064C88 10400012 */ beqz $v0, .L80064CD4 /* 4008C 80064C8C AFA00034 */ sw $zero, 0x34($sp) .L80064C90: /* 40090 80064C90 8FA40034 */ lw $a0, 0x34($sp) /* 40094 80064C94 288203E7 */ slti $v0, $a0, 0x3E7 /* 40098 80064C98 50400009 */ beql $v0, $zero, .L80064CC0 /* 4009C 80064C9C 26520001 */ addiu $s2, $s2, 0x1 /* 400A0 80064CA0 00041080 */ sll $v0, $a0, 2 /* 400A4 80064CA4 82430000 */ lb $v1, 0x0($s2) /* 400A8 80064CA8 00441021 */ addu $v0, $v0, $a0 /* 400AC 80064CAC 00021040 */ sll $v0, $v0, 1 /* 400B0 80064CB0 00431021 */ addu $v0, $v0, $v1 /* 400B4 80064CB4 2442FFD0 */ addiu $v0, $v0, -0x30 /* 400B8 80064CB8 AFA20034 */ sw $v0, 0x34($sp) /* 400BC 80064CBC 26520001 */ addiu $s2, $s2, 0x1 .L80064CC0: /* 400C0 80064CC0 92420000 */ lbu $v0, 0x0($s2) /* 400C4 80064CC4 2442FFD0 */ addiu $v0, $v0, -0x30 /* 400C8 80064CC8 2C42000A */ sltiu $v0, $v0, 0xA /* 400CC 80064CCC 1440FFF0 */ bnez $v0, .L80064C90 /* 400D0 80064CD0 00000000 */ nop .L80064CD4: /* 400D4 80064CD4 82450000 */ lb $a1, 0x0($s2) /* 400D8 80064CD8 3C04800A */ lui $a0, %hi(D_80099C10) /* 400DC 80064CDC 24849C10 */ addiu $a0, $a0, %lo(D_80099C10) /* 400E0 80064CE0 0C019284 */ jal strchr /* 400E4 80064CE4 00A08021 */ addu $s0, $a1, $zero /* 400E8 80064CE8 10400003 */ beqz $v0, .L80064CF8 /* 400EC 80064CEC 02001021 */ addu $v0, $s0, $zero /* 400F0 80064CF0 0801933F */ j .L80064CFC /* 400F4 80064CF4 26520001 */ addiu $s2, $s2, 0x1 .L80064CF8: /* 400F8 80064CF8 00001021 */ addu $v0, $zero, $zero .L80064CFC: /* 400FC 80064CFC A3A20044 */ sb $v0, 0x44($sp) /* 40100 80064D00 00021600 */ sll $v0, $v0, 24 /* 40104 80064D04 00021E03 */ sra $v1, $v0, 24 /* 40108 80064D08 2402006C */ addiu $v0, $zero, 0x6C /* 4010C 80064D0C 14620007 */ bne $v1, $v0, .L80064D2C /* 40110 80064D10 27A40010 */ addiu $a0, $sp, 0x10 /* 40114 80064D14 82420000 */ lb $v0, 0x0($s2) /* 40118 80064D18 14430004 */ bne $v0, $v1, .L80064D2C /* 4011C 80064D1C 2402004C */ addiu $v0, $zero, 0x4C /* 40120 80064D20 A3A20044 */ sb $v0, 0x44($sp) /* 40124 80064D24 26520001 */ addiu $s2, $s2, 0x1 /* 40128 80064D28 27A40010 */ addiu $a0, $sp, 0x10 .L80064D2C: /* 4012C 80064D2C 82460000 */ lb $a2, 0x0($s2) /* 40130 80064D30 27A500BC */ addiu $a1, $sp, 0xBC /* 40134 80064D34 0C019408 */ jal _Putfld /* 40138 80064D38 27A70048 */ addiu $a3, $sp, 0x48 /* 4013C 80064D3C 8FA3001C */ lw $v1, 0x1C($sp) /* 40140 80064D40 8FA20020 */ lw $v0, 0x20($sp) /* 40144 80064D44 00621821 */ addu $v1, $v1, $v0 /* 40148 80064D48 8FA20024 */ lw $v0, 0x24($sp) /* 4014C 80064D4C 8FA40028 */ lw $a0, 0x28($sp) /* 40150 80064D50 8FA5002C */ lw $a1, 0x2C($sp) /* 40154 80064D54 00621821 */ addu $v1, $v1, $v0 /* 40158 80064D58 00641821 */ addu $v1, $v1, $a0 /* 4015C 80064D5C 00651821 */ addu $v1, $v1, $a1 /* 40160 80064D60 8FA40030 */ lw $a0, 0x30($sp) /* 40164 80064D64 8FA50038 */ lw $a1, 0x38($sp) /* 40168 80064D68 8FA20040 */ lw $v0, 0x40($sp) /* 4016C 80064D6C 00641821 */ addu $v1, $v1, $a0 /* 40170 80064D70 00A32823 */ subu $a1, $a1, $v1 /* 40174 80064D74 30420004 */ andi $v0, $v0, 0x4 /* 40178 80064D78 14400017 */ bnez $v0, .L80064DD8 /* 4017C 80064D7C AFA50038 */ sw $a1, 0x38($sp) /* 40180 80064D80 18A00015 */ blez $a1, .L80064DD8 /* 40184 80064D84 00000000 */ nop /* 40188 80064D88 00A08821 */ addu $s1, $a1, $zero /* 4018C 80064D8C 2E220021 */ sltiu $v0, $s1, 0x21 .L80064D90: /* 40190 80064D90 10400002 */ beqz $v0, .L80064D9C /* 40194 80064D94 24100020 */ addiu $s0, $zero, 0x20 /* 40198 80064D98 02208021 */ addu $s0, $s1, $zero .L80064D9C: /* 4019C 80064D9C 5A00000C */ blezl $s0, .L80064DD0 /* 401A0 80064DA0 02308823 */ subu $s1, $s1, $s0 /* 401A4 80064DA4 02602021 */ addu $a0, $s3, $zero /* 401A8 80064DA8 3C058009 */ lui $a1, %hi(spaces) /* 401AC 80064DAC 24A545E0 */ addiu $a1, $a1, %lo(spaces) /* 401B0 80064DB0 0280F809 */ jalr $s4 /* 401B4 80064DB4 02003021 */ addu $a2, $s0, $zero /* 401B8 80064DB8 00409821 */ addu $s3, $v0, $zero /* 401BC 80064DBC 1260008E */ beqz $s3, .L80064FF8 /* 401C0 80064DC0 02308823 */ subu $s1, $s1, $s0 /* 401C4 80064DC4 8FA2003C */ lw $v0, 0x3C($sp) /* 401C8 80064DC8 00501021 */ addu $v0, $v0, $s0 /* 401CC 80064DCC AFA2003C */ sw $v0, 0x3C($sp) .L80064DD0: /* 401D0 80064DD0 1E20FFEF */ bgtz $s1, .L80064D90 /* 401D4 80064DD4 2E220021 */ sltiu $v0, $s1, 0x21 .L80064DD8: /* 401D8 80064DD8 8FA6001C */ lw $a2, 0x1C($sp) /* 401DC 80064DDC 18C0000A */ blez $a2, .L80064E08 /* 401E0 80064DE0 02602021 */ addu $a0, $s3, $zero /* 401E4 80064DE4 0280F809 */ jalr $s4 /* 401E8 80064DE8 27A50048 */ addiu $a1, $sp, 0x48 /* 401EC 80064DEC 00409821 */ addu $s3, $v0, $zero /* 401F0 80064DF0 12600081 */ beqz $s3, .L80064FF8 /* 401F4 80064DF4 00000000 */ nop /* 401F8 80064DF8 8FA2003C */ lw $v0, 0x3C($sp) /* 401FC 80064DFC 8FA3001C */ lw $v1, 0x1C($sp) /* 40200 80064E00 00431021 */ addu $v0, $v0, $v1 /* 40204 80064E04 AFA2003C */ sw $v0, 0x3C($sp) .L80064E08: /* 40208 80064E08 8FA20020 */ lw $v0, 0x20($sp) /* 4020C 80064E0C 18400015 */ blez $v0, .L80064E64 /* 40210 80064E10 00000000 */ nop /* 40214 80064E14 00408821 */ addu $s1, $v0, $zero /* 40218 80064E18 2E220021 */ sltiu $v0, $s1, 0x21 .L80064E1C: /* 4021C 80064E1C 10400002 */ beqz $v0, .L80064E28 /* 40220 80064E20 24100020 */ addiu $s0, $zero, 0x20 /* 40224 80064E24 02208021 */ addu $s0, $s1, $zero .L80064E28: /* 40228 80064E28 5A00000C */ blezl $s0, .L80064E5C /* 4022C 80064E2C 02308823 */ subu $s1, $s1, $s0 /* 40230 80064E30 02602021 */ addu $a0, $s3, $zero /* 40234 80064E34 3C058009 */ lui $a1, %hi(zeroes) /* 40238 80064E38 24A54604 */ addiu $a1, $a1, %lo(zeroes) /* 4023C 80064E3C 0280F809 */ jalr $s4 /* 40240 80064E40 02003021 */ addu $a2, $s0, $zero /* 40244 80064E44 00409821 */ addu $s3, $v0, $zero /* 40248 80064E48 1260006B */ beqz $s3, .L80064FF8 /* 4024C 80064E4C 02308823 */ subu $s1, $s1, $s0 /* 40250 80064E50 8FA2003C */ lw $v0, 0x3C($sp) /* 40254 80064E54 00501021 */ addu $v0, $v0, $s0 /* 40258 80064E58 AFA2003C */ sw $v0, 0x3C($sp) .L80064E5C: /* 4025C 80064E5C 1E20FFEF */ bgtz $s1, .L80064E1C /* 40260 80064E60 2E220021 */ sltiu $v0, $s1, 0x21 .L80064E64: /* 40264 80064E64 8FA60024 */ lw $a2, 0x24($sp) /* 40268 80064E68 18C0000B */ blez $a2, .L80064E98 /* 4026C 80064E6C 00000000 */ nop /* 40270 80064E70 8FA50018 */ lw $a1, 0x18($sp) /* 40274 80064E74 0280F809 */ jalr $s4 /* 40278 80064E78 02602021 */ addu $a0, $s3, $zero /* 4027C 80064E7C 00409821 */ addu $s3, $v0, $zero /* 40280 80064E80 1260005D */ beqz $s3, .L80064FF8 /* 40284 80064E84 00000000 */ nop /* 40288 80064E88 8FA2003C */ lw $v0, 0x3C($sp) /* 4028C 80064E8C 8FA30024 */ lw $v1, 0x24($sp) /* 40290 80064E90 00431021 */ addu $v0, $v0, $v1 /* 40294 80064E94 AFA2003C */ sw $v0, 0x3C($sp) .L80064E98: /* 40298 80064E98 8FA20028 */ lw $v0, 0x28($sp) /* 4029C 80064E9C 18400015 */ blez $v0, .L80064EF4 /* 402A0 80064EA0 00000000 */ nop /* 402A4 80064EA4 00408821 */ addu $s1, $v0, $zero /* 402A8 80064EA8 2E220021 */ sltiu $v0, $s1, 0x21 .L80064EAC: /* 402AC 80064EAC 10400002 */ beqz $v0, .L80064EB8 /* 402B0 80064EB0 24100020 */ addiu $s0, $zero, 0x20 /* 402B4 80064EB4 02208021 */ addu $s0, $s1, $zero .L80064EB8: /* 402B8 80064EB8 5A00000C */ blezl $s0, .L80064EEC /* 402BC 80064EBC 02308823 */ subu $s1, $s1, $s0 /* 402C0 80064EC0 02602021 */ addu $a0, $s3, $zero /* 402C4 80064EC4 3C058009 */ lui $a1, %hi(zeroes) /* 402C8 80064EC8 24A54604 */ addiu $a1, $a1, %lo(zeroes) /* 402CC 80064ECC 0280F809 */ jalr $s4 /* 402D0 80064ED0 02003021 */ addu $a2, $s0, $zero /* 402D4 80064ED4 00409821 */ addu $s3, $v0, $zero /* 402D8 80064ED8 12600047 */ beqz $s3, .L80064FF8 /* 402DC 80064EDC 02308823 */ subu $s1, $s1, $s0 /* 402E0 80064EE0 8FA2003C */ lw $v0, 0x3C($sp) /* 402E4 80064EE4 00501021 */ addu $v0, $v0, $s0 /* 402E8 80064EE8 AFA2003C */ sw $v0, 0x3C($sp) .L80064EEC: /* 402EC 80064EEC 1E20FFEF */ bgtz $s1, .L80064EAC /* 402F0 80064EF0 2E220021 */ sltiu $v0, $s1, 0x21 .L80064EF4: /* 402F4 80064EF4 8FA6002C */ lw $a2, 0x2C($sp) /* 402F8 80064EF8 18C0000C */ blez $a2, .L80064F2C /* 402FC 80064EFC 02602021 */ addu $a0, $s3, $zero /* 40300 80064F00 8FA20018 */ lw $v0, 0x18($sp) /* 40304 80064F04 8FA50024 */ lw $a1, 0x24($sp) /* 40308 80064F08 0280F809 */ jalr $s4 /* 4030C 80064F0C 00452821 */ addu $a1, $v0, $a1 /* 40310 80064F10 00409821 */ addu $s3, $v0, $zero /* 40314 80064F14 12600038 */ beqz $s3, .L80064FF8 /* 40318 80064F18 00000000 */ nop /* 4031C 80064F1C 8FA2003C */ lw $v0, 0x3C($sp) /* 40320 80064F20 8FA3002C */ lw $v1, 0x2C($sp) /* 40324 80064F24 00431021 */ addu $v0, $v0, $v1 /* 40328 80064F28 AFA2003C */ sw $v0, 0x3C($sp) .L80064F2C: /* 4032C 80064F2C 8FA20030 */ lw $v0, 0x30($sp) /* 40330 80064F30 18400015 */ blez $v0, .L80064F88 /* 40334 80064F34 00000000 */ nop /* 40338 80064F38 00408821 */ addu $s1, $v0, $zero /* 4033C 80064F3C 2E220021 */ sltiu $v0, $s1, 0x21 .L80064F40: /* 40340 80064F40 10400002 */ beqz $v0, .L80064F4C /* 40344 80064F44 24100020 */ addiu $s0, $zero, 0x20 /* 40348 80064F48 02208021 */ addu $s0, $s1, $zero .L80064F4C: /* 4034C 80064F4C 5A00000C */ blezl $s0, .L80064F80 /* 40350 80064F50 02308823 */ subu $s1, $s1, $s0 /* 40354 80064F54 02602021 */ addu $a0, $s3, $zero /* 40358 80064F58 3C058009 */ lui $a1, %hi(zeroes) /* 4035C 80064F5C 24A54604 */ addiu $a1, $a1, %lo(zeroes) /* 40360 80064F60 0280F809 */ jalr $s4 /* 40364 80064F64 02003021 */ addu $a2, $s0, $zero /* 40368 80064F68 00409821 */ addu $s3, $v0, $zero /* 4036C 80064F6C 12600022 */ beqz $s3, .L80064FF8 /* 40370 80064F70 02308823 */ subu $s1, $s1, $s0 /* 40374 80064F74 8FA2003C */ lw $v0, 0x3C($sp) /* 40378 80064F78 00501021 */ addu $v0, $v0, $s0 /* 4037C 80064F7C AFA2003C */ sw $v0, 0x3C($sp) .L80064F80: /* 40380 80064F80 1E20FFEF */ bgtz $s1, .L80064F40 /* 40384 80064F84 2E220021 */ sltiu $v0, $s1, 0x21 .L80064F88: /* 40388 80064F88 8FA20040 */ lw $v0, 0x40($sp) /* 4038C 80064F8C 30420004 */ andi $v0, $v0, 0x4 /* 40390 80064F90 1040FED2 */ beqz $v0, .L80064ADC /* 40394 80064F94 26450001 */ addiu $a1, $s2, 0x1 /* 40398 80064F98 8FA20038 */ lw $v0, 0x38($sp) /* 4039C 80064F9C 1840FECF */ blez $v0, .L80064ADC /* 403A0 80064FA0 00408821 */ addu $s1, $v0, $zero /* 403A4 80064FA4 2E220021 */ sltiu $v0, $s1, 0x21 .L80064FA8: /* 403A8 80064FA8 10400002 */ beqz $v0, .L80064FB4 /* 403AC 80064FAC 24100020 */ addiu $s0, $zero, 0x20 /* 403B0 80064FB0 02208021 */ addu $s0, $s1, $zero .L80064FB4: /* 403B4 80064FB4 5A00000C */ blezl $s0, .L80064FE8 /* 403B8 80064FB8 02308823 */ subu $s1, $s1, $s0 /* 403BC 80064FBC 02602021 */ addu $a0, $s3, $zero /* 403C0 80064FC0 3C058009 */ lui $a1, %hi(spaces) /* 403C4 80064FC4 24A545E0 */ addiu $a1, $a1, %lo(spaces) /* 403C8 80064FC8 0280F809 */ jalr $s4 /* 403CC 80064FCC 02003021 */ addu $a2, $s0, $zero /* 403D0 80064FD0 00409821 */ addu $s3, $v0, $zero /* 403D4 80064FD4 12600008 */ beqz $s3, .L80064FF8 /* 403D8 80064FD8 02308823 */ subu $s1, $s1, $s0 /* 403DC 80064FDC 8FA2003C */ lw $v0, 0x3C($sp) /* 403E0 80064FE0 00501021 */ addu $v0, $v0, $s0 /* 403E4 80064FE4 AFA2003C */ sw $v0, 0x3C($sp) .L80064FE8: /* 403E8 80064FE8 1E20FFEF */ bgtz $s1, .L80064FA8 /* 403EC 80064FEC 2E220021 */ sltiu $v0, $s1, 0x21 /* 403F0 80064FF0 080192B7 */ j .L80064ADC /* 403F4 80064FF4 26450001 */ addiu $a1, $s2, 0x1 .L80064FF8: /* 403F8 80064FF8 8FA2003C */ lw $v0, 0x3C($sp) /* 403FC 80064FFC 8FBF00A8 */ lw $ra, 0xA8($sp) /* 40400 80065000 8FB500A4 */ lw $s5, 0xA4($sp) /* 40404 80065004 8FB400A0 */ lw $s4, 0xA0($sp) /* 40408 80065008 8FB3009C */ lw $s3, 0x9C($sp) /* 4040C 8006500C 8FB20098 */ lw $s2, 0x98($sp) /* 40410 80065010 8FB10094 */ lw $s1, 0x94($sp) /* 40414 80065014 8FB00090 */ lw $s0, 0x90($sp) /* 40418 80065018 03E00008 */ jr $ra /* 4041C 8006501C 27BD00B0 */ addiu $sp, $sp, 0xB0 ### DECOMPILED C INSTRUCTIONS: int _Printf(outfun prout, char *arg, const char *fmt, va_list args) { _Pft x; const char *s; char c; const char *t; static const char fchar[] = {' ', '+', '-', '#', '0', '\0'}; static const int fbit[] = {FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0}; char ac[32]; x.nchar = 0; for (;;) { s = fmt; for (c = *s; c != 0 && c != '%';) { c = *++s; } PUT(fmt, s - fmt); if (c == 0) { return x.nchar; } fmt = ++s; for (x.flags = 0; (t = strchr(fchar, *s)) != NULL; s++) { x.flags |= fbit[t - fchar]; } if (*s == '*') { x.width = va_arg(args, int); if (x.width < 0) { x.width = -x.width; x.flags |= FLAGS_MINUS; } s++; } else { ATOI(x.width, s); } if (*s != '.') { x.prec = -1; } else if (*++s == '*') { x.prec = va_arg(args, int); ++s; } else { ATOI(x.prec, s); } x.qual = strchr("hlL", *s) ? *s++ : '\0'; if (x.qual == 'l' && *s == 'l') { x.qual = 'L'; ++s; } _Putfld(&x, &args, *s, ac); x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2; if (!(x.flags & FLAGS_MINUS)) { PAD(spaces, x.width); } PUT(ac, x.n0); PAD(zeroes, x.nz0); PUT(x.s, x.n1); PAD(zeroes, x.nz1); PUT(x.s + x.n1, x.n2); PAD(zeroes, x.nz2); if (x.flags & FLAGS_MINUS) { PAD(spaces, x.width); } fmt = s + 1; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel radial_shimmer_main /* 366030 E0066000 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 366034 E0066004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 366038 E0066008 4485A000 */ mtc1 $a1, $f20 /* 36603C E006600C F7B60040 */ sdc1 $f22, 0x40($sp) /* 366040 E0066010 4486B000 */ mtc1 $a2, $f22 /* 366044 E0066014 AFB1002C */ sw $s1, 0x2C($sp) /* 366048 E0066018 0080882D */ daddu $s1, $a0, $zero /* 36604C E006601C F7B80048 */ sdc1 $f24, 0x48($sp) /* 366050 E0066020 4487C000 */ mtc1 $a3, $f24 /* 366054 E0066024 27A40010 */ addiu $a0, $sp, 0x10 /* 366058 E0066028 AFB00028 */ sw $s0, 0x28($sp) /* 36605C E006602C 8FB00064 */ lw $s0, 0x64($sp) /* 366060 E0066030 3C02E006 */ lui $v0, %hi(radial_shimmer_init) /* 366064 E0066034 24426490 */ addiu $v0, $v0, %lo(radial_shimmer_init) /* 366068 E0066038 AFA20018 */ sw $v0, 0x18($sp) /* 36606C E006603C 3C02E006 */ lui $v0, %hi(radial_shimmer_update) /* 366070 E0066040 24426498 */ addiu $v0, $v0, %lo(radial_shimmer_update) /* 366074 E0066044 AFA2001C */ sw $v0, 0x1C($sp) /* 366078 E0066048 3C02E006 */ lui $v0, %hi(radial_shimmer_render) /* 36607C E006604C 2442672C */ addiu $v0, $v0, %lo(radial_shimmer_render) /* 366080 E0066050 AFA20020 */ sw $v0, 0x20($sp) /* 366084 E0066054 24020033 */ addiu $v0, $zero, 0x33 /* 366088 E0066058 AFBF0034 */ sw $ra, 0x34($sp) /* 36608C E006605C AFB20030 */ sw $s2, 0x30($sp) /* 366090 E0066060 AFA00010 */ sw $zero, 0x10($sp) /* 366094 E0066064 AFA00024 */ sw $zero, 0x24($sp) /* 366098 E0066068 0C080124 */ jal shim_create_effect_instance /* 36609C E006606C AFA20014 */ sw $v0, 0x14($sp) /* 3660A0 E0066070 24040070 */ addiu $a0, $zero, 0x70 /* 3660A4 E0066074 24030001 */ addiu $v1, $zero, 0x1 /* 3660A8 E0066078 0040902D */ daddu $s2, $v0, $zero /* 3660AC E006607C 0C08012C */ jal shim_general_heap_malloc /* 3660B0 E0066080 AE430008 */ sw $v1, 0x8($s2) /* 3660B4 E0066084 0040202D */ daddu $a0, $v0, $zero /* 3660B8 E0066088 14800003 */ bnez $a0, .LE0066098 /* 3660BC E006608C AE42000C */ sw $v0, 0xC($s2) .LE0066090: /* 3660C0 E0066090 08019824 */ j .LE0066090 /* 3660C4 E0066094 00000000 */ nop .LE0066098: /* 3660C8 E0066098 AC910000 */ sw $s1, 0x0($a0) /* 3660CC E006609C AC900028 */ sw $s0, 0x28($a0) /* 3660D0 E00660A0 AC80002C */ sw $zero, 0x2C($a0) /* 3660D4 E00660A4 AC800024 */ sw $zero, 0x24($a0) /* 3660D8 E00660A8 E4940010 */ swc1 $f20, 0x10($a0) /* 3660DC E00660AC E4960014 */ swc1 $f22, 0x14($a0) /* 3660E0 E00660B0 E4980018 */ swc1 $f24, 0x18($a0) /* 3660E4 E00660B4 E4940004 */ swc1 $f20, 0x4($a0) /* 3660E8 E00660B8 E4960008 */ swc1 $f22, 0x8($a0) /* 3660EC E00660BC E498000C */ swc1 $f24, 0xC($a0) /* 3660F0 E00660C0 C7A00060 */ lwc1 $f0, 0x60($sp) /* 3660F4 E00660C4 3C014080 */ lui $at, (0x40800000 >> 16) /* 3660F8 E00660C8 44811000 */ mtc1 $at, $f2 /* 3660FC E00660CC 3C014120 */ lui $at, (0x41200000 >> 16) /* 366100 E00660D0 44812000 */ mtc1 $at, $f4 /* 366104 E00660D4 3C014248 */ lui $at, (0x42480000 >> 16) /* 366108 E00660D8 44813000 */ mtc1 $at, $f6 /* 36610C E00660DC 240200FF */ addiu $v0, $zero, 0xFF /* 366110 E00660E0 A0820068 */ sb $v0, 0x68($a0) /* 366114 E00660E4 A0820069 */ sb $v0, 0x69($a0) /* 366118 E00660E8 A082006B */ sb $v0, 0x6B($a0) /* 36611C E00660EC A082006C */ sb $v0, 0x6C($a0) /* 366120 E00660F0 A082006D */ sb $v0, 0x6D($a0) /* 366124 E00660F4 E4800020 */ swc1 $f0, 0x20($a0) /* 366128 E00660F8 44800000 */ mtc1 $zero, $f0 /* 36612C E00660FC 2E22000F */ sltiu $v0, $s1, 0xF /* 366130 E0066100 A080006A */ sb $zero, 0x6A($a0) /* 366134 E0066104 E482005C */ swc1 $f2, 0x5C($a0) /* 366138 E0066108 E484001C */ swc1 $f4, 0x1C($a0) /* 36613C E006610C E4860060 */ swc1 $f6, 0x60($a0) /* 366140 E0066110 E4800044 */ swc1 $f0, 0x44($a0) /* 366144 E0066114 E4800040 */ swc1 $f0, 0x40($a0) /* 366148 E0066118 E480004C */ swc1 $f0, 0x4C($a0) /* 36614C E006611C E4800048 */ swc1 $f0, 0x48($a0) /* 366150 E0066120 E4800034 */ swc1 $f0, 0x34($a0) /* 366154 E0066124 E4800030 */ swc1 $f0, 0x30($a0) /* 366158 E0066128 E480003C */ swc1 $f0, 0x3C($a0) /* 36615C E006612C E4800038 */ swc1 $f0, 0x38($a0) /* 366160 E0066130 E4800058 */ swc1 $f0, 0x58($a0) /* 366164 E0066134 E4800050 */ swc1 $f0, 0x50($a0) /* 366168 E0066138 E4800054 */ swc1 $f0, 0x54($a0) /* 36616C E006613C 104000BB */ beqz $v0, .LE006642C /* 366170 E0066140 E4800064 */ swc1 $f0, 0x64($a0) /* 366174 E0066144 00111080 */ sll $v0, $s1, 2 /* 366178 E0066148 3C01E006 */ lui $at, (0xE0066CE0 >> 16) /* 36617C E006614C 00220821 */ addu $at, $at, $v0 /* 366180 E0066150 8C226CE0 */ lw $v0, (0xE0066CE0 & 0xFFFF)($at) /* 366184 E0066154 00400008 */ jr $v0 /* 366188 E0066158 00000000 */ nop /* 36618C E006615C 3C014300 */ lui $at, (0x43000000 >> 16) /* 366190 E0066160 44810000 */ mtc1 $at, $f0 /* 366194 E0066164 3C01428C */ lui $at, (0x428C0000 >> 16) /* 366198 E0066168 44812000 */ mtc1 $at, $f4 /* 36619C E006616C 3C01C2C8 */ lui $at, (0xC2C80000 >> 16) /* 3661A0 E0066170 44813000 */ mtc1 $at, $f6 /* 3661A4 E0066174 44901000 */ mtc1 $s0, $f2 /* 3661A8 E0066178 00000000 */ nop /* 3661AC E006617C 468010A0 */ cvt.s.w $f2, $f2 /* 3661B0 E0066180 E4800040 */ swc1 $f0, 0x40($a0) /* 3661B4 E0066184 46020003 */ div.s $f0, $f0, $f2 /* 3661B8 E0066188 E4800044 */ swc1 $f0, 0x44($a0) /* 3661BC E006618C E4840060 */ swc1 $f4, 0x60($a0) /* 3661C0 E0066190 0801991A */ j .LE0066468 /* 3661C4 E0066194 E4860064 */ swc1 $f6, 0x64($a0) /* 3661C8 E0066198 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 3661CC E006619C 44810000 */ mtc1 $at, $f0 /* 3661D0 E00661A0 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 3661D4 E00661A4 44811000 */ mtc1 $at, $f2 /* 3661D8 E00661A8 3C014040 */ lui $at, (0x40400000 >> 16) /* 3661DC E00661AC 44812000 */ mtc1 $at, $f4 /* 3661E0 E00661B0 3C01C0E0 */ lui $at, (0xC0E00000 >> 16) /* 3661E4 E00661B4 44813000 */ mtc1 $at, $f6 /* 3661E8 E00661B8 08019907 */ j .LE006641C /* 3661EC E00661BC E4800034 */ swc1 $f0, 0x34($a0) /* 3661F0 E00661C0 3C014380 */ lui $at, (0x43800000 >> 16) /* 3661F4 E00661C4 44810000 */ mtc1 $at, $f0 /* 3661F8 E00661C8 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 3661FC E00661CC 44812000 */ mtc1 $at, $f4 /* 366200 E00661D0 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 366204 E00661D4 44811000 */ mtc1 $at, $f2 /* 366208 E00661D8 3C01C080 */ lui $at, (0xC0800000 >> 16) /* 36620C E00661DC 44813000 */ mtc1 $at, $f6 /* 366210 E00661E0 240200EB */ addiu $v0, $zero, 0xEB /* 366214 E00661E4 A0820068 */ sb $v0, 0x68($a0) /* 366218 E00661E8 A0820069 */ sb $v0, 0x69($a0) /* 36621C E00661EC A082006A */ sb $v0, 0x6A($a0) /* 366220 E00661F0 E4800040 */ swc1 $f0, 0x40($a0) /* 366224 E00661F4 E4800048 */ swc1 $f0, 0x48($a0) /* 366228 E00661F8 E4840034 */ swc1 $f4, 0x34($a0) /* 36622C E00661FC E4820044 */ swc1 $f2, 0x44($a0) /* 366230 E0066200 E482003C */ swc1 $f2, 0x3C($a0) /* 366234 E0066204 0801991A */ j .LE0066468 /* 366238 E0066208 E486004C */ swc1 $f6, 0x4C($a0) /* 36623C E006620C 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 366240 E0066210 44811000 */ mtc1 $at, $f2 /* 366244 E0066214 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 366248 E0066218 44810000 */ mtc1 $at, $f0 /* 36624C E006621C 3C01C0A0 */ lui $at, (0xC0A00000 >> 16) /* 366250 E0066220 44812000 */ mtc1 $at, $f4 /* 366254 E0066224 24020014 */ addiu $v0, $zero, 0x14 /* 366258 E0066228 A0820068 */ sb $v0, 0x68($a0) /* 36625C E006622C 240200C8 */ addiu $v0, $zero, 0xC8 /* 366260 E0066230 A0820069 */ sb $v0, 0x69($a0) /* 366264 E0066234 24020020 */ addiu $v0, $zero, 0x20 /* 366268 E0066238 080198E6 */ j .LE0066398 /* 36626C E006623C A082006A */ sb $v0, 0x6A($a0) /* 366270 E0066240 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 366274 E0066244 44810000 */ mtc1 $at, $f0 /* 366278 E0066248 3C014040 */ lui $at, (0x40400000 >> 16) /* 36627C E006624C 44811000 */ mtc1 $at, $f2 /* 366280 E0066250 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 366284 E0066254 44812000 */ mtc1 $at, $f4 /* 366288 E0066258 E4800034 */ swc1 $f0, 0x34($a0) /* 36628C E006625C E4820044 */ swc1 $f2, 0x44($a0) /* 366290 E0066260 E482003C */ swc1 $f2, 0x3C($a0) /* 366294 E0066264 0801991A */ j .LE0066468 /* 366298 E0066268 E484004C */ swc1 $f4, 0x4C($a0) /* 36629C E006626C 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 3662A0 E0066270 44810000 */ mtc1 $at, $f0 /* 3662A4 E0066274 3C014040 */ lui $at, (0x40400000 >> 16) /* 3662A8 E0066278 44811000 */ mtc1 $at, $f2 /* 3662AC E006627C 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 3662B0 E0066280 44812000 */ mtc1 $at, $f4 /* 3662B4 E0066284 3C014080 */ lui $at, (0x40800000 >> 16) /* 3662B8 E0066288 44813000 */ mtc1 $at, $f6 /* 3662BC E006628C 240200EB */ addiu $v0, $zero, 0xEB /* 3662C0 E0066290 A0820068 */ sb $v0, 0x68($a0) /* 3662C4 E0066294 A0820069 */ sb $v0, 0x69($a0) /* 3662C8 E0066298 08019906 */ j .LE0066418 /* 3662CC E006629C A082006A */ sb $v0, 0x6A($a0) /* 3662D0 E00662A0 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 3662D4 E00662A4 44810000 */ mtc1 $at, $f0 /* 3662D8 E00662A8 3C014040 */ lui $at, (0x40400000 >> 16) /* 3662DC E00662AC 44811000 */ mtc1 $at, $f2 /* 3662E0 E00662B0 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 3662E4 E00662B4 44812000 */ mtc1 $at, $f4 /* 3662E8 E00662B8 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 3662EC E00662BC 44813000 */ mtc1 $at, $f6 /* 3662F0 E00662C0 240200FF */ addiu $v0, $zero, 0xFF /* 3662F4 E00662C4 A0820068 */ sb $v0, 0x68($a0) /* 3662F8 E00662C8 24020064 */ addiu $v0, $zero, 0x64 /* 3662FC E00662CC A0820069 */ sb $v0, 0x69($a0) /* 366300 E00662D0 24020020 */ addiu $v0, $zero, 0x20 /* 366304 E00662D4 08019906 */ j .LE0066418 /* 366308 E00662D8 A082006A */ sb $v0, 0x6A($a0) /* 36630C E00662DC 240300D7 */ addiu $v1, $zero, 0xD7 /* 366310 E00662E0 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 366314 E00662E4 44811000 */ mtc1 $at, $f2 /* 366318 E00662E8 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 36631C E00662EC 44810000 */ mtc1 $at, $f0 /* 366320 E00662F0 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 366324 E00662F4 44812000 */ mtc1 $at, $f4 /* 366328 E00662F8 240200D0 */ addiu $v0, $zero, 0xD0 /* 36632C E00662FC A0820069 */ sb $v0, 0x69($a0) /* 366330 E0066300 240200FF */ addiu $v0, $zero, 0xFF /* 366334 E0066304 A0830068 */ sb $v1, 0x68($a0) /* 366338 E0066308 A080006A */ sb $zero, 0x6A($a0) /* 36633C E006630C A083006B */ sb $v1, 0x6B($a0) /* 366340 E0066310 080198E5 */ j .LE0066394 /* 366344 E0066314 A082006C */ sb $v0, 0x6C($a0) /* 366348 E0066318 3C014300 */ lui $at, (0x43000000 >> 16) /* 36634C E006631C 44810000 */ mtc1 $at, $f0 /* 366350 E0066320 3C01C2C8 */ lui $at, (0xC2C80000 >> 16) /* 366354 E0066324 44812000 */ mtc1 $at, $f4 /* 366358 E0066328 44901000 */ mtc1 $s0, $f2 /* 36635C E006632C 00000000 */ nop /* 366360 E0066330 468010A0 */ cvt.s.w $f2, $f2 /* 366364 E0066334 E4800040 */ swc1 $f0, 0x40($a0) /* 366368 E0066338 46020003 */ div.s $f0, $f0, $f2 /* 36636C E006633C E4800044 */ swc1 $f0, 0x44($a0) /* 366370 E0066340 0801991A */ j .LE0066468 /* 366374 E0066344 E4840064 */ swc1 $f4, 0x64($a0) /* 366378 E0066348 24020020 */ addiu $v0, $zero, 0x20 /* 36637C E006634C 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 366380 E0066350 44811000 */ mtc1 $at, $f2 /* 366384 E0066354 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 366388 E0066358 44810000 */ mtc1 $at, $f0 /* 36638C E006635C 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 366390 E0066360 44812000 */ mtc1 $at, $f4 /* 366394 E0066364 240300FF */ addiu $v1, $zero, 0xFF /* 366398 E0066368 A0820069 */ sb $v0, 0x69($a0) /* 36639C E006636C 24020007 */ addiu $v0, $zero, 0x7 /* 3663A0 E0066370 A0800068 */ sb $zero, 0x68($a0) /* 3663A4 E0066374 A0820068 */ sb $v0, 0x68($a0) /* 3663A8 E0066378 240200D8 */ addiu $v0, $zero, 0xD8 /* 3663AC E006637C A083006A */ sb $v1, 0x6A($a0) /* 3663B0 E0066380 A082006A */ sb $v0, 0x6A($a0) /* 3663B4 E0066384 240200E4 */ addiu $v0, $zero, 0xE4 /* 3663B8 E0066388 A0800069 */ sb $zero, 0x69($a0) /* 3663BC E006638C A082006B */ sb $v0, 0x6B($a0) /* 3663C0 E0066390 A083006C */ sb $v1, 0x6C($a0) .LE0066394: /* 3663C4 E0066394 A080006D */ sb $zero, 0x6D($a0) .LE0066398: /* 3663C8 E0066398 E4820034 */ swc1 $f2, 0x34($a0) /* 3663CC E006639C E4800044 */ swc1 $f0, 0x44($a0) /* 3663D0 E00663A0 E480003C */ swc1 $f0, 0x3C($a0) /* 3663D4 E00663A4 0801991A */ j .LE0066468 /* 3663D8 E00663A8 E484004C */ swc1 $f4, 0x4C($a0) /* 3663DC E00663AC 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 3663E0 E00663B0 44810000 */ mtc1 $at, $f0 /* 3663E4 E00663B4 3C014100 */ lui $at, (0x41000000 >> 16) /* 3663E8 E00663B8 44811000 */ mtc1 $at, $f2 /* 3663EC E00663BC 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 3663F0 E00663C0 44812000 */ mtc1 $at, $f4 /* 3663F4 E00663C4 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 3663F8 E00663C8 44813000 */ mtc1 $at, $f6 /* 3663FC E00663CC 24020007 */ addiu $v0, $zero, 0x7 /* 366400 E00663D0 A0820068 */ sb $v0, 0x68($a0) /* 366404 E00663D4 240200D8 */ addiu $v0, $zero, 0xD8 /* 366408 E00663D8 A082006A */ sb $v0, 0x6A($a0) /* 36640C E00663DC 240200E4 */ addiu $v0, $zero, 0xE4 /* 366410 E00663E0 A082006B */ sb $v0, 0x6B($a0) /* 366414 E00663E4 240200FF */ addiu $v0, $zero, 0xFF /* 366418 E00663E8 A0800069 */ sb $zero, 0x69($a0) /* 36641C E00663EC A082006C */ sb $v0, 0x6C($a0) /* 366420 E00663F0 08019906 */ j .LE0066418 /* 366424 E00663F4 A080006D */ sb $zero, 0x6D($a0) /* 366428 E00663F8 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 36642C E00663FC 44810000 */ mtc1 $at, $f0 /* 366430 E0066400 3C01C040 */ lui $at, (0xC0400000 >> 16) /* 366434 E0066404 44811000 */ mtc1 $at, $f2 /* 366438 E0066408 3C01C0A0 */ lui $at, (0xC0A00000 >> 16) /* 36643C E006640C 44812000 */ mtc1 $at, $f4 /* 366440 E0066410 3C01C080 */ lui $at, (0xC0800000 >> 16) /* 366444 E0066414 44813000 */ mtc1 $at, $f6 .LE0066418: /* 366448 E0066418 E4800034 */ swc1 $f0, 0x34($a0) .LE006641C: /* 36644C E006641C E4820044 */ swc1 $f2, 0x44($a0) /* 366450 E0066420 E484003C */ swc1 $f4, 0x3C($a0) /* 366454 E0066424 0801991A */ j .LE0066468 /* 366458 E0066428 E486004C */ swc1 $f6, 0x4C($a0) .LE006642C: /* 36645C E006642C 3C014080 */ lui $at, (0x40800000 >> 16) /* 366460 E0066430 44810000 */ mtc1 $at, $f0 /* 366464 E0066434 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 366468 E0066438 44811000 */ mtc1 $at, $f2 /* 36646C E006643C 3C014060 */ lui $at, (0x40600000 >> 16) /* 366470 E0066440 44812000 */ mtc1 $at, $f4 /* 366474 E0066444 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 366478 E0066448 44813000 */ mtc1 $at, $f6 /* 36647C E006644C 3C01C2D4 */ lui $at, (0xC2D40000 >> 16) /* 366480 E0066450 44814000 */ mtc1 $at, $f8 /* 366484 E0066454 E4800040 */ swc1 $f0, 0x40($a0) /* 366488 E0066458 E4820034 */ swc1 $f2, 0x34($a0) /* 36648C E006645C E484004C */ swc1 $f4, 0x4C($a0) /* 366490 E0066460 E4860060 */ swc1 $f6, 0x60($a0) /* 366494 E0066464 E4880064 */ swc1 $f8, 0x64($a0) .LE0066468: /* 366498 E0066468 0240102D */ daddu $v0, $s2, $zero /* 36649C E006646C 8FBF0034 */ lw $ra, 0x34($sp) /* 3664A0 E0066470 8FB20030 */ lw $s2, 0x30($sp) /* 3664A4 E0066474 8FB1002C */ lw $s1, 0x2C($sp) /* 3664A8 E0066478 8FB00028 */ lw $s0, 0x28($sp) /* 3664AC E006647C D7B80048 */ ldc1 $f24, 0x48($sp) /* 3664B0 E0066480 D7B60040 */ ldc1 $f22, 0x40($sp) /* 3664B4 E0066484 D7B40038 */ ldc1 $f20, 0x38($sp) /* 3664B8 E0066488 03E00008 */ jr $ra /* 3664BC E006648C 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: EffectInstance* radial_shimmer_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectInstance* effect; RadialShimmerFXData* data; s32 numParts = 1; s32 arg5_2 = arg5; bp.init = radial_shimmer_init; bp.update = radial_shimmer_update; bp.renderWorld = radial_shimmer_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_RADIAL_SHIMMER; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = effect->data.radialShimmer = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.radialShimmer != NULL); data->unk_00 = arg0; data->timeLeft = arg5_2; data->unk_24 = data->lifeTime = 0; data->unk_10 = arg1; data->unk_14 = arg2; data->unk_18 = arg3; data->unk_04 = arg1; data->unk_08 = arg2; data->unk_0C = arg3; data->unk_20 = arg4; data->unk_68 = 255; data->unk_69 = 255; data->unk_6A = 0; data->unk_6B = 255; data->unk_6C = 255; data->unk_6D = 255; data->unk_5C = 4.0f; data->unk_1C = 10.0f; data->unk_60 = 50.0f; data->unk_40 = data->unk_44 = 0.0f; data->unk_48 = data->unk_4C = 0.0f; data->unk_30 = data->unk_34 = 0.0f; data->unk_38 = data->unk_3C = 0.0f; data->unk_50 = data->unk_58 = 0.0f; data->unk_54 = 0.0f; data->unk_64 = 0.0f; switch (arg0) { case 0: case 1: data->unk_40 = 128.0f; data->unk_44 = 128.0f / arg5_2; data->unk_60 = 70.0f; data->unk_64 = -100.0f; break; case 2: data->unk_34 = 7.0f; data->unk_44 = -3.0f; data->unk_3C = 3.0f; data->unk_4C = -7.0f; break; case 3: data->unk_68 = 235; data->unk_69 = 235; data->unk_6A = 235; data->unk_40 = 256.0f; data->unk_48 = 256.0f; data->unk_34 = 7.0f; data->unk_44 = -3.0f; data->unk_3C = -3.0f; data->unk_4C = -4.0f; break; case 4: data->unk_68 = 20; data->unk_69 = 200; data->unk_6A = 32; data->unk_34 = 7.0f; data->unk_44 = -3.0f; data->unk_3C = -3.0f; data->unk_4C = -5.0f; break; case 5: data->unk_34 = 7.0f; data->unk_44 = 3.0f; data->unk_3C = 3.0f; data->unk_4C = 5.0f; break; case 6: data->unk_68 = 235; data->unk_69 = 235; data->unk_6A = 235; data->unk_34 = 7.0f; data->unk_44 = 3.0f; data->unk_3C = -3.0f; data->unk_4C = 4.0f; break; case 7: data->unk_68 = 255; data->unk_69 = 100; data->unk_6A = 32; data->unk_34 = 7.0f; data->unk_44 = 3.0f; data->unk_3C = -3.0f; data->unk_4C = 5.0f; break; case 8: data->unk_68 = 215; data->unk_69 = 208; data->unk_6A = 0; data->unk_6B = 215; data->unk_6C = 255; data->unk_6D = 0; data->unk_34 = 7.0f; data->unk_44 = -3.0f; data->unk_3C = -3.0f; data->unk_4C = -2.0f; break; case 9: data->unk_40 = 128.0f; data->unk_44 = 128.0f / arg5_2; data->unk_64 = -100.0f; break; case 10: data->unk_68 = 0; data->unk_69 = 32; data->unk_6A = 255; data->unk_68 = 7; data->unk_69 = 0; data->unk_6A = 216; data->unk_6B = 228; data->unk_6C = 255; data->unk_6D = 0; data->unk_34 = 7.0f; data->unk_44 = -3.0f; data->unk_3C = -3.0f; data->unk_4C = -2.0f; break; case 11: data->unk_68 = 7; data->unk_69 = 0; data->unk_6A = 216; data->unk_6B = 228; data->unk_6C = 255; data->unk_6D = 0; data->unk_34 = 7.0f; data->unk_44 = 8.0f; data->unk_3C = -3.0f; data->unk_4C = 6.0f; break; case 12: case 13: data->unk_34 = 7.0f; data->unk_44 = -3.0f; data->unk_3C = -5.0f; data->unk_4C = -4.0f; break; case 14: default: data->unk_40 = 4.0f; data->unk_34 = 7.0f; data->unk_4C = 3.5f; data->unk_60 = 20.0f; data->unk_64 = -106.0f; break; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel draw_mash_meter /* 196B64 80268284 27BDFF98 */ addiu $sp, $sp, -0x68 /* 196B68 80268288 3C0B802A */ lui $t3, %hi(gActionCommandStatus) /* 196B6C 8026828C 256BFBE0 */ addiu $t3, $t3, %lo(gActionCommandStatus) /* 196B70 80268290 AFBF0064 */ sw $ra, 0x64($sp) /* 196B74 80268294 AFBE0060 */ sw $fp, 0x60($sp) /* 196B78 80268298 AFB7005C */ sw $s7, 0x5C($sp) /* 196B7C 8026829C AFB60058 */ sw $s6, 0x58($sp) /* 196B80 802682A0 AFB50054 */ sw $s5, 0x54($sp) /* 196B84 802682A4 AFB40050 */ sw $s4, 0x50($sp) /* 196B88 802682A8 AFB3004C */ sw $s3, 0x4C($sp) /* 196B8C 802682AC AFB20048 */ sw $s2, 0x48($sp) /* 196B90 802682B0 AFB10044 */ sw $s1, 0x44($sp) /* 196B94 802682B4 AFB00040 */ sw $s0, 0x40($sp) /* 196B98 802682B8 AFA40068 */ sw $a0, 0x68($sp) /* 196B9C 802682BC AFA5006C */ sw $a1, 0x6C($sp) /* 196BA0 802682C0 AFA70074 */ sw $a3, 0x74($sp) /* 196BA4 802682C4 81620061 */ lb $v0, 0x61($t3) /* 196BA8 802682C8 1040011D */ beqz $v0, .L80268740 /* 196BAC 802682CC 00C0602D */ daddu $t4, $a2, $zero /* 196BB0 802682D0 0080702D */ daddu $t6, $a0, $zero /* 196BB4 802682D4 25CEFFE4 */ addiu $t6, $t6, -0x1C /* 196BB8 802682D8 AFAE0068 */ sw $t6, 0x68($sp) /* 196BBC 802682DC 00A0702D */ daddu $t6, $a1, $zero /* 196BC0 802682E0 81630080 */ lb $v1, 0x80($t3) /* 196BC4 802682E4 25CEFFFC */ addiu $t6, $t6, -0x4 /* 196BC8 802682E8 AFAE006C */ sw $t6, 0x6C($sp) /* 196BCC 802682EC 00031040 */ sll $v0, $v1, 1 /* 196BD0 802682F0 004B1021 */ addu $v0, $v0, $t3 /* 196BD4 802682F4 844D0074 */ lh $t5, 0x74($v0) /* 196BD8 802682F8 05820001 */ bltzl $t4, .L80268300 /* 196BDC 802682FC 0000602D */ daddu $t4, $zero, $zero .L80268300: /* 196BE0 80268300 0000802D */ daddu $s0, $zero, $zero /* 196BE4 80268304 18600020 */ blez $v1, .L80268388 /* 196BE8 80268308 0200902D */ daddu $s2, $s0, $zero /* 196BEC 8026830C 0060282D */ daddu $a1, $v1, $zero /* 196BF0 80268310 26440001 */ addiu $a0, $s2, 0x1 .L80268314: /* 196BF4 80268314 00041040 */ sll $v0, $a0, 1 /* 196BF8 80268318 01621021 */ addu $v0, $t3, $v0 /* 196BFC 8026831C 84460074 */ lh $a2, 0x74($v0) /* 196C00 80268320 0186102A */ slt $v0, $t4, $a2 /* 196C04 80268324 54400001 */ bnel $v0, $zero, .L8026832C /* 196C08 80268328 0180302D */ daddu $a2, $t4, $zero .L8026832C: /* 196C0C 8026832C 00061900 */ sll $v1, $a2, 4 /* 196C10 80268330 00661823 */ subu $v1, $v1, $a2 /* 196C14 80268334 00031880 */ sll $v1, $v1, 2 /* 196C18 80268338 15A00002 */ bnez $t5, .L80268344 /* 196C1C 8026833C 006D001A */ div $zero, $v1, $t5 /* 196C20 80268340 0007000D */ break 7 .L80268344: /* 196C24 80268344 2401FFFF */ addiu $at, $zero, -0x1 /* 196C28 80268348 15A10004 */ bne $t5, $at, .L8026835C /* 196C2C 8026834C 3C018000 */ lui $at, (0x80000000 >> 16) /* 196C30 80268350 14610002 */ bne $v1, $at, .L8026835C /* 196C34 80268354 00000000 */ nop /* 196C38 80268358 0006000D */ break 6 .L8026835C: /* 196C3C 8026835C 00001812 */ mflo $v1 /* 196C40 80268360 00031040 */ sll $v0, $v1, 1 /* 196C44 80268364 00431021 */ addu $v0, $v0, $v1 /* 196C48 80268368 000210C0 */ sll $v0, $v0, 3 /* 196C4C 8026836C 00431021 */ addu $v0, $v0, $v1 /* 196C50 80268370 11860005 */ beq $t4, $a2, .L80268388 /* 196C54 80268374 00028080 */ sll $s0, $v0, 2 /* 196C58 80268378 0080902D */ daddu $s2, $a0, $zero /* 196C5C 8026837C 0245102A */ slt $v0, $s2, $a1 /* 196C60 80268380 1440FFE4 */ bnez $v0, .L80268314 /* 196C64 80268384 26440001 */ addiu $a0, $s2, 0x1 .L80268388: /* 196C68 80268388 85620048 */ lh $v0, 0x48($t3) /* 196C6C 8026838C 3C04802A */ lui $a0, %hi(D_8029FBC0) /* 196C70 80268390 8C84FBC0 */ lw $a0, %lo(D_8029FBC0)($a0) /* 196C74 80268394 95650048 */ lhu $a1, 0x48($t3) /* 196C78 80268398 0202A823 */ subu $s5, $s0, $v0 /* 196C7C 8026839C 06A10002 */ bgez $s5, .L802683A8 /* 196C80 802683A0 02A0182D */ daddu $v1, $s5, $zero /* 196C84 802683A4 00031823 */ negu $v1, $v1 .L802683A8: /* 196C88 802683A8 00041040 */ sll $v0, $a0, 1 /* 196C8C 802683AC 00441021 */ addu $v0, $v0, $a0 /* 196C90 802683B0 000210C0 */ sll $v0, $v0, 3 /* 196C94 802683B4 00441021 */ addu $v0, $v0, $a0 /* 196C98 802683B8 00021080 */ sll $v0, $v0, 2 /* 196C9C 802683BC 0062182A */ slt $v1, $v1, $v0 /* 196CA0 802683C0 5460000D */ bnel $v1, $zero, .L802683F8 /* 196CA4 802683C4 A5700048 */ sh $s0, 0x48($t3) /* 196CA8 802683C8 14800002 */ bnez $a0, .L802683D4 /* 196CAC 802683CC 02A4001A */ div $zero, $s5, $a0 /* 196CB0 802683D0 0007000D */ break 7 .L802683D4: /* 196CB4 802683D4 2401FFFF */ addiu $at, $zero, -0x1 /* 196CB8 802683D8 14810004 */ bne $a0, $at, .L802683EC /* 196CBC 802683DC 3C018000 */ lui $at, (0x80000000 >> 16) /* 196CC0 802683E0 16A10002 */ bne $s5, $at, .L802683EC /* 196CC4 802683E4 00000000 */ nop /* 196CC8 802683E8 0006000D */ break 6 .L802683EC: /* 196CCC 802683EC 00001012 */ mflo $v0 /* 196CD0 802683F0 00A21021 */ addu $v0, $a1, $v0 /* 196CD4 802683F4 A5620048 */ sh $v0, 0x48($t3) .L802683F8: /* 196CD8 802683F8 0000A82D */ daddu $s5, $zero, $zero /* 196CDC 802683FC 81620080 */ lb $v0, 0x80($t3) /* 196CE0 80268400 18400060 */ blez $v0, .L80268584 /* 196CE4 80268404 02A0902D */ daddu $s2, $s5, $zero /* 196CE8 80268408 8FAE006C */ lw $t6, 0x6C($sp) /* 196CEC 8026840C 000E1400 */ sll $v0, $t6, 16 /* 196CF0 80268410 00021403 */ sra $v0, $v0, 16 /* 196CF4 80268414 AFA20020 */ sw $v0, 0x20($sp) /* 196CF8 80268418 25C20005 */ addiu $v0, $t6, 0x5 /* 196CFC 8026841C 00021400 */ sll $v0, $v0, 16 /* 196D00 80268420 00021403 */ sra $v0, $v0, 16 /* 196D04 80268424 AFA20024 */ sw $v0, 0x24($sp) /* 196D08 80268428 265E0001 */ addiu $fp, $s2, 0x1 .L8026842C: /* 196D0C 8026842C 001E1040 */ sll $v0, $fp, 1 /* 196D10 80268430 01621021 */ addu $v0, $t3, $v0 /* 196D14 80268434 84460074 */ lh $a2, 0x74($v0) /* 196D18 80268438 00061900 */ sll $v1, $a2, 4 /* 196D1C 8026843C 00661823 */ subu $v1, $v1, $a2 /* 196D20 80268440 00031880 */ sll $v1, $v1, 2 /* 196D24 80268444 15A00002 */ bnez $t5, .L80268450 /* 196D28 80268448 006D001A */ div $zero, $v1, $t5 /* 196D2C 8026844C 0007000D */ break 7 .L80268450: /* 196D30 80268450 2401FFFF */ addiu $at, $zero, -0x1 /* 196D34 80268454 15A10004 */ bne $t5, $at, .L80268468 /* 196D38 80268458 3C018000 */ lui $at, (0x80000000 >> 16) /* 196D3C 8026845C 14610002 */ bne $v1, $at, .L80268468 /* 196D40 80268460 00000000 */ nop /* 196D44 80268464 0006000D */ break 6 .L80268468: /* 196D48 80268468 00001812 */ mflo $v1 /* 196D4C 8026846C 8FAE0068 */ lw $t6, 0x68($sp) /* 196D50 80268470 8FA50020 */ lw $a1, 0x20($sp) /* 196D54 80268474 8FA70024 */ lw $a3, 0x24($sp) /* 196D58 80268478 01D53021 */ addu $a2, $t6, $s5 /* 196D5C 8026847C 00062400 */ sll $a0, $a2, 16 /* 196D60 80268480 00042403 */ sra $a0, $a0, 16 /* 196D64 80268484 00121040 */ sll $v0, $s2, 1 /* 196D68 80268488 0052A021 */ addu $s4, $v0, $s2 /* 196D6C 8026848C 26970001 */ addiu $s7, $s4, 0x1 /* 196D70 80268490 3C0E8029 */ lui $t6, %hi(D_80294190) /* 196D74 80268494 25CE4190 */ addiu $t6, $t6, %lo(D_80294190) /* 196D78 80268498 02EE1021 */ addu $v0, $s7, $t6 /* 196D7C 8026849C 26960002 */ addiu $s6, $s4, 0x2 /* 196D80 802684A0 904A0000 */ lbu $t2, 0x0($v0) /* 196D84 802684A4 02CE1021 */ addu $v0, $s6, $t6 /* 196D88 802684A8 90490000 */ lbu $t1, 0x0($v0) /* 196D8C 802684AC 028E1021 */ addu $v0, $s4, $t6 /* 196D90 802684B0 90420000 */ lbu $v0, 0x0($v0) /* 196D94 802684B4 240E00FF */ addiu $t6, $zero, 0xFF /* 196D98 802684B8 AFAE001C */ sw $t6, 0x1C($sp) /* 196D9C 802684BC AFAB0030 */ sw $t3, 0x30($sp) /* 196DA0 802684C0 AFAC0034 */ sw $t4, 0x34($sp) /* 196DA4 802684C4 AFAD0038 */ sw $t5, 0x38($sp) /* 196DA8 802684C8 AFA20010 */ sw $v0, 0x10($sp) /* 196DAC 802684CC AFAA0014 */ sw $t2, 0x14($sp) /* 196DB0 802684D0 AFA90018 */ sw $t1, 0x18($sp) /* 196DB4 802684D4 00758023 */ subu $s0, $v1, $s5 /* 196DB8 802684D8 00D08821 */ addu $s1, $a2, $s0 /* 196DBC 802684DC 00111400 */ sll $v0, $s1, 16 /* 196DC0 802684E0 00029C03 */ sra $s3, $v0, 16 /* 196DC4 802684E4 0C00AAB1 */ jal startup_draw_prim_rect_COPY /* 196DC8 802684E8 0260302D */ daddu $a2, $s3, $zero /* 196DCC 802684EC 8FAB0030 */ lw $t3, 0x30($sp) /* 196DD0 802684F0 8FAC0034 */ lw $t4, 0x34($sp) /* 196DD4 802684F4 81620080 */ lb $v0, 0x80($t3) /* 196DD8 802684F8 8FAD0038 */ lw $t5, 0x38($sp) /* 196DDC 802684FC 2442FFFF */ addiu $v0, $v0, -0x1 /* 196DE0 80268500 0242102A */ slt $v0, $s2, $v0 /* 196DE4 80268504 1040001D */ beqz $v0, .L8026857C /* 196DE8 80268508 2624FFFF */ addiu $a0, $s1, -0x1 /* 196DEC 8026850C 00042400 */ sll $a0, $a0, 16 /* 196DF0 80268510 00042403 */ sra $a0, $a0, 16 /* 196DF4 80268514 0260302D */ daddu $a2, $s3, $zero /* 196DF8 80268518 3C0E8029 */ lui $t6, %hi(D_802941B0) /* 196DFC 8026851C 25CE41B0 */ addiu $t6, $t6, %lo(D_802941B0) /* 196E00 80268520 02EE1021 */ addu $v0, $s7, $t6 /* 196E04 80268524 904A0000 */ lbu $t2, 0x0($v0) /* 196E08 80268528 02CE1021 */ addu $v0, $s6, $t6 /* 196E0C 8026852C 90490000 */ lbu $t1, 0x0($v0) /* 196E10 80268530 028E1021 */ addu $v0, $s4, $t6 /* 196E14 80268534 02B0A821 */ addu $s5, $s5, $s0 /* 196E18 80268538 8FA50020 */ lw $a1, 0x20($sp) /* 196E1C 8026853C 8FA70024 */ lw $a3, 0x24($sp) /* 196E20 80268540 90420000 */ lbu $v0, 0x0($v0) /* 196E24 80268544 240E00FF */ addiu $t6, $zero, 0xFF /* 196E28 80268548 AFAE001C */ sw $t6, 0x1C($sp) /* 196E2C 8026854C AFA20010 */ sw $v0, 0x10($sp) /* 196E30 80268550 AFAA0014 */ sw $t2, 0x14($sp) /* 196E34 80268554 0C00AAB1 */ jal startup_draw_prim_rect_COPY /* 196E38 80268558 AFA90018 */ sw $t1, 0x18($sp) /* 196E3C 8026855C 03C0902D */ daddu $s2, $fp, $zero /* 196E40 80268560 8FAB0030 */ lw $t3, 0x30($sp) /* 196E44 80268564 8FAC0034 */ lw $t4, 0x34($sp) /* 196E48 80268568 81620080 */ lb $v0, 0x80($t3) /* 196E4C 8026856C 8FAD0038 */ lw $t5, 0x38($sp) /* 196E50 80268570 0242102A */ slt $v0, $s2, $v0 /* 196E54 80268574 1440FFAD */ bnez $v0, .L8026842C /* 196E58 80268578 265E0001 */ addiu $fp, $s2, 0x1 .L8026857C: /* 196E5C 8026857C 0000A82D */ daddu $s5, $zero, $zero /* 196E60 80268580 81620080 */ lb $v0, 0x80($t3) .L80268584: /* 196E64 80268584 1840006E */ blez $v0, .L80268740 /* 196E68 80268588 02A0902D */ daddu $s2, $s5, $zero /* 196E6C 8026858C 8FAE006C */ lw $t6, 0x6C($sp) /* 196E70 80268590 25C20005 */ addiu $v0, $t6, 0x5 /* 196E74 80268594 00021400 */ sll $v0, $v0, 16 /* 196E78 80268598 AFA20028 */ sw $v0, 0x28($sp) /* 196E7C 8026859C 241E0002 */ addiu $fp, $zero, 0x2 /* 196E80 802685A0 03C0B02D */ daddu $s6, $fp, $zero /* 196E84 802685A4 24140001 */ addiu $s4, $zero, 0x1 /* 196E88 802685A8 3C178029 */ lui $s7, %hi(D_802941A0) /* 196E8C 802685AC 26F741A0 */ addiu $s7, $s7, %lo(D_802941A0) /* 196E90 802685B0 02E0982D */ daddu $s3, $s7, $zero .L802685B4: /* 196E94 802685B4 8FAE0074 */ lw $t6, 0x74($sp) /* 196E98 802685B8 11C0000B */ beqz $t6, .L802685E8 /* 196E9C 802685BC 02971021 */ addu $v0, $s4, $s7 /* 196EA0 802685C0 19C00003 */ blez $t6, .L802685D0 /* 196EA4 802685C4 240800E0 */ addiu $t0, $zero, 0xE0 /* 196EA8 802685C8 0809A182 */ j .L80268608 /* 196EAC 802685CC 240A003F */ addiu $t2, $zero, 0x3F .L802685D0: /* 196EB0 802685D0 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 196EB4 802685D4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 196EB8 802685D8 94420134 */ lhu $v0, 0x134($v0) /* 196EBC 802685DC 30420001 */ andi $v0, $v0, 0x1 /* 196EC0 802685E0 10400007 */ beqz $v0, .L80268600 /* 196EC4 802685E4 02971021 */ addu $v0, $s4, $s7 .L802685E8: /* 196EC8 802685E8 904A0000 */ lbu $t2, 0x0($v0) /* 196ECC 802685EC 02D71021 */ addu $v0, $s6, $s7 /* 196ED0 802685F0 92680000 */ lbu $t0, 0x0($s3) /* 196ED4 802685F4 90490000 */ lbu $t1, 0x0($v0) /* 196ED8 802685F8 0809A184 */ j .L80268610 /* 196EDC 802685FC 017E1021 */ addu $v0, $t3, $fp .L80268600: /* 196EE0 80268600 240800FA */ addiu $t0, $zero, 0xFA /* 196EE4 80268604 240A00AF */ addiu $t2, $zero, 0xAF .L80268608: /* 196EE8 80268608 0000482D */ daddu $t1, $zero, $zero /* 196EEC 8026860C 017E1021 */ addu $v0, $t3, $fp .L80268610: /* 196EF0 80268610 84460074 */ lh $a2, 0x74($v0) /* 196EF4 80268614 0186102A */ slt $v0, $t4, $a2 /* 196EF8 80268618 54400001 */ bnel $v0, $zero, .L80268620 /* 196EFC 8026861C 0180302D */ daddu $a2, $t4, $zero .L80268620: /* 196F00 80268620 00062100 */ sll $a0, $a2, 4 /* 196F04 80268624 00862023 */ subu $a0, $a0, $a2 /* 196F08 80268628 00042080 */ sll $a0, $a0, 2 /* 196F0C 8026862C 15A00002 */ bnez $t5, .L80268638 /* 196F10 80268630 008D001A */ div $zero, $a0, $t5 /* 196F14 80268634 0007000D */ break 7 .L80268638: /* 196F18 80268638 2401FFFF */ addiu $at, $zero, -0x1 /* 196F1C 8026863C 15A10004 */ bne $t5, $at, .L80268650 /* 196F20 80268640 3C018000 */ lui $at, (0x80000000 >> 16) /* 196F24 80268644 14810002 */ bne $a0, $at, .L80268650 /* 196F28 80268648 00000000 */ nop /* 196F2C 8026864C 0006000D */ break 6 .L80268650: /* 196F30 80268650 00002012 */ mflo $a0 /* 196F34 80268654 3C0551EB */ lui $a1, (0x51EB851F >> 16) /* 196F38 80268658 95630048 */ lhu $v1, 0x48($t3) /* 196F3C 8026865C 34A5851F */ ori $a1, $a1, (0x51EB851F & 0xFFFF) /* 196F40 80268660 00031C00 */ sll $v1, $v1, 16 /* 196F44 80268664 00031403 */ sra $v0, $v1, 16 /* 196F48 80268668 00450018 */ mult $v0, $a1 /* 196F4C 8026866C 00031FC3 */ sra $v1, $v1, 31 /* 196F50 80268670 00001010 */ mfhi $v0 /* 196F54 80268674 00021143 */ sra $v0, $v0, 5 /* 196F58 80268678 00431023 */ subu $v0, $v0, $v1 /* 196F5C 8026867C 00021400 */ sll $v0, $v0, 16 /* 196F60 80268680 00021403 */ sra $v0, $v0, 16 /* 196F64 80268684 00558023 */ subu $s0, $v0, $s5 /* 196F68 80268688 0600002D */ bltz $s0, .L80268740 /* 196F6C 8026868C 00958823 */ subu $s1, $a0, $s5 /* 196F70 80268690 52200007 */ beql $s1, $zero, .L802686B0 /* 196F74 80268694 0200882D */ daddu $s1, $s0, $zero /* 196F78 80268698 14CC0003 */ bne $a2, $t4, .L802686A8 /* 196F7C 8026869C 0230102A */ slt $v0, $s1, $s0 /* 196F80 802686A0 0809A1AC */ j .L802686B0 /* 196F84 802686A4 0200882D */ daddu $s1, $s0, $zero .L802686A8: /* 196F88 802686A8 54400001 */ bnel $v0, $zero, .L802686B0 /* 196F8C 802686AC 0220802D */ daddu $s0, $s1, $zero .L802686B0: /* 196F90 802686B0 8FAE0068 */ lw $t6, 0x68($sp) /* 196F94 802686B4 240200FF */ addiu $v0, $zero, 0xFF /* 196F98 802686B8 AFA80010 */ sw $t0, 0x10($sp) /* 196F9C 802686BC AFAA0014 */ sw $t2, 0x14($sp) /* 196FA0 802686C0 AFA90018 */ sw $t1, 0x18($sp) /* 196FA4 802686C4 AFA2001C */ sw $v0, 0x1C($sp) /* 196FA8 802686C8 AFAB0030 */ sw $t3, 0x30($sp) /* 196FAC 802686CC AFAC0034 */ sw $t4, 0x34($sp) /* 196FB0 802686D0 AFAD0038 */ sw $t5, 0x38($sp) /* 196FB4 802686D4 01D53021 */ addu $a2, $t6, $s5 /* 196FB8 802686D8 00062400 */ sll $a0, $a2, 16 /* 196FBC 802686DC 00042403 */ sra $a0, $a0, 16 /* 196FC0 802686E0 00D03021 */ addu $a2, $a2, $s0 /* 196FC4 802686E4 00063400 */ sll $a2, $a2, 16 /* 196FC8 802686E8 8FAE006C */ lw $t6, 0x6C($sp) /* 196FCC 802686EC 00063403 */ sra $a2, $a2, 16 /* 196FD0 802686F0 000E2C00 */ sll $a1, $t6, 16 /* 196FD4 802686F4 8FAE0028 */ lw $t6, 0x28($sp) /* 196FD8 802686F8 00052C03 */ sra $a1, $a1, 16 /* 196FDC 802686FC 0C00AAB1 */ jal startup_draw_prim_rect_COPY /* 196FE0 80268700 000E3C03 */ sra $a3, $t6, 16 /* 196FE4 80268704 8FAB0030 */ lw $t3, 0x30($sp) /* 196FE8 80268708 8FAC0034 */ lw $t4, 0x34($sp) /* 196FEC 8026870C 81630080 */ lb $v1, 0x80($t3) /* 196FF0 80268710 8FAD0038 */ lw $t5, 0x38($sp) /* 196FF4 80268714 2462FFFF */ addiu $v0, $v1, -0x1 /* 196FF8 80268718 0242102A */ slt $v0, $s2, $v0 /* 196FFC 8026871C 10400008 */ beqz $v0, .L80268740 /* 197000 80268720 02B1A821 */ addu $s5, $s5, $s1 /* 197004 80268724 27DE0002 */ addiu $fp, $fp, 0x2 /* 197008 80268728 26D60003 */ addiu $s6, $s6, 0x3 /* 19700C 8026872C 26940003 */ addiu $s4, $s4, 0x3 /* 197010 80268730 26520001 */ addiu $s2, $s2, 0x1 /* 197014 80268734 0243102A */ slt $v0, $s2, $v1 /* 197018 80268738 1440FF9E */ bnez $v0, .L802685B4 /* 19701C 8026873C 26730003 */ addiu $s3, $s3, 0x3 .L80268740: /* 197020 80268740 8FBF0064 */ lw $ra, 0x64($sp) /* 197024 80268744 8FBE0060 */ lw $fp, 0x60($sp) /* 197028 80268748 8FB7005C */ lw $s7, 0x5C($sp) /* 19702C 8026874C 8FB60058 */ lw $s6, 0x58($sp) /* 197030 80268750 8FB50054 */ lw $s5, 0x54($sp) /* 197034 80268754 8FB40050 */ lw $s4, 0x50($sp) /* 197038 80268758 8FB3004C */ lw $s3, 0x4C($sp) /* 19703C 8026875C 8FB20048 */ lw $s2, 0x48($sp) /* 197040 80268760 8FB10044 */ lw $s1, 0x44($sp) /* 197044 80268764 8FB00040 */ lw $s0, 0x40($sp) /* 197048 80268768 03E00008 */ jr $ra /* 19704C 8026876C 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: void draw_mash_meter(s32 posX, s32 posY, s32 fillValue, s32 colorMode) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; s32 maxCutOff; s32 i; s32 cutOff; s32 width; s32 offsetX; s32 filledWidth; s32 r, g, b; if (!actionCommandStatus->showHud) { return; } posX -= 28; posY -= 4; maxCutOff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals]; if (fillValue < 0) { fillValue = 0; } width = 0; for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) { cutOff = actionCommandStatus->mashMeterCutoffs[i + 1]; if (cutOff > fillValue) { cutOff = fillValue; } width = (cutOff * 60 / maxCutOff) * 100; if (fillValue == cutOff) { break; } } //difference between current and previous filled value offsetX = width - actionCommandStatus->barFillWidth; if (abs(offsetX) >= sMashMeterSmoothDivisor * 100) { actionCommandStatus->barFillWidth += offsetX / sMashMeterSmoothDivisor; } else { actionCommandStatus->barFillWidth = width; } offsetX = 0; for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) { cutOff = actionCommandStatus->mashMeterCutoffs[i + 1]; width = (cutOff * 60 / maxCutOff) - offsetX; r = mashMeter_bgColors[3 * i + 0]; g = mashMeter_bgColors[3 * i + 1]; b = mashMeter_bgColors[3 * i + 2]; startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255); if (i < actionCommandStatus->mashMeterIntervals - 1) { r = mashMeter_cutOffColors[3 * i + 0]; g = mashMeter_cutOffColors[3 * i + 1]; b = mashMeter_cutOffColors[3 * i + 2]; startup_draw_prim_rect_COPY(posX + offsetX + width - 1, posY, posX + offsetX + width, posY + 5, r, g, b, 255); offsetX += width; } else { break; } } offsetX = 0; for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) { if (colorMode == 0) { r = mashMeter_fillColors[3 * i + 0]; g = mashMeter_fillColors[3 * i + 1]; b = mashMeter_fillColors[3 * i + 2]; } else if (colorMode > 0) { r = 224; g = 63; b = 0; } else if (gGameStatusPtr->frameCounter % 2 != 0){ r = mashMeter_fillColors[3 * i + 0]; g = mashMeter_fillColors[3 * i + 1]; b = mashMeter_fillColors[3 * i + 2]; } else { r = 250; g = 175; b = 0; } cutOff = actionCommandStatus->mashMeterCutoffs[i + 1]; if (cutOff > fillValue) { cutOff = fillValue; } filledWidth = cutOff * 60 / maxCutOff - offsetX; width = actionCommandStatus->barFillWidth / 100 - offsetX; if (width < 0) { break; } if (filledWidth == 0) { filledWidth = width; } else if (cutOff == fillValue) { filledWidth = width; } else if (width > filledWidth) { width = filledWidth; } startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255); offsetX += filledWidth; if (i >= actionCommandStatus->mashMeterIntervals - 1) { break; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E011A700 /* 404920 E011A700 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 404924 E011A704 0080302D */ daddu $a2, $a0, $zero /* 404928 E011A708 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 40492C E011A70C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 404930 E011A710 3C04800B */ lui $a0, %hi(gCameras) /* 404934 E011A714 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 404938 E011A718 AFBF0034 */ sw $ra, 0x34($sp) /* 40493C E011A71C AFBE0030 */ sw $fp, 0x30($sp) /* 404940 E011A720 AFB7002C */ sw $s7, 0x2C($sp) /* 404944 E011A724 AFB60028 */ sw $s6, 0x28($sp) /* 404948 E011A728 AFB50024 */ sw $s5, 0x24($sp) /* 40494C E011A72C AFB40020 */ sw $s4, 0x20($sp) /* 404950 E011A730 AFB3001C */ sw $s3, 0x1C($sp) /* 404954 E011A734 AFB20018 */ sw $s2, 0x18($sp) /* 404958 E011A738 AFB10014 */ sw $s1, 0x14($sp) /* 40495C E011A73C AFB00010 */ sw $s0, 0x10($sp) /* 404960 E011A740 F7B60040 */ sdc1 $f22, 0x40($sp) /* 404964 E011A744 F7B40038 */ sdc1 $f20, 0x38($sp) /* 404968 E011A748 8CDE000C */ lw $fp, 0xC($a2) /* 40496C E011A74C 00031080 */ sll $v0, $v1, 2 /* 404970 E011A750 00431021 */ addu $v0, $v0, $v1 /* 404974 E011A754 00021080 */ sll $v0, $v0, 2 /* 404978 E011A758 00431023 */ subu $v0, $v0, $v1 /* 40497C E011A75C 000218C0 */ sll $v1, $v0, 3 /* 404980 E011A760 00431021 */ addu $v0, $v0, $v1 /* 404984 E011A764 000210C0 */ sll $v0, $v0, 3 /* 404988 E011A768 87C30002 */ lh $v1, 0x2($fp) /* 40498C E011A76C 1060011B */ beqz $v1, .LE011ABDC /* 404990 E011A770 0044B821 */ addu $s7, $v0, $a0 /* 404994 E011A774 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 404998 E011A778 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 40499C E011A77C 0000902D */ daddu $s2, $zero, $zero /* 4049A0 E011A780 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 4049A4 E011A784 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 4049A8 E011A788 0040982D */ daddu $s3, $v0, $zero /* 4049AC E011A78C 3C14D700 */ lui $s4, (0xD7001002 >> 16) /* 4049B0 E011A790 36941002 */ ori $s4, $s4, (0xD7001002 & 0xFFFF) /* 4049B4 E011A794 2415FFFF */ addiu $s5, $zero, -0x1 /* 4049B8 E011A798 2411000C */ addiu $s1, $zero, 0xC /* 4049BC E011A79C 24100014 */ addiu $s0, $zero, 0x14 /* 4049C0 E011A7A0 8E640000 */ lw $a0, 0x0($s3) /* 4049C4 E011A7A4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 4049C8 E011A7A8 0080182D */ daddu $v1, $a0, $zero /* 4049CC E011A7AC 24840008 */ addiu $a0, $a0, 0x8 /* 4049D0 E011A7B0 AE640000 */ sw $a0, 0x0($s3) /* 4049D4 E011A7B4 AC620000 */ sw $v0, 0x0($v1) /* 4049D8 E011A7B8 AC600004 */ sw $zero, 0x4($v1) /* 4049DC E011A7BC AC850000 */ sw $a1, 0x0($a0) /* 4049E0 E011A7C0 8CC30010 */ lw $v1, 0x10($a2) /* 4049E4 E011A7C4 24820008 */ addiu $v0, $a0, 0x8 /* 4049E8 E011A7C8 AE620000 */ sw $v0, 0x0($s3) /* 4049EC E011A7CC 8C63001C */ lw $v1, 0x1C($v1) /* 4049F0 E011A7D0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 4049F4 E011A7D4 AC820008 */ sw $v0, 0x8($a0) /* 4049F8 E011A7D8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 4049FC E011A7DC 00621821 */ addu $v1, $v1, $v0 /* 404A00 E011A7E0 AC830004 */ sw $v1, 0x4($a0) /* 404A04 E011A7E4 3C03E012 */ lui $v1, (0xE0120000 >> 16) /* 404A08 E011A7E8 8C63AC20 */ lw $v1, -0x53E0($v1) /* 404A0C E011A7EC 24820010 */ addiu $v0, $a0, 0x10 /* 404A10 E011A7F0 AE620000 */ sw $v0, 0x0($s3) /* 404A14 E011A7F4 AC83000C */ sw $v1, 0xC($a0) .LE011A7F8: /* 404A18 E011A7F8 03D11021 */ addu $v0, $fp, $s1 /* 404A1C E011A7FC 84440000 */ lh $a0, 0x0($v0) /* 404A20 E011A800 50800012 */ beql $a0, $zero, .LE011A84C /* 404A24 E011A804 26520001 */ addiu $s2, $s2, 0x1 /* 404A28 E011A808 8E620000 */ lw $v0, 0x0($s3) /* 404A2C E011A80C 0040182D */ daddu $v1, $v0, $zero /* 404A30 E011A810 24420008 */ addiu $v0, $v0, 0x8 /* 404A34 E011A814 AE620000 */ sw $v0, 0x0($s3) /* 404A38 E011A818 32420007 */ andi $v0, $s2, 0x7 /* 404A3C E011A81C 00021200 */ sll $v0, $v0, 8 /* 404A40 E011A820 00541025 */ or $v0, $v0, $s4 /* 404A44 E011A824 AC620000 */ sw $v0, 0x0($v1) /* 404A48 E011A828 0C0468EF */ jal func_E011A3BC /* 404A4C E011A82C AC750004 */ sw $s5, 0x4($v1) /* 404A50 E011A830 0200202D */ daddu $a0, $s0, $zero /* 404A54 E011A834 24050032 */ addiu $a1, $zero, 0x32 /* 404A58 E011A838 0240302D */ daddu $a2, $s2, $zero /* 404A5C E011A83C 3C074480 */ lui $a3, (0x44800000 >> 16) /* 404A60 E011A840 0C046923 */ jal func_E011A48C /* 404A64 E011A844 26100020 */ addiu $s0, $s0, 0x20 /* 404A68 E011A848 26520001 */ addiu $s2, $s2, 0x1 .LE011A84C: /* 404A6C E011A84C 2A420003 */ slti $v0, $s2, 0x3 /* 404A70 E011A850 1440FFE9 */ bnez $v0, .LE011A7F8 /* 404A74 E011A854 2631000A */ addiu $s1, $s1, 0xA /* 404A78 E011A858 3C03D700 */ lui $v1, (0xD7000002 >> 16) /* 404A7C E011A85C 34630002 */ ori $v1, $v1, (0xD7000002 & 0xFFFF) /* 404A80 E011A860 3C05E300 */ lui $a1, (0xE3001001 >> 16) /* 404A84 E011A864 34A51001 */ ori $a1, $a1, (0xE3001001 & 0xFFFF) /* 404A88 E011A868 0000902D */ daddu $s2, $zero, $zero /* 404A8C E011A86C 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 404A90 E011A870 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 404A94 E011A874 0040A82D */ daddu $s5, $v0, $zero /* 404A98 E011A878 2416000C */ addiu $s6, $zero, 0xC /* 404A9C E011A87C 24130014 */ addiu $s3, $zero, 0x14 /* 404AA0 E011A880 8EA20000 */ lw $v0, 0x0($s5) /* 404AA4 E011A884 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 404AA8 E011A888 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 404AAC E011A88C 4481B000 */ mtc1 $at, $f22 /* 404AB0 E011A890 3C014480 */ lui $at, (0x44800000 >> 16) /* 404AB4 E011A894 4481A000 */ mtc1 $at, $f20 /* 404AB8 E011A898 0040202D */ daddu $a0, $v0, $zero /* 404ABC E011A89C 24420008 */ addiu $v0, $v0, 0x8 /* 404AC0 E011A8A0 AEA20000 */ sw $v0, 0x0($s5) /* 404AC4 E011A8A4 AC830000 */ sw $v1, 0x0($a0) /* 404AC8 E011A8A8 2403FFFF */ addiu $v1, $zero, -0x1 /* 404ACC E011A8AC AC830004 */ sw $v1, 0x4($a0) /* 404AD0 E011A8B0 24430008 */ addiu $v1, $v0, 0x8 /* 404AD4 E011A8B4 AEA30000 */ sw $v1, 0x0($s5) /* 404AD8 E011A8B8 AC450000 */ sw $a1, 0x0($v0) /* 404ADC E011A8BC AC400004 */ sw $zero, 0x4($v0) .LE011A8C0: /* 404AE0 E011A8C0 03D68021 */ addu $s0, $fp, $s6 /* 404AE4 E011A8C4 96110002 */ lhu $s1, 0x2($s0) /* 404AE8 E011A8C8 86040000 */ lh $a0, 0x0($s0) /* 404AEC E011A8CC 96140008 */ lhu $s4, 0x8($s0) /* 404AF0 E011A8D0 1080007D */ beqz $a0, .LE011AAC8 /* 404AF4 E011A8D4 00111400 */ sll $v0, $s1, 16 /* 404AF8 E011A8D8 04420001 */ bltzl $v0, .LE011A8E0 /* 404AFC E011A8DC 0000882D */ daddu $s1, $zero, $zero .LE011A8E0: /* 404B00 E011A8E0 00111400 */ sll $v0, $s1, 16 /* 404B04 E011A8E4 00021403 */ sra $v0, $v0, 16 /* 404B08 E011A8E8 2842000A */ slti $v0, $v0, 0xA /* 404B0C E011A8EC 50400001 */ beql $v0, $zero, .LE011A8F4 /* 404B10 E011A8F0 24110009 */ addiu $s1, $zero, 0x9 .LE011A8F4: /* 404B14 E011A8F4 0C0468EF */ jal func_E011A3BC /* 404B18 E011A8F8 00000000 */ nop /* 404B1C E011A8FC 86030006 */ lh $v1, 0x6($s0) /* 404B20 E011A900 2402000A */ addiu $v0, $zero, 0xA /* 404B24 E011A904 10620006 */ beq $v1, $v0, .LE011A920 /* 404B28 E011A908 00111400 */ sll $v0, $s1, 16 /* 404B2C E011A90C 24020014 */ addiu $v0, $zero, 0x14 /* 404B30 E011A910 14620041 */ bne $v1, $v0, .LE011AA18 /* 404B34 E011A914 00111400 */ sll $v0, $s1, 16 /* 404B38 E011A918 08046A4B */ j .LE011A92C /* 404B3C E011A91C 00021403 */ sra $v0, $v0, 16 .LE011A920: /* 404B40 E011A920 00021403 */ sra $v0, $v0, 16 /* 404B44 E011A924 08046A4C */ j .LE011A930 /* 404B48 E011A928 2442FFFF */ addiu $v0, $v0, -0x1 .LE011A92C: /* 404B4C E011A92C 24420001 */ addiu $v0, $v0, 0x1 .LE011A930: /* 404B50 E011A930 00021080 */ sll $v0, $v0, 2 /* 404B54 E011A934 3C08E012 */ lui $t0, %hi(D_E011AC24) /* 404B58 E011A938 2508AC24 */ addiu $t0, $t0, %lo(D_E011AC24) /* 404B5C E011A93C 00481021 */ addu $v0, $v0, $t0 /* 404B60 E011A940 8C440000 */ lw $a0, 0x0($v0) /* 404B64 E011A944 10800033 */ beqz $a0, .LE011AA14 /* 404B68 E011A948 3C08DE00 */ lui $t0, (0xDE000000 >> 16) /* 404B6C E011A94C 8EA20000 */ lw $v0, 0x0($s5) /* 404B70 E011A950 0040182D */ daddu $v1, $v0, $zero /* 404B74 E011A954 24420008 */ addiu $v0, $v0, 0x8 /* 404B78 E011A958 AEA20000 */ sw $v0, 0x0($s5) /* 404B7C E011A95C 00141400 */ sll $v0, $s4, 16 /* 404B80 E011A960 00021403 */ sra $v0, $v0, 16 /* 404B84 E011A964 AC680000 */ sw $t0, 0x0($v1) /* 404B88 E011A968 3C08E012 */ lui $t0, %hi(D_E011AC4C) /* 404B8C E011A96C 2508AC4C */ addiu $t0, $t0, %lo(D_E011AC4C) /* 404B90 E011A970 00481021 */ addu $v0, $v0, $t0 /* 404B94 E011A974 AC640004 */ sw $a0, 0x4($v1) /* 404B98 E011A978 80420000 */ lb $v0, 0x0($v0) /* 404B9C E011A97C 44820000 */ mtc1 $v0, $f0 /* 404BA0 E011A980 00000000 */ nop /* 404BA4 E011A984 46800020 */ cvt.s.w $f0, $f0 /* 404BA8 E011A988 46160102 */ mul.s $f4, $f0, $f22 /* 404BAC E011A98C 00000000 */ nop /* 404BB0 E011A990 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 404BB4 E011A994 44810000 */ mtc1 $at, $f0 /* 404BB8 E011A998 00000000 */ nop /* 404BBC E011A99C 46002001 */ sub.s $f0, $f4, $f0 /* 404BC0 E011A9A0 3C014180 */ lui $at, (0x41800000 >> 16) /* 404BC4 E011A9A4 44811000 */ mtc1 $at, $f2 /* 404BC8 E011A9A8 46000007 */ neg.s $f0, $f0 /* 404BCC E011A9AC 46020002 */ mul.s $f0, $f0, $f2 /* 404BD0 E011A9B0 00000000 */ nop /* 404BD4 E011A9B4 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 404BD8 E011A9B8 44811800 */ mtc1 $at, $f3 /* 404BDC E011A9BC 44801000 */ mtc1 $zero, $f2 /* 404BE0 E011A9C0 46000021 */ cvt.d.s $f0, $f0 /* 404BE4 E011A9C4 46220000 */ add.d $f0, $f0, $f2 /* 404BE8 E011A9C8 4604A103 */ div.s $f4, $f20, $f4 /* 404BEC E011A9CC 44072000 */ mfc1 $a3, $f4 /* 404BF0 E011A9D0 4620018D */ trunc.w.d $f6, $f0 /* 404BF4 E011A9D4 44043000 */ mfc1 $a0, $f6 /* 404BF8 E011A9D8 00000000 */ nop /* 404BFC E011A9DC 00931021 */ addu $v0, $a0, $s3 /* 404C00 E011A9E0 44821000 */ mtc1 $v0, $f2 /* 404C04 E011A9E4 00000000 */ nop /* 404C08 E011A9E8 468010A0 */ cvt.s.w $f2, $f2 /* 404C0C E011A9EC 24820032 */ addiu $v0, $a0, 0x32 /* 404C10 E011A9F0 44820000 */ mtc1 $v0, $f0 /* 404C14 E011A9F4 00000000 */ nop /* 404C18 E011A9F8 46800020 */ cvt.s.w $f0, $f0 /* 404C1C E011A9FC 4600118D */ trunc.w.s $f6, $f2 /* 404C20 E011AA00 44043000 */ mfc1 $a0, $f6 /* 404C24 E011AA04 4600018D */ trunc.w.s $f6, $f0 /* 404C28 E011AA08 44053000 */ mfc1 $a1, $f6 /* 404C2C E011AA0C 0C046923 */ jal func_E011A48C /* 404C30 E011AA10 0000302D */ daddu $a2, $zero, $zero .LE011AA14: /* 404C34 E011AA14 00111400 */ sll $v0, $s1, 16 .LE011AA18: /* 404C38 E011AA18 00021383 */ sra $v0, $v0, 14 /* 404C3C E011AA1C 3C08E012 */ lui $t0, %hi(D_E011AC24) /* 404C40 E011AA20 2508AC24 */ addiu $t0, $t0, %lo(D_E011AC24) /* 404C44 E011AA24 00481021 */ addu $v0, $v0, $t0 /* 404C48 E011AA28 8C440000 */ lw $a0, 0x0($v0) /* 404C4C E011AA2C 10800025 */ beqz $a0, .LE011AAC4 /* 404C50 E011AA30 3C08DE00 */ lui $t0, (0xDE000000 >> 16) /* 404C54 E011AA34 8EA20000 */ lw $v0, 0x0($s5) /* 404C58 E011AA38 0040182D */ daddu $v1, $v0, $zero /* 404C5C E011AA3C 24420008 */ addiu $v0, $v0, 0x8 /* 404C60 E011AA40 AEA20000 */ sw $v0, 0x0($s5) /* 404C64 E011AA44 AC680000 */ sw $t0, 0x0($v1) /* 404C68 E011AA48 AC640004 */ sw $a0, 0x4($v1) /* 404C6C E011AA4C 00141C00 */ sll $v1, $s4, 16 /* 404C70 E011AA50 00031C03 */ sra $v1, $v1, 16 /* 404C74 E011AA54 3C02E012 */ lui $v0, (0xE0120000 >> 16) /* 404C78 E011AA58 00431021 */ addu $v0, $v0, $v1 /* 404C7C E011AA5C 8042AC64 */ lb $v0, -0x539C($v0) /* 404C80 E011AA60 3C01E012 */ lui $at, (0xE0120000 >> 16) /* 404C84 E011AA64 00230821 */ addu $at, $at, $v1 /* 404C88 E011AA68 8023AC58 */ lb $v1, -0x53A8($at) /* 404C8C E011AA6C 00022023 */ negu $a0, $v0 /* 404C90 E011AA70 00531021 */ addu $v0, $v0, $s3 /* 404C94 E011AA74 44830000 */ mtc1 $v1, $f0 /* 404C98 E011AA78 00000000 */ nop /* 404C9C E011AA7C 46800020 */ cvt.s.w $f0, $f0 /* 404CA0 E011AA80 46160102 */ mul.s $f4, $f0, $f22 /* 404CA4 E011AA84 00000000 */ nop /* 404CA8 E011AA88 44821000 */ mtc1 $v0, $f2 /* 404CAC E011AA8C 00000000 */ nop /* 404CB0 E011AA90 468010A0 */ cvt.s.w $f2, $f2 /* 404CB4 E011AA94 24820032 */ addiu $v0, $a0, 0x32 /* 404CB8 E011AA98 44820000 */ mtc1 $v0, $f0 /* 404CBC E011AA9C 00000000 */ nop /* 404CC0 E011AAA0 46800020 */ cvt.s.w $f0, $f0 /* 404CC4 E011AAA4 4600118D */ trunc.w.s $f6, $f2 /* 404CC8 E011AAA8 44043000 */ mfc1 $a0, $f6 /* 404CCC E011AAAC 4604A103 */ div.s $f4, $f20, $f4 /* 404CD0 E011AAB0 44072000 */ mfc1 $a3, $f4 /* 404CD4 E011AAB4 4600018D */ trunc.w.s $f6, $f0 /* 404CD8 E011AAB8 44053000 */ mfc1 $a1, $f6 /* 404CDC E011AABC 0C046923 */ jal func_E011A48C /* 404CE0 E011AAC0 0000302D */ daddu $a2, $zero, $zero .LE011AAC4: /* 404CE4 E011AAC4 26730020 */ addiu $s3, $s3, 0x20 .LE011AAC8: /* 404CE8 E011AAC8 26520001 */ addiu $s2, $s2, 0x1 /* 404CEC E011AACC 2A420003 */ slti $v0, $s2, 0x3 /* 404CF0 E011AAD0 1440FF7B */ bnez $v0, .LE011A8C0 /* 404CF4 E011AAD4 26D6000A */ addiu $s6, $s6, 0xA /* 404CF8 E011AAD8 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 404CFC E011AADC 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 404D00 E011AAE0 86E2000E */ lh $v0, 0xE($s7) /* 404D04 E011AAE4 3C014080 */ lui $at, (0x40800000 >> 16) /* 404D08 E011AAE8 44812000 */ mtc1 $at, $f4 /* 404D0C E011AAEC 44821000 */ mtc1 $v0, $f2 /* 404D10 E011AAF0 00000000 */ nop /* 404D14 E011AAF4 468010A0 */ cvt.s.w $f2, $f2 /* 404D18 E011AAF8 46041082 */ mul.s $f2, $f2, $f4 /* 404D1C E011AAFC 00000000 */ nop /* 404D20 E011AB00 3C04ED00 */ lui $a0, (0xED000000 >> 16) /* 404D24 E011AB04 86E20010 */ lh $v0, 0x10($s7) /* 404D28 E011AB08 8CC50000 */ lw $a1, 0x0($a2) /* 404D2C E011AB0C 44820000 */ mtc1 $v0, $f0 /* 404D30 E011AB10 00000000 */ nop /* 404D34 E011AB14 46800020 */ cvt.s.w $f0, $f0 /* 404D38 E011AB18 46040002 */ mul.s $f0, $f0, $f4 /* 404D3C E011AB1C 00000000 */ nop /* 404D40 E011AB20 00A0382D */ daddu $a3, $a1, $zero /* 404D44 E011AB24 4600118D */ trunc.w.s $f6, $f2 /* 404D48 E011AB28 44023000 */ mfc1 $v0, $f6 /* 404D4C E011AB2C 00000000 */ nop /* 404D50 E011AB30 30420FFF */ andi $v0, $v0, 0xFFF /* 404D54 E011AB34 00021300 */ sll $v0, $v0, 12 /* 404D58 E011AB38 4600018D */ trunc.w.s $f6, $f0 /* 404D5C E011AB3C 44033000 */ mfc1 $v1, $f6 /* 404D60 E011AB40 00000000 */ nop /* 404D64 E011AB44 30630FFF */ andi $v1, $v1, 0xFFF /* 404D68 E011AB48 00641825 */ or $v1, $v1, $a0 /* 404D6C E011AB4C 00431025 */ or $v0, $v0, $v1 /* 404D70 E011AB50 ACE20000 */ sw $v0, 0x0($a3) /* 404D74 E011AB54 86E2000E */ lh $v0, 0xE($s7) /* 404D78 E011AB58 86E3000A */ lh $v1, 0xA($s7) /* 404D7C E011AB5C 24A50008 */ addiu $a1, $a1, 0x8 /* 404D80 E011AB60 00431021 */ addu $v0, $v0, $v1 /* 404D84 E011AB64 44821000 */ mtc1 $v0, $f2 /* 404D88 E011AB68 00000000 */ nop /* 404D8C E011AB6C 468010A0 */ cvt.s.w $f2, $f2 /* 404D90 E011AB70 86E20010 */ lh $v0, 0x10($s7) /* 404D94 E011AB74 86E3000C */ lh $v1, 0xC($s7) /* 404D98 E011AB78 46041082 */ mul.s $f2, $f2, $f4 /* 404D9C E011AB7C 00000000 */ nop /* 404DA0 E011AB80 ACC50000 */ sw $a1, 0x0($a2) /* 404DA4 E011AB84 00431021 */ addu $v0, $v0, $v1 /* 404DA8 E011AB88 44820000 */ mtc1 $v0, $f0 /* 404DAC E011AB8C 00000000 */ nop /* 404DB0 E011AB90 46800020 */ cvt.s.w $f0, $f0 /* 404DB4 E011AB94 24A20008 */ addiu $v0, $a1, 0x8 /* 404DB8 E011AB98 46040002 */ mul.s $f0, $f0, $f4 /* 404DBC E011AB9C 00000000 */ nop /* 404DC0 E011ABA0 ACC20000 */ sw $v0, 0x0($a2) /* 404DC4 E011ABA4 4600118D */ trunc.w.s $f6, $f2 /* 404DC8 E011ABA8 44023000 */ mfc1 $v0, $f6 /* 404DCC E011ABAC 00000000 */ nop /* 404DD0 E011ABB0 30420FFF */ andi $v0, $v0, 0xFFF /* 404DD4 E011ABB4 00021300 */ sll $v0, $v0, 12 /* 404DD8 E011ABB8 4600018D */ trunc.w.s $f6, $f0 /* 404DDC E011ABBC 44033000 */ mfc1 $v1, $f6 /* 404DE0 E011ABC0 00000000 */ nop /* 404DE4 E011ABC4 30630FFF */ andi $v1, $v1, 0xFFF /* 404DE8 E011ABC8 00431025 */ or $v0, $v0, $v1 /* 404DEC E011ABCC ACE20004 */ sw $v0, 0x4($a3) /* 404DF0 E011ABD0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 404DF4 E011ABD4 ACA20000 */ sw $v0, 0x0($a1) /* 404DF8 E011ABD8 ACA00004 */ sw $zero, 0x4($a1) .LE011ABDC: /* 404DFC E011ABDC 8FBF0034 */ lw $ra, 0x34($sp) /* 404E00 E011ABE0 8FBE0030 */ lw $fp, 0x30($sp) /* 404E04 E011ABE4 8FB7002C */ lw $s7, 0x2C($sp) /* 404E08 E011ABE8 8FB60028 */ lw $s6, 0x28($sp) /* 404E0C E011ABEC 8FB50024 */ lw $s5, 0x24($sp) /* 404E10 E011ABF0 8FB40020 */ lw $s4, 0x20($sp) /* 404E14 E011ABF4 8FB3001C */ lw $s3, 0x1C($sp) /* 404E18 E011ABF8 8FB20018 */ lw $s2, 0x18($sp) /* 404E1C E011ABFC 8FB10014 */ lw $s1, 0x14($sp) /* 404E20 E011AC00 8FB00010 */ lw $s0, 0x10($sp) /* 404E24 E011AC04 D7B60040 */ ldc1 $f22, 0x40($sp) /* 404E28 E011AC08 D7B40038 */ ldc1 $f20, 0x38($sp) /* 404E2C E011AC0C 03E00008 */ jr $ra /* 404E30 E011AC10 27BD0048 */ addiu $sp, $sp, 0x48 /* 404E34 E011AC14 00000000 */ nop /* 404E38 E011AC18 00000000 */ nop /* 404E3C E011AC1C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E011A700(EffectInstance* effect) { PartnerBuffFXData* data = effect->data.partnerBuff; Camera* camera = &gCameras[gCurrentCameraID]; s32 numShown; s32 alpha; s32 temp1; s32 temp2; f32 scale; Gfx* dlist; f32 x, y; s32 i; if (data->unk_02 != 0) { gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_E011AC20[0]); numShown = 0; for (i = 0; i < ARRAY_COUNT(data->unk_0C); i++) { BuffData* buffData = &data->unk_0C[i]; alpha = buffData->alpha; if (alpha != 0) { gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 2, i, G_ON); func_E011A3BC(alpha); func_E011A48C(20 + numShown * 32, 50, i, 1024.0f); numShown++; } } gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); numShown = 0; for (i = 0; i < ARRAY_COUNT(data->unk_0C); i++) { BuffData* buffData = &data->unk_0C[i]; s16 turnsDisplay = buffData->turnsDisplay; s16 stateTimer = buffData->stateTimer; alpha = buffData->alpha; if (alpha != 0) { if (turnsDisplay < 0) { turnsDisplay = 0; } if (turnsDisplay > 9) { turnsDisplay = 9; } func_E011A3BC(alpha); if (buffData->state == BUFF_STATE_DECREMENT_TURNS || buffData->state == BUFF_STATE_SET_TURNS) { s32 idx; if (buffData->state == BUFF_STATE_DECREMENT_TURNS) { idx = turnsDisplay - 1; } else if (buffData->state == BUFF_STATE_SET_TURNS) { idx = turnsDisplay + 1; } dlist = D_E011AC24[idx]; if (dlist != NULL) { gSPDisplayList(gMainGfxPos++, dlist); scale = D_E011AC4C[(s16)stateTimer] * 0.01f; temp2 = (-(scale - 1.0f) * 16.0f) + 0.5; x = temp2 + 20 + numShown * 32; y = temp2 + 50; func_E011A48C(x, y, 0, 1024.0f / scale); } } dlist = D_E011AC24[turnsDisplay]; if (dlist != NULL) { gSPDisplayList(gMainGfxPos++, dlist); temp1 = D_E011AC64[(s16)stateTimer]; temp2 = -temp1; scale = D_E011AC58[(s16)stateTimer] * 0.01f; x = temp1 + 20 + numShown * 32; y = temp2 + 50; func_E011A48C(x, y, 0, 1024.0f / scale); } numShown++; } } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH ); gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel step_mesh_animator /* B6DF8 801206F8 27BDFFC8 */ addiu $sp, $sp, -0x38 /* B6DFC 801206FC AFB10014 */ sw $s1, 0x14($sp) /* B6E00 80120700 0080882D */ daddu $s1, $a0, $zero /* B6E04 80120704 AFBF001C */ sw $ra, 0x1C($sp) /* B6E08 80120708 AFB20018 */ sw $s2, 0x18($sp) /* B6E0C 8012070C AFB00010 */ sw $s0, 0x10($sp) /* B6E10 80120710 F7B80030 */ sdc1 $f24, 0x30($sp) /* B6E14 80120714 F7B60028 */ sdc1 $f22, 0x28($sp) /* B6E18 80120718 F7B40020 */ sdc1 $f20, 0x20($sp) /* B6E1C 8012071C 8E320008 */ lw $s2, 0x8($s1) /* B6E20 80120720 86430000 */ lh $v1, 0x0($s2) /* B6E24 80120724 2C620014 */ sltiu $v0, $v1, 0x14 /* B6E28 80120728 10400114 */ beqz $v0, .L80120B7C /* B6E2C 8012072C 26500002 */ addiu $s0, $s2, 0x2 /* B6E30 80120730 00031080 */ sll $v0, $v1, 2 /* B6E34 80120734 3C018015 */ lui $at, %hi(jtbl_80150030) /* B6E38 80120738 00220821 */ addu $at, $at, $v0 /* B6E3C 8012073C 8C220030 */ lw $v0, %lo(jtbl_80150030)($at) /* B6E40 80120740 00400008 */ jr $v0 /* B6E44 80120744 00000000 */ nop glabel .L80120748 /* B6E48 80120748 080482E0 */ j .L80120B80 /* B6E4C 8012074C 2402FFFF */ addiu $v0, $zero, -0x1 glabel .L80120750 /* B6E50 80120750 92030001 */ lbu $v1, 0x1($s0) /* B6E54 80120754 26100002 */ addiu $s0, $s0, 0x2 /* B6E58 80120758 24020001 */ addiu $v0, $zero, 0x1 /* B6E5C 8012075C AE300008 */ sw $s0, 0x8($s1) /* B6E60 80120760 080482E0 */ j .L80120B80 /* B6E64 80120764 A2230004 */ sb $v1, 0x4($s1) glabel .L80120768 /* B6E68 80120768 26100002 */ addiu $s0, $s0, 0x2 /* B6E6C 8012076C AE300008 */ sw $s0, 0x8($s1) .L80120770: /* B6E70 80120770 080482E0 */ j .L80120B80 /* B6E74 80120774 24020001 */ addiu $v0, $zero, 0x1 glabel .L80120778 /* B6E78 80120778 8E22000C */ lw $v0, 0xC($s1) /* B6E7C 8012077C 8E2302D0 */ lw $v1, 0x2D0($s1) /* B6E80 80120780 0220202D */ daddu $a0, $s1, $zero /* B6E84 80120784 AC820008 */ sw $v0, 0x8($a0) /* B6E88 80120788 0C04819E */ jal reload_mesh_animator_tree /* B6E8C 8012078C AC8302CC */ sw $v1, 0x2CC($a0) /* B6E90 80120790 080482E0 */ j .L80120B80 /* B6E94 80120794 24020001 */ addiu $v0, $zero, 0x1 glabel .L80120798 /* B6E98 80120798 8E22000C */ lw $v0, 0xC($s1) /* B6E9C 8012079C 8E2302D0 */ lw $v1, 0x2D0($s1) /* B6EA0 801207A0 AE220008 */ sw $v0, 0x8($s1) /* B6EA4 801207A4 080482DF */ j .L80120B7C /* B6EA8 801207A8 AE2302CC */ sw $v1, 0x2CC($s1) glabel .L801207AC /* B6EAC 801207AC 8E2302CC */ lw $v1, 0x2CC($s1) /* B6EB0 801207B0 24020001 */ addiu $v0, $zero, 0x1 /* B6EB4 801207B4 AE30000C */ sw $s0, 0xC($s1) /* B6EB8 801207B8 AE300008 */ sw $s0, 0x8($s1) /* B6EBC 801207BC 080482E0 */ j .L80120B80 /* B6EC0 801207C0 AE2302D0 */ sw $v1, 0x2D0($s1) glabel .L801207C4 /* B6EC4 801207C4 86040000 */ lh $a0, 0x0($s0) /* B6EC8 801207C8 26100002 */ addiu $s0, $s0, 0x2 /* B6ECC 801207CC 8E230000 */ lw $v1, 0x0($s1) /* B6ED0 801207D0 24020001 */ addiu $v0, $zero, 0x1 /* B6ED4 801207D4 AE300008 */ sw $s0, 0x8($s1) /* B6ED8 801207D8 08048219 */ j .L80120864 /* B6EDC 801207DC 3084FFFF */ andi $a0, $a0, 0xFFFF glabel .L801207E0 /* B6EE0 801207E0 86020000 */ lh $v0, 0x0($s0) /* B6EE4 801207E4 8E240010 */ lw $a0, 0x10($s1) /* B6EE8 801207E8 00511021 */ addu $v0, $v0, $s1 /* B6EEC 801207EC 90450014 */ lbu $a1, 0x14($v0) /* B6EF0 801207F0 0C047837 */ jal get_animator_child_with_id /* B6EF4 801207F4 26100002 */ addiu $s0, $s0, 0x2 /* B6EF8 801207F8 0040282D */ daddu $a1, $v0, $zero /* B6EFC 801207FC 86040000 */ lh $a0, 0x0($s0) /* B6F00 80120800 26100002 */ addiu $s0, $s0, 0x2 /* B6F04 80120804 94A300F4 */ lhu $v1, 0xF4($a1) /* B6F08 80120808 24020001 */ addiu $v0, $zero, 0x1 /* B6F0C 8012080C 08048212 */ j .L80120848 /* B6F10 80120810 00641825 */ or $v1, $v1, $a0 glabel .L80120814 /* B6F14 80120814 86020000 */ lh $v0, 0x0($s0) /* B6F18 80120818 8E240010 */ lw $a0, 0x10($s1) /* B6F1C 8012081C 00511021 */ addu $v0, $v0, $s1 /* B6F20 80120820 90450014 */ lbu $a1, 0x14($v0) /* B6F24 80120824 0C047837 */ jal get_animator_child_with_id /* B6F28 80120828 26100002 */ addiu $s0, $s0, 0x2 /* B6F2C 8012082C 0040282D */ daddu $a1, $v0, $zero /* B6F30 80120830 86040000 */ lh $a0, 0x0($s0) /* B6F34 80120834 26100002 */ addiu $s0, $s0, 0x2 /* B6F38 80120838 24020001 */ addiu $v0, $zero, 0x1 /* B6F3C 8012083C 94A300F4 */ lhu $v1, 0xF4($a1) /* B6F40 80120840 00042027 */ nor $a0, $zero, $a0 /* B6F44 80120844 00641824 */ and $v1, $v1, $a0 .L80120848: /* B6F48 80120848 A4A300F4 */ sh $v1, 0xF4($a1) /* B6F4C 8012084C 080482E0 */ j .L80120B80 /* B6F50 80120850 AE300008 */ sw $s0, 0x8($s1) glabel .L80120854 /* B6F54 80120854 24020001 */ addiu $v0, $zero, 0x1 /* B6F58 80120858 8E230000 */ lw $v1, 0x0($s1) /* B6F5C 8012085C 3C040002 */ lui $a0, (0x20000 >> 16) /* B6F60 80120860 AE300008 */ sw $s0, 0x8($s1) .L80120864: /* B6F64 80120864 00641825 */ or $v1, $v1, $a0 /* B6F68 80120868 080482E0 */ j .L80120B80 /* B6F6C 8012086C AE230000 */ sw $v1, 0x0($s1) glabel .L80120870 /* B6F70 80120870 86030000 */ lh $v1, 0x0($s0) /* B6F74 80120874 26100002 */ addiu $s0, $s0, 0x2 /* B6F78 80120878 86020000 */ lh $v0, 0x0($s0) /* B6F7C 8012087C 3C018015 */ lui $at, %hi(D_80150080) /* B6F80 80120880 D4260080 */ ldc1 $f6, %lo(D_80150080)($at) /* B6F84 80120884 44822000 */ mtc1 $v0, $f4 /* B6F88 80120888 00000000 */ nop /* B6F8C 8012088C 46802120 */ cvt.s.w $f4, $f4 /* B6F90 80120890 46002121 */ cvt.d.s $f4, $f4 /* B6F94 80120894 46262102 */ mul.d $f4, $f4, $f6 /* B6F98 80120898 00000000 */ nop /* B6F9C 8012089C 26100002 */ addiu $s0, $s0, 0x2 /* B6FA0 801208A0 86020000 */ lh $v0, 0x0($s0) /* B6FA4 801208A4 44821000 */ mtc1 $v0, $f2 /* B6FA8 801208A8 00000000 */ nop /* B6FAC 801208AC 468010A0 */ cvt.s.w $f2, $f2 /* B6FB0 801208B0 460010A1 */ cvt.d.s $f2, $f2 /* B6FB4 801208B4 46261082 */ mul.d $f2, $f2, $f6 /* B6FB8 801208B8 00000000 */ nop /* B6FBC 801208BC 26100002 */ addiu $s0, $s0, 0x2 /* B6FC0 801208C0 00711821 */ addu $v1, $v1, $s1 /* B6FC4 801208C4 90630014 */ lbu $v1, 0x14($v1) /* B6FC8 801208C8 86020000 */ lh $v0, 0x0($s0) /* B6FCC 801208CC 26100002 */ addiu $s0, $s0, 0x2 /* B6FD0 801208D0 44820000 */ mtc1 $v0, $f0 /* B6FD4 801208D4 00000000 */ nop /* B6FD8 801208D8 46800020 */ cvt.s.w $f0, $f0 /* B6FDC 801208DC 46000021 */ cvt.d.s $f0, $f0 /* B6FE0 801208E0 46260002 */ mul.d $f0, $f0, $f6 /* B6FE4 801208E4 00000000 */ nop /* B6FE8 801208E8 AE300008 */ sw $s0, 0x8($s1) /* B6FEC 801208EC 3C018015 */ lui $at, %hi(D_80150088) /* B6FF0 801208F0 D4260088 */ ldc1 $f6, %lo(D_80150088)($at) /* B6FF4 801208F4 240200FF */ addiu $v0, $zero, 0xFF /* B6FF8 801208F8 46262103 */ div.d $f4, $f4, $f6 /* B6FFC 801208FC 46202620 */ cvt.s.d $f24, $f4 /* B7000 80120900 46261083 */ div.d $f2, $f2, $f6 /* B7004 80120904 462015A0 */ cvt.s.d $f22, $f2 /* B7008 80120908 46260003 */ div.d $f0, $f0, $f6 /* B700C 8012090C 1062FF98 */ beq $v1, $v0, .L80120770 /* B7010 80120910 46200520 */ cvt.s.d $f20, $f0 /* B7014 80120914 8E240010 */ lw $a0, 0x10($s1) /* B7018 80120918 0C047837 */ jal get_animator_child_with_id /* B701C 8012091C 0060282D */ daddu $a1, $v1, $zero /* B7020 80120920 0040282D */ daddu $a1, $v0, $zero /* B7024 80120924 10A00091 */ beqz $a1, .L80120B6C /* B7028 80120928 24020001 */ addiu $v0, $zero, 0x1 /* B702C 8012092C E4B8009C */ swc1 $f24, 0x9C($a1) /* B7030 80120930 E4B600A0 */ swc1 $f22, 0xA0($a1) /* B7034 80120934 080482E0 */ j .L80120B80 /* B7038 80120938 E4B400A4 */ swc1 $f20, 0xA4($a1) glabel .L8012093C /* B703C 8012093C 86030000 */ lh $v1, 0x0($s0) /* B7040 80120940 26100002 */ addiu $s0, $s0, 0x2 /* B7044 80120944 86020000 */ lh $v0, 0x0($s0) /* B7048 80120948 3C018015 */ lui $at, %hi(D_80150090) /* B704C 8012094C D4260090 */ ldc1 $f6, %lo(D_80150090)($at) /* B7050 80120950 44822000 */ mtc1 $v0, $f4 /* B7054 80120954 00000000 */ nop /* B7058 80120958 46802120 */ cvt.s.w $f4, $f4 /* B705C 8012095C 46002121 */ cvt.d.s $f4, $f4 /* B7060 80120960 46262102 */ mul.d $f4, $f4, $f6 /* B7064 80120964 00000000 */ nop /* B7068 80120968 26100002 */ addiu $s0, $s0, 0x2 /* B706C 8012096C 86020000 */ lh $v0, 0x0($s0) /* B7070 80120970 44821000 */ mtc1 $v0, $f2 /* B7074 80120974 00000000 */ nop /* B7078 80120978 468010A0 */ cvt.s.w $f2, $f2 /* B707C 8012097C 460010A1 */ cvt.d.s $f2, $f2 /* B7080 80120980 46261082 */ mul.d $f2, $f2, $f6 /* B7084 80120984 00000000 */ nop /* B7088 80120988 26100002 */ addiu $s0, $s0, 0x2 /* B708C 8012098C 00711821 */ addu $v1, $v1, $s1 /* B7090 80120990 90630014 */ lbu $v1, 0x14($v1) /* B7094 80120994 86020000 */ lh $v0, 0x0($s0) /* B7098 80120998 26100002 */ addiu $s0, $s0, 0x2 /* B709C 8012099C 44820000 */ mtc1 $v0, $f0 /* B70A0 801209A0 00000000 */ nop /* B70A4 801209A4 46800020 */ cvt.s.w $f0, $f0 /* B70A8 801209A8 46000021 */ cvt.d.s $f0, $f0 /* B70AC 801209AC 46260002 */ mul.d $f0, $f0, $f6 /* B70B0 801209B0 00000000 */ nop /* B70B4 801209B4 AE300008 */ sw $s0, 0x8($s1) /* B70B8 801209B8 3C018015 */ lui $at, %hi(D_80150098) /* B70BC 801209BC D4260098 */ ldc1 $f6, %lo(D_80150098)($at) /* B70C0 801209C0 240200FF */ addiu $v0, $zero, 0xFF /* B70C4 801209C4 46262103 */ div.d $f4, $f4, $f6 /* B70C8 801209C8 46202620 */ cvt.s.d $f24, $f4 /* B70CC 801209CC 46261083 */ div.d $f2, $f2, $f6 /* B70D0 801209D0 462015A0 */ cvt.s.d $f22, $f2 /* B70D4 801209D4 46260003 */ div.d $f0, $f0, $f6 /* B70D8 801209D8 1062FF65 */ beq $v1, $v0, .L80120770 /* B70DC 801209DC 46200520 */ cvt.s.d $f20, $f0 /* B70E0 801209E0 8E240010 */ lw $a0, 0x10($s1) /* B70E4 801209E4 0C047837 */ jal get_animator_child_with_id /* B70E8 801209E8 0060282D */ daddu $a1, $v1, $zero /* B70EC 801209EC 0040282D */ daddu $a1, $v0, $zero /* B70F0 801209F0 10A0005E */ beqz $a1, .L80120B6C /* B70F4 801209F4 24020001 */ addiu $v0, $zero, 0x1 /* B70F8 801209F8 C4A4009C */ lwc1 $f4, 0x9C($a1) /* B70FC 801209FC 46182100 */ add.s $f4, $f4, $f24 /* B7100 80120A00 C4A200A0 */ lwc1 $f2, 0xA0($a1) /* B7104 80120A04 46161080 */ add.s $f2, $f2, $f22 /* B7108 80120A08 C4A000A4 */ lwc1 $f0, 0xA4($a1) /* B710C 80120A0C 46140000 */ add.s $f0, $f0, $f20 /* B7110 80120A10 E4A4009C */ swc1 $f4, 0x9C($a1) /* B7114 80120A14 E4A200A0 */ swc1 $f2, 0xA0($a1) /* B7118 80120A18 080482E0 */ j .L80120B80 /* B711C 80120A1C E4A000A4 */ swc1 $f0, 0xA4($a1) glabel .L80120A20 /* B7120 80120A20 86020000 */ lh $v0, 0x0($s0) /* B7124 80120A24 26100002 */ addiu $s0, $s0, 0x2 /* B7128 80120A28 86040000 */ lh $a0, 0x0($s0) /* B712C 80120A2C 26100002 */ addiu $s0, $s0, 0x2 /* B7130 80120A30 86030000 */ lh $v1, 0x0($s0) /* B7134 80120A34 26100002 */ addiu $s0, $s0, 0x2 /* B7138 80120A38 86050000 */ lh $a1, 0x0($s0) /* B713C 80120A3C 26100002 */ addiu $s0, $s0, 0x2 /* B7140 80120A40 4484C000 */ mtc1 $a0, $f24 /* B7144 80120A44 00000000 */ nop /* B7148 80120A48 4680C620 */ cvt.s.w $f24, $f24 /* B714C 80120A4C 4483B000 */ mtc1 $v1, $f22 /* B7150 80120A50 00000000 */ nop /* B7154 80120A54 4680B5A0 */ cvt.s.w $f22, $f22 /* B7158 80120A58 00511021 */ addu $v0, $v0, $s1 /* B715C 80120A5C 4485A000 */ mtc1 $a1, $f20 /* B7160 80120A60 00000000 */ nop /* B7164 80120A64 4680A520 */ cvt.s.w $f20, $f20 /* B7168 80120A68 90430014 */ lbu $v1, 0x14($v0) /* B716C 80120A6C 240200FF */ addiu $v0, $zero, 0xFF /* B7170 80120A70 1062FF3F */ beq $v1, $v0, .L80120770 /* B7174 80120A74 AE300008 */ sw $s0, 0x8($s1) /* B7178 80120A78 8E240010 */ lw $a0, 0x10($s1) /* B717C 80120A7C 0C047837 */ jal get_animator_child_with_id /* B7180 80120A80 0060282D */ daddu $a1, $v1, $zero /* B7184 80120A84 0040282D */ daddu $a1, $v0, $zero /* B7188 80120A88 10A00038 */ beqz $a1, .L80120B6C /* B718C 80120A8C 24020001 */ addiu $v0, $zero, 0x1 /* B7190 80120A90 E4B80090 */ swc1 $f24, 0x90($a1) /* B7194 80120A94 E4B60094 */ swc1 $f22, 0x94($a1) /* B7198 80120A98 080482E0 */ j .L80120B80 /* B719C 80120A9C E4B40098 */ swc1 $f20, 0x98($a1) glabel .L80120AA0 /* B71A0 80120AA0 86030000 */ lh $v1, 0x0($s0) /* B71A4 80120AA4 26100002 */ addiu $s0, $s0, 0x2 /* B71A8 80120AA8 86020000 */ lh $v0, 0x0($s0) /* B71AC 80120AAC 3C018015 */ lui $at, %hi(D_801500A0) /* B71B0 80120AB0 D42600A0 */ ldc1 $f6, %lo(D_801500A0)($at) /* B71B4 80120AB4 44822000 */ mtc1 $v0, $f4 /* B71B8 80120AB8 00000000 */ nop /* B71BC 80120ABC 46802120 */ cvt.s.w $f4, $f4 /* B71C0 80120AC0 46002121 */ cvt.d.s $f4, $f4 /* B71C4 80120AC4 46262102 */ mul.d $f4, $f4, $f6 /* B71C8 80120AC8 00000000 */ nop /* B71CC 80120ACC 26100002 */ addiu $s0, $s0, 0x2 /* B71D0 80120AD0 86020000 */ lh $v0, 0x0($s0) /* B71D4 80120AD4 44821000 */ mtc1 $v0, $f2 /* B71D8 80120AD8 00000000 */ nop /* B71DC 80120ADC 468010A0 */ cvt.s.w $f2, $f2 /* B71E0 80120AE0 460010A1 */ cvt.d.s $f2, $f2 /* B71E4 80120AE4 46261082 */ mul.d $f2, $f2, $f6 /* B71E8 80120AE8 00000000 */ nop /* B71EC 80120AEC 26100002 */ addiu $s0, $s0, 0x2 /* B71F0 80120AF0 00711821 */ addu $v1, $v1, $s1 /* B71F4 80120AF4 90630014 */ lbu $v1, 0x14($v1) /* B71F8 80120AF8 86020000 */ lh $v0, 0x0($s0) /* B71FC 80120AFC 26100002 */ addiu $s0, $s0, 0x2 /* B7200 80120B00 44820000 */ mtc1 $v0, $f0 /* B7204 80120B04 00000000 */ nop /* B7208 80120B08 46800020 */ cvt.s.w $f0, $f0 /* B720C 80120B0C 46000021 */ cvt.d.s $f0, $f0 /* B7210 80120B10 46260002 */ mul.d $f0, $f0, $f6 /* B7214 80120B14 00000000 */ nop /* B7218 80120B18 AE300008 */ sw $s0, 0x8($s1) /* B721C 80120B1C 3C018015 */ lui $at, %hi(D_801500A8) /* B7220 80120B20 D42600A8 */ ldc1 $f6, %lo(D_801500A8)($at) /* B7224 80120B24 240200FF */ addiu $v0, $zero, 0xFF /* B7228 80120B28 46262103 */ div.d $f4, $f4, $f6 /* B722C 80120B2C 46202620 */ cvt.s.d $f24, $f4 /* B7230 80120B30 46261083 */ div.d $f2, $f2, $f6 /* B7234 80120B34 462015A0 */ cvt.s.d $f22, $f2 /* B7238 80120B38 46260003 */ div.d $f0, $f0, $f6 /* B723C 80120B3C 1062FF0C */ beq $v1, $v0, .L80120770 /* B7240 80120B40 46200520 */ cvt.s.d $f20, $f0 /* B7244 80120B44 8E240010 */ lw $a0, 0x10($s1) /* B7248 80120B48 0C047837 */ jal get_animator_child_with_id /* B724C 80120B4C 0060282D */ daddu $a1, $v1, $zero /* B7250 80120B50 0040282D */ daddu $a1, $v0, $zero /* B7254 80120B54 10A00005 */ beqz $a1, .L80120B6C /* B7258 80120B58 24020001 */ addiu $v0, $zero, 0x1 /* B725C 80120B5C E4B800A8 */ swc1 $f24, 0xA8($a1) /* B7260 80120B60 E4B600AC */ swc1 $f22, 0xAC($a1) /* B7264 80120B64 080482E0 */ j .L80120B80 /* B7268 80120B68 E4B400B0 */ swc1 $f20, 0xB0($a1) .L80120B6C: /* B726C 80120B6C 8E2202CC */ lw $v0, 0x2CC($s1) /* B7270 80120B70 AE320008 */ sw $s2, 0x8($s1) /* B7274 80120B74 24420001 */ addiu $v0, $v0, 0x1 /* B7278 80120B78 AE2202CC */ sw $v0, 0x2CC($s1) glabel .L80120B7C /* B727C 80120B7C 0000102D */ daddu $v0, $zero, $zero .L80120B80: /* B7280 80120B80 8FBF001C */ lw $ra, 0x1C($sp) /* B7284 80120B84 8FB20018 */ lw $s2, 0x18($sp) /* B7288 80120B88 8FB10014 */ lw $s1, 0x14($sp) /* B728C 80120B8C 8FB00010 */ lw $s0, 0x10($sp) /* B7290 80120B90 D7B80030 */ ldc1 $f24, 0x30($sp) /* B7294 80120B94 D7B60028 */ ldc1 $f22, 0x28($sp) /* B7298 80120B98 D7B40020 */ ldc1 $f20, 0x20($sp) /* B729C 80120B9C 03E00008 */ jr $ra /* B72A0 80120BA0 27BD0038 */ addiu $sp, $sp, 0x38 /* B72A4 80120BA4 00000000 */ nop /* B72A8 80120BA8 00000000 */ nop /* B72AC 80120BAC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: s32 step_mesh_animator(ModelAnimator* animator) { s16* args = animator->animReadPos; s16* oldPos = animator->animReadPos; AnimatorNode* node; f32 x, y, z; s32 flags; s32 nodeId; switch (*args++) { case AS_END: return -1; case AS_SET_RENDER_MODE: animator->renderMode = *args++; animator->animReadPos = args; return 1; case AS_WAIT: args++; animator->animReadPos = args; return 1; case AS_END_LOOP: animator->animReadPos = animator->savedReadPos; animator->treeIndexPos = animator->savedTreePos; reload_mesh_animator_tree(animator); return 1; case AS_OP_4: animator->animReadPos = animator->savedReadPos; animator->treeIndexPos = animator->savedTreePos; break; case AS_LOOP: animator->animReadPos = animator->savedReadPos = args; animator->savedTreePos = animator->treeIndexPos; return 1; case AS_SET_FLAGS: flags = *args++; animator->animReadPos = args; animator->flags |= flags & 0xFFFF; return 1; case AS_SET_NODE_FLAGS: node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]); flags = *args++; node->flags |= flags; animator->animReadPos = args; return 1; case AS_CLEAR_NODE_FLAGS: node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]); flags = *args++; node->flags &= ~flags; animator->animReadPos = args; return 1; case AS_OP_19: animator->flags |= MODEL_ANIMATOR_FLAG_NO_FLIP; animator->animReadPos = args; return 1; case AS_SET_ROTATION: nodeId = animator->staticNodeIDs[*args++ - 1]; x = (f32)*args++ * 180.0 / 32767.0; y = (f32)*args++ * 180.0 / 32767.0; z = (f32)*args++ * 180.0 / 32767.0; animator->animReadPos = args; if (nodeId != 0xFF) { node = get_animator_child_with_id(animator->rootNode, nodeId); if (node != NULL) { node->rotation.x = x; node->rotation.y = y; node->rotation.z = z; return 1; } else { animator->animReadPos = oldPos; animator->treeIndexPos++; break; } } return 1; case AS_ADD_ROTATION: nodeId = animator->staticNodeIDs[*args++ - 1]; x = (f32)*args++ * 180.0 / 32767.0; y = (f32)*args++ * 180.0 / 32767.0; z = (f32)*args++ * 180.0 / 32767.0; animator->animReadPos = args; if (nodeId != 0xFF) { node = get_animator_child_with_id(animator->rootNode, nodeId); if (node != NULL) { node->rotation.x += x; node->rotation.y += y; node->rotation.z += z; return 1; } else { animator->animReadPos = oldPos; animator->treeIndexPos++; break; } } return 1; case AS_SET_POS: nodeId = animator->staticNodeIDs[*args++ - 1]; x = *args++; y = *args++; z = *args++; animator->animReadPos = args; if (nodeId != 0xFF) { node = get_animator_child_with_id(animator->rootNode, nodeId); if (node != NULL) { node->pos.x = x; node->pos.y = y; node->pos.z = z; return 1; } else { animator->animReadPos = oldPos; animator->treeIndexPos++; break; } } return 1; case AS_SET_SCALE: nodeId = animator->staticNodeIDs[*args++ - 1]; x = (f32)*args++ * 180.0 / 32767.0; y = (f32)*args++ * 180.0 / 32767.0; z = (f32)*args++ * 180.0 / 32767.0; animator->animReadPos = args; if (nodeId != 0xFF) { node = get_animator_child_with_id(animator->rootNode, nodeId); if (node != NULL) { node->scale.x = x; node->scale.y = y; node->scale.z = z; return 1; } else { animator->animReadPos = oldPos; animator->treeIndexPos++; break; } } return 1; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_GiantChest_open /* 108E64 802E75E4 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 108E68 802E75E8 AFB00028 */ sw $s0, 0x28($sp) /* 108E6C 802E75EC 0080802D */ daddu $s0, $a0, $zero /* 108E70 802E75F0 AFBF0034 */ sw $ra, 0x34($sp) /* 108E74 802E75F4 AFB20030 */ sw $s2, 0x30($sp) /* 108E78 802E75F8 AFB1002C */ sw $s1, 0x2C($sp) /* 108E7C 802E75FC F7BC0058 */ sdc1 $f28, 0x58($sp) /* 108E80 802E7600 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 108E84 802E7604 F7B80048 */ sdc1 $f24, 0x48($sp) /* 108E88 802E7608 F7B60040 */ sdc1 $f22, 0x40($sp) /* 108E8C 802E760C F7B40038 */ sdc1 $f20, 0x38($sp) /* 108E90 802E7610 8E110040 */ lw $s1, 0x40($s0) /* 108E94 802E7614 8E220010 */ lw $v0, 0x10($s1) /* 108E98 802E7618 3C128011 */ lui $s2, %hi(gPlayerStatus) /* 108E9C 802E761C 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* 108EA0 802E7620 10400006 */ beqz $v0, .L802E763C /* 108EA4 802E7624 00000000 */ nop /* 108EA8 802E7628 8E240014 */ lw $a0, 0x14($s1) /* 108EAC 802E762C 8E250018 */ lw $a1, 0x18($s1) /* 108EB0 802E7630 8E26001C */ lw $a2, 0x1C($s1) /* 108EB4 802E7634 0C04D083 */ jal set_item_entity_position /* 108EB8 802E7638 8E270020 */ lw $a3, 0x20($s1) .L802E763C: /* 108EBC 802E763C 0C0B9C8C */ jal entity_Chest_open /* 108EC0 802E7640 0200202D */ daddu $a0, $s0, $zero /* 108EC4 802E7644 92230004 */ lbu $v1, 0x4($s1) /* 108EC8 802E7648 24020001 */ addiu $v0, $zero, 0x1 /* 108ECC 802E764C 1062001E */ beq $v1, $v0, .L802E76C8 /* 108ED0 802E7650 28620002 */ slti $v0, $v1, 0x2 /* 108ED4 802E7654 50400005 */ beql $v0, $zero, .L802E766C /* 108ED8 802E7658 24020002 */ addiu $v0, $zero, 0x2 /* 108EDC 802E765C 10600009 */ beqz $v1, .L802E7684 /* 108EE0 802E7660 00000000 */ nop /* 108EE4 802E7664 080B9EAE */ j .L802E7AB8 /* 108EE8 802E7668 00000000 */ nop .L802E766C: /* 108EEC 802E766C 1062002C */ beq $v1, $v0, .L802E7720 /* 108EF0 802E7670 24020003 */ addiu $v0, $zero, 0x3 /* 108EF4 802E7674 10620107 */ beq $v1, $v0, .L802E7A94 /* 108EF8 802E7678 00000000 */ nop /* 108EFC 802E767C 080B9EAE */ j .L802E7AB8 /* 108F00 802E7680 00000000 */ nop .L802E7684: /* 108F04 802E7684 96220002 */ lhu $v0, 0x2($s1) /* 108F08 802E7688 2442FFFF */ addiu $v0, $v0, -0x1 /* 108F0C 802E768C A6220002 */ sh $v0, 0x2($s1) /* 108F10 802E7690 00021400 */ sll $v0, $v0, 16 /* 108F14 802E7694 14400108 */ bnez $v0, .L802E7AB8 /* 108F18 802E7698 00000000 */ nop /* 108F1C 802E769C 92220004 */ lbu $v0, 0x4($s1) /* 108F20 802E76A0 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 108F24 802E76A4 44810000 */ mtc1 $at, $f0 /* 108F28 802E76A8 3C014100 */ lui $at, (0x41000000 >> 16) /* 108F2C 802E76AC 44811000 */ mtc1 $at, $f2 /* 108F30 802E76B0 AE200024 */ sw $zero, 0x24($s1) /* 108F34 802E76B4 24420001 */ addiu $v0, $v0, 0x1 /* 108F38 802E76B8 A2220004 */ sb $v0, 0x4($s1) /* 108F3C 802E76BC E6200028 */ swc1 $f0, 0x28($s1) /* 108F40 802E76C0 080B9EAE */ j .L802E7AB8 /* 108F44 802E76C4 E622002C */ swc1 $f2, 0x2C($s1) .L802E76C8: /* 108F48 802E76C8 C620002C */ lwc1 $f0, 0x2C($s1) /* 108F4C 802E76CC 3C01802F */ lui $at, %hi(D_802EB320) /* 108F50 802E76D0 D422B320 */ ldc1 $f2, %lo(D_802EB320)($at) /* 108F54 802E76D4 C624001C */ lwc1 $f4, 0x1C($s1) /* 108F58 802E76D8 46000021 */ cvt.d.s $f0, $f0 /* 108F5C 802E76DC 46220001 */ sub.d $f0, $f0, $f2 /* 108F60 802E76E0 C622002C */ lwc1 $f2, 0x2C($s1) /* 108F64 802E76E4 46022100 */ add.s $f4, $f4, $f2 /* 108F68 802E76E8 3C014000 */ lui $at, (0x40000000 >> 16) /* 108F6C 802E76EC 44811000 */ mtc1 $at, $f2 /* 108F70 802E76F0 46200020 */ cvt.s.d $f0, $f0 /* 108F74 802E76F4 4602003E */ c.le.s $f0, $f2 /* 108F78 802E76F8 E620002C */ swc1 $f0, 0x2C($s1) /* 108F7C 802E76FC 450000EE */ bc1f .L802E7AB8 /* 108F80 802E7700 E624001C */ swc1 $f4, 0x1C($s1) /* 108F84 802E7704 92220004 */ lbu $v0, 0x4($s1) /* 108F88 802E7708 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 108F8C 802E770C 44810000 */ mtc1 $at, $f0 /* 108F90 802E7710 24420001 */ addiu $v0, $v0, 0x1 /* 108F94 802E7714 E620002C */ swc1 $f0, 0x2C($s1) /* 108F98 802E7718 080B9EAE */ j .L802E7AB8 /* 108F9C 802E771C A2220004 */ sb $v0, 0x4($s1) .L802E7720: /* 108FA0 802E7720 C6220028 */ lwc1 $f2, 0x28($s1) /* 108FA4 802E7724 3C01430C */ lui $at, (0x430C0000 >> 16) /* 108FA8 802E7728 44810000 */ mtc1 $at, $f0 /* 108FAC 802E772C 00000000 */ nop /* 108FB0 802E7730 4600103C */ c.lt.s $f2, $f0 /* 108FB4 802E7734 00000000 */ nop /* 108FB8 802E7738 45000014 */ bc1f .L802E778C /* 108FBC 802E773C 00000000 */ nop /* 108FC0 802E7740 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 108FC4 802E7744 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 108FC8 802E7748 44816000 */ mtc1 $at, $f12 /* 108FCC 802E774C 00000000 */ nop /* 108FD0 802E7750 460C1302 */ mul.s $f12, $f2, $f12 /* 108FD4 802E7754 00000000 */ nop /* 108FD8 802E7758 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 108FDC 802E775C 44810000 */ mtc1 $at, $f0 /* 108FE0 802E7760 0C00A874 */ jal cos_rad /* 108FE4 802E7764 46006303 */ div.s $f12, $f12, $f0 /* 108FE8 802E7768 3C014040 */ lui $at, (0x40400000 >> 16) /* 108FEC 802E776C 44811000 */ mtc1 $at, $f2 /* 108FF0 802E7770 00000000 */ nop /* 108FF4 802E7774 46020002 */ mul.s $f0, $f0, $f2 /* 108FF8 802E7778 00000000 */ nop /* 108FFC 802E777C C622001C */ lwc1 $f2, 0x1C($s1) /* 109000 802E7780 46001080 */ add.s $f2, $f2, $f0 /* 109004 802E7784 080B9DFC */ j .L802E77F0 /* 109008 802E7788 E622001C */ swc1 $f2, 0x1C($s1) .L802E778C: /* 10900C 802E778C C626001C */ lwc1 $f6, 0x1C($s1) /* 109010 802E7790 C640002C */ lwc1 $f0, 0x2C($s2) /* 109014 802E7794 46003001 */ sub.s $f0, $f6, $f0 /* 109018 802E7798 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 10901C 802E779C 44811000 */ mtc1 $at, $f2 /* 109020 802E77A0 00000000 */ nop /* 109024 802E77A4 46020001 */ sub.s $f0, $f0, $f2 /* 109028 802E77A8 3C013E80 */ lui $at, (0x3E800000 >> 16) /* 10902C 802E77AC 44811000 */ mtc1 $at, $f2 /* 109030 802E77B0 00000000 */ nop /* 109034 802E77B4 46020102 */ mul.s $f4, $f0, $f2 /* 109038 802E77B8 00000000 */ nop /* 10903C 802E77BC 3C01802F */ lui $at, %hi(D_802EB328) /* 109040 802E77C0 D422B328 */ ldc1 $f2, %lo(D_802EB328)($at) /* 109044 802E77C4 46002021 */ cvt.d.s $f0, $f4 /* 109048 802E77C8 4622003E */ c.le.d $f0, $f2 /* 10904C 802E77CC 00000000 */ nop /* 109050 802E77D0 45020006 */ bc1fl .L802E77EC /* 109054 802E77D4 46043001 */ sub.s $f0, $f6, $f4 /* 109058 802E77D8 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 10905C 802E77DC 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 109060 802E77E0 44812000 */ mtc1 $at, $f4 /* 109064 802E77E4 00000000 */ nop /* 109068 802E77E8 46043001 */ sub.s $f0, $f6, $f4 .L802E77EC: /* 10906C 802E77EC E620001C */ swc1 $f0, 0x1C($s1) .L802E77F0: /* 109070 802E77F0 C62C0024 */ lwc1 $f12, 0x24($s1) /* 109074 802E77F4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 109078 802E77F8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 10907C 802E77FC 4481D000 */ mtc1 $at, $f26 /* 109080 802E7800 00000000 */ nop /* 109084 802E7804 461A6302 */ mul.s $f12, $f12, $f26 /* 109088 802E7808 00000000 */ nop /* 10908C 802E780C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 109090 802E7810 4481E000 */ mtc1 $at, $f28 /* 109094 802E7814 0C00A85B */ jal sin_rad /* 109098 802E7818 461C6303 */ div.s $f12, $f12, $f28 /* 10909C 802E781C C60C0048 */ lwc1 $f12, 0x48($s0) /* 1090A0 802E7820 8E460028 */ lw $a2, 0x28($s2) /* 1090A4 802E7824 8E470030 */ lw $a3, 0x30($s2) /* 1090A8 802E7828 C60E0050 */ lwc1 $f14, 0x50($s0) /* 1090AC 802E782C 0C00A720 */ jal atan2 /* 1090B0 802E7830 46000606 */ mov.s $f24, $f0 /* 1090B4 802E7834 0C00A6C9 */ jal clamp_angle /* 1090B8 802E7838 46000306 */ mov.s $f12, $f0 /* 1090BC 802E783C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 1090C0 802E7840 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 1090C4 802E7844 3C014080 */ lui $at, (0x40800000 >> 16) /* 1090C8 802E7848 4481B000 */ mtc1 $at, $f22 /* 1090CC 802E784C 84430086 */ lh $v1, 0x86($v0) /* 1090D0 802E7850 24020012 */ addiu $v0, $zero, 0x12 /* 1090D4 802E7854 14620003 */ bne $v1, $v0, .L802E7864 /* 1090D8 802E7858 00000000 */ nop /* 1090DC 802E785C 3C014040 */ lui $at, (0x40400000 >> 16) /* 1090E0 802E7860 4481B000 */ mtc1 $at, $f22 .L802E7864: /* 1090E4 802E7864 461A0502 */ mul.s $f20, $f0, $f26 /* 1090E8 802E7868 00000000 */ nop /* 1090EC 802E786C 461CA503 */ div.s $f20, $f20, $f28 /* 1090F0 802E7870 0C00A85B */ jal sin_rad /* 1090F4 802E7874 4600A306 */ mov.s $f12, $f20 /* 1090F8 802E7878 4600B002 */ mul.s $f0, $f22, $f0 /* 1090FC 802E787C 00000000 */ nop /* 109100 802E7880 46180002 */ mul.s $f0, $f0, $f24 /* 109104 802E7884 00000000 */ nop /* 109108 802E7888 C6220018 */ lwc1 $f2, 0x18($s1) /* 10910C 802E788C 46001080 */ add.s $f2, $f2, $f0 /* 109110 802E7890 4600A306 */ mov.s $f12, $f20 /* 109114 802E7894 0C00A874 */ jal cos_rad /* 109118 802E7898 E6220018 */ swc1 $f2, 0x18($s1) /* 10911C 802E789C 4600B002 */ mul.s $f0, $f22, $f0 /* 109120 802E78A0 00000000 */ nop /* 109124 802E78A4 46180002 */ mul.s $f0, $f0, $f24 /* 109128 802E78A8 00000000 */ nop /* 10912C 802E78AC C6240024 */ lwc1 $f4, 0x24($s1) /* 109130 802E78B0 3C014100 */ lui $at, (0x41000000 >> 16) /* 109134 802E78B4 44811000 */ mtc1 $at, $f2 /* 109138 802E78B8 00000000 */ nop /* 10913C 802E78BC 46022100 */ add.s $f4, $f4, $f2 /* 109140 802E78C0 C6220020 */ lwc1 $f2, 0x20($s1) /* 109144 802E78C4 3C014334 */ lui $at, (0x43340000 >> 16) /* 109148 802E78C8 4481A000 */ mtc1 $at, $f20 /* 10914C 802E78CC 46001081 */ sub.s $f2, $f2, $f0 /* 109150 802E78D0 E6240024 */ swc1 $f4, 0x24($s1) /* 109154 802E78D4 4604A03E */ c.le.s $f20, $f4 /* 109158 802E78D8 00000000 */ nop /* 10915C 802E78DC 45000002 */ bc1f .L802E78E8 /* 109160 802E78E0 E6220020 */ swc1 $f2, 0x20($s1) /* 109164 802E78E4 E6340024 */ swc1 $f20, 0x24($s1) .L802E78E8: /* 109168 802E78E8 C6200028 */ lwc1 $f0, 0x28($s1) /* 10916C 802E78EC 3C014150 */ lui $at, (0x41500000 >> 16) /* 109170 802E78F0 44811000 */ mtc1 $at, $f2 /* 109174 802E78F4 00000000 */ nop /* 109178 802E78F8 46020000 */ add.s $f0, $f0, $f2 /* 10917C 802E78FC 4600A03E */ c.le.s $f20, $f0 /* 109180 802E7900 00000000 */ nop /* 109184 802E7904 4500006C */ bc1f .L802E7AB8 /* 109188 802E7908 E6200028 */ swc1 $f0, 0x28($s1) /* 10918C 802E790C 24020007 */ addiu $v0, $zero, 0x7 /* 109190 802E7910 A6220002 */ sh $v0, 0x2($s1) /* 109194 802E7914 92220004 */ lbu $v0, 0x4($s1) /* 109198 802E7918 8E230010 */ lw $v1, 0x10($s1) /* 10919C 802E791C E6340028 */ swc1 $f20, 0x28($s1) /* 1091A0 802E7920 24420001 */ addiu $v0, $v0, 0x1 /* 1091A4 802E7924 10600064 */ beqz $v1, .L802E7AB8 /* 1091A8 802E7928 A2220004 */ sb $v0, 0x4($s1) /* 1091AC 802E792C 3C040006 */ lui $a0, (0x6000C >> 16) /* 1091B0 802E7930 0C037FDE */ jal suggest_player_anim_always_forward /* 1091B4 802E7934 3484000C */ ori $a0, $a0, (0x6000C & 0xFFFF) /* 1091B8 802E7938 3C10800B */ lui $s0, %hi(gCameras) /* 1091BC 802E793C 26101D80 */ addiu $s0, $s0, %lo(gCameras) /* 1091C0 802E7940 C600006C */ lwc1 $f0, 0x6C($s0) /* 1091C4 802E7944 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 1091C8 802E7948 44816000 */ mtc1 $at, $f12 /* 1091CC 802E794C 00000000 */ nop /* 1091D0 802E7950 46006301 */ sub.s $f12, $f12, $f0 /* 1091D4 802E7954 461A6302 */ mul.s $f12, $f12, $f26 /* 1091D8 802E7958 00000000 */ nop /* 1091DC 802E795C 27A50018 */ addiu $a1, $sp, 0x18 /* 1091E0 802E7960 27A6001C */ addiu $a2, $sp, 0x1C /* 1091E4 802E7964 0C00A82D */ jal sin_cos_rad /* 1091E8 802E7968 461C6303 */ div.s $f12, $f12, $f28 /* 1091EC 802E796C C60C006C */ lwc1 $f12, 0x6C($s0) /* 1091F0 802E7970 460CA301 */ sub.s $f12, $f20, $f12 /* 1091F4 802E7974 461A6302 */ mul.s $f12, $f12, $f26 /* 1091F8 802E7978 00000000 */ nop /* 1091FC 802E797C 27A50020 */ addiu $a1, $sp, 0x20 /* 109200 802E7980 27A60024 */ addiu $a2, $sp, 0x24 /* 109204 802E7984 0C00A82D */ jal sin_cos_rad /* 109208 802E7988 461C6303 */ div.s $f12, $f12, $f28 /* 10920C 802E798C 4480B000 */ mtc1 $zero, $f22 /* 109210 802E7990 C7A60018 */ lwc1 $f6, 0x18($sp) /* 109214 802E7994 46163182 */ mul.s $f6, $f6, $f22 /* 109218 802E7998 00000000 */ nop /* 10921C 802E799C 3C014080 */ lui $at, (0x40800000 >> 16) /* 109220 802E79A0 4481A000 */ mtc1 $at, $f20 /* 109224 802E79A4 C7A20020 */ lwc1 $f2, 0x20($sp) /* 109228 802E79A8 46141082 */ mul.s $f2, $f2, $f20 /* 10922C 802E79AC 00000000 */ nop /* 109230 802E79B0 C620001C */ lwc1 $f0, 0x1C($s1) /* 109234 802E79B4 3C014140 */ lui $at, (0x41400000 >> 16) /* 109238 802E79B8 4481C000 */ mtc1 $at, $f24 /* 10923C 802E79BC 00000000 */ nop /* 109240 802E79C0 46180000 */ add.s $f0, $f0, $f24 /* 109244 802E79C4 C7A4001C */ lwc1 $f4, 0x1C($sp) /* 109248 802E79C8 46162102 */ mul.s $f4, $f4, $f22 /* 10924C 802E79CC 00000000 */ nop /* 109250 802E79D0 44060000 */ mfc1 $a2, $f0 /* 109254 802E79D4 C6200018 */ lwc1 $f0, 0x18($s1) /* 109258 802E79D8 46060000 */ add.s $f0, $f0, $f6 /* 10925C 802E79DC 46020001 */ sub.s $f0, $f0, $f2 /* 109260 802E79E0 C7A80024 */ lwc1 $f8, 0x24($sp) /* 109264 802E79E4 46144202 */ mul.s $f8, $f8, $f20 /* 109268 802E79E8 00000000 */ nop /* 10926C 802E79EC 44050000 */ mfc1 $a1, $f0 /* 109270 802E79F0 C6200020 */ lwc1 $f0, 0x20($s1) /* 109274 802E79F4 46040001 */ sub.s $f0, $f0, $f4 /* 109278 802E79F8 46080000 */ add.s $f0, $f0, $f8 /* 10927C 802E79FC 0000202D */ daddu $a0, $zero, $zero /* 109280 802E7A00 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 109284 802E7A04 4481D000 */ mtc1 $at, $f26 /* 109288 802E7A08 44070000 */ mfc1 $a3, $f0 /* 10928C 802E7A0C 24020064 */ addiu $v0, $zero, 0x64 /* 109290 802E7A10 E7BA0010 */ swc1 $f26, 0x10($sp) /* 109294 802E7A14 0C01C2EC */ jal fx_radial_shimmer /* 109298 802E7A18 AFA20014 */ sw $v0, 0x14($sp) /* 10929C 802E7A1C C7A60018 */ lwc1 $f6, 0x18($sp) /* 1092A0 802E7A20 46163182 */ mul.s $f6, $f6, $f22 /* 1092A4 802E7A24 00000000 */ nop /* 1092A8 802E7A28 C7A20020 */ lwc1 $f2, 0x20($sp) /* 1092AC 802E7A2C 46141082 */ mul.s $f2, $f2, $f20 /* 1092B0 802E7A30 00000000 */ nop /* 1092B4 802E7A34 C620001C */ lwc1 $f0, 0x1C($s1) /* 1092B8 802E7A38 46180000 */ add.s $f0, $f0, $f24 /* 1092BC 802E7A3C C7A4001C */ lwc1 $f4, 0x1C($sp) /* 1092C0 802E7A40 46162102 */ mul.s $f4, $f4, $f22 /* 1092C4 802E7A44 00000000 */ nop /* 1092C8 802E7A48 44060000 */ mfc1 $a2, $f0 /* 1092CC 802E7A4C C6200018 */ lwc1 $f0, 0x18($s1) /* 1092D0 802E7A50 46060000 */ add.s $f0, $f0, $f6 /* 1092D4 802E7A54 46020001 */ sub.s $f0, $f0, $f2 /* 1092D8 802E7A58 C7A80024 */ lwc1 $f8, 0x24($sp) /* 1092DC 802E7A5C 46144202 */ mul.s $f8, $f8, $f20 /* 1092E0 802E7A60 00000000 */ nop /* 1092E4 802E7A64 44050000 */ mfc1 $a1, $f0 /* 1092E8 802E7A68 C6200020 */ lwc1 $f0, 0x20($s1) /* 1092EC 802E7A6C 46040001 */ sub.s $f0, $f0, $f4 /* 1092F0 802E7A70 46080000 */ add.s $f0, $f0, $f8 /* 1092F4 802E7A74 0000202D */ daddu $a0, $zero, $zero /* 1092F8 802E7A78 44070000 */ mfc1 $a3, $f0 /* 1092FC 802E7A7C 26220034 */ addiu $v0, $s1, 0x34 /* 109300 802E7A80 E7BA0010 */ swc1 $f26, 0x10($sp) /* 109304 802E7A84 0C01C0AC */ jal fx_got_item_outline /* 109308 802E7A88 AFA20014 */ sw $v0, 0x14($sp) /* 10930C 802E7A8C 080B9EAE */ j .L802E7AB8 /* 109310 802E7A90 00000000 */ nop .L802E7A94: /* 109314 802E7A94 96220002 */ lhu $v0, 0x2($s1) /* 109318 802E7A98 2442FFFF */ addiu $v0, $v0, -0x1 /* 10931C 802E7A9C A6220002 */ sh $v0, 0x2($s1) /* 109320 802E7AA0 00021400 */ sll $v0, $v0, 16 /* 109324 802E7AA4 14400004 */ bnez $v0, .L802E7AB8 /* 109328 802E7AA8 00000000 */ nop /* 10932C 802E7AAC 0C043F5A */ jal exec_entity_commandlist /* 109330 802E7AB0 0200202D */ daddu $a0, $s0, $zero /* 109334 802E7AB4 A2200004 */ sb $zero, 0x4($s1) .L802E7AB8: /* 109338 802E7AB8 8FBF0034 */ lw $ra, 0x34($sp) /* 10933C 802E7ABC 8FB20030 */ lw $s2, 0x30($sp) /* 109340 802E7AC0 8FB1002C */ lw $s1, 0x2C($sp) /* 109344 802E7AC4 8FB00028 */ lw $s0, 0x28($sp) /* 109348 802E7AC8 D7BC0058 */ ldc1 $f28, 0x58($sp) /* 10934C 802E7ACC D7BA0050 */ ldc1 $f26, 0x50($sp) /* 109350 802E7AD0 D7B80048 */ ldc1 $f24, 0x48($sp) /* 109354 802E7AD4 D7B60040 */ ldc1 $f22, 0x40($sp) /* 109358 802E7AD8 D7B40038 */ ldc1 $f20, 0x38($sp) /* 10935C 802E7ADC 03E00008 */ jr $ra /* 109360 802E7AE0 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void entity_GiantChest_open(Entity* entity) { PlayerStatus* playerStatus = &gPlayerStatus; ChestData* chest = entity->dataBuf.chest; f32 cosFwd; f32 sinFwd; f32 cosRight; f32 sinRight; f32 theta; f32 giveItemLerpAlpha; f32 horizontalOffset; f32 dy; f32 depthOffset; f32 intermediateTheta; f32 radius; if (chest->itemID != 0) { set_item_entity_position(chest->itemEntityIndex, chest->itemEntityPos.x, chest->itemEntityPos.y, chest->itemEntityPos.z); } entity_Chest_open(entity); switch (chest->state) { case 0: chest->giveItemTimer--; if (chest->giveItemTimer == 0) { chest->giveItemRadiusInterpPhase = 0.0f; chest->state++; chest->giveItemHeightInterpPhase = 20.0f; chest->itemVelY = 8.0f; } break; case 1: chest->itemEntityPos.y += chest->itemVelY; chest->itemVelY -= 0.7; if (chest->itemVelY <= 2.0f) { chest->itemVelY = 6.0f; chest->state++; } break; case 2: if (chest->giveItemHeightInterpPhase < 140.0f) { chest->itemEntityPos.y += cos_rad(DEG_TO_RAD(chest->giveItemHeightInterpPhase)) * 3.0f; } else { dy = (chest->itemEntityPos.y - playerStatus->position.y - 30.0f) * 0.25f; if (dy <= 0.4) { dy = 0.4f; } chest->itemEntityPos.y -= dy; } giveItemLerpAlpha = sin_rad(DEG_TO_RAD(chest->giveItemRadiusInterpPhase)); theta = intermediateTheta = clamp_angle(atan2(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)); if (gGameStatusPtr->areaID == AREA_KZN) { radius = 3.0f; } else { radius = 4.0f; } theta *= TAU; theta = theta / 360.0f; chest->itemEntityPos.x += (radius * sin_rad(theta) * giveItemLerpAlpha); chest->itemEntityPos.z -= (radius * cos_rad(theta) * giveItemLerpAlpha); chest->giveItemRadiusInterpPhase += 8.0f; if (chest->giveItemRadiusInterpPhase >= 180.0f) { chest->giveItemRadiusInterpPhase = 180.0f; } chest->giveItemHeightInterpPhase += 13.0f; if (chest->giveItemHeightInterpPhase >= 180.0f){ chest->giveItemTimer = 7; chest->giveItemHeightInterpPhase = 180.0f; chest->state++; if (chest->itemID != 0) { suggest_player_anim_always_forward(ANIM_MarioW1_Lift); sin_cos_rad(DEG_TO_RAD(90.0f - gCameras[CAM_DEFAULT].currentYaw), &sinRight, &cosRight); sin_cos_rad(DEG_TO_RAD(180.0f - gCameras[CAM_DEFAULT].currentYaw), &sinFwd, &cosFwd); horizontalOffset = 0.0f; depthOffset = 4.0f; //RadialFlowOut fx_radial_shimmer(0, chest->itemEntityPos.x + horizontalOffset * sinRight - depthOffset * sinFwd, chest->itemEntityPos.y + 12.0f, chest->itemEntityPos.z - cosRight * horizontalOffset + cosFwd * depthOffset, 1.0f, 0x64); //GotItemOutline fx_got_item_outline(0, chest->itemEntityPos.x + horizontalOffset * sinRight - sinFwd * depthOffset, chest->itemEntityPos.y + 12.0f, chest->itemEntityPos.z - cosRight * horizontalOffset + cosFwd * depthOffset, 1.0f, &chest->gotItemEffect); } } break; case 3: chest->giveItemTimer--; if (chest->giveItemTimer == 0) { exec_entity_commandlist(entity); chest->state = 0; } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel partner_move_to_goal /* 88CDC 800EF82C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 88CE0 800EF830 AFB20038 */ sw $s2, 0x38($sp) /* 88CE4 800EF834 0080902D */ daddu $s2, $a0, $zero /* 88CE8 800EF838 AFB40040 */ sw $s4, 0x40($sp) /* 88CEC 800EF83C 00A0A02D */ daddu $s4, $a1, $zero /* 88CF0 800EF840 AFB3003C */ sw $s3, 0x3C($sp) /* 88CF4 800EF844 3C138011 */ lui $s3, %hi(gPlayerStatus) /* 88CF8 800EF848 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* 88CFC 800EF84C 3C058011 */ lui $a1, %hi(D_8010CFCE) /* 88D00 800EF850 24A5CFCE */ addiu $a1, $a1, %lo(D_8010CFCE) /* 88D04 800EF854 24020001 */ addiu $v0, $zero, 0x1 /* 88D08 800EF858 AFBF0044 */ sw $ra, 0x44($sp) /* 88D0C 800EF85C AFB10034 */ sw $s1, 0x34($sp) /* 88D10 800EF860 AFB00030 */ sw $s0, 0x30($sp) /* 88D14 800EF864 84A30000 */ lh $v1, 0x0($a1) /* 88D18 800EF868 94A40000 */ lhu $a0, 0x0($a1) /* 88D1C 800EF86C 10620044 */ beq $v1, $v0, .L800EF980 /* 88D20 800EF870 28620002 */ slti $v0, $v1, 0x2 /* 88D24 800EF874 10400118 */ beqz $v0, .L800EFCD8 /* 88D28 800EF878 00000000 */ nop /* 88D2C 800EF87C 14600116 */ bnez $v1, .L800EFCD8 /* 88D30 800EF880 24820001 */ addiu $v0, $a0, 0x1 /* 88D34 800EF884 C662002C */ lwc1 $f2, 0x2C($s3) /* 88D38 800EF888 3C018010 */ lui $at, %hi(wPartnerMoveGoalX) /* 88D3C 800EF88C C4208024 */ lwc1 $f0, %lo(wPartnerMoveGoalX)($at) /* 88D40 800EF890 46800020 */ cvt.s.w $f0, $f0 /* 88D44 800EF894 E6400060 */ swc1 $f0, 0x60($s2) /* 88D48 800EF898 44060000 */ mfc1 $a2, $f0 /* 88D4C 800EF89C 3C018010 */ lui $at, %hi(wPartnerMoveGoalZ) /* 88D50 800EF8A0 C4208028 */ lwc1 $f0, %lo(wPartnerMoveGoalZ)($at) /* 88D54 800EF8A4 46800020 */ cvt.s.w $f0, $f0 /* 88D58 800EF8A8 26500060 */ addiu $s0, $s2, 0x60 /* 88D5C 800EF8AC C64C0038 */ lwc1 $f12, 0x38($s2) /* 88D60 800EF8B0 C64E0040 */ lwc1 $f14, 0x40($s2) /* 88D64 800EF8B4 44070000 */ mfc1 $a3, $f0 /* 88D68 800EF8B8 26510068 */ addiu $s1, $s2, 0x68 /* 88D6C 800EF8BC A4A20000 */ sh $v0, 0x0($a1) /* 88D70 800EF8C0 AE470068 */ sw $a3, 0x68($s2) /* 88D74 800EF8C4 0C00A720 */ jal atan2 /* 88D78 800EF8C8 E6420064 */ swc1 $f2, 0x64($s2) /* 88D7C 800EF8CC 0200202D */ daddu $a0, $s0, $zero /* 88D80 800EF8D0 3C0640A0 */ lui $a2, (0x40A00000 >> 16) /* 88D84 800EF8D4 44070000 */ mfc1 $a3, $f0 /* 88D88 800EF8D8 0220282D */ daddu $a1, $s1, $zero /* 88D8C 800EF8DC 3C018010 */ lui $at, %hi(D_800F8034) /* 88D90 800EF8E0 AC278034 */ sw $a3, %lo(D_800F8034)($at) /* 88D94 800EF8E4 0C00A7E7 */ jal add_vec2D_polar /* 88D98 800EF8E8 AE47000C */ sw $a3, 0xC($s2) /* 88D9C 800EF8EC 3C108010 */ lui $s0, %hi(wPartnerMoveTime) /* 88DA0 800EF8F0 2610802C */ addiu $s0, $s0, %lo(wPartnerMoveTime) /* 88DA4 800EF8F4 C64C0038 */ lwc1 $f12, 0x38($s2) /* 88DA8 800EF8F8 C64E0040 */ lwc1 $f14, 0x40($s2) /* 88DAC 800EF8FC 8E460060 */ lw $a2, 0x60($s2) /* 88DB0 800EF900 8E470068 */ lw $a3, 0x68($s2) /* 88DB4 800EF904 24020012 */ addiu $v0, $zero, 0x12 /* 88DB8 800EF908 0C00A7B5 */ jal dist2D /* 88DBC 800EF90C AE020000 */ sw $v0, 0x0($s0) /* 88DC0 800EF910 E7A0002C */ swc1 $f0, 0x2C($sp) /* 88DC4 800EF914 C6020000 */ lwc1 $f2, 0x0($s0) /* 88DC8 800EF918 468010A0 */ cvt.s.w $f2, $f2 /* 88DCC 800EF91C 46020003 */ div.s $f0, $f0, $f2 /* 88DD0 800EF920 3C018010 */ lui $at, %hi(wPartnerMoveSpeed) /* 88DD4 800EF924 E4208030 */ swc1 $f0, %lo(wPartnerMoveSpeed)($at) /* 88DD8 800EF928 E6400018 */ swc1 $f0, 0x18($s2) /* 88DDC 800EF92C 46000021 */ cvt.d.s $f0, $f0 /* 88DE0 800EF930 26440028 */ addiu $a0, $s2, 0x28 /* 88DE4 800EF934 3C038011 */ lui $v1, %hi(wCurrentPartnerId) /* 88DE8 800EF938 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1) /* 88DEC 800EF93C 3C014010 */ lui $at, (0x40100000 >> 16) /* 88DF0 800EF940 44811800 */ mtc1 $at, $f3 /* 88DF4 800EF944 44801000 */ mtc1 $zero, $f2 /* 88DF8 800EF948 000310C0 */ sll $v0, $v1, 3 /* 88DFC 800EF94C 00431021 */ addu $v0, $v0, $v1 /* 88E00 800EF950 4620103E */ c.le.d $f2, $f0 /* 88E04 800EF954 00000000 */ nop /* 88E08 800EF958 45000003 */ bc1f .L800EF968 /* 88E0C 800EF95C 00021080 */ sll $v0, $v0, 2 /* 88E10 800EF960 0803BE5B */ j .L800EF96C /* 88E14 800EF964 24430018 */ addiu $v1, $v0, 0x18 .L800EF968: /* 88E18 800EF968 24430004 */ addiu $v1, $v0, 0x4 .L800EF96C: /* 88E1C 800EF96C 3C028010 */ lui $v0, %hi(gPartnerAnimations) /* 88E20 800EF970 24428348 */ addiu $v0, $v0, %lo(gPartnerAnimations) /* 88E24 800EF974 00431021 */ addu $v0, $v0, $v1 /* 88E28 800EF978 8C420000 */ lw $v0, 0x0($v0) /* 88E2C 800EF97C AC820000 */ sw $v0, 0x0($a0) .L800EF980: /* 88E30 800EF980 3C038010 */ lui $v1, %hi(wPartnerMoveTime) /* 88E34 800EF984 2463802C */ addiu $v1, $v1, %lo(wPartnerMoveTime) /* 88E38 800EF988 8C620000 */ lw $v0, 0x0($v1) /* 88E3C 800EF98C 104000C0 */ beqz $v0, .L800EFC90 /* 88E40 800EF990 2442FFFF */ addiu $v0, $v0, -0x1 /* 88E44 800EF994 16800092 */ bnez $s4, .L800EFBE0 /* 88E48 800EF998 AC620000 */ sw $v0, 0x0($v1) /* 88E4C 800EF99C 8E420000 */ lw $v0, 0x0($s2) /* 88E50 800EF9A0 30421000 */ andi $v0, $v0, 0x1000 /* 88E54 800EF9A4 14400003 */ bnez $v0, .L800EF9B4 /* 88E58 800EF9A8 00000000 */ nop /* 88E5C 800EF9AC C660002C */ lwc1 $f0, 0x2C($s3) /* 88E60 800EF9B0 E640003C */ swc1 $f0, 0x3C($s2) .L800EF9B4: /* 88E64 800EF9B4 C642001C */ lwc1 $f2, 0x1C($s2) /* 88E68 800EF9B8 44802000 */ mtc1 $zero, $f4 /* 88E6C 800EF9BC 00000000 */ nop /* 88E70 800EF9C0 46041032 */ c.eq.s $f2, $f4 /* 88E74 800EF9C4 00000000 */ nop /* 88E78 800EF9C8 45010060 */ bc1t .L800EFB4C /* 88E7C 800EF9CC 00000000 */ nop /* 88E80 800EF9D0 C6400014 */ lwc1 $f0, 0x14($s2) /* 88E84 800EF9D4 46001001 */ sub.s $f0, $f2, $f0 /* 88E88 800EF9D8 C642003C */ lwc1 $f2, 0x3C($s2) /* 88E8C 800EF9DC 46001080 */ add.s $f2, $f2, $f0 /* 88E90 800EF9E0 E640001C */ swc1 $f0, 0x1C($s2) /* 88E94 800EF9E4 4604003E */ c.le.s $f0, $f4 /* 88E98 800EF9E8 00000000 */ nop /* 88E9C 800EF9EC 4500000A */ bc1f .L800EFA18 /* 88EA0 800EF9F0 E642003C */ swc1 $f2, 0x3C($s2) /* 88EA4 800EF9F4 3C028011 */ lui $v0, %hi(wCurrentPartnerId) /* 88EA8 800EF9F8 8C42CFD8 */ lw $v0, %lo(wCurrentPartnerId)($v0) /* 88EAC 800EF9FC 000218C0 */ sll $v1, $v0, 3 /* 88EB0 800EFA00 00621821 */ addu $v1, $v1, $v0 /* 88EB4 800EFA04 00031880 */ sll $v1, $v1, 2 /* 88EB8 800EFA08 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0xC) /* 88EBC 800EFA0C 00431021 */ addu $v0, $v0, $v1 /* 88EC0 800EFA10 8C428354 */ lw $v0, %lo(gPartnerAnimations + 0xC)($v0) /* 88EC4 800EFA14 AE420028 */ sw $v0, 0x28($s2) .L800EFA18: /* 88EC8 800EFA18 C642001C */ lwc1 $f2, 0x1C($s2) /* 88ECC 800EFA1C 4604103E */ c.le.s $f2, $f4 /* 88ED0 800EFA20 00000000 */ nop /* 88ED4 800EFA24 45000049 */ bc1f .L800EFB4C /* 88ED8 800EFA28 27A50020 */ addiu $a1, $sp, 0x20 /* 88EDC 800EFA2C C6400038 */ lwc1 $f0, 0x38($s2) /* 88EE0 800EFA30 46001085 */ abs.s $f2, $f2 /* 88EE4 800EFA34 E7A00020 */ swc1 $f0, 0x20($sp) /* 88EE8 800EFA38 864200A8 */ lh $v0, 0xA8($s2) /* 88EEC 800EFA3C C6440040 */ lwc1 $f4, 0x40($s2) /* 88EF0 800EFA40 0040182D */ daddu $v1, $v0, $zero /* 88EF4 800EFA44 44820000 */ mtc1 $v0, $f0 /* 88EF8 800EFA48 00000000 */ nop /* 88EFC 800EFA4C 46800020 */ cvt.s.w $f0, $f0 /* 88F00 800EFA50 44833000 */ mtc1 $v1, $f6 /* 88F04 800EFA54 00000000 */ nop /* 88F08 800EFA58 468031A0 */ cvt.s.w $f6, $f6 /* 88F0C 800EFA5C 46001080 */ add.s $f2, $f2, $f0 /* 88F10 800EFA60 C640003C */ lwc1 $f0, 0x3C($s2) /* 88F14 800EFA64 27A2002C */ addiu $v0, $sp, 0x2C /* 88F18 800EFA68 46060000 */ add.s $f0, $f0, $f6 /* 88F1C 800EFA6C E7A40028 */ swc1 $f4, 0x28($sp) /* 88F20 800EFA70 E7A2002C */ swc1 $f2, 0x2C($sp) /* 88F24 800EFA74 E7A00024 */ swc1 $f0, 0x24($sp) /* 88F28 800EFA78 AFA20010 */ sw $v0, 0x10($sp) /* 88F2C 800EFA7C C640000C */ lwc1 $f0, 0xC($s2) /* 88F30 800EFA80 E7A00014 */ swc1 $f0, 0x14($sp) /* 88F34 800EFA84 864200A6 */ lh $v0, 0xA6($s2) /* 88F38 800EFA88 27A60024 */ addiu $a2, $sp, 0x24 /* 88F3C 800EFA8C 44820000 */ mtc1 $v0, $f0 /* 88F40 800EFA90 00000000 */ nop /* 88F44 800EFA94 46800020 */ cvt.s.w $f0, $f0 /* 88F48 800EFA98 E7A00018 */ swc1 $f0, 0x18($sp) /* 88F4C 800EFA9C 8E440080 */ lw $a0, 0x80($s2) /* 88F50 800EFAA0 0C0371DE */ jal npc_raycast_down_around /* 88F54 800EFAA4 27A70028 */ addiu $a3, $sp, 0x28 /* 88F58 800EFAA8 10400028 */ beqz $v0, .L800EFB4C /* 88F5C 800EFAAC 00000000 */ nop /* 88F60 800EFAB0 C640001C */ lwc1 $f0, 0x1C($s2) /* 88F64 800EFAB4 3C0141B0 */ lui $at, (0x41B00000 >> 16) /* 88F68 800EFAB8 44811000 */ mtc1 $at, $f2 /* 88F6C 800EFABC 46000005 */ abs.s $f0, $f0 /* 88F70 800EFAC0 46020000 */ add.s $f0, $f0, $f2 /* 88F74 800EFAC4 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 88F78 800EFAC8 4600103E */ c.le.s $f2, $f0 /* 88F7C 800EFACC 00000000 */ nop /* 88F80 800EFAD0 4500001E */ bc1f .L800EFB4C /* 88F84 800EFAD4 26440028 */ addiu $a0, $s2, 0x28 /* 88F88 800EFAD8 C6400018 */ lwc1 $f0, 0x18($s2) /* 88F8C 800EFADC 3C014010 */ lui $at, (0x40100000 >> 16) /* 88F90 800EFAE0 44811800 */ mtc1 $at, $f3 /* 88F94 800EFAE4 44801000 */ mtc1 $zero, $f2 /* 88F98 800EFAE8 3C038011 */ lui $v1, %hi(wCurrentPartnerId) /* 88F9C 800EFAEC 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1) /* 88FA0 800EFAF0 46000021 */ cvt.d.s $f0, $f0 /* 88FA4 800EFAF4 000310C0 */ sll $v0, $v1, 3 /* 88FA8 800EFAF8 00431021 */ addu $v0, $v0, $v1 /* 88FAC 800EFAFC 4620103E */ c.le.d $f2, $f0 /* 88FB0 800EFB00 00000000 */ nop /* 88FB4 800EFB04 45000003 */ bc1f .L800EFB14 /* 88FB8 800EFB08 00021080 */ sll $v0, $v0, 2 /* 88FBC 800EFB0C 0803BEC6 */ j .L800EFB18 /* 88FC0 800EFB10 24430018 */ addiu $v1, $v0, 0x18 .L800EFB14: /* 88FC4 800EFB14 24430004 */ addiu $v1, $v0, 0x4 .L800EFB18: /* 88FC8 800EFB18 3C028010 */ lui $v0, %hi(gPartnerAnimations) /* 88FCC 800EFB1C 24428348 */ addiu $v0, $v0, %lo(gPartnerAnimations) /* 88FD0 800EFB20 00431021 */ addu $v0, $v0, $v1 /* 88FD4 800EFB24 8C420000 */ lw $v0, 0x0($v0) /* 88FD8 800EFB28 C7A00024 */ lwc1 $f0, 0x24($sp) /* 88FDC 800EFB2C AC820000 */ sw $v0, 0x0($a0) /* 88FE0 800EFB30 8E420000 */ lw $v0, 0x0($s2) /* 88FE4 800EFB34 2403F7FF */ addiu $v1, $zero, -0x801 /* 88FE8 800EFB38 AE400014 */ sw $zero, 0x14($s2) /* 88FEC 800EFB3C AE40001C */ sw $zero, 0x1C($s2) /* 88FF0 800EFB40 E640003C */ swc1 $f0, 0x3C($s2) /* 88FF4 800EFB44 00431024 */ and $v0, $v0, $v1 /* 88FF8 800EFB48 AE420000 */ sw $v0, 0x0($s2) .L800EFB4C: /* 88FFC 800EFB4C 3C018010 */ lui $at, %hi(wPartnerMoveSpeed) /* 89000 800EFB50 C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at) /* 89004 800EFB54 E6400018 */ swc1 $f0, 0x18($s2) /* 89008 800EFB58 3C018010 */ lui $at, %hi(D_800F8034) /* 8900C 800EFB5C C4208034 */ lwc1 $f0, %lo(D_800F8034)($at) /* 89010 800EFB60 8E450018 */ lw $a1, 0x18($s2) /* 89014 800EFB64 44060000 */ mfc1 $a2, $f0 /* 89018 800EFB68 0240202D */ daddu $a0, $s2, $zero /* 8901C 800EFB6C 0C00EA95 */ jal npc_move_heading /* 89020 800EFB70 AE46000C */ sw $a2, 0xC($s2) /* 89024 800EFB74 26450028 */ addiu $a1, $s2, 0x28 /* 89028 800EFB78 C6400018 */ lwc1 $f0, 0x18($s2) /* 8902C 800EFB7C 3C014010 */ lui $at, (0x40100000 >> 16) /* 89030 800EFB80 44811800 */ mtc1 $at, $f3 /* 89034 800EFB84 44801000 */ mtc1 $zero, $f2 /* 89038 800EFB88 3C038011 */ lui $v1, %hi(wCurrentPartnerId) /* 8903C 800EFB8C 8C63CFD8 */ lw $v1, %lo(wCurrentPartnerId)($v1) /* 89040 800EFB90 46000021 */ cvt.d.s $f0, $f0 /* 89044 800EFB94 000310C0 */ sll $v0, $v1, 3 /* 89048 800EFB98 00431021 */ addu $v0, $v0, $v1 /* 8904C 800EFB9C 00021080 */ sll $v0, $v0, 2 /* 89050 800EFBA0 4620103E */ c.le.d $f2, $f0 /* 89054 800EFBA4 00000000 */ nop /* 89058 800EFBA8 45000003 */ bc1f .L800EFBB8 /* 8905C 800EFBAC 0040182D */ daddu $v1, $v0, $zero /* 89060 800EFBB0 0803BEEF */ j .L800EFBBC /* 89064 800EFBB4 24430018 */ addiu $v1, $v0, 0x18 .L800EFBB8: /* 89068 800EFBB8 24630004 */ addiu $v1, $v1, 0x4 .L800EFBBC: /* 8906C 800EFBBC 3C028010 */ lui $v0, %hi(gPartnerAnimations) /* 89070 800EFBC0 24428348 */ addiu $v0, $v0, %lo(gPartnerAnimations) /* 89074 800EFBC4 00431021 */ addu $v0, $v0, $v1 /* 89078 800EFBC8 8C420000 */ lw $v0, 0x0($v0) /* 8907C 800EFBCC 0240202D */ daddu $a0, $s2, $zero /* 89080 800EFBD0 0C00E2BF */ jal npc_do_world_collision /* 89084 800EFBD4 ACA20000 */ sw $v0, 0x0($a1) /* 89088 800EFBD8 0803BF17 */ j .L800EFC5C /* 8908C 800EFBDC 24050001 */ addiu $a1, $zero, 0x1 .L800EFBE0: /* 89090 800EFBE0 C644003C */ lwc1 $f4, 0x3C($s2) /* 89094 800EFBE4 C666002C */ lwc1 $f6, 0x2C($s3) /* 89098 800EFBE8 46062001 */ sub.s $f0, $f4, $f6 /* 8909C 800EFBEC 3C014014 */ lui $at, (0x40140000 >> 16) /* 890A0 800EFBF0 44811800 */ mtc1 $at, $f3 /* 890A4 800EFBF4 44801000 */ mtc1 $zero, $f2 /* 890A8 800EFBF8 46000021 */ cvt.d.s $f0, $f0 /* 890AC 800EFBFC 46200005 */ abs.d $f0, $f0 /* 890B0 800EFC00 4620103C */ c.lt.d $f2, $f0 /* 890B4 800EFC04 00000000 */ nop /* 890B8 800EFC08 45000009 */ bc1f .L800EFC30 /* 890BC 800EFC0C 00000000 */ nop /* 890C0 800EFC10 46043001 */ sub.s $f0, $f6, $f4 /* 890C4 800EFC14 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 890C8 800EFC18 44811000 */ mtc1 $at, $f2 /* 890CC 800EFC1C 00000000 */ nop /* 890D0 800EFC20 46020002 */ mul.s $f0, $f0, $f2 /* 890D4 800EFC24 00000000 */ nop /* 890D8 800EFC28 46002000 */ add.s $f0, $f4, $f0 /* 890DC 800EFC2C E640003C */ swc1 $f0, 0x3C($s2) .L800EFC30: /* 890E0 800EFC30 3C018010 */ lui $at, %hi(wPartnerMoveSpeed) /* 890E4 800EFC34 C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at) /* 890E8 800EFC38 E6400018 */ swc1 $f0, 0x18($s2) /* 890EC 800EFC3C 3C018010 */ lui $at, %hi(D_800F8034) /* 890F0 800EFC40 C4208034 */ lwc1 $f0, %lo(D_800F8034)($at) /* 890F4 800EFC44 8E450018 */ lw $a1, 0x18($s2) /* 890F8 800EFC48 44060000 */ mfc1 $a2, $f0 /* 890FC 800EFC4C 0240202D */ daddu $a0, $s2, $zero /* 89100 800EFC50 0C00EA95 */ jal npc_move_heading /* 89104 800EFC54 AE46000C */ sw $a2, 0xC($s2) /* 89108 800EFC58 24050001 */ addiu $a1, $zero, 0x1 .L800EFC5C: /* 8910C 800EFC5C C6400018 */ lwc1 $f0, 0x18($s2) /* 89110 800EFC60 3C014010 */ lui $at, (0x40100000 >> 16) /* 89114 800EFC64 44811800 */ mtc1 $at, $f3 /* 89118 800EFC68 44801000 */ mtc1 $zero, $f2 /* 8911C 800EFC6C 46000021 */ cvt.d.s $f0, $f0 /* 89120 800EFC70 4622003C */ c.lt.d $f0, $f2 /* 89124 800EFC74 00000000 */ nop /* 89128 800EFC78 45030001 */ bc1tl .L800EFC80 /* 8912C 800EFC7C 0000282D */ daddu $a1, $zero, $zero .L800EFC80: /* 89130 800EFC80 0C00F598 */ jal spawn_surface_effects /* 89134 800EFC84 0240202D */ daddu $a0, $s2, $zero /* 89138 800EFC88 0803BF36 */ j .L800EFCD8 /* 8913C 800EFC8C 00000000 */ nop .L800EFC90: /* 89140 800EFC90 2403FFBF */ addiu $v1, $zero, -0x41 /* 89144 800EFC94 8E420000 */ lw $v0, 0x0($s2) /* 89148 800EFC98 3C048011 */ lui $a0, %hi(wCurrentPartnerId) /* 8914C 800EFC9C 8C84CFD8 */ lw $a0, %lo(wCurrentPartnerId)($a0) /* 89150 800EFCA0 00431024 */ and $v0, $v0, $v1 /* 89154 800EFCA4 000418C0 */ sll $v1, $a0, 3 /* 89158 800EFCA8 00641821 */ addu $v1, $v1, $a0 /* 8915C 800EFCAC 00031880 */ sll $v1, $v1, 2 /* 89160 800EFCB0 3C048011 */ lui $a0, %hi(D_8010CFCE) /* 89164 800EFCB4 2484CFCE */ addiu $a0, $a0, %lo(D_8010CFCE) /* 89168 800EFCB8 AE420000 */ sw $v0, 0x0($s2) /* 8916C 800EFCBC 94820000 */ lhu $v0, 0x0($a0) /* 89170 800EFCC0 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14) /* 89174 800EFCC4 00230821 */ addu $at, $at, $v1 /* 89178 800EFCC8 8C23835C */ lw $v1, %lo(gPartnerAnimations + 0x14)($at) /* 8917C 800EFCCC 24420001 */ addiu $v0, $v0, 0x1 /* 89180 800EFCD0 A4820000 */ sh $v0, 0x0($a0) /* 89184 800EFCD4 AE430028 */ sw $v1, 0x28($s2) .L800EFCD8: /* 89188 800EFCD8 8FBF0044 */ lw $ra, 0x44($sp) /* 8918C 800EFCDC 8FB40040 */ lw $s4, 0x40($sp) /* 89190 800EFCE0 8FB3003C */ lw $s3, 0x3C($sp) /* 89194 800EFCE4 8FB20038 */ lw $s2, 0x38($sp) /* 89198 800EFCE8 8FB10034 */ lw $s1, 0x34($sp) /* 8919C 800EFCEC 8FB00030 */ lw $s0, 0x30($sp) /* 891A0 800EFCF0 03E00008 */ jr $ra /* 891A4 800EFCF4 27BD0048 */ addiu $sp, $sp, 0x48 /* 891A8 800EFCF8 00000000 */ nop /* 891AC 800EFCFC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void partner_move_to_goal(Npc* partner, s32 isFlying) { PlayerStatus* playerStatus = &gPlayerStatus; f32 x, y, z, temp; s32 var_a1; switch (D_8010CFCE) { case 0: D_8010CFCE++; partner->moveToPos.y = playerStatus->position.y; partner->moveToPos.x = wPartnerMoveGoalX; partner->moveToPos.z = wPartnerMoveGoalZ; D_800F8034 = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z); partner->yaw = D_800F8034; add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, 5.0f, D_800F8034); wPartnerMoveTime = 18; temp = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z); partner->moveSpeed = wPartnerMoveSpeed = temp / wPartnerMoveTime; partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[ (partner->moveSpeed >= 4.0) ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK]; case 1: if (wPartnerMoveTime != 0) { wPartnerMoveTime--; if (!isFlying) { if (!(partner->flags & NPC_FLAG_GROUNDED)) { partner->pos.y = playerStatus->position.y; } if (partner->jumpVelocity != 0.0f) { partner->jumpVelocity -= partner->jumpScale; partner->pos.y += partner->jumpVelocity; if (partner->jumpVelocity <= 0.0f) { partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall; } if (partner->jumpVelocity <= 0.0f) { temp = fabsf(partner->jumpVelocity) + partner->collisionHeight; y = partner->pos.y + partner->collisionHeight; x = partner->pos.x; z = partner->pos.z; if (npc_raycast_down_around(partner->collisionChannel, &x, &y, &z, &temp, partner->yaw, partner->collisionDiameter) && (temp <= fabsf(partner->jumpVelocity) + 22.0f)) { partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[ (partner->moveSpeed >= 4.0) ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK]; partner->jumpScale = 0.0f; partner->jumpVelocity = 0.0f; partner->pos.y = y; partner->flags &= ~NPC_FLAG_JUMPING; } } } partner->moveSpeed = wPartnerMoveSpeed; partner->yaw = D_800F8034; npc_move_heading(partner, partner->moveSpeed, partner->yaw); partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[ (partner->moveSpeed >= 4.0) ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK]; npc_do_world_collision(partner); } else { if (fabs(partner->pos.y - playerStatus->position.y) > 5.0) { partner->pos.y += (playerStatus->position.y - partner->pos.y) * 0.5f; } partner->moveSpeed = wPartnerMoveSpeed; partner->yaw = D_800F8034; npc_move_heading(partner, partner->moveSpeed, partner->yaw); } spawn_surface_effects(partner, (partner->moveSpeed < 4.0) ? SURFACE_INTERACT_WALK : SURFACE_INTERACT_RUN); } else { partner->flags &= ~NPC_FLAG_IGNORE_WORLD_COLLISION; partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle; D_8010CFCE++; } break; case 2: break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802456F8 /* 173FD8 802456F8 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 173FDC 802456FC AFB20018 */ sw $s2, 0x18($sp) /* 173FE0 80245700 3C12800E */ lui $s2, %hi(gBattleStatus) /* 173FE4 80245704 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) /* 173FE8 80245708 AFBF0020 */ sw $ra, 0x20($sp) /* 173FEC 8024570C AFB3001C */ sw $s3, 0x1C($sp) /* 173FF0 80245710 AFB10014 */ sw $s1, 0x14($sp) .L80245714: /* 173FF4 80245714 AFB00010 */ sw $s0, 0x10($sp) D_80245718: /* 173FF8 80245718 8E5000D8 */ lw $s0, 0xD8($s2) /* 173FFC 8024571C 8E5100DC */ lw $s1, 0xDC($s2) D_80245720: /* 174000 80245720 3C03800E */ lui $v1, %hi(gBattleSubState) /* 174004 80245724 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) jtbl_80245728: /* 174008 80245728 2C620008 */ sltiu $v0, $v1, 0x8 .L8024572C: /* 17400C 8024572C 104000DF */ beqz $v0, .L80245AAC /* 174010 80245730 2613000C */ addiu $s3, $s0, 0xC .L80245734: /* 174014 80245734 00031080 */ sll $v0, $v1, 2 D_80245738: /* 174018 80245738 3C01802A */ lui $at, %hi(jtbl_8029CAD0) /* 17401C 8024573C 00220821 */ addu $at, $at, $v0 /* 174020 80245740 8C22CAD0 */ lw $v0, %lo(jtbl_8029CAD0)($at) glabel func_80245744 /* 174024 80245744 00400008 */ jr $v0 .L80245748: /* 174028 80245748 00000000 */ nop glabel .L8024574C /* 17402C 8024574C 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) D_80245750: /* 174030 80245750 8E020000 */ lw $v0, 0x0($s0) /* 174034 80245754 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF) /* 174038 80245758 00431024 */ and $v0, $v0, $v1 D_8024575C: /* 17403C 8024575C AE020000 */ sw $v0, 0x0($s0) /* 174040 80245760 8E220000 */ lw $v0, 0x0($s1) /* 174044 80245764 3C10800E */ lui $s0, %hi(gBattleStatus) glabel func_80245768 /* 174048 80245768 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) /* 17404C 8024576C 00431024 */ and $v0, $v0, $v1 .L80245770: /* 174050 80245770 AE220000 */ sw $v0, 0x0($s1) D_80245774: /* 174054 80245774 8E020004 */ lw $v0, 0x4($s0) /* 174058 80245778 24040013 */ addiu $a0, $zero, 0x13 /* 17405C 8024577C A240008C */ sb $zero, 0x8C($s2) /* 174060 80245780 34420010 */ ori $v0, $v0, 0x10 D_80245784: /* 174064 80245784 0C093903 */ jal func_8024E40C /* 174068 80245788 AE020004 */ sw $v0, 0x4($s0) /* 17406C 8024578C 3C06C2C6 */ lui $a2, (0xC2C60000 >> 16) /* 174070 80245790 3C01C2B2 */ lui $at, (0xC2B20000 >> 16) glabel func_80245794 /* 174074 80245794 44816000 */ mtc1 $at, $f12 /* 174078 80245798 3C014220 */ lui $at, (0x42200000 >> 16) /* 17407C 8024579C 44817000 */ mtc1 $at, $f14 .L802457A0: /* 174080 802457A0 0C093948 */ jal func_8024E520 /* 174084 802457A4 00000000 */ nop D_802457A8: /* 174088 802457A8 0C093965 */ jal func_8024E594 .L802457AC: /* 17408C 802457AC 24040174 */ addiu $a0, $zero, 0x174 D_802457B0: /* 174090 802457B0 0C093978 */ jal func_8024E5E0 /* 174094 802457B4 0000202D */ daddu $a0, $zero, $zero glabel func_802457B8 /* 174098 802457B8 0000282D */ daddu $a1, $zero, $zero /* 17409C 802457BC 3C07FFF7 */ lui $a3, (0xFFF7FFFF >> 16) glabel func_802457C0 /* 1740A0 802457C0 34E7FFFF */ ori $a3, $a3, (0xFFF7FFFF & 0xFFFF) /* 1740A4 802457C4 3C06F7FF */ lui $a2, (0xF7FFFFFF >> 16) D_802457C8: /* 1740A8 802457C8 34C6FFFF */ ori $a2, $a2, (0xF7FFFFFF & 0xFFFF) /* 1740AC 802457CC 0240202D */ daddu $a0, $s2, $zero /* 1740B0 802457D0 8E020000 */ lw $v0, 0x0($s0) D_802457D4: /* 1740B4 802457D4 2403FFFD */ addiu $v1, $zero, -0x3 D_802457D8: /* 1740B8 802457D8 00431024 */ and $v0, $v0, $v1 /* 1740BC 802457DC AE020000 */ sw $v0, 0x0($s0) D_802457E0: /* 1740C0 802457E0 8C8300E0 */ lw $v1, 0xE0($a0) .L802457E4: /* 1740C4 802457E4 10600005 */ beqz $v1, .L802457FC .L802457E8: /* 1740C8 802457E8 24A50001 */ addiu $a1, $a1, 0x1 /* 1740CC 802457EC 8C620000 */ lw $v0, 0x0($v1) /* 1740D0 802457F0 00471024 */ and $v0, $v0, $a3 D_802457F4: /* 1740D4 802457F4 00461024 */ and $v0, $v0, $a2 /* 1740D8 802457F8 AC620000 */ sw $v0, 0x0($v1) .L802457FC: /* 1740DC 802457FC 28A20018 */ slti $v0, $a1, 0x18 D_80245800: /* 1740E0 80245800 1440FFF7 */ bnez $v0, D_802457E0 /* 1740E4 80245804 24840004 */ addiu $a0, $a0, 0x4 glabel func_80245808 /* 1740E8 80245808 2402FFFF */ addiu $v0, $zero, -0x1 /* 1740EC 8024580C A242005C */ sb $v0, 0x5C($s2) /* 1740F0 80245810 2402000A */ addiu $v0, $zero, 0xA D_80245814: /* 1740F4 80245814 3C01802A */ lui $at, %hi(D_8029F248) /* 1740F8 80245818 AC22F248 */ sw $v0, %lo(D_8029F248)($at) /* 1740FC 8024581C 24020002 */ addiu $v0, $zero, 0x2 /* 174100 80245820 3C01800E */ lui $at, %hi(gBattleSubState) /* 174104 80245824 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel .L80245828 /* 174108 80245828 3C03802A */ lui $v1, %hi(D_8029F248) /* 17410C 8024582C 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) D_80245830: /* 174110 80245830 8C620000 */ lw $v0, 0x0($v1) /* 174114 80245834 10400003 */ beqz $v0, .L80245844 D_80245838: /* 174118 80245838 2442FFFF */ addiu $v0, $v0, -0x1 /* 17411C 8024583C 080916AB */ j .L80245AAC D_80245840: /* 174120 80245840 AC620000 */ sw $v0, 0x0($v1) .L80245844: /* 174124 80245844 0C098EF2 */ jal deduct_current_move_fp D_80245848: /* 174128 80245848 00000000 */ nop /* 17412C 8024584C 3C048028 */ lui $a0, %hi(BtlPutPartnerAway) D_80245850: /* 174130 80245850 24840A34 */ addiu $a0, $a0, %lo(BtlPutPartnerAway) /* 174134 80245854 2405000A */ addiu $a1, $zero, 0xA D_80245858: /* 174138 80245858 0C0B0CF8 */ jal start_script /* 17413C 8024585C 0000302D */ daddu $a2, $zero, $zero D_80245860: /* 174140 80245860 0040202D */ daddu $a0, $v0, $zero /* 174144 80245864 AE4400BC */ sw $a0, 0xBC($s2) D_80245868: /* 174148 80245868 8C820144 */ lw $v0, 0x144($a0) .L8024586C: /* 17414C 8024586C AE4200C0 */ sw $v0, 0xC0($s2) .L80245870: /* 174150 80245870 24020100 */ addiu $v0, $zero, 0x100 /* 174154 80245874 AC820148 */ sw $v0, 0x148($a0) /* 174158 80245878 C6200144 */ lwc1 $f0, 0x144($s1) /* 17415C 8024587C AE60001C */ sw $zero, 0x1C($s3) /* 174160 80245880 E6600018 */ swc1 $f0, 0x18($s3) /* 174164 80245884 C620014C */ lwc1 $f0, 0x14C($s1) /* 174168 80245888 24020003 */ addiu $v0, $zero, 0x3 /* 17416C 8024588C 3C01800E */ lui $at, %hi(gBattleSubState) /* 174170 80245890 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 174174 80245894 080916AB */ j .L80245AAC /* 174178 80245898 E6600020 */ swc1 $f0, 0x20($s3) glabel .L8024589C /* 17417C 8024589C 8E4400C0 */ lw $a0, 0xC0($s2) /* 174180 802458A0 0C0B1059 */ jal does_script_exist D_802458A4: /* 174184 802458A4 00000000 */ nop D_802458A8: /* 174188 802458A8 14400080 */ bnez $v0, .L80245AAC D_802458AC: /* 17418C 802458AC 00000000 */ nop jtbl_802458B0: /* 174190 802458B0 0C0902EF */ jal func_80240BBC D_802458B4: /* 174194 802458B4 0220202D */ daddu $a0, $s1, $zero /* 174198 802458B8 924301AC */ lbu $v1, 0x1AC($s2) /* 17419C 802458BC 3C028011 */ lui $v0, %hi(gPlayerData) jtbl_802458C0: /* 1741A0 802458C0 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* 1741A4 802458C4 0C0992DD */ jal load_partner_actor D_802458C8: /* 1741A8 802458C8 A0430012 */ sb $v1, 0x12($v0) /* 1741AC 802458CC 8E5100DC */ lw $s1, 0xDC($s2) /* 1741B0 802458D0 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) .L802458D4: /* 1741B4 802458D4 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) .L802458D8: /* 1741B8 802458D8 44810000 */ mtc1 $at, $f0 /* 1741BC 802458DC 00000000 */ nop /* 1741C0 802458E0 E6200170 */ swc1 $f0, 0x170($s1) /* 1741C4 802458E4 E6200174 */ swc1 $f0, 0x174($s1) .L802458E8: /* 1741C8 802458E8 E6200178 */ swc1 $f0, 0x178($s1) /* 1741CC 802458EC C6600018 */ lwc1 $f0, 0x18($s3) D_802458F0: /* 1741D0 802458F0 C6220148 */ lwc1 $f2, 0x148($s1) /* 1741D4 802458F4 E6200018 */ swc1 $f0, 0x18($s1) /* 1741D8 802458F8 E622001C */ swc1 $f2, 0x1C($s1) /* 1741DC 802458FC C6600020 */ lwc1 $f0, 0x20($s3) .L80245900: /* 1741E0 80245900 3C0141C8 */ lui $at, (0x41C80000 >> 16) D_80245904: /* 1741E4 80245904 44811000 */ mtc1 $at, $f2 /* 1741E8 80245908 E6200020 */ swc1 $f0, 0x20($s1) /* 1741EC 8024590C C6000144 */ lwc1 $f0, 0x144($s0) .L80245910: /* 1741F0 80245910 E6200144 */ swc1 $f0, 0x144($s1) D_80245914: /* 1741F4 80245914 C6000148 */ lwc1 $f0, 0x148($s0) D_80245918: /* 1741F8 80245918 46020000 */ add.s $f0, $f0, $f2 /* 1741FC 8024591C E6200148 */ swc1 $f0, 0x148($s1) /* 174200 80245920 C600014C */ lwc1 $f0, 0x14C($s0) .L80245924: /* 174204 80245924 24020004 */ addiu $v0, $zero, 0x4 D_80245928: /* 174208 80245928 3C01800E */ lui $at, %hi(gBattleSubState) D_8024592C: /* 17420C 8024592C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) D_80245930: /* 174210 80245930 080916AB */ j .L80245AAC /* 174214 80245934 E620014C */ swc1 $f0, 0x14C($s1) glabel .L80245938 /* 174218 80245938 8E5100DC */ lw $s1, 0xDC($s2) /* 17421C 8024593C 12200006 */ beqz $s1, D_80245958 /* 174220 80245940 00000000 */ nop /* 174224 80245944 0C0B1059 */ jal does_script_exist D_80245948: /* 174228 80245948 8E2401E4 */ lw $a0, 0x1E4($s1) .L8024594C: /* 17422C 8024594C 14400057 */ bnez $v0, .L80245AAC D_80245950: /* 174230 80245950 00000000 */ nop D_80245954: /* 174234 80245954 AE2001D4 */ sw $zero, 0x1D4($s1) D_80245958: /* 174238 80245958 3C048028 */ lui $a0, %hi(BtlBringPartnerOut) /* 17423C 8024595C 24840B6C */ addiu $a0, $a0, %lo(BtlBringPartnerOut) D_80245960: /* 174240 80245960 2405000A */ addiu $a1, $zero, 0xA /* 174244 80245964 0C0B0CF8 */ jal start_script D_80245968: /* 174248 80245968 0000302D */ daddu $a2, $zero, $zero /* 17424C 8024596C 0040202D */ daddu $a0, $v0, $zero D_80245970: /* 174250 80245970 AE4400BC */ sw $a0, 0xBC($s2) .L80245974: /* 174254 80245974 8C820144 */ lw $v0, 0x144($a0) D_80245978: /* 174258 80245978 24030005 */ addiu $v1, $zero, 0x5 /* 17425C 8024597C 3C01800E */ lui $at, %hi(gBattleSubState) D_80245980: /* 174260 80245980 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at) .L80245984: /* 174264 80245984 AE4200C0 */ sw $v0, 0xC0($s2) /* 174268 80245988 24020100 */ addiu $v0, $zero, 0x100 flo_08_pad_598C: /* 17426C 8024598C 080916AB */ j .L80245AAC D_80245990: /* 174270 80245990 AC820148 */ sw $v0, 0x148($a0) glabel .L80245994 /* 174274 80245994 8E4400C0 */ lw $a0, 0xC0($s2) /* 174278 80245998 0C0B1059 */ jal does_script_exist /* 17427C 8024599C 00000000 */ nop D_802459A0: /* 174280 802459A0 14400042 */ bnez $v0, .L80245AAC /* 174284 802459A4 00000000 */ nop /* 174288 802459A8 8E5100DC */ lw $s1, 0xDC($s2) /* 17428C 802459AC 12200010 */ beqz $s1, .L802459F0 /* 174290 802459B0 24020006 */ addiu $v0, $zero, 0x6 D_802459B4: /* 174294 802459B4 8E2201CC */ lw $v0, 0x1CC($s1) /* 174298 802459B8 1040000C */ beqz $v0, .L802459EC /* 17429C 802459BC 2405000A */ addiu $a1, $zero, 0xA D_802459C0: /* 1742A0 802459C0 00A0102D */ daddu $v0, $a1, $zero /* 1742A4 802459C4 A24201A7 */ sb $v0, 0x1A7($s2) /* 1742A8 802459C8 8E2401CC */ lw $a0, 0x1CC($s1) D_802459CC: /* 1742AC 802459CC 0C0B0CF8 */ jal start_script /* 1742B0 802459D0 0000302D */ daddu $a2, $zero, $zero /* 1742B4 802459D4 0040202D */ daddu $a0, $v0, $zero .L802459D8: /* 1742B8 802459D8 AE2401DC */ sw $a0, 0x1DC($s1) /* 1742BC 802459DC 8C820144 */ lw $v0, 0x144($a0) .L802459E0: /* 1742C0 802459E0 AE2201EC */ sw $v0, 0x1EC($s1) /* 1742C4 802459E4 24020100 */ addiu $v0, $zero, 0x100 /* 1742C8 802459E8 AC820148 */ sw $v0, 0x148($a0) .L802459EC: /* 1742CC 802459EC 24020006 */ addiu $v0, $zero, 0x6 .L802459F0: /* 1742D0 802459F0 3C01800E */ lui $at, %hi(gBattleSubState) /* 1742D4 802459F4 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 1742D8 802459F8 080916AB */ j .L80245AAC /* 1742DC 802459FC 00000000 */ nop D_80245A00: /* 1742E0 80245A00 8E5100DC */ lw $s1, 0xDC($s2) D_80245A04: /* 1742E4 80245A04 12200008 */ beqz $s1, .L80245A28 D_80245A08: /* 1742E8 80245A08 00000000 */ nop D_80245A0C: /* 1742EC 80245A0C 8E2201CC */ lw $v0, 0x1CC($s1) glabel func_80245A10 /* 1742F0 80245A10 10400005 */ beqz $v0, .L80245A28 D_80245A14: /* 1742F4 80245A14 00000000 */ nop /* 1742F8 80245A18 0C0B1059 */ jal does_script_exist .L80245A1C: /* 1742FC 80245A1C 8E2401EC */ lw $a0, 0x1EC($s1) /* 174300 80245A20 14400022 */ bnez $v0, .L80245AAC /* 174304 80245A24 00000000 */ nop .L80245A28: /* 174308 80245A28 0C093903 */ jal func_8024E40C /* 17430C 80245A2C 24040002 */ addiu $a0, $zero, 0x2 D_80245A30: /* 174310 80245A30 24020007 */ addiu $v0, $zero, 0x7 /* 174314 80245A34 3C01800E */ lui $at, %hi(gBattleSubState) D_80245A38: /* 174318 80245A38 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 17431C 80245A3C 080916AB */ j .L80245AAC glabel func_80245A40 /* 174320 80245A40 00000000 */ nop glabel .L80245A44 /* 174324 80245A44 8242008C */ lb $v0, 0x8C($s2) D_80245A48: /* 174328 80245A48 14400018 */ bnez $v0, .L80245AAC /* 17432C 80245A4C 2403FFEF */ addiu $v1, $zero, -0x11 D_80245A50: /* 174330 80245A50 3C04800E */ lui $a0, %hi(gBattleStatus) /* 174334 80245A54 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) D_80245A58: /* 174338 80245A58 8C820004 */ lw $v0, 0x4($a0) /* 17433C 80245A5C 00431024 */ and $v0, $v0, $v1 D_80245A60: /* 174340 80245A60 AC820004 */ sw $v0, 0x4($a0) /* 174344 80245A64 8C820000 */ lw $v0, 0x0($a0) D_80245A68: /* 174348 80245A68 3C030008 */ lui $v1, (0x80000 >> 16) /* 17434C 80245A6C 00431024 */ and $v0, $v0, $v1 D_80245A70: /* 174350 80245A70 14400007 */ bnez $v0, .L80245A90 /* 174354 80245A74 0200202D */ daddu $a0, $s0, $zero D_80245A78: /* 174358 80245A78 0C099CAB */ jal player_team_is_ability_active /* 17435C 80245A7C 2405001A */ addiu $a1, $zero, 0x1A /* 174360 80245A80 14400008 */ bnez $v0, .L80245AA4 D_80245A84: /* 174364 80245A84 2404000C */ addiu $a0, $zero, 0xC /* 174368 80245A88 080916A9 */ j .L80245AA4 /* 17436C 80245A8C 24040016 */ addiu $a0, $zero, 0x16 .L80245A90: /* 174370 80245A90 0C099CAB */ jal player_team_is_ability_active /* 174374 80245A94 2405001A */ addiu $a1, $zero, 0x1A /* 174378 80245A98 10400002 */ beqz $v0, .L80245AA4 /* 17437C 80245A9C 24040017 */ addiu $a0, $zero, 0x17 /* 174380 80245AA0 2404000C */ addiu $a0, $zero, 0xC .L80245AA4: /* 174384 80245AA4 0C090464 */ jal func_80241190 D_80245AA8: /* 174388 80245AA8 00000000 */ nop glabel .L80245AAC /* 17438C 80245AAC 8FBF0020 */ lw $ra, 0x20($sp) /* 174390 80245AB0 8FB3001C */ lw $s3, 0x1C($sp) D_80245AB4: /* 174394 80245AB4 8FB20018 */ lw $s2, 0x18($sp) D_80245AB8: /* 174398 80245AB8 8FB10014 */ lw $s1, 0x14($sp) D_80245ABC: /* 17439C 80245ABC 8FB00010 */ lw $s0, 0x10($sp) /* 1743A0 80245AC0 03E00008 */ jr $ra /* 1743A4 80245AC4 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_change_partner(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; ActorState* state = &player->state; PlayerData* playerData = &gPlayerData; Actor* enemyActor; Evt* script; s32 i; switch (gBattleSubState) { case BTL_SUBSTATE_CHANGE_PARTNER_INIT: player->flags &= ~ACTOR_FLAG_8000000; partner->flags &= ~ACTOR_FLAG_8000000; battleStatus->stateFreezeCount = 0; gBattleStatus.flags2 |= BS_FLAGS2_10; btl_cam_use_preset(BTL_CAM_PRESET_19); btl_cam_set_target_pos(-89.0, 40.0, -99.0); btl_cam_set_zoom(372); btl_cam_set_zoffset(0); gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemyActor = battleStatus->enemyActors[i]; if (enemyActor != NULL) { enemyActor->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN; enemyActor->flags &= ~ACTOR_FLAG_8000000; } } battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] = -1; D_8029F248 = 10; gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PUT_AWAY; case BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PUT_AWAY: if (D_8029F248 != 0) { D_8029F248--; break; } deduct_current_move_fp(); script = start_script(&BtlPutPartnerAway, EVT_PRIORITY_A, 0); battleStatus->controlScript = script; battleStatus->controlScriptID = script->id; script->owner1.actorID = ACTOR_PARTNER; state->unk_18.x = partner->currentPos.x; state->unk_18.y = 0.0f; state->unk_18.z = partner->currentPos.z; gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_LOAD_NEW_PARTNER; break; case BTL_SUBSTATE_CHANGE_PARTNER_LOAD_NEW_PARTNER: if (does_script_exist(battleStatus->controlScriptID)) { break; } btl_delete_actor(partner); playerData->currentPartner = battleStatus->unk_1AC; load_partner_actor(); partner = battleStatus->partnerActor; partner->scale.x = 0.1f; partner->scale.y = 0.1f; partner->scale.z = 0.1f; partner->state.goalPos.x = state->unk_18.x; partner->state.goalPos.y = partner->currentPos.y; partner->state.goalPos.z = state->unk_18.z; partner->currentPos.x = player->currentPos.x; partner->currentPos.y = player->currentPos.y + 25.0f; partner->currentPos.z = player->currentPos.z; gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_EXEC_BRING_OUT; break; case BTL_SUBSTATE_CHANGE_PARTNER_EXEC_BRING_OUT: partner = battleStatus->partnerActor; if (partner != NULL) { if (does_script_exist(partner->takeTurnScriptID)) { break; } partner->takeTurnScript = NULL; } script = start_script(&BtlBringPartnerOut, EVT_PRIORITY_A, 0); battleStatus->controlScript = script; battleStatus->controlScriptID = script->id; script->owner1.actorID = ACTOR_PARTNER; gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PHASE; break; case BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PHASE: if (does_script_exist(battleStatus->controlScriptID)) { break; } 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_CHANGE_PARTNER_AWAIT_PHASE; break; case BTL_SUBSTATE_CHANGE_PARTNER_AWAIT_PHASE: partner = battleStatus->partnerActor; if (partner != NULL) { if (partner->handlePhaseSource != NULL && does_script_exist(partner->handleBatttlePhaseScriptID)) { break; } } btl_cam_use_preset(BTL_CAM_DEFAULT); gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_DONE; break; case BTL_SUBSTATE_CHANGE_PARTNER_DONE: if (battleStatus->stateFreezeCount != 0) { break; } gBattleStatus.flags2 &= ~BS_FLAGS2_10; if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) { if (player_team_is_ability_active(player, ABILITY_QUICK_CHANGE) != FALSE) { btl_set_state(BATTLE_STATE_PREPARE_MENU); } else { btl_set_state(BATTLE_STATE_END_PLAYER_TURN); } } else { if (player_team_is_ability_active(player, ABILITY_QUICK_CHANGE) == FALSE) { btl_set_state(BATTLE_STATE_END_PARTNER_TURN); } else { btl_set_state(BATTLE_STATE_PREPARE_MENU); } } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel confetti_appendGfx /* 38B5D0 E00887E0 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 38B5D4 E00887E4 0080382D */ daddu $a3, $a0, $zero /* 38B5D8 E00887E8 3C08DB06 */ lui $t0, (0xDB060024 >> 16) /* 38B5DC E00887EC 35080024 */ ori $t0, $t0, (0xDB060024 & 0xFFFF) /* 38B5E0 E00887F0 27A40018 */ addiu $a0, $sp, 0x18 /* 38B5E4 E00887F4 AFB200B0 */ sw $s2, 0xB0($sp) /* 38B5E8 E00887F8 3C120001 */ lui $s2, (0x11630 >> 16) /* 38B5EC E00887FC AFB500BC */ sw $s5, 0xBC($sp) /* 38B5F0 E0088800 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 38B5F4 E0088804 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 38B5F8 E0088808 AFBF00CC */ sw $ra, 0xCC($sp) /* 38B5FC E008880C AFBE00C8 */ sw $fp, 0xC8($sp) /* 38B600 E0088810 AFB700C4 */ sw $s7, 0xC4($sp) /* 38B604 E0088814 AFB600C0 */ sw $s6, 0xC0($sp) /* 38B608 E0088818 AFB400B8 */ sw $s4, 0xB8($sp) /* 38B60C E008881C AFB300B4 */ sw $s3, 0xB4($sp) /* 38B610 E0088820 AFB100AC */ sw $s1, 0xAC($sp) /* 38B614 E0088824 AFB000A8 */ sw $s0, 0xA8($sp) /* 38B618 E0088828 8EA30000 */ lw $v1, 0x0($s5) /* 38B61C E008882C 8CF3000C */ lw $s3, 0xC($a3) /* 38B620 E0088830 0060302D */ daddu $a2, $v1, $zero /* 38B624 E0088834 24630008 */ addiu $v1, $v1, 0x8 /* 38B628 E0088838 AEA30000 */ sw $v1, 0x0($s5) /* 38B62C E008883C 8E650000 */ lw $a1, 0x0($s3) /* 38B630 E0088840 24620008 */ addiu $v0, $v1, 0x8 /* 38B634 E0088844 AEA20000 */ sw $v0, 0x0($s5) /* 38B638 E0088848 8E7E0024 */ lw $fp, 0x24($s3) /* 38B63C E008884C 8E69002C */ lw $t1, 0x2C($s3) /* 38B640 E0088850 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 38B644 E0088854 AFA9009C */ sw $t1, 0x9C($sp) /* 38B648 E0088858 8E690028 */ lw $t1, 0x28($s3) /* 38B64C E008885C 00052880 */ sll $a1, $a1, 2 /* 38B650 E0088860 AFA90098 */ sw $t1, 0x98($sp) /* 38B654 E0088864 3C01E009 */ lui $at, (0xE0090000 >> 16) /* 38B658 E0088868 00250821 */ addu $at, $at, $a1 /* 38B65C E008886C 8C258CC0 */ lw $a1, -0x7340($at) /* 38B660 E0088870 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 38B664 E0088874 AFA500A0 */ sw $a1, 0xA0($sp) /* 38B668 E0088878 ACC20000 */ sw $v0, 0x0($a2) /* 38B66C E008887C ACC00004 */ sw $zero, 0x4($a2) /* 38B670 E0088880 AC680000 */ sw $t0, 0x0($v1) /* 38B674 E0088884 8CE50010 */ lw $a1, 0x10($a3) /* 38B678 E0088888 24620010 */ addiu $v0, $v1, 0x10 /* 38B67C E008888C AEA20000 */ sw $v0, 0x0($s5) /* 38B680 E0088890 8CA5001C */ lw $a1, 0x1C($a1) /* 38B684 E0088894 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 38B688 E0088898 AC620008 */ sw $v0, 0x8($v1) /* 38B68C E008889C 3C020900 */ lui $v0, %hi(D_09000940_4159A0) /* 38B690 E00888A0 24420940 */ addiu $v0, $v0, %lo(D_09000940_4159A0) /* 38B694 E00888A4 AC62000C */ sw $v0, 0xC($v1) /* 38B698 E00888A8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 38B69C E00888AC 00A22821 */ addu $a1, $a1, $v0 /* 38B6A0 E00888B0 AC650004 */ sw $a1, 0x4($v1) /* 38B6A4 E00888B4 8E650004 */ lw $a1, 0x4($s3) /* 38B6A8 E00888B8 8E660008 */ lw $a2, 0x8($s3) /* 38B6AC E00888BC 8E67000C */ lw $a3, 0xC($s3) /* 38B6B0 E00888C0 0C080108 */ jal shim_guTranslateF /* 38B6B4 E00888C4 0000A02D */ daddu $s4, $zero, $zero /* 38B6B8 E00888C8 27B00058 */ addiu $s0, $sp, 0x58 /* 38B6BC E00888CC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 38B6C0 E00888D0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 38B6C4 E00888D4 44800000 */ mtc1 $zero, $f0 /* 38B6C8 E00888D8 00031080 */ sll $v0, $v1, 2 /* 38B6CC E00888DC 00431021 */ addu $v0, $v0, $v1 /* 38B6D0 E00888E0 00021080 */ sll $v0, $v0, 2 /* 38B6D4 E00888E4 00431023 */ subu $v0, $v0, $v1 /* 38B6D8 E00888E8 000218C0 */ sll $v1, $v0, 3 /* 38B6DC E00888EC 00431021 */ addu $v0, $v0, $v1 /* 38B6E0 E00888F0 000210C0 */ sll $v0, $v0, 3 /* 38B6E4 E00888F4 44060000 */ mfc1 $a2, $f0 /* 38B6E8 E00888F8 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 38B6EC E00888FC 00220821 */ addu $at, $at, $v0 /* 38B6F0 E0088900 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 38B6F4 E0088904 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 38B6F8 E0088908 46000007 */ neg.s $f0, $f0 /* 38B6FC E008890C 44050000 */ mfc1 $a1, $f0 /* 38B700 E0088910 0200202D */ daddu $a0, $s0, $zero /* 38B704 E0088914 0C080104 */ jal shim_guRotateF /* 38B708 E0088918 AFA60010 */ sw $a2, 0x10($sp) /* 38B70C E008891C 0200202D */ daddu $a0, $s0, $zero /* 38B710 E0088920 27A50018 */ addiu $a1, $sp, 0x18 /* 38B714 E0088924 0C080114 */ jal shim_guMtxCatF /* 38B718 E0088928 00A0302D */ daddu $a2, $a1, $zero /* 38B71C E008892C 27A40018 */ addiu $a0, $sp, 0x18 /* 38B720 E0088930 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 38B724 E0088934 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 38B728 E0088938 3C11800A */ lui $s1, %hi(gDisplayContext) /* 38B72C E008893C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 38B730 E0088940 96050000 */ lhu $a1, 0x0($s0) /* 38B734 E0088944 8E220000 */ lw $v0, 0x0($s1) /* 38B738 E0088948 00052980 */ sll $a1, $a1, 6 /* 38B73C E008894C 00B22821 */ addu $a1, $a1, $s2 /* 38B740 E0088950 0C080118 */ jal shim_guMtxF2L /* 38B744 E0088954 00452821 */ addu $a1, $v0, $a1 /* 38B748 E0088958 3C04DA38 */ lui $a0, (0xDA380002 >> 16) /* 38B74C E008895C 34840002 */ ori $a0, $a0, (0xDA380002 & 0xFFFF) /* 38B750 E0088960 8EA30000 */ lw $v1, 0x0($s5) /* 38B754 E0088964 96020000 */ lhu $v0, 0x0($s0) /* 38B758 E0088968 0060282D */ daddu $a1, $v1, $zero /* 38B75C E008896C 24630008 */ addiu $v1, $v1, 0x8 /* 38B760 E0088970 0060B02D */ daddu $s6, $v1, $zero /* 38B764 E0088974 24430001 */ addiu $v1, $v0, 0x1 /* 38B768 E0088978 3042FFFF */ andi $v0, $v0, 0xFFFF /* 38B76C E008897C 00021180 */ sll $v0, $v0, 6 /* 38B770 E0088980 AEB60000 */ sw $s6, 0x0($s5) /* 38B774 E0088984 ACA40000 */ sw $a0, 0x0($a1) /* 38B778 E0088988 A6030000 */ sh $v1, 0x0($s0) /* 38B77C E008898C 8E230000 */ lw $v1, 0x0($s1) /* 38B780 E0088990 00521021 */ addu $v0, $v0, $s2 /* 38B784 E0088994 00621821 */ addu $v1, $v1, $v0 /* 38B788 E0088998 26C20008 */ addiu $v0, $s6, 0x8 /* 38B78C E008899C ACA30004 */ sw $v1, 0x4($a1) /* 38B790 E00889A0 AEA20000 */ sw $v0, 0x0($s5) /* 38B794 E00889A4 8FA9009C */ lw $t1, 0x9C($sp) /* 38B798 E00889A8 1920009B */ blez $t1, .LE0088C18 /* 38B79C E00889AC 26730034 */ addiu $s3, $s3, 0x34 /* 38B7A0 E00889B0 3C092AAA */ lui $t1, (0x2AAAAAAB >> 16) /* 38B7A4 E00889B4 3529AAAB */ ori $t1, $t1, (0x2AAAAAAB & 0xFFFF) /* 38B7A8 E00889B8 AFA900A4 */ sw $t1, 0xA4($sp) /* 38B7AC E00889BC 3C170001 */ lui $s7, (0x11630 >> 16) /* 38B7B0 E00889C0 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* 38B7B4 E00889C4 02A0882D */ daddu $s1, $s5, $zero /* 38B7B8 E00889C8 03C90018 */ mult $fp, $t1 /* 38B7BC E00889CC 3C15FC11 */ lui $s5, (0xFC11B223 >> 16) /* 38B7C0 E00889D0 36B5B223 */ ori $s5, $s5, (0xFC11B223 & 0xFFFF) /* 38B7C4 E00889D4 2672000C */ addiu $s2, $s3, 0xC /* 38B7C8 E00889D8 001E17C3 */ sra $v0, $fp, 31 /* 38B7CC E00889DC 00004810 */ mfhi $t1 /* 38B7D0 E00889E0 01229823 */ subu $s3, $t1, $v0 .LE00889E4: /* 38B7D4 E00889E4 8FA900A4 */ lw $t1, 0xA4($sp) /* 38B7D8 E00889E8 02890018 */ mult $s4, $t1 /* 38B7DC E00889EC 001417C3 */ sra $v0, $s4, 31 /* 38B7E0 E00889F0 00004810 */ mfhi $t1 /* 38B7E4 E00889F4 00091843 */ sra $v1, $t1, 1 /* 38B7E8 E00889F8 00621823 */ subu $v1, $v1, $v0 /* 38B7EC E00889FC 00031040 */ sll $v0, $v1, 1 /* 38B7F0 E0088A00 00431021 */ addu $v0, $v0, $v1 /* 38B7F4 E0088A04 00021080 */ sll $v0, $v0, 2 /* 38B7F8 E0088A08 02821023 */ subu $v0, $s4, $v0 /* 38B7FC E0088A0C 00021840 */ sll $v1, $v0, 1 /* 38B800 E0088A10 00621821 */ addu $v1, $v1, $v0 /* 38B804 E0088A14 3C09E009 */ lui $t1, %hi(D_E0088CDC) /* 38B808 E0088A18 25298CDC */ addiu $t1, $t1, %lo(D_E0088CDC) /* 38B80C E0088A1C 8E420024 */ lw $v0, 0x24($s2) /* 38B810 E0088A20 1C400078 */ bgtz $v0, .LE0088C04 /* 38B814 E0088A24 00698021 */ addu $s0, $v1, $t1 /* 38B818 E0088A28 8E45FFF8 */ lw $a1, -0x8($s2) /* 38B81C E0088A2C 8E46FFFC */ lw $a2, -0x4($s2) /* 38B820 E0088A30 8E470000 */ lw $a3, 0x0($s2) /* 38B824 E0088A34 0C080108 */ jal shim_guTranslateF /* 38B828 E0088A38 27A40018 */ addiu $a0, $sp, 0x18 /* 38B82C E0088A3C 27A40018 */ addiu $a0, $sp, 0x18 /* 38B830 E0088A40 3C058007 */ lui $a1, %hi(gMatrixListPos) /* 38B834 E0088A44 94A541F0 */ lhu $a1, %lo(gMatrixListPos)($a1) /* 38B838 E0088A48 3C02800A */ lui $v0, %hi(gDisplayContext) /* 38B83C E0088A4C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 38B840 E0088A50 00052980 */ sll $a1, $a1, 6 /* 38B844 E0088A54 00B72821 */ addu $a1, $a1, $s7 /* 38B848 E0088A58 0C080118 */ jal shim_guMtxF2L /* 38B84C E0088A5C 00452821 */ addu $a1, $v0, $a1 /* 38B850 E0088A60 3C065555 */ lui $a2, (0x55555556 >> 16) /* 38B854 E0088A64 34C65556 */ ori $a2, $a2, (0x55555556 & 0xFFFF) /* 38B858 E0088A68 8E270000 */ lw $a3, 0x0($s1) /* 38B85C E0088A6C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 38B860 E0088A70 00E0282D */ daddu $a1, $a3, $zero /* 38B864 E0088A74 24E70008 */ addiu $a3, $a3, 0x8 /* 38B868 E0088A78 AE270000 */ sw $a3, 0x0($s1) /* 38B86C E0088A7C ACA20000 */ sw $v0, 0x0($a1) /* 38B870 E0088A80 92030000 */ lbu $v1, 0x0($s0) /* 38B874 E0088A84 92040001 */ lbu $a0, 0x1($s0) /* 38B878 E0088A88 92020002 */ lbu $v0, 0x2($s0) /* 38B87C E0088A8C 8FA90098 */ lw $t1, 0x98($sp) /* 38B880 E0088A90 00031E00 */ sll $v1, $v1, 24 /* 38B884 E0088A94 00042400 */ sll $a0, $a0, 16 /* 38B888 E0088A98 00641825 */ or $v1, $v1, $a0 /* 38B88C E0088A9C 00021200 */ sll $v0, $v0, 8 /* 38B890 E0088AA0 00621825 */ or $v1, $v1, $v0 /* 38B894 E0088AA4 03D42021 */ addu $a0, $fp, $s4 /* 38B898 E0088AA8 00860018 */ mult $a0, $a2 /* 38B89C E0088AAC 312200FF */ andi $v0, $t1, 0xFF /* 38B8A0 E0088AB0 00621825 */ or $v1, $v1, $v0 /* 38B8A4 E0088AB4 ACA30004 */ sw $v1, 0x4($a1) /* 38B8A8 E0088AB8 00041FC3 */ sra $v1, $a0, 31 /* 38B8AC E0088ABC 00004810 */ mfhi $t1 /* 38B8B0 E0088AC0 01231823 */ subu $v1, $t1, $v1 /* 38B8B4 E0088AC4 00031040 */ sll $v0, $v1, 1 /* 38B8B8 E0088AC8 00431021 */ addu $v0, $v0, $v1 /* 38B8BC E0088ACC 00822023 */ subu $a0, $a0, $v0 /* 38B8C0 E0088AD0 24020001 */ addiu $v0, $zero, 0x1 /* 38B8C4 E0088AD4 1082000D */ beq $a0, $v0, .LE0088B0C /* 38B8C8 E0088AD8 28820002 */ slti $v0, $a0, 0x2 /* 38B8CC E0088ADC 10400005 */ beqz $v0, .LE0088AF4 /* 38B8D0 E0088AE0 24020002 */ addiu $v0, $zero, 0x2 /* 38B8D4 E0088AE4 10800007 */ beqz $a0, .LE0088B04 /* 38B8D8 E0088AE8 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 38B8DC E0088AEC 080222CE */ j .LE0088B38 /* 38B8E0 E0088AF0 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) .LE0088AF4: /* 38B8E4 E0088AF4 10820008 */ beq $a0, $v0, .LE0088B18 /* 38B8E8 E0088AF8 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 38B8EC E0088AFC 080222CE */ j .LE0088B38 /* 38B8F0 E0088B00 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) .LE0088B04: /* 38B8F4 E0088B04 080222C7 */ j .LE0088B1C /* 38B8F8 E0088B08 3C03F566 */ lui $v1, (0xF566FFFF >> 16) .LE0088B0C: /* 38B8FC E0088B0C 3C03FF66 */ lui $v1, (0xFF66FF7F >> 16) /* 38B900 E0088B10 080222C8 */ j .LE0088B20 /* 38B904 E0088B14 3463FF7F */ ori $v1, $v1, (0xFF66FF7F & 0xFFFF) .LE0088B18: /* 38B908 E0088B18 3C03FF66 */ lui $v1, (0xFF66FFFF >> 16) .LE0088B1C: /* 38B90C E0088B1C 3463FFFF */ ori $v1, $v1, (0xFF66FFFF & 0xFFFF) .LE0088B20: /* 38B910 E0088B20 24E20008 */ addiu $v0, $a3, 0x8 /* 38B914 E0088B24 AE220000 */ sw $v0, 0x0($s1) /* 38B918 E0088B28 ACF50000 */ sw $s5, 0x0($a3) /* 38B91C E0088B2C ACE30004 */ sw $v1, 0x4($a3) /* 38B920 E0088B30 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 38B924 E0088B34 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) .LE0088B38: /* 38B928 E0088B38 00131040 */ sll $v0, $s3, 1 /* 38B92C E0088B3C 00531021 */ addu $v0, $v0, $s3 /* 38B930 E0088B40 00021040 */ sll $v0, $v0, 1 /* 38B934 E0088B44 03C21023 */ subu $v0, $fp, $v0 /* 38B938 E0088B48 3C09E009 */ lui $t1, %hi(D_E0088D00) /* 38B93C E0088B4C 25298D00 */ addiu $t1, $t1, %lo(D_E0088D00) /* 38B940 E0088B50 00491021 */ addu $v0, $v0, $t1 /* 38B944 E0088B54 90430000 */ lbu $v1, 0x0($v0) /* 38B948 E0088B58 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 38B94C E0088B5C 8E240000 */ lw $a0, 0x0($s1) /* 38B950 E0088B60 2409003C */ addiu $t1, $zero, 0x3C /* 38B954 E0088B64 0080282D */ daddu $a1, $a0, $zero /* 38B958 E0088B68 24840008 */ addiu $a0, $a0, 0x8 /* 38B95C E0088B6C 02831821 */ addu $v1, $s4, $v1 /* 38B960 E0088B70 3063000F */ andi $v1, $v1, 0xF /* 38B964 E0088B74 00031980 */ sll $v1, $v1, 6 /* 38B968 E0088B78 00621025 */ or $v0, $v1, $v0 /* 38B96C E0088B7C 34420000 */ ori $v0, $v0, (0xF2000000 & 0xFFFF) /* 38B970 E0088B80 AE240000 */ sw $a0, 0x0($s1) /* 38B974 E0088B84 ACA20000 */ sw $v0, 0x0($a1) /* 38B978 E0088B88 00091300 */ sll $v0, $t1, 12 /* 38B97C E0088B8C 00691825 */ or $v1, $v1, $t1 /* 38B980 E0088B90 00431025 */ or $v0, $v0, $v1 /* 38B984 E0088B94 ACA20004 */ sw $v0, 0x4($a1) /* 38B988 E0088B98 24820008 */ addiu $v0, $a0, 0x8 /* 38B98C E0088B9C 3C058007 */ lui $a1, %hi(gMatrixListPos) /* 38B990 E0088BA0 24A541F0 */ addiu $a1, $a1, %lo(gMatrixListPos) /* 38B994 E0088BA4 AE220000 */ sw $v0, 0x0($s1) /* 38B998 E0088BA8 94A20000 */ lhu $v0, 0x0($a1) /* 38B99C E0088BAC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 38B9A0 E0088BB0 AC830000 */ sw $v1, 0x0($a0) /* 38B9A4 E0088BB4 24430001 */ addiu $v1, $v0, 0x1 /* 38B9A8 E0088BB8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 38B9AC E0088BBC 00021180 */ sll $v0, $v0, 6 /* 38B9B0 E0088BC0 A4A30000 */ sh $v1, 0x0($a1) /* 38B9B4 E0088BC4 3C03800A */ lui $v1, %hi(gDisplayContext) /* 38B9B8 E0088BC8 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 38B9BC E0088BCC 00571021 */ addu $v0, $v0, $s7 /* 38B9C0 E0088BD0 00621821 */ addu $v1, $v1, $v0 /* 38B9C4 E0088BD4 24820010 */ addiu $v0, $a0, 0x10 /* 38B9C8 E0088BD8 AC830004 */ sw $v1, 0x4($a0) /* 38B9CC E0088BDC AE220000 */ sw $v0, 0x0($s1) /* 38B9D0 E0088BE0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 38B9D4 E0088BE4 AC820008 */ sw $v0, 0x8($a0) /* 38B9D8 E0088BE8 8FA900A0 */ lw $t1, 0xA0($sp) /* 38B9DC E0088BEC 24820018 */ addiu $v0, $a0, 0x18 /* 38B9E0 E0088BF0 AC89000C */ sw $t1, 0xC($a0) /* 38B9E4 E0088BF4 AE220000 */ sw $v0, 0x0($s1) /* 38B9E8 E0088BF8 24020040 */ addiu $v0, $zero, 0x40 /* 38B9EC E0088BFC AC860010 */ sw $a2, 0x10($a0) /* 38B9F0 E0088C00 AC820014 */ sw $v0, 0x14($a0) .LE0088C04: /* 38B9F4 E0088C04 26940001 */ addiu $s4, $s4, 0x1 /* 38B9F8 E0088C08 8FA9009C */ lw $t1, 0x9C($sp) /* 38B9FC E0088C0C 0289102A */ slt $v0, $s4, $t1 /* 38BA00 E0088C10 1440FF74 */ bnez $v0, .LE00889E4 /* 38BA04 E0088C14 26520034 */ addiu $s2, $s2, 0x34 .LE0088C18: /* 38BA08 E0088C18 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 38BA0C E0088C1C 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 38BA10 E0088C20 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 38BA14 E0088C24 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 38BA18 E0088C28 8CA30000 */ lw $v1, 0x0($a1) /* 38BA1C E0088C2C 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* 38BA20 E0088C30 0060202D */ daddu $a0, $v1, $zero /* 38BA24 E0088C34 24630008 */ addiu $v1, $v1, 0x8 /* 38BA28 E0088C38 AC820000 */ sw $v0, 0x0($a0) /* 38BA2C E0088C3C 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 38BA30 E0088C40 AC800004 */ sw $zero, 0x4($a0) /* 38BA34 E0088C44 AEC20000 */ sw $v0, 0x0($s6) /* 38BA38 E0088C48 AEC30004 */ sw $v1, 0x4($s6) /* 38BA3C E0088C4C 26D60008 */ addiu $s6, $s6, 0x8 /* 38BA40 E0088C50 24620008 */ addiu $v0, $v1, 0x8 /* 38BA44 E0088C54 ACA30000 */ sw $v1, 0x0($a1) /* 38BA48 E0088C58 ACA20000 */ sw $v0, 0x0($a1) /* 38BA4C E0088C5C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 38BA50 E0088C60 AC620000 */ sw $v0, 0x0($v1) /* 38BA54 E0088C64 24620010 */ addiu $v0, $v1, 0x10 /* 38BA58 E0088C68 AC760004 */ sw $s6, 0x4($v1) /* 38BA5C E0088C6C ACA20000 */ sw $v0, 0x0($a1) /* 38BA60 E0088C70 24020040 */ addiu $v0, $zero, 0x40 /* 38BA64 E0088C74 AC62000C */ sw $v0, 0xC($v1) /* 38BA68 E0088C78 24620018 */ addiu $v0, $v1, 0x18 /* 38BA6C E0088C7C AC660008 */ sw $a2, 0x8($v1) /* 38BA70 E0088C80 ACA20000 */ sw $v0, 0x0($a1) /* 38BA74 E0088C84 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 38BA78 E0088C88 AC620010 */ sw $v0, 0x10($v1) /* 38BA7C E0088C8C AC600014 */ sw $zero, 0x14($v1) /* 38BA80 E0088C90 8FBF00CC */ lw $ra, 0xCC($sp) /* 38BA84 E0088C94 8FBE00C8 */ lw $fp, 0xC8($sp) /* 38BA88 E0088C98 8FB700C4 */ lw $s7, 0xC4($sp) /* 38BA8C E0088C9C 8FB600C0 */ lw $s6, 0xC0($sp) /* 38BA90 E0088CA0 8FB500BC */ lw $s5, 0xBC($sp) /* 38BA94 E0088CA4 8FB400B8 */ lw $s4, 0xB8($sp) /* 38BA98 E0088CA8 8FB300B4 */ lw $s3, 0xB4($sp) /* 38BA9C E0088CAC 8FB200B0 */ lw $s2, 0xB0($sp) /* 38BAA0 E0088CB0 8FB100AC */ lw $s1, 0xAC($sp) /* 38BAA4 E0088CB4 8FB000A8 */ lw $s0, 0xA8($sp) /* 38BAA8 E0088CB8 03E00008 */ jr $ra /* 38BAAC E0088CBC 27BD00D0 */ addiu $sp, $sp, 0xD0 ### DECOMPILED C INSTRUCTIONS: void confetti_appendGfx(void* effect) { ConfettiFXData* part = ((EffectInstance*)effect)->data.confetti; //s3 Matrix4f sp18; Matrix4f sp58; s32 i; s32 uly; s32 width = 0x3C; s32 height = 0x3C; s32 ulx = 0; s32 unk_28; s32 unk_2C; Gfx* spA0; s32 spA4; Gfx* savedGfxPos; s32 unk_24; Color_RGB8* color; unk_24 = part->unk_24; unk_2C = part->unk_2C; unk_28 = part->unk_28; spA0 = D_E0088CC0[part->unk_00]; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000940_38C4E0); 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_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); savedGfxPos = gMainGfxPos++; part++; for (i = 0; i < unk_2C; i++, part++) { color = &D_E0088CDC[i % 12]; if (part->unk_30 <= 0) { shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gDPSetPrimColor(gMainGfxPos++, 0, 0, color->r, color->g, color->b, unk_28); switch ((unk_24 + i) % 3) { case 0: gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0); break; case 1: gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0); break; case 2: gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0); break; } uly = ((i + D_E0088D00[unk_24 % 6]) & 0xF) * 16; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, ulx << 2, uly << 2, (ulx << 2) + ((width >> 1) << 1), (uly << 2) + height); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, spA0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPEndDisplayList(gMainGfxPos++); gSPBranchList(savedGfxPos, gMainGfxPos); savedGfxPos++; gSPDisplayList(gMainGfxPos++, savedGfxPos); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel something_rotating_update /* 4027CC E011618C 27BDFF88 */ addiu $sp, $sp, -0x78 /* 4027D0 E0116190 AFB40030 */ sw $s4, 0x30($sp) /* 4027D4 E0116194 0080A02D */ daddu $s4, $a0, $zero /* 4027D8 E0116198 AFBF0040 */ sw $ra, 0x40($sp) /* 4027DC E011619C AFB7003C */ sw $s7, 0x3C($sp) /* 4027E0 E01161A0 AFB60038 */ sw $s6, 0x38($sp) /* 4027E4 E01161A4 AFB50034 */ sw $s5, 0x34($sp) /* 4027E8 E01161A8 AFB3002C */ sw $s3, 0x2C($sp) /* 4027EC E01161AC AFB20028 */ sw $s2, 0x28($sp) /* 4027F0 E01161B0 AFB10024 */ sw $s1, 0x24($sp) /* 4027F4 E01161B4 AFB00020 */ sw $s0, 0x20($sp) /* 4027F8 E01161B8 F7BE0070 */ sdc1 $f30, 0x70($sp) /* 4027FC E01161BC F7BC0068 */ sdc1 $f28, 0x68($sp) /* 402800 E01161C0 F7BA0060 */ sdc1 $f26, 0x60($sp) /* 402804 E01161C4 F7B80058 */ sdc1 $f24, 0x58($sp) /* 402808 E01161C8 F7B60050 */ sdc1 $f22, 0x50($sp) /* 40280C E01161CC F7B40048 */ sdc1 $f20, 0x48($sp) /* 402810 E01161D0 8E91000C */ lw $s1, 0xC($s4) /* 402814 E01161D4 8E830000 */ lw $v1, 0x0($s4) /* 402818 E01161D8 C6260004 */ lwc1 $f6, 0x4($s1) /* 40281C E01161DC E7A60010 */ swc1 $f6, 0x10($sp) /* 402820 E01161E0 C6260008 */ lwc1 $f6, 0x8($s1) /* 402824 E01161E4 E7A60014 */ swc1 $f6, 0x14($sp) /* 402828 E01161E8 C626000C */ lwc1 $f6, 0xC($s1) /* 40282C E01161EC 30620010 */ andi $v0, $v1, 0x10 /* 402830 E01161F0 10400006 */ beqz $v0, .LE011620C /* 402834 E01161F4 E7A60018 */ swc1 $f6, 0x18($sp) /* 402838 E01161F8 2402FFEF */ addiu $v0, $zero, -0x11 /* 40283C E01161FC 00621024 */ and $v0, $v1, $v0 /* 402840 E0116200 AE820000 */ sw $v0, 0x0($s4) /* 402844 E0116204 24020020 */ addiu $v0, $zero, 0x20 /* 402848 E0116208 AE220010 */ sw $v0, 0x10($s1) .LE011620C: /* 40284C E011620C 8E230010 */ lw $v1, 0x10($s1) /* 402850 E0116210 286203E8 */ slti $v0, $v1, 0x3E8 /* 402854 E0116214 10400002 */ beqz $v0, .LE0116220 /* 402858 E0116218 2462FFFF */ addiu $v0, $v1, -0x1 /* 40285C E011621C AE220010 */ sw $v0, 0x10($s1) .LE0116220: /* 402860 E0116220 8E220014 */ lw $v0, 0x14($s1) /* 402864 E0116224 8E230010 */ lw $v1, 0x10($s1) /* 402868 E0116228 24440001 */ addiu $a0, $v0, 0x1 /* 40286C E011622C 04610005 */ bgez $v1, .LE0116244 /* 402870 E0116230 AE240014 */ sw $a0, 0x14($s1) /* 402874 E0116234 0C080128 */ jal shim_remove_effect /* 402878 E0116238 0280202D */ daddu $a0, $s4, $zero /* 40287C E011623C 08045997 */ j .LE011665C /* 402880 E0116240 00000000 */ nop .LE0116244: /* 402884 E0116244 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 402888 E0116248 44810000 */ mtc1 $at, $f0 /* 40288C E011624C 24130001 */ addiu $s3, $zero, 0x1 /* 402890 E0116250 E6200020 */ swc1 $f0, 0x20($s1) /* 402894 E0116254 26310030 */ addiu $s1, $s1, 0x30 /* 402898 E0116258 8E820008 */ lw $v0, 0x8($s4) /* 40289C E011625C 0262102A */ slt $v0, $s3, $v0 /* 4028A0 E0116260 104000FE */ beqz $v0, .LE011665C /* 4028A4 E0116264 46000786 */ mov.s $f30, $f0 /* 4028A8 E0116268 3C17E011 */ lui $s7, %hi(D_E0116CA4) /* 4028AC E011626C 26F76CA4 */ addiu $s7, $s7, %lo(D_E0116CA4) /* 4028B0 E0116270 3C16E011 */ lui $s6, %hi(D_E0116C8C) /* 4028B4 E0116274 26D66C8C */ addiu $s6, $s6, %lo(D_E0116C8C) /* 4028B8 E0116278 3C014080 */ lui $at, (0x40800000 >> 16) /* 4028BC E011627C 44811000 */ mtc1 $at, $f2 /* 4028C0 E0116280 44840000 */ mtc1 $a0, $f0 /* 4028C4 E0116284 00000000 */ nop /* 4028C8 E0116288 46800020 */ cvt.s.w $f0, $f0 /* 4028CC E011628C 46020002 */ mul.s $f0, $f0, $f2 /* 4028D0 E0116290 00000000 */ nop /* 4028D4 E0116294 3C158000 */ lui $s5, (0x80000000 >> 16) /* 4028D8 E0116298 26300014 */ addiu $s0, $s1, 0x14 /* 4028DC E011629C 0000902D */ daddu $s2, $zero, $zero /* 4028E0 E01162A0 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 4028E4 E01162A4 4481D000 */ mtc1 $at, $f26 /* 4028E8 E01162A8 46000721 */ cvt.d.s $f28, $f0 .LE01162AC: /* 4028EC E01162AC 4493A000 */ mtc1 $s3, $f20 /* 4028F0 E01162B0 00000000 */ nop /* 4028F4 E01162B4 4680A520 */ cvt.s.w $f20, $f20 /* 4028F8 E01162B8 3C01E011 */ lui $at, (0xE0116D90 >> 16) /* 4028FC E01162BC D4206D90 */ ldc1 $f0, (0xE0116D90 & 0xFFFF)($at) /* 402900 E01162C0 4600A521 */ cvt.d.s $f20, $f20 /* 402904 E01162C4 4620A502 */ mul.d $f20, $f20, $f0 /* 402908 E01162C8 00000000 */ nop /* 40290C E01162CC 4634E500 */ add.d $f20, $f28, $f20 /* 402910 E01162D0 4620A520 */ cvt.s.d $f20, $f20 /* 402914 E01162D4 0C080140 */ jal shim_sin_deg /* 402918 E01162D8 4600A306 */ mov.s $f12, $f20 /* 40291C E01162DC 4600F306 */ mov.s $f12, $f30 /* 402920 E01162E0 C6160018 */ lwc1 $f22, 0x18($s0) /* 402924 E01162E4 0C080140 */ jal shim_sin_deg /* 402928 E01162E8 46000606 */ mov.s $f24, $f0 /* 40292C E01162EC 4600B002 */ mul.s $f0, $f22, $f0 /* 402930 E01162F0 00000000 */ nop /* 402934 E01162F4 46180002 */ mul.s $f0, $f0, $f24 /* 402938 E01162F8 00000000 */ nop /* 40293C E01162FC C7A60010 */ lwc1 $f6, 0x10($sp) /* 402940 E0116300 46003000 */ add.s $f0, $f6, $f0 /* 402944 E0116304 4600A306 */ mov.s $f12, $f20 /* 402948 E0116308 0C080144 */ jal shim_cos_deg /* 40294C E011630C E600FFF0 */ swc1 $f0, -0x10($s0) /* 402950 E0116310 4600B002 */ mul.s $f0, $f22, $f0 /* 402954 E0116314 00000000 */ nop /* 402958 E0116318 C7A60014 */ lwc1 $f6, 0x14($sp) /* 40295C E011631C 46003000 */ add.s $f0, $f6, $f0 /* 402960 E0116320 4600F306 */ mov.s $f12, $f30 /* 402964 E0116324 0C080144 */ jal shim_cos_deg /* 402968 E0116328 E600FFF4 */ swc1 $f0, -0xC($s0) /* 40296C E011632C 4600B582 */ mul.s $f22, $f22, $f0 /* 402970 E0116330 00000000 */ nop /* 402974 E0116334 4618B582 */ mul.s $f22, $f22, $f24 /* 402978 E0116338 00000000 */ nop /* 40297C E011633C C7A60018 */ lwc1 $f6, 0x18($sp) /* 402980 E0116340 92020015 */ lbu $v0, 0x15($s0) /* 402984 E0116344 46163580 */ add.s $f22, $f6, $f22 /* 402988 E0116348 2443FFFF */ addiu $v1, $v0, -0x1 /* 40298C E011634C 2C620005 */ sltiu $v0, $v1, 0x5 /* 402990 E0116350 104000B8 */ beqz $v0, .LE0116634 /* 402994 E0116354 E616FFF8 */ swc1 $f22, -0x8($s0) /* 402998 E0116358 00031080 */ sll $v0, $v1, 2 /* 40299C E011635C 3C01E011 */ lui $at, (0xE0116D98 >> 16) /* 4029A0 E0116360 00220821 */ addu $at, $at, $v0 /* 4029A4 E0116364 8C226D98 */ lw $v0, (0xE0116D98 & 0xFFFF)($at) /* 4029A8 E0116368 00400008 */ jr $v0 /* 4029AC E011636C 00000000 */ nop /* 4029B0 E0116370 92020015 */ lbu $v0, 0x15($s0) /* 4029B4 E0116374 AE000000 */ sw $zero, 0x0($s0) /* 4029B8 E0116378 24420001 */ addiu $v0, $v0, 0x1 /* 4029BC E011637C A2020015 */ sb $v0, 0x15($s0) /* 4029C0 E0116380 8E040000 */ lw $a0, 0x0($s0) /* 4029C4 E0116384 28820029 */ slti $v0, $a0, 0x29 /* 4029C8 E0116388 10400004 */ beqz $v0, .LE011639C /* 4029CC E011638C 00041040 */ sll $v0, $a0, 1 /* 4029D0 E0116390 00571021 */ addu $v0, $v0, $s7 /* 4029D4 E0116394 080458E8 */ j .LE01163A0 /* 4029D8 E0116398 84420000 */ lh $v0, 0x0($v0) .LE011639C: /* 4029DC E011639C 86E20050 */ lh $v0, 0x50($s7) .LE01163A0: /* 4029E0 E01163A0 44820000 */ mtc1 $v0, $f0 /* 4029E4 E01163A4 00000000 */ nop /* 4029E8 E01163A8 46800020 */ cvt.s.w $f0, $f0 /* 4029EC E01163AC 2882000D */ slti $v0, $a0, 0xD /* 4029F0 E01163B0 10400006 */ beqz $v0, .LE01163CC /* 4029F4 E01163B4 E600000C */ swc1 $f0, 0xC($s0) /* 4029F8 E01163B8 3C02E011 */ lui $v0, (0xE0116CF8 >> 16) /* 4029FC E01163BC 00441021 */ addu $v0, $v0, $a0 /* 402A00 E01163C0 90426CF8 */ lbu $v0, (0xE0116CF8 & 0xFFFF)($v0) /* 402A04 E01163C4 080458F6 */ j .LE01163D8 /* 402A08 E01163C8 A2020010 */ sb $v0, 0x10($s0) .LE01163CC: /* 402A0C E01163CC 3C02E011 */ lui $v0, (0xE0116D04 >> 16) /* 402A10 E01163D0 90426D04 */ lbu $v0, (0xE0116D04 & 0xFFFF)($v0) /* 402A14 E01163D4 A2020010 */ sb $v0, 0x10($s0) .LE01163D8: /* 402A18 E01163D8 28820034 */ slti $v0, $a0, 0x34 /* 402A1C E01163DC 10400006 */ beqz $v0, .LE01163F8 /* 402A20 E01163E0 00000000 */ nop /* 402A24 E01163E4 3C02E011 */ lui $v0, (0xE0116D08 >> 16) /* 402A28 E01163E8 00441021 */ addu $v0, $v0, $a0 /* 402A2C E01163EC 90426D08 */ lbu $v0, (0xE0116D08 & 0xFFFF)($v0) /* 402A30 E01163F0 08045901 */ j .LE0116404 /* 402A34 E01163F4 A2020011 */ sb $v0, 0x11($s0) .LE01163F8: /* 402A38 E01163F8 3C02E011 */ lui $v0, (0xE0116D3B >> 16) /* 402A3C E01163FC 90426D3B */ lbu $v0, (0xE0116D3B & 0xFFFF)($v0) /* 402A40 E0116400 A2020011 */ sb $v0, 0x11($s0) .LE0116404: /* 402A44 E0116404 28820030 */ slti $v0, $a0, 0x30 /* 402A48 E0116408 10400005 */ beqz $v0, .LE0116420 /* 402A4C E011640C 00000000 */ nop /* 402A50 E0116410 3C02E011 */ lui $v0, (0xE0116D3C >> 16) /* 402A54 E0116414 00441021 */ addu $v0, $v0, $a0 /* 402A58 E0116418 0804590A */ j .LE0116428 /* 402A5C E011641C 90426D3C */ lbu $v0, (0xE0116D3C & 0xFFFF)($v0) .LE0116420: /* 402A60 E0116420 3C02E011 */ lui $v0, (0xE0116D6B >> 16) /* 402A64 E0116424 90426D6B */ lbu $v0, (0xE0116D6B & 0xFFFF)($v0) .LE0116428: /* 402A68 E0116428 44822000 */ mtc1 $v0, $f4 /* 402A6C E011642C 00000000 */ nop /* 402A70 E0116430 46802120 */ cvt.s.w $f4, $f4 /* 402A74 E0116434 3C01E011 */ lui $at, (0xE0116DB0 >> 16) /* 402A78 E0116438 D4226DB0 */ ldc1 $f2, (0xE0116DB0 & 0xFFFF)($at) /* 402A7C E011643C 46002021 */ cvt.d.s $f0, $f4 /* 402A80 E0116440 46220002 */ mul.d $f0, $f0, $f2 /* 402A84 E0116444 00000000 */ nop /* 402A88 E0116448 02561021 */ addu $v0, $s2, $s6 /* 402A8C E011644C 90420000 */ lbu $v0, 0x0($v0) /* 402A90 E0116450 46200120 */ cvt.s.d $f4, $f0 /* 402A94 E0116454 44820000 */ mtc1 $v0, $f0 /* 402A98 E0116458 00000000 */ nop /* 402A9C E011645C 46800020 */ cvt.s.w $f0, $f0 /* 402AA0 E0116460 46002002 */ mul.s $f0, $f4, $f0 /* 402AA4 E0116464 00000000 */ nop /* 402AA8 E0116468 4600D03E */ c.le.s $f26, $f0 /* 402AAC E011646C 00000000 */ nop /* 402AB0 E0116470 45010005 */ bc1t .LE0116488 /* 402AB4 E0116474 26230026 */ addiu $v1, $s1, 0x26 /* 402AB8 E0116478 4600018D */ trunc.w.s $f6, $f0 /* 402ABC E011647C 44023000 */ mfc1 $v0, $f6 /* 402AC0 E0116480 08045928 */ j .LE01164A0 /* 402AC4 E0116484 A0620000 */ sb $v0, 0x0($v1) .LE0116488: /* 402AC8 E0116488 461A0001 */ sub.s $f0, $f0, $f26 /* 402ACC E011648C 4600018D */ trunc.w.s $f6, $f0 /* 402AD0 E0116490 44023000 */ mfc1 $v0, $f6 /* 402AD4 E0116494 00000000 */ nop /* 402AD8 E0116498 00551025 */ or $v0, $v0, $s5 /* 402ADC E011649C A0620000 */ sb $v0, 0x0($v1) .LE01164A0: /* 402AE0 E01164A0 02561021 */ addu $v0, $s2, $s6 /* 402AE4 E01164A4 90420001 */ lbu $v0, 0x1($v0) /* 402AE8 E01164A8 44820000 */ mtc1 $v0, $f0 /* 402AEC E01164AC 00000000 */ nop /* 402AF0 E01164B0 46800020 */ cvt.s.w $f0, $f0 /* 402AF4 E01164B4 46002002 */ mul.s $f0, $f4, $f0 /* 402AF8 E01164B8 00000000 */ nop /* 402AFC E01164BC 4600D03E */ c.le.s $f26, $f0 /* 402B00 E01164C0 00000000 */ nop /* 402B04 E01164C4 45010005 */ bc1t .LE01164DC /* 402B08 E01164C8 26230027 */ addiu $v1, $s1, 0x27 /* 402B0C E01164CC 4600018D */ trunc.w.s $f6, $f0 /* 402B10 E01164D0 44023000 */ mfc1 $v0, $f6 /* 402B14 E01164D4 0804593D */ j .LE01164F4 /* 402B18 E01164D8 A0620000 */ sb $v0, 0x0($v1) .LE01164DC: /* 402B1C E01164DC 461A0001 */ sub.s $f0, $f0, $f26 /* 402B20 E01164E0 4600018D */ trunc.w.s $f6, $f0 /* 402B24 E01164E4 44023000 */ mfc1 $v0, $f6 /* 402B28 E01164E8 00000000 */ nop /* 402B2C E01164EC 00551025 */ or $v0, $v0, $s5 /* 402B30 E01164F0 A0620000 */ sb $v0, 0x0($v1) .LE01164F4: /* 402B34 E01164F4 02561021 */ addu $v0, $s2, $s6 /* 402B38 E01164F8 90420002 */ lbu $v0, 0x2($v0) /* 402B3C E01164FC 44820000 */ mtc1 $v0, $f0 /* 402B40 E0116500 00000000 */ nop /* 402B44 E0116504 46800020 */ cvt.s.w $f0, $f0 /* 402B48 E0116508 46002002 */ mul.s $f0, $f4, $f0 /* 402B4C E011650C 00000000 */ nop /* 402B50 E0116510 4600D03E */ c.le.s $f26, $f0 /* 402B54 E0116514 00000000 */ nop /* 402B58 E0116518 45010005 */ bc1t .LE0116530 /* 402B5C E011651C 26230028 */ addiu $v1, $s1, 0x28 /* 402B60 E0116520 4600018D */ trunc.w.s $f6, $f0 /* 402B64 E0116524 44023000 */ mfc1 $v0, $f6 /* 402B68 E0116528 08045952 */ j .LE0116548 /* 402B6C E011652C A0620000 */ sb $v0, 0x0($v1) .LE0116530: /* 402B70 E0116530 461A0001 */ sub.s $f0, $f0, $f26 /* 402B74 E0116534 4600018D */ trunc.w.s $f6, $f0 /* 402B78 E0116538 44023000 */ mfc1 $v0, $f6 /* 402B7C E011653C 00000000 */ nop /* 402B80 E0116540 00551025 */ or $v0, $v0, $s5 /* 402B84 E0116544 A0620000 */ sb $v0, 0x0($v1) .LE0116548: /* 402B88 E0116548 28820018 */ slti $v0, $a0, 0x18 /* 402B8C E011654C 10400005 */ beqz $v0, .LE0116564 /* 402B90 E0116550 00000000 */ nop /* 402B94 E0116554 3C02E011 */ lui $v0, (0xE0116D6C >> 16) /* 402B98 E0116558 00441021 */ addu $v0, $v0, $a0 /* 402B9C E011655C 0804595B */ j .LE011656C /* 402BA0 E0116560 90426D6C */ lbu $v0, (0xE0116D6C & 0xFFFF)($v0) .LE0116564: /* 402BA4 E0116564 3C02E011 */ lui $v0, (0xE0116D83 >> 16) /* 402BA8 E0116568 90426D83 */ lbu $v0, (0xE0116D83 & 0xFFFF)($v0) .LE011656C: /* 402BAC E011656C 3C01E011 */ lui $at, (0xE0116DB8 >> 16) /* 402BB0 E0116570 D4226DB8 */ ldc1 $f2, (0xE0116DB8 & 0xFFFF)($at) /* 402BB4 E0116574 44820000 */ mtc1 $v0, $f0 /* 402BB8 E0116578 00000000 */ nop /* 402BBC E011657C 46800020 */ cvt.s.w $f0, $f0 /* 402BC0 E0116580 46000021 */ cvt.d.s $f0, $f0 /* 402BC4 E0116584 46220002 */ mul.d $f0, $f0, $f2 /* 402BC8 E0116588 00000000 */ nop /* 402BCC E011658C 46200020 */ cvt.s.d $f0, $f0 /* 402BD0 E0116590 0804598D */ j .LE0116634 /* 402BD4 E0116594 E6000004 */ swc1 $f0, 0x4($s0) /* 402BD8 E0116598 92020015 */ lbu $v0, 0x15($s0) /* 402BDC E011659C AE000000 */ sw $zero, 0x0($s0) /* 402BE0 E01165A0 24420001 */ addiu $v0, $v0, 0x1 /* 402BE4 E01165A4 A2020015 */ sb $v0, 0x15($s0) /* 402BE8 E01165A8 8E040000 */ lw $a0, 0x0($s0) /* 402BEC E01165AC 28820012 */ slti $v0, $a0, 0x12 /* 402BF0 E01165B0 1040001C */ beqz $v0, .LE0116624 /* 402BF4 E01165B4 00041880 */ sll $v1, $a0, 2 /* 402BF8 E01165B8 00641821 */ addu $v1, $v1, $a0 /* 402BFC E01165BC 00031840 */ sll $v1, $v1, 1 /* 402C00 E01165C0 2402005A */ addiu $v0, $zero, 0x5A /* 402C04 E01165C4 00431023 */ subu $v0, $v0, $v1 /* 402C08 E01165C8 44826000 */ mtc1 $v0, $f12 /* 402C0C E01165CC 00000000 */ nop /* 402C10 E01165D0 46806320 */ cvt.s.w $f12, $f12 /* 402C14 E01165D4 0C080140 */ jal shim_sin_deg /* 402C18 E01165D8 26520003 */ addiu $s2, $s2, 0x3 /* 402C1C E01165DC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 402C20 E01165E0 44811000 */ mtc1 $at, $f2 /* 402C24 E01165E4 00000000 */ nop /* 402C28 E01165E8 46020000 */ add.s $f0, $f0, $f2 /* 402C2C E01165EC 3C014248 */ lui $at, (0x42480000 >> 16) /* 402C30 E01165F0 44811000 */ mtc1 $at, $f2 /* 402C34 E01165F4 00000000 */ nop /* 402C38 E01165F8 46020002 */ mul.s $f0, $f0, $f2 /* 402C3C E01165FC 00000000 */ nop /* 402C40 E0116600 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 402C44 E0116604 44811800 */ mtc1 $at, $f3 /* 402C48 E0116608 44801000 */ mtc1 $zero, $f2 /* 402C4C E011660C 46000021 */ cvt.d.s $f0, $f0 /* 402C50 E0116610 46220002 */ mul.d $f0, $f0, $f2 /* 402C54 E0116614 00000000 */ nop /* 402C58 E0116618 46200020 */ cvt.s.d $f0, $f0 /* 402C5C E011661C 0804598E */ j .LE0116638 /* 402C60 E0116620 E6000018 */ swc1 $f0, 0x18($s0) .LE0116624: /* 402C64 E0116624 92020015 */ lbu $v0, 0x15($s0) /* 402C68 E0116628 AE000018 */ sw $zero, 0x18($s0) /* 402C6C E011662C 24420001 */ addiu $v0, $v0, 0x1 /* 402C70 E0116630 A2020015 */ sb $v0, 0x15($s0) .LE0116634: /* 402C74 E0116634 26520003 */ addiu $s2, $s2, 0x3 .LE0116638: /* 402C78 E0116638 26730001 */ addiu $s3, $s3, 0x1 /* 402C7C E011663C 8E020000 */ lw $v0, 0x0($s0) /* 402C80 E0116640 26310030 */ addiu $s1, $s1, 0x30 /* 402C84 E0116644 24420001 */ addiu $v0, $v0, 0x1 /* 402C88 E0116648 AE020000 */ sw $v0, 0x0($s0) /* 402C8C E011664C 8E820008 */ lw $v0, 0x8($s4) /* 402C90 E0116650 0262102A */ slt $v0, $s3, $v0 /* 402C94 E0116654 1440FF15 */ bnez $v0, .LE01162AC /* 402C98 E0116658 26100030 */ addiu $s0, $s0, 0x30 .LE011665C: /* 402C9C E011665C 8FBF0040 */ lw $ra, 0x40($sp) /* 402CA0 E0116660 8FB7003C */ lw $s7, 0x3C($sp) /* 402CA4 E0116664 8FB60038 */ lw $s6, 0x38($sp) /* 402CA8 E0116668 8FB50034 */ lw $s5, 0x34($sp) /* 402CAC E011666C 8FB40030 */ lw $s4, 0x30($sp) /* 402CB0 E0116670 8FB3002C */ lw $s3, 0x2C($sp) /* 402CB4 E0116674 8FB20028 */ lw $s2, 0x28($sp) /* 402CB8 E0116678 8FB10024 */ lw $s1, 0x24($sp) /* 402CBC E011667C 8FB00020 */ lw $s0, 0x20($sp) /* 402CC0 E0116680 D7BE0070 */ ldc1 $f30, 0x70($sp) /* 402CC4 E0116684 D7BC0068 */ ldc1 $f28, 0x68($sp) /* 402CC8 E0116688 D7BA0060 */ ldc1 $f26, 0x60($sp) /* 402CCC E011668C D7B80058 */ ldc1 $f24, 0x58($sp) /* 402CD0 E0116690 D7B60050 */ ldc1 $f22, 0x50($sp) /* 402CD4 E0116694 D7B40048 */ ldc1 $f20, 0x48($sp) /* 402CD8 E0116698 03E00008 */ jr $ra /* 402CDC E011669C 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: void something_rotating_update(EffectInstance* effect) { SomethingRotatingFXData* part = effect->data.somethingRotating; f32 x = part->pos.x; f32 y = part->pos.y; f32 z = part->pos.z; s32 unk_14; s32 unk_14_2; f32 factor; f32 angle1; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->unk_10 = 32; } if (part->unk_10 < 1000) { part->unk_10--; } part->unk_14++; if (part->unk_10 < 0) { shim_remove_effect(effect); return; } unk_14 = part->unk_14; part->unk_20 = 90.0f; angle1 = 90.0f; part++; for (i = 1; i < effect->numParts; i++, part++) { f32 angle2 = unk_14 * 4.0f + (f32) i * 51.43; f32 temp_f24 = shim_sin_deg(angle2); f32 temp_f22 = part->unk_2C; part->pos.x = x + temp_f22 * shim_sin_deg(angle1) * temp_f24; part->pos.y = y + temp_f22 * shim_cos_deg(angle2); part->pos.z = z + temp_f22 * shim_cos_deg(angle1) * temp_f24; switch (part->state) { case 1: part->unk_14 = 0; part->state++; // fallthrough case 2: unk_14_2 = part->unk_14; if (unk_14_2 < ARRAY_COUNT(D_E0116CA4)) { part->unk_20 = D_E0116CA4[unk_14_2]; } else { part->unk_20 = D_E0116CA4[ARRAY_COUNT(D_E0116CA4) - 1]; } if (unk_14_2 < ARRAY_COUNT(D_E0116CF8)) { part->primAlpha = D_E0116CF8[unk_14_2]; } else { part->primAlpha = D_E0116CF8[ARRAY_COUNT(D_E0116CF8) - 1]; } if (unk_14_2 < ARRAY_COUNT(D_E0116D08)) { part->unk_25 = D_E0116D08[unk_14_2]; } else { part->unk_25 = D_E0116D08[ARRAY_COUNT(D_E0116D08) - 1]; } if (unk_14_2 < ARRAY_COUNT(D_E0116D3C)) { factor = D_E0116D3C[unk_14_2]; } else { factor = D_E0116D3C[ARRAY_COUNT(D_E0116D3C) - 1]; } factor *= 0.0039215686; // 1 / 255 part->env.r = factor * D_E0116C8C[i - 1].r; part->env.g = factor * D_E0116C8C[i - 1].g; part->env.b = factor * D_E0116C8C[i - 1].b; if (unk_14_2 < ARRAY_COUNT(D_E0116D6C)) { part->unk_18 = (f32) D_E0116D6C[unk_14_2] * 0.01; } else { part->unk_18 = (f32) D_E0116D6C[ARRAY_COUNT(D_E0116D6C) - 1] * 0.01; } break; case 3: part->unk_14 = 0; part->state++; // fallthrough case 4: unk_14_2 = part->unk_14; if (unk_14_2 < 18) { part->unk_2C = (shim_sin_deg(90 - unk_14_2 * 10) + 1.0f) * 50.0f * 0.5; } else { part->unk_2C = 0.0f; part->state++; } break; case 5: break; } part->unk_14++; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel test_ray_triangle_horizontal /* 37BA4 8005C7A4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 37BA8 8005C7A8 F7BC0020 */ sdc1 $f28, 0x20($sp) /* 37BAC 8005C7AC F7BA0018 */ sdc1 $f26, 0x18($sp) /* 37BB0 8005C7B0 F7B80010 */ sdc1 $f24, 0x10($sp) /* 37BB4 8005C7B4 F7B60008 */ sdc1 $f22, 0x8($sp) /* 37BB8 8005C7B8 F7B40000 */ sdc1 $f20, 0x0($sp) /* 37BBC 8005C7BC C4800030 */ lwc1 $f0, 0x30($a0) /* 37BC0 8005C7C0 44801000 */ mtc1 $zero, $f2 /* 37BC4 8005C7C4 00000000 */ nop /* 37BC8 8005C7C8 46020032 */ c.eq.s $f0, $f2 /* 37BCC 8005C7CC 00000000 */ nop /* 37BD0 8005C7D0 4500000B */ bc1f .L8005C800 /* 37BD4 8005C7D4 00000000 */ nop /* 37BD8 8005C7D8 C4800034 */ lwc1 $f0, 0x34($a0) /* 37BDC 8005C7DC 46020032 */ c.eq.s $f0, $f2 /* 37BE0 8005C7E0 00000000 */ nop /* 37BE4 8005C7E4 45000006 */ bc1f .L8005C800 /* 37BE8 8005C7E8 00000000 */ nop /* 37BEC 8005C7EC C4800038 */ lwc1 $f0, 0x38($a0) /* 37BF0 8005C7F0 46020032 */ c.eq.s $f0, $f2 /* 37BF4 8005C7F4 00000000 */ nop /* 37BF8 8005C7F8 4501012E */ bc1t .L8005CCB4 /* 37BFC 8005C7FC 0000102D */ daddu $v0, $zero, $zero .L8005C800: /* 37C00 8005C800 8C820000 */ lw $v0, 0x0($a0) /* 37C04 8005C804 3C01800A */ lui $at, %hi(gCollisionRayStartX) /* 37C08 8005C808 C4364230 */ lwc1 $f22, %lo(gCollisionRayStartX)($at) /* 37C0C 8005C80C C4400000 */ lwc1 $f0, 0x0($v0) /* 37C10 8005C810 4600B381 */ sub.s $f14, $f22, $f0 /* 37C14 8005C814 C4880030 */ lwc1 $f8, 0x30($a0) /* 37C18 8005C818 460E4102 */ mul.s $f4, $f8, $f14 /* 37C1C 8005C81C 00000000 */ nop /* 37C20 8005C820 3C01800A */ lui $at, %hi(gCollisionRayStartY) /* 37C24 8005C824 C4384234 */ lwc1 $f24, %lo(gCollisionRayStartY)($at) /* 37C28 8005C828 C4400004 */ lwc1 $f0, 0x4($v0) /* 37C2C 8005C82C 4600C501 */ sub.s $f20, $f24, $f0 /* 37C30 8005C830 C4820034 */ lwc1 $f2, 0x34($a0) /* 37C34 8005C834 46141082 */ mul.s $f2, $f2, $f20 /* 37C38 8005C838 00000000 */ nop /* 37C3C 8005C83C 3C01800A */ lui $at, %hi(gCollisionRayStartZ) /* 37C40 8005C840 C43C4238 */ lwc1 $f28, %lo(gCollisionRayStartZ)($at) /* 37C44 8005C844 C4400008 */ lwc1 $f0, 0x8($v0) /* 37C48 8005C848 4600E401 */ sub.s $f16, $f28, $f0 /* 37C4C 8005C84C C4860038 */ lwc1 $f6, 0x38($a0) /* 37C50 8005C850 46103002 */ mul.s $f0, $f6, $f16 /* 37C54 8005C854 00000000 */ nop /* 37C58 8005C858 8C830004 */ lw $v1, 0x4($a0) /* 37C5C 8005C85C 46022100 */ add.s $f4, $f4, $f2 /* 37C60 8005C860 8C850008 */ lw $a1, 0x8($a0) /* 37C64 8005C864 8482003C */ lh $v0, 0x3C($a0) /* 37C68 8005C868 10400068 */ beqz $v0, .L8005CA0C /* 37C6C 8005C86C 46002480 */ add.s $f18, $f4, $f0 /* 37C70 8005C870 4480D000 */ mtc1 $zero, $f26 /* 37C74 8005C874 00000000 */ nop /* 37C78 8005C878 461A903C */ c.lt.s $f18, $f26 /* 37C7C 8005C87C 00000000 */ nop /* 37C80 8005C880 4503010C */ bc1tl .L8005CCB4 /* 37C84 8005C884 0000102D */ daddu $v0, $zero, $zero /* 37C88 8005C888 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 37C8C 8005C88C C42C423C */ lwc1 $f12, %lo(gCollisionRayDirX)($at) /* 37C90 8005C890 460C4002 */ mul.s $f0, $f8, $f12 /* 37C94 8005C894 00000000 */ nop /* 37C98 8005C898 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 37C9C 8005C89C C42A4244 */ lwc1 $f10, %lo(gCollisionRayDirZ)($at) /* 37CA0 8005C8A0 460A3082 */ mul.s $f2, $f6, $f10 /* 37CA4 8005C8A4 00000000 */ nop /* 37CA8 8005C8A8 46020000 */ add.s $f0, $f0, $f2 /* 37CAC 8005C8AC 4600D03E */ c.le.s $f26, $f0 /* 37CB0 8005C8B0 00000000 */ nop /* 37CB4 8005C8B4 450100FF */ bc1t .L8005CCB4 /* 37CB8 8005C8B8 0000102D */ daddu $v0, $zero, $zero /* 37CBC 8005C8BC C4860010 */ lwc1 $f6, 0x10($a0) /* 37CC0 8005C8C0 46003107 */ neg.s $f4, $f6 /* 37CC4 8005C8C4 460A2102 */ mul.s $f4, $f4, $f10 /* 37CC8 8005C8C8 00000000 */ nop /* 37CCC 8005C8CC C480000C */ lwc1 $f0, 0xC($a0) /* 37CD0 8005C8D0 460A0002 */ mul.s $f0, $f0, $f10 /* 37CD4 8005C8D4 00000000 */ nop /* 37CD8 8005C8D8 C4820014 */ lwc1 $f2, 0x14($a0) /* 37CDC 8005C8DC 460C1082 */ mul.s $f2, $f2, $f12 /* 37CE0 8005C8E0 00000000 */ nop /* 37CE4 8005C8E4 460C3182 */ mul.s $f6, $f6, $f12 /* 37CE8 8005C8E8 00000000 */ nop /* 37CEC 8005C8EC 46047102 */ mul.s $f4, $f14, $f4 /* 37CF0 8005C8F0 00000000 */ nop /* 37CF4 8005C8F4 46068182 */ mul.s $f6, $f16, $f6 /* 37CF8 8005C8F8 00000000 */ nop /* 37CFC 8005C8FC 46020001 */ sub.s $f0, $f0, $f2 /* 37D00 8005C900 4600A002 */ mul.s $f0, $f20, $f0 /* 37D04 8005C904 00000000 */ nop /* 37D08 8005C908 46002100 */ add.s $f4, $f4, $f0 /* 37D0C 8005C90C 46062100 */ add.s $f4, $f4, $f6 /* 37D10 8005C910 461A203C */ c.lt.s $f4, $f26 /* 37D14 8005C914 00000000 */ nop /* 37D18 8005C918 450100E6 */ bc1t .L8005CCB4 /* 37D1C 8005C91C 00000000 */ nop /* 37D20 8005C920 C488001C */ lwc1 $f8, 0x1C($a0) /* 37D24 8005C924 46004007 */ neg.s $f0, $f8 /* 37D28 8005C928 460A0002 */ mul.s $f0, $f0, $f10 /* 37D2C 8005C92C 00000000 */ nop /* 37D30 8005C930 C4840018 */ lwc1 $f4, 0x18($a0) /* 37D34 8005C934 460A2102 */ mul.s $f4, $f4, $f10 /* 37D38 8005C938 00000000 */ nop /* 37D3C 8005C93C 460C4202 */ mul.s $f8, $f8, $f12 /* 37D40 8005C940 00000000 */ nop /* 37D44 8005C944 C4620000 */ lwc1 $f2, 0x0($v1) /* 37D48 8005C948 4602B081 */ sub.s $f2, $f22, $f2 /* 37D4C 8005C94C 46001082 */ mul.s $f2, $f2, $f0 /* 37D50 8005C950 00000000 */ nop /* 37D54 8005C954 C4800020 */ lwc1 $f0, 0x20($a0) /* 37D58 8005C958 460C0002 */ mul.s $f0, $f0, $f12 /* 37D5C 8005C95C 00000000 */ nop /* 37D60 8005C960 C4660004 */ lwc1 $f6, 0x4($v1) /* 37D64 8005C964 4606C181 */ sub.s $f6, $f24, $f6 /* 37D68 8005C968 46002101 */ sub.s $f4, $f4, $f0 /* 37D6C 8005C96C 46043182 */ mul.s $f6, $f6, $f4 /* 37D70 8005C970 00000000 */ nop /* 37D74 8005C974 C4600008 */ lwc1 $f0, 0x8($v1) /* 37D78 8005C978 4600E001 */ sub.s $f0, $f28, $f0 /* 37D7C 8005C97C 46080002 */ mul.s $f0, $f0, $f8 /* 37D80 8005C980 00000000 */ nop /* 37D84 8005C984 46061080 */ add.s $f2, $f2, $f6 /* 37D88 8005C988 46001080 */ add.s $f2, $f2, $f0 /* 37D8C 8005C98C 461A103C */ c.lt.s $f2, $f26 /* 37D90 8005C990 00000000 */ nop /* 37D94 8005C994 450100C7 */ bc1t .L8005CCB4 /* 37D98 8005C998 00000000 */ nop /* 37D9C 8005C99C C4880028 */ lwc1 $f8, 0x28($a0) /* 37DA0 8005C9A0 46004007 */ neg.s $f0, $f8 /* 37DA4 8005C9A4 460A0002 */ mul.s $f0, $f0, $f10 /* 37DA8 8005C9A8 00000000 */ nop /* 37DAC 8005C9AC C4840024 */ lwc1 $f4, 0x24($a0) /* 37DB0 8005C9B0 460A2102 */ mul.s $f4, $f4, $f10 /* 37DB4 8005C9B4 00000000 */ nop /* 37DB8 8005C9B8 460C4202 */ mul.s $f8, $f8, $f12 /* 37DBC 8005C9BC 00000000 */ nop /* 37DC0 8005C9C0 C4A20000 */ lwc1 $f2, 0x0($a1) /* 37DC4 8005C9C4 4602B081 */ sub.s $f2, $f22, $f2 /* 37DC8 8005C9C8 46001082 */ mul.s $f2, $f2, $f0 /* 37DCC 8005C9CC 00000000 */ nop /* 37DD0 8005C9D0 C480002C */ lwc1 $f0, 0x2C($a0) /* 37DD4 8005C9D4 460C0002 */ mul.s $f0, $f0, $f12 /* 37DD8 8005C9D8 00000000 */ nop /* 37DDC 8005C9DC C4A60004 */ lwc1 $f6, 0x4($a1) /* 37DE0 8005C9E0 4606C181 */ sub.s $f6, $f24, $f6 /* 37DE4 8005C9E4 46002101 */ sub.s $f4, $f4, $f0 /* 37DE8 8005C9E8 46043182 */ mul.s $f6, $f6, $f4 /* 37DEC 8005C9EC 00000000 */ nop /* 37DF0 8005C9F0 C4A00008 */ lwc1 $f0, 0x8($a1) /* 37DF4 8005C9F4 4600E001 */ sub.s $f0, $f28, $f0 /* 37DF8 8005C9F8 46080002 */ mul.s $f0, $f0, $f8 /* 37DFC 8005C9FC 00000000 */ nop /* 37E00 8005CA00 46061080 */ add.s $f2, $f2, $f6 /* 37E04 8005CA04 080172ED */ j .L8005CBB4 /* 37E08 8005CA08 46001080 */ add.s $f2, $f2, $f0 .L8005CA0C: /* 37E0C 8005CA0C 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 37E10 8005CA10 C42C423C */ lwc1 $f12, %lo(gCollisionRayDirX)($at) /* 37E14 8005CA14 460C4002 */ mul.s $f0, $f8, $f12 /* 37E18 8005CA18 00000000 */ nop /* 37E1C 8005CA1C 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 37E20 8005CA20 C42A4244 */ lwc1 $f10, %lo(gCollisionRayDirZ)($at) /* 37E24 8005CA24 460A3082 */ mul.s $f2, $f6, $f10 /* 37E28 8005CA28 00000000 */ nop /* 37E2C 8005CA2C 46020000 */ add.s $f0, $f0, $f2 /* 37E30 8005CA30 46120002 */ mul.s $f0, $f0, $f18 /* 37E34 8005CA34 00000000 */ nop /* 37E38 8005CA38 4480D000 */ mtc1 $zero, $f26 /* 37E3C 8005CA3C 00000000 */ nop /* 37E40 8005CA40 4600D03E */ c.le.s $f26, $f0 /* 37E44 8005CA44 00000000 */ nop /* 37E48 8005CA48 4501009A */ bc1t .L8005CCB4 /* 37E4C 8005CA4C 0000102D */ daddu $v0, $zero, $zero /* 37E50 8005CA50 C4860010 */ lwc1 $f6, 0x10($a0) /* 37E54 8005CA54 46003107 */ neg.s $f4, $f6 /* 37E58 8005CA58 460A2102 */ mul.s $f4, $f4, $f10 /* 37E5C 8005CA5C 00000000 */ nop /* 37E60 8005CA60 C480000C */ lwc1 $f0, 0xC($a0) /* 37E64 8005CA64 460A0002 */ mul.s $f0, $f0, $f10 /* 37E68 8005CA68 00000000 */ nop /* 37E6C 8005CA6C C4820014 */ lwc1 $f2, 0x14($a0) /* 37E70 8005CA70 460C1082 */ mul.s $f2, $f2, $f12 /* 37E74 8005CA74 00000000 */ nop /* 37E78 8005CA78 460C3182 */ mul.s $f6, $f6, $f12 /* 37E7C 8005CA7C 00000000 */ nop /* 37E80 8005CA80 46047102 */ mul.s $f4, $f14, $f4 /* 37E84 8005CA84 00000000 */ nop /* 37E88 8005CA88 46068182 */ mul.s $f6, $f16, $f6 /* 37E8C 8005CA8C 00000000 */ nop /* 37E90 8005CA90 46020001 */ sub.s $f0, $f0, $f2 /* 37E94 8005CA94 4600A002 */ mul.s $f0, $f20, $f0 /* 37E98 8005CA98 00000000 */ nop /* 37E9C 8005CA9C 46002100 */ add.s $f4, $f4, $f0 /* 37EA0 8005CAA0 46062100 */ add.s $f4, $f4, $f6 /* 37EA4 8005CAA4 46122102 */ mul.s $f4, $f4, $f18 /* 37EA8 8005CAA8 00000000 */ nop /* 37EAC 8005CAAC 461A203C */ c.lt.s $f4, $f26 /* 37EB0 8005CAB0 00000000 */ nop /* 37EB4 8005CAB4 4501007F */ bc1t .L8005CCB4 /* 37EB8 8005CAB8 00000000 */ nop /* 37EBC 8005CABC C488001C */ lwc1 $f8, 0x1C($a0) /* 37EC0 8005CAC0 46004007 */ neg.s $f0, $f8 /* 37EC4 8005CAC4 460A0002 */ mul.s $f0, $f0, $f10 /* 37EC8 8005CAC8 00000000 */ nop /* 37ECC 8005CACC C4840018 */ lwc1 $f4, 0x18($a0) /* 37ED0 8005CAD0 460A2102 */ mul.s $f4, $f4, $f10 /* 37ED4 8005CAD4 00000000 */ nop /* 37ED8 8005CAD8 460C4202 */ mul.s $f8, $f8, $f12 /* 37EDC 8005CADC 00000000 */ nop /* 37EE0 8005CAE0 C4620000 */ lwc1 $f2, 0x0($v1) /* 37EE4 8005CAE4 4602B081 */ sub.s $f2, $f22, $f2 /* 37EE8 8005CAE8 46001082 */ mul.s $f2, $f2, $f0 /* 37EEC 8005CAEC 00000000 */ nop /* 37EF0 8005CAF0 C4800020 */ lwc1 $f0, 0x20($a0) /* 37EF4 8005CAF4 460C0002 */ mul.s $f0, $f0, $f12 /* 37EF8 8005CAF8 00000000 */ nop /* 37EFC 8005CAFC C4660004 */ lwc1 $f6, 0x4($v1) /* 37F00 8005CB00 4606C181 */ sub.s $f6, $f24, $f6 /* 37F04 8005CB04 46002101 */ sub.s $f4, $f4, $f0 /* 37F08 8005CB08 46043182 */ mul.s $f6, $f6, $f4 /* 37F0C 8005CB0C 00000000 */ nop /* 37F10 8005CB10 C4600008 */ lwc1 $f0, 0x8($v1) /* 37F14 8005CB14 4600E001 */ sub.s $f0, $f28, $f0 /* 37F18 8005CB18 46080002 */ mul.s $f0, $f0, $f8 /* 37F1C 8005CB1C 00000000 */ nop /* 37F20 8005CB20 46061080 */ add.s $f2, $f2, $f6 /* 37F24 8005CB24 46001080 */ add.s $f2, $f2, $f0 /* 37F28 8005CB28 46121082 */ mul.s $f2, $f2, $f18 /* 37F2C 8005CB2C 00000000 */ nop /* 37F30 8005CB30 461A103C */ c.lt.s $f2, $f26 /* 37F34 8005CB34 00000000 */ nop /* 37F38 8005CB38 4501005E */ bc1t .L8005CCB4 /* 37F3C 8005CB3C 00000000 */ nop /* 37F40 8005CB40 C4880028 */ lwc1 $f8, 0x28($a0) /* 37F44 8005CB44 46004007 */ neg.s $f0, $f8 /* 37F48 8005CB48 460A0002 */ mul.s $f0, $f0, $f10 /* 37F4C 8005CB4C 00000000 */ nop /* 37F50 8005CB50 C4840024 */ lwc1 $f4, 0x24($a0) /* 37F54 8005CB54 460A2102 */ mul.s $f4, $f4, $f10 /* 37F58 8005CB58 00000000 */ nop /* 37F5C 8005CB5C 460C4202 */ mul.s $f8, $f8, $f12 /* 37F60 8005CB60 00000000 */ nop /* 37F64 8005CB64 C4A20000 */ lwc1 $f2, 0x0($a1) /* 37F68 8005CB68 4602B081 */ sub.s $f2, $f22, $f2 /* 37F6C 8005CB6C 46001082 */ mul.s $f2, $f2, $f0 /* 37F70 8005CB70 00000000 */ nop /* 37F74 8005CB74 C480002C */ lwc1 $f0, 0x2C($a0) /* 37F78 8005CB78 460C0002 */ mul.s $f0, $f0, $f12 /* 37F7C 8005CB7C 00000000 */ nop /* 37F80 8005CB80 C4A60004 */ lwc1 $f6, 0x4($a1) /* 37F84 8005CB84 4606C181 */ sub.s $f6, $f24, $f6 /* 37F88 8005CB88 46002101 */ sub.s $f4, $f4, $f0 /* 37F8C 8005CB8C 46043182 */ mul.s $f6, $f6, $f4 /* 37F90 8005CB90 00000000 */ nop /* 37F94 8005CB94 C4A00008 */ lwc1 $f0, 0x8($a1) /* 37F98 8005CB98 4600E001 */ sub.s $f0, $f28, $f0 /* 37F9C 8005CB9C 46080002 */ mul.s $f0, $f0, $f8 /* 37FA0 8005CBA0 00000000 */ nop /* 37FA4 8005CBA4 46061080 */ add.s $f2, $f2, $f6 /* 37FA8 8005CBA8 46001080 */ add.s $f2, $f2, $f0 /* 37FAC 8005CBAC 46121082 */ mul.s $f2, $f2, $f18 /* 37FB0 8005CBB0 00000000 */ nop .L8005CBB4: /* 37FB4 8005CBB4 461A103C */ c.lt.s $f2, $f26 /* 37FB8 8005CBB8 00000000 */ nop /* 37FBC 8005CBBC 4503003D */ bc1tl .L8005CCB4 /* 37FC0 8005CBC0 0000102D */ daddu $v0, $zero, $zero /* 37FC4 8005CBC4 C4840030 */ lwc1 $f4, 0x30($a0) /* 37FC8 8005CBC8 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 37FCC 8005CBCC C420423C */ lwc1 $f0, %lo(gCollisionRayDirX)($at) /* 37FD0 8005CBD0 46002102 */ mul.s $f4, $f4, $f0 /* 37FD4 8005CBD4 00000000 */ nop /* 37FD8 8005CBD8 C4820038 */ lwc1 $f2, 0x38($a0) /* 37FDC 8005CBDC 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 37FE0 8005CBE0 C4204244 */ lwc1 $f0, %lo(gCollisionRayDirZ)($at) /* 37FE4 8005CBE4 46001082 */ mul.s $f2, $f2, $f0 /* 37FE8 8005CBE8 00000000 */ nop /* 37FEC 8005CBEC 3C01800A */ lui $at, %hi(gCollisionRayLength) /* 37FF0 8005CBF0 C4264254 */ lwc1 $f6, %lo(gCollisionRayLength)($at) /* 37FF4 8005CBF4 44800000 */ mtc1 $zero, $f0 /* 37FF8 8005CBF8 00000000 */ nop /* 37FFC 8005CBFC 4606003E */ c.le.s $f0, $f6 /* 38000 8005CC00 00000000 */ nop /* 38004 8005CC04 45000007 */ bc1f .L8005CC24 /* 38008 8005CC08 46022100 */ add.s $f4, $f4, $f2 /* 3800C 8005CC0C 46009007 */ neg.s $f0, $f18 /* 38010 8005CC10 46040003 */ div.s $f0, $f0, $f4 /* 38014 8005CC14 4600303E */ c.le.s $f6, $f0 /* 38018 8005CC18 00000000 */ nop /* 3801C 8005CC1C 45010025 */ bc1t .L8005CCB4 /* 38020 8005CC20 0000102D */ daddu $v0, $zero, $zero .L8005CC24: /* 38024 8005CC24 46009007 */ neg.s $f0, $f18 /* 38028 8005CC28 46040003 */ div.s $f0, $f0, $f4 /* 3802C 8005CC2C 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 38030 8005CC30 C422423C */ lwc1 $f2, %lo(gCollisionRayDirX)($at) /* 38034 8005CC34 3C01800A */ lui $at, %hi(gCollisionRayStartX) /* 38038 8005CC38 C4264230 */ lwc1 $f6, %lo(gCollisionRayStartX)($at) /* 3803C 8005CC3C 3C01800A */ lui $at, %hi(gCollisionRayStartY) /* 38040 8005CC40 C42C4234 */ lwc1 $f12, %lo(gCollisionRayStartY)($at) /* 38044 8005CC44 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 38048 8005CC48 C4244244 */ lwc1 $f4, %lo(gCollisionRayDirZ)($at) /* 3804C 8005CC4C 46001082 */ mul.s $f2, $f2, $f0 /* 38050 8005CC50 00000000 */ nop /* 38054 8005CC54 C4880030 */ lwc1 $f8, 0x30($a0) /* 38058 8005CC58 C48A0034 */ lwc1 $f10, 0x34($a0) /* 3805C 8005CC5C 3C01800A */ lui $at, %hi(gCollisionRayLength) /* 38060 8005CC60 E4204254 */ swc1 $f0, %lo(gCollisionRayLength)($at) /* 38064 8005CC64 46002102 */ mul.s $f4, $f4, $f0 /* 38068 8005CC68 00000000 */ nop /* 3806C 8005CC6C 3C01800A */ lui $at, %hi(gCollisionRayStartZ) /* 38070 8005CC70 C4204238 */ lwc1 $f0, %lo(gCollisionRayStartZ)($at) /* 38074 8005CC74 24020001 */ addiu $v0, $zero, 0x1 /* 38078 8005CC78 3C01800A */ lui $at, %hi(gCollisionPointY) /* 3807C 8005CC7C E42C424C */ swc1 $f12, %lo(gCollisionPointY)($at) /* 38080 8005CC80 3C01800A */ lui $at, %hi(gCollisionNormalX) /* 38084 8005CC84 E4284258 */ swc1 $f8, %lo(gCollisionNormalX)($at) /* 38088 8005CC88 46023180 */ add.s $f6, $f6, $f2 /* 3808C 8005CC8C 3C01800A */ lui $at, %hi(gCollisionNormalY) /* 38090 8005CC90 E42A425C */ swc1 $f10, %lo(gCollisionNormalY)($at) /* 38094 8005CC94 C4820038 */ lwc1 $f2, 0x38($a0) /* 38098 8005CC98 46040000 */ add.s $f0, $f0, $f4 /* 3809C 8005CC9C 3C01800A */ lui $at, %hi(gCollisionNormalZ) /* 380A0 8005CCA0 E4224260 */ swc1 $f2, %lo(gCollisionNormalZ)($at) /* 380A4 8005CCA4 3C01800A */ lui $at, %hi(gCollisionPointX) /* 380A8 8005CCA8 E4264248 */ swc1 $f6, %lo(gCollisionPointX)($at) /* 380AC 8005CCAC 3C01800A */ lui $at, %hi(gCollisionPointZ) /* 380B0 8005CCB0 E4204250 */ swc1 $f0, %lo(gCollisionPointZ)($at) .L8005CCB4: /* 380B4 8005CCB4 D7BC0020 */ ldc1 $f28, 0x20($sp) /* 380B8 8005CCB8 D7BA0018 */ ldc1 $f26, 0x18($sp) /* 380BC 8005CCBC D7B80010 */ ldc1 $f24, 0x10($sp) /* 380C0 8005CCC0 D7B60008 */ ldc1 $f22, 0x8($sp) /* 380C4 8005CCC4 D7B40000 */ ldc1 $f20, 0x0($sp) /* 380C8 8005CCC8 03E00008 */ jr $ra /* 380CC 8005CCCC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 test_ray_triangle_horizontal(ColliderTriangle* triangle, Vec3f *vertices) { f32 distToTrianglePlane, 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.z * gCollisionRayDirZ >= 0) { return FALSE; } if ((gCollisionRayStartX - v1->x) * (-triangle->e13.y * gCollisionRayDirZ) + (gCollisionRayStartY - v1->y) * (triangle->e13.x * gCollisionRayDirZ - triangle->e13.z * gCollisionRayDirX) + (gCollisionRayStartZ - v1->z) * (triangle->e13.y * gCollisionRayDirX) < 0) { return FALSE; } if ((gCollisionRayStartX - v2->x) * (-triangle->e21.y * gCollisionRayDirZ) + (gCollisionRayStartY - v2->y) * (triangle->e21.x * gCollisionRayDirZ - triangle->e21.z * gCollisionRayDirX) + (gCollisionRayStartZ - v2->z) * (triangle->e21.y * gCollisionRayDirX) < 0) { return FALSE; } if ((gCollisionRayStartX - v3->x) * (-triangle->e32.y * gCollisionRayDirZ) + (gCollisionRayStartY - v3->y) * (triangle->e32.x * gCollisionRayDirZ - triangle->e32.z * gCollisionRayDirX) + (gCollisionRayStartZ - v3->z) * (triangle->e32.y * gCollisionRayDirX) < 0) { return FALSE; } } else { if ((triangle->normal.x * gCollisionRayDirX + triangle->normal.z * gCollisionRayDirZ) * distToTrianglePlane >= 0) { return FALSE; } if (((gCollisionRayStartX - v1->x) * (-triangle->e13.y * gCollisionRayDirZ) + (gCollisionRayStartY - v1->y) * (triangle->e13.x * gCollisionRayDirZ - triangle->e13.z * gCollisionRayDirX) + (gCollisionRayStartZ - v1->z) * (triangle->e13.y * gCollisionRayDirX)) * distToTrianglePlane < 0) { return FALSE; } if (((gCollisionRayStartX - v2->x) * (-triangle->e21.y * gCollisionRayDirZ) + (gCollisionRayStartY - v2->y) * (triangle->e21.x * gCollisionRayDirZ - triangle->e21.z * gCollisionRayDirX) + (gCollisionRayStartZ - v2->z) * (triangle->e21.y * gCollisionRayDirX)) * distToTrianglePlane < 0) { return FALSE; } if (((gCollisionRayStartX - v3->x) * (-triangle->e32.y * gCollisionRayDirZ) + (gCollisionRayStartY - v3->y) * (triangle->e32.x * gCollisionRayDirZ - triangle->e32.z * gCollisionRayDirX) + (gCollisionRayStartZ - v3->z) * (triangle->e32.y * gCollisionRayDirX)) * distToTrianglePlane < 0) { return FALSE; } } cosAngle = triangle->normal.x * gCollisionRayDirX + triangle->normal.z * gCollisionRayDirZ; if (gCollisionRayLength >= 0 && gCollisionRayLength <= -distToTrianglePlane / cosAngle) { return FALSE; } gCollisionRayLength = -distToTrianglePlane / cosAngle; gCollisionPointX = gCollisionRayStartX + gCollisionRayDirX * gCollisionRayLength; gCollisionPointY = gCollisionRayStartY; gCollisionPointZ = gCollisionRayStartZ + gCollisionRayDirZ * gCollisionRayLength; gCollisionNormalX = triangle->normal.x; gCollisionNormalY = triangle->normal.y; gCollisionNormalZ = triangle->normal.z; return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel gather_energy_pink_appendGfx /* 33B674 E00264F4 27BDFEE8 */ addiu $sp, $sp, -0x118 /* 33B678 E00264F8 AFB70104 */ sw $s7, 0x104($sp) /* 33B67C E00264FC 0080B82D */ daddu $s7, $a0, $zero /* 33B680 E0026500 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 33B684 E0026504 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 33B688 E0026508 AFB500FC */ sw $s5, 0xFC($sp) /* 33B68C E002650C 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 33B690 E0026510 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 33B694 E0026514 27A40020 */ addiu $a0, $sp, 0x20 /* 33B698 E0026518 3C08800B */ lui $t0, %hi(gCameras) /* 33B69C E002651C 25081D80 */ addiu $t0, $t0, %lo(gCameras) /* 33B6A0 E0026520 AFBF010C */ sw $ra, 0x10C($sp) /* 33B6A4 E0026524 AFBE0108 */ sw $fp, 0x108($sp) /* 33B6A8 E0026528 AFB60100 */ sw $s6, 0x100($sp) /* 33B6AC E002652C AFB400F8 */ sw $s4, 0xF8($sp) /* 33B6B0 E0026530 AFB300F4 */ sw $s3, 0xF4($sp) /* 33B6B4 E0026534 AFB200F0 */ sw $s2, 0xF0($sp) /* 33B6B8 E0026538 AFB100EC */ sw $s1, 0xEC($sp) /* 33B6BC E002653C AFB000E8 */ sw $s0, 0xE8($sp) /* 33B6C0 E0026540 F7B40110 */ sdc1 $f20, 0x110($sp) /* 33B6C4 E0026544 8EA50000 */ lw $a1, 0x0($s5) /* 33B6C8 E0026548 8EF3000C */ lw $s3, 0xC($s7) /* 33B6CC E002654C 00A0182D */ daddu $v1, $a1, $zero /* 33B6D0 E0026550 24A50008 */ addiu $a1, $a1, 0x8 /* 33B6D4 E0026554 AEA50000 */ sw $a1, 0x0($s5) /* 33B6D8 E0026558 8E740000 */ lw $s4, 0x0($s3) /* 33B6DC E002655C 24A20008 */ addiu $v0, $a1, 0x8 /* 33B6E0 E0026560 AEA20000 */ sw $v0, 0x0($s5) /* 33B6E4 E0026564 00141080 */ sll $v0, $s4, 2 /* 33B6E8 E0026568 3C06E002 */ lui $a2, (0xE00269F8 >> 16) /* 33B6EC E002656C 00C23021 */ addu $a2, $a2, $v0 /* 33B6F0 E0026570 8CC669F8 */ lw $a2, (0xE00269F8 & 0xFFFF)($a2) /* 33B6F4 E0026574 3C1EE002 */ lui $fp, (0xE00269F0 >> 16) /* 33B6F8 E0026578 03C2F021 */ addu $fp, $fp, $v0 /* 33B6FC E002657C 8FDE69F0 */ lw $fp, (0xE00269F0 & 0xFFFF)($fp) /* 33B700 E0026580 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 33B704 E0026584 AC620000 */ sw $v0, 0x0($v1) /* 33B708 E0026588 AC600004 */ sw $zero, 0x4($v1) /* 33B70C E002658C ACA70000 */ sw $a3, 0x0($a1) /* 33B710 E0026590 8EE30010 */ lw $v1, 0x10($s7) /* 33B714 E0026594 24A20010 */ addiu $v0, $a1, 0x10 /* 33B718 E0026598 AEA20000 */ sw $v0, 0x0($s5) /* 33B71C E002659C 8C63001C */ lw $v1, 0x1C($v1) /* 33B720 E00265A0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 33B724 E00265A4 ACA20008 */ sw $v0, 0x8($a1) /* 33B728 E00265A8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 33B72C E00265AC ACA6000C */ sw $a2, 0xC($a1) /* 33B730 E00265B0 00621821 */ addu $v1, $v1, $v0 /* 33B734 E00265B4 ACA30004 */ sw $v1, 0x4($a1) /* 33B738 E00265B8 8E650010 */ lw $a1, 0x10($s3) /* 33B73C E00265BC 8E660014 */ lw $a2, 0x14($s3) /* 33B740 E00265C0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 33B744 E00265C4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 33B748 E00265C8 8E670018 */ lw $a3, 0x18($s3) /* 33B74C E00265CC 00031080 */ sll $v0, $v1, 2 /* 33B750 E00265D0 00431021 */ addu $v0, $v0, $v1 /* 33B754 E00265D4 00021080 */ sll $v0, $v0, 2 /* 33B758 E00265D8 00431023 */ subu $v0, $v0, $v1 /* 33B75C E00265DC 000218C0 */ sll $v1, $v0, 3 /* 33B760 E00265E0 00431021 */ addu $v0, $v0, $v1 /* 33B764 E00265E4 000210C0 */ sll $v0, $v0, 3 /* 33B768 E00265E8 0C080108 */ jal shim_guTranslateF /* 33B76C E00265EC 00488821 */ addu $s1, $v0, $t0 /* 33B770 E00265F0 27B00060 */ addiu $s0, $sp, 0x60 /* 33B774 E00265F4 0200202D */ daddu $a0, $s0, $zero /* 33B778 E00265F8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 33B77C E00265FC 4481A000 */ mtc1 $at, $f20 /* 33B780 E0026600 8E65001C */ lw $a1, 0x1C($s3) /* 33B784 E0026604 4407A000 */ mfc1 $a3, $f20 /* 33B788 E0026608 0C080110 */ jal shim_guScaleF /* 33B78C E002660C 00A0302D */ daddu $a2, $a1, $zero /* 33B790 E0026610 0200202D */ daddu $a0, $s0, $zero /* 33B794 E0026614 27A50020 */ addiu $a1, $sp, 0x20 /* 33B798 E0026618 0C080114 */ jal shim_guMtxCatF /* 33B79C E002661C 00A0302D */ daddu $a2, $a1, $zero /* 33B7A0 E0026620 24160001 */ addiu $s6, $zero, 0x1 /* 33B7A4 E0026624 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 33B7A8 E0026628 44810000 */ mtc1 $at, $f0 /* 33B7AC E002662C 16960003 */ bne $s4, $s6, .LE002663C /* 33B7B0 E0026630 27A500E0 */ addiu $a1, $sp, 0xE0 /* 33B7B4 E0026634 3C014302 */ lui $at, (0x43020000 >> 16) /* 33B7B8 E0026638 44810000 */ mtc1 $at, $f0 .LE002663C: /* 33B7BC E002663C 0200202D */ daddu $a0, $s0, $zero /* 33B7C0 E0026640 3C120001 */ lui $s2, (0x11630 >> 16) /* 33B7C4 E0026644 44060000 */ mfc1 $a2, $f0 /* 33B7C8 E0026648 8622000A */ lh $v0, 0xA($s1) /* 33B7CC E002664C 8623000C */ lh $v1, 0xC($s1) /* 33B7D0 E0026650 3C014080 */ lui $at, (0x40800000 >> 16) /* 33B7D4 E0026654 44811000 */ mtc1 $at, $f2 /* 33B7D8 E0026658 3C014680 */ lui $at, (0x46800000 >> 16) /* 33B7DC E002665C 44812000 */ mtc1 $at, $f4 /* 33B7E0 E0026660 44823000 */ mtc1 $v0, $f6 /* 33B7E4 E0026664 00000000 */ nop /* 33B7E8 E0026668 468031A0 */ cvt.s.w $f6, $f6 /* 33B7EC E002666C 44830000 */ mtc1 $v1, $f0 /* 33B7F0 E0026670 00000000 */ nop /* 33B7F4 E0026674 46800020 */ cvt.s.w $f0, $f0 /* 33B7F8 E0026678 46003183 */ div.s $f6, $f6, $f0 /* 33B7FC E002667C 44073000 */ mfc1 $a3, $f6 /* 33B800 E0026680 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 33B804 E0026684 E7B40018 */ swc1 $f20, 0x18($sp) /* 33B808 E0026688 E7A20010 */ swc1 $f2, 0x10($sp) /* 33B80C E002668C 0C080160 */ jal shim_guPerspectiveF /* 33B810 E0026690 E7A40014 */ swc1 $f4, 0x14($sp) /* 33B814 E0026694 0200202D */ daddu $a0, $s0, $zero /* 33B818 E0026698 27A50020 */ addiu $a1, $sp, 0x20 /* 33B81C E002669C 0C080114 */ jal shim_guMtxCatF /* 33B820 E00266A0 00A0302D */ daddu $a2, $a1, $zero /* 33B824 E00266A4 27A40020 */ addiu $a0, $sp, 0x20 /* 33B828 E00266A8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 33B82C E00266AC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 33B830 E00266B0 3C11800A */ lui $s1, %hi(gDisplayContext) /* 33B834 E00266B4 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 33B838 E00266B8 96050000 */ lhu $a1, 0x0($s0) /* 33B83C E00266BC 8E220000 */ lw $v0, 0x0($s1) /* 33B840 E00266C0 00052980 */ sll $a1, $a1, 6 /* 33B844 E00266C4 00B22821 */ addu $a1, $a1, $s2 /* 33B848 E00266C8 0C080118 */ jal shim_guMtxF2L /* 33B84C E00266CC 00452821 */ addu $a1, $v0, $a1 /* 33B850 E00266D0 3C04DA38 */ lui $a0, (0xDA380007 >> 16) /* 33B854 E00266D4 34840007 */ ori $a0, $a0, (0xDA380007 & 0xFFFF) /* 33B858 E00266D8 8EA30000 */ lw $v1, 0x0($s5) /* 33B85C E00266DC 96020000 */ lhu $v0, 0x0($s0) /* 33B860 E00266E0 0060282D */ daddu $a1, $v1, $zero /* 33B864 E00266E4 24630008 */ addiu $v1, $v1, 0x8 /* 33B868 E00266E8 AEA30000 */ sw $v1, 0x0($s5) /* 33B86C E00266EC 24430001 */ addiu $v1, $v0, 0x1 /* 33B870 E00266F0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 33B874 E00266F4 00021180 */ sll $v0, $v0, 6 /* 33B878 E00266F8 ACA40000 */ sw $a0, 0x0($a1) /* 33B87C E00266FC A6030000 */ sh $v1, 0x0($s0) /* 33B880 E0026700 8E230000 */ lw $v1, 0x0($s1) /* 33B884 E0026704 00521021 */ addu $v0, $v0, $s2 /* 33B888 E0026708 00621821 */ addu $v1, $v1, $v0 /* 33B88C E002670C 12800009 */ beqz $s4, .LE0026734 /* 33B890 E0026710 ACA30004 */ sw $v1, 0x4($a1) /* 33B894 E0026714 1696000E */ bne $s4, $s6, .LE0026750 /* 33B898 E0026718 3C120001 */ lui $s2, (0x11630 >> 16) /* 33B89C E002671C 44800000 */ mtc1 $zero, $f0 /* 33B8A0 E0026720 00000000 */ nop /* 33B8A4 E0026724 44050000 */ mfc1 $a1, $f0 /* 33B8A8 E0026728 3C07C28C */ lui $a3, (0xC28C0000 >> 16) /* 33B8AC E002672C 080099D1 */ j .LE0026744 /* 33B8B0 E0026730 27A40020 */ addiu $a0, $sp, 0x20 .LE0026734: /* 33B8B4 E0026734 44800000 */ mtc1 $zero, $f0 /* 33B8B8 E0026738 27A40020 */ addiu $a0, $sp, 0x20 /* 33B8BC E002673C 44050000 */ mfc1 $a1, $f0 /* 33B8C0 E0026740 3C07C2A0 */ lui $a3, (0xC2A00000 >> 16) .LE0026744: /* 33B8C4 E0026744 0C080108 */ jal shim_guTranslateF /* 33B8C8 E0026748 00A0302D */ daddu $a2, $a1, $zero /* 33B8CC E002674C 3C120001 */ lui $s2, (0x11630 >> 16) .LE0026750: /* 33B8D0 E0026750 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 33B8D4 E0026754 27A40020 */ addiu $a0, $sp, 0x20 /* 33B8D8 E0026758 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 33B8DC E002675C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 33B8E0 E0026760 3C11800A */ lui $s1, %hi(gDisplayContext) /* 33B8E4 E0026764 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 33B8E8 E0026768 96050000 */ lhu $a1, 0x0($s0) /* 33B8EC E002676C 8E220000 */ lw $v0, 0x0($s1) /* 33B8F0 E0026770 00052980 */ sll $a1, $a1, 6 /* 33B8F4 E0026774 00B22821 */ addu $a1, $a1, $s2 /* 33B8F8 E0026778 0C080118 */ jal shim_guMtxF2L /* 33B8FC E002677C 00452821 */ addu $a1, $v0, $a1 /* 33B900 E0026780 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 33B904 E0026784 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 33B908 E0026788 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 33B90C E002678C 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 33B910 E0026790 8CC20000 */ lw $v0, 0x0($a2) /* 33B914 E0026794 96040000 */ lhu $a0, 0x0($s0) /* 33B918 E0026798 0040282D */ daddu $a1, $v0, $zero /* 33B91C E002679C 24420008 */ addiu $v0, $v0, 0x8 /* 33B920 E00267A0 ACC20000 */ sw $v0, 0x0($a2) /* 33B924 E00267A4 3082FFFF */ andi $v0, $a0, 0xFFFF /* 33B928 E00267A8 00021180 */ sll $v0, $v0, 6 /* 33B92C E00267AC ACA30000 */ sw $v1, 0x0($a1) /* 33B930 E00267B0 8E230000 */ lw $v1, 0x0($s1) /* 33B934 E00267B4 00521021 */ addu $v0, $v0, $s2 /* 33B938 E00267B8 00621821 */ addu $v1, $v1, $v0 /* 33B93C E00267BC ACA30004 */ sw $v1, 0x4($a1) /* 33B940 E00267C0 8E63002C */ lw $v1, 0x2C($s3) /* 33B944 E00267C4 24840001 */ addiu $a0, $a0, 0x1 /* 33B948 E00267C8 A6040000 */ sh $a0, 0x0($s0) /* 33B94C E00267CC 00031040 */ sll $v0, $v1, 1 /* 33B950 E00267D0 00434821 */ addu $t1, $v0, $v1 /* 33B954 E00267D4 8EE20008 */ lw $v0, 0x8($s7) /* 33B958 E00267D8 8E630024 */ lw $v1, 0x24($s3) /* 33B95C E00267DC 18400059 */ blez $v0, .LE0026944 /* 33B960 E00267E0 0000602D */ daddu $t4, $zero, $zero /* 33B964 E00267E4 3C112AAA */ lui $s1, (0x2AAAAAAB >> 16) /* 33B968 E00267E8 3631AAAB */ ori $s1, $s1, (0x2AAAAAAB & 0xFFFF) /* 33B96C E00267EC 00C0582D */ daddu $t3, $a2, $zero /* 33B970 E00267F0 3C14FB00 */ lui $s4, (0xFB000000 >> 16) /* 33B974 E00267F4 000317C2 */ srl $v0, $v1, 31 /* 33B978 E00267F8 00621021 */ addu $v0, $v1, $v0 /* 33B97C E00267FC 00021043 */ sra $v0, $v0, 1 /* 33B980 E0026800 305000FF */ andi $s0, $v0, 0xFF /* 33B984 E0026804 3C12FA00 */ lui $s2, (0xFA000000 >> 16) /* 33B988 E0026808 3C0EE002 */ lui $t6, %hi(D_E0026A00) /* 33B98C E002680C 25CE6A00 */ addiu $t6, $t6, %lo(D_E0026A00) /* 33B990 E0026810 306F00FF */ andi $t7, $v1, 0xFF /* 33B994 E0026814 3C0DF200 */ lui $t5, (0xF2000000 >> 16) /* 33B998 E0026818 266A0048 */ addiu $t2, $s3, 0x48 .LE002681C: /* 33B99C E002681C 2529001E */ addiu $t1, $t1, 0x1E /* 33B9A0 E0026820 258C0001 */ addiu $t4, $t4, 0x1 /* 33B9A4 E0026824 8D660000 */ lw $a2, 0x0($t3) /* 33B9A8 E0026828 01310018 */ mult $t1, $s1 /* 33B9AC E002682C 00C0102D */ daddu $v0, $a2, $zero /* 33B9B0 E0026830 24C60008 */ addiu $a2, $a2, 0x8 /* 33B9B4 E0026834 AD660000 */ sw $a2, 0x0($t3) /* 33B9B8 E0026838 AC540000 */ sw $s4, 0x0($v0) /* 33B9BC E002683C AC500004 */ sw $s0, 0x4($v0) /* 33B9C0 E0026840 24C20008 */ addiu $v0, $a2, 0x8 /* 33B9C4 E0026844 AD620000 */ sw $v0, 0x0($t3) /* 33B9C8 E0026848 000917C3 */ sra $v0, $t1, 31 /* 33B9CC E002684C ACD20000 */ sw $s2, 0x0($a2) /* 33B9D0 E0026850 0000C010 */ mfhi $t8 /* 33B9D4 E0026854 00181883 */ sra $v1, $t8, 2 /* 33B9D8 E0026858 00621823 */ subu $v1, $v1, $v0 /* 33B9DC E002685C 00031040 */ sll $v0, $v1, 1 /* 33B9E0 E0026860 00431021 */ addu $v0, $v0, $v1 /* 33B9E4 E0026864 000210C0 */ sll $v0, $v0, 3 /* 33B9E8 E0026868 01224823 */ subu $t1, $t1, $v0 /* 33B9EC E002686C 012E1021 */ addu $v0, $t1, $t6 /* 33B9F0 E0026870 0040202D */ daddu $a0, $v0, $zero /* 33B9F4 E0026874 90430000 */ lbu $v1, 0x0($v0) /* 33B9F8 E0026878 90840002 */ lbu $a0, 0x2($a0) /* 33B9FC E002687C 24C20010 */ addiu $v0, $a2, 0x10 /* 33BA00 E0026880 AD620000 */ sw $v0, 0x0($t3) /* 33BA04 E0026884 24C20018 */ addiu $v0, $a2, 0x18 /* 33BA08 E0026888 AD620000 */ sw $v0, 0x0($t3) /* 33BA0C E002688C 24C20020 */ addiu $v0, $a2, 0x20 /* 33BA10 E0026890 AD620000 */ sw $v0, 0x0($t3) /* 33BA14 E0026894 00031E00 */ sll $v1, $v1, 24 /* 33BA18 E0026898 00042200 */ sll $a0, $a0, 8 /* 33BA1C E002689C 00641825 */ or $v1, $v1, $a0 /* 33BA20 E00268A0 006F1825 */ or $v1, $v1, $t7 /* 33BA24 E00268A4 ACC30004 */ sw $v1, 0x4($a2) /* 33BA28 E00268A8 8D44FFE8 */ lw $a0, -0x18($t2) /* 33BA2C E00268AC 8D47FFF8 */ lw $a3, -0x8($t2) /* 33BA30 E00268B0 8D45FFF0 */ lw $a1, -0x10($t2) /* 33BA34 E00268B4 8D480000 */ lw $t0, 0x0($t2) /* 33BA38 E00268B8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 33BA3C E00268BC ACC20018 */ sw $v0, 0x18($a2) /* 33BA40 E00268C0 ACDE001C */ sw $fp, 0x1C($a2) /* 33BA44 E00268C4 30830FFF */ andi $v1, $a0, 0xFFF /* 33BA48 E00268C8 00031B00 */ sll $v1, $v1, 12 /* 33BA4C E00268CC 30E20FFF */ andi $v0, $a3, 0xFFF /* 33BA50 E00268D0 004D1025 */ or $v0, $v0, $t5 /* 33BA54 E00268D4 00621825 */ or $v1, $v1, $v0 /* 33BA58 E00268D8 24840100 */ addiu $a0, $a0, 0x100 /* 33BA5C E00268DC 30840FFF */ andi $a0, $a0, 0xFFF /* 33BA60 E00268E0 00042300 */ sll $a0, $a0, 12 /* 33BA64 E00268E4 24E70100 */ addiu $a3, $a3, 0x100 /* 33BA68 E00268E8 30E70FFF */ andi $a3, $a3, 0xFFF /* 33BA6C E00268EC 00872025 */ or $a0, $a0, $a3 /* 33BA70 E00268F0 ACC30008 */ sw $v1, 0x8($a2) /* 33BA74 E00268F4 30A30FFF */ andi $v1, $a1, 0xFFF /* 33BA78 E00268F8 00031B00 */ sll $v1, $v1, 12 /* 33BA7C E00268FC 31020FFF */ andi $v0, $t0, 0xFFF /* 33BA80 E0026900 004D1025 */ or $v0, $v0, $t5 /* 33BA84 E0026904 00621825 */ or $v1, $v1, $v0 /* 33BA88 E0026908 24A50100 */ addiu $a1, $a1, 0x100 /* 33BA8C E002690C 30A50FFF */ andi $a1, $a1, 0xFFF /* 33BA90 E0026910 00052B00 */ sll $a1, $a1, 12 /* 33BA94 E0026914 25080100 */ addiu $t0, $t0, 0x100 /* 33BA98 E0026918 31080FFF */ andi $t0, $t0, 0xFFF /* 33BA9C E002691C 3C020100 */ lui $v0, (0x1000000 >> 16) /* 33BAA0 E0026920 01024025 */ or $t0, $t0, $v0 /* 33BAA4 E0026924 00A82825 */ or $a1, $a1, $t0 /* 33BAA8 E0026928 ACC4000C */ sw $a0, 0xC($a2) /* 33BAAC E002692C ACC30010 */ sw $v1, 0x10($a2) /* 33BAB0 E0026930 ACC50014 */ sw $a1, 0x14($a2) /* 33BAB4 E0026934 8EE20008 */ lw $v0, 0x8($s7) /* 33BAB8 E0026938 0182102A */ slt $v0, $t4, $v0 /* 33BABC E002693C 1440FFB7 */ bnez $v0, .LE002681C /* 33BAC0 E0026940 254A0060 */ addiu $t2, $t2, 0x60 .LE0026944: /* 33BAC4 E0026944 3C02D838 */ lui $v0, (0xD8380002 >> 16) /* 33BAC8 E0026948 34420002 */ ori $v0, $v0, (0xD8380002 & 0xFFFF) /* 33BACC E002694C 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 33BAD0 E0026950 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 33BAD4 E0026954 8CA40000 */ lw $a0, 0x0($a1) /* 33BAD8 E0026958 3C06DA38 */ lui $a2, (0xDA380007 >> 16) /* 33BADC E002695C 0080182D */ daddu $v1, $a0, $zero /* 33BAE0 E0026960 24840008 */ addiu $a0, $a0, 0x8 /* 33BAE4 E0026964 ACA40000 */ sw $a0, 0x0($a1) /* 33BAE8 E0026968 AC620000 */ sw $v0, 0x0($v1) /* 33BAEC E002696C 24020040 */ addiu $v0, $zero, 0x40 /* 33BAF0 E0026970 AC620004 */ sw $v0, 0x4($v1) /* 33BAF4 E0026974 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 33BAF8 E0026978 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 33BAFC E002697C 24820008 */ addiu $v0, $a0, 0x8 /* 33BB00 E0026980 ACA20000 */ sw $v0, 0x0($a1) /* 33BB04 E0026984 3C02800A */ lui $v0, %hi(gDisplayContext) /* 33BB08 E0026988 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 33BB0C E002698C 34C60007 */ ori $a2, $a2, (0xDA380007 & 0xFFFF) /* 33BB10 E0026990 AC860000 */ sw $a2, 0x0($a0) /* 33BB14 E0026994 00031980 */ sll $v1, $v1, 6 /* 33BB18 E0026998 24630030 */ addiu $v1, $v1, 0x30 /* 33BB1C E002699C 00431021 */ addu $v0, $v0, $v1 /* 33BB20 E00269A0 AC820004 */ sw $v0, 0x4($a0) /* 33BB24 E00269A4 24820010 */ addiu $v0, $a0, 0x10 /* 33BB28 E00269A8 ACA20000 */ sw $v0, 0x0($a1) /* 33BB2C E00269AC 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 33BB30 E00269B0 AC820008 */ sw $v0, 0x8($a0) /* 33BB34 E00269B4 AC80000C */ sw $zero, 0xC($a0) /* 33BB38 E00269B8 8FBF010C */ lw $ra, 0x10C($sp) /* 33BB3C E00269BC 8FBE0108 */ lw $fp, 0x108($sp) /* 33BB40 E00269C0 8FB70104 */ lw $s7, 0x104($sp) /* 33BB44 E00269C4 8FB60100 */ lw $s6, 0x100($sp) /* 33BB48 E00269C8 8FB500FC */ lw $s5, 0xFC($sp) /* 33BB4C E00269CC 8FB400F8 */ lw $s4, 0xF8($sp) /* 33BB50 E00269D0 8FB300F4 */ lw $s3, 0xF4($sp) /* 33BB54 E00269D4 8FB200F0 */ lw $s2, 0xF0($sp) /* 33BB58 E00269D8 8FB100EC */ lw $s1, 0xEC($sp) /* 33BB5C E00269DC 8FB000E8 */ lw $s0, 0xE8($sp) /* 33BB60 E00269E0 D7B40110 */ ldc1 $f20, 0x110($sp) /* 33BB64 E00269E4 03E00008 */ jr $ra /* 33BB68 E00269E8 27BD0118 */ addiu $sp, $sp, 0x118 /* 33BB6C E00269EC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void gather_energy_pink_appendGfx(void* effect) { GatherEnergyPinkFXData* part = ((EffectInstance*)effect)->data.gatherEnergyPink; s32 unk_00 = part->unk_00; Gfx* dlist = D_E00269F8[unk_00]; Gfx* dlist2 = D_E00269F0[unk_00]; Camera* camera = &gCameras[gCurrentCameraID]; Matrix4f sp20; Matrix4f sp60; Matrix4f unused; u16 perspNorm; s32 alpha; s32 idx; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist); shim_guTranslateF(sp20, part->posB.x, part->posB.y, part->posB.z); shim_guScaleF(sp60, part->unk_1C, part->unk_1C, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guPerspectiveF(sp60, &perspNorm, unk_00 == 1 ? 130.0f : 30.0f, (f32) camera->viewportW / camera->viewportH, 4.0f, 16384.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); switch (unk_00) { case 1: shim_guTranslateF(sp20, 0.0f, 0.0f, -70.0f); break; case 0: shim_guTranslateF(sp20, 0.0f, 0.0f, -80.0f); break; } shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); idx = part->unk_2C * 3; alpha = part->unk_24; for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, part++) { s32 tempX; s32 tempY; s32 tempX2; s32 tempY2; idx += 30; idx %= 24; gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha / 2); gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0026A00[idx], 0, D_E0026A00[idx + 2], alpha); tempX = part->unk_30; tempY = part->unk_40; tempX2 = part->unk_38; tempY2 = part->unk_48; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, tempX, tempY, tempX + 256, tempY + 256); gDPSetTileSize(gMainGfxPos++, 1, tempX2, tempY2, tempX2 + 256, tempY2 + 256); gSPDisplayList(gMainGfxPos++, dlist2); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel test_item_player_collision /* CA20C 80133B0C 27BDFF90 */ addiu $sp, $sp, -0x70 /* CA210 80133B10 AFB30034 */ sw $s3, 0x34($sp) /* CA214 80133B14 0080982D */ daddu $s3, $a0, $zero /* CA218 80133B18 AFB1002C */ sw $s1, 0x2C($sp) /* CA21C 80133B1C 3C118011 */ lui $s1, %hi(gPlayerStatus) /* CA220 80133B20 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* CA224 80133B24 AFB40038 */ sw $s4, 0x38($sp) /* CA228 80133B28 3C148011 */ lui $s4, %hi(gPartnerStatus) /* CA22C 80133B2C 2694EBB0 */ addiu $s4, $s4, %lo(gPartnerStatus) /* CA230 80133B30 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* CA234 80133B34 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* CA238 80133B38 3C04800B */ lui $a0, %hi(gCameras) /* CA23C 80133B3C 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* CA240 80133B40 AFBF003C */ sw $ra, 0x3C($sp) /* CA244 80133B44 AFB20030 */ sw $s2, 0x30($sp) /* CA248 80133B48 AFB00028 */ sw $s0, 0x28($sp) /* CA24C 80133B4C F7BE0068 */ sdc1 $f30, 0x68($sp) /* CA250 80133B50 F7BC0060 */ sdc1 $f28, 0x60($sp) /* CA254 80133B54 F7BA0058 */ sdc1 $f26, 0x58($sp) /* CA258 80133B58 F7B80050 */ sdc1 $f24, 0x50($sp) /* CA25C 80133B5C F7B60048 */ sdc1 $f22, 0x48($sp) /* CA260 80133B60 F7B40040 */ sdc1 $f20, 0x40($sp) /* CA264 80133B64 823200B4 */ lb $s2, 0xB4($s1) /* CA268 80133B68 00031080 */ sll $v0, $v1, 2 /* CA26C 80133B6C 00431021 */ addu $v0, $v0, $v1 /* CA270 80133B70 00021080 */ sll $v0, $v0, 2 /* CA274 80133B74 00431023 */ subu $v0, $v0, $v1 /* CA278 80133B78 000218C0 */ sll $v1, $v0, 3 /* CA27C 80133B7C 00431021 */ addu $v0, $v0, $v1 /* CA280 80133B80 000210C0 */ sll $v0, $v0, 3 /* CA284 80133B84 8E630000 */ lw $v1, 0x0($s3) /* CA288 80133B88 00448021 */ addu $s0, $v0, $a0 /* CA28C 80133B8C 30620100 */ andi $v0, $v1, 0x100 /* CA290 80133B90 10400003 */ beqz $v0, .L80133BA0 /* CA294 80133B94 2402FEFF */ addiu $v0, $zero, -0x101 /* CA298 80133B98 0804CFDA */ j .L80133F68 /* CA29C 80133B9C 00621024 */ and $v0, $v1, $v0 .L80133BA0: /* CA2A0 80133BA0 3C03800A */ lui $v1, %hi(gEncounterState) /* CA2A4 80133BA4 8C63A600 */ lw $v1, %lo(gEncounterState)($v1) /* CA2A8 80133BA8 24020002 */ addiu $v0, $zero, 0x2 /* CA2AC 80133BAC 10620003 */ beq $v1, $v0, .L80133BBC /* CA2B0 80133BB0 00000000 */ nop /* CA2B4 80133BB4 146000F6 */ bnez $v1, .L80133F90 /* CA2B8 80133BB8 0000102D */ daddu $v0, $zero, $zero .L80133BBC: /* CA2BC 80133BBC 3C02800B */ lui $v0, %hi(gCurrentEncounter) /* CA2C0 80133BC0 24420F10 */ addiu $v0, $v0, %lo(gCurrentEncounter) /* CA2C4 80133BC4 80430005 */ lb $v1, 0x5($v0) /* CA2C8 80133BC8 24020005 */ addiu $v0, $zero, 0x5 /* CA2CC 80133BCC 106200EF */ beq $v1, $v0, .L80133F8C /* CA2D0 80133BD0 3C020020 */ lui $v0, (0x200000 >> 16) /* CA2D4 80133BD4 8E630000 */ lw $v1, 0x0($s3) /* CA2D8 80133BD8 00621024 */ and $v0, $v1, $v0 /* CA2DC 80133BDC 144000EC */ bnez $v0, .L80133F90 /* CA2E0 80133BE0 0000102D */ daddu $v0, $zero, $zero /* CA2E4 80133BE4 3C028015 */ lui $v0, %hi(isPickingUpItem) /* CA2E8 80133BE8 844265A4 */ lh $v0, %lo(isPickingUpItem)($v0) /* CA2EC 80133BEC 144000E8 */ bnez $v0, .L80133F90 /* CA2F0 80133BF0 0000102D */ daddu $v0, $zero, $zero /* CA2F4 80133BF4 30620040 */ andi $v0, $v1, 0x40 /* CA2F8 80133BF8 144000E5 */ bnez $v0, .L80133F90 /* CA2FC 80133BFC 0000102D */ daddu $v0, $zero, $zero /* CA300 80133C00 0C009C64 */ jal get_time_freeze_mode /* CA304 80133C04 00000000 */ nop /* CA308 80133C08 144000E1 */ bnez $v0, .L80133F90 /* CA30C 80133C0C 0000102D */ daddu $v0, $zero, $zero /* CA310 80133C10 82820000 */ lb $v0, 0x0($s4) /* CA314 80133C14 10400004 */ beqz $v0, .L80133C28 /* CA318 80133C18 24020009 */ addiu $v0, $zero, 0x9 /* CA31C 80133C1C 82830003 */ lb $v1, 0x3($s4) /* CA320 80133C20 106200DB */ beq $v1, $v0, .L80133F90 /* CA324 80133C24 0000102D */ daddu $v0, $zero, $zero .L80133C28: /* CA328 80133C28 2642FFE3 */ addiu $v0, $s2, -0x1D /* CA32C 80133C2C 2C420003 */ sltiu $v0, $v0, 0x3 /* CA330 80133C30 10400004 */ beqz $v0, .L80133C44 /* CA334 80133C34 24020157 */ addiu $v0, $zero, 0x157 /* CA338 80133C38 86630018 */ lh $v1, 0x18($s3) /* CA33C 80133C3C 146200D4 */ bne $v1, $v0, .L80133F90 /* CA340 80133C40 0000102D */ daddu $v0, $zero, $zero .L80133C44: /* CA344 80133C44 3C02800A */ lui $v0, %hi(gOverrideFlags) /* CA348 80133C48 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) /* CA34C 80133C4C 3C030020 */ lui $v1, (0x200000 >> 16) /* CA350 80133C50 00431024 */ and $v0, $v0, $v1 /* CA354 80133C54 144000CE */ bnez $v0, .L80133F90 /* CA358 80133C58 0000102D */ daddu $v0, $zero, $zero /* CA35C 80133C5C 962300B0 */ lhu $v1, 0xB0($s1) /* CA360 80133C60 862400B2 */ lh $a0, 0xB2($s1) /* CA364 80133C64 00031C00 */ sll $v1, $v1, 16 /* CA368 80133C68 00031403 */ sra $v0, $v1, 16 /* CA36C 80133C6C 00031FC2 */ srl $v1, $v1, 31 /* CA370 80133C70 00431021 */ addu $v0, $v0, $v1 /* CA374 80133C74 00021043 */ sra $v0, $v0, 1 /* CA378 80133C78 44823000 */ mtc1 $v0, $f6 /* CA37C 80133C7C 00000000 */ nop /* CA380 80133C80 468031A0 */ cvt.s.w $f6, $f6 /* CA384 80133C84 E7A6001C */ swc1 $f6, 0x1C($sp) /* CA388 80133C88 C63E0028 */ lwc1 $f30, 0x28($s1) /* CA38C 80133C8C C63A002C */ lwc1 $f26, 0x2C($s1) /* CA390 80133C90 C6280030 */ lwc1 $f8, 0x30($s1) /* CA394 80133C94 0000902D */ daddu $s2, $zero, $zero /* CA398 80133C98 04810002 */ bgez $a0, .L80133CA4 /* CA39C 80133C9C E7A80018 */ swc1 $f8, 0x18($sp) /* CA3A0 80133CA0 24840003 */ addiu $a0, $a0, 0x3 .L80133CA4: /* CA3A4 80133CA4 00041083 */ sra $v0, $a0, 2 /* CA3A8 80133CA8 C62E00A8 */ lwc1 $f14, 0xA8($s1) /* CA3AC 80133CAC 3C014334 */ lui $at, (0x43340000 >> 16) /* CA3B0 80133CB0 44810000 */ mtc1 $at, $f0 /* CA3B4 80133CB4 44823000 */ mtc1 $v0, $f6 /* CA3B8 80133CB8 00000000 */ nop /* CA3BC 80133CBC 468031A0 */ cvt.s.w $f6, $f6 /* CA3C0 80133CC0 4600703C */ c.lt.s $f14, $f0 /* CA3C4 80133CC4 00000000 */ nop /* CA3C8 80133CC8 45000006 */ bc1f .L80133CE4 /* CA3CC 80133CCC E7A60020 */ swc1 $f6, 0x20($sp) /* CA3D0 80133CD0 C600006C */ lwc1 $f0, 0x6C($s0) /* CA3D4 80133CD4 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* CA3D8 80133CD8 44816000 */ mtc1 $at, $f12 /* CA3DC 80133CDC 0804CF3E */ j .L80133CF8 /* CA3E0 80133CE0 460C0301 */ sub.s $f12, $f0, $f12 .L80133CE4: /* CA3E4 80133CE4 C600006C */ lwc1 $f0, 0x6C($s0) /* CA3E8 80133CE8 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* CA3EC 80133CEC 44816000 */ mtc1 $at, $f12 /* CA3F0 80133CF0 00000000 */ nop /* CA3F4 80133CF4 460C0300 */ add.s $f12, $f0, $f12 .L80133CF8: /* CA3F8 80133CF8 0C00A6C9 */ jal clamp_angle /* CA3FC 80133CFC 00000000 */ nop /* CA400 80133D00 46000386 */ mov.s $f14, $f0 /* CA404 80133D04 C60C006C */ lwc1 $f12, 0x6C($s0) /* CA408 80133D08 C7A80018 */ lwc1 $f8, 0x18($sp) /* CA40C 80133D0C E7BE0010 */ swc1 $f30, 0x10($sp) /* CA410 80133D10 0C00A70A */ jal get_clamped_angle_diff /* CA414 80133D14 E7A80014 */ swc1 $f8, 0x14($sp) /* CA418 80133D18 44801000 */ mtc1 $zero, $f2 /* CA41C 80133D1C 00000000 */ nop /* CA420 80133D20 4602003C */ c.lt.s $f0, $f2 /* CA424 80133D24 00000000 */ nop /* CA428 80133D28 4500000F */ bc1f .L80133D68 /* CA42C 80133D2C E7BA0024 */ swc1 $f26, 0x24($sp) /* CA430 80133D30 C600006C */ lwc1 $f0, 0x6C($s0) /* CA434 80133D34 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* CA438 80133D38 44816000 */ mtc1 $at, $f12 /* CA43C 80133D3C 0C00A6C9 */ jal clamp_angle /* CA440 80133D40 460C0301 */ sub.s $f12, $f0, $f12 /* CA444 80133D44 8E2200A4 */ lw $v0, 0xA4($s1) /* CA448 80133D48 3C030100 */ lui $v1, (0x1000000 >> 16) /* CA44C 80133D4C 00431024 */ and $v0, $v0, $v1 /* CA450 80133D50 10400016 */ beqz $v0, .L80133DAC /* CA454 80133D54 27A40010 */ addiu $a0, $sp, 0x10 /* CA458 80133D58 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* CA45C 80133D5C 44816000 */ mtc1 $at, $f12 /* CA460 80133D60 0804CF68 */ j .L80133DA0 /* CA464 80133D64 460C0300 */ add.s $f12, $f0, $f12 .L80133D68: /* CA468 80133D68 C600006C */ lwc1 $f0, 0x6C($s0) /* CA46C 80133D6C 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* CA470 80133D70 44816000 */ mtc1 $at, $f12 /* CA474 80133D74 0C00A6C9 */ jal clamp_angle /* CA478 80133D78 460C0300 */ add.s $f12, $f0, $f12 /* CA47C 80133D7C 8E2200A4 */ lw $v0, 0xA4($s1) /* CA480 80133D80 3C030100 */ lui $v1, (0x1000000 >> 16) /* CA484 80133D84 00431024 */ and $v0, $v0, $v1 /* CA488 80133D88 10400008 */ beqz $v0, .L80133DAC /* CA48C 80133D8C 27A40010 */ addiu $a0, $sp, 0x10 /* CA490 80133D90 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* CA494 80133D94 44816000 */ mtc1 $at, $f12 /* CA498 80133D98 00000000 */ nop /* CA49C 80133D9C 460C0301 */ sub.s $f12, $f0, $f12 .L80133DA0: /* CA4A0 80133DA0 0C00A6C9 */ jal clamp_angle /* CA4A4 80133DA4 00000000 */ nop /* CA4A8 80133DA8 27A40010 */ addiu $a0, $sp, 0x10 .L80133DAC: /* CA4AC 80133DAC 3C0641C0 */ lui $a2, (0x41C00000 >> 16) /* CA4B0 80133DB0 44070000 */ mfc1 $a3, $f0 /* CA4B4 80133DB4 0C00A7E7 */ jal add_vec2D_polar /* CA4B8 80133DB8 27A50014 */ addiu $a1, $sp, 0x14 /* CA4BC 80133DBC C6760008 */ lwc1 $f22, 0x8($s3) /* CA4C0 80133DC0 C674000C */ lwc1 $f20, 0xC($s3) /* CA4C4 80133DC4 C6780010 */ lwc1 $f24, 0x10($s3) /* CA4C8 80133DC8 3C014158 */ lui $at, (0x41580000 >> 16) /* CA4CC 80133DCC 4481E000 */ mtc1 $at, $f28 /* CA4D0 80133DD0 461EB081 */ sub.s $f2, $f22, $f30 /* CA4D4 80133DD4 46021082 */ mul.s $f2, $f2, $f2 /* CA4D8 80133DD8 00000000 */ nop /* CA4DC 80133DDC C7A60018 */ lwc1 $f6, 0x18($sp) /* CA4E0 80133DE0 4606C001 */ sub.s $f0, $f24, $f6 /* CA4E4 80133DE4 46000002 */ mul.s $f0, $f0, $f0 /* CA4E8 80133DE8 00000000 */ nop /* CA4EC 80133DEC 46001300 */ add.s $f12, $f2, $f0 /* CA4F0 80133DF0 46006104 */ sqrt.s $f4, $f12 /* CA4F4 80133DF4 46042032 */ c.eq.s $f4, $f4 /* CA4F8 80133DF8 00000000 */ nop /* CA4FC 80133DFC 45010004 */ bc1t .L80133E10 /* CA500 80133E00 00000000 */ nop /* CA504 80133E04 0C0187BC */ jal sqrtf /* CA508 80133E08 00000000 */ nop /* CA50C 80133E0C 46000106 */ mov.s $f4, $f0 .L80133E10: /* CA510 80133E10 C7A80020 */ lwc1 $f8, 0x20($sp) /* CA514 80133E14 461C4000 */ add.s $f0, $f8, $f28 /* CA518 80133E18 4604003E */ c.le.s $f0, $f4 /* CA51C 80133E1C 00000000 */ nop /* CA520 80133E20 4501000F */ bc1t .L80133E60 /* CA524 80133E24 00000000 */ nop /* CA528 80133E28 3C0141D8 */ lui $at, (0x41D80000 >> 16) /* CA52C 80133E2C 44813000 */ mtc1 $at, $f6 /* CA530 80133E30 00000000 */ nop /* CA534 80133E34 4606A000 */ add.s $f0, $f20, $f6 /* CA538 80133E38 461A003C */ c.lt.s $f0, $f26 /* CA53C 80133E3C 00000000 */ nop /* CA540 80133E40 45010007 */ bc1t .L80133E60 /* CA544 80133E44 00000000 */ nop /* CA548 80133E48 C7A8001C */ lwc1 $f8, 0x1C($sp) /* CA54C 80133E4C 4608D000 */ add.s $f0, $f26, $f8 /* CA550 80133E50 4614003C */ c.lt.s $f0, $f20 /* CA554 80133E54 00000000 */ nop /* CA558 80133E58 45020001 */ bc1fl .L80133E60 /* CA55C 80133E5C 24120001 */ addiu $s2, $zero, 0x1 .L80133E60: /* CA560 80133E60 822300B4 */ lb $v1, 0xB4($s1) /* CA564 80133E64 24020012 */ addiu $v0, $zero, 0x12 /* CA568 80133E68 1462002F */ bne $v1, $v0, .L80133F28 /* CA56C 80133E6C 3C030100 */ lui $v1, (0x1000000 >> 16) /* CA570 80133E70 8E220000 */ lw $v0, 0x0($s1) /* CA574 80133E74 00431024 */ and $v0, $v0, $v1 /* CA578 80133E78 1040002B */ beqz $v0, .L80133F28 /* CA57C 80133E7C 00000000 */ nop /* CA580 80133E80 C7A00010 */ lwc1 $f0, 0x10($sp) /* CA584 80133E84 4600B081 */ sub.s $f2, $f22, $f0 /* CA588 80133E88 46021082 */ mul.s $f2, $f2, $f2 /* CA58C 80133E8C 00000000 */ nop /* CA590 80133E90 C7A00014 */ lwc1 $f0, 0x14($sp) /* CA594 80133E94 4600C001 */ sub.s $f0, $f24, $f0 /* CA598 80133E98 46000002 */ mul.s $f0, $f0, $f0 /* CA59C 80133E9C 00000000 */ nop /* CA5A0 80133EA0 46001300 */ add.s $f12, $f2, $f0 /* CA5A4 80133EA4 46006104 */ sqrt.s $f4, $f12 /* CA5A8 80133EA8 46042032 */ c.eq.s $f4, $f4 /* CA5AC 80133EAC 00000000 */ nop /* CA5B0 80133EB0 45010004 */ bc1t .L80133EC4 /* CA5B4 80133EB4 00000000 */ nop /* CA5B8 80133EB8 0C0187BC */ jal sqrtf /* CA5BC 80133EBC 00000000 */ nop /* CA5C0 80133EC0 46000106 */ mov.s $f4, $f0 .L80133EC4: /* CA5C4 80133EC4 3C014160 */ lui $at, (0x41600000 >> 16) /* CA5C8 80133EC8 44813000 */ mtc1 $at, $f6 /* CA5CC 80133ECC 00000000 */ nop /* CA5D0 80133ED0 461C3000 */ add.s $f0, $f6, $f28 /* CA5D4 80133ED4 4604003E */ c.le.s $f0, $f4 /* CA5D8 80133ED8 00000000 */ nop /* CA5DC 80133EDC 45010012 */ bc1t .L80133F28 /* CA5E0 80133EE0 00000000 */ nop /* CA5E4 80133EE4 3C0141D8 */ lui $at, (0x41D80000 >> 16) /* CA5E8 80133EE8 44814000 */ mtc1 $at, $f8 /* CA5EC 80133EEC 00000000 */ nop /* CA5F0 80133EF0 4608A000 */ add.s $f0, $f20, $f8 /* CA5F4 80133EF4 C7A60024 */ lwc1 $f6, 0x24($sp) /* CA5F8 80133EF8 4606003C */ c.lt.s $f0, $f6 /* CA5FC 80133EFC 00000000 */ nop /* CA600 80133F00 45010009 */ bc1t .L80133F28 /* CA604 80133F04 00000000 */ nop /* CA608 80133F08 3C014190 */ lui $at, (0x41900000 >> 16) /* CA60C 80133F0C 44814000 */ mtc1 $at, $f8 /* CA610 80133F10 00000000 */ nop /* CA614 80133F14 46083000 */ add.s $f0, $f6, $f8 /* CA618 80133F18 4614003C */ c.lt.s $f0, $f20 /* CA61C 80133F1C 00000000 */ nop /* CA620 80133F20 45020001 */ bc1fl .L80133F28 /* CA624 80133F24 24120001 */ addiu $s2, $zero, 0x1 .L80133F28: /* CA628 80133F28 12400012 */ beqz $s2, .L80133F74 /* CA62C 80133F2C 00000000 */ nop /* CA630 80133F30 8E640000 */ lw $a0, 0x0($s3) /* CA634 80133F34 30820080 */ andi $v0, $a0, 0x80 /* CA638 80133F38 10400015 */ beqz $v0, .L80133F90 /* CA63C 80133F3C 24020001 */ addiu $v0, $zero, 0x1 /* CA640 80133F40 3C058015 */ lui $a1, %hi(D_801565A6) /* CA644 80133F44 24A565A6 */ addiu $a1, $a1, %lo(D_801565A6) /* CA648 80133F48 84A20000 */ lh $v0, 0x0($a1) /* CA64C 80133F4C 94A30000 */ lhu $v1, 0x0($a1) /* CA650 80133F50 10400004 */ beqz $v0, .L80133F64 /* CA654 80133F54 2402FF7F */ addiu $v0, $zero, -0x81 /* CA658 80133F58 2462FFFF */ addiu $v0, $v1, -0x1 /* CA65C 80133F5C 0804CFE3 */ j .L80133F8C /* CA660 80133F60 A4A20000 */ sh $v0, 0x0($a1) .L80133F64: /* CA664 80133F64 00821024 */ and $v0, $a0, $v0 .L80133F68: /* CA668 80133F68 AE620000 */ sw $v0, 0x0($s3) /* CA66C 80133F6C 0804CFE4 */ j .L80133F90 /* CA670 80133F70 24020001 */ addiu $v0, $zero, 0x1 .L80133F74: /* CA674 80133F74 8E630000 */ lw $v1, 0x0($s3) /* CA678 80133F78 30620080 */ andi $v0, $v1, 0x80 /* CA67C 80133F7C 10400003 */ beqz $v0, .L80133F8C /* CA680 80133F80 2402FF7F */ addiu $v0, $zero, -0x81 /* CA684 80133F84 00621024 */ and $v0, $v1, $v0 /* CA688 80133F88 AE620000 */ sw $v0, 0x0($s3) .L80133F8C: /* CA68C 80133F8C 0000102D */ daddu $v0, $zero, $zero .L80133F90: /* CA690 80133F90 8FBF003C */ lw $ra, 0x3C($sp) /* CA694 80133F94 8FB40038 */ lw $s4, 0x38($sp) /* CA698 80133F98 8FB30034 */ lw $s3, 0x34($sp) /* CA69C 80133F9C 8FB20030 */ lw $s2, 0x30($sp) /* CA6A0 80133FA0 8FB1002C */ lw $s1, 0x2C($sp) /* CA6A4 80133FA4 8FB00028 */ lw $s0, 0x28($sp) /* CA6A8 80133FA8 D7BE0068 */ ldc1 $f30, 0x68($sp) /* CA6AC 80133FAC D7BC0060 */ ldc1 $f28, 0x60($sp) /* CA6B0 80133FB0 D7BA0058 */ ldc1 $f26, 0x58($sp) /* CA6B4 80133FB4 D7B80050 */ ldc1 $f24, 0x50($sp) /* CA6B8 80133FB8 D7B60048 */ ldc1 $f22, 0x48($sp) /* CA6BC 80133FBC D7B40040 */ ldc1 $f20, 0x40($sp) /* CA6C0 80133FC0 03E00008 */ jr $ra /* CA6C4 80133FC4 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: b32 test_item_player_collision(ItemEntity* item) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerStatus* partnerStatus = &gPartnerStatus; EncounterStatus* encounterStatus = &gCurrentEncounter; Camera* camera = &gCameras[gCurrentCameraID]; s32 actionState = playerStatus->actionState; f32 distThreshold; f32 itemX, itemY, itemZ; f32 tmpX, tmpZ; f32 playerX, playerY, playerZ; f32 colliderHeightHalf; f32 colliderDiameterQuart; f32 spriteFacingAngle; f32 playerY2; f32 xDiff, zDiff; f32 dist; f32 angle; b32 cond; // below weird temps required to match f32 fourteen; f32 yTopThreshold; f32 yBottomThreshold; f32 tmpFourteen; f32 tmpYTopThreshold; if (item->flags & ITEM_ENTITY_FLAG_AUTO_COLLECT) { item->flags &= ~ITEM_ENTITY_FLAG_AUTO_COLLECT; return TRUE; } if (gEncounterState != ENCOUNTER_STATE_NEUTRAL && gEncounterState != ENCOUNTER_STATE_NONE) { return FALSE; } if (encounterStatus->hitType == ENCOUNTER_TRIGGER_CONVERSATION) { return FALSE; } if (item->flags & ITEM_ENTITY_FLAG_CANT_COLLECT) { return FALSE; } tmpFourteen = 14.0f; if (isPickingUpItem) { return FALSE; } fourteen = tmpFourteen; tmpYTopThreshold = 18.0f; yBottomThreshold = 27.0f; cond = item->flags; // required to match if (item->flags & ITEM_ENTITY_FLAG_HIDDEN) { return FALSE; } yTopThreshold = tmpYTopThreshold; if (get_time_freeze_mode() != TIME_FREEZE_NORMAL) { return FALSE; } if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE && partnerStatus->actingPartner == PARTNER_BOW) { return FALSE; } if ( (actionState == ACTION_STATE_USE_SPINNING_FLOWER || actionState == ACTION_STATE_USE_MUNCHLESIA || actionState == ACTION_STATE_USE_TWEESTER) && item->itemID != ITEM_COIN) { return FALSE; } if (gOverrideFlags & GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) { return FALSE; } cond = FALSE; colliderHeightHalf = playerStatus->colliderHeight / 2; playerX = playerStatus->position.x; playerY = playerStatus->position.y; playerZ = playerStatus->position.z; colliderDiameterQuart = playerStatus->colliderDiameter / 4; spriteFacingAngle = playerStatus->spriteFacingAngle; if (spriteFacingAngle < 180.0f) { spriteFacingAngle = clamp_angle(camera->currentYaw - 90.0f); } else { spriteFacingAngle = clamp_angle(camera->currentYaw + 90.0f); } tmpX = playerX; playerY2 = playerY; tmpZ = playerZ; if (get_clamped_angle_diff(camera->currentYaw, spriteFacingAngle) < 0.0f) { angle = clamp_angle(camera->currentYaw - 90.0f); if (playerStatus->trueAnimation & 0x01000000) { angle = clamp_angle(angle + 30.0f); } } else { angle = clamp_angle(camera->currentYaw + 90.0f); if (playerStatus->trueAnimation & 0x01000000) { angle = clamp_angle(angle - 30.0f); } } add_vec2D_polar(&tmpX, &tmpZ, 24.0f, angle); itemX = item->position.x; itemY = item->position.y; itemZ = item->position.z; do { do { distThreshold = 13.5f; } while (0); // required to match xDiff = itemX - playerX; zDiff = itemZ - playerZ; dist = sqrtf(SQ(xDiff) + SQ(zDiff)); if (!(colliderDiameterQuart + distThreshold <= dist) && !(itemY + yBottomThreshold < playerY) && !(playerY + colliderHeightHalf < itemY)) { cond = TRUE; } } while (0); // required to match if (playerStatus->actionState == ACTION_STATE_HAMMER && (playerStatus->flags & PS_FLAG_HAMMER_CHECK)) { xDiff = itemX - tmpX; zDiff = itemZ - tmpZ; dist = sqrtf(SQ(xDiff) + SQ(zDiff)); if (!(fourteen + distThreshold <= dist) && !(itemY + yBottomThreshold < playerY2) && !(playerY2 + yTopThreshold < itemY)) { cond = TRUE; } } if (cond) { if (item->flags & ITEM_ENTITY_FLAG_80) { if (D_801565A6 != 0) { D_801565A6--; return FALSE; } else { item->flags &= ~ITEM_ENTITY_FLAG_80; } } return TRUE; } if (item->flags & ITEM_ENTITY_FLAG_80) { item->flags &= ~ITEM_ENTITY_FLAG_80; } return FALSE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel stars_shimmer_update /* 355384 E0044424 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 355388 E0044428 AFB40020 */ sw $s4, 0x20($sp) /* 35538C E004442C 0080A02D */ daddu $s4, $a0, $zero /* 355390 E0044430 AFBF0034 */ sw $ra, 0x34($sp) /* 355394 E0044434 AFBE0030 */ sw $fp, 0x30($sp) /* 355398 E0044438 AFB7002C */ sw $s7, 0x2C($sp) /* 35539C E004443C AFB60028 */ sw $s6, 0x28($sp) /* 3553A0 E0044440 AFB50024 */ sw $s5, 0x24($sp) /* 3553A4 E0044444 AFB3001C */ sw $s3, 0x1C($sp) /* 3553A8 E0044448 AFB20018 */ sw $s2, 0x18($sp) /* 3553AC E004444C AFB10014 */ sw $s1, 0x14($sp) /* 3553B0 E0044450 AFB00010 */ sw $s0, 0x10($sp) /* 3553B4 E0044454 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 3553B8 E0044458 F7B80048 */ sdc1 $f24, 0x48($sp) /* 3553BC E004445C F7B60040 */ sdc1 $f22, 0x40($sp) /* 3553C0 E0044460 F7B40038 */ sdc1 $f20, 0x38($sp) /* 3553C4 E0044464 8E84000C */ lw $a0, 0xC($s4) /* 3553C8 E0044468 0000A82D */ daddu $s5, $zero, $zero /* 3553CC E004446C 0080B02D */ daddu $s6, $a0, $zero /* 3553D0 E0044470 8C820020 */ lw $v0, 0x20($a0) /* 3553D4 E0044474 8C830024 */ lw $v1, 0x24($a0) /* 3553D8 E0044478 84930002 */ lh $s3, 0x2($a0) /* 3553DC E004447C 24420001 */ addiu $v0, $v0, 0x1 /* 3553E0 E0044480 0040902D */ daddu $s2, $v0, $zero /* 3553E4 E0044484 2463FFFF */ addiu $v1, $v1, -0x1 /* 3553E8 E0044488 2E620002 */ sltiu $v0, $s3, 0x2 /* 3553EC E004448C AC830024 */ sw $v1, 0x24($a0) /* 3553F0 E0044490 14400006 */ bnez $v0, .LE00444AC /* 3553F4 E0044494 AC920020 */ sw $s2, 0x20($a0) /* 3553F8 E0044498 24020003 */ addiu $v0, $zero, 0x3 /* 3553FC E004449C 12620003 */ beq $s3, $v0, .LE00444AC /* 355400 E00444A0 2A62000A */ slti $v0, $s3, 0xA /* 355404 E00444A4 54400004 */ bnel $v0, $zero, .LE00444B8 /* 355408 E00444A8 2484002C */ addiu $a0, $a0, 0x2C .LE00444AC: /* 35540C E00444AC 8C820024 */ lw $v0, 0x24($a0) /* 355410 E00444B0 044000FA */ bltz $v0, .LE004489C /* 355414 E00444B4 2484002C */ addiu $a0, $a0, 0x2C .LE00444B8: /* 355418 E00444B8 8E820008 */ lw $v0, 0x8($s4) /* 35541C E00444BC 2442FFFF */ addiu $v0, $v0, -0x1 /* 355420 E00444C0 184000EA */ blez $v0, .LE004486C /* 355424 E00444C4 0000882D */ daddu $s1, $zero, $zero /* 355428 E00444C8 3C03E004 */ lui $v1, %hi(jtbl_E0044E78) /* 35542C E00444CC 24634E78 */ addiu $v1, $v1, %lo(jtbl_E0044E78) /* 355430 E00444D0 00131080 */ sll $v0, $s3, 2 /* 355434 E00444D4 0043F021 */ addu $fp, $v0, $v1 /* 355438 E00444D8 3C17E004 */ lui $s7, %hi(D_E0044E04) /* 35543C E00444DC 26F74E04 */ addiu $s7, $s7, %lo(D_E0044E04) /* 355440 E00444E0 24900014 */ addiu $s0, $a0, 0x14 /* 355444 E00444E4 3C01E004 */ lui $at, (0xE0044E60 >> 16) /* 355448 E00444E8 D4384E60 */ ldc1 $f24, (0xE0044E60 & 0xFFFF)($at) /* 35544C E00444EC 3C01E004 */ lui $at, (0xE0044E68 >> 16) /* 355450 E00444F0 D43A4E68 */ ldc1 $f26, (0xE0044E68 & 0xFFFF)($at) /* 355454 E00444F4 3C01E004 */ lui $at, (0xE0044E70 >> 16) /* 355458 E00444F8 D4364E70 */ ldc1 $f22, (0xE0044E70 & 0xFFFF)($at) .LE00444FC: /* 35545C E00444FC 2E62001F */ sltiu $v0, $s3, 0x1F /* 355460 E0044500 10400081 */ beqz $v0, .LE0044708 /* 355464 E0044504 02511021 */ addu $v0, $s2, $s1 /* 355468 E0044508 8FC20000 */ lw $v0, 0x0($fp) /* 35546C E004450C 00400008 */ jr $v0 /* 355470 E0044510 00000000 */ nop glabel .LE0044514 /* 355474 E0044514 02511021 */ addu $v0, $s2, $s1 /* 355478 E0044518 30420007 */ andi $v0, $v0, 0x7 /* 35547C E004451C 2643FFFF */ addiu $v1, $s2, -0x1 /* 355480 E0044520 C6000004 */ lwc1 $f0, 0x4($s0) /* 355484 E0044524 3C01E004 */ lui $at, (0xE0044EF8 >> 16) /* 355488 E0044528 D4224EF8 */ ldc1 $f2, (0xE0044EF8 & 0xFFFF)($at) /* 35548C E004452C 46000021 */ cvt.d.s $f0, $f0 /* 355490 E0044530 46220000 */ add.d $f0, $f0, $f2 /* 355494 E0044534 AE020014 */ sw $v0, 0x14($s0) /* 355498 E0044538 2862000E */ slti $v0, $v1, 0xE /* 35549C E004453C 46200020 */ cvt.s.d $f0, $f0 /* 3554A0 E0044540 10400017 */ beqz $v0, .LE00445A0 /* 3554A4 E0044544 E6000004 */ swc1 $f0, 0x4($s0) /* 3554A8 E0044548 3C02E004 */ lui $v0, (0xE0044DF4 >> 16) /* 3554AC E004454C 00431021 */ addu $v0, $v0, $v1 /* 3554B0 E0044550 90424DF4 */ lbu $v0, (0xE0044DF4 & 0xFFFF)($v0) /* 3554B4 E0044554 44820000 */ mtc1 $v0, $f0 /* 3554B8 E0044558 00000000 */ nop /* 3554BC E004455C 46800020 */ cvt.s.w $f0, $f0 /* 3554C0 E0044560 46000021 */ cvt.d.s $f0, $f0 /* 3554C4 E0044564 46380002 */ mul.d $f0, $f0, $f24 /* 3554C8 E0044568 00000000 */ nop /* 3554CC E004456C C604FFFC */ lwc1 $f4, -0x4($s0) /* 3554D0 E0044570 46200020 */ cvt.s.d $f0, $f0 /* 3554D4 E0044574 46002102 */ mul.s $f4, $f4, $f0 /* 3554D8 E0044578 00000000 */ nop /* 3554DC E004457C C6020000 */ lwc1 $f2, 0x0($s0) /* 3554E0 E0044580 46001082 */ mul.s $f2, $f2, $f0 /* 3554E4 E0044584 00000000 */ nop /* 3554E8 E0044588 C6000004 */ lwc1 $f0, 0x4($s0) /* 3554EC E004458C 46001080 */ add.s $f2, $f2, $f0 /* 3554F0 E0044590 00771021 */ addu $v0, $v1, $s7 /* 3554F4 E0044594 E604FFF0 */ swc1 $f4, -0x10($s0) /* 3554F8 E0044598 080111B4 */ j .LE00446D0 /* 3554FC E004459C E602FFF4 */ swc1 $f2, -0xC($s0) .LE00445A0: /* 355500 E00445A0 8E820008 */ lw $v0, 0x8($s4) /* 355504 E00445A4 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 355508 E00445A8 44811000 */ mtc1 $at, $f2 /* 35550C E00445AC 2442FFFF */ addiu $v0, $v0, -0x1 /* 355510 E00445B0 44820000 */ mtc1 $v0, $f0 /* 355514 E00445B4 00000000 */ nop /* 355518 E00445B8 46800020 */ cvt.s.w $f0, $f0 /* 35551C E00445BC 46001083 */ div.s $f2, $f2, $f0 /* 355520 E00445C0 44910000 */ mtc1 $s1, $f0 /* 355524 E00445C4 00000000 */ nop /* 355528 E00445C8 46800020 */ cvt.s.w $f0, $f0 /* 35552C E00445CC 46001082 */ mul.s $f2, $f2, $f0 /* 355530 E00445D0 00000000 */ nop /* 355534 E00445D4 3C014270 */ lui $at, (0x42700000 >> 16) /* 355538 E00445D8 44810000 */ mtc1 $at, $f0 /* 35553C E00445DC 32220001 */ andi $v0, $s1, 0x1 /* 355540 E00445E0 10400005 */ beqz $v0, .LE00445F8 /* 355544 E00445E4 46001500 */ add.s $f20, $f2, $f0 /* 355548 E00445E8 3C0142F0 */ lui $at, (0x42F00000 >> 16) /* 35554C E00445EC 44810000 */ mtc1 $at, $f0 /* 355550 E00445F0 00000000 */ nop /* 355554 E00445F4 4600A501 */ sub.s $f20, $f20, $f0 .LE00445F8: /* 355558 E00445F8 4600A306 */ mov.s $f12, $f20 /* 35555C E00445FC 2402000A */ addiu $v0, $zero, 0xA /* 355560 E0044600 0C080140 */ jal shim_sin_deg /* 355564 E0044604 A6C20002 */ sh $v0, 0x2($s6) /* 355568 E0044608 4600A306 */ mov.s $f12, $f20 /* 35556C E004460C 0C080144 */ jal shim_cos_deg /* 355570 E0044610 E600FFFC */ swc1 $f0, -0x4($s0) /* 355574 E0044614 3C01BD4C */ lui $at, (0xBD4CCCCD >> 16) /* 355578 E0044618 3421CCCD */ ori $at, $at, (0xBD4CCCCD & 0xFFFF) /* 35557C E004461C 44811000 */ mtc1 $at, $f2 /* 355580 E0044620 E6000000 */ swc1 $f0, 0x0($s0) /* 355584 E0044624 08011215 */ j .LE0044854 /* 355588 E0044628 E6020004 */ swc1 $f2, 0x4($s0) glabel .LE004462C /* 35558C E004462C C6020000 */ lwc1 $f2, 0x0($s0) /* 355590 E0044630 460010A1 */ cvt.d.s $f2, $f2 /* 355594 E0044634 463A1082 */ mul.d $f2, $f2, $f26 /* 355598 E0044638 00000000 */ nop /* 35559C E004463C C600FFFC */ lwc1 $f0, -0x4($s0) /* 3555A0 E0044640 46000021 */ cvt.d.s $f0, $f0 /* 3555A4 E0044644 463A0002 */ mul.d $f0, $f0, $f26 /* 3555A8 E0044648 00000000 */ nop /* 3555AC E004464C C6040008 */ lwc1 $f4, 0x8($s0) /* 3555B0 E0044650 46002121 */ cvt.d.s $f4, $f4 /* 3555B4 E0044654 4624B181 */ sub.d $f6, $f22, $f4 /* 3555B8 E0044658 46363182 */ mul.d $f6, $f6, $f22 /* 3555BC E004465C 00000000 */ nop /* 3555C0 E0044660 02511021 */ addu $v0, $s2, $s1 /* 3555C4 E0044664 30420007 */ andi $v0, $v0, 0x7 /* 3555C8 E0044668 C6080004 */ lwc1 $f8, 0x4($s0) /* 3555CC E004466C 462010A0 */ cvt.s.d $f2, $f2 /* 3555D0 E0044670 E6020000 */ swc1 $f2, 0x0($s0) /* 3555D4 E0044674 46081200 */ add.s $f8, $f2, $f8 /* 3555D8 E0044678 C602FFF0 */ lwc1 $f2, -0x10($s0) /* 3555DC E004467C 46200020 */ cvt.s.d $f0, $f0 /* 3555E0 E0044680 46001080 */ add.s $f2, $f2, $f0 /* 3555E4 E0044684 E600FFFC */ swc1 $f0, -0x4($s0) /* 3555E8 E0044688 C600FFF4 */ lwc1 $f0, -0xC($s0) /* 3555EC E004468C 46262100 */ add.d $f4, $f4, $f6 /* 3555F0 E0044690 AE020014 */ sw $v0, 0x14($s0) /* 3555F4 E0044694 E6080000 */ swc1 $f8, 0x0($s0) /* 3555F8 E0044698 46080000 */ add.s $f0, $f0, $f8 /* 3555FC E004469C E602FFF0 */ swc1 $f2, -0x10($s0) /* 355600 E00446A0 46202120 */ cvt.s.d $f4, $f4 /* 355604 E00446A4 E6040008 */ swc1 $f4, 0x8($s0) /* 355608 E00446A8 08011215 */ j .LE0044854 /* 35560C E00446AC E600FFF4 */ swc1 $f0, -0xC($s0) glabel .LE00446B0 /* 355610 E00446B0 02511021 */ addu $v0, $s2, $s1 /* 355614 E00446B4 00511021 */ addu $v0, $v0, $s1 /* 355618 E00446B8 30420007 */ andi $v0, $v0, 0x7 /* 35561C E00446BC AE020014 */ sw $v0, 0x14($s0) /* 355620 E00446C0 2643FFFF */ addiu $v1, $s2, -0x1 /* 355624 E00446C4 2862000E */ slti $v0, $v1, 0xE /* 355628 E00446C8 1040000B */ beqz $v0, .LE00446F8 /* 35562C E00446CC 00771021 */ addu $v0, $v1, $s7 .LE00446D0: /* 355630 E00446D0 90420000 */ lbu $v0, 0x0($v0) /* 355634 E00446D4 44820000 */ mtc1 $v0, $f0 /* 355638 E00446D8 00000000 */ nop /* 35563C E00446DC 46800020 */ cvt.s.w $f0, $f0 /* 355640 E00446E0 46000021 */ cvt.d.s $f0, $f0 /* 355644 E00446E4 46380002 */ mul.d $f0, $f0, $f24 /* 355648 E00446E8 00000000 */ nop /* 35564C E00446EC 46200020 */ cvt.s.d $f0, $f0 /* 355650 E00446F0 08011215 */ j .LE0044854 /* 355654 E00446F4 E6000008 */ swc1 $f0, 0x8($s0) .LE00446F8: /* 355658 E00446F8 2402001E */ addiu $v0, $zero, 0x1E /* 35565C E00446FC 08011215 */ j .LE0044854 /* 355660 E0044700 A6C20002 */ sh $v0, 0x2($s6) glabel .LE0044704 /* 355664 E0044704 02511021 */ addu $v0, $s2, $s1 .LE0044708: /* 355668 E0044708 00511021 */ addu $v0, $v0, $s1 /* 35566C E004470C 8E030010 */ lw $v1, 0x10($s0) /* 355670 E0044710 30420007 */ andi $v0, $v0, 0x7 /* 355674 E0044714 04610002 */ bgez $v1, .LE0044720 /* 355678 E0044718 AE020014 */ sw $v0, 0x14($s0) /* 35567C E004471C 26B50001 */ addiu $s5, $s5, 0x1 .LE0044720: /* 355680 E0044720 2462FFFF */ addiu $v0, $v1, -0x1 /* 355684 E0044724 AE020010 */ sw $v0, 0x10($s0) /* 355688 E0044728 2C42001F */ sltiu $v0, $v0, 0x1F /* 35568C E004472C 14400003 */ bnez $v0, .LE004473C /* 355690 E0044730 2402FFFF */ addiu $v0, $zero, -0x1 /* 355694 E0044734 08011215 */ j .LE0044854 /* 355698 E0044738 AE020014 */ sw $v0, 0x14($s0) .LE004473C: /* 35569C E004473C 8E03000C */ lw $v1, 0xC($s0) /* 3556A0 E0044740 24620001 */ addiu $v0, $v1, 0x1 /* 3556A4 E0044744 0040902D */ daddu $s2, $v0, $zero /* 3556A8 E0044748 2862000E */ slti $v0, $v1, 0xE /* 3556AC E004474C 10400015 */ beqz $v0, .LE00447A4 /* 3556B0 E0044750 AE12000C */ sw $s2, 0xC($s0) /* 3556B4 E0044754 00771021 */ addu $v0, $v1, $s7 /* 3556B8 E0044758 90420000 */ lbu $v0, 0x0($v0) /* 3556BC E004475C 44820000 */ mtc1 $v0, $f0 /* 3556C0 E0044760 00000000 */ nop /* 3556C4 E0044764 46800020 */ cvt.s.w $f0, $f0 /* 3556C8 E0044768 46000021 */ cvt.d.s $f0, $f0 /* 3556CC E004476C 46380002 */ mul.d $f0, $f0, $f24 /* 3556D0 E0044770 00000000 */ nop /* 3556D4 E0044774 24020005 */ addiu $v0, $zero, 0x5 /* 3556D8 E0044778 46200020 */ cvt.s.d $f0, $f0 /* 3556DC E004477C 16620018 */ bne $s3, $v0, .LE00447E0 /* 3556E0 E0044780 E6000008 */ swc1 $f0, 0x8($s0) /* 3556E4 E0044784 C6000000 */ lwc1 $f0, 0x0($s0) /* 3556E8 E0044788 C6020004 */ lwc1 $f2, 0x4($s0) /* 3556EC E004478C 46020000 */ add.s $f0, $f0, $f2 /* 3556F0 E0044790 C602FFF4 */ lwc1 $f2, -0xC($s0) /* 3556F4 E0044794 46001080 */ add.s $f2, $f2, $f0 /* 3556F8 E0044798 E6000000 */ swc1 $f0, 0x0($s0) /* 3556FC E004479C 080111F8 */ j .LE00447E0 /* 355700 E00447A0 E602FFF4 */ swc1 $f2, -0xC($s0) .LE00447A4: /* 355704 E00447A4 C6000008 */ lwc1 $f0, 0x8($s0) /* 355708 E00447A8 46000021 */ cvt.d.s $f0, $f0 /* 35570C E00447AC 4620B101 */ sub.d $f4, $f22, $f0 /* 355710 E00447B0 46362102 */ mul.d $f4, $f4, $f22 /* 355714 E00447B4 00000000 */ nop /* 355718 E00447B8 C6060000 */ lwc1 $f6, 0x0($s0) /* 35571C E00447BC C6020004 */ lwc1 $f2, 0x4($s0) /* 355720 E00447C0 46023180 */ add.s $f6, $f6, $f2 /* 355724 E00447C4 C602FFF4 */ lwc1 $f2, -0xC($s0) /* 355728 E00447C8 46061080 */ add.s $f2, $f2, $f6 /* 35572C E00447CC 46240000 */ add.d $f0, $f0, $f4 /* 355730 E00447D0 E6060000 */ swc1 $f6, 0x0($s0) /* 355734 E00447D4 E602FFF4 */ swc1 $f2, -0xC($s0) /* 355738 E00447D8 46200020 */ cvt.s.d $f0, $f0 /* 35573C E00447DC E6000008 */ swc1 $f0, 0x8($s0) .LE00447E0: /* 355740 E00447E0 24020004 */ addiu $v0, $zero, 0x4 /* 355744 E00447E4 16620013 */ bne $s3, $v0, .LE0044834 /* 355748 E00447E8 00121040 */ sll $v0, $s2, 1 /* 35574C E00447EC 00521021 */ addu $v0, $v0, $s2 /* 355750 E00447F0 00021080 */ sll $v0, $v0, 2 /* 355754 E00447F4 4482A000 */ mtc1 $v0, $f20 /* 355758 E00447F8 00000000 */ nop /* 35575C E00447FC 4680A520 */ cvt.s.w $f20, $f20 /* 355760 E0044800 0C080140 */ jal shim_sin_deg /* 355764 E0044804 4600A306 */ mov.s $f12, $f20 /* 355768 E0044808 C602FFFC */ lwc1 $f2, -0x4($s0) /* 35576C E004480C 46001082 */ mul.s $f2, $f2, $f0 /* 355770 E0044810 00000000 */ nop /* 355774 E0044814 4600A306 */ mov.s $f12, $f20 /* 355778 E0044818 0C080144 */ jal shim_cos_deg /* 35577C E004481C E602FFF0 */ swc1 $f2, -0x10($s0) /* 355780 E0044820 C602FFFC */ lwc1 $f2, -0x4($s0) /* 355784 E0044824 46001082 */ mul.s $f2, $f2, $f0 /* 355788 E0044828 00000000 */ nop /* 35578C E004482C 0801120F */ j .LE004483C /* 355790 E0044830 E602FFF8 */ swc1 $f2, -0x8($s0) .LE0044834: /* 355794 E0044834 C600FFFC */ lwc1 $f0, -0x4($s0) /* 355798 E0044838 E600FFF0 */ swc1 $f0, -0x10($s0) .LE004483C: /* 35579C E004483C C6000000 */ lwc1 $f0, 0x0($s0) /* 3557A0 E0044840 46000021 */ cvt.d.s $f0, $f0 /* 3557A4 E0044844 463A0002 */ mul.d $f0, $f0, $f26 /* 3557A8 E0044848 00000000 */ nop /* 3557AC E004484C 46200020 */ cvt.s.d $f0, $f0 /* 3557B0 E0044850 E6000000 */ swc1 $f0, 0x0($s0) .LE0044854: /* 3557B4 E0044854 26310001 */ addiu $s1, $s1, 0x1 /* 3557B8 E0044858 8E820008 */ lw $v0, 0x8($s4) /* 3557BC E004485C 2442FFFF */ addiu $v0, $v0, -0x1 /* 3557C0 E0044860 0222102A */ slt $v0, $s1, $v0 /* 3557C4 E0044864 1440FF25 */ bnez $v0, .LE00444FC /* 3557C8 E0044868 2610002C */ addiu $s0, $s0, 0x2C .LE004486C: /* 3557CC E004486C 2E620002 */ sltiu $v0, $s3, 0x2 /* 3557D0 E0044870 1440000C */ bnez $v0, .LE00448A4 /* 3557D4 E0044874 24020003 */ addiu $v0, $zero, 0x3 /* 3557D8 E0044878 1262000A */ beq $s3, $v0, .LE00448A4 /* 3557DC E004487C 2A62000A */ slti $v0, $s3, 0xA /* 3557E0 E0044880 10400008 */ beqz $v0, .LE00448A4 /* 3557E4 E0044884 00000000 */ nop /* 3557E8 E0044888 8E820008 */ lw $v0, 0x8($s4) /* 3557EC E004488C 2442FFFF */ addiu $v0, $v0, -0x1 /* 3557F0 E0044890 02A2102A */ slt $v0, $s5, $v0 /* 3557F4 E0044894 14400003 */ bnez $v0, .LE00448A4 /* 3557F8 E0044898 00000000 */ nop .LE004489C: /* 3557FC E004489C 0C080128 */ jal shim_remove_effect /* 355800 E00448A0 0280202D */ daddu $a0, $s4, $zero .LE00448A4: /* 355804 E00448A4 8FBF0034 */ lw $ra, 0x34($sp) /* 355808 E00448A8 8FBE0030 */ lw $fp, 0x30($sp) /* 35580C E00448AC 8FB7002C */ lw $s7, 0x2C($sp) /* 355810 E00448B0 8FB60028 */ lw $s6, 0x28($sp) /* 355814 E00448B4 8FB50024 */ lw $s5, 0x24($sp) /* 355818 E00448B8 8FB40020 */ lw $s4, 0x20($sp) /* 35581C E00448BC 8FB3001C */ lw $s3, 0x1C($sp) /* 355820 E00448C0 8FB20018 */ lw $s2, 0x18($sp) /* 355824 E00448C4 8FB10014 */ lw $s1, 0x14($sp) /* 355828 E00448C8 8FB00010 */ lw $s0, 0x10($sp) /* 35582C E00448CC D7BA0050 */ ldc1 $f26, 0x50($sp) /* 355830 E00448D0 D7B80048 */ ldc1 $f24, 0x48($sp) /* 355834 E00448D4 D7B60040 */ ldc1 $f22, 0x40($sp) /* 355838 E00448D8 D7B40038 */ ldc1 $f20, 0x38($sp) /* 35583C E00448DC 03E00008 */ jr $ra /* 355840 E00448E0 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void stars_shimmer_update(EffectInstance* effect) { StarsShimmerFXData* data = effect->data.starsShimmer; StarsShimmerFXData* it = data; s32 deadParts = 0; s32 state = it->state; s32 lifeTime; s32 i; it->timeLeft--; it->lifeTime++; lifeTime = it->lifeTime; if (state == 0 || state == 1 || state == 3 || state >= 10) { if (it->timeLeft < 0) { shim_remove_effect(effect); return; } } it++; for (i = 0; i < effect->numParts - 1; i++, it++) { switch (state) { case 0: case 1: it->unk_28 = (lifeTime + i) & 7; it->unk_18 += -0.02; if (lifeTime - 1 < 14) { f32 temp_f0 = (f32) D_E0044DF4[lifeTime - 1] * 0.01; it->pos.x = it->unk_10 * temp_f0; it->pos.y = (it->unk_14 * temp_f0) + it->unk_18; it->unk_1C = (f32) D_E0044E04[lifeTime - 1] * 0.01; } else { f32 var_f20 = ((360.0f / (effect->numParts - 1)) * i) + 60.0f; if (i % 2 != 0) { var_f20 -= 120.0f; } data->state = 10; it->unk_10 = shim_sin_deg(var_f20); it->unk_14 = shim_cos_deg(var_f20); it->unk_18 = -0.05f; } break; case 10: case 30: it->unk_28 = (lifeTime + i) & 7; it->unk_10 *= 0.96; it->unk_14 *= 0.96; it->unk_14 += it->unk_18; it->unk_1C += (0.1 - it->unk_1C) * 0.1; it->pos.x += it->unk_10; it->pos.y += it->unk_14; break; case 3: it->unk_28 = (lifeTime + i + i) & 7; if (lifeTime - 1 < 14) { it->unk_1C = (f32) D_E0044E04[lifeTime - 1] * 0.01; break; } data->state = 30; break; case 2: case 4: case 5: case 6: case 7: case 8: case 9: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: default: it->unk_28 = (lifeTime + i + i) & 7; if (it->timeLeft < 0) { deadParts++; } it->timeLeft--; if ((u32) it->timeLeft > 30) { it->unk_28 = -1; } else { it->lifeTime++; lifeTime = it->lifeTime; if (lifeTime - 1 < 14) { it->unk_1C = (f32) D_E0044E04[lifeTime - 1] * 0.01; if (state == 5) { it->unk_14 += it->unk_18; it->pos.y += it->unk_14; } } else { it->unk_14 += it->unk_18; it->pos.y += it->unk_14; it->unk_1C += (0.1 - it->unk_1C) * 0.1; } if (state == 4) { it->pos.x = (it->unk_10 * shim_sin_deg(lifeTime * 12)); it->pos.z = (it->unk_10 * shim_cos_deg(lifeTime * 12)); } else { it->pos.x = it->unk_10; } it->unk_14 *= 0.96; } } } if (state != 0 && state != 1 && state != 3 && state < 10 && deadParts >= effect->numParts - 1) { shim_remove_effect(effect); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel radial_shimmer_appendGfx /* 3667A0 E0066770 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 3667A4 E0066774 AFB700C4 */ sw $s7, 0xC4($sp) /* 3667A8 E0066778 0080B82D */ daddu $s7, $a0, $zero /* 3667AC E006677C 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3667B0 E0066780 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3667B4 E0066784 27A40020 */ addiu $a0, $sp, 0x20 /* 3667B8 E0066788 AFB200B0 */ sw $s2, 0xB0($sp) /* 3667BC E006678C 3C120001 */ lui $s2, (0x11630 >> 16) /* 3667C0 E0066790 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3667C4 E0066794 AFB600C0 */ sw $s6, 0xC0($sp) /* 3667C8 E0066798 3C16800A */ lui $s6, %hi(gMainGfxPos) /* 3667CC E006679C 26D6A66C */ addiu $s6, $s6, %lo(gMainGfxPos) /* 3667D0 E00667A0 AFBF00CC */ sw $ra, 0xCC($sp) /* 3667D4 E00667A4 AFBE00C8 */ sw $fp, 0xC8($sp) /* 3667D8 E00667A8 AFB500BC */ sw $s5, 0xBC($sp) /* 3667DC E00667AC AFB400B8 */ sw $s4, 0xB8($sp) /* 3667E0 E00667B0 AFB300B4 */ sw $s3, 0xB4($sp) /* 3667E4 E00667B4 AFB100AC */ sw $s1, 0xAC($sp) /* 3667E8 E00667B8 AFB000A8 */ sw $s0, 0xA8($sp) /* 3667EC E00667BC F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 3667F0 E00667C0 8EC50000 */ lw $a1, 0x0($s6) /* 3667F4 E00667C4 8EF4000C */ lw $s4, 0xC($s7) /* 3667F8 E00667C8 00A0182D */ daddu $v1, $a1, $zero /* 3667FC E00667CC 8E950000 */ lw $s5, 0x0($s4) /* 366800 E00667D0 24A50008 */ addiu $a1, $a1, 0x8 /* 366804 E00667D4 AEC50000 */ sw $a1, 0x0($s6) /* 366808 E00667D8 00151080 */ sll $v0, $s5, 2 /* 36680C E00667DC 3C13E006 */ lui $s3, (0xE0066C8C >> 16) /* 366810 E00667E0 02629821 */ addu $s3, $s3, $v0 /* 366814 E00667E4 8E736C8C */ lw $s3, (0xE0066C8C & 0xFFFF)($s3) /* 366818 E00667E8 3C1EE006 */ lui $fp, (0xE0066C50 >> 16) /* 36681C E00667EC 03C2F021 */ addu $fp, $fp, $v0 /* 366820 E00667F0 8FDE6C50 */ lw $fp, (0xE0066C50 & 0xFFFF)($fp) /* 366824 E00667F4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 366828 E00667F8 AC620000 */ sw $v0, 0x0($v1) /* 36682C E00667FC AC600004 */ sw $zero, 0x4($v1) /* 366830 E0066800 ACA60000 */ sw $a2, 0x0($a1) /* 366834 E0066804 8EE30010 */ lw $v1, 0x10($s7) /* 366838 E0066808 24A20008 */ addiu $v0, $a1, 0x8 /* 36683C E006680C AEC20000 */ sw $v0, 0x0($s6) /* 366840 E0066810 8C62001C */ lw $v0, 0x1C($v1) /* 366844 E0066814 3C038000 */ lui $v1, (0x80000000 >> 16) /* 366848 E0066818 00431021 */ addu $v0, $v0, $v1 /* 36684C E006681C 3C03800B */ lui $v1, %hi(gCameras) /* 366850 E0066820 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 366854 E0066824 ACA20004 */ sw $v0, 0x4($a1) /* 366858 E0066828 8E850010 */ lw $a1, 0x10($s4) /* 36685C E006682C 8E860014 */ lw $a2, 0x14($s4) /* 366860 E0066830 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 366864 E0066834 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 366868 E0066838 8E870018 */ lw $a3, 0x18($s4) /* 36686C E006683C 00028080 */ sll $s0, $v0, 2 /* 366870 E0066840 02028021 */ addu $s0, $s0, $v0 /* 366874 E0066844 00108080 */ sll $s0, $s0, 2 /* 366878 E0066848 02028023 */ subu $s0, $s0, $v0 /* 36687C E006684C 001010C0 */ sll $v0, $s0, 3 /* 366880 E0066850 02028021 */ addu $s0, $s0, $v0 /* 366884 E0066854 001080C0 */ sll $s0, $s0, 3 /* 366888 E0066858 0C080108 */ jal shim_guTranslateF /* 36688C E006685C 02038021 */ addu $s0, $s0, $v1 /* 366890 E0066860 27B10060 */ addiu $s1, $sp, 0x60 /* 366894 E0066864 0220202D */ daddu $a0, $s1, $zero /* 366898 E0066868 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 36689C E006686C 4481A000 */ mtc1 $at, $f20 /* 3668A0 E0066870 8E85001C */ lw $a1, 0x1C($s4) /* 3668A4 E0066874 4407A000 */ mfc1 $a3, $f20 /* 3668A8 E0066878 0C080110 */ jal shim_guScaleF /* 3668AC E006687C 00A0302D */ daddu $a2, $a1, $zero /* 3668B0 E0066880 0220202D */ daddu $a0, $s1, $zero /* 3668B4 E0066884 27A50020 */ addiu $a1, $sp, 0x20 /* 3668B8 E0066888 0C080114 */ jal shim_guMtxCatF /* 3668BC E006688C 00A0302D */ daddu $a2, $a1, $zero /* 3668C0 E0066890 8602000A */ lh $v0, 0xA($s0) /* 3668C4 E0066894 8603000C */ lh $v1, 0xC($s0) /* 3668C8 E0066898 3C014080 */ lui $at, (0x40800000 >> 16) /* 3668CC E006689C 44810000 */ mtc1 $at, $f0 /* 3668D0 E00668A0 3C014680 */ lui $at, (0x46800000 >> 16) /* 3668D4 E00668A4 44811000 */ mtc1 $at, $f2 /* 3668D8 E00668A8 0220202D */ daddu $a0, $s1, $zero /* 3668DC E00668AC E7B40018 */ swc1 $f20, 0x18($sp) /* 3668E0 E00668B0 E7A20014 */ swc1 $f2, 0x14($sp) /* 3668E4 E00668B4 44821000 */ mtc1 $v0, $f2 /* 3668E8 E00668B8 00000000 */ nop /* 3668EC E00668BC 468010A0 */ cvt.s.w $f2, $f2 /* 3668F0 E00668C0 E7A00010 */ swc1 $f0, 0x10($sp) /* 3668F4 E00668C4 44830000 */ mtc1 $v1, $f0 /* 3668F8 E00668C8 00000000 */ nop /* 3668FC E00668CC 46800020 */ cvt.s.w $f0, $f0 /* 366900 E00668D0 46001083 */ div.s $f2, $f2, $f0 /* 366904 E00668D4 8E860060 */ lw $a2, 0x60($s4) /* 366908 E00668D8 44071000 */ mfc1 $a3, $f2 /* 36690C E00668DC 0C080160 */ jal shim_guPerspectiveF /* 366910 E00668E0 27A500A0 */ addiu $a1, $sp, 0xA0 /* 366914 E00668E4 0220202D */ daddu $a0, $s1, $zero /* 366918 E00668E8 27A50020 */ addiu $a1, $sp, 0x20 /* 36691C E00668EC 0C080114 */ jal shim_guMtxCatF /* 366920 E00668F0 00A0302D */ daddu $a2, $a1, $zero /* 366924 E00668F4 27A40020 */ addiu $a0, $sp, 0x20 /* 366928 E00668F8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 36692C E00668FC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 366930 E0066900 3C11800A */ lui $s1, %hi(gDisplayContext) /* 366934 E0066904 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 366938 E0066908 96050000 */ lhu $a1, 0x0($s0) /* 36693C E006690C 8E220000 */ lw $v0, 0x0($s1) /* 366940 E0066910 00052980 */ sll $a1, $a1, 6 /* 366944 E0066914 00B22821 */ addu $a1, $a1, $s2 /* 366948 E0066918 0C080118 */ jal shim_guMtxF2L /* 36694C E006691C 00452821 */ addu $a1, $v0, $a1 /* 366950 E0066920 3C02DA38 */ lui $v0, (0xDA380007 >> 16) /* 366954 E0066924 34420007 */ ori $v0, $v0, (0xDA380007 & 0xFFFF) /* 366958 E0066928 27A40020 */ addiu $a0, $sp, 0x20 /* 36695C E006692C 44800000 */ mtc1 $zero, $f0 /* 366960 E0066930 8EC90000 */ lw $t1, 0x0($s6) /* 366964 E0066934 96080000 */ lhu $t0, 0x0($s0) /* 366968 E0066938 0120382D */ daddu $a3, $t1, $zero /* 36696C E006693C ACE20000 */ sw $v0, 0x0($a3) /* 366970 E0066940 3102FFFF */ andi $v0, $t0, 0xFFFF /* 366974 E0066944 00021180 */ sll $v0, $v0, 6 /* 366978 E0066948 00521021 */ addu $v0, $v0, $s2 /* 36697C E006694C 25290008 */ addiu $t1, $t1, 0x8 /* 366980 E0066950 25080001 */ addiu $t0, $t0, 0x1 /* 366984 E0066954 8E230000 */ lw $v1, 0x0($s1) /* 366988 E0066958 44050000 */ mfc1 $a1, $f0 /* 36698C E006695C 00621821 */ addu $v1, $v1, $v0 /* 366990 E0066960 ACE30004 */ sw $v1, 0x4($a3) /* 366994 E0066964 8E870064 */ lw $a3, 0x64($s4) /* 366998 E0066968 00A0302D */ daddu $a2, $a1, $zero /* 36699C E006696C AEC90000 */ sw $t1, 0x0($s6) /* 3669A0 E0066970 0C080108 */ jal shim_guTranslateF /* 3669A4 E0066974 A6080000 */ sh $t0, 0x0($s0) /* 3669A8 E0066978 27A40020 */ addiu $a0, $sp, 0x20 /* 3669AC E006697C 96050000 */ lhu $a1, 0x0($s0) /* 3669B0 E0066980 8E220000 */ lw $v0, 0x0($s1) /* 3669B4 E0066984 00052980 */ sll $a1, $a1, 6 /* 3669B8 E0066988 00B22821 */ addu $a1, $a1, $s2 /* 3669BC E006698C 0C080118 */ jal shim_guMtxF2L /* 3669C0 E0066990 00452821 */ addu $a1, $v0, $a1 /* 3669C4 E0066994 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3669C8 E0066998 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3669CC E006699C 0000602D */ daddu $t4, $zero, $zero /* 3669D0 E00669A0 8EC50000 */ lw $a1, 0x0($s6) /* 3669D4 E00669A4 96020000 */ lhu $v0, 0x0($s0) /* 3669D8 E00669A8 00A0202D */ daddu $a0, $a1, $zero /* 3669DC E00669AC 24A50008 */ addiu $a1, $a1, 0x8 /* 3669E0 E00669B0 AEC50000 */ sw $a1, 0x0($s6) /* 3669E4 E00669B4 AC830000 */ sw $v1, 0x0($a0) /* 3669E8 E00669B8 24430001 */ addiu $v1, $v0, 0x1 /* 3669EC E00669BC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3669F0 E00669C0 00021180 */ sll $v0, $v0, 6 /* 3669F4 E00669C4 A6030000 */ sh $v1, 0x0($s0) /* 3669F8 E00669C8 8E230000 */ lw $v1, 0x0($s1) /* 3669FC E00669CC 00521021 */ addu $v0, $v0, $s2 /* 366A00 E00669D0 00621821 */ addu $v1, $v1, $v0 /* 366A04 E00669D4 24A20008 */ addiu $v0, $a1, 0x8 /* 366A08 E00669D8 AC830004 */ sw $v1, 0x4($a0) /* 366A0C E00669DC AEC20000 */ sw $v0, 0x0($s6) /* 366A10 E00669E0 8E870024 */ lw $a3, 0x24($s4) /* 366A14 E00669E4 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 366A18 E00669E8 ACA20000 */ sw $v0, 0x0($a1) /* 366A1C E00669EC 9282006B */ lbu $v0, 0x6B($s4) /* 366A20 E00669F0 9284006C */ lbu $a0, 0x6C($s4) /* 366A24 E00669F4 9286006D */ lbu $a2, 0x6D($s4) /* 366A28 E00669F8 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 366A2C E00669FC ACA30008 */ sw $v1, 0x8($a1) /* 366A30 E0066A00 ACB3000C */ sw $s3, 0xC($a1) /* 366A34 E0066A04 00021600 */ sll $v0, $v0, 24 /* 366A38 E0066A08 00042400 */ sll $a0, $a0, 16 /* 366A3C E0066A0C 00441025 */ or $v0, $v0, $a0 /* 366A40 E0066A10 00063200 */ sll $a2, $a2, 8 /* 366A44 E0066A14 00461025 */ or $v0, $v0, $a2 /* 366A48 E0066A18 3442007F */ ori $v0, $v0, 0x7F /* 366A4C E0066A1C ACA20004 */ sw $v0, 0x4($a1) /* 366A50 E0066A20 8EE20008 */ lw $v0, 0x8($s7) /* 366A54 E0066A24 24A50010 */ addiu $a1, $a1, 0x10 /* 366A58 E0066A28 1840005E */ blez $v0, .LE0066BA4 /* 366A5C E0066A2C AEC50000 */ sw $a1, 0x0($s6) /* 366A60 E0066A30 02C0582D */ daddu $t3, $s6, $zero /* 366A64 E0066A34 3C16FA00 */ lui $s6, (0xFA000000 >> 16) /* 366A68 E0066A38 30F000FF */ andi $s0, $a3, 0xFF /* 366A6C E0066A3C 24130008 */ addiu $s3, $zero, 0x8 /* 366A70 E0066A40 2AAF0009 */ slti $t7, $s5, 0x9 /* 366A74 E0066A44 2412000B */ addiu $s2, $zero, 0xB /* 366A78 E0066A48 2AAE0002 */ slti $t6, $s5, 0x2 /* 366A7C E0066A4C 3C0DF200 */ lui $t5, (0xF2000000 >> 16) /* 366A80 E0066A50 3C110100 */ lui $s1, (0x1000000 >> 16) /* 366A84 E0066A54 268A0048 */ addiu $t2, $s4, 0x48 .LE0066A58: /* 366A88 E0066A58 8D620000 */ lw $v0, 0x0($t3) /* 366A8C E0066A5C 0040282D */ daddu $a1, $v0, $zero /* 366A90 E0066A60 24420008 */ addiu $v0, $v0, 0x8 /* 366A94 E0066A64 AD620000 */ sw $v0, 0x0($t3) /* 366A98 E0066A68 ACB60000 */ sw $s6, 0x0($a1) /* 366A9C E0066A6C 91420020 */ lbu $v0, 0x20($t2) /* 366AA0 E0066A70 91440021 */ lbu $a0, 0x21($t2) /* 366AA4 E0066A74 91430022 */ lbu $v1, 0x22($t2) /* 366AA8 E0066A78 00021600 */ sll $v0, $v0, 24 /* 366AAC E0066A7C 00042400 */ sll $a0, $a0, 16 /* 366AB0 E0066A80 00441025 */ or $v0, $v0, $a0 /* 366AB4 E0066A84 00031A00 */ sll $v1, $v1, 8 /* 366AB8 E0066A88 00431025 */ or $v0, $v0, $v1 /* 366ABC E0066A8C 00501025 */ or $v0, $v0, $s0 /* 366AC0 E0066A90 12B30007 */ beq $s5, $s3, .LE0066AB0 /* 366AC4 E0066A94 ACA20004 */ sw $v0, 0x4($a1) /* 366AC8 E0066A98 15E00008 */ bnez $t7, .LE0066ABC /* 366ACC E0066A9C 2409003F */ addiu $t1, $zero, 0x3F /* 366AD0 E0066AA0 12B20007 */ beq $s5, $s2, .LE0066AC0 /* 366AD4 E0066AA4 240700FF */ addiu $a3, $zero, 0xFF /* 366AD8 E0066AA8 08019AB0 */ j .LE0066AC0 /* 366ADC E0066AAC 240701FF */ addiu $a3, $zero, 0x1FF .LE0066AB0: /* 366AE0 E0066AB0 2409003F */ addiu $t1, $zero, 0x3F /* 366AE4 E0066AB4 08019AB0 */ j .LE0066AC0 /* 366AE8 E0066AB8 2407007F */ addiu $a3, $zero, 0x7F .LE0066ABC: /* 366AEC E0066ABC 240701FF */ addiu $a3, $zero, 0x1FF .LE0066AC0: /* 366AF0 E0066AC0 258C0001 */ addiu $t4, $t4, 0x1 /* 366AF4 E0066AC4 C540FFE8 */ lwc1 $f0, -0x18($t2) /* 366AF8 E0066AC8 C542FFF8 */ lwc1 $f2, -0x8($t2) /* 366AFC E0066ACC C544FFF0 */ lwc1 $f4, -0x10($t2) /* 366B00 E0066AD0 C5460000 */ lwc1 $f6, 0x0($t2) /* 366B04 E0066AD4 254A0070 */ addiu $t2, $t2, 0x70 /* 366B08 E0066AD8 00094880 */ sll $t1, $t1, 2 /* 366B0C E0066ADC 8D660000 */ lw $a2, 0x0($t3) /* 366B10 E0066AE0 00073880 */ sll $a3, $a3, 2 /* 366B14 E0066AE4 00C0402D */ daddu $t0, $a2, $zero /* 366B18 E0066AE8 24C60008 */ addiu $a2, $a2, 0x8 /* 366B1C E0066AEC 4600020D */ trunc.w.s $f8, $f0 /* 366B20 E0066AF0 44044000 */ mfc1 $a0, $f8 /* 366B24 E0066AF4 4600120D */ trunc.w.s $f8, $f2 /* 366B28 E0066AF8 44054000 */ mfc1 $a1, $f8 /* 366B2C E0066AFC 30830FFF */ andi $v1, $a0, 0xFFF /* 366B30 E0066B00 00031B00 */ sll $v1, $v1, 12 /* 366B34 E0066B04 30A20FFF */ andi $v0, $a1, 0xFFF /* 366B38 E0066B08 004D1025 */ or $v0, $v0, $t5 /* 366B3C E0066B0C 00621825 */ or $v1, $v1, $v0 /* 366B40 E0066B10 00892021 */ addu $a0, $a0, $t1 /* 366B44 E0066B14 30840FFF */ andi $a0, $a0, 0xFFF /* 366B48 E0066B18 00042300 */ sll $a0, $a0, 12 /* 366B4C E0066B1C 00A72821 */ addu $a1, $a1, $a3 /* 366B50 E0066B20 30A50FFF */ andi $a1, $a1, 0xFFF /* 366B54 E0066B24 00852025 */ or $a0, $a0, $a1 /* 366B58 E0066B28 24C20008 */ addiu $v0, $a2, 0x8 /* 366B5C E0066B2C AD660000 */ sw $a2, 0x0($t3) /* 366B60 E0066B30 AD040004 */ sw $a0, 0x4($t0) /* 366B64 E0066B34 4600220D */ trunc.w.s $f8, $f4 /* 366B68 E0066B38 44044000 */ mfc1 $a0, $f8 /* 366B6C E0066B3C 4600320D */ trunc.w.s $f8, $f6 /* 366B70 E0066B40 44054000 */ mfc1 $a1, $f8 /* 366B74 E0066B44 AD030000 */ sw $v1, 0x0($t0) /* 366B78 E0066B48 30830FFF */ andi $v1, $a0, 0xFFF /* 366B7C E0066B4C 00031B00 */ sll $v1, $v1, 12 /* 366B80 E0066B50 AD620000 */ sw $v0, 0x0($t3) /* 366B84 E0066B54 30A20FFF */ andi $v0, $a1, 0xFFF /* 366B88 E0066B58 004D1025 */ or $v0, $v0, $t5 /* 366B8C E0066B5C 00621825 */ or $v1, $v1, $v0 /* 366B90 E0066B60 00892021 */ addu $a0, $a0, $t1 /* 366B94 E0066B64 30840FFF */ andi $a0, $a0, 0xFFF /* 366B98 E0066B68 00042300 */ sll $a0, $a0, 12 /* 366B9C E0066B6C 00A72821 */ addu $a1, $a1, $a3 /* 366BA0 E0066B70 30A50FFF */ andi $a1, $a1, 0xFFF /* 366BA4 E0066B74 00B12825 */ or $a1, $a1, $s1 /* 366BA8 E0066B78 00852025 */ or $a0, $a0, $a1 /* 366BAC E0066B7C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 366BB0 E0066B80 ACC30000 */ sw $v1, 0x0($a2) /* 366BB4 E0066B84 ACC40004 */ sw $a0, 0x4($a2) /* 366BB8 E0066B88 ACC20008 */ sw $v0, 0x8($a2) /* 366BBC E0066B8C ACDE000C */ sw $fp, 0xC($a2) /* 366BC0 E0066B90 8EE20008 */ lw $v0, 0x8($s7) /* 366BC4 E0066B94 24C60010 */ addiu $a2, $a2, 0x10 /* 366BC8 E0066B98 0182102A */ slt $v0, $t4, $v0 /* 366BCC E0066B9C 1440FFAE */ bnez $v0, .LE0066A58 /* 366BD0 E0066BA0 AD660000 */ sw $a2, 0x0($t3) .LE0066BA4: /* 366BD4 E0066BA4 3C02D838 */ lui $v0, (0xD8380002 >> 16) /* 366BD8 E0066BA8 34420002 */ ori $v0, $v0, (0xD8380002 & 0xFFFF) /* 366BDC E0066BAC 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 366BE0 E0066BB0 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 366BE4 E0066BB4 8CA40000 */ lw $a0, 0x0($a1) /* 366BE8 E0066BB8 3C06DA38 */ lui $a2, (0xDA380007 >> 16) /* 366BEC E0066BBC 0080182D */ daddu $v1, $a0, $zero /* 366BF0 E0066BC0 24840008 */ addiu $a0, $a0, 0x8 /* 366BF4 E0066BC4 ACA40000 */ sw $a0, 0x0($a1) /* 366BF8 E0066BC8 AC620000 */ sw $v0, 0x0($v1) /* 366BFC E0066BCC 24020040 */ addiu $v0, $zero, 0x40 /* 366C00 E0066BD0 AC620004 */ sw $v0, 0x4($v1) /* 366C04 E0066BD4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 366C08 E0066BD8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 366C0C E0066BDC 24820008 */ addiu $v0, $a0, 0x8 /* 366C10 E0066BE0 ACA20000 */ sw $v0, 0x0($a1) /* 366C14 E0066BE4 3C02800A */ lui $v0, %hi(gDisplayContext) /* 366C18 E0066BE8 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 366C1C E0066BEC 34C60007 */ ori $a2, $a2, (0xDA380007 & 0xFFFF) /* 366C20 E0066BF0 AC860000 */ sw $a2, 0x0($a0) /* 366C24 E0066BF4 00031980 */ sll $v1, $v1, 6 /* 366C28 E0066BF8 24630030 */ addiu $v1, $v1, 0x30 /* 366C2C E0066BFC 00431021 */ addu $v0, $v0, $v1 /* 366C30 E0066C00 AC820004 */ sw $v0, 0x4($a0) /* 366C34 E0066C04 24820010 */ addiu $v0, $a0, 0x10 /* 366C38 E0066C08 ACA20000 */ sw $v0, 0x0($a1) /* 366C3C E0066C0C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 366C40 E0066C10 AC820008 */ sw $v0, 0x8($a0) /* 366C44 E0066C14 AC80000C */ sw $zero, 0xC($a0) /* 366C48 E0066C18 8FBF00CC */ lw $ra, 0xCC($sp) /* 366C4C E0066C1C 8FBE00C8 */ lw $fp, 0xC8($sp) /* 366C50 E0066C20 8FB700C4 */ lw $s7, 0xC4($sp) /* 366C54 E0066C24 8FB600C0 */ lw $s6, 0xC0($sp) /* 366C58 E0066C28 8FB500BC */ lw $s5, 0xBC($sp) /* 366C5C E0066C2C 8FB400B8 */ lw $s4, 0xB8($sp) /* 366C60 E0066C30 8FB300B4 */ lw $s3, 0xB4($sp) /* 366C64 E0066C34 8FB200B0 */ lw $s2, 0xB0($sp) /* 366C68 E0066C38 8FB100AC */ lw $s1, 0xAC($sp) /* 366C6C E0066C3C 8FB000A8 */ lw $s0, 0xA8($sp) /* 366C70 E0066C40 D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 366C74 E0066C44 03E00008 */ jr $ra /* 366C78 E0066C48 27BD00D8 */ addiu $sp, $sp, 0xD8 /* 366C7C E0066C4C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void radial_shimmer_appendGfx(void* effect) { Matrix4f sp20, sp60; u16 spA0; EffectInstance* effectTemp = effect; RadialShimmerFXData* dataOrig = effectTemp->data.radialShimmer; RadialShimmerFXData* data = effectTemp->data.radialShimmer; Camera* camera = &gCameras[gCurrentCameraID]; s32 temp_f0; s32 temp_f2; s32 temp_f4; s32 temp_f6; Gfx* dlist2; Gfx* dlist1; s32 temp_s5; s32 temp_t1; s32 var_a3; s32 alpha; s32 other; s32 t1; s32 t2; s32 i; temp_s5 = data->unk_00; dlist1 = D_E0066C8C[temp_s5]; dlist2 = D_E0066C50[temp_s5]; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp20, data->unk_10, data->unk_14, data->unk_18); shim_guScaleF(sp60, data->unk_1C, data->unk_1C, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guPerspectiveF(sp60, &spA0, data->unk_60, (f32) camera->viewportW / camera->viewportH, 4.0f, 16384.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); shim_guTranslateF(sp20, 0.0f, 0.0f, data->unk_64); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); alpha = data->unk_24; gDPSetEnvColor(gMainGfxPos++, data->unk_6B, data->unk_6C, data->unk_6D, 127); gSPDisplayList(gMainGfxPos++, dlist1); for (i = 0; i < effectTemp->numParts; i++, data++) { gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_68, data->unk_69, data->unk_6A, alpha); switch (temp_s5) { case 0: case 1: other = 0x3F; var_a3 = 0x1FF; break; case 8: other = 0x3F; var_a3 = 0x7F; break; case 11: other = 0x3F; var_a3 = 0xFF; break; default: other = 0x3F; var_a3 = 0x1FF; break; } temp_f0 = data->unk_30; temp_f2 = data->unk_40; temp_f4 = data->unk_38; temp_f6 = data->unk_48; gDPSetTileSize(gMainGfxPos++, 0, temp_f0, temp_f2, temp_f0 + other * 4, temp_f2 + var_a3 * 4); gDPSetTileSize(gMainGfxPos++, G_TX_MIRROR, temp_f4, temp_f6, temp_f4 + other * 4, temp_f6 + var_a3 * 4); gSPDisplayList(gMainGfxPos++, dlist2); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel msg_draw_choice_pointer /* BD678 80126F78 27BDFFA0 */ addiu $sp, $sp, -0x60 /* BD67C 80126F7C AFB00038 */ sw $s0, 0x38($sp) /* BD680 80126F80 0080802D */ daddu $s0, $a0, $zero /* BD684 80126F84 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* BD688 80126F88 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* BD68C 80126F8C 3C0316C1 */ lui $v1, (0x16C16C17 >> 16) /* BD690 80126F90 AFBF0058 */ sw $ra, 0x58($sp) /* BD694 80126F94 AFB70054 */ sw $s7, 0x54($sp) /* BD698 80126F98 AFB60050 */ sw $s6, 0x50($sp) /* BD69C 80126F9C AFB5004C */ sw $s5, 0x4C($sp) /* BD6A0 80126FA0 AFB40048 */ sw $s4, 0x48($sp) /* BD6A4 80126FA4 AFB30044 */ sw $s3, 0x44($sp) /* BD6A8 80126FA8 AFB20040 */ sw $s2, 0x40($sp) /* BD6AC 80126FAC AFB1003C */ sw $s1, 0x3C($sp) /* BD6B0 80126FB0 94440134 */ lhu $a0, 0x134($v0) /* BD6B4 80126FB4 34636C17 */ ori $v1, $v1, (0x16C16C17 & 0xFFFF) /* BD6B8 80126FB8 000410C2 */ srl $v0, $a0, 3 /* BD6BC 80126FBC 00430019 */ multu $v0, $v1 /* BD6C0 80126FC0 241700FF */ addiu $s7, $zero, 0xFF /* BD6C4 80126FC4 24160048 */ addiu $s6, $zero, 0x48 /* BD6C8 80126FC8 0000C010 */ mfhi $t8 /* BD6CC 80126FCC 00181082 */ srl $v0, $t8, 2 /* BD6D0 80126FD0 00021840 */ sll $v1, $v0, 1 /* BD6D4 80126FD4 00621821 */ addu $v1, $v1, $v0 /* BD6D8 80126FD8 00031100 */ sll $v0, $v1, 4 /* BD6DC 80126FDC 00431023 */ subu $v0, $v0, $v1 /* BD6E0 80126FE0 000210C0 */ sll $v0, $v0, 3 /* BD6E4 80126FE4 00822023 */ subu $a0, $a0, $v0 /* BD6E8 80126FE8 920304F8 */ lbu $v1, 0x4F8($s0) /* BD6EC 80126FEC 24020007 */ addiu $v0, $zero, 0x7 /* BD6F0 80126FF0 10620006 */ beq $v1, $v0, .L8012700C /* BD6F4 80126FF4 3088FFFF */ andi $t0, $a0, 0xFFFF /* BD6F8 80126FF8 8E0204FC */ lw $v0, 0x4FC($s0) /* BD6FC 80126FFC 3C030002 */ lui $v1, (0x20000 >> 16) /* BD700 80127000 00431024 */ and $v0, $v0, $v1 /* BD704 80127004 1040000F */ beqz $v0, .L80127044 /* BD708 80127008 00000000 */ nop .L8012700C: /* BD70C 8012700C 920304EE */ lbu $v1, 0x4EE($s0) /* BD710 80127010 86020456 */ lh $v0, 0x456($s0) /* BD714 80127014 8604045A */ lh $a0, 0x45A($s0) /* BD718 80127018 00031840 */ sll $v1, $v1, 1 /* BD71C 8012701C 02031821 */ addu $v1, $s0, $v1 /* BD720 80127020 00441021 */ addu $v0, $v0, $a0 /* BD724 80127024 946504D0 */ lhu $a1, 0x4D0($v1) /* BD728 80127028 8604045C */ lh $a0, 0x45C($s0) /* BD72C 8012702C 0045A021 */ addu $s4, $v0, $a1 /* BD730 80127030 86020458 */ lh $v0, 0x458($s0) /* BD734 80127034 946304DC */ lhu $v1, 0x4DC($v1) /* BD738 80127038 00441021 */ addu $v0, $v0, $a0 /* BD73C 8012703C 08049C4C */ j .L80127130 /* BD740 80127040 0043A821 */ addu $s5, $v0, $v1 .L80127044: /* BD744 80127044 920204ED */ lbu $v0, 0x4ED($s0) /* BD748 80127048 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* BD74C 8012704C 44811800 */ mtc1 $at, $f3 /* BD750 80127050 44801000 */ mtc1 $zero, $f2 /* BD754 80127054 86030456 */ lh $v1, 0x456($s0) /* BD758 80127058 920604EE */ lbu $a2, 0x4EE($s0) /* BD75C 8012705C 920504EC */ lbu $a1, 0x4EC($s0) /* BD760 80127060 8604045C */ lh $a0, 0x45C($s0) /* BD764 80127064 44820000 */ mtc1 $v0, $f0 /* BD768 80127068 00000000 */ nop /* BD76C 8012706C 46800021 */ cvt.d.w $f0, $f0 /* BD770 80127070 00063040 */ sll $a2, $a2, 1 /* BD774 80127074 02063021 */ addu $a2, $s0, $a2 /* BD778 80127078 00052840 */ sll $a1, $a1, 1 /* BD77C 8012707C 02052821 */ addu $a1, $s0, $a1 /* BD780 80127080 46220000 */ add.d $f0, $f0, $f2 /* BD784 80127084 3C014018 */ lui $at, (0x40180000 >> 16) /* BD788 80127088 44811800 */ mtc1 $at, $f3 /* BD78C 8012708C 44801000 */ mtc1 $zero, $f2 /* BD790 80127090 8602045A */ lh $v0, 0x45A($s0) /* BD794 80127094 94C704D0 */ lhu $a3, 0x4D0($a2) /* BD798 80127098 00621821 */ addu $v1, $v1, $v0 /* BD79C 8012709C 00673821 */ addu $a3, $v1, $a3 /* BD7A0 801270A0 94A204D0 */ lhu $v0, 0x4D0($a1) /* BD7A4 801270A4 46200020 */ cvt.s.d $f0, $f0 /* BD7A8 801270A8 46000021 */ cvt.d.s $f0, $f0 /* BD7AC 801270AC 46220003 */ div.d $f0, $f0, $f2 /* BD7B0 801270B0 46200020 */ cvt.s.d $f0, $f0 /* BD7B4 801270B4 00621821 */ addu $v1, $v1, $v0 /* BD7B8 801270B8 00671823 */ subu $v1, $v1, $a3 /* BD7BC 801270BC 44833000 */ mtc1 $v1, $f6 /* BD7C0 801270C0 00000000 */ nop /* BD7C4 801270C4 468031A0 */ cvt.s.w $f6, $f6 /* BD7C8 801270C8 46003182 */ mul.s $f6, $f6, $f0 /* BD7CC 801270CC 00000000 */ nop /* BD7D0 801270D0 86020458 */ lh $v0, 0x458($s0) /* BD7D4 801270D4 94C304DC */ lhu $v1, 0x4DC($a2) /* BD7D8 801270D8 00441021 */ addu $v0, $v0, $a0 /* BD7DC 801270DC 94A404DC */ lhu $a0, 0x4DC($a1) /* BD7E0 801270E0 00431821 */ addu $v1, $v0, $v1 /* BD7E4 801270E4 00441021 */ addu $v0, $v0, $a0 /* BD7E8 801270E8 00431023 */ subu $v0, $v0, $v1 /* BD7EC 801270EC 44822000 */ mtc1 $v0, $f4 /* BD7F0 801270F0 00000000 */ nop /* BD7F4 801270F4 46802120 */ cvt.s.w $f4, $f4 /* BD7F8 801270F8 46002102 */ mul.s $f4, $f4, $f0 /* BD7FC 801270FC 00000000 */ nop /* BD800 80127100 44871000 */ mtc1 $a3, $f2 /* BD804 80127104 00000000 */ nop /* BD808 80127108 468010A0 */ cvt.s.w $f2, $f2 /* BD80C 8012710C 46061080 */ add.s $f2, $f2, $f6 /* BD810 80127110 44830000 */ mtc1 $v1, $f0 /* BD814 80127114 00000000 */ nop /* BD818 80127118 46800020 */ cvt.s.w $f0, $f0 /* BD81C 8012711C 46040000 */ add.s $f0, $f0, $f4 /* BD820 80127120 4600120D */ trunc.w.s $f8, $f2 /* BD824 80127124 44144000 */ mfc1 $s4, $f8 /* BD828 80127128 4600020D */ trunc.w.s $f8, $f0 /* BD82C 8012712C 44154000 */ mfc1 $s5, $f8 .L80127130: /* BD830 80127130 00082080 */ sll $a0, $t0, 2 /* BD834 80127134 00882021 */ addu $a0, $a0, $t0 /* BD838 80127138 00042080 */ sll $a0, $a0, 2 /* BD83C 8012713C 00882023 */ subu $a0, $a0, $t0 /* BD840 80127140 00042040 */ sll $a0, $a0, 1 /* BD844 80127144 2484010E */ addiu $a0, $a0, 0x10E /* BD848 80127148 00042400 */ sll $a0, $a0, 16 /* BD84C 8012714C 0C00A4F5 */ jal cosine /* BD850 80127150 00042403 */ sra $a0, $a0, 16 /* BD854 80127154 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* BD858 80127158 44811800 */ mtc1 $at, $f3 /* BD85C 8012715C 44801000 */ mtc1 $zero, $f2 /* BD860 80127160 46000021 */ cvt.d.s $f0, $f0 /* BD864 80127164 46220000 */ add.d $f0, $f0, $f2 /* BD868 80127168 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* BD86C 8012716C 44811800 */ mtc1 $at, $f3 /* BD870 80127170 44801000 */ mtc1 $zero, $f2 /* BD874 80127174 00000000 */ nop /* BD878 80127178 46220002 */ mul.d $f0, $f0, $f2 /* BD87C 8012717C 00000000 */ nop /* BD880 80127180 3C018015 */ lui $at, %hi(D_80150718) /* BD884 80127184 D4220718 */ ldc1 $f2, %lo(D_80150718)($at) /* BD888 80127188 46220002 */ mul.d $f0, $f0, $f2 /* BD88C 8012718C 00000000 */ nop /* BD890 80127190 26B50001 */ addiu $s5, $s5, 0x1 /* BD894 80127194 8E0204FC */ lw $v0, 0x4FC($s0) /* BD898 80127198 44941000 */ mtc1 $s4, $f2 /* BD89C 8012719C 00000000 */ nop /* BD8A0 801271A0 468010A1 */ cvt.d.w $f2, $f2 /* BD8A4 801271A4 46201080 */ add.d $f2, $f2, $f0 /* BD8A8 801271A8 3C030002 */ lui $v1, (0x20000 >> 16) /* BD8AC 801271AC 00431024 */ and $v0, $v0, $v1 /* BD8B0 801271B0 4620120D */ trunc.w.d $f8, $f2 /* BD8B4 801271B4 44144000 */ mfc1 $s4, $f8 /* BD8B8 801271B8 1040003E */ beqz $v0, .L801272B4 /* BD8BC 801271BC 2694FFFE */ addiu $s4, $s4, -0x2 /* BD8C0 801271C0 92020512 */ lbu $v0, 0x512($s0) /* BD8C4 801271C4 3C014047 */ lui $at, (0x40470000 >> 16) /* BD8C8 801271C8 44811800 */ mtc1 $at, $f3 /* BD8CC 801271CC 44801000 */ mtc1 $zero, $f2 /* BD8D0 801271D0 44820000 */ mtc1 $v0, $f0 /* BD8D4 801271D4 00000000 */ nop /* BD8D8 801271D8 46800021 */ cvt.d.w $f0, $f0 /* BD8DC 801271DC 46220002 */ mul.d $f0, $f0, $f2 /* BD8E0 801271E0 00000000 */ nop /* BD8E4 801271E4 3C018015 */ lui $at, %hi(D_80150720) /* BD8E8 801271E8 D4220720 */ ldc1 $f2, %lo(D_80150720)($at) /* BD8EC 801271EC 46201001 */ sub.d $f0, $f2, $f0 /* BD8F0 801271F0 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* BD8F4 801271F4 44811800 */ mtc1 $at, $f3 /* BD8F8 801271F8 44801000 */ mtc1 $zero, $f2 /* BD8FC 801271FC 00000000 */ nop /* BD900 80127200 4620103E */ c.le.d $f2, $f0 /* BD904 80127204 00000000 */ nop /* BD908 80127208 45030005 */ bc1tl .L80127220 /* BD90C 8012720C 46220001 */ sub.d $f0, $f0, $f2 /* BD910 80127210 4620020D */ trunc.w.d $f8, $f0 /* BD914 80127214 44034000 */ mfc1 $v1, $f8 /* BD918 80127218 08049C8D */ j .L80127234 /* BD91C 8012721C 00000000 */ nop .L80127220: /* BD920 80127220 3C028000 */ lui $v0, (0x80000000 >> 16) /* BD924 80127224 4620020D */ trunc.w.d $f8, $f0 /* BD928 80127228 44034000 */ mfc1 $v1, $f8 /* BD92C 8012722C 00000000 */ nop /* BD930 80127230 00621825 */ or $v1, $v1, $v0 .L80127234: /* BD934 80127234 92020512 */ lbu $v0, 0x512($s0) /* BD938 80127238 3C018015 */ lui $at, %hi(D_80150728) /* BD93C 8012723C D4220728 */ ldc1 $f2, %lo(D_80150728)($at) /* BD940 80127240 44820000 */ mtc1 $v0, $f0 /* BD944 80127244 00000000 */ nop /* BD948 80127248 46800021 */ cvt.d.w $f0, $f0 /* BD94C 8012724C 46220002 */ mul.d $f0, $f0, $f2 /* BD950 80127250 00000000 */ nop /* BD954 80127254 3C014052 */ lui $at, (0x40520000 >> 16) /* BD958 80127258 44811800 */ mtc1 $at, $f3 /* BD95C 8012725C 44801000 */ mtc1 $zero, $f2 /* BD960 80127260 00000000 */ nop /* BD964 80127264 46201001 */ sub.d $f0, $f2, $f0 /* BD968 80127268 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* BD96C 8012726C 44811800 */ mtc1 $at, $f3 /* BD970 80127270 44801000 */ mtc1 $zero, $f2 /* BD974 80127274 00000000 */ nop /* BD978 80127278 4620103E */ c.le.d $f2, $f0 /* BD97C 8012727C 00000000 */ nop /* BD980 80127280 45010005 */ bc1t .L80127298 /* BD984 80127284 0060B82D */ daddu $s7, $v1, $zero /* BD988 80127288 4620020D */ trunc.w.d $f8, $f0 /* BD98C 8012728C 44034000 */ mfc1 $v1, $f8 /* BD990 80127290 08049CAD */ j .L801272B4 /* BD994 80127294 0060B02D */ daddu $s6, $v1, $zero .L80127298: /* BD998 80127298 46220001 */ sub.d $f0, $f0, $f2 /* BD99C 8012729C 3C028000 */ lui $v0, (0x80000000 >> 16) /* BD9A0 801272A0 4620020D */ trunc.w.d $f8, $f0 /* BD9A4 801272A4 44034000 */ mfc1 $v1, $f8 /* BD9A8 801272A8 00000000 */ nop /* BD9AC 801272AC 00621825 */ or $v1, $v1, $v0 /* BD9B0 801272B0 0060B02D */ daddu $s6, $v1, $zero .L801272B4: /* BD9B4 801272B4 3C0AE300 */ lui $t2, (0xE3001001 >> 16) /* BD9B8 801272B8 354A1001 */ ori $t2, $t2, (0xE3001001 & 0xFFFF) /* BD9BC 801272BC 3C0BF500 */ lui $t3, (0xF5000100 >> 16) /* BD9C0 801272C0 356B0100 */ ori $t3, $t3, (0xF5000100 & 0xFFFF) /* BD9C4 801272C4 3C0C0703 */ lui $t4, (0x703C000 >> 16) /* BD9C8 801272C8 358CC000 */ ori $t4, $t4, (0x703C000 & 0xFFFF) /* BD9CC 801272CC 3C0FE200 */ lui $t7, (0xE200001C >> 16) /* BD9D0 801272D0 35EF001C */ ori $t7, $t7, (0xE200001C & 0xFFFF) /* BD9D4 801272D4 3C0D0050 */ lui $t5, (0x504240 >> 16) /* BD9D8 801272D8 35AD4240 */ ori $t5, $t5, (0x504240 & 0xFFFF) /* BD9DC 801272DC 3C10FCFF */ lui $s0, (0xFCFF97FF >> 16) /* BD9E0 801272E0 361097FF */ ori $s0, $s0, (0xFCFF97FF & 0xFFFF) /* BD9E4 801272E4 3C0EFF2D */ lui $t6, (0xFF2DFEFF >> 16) /* BD9E8 801272E8 35CEFEFF */ ori $t6, $t6, (0xFF2DFEFF & 0xFFFF) /* BD9EC 801272EC 3C132828 */ lui $s3, (0x28282800 >> 16) /* BD9F0 801272F0 36732800 */ ori $s3, $s3, (0x28282800 & 0xFFFF) /* BD9F4 801272F4 3C128010 */ lui $s2, %hi(ui_point_right_png) /* BD9F8 801272F8 2652BB60 */ addiu $s2, $s2, %lo(ui_point_right_png) /* BD9FC 801272FC 0240202D */ daddu $a0, $s2, $zero /* BDA00 80127300 24050010 */ addiu $a1, $zero, 0x10 /* BDA04 80127304 00A0302D */ daddu $a2, $a1, $zero /* BDA08 80127308 3C08800A */ lui $t0, %hi(gMainGfxPos) /* BDA0C 8012730C 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* BDA10 80127310 24070002 */ addiu $a3, $zero, 0x2 /* BDA14 80127314 3C09E700 */ lui $t1, (0xE7000000 >> 16) /* BDA18 80127318 8D030000 */ lw $v1, 0x0($t0) /* BDA1C 8012731C 3C118010 */ lui $s1, %hi(ui_point_right_pal) /* BDA20 80127320 2631BBE0 */ addiu $s1, $s1, %lo(ui_point_right_pal) /* BDA24 80127324 0060102D */ daddu $v0, $v1, $zero /* BDA28 80127328 24630008 */ addiu $v1, $v1, 0x8 /* BDA2C 8012732C AD030000 */ sw $v1, 0x0($t0) /* BDA30 80127330 AC490000 */ sw $t1, 0x0($v0) /* BDA34 80127334 AC400004 */ sw $zero, 0x4($v0) /* BDA38 80127338 24620008 */ addiu $v0, $v1, 0x8 /* BDA3C 8012733C AD020000 */ sw $v0, 0x0($t0) /* BDA40 80127340 34028000 */ ori $v0, $zero, 0x8000 /* BDA44 80127344 AC620004 */ sw $v0, 0x4($v1) /* BDA48 80127348 00651021 */ addu $v0, $v1, $a1 /* BDA4C 8012734C AC6A0000 */ sw $t2, 0x0($v1) /* BDA50 80127350 AD020000 */ sw $v0, 0x0($t0) /* BDA54 80127354 3C02FD10 */ lui $v0, (0xFD100000 >> 16) /* BDA58 80127358 AC620008 */ sw $v0, 0x8($v1) /* BDA5C 8012735C 24620018 */ addiu $v0, $v1, 0x18 /* BDA60 80127360 AC71000C */ sw $s1, 0xC($v1) /* BDA64 80127364 AD020000 */ sw $v0, 0x0($t0) /* BDA68 80127368 3C02E800 */ lui $v0, (0xE8000000 >> 16) /* BDA6C 8012736C AC620010 */ sw $v0, 0x10($v1) /* BDA70 80127370 24620020 */ addiu $v0, $v1, 0x20 /* BDA74 80127374 AC600014 */ sw $zero, 0x14($v1) /* BDA78 80127378 AD020000 */ sw $v0, 0x0($t0) /* BDA7C 8012737C 3C020700 */ lui $v0, (0x7000000 >> 16) /* BDA80 80127380 AC62001C */ sw $v0, 0x1C($v1) /* BDA84 80127384 24620028 */ addiu $v0, $v1, 0x28 /* BDA88 80127388 AC6B0018 */ sw $t3, 0x18($v1) /* BDA8C 8012738C AD020000 */ sw $v0, 0x0($t0) /* BDA90 80127390 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* BDA94 80127394 AC620020 */ sw $v0, 0x20($v1) /* BDA98 80127398 24620030 */ addiu $v0, $v1, 0x30 /* BDA9C 8012739C AC600024 */ sw $zero, 0x24($v1) /* BDAA0 801273A0 AD020000 */ sw $v0, 0x0($t0) /* BDAA4 801273A4 3C02F000 */ lui $v0, (0xF0000000 >> 16) /* BDAA8 801273A8 AC620028 */ sw $v0, 0x28($v1) /* BDAAC 801273AC 24620038 */ addiu $v0, $v1, 0x38 /* BDAB0 801273B0 AC6C002C */ sw $t4, 0x2C($v1) /* BDAB4 801273B4 AD020000 */ sw $v0, 0x0($t0) /* BDAB8 801273B8 24620040 */ addiu $v0, $v1, 0x40 /* BDABC 801273BC AC690030 */ sw $t1, 0x30($v1) /* BDAC0 801273C0 AC600034 */ sw $zero, 0x34($v1) /* BDAC4 801273C4 AD020000 */ sw $v0, 0x0($t0) /* BDAC8 801273C8 24620048 */ addiu $v0, $v1, 0x48 /* BDACC 801273CC AC6F0038 */ sw $t7, 0x38($v1) /* BDAD0 801273D0 AC6D003C */ sw $t5, 0x3C($v1) /* BDAD4 801273D4 AD020000 */ sw $v0, 0x0($t0) /* BDAD8 801273D8 24620050 */ addiu $v0, $v1, 0x50 /* BDADC 801273DC AC700040 */ sw $s0, 0x40($v1) /* BDAE0 801273E0 AC6E0044 */ sw $t6, 0x44($v1) /* BDAE4 801273E4 AD020000 */ sw $v0, 0x0($t0) /* BDAE8 801273E8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* BDAEC 801273EC AC620048 */ sw $v0, 0x48($v1) /* BDAF0 801273F0 32C200FF */ andi $v0, $s6, 0xFF /* BDAF4 801273F4 00531025 */ or $v0, $v0, $s3 /* BDAF8 801273F8 AC62004C */ sw $v0, 0x4C($v1) /* BDAFC 801273FC 02871021 */ addu $v0, $s4, $a3 /* BDB00 80127400 00A21004 */ sllv $v0, $v0, $a1 /* BDB04 80127404 00A21007 */ srav $v0, $v0, $a1 /* BDB08 80127408 AFA20014 */ sw $v0, 0x14($sp) /* BDB0C 8012740C 02A71021 */ addu $v0, $s5, $a3 /* BDB10 80127410 00A21004 */ sllv $v0, $v0, $a1 /* BDB14 80127414 00A21007 */ srav $v0, $v0, $a1 /* BDB18 80127418 AFA20018 */ sw $v0, 0x18($sp) /* BDB1C 8012741C 2402000A */ addiu $v0, $zero, 0xA /* BDB20 80127420 2410012C */ addiu $s0, $zero, 0x12C /* BDB24 80127424 AFA2001C */ sw $v0, 0x1C($sp) /* BDB28 80127428 AFA20020 */ sw $v0, 0x20($sp) /* BDB2C 8012742C 240200DC */ addiu $v0, $zero, 0xDC /* BDB30 80127430 AFA00010 */ sw $zero, 0x10($sp) /* BDB34 80127434 AFB00024 */ sw $s0, 0x24($sp) /* BDB38 80127438 0C04BB25 */ jal draw_image_with_clipping /* BDB3C 8012743C AFA20028 */ sw $v0, 0x28($sp) /* BDB40 80127440 0240202D */ daddu $a0, $s2, $zero /* BDB44 80127444 24050010 */ addiu $a1, $zero, 0x10 /* BDB48 80127448 00A0302D */ daddu $a2, $a1, $zero /* BDB4C 8012744C 24070002 */ addiu $a3, $zero, 0x2 /* BDB50 80127450 00B41004 */ sllv $v0, $s4, $a1 /* BDB54 80127454 00A21007 */ srav $v0, $v0, $a1 /* BDB58 80127458 AFA20018 */ sw $v0, 0x18($sp) /* BDB5C 8012745C 00B51004 */ sllv $v0, $s5, $a1 /* BDB60 80127460 00A21007 */ srav $v0, $v0, $a1 /* BDB64 80127464 AFA2001C */ sw $v0, 0x1C($sp) /* BDB68 80127468 24020014 */ addiu $v0, $zero, 0x14 /* BDB6C 8012746C AFA20020 */ sw $v0, 0x20($sp) /* BDB70 80127470 AFA20024 */ sw $v0, 0x24($sp) /* BDB74 80127474 240200C8 */ addiu $v0, $zero, 0xC8 /* BDB78 80127478 AFA2002C */ sw $v0, 0x2C($sp) /* BDB7C 8012747C 32E200FF */ andi $v0, $s7, 0xFF /* BDB80 80127480 AFA00010 */ sw $zero, 0x10($sp) /* BDB84 80127484 AFB10014 */ sw $s1, 0x14($sp) /* BDB88 80127488 AFB00028 */ sw $s0, 0x28($sp) /* BDB8C 8012748C 0C04BA68 */ jal draw_ci_image_with_clipping /* BDB90 80127490 AFA20030 */ sw $v0, 0x30($sp) /* BDB94 80127494 8FBF0058 */ lw $ra, 0x58($sp) /* BDB98 80127498 8FB70054 */ lw $s7, 0x54($sp) /* BDB9C 8012749C 8FB60050 */ lw $s6, 0x50($sp) /* BDBA0 801274A0 8FB5004C */ lw $s5, 0x4C($sp) /* BDBA4 801274A4 8FB40048 */ lw $s4, 0x48($sp) /* BDBA8 801274A8 8FB30044 */ lw $s3, 0x44($sp) /* BDBAC 801274AC 8FB20040 */ lw $s2, 0x40($sp) /* BDBB0 801274B0 8FB1003C */ lw $s1, 0x3C($sp) /* BDBB4 801274B4 8FB00038 */ lw $s0, 0x38($sp) /* BDBB8 801274B8 03E00008 */ jr $ra /* BDBBC 801274BC 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void msg_draw_choice_pointer(MessagePrintState* printer) { s32 pointerAlpha = 255; s32 shadowAlpha = 72; s32 posInterpPhase = gGameStatusPtr->frameCounter % 360; s32 posX, posY; if (printer->windowState == MSG_WINDOW_STATE_WAITING_FOR_CHOICE || (printer->stateFlags & MSG_STATE_FLAG_20000)) { posX = printer->windowOffsetPos.x + printer->windowBasePos.x + printer->cursorPosX[printer->selectedOption]; posY = printer->windowOffsetPos.y + printer->windowBasePos.y + printer->cursorPosY[printer->selectedOption]; } else { s32 baseX, baseY, targetX, targetY; f32 moveToTargetAlpha = (f32)(printer->scrollingTime + 1.0) / 6.0; baseX = printer->windowOffsetPos.x + printer->windowBasePos.x + printer->cursorPosX[printer->selectedOption]; targetX = printer->windowOffsetPos.x + printer->windowBasePos.x + printer->cursorPosX[printer->targetOption]; posX = baseX + (targetX - baseX) * moveToTargetAlpha; baseY = printer->windowOffsetPos.y + printer->windowBasePos.y + printer->cursorPosY[printer->selectedOption]; targetY = printer->windowOffsetPos.y + printer->windowBasePos.y + printer->cursorPosY[printer->targetOption]; posY = baseY + (targetY - baseY) * moveToTargetAlpha; } posY += 1; posX += (cosine(posInterpPhase * 38 + 270) + 1.0) * 0.5 * 3.2; posX -= 2; if (printer->stateFlags & MSG_STATE_FLAG_20000) { u32 opacity; opacity = 255.0 - printer->fadeOutCounter * 46.0; pointerAlpha = opacity; opacity = 72.0 - printer->fadeOutCounter * 14.4; shadowAlpha = opacity; } gDPPipeSync(gMainGfxPos++); gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); gDPLoadTLUT_pal16(gMainGfxPos++, 0, ui_point_right_pal); gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07); gDPSetPrimColor(gMainGfxPos++, 0, 0, 40, 40, 40, shadowAlpha); draw_image_with_clipping(ui_point_right_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, posX + 2, posY + 2, 10, 10, 300, 220); draw_ci_image_with_clipping(ui_point_right_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, ui_point_right_pal, posX, posY, 20, 20, 300, 200, pointerAlpha); }
### RAW ASSEMBLY INSTRUCTIONS: glabel imgfx_appendGfx_mesh_strip /* D5004 8013E904 27BDFFD0 */ addiu $sp, $sp, -0x30 /* D5008 8013E908 AFB40020 */ sw $s4, 0x20($sp) /* D500C 8013E90C 0080A02D */ daddu $s4, $a0, $zero /* D5010 8013E910 24050002 */ addiu $a1, $zero, 0x2 /* D5014 8013E914 AFBF002C */ sw $ra, 0x2C($sp) /* D5018 8013E918 AFB60028 */ sw $s6, 0x28($sp) /* D501C 8013E91C AFB50024 */ sw $s5, 0x24($sp) /* D5020 8013E920 AFB3001C */ sw $s3, 0x1C($sp) /* D5024 8013E924 AFB20018 */ sw $s2, 0x18($sp) /* D5028 8013E928 AFB10014 */ sw $s1, 0x14($sp) /* D502C 8013E92C AFB00010 */ sw $s0, 0x10($sp) /* D5030 8013E930 8E93002C */ lw $s3, 0x2C($s4) /* D5034 8013E934 3C120001 */ lui $s2, (0x11630 >> 16) /* D5038 8013E938 96640008 */ lhu $a0, 0x8($s3) /* D503C 8013E93C 0C04BF84 */ jal integer_log /* D5040 8013E940 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* D5044 8013E944 24050002 */ addiu $a1, $zero, 0x2 /* D5048 8013E948 9664000A */ lhu $a0, 0xA($s3) /* D504C 8013E94C 0C04BF84 */ jal integer_log /* D5050 8013E950 0040B02D */ daddu $s6, $v0, $zero /* D5054 8013E954 3C108007 */ lui $s0, %hi(gMatrixListPos) /* D5058 8013E958 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* D505C 8013E95C 3C11800A */ lui $s1, %hi(gDisplayContext) /* D5060 8013E960 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* D5064 8013E964 96040000 */ lhu $a0, 0x0($s0) /* D5068 8013E968 3C068015 */ lui $a2, %hi(ImgFXCurrentTexturePtr) /* D506C 8013E96C 8CC6EE10 */ lw $a2, %lo(ImgFXCurrentTexturePtr)($a2) /* D5070 8013E970 8E230000 */ lw $v1, 0x0($s1) /* D5074 8013E974 3C014059 */ lui $at, (0x40590000 >> 16) /* D5078 8013E978 44811800 */ mtc1 $at, $f3 /* D507C 8013E97C 44801000 */ mtc1 $zero, $f2 /* D5080 8013E980 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* D5084 8013E984 00042180 */ sll $a0, $a0, 6 /* D5088 8013E988 00922021 */ addu $a0, $a0, $s2 /* D508C 8013E98C 00642021 */ addu $a0, $v1, $a0 /* D5090 8013E990 94C50008 */ lhu $a1, 0x8($a2) /* D5094 8013E994 94C3000A */ lhu $v1, 0xA($a2) /* D5098 8013E998 44850000 */ mtc1 $a1, $f0 /* D509C 8013E99C 00000000 */ nop /* D50A0 8013E9A0 46800020 */ cvt.s.w $f0, $f0 /* D50A4 8013E9A4 46000021 */ cvt.d.s $f0, $f0 /* D50A8 8013E9A8 46220003 */ div.d $f0, $f0, $f2 /* D50AC 8013E9AC 46200020 */ cvt.s.d $f0, $f0 /* D50B0 8013E9B0 44050000 */ mfc1 $a1, $f0 /* D50B4 8013E9B4 44830000 */ mtc1 $v1, $f0 /* D50B8 8013E9B8 00000000 */ nop /* D50BC 8013E9BC 46800020 */ cvt.s.w $f0, $f0 /* D50C0 8013E9C0 46000021 */ cvt.d.s $f0, $f0 /* D50C4 8013E9C4 46220003 */ div.d $f0, $f0, $f2 /* D50C8 8013E9C8 46200020 */ cvt.s.d $f0, $f0 /* D50CC 8013E9CC 44060000 */ mfc1 $a2, $f0 /* D50D0 8013E9D0 0C019DC0 */ jal guScale /* D50D4 8013E9D4 0040A82D */ daddu $s5, $v0, $zero /* D50D8 8013E9D8 3C06E200 */ lui $a2, (0xE200001C >> 16) /* D50DC 8013E9DC 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF) /* D50E0 8013E9E0 3C050050 */ lui $a1, (0x504E50 >> 16) /* D50E4 8013E9E4 3C08800A */ lui $t0, %hi(gMainGfxPos) /* D50E8 8013E9E8 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* D50EC 8013E9EC 8D070000 */ lw $a3, 0x0($t0) /* D50F0 8013E9F0 34A54E50 */ ori $a1, $a1, (0x504E50 & 0xFFFF) /* D50F4 8013E9F4 00E0202D */ daddu $a0, $a3, $zero /* D50F8 8013E9F8 24E70008 */ addiu $a3, $a3, 0x8 /* D50FC 8013E9FC AD070000 */ sw $a3, 0x0($t0) /* D5100 8013EA00 96020000 */ lhu $v0, 0x0($s0) /* D5104 8013EA04 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* D5108 8013EA08 AC830000 */ sw $v1, 0x0($a0) /* D510C 8013EA0C 24430001 */ addiu $v1, $v0, 0x1 /* D5110 8013EA10 3042FFFF */ andi $v0, $v0, 0xFFFF /* D5114 8013EA14 00021180 */ sll $v0, $v0, 6 /* D5118 8013EA18 A6030000 */ sh $v1, 0x0($s0) /* D511C 8013EA1C 8E230000 */ lw $v1, 0x0($s1) /* D5120 8013EA20 00521021 */ addu $v0, $v0, $s2 /* D5124 8013EA24 00621821 */ addu $v1, $v1, $v0 /* D5128 8013EA28 3C028000 */ lui $v0, (0x80000000 >> 16) /* D512C 8013EA2C 00621821 */ addu $v1, $v1, $v0 /* D5130 8013EA30 24E20008 */ addiu $v0, $a3, 0x8 /* D5134 8013EA34 AC830004 */ sw $v1, 0x4($a0) /* D5138 8013EA38 AD020000 */ sw $v0, 0x0($t0) /* D513C 8013EA3C ACE60000 */ sw $a2, 0x0($a3) /* D5140 8013EA40 ACE50004 */ sw $a1, 0x4($a3) /* D5144 8013EA44 92830002 */ lbu $v1, 0x2($s4) /* D5148 8013EA48 2402000F */ addiu $v0, $zero, 0xF /* D514C 8013EA4C 14620010 */ bne $v1, $v0, .L8013EA90 /* D5150 8013EA50 3C04FC12 */ lui $a0, (0xFC121824 >> 16) /* D5154 8013EA54 3C05FC12 */ lui $a1, (0xFC121624 >> 16) /* D5158 8013EA58 34A51624 */ ori $a1, $a1, (0xFC121624 & 0xFFFF) /* D515C 8013EA5C 3C04FF2F */ lui $a0, (0xFF2FFFFF >> 16) /* D5160 8013EA60 3484FFFF */ ori $a0, $a0, (0xFF2FFFFF & 0xFFFF) /* D5164 8013EA64 24E20010 */ addiu $v0, $a3, 0x10 /* D5168 8013EA68 AD020000 */ sw $v0, 0x0($t0) /* D516C 8013EA6C 8E830030 */ lw $v1, 0x30($s4) /* D5170 8013EA70 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* D5174 8013EA74 ACE20008 */ sw $v0, 0x8($a3) /* D5178 8013EA78 24E20018 */ addiu $v0, $a3, 0x18 /* D517C 8013EA7C AD020000 */ sw $v0, 0x0($t0) /* D5180 8013EA80 ACE50010 */ sw $a1, 0x10($a3) /* D5184 8013EA84 ACE40014 */ sw $a0, 0x14($a3) /* D5188 8013EA88 0804FAAA */ j .L8013EAA8 /* D518C 8013EA8C 306300FF */ andi $v1, $v1, 0xFF .L8013EA90: /* D5190 8013EA90 34841824 */ ori $a0, $a0, (0xFC121824 & 0xFFFF) /* D5194 8013EA94 3C03FF33 */ lui $v1, (0xFF33FFFF >> 16) /* D5198 8013EA98 3463FFFF */ ori $v1, $v1, (0xFF33FFFF & 0xFFFF) /* D519C 8013EA9C 24E20010 */ addiu $v0, $a3, 0x10 /* D51A0 8013EAA0 AD020000 */ sw $v0, 0x0($t0) /* D51A4 8013EAA4 ACE40008 */ sw $a0, 0x8($a3) .L8013EAA8: /* D51A8 8013EAA8 ACE3000C */ sw $v1, 0xC($a3) /* D51AC 8013EAAC 3C02E300 */ lui $v0, (0xE3001001 >> 16) /* D51B0 8013EAB0 34421001 */ ori $v0, $v0, (0xE3001001 & 0xFFFF) /* D51B4 8013EAB4 3C05F500 */ lui $a1, (0xF5000100 >> 16) /* D51B8 8013EAB8 34A50100 */ ori $a1, $a1, (0xF5000100 & 0xFFFF) /* D51BC 8013EABC 3C060703 */ lui $a2, (0x703C000 >> 16) /* D51C0 8013EAC0 34C6C000 */ ori $a2, $a2, (0x703C000 & 0xFFFF) /* D51C4 8013EAC4 3C07800A */ lui $a3, %hi(gMainGfxPos) /* D51C8 8013EAC8 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* D51CC 8013EACC 3C0BF240 */ lui $t3, (0xF2400400 >> 16) /* D51D0 8013EAD0 3C080700 */ lui $t0, (0x7000000 >> 16) /* D51D4 8013EAD4 3C0AE600 */ lui $t2, (0xE6000000 >> 16) /* D51D8 8013EAD8 3C09E700 */ lui $t1, (0xE7000000 >> 16) /* D51DC 8013EADC 8CE40000 */ lw $a0, 0x0($a3) /* D51E0 8013EAE0 356B0400 */ ori $t3, $t3, (0xF2400400 & 0xFFFF) /* D51E4 8013EAE4 0080182D */ daddu $v1, $a0, $zero /* D51E8 8013EAE8 24840008 */ addiu $a0, $a0, 0x8 /* D51EC 8013EAEC ACE40000 */ sw $a0, 0x0($a3) /* D51F0 8013EAF0 AC620000 */ sw $v0, 0x0($v1) /* D51F4 8013EAF4 34028000 */ ori $v0, $zero, 0x8000 /* D51F8 8013EAF8 AC620004 */ sw $v0, 0x4($v1) /* D51FC 8013EAFC 24820008 */ addiu $v0, $a0, 0x8 /* D5200 8013EB00 ACE20000 */ sw $v0, 0x0($a3) /* D5204 8013EB04 3C02FD10 */ lui $v0, (0xFD100000 >> 16) /* D5208 8013EB08 AC820000 */ sw $v0, 0x0($a0) /* D520C 8013EB0C 24820010 */ addiu $v0, $a0, 0x10 /* D5210 8013EB10 ACE20000 */ sw $v0, 0x0($a3) /* D5214 8013EB14 8E630004 */ lw $v1, 0x4($s3) /* D5218 8013EB18 3C02E800 */ lui $v0, (0xE8000000 >> 16) /* D521C 8013EB1C AC820008 */ sw $v0, 0x8($a0) /* D5220 8013EB20 24820018 */ addiu $v0, $a0, 0x18 /* D5224 8013EB24 AC80000C */ sw $zero, 0xC($a0) /* D5228 8013EB28 ACE20000 */ sw $v0, 0x0($a3) /* D522C 8013EB2C 24820020 */ addiu $v0, $a0, 0x20 /* D5230 8013EB30 AC850010 */ sw $a1, 0x10($a0) /* D5234 8013EB34 AC880014 */ sw $t0, 0x14($a0) /* D5238 8013EB38 ACE20000 */ sw $v0, 0x0($a3) /* D523C 8013EB3C 24820028 */ addiu $v0, $a0, 0x28 /* D5240 8013EB40 AC8A0018 */ sw $t2, 0x18($a0) /* D5244 8013EB44 AC80001C */ sw $zero, 0x1C($a0) /* D5248 8013EB48 ACE20000 */ sw $v0, 0x0($a3) /* D524C 8013EB4C 3C02F000 */ lui $v0, (0xF0000000 >> 16) /* D5250 8013EB50 AC820020 */ sw $v0, 0x20($a0) /* D5254 8013EB54 24820030 */ addiu $v0, $a0, 0x30 /* D5258 8013EB58 AC860024 */ sw $a2, 0x24($a0) /* D525C 8013EB5C ACE20000 */ sw $v0, 0x0($a3) /* D5260 8013EB60 24820038 */ addiu $v0, $a0, 0x38 /* D5264 8013EB64 32A5000F */ andi $a1, $s5, 0xF /* D5268 8013EB68 00052B80 */ sll $a1, $a1, 14 /* D526C 8013EB6C 32C6000F */ andi $a2, $s6, 0xF /* D5270 8013EB70 00063100 */ sll $a2, $a2, 4 /* D5274 8013EB74 AC890028 */ sw $t1, 0x28($a0) /* D5278 8013EB78 AC80002C */ sw $zero, 0x2C($a0) /* D527C 8013EB7C ACE20000 */ sw $v0, 0x0($a3) /* D5280 8013EB80 AC830004 */ sw $v1, 0x4($a0) /* D5284 8013EB84 96620008 */ lhu $v0, 0x8($s3) /* D5288 8013EB88 24830040 */ addiu $v1, $a0, 0x40 /* D528C 8013EB8C ACE30000 */ sw $v1, 0x0($a3) /* D5290 8013EB90 3C03FD48 */ lui $v1, (0xFD480000 >> 16) /* D5294 8013EB94 00021042 */ srl $v0, $v0, 1 /* D5298 8013EB98 2442FFFF */ addiu $v0, $v0, -0x1 /* D529C 8013EB9C 30420FFF */ andi $v0, $v0, 0xFFF /* D52A0 8013EBA0 00431025 */ or $v0, $v0, $v1 /* D52A4 8013EBA4 AC820030 */ sw $v0, 0x30($a0) /* D52A8 8013EBA8 8E630000 */ lw $v1, 0x0($s3) /* D52AC 8013EBAC 24820048 */ addiu $v0, $a0, 0x48 /* D52B0 8013EBB0 ACE20000 */ sw $v0, 0x0($a3) /* D52B4 8013EBB4 AC830034 */ sw $v1, 0x34($a0) /* D52B8 8013EBB8 00C81825 */ or $v1, $a2, $t0 /* D52BC 8013EBBC 96620008 */ lhu $v0, 0x8($s3) /* D52C0 8013EBC0 00A31825 */ or $v1, $a1, $v1 /* D52C4 8013EBC4 AC83003C */ sw $v1, 0x3C($a0) /* D52C8 8013EBC8 3C03F548 */ lui $v1, (0xF5480000 >> 16) /* D52CC 8013EBCC 00021042 */ srl $v0, $v0, 1 /* D52D0 8013EBD0 24420007 */ addiu $v0, $v0, 0x7 /* D52D4 8013EBD4 000210C3 */ sra $v0, $v0, 3 /* D52D8 8013EBD8 304201FF */ andi $v0, $v0, 0x1FF /* D52DC 8013EBDC 00021240 */ sll $v0, $v0, 9 /* D52E0 8013EBE0 00431025 */ or $v0, $v0, $v1 /* D52E4 8013EBE4 AC820038 */ sw $v0, 0x38($a0) /* D52E8 8013EBE8 3C02F400 */ lui $v0, (0xF4000000 >> 16) /* D52EC 8013EBEC AC8A0040 */ sw $t2, 0x40($a0) /* D52F0 8013EBF0 AC800044 */ sw $zero, 0x44($a0) /* D52F4 8013EBF4 AC820048 */ sw $v0, 0x48($a0) /* D52F8 8013EBF8 96620008 */ lhu $v0, 0x8($s3) /* D52FC 8013EBFC 9663000A */ lhu $v1, 0xA($s3) /* D5300 8013EC00 00A62825 */ or $a1, $a1, $a2 /* D5304 8013EC04 AC890050 */ sw $t1, 0x50($a0) /* D5308 8013EC08 AC800054 */ sw $zero, 0x54($a0) /* D530C 8013EC0C 2442FFFF */ addiu $v0, $v0, -0x1 /* D5310 8013EC10 00021040 */ sll $v0, $v0, 1 /* D5314 8013EC14 30420FFF */ andi $v0, $v0, 0xFFF /* D5318 8013EC18 00021300 */ sll $v0, $v0, 12 /* D531C 8013EC1C 2463FFFF */ addiu $v1, $v1, -0x1 /* D5320 8013EC20 00031880 */ sll $v1, $v1, 2 /* D5324 8013EC24 30630FFF */ andi $v1, $v1, 0xFFF /* D5328 8013EC28 00681825 */ or $v1, $v1, $t0 /* D532C 8013EC2C 00431025 */ or $v0, $v0, $v1 /* D5330 8013EC30 AC82004C */ sw $v0, 0x4C($a0) /* D5334 8013EC34 96620008 */ lhu $v0, 0x8($s3) /* D5338 8013EC38 3C03F540 */ lui $v1, (0xF5400000 >> 16) /* D533C 8013EC3C AC85005C */ sw $a1, 0x5C($a0) /* D5340 8013EC40 AC8B0060 */ sw $t3, 0x60($a0) /* D5344 8013EC44 00021042 */ srl $v0, $v0, 1 /* D5348 8013EC48 24420007 */ addiu $v0, $v0, 0x7 /* D534C 8013EC4C 000210C3 */ sra $v0, $v0, 3 /* D5350 8013EC50 304201FF */ andi $v0, $v0, 0x1FF /* D5354 8013EC54 00021240 */ sll $v0, $v0, 9 /* D5358 8013EC58 00431025 */ or $v0, $v0, $v1 /* D535C 8013EC5C AC820058 */ sw $v0, 0x58($a0) /* D5360 8013EC60 96630008 */ lhu $v1, 0x8($s3) /* D5364 8013EC64 9662000A */ lhu $v0, 0xA($s3) /* D5368 8013EC68 246300FF */ addiu $v1, $v1, 0xFF /* D536C 8013EC6C 00031880 */ sll $v1, $v1, 2 /* D5370 8013EC70 30630FFF */ andi $v1, $v1, 0xFFF /* D5374 8013EC74 00031B00 */ sll $v1, $v1, 12 /* D5378 8013EC78 244200FF */ addiu $v0, $v0, 0xFF /* D537C 8013EC7C 00021080 */ sll $v0, $v0, 2 /* D5380 8013EC80 30420FFF */ andi $v0, $v0, 0xFFF /* D5384 8013EC84 00621825 */ or $v1, $v1, $v0 /* D5388 8013EC88 AC830064 */ sw $v1, 0x64($a0) /* D538C 8013EC8C C684004C */ lwc1 $f4, 0x4C($s4) /* D5390 8013EC90 C6860050 */ lwc1 $f6, 0x50($s4) /* D5394 8013EC94 96630008 */ lhu $v1, 0x8($s3) /* D5398 8013EC98 9662000A */ lhu $v0, 0xA($s3) /* D539C 8013EC9C 4600220D */ trunc.w.s $f8, $f4 /* D53A0 8013ECA0 44054000 */ mfc1 $a1, $f8 /* D53A4 8013ECA4 4600320D */ trunc.w.s $f8, $f6 /* D53A8 8013ECA8 44064000 */ mfc1 $a2, $f8 /* D53AC 8013ECAC 00031880 */ sll $v1, $v1, 2 /* D53B0 8013ECB0 44831000 */ mtc1 $v1, $f2 /* D53B4 8013ECB4 00000000 */ nop /* D53B8 8013ECB8 468010A0 */ cvt.s.w $f2, $f2 /* D53BC 8013ECBC 00021080 */ sll $v0, $v0, 2 /* D53C0 8013ECC0 44820000 */ mtc1 $v0, $f0 /* D53C4 8013ECC4 00000000 */ nop /* D53C8 8013ECC8 46800020 */ cvt.s.w $f0, $f0 /* D53CC 8013ECCC 30A50FFF */ andi $a1, $a1, 0xFFF /* D53D0 8013ECD0 00052B00 */ sll $a1, $a1, 12 /* D53D4 8013ECD4 30C60FFF */ andi $a2, $a2, 0xFFF /* D53D8 8013ECD8 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* D53DC 8013ECDC 46041080 */ add.s $f2, $f2, $f4 /* D53E0 8013ECE0 00C23025 */ or $a2, $a2, $v0 /* D53E4 8013ECE4 00A62825 */ or $a1, $a1, $a2 /* D53E8 8013ECE8 46060000 */ add.s $f0, $f0, $f6 /* D53EC 8013ECEC AC850068 */ sw $a1, 0x68($a0) /* D53F0 8013ECF0 4600120D */ trunc.w.s $f8, $f2 /* D53F4 8013ECF4 44024000 */ mfc1 $v0, $f8 /* D53F8 8013ECF8 4600020D */ trunc.w.s $f8, $f0 /* D53FC 8013ECFC 44034000 */ mfc1 $v1, $f8 /* D5400 8013ED00 30420FFF */ andi $v0, $v0, 0xFFF /* D5404 8013ED04 00021300 */ sll $v0, $v0, 12 /* D5408 8013ED08 30630FFF */ andi $v1, $v1, 0xFFF /* D540C 8013ED0C 00431025 */ or $v0, $v0, $v1 /* D5410 8013ED10 AC82006C */ sw $v0, 0x6C($a0) /* D5414 8013ED14 C662000C */ lwc1 $f2, 0xC($s3) /* D5418 8013ED18 468010A0 */ cvt.s.w $f2, $f2 /* D541C 8013ED1C C680004C */ lwc1 $f0, 0x4C($s4) /* D5420 8013ED20 96620008 */ lhu $v0, 0x8($s3) /* D5424 8013ED24 46020000 */ add.s $f0, $f0, $f2 /* D5428 8013ED28 00021080 */ sll $v0, $v0, 2 /* D542C 8013ED2C 4600020D */ trunc.w.s $f8, $f0 /* D5430 8013ED30 44034000 */ mfc1 $v1, $f8 /* D5434 8013ED34 14400002 */ bnez $v0, .L8013ED40 /* D5438 8013ED38 0062001A */ div $zero, $v1, $v0 /* D543C 8013ED3C 0007000D */ break 7 .L8013ED40: /* D5440 8013ED40 2401FFFF */ addiu $at, $zero, -0x1 /* D5444 8013ED44 14410004 */ bne $v0, $at, .L8013ED58 /* D5448 8013ED48 3C018000 */ lui $at, (0x80000000 >> 16) /* D544C 8013ED4C 14610002 */ bne $v1, $at, .L8013ED58 /* D5450 8013ED50 00000000 */ nop /* D5454 8013ED54 0006000D */ break 6 .L8013ED58: /* D5458 8013ED58 00001010 */ mfhi $v0 /* D545C 8013ED5C 44820000 */ mtc1 $v0, $f0 /* D5460 8013ED60 00000000 */ nop /* D5464 8013ED64 46800020 */ cvt.s.w $f0, $f0 /* D5468 8013ED68 E680004C */ swc1 $f0, 0x4C($s4) /* D546C 8013ED6C C6620010 */ lwc1 $f2, 0x10($s3) /* D5470 8013ED70 468010A0 */ cvt.s.w $f2, $f2 /* D5474 8013ED74 C6800050 */ lwc1 $f0, 0x50($s4) /* D5478 8013ED78 9662000A */ lhu $v0, 0xA($s3) /* D547C 8013ED7C 46020000 */ add.s $f0, $f0, $f2 /* D5480 8013ED80 00021080 */ sll $v0, $v0, 2 /* D5484 8013ED84 4600020D */ trunc.w.s $f8, $f0 /* D5488 8013ED88 44034000 */ mfc1 $v1, $f8 /* D548C 8013ED8C 14400002 */ bnez $v0, .L8013ED98 /* D5490 8013ED90 0062001A */ div $zero, $v1, $v0 /* D5494 8013ED94 0007000D */ break 7 .L8013ED98: /* D5498 8013ED98 2401FFFF */ addiu $at, $zero, -0x1 /* D549C 8013ED9C 14410004 */ bne $v0, $at, .L8013EDB0 /* D54A0 8013EDA0 3C018000 */ lui $at, (0x80000000 >> 16) /* D54A4 8013EDA4 14610002 */ bne $v1, $at, .L8013EDB0 /* D54A8 8013EDA8 00000000 */ nop /* D54AC 8013EDAC 0006000D */ break 6 .L8013EDB0: /* D54B0 8013EDB0 00002810 */ mfhi $a1 /* D54B4 8013EDB4 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* D54B8 8013EDB8 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* D54BC 8013EDBC 24820050 */ addiu $v0, $a0, 0x50 /* D54C0 8013EDC0 ACE20000 */ sw $v0, 0x0($a3) /* D54C4 8013EDC4 24820058 */ addiu $v0, $a0, 0x58 /* D54C8 8013EDC8 ACE20000 */ sw $v0, 0x0($a3) /* D54CC 8013EDCC 24820060 */ addiu $v0, $a0, 0x60 /* D54D0 8013EDD0 ACE20000 */ sw $v0, 0x0($a3) /* D54D4 8013EDD4 24820068 */ addiu $v0, $a0, 0x68 /* D54D8 8013EDD8 ACE20000 */ sw $v0, 0x0($a3) /* D54DC 8013EDDC 24820070 */ addiu $v0, $a0, 0x70 /* D54E0 8013EDE0 ACE20000 */ sw $v0, 0x0($a3) /* D54E4 8013EDE4 24820078 */ addiu $v0, $a0, 0x78 /* D54E8 8013EDE8 44850000 */ mtc1 $a1, $f0 /* D54EC 8013EDEC 00000000 */ nop /* D54F0 8013EDF0 46800020 */ cvt.s.w $f0, $f0 /* D54F4 8013EDF4 E6800050 */ swc1 $f0, 0x50($s4) /* D54F8 8013EDF8 ACE20000 */ sw $v0, 0x0($a3) /* D54FC 8013EDFC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* D5500 8013EE00 AC820070 */ sw $v0, 0x70($a0) /* D5504 8013EE04 8E630014 */ lw $v1, 0x14($s3) /* D5508 8013EE08 24820080 */ addiu $v0, $a0, 0x80 /* D550C 8013EE0C ACE20000 */ sw $v0, 0x0($a3) /* D5510 8013EE10 24020040 */ addiu $v0, $zero, 0x40 /* D5514 8013EE14 AC860078 */ sw $a2, 0x78($a0) /* D5518 8013EE18 AC82007C */ sw $v0, 0x7C($a0) /* D551C 8013EE1C AC830074 */ sw $v1, 0x74($a0) /* D5520 8013EE20 8FBF002C */ lw $ra, 0x2C($sp) /* D5524 8013EE24 8FB60028 */ lw $s6, 0x28($sp) /* D5528 8013EE28 8FB50024 */ lw $s5, 0x24($sp) /* D552C 8013EE2C 8FB40020 */ lw $s4, 0x20($sp) /* D5530 8013EE30 8FB3001C */ lw $s3, 0x1C($sp) /* D5534 8013EE34 8FB20018 */ lw $s2, 0x18($sp) /* D5538 8013EE38 8FB10014 */ lw $s1, 0x14($sp) /* D553C 8013EE3C 8FB00010 */ lw $s0, 0x10($sp) /* D5540 8013EE40 03E00008 */ jr $ra /* D5544 8013EE44 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void imgfx_appendGfx_mesh_strip(ImgFXState* state, Matrix4f mtx) { ImgFXOverlayTexture* ufs = state->ints.overlay.pattern; s32 shifts = integer_log(ufs->width, 2); s32 shiftt = integer_log(ufs->height, 2); s32 uls, ult; s32 lrs, lrt; guScale(&gDisplayContext->matrixStack[gMatrixListPos], (f32)ImgFXCurrentTexturePtr->tex.width / 100.0, (f32)ImgFXCurrentTexturePtr->tex.height / 100.0, 1.0f); gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_XLU_DECAL, G_RM_ZB_XLU_DECAL2); if (state->renderType == IMGFX_RENDER_OVERLAY_RGBA) { s32 alpha = state->ints.overlay.alpha; gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha); gDPSetCombineMode(gMainGfxPos++, PM_CC_05, PM_CC_05); } else { gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA); } gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16); gDPLoadTLUT_pal16(gMainGfxPos++, 0, ufs->palette); gDPScrollTextureTile_4b(gMainGfxPos++, ufs->raster, G_IM_FMT_CI, ufs->width, ufs->height, 0, 0, ufs->width - 1, ufs->height - 1, 0, G_TX_WRAP, G_TX_WRAP, shifts, shiftt, G_TX_NOLOD, G_TX_NOLOD, 256, 256); uls = state->floats.overlay.posX; ult = state->floats.overlay.posY; lrs = ufs->width * 4 + state->floats.overlay.posX; lrt = ufs->height * 4 + state->floats.overlay.posY; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, lrs, lrt); state->floats.overlay.posX = (s32)(state->floats.overlay.posX + ufs->offsetX) % (ufs->width * 4); state->floats.overlay.posY = (s32)(state->floats.overlay.posY + ufs->offsetY) % (ufs->height * 4); gSPDisplayList(gMainGfxPos++, ufs->displayList); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel mdl_project_tex_coords /* B2A2C 8011C32C 27BDFF68 */ addiu $sp, $sp, -0x98 /* B2A30 8011C330 AFB40058 */ sw $s4, 0x58($sp) /* B2A34 8011C334 00A0A02D */ daddu $s4, $a1, $zero /* B2A38 8011C338 AFB00048 */ sw $s0, 0x48($sp) /* B2A3C 8011C33C 00C0802D */ daddu $s0, $a2, $zero /* B2A40 8011C340 AFB5005C */ sw $s5, 0x5C($sp) /* B2A44 8011C344 00E0A82D */ daddu $s5, $a3, $zero /* B2A48 8011C348 AFBF0060 */ sw $ra, 0x60($sp) /* B2A4C 8011C34C AFB30054 */ sw $s3, 0x54($sp) /* B2A50 8011C350 AFB20050 */ sw $s2, 0x50($sp) /* B2A54 8011C354 AFB1004C */ sw $s1, 0x4C($sp) /* B2A58 8011C358 F7BE0090 */ sdc1 $f30, 0x90($sp) /* B2A5C 8011C35C F7BC0088 */ sdc1 $f28, 0x88($sp) /* B2A60 8011C360 F7BA0080 */ sdc1 $f26, 0x80($sp) /* B2A64 8011C364 F7B80078 */ sdc1 $f24, 0x78($sp) /* B2A68 8011C368 F7B60070 */ sdc1 $f22, 0x70($sp) /* B2A6C 8011C36C F7B40068 */ sdc1 $f20, 0x68($sp) /* B2A70 8011C370 0C046C04 */ jal get_model_list_index_from_tree_index /* B2A74 8011C374 3084FFFF */ andi $a0, $a0, 0xFFFF /* B2A78 8011C378 0C046B4C */ jal get_model_from_list_index /* B2A7C 8011C37C 0040202D */ daddu $a0, $v0, $zero /* B2A80 8011C380 8C420008 */ lw $v0, 0x8($v0) /* B2A84 8011C384 240600DF */ addiu $a2, $zero, 0xDF /* B2A88 8011C388 8C420004 */ lw $v0, 0x4($v0) /* B2A8C 8011C38C 24050001 */ addiu $a1, $zero, 0x1 /* B2A90 8011C390 8C420000 */ lw $v0, 0x0($v0) .L8011C394: /* B2A94 8011C394 90430000 */ lbu $v1, 0x0($v0) /* B2A98 8011C398 10660004 */ beq $v1, $a2, .L8011C3AC /* B2A9C 8011C39C 8C440004 */ lw $a0, 0x4($v0) /* B2AA0 8011C3A0 1465FFFC */ bne $v1, $a1, .L8011C394 /* B2AA4 8011C3A4 24420008 */ addiu $v0, $v0, 0x8 /* B2AA8 8011C3A8 AFA4001C */ sw $a0, 0x1C($sp) .L8011C3AC: /* B2AAC 8011C3AC 8FA2001C */ lw $v0, 0x1C($sp) /* B2AB0 8011C3B0 84430000 */ lh $v1, 0x0($v0) /* B2AB4 8011C3B4 84440010 */ lh $a0, 0x10($v0) /* B2AB8 8011C3B8 44838000 */ mtc1 $v1, $f16 /* B2ABC 8011C3BC 00000000 */ nop /* B2AC0 8011C3C0 46808420 */ cvt.s.w $f16, $f16 /* B2AC4 8011C3C4 44842000 */ mtc1 $a0, $f4 /* B2AC8 8011C3C8 00000000 */ nop /* B2ACC 8011C3CC 46802120 */ cvt.s.w $f4, $f4 /* B2AD0 8011C3D0 46048032 */ c.eq.s $f16, $f4 /* B2AD4 8011C3D4 84430004 */ lh $v1, 0x4($v0) /* B2AD8 8011C3D8 84440008 */ lh $a0, 0x8($v0) /* B2ADC 8011C3DC 44839000 */ mtc1 $v1, $f18 /* B2AE0 8011C3E0 00000000 */ nop /* B2AE4 8011C3E4 468094A0 */ cvt.s.w $f18, $f18 /* B2AE8 8011C3E8 4484A000 */ mtc1 $a0, $f20 /* B2AEC 8011C3EC 00000000 */ nop /* B2AF0 8011C3F0 4680A520 */ cvt.s.w $f20, $f20 /* B2AF4 8011C3F4 8443000A */ lh $v1, 0xA($v0) /* B2AF8 8011C3F8 84440014 */ lh $a0, 0x14($v0) /* B2AFC 8011C3FC 4483B000 */ mtc1 $v1, $f22 /* B2B00 8011C400 00000000 */ nop /* B2B04 8011C404 4680B5A0 */ cvt.s.w $f22, $f22 /* B2B08 8011C408 44845000 */ mtc1 $a0, $f10 /* B2B0C 8011C40C 00000000 */ nop /* B2B10 8011C410 468052A0 */ cvt.s.w $f10, $f10 /* B2B14 8011C414 E7B60038 */ swc1 $f22, 0x38($sp) /* B2B18 8011C418 84430018 */ lh $v1, 0x18($v0) /* B2B1C 8011C41C 8444001A */ lh $a0, 0x1A($v0) /* B2B20 8011C420 44830000 */ mtc1 $v1, $f0 /* B2B24 8011C424 00000000 */ nop /* B2B28 8011C428 46800020 */ cvt.s.w $f0, $f0 /* B2B2C 8011C42C 4484E000 */ mtc1 $a0, $f28 /* B2B30 8011C430 00000000 */ nop /* B2B34 8011C434 4680E720 */ cvt.s.w $f28, $f28 /* B2B38 8011C438 E7BC0024 */ swc1 $f28, 0x24($sp) /* B2B3C 8011C43C 84430020 */ lh $v1, 0x20($v0) /* B2B40 8011C440 84440024 */ lh $a0, 0x24($v0) /* B2B44 8011C444 4483C000 */ mtc1 $v1, $f24 /* B2B48 8011C448 00000000 */ nop /* B2B4C 8011C44C 4680C620 */ cvt.s.w $f24, $f24 /* B2B50 8011C450 44843000 */ mtc1 $a0, $f6 /* B2B54 8011C454 00000000 */ nop /* B2B58 8011C458 468031A0 */ cvt.s.w $f6, $f6 /* B2B5C 8011C45C 84430028 */ lh $v1, 0x28($v0) /* B2B60 8011C460 8444002A */ lh $a0, 0x2A($v0) /* B2B64 8011C464 4483D000 */ mtc1 $v1, $f26 /* B2B68 8011C468 00000000 */ nop /* B2B6C 8011C46C 4680D6A0 */ cvt.s.w $f26, $f26 /* B2B70 8011C470 4484B000 */ mtc1 $a0, $f22 /* B2B74 8011C474 00000000 */ nop /* B2B78 8011C478 4680B5A0 */ cvt.s.w $f22, $f22 /* B2B7C 8011C47C E7B60028 */ swc1 $f22, 0x28($sp) /* B2B80 8011C480 9053000C */ lbu $s3, 0xC($v0) /* B2B84 8011C484 9052000D */ lbu $s2, 0xD($v0) /* B2B88 8011C488 9051000E */ lbu $s1, 0xE($v0) /* B2B8C 8011C48C 4503002E */ bc1tl .L8011C548 /* B2B90 8011C490 46069081 */ sub.s $f2, $f18, $f6 /* B2B94 8011C494 46188081 */ sub.s $f2, $f16, $f24 /* B2B98 8011C498 46048381 */ sub.s $f14, $f16, $f4 /* B2B9C 8011C49C 4600A201 */ sub.s $f8, $f20, $f0 /* B2BA0 8011C4A0 460E1083 */ div.s $f2, $f2, $f14 /* B2BA4 8011C4A4 46081002 */ mul.s $f0, $f2, $f8 /* B2BA8 8011C4A8 00000000 */ nop /* B2BAC 8011C4AC 460A9301 */ sub.s $f12, $f18, $f10 /* B2BB0 8011C4B0 460C1282 */ mul.s $f10, $f2, $f12 /* B2BB4 8011C4B4 00000000 */ nop /* B2BB8 8011C4B8 461AA101 */ sub.s $f4, $f20, $f26 /* B2BBC 8011C4BC 46069181 */ sub.s $f6, $f18, $f6 /* B2BC0 8011C4C0 46040001 */ sub.s $f0, $f0, $f4 /* B2BC4 8011C4C4 46065281 */ sub.s $f10, $f10, $f6 /* B2BC8 8011C4C8 460A0003 */ div.s $f0, $f0, $f10 /* B2BCC 8011C4CC E7A00040 */ swc1 $f0, 0x40($sp) /* B2BD0 8011C4D0 46006002 */ mul.s $f0, $f12, $f0 /* B2BD4 8011C4D4 00000000 */ nop /* B2BD8 8011C4D8 C7B60038 */ lwc1 $f22, 0x38($sp) /* B2BDC 8011C4DC 461CB101 */ sub.s $f4, $f22, $f28 /* B2BE0 8011C4E0 46041082 */ mul.s $f2, $f2, $f4 /* B2BE4 8011C4E4 00000000 */ nop /* B2BE8 8011C4E8 46004201 */ sub.s $f8, $f8, $f0 /* B2BEC 8011C4EC 460E4783 */ div.s $f30, $f8, $f14 /* B2BF0 8011C4F0 4610F182 */ mul.s $f6, $f30, $f16 /* B2BF4 8011C4F4 00000000 */ nop /* B2BF8 8011C4F8 C7BC0028 */ lwc1 $f28, 0x28($sp) /* B2BFC 8011C4FC 461CB001 */ sub.s $f0, $f22, $f28 /* B2C00 8011C500 C7B60040 */ lwc1 $f22, 0x40($sp) /* B2C04 8011C504 4612B202 */ mul.s $f8, $f22, $f18 /* B2C08 8011C508 00000000 */ nop /* B2C0C 8011C50C 46001081 */ sub.s $f2, $f2, $f0 /* B2C10 8011C510 460A1683 */ div.s $f26, $f2, $f10 /* B2C14 8011C514 461A6302 */ mul.s $f12, $f12, $f26 /* B2C18 8011C518 00000000 */ nop /* B2C1C 8011C51C 4612D082 */ mul.s $f2, $f26, $f18 /* B2C20 8011C520 00000000 */ nop /* B2C24 8011C524 460C2101 */ sub.s $f4, $f4, $f12 /* B2C28 8011C528 460E2603 */ div.s $f24, $f4, $f14 /* B2C2C 8011C52C 4610C002 */ mul.s $f0, $f24, $f16 /* B2C30 8011C530 00000000 */ nop /* B2C34 8011C534 4606A181 */ sub.s $f6, $f20, $f6 /* B2C38 8011C538 46083181 */ sub.s $f6, $f6, $f8 /* B2C3C 8011C53C C7BC0038 */ lwc1 $f28, 0x38($sp) /* B2C40 8011C540 0804717C */ j .L8011C5F0 /* B2C44 8011C544 4600E001 */ sub.s $f0, $f28, $f0 .L8011C548: /* B2C48 8011C548 460A9381 */ sub.s $f14, $f18, $f10 /* B2C4C 8011C54C 4600A201 */ sub.s $f8, $f20, $f0 /* B2C50 8011C550 460E1083 */ div.s $f2, $f2, $f14 /* B2C54 8011C554 46081002 */ mul.s $f0, $f2, $f8 /* B2C58 8011C558 00000000 */ nop /* B2C5C 8011C55C 46048301 */ sub.s $f12, $f16, $f4 /* B2C60 8011C560 460C1282 */ mul.s $f10, $f2, $f12 /* B2C64 8011C564 00000000 */ nop /* B2C68 8011C568 461AA101 */ sub.s $f4, $f20, $f26 /* B2C6C 8011C56C 46188181 */ sub.s $f6, $f16, $f24 /* B2C70 8011C570 46040001 */ sub.s $f0, $f0, $f4 /* B2C74 8011C574 46065281 */ sub.s $f10, $f10, $f6 /* B2C78 8011C578 460A0783 */ div.s $f30, $f0, $f10 /* B2C7C 8011C57C 461E6002 */ mul.s $f0, $f12, $f30 /* B2C80 8011C580 00000000 */ nop /* B2C84 8011C584 4610F182 */ mul.s $f6, $f30, $f16 /* B2C88 8011C588 00000000 */ nop /* B2C8C 8011C58C C7B60038 */ lwc1 $f22, 0x38($sp) /* B2C90 8011C590 C7BC0024 */ lwc1 $f28, 0x24($sp) /* B2C94 8011C594 461CB101 */ sub.s $f4, $f22, $f28 /* B2C98 8011C598 46041082 */ mul.s $f2, $f2, $f4 /* B2C9C 8011C59C 00000000 */ nop /* B2CA0 8011C5A0 46004201 */ sub.s $f8, $f8, $f0 /* B2CA4 8011C5A4 460E4203 */ div.s $f8, $f8, $f14 /* B2CA8 8011C5A8 E7A80040 */ swc1 $f8, 0x40($sp) /* B2CAC 8011C5AC 46124202 */ mul.s $f8, $f8, $f18 /* B2CB0 8011C5B0 00000000 */ nop /* B2CB4 8011C5B4 C7BC0028 */ lwc1 $f28, 0x28($sp) /* B2CB8 8011C5B8 461CB001 */ sub.s $f0, $f22, $f28 /* B2CBC 8011C5BC 46001081 */ sub.s $f2, $f2, $f0 /* B2CC0 8011C5C0 460A1603 */ div.s $f24, $f2, $f10 /* B2CC4 8011C5C4 46186302 */ mul.s $f12, $f12, $f24 /* B2CC8 8011C5C8 00000000 */ nop /* B2CCC 8011C5CC 4610C002 */ mul.s $f0, $f24, $f16 /* B2CD0 8011C5D0 00000000 */ nop /* B2CD4 8011C5D4 460C2101 */ sub.s $f4, $f4, $f12 /* B2CD8 8011C5D8 460E2683 */ div.s $f26, $f4, $f14 /* B2CDC 8011C5DC 4612D082 */ mul.s $f2, $f26, $f18 /* B2CE0 8011C5E0 00000000 */ nop /* B2CE4 8011C5E4 4606A181 */ sub.s $f6, $f20, $f6 /* B2CE8 8011C5E8 46083181 */ sub.s $f6, $f6, $f8 /* B2CEC 8011C5EC 4600B001 */ sub.s $f0, $f22, $f0 .L8011C5F0: /* B2CF0 8011C5F0 E7A6002C */ swc1 $f6, 0x2C($sp) /* B2CF4 8011C5F4 46020501 */ sub.s $f20, $f0, $f2 /* B2CF8 8011C5F8 0280202D */ daddu $a0, $s4, $zero /* B2CFC 8011C5FC 27A50018 */ addiu $a1, $sp, 0x18 /* B2D00 8011C600 27A6001C */ addiu $a2, $sp, 0x1C /* B2D04 8011C604 27A70020 */ addiu $a3, $sp, 0x20 /* B2D08 8011C608 0C04700A */ jal mdl_get_vertex_count /* B2D0C 8011C60C AFB50010 */ sw $s5, 0x10($sp) /* B2D10 8011C610 8FA20018 */ lw $v0, 0x18($sp) /* B2D14 8011C614 1840006E */ blez $v0, .L8011C7D0 /* B2D18 8011C618 0000282D */ daddu $a1, $zero, $zero /* B2D1C 8011C61C 44809000 */ mtc1 $zero, $f18 /* B2D20 8011C620 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* B2D24 8011C624 44818800 */ mtc1 $at, $f17 /* B2D28 8011C628 44808000 */ mtc1 $zero, $f16 .L8011C62C: /* B2D2C 8011C62C 8FA3001C */ lw $v1, 0x1C($sp) /* B2D30 8011C630 84620000 */ lh $v0, 0x0($v1) /* B2D34 8011C634 44823000 */ mtc1 $v0, $f6 /* B2D38 8011C638 00000000 */ nop /* B2D3C 8011C63C 468031A0 */ cvt.s.w $f6, $f6 /* B2D40 8011C640 84620002 */ lh $v0, 0x2($v1) /* B2D44 8011C644 84630004 */ lh $v1, 0x4($v1) /* B2D48 8011C648 44827000 */ mtc1 $v0, $f14 /* B2D4C 8011C64C 00000000 */ nop /* B2D50 8011C650 468073A0 */ cvt.s.w $f14, $f14 /* B2D54 8011C654 44836000 */ mtc1 $v1, $f12 /* B2D58 8011C658 00000000 */ nop /* B2D5C 8011C65C 46806320 */ cvt.s.w $f12, $f12 /* B2D60 8011C660 1200001C */ beqz $s0, .L8011C6D4 /* B2D64 8011C664 46003286 */ mov.s $f10, $f6 /* B2D68 8011C668 C6040000 */ lwc1 $f4, 0x0($s0) /* B2D6C 8011C66C 46062102 */ mul.s $f4, $f4, $f6 /* B2D70 8011C670 00000000 */ nop /* B2D74 8011C674 C60A0010 */ lwc1 $f10, 0x10($s0) /* B2D78 8011C678 460E5282 */ mul.s $f10, $f10, $f14 /* B2D7C 8011C67C 00000000 */ nop /* B2D80 8011C680 C6000020 */ lwc1 $f0, 0x20($s0) /* B2D84 8011C684 460C0002 */ mul.s $f0, $f0, $f12 /* B2D88 8011C688 00000000 */ nop /* B2D8C 8011C68C C6020008 */ lwc1 $f2, 0x8($s0) /* B2D90 8011C690 46061082 */ mul.s $f2, $f2, $f6 /* B2D94 8011C694 00000000 */ nop /* B2D98 8011C698 C6080018 */ lwc1 $f8, 0x18($s0) /* B2D9C 8011C69C 460E4202 */ mul.s $f8, $f8, $f14 /* B2DA0 8011C6A0 00000000 */ nop /* B2DA4 8011C6A4 C6060028 */ lwc1 $f6, 0x28($s0) /* B2DA8 8011C6A8 460C3182 */ mul.s $f6, $f6, $f12 /* B2DAC 8011C6AC 00000000 */ nop /* B2DB0 8011C6B0 460A2100 */ add.s $f4, $f4, $f10 /* B2DB4 8011C6B4 46081080 */ add.s $f2, $f2, $f8 /* B2DB8 8011C6B8 46002100 */ add.s $f4, $f4, $f0 /* B2DBC 8011C6BC 46061080 */ add.s $f2, $f2, $f6 /* B2DC0 8011C6C0 C6000030 */ lwc1 $f0, 0x30($s0) /* B2DC4 8011C6C4 46002280 */ add.s $f10, $f4, $f0 /* B2DC8 8011C6C8 C6000038 */ lwc1 $f0, 0x38($s0) /* B2DCC 8011C6CC 080471B6 */ j .L8011C6D8 /* B2DD0 8011C6D0 46001180 */ add.s $f6, $f2, $f0 .L8011C6D4: /* B2DD4 8011C6D4 46006186 */ mov.s $f6, $f12 .L8011C6D8: /* B2DD8 8011C6D8 460AF002 */ mul.s $f0, $f30, $f10 /* B2DDC 8011C6DC 00000000 */ nop /* B2DE0 8011C6E0 460AC082 */ mul.s $f2, $f24, $f10 /* B2DE4 8011C6E4 00000000 */ nop /* B2DE8 8011C6E8 C7B60040 */ lwc1 $f22, 0x40($sp) /* B2DEC 8011C6EC 4606B102 */ mul.s $f4, $f22, $f6 /* B2DF0 8011C6F0 00000000 */ nop /* B2DF4 8011C6F4 4606D182 */ mul.s $f6, $f26, $f6 /* B2DF8 8011C6F8 00000000 */ nop /* B2DFC 8011C6FC 46040000 */ add.s $f0, $f0, $f4 /* B2E00 8011C700 46061080 */ add.s $f2, $f2, $f6 /* B2E04 8011C704 C7BC002C */ lwc1 $f28, 0x2C($sp) /* B2E08 8011C708 461C0100 */ add.s $f4, $f0, $f28 /* B2E0C 8011C70C 4612203C */ c.lt.s $f4, $f18 /* B2E10 8011C710 00000000 */ nop /* B2E14 8011C714 45000004 */ bc1f .L8011C728 /* B2E18 8011C718 46141080 */ add.s $f2, $f2, $f20 /* B2E1C 8011C71C 46002021 */ cvt.d.s $f0, $f4 /* B2E20 8011C720 080471D0 */ j .L8011C740 /* B2E24 8011C724 46300001 */ sub.d $f0, $f0, $f16 .L8011C728: /* B2E28 8011C728 4604903C */ c.lt.s $f18, $f4 /* B2E2C 8011C72C 00000000 */ nop /* B2E30 8011C730 45000004 */ bc1f .L8011C744 /* B2E34 8011C734 00000000 */ nop /* B2E38 8011C738 46002021 */ cvt.d.s $f0, $f4 /* B2E3C 8011C73C 46300000 */ add.d $f0, $f0, $f16 .L8011C740: /* B2E40 8011C740 46200120 */ cvt.s.d $f4, $f0 .L8011C744: /* B2E44 8011C744 4612103C */ c.lt.s $f2, $f18 /* B2E48 8011C748 00000000 */ nop /* B2E4C 8011C74C 45000004 */ bc1f .L8011C760 /* B2E50 8011C750 00000000 */ nop /* B2E54 8011C754 46001021 */ cvt.d.s $f0, $f2 /* B2E58 8011C758 080471DE */ j .L8011C778 /* B2E5C 8011C75C 46300001 */ sub.d $f0, $f0, $f16 .L8011C760: /* B2E60 8011C760 4602903C */ c.lt.s $f18, $f2 /* B2E64 8011C764 00000000 */ nop /* B2E68 8011C768 45000004 */ bc1f .L8011C77C /* B2E6C 8011C76C 00000000 */ nop /* B2E70 8011C770 46001021 */ cvt.d.s $f0, $f2 /* B2E74 8011C774 46300000 */ add.d $f0, $f0, $f16 .L8011C778: /* B2E78 8011C778 462000A0 */ cvt.s.d $f2, $f0 .L8011C77C: /* B2E7C 8011C77C 8FA3001C */ lw $v1, 0x1C($sp) /* B2E80 8011C780 4600258D */ trunc.w.s $f22, $f4 /* B2E84 8011C784 4402B000 */ mfc1 $v0, $f22 /* B2E88 8011C788 00000000 */ nop /* B2E8C 8011C78C A4620008 */ sh $v0, 0x8($v1) /* B2E90 8011C790 A073000C */ sb $s3, 0xC($v1) /* B2E94 8011C794 8FA4001C */ lw $a0, 0x1C($sp) /* B2E98 8011C798 4600158D */ trunc.w.s $f22, $f2 /* B2E9C 8011C79C 4402B000 */ mfc1 $v0, $f22 /* B2EA0 8011C7A0 00000000 */ nop /* B2EA4 8011C7A4 A462000A */ sh $v0, 0xA($v1) /* B2EA8 8011C7A8 A092000D */ sb $s2, 0xD($a0) /* B2EAC 8011C7AC 8FA2001C */ lw $v0, 0x1C($sp) /* B2EB0 8011C7B0 24A50001 */ addiu $a1, $a1, 0x1 /* B2EB4 8011C7B4 A051000E */ sb $s1, 0xE($v0) /* B2EB8 8011C7B8 8FA2001C */ lw $v0, 0x1C($sp) /* B2EBC 8011C7BC 8FA30018 */ lw $v1, 0x18($sp) /* B2EC0 8011C7C0 24420010 */ addiu $v0, $v0, 0x10 /* B2EC4 8011C7C4 00A3182A */ slt $v1, $a1, $v1 /* B2EC8 8011C7C8 1460FF98 */ bnez $v1, .L8011C62C /* B2ECC 8011C7CC AFA2001C */ sw $v0, 0x1C($sp) .L8011C7D0: /* B2ED0 8011C7D0 8FBF0060 */ lw $ra, 0x60($sp) /* B2ED4 8011C7D4 8FB5005C */ lw $s5, 0x5C($sp) /* B2ED8 8011C7D8 8FB40058 */ lw $s4, 0x58($sp) /* B2EDC 8011C7DC 8FB30054 */ lw $s3, 0x54($sp) /* B2EE0 8011C7E0 8FB20050 */ lw $s2, 0x50($sp) /* B2EE4 8011C7E4 8FB1004C */ lw $s1, 0x4C($sp) /* B2EE8 8011C7E8 8FB00048 */ lw $s0, 0x48($sp) /* B2EEC 8011C7EC D7BE0090 */ ldc1 $f30, 0x90($sp) /* B2EF0 8011C7F0 D7BC0088 */ ldc1 $f28, 0x88($sp) /* B2EF4 8011C7F4 D7BA0080 */ ldc1 $f26, 0x80($sp) /* B2EF8 8011C7F8 D7B80078 */ ldc1 $f24, 0x78($sp) /* B2EFC 8011C7FC D7B60070 */ ldc1 $f22, 0x70($sp) /* B2F00 8011C800 D7B40068 */ ldc1 $f20, 0x68($sp) /* B2F04 8011C804 03E00008 */ jr $ra /* B2F08 8011C808 27BD0098 */ addiu $sp, $sp, 0x98 ### DECOMPILED C INSTRUCTIONS: void mdl_project_tex_coords(s32 modelID, Gfx* arg1, Matrix4f arg2, Vtx* arg3) { s32 sp18; Vtx* baseVtx; s32 sp20; f32 v1tc1; f32 v2tc1; f32 sp2C; f32 v0tc1; f32 sp40; f32 v1tc0; f32 v1ob2; f32 ob2; f32 ob1; f32 v0ob0; f32 v0ob2; f32 v0tc0; f32 v2ob0; f32 v2tc0; f32 v1ob0; f32 v2ob2; f32 ob0; f32 var_f10; f32 var_f24; f32 var_f26; f32 tc1; f32 var_f30; f32 tc0; f32 var_f6_2; s32 i; u32 cnB; u32 cnG; u32 cnR; f32 var_f20; s32 listIndex; Model* model; Gfx* dlist; s32 cmd; Vtx* tempVert; s8 zero = 0; // TODO needed to match listIndex = get_model_list_index_from_tree_index(modelID & 0xFFFF); model = get_model_from_list_index(listIndex); dlist = model->modelNode->displayData->displayList; while (TRUE) { cmd = dlist->words.w0 >> 0x18; tempVert = (Vtx*)dlist->words.w1; if (cmd == G_ENDDL) { break; } if (cmd == G_VTX) { baseVtx = tempVert; break; } dlist++; } v0ob0 = baseVtx[zero].v.ob[0]; v0ob2 = baseVtx[zero].v.ob[2]; v0tc0 = baseVtx[zero].v.tc[0]; v0tc1 = baseVtx[zero].v.tc[1]; v1ob0 = baseVtx[1].v.ob[0]; v1ob2 = baseVtx[1].v.ob[2]; v1tc0 = baseVtx[1].v.tc[0]; v1tc1 = baseVtx[1].v.tc[1]; v2ob0 = baseVtx[2].v.ob[0]; v2ob2 = baseVtx[2].v.ob[2]; v2tc0 = baseVtx[2].v.tc[0]; v2tc1 = baseVtx[2].v.tc[1]; cnR = baseVtx[0].v.cn[0]; cnG = baseVtx[0].v.cn[1]; cnB = baseVtx[0].v.cn[2]; if (v0ob0 != v1ob0) { f32 f2 = v0ob0 - v2ob0; f32 f14 = v0ob0 - v1ob0; f32 f8 = v0tc0 - v1tc0; f32 f2a = f2 / f14; f32 f0 = f2a * f8; f32 f12 = v0ob2 - v1ob2; f32 f10 = f2a * f12; f32 f4 = v0tc0 - v2tc0; f32 f6 = v0ob2 - v2ob2; f32 f0a = f0 - f4; f32 f10a = f10 - f6; f32 f0b, f4a, f2b, f8a, f6a, f0c, f8b, f2c, f12a, f2d, f4b, f0d, f6b, f0e; sp40 = f0a / f10a; // used later f0b = f12 * sp40; f4a = v0tc1 - v1tc1; f2b = f2a * f4a; f8a = f8 - f0b; var_f30 = f8a / f14; // used later f6a = var_f30 * v0ob0; f0c = v0tc1 - v2tc1; f2c = f2b - f0c; var_f26 = f2c / f10a; // used later f12a = f12 * var_f26; var_f24 = (f4a - f12a) / f14; // used later sp2C = v0tc0 - f6a - sp40 * v0ob2; // used later var_f20 = v0tc1 - var_f24 * v0ob0 - var_f26 * v0ob2; // used later } else { f32 f2 = v0ob2 - v2ob2; f32 f14 = v0ob2 - v1ob2; f32 f8 = v0tc0 - v1tc0; f32 f12 = v0ob0 - v1ob0; f32 f4 = v0tc0 - v2tc0; f32 f6 = v0ob0 - v2ob0; f32 f0 = f2 / f14 * f8; f32 f10 = f2 / f14 * f12; f32 f0b, f4a, f2b, f8a, f6a, f0c, f8b, f2c, f12a, f2d, f4b, f0d, f6b, f0e; var_f30 = (f0 - f4) / (f10 - f6); // used later f0b = f12 * var_f30; f6a = var_f30 * v0ob0; f4a = v0tc1 - v1tc1; f2b = f2 / f14 * f4a; f8a = f8 - f0b; sp40 = f8a / f14; // used later f8b = sp40 * v0ob2; f0c = v0tc1 - v2tc1; var_f24 = (f2b - f0c) / (f10 - f6); // used later var_f26 = (f4a - f12 * var_f24) / f14; // used later sp2C = v0tc0 - f6a - f8b; // used later var_f20 = v0tc1 - var_f24 * v0ob0 - var_f26 * v0ob2; // used later } mdl_get_vertex_count(arg1, &sp18, &baseVtx, &sp20, arg3); for (i = 0; i < sp18; i++) { ob0 = baseVtx->v.ob[0]; ob1 = baseVtx->v.ob[1]; ob2 = baseVtx->v.ob[2]; if (arg2 != NULL) { var_f10 = (arg2[0][0] * ob0) + (arg2[1][0] * ob1) + (arg2[2][0] * ob2) + arg2[3][0]; var_f6_2 = (arg2[0][2] * ob0) + (arg2[1][2] * ob1) + (arg2[2][2] * ob2) + arg2[3][2]; } else { var_f10 = ob0; var_f6_2 = ob2; } tc0 = (var_f30 * var_f10) + (sp40 * var_f6_2) + sp2C; tc1 = (var_f24 * var_f10) + (var_f26 * var_f6_2) + var_f20; if (tc0 < 0.0f) { tc0 -= 0.5; } else if (tc0 > 0.0f) { tc0 += 0.5; } if (tc1 < 0.0f) { tc1 -= 0.5; } else if (tc1 > 0.0f) { tc1 += 0.5; } baseVtx->v.tc[0] = tc0; baseVtx->v.tc[1] = tc1; baseVtx->v.cn[0] = cnR; baseVtx->v.cn[1] = cnG; baseVtx->v.cn[2] = cnB; baseVtx++; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel __divdi3 /* 48C00 8006D800 04810008 */ bgez $a0, .L8006D824 /* 48C04 8006D804 0000C02D */ daddu $t8, $zero, $zero /* 48C08 8006D808 2418FFFF */ addiu $t8, $zero, -0x1 /* 48C0C 8006D80C 00054823 */ negu $t1, $a1 /* 48C10 8006D810 00041823 */ negu $v1, $a0 /* 48C14 8006D814 0009102B */ sltu $v0, $zero, $t1 /* 48C18 8006D818 00624023 */ subu $t0, $v1, $v0 /* 48C1C 8006D81C 0100202D */ daddu $a0, $t0, $zero /* 48C20 8006D820 0120282D */ daddu $a1, $t1, $zero .L8006D824: /* 48C24 8006D824 04C10009 */ bgez $a2, .L8006D84C /* 48C28 8006D828 00E0482D */ daddu $t1, $a3, $zero /* 48C2C 8006D82C 0018C027 */ nor $t8, $zero, $t8 /* 48C30 8006D830 00075823 */ negu $t3, $a3 /* 48C34 8006D834 00061823 */ negu $v1, $a2 /* 48C38 8006D838 000B102B */ sltu $v0, $zero, $t3 /* 48C3C 8006D83C 00625023 */ subu $t2, $v1, $v0 /* 48C40 8006D840 0140302D */ daddu $a2, $t2, $zero /* 48C44 8006D844 0160382D */ daddu $a3, $t3, $zero /* 48C48 8006D848 00E0482D */ daddu $t1, $a3, $zero .L8006D84C: /* 48C4C 8006D84C 00C0402D */ daddu $t0, $a2, $zero /* 48C50 8006D850 150000DF */ bnez $t0, .L8006DBD0 /* 48C54 8006D854 00A0582D */ daddu $t3, $a1, $zero /* 48C58 8006D858 0089102B */ sltu $v0, $a0, $t1 /* 48C5C 8006D85C 1040004E */ beqz $v0, .L8006D998 /* 48C60 8006D860 3402FFFF */ ori $v0, $zero, 0xFFFF /* 48C64 8006D864 0049102B */ sltu $v0, $v0, $t1 /* 48C68 8006D868 14400005 */ bnez $v0, .L8006D880 /* 48C6C 8006D86C 00E0182D */ daddu $v1, $a3, $zero /* 48C70 8006D870 2D220100 */ sltiu $v0, $t1, 0x100 /* 48C74 8006D874 38420001 */ xori $v0, $v0, 0x1 /* 48C78 8006D878 0801B626 */ j .L8006D898 /* 48C7C 8006D87C 000240C0 */ sll $t0, $v0, 3 .L8006D880: /* 48C80 8006D880 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 48C84 8006D884 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 48C88 8006D888 0049102B */ sltu $v0, $v0, $t1 /* 48C8C 8006D88C 14400002 */ bnez $v0, .L8006D898 /* 48C90 8006D890 24080018 */ addiu $t0, $zero, 0x18 /* 48C94 8006D894 24080010 */ addiu $t0, $zero, 0x10 .L8006D898: /* 48C98 8006D898 01031006 */ srlv $v0, $v1, $t0 /* 48C9C 8006D89C 3C01800A */ lui $at, %hi(D_80099E40) /* 48CA0 8006D8A0 00220821 */ addu $at, $at, $v0 /* 48CA4 8006D8A4 90229E40 */ lbu $v0, %lo(D_80099E40)($at) /* 48CA8 8006D8A8 24050020 */ addiu $a1, $zero, 0x20 /* 48CAC 8006D8AC 00481021 */ addu $v0, $v0, $t0 /* 48CB0 8006D8B0 00A23023 */ subu $a2, $a1, $v0 /* 48CB4 8006D8B4 10C00006 */ beqz $a2, .L8006D8D0 /* 48CB8 8006D8B8 00C41804 */ sllv $v1, $a0, $a2 /* 48CBC 8006D8BC 00C94804 */ sllv $t1, $t1, $a2 /* 48CC0 8006D8C0 00A61023 */ subu $v0, $a1, $a2 /* 48CC4 8006D8C4 004B1006 */ srlv $v0, $t3, $v0 /* 48CC8 8006D8C8 00622025 */ or $a0, $v1, $v0 /* 48CCC 8006D8CC 00CB5804 */ sllv $t3, $t3, $a2 .L8006D8D0: /* 48CD0 8006D8D0 00093402 */ srl $a2, $t1, 16 /* 48CD4 8006D8D4 14C00002 */ bnez $a2, .L8006D8E0 /* 48CD8 8006D8D8 0086001B */ divu $zero, $a0, $a2 /* 48CDC 8006D8DC 0007000D */ break 7 .L8006D8E0: /* 48CE0 8006D8E0 00003812 */ mflo $a3 /* 48CE4 8006D8E4 00001810 */ mfhi $v1 /* 48CE8 8006D8E8 3128FFFF */ andi $t0, $t1, 0xFFFF /* 48CEC 8006D8EC 00000000 */ nop /* 48CF0 8006D8F0 00E80018 */ mult $a3, $t0 /* 48CF4 8006D8F4 000B1402 */ srl $v0, $t3, 16 /* 48CF8 8006D8F8 00031C00 */ sll $v1, $v1, 16 /* 48CFC 8006D8FC 00621825 */ or $v1, $v1, $v0 /* 48D00 8006D900 00002812 */ mflo $a1 /* 48D04 8006D904 0065102B */ sltu $v0, $v1, $a1 /* 48D08 8006D908 5040000B */ beql $v0, $zero, .L8006D938 /* 48D0C 8006D90C 00651823 */ subu $v1, $v1, $a1 /* 48D10 8006D910 00691821 */ addu $v1, $v1, $t1 /* 48D14 8006D914 0069102B */ sltu $v0, $v1, $t1 /* 48D18 8006D918 14400006 */ bnez $v0, .L8006D934 /* 48D1C 8006D91C 24E7FFFF */ addiu $a3, $a3, -0x1 /* 48D20 8006D920 0065102B */ sltu $v0, $v1, $a1 /* 48D24 8006D924 50400004 */ beql $v0, $zero, .L8006D938 /* 48D28 8006D928 00651823 */ subu $v1, $v1, $a1 /* 48D2C 8006D92C 24E7FFFF */ addiu $a3, $a3, -0x1 /* 48D30 8006D930 00691821 */ addu $v1, $v1, $t1 .L8006D934: /* 48D34 8006D934 00651823 */ subu $v1, $v1, $a1 .L8006D938: /* 48D38 8006D938 14C00002 */ bnez $a2, .L8006D944 /* 48D3C 8006D93C 0066001B */ divu $zero, $v1, $a2 /* 48D40 8006D940 0007000D */ break 7 .L8006D944: /* 48D44 8006D944 00002012 */ mflo $a0 /* 48D48 8006D948 00001810 */ mfhi $v1 /* 48D4C 8006D94C 00000000 */ nop /* 48D50 8006D950 00000000 */ nop /* 48D54 8006D954 00880018 */ mult $a0, $t0 /* 48D58 8006D958 3162FFFF */ andi $v0, $t3, 0xFFFF /* 48D5C 8006D95C 00031C00 */ sll $v1, $v1, 16 /* 48D60 8006D960 00621825 */ or $v1, $v1, $v0 /* 48D64 8006D964 00002812 */ mflo $a1 /* 48D68 8006D968 0065102B */ sltu $v0, $v1, $a1 /* 48D6C 8006D96C 10400007 */ beqz $v0, .L8006D98C /* 48D70 8006D970 00691821 */ addu $v1, $v1, $t1 /* 48D74 8006D974 0069102B */ sltu $v0, $v1, $t1 /* 48D78 8006D978 14400004 */ bnez $v0, .L8006D98C /* 48D7C 8006D97C 2484FFFF */ addiu $a0, $a0, -0x1 /* 48D80 8006D980 0065102B */ sltu $v0, $v1, $a1 /* 48D84 8006D984 54400001 */ bnel $v0, $zero, .L8006D98C /* 48D88 8006D988 2484FFFF */ addiu $a0, $a0, -0x1 .L8006D98C: /* 48D8C 8006D98C 00071400 */ sll $v0, $a3, 16 /* 48D90 8006D990 0801B761 */ j .L8006DD84 /* 48D94 8006D994 00443025 */ or $a2, $v0, $a0 .L8006D998: /* 48D98 8006D998 15200008 */ bnez $t1, .L8006D9BC /* 48D9C 8006D99C 0049102B */ sltu $v0, $v0, $t1 /* 48DA0 8006D9A0 24020001 */ addiu $v0, $zero, 0x1 /* 48DA4 8006D9A4 15000002 */ bnez $t0, .L8006D9B0 /* 48DA8 8006D9A8 0048001B */ divu $zero, $v0, $t0 /* 48DAC 8006D9AC 0007000D */ break 7 .L8006D9B0: /* 48DB0 8006D9B0 00004812 */ mflo $t1 /* 48DB4 8006D9B4 3402FFFF */ ori $v0, $zero, 0xFFFF /* 48DB8 8006D9B8 0049102B */ sltu $v0, $v0, $t1 .L8006D9BC: /* 48DBC 8006D9BC 14400005 */ bnez $v0, .L8006D9D4 /* 48DC0 8006D9C0 0120282D */ daddu $a1, $t1, $zero /* 48DC4 8006D9C4 2D220100 */ sltiu $v0, $t1, 0x100 /* 48DC8 8006D9C8 38420001 */ xori $v0, $v0, 0x1 /* 48DCC 8006D9CC 0801B67B */ j .L8006D9EC /* 48DD0 8006D9D0 000218C0 */ sll $v1, $v0, 3 .L8006D9D4: /* 48DD4 8006D9D4 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 48DD8 8006D9D8 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 48DDC 8006D9DC 0049102B */ sltu $v0, $v0, $t1 /* 48DE0 8006D9E0 14400002 */ bnez $v0, .L8006D9EC /* 48DE4 8006D9E4 24030018 */ addiu $v1, $zero, 0x18 /* 48DE8 8006D9E8 24030010 */ addiu $v1, $zero, 0x10 .L8006D9EC: /* 48DEC 8006D9EC 00651006 */ srlv $v0, $a1, $v1 /* 48DF0 8006D9F0 3C01800A */ lui $at, %hi(D_80099E40) /* 48DF4 8006D9F4 00220821 */ addu $at, $at, $v0 /* 48DF8 8006D9F8 90229E40 */ lbu $v0, %lo(D_80099E40)($at) /* 48DFC 8006D9FC 00431021 */ addu $v0, $v0, $v1 /* 48E00 8006DA00 24030020 */ addiu $v1, $zero, 0x20 /* 48E04 8006DA04 00623023 */ subu $a2, $v1, $v0 /* 48E08 8006DA08 14C00004 */ bnez $a2, .L8006DA1C /* 48E0C 8006DA0C 00662823 */ subu $a1, $v1, $a2 /* 48E10 8006DA10 00892023 */ subu $a0, $a0, $t1 /* 48E14 8006DA14 0801B6C2 */ j .L8006DB08 /* 48E18 8006DA18 240A0001 */ addiu $t2, $zero, 0x1 .L8006DA1C: /* 48E1C 8006DA1C 00C94804 */ sllv $t1, $t1, $a2 /* 48E20 8006DA20 00A43806 */ srlv $a3, $a0, $a1 /* 48E24 8006DA24 00C41804 */ sllv $v1, $a0, $a2 /* 48E28 8006DA28 00AB1006 */ srlv $v0, $t3, $a1 /* 48E2C 8006DA2C 00622025 */ or $a0, $v1, $v0 /* 48E30 8006DA30 00CB5804 */ sllv $t3, $t3, $a2 /* 48E34 8006DA34 00093402 */ srl $a2, $t1, 16 /* 48E38 8006DA38 14C00002 */ bnez $a2, .L8006DA44 /* 48E3C 8006DA3C 00E6001B */ divu $zero, $a3, $a2 /* 48E40 8006DA40 0007000D */ break 7 .L8006DA44: /* 48E44 8006DA44 00004012 */ mflo $t0 /* 48E48 8006DA48 00001810 */ mfhi $v1 /* 48E4C 8006DA4C 3125FFFF */ andi $a1, $t1, 0xFFFF /* 48E50 8006DA50 00000000 */ nop /* 48E54 8006DA54 01050018 */ mult $t0, $a1 /* 48E58 8006DA58 00041402 */ srl $v0, $a0, 16 /* 48E5C 8006DA5C 00031C00 */ sll $v1, $v1, 16 /* 48E60 8006DA60 00621825 */ or $v1, $v1, $v0 /* 48E64 8006DA64 00003812 */ mflo $a3 /* 48E68 8006DA68 0067102B */ sltu $v0, $v1, $a3 /* 48E6C 8006DA6C 5040000B */ beql $v0, $zero, .L8006DA9C /* 48E70 8006DA70 00671823 */ subu $v1, $v1, $a3 /* 48E74 8006DA74 00691821 */ addu $v1, $v1, $t1 /* 48E78 8006DA78 0069102B */ sltu $v0, $v1, $t1 /* 48E7C 8006DA7C 14400006 */ bnez $v0, .L8006DA98 /* 48E80 8006DA80 2508FFFF */ addiu $t0, $t0, -0x1 /* 48E84 8006DA84 0067102B */ sltu $v0, $v1, $a3 /* 48E88 8006DA88 50400004 */ beql $v0, $zero, .L8006DA9C /* 48E8C 8006DA8C 00671823 */ subu $v1, $v1, $a3 /* 48E90 8006DA90 2508FFFF */ addiu $t0, $t0, -0x1 /* 48E94 8006DA94 00691821 */ addu $v1, $v1, $t1 .L8006DA98: /* 48E98 8006DA98 00671823 */ subu $v1, $v1, $a3 .L8006DA9C: /* 48E9C 8006DA9C 14C00002 */ bnez $a2, .L8006DAA8 /* 48EA0 8006DAA0 0066001B */ divu $zero, $v1, $a2 /* 48EA4 8006DAA4 0007000D */ break 7 .L8006DAA8: /* 48EA8 8006DAA8 00003012 */ mflo $a2 /* 48EAC 8006DAAC 00001810 */ mfhi $v1 /* 48EB0 8006DAB0 00000000 */ nop /* 48EB4 8006DAB4 00000000 */ nop /* 48EB8 8006DAB8 00C50018 */ mult $a2, $a1 /* 48EBC 8006DABC 3082FFFF */ andi $v0, $a0, 0xFFFF /* 48EC0 8006DAC0 00031C00 */ sll $v1, $v1, 16 /* 48EC4 8006DAC4 00621825 */ or $v1, $v1, $v0 /* 48EC8 8006DAC8 00003812 */ mflo $a3 /* 48ECC 8006DACC 0067102B */ sltu $v0, $v1, $a3 /* 48ED0 8006DAD0 1040000B */ beqz $v0, .L8006DB00 /* 48ED4 8006DAD4 00081400 */ sll $v0, $t0, 16 /* 48ED8 8006DAD8 00691821 */ addu $v1, $v1, $t1 /* 48EDC 8006DADC 0069102B */ sltu $v0, $v1, $t1 /* 48EE0 8006DAE0 14400006 */ bnez $v0, .L8006DAFC /* 48EE4 8006DAE4 24C6FFFF */ addiu $a2, $a2, -0x1 /* 48EE8 8006DAE8 0067102B */ sltu $v0, $v1, $a3 /* 48EEC 8006DAEC 10400004 */ beqz $v0, .L8006DB00 /* 48EF0 8006DAF0 00081400 */ sll $v0, $t0, 16 /* 48EF4 8006DAF4 24C6FFFF */ addiu $a2, $a2, -0x1 /* 48EF8 8006DAF8 00691821 */ addu $v1, $v1, $t1 .L8006DAFC: /* 48EFC 8006DAFC 00081400 */ sll $v0, $t0, 16 .L8006DB00: /* 48F00 8006DB00 00465025 */ or $t2, $v0, $a2 /* 48F04 8006DB04 00672023 */ subu $a0, $v1, $a3 .L8006DB08: /* 48F08 8006DB08 00093402 */ srl $a2, $t1, 16 /* 48F0C 8006DB0C 14C00002 */ bnez $a2, .L8006DB18 /* 48F10 8006DB10 0086001B */ divu $zero, $a0, $a2 /* 48F14 8006DB14 0007000D */ break 7 .L8006DB18: /* 48F18 8006DB18 00003812 */ mflo $a3 /* 48F1C 8006DB1C 00001810 */ mfhi $v1 /* 48F20 8006DB20 3128FFFF */ andi $t0, $t1, 0xFFFF /* 48F24 8006DB24 00000000 */ nop /* 48F28 8006DB28 00E80018 */ mult $a3, $t0 /* 48F2C 8006DB2C 000B1402 */ srl $v0, $t3, 16 /* 48F30 8006DB30 00031C00 */ sll $v1, $v1, 16 /* 48F34 8006DB34 00621825 */ or $v1, $v1, $v0 /* 48F38 8006DB38 00002812 */ mflo $a1 /* 48F3C 8006DB3C 0065102B */ sltu $v0, $v1, $a1 /* 48F40 8006DB40 5040000B */ beql $v0, $zero, .L8006DB70 /* 48F44 8006DB44 00651823 */ subu $v1, $v1, $a1 /* 48F48 8006DB48 00691821 */ addu $v1, $v1, $t1 /* 48F4C 8006DB4C 0069102B */ sltu $v0, $v1, $t1 /* 48F50 8006DB50 14400006 */ bnez $v0, .L8006DB6C /* 48F54 8006DB54 24E7FFFF */ addiu $a3, $a3, -0x1 /* 48F58 8006DB58 0065102B */ sltu $v0, $v1, $a1 /* 48F5C 8006DB5C 50400004 */ beql $v0, $zero, .L8006DB70 /* 48F60 8006DB60 00651823 */ subu $v1, $v1, $a1 /* 48F64 8006DB64 24E7FFFF */ addiu $a3, $a3, -0x1 /* 48F68 8006DB68 00691821 */ addu $v1, $v1, $t1 .L8006DB6C: /* 48F6C 8006DB6C 00651823 */ subu $v1, $v1, $a1 .L8006DB70: /* 48F70 8006DB70 14C00002 */ bnez $a2, .L8006DB7C /* 48F74 8006DB74 0066001B */ divu $zero, $v1, $a2 /* 48F78 8006DB78 0007000D */ break 7 .L8006DB7C: /* 48F7C 8006DB7C 00002012 */ mflo $a0 /* 48F80 8006DB80 00001810 */ mfhi $v1 /* 48F84 8006DB84 00000000 */ nop /* 48F88 8006DB88 00000000 */ nop /* 48F8C 8006DB8C 00880018 */ mult $a0, $t0 /* 48F90 8006DB90 3162FFFF */ andi $v0, $t3, 0xFFFF /* 48F94 8006DB94 00031C00 */ sll $v1, $v1, 16 /* 48F98 8006DB98 00621825 */ or $v1, $v1, $v0 /* 48F9C 8006DB9C 00002812 */ mflo $a1 /* 48FA0 8006DBA0 0065102B */ sltu $v0, $v1, $a1 /* 48FA4 8006DBA4 10400007 */ beqz $v0, .L8006DBC4 /* 48FA8 8006DBA8 00691821 */ addu $v1, $v1, $t1 /* 48FAC 8006DBAC 0069102B */ sltu $v0, $v1, $t1 /* 48FB0 8006DBB0 14400004 */ bnez $v0, .L8006DBC4 /* 48FB4 8006DBB4 2484FFFF */ addiu $a0, $a0, -0x1 /* 48FB8 8006DBB8 0065102B */ sltu $v0, $v1, $a1 /* 48FBC 8006DBBC 54400001 */ bnel $v0, $zero, .L8006DBC4 /* 48FC0 8006DBC0 2484FFFF */ addiu $a0, $a0, -0x1 .L8006DBC4: /* 48FC4 8006DBC4 00071400 */ sll $v0, $a3, 16 /* 48FC8 8006DBC8 0801B762 */ j .L8006DD88 /* 48FCC 8006DBCC 00443025 */ or $a2, $v0, $a0 .L8006DBD0: /* 48FD0 8006DBD0 0088102B */ sltu $v0, $a0, $t0 /* 48FD4 8006DBD4 10400003 */ beqz $v0, .L8006DBE4 /* 48FD8 8006DBD8 3402FFFF */ ori $v0, $zero, 0xFFFF /* 48FDC 8006DBDC 0801B761 */ j .L8006DD84 /* 48FE0 8006DBE0 0000302D */ daddu $a2, $zero, $zero .L8006DBE4: /* 48FE4 8006DBE4 0048102B */ sltu $v0, $v0, $t0 /* 48FE8 8006DBE8 14400005 */ bnez $v0, .L8006DC00 /* 48FEC 8006DBEC 0100282D */ daddu $a1, $t0, $zero /* 48FF0 8006DBF0 2D020100 */ sltiu $v0, $t0, 0x100 /* 48FF4 8006DBF4 38420001 */ xori $v0, $v0, 0x1 /* 48FF8 8006DBF8 0801B706 */ j .L8006DC18 /* 48FFC 8006DBFC 000218C0 */ sll $v1, $v0, 3 .L8006DC00: /* 49000 8006DC00 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 49004 8006DC04 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 49008 8006DC08 0048102B */ sltu $v0, $v0, $t0 /* 4900C 8006DC0C 14400002 */ bnez $v0, .L8006DC18 /* 49010 8006DC10 24030018 */ addiu $v1, $zero, 0x18 /* 49014 8006DC14 24030010 */ addiu $v1, $zero, 0x10 .L8006DC18: /* 49018 8006DC18 00651006 */ srlv $v0, $a1, $v1 /* 4901C 8006DC1C 3C01800A */ lui $at, %hi(D_80099E40) /* 49020 8006DC20 00220821 */ addu $at, $at, $v0 /* 49024 8006DC24 90229E40 */ lbu $v0, %lo(D_80099E40)($at) /* 49028 8006DC28 00431021 */ addu $v0, $v0, $v1 /* 4902C 8006DC2C 24030020 */ addiu $v1, $zero, 0x20 /* 49030 8006DC30 00623023 */ subu $a2, $v1, $v0 /* 49034 8006DC34 54C00009 */ bnel $a2, $zero, .L8006DC5C /* 49038 8006DC38 00662823 */ subu $a1, $v1, $a2 /* 4903C 8006DC3C 0104102B */ sltu $v0, $t0, $a0 /* 49040 8006DC40 14400050 */ bnez $v0, .L8006DD84 /* 49044 8006DC44 24060001 */ addiu $a2, $zero, 0x1 /* 49048 8006DC48 0169102B */ sltu $v0, $t3, $t1 /* 4904C 8006DC4C 1440004D */ bnez $v0, .L8006DD84 /* 49050 8006DC50 0000302D */ daddu $a2, $zero, $zero /* 49054 8006DC54 0801B761 */ j .L8006DD84 /* 49058 8006DC58 24060001 */ addiu $a2, $zero, 0x1 .L8006DC5C: /* 4905C 8006DC5C 00C81804 */ sllv $v1, $t0, $a2 /* 49060 8006DC60 00A91006 */ srlv $v0, $t1, $a1 /* 49064 8006DC64 00624025 */ or $t0, $v1, $v0 /* 49068 8006DC68 00C94804 */ sllv $t1, $t1, $a2 /* 4906C 8006DC6C 00A43806 */ srlv $a3, $a0, $a1 /* 49070 8006DC70 00C41804 */ sllv $v1, $a0, $a2 /* 49074 8006DC74 00AB1006 */ srlv $v0, $t3, $a1 /* 49078 8006DC78 00622025 */ or $a0, $v1, $v0 /* 4907C 8006DC7C 00CB5804 */ sllv $t3, $t3, $a2 /* 49080 8006DC80 00083402 */ srl $a2, $t0, 16 /* 49084 8006DC84 14C00002 */ bnez $a2, .L8006DC90 /* 49088 8006DC88 00E6001B */ divu $zero, $a3, $a2 /* 4908C 8006DC8C 0007000D */ break 7 .L8006DC90: /* 49090 8006DC90 00005012 */ mflo $t2 /* 49094 8006DC94 00001810 */ mfhi $v1 /* 49098 8006DC98 3105FFFF */ andi $a1, $t0, 0xFFFF /* 4909C 8006DC9C 00000000 */ nop /* 490A0 8006DCA0 01450018 */ mult $t2, $a1 /* 490A4 8006DCA4 00041402 */ srl $v0, $a0, 16 /* 490A8 8006DCA8 00031C00 */ sll $v1, $v1, 16 /* 490AC 8006DCAC 00621825 */ or $v1, $v1, $v0 /* 490B0 8006DCB0 00003812 */ mflo $a3 /* 490B4 8006DCB4 0067102B */ sltu $v0, $v1, $a3 /* 490B8 8006DCB8 5040000B */ beql $v0, $zero, .L8006DCE8 /* 490BC 8006DCBC 00671823 */ subu $v1, $v1, $a3 /* 490C0 8006DCC0 00681821 */ addu $v1, $v1, $t0 /* 490C4 8006DCC4 0068102B */ sltu $v0, $v1, $t0 /* 490C8 8006DCC8 14400006 */ bnez $v0, .L8006DCE4 /* 490CC 8006DCCC 254AFFFF */ addiu $t2, $t2, -0x1 /* 490D0 8006DCD0 0067102B */ sltu $v0, $v1, $a3 /* 490D4 8006DCD4 50400004 */ beql $v0, $zero, .L8006DCE8 /* 490D8 8006DCD8 00671823 */ subu $v1, $v1, $a3 /* 490DC 8006DCDC 254AFFFF */ addiu $t2, $t2, -0x1 /* 490E0 8006DCE0 00681821 */ addu $v1, $v1, $t0 .L8006DCE4: /* 490E4 8006DCE4 00671823 */ subu $v1, $v1, $a3 .L8006DCE8: /* 490E8 8006DCE8 14C00002 */ bnez $a2, .L8006DCF4 /* 490EC 8006DCEC 0066001B */ divu $zero, $v1, $a2 /* 490F0 8006DCF0 0007000D */ break 7 .L8006DCF4: /* 490F4 8006DCF4 00003012 */ mflo $a2 /* 490F8 8006DCF8 00001810 */ mfhi $v1 /* 490FC 8006DCFC 00000000 */ nop /* 49100 8006DD00 00000000 */ nop /* 49104 8006DD04 00C50018 */ mult $a2, $a1 /* 49108 8006DD08 3082FFFF */ andi $v0, $a0, 0xFFFF /* 4910C 8006DD0C 00031C00 */ sll $v1, $v1, 16 /* 49110 8006DD10 00621825 */ or $v1, $v1, $v0 /* 49114 8006DD14 00003812 */ mflo $a3 /* 49118 8006DD18 0067102B */ sltu $v0, $v1, $a3 /* 4911C 8006DD1C 1040000B */ beqz $v0, .L8006DD4C /* 49120 8006DD20 000A1400 */ sll $v0, $t2, 16 /* 49124 8006DD24 00681821 */ addu $v1, $v1, $t0 /* 49128 8006DD28 0068102B */ sltu $v0, $v1, $t0 /* 4912C 8006DD2C 14400006 */ bnez $v0, .L8006DD48 /* 49130 8006DD30 24C6FFFF */ addiu $a2, $a2, -0x1 /* 49134 8006DD34 0067102B */ sltu $v0, $v1, $a3 /* 49138 8006DD38 10400004 */ beqz $v0, .L8006DD4C /* 4913C 8006DD3C 000A1400 */ sll $v0, $t2, 16 /* 49140 8006DD40 24C6FFFF */ addiu $a2, $a2, -0x1 /* 49144 8006DD44 00681821 */ addu $v1, $v1, $t0 .L8006DD48: /* 49148 8006DD48 000A1400 */ sll $v0, $t2, 16 .L8006DD4C: /* 4914C 8006DD4C 00463025 */ or $a2, $v0, $a2 /* 49150 8006DD50 00672023 */ subu $a0, $v1, $a3 /* 49154 8006DD54 00C90019 */ multu $a2, $t1 /* 49158 8006DD58 00001810 */ mfhi $v1 /* 4915C 8006DD5C 0083102B */ sltu $v0, $a0, $v1 /* 49160 8006DD60 00004012 */ mflo $t0 /* 49164 8006DD64 54400007 */ bnel $v0, $zero, .L8006DD84 /* 49168 8006DD68 24C6FFFF */ addiu $a2, $a2, -0x1 /* 4916C 8006DD6C 14640006 */ bne $v1, $a0, .L8006DD88 /* 49170 8006DD70 0000502D */ daddu $t2, $zero, $zero /* 49174 8006DD74 0168102B */ sltu $v0, $t3, $t0 /* 49178 8006DD78 10400004 */ beqz $v0, .L8006DD8C /* 4917C 8006DD7C 00C0782D */ daddu $t7, $a2, $zero /* 49180 8006DD80 24C6FFFF */ addiu $a2, $a2, -0x1 .L8006DD84: /* 49184 8006DD84 0000502D */ daddu $t2, $zero, $zero .L8006DD88: /* 49188 8006DD88 00C0782D */ daddu $t7, $a2, $zero .L8006DD8C: /* 4918C 8006DD8C 0140702D */ daddu $t6, $t2, $zero /* 49190 8006DD90 01C0102D */ daddu $v0, $t6, $zero /* 49194 8006DD94 13000007 */ beqz $t8, .L8006DDB4 /* 49198 8006DD98 01E0182D */ daddu $v1, $t7, $zero /* 4919C 8006DD9C 00036823 */ negu $t5, $v1 /* 491A0 8006DDA0 00021823 */ negu $v1, $v0 /* 491A4 8006DDA4 000D102B */ sltu $v0, $zero, $t5 /* 491A8 8006DDA8 00626023 */ subu $t4, $v1, $v0 /* 491AC 8006DDAC 0180102D */ daddu $v0, $t4, $zero /* 491B0 8006DDB0 01A0182D */ daddu $v1, $t5, $zero .L8006DDB4: /* 491B4 8006DDB4 03E00008 */ jr $ra /* 491B8 8006DDB8 00000000 */ nop /* 491BC 8006DDBC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: DItype __divdi3(DItype u, DItype v) { word_type c = 0; DIunion uu, vv; DItype w; uu.ll = u; vv.ll = v; if (uu.s.high < 0) { c = ~c; uu.ll = __negdi2(uu.ll); } if (vv.s.high < 0) { c = ~c; vv.ll = __negdi2(vv.ll); } w = __udivmoddi4(uu.ll, vv.ll, (UDItype *) 0); if (c) { w = __negdi2(w); } return w; }
### RAW ASSEMBLY INSTRUCTIONS: glabel HealActor /* 19F584 80270CA4 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 19F588 80270CA8 AFB20020 */ sw $s2, 0x20($sp) /* 19F58C 80270CAC 0080902D */ daddu $s2, $a0, $zero /* 19F590 80270CB0 AFBF0028 */ sw $ra, 0x28($sp) /* 19F594 80270CB4 AFB30024 */ sw $s3, 0x24($sp) /* 19F598 80270CB8 AFB1001C */ sw $s1, 0x1C($sp) /* 19F59C 80270CBC AFB00018 */ sw $s0, 0x18($sp) /* 19F5A0 80270CC0 F7BE0058 */ sdc1 $f30, 0x58($sp) /* 19F5A4 80270CC4 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 19F5A8 80270CC8 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 19F5AC 80270CCC F7B80040 */ sdc1 $f24, 0x40($sp) /* 19F5B0 80270CD0 F7B60038 */ sdc1 $f22, 0x38($sp) /* 19F5B4 80270CD4 F7B40030 */ sdc1 $f20, 0x30($sp) /* 19F5B8 80270CD8 8E50000C */ lw $s0, 0xC($s2) /* 19F5BC 80270CDC 54A00001 */ bnel $a1, $zero, .L80270CE4 /* 19F5C0 80270CE0 AE400070 */ sw $zero, 0x70($s2) .L80270CE4: /* 19F5C4 80270CE4 8E420070 */ lw $v0, 0x70($s2) /* 19F5C8 80270CE8 1440002B */ bnez $v0, .L80270D98 /* 19F5CC 80270CEC 00000000 */ nop /* 19F5D0 80270CF0 8E050000 */ lw $a1, 0x0($s0) /* 19F5D4 80270CF4 26100004 */ addiu $s0, $s0, 0x4 /* 19F5D8 80270CF8 0C0B1EAF */ jal evt_get_variable /* 19F5DC 80270CFC 0240202D */ daddu $a0, $s2, $zero /* 19F5E0 80270D00 0040882D */ daddu $s1, $v0, $zero /* 19F5E4 80270D04 2402FF81 */ addiu $v0, $zero, -0x7F /* 19F5E8 80270D08 16220002 */ bne $s1, $v0, .L80270D14 /* 19F5EC 80270D0C 00000000 */ nop /* 19F5F0 80270D10 8E510148 */ lw $s1, 0x148($s2) .L80270D14: /* 19F5F4 80270D14 8E050000 */ lw $a1, 0x0($s0) /* 19F5F8 80270D18 26100004 */ addiu $s0, $s0, 0x4 /* 19F5FC 80270D1C 0C0B1EAF */ jal evt_get_variable /* 19F600 80270D20 0240202D */ daddu $a0, $s2, $zero /* 19F604 80270D24 0040982D */ daddu $s3, $v0, $zero /* 19F608 80270D28 8E050000 */ lw $a1, 0x0($s0) /* 19F60C 80270D2C 0C0B1EAF */ jal evt_get_variable /* 19F610 80270D30 0240202D */ daddu $a0, $s2, $zero /* 19F614 80270D34 3C01802A */ lui $at, %hi(D_8029FBD0) /* 19F618 80270D38 AC22FBD0 */ sw $v0, %lo(D_8029FBD0)($at) /* 19F61C 80270D3C 0C09A75B */ jal get_actor /* 19F620 80270D40 0220202D */ daddu $a0, $s1, $zero /* 19F624 80270D44 0040802D */ daddu $s0, $v0, $zero /* 19F628 80270D48 24040008 */ addiu $a0, $zero, 0x8 /* 19F62C 80270D4C AE500074 */ sw $s0, 0x74($s2) /* 19F630 80270D50 0C093903 */ jal func_8024E40C /* 19F634 80270D54 AE530078 */ sw $s3, 0x78($s2) /* 19F638 80270D58 0C093978 */ jal func_8024E5E0 /* 19F63C 80270D5C 2404000C */ addiu $a0, $zero, 0xC /* 19F640 80270D60 86040192 */ lh $a0, 0x192($s0) /* 19F644 80270D64 0C09390F */ jal func_8024E43C /* 19F648 80270D68 00000000 */ nop /* 19F64C 80270D6C 0C093936 */ jal D_8024E4D8_C0BD58 /* 19F650 80270D70 2404000A */ addiu $a0, $zero, 0xA /* 19F654 80270D74 0C093983 */ jal func_8024E60C /* 19F658 80270D78 00000000 */ nop /* 19F65C 80270D7C 24020001 */ addiu $v0, $zero, 0x1 /* 19F660 80270D80 3C01802A */ lui $at, %hi(D_8029FBD4) /* 19F664 80270D84 A022FBD4 */ sb $v0, %lo(D_8029FBD4)($at) /* 19F668 80270D88 24020005 */ addiu $v0, $zero, 0x5 /* 19F66C 80270D8C AE42007C */ sw $v0, 0x7C($s2) /* 19F670 80270D90 24020001 */ addiu $v0, $zero, 0x1 /* 19F674 80270D94 AE420070 */ sw $v0, 0x70($s2) .L80270D98: /* 19F678 80270D98 0C09A75B */ jal get_actor /* 19F67C 80270D9C 8E440148 */ lw $a0, 0x148($s2) /* 19F680 80270DA0 8E500074 */ lw $s0, 0x74($s2) /* 19F684 80270DA4 8E530078 */ lw $s3, 0x78($s2) /* 19F688 80270DA8 86020150 */ lh $v0, 0x150($s0) /* 19F68C 80270DAC 8E030000 */ lw $v1, 0x0($s0) /* 19F690 80270DB0 C6000144 */ lwc1 $f0, 0x144($s0) /* 19F694 80270DB4 44821000 */ mtc1 $v0, $f2 /* 19F698 80270DB8 00000000 */ nop /* 19F69C 80270DBC 468010A0 */ cvt.s.w $f2, $f2 /* 19F6A0 80270DC0 30620800 */ andi $v0, $v1, 0x800 /* 19F6A4 80270DC4 1040000E */ beqz $v0, .L80270E00 /* 19F6A8 80270DC8 46020780 */ add.s $f30, $f0, $f2 /* 19F6AC 80270DCC 86020152 */ lh $v0, 0x152($s0) /* 19F6B0 80270DD0 C6020148 */ lwc1 $f2, 0x148($s0) /* 19F6B4 80270DD4 44820000 */ mtc1 $v0, $f0 /* 19F6B8 80270DD8 00000000 */ nop /* 19F6BC 80270DDC 46800020 */ cvt.s.w $f0, $f0 /* 19F6C0 80270DE0 92020191 */ lbu $v0, 0x191($s0) /* 19F6C4 80270DE4 46001080 */ add.s $f2, $f2, $f0 /* 19F6C8 80270DE8 00021042 */ srl $v0, $v0, 1 /* 19F6CC 80270DEC 44820000 */ mtc1 $v0, $f0 /* 19F6D0 80270DF0 00000000 */ nop /* 19F6D4 80270DF4 46800020 */ cvt.s.w $f0, $f0 /* 19F6D8 80270DF8 0809C39B */ j .L80270E6C /* 19F6DC 80270DFC 46001601 */ sub.s $f24, $f2, $f0 .L80270E00: /* 19F6E0 80270E00 30628000 */ andi $v0, $v1, 0x8000 /* 19F6E4 80270E04 1440000E */ bnez $v0, .L80270E40 /* 19F6E8 80270E08 00000000 */ nop /* 19F6EC 80270E0C 86020152 */ lh $v0, 0x152($s0) /* 19F6F0 80270E10 C6020148 */ lwc1 $f2, 0x148($s0) /* 19F6F4 80270E14 44820000 */ mtc1 $v0, $f0 /* 19F6F8 80270E18 00000000 */ nop /* 19F6FC 80270E1C 46800020 */ cvt.s.w $f0, $f0 /* 19F700 80270E20 92020191 */ lbu $v0, 0x191($s0) /* 19F704 80270E24 46001080 */ add.s $f2, $f2, $f0 /* 19F708 80270E28 00021042 */ srl $v0, $v0, 1 /* 19F70C 80270E2C 44820000 */ mtc1 $v0, $f0 /* 19F710 80270E30 00000000 */ nop /* 19F714 80270E34 46800020 */ cvt.s.w $f0, $f0 /* 19F718 80270E38 0809C39B */ j .L80270E6C /* 19F71C 80270E3C 46020600 */ add.s $f24, $f0, $f2 .L80270E40: /* 19F720 80270E40 86020152 */ lh $v0, 0x152($s0) /* 19F724 80270E44 C6000148 */ lwc1 $f0, 0x148($s0) /* 19F728 80270E48 44821000 */ mtc1 $v0, $f2 /* 19F72C 80270E4C 00000000 */ nop /* 19F730 80270E50 468010A0 */ cvt.s.w $f2, $f2 /* 19F734 80270E54 92020191 */ lbu $v0, 0x191($s0) /* 19F738 80270E58 46020000 */ add.s $f0, $f0, $f2 /* 19F73C 80270E5C 44821000 */ mtc1 $v0, $f2 /* 19F740 80270E60 00000000 */ nop /* 19F744 80270E64 468010A0 */ cvt.s.w $f2, $f2 /* 19F748 80270E68 46020600 */ add.s $f24, $f0, $f2 .L80270E6C: /* 19F74C 80270E6C 86020154 */ lh $v0, 0x154($s0) /* 19F750 80270E70 86030150 */ lh $v1, 0x150($s0) /* 19F754 80270E74 C600014C */ lwc1 $f0, 0x14C($s0) /* 19F758 80270E78 44821000 */ mtc1 $v0, $f2 /* 19F75C 80270E7C 00000000 */ nop /* 19F760 80270E80 468010A0 */ cvt.s.w $f2, $f2 /* 19F764 80270E84 44832000 */ mtc1 $v1, $f4 /* 19F768 80270E88 00000000 */ nop /* 19F76C 80270E8C 46802120 */ cvt.s.w $f4, $f4 /* 19F770 80270E90 92020190 */ lbu $v0, 0x190($s0) /* 19F774 80270E94 46020000 */ add.s $f0, $f0, $f2 /* 19F778 80270E98 3C014120 */ lui $at, (0x41200000 >> 16) /* 19F77C 80270E9C 44811000 */ mtc1 $at, $f2 /* 19F780 80270EA0 8E030000 */ lw $v1, 0x0($s0) /* 19F784 80270EA4 46020700 */ add.s $f28, $f0, $f2 /* 19F788 80270EA8 C6000144 */ lwc1 $f0, 0x144($s0) /* 19F78C 80270EAC 00021042 */ srl $v0, $v0, 1 /* 19F790 80270EB0 46040000 */ add.s $f0, $f0, $f4 /* 19F794 80270EB4 44821000 */ mtc1 $v0, $f2 /* 19F798 80270EB8 00000000 */ nop /* 19F79C 80270EBC 468010A0 */ cvt.s.w $f2, $f2 /* 19F7A0 80270EC0 30620800 */ andi $v0, $v1, 0x800 /* 19F7A4 80270EC4 1040000D */ beqz $v0, .L80270EFC /* 19F7A8 80270EC8 46020680 */ add.s $f26, $f0, $f2 /* 19F7AC 80270ECC 86020152 */ lh $v0, 0x152($s0) /* 19F7B0 80270ED0 C6000148 */ lwc1 $f0, 0x148($s0) /* 19F7B4 80270ED4 44821000 */ mtc1 $v0, $f2 /* 19F7B8 80270ED8 00000000 */ nop /* 19F7BC 80270EDC 468010A0 */ cvt.s.w $f2, $f2 /* 19F7C0 80270EE0 92020191 */ lbu $v0, 0x191($s0) /* 19F7C4 80270EE4 46020000 */ add.s $f0, $f0, $f2 /* 19F7C8 80270EE8 44821000 */ mtc1 $v0, $f2 /* 19F7CC 80270EEC 00000000 */ nop /* 19F7D0 80270EF0 468010A0 */ cvt.s.w $f2, $f2 /* 19F7D4 80270EF4 0809C3DA */ j .L80270F68 /* 19F7D8 80270EF8 46020501 */ sub.s $f20, $f0, $f2 .L80270EFC: /* 19F7DC 80270EFC 30628000 */ andi $v0, $v1, 0x8000 /* 19F7E0 80270F00 1440000D */ bnez $v0, .L80270F38 /* 19F7E4 80270F04 00000000 */ nop /* 19F7E8 80270F08 86020152 */ lh $v0, 0x152($s0) /* 19F7EC 80270F0C C6000148 */ lwc1 $f0, 0x148($s0) /* 19F7F0 80270F10 44821000 */ mtc1 $v0, $f2 /* 19F7F4 80270F14 00000000 */ nop /* 19F7F8 80270F18 468010A0 */ cvt.s.w $f2, $f2 /* 19F7FC 80270F1C 92020191 */ lbu $v0, 0x191($s0) /* 19F800 80270F20 46020000 */ add.s $f0, $f0, $f2 /* 19F804 80270F24 44821000 */ mtc1 $v0, $f2 /* 19F808 80270F28 00000000 */ nop /* 19F80C 80270F2C 468010A0 */ cvt.s.w $f2, $f2 /* 19F810 80270F30 0809C3DA */ j .L80270F68 /* 19F814 80270F34 46001500 */ add.s $f20, $f2, $f0 .L80270F38: /* 19F818 80270F38 86020152 */ lh $v0, 0x152($s0) /* 19F81C 80270F3C C6020148 */ lwc1 $f2, 0x148($s0) /* 19F820 80270F40 44820000 */ mtc1 $v0, $f0 /* 19F824 80270F44 00000000 */ nop /* 19F828 80270F48 46800020 */ cvt.s.w $f0, $f0 /* 19F82C 80270F4C 92020191 */ lbu $v0, 0x191($s0) /* 19F830 80270F50 46001080 */ add.s $f2, $f2, $f0 /* 19F834 80270F54 00021040 */ sll $v0, $v0, 1 /* 19F838 80270F58 44820000 */ mtc1 $v0, $f0 /* 19F83C 80270F5C 00000000 */ nop /* 19F840 80270F60 46800020 */ cvt.s.w $f0, $f0 /* 19F844 80270F64 46001500 */ add.s $f20, $f2, $f0 .L80270F68: /* 19F848 80270F68 86020154 */ lh $v0, 0x154($s0) /* 19F84C 80270F6C C600014C */ lwc1 $f0, 0x14C($s0) /* 19F850 80270F70 44821000 */ mtc1 $v0, $f2 /* 19F854 80270F74 00000000 */ nop /* 19F858 80270F78 468010A0 */ cvt.s.w $f2, $f2 /* 19F85C 80270F7C 46020000 */ add.s $f0, $f0, $f2 /* 19F860 80270F80 8E420070 */ lw $v0, 0x70($s2) /* 19F864 80270F84 3C014120 */ lui $at, (0x41200000 >> 16) /* 19F868 80270F88 44811000 */ mtc1 $at, $f2 /* 19F86C 80270F8C 2443FFFF */ addiu $v1, $v0, -0x1 /* 19F870 80270F90 2C620005 */ sltiu $v0, $v1, 0x5 /* 19F874 80270F94 1040005F */ beqz $v0, .L80271114 /* 19F878 80270F98 46020580 */ add.s $f22, $f0, $f2 /* 19F87C 80270F9C 00031080 */ sll $v0, $v1, 2 /* 19F880 80270FA0 3C01802A */ lui $at, %hi(jtbl_8029D868) /* 19F884 80270FA4 00220821 */ addu $at, $at, $v0 /* 19F888 80270FA8 8C22D868 */ lw $v0, %lo(jtbl_8029D868)($at) /* 19F88C 80270FAC 00400008 */ jr $v0 /* 19F890 80270FB0 00000000 */ nop glabel .L80270FB4 /* 19F894 80270FB4 8E42007C */ lw $v0, 0x7C($s2) /* 19F898 80270FB8 14400049 */ bnez $v0, .L802710E0 /* 19F89C 80270FBC 2442FFFF */ addiu $v0, $v0, -0x1 /* 19F8A0 80270FC0 0200202D */ daddu $a0, $s0, $zero /* 19F8A4 80270FC4 0C09DC58 */ jal dispatch_event_actor /* 19F8A8 80270FC8 2405003F */ addiu $a1, $zero, 0x3F /* 19F8AC 80270FCC 4405D000 */ mfc1 $a1, $f26 /* 19F8B0 80270FD0 4406A000 */ mfc1 $a2, $f20 /* 19F8B4 80270FD4 4407B000 */ mfc1 $a3, $f22 /* 19F8B8 80270FD8 0000202D */ daddu $a0, $zero, $zero /* 19F8BC 80270FDC 0C01C424 */ jal fx_recover /* 19F8C0 80270FE0 AFB30010 */ sw $s3, 0x10($sp) /* 19F8C4 80270FE4 4600F306 */ mov.s $f12, $f30 /* 19F8C8 80270FE8 4600C386 */ mov.s $f14, $f24 /* 19F8CC 80270FEC 4406E000 */ mfc1 $a2, $f28 /* 19F8D0 80270FF0 0C0B5D18 */ jal show_start_recovery_shimmer /* 19F8D4 80270FF4 0260382D */ daddu $a3, $s3, $zero /* 19F8D8 80270FF8 2402001E */ addiu $v0, $zero, 0x1E /* 19F8DC 80270FFC AE42007C */ sw $v0, 0x7C($s2) /* 19F8E0 80271000 24020002 */ addiu $v0, $zero, 0x2 /* 19F8E4 80271004 0809C445 */ j .L80271114 /* 19F8E8 80271008 AE420070 */ sw $v0, 0x70($s2) glabel .L8027100C /* 19F8EC 8027100C 8E42007C */ lw $v0, 0x7C($s2) /* 19F8F0 80271010 14400033 */ bnez $v0, .L802710E0 /* 19F8F4 80271014 2442FFFF */ addiu $v0, $v0, -0x1 /* 19F8F8 80271018 0C093903 */ jal func_8024E40C /* 19F8FC 8027101C 24040002 */ addiu $a0, $zero, 0x2 /* 19F900 80271020 0C093936 */ jal D_8024E4D8_C0BD58 /* 19F904 80271024 2404000F */ addiu $a0, $zero, 0xF /* 19F908 80271028 920201B8 */ lbu $v0, 0x1B8($s0) /* 19F90C 8027102C 820301B9 */ lb $v1, 0x1B9($s0) /* 19F910 80271030 00531021 */ addu $v0, $v0, $s3 /* 19F914 80271034 A20201B8 */ sb $v0, 0x1B8($s0) /* 19F918 80271038 00021600 */ sll $v0, $v0, 24 /* 19F91C 8027103C 00021603 */ sra $v0, $v0, 24 /* 19F920 80271040 0062182A */ slt $v1, $v1, $v0 /* 19F924 80271044 920201B9 */ lbu $v0, 0x1B9($s0) /* 19F928 80271048 54600001 */ bnel $v1, $zero, .L80271050 /* 19F92C 8027104C A20201B8 */ sb $v0, 0x1B8($s0) .L80271050: /* 19F930 80271050 4600F306 */ mov.s $f12, $f30 /* 19F934 80271054 4600C386 */ mov.s $f14, $f24 /* 19F938 80271058 4406E000 */ mfc1 $a2, $f28 /* 19F93C 8027105C 0C0B5D30 */ jal show_recovery_shimmer /* 19F940 80271060 0260382D */ daddu $a3, $s3, $zero /* 19F944 80271064 2402000F */ addiu $v0, $zero, 0xF /* 19F948 80271068 AE42007C */ sw $v0, 0x7C($s2) /* 19F94C 8027106C 24020003 */ addiu $v0, $zero, 0x3 /* 19F950 80271070 0809C445 */ j .L80271114 /* 19F954 80271074 AE420070 */ sw $v0, 0x70($s2) glabel .L80271078 /* 19F958 80271078 8E42007C */ lw $v0, 0x7C($s2) /* 19F95C 8027107C 14400018 */ bnez $v0, .L802710E0 /* 19F960 80271080 2442FFFF */ addiu $v0, $v0, -0x1 /* 19F964 80271084 3C02802A */ lui $v0, %hi(D_8029FBD0) /* 19F968 80271088 8C42FBD0 */ lw $v0, %lo(D_8029FBD0)($v0) /* 19F96C 8027108C 14400002 */ bnez $v0, .L80271098 /* 19F970 80271090 24040020 */ addiu $a0, $zero, 0x20 /* 19F974 80271094 2404001F */ addiu $a0, $zero, 0x1F .L80271098: /* 19F978 80271098 2405003C */ addiu $a1, $zero, 0x3C /* 19F97C 8027109C 0C093E81 */ jal func_8024FA04 /* 19F980 802710A0 0260302D */ daddu $a2, $s3, $zero /* 19F984 802710A4 24020004 */ addiu $v0, $zero, 0x4 /* 19F988 802710A8 0809C445 */ j .L80271114 /* 19F98C 802710AC AE420070 */ sw $v0, 0x70($s2) glabel .L802710B0 /* 19F990 802710B0 0C093EAD */ jal func_8024FAB4 /* 19F994 802710B4 00000000 */ nop /* 19F998 802710B8 14400017 */ bnez $v0, .L80271118 /* 19F99C 802710BC 0000102D */ daddu $v0, $zero, $zero /* 19F9A0 802710C0 2402000A */ addiu $v0, $zero, 0xA /* 19F9A4 802710C4 AE42007C */ sw $v0, 0x7C($s2) /* 19F9A8 802710C8 24020005 */ addiu $v0, $zero, 0x5 /* 19F9AC 802710CC 0809C445 */ j .L80271114 /* 19F9B0 802710D0 AE420070 */ sw $v0, 0x70($s2) glabel .L802710D4 /* 19F9B4 802710D4 8E42007C */ lw $v0, 0x7C($s2) /* 19F9B8 802710D8 10400003 */ beqz $v0, .L802710E8 /* 19F9BC 802710DC 2442FFFF */ addiu $v0, $v0, -0x1 .L802710E0: /* 19F9C0 802710E0 0809C445 */ j .L80271114 /* 19F9C4 802710E4 AE42007C */ sw $v0, 0x7C($s2) .L802710E8: /* 19F9C8 802710E8 8E0201D8 */ lw $v0, 0x1D8($s0) /* 19F9CC 802710EC 10400005 */ beqz $v0, .L80271104 /* 19F9D0 802710F0 00000000 */ nop /* 19F9D4 802710F4 0C0B1059 */ jal does_script_exist /* 19F9D8 802710F8 8E0401E8 */ lw $a0, 0x1E8($s0) /* 19F9DC 802710FC 14400006 */ bnez $v0, .L80271118 /* 19F9E0 80271100 0000102D */ daddu $v0, $zero, $zero .L80271104: /* 19F9E4 80271104 3C01802A */ lui $at, %hi(D_8029FBD4) /* 19F9E8 80271108 A020FBD4 */ sb $zero, %lo(D_8029FBD4)($at) /* 19F9EC 8027110C 0809C446 */ j .L80271118 /* 19F9F0 80271110 24020002 */ addiu $v0, $zero, 0x2 .L80271114: /* 19F9F4 80271114 0000102D */ daddu $v0, $zero, $zero .L80271118: /* 19F9F8 80271118 8FBF0028 */ lw $ra, 0x28($sp) /* 19F9FC 8027111C 8FB30024 */ lw $s3, 0x24($sp) /* 19FA00 80271120 8FB20020 */ lw $s2, 0x20($sp) /* 19FA04 80271124 8FB1001C */ lw $s1, 0x1C($sp) /* 19FA08 80271128 8FB00018 */ lw $s0, 0x18($sp) /* 19FA0C 8027112C D7BE0058 */ ldc1 $f30, 0x58($sp) /* 19FA10 80271130 D7BC0050 */ ldc1 $f28, 0x50($sp) /* 19FA14 80271134 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 19FA18 80271138 D7B80040 */ ldc1 $f24, 0x40($sp) /* 19FA1C 8027113C D7B60038 */ ldc1 $f22, 0x38($sp) /* 19FA20 80271140 D7B40030 */ ldc1 $f20, 0x30($sp) /* 19FA24 80271144 03E00008 */ jr $ra /* 19FA28 80271148 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: ApiStatus HealActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 actorID; Actor* actor; f32 x1, y1, z1; f32 x2, y2, z2; s32 hpBoost; s32 flags; s32 flags2; s32 message; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { actorID = evt_get_variable(script, *args++); if (actorID == ACTOR_SELF) { actorID = script->owner1.enemyID; } hpBoost = evt_get_variable(script, *args++); D_8029FBD0 = evt_get_variable(script, *args++); actor = get_actor(actorID); script->functionTempPtr[1] = actor; script->functionTemp[2] = hpBoost; btl_cam_use_preset(BTL_CAM_PRESET_08); btl_cam_set_zoffset(12); btl_cam_target_actor(actor->actorID); btl_cam_move(10); func_8024E60C(); D_8029FBD4 = 1; script->functionTemp[3] = 5; script->functionTemp[0] = 1; } get_actor(script->owner1.enemyID); actor = script->functionTempPtr[1]; hpBoost = script->functionTemp[2]; flags = actor->flags; x1 = actor->currentPos.x + actor->headOffset.x; if (flags & ACTOR_FLAG_UPSIDE_DOWN) { y1 = actor->currentPos.y + actor->headOffset.y - actor->size.y / 2; } else if (!(flags & ACTOR_FLAG_8000)) { y1 = actor->currentPos.y + actor->headOffset.y + actor->size.y / 2; } else { y1 = actor->currentPos.y + actor->headOffset.y + actor->size.y; } z1 = actor->currentPos.z + actor->headOffset.z + 10.0f; flags2 = actor->flags; x2 = actor->currentPos.x + actor->headOffset.x + actor->size.x / 2; if (flags2 & ACTOR_FLAG_UPSIDE_DOWN) { y2 = actor->currentPos.y + actor->headOffset.y - actor->size.y; } else if (!(flags2 & ACTOR_FLAG_8000)) { y2 = actor->currentPos.y + actor->headOffset.y + actor->size.y; } else { y2 = actor->currentPos.y + actor->headOffset.y + actor->size.y * 2; } z2 = actor->currentPos.z + actor->headOffset.z + 10.0f; switch (script->functionTemp[0]) { case 1: if (script->functionTemp[3] == 0) { dispatch_event_actor(actor, EVENT_SWAP_PARTNER); fx_recover(0, x2, y2, z2, hpBoost); show_start_recovery_shimmer(x1, y1, z1, hpBoost); script->functionTemp[3] = 30; script->functionTemp[0] = 2; } else { script->functionTemp[3]--; break; } break; case 2: if (script->functionTemp[3] == 0) { btl_cam_use_preset(BTL_CAM_DEFAULT); btl_cam_move(15); actor->currentHP += hpBoost; if (actor->maxHP < actor->currentHP) { actor->currentHP = actor->maxHP; } show_recovery_shimmer(x1, y1, z1, hpBoost); script->functionTemp[3] = 15; script->functionTemp[0] = 3; } else { script->functionTemp[3]--; break; } break; case 3: if (script->functionTemp[3] == 0) { message = 0x20; if (D_8029FBD0 == 0) { message = 0x1F; } btl_show_variable_battle_message(message, 60, hpBoost); script->functionTemp[0] = 4; } else { script->functionTemp[3]--; break; } break; case 4: if (btl_is_popup_displayed() == 0) { script->functionTemp[3] = 10; script->functionTemp[0] = 5; } break; case 5: if (script->functionTemp[3] != 0) { script->functionTemp[3]--; break; } if ((actor->handleEventScript == NULL) || !does_script_exist(actor->handleEventScriptID)) { D_8029FBD4 = 0; return ApiStatus_DONE2; } break; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel snaking_static_appendGfx /* 3B289C E00AE54C 27BDFF18 */ addiu $sp, $sp, -0xE8 /* 3B28A0 E00AE550 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3B28A4 E00AE554 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3B28A8 E00AE558 AFB300BC */ sw $s3, 0xBC($sp) /* 3B28AC E00AE55C 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3B28B0 E00AE560 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3B28B4 E00AE564 AFBF00D4 */ sw $ra, 0xD4($sp) /* 3B28B8 E00AE568 AFBE00D0 */ sw $fp, 0xD0($sp) /* 3B28BC E00AE56C AFB700CC */ sw $s7, 0xCC($sp) /* 3B28C0 E00AE570 AFB600C8 */ sw $s6, 0xC8($sp) /* 3B28C4 E00AE574 AFB500C4 */ sw $s5, 0xC4($sp) /* 3B28C8 E00AE578 AFB400C0 */ sw $s4, 0xC0($sp) /* 3B28CC E00AE57C AFB200B8 */ sw $s2, 0xB8($sp) /* 3B28D0 E00AE580 AFB100B4 */ sw $s1, 0xB4($sp) /* 3B28D4 E00AE584 AFB000B0 */ sw $s0, 0xB0($sp) /* 3B28D8 E00AE588 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 3B28DC E00AE58C F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 3B28E0 E00AE590 AFA400E8 */ sw $a0, 0xE8($sp) /* 3B28E4 E00AE594 8E650000 */ lw $a1, 0x0($s3) /* 3B28E8 E00AE598 8FA900E8 */ lw $t1, 0xE8($sp) /* 3B28EC E00AE59C 00A0182D */ daddu $v1, $a1, $zero /* 3B28F0 E00AE5A0 8D32000C */ lw $s2, 0xC($t1) /* 3B28F4 E00AE5A4 24A50008 */ addiu $a1, $a1, 0x8 /* 3B28F8 E00AE5A8 AE650000 */ sw $a1, 0x0($s3) /* 3B28FC E00AE5AC 8E490014 */ lw $t1, 0x14($s2) /* 3B2900 E00AE5B0 27A40018 */ addiu $a0, $sp, 0x18 /* 3B2904 E00AE5B4 AFA90098 */ sw $t1, 0x98($sp) /* 3B2908 E00AE5B8 8E490024 */ lw $t1, 0x24($s2) /* 3B290C E00AE5BC 3C110001 */ lui $s1, (0x11630 >> 16) /* 3B2910 E00AE5C0 AFA9009C */ sw $t1, 0x9C($sp) /* 3B2914 E00AE5C4 8E5E0018 */ lw $fp, 0x18($s2) /* 3B2918 E00AE5C8 8E49001C */ lw $t1, 0x1C($s2) /* 3B291C E00AE5CC 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 3B2920 E00AE5D0 AFA900A0 */ sw $t1, 0xA0($sp) /* 3B2924 E00AE5D4 8E490020 */ lw $t1, 0x20($s2) /* 3B2928 E00AE5D8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3B292C E00AE5DC AFA900A4 */ sw $t1, 0xA4($sp) /* 3B2930 E00AE5E0 AC620000 */ sw $v0, 0x0($v1) /* 3B2934 E00AE5E4 AC600004 */ sw $zero, 0x4($v1) /* 3B2938 E00AE5E8 ACA60000 */ sw $a2, 0x0($a1) /* 3B293C E00AE5EC 8FA900E8 */ lw $t1, 0xE8($sp) /* 3B2940 E00AE5F0 24150001 */ addiu $s5, $zero, 0x1 /* 3B2944 E00AE5F4 8D230010 */ lw $v1, 0x10($t1) /* 3B2948 E00AE5F8 24A20008 */ addiu $v0, $a1, 0x8 /* 3B294C E00AE5FC AE620000 */ sw $v0, 0x0($s3) /* 3B2950 E00AE600 8C62001C */ lw $v0, 0x1C($v1) /* 3B2954 E00AE604 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3B2958 E00AE608 00431021 */ addu $v0, $v0, $v1 /* 3B295C E00AE60C 3C03800B */ lui $v1, %hi(gCameras) /* 3B2960 E00AE610 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3B2964 E00AE614 ACA20004 */ sw $v0, 0x4($a1) /* 3B2968 E00AE618 8E450004 */ lw $a1, 0x4($s2) /* 3B296C E00AE61C 8E460008 */ lw $a2, 0x8($s2) /* 3B2970 E00AE620 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3B2974 E00AE624 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3B2978 E00AE628 8E47000C */ lw $a3, 0xC($s2) /* 3B297C E00AE62C 00028080 */ sll $s0, $v0, 2 /* 3B2980 E00AE630 02028021 */ addu $s0, $s0, $v0 /* 3B2984 E00AE634 00108080 */ sll $s0, $s0, 2 /* 3B2988 E00AE638 02028023 */ subu $s0, $s0, $v0 /* 3B298C E00AE63C 001010C0 */ sll $v0, $s0, 3 /* 3B2990 E00AE640 02028021 */ addu $s0, $s0, $v0 /* 3B2994 E00AE644 001080C0 */ sll $s0, $s0, 3 /* 3B2998 E00AE648 0C080108 */ jal shim_guTranslateF /* 3B299C E00AE64C 02038021 */ addu $s0, $s0, $v1 /* 3B29A0 E00AE650 27B40058 */ addiu $s4, $sp, 0x58 /* 3B29A4 E00AE654 8E450038 */ lw $a1, 0x38($s2) /* 3B29A8 E00AE658 0280202D */ daddu $a0, $s4, $zero /* 3B29AC E00AE65C 00A0302D */ daddu $a2, $a1, $zero /* 3B29B0 E00AE660 0C080110 */ jal shim_guScaleF /* 3B29B4 E00AE664 00A0382D */ daddu $a3, $a1, $zero /* 3B29B8 E00AE668 0280202D */ daddu $a0, $s4, $zero /* 3B29BC E00AE66C 27A50018 */ addiu $a1, $sp, 0x18 /* 3B29C0 E00AE670 0C080114 */ jal shim_guMtxCatF /* 3B29C4 E00AE674 00A0302D */ daddu $a2, $a1, $zero /* 3B29C8 E00AE678 27A40018 */ addiu $a0, $sp, 0x18 /* 3B29CC E00AE67C 3C168007 */ lui $s6, %hi(gMatrixListPos) /* 3B29D0 E00AE680 26D641F0 */ addiu $s6, $s6, %lo(gMatrixListPos) /* 3B29D4 E00AE684 3C17800A */ lui $s7, %hi(gDisplayContext) /* 3B29D8 E00AE688 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext) /* 3B29DC E00AE68C 96C50000 */ lhu $a1, 0x0($s6) /* 3B29E0 E00AE690 8EE20000 */ lw $v0, 0x0($s7) /* 3B29E4 E00AE694 00052980 */ sll $a1, $a1, 6 /* 3B29E8 E00AE698 00B12821 */ addu $a1, $a1, $s1 /* 3B29EC E00AE69C 0C080118 */ jal shim_guMtxF2L /* 3B29F0 E00AE6A0 00452821 */ addu $a1, $v0, $a1 /* 3B29F4 E00AE6A4 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3B29F8 E00AE6A8 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3B29FC E00AE6AC 3C06DA38 */ lui $a2, (0xDA380000 >> 16) /* 3B2A00 E00AE6B0 00D53025 */ or $a2, $a2, $s5 /* 3B2A04 E00AE6B4 8E640000 */ lw $a0, 0x0($s3) /* 3B2A08 E00AE6B8 96C20000 */ lhu $v0, 0x0($s6) /* 3B2A0C E00AE6BC 0080282D */ daddu $a1, $a0, $zero /* 3B2A10 E00AE6C0 24840008 */ addiu $a0, $a0, 0x8 /* 3B2A14 E00AE6C4 AE640000 */ sw $a0, 0x0($s3) /* 3B2A18 E00AE6C8 ACA30000 */ sw $v1, 0x0($a1) /* 3B2A1C E00AE6CC 00551821 */ addu $v1, $v0, $s5 /* 3B2A20 E00AE6D0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B2A24 E00AE6D4 00021180 */ sll $v0, $v0, 6 /* 3B2A28 E00AE6D8 A6C30000 */ sh $v1, 0x0($s6) /* 3B2A2C E00AE6DC 8EE30000 */ lw $v1, 0x0($s7) /* 3B2A30 E00AE6E0 00511021 */ addu $v0, $v0, $s1 /* 3B2A34 E00AE6E4 00621821 */ addu $v1, $v1, $v0 /* 3B2A38 E00AE6E8 24820008 */ addiu $v0, $a0, 0x8 /* 3B2A3C E00AE6EC ACA30004 */ sw $v1, 0x4($a1) /* 3B2A40 E00AE6F0 AE620000 */ sw $v0, 0x0($s3) /* 3B2A44 E00AE6F4 24820010 */ addiu $v0, $a0, 0x10 /* 3B2A48 E00AE6F8 AC860000 */ sw $a2, 0x0($a0) /* 3B2A4C E00AE6FC AE620000 */ sw $v0, 0x0($s3) /* 3B2A50 E00AE700 8E030204 */ lw $v1, 0x204($s0) /* 3B2A54 E00AE704 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3B2A58 E00AE708 AC820008 */ sw $v0, 0x8($a0) /* 3B2A5C E00AE70C AC830004 */ sw $v1, 0x4($a0) /* 3B2A60 E00AE710 9243002B */ lbu $v1, 0x2B($s2) /* 3B2A64 E00AE714 9245002F */ lbu $a1, 0x2F($s2) /* 3B2A68 E00AE718 92460033 */ lbu $a2, 0x33($s2) /* 3B2A6C E00AE71C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B2A70 E00AE720 AC820010 */ sw $v0, 0x10($a0) /* 3B2A74 E00AE724 3C020900 */ lui $v0, %hi(D_09001000_40E290) /* 3B2A78 E00AE728 24421000 */ addiu $v0, $v0, %lo(D_09001000_40E290) /* 3B2A7C E00AE72C AC820014 */ sw $v0, 0x14($a0) /* 3B2A80 E00AE730 00031E00 */ sll $v1, $v1, 24 /* 3B2A84 E00AE734 00052C00 */ sll $a1, $a1, 16 /* 3B2A88 E00AE738 00651825 */ or $v1, $v1, $a1 /* 3B2A8C E00AE73C 00063200 */ sll $a2, $a2, 8 /* 3B2A90 E00AE740 00661825 */ or $v1, $v1, $a2 /* 3B2A94 E00AE744 AC83000C */ sw $v1, 0xC($a0) /* 3B2A98 E00AE748 8FA900E8 */ lw $t1, 0xE8($sp) /* 3B2A9C E00AE74C 26520044 */ addiu $s2, $s2, 0x44 /* 3B2AA0 E00AE750 8D220008 */ lw $v0, 0x8($t1) /* 3B2AA4 E00AE754 24840018 */ addiu $a0, $a0, 0x18 /* 3B2AA8 E00AE758 02A2102A */ slt $v0, $s5, $v0 /* 3B2AAC E00AE75C 10400098 */ beqz $v0, .LE00AE9C0 /* 3B2AB0 E00AE760 AE640000 */ sw $a0, 0x0($s3) /* 3B2AB4 E00AE764 0260882D */ daddu $s1, $s3, $zero /* 3B2AB8 E00AE768 001E1E00 */ sll $v1, $fp, 24 /* 3B2ABC E00AE76C 0280982D */ daddu $s3, $s4, $zero /* 3B2AC0 E00AE770 02C0B82D */ daddu $s7, $s6, $zero /* 3B2AC4 E00AE774 3C140001 */ lui $s4, (0x11630 >> 16) /* 3B2AC8 E00AE778 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 3B2ACC E00AE77C 3C1EF200 */ lui $fp, (0xF2000000 >> 16) /* 3B2AD0 E00AE780 26500040 */ addiu $s0, $s2, 0x40 /* 3B2AD4 E00AE784 8FA900A0 */ lw $t1, 0xA0($sp) /* 3B2AD8 E00AE788 4480A000 */ mtc1 $zero, $f20 /* 3B2ADC E00AE78C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3B2AE0 E00AE790 4481B000 */ mtc1 $at, $f22 /* 3B2AE4 E00AE794 312200FF */ andi $v0, $t1, 0xFF /* 3B2AE8 E00AE798 00021400 */ sll $v0, $v0, 16 /* 3B2AEC E00AE79C 8FA900A4 */ lw $t1, 0xA4($sp) /* 3B2AF0 E00AE7A0 00621825 */ or $v1, $v1, $v0 /* 3B2AF4 E00AE7A4 312200FF */ andi $v0, $t1, 0xFF /* 3B2AF8 E00AE7A8 00021200 */ sll $v0, $v0, 8 /* 3B2AFC E00AE7AC 8FA90098 */ lw $t1, 0x98($sp) /* 3B2B00 E00AE7B0 00621825 */ or $v1, $v1, $v0 /* 3B2B04 E00AE7B4 AFA300A8 */ sw $v1, 0xA8($sp) /* 3B2B08 E00AE7B8 02A91004 */ sllv $v0, $t1, $s5 /* 3B2B0C E00AE7BC 0049B021 */ addu $s6, $v0, $t1 /* 3B2B10 E00AE7C0 26C2001F */ addiu $v0, $s6, 0x1F /* 3B2B14 E00AE7C4 00021080 */ sll $v0, $v0, 2 /* 3B2B18 E00AE7C8 30420FFF */ andi $v0, $v0, 0xFFF /* 3B2B1C E00AE7CC 00021300 */ sll $v0, $v0, 12 /* 3B2B20 E00AE7D0 AFA200AC */ sw $v0, 0xAC($sp) .LE00AE7D4: /* 3B2B24 E00AE7D4 8E280000 */ lw $t0, 0x0($s1) /* 3B2B28 E00AE7D8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B2B2C E00AE7DC 0100282D */ daddu $a1, $t0, $zero /* 3B2B30 E00AE7E0 ACA20000 */ sw $v0, 0x0($a1) /* 3B2B34 E00AE7E4 8E03FFE4 */ lw $v1, -0x1C($s0) /* 3B2B38 E00AE7E8 8FA9009C */ lw $t1, 0x9C($sp) /* 3B2B3C E00AE7EC 00690018 */ mult $v1, $t1 /* 3B2B40 E00AE7F0 00001812 */ mflo $v1 /* 3B2B44 E00AE7F4 3C028080 */ lui $v0, (0x80808081 >> 16) /* 3B2B48 E00AE7F8 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF) /* 3B2B4C E00AE7FC 00620018 */ mult $v1, $v0 /* 3B2B50 E00AE800 27A40018 */ addiu $a0, $sp, 0x18 /* 3B2B54 E00AE804 4407A000 */ mfc1 $a3, $f20 /* 3B2B58 E00AE808 8FA900A8 */ lw $t1, 0xA8($sp) /* 3B2B5C E00AE80C 00001010 */ mfhi $v0 /* 3B2B60 E00AE810 00431021 */ addu $v0, $v0, $v1 /* 3B2B64 E00AE814 000211C3 */ sra $v0, $v0, 7 /* 3B2B68 E00AE818 00031FC3 */ sra $v1, $v1, 31 /* 3B2B6C E00AE81C 00431023 */ subu $v0, $v0, $v1 /* 3B2B70 E00AE820 304200FF */ andi $v0, $v0, 0xFF /* 3B2B74 E00AE824 01221025 */ or $v0, $t1, $v0 /* 3B2B78 E00AE828 ACA20004 */ sw $v0, 0x4($a1) /* 3B2B7C E00AE82C 8E05FFC4 */ lw $a1, -0x3C($s0) /* 3B2B80 E00AE830 8E06FFC8 */ lw $a2, -0x38($s0) /* 3B2B84 E00AE834 25080008 */ addiu $t0, $t0, 0x8 /* 3B2B88 E00AE838 0C080108 */ jal shim_guTranslateF /* 3B2B8C E00AE83C AE280000 */ sw $t0, 0x0($s1) /* 3B2B90 E00AE840 E7B60010 */ swc1 $f22, 0x10($sp) /* 3B2B94 E00AE844 8E05FFFC */ lw $a1, -0x4($s0) /* 3B2B98 E00AE848 4406A000 */ mfc1 $a2, $f20 /* 3B2B9C E00AE84C 4407A000 */ mfc1 $a3, $f20 /* 3B2BA0 E00AE850 0C080104 */ jal shim_guRotateF /* 3B2BA4 E00AE854 0260202D */ daddu $a0, $s3, $zero /* 3B2BA8 E00AE858 0260202D */ daddu $a0, $s3, $zero /* 3B2BAC E00AE85C 27A50018 */ addiu $a1, $sp, 0x18 /* 3B2BB0 E00AE860 0C080114 */ jal shim_guMtxCatF /* 3B2BB4 E00AE864 00A0302D */ daddu $a2, $a1, $zero /* 3B2BB8 E00AE868 C602FFF4 */ lwc1 $f2, -0xC($s0) /* 3B2BBC E00AE86C 3C013D80 */ lui $at, (0x3D800000 >> 16) /* 3B2BC0 E00AE870 44810000 */ mtc1 $at, $f0 /* 3B2BC4 E00AE874 00000000 */ nop /* 3B2BC8 E00AE878 46001082 */ mul.s $f2, $f2, $f0 /* 3B2BCC E00AE87C 00000000 */ nop /* 3B2BD0 E00AE880 0260202D */ daddu $a0, $s3, $zero /* 3B2BD4 E00AE884 44051000 */ mfc1 $a1, $f2 /* 3B2BD8 E00AE888 4407B000 */ mfc1 $a3, $f22 /* 3B2BDC E00AE88C 0C080110 */ jal shim_guScaleF /* 3B2BE0 E00AE890 00A0302D */ daddu $a2, $a1, $zero /* 3B2BE4 E00AE894 0260202D */ daddu $a0, $s3, $zero /* 3B2BE8 E00AE898 27A50018 */ addiu $a1, $sp, 0x18 /* 3B2BEC E00AE89C 0C080114 */ jal shim_guMtxCatF /* 3B2BF0 E00AE8A0 00A0302D */ daddu $a2, $a1, $zero /* 3B2BF4 E00AE8A4 27A40018 */ addiu $a0, $sp, 0x18 /* 3B2BF8 E00AE8A8 96E50000 */ lhu $a1, 0x0($s7) /* 3B2BFC E00AE8AC 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3B2C00 E00AE8B0 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 3B2C04 E00AE8B4 00052980 */ sll $a1, $a1, 6 /* 3B2C08 E00AE8B8 00B42821 */ addu $a1, $a1, $s4 /* 3B2C0C E00AE8BC 0C080118 */ jal shim_guMtxF2L /* 3B2C10 E00AE8C0 00452821 */ addu $a1, $v0, $a1 /* 3B2C14 E00AE8C4 3C060100 */ lui $a2, (0x100007C >> 16) /* 3B2C18 E00AE8C8 34C6007C */ ori $a2, $a2, (0x100007C & 0xFFFF) /* 3B2C1C E00AE8CC 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3B2C20 E00AE8D0 8E240000 */ lw $a0, 0x0($s1) /* 3B2C24 E00AE8D4 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3B2C28 E00AE8D8 0080282D */ daddu $a1, $a0, $zero /* 3B2C2C E00AE8DC 24840008 */ addiu $a0, $a0, 0x8 /* 3B2C30 E00AE8E0 AE240000 */ sw $a0, 0x0($s1) /* 3B2C34 E00AE8E4 96E20000 */ lhu $v0, 0x0($s7) /* 3B2C38 E00AE8E8 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3B2C3C E00AE8EC ACA30000 */ sw $v1, 0x0($a1) /* 3B2C40 E00AE8F0 24430001 */ addiu $v1, $v0, 0x1 /* 3B2C44 E00AE8F4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B2C48 E00AE8F8 00021180 */ sll $v0, $v0, 6 /* 3B2C4C E00AE8FC A6E30000 */ sh $v1, 0x0($s7) /* 3B2C50 E00AE900 3C03800A */ lui $v1, %hi(gDisplayContext) /* 3B2C54 E00AE904 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 3B2C58 E00AE908 00541021 */ addu $v0, $v0, $s4 /* 3B2C5C E00AE90C 00621821 */ addu $v1, $v1, $v0 /* 3B2C60 E00AE910 24820008 */ addiu $v0, $a0, 0x8 /* 3B2C64 E00AE914 ACA30004 */ sw $v1, 0x4($a1) /* 3B2C68 E00AE918 AE220000 */ sw $v0, 0x0($s1) /* 3B2C6C E00AE91C 24820010 */ addiu $v0, $a0, 0x10 /* 3B2C70 E00AE920 AE220000 */ sw $v0, 0x0($s1) /* 3B2C74 E00AE924 24820018 */ addiu $v0, $a0, 0x18 /* 3B2C78 E00AE928 AE220000 */ sw $v0, 0x0($s1) /* 3B2C7C E00AE92C 8E020000 */ lw $v0, 0x0($s0) /* 3B2C80 E00AE930 24830020 */ addiu $v1, $a0, 0x20 /* 3B2C84 E00AE934 AE230000 */ sw $v1, 0x0($s1) /* 3B2C88 E00AE938 00021180 */ sll $v0, $v0, 6 /* 3B2C8C E00AE93C 30420FFF */ andi $v0, $v0, 0xFFF /* 3B2C90 E00AE940 00021300 */ sll $v0, $v0, 12 /* 3B2C94 E00AE944 005E1025 */ or $v0, $v0, $fp /* 3B2C98 E00AE948 AC820000 */ sw $v0, 0x0($a0) /* 3B2C9C E00AE94C 00161080 */ sll $v0, $s6, 2 /* 3B2CA0 E00AE950 30420FFF */ andi $v0, $v0, 0xFFF /* 3B2CA4 E00AE954 00021300 */ sll $v0, $v0, 12 /* 3B2CA8 E00AE958 8E030000 */ lw $v1, 0x0($s0) /* 3B2CAC E00AE95C 005E1025 */ or $v0, $v0, $fp /* 3B2CB0 E00AE960 AC820008 */ sw $v0, 0x8($a0) /* 3B2CB4 E00AE964 8FA900AC */ lw $t1, 0xAC($sp) /* 3B2CB8 E00AE968 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B2CBC E00AE96C AC820010 */ sw $v0, 0x10($a0) /* 3B2CC0 E00AE970 3C020900 */ lui $v0, %hi(D_090010F8_40E388) /* 3B2CC4 E00AE974 244210F8 */ addiu $v0, $v0, %lo(D_090010F8_40E388) /* 3B2CC8 E00AE978 AC820014 */ sw $v0, 0x14($a0) /* 3B2CCC E00AE97C 24020040 */ addiu $v0, $zero, 0x40 /* 3B2CD0 E00AE980 AC870018 */ sw $a3, 0x18($a0) /* 3B2CD4 E00AE984 AC82001C */ sw $v0, 0x1C($a0) /* 3B2CD8 E00AE988 01263025 */ or $a2, $t1, $a2 /* 3B2CDC E00AE98C 00031980 */ sll $v1, $v1, 6 /* 3B2CE0 E00AE990 3463003C */ ori $v1, $v1, 0x3C /* 3B2CE4 E00AE994 30630FFF */ andi $v1, $v1, 0xFFF /* 3B2CE8 E00AE998 00031B00 */ sll $v1, $v1, 12 /* 3B2CEC E00AE99C 3463007C */ ori $v1, $v1, 0x7C /* 3B2CF0 E00AE9A0 AC86000C */ sw $a2, 0xC($a0) /* 3B2CF4 E00AE9A4 AC830004 */ sw $v1, 0x4($a0) /* 3B2CF8 E00AE9A8 8FA900E8 */ lw $t1, 0xE8($sp) /* 3B2CFC E00AE9AC 26B50001 */ addiu $s5, $s5, 0x1 /* 3B2D00 E00AE9B0 8D220008 */ lw $v0, 0x8($t1) /* 3B2D04 E00AE9B4 02A2102A */ slt $v0, $s5, $v0 /* 3B2D08 E00AE9B8 1440FF86 */ bnez $v0, .LE00AE7D4 /* 3B2D0C E00AE9BC 26100044 */ addiu $s0, $s0, 0x44 .LE00AE9C0: /* 3B2D10 E00AE9C0 3C05E200 */ lui $a1, (0xE2001E01 >> 16) /* 3B2D14 E00AE9C4 34A51E01 */ ori $a1, $a1, (0xE2001E01 & 0xFFFF) /* 3B2D18 E00AE9C8 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3B2D1C E00AE9CC 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3B2D20 E00AE9D0 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3B2D24 E00AE9D4 8C820000 */ lw $v0, 0x0($a0) /* 3B2D28 E00AE9D8 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3B2D2C E00AE9DC 0040182D */ daddu $v1, $v0, $zero /* 3B2D30 E00AE9E0 24420008 */ addiu $v0, $v0, 0x8 /* 3B2D34 E00AE9E4 AC820000 */ sw $v0, 0x0($a0) /* 3B2D38 E00AE9E8 AC650000 */ sw $a1, 0x0($v1) /* 3B2D3C E00AE9EC AC600004 */ sw $zero, 0x4($v1) /* 3B2D40 E00AE9F0 24430008 */ addiu $v1, $v0, 0x8 /* 3B2D44 E00AE9F4 AC830000 */ sw $v1, 0x0($a0) /* 3B2D48 E00AE9F8 24030040 */ addiu $v1, $zero, 0x40 /* 3B2D4C E00AE9FC AC460000 */ sw $a2, 0x0($v0) /* 3B2D50 E00AEA00 AC430004 */ sw $v1, 0x4($v0) /* 3B2D54 E00AEA04 8FBF00D4 */ lw $ra, 0xD4($sp) /* 3B2D58 E00AEA08 8FBE00D0 */ lw $fp, 0xD0($sp) /* 3B2D5C E00AEA0C 8FB700CC */ lw $s7, 0xCC($sp) /* 3B2D60 E00AEA10 8FB600C8 */ lw $s6, 0xC8($sp) /* 3B2D64 E00AEA14 8FB500C4 */ lw $s5, 0xC4($sp) /* 3B2D68 E00AEA18 8FB400C0 */ lw $s4, 0xC0($sp) /* 3B2D6C E00AEA1C 8FB300BC */ lw $s3, 0xBC($sp) /* 3B2D70 E00AEA20 8FB200B8 */ lw $s2, 0xB8($sp) /* 3B2D74 E00AEA24 8FB100B4 */ lw $s1, 0xB4($sp) /* 3B2D78 E00AEA28 8FB000B0 */ lw $s0, 0xB0($sp) /* 3B2D7C E00AEA2C D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 3B2D80 E00AEA30 D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 3B2D84 E00AEA34 03E00008 */ jr $ra /* 3B2D88 E00AEA38 27BD00E8 */ addiu $sp, $sp, 0xE8 /* 3B2D8C E00AEA3C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void snaking_static_appendGfx(void* effect) { EffectInstance* effectTemp = effect; SnakingStaticFXData* data = effectTemp->data.snakingStatic; Camera* camera = &gCameras[gCurrentCameraID]; Matrix4f sp18, sp58; s32 lifeTime = data->lifeTime; s32 unk_24 = data->unk_24; s32 primR = data->unk_18; s32 primG = data->unk_1C; s32 primB = data->unk_20; s32 i; 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_38, data->unk_38, data->unk_38); 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); gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0); gSPDisplayList(gMainGfxPos++, D_09001000_3B3D90); data++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) { gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, (data->unk_24 * unk_24) / 255); shim_guTranslateF(sp18, data->pos.x, data->pos.y, 0.0f); shim_guRotateF(sp58, data->unk_3C, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, data->unk_34 * 0.0625f, data->unk_34 * 0.0625f, 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); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, data->unk_40 * 64, 0, (data->unk_40 * 64) | 0x3C, 0x007C); gDPSetTileSize(gMainGfxPos++, 1, (lifeTime * 12), 0, ((lifeTime * 3) + 0x1F) * 4, 0x007C); gSPDisplayList(gMainGfxPos++, D_090010F8_3B3E88); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel bombette_breaking_appendGfx /* 3892F8 E0084928 27BDFF58 */ addiu $sp, $sp, -0xA8 /* 3892FC E008492C 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 389300 E0084930 AFA400A8 */ sw $a0, 0xA8($sp) /* 389304 E0084934 8FAA00A8 */ lw $t2, 0xA8($sp) /* 389308 E0084938 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 38930C E008493C AFB3007C */ sw $s3, 0x7C($sp) /* 389310 E0084940 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 389314 E0084944 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 389318 E0084948 AFBF0094 */ sw $ra, 0x94($sp) /* 38931C E008494C AFBE0090 */ sw $fp, 0x90($sp) /* 389320 E0084950 AFB7008C */ sw $s7, 0x8C($sp) /* 389324 E0084954 AFB60088 */ sw $s6, 0x88($sp) /* 389328 E0084958 AFB50084 */ sw $s5, 0x84($sp) /* 38932C E008495C AFB40080 */ sw $s4, 0x80($sp) /* 389330 E0084960 AFB20078 */ sw $s2, 0x78($sp) /* 389334 E0084964 AFB10074 */ sw $s1, 0x74($sp) /* 389338 E0084968 AFB00070 */ sw $s0, 0x70($sp) /* 38933C E008496C F7B600A0 */ sdc1 $f22, 0xA0($sp) /* 389340 E0084970 F7B40098 */ sdc1 $f20, 0x98($sp) /* 389344 E0084974 8E650000 */ lw $a1, 0x0($s3) /* 389348 E0084978 8D51000C */ lw $s1, 0xC($t2) /* 38934C E008497C 00A0182D */ daddu $v1, $a1, $zero /* 389350 E0084980 8E360044 */ lw $s6, 0x44($s1) /* 389354 E0084984 96220000 */ lhu $v0, 0x0($s1) /* 389358 E0084988 24A50008 */ addiu $a1, $a1, 0x8 /* 38935C E008498C AE650000 */ sw $a1, 0x0($s3) /* 389360 E0084990 0002F080 */ sll $fp, $v0, 2 /* 389364 E0084994 3C0AE008 */ lui $t2, (0xE0084E10 >> 16) /* 389368 E0084998 015E5021 */ addu $t2, $t2, $fp /* 38936C E008499C 8D4A4E10 */ lw $t2, (0xE0084E10 & 0xFFFF)($t2) /* 389370 E00849A0 27A40020 */ addiu $a0, $sp, 0x20 /* 389374 E00849A4 AFAA0060 */ sw $t2, 0x60($sp) /* 389378 E00849A8 3C0AE008 */ lui $t2, (0xE0084E28 >> 16) /* 38937C E00849AC 015E5021 */ addu $t2, $t2, $fp /* 389380 E00849B0 8D4A4E28 */ lw $t2, (0xE0084E28 & 0xFFFF)($t2) /* 389384 E00849B4 3C100001 */ lui $s0, (0x11630 >> 16) /* 389388 E00849B8 AFAA0064 */ sw $t2, 0x64($sp) /* 38938C E00849BC C6360038 */ lwc1 $f22, 0x38($s1) /* 389390 E00849C0 C6340040 */ lwc1 $f20, 0x40($s1) /* 389394 E00849C4 8E2A004C */ lw $t2, 0x4C($s1) /* 389398 E00849C8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 38939C E00849CC AFAA0068 */ sw $t2, 0x68($sp) /* 3893A0 E00849D0 AC620000 */ sw $v0, 0x0($v1) /* 3893A4 E00849D4 AC600004 */ sw $zero, 0x4($v1) /* 3893A8 E00849D8 ACA60000 */ sw $a2, 0x0($a1) /* 3893AC E00849DC 8FAA00A8 */ lw $t2, 0xA8($sp) /* 3893B0 E00849E0 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 3893B4 E00849E4 8D430010 */ lw $v1, 0x10($t2) /* 3893B8 E00849E8 24A20008 */ addiu $v0, $a1, 0x8 /* 3893BC E00849EC AE620000 */ sw $v0, 0x0($s3) /* 3893C0 E00849F0 8C62001C */ lw $v0, 0x1C($v1) /* 3893C4 E00849F4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3893C8 E00849F8 00431021 */ addu $v0, $v0, $v1 /* 3893CC E00849FC ACA20004 */ sw $v0, 0x4($a1) /* 3893D0 E0084A00 8E250008 */ lw $a1, 0x8($s1) /* 3893D4 E0084A04 8E26000C */ lw $a2, 0xC($s1) /* 3893D8 E0084A08 8E270010 */ lw $a3, 0x10($s1) /* 3893DC E0084A0C 0C080108 */ jal shim_guTranslateF /* 3893E0 E0084A10 24120001 */ addiu $s2, $zero, 0x1 /* 3893E4 E0084A14 27A40020 */ addiu $a0, $sp, 0x20 /* 3893E8 E0084A18 3C148007 */ lui $s4, %hi(gMatrixListPos) /* 3893EC E0084A1C 269441F0 */ addiu $s4, $s4, %lo(gMatrixListPos) /* 3893F0 E0084A20 3C15800A */ lui $s5, %hi(gDisplayContext) /* 3893F4 E0084A24 26B5A674 */ addiu $s5, $s5, %lo(gDisplayContext) /* 3893F8 E0084A28 96850000 */ lhu $a1, 0x0($s4) /* 3893FC E0084A2C 8EA20000 */ lw $v0, 0x0($s5) /* 389400 E0084A30 00052980 */ sll $a1, $a1, 6 /* 389404 E0084A34 00B02821 */ addu $a1, $a1, $s0 /* 389408 E0084A38 0C080118 */ jal shim_guMtxF2L /* 38940C E0084A3C 00452821 */ addu $a1, $v0, $a1 /* 389410 E0084A40 0260202D */ daddu $a0, $s3, $zero /* 389414 E0084A44 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 389418 E0084A48 8E670000 */ lw $a3, 0x0($s3) /* 38941C E0084A4C 96860000 */ lhu $a2, 0x0($s4) /* 389420 E0084A50 00E0282D */ daddu $a1, $a3, $zero /* 389424 E0084A54 ACA20000 */ sw $v0, 0x0($a1) /* 389428 E0084A58 30C2FFFF */ andi $v0, $a2, 0xFFFF /* 38942C E0084A5C 00021180 */ sll $v0, $v0, 6 /* 389430 E0084A60 00501021 */ addu $v0, $v0, $s0 /* 389434 E0084A64 8EA30000 */ lw $v1, 0x0($s5) /* 389438 E0084A68 24E70008 */ addiu $a3, $a3, 0x8 /* 38943C E0084A6C 00621821 */ addu $v1, $v1, $v0 /* 389440 E0084A70 ACA30004 */ sw $v1, 0x4($a1) /* 389444 E0084A74 96250002 */ lhu $a1, 0x2($s1) /* 389448 E0084A78 00D23021 */ addu $a2, $a2, $s2 /* 38944C E0084A7C AE670000 */ sw $a3, 0x0($s3) /* 389450 E0084A80 0C080158 */ jal shim_mdl_draw_hidden_panel_surface /* 389454 E0084A84 A6860000 */ sh $a2, 0x0($s4) /* 389458 E0084A88 8FAA00A8 */ lw $t2, 0xA8($sp) /* 38945C E0084A8C 0016B080 */ sll $s6, $s6, 2 /* 389460 E0084A90 8D420008 */ lw $v0, 0x8($t2) /* 389464 E0084A94 0242102A */ slt $v0, $s2, $v0 /* 389468 E0084A98 10400051 */ beqz $v0, .LE0084BE0 /* 38946C E0084A9C 26310050 */ addiu $s1, $s1, 0x50 /* 389470 E0084AA0 3C170001 */ lui $s7, (0x11630 >> 16) /* 389474 E0084AA4 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* 389478 E0084AA8 0260A82D */ daddu $s5, $s3, $zero /* 38947C E0084AAC 3C02E008 */ lui $v0, %hi(D_E0084E1C) /* 389480 E0084AB0 24424E1C */ addiu $v0, $v0, %lo(D_E0084E1C) /* 389484 E0084AB4 03C2F021 */ addu $fp, $fp, $v0 /* 389488 E0084AB8 2630001C */ addiu $s0, $s1, 0x1C /* 38948C E0084ABC 26D40050 */ addiu $s4, $s6, 0x50 /* 389490 E0084AC0 26D3FFD8 */ addiu $s3, $s6, -0x28 /* 389494 E0084AC4 26D10082 */ addiu $s1, $s6, 0x82 .LE0084AC8: /* 389498 E0084AC8 27A40020 */ addiu $a0, $sp, 0x20 /* 38949C E0084ACC 44912000 */ mtc1 $s1, $f4 /* 3894A0 E0084AD0 00000000 */ nop /* 3894A4 E0084AD4 46802120 */ cvt.s.w $f4, $f4 /* 3894A8 E0084AD8 44052000 */ mfc1 $a1, $f4 /* 3894AC E0084ADC 44932000 */ mtc1 $s3, $f4 /* 3894B0 E0084AE0 00000000 */ nop /* 3894B4 E0084AE4 46802120 */ cvt.s.w $f4, $f4 /* 3894B8 E0084AE8 44062000 */ mfc1 $a2, $f4 /* 3894BC E0084AEC 44942000 */ mtc1 $s4, $f4 /* 3894C0 E0084AF0 00000000 */ nop /* 3894C4 E0084AF4 46802120 */ cvt.s.w $f4, $f4 /* 3894C8 E0084AF8 44072000 */ mfc1 $a3, $f4 /* 3894CC E0084AFC 26940050 */ addiu $s4, $s4, 0x50 /* 3894D0 E0084B00 E7B40010 */ swc1 $f20, 0x10($sp) /* 3894D4 E0084B04 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 3894D8 E0084B08 2673FFD8 */ addiu $s3, $s3, -0x28 /* 3894DC E0084B0C E7A00014 */ swc1 $f0, 0x14($sp) /* 3894E0 E0084B10 C600FFFC */ lwc1 $f0, -0x4($s0) /* 3894E4 E0084B14 26310082 */ addiu $s1, $s1, 0x82 /* 3894E8 E0084B18 E7A00018 */ swc1 $f0, 0x18($sp) /* 3894EC E0084B1C C6000000 */ lwc1 $f0, 0x0($s0) /* 3894F0 E0084B20 26520001 */ addiu $s2, $s2, 0x1 /* 3894F4 E0084B24 0C080180 */ jal shim_guPositionF /* 3894F8 E0084B28 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3894FC E0084B2C 27A40020 */ addiu $a0, $sp, 0x20 /* 389500 E0084B30 3C058007 */ lui $a1, %hi(gMatrixListPos) /* 389504 E0084B34 94A541F0 */ lhu $a1, %lo(gMatrixListPos)($a1) /* 389508 E0084B38 3C02800A */ lui $v0, %hi(gDisplayContext) /* 38950C E0084B3C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 389510 E0084B40 00052980 */ sll $a1, $a1, 6 /* 389514 E0084B44 00B72821 */ addu $a1, $a1, $s7 /* 389518 E0084B48 0C080118 */ jal shim_guMtxF2L /* 38951C E0084B4C 00452821 */ addu $a1, $v0, $a1 /* 389520 E0084B50 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 389524 E0084B54 8EA40000 */ lw $a0, 0x0($s5) /* 389528 E0084B58 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 38952C E0084B5C 0080282D */ daddu $a1, $a0, $zero /* 389530 E0084B60 24840008 */ addiu $a0, $a0, 0x8 /* 389534 E0084B64 AEA40000 */ sw $a0, 0x0($s5) /* 389538 E0084B68 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 38953C E0084B6C 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0) /* 389540 E0084B70 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 389544 E0084B74 ACA30000 */ sw $v1, 0x0($a1) /* 389548 E0084B78 24430001 */ addiu $v1, $v0, 0x1 /* 38954C E0084B7C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 389550 E0084B80 00021180 */ sll $v0, $v0, 6 /* 389554 E0084B84 3C018007 */ lui $at, %hi(gMatrixListPos) /* 389558 E0084B88 A42341F0 */ sh $v1, %lo(gMatrixListPos)($at) /* 38955C E0084B8C 3C03800A */ lui $v1, %hi(gDisplayContext) /* 389560 E0084B90 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 389564 E0084B94 00571021 */ addu $v0, $v0, $s7 /* 389568 E0084B98 00621821 */ addu $v1, $v1, $v0 /* 38956C E0084B9C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 389570 E0084BA0 ACA30004 */ sw $v1, 0x4($a1) /* 389574 E0084BA4 AC820000 */ sw $v0, 0x0($a0) /* 389578 E0084BA8 8FC30000 */ lw $v1, 0x0($fp) /* 38957C E0084BAC 24820008 */ addiu $v0, $a0, 0x8 /* 389580 E0084BB0 AEA20000 */ sw $v0, 0x0($s5) /* 389584 E0084BB4 24020040 */ addiu $v0, $zero, 0x40 /* 389588 E0084BB8 AC860008 */ sw $a2, 0x8($a0) /* 38958C E0084BBC AC82000C */ sw $v0, 0xC($a0) /* 389590 E0084BC0 AC830004 */ sw $v1, 0x4($a0) /* 389594 E0084BC4 8FAA00A8 */ lw $t2, 0xA8($sp) /* 389598 E0084BC8 26100050 */ addiu $s0, $s0, 0x50 /* 38959C E0084BCC 8D420008 */ lw $v0, 0x8($t2) /* 3895A0 E0084BD0 24840010 */ addiu $a0, $a0, 0x10 /* 3895A4 E0084BD4 0242102A */ slt $v0, $s2, $v0 /* 3895A8 E0084BD8 1440FFBB */ bnez $v0, .LE0084AC8 /* 3895AC E0084BDC AEA40000 */ sw $a0, 0x0($s5) .LE0084BE0: /* 3895B0 E0084BE0 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 3895B4 E0084BE4 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 3895B8 E0084BE8 8D030000 */ lw $v1, 0x0($t0) /* 3895BC E0084BEC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3895C0 E0084BF0 0060202D */ daddu $a0, $v1, $zero /* 3895C4 E0084BF4 AC820000 */ sw $v0, 0x0($a0) /* 3895C8 E0084BF8 8FAA0064 */ lw $t2, 0x64($sp) /* 3895CC E0084BFC AC8A0004 */ sw $t2, 0x4($a0) /* 3895D0 E0084C00 8FAA00A8 */ lw $t2, 0xA8($sp) /* 3895D4 E0084C04 24120001 */ addiu $s2, $zero, 0x1 /* 3895D8 E0084C08 8D51000C */ lw $s1, 0xC($t2) /* 3895DC E0084C0C 24630008 */ addiu $v1, $v1, 0x8 /* 3895E0 E0084C10 AD030000 */ sw $v1, 0x0($t0) /* 3895E4 E0084C14 8D420008 */ lw $v0, 0x8($t2) /* 3895E8 E0084C18 0242102A */ slt $v0, $s2, $v0 /* 3895EC E0084C1C 10400062 */ beqz $v0, .LE0084DA8 /* 3895F0 E0084C20 26310050 */ addiu $s1, $s1, 0x50 /* 3895F4 E0084C24 0100982D */ daddu $s3, $t0, $zero /* 3895F8 E0084C28 4480A000 */ mtc1 $zero, $f20 /* 3895FC E0084C2C 3C17800B */ lui $s7, %hi(gCameras) /* 389600 E0084C30 26F71D80 */ addiu $s7, $s7, %lo(gCameras) /* 389604 E0084C34 3C16800A */ lui $s6, %hi(gDisplayContext) /* 389608 E0084C38 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 38960C E0084C3C 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 389610 E0084C40 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 389614 E0084C44 3C140001 */ lui $s4, (0x11630 >> 16) /* 389618 E0084C48 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 38961C E0084C4C 26300010 */ addiu $s0, $s1, 0x10 .LE0084C50: /* 389620 E0084C50 8E680000 */ lw $t0, 0x0($s3) /* 389624 E0084C54 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 389628 E0084C58 0100482D */ daddu $t1, $t0, $zero /* 38962C E0084C5C AD220000 */ sw $v0, 0x0($t1) /* 389630 E0084C60 8E03003C */ lw $v1, 0x3C($s0) /* 389634 E0084C64 8FAA0068 */ lw $t2, 0x68($sp) /* 389638 E0084C68 006A0018 */ mult $v1, $t2 /* 38963C E0084C6C 00001812 */ mflo $v1 /* 389640 E0084C70 3C028080 */ lui $v0, (0x80808081 >> 16) /* 389644 E0084C74 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF) /* 389648 E0084C78 00620018 */ mult $v1, $v0 /* 38964C E0084C7C 4405A000 */ mfc1 $a1, $f20 /* 389650 E0084C80 4407A000 */ mfc1 $a3, $f20 /* 389654 E0084C84 3C068007 */ lui $a2, %hi(gCurrentCameraID) /* 389658 E0084C88 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) /* 38965C E0084C8C 00001010 */ mfhi $v0 /* 389660 E0084C90 00431021 */ addu $v0, $v0, $v1 /* 389664 E0084C94 000211C3 */ sra $v0, $v0, 7 /* 389668 E0084C98 00031FC3 */ sra $v1, $v1, 31 /* 38966C E0084C9C 00431023 */ subu $v0, $v0, $v1 /* 389670 E0084CA0 2403FF00 */ addiu $v1, $zero, -0x100 /* 389674 E0084CA4 00431025 */ or $v0, $v0, $v1 /* 389678 E0084CA8 AD220004 */ sw $v0, 0x4($t1) /* 38967C E0084CAC 00061080 */ sll $v0, $a2, 2 /* 389680 E0084CB0 00461021 */ addu $v0, $v0, $a2 /* 389684 E0084CB4 00021080 */ sll $v0, $v0, 2 /* 389688 E0084CB8 00461023 */ subu $v0, $v0, $a2 /* 38968C E0084CBC 000218C0 */ sll $v1, $v0, 3 /* 389690 E0084CC0 00431021 */ addu $v0, $v0, $v1 /* 389694 E0084CC4 000210C0 */ sll $v0, $v0, 3 /* 389698 E0084CC8 00571021 */ addu $v0, $v0, $s7 /* 38969C E0084CCC C442006C */ lwc1 $f2, 0x6C($v0) /* 3896A0 E0084CD0 E7B60010 */ swc1 $f22, 0x10($sp) /* 3896A4 E0084CD4 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 3896A8 E0084CD8 25080008 */ addiu $t0, $t0, 0x8 /* 3896AC E0084CDC AE680000 */ sw $t0, 0x0($s3) /* 3896B0 E0084CE0 46001087 */ neg.s $f2, $f2 /* 3896B4 E0084CE4 E7A00014 */ swc1 $f0, 0x14($sp) /* 3896B8 E0084CE8 C600FFFC */ lwc1 $f0, -0x4($s0) /* 3896BC E0084CEC 44061000 */ mfc1 $a2, $f2 /* 3896C0 E0084CF0 27A40020 */ addiu $a0, $sp, 0x20 /* 3896C4 E0084CF4 E7A00018 */ swc1 $f0, 0x18($sp) /* 3896C8 E0084CF8 C6000000 */ lwc1 $f0, 0x0($s0) /* 3896CC E0084CFC 26520001 */ addiu $s2, $s2, 0x1 /* 3896D0 E0084D00 0C080180 */ jal shim_guPositionF /* 3896D4 E0084D04 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3896D8 E0084D08 27A40020 */ addiu $a0, $sp, 0x20 /* 3896DC E0084D0C 96A50000 */ lhu $a1, 0x0($s5) /* 3896E0 E0084D10 8EC20000 */ lw $v0, 0x0($s6) /* 3896E4 E0084D14 00052980 */ sll $a1, $a1, 6 /* 3896E8 E0084D18 00B42821 */ addu $a1, $a1, $s4 /* 3896EC E0084D1C 0C080118 */ jal shim_guMtxF2L /* 3896F0 E0084D20 00452821 */ addu $a1, $v0, $a1 /* 3896F4 E0084D24 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3896F8 E0084D28 8E640000 */ lw $a0, 0x0($s3) /* 3896FC E0084D2C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 389700 E0084D30 0080282D */ daddu $a1, $a0, $zero /* 389704 E0084D34 24840008 */ addiu $a0, $a0, 0x8 /* 389708 E0084D38 AE640000 */ sw $a0, 0x0($s3) /* 38970C E0084D3C 96A20000 */ lhu $v0, 0x0($s5) /* 389710 E0084D40 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 389714 E0084D44 ACA30000 */ sw $v1, 0x0($a1) /* 389718 E0084D48 24430001 */ addiu $v1, $v0, 0x1 /* 38971C E0084D4C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 389720 E0084D50 00021180 */ sll $v0, $v0, 6 /* 389724 E0084D54 A6A30000 */ sh $v1, 0x0($s5) /* 389728 E0084D58 8EC30000 */ lw $v1, 0x0($s6) /* 38972C E0084D5C 00541021 */ addu $v0, $v0, $s4 /* 389730 E0084D60 00621821 */ addu $v1, $v1, $v0 /* 389734 E0084D64 24820008 */ addiu $v0, $a0, 0x8 /* 389738 E0084D68 ACA30004 */ sw $v1, 0x4($a1) /* 38973C E0084D6C AE620000 */ sw $v0, 0x0($s3) /* 389740 E0084D70 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 389744 E0084D74 AC820000 */ sw $v0, 0x0($a0) /* 389748 E0084D78 8FAA0060 */ lw $t2, 0x60($sp) /* 38974C E0084D7C 24020040 */ addiu $v0, $zero, 0x40 /* 389750 E0084D80 AC860008 */ sw $a2, 0x8($a0) /* 389754 E0084D84 AC82000C */ sw $v0, 0xC($a0) /* 389758 E0084D88 AC8A0004 */ sw $t2, 0x4($a0) /* 38975C E0084D8C 8FAA00A8 */ lw $t2, 0xA8($sp) /* 389760 E0084D90 26100050 */ addiu $s0, $s0, 0x50 /* 389764 E0084D94 8D420008 */ lw $v0, 0x8($t2) /* 389768 E0084D98 24840010 */ addiu $a0, $a0, 0x10 /* 38976C E0084D9C 0242102A */ slt $v0, $s2, $v0 /* 389770 E0084DA0 1440FFAB */ bnez $v0, .LE0084C50 /* 389774 E0084DA4 AE640000 */ sw $a0, 0x0($s3) .LE0084DA8: /* 389778 E0084DA8 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 38977C E0084DAC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 389780 E0084DB0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 389784 E0084DB4 8C620000 */ lw $v0, 0x0($v1) /* 389788 E0084DB8 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 38978C E0084DBC 0040202D */ daddu $a0, $v0, $zero /* 389790 E0084DC0 24420008 */ addiu $v0, $v0, 0x8 /* 389794 E0084DC4 AC620000 */ sw $v0, 0x0($v1) /* 389798 E0084DC8 24020040 */ addiu $v0, $zero, 0x40 /* 38979C E0084DCC AC850000 */ sw $a1, 0x0($a0) /* 3897A0 E0084DD0 AC820004 */ sw $v0, 0x4($a0) /* 3897A4 E0084DD4 8FBF0094 */ lw $ra, 0x94($sp) /* 3897A8 E0084DD8 8FBE0090 */ lw $fp, 0x90($sp) /* 3897AC E0084DDC 8FB7008C */ lw $s7, 0x8C($sp) /* 3897B0 E0084DE0 8FB60088 */ lw $s6, 0x88($sp) /* 3897B4 E0084DE4 8FB50084 */ lw $s5, 0x84($sp) /* 3897B8 E0084DE8 8FB40080 */ lw $s4, 0x80($sp) /* 3897BC E0084DEC 8FB3007C */ lw $s3, 0x7C($sp) /* 3897C0 E0084DF0 8FB20078 */ lw $s2, 0x78($sp) /* 3897C4 E0084DF4 8FB10074 */ lw $s1, 0x74($sp) /* 3897C8 E0084DF8 8FB00070 */ lw $s0, 0x70($sp) /* 3897CC E0084DFC D7B600A0 */ ldc1 $f22, 0xA0($sp) /* 3897D0 E0084E00 D7B40098 */ ldc1 $f20, 0x98($sp) /* 3897D4 E0084E04 03E00008 */ jr $ra /* 3897D8 E0084E08 27BD00A8 */ addiu $sp, $sp, 0xA8 /* 3897DC E0084E0C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void bombette_breaking_appendGfx(void* effect) { Matrix4f sp20; BombetteBreakingFXData* data = ((EffectInstance*)effect)->data.bombetteBreaking; s32 timeLeft = data->timeLeft; u16 type = data->type; Gfx* sp60 = D_E0084E10[type]; Gfx* sp64 = D_E0084E28[type]; f32 unk_38 = data->unk_38; f32 unk_40 = data->unk_40; s32 mainAlpha = data->alpha; s32 i; timeLeft *= 4; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp20, data->center.x, data->center.y, data->center.z); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); shim_mdl_draw_hidden_panel_surface(&gMainGfxPos, data->treeIndex); data++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) { shim_guPositionF(sp20, timeLeft + (130 * i), timeLeft - (40 * i), timeLeft + (80 * i), unk_40, data->unk_14.x, data->unk_14.y, data->unk_14.z); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E0084E1C[type]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPDisplayList(gMainGfxPos++, sp64); data = ((EffectInstance*)effect)->data.bombetteBreaking; data++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, (data->alpha * mainAlpha) / 255); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_38, data->center.x, data->center.y, data->center.z); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, sp60); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel draw_number /* BDD9C 8012769C 27BDFF38 */ addiu $sp, $sp, -0xC8 /* BDDA0 801276A0 AFB200A8 */ sw $s2, 0xA8($sp) /* BDDA4 801276A4 AFB500B4 */ sw $s5, 0xB4($sp) /* BDDA8 801276A8 00E0A82D */ daddu $s5, $a3, $zero /* BDDAC 801276AC 3C028015 */ lui $v0, %hi(gMsgNumbers) /* BDDB0 801276B0 2442C340 */ addiu $v0, $v0, %lo(gMsgNumbers) /* BDDB4 801276B4 00151880 */ sll $v1, $s5, 2 /* BDDB8 801276B8 00751821 */ addu $v1, $v1, $s5 /* BDDBC 801276BC 00031880 */ sll $v1, $v1, 2 /* BDDC0 801276C0 00621821 */ addu $v1, $v1, $v0 /* BDDC4 801276C4 AFB400B0 */ sw $s4, 0xB0($sp) /* BDDC8 801276C8 24D4FFFE */ addiu $s4, $a2, -0x2 /* BDDCC 801276CC AFB100A4 */ sw $s1, 0xA4($sp) /* BDDD0 801276D0 97B100E2 */ lhu $s1, 0xE2($sp) /* BDDD4 801276D4 2E8200F1 */ sltiu $v0, $s4, 0xF1 /* BDDD8 801276D8 AFBF00C4 */ sw $ra, 0xC4($sp) /* BDDDC 801276DC AFBE00C0 */ sw $fp, 0xC0($sp) /* BDDE0 801276E0 AFB700BC */ sw $s7, 0xBC($sp) /* BDDE4 801276E4 AFB600B8 */ sw $s6, 0xB8($sp) /* BDDE8 801276E8 AFB300AC */ sw $s3, 0xAC($sp) /* BDDEC 801276EC AFB000A0 */ sw $s0, 0xA0($sp) /* BDDF0 801276F0 8C7E0000 */ lw $fp, 0x0($v1) /* BDDF4 801276F4 90770004 */ lbu $s7, 0x4($v1) /* BDDF8 801276F8 10400111 */ beqz $v0, .L80127B40 /* BDDFC 801276FC 00A0902D */ daddu $s2, $a1, $zero /* BDE00 80127700 27A50010 */ addiu $a1, $sp, 0x10 /* BDE04 80127704 0C00A531 */ jal int_to_string /* BDE08 80127708 2406000A */ addiu $a2, $zero, 0xA /* BDE0C 8012770C 0000802D */ daddu $s0, $zero, $zero /* BDE10 80127710 27A50010 */ addiu $a1, $sp, 0x10 /* BDE14 80127714 27A40028 */ addiu $a0, $sp, 0x28 /* BDE18 80127718 00B01021 */ addu $v0, $a1, $s0 .L8012771C: /* BDE1C 8012771C 90420000 */ lbu $v0, 0x0($v0) /* BDE20 80127720 1040000B */ beqz $v0, .L80127750 /* BDE24 80127724 2443FFD0 */ addiu $v1, $v0, -0x30 /* BDE28 80127728 306200FF */ andi $v0, $v1, 0xFF /* BDE2C 8012772C 2C42000A */ sltiu $v0, $v0, 0xA /* BDE30 80127730 50400004 */ beql $v0, $zero, .L80127744 /* BDE34 80127734 26100001 */ addiu $s0, $s0, 0x1 /* BDE38 80127738 00901021 */ addu $v0, $a0, $s0 /* BDE3C 8012773C A0430000 */ sb $v1, 0x0($v0) /* BDE40 80127740 26100001 */ addiu $s0, $s0, 0x1 .L80127744: /* BDE44 80127744 2A02000A */ slti $v0, $s0, 0xA /* BDE48 80127748 1440FFF4 */ bnez $v0, .L8012771C /* BDE4C 8012774C 00B01021 */ addu $v0, $a1, $s0 .L80127750: /* BDE50 80127750 3C03800A */ lui $v1, %hi(gMainGfxPos) /* BDE54 80127754 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* BDE58 80127758 0240302D */ daddu $a2, $s2, $zero /* BDE5C 8012775C 8C620000 */ lw $v0, 0x0($v1) /* BDE60 80127760 0040202D */ daddu $a0, $v0, $zero /* BDE64 80127764 24420008 */ addiu $v0, $v0, 0x8 /* BDE68 80127768 AC620000 */ sw $v0, 0x0($v1) /* BDE6C 8012776C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* BDE70 80127770 AC820000 */ sw $v0, 0x0($a0) /* BDE74 80127774 3C028015 */ lui $v0, %hi(gMsgDlistInitDrawNumber) /* BDE78 80127778 2442C368 */ addiu $v0, $v0, %lo(gMsgDlistInitDrawNumber) /* BDE7C 8012777C AC820004 */ sw $v0, 0x4($a0) /* BDE80 80127780 32220001 */ andi $v0, $s1, 0x1 /* BDE84 80127784 1040001E */ beqz $v0, .L80127800 /* BDE88 80127788 0200982D */ daddu $s3, $s0, $zero /* BDE8C 8012778C 2610FFFF */ addiu $s0, $s0, -0x1 /* BDE90 80127790 06000035 */ bltz $s0, .L80127868 /* BDE94 80127794 00151080 */ sll $v0, $s5, 2 /* BDE98 80127798 32290002 */ andi $t1, $s1, 0x2 /* BDE9C 8012779C 3C058015 */ lui $a1, %hi(gMsgNumbers) /* BDEA0 801277A0 24A5C340 */ addiu $a1, $a1, %lo(gMsgNumbers) /* BDEA4 801277A4 00551021 */ addu $v0, $v0, $s5 /* BDEA8 801277A8 00022080 */ sll $a0, $v0, 2 /* BDEAC 801277AC 00854021 */ addu $t0, $a0, $a1 /* BDEB0 801277B0 27A70028 */ addiu $a3, $sp, 0x28 /* BDEB4 801277B4 27A30040 */ addiu $v1, $sp, 0x40 /* BDEB8 801277B8 00101080 */ sll $v0, $s0, 2 /* BDEBC 801277BC 00431821 */ addu $v1, $v0, $v1 .L801277C0: /* BDEC0 801277C0 11200004 */ beqz $t1, .L801277D4 /* BDEC4 801277C4 00F01021 */ addu $v0, $a3, $s0 /* BDEC8 801277C8 91020011 */ lbu $v0, 0x11($t0) /* BDECC 801277CC 08049DFA */ j .L801277E8 /* BDED0 801277D0 00C23023 */ subu $a2, $a2, $v0 .L801277D4: /* BDED4 801277D4 90420000 */ lbu $v0, 0x0($v0) /* BDED8 801277D8 00441021 */ addu $v0, $v0, $a0 /* BDEDC 801277DC 00451021 */ addu $v0, $v0, $a1 /* BDEE0 801277E0 90420007 */ lbu $v0, 0x7($v0) /* BDEE4 801277E4 00C23023 */ subu $a2, $a2, $v0 .L801277E8: /* BDEE8 801277E8 AC660000 */ sw $a2, 0x0($v1) /* BDEEC 801277EC 2610FFFF */ addiu $s0, $s0, -0x1 /* BDEF0 801277F0 0601FFF3 */ bgez $s0, .L801277C0 /* BDEF4 801277F4 2463FFFC */ addiu $v1, $v1, -0x4 /* BDEF8 801277F8 08049E1B */ j .L8012786C /* BDEFC 801277FC 32220004 */ andi $v0, $s1, 0x4 .L80127800: /* BDF00 80127800 1A600019 */ blez $s3, .L80127868 /* BDF04 80127804 0000802D */ daddu $s0, $zero, $zero /* BDF08 80127808 32290002 */ andi $t1, $s1, 0x2 /* BDF0C 8012780C 3C058015 */ lui $a1, %hi(gMsgNumbers) /* BDF10 80127810 24A5C340 */ addiu $a1, $a1, %lo(gMsgNumbers) /* BDF14 80127814 00151080 */ sll $v0, $s5, 2 /* BDF18 80127818 00551021 */ addu $v0, $v0, $s5 /* BDF1C 8012781C 00022080 */ sll $a0, $v0, 2 /* BDF20 80127820 00854021 */ addu $t0, $a0, $a1 /* BDF24 80127824 27A70028 */ addiu $a3, $sp, 0x28 /* BDF28 80127828 27A30040 */ addiu $v1, $sp, 0x40 .L8012782C: /* BDF2C 8012782C 11200004 */ beqz $t1, .L80127840 /* BDF30 80127830 AC660000 */ sw $a2, 0x0($v1) /* BDF34 80127834 91020011 */ lbu $v0, 0x11($t0) /* BDF38 80127838 08049E16 */ j .L80127858 /* BDF3C 8012783C 00C23021 */ addu $a2, $a2, $v0 .L80127840: /* BDF40 80127840 00F01021 */ addu $v0, $a3, $s0 /* BDF44 80127844 90420000 */ lbu $v0, 0x0($v0) /* BDF48 80127848 00441021 */ addu $v0, $v0, $a0 /* BDF4C 8012784C 00451021 */ addu $v0, $v0, $a1 /* BDF50 80127850 90420007 */ lbu $v0, 0x7($v0) /* BDF54 80127854 00C23021 */ addu $a2, $a2, $v0 .L80127858: /* BDF58 80127858 26100001 */ addiu $s0, $s0, 0x1 /* BDF5C 8012785C 0213102A */ slt $v0, $s0, $s3 /* BDF60 80127860 1440FFF2 */ bnez $v0, .L8012782C /* BDF64 80127864 24630004 */ addiu $v1, $v1, 0x4 .L80127868: /* BDF68 80127868 32220004 */ andi $v0, $s1, 0x4 .L8012786C: /* BDF6C 8012786C 10400038 */ beqz $v0, .L80127950 /* BDF70 80127870 00000000 */ nop /* BDF74 80127874 1A600036 */ blez $s3, .L80127950 /* BDF78 80127878 0000802D */ daddu $s0, $zero, $zero /* BDF7C 8012787C 3C11800A */ lui $s1, %hi(gMainGfxPos) /* BDF80 80127880 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* BDF84 80127884 3C12E700 */ lui $s2, (0xE7000000 >> 16) /* BDF88 80127888 3C16E200 */ lui $s6, (0xE200001C >> 16) /* BDF8C 8012788C 36D6001C */ ori $s6, $s6, (0xE200001C & 0xFFFF) .L80127890: /* BDF90 80127890 3C040050 */ lui $a0, (0x504240 >> 16) /* BDF94 80127894 34844240 */ ori $a0, $a0, (0x504240 & 0xFFFF) /* BDF98 80127898 3C07FCFF */ lui $a3, (0xFCFF97FF >> 16) /* BDF9C 8012789C 34E797FF */ ori $a3, $a3, (0xFCFF97FF & 0xFFFF) /* BDFA0 801278A0 3C06FF2D */ lui $a2, (0xFF2DFEFF >> 16) /* BDFA4 801278A4 34C6FEFF */ ori $a2, $a2, (0xFF2DFEFF & 0xFFFF) /* BDFA8 801278A8 3C082828 */ lui $t0, (0x28282848 >> 16) /* BDFAC 801278AC 35082848 */ ori $t0, $t0, (0x28282848 & 0xFFFF) /* BDFB0 801278B0 8E230000 */ lw $v1, 0x0($s1) /* BDFB4 801278B4 02A0282D */ daddu $a1, $s5, $zero /* BDFB8 801278B8 0060102D */ daddu $v0, $v1, $zero /* BDFBC 801278BC 24630008 */ addiu $v1, $v1, 0x8 /* BDFC0 801278C0 AE230000 */ sw $v1, 0x0($s1) /* BDFC4 801278C4 AC520000 */ sw $s2, 0x0($v0) /* BDFC8 801278C8 AC400004 */ sw $zero, 0x4($v0) /* BDFCC 801278CC 24620008 */ addiu $v0, $v1, 0x8 /* BDFD0 801278D0 AE220000 */ sw $v0, 0x0($s1) /* BDFD4 801278D4 24620010 */ addiu $v0, $v1, 0x10 /* BDFD8 801278D8 AC760000 */ sw $s6, 0x0($v1) /* BDFDC 801278DC AC640004 */ sw $a0, 0x4($v1) /* BDFE0 801278E0 AE220000 */ sw $v0, 0x0($s1) /* BDFE4 801278E4 24620018 */ addiu $v0, $v1, 0x18 /* BDFE8 801278E8 AC670008 */ sw $a3, 0x8($v1) /* BDFEC 801278EC AC66000C */ sw $a2, 0xC($v1) /* BDFF0 801278F0 AE220000 */ sw $v0, 0x0($s1) /* BDFF4 801278F4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* BDFF8 801278F8 AC620010 */ sw $v0, 0x10($v1) /* BDFFC 801278FC 03B01021 */ addu $v0, $sp, $s0 /* BE000 80127900 AC680014 */ sw $t0, 0x14($v1) /* BE004 80127904 90420028 */ lbu $v0, 0x28($v0) /* BE008 80127908 00101880 */ sll $v1, $s0, 2 /* BE00C 8012790C 00570018 */ mult $v0, $s7 /* BE010 80127910 03A31021 */ addu $v0, $sp, $v1 /* BE014 80127914 8C460040 */ lw $a2, 0x40($v0) /* BE018 80127918 26870002 */ addiu $a3, $s4, 0x2 /* BE01C 8012791C 24C60002 */ addiu $a2, $a2, 0x2 /* BE020 80127920 00005012 */ mflo $t2 /* BE024 80127924 0C049D30 */ jal draw_digit /* BE028 80127928 03CA2021 */ addu $a0, $fp, $t2 /* BE02C 8012792C 8E220000 */ lw $v0, 0x0($s1) /* BE030 80127930 26100001 */ addiu $s0, $s0, 0x1 /* BE034 80127934 0040182D */ daddu $v1, $v0, $zero /* BE038 80127938 24420008 */ addiu $v0, $v0, 0x8 /* BE03C 8012793C AE220000 */ sw $v0, 0x0($s1) /* BE040 80127940 0213102A */ slt $v0, $s0, $s3 /* BE044 80127944 AC720000 */ sw $s2, 0x0($v1) /* BE048 80127948 1440FFD1 */ bnez $v0, .L80127890 /* BE04C 8012794C AC600004 */ sw $zero, 0x4($v1) .L80127950: /* BE050 80127950 8FAA00DC */ lw $t2, 0xDC($sp) /* BE054 80127954 240200FF */ addiu $v0, $zero, 0xFF /* BE058 80127958 15420015 */ bne $t2, $v0, .L801279B0 /* BE05C 8012795C 3C07E200 */ lui $a3, (0xE200001C >> 16) /* BE060 80127960 34E7001C */ ori $a3, $a3, (0xE200001C & 0xFFFF) /* BE064 80127964 3C050F0A */ lui $a1, (0xF0A7008 >> 16) /* BE068 80127968 34A57008 */ ori $a1, $a1, (0xF0A7008 & 0xFFFF) /* BE06C 8012796C 3C08FCFF */ lui $t0, (0xFCFFFFFF >> 16) /* BE070 80127970 3508FFFF */ ori $t0, $t0, (0xFCFFFFFF & 0xFFFF) /* BE074 80127974 3C06FFFC */ lui $a2, (0xFFFCF279 >> 16) /* BE078 80127978 3C04800A */ lui $a0, %hi(gMainGfxPos) /* BE07C 8012797C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* BE080 80127980 8C820000 */ lw $v0, 0x0($a0) /* BE084 80127984 34C6F279 */ ori $a2, $a2, (0xFFFCF279 & 0xFFFF) /* BE088 80127988 0040182D */ daddu $v1, $v0, $zero /* BE08C 8012798C 24420008 */ addiu $v0, $v0, 0x8 /* BE090 80127990 AC820000 */ sw $v0, 0x0($a0) /* BE094 80127994 AC670000 */ sw $a3, 0x0($v1) /* BE098 80127998 AC650004 */ sw $a1, 0x4($v1) /* BE09C 8012799C 24430008 */ addiu $v1, $v0, 0x8 /* BE0A0 801279A0 AC830000 */ sw $v1, 0x0($a0) /* BE0A4 801279A4 AC480000 */ sw $t0, 0x0($v0) /* BE0A8 801279A8 08049E87 */ j .L80127A1C /* BE0AC 801279AC AC460004 */ sw $a2, 0x4($v0) .L801279B0: /* BE0B0 801279B0 34E7001C */ ori $a3, $a3, (0xE200001C & 0xFFFF) /* BE0B4 801279B4 3C050050 */ lui $a1, (0x504240 >> 16) /* BE0B8 801279B8 34A54240 */ ori $a1, $a1, (0x504240 & 0xFFFF) /* BE0BC 801279BC 3C08FCFF */ lui $t0, (0xFCFFB3FF >> 16) /* BE0C0 801279C0 3508B3FF */ ori $t0, $t0, (0xFCFFB3FF & 0xFFFF) /* BE0C4 801279C4 3C06FF64 */ lui $a2, (0xFF64FE7F >> 16) /* BE0C8 801279C8 3C04800A */ lui $a0, %hi(gMainGfxPos) /* BE0CC 801279CC 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* BE0D0 801279D0 8C830000 */ lw $v1, 0x0($a0) /* BE0D4 801279D4 34C6FE7F */ ori $a2, $a2, (0xFF64FE7F & 0xFFFF) /* BE0D8 801279D8 0060102D */ daddu $v0, $v1, $zero /* BE0DC 801279DC 24630008 */ addiu $v1, $v1, 0x8 /* BE0E0 801279E0 AC830000 */ sw $v1, 0x0($a0) /* BE0E4 801279E4 AC470000 */ sw $a3, 0x0($v0) /* BE0E8 801279E8 AC450004 */ sw $a1, 0x4($v0) /* BE0EC 801279EC 24620008 */ addiu $v0, $v1, 0x8 /* BE0F0 801279F0 AC820000 */ sw $v0, 0x0($a0) /* BE0F4 801279F4 24620010 */ addiu $v0, $v1, 0x10 /* BE0F8 801279F8 AC680000 */ sw $t0, 0x0($v1) /* BE0FC 801279FC AC660004 */ sw $a2, 0x4($v1) /* BE100 80127A00 AC820000 */ sw $v0, 0x0($a0) /* BE104 80127A04 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* BE108 80127A08 AC620008 */ sw $v0, 0x8($v1) /* BE10C 80127A0C 8FAA00DC */ lw $t2, 0xDC($sp) /* BE110 80127A10 2402FF00 */ addiu $v0, $zero, -0x100 /* BE114 80127A14 01421025 */ or $v0, $t2, $v0 /* BE118 80127A18 AC62000C */ sw $v0, 0xC($v1) .L80127A1C: /* BE11C 80127A1C 3C07F500 */ lui $a3, (0xF5000100 >> 16) /* BE120 80127A20 34E70100 */ ori $a3, $a3, (0xF5000100 & 0xFFFF) /* BE124 80127A24 3C080703 */ lui $t0, (0x703C000 >> 16) /* BE128 80127A28 3508C000 */ ori $t0, $t0, (0x703C000 & 0xFFFF) /* BE12C 80127A2C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* BE130 80127A30 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* BE134 80127A34 0000802D */ daddu $s0, $zero, $zero /* BE138 80127A38 8C830000 */ lw $v1, 0x0($a0) /* BE13C 80127A3C 3C02FD10 */ lui $v0, (0xFD100000 >> 16) /* BE140 80127A40 0060302D */ daddu $a2, $v1, $zero /* BE144 80127A44 24630008 */ addiu $v1, $v1, 0x8 /* BE148 80127A48 AC830000 */ sw $v1, 0x0($a0) /* BE14C 80127A4C ACC20000 */ sw $v0, 0x0($a2) /* BE150 80127A50 8FA200D8 */ lw $v0, 0xD8($sp) /* BE154 80127A54 3C05802F */ lui $a1, %hi(D_802F4560) /* BE158 80127A58 24A54560 */ addiu $a1, $a1, %lo(D_802F4560) /* BE15C 80127A5C 00021100 */ sll $v0, $v0, 4 /* BE160 80127A60 00451021 */ addu $v0, $v0, $a1 /* BE164 80127A64 ACC20004 */ sw $v0, 0x4($a2) /* BE168 80127A68 24620008 */ addiu $v0, $v1, 0x8 /* BE16C 80127A6C AC820000 */ sw $v0, 0x0($a0) /* BE170 80127A70 3C02E800 */ lui $v0, (0xE8000000 >> 16) /* BE174 80127A74 AC620000 */ sw $v0, 0x0($v1) /* BE178 80127A78 24620010 */ addiu $v0, $v1, 0x10 /* BE17C 80127A7C AC600004 */ sw $zero, 0x4($v1) /* BE180 80127A80 AC820000 */ sw $v0, 0x0($a0) /* BE184 80127A84 3C020700 */ lui $v0, (0x7000000 >> 16) /* BE188 80127A88 AC62000C */ sw $v0, 0xC($v1) /* BE18C 80127A8C 24620018 */ addiu $v0, $v1, 0x18 /* BE190 80127A90 AC670008 */ sw $a3, 0x8($v1) /* BE194 80127A94 AC820000 */ sw $v0, 0x0($a0) /* BE198 80127A98 3C02E600 */ lui $v0, (0xE6000000 >> 16) /* BE19C 80127A9C AC620010 */ sw $v0, 0x10($v1) /* BE1A0 80127AA0 24620020 */ addiu $v0, $v1, 0x20 /* BE1A4 80127AA4 AC600014 */ sw $zero, 0x14($v1) /* BE1A8 80127AA8 AC820000 */ sw $v0, 0x0($a0) /* BE1AC 80127AAC 3C02F000 */ lui $v0, (0xF0000000 >> 16) /* BE1B0 80127AB0 AC620018 */ sw $v0, 0x18($v1) /* BE1B4 80127AB4 24620028 */ addiu $v0, $v1, 0x28 /* BE1B8 80127AB8 AC68001C */ sw $t0, 0x1C($v1) /* BE1BC 80127ABC AC820000 */ sw $v0, 0x0($a0) /* BE1C0 80127AC0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* BE1C4 80127AC4 AC620020 */ sw $v0, 0x20($v1) /* BE1C8 80127AC8 1A600014 */ blez $s3, .L80127B1C /* BE1CC 80127ACC AC600024 */ sw $zero, 0x24($v1) /* BE1D0 80127AD0 27B20028 */ addiu $s2, $sp, 0x28 /* BE1D4 80127AD4 27B10040 */ addiu $s1, $sp, 0x40 .L80127AD8: /* BE1D8 80127AD8 8E260000 */ lw $a2, 0x0($s1) /* BE1DC 80127ADC 24C2FFFF */ addiu $v0, $a2, -0x1 /* BE1E0 80127AE0 2C42013F */ sltiu $v0, $v0, 0x13F /* BE1E4 80127AE4 5040000A */ beql $v0, $zero, .L80127B10 /* BE1E8 80127AE8 26100001 */ addiu $s0, $s0, 0x1 /* BE1EC 80127AEC 02501021 */ addu $v0, $s2, $s0 /* BE1F0 80127AF0 90420000 */ lbu $v0, 0x0($v0) /* BE1F4 80127AF4 00570018 */ mult $v0, $s7 /* BE1F8 80127AF8 02A0282D */ daddu $a1, $s5, $zero /* BE1FC 80127AFC 0280382D */ daddu $a3, $s4, $zero /* BE200 80127B00 00005012 */ mflo $t2 /* BE204 80127B04 0C049D30 */ jal draw_digit /* BE208 80127B08 03CA2021 */ addu $a0, $fp, $t2 /* BE20C 80127B0C 26100001 */ addiu $s0, $s0, 0x1 .L80127B10: /* BE210 80127B10 0213102A */ slt $v0, $s0, $s3 /* BE214 80127B14 1440FFF0 */ bnez $v0, .L80127AD8 /* BE218 80127B18 26310004 */ addiu $s1, $s1, 0x4 .L80127B1C: /* BE21C 80127B1C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* BE220 80127B20 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* BE224 80127B24 8C620000 */ lw $v0, 0x0($v1) /* BE228 80127B28 0040202D */ daddu $a0, $v0, $zero /* BE22C 80127B2C 24420008 */ addiu $v0, $v0, 0x8 /* BE230 80127B30 AC620000 */ sw $v0, 0x0($v1) /* BE234 80127B34 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* BE238 80127B38 AC820000 */ sw $v0, 0x0($a0) /* BE23C 80127B3C AC800004 */ sw $zero, 0x4($a0) .L80127B40: /* BE240 80127B40 8FBF00C4 */ lw $ra, 0xC4($sp) /* BE244 80127B44 8FBE00C0 */ lw $fp, 0xC0($sp) /* BE248 80127B48 8FB700BC */ lw $s7, 0xBC($sp) /* BE24C 80127B4C 8FB600B8 */ lw $s6, 0xB8($sp) /* BE250 80127B50 8FB500B4 */ lw $s5, 0xB4($sp) /* BE254 80127B54 8FB400B0 */ lw $s4, 0xB0($sp) /* BE258 80127B58 8FB300AC */ lw $s3, 0xAC($sp) /* BE25C 80127B5C 8FB200A8 */ lw $s2, 0xA8($sp) /* BE260 80127B60 8FB100A4 */ lw $s1, 0xA4($sp) /* BE264 80127B64 8FB000A0 */ lw $s0, 0xA0($sp) /* BE268 80127B68 03E00008 */ jr $ra /* BE26C 80127B6C 27BD00C8 */ addiu $sp, $sp, 0xC8 ### DECOMPILED C INSTRUCTIONS: void draw_number(s32 value, s32 x, s32 y, s32 charset, s32 palette, s32 opacity, u16 style) { u8 valueStr[24]; u8 digits[24]; s32 digitPosX[24]; s32 i; s32 count; s32 posX; IMG_PTR raster = gMsgNumbers[charset].rasters; s32 texSize = gMsgNumbers[charset].texSize; y -= 2; if (y < 0 || y > 240) { return; } int_to_string(value, valueStr, 10); for (i = 0; i < 10; i++) { u8 digit; if (valueStr[i] == '\0') { break; } digit = valueStr[i] - '0'; if (digit < 10){ digits[i] = digit; } } posX = x; count = i; gSPDisplayList(gMainGfxPos++, gMsgDlistInitDrawNumber); if (style & DRAW_NUMBER_STYLE_ALIGN_RIGHT) { for (i = count - 1; i >= 0; i--) { if (style & DRAW_NUMBER_STYLE_MONOSPACE) { posX -= gMsgNumbers[charset].fixedWidth; } else { posX -= gMsgNumbers[charset].digitWidth[digits[i]]; } digitPosX[i] = posX; } } else { for (i = 0; i < count; i++) { digitPosX[i] = posX; if (style & DRAW_NUMBER_STYLE_MONOSPACE) { posX += gMsgNumbers[charset].fixedWidth; } else { posX += gMsgNumbers[charset].digitWidth[digits[i]]; } } } if (style & DRAW_NUMBER_STYLE_DROP_SHADOW) { for (i = 0; i < count; i++) { gDPPipeSync(gMainGfxPos++); gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07); gDPSetPrimColor(gMainGfxPos++, 0, 0, 40, 40, 40, 72); draw_digit(raster + digits[i] * texSize, charset, digitPosX[i] + 2, y + 2); gDPPipeSync(gMainGfxPos++); } } if (opacity == 255) { gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); gDPSetCombineMode(gMainGfxPos++, PM_CC_01, PM_CC_01); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, opacity); } gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[palette]); for (i = 0; i < count; i++) { posX = digitPosX[i]; if (posX > 0 && posX < 320) { draw_digit(raster + digits[i] * texSize, charset, posX, y); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel shimmer_burst_update /* 3742A4 E00701F4 27BDFF98 */ addiu $sp, $sp, -0x68 /* 3742A8 E00701F8 AFB20028 */ sw $s2, 0x28($sp) /* 3742AC E00701FC 0080902D */ daddu $s2, $a0, $zero /* 3742B0 E0070200 AFBF0034 */ sw $ra, 0x34($sp) /* 3742B4 E0070204 AFB40030 */ sw $s4, 0x30($sp) /* 3742B8 E0070208 AFB3002C */ sw $s3, 0x2C($sp) /* 3742BC E007020C AFB10024 */ sw $s1, 0x24($sp) /* 3742C0 E0070210 AFB00020 */ sw $s0, 0x20($sp) /* 3742C4 E0070214 F7BE0060 */ sdc1 $f30, 0x60($sp) /* 3742C8 E0070218 F7BC0058 */ sdc1 $f28, 0x58($sp) /* 3742CC E007021C F7BA0050 */ sdc1 $f26, 0x50($sp) /* 3742D0 E0070220 F7B80048 */ sdc1 $f24, 0x48($sp) /* 3742D4 E0070224 F7B60040 */ sdc1 $f22, 0x40($sp) /* 3742D8 E0070228 F7B40038 */ sdc1 $f20, 0x38($sp) /* 3742DC E007022C 8E440000 */ lw $a0, 0x0($s2) /* 3742E0 E0070230 8E43000C */ lw $v1, 0xC($s2) /* 3742E4 E0070234 30820010 */ andi $v0, $a0, 0x10 /* 3742E8 E0070238 8C740000 */ lw $s4, 0x0($v1) /* 3742EC E007023C 10400005 */ beqz $v0, .LE0070254 /* 3742F0 E0070240 2402FFEF */ addiu $v0, $zero, -0x11 /* 3742F4 E0070244 00821024 */ and $v0, $a0, $v0 /* 3742F8 E0070248 AE420000 */ sw $v0, 0x0($s2) /* 3742FC E007024C 24020010 */ addiu $v0, $zero, 0x10 /* 374300 E0070250 AC620038 */ sw $v0, 0x38($v1) .LE0070254: /* 374304 E0070254 8C640038 */ lw $a0, 0x38($v1) /* 374308 E0070258 288203E8 */ slti $v0, $a0, 0x3E8 /* 37430C E007025C 10400002 */ beqz $v0, .LE0070268 /* 374310 E0070260 2482FFFF */ addiu $v0, $a0, -0x1 /* 374314 E0070264 AC620038 */ sw $v0, 0x38($v1) .LE0070268: /* 374318 E0070268 8C62003C */ lw $v0, 0x3C($v1) /* 37431C E007026C 8C640038 */ lw $a0, 0x38($v1) /* 374320 E0070270 24420001 */ addiu $v0, $v0, 0x1 /* 374324 E0070274 04810005 */ bgez $a0, .LE007028C /* 374328 E0070278 AC62003C */ sw $v0, 0x3C($v1) /* 37432C E007027C 0C080128 */ jal shim_remove_effect /* 374330 E0070280 0240202D */ daddu $a0, $s2, $zero /* 374334 E0070284 0801C1AE */ j .LE00706B8 /* 374338 E0070288 00000000 */ nop .LE007028C: /* 37433C E007028C 28820008 */ slti $v0, $a0, 0x8 /* 374340 E0070290 10400002 */ beqz $v0, .LE007029C /* 374344 E0070294 00041140 */ sll $v0, $a0, 5 /* 374348 E0070298 AC62004C */ sw $v0, 0x4C($v1) .LE007029C: /* 37434C E007029C C47A0010 */ lwc1 $f26, 0x10($v1) /* 374350 E00702A0 C4780014 */ lwc1 $f24, 0x14($v1) /* 374354 E00702A4 E7B80010 */ swc1 $f24, 0x10($sp) /* 374358 E00702A8 8E420008 */ lw $v0, 0x8($s2) /* 37435C E00702AC 24110001 */ addiu $s1, $zero, 0x1 /* 374360 E00702B0 0222102A */ slt $v0, $s1, $v0 /* 374364 E00702B4 10400100 */ beqz $v0, .LE00706B8 /* 374368 E00702B8 2463006C */ addiu $v1, $v1, 0x6C /* 37436C E00702BC 4600D60D */ trunc.w.s $f24, $f26 /* 374370 E00702C0 4413C000 */ mfc1 $s3, $f24 /* 374374 E00702C4 24700020 */ addiu $s0, $v1, 0x20 /* 374378 E00702C8 3C01E007 */ lui $at, (0xE0070D60 >> 16) /* 37437C E00702CC D43E0D60 */ ldc1 $f30, (0xE0070D60 & 0xFFFF)($at) /* 374380 E00702D0 3C01E007 */ lui $at, (0xE0070D68 >> 16) /* 374384 E00702D4 D43C0D68 */ ldc1 $f28, (0xE0070D68 & 0xFFFF)($at) .LE00702D8: /* 374388 E00702D8 8E020010 */ lw $v0, 0x10($s0) /* 37438C E00702DC 24420001 */ addiu $v0, $v0, 0x1 /* 374390 E00702E0 AE020010 */ sw $v0, 0x10($s0) /* 374394 E00702E4 28420014 */ slti $v0, $v0, 0x14 /* 374398 E00702E8 50400001 */ beql $v0, $zero, .LE00702F0 /* 37439C E00702EC AE000010 */ sw $zero, 0x10($s0) .LE00702F0: /* 3743A0 E00702F0 8E020010 */ lw $v0, 0x10($s0) /* 3743A4 E00702F4 044200EC */ bltzl $v0, .LE00706A8 /* 3743A8 E00702F8 26310001 */ addiu $s1, $s1, 0x1 /* 3743AC E00702FC 144000A6 */ bnez $v0, .LE0070598 /* 3743B0 E0070300 00000000 */ nop /* 3743B4 E0070304 0C080138 */ jal shim_rand_int /* 3743B8 E0070308 24040167 */ addiu $a0, $zero, 0x167 /* 3743BC E007030C 24040167 */ addiu $a0, $zero, 0x167 /* 3743C0 E0070310 4482C000 */ mtc1 $v0, $f24 /* 3743C4 E0070314 00000000 */ nop /* 3743C8 E0070318 4680C620 */ cvt.s.w $f24, $f24 /* 3743CC E007031C 0C080138 */ jal shim_rand_int /* 3743D0 E0070320 E7B80018 */ swc1 $f24, 0x18($sp) /* 3743D4 E0070324 4482B000 */ mtc1 $v0, $f22 /* 3743D8 E0070328 00000000 */ nop /* 3743DC E007032C 1680003F */ bnez $s4, .LE007042C /* 3743E0 E0070330 4680B5A0 */ cvt.s.w $f22, $f22 /* 3743E4 E0070334 0C080140 */ jal shim_sin_deg /* 3743E8 E0070338 C7AC0018 */ lwc1 $f12, 0x18($sp) /* 3743EC E007033C 4600B306 */ mov.s $f12, $f22 /* 3743F0 E0070340 0C080144 */ jal shim_cos_deg /* 3743F4 E0070344 46000506 */ mov.s $f20, $f0 /* 3743F8 E0070348 4614D502 */ mul.s $f20, $f26, $f20 /* 3743FC E007034C 00000000 */ nop /* 374400 E0070350 4600A502 */ mul.s $f20, $f20, $f0 /* 374404 E0070354 00000000 */ nop /* 374408 E0070358 C7AC0018 */ lwc1 $f12, 0x18($sp) /* 37440C E007035C 0C080144 */ jal shim_cos_deg /* 374410 E0070360 E614FFE4 */ swc1 $f20, -0x1C($s0) /* 374414 E0070364 4600B306 */ mov.s $f12, $f22 /* 374418 E0070368 0C080144 */ jal shim_cos_deg /* 37441C E007036C 46000506 */ mov.s $f20, $f0 /* 374420 E0070370 C7B80010 */ lwc1 $f24, 0x10($sp) /* 374424 E0070374 4614C502 */ mul.s $f20, $f24, $f20 /* 374428 E0070378 00000000 */ nop /* 37442C E007037C 4600A502 */ mul.s $f20, $f20, $f0 /* 374430 E0070380 00000000 */ nop /* 374434 E0070384 4600B306 */ mov.s $f12, $f22 /* 374438 E0070388 0C080140 */ jal shim_sin_deg /* 37443C E007038C E614FFE8 */ swc1 $f20, -0x18($s0) /* 374440 E0070390 C602FFE4 */ lwc1 $f2, -0x1C($s0) /* 374444 E0070394 3C01E007 */ lui $at, (0xE0070D70 >> 16) /* 374448 E0070398 D4380D70 */ ldc1 $f24, (0xE0070D70 & 0xFFFF)($at) /* 37444C E007039C 460010A1 */ cvt.d.s $f2, $f2 /* 374450 E00703A0 46381082 */ mul.d $f2, $f2, $f24 /* 374454 E00703A4 00000000 */ nop /* 374458 E00703A8 C604FFE8 */ lwc1 $f4, -0x18($s0) /* 37445C E00703AC 46002121 */ cvt.d.s $f4, $f4 /* 374460 E00703B0 46382102 */ mul.d $f4, $f4, $f24 /* 374464 E00703B4 00000000 */ nop /* 374468 E00703B8 4600D002 */ mul.s $f0, $f26, $f0 /* 37446C E00703BC 00000000 */ nop /* 374470 E00703C0 E600FFEC */ swc1 $f0, -0x14($s0) /* 374474 E00703C4 46000021 */ cvt.d.s $f0, $f0 /* 374478 E00703C8 46380002 */ mul.d $f0, $f0, $f24 /* 37447C E00703CC 00000000 */ nop /* 374480 E00703D0 3C01E007 */ lui $at, (0xE0070D78 >> 16) /* 374484 E00703D4 D4380D78 */ ldc1 $f24, (0xE0070D78 & 0xFFFF)($at) /* 374488 E00703D8 462010A0 */ cvt.s.d $f2, $f2 /* 37448C E00703DC E602FFF8 */ swc1 $f2, -0x8($s0) /* 374490 E00703E0 46001186 */ mov.s $f6, $f2 /* 374494 E00703E4 460031A1 */ cvt.d.s $f6, $f6 /* 374498 E00703E8 46383182 */ mul.d $f6, $f6, $f24 /* 37449C E00703EC 00000000 */ nop /* 3744A0 E00703F0 46202120 */ cvt.s.d $f4, $f4 /* 3744A4 E00703F4 E604FFFC */ swc1 $f4, -0x4($s0) /* 3744A8 E00703F8 46002086 */ mov.s $f2, $f4 /* 3744AC E00703FC 460010A1 */ cvt.d.s $f2, $f2 /* 3744B0 E0070400 46381082 */ mul.d $f2, $f2, $f24 /* 3744B4 E0070404 00000000 */ nop /* 3744B8 E0070408 46200020 */ cvt.s.d $f0, $f0 /* 3744BC E007040C E6000000 */ swc1 $f0, 0x0($s0) /* 3744C0 E0070410 46000021 */ cvt.d.s $f0, $f0 /* 3744C4 E0070414 46380002 */ mul.d $f0, $f0, $f24 /* 3744C8 E0070418 00000000 */ nop /* 3744CC E007041C 462031A0 */ cvt.s.d $f6, $f6 /* 3744D0 E0070420 462010A0 */ cvt.s.d $f2, $f2 /* 3744D4 E0070424 0801C154 */ j .LE0070550 /* 3744D8 E0070428 E6060004 */ swc1 $f6, 0x4($s0) .LE007042C: /* 3744DC E007042C 0C080138 */ jal shim_rand_int /* 3744E0 E0070430 0260202D */ daddu $a0, $s3, $zero /* 3744E4 E0070434 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3744E8 E0070438 4481C800 */ mtc1 $at, $f25 /* 3744EC E007043C 4480C000 */ mtc1 $zero, $f24 /* 3744F0 E0070440 4600D521 */ cvt.d.s $f20, $f26 /* 3744F4 E0070444 4638A502 */ mul.d $f20, $f20, $f24 /* 3744F8 E0070448 00000000 */ nop /* 3744FC E007044C 44820000 */ mtc1 $v0, $f0 /* 374500 E0070450 00000000 */ nop /* 374504 E0070454 46800021 */ cvt.d.w $f0, $f0 /* 374508 E0070458 C7B80010 */ lwc1 $f24, 0x10($sp) /* 37450C E007045C 46340001 */ sub.d $f0, $f0, $f20 /* 374510 E0070460 4600C60D */ trunc.w.s $f24, $f24 /* 374514 E0070464 4404C000 */ mfc1 $a0, $f24 /* 374518 E0070468 46200020 */ cvt.s.d $f0, $f0 /* 37451C E007046C 0C080138 */ jal shim_rand_int /* 374520 E0070470 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 374524 E0070474 C7B80010 */ lwc1 $f24, 0x10($sp) /* 374528 E0070478 4600C0A1 */ cvt.d.s $f2, $f24 /* 37452C E007047C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 374530 E0070480 4481C800 */ mtc1 $at, $f25 /* 374534 E0070484 4480C000 */ mtc1 $zero, $f24 /* 374538 E0070488 00000000 */ nop /* 37453C E007048C 46381082 */ mul.d $f2, $f2, $f24 /* 374540 E0070490 00000000 */ nop /* 374544 E0070494 44820000 */ mtc1 $v0, $f0 /* 374548 E0070498 00000000 */ nop /* 37454C E007049C 46800021 */ cvt.d.w $f0, $f0 /* 374550 E00704A0 46220001 */ sub.d $f0, $f0, $f2 /* 374554 E00704A4 0260202D */ daddu $a0, $s3, $zero /* 374558 E00704A8 46200020 */ cvt.s.d $f0, $f0 /* 37455C E00704AC 0C080138 */ jal shim_rand_int /* 374560 E00704B0 E600FFE8 */ swc1 $f0, -0x18($s0) /* 374564 E00704B4 C602FFE4 */ lwc1 $f2, -0x1C($s0) /* 374568 E00704B8 3C01E007 */ lui $at, (0xE0070D80 >> 16) /* 37456C E00704BC D4380D80 */ ldc1 $f24, (0xE0070D80 & 0xFFFF)($at) /* 374570 E00704C0 460010A1 */ cvt.d.s $f2, $f2 /* 374574 E00704C4 46381082 */ mul.d $f2, $f2, $f24 /* 374578 E00704C8 00000000 */ nop /* 37457C E00704CC C606FFE8 */ lwc1 $f6, -0x18($s0) /* 374580 E00704D0 460031A1 */ cvt.d.s $f6, $f6 /* 374584 E00704D4 46383182 */ mul.d $f6, $f6, $f24 /* 374588 E00704D8 00000000 */ nop /* 37458C E00704DC 44820000 */ mtc1 $v0, $f0 /* 374590 E00704E0 00000000 */ nop /* 374594 E00704E4 46800021 */ cvt.d.w $f0, $f0 /* 374598 E00704E8 46340001 */ sub.d $f0, $f0, $f20 /* 37459C E00704EC 46200020 */ cvt.s.d $f0, $f0 /* 3745A0 E00704F0 E600FFEC */ swc1 $f0, -0x14($s0) /* 3745A4 E00704F4 46000021 */ cvt.d.s $f0, $f0 /* 3745A8 E00704F8 46380002 */ mul.d $f0, $f0, $f24 /* 3745AC E00704FC 00000000 */ nop /* 3745B0 E0070500 462010A0 */ cvt.s.d $f2, $f2 /* 3745B4 E0070504 E602FFF8 */ swc1 $f2, -0x8($s0) /* 3745B8 E0070508 46001106 */ mov.s $f4, $f2 /* 3745BC E007050C 46002121 */ cvt.d.s $f4, $f4 /* 3745C0 E0070510 463E2102 */ mul.d $f4, $f4, $f30 /* 3745C4 E0070514 00000000 */ nop /* 3745C8 E0070518 462031A0 */ cvt.s.d $f6, $f6 /* 3745CC E007051C E606FFFC */ swc1 $f6, -0x4($s0) /* 3745D0 E0070520 46003086 */ mov.s $f2, $f6 /* 3745D4 E0070524 460010A1 */ cvt.d.s $f2, $f2 /* 3745D8 E0070528 463E1082 */ mul.d $f2, $f2, $f30 /* 3745DC E007052C 00000000 */ nop /* 3745E0 E0070530 46200020 */ cvt.s.d $f0, $f0 /* 3745E4 E0070534 E6000000 */ swc1 $f0, 0x0($s0) /* 3745E8 E0070538 46000021 */ cvt.d.s $f0, $f0 /* 3745EC E007053C 463E0002 */ mul.d $f0, $f0, $f30 /* 3745F0 E0070540 00000000 */ nop /* 3745F4 E0070544 46202120 */ cvt.s.d $f4, $f4 /* 3745F8 E0070548 462010A0 */ cvt.s.d $f2, $f2 /* 3745FC E007054C E6040004 */ swc1 $f4, 0x4($s0) .LE0070550: /* 374600 E0070550 E6020008 */ swc1 $f2, 0x8($s0) /* 374604 E0070554 46200020 */ cvt.s.d $f0, $f0 /* 374608 E0070558 E600000C */ swc1 $f0, 0xC($s0) /* 37460C E007055C 0C080138 */ jal shim_rand_int /* 374610 E0070560 2404000F */ addiu $a0, $zero, 0xF /* 374614 E0070564 2404000F */ addiu $a0, $zero, 0xF /* 374618 E0070568 44820000 */ mtc1 $v0, $f0 /* 37461C E007056C 00000000 */ nop /* 374620 E0070570 46800020 */ cvt.s.w $f0, $f0 /* 374624 E0070574 0C080138 */ jal shim_rand_int /* 374628 E0070578 E6000044 */ swc1 $f0, 0x44($s0) /* 37462C E007057C 44820000 */ mtc1 $v0, $f0 /* 374630 E0070580 00000000 */ nop /* 374634 E0070584 46800020 */ cvt.s.w $f0, $f0 /* 374638 E0070588 240200FF */ addiu $v0, $zero, 0xFF /* 37463C E007058C E6000048 */ swc1 $f0, 0x48($s0) /* 374640 E0070590 AE000014 */ sw $zero, 0x14($s0) /* 374644 E0070594 AE02002C */ sw $v0, 0x2C($s0) .LE0070598: /* 374648 E0070598 C610FFF8 */ lwc1 $f16, -0x8($s0) /* 37464C E007059C C60A0004 */ lwc1 $f10, 0x4($s0) /* 374650 E00705A0 46105281 */ sub.s $f10, $f10, $f16 /* 374654 E00705A4 460052A1 */ cvt.d.s $f10, $f10 /* 374658 E00705A8 463C5282 */ mul.d $f10, $f10, $f28 /* 37465C E00705AC 00000000 */ nop /* 374660 E00705B0 C60EFFFC */ lwc1 $f14, -0x4($s0) /* 374664 E00705B4 C60C0008 */ lwc1 $f12, 0x8($s0) /* 374668 E00705B8 460E6301 */ sub.s $f12, $f12, $f14 /* 37466C E00705BC 46006321 */ cvt.d.s $f12, $f12 /* 374670 E00705C0 463C6302 */ mul.d $f12, $f12, $f28 /* 374674 E00705C4 00000000 */ nop /* 374678 E00705C8 C6060000 */ lwc1 $f6, 0x0($s0) /* 37467C E00705CC C608000C */ lwc1 $f8, 0xC($s0) /* 374680 E00705D0 46064201 */ sub.s $f8, $f8, $f6 /* 374684 E00705D4 46004221 */ cvt.d.s $f8, $f8 /* 374688 E00705D8 463C4202 */ mul.d $f8, $f8, $f28 /* 37468C E00705DC 00000000 */ nop /* 374690 E00705E0 8E020010 */ lw $v0, 0x10($s0) /* 374694 E00705E4 C6160014 */ lwc1 $f22, 0x14($s0) /* 374698 E00705E8 3C014080 */ lui $at, (0x40800000 >> 16) /* 37469C E00705EC 44810000 */ mtc1 $at, $f0 /* 3746A0 E00705F0 C604FFE4 */ lwc1 $f4, -0x1C($s0) /* 3746A4 E00705F4 C614FFE8 */ lwc1 $f20, -0x18($s0) /* 3746A8 E00705F8 C612FFEC */ lwc1 $f18, -0x14($s0) /* 3746AC E00705FC 4600B580 */ add.s $f22, $f22, $f0 /* 3746B0 E0070600 00021080 */ sll $v0, $v0, 2 /* 3746B4 E0070604 46008006 */ mov.s $f0, $f16 /* 3746B8 E0070608 46002100 */ add.s $f4, $f4, $f0 /* 3746BC E007060C 46007006 */ mov.s $f0, $f14 /* 3746C0 E0070610 46008421 */ cvt.d.s $f16, $f16 /* 3746C4 E0070614 3C01E007 */ lui $at, (0xE0070CF0 >> 16) /* 3746C8 E0070618 00220821 */ addu $at, $at, $v0 /* 3746CC E007061C C4220CF0 */ lwc1 $f2, (0xE0070CF0 & 0xFFFF)($at) /* 3746D0 E0070620 4600A500 */ add.s $f20, $f20, $f0 /* 3746D4 E0070624 E6020040 */ swc1 $f2, 0x40($s0) /* 3746D8 E0070628 46003086 */ mov.s $f2, $f6 /* 3746DC E007062C 46029480 */ add.s $f18, $f18, $f2 /* 3746E0 E0070630 C6020044 */ lwc1 $f2, 0x44($s0) /* 3746E4 E0070634 3C01E007 */ lui $at, (0xE0070D88 >> 16) /* 3746E8 E0070638 D4200D88 */ ldc1 $f0, (0xE0070D88 & 0xFFFF)($at) /* 3746EC E007063C 460010A1 */ cvt.d.s $f2, $f2 /* 3746F0 E0070640 46201080 */ add.d $f2, $f2, $f0 /* 3746F4 E0070644 C6000048 */ lwc1 $f0, 0x48($s0) /* 3746F8 E0070648 460073A1 */ cvt.d.s $f14, $f14 /* 3746FC E007064C E604FFE4 */ swc1 $f4, -0x1C($s0) /* 374700 E0070650 3C01E007 */ lui $at, (0xE0070D90 >> 16) /* 374704 E0070654 D4240D90 */ ldc1 $f4, (0xE0070D90 & 0xFFFF)($at) /* 374708 E0070658 460031A1 */ cvt.d.s $f6, $f6 /* 37470C E007065C E6160014 */ swc1 $f22, 0x14($s0) /* 374710 E0070660 46000021 */ cvt.d.s $f0, $f0 /* 374714 E0070664 46240000 */ add.d $f0, $f0, $f4 /* 374718 E0070668 E614FFE8 */ swc1 $f20, -0x18($s0) /* 37471C E007066C E612FFEC */ swc1 $f18, -0x14($s0) /* 374720 E0070670 462A8400 */ add.d $f16, $f16, $f10 /* 374724 E0070674 462010A0 */ cvt.s.d $f2, $f2 /* 374728 E0070678 E6020044 */ swc1 $f2, 0x44($s0) /* 37472C E007067C 462C7380 */ add.d $f14, $f14, $f12 /* 374730 E0070680 46200020 */ cvt.s.d $f0, $f0 /* 374734 E0070684 E6000048 */ swc1 $f0, 0x48($s0) /* 374738 E0070688 46283180 */ add.d $f6, $f6, $f8 /* 37473C E007068C 46208420 */ cvt.s.d $f16, $f16 /* 374740 E0070690 462073A0 */ cvt.s.d $f14, $f14 /* 374744 E0070694 462031A0 */ cvt.s.d $f6, $f6 /* 374748 E0070698 E610FFF8 */ swc1 $f16, -0x8($s0) /* 37474C E007069C E60EFFFC */ swc1 $f14, -0x4($s0) /* 374750 E00706A0 E6060000 */ swc1 $f6, 0x0($s0) /* 374754 E00706A4 26310001 */ addiu $s1, $s1, 0x1 .LE00706A8: /* 374758 E00706A8 8E420008 */ lw $v0, 0x8($s2) /* 37475C E00706AC 0222102A */ slt $v0, $s1, $v0 /* 374760 E00706B0 1440FF09 */ bnez $v0, .LE00702D8 /* 374764 E00706B4 2610006C */ addiu $s0, $s0, 0x6C .LE00706B8: /* 374768 E00706B8 8FBF0034 */ lw $ra, 0x34($sp) /* 37476C E00706BC 8FB40030 */ lw $s4, 0x30($sp) /* 374770 E00706C0 8FB3002C */ lw $s3, 0x2C($sp) /* 374774 E00706C4 8FB20028 */ lw $s2, 0x28($sp) /* 374778 E00706C8 8FB10024 */ lw $s1, 0x24($sp) /* 37477C E00706CC 8FB00020 */ lw $s0, 0x20($sp) /* 374780 E00706D0 D7BE0060 */ ldc1 $f30, 0x60($sp) /* 374784 E00706D4 D7BC0058 */ ldc1 $f28, 0x58($sp) /* 374788 E00706D8 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 37478C E00706DC D7B80048 */ ldc1 $f24, 0x48($sp) /* 374790 E00706E0 D7B60040 */ ldc1 $f22, 0x40($sp) /* 374794 E00706E4 D7B40038 */ ldc1 $f20, 0x38($sp) /* 374798 E00706E8 03E00008 */ jr $ra /* 37479C E00706EC 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: void shimmer_burst_update(EffectInstance* effect) { ShimmerBurstFXData* part = effect->data.shimmerBurst; s32 unk_00 = part->unk_00; f32 unk_10; f32 unk_14; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->unk_38 = 16; } if (part->unk_38 < 1000) { part->unk_38--; } part->unk_3C++; if (part->unk_38 < 0) { shim_remove_effect(effect); return; } if (part->unk_38 < 8) { part->unk_4C = part->unk_38 * 32; } unk_10 = part->unk_10; unk_14 = part->unk_14; part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_30++; if (part->unk_30 >= ARRAY_COUNT(D_E0070CF0)) { part->unk_30 = 0; } if (part->unk_30 >= 0) { if (part->unk_30 == 0) { f32 rand1 = shim_rand_int(359); f32 rand2 = shim_rand_int(359); if (unk_00 == 0) { part->unk_04 = unk_10 * shim_sin_deg(rand1) * shim_cos_deg(rand2); part->unk_08 = unk_14 * shim_cos_deg(rand1) * shim_cos_deg(rand2); part->unk_0C = unk_10 * shim_sin_deg(rand2); part->unk_18 = part->unk_04 * 0.4; part->unk_1C = part->unk_08 * 0.4; part->unk_20 = part->unk_0C * 0.4; part->unk_24 = part->unk_18 * 0.1; part->unk_28 = part->unk_1C * 0.1; part->unk_2C = part->unk_20 * 0.1; } else { part->unk_04 = shim_rand_int(unk_10) - unk_10 * 0.5; part->unk_08 = shim_rand_int(unk_14) - unk_14 * 0.5; part->unk_0C = shim_rand_int(unk_10) - unk_10 * 0.5; part->unk_18 = part->unk_04 * 0.3; part->unk_1C = part->unk_08 * 0.3; part->unk_20 = part->unk_0C * 0.3; part->unk_24 = part->unk_18 * 0.02; part->unk_28 = part->unk_1C * 0.02; part->unk_2C = part->unk_20 * 0.02; } part->unk_64 = shim_rand_int(15); part->unk_68 = shim_rand_int(15); part->unk_34 = 0.0f; part->unk_4C = 255; } part->unk_60 = D_E0070CF0[part->unk_30]; part->unk_34 += 4.0f; part->unk_04 += part->unk_18; part->unk_08 += part->unk_1C; part->unk_0C += part->unk_20; part->unk_64 += 0.2; part->unk_68 += 0.6; part->unk_18 += (part->unk_24 - part->unk_18) * 0.04; part->unk_1C += (part->unk_28 - part->unk_1C) * 0.04; part->unk_20 += (part->unk_2C - part->unk_20) * 0.04; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_draw_palswap_mode_2 /* 16E60 8003BA60 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 16E64 8003BA64 AFB30024 */ sw $s3, 0x24($sp) /* 16E68 8003BA68 0080982D */ daddu $s3, $a0, $zero /* 16E6C 8003BA6C AFB60030 */ sw $s6, 0x30($sp) /* 16E70 8003BA70 00A0B02D */ daddu $s6, $a1, $zero /* 16E74 8003BA74 AFB40028 */ sw $s4, 0x28($sp) /* 16E78 8003BA78 00C0A02D */ daddu $s4, $a2, $zero /* 16E7C 8003BA7C AFBF0038 */ sw $ra, 0x38($sp) /* 16E80 8003BA80 AFB70034 */ sw $s7, 0x34($sp) /* 16E84 8003BA84 AFB5002C */ sw $s5, 0x2C($sp) /* 16E88 8003BA88 AFB20020 */ sw $s2, 0x20($sp) /* 16E8C 8003BA8C AFB1001C */ sw $s1, 0x1C($sp) /* 16E90 8003BA90 AFB00018 */ sw $s0, 0x18($sp) /* 16E94 8003BA94 826200B6 */ lb $v0, 0xB6($s3) /* 16E98 8003BA98 10400049 */ beqz $v0, .L8003BBC0 /* 16E9C 8003BA9C 00E0B82D */ daddu $s7, $a3, $zero /* 16EA0 8003BAA0 8E620000 */ lw $v0, 0x0($s3) /* 16EA4 8003BAA4 3C034000 */ lui $v1, (0x40000000 >> 16) /* 16EA8 8003BAA8 00431024 */ and $v0, $v0, $v1 /* 16EAC 8003BAAC 14400004 */ bnez $v0, .L8003BAC0 /* 16EB0 8003BAB0 00000000 */ nop /* 16EB4 8003BAB4 0C0B7A90 */ jal spr_get_npc_palettes /* 16EB8 8003BAB8 96640028 */ lhu $a0, 0x28($s3) /* 16EBC 8003BABC AE6200C4 */ sw $v0, 0xC4($s3) .L8003BAC0: /* 16EC0 8003BAC0 8E6400C4 */ lw $a0, 0xC4($s3) /* 16EC4 8003BAC4 A26000C1 */ sb $zero, 0xC1($s3) /* 16EC8 8003BAC8 8C830000 */ lw $v1, 0x0($a0) /* 16ECC 8003BACC 2402FFFF */ addiu $v0, $zero, -0x1 /* 16ED0 8003BAD0 1062000B */ beq $v1, $v0, .L8003BB00 /* 16ED4 8003BAD4 0080182D */ daddu $v1, $a0, $zero /* 16ED8 8003BAD8 0040202D */ daddu $a0, $v0, $zero .L8003BADC: /* 16EDC 8003BADC 926200C1 */ lbu $v0, 0xC1($s3) /* 16EE0 8003BAE0 24420001 */ addiu $v0, $v0, 0x1 /* 16EE4 8003BAE4 A26200C1 */ sb $v0, 0xC1($s3) /* 16EE8 8003BAE8 00021600 */ sll $v0, $v0, 24 /* 16EEC 8003BAEC 00021583 */ sra $v0, $v0, 22 /* 16EF0 8003BAF0 00431021 */ addu $v0, $v0, $v1 /* 16EF4 8003BAF4 8C420000 */ lw $v0, 0x0($v0) /* 16EF8 8003BAF8 1444FFF8 */ bne $v0, $a0, .L8003BADC /* 16EFC 8003BAFC 00000000 */ nop .L8003BB00: /* 16F00 8003BB00 826300B6 */ lb $v1, 0xB6($s3) /* 16F04 8003BB04 24020001 */ addiu $v0, $zero, 0x1 /* 16F08 8003BB08 14620004 */ bne $v1, $v0, .L8003BB1C /* 16F0C 8003BB0C 240200FF */ addiu $v0, $zero, 0xFF /* 16F10 8003BB10 A26000B7 */ sb $zero, 0xB7($s3) /* 16F14 8003BB14 0800EEC9 */ j .L8003BB24 /* 16F18 8003BB18 A66000BE */ sh $zero, 0xBE($s3) .L8003BB1C: /* 16F1C 8003BB1C A26000B7 */ sb $zero, 0xB7($s3) /* 16F20 8003BB20 A66200BE */ sh $v0, 0xBE($s3) .L8003BB24: /* 16F24 8003BB24 826200C1 */ lb $v0, 0xC1($s3) /* 16F28 8003BB28 18400018 */ blez $v0, .L8003BB8C /* 16F2C 8003BB2C 0000202D */ daddu $a0, $zero, $zero /* 16F30 8003BB30 0260302D */ daddu $a2, $s3, $zero /* 16F34 8003BB34 240500C8 */ addiu $a1, $zero, 0xC8 .L8003BB38: /* 16F38 8003BB38 8E6300C4 */ lw $v1, 0xC4($s3) /* 16F3C 8003BB3C 00041080 */ sll $v0, $a0, 2 /* 16F40 8003BB40 00431021 */ addu $v0, $v0, $v1 /* 16F44 8003BB44 8C520000 */ lw $s2, 0x0($v0) /* 16F48 8003BB48 02658821 */ addu $s1, $s3, $a1 /* 16F4C 8003BB4C 12400009 */ beqz $s2, .L8003BB74 /* 16F50 8003BB50 ACD102C8 */ sw $s1, 0x2C8($a2) /* 16F54 8003BB54 0000802D */ daddu $s0, $zero, $zero .L8003BB58: /* 16F58 8003BB58 96420000 */ lhu $v0, 0x0($s2) /* 16F5C 8003BB5C 26520002 */ addiu $s2, $s2, 0x2 /* 16F60 8003BB60 26100001 */ addiu $s0, $s0, 0x1 /* 16F64 8003BB64 A6220000 */ sh $v0, 0x0($s1) /* 16F68 8003BB68 2A020010 */ slti $v0, $s0, 0x10 /* 16F6C 8003BB6C 1440FFFA */ bnez $v0, .L8003BB58 /* 16F70 8003BB70 26310002 */ addiu $s1, $s1, 0x2 .L8003BB74: /* 16F74 8003BB74 24C60004 */ addiu $a2, $a2, 0x4 /* 16F78 8003BB78 826200C1 */ lb $v0, 0xC1($s3) /* 16F7C 8003BB7C 24840001 */ addiu $a0, $a0, 0x1 /* 16F80 8003BB80 0082102A */ slt $v0, $a0, $v0 /* 16F84 8003BB84 1440FFEC */ bnez $v0, .L8003BB38 /* 16F88 8003BB88 24A50020 */ addiu $a1, $a1, 0x20 .L8003BB8C: /* 16F8C 8003BB8C 16800007 */ bnez $s4, .L8003BBAC /* 16F90 8003BB90 00000000 */ nop /* 16F94 8003BB94 9662030C */ lhu $v0, 0x30C($s3) /* 16F98 8003BB98 A660030C */ sh $zero, 0x30C($s3) /* 16F9C 8003BB9C A662030E */ sh $v0, 0x30E($s3) /* 16FA0 8003BBA0 0040182D */ daddu $v1, $v0, $zero /* 16FA4 8003BBA4 A6620310 */ sh $v0, 0x310($s3) /* 16FA8 8003BBA8 A6630312 */ sh $v1, 0x312($s3) .L8003BBAC: /* 16FAC 8003BBAC 9662030C */ lhu $v0, 0x30C($s3) /* 16FB0 8003BBB0 A66000BE */ sh $zero, 0xBE($s3) /* 16FB4 8003BBB4 A26000B7 */ sb $zero, 0xB7($s3) /* 16FB8 8003BBB8 A26000B6 */ sb $zero, 0xB6($s3) /* 16FBC 8003BBBC A66200BC */ sh $v0, 0xBC($s3) .L8003BBC0: /* 16FC0 8003BBC0 826300B7 */ lb $v1, 0xB7($s3) /* 16FC4 8003BBC4 10600005 */ beqz $v1, .L8003BBDC /* 16FC8 8003BBC8 24020001 */ addiu $v0, $zero, 0x1 /* 16FCC 8003BBCC 1062000C */ beq $v1, $v0, .L8003BC00 /* 16FD0 8003BBD0 24020002 */ addiu $v0, $zero, 0x2 /* 16FD4 8003BBD4 0800EF40 */ j .L8003BD00 /* 16FD8 8003BBD8 00000000 */ nop .L8003BBDC: /* 16FDC 8003BBDC 866200BC */ lh $v0, 0xBC($s3) /* 16FE0 8003BBE0 966300BC */ lhu $v1, 0xBC($s3) /* 16FE4 8003BBE4 10400003 */ beqz $v0, .L8003BBF4 /* 16FE8 8003BBE8 2462FFFF */ addiu $v0, $v1, -0x1 /* 16FEC 8003BBEC 0800EF3E */ j .L8003BCF8 /* 16FF0 8003BBF0 A66200BC */ sh $v0, 0xBC($s3) .L8003BBF4: /* 16FF4 8003BBF4 24020001 */ addiu $v0, $zero, 0x1 /* 16FF8 8003BBF8 A66000BE */ sh $zero, 0xBE($s3) /* 16FFC 8003BBFC A26200B7 */ sb $v0, 0xB7($s3) .L8003BC00: /* 17000 8003BC00 8662030E */ lh $v0, 0x30E($s3) /* 17004 8003BC04 24036400 */ addiu $v1, $zero, 0x6400 /* 17008 8003BC08 14400002 */ bnez $v0, .L8003BC14 /* 1700C 8003BC0C 0062001A */ div $zero, $v1, $v0 /* 17010 8003BC10 0007000D */ break 7 .L8003BC14: /* 17014 8003BC14 2401FFFF */ addiu $at, $zero, -0x1 /* 17018 8003BC18 14410004 */ bne $v0, $at, .L8003BC2C /* 1701C 8003BC1C 3C018000 */ lui $at, (0x80000000 >> 16) /* 17020 8003BC20 14610002 */ bne $v1, $at, .L8003BC2C /* 17024 8003BC24 00000000 */ nop /* 17028 8003BC28 0006000D */ break 6 .L8003BC2C: /* 1702C 8003BC2C 00001812 */ mflo $v1 /* 17030 8003BC30 966200BE */ lhu $v0, 0xBE($s3) /* 17034 8003BC34 00431021 */ addu $v0, $v0, $v1 /* 17038 8003BC38 A66200BE */ sh $v0, 0xBE($s3) /* 1703C 8003BC3C 00021400 */ sll $v0, $v0, 16 /* 17040 8003BC40 00021403 */ sra $v0, $v0, 16 /* 17044 8003BC44 2842639D */ slti $v0, $v0, 0x639D /* 17048 8003BC48 14400003 */ bnez $v0, .L8003BC58 /* 1704C 8003BC4C 3C0651EB */ lui $a2, (0x51EB851F >> 16) /* 17050 8003BC50 2402639C */ addiu $v0, $zero, 0x639C /* 17054 8003BC54 A66200BE */ sh $v0, 0xBE($s3) .L8003BC58: /* 17058 8003BC58 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) /* 1705C 8003BC5C 267400C8 */ addiu $s4, $s3, 0xC8 /* 17060 8003BC60 0000802D */ daddu $s0, $zero, $zero /* 17064 8003BC64 86620308 */ lh $v0, 0x308($s3) /* 17068 8003BC68 8E6500C4 */ lw $a1, 0xC4($s3) /* 1706C 8003BC6C 966300BE */ lhu $v1, 0xBE($s3) /* 17070 8003BC70 00021080 */ sll $v0, $v0, 2 /* 17074 8003BC74 00451021 */ addu $v0, $v0, $a1 /* 17078 8003BC78 00031C00 */ sll $v1, $v1, 16 /* 1707C 8003BC7C 00032403 */ sra $a0, $v1, 16 /* 17080 8003BC80 8C520000 */ lw $s2, 0x0($v0) /* 17084 8003BC84 8662030A */ lh $v0, 0x30A($s3) /* 17088 8003BC88 00860018 */ mult $a0, $a2 /* 1708C 8003BC8C 00021080 */ sll $v0, $v0, 2 /* 17090 8003BC90 00451021 */ addu $v0, $v0, $a1 /* 17094 8003BC94 8C510000 */ lw $s1, 0x0($v0) /* 17098 8003BC98 00031FC3 */ sra $v1, $v1, 31 /* 1709C 8003BC9C AE7402C8 */ sw $s4, 0x2C8($s3) /* 170A0 8003BCA0 00004010 */ mfhi $t0 /* 170A4 8003BCA4 00081143 */ sra $v0, $t0, 5 /* 170A8 8003BCA8 00431023 */ subu $v0, $v0, $v1 /* 170AC 8003BCAC 00021400 */ sll $v0, $v0, 16 /* 170B0 8003BCB0 0002AC03 */ sra $s5, $v0, 16 .L8003BCB4: /* 170B4 8003BCB4 96440000 */ lhu $a0, 0x0($s2) /* 170B8 8003BCB8 26520002 */ addiu $s2, $s2, 0x2 /* 170BC 8003BCBC 96250000 */ lhu $a1, 0x0($s1) /* 170C0 8003BCC0 26310002 */ addiu $s1, $s1, 0x2 /* 170C4 8003BCC4 02A0302D */ daddu $a2, $s5, $zero /* 170C8 8003BCC8 0C00EE5B */ jal npc_blend_palette_colors /* 170CC 8003BCCC 26100001 */ addiu $s0, $s0, 0x1 /* 170D0 8003BCD0 A6820000 */ sh $v0, 0x0($s4) /* 170D4 8003BCD4 2A020010 */ slti $v0, $s0, 0x10 /* 170D8 8003BCD8 1440FFF6 */ bnez $v0, .L8003BCB4 /* 170DC 8003BCDC 26940002 */ addiu $s4, $s4, 0x2 /* 170E0 8003BCE0 240200FF */ addiu $v0, $zero, 0xFF /* 170E4 8003BCE4 16A20004 */ bne $s5, $v0, .L8003BCF8 /* 170E8 8003BCE8 24020002 */ addiu $v0, $zero, 0x2 /* 170EC 8003BCEC 96630310 */ lhu $v1, 0x310($s3) /* 170F0 8003BCF0 A26200B7 */ sb $v0, 0xB7($s3) /* 170F4 8003BCF4 A66300BC */ sh $v1, 0xBC($s3) .L8003BCF8: /* 170F8 8003BCF8 826300B7 */ lb $v1, 0xB7($s3) /* 170FC 8003BCFC 24020002 */ addiu $v0, $zero, 0x2 .L8003BD00: /* 17100 8003BD00 10620005 */ beq $v1, $v0, .L8003BD18 /* 17104 8003BD04 24020003 */ addiu $v0, $zero, 0x3 /* 17108 8003BD08 1062000A */ beq $v1, $v0, .L8003BD34 /* 1710C 8003BD0C 00000000 */ nop /* 17110 8003BD10 0800EF8B */ j .L8003BE2C /* 17114 8003BD14 00000000 */ nop .L8003BD18: /* 17118 8003BD18 866200BC */ lh $v0, 0xBC($s3) /* 1711C 8003BD1C 966300BC */ lhu $v1, 0xBC($s3) /* 17120 8003BD20 14400041 */ bnez $v0, .L8003BE28 /* 17124 8003BD24 2462FFFF */ addiu $v0, $v1, -0x1 /* 17128 8003BD28 24020003 */ addiu $v0, $zero, 0x3 /* 1712C 8003BD2C A66000BE */ sh $zero, 0xBE($s3) /* 17130 8003BD30 A26200B7 */ sb $v0, 0xB7($s3) .L8003BD34: /* 17134 8003BD34 86620312 */ lh $v0, 0x312($s3) /* 17138 8003BD38 24036400 */ addiu $v1, $zero, 0x6400 /* 1713C 8003BD3C 14400002 */ bnez $v0, .L8003BD48 /* 17140 8003BD40 0062001A */ div $zero, $v1, $v0 /* 17144 8003BD44 0007000D */ break 7 .L8003BD48: /* 17148 8003BD48 2401FFFF */ addiu $at, $zero, -0x1 /* 1714C 8003BD4C 14410004 */ bne $v0, $at, .L8003BD60 /* 17150 8003BD50 3C018000 */ lui $at, (0x80000000 >> 16) /* 17154 8003BD54 14610002 */ bne $v1, $at, .L8003BD60 /* 17158 8003BD58 00000000 */ nop /* 1715C 8003BD5C 0006000D */ break 6 .L8003BD60: /* 17160 8003BD60 00001812 */ mflo $v1 /* 17164 8003BD64 966200BE */ lhu $v0, 0xBE($s3) /* 17168 8003BD68 00431021 */ addu $v0, $v0, $v1 /* 1716C 8003BD6C A66200BE */ sh $v0, 0xBE($s3) /* 17170 8003BD70 00021400 */ sll $v0, $v0, 16 /* 17174 8003BD74 00021403 */ sra $v0, $v0, 16 /* 17178 8003BD78 2842639D */ slti $v0, $v0, 0x639D /* 1717C 8003BD7C 14400003 */ bnez $v0, .L8003BD8C /* 17180 8003BD80 3C0651EB */ lui $a2, (0x51EB851F >> 16) /* 17184 8003BD84 2402639C */ addiu $v0, $zero, 0x639C /* 17188 8003BD88 A66200BE */ sh $v0, 0xBE($s3) .L8003BD8C: /* 1718C 8003BD8C 34C6851F */ ori $a2, $a2, (0x51EB851F & 0xFFFF) /* 17190 8003BD90 267400C8 */ addiu $s4, $s3, 0xC8 /* 17194 8003BD94 0000802D */ daddu $s0, $zero, $zero /* 17198 8003BD98 8662030A */ lh $v0, 0x30A($s3) /* 1719C 8003BD9C 8E6500C4 */ lw $a1, 0xC4($s3) /* 171A0 8003BDA0 966300BE */ lhu $v1, 0xBE($s3) /* 171A4 8003BDA4 00021080 */ sll $v0, $v0, 2 /* 171A8 8003BDA8 00451021 */ addu $v0, $v0, $a1 /* 171AC 8003BDAC 00031C00 */ sll $v1, $v1, 16 /* 171B0 8003BDB0 00032403 */ sra $a0, $v1, 16 /* 171B4 8003BDB4 8C520000 */ lw $s2, 0x0($v0) /* 171B8 8003BDB8 86620308 */ lh $v0, 0x308($s3) /* 171BC 8003BDBC 00860018 */ mult $a0, $a2 /* 171C0 8003BDC0 00021080 */ sll $v0, $v0, 2 /* 171C4 8003BDC4 00451021 */ addu $v0, $v0, $a1 /* 171C8 8003BDC8 8C510000 */ lw $s1, 0x0($v0) /* 171CC 8003BDCC 00031FC3 */ sra $v1, $v1, 31 /* 171D0 8003BDD0 AE7402C8 */ sw $s4, 0x2C8($s3) /* 171D4 8003BDD4 00004010 */ mfhi $t0 /* 171D8 8003BDD8 00081143 */ sra $v0, $t0, 5 /* 171DC 8003BDDC 00431023 */ subu $v0, $v0, $v1 /* 171E0 8003BDE0 00021400 */ sll $v0, $v0, 16 /* 171E4 8003BDE4 0002AC03 */ sra $s5, $v0, 16 .L8003BDE8: /* 171E8 8003BDE8 96440000 */ lhu $a0, 0x0($s2) /* 171EC 8003BDEC 26520002 */ addiu $s2, $s2, 0x2 /* 171F0 8003BDF0 96250000 */ lhu $a1, 0x0($s1) /* 171F4 8003BDF4 26310002 */ addiu $s1, $s1, 0x2 /* 171F8 8003BDF8 02A0302D */ daddu $a2, $s5, $zero /* 171FC 8003BDFC 0C00EE5B */ jal npc_blend_palette_colors /* 17200 8003BE00 26100001 */ addiu $s0, $s0, 0x1 /* 17204 8003BE04 A6820000 */ sh $v0, 0x0($s4) /* 17208 8003BE08 2A020010 */ slti $v0, $s0, 0x10 /* 1720C 8003BE0C 1440FFF6 */ bnez $v0, .L8003BDE8 /* 17210 8003BE10 26940002 */ addiu $s4, $s4, 0x2 /* 17214 8003BE14 240200FF */ addiu $v0, $zero, 0xFF /* 17218 8003BE18 16A20004 */ bne $s5, $v0, .L8003BE2C /* 1721C 8003BE1C 00000000 */ nop /* 17220 8003BE20 9662030C */ lhu $v0, 0x30C($s3) /* 17224 8003BE24 A26000B7 */ sb $zero, 0xB7($s3) .L8003BE28: /* 17228 8003BE28 A66200BC */ sh $v0, 0xBC($s3) .L8003BE2C: /* 1722C 8003BE2C 826300B7 */ lb $v1, 0xB7($s3) /* 17230 8003BE30 28620004 */ slti $v0, $v1, 0x4 /* 17234 8003BE34 1040001D */ beqz $v0, .L8003BEAC /* 17238 8003BE38 00000000 */ nop /* 1723C 8003BE3C 0460001B */ bltz $v1, .L8003BEAC /* 17240 8003BE40 3C034000 */ lui $v1, (0x40000000 >> 16) /* 17244 8003BE44 8E620000 */ lw $v0, 0x0($s3) /* 17248 8003BE48 00431024 */ and $v0, $v0, $v1 /* 1724C 8003BE4C 14400017 */ bnez $v0, .L8003BEAC /* 17250 8003BE50 02C0282D */ daddu $a1, $s6, $zero /* 17254 8003BE54 926300AC */ lbu $v1, 0xAC($s3) /* 17258 8003BE58 926200AD */ lbu $v0, 0xAD($s3) /* 1725C 8003BE5C 00620018 */ mult $v1, $v0 /* 17260 8003BE60 00001812 */ mflo $v1 /* 17264 8003BE64 3C028080 */ lui $v0, (0x80808081 >> 16) /* 17268 8003BE68 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF) /* 1726C 8003BE6C 00620018 */ mult $v1, $v0 /* 17270 8003BE70 8E660024 */ lw $a2, 0x24($s3) /* 17274 8003BE74 266702C8 */ addiu $a3, $s3, 0x2C8 /* 17278 8003BE78 AFB70010 */ sw $s7, 0x10($sp) /* 1727C 8003BE7C 00004810 */ mfhi $t1 /* 17280 8003BE80 01231021 */ addu $v0, $t1, $v1 /* 17284 8003BE84 000211C3 */ sra $v0, $v0, 7 /* 17288 8003BE88 00031FC3 */ sra $v1, $v1, 31 /* 1728C 8003BE8C 0043A823 */ subu $s5, $v0, $v1 /* 17290 8003BE90 2AA400FF */ slti $a0, $s5, 0xFF /* 17294 8003BE94 000427C0 */ sll $a0, $a0, 31 /* 17298 8003BE98 3C022000 */ lui $v0, (0x20000000 >> 16) /* 1729C 8003BE9C 00822025 */ or $a0, $a0, $v0 /* 172A0 8003BEA0 00C42025 */ or $a0, $a2, $a0 /* 172A4 8003BEA4 0C0B78F6 */ jal spr_draw_npc_sprite /* 172A8 8003BEA8 02A0302D */ daddu $a2, $s5, $zero .L8003BEAC: /* 172AC 8003BEAC 8FBF0038 */ lw $ra, 0x38($sp) /* 172B0 8003BEB0 8FB70034 */ lw $s7, 0x34($sp) /* 172B4 8003BEB4 8FB60030 */ lw $s6, 0x30($sp) /* 172B8 8003BEB8 8FB5002C */ lw $s5, 0x2C($sp) /* 172BC 8003BEBC 8FB40028 */ lw $s4, 0x28($sp) /* 172C0 8003BEC0 8FB30024 */ lw $s3, 0x24($sp) /* 172C4 8003BEC4 8FB20020 */ lw $s2, 0x20($sp) /* 172C8 8003BEC8 8FB1001C */ lw $s1, 0x1C($sp) /* 172CC 8003BECC 8FB00018 */ lw $s0, 0x18($sp) /* 172D0 8003BED0 03E00008 */ jr $ra /* 172D4 8003BED4 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: s32 npc_draw_palswap_mode_2(Npc* npc, s32 arg1, s32 arg2, Matrix4f mtx) { s32 i, j; PAL_PTR src; PAL_PTR dst; PAL_PTR src2; s32 blendAlpha; if (npc->dirtyPalettes != 0) { if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { npc->spritePaletteList = spr_get_npc_palettes(npc->currentAnim >> 16); } npc->paletteCount = 0; while ((s32)npc->spritePaletteList[npc->paletteCount] != -1) { npc->paletteCount++; } if (npc->dirtyPalettes == 1) { npc->palSwapState = 0; npc->palSwapLerpAlpha = 0; } else { npc->palSwapState = 0; npc->palSwapLerpAlpha = 255; } for (i = 0; i < npc->paletteCount; i++) { src2 = npc->localPaletteData[i]; src = npc->spritePaletteList[i]; npc->localPalettes[i] = src2; if (src != NULL) { for (j = 0; j < 16; j++) { *src2++ = *src++; } } } if (arg2 == 0) { s32 temp2 = npc->unk_30C; npc->unk_30C = 0; npc->unk_30E = temp2; npc->unk_310 = temp2; npc->unk_312 = npc->unk_30E; } npc->palSwapLerpAlpha = 0; npc->palSwapState = 0; npc->dirtyPalettes = 0; npc->palSwapTimer = npc->unk_30C; } switch (npc->palSwapState) { case 0: if (npc->palSwapTimer != 0) { npc->palSwapTimer--; break; } else { npc->palSwapLerpAlpha = 0; npc->palSwapState = 1; } // fallthrough case 1: npc->palSwapLerpAlpha += 25600 / npc->unk_30E; if (npc->palSwapLerpAlpha > 25500) { npc->palSwapLerpAlpha = 25500; } blendAlpha = npc->palSwapLerpAlpha / 100; dst = npc->localPaletteData[0]; src = npc->spritePaletteList[npc->unk_308]; src2 = npc->spritePaletteList[npc->unk_30A]; npc->localPalettes[0] = dst; for (j = 0; j < 16; j++) { *dst++ = npc_blend_palette_colors(*src++, *src2++, blendAlpha); } if (blendAlpha == 255) { npc->palSwapState = 2; npc->palSwapTimer = npc->unk_310; } break; } switch (npc->palSwapState) { case 2: if (npc->palSwapTimer != 0) { npc->palSwapTimer--; break; } else { npc->palSwapLerpAlpha = 0; npc->palSwapState = 3; } // fallthrough case 3: npc->palSwapLerpAlpha += 25600 / npc->unk_312; if (npc->palSwapLerpAlpha > 25500) { npc->palSwapLerpAlpha = 25500; } blendAlpha = npc->palSwapLerpAlpha / 100; dst = npc->localPaletteData[0]; src = npc->spritePaletteList[npc->unk_30A]; src2 = npc->spritePaletteList[npc->unk_308]; npc->localPalettes[0] = dst; for (j = 0; j < 16; j++) { *dst++ = npc_blend_palette_colors(*src++, *src2++, blendAlpha); } if (blendAlpha == 255) { npc->palSwapState = 0; npc->palSwapTimer = npc->unk_30C; } break; } if (npc->palSwapState < 4) { if (npc->palSwapState >= 0) { if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { u32 mask; blendAlpha = npc->alpha * npc->alpha2 / 255; if (blendAlpha < 255) { mask = DRAW_SPRITE_OVERRIDE_ALPHA; } else { mask = 0; } mask |= DRAW_SPRITE_OVERRIDE_PALETTES; spr_draw_npc_sprite(npc->spriteInstanceID | mask, arg1, blendAlpha, npc->localPalettes, mtx); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_base_switch_animate_scale /* 10375C 802E1EDC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 103760 802E1EE0 AFB1001C */ sw $s1, 0x1C($sp) /* 103764 802E1EE4 0080882D */ daddu $s1, $a0, $zero /* 103768 802E1EE8 AFBF0024 */ sw $ra, 0x24($sp) /* 10376C 802E1EEC AFB20020 */ sw $s2, 0x20($sp) /* 103770 802E1EF0 AFB00018 */ sw $s0, 0x18($sp) /* 103774 802E1EF4 8E300040 */ lw $s0, 0x40($s1) /* 103778 802E1EF8 82030010 */ lb $v1, 0x10($s0) /* 10377C 802E1EFC 2C620005 */ sltiu $v0, $v1, 0x5 /* 103780 802E1F00 10400087 */ beqz $v0, .L802E2120 /* 103784 802E1F04 0000902D */ daddu $s2, $zero, $zero /* 103788 802E1F08 00031080 */ sll $v0, $v1, 2 /* 10378C 802E1F0C 3C01802F */ lui $at, %hi(jtbl_802EB0C0) /* 103790 802E1F10 00220821 */ addu $at, $at, $v0 /* 103794 802E1F14 8C22B0C0 */ lw $v0, %lo(jtbl_802EB0C0)($at) /* 103798 802E1F18 00400008 */ jr $v0 /* 10379C 802E1F1C 00000000 */ nop glabel .L802E1F20 /* 1037A0 802E1F20 C602001C */ lwc1 $f2, 0x1C($s0) /* 1037A4 802E1F24 3C01802F */ lui $at, %hi(D_802EB0D8) /* 1037A8 802E1F28 D420B0D8 */ ldc1 $f0, %lo(D_802EB0D8)($at) /* 1037AC 802E1F2C 460010A1 */ cvt.d.s $f2, $f2 /* 1037B0 802E1F30 46201082 */ mul.d $f2, $f2, $f0 /* 1037B4 802E1F34 00000000 */ nop /* 1037B8 802E1F38 C6000014 */ lwc1 $f0, 0x14($s0) /* 1037BC 802E1F3C 462011A0 */ cvt.s.d $f6, $f2 /* 1037C0 802E1F40 46060000 */ add.s $f0, $f0, $f6 /* 1037C4 802E1F44 C6220054 */ lwc1 $f2, 0x54($s1) /* 1037C8 802E1F48 46020001 */ sub.s $f0, $f0, $f2 /* 1037CC 802E1F4C 3C013FD0 */ lui $at, (0x3FD00000 >> 16) /* 1037D0 802E1F50 44811800 */ mtc1 $at, $f3 /* 1037D4 802E1F54 44801000 */ mtc1 $zero, $f2 /* 1037D8 802E1F58 46000021 */ cvt.d.s $f0, $f0 /* 1037DC 802E1F5C 46220002 */ mul.d $f0, $f0, $f2 /* 1037E0 802E1F60 00000000 */ nop /* 1037E4 802E1F64 3C01802F */ lui $at, %hi(D_802EB0E0) /* 1037E8 802E1F68 D422B0E0 */ ldc1 $f2, %lo(D_802EB0E0)($at) /* 1037EC 802E1F6C 46200120 */ cvt.s.d $f4, $f0 /* 1037F0 802E1F70 46002021 */ cvt.d.s $f0, $f4 /* 1037F4 802E1F74 4622003C */ c.lt.d $f0, $f2 /* 1037F8 802E1F78 00000000 */ nop /* 1037FC 802E1F7C 45000004 */ bc1f .L802E1F90 /* 103800 802E1F80 00000000 */ nop /* 103804 802E1F84 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 103808 802E1F88 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 10380C 802E1F8C 44812000 */ mtc1 $at, $f4 .L802E1F90: /* 103810 802E1F90 C6000004 */ lwc1 $f0, 0x4($s0) /* 103814 802E1F94 46040000 */ add.s $f0, $f0, $f4 /* 103818 802E1F98 E6000004 */ swc1 $f0, 0x4($s0) /* 10381C 802E1F9C C6220054 */ lwc1 $f2, 0x54($s1) /* 103820 802E1FA0 46001080 */ add.s $f2, $f2, $f0 /* 103824 802E1FA4 E6220054 */ swc1 $f2, 0x54($s1) /* 103828 802E1FA8 C6000014 */ lwc1 $f0, 0x14($s0) /* 10382C 802E1FAC 46060000 */ add.s $f0, $f0, $f6 /* 103830 802E1FB0 4602003E */ c.le.s $f0, $f2 /* 103834 802E1FB4 080B8840 */ j .L802E2100 /* 103838 802E1FB8 00000000 */ nop glabel .L802E1FBC /* 10383C 802E1FBC C602001C */ lwc1 $f2, 0x1C($s0) /* 103840 802E1FC0 3C01802F */ lui $at, %hi(D_802EB0E8) /* 103844 802E1FC4 D420B0E8 */ ldc1 $f0, %lo(D_802EB0E8)($at) /* 103848 802E1FC8 080B881F */ j .L802E207C /* 10384C 802E1FCC 460010A1 */ cvt.d.s $f2, $f2 glabel .L802E1FD0 /* 103850 802E1FD0 C602001C */ lwc1 $f2, 0x1C($s0) /* 103854 802E1FD4 3C01802F */ lui $at, %hi(D_802EB0F0) /* 103858 802E1FD8 D420B0F0 */ ldc1 $f0, %lo(D_802EB0F0)($at) /* 10385C 802E1FDC 460010A1 */ cvt.d.s $f2, $f2 /* 103860 802E1FE0 46201082 */ mul.d $f2, $f2, $f0 /* 103864 802E1FE4 00000000 */ nop /* 103868 802E1FE8 C6000014 */ lwc1 $f0, 0x14($s0) /* 10386C 802E1FEC 462011A0 */ cvt.s.d $f6, $f2 /* 103870 802E1FF0 46060000 */ add.s $f0, $f0, $f6 /* 103874 802E1FF4 C6220054 */ lwc1 $f2, 0x54($s1) /* 103878 802E1FF8 46020001 */ sub.s $f0, $f0, $f2 /* 10387C 802E1FFC 3C013FD0 */ lui $at, (0x3FD00000 >> 16) /* 103880 802E2000 44811800 */ mtc1 $at, $f3 /* 103884 802E2004 44801000 */ mtc1 $zero, $f2 /* 103888 802E2008 46000021 */ cvt.d.s $f0, $f0 /* 10388C 802E200C 46220002 */ mul.d $f0, $f0, $f2 /* 103890 802E2010 00000000 */ nop /* 103894 802E2014 3C01802F */ lui $at, %hi(D_802EB0F8) /* 103898 802E2018 D422B0F8 */ ldc1 $f2, %lo(D_802EB0F8)($at) /* 10389C 802E201C 46200120 */ cvt.s.d $f4, $f0 /* 1038A0 802E2020 46002021 */ cvt.d.s $f0, $f4 /* 1038A4 802E2024 4622003C */ c.lt.d $f0, $f2 /* 1038A8 802E2028 00000000 */ nop /* 1038AC 802E202C 45000004 */ bc1f .L802E2040 /* 1038B0 802E2030 00000000 */ nop /* 1038B4 802E2034 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 1038B8 802E2038 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 1038BC 802E203C 44812000 */ mtc1 $at, $f4 .L802E2040: /* 1038C0 802E2040 C6000004 */ lwc1 $f0, 0x4($s0) /* 1038C4 802E2044 46040000 */ add.s $f0, $f0, $f4 /* 1038C8 802E2048 E6000004 */ swc1 $f0, 0x4($s0) /* 1038CC 802E204C C6220054 */ lwc1 $f2, 0x54($s1) /* 1038D0 802E2050 46001080 */ add.s $f2, $f2, $f0 /* 1038D4 802E2054 E6220054 */ swc1 $f2, 0x54($s1) /* 1038D8 802E2058 C6000014 */ lwc1 $f0, 0x14($s0) /* 1038DC 802E205C 46060000 */ add.s $f0, $f0, $f6 /* 1038E0 802E2060 4602003E */ c.le.s $f0, $f2 /* 1038E4 802E2064 080B8840 */ j .L802E2100 /* 1038E8 802E2068 00000000 */ nop glabel .L802E206C /* 1038EC 802E206C C602001C */ lwc1 $f2, 0x1C($s0) /* 1038F0 802E2070 3C01802F */ lui $at, %hi(D_802EB100) /* 1038F4 802E2074 D420B100 */ ldc1 $f0, %lo(D_802EB100)($at) /* 1038F8 802E2078 460010A1 */ cvt.d.s $f2, $f2 .L802E207C: /* 1038FC 802E207C 46201082 */ mul.d $f2, $f2, $f0 /* 103900 802E2080 00000000 */ nop /* 103904 802E2084 C6000014 */ lwc1 $f0, 0x14($s0) /* 103908 802E2088 462011A0 */ cvt.s.d $f6, $f2 /* 10390C 802E208C 46060000 */ add.s $f0, $f0, $f6 /* 103910 802E2090 C6220054 */ lwc1 $f2, 0x54($s1) /* 103914 802E2094 46020001 */ sub.s $f0, $f0, $f2 /* 103918 802E2098 3C014018 */ lui $at, (0x40180000 >> 16) /* 10391C 802E209C 44811800 */ mtc1 $at, $f3 /* 103920 802E20A0 44801000 */ mtc1 $zero, $f2 /* 103924 802E20A4 46000021 */ cvt.d.s $f0, $f0 /* 103928 802E20A8 46220003 */ div.d $f0, $f0, $f2 /* 10392C 802E20AC 46200120 */ cvt.s.d $f4, $f0 /* 103930 802E20B0 3C01802F */ lui $at, %hi(D_802EB108) /* 103934 802E20B4 D422B108 */ ldc1 $f2, %lo(D_802EB108)($at) /* 103938 802E20B8 46002021 */ cvt.d.s $f0, $f4 /* 10393C 802E20BC 4620103C */ c.lt.d $f2, $f0 /* 103940 802E20C0 00000000 */ nop /* 103944 802E20C4 45000004 */ bc1f .L802E20D8 /* 103948 802E20C8 00000000 */ nop /* 10394C 802E20CC 3C01BC23 */ lui $at, (0xBC23D70A >> 16) /* 103950 802E20D0 3421D70A */ ori $at, $at, (0xBC23D70A & 0xFFFF) /* 103954 802E20D4 44812000 */ mtc1 $at, $f4 .L802E20D8: /* 103958 802E20D8 C6000004 */ lwc1 $f0, 0x4($s0) /* 10395C 802E20DC 46040000 */ add.s $f0, $f0, $f4 /* 103960 802E20E0 E6000004 */ swc1 $f0, 0x4($s0) /* 103964 802E20E4 C6220054 */ lwc1 $f2, 0x54($s1) /* 103968 802E20E8 46001080 */ add.s $f2, $f2, $f0 /* 10396C 802E20EC E6220054 */ swc1 $f2, 0x54($s1) /* 103970 802E20F0 C6000014 */ lwc1 $f0, 0x14($s0) /* 103974 802E20F4 46060000 */ add.s $f0, $f0, $f6 /* 103978 802E20F8 4600103E */ c.le.s $f2, $f0 /* 10397C 802E20FC 00000000 */ nop .L802E2100: /* 103980 802E2100 45000007 */ bc1f .L802E2120 /* 103984 802E2104 00000000 */ nop /* 103988 802E2108 92020010 */ lbu $v0, 0x10($s0) /* 10398C 802E210C AE000004 */ sw $zero, 0x4($s0) /* 103990 802E2110 24420001 */ addiu $v0, $v0, 0x1 /* 103994 802E2114 080B8848 */ j .L802E2120 /* 103998 802E2118 A2020010 */ sb $v0, 0x10($s0) glabel .L802E211C /* 10399C 802E211C 26520001 */ addiu $s2, $s2, 0x1 .L802E2120: /* 1039A0 802E2120 C6200054 */ lwc1 $f0, 0x54($s1) /* 1039A4 802E2124 E620005C */ swc1 $f0, 0x5C($s1) /* 1039A8 802E2128 82030011 */ lb $v1, 0x11($s0) /* 1039AC 802E212C 24020001 */ addiu $v0, $zero, 0x1 /* 1039B0 802E2130 10620013 */ beq $v1, $v0, .L802E2180 /* 1039B4 802E2134 28620002 */ slti $v0, $v1, 0x2 /* 1039B8 802E2138 10400005 */ beqz $v0, .L802E2150 /* 1039BC 802E213C 24020002 */ addiu $v0, $zero, 0x2 /* 1039C0 802E2140 10600009 */ beqz $v1, .L802E2168 /* 1039C4 802E2144 00000000 */ nop /* 1039C8 802E2148 080B88B1 */ j .L802E22C4 /* 1039CC 802E214C 00000000 */ nop .L802E2150: /* 1039D0 802E2150 10620031 */ beq $v1, $v0, .L802E2218 /* 1039D4 802E2154 24020003 */ addiu $v0, $zero, 0x3 /* 1039D8 802E2158 5062005A */ beql $v1, $v0, .L802E22C4 /* 1039DC 802E215C 26520001 */ addiu $s2, $s2, 0x1 /* 1039E0 802E2160 080B88B1 */ j .L802E22C4 /* 1039E4 802E2164 00000000 */ nop .L802E2168: /* 1039E8 802E2168 C602001C */ lwc1 $f2, 0x1C($s0) /* 1039EC 802E216C 3C01BFE0 */ lui $at, (0xBFE00000 >> 16) /* 1039F0 802E2170 44810800 */ mtc1 $at, $f1 /* 1039F4 802E2174 44800000 */ mtc1 $zero, $f0 /* 1039F8 802E2178 080B888A */ j .L802E2228 /* 1039FC 802E217C 460010A1 */ cvt.d.s $f2, $f2 .L802E2180: /* 103A00 802E2180 C602001C */ lwc1 $f2, 0x1C($s0) /* 103A04 802E2184 3C01802F */ lui $at, %hi(D_802EB110) /* 103A08 802E2188 D420B110 */ ldc1 $f0, %lo(D_802EB110)($at) /* 103A0C 802E218C 460010A1 */ cvt.d.s $f2, $f2 /* 103A10 802E2190 46201082 */ mul.d $f2, $f2, $f0 /* 103A14 802E2194 00000000 */ nop /* 103A18 802E2198 C6000018 */ lwc1 $f0, 0x18($s0) /* 103A1C 802E219C 462011A0 */ cvt.s.d $f6, $f2 /* 103A20 802E21A0 46060000 */ add.s $f0, $f0, $f6 /* 103A24 802E21A4 C6220058 */ lwc1 $f2, 0x58($s1) /* 103A28 802E21A8 46020001 */ sub.s $f0, $f0, $f2 /* 103A2C 802E21AC 3C014024 */ lui $at, (0x40240000 >> 16) /* 103A30 802E21B0 44811800 */ mtc1 $at, $f3 /* 103A34 802E21B4 44801000 */ mtc1 $zero, $f2 /* 103A38 802E21B8 46000021 */ cvt.d.s $f0, $f0 /* 103A3C 802E21BC 46220003 */ div.d $f0, $f0, $f2 /* 103A40 802E21C0 46200120 */ cvt.s.d $f4, $f0 /* 103A44 802E21C4 3C01802F */ lui $at, %hi(D_802EB118) /* 103A48 802E21C8 D422B118 */ ldc1 $f2, %lo(D_802EB118)($at) /* 103A4C 802E21CC 46002021 */ cvt.d.s $f0, $f4 /* 103A50 802E21D0 4622003C */ c.lt.d $f0, $f2 /* 103A54 802E21D4 00000000 */ nop /* 103A58 802E21D8 45000004 */ bc1f .L802E21EC /* 103A5C 802E21DC 00000000 */ nop /* 103A60 802E21E0 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 103A64 802E21E4 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 103A68 802E21E8 44812000 */ mtc1 $at, $f4 .L802E21EC: /* 103A6C 802E21EC C6000008 */ lwc1 $f0, 0x8($s0) /* 103A70 802E21F0 46040000 */ add.s $f0, $f0, $f4 /* 103A74 802E21F4 E6000008 */ swc1 $f0, 0x8($s0) /* 103A78 802E21F8 C6220058 */ lwc1 $f2, 0x58($s1) /* 103A7C 802E21FC 46001080 */ add.s $f2, $f2, $f0 /* 103A80 802E2200 E6220058 */ swc1 $f2, 0x58($s1) /* 103A84 802E2204 C6000018 */ lwc1 $f0, 0x18($s0) /* 103A88 802E2208 46060000 */ add.s $f0, $f0, $f6 /* 103A8C 802E220C 4602003E */ c.le.s $f0, $f2 /* 103A90 802E2210 080B88AB */ j .L802E22AC /* 103A94 802E2214 00000000 */ nop .L802E2218: /* 103A98 802E2218 C602001C */ lwc1 $f2, 0x1C($s0) /* 103A9C 802E221C 3C01802F */ lui $at, %hi(D_802EB120) /* 103AA0 802E2220 D420B120 */ ldc1 $f0, %lo(D_802EB120)($at) /* 103AA4 802E2224 460010A1 */ cvt.d.s $f2, $f2 .L802E2228: /* 103AA8 802E2228 46201082 */ mul.d $f2, $f2, $f0 /* 103AAC 802E222C 00000000 */ nop /* 103AB0 802E2230 C6000018 */ lwc1 $f0, 0x18($s0) /* 103AB4 802E2234 462011A0 */ cvt.s.d $f6, $f2 /* 103AB8 802E2238 46060000 */ add.s $f0, $f0, $f6 /* 103ABC 802E223C C6220058 */ lwc1 $f2, 0x58($s1) /* 103AC0 802E2240 46020001 */ sub.s $f0, $f0, $f2 /* 103AC4 802E2244 3C014014 */ lui $at, (0x40140000 >> 16) /* 103AC8 802E2248 44811800 */ mtc1 $at, $f3 /* 103ACC 802E224C 44801000 */ mtc1 $zero, $f2 /* 103AD0 802E2250 46000021 */ cvt.d.s $f0, $f0 /* 103AD4 802E2254 46220003 */ div.d $f0, $f0, $f2 /* 103AD8 802E2258 46200120 */ cvt.s.d $f4, $f0 /* 103ADC 802E225C 3C01802F */ lui $at, %hi(D_802EB128) /* 103AE0 802E2260 D422B128 */ ldc1 $f2, %lo(D_802EB128)($at) /* 103AE4 802E2264 46002021 */ cvt.d.s $f0, $f4 /* 103AE8 802E2268 4620103C */ c.lt.d $f2, $f0 /* 103AEC 802E226C 00000000 */ nop /* 103AF0 802E2270 45000004 */ bc1f .L802E2284 /* 103AF4 802E2274 00000000 */ nop /* 103AF8 802E2278 3C01BC23 */ lui $at, (0xBC23D70A >> 16) /* 103AFC 802E227C 3421D70A */ ori $at, $at, (0xBC23D70A & 0xFFFF) /* 103B00 802E2280 44812000 */ mtc1 $at, $f4 .L802E2284: /* 103B04 802E2284 C6000008 */ lwc1 $f0, 0x8($s0) /* 103B08 802E2288 46040000 */ add.s $f0, $f0, $f4 /* 103B0C 802E228C E6000008 */ swc1 $f0, 0x8($s0) /* 103B10 802E2290 C6220058 */ lwc1 $f2, 0x58($s1) /* 103B14 802E2294 46001080 */ add.s $f2, $f2, $f0 /* 103B18 802E2298 E6220058 */ swc1 $f2, 0x58($s1) /* 103B1C 802E229C C6000018 */ lwc1 $f0, 0x18($s0) /* 103B20 802E22A0 46060000 */ add.s $f0, $f0, $f6 /* 103B24 802E22A4 4600103E */ c.le.s $f2, $f0 /* 103B28 802E22A8 00000000 */ nop .L802E22AC: /* 103B2C 802E22AC 45000005 */ bc1f .L802E22C4 /* 103B30 802E22B0 00000000 */ nop /* 103B34 802E22B4 92020011 */ lbu $v0, 0x11($s0) /* 103B38 802E22B8 AE000008 */ sw $zero, 0x8($s0) /* 103B3C 802E22BC 24420001 */ addiu $v0, $v0, 0x1 /* 103B40 802E22C0 A2020011 */ sb $v0, 0x11($s0) .L802E22C4: /* 103B44 802E22C4 0C0B854F */ jal entity_switch_fall_down /* 103B48 802E22C8 0220202D */ daddu $a0, $s1, $zero /* 103B4C 802E22CC 24020002 */ addiu $v0, $zero, 0x2 /* 103B50 802E22D0 16420004 */ bne $s2, $v0, .L802E22E4 /* 103B54 802E22D4 0220202D */ daddu $a0, $s1, $zero /* 103B58 802E22D8 A2000010 */ sb $zero, 0x10($s0) /* 103B5C 802E22DC 0C043F5A */ jal exec_entity_commandlist /* 103B60 802E22E0 A2000011 */ sb $zero, 0x11($s0) .L802E22E4: /* 103B64 802E22E4 96020024 */ lhu $v0, 0x24($s0) /* 103B68 802E22E8 2403000A */ addiu $v1, $zero, 0xA /* 103B6C 802E22EC 24420001 */ addiu $v0, $v0, 0x1 /* 103B70 802E22F0 A6020024 */ sh $v0, 0x24($s0) /* 103B74 802E22F4 00021400 */ sll $v0, $v0, 16 /* 103B78 802E22F8 00021403 */ sra $v0, $v0, 16 /* 103B7C 802E22FC 1443000D */ bne $v0, $v1, .L802E2334 /* 103B80 802E2300 00000000 */ nop /* 103B84 802E2304 8E020028 */ lw $v0, 0x28($s0) /* 103B88 802E2308 1440000A */ bnez $v0, .L802E2334 /* 103B8C 802E230C 2402003C */ addiu $v0, $zero, 0x3C /* 103B90 802E2310 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 103B94 802E2314 44810000 */ mtc1 $at, $f0 /* 103B98 802E2318 AFA20014 */ sw $v0, 0x14($sp) /* 103B9C 802E231C E7A00010 */ swc1 $f0, 0x10($sp) /* 103BA0 802E2320 8E250048 */ lw $a1, 0x48($s1) /* 103BA4 802E2324 8E26004C */ lw $a2, 0x4C($s1) /* 103BA8 802E2328 8E270050 */ lw $a3, 0x50($s1) /* 103BAC 802E232C 0C01C88C */ jal fx_cold_breath /* 103BB0 802E2330 0000202D */ daddu $a0, $zero, $zero .L802E2334: /* 103BB4 802E2334 8FBF0024 */ lw $ra, 0x24($sp) /* 103BB8 802E2338 8FB20020 */ lw $s2, 0x20($sp) /* 103BBC 802E233C 8FB1001C */ lw $s1, 0x1C($sp) /* 103BC0 802E2340 8FB00018 */ lw $s0, 0x18($sp) /* 103BC4 802E2344 03E00008 */ jr $ra /* 103BC8 802E2348 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void entity_base_switch_animate_scale(Entity* entity) { f32 phi_f4; f32 scaleChange; SwitchData* data = entity->dataBuf.swtch; s32 phi_s2 = 0; switch (data->animStateScaleX) { case 0: scaleChange = data->baseScale.z * 0.3; phi_f4 = ((data->baseScale.x + scaleChange) - 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 + scaleChange) <= entity->scale.x) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 1: scaleChange = (data->baseScale.z * -0.2); phi_f4 = ((data->baseScale.x + scaleChange) - 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 + scaleChange)) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 2: scaleChange = data->baseScale.z * 0.15; phi_f4 = ((data->baseScale.x + scaleChange) - 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 + scaleChange) <= entity->scale.x) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 3: scaleChange = data->baseScale.z * -0.1; phi_f4 = ((data->baseScale.x + scaleChange) - 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 + scaleChange)) { data->deltaScaleX = 0.0f; data->animStateScaleX++; } break; case 4: phi_s2++; break; } entity->scale.z = entity->scale.x; switch (data->animStateScaleY) { case 0: scaleChange = data->baseScale.z * -0.5; phi_f4 = ((data->baseScale.y + scaleChange) - 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 + scaleChange)) { data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 1: scaleChange = data->baseScale.z * 0.1; phi_f4 = ((data->baseScale.y + scaleChange) - 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 + scaleChange) <= entity->scale.y) { data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 2: scaleChange = data->baseScale.z * -0.3; phi_f4 = ((data->baseScale.y + scaleChange) - 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 + scaleChange)) { data->deltaScaleY = 0.0f; data->animStateScaleY++; } break; case 3: phi_s2++; break; } entity_switch_fall_down(entity); if (phi_s2 == 2) { data->animStateScaleX = 0; data->animStateScaleY = 0; exec_entity_commandlist(entity); } data->scaleAnimTimer++; if (data->scaleAnimTimer == 10 && data->linkedSwitch == NULL) { fx_cold_breath(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 60); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel light_rays_appendGfx /* 36D96C E006A94C 27BDFEE0 */ addiu $sp, $sp, -0x120 /* 36D970 E006A950 AFA40120 */ sw $a0, 0x120($sp) /* 36D974 E006A954 8FA80120 */ lw $t0, 0x120($sp) /* 36D978 E006A958 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 36D97C E006A95C AFB100E4 */ sw $s1, 0xE4($sp) /* 36D980 E006A960 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 36D984 E006A964 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 36D988 E006A968 AFBF0104 */ sw $ra, 0x104($sp) /* 36D98C E006A96C AFBE0100 */ sw $fp, 0x100($sp) /* 36D990 E006A970 AFB700FC */ sw $s7, 0xFC($sp) /* 36D994 E006A974 AFB600F8 */ sw $s6, 0xF8($sp) /* 36D998 E006A978 AFB500F4 */ sw $s5, 0xF4($sp) /* 36D99C E006A97C AFB400F0 */ sw $s4, 0xF0($sp) /* 36D9A0 E006A980 AFB300EC */ sw $s3, 0xEC($sp) /* 36D9A4 E006A984 AFB200E8 */ sw $s2, 0xE8($sp) /* 36D9A8 E006A988 AFB000E0 */ sw $s0, 0xE0($sp) /* 36D9AC E006A98C F7B80118 */ sdc1 $f24, 0x118($sp) /* 36D9B0 E006A990 F7B60110 */ sdc1 $f22, 0x110($sp) /* 36D9B4 E006A994 F7B40108 */ sdc1 $f20, 0x108($sp) /* 36D9B8 E006A998 8E230000 */ lw $v1, 0x0($s1) /* 36D9BC E006A99C 8D12000C */ lw $s2, 0xC($t0) /* 36D9C0 E006A9A0 0060282D */ daddu $a1, $v1, $zero /* 36D9C4 E006A9A4 8E570000 */ lw $s7, 0x0($s2) /* 36D9C8 E006A9A8 24630008 */ addiu $v1, $v1, 0x8 /* 36D9CC E006A9AC AE230000 */ sw $v1, 0x0($s1) /* 36D9D0 E006A9B0 00171080 */ sll $v0, $s7, 2 /* 36D9D4 E006A9B4 3C08E007 */ lui $t0, (0xE0070000 >> 16) /* 36D9D8 E006A9B8 01024021 */ addu $t0, $t0, $v0 /* 36D9DC E006A9BC 8D08ADF0 */ lw $t0, -0x5210($t0) /* 36D9E0 E006A9C0 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 36D9E4 E006A9C4 AFA800D8 */ sw $t0, 0xD8($sp) /* 36D9E8 E006A9C8 3C06E007 */ lui $a2, (0xE0070000 >> 16) /* 36D9EC E006A9CC 00C23021 */ addu $a2, $a2, $v0 /* 36D9F0 E006A9D0 8CC6AE00 */ lw $a2, -0x5200($a2) /* 36D9F4 E006A9D4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 36D9F8 E006A9D8 ACA20000 */ sw $v0, 0x0($a1) /* 36D9FC E006A9DC ACA00004 */ sw $zero, 0x4($a1) /* 36DA00 E006A9E0 AC670000 */ sw $a3, 0x0($v1) /* 36DA04 E006A9E4 8FA80120 */ lw $t0, 0x120($sp) /* 36DA08 E006A9E8 27A40098 */ addiu $a0, $sp, 0x98 /* 36DA0C E006A9EC 8D050010 */ lw $a1, 0x10($t0) /* 36DA10 E006A9F0 24620008 */ addiu $v0, $v1, 0x8 /* 36DA14 E006A9F4 AE220000 */ sw $v0, 0x0($s1) /* 36DA18 E006A9F8 8CA5001C */ lw $a1, 0x1C($a1) /* 36DA1C E006A9FC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 36DA20 E006AA00 AC620008 */ sw $v0, 0x8($v1) /* 36DA24 E006AA04 3C028000 */ lui $v0, (0x80000000 >> 16) /* 36DA28 E006AA08 AC66000C */ sw $a2, 0xC($v1) /* 36DA2C E006AA0C 00A22821 */ addu $a1, $a1, $v0 /* 36DA30 E006AA10 AC650004 */ sw $a1, 0x4($v1) /* 36DA34 E006AA14 8E450010 */ lw $a1, 0x10($s2) /* 36DA38 E006AA18 8E460014 */ lw $a2, 0x14($s2) /* 36DA3C E006AA1C 8E470018 */ lw $a3, 0x18($s2) /* 36DA40 E006AA20 24630010 */ addiu $v1, $v1, 0x10 /* 36DA44 E006AA24 0C080108 */ jal shim_guTranslateF /* 36DA48 E006AA28 AE230000 */ sw $v1, 0x0($s1) /* 36DA4C E006AA2C 8FA80120 */ lw $t0, 0x120($sp) /* 36DA50 E006AA30 24140001 */ addiu $s4, $zero, 0x1 /* 36DA54 E006AA34 8D020008 */ lw $v0, 0x8($t0) /* 36DA58 E006AA38 0282102A */ slt $v0, $s4, $v0 /* 36DA5C E006AA3C 104000D2 */ beqz $v0, .LE006AD88 /* 36DA60 E006AA40 26520094 */ addiu $s2, $s2, 0x94 /* 36DA64 E006AA44 2AF60002 */ slti $s6, $s7, 0x2 /* 36DA68 E006AA48 27B00058 */ addiu $s0, $sp, 0x58 /* 36DA6C E006AA4C 0220982D */ daddu $s3, $s1, $zero /* 36DA70 E006AA50 3C1E8007 */ lui $fp, %hi(gMatrixListPos) /* 36DA74 E006AA54 27DE41F0 */ addiu $fp, $fp, %lo(gMatrixListPos) /* 36DA78 E006AA58 3C150001 */ lui $s5, (0x11630 >> 16) /* 36DA7C E006AA5C 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 36DA80 E006AA60 26510024 */ addiu $s1, $s2, 0x24 /* 36DA84 E006AA64 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 36DA88 E006AA68 4481C000 */ mtc1 $at, $f24 /* 36DA8C E006AA6C 4480B000 */ mtc1 $zero, $f22 .LE006AA70: /* 36DA90 E006AA70 3C01437F */ lui $at, (0x437F0000 >> 16) /* 36DA94 E006AA74 44811000 */ mtc1 $at, $f2 /* 36DA98 E006AA78 C6200000 */ lwc1 $f0, 0x0($s1) /* 36DA9C E006AA7C 46800020 */ cvt.s.w $f0, $f0 /* 36DAA0 E006AA80 16C00003 */ bnez $s6, .LE006AA90 /* 36DAA4 E006AA84 46020503 */ div.s $f20, $f0, $f2 /* 36DAA8 E006AA88 0C01AA17 */ jal func_E006A85C /* 36DAAC E006AA8C 0240202D */ daddu $a0, $s2, $zero .LE006AA90: /* 36DAB0 E006AA90 E7B60010 */ swc1 $f22, 0x10($sp) /* 36DAB4 E006AA94 8E250038 */ lw $a1, 0x38($s1) /* 36DAB8 E006AA98 4406C000 */ mfc1 $a2, $f24 /* 36DABC E006AA9C 4407B000 */ mfc1 $a3, $f22 /* 36DAC0 E006AAA0 0C080104 */ jal shim_guRotateF /* 36DAC4 E006AAA4 0200202D */ daddu $a0, $s0, $zero /* 36DAC8 E006AAA8 0200202D */ daddu $a0, $s0, $zero /* 36DACC E006AAAC 27A50098 */ addiu $a1, $sp, 0x98 /* 36DAD0 E006AAB0 0C080114 */ jal shim_guMtxCatF /* 36DAD4 E006AAB4 27A60018 */ addiu $a2, $sp, 0x18 /* 36DAD8 E006AAB8 56C00060 */ bnel $s6, $zero, .LE006AC3C /* 36DADC E006AABC E7B60010 */ swc1 $f22, 0x10($sp) /* 36DAE0 E006AAC0 C6220040 */ lwc1 $f2, 0x40($s1) /* 36DAE4 E006AAC4 24020003 */ addiu $v0, $zero, 0x3 /* 36DAE8 E006AAC8 56E20005 */ bnel $s7, $v0, .LE006AAE0 /* 36DAEC E006AACC 46161000 */ add.s $f0, $f2, $f22 /* 36DAF0 E006AAD0 3C014234 */ lui $at, (0x42340000 >> 16) /* 36DAF4 E006AAD4 44810000 */ mtc1 $at, $f0 /* 36DAF8 E006AAD8 00000000 */ nop /* 36DAFC E006AADC 46001000 */ add.s $f0, $f2, $f0 .LE006AAE0: /* 36DB00 E006AAE0 44050000 */ mfc1 $a1, $f0 /* 36DB04 E006AAE4 4406B000 */ mfc1 $a2, $f22 /* 36DB08 E006AAE8 4407B000 */ mfc1 $a3, $f22 /* 36DB0C E006AAEC 0200202D */ daddu $a0, $s0, $zero /* 36DB10 E006AAF0 0C080104 */ jal shim_guRotateF /* 36DB14 E006AAF4 E7B80010 */ swc1 $f24, 0x10($sp) /* 36DB18 E006AAF8 0200202D */ daddu $a0, $s0, $zero /* 36DB1C E006AAFC 27A50018 */ addiu $a1, $sp, 0x18 /* 36DB20 E006AB00 0C080114 */ jal shim_guMtxCatF /* 36DB24 E006AB04 00A0302D */ daddu $a2, $a1, $zero /* 36DB28 E006AB08 E7B60010 */ swc1 $f22, 0x10($sp) /* 36DB2C E006AB0C 8E25003C */ lw $a1, 0x3C($s1) /* 36DB30 E006AB10 4406B000 */ mfc1 $a2, $f22 /* 36DB34 E006AB14 4407C000 */ mfc1 $a3, $f24 /* 36DB38 E006AB18 0C080104 */ jal shim_guRotateF /* 36DB3C E006AB1C 0200202D */ daddu $a0, $s0, $zero /* 36DB40 E006AB20 0200202D */ daddu $a0, $s0, $zero /* 36DB44 E006AB24 27A50018 */ addiu $a1, $sp, 0x18 /* 36DB48 E006AB28 0C080114 */ jal shim_guMtxCatF /* 36DB4C E006AB2C 00A0302D */ daddu $a2, $a1, $zero /* 36DB50 E006AB30 8E250034 */ lw $a1, 0x34($s1) /* 36DB54 E006AB34 4406B000 */ mfc1 $a2, $f22 /* 36DB58 E006AB38 4407B000 */ mfc1 $a3, $f22 /* 36DB5C E006AB3C 0C080108 */ jal shim_guTranslateF /* 36DB60 E006AB40 0200202D */ daddu $a0, $s0, $zero /* 36DB64 E006AB44 0200202D */ daddu $a0, $s0, $zero /* 36DB68 E006AB48 27A50018 */ addiu $a1, $sp, 0x18 /* 36DB6C E006AB4C 0C080114 */ jal shim_guMtxCatF /* 36DB70 E006AB50 00A0302D */ daddu $a2, $a1, $zero /* 36DB74 E006AB54 3C014040 */ lui $at, (0x40400000 >> 16) /* 36DB78 E006AB58 44810000 */ mtc1 $at, $f0 /* 36DB7C E006AB5C 00000000 */ nop /* 36DB80 E006AB60 4600A000 */ add.s $f0, $f20, $f0 /* 36DB84 E006AB64 3C013FD0 */ lui $at, (0x3FD00000 >> 16) /* 36DB88 E006AB68 44811800 */ mtc1 $at, $f3 /* 36DB8C E006AB6C 44801000 */ mtc1 $zero, $f2 /* 36DB90 E006AB70 46000021 */ cvt.d.s $f0, $f0 /* 36DB94 E006AB74 46220002 */ mul.d $f0, $f0, $f2 /* 36DB98 E006AB78 00000000 */ nop /* 36DB9C E006AB7C 32830003 */ andi $v1, $s4, 0x3 /* 36DBA0 E006AB80 24020001 */ addiu $v0, $zero, 0x1 /* 36DBA4 E006AB84 46200120 */ cvt.s.d $f4, $f0 /* 36DBA8 E006AB88 10620010 */ beq $v1, $v0, .LE006ABCC /* 36DBAC E006AB8C 46002186 */ mov.s $f6, $f4 /* 36DBB0 E006AB90 28620002 */ slti $v0, $v1, 0x2 /* 36DBB4 E006AB94 10400005 */ beqz $v0, .LE006ABAC /* 36DBB8 E006AB98 24020002 */ addiu $v0, $zero, 0x2 /* 36DBBC E006AB9C 10600007 */ beqz $v1, .LE006ABBC /* 36DBC0 E006ABA0 00000000 */ nop /* 36DBC4 E006ABA4 0801AAFD */ j .LE006ABF4 /* 36DBC8 E006ABA8 4600A006 */ mov.s $f0, $f20 .LE006ABAC: /* 36DBCC E006ABAC 5062000C */ beql $v1, $v0, .LE006ABE0 /* 36DBD0 E006ABB0 4600A021 */ cvt.d.s $f0, $f20 /* 36DBD4 E006ABB4 0801AAFD */ j .LE006ABF4 /* 36DBD8 E006ABB8 4600A006 */ mov.s $f0, $f20 .LE006ABBC: /* 36DBDC E006ABBC 3C01E007 */ lui $at, (0xE0070000 >> 16) /* 36DBE0 E006ABC0 D422AF58 */ ldc1 $f2, -0x50A8($at) /* 36DBE4 E006ABC4 0801AAFA */ j .LE006ABE8 /* 36DBE8 E006ABC8 4600A021 */ cvt.d.s $f0, $f20 .LE006ABCC: /* 36DBEC E006ABCC 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 36DBF0 E006ABD0 44811800 */ mtc1 $at, $f3 /* 36DBF4 E006ABD4 44801000 */ mtc1 $zero, $f2 /* 36DBF8 E006ABD8 0801AAFA */ j .LE006ABE8 /* 36DBFC E006ABDC 4600A021 */ cvt.d.s $f0, $f20 .LE006ABE0: /* 36DC00 E006ABE0 3C01E007 */ lui $at, (0xE0070000 >> 16) /* 36DC04 E006ABE4 D422AF60 */ ldc1 $f2, -0x50A0($at) .LE006ABE8: /* 36DC08 E006ABE8 46220002 */ mul.d $f0, $f0, $f2 /* 36DC0C E006ABEC 00000000 */ nop /* 36DC10 E006ABF0 46200020 */ cvt.s.d $f0, $f0 .LE006ABF4: /* 36DC14 E006ABF4 44053000 */ mfc1 $a1, $f6 /* 36DC18 E006ABF8 44060000 */ mfc1 $a2, $f0 /* 36DC1C E006ABFC 44072000 */ mfc1 $a3, $f4 /* 36DC20 E006AC00 0C080110 */ jal shim_guScaleF /* 36DC24 E006AC04 0200202D */ daddu $a0, $s0, $zero /* 36DC28 E006AC08 0200202D */ daddu $a0, $s0, $zero /* 36DC2C E006AC0C 27A50018 */ addiu $a1, $sp, 0x18 /* 36DC30 E006AC10 0C080114 */ jal shim_guMtxCatF /* 36DC34 E006AC14 00A0302D */ daddu $a2, $a1, $zero /* 36DC38 E006AC18 8E620000 */ lw $v0, 0x0($s3) /* 36DC3C E006AC1C 0040202D */ daddu $a0, $v0, $zero /* 36DC40 E006AC20 24420008 */ addiu $v0, $v0, 0x8 /* 36DC44 E006AC24 AE620000 */ sw $v0, 0x0($s3) /* 36DC48 E006AC28 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 36DC4C E006AC2C AC820000 */ sw $v0, 0x0($a0) /* 36DC50 E006AC30 92220003 */ lbu $v0, 0x3($s1) /* 36DC54 E006AC34 0801AB33 */ j .LE006ACCC /* 36DC58 E006AC38 2403F000 */ addiu $v1, $zero, -0x1000 .LE006AC3C: /* 36DC5C E006AC3C 8E25003C */ lw $a1, 0x3C($s1) /* 36DC60 E006AC40 4406B000 */ mfc1 $a2, $f22 /* 36DC64 E006AC44 4407C000 */ mfc1 $a3, $f24 /* 36DC68 E006AC48 0C080104 */ jal shim_guRotateF /* 36DC6C E006AC4C 0200202D */ daddu $a0, $s0, $zero /* 36DC70 E006AC50 0200202D */ daddu $a0, $s0, $zero /* 36DC74 E006AC54 27A50018 */ addiu $a1, $sp, 0x18 /* 36DC78 E006AC58 0C080114 */ jal shim_guMtxCatF /* 36DC7C E006AC5C 00A0302D */ daddu $a2, $a1, $zero /* 36DC80 E006AC60 E7B80010 */ swc1 $f24, 0x10($sp) /* 36DC84 E006AC64 8E250040 */ lw $a1, 0x40($s1) /* 36DC88 E006AC68 4406B000 */ mfc1 $a2, $f22 /* 36DC8C E006AC6C 4407B000 */ mfc1 $a3, $f22 /* 36DC90 E006AC70 0C080104 */ jal shim_guRotateF /* 36DC94 E006AC74 0200202D */ daddu $a0, $s0, $zero /* 36DC98 E006AC78 0200202D */ daddu $a0, $s0, $zero /* 36DC9C E006AC7C 27A50018 */ addiu $a1, $sp, 0x18 /* 36DCA0 E006AC80 0C080114 */ jal shim_guMtxCatF /* 36DCA4 E006AC84 00A0302D */ daddu $a2, $a1, $zero /* 36DCA8 E006AC88 8E250034 */ lw $a1, 0x34($s1) /* 36DCAC E006AC8C 4406B000 */ mfc1 $a2, $f22 /* 36DCB0 E006AC90 4407B000 */ mfc1 $a3, $f22 /* 36DCB4 E006AC94 0C080108 */ jal shim_guTranslateF /* 36DCB8 E006AC98 0200202D */ daddu $a0, $s0, $zero /* 36DCBC E006AC9C 0200202D */ daddu $a0, $s0, $zero /* 36DCC0 E006ACA0 27A50018 */ addiu $a1, $sp, 0x18 /* 36DCC4 E006ACA4 0C080114 */ jal shim_guMtxCatF /* 36DCC8 E006ACA8 00A0302D */ daddu $a2, $a1, $zero /* 36DCCC E006ACAC 8E620000 */ lw $v0, 0x0($s3) /* 36DCD0 E006ACB0 0040202D */ daddu $a0, $v0, $zero /* 36DCD4 E006ACB4 24420008 */ addiu $v0, $v0, 0x8 /* 36DCD8 E006ACB8 AE620000 */ sw $v0, 0x0($s3) /* 36DCDC E006ACBC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 36DCE0 E006ACC0 AC820000 */ sw $v0, 0x0($a0) /* 36DCE4 E006ACC4 92220003 */ lbu $v0, 0x3($s1) /* 36DCE8 E006ACC8 2403B500 */ addiu $v1, $zero, -0x4B00 .LE006ACCC: /* 36DCEC E006ACCC 00431025 */ or $v0, $v0, $v1 /* 36DCF0 E006ACD0 AC820004 */ sw $v0, 0x4($a0) /* 36DCF4 E006ACD4 27A40018 */ addiu $a0, $sp, 0x18 /* 36DCF8 E006ACD8 26940001 */ addiu $s4, $s4, 0x1 /* 36DCFC E006ACDC 26310094 */ addiu $s1, $s1, 0x94 /* 36DD00 E006ACE0 97C50000 */ lhu $a1, 0x0($fp) /* 36DD04 E006ACE4 3C02800A */ lui $v0, %hi(gDisplayContext) /* 36DD08 E006ACE8 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 36DD0C E006ACEC 00052980 */ sll $a1, $a1, 6 /* 36DD10 E006ACF0 00B52821 */ addu $a1, $a1, $s5 /* 36DD14 E006ACF4 0C080118 */ jal shim_guMtxF2L /* 36DD18 E006ACF8 00452821 */ addu $a1, $v0, $a1 /* 36DD1C E006ACFC 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 36DD20 E006AD00 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 36DD24 E006AD04 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 36DD28 E006AD08 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 36DD2C E006AD0C 8E640000 */ lw $a0, 0x0($s3) /* 36DD30 E006AD10 97C30000 */ lhu $v1, 0x0($fp) /* 36DD34 E006AD14 0080282D */ daddu $a1, $a0, $zero /* 36DD38 E006AD18 24840008 */ addiu $a0, $a0, 0x8 /* 36DD3C E006AD1C AE640000 */ sw $a0, 0x0($s3) /* 36DD40 E006AD20 ACA20000 */ sw $v0, 0x0($a1) /* 36DD44 E006AD24 24620001 */ addiu $v0, $v1, 0x1 /* 36DD48 E006AD28 3063FFFF */ andi $v1, $v1, 0xFFFF /* 36DD4C E006AD2C 00031980 */ sll $v1, $v1, 6 /* 36DD50 E006AD30 A7C20000 */ sh $v0, 0x0($fp) /* 36DD54 E006AD34 3C02800A */ lui $v0, %hi(gDisplayContext) /* 36DD58 E006AD38 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 36DD5C E006AD3C 00751821 */ addu $v1, $v1, $s5 /* 36DD60 E006AD40 00431021 */ addu $v0, $v0, $v1 /* 36DD64 E006AD44 ACA20004 */ sw $v0, 0x4($a1) /* 36DD68 E006AD48 24820008 */ addiu $v0, $a0, 0x8 /* 36DD6C E006AD4C AE620000 */ sw $v0, 0x0($s3) /* 36DD70 E006AD50 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 36DD74 E006AD54 AC820000 */ sw $v0, 0x0($a0) /* 36DD78 E006AD58 8FA800D8 */ lw $t0, 0xD8($sp) /* 36DD7C E006AD5C 24020040 */ addiu $v0, $zero, 0x40 /* 36DD80 E006AD60 AC860008 */ sw $a2, 0x8($a0) /* 36DD84 E006AD64 AC82000C */ sw $v0, 0xC($a0) /* 36DD88 E006AD68 AC880004 */ sw $t0, 0x4($a0) /* 36DD8C E006AD6C 8FA80120 */ lw $t0, 0x120($sp) /* 36DD90 E006AD70 26520094 */ addiu $s2, $s2, 0x94 /* 36DD94 E006AD74 8D020008 */ lw $v0, 0x8($t0) /* 36DD98 E006AD78 24840010 */ addiu $a0, $a0, 0x10 /* 36DD9C E006AD7C 0282102A */ slt $v0, $s4, $v0 /* 36DDA0 E006AD80 1440FF3B */ bnez $v0, .LE006AA70 /* 36DDA4 E006AD84 AE640000 */ sw $a0, 0x0($s3) .LE006AD88: /* 36DDA8 E006AD88 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 36DDAC E006AD8C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 36DDB0 E006AD90 8C620000 */ lw $v0, 0x0($v1) /* 36DDB4 E006AD94 0040202D */ daddu $a0, $v0, $zero /* 36DDB8 E006AD98 24420008 */ addiu $v0, $v0, 0x8 /* 36DDBC E006AD9C AC620000 */ sw $v0, 0x0($v1) /* 36DDC0 E006ADA0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 36DDC4 E006ADA4 AC820000 */ sw $v0, 0x0($a0) /* 36DDC8 E006ADA8 AC800004 */ sw $zero, 0x4($a0) /* 36DDCC E006ADAC 8FBF0104 */ lw $ra, 0x104($sp) /* 36DDD0 E006ADB0 8FBE0100 */ lw $fp, 0x100($sp) /* 36DDD4 E006ADB4 8FB700FC */ lw $s7, 0xFC($sp) /* 36DDD8 E006ADB8 8FB600F8 */ lw $s6, 0xF8($sp) /* 36DDDC E006ADBC 8FB500F4 */ lw $s5, 0xF4($sp) /* 36DDE0 E006ADC0 8FB400F0 */ lw $s4, 0xF0($sp) /* 36DDE4 E006ADC4 8FB300EC */ lw $s3, 0xEC($sp) /* 36DDE8 E006ADC8 8FB200E8 */ lw $s2, 0xE8($sp) /* 36DDEC E006ADCC 8FB100E4 */ lw $s1, 0xE4($sp) /* 36DDF0 E006ADD0 8FB000E0 */ lw $s0, 0xE0($sp) /* 36DDF4 E006ADD4 D7B80118 */ ldc1 $f24, 0x118($sp) /* 36DDF8 E006ADD8 D7B60110 */ ldc1 $f22, 0x110($sp) /* 36DDFC E006ADDC D7B40108 */ ldc1 $f20, 0x108($sp) /* 36DE00 E006ADE0 03E00008 */ jr $ra /* 36DE04 E006ADE4 27BD0120 */ addiu $sp, $sp, 0x120 /* 36DE08 E006ADE8 00000000 */ nop /* 36DE0C E006ADEC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void light_rays_appendGfx(void* effect) { LightRaysFXData* part = ((EffectInstance*)effect)->data.lightRays; s32 type = part->type; Gfx* dlist = D_E006ADF0[type]; Gfx* dlist2 = D_E006AE00[type]; Matrix4f mtxTransform; Matrix4f mtxTemp; Matrix4f mtxTranslate; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist2); shim_guTranslateF(mtxTranslate, part->pos.x, part->pos.y, part->pos.z); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { f32 temp = part->alpha / 255.0f; f32 angleZ; f32 scaleX; f32 scaleY; f32 scaleZ; f32 unk_64; if (type >= 2) { func_E006A85C(part); } shim_guRotateF(mtxTemp, part->rotation.x, 1.0f, 0.0f, 0.0f); shim_guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); if (type >= 2) { unk_64 = part->rotation.z; if (type == 3) { angleZ = unk_64 + 45.0f; } else { angleZ = unk_64 + 0.0f; } shim_guRotateF(mtxTemp, angleZ, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); shim_guRotateF(mtxTemp, part->rotation.y, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); shim_guTranslateF(mtxTemp, part->unk_58, 0.0f, 0.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); scaleX = scaleZ = (temp + 3.0f) * 0.25; switch (i & 3) { case 0: scaleY = temp * 0.3; break; case 1: scaleY = temp * 0.5; break; case 2: scaleY = temp * 0.9; break; case 3: default: scaleY = temp; break; } shim_guScaleF(mtxTemp, scaleX, scaleY, scaleZ); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 240, part->alpha); } else { shim_guRotateF(mtxTemp, part->rotation.y, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); shim_guRotateF(mtxTemp, part->rotation.z, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); shim_guTranslateF(mtxTemp, part->unk_58, 0.0f, 0.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 181, part->alpha); } shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel flame_appendGfx /* 353648 E0040348 27BDFF08 */ addiu $sp, $sp, -0xF8 /* 35364C E004034C 3C03DB06 */ lui $v1, (0xDB060024 >> 16) /* 353650 E0040350 AFB400E8 */ sw $s4, 0xE8($sp) /* 353654 E0040354 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 353658 E0040358 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 35365C E004035C 34630024 */ ori $v1, $v1, (0xDB060024 & 0xFFFF) /* 353660 E0040360 AFB600F0 */ sw $s6, 0xF0($sp) /* 353664 E0040364 3C16E700 */ lui $s6, (0xE7000000 >> 16) /* 353668 E0040368 3C0B8000 */ lui $t3, (0x80000000 >> 16) /* 35366C E004036C AFBF00F4 */ sw $ra, 0xF4($sp) /* 353670 E0040370 AFB500EC */ sw $s5, 0xEC($sp) /* 353674 E0040374 AFB300E4 */ sw $s3, 0xE4($sp) /* 353678 E0040378 AFB200E0 */ sw $s2, 0xE0($sp) /* 35367C E004037C AFB100DC */ sw $s1, 0xDC($sp) /* 353680 E0040380 AFB000D8 */ sw $s0, 0xD8($sp) /* 353684 E0040384 8E870000 */ lw $a3, 0x0($s4) /* 353688 E0040388 8C92000C */ lw $s2, 0xC($a0) /* 35368C E004038C 3C014080 */ lui $at, (0x40800000 >> 16) /* 353690 E0040390 44812000 */ mtc1 $at, $f4 /* 353694 E0040394 00E0102D */ daddu $v0, $a3, $zero /* 353698 E0040398 24E70008 */ addiu $a3, $a3, 0x8 /* 35369C E004039C AE870000 */ sw $a3, 0x0($s4) /* 3536A0 E00403A0 8E4C0000 */ lw $t4, 0x0($s2) /* 3536A4 E00403A4 C640001C */ lwc1 $f0, 0x1C($s2) /* 3536A8 E00403A8 C6420024 */ lwc1 $f2, 0x24($s2) /* 3536AC E00403AC 3C108007 */ lui $s0, %hi(gCurrentCameraID) /* 3536B0 E00403B0 26107410 */ addiu $s0, $s0, %lo(gCurrentCameraID) /* 3536B4 E00403B4 AC560000 */ sw $s6, 0x0($v0) /* 3536B8 E00403B8 AC400004 */ sw $zero, 0x4($v0) /* 3536BC E00403BC ACE30000 */ sw $v1, 0x0($a3) /* 3536C0 E00403C0 8C830010 */ lw $v1, 0x10($a0) /* 3536C4 E00403C4 24E20008 */ addiu $v0, $a3, 0x8 /* 3536C8 E00403C8 AE820000 */ sw $v0, 0x0($s4) /* 3536CC E00403CC 46040002 */ mul.s $f0, $f0, $f4 /* 3536D0 E00403D0 00000000 */ nop /* 3536D4 E00403D4 8C62001C */ lw $v0, 0x1C($v1) /* 3536D8 E00403D8 3C15800B */ lui $s5, %hi(gCameras) /* 3536DC E00403DC 26B51D80 */ addiu $s5, $s5, %lo(gCameras) /* 3536E0 E00403E0 004B1021 */ addu $v0, $v0, $t3 /* 3536E4 E00403E4 ACE20004 */ sw $v0, 0x4($a3) /* 3536E8 E00403E8 8E030000 */ lw $v1, 0x0($s0) /* 3536EC E00403EC 46041082 */ mul.s $f2, $f2, $f4 /* 3536F0 E00403F0 00000000 */ nop /* 3536F4 E00403F4 00031080 */ sll $v0, $v1, 2 /* 3536F8 E00403F8 00431021 */ addu $v0, $v0, $v1 /* 3536FC E00403FC 00021080 */ sll $v0, $v0, 2 /* 353700 E0040400 00431023 */ subu $v0, $v0, $v1 /* 353704 E0040404 000218C0 */ sll $v1, $v0, 3 /* 353708 E0040408 00431021 */ addu $v0, $v0, $v1 /* 35370C E004040C 000210C0 */ sll $v0, $v0, 3 /* 353710 E0040410 00554021 */ addu $t0, $v0, $s5 /* 353714 E0040414 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 353718 E0040418 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 35371C E004041C 3C04E004 */ lui $a0, %hi(D_E0040880) /* 353720 E0040420 24840880 */ addiu $a0, $a0, %lo(D_E0040880) /* 353724 E0040424 94430134 */ lhu $v1, 0x134($v0) /* 353728 E0040428 8C820000 */ lw $v0, 0x0($a0) /* 35372C E004042C 4600018D */ trunc.w.s $f6, $f0 /* 353730 E0040430 440A3000 */ mfc1 $t2, $f6 /* 353734 E0040434 4600118D */ trunc.w.s $f6, $f2 /* 353738 E0040438 44093000 */ mfc1 $t1, $f6 /* 35373C E004043C 1043005F */ beq $v0, $v1, .LE00405BC /* 353740 E0040440 24E20010 */ addiu $v0, $a3, 0x10 /* 353744 E0040444 3C06FF10 */ lui $a2, (0xFF10013F >> 16) /* 353748 E0040448 34C6013F */ ori $a2, $a2, (0xFF10013F & 0xFFFF) /* 35374C E004044C 3C05DE00 */ lui $a1, (0xDE000000 >> 16) /* 353750 E0040450 AC830000 */ sw $v1, 0x0($a0) /* 353754 E0040454 AE820000 */ sw $v0, 0x0($s4) /* 353758 E0040458 3C020900 */ lui $v0, %hi(D_09000918_415978) /* 35375C E004045C 24420918 */ addiu $v0, $v0, %lo(D_09000918_415978) /* 353760 E0040460 31430FFF */ andi $v1, $t2, 0xFFF /* 353764 E0040464 00031B00 */ sll $v1, $v1, 12 /* 353768 E0040468 ACE2000C */ sw $v0, 0xC($a3) /* 35376C E004046C 31220FFF */ andi $v0, $t1, 0xFFF /* 353770 E0040470 3C04F200 */ lui $a0, (0xF2000000 >> 16) /* 353774 E0040474 00441025 */ or $v0, $v0, $a0 /* 353778 E0040478 00621825 */ or $v1, $v1, $v0 /* 35377C E004047C 25420080 */ addiu $v0, $t2, 0x80 /* 353780 E0040480 30420FFF */ andi $v0, $v0, 0xFFF /* 353784 E0040484 00021300 */ sll $v0, $v0, 12 /* 353788 E0040488 ACE30010 */ sw $v1, 0x10($a3) /* 35378C E004048C 25230100 */ addiu $v1, $t1, 0x100 /* 353790 E0040490 30630FFF */ andi $v1, $v1, 0xFFF /* 353794 E0040494 3C040100 */ lui $a0, (0x1000000 >> 16) /* 353798 E0040498 00641825 */ or $v1, $v1, $a0 /* 35379C E004049C 00431025 */ or $v0, $v0, $v1 /* 3537A0 E00404A0 ACE20014 */ sw $v0, 0x14($a3) /* 3537A4 E00404A4 3C020900 */ lui $v0, %hi(D_090009E0_415A40) /* 3537A8 E00404A8 244209E0 */ addiu $v0, $v0, %lo(D_090009E0_415A40) /* 3537AC E00404AC 3C03800A */ lui $v1, %hi(nuGfxCfb_ptr) /* 3537B0 E00404B0 8C63A64C */ lw $v1, %lo(nuGfxCfb_ptr)($v1) /* 3537B4 E00404B4 3C04ED00 */ lui $a0, (0xED000000 >> 16) /* 3537B8 E00404B8 ACE50008 */ sw $a1, 0x8($a3) /* 3537BC E00404BC ACE50018 */ sw $a1, 0x18($a3) /* 3537C0 E00404C0 ACE2001C */ sw $v0, 0x1C($a3) /* 3537C4 E00404C4 ACE60020 */ sw $a2, 0x20($a3) /* 3537C8 E00404C8 006B1821 */ addu $v1, $v1, $t3 /* 3537CC E00404CC ACE30024 */ sw $v1, 0x24($a3) /* 3537D0 E00404D0 8502000E */ lh $v0, 0xE($t0) /* 3537D4 E00404D4 24E30018 */ addiu $v1, $a3, 0x18 /* 3537D8 E00404D8 44821000 */ mtc1 $v0, $f2 /* 3537DC E00404DC 00000000 */ nop /* 3537E0 E00404E0 468010A0 */ cvt.s.w $f2, $f2 /* 3537E4 E00404E4 46041082 */ mul.s $f2, $f2, $f4 /* 3537E8 E00404E8 00000000 */ nop /* 3537EC E00404EC AE830000 */ sw $v1, 0x0($s4) /* 3537F0 E00404F0 85020010 */ lh $v0, 0x10($t0) /* 3537F4 E00404F4 24E30020 */ addiu $v1, $a3, 0x20 /* 3537F8 E00404F8 44820000 */ mtc1 $v0, $f0 /* 3537FC E00404FC 00000000 */ nop /* 353800 E0040500 46800020 */ cvt.s.w $f0, $f0 /* 353804 E0040504 46040002 */ mul.s $f0, $f0, $f4 /* 353808 E0040508 00000000 */ nop /* 35380C E004050C AE830000 */ sw $v1, 0x0($s4) /* 353810 E0040510 4600118D */ trunc.w.s $f6, $f2 /* 353814 E0040514 44023000 */ mfc1 $v0, $f6 /* 353818 E0040518 00000000 */ nop /* 35381C E004051C 30420FFF */ andi $v0, $v0, 0xFFF /* 353820 E0040520 00021300 */ sll $v0, $v0, 12 /* 353824 E0040524 4600018D */ trunc.w.s $f6, $f0 /* 353828 E0040528 44033000 */ mfc1 $v1, $f6 /* 35382C E004052C 00000000 */ nop /* 353830 E0040530 30630FFF */ andi $v1, $v1, 0xFFF /* 353834 E0040534 00641825 */ or $v1, $v1, $a0 /* 353838 E0040538 00431025 */ or $v0, $v0, $v1 /* 35383C E004053C ACE20028 */ sw $v0, 0x28($a3) /* 353840 E0040540 8503000E */ lh $v1, 0xE($t0) /* 353844 E0040544 8504000A */ lh $a0, 0xA($t0) /* 353848 E0040548 24E20028 */ addiu $v0, $a3, 0x28 /* 35384C E004054C AE820000 */ sw $v0, 0x0($s4) /* 353850 E0040550 85020010 */ lh $v0, 0x10($t0) /* 353854 E0040554 00641821 */ addu $v1, $v1, $a0 /* 353858 E0040558 44831000 */ mtc1 $v1, $f2 /* 35385C E004055C 00000000 */ nop /* 353860 E0040560 468010A0 */ cvt.s.w $f2, $f2 /* 353864 E0040564 46041082 */ mul.s $f2, $f2, $f4 /* 353868 E0040568 00000000 */ nop /* 35386C E004056C 8503000C */ lh $v1, 0xC($t0) /* 353870 E0040570 24E40030 */ addiu $a0, $a3, 0x30 /* 353874 E0040574 00431021 */ addu $v0, $v0, $v1 /* 353878 E0040578 44820000 */ mtc1 $v0, $f0 /* 35387C E004057C 00000000 */ nop /* 353880 E0040580 46800020 */ cvt.s.w $f0, $f0 /* 353884 E0040584 46040002 */ mul.s $f0, $f0, $f4 /* 353888 E0040588 00000000 */ nop /* 35388C E004058C AE840000 */ sw $a0, 0x0($s4) /* 353890 E0040590 4600118D */ trunc.w.s $f6, $f2 /* 353894 E0040594 44023000 */ mfc1 $v0, $f6 /* 353898 E0040598 00000000 */ nop /* 35389C E004059C 30420FFF */ andi $v0, $v0, 0xFFF /* 3538A0 E00405A0 00021300 */ sll $v0, $v0, 12 /* 3538A4 E00405A4 4600018D */ trunc.w.s $f6, $f0 /* 3538A8 E00405A8 44033000 */ mfc1 $v1, $f6 /* 3538AC E00405AC 00000000 */ nop /* 3538B0 E00405B0 30630FFF */ andi $v1, $v1, 0xFFF /* 3538B4 E00405B4 00431025 */ or $v0, $v0, $v1 /* 3538B8 E00405B8 ACE2002C */ sw $v0, 0x2C($a3) .LE00405BC: /* 3538BC E00405BC 3C13DE00 */ lui $s3, (0xDE000000 >> 16) /* 3538C0 E00405C0 3C02E004 */ lui $v0, %hi(D_E0040840) /* 3538C4 E00405C4 24420840 */ addiu $v0, $v0, %lo(D_E0040840) /* 3538C8 E00405C8 000C3100 */ sll $a2, $t4, 4 /* 3538CC E00405CC 8E850000 */ lw $a1, 0x0($s4) /* 3538D0 E00405D0 00C23021 */ addu $a2, $a2, $v0 /* 3538D4 E00405D4 00A0202D */ daddu $a0, $a1, $zero /* 3538D8 E00405D8 24A50008 */ addiu $a1, $a1, 0x8 /* 3538DC E00405DC AE850000 */ sw $a1, 0x0($s4) /* 3538E0 E00405E0 AC930000 */ sw $s3, 0x0($a0) /* 3538E4 E00405E4 8CC3000C */ lw $v1, 0xC($a2) /* 3538E8 E00405E8 24A20008 */ addiu $v0, $a1, 0x8 /* 3538EC E00405EC AE820000 */ sw $v0, 0x0($s4) /* 3538F0 E00405F0 3C02EB00 */ lui $v0, (0xEB000000 >> 16) /* 3538F4 E00405F4 AC830004 */ sw $v1, 0x4($a0) /* 3538F8 E00405F8 ACA20000 */ sw $v0, 0x0($a1) /* 3538FC E00405FC 90C30003 */ lbu $v1, 0x3($a2) /* 353900 E0040600 90C40000 */ lbu $a0, 0x0($a2) /* 353904 E0040604 24A20010 */ addiu $v0, $a1, 0x10 /* 353908 E0040608 AE820000 */ sw $v0, 0x0($s4) /* 35390C E004060C 3C02EA00 */ lui $v0, (0xEA000000 >> 16) /* 353910 E0040610 ACA20008 */ sw $v0, 0x8($a1) /* 353914 E0040614 00031A00 */ sll $v1, $v1, 8 /* 353918 E0040618 00641825 */ or $v1, $v1, $a0 /* 35391C E004061C ACA30004 */ sw $v1, 0x4($a1) /* 353920 E0040620 90C40003 */ lbu $a0, 0x3($a2) /* 353924 E0040624 90C30001 */ lbu $v1, 0x1($a2) /* 353928 E0040628 90C70002 */ lbu $a3, 0x2($a2) /* 35392C E004062C 24A20018 */ addiu $v0, $a1, 0x18 /* 353930 E0040630 AE820000 */ sw $v0, 0x0($s4) /* 353934 E0040634 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 353938 E0040638 ACA20010 */ sw $v0, 0x10($a1) /* 35393C E004063C 00041600 */ sll $v0, $a0, 24 /* 353940 E0040640 00031C00 */ sll $v1, $v1, 16 /* 353944 E0040644 00431025 */ or $v0, $v0, $v1 /* 353948 E0040648 00042200 */ sll $a0, $a0, 8 /* 35394C E004064C 00441025 */ or $v0, $v0, $a0 /* 353950 E0040650 00471025 */ or $v0, $v0, $a3 /* 353954 E0040654 ACA2000C */ sw $v0, 0xC($a1) /* 353958 E0040658 90C40007 */ lbu $a0, 0x7($a2) /* 35395C E004065C 24A20020 */ addiu $v0, $a1, 0x20 /* 353960 E0040660 AE820000 */ sw $v0, 0x0($s4) /* 353964 E0040664 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 353968 E0040668 ACA20018 */ sw $v0, 0x18($a1) /* 35396C E004066C 00041600 */ sll $v0, $a0, 24 /* 353970 E0040670 00041C00 */ sll $v1, $a0, 16 /* 353974 E0040674 00431025 */ or $v0, $v0, $v1 /* 353978 E0040678 00042200 */ sll $a0, $a0, 8 /* 35397C E004067C 00441025 */ or $v0, $v0, $a0 /* 353980 E0040680 ACA20014 */ sw $v0, 0x14($a1) /* 353984 E0040684 90C20004 */ lbu $v0, 0x4($a2) /* 353988 E0040688 90C40005 */ lbu $a0, 0x5($a2) /* 35398C E004068C 90C30006 */ lbu $v1, 0x6($a2) /* 353990 E0040690 00021600 */ sll $v0, $v0, 24 /* 353994 E0040694 00042400 */ sll $a0, $a0, 16 /* 353998 E0040698 00441025 */ or $v0, $v0, $a0 /* 35399C E004069C 00031A00 */ sll $v1, $v1, 8 /* 3539A0 E00406A0 00431025 */ or $v0, $v0, $v1 /* 3539A4 E00406A4 ACA2001C */ sw $v0, 0x1C($a1) /* 3539A8 E00406A8 8E450004 */ lw $a1, 0x4($s2) /* 3539AC E00406AC 8E460008 */ lw $a2, 0x8($s2) /* 3539B0 E00406B0 8E47000C */ lw $a3, 0xC($s2) /* 3539B4 E00406B4 0C080108 */ jal shim_guTranslateF /* 3539B8 E00406B8 27A40018 */ addiu $a0, $sp, 0x18 /* 3539BC E00406BC 27B10058 */ addiu $s1, $sp, 0x58 /* 3539C0 E00406C0 8E030000 */ lw $v1, 0x0($s0) /* 3539C4 E00406C4 44800000 */ mtc1 $zero, $f0 /* 3539C8 E00406C8 00031080 */ sll $v0, $v1, 2 /* 3539CC E00406CC 00431021 */ addu $v0, $v0, $v1 /* 3539D0 E00406D0 00021080 */ sll $v0, $v0, 2 /* 3539D4 E00406D4 00431023 */ subu $v0, $v0, $v1 /* 3539D8 E00406D8 000218C0 */ sll $v1, $v0, 3 /* 3539DC E00406DC 00431021 */ addu $v0, $v0, $v1 /* 3539E0 E00406E0 000210C0 */ sll $v0, $v0, 3 /* 3539E4 E00406E4 00551021 */ addu $v0, $v0, $s5 /* 3539E8 E00406E8 44060000 */ mfc1 $a2, $f0 /* 3539EC E00406EC C440006C */ lwc1 $f0, 0x6C($v0) /* 3539F0 E00406F0 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 3539F4 E00406F4 46000007 */ neg.s $f0, $f0 /* 3539F8 E00406F8 44050000 */ mfc1 $a1, $f0 /* 3539FC E00406FC 0220202D */ daddu $a0, $s1, $zero /* 353A00 E0040700 0C080104 */ jal shim_guRotateF /* 353A04 E0040704 AFA60010 */ sw $a2, 0x10($sp) /* 353A08 E0040708 0220202D */ daddu $a0, $s1, $zero /* 353A0C E004070C 27A50018 */ addiu $a1, $sp, 0x18 /* 353A10 E0040710 27B00098 */ addiu $s0, $sp, 0x98 /* 353A14 E0040714 0C080114 */ jal shim_guMtxCatF /* 353A18 E0040718 0200302D */ daddu $a2, $s0, $zero /* 353A1C E004071C C6420010 */ lwc1 $f2, 0x10($s2) /* 353A20 E0040720 C6400030 */ lwc1 $f0, 0x30($s2) /* 353A24 E0040724 46001002 */ mul.s $f0, $f2, $f0 /* 353A28 E0040728 00000000 */ nop /* 353A2C E004072C 44050000 */ mfc1 $a1, $f0 /* 353A30 E0040730 C640002C */ lwc1 $f0, 0x2C($s2) /* 353A34 E0040734 46001002 */ mul.s $f0, $f2, $f0 /* 353A38 E0040738 00000000 */ nop /* 353A3C E004073C 0220202D */ daddu $a0, $s1, $zero /* 353A40 E0040740 44071000 */ mfc1 $a3, $f2 /* 353A44 E0040744 3C120001 */ lui $s2, (0x11630 >> 16) /* 353A48 E0040748 44060000 */ mfc1 $a2, $f0 /* 353A4C E004074C 0C080110 */ jal shim_guScaleF /* 353A50 E0040750 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 353A54 E0040754 0220202D */ daddu $a0, $s1, $zero /* 353A58 E0040758 0200282D */ daddu $a1, $s0, $zero /* 353A5C E004075C 0C080114 */ jal shim_guMtxCatF /* 353A60 E0040760 0200302D */ daddu $a2, $s0, $zero /* 353A64 E0040764 0200202D */ daddu $a0, $s0, $zero /* 353A68 E0040768 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 353A6C E004076C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 353A70 E0040770 3C11800A */ lui $s1, %hi(gDisplayContext) /* 353A74 E0040774 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 353A78 E0040778 96050000 */ lhu $a1, 0x0($s0) /* 353A7C E004077C 8E220000 */ lw $v0, 0x0($s1) /* 353A80 E0040780 00052980 */ sll $a1, $a1, 6 /* 353A84 E0040784 00B22821 */ addu $a1, $a1, $s2 /* 353A88 E0040788 0C080118 */ jal shim_guMtxF2L /* 353A8C E004078C 00452821 */ addu $a1, $v0, $a1 /* 353A90 E0040790 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 353A94 E0040794 8E840000 */ lw $a0, 0x0($s4) /* 353A98 E0040798 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 353A9C E004079C 0080282D */ daddu $a1, $a0, $zero /* 353AA0 E00407A0 24840008 */ addiu $a0, $a0, 0x8 /* 353AA4 E00407A4 AE840000 */ sw $a0, 0x0($s4) /* 353AA8 E00407A8 96020000 */ lhu $v0, 0x0($s0) /* 353AAC E00407AC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 353AB0 E00407B0 ACA30000 */ sw $v1, 0x0($a1) /* 353AB4 E00407B4 24430001 */ addiu $v1, $v0, 0x1 /* 353AB8 E00407B8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 353ABC E00407BC 00021180 */ sll $v0, $v0, 6 /* 353AC0 E00407C0 A6030000 */ sh $v1, 0x0($s0) /* 353AC4 E00407C4 8E230000 */ lw $v1, 0x0($s1) /* 353AC8 E00407C8 00521021 */ addu $v0, $v0, $s2 /* 353ACC E00407CC 00621821 */ addu $v1, $v1, $v0 /* 353AD0 E00407D0 24820008 */ addiu $v0, $a0, 0x8 /* 353AD4 E00407D4 ACA30004 */ sw $v1, 0x4($a1) /* 353AD8 E00407D8 AE820000 */ sw $v0, 0x0($s4) /* 353ADC E00407DC 3C020900 */ lui $v0, %hi(D_090008F8_415958) /* 353AE0 E00407E0 244208F8 */ addiu $v0, $v0, %lo(D_090008F8_415958) /* 353AE4 E00407E4 AC820004 */ sw $v0, 0x4($a0) /* 353AE8 E00407E8 24820010 */ addiu $v0, $a0, 0x10 /* 353AEC E00407EC AC930000 */ sw $s3, 0x0($a0) /* 353AF0 E00407F0 AE820000 */ sw $v0, 0x0($s4) /* 353AF4 E00407F4 24020040 */ addiu $v0, $zero, 0x40 /* 353AF8 E00407F8 AC82000C */ sw $v0, 0xC($a0) /* 353AFC E00407FC 24820018 */ addiu $v0, $a0, 0x18 /* 353B00 E0040800 AC860008 */ sw $a2, 0x8($a0) /* 353B04 E0040804 AE820000 */ sw $v0, 0x0($s4) /* 353B08 E0040808 AC960010 */ sw $s6, 0x10($a0) /* 353B0C E004080C AC800014 */ sw $zero, 0x14($a0) /* 353B10 E0040810 8FBF00F4 */ lw $ra, 0xF4($sp) /* 353B14 E0040814 8FB600F0 */ lw $s6, 0xF0($sp) /* 353B18 E0040818 8FB500EC */ lw $s5, 0xEC($sp) /* 353B1C E004081C 8FB400E8 */ lw $s4, 0xE8($sp) /* 353B20 E0040820 8FB300E4 */ lw $s3, 0xE4($sp) /* 353B24 E0040824 8FB200E0 */ lw $s2, 0xE0($sp) /* 353B28 E0040828 8FB100DC */ lw $s1, 0xDC($sp) /* 353B2C E004082C 8FB000D8 */ lw $s0, 0xD8($sp) /* 353B30 E0040830 03E00008 */ jr $ra /* 353B34 E0040834 27BD00F8 */ addiu $sp, $sp, 0xF8 /* 353B38 E0040838 00000000 */ nop /* 353B3C E004083C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void flame_appendGfx(void* effect) { FlameFXData* data = ((EffectInstance*)effect)->data.flame; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_00 = data->unk_00; s32 uls = data->unk_1C * 4.0f; s32 ult = data->unk_24 * 4.0f; UnkStruct* unkStruct; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); if (D_E0040880 != gGameStatusPtr->frameCounter) { D_E0040880 = gGameStatusPtr->frameCounter; gSPDisplayList(gMainGfxPos++, D_09000918_3544C8); gDPSetTileSize(gMainGfxPos++, 1, uls, ult, uls + 128, ult + 256); gSPDisplayList(gMainGfxPos++, D_090009E0_354590); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr)); gDPSetScissorFrac(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX * 4.0f, camera->viewportStartY * 4.0f, (camera->viewportStartX + camera->viewportW) * 4.0f, (camera->viewportStartY + camera->viewportH) * 4.0f); } unkStruct = &D_E0040840[unk_00]; gSPDisplayList(gMainGfxPos++, unkStruct->unk_0C); gDPSetKeyR(gMainGfxPos++, unkStruct->unk_03, unkStruct->unk_00, 0); gDPSetKeyGB(gMainGfxPos++, unkStruct->unk_03, unkStruct->unk_01, 0, unkStruct->unk_03, unkStruct->unk_02, 0); gDPSetPrimColor(gMainGfxPos++, 0, 0, unkStruct->unk_07, unkStruct->unk_07, unkStruct->unk_07, 0); gDPSetEnvColor(gMainGfxPos++, unkStruct->unk_04, unkStruct->unk_05, unkStruct->unk_06, 0); shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp98); shim_guScaleF(sp58, data->unk_10 * data->unk_30, data->unk_10 * data->unk_2C, data->unk_10); shim_guMtxCatF(sp58, sp98, sp98); shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090008F8_3544A8); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel RunPartTo /* 1A958C 8027ACAC 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 1A9590 8027ACB0 AFB40028 */ sw $s4, 0x28($sp) /* 1A9594 8027ACB4 0080A02D */ daddu $s4, $a0, $zero /* 1A9598 8027ACB8 AFBF002C */ sw $ra, 0x2C($sp) /* 1A959C 8027ACBC AFB30024 */ sw $s3, 0x24($sp) /* 1A95A0 8027ACC0 AFB20020 */ sw $s2, 0x20($sp) /* 1A95A4 8027ACC4 AFB1001C */ sw $s1, 0x1C($sp) /* 1A95A8 8027ACC8 AFB00018 */ sw $s0, 0x18($sp) /* 1A95AC 8027ACCC F7BA0048 */ sdc1 $f26, 0x48($sp) /* 1A95B0 8027ACD0 F7B80040 */ sdc1 $f24, 0x40($sp) /* 1A95B4 8027ACD4 F7B60038 */ sdc1 $f22, 0x38($sp) /* 1A95B8 8027ACD8 F7B40030 */ sdc1 $f20, 0x30($sp) /* 1A95BC 8027ACDC 8E91000C */ lw $s1, 0xC($s4) /* 1A95C0 8027ACE0 54A00001 */ bnel $a1, $zero, .L8027ACE8 /* 1A95C4 8027ACE4 AE800070 */ sw $zero, 0x70($s4) .L8027ACE8: /* 1A95C8 8027ACE8 8E820070 */ lw $v0, 0x70($s4) /* 1A95CC 8027ACEC 1440006F */ bnez $v0, .L8027AEAC /* 1A95D0 8027ACF0 00000000 */ nop /* 1A95D4 8027ACF4 8E250000 */ lw $a1, 0x0($s1) /* 1A95D8 8027ACF8 26310004 */ addiu $s1, $s1, 0x4 /* 1A95DC 8027ACFC 0C0B1EAF */ jal evt_get_variable /* 1A95E0 8027AD00 0280202D */ daddu $a0, $s4, $zero /* 1A95E4 8027AD04 0040802D */ daddu $s0, $v0, $zero /* 1A95E8 8027AD08 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A95EC 8027AD0C 16020002 */ bne $s0, $v0, .L8027AD18 /* 1A95F0 8027AD10 00000000 */ nop /* 1A95F4 8027AD14 8E900148 */ lw $s0, 0x148($s4) .L8027AD18: /* 1A95F8 8027AD18 8E250000 */ lw $a1, 0x0($s1) /* 1A95FC 8027AD1C 26310004 */ addiu $s1, $s1, 0x4 /* 1A9600 8027AD20 0C0B1EAF */ jal evt_get_variable /* 1A9604 8027AD24 0280202D */ daddu $a0, $s4, $zero /* 1A9608 8027AD28 0200202D */ daddu $a0, $s0, $zero /* 1A960C 8027AD2C 0C09A75B */ jal get_actor /* 1A9610 8027AD30 0040802D */ daddu $s0, $v0, $zero /* 1A9614 8027AD34 0040982D */ daddu $s3, $v0, $zero /* 1A9618 8027AD38 0260202D */ daddu $a0, $s3, $zero /* 1A961C 8027AD3C 0C099117 */ jal get_actor_part /* 1A9620 8027AD40 0200282D */ daddu $a1, $s0, $zero /* 1A9624 8027AD44 0040902D */ daddu $s2, $v0, $zero /* 1A9628 8027AD48 AE930074 */ sw $s3, 0x74($s4) /* 1A962C 8027AD4C AE920078 */ sw $s2, 0x78($s4) /* 1A9630 8027AD50 8E250000 */ lw $a1, 0x0($s1) /* 1A9634 8027AD54 26310004 */ addiu $s1, $s1, 0x4 /* 1A9638 8027AD58 8E500010 */ lw $s0, 0x10($s2) /* 1A963C 8027AD5C 0C0B1EAF */ jal evt_get_variable /* 1A9640 8027AD60 0280202D */ daddu $a0, $s4, $zero /* 1A9644 8027AD64 4482D000 */ mtc1 $v0, $f26 /* 1A9648 8027AD68 00000000 */ nop /* 1A964C 8027AD6C 4680D6A0 */ cvt.s.w $f26, $f26 /* 1A9650 8027AD70 8E250000 */ lw $a1, 0x0($s1) /* 1A9654 8027AD74 26310004 */ addiu $s1, $s1, 0x4 /* 1A9658 8027AD78 0C0B1EAF */ jal evt_get_variable /* 1A965C 8027AD7C 0280202D */ daddu $a0, $s4, $zero /* 1A9660 8027AD80 8E250000 */ lw $a1, 0x0($s1) /* 1A9664 8027AD84 26310004 */ addiu $s1, $s1, 0x4 /* 1A9668 8027AD88 4482A000 */ mtc1 $v0, $f20 /* 1A966C 8027AD8C 00000000 */ nop /* 1A9670 8027AD90 4680A520 */ cvt.s.w $f20, $f20 /* 1A9674 8027AD94 0C0B1EAF */ jal evt_get_variable /* 1A9678 8027AD98 0280202D */ daddu $a0, $s4, $zero /* 1A967C 8027AD9C 44820000 */ mtc1 $v0, $f0 /* 1A9680 8027ADA0 00000000 */ nop /* 1A9684 8027ADA4 46800020 */ cvt.s.w $f0, $f0 /* 1A9688 8027ADA8 E61A000C */ swc1 $f26, 0xC($s0) /* 1A968C 8027ADAC E6140010 */ swc1 $f20, 0x10($s0) /* 1A9690 8027ADB0 E6000014 */ swc1 $f0, 0x14($s0) /* 1A9694 8027ADB4 8E250000 */ lw $a1, 0x0($s1) /* 1A9698 8027ADB8 0C0B1EAF */ jal evt_get_variable /* 1A969C 8027ADBC 0280202D */ daddu $a0, $s4, $zero /* 1A96A0 8027ADC0 A6020038 */ sh $v0, 0x38($s0) /* 1A96A4 8027ADC4 C640002C */ lwc1 $f0, 0x2C($s2) /* 1A96A8 8027ADC8 C616000C */ lwc1 $f22, 0xC($s0) /* 1A96AC 8027ADCC C6180014 */ lwc1 $f24, 0x14($s0) /* 1A96B0 8027ADD0 E6000000 */ swc1 $f0, 0x0($s0) /* 1A96B4 8027ADD4 46000686 */ mov.s $f26, $f0 /* 1A96B8 8027ADD8 4406B000 */ mfc1 $a2, $f22 /* 1A96BC 8027ADDC C6400030 */ lwc1 $f0, 0x30($s2) /* 1A96C0 8027ADE0 4600D306 */ mov.s $f12, $f26 /* 1A96C4 8027ADE4 E6000004 */ swc1 $f0, 0x4($s0) /* 1A96C8 8027ADE8 C6540034 */ lwc1 $f20, 0x34($s2) /* 1A96CC 8027ADEC 4407C000 */ mfc1 $a3, $f24 /* 1A96D0 8027ADF0 4600A386 */ mov.s $f14, $f20 /* 1A96D4 8027ADF4 0C00A720 */ jal atan2 /* 1A96D8 8027ADF8 E6140008 */ swc1 $f20, 0x8($s0) /* 1A96DC 8027ADFC 4600D306 */ mov.s $f12, $f26 /* 1A96E0 8027AE00 4406B000 */ mfc1 $a2, $f22 /* 1A96E4 8027AE04 4407C000 */ mfc1 $a3, $f24 /* 1A96E8 8027AE08 4600A386 */ mov.s $f14, $f20 /* 1A96EC 8027AE0C 0C00A7B5 */ jal dist2D /* 1A96F0 8027AE10 E6000030 */ swc1 $f0, 0x30($s0) /* 1A96F4 8027AE14 86020038 */ lh $v0, 0x38($s0) /* 1A96F8 8027AE18 46000086 */ mov.s $f2, $f0 /* 1A96FC 8027AE1C 14400007 */ bnez $v0, .L8027AE3C /* 1A9700 8027AE20 E6020034 */ swc1 $f2, 0x34($s0) /* 1A9704 8027AE24 C6000028 */ lwc1 $f0, 0x28($s0) /* 1A9708 8027AE28 46001003 */ div.s $f0, $f2, $f0 /* 1A970C 8027AE2C 4600010D */ trunc.w.s $f4, $f0 /* 1A9710 8027AE30 44022000 */ mfc1 $v0, $f4 /* 1A9714 8027AE34 0809EB94 */ j .L8027AE50 /* 1A9718 8027AE38 A6020038 */ sh $v0, 0x38($s0) .L8027AE3C: /* 1A971C 8027AE3C 44820000 */ mtc1 $v0, $f0 /* 1A9720 8027AE40 00000000 */ nop /* 1A9724 8027AE44 46800020 */ cvt.s.w $f0, $f0 /* 1A9728 8027AE48 46001003 */ div.s $f0, $f2, $f0 /* 1A972C 8027AE4C E6000028 */ swc1 $f0, 0x28($s0) .L8027AE50: /* 1A9730 8027AE50 864200BC */ lh $v0, 0xBC($s2) /* 1A9734 8027AE54 04420002 */ bltzl $v0, .L8027AE60 /* 1A9738 8027AE58 00021027 */ nor $v0, $zero, $v0 /* 1A973C 8027AE5C 24420001 */ addiu $v0, $v0, 0x1 .L8027AE60: /* 1A9740 8027AE60 44820000 */ mtc1 $v0, $f0 /* 1A9744 8027AE64 00000000 */ nop /* 1A9748 8027AE68 46800020 */ cvt.s.w $f0, $f0 /* 1A974C 8027AE6C E6000034 */ swc1 $f0, 0x34($s0) /* 1A9750 8027AE70 8E4200A4 */ lw $v0, 0xA4($s2) /* 1A9754 8027AE74 1040000C */ beqz $v0, .L8027AEA8 /* 1A9758 8027AE78 24020001 */ addiu $v0, $zero, 0x1 /* 1A975C 8027AE7C 8E4200A8 */ lw $v0, 0xA8($s2) /* 1A9760 8027AE80 14400009 */ bnez $v0, .L8027AEA8 /* 1A9764 8027AE84 24020001 */ addiu $v0, $zero, 0x1 /* 1A9768 8027AE88 C6400034 */ lwc1 $f0, 0x34($s2) /* 1A976C 8027AE8C E7A00010 */ swc1 $f0, 0x10($sp) /* 1A9770 8027AE90 8E4400A4 */ lw $a0, 0xA4($s2) /* 1A9774 8027AE94 8E46002C */ lw $a2, 0x2C($s2) /* 1A9778 8027AE98 8E470030 */ lw $a3, 0x30($s2) /* 1A977C 8027AE9C 0C052757 */ jal sfx_play_sound_at_position /* 1A9780 8027AEA0 0000282D */ daddu $a1, $zero, $zero /* 1A9784 8027AEA4 24020001 */ addiu $v0, $zero, 0x1 .L8027AEA8: /* 1A9788 8027AEA8 AE820070 */ sw $v0, 0x70($s4) .L8027AEAC: /* 1A978C 8027AEAC 8E920078 */ lw $s2, 0x78($s4) /* 1A9790 8027AEB0 8E500010 */ lw $s0, 0x10($s2) /* 1A9794 8027AEB4 8E930074 */ lw $s3, 0x74($s4) /* 1A9798 8027AEB8 8E050028 */ lw $a1, 0x28($s0) /* 1A979C 8027AEBC 8E060030 */ lw $a2, 0x30($s0) /* 1A97A0 8027AEC0 0C099070 */ jal add_xz_vec3f_copy1 /* 1A97A4 8027AEC4 0200202D */ daddu $a0, $s0, $zero /* 1A97A8 8027AEC8 C6020028 */ lwc1 $f2, 0x28($s0) /* 1A97AC 8027AECC 3C014080 */ lui $at, (0x40800000 >> 16) /* 1A97B0 8027AED0 44810000 */ mtc1 $at, $f0 /* 1A97B4 8027AED4 00000000 */ nop /* 1A97B8 8027AED8 4600103C */ c.lt.s $f2, $f0 /* 1A97BC 8027AEDC 00000000 */ nop /* 1A97C0 8027AEE0 45000007 */ bc1f .L8027AF00 /* 1A97C4 8027AEE4 0000202D */ daddu $a0, $zero, $zero /* 1A97C8 8027AEE8 C6000030 */ lwc1 $f0, 0x30($s0) /* 1A97CC 8027AEEC E7A00010 */ swc1 $f0, 0x10($sp) /* 1A97D0 8027AEF0 8E050000 */ lw $a1, 0x0($s0) /* 1A97D4 8027AEF4 8E060004 */ lw $a2, 0x4($s0) /* 1A97D8 8027AEF8 0809EBC6 */ j .L8027AF18 /* 1A97DC 8027AEFC 8E070008 */ lw $a3, 0x8($s0) .L8027AF00: /* 1A97E0 8027AF00 C6000030 */ lwc1 $f0, 0x30($s0) /* 1A97E4 8027AF04 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A97E8 8027AF08 8E050000 */ lw $a1, 0x0($s0) /* 1A97EC 8027AF0C 8E060004 */ lw $a2, 0x4($s0) /* 1A97F0 8027AF10 8E070008 */ lw $a3, 0x8($s0) /* 1A97F4 8027AF14 24040001 */ addiu $a0, $zero, 0x1 .L8027AF18: /* 1A97F8 8027AF18 0C0990BC */ jal play_movement_dust_effects /* 1A97FC 8027AF1C 00000000 */ nop /* 1A9800 8027AF20 C6000000 */ lwc1 $f0, 0x0($s0) /* 1A9804 8027AF24 8E4200A4 */ lw $v0, 0xA4($s2) /* 1A9808 8027AF28 E640002C */ swc1 $f0, 0x2C($s2) /* 1A980C 8027AF2C C6000004 */ lwc1 $f0, 0x4($s0) /* 1A9810 8027AF30 E6400030 */ swc1 $f0, 0x30($s2) /* 1A9814 8027AF34 C6000008 */ lwc1 $f0, 0x8($s0) /* 1A9818 8027AF38 1040004A */ beqz $v0, .L8027B064 /* 1A981C 8027AF3C E6400034 */ swc1 $f0, 0x34($s2) /* 1A9820 8027AF40 8E4200A8 */ lw $v0, 0xA8($s2) /* 1A9824 8027AF44 10400047 */ beqz $v0, .L8027B064 /* 1A9828 8027AF48 00000000 */ nop /* 1A982C 8027AF4C 864200BC */ lh $v0, 0xBC($s2) /* 1A9830 8027AF50 0440001C */ bltz $v0, .L8027AFC4 /* 1A9834 8027AF54 00000000 */ nop /* 1A9838 8027AF58 C6020034 */ lwc1 $f2, 0x34($s0) /* 1A983C 8027AF5C C6000028 */ lwc1 $f0, 0x28($s0) /* 1A9840 8027AF60 46001080 */ add.s $f2, $f2, $f0 /* 1A9844 8027AF64 E6020034 */ swc1 $f2, 0x34($s0) /* 1A9848 8027AF68 864200BC */ lh $v0, 0xBC($s2) /* 1A984C 8027AF6C 44820000 */ mtc1 $v0, $f0 /* 1A9850 8027AF70 00000000 */ nop /* 1A9854 8027AF74 46800020 */ cvt.s.w $f0, $f0 /* 1A9858 8027AF78 4602003C */ c.lt.s $f0, $f2 /* 1A985C 8027AF7C 00000000 */ nop /* 1A9860 8027AF80 45000038 */ bc1f .L8027B064 /* 1A9864 8027AF84 00000000 */ nop /* 1A9868 8027AF88 92620135 */ lbu $v0, 0x135($s3) /* 1A986C 8027AF8C 24420001 */ addiu $v0, $v0, 0x1 /* 1A9870 8027AF90 A2620135 */ sb $v0, 0x135($s3) /* 1A9874 8027AF94 AE000034 */ sw $zero, 0x34($s0) /* 1A9878 8027AF98 92620135 */ lbu $v0, 0x135($s3) /* 1A987C 8027AF9C 30420001 */ andi $v0, $v0, 0x1 /* 1A9880 8027AFA0 10400026 */ beqz $v0, .L8027B03C /* 1A9884 8027AFA4 00000000 */ nop /* 1A9888 8027AFA8 8E4200A4 */ lw $v0, 0xA4($s2) /* 1A988C 8027AFAC 1040002D */ beqz $v0, .L8027B064 /* 1A9890 8027AFB0 00000000 */ nop /* 1A9894 8027AFB4 C6400034 */ lwc1 $f0, 0x34($s2) /* 1A9898 8027AFB8 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A989C 8027AFBC 0809EC15 */ j .L8027B054 /* 1A98A0 8027AFC0 8E4400A4 */ lw $a0, 0xA4($s2) .L8027AFC4: /* 1A98A4 8027AFC4 C6020034 */ lwc1 $f2, 0x34($s0) /* 1A98A8 8027AFC8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1A98AC 8027AFCC 44810000 */ mtc1 $at, $f0 /* 1A98B0 8027AFD0 00000000 */ nop /* 1A98B4 8027AFD4 46001080 */ add.s $f2, $f2, $f0 /* 1A98B8 8027AFD8 E6020034 */ swc1 $f2, 0x34($s0) /* 1A98BC 8027AFDC 864200BC */ lh $v0, 0xBC($s2) /* 1A98C0 8027AFE0 00021023 */ negu $v0, $v0 /* 1A98C4 8027AFE4 44820000 */ mtc1 $v0, $f0 /* 1A98C8 8027AFE8 00000000 */ nop /* 1A98CC 8027AFEC 46800020 */ cvt.s.w $f0, $f0 /* 1A98D0 8027AFF0 4602003E */ c.le.s $f0, $f2 /* 1A98D4 8027AFF4 00000000 */ nop /* 1A98D8 8027AFF8 4500001A */ bc1f .L8027B064 /* 1A98DC 8027AFFC 00000000 */ nop /* 1A98E0 8027B000 92620135 */ lbu $v0, 0x135($s3) /* 1A98E4 8027B004 24420001 */ addiu $v0, $v0, 0x1 /* 1A98E8 8027B008 A2620135 */ sb $v0, 0x135($s3) /* 1A98EC 8027B00C AE000034 */ sw $zero, 0x34($s0) /* 1A98F0 8027B010 92620135 */ lbu $v0, 0x135($s3) /* 1A98F4 8027B014 30420001 */ andi $v0, $v0, 0x1 /* 1A98F8 8027B018 10400008 */ beqz $v0, .L8027B03C /* 1A98FC 8027B01C 00000000 */ nop /* 1A9900 8027B020 8E4200A4 */ lw $v0, 0xA4($s2) /* 1A9904 8027B024 1040000F */ beqz $v0, .L8027B064 /* 1A9908 8027B028 00000000 */ nop /* 1A990C 8027B02C C6400034 */ lwc1 $f0, 0x34($s2) /* 1A9910 8027B030 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A9914 8027B034 0809EC15 */ j .L8027B054 /* 1A9918 8027B038 8E4400A4 */ lw $a0, 0xA4($s2) .L8027B03C: /* 1A991C 8027B03C 8E4200A8 */ lw $v0, 0xA8($s2) /* 1A9920 8027B040 10400008 */ beqz $v0, .L8027B064 /* 1A9924 8027B044 00000000 */ nop /* 1A9928 8027B048 C6400034 */ lwc1 $f0, 0x34($s2) /* 1A992C 8027B04C E7A00010 */ swc1 $f0, 0x10($sp) /* 1A9930 8027B050 8E4400A8 */ lw $a0, 0xA8($s2) .L8027B054: /* 1A9934 8027B054 8E46002C */ lw $a2, 0x2C($s2) /* 1A9938 8027B058 8E470030 */ lw $a3, 0x30($s2) /* 1A993C 8027B05C 0C052757 */ jal sfx_play_sound_at_position /* 1A9940 8027B060 0000282D */ daddu $a1, $zero, $zero .L8027B064: /* 1A9944 8027B064 96020038 */ lhu $v0, 0x38($s0) /* 1A9948 8027B068 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A994C 8027B06C A6020038 */ sh $v0, 0x38($s0) /* 1A9950 8027B070 00021400 */ sll $v0, $v0, 16 /* 1A9954 8027B074 1C40000D */ bgtz $v0, .L8027B0AC /* 1A9958 8027B078 0000102D */ daddu $v0, $zero, $zero /* 1A995C 8027B07C C600000C */ lwc1 $f0, 0xC($s0) /* 1A9960 8027B080 8E4400A4 */ lw $a0, 0xA4($s2) /* 1A9964 8027B084 E640002C */ swc1 $f0, 0x2C($s2) /* 1A9968 8027B088 C6000014 */ lwc1 $f0, 0x14($s0) /* 1A996C 8027B08C 10800006 */ beqz $a0, .L8027B0A8 /* 1A9970 8027B090 E6400034 */ swc1 $f0, 0x34($s2) /* 1A9974 8027B094 8E4200A8 */ lw $v0, 0xA8($s2) /* 1A9978 8027B098 14400004 */ bnez $v0, .L8027B0AC /* 1A997C 8027B09C 24020001 */ addiu $v0, $zero, 0x1 /* 1A9980 8027B0A0 0C0154F0 */ jal snd_stop_sound /* 1A9984 8027B0A4 00000000 */ nop .L8027B0A8: /* 1A9988 8027B0A8 24020001 */ addiu $v0, $zero, 0x1 .L8027B0AC: /* 1A998C 8027B0AC 8FBF002C */ lw $ra, 0x2C($sp) /* 1A9990 8027B0B0 8FB40028 */ lw $s4, 0x28($sp) /* 1A9994 8027B0B4 8FB30024 */ lw $s3, 0x24($sp) /* 1A9998 8027B0B8 8FB20020 */ lw $s2, 0x20($sp) /* 1A999C 8027B0BC 8FB1001C */ lw $s1, 0x1C($sp) /* 1A99A0 8027B0C0 8FB00018 */ lw $s0, 0x18($sp) /* 1A99A4 8027B0C4 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 1A99A8 8027B0C8 D7B80040 */ ldc1 $f24, 0x40($sp) /* 1A99AC 8027B0CC D7B60038 */ ldc1 $f22, 0x38($sp) /* 1A99B0 8027B0D0 D7B40030 */ ldc1 $f20, 0x30($sp) /* 1A99B4 8027B0D4 03E00008 */ jr $ra /* 1A99B8 8027B0D8 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: ApiStatus RunPartTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorPart* part; ActorPartMovement* movement; s32 actorID, partID; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; f32 deltaDist; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { 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; movement = part->movement; posX = evt_get_variable(script, *args++); posY = evt_get_variable(script, *args++); posZ = evt_get_variable(script, *args++); movement->goalPos.x = posX; movement->goalPos.y = posY; movement->goalPos.z = posZ; movement->moveTime = evt_get_variable(script, *args++); goalX = movement->goalPos.x; goalY = movement->goalPos.y; goalZ = movement->goalPos.z; movement->absolutePosition.x = part->absolutePosition.x; movement->absolutePosition.y = part->absolutePosition.y; movement->absolutePosition.z = part->absolutePosition.z; posX = movement->absolutePosition.x; posY = movement->absolutePosition.y; posZ = movement->absolutePosition.z; movement->angle = atan2(posX, posZ, goalX, goalZ); movement->distance = dist2D(posX, posZ, goalX, goalZ); if (movement->moveTime == 0) { movement->moveTime = movement->distance / movement->moveSpeed; } else { movement->moveSpeed = movement->distance / movement->moveTime; } if (part->actorTypeData2b[0] >= 0) { movement->distance = part->actorTypeData2b[0] + 1; } else { movement->distance = ~part->actorTypeData2b[0]; } if (part->partTypeData[0] != 0 && part->partTypeData[1] == 0) { sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } script->functionTemp[0] = 1; } part = script->functionTempPtr[2]; movement = part->movement; actor = script->functionTempPtr[1]; add_xz_vec3f_copy1(&movement->absolutePosition, movement->moveSpeed, movement->angle); if (movement->moveSpeed < 4.0f) { play_movement_dust_effects(0, movement->absolutePosition.x, movement->absolutePosition.y, movement->absolutePosition.z, movement->angle); } else { play_movement_dust_effects(1, movement->absolutePosition.x, movement->absolutePosition.y, movement->absolutePosition.z, movement->angle); } part->absolutePosition.x = movement->absolutePosition.x; part->absolutePosition.y = movement->absolutePosition.y; part->absolutePosition.z = movement->absolutePosition.z; if (part->partTypeData[0] != 0 && part->partTypeData[1] != 0) { if (part->actorTypeData2b[0] >= 0) { movement->distance += movement->moveSpeed; if (part->actorTypeData2b[0] < movement->distance) { actor->footStepCounter++; movement->distance = 0; if (actor->footStepCounter % 2 != 0) { if (part->partTypeData[0] != 0) { sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } else { if (part->partTypeData[1] != 0) { sfx_play_sound_at_position(part->partTypeData[1], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } } } else { movement->distance += 1.0f; if (-part->actorTypeData2b[0] <= movement->distance) { actor->footStepCounter++; movement->distance = 0; if (actor->footStepCounter % 2 != 0) { if (part->partTypeData[0] != 0) { sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } else { if (part->partTypeData[1] != 0) { sfx_play_sound_at_position(part->partTypeData[1], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } } } } } movement->moveTime--; if (movement->moveTime > 0) { return ApiStatus_BLOCK; } else { part->absolutePosition.x = movement->goalPos.x; part->absolutePosition.z = movement->goalPos.z; if (part->partTypeData[0] != 0 && part->partTypeData[1] == 0) { snd_stop_sound(part->partTypeData[0]); } return ApiStatus_DONE1; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel osPfsChecker /* 48020 8006CC20 27BDFB60 */ addiu $sp, $sp, -0x4A0 /* 48024 8006CC24 AFB1047C */ sw $s1, 0x47C($sp) /* 48028 8006CC28 00808821 */ addu $s1, $a0, $zero /* 4802C 8006CC2C AFBE0498 */ sw $fp, 0x498($sp) /* 48030 8006CC30 0000F021 */ addu $fp, $zero, $zero /* 48034 8006CC34 AFB60490 */ sw $s6, 0x490($sp) /* 48038 8006CC38 241600FE */ addiu $s6, $zero, 0xFE /* 4803C 8006CC3C AFBF049C */ sw $ra, 0x49C($sp) /* 48040 8006CC40 AFB70494 */ sw $s7, 0x494($sp) /* 48044 8006CC44 AFB5048C */ sw $s5, 0x48C($sp) /* 48048 8006CC48 AFB40488 */ sw $s4, 0x488($sp) /* 4804C 8006CC4C AFB30484 */ sw $s3, 0x484($sp) /* 48050 8006CC50 AFB20480 */ sw $s2, 0x480($sp) /* 48054 8006CC54 0C01A775 */ jal __osCheckId /* 48058 8006CC58 AFB00478 */ sw $s0, 0x478($sp) /* 4805C 8006CC5C 00408021 */ addu $s0, $v0, $zero /* 48060 8006CC60 24020002 */ addiu $v0, $zero, 0x2 /* 48064 8006CC64 16020004 */ bne $s0, $v0, .L8006CC78 /* 48068 8006CC68 00000000 */ nop /* 4806C 8006CC6C 0C01A702 */ jal __osGetId /* 48070 8006CC70 02202021 */ addu $a0, $s1, $zero /* 48074 8006CC74 00408021 */ addu $s0, $v0, $zero .L8006CC78: /* 48078 8006CC78 12000003 */ beqz $s0, .L8006CC88 /* 4807C 8006CC7C 02202021 */ addu $a0, $s1, $zero .L8006CC80: /* 48080 8006CC80 0801B414 */ j .L8006D050 /* 48084 8006CC84 02001021 */ addu $v0, $s0, $zero .L8006CC88: /* 48088 8006CC88 0C01B420 */ jal corrupted_init /* 4808C 8006CC8C 27A50258 */ addiu $a1, $sp, 0x258 /* 48090 8006CC90 00408021 */ addu $s0, $v0, $zero /* 48094 8006CC94 160000EE */ bnez $s0, .L8006D050 /* 48098 8006CC98 00000000 */ nop /* 4809C 8006CC9C 8E220050 */ lw $v0, 0x50($s1) /* 480A0 8006CCA0 0202102A */ slt $v0, $s0, $v0 /* 480A4 8006CCA4 1040006B */ beqz $v0, .L8006CE54 /* 480A8 8006CCA8 00009021 */ addu $s2, $zero, $zero /* 480AC 8006CCAC 27B70018 */ addiu $s7, $sp, 0x18 .L8006CCB0: /* 480B0 8006CCB0 8E240004 */ lw $a0, 0x4($s1) /* 480B4 8006CCB4 8E26005C */ lw $a2, 0x5C($s1) /* 480B8 8006CCB8 8E250008 */ lw $a1, 0x8($s1) /* 480BC 8006CCBC 27A70218 */ addiu $a3, $sp, 0x218 /* 480C0 8006CCC0 00D23021 */ addu $a2, $a2, $s2 /* 480C4 8006CCC4 0C01A874 */ jal __osContRamRead /* 480C8 8006CCC8 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 480CC 8006CCCC 00408021 */ addu $s0, $v0, $zero /* 480D0 8006CCD0 160000DF */ bnez $s0, .L8006D050 /* 480D4 8006CCD4 02001021 */ addu $v0, $s0, $zero /* 480D8 8006CCD8 97A2021C */ lhu $v0, 0x21C($sp) /* 480DC 8006CCDC 14400006 */ bnez $v0, .L8006CCF8 /* 480E0 8006CCE0 00000000 */ nop /* 480E4 8006CCE4 8FA20218 */ lw $v0, 0x218($sp) /* 480E8 8006CCE8 10400055 */ beqz $v0, .L8006CE40 /* 480EC 8006CCEC 2405FFFF */ addiu $a1, $zero, -0x1 /* 480F0 8006CCF0 0801B374 */ j .L8006CDD0 /* 480F4 8006CCF4 00000000 */ nop .L8006CCF8: /* 480F8 8006CCF8 8FA20218 */ lw $v0, 0x218($sp) /* 480FC 8006CCFC 14400003 */ bnez $v0, .L8006CD0C /* 48100 8006CD00 00002821 */ addu $a1, $zero, $zero /* 48104 8006CD04 0801B374 */ j .L8006CDD0 /* 48108 8006CD08 2405FFFF */ addiu $a1, $zero, -0x1 .L8006CD0C: /* 4810C 8006CD0C 97B4021E */ lhu $s4, 0x21E($sp) /* 48110 8006CD10 0000A821 */ addu $s5, $zero, $zero /* 48114 8006CD14 8E220060 */ lw $v0, 0x60($s1) /* 48118 8006CD18 0801B36C */ j .L8006CDB0 /* 4811C 8006CD1C 241300FF */ addiu $s3, $zero, 0xFF .L8006CD20: /* 48120 8006CD20 0002182B */ sltu $v1, $zero, $v0 /* 48124 8006CD24 2C420080 */ sltiu $v0, $v0, 0x80 /* 48128 8006CD28 00621824 */ and $v1, $v1, $v0 /* 4812C 8006CD2C 10600028 */ beqz $v1, .L8006CDD0 /* 48130 8006CD30 00041A02 */ srl $v1, $a0, 8 /* 48134 8006CD34 326200FF */ andi $v0, $s3, 0xFF /* 48138 8006CD38 306700FF */ andi $a3, $v1, 0xFF /* 4813C 8006CD3C 1047000F */ beq $v0, $a3, .L8006CD7C /* 48140 8006CD40 32C200FF */ andi $v0, $s6, 0xFF /* 48144 8006CD44 10470007 */ beq $v0, $a3, .L8006CD64 /* 48148 8006CD48 00609821 */ addu $s3, $v1, $zero /* 4814C 8006CD4C 02202021 */ addu $a0, $s1, $zero /* 48150 8006CD50 27A50118 */ addiu $a1, $sp, 0x118 /* 48154 8006CD54 0C01A7A3 */ jal __osPfsRWInode /* 48158 8006CD58 00003021 */ addu $a2, $zero, $zero /* 4815C 8006CD5C 00408021 */ addu $s0, $v0, $zero /* 48160 8006CD60 0260B021 */ addu $s6, $s3, $zero .L8006CD64: /* 48164 8006CD64 0010182B */ sltu $v1, $zero, $s0 /* 48168 8006CD68 3A020003 */ xori $v0, $s0, 0x3 /* 4816C 8006CD6C 0002102B */ sltu $v0, $zero, $v0 /* 48170 8006CD70 00621824 */ and $v1, $v1, $v0 /* 48174 8006CD74 146000B6 */ bnez $v1, .L8006D050 /* 48178 8006CD78 02001021 */ addu $v0, $s0, $zero .L8006CD7C: /* 4817C 8006CD7C 02202021 */ addu $a0, $s1, $zero /* 48180 8006CD80 02802821 */ addu $a1, $s4, $zero /* 48184 8006CD84 27A60258 */ addiu $a2, $sp, 0x258 /* 48188 8006CD88 0C01B476 */ jal corrupted /* 4818C 8006CD8C 00052C00 */ sll $a1, $a1, 16 /* 48190 8006CD90 00552823 */ subu $a1, $v0, $s5 /* 48194 8006CD94 14A00014 */ bnez $a1, .L8006CDE8 /* 48198 8006CD98 328200FF */ andi $v0, $s4, 0xFF /* 4819C 8006CD9C 00021040 */ sll $v0, $v0, 1 /* 481A0 8006CDA0 00571021 */ addu $v0, $v0, $s7 /* 481A4 8006CDA4 94540100 */ lhu $s4, 0x100($v0) /* 481A8 8006CDA8 8E220060 */ lw $v0, 0x60($s1) /* 481AC 8006CDAC 24150001 */ addiu $s5, $zero, 0x1 .L8006CDB0: /* 481B0 8006CDB0 3284FFFF */ andi $a0, $s4, 0xFFFF /* 481B4 8006CDB4 0082102A */ slt $v0, $a0, $v0 /* 481B8 8006CDB8 14400005 */ bnez $v0, .L8006CDD0 /* 481BC 8006CDBC 00041202 */ srl $v0, $a0, 8 /* 481C0 8006CDC0 92230064 */ lbu $v1, 0x64($s1) /* 481C4 8006CDC4 0043102B */ sltu $v0, $v0, $v1 /* 481C8 8006CDC8 1440FFD5 */ bnez $v0, .L8006CD20 /* 481CC 8006CDCC 328200FF */ andi $v0, $s4, 0xFF .L8006CDD0: /* 481D0 8006CDD0 54A00006 */ bnel $a1, $zero, .L8006CDEC /* 481D4 8006CDD4 27A40218 */ addiu $a0, $sp, 0x218 /* 481D8 8006CDD8 3283FFFF */ andi $v1, $s4, 0xFFFF /* 481DC 8006CDDC 24020001 */ addiu $v0, $zero, 0x1 /* 481E0 8006CDE0 10620017 */ beq $v1, $v0, .L8006CE40 /* 481E4 8006CDE4 00000000 */ nop .L8006CDE8: /* 481E8 8006CDE8 27A40218 */ addiu $a0, $sp, 0x218 .L8006CDEC: /* 481EC 8006CDEC 0C01925C */ jal bzero /* 481F0 8006CDF0 24050020 */ addiu $a1, $zero, 0x20 /* 481F4 8006CDF4 92220065 */ lbu $v0, 0x65($s1) /* 481F8 8006CDF8 10400006 */ beqz $v0, .L8006CE14 /* 481FC 8006CDFC 02202021 */ addu $a0, $s1, $zero /* 48200 8006CE00 0C01A5B4 */ jal __osPfsSelectBank /* 48204 8006CE04 00002821 */ addu $a1, $zero, $zero /* 48208 8006CE08 00408021 */ addu $s0, $v0, $zero /* 4820C 8006CE0C 16000090 */ bnez $s0, .L8006D050 /* 48210 8006CE10 02001021 */ addu $v0, $s0, $zero .L8006CE14: /* 48214 8006CE14 8E26005C */ lw $a2, 0x5C($s1) /* 48218 8006CE18 AFA00010 */ sw $zero, 0x10($sp) /* 4821C 8006CE1C 8E240004 */ lw $a0, 0x4($s1) /* 48220 8006CE20 8E250008 */ lw $a1, 0x8($s1) /* 48224 8006CE24 27A70218 */ addiu $a3, $sp, 0x218 /* 48228 8006CE28 00D23021 */ addu $a2, $a2, $s2 /* 4822C 8006CE2C 0C01A8F0 */ jal osContRamWrite /* 48230 8006CE30 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 48234 8006CE34 00408021 */ addu $s0, $v0, $zero /* 48238 8006CE38 1600FF91 */ bnez $s0, .L8006CC80 /* 4823C 8006CE3C 27DE0001 */ addiu $fp, $fp, 0x1 .L8006CE40: /* 48240 8006CE40 8E220050 */ lw $v0, 0x50($s1) /* 48244 8006CE44 26520001 */ addiu $s2, $s2, 0x1 /* 48248 8006CE48 0242102A */ slt $v0, $s2, $v0 /* 4824C 8006CE4C 1440FF98 */ bnez $v0, .L8006CCB0 /* 48250 8006CE50 00000000 */ nop .L8006CE54: /* 48254 8006CE54 8E220050 */ lw $v0, 0x50($s1) /* 48258 8006CE58 1840001D */ blez $v0, .L8006CED0 /* 4825C 8006CE5C 00009021 */ addu $s2, $zero, $zero /* 48260 8006CE60 27B30238 */ addiu $s3, $sp, 0x238 .L8006CE64: /* 48264 8006CE64 8E240004 */ lw $a0, 0x4($s1) /* 48268 8006CE68 8E26005C */ lw $a2, 0x5C($s1) /* 4826C 8006CE6C 8E250008 */ lw $a1, 0x8($s1) /* 48270 8006CE70 27A70218 */ addiu $a3, $sp, 0x218 /* 48274 8006CE74 00D23021 */ addu $a2, $a2, $s2 /* 48278 8006CE78 0C01A874 */ jal __osContRamRead /* 4827C 8006CE7C 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 48280 8006CE80 00408021 */ addu $s0, $v0, $zero /* 48284 8006CE84 16000072 */ bnez $s0, .L8006D050 /* 48288 8006CE88 02001021 */ addu $v0, $s0, $zero /* 4828C 8006CE8C 97A2021C */ lhu $v0, 0x21C($sp) /* 48290 8006CE90 5040000A */ beql $v0, $zero, .L8006CEBC /* 48294 8006CE94 A6600000 */ sh $zero, 0x0($s3) /* 48298 8006CE98 8FA20218 */ lw $v0, 0x218($sp) /* 4829C 8006CE9C 50400007 */ beql $v0, $zero, .L8006CEBC /* 482A0 8006CEA0 A6600000 */ sh $zero, 0x0($s3) /* 482A4 8006CEA4 97A3021E */ lhu $v1, 0x21E($sp) /* 482A8 8006CEA8 96220062 */ lhu $v0, 0x62($s1) /* 482AC 8006CEAC 0062102B */ sltu $v0, $v1, $v0 /* 482B0 8006CEB0 54400002 */ bnel $v0, $zero, .L8006CEBC /* 482B4 8006CEB4 A6600000 */ sh $zero, 0x0($s3) /* 482B8 8006CEB8 A6630000 */ sh $v1, 0x0($s3) .L8006CEBC: /* 482BC 8006CEBC 8E220050 */ lw $v0, 0x50($s1) /* 482C0 8006CEC0 26520001 */ addiu $s2, $s2, 0x1 /* 482C4 8006CEC4 0242102A */ slt $v0, $s2, $v0 /* 482C8 8006CEC8 1440FFE6 */ bnez $v0, .L8006CE64 /* 482CC 8006CECC 26730002 */ addiu $s3, $s3, 0x2 .L8006CED0: /* 482D0 8006CED0 92220064 */ lbu $v0, 0x64($s1) /* 482D4 8006CED4 10400055 */ beqz $v0, .L8006D02C /* 482D8 8006CED8 00009821 */ addu $s3, $zero, $zero /* 482DC 8006CEDC 27B40018 */ addiu $s4, $sp, 0x18 /* 482E0 8006CEE0 27B60118 */ addiu $s6, $sp, 0x118 /* 482E4 8006CEE4 27B50238 */ addiu $s5, $sp, 0x238 /* 482E8 8006CEE8 02202021 */ addu $a0, $s1, $zero .L8006CEEC: /* 482EC 8006CEEC 27A50118 */ addiu $a1, $sp, 0x118 /* 482F0 8006CEF0 00003021 */ addu $a2, $zero, $zero /* 482F4 8006CEF4 327200FF */ andi $s2, $s3, 0xFF /* 482F8 8006CEF8 0C01A7A3 */ jal __osPfsRWInode /* 482FC 8006CEFC 02403821 */ addu $a3, $s2, $zero /* 48300 8006CF00 00408021 */ addu $s0, $v0, $zero /* 48304 8006CF04 0010182B */ sltu $v1, $zero, $s0 /* 48308 8006CF08 3A020003 */ xori $v0, $s0, 0x3 /* 4830C 8006CF0C 0002102B */ sltu $v0, $zero, $v0 /* 48310 8006CF10 00621824 */ and $v1, $v1, $v0 /* 48314 8006CF14 5460004E */ bnel $v1, $zero, .L8006D050 /* 48318 8006CF18 02001021 */ addu $v0, $s0, $zero /* 4831C 8006CF1C 16400002 */ bnez $s2, .L8006CF28 /* 48320 8006CF20 24050001 */ addiu $a1, $zero, 0x1 /* 48324 8006CF24 8E250060 */ lw $a1, 0x60($s1) .L8006CF28: /* 48328 8006CF28 18A0000A */ blez $a1, .L8006CF54 /* 4832C 8006CF2C 00009021 */ addu $s2, $zero, $zero /* 48330 8006CF30 02802021 */ addu $a0, $s4, $zero /* 48334 8006CF34 02C01821 */ addu $v1, $s6, $zero .L8006CF38: /* 48338 8006CF38 94620000 */ lhu $v0, 0x0($v1) /* 4833C 8006CF3C 24630002 */ addiu $v1, $v1, 0x2 /* 48340 8006CF40 26520001 */ addiu $s2, $s2, 0x1 /* 48344 8006CF44 A4820000 */ sh $v0, 0x0($a0) /* 48348 8006CF48 0245102A */ slt $v0, $s2, $a1 /* 4834C 8006CF4C 1440FFFA */ bnez $v0, .L8006CF38 /* 48350 8006CF50 24840002 */ addiu $a0, $a0, 0x2 .L8006CF54: /* 48354 8006CF54 2A420080 */ slti $v0, $s2, 0x80 /* 48358 8006CF58 10400008 */ beqz $v0, .L8006CF7C /* 4835C 8006CF5C 00121040 */ sll $v0, $s2, 1 /* 48360 8006CF60 24040003 */ addiu $a0, $zero, 0x3 /* 48364 8006CF64 00541821 */ addu $v1, $v0, $s4 .L8006CF68: /* 48368 8006CF68 A4640000 */ sh $a0, 0x0($v1) /* 4836C 8006CF6C 26520001 */ addiu $s2, $s2, 0x1 /* 48370 8006CF70 2A420080 */ slti $v0, $s2, 0x80 /* 48374 8006CF74 1440FFFC */ bnez $v0, .L8006CF68 /* 48378 8006CF78 24630002 */ addiu $v1, $v1, 0x2 .L8006CF7C: /* 4837C 8006CF7C 8E220050 */ lw $v0, 0x50($s1) /* 48380 8006CF80 1840001D */ blez $v0, .L8006CFF8 /* 48384 8006CF84 00009021 */ addu $s2, $zero, $zero /* 48388 8006CF88 326800FF */ andi $t0, $s3, 0xFF /* 4838C 8006CF8C 00003021 */ addu $a2, $zero, $zero /* 48390 8006CF90 02A03821 */ addu $a3, $s5, $zero .L8006CF94: /* 48394 8006CF94 90E20000 */ lbu $v0, 0x0($a3) /* 48398 8006CF98 14480011 */ bne $v0, $t0, .L8006CFE0 /* 4839C 8006CF9C 02A02821 */ addu $a1, $s5, $zero .L8006CFA0: /* 483A0 8006CFA0 00A62021 */ addu $a0, $a1, $a2 /* 483A4 8006CFA4 94830000 */ lhu $v1, 0x0($a0) /* 483A8 8006CFA8 96220062 */ lhu $v0, 0x62($s1) /* 483AC 8006CFAC 0062182B */ sltu $v1, $v1, $v0 /* 483B0 8006CFB0 5460000C */ bnel $v1, $zero, .L8006CFE4 /* 483B4 8006CFB4 24C60002 */ addiu $a2, $a2, 0x2 /* 483B8 8006CFB8 90820001 */ lbu $v0, 0x1($a0) /* 483BC 8006CFBC 00021040 */ sll $v0, $v0, 1 /* 483C0 8006CFC0 00541021 */ addu $v0, $v0, $s4 /* 483C4 8006CFC4 94430100 */ lhu $v1, 0x100($v0) /* 483C8 8006CFC8 A4430000 */ sh $v1, 0x0($v0) /* 483CC 8006CFCC 00D41021 */ addu $v0, $a2, $s4 /* 483D0 8006CFD0 A4430220 */ sh $v1, 0x220($v0) /* 483D4 8006CFD4 90820000 */ lbu $v0, 0x0($a0) /* 483D8 8006CFD8 1048FFF1 */ beq $v0, $t0, .L8006CFA0 /* 483DC 8006CFDC 00000000 */ nop .L8006CFE0: /* 483E0 8006CFE0 24C60002 */ addiu $a2, $a2, 0x2 .L8006CFE4: /* 483E4 8006CFE4 8E220050 */ lw $v0, 0x50($s1) /* 483E8 8006CFE8 26520001 */ addiu $s2, $s2, 0x1 /* 483EC 8006CFEC 0242102A */ slt $v0, $s2, $v0 /* 483F0 8006CFF0 1440FFE8 */ bnez $v0, .L8006CF94 /* 483F4 8006CFF4 24E70002 */ addiu $a3, $a3, 0x2 .L8006CFF8: /* 483F8 8006CFF8 02202021 */ addu $a0, $s1, $zero /* 483FC 8006CFFC 27A50018 */ addiu $a1, $sp, 0x18 /* 48400 8006D000 24060001 */ addiu $a2, $zero, 0x1 /* 48404 8006D004 0C01A7A3 */ jal __osPfsRWInode /* 48408 8006D008 326700FF */ andi $a3, $s3, 0xFF /* 4840C 8006D00C 00408021 */ addu $s0, $v0, $zero /* 48410 8006D010 1600FF1B */ bnez $s0, .L8006CC80 /* 48414 8006D014 26730001 */ addiu $s3, $s3, 0x1 /* 48418 8006D018 92230064 */ lbu $v1, 0x64($s1) /* 4841C 8006D01C 326200FF */ andi $v0, $s3, 0xFF /* 48420 8006D020 0043102B */ sltu $v0, $v0, $v1 /* 48424 8006D024 1440FFB1 */ bnez $v0, .L8006CEEC /* 48428 8006D028 02202021 */ addu $a0, $s1, $zero .L8006D02C: /* 4842C 8006D02C 13C00004 */ beqz $fp, .L8006D040 /* 48430 8006D030 2403FFFD */ addiu $v1, $zero, -0x3 /* 48434 8006D034 8E220000 */ lw $v0, 0x0($s1) /* 48438 8006D038 0801B412 */ j .L8006D048 /* 4843C 8006D03C 34420002 */ ori $v0, $v0, 0x2 .L8006D040: /* 48440 8006D040 8E220000 */ lw $v0, 0x0($s1) /* 48444 8006D044 00431024 */ and $v0, $v0, $v1 .L8006D048: /* 48448 8006D048 AE220000 */ sw $v0, 0x0($s1) /* 4844C 8006D04C 00001021 */ addu $v0, $zero, $zero .L8006D050: /* 48450 8006D050 8FBF049C */ lw $ra, 0x49C($sp) /* 48454 8006D054 8FBE0498 */ lw $fp, 0x498($sp) /* 48458 8006D058 8FB70494 */ lw $s7, 0x494($sp) /* 4845C 8006D05C 8FB60490 */ lw $s6, 0x490($sp) /* 48460 8006D060 8FB5048C */ lw $s5, 0x48C($sp) /* 48464 8006D064 8FB40488 */ lw $s4, 0x488($sp) /* 48468 8006D068 8FB30484 */ lw $s3, 0x484($sp) /* 4846C 8006D06C 8FB20480 */ lw $s2, 0x480($sp) /* 48470 8006D070 8FB1047C */ lw $s1, 0x47C($sp) /* 48474 8006D074 8FB00478 */ lw $s0, 0x478($sp) /* 48478 8006D078 03E00008 */ jr $ra /* 4847C 8006D07C 27BD04A0 */ addiu $sp, $sp, 0x4A0 ### DECOMPILED C INSTRUCTIONS: s32 osPfsChecker(OSPfs* pfs) { s32 j; s32 ret; __OSInodeUnit next; __OSInode checkedInode; __OSInode tempInode; __OSDir tempDir; __OSInodeUnit nextNodeInFile[16]; __OSInodeCache cache; s32 fixed = 0; u8 bank, prevBank = 254; s32 cc, cl; s32 offset; ret = __osCheckId(pfs); if (ret == PFS_ERR_NEW_PACK) { ret = __osGetId(pfs); } if (ret) { return ret; } if ((ret = corrupted_init(pfs, &cache)) != 0) { return ret; } for (j = 0; j < pfs->dir_size; j++) { if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir)) != 0) { return ret; } if ((tempDir.company_code != 0) || (tempDir.game_code != 0)) { if ((tempDir.company_code == 0) || (tempDir.game_code == 0)) { cc = -1; } else { next = tempDir.start_page; cl = cc = 0; bank = 255; while (CHECK_IPAGE(next)) { if (bank != next.inode_t.bank) { bank = next.inode_t.bank; if (prevBank != bank) { ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank); prevBank = bank; } if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) { return ret; } } if ((cc = corrupted(pfs, next, &cache) - cl) != 0) { break; } cl = 1; next = tempInode.inode_page[next.inode_t.page]; } } if ((cc != 0) || (next.ipage != PFS_EOF)) { bzero(&tempDir, sizeof(__OSDir)); if (pfs->activebank != 0) { if ((ret = __osPfsSelectBank(pfs, 0)) != 0) { return ret; } } if ((ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir, 0)) != 0) { return ret; } fixed++; } } } for (j = 0; j < pfs->dir_size; j++) { if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir)) != 0) { return ret; } if ((tempDir.company_code != 0) && (tempDir.game_code != 0) && (tempDir.start_page.ipage >= (u16)pfs->inode_start_page)) { // cast required nextNodeInFile[j].ipage = tempDir.start_page.ipage; } else { nextNodeInFile[j].ipage = 0; } } for (bank = 0; bank < pfs->banks; bank++) { ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank); if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) { return (ret); } offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inode_start_page); for (j = 0; j < offset; j++) { checkedInode.inode_page[j].ipage = tempInode.inode_page[j].ipage; } for (; j < PFS_INODE_SIZE_PER_PAGE; j++) { checkedInode.inode_page[j].ipage = PFS_PAGE_NOT_USED; } for (j = 0; j < pfs->dir_size; j++) { while (nextNodeInFile[j].inode_t.bank == bank && nextNodeInFile[j].ipage >= (u16)pfs->inode_start_page) { // cast required u8 val; val = nextNodeInFile[j].inode_t.page; nextNodeInFile[j] = checkedInode.inode_page[val] = tempInode.inode_page[val]; } } if ((ret = __osPfsRWInode(pfs, &checkedInode, PFS_WRITE, bank)) != 0) { return ret; } } if (fixed != 0) { pfs->status |= PFS_CORRUPTED; } else { pfs->status &= ~PFS_CORRUPTED; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802B62A4 /* E25174 802B62A4 27BDFF88 */ addiu $sp, $sp, -0x78 .L802B62A8: /* E25178 802B62A8 AFBF0048 */ sw $ra, 0x48($sp) /* E2517C 802B62AC AFB30044 */ sw $s3, 0x44($sp) jtbl_802B62B0: /* E25180 802B62B0 AFB20040 */ sw $s2, 0x40($sp) .L802B62B4: /* E25184 802B62B4 AFB1003C */ sw $s1, 0x3C($sp) glabel .L802B62B8 /* E25188 802B62B8 AFB00038 */ sw $s0, 0x38($sp) /* E2518C 802B62BC F7BC0070 */ sdc1 $f28, 0x70($sp) /* E25190 802B62C0 F7BA0068 */ sdc1 $f26, 0x68($sp) /* E25194 802B62C4 F7B80060 */ sdc1 $f24, 0x60($sp) .L802B62C8: /* E25198 802B62C8 F7B60058 */ sdc1 $f22, 0x58($sp) glabel action_update_peach_land /* E2519C 802B62CC 0C0394D2 */ jal func_800E5348 Munchlesia_LaunchVelocity: /* E251A0 802B62D0 F7B40050 */ sdc1 $f20, 0x50($sp) Munchlesia_LateralVelocity: /* E251A4 802B62D4 3C128011 */ lui $s2, %hi(gPlayerStatus) Munchlesia_LaunchAccel: /* E251A8 802B62D8 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) Munchlesia_LaunchYaw: /* E251AC 802B62DC 8E4400A4 */ lw $a0, 0xA4($s2) D_802B62E0: /* E251B0 802B62E0 0C0AD800 */ jal parasol_get_npc .L802B62E4: /* E251B4 802B62E4 46000586 */ mov.s $f22, $f0 /* E251B8 802B62E8 10400030 */ beqz $v0, .L802B63AC /* E251BC 802B62EC 27A50020 */ addiu $a1, $sp, 0x20 /* E251C0 802B62F0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* E251C4 802B62F4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) glabel func_802B62F8 /* E251C8 802B62F8 3C0142B4 */ lui $at, (0x42B40000 >> 16) .L802B62FC: /* E251CC 802B62FC 4481A000 */ mtc1 $at, $f20 D_802B6300: /* E251D0 802B6300 00031080 */ sll $v0, $v1, 2 /* E251D4 802B6304 00431021 */ addu $v0, $v0, $v1 .L802B6308: /* E251D8 802B6308 00021080 */ sll $v0, $v0, 2 .L802B630C: /* E251DC 802B630C 00431023 */ subu $v0, $v0, $v1 .L802B6310: /* E251E0 802B6310 000218C0 */ sll $v1, $v0, 3 /* E251E4 802B6314 00431021 */ addu $v0, $v0, $v1 /* E251E8 802B6318 000210C0 */ sll $v0, $v0, 3 glabel .L802B631C /* E251EC 802B631C 4614B000 */ add.s $f0, $f22, $f20 .L802B6320: /* E251F0 802B6320 3C01800B */ lui $at, %hi(gCameras + 0x6C) glabel .L802B6324 /* E251F4 802B6324 00220821 */ addu $at, $at, $v0 .L802B6328: /* E251F8 802B6328 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) glabel .L802B632C /* E251FC 802B632C 0C00A6C9 */ jal clamp_angle .L802B6330: /* E25200 802B6330 460C0301 */ sub.s $f12, $f0, $f12 /* E25204 802B6334 46000086 */ mov.s $f2, $f0 .L802B6338: /* E25208 802B6338 4602A03E */ c.le.s $f20, $f2 /* E2520C 802B633C 00000000 */ nop .L802B6340: /* E25210 802B6340 45000015 */ bc1f .L802B6398 /* E25214 802B6344 00000000 */ nop glabel func_802B6348 /* E25218 802B6348 3C014387 */ lui $at, (0x43870000 >> 16) /* E2521C 802B634C 44810000 */ mtc1 $at, $f0 PlayerTweesterPhysicsPtr: /* E25220 802B6350 00000000 */ nop glabel .L802B6354 /* E25224 802B6354 4600103C */ c.lt.s $f2, $f0 /* E25228 802B6358 00000000 */ nop .L802B635C: /* E2522C 802B635C 4500000E */ bc1f .L802B6398 D_802B6360: /* E25230 802B6360 00000000 */ nop .L802B6364: /* E25234 802B6364 3C01C1F0 */ lui $at, (0xC1F00000 >> 16) /* E25238 802B6368 44810000 */ mtc1 $at, $f0 .L802B636C: /* E2523C 802B636C 080AD8EA */ j .L802B63A8 glabel .L802B6370 /* E25240 802B6370 4600B580 */ add.s $f22, $f22, $f0 .L802B6374: /* E25244 802B6374 3C02802B */ lui $v0, %hi(HammerHit) /* E25248 802B6378 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) glabel .L802B637C /* E2524C 802B637C C7A00028 */ lwc1 $f0, 0x28($sp) /* E25250 802B6380 C7A2002C */ lwc1 $f2, 0x2C($sp) /* E25254 802B6384 C7A40030 */ lwc1 $f4, 0x30($sp) /* E25258 802B6388 E4400000 */ swc1 $f0, 0x0($v0) /* E2525C 802B638C E4420004 */ swc1 $f2, 0x4($v0) /* E25260 802B6390 080AD919 */ j .L802B6464 glabel .L802B6394 /* E25264 802B6394 E4440008 */ swc1 $f4, 0x8($v0) .L802B6398: /* E25268 802B6398 3C0141F0 */ lui $at, (0x41F00000 >> 16) .L802B639C: /* E2526C 802B639C 44810000 */ mtc1 $at, $f0 /* E25270 802B63A0 00000000 */ nop /* E25274 802B63A4 4600B580 */ add.s $f22, $f22, $f0 .L802B63A8: /* E25278 802B63A8 27A50020 */ addiu $a1, $sp, 0x20 .L802B63AC: /* E2527C 802B63AC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) glabel .L802B63B0 /* E25280 802B63B0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* E25284 802B63B4 44816000 */ mtc1 $at, $f12 /* E25288 802B63B8 27A60024 */ addiu $a2, $sp, 0x24 /* E2528C 802B63BC 460CB302 */ mul.s $f12, $f22, $f12 .L802B63C0: /* E25290 802B63C0 00000000 */ nop .L802B63C4: /* E25294 802B63C4 24100001 */ addiu $s0, $zero, 0x1 .L802B63C8: /* E25298 802B63C8 27B30030 */ addiu $s3, $sp, 0x30 .L802B63CC: /* E2529C 802B63CC 3C0143B4 */ lui $at, (0x43B40000 >> 16) .L802B63D0: /* E252A0 802B63D0 44810000 */ mtc1 $at, $f0 glabel action_update_first_strike /* E252A4 802B63D4 3C014080 */ lui $at, (0x40800000 >> 16) .L802B63D8: /* E252A8 802B63D8 4481A000 */ mtc1 $at, $f20 glabel .L802B63DC /* E252AC 802B63DC 0C00A82D */ jal sin_cos_rad .L802B63E0: /* E252B0 802B63E0 46006303 */ div.s $f12, $f12, $f0 .L802B63E4: /* E252B4 802B63E4 C65C0028 */ lwc1 $f28, 0x28($s2) /* E252B8 802B63E8 C65A002C */ lwc1 $f26, 0x2C($s2) /* E252BC 802B63EC C6580030 */ lwc1 $f24, 0x30($s2) .L802B63F0: /* E252C0 802B63F0 C7A00020 */ lwc1 $f0, 0x20($sp) .L802B63F4: /* E252C4 802B63F4 44901000 */ mtc1 $s0, $f2 /* E252C8 802B63F8 00000000 */ nop /* E252CC 802B63FC 468010A0 */ cvt.s.w $f2, $f2 .L802B6400: /* E252D0 802B6400 46020002 */ mul.s $f0, $f0, $f2 /* E252D4 802B6404 00000000 */ nop /* E252D8 802B6408 C7A40024 */ lwc1 $f4, 0x24($sp) .L802B640C: /* E252DC 802B640C 46022102 */ mul.s $f4, $f4, $f2 /* E252E0 802B6410 00000000 */ nop .L802B6414: /* E252E4 802B6414 24040003 */ addiu $a0, $zero, 0x3 .L802B6418: /* E252E8 802B6418 0240282D */ daddu $a1, $s2, $zero /* E252EC 802B641C 4600E000 */ add.s $f0, $f28, $f0 .L802B6420: /* E252F0 802B6420 27A60028 */ addiu $a2, $sp, 0x28 .L802B6424: /* E252F4 802B6424 27A7002C */ addiu $a3, $sp, 0x2C .L802B6428: /* E252F8 802B6428 4604C101 */ sub.s $f4, $f24, $f4 .L802B642C: /* E252FC 802B642C E7BA002C */ swc1 $f26, 0x2C($sp) D_802B6430: /* E25300 802B6430 E7A00028 */ swc1 $f0, 0x28($sp) /* E25304 802B6434 E7A40030 */ swc1 $f4, 0x30($sp) /* E25308 802B6438 AFB30010 */ sw $s3, 0x10($sp) /* E2530C 802B643C E7B40014 */ swc1 $f20, 0x14($sp) /* E25310 802B6440 0C037B01 */ jal player_test_lateral_overlap /* E25314 802B6444 E7B60018 */ swc1 $f22, 0x18($sp) .L802B6448: /* E25318 802B6448 0040882D */ daddu $s1, $v0, $zero glabel action_update_peach_step_down_land /* E2531C 802B644C 0621FFC9 */ bgez $s1, .L802B6374 .L802B6450: /* E25320 802B6450 00000000 */ nop .L802B6454: /* E25324 802B6454 26100001 */ addiu $s0, $s0, 0x1 /* E25328 802B6458 2A020010 */ slti $v0, $s0, 0x10 /* E2532C 802B645C 1440FFE4 */ bnez $v0, .L802B63F0 .L802B6460: /* E25330 802B6460 00000000 */ nop .L802B6464: /* E25334 802B6464 2A020010 */ slti $v0, $s0, 0x10 /* E25338 802B6468 14400061 */ bnez $v0, .L802B65F0 glabel .L802B646C /* E2533C 802B646C 00000000 */ nop /* E25340 802B6470 0C0394D2 */ jal func_800E5348 /* E25344 802B6474 00000000 */ nop glabel action_update_raise_arms /* E25348 802B6478 8E4400A4 */ lw $a0, 0xA4($s2) glabel action_update_peach_falling /* E2534C 802B647C 0C0AD800 */ jal parasol_get_npc /* E25350 802B6480 46000586 */ mov.s $f22, $f0 /* E25354 802B6484 14400030 */ bnez $v0, .L802B6548 /* E25358 802B6488 27A50020 */ addiu $a1, $sp, 0x20 .L802B648C: /* E2535C 802B648C 3C038007 */ lui $v1, %hi(gCurrentCameraID) .L802B6490: /* E25360 802B6490 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) .L802B6494: /* E25364 802B6494 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* E25368 802B6498 4481A000 */ mtc1 $at, $f20 /* E2536C 802B649C 00031080 */ sll $v0, $v1, 2 .L802B64A0: /* E25370 802B64A0 00431021 */ addu $v0, $v0, $v1 /* E25374 802B64A4 00021080 */ sll $v0, $v0, 2 glabel .L802B64A8 /* E25378 802B64A8 00431023 */ subu $v0, $v0, $v1 .L802B64AC: /* E2537C 802B64AC 000218C0 */ sll $v1, $v0, 3 /* E25380 802B64B0 00431021 */ addu $v0, $v0, $v1 .L802B64B4: /* E25384 802B64B4 000210C0 */ sll $v0, $v0, 3 /* E25388 802B64B8 4614B000 */ add.s $f0, $f22, $f20 /* E2538C 802B64BC 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* E25390 802B64C0 00220821 */ addu $at, $at, $v0 .L802B64C4: /* E25394 802B64C4 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) /* E25398 802B64C8 0C00A6C9 */ jal clamp_angle .L802B64CC: /* E2539C 802B64CC 460C0301 */ sub.s $f12, $f0, $f12 .L802B64D0: /* E253A0 802B64D0 46000086 */ mov.s $f2, $f0 .L802B64D4: /* E253A4 802B64D4 4602A03E */ c.le.s $f20, $f2 .L802B64D8: /* E253A8 802B64D8 00000000 */ nop glabel .L802B64DC /* E253AC 802B64DC 45000015 */ bc1f .L802B6534 glabel .L802B64E0 /* E253B0 802B64E0 00000000 */ nop /* E253B4 802B64E4 3C014387 */ lui $at, (0x43870000 >> 16) /* E253B8 802B64E8 44810000 */ mtc1 $at, $f0 .L802B64EC: /* E253BC 802B64EC 00000000 */ nop glabel .L802B64F0 /* E253C0 802B64F0 4600103C */ c.lt.s $f2, $f0 /* E253C4 802B64F4 00000000 */ nop .L802B64F8: /* E253C8 802B64F8 4500000E */ bc1f .L802B6534 /* E253CC 802B64FC 00000000 */ nop /* E253D0 802B6500 3C014170 */ lui $at, (0x41700000 >> 16) /* E253D4 802B6504 44810000 */ mtc1 $at, $f0 glabel action_update_pushing_block /* E253D8 802B6508 080AD951 */ j .L802B6544 .L802B650C: /* E253DC 802B650C 4600B580 */ add.s $f22, $f22, $f0 glabel .L802B6510 /* E253E0 802B6510 3C02802B */ lui $v0, %hi(HammerHit) /* E253E4 802B6514 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) /* E253E8 802B6518 C7A00028 */ lwc1 $f0, 0x28($sp) .L802B651C: /* E253EC 802B651C C7A2002C */ lwc1 $f2, 0x2C($sp) .L802B6520: /* E253F0 802B6520 C7A40030 */ lwc1 $f4, 0x30($sp) .L802B6524: /* E253F4 802B6524 E4400000 */ swc1 $f0, 0x0($v0) /* E253F8 802B6528 E4420004 */ swc1 $f2, 0x4($v0) /* E253FC 802B652C 080AD97C */ j .L802B65F0 .L802B6530: /* E25400 802B6530 E4440008 */ swc1 $f4, 0x8($v0) .L802B6534: /* E25404 802B6534 3C01C170 */ lui $at, (0xC1700000 >> 16) /* E25408 802B6538 44810000 */ mtc1 $at, $f0 /* E2540C 802B653C 00000000 */ nop /* E25410 802B6540 4600B580 */ add.s $f22, $f22, $f0 glabel .L802B6544 /* E25414 802B6544 27A50020 */ addiu $a1, $sp, 0x20 glabel .L802B6548 /* E25418 802B6548 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* E2541C 802B654C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) glabel func_802B6550 /* E25420 802B6550 44816000 */ mtc1 $at, $f12 .L802B6554: /* E25424 802B6554 27A60024 */ addiu $a2, $sp, 0x24 /* E25428 802B6558 460CB302 */ mul.s $f12, $f22, $f12 /* E2542C 802B655C 00000000 */ nop /* E25430 802B6560 24100001 */ addiu $s0, $zero, 0x1 /* E25434 802B6564 27B30030 */ addiu $s3, $sp, 0x30 glabel .L802B6568 /* E25438 802B6568 3C0143B4 */ lui $at, (0x43B40000 >> 16) .L802B656C: /* E2543C 802B656C 44810000 */ mtc1 $at, $f0 .L802B6570: /* E25440 802B6570 3C014080 */ lui $at, (0x40800000 >> 16) .L802B6574: /* E25444 802B6574 4481A000 */ mtc1 $at, $f20 /* E25448 802B6578 0C00A82D */ jal sin_cos_rad /* E2544C 802B657C 46006303 */ div.s $f12, $f12, $f0 .L802B6580: /* E25450 802B6580 C7A00020 */ lwc1 $f0, 0x20($sp) /* E25454 802B6584 44901000 */ mtc1 $s0, $f2 /* E25458 802B6588 00000000 */ nop glabel .L802B658C /* E2545C 802B658C 468010A0 */ cvt.s.w $f2, $f2 .L802B6590: /* E25460 802B6590 46020002 */ mul.s $f0, $f0, $f2 glabel .L802B6594 /* E25464 802B6594 00000000 */ nop .L802B6598: /* E25468 802B6598 C7A40024 */ lwc1 $f4, 0x24($sp) .L802B659C: /* E2546C 802B659C 46022102 */ mul.s $f4, $f4, $f2 /* E25470 802B65A0 00000000 */ nop glabel .L802B65A4 /* E25474 802B65A4 24040003 */ addiu $a0, $zero, 0x3 .L802B65A8: /* E25478 802B65A8 0240282D */ daddu $a1, $s2, $zero /* E2547C 802B65AC 4600E000 */ add.s $f0, $f28, $f0 /* E25480 802B65B0 27A60028 */ addiu $a2, $sp, 0x28 glabel .L802B65B4 /* E25484 802B65B4 27A7002C */ addiu $a3, $sp, 0x2C .L802B65B8: /* E25488 802B65B8 4604C101 */ sub.s $f4, $f24, $f4 /* E2548C 802B65BC E7BA002C */ swc1 $f26, 0x2C($sp) glabel .L802B65C0 /* E25490 802B65C0 E7A00028 */ swc1 $f0, 0x28($sp) /* E25494 802B65C4 E7A40030 */ swc1 $f4, 0x30($sp) /* E25498 802B65C8 AFB30010 */ sw $s3, 0x10($sp) glabel .L802B65CC /* E2549C 802B65CC E7B40014 */ swc1 $f20, 0x14($sp) .L802B65D0: /* E254A0 802B65D0 0C037B01 */ jal player_test_lateral_overlap /* E254A4 802B65D4 E7B60018 */ swc1 $f22, 0x18($sp) /* E254A8 802B65D8 0040882D */ daddu $s1, $v0, $zero .L802B65DC: /* E254AC 802B65DC 0621FFCC */ bgez $s1, .L802B6510 .L802B65E0: /* E254B0 802B65E0 26100001 */ addiu $s0, $s0, 0x1 .L802B65E4: /* E254B4 802B65E4 2A020010 */ slti $v0, $s0, 0x10 glabel action_update_walk_peach /* E254B8 802B65E8 1440FFE5 */ bnez $v0, .L802B6580 .L802B65EC: /* E254BC 802B65EC 00000000 */ nop .L802B65F0: /* E254C0 802B65F0 06200020 */ bltz $s1, .L802B6674 /* E254C4 802B65F4 32224000 */ andi $v0, $s1, 0x4000 glabel func_802B65F8_E26D08 /* E254C8 802B65F8 1040001F */ beqz $v0, .L802B6678 /* E254CC 802B65FC 0220102D */ daddu $v0, $s1, $zero /* E254D0 802B6600 3C108011 */ lui $s0, %hi(gPlayerData + 0x1) .L802B6604: /* E254D4 802B6604 8210F291 */ lb $s0, %lo(gPlayerData + 0x1)($s0) /* E254D8 802B6608 0C0441A9 */ jal get_entity_type glabel .L802B660C /* E254DC 802B660C 0220202D */ daddu $a0, $s1, $zero /* E254E0 802B6610 2443FFF9 */ addiu $v1, $v0, -0x7 /* E254E4 802B6614 2C620020 */ sltiu $v0, $v1, 0x20 /* E254E8 802B6618 10400016 */ beqz $v0, .L802B6674 glabel .L802B661C /* E254EC 802B661C 00031080 */ sll $v0, $v1, 2 .L802B6620: /* E254F0 802B6620 3C01802B */ lui $at, %hi(.L802B6E08) /* E254F4 802B6624 00220821 */ addu $at, $at, $v0 .L802B6628: /* E254F8 802B6628 8C226E08 */ lw $v0, %lo(.L802B6E08)($at) /* E254FC 802B662C 00400008 */ jr $v0 .L802B6630: /* E25500 802B6630 00000000 */ nop glabel .L802B6634 /* E25504 802B6634 0603000F */ bgezl $s0, .L802B6674 glabel action_update_talk /* E25508 802B6638 2411FFFF */ addiu $s1, $zero, -0x1 /* E2550C 802B663C 080AD998 */ j .L802B6660 /* E25510 802B6640 00000000 */ nop glabel .L802B6644 /* E25514 802B6644 5E00000B */ bgtzl $s0, .L802B6674 glabel func_802B6648_E27428 /* E25518 802B6648 2411FFFF */ addiu $s1, $zero, -0x1 .L802B664C: /* E2551C 802B664C 080AD998 */ j .L802B6660 .L802B6650: /* E25520 802B6650 00000000 */ nop glabel .L802B6654 /* E25524 802B6654 2A020002 */ slti $v0, $s0, 0x2 /* E25528 802B6658 50400006 */ beql $v0, $zero, .L802B6674 /* E2552C 802B665C 2411FFFF */ addiu $s1, $zero, -0x1 glabel .L802B6660 /* E25530 802B6660 8E420004 */ lw $v0, 0x4($s2) /* E25534 802B6664 34420400 */ ori $v0, $v0, 0x400 /* E25538 802B6668 080AD99D */ j .L802B6674 glabel .L802B666C /* E2553C 802B666C AE420004 */ sw $v0, 0x4($s2) glabel .L802B6670 /* E25540 802B6670 2411FFFF */ addiu $s1, $zero, -0x1 glabel .L802B6674 /* E25544 802B6674 0220102D */ daddu $v0, $s1, $zero .L802B6678: /* E25548 802B6678 8FBF0048 */ lw $ra, 0x48($sp) /* E2554C 802B667C 8FB30044 */ lw $s3, 0x44($sp) glabel .L802B6680 /* E25550 802B6680 8FB20040 */ lw $s2, 0x40($sp) /* E25554 802B6684 8FB1003C */ lw $s1, 0x3C($sp) /* E25558 802B6688 8FB00038 */ lw $s0, 0x38($sp) glabel func_802B668C /* E2555C 802B668C D7BC0070 */ ldc1 $f28, 0x70($sp) jtbl_802B6690: /* E25560 802B6690 D7BA0068 */ ldc1 $f26, 0x68($sp) /* E25564 802B6694 D7B80060 */ ldc1 $f24, 0x60($sp) .L802B6698: /* E25568 802B6698 D7B60058 */ ldc1 $f22, 0x58($sp) /* E2556C 802B669C D7B40050 */ ldc1 $f20, 0x50($sp) /* E25570 802B66A0 03E00008 */ jr $ra .L802B66A4: /* E25574 802B66A4 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: s32 func_802B62A4_E25174(void) { PlayerStatus* playerStatus = &gPlayerStatus; f32 yaw; f32 angle; f32 outSinTheta; f32 outCosTheta; f32 playerX, playerY, playerZ; f32 x, y, z; s32 ret; s32 i; // first attempt 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; for (i = 1; i < 16; i++) { x = playerX + (outSinTheta * i); y = playerY; z = playerZ - (outCosTheta * i); ret = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw); if (ret >= 0) { HammerHit->hitPos.x = x; HammerHit->hitPos.y = y; HammerHit->hitPos.z = z; break; } } // second attempt if (i >= 16) { 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 += 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); ret = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw); if (ret >= 0) { HammerHit->hitPos.x = x; HammerHit->hitPos.y = y; HammerHit->hitPos.z = z; break; } } } if (ret >= 0 && (ret & COLLISION_WITH_ENTITY_BIT)) { s32 hammerLevel = gPlayerData.hammerLevel; switch (get_entity_type(ret)) { case ENTITY_TYPE_HAMMER1_BLOCK: case ENTITY_TYPE_HAMMER1_BLOCK_TINY: if (hammerLevel >= 0) { ret = -1; } else { playerStatus->animFlags |= PA_FLAG_SHIVERING; } break; case ENTITY_TYPE_HAMMER2_BLOCK: case ENTITY_TYPE_HAMMER2_BLOCK_TINY: if (hammerLevel >= 1) { ret = -1; } else { playerStatus->animFlags |= PA_FLAG_SHIVERING; } break; case ENTITY_TYPE_HAMMER3_BLOCK: case ENTITY_TYPE_HAMMER3_BLOCK_TINY: if (hammerLevel >= 2) { ret = -1; } else { playerStatus->animFlags |= PA_FLAG_SHIVERING; } break; case ENTITY_TYPE_WOODEN_CRATE: case ENTITY_TYPE_BOMBABLE_ROCK: playerStatus->animFlags |= PA_FLAG_SHIVERING; break; case ENTITY_TYPE_BLUE_SWITCH: case ENTITY_TYPE_RED_SWITCH: case ENTITY_TYPE_BRICK_BLOCK: ret = -1; break; } } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel flashing_box_shockwave_appendGfx /* 392BCC E00942FC 27BDFF08 */ addiu $sp, $sp, -0xF8 /* 392BD0 E0094300 AFB000D8 */ sw $s0, 0xD8($sp) /* 392BD4 E0094304 0080802D */ daddu $s0, $a0, $zero /* 392BD8 E0094308 AFB100DC */ sw $s1, 0xDC($sp) /* 392BDC E009430C 27B10098 */ addiu $s1, $sp, 0x98 /* 392BE0 E0094310 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 392BE4 E0094314 44800000 */ mtc1 $zero, $f0 /* 392BE8 E0094318 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 392BEC E009431C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 392BF0 E0094320 0220202D */ daddu $a0, $s1, $zero /* 392BF4 E0094324 AFB400E8 */ sw $s4, 0xE8($sp) /* 392BF8 E0094328 3C140001 */ lui $s4, (0x11630 >> 16) /* 392BFC E009432C AFBF00F4 */ sw $ra, 0xF4($sp) /* 392C00 E0094330 AFB600F0 */ sw $s6, 0xF0($sp) /* 392C04 E0094334 AFB500EC */ sw $s5, 0xEC($sp) /* 392C08 E0094338 AFB300E4 */ sw $s3, 0xE4($sp) /* 392C0C E009433C AFB200E0 */ sw $s2, 0xE0($sp) /* 392C10 E0094340 8E12000C */ lw $s2, 0xC($s0) /* 392C14 E0094344 00031080 */ sll $v0, $v1, 2 /* 392C18 E0094348 00431021 */ addu $v0, $v0, $v1 /* 392C1C E009434C 00021080 */ sll $v0, $v0, 2 /* 392C20 E0094350 00431023 */ subu $v0, $v0, $v1 /* 392C24 E0094354 000218C0 */ sll $v1, $v0, 3 /* 392C28 E0094358 00431021 */ addu $v0, $v0, $v1 /* 392C2C E009435C 000210C0 */ sll $v0, $v0, 3 /* 392C30 E0094360 44060000 */ mfc1 $a2, $f0 /* 392C34 E0094364 8E550000 */ lw $s5, 0x0($s2) /* 392C38 E0094368 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 392C3C E009436C 00220821 */ addu $at, $at, $v0 /* 392C40 E0094370 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 392C44 E0094374 8E560020 */ lw $s6, 0x20($s2) /* 392C48 E0094378 46000007 */ neg.s $f0, $f0 /* 392C4C E009437C 44050000 */ mfc1 $a1, $f0 /* 392C50 E0094380 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 392C54 E0094384 0C080104 */ jal shim_guRotateF /* 392C58 E0094388 AFA60010 */ sw $a2, 0x10($sp) /* 392C5C E009438C 3C04DB06 */ lui $a0, (0xDB060024 >> 16) /* 392C60 E0094390 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 392C64 E0094394 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 392C68 E0094398 34840024 */ ori $a0, $a0, (0xDB060024 & 0xFFFF) /* 392C6C E009439C 8E680000 */ lw $t0, 0x0($s3) /* 392C70 E00943A0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 392C74 E00943A4 0100182D */ daddu $v1, $t0, $zero /* 392C78 E00943A8 25080008 */ addiu $t0, $t0, 0x8 /* 392C7C E00943AC AC620000 */ sw $v0, 0x0($v1) /* 392C80 E00943B0 AC600004 */ sw $zero, 0x4($v1) /* 392C84 E00943B4 AD040000 */ sw $a0, 0x0($t0) /* 392C88 E00943B8 8E020010 */ lw $v0, 0x10($s0) /* 392C8C E00943BC 27A40018 */ addiu $a0, $sp, 0x18 /* 392C90 E00943C0 AE680000 */ sw $t0, 0x0($s3) /* 392C94 E00943C4 8C42001C */ lw $v0, 0x1C($v0) /* 392C98 E00943C8 3C038000 */ lui $v1, (0x80000000 >> 16) /* 392C9C E00943CC 00431021 */ addu $v0, $v0, $v1 /* 392CA0 E00943D0 AD020004 */ sw $v0, 0x4($t0) /* 392CA4 E00943D4 8E450004 */ lw $a1, 0x4($s2) /* 392CA8 E00943D8 8E460008 */ lw $a2, 0x8($s2) /* 392CAC E00943DC 8E47000C */ lw $a3, 0xC($s2) /* 392CB0 E00943E0 25080008 */ addiu $t0, $t0, 0x8 /* 392CB4 E00943E4 0C080108 */ jal shim_guTranslateF /* 392CB8 E00943E8 AE680000 */ sw $t0, 0x0($s3) /* 392CBC E00943EC 0220202D */ daddu $a0, $s1, $zero /* 392CC0 E00943F0 27A50018 */ addiu $a1, $sp, 0x18 /* 392CC4 E00943F4 0C080114 */ jal shim_guMtxCatF /* 392CC8 E00943F8 00A0302D */ daddu $a2, $a1, $zero /* 392CCC E00943FC 27A40018 */ addiu $a0, $sp, 0x18 /* 392CD0 E0094400 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 392CD4 E0094404 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 392CD8 E0094408 3C11800A */ lui $s1, %hi(gDisplayContext) /* 392CDC E009440C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 392CE0 E0094410 96050000 */ lhu $a1, 0x0($s0) /* 392CE4 E0094414 8E220000 */ lw $v0, 0x0($s1) /* 392CE8 E0094418 00052980 */ sll $a1, $a1, 6 /* 392CEC E009441C 00B42821 */ addu $a1, $a1, $s4 /* 392CF0 E0094420 0C080118 */ jal shim_guMtxF2L /* 392CF4 E0094424 00452821 */ addu $a1, $v0, $a1 /* 392CF8 E0094428 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 392CFC E009442C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 392D00 E0094430 8E660000 */ lw $a2, 0x0($s3) /* 392D04 E0094434 96020000 */ lhu $v0, 0x0($s0) /* 392D08 E0094438 00C0202D */ daddu $a0, $a2, $zero /* 392D0C E009443C 24C60008 */ addiu $a2, $a2, 0x8 /* 392D10 E0094440 AE660000 */ sw $a2, 0x0($s3) /* 392D14 E0094444 AC830000 */ sw $v1, 0x0($a0) /* 392D18 E0094448 24430001 */ addiu $v1, $v0, 0x1 /* 392D1C E009444C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 392D20 E0094450 00021180 */ sll $v0, $v0, 6 /* 392D24 E0094454 A6030000 */ sh $v1, 0x0($s0) /* 392D28 E0094458 8E230000 */ lw $v1, 0x0($s1) /* 392D2C E009445C 00541021 */ addu $v0, $v0, $s4 /* 392D30 E0094460 00621821 */ addu $v1, $v1, $v0 /* 392D34 E0094464 24C20008 */ addiu $v0, $a2, 0x8 /* 392D38 E0094468 AC830004 */ sw $v1, 0x4($a0) /* 392D3C E009446C AE620000 */ sw $v0, 0x0($s3) /* 392D40 E0094470 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 392D44 E0094474 ACC20000 */ sw $v0, 0x0($a2) /* 392D48 E0094478 92420033 */ lbu $v0, 0x33($s2) /* 392D4C E009447C 92440037 */ lbu $a0, 0x37($s2) /* 392D50 E0094480 9245003B */ lbu $a1, 0x3B($s2) /* 392D54 E0094484 9247001B */ lbu $a3, 0x1B($s2) /* 392D58 E0094488 24C30010 */ addiu $v1, $a2, 0x10 /* 392D5C E009448C AE630000 */ sw $v1, 0x0($s3) /* 392D60 E0094490 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 392D64 E0094494 ACC30008 */ sw $v1, 0x8($a2) /* 392D68 E0094498 00021600 */ sll $v0, $v0, 24 /* 392D6C E009449C 00042400 */ sll $a0, $a0, 16 /* 392D70 E00944A0 00441025 */ or $v0, $v0, $a0 /* 392D74 E00944A4 00052A00 */ sll $a1, $a1, 8 /* 392D78 E00944A8 00451025 */ or $v0, $v0, $a1 /* 392D7C E00944AC 00471025 */ or $v0, $v0, $a3 /* 392D80 E00944B0 ACC20004 */ sw $v0, 0x4($a2) /* 392D84 E00944B4 9242003F */ lbu $v0, 0x3F($s2) /* 392D88 E00944B8 92440043 */ lbu $a0, 0x43($s2) /* 392D8C E00944BC 92430047 */ lbu $v1, 0x47($s2) /* 392D90 E00944C0 00021600 */ sll $v0, $v0, 24 /* 392D94 E00944C4 00042400 */ sll $a0, $a0, 16 /* 392D98 E00944C8 00441025 */ or $v0, $v0, $a0 /* 392D9C E00944CC 00031A00 */ sll $v1, $v1, 8 /* 392DA0 E00944D0 00431025 */ or $v0, $v0, $v1 /* 392DA4 E00944D4 ACC2000C */ sw $v0, 0xC($a2) /* 392DA8 E00944D8 2EA20002 */ sltiu $v0, $s5, 0x2 /* 392DAC E00944DC 10400041 */ beqz $v0, .LE00945E4 /* 392DB0 E00944E0 32C20001 */ andi $v0, $s6, 0x1 /* 392DB4 E00944E4 10400040 */ beqz $v0, .LE00945E8 /* 392DB8 E00944E8 26A2FFFF */ addiu $v0, $s5, -0x1 /* 392DBC E00944EC 8E450028 */ lw $a1, 0x28($s2) /* 392DC0 E00944F0 8E46002C */ lw $a2, 0x2C($s2) /* 392DC4 E00944F4 3C073F89 */ lui $a3, (0x3F892492 >> 16) /* 392DC8 E00944F8 34E72492 */ ori $a3, $a3, (0x3F892492 & 0xFFFF) /* 392DCC E00944FC 0C080110 */ jal shim_guScaleF /* 392DD0 E0094500 27A40018 */ addiu $a0, $sp, 0x18 /* 392DD4 E0094504 27A40018 */ addiu $a0, $sp, 0x18 /* 392DD8 E0094508 96050000 */ lhu $a1, 0x0($s0) /* 392DDC E009450C 8E220000 */ lw $v0, 0x0($s1) /* 392DE0 E0094510 00052980 */ sll $a1, $a1, 6 /* 392DE4 E0094514 00B42821 */ addu $a1, $a1, $s4 /* 392DE8 E0094518 0C080118 */ jal shim_guMtxF2L /* 392DEC E009451C 00452821 */ addu $a1, $v0, $a1 /* 392DF0 E0094520 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 392DF4 E0094524 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 392DF8 E0094528 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 392DFC E009452C 8E660000 */ lw $a2, 0x0($s3) /* 392E00 E0094530 3C07DE00 */ lui $a3, (0xDE000000 >> 16) /* 392E04 E0094534 00C0202D */ daddu $a0, $a2, $zero /* 392E08 E0094538 24C60008 */ addiu $a2, $a2, 0x8 /* 392E0C E009453C AE660000 */ sw $a2, 0x0($s3) /* 392E10 E0094540 96020000 */ lhu $v0, 0x0($s0) /* 392E14 E0094544 3C05F200 */ lui $a1, (0xF2000000 >> 16) /* 392E18 E0094548 AC830000 */ sw $v1, 0x0($a0) /* 392E1C E009454C 24430001 */ addiu $v1, $v0, 0x1 /* 392E20 E0094550 3042FFFF */ andi $v0, $v0, 0xFFFF /* 392E24 E0094554 00021180 */ sll $v0, $v0, 6 /* 392E28 E0094558 A6030000 */ sh $v1, 0x0($s0) /* 392E2C E009455C 8E230000 */ lw $v1, 0x0($s1) /* 392E30 E0094560 00541021 */ addu $v0, $v0, $s4 /* 392E34 E0094564 00621821 */ addu $v1, $v1, $v0 /* 392E38 E0094568 24C20008 */ addiu $v0, $a2, 0x8 /* 392E3C E009456C AC830004 */ sw $v1, 0x4($a0) /* 392E40 E0094570 AE620000 */ sw $v0, 0x0($s3) /* 392E44 E0094574 3C020900 */ lui $v0, %hi(D_09000600_415660) /* 392E48 E0094578 24420600 */ addiu $v0, $v0, %lo(D_09000600_415660) /* 392E4C E009457C ACC20004 */ sw $v0, 0x4($a2) /* 392E50 E0094580 24C20010 */ addiu $v0, $a2, 0x10 /* 392E54 E0094584 001618C0 */ sll $v1, $s6, 3 /* 392E58 E0094588 ACC70000 */ sw $a3, 0x0($a2) /* 392E5C E009458C AE620000 */ sw $v0, 0x0($s3) /* 392E60 E0094590 30620FFF */ andi $v0, $v1, 0xFFF /* 392E64 E0094594 00022300 */ sll $a0, $v0, 12 /* 392E68 E0094598 00451025 */ or $v0, $v0, $a1 /* 392E6C E009459C 00822025 */ or $a0, $a0, $v0 /* 392E70 E00945A0 24630080 */ addiu $v1, $v1, 0x80 /* 392E74 E00945A4 30630FFF */ andi $v1, $v1, 0xFFF /* 392E78 E00945A8 00031300 */ sll $v0, $v1, 12 /* 392E7C E00945AC 00431025 */ or $v0, $v0, $v1 /* 392E80 E00945B0 ACC2000C */ sw $v0, 0xC($a2) /* 392E84 E00945B4 24C20018 */ addiu $v0, $a2, 0x18 /* 392E88 E00945B8 ACC40008 */ sw $a0, 0x8($a2) /* 392E8C E00945BC AE620000 */ sw $v0, 0x0($s3) /* 392E90 E00945C0 3C020900 */ lui $v0, %hi(D_090008E8_415948) /* 392E94 E00945C4 244208E8 */ addiu $v0, $v0, %lo(D_090008E8_415948) /* 392E98 E00945C8 ACC20014 */ sw $v0, 0x14($a2) /* 392E9C E00945CC 24C20020 */ addiu $v0, $a2, 0x20 /* 392EA0 E00945D0 ACC70010 */ sw $a3, 0x10($a2) /* 392EA4 E00945D4 AE620000 */ sw $v0, 0x0($s3) /* 392EA8 E00945D8 24020040 */ addiu $v0, $zero, 0x40 /* 392EAC E00945DC ACC80018 */ sw $t0, 0x18($a2) /* 392EB0 E00945E0 ACC2001C */ sw $v0, 0x1C($a2) .LE00945E4: /* 392EB4 E00945E4 26A2FFFF */ addiu $v0, $s5, -0x1 .LE00945E8: /* 392EB8 E00945E8 2C420003 */ sltiu $v0, $v0, 0x3 /* 392EBC E00945EC 10400059 */ beqz $v0, .LE0094754 /* 392EC0 E00945F0 24020001 */ addiu $v0, $zero, 0x1 /* 392EC4 E00945F4 16A2000D */ bne $s5, $v0, .LE009462C /* 392EC8 E00945F8 00000000 */ nop /* 392ECC E00945FC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 392ED0 E0094600 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 392ED4 E0094604 8C620000 */ lw $v0, 0x0($v1) /* 392ED8 E0094608 0040202D */ daddu $a0, $v0, $zero /* 392EDC E009460C 24420008 */ addiu $v0, $v0, 0x8 /* 392EE0 E0094610 AC620000 */ sw $v0, 0x0($v1) /* 392EE4 E0094614 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 392EE8 E0094618 AC820000 */ sw $v0, 0x0($a0) /* 392EEC E009461C 92420017 */ lbu $v0, 0x17($s2) /* 392EF0 E0094620 3C03FFFF */ lui $v1, (0xFFFF0000 >> 16) /* 392EF4 E0094624 00431025 */ or $v0, $v0, $v1 /* 392EF8 E0094628 AC820004 */ sw $v0, 0x4($a0) .LE009462C: /* 392EFC E009462C 44800000 */ mtc1 $zero, $f0 /* 392F00 E0094630 27A40018 */ addiu $a0, $sp, 0x18 /* 392F04 E0094634 44050000 */ mfc1 $a1, $f0 /* 392F08 E0094638 8E46002C */ lw $a2, 0x2C($s2) /* 392F0C E009463C 0C080108 */ jal shim_guTranslateF /* 392F10 E0094640 00A0382D */ daddu $a3, $a1, $zero /* 392F14 E0094644 C6400024 */ lwc1 $f0, 0x24($s2) /* 392F18 E0094648 3C013FD0 */ lui $at, (0x3FD00000 >> 16) /* 392F1C E009464C 44811800 */ mtc1 $at, $f3 /* 392F20 E0094650 44801000 */ mtc1 $zero, $f2 /* 392F24 E0094654 46000021 */ cvt.d.s $f0, $f0 /* 392F28 E0094658 46220002 */ mul.d $f0, $f0, $f2 /* 392F2C E009465C 00000000 */ nop /* 392F30 E0094660 3C120001 */ lui $s2, (0x11630 >> 16) /* 392F34 E0094664 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 392F38 E0094668 27B00058 */ addiu $s0, $sp, 0x58 /* 392F3C E009466C 0200202D */ daddu $a0, $s0, $zero /* 392F40 E0094670 46200020 */ cvt.s.d $f0, $f0 /* 392F44 E0094674 44050000 */ mfc1 $a1, $f0 /* 392F48 E0094678 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 392F4C E009467C 0C080110 */ jal shim_guScaleF /* 392F50 E0094680 00A0302D */ daddu $a2, $a1, $zero /* 392F54 E0094684 0200202D */ daddu $a0, $s0, $zero /* 392F58 E0094688 27A50018 */ addiu $a1, $sp, 0x18 /* 392F5C E009468C 0C080114 */ jal shim_guMtxCatF /* 392F60 E0094690 00A0302D */ daddu $a2, $a1, $zero /* 392F64 E0094694 27A40018 */ addiu $a0, $sp, 0x18 /* 392F68 E0094698 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 392F6C E009469C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 392F70 E00946A0 3C11800A */ lui $s1, %hi(gDisplayContext) /* 392F74 E00946A4 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 392F78 E00946A8 96050000 */ lhu $a1, 0x0($s0) /* 392F7C E00946AC 8E220000 */ lw $v0, 0x0($s1) /* 392F80 E00946B0 00052980 */ sll $a1, $a1, 6 /* 392F84 E00946B4 00B22821 */ addu $a1, $a1, $s2 /* 392F88 E00946B8 0C080118 */ jal shim_guMtxF2L /* 392F8C E00946BC 00452821 */ addu $a1, $v0, $a1 /* 392F90 E00946C0 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 392F94 E00946C4 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 392F98 E00946C8 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 392F9C E00946CC 8CA40000 */ lw $a0, 0x0($a1) /* 392FA0 E00946D0 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 392FA4 E00946D4 0080302D */ daddu $a2, $a0, $zero /* 392FA8 E00946D8 24840008 */ addiu $a0, $a0, 0x8 /* 392FAC E00946DC ACA40000 */ sw $a0, 0x0($a1) /* 392FB0 E00946E0 96020000 */ lhu $v0, 0x0($s0) /* 392FB4 E00946E4 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 392FB8 E00946E8 ACC30000 */ sw $v1, 0x0($a2) /* 392FBC E00946EC 24430001 */ addiu $v1, $v0, 0x1 /* 392FC0 E00946F0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 392FC4 E00946F4 00021180 */ sll $v0, $v0, 6 /* 392FC8 E00946F8 A6030000 */ sh $v1, 0x0($s0) /* 392FCC E00946FC 8E230000 */ lw $v1, 0x0($s1) /* 392FD0 E0094700 00521021 */ addu $v0, $v0, $s2 /* 392FD4 E0094704 00621821 */ addu $v1, $v1, $v0 /* 392FD8 E0094708 24820008 */ addiu $v0, $a0, 0x8 /* 392FDC E009470C ACC30004 */ sw $v1, 0x4($a2) /* 392FE0 E0094710 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 392FE4 E0094714 ACA20000 */ sw $v0, 0x0($a1) /* 392FE8 E0094718 3C020900 */ lui $v0, %hi(D_09000950_4159B0) /* 392FEC E009471C 24420950 */ addiu $v0, $v0, %lo(D_09000950_4159B0) /* 392FF0 E0094720 AC820004 */ sw $v0, 0x4($a0) /* 392FF4 E0094724 24820010 */ addiu $v0, $a0, 0x10 /* 392FF8 E0094728 AC830000 */ sw $v1, 0x0($a0) /* 392FFC E009472C ACA20000 */ sw $v0, 0x0($a1) /* 393000 E0094730 3C020900 */ lui $v0, %hi(D_09000FF8_40E288) /* 393004 E0094734 24420FF8 */ addiu $v0, $v0, %lo(D_09000FF8_40E288) /* 393008 E0094738 AC82000C */ sw $v0, 0xC($a0) /* 39300C E009473C 24820018 */ addiu $v0, $a0, 0x18 /* 393010 E0094740 AC830008 */ sw $v1, 0x8($a0) /* 393014 E0094744 ACA20000 */ sw $v0, 0x0($a1) /* 393018 E0094748 24020040 */ addiu $v0, $zero, 0x40 /* 39301C E009474C AC870010 */ sw $a3, 0x10($a0) /* 393020 E0094750 AC820014 */ sw $v0, 0x14($a0) .LE0094754: /* 393024 E0094754 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 393028 E0094758 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 39302C E009475C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 393030 E0094760 8C620000 */ lw $v0, 0x0($v1) /* 393034 E0094764 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 393038 E0094768 0040202D */ daddu $a0, $v0, $zero /* 39303C E009476C 24420008 */ addiu $v0, $v0, 0x8 /* 393040 E0094770 AC620000 */ sw $v0, 0x0($v1) /* 393044 E0094774 24020040 */ addiu $v0, $zero, 0x40 /* 393048 E0094778 AC850000 */ sw $a1, 0x0($a0) /* 39304C E009477C AC820004 */ sw $v0, 0x4($a0) /* 393050 E0094780 8FBF00F4 */ lw $ra, 0xF4($sp) /* 393054 E0094784 8FB600F0 */ lw $s6, 0xF0($sp) /* 393058 E0094788 8FB500EC */ lw $s5, 0xEC($sp) /* 39305C E009478C 8FB400E8 */ lw $s4, 0xE8($sp) /* 393060 E0094790 8FB300E4 */ lw $s3, 0xE4($sp) /* 393064 E0094794 8FB200E0 */ lw $s2, 0xE0($sp) /* 393068 E0094798 8FB100DC */ lw $s1, 0xDC($sp) /* 39306C E009479C 8FB000D8 */ lw $s0, 0xD8($sp) /* 393070 E00947A0 03E00008 */ jr $ra /* 393074 E00947A4 27BD00F8 */ addiu $sp, $sp, 0xF8 /* 393078 E00947A8 00000000 */ nop /* 39307C E00947AC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void flashing_box_shockwave_appendGfx(void* effect) { FlashingBoxShockwaveFXData* data = ((EffectInstance*)effect)->data.flashingBoxShockwave; s32 unk_00 = data->unk_00; s32 unk_20 = data->unk_20; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); 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_guMtxCatF(sp98, 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, data->unk_30, data->unk_34, data->unk_38, data->unk_18); gDPSetEnvColor(gMainGfxPos++, data->unk_3C, data->unk_40, data->unk_44, 0); if ((unk_00 == 0 || unk_00 == 1) && unk_20 % 2) { shim_guScaleF(sp18, data->unk_28, data->unk_2C, 15.0f / 14); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000600_3936A0); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, unk_20 * 8, unk_20 * 8, unk_20 * 8 + 128, unk_20 * 8 + 128); gSPDisplayList(gMainGfxPos++, D_090008E8_393988); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } if (unk_00 >= 1 && unk_00 <= 3) { if (unk_00 == 1) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 0, data->unk_14); } shim_guTranslateF(sp18, 0.0f, data->unk_2C, 0.0f); shim_guScaleF(sp58, data->unk_24 * 0.25, data->unk_24 * 0.25, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000950_3939F0); gSPDisplayList(gMainGfxPos++, D_09000FF8_394098); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_lerp_battle /* 1A99BC 8027B0DC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 1A99C0 8027B0E0 F7B80030 */ sdc1 $f24, 0x30($sp) /* 1A99C4 8027B0E4 4485C000 */ mtc1 $a1, $f24 /* 1A99C8 8027B0E8 F7BA0038 */ sdc1 $f26, 0x38($sp) /* 1A99CC 8027B0EC 4486D000 */ mtc1 $a2, $f26 /* 1A99D0 8027B0F0 AFB10014 */ sw $s1, 0x14($sp) /* 1A99D4 8027B0F4 AFB00010 */ sw $s0, 0x10($sp) /* 1A99D8 8027B0F8 8FB00050 */ lw $s0, 0x50($sp) /* 1A99DC 8027B0FC 2C82000D */ sltiu $v0, $a0, 0xD /* 1A99E0 8027B100 AFBF0018 */ sw $ra, 0x18($sp) /* 1A99E4 8027B104 F7B60028 */ sdc1 $f22, 0x28($sp) /* 1A99E8 8027B108 F7B40020 */ sdc1 $f20, 0x20($sp) /* 1A99EC 8027B10C 1040013B */ beqz $v0, .L8027B5FC /* 1A99F0 8027B110 00E0882D */ daddu $s1, $a3, $zero /* 1A99F4 8027B114 00041080 */ sll $v0, $a0, 2 /* 1A99F8 8027B118 3C01802A */ lui $at, %hi(jtbl_8029D9A8) /* 1A99FC 8027B11C 00220821 */ addu $at, $at, $v0 /* 1A9A00 8027B120 8C22D9A8 */ lw $v0, %lo(jtbl_8029D9A8)($at) /* 1A9A04 8027B124 00400008 */ jr $v0 /* 1A9A08 8027B128 00000000 */ nop glabel .L8027B12C /* 1A9A0C 8027B12C 4618D001 */ sub.s $f0, $f26, $f24 /* 1A9A10 8027B130 44911000 */ mtc1 $s1, $f2 /* 1A9A14 8027B134 00000000 */ nop /* 1A9A18 8027B138 468010A0 */ cvt.s.w $f2, $f2 /* 1A9A1C 8027B13C 46020002 */ mul.s $f0, $f0, $f2 /* 1A9A20 8027B140 00000000 */ nop /* 1A9A24 8027B144 44901000 */ mtc1 $s0, $f2 /* 1A9A28 8027B148 00000000 */ nop /* 1A9A2C 8027B14C 468010A0 */ cvt.s.w $f2, $f2 /* 1A9A30 8027B150 0809EC80 */ j .L8027B200 /* 1A9A34 8027B154 46020003 */ div.s $f0, $f0, $f2 glabel .L8027B158 /* 1A9A38 8027B158 02310018 */ mult $s1, $s1 /* 1A9A3C 8027B15C 00004012 */ mflo $t0 /* 1A9A40 8027B160 00000000 */ nop /* 1A9A44 8027B164 0809EC75 */ j .L8027B1D4 /* 1A9A48 8027B168 02100018 */ mult $s0, $s0 glabel .L8027B16C /* 1A9A4C 8027B16C 02310018 */ mult $s1, $s1 /* 1A9A50 8027B170 00004012 */ mflo $t0 /* 1A9A54 8027B174 00000000 */ nop /* 1A9A58 8027B178 0809EC6D */ j .L8027B1B4 /* 1A9A5C 8027B17C 02100018 */ mult $s0, $s0 glabel .L8027B180 /* 1A9A60 8027B180 02310018 */ mult $s1, $s1 /* 1A9A64 8027B184 00004012 */ mflo $t0 /* 1A9A68 8027B188 00000000 */ nop /* 1A9A6C 8027B18C 00000000 */ nop /* 1A9A70 8027B190 02100018 */ mult $s0, $s0 /* 1A9A74 8027B194 00001012 */ mflo $v0 /* 1A9A78 8027B198 00000000 */ nop /* 1A9A7C 8027B19C 00000000 */ nop /* 1A9A80 8027B1A0 01110018 */ mult $t0, $s1 /* 1A9A84 8027B1A4 00004012 */ mflo $t0 /* 1A9A88 8027B1A8 00000000 */ nop /* 1A9A8C 8027B1AC 00000000 */ nop /* 1A9A90 8027B1B0 00500018 */ mult $v0, $s0 .L8027B1B4: /* 1A9A94 8027B1B4 00001012 */ mflo $v0 /* 1A9A98 8027B1B8 00000000 */ nop /* 1A9A9C 8027B1BC 00000000 */ nop /* 1A9AA0 8027B1C0 01110018 */ mult $t0, $s1 /* 1A9AA4 8027B1C4 00004012 */ mflo $t0 /* 1A9AA8 8027B1C8 00000000 */ nop /* 1A9AAC 8027B1CC 00000000 */ nop /* 1A9AB0 8027B1D0 00500018 */ mult $v0, $s0 .L8027B1D4: /* 1A9AB4 8027B1D4 4618D081 */ sub.s $f2, $f26, $f24 /* 1A9AB8 8027B1D8 44880000 */ mtc1 $t0, $f0 /* 1A9ABC 8027B1DC 00000000 */ nop /* 1A9AC0 8027B1E0 46800020 */ cvt.s.w $f0, $f0 /* 1A9AC4 8027B1E4 46020002 */ mul.s $f0, $f0, $f2 /* 1A9AC8 8027B1E8 00000000 */ nop /* 1A9ACC 8027B1EC 00001012 */ mflo $v0 /* 1A9AD0 8027B1F0 44821000 */ mtc1 $v0, $f2 /* 1A9AD4 8027B1F4 00000000 */ nop /* 1A9AD8 8027B1F8 468010A0 */ cvt.s.w $f2, $f2 /* 1A9ADC 8027B1FC 46020003 */ div.s $f0, $f0, $f2 .L8027B200: /* 1A9AE0 8027B200 0809ED80 */ j .L8027B600 /* 1A9AE4 8027B204 4600C000 */ add.s $f0, $f24, $f0 glabel .L8027B208 /* 1A9AE8 8027B208 44916000 */ mtc1 $s1, $f12 /* 1A9AEC 8027B20C 00000000 */ nop /* 1A9AF0 8027B210 46806320 */ cvt.s.w $f12, $f12 /* 1A9AF4 8027B214 4490B000 */ mtc1 $s0, $f22 /* 1A9AF8 8027B218 00000000 */ nop /* 1A9AFC 8027B21C 4680B5A0 */ cvt.s.w $f22, $f22 /* 1A9B00 8027B220 46166303 */ div.s $f12, $f12, $f22 /* 1A9B04 8027B224 3C01802A */ lui $at, %hi(D_8029D9E0) /* 1A9B08 8027B228 D420D9E0 */ ldc1 $f0, %lo(D_8029D9E0)($at) /* 1A9B0C 8027B22C 46006321 */ cvt.d.s $f12, $f12 /* 1A9B10 8027B230 46206302 */ mul.d $f12, $f12, $f0 /* 1A9B14 8027B234 00000000 */ nop /* 1A9B18 8027B238 3C014010 */ lui $at, (0x40100000 >> 16) /* 1A9B1C 8027B23C 44810800 */ mtc1 $at, $f1 /* 1A9B20 8027B240 44800000 */ mtc1 $zero, $f0 /* 1A9B24 8027B244 00000000 */ nop /* 1A9B28 8027B248 46206302 */ mul.d $f12, $f12, $f0 /* 1A9B2C 8027B24C 00000000 */ nop /* 1A9B30 8027B250 0809ECAF */ j .L8027B2BC /* 1A9B34 8027B254 4618D501 */ sub.s $f20, $f26, $f24 glabel .L8027B258 /* 1A9B38 8027B258 02310018 */ mult $s1, $s1 /* 1A9B3C 8027B25C 4490B000 */ mtc1 $s0, $f22 /* 1A9B40 8027B260 00000000 */ nop /* 1A9B44 8027B264 4680B5A0 */ cvt.s.w $f22, $f22 /* 1A9B48 8027B268 3C01802A */ lui $at, %hi(D_8029D9E8) /* 1A9B4C 8027B26C D420D9E8 */ ldc1 $f0, %lo(D_8029D9E8)($at) /* 1A9B50 8027B270 00001812 */ mflo $v1 /* 1A9B54 8027B274 44836000 */ mtc1 $v1, $f12 /* 1A9B58 8027B278 00000000 */ nop /* 1A9B5C 8027B27C 46806320 */ cvt.s.w $f12, $f12 /* 1A9B60 8027B280 46166303 */ div.s $f12, $f12, $f22 /* 1A9B64 8027B284 46006321 */ cvt.d.s $f12, $f12 /* 1A9B68 8027B288 46206302 */ mul.d $f12, $f12, $f0 /* 1A9B6C 8027B28C 00000000 */ nop /* 1A9B70 8027B290 3C014010 */ lui $at, (0x40100000 >> 16) /* 1A9B74 8027B294 44810800 */ mtc1 $at, $f1 /* 1A9B78 8027B298 44800000 */ mtc1 $zero, $f0 /* 1A9B7C 8027B29C 00000000 */ nop /* 1A9B80 8027B2A0 46206302 */ mul.d $f12, $f12, $f0 /* 1A9B84 8027B2A4 00000000 */ nop /* 1A9B88 8027B2A8 3C01402E */ lui $at, (0x402E0000 >> 16) /* 1A9B8C 8027B2AC 44810800 */ mtc1 $at, $f1 /* 1A9B90 8027B2B0 44800000 */ mtc1 $zero, $f0 /* 1A9B94 8027B2B4 4618D501 */ sub.s $f20, $f26, $f24 /* 1A9B98 8027B2B8 46206303 */ div.d $f12, $f12, $f0 .L8027B2BC: /* 1A9B9C 8027B2BC 0C00A874 */ jal cos_rad /* 1A9BA0 8027B2C0 46206320 */ cvt.s.d $f12, $f12 /* 1A9BA4 8027B2C4 4600A502 */ mul.s $f20, $f20, $f0 /* 1A9BA8 8027B2C8 00000000 */ nop /* 1A9BAC 8027B2CC 4616B582 */ mul.s $f22, $f22, $f22 /* 1A9BB0 8027B2D0 00000000 */ nop /* 1A9BB4 8027B2D4 02111023 */ subu $v0, $s0, $s1 /* 1A9BB8 8027B2D8 44820000 */ mtc1 $v0, $f0 /* 1A9BBC 8027B2DC 00000000 */ nop /* 1A9BC0 8027B2E0 46800020 */ cvt.s.w $f0, $f0 /* 1A9BC4 8027B2E4 4600A502 */ mul.s $f20, $f20, $f0 /* 1A9BC8 8027B2E8 00000000 */ nop /* 1A9BCC 8027B2EC 4600A502 */ mul.s $f20, $f20, $f0 /* 1A9BD0 8027B2F0 00000000 */ nop /* 1A9BD4 8027B2F4 4616A503 */ div.s $f20, $f20, $f22 /* 1A9BD8 8027B2F8 0809ED80 */ j .L8027B600 /* 1A9BDC 8027B2FC 4614D001 */ sub.s $f0, $f26, $f20 glabel .L8027B300 /* 1A9BE0 8027B300 02113823 */ subu $a3, $s0, $s1 /* 1A9BE4 8027B304 00E70018 */ mult $a3, $a3 /* 1A9BE8 8027B308 4618D101 */ sub.s $f4, $f26, $f24 /* 1A9BEC 8027B30C 00001812 */ mflo $v1 /* 1A9BF0 8027B310 44830000 */ mtc1 $v1, $f0 /* 1A9BF4 8027B314 00000000 */ nop /* 1A9BF8 8027B318 46800020 */ cvt.s.w $f0, $f0 /* 1A9BFC 8027B31C 46040002 */ mul.s $f0, $f0, $f4 /* 1A9C00 8027B320 00000000 */ nop /* 1A9C04 8027B324 02100018 */ mult $s0, $s0 /* 1A9C08 8027B328 00001812 */ mflo $v1 /* 1A9C0C 8027B32C 44831000 */ mtc1 $v1, $f2 /* 1A9C10 8027B330 00000000 */ nop /* 1A9C14 8027B334 468010A0 */ cvt.s.w $f2, $f2 /* 1A9C18 8027B338 0809ECFB */ j .L8027B3EC /* 1A9C1C 8027B33C 4604C100 */ add.s $f4, $f24, $f4 glabel .L8027B340 /* 1A9C20 8027B340 02113823 */ subu $a3, $s0, $s1 /* 1A9C24 8027B344 00E70018 */ mult $a3, $a3 /* 1A9C28 8027B348 00001012 */ mflo $v0 /* 1A9C2C 8027B34C 00000000 */ nop /* 1A9C30 8027B350 00000000 */ nop /* 1A9C34 8027B354 00470018 */ mult $v0, $a3 /* 1A9C38 8027B358 00004012 */ mflo $t0 /* 1A9C3C 8027B35C 00000000 */ nop /* 1A9C40 8027B360 0809ECEC */ j .L8027B3B0 /* 1A9C44 8027B364 02100018 */ mult $s0, $s0 glabel .L8027B368 /* 1A9C48 8027B368 02113823 */ subu $a3, $s0, $s1 /* 1A9C4C 8027B36C 00E70018 */ mult $a3, $a3 /* 1A9C50 8027B370 00001012 */ mflo $v0 /* 1A9C54 8027B374 00000000 */ nop /* 1A9C58 8027B378 00000000 */ nop /* 1A9C5C 8027B37C 00470018 */ mult $v0, $a3 /* 1A9C60 8027B380 00004012 */ mflo $t0 /* 1A9C64 8027B384 00000000 */ nop /* 1A9C68 8027B388 00000000 */ nop /* 1A9C6C 8027B38C 02100018 */ mult $s0, $s0 /* 1A9C70 8027B390 00001012 */ mflo $v0 /* 1A9C74 8027B394 00000000 */ nop /* 1A9C78 8027B398 00000000 */ nop /* 1A9C7C 8027B39C 01070018 */ mult $t0, $a3 /* 1A9C80 8027B3A0 00004012 */ mflo $t0 /* 1A9C84 8027B3A4 00000000 */ nop /* 1A9C88 8027B3A8 00000000 */ nop /* 1A9C8C 8027B3AC 00500018 */ mult $v0, $s0 .L8027B3B0: /* 1A9C90 8027B3B0 4618D101 */ sub.s $f4, $f26, $f24 /* 1A9C94 8027B3B4 44880000 */ mtc1 $t0, $f0 /* 1A9C98 8027B3B8 00000000 */ nop /* 1A9C9C 8027B3BC 46800020 */ cvt.s.w $f0, $f0 /* 1A9CA0 8027B3C0 46040002 */ mul.s $f0, $f0, $f4 /* 1A9CA4 8027B3C4 00000000 */ nop /* 1A9CA8 8027B3C8 00001012 */ mflo $v0 /* 1A9CAC 8027B3CC 00000000 */ nop /* 1A9CB0 8027B3D0 00000000 */ nop /* 1A9CB4 8027B3D4 00500018 */ mult $v0, $s0 /* 1A9CB8 8027B3D8 4604C100 */ add.s $f4, $f24, $f4 /* 1A9CBC 8027B3DC 00001012 */ mflo $v0 /* 1A9CC0 8027B3E0 44821000 */ mtc1 $v0, $f2 /* 1A9CC4 8027B3E4 00000000 */ nop /* 1A9CC8 8027B3E8 468010A0 */ cvt.s.w $f2, $f2 .L8027B3EC: /* 1A9CCC 8027B3EC 46020003 */ div.s $f0, $f0, $f2 /* 1A9CD0 8027B3F0 0809ED80 */ j .L8027B600 /* 1A9CD4 8027B3F4 46002001 */ sub.s $f0, $f4, $f0 glabel .L8027B3F8 /* 1A9CD8 8027B3F8 02310018 */ mult $s1, $s1 /* 1A9CDC 8027B3FC 4490A000 */ mtc1 $s0, $f20 /* 1A9CE0 8027B400 00000000 */ nop /* 1A9CE4 8027B404 4680A520 */ cvt.s.w $f20, $f20 /* 1A9CE8 8027B408 3C01802A */ lui $at, %hi(D_8029D9F0) /* 1A9CEC 8027B40C D420D9F0 */ ldc1 $f0, %lo(D_8029D9F0)($at) /* 1A9CF0 8027B410 00001812 */ mflo $v1 /* 1A9CF4 8027B414 44836000 */ mtc1 $v1, $f12 /* 1A9CF8 8027B418 00000000 */ nop /* 1A9CFC 8027B41C 46806320 */ cvt.s.w $f12, $f12 /* 1A9D00 8027B420 46146303 */ div.s $f12, $f12, $f20 /* 1A9D04 8027B424 46006321 */ cvt.d.s $f12, $f12 /* 1A9D08 8027B428 46206302 */ mul.d $f12, $f12, $f0 /* 1A9D0C 8027B42C 00000000 */ nop /* 1A9D10 8027B430 3C014010 */ lui $at, (0x40100000 >> 16) /* 1A9D14 8027B434 44810800 */ mtc1 $at, $f1 /* 1A9D18 8027B438 44800000 */ mtc1 $zero, $f0 /* 1A9D1C 8027B43C 00000000 */ nop /* 1A9D20 8027B440 46206302 */ mul.d $f12, $f12, $f0 /* 1A9D24 8027B444 00000000 */ nop /* 1A9D28 8027B448 3C014044 */ lui $at, (0x40440000 >> 16) /* 1A9D2C 8027B44C 44810800 */ mtc1 $at, $f1 /* 1A9D30 8027B450 44800000 */ mtc1 $zero, $f0 /* 1A9D34 8027B454 00000000 */ nop /* 1A9D38 8027B458 46206303 */ div.d $f12, $f12, $f0 /* 1A9D3C 8027B45C 0C00A874 */ jal cos_rad /* 1A9D40 8027B460 46206320 */ cvt.s.d $f12, $f12 /* 1A9D44 8027B464 02111023 */ subu $v0, $s0, $s1 /* 1A9D48 8027B468 44821000 */ mtc1 $v0, $f2 /* 1A9D4C 8027B46C 00000000 */ nop /* 1A9D50 8027B470 468010A0 */ cvt.s.w $f2, $f2 /* 1A9D54 8027B474 46020002 */ mul.s $f0, $f0, $f2 /* 1A9D58 8027B478 00000000 */ nop /* 1A9D5C 8027B47C 4614A502 */ mul.s $f20, $f20, $f20 /* 1A9D60 8027B480 00000000 */ nop /* 1A9D64 8027B484 46020002 */ mul.s $f0, $f0, $f2 /* 1A9D68 8027B488 00000000 */ nop /* 1A9D6C 8027B48C 44801000 */ mtc1 $zero, $f2 /* 1A9D70 8027B490 46140103 */ div.s $f4, $f0, $f20 /* 1A9D74 8027B494 4602203C */ c.lt.s $f4, $f2 /* 1A9D78 8027B498 00000000 */ nop /* 1A9D7C 8027B49C 45030001 */ bc1tl .L8027B4A4 /* 1A9D80 8027B4A0 46002107 */ neg.s $f4, $f4 .L8027B4A4: /* 1A9D84 8027B4A4 4618D001 */ sub.s $f0, $f26, $f24 /* 1A9D88 8027B4A8 46040002 */ mul.s $f0, $f0, $f4 /* 1A9D8C 8027B4AC 00000000 */ nop /* 1A9D90 8027B4B0 0809ED80 */ j .L8027B600 /* 1A9D94 8027B4B4 4600D001 */ sub.s $f0, $f26, $f0 glabel .L8027B4B8 /* 1A9D98 8027B4B8 44916000 */ mtc1 $s1, $f12 /* 1A9D9C 8027B4BC 00000000 */ nop /* 1A9DA0 8027B4C0 46806320 */ cvt.s.w $f12, $f12 /* 1A9DA4 8027B4C4 3C01802A */ lui $at, %hi(D_8029D9F8) /* 1A9DA8 8027B4C8 D420D9F8 */ ldc1 $f0, %lo(D_8029D9F8)($at) /* 1A9DAC 8027B4CC 46006321 */ cvt.d.s $f12, $f12 /* 1A9DB0 8027B4D0 46206302 */ mul.d $f12, $f12, $f0 /* 1A9DB4 8027B4D4 00000000 */ nop /* 1A9DB8 8027B4D8 4600C5A1 */ cvt.d.s $f22, $f24 /* 1A9DBC 8027B4DC 4618D501 */ sub.s $f20, $f26, $f24 /* 1A9DC0 8027B4E0 44900000 */ mtc1 $s0, $f0 /* 1A9DC4 8027B4E4 00000000 */ nop /* 1A9DC8 8027B4E8 46800020 */ cvt.s.w $f0, $f0 /* 1A9DCC 8027B4EC 46000021 */ cvt.d.s $f0, $f0 /* 1A9DD0 8027B4F0 4600A521 */ cvt.d.s $f20, $f20 /* 1A9DD4 8027B4F4 46206303 */ div.d $f12, $f12, $f0 /* 1A9DD8 8027B4F8 0C00A874 */ jal cos_rad /* 1A9DDC 8027B4FC 46206320 */ cvt.s.d $f12, $f12 /* 1A9DE0 8027B500 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 1A9DE4 8027B504 44811800 */ mtc1 $at, $f3 /* 1A9DE8 8027B508 44801000 */ mtc1 $zero, $f2 /* 1A9DEC 8027B50C 46000021 */ cvt.d.s $f0, $f0 /* 1A9DF0 8027B510 46201081 */ sub.d $f2, $f2, $f0 /* 1A9DF4 8027B514 4622A502 */ mul.d $f20, $f20, $f2 /* 1A9DF8 8027B518 00000000 */ nop /* 1A9DFC 8027B51C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 1A9E00 8027B520 44810800 */ mtc1 $at, $f1 /* 1A9E04 8027B524 44800000 */ mtc1 $zero, $f0 /* 1A9E08 8027B528 00000000 */ nop /* 1A9E0C 8027B52C 4620A502 */ mul.d $f20, $f20, $f0 /* 1A9E10 8027B530 00000000 */ nop /* 1A9E14 8027B534 0809ED7D */ j .L8027B5F4 /* 1A9E18 8027B538 4634B580 */ add.d $f22, $f22, $f20 glabel .L8027B53C /* 1A9E1C 8027B53C 44916000 */ mtc1 $s1, $f12 /* 1A9E20 8027B540 00000000 */ nop /* 1A9E24 8027B544 46806320 */ cvt.s.w $f12, $f12 /* 1A9E28 8027B548 3C01802A */ lui $at, %hi(D_8029DA00) /* 1A9E2C 8027B54C D420DA00 */ ldc1 $f0, %lo(D_8029DA00)($at) /* 1A9E30 8027B550 46006321 */ cvt.d.s $f12, $f12 /* 1A9E34 8027B554 46206302 */ mul.d $f12, $f12, $f0 /* 1A9E38 8027B558 00000000 */ nop /* 1A9E3C 8027B55C 4618D501 */ sub.s $f20, $f26, $f24 /* 1A9E40 8027B560 44900000 */ mtc1 $s0, $f0 /* 1A9E44 8027B564 00000000 */ nop /* 1A9E48 8027B568 46800020 */ cvt.s.w $f0, $f0 /* 1A9E4C 8027B56C 46000021 */ cvt.d.s $f0, $f0 /* 1A9E50 8027B570 46206303 */ div.d $f12, $f12, $f0 /* 1A9E54 8027B574 0C00A85B */ jal sin_rad /* 1A9E58 8027B578 46206320 */ cvt.s.d $f12, $f12 /* 1A9E5C 8027B57C 4600A502 */ mul.s $f20, $f20, $f0 /* 1A9E60 8027B580 00000000 */ nop /* 1A9E64 8027B584 0809ED80 */ j .L8027B600 /* 1A9E68 8027B588 4614C000 */ add.s $f0, $f24, $f20 glabel .L8027B58C /* 1A9E6C 8027B58C 44916000 */ mtc1 $s1, $f12 /* 1A9E70 8027B590 00000000 */ nop /* 1A9E74 8027B594 46806320 */ cvt.s.w $f12, $f12 /* 1A9E78 8027B598 3C01802A */ lui $at, %hi(D_8029DA08) /* 1A9E7C 8027B59C D420DA08 */ ldc1 $f0, %lo(D_8029DA08)($at) /* 1A9E80 8027B5A0 46006321 */ cvt.d.s $f12, $f12 /* 1A9E84 8027B5A4 46206302 */ mul.d $f12, $f12, $f0 /* 1A9E88 8027B5A8 00000000 */ nop /* 1A9E8C 8027B5AC 4600C5A1 */ cvt.d.s $f22, $f24 /* 1A9E90 8027B5B0 4618D501 */ sub.s $f20, $f26, $f24 /* 1A9E94 8027B5B4 44900000 */ mtc1 $s0, $f0 /* 1A9E98 8027B5B8 00000000 */ nop /* 1A9E9C 8027B5BC 46800020 */ cvt.s.w $f0, $f0 /* 1A9EA0 8027B5C0 46000021 */ cvt.d.s $f0, $f0 /* 1A9EA4 8027B5C4 4600A521 */ cvt.d.s $f20, $f20 /* 1A9EA8 8027B5C8 46206303 */ div.d $f12, $f12, $f0 /* 1A9EAC 8027B5CC 0C00A874 */ jal cos_rad /* 1A9EB0 8027B5D0 46206320 */ cvt.s.d $f12, $f12 /* 1A9EB4 8027B5D4 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 1A9EB8 8027B5D8 44811800 */ mtc1 $at, $f3 /* 1A9EBC 8027B5DC 44801000 */ mtc1 $zero, $f2 /* 1A9EC0 8027B5E0 46000021 */ cvt.d.s $f0, $f0 /* 1A9EC4 8027B5E4 46201081 */ sub.d $f2, $f2, $f0 /* 1A9EC8 8027B5E8 4622A502 */ mul.d $f20, $f20, $f2 /* 1A9ECC 8027B5EC 00000000 */ nop /* 1A9ED0 8027B5F0 4634B580 */ add.d $f22, $f22, $f20 .L8027B5F4: /* 1A9ED4 8027B5F4 0809ED80 */ j .L8027B600 /* 1A9ED8 8027B5F8 4620B020 */ cvt.s.d $f0, $f22 .L8027B5FC: /* 1A9EDC 8027B5FC 44800000 */ mtc1 $zero, $f0 .L8027B600: /* 1A9EE0 8027B600 8FBF0018 */ lw $ra, 0x18($sp) /* 1A9EE4 8027B604 8FB10014 */ lw $s1, 0x14($sp) /* 1A9EE8 8027B608 8FB00010 */ lw $s0, 0x10($sp) /* 1A9EEC 8027B60C D7BA0038 */ ldc1 $f26, 0x38($sp) /* 1A9EF0 8027B610 D7B80030 */ ldc1 $f24, 0x30($sp) /* 1A9EF4 8027B614 D7B60028 */ ldc1 $f22, 0x28($sp) /* 1A9EF8 8027B618 D7B40020 */ ldc1 $f20, 0x20($sp) /* 1A9EFC 8027B61C 03E00008 */ jr $ra /* 1A9F00 8027B620 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: f32 update_lerp_battle(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration) { s32 timeLeft; f32 absMag; f64 start1; f64 start2; f32 len1; f32 len2; f32 len3; f32 len4; f64 len5; f32 len6; f64 len7; switch (easing) { case EASING_LINEAR: return start + (end - start) * elapsed / duration; case EASING_QUADRATIC_IN: return start + SQ(elapsed) * (end - start) / SQ(duration); case EASING_CUBIC_IN: return start + CUBE(elapsed) * (end - start) / CUBE(duration); case EASING_QUARTIC_IN: return start + QUART(elapsed) * (end - start) / QUART(duration); case EASING_COS_SLOW_OVERSHOOT: len1 = end - start; return end - (len1 * cos_rad(((f32)elapsed / duration) * PI_D * 4.0) * (duration - elapsed) * (duration - elapsed)) / SQ((f32)duration); case EASING_COS_FAST_OVERSHOOT: len2 = end - start; return end - (len2 * cos_rad((((f32)SQ(elapsed) / duration) * PI_D * 4.0) / 15.0) * (duration - elapsed) * (duration - elapsed)) / SQ((f32)duration); case EASING_QUADRATIC_OUT: timeLeft = duration - elapsed; return start + (end - start) - ((SQ(timeLeft) * (end - start))) / SQ(duration); case EASING_CUBIC_OUT: len3 = end - start; timeLeft = duration - elapsed; return start + len3 - ((CUBE(timeLeft) * len3)) / CUBE(duration); case EASING_QUARTIC_OUT: len4 = end - start; timeLeft = duration - elapsed; return start + len4 - ((QUART(timeLeft) * len4)) / QUART(duration); case EASING_COS_BOUNCE: absMag = cos_rad((((f32)SQ(elapsed) / duration) * PI_D * 4.0) / 40.0) * (duration - elapsed) * (duration - elapsed) / SQ((f32)duration); if (absMag < 0.0f) { absMag = -absMag; } return end - (end - start) * absMag; case EASING_COS_IN_OUT: len5 = end - start; start1 = start; return start1 + (len5 * (1.0 - cos_rad(((f32)elapsed * PI_D) / (f32)duration)) / 2); case EASING_SIN_OUT: len6 = end - start; return start + (len6 * sin_rad((((f32) elapsed) * (PI_D / 2)) / ((f32) duration))); case EASING_COS_IN: len7 = end - start; start2 = start; return start2 + (len7 * (1.0 - cos_rad(((f32)elapsed * (PI_D / 2)) / (f32)duration))); } return 0.0f; }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_windows /* DDD98 80147698 27BDFF10 */ addiu $sp, $sp, -0xF0 /* DDD9C 8014769C AFB700DC */ sw $s7, 0xDC($sp) /* DDDA0 801476A0 00A0B82D */ daddu $s7, $a1, $zero /* DDDA4 801476A4 AFB600D8 */ sw $s6, 0xD8($sp) /* DDDA8 801476A8 0000B02D */ daddu $s6, $zero, $zero /* DDDAC 801476AC AFB300CC */ sw $s3, 0xCC($sp) /* DDDB0 801476B0 AFA400F0 */ sw $a0, 0xF0($sp) /* DDDB4 801476B4 0080982D */ daddu $s3, $a0, $zero /* DDDB8 801476B8 00171140 */ sll $v0, $s7, 5 /* DDDBC 801476BC F7B400E8 */ sdc1 $f20, 0xE8($sp) /* DDDC0 801476C0 4480A000 */ mtc1 $zero, $f20 /* DDDC4 801476C4 3C0B8016 */ lui $t3, %hi(gWindows) /* DDDC8 801476C8 256B9D50 */ addiu $t3, $t3, %lo(gWindows) /* DDDCC 801476CC AFBE00E0 */ sw $fp, 0xE0($sp) /* DDDD0 801476D0 004BF021 */ addu $fp, $v0, $t3 /* DDDD4 801476D4 AFBF00E4 */ sw $ra, 0xE4($sp) /* DDDD8 801476D8 AFB500D4 */ sw $s5, 0xD4($sp) /* DDDDC 801476DC AFB400D0 */ sw $s4, 0xD0($sp) /* DDDE0 801476E0 AFB200C8 */ sw $s2, 0xC8($sp) /* DDDE4 801476E4 AFB100C4 */ sw $s1, 0xC4($sp) /* DDDE8 801476E8 AFB000C0 */ sw $s0, 0xC0($sp) /* DDDEC 801476EC AFA600F8 */ sw $a2, 0xF8($sp) /* DDDF0 801476F0 AFA700FC */ sw $a3, 0xFC($sp) .L801476F4: /* DDDF4 801476F4 8E720000 */ lw $s2, 0x0($s3) /* DDDF8 801476F8 064200E2 */ bltzl $s2, .L80147A84 /* DDDFC 801476FC 26D60001 */ addiu $s6, $s6, 0x1 /* DDE00 80147700 00121140 */ sll $v0, $s2, 5 /* DDE04 80147704 3C0B8016 */ lui $t3, %hi(gWindows) /* DDE08 80147708 256B9D50 */ addiu $t3, $t3, %lo(gWindows) /* DDE0C 8014770C 004B8821 */ addu $s1, $v0, $t3 /* DDE10 80147710 92220000 */ lbu $v0, 0x0($s1) /* DDE14 80147714 504000DB */ beql $v0, $zero, .L80147A84 /* DDE18 80147718 26D60001 */ addiu $s6, $s6, 0x1 /* DDE1C 8014771C 30420020 */ andi $v0, $v0, 0x20 /* DDE20 80147720 544000D8 */ bnel $v0, $zero, .L80147A84 /* DDE24 80147724 26D60001 */ addiu $s6, $s6, 0x1 /* DDE28 80147728 8E250004 */ lw $a1, 0x4($s1) /* DDE2C 8014772C 50A000D5 */ beql $a1, $zero, .L80147A84 /* DDE30 80147730 26D60001 */ addiu $s6, $s6, 0x1 /* DDE34 80147734 82220003 */ lb $v0, 0x3($s1) /* DDE38 80147738 545700D2 */ bnel $v0, $s7, .L80147A84 /* DDE3C 8014773C 26D60001 */ addiu $s6, $s6, 0x1 /* DDE40 80147740 9226001C */ lbu $a2, 0x1C($s1) /* DDE44 80147744 AFA0009C */ sw $zero, 0x9C($sp) /* DDE48 80147748 AFA00090 */ sw $zero, 0x90($sp) /* DDE4C 8014774C E7B400B0 */ swc1 $f20, 0xB0($sp) /* DDE50 80147750 E7B400AC */ swc1 $f20, 0xAC($sp) /* DDE54 80147754 E7B400A8 */ swc1 $f20, 0xA8($sp) /* DDE58 80147758 AFA000B4 */ sw $zero, 0xB4($sp) /* DDE5C 8014775C 8623000C */ lh $v1, 0xC($s1) /* DDE60 80147760 8624000E */ lh $a0, 0xE($s1) /* DDE64 80147764 240200FF */ addiu $v0, $zero, 0xFF /* DDE68 80147768 AFA200B8 */ sw $v0, 0xB8($sp) /* DDE6C 8014776C 24A2FFFF */ addiu $v0, $a1, -0x1 /* DDE70 80147770 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DDE74 80147774 44810000 */ mtc1 $at, $f0 /* DDE78 80147778 2C42000D */ sltiu $v0, $v0, 0xD /* DDE7C 8014777C AFA30094 */ sw $v1, 0x94($sp) /* DDE80 80147780 AFA40098 */ sw $a0, 0x98($sp) /* DDE84 80147784 E7A000A0 */ swc1 $f0, 0xA0($sp) /* DDE88 80147788 E7A000A4 */ swc1 $f0, 0xA4($sp) /* DDE8C 8014778C 86340010 */ lh $s4, 0x10($s1) /* DDE90 80147790 86350012 */ lh $s5, 0x12($s1) /* DDE94 80147794 10400022 */ beqz $v0, .L80147820 /* DDE98 80147798 00051080 */ sll $v0, $a1, 2 /* DDE9C 8014779C 3C038015 */ lui $v1, %hi(gSimpleWindowUpdates) /* DDEA0 801477A0 2463F250 */ addiu $v1, $v1, %lo(gSimpleWindowUpdates) /* DDEA4 801477A4 00451021 */ addu $v0, $v0, $a1 /* DDEA8 801477A8 00438021 */ addu $s0, $v0, $v1 /* DDEAC 801477AC 92230000 */ lbu $v1, 0x0($s1) /* DDEB0 801477B0 92020001 */ lbu $v0, 0x1($s0) /* DDEB4 801477B4 00621825 */ or $v1, $v1, $v0 /* DDEB8 801477B8 A2230000 */ sb $v1, 0x0($s1) /* DDEBC 801477BC 92020002 */ lbu $v0, 0x2($s0) /* DDEC0 801477C0 00021027 */ nor $v0, $zero, $v0 /* DDEC4 801477C4 00621824 */ and $v1, $v1, $v0 /* DDEC8 801477C8 14C00008 */ bnez $a2, .L801477EC /* DDECC 801477CC A2230000 */ sb $v1, 0x0($s1) /* DDED0 801477D0 92020000 */ lbu $v0, 0x0($s0) /* DDED4 801477D4 30420001 */ andi $v0, $v0, 0x1 /* DDED8 801477D8 10400004 */ beqz $v0, .L801477EC /* DDEDC 801477DC 00000000 */ nop /* DDEE0 801477E0 92250002 */ lbu $a1, 0x2($s1) /* DDEE4 801477E4 0C051F5C */ jal update_window_hierarchy /* DDEE8 801477E8 0240202D */ daddu $a0, $s2, $zero .L801477EC: /* DDEEC 801477EC 92020000 */ lbu $v0, 0x0($s0) /* DDEF0 801477F0 30420004 */ andi $v0, $v0, 0x4 /* DDEF4 801477F4 10400003 */ beqz $v0, .L80147804 /* DDEF8 801477F8 00000000 */ nop /* DDEFC 801477FC 92020003 */ lbu $v0, 0x3($s0) /* DDF00 80147800 AFA200B4 */ sw $v0, 0xB4($sp) .L80147804: /* DDF04 80147804 92020000 */ lbu $v0, 0x0($s0) /* DDF08 80147808 30420002 */ andi $v0, $v0, 0x2 /* DDF0C 8014780C 1040001A */ beqz $v0, .L80147878 /* DDF10 80147810 00000000 */ nop /* DDF14 80147814 92020004 */ lbu $v0, 0x4($s0) /* DDF18 80147818 08051E1E */ j .L80147878 /* DDF1C 8014781C AFA200B8 */ sw $v0, 0xB8($sp) .L80147820: /* DDF20 80147820 0240202D */ daddu $a0, $s2, $zero /* DDF24 80147824 27A50090 */ addiu $a1, $sp, 0x90 /* DDF28 80147828 27A60094 */ addiu $a2, $sp, 0x94 /* DDF2C 8014782C 27A70098 */ addiu $a3, $sp, 0x98 /* DDF30 80147830 8E220004 */ lw $v0, 0x4($s1) /* DDF34 80147834 27A3009C */ addiu $v1, $sp, 0x9C /* DDF38 80147838 AFA30010 */ sw $v1, 0x10($sp) /* DDF3C 8014783C 27A300A0 */ addiu $v1, $sp, 0xA0 /* DDF40 80147840 AFA30014 */ sw $v1, 0x14($sp) /* DDF44 80147844 27A300A4 */ addiu $v1, $sp, 0xA4 /* DDF48 80147848 AFA30018 */ sw $v1, 0x18($sp) /* DDF4C 8014784C 27A300A8 */ addiu $v1, $sp, 0xA8 /* DDF50 80147850 AFA3001C */ sw $v1, 0x1C($sp) /* DDF54 80147854 27A300AC */ addiu $v1, $sp, 0xAC /* DDF58 80147858 AFA30020 */ sw $v1, 0x20($sp) /* DDF5C 8014785C 27A300B0 */ addiu $v1, $sp, 0xB0 /* DDF60 80147860 AFA30024 */ sw $v1, 0x24($sp) /* DDF64 80147864 27A300B4 */ addiu $v1, $sp, 0xB4 /* DDF68 80147868 AFA30028 */ sw $v1, 0x28($sp) /* DDF6C 8014786C 27A300B8 */ addiu $v1, $sp, 0xB8 /* DDF70 80147870 0040F809 */ jalr $v0 /* DDF74 80147874 AFA3002C */ sw $v1, 0x2C($sp) .L80147878: /* DDF78 80147878 8E220004 */ lw $v0, 0x4($s1) /* DDF7C 8014787C 10400006 */ beqz $v0, .L80147898 /* DDF80 80147880 00000000 */ nop /* DDF84 80147884 9223001C */ lbu $v1, 0x1C($s1) /* DDF88 80147888 2C6200FF */ sltiu $v0, $v1, 0xFF /* DDF8C 8014788C 10400002 */ beqz $v0, .L80147898 /* DDF90 80147890 24620001 */ addiu $v0, $v1, 0x1 /* DDF94 80147894 A222001C */ sb $v0, 0x1C($s1) .L80147898: /* DDF98 80147898 C7A000A0 */ lwc1 $f0, 0xA0($sp) /* DDF9C 8014789C 46140032 */ c.eq.s $f0, $f20 /* DDFA0 801478A0 00000000 */ nop /* DDFA4 801478A4 45030077 */ bc1tl .L80147A84 /* DDFA8 801478A8 26D60001 */ addiu $s6, $s6, 0x1 /* DDFAC 801478AC C7A000A4 */ lwc1 $f0, 0xA4($sp) /* DDFB0 801478B0 46140032 */ c.eq.s $f0, $f20 /* DDFB4 801478B4 00000000 */ nop /* DDFB8 801478B8 45030072 */ bc1tl .L80147A84 /* DDFBC 801478BC 26D60001 */ addiu $s6, $s6, 0x1 /* DDFC0 801478C0 92220000 */ lbu $v0, 0x0($s1) /* DDFC4 801478C4 30420004 */ andi $v0, $v0, 0x4 /* DDFC8 801478C8 5440006E */ bnel $v0, $zero, .L80147A84 /* DDFCC 801478CC 26D60001 */ addiu $s6, $s6, 0x1 /* DDFD0 801478D0 8FA300B8 */ lw $v1, 0xB8($sp) /* DDFD4 801478D4 8FAB0104 */ lw $t3, 0x104($sp) /* DDFD8 801478D8 006B0018 */ mult $v1, $t3 /* DDFDC 801478DC 3C028080 */ lui $v0, (0x80808081 >> 16) /* DDFE0 801478E0 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF) /* DDFE4 801478E4 00001812 */ mflo $v1 /* DDFE8 801478E8 8FA400B4 */ lw $a0, 0xB4($sp) /* DDFEC 801478EC 8FAB0108 */ lw $t3, 0x108($sp) /* DDFF0 801478F0 00620018 */ mult $v1, $v0 /* DDFF4 801478F4 008B2021 */ addu $a0, $a0, $t3 /* DDFF8 801478F8 AFA400B4 */ sw $a0, 0xB4($sp) /* DDFFC 801478FC 28840100 */ slti $a0, $a0, 0x100 /* DE000 80147900 00004010 */ mfhi $t0 /* DE004 80147904 01031021 */ addu $v0, $t0, $v1 /* DE008 80147908 000211C3 */ sra $v0, $v0, 7 /* DE00C 8014790C 00031FC3 */ sra $v1, $v1, 31 /* DE010 80147910 00431023 */ subu $v0, $v0, $v1 /* DE014 80147914 AFA200B8 */ sw $v0, 0xB8($sp) /* DE018 80147918 00121080 */ sll $v0, $s2, 2 /* DE01C 8014791C 8E290014 */ lw $t1, 0x14($s1) /* DE020 80147920 8E2A0018 */ lw $t2, 0x18($s1) /* DE024 80147924 3C058015 */ lui $a1, %hi(gWindowStyles) /* DE028 80147928 00A22821 */ addu $a1, $a1, $v0 /* DE02C 8014792C 8CA5F150 */ lw $a1, %lo(gWindowStyles)($a1) /* DE030 80147930 14800003 */ bnez $a0, .L80147940 /* DE034 80147934 27B00050 */ addiu $s0, $sp, 0x50 /* DE038 80147938 240200FF */ addiu $v0, $zero, 0xFF /* DE03C 8014793C AFA200B4 */ sw $v0, 0xB4($sp) .L80147940: /* DE040 80147940 8FA20090 */ lw $v0, 0x90($sp) /* DE044 80147944 8FAB00F8 */ lw $t3, 0xF8($sp) /* DE048 80147948 004B1025 */ or $v0, $v0, $t3 /* DE04C 8014794C AFA20090 */ sw $v0, 0x90($sp) /* DE050 80147950 31620001 */ andi $v0, $t3, 0x1 /* DE054 80147954 1440000A */ bnez $v0, .L80147980 /* DE058 80147958 2402FFFF */ addiu $v0, $zero, -0x1 /* DE05C 8014795C 8FA20094 */ lw $v0, 0x94($sp) /* DE060 80147960 8FAB00FC */ lw $t3, 0xFC($sp) /* DE064 80147964 8FA30098 */ lw $v1, 0x98($sp) /* DE068 80147968 004B1021 */ addu $v0, $v0, $t3 /* DE06C 8014796C 8FAB0100 */ lw $t3, 0x100($sp) /* DE070 80147970 AFA20094 */ sw $v0, 0x94($sp) /* DE074 80147974 006B1821 */ addu $v1, $v1, $t3 /* DE078 80147978 AFA30098 */ sw $v1, 0x98($sp) /* DE07C 8014797C 2402FFFF */ addiu $v0, $zero, -0x1 .L80147980: /* DE080 80147980 12E20002 */ beq $s7, $v0, .L8014798C /* DE084 80147984 24080140 */ addiu $t0, $zero, 0x140 /* DE088 80147988 87C80010 */ lh $t0, 0x10($fp) .L8014798C: /* DE08C 8014798C 2402FFFF */ addiu $v0, $zero, -0x1 /* DE090 80147990 12E20002 */ beq $s7, $v0, .L8014799C /* DE094 80147994 240300F0 */ addiu $v1, $zero, 0xF0 /* DE098 80147998 87C30012 */ lh $v1, 0x12($fp) .L8014799C: /* DE09C 8014799C 92220000 */ lbu $v0, 0x0($s1) /* DE0A0 801479A0 8FA40090 */ lw $a0, 0x90($sp) /* DE0A4 801479A4 30420040 */ andi $v0, $v0, 0x40 /* DE0A8 801479A8 54400001 */ bnel $v0, $zero, .L801479B0 /* DE0AC 801479AC 34840002 */ ori $a0, $a0, 0x2 .L801479B0: /* DE0B0 801479B0 8FA60094 */ lw $a2, 0x94($sp) /* DE0B4 801479B4 8FA70098 */ lw $a3, 0x98($sp) /* DE0B8 801479B8 8FA2009C */ lw $v0, 0x9C($sp) /* DE0BC 801479BC 8FAB010C */ lw $t3, 0x10C($sp) /* DE0C0 801479C0 AFB40014 */ sw $s4, 0x14($sp) /* DE0C4 801479C4 AFB50018 */ sw $s5, 0x18($sp) /* DE0C8 801479C8 AFA20010 */ sw $v0, 0x10($sp) /* DE0CC 801479CC 93A200BB */ lbu $v0, 0xBB($sp) /* DE0D0 801479D0 AFA2001C */ sw $v0, 0x1C($sp) /* DE0D4 801479D4 93A200B7 */ lbu $v0, 0xB7($sp) /* DE0D8 801479D8 AFA20020 */ sw $v0, 0x20($sp) /* DE0DC 801479DC C7A000A0 */ lwc1 $f0, 0xA0($sp) /* DE0E0 801479E0 E7A00024 */ swc1 $f0, 0x24($sp) /* DE0E4 801479E4 C7A000A4 */ lwc1 $f0, 0xA4($sp) /* DE0E8 801479E8 E7A00028 */ swc1 $f0, 0x28($sp) /* DE0EC 801479EC C7A000A8 */ lwc1 $f0, 0xA8($sp) /* DE0F0 801479F0 E7A0002C */ swc1 $f0, 0x2C($sp) /* DE0F4 801479F4 C7A000AC */ lwc1 $f0, 0xAC($sp) /* DE0F8 801479F8 E7A00030 */ swc1 $f0, 0x30($sp) /* DE0FC 801479FC C7A000B0 */ lwc1 $f0, 0xB0($sp) /* DE100 80147A00 AFA90038 */ sw $t1, 0x38($sp) /* DE104 80147A04 AFAA003C */ sw $t2, 0x3C($sp) /* DE108 80147A08 AFAB0040 */ sw $t3, 0x40($sp) /* DE10C 80147A0C AFA80044 */ sw $t0, 0x44($sp) /* DE110 80147A10 AFA30048 */ sw $v1, 0x48($sp) /* DE114 80147A14 AFB0004C */ sw $s0, 0x4C($sp) /* DE118 80147A18 0C03D4B8 */ jal draw_box /* DE11C 80147A1C E7A00034 */ swc1 $f0, 0x34($sp) /* DE120 80147A20 54400018 */ bnel $v0, $zero, .L80147A84 /* DE124 80147A24 26D60001 */ addiu $s6, $s6, 0x1 /* DE128 80147A28 8FA20090 */ lw $v0, 0x90($sp) /* DE12C 80147A2C 14400004 */ bnez $v0, .L80147A40 /* DE130 80147A30 00000000 */ nop /* DE134 80147A34 8FAB010C */ lw $t3, 0x10C($sp) /* DE138 80147A38 51600001 */ beql $t3, $zero, .L80147A40 /* DE13C 80147A3C 0000802D */ daddu $s0, $zero, $zero .L80147A40: /* DE140 80147A40 92220000 */ lbu $v0, 0x0($s1) /* DE144 80147A44 30420010 */ andi $v0, $v0, 0x10 /* DE148 80147A48 5040000E */ beql $v0, $zero, .L80147A84 /* DE14C 80147A4C 26D60001 */ addiu $s6, $s6, 0x1 /* DE150 80147A50 8FA20098 */ lw $v0, 0x98($sp) /* DE154 80147A54 8FA400F0 */ lw $a0, 0xF0($sp) /* DE158 80147A58 8FA60090 */ lw $a2, 0x90($sp) /* DE15C 80147A5C 8FA70094 */ lw $a3, 0x94($sp) /* DE160 80147A60 AFA20010 */ sw $v0, 0x10($sp) /* DE164 80147A64 8FA200B8 */ lw $v0, 0xB8($sp) /* DE168 80147A68 AFA20014 */ sw $v0, 0x14($sp) /* DE16C 80147A6C 8FA200B4 */ lw $v0, 0xB4($sp) /* DE170 80147A70 0240282D */ daddu $a1, $s2, $zero /* DE174 80147A74 AFB0001C */ sw $s0, 0x1C($sp) /* DE178 80147A78 0C051DA6 */ jal render_windows /* DE17C 80147A7C AFA20018 */ sw $v0, 0x18($sp) /* DE180 80147A80 26D60001 */ addiu $s6, $s6, 0x1 .L80147A84: /* DE184 80147A84 2AC20040 */ slti $v0, $s6, 0x40 /* DE188 80147A88 1440FF1A */ bnez $v0, .L801476F4 /* DE18C 80147A8C 26730004 */ addiu $s3, $s3, 0x4 /* DE190 80147A90 8FBF00E4 */ lw $ra, 0xE4($sp) /* DE194 80147A94 8FBE00E0 */ lw $fp, 0xE0($sp) /* DE198 80147A98 8FB700DC */ lw $s7, 0xDC($sp) /* DE19C 80147A9C 8FB600D8 */ lw $s6, 0xD8($sp) /* DE1A0 80147AA0 8FB500D4 */ lw $s5, 0xD4($sp) /* DE1A4 80147AA4 8FB400D0 */ lw $s4, 0xD0($sp) /* DE1A8 80147AA8 8FB300CC */ lw $s3, 0xCC($sp) /* DE1AC 80147AAC 8FB200C8 */ lw $s2, 0xC8($sp) /* DE1B0 80147AB0 8FB100C4 */ lw $s1, 0xC4($sp) /* DE1B4 80147AB4 8FB000C0 */ lw $s0, 0xC0($sp) /* DE1B8 80147AB8 D7B400E8 */ ldc1 $f20, 0xE8($sp) /* DE1BC 80147ABC 03E00008 */ jr $ra /* DE1C0 80147AC0 27BD00F0 */ addiu $sp, $sp, 0xF0 ### DECOMPILED C INSTRUCTIONS: void render_windows(s32* windowsArray, s32 parent, s32 flags, s32 baseX, s32 baseY, s32 opacity, s32 darkening, f32 (*rotScaleMtx)[4]) { Window* window; Window* childWindow; s32 i; s32 childWindowID; s32 counter; Matrix4f matrix; f32 (*outMtx)[4]; s32 childFlags; s32 posX, posY, posZ; f32 scaleX, scaleY, rotX, rotY, rotZ; s32 childDarkening, childOpacity; s32 boxFlags; s32 boxTranslateX; s32 boxTranslateY; s32 fpUpdateIdx; s32 width, height; s32 (*fpUpdateFunc)(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY, f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity); s32 childWindowIdCopy; WindowStyle windowStyle; void* fpDrawContents; void* drawContentsArg0; s32* windowArrayIt; for (i = 0, windowArrayIt = windowsArray; i < ARRAY_COUNT(gWindows); i++, windowArrayIt++) { window = &gWindows[parent]; childWindowID = *windowArrayIt; if (childWindowID < 0) { continue; } childWindow = &gWindows[childWindowID]; if (childWindow->flags == 0 || (childWindow->flags & WINDOW_FLAG_DISABLED)) { continue; } fpUpdateIdx = childWindow->fpUpdate.i; if (fpUpdateIdx == 0 || childWindow->parent != parent) { continue; } counter = childWindow->updateCounter; posX = childWindow->pos.x; posY = childWindow->pos.y; posZ = 0; childFlags = 0; rotX = rotY = rotZ = 0.0f; scaleY = scaleX = 1.0f; childDarkening = 0; childOpacity = 255; width = childWindow->width; height = childWindow->height; if (fpUpdateIdx > 0 && fpUpdateIdx < 14) { SimpleWindowUpdateData* updateData = &gSimpleWindowUpdates[fpUpdateIdx]; childWindow->flags |= updateData->windowFlagsSet; childWindow->flags &= ~updateData->windowFlagsUnset; if (counter == 0 && (updateData->flags & SIMPLE_WINDOW_UPDATE_1)) { update_window_hierarchy(childWindowID, childWindow->originalPriority); } if (updateData->flags & SIMPLE_WINDOW_UPDATE_DARKENING) { childDarkening = updateData->darkening; } if (updateData->flags & SIMPLE_WINDOW_UPDATE_OPACITY) { childOpacity = updateData->opacity; } } else { //type conversion needed for matching fpUpdateFunc = (s32 (*)(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY, f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity))(childWindow->fpUpdate.func); fpUpdateFunc(childWindowID, &childFlags, &posX, &posY, &posZ, &scaleX, &scaleY, &rotX, &rotY, &rotZ, &childDarkening, &childOpacity); } if (childWindow->fpUpdate.i) { if (childWindow->updateCounter < 255) { childWindow->updateCounter++; } } if (scaleX == 0 || scaleY == 0 || (childWindow->flags & WINDOW_FLAG_HIDDEN)) { continue; } childDarkening += darkening; childOpacity = childOpacity * opacity / 255; fpDrawContents = childWindow->fpDrawContents; drawContentsArg0 = childWindow->drawContentsArg0; windowStyle = gWindowStyles[childWindowID]; outMtx = matrix; //needed to match childWindowIdCopy = childWindowID; if (childDarkening > 255) { childDarkening = 255; } childFlags |= flags; if (!(flags & DRAW_FLAG_ROTSCALE)) { posX += baseX; posY += baseY; } if (parent == -1) { boxTranslateX = SCREEN_WIDTH; } else { boxTranslateX = window->width; } boxTranslateY = SCREEN_HEIGHT; if (parent != -1) { boxTranslateY = window->height; } boxFlags = childFlags; if (childWindow->flags & WINDOW_FLAG_40) { boxFlags |= DRAW_FLAG_ANIMATED_BACKGROUND; } if (draw_box(boxFlags, windowStyle, posX, posY, posZ, width, height, childOpacity, childDarkening, scaleX, scaleY, rotX, rotY, rotZ, fpDrawContents, drawContentsArg0, rotScaleMtx, boxTranslateX, boxTranslateY, outMtx) == 0) { if (childFlags == 0 && rotScaleMtx == 0) { outMtx = NULL; } if (childWindow->flags & WINDOW_FLAG_HAS_CHILDREN) { render_windows(windowsArray, childWindowIdCopy, childFlags, posX, posY, childOpacity, childDarkening, outMtx); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_exit_language_select /* 10B04 80035704 3C03800A */ lui $v1, %hi(D_800A0931) /* 10B08 80035708 80630931 */ lb $v1, %lo(D_800A0931)($v1) /* 10B0C 8003570C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 10B10 80035710 AFBF0024 */ sw $ra, 0x24($sp) /* 10B14 80035714 AFB20020 */ sw $s2, 0x20($sp) /* 10B18 80035718 AFB1001C */ sw $s1, 0x1C($sp) /* 10B1C 8003571C 2C620005 */ sltiu $v0, $v1, 0x5 /* 10B20 80035720 10400101 */ beqz $v0, .L80035B28 /* 10B24 80035724 AFB00018 */ sw $s0, 0x18($sp) /* 10B28 80035728 00031080 */ sll $v0, $v1, 2 /* 10B2C 8003572C 3C01800A */ lui $at, %hi(jtbl_800982E8) /* 10B30 80035730 00220821 */ addu $at, $at, $v0 /* 10B34 80035734 8C2282E8 */ lw $v0, %lo(jtbl_800982E8)($at) /* 10B38 80035738 00400008 */ jr $v0 /* 10B3C 8003573C 00000000 */ nop glabel .L80035740 /* 10B40 80035740 3C10800A */ lui $s0, %hi(D_800A0932) /* 10B44 80035744 26100932 */ addiu $s0, $s0, %lo(D_800A0932) /* 10B48 80035748 86020000 */ lh $v0, 0x0($s0) /* 10B4C 8003574C 96030000 */ lhu $v1, 0x0($s0) /* 10B50 80035750 1040000F */ beqz $v0, .L80035790 /* 10B54 80035754 2462FFEC */ addiu $v0, $v1, -0x14 /* 10B58 80035758 A6020000 */ sh $v0, 0x0($s0) /* 10B5C 8003575C 00021400 */ sll $v0, $v0, 16 /* 10B60 80035760 04420001 */ bltzl $v0, .L80035768 /* 10B64 80035764 A6000000 */ sh $zero, 0x0($s0) .L80035768: /* 10B68 80035768 86020000 */ lh $v0, 0x0($s0) /* 10B6C 8003576C 44820000 */ mtc1 $v0, $f0 /* 10B70 80035770 00000000 */ nop /* 10B74 80035774 46800020 */ cvt.s.w $f0, $f0 /* 10B78 80035778 44050000 */ mfc1 $a1, $f0 /* 10B7C 8003577C 0C04DF62 */ jal set_screen_overlay_params_front /* 10B80 80035780 0000202D */ daddu $a0, $zero, $zero /* 10B84 80035784 86020000 */ lh $v0, 0x0($s0) /* 10B88 80035788 144000E7 */ bnez $v0, .L80035B28 /* 10B8C 8003578C 00000000 */ nop .L80035790: /* 10B90 80035790 24020001 */ addiu $v0, $zero, 0x1 /* 10B94 80035794 3C01800A */ lui $at, %hi(D_800A0931) /* 10B98 80035798 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 10B9C 8003579C 0800D6CA */ j .L80035B28 /* 10BA0 800357A0 00000000 */ nop glabel .L800357A4 /* 10BA4 800357A4 3C10800A */ lui $s0, %hi(D_800A0932) /* 10BA8 800357A8 26100932 */ addiu $s0, $s0, %lo(D_800A0932) /* 10BAC 800357AC 241100FF */ addiu $s1, $zero, 0xFF /* 10BB0 800357B0 86020000 */ lh $v0, 0x0($s0) /* 10BB4 800357B4 96030000 */ lhu $v1, 0x0($s0) /* 10BB8 800357B8 10510011 */ beq $v0, $s1, .L80035800 /* 10BBC 800357BC 24620014 */ addiu $v0, $v1, 0x14 /* 10BC0 800357C0 A6020000 */ sh $v0, 0x0($s0) /* 10BC4 800357C4 00021400 */ sll $v0, $v0, 16 /* 10BC8 800357C8 00021403 */ sra $v0, $v0, 16 /* 10BCC 800357CC 28420100 */ slti $v0, $v0, 0x100 /* 10BD0 800357D0 50400001 */ beql $v0, $zero, .L800357D8 /* 10BD4 800357D4 A6110000 */ sh $s1, 0x0($s0) .L800357D8: /* 10BD8 800357D8 86020000 */ lh $v0, 0x0($s0) /* 10BDC 800357DC 44820000 */ mtc1 $v0, $f0 /* 10BE0 800357E0 00000000 */ nop /* 10BE4 800357E4 46800020 */ cvt.s.w $f0, $f0 /* 10BE8 800357E8 44050000 */ mfc1 $a1, $f0 /* 10BEC 800357EC 0C04DF62 */ jal set_screen_overlay_params_front /* 10BF0 800357F0 0000202D */ daddu $a0, $zero, $zero /* 10BF4 800357F4 86020000 */ lh $v0, 0x0($s0) /* 10BF8 800357F8 145100CB */ bne $v0, $s1, .L80035B28 /* 10BFC 800357FC 00000000 */ nop .L80035800: /* 10C00 80035800 24020002 */ addiu $v0, $zero, 0x2 /* 10C04 80035804 3C01800A */ lui $at, %hi(D_800A0931) /* 10C08 80035808 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 10C0C 8003580C 0800D6CA */ j .L80035B28 /* 10C10 80035810 00000000 */ nop glabel .L80035814 /* 10C14 80035814 3C06800A */ lui $a2, %hi(D_800A0930) /* 10C18 80035818 24C60930 */ addiu $a2, $a2, %lo(D_800A0930) /* 10C1C 8003581C 80C30000 */ lb $v1, 0x0($a2) /* 10C20 80035820 24020003 */ addiu $v0, $zero, 0x3 /* 10C24 80035824 14620006 */ bne $v1, $v0, .L80035840 /* 10C28 80035828 00000000 */ nop /* 10C2C 8003582C 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 10C30 80035830 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 10C34 80035834 8C620000 */ lw $v0, 0x0($v1) /* 10C38 80035838 34420008 */ ori $v0, $v0, 0x8 /* 10C3C 8003583C AC620000 */ sw $v0, 0x0($v1) .L80035840: /* 10C40 80035840 80C20000 */ lb $v0, 0x0($a2) /* 10C44 80035844 90C30000 */ lbu $v1, 0x0($a2) /* 10C48 80035848 044000B7 */ bltz $v0, .L80035B28 /* 10C4C 8003584C 2462FFFF */ addiu $v0, $v1, -0x1 /* 10C50 80035850 A0C20000 */ sb $v0, 0x0($a2) /* 10C54 80035854 00021600 */ sll $v0, $v0, 24 /* 10C58 80035858 14400067 */ bnez $v0, .L800359F8 /* 10C5C 8003585C 24050003 */ addiu $a1, $zero, 0x3 /* 10C60 80035860 3C048007 */ lui $a0, %hi(fsFrameBuffers) /* 10C64 80035864 24847980 */ addiu $a0, $a0, %lo(fsFrameBuffers) /* 10C68 80035868 2402FFFF */ addiu $v0, $zero, -0x1 /* 10C6C 8003586C 0C017CBC */ jal nuGfxSetCfb /* 10C70 80035870 A0C20000 */ sb $v0, 0x0($a2) /* 10C74 80035874 0C0912C0 */ jal func_80244B00 /* 10C78 80035878 00000000 */ nop /* 10C7C 8003587C 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 10C80 80035880 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 10C84 80035884 8C820000 */ lw $v0, 0x0($a0) /* 10C88 80035888 2403FFF7 */ addiu $v1, $zero, -0x9 /* 10C8C 8003588C 00431024 */ and $v0, $v0, $v1 /* 10C90 80035890 0C016AFA */ jal get_current_map_settings /* 10C94 80035894 AC820000 */ sw $v0, 0x0($a0) /* 10C98 80035898 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 10C9C 8003589C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 10CA0 800358A0 8E040000 */ lw $a0, 0x0($s0) /* 10CA4 800358A4 84830086 */ lh $v1, 0x86($a0) /* 10CA8 800358A8 00031900 */ sll $v1, $v1, 4 /* 10CAC 800358AC 3C058009 */ lui $a1, %hi(gAreas + 0x4) /* 10CB0 800358B0 00A32821 */ addu $a1, $a1, $v1 /* 10CB4 800358B4 8CA534F4 */ lw $a1, %lo(gAreas + 0x4)($a1) /* 10CB8 800358B8 8483008C */ lh $v1, 0x8C($a0) /* 10CBC 800358BC 0040902D */ daddu $s2, $v0, $zero /* 10CC0 800358C0 A0800070 */ sb $zero, 0x70($a0) /* 10CC4 800358C4 00031940 */ sll $v1, $v1, 5 /* 10CC8 800358C8 0C016BE1 */ jal func_8005AF84 /* 10CCC 800358CC 00A38821 */ addu $s1, $a1, $v1 /* 10CD0 800358D0 0C00AB37 */ jal func_8002ACDC /* 10CD4 800358D4 00000000 */ nop /* 10CD8 800358D8 0C05259C */ jal sfx_clear_env_sounds /* 10CDC 800358DC 24040001 */ addiu $a0, $zero, 0x1 /* 10CE0 800358E0 8E020000 */ lw $v0, 0x0($s0) /* 10CE4 800358E4 0C0B763E */ jal spr_init_sprites /* 10CE8 800358E8 80440084 */ lb $a0, 0x84($v0) /* 10CEC 800358EC 0C0457FA */ jal init_model_data /* 10CF0 800358F0 00000000 */ nop /* 10CF4 800358F4 0C05203C */ jal init_sprite_shading_data /* 10CF8 800358F8 00000000 */ nop /* 10CFC 800358FC 0C048316 */ jal init_entity_models /* 10D00 80035900 00000000 */ nop /* 10D04 80035904 0C0478C4 */ jal reset_animator_list /* 10D08 80035908 00000000 */ nop /* 10D0C 8003590C 0C048C45 */ jal init_worker_list /* 10D10 80035910 00000000 */ nop /* 10D14 80035914 0000202D */ daddu $a0, $zero, $zero /* 10D18 80035918 0C0514BA */ jal hud_element_set_aux_cache /* 10D1C 8003591C 0080282D */ daddu $a1, $a0, $zero /* 10D20 80035920 0C0504C0 */ jal init_hud_element_list /* 10D24 80035924 00000000 */ nop /* 10D28 80035928 0C04C433 */ jal init_item_entity_list /* 10D2C 8003592C 00000000 */ nop /* 10D30 80035930 0C0B0CBB */ jal init_script_list /* 10D34 80035934 00000000 */ nop /* 10D38 80035938 0C00E14B */ jal init_npc_list /* 10D3C 8003593C 00000000 */ nop /* 10D40 80035940 0C044396 */ jal init_entity_data /* 10D44 80035944 00000000 */ nop /* 10D48 80035948 0C0515CA */ jal init_trigger_list /* 10D4C 8003594C 00000000 */ nop /* 10D50 80035950 3C04800E */ lui $a0, %hi(wMapShapeName) /* 10D54 80035954 24849230 */ addiu $a0, $a0, %lo(wMapShapeName) /* 10D58 80035958 0C016B3A */ jal load_asset_by_name /* 10D5C 8003595C 27A50010 */ addiu $a1, $sp, 0x10 /* 10D60 80035960 0040802D */ daddu $s0, $v0, $zero /* 10D64 80035964 3C058021 */ lui $a1, %hi(gMapShapeData) /* 10D68 80035968 24A50000 */ addiu $a1, $a1, %lo(gMapShapeData) /* 10D6C 8003596C 0C01BB7C */ jal decode_yay0 /* 10D70 80035970 0200202D */ daddu $a0, $s0, $zero /* 10D74 80035974 0C00AB1E */ jal general_heap_free /* 10D78 80035978 0200202D */ daddu $a0, $s0, $zero /* 10D7C 8003597C 0C016BE5 */ jal initialize_collision /* 10D80 80035980 00000000 */ nop /* 10D84 80035984 0C016C16 */ jal restore_map_collision_data /* 10D88 80035988 00000000 */ nop /* 10D8C 8003598C 8E240008 */ lw $a0, 0x8($s1) /* 10D90 80035990 10800004 */ beqz $a0, .L800359A4 /* 10D94 80035994 00000000 */ nop /* 10D98 80035998 8E25000C */ lw $a1, 0xC($s1) /* 10D9C 8003599C 0C00A5CF */ jal dma_copy /* 10DA0 800359A0 8E260010 */ lw $a2, 0x10($s1) .L800359A4: /* 10DA4 800359A4 0C05175C */ jal load_map_bg /* 10DA8 800359A8 8E240014 */ lw $a0, 0x14($s1) /* 10DAC 800359AC 8E440038 */ lw $a0, 0x38($s2) /* 10DB0 800359B0 50800005 */ beql $a0, $zero, .L800359C8 /* 10DB4 800359B4 24040128 */ addiu $a0, $zero, 0x128 /* 10DB8 800359B8 0C05178A */ jal read_background_size /* 10DBC 800359BC 00000000 */ nop /* 10DC0 800359C0 0800D676 */ j .L800359D8 /* 10DC4 800359C4 00000000 */ nop .L800359C8: /* 10DC8 800359C8 240500C8 */ addiu $a1, $zero, 0xC8 /* 10DCC 800359CC 2406000C */ addiu $a2, $zero, 0xC /* 10DD0 800359D0 0C05179C */ jal set_background_size /* 10DD4 800359D4 24070014 */ addiu $a3, $zero, 0x14 .L800359D8: /* 10DD8 800359D8 0C04584B */ jal calculate_model_sizes /* 10DDC 800359DC 00000000 */ nop /* 10DE0 800359E0 0C00EC6C */ jal npc_reload_all /* 10DE4 800359E4 00000000 */ nop /* 10DE8 800359E8 0C03A631 */ jal status_bar_respond_to_changes /* 10DEC 800359EC 00000000 */ nop /* 10DF0 800359F0 0C009C22 */ jal set_time_freeze_mode /* 10DF4 800359F4 24040001 */ addiu $a0, $zero, 0x1 .L800359F8: /* 10DF8 800359F8 0C051FB1 */ jal set_windows_visible /* 10DFC 800359FC 0000202D */ daddu $a0, $zero, $zero /* 10E00 80035A00 24020003 */ addiu $v0, $zero, 0x3 /* 10E04 80035A04 3C01800A */ lui $at, %hi(D_800A0931) /* 10E08 80035A08 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 10E0C 80035A0C 0C037DD0 */ jal update_player /* 10E10 80035A10 00000000 */ nop /* 10E14 80035A14 0C00E64C */ jal update_npcs /* 10E18 80035A18 00000000 */ nop /* 10E1C 80035A1C 0C00F949 */ jal update_encounters /* 10E20 80035A20 00000000 */ nop /* 10E24 80035A24 0C016754 */ jal update_effects /* 10E28 80035A28 00000000 */ nop /* 10E2C 80035A2C 3C03800A */ lui $v1, %hi(D_800A0932) /* 10E30 80035A30 24630932 */ addiu $v1, $v1, %lo(D_800A0932) /* 10E34 80035A34 94620000 */ lhu $v0, 0x0($v1) /* 10E38 80035A38 2442FFEC */ addiu $v0, $v0, -0x14 /* 10E3C 80035A3C A4620000 */ sh $v0, 0x0($v1) /* 10E40 80035A40 00021400 */ sll $v0, $v0, 16 /* 10E44 80035A44 04420001 */ bltzl $v0, .L80035A4C /* 10E48 80035A48 A4600000 */ sh $zero, 0x0($v1) .L80035A4C: /* 10E4C 80035A4C 84620000 */ lh $v0, 0x0($v1) /* 10E50 80035A50 44820000 */ mtc1 $v0, $f0 /* 10E54 80035A54 00000000 */ nop /* 10E58 80035A58 46800020 */ cvt.s.w $f0, $f0 /* 10E5C 80035A5C 44050000 */ mfc1 $a1, $f0 /* 10E60 80035A60 0800D6C8 */ j .L80035B20 /* 10E64 80035A64 0000202D */ daddu $a0, $zero, $zero glabel .L80035A68 /* 10E68 80035A68 0C037DD0 */ jal update_player /* 10E6C 80035A6C 00000000 */ nop /* 10E70 80035A70 0C00E64C */ jal update_npcs /* 10E74 80035A74 00000000 */ nop /* 10E78 80035A78 0C00F949 */ jal update_encounters /* 10E7C 80035A7C 00000000 */ nop /* 10E80 80035A80 0C016754 */ jal update_effects /* 10E84 80035A84 00000000 */ nop /* 10E88 80035A88 3C04800A */ lui $a0, %hi(D_800A0932) /* 10E8C 80035A8C 24840932 */ addiu $a0, $a0, %lo(D_800A0932) /* 10E90 80035A90 84820000 */ lh $v0, 0x0($a0) /* 10E94 80035A94 94830000 */ lhu $v1, 0x0($a0) /* 10E98 80035A98 14400006 */ bnez $v0, .L80035AB4 /* 10E9C 80035A9C 2462FFEC */ addiu $v0, $v1, -0x14 /* 10EA0 80035AA0 24020004 */ addiu $v0, $zero, 0x4 /* 10EA4 80035AA4 3C01800A */ lui $at, %hi(D_800A0931) /* 10EA8 80035AA8 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 10EAC 80035AAC 0800D6CA */ j .L80035B28 /* 10EB0 80035AB0 00000000 */ nop .L80035AB4: /* 10EB4 80035AB4 A4820000 */ sh $v0, 0x0($a0) /* 10EB8 80035AB8 00021400 */ sll $v0, $v0, 16 /* 10EBC 80035ABC 04420001 */ bltzl $v0, .L80035AC4 /* 10EC0 80035AC0 A4800000 */ sh $zero, 0x0($a0) .L80035AC4: /* 10EC4 80035AC4 84820000 */ lh $v0, 0x0($a0) /* 10EC8 80035AC8 44820000 */ mtc1 $v0, $f0 /* 10ECC 80035ACC 00000000 */ nop /* 10ED0 80035AD0 46800020 */ cvt.s.w $f0, $f0 /* 10ED4 80035AD4 44050000 */ mfc1 $a1, $f0 /* 10ED8 80035AD8 0800D6C8 */ j .L80035B20 /* 10EDC 80035ADC 0000202D */ daddu $a0, $zero, $zero glabel .L80035AE0 /* 10EE0 80035AE0 0C009C22 */ jal set_time_freeze_mode /* 10EE4 80035AE4 0000202D */ daddu $a0, $zero, $zero /* 10EE8 80035AE8 0C037DD0 */ jal update_player /* 10EEC 80035AEC 00000000 */ nop /* 10EF0 80035AF0 0C00E64C */ jal update_npcs /* 10EF4 80035AF4 00000000 */ nop /* 10EF8 80035AF8 0C00F949 */ jal update_encounters /* 10EFC 80035AFC 00000000 */ nop /* 10F00 80035B00 0C016754 */ jal update_effects /* 10F04 80035B04 00000000 */ nop /* 10F08 80035B08 0C038069 */ jal enable_player_input /* 10F0C 80035B0C 00000000 */ nop /* 10F10 80035B10 0C00CD3C */ jal set_game_mode /* 10F14 80035B14 24040004 */ addiu $a0, $zero, 0x4 /* 10F18 80035B18 3C05BF80 */ lui $a1, (0xBF800000 >> 16) /* 10F1C 80035B1C 240400FF */ addiu $a0, $zero, 0xFF .L80035B20: /* 10F20 80035B20 0C04DF62 */ jal set_screen_overlay_params_front /* 10F24 80035B24 00000000 */ nop .L80035B28: /* 10F28 80035B28 8FBF0024 */ lw $ra, 0x24($sp) /* 10F2C 80035B2C 8FB20020 */ lw $s2, 0x20($sp) /* 10F30 80035B30 8FB1001C */ lw $s1, 0x1C($sp) /* 10F34 80035B34 8FB00018 */ lw $s0, 0x18($sp) /* 10F38 80035B38 03E00008 */ jr $ra /* 10F3C 80035B3C 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void state_step_exit_language_select(void) { switch (D_800A0931) { case 0: if (D_800A0932[0] != 0) { D_800A0932[0] -= 20; if (D_800A0932[0] < 0) { D_800A0932[0] = 0; } set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, D_800A0932[0]); if (D_800A0932[0] == 0) { D_800A0931 = 1; } } else { D_800A0931 = 1; } break; case 1: if (D_800A0932[0] != 255) { D_800A0932[0] += 20; if (D_800A0932[0] > 255) { D_800A0932[0] = 255; } set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, D_800A0932[0]); if (D_800A0932[0] == 255) { D_800A0931 = 2; } } else { D_800A0931 = 2; } break; case 2: if (D_800A0930 == 3) { gOverrideFlags |= GLOBAL_OVERRIDES_8; } if (D_800A0930 >= 0) { D_800A0930--; if (D_800A0930 == 0) { MapSettings* mapSettings; MapConfig* mapConfig; u32 mapShapeSize; void* mapShape; BackgroundHeader* bgHeader; D_800A0930 = -1; nuGfxSetCfb(fsFrameBuffers, ARRAY_COUNT(fsFrameBuffers)); filemenu_cleanup(); gOverrideFlags &= ~GLOBAL_OVERRIDES_8; mapSettings = get_current_map_settings(); mapConfig = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID]; gGameStatusPtr->isBattle = FALSE; func_8005AF84(); func_8002ACDC(); sfx_clear_env_sounds(1); spr_init_sprites(gGameStatusPtr->playerSpriteSet); init_model_data(); init_sprite_shading_data(); init_entity_models(); reset_animator_list(); init_worker_list(); hud_element_set_aux_cache(0, 0); init_hud_element_list(); init_item_entity_list(); init_script_list(); init_npc_list(); init_entity_data(); init_trigger_list(); mapShape = load_asset_by_name(wMapShapeName, &mapShapeSize); decode_yay0(mapShape, &gMapShapeData); general_heap_free(mapShape); initialize_collision(); restore_map_collision_data(); if (mapConfig->dmaStart != NULL) { dma_copy(mapConfig->dmaStart, mapConfig->dmaEnd, mapConfig->dmaDest); } load_map_bg(mapConfig->bgName); bgHeader = mapSettings->background; if (bgHeader != NULL) { read_background_size(bgHeader); } else { set_background_size(296, 200, 12, 20); } calculate_model_sizes(); npc_reload_all(); status_bar_respond_to_changes(); set_time_freeze_mode(TIME_FREEZE_PARTIAL); } set_windows_visible(WINDOW_GROUP_ALL); D_800A0931 = 3; update_player(); update_npcs(); update_encounters(); update_effects(); D_800A0932[0] -= 20; if (D_800A0932[0] < 0) { D_800A0932[0] = 0; } set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, D_800A0932[0]); } break; case 3: update_player(); update_npcs(); update_encounters(); update_effects(); if (D_800A0932[0] == 0) { D_800A0931 = 4; } else { D_800A0932[0] -= 20; if (D_800A0932[0] < 0) { D_800A0932[0] = 0; } set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, D_800A0932[0]); } break; case 4: set_time_freeze_mode(TIME_FREEZE_NORMAL); update_player(); update_npcs(); update_encounters(); update_effects(); enable_player_input(); set_game_mode(GAME_MODE_CHANGE_MAP); set_screen_overlay_params_front(OVERLAY_NONE, -1.0f); break; } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025AD90 /* 189670 8025AD90 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 189674 8025AD94 AFB20018 */ sw $s2, 0x18($sp) /* 189678 8025AD98 0080902D */ daddu $s2, $a0, $zero /* 18967C 8025AD9C AFB10014 */ sw $s1, 0x14($sp) /* 189680 8025ADA0 00A0882D */ daddu $s1, $a1, $zero /* 189684 8025ADA4 AFB3001C */ sw $s3, 0x1C($sp) /* 189688 8025ADA8 00C0982D */ daddu $s3, $a2, $zero /* 18968C 8025ADAC AFBF0028 */ sw $ra, 0x28($sp) /* 189690 8025ADB0 AFB50024 */ sw $s5, 0x24($sp) /* 189694 8025ADB4 AFB40020 */ sw $s4, 0x20($sp) /* 189698 8025ADB8 AFB00010 */ sw $s0, 0x10($sp) /* 18969C 8025ADBC 8E3000C0 */ lw $s0, 0xC0($s1) /* 1896A0 8025ADC0 820206C1 */ lb $v0, 0x6C1($s0) /* 1896A4 8025ADC4 8FB50040 */ lw $s5, 0x40($sp) /* 1896A8 8025ADC8 1040004B */ beqz $v0, .L8025AEF8 /* 1896AC 8025ADCC 00E0A02D */ daddu $s4, $a3, $zero /* 1896B0 8025ADD0 16400016 */ bnez $s2, .L8025AE2C /* 1896B4 8025ADD4 00000000 */ nop /* 1896B8 8025ADD8 0C0B7830 */ jal spr_get_player_palettes /* 1896BC 8025ADDC 96240088 */ lhu $a0, 0x88($s1) /* 1896C0 8025ADE0 AE0206D0 */ sw $v0, 0x6D0($s0) /* 1896C4 8025ADE4 0040202D */ daddu $a0, $v0, $zero /* 1896C8 8025ADE8 A20006CD */ sb $zero, 0x6CD($s0) /* 1896CC 8025ADEC 8C830000 */ lw $v1, 0x0($a0) /* 1896D0 8025ADF0 2402FFFF */ addiu $v0, $zero, -0x1 /* 1896D4 8025ADF4 1062000B */ beq $v1, $v0, .L8025AE24 /* 1896D8 8025ADF8 0080182D */ daddu $v1, $a0, $zero /* 1896DC 8025ADFC 0040202D */ daddu $a0, $v0, $zero .L8025AE00: /* 1896E0 8025AE00 920206CD */ lbu $v0, 0x6CD($s0) /* 1896E4 8025AE04 24420001 */ addiu $v0, $v0, 0x1 /* 1896E8 8025AE08 A20206CD */ sb $v0, 0x6CD($s0) /* 1896EC 8025AE0C 00021600 */ sll $v0, $v0, 24 /* 1896F0 8025AE10 00021583 */ sra $v0, $v0, 22 D_8025AE14: /* 1896F4 8025AE14 00431021 */ addu $v0, $v0, $v1 /* 1896F8 8025AE18 8C420000 */ lw $v0, 0x0($v0) /* 1896FC 8025AE1C 1444FFF8 */ bne $v0, $a0, .L8025AE00 /* 189700 8025AE20 00000000 */ nop .L8025AE24: /* 189704 8025AE24 08096BA1 */ j .L8025AE84 /* 189708 8025AE28 24020006 */ addiu $v0, $zero, 0x6 .L8025AE2C: /* 18970C 8025AE2C 96240088 */ lhu $a0, 0x88($s1) /* 189710 8025AE30 0C0B7A90 */ jal spr_get_npc_palettes /* 189714 8025AE34 00000000 */ nop /* 189718 8025AE38 AE0206D0 */ sw $v0, 0x6D0($s0) /* 18971C 8025AE3C 0040202D */ daddu $a0, $v0, $zero /* 189720 8025AE40 A20006CD */ sb $zero, 0x6CD($s0) /* 189724 8025AE44 8C830000 */ lw $v1, 0x0($a0) /* 189728 8025AE48 2402FFFF */ addiu $v0, $zero, -0x1 /* 18972C 8025AE4C 1062000B */ beq $v1, $v0, .L8025AE7C /* 189730 8025AE50 0080182D */ daddu $v1, $a0, $zero /* 189734 8025AE54 0040202D */ daddu $a0, $v0, $zero .L8025AE58: /* 189738 8025AE58 920206CD */ lbu $v0, 0x6CD($s0) /* 18973C 8025AE5C 24420001 */ addiu $v0, $v0, 0x1 /* 189740 8025AE60 A20206CD */ sb $v0, 0x6CD($s0) /* 189744 8025AE64 00021600 */ sll $v0, $v0, 24 /* 189748 8025AE68 00021583 */ sra $v0, $v0, 22 /* 18974C 8025AE6C 00431021 */ addu $v0, $v0, $v1 /* 189750 8025AE70 8C420000 */ lw $v0, 0x0($v0) /* 189754 8025AE74 1444FFF8 */ bne $v0, $a0, .L8025AE58 /* 189758 8025AE78 00000000 */ nop .L8025AE7C: /* 18975C 8025AE7C 0C0B7A9B */ jal spr_get_npc_color_variations /* 189760 8025AE80 96240088 */ lhu $a0, 0x88($s1) .L8025AE84: /* 189764 8025AE84 A20206CC */ sb $v0, 0x6CC($s0) /* 189768 8025AE88 820206CD */ lb $v0, 0x6CD($s0) /* 18976C 8025AE8C 18400015 */ blez $v0, .L8025AEE4 /* 189770 8025AE90 0000302D */ daddu $a2, $zero, $zero .L8025AE94: /* 189774 8025AE94 8E0206D0 */ lw $v0, 0x6D0($s0) /* 189778 8025AE98 00061880 */ sll $v1, $a2, 2 /* 18977C 8025AE9C 00621821 */ addu $v1, $v1, $v0 /* 189780 8025AEA0 00061140 */ sll $v0, $a2, 5 D_8025AEA4: /* 189784 8025AEA4 8C630000 */ lw $v1, 0x0($v1) /* 189788 8025AEA8 10600009 */ beqz $v1, .L8025AED0 /* 18978C 8025AEAC 02022821 */ addu $a1, $s0, $v0 /* 189790 8025AEB0 0000202D */ daddu $a0, $zero, $zero .L8025AEB4: /* 189794 8025AEB4 94620000 */ lhu $v0, 0x0($v1) /* 189798 8025AEB8 24630002 */ addiu $v1, $v1, 0x2 /* 18979C 8025AEBC 24840001 */ addiu $a0, $a0, 0x1 /* 1897A0 8025AEC0 A4A20000 */ sh $v0, 0x0($a1) /* 1897A4 8025AEC4 28820010 */ slti $v0, $a0, 0x10 /* 1897A8 8025AEC8 1440FFFA */ bnez $v0, .L8025AEB4 /* 1897AC 8025AECC 24A50002 */ addiu $a1, $a1, 0x2 .L8025AED0: /* 1897B0 8025AED0 820206CD */ lb $v0, 0x6CD($s0) /* 1897B4 8025AED4 24C60001 */ addiu $a2, $a2, 0x1 /* 1897B8 8025AED8 00C2102A */ slt $v0, $a2, $v0 /* 1897BC 8025AEDC 1440FFED */ bnez $v0, .L8025AE94 /* 1897C0 8025AEE0 00000000 */ nop .L8025AEE4: /* 1897C4 8025AEE4 2402FFFE */ addiu $v0, $zero, -0x2 /* 1897C8 8025AEE8 A20206C2 */ sb $v0, 0x6C2($s0) /* 1897CC 8025AEEC A60006CA */ sh $zero, 0x6CA($s0) /* 1897D0 8025AEF0 A20006C1 */ sb $zero, 0x6C1($s0) /* 1897D4 8025AEF4 A60006C8 */ sh $zero, 0x6C8($s0) .L8025AEF8: /* 1897D8 8025AEF8 16A0001E */ bnez $s5, .L8025AF74 /* 1897DC 8025AEFC 00000000 */ nop /* 1897E0 8025AF00 860206C8 */ lh $v0, 0x6C8($s0) /* 1897E4 8025AF04 14400013 */ bnez $v0, .L8025AF54 /* 1897E8 8025AF08 00000000 */ nop /* 1897EC 8025AF0C 920206C2 */ lbu $v0, 0x6C2($s0) /* 1897F0 8025AF10 3C048028 */ lui $a0, %hi(D_80284104) /* 1897F4 8025AF14 24844104 */ addiu $a0, $a0, %lo(D_80284104) /* 1897F8 8025AF18 24420002 */ addiu $v0, $v0, 0x2 /* 1897FC 8025AF1C A20206C2 */ sb $v0, 0x6C2($s0) /* 189800 8025AF20 00021600 */ sll $v0, $v0, 24 /* 189804 8025AF24 00021603 */ sra $v0, $v0, 24 /* 189808 8025AF28 3C038028 */ lui $v1, %hi(D_80284104) /* 18980C 8025AF2C 00621821 */ addu $v1, $v1, $v0 /* 189810 8025AF30 90634104 */ lbu $v1, %lo(D_80284104)($v1) /* 189814 8025AF34 240200FF */ addiu $v0, $zero, 0xFF /* 189818 8025AF38 50620001 */ beql $v1, $v0, .L8025AF40 /* 18981C 8025AF3C A20006C2 */ sb $zero, 0x6C2($s0) .L8025AF40: /* 189820 8025AF40 820206C2 */ lb $v0, 0x6C2($s0) /* 189824 8025AF44 00441021 */ addu $v0, $v0, $a0 /* 189828 8025AF48 90420001 */ lbu $v0, 0x1($v0) /* 18982C 8025AF4C 00021042 */ srl $v0, $v0, 1 /* 189830 8025AF50 A60206C8 */ sh $v0, 0x6C8($s0) .L8025AF54: /* 189834 8025AF54 820306C2 */ lb $v1, 0x6C2($s0) /* 189838 8025AF58 960206C8 */ lhu $v0, 0x6C8($s0) /* 18983C 8025AF5C 3C018028 */ lui $at, %hi(D_80284104) /* 189840 8025AF60 00230821 */ addu $at, $at, $v1 /* 189844 8025AF64 90234104 */ lbu $v1, %lo(D_80284104)($at) /* 189848 8025AF68 2442FFFF */ addiu $v0, $v0, -0x1 /* 18984C 8025AF6C 08096BE1 */ j .L8025AF84 /* 189850 8025AF70 A60206C8 */ sh $v0, 0x6C8($s0) .L8025AF74: /* 189854 8025AF74 820206C2 */ lb $v0, 0x6C2($s0) /* 189858 8025AF78 3C038028 */ lui $v1, %hi(D_80284104) /* 18985C 8025AF7C 00621821 */ addu $v1, $v1, $v0 /* 189860 8025AF80 90634104 */ lbu $v1, %lo(D_80284104)($v1) .L8025AF84: /* 189864 8025AF84 24020001 */ addiu $v0, $zero, 0x1 /* 189868 8025AF88 10620024 */ beq $v1, $v0, .L8025B01C /* 18986C 8025AF8C 28620002 */ slti $v0, $v1, 0x2 /* 189870 8025AF90 10400005 */ beqz $v0, .L8025AFA8 /* 189874 8025AF94 24020002 */ addiu $v0, $zero, 0x2 /* 189878 8025AF98 10600007 */ beqz $v1, .L8025AFB8 /* 18987C 8025AF9C 00000000 */ nop /* 189880 8025AFA0 08096C46 */ j .L8025B118 /* 189884 8025AFA4 00000000 */ nop .L8025AFA8: /* 189888 8025AFA8 1062003C */ beq $v1, $v0, .L8025B09C /* 18988C 8025AFAC 00000000 */ nop /* 189890 8025AFB0 08096C46 */ j .L8025B118 /* 189894 8025AFB4 00000000 */ nop .L8025AFB8: /* 189898 8025AFB8 820206CC */ lb $v0, 0x6CC($s0) /* 18989C 8025AFBC 18400056 */ blez $v0, .L8025B118 /* 1898A0 8025AFC0 0000302D */ daddu $a2, $zero, $zero .L8025AFC4: /* 1898A4 8025AFC4 8E0206D0 */ lw $v0, 0x6D0($s0) /* 1898A8 8025AFC8 00061880 */ sll $v1, $a2, 2 /* 1898AC 8025AFCC 00621821 */ addu $v1, $v1, $v0 /* 1898B0 8025AFD0 00061140 */ sll $v0, $a2, 5 /* 1898B4 8025AFD4 8C630000 */ lw $v1, 0x0($v1) /* 1898B8 8025AFD8 10600009 */ beqz $v1, .L8025B000 /* 1898BC 8025AFDC 02022821 */ addu $a1, $s0, $v0 /* 1898C0 8025AFE0 0000202D */ daddu $a0, $zero, $zero .L8025AFE4: /* 1898C4 8025AFE4 94620000 */ lhu $v0, 0x0($v1) /* 1898C8 8025AFE8 24630002 */ addiu $v1, $v1, 0x2 /* 1898CC 8025AFEC 24840001 */ addiu $a0, $a0, 0x1 /* 1898D0 8025AFF0 A4A20000 */ sh $v0, 0x0($a1) /* 1898D4 8025AFF4 28820010 */ slti $v0, $a0, 0x10 /* 1898D8 8025AFF8 1440FFFA */ bnez $v0, .L8025AFE4 /* 1898DC 8025AFFC 24A50002 */ addiu $a1, $a1, 0x2 .L8025B000: /* 1898E0 8025B000 820206CC */ lb $v0, 0x6CC($s0) /* 1898E4 8025B004 24C60001 */ addiu $a2, $a2, 0x1 /* 1898E8 8025B008 00C2102A */ slt $v0, $a2, $v0 /* 1898EC 8025B00C 10400042 */ beqz $v0, .L8025B118 /* 1898F0 8025B010 00000000 */ nop /* 1898F4 8025B014 08096BF1 */ j .L8025AFC4 /* 1898F8 8025B018 00000000 */ nop .L8025B01C: /* 1898FC 8025B01C 820206CC */ lb $v0, 0x6CC($s0) /* 189900 8025B020 920306CC */ lbu $v1, 0x6CC($s0) /* 189904 8025B024 1840003C */ blez $v0, .L8025B118 /* 189908 8025B028 0000302D */ daddu $a2, $zero, $zero /* 18990C 8025B02C 00031E00 */ sll $v1, $v1, 24 .L8025B030: /* 189910 8025B030 00031E03 */ sra $v1, $v1, 24 /* 189914 8025B034 00031080 */ sll $v0, $v1, 2 /* 189918 8025B038 00431021 */ addu $v0, $v0, $v1 /* 18991C 8025B03C 00461021 */ addu $v0, $v0, $a2 /* 189920 8025B040 8E0306D0 */ lw $v1, 0x6D0($s0) /* 189924 8025B044 00021080 */ sll $v0, $v0, 2 /* 189928 8025B048 00431021 */ addu $v0, $v0, $v1 /* 18992C 8025B04C 8C430000 */ lw $v1, 0x0($v0) /* 189930 8025B050 00061140 */ sll $v0, $a2, 5 /* 189934 8025B054 10600009 */ beqz $v1, .L8025B07C /* 189938 8025B058 02022821 */ addu $a1, $s0, $v0 /* 18993C 8025B05C 0000202D */ daddu $a0, $zero, $zero .L8025B060: /* 189940 8025B060 94620000 */ lhu $v0, 0x0($v1) /* 189944 8025B064 24630002 */ addiu $v1, $v1, 0x2 /* 189948 8025B068 24840001 */ addiu $a0, $a0, 0x1 /* 18994C 8025B06C A4A20000 */ sh $v0, 0x0($a1) /* 189950 8025B070 28820010 */ slti $v0, $a0, 0x10 /* 189954 8025B074 1440FFFA */ bnez $v0, .L8025B060 /* 189958 8025B078 24A50002 */ addiu $a1, $a1, 0x2 .L8025B07C: /* 18995C 8025B07C 24C60001 */ addiu $a2, $a2, 0x1 /* 189960 8025B080 820206CC */ lb $v0, 0x6CC($s0) /* 189964 8025B084 920306CC */ lbu $v1, 0x6CC($s0) /* 189968 8025B088 00C2102A */ slt $v0, $a2, $v0 /* 18996C 8025B08C 5440FFE8 */ bnel $v0, $zero, .L8025B030 /* 189970 8025B090 00031E00 */ sll $v1, $v1, 24 /* 189974 8025B094 08096C46 */ j .L8025B118 /* 189978 8025B098 00000000 */ nop .L8025B09C: /* 18997C 8025B09C 820206CC */ lb $v0, 0x6CC($s0) /* 189980 8025B0A0 920306CC */ lbu $v1, 0x6CC($s0) /* 189984 8025B0A4 1840001C */ blez $v0, .L8025B118 D_8025B0A8: /* 189988 8025B0A8 0000302D */ daddu $a2, $zero, $zero /* 18998C 8025B0AC 00031E00 */ sll $v1, $v1, 24 .L8025B0B0: /* 189990 8025B0B0 00031E03 */ sra $v1, $v1, 24 /* 189994 8025B0B4 00031040 */ sll $v0, $v1, 1 /* 189998 8025B0B8 00431021 */ addu $v0, $v0, $v1 /* 18999C 8025B0BC 00021040 */ sll $v0, $v0, 1 /* 1899A0 8025B0C0 00461021 */ addu $v0, $v0, $a2 /* 1899A4 8025B0C4 8E0306D0 */ lw $v1, 0x6D0($s0) /* 1899A8 8025B0C8 00021080 */ sll $v0, $v0, 2 /* 1899AC 8025B0CC 00431021 */ addu $v0, $v0, $v1 /* 1899B0 8025B0D0 8C430000 */ lw $v1, 0x0($v0) /* 1899B4 8025B0D4 00061140 */ sll $v0, $a2, 5 /* 1899B8 8025B0D8 10600009 */ beqz $v1, .L8025B100 /* 1899BC 8025B0DC 02022821 */ addu $a1, $s0, $v0 /* 1899C0 8025B0E0 0000202D */ daddu $a0, $zero, $zero .L8025B0E4: /* 1899C4 8025B0E4 94620000 */ lhu $v0, 0x0($v1) /* 1899C8 8025B0E8 24630002 */ addiu $v1, $v1, 0x2 /* 1899CC 8025B0EC 24840001 */ addiu $a0, $a0, 0x1 /* 1899D0 8025B0F0 A4A20000 */ sh $v0, 0x0($a1) /* 1899D4 8025B0F4 28820010 */ slti $v0, $a0, 0x10 /* 1899D8 8025B0F8 1440FFFA */ bnez $v0, .L8025B0E4 /* 1899DC 8025B0FC 24A50002 */ addiu $a1, $a1, 0x2 .L8025B100: /* 1899E0 8025B100 24C60001 */ addiu $a2, $a2, 0x1 /* 1899E4 8025B104 820206CC */ lb $v0, 0x6CC($s0) /* 1899E8 8025B108 920306CC */ lbu $v1, 0x6CC($s0) /* 1899EC 8025B10C 00C2102A */ slt $v0, $a2, $v0 D_8025B110: /* 1899F0 8025B110 5440FFE7 */ bnel $v0, $zero, .L8025B0B0 /* 1899F4 8025B114 00031E00 */ sll $v1, $v1, 24 .L8025B118: /* 1899F8 8025B118 820206CD */ lb $v0, 0x6CD($s0) /* 1899FC 8025B11C 1840000A */ blez $v0, .L8025B148 /* 189A00 8025B120 0000302D */ daddu $a2, $zero, $zero /* 189A04 8025B124 0200202D */ daddu $a0, $s0, $zero /* 189A08 8025B128 0200182D */ daddu $v1, $s0, $zero .L8025B12C: /* 189A0C 8025B12C AC6406D4 */ sw $a0, 0x6D4($v1) /* 189A10 8025B130 24840020 */ addiu $a0, $a0, 0x20 /* 189A14 8025B134 820206CD */ lb $v0, 0x6CD($s0) /* 189A18 8025B138 24C60001 */ addiu $a2, $a2, 0x1 /* 189A1C 8025B13C 00C2102A */ slt $v0, $a2, $v0 /* 189A20 8025B140 1440FFFA */ bnez $v0, .L8025B12C /* 189A24 8025B144 24630004 */ addiu $v1, $v1, 0x4 .L8025B148: /* 189A28 8025B148 16400006 */ bnez $s2, .L8025B164 /* 189A2C 8025B14C 0220202D */ daddu $a0, $s1, $zero /* 189A30 8025B150 0260282D */ daddu $a1, $s3, $zero /* 189A34 8025B154 0C096657 */ jal func_8025995C /* 189A38 8025B158 0280302D */ daddu $a2, $s4, $zero /* 189A3C 8025B15C 08096C5C */ j .L8025B170 /* 189A40 8025B160 00000000 */ nop .L8025B164: /* 189A44 8025B164 0260282D */ daddu $a1, $s3, $zero /* 189A48 8025B168 0C0965B0 */ jal func_802596C0 /* 189A4C 8025B16C 0280302D */ daddu $a2, $s4, $zero .L8025B170: /* 189A50 8025B170 16A00004 */ bnez $s5, .L8025B184 /* 189A54 8025B174 00000000 */ nop /* 189A58 8025B178 960206CA */ lhu $v0, 0x6CA($s0) /* 189A5C 8025B17C 2442FFFF */ addiu $v0, $v0, -0x1 /* 189A60 8025B180 A60206CA */ sh $v0, 0x6CA($s0) .L8025B184: /* 189A64 8025B184 8FBF0028 */ lw $ra, 0x28($sp) /* 189A68 8025B188 8FB50024 */ lw $s5, 0x24($sp) /* 189A6C 8025B18C 8FB40020 */ lw $s4, 0x20($sp) /* 189A70 8025B190 8FB3001C */ lw $s3, 0x1C($sp) /* 189A74 8025B194 8FB20018 */ lw $s2, 0x18($sp) /* 189A78 8025B198 8FB10014 */ lw $s1, 0x14($sp) /* 189A7C 8025B19C 8FB00010 */ lw $s0, 0x10($sp) /* 189A80 8025B1A0 03E00008 */ jr $ra /* 189A84 8025B1A4 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void render_with_watt_idle_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 palIdx; s32 brightnessLevel; 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 (WattIdlePalettesAnim[decorationTable->palAnimState] == PAL_ANIM_END) { decorationTable->palAnimState = 0; } decorationTable->nextPalTime = WattIdlePalettesAnim[decorationTable->palAnimState + 1] / 2; } brightnessLevel = WattIdlePalettesAnim[decorationTable->palAnimState]; decorationTable->nextPalTime--; } else { //@bug if only called with skipAnimation set, palAnimPos will always be -2 and the array access is OOB brightnessLevel = WattIdlePalettesAnim[decorationTable->palAnimState]; } switch (brightnessLevel) { case WATT_DEFAULT: for (i = 0; i < decorationTable->spriteColorVariations; i++) { // use watt's base palettes palIn = decorationTable->originalPalettesList[i]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } break; case WATT_BRIGHTEST: for (i = 0; i < decorationTable->spriteColorVariations; i++) { // use watt's Brightest palettes palIdx = decorationTable->spriteColorVariations * SPR_PAL_BattleWatt_Brightest + i; palIn = decorationTable->originalPalettesList[palIdx]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } break; case WATT_BRIGHTER: for (i = 0; i < decorationTable->spriteColorVariations; i++) { // use watt's Brighter palettes palIdx = decorationTable->spriteColorVariations * SPR_PAL_BattleWatt_Brighter + i; palIn = decorationTable->originalPalettesList[palIdx]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } 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 smoke_impact_appendGfx /* 34EFD4 E003A354 27BDFEF8 */ addiu $sp, $sp, -0x108 /* 34EFD8 E003A358 AFBE0100 */ sw $fp, 0x100($sp) /* 34EFDC E003A35C 0080F02D */ daddu $fp, $a0, $zero /* 34EFE0 E003A360 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 34EFE4 E003A364 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 34EFE8 E003A368 27A40018 */ addiu $a0, $sp, 0x18 /* 34EFEC E003A36C AFB200E8 */ sw $s2, 0xE8($sp) /* 34EFF0 E003A370 3C120001 */ lui $s2, (0x11630 >> 16) /* 34EFF4 E003A374 AFB300EC */ sw $s3, 0xEC($sp) /* 34EFF8 E003A378 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 34EFFC E003A37C 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 34F000 E003A380 AFBF0104 */ sw $ra, 0x104($sp) /* 34F004 E003A384 AFB700FC */ sw $s7, 0xFC($sp) /* 34F008 E003A388 AFB600F8 */ sw $s6, 0xF8($sp) /* 34F00C E003A38C AFB500F4 */ sw $s5, 0xF4($sp) /* 34F010 E003A390 AFB400F0 */ sw $s4, 0xF0($sp) /* 34F014 E003A394 AFB100E4 */ sw $s1, 0xE4($sp) /* 34F018 E003A398 AFB000E0 */ sw $s0, 0xE0($sp) /* 34F01C E003A39C 8E630000 */ lw $v1, 0x0($s3) /* 34F020 E003A3A0 8FD4000C */ lw $s4, 0xC($fp) /* 34F024 E003A3A4 0060282D */ daddu $a1, $v1, $zero /* 34F028 E003A3A8 24630008 */ addiu $v1, $v1, 0x8 /* 34F02C E003A3AC AE630000 */ sw $v1, 0x0($s3) /* 34F030 E003A3B0 96970000 */ lhu $s7, 0x0($s4) /* 34F034 E003A3B4 24620008 */ addiu $v0, $v1, 0x8 /* 34F038 E003A3B8 AE620000 */ sw $v0, 0x0($s3) /* 34F03C E003A3BC C6820030 */ lwc1 $f2, 0x30($s4) /* 34F040 E003A3C0 00171080 */ sll $v0, $s7, 2 /* 34F044 E003A3C4 3C09E004 */ lui $t1, (0xE0040000 >> 16) /* 34F048 E003A3C8 01224821 */ addu $t1, $t1, $v0 /* 34F04C E003A3CC 8D29A800 */ lw $t1, -0x5800($t1) /* 34F050 E003A3D0 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 34F054 E003A3D4 AFA900D8 */ sw $t1, 0xD8($sp) /* 34F058 E003A3D8 3C06E004 */ lui $a2, (0xE0040000 >> 16) /* 34F05C E003A3DC 00C23021 */ addu $a2, $a2, $v0 /* 34F060 E003A3E0 8CC6A80C */ lw $a2, -0x57F4($a2) /* 34F064 E003A3E4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 34F068 E003A3E8 4600110D */ trunc.w.s $f4, $f2 /* 34F06C E003A3EC 44152000 */ mfc1 $s5, $f4 /* 34F070 E003A3F0 00000000 */ nop /* 34F074 E003A3F4 44950000 */ mtc1 $s5, $f0 /* 34F078 E003A3F8 00000000 */ nop /* 34F07C E003A3FC 46800020 */ cvt.s.w $f0, $f0 /* 34F080 E003A400 46001081 */ sub.s $f2, $f2, $f0 /* 34F084 E003A404 ACA20000 */ sw $v0, 0x0($a1) /* 34F088 E003A408 ACA00004 */ sw $zero, 0x4($a1) /* 34F08C E003A40C AC670000 */ sw $a3, 0x0($v1) /* 34F090 E003A410 8FC50010 */ lw $a1, 0x10($fp) /* 34F094 E003A414 3C014380 */ lui $at, (0x43800000 >> 16) /* 34F098 E003A418 44810000 */ mtc1 $at, $f0 /* 34F09C E003A41C 24620010 */ addiu $v0, $v1, 0x10 /* 34F0A0 E003A420 AE620000 */ sw $v0, 0x0($s3) /* 34F0A4 E003A424 8CA5001C */ lw $a1, 0x1C($a1) /* 34F0A8 E003A428 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 34F0AC E003A42C AC620008 */ sw $v0, 0x8($v1) /* 34F0B0 E003A430 3C028000 */ lui $v0, (0x80000000 >> 16) /* 34F0B4 E003A434 AC66000C */ sw $a2, 0xC($v1) /* 34F0B8 E003A438 00A22821 */ addu $a1, $a1, $v0 /* 34F0BC E003A43C 3AA20007 */ xori $v0, $s5, 0x7 /* 34F0C0 E003A440 46001082 */ mul.s $f2, $f2, $f0 /* 34F0C4 E003A444 00000000 */ nop /* 34F0C8 E003A448 AC650004 */ sw $a1, 0x4($v1) /* 34F0CC E003A44C 8E850004 */ lw $a1, 0x4($s4) /* 34F0D0 E003A450 8E860008 */ lw $a2, 0x8($s4) /* 34F0D4 E003A454 8E87000C */ lw $a3, 0xC($s4) /* 34F0D8 E003A458 2C420001 */ sltiu $v0, $v0, 0x1 /* 34F0DC E003A45C 4600110D */ trunc.w.s $f4, $f2 /* 34F0E0 E003A460 44162000 */ mfc1 $s6, $f4 /* 34F0E4 E003A464 0C080108 */ jal shim_guTranslateF /* 34F0E8 E003A468 AFA200DC */ sw $v0, 0xDC($sp) /* 34F0EC E003A46C 27B00058 */ addiu $s0, $sp, 0x58 /* 34F0F0 E003A470 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 34F0F4 E003A474 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 34F0F8 E003A478 44800000 */ mtc1 $zero, $f0 /* 34F0FC E003A47C 00031080 */ sll $v0, $v1, 2 /* 34F100 E003A480 00431021 */ addu $v0, $v0, $v1 /* 34F104 E003A484 00021080 */ sll $v0, $v0, 2 /* 34F108 E003A488 00431023 */ subu $v0, $v0, $v1 /* 34F10C E003A48C 000218C0 */ sll $v1, $v0, 3 /* 34F110 E003A490 00431021 */ addu $v0, $v0, $v1 /* 34F114 E003A494 000210C0 */ sll $v0, $v0, 3 /* 34F118 E003A498 44060000 */ mfc1 $a2, $f0 /* 34F11C E003A49C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 34F120 E003A4A0 00220821 */ addu $at, $at, $v0 /* 34F124 E003A4A4 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 34F128 E003A4A8 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 34F12C E003A4AC 46000007 */ neg.s $f0, $f0 /* 34F130 E003A4B0 44050000 */ mfc1 $a1, $f0 /* 34F134 E003A4B4 0200202D */ daddu $a0, $s0, $zero /* 34F138 E003A4B8 0C080104 */ jal shim_guRotateF /* 34F13C E003A4BC AFA60010 */ sw $a2, 0x10($sp) /* 34F140 E003A4C0 0200202D */ daddu $a0, $s0, $zero /* 34F144 E003A4C4 27A50018 */ addiu $a1, $sp, 0x18 /* 34F148 E003A4C8 27B00098 */ addiu $s0, $sp, 0x98 /* 34F14C E003A4CC 0C080114 */ jal shim_guMtxCatF /* 34F150 E003A4D0 0200302D */ daddu $a2, $s0, $zero /* 34F154 E003A4D4 0200202D */ daddu $a0, $s0, $zero /* 34F158 E003A4D8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 34F15C E003A4DC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 34F160 E003A4E0 3C11800A */ lui $s1, %hi(gDisplayContext) /* 34F164 E003A4E4 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 34F168 E003A4E8 96050000 */ lhu $a1, 0x0($s0) /* 34F16C E003A4EC 8E220000 */ lw $v0, 0x0($s1) /* 34F170 E003A4F0 00052980 */ sll $a1, $a1, 6 /* 34F174 E003A4F4 00B22821 */ addu $a1, $a1, $s2 /* 34F178 E003A4F8 0C080118 */ jal shim_guMtxF2L /* 34F17C E003A4FC 00452821 */ addu $a1, $v0, $a1 /* 34F180 E003A500 8E650000 */ lw $a1, 0x0($s3) /* 34F184 E003A504 00A0202D */ daddu $a0, $a1, $zero /* 34F188 E003A508 24A50008 */ addiu $a1, $a1, 0x8 /* 34F18C E003A50C AE650000 */ sw $a1, 0x0($s3) /* 34F190 E003A510 96020000 */ lhu $v0, 0x0($s0) /* 34F194 E003A514 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 34F198 E003A518 AC830000 */ sw $v1, 0x0($a0) /* 34F19C E003A51C 24430001 */ addiu $v1, $v0, 0x1 /* 34F1A0 E003A520 3042FFFF */ andi $v0, $v0, 0xFFFF /* 34F1A4 E003A524 00021180 */ sll $v0, $v0, 6 /* 34F1A8 E003A528 A6030000 */ sh $v1, 0x0($s0) /* 34F1AC E003A52C 8E230000 */ lw $v1, 0x0($s1) /* 34F1B0 E003A530 00521021 */ addu $v0, $v0, $s2 /* 34F1B4 E003A534 00621821 */ addu $v1, $v1, $v0 /* 34F1B8 E003A538 2AE20002 */ slti $v0, $s7, 0x2 /* 34F1BC E003A53C 10400009 */ beqz $v0, .LE003A564 /* 34F1C0 E003A540 AC830004 */ sw $v1, 0x4($a0) /* 34F1C4 E003A544 3C02E6DE */ lui $v0, (0xE6DEDE82 >> 16) /* 34F1C8 E003A548 3442DE82 */ ori $v0, $v0, (0xE6DEDE82 & 0xFFFF) /* 34F1CC E003A54C 24A30008 */ addiu $v1, $a1, 0x8 /* 34F1D0 E003A550 AE630000 */ sw $v1, 0x0($s3) /* 34F1D4 E003A554 3C03FA00 */ lui $v1, (0xFA000000 >> 16) /* 34F1D8 E003A558 ACA30000 */ sw $v1, 0x0($a1) /* 34F1DC E003A55C 0800E967 */ j .LE003A59C /* 34F1E0 E003A560 ACA20004 */ sw $v0, 0x4($a1) .LE003A564: /* 34F1E4 E003A564 3C03FF28 */ lui $v1, (0xFF280AA0 >> 16) /* 34F1E8 E003A568 34630AA0 */ ori $v1, $v1, (0xFF280AA0 & 0xFFFF) /* 34F1EC E003A56C 3C04E200 */ lui $a0, (0xE2001E01 >> 16) /* 34F1F0 E003A570 34841E01 */ ori $a0, $a0, (0xE2001E01 & 0xFFFF) /* 34F1F4 E003A574 24A20008 */ addiu $v0, $a1, 0x8 /* 34F1F8 E003A578 AE620000 */ sw $v0, 0x0($s3) /* 34F1FC E003A57C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 34F200 E003A580 ACA20000 */ sw $v0, 0x0($a1) /* 34F204 E003A584 24A20010 */ addiu $v0, $a1, 0x10 /* 34F208 E003A588 ACA30004 */ sw $v1, 0x4($a1) /* 34F20C E003A58C AE620000 */ sw $v0, 0x0($s3) /* 34F210 E003A590 24020003 */ addiu $v0, $zero, 0x3 /* 34F214 E003A594 ACA40008 */ sw $a0, 0x8($a1) /* 34F218 E003A598 ACA2000C */ sw $v0, 0xC($a1) .LE003A59C: /* 34F21C E003A59C 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 34F220 E003A5A0 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 34F224 E003A5A4 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 34F228 E003A5A8 3C04F200 */ lui $a0, (0xF2000080 >> 16) /* 34F22C E003A5AC 8D050000 */ lw $a1, 0x0($t0) /* 34F230 E003A5B0 00153940 */ sll $a3, $s5, 5 /* 34F234 E003A5B4 00A0182D */ daddu $v1, $a1, $zero /* 34F238 E003A5B8 24A50008 */ addiu $a1, $a1, 0x8 /* 34F23C E003A5BC AD050000 */ sw $a1, 0x0($t0) /* 34F240 E003A5C0 AC620000 */ sw $v0, 0x0($v1) /* 34F244 E003A5C4 32C200FF */ andi $v0, $s6, 0xFF /* 34F248 E003A5C8 AC620004 */ sw $v0, 0x4($v1) /* 34F24C E003A5CC 24A20008 */ addiu $v0, $a1, 0x8 /* 34F250 E003A5D0 AD020000 */ sw $v0, 0x0($t0) /* 34F254 E003A5D4 001511C0 */ sll $v0, $s5, 7 /* 34F258 E003A5D8 30420FFF */ andi $v0, $v0, 0xFFF /* 34F25C E003A5DC 00021300 */ sll $v0, $v0, 12 /* 34F260 E003A5E0 00441025 */ or $v0, $v0, $a0 /* 34F264 E003A5E4 ACA20000 */ sw $v0, 0x0($a1) /* 34F268 E003A5E8 24E20020 */ addiu $v0, $a3, 0x20 /* 34F26C E003A5EC 00021080 */ sll $v0, $v0, 2 /* 34F270 E003A5F0 30420FFF */ andi $v0, $v0, 0xFFF /* 34F274 E003A5F4 00023300 */ sll $a2, $v0, 12 /* 34F278 E003A5F8 34C20080 */ ori $v0, $a2, 0x80 /* 34F27C E003A5FC ACA20004 */ sw $v0, 0x4($a1) /* 34F280 E003A600 8FA900DC */ lw $t1, 0xDC($sp) /* 34F284 E003A604 1120000E */ beqz $t1, .LE003A640 /* 34F288 E003A608 0080182D */ daddu $v1, $a0, $zero /* 34F28C E003A60C 34630080 */ ori $v1, $v1, (0xF2000080 & 0xFFFF) /* 34F290 E003A610 3C040100 */ lui $a0, (0x1000100 >> 16) /* 34F294 E003A614 34840100 */ ori $a0, $a0, (0x1000100 & 0xFFFF) /* 34F298 E003A618 24A20010 */ addiu $v0, $a1, 0x10 /* 34F29C E003A61C 00C31825 */ or $v1, $a2, $v1 /* 34F2A0 E003A620 AD020000 */ sw $v0, 0x0($t0) /* 34F2A4 E003A624 24E20040 */ addiu $v0, $a3, 0x40 /* 34F2A8 E003A628 00021080 */ sll $v0, $v0, 2 /* 34F2AC E003A62C 30420FFF */ andi $v0, $v0, 0xFFF /* 34F2B0 E003A630 00021300 */ sll $v0, $v0, 12 /* 34F2B4 E003A634 00441025 */ or $v0, $v0, $a0 /* 34F2B8 E003A638 0800E99B */ j .LE003A66C /* 34F2BC E003A63C ACA30008 */ sw $v1, 0x8($a1) .LE003A640: /* 34F2C0 E003A640 3C030100 */ lui $v1, (0x1000080 >> 16) /* 34F2C4 E003A644 34630080 */ ori $v1, $v1, (0x1000080 & 0xFFFF) /* 34F2C8 E003A648 24A20010 */ addiu $v0, $a1, 0x10 /* 34F2CC E003A64C AD020000 */ sw $v0, 0x0($t0) /* 34F2D0 E003A650 00C41025 */ or $v0, $a2, $a0 /* 34F2D4 E003A654 ACA20008 */ sw $v0, 0x8($a1) /* 34F2D8 E003A658 24E20040 */ addiu $v0, $a3, 0x40 /* 34F2DC E003A65C 00021080 */ sll $v0, $v0, 2 /* 34F2E0 E003A660 30420FFF */ andi $v0, $v0, 0xFFF /* 34F2E4 E003A664 00021300 */ sll $v0, $v0, 12 /* 34F2E8 E003A668 00431025 */ or $v0, $v0, $v1 .LE003A66C: /* 34F2EC E003A66C ACA2000C */ sw $v0, 0xC($a1) /* 34F2F0 E003A670 8FC20008 */ lw $v0, 0x8($fp) /* 34F2F4 E003A674 24110001 */ addiu $s1, $zero, 0x1 /* 34F2F8 E003A678 0222102A */ slt $v0, $s1, $v0 /* 34F2FC E003A67C 10400037 */ beqz $v0, .LE003A75C /* 34F300 E003A680 26940034 */ addiu $s4, $s4, 0x34 /* 34F304 E003A684 3C16800A */ lui $s6, %hi(gDisplayContext) /* 34F308 E003A688 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 34F30C E003A68C 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 34F310 E003A690 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 34F314 E003A694 3C130001 */ lui $s3, (0x11630 >> 16) /* 34F318 E003A698 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 34F31C E003A69C 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 34F320 E003A6A0 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 34F324 E003A6A4 2690000C */ addiu $s0, $s4, 0xC .LE003A6A8: /* 34F328 E003A6A8 27A40018 */ addiu $a0, $sp, 0x18 /* 34F32C E003A6AC 26310001 */ addiu $s1, $s1, 0x1 /* 34F330 E003A6B0 8E05FFF8 */ lw $a1, -0x8($s0) /* 34F334 E003A6B4 8E06FFFC */ lw $a2, -0x4($s0) /* 34F338 E003A6B8 8E070000 */ lw $a3, 0x0($s0) /* 34F33C E003A6BC 0C080108 */ jal shim_guTranslateF /* 34F340 E003A6C0 26100034 */ addiu $s0, $s0, 0x34 /* 34F344 E003A6C4 27A40018 */ addiu $a0, $sp, 0x18 /* 34F348 E003A6C8 96A50000 */ lhu $a1, 0x0($s5) /* 34F34C E003A6CC 8EC20000 */ lw $v0, 0x0($s6) /* 34F350 E003A6D0 00052980 */ sll $a1, $a1, 6 /* 34F354 E003A6D4 00B32821 */ addu $a1, $a1, $s3 /* 34F358 E003A6D8 0C080118 */ jal shim_guMtxF2L /* 34F35C E003A6DC 00452821 */ addu $a1, $v0, $a1 /* 34F360 E003A6E0 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 34F364 E003A6E4 8E440000 */ lw $a0, 0x0($s2) /* 34F368 E003A6E8 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 34F36C E003A6EC 0080282D */ daddu $a1, $a0, $zero /* 34F370 E003A6F0 24840008 */ addiu $a0, $a0, 0x8 /* 34F374 E003A6F4 AE440000 */ sw $a0, 0x0($s2) /* 34F378 E003A6F8 96A20000 */ lhu $v0, 0x0($s5) /* 34F37C E003A6FC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 34F380 E003A700 ACA30000 */ sw $v1, 0x0($a1) /* 34F384 E003A704 24430001 */ addiu $v1, $v0, 0x1 /* 34F388 E003A708 3042FFFF */ andi $v0, $v0, 0xFFFF /* 34F38C E003A70C 00021180 */ sll $v0, $v0, 6 /* 34F390 E003A710 A6A30000 */ sh $v1, 0x0($s5) /* 34F394 E003A714 8EC30000 */ lw $v1, 0x0($s6) /* 34F398 E003A718 00531021 */ addu $v0, $v0, $s3 /* 34F39C E003A71C 00621821 */ addu $v1, $v1, $v0 /* 34F3A0 E003A720 24820008 */ addiu $v0, $a0, 0x8 /* 34F3A4 E003A724 ACA30004 */ sw $v1, 0x4($a1) /* 34F3A8 E003A728 AE420000 */ sw $v0, 0x0($s2) /* 34F3AC E003A72C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 34F3B0 E003A730 AC820000 */ sw $v0, 0x0($a0) /* 34F3B4 E003A734 8FA900D8 */ lw $t1, 0xD8($sp) /* 34F3B8 E003A738 24020040 */ addiu $v0, $zero, 0x40 /* 34F3BC E003A73C AC860008 */ sw $a2, 0x8($a0) /* 34F3C0 E003A740 AC82000C */ sw $v0, 0xC($a0) /* 34F3C4 E003A744 AC890004 */ sw $t1, 0x4($a0) /* 34F3C8 E003A748 8FC20008 */ lw $v0, 0x8($fp) /* 34F3CC E003A74C 24840010 */ addiu $a0, $a0, 0x10 /* 34F3D0 E003A750 0222102A */ slt $v0, $s1, $v0 /* 34F3D4 E003A754 1440FFD4 */ bnez $v0, .LE003A6A8 /* 34F3D8 E003A758 AE440000 */ sw $a0, 0x0($s2) .LE003A75C: /* 34F3DC E003A75C 3C02D838 */ lui $v0, (0xD8380002 >> 16) /* 34F3E0 E003A760 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 34F3E4 E003A764 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 34F3E8 E003A768 8CA40000 */ lw $a0, 0x0($a1) /* 34F3EC E003A76C 34420002 */ ori $v0, $v0, (0xD8380002 & 0xFFFF) /* 34F3F0 E003A770 0080182D */ daddu $v1, $a0, $zero /* 34F3F4 E003A774 24840008 */ addiu $a0, $a0, 0x8 /* 34F3F8 E003A778 ACA40000 */ sw $a0, 0x0($a1) /* 34F3FC E003A77C AC620000 */ sw $v0, 0x0($v1) /* 34F400 E003A780 24020040 */ addiu $v0, $zero, 0x40 /* 34F404 E003A784 AC620004 */ sw $v0, 0x4($v1) /* 34F408 E003A788 24020002 */ addiu $v0, $zero, 0x2 /* 34F40C E003A78C 16E20006 */ bne $s7, $v0, .LE003A7A8 /* 34F410 E003A790 3C03E200 */ lui $v1, (0xE2001E01 >> 16) /* 34F414 E003A794 34631E01 */ ori $v1, $v1, (0xE2001E01 & 0xFFFF) /* 34F418 E003A798 24820008 */ addiu $v0, $a0, 0x8 /* 34F41C E003A79C ACA20000 */ sw $v0, 0x0($a1) /* 34F420 E003A7A0 AC830000 */ sw $v1, 0x0($a0) /* 34F424 E003A7A4 AC800004 */ sw $zero, 0x4($a0) .LE003A7A8: /* 34F428 E003A7A8 8CA20000 */ lw $v0, 0x0($a1) /* 34F42C E003A7AC 0040182D */ daddu $v1, $v0, $zero /* 34F430 E003A7B0 24420008 */ addiu $v0, $v0, 0x8 /* 34F434 E003A7B4 ACA20000 */ sw $v0, 0x0($a1) /* 34F438 E003A7B8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 34F43C E003A7BC AC620000 */ sw $v0, 0x0($v1) /* 34F440 E003A7C0 AC600004 */ sw $zero, 0x4($v1) /* 34F444 E003A7C4 8FBF0104 */ lw $ra, 0x104($sp) /* 34F448 E003A7C8 8FBE0100 */ lw $fp, 0x100($sp) /* 34F44C E003A7CC 8FB700FC */ lw $s7, 0xFC($sp) /* 34F450 E003A7D0 8FB600F8 */ lw $s6, 0xF8($sp) /* 34F454 E003A7D4 8FB500F4 */ lw $s5, 0xF4($sp) /* 34F458 E003A7D8 8FB400F0 */ lw $s4, 0xF0($sp) /* 34F45C E003A7DC 8FB300EC */ lw $s3, 0xEC($sp) /* 34F460 E003A7E0 8FB200E8 */ lw $s2, 0xE8($sp) /* 34F464 E003A7E4 8FB100E4 */ lw $s1, 0xE4($sp) /* 34F468 E003A7E8 8FB000E0 */ lw $s0, 0xE0($sp) /* 34F46C E003A7EC 03E00008 */ jr $ra /* 34F470 E003A7F0 27BD0108 */ addiu $sp, $sp, 0x108 /* 34F474 E003A7F4 00000000 */ nop /* 34F478 E003A7F8 00000000 */ nop /* 34F47C E003A7FC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void smoke_impact_appendGfx(void* effect) { SmokeImpactFXData* part = ((EffectInstance*)effect)->data.smokeImpact; s32 unk_00 = part->unk_00; f32 unk_30 = part->unk_30; s32 unk_30_s32 = unk_30; s32 envAlpha = (unk_30 - unk_30_s32) * 256.0f; Gfx* dlist = D_E003A800[unk_00]; Gfx* dlist2 = D_E003A80C[unk_00]; s32 cond = (unk_30_s32 == 7); Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist2); 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); if (unk_00 < 2) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 130); } else { gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 40, 10, 160); gDPSetAlphaCompare(gMainGfxPos++, G_AC_DITHER); } gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (unk_30_s32 * 32 ) * 4, 0, (unk_30_s32 * 32 + 32) * 4, 32 * 4); if (cond) { gDPSetTileSize(gMainGfxPos++, 1, (unk_30_s32 * 32 + 32) * 4, 32 * 4, (unk_30_s32 * 32 + 64) * 4, 64 * 4); } else { gDPSetTileSize(gMainGfxPos++, 1, (unk_30_s32 * 32 + 32) * 4, 0, (unk_30_s32 * 32 + 64) * 4, 32 * 4); } part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); if (unk_00 == 2) { gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025B1A8 /* 189A88 8025B1A8 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 189A8C 8025B1AC AFB20018 */ sw $s2, 0x18($sp) /* 189A90 8025B1B0 0080902D */ daddu $s2, $a0, $zero /* 189A94 8025B1B4 AFB10014 */ sw $s1, 0x14($sp) /* 189A98 8025B1B8 00A0882D */ daddu $s1, $a1, $zero /* 189A9C 8025B1BC AFB3001C */ sw $s3, 0x1C($sp) /* 189AA0 8025B1C0 00C0982D */ daddu $s3, $a2, $zero /* 189AA4 8025B1C4 AFBF0028 */ sw $ra, 0x28($sp) /* 189AA8 8025B1C8 AFB50024 */ sw $s5, 0x24($sp) /* 189AAC 8025B1CC AFB40020 */ sw $s4, 0x20($sp) /* 189AB0 8025B1D0 AFB00010 */ sw $s0, 0x10($sp) /* 189AB4 8025B1D4 8E3000C0 */ lw $s0, 0xC0($s1) /* 189AB8 8025B1D8 820206C1 */ lb $v0, 0x6C1($s0) /* 189ABC 8025B1DC 8FB50040 */ lw $s5, 0x40($sp) /* 189AC0 8025B1E0 1040004B */ beqz $v0, .L8025B310 /* 189AC4 8025B1E4 00E0A02D */ daddu $s4, $a3, $zero /* 189AC8 8025B1E8 16400016 */ bnez $s2, .L8025B244 /* 189ACC 8025B1EC 00000000 */ nop /* 189AD0 8025B1F0 0C0B7830 */ jal spr_get_player_palettes /* 189AD4 8025B1F4 96240088 */ lhu $a0, 0x88($s1) /* 189AD8 8025B1F8 AE0206D0 */ sw $v0, 0x6D0($s0) /* 189ADC 8025B1FC 0040202D */ daddu $a0, $v0, $zero /* 189AE0 8025B200 A20006CD */ sb $zero, 0x6CD($s0) /* 189AE4 8025B204 8C830000 */ lw $v1, 0x0($a0) /* 189AE8 8025B208 2402FFFF */ addiu $v0, $zero, -0x1 /* 189AEC 8025B20C 1062000B */ beq $v1, $v0, .L8025B23C /* 189AF0 8025B210 0080182D */ daddu $v1, $a0, $zero /* 189AF4 8025B214 0040202D */ daddu $a0, $v0, $zero .L8025B218: /* 189AF8 8025B218 920206CD */ lbu $v0, 0x6CD($s0) /* 189AFC 8025B21C 24420001 */ addiu $v0, $v0, 0x1 /* 189B00 8025B220 A20206CD */ sb $v0, 0x6CD($s0) /* 189B04 8025B224 00021600 */ sll $v0, $v0, 24 /* 189B08 8025B228 00021583 */ sra $v0, $v0, 22 /* 189B0C 8025B22C 00431021 */ addu $v0, $v0, $v1 /* 189B10 8025B230 8C420000 */ lw $v0, 0x0($v0) /* 189B14 8025B234 1444FFF8 */ bne $v0, $a0, .L8025B218 /* 189B18 8025B238 00000000 */ nop .L8025B23C: /* 189B1C 8025B23C 08096CA7 */ j .L8025B29C /* 189B20 8025B240 24020006 */ addiu $v0, $zero, 0x6 .L8025B244: /* 189B24 8025B244 96240088 */ lhu $a0, 0x88($s1) /* 189B28 8025B248 0C0B7A90 */ jal spr_get_npc_palettes /* 189B2C 8025B24C 00000000 */ nop D_8025B250: /* 189B30 8025B250 AE0206D0 */ sw $v0, 0x6D0($s0) /* 189B34 8025B254 0040202D */ daddu $a0, $v0, $zero /* 189B38 8025B258 A20006CD */ sb $zero, 0x6CD($s0) /* 189B3C 8025B25C 8C830000 */ lw $v1, 0x0($a0) /* 189B40 8025B260 2402FFFF */ addiu $v0, $zero, -0x1 /* 189B44 8025B264 1062000B */ beq $v1, $v0, .L8025B294 /* 189B48 8025B268 0080182D */ daddu $v1, $a0, $zero /* 189B4C 8025B26C 0040202D */ daddu $a0, $v0, $zero .L8025B270: /* 189B50 8025B270 920206CD */ lbu $v0, 0x6CD($s0) /* 189B54 8025B274 24420001 */ addiu $v0, $v0, 0x1 /* 189B58 8025B278 A20206CD */ sb $v0, 0x6CD($s0) /* 189B5C 8025B27C 00021600 */ sll $v0, $v0, 24 /* 189B60 8025B280 00021583 */ sra $v0, $v0, 22 /* 189B64 8025B284 00431021 */ addu $v0, $v0, $v1 /* 189B68 8025B288 8C420000 */ lw $v0, 0x0($v0) /* 189B6C 8025B28C 1444FFF8 */ bne $v0, $a0, .L8025B270 /* 189B70 8025B290 00000000 */ nop .L8025B294: /* 189B74 8025B294 0C0B7A9B */ jal spr_get_npc_color_variations /* 189B78 8025B298 96240088 */ lhu $a0, 0x88($s1) .L8025B29C: /* 189B7C 8025B29C A20206CC */ sb $v0, 0x6CC($s0) /* 189B80 8025B2A0 820206CD */ lb $v0, 0x6CD($s0) /* 189B84 8025B2A4 18400015 */ blez $v0, .L8025B2FC D_8025B2A8: /* 189B88 8025B2A8 0000302D */ daddu $a2, $zero, $zero D_8025B2AC: /* 189B8C 8025B2AC 8E0206D0 */ lw $v0, 0x6D0($s0) D_8025B2B0: /* 189B90 8025B2B0 00061880 */ sll $v1, $a2, 2 /* 189B94 8025B2B4 00621821 */ addu $v1, $v1, $v0 /* 189B98 8025B2B8 00061140 */ sll $v0, $a2, 5 /* 189B9C 8025B2BC 8C630000 */ lw $v1, 0x0($v1) /* 189BA0 8025B2C0 10600009 */ beqz $v1, .L8025B2E8 /* 189BA4 8025B2C4 02022821 */ addu $a1, $s0, $v0 /* 189BA8 8025B2C8 0000202D */ daddu $a0, $zero, $zero .L8025B2CC: /* 189BAC 8025B2CC 94620000 */ lhu $v0, 0x0($v1) /* 189BB0 8025B2D0 24630002 */ addiu $v1, $v1, 0x2 /* 189BB4 8025B2D4 24840001 */ addiu $a0, $a0, 0x1 /* 189BB8 8025B2D8 A4A20000 */ sh $v0, 0x0($a1) /* 189BBC 8025B2DC 28820010 */ slti $v0, $a0, 0x10 /* 189BC0 8025B2E0 1440FFFA */ bnez $v0, .L8025B2CC /* 189BC4 8025B2E4 24A50002 */ addiu $a1, $a1, 0x2 .L8025B2E8: /* 189BC8 8025B2E8 820206CD */ lb $v0, 0x6CD($s0) /* 189BCC 8025B2EC 24C60001 */ addiu $a2, $a2, 0x1 /* 189BD0 8025B2F0 00C2102A */ slt $v0, $a2, $v0 /* 189BD4 8025B2F4 1440FFED */ bnez $v0, D_8025B2AC /* 189BD8 8025B2F8 00000000 */ nop .L8025B2FC: /* 189BDC 8025B2FC 2402FFFE */ addiu $v0, $zero, -0x2 /* 189BE0 8025B300 A20206C2 */ sb $v0, 0x6C2($s0) /* 189BE4 8025B304 A60006CA */ sh $zero, 0x6CA($s0) /* 189BE8 8025B308 A20006C1 */ sb $zero, 0x6C1($s0) /* 189BEC 8025B30C A60006C8 */ sh $zero, 0x6C8($s0) .L8025B310: /* 189BF0 8025B310 16A0001E */ bnez $s5, .L8025B38C /* 189BF4 8025B314 00000000 */ nop /* 189BF8 8025B318 860206C8 */ lh $v0, 0x6C8($s0) /* 189BFC 8025B31C 14400013 */ bnez $v0, .L8025B36C /* 189C00 8025B320 00000000 */ nop /* 189C04 8025B324 920206C2 */ lbu $v0, 0x6C2($s0) /* 189C08 8025B328 3C048028 */ lui $a0, %hi(D_80284120) /* 189C0C 8025B32C 24844120 */ addiu $a0, $a0, %lo(D_80284120) /* 189C10 8025B330 24420002 */ addiu $v0, $v0, 0x2 /* 189C14 8025B334 A20206C2 */ sb $v0, 0x6C2($s0) /* 189C18 8025B338 00021600 */ sll $v0, $v0, 24 /* 189C1C 8025B33C 00021603 */ sra $v0, $v0, 24 /* 189C20 8025B340 3C038028 */ lui $v1, %hi(D_80284120) /* 189C24 8025B344 00621821 */ addu $v1, $v1, $v0 /* 189C28 8025B348 90634120 */ lbu $v1, %lo(D_80284120)($v1) /* 189C2C 8025B34C 240200FF */ addiu $v0, $zero, 0xFF /* 189C30 8025B350 50620001 */ beql $v1, $v0, .L8025B358 /* 189C34 8025B354 A20006C2 */ sb $zero, 0x6C2($s0) .L8025B358: /* 189C38 8025B358 820206C2 */ lb $v0, 0x6C2($s0) /* 189C3C 8025B35C 00441021 */ addu $v0, $v0, $a0 /* 189C40 8025B360 90420001 */ lbu $v0, 0x1($v0) /* 189C44 8025B364 00021042 */ srl $v0, $v0, 1 /* 189C48 8025B368 A60206C8 */ sh $v0, 0x6C8($s0) .L8025B36C: /* 189C4C 8025B36C 820306C2 */ lb $v1, 0x6C2($s0) /* 189C50 8025B370 960206C8 */ lhu $v0, 0x6C8($s0) /* 189C54 8025B374 3C018028 */ lui $at, %hi(D_80284120) /* 189C58 8025B378 00230821 */ addu $at, $at, $v1 /* 189C5C 8025B37C 90234120 */ lbu $v1, %lo(D_80284120)($at) /* 189C60 8025B380 2442FFFF */ addiu $v0, $v0, -0x1 /* 189C64 8025B384 08096CE7 */ j .L8025B39C /* 189C68 8025B388 A60206C8 */ sh $v0, 0x6C8($s0) .L8025B38C: /* 189C6C 8025B38C 820206C2 */ lb $v0, 0x6C2($s0) /* 189C70 8025B390 3C038028 */ lui $v1, %hi(D_80284120) /* 189C74 8025B394 00621821 */ addu $v1, $v1, $v0 /* 189C78 8025B398 90634120 */ lbu $v1, %lo(D_80284120)($v1) .L8025B39C: /* 189C7C 8025B39C 24020001 */ addiu $v0, $zero, 0x1 /* 189C80 8025B3A0 10620024 */ beq $v1, $v0, .L8025B434 /* 189C84 8025B3A4 28620002 */ slti $v0, $v1, 0x2 /* 189C88 8025B3A8 10400005 */ beqz $v0, .L8025B3C0 /* 189C8C 8025B3AC 24020002 */ addiu $v0, $zero, 0x2 /* 189C90 8025B3B0 10600007 */ beqz $v1, .L8025B3D0 /* 189C94 8025B3B4 00000000 */ nop /* 189C98 8025B3B8 08096D4C */ j .L8025B530 /* 189C9C 8025B3BC 00000000 */ nop .L8025B3C0: /* 189CA0 8025B3C0 1062003C */ beq $v1, $v0, .L8025B4B4 /* 189CA4 8025B3C4 00000000 */ nop /* 189CA8 8025B3C8 08096D4C */ j .L8025B530 /* 189CAC 8025B3CC 00000000 */ nop .L8025B3D0: /* 189CB0 8025B3D0 820206CC */ lb $v0, 0x6CC($s0) /* 189CB4 8025B3D4 18400056 */ blez $v0, .L8025B530 /* 189CB8 8025B3D8 0000302D */ daddu $a2, $zero, $zero .L8025B3DC: /* 189CBC 8025B3DC 8E0206D0 */ lw $v0, 0x6D0($s0) /* 189CC0 8025B3E0 00061880 */ sll $v1, $a2, 2 /* 189CC4 8025B3E4 00621821 */ addu $v1, $v1, $v0 /* 189CC8 8025B3E8 00061140 */ sll $v0, $a2, 5 /* 189CCC 8025B3EC 8C630000 */ lw $v1, 0x0($v1) /* 189CD0 8025B3F0 10600009 */ beqz $v1, .L8025B418 /* 189CD4 8025B3F4 02022821 */ addu $a1, $s0, $v0 /* 189CD8 8025B3F8 0000202D */ daddu $a0, $zero, $zero .L8025B3FC: /* 189CDC 8025B3FC 94620000 */ lhu $v0, 0x0($v1) /* 189CE0 8025B400 24630002 */ addiu $v1, $v1, 0x2 /* 189CE4 8025B404 24840001 */ addiu $a0, $a0, 0x1 /* 189CE8 8025B408 A4A20000 */ sh $v0, 0x0($a1) /* 189CEC 8025B40C 28820010 */ slti $v0, $a0, 0x10 /* 189CF0 8025B410 1440FFFA */ bnez $v0, .L8025B3FC /* 189CF4 8025B414 24A50002 */ addiu $a1, $a1, 0x2 .L8025B418: /* 189CF8 8025B418 820206CC */ lb $v0, 0x6CC($s0) /* 189CFC 8025B41C 24C60001 */ addiu $a2, $a2, 0x1 /* 189D00 8025B420 00C2102A */ slt $v0, $a2, $v0 /* 189D04 8025B424 10400042 */ beqz $v0, .L8025B530 /* 189D08 8025B428 00000000 */ nop /* 189D0C 8025B42C 08096CF7 */ j .L8025B3DC /* 189D10 8025B430 00000000 */ nop .L8025B434: /* 189D14 8025B434 820206CC */ lb $v0, 0x6CC($s0) /* 189D18 8025B438 920306CC */ lbu $v1, 0x6CC($s0) /* 189D1C 8025B43C 1840003C */ blez $v0, .L8025B530 /* 189D20 8025B440 0000302D */ daddu $a2, $zero, $zero /* 189D24 8025B444 00031E00 */ sll $v1, $v1, 24 .L8025B448: /* 189D28 8025B448 00031E03 */ sra $v1, $v1, 24 /* 189D2C 8025B44C 00031080 */ sll $v0, $v1, 2 /* 189D30 8025B450 00431021 */ addu $v0, $v0, $v1 /* 189D34 8025B454 00461021 */ addu $v0, $v0, $a2 /* 189D38 8025B458 8E0306D0 */ lw $v1, 0x6D0($s0) /* 189D3C 8025B45C 00021080 */ sll $v0, $v0, 2 /* 189D40 8025B460 00431021 */ addu $v0, $v0, $v1 /* 189D44 8025B464 8C430000 */ lw $v1, 0x0($v0) /* 189D48 8025B468 00061140 */ sll $v0, $a2, 5 /* 189D4C 8025B46C 10600009 */ beqz $v1, .L8025B494 /* 189D50 8025B470 02022821 */ addu $a1, $s0, $v0 /* 189D54 8025B474 0000202D */ daddu $a0, $zero, $zero .L8025B478: /* 189D58 8025B478 94620000 */ lhu $v0, 0x0($v1) /* 189D5C 8025B47C 24630002 */ addiu $v1, $v1, 0x2 /* 189D60 8025B480 24840001 */ addiu $a0, $a0, 0x1 /* 189D64 8025B484 A4A20000 */ sh $v0, 0x0($a1) /* 189D68 8025B488 28820010 */ slti $v0, $a0, 0x10 /* 189D6C 8025B48C 1440FFFA */ bnez $v0, .L8025B478 /* 189D70 8025B490 24A50002 */ addiu $a1, $a1, 0x2 .L8025B494: /* 189D74 8025B494 24C60001 */ addiu $a2, $a2, 0x1 /* 189D78 8025B498 820206CC */ lb $v0, 0x6CC($s0) /* 189D7C 8025B49C 920306CC */ lbu $v1, 0x6CC($s0) /* 189D80 8025B4A0 00C2102A */ slt $v0, $a2, $v0 /* 189D84 8025B4A4 5440FFE8 */ bnel $v0, $zero, .L8025B448 /* 189D88 8025B4A8 00031E00 */ sll $v1, $v1, 24 /* 189D8C 8025B4AC 08096D4C */ j .L8025B530 /* 189D90 8025B4B0 00000000 */ nop .L8025B4B4: /* 189D94 8025B4B4 820206CC */ lb $v0, 0x6CC($s0) /* 189D98 8025B4B8 920306CC */ lbu $v1, 0x6CC($s0) D_8025B4BC: /* 189D9C 8025B4BC 1840001C */ blez $v0, .L8025B530 /* 189DA0 8025B4C0 0000302D */ daddu $a2, $zero, $zero /* 189DA4 8025B4C4 00031E00 */ sll $v1, $v1, 24 .L8025B4C8: /* 189DA8 8025B4C8 00031E03 */ sra $v1, $v1, 24 /* 189DAC 8025B4CC 00031040 */ sll $v0, $v1, 1 /* 189DB0 8025B4D0 00431021 */ addu $v0, $v0, $v1 /* 189DB4 8025B4D4 00021040 */ sll $v0, $v0, 1 /* 189DB8 8025B4D8 00461021 */ addu $v0, $v0, $a2 /* 189DBC 8025B4DC 8E0306D0 */ lw $v1, 0x6D0($s0) D_8025B4E0: /* 189DC0 8025B4E0 00021080 */ sll $v0, $v0, 2 /* 189DC4 8025B4E4 00431021 */ addu $v0, $v0, $v1 /* 189DC8 8025B4E8 8C430000 */ lw $v1, 0x0($v0) /* 189DCC 8025B4EC 00061140 */ sll $v0, $a2, 5 /* 189DD0 8025B4F0 10600009 */ beqz $v1, .L8025B518 /* 189DD4 8025B4F4 02022821 */ addu $a1, $s0, $v0 /* 189DD8 8025B4F8 0000202D */ daddu $a0, $zero, $zero .L8025B4FC: /* 189DDC 8025B4FC 94620000 */ lhu $v0, 0x0($v1) /* 189DE0 8025B500 24630002 */ addiu $v1, $v1, 0x2 /* 189DE4 8025B504 24840001 */ addiu $a0, $a0, 0x1 /* 189DE8 8025B508 A4A20000 */ sh $v0, 0x0($a1) /* 189DEC 8025B50C 28820010 */ slti $v0, $a0, 0x10 /* 189DF0 8025B510 1440FFFA */ bnez $v0, .L8025B4FC /* 189DF4 8025B514 24A50002 */ addiu $a1, $a1, 0x2 .L8025B518: /* 189DF8 8025B518 24C60001 */ addiu $a2, $a2, 0x1 /* 189DFC 8025B51C 820206CC */ lb $v0, 0x6CC($s0) /* 189E00 8025B520 920306CC */ lbu $v1, 0x6CC($s0) /* 189E04 8025B524 00C2102A */ slt $v0, $a2, $v0 /* 189E08 8025B528 5440FFE7 */ bnel $v0, $zero, .L8025B4C8 /* 189E0C 8025B52C 00031E00 */ sll $v1, $v1, 24 .L8025B530: /* 189E10 8025B530 820206CD */ lb $v0, 0x6CD($s0) /* 189E14 8025B534 1840000A */ blez $v0, .L8025B560 /* 189E18 8025B538 0000302D */ daddu $a2, $zero, $zero /* 189E1C 8025B53C 0200202D */ daddu $a0, $s0, $zero /* 189E20 8025B540 0200182D */ daddu $v1, $s0, $zero .L8025B544: /* 189E24 8025B544 AC6406D4 */ sw $a0, 0x6D4($v1) /* 189E28 8025B548 24840020 */ addiu $a0, $a0, 0x20 /* 189E2C 8025B54C 820206CD */ lb $v0, 0x6CD($s0) /* 189E30 8025B550 24C60001 */ addiu $a2, $a2, 0x1 /* 189E34 8025B554 00C2102A */ slt $v0, $a2, $v0 /* 189E38 8025B558 1440FFFA */ bnez $v0, .L8025B544 /* 189E3C 8025B55C 24630004 */ addiu $v1, $v1, 0x4 .L8025B560: /* 189E40 8025B560 16400006 */ bnez $s2, .L8025B57C /* 189E44 8025B564 0220202D */ daddu $a0, $s1, $zero /* 189E48 8025B568 0260282D */ daddu $a1, $s3, $zero /* 189E4C 8025B56C 0C096657 */ jal func_8025995C /* 189E50 8025B570 0280302D */ daddu $a2, $s4, $zero /* 189E54 8025B574 08096D62 */ j .L8025B588 /* 189E58 8025B578 00000000 */ nop .L8025B57C: /* 189E5C 8025B57C 0260282D */ daddu $a1, $s3, $zero /* 189E60 8025B580 0C0965B0 */ jal func_802596C0 /* 189E64 8025B584 0280302D */ daddu $a2, $s4, $zero .L8025B588: /* 189E68 8025B588 16A00004 */ bnez $s5, .L8025B59C /* 189E6C 8025B58C 00000000 */ nop /* 189E70 8025B590 960206CA */ lhu $v0, 0x6CA($s0) /* 189E74 8025B594 2442FFFF */ addiu $v0, $v0, -0x1 /* 189E78 8025B598 A60206CA */ sh $v0, 0x6CA($s0) .L8025B59C: /* 189E7C 8025B59C 8FBF0028 */ lw $ra, 0x28($sp) /* 189E80 8025B5A0 8FB50024 */ lw $s5, 0x24($sp) /* 189E84 8025B5A4 8FB40020 */ lw $s4, 0x20($sp) /* 189E88 8025B5A8 8FB3001C */ lw $s3, 0x1C($sp) /* 189E8C 8025B5AC 8FB20018 */ lw $s2, 0x18($sp) /* 189E90 8025B5B0 8FB10014 */ lw $s1, 0x14($sp) /* 189E94 8025B5B4 8FB00010 */ lw $s0, 0x10($sp) /* 189E98 8025B5B8 03E00008 */ jr $ra /* 189E9C 8025B5BC 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void render_with_watt_attack_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 palIdx; s32 brightness; 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 (WattAttackPalettesAnim[decorationTable->palAnimState] == PAL_ANIM_END) { decorationTable->palAnimState = 0; } decorationTable->nextPalTime = WattAttackPalettesAnim[decorationTable->palAnimState + 1] / 2; } brightness = WattAttackPalettesAnim[decorationTable->palAnimState]; decorationTable->nextPalTime--; } else { //@bug if only called with skipAnimation set, palAnimPos will always be -2 and the array access is OOB brightness = WattAttackPalettesAnim[decorationTable->palAnimState]; } switch (brightness) { case WATT_DEFAULT: 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 WATT_BRIGHTEST: for (i = 0; i < decorationTable->spriteColorVariations; i++) { // use watt's Brightest palettes palIdx = decorationTable->spriteColorVariations * SPR_PAL_BattleWatt_Brightest + i; palIn = decorationTable->originalPalettesList[palIdx]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } break; case WATT_BRIGHTER: for (i = 0; i < decorationTable->spriteColorVariations; i++) { // use watt's Brighter palettes palIdx = decorationTable->spriteColorVariations * SPR_PAL_BattleWatt_Brighter + i; palIn = decorationTable->originalPalettesList[palIdx]; palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { *palOut++ = *palIn++; } } } 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 energy_in_out_appendGfx /* 3D59A0 E00D6980 27BDFF08 */ addiu $sp, $sp, -0xF8 /* 3D59A4 E00D6984 3C08DB06 */ lui $t0, (0xDB060024 >> 16) /* 3D59A8 E00D6988 AFB200B8 */ sw $s2, 0xB8($sp) /* 3D59AC E00D698C 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 3D59B0 E00D6990 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 3D59B4 E00D6994 AFBF00D4 */ sw $ra, 0xD4($sp) /* 3D59B8 E00D6998 AFBE00D0 */ sw $fp, 0xD0($sp) /* 3D59BC E00D699C AFB700CC */ sw $s7, 0xCC($sp) /* 3D59C0 E00D69A0 AFB600C8 */ sw $s6, 0xC8($sp) /* 3D59C4 E00D69A4 AFB500C4 */ sw $s5, 0xC4($sp) /* 3D59C8 E00D69A8 AFB400C0 */ sw $s4, 0xC0($sp) /* 3D59CC E00D69AC AFB300BC */ sw $s3, 0xBC($sp) /* 3D59D0 E00D69B0 AFB100B4 */ sw $s1, 0xB4($sp) /* 3D59D4 E00D69B4 AFB000B0 */ sw $s0, 0xB0($sp) /* 3D59D8 E00D69B8 F7BA00F0 */ sdc1 $f26, 0xF0($sp) /* 3D59DC E00D69BC F7B800E8 */ sdc1 $f24, 0xE8($sp) /* 3D59E0 E00D69C0 F7B600E0 */ sdc1 $f22, 0xE0($sp) /* 3D59E4 E00D69C4 F7B400D8 */ sdc1 $f20, 0xD8($sp) /* 3D59E8 E00D69C8 AFA400F8 */ sw $a0, 0xF8($sp) /* 3D59EC E00D69CC 8E460000 */ lw $a2, 0x0($s2) /* 3D59F0 E00D69D0 8FA900F8 */ lw $t1, 0xF8($sp) /* 3D59F4 E00D69D4 4480A000 */ mtc1 $zero, $f20 /* 3D59F8 E00D69D8 8D31000C */ lw $s1, 0xC($t1) /* 3D59FC E00D69DC 4405A000 */ mfc1 $a1, $f20 /* 3D5A00 E00D69E0 4407A000 */ mfc1 $a3, $f20 /* 3D5A04 E00D69E4 8E290024 */ lw $t1, 0x24($s1) /* 3D5A08 E00D69E8 35080024 */ ori $t0, $t0, (0xDB060024 & 0xFFFF) /* 3D5A0C E00D69EC AFA900A0 */ sw $t1, 0xA0($sp) /* 3D5A10 E00D69F0 8E290000 */ lw $t1, 0x0($s1) /* 3D5A14 E00D69F4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D5A18 E00D69F8 AFA900A4 */ sw $t1, 0xA4($sp) /* 3D5A1C E00D69FC C6200034 */ lwc1 $f0, 0x34($s1) /* 3D5A20 E00D6A00 C6220044 */ lwc1 $f2, 0x44($s1) /* 3D5A24 E00D6A04 8E360018 */ lw $s6, 0x18($s1) /* 3D5A28 E00D6A08 8E3E001C */ lw $fp, 0x1C($s1) /* 3D5A2C E00D6A0C 8E290020 */ lw $t1, 0x20($s1) /* 3D5A30 E00D6A10 00C0182D */ daddu $v1, $a2, $zero /* 3D5A34 E00D6A14 AFA900A8 */ sw $t1, 0xA8($sp) /* 3D5A38 E00D6A18 C63A0038 */ lwc1 $f26, 0x38($s1) /* 3D5A3C E00D6A1C 24C60008 */ addiu $a2, $a2, 0x8 /* 3D5A40 E00D6A20 AC620000 */ sw $v0, 0x0($v1) /* 3D5A44 E00D6A24 AC600004 */ sw $zero, 0x4($v1) /* 3D5A48 E00D6A28 ACC80000 */ sw $t0, 0x0($a2) /* 3D5A4C E00D6A2C 8FA900F8 */ lw $t1, 0xF8($sp) /* 3D5A50 E00D6A30 3C088000 */ lui $t0, (0x80000000 >> 16) /* 3D5A54 E00D6A34 8D220010 */ lw $v0, 0x10($t1) /* 3D5A58 E00D6A38 46020002 */ mul.s $f0, $f0, $f2 /* 3D5A5C E00D6A3C 00000000 */ nop /* 3D5A60 E00D6A40 8C42001C */ lw $v0, 0x1C($v0) /* 3D5A64 E00D6A44 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3D5A68 E00D6A48 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3D5A6C E00D6A4C 00481021 */ addu $v0, $v0, $t0 /* 3D5A70 E00D6A50 ACC20004 */ sw $v0, 0x4($a2) /* 3D5A74 E00D6A54 00031080 */ sll $v0, $v1, 2 /* 3D5A78 E00D6A58 00431021 */ addu $v0, $v0, $v1 /* 3D5A7C E00D6A5C 00021080 */ sll $v0, $v0, 2 /* 3D5A80 E00D6A60 00431023 */ subu $v0, $v0, $v1 /* 3D5A84 E00D6A64 000218C0 */ sll $v1, $v0, 3 /* 3D5A88 E00D6A68 00431021 */ addu $v0, $v0, $v1 /* 3D5A8C E00D6A6C 000210C0 */ sll $v0, $v0, 3 /* 3D5A90 E00D6A70 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3D5A94 E00D6A74 00220821 */ addu $at, $at, $v0 /* 3D5A98 E00D6A78 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 3D5A9C E00D6A7C 27A40020 */ addiu $a0, $sp, 0x20 /* 3D5AA0 E00D6A80 E7A00010 */ swc1 $f0, 0x10($sp) /* 3D5AA4 E00D6A84 C6200004 */ lwc1 $f0, 0x4($s1) /* 3D5AA8 E00D6A88 3C100001 */ lui $s0, (0x11630 >> 16) /* 3D5AAC E00D6A8C AE460000 */ sw $a2, 0x0($s2) /* 3D5AB0 E00D6A90 24C60008 */ addiu $a2, $a2, 0x8 /* 3D5AB4 E00D6A94 E7A00014 */ swc1 $f0, 0x14($sp) /* 3D5AB8 E00D6A98 C6200008 */ lwc1 $f0, 0x8($s1) /* 3D5ABC E00D6A9C 46001087 */ neg.s $f2, $f2 /* 3D5AC0 E00D6AA0 AE460000 */ sw $a2, 0x0($s2) /* 3D5AC4 E00D6AA4 44061000 */ mfc1 $a2, $f2 /* 3D5AC8 E00D6AA8 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 3D5ACC E00D6AAC E7A00018 */ swc1 $f0, 0x18($sp) /* 3D5AD0 E00D6AB0 C620000C */ lwc1 $f0, 0xC($s1) /* 3D5AD4 E00D6AB4 24140001 */ addiu $s4, $zero, 0x1 /* 3D5AD8 E00D6AB8 0C080180 */ jal shim_guPositionF /* 3D5ADC E00D6ABC E7A0001C */ swc1 $f0, 0x1C($sp) /* 3D5AE0 E00D6AC0 27A40020 */ addiu $a0, $sp, 0x20 /* 3D5AE4 E00D6AC4 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 3D5AE8 E00D6AC8 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 3D5AEC E00D6ACC 3C17800A */ lui $s7, %hi(gDisplayContext) /* 3D5AF0 E00D6AD0 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext) /* 3D5AF4 E00D6AD4 96A50000 */ lhu $a1, 0x0($s5) /* 3D5AF8 E00D6AD8 8EE20000 */ lw $v0, 0x0($s7) /* 3D5AFC E00D6ADC 00052980 */ sll $a1, $a1, 6 /* 3D5B00 E00D6AE0 00B02821 */ addu $a1, $a1, $s0 /* 3D5B04 E00D6AE4 0C080118 */ jal shim_guMtxF2L /* 3D5B08 E00D6AE8 00452821 */ addu $a1, $v0, $a1 /* 3D5B0C E00D6AEC 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3D5B10 E00D6AF0 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3D5B14 E00D6AF4 8E440000 */ lw $a0, 0x0($s2) /* 3D5B18 E00D6AF8 96A20000 */ lhu $v0, 0x0($s5) /* 3D5B1C E00D6AFC 0080282D */ daddu $a1, $a0, $zero /* 3D5B20 E00D6B00 24840008 */ addiu $a0, $a0, 0x8 /* 3D5B24 E00D6B04 AE440000 */ sw $a0, 0x0($s2) /* 3D5B28 E00D6B08 ACA30000 */ sw $v1, 0x0($a1) /* 3D5B2C E00D6B0C 00541821 */ addu $v1, $v0, $s4 /* 3D5B30 E00D6B10 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D5B34 E00D6B14 00021180 */ sll $v0, $v0, 6 /* 3D5B38 E00D6B18 A6A30000 */ sh $v1, 0x0($s5) /* 3D5B3C E00D6B1C 8EE30000 */ lw $v1, 0x0($s7) /* 3D5B40 E00D6B20 00501021 */ addu $v0, $v0, $s0 /* 3D5B44 E00D6B24 00621821 */ addu $v1, $v1, $v0 /* 3D5B48 E00D6B28 24820008 */ addiu $v0, $a0, 0x8 /* 3D5B4C E00D6B2C ACA30004 */ sw $v1, 0x4($a1) /* 3D5B50 E00D6B30 AE420000 */ sw $v0, 0x0($s2) /* 3D5B54 E00D6B34 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3D5B58 E00D6B38 AC820000 */ sw $v0, 0x0($a0) /* 3D5B5C E00D6B3C 9222001B */ lbu $v0, 0x1B($s1) /* 3D5B60 E00D6B40 9225001F */ lbu $a1, 0x1F($s1) /* 3D5B64 E00D6B44 92260023 */ lbu $a2, 0x23($s1) /* 3D5B68 E00D6B48 24830010 */ addiu $v1, $a0, 0x10 /* 3D5B6C E00D6B4C AE430000 */ sw $v1, 0x0($s2) /* 3D5B70 E00D6B50 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3D5B74 E00D6B54 AC830008 */ sw $v1, 0x8($a0) /* 3D5B78 E00D6B58 8FA900A0 */ lw $t1, 0xA0($sp) /* 3D5B7C E00D6B5C 00021600 */ sll $v0, $v0, 24 /* 3D5B80 E00D6B60 00052C00 */ sll $a1, $a1, 16 /* 3D5B84 E00D6B64 00451025 */ or $v0, $v0, $a1 /* 3D5B88 E00D6B68 00063200 */ sll $a2, $a2, 8 /* 3D5B8C E00D6B6C 00461025 */ or $v0, $v0, $a2 /* 3D5B90 E00D6B70 312300FF */ andi $v1, $t1, 0xFF /* 3D5B94 E00D6B74 00431025 */ or $v0, $v0, $v1 /* 3D5B98 E00D6B78 AC820004 */ sw $v0, 0x4($a0) /* 3D5B9C E00D6B7C 9223002B */ lbu $v1, 0x2B($s1) /* 3D5BA0 E00D6B80 9225002F */ lbu $a1, 0x2F($s1) /* 3D5BA4 E00D6B84 92260033 */ lbu $a2, 0x33($s1) /* 3D5BA8 E00D6B88 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D5BAC E00D6B8C AC820010 */ sw $v0, 0x10($a0) /* 3D5BB0 E00D6B90 3C020900 */ lui $v0, %hi(D_09000200_415260) /* 3D5BB4 E00D6B94 24420200 */ addiu $v0, $v0, %lo(D_09000200_415260) /* 3D5BB8 E00D6B98 AC820014 */ sw $v0, 0x14($a0) /* 3D5BBC E00D6B9C 00031E00 */ sll $v1, $v1, 24 /* 3D5BC0 E00D6BA0 00052C00 */ sll $a1, $a1, 16 /* 3D5BC4 E00D6BA4 00651825 */ or $v1, $v1, $a1 /* 3D5BC8 E00D6BA8 00063200 */ sll $a2, $a2, 8 /* 3D5BCC E00D6BAC 00661825 */ or $v1, $v1, $a2 /* 3D5BD0 E00D6BB0 AC83000C */ sw $v1, 0xC($a0) /* 3D5BD4 E00D6BB4 8FA900F8 */ lw $t1, 0xF8($sp) /* 3D5BD8 E00D6BB8 26310048 */ addiu $s1, $s1, 0x48 /* 3D5BDC E00D6BBC 8D220008 */ lw $v0, 0x8($t1) /* 3D5BE0 E00D6BC0 24840018 */ addiu $a0, $a0, 0x18 /* 3D5BE4 E00D6BC4 0282102A */ slt $v0, $s4, $v0 /* 3D5BE8 E00D6BC8 10400080 */ beqz $v0, .LE00D6DCC /* 3D5BEC E00D6BCC AE440000 */ sw $a0, 0x0($s2) /* 3D5BF0 E00D6BD0 0240982D */ daddu $s3, $s2, $zero /* 3D5BF4 E00D6BD4 00161E00 */ sll $v1, $s6, 24 /* 3D5BF8 E00D6BD8 33C200FF */ andi $v0, $fp, 0xFF /* 3D5BFC E00D6BDC 00021400 */ sll $v0, $v0, 16 /* 3D5C00 E00D6BE0 00621825 */ or $v1, $v1, $v0 /* 3D5C04 E00D6BE4 4600A606 */ mov.s $f24, $f20 /* 3D5C08 E00D6BE8 27B20060 */ addiu $s2, $sp, 0x60 /* 3D5C0C E00D6BEC 02E0F02D */ daddu $fp, $s7, $zero /* 3D5C10 E00D6BF0 02A0B82D */ daddu $s7, $s5, $zero /* 3D5C14 E00D6BF4 3C150001 */ lui $s5, (0x11630 >> 16) /* 3D5C18 E00D6BF8 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 3D5C1C E00D6BFC 26300004 */ addiu $s0, $s1, 0x4 /* 3D5C20 E00D6C00 8FA900A8 */ lw $t1, 0xA8($sp) /* 3D5C24 E00D6C04 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3D5C28 E00D6C08 4481B000 */ mtc1 $at, $f22 /* 3D5C2C E00D6C0C 312200FF */ andi $v0, $t1, 0xFF /* 3D5C30 E00D6C10 00021200 */ sll $v0, $v0, 8 /* 3D5C34 E00D6C14 8FA900A4 */ lw $t1, 0xA4($sp) /* 3D5C38 E00D6C18 00621825 */ or $v1, $v1, $v0 /* 3D5C3C E00D6C1C AFA300AC */ sw $v1, 0xAC($sp) /* 3D5C40 E00D6C20 3C03E00D */ lui $v1, %hi(D_E00D6E40) /* 3D5C44 E00D6C24 24636E40 */ addiu $v1, $v1, %lo(D_E00D6E40) /* 3D5C48 E00D6C28 00091080 */ sll $v0, $t1, 2 /* 3D5C4C E00D6C2C 0043B021 */ addu $s6, $v0, $v1 .LE00D6C30: /* 3D5C50 E00D6C30 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3D5C54 E00D6C34 8E680000 */ lw $t0, 0x0($s3) /* 3D5C58 E00D6C38 C6140030 */ lwc1 $f20, 0x30($s0) /* 3D5C5C E00D6C3C 0100282D */ daddu $a1, $t0, $zero /* 3D5C60 E00D6C40 ACA20000 */ sw $v0, 0x0($a1) /* 3D5C64 E00D6C44 8E030020 */ lw $v1, 0x20($s0) /* 3D5C68 E00D6C48 8FA900A0 */ lw $t1, 0xA0($sp) /* 3D5C6C E00D6C4C 01230018 */ mult $t1, $v1 /* 3D5C70 E00D6C50 00001812 */ mflo $v1 /* 3D5C74 E00D6C54 3C028080 */ lui $v0, (0x80808081 >> 16) /* 3D5C78 E00D6C58 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF) /* 3D5C7C E00D6C5C 00620018 */ mult $v1, $v0 /* 3D5C80 E00D6C60 27A40020 */ addiu $a0, $sp, 0x20 /* 3D5C84 E00D6C64 4406C000 */ mfc1 $a2, $f24 /* 3D5C88 E00D6C68 4407C000 */ mfc1 $a3, $f24 /* 3D5C8C E00D6C6C 8FA900AC */ lw $t1, 0xAC($sp) /* 3D5C90 E00D6C70 00001010 */ mfhi $v0 /* 3D5C94 E00D6C74 00431021 */ addu $v0, $v0, $v1 /* 3D5C98 E00D6C78 000211C3 */ sra $v0, $v0, 7 /* 3D5C9C E00D6C7C 00031FC3 */ sra $v1, $v1, 31 /* 3D5CA0 E00D6C80 00431023 */ subu $v0, $v0, $v1 /* 3D5CA4 E00D6C84 304200FF */ andi $v0, $v0, 0xFF /* 3D5CA8 E00D6C88 01221025 */ or $v0, $t1, $v0 /* 3D5CAC E00D6C8C ACA20004 */ sw $v0, 0x4($a1) /* 3D5CB0 E00D6C90 E7B60010 */ swc1 $f22, 0x10($sp) /* 3D5CB4 E00D6C94 8E050038 */ lw $a1, 0x38($s0) /* 3D5CB8 E00D6C98 25080008 */ addiu $t0, $t0, 0x8 /* 3D5CBC E00D6C9C 0C080104 */ jal shim_guRotateF /* 3D5CC0 E00D6CA0 AE680000 */ sw $t0, 0x0($s3) /* 3D5CC4 E00D6CA4 C6000000 */ lwc1 $f0, 0x0($s0) /* 3D5CC8 E00D6CA8 461A0000 */ add.s $f0, $f0, $f26 /* 3D5CCC E00D6CAC 4406C000 */ mfc1 $a2, $f24 /* 3D5CD0 E00D6CB0 4407C000 */ mfc1 $a3, $f24 /* 3D5CD4 E00D6CB4 44050000 */ mfc1 $a1, $f0 /* 3D5CD8 E00D6CB8 0C080108 */ jal shim_guTranslateF /* 3D5CDC E00D6CBC 0240202D */ daddu $a0, $s2, $zero /* 3D5CE0 E00D6CC0 0240202D */ daddu $a0, $s2, $zero /* 3D5CE4 E00D6CC4 27A50020 */ addiu $a1, $sp, 0x20 /* 3D5CE8 E00D6CC8 0C080114 */ jal shim_guMtxCatF /* 3D5CEC E00D6CCC 00A0302D */ daddu $a2, $a1, $zero /* 3D5CF0 E00D6CD0 8EC30000 */ lw $v1, 0x0($s6) /* 3D5CF4 E00D6CD4 3C020900 */ lui $v0, %hi(D_09000688_4156E8) /* 3D5CF8 E00D6CD8 24420688 */ addiu $v0, $v0, %lo(D_09000688_4156E8) /* 3D5CFC E00D6CDC 10620005 */ beq $v1, $v0, .LE00D6CF4 /* 3D5D00 E00D6CE0 00000000 */ nop /* 3D5D04 E00D6CE4 3C020900 */ lui $v0, %hi(D_09000808_415868) /* 3D5D08 E00D6CE8 24420808 */ addiu $v0, $v0, %lo(D_09000808_415868) /* 3D5D0C E00D6CEC 14620006 */ bne $v1, $v0, .LE00D6D08 /* 3D5D10 E00D6CF0 0240202D */ daddu $a0, $s2, $zero .LE00D6CF4: /* 3D5D14 E00D6CF4 4405A000 */ mfc1 $a1, $f20 /* 3D5D18 E00D6CF8 4406B000 */ mfc1 $a2, $f22 /* 3D5D1C E00D6CFC 4407B000 */ mfc1 $a3, $f22 /* 3D5D20 E00D6D00 08035B45 */ j .LE00D6D14 /* 3D5D24 E00D6D04 0240202D */ daddu $a0, $s2, $zero .LE00D6D08: /* 3D5D28 E00D6D08 4405A000 */ mfc1 $a1, $f20 /* 3D5D2C E00D6D0C 4407B000 */ mfc1 $a3, $f22 /* 3D5D30 E00D6D10 00A0302D */ daddu $a2, $a1, $zero .LE00D6D14: /* 3D5D34 E00D6D14 0C080110 */ jal shim_guScaleF /* 3D5D38 E00D6D18 26940001 */ addiu $s4, $s4, 0x1 /* 3D5D3C E00D6D1C 27A40060 */ addiu $a0, $sp, 0x60 /* 3D5D40 E00D6D20 27A50020 */ addiu $a1, $sp, 0x20 /* 3D5D44 E00D6D24 0C080114 */ jal shim_guMtxCatF /* 3D5D48 E00D6D28 00A0302D */ daddu $a2, $a1, $zero /* 3D5D4C E00D6D2C 27A40020 */ addiu $a0, $sp, 0x20 /* 3D5D50 E00D6D30 96E50000 */ lhu $a1, 0x0($s7) /* 3D5D54 E00D6D34 8FC20000 */ lw $v0, 0x0($fp) /* 3D5D58 E00D6D38 00052980 */ sll $a1, $a1, 6 /* 3D5D5C E00D6D3C 00B52821 */ addu $a1, $a1, $s5 /* 3D5D60 E00D6D40 0C080118 */ jal shim_guMtxF2L /* 3D5D64 E00D6D44 00452821 */ addu $a1, $v0, $a1 /* 3D5D68 E00D6D48 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3D5D6C E00D6D4C 8E640000 */ lw $a0, 0x0($s3) /* 3D5D70 E00D6D50 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3D5D74 E00D6D54 0080282D */ daddu $a1, $a0, $zero /* 3D5D78 E00D6D58 24840008 */ addiu $a0, $a0, 0x8 /* 3D5D7C E00D6D5C AE640000 */ sw $a0, 0x0($s3) /* 3D5D80 E00D6D60 96E20000 */ lhu $v0, 0x0($s7) /* 3D5D84 E00D6D64 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3D5D88 E00D6D68 ACA30000 */ sw $v1, 0x0($a1) /* 3D5D8C E00D6D6C 24430001 */ addiu $v1, $v0, 0x1 /* 3D5D90 E00D6D70 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D5D94 E00D6D74 00021180 */ sll $v0, $v0, 6 /* 3D5D98 E00D6D78 A6E30000 */ sh $v1, 0x0($s7) /* 3D5D9C E00D6D7C 8FC30000 */ lw $v1, 0x0($fp) /* 3D5DA0 E00D6D80 00551021 */ addu $v0, $v0, $s5 /* 3D5DA4 E00D6D84 00621821 */ addu $v1, $v1, $v0 /* 3D5DA8 E00D6D88 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D5DAC E00D6D8C ACA30004 */ sw $v1, 0x4($a1) /* 3D5DB0 E00D6D90 AC820000 */ sw $v0, 0x0($a0) /* 3D5DB4 E00D6D94 8EC30000 */ lw $v1, 0x0($s6) /* 3D5DB8 E00D6D98 24820008 */ addiu $v0, $a0, 0x8 /* 3D5DBC E00D6D9C AE620000 */ sw $v0, 0x0($s3) /* 3D5DC0 E00D6DA0 24020040 */ addiu $v0, $zero, 0x40 /* 3D5DC4 E00D6DA4 AC860008 */ sw $a2, 0x8($a0) /* 3D5DC8 E00D6DA8 AC82000C */ sw $v0, 0xC($a0) /* 3D5DCC E00D6DAC AC830004 */ sw $v1, 0x4($a0) /* 3D5DD0 E00D6DB0 8FA900F8 */ lw $t1, 0xF8($sp) /* 3D5DD4 E00D6DB4 26100048 */ addiu $s0, $s0, 0x48 /* 3D5DD8 E00D6DB8 8D220008 */ lw $v0, 0x8($t1) /* 3D5DDC E00D6DBC 24840010 */ addiu $a0, $a0, 0x10 /* 3D5DE0 E00D6DC0 0282102A */ slt $v0, $s4, $v0 /* 3D5DE4 E00D6DC4 1440FF9A */ bnez $v0, .LE00D6C30 /* 3D5DE8 E00D6DC8 AE640000 */ sw $a0, 0x0($s3) .LE00D6DCC: /* 3D5DEC E00D6DCC 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3D5DF0 E00D6DD0 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3D5DF4 E00D6DD4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3D5DF8 E00D6DD8 8C620000 */ lw $v0, 0x0($v1) /* 3D5DFC E00D6DDC 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3D5E00 E00D6DE0 0040202D */ daddu $a0, $v0, $zero /* 3D5E04 E00D6DE4 24420008 */ addiu $v0, $v0, 0x8 /* 3D5E08 E00D6DE8 AC620000 */ sw $v0, 0x0($v1) /* 3D5E0C E00D6DEC 24020040 */ addiu $v0, $zero, 0x40 /* 3D5E10 E00D6DF0 AC850000 */ sw $a1, 0x0($a0) /* 3D5E14 E00D6DF4 AC820004 */ sw $v0, 0x4($a0) /* 3D5E18 E00D6DF8 8FBF00D4 */ lw $ra, 0xD4($sp) /* 3D5E1C E00D6DFC 8FBE00D0 */ lw $fp, 0xD0($sp) /* 3D5E20 E00D6E00 8FB700CC */ lw $s7, 0xCC($sp) /* 3D5E24 E00D6E04 8FB600C8 */ lw $s6, 0xC8($sp) /* 3D5E28 E00D6E08 8FB500C4 */ lw $s5, 0xC4($sp) /* 3D5E2C E00D6E0C 8FB400C0 */ lw $s4, 0xC0($sp) /* 3D5E30 E00D6E10 8FB300BC */ lw $s3, 0xBC($sp) /* 3D5E34 E00D6E14 8FB200B8 */ lw $s2, 0xB8($sp) /* 3D5E38 E00D6E18 8FB100B4 */ lw $s1, 0xB4($sp) /* 3D5E3C E00D6E1C 8FB000B0 */ lw $s0, 0xB0($sp) /* 3D5E40 E00D6E20 D7BA00F0 */ ldc1 $f26, 0xF0($sp) /* 3D5E44 E00D6E24 D7B800E8 */ ldc1 $f24, 0xE8($sp) /* 3D5E48 E00D6E28 D7B600E0 */ ldc1 $f22, 0xE0($sp) /* 3D5E4C E00D6E2C D7B400D8 */ ldc1 $f20, 0xD8($sp) /* 3D5E50 E00D6E30 03E00008 */ jr $ra /* 3D5E54 E00D6E34 27BD00F8 */ addiu $sp, $sp, 0xF8 /* 3D5E58 E00D6E38 00000000 */ nop /* 3D5E5C E00D6E3C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void energy_in_out_appendGfx(void* effect) { EnergyInOutFXData* part = ((EffectInstance*)effect)->data.energyInOut; s32 unk_24 = part->unk_24; s32 unk_00 = part->unk_00; f32 scale = part->scale * part->unk_44; s32 unk_18 = part->unk_18; s32 unk_1C = part->unk_1C; s32 unk_20 = part->unk_20; f32 unk_38 = part->unk_38; 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, scale, part->pos.x, part->pos.y, part->pos.z); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, part->unk_18, part->unk_1C, part->unk_20, unk_24); gDPSetEnvColor(gMainGfxPos++, part->unk_28, part->unk_2C, part->unk_30, 0); gSPDisplayList(gMainGfxPos++, D_09000200_3D6130); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { f32 scale = part->scale; gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, (unk_24 * part->unk_24) / 255); shim_guRotateF(sp20, part->unk_3C, 0.0f, 0.0f, 1.0f); shim_guTranslateF(sp60, part->pos.x + unk_38, 0.0f, 0.0f); shim_guMtxCatF(sp60, sp20, sp20); if (D_E00D6E40[unk_00] == D_09000688_3D65B8 || D_E00D6E40[unk_00] == D_09000808_3D6738) { shim_guScaleF(sp60, scale, 1.0f, 1.0f); } else { shim_guScaleF(sp60, scale, scale, 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); gSPDisplayList(gMainGfxPos++, D_E00D6E40[unk_00]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel ice_shard_appendGfx /* 3F87DC E01103EC 27BDFF38 */ addiu $sp, $sp, -0xC8 /* 3F87E0 E01103F0 0080402D */ daddu $t0, $a0, $zero /* 3F87E4 E01103F4 3C09DB06 */ lui $t1, (0xDB060024 >> 16) /* 3F87E8 E01103F8 35290024 */ ori $t1, $t1, (0xDB060024 & 0xFFFF) /* 3F87EC E01103FC AFB500B4 */ sw $s5, 0xB4($sp) /* 3F87F0 E0110400 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 3F87F4 E0110404 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 3F87F8 E0110408 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3F87FC E011040C AFBF00BC */ sw $ra, 0xBC($sp) /* 3F8800 E0110410 AFB600B8 */ sw $s6, 0xB8($sp) /* 3F8804 E0110414 AFB400B0 */ sw $s4, 0xB0($sp) /* 3F8808 E0110418 AFB300AC */ sw $s3, 0xAC($sp) /* 3F880C E011041C AFB200A8 */ sw $s2, 0xA8($sp) /* 3F8810 E0110420 AFB100A4 */ sw $s1, 0xA4($sp) /* 3F8814 E0110424 AFB000A0 */ sw $s0, 0xA0($sp) /* 3F8818 E0110428 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* 3F881C E011042C 8EA60000 */ lw $a2, 0x0($s5) /* 3F8820 E0110430 4480A000 */ mtc1 $zero, $f20 /* 3F8824 E0110434 8D14000C */ lw $s4, 0xC($t0) /* 3F8828 E0110438 00C0182D */ daddu $v1, $a2, $zero /* 3F882C E011043C 8E960024 */ lw $s6, 0x24($s4) /* 3F8830 E0110440 8E930000 */ lw $s3, 0x0($s4) /* 3F8834 E0110444 24C60008 */ addiu $a2, $a2, 0x8 /* 3F8838 E0110448 AC620000 */ sw $v0, 0x0($v1) /* 3F883C E011044C AC600004 */ sw $zero, 0x4($v1) /* 3F8840 E0110450 ACC90000 */ sw $t1, 0x0($a2) /* 3F8844 E0110454 8D020010 */ lw $v0, 0x10($t0) /* 3F8848 E0110458 3C088000 */ lui $t0, (0x80000000 >> 16) /* 3F884C E011045C 4405A000 */ mfc1 $a1, $f20 /* 3F8850 E0110460 4407A000 */ mfc1 $a3, $f20 /* 3F8854 E0110464 8C42001C */ lw $v0, 0x1C($v0) /* 3F8858 E0110468 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3F885C E011046C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3F8860 E0110470 00481021 */ addu $v0, $v0, $t0 /* 3F8864 E0110474 ACC20004 */ sw $v0, 0x4($a2) /* 3F8868 E0110478 00031080 */ sll $v0, $v1, 2 /* 3F886C E011047C 00431021 */ addu $v0, $v0, $v1 /* 3F8870 E0110480 00021080 */ sll $v0, $v0, 2 /* 3F8874 E0110484 00431023 */ subu $v0, $v0, $v1 /* 3F8878 E0110488 000218C0 */ sll $v1, $v0, 3 /* 3F887C E011048C 00431021 */ addu $v0, $v0, $v1 /* 3F8880 E0110490 000210C0 */ sll $v0, $v0, 3 /* 3F8884 E0110494 C6800038 */ lwc1 $f0, 0x38($s4) /* 3F8888 E0110498 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3F888C E011049C 00220821 */ addu $at, $at, $v0 /* 3F8890 E01104A0 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 3F8894 E01104A4 E7A00010 */ swc1 $f0, 0x10($sp) /* 3F8898 E01104A8 C6800004 */ lwc1 $f0, 0x4($s4) /* 3F889C E01104AC 27A40020 */ addiu $a0, $sp, 0x20 /* 3F88A0 E01104B0 AEA60000 */ sw $a2, 0x0($s5) /* 3F88A4 E01104B4 24C60008 */ addiu $a2, $a2, 0x8 /* 3F88A8 E01104B8 E7A00014 */ swc1 $f0, 0x14($sp) /* 3F88AC E01104BC C6800008 */ lwc1 $f0, 0x8($s4) /* 3F88B0 E01104C0 46001087 */ neg.s $f2, $f2 /* 3F88B4 E01104C4 AEA60000 */ sw $a2, 0x0($s5) /* 3F88B8 E01104C8 44061000 */ mfc1 $a2, $f2 /* 3F88BC E01104CC 3C120001 */ lui $s2, (0x11630 >> 16) /* 3F88C0 E01104D0 E7A00018 */ swc1 $f0, 0x18($sp) /* 3F88C4 E01104D4 C680000C */ lwc1 $f0, 0xC($s4) /* 3F88C8 E01104D8 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3F88CC E01104DC 0C080180 */ jal shim_guPositionF /* 3F88D0 E01104E0 E7A0001C */ swc1 $f0, 0x1C($sp) /* 3F88D4 E01104E4 27A40020 */ addiu $a0, $sp, 0x20 /* 3F88D8 E01104E8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3F88DC E01104EC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3F88E0 E01104F0 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3F88E4 E01104F4 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3F88E8 E01104F8 96050000 */ lhu $a1, 0x0($s0) /* 3F88EC E01104FC 8E220000 */ lw $v0, 0x0($s1) /* 3F88F0 E0110500 00052980 */ sll $a1, $a1, 6 /* 3F88F4 E0110504 00B22821 */ addu $a1, $a1, $s2 /* 3F88F8 E0110508 0C080118 */ jal shim_guMtxF2L /* 3F88FC E011050C 00452821 */ addu $a1, $v0, $a1 /* 3F8900 E0110510 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 3F8904 E0110514 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 3F8908 E0110518 27A40020 */ addiu $a0, $sp, 0x20 /* 3F890C E011051C 8EA90000 */ lw $t1, 0x0($s5) /* 3F8910 E0110520 4406A000 */ mfc1 $a2, $f20 /* 3F8914 E0110524 96080000 */ lhu $t0, 0x0($s0) /* 3F8918 E0110528 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3F891C E011052C 44810000 */ mtc1 $at, $f0 /* 3F8920 E0110530 00C0382D */ daddu $a3, $a2, $zero /* 3F8924 E0110534 0120282D */ daddu $a1, $t1, $zero /* 3F8928 E0110538 3103FFFF */ andi $v1, $t0, 0xFFFF /* 3F892C E011053C 00031980 */ sll $v1, $v1, 6 /* 3F8930 E0110540 00721821 */ addu $v1, $v1, $s2 /* 3F8934 E0110544 ACA20000 */ sw $v0, 0x0($a1) /* 3F8938 E0110548 8E220000 */ lw $v0, 0x0($s1) /* 3F893C E011054C 25290008 */ addiu $t1, $t1, 0x8 /* 3F8940 E0110550 00431021 */ addu $v0, $v0, $v1 /* 3F8944 E0110554 ACA20004 */ sw $v0, 0x4($a1) /* 3F8948 E0110558 E7A00010 */ swc1 $f0, 0x10($sp) /* 3F894C E011055C 8E85003C */ lw $a1, 0x3C($s4) /* 3F8950 E0110560 25080001 */ addiu $t0, $t0, 0x1 /* 3F8954 E0110564 AEA90000 */ sw $t1, 0x0($s5) /* 3F8958 E0110568 0C080104 */ jal shim_guRotateF /* 3F895C E011056C A6080000 */ sh $t0, 0x0($s0) /* 3F8960 E0110570 27A40020 */ addiu $a0, $sp, 0x20 /* 3F8964 E0110574 96050000 */ lhu $a1, 0x0($s0) /* 3F8968 E0110578 8E220000 */ lw $v0, 0x0($s1) /* 3F896C E011057C 00052980 */ sll $a1, $a1, 6 /* 3F8970 E0110580 00B22821 */ addu $a1, $a1, $s2 /* 3F8974 E0110584 0C080118 */ jal shim_guMtxF2L /* 3F8978 E0110588 00452821 */ addu $a1, $v0, $a1 /* 3F897C E011058C 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3F8980 E0110590 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3F8984 E0110594 3C0BDE00 */ lui $t3, (0xDE000000 >> 16) /* 3F8988 E0110598 3C0CFA00 */ lui $t4, (0xFA000000 >> 16) /* 3F898C E011059C 8EA90000 */ lw $t1, 0x0($s5) /* 3F8990 E01105A0 3C014080 */ lui $at, (0x40800000 >> 16) /* 3F8994 E01105A4 44812000 */ mtc1 $at, $f4 /* 3F8998 E01105A8 0120202D */ daddu $a0, $t1, $zero /* 3F899C E01105AC 25290008 */ addiu $t1, $t1, 0x8 /* 3F89A0 E01105B0 AEA90000 */ sw $t1, 0x0($s5) /* 3F89A4 E01105B4 96020000 */ lhu $v0, 0x0($s0) /* 3F89A8 E01105B8 3C06F200 */ lui $a2, (0xF2000000 >> 16) /* 3F89AC E01105BC AC830000 */ sw $v1, 0x0($a0) /* 3F89B0 E01105C0 24430001 */ addiu $v1, $v0, 0x1 /* 3F89B4 E01105C4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3F89B8 E01105C8 00021180 */ sll $v0, $v0, 6 /* 3F89BC E01105CC A6030000 */ sh $v1, 0x0($s0) /* 3F89C0 E01105D0 8E230000 */ lw $v1, 0x0($s1) /* 3F89C4 E01105D4 00521021 */ addu $v0, $v0, $s2 /* 3F89C8 E01105D8 00621821 */ addu $v1, $v1, $v0 /* 3F89CC E01105DC 25220008 */ addiu $v0, $t1, 0x8 /* 3F89D0 E01105E0 AC830004 */ sw $v1, 0x4($a0) /* 3F89D4 E01105E4 AEA20000 */ sw $v0, 0x0($s5) /* 3F89D8 E01105E8 25220010 */ addiu $v0, $t1, 0x10 /* 3F89DC E01105EC AD2B0000 */ sw $t3, 0x0($t1) /* 3F89E0 E01105F0 AEA20000 */ sw $v0, 0x0($s5) /* 3F89E4 E01105F4 25220018 */ addiu $v0, $t1, 0x18 /* 3F89E8 E01105F8 AEA20000 */ sw $v0, 0x0($s5) /* 3F89EC E01105FC 3C03E011 */ lui $v1, (0xE01108B4 >> 16) /* 3F89F0 E0110600 8C6308B4 */ lw $v1, (0xE01108B4 & 0xFFFF)($v1) /* 3F89F4 E0110604 25220020 */ addiu $v0, $t1, 0x20 /* 3F89F8 E0110608 AEA20000 */ sw $v0, 0x0($s5) /* 3F89FC E011060C 001317C2 */ srl $v0, $s3, 31 /* 3F8A00 E0110610 02621021 */ addu $v0, $s3, $v0 /* 3F8A04 E0110614 00021043 */ sra $v0, $v0, 1 /* 3F8A08 E0110618 00021040 */ sll $v0, $v0, 1 /* 3F8A0C E011061C 02629823 */ subu $s3, $s3, $v0 /* 3F8A10 E0110620 001329C0 */ sll $a1, $s3, 7 /* 3F8A14 E0110624 30A50FFF */ andi $a1, $a1, 0xFFF /* 3F8A18 E0110628 00052B00 */ sll $a1, $a1, 12 /* 3F8A1C E011062C AD230004 */ sw $v1, 0x4($t1) /* 3F8A20 E0110630 C6800044 */ lwc1 $f0, 0x44($s4) /* 3F8A24 E0110634 001319C0 */ sll $v1, $s3, 7 /* 3F8A28 E0110638 46040082 */ mul.s $f2, $f0, $f4 /* 3F8A2C E011063C 00000000 */ nop /* 3F8A30 E0110640 3463007C */ ori $v1, $v1, 0x7C /* 3F8A34 E0110644 30630FFF */ andi $v1, $v1, 0xFFF /* 3F8A38 E0110648 00031B00 */ sll $v1, $v1, 12 /* 3F8A3C E011064C AD2C0018 */ sw $t4, 0x18($t1) /* 3F8A40 E0110650 4600118D */ trunc.w.s $f6, $f2 /* 3F8A44 E0110654 44043000 */ mfc1 $a0, $f6 /* 3F8A48 E0110658 00000000 */ nop /* 3F8A4C E011065C 000411C0 */ sll $v0, $a0, 7 /* 3F8A50 E0110660 30420FFF */ andi $v0, $v0, 0xFFF /* 3F8A54 E0110664 00461025 */ or $v0, $v0, $a2 /* 3F8A58 E0110668 00A21025 */ or $v0, $a1, $v0 /* 3F8A5C E011066C 00042140 */ sll $a0, $a0, 5 /* 3F8A60 E0110670 AD220008 */ sw $v0, 0x8($t1) /* 3F8A64 E0110674 2482001F */ addiu $v0, $a0, 0x1F /* 3F8A68 E0110678 00021080 */ sll $v0, $v0, 2 /* 3F8A6C E011067C 30420FFF */ andi $v0, $v0, 0xFFF /* 3F8A70 E0110680 00621025 */ or $v0, $v1, $v0 /* 3F8A74 E0110684 AD22000C */ sw $v0, 0xC($t1) /* 3F8A78 E0110688 24820020 */ addiu $v0, $a0, 0x20 /* 3F8A7C E011068C 00021080 */ sll $v0, $v0, 2 /* 3F8A80 E0110690 30420FFF */ andi $v0, $v0, 0xFFF /* 3F8A84 E0110694 00461025 */ or $v0, $v0, $a2 /* 3F8A88 E0110698 00A22825 */ or $a1, $a1, $v0 /* 3F8A8C E011069C 2484003F */ addiu $a0, $a0, 0x3F /* 3F8A90 E01106A0 00042080 */ sll $a0, $a0, 2 /* 3F8A94 E01106A4 30840FFF */ andi $a0, $a0, 0xFFF /* 3F8A98 E01106A8 3C020100 */ lui $v0, (0x1000000 >> 16) /* 3F8A9C E01106AC 00822025 */ or $a0, $a0, $v0 /* 3F8AA0 E01106B0 00641825 */ or $v1, $v1, $a0 /* 3F8AA4 E01106B4 AD250010 */ sw $a1, 0x10($t1) /* 3F8AA8 E01106B8 AD230014 */ sw $v1, 0x14($t1) /* 3F8AAC E01106BC 9283001B */ lbu $v1, 0x1B($s4) /* 3F8AB0 E01106C0 9284001F */ lbu $a0, 0x1F($s4) /* 3F8AB4 E01106C4 92850023 */ lbu $a1, 0x23($s4) /* 3F8AB8 E01106C8 25220028 */ addiu $v0, $t1, 0x28 /* 3F8ABC E01106CC AEA20000 */ sw $v0, 0x0($s5) /* 3F8AC0 E01106D0 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3F8AC4 E01106D4 AD220020 */ sw $v0, 0x20($t1) /* 3F8AC8 E01106D8 4600018D */ trunc.w.s $f6, $f0 /* 3F8ACC E01106DC 44023000 */ mfc1 $v0, $f6 /* 3F8AD0 E01106E0 00000000 */ nop /* 3F8AD4 E01106E4 00021080 */ sll $v0, $v0, 2 /* 3F8AD8 E01106E8 44820000 */ mtc1 $v0, $f0 /* 3F8ADC E01106EC 00000000 */ nop /* 3F8AE0 E01106F0 46800020 */ cvt.s.w $f0, $f0 /* 3F8AE4 E01106F4 32C200FF */ andi $v0, $s6, 0xFF /* 3F8AE8 E01106F8 46001081 */ sub.s $f2, $f2, $f0 /* 3F8AEC E01106FC 3C014380 */ lui $at, (0x43800000 >> 16) /* 3F8AF0 E0110700 44810000 */ mtc1 $at, $f0 /* 3F8AF4 E0110704 00031E00 */ sll $v1, $v1, 24 /* 3F8AF8 E0110708 00042400 */ sll $a0, $a0, 16 /* 3F8AFC E011070C 00641825 */ or $v1, $v1, $a0 /* 3F8B00 E0110710 00052A00 */ sll $a1, $a1, 8 /* 3F8B04 E0110714 00651825 */ or $v1, $v1, $a1 /* 3F8B08 E0110718 00621825 */ or $v1, $v1, $v0 /* 3F8B0C E011071C AD23001C */ sw $v1, 0x1C($t1) /* 3F8B10 E0110720 9282002B */ lbu $v0, 0x2B($s4) /* 3F8B14 E0110724 9283002F */ lbu $v1, 0x2F($s4) /* 3F8B18 E0110728 92840033 */ lbu $a0, 0x33($s4) /* 3F8B1C E011072C 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3F8B20 E0110730 AD2B0028 */ sw $t3, 0x28($t1) /* 3F8B24 E0110734 00021600 */ sll $v0, $v0, 24 /* 3F8B28 E0110738 46001082 */ mul.s $f2, $f2, $f0 /* 3F8B2C E011073C 00000000 */ nop /* 3F8B30 E0110740 00031C00 */ sll $v1, $v1, 16 /* 3F8B34 E0110744 00431025 */ or $v0, $v0, $v1 /* 3F8B38 E0110748 00042200 */ sll $a0, $a0, 8 /* 3F8B3C E011074C 00441025 */ or $v0, $v0, $a0 /* 3F8B40 E0110750 4600118D */ trunc.w.s $f6, $f2 /* 3F8B44 E0110754 440A3000 */ mfc1 $t2, $f6 /* 3F8B48 E0110758 00000000 */ nop /* 3F8B4C E011075C 314300FF */ andi $v1, $t2, 0xFF /* 3F8B50 E0110760 00431025 */ or $v0, $v0, $v1 /* 3F8B54 E0110764 AD220024 */ sw $v0, 0x24($t1) /* 3F8B58 E0110768 3C03E011 */ lui $v1, (0xE01108B0 >> 16) /* 3F8B5C E011076C 8C6308B0 */ lw $v1, (0xE01108B0 & 0xFFFF)($v1) /* 3F8B60 E0110770 25220030 */ addiu $v0, $t1, 0x30 /* 3F8B64 E0110774 AEA20000 */ sw $v0, 0x0($s5) /* 3F8B68 E0110778 25220038 */ addiu $v0, $t1, 0x38 /* 3F8B6C E011077C AD23002C */ sw $v1, 0x2C($t1) /* 3F8B70 E0110780 AEA20000 */ sw $v0, 0x0($s5) /* 3F8B74 E0110784 24020040 */ addiu $v0, $zero, 0x40 /* 3F8B78 E0110788 AD220034 */ sw $v0, 0x34($t1) /* 3F8B7C E011078C 24020001 */ addiu $v0, $zero, 0x1 /* 3F8B80 E0110790 16620030 */ bne $s3, $v0, .LE0110854 /* 3F8B84 E0110794 AD270030 */ sw $a3, 0x30($t1) /* 3F8B88 E0110798 C6800044 */ lwc1 $f0, 0x44($s4) /* 3F8B8C E011079C 46040002 */ mul.s $f0, $f0, $f4 /* 3F8B90 E01107A0 00000000 */ nop /* 3F8B94 E01107A4 24020003 */ addiu $v0, $zero, 0x3 /* 3F8B98 E01107A8 4600018D */ trunc.w.s $f6, $f0 /* 3F8B9C E01107AC 44033000 */ mfc1 $v1, $f6 /* 3F8BA0 E01107B0 00000000 */ nop /* 3F8BA4 E01107B4 14620028 */ bne $v1, $v0, .LE0110858 /* 3F8BA8 E01107B8 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3F8BAC E01107BC 3C088080 */ lui $t0, (0x80808081 >> 16) /* 3F8BB0 E01107C0 35088081 */ ori $t0, $t0, (0x80808081 & 0xFFFF) /* 3F8BB4 E01107C4 3C07FCFF */ lui $a3, (0xFCFFC7FF >> 16) /* 3F8BB8 E01107C8 34E7C7FF */ ori $a3, $a3, (0xFCFFC7FF & 0xFFFF) /* 3F8BBC E01107CC 3C04FF8D */ lui $a0, (0xFF8DFEFF >> 16) /* 3F8BC0 E01107D0 3484FEFF */ ori $a0, $a0, (0xFF8DFEFF & 0xFFFF) /* 3F8BC4 E01107D4 25220040 */ addiu $v0, $t1, 0x40 /* 3F8BC8 E01107D8 AEA20000 */ sw $v0, 0x0($s5) /* 3F8BCC E01107DC AD2C0038 */ sw $t4, 0x38($t1) /* 3F8BD0 E01107E0 9283001B */ lbu $v1, 0x1B($s4) /* 3F8BD4 E01107E4 9285001F */ lbu $a1, 0x1F($s4) /* 3F8BD8 E01107E8 92860023 */ lbu $a2, 0x23($s4) /* 3F8BDC E01107EC 25220048 */ addiu $v0, $t1, 0x48 /* 3F8BE0 E01107F0 AEA20000 */ sw $v0, 0x0($s5) /* 3F8BE4 E01107F4 25220050 */ addiu $v0, $t1, 0x50 /* 3F8BE8 E01107F8 02CA0018 */ mult $s6, $t2 /* 3F8BEC E01107FC AD270040 */ sw $a3, 0x40($t1) /* 3F8BF0 E0110800 AD240044 */ sw $a0, 0x44($t1) /* 3F8BF4 E0110804 AEA20000 */ sw $v0, 0x0($s5) /* 3F8BF8 E0110808 3C020900 */ lui $v0, %hi(D_09001168_40E3F8) /* 3F8BFC E011080C 24421168 */ addiu $v0, $v0, %lo(D_09001168_40E3F8) /* 3F8C00 E0110810 AD2B0048 */ sw $t3, 0x48($t1) /* 3F8C04 E0110814 00002012 */ mflo $a0 /* 3F8C08 E0110818 AD22004C */ sw $v0, 0x4C($t1) /* 3F8C0C E011081C 00031E00 */ sll $v1, $v1, 24 /* 3F8C10 E0110820 00880018 */ mult $a0, $t0 /* 3F8C14 E0110824 00052C00 */ sll $a1, $a1, 16 /* 3F8C18 E0110828 00651825 */ or $v1, $v1, $a1 /* 3F8C1C E011082C 00063200 */ sll $a2, $a2, 8 /* 3F8C20 E0110830 00661825 */ or $v1, $v1, $a2 /* 3F8C24 E0110834 00001010 */ mfhi $v0 /* 3F8C28 E0110838 00441021 */ addu $v0, $v0, $a0 /* 3F8C2C E011083C 000211C3 */ sra $v0, $v0, 7 /* 3F8C30 E0110840 000427C3 */ sra $a0, $a0, 31 /* 3F8C34 E0110844 00441023 */ subu $v0, $v0, $a0 /* 3F8C38 E0110848 304200FF */ andi $v0, $v0, 0xFF /* 3F8C3C E011084C 00621825 */ or $v1, $v1, $v0 /* 3F8C40 E0110850 AD23003C */ sw $v1, 0x3C($t1) .LE0110854: /* 3F8C44 E0110854 3C05D838 */ lui $a1, (0xD8380002 >> 16) .LE0110858: /* 3F8C48 E0110858 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3F8C4C E011085C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3F8C50 E0110860 8C620000 */ lw $v0, 0x0($v1) /* 3F8C54 E0110864 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3F8C58 E0110868 0040202D */ daddu $a0, $v0, $zero /* 3F8C5C E011086C 24420008 */ addiu $v0, $v0, 0x8 /* 3F8C60 E0110870 AC620000 */ sw $v0, 0x0($v1) /* 3F8C64 E0110874 24020040 */ addiu $v0, $zero, 0x40 /* 3F8C68 E0110878 AC850000 */ sw $a1, 0x0($a0) /* 3F8C6C E011087C AC820004 */ sw $v0, 0x4($a0) /* 3F8C70 E0110880 8FBF00BC */ lw $ra, 0xBC($sp) /* 3F8C74 E0110884 8FB600B8 */ lw $s6, 0xB8($sp) /* 3F8C78 E0110888 8FB500B4 */ lw $s5, 0xB4($sp) /* 3F8C7C E011088C 8FB400B0 */ lw $s4, 0xB0($sp) /* 3F8C80 E0110890 8FB300AC */ lw $s3, 0xAC($sp) /* 3F8C84 E0110894 8FB200A8 */ lw $s2, 0xA8($sp) /* 3F8C88 E0110898 8FB100A4 */ lw $s1, 0xA4($sp) /* 3F8C8C E011089C 8FB000A0 */ lw $s0, 0xA0($sp) /* 3F8C90 E01108A0 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* 3F8C94 E01108A4 03E00008 */ jr $ra /* 3F8C98 E01108A8 27BD00C8 */ addiu $sp, $sp, 0xC8 /* 3F8C9C E01108AC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void ice_shard_appendGfx(void* effect) { IceShardFXData* data = ((EffectInstance*)effect)->data.iceShard; s32 alpha = data->primCol.a; s32 type = data->type; s32 texCoordS; s32 texCoordT; s32 envAlpha; Matrix4f sp20; Matrix4f unused; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale, 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); shim_guRotateF(sp20, data->rotation, 0.0f, 0.0f, 1.0f); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E01108B4[0]); texCoordS = (type % 2) * 32; texCoordT = (s32) (data->animFrame * 4.0f) * 32; envAlpha = (data->animFrame * 4.0f - (s32) data->animFrame * 4) * 256.0f; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (texCoordS ) * 4, (texCoordT ) * 4, (texCoordS + 31) * 4, (texCoordT + 31) * 4); gDPSetTileSize(gMainGfxPos++, 1, (texCoordS ) * 4, (texCoordT + 32) * 4, (texCoordS + 31) * 4, (texCoordT + 63) * 4); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, alpha); gDPSetEnvColor(gMainGfxPos++, data->envCol.r, data->envCol.g, data->envCol.b, envAlpha); gSPDisplayList(gMainGfxPos++, D_E01108B0[0]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); if (type % 2 == 1 && (s32) (data->animFrame * 4.0f) == 3) { gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, alpha * envAlpha / 255); gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0); gSPDisplayList(gMainGfxPos++, D_09001168_3F9E28); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_player_spin /* 7ABB4 800E1704 27BDFE80 */ addiu $sp, $sp, -0x180 /* 7ABB8 800E1708 F7B60158 */ sdc1 $f22, 0x158($sp) /* 7ABBC 800E170C 4480B000 */ mtc1 $zero, $f22 /* 7ABC0 800E1710 AFB10134 */ sw $s1, 0x134($sp) /* 7ABC4 800E1714 3C118011 */ lui $s1, %hi(gPlayerStatus) /* 7ABC8 800E1718 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* 7ABCC 800E171C AFB3013C */ sw $s3, 0x13C($sp) /* 7ABD0 800E1720 0000982D */ daddu $s3, $zero, $zero /* 7ABD4 800E1724 AFB60148 */ sw $s6, 0x148($sp) /* 7ABD8 800E1728 3C16800B */ lui $s6, %hi(gCameras) /* 7ABDC 800E172C 26D61D80 */ addiu $s6, $s6, %lo(gCameras) /* 7ABE0 800E1730 AFB50144 */ sw $s5, 0x144($sp) /* 7ABE4 800E1734 241500FF */ addiu $s5, $zero, 0xFF /* 7ABE8 800E1738 AFB00130 */ sw $s0, 0x130($sp) /* 7ABEC 800E173C 27B000A0 */ addiu $s0, $sp, 0xA0 /* 7ABF0 800E1740 AFB20138 */ sw $s2, 0x138($sp) /* 7ABF4 800E1744 27B20060 */ addiu $s2, $sp, 0x60 /* 7ABF8 800E1748 AFB40140 */ sw $s4, 0x140($sp) /* 7ABFC 800E174C 27B400E0 */ addiu $s4, $sp, 0xE0 /* 7AC00 800E1750 AFBF014C */ sw $ra, 0x14C($sp) /* 7AC04 800E1754 F7BE0178 */ sdc1 $f30, 0x178($sp) /* 7AC08 800E1758 F7BC0170 */ sdc1 $f28, 0x170($sp) /* 7AC0C 800E175C F7BA0168 */ sdc1 $f26, 0x168($sp) /* 7AC10 800E1760 F7B80160 */ sdc1 $f24, 0x160($sp) /* 7AC14 800E1764 F7B40150 */ sdc1 $f20, 0x150($sp) .L800E1768: /* 7AC18 800E1768 3C03800A */ lui $v1, %hi(gCurrentCamID) /* 7AC1C 800E176C 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* 7AC20 800E1770 00031080 */ sll $v0, $v1, 2 /* 7AC24 800E1774 00431021 */ addu $v0, $v0, $v1 /* 7AC28 800E1778 00021080 */ sll $v0, $v0, 2 /* 7AC2C 800E177C 00431023 */ subu $v0, $v0, $v1 /* 7AC30 800E1780 000218C0 */ sll $v1, $v0, 3 /* 7AC34 800E1784 00431021 */ addu $v0, $v0, $v1 /* 7AC38 800E1788 000210C0 */ sll $v0, $v0, 3 /* 7AC3C 800E178C 00561021 */ addu $v0, $v0, $s6 /* 7AC40 800E1790 C440006C */ lwc1 $f0, 0x6C($v0) /* 7AC44 800E1794 16600064 */ bnez $s3, .L800E1928 /* 7AC48 800E1798 46000507 */ neg.s $f20, $f0 /* 7AC4C 800E179C C62200A8 */ lwc1 $f2, 0xA8($s1) /* 7AC50 800E17A0 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7AC54 800E17A4 44810000 */ mtc1 $at, $f0 /* 7AC58 800E17A8 00000000 */ nop /* 7AC5C 800E17AC 4602003C */ c.lt.s $f0, $f2 /* 7AC60 800E17B0 00000000 */ nop /* 7AC64 800E17B4 4500000A */ bc1f .L800E17E0 /* 7AC68 800E17B8 00000000 */ nop /* 7AC6C 800E17BC 3C014334 */ lui $at, (0x43340000 >> 16) /* 7AC70 800E17C0 44812000 */ mtc1 $at, $f4 /* 7AC74 800E17C4 00000000 */ nop /* 7AC78 800E17C8 4604103E */ c.le.s $f2, $f4 /* 7AC7C 800E17CC 00000000 */ nop /* 7AC80 800E17D0 45000003 */ bc1f .L800E17E0 /* 7AC84 800E17D4 00000000 */ nop /* 7AC88 800E17D8 0803861C */ j .L800E1870 /* 7AC8C 800E17DC 46022501 */ sub.s $f20, $f4, $f2 .L800E17E0: /* 7AC90 800E17E0 C62000A8 */ lwc1 $f0, 0xA8($s1) /* 7AC94 800E17E4 3C014334 */ lui $at, (0x43340000 >> 16) /* 7AC98 800E17E8 44812000 */ mtc1 $at, $f4 /* 7AC9C 800E17EC 00000000 */ nop /* 7ACA0 800E17F0 4600203C */ c.lt.s $f4, $f0 /* 7ACA4 800E17F4 00000000 */ nop /* 7ACA8 800E17F8 4500000C */ bc1f .L800E182C /* 7ACAC 800E17FC 00000000 */ nop /* 7ACB0 800E1800 3C014387 */ lui $at, (0x43870000 >> 16) /* 7ACB4 800E1804 44812000 */ mtc1 $at, $f4 /* 7ACB8 800E1808 00000000 */ nop /* 7ACBC 800E180C 4604003E */ c.le.s $f0, $f4 /* 7ACC0 800E1810 00000000 */ nop /* 7ACC4 800E1814 45000008 */ bc1f .L800E1838 /* 7ACC8 800E1818 00000000 */ nop /* 7ACCC 800E181C 3C014334 */ lui $at, (0x43340000 >> 16) /* 7ACD0 800E1820 44812000 */ mtc1 $at, $f4 /* 7ACD4 800E1824 0803861C */ j .L800E1870 /* 7ACD8 800E1828 46040501 */ sub.s $f20, $f0, $f4 .L800E182C: /* 7ACDC 800E182C 3C014387 */ lui $at, (0x43870000 >> 16) /* 7ACE0 800E1830 44812000 */ mtc1 $at, $f4 /* 7ACE4 800E1834 00000000 */ nop .L800E1838: /* 7ACE8 800E1838 4600203C */ c.lt.s $f4, $f0 /* 7ACEC 800E183C 00000000 */ nop /* 7ACF0 800E1840 4500000A */ bc1f .L800E186C /* 7ACF4 800E1844 00000000 */ nop /* 7ACF8 800E1848 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 7ACFC 800E184C 44811000 */ mtc1 $at, $f2 /* 7AD00 800E1850 00000000 */ nop /* 7AD04 800E1854 4602003E */ c.le.s $f0, $f2 /* 7AD08 800E1858 00000000 */ nop /* 7AD0C 800E185C 45000003 */ bc1f .L800E186C /* 7AD10 800E1860 00000000 */ nop /* 7AD14 800E1864 0803861C */ j .L800E1870 /* 7AD18 800E1868 46001501 */ sub.s $f20, $f2, $f0 .L800E186C: /* 7AD1C 800E186C C63400A8 */ lwc1 $f20, 0xA8($s1) .L800E1870: /* 7AD20 800E1870 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 7AD24 800E1874 44810000 */ mtc1 $at, $f0 /* 7AD28 800E1878 00000000 */ nop /* 7AD2C 800E187C 4600A003 */ div.s $f0, $f20, $f0 /* 7AD30 800E1880 4600010D */ trunc.w.s $f4, $f0 /* 7AD34 800E1884 44062000 */ mfc1 $a2, $f4 /* 7AD38 800E1888 00000000 */ nop /* 7AD3C 800E188C 00061100 */ sll $v0, $a2, 4 /* 7AD40 800E1890 00461023 */ subu $v0, $v0, $a2 /* 7AD44 800E1894 00021080 */ sll $v0, $v0, 2 /* 7AD48 800E1898 02A23023 */ subu $a2, $s5, $v0 /* 7AD4C 800E189C 28C20064 */ slti $v0, $a2, 0x64 /* 7AD50 800E18A0 54400001 */ bnel $v0, $zero, .L800E18A8 /* 7AD54 800E18A4 24060064 */ addiu $a2, $zero, 0x64 .L800E18A8: /* 7AD58 800E18A8 0000202D */ daddu $a0, $zero, $zero /* 7AD5C 800E18AC 24050006 */ addiu $a1, $zero, 0x6 /* 7AD60 800E18B0 00C0382D */ daddu $a3, $a2, $zero /* 7AD64 800E18B4 AFA60010 */ sw $a2, 0x10($sp) /* 7AD68 800E18B8 AFB50014 */ sw $s5, 0x14($sp) /* 7AD6C 800E18BC 0C0B77FE */ jal set_player_imgfx_all /* 7AD70 800E18C0 AFA00018 */ sw $zero, 0x18($sp) /* 7AD74 800E18C4 4405A000 */ mfc1 $a1, $f20 /* 7AD78 800E18C8 4406B000 */ mfc1 $a2, $f22 /* 7AD7C 800E18CC 3C07BF80 */ lui $a3, (0xBF800000 >> 16) /* 7AD80 800E18D0 0200202D */ daddu $a0, $s0, $zero /* 7AD84 800E18D4 0C019EC8 */ jal guRotateF /* 7AD88 800E18D8 E7B60010 */ swc1 $f22, 0x10($sp) /* 7AD8C 800E18DC C62C008C */ lwc1 $f12, 0x8C($s1) /* 7AD90 800E18E0 0C00A6C9 */ jal clamp_angle /* 7AD94 800E18E4 00000000 */ nop /* 7AD98 800E18E8 44050000 */ mfc1 $a1, $f0 /* 7AD9C 800E18EC 4406B000 */ mfc1 $a2, $f22 /* 7ADA0 800E18F0 4407B000 */ mfc1 $a3, $f22 /* 7ADA4 800E18F4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 7ADA8 800E18F8 44812000 */ mtc1 $at, $f4 /* 7ADAC 800E18FC 27A40020 */ addiu $a0, $sp, 0x20 /* 7ADB0 800E1900 0C019EC8 */ jal guRotateF /* 7ADB4 800E1904 E7A40010 */ swc1 $f4, 0x10($sp) /* 7ADB8 800E1908 0200202D */ daddu $a0, $s0, $zero /* 7ADBC 800E190C 27A50020 */ addiu $a1, $sp, 0x20 /* 7ADC0 800E1910 0C019D80 */ jal guMtxCatF /* 7ADC4 800E1914 00A0302D */ daddu $a2, $a1, $zero /* 7ADC8 800E1918 C63E0028 */ lwc1 $f30, 0x28($s1) /* 7ADCC 800E191C C638002C */ lwc1 $f24, 0x2C($s1) /* 7ADD0 800E1920 0803867B */ j .L800E19EC /* 7ADD4 800E1924 C63C0030 */ lwc1 $f28, 0x30($s1) .L800E1928: /* 7ADD8 800E1928 0260202D */ daddu $a0, $s3, $zero /* 7ADDC 800E192C 27A50120 */ addiu $a1, $sp, 0x120 /* 7ADE0 800E1930 27A60124 */ addiu $a2, $sp, 0x124 /* 7ADE4 800E1934 0C03964E */ jal phys_get_spin_history /* 7ADE8 800E1938 27A70128 */ addiu $a3, $sp, 0x128 /* 7ADEC 800E193C 8FA60124 */ lw $a2, 0x124($sp) /* 7ADF0 800E1940 3C028000 */ lui $v0, (0x80000000 >> 16) /* 7ADF4 800E1944 14C20004 */ bne $a2, $v0, .L800E1958 /* 7ADF8 800E1948 46000686 */ mov.s $f26, $f0 /* 7ADFC 800E194C C638002C */ lwc1 $f24, 0x2C($s1) /* 7AE00 800E1950 0803865A */ j .L800E1968 /* 7AE04 800E1954 0000202D */ daddu $a0, $zero, $zero .L800E1958: /* 7AE08 800E1958 4486C000 */ mtc1 $a2, $f24 /* 7AE0C 800E195C 00000000 */ nop /* 7AE10 800E1960 4680C620 */ cvt.s.w $f24, $f24 /* 7AE14 800E1964 0000202D */ daddu $a0, $zero, $zero .L800E1968: /* 7AE18 800E1968 2405FFFF */ addiu $a1, $zero, -0x1 /* 7AE1C 800E196C 24060007 */ addiu $a2, $zero, 0x7 /* 7AE20 800E1970 0080382D */ daddu $a3, $a0, $zero /* 7AE24 800E1974 C63E0028 */ lwc1 $f30, 0x28($s1) /* 7AE28 800E1978 C63C0030 */ lwc1 $f28, 0x30($s1) /* 7AE2C 800E197C 24020040 */ addiu $v0, $zero, 0x40 /* 7AE30 800E1980 AFA00010 */ sw $zero, 0x10($sp) /* 7AE34 800E1984 AFA00014 */ sw $zero, 0x14($sp) /* 7AE38 800E1988 AFA20018 */ sw $v0, 0x18($sp) /* 7AE3C 800E198C 0C0B77B9 */ jal set_player_imgfx_comp /* 7AE40 800E1990 AFA0001C */ sw $zero, 0x1C($sp) /* 7AE44 800E1994 4405A000 */ mfc1 $a1, $f20 /* 7AE48 800E1998 4406B000 */ mfc1 $a2, $f22 /* 7AE4C 800E199C 3C07BF80 */ lui $a3, (0xBF800000 >> 16) /* 7AE50 800E19A0 27A40020 */ addiu $a0, $sp, 0x20 /* 7AE54 800E19A4 0C019EC8 */ jal guRotateF /* 7AE58 800E19A8 E7B60010 */ swc1 $f22, 0x10($sp) /* 7AE5C 800E19AC 4405A000 */ mfc1 $a1, $f20 /* 7AE60 800E19B0 4406B000 */ mfc1 $a2, $f22 /* 7AE64 800E19B4 3C07BF80 */ lui $a3, (0xBF800000 >> 16) /* 7AE68 800E19B8 0200202D */ daddu $a0, $s0, $zero /* 7AE6C 800E19BC 0C019EC8 */ jal guRotateF /* 7AE70 800E19C0 E7B60010 */ swc1 $f22, 0x10($sp) /* 7AE74 800E19C4 4405D000 */ mfc1 $a1, $f26 /* 7AE78 800E19C8 4406B000 */ mfc1 $a2, $f22 /* 7AE7C 800E19CC 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 7AE80 800E19D0 27A40020 */ addiu $a0, $sp, 0x20 /* 7AE84 800E19D4 0C019EC8 */ jal guRotateF /* 7AE88 800E19D8 E7B60010 */ swc1 $f22, 0x10($sp) /* 7AE8C 800E19DC 0200202D */ daddu $a0, $s0, $zero /* 7AE90 800E19E0 27A50020 */ addiu $a1, $sp, 0x20 /* 7AE94 800E19E4 0C019D80 */ jal guMtxCatF /* 7AE98 800E19E8 00A0302D */ daddu $a2, $a1, $zero .L800E19EC: /* 7AE9C 800E19EC 862200B0 */ lh $v0, 0xB0($s1) /* 7AEA0 800E19F0 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 7AEA4 800E19F4 44812000 */ mtc1 $at, $f4 /* 7AEA8 800E19F8 00021023 */ negu $v0, $v0 /* 7AEAC 800E19FC 44820000 */ mtc1 $v0, $f0 /* 7AEB0 800E1A00 00000000 */ nop /* 7AEB4 800E1A04 46800020 */ cvt.s.w $f0, $f0 /* 7AEB8 800E1A08 46040102 */ mul.s $f4, $f0, $f4 /* 7AEBC 800E1A0C 00000000 */ nop /* 7AEC0 800E1A10 4405B000 */ mfc1 $a1, $f22 /* 7AEC4 800E1A14 4407B000 */ mfc1 $a3, $f22 /* 7AEC8 800E1A18 44062000 */ mfc1 $a2, $f4 /* 7AECC 800E1A1C 0C019E40 */ jal guTranslateF /* 7AED0 800E1A20 0240202D */ daddu $a0, $s2, $zero /* 7AED4 800E1A24 0240202D */ daddu $a0, $s2, $zero /* 7AED8 800E1A28 27A50020 */ addiu $a1, $sp, 0x20 /* 7AEDC 800E1A2C 0C019D80 */ jal guMtxCatF /* 7AEE0 800E1A30 00A0302D */ daddu $a2, $a1, $zero /* 7AEE4 800E1A34 4405A000 */ mfc1 $a1, $f20 /* 7AEE8 800E1A38 4406B000 */ mfc1 $a2, $f22 /* 7AEEC 800E1A3C 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 7AEF0 800E1A40 0200202D */ daddu $a0, $s0, $zero /* 7AEF4 800E1A44 0C019EC8 */ jal guRotateF /* 7AEF8 800E1A48 E7B60010 */ swc1 $f22, 0x10($sp) /* 7AEFC 800E1A4C 27A40020 */ addiu $a0, $sp, 0x20 /* 7AF00 800E1A50 0200282D */ daddu $a1, $s0, $zero /* 7AF04 800E1A54 0C019D80 */ jal guMtxCatF /* 7AF08 800E1A58 0080302D */ daddu $a2, $a0, $zero /* 7AF0C 800E1A5C 8E2500A8 */ lw $a1, 0xA8($s1) /* 7AF10 800E1A60 4406B000 */ mfc1 $a2, $f22 /* 7AF14 800E1A64 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 7AF18 800E1A68 0200202D */ daddu $a0, $s0, $zero /* 7AF1C 800E1A6C 0C019EC8 */ jal guRotateF /* 7AF20 800E1A70 E7B60010 */ swc1 $f22, 0x10($sp) /* 7AF24 800E1A74 27A40020 */ addiu $a0, $sp, 0x20 /* 7AF28 800E1A78 0200282D */ daddu $a1, $s0, $zero /* 7AF2C 800E1A7C 0C019D80 */ jal guMtxCatF /* 7AF30 800E1A80 0080302D */ daddu $a2, $a0, $zero /* 7AF34 800E1A84 862200B0 */ lh $v0, 0xB0($s1) /* 7AF38 800E1A88 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 7AF3C 800E1A8C 44812000 */ mtc1 $at, $f4 /* 7AF40 800E1A90 44820000 */ mtc1 $v0, $f0 /* 7AF44 800E1A94 00000000 */ nop /* 7AF48 800E1A98 46800020 */ cvt.s.w $f0, $f0 /* 7AF4C 800E1A9C 46040102 */ mul.s $f4, $f0, $f4 /* 7AF50 800E1AA0 00000000 */ nop /* 7AF54 800E1AA4 4405B000 */ mfc1 $a1, $f22 /* 7AF58 800E1AA8 4407B000 */ mfc1 $a3, $f22 /* 7AF5C 800E1AAC 44062000 */ mfc1 $a2, $f4 /* 7AF60 800E1AB0 0C019E40 */ jal guTranslateF /* 7AF64 800E1AB4 0240202D */ daddu $a0, $s2, $zero /* 7AF68 800E1AB8 27A40020 */ addiu $a0, $sp, 0x20 /* 7AF6C 800E1ABC 0240282D */ daddu $a1, $s2, $zero /* 7AF70 800E1AC0 0C019D80 */ jal guMtxCatF /* 7AF74 800E1AC4 0080302D */ daddu $a2, $a0, $zero /* 7AF78 800E1AC8 3C013F36 */ lui $at, (0x3F36DB6E >> 16) /* 7AF7C 800E1ACC 3421DB6E */ ori $at, $at, (0x3F36DB6E & 0xFFFF) /* 7AF80 800E1AD0 44810000 */ mtc1 $at, $f0 /* 7AF84 800E1AD4 00000000 */ nop /* 7AF88 800E1AD8 44050000 */ mfc1 $a1, $f0 /* 7AF8C 800E1ADC 0280202D */ daddu $a0, $s4, $zero /* 7AF90 800E1AE0 00A0302D */ daddu $a2, $a1, $zero /* 7AF94 800E1AE4 0C019DF0 */ jal guScaleF /* 7AF98 800E1AE8 00A0382D */ daddu $a3, $a1, $zero /* 7AF9C 800E1AEC 27A40020 */ addiu $a0, $sp, 0x20 /* 7AFA0 800E1AF0 0280282D */ daddu $a1, $s4, $zero /* 7AFA4 800E1AF4 0C019D80 */ jal guMtxCatF /* 7AFA8 800E1AF8 0080302D */ daddu $a2, $a0, $zero /* 7AFAC 800E1AFC 4405F000 */ mfc1 $a1, $f30 /* 7AFB0 800E1B00 4406C000 */ mfc1 $a2, $f24 /* 7AFB4 800E1B04 4407E000 */ mfc1 $a3, $f28 /* 7AFB8 800E1B08 0C019E40 */ jal guTranslateF /* 7AFBC 800E1B0C 0240202D */ daddu $a0, $s2, $zero /* 7AFC0 800E1B10 27A40020 */ addiu $a0, $sp, 0x20 /* 7AFC4 800E1B14 0240282D */ daddu $a1, $s2, $zero /* 7AFC8 800E1B18 0C019D80 */ jal guMtxCatF /* 7AFCC 800E1B1C 0080302D */ daddu $a2, $a0, $zero /* 7AFD0 800E1B20 C62200A8 */ lwc1 $f2, 0xA8($s1) /* 7AFD4 800E1B24 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7AFD8 800E1B28 44810000 */ mtc1 $at, $f0 /* 7AFDC 800E1B2C 00000000 */ nop /* 7AFE0 800E1B30 4602003E */ c.le.s $f0, $f2 /* 7AFE4 800E1B34 00000000 */ nop /* 7AFE8 800E1B38 45000008 */ bc1f .L800E1B5C /* 7AFEC 800E1B3C 0000202D */ daddu $a0, $zero, $zero /* 7AFF0 800E1B40 3C014387 */ lui $at, (0x43870000 >> 16) /* 7AFF4 800E1B44 44812000 */ mtc1 $at, $f4 /* 7AFF8 800E1B48 00000000 */ nop /* 7AFFC 800E1B4C 4604103C */ c.lt.s $f2, $f4 /* 7B000 800E1B50 00000000 */ nop /* 7B004 800E1B54 45030001 */ bc1tl .L800E1B5C /* 7B008 800E1B58 3C041000 */ lui $a0, (0x10000000 >> 16) .L800E1B5C: /* 7B00C 800E1B5C 27A20020 */ addiu $v0, $sp, 0x20 /* 7B010 800E1B60 AFA20010 */ sw $v0, 0x10($sp) /* 7B014 800E1B64 0000282D */ daddu $a1, $zero, $zero /* 7B018 800E1B68 00A0302D */ daddu $a2, $a1, $zero /* 7B01C 800E1B6C 0C0B7710 */ jal spr_draw_player_sprite /* 7B020 800E1B70 00A0382D */ daddu $a3, $a1, $zero /* 7B024 800E1B74 26730001 */ addiu $s3, $s3, 0x1 /* 7B028 800E1B78 2A620002 */ slti $v0, $s3, 0x2 /* 7B02C 800E1B7C 1440FEFA */ bnez $v0, .L800E1768 /* 7B030 800E1B80 00000000 */ nop /* 7B034 800E1B84 8FBF014C */ lw $ra, 0x14C($sp) /* 7B038 800E1B88 8FB60148 */ lw $s6, 0x148($sp) /* 7B03C 800E1B8C 8FB50144 */ lw $s5, 0x144($sp) /* 7B040 800E1B90 8FB40140 */ lw $s4, 0x140($sp) /* 7B044 800E1B94 8FB3013C */ lw $s3, 0x13C($sp) /* 7B048 800E1B98 8FB20138 */ lw $s2, 0x138($sp) /* 7B04C 800E1B9C 8FB10134 */ lw $s1, 0x134($sp) /* 7B050 800E1BA0 8FB00130 */ lw $s0, 0x130($sp) /* 7B054 800E1BA4 D7BE0178 */ ldc1 $f30, 0x178($sp) /* 7B058 800E1BA8 D7BC0170 */ ldc1 $f28, 0x170($sp) /* 7B05C 800E1BAC D7BA0168 */ ldc1 $f26, 0x168($sp) /* 7B060 800E1BB0 D7B80160 */ ldc1 $f24, 0x160($sp) /* 7B064 800E1BB4 D7B60158 */ ldc1 $f22, 0x158($sp) /* 7B068 800E1BB8 D7B40150 */ ldc1 $f20, 0x150($sp) /* 7B06C 800E1BBC 03E00008 */ jr $ra /* 7B070 800E1BC0 27BD0180 */ addiu $sp, $sp, 0x180 ### DECOMPILED C INSTRUCTIONS: void appendGfx_player_spin(void* data) { PlayerStatus* playerStatus = &gPlayerStatus; Matrix4f mtx; Matrix4f translation; Matrix4f rotation; Matrix4f scale; f32 yaw; f32 blurAngle; s32 tint; f32 px, py, pz; s32 x, y, z; s32 i; s32 spriteIdx; for (i = 0; i < 2; i++) { yaw = -gCameras[gCurrentCamID].currentYaw; if (i == 0) { if (playerStatus->spriteFacingAngle > 90.0f && playerStatus->spriteFacingAngle <= 180.0f) { yaw = 180.0f - playerStatus->spriteFacingAngle; } else { if (playerStatus->spriteFacingAngle > 180.0f && playerStatus->spriteFacingAngle <= 270.0f) { yaw = playerStatus->spriteFacingAngle - 180.0f; } else if (playerStatus->spriteFacingAngle > 270.0f && playerStatus->spriteFacingAngle <= 360.0f) { yaw = 360.0f - playerStatus->spriteFacingAngle; } else { yaw = playerStatus->spriteFacingAngle; } } tint = yaw / 25.0f; tint = 255 - (tint * 60); if (tint < 100) { tint = 100; } set_player_imgfx_all(PLAYER_SPRITE_MAIN, IMGFX_SET_COLOR, tint, tint, tint, 255, 0); guRotateF(rotation, yaw, 0.0f, -1.0f, 0.0f); guRotateF(mtx, clamp_angle(playerStatus->pitch), 0.0f, 0.0f, 1.0f); guMtxCatF(rotation, mtx, mtx); px = playerStatus->position.x; py = playerStatus->position.y; pz = playerStatus->position.z; } else { blurAngle = phys_get_spin_history(i, &x, &y, &z); if (y == 0x80000000) { py = playerStatus->position.y; } else { py = y; } px = playerStatus->position.x; pz = playerStatus->position.z; set_player_imgfx_comp(PLAYER_SPRITE_MAIN, -1, IMGFX_SET_ALPHA, 0, 0, 0, 64, 0); guRotateF(mtx, yaw, 0.0f, -1.0f, 0.0f); guRotateF(rotation, yaw, 0.0f, -1.0f, 0.0f); guRotateF(mtx, blurAngle, 0.0f, 1.0f, 0.0f); guMtxCatF(rotation, mtx, mtx); } guTranslateF(translation, 0.0f, -playerStatus->colliderHeight * 0.5f, 0.0f); guMtxCatF(translation, mtx, mtx); guRotateF(rotation, yaw, 0.0f, 1.0f, 0.0f); guMtxCatF(mtx, rotation, mtx); guRotateF(rotation, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f); guMtxCatF(mtx, rotation, mtx); guTranslateF(translation, 0.0f, playerStatus->colliderHeight * 0.5f, 0.0f); guMtxCatF(mtx, translation, mtx); guScaleF(scale, SPRITE_WORLD_SCALE_D, SPRITE_WORLD_SCALE_D, SPRITE_WORLD_SCALE_D); guMtxCatF(mtx, scale, mtx); guTranslateF(translation, px, py, pz); guMtxCatF(mtx, translation, mtx); if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) { spriteIdx = PLAYER_SPRITE_MAIN | DRAW_SPRITE_UPSIDE_DOWN; } else { spriteIdx = PLAYER_SPRITE_MAIN; } spr_draw_player_sprite(spriteIdx, 0, 0, 0, mtx); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel D_80242BB0 /* 171490 80242BB0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 171494 80242BB4 AFB20018 */ sw $s2, 0x18($sp) glabel func_80242BB8 /* 171498 80242BB8 3C12800E */ lui $s2, %hi(gBattleStatus) glabel func_80242BBC /* 17149C 80242BBC 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) glabel func_80242BC0 /* 1714A0 80242BC0 AFB10014 */ sw $s1, 0x14($sp) glabel .L80242BC4 /* 1714A4 80242BC4 3C11800E */ lui $s1, %hi(gBattleSubState) glabel .L80242BC8 /* 1714A8 80242BC8 2631C4DC */ addiu $s1, $s1, %lo(gBattleSubState) .L80242BCC: /* 1714AC 80242BCC AFBF0020 */ sw $ra, 0x20($sp) glabel func_80242BD0 /* 1714B0 80242BD0 AFB3001C */ sw $s3, 0x1C($sp) .L80242BD4: /* 1714B4 80242BD4 AFB00010 */ sw $s0, 0x10($sp) glabel dead_kzn_17_LetterDelivery_CalcLetterPos /* 1714B8 80242BD8 8E220000 */ lw $v0, 0x0($s1) .L80242BDC: /* 1714BC 80242BDC 14400016 */ bnez $v0, D_80242C38 D_80242BE0: /* 1714C0 80242BE0 8E5000DC */ lw $s0, 0xDC($s2) .L80242BE4: /* 1714C4 80242BE4 16000006 */ bnez $s0, D_80242C00 .L80242BE8: /* 1714C8 80242BE8 24030006 */ addiu $v1, $zero, 0x6 D_80242BEC: /* 1714CC 80242BEC 24020001 */ addiu $v0, $zero, 0x1 D_80242BF0: /* 1714D0 80242BF0 3C01802A */ lui $at, %hi(D_8029F254) flo_14_pad_2BF4: /* 1714D4 80242BF4 AC22F254 */ sw $v0, %lo(D_8029F254)($at) D_80242BF8: /* 1714D8 80242BF8 08090B0D */ j .L80242C34 .L80242BFC: /* 1714DC 80242BFC 2402000A */ addiu $v0, $zero, 0xA D_80242C00: /* 1714E0 80242C00 8E420004 */ lw $v0, 0x4($s2) .L80242C04: /* 1714E4 80242C04 30420006 */ andi $v0, $v0, 0x6 D_80242C08: /* 1714E8 80242C08 104300B1 */ beq $v0, $v1, .L80242ED0 glabel func_80242C0C /* 1714EC 80242C0C 3C030020 */ lui $v1, (0x200000 >> 16) /* 1714F0 80242C10 8E020000 */ lw $v0, 0x0($s0) glabel func_80242C14 /* 1714F4 80242C14 00431024 */ and $v0, $v0, $v1 .L80242C18: /* 1714F8 80242C18 144000AE */ bnez $v0, .L80242ED4 glabel func_80242C1C /* 1714FC 80242C1C 24040009 */ addiu $a0, $zero, 0x9 glabel .L80242C20 /* 171500 80242C20 0C093903 */ jal func_8024E40C glabel func_80242C24 /* 171504 80242C24 24040002 */ addiu $a0, $zero, 0x2 glabel .L80242C28 /* 171508 80242C28 0C093936 */ jal D_8024E4D8_C0BD58 glabel .L80242C2C /* 17150C 80242C2C 24040005 */ addiu $a0, $zero, 0x5 D_80242C30: /* 171510 80242C30 24020064 */ addiu $v0, $zero, 0x64 .L80242C34: /* 171514 80242C34 AE220000 */ sw $v0, 0x0($s1) D_80242C38: /* 171518 80242C38 3C03800E */ lui $v1, %hi(gBattleSubState) D_80242C3C: /* 17151C 80242C3C 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) D_80242C40: /* 171520 80242C40 24020064 */ addiu $v0, $zero, 0x64 glabel func_80242C44 /* 171524 80242C44 14620048 */ bne $v1, $v0, .L80242D68 D_80242C48: /* 171528 80242C48 24020001 */ addiu $v0, $zero, 0x1 .L80242C4C: /* 17152C 80242C4C 0C093961 */ jal func_8024E584 D_80242C50: /* 171530 80242C50 00000000 */ nop /* 171534 80242C54 10400041 */ beqz $v0, .L80242D5C D_80242C58: /* 171538 80242C58 00000000 */ nop glabel func_80242C5C /* 17153C 80242C5C 3C13802A */ lui $s3, %hi(D_8029F258) D_80242C60: /* 171540 80242C60 2673F258 */ addiu $s3, $s3, %lo(D_8029F258) D_80242C64: /* 171544 80242C64 0C098F18 */ jal reset_actor_turn_info glabel func_80242C68 /* 171548 80242C68 AE600000 */ sw $zero, 0x0($s3) D_80242C6C: /* 17154C 80242C6C 2402007F */ addiu $v0, $zero, 0x7F D_80242C70: /* 171550 80242C70 3C05802A */ lui $a1, %hi(D_8029F254) .L80242C74: /* 171554 80242C74 24A5F254 */ addiu $a1, $a1, %lo(D_8029F254) glabel func_80242C78 /* 171558 80242C78 8E5000DC */ lw $s0, 0xDC($s2) /* 17155C 80242C7C 3C11800E */ lui $s1, %hi(gBattleStatus) .L80242C80: /* 171560 80242C80 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) glabel func_80242C84 /* 171564 80242C84 A2420086 */ sb $v0, 0x86($s2) .L80242C88: /* 171568 80242C88 A2420087 */ sb $v0, 0x87($s2) .L80242C8C: /* 17156C 80242C8C ACA00000 */ sw $zero, 0x0($a1) .L80242C90: /* 171570 80242C90 8E220000 */ lw $v0, 0x0($s1) glabel func_80242C94 /* 171574 80242C94 3C030008 */ lui $v1, (0x80000 >> 16) .L80242C98: /* 171578 80242C98 00431025 */ or $v0, $v0, $v1 /* 17157C 80242C9C AE220000 */ sw $v0, 0x0($s1) glabel func_80242CA0 /* 171580 80242CA0 8E220004 */ lw $v0, 0x4($s1) /* 171584 80242CA4 3C030010 */ lui $v1, (0x100000 >> 16) /* 171588 80242CA8 00431025 */ or $v0, $v0, $v1 .L80242CAC: /* 17158C 80242CAC 3C030800 */ lui $v1, (0x8000000 >> 16) .L80242CB0: /* 171590 80242CB0 AE220004 */ sw $v0, 0x4($s1) .L80242CB4: /* 171594 80242CB4 8E020000 */ lw $v0, 0x0($s0) .L80242CB8: /* 171598 80242CB8 82040216 */ lb $a0, 0x216($s0) .L80242CBC: /* 17159C 80242CBC 00431025 */ or $v0, $v0, $v1 .L80242CC0: /* 1715A0 80242CC0 10800017 */ beqz $a0, func_80242D20 .L80242CC4: /* 1715A4 80242CC4 AE020000 */ sw $v0, 0x0($s0) glabel func_80242CC8 /* 1715A8 80242CC8 92020217 */ lbu $v0, 0x217($s0) .L80242CCC: /* 1715AC 80242CCC 2442FFFF */ addiu $v0, $v0, -0x1 glabel func_80242CD0 /* 1715B0 80242CD0 A2020217 */ sb $v0, 0x217($s0) .L80242CD4: /* 1715B4 80242CD4 24020001 */ addiu $v0, $zero, 0x1 D_80242CD8: /* 1715B8 80242CD8 ACA20000 */ sw $v0, 0x0($a1) .L80242CDC: /* 1715BC 80242CDC 24020014 */ addiu $v0, $zero, 0x14 D_80242CE0: /* 1715C0 80242CE0 AE620000 */ sw $v0, 0x0($s3) glabel func_80242CE4 /* 1715C4 80242CE4 82030217 */ lb $v1, 0x217($s0) D_80242CE8: /* 1715C8 80242CE8 18600005 */ blez $v1, func_80242D00 glabel func_80242CEC /* 1715CC 80242CEC 24040034 */ addiu $a0, $zero, 0x34 glabel func_80242CF0 /* 1715D0 80242CF0 8E020440 */ lw $v0, 0x440($s0) D_80242CF4: /* 1715D4 80242CF4 8C42000C */ lw $v0, 0xC($v0) glabel func_80242CF8 /* 1715D8 80242CF8 08090B48 */ j func_80242D20 .L80242CFC: /* 1715DC 80242CFC AC43003C */ sw $v1, 0x3C($v0) glabel func_80242D00 /* 1715E0 80242D00 0C09F7A0 */ jal dispatch_event_partner glabel func_80242D04 /* 1715E4 80242D04 A2000216 */ sb $zero, 0x216($s0) .L80242D08: /* 1715E8 80242D08 8E020440 */ lw $v0, 0x440($s0) glabel func_80242D0C /* 1715EC 80242D0C 8C42000C */ lw $v0, 0xC($v0) /* 1715F0 80242D10 AC40003C */ sw $zero, 0x3C($v0) glabel func_80242D14 /* 1715F4 80242D14 8E220004 */ lw $v0, 0x4($s1) .L80242D18: /* 1715F8 80242D18 34420008 */ ori $v0, $v0, 0x8 glabel func_80242D1C /* 1715FC 80242D1C AE220004 */ sw $v0, 0x4($s1) glabel func_80242D20 /* 171600 80242D20 0000282D */ daddu $a1, $zero, $zero .L80242D24: /* 171604 80242D24 3C060C00 */ lui $a2, (0xC000000 >> 16) glabel func_80242D28 /* 171608 80242D28 0240202D */ daddu $a0, $s2, $zero glabel func_80242D2C /* 17160C 80242D2C 8C8300E0 */ lw $v1, 0xE0($a0) .L80242D30: /* 171610 80242D30 10600004 */ beqz $v1, .L80242D44 D_80242D34: /* 171614 80242D34 24A50001 */ addiu $a1, $a1, 0x1 glabel func_80242D38 /* 171618 80242D38 8C620000 */ lw $v0, 0x0($v1) glabel func_80242D3C /* 17161C 80242D3C 00461025 */ or $v0, $v0, $a2 D_80242D40: /* 171620 80242D40 AC620000 */ sw $v0, 0x0($v1) .L80242D44: /* 171624 80242D44 28A20018 */ slti $v0, $a1, 0x18 glabel func_80242D48 /* 171628 80242D48 1440FFF8 */ bnez $v0, func_80242D2C glabel func_80242D4C /* 17162C 80242D4C 24840004 */ addiu $a0, $a0, 0x4 D_80242D50: /* 171630 80242D50 24020001 */ addiu $v0, $zero, 0x1 glabel .L80242D54 /* 171634 80242D54 3C01800E */ lui $at, %hi(gBattleSubState) glabel func_80242D58 /* 171638 80242D58 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80242D5C: /* 17163C 80242D5C 3C03800E */ lui $v1, %hi(gBattleSubState) D_80242D60: /* 171640 80242D60 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) glabel func_80242D64 /* 171644 80242D64 24020001 */ addiu $v0, $zero, 0x1 .L80242D68: /* 171648 80242D68 1462001B */ bne $v1, $v0, func_80242DD8 .L80242D6C: /* 17164C 80242D6C 00000000 */ nop D_80242D70: /* 171650 80242D70 1200000A */ beqz $s0, .L80242D9C .L80242D74: /* 171654 80242D74 00000000 */ nop .L80242D78: /* 171658 80242D78 8E0201D8 */ lw $v0, 0x1D8($s0) .L80242D7C: /* 17165C 80242D7C 50400007 */ beql $v0, $zero, .L80242D9C D_80242D80: /* 171660 80242D80 AE0001D8 */ sw $zero, 0x1D8($s0) .L80242D84: /* 171664 80242D84 8E0401E8 */ lw $a0, 0x1E8($s0) .L80242D88: /* 171668 80242D88 0C0B1059 */ jal does_script_exist glabel func_80242D8C /* 17166C 80242D8C 00000000 */ nop glabel func_80242D90 /* 171670 80242D90 14400011 */ bnez $v0, func_80242DD8 glabel func_80242D94 /* 171674 80242D94 00000000 */ nop glabel func_80242D98 /* 171678 80242D98 AE0001D8 */ sw $zero, 0x1D8($s0) .L80242D9C: /* 17167C 80242D9C 3C02800E */ lui $v0, %hi(gBattleStatus) .L80242DA0: /* 171680 80242DA0 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) .L80242DA4: /* 171684 80242DA4 8C430004 */ lw $v1, 0x4($v0) glabel dead_kzn_17_LetterDelivery_RestoreNpcAnim /* 171688 80242DA8 2404FFF7 */ addiu $a0, $zero, -0x9 D_80242DAC: /* 17168C 80242DAC 00641824 */ and $v1, $v1, $a0 glabel func_80242DB0 /* 171690 80242DB0 0C098D19 */ jal btl_check_player_defeated .L80242DB4: /* 171694 80242DB4 AC430004 */ sw $v1, 0x4($v0) glabel func_80242DB8 /* 171698 80242DB8 14400048 */ bnez $v0, .L80242EDC glabel func_80242DBC /* 17169C 80242DBC 00000000 */ nop .L80242DC0: /* 1716A0 80242DC0 0C098D0D */ jal btl_check_enemies_defeated D_80242DC4: /* 1716A4 80242DC4 00000000 */ nop D_80242DC8: /* 1716A8 80242DC8 14400044 */ bnez $v0, .L80242EDC .L80242DCC: /* 1716AC 80242DCC 24020008 */ addiu $v0, $zero, 0x8 .L80242DD0: /* 1716B0 80242DD0 3C01800E */ lui $at, %hi(gBattleSubState) /* 1716B4 80242DD4 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel func_80242DD8 /* 1716B8 80242DD8 3C11800E */ lui $s1, %hi(gBattleSubState) .L80242DDC: /* 1716BC 80242DDC 2631C4DC */ addiu $s1, $s1, %lo(gBattleSubState) glabel func_80242DE0 /* 1716C0 80242DE0 8E230000 */ lw $v1, 0x0($s1) glabel func_80242DE4 /* 1716C4 80242DE4 24020008 */ addiu $v0, $zero, 0x8 glabel func_80242DE8 /* 1716C8 80242DE8 14620014 */ bne $v1, $v0, .L80242E3C glabel func_80242DEC /* 1716CC 80242DEC 24020009 */ addiu $v0, $zero, 0x9 glabel func_80242DF0 /* 1716D0 80242DF0 8E0201CC */ lw $v0, 0x1CC($s0) .L80242DF4: /* 1716D4 80242DF4 1040000B */ beqz $v0, .L80242E24 .L80242DF8: /* 1716D8 80242DF8 2402000C */ addiu $v0, $zero, 0xC .L80242DFC: /* 1716DC 80242DFC 2405000A */ addiu $a1, $zero, 0xA glabel dead_kzn_17_GetActingPartner /* 1716E0 80242E00 A24201A7 */ sb $v0, 0x1A7($s2) .L80242E04: /* 1716E4 80242E04 8E0401CC */ lw $a0, 0x1CC($s0) .L80242E08: /* 1716E8 80242E08 0C0B0CF8 */ jal start_script glabel func_80242E0C /* 1716EC 80242E0C 0000302D */ daddu $a2, $zero, $zero .L80242E10: /* 1716F0 80242E10 AE0201DC */ sw $v0, 0x1DC($s0) glabel func_80242E14 /* 1716F4 80242E14 8C430144 */ lw $v1, 0x144($v0) .L80242E18: /* 1716F8 80242E18 AE0301EC */ sw $v1, 0x1EC($s0) .L80242E1C: /* 1716FC 80242E1C 24030100 */ addiu $v1, $zero, 0x100 glabel func_80242E20 /* 171700 80242E20 AC430148 */ sw $v1, 0x148($v0) .L80242E24: /* 171704 80242E24 24020009 */ addiu $v0, $zero, 0x9 D_80242E28: /* 171708 80242E28 AE220000 */ sw $v0, 0x0($s1) glabel dead_kzn_17_UnkFunc46 /* 17170C 80242E2C 3C11800E */ lui $s1, %hi(gBattleSubState) /* 171710 80242E30 2631C4DC */ addiu $s1, $s1, %lo(gBattleSubState) /* 171714 80242E34 8E230000 */ lw $v1, 0x0($s1) .L80242E38: /* 171718 80242E38 24020009 */ addiu $v0, $zero, 0x9 .L80242E3C: /* 17171C 80242E3C 1462000A */ bne $v1, $v0, .L80242E68 .L80242E40: /* 171720 80242E40 00000000 */ nop .L80242E44: /* 171724 80242E44 8E0201CC */ lw $v0, 0x1CC($s0) .L80242E48: /* 171728 80242E48 10400006 */ beqz $v0, .L80242E64 .L80242E4C: /* 17172C 80242E4C 2402000A */ addiu $v0, $zero, 0xA .L80242E50: /* 171730 80242E50 8E0401EC */ lw $a0, 0x1EC($s0) glabel func_80242E54 /* 171734 80242E54 0C0B1059 */ jal does_script_exist .L80242E58: /* 171738 80242E58 00000000 */ nop .L80242E5C: /* 17173C 80242E5C 14400002 */ bnez $v0, .L80242E68 .L80242E60: /* 171740 80242E60 2402000A */ addiu $v0, $zero, 0xA .L80242E64: /* 171744 80242E64 AE220000 */ sw $v0, 0x0($s1) .L80242E68: /* 171748 80242E68 3C03800E */ lui $v1, %hi(gBattleSubState) glabel func_80242E6C /* 17174C 80242E6C 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) glabel func_80242E70 /* 171750 80242E70 2402000A */ addiu $v0, $zero, 0xA .L80242E74: /* 171754 80242E74 14620019 */ bne $v1, $v0, .L80242EDC glabel func_80242E78 /* 171758 80242E78 00000000 */ nop .L80242E7C: /* 17175C 80242E7C 3C03802A */ lui $v1, %hi(D_8029F258) .L80242E80: /* 171760 80242E80 2463F258 */ addiu $v1, $v1, %lo(D_8029F258) glabel func_80242E84 /* 171764 80242E84 8C620000 */ lw $v0, 0x0($v1) D_80242E88: /* 171768 80242E88 10400003 */ beqz $v0, jtbl_80242E98 glabel func_80242E8C /* 17176C 80242E8C 2442FFFF */ addiu $v0, $v0, -0x1 D_80242E90: /* 171770 80242E90 08090BB7 */ j .L80242EDC glabel .L80242E94 /* 171774 80242E94 AC620000 */ sw $v0, 0x0($v1) jtbl_80242E98: /* 171778 80242E98 3C02FFEF */ lui $v0, (0xFFEFFFFF >> 16) .L80242E9C: /* 17177C 80242E9C 3442FFFF */ ori $v0, $v0, (0xFFEFFFFF & 0xFFFF) D_80242EA0: /* 171780 80242EA0 3C05800E */ lui $a1, %hi(gBattleStatus) .L80242EA4: /* 171784 80242EA4 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus) flo_08_pad_2EA8: /* 171788 80242EA8 8CA30004 */ lw $v1, 0x4($a1) D_80242EAC: /* 17178C 80242EAC 3C04802A */ lui $a0, %hi(D_8029F254) D_80242EB0: /* 171790 80242EB0 8C84F254 */ lw $a0, %lo(D_8029F254)($a0) glabel func_80242EB4 /* 171794 80242EB4 00621024 */ and $v0, $v1, $v0 glabel func_80242EB8 /* 171798 80242EB8 14800003 */ bnez $a0, .L80242EC8 glabel func_80242EBC /* 17179C 80242EBC ACA20004 */ sw $v0, 0x4($a1) .L80242EC0: /* 1717A0 80242EC0 08090BB5 */ j .L80242ED4 glabel func_80242EC4_EA37C4 /* 1717A4 80242EC4 2404000B */ addiu $a0, $zero, 0xB .L80242EC8: /* 1717A8 80242EC8 34420004 */ ori $v0, $v0, 0x4 D_80242ECC: /* 1717AC 80242ECC ACA20004 */ sw $v0, 0x4($a1) .L80242ED0: /* 1717B0 80242ED0 24040009 */ addiu $a0, $zero, 0x9 .L80242ED4: /* 1717B4 80242ED4 0C090464 */ jal func_80241190 .L80242ED8: /* 1717B8 80242ED8 00000000 */ nop .L80242EDC: /* 1717BC 80242EDC 8FBF0020 */ lw $ra, 0x20($sp) D_80242EE0: /* 1717C0 80242EE0 8FB3001C */ lw $s3, 0x1C($sp) .L80242EE4: /* 1717C4 80242EE4 8FB20018 */ lw $s2, 0x18($sp) D_80242EE8: /* 1717C8 80242EE8 8FB10014 */ lw $s1, 0x14($sp) .L80242EEC: /* 1717CC 80242EEC 8FB00010 */ lw $s0, 0x10($sp) D_80242EF0: /* 1717D0 80242EF0 03E00008 */ jr $ra .L80242EF4: /* 1717D4 80242EF4 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_begin_partner_turn(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; Actor* enemy; Evt* script; s32 i; if (gBattleSubState == BTL_SUBSTATE_BEGIN_PARTNER_TURN_INIT) { if (partner == NULL) { D_8029F254 = 1; gBattleSubState = BTL_SUBSTATE_BEGIN_PARTNER_TURN_END_DELAY; } else if ((battleStatus->flags2 & (BS_FLAGS2_4 | BS_FLAGS2_2)) != (BS_FLAGS2_4 | BS_FLAGS2_2)) { if (!(partner->flags & ACTOR_FLAG_NO_ATTACK)) { btl_cam_use_preset(BTL_CAM_DEFAULT); btl_cam_move(5); gBattleSubState = BTL_SUBSTATE_BEGIN_PARTNER_TURN_RESET_STATE; } else { btl_set_state(BATTLE_STATE_9); return; } } else { btl_set_state(BATTLE_STATE_9); return; } } if (gBattleSubState == BTL_SUBSTATE_BEGIN_PARTNER_TURN_RESET_STATE) { if (btl_cam_is_moving_done()) { D_8029F258 = 0; reset_actor_turn_info(); partner = battleStatus->partnerActor; battleStatus->unk_86 = 127; battleStatus->blockResult = 127; D_8029F254 = 0; gBattleStatus.flags1 |= BS_FLAGS1_PARTNER_ACTING; gBattleStatus.flags2 |= BS_FLAGS1_PLAYER_IN_BACK; partner->flags |= ACTOR_FLAG_8000000; if (partner->koStatus != 0) { partner->koDuration--; D_8029F254 = 1; D_8029F258 = 20; if (partner->koDuration > 0) { partner->disableEffect->data.disableX->koDuration = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(EVENT_RECOVER_FROM_KO); partner->disableEffect->data.disableX->koDuration = 0; gBattleStatus.flags2 |= BS_FLAGS2_8; } } for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { enemy = battleStatus->enemyActors[i]; if (enemy != NULL) { enemy->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; } } gBattleSubState = BTL_SUBSTATE_BEGIN_PARTNER_TURN_AWAIT_RECOVER_DONE; } } if (gBattleSubState == BTL_SUBSTATE_BEGIN_PARTNER_TURN_AWAIT_RECOVER_DONE) { if (partner != NULL) { if (partner->handleEventScript == NULL || !does_script_exist(partner->handleEventScriptID)) { partner->handleEventScript = NULL; } else { goto block_27; // TODO find a way to remove } } gBattleStatus.flags2 &= ~BS_FLAGS2_8; if (btl_check_player_defeated() || btl_check_enemies_defeated()) { return; } gBattleSubState = BTL_SUBSTATE_BEGIN_PARTNER_TURN_EXEC_TURN_SCRIPT; } block_27: if (gBattleSubState == BTL_SUBSTATE_BEGIN_PARTNER_TURN_EXEC_TURN_SCRIPT) { if (partner->handlePhaseSource != NULL) { battleStatus->battlePhase = PHASE_ENEMY_BEGIN; script = start_script(partner->handlePhaseSource, EVT_PRIORITY_A, 0); partner->handlePhaseScript = script; partner->handleBatttlePhaseScriptID = script->id; script->owner1.actorID = ACTOR_PARTNER; } gBattleSubState = BTL_SUBSTATE_BEGIN_PARTNER_TURN_AWAIT_TURN_SCRIPT; } if (gBattleSubState == BTL_SUBSTATE_BEGIN_PARTNER_TURN_AWAIT_TURN_SCRIPT) { if (partner->handlePhaseSource == NULL || !does_script_exist(partner->handleBatttlePhaseScriptID)) { gBattleSubState = BTL_SUBSTATE_BEGIN_PARTNER_TURN_END_DELAY; } } if (gBattleSubState == BTL_SUBSTATE_BEGIN_PARTNER_TURN_END_DELAY) { if (D_8029F258 != 0) { D_8029F258--; return; } gBattleStatus.flags2 &= ~BS_FLAGS2_100000; if (D_8029F254 == 0) { btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER); } else { gBattleStatus.flags2 |= BS_FLAGS2_4; btl_set_state(BATTLE_STATE_9); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel stars_shimmer_appendGfx /* 35587C E004491C 27BDFEE8 */ addiu $sp, $sp, -0x118 /* 355880 E0044920 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 355884 E0044924 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 355888 E0044928 AFA40118 */ sw $a0, 0x118($sp) /* 35588C E004492C 27A40018 */ addiu $a0, $sp, 0x18 /* 355890 E0044930 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 355894 E0044934 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 355898 E0044938 AFBF00FC */ sw $ra, 0xFC($sp) /* 35589C E004493C AFBE00F8 */ sw $fp, 0xF8($sp) /* 3558A0 E0044940 AFB700F4 */ sw $s7, 0xF4($sp) /* 3558A4 E0044944 AFB600F0 */ sw $s6, 0xF0($sp) /* 3558A8 E0044948 AFB500EC */ sw $s5, 0xEC($sp) /* 3558AC E004494C AFB400E8 */ sw $s4, 0xE8($sp) /* 3558B0 E0044950 AFB300E4 */ sw $s3, 0xE4($sp) /* 3558B4 E0044954 AFB200E0 */ sw $s2, 0xE0($sp) /* 3558B8 E0044958 AFB100DC */ sw $s1, 0xDC($sp) /* 3558BC E004495C AFB000D8 */ sw $s0, 0xD8($sp) /* 3558C0 E0044960 F7B80110 */ sdc1 $f24, 0x110($sp) /* 3558C4 E0044964 F7B60108 */ sdc1 $f22, 0x108($sp) /* 3558C8 E0044968 F7B40100 */ sdc1 $f20, 0x100($sp) /* 3558CC E004496C 8CA30000 */ lw $v1, 0x0($a1) /* 3558D0 E0044970 8FA90118 */ lw $t1, 0x118($sp) /* 3558D4 E0044974 0060302D */ daddu $a2, $v1, $zero /* 3558D8 E0044978 8D31000C */ lw $s1, 0xC($t1) /* 3558DC E004497C 24630008 */ addiu $v1, $v1, 0x8 /* 3558E0 E0044980 ACA30000 */ sw $v1, 0x0($a1) /* 3558E4 E0044984 86320002 */ lh $s2, 0x2($s1) /* 3558E8 E0044988 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3558EC E004498C ACC20000 */ sw $v0, 0x0($a2) /* 3558F0 E0044990 24620008 */ addiu $v0, $v1, 0x8 /* 3558F4 E0044994 ACC00004 */ sw $zero, 0x4($a2) /* 3558F8 E0044998 ACA20000 */ sw $v0, 0x0($a1) /* 3558FC E004499C AC670000 */ sw $a3, 0x0($v1) /* 355900 E00449A0 8D260010 */ lw $a2, 0x10($t1) /* 355904 E00449A4 24620010 */ addiu $v0, $v1, 0x10 /* 355908 E00449A8 ACA20000 */ sw $v0, 0x0($a1) /* 35590C E00449AC 8CC5001C */ lw $a1, 0x1C($a2) /* 355910 E00449B0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 355914 E00449B4 AC620008 */ sw $v0, 0x8($v1) /* 355918 E00449B8 3C020900 */ lui $v0, %hi(D_09000F20_327330) /* 35591C E00449BC 24420F20 */ addiu $v0, $v0, %lo(D_09000F20_327330) /* 355920 E00449C0 AC62000C */ sw $v0, 0xC($v1) /* 355924 E00449C4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 355928 E00449C8 00A22821 */ addu $a1, $a1, $v0 /* 35592C E00449CC AC650004 */ sw $a1, 0x4($v1) /* 355930 E00449D0 8E250004 */ lw $a1, 0x4($s1) /* 355934 E00449D4 8E260008 */ lw $a2, 0x8($s1) /* 355938 E00449D8 8E220020 */ lw $v0, 0x20($s1) /* 35593C E00449DC 8E27000C */ lw $a3, 0xC($s1) /* 355940 E00449E0 2442FFFF */ addiu $v0, $v0, -0x1 /* 355944 E00449E4 00021840 */ sll $v1, $v0, 1 /* 355948 E00449E8 0C080108 */ jal shim_guTranslateF /* 35594C E00449EC 0062A021 */ addu $s4, $v1, $v0 /* 355950 E00449F0 27B00058 */ addiu $s0, $sp, 0x58 /* 355954 E00449F4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 355958 E00449F8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 35595C E00449FC 44800000 */ mtc1 $zero, $f0 /* 355960 E0044A00 00031080 */ sll $v0, $v1, 2 /* 355964 E0044A04 00431021 */ addu $v0, $v0, $v1 /* 355968 E0044A08 00021080 */ sll $v0, $v0, 2 /* 35596C E0044A0C 00431023 */ subu $v0, $v0, $v1 /* 355970 E0044A10 000218C0 */ sll $v1, $v0, 3 /* 355974 E0044A14 00431021 */ addu $v0, $v0, $v1 /* 355978 E0044A18 000210C0 */ sll $v0, $v0, 3 /* 35597C E0044A1C 44060000 */ mfc1 $a2, $f0 /* 355980 E0044A20 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 355984 E0044A24 00220821 */ addu $at, $at, $v0 /* 355988 E0044A28 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 35598C E0044A2C 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 355990 E0044A30 46000007 */ neg.s $f0, $f0 /* 355994 E0044A34 44050000 */ mfc1 $a1, $f0 /* 355998 E0044A38 0200202D */ daddu $a0, $s0, $zero /* 35599C E0044A3C 0C080104 */ jal shim_guRotateF /* 3559A0 E0044A40 AFA60010 */ sw $a2, 0x10($sp) /* 3559A4 E0044A44 0200202D */ daddu $a0, $s0, $zero /* 3559A8 E0044A48 27A50018 */ addiu $a1, $sp, 0x18 /* 3559AC E0044A4C 0C080114 */ jal shim_guMtxCatF /* 3559B0 E0044A50 27A60098 */ addiu $a2, $sp, 0x98 /* 3559B4 E0044A54 2E42001F */ sltiu $v0, $s2, 0x1F /* 3559B8 E0044A58 1040002E */ beqz $v0, .LE0044B14 /* 3559BC E0044A5C 00121080 */ sll $v0, $s2, 2 /* 3559C0 E0044A60 3C01E004 */ lui $at, (0xE0044F00 >> 16) /* 3559C4 E0044A64 00220821 */ addu $at, $at, $v0 /* 3559C8 E0044A68 8C224F00 */ lw $v0, (0xE0044F00 & 0xFFFF)($at) /* 3559CC E0044A6C 00400008 */ jr $v0 /* 3559D0 E0044A70 00000000 */ nop /* 3559D4 E0044A74 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3559D8 E0044A78 4481C000 */ mtc1 $at, $f24 /* 3559DC E0044A7C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 3559E0 E0044A80 4481B000 */ mtc1 $at, $f22 /* 3559E4 E0044A84 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) /* 3559E8 E0044A88 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) /* 3559EC E0044A8C 4481A000 */ mtc1 $at, $f20 /* 3559F0 E0044A90 080112CC */ j .LE0044B30 /* 3559F4 E0044A94 00000000 */ nop /* 3559F8 E0044A98 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3559FC E0044A9C 4481C000 */ mtc1 $at, $f24 /* 355A00 E0044AA0 3C013F4C */ lui $at, (0x3F4CCCCD >> 16) /* 355A04 E0044AA4 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF) /* 355A08 E0044AA8 4481B000 */ mtc1 $at, $f22 /* 355A0C E0044AAC 86220000 */ lh $v0, 0x0($s1) /* 355A10 E0044AB0 3C013F33 */ lui $at, (0x3F333333 >> 16) /* 355A14 E0044AB4 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF) /* 355A18 E0044AB8 4481A000 */ mtc1 $at, $f20 /* 355A1C E0044ABC 1040001C */ beqz $v0, .LE0044B30 /* 355A20 E0044AC0 3C06E200 */ lui $a2, (0xE200001C >> 16) /* 355A24 E0044AC4 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF) /* 355A28 E0044AC8 3C050050 */ lui $a1, (0x504B50 >> 16) /* 355A2C E0044ACC 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 355A30 E0044AD0 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 355A34 E0044AD4 8C820000 */ lw $v0, 0x0($a0) /* 355A38 E0044AD8 34A54B50 */ ori $a1, $a1, (0x504B50 & 0xFFFF) /* 355A3C E0044ADC 0040182D */ daddu $v1, $v0, $zero /* 355A40 E0044AE0 24420008 */ addiu $v0, $v0, 0x8 /* 355A44 E0044AE4 AC820000 */ sw $v0, 0x0($a0) /* 355A48 E0044AE8 AC660000 */ sw $a2, 0x0($v1) /* 355A4C E0044AEC 080112CC */ j .LE0044B30 /* 355A50 E0044AF0 AC650004 */ sw $a1, 0x4($v1) /* 355A54 E0044AF4 3C013FB3 */ lui $at, (0x3FB33333 >> 16) /* 355A58 E0044AF8 34213333 */ ori $at, $at, (0x3FB33333 & 0xFFFF) /* 355A5C E0044AFC 4481B000 */ mtc1 $at, $f22 /* 355A60 E0044B00 3C013F33 */ lui $at, (0x3F333333 >> 16) /* 355A64 E0044B04 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF) /* 355A68 E0044B08 4481A000 */ mtc1 $at, $f20 /* 355A6C E0044B0C 080112CC */ j .LE0044B30 /* 355A70 E0044B10 4600B606 */ mov.s $f24, $f22 .LE0044B14: /* 355A74 E0044B14 3C013F33 */ lui $at, (0x3F333333 >> 16) /* 355A78 E0044B18 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF) /* 355A7C E0044B1C 4481A000 */ mtc1 $at, $f20 /* 355A80 E0044B20 3C013FB3 */ lui $at, (0x3FB33333 >> 16) /* 355A84 E0044B24 34213333 */ ori $at, $at, (0x3FB33333 & 0xFFFF) /* 355A88 E0044B28 4481C000 */ mtc1 $at, $f24 /* 355A8C E0044B2C 4600A586 */ mov.s $f22, $f20 .LE0044B30: /* 355A90 E0044B30 8FA90118 */ lw $t1, 0x118($sp) /* 355A94 E0044B34 2631002C */ addiu $s1, $s1, 0x2C /* 355A98 E0044B38 8D220008 */ lw $v0, 0x8($t1) /* 355A9C E0044B3C 2442FFFF */ addiu $v0, $v0, -0x1 /* 355AA0 E0044B40 18400083 */ blez $v0, .LE0044D50 /* 355AA4 E0044B44 0000902D */ daddu $s2, $zero, $zero /* 355AA8 E0044B48 27B60058 */ addiu $s6, $sp, 0x58 /* 355AAC E0044B4C 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 355AB0 E0044B50 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 355AB4 E0044B54 3C150001 */ lui $s5, (0x11630 >> 16) /* 355AB8 E0044B58 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 355ABC E0044B5C 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 355AC0 E0044B60 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 355AC4 E0044B64 2631001C */ addiu $s1, $s1, 0x1C /* 355AC8 E0044B68 3C1EE004 */ lui $fp, %hi(D_E0044DD0) /* 355ACC E0044B6C 27DE4DD0 */ addiu $fp, $fp, %lo(D_E0044DD0) /* 355AD0 E0044B70 029E8021 */ addu $s0, $s4, $fp .LE0044B74: /* 355AD4 E0044B74 8E34000C */ lw $s4, 0xC($s1) /* 355AD8 E0044B78 0680006E */ bltz $s4, .LE0044D34 /* 355ADC E0044B7C 00000000 */ nop /* 355AE0 E0044B80 8E25FFE8 */ lw $a1, -0x18($s1) /* 355AE4 E0044B84 8E26FFEC */ lw $a2, -0x14($s1) /* 355AE8 E0044B88 8E27FFF0 */ lw $a3, -0x10($s1) /* 355AEC E0044B8C 0C080108 */ jal shim_guTranslateF /* 355AF0 E0044B90 02C0202D */ daddu $a0, $s6, $zero /* 355AF4 E0044B94 02C0202D */ daddu $a0, $s6, $zero /* 355AF8 E0044B98 27A50098 */ addiu $a1, $sp, 0x98 /* 355AFC E0044B9C C6200000 */ lwc1 $f0, 0x0($s1) /* 355B00 E0044BA0 27A60018 */ addiu $a2, $sp, 0x18 /* 355B04 E0044BA4 E7A00080 */ swc1 $f0, 0x80($sp) /* 355B08 E0044BA8 E7A0006C */ swc1 $f0, 0x6C($sp) /* 355B0C E0044BAC 0C080114 */ jal shim_guMtxCatF /* 355B10 E0044BB0 E7A00058 */ swc1 $f0, 0x58($sp) /* 355B14 E0044BB4 27A40018 */ addiu $a0, $sp, 0x18 /* 355B18 E0044BB8 96E50000 */ lhu $a1, 0x0($s7) /* 355B1C E0044BBC 3C02800A */ lui $v0, %hi(gDisplayContext) /* 355B20 E0044BC0 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 355B24 E0044BC4 00052980 */ sll $a1, $a1, 6 /* 355B28 E0044BC8 00B52821 */ addu $a1, $a1, $s5 /* 355B2C E0044BCC 0C080118 */ jal shim_guMtxF2L /* 355B30 E0044BD0 00452821 */ addu $a1, $v0, $a1 /* 355B34 E0044BD4 27C20024 */ addiu $v0, $fp, 0x24 /* 355B38 E0044BD8 0202102A */ slt $v0, $s0, $v0 /* 355B3C E0044BDC 50400001 */ beql $v0, $zero, .LE0044BE4 /* 355B40 E0044BE0 03C0802D */ daddu $s0, $fp, $zero .LE0044BE4: /* 355B44 E0044BE4 92020000 */ lbu $v0, 0x0($s0) /* 355B48 E0044BE8 44822000 */ mtc1 $v0, $f4 /* 355B4C E0044BEC 00000000 */ nop /* 355B50 E0044BF0 46802120 */ cvt.s.w $f4, $f4 /* 355B54 E0044BF4 46182102 */ mul.s $f4, $f4, $f24 /* 355B58 E0044BF8 00000000 */ nop /* 355B5C E0044BFC 26100001 */ addiu $s0, $s0, 0x1 /* 355B60 E0044C00 92020000 */ lbu $v0, 0x0($s0) /* 355B64 E0044C04 44821000 */ mtc1 $v0, $f2 /* 355B68 E0044C08 00000000 */ nop /* 355B6C E0044C0C 468010A0 */ cvt.s.w $f2, $f2 /* 355B70 E0044C10 46161082 */ mul.s $f2, $f2, $f22 /* 355B74 E0044C14 00000000 */ nop /* 355B78 E0044C18 26100001 */ addiu $s0, $s0, 0x1 /* 355B7C E0044C1C 92020000 */ lbu $v0, 0x0($s0) /* 355B80 E0044C20 44820000 */ mtc1 $v0, $f0 /* 355B84 E0044C24 00000000 */ nop /* 355B88 E0044C28 46800020 */ cvt.s.w $f0, $f0 /* 355B8C E0044C2C 46140002 */ mul.s $f0, $f0, $f20 /* 355B90 E0044C30 00000000 */ nop /* 355B94 E0044C34 4600218D */ trunc.w.s $f6, $f4 /* 355B98 E0044C38 44033000 */ mfc1 $v1, $f6 /* 355B9C E0044C3C 00000000 */ nop /* 355BA0 E0044C40 28620100 */ slti $v0, $v1, 0x100 /* 355BA4 E0044C44 4600118D */ trunc.w.s $f6, $f2 /* 355BA8 E0044C48 44073000 */ mfc1 $a3, $f6 /* 355BAC E0044C4C 4600018D */ trunc.w.s $f6, $f0 /* 355BB0 E0044C50 44083000 */ mfc1 $t0, $f6 /* 355BB4 E0044C54 14400002 */ bnez $v0, .LE0044C60 /* 355BB8 E0044C58 26100001 */ addiu $s0, $s0, 0x1 /* 355BBC E0044C5C 240300FF */ addiu $v1, $zero, 0xFF .LE0044C60: /* 355BC0 E0044C60 28E20100 */ slti $v0, $a3, 0x100 /* 355BC4 E0044C64 50400001 */ beql $v0, $zero, .LE0044C6C /* 355BC8 E0044C68 240700FF */ addiu $a3, $zero, 0xFF .LE0044C6C: /* 355BCC E0044C6C 29020100 */ slti $v0, $t0, 0x100 /* 355BD0 E0044C70 50400001 */ beql $v0, $zero, .LE0044C78 /* 355BD4 E0044C74 240800FF */ addiu $t0, $zero, 0xFF .LE0044C78: /* 355BD8 E0044C78 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 355BDC E0044C7C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 355BE0 E0044C80 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 355BE4 E0044C84 00031E00 */ sll $v1, $v1, 24 /* 355BE8 E0044C88 8E640000 */ lw $a0, 0x0($s3) /* 355BEC E0044C8C 3C09E004 */ lui $t1, %hi(D_E0044DB0) /* 355BF0 E0044C90 25294DB0 */ addiu $t1, $t1, %lo(D_E0044DB0) /* 355BF4 E0044C94 0080282D */ daddu $a1, $a0, $zero /* 355BF8 E0044C98 24840008 */ addiu $a0, $a0, 0x8 /* 355BFC E0044C9C AE640000 */ sw $a0, 0x0($s3) /* 355C00 E0044CA0 ACA20000 */ sw $v0, 0x0($a1) /* 355C04 E0044CA4 30E200FF */ andi $v0, $a3, 0xFF /* 355C08 E0044CA8 00021400 */ sll $v0, $v0, 16 /* 355C0C E0044CAC 00621825 */ or $v1, $v1, $v0 /* 355C10 E0044CB0 310200FF */ andi $v0, $t0, 0xFF /* 355C14 E0044CB4 00021200 */ sll $v0, $v0, 8 /* 355C18 E0044CB8 00621825 */ or $v1, $v1, $v0 /* 355C1C E0044CBC 346300FF */ ori $v1, $v1, 0xFF /* 355C20 E0044CC0 24820008 */ addiu $v0, $a0, 0x8 /* 355C24 E0044CC4 ACA30004 */ sw $v1, 0x4($a1) /* 355C28 E0044CC8 AE620000 */ sw $v0, 0x0($s3) /* 355C2C E0044CCC 96E20000 */ lhu $v0, 0x0($s7) /* 355C30 E0044CD0 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 355C34 E0044CD4 AC830000 */ sw $v1, 0x0($a0) /* 355C38 E0044CD8 24430001 */ addiu $v1, $v0, 0x1 /* 355C3C E0044CDC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 355C40 E0044CE0 00021180 */ sll $v0, $v0, 6 /* 355C44 E0044CE4 A6E30000 */ sh $v1, 0x0($s7) /* 355C48 E0044CE8 3C03800A */ lui $v1, %hi(gDisplayContext) /* 355C4C E0044CEC 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 355C50 E0044CF0 00551021 */ addu $v0, $v0, $s5 /* 355C54 E0044CF4 00621821 */ addu $v1, $v1, $v0 /* 355C58 E0044CF8 24820010 */ addiu $v0, $a0, 0x10 /* 355C5C E0044CFC AC830004 */ sw $v1, 0x4($a0) /* 355C60 E0044D00 AE620000 */ sw $v0, 0x0($s3) /* 355C64 E0044D04 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 355C68 E0044D08 AC820008 */ sw $v0, 0x8($a0) /* 355C6C E0044D0C 32820007 */ andi $v0, $s4, 0x7 /* 355C70 E0044D10 00021080 */ sll $v0, $v0, 2 /* 355C74 E0044D14 00491021 */ addu $v0, $v0, $t1 /* 355C78 E0044D18 8C430000 */ lw $v1, 0x0($v0) /* 355C7C E0044D1C 24820018 */ addiu $v0, $a0, 0x18 /* 355C80 E0044D20 AE620000 */ sw $v0, 0x0($s3) /* 355C84 E0044D24 24020040 */ addiu $v0, $zero, 0x40 /* 355C88 E0044D28 AC860010 */ sw $a2, 0x10($a0) /* 355C8C E0044D2C AC820014 */ sw $v0, 0x14($a0) /* 355C90 E0044D30 AC83000C */ sw $v1, 0xC($a0) .LE0044D34: /* 355C94 E0044D34 8FA90118 */ lw $t1, 0x118($sp) /* 355C98 E0044D38 26520001 */ addiu $s2, $s2, 0x1 /* 355C9C E0044D3C 8D220008 */ lw $v0, 0x8($t1) /* 355CA0 E0044D40 2442FFFF */ addiu $v0, $v0, -0x1 /* 355CA4 E0044D44 0242102A */ slt $v0, $s2, $v0 /* 355CA8 E0044D48 1440FF8A */ bnez $v0, .LE0044B74 /* 355CAC E0044D4C 2631002C */ addiu $s1, $s1, 0x2C .LE0044D50: /* 355CB0 E0044D50 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 355CB4 E0044D54 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 355CB8 E0044D58 8C620000 */ lw $v0, 0x0($v1) /* 355CBC E0044D5C 0040202D */ daddu $a0, $v0, $zero /* 355CC0 E0044D60 24420008 */ addiu $v0, $v0, 0x8 /* 355CC4 E0044D64 AC620000 */ sw $v0, 0x0($v1) /* 355CC8 E0044D68 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 355CCC E0044D6C AC820000 */ sw $v0, 0x0($a0) /* 355CD0 E0044D70 AC800004 */ sw $zero, 0x4($a0) /* 355CD4 E0044D74 8FBF00FC */ lw $ra, 0xFC($sp) /* 355CD8 E0044D78 8FBE00F8 */ lw $fp, 0xF8($sp) /* 355CDC E0044D7C 8FB700F4 */ lw $s7, 0xF4($sp) /* 355CE0 E0044D80 8FB600F0 */ lw $s6, 0xF0($sp) /* 355CE4 E0044D84 8FB500EC */ lw $s5, 0xEC($sp) /* 355CE8 E0044D88 8FB400E8 */ lw $s4, 0xE8($sp) /* 355CEC E0044D8C 8FB300E4 */ lw $s3, 0xE4($sp) /* 355CF0 E0044D90 8FB200E0 */ lw $s2, 0xE0($sp) /* 355CF4 E0044D94 8FB100DC */ lw $s1, 0xDC($sp) /* 355CF8 E0044D98 8FB000D8 */ lw $s0, 0xD8($sp) /* 355CFC E0044D9C D7B80110 */ ldc1 $f24, 0x110($sp) /* 355D00 E0044DA0 D7B60108 */ ldc1 $f22, 0x108($sp) /* 355D04 E0044DA4 D7B40100 */ ldc1 $f20, 0x100($sp) /* 355D08 E0044DA8 03E00008 */ jr $ra /* 355D0C E0044DAC 27BD0118 */ addiu $sp, $sp, 0x118 ### DECOMPILED C INSTRUCTIONS: void stars_shimmer_appendGfx(void* effect) { Matrix4f sp18, sp58, sp98; StarsShimmerFXData* data = ((EffectInstance*)effect)->data.starsShimmer; s32 type; s32 temp_s4; s32 unk_28; f32 rf, gf, bf; s32 r, g, b; s32 i; type = data->state; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000F20_338EE0); temp_s4 = (data->lifeTime - 1) * 3; shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp98); switch (type) { case 0: case 1: case 2: case 10: rf = 1.0f; gf = 0.5f; bf = 0.1f; break; case 3: case 30: rf = 1.0f; gf = 0.8f; bf = 0.7f; if (data->unk_00 != 0) { gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); } break; case 5: rf = 1.4f; gf = 1.4f; bf = 0.7f; break; default: rf = 1.4f; gf = 0.7f; bf = 0.7f; break; } data++; for (i = 0; i < ((EffectInstance*)effect)->numParts - 1; i++, data++) { unk_28 = data->unk_28; if (unk_28 >= 0) { shim_guTranslateF(sp58, data->pos.x, data->pos.y, data->pos.z); sp58[0][0] = sp58[1][1] = sp58[2][2] = data->unk_1C; shim_guMtxCatF(sp58, sp98, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); if (temp_s4 >= 36) { temp_s4 = 0; } r = D_E0044DD0[temp_s4++] * rf; g = D_E0044DD0[temp_s4++] * gf; b = D_E0044DD0[temp_s4++] * bf; if (r > 255) { r = 255; } if (g > 255) { g = 255; } if (b > 255) { b = 255; } gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, 255); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E0044DB0[unk_28 & 7]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802A5290_7ACC30 /* 41A020 802A5290 3C02802B */ lui $v0, %hi(BattleSubmenuStratsState) /* 41A024 802A5294 9042D604 */ lbu $v0, %lo(BattleSubmenuStratsState)($v0) /* 41A028 802A5298 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 41A02C 802A529C AFB70034 */ sw $s7, 0x34($sp) /* 41A030 802A52A0 00A0B82D */ daddu $s7, $a1, $zero /* 41A034 802A52A4 AFBF003C */ sw $ra, 0x3C($sp) /* 41A038 802A52A8 AFBE0038 */ sw $fp, 0x38($sp) /* 41A03C 802A52AC AFB60030 */ sw $s6, 0x30($sp) /* 41A040 802A52B0 AFB5002C */ sw $s5, 0x2C($sp) /* 41A044 802A52B4 AFB40028 */ sw $s4, 0x28($sp) /* 41A048 802A52B8 AFB30024 */ sw $s3, 0x24($sp) /* 41A04C 802A52BC AFB20020 */ sw $s2, 0x20($sp) /* 41A050 802A52C0 AFB1001C */ sw $s1, 0x1C($sp) /* 41A054 802A52C4 AFB00018 */ sw $s0, 0x18($sp) /* 41A058 802A52C8 24420001 */ addiu $v0, $v0, 0x1 /* 41A05C 802A52CC 00021600 */ sll $v0, $v0, 24 /* 41A060 802A52D0 00021E03 */ sra $v1, $v0, 24 /* 41A064 802A52D4 2C62002B */ sltiu $v0, $v1, 0x2B /* 41A068 802A52D8 104000FB */ beqz $v0, .L802A56C8_7AD068 /* 41A06C 802A52DC AFA60048 */ sw $a2, 0x48($sp) /* 41A070 802A52E0 00031080 */ sll $v0, $v1, 2 /* 41A074 802A52E4 3C01802B */ lui $at, %hi(jtbl_802ABAA8_7B3448) /* 41A078 802A52E8 00220821 */ addu $at, $at, $v0 /* 41A07C 802A52EC 8C22BAA8 */ lw $v0, %lo(jtbl_802ABAA8_7B3448)($at) /* 41A080 802A52F0 00400008 */ jr $v0 /* 41A084 802A52F4 00000000 */ nop glabel .L802A52F8_7ACC98 /* 41A088 802A52F8 3C03802B */ lui $v1, %hi(D_802AD608) /* 41A08C 802A52FC 8063D608 */ lb $v1, %lo(D_802AD608)($v1) /* 41A090 802A5300 3C08802B */ lui $t0, %hi(D_802AD60C) /* 41A094 802A5304 8508D60C */ lh $t0, %lo(D_802AD60C)($t0) /* 41A098 802A5308 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 41A09C 802A530C 44811800 */ mtc1 $at, $f3 /* 41A0A0 802A5310 44801000 */ mtc1 $zero, $f2 /* 41A0A4 802A5314 00031823 */ negu $v1, $v1 /* 41A0A8 802A5318 00031040 */ sll $v0, $v1, 1 /* 41A0AC 802A531C 00431021 */ addu $v0, $v0, $v1 /* 41A0B0 802A5320 00021080 */ sll $v0, $v0, 2 /* 41A0B4 802A5324 00438821 */ addu $s1, $v0, $v1 /* 41A0B8 802A5328 02281023 */ subu $v0, $s1, $t0 /* 41A0BC 802A532C 44820000 */ mtc1 $v0, $f0 /* 41A0C0 802A5330 00000000 */ nop /* 41A0C4 802A5334 46800021 */ cvt.d.w $f0, $f0 /* 41A0C8 802A5338 46220002 */ mul.d $f0, $f0, $f2 /* 41A0CC 802A533C 00000000 */ nop /* 41A0D0 802A5340 4620018D */ trunc.w.d $f6, $f0 /* 41A0D4 802A5344 44023000 */ mfc1 $v0, $f6 /* 41A0D8 802A5348 00000000 */ nop /* 41A0DC 802A534C 14400002 */ bnez $v0, .L802A5358_7ACCF8 /* 41A0E0 802A5350 01024021 */ addu $t0, $t0, $v0 /* 41A0E4 802A5354 0220402D */ daddu $t0, $s1, $zero .L802A5358_7ACCF8: /* 41A0E8 802A5358 26F50004 */ addiu $s5, $s7, 0x4 /* 41A0EC 802A535C 44951000 */ mtc1 $s5, $f2 /* 41A0F0 802A5360 00000000 */ nop /* 41A0F4 802A5364 468010A0 */ cvt.s.w $f2, $f2 /* 41A0F8 802A5368 26F50021 */ addiu $s5, $s7, 0x21 /* 41A0FC 802A536C 0000B02D */ daddu $s6, $zero, $zero /* 41A100 802A5370 02C0982D */ daddu $s3, $s6, $zero /* 41A104 802A5374 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 41A108 802A5378 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 41A10C 802A537C 8FA90048 */ lw $t1, 0x48($sp) /* 41A110 802A5380 8CC40000 */ lw $a0, 0x0($a2) /* 41A114 802A5384 3C03802B */ lui $v1, %hi(D_802AD60A) /* 41A118 802A5388 8063D60A */ lb $v1, %lo(D_802AD60A)($v1) /* 41A11C 802A538C 3C014080 */ lui $at, (0x40800000 >> 16) /* 41A120 802A5390 44812000 */ mtc1 $at, $f4 /* 41A124 802A5394 3C05802B */ lui $a1, %hi(D_802AD60C) /* 41A128 802A5398 24A5D60C */ addiu $a1, $a1, %lo(D_802AD60C) /* 41A12C 802A539C A4A80000 */ sh $t0, 0x0($a1) /* 41A130 802A53A0 25310012 */ addiu $s1, $t1, 0x12 /* 41A134 802A53A4 00031040 */ sll $v0, $v1, 1 /* 41A138 802A53A8 00431021 */ addu $v0, $v0, $v1 /* 41A13C 802A53AC 00021080 */ sll $v0, $v0, 2 /* 41A140 802A53B0 00431021 */ addu $v0, $v0, $v1 /* 41A144 802A53B4 24420001 */ addiu $v0, $v0, 0x1 /* 41A148 802A53B8 02224021 */ addu $t0, $s1, $v0 /* 41A14C 802A53BC 46041082 */ mul.s $f2, $f2, $f4 /* 41A150 802A53C0 00000000 */ nop /* 41A154 802A53C4 0080382D */ daddu $a3, $a0, $zero /* 41A158 802A53C8 24840008 */ addiu $a0, $a0, 0x8 /* 41A15C 802A53CC 44910000 */ mtc1 $s1, $f0 /* 41A160 802A53D0 00000000 */ nop /* 41A164 802A53D4 46800020 */ cvt.s.w $f0, $f0 /* 41A168 802A53D8 84A20000 */ lh $v0, 0x0($a1) /* 41A16C 802A53DC 46040002 */ mul.s $f0, $f0, $f4 /* 41A170 802A53E0 00000000 */ nop /* 41A174 802A53E4 ACC40000 */ sw $a0, 0x0($a2) /* 41A178 802A53E8 24420013 */ addiu $v0, $v0, 0x13 /* 41A17C 802A53EC 01228821 */ addu $s1, $t1, $v0 /* 41A180 802A53F0 26E2008E */ addiu $v0, $s7, 0x8E /* 41A184 802A53F4 4600118D */ trunc.w.s $f6, $f2 /* 41A188 802A53F8 44033000 */ mfc1 $v1, $f6 /* 41A18C 802A53FC 00000000 */ nop /* 41A190 802A5400 30630FFF */ andi $v1, $v1, 0xFFF /* 41A194 802A5404 00031B00 */ sll $v1, $v1, 12 /* 41A198 802A5408 4600018D */ trunc.w.s $f6, $f0 /* 41A19C 802A540C 44043000 */ mfc1 $a0, $f6 /* 41A1A0 802A5410 00000000 */ nop /* 41A1A4 802A5414 30840FFF */ andi $a0, $a0, 0xFFF /* 41A1A8 802A5418 44821000 */ mtc1 $v0, $f2 /* 41A1AC 802A541C 00000000 */ nop /* 41A1B0 802A5420 468010A0 */ cvt.s.w $f2, $f2 /* 41A1B4 802A5424 3C02ED00 */ lui $v0, (0xED000000 >> 16) /* 41A1B8 802A5428 46041082 */ mul.s $f2, $f2, $f4 /* 41A1BC 802A542C 00000000 */ nop /* 41A1C0 802A5430 00822025 */ or $a0, $a0, $v0 /* 41A1C4 802A5434 00641825 */ or $v1, $v1, $a0 /* 41A1C8 802A5438 44880000 */ mtc1 $t0, $f0 /* 41A1CC 802A543C 00000000 */ nop /* 41A1D0 802A5440 46800020 */ cvt.s.w $f0, $f0 /* 41A1D4 802A5444 3C04802B */ lui $a0, %hi(D_802AD66C) /* 41A1D8 802A5448 8C84D66C */ lw $a0, %lo(D_802AD66C)($a0) /* 41A1DC 802A544C 46040002 */ mul.s $f0, $f0, $f4 /* 41A1E0 802A5450 00000000 */ nop /* 41A1E4 802A5454 ACE30000 */ sw $v1, 0x0($a3) /* 41A1E8 802A5458 4600118D */ trunc.w.s $f6, $f2 /* 41A1EC 802A545C 44023000 */ mfc1 $v0, $f6 D_802A5460_7ACE00: /* 41A1F0 802A5460 00000000 */ nop /* 41A1F4 802A5464 30420FFF */ andi $v0, $v0, 0xFFF /* 41A1F8 802A5468 00021300 */ sll $v0, $v0, 12 /* 41A1FC 802A546C 4600018D */ trunc.w.s $f6, $f0 /* 41A200 802A5470 44033000 */ mfc1 $v1, $f6 /* 41A204 802A5474 00000000 */ nop /* 41A208 802A5478 30630FFF */ andi $v1, $v1, 0xFFF /* 41A20C 802A547C 00431025 */ or $v0, $v0, $v1 /* 41A210 802A5480 18800028 */ blez $a0, .L802A5524_7ACEC4 /* 41A214 802A5484 ACE20004 */ sw $v0, 0x4($a3) /* 41A218 802A5488 241E0001 */ addiu $fp, $zero, 0x1 /* 41A21C 802A548C 3C14802B */ lui $s4, %hi(D_802AD690) /* 41A220 802A5490 2694D690 */ addiu $s4, $s4, %lo(D_802AD690) /* 41A224 802A5494 3C12802B */ lui $s2, %hi(D_802AD678) /* 41A228 802A5498 2652D678 */ addiu $s2, $s2, %lo(D_802AD678) .L802A549C_7ACE3C: /* 41A22C 802A549C 24090005 */ addiu $t1, $zero, 0x5 /* 41A230 802A54A0 8E420000 */ lw $v0, 0x0($s2) /* 41A234 802A54A4 3C10802B */ lui $s0, %hi(D_802AD614) /* 41A238 802A54A8 8210D614 */ lb $s0, %lo(D_802AD614)($s0) /* 41A23C 802A54AC 14490005 */ bne $v0, $t1, .L802A54C4_7ACE64 /* 41A240 802A54B0 00000000 */ nop /* 41A244 802A54B4 0C03A752 */ jal is_ability_active /* 41A248 802A54B8 2404001A */ addiu $a0, $zero, 0x1A /* 41A24C 802A54BC 54400001 */ bnel $v0, $zero, .L802A54C4_7ACE64 /* 41A250 802A54C0 24100037 */ addiu $s0, $zero, 0x37 .L802A54C4_7ACE64: /* 41A254 802A54C4 8E820000 */ lw $v0, 0x0($s4) /* 41A258 802A54C8 14400002 */ bnez $v0, .L802A54D4_7ACE74 /* 41A25C 802A54CC 00161880 */ sll $v1, $s6, 2 /* 41A260 802A54D0 2410000B */ addiu $s0, $zero, 0xB .L802A54D4_7ACE74: /* 41A264 802A54D4 02A0282D */ daddu $a1, $s5, $zero D_802A54D8_7ACE78: /* 41A268 802A54D8 0220302D */ daddu $a2, $s1, $zero /* 41A26C 802A54DC 2631000D */ addiu $s1, $s1, 0xD /* 41A270 802A54E0 26520004 */ addiu $s2, $s2, 0x4 /* 41A274 802A54E4 26730001 */ addiu $s3, $s3, 0x1 /* 41A278 802A54E8 3C09802B */ lui $t1, %hi(D_802AD658) /* 41A27C 802A54EC 2529D658 */ addiu $t1, $t1, %lo(D_802AD658) /* 41A280 802A54F0 00691021 */ addu $v0, $v1, $t1 /* 41A284 802A54F4 AFB00010 */ sw $s0, 0x10($sp) /* 41A288 802A54F8 AFBE0014 */ sw $fp, 0x14($sp) /* 41A28C 802A54FC 8C440000 */ lw $a0, 0x0($v0) /* 41A290 802A5500 3C07802B */ lui $a3, %hi(D_802AD624) /* 41A294 802A5504 8CE7D624 */ lw $a3, %lo(D_802AD624)($a3) /* 41A298 802A5508 0C04993B */ jal draw_msg /* 41A29C 802A550C 26940004 */ addiu $s4, $s4, 0x4 /* 41A2A0 802A5510 3C02802B */ lui $v0, %hi(D_802AD66C) /* 41A2A4 802A5514 8C42D66C */ lw $v0, %lo(D_802AD66C)($v0) /* 41A2A8 802A5518 0262102A */ slt $v0, $s3, $v0 /* 41A2AC 802A551C 1440FFDF */ bnez $v0, .L802A549C_7ACE3C D_802A5520_7ACEC0: /* 41A2B0 802A5520 26D60001 */ addiu $s6, $s6, 0x1 .L802A5524_7ACEC4: /* 41A2B4 802A5524 26F50018 */ addiu $s5, $s7, 0x18 /* 41A2B8 802A5528 0000982D */ daddu $s3, $zero, $zero /* 41A2BC 802A552C 3C02802B */ lui $v0, %hi(D_802AD60C) D_802A5530_7ACED0: /* 41A2C0 802A5530 8442D60C */ lh $v0, %lo(D_802AD60C)($v0) /* 41A2C4 802A5534 8FA90048 */ lw $t1, 0x48($sp) /* 41A2C8 802A5538 3C03802B */ lui $v1, %hi(D_802AD66C) /* 41A2CC 802A553C 8C63D66C */ lw $v1, %lo(D_802AD66C)($v1) D_802A5540_7ACEE0: /* 41A2D0 802A5540 00491021 */ addu $v0, $v0, $t1 /* 41A2D4 802A5544 18600015 */ blez $v1, .L802A559C_7ACF3C /* 41A2D8 802A5548 24510018 */ addiu $s1, $v0, 0x18 /* 41A2DC 802A554C 3C12802B */ lui $s2, %hi(D_802AD628) /* 41A2E0 802A5550 2652D628 */ addiu $s2, $s2, %lo(D_802AD628) .L802A5554_7ACEF4: /* 41A2E4 802A5554 02A0282D */ daddu $a1, $s5, $zero /* 41A2E8 802A5558 0220302D */ daddu $a2, $s1, $zero /* 41A2EC 802A555C 2631000D */ addiu $s1, $s1, 0xD /* 41A2F0 802A5560 8E500000 */ lw $s0, 0x0($s2) /* 41A2F4 802A5564 26730001 */ addiu $s3, $s3, 0x1 /* 41A2F8 802A5568 0C051261 */ jal hud_element_set_render_pos /* 41A2FC 802A556C 0200202D */ daddu $a0, $s0, $zero /* 41A300 802A5570 3C05802B */ lui $a1, %hi(D_802AD624) /* 41A304 802A5574 8CA5D624 */ lw $a1, %lo(D_802AD624)($a1) /* 41A308 802A5578 0C0513AC */ jal hud_element_set_alpha /* 41A30C 802A557C 0200202D */ daddu $a0, $s0, $zero D_802A5580_7ACF20: /* 41A310 802A5580 0C0511F8 */ jal hud_element_draw_without_clipping /* 41A314 802A5584 0200202D */ daddu $a0, $s0, $zero /* 41A318 802A5588 3C02802B */ lui $v0, %hi(D_802AD66C) /* 41A31C 802A558C 8C42D66C */ lw $v0, %lo(D_802AD66C)($v0) /* 41A320 802A5590 0262102A */ slt $v0, $s3, $v0 /* 41A324 802A5594 1440FFEF */ bnez $v0, .L802A5554_7ACEF4 /* 41A328 802A5598 26520004 */ addiu $s2, $s2, 0x4 .L802A559C_7ACF3C: /* 41A32C 802A559C 3C03802B */ lui $v1, %hi(D_802AD605) /* 41A330 802A55A0 8063D605 */ lb $v1, %lo(D_802AD605)($v1) /* 41A334 802A55A4 3C02802B */ lui $v0, %hi(D_802AD608) /* 41A338 802A55A8 8042D608 */ lb $v0, %lo(D_802AD608)($v0) /* 41A33C 802A55AC 3C08802B */ lui $t0, %hi(D_802AD60E) /* 41A340 802A55B0 8508D60E */ lh $t0, %lo(D_802AD60E)($t0) /* 41A344 802A55B4 00621823 */ subu $v1, $v1, $v0 /* 41A348 802A55B8 00031040 */ sll $v0, $v1, 1 /* 41A34C 802A55BC 00431021 */ addu $v0, $v0, $v1 /* 41A350 802A55C0 00021080 */ sll $v0, $v0, 2 /* 41A354 802A55C4 00438821 */ addu $s1, $v0, $v1 /* 41A358 802A55C8 02281023 */ subu $v0, $s1, $t0 /* 41A35C 802A55CC 44820000 */ mtc1 $v0, $f0 /* 41A360 802A55D0 00000000 */ nop /* 41A364 802A55D4 46800021 */ cvt.d.w $f0, $f0 /* 41A368 802A55D8 4620018D */ trunc.w.d $f6, $f0 /* 41A36C 802A55DC 44023000 */ mfc1 $v0, $f6 /* 41A370 802A55E0 00000000 */ nop /* 41A374 802A55E4 10400003 */ beqz $v0, .L802A55F4_7ACF94 /* 41A378 802A55E8 26F5000A */ addiu $s5, $s7, 0xA /* 41A37C 802A55EC 080A957E */ j .L802A55F8_7ACF98 /* 41A380 802A55F0 01024021 */ addu $t0, $t0, $v0 .L802A55F4_7ACF94: /* 41A384 802A55F4 0220402D */ daddu $t0, $s1, $zero .L802A55F8_7ACF98: /* 41A388 802A55F8 02A0282D */ daddu $a1, $s5, $zero /* 41A38C 802A55FC 00083400 */ sll $a2, $t0, 16 /* 41A390 802A5600 00063403 */ sra $a2, $a2, 16 /* 41A394 802A5604 3C10802B */ lui $s0, %hi(D_802AD618) /* 41A398 802A5608 8E10D618 */ lw $s0, %lo(D_802AD618)($s0) /* 41A39C 802A560C 8FA90048 */ lw $t1, 0x48($sp) /* 41A3A0 802A5610 24C6001A */ addiu $a2, $a2, 0x1A /* 41A3A4 802A5614 3C01802B */ lui $at, %hi(D_802AD60E) /* 41A3A8 802A5618 A428D60E */ sh $t0, %lo(D_802AD60E)($at) /* 41A3AC 802A561C 01263021 */ addu $a2, $t1, $a2 /* 41A3B0 802A5620 0C051261 */ jal hud_element_set_render_pos /* 41A3B4 802A5624 0200202D */ daddu $a0, $s0, $zero /* 41A3B8 802A5628 3C11802B */ lui $s1, %hi(D_802AD624) /* 41A3BC 802A562C 2631D624 */ addiu $s1, $s1, %lo(D_802AD624) /* 41A3C0 802A5630 8E250000 */ lw $a1, 0x0($s1) /* 41A3C4 802A5634 0C0513AC */ jal hud_element_set_alpha /* 41A3C8 802A5638 0200202D */ daddu $a0, $s0, $zero /* 41A3CC 802A563C 0C0511EA */ jal hud_element_draw_clipped /* 41A3D0 802A5640 0200202D */ daddu $a0, $s0, $zero /* 41A3D4 802A5644 3C02802B */ lui $v0, %hi(D_802AD608) /* 41A3D8 802A5648 8042D608 */ lb $v0, %lo(D_802AD608)($v0) /* 41A3DC 802A564C 1840000C */ blez $v0, .L802A5680_7AD020 /* 41A3E0 802A5650 26E50043 */ addiu $a1, $s7, 0x43 /* 41A3E4 802A5654 8FA90048 */ lw $t1, 0x48($sp) /* 41A3E8 802A5658 3C10802B */ lui $s0, %hi(GreenArrowUpID) /* 41A3EC 802A565C 8E10D61C */ lw $s0, %lo(GreenArrowUpID)($s0) /* 41A3F0 802A5660 25260010 */ addiu $a2, $t1, 0x10 /* 41A3F4 802A5664 0C051261 */ jal hud_element_set_render_pos /* 41A3F8 802A5668 0200202D */ daddu $a0, $s0, $zero /* 41A3FC 802A566C 8E250000 */ lw $a1, 0x0($s1) /* 41A400 802A5670 0C0513AC */ jal hud_element_set_alpha /* 41A404 802A5674 0200202D */ daddu $a0, $s0, $zero /* 41A408 802A5678 0C0511EA */ jal hud_element_draw_clipped /* 41A40C 802A567C 0200202D */ daddu $a0, $s0, $zero .L802A5680_7AD020: /* 41A410 802A5680 3C02802B */ lui $v0, %hi(D_802AD609) /* 41A414 802A5684 8042D609 */ lb $v0, %lo(D_802AD609)($v0) /* 41A418 802A5688 3C03802B */ lui $v1, %hi(D_802AD66C) /* 41A41C 802A568C 8C63D66C */ lw $v1, %lo(D_802AD66C)($v1) /* 41A420 802A5690 0043102A */ slt $v0, $v0, $v1 /* 41A424 802A5694 1040000C */ beqz $v0, .L802A56C8_7AD068 /* 41A428 802A5698 26E50043 */ addiu $a1, $s7, 0x43 /* 41A42C 802A569C 8FA90048 */ lw $t1, 0x48($sp) /* 41A430 802A56A0 3C10802B */ lui $s0, %hi(GreenArrowDownID) /* 41A434 802A56A4 8E10D620 */ lw $s0, %lo(GreenArrowDownID)($s0) /* 41A438 802A56A8 25260064 */ addiu $a2, $t1, 0x64 /* 41A43C 802A56AC 0C051261 */ jal hud_element_set_render_pos /* 41A440 802A56B0 0200202D */ daddu $a0, $s0, $zero /* 41A444 802A56B4 8E250000 */ lw $a1, 0x0($s1) /* 41A448 802A56B8 0C0513AC */ jal hud_element_set_alpha /* 41A44C 802A56BC 0200202D */ daddu $a0, $s0, $zero /* 41A450 802A56C0 0C0511EA */ jal hud_element_draw_clipped /* 41A454 802A56C4 0200202D */ daddu $a0, $s0, $zero glabel .L802A56C8_7AD068 /* 41A458 802A56C8 8FBF003C */ lw $ra, 0x3C($sp) /* 41A45C 802A56CC 8FBE0038 */ lw $fp, 0x38($sp) /* 41A460 802A56D0 8FB70034 */ lw $s7, 0x34($sp) /* 41A464 802A56D4 8FB60030 */ lw $s6, 0x30($sp) /* 41A468 802A56D8 8FB5002C */ lw $s5, 0x2C($sp) /* 41A46C 802A56DC 8FB40028 */ lw $s4, 0x28($sp) /* 41A470 802A56E0 8FB30024 */ lw $s3, 0x24($sp) /* 41A474 802A56E4 8FB20020 */ lw $s2, 0x20($sp) /* 41A478 802A56E8 8FB1001C */ lw $s1, 0x1C($sp) /* 41A47C 802A56EC 8FB00018 */ lw $s0, 0x18($sp) /* 41A480 802A56F0 03E00008 */ jr $ra /* 41A484 802A56F4 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void func_802A5290(void* data, s32 x, s32 y) { s32 var_t0; s32 temp_f6; s32 xPos, yPos; s32 idx; s32 id; s32 i; switch (BattleSubmenuStratsState) { case -1: case 1: case 10: case 20: case 30: case 40: case 41: yPos = -D_802AD608 * 13; var_t0 = D_802AD60C; temp_f6 = (yPos - var_t0) * 0.5; if (temp_f6 != 0) { var_t0 += temp_f6; } else { var_t0 = yPos; } D_802AD60C = var_t0; xPos = x + 4; yPos = y + 18; var_t0 = yPos + 1 + (D_802AD60A * 13); gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, xPos, yPos, x + 142, var_t0); xPos = x + 33; yPos = y + 19 + D_802AD60C; idx = 0; for (i = 0; i < D_802AD66C; i++, idx++) { s32 palette = D_802AD614; if (D_802AD678[i] == 5 && is_ability_active(ABILITY_QUICK_CHANGE)) { palette = MSG_PAL_37; } if (D_802AD690[idx] == 0) { palette = MSG_PAL_0B; } draw_msg(D_802AD658[idx], xPos, yPos, D_802AD624, palette, DRAW_MSG_STYLE_MENU); yPos += 13; } xPos = x + 24; yPos = D_802AD60C + y + 24; idx = 0; for (i = 0; i < D_802AD66C; i++, idx++) { id = D_802AD628[idx]; hud_element_set_render_pos(id, xPos, yPos); hud_element_set_alpha(id, D_802AD624); hud_element_draw_without_clipping(id); yPos += 13; } yPos = (D_802AD605 - D_802AD608) * 13; var_t0 = D_802AD60E; temp_f6 = (yPos - var_t0) * 1.0; xPos = x + 10; if (temp_f6 != 0) { var_t0 += temp_f6; } else { var_t0 = yPos; } D_802AD60E = var_t0; yPos = y + 26 + D_802AD60E; id = D_802AD618; hud_element_set_render_pos(id, xPos, yPos); hud_element_set_alpha(id, D_802AD624); hud_element_draw_clipped(id); if (D_802AD608 > 0) { id = GreenArrowUpID; hud_element_set_render_pos(id, x + 67, y + 16); hud_element_set_alpha(id, D_802AD624); hud_element_draw_clipped(id); } if (D_802AD609 < D_802AD66C) { id = GreenArrowDownID; hud_element_set_render_pos(id, x + 67, y + 100); hud_element_set_alpha(id, D_802AD624); hud_element_draw_clipped(id); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel D_80254C50 /* 183530 80254C50 27BDFCE8 */ addiu $sp, $sp, -0x318 /* 183534 80254C54 AFBF02E4 */ sw $ra, 0x2E4($sp) /* 183538 80254C58 AFBE02E0 */ sw $fp, 0x2E0($sp) /* 18353C 80254C5C AFB702DC */ sw $s7, 0x2DC($sp) /* 183540 80254C60 AFB602D8 */ sw $s6, 0x2D8($sp) /* 183544 80254C64 AFB502D4 */ sw $s5, 0x2D4($sp) /* 183548 80254C68 AFB402D0 */ sw $s4, 0x2D0($sp) /* 18354C 80254C6C AFB302CC */ sw $s3, 0x2CC($sp) /* 183550 80254C70 AFB202C8 */ sw $s2, 0x2C8($sp) /* 183554 80254C74 AFB102C4 */ sw $s1, 0x2C4($sp) /* 183558 80254C78 AFB002C0 */ sw $s0, 0x2C0($sp) /* 18355C 80254C7C F7BE0310 */ sdc1 $f30, 0x310($sp) /* 183560 80254C80 F7BC0308 */ sdc1 $f28, 0x308($sp) /* 183564 80254C84 F7BA0300 */ sdc1 $f26, 0x300($sp) /* 183568 80254C88 F7B802F8 */ sdc1 $f24, 0x2F8($sp) /* 18356C 80254C8C F7B602F0 */ sdc1 $f22, 0x2F0($sp) /* 183570 80254C90 F7B402E8 */ sdc1 $f20, 0x2E8($sp) /* 183574 80254C94 AFA40318 */ sw $a0, 0x318($sp) /* 183578 80254C98 8C9201F4 */ lw $s2, 0x1F4($a0) /* 18357C 80254C9C 8E5700C0 */ lw $s7, 0xC0($s2) /* 183580 80254CA0 82E208AC */ lb $v0, 0x8AC($s7) /* 183584 80254CA4 92E308AC */ lbu $v1, 0x8AC($s7) /* 183588 80254CA8 1040000B */ beqz $v0, .L80254CD8 /* 18358C 80254CAC 2462FFFF */ addiu $v0, $v1, -0x1 /* 183590 80254CB0 A2E208AC */ sb $v0, 0x8AC($s7) /* 183594 80254CB4 00021600 */ sll $v0, $v0, 24 /* 183598 80254CB8 14400007 */ bnez $v0, .L80254CD8 /* 18359C 80254CBC 3C03EFFF */ lui $v1, (0xEFFFFFFF >> 16) /* 1835A0 80254CC0 8FA80318 */ lw $t0, 0x318($sp) /* 1835A4 80254CC4 8D020000 */ lw $v0, 0x0($t0) /* 1835A8 80254CC8 3463FFFF */ ori $v1, $v1, (0xEFFFFFFF & 0xFFFF) /* 1835AC 80254CCC 00431024 */ and $v0, $v0, $v1 /* 1835B0 80254CD0 0809541D */ j .L80255074 /* 1835B4 80254CD4 AD020000 */ sw $v0, 0x0($t0) .L80254CD8: /* 1835B8 80254CD8 8E420000 */ lw $v0, 0x0($s2) /* 1835BC 80254CDC 30420001 */ andi $v0, $v0, 0x1 /* 1835C0 80254CE0 144000E4 */ bnez $v0, .L80255074 /* 1835C4 80254CE4 00000000 */ nop /* 1835C8 80254CE8 8E420094 */ lw $v0, 0x94($s2) /* 1835CC 80254CEC 104000E1 */ beqz $v0, .L80255074 /* 1835D0 80254CF0 27A801D8 */ addiu $t0, $sp, 0x1D8 /* 1835D4 80254CF4 AFA802A4 */ sw $t0, 0x2A4($sp) /* 1835D8 80254CF8 27A80158 */ addiu $t0, $sp, 0x158 /* 1835DC 80254CFC AFA802A8 */ sw $t0, 0x2A8($sp) /* 1835E0 80254D00 27A80198 */ addiu $t0, $sp, 0x198 /* 1835E4 80254D04 AFA802AC */ sw $t0, 0x2AC($sp) /* 1835E8 80254D08 27A80058 */ addiu $t0, $sp, 0x58 /* 1835EC 80254D0C AFA802B0 */ sw $t0, 0x2B0($sp) /* 1835F0 80254D10 27A80098 */ addiu $t0, $sp, 0x98 /* 1835F4 80254D14 27B50218 */ addiu $s5, $sp, 0x218 /* 1835F8 80254D18 AFA802B4 */ sw $t0, 0x2B4($sp) /* 1835FC 80254D1C 27A800D8 */ addiu $t0, $sp, 0xD8 /* 183600 80254D20 AFA802B8 */ sw $t0, 0x2B8($sp) /* 183604 80254D24 27A80118 */ addiu $t0, $sp, 0x118 /* 183608 80254D28 27BE0258 */ addiu $fp, $sp, 0x258 /* 18360C 80254D2C AFA00298 */ sw $zero, 0x298($sp) /* 183610 80254D30 AFA0029C */ sw $zero, 0x29C($sp) /* 183614 80254D34 AFA802BC */ sw $t0, 0x2BC($sp) /* 183618 80254D38 82F307D9 */ lb $s3, 0x7D9($s7) /* 18361C 80254D3C 4480A000 */ mtc1 $zero, $f20 /* 183620 80254D40 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 183624 80254D44 4481F000 */ mtc1 $at, $f30 /* 183628 80254D48 3C01802A */ lui $at, %hi(D_8029D350) /* 18362C 80254D4C D43CD350 */ ldc1 $f28, %lo(D_8029D350)($at) .L80254D50: /* 183630 80254D50 8FA80298 */ lw $t0, 0x298($sp) /* 183634 80254D54 2673FFFF */ addiu $s3, $s3, -0x1 .L80254D58: /* 183638 80254D58 25080001 */ addiu $t0, $t0, 0x1 /* 18363C 80254D5C 06610002 */ bgez $s3, nok_02_D_80254D68 /* 183640 80254D60 AFA80298 */ sw $t0, 0x298($sp) /* 183644 80254D64 2413000F */ addiu $s3, $zero, 0xF nok_02_D_80254D68: /* 183648 80254D68 82E207D9 */ lb $v0, 0x7D9($s7) /* 18364C 80254D6C 126200C1 */ beq $s3, $v0, .L80255074 /* 183650 80254D70 00000000 */ nop /* 183654 80254D74 8FA80298 */ lw $t0, 0x298($sp) /* 183658 80254D78 29020003 */ slti $v0, $t0, 0x3 /* 18365C 80254D7C 5440FFF6 */ bnel $v0, $zero, .L80254D58 /* 183660 80254D80 2673FFFF */ addiu $s3, $s3, -0x1 /* 183664 80254D84 8FA8029C */ lw $t0, 0x29C($sp) /* 183668 80254D88 AFA00298 */ sw $zero, 0x298($sp) /* 18366C 80254D8C 82E207DA */ lb $v0, 0x7DA($s7) /* 183670 80254D90 25080001 */ addiu $t0, $t0, 0x1 /* 183674 80254D94 0048102A */ slt $v0, $v0, $t0 /* 183678 80254D98 144000B6 */ bnez $v0, .L80255074 /* 18367C 80254D9C AFA8029C */ sw $t0, 0x29C($sp) /* 183680 80254DA0 24160078 */ addiu $s6, $zero, 0x78 /* 183684 80254DA4 00132840 */ sll $a1, $s3, 1 /* 183688 80254DA8 02E52821 */ addu $a1, $s7, $a1 /* 18368C 80254DAC 02F32021 */ addu $a0, $s7, $s3 /* 183690 80254DB0 84A207FC */ lh $v0, 0x7FC($a1) /* 183694 80254DB4 84A3081C */ lh $v1, 0x81C($a1) /* 183698 80254DB8 44821000 */ mtc1 $v0, $f2 /* 18369C 80254DBC 00000000 */ nop /* 1836A0 80254DC0 468010A0 */ cvt.s.w $f2, $f2 /* 1836A4 80254DC4 44832000 */ mtc1 $v1, $f4 /* 1836A8 80254DC8 00000000 */ nop /* 1836AC 80254DCC 46802120 */ cvt.s.w $f4, $f4 /* 1836B0 80254DD0 84A3083C */ lh $v1, 0x83C($a1) /* 1836B4 80254DD4 9082087C */ lbu $v0, 0x87C($a0) /* 1836B8 80254DD8 84A507DC */ lh $a1, 0x7DC($a1) /* 1836BC 80254DDC 44830000 */ mtc1 $v1, $f0 /* 1836C0 80254DE0 00000000 */ nop /* 1836C4 80254DE4 46800020 */ cvt.s.w $f0, $f0 /* 1836C8 80254DE8 00021040 */ sll $v0, $v0, 1 /* 1836CC 80254DEC 4482B000 */ mtc1 $v0, $f22 /* 1836D0 80254DF0 00000000 */ nop /* 1836D4 80254DF4 4680B5A0 */ cvt.s.w $f22, $f22 /* 1836D8 80254DF8 9083088C */ lbu $v1, 0x88C($a0) /* 1836DC 80254DFC 9082089C */ lbu $v0, 0x89C($a0) /* 1836E0 80254E00 00031840 */ sll $v1, $v1, 1 /* 1836E4 80254E04 4483C000 */ mtc1 $v1, $f24 /* 1836E8 80254E08 00000000 */ nop /* 1836EC 80254E0C 4680C620 */ cvt.s.w $f24, $f24 /* 1836F0 80254E10 00021040 */ sll $v0, $v0, 1 /* 1836F4 80254E14 86430098 */ lh $v1, 0x98($s2) /* 1836F8 80254E18 4482D000 */ mtc1 $v0, $f26 /* 1836FC 80254E1C 00000000 */ nop /* 183700 80254E20 4680D6A0 */ cvt.s.w $f26, $f26 /* 183704 80254E24 AFA502A0 */ sw $a1, 0x2A0($sp) /* 183708 80254E28 8090085C */ lb $s0, 0x85C($a0) /* 18370C 80254E2C 8091086C */ lb $s1, 0x86C($a0) /* 183710 80254E30 28620032 */ slti $v0, $v1, 0x32 /* 183714 80254E34 10400004 */ beqz $v0, .L80254E48 /* 183718 80254E38 24140014 */ addiu $s4, $zero, 0x14 /* 18371C 80254E3C 24160032 */ addiu $s6, $zero, 0x32 /* 183720 80254E40 0809539C */ j .L80254E70 /* 183724 80254E44 24140008 */ addiu $s4, $zero, 0x8 .L80254E48: /* 183728 80254E48 28620064 */ slti $v0, $v1, 0x64 /* 18372C 80254E4C 10400004 */ beqz $v0, .L80254E60 /* 183730 80254E50 28620096 */ slti $v0, $v1, 0x96 /* 183734 80254E54 24160046 */ addiu $s6, $zero, 0x46 /* 183738 80254E58 0809539C */ j .L80254E70 /* 18373C 80254E5C 2414000A */ addiu $s4, $zero, 0xA .L80254E60: /* 183740 80254E60 10400003 */ beqz $v0, .L80254E70 /* 183744 80254E64 00000000 */ nop /* 183748 80254E68 24160064 */ addiu $s6, $zero, 0x64 /* 18374C 80254E6C 2414000F */ addiu $s4, $zero, 0xF .L80254E70: /* 183750 80254E70 44051000 */ mfc1 $a1, $f2 /* 183754 80254E74 44062000 */ mfc1 $a2, $f4 /* 183758 80254E78 44070000 */ mfc1 $a3, $f0 /* 18375C 80254E7C 0C019E40 */ jal guTranslateF /* 183760 80254E80 8FA402A4 */ lw $a0, 0x2A4($sp) /* 183764 80254E84 00101023 */ negu $v0, $s0 /* 183768 80254E88 44824000 */ mtc1 $v0, $f8 /* 18376C 80254E8C 00000000 */ nop /* 183770 80254E90 46804220 */ cvt.s.w $f8, $f8 /* 183774 80254E94 00111023 */ negu $v0, $s1 /* 183778 80254E98 44054000 */ mfc1 $a1, $f8 /* 18377C 80254E9C 44824000 */ mtc1 $v0, $f8 /* 183780 80254EA0 00000000 */ nop /* 183784 80254EA4 46804220 */ cvt.s.w $f8, $f8 /* 183788 80254EA8 8FA402A8 */ lw $a0, 0x2A8($sp) /* 18378C 80254EAC 4407A000 */ mfc1 $a3, $f20 /* 183790 80254EB0 44064000 */ mfc1 $a2, $f8 /* 183794 80254EB4 0C019E40 */ jal guTranslateF /* 183798 80254EB8 00000000 */ nop /* 18379C 80254EBC 44904000 */ mtc1 $s0, $f8 /* 1837A0 80254EC0 00000000 */ nop /* 1837A4 80254EC4 46804220 */ cvt.s.w $f8, $f8 /* 1837A8 80254EC8 44054000 */ mfc1 $a1, $f8 /* 1837AC 80254ECC 44914000 */ mtc1 $s1, $f8 /* 1837B0 80254ED0 00000000 */ nop /* 1837B4 80254ED4 46804220 */ cvt.s.w $f8, $f8 /* 1837B8 80254ED8 8FA402AC */ lw $a0, 0x2AC($sp) /* 1837BC 80254EDC 4407A000 */ mfc1 $a3, $f20 /* 1837C0 80254EE0 44064000 */ mfc1 $a2, $f8 /* 1837C4 80254EE4 0C019E40 */ jal guTranslateF /* 1837C8 80254EE8 00000000 */ nop /* 1837CC 80254EEC 4405B000 */ mfc1 $a1, $f22 /* 1837D0 80254EF0 4406F000 */ mfc1 $a2, $f30 /* 1837D4 80254EF4 4407A000 */ mfc1 $a3, $f20 /* 1837D8 80254EF8 27A40018 */ addiu $a0, $sp, 0x18 /* 1837DC 80254EFC 0C019EC8 */ jal guRotateF /* 1837E0 80254F00 E7B40010 */ swc1 $f20, 0x10($sp) /* 1837E4 80254F04 4405C000 */ mfc1 $a1, $f24 /* 1837E8 80254F08 4406A000 */ mfc1 $a2, $f20 /* 1837EC 80254F0C 4407F000 */ mfc1 $a3, $f30 /* 1837F0 80254F10 8FA402B0 */ lw $a0, 0x2B0($sp) /* 1837F4 80254F14 0C019EC8 */ jal guRotateF /* 1837F8 80254F18 E7B40010 */ swc1 $f20, 0x10($sp) /* 1837FC 80254F1C 4405D000 */ mfc1 $a1, $f26 /* 183800 80254F20 4406A000 */ mfc1 $a2, $f20 /* 183804 80254F24 4407A000 */ mfc1 $a3, $f20 /* 183808 80254F28 8FA402B4 */ lw $a0, 0x2B4($sp) /* 18380C 80254F2C 0C019EC8 */ jal guRotateF /* 183810 80254F30 E7BE0010 */ swc1 $f30, 0x10($sp) /* 183814 80254F34 27A40018 */ addiu $a0, $sp, 0x18 /* 183818 80254F38 8FA502B0 */ lw $a1, 0x2B0($sp) /* 18381C 80254F3C 0C019D80 */ jal guMtxCatF /* 183820 80254F40 02A0302D */ daddu $a2, $s5, $zero /* 183824 80254F44 8FA502B4 */ lw $a1, 0x2B4($sp) /* 183828 80254F48 8FA602B8 */ lw $a2, 0x2B8($sp) /* 18382C 80254F4C 0C019D80 */ jal guMtxCatF /* 183830 80254F50 02A0202D */ daddu $a0, $s5, $zero /* 183834 80254F54 8FA80318 */ lw $t0, 0x318($sp) /* 183838 80254F58 C5060170 */ lwc1 $f6, 0x170($t0) /* 18383C 80254F5C 460031A1 */ cvt.d.s $f6, $f6 /* 183840 80254F60 463C3182 */ mul.d $f6, $f6, $f28 /* 183844 80254F64 00000000 */ nop /* 183848 80254F68 C5040174 */ lwc1 $f4, 0x174($t0) /* 18384C 80254F6C 46002121 */ cvt.d.s $f4, $f4 /* 183850 80254F70 463C2102 */ mul.d $f4, $f4, $f28 /* 183854 80254F74 00000000 */ nop /* 183858 80254F78 C5020178 */ lwc1 $f2, 0x178($t0) /* 18385C 80254F7C 460010A1 */ cvt.d.s $f2, $f2 /* 183860 80254F80 463C1082 */ mul.d $f2, $f2, $f28 /* 183864 80254F84 00000000 */ nop /* 183868 80254F88 C5000188 */ lwc1 $f0, 0x188($t0) /* 18386C 80254F8C 46000021 */ cvt.d.s $f0, $f0 /* 183870 80254F90 46203182 */ mul.d $f6, $f6, $f0 /* 183874 80254F94 00000000 */ nop /* 183878 80254F98 46202102 */ mul.d $f4, $f4, $f0 /* 18387C 80254F9C 00000000 */ nop /* 183880 80254FA0 82420074 */ lb $v0, 0x74($s2) /* 183884 80254FA4 44820000 */ mtc1 $v0, $f0 /* 183888 80254FA8 00000000 */ nop /* 18388C 80254FAC 46800021 */ cvt.d.w $f0, $f0 /* 183890 80254FB0 46202102 */ mul.d $f4, $f4, $f0 /* 183894 80254FB4 00000000 */ nop /* 183898 80254FB8 8FA402BC */ lw $a0, 0x2BC($sp) /* 18389C 80254FBC 462010A0 */ cvt.s.d $f2, $f2 /* 1838A0 80254FC0 44071000 */ mfc1 $a3, $f2 /* 1838A4 80254FC4 462031A0 */ cvt.s.d $f6, $f6 /* 1838A8 80254FC8 44053000 */ mfc1 $a1, $f6 /* 1838AC 80254FCC 46202120 */ cvt.s.d $f4, $f4 D_80254FD0: /* 1838B0 80254FD0 44062000 */ mfc1 $a2, $f4 /* 1838B4 80254FD4 0C019DF0 */ jal guScaleF /* 1838B8 80254FD8 00000000 */ nop /* 1838BC 80254FDC 8FA402BC */ lw $a0, 0x2BC($sp) /* 1838C0 80254FE0 8FA502A8 */ lw $a1, 0x2A8($sp) /* 1838C4 80254FE4 0C019D80 */ jal guMtxCatF /* 1838C8 80254FE8 03C0302D */ daddu $a2, $fp, $zero /* 1838CC 80254FEC 03C0202D */ daddu $a0, $fp, $zero /* 1838D0 80254FF0 8FA502B8 */ lw $a1, 0x2B8($sp) /* 1838D4 80254FF4 0C019D80 */ jal guMtxCatF /* 1838D8 80254FF8 02A0302D */ daddu $a2, $s5, $zero /* 1838DC 80254FFC 02A0202D */ daddu $a0, $s5, $zero /* 1838E0 80255000 8FA502AC */ lw $a1, 0x2AC($sp) /* 1838E4 80255004 0C019D80 */ jal guMtxCatF /* 1838E8 80255008 03C0302D */ daddu $a2, $fp, $zero /* 1838EC 8025500C 03C0202D */ daddu $a0, $fp, $zero /* 1838F0 80255010 8FA502A4 */ lw $a1, 0x2A4($sp) /* 1838F4 80255014 0C019D80 */ jal guMtxCatF /* 1838F8 80255018 02A0302D */ daddu $a2, $s5, $zero /* 1838FC 8025501C 8FA8029C */ lw $t0, 0x29C($sp) /* 183900 80255020 01140018 */ mult $t0, $s4 /* 183904 80255024 86500098 */ lh $s0, 0x98($s2) /* 183908 80255028 00004012 */ mflo $t0 /* 18390C 8025502C 02C81023 */ subu $v0, $s6, $t0 /* 183910 80255030 A6420098 */ sh $v0, 0x98($s2) /* 183914 80255034 8FA802A0 */ lw $t0, 0x2A0($sp) /* 183918 80255038 250200B4 */ addiu $v0, $t0, 0xB4 /* 18391C 8025503C 44826000 */ mtc1 $v0, $f12 /* 183920 80255040 00000000 */ nop /* 183924 80255044 0C00A6C9 */ jal clamp_angle /* 183928 80255048 46806320 */ cvt.s.w $f12, $f12 /* 18392C 8025504C 0000202D */ daddu $a0, $zero, $zero /* 183930 80255050 0240282D */ daddu $a1, $s2, $zero /* 183934 80255054 4600020D */ trunc.w.s $f8, $f0 /* 183938 80255058 44064000 */ mfc1 $a2, $f8 /* 18393C 8025505C 02A0382D */ daddu $a3, $s5, $zero /* 183940 80255060 24020001 */ addiu $v0, $zero, 0x1 /* 183944 80255064 0C09647B */ jal func_802591EC /* 183948 80255068 AFA20010 */ sw $v0, 0x10($sp) /* 18394C 8025506C 08095354 */ j .L80254D50 /* 183950 80255070 A6500098 */ sh $s0, 0x98($s2) .L80255074: /* 183954 80255074 8FBF02E4 */ lw $ra, 0x2E4($sp) /* 183958 80255078 8FBE02E0 */ lw $fp, 0x2E0($sp) /* 18395C 8025507C 8FB702DC */ lw $s7, 0x2DC($sp) /* 183960 80255080 8FB602D8 */ lw $s6, 0x2D8($sp) /* 183964 80255084 8FB502D4 */ lw $s5, 0x2D4($sp) /* 183968 80255088 8FB402D0 */ lw $s4, 0x2D0($sp) /* 18396C 8025508C 8FB302CC */ lw $s3, 0x2CC($sp) /* 183970 80255090 8FB202C8 */ lw $s2, 0x2C8($sp) /* 183974 80255094 8FB102C4 */ lw $s1, 0x2C4($sp) /* 183978 80255098 8FB002C0 */ lw $s0, 0x2C0($sp) /* 18397C 8025509C D7BE0310 */ ldc1 $f30, 0x310($sp) /* 183980 802550A0 D7BC0308 */ ldc1 $f28, 0x308($sp) /* 183984 802550A4 D7BA0300 */ ldc1 $f26, 0x300($sp) /* 183988 802550A8 D7B802F8 */ ldc1 $f24, 0x2F8($sp) /* 18398C 802550AC D7B602F0 */ ldc1 $f22, 0x2F0($sp) /* 183990 802550B0 D7B402E8 */ ldc1 $f20, 0x2E8($sp) /* 183994 802550B4 03E00008 */ jr $ra /* 183998 802550B8 27BD0318 */ addiu $sp, $sp, 0x318 ### DECOMPILED C INSTRUCTIONS: void appendGfx_player_actor_blur(Actor* actor) { Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation; Matrix4f mtxScale; Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate; Matrix4f mtxTransform, mtxTemp; s32 delay; s32 num; s32 yaw; ActorPart* partTable; DecorationTable* decorationTable; f32 rotX, rotY, rotZ; s32 prevOpacity; s32 temp_v1; s32 pivotOffsetX; s32 pivotOffsetY; s32 bufPos; s32 newOpacityBase; s32 newOpacityModulus; f32 x, y, z; partTable = actor->partsTable; decorationTable = partTable->decorationTable; if (decorationTable->effectType != 0) { decorationTable->effectType--; if (decorationTable->effectType == 0) { actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED; return; } } if (!(partTable->flags & ACTOR_PART_FLAG_INVISIBLE) && partTable->idleAnimations != NULL) { delay = 0; num = 0; bufPos = decorationTable->unk_7D9; while (1) { bufPos--; delay++; if (bufPos < 0) { bufPos = ARRAY_COUNT(decorationTable->posX) - 1; } if (bufPos == decorationTable->unk_7D9) { break; } if (delay >= 3) { delay = 0; num++; if (decorationTable->unk_7DA < num) { break; } temp_v1 = partTable->opacity; x = decorationTable->posX[bufPos]; y = decorationTable->posY[bufPos]; z = decorationTable->posZ[bufPos]; yaw = decorationTable->yaw[bufPos]; pivotOffsetX = decorationTable->rotationPivotOffsetX[bufPos]; pivotOffsetY = decorationTable->rotationPivotOffsetY[bufPos]; rotX = decorationTable->rotX[bufPos] * 2; rotY = decorationTable->rotY[bufPos] * 2; rotZ = decorationTable->rotZ[bufPos] * 2; newOpacityBase = 120; newOpacityModulus = 20; if (temp_v1 < 50) { newOpacityBase = 50; newOpacityModulus = 8; } else if (temp_v1 < 100) { newOpacityBase = 70; newOpacityModulus = 10; } else if (temp_v1 < 150) { newOpacityBase = 100; newOpacityModulus = 15; } guTranslateF(mtxTranslate, x, y, z); guTranslateF(mtxPivotOn, -pivotOffsetX, -pivotOffsetY, 0.0f); guTranslateF(mtxPivotOff, pivotOffsetX, pivotOffsetY, 0.0f); guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f); guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f); guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f); guMtxCatF(mtxRotX, mtxRotY, mtxTransform); guMtxCatF(mtxTransform, mtxRotZ, mtxRotation); guScaleF(mtxScale, actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor, actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor * partTable->verticalStretch, actor->scale.z * SPRITE_WORLD_SCALE_D); guMtxCatF(mtxScale, mtxPivotOn, mtxTemp); guMtxCatF(mtxTemp, mtxRotation, mtxTransform); guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp); guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); prevOpacity = partTable->opacity; partTable->opacity = newOpacityBase - (num * newOpacityModulus); render_with_adjusted_palettes(SPRITE_MODE_PLAYER, partTable, clamp_angle(yaw + 180), mtxTransform, 1); partTable->opacity = prevOpacity; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel hud_element_load_script /* D5A50 8013F350 27BDFFD0 */ addiu $sp, $sp, -0x30 /* D5A54 8013F354 AFB50024 */ sw $s5, 0x24($sp) /* D5A58 8013F358 0080A82D */ daddu $s5, $a0, $zero /* D5A5C 8013F35C AFB00010 */ sw $s0, 0x10($sp) /* D5A60 8013F360 00A0802D */ daddu $s0, $a1, $zero /* D5A64 8013F364 AFBF002C */ sw $ra, 0x2C($sp) /* D5A68 8013F368 AFB60028 */ sw $s6, 0x28($sp) /* D5A6C 8013F36C AFB40020 */ sw $s4, 0x20($sp) /* D5A70 8013F370 AFB3001C */ sw $s3, 0x1C($sp) /* D5A74 8013F374 AFB20018 */ sw $s2, 0x18($sp) /* D5A78 8013F378 120000D8 */ beqz $s0, .L8013F6DC /* D5A7C 8013F37C AFB10014 */ sw $s1, 0x14($sp) /* D5A80 8013F380 0000982D */ daddu $s3, $zero, $zero /* D5A84 8013F384 3C168015 */ lui $s6, %hi(gHudElementSizes) /* D5A88 8013F388 26D6EFCC */ addiu $s6, $s6, %lo(gHudElementSizes) glabel .L8013F38C /* D5A8C 8013F38C 8E030000 */ lw $v1, 0x0($s0) /* D5A90 8013F390 2C62001C */ sltiu $v0, $v1, 0x1C /* D5A94 8013F394 1040FFFD */ beqz $v0, .L8013F38C /* D5A98 8013F398 26100004 */ addiu $s0, $s0, 0x4 /* D5A9C 8013F39C 00031080 */ sll $v0, $v1, 2 /* D5AA0 8013F3A0 3C018015 */ lui $at, %hi(jtbl_80151140) /* D5AA4 8013F3A4 00220821 */ addu $at, $at, $v0 /* D5AA8 8013F3A8 8C221140 */ lw $v0, %lo(jtbl_80151140)($at) /* D5AAC 8013F3AC 00400008 */ jr $v0 /* D5AB0 8013F3B0 00000000 */ nop glabel .L8013F3B4 /* D5AB4 8013F3B4 0804FCE3 */ j .L8013F38C /* D5AB8 8013F3B8 2610000C */ addiu $s0, $s0, 0xC glabel .L8013F3BC /* D5ABC 8013F3BC 8E130000 */ lw $s3, 0x0($s0) /* D5AC0 8013F3C0 0804FCF4 */ j .L8013F3D0 /* D5AC4 8013F3C4 26100004 */ addiu $s0, $s0, 0x4 glabel .L8013F3C8 /* D5AC8 8013F3C8 8E130000 */ lw $s3, 0x0($s0) /* D5ACC 8013F3CC 26100008 */ addiu $s0, $s0, 0x8 .L8013F3D0: /* D5AD0 8013F3D0 A2B30046 */ sb $s3, 0x46($s5) /* D5AD4 8013F3D4 0804FCE3 */ j .L8013F38C /* D5AD8 8013F3D8 A2B30045 */ sb $s3, 0x45($s5) glabel .L8013F3DC /* D5ADC 8013F3DC 92020003 */ lbu $v0, 0x3($s0) /* D5AE0 8013F3E0 26100004 */ addiu $s0, $s0, 0x4 /* D5AE4 8013F3E4 3C030010 */ lui $v1, (0x100000 >> 16) /* D5AE8 8013F3E8 A2A2004E */ sb $v0, 0x4E($s5) /* D5AEC 8013F3EC A2A20050 */ sb $v0, 0x50($s5) /* D5AF0 8013F3F0 92040003 */ lbu $a0, 0x3($s0) /* D5AF4 8013F3F4 8EA20000 */ lw $v0, 0x0($s5) /* D5AF8 8013F3F8 26100004 */ addiu $s0, $s0, 0x4 /* D5AFC 8013F3FC 00431025 */ or $v0, $v0, $v1 /* D5B00 8013F400 AEA20000 */ sw $v0, 0x0($s5) /* D5B04 8013F404 A2A4004F */ sb $a0, 0x4F($s5) /* D5B08 8013F408 0804FCE3 */ j .L8013F38C /* D5B0C 8013F40C A2A40051 */ sb $a0, 0x51($s5) glabel .L8013F410 /* D5B10 8013F410 0804FCE3 */ j .L8013F38C /* D5B14 8013F414 26100004 */ addiu $s0, $s0, 0x4 glabel .L8013F418 /* D5B18 8013F418 0804FCE3 */ j .L8013F38C /* D5B1C 8013F41C 26100008 */ addiu $s0, $s0, 0x8 .L8013F420: /* D5B20 8013F420 0804FD62 */ j .L8013F588 /* D5B24 8013F424 AE110000 */ sw $s1, 0x0($s0) .L8013F428: /* D5B28 8013F428 0804FDB2 */ j .L8013F6C8 /* D5B2C 8013F42C AE110000 */ sw $s1, 0x0($s0) glabel .L8013F430 /* D5B30 8013F430 26100004 */ addiu $s0, $s0, 0x4 /* D5B34 8013F434 8E070000 */ lw $a3, 0x0($s0) /* D5B38 8013F438 26100004 */ addiu $s0, $s0, 0x4 /* D5B3C 8013F43C 8E140000 */ lw $s4, 0x0($s0) /* D5B40 8013F440 26100004 */ addiu $s0, $s0, 0x4 /* D5B44 8013F444 0000882D */ daddu $s1, $zero, $zero /* D5B48 8013F448 00131040 */ sll $v0, $s3, 1 /* D5B4C 8013F44C 00531021 */ addu $v0, $v0, $s3 /* D5B50 8013F450 00021040 */ sll $v0, $v0, 1 /* D5B54 8013F454 3C048015 */ lui $a0, %hi(gHudElementCacheTableRaster) /* D5B58 8013F458 8C8412C8 */ lw $a0, %lo(gHudElementCacheTableRaster)($a0) /* D5B5C 8013F45C 00569021 */ addu $s2, $v0, $s6 /* D5B60 8013F460 24850004 */ addiu $a1, $a0, 0x4 .L8013F464: /* D5B64 8013F464 8C830000 */ lw $v1, 0x0($a0) /* D5B68 8013F468 2402FFFF */ addiu $v0, $zero, -0x1 /* D5B6C 8013F46C 14620038 */ bne $v1, $v0, .L8013F550 /* D5B70 8013F470 00000000 */ nop /* D5B74 8013F474 3C038015 */ lui $v1, %hi(gHudElementCacheSize) /* D5B78 8013F478 8C63133C */ lw $v1, %lo(gHudElementCacheSize)($v1) /* D5B7C 8013F47C 3C028015 */ lui $v0, %hi(gHudElementCacheBuffer) /* D5B80 8013F480 8C421314 */ lw $v0, %lo(gHudElementCacheBuffer)($v0) /* D5B84 8013F484 AC870000 */ sw $a3, 0x0($a0) /* D5B88 8013F488 8C630000 */ lw $v1, 0x0($v1) /* D5B8C 8013F48C 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* D5B90 8013F490 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* D5B94 8013F494 00431021 */ addu $v0, $v0, $v1 /* D5B98 8013F498 ACA20000 */ sw $v0, 0x0($a1) /* D5B9C 8013F49C 80820070 */ lb $v0, 0x70($a0) /* D5BA0 8013F4A0 14400004 */ bnez $v0, .L8013F4B4 /* D5BA4 8013F4A4 00000000 */ nop /* D5BA8 8013F4A8 3C048015 */ lui $a0, %hi(gHudElementCacheCapacity) /* D5BAC 8013F4AC 0804FD32 */ j .L8013F4C8 /* D5BB0 8013F4B0 8C84EFC4 */ lw $a0, %lo(gHudElementCacheCapacity)($a0) .L8013F4B4: /* D5BB4 8013F4B4 3C028015 */ lui $v0, %hi(gHudElementCacheCapacity) /* D5BB8 8013F4B8 8C42EFC4 */ lw $v0, %lo(gHudElementCacheCapacity)($v0) /* D5BBC 8013F4BC 00021FC2 */ srl $v1, $v0, 31 /* D5BC0 8013F4C0 00431021 */ addu $v0, $v0, $v1 /* D5BC4 8013F4C4 00022043 */ sra $a0, $v0, 1 .L8013F4C8: /* D5BC8 8013F4C8 3C028015 */ lui $v0, %hi(gHudElementCacheSize) /* D5BCC 8013F4CC 8C42133C */ lw $v0, %lo(gHudElementCacheSize)($v0) /* D5BD0 8013F4D0 86430004 */ lh $v1, 0x4($s2) /* D5BD4 8013F4D4 8C420000 */ lw $v0, 0x0($v0) /* D5BD8 8013F4D8 00431021 */ addu $v0, $v0, $v1 /* D5BDC 8013F4DC 0044102A */ slt $v0, $v0, $a0 /* D5BE0 8013F4E0 14400003 */ bnez $v0, .L8013F4F0 /* D5BE4 8013F4E4 00000000 */ nop .L8013F4E8: /* D5BE8 8013F4E8 0804FD3A */ j .L8013F4E8 /* D5BEC 8013F4EC 00000000 */ nop .L8013F4F0: /* D5BF0 8013F4F0 3C04001D */ lui $a0, %hi(D_1CC310) /* D5BF4 8013F4F4 2484C310 */ addiu $a0, $a0, %lo(D_1CC310) /* D5BF8 8013F4F8 8CA50000 */ lw $a1, 0x0($a1) /* D5BFC 8013F4FC 86460004 */ lh $a2, 0x4($s2) /* D5C00 8013F500 0C017D24 */ jal nuPiReadRom /* D5C04 8013F504 00E42021 */ addu $a0, $a3, $a0 /* D5C08 8013F508 3C038015 */ lui $v1, %hi(gHudElementCacheSize) /* D5C0C 8013F50C 8C63133C */ lw $v1, %lo(gHudElementCacheSize)($v1) /* D5C10 8013F510 86440004 */ lh $a0, 0x4($s2) /* D5C14 8013F514 8C620000 */ lw $v0, 0x0($v1) /* D5C18 8013F518 00441021 */ addu $v0, $v0, $a0 /* D5C1C 8013F51C AC620000 */ sw $v0, 0x0($v1) /* D5C20 8013F520 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* D5C24 8013F524 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* D5C28 8013F528 80420070 */ lb $v0, 0x70($v0) /* D5C2C 8013F52C 14400003 */ bnez $v0, .L8013F53C /* D5C30 8013F530 00111C00 */ sll $v1, $s1, 16 /* D5C34 8013F534 0804FD52 */ j .L8013F548 /* D5C38 8013F538 AE110000 */ sw $s1, 0x0($s0) .L8013F53C: /* D5C3C 8013F53C 96020002 */ lhu $v0, 0x2($s0) /* D5C40 8013F540 00431025 */ or $v0, $v0, $v1 /* D5C44 8013F544 AE020000 */ sw $v0, 0x0($s0) .L8013F548: /* D5C48 8013F548 0804FD62 */ j .L8013F588 /* D5C4C 8013F54C 26310001 */ addiu $s1, $s1, 0x1 .L8013F550: /* D5C50 8013F550 5467000A */ bnel $v1, $a3, .L8013F57C /* D5C54 8013F554 24A50008 */ addiu $a1, $a1, 0x8 /* D5C58 8013F558 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* D5C5C 8013F55C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* D5C60 8013F560 80420070 */ lb $v0, 0x70($v0) /* D5C64 8013F564 1040FFAE */ beqz $v0, .L8013F420 /* D5C68 8013F568 00111C00 */ sll $v1, $s1, 16 /* D5C6C 8013F56C 96020002 */ lhu $v0, 0x2($s0) /* D5C70 8013F570 00431025 */ or $v0, $v0, $v1 /* D5C74 8013F574 0804FD62 */ j .L8013F588 /* D5C78 8013F578 AE020000 */ sw $v0, 0x0($s0) .L8013F57C: /* D5C7C 8013F57C 24840008 */ addiu $a0, $a0, 0x8 /* D5C80 8013F580 0804FD19 */ j .L8013F464 /* D5C84 8013F584 26310001 */ addiu $s1, $s1, 0x1 .L8013F588: /* D5C88 8013F588 2A2200C0 */ slti $v0, $s1, 0xC0 /* D5C8C 8013F58C 14400003 */ bnez $v0, .L8013F59C /* D5C90 8013F590 26100004 */ addiu $s0, $s0, 0x4 .L8013F594: /* D5C94 8013F594 0804FD65 */ j .L8013F594 /* D5C98 8013F598 00000000 */ nop .L8013F59C: /* D5C9C 8013F59C 3C048015 */ lui $a0, %hi(gHudElementCacheTablePalette) /* D5CA0 8013F5A0 8C8412D0 */ lw $a0, %lo(gHudElementCacheTablePalette)($a0) /* D5CA4 8013F5A4 0000882D */ daddu $s1, $zero, $zero /* D5CA8 8013F5A8 24850004 */ addiu $a1, $a0, 0x4 .L8013F5AC: /* D5CAC 8013F5AC 8C830000 */ lw $v1, 0x0($a0) /* D5CB0 8013F5B0 2402FFFF */ addiu $v0, $zero, -0x1 /* D5CB4 8013F5B4 14620036 */ bne $v1, $v0, .L8013F690 /* D5CB8 8013F5B8 00000000 */ nop /* D5CBC 8013F5BC 3C038015 */ lui $v1, %hi(gHudElementCacheSize) /* D5CC0 8013F5C0 8C63133C */ lw $v1, %lo(gHudElementCacheSize)($v1) /* D5CC4 8013F5C4 3C028015 */ lui $v0, %hi(gHudElementCacheBuffer) /* D5CC8 8013F5C8 8C421314 */ lw $v0, %lo(gHudElementCacheBuffer)($v0) /* D5CCC 8013F5CC AC940000 */ sw $s4, 0x0($a0) /* D5CD0 8013F5D0 8C630000 */ lw $v1, 0x0($v1) /* D5CD4 8013F5D4 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* D5CD8 8013F5D8 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* D5CDC 8013F5DC 00431021 */ addu $v0, $v0, $v1 /* D5CE0 8013F5E0 ACA20000 */ sw $v0, 0x0($a1) /* D5CE4 8013F5E4 80820070 */ lb $v0, 0x70($a0) /* D5CE8 8013F5E8 14400004 */ bnez $v0, .L8013F5FC /* D5CEC 8013F5EC 00000000 */ nop /* D5CF0 8013F5F0 3C048015 */ lui $a0, %hi(gHudElementCacheCapacity) /* D5CF4 8013F5F4 0804FD84 */ j .L8013F610 /* D5CF8 8013F5F8 8C84EFC4 */ lw $a0, %lo(gHudElementCacheCapacity)($a0) .L8013F5FC: /* D5CFC 8013F5FC 3C028015 */ lui $v0, %hi(gHudElementCacheCapacity) /* D5D00 8013F600 8C42EFC4 */ lw $v0, %lo(gHudElementCacheCapacity)($v0) /* D5D04 8013F604 00021FC2 */ srl $v1, $v0, 31 /* D5D08 8013F608 00431021 */ addu $v0, $v0, $v1 /* D5D0C 8013F60C 00022043 */ sra $a0, $v0, 1 .L8013F610: /* D5D10 8013F610 3C028015 */ lui $v0, %hi(gHudElementCacheSize) /* D5D14 8013F614 8C42133C */ lw $v0, %lo(gHudElementCacheSize)($v0) /* D5D18 8013F618 8C420000 */ lw $v0, 0x0($v0) /* D5D1C 8013F61C 24420020 */ addiu $v0, $v0, 0x20 /* D5D20 8013F620 0044102A */ slt $v0, $v0, $a0 /* D5D24 8013F624 14400003 */ bnez $v0, .L8013F634 /* D5D28 8013F628 00000000 */ nop .L8013F62C: /* D5D2C 8013F62C 0804FD8B */ j .L8013F62C /* D5D30 8013F630 00000000 */ nop .L8013F634: /* D5D34 8013F634 3C04001D */ lui $a0, %hi(D_1CC310) /* D5D38 8013F638 2484C310 */ addiu $a0, $a0, %lo(D_1CC310) /* D5D3C 8013F63C 02842021 */ addu $a0, $s4, $a0 /* D5D40 8013F640 8CA50000 */ lw $a1, 0x0($a1) /* D5D44 8013F644 0C017D24 */ jal nuPiReadRom /* D5D48 8013F648 24060020 */ addiu $a2, $zero, 0x20 /* D5D4C 8013F64C 3C038015 */ lui $v1, %hi(gHudElementCacheSize) /* D5D50 8013F650 8C63133C */ lw $v1, %lo(gHudElementCacheSize)($v1) /* D5D54 8013F654 8C620000 */ lw $v0, 0x0($v1) /* D5D58 8013F658 24420020 */ addiu $v0, $v0, 0x20 /* D5D5C 8013F65C AC620000 */ sw $v0, 0x0($v1) /* D5D60 8013F660 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* D5D64 8013F664 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* D5D68 8013F668 80420070 */ lb $v0, 0x70($v0) /* D5D6C 8013F66C 14400003 */ bnez $v0, .L8013F67C /* D5D70 8013F670 00111C00 */ sll $v1, $s1, 16 /* D5D74 8013F674 0804FDA2 */ j .L8013F688 /* D5D78 8013F678 AE110000 */ sw $s1, 0x0($s0) .L8013F67C: /* D5D7C 8013F67C 96020002 */ lhu $v0, 0x2($s0) /* D5D80 8013F680 00431025 */ or $v0, $v0, $v1 /* D5D84 8013F684 AE020000 */ sw $v0, 0x0($s0) .L8013F688: /* D5D88 8013F688 0804FDB2 */ j .L8013F6C8 /* D5D8C 8013F68C 26310001 */ addiu $s1, $s1, 0x1 .L8013F690: /* D5D90 8013F690 5474000A */ bnel $v1, $s4, .L8013F6BC /* D5D94 8013F694 24A50008 */ addiu $a1, $a1, 0x8 /* D5D98 8013F698 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* D5D9C 8013F69C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* D5DA0 8013F6A0 80420070 */ lb $v0, 0x70($v0) /* D5DA4 8013F6A4 1040FF60 */ beqz $v0, .L8013F428 /* D5DA8 8013F6A8 00111C00 */ sll $v1, $s1, 16 /* D5DAC 8013F6AC 96020002 */ lhu $v0, 0x2($s0) /* D5DB0 8013F6B0 00431025 */ or $v0, $v0, $v1 /* D5DB4 8013F6B4 0804FDB2 */ j .L8013F6C8 /* D5DB8 8013F6B8 AE020000 */ sw $v0, 0x0($s0) .L8013F6BC: /* D5DBC 8013F6BC 24840008 */ addiu $a0, $a0, 0x8 /* D5DC0 8013F6C0 0804FD6B */ j .L8013F5AC /* D5DC4 8013F6C4 26310001 */ addiu $s1, $s1, 0x1 .L8013F6C8: /* D5DC8 8013F6C8 2A2200C0 */ slti $v0, $s1, 0xC0 /* D5DCC 8013F6CC 1440FF2F */ bnez $v0, .L8013F38C /* D5DD0 8013F6D0 26100004 */ addiu $s0, $s0, 0x4 .L8013F6D4: /* D5DD4 8013F6D4 0804FDB5 */ j .L8013F6D4 /* D5DD8 8013F6D8 00000000 */ nop glabel .L8013F6DC /* D5DDC 8013F6DC 8FBF002C */ lw $ra, 0x2C($sp) /* D5DE0 8013F6E0 8FB60028 */ lw $s6, 0x28($sp) /* D5DE4 8013F6E4 8FB50024 */ lw $s5, 0x24($sp) /* D5DE8 8013F6E8 8FB40020 */ lw $s4, 0x20($sp) /* D5DEC 8013F6EC 8FB3001C */ lw $s3, 0x1C($sp) /* D5DF0 8013F6F0 8FB20018 */ lw $s2, 0x18($sp) /* D5DF4 8013F6F4 8FB10014 */ lw $s1, 0x14($sp) /* D5DF8 8013F6F8 8FB00010 */ lw $s0, 0x10($sp) /* D5DFC 8013F6FC 03E00008 */ jr $ra /* D5E00 8013F700 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void hud_element_load_script(HudElement* hudElement, HudScript* anim) { s32* pos = (s32*)anim; s32 raster; s32 palette; s32 preset; Vec3s* size; HudCacheEntry* entry; s32 i; s32 capacity; if (pos == NULL) { return; } preset = 0; while (TRUE) { switch (*pos++) { case HUD_ELEMENT_OP_End: return; case HUD_ELEMENT_OP_SetCI: pos += 3; break; case HUD_ELEMENT_OP_SetTileSize: preset = *pos++; hudElement->drawSizePreset = hudElement->tileSizePreset = preset; break; case HUD_ELEMENT_OP_SetSizesAutoScale: case HUD_ELEMENT_OP_SetSizesFixedScale: preset = *pos; pos += 2; hudElement->drawSizePreset = hudElement->tileSizePreset = preset; break; case HUD_ELEMENT_OP_SetCustomSize: hudElement->customDrawSize.x = hudElement->customImageSize.x = *pos++; hudElement->customDrawSize.y = hudElement->customImageSize.y = *pos++; hudElement->flags |= HUD_ELEMENT_FLAG_CUSTOM_SIZE; break; case HUD_ELEMENT_OP_AddTexelOffsetX: case HUD_ELEMENT_OP_AddTexelOffsetY: case HUD_ELEMENT_OP_SetScale: case HUD_ELEMENT_OP_SetAlpha: case HUD_ELEMENT_OP_op_15: case HUD_ELEMENT_OP_RandomBranch: case HUD_ELEMENT_OP_SetFlags: case HUD_ELEMENT_OP_ClearFlags: case HUD_ELEMENT_OP_PlaySound: pos++; break; case HUD_ELEMENT_OP_SetRGBA: case HUD_ELEMENT_OP_SetTexelOffset: case HUD_ELEMENT_OP_RandomDelay: case HUD_ELEMENT_OP_RandomRestart: case HUD_ELEMENT_OP_SetPivot: pos += 2; break; case HUD_ELEMENT_OP_SetImage: pos++; raster = *pos++; palette = *pos++; i = 0; entry = gHudElementCacheTableRaster; while (TRUE) { if (entry->id == -1) { entry->id = raster; entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize]; if (!gGameStatusPtr->isBattle) { capacity = gHudElementCacheCapacity; } else { capacity = gHudElementCacheCapacity / 2; } ASSERT(capacity > *gHudElementCacheSize + gHudElementSizes[preset].size); nuPiReadRom((s32)icon_present_ROM_START + raster, entry->data, gHudElementSizes[preset].size); *gHudElementCacheSize += gHudElementSizes[preset].size; if (!gGameStatusPtr->isBattle) { *pos = i; } else { *pos = (u16)(*pos) | (i << 16); } i++; break; } else if (entry->id == raster) { if (!gGameStatusPtr->isBattle) { *pos = i; } else { *pos = (u16)(*pos) | (i << 16); } break; } entry++; i++; } pos++; ASSERT(i < MAX_HUD_CACHE_ENTRIES); entry = gHudElementCacheTablePalette; i = 0; while (TRUE) { if (entry->id == -1) { entry->id = palette; entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize]; if (!gGameStatusPtr->isBattle) { capacity = gHudElementCacheCapacity; } else { capacity = gHudElementCacheCapacity / 2; } ASSERT(capacity > *gHudElementCacheSize + 32); nuPiReadRom((s32)icon_present_ROM_START + palette, entry->data, 32); *gHudElementCacheSize += 32; if (!gGameStatusPtr->isBattle) { *pos = i; } else { *pos = (u16)(*pos) | (i << 16); } i++; break; } else if (entry->id == palette) { if (!gGameStatusPtr->isBattle) { *pos = i; } else { *pos = (u16)(*pos) | (i << 16); } break; } entry++; i++; } pos++; ASSERT(i < MAX_HUD_CACHE_ENTRIES); break; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel landing_dust_appendGfx /* 3288A8 E000C798 27BDFEF8 */ addiu $sp, $sp, -0x108 /* 3288AC E000C79C AFBE0100 */ sw $fp, 0x100($sp) /* 3288B0 E000C7A0 0080F02D */ daddu $fp, $a0, $zero /* 3288B4 E000C7A4 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3288B8 E000C7A8 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3288BC E000C7AC 27A40018 */ addiu $a0, $sp, 0x18 /* 3288C0 E000C7B0 AFB200E8 */ sw $s2, 0xE8($sp) /* 3288C4 E000C7B4 3C120001 */ lui $s2, (0x11630 >> 16) /* 3288C8 E000C7B8 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3288CC E000C7BC AFB300EC */ sw $s3, 0xEC($sp) /* 3288D0 E000C7C0 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3288D4 E000C7C4 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3288D8 E000C7C8 AFBF0104 */ sw $ra, 0x104($sp) /* 3288DC E000C7CC AFB700FC */ sw $s7, 0xFC($sp) /* 3288E0 E000C7D0 AFB600F8 */ sw $s6, 0xF8($sp) /* 3288E4 E000C7D4 AFB500F4 */ sw $s5, 0xF4($sp) /* 3288E8 E000C7D8 AFB400F0 */ sw $s4, 0xF0($sp) /* 3288EC E000C7DC AFB100E4 */ sw $s1, 0xE4($sp) /* 3288F0 E000C7E0 AFB000E0 */ sw $s0, 0xE0($sp) /* 3288F4 E000C7E4 8E650000 */ lw $a1, 0x0($s3) /* 3288F8 E000C7E8 8FD4000C */ lw $s4, 0xC($fp) /* 3288FC E000C7EC 00A0182D */ daddu $v1, $a1, $zero /* 328900 E000C7F0 24A50008 */ addiu $a1, $a1, 0x8 /* 328904 E000C7F4 AE650000 */ sw $a1, 0x0($s3) /* 328908 E000C7F8 96950000 */ lhu $s5, 0x0($s4) /* 32890C E000C7FC 24A20008 */ addiu $v0, $a1, 0x8 /* 328910 E000C800 AE620000 */ sw $v0, 0x0($s3) /* 328914 E000C804 8E880040 */ lw $t0, 0x40($s4) /* 328918 E000C808 00151080 */ sll $v0, $s5, 2 /* 32891C E000C80C 3C17E001 */ lui $s7, (0xE0010000 >> 16) /* 328920 E000C810 02E2B821 */ addu $s7, $s7, $v0 /* 328924 E000C814 8EF7CC10 */ lw $s7, -0x33F0($s7) /* 328928 E000C818 3C06E001 */ lui $a2, (0xE0010000 >> 16) /* 32892C E000C81C 00C23021 */ addu $a2, $a2, $v0 /* 328930 E000C820 8CC6CC24 */ lw $a2, -0x33DC($a2) /* 328934 E000C824 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 328938 E000C828 AC620000 */ sw $v0, 0x0($v1) /* 32893C E000C82C AC600004 */ sw $zero, 0x4($v1) /* 328940 E000C830 ACA70000 */ sw $a3, 0x0($a1) /* 328944 E000C834 8FC30010 */ lw $v1, 0x10($fp) /* 328948 E000C838 24A20010 */ addiu $v0, $a1, 0x10 /* 32894C E000C83C AE620000 */ sw $v0, 0x0($s3) /* 328950 E000C840 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 328954 E000C844 8C63001C */ lw $v1, 0x1C($v1) /* 328958 E000C848 310B0007 */ andi $t3, $t0, 0x7 /* 32895C E000C84C ACA20008 */ sw $v0, 0x8($a1) /* 328960 E000C850 3C028000 */ lui $v0, (0x80000000 >> 16) /* 328964 E000C854 ACA6000C */ sw $a2, 0xC($a1) /* 328968 E000C858 00621821 */ addu $v1, $v1, $v0 /* 32896C E000C85C 31020038 */ andi $v0, $t0, 0x38 /* 328970 E000C860 0002B080 */ sll $s6, $v0, 2 /* 328974 E000C864 ACA30004 */ sw $v1, 0x4($a1) /* 328978 E000C868 8E850004 */ lw $a1, 0x4($s4) /* 32897C E000C86C 8E860008 */ lw $a2, 0x8($s4) /* 328980 E000C870 8E87000C */ lw $a3, 0xC($s4) /* 328984 E000C874 31080040 */ andi $t0, $t0, 0x40 /* 328988 E000C878 AFAB00D8 */ sw $t3, 0xD8($sp) /* 32898C E000C87C 0C080108 */ jal shim_guTranslateF /* 328990 E000C880 AFA800DC */ sw $t0, 0xDC($sp) /* 328994 E000C884 27B00058 */ addiu $s0, $sp, 0x58 /* 328998 E000C888 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 32899C E000C88C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3289A0 E000C890 44800000 */ mtc1 $zero, $f0 /* 3289A4 E000C894 00031080 */ sll $v0, $v1, 2 /* 3289A8 E000C898 00431021 */ addu $v0, $v0, $v1 /* 3289AC E000C89C 00021080 */ sll $v0, $v0, 2 /* 3289B0 E000C8A0 00431023 */ subu $v0, $v0, $v1 /* 3289B4 E000C8A4 000218C0 */ sll $v1, $v0, 3 /* 3289B8 E000C8A8 00431021 */ addu $v0, $v0, $v1 /* 3289BC E000C8AC 000210C0 */ sll $v0, $v0, 3 /* 3289C0 E000C8B0 44060000 */ mfc1 $a2, $f0 /* 3289C4 E000C8B4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3289C8 E000C8B8 00220821 */ addu $at, $at, $v0 /* 3289CC E000C8BC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 3289D0 E000C8C0 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 3289D4 E000C8C4 46000007 */ neg.s $f0, $f0 /* 3289D8 E000C8C8 44050000 */ mfc1 $a1, $f0 /* 3289DC E000C8CC 0200202D */ daddu $a0, $s0, $zero /* 3289E0 E000C8D0 0C080104 */ jal shim_guRotateF /* 3289E4 E000C8D4 AFA60010 */ sw $a2, 0x10($sp) /* 3289E8 E000C8D8 0200202D */ daddu $a0, $s0, $zero /* 3289EC E000C8DC 27A50018 */ addiu $a1, $sp, 0x18 /* 3289F0 E000C8E0 27B00098 */ addiu $s0, $sp, 0x98 /* 3289F4 E000C8E4 0C080114 */ jal shim_guMtxCatF /* 3289F8 E000C8E8 0200302D */ daddu $a2, $s0, $zero /* 3289FC E000C8EC 0200202D */ daddu $a0, $s0, $zero /* 328A00 E000C8F0 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 328A04 E000C8F4 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 328A08 E000C8F8 3C11800A */ lui $s1, %hi(gDisplayContext) /* 328A0C E000C8FC 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 328A10 E000C900 96050000 */ lhu $a1, 0x0($s0) /* 328A14 E000C904 8E220000 */ lw $v0, 0x0($s1) /* 328A18 E000C908 00052980 */ sll $a1, $a1, 6 /* 328A1C E000C90C 00B22821 */ addu $a1, $a1, $s2 /* 328A20 E000C910 0C080118 */ jal shim_guMtxF2L /* 328A24 E000C914 00452821 */ addu $a1, $v0, $a1 /* 328A28 E000C918 8E650000 */ lw $a1, 0x0($s3) /* 328A2C E000C91C 00A0202D */ daddu $a0, $a1, $zero /* 328A30 E000C920 24A50008 */ addiu $a1, $a1, 0x8 /* 328A34 E000C924 AE650000 */ sw $a1, 0x0($s3) /* 328A38 E000C928 96020000 */ lhu $v0, 0x0($s0) /* 328A3C E000C92C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 328A40 E000C930 AC830000 */ sw $v1, 0x0($a0) /* 328A44 E000C934 24430001 */ addiu $v1, $v0, 0x1 /* 328A48 E000C938 3042FFFF */ andi $v0, $v0, 0xFFFF /* 328A4C E000C93C 00021180 */ sll $v0, $v0, 6 /* 328A50 E000C940 00521021 */ addu $v0, $v0, $s2 /* 328A54 E000C944 A6030000 */ sh $v1, 0x0($s0) /* 328A58 E000C948 8E230000 */ lw $v1, 0x0($s1) /* 328A5C E000C94C 02C0802D */ daddu $s0, $s6, $zero /* 328A60 E000C950 00621821 */ addu $v1, $v1, $v0 /* 328A64 E000C954 06A0001D */ bltz $s5, .LE000C9CC /* 328A68 E000C958 AC830004 */ sw $v1, 0x4($a0) /* 328A6C E000C95C 2AA20002 */ slti $v0, $s5, 0x2 /* 328A70 E000C960 1040000D */ beqz $v0, .LE000C998 /* 328A74 E000C964 3C03E6DE */ lui $v1, (0xE6DEDE6E >> 16) /* 328A78 E000C968 3463DE6E */ ori $v1, $v1, (0xE6DEDE6E & 0xFFFF) /* 328A7C E000C96C 24A20008 */ addiu $v0, $a1, 0x8 /* 328A80 E000C970 AE620000 */ sw $v0, 0x0($s3) /* 328A84 E000C974 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 328A88 E000C978 ACA20000 */ sw $v0, 0x0($a1) /* 328A8C E000C97C 24A20010 */ addiu $v0, $a1, 0x10 /* 328A90 E000C980 ACA30004 */ sw $v1, 0x4($a1) /* 328A94 E000C984 AE620000 */ sw $v0, 0x0($s3) /* 328A98 E000C988 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 328A9C E000C98C ACA20008 */ sw $v0, 0x8($a1) /* 328AA0 E000C990 08003273 */ j .LE000C9CC /* 328AA4 E000C994 ACB6000C */ sw $s6, 0xC($a1) .LE000C998: /* 328AA8 E000C998 2AA20005 */ slti $v0, $s5, 0x5 /* 328AAC E000C99C 1040000B */ beqz $v0, .LE000C9CC /* 328AB0 E000C9A0 3463DE82 */ ori $v1, $v1, (0xE6DEDE82 & 0xFFFF) /* 328AB4 E000C9A4 24A20008 */ addiu $v0, $a1, 0x8 /* 328AB8 E000C9A8 AE620000 */ sw $v0, 0x0($s3) /* 328ABC E000C9AC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 328AC0 E000C9B0 ACA20000 */ sw $v0, 0x0($a1) /* 328AC4 E000C9B4 24A20010 */ addiu $v0, $a1, 0x10 /* 328AC8 E000C9B8 ACA30004 */ sw $v1, 0x4($a1) /* 328ACC E000C9BC AE620000 */ sw $v0, 0x0($s3) /* 328AD0 E000C9C0 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 328AD4 E000C9C4 ACA20008 */ sw $v0, 0x8($a1) /* 328AD8 E000C9C8 ACB0000C */ sw $s0, 0xC($a1) .LE000C9CC: /* 328ADC E000C9CC 16A00002 */ bnez $s5, .LE000C9D8 /* 328AE0 E000C9D0 24040020 */ addiu $a0, $zero, 0x20 /* 328AE4 E000C9D4 24040018 */ addiu $a0, $zero, 0x18 .LE000C9D8: /* 328AE8 E000C9D8 3C0A800A */ lui $t2, %hi(gMainGfxPos) /* 328AEC E000C9DC 254AA66C */ addiu $t2, $t2, %lo(gMainGfxPos) /* 328AF0 E000C9E0 3C09F200 */ lui $t1, (0xF2000000 >> 16) /* 328AF4 E000C9E4 8FAB00D8 */ lw $t3, 0xD8($sp) /* 328AF8 E000C9E8 8D450000 */ lw $a1, 0x0($t2) /* 328AFC E000C9EC 01640018 */ mult $t3, $a0 /* 328B00 E000C9F0 00043880 */ sll $a3, $a0, 2 /* 328B04 E000C9F4 00A0182D */ daddu $v1, $a1, $zero /* 328B08 E000C9F8 24A50008 */ addiu $a1, $a1, 0x8 /* 328B0C E000C9FC AD450000 */ sw $a1, 0x0($t2) /* 328B10 E000CA00 00004012 */ mflo $t0 /* 328B14 E000CA04 00081380 */ sll $v0, $t0, 14 /* 328B18 E000CA08 00491025 */ or $v0, $v0, $t1 /* 328B1C E000CA0C AC620000 */ sw $v0, 0x0($v1) /* 328B20 E000CA10 01041021 */ addu $v0, $t0, $a0 /* 328B24 E000CA14 00023380 */ sll $a2, $v0, 14 /* 328B28 E000CA18 00C71025 */ or $v0, $a2, $a3 /* 328B2C E000CA1C AC620004 */ sw $v0, 0x4($v1) /* 328B30 E000CA20 8FAB00DC */ lw $t3, 0xDC($sp) /* 328B34 E000CA24 1160000C */ beqz $t3, .LE000CA58 /* 328B38 E000CA28 24A20008 */ addiu $v0, $a1, 0x8 /* 328B3C E000CA2C AD420000 */ sw $v0, 0x0($t2) /* 328B40 E000CA30 00E91025 */ or $v0, $a3, $t1 /* 328B44 E000CA34 00C21025 */ or $v0, $a2, $v0 /* 328B48 E000CA38 ACA20000 */ sw $v0, 0x0($a1) /* 328B4C E000CA3C 00041040 */ sll $v0, $a0, 1 /* 328B50 E000CA40 01021021 */ addu $v0, $t0, $v0 /* 328B54 E000CA44 00021380 */ sll $v0, $v0, 14 /* 328B58 E000CA48 000418C0 */ sll $v1, $a0, 3 /* 328B5C E000CA4C 3C040100 */ lui $a0, (0x1000000 >> 16) /* 328B60 E000CA50 0800329E */ j .LE000CA78 /* 328B64 E000CA54 00641825 */ or $v1, $v1, $a0 .LE000CA58: /* 328B68 E000CA58 AD420000 */ sw $v0, 0x0($t2) /* 328B6C E000CA5C 00C91025 */ or $v0, $a2, $t1 /* 328B70 E000CA60 ACA20000 */ sw $v0, 0x0($a1) /* 328B74 E000CA64 00041040 */ sll $v0, $a0, 1 /* 328B78 E000CA68 01021021 */ addu $v0, $t0, $v0 /* 328B7C E000CA6C 00021380 */ sll $v0, $v0, 14 /* 328B80 E000CA70 3C030100 */ lui $v1, (0x1000000 >> 16) /* 328B84 E000CA74 00E31825 */ or $v1, $a3, $v1 .LE000CA78: /* 328B88 E000CA78 00431025 */ or $v0, $v0, $v1 /* 328B8C E000CA7C ACA20004 */ sw $v0, 0x4($a1) /* 328B90 E000CA80 24020002 */ addiu $v0, $zero, 0x2 /* 328B94 E000CA84 16A2000A */ bne $s5, $v0, .LE000CAB0 /* 328B98 E000CA88 00000000 */ nop /* 328B9C E000CA8C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 328BA0 E000CA90 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 328BA4 E000CA94 8C620000 */ lw $v0, 0x0($v1) /* 328BA8 E000CA98 0040202D */ daddu $a0, $v0, $zero /* 328BAC E000CA9C 24420008 */ addiu $v0, $v0, 0x8 /* 328BB0 E000CAA0 AC620000 */ sw $v0, 0x0($v1) /* 328BB4 E000CAA4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 328BB8 E000CAA8 AC820000 */ sw $v0, 0x0($a0) /* 328BBC E000CAAC AC970004 */ sw $s7, 0x4($a0) .LE000CAB0: /* 328BC0 E000CAB0 8FC20008 */ lw $v0, 0x8($fp) /* 328BC4 E000CAB4 24110001 */ addiu $s1, $zero, 0x1 /* 328BC8 E000CAB8 0222102A */ slt $v0, $s1, $v0 /* 328BCC E000CABC 10400036 */ beqz $v0, .LE000CB98 /* 328BD0 E000CAC0 26940044 */ addiu $s4, $s4, 0x44 /* 328BD4 E000CAC4 3C16800A */ lui $s6, %hi(gDisplayContext) /* 328BD8 E000CAC8 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 328BDC E000CACC 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 328BE0 E000CAD0 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 328BE4 E000CAD4 3C130001 */ lui $s3, (0x11630 >> 16) /* 328BE8 E000CAD8 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 328BEC E000CADC 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 328BF0 E000CAE0 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 328BF4 E000CAE4 2690000C */ addiu $s0, $s4, 0xC .LE000CAE8: /* 328BF8 E000CAE8 27A40018 */ addiu $a0, $sp, 0x18 /* 328BFC E000CAEC 26310001 */ addiu $s1, $s1, 0x1 /* 328C00 E000CAF0 8E05FFF8 */ lw $a1, -0x8($s0) /* 328C04 E000CAF4 8E06FFFC */ lw $a2, -0x4($s0) /* 328C08 E000CAF8 8E070000 */ lw $a3, 0x0($s0) /* 328C0C E000CAFC 0C080108 */ jal shim_guTranslateF /* 328C10 E000CB00 26100044 */ addiu $s0, $s0, 0x44 /* 328C14 E000CB04 27A40018 */ addiu $a0, $sp, 0x18 /* 328C18 E000CB08 96A50000 */ lhu $a1, 0x0($s5) /* 328C1C E000CB0C 8EC20000 */ lw $v0, 0x0($s6) /* 328C20 E000CB10 00052980 */ sll $a1, $a1, 6 /* 328C24 E000CB14 00B32821 */ addu $a1, $a1, $s3 /* 328C28 E000CB18 0C080118 */ jal shim_guMtxF2L /* 328C2C E000CB1C 00452821 */ addu $a1, $v0, $a1 /* 328C30 E000CB20 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 328C34 E000CB24 8E440000 */ lw $a0, 0x0($s2) /* 328C38 E000CB28 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 328C3C E000CB2C 0080282D */ daddu $a1, $a0, $zero /* 328C40 E000CB30 24840008 */ addiu $a0, $a0, 0x8 /* 328C44 E000CB34 AE440000 */ sw $a0, 0x0($s2) /* 328C48 E000CB38 96A20000 */ lhu $v0, 0x0($s5) /* 328C4C E000CB3C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 328C50 E000CB40 ACA30000 */ sw $v1, 0x0($a1) /* 328C54 E000CB44 24430001 */ addiu $v1, $v0, 0x1 /* 328C58 E000CB48 3042FFFF */ andi $v0, $v0, 0xFFFF /* 328C5C E000CB4C 00021180 */ sll $v0, $v0, 6 /* 328C60 E000CB50 A6A30000 */ sh $v1, 0x0($s5) /* 328C64 E000CB54 8EC30000 */ lw $v1, 0x0($s6) /* 328C68 E000CB58 00531021 */ addu $v0, $v0, $s3 /* 328C6C E000CB5C 00621821 */ addu $v1, $v1, $v0 /* 328C70 E000CB60 24820008 */ addiu $v0, $a0, 0x8 /* 328C74 E000CB64 ACA30004 */ sw $v1, 0x4($a1) /* 328C78 E000CB68 AE420000 */ sw $v0, 0x0($s2) /* 328C7C E000CB6C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 328C80 E000CB70 AC820000 */ sw $v0, 0x0($a0) /* 328C84 E000CB74 24020040 */ addiu $v0, $zero, 0x40 /* 328C88 E000CB78 AC970004 */ sw $s7, 0x4($a0) /* 328C8C E000CB7C AC860008 */ sw $a2, 0x8($a0) /* 328C90 E000CB80 AC82000C */ sw $v0, 0xC($a0) /* 328C94 E000CB84 8FC20008 */ lw $v0, 0x8($fp) /* 328C98 E000CB88 24840010 */ addiu $a0, $a0, 0x10 /* 328C9C E000CB8C 0222102A */ slt $v0, $s1, $v0 /* 328CA0 E000CB90 1440FFD5 */ bnez $v0, .LE000CAE8 /* 328CA4 E000CB94 AE440000 */ sw $a0, 0x0($s2) .LE000CB98: /* 328CA8 E000CB98 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 328CAC E000CB9C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 328CB0 E000CBA0 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 328CB4 E000CBA4 8C820000 */ lw $v0, 0x0($a0) /* 328CB8 E000CBA8 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 328CBC E000CBAC 0040282D */ daddu $a1, $v0, $zero /* 328CC0 E000CBB0 24420008 */ addiu $v0, $v0, 0x8 /* 328CC4 E000CBB4 AC820000 */ sw $v0, 0x0($a0) /* 328CC8 E000CBB8 ACA30000 */ sw $v1, 0x0($a1) /* 328CCC E000CBBC 24030040 */ addiu $v1, $zero, 0x40 /* 328CD0 E000CBC0 ACA30004 */ sw $v1, 0x4($a1) /* 328CD4 E000CBC4 24430008 */ addiu $v1, $v0, 0x8 /* 328CD8 E000CBC8 AC830000 */ sw $v1, 0x0($a0) /* 328CDC E000CBCC 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 328CE0 E000CBD0 AC430000 */ sw $v1, 0x0($v0) /* 328CE4 E000CBD4 AC400004 */ sw $zero, 0x4($v0) /* 328CE8 E000CBD8 8FBF0104 */ lw $ra, 0x104($sp) /* 328CEC E000CBDC 8FBE0100 */ lw $fp, 0x100($sp) /* 328CF0 E000CBE0 8FB700FC */ lw $s7, 0xFC($sp) /* 328CF4 E000CBE4 8FB600F8 */ lw $s6, 0xF8($sp) /* 328CF8 E000CBE8 8FB500F4 */ lw $s5, 0xF4($sp) /* 328CFC E000CBEC 8FB400F0 */ lw $s4, 0xF0($sp) /* 328D00 E000CBF0 8FB300EC */ lw $s3, 0xEC($sp) /* 328D04 E000CBF4 8FB200E8 */ lw $s2, 0xE8($sp) /* 328D08 E000CBF8 8FB100E4 */ lw $s1, 0xE4($sp) /* 328D0C E000CBFC 8FB000E0 */ lw $s0, 0xE0($sp) /* 328D10 E000CC00 03E00008 */ jr $ra /* 328D14 E000CC04 27BD0108 */ addiu $sp, $sp, 0x108 /* 328D18 E000CC08 00000000 */ nop /* 328D1C E000CC0C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void landing_dust_appendGfx(void* effect) { LandingDustFXData* part = ((EffectInstance*)effect)->data.landingDust; s32 type = part->type; s32 temp_t0 = part->unk_40; Matrix4f mtx1; Matrix4f mtx2; Matrix4f mtx3; s32 spD8; s32 spDC; s32 temp_lo; s32 envAlpha; Gfx* dlist1; Gfx* dlist2; s32 phi_a0; s32 temp; s32 i; envAlpha = (temp_t0 & 0x38) * 4; dlist1 = sDlists[type]; dlist2 = sDlists2[type]; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist2); spD8 = temp_t0 & 7; spDC = temp_t0 & 0x40; shim_guTranslateF(mtx1, part->x, part->y, part->z); shim_guRotateF(mtx2, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(mtx2, mtx1, mtx3); shim_guMtxF2L(mtx3, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); switch (type) { case 0: case 1: gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 110); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha); break; case 2: case 3: case 4: gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 130); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha); break; } if (type == 0) { phi_a0 = 24; } else { phi_a0 = 32; } temp_lo = spD8 * phi_a0; temp = temp_lo + phi_a0; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, temp_lo * 4, 0, temp * 4, phi_a0 * 4); if (spDC) { gDPSetTileSize(gMainGfxPos++, 1, temp * 4, phi_a0 * 4, (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 8); } else { gDPSetTileSize(gMainGfxPos++, 1, temp * 4, 0, (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 4); } if (type == 2) { gSPDisplayList(gMainGfxPos++, dlist1); } part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { shim_guTranslateF(mtx1, part->x, part->y, part->z); shim_guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist1); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel __moddi3 /* 491C0 8006DDC0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 491C4 8006DDC4 AFB20010 */ sw $s2, 0x10($sp) /* 491C8 8006DDC8 0000902D */ daddu $s2, $zero, $zero /* 491CC 8006DDCC AFB1000C */ sw $s1, 0xC($sp) /* 491D0 8006DDD0 04810008 */ bgez $a0, .L8006DDF4 /* 491D4 8006DDD4 AFB00008 */ sw $s0, 0x8($sp) /* 491D8 8006DDD8 2412FFFF */ addiu $s2, $zero, -0x1 /* 491DC 8006DDDC 00054823 */ negu $t1, $a1 /* 491E0 8006DDE0 00041823 */ negu $v1, $a0 /* 491E4 8006DDE4 0009102B */ sltu $v0, $zero, $t1 /* 491E8 8006DDE8 00624023 */ subu $t0, $v1, $v0 /* 491EC 8006DDEC 0100202D */ daddu $a0, $t0, $zero /* 491F0 8006DDF0 0120282D */ daddu $a1, $t1, $zero .L8006DDF4: /* 491F4 8006DDF4 04C10008 */ bgez $a2, .L8006DE18 /* 491F8 8006DDF8 00E0402D */ daddu $t0, $a3, $zero /* 491FC 8006DDFC 00075823 */ negu $t3, $a3 /* 49200 8006DE00 00061823 */ negu $v1, $a2 /* 49204 8006DE04 000B102B */ sltu $v0, $zero, $t3 /* 49208 8006DE08 00625023 */ subu $t2, $v1, $v0 /* 4920C 8006DE0C 0140302D */ daddu $a2, $t2, $zero /* 49210 8006DE10 0160382D */ daddu $a3, $t3, $zero /* 49214 8006DE14 00E0402D */ daddu $t0, $a3, $zero .L8006DE18: /* 49218 8006DE18 00C0482D */ daddu $t1, $a2, $zero /* 4921C 8006DE1C 00A0582D */ daddu $t3, $a1, $zero /* 49220 8006DE20 0080502D */ daddu $t2, $a0, $zero /* 49224 8006DE24 152000A6 */ bnez $t1, .L8006E0C0 /* 49228 8006DE28 03A0C82D */ daddu $t9, $sp, $zero /* 4922C 8006DE2C 0148102B */ sltu $v0, $t2, $t0 /* 49230 8006DE30 1040001D */ beqz $v0, .L8006DEA8 /* 49234 8006DE34 3402FFFF */ ori $v0, $zero, 0xFFFF /* 49238 8006DE38 0048102B */ sltu $v0, $v0, $t0 /* 4923C 8006DE3C 14400005 */ bnez $v0, .L8006DE54 /* 49240 8006DE40 00E0182D */ daddu $v1, $a3, $zero /* 49244 8006DE44 2D020100 */ sltiu $v0, $t0, 0x100 /* 49248 8006DE48 38420001 */ xori $v0, $v0, 0x1 /* 4924C 8006DE4C 0801B79B */ j .L8006DE6C /* 49250 8006DE50 000220C0 */ sll $a0, $v0, 3 .L8006DE54: /* 49254 8006DE54 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 49258 8006DE58 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 4925C 8006DE5C 0048102B */ sltu $v0, $v0, $t0 /* 49260 8006DE60 14400002 */ bnez $v0, .L8006DE6C /* 49264 8006DE64 24040018 */ addiu $a0, $zero, 0x18 /* 49268 8006DE68 24040010 */ addiu $a0, $zero, 0x10 .L8006DE6C: /* 4926C 8006DE6C 00831006 */ srlv $v0, $v1, $a0 /* 49270 8006DE70 3C01800A */ lui $at, %hi(D_80099F40) /* 49274 8006DE74 00220821 */ addu $at, $at, $v0 /* 49278 8006DE78 90229F40 */ lbu $v0, %lo(D_80099F40)($at) /* 4927C 8006DE7C 00441021 */ addu $v0, $v0, $a0 /* 49280 8006DE80 24040020 */ addiu $a0, $zero, 0x20 /* 49284 8006DE84 00826823 */ subu $t5, $a0, $v0 /* 49288 8006DE88 11A0005B */ beqz $t5, .L8006DFF8 /* 4928C 8006DE8C 01AA1804 */ sllv $v1, $t2, $t5 /* 49290 8006DE90 01A84004 */ sllv $t0, $t0, $t5 /* 49294 8006DE94 008D1023 */ subu $v0, $a0, $t5 /* 49298 8006DE98 004B1006 */ srlv $v0, $t3, $v0 /* 4929C 8006DE9C 00625025 */ or $t2, $v1, $v0 /* 492A0 8006DEA0 0801B7FE */ j .L8006DFF8 /* 492A4 8006DEA4 01AB5804 */ sllv $t3, $t3, $t5 .L8006DEA8: /* 492A8 8006DEA8 15000008 */ bnez $t0, .L8006DECC /* 492AC 8006DEAC 0048102B */ sltu $v0, $v0, $t0 /* 492B0 8006DEB0 24020001 */ addiu $v0, $zero, 0x1 /* 492B4 8006DEB4 15200002 */ bnez $t1, .L8006DEC0 /* 492B8 8006DEB8 0049001B */ divu $zero, $v0, $t1 /* 492BC 8006DEBC 0007000D */ break 7 .L8006DEC0: /* 492C0 8006DEC0 00004012 */ mflo $t0 /* 492C4 8006DEC4 3402FFFF */ ori $v0, $zero, 0xFFFF /* 492C8 8006DEC8 0048102B */ sltu $v0, $v0, $t0 .L8006DECC: /* 492CC 8006DECC 14400005 */ bnez $v0, .L8006DEE4 /* 492D0 8006DED0 0100202D */ daddu $a0, $t0, $zero /* 492D4 8006DED4 2D020100 */ sltiu $v0, $t0, 0x100 /* 492D8 8006DED8 38420001 */ xori $v0, $v0, 0x1 /* 492DC 8006DEDC 0801B7BF */ j .L8006DEFC /* 492E0 8006DEE0 000218C0 */ sll $v1, $v0, 3 .L8006DEE4: /* 492E4 8006DEE4 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 492E8 8006DEE8 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 492EC 8006DEEC 0048102B */ sltu $v0, $v0, $t0 /* 492F0 8006DEF0 14400002 */ bnez $v0, .L8006DEFC /* 492F4 8006DEF4 24030018 */ addiu $v1, $zero, 0x18 /* 492F8 8006DEF8 24030010 */ addiu $v1, $zero, 0x10 .L8006DEFC: /* 492FC 8006DEFC 00641006 */ srlv $v0, $a0, $v1 /* 49300 8006DF00 3C01800A */ lui $at, %hi(D_80099F40) /* 49304 8006DF04 00220821 */ addu $at, $at, $v0 /* 49308 8006DF08 90229F40 */ lbu $v0, %lo(D_80099F40)($at) /* 4930C 8006DF0C 00431021 */ addu $v0, $v0, $v1 /* 49310 8006DF10 24030020 */ addiu $v1, $zero, 0x20 /* 49314 8006DF14 00626823 */ subu $t5, $v1, $v0 /* 49318 8006DF18 15A00003 */ bnez $t5, .L8006DF28 /* 4931C 8006DF1C 006DC023 */ subu $t8, $v1, $t5 /* 49320 8006DF20 0801B7FE */ j .L8006DFF8 /* 49324 8006DF24 01485023 */ subu $t2, $t2, $t0 .L8006DF28: /* 49328 8006DF28 01A84004 */ sllv $t0, $t0, $t5 /* 4932C 8006DF2C 030A2006 */ srlv $a0, $t2, $t8 /* 49330 8006DF30 01AA1804 */ sllv $v1, $t2, $t5 /* 49334 8006DF34 030B1006 */ srlv $v0, $t3, $t8 /* 49338 8006DF38 00625025 */ or $t2, $v1, $v0 /* 4933C 8006DF3C 00082C02 */ srl $a1, $t0, 16 /* 49340 8006DF40 14A00002 */ bnez $a1, .L8006DF4C /* 49344 8006DF44 0085001B */ divu $zero, $a0, $a1 /* 49348 8006DF48 0007000D */ break 7 .L8006DF4C: /* 4934C 8006DF4C 00001012 */ mflo $v0 /* 49350 8006DF50 00001810 */ mfhi $v1 /* 49354 8006DF54 3106FFFF */ andi $a2, $t0, 0xFFFF /* 49358 8006DF58 00000000 */ nop /* 4935C 8006DF5C 00460018 */ mult $v0, $a2 /* 49360 8006DF60 00031C00 */ sll $v1, $v1, 16 /* 49364 8006DF64 000A1402 */ srl $v0, $t2, 16 /* 49368 8006DF68 00621825 */ or $v1, $v1, $v0 /* 4936C 8006DF6C 00002012 */ mflo $a0 /* 49370 8006DF70 0064102B */ sltu $v0, $v1, $a0 /* 49374 8006DF74 10400008 */ beqz $v0, .L8006DF98 /* 49378 8006DF78 01AB5804 */ sllv $t3, $t3, $t5 /* 4937C 8006DF7C 00681821 */ addu $v1, $v1, $t0 /* 49380 8006DF80 0068102B */ sltu $v0, $v1, $t0 /* 49384 8006DF84 54400005 */ bnel $v0, $zero, .L8006DF9C /* 49388 8006DF88 00641823 */ subu $v1, $v1, $a0 /* 4938C 8006DF8C 0064102B */ sltu $v0, $v1, $a0 /* 49390 8006DF90 54400001 */ bnel $v0, $zero, .L8006DF98 /* 49394 8006DF94 00681821 */ addu $v1, $v1, $t0 .L8006DF98: /* 49398 8006DF98 00641823 */ subu $v1, $v1, $a0 .L8006DF9C: /* 4939C 8006DF9C 14A00002 */ bnez $a1, .L8006DFA8 /* 493A0 8006DFA0 0065001B */ divu $zero, $v1, $a1 /* 493A4 8006DFA4 0007000D */ break 7 .L8006DFA8: /* 493A8 8006DFA8 00001012 */ mflo $v0 /* 493AC 8006DFAC 00001810 */ mfhi $v1 /* 493B0 8006DFB0 00000000 */ nop /* 493B4 8006DFB4 00000000 */ nop /* 493B8 8006DFB8 00460018 */ mult $v0, $a2 /* 493BC 8006DFBC 00031C00 */ sll $v1, $v1, 16 /* 493C0 8006DFC0 3142FFFF */ andi $v0, $t2, 0xFFFF /* 493C4 8006DFC4 00621825 */ or $v1, $v1, $v0 /* 493C8 8006DFC8 00002012 */ mflo $a0 /* 493CC 8006DFCC 0064102B */ sltu $v0, $v1, $a0 /* 493D0 8006DFD0 50400009 */ beql $v0, $zero, .L8006DFF8 /* 493D4 8006DFD4 00645023 */ subu $t2, $v1, $a0 /* 493D8 8006DFD8 00681821 */ addu $v1, $v1, $t0 /* 493DC 8006DFDC 0068102B */ sltu $v0, $v1, $t0 /* 493E0 8006DFE0 14400005 */ bnez $v0, .L8006DFF8 /* 493E4 8006DFE4 00645023 */ subu $t2, $v1, $a0 /* 493E8 8006DFE8 0064102B */ sltu $v0, $v1, $a0 /* 493EC 8006DFEC 54400001 */ bnel $v0, $zero, .L8006DFF4 /* 493F0 8006DFF0 00681821 */ addu $v1, $v1, $t0 .L8006DFF4: /* 493F4 8006DFF4 00645023 */ subu $t2, $v1, $a0 .L8006DFF8: /* 493F8 8006DFF8 00082C02 */ srl $a1, $t0, 16 /* 493FC 8006DFFC 14A00002 */ bnez $a1, .L8006E008 /* 49400 8006E000 0145001B */ divu $zero, $t2, $a1 /* 49404 8006E004 0007000D */ break 7 .L8006E008: /* 49408 8006E008 00001012 */ mflo $v0 /* 4940C 8006E00C 00001810 */ mfhi $v1 /* 49410 8006E010 3106FFFF */ andi $a2, $t0, 0xFFFF /* 49414 8006E014 00000000 */ nop /* 49418 8006E018 00460018 */ mult $v0, $a2 /* 4941C 8006E01C 00031C00 */ sll $v1, $v1, 16 /* 49420 8006E020 000B1402 */ srl $v0, $t3, 16 /* 49424 8006E024 00621825 */ or $v1, $v1, $v0 /* 49428 8006E028 00002012 */ mflo $a0 /* 4942C 8006E02C 0064102B */ sltu $v0, $v1, $a0 /* 49430 8006E030 50400009 */ beql $v0, $zero, .L8006E058 /* 49434 8006E034 00641823 */ subu $v1, $v1, $a0 /* 49438 8006E038 00681821 */ addu $v1, $v1, $t0 /* 4943C 8006E03C 0068102B */ sltu $v0, $v1, $t0 /* 49440 8006E040 54400005 */ bnel $v0, $zero, .L8006E058 /* 49444 8006E044 00641823 */ subu $v1, $v1, $a0 /* 49448 8006E048 0064102B */ sltu $v0, $v1, $a0 /* 4944C 8006E04C 54400001 */ bnel $v0, $zero, .L8006E054 /* 49450 8006E050 00681821 */ addu $v1, $v1, $t0 .L8006E054: /* 49454 8006E054 00641823 */ subu $v1, $v1, $a0 .L8006E058: /* 49458 8006E058 14A00002 */ bnez $a1, .L8006E064 /* 4945C 8006E05C 0065001B */ divu $zero, $v1, $a1 /* 49460 8006E060 0007000D */ break 7 .L8006E064: /* 49464 8006E064 00001012 */ mflo $v0 /* 49468 8006E068 00001810 */ mfhi $v1 /* 4946C 8006E06C 00000000 */ nop /* 49470 8006E070 00000000 */ nop /* 49474 8006E074 00460018 */ mult $v0, $a2 /* 49478 8006E078 00031C00 */ sll $v1, $v1, 16 /* 4947C 8006E07C 3162FFFF */ andi $v0, $t3, 0xFFFF /* 49480 8006E080 00621825 */ or $v1, $v1, $v0 /* 49484 8006E084 00002012 */ mflo $a0 /* 49488 8006E088 0064102B */ sltu $v0, $v1, $a0 /* 4948C 8006E08C 10400007 */ beqz $v0, .L8006E0AC /* 49490 8006E090 00000000 */ nop /* 49494 8006E094 00681821 */ addu $v1, $v1, $t0 /* 49498 8006E098 0068102B */ sltu $v0, $v1, $t0 /* 4949C 8006E09C 14400003 */ bnez $v0, .L8006E0AC /* 494A0 8006E0A0 0064102B */ sltu $v0, $v1, $a0 /* 494A4 8006E0A4 54400001 */ bnel $v0, $zero, .L8006E0AC /* 494A8 8006E0A8 00681821 */ addu $v1, $v1, $t0 .L8006E0AC: /* 494AC 8006E0AC 13200087 */ beqz $t9, .L8006E2CC /* 494B0 8006E0B0 00645823 */ subu $t3, $v1, $a0 /* 494B4 8006E0B4 01AB7806 */ srlv $t7, $t3, $t5 /* 494B8 8006E0B8 0801B8B1 */ j .L8006E2C4 /* 494BC 8006E0BC 0000702D */ daddu $t6, $zero, $zero .L8006E0C0: /* 494C0 8006E0C0 0149102B */ sltu $v0, $t2, $t1 /* 494C4 8006E0C4 10400007 */ beqz $v0, .L8006E0E4 /* 494C8 8006E0C8 3402FFFF */ ori $v0, $zero, 0xFFFF /* 494CC 8006E0CC 00A0782D */ daddu $t7, $a1, $zero /* 494D0 8006E0D0 0140702D */ daddu $t6, $t2, $zero /* 494D4 8006E0D4 AFAE0000 */ sw $t6, 0x0($sp) /* 494D8 8006E0D8 AFAF0004 */ sw $t7, 0x4($sp) /* 494DC 8006E0DC 0801B8B3 */ j .L8006E2CC /* 494E0 8006E0E0 00000000 */ nop .L8006E0E4: /* 494E4 8006E0E4 0049102B */ sltu $v0, $v0, $t1 /* 494E8 8006E0E8 14400005 */ bnez $v0, .L8006E100 /* 494EC 8006E0EC 0120202D */ daddu $a0, $t1, $zero /* 494F0 8006E0F0 2D220100 */ sltiu $v0, $t1, 0x100 /* 494F4 8006E0F4 38420001 */ xori $v0, $v0, 0x1 /* 494F8 8006E0F8 0801B846 */ j .L8006E118 /* 494FC 8006E0FC 000218C0 */ sll $v1, $v0, 3 .L8006E100: /* 49500 8006E100 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 49504 8006E104 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 49508 8006E108 0049102B */ sltu $v0, $v0, $t1 /* 4950C 8006E10C 14400002 */ bnez $v0, .L8006E118 /* 49510 8006E110 24030018 */ addiu $v1, $zero, 0x18 /* 49514 8006E114 24030010 */ addiu $v1, $zero, 0x10 .L8006E118: /* 49518 8006E118 00641006 */ srlv $v0, $a0, $v1 /* 4951C 8006E11C 3C01800A */ lui $at, %hi(D_80099F40) /* 49520 8006E120 00220821 */ addu $at, $at, $v0 /* 49524 8006E124 90229F40 */ lbu $v0, %lo(D_80099F40)($at) /* 49528 8006E128 00431021 */ addu $v0, $v0, $v1 /* 4952C 8006E12C 24030020 */ addiu $v1, $zero, 0x20 /* 49530 8006E130 00626823 */ subu $t5, $v1, $v0 /* 49534 8006E134 15A0000F */ bnez $t5, .L8006E174 /* 49538 8006E138 006DC023 */ subu $t8, $v1, $t5 /* 4953C 8006E13C 012A102B */ sltu $v0, $t1, $t2 /* 49540 8006E140 14400004 */ bnez $v0, .L8006E154 /* 49544 8006E144 01682023 */ subu $a0, $t3, $t0 /* 49548 8006E148 0168102B */ sltu $v0, $t3, $t0 /* 4954C 8006E14C 14400005 */ bnez $v0, .L8006E164 /* 49550 8006E150 00000000 */ nop .L8006E154: /* 49554 8006E154 01491823 */ subu $v1, $t2, $t1 /* 49558 8006E158 0164102B */ sltu $v0, $t3, $a0 /* 4955C 8006E15C 00625023 */ subu $t2, $v1, $v0 /* 49560 8006E160 0080582D */ daddu $t3, $a0, $zero .L8006E164: /* 49564 8006E164 13200059 */ beqz $t9, .L8006E2CC /* 49568 8006E168 0160782D */ daddu $t7, $t3, $zero /* 4956C 8006E16C 0801B8B1 */ j .L8006E2C4 /* 49570 8006E170 0140702D */ daddu $t6, $t2, $zero .L8006E174: /* 49574 8006E174 01A91804 */ sllv $v1, $t1, $t5 /* 49578 8006E178 03081006 */ srlv $v0, $t0, $t8 /* 4957C 8006E17C 00624825 */ or $t1, $v1, $v0 /* 49580 8006E180 01A84004 */ sllv $t0, $t0, $t5 /* 49584 8006E184 030A2006 */ srlv $a0, $t2, $t8 /* 49588 8006E188 01AA1804 */ sllv $v1, $t2, $t5 /* 4958C 8006E18C 030B1006 */ srlv $v0, $t3, $t8 /* 49590 8006E190 00625025 */ or $t2, $v1, $v0 /* 49594 8006E194 00093402 */ srl $a2, $t1, 16 /* 49598 8006E198 14C00002 */ bnez $a2, .L8006E1A4 /* 4959C 8006E19C 0086001B */ divu $zero, $a0, $a2 /* 495A0 8006E1A0 0007000D */ break 7 .L8006E1A4: /* 495A4 8006E1A4 00003812 */ mflo $a3 /* 495A8 8006E1A8 00001810 */ mfhi $v1 /* 495AC 8006E1AC 312CFFFF */ andi $t4, $t1, 0xFFFF /* 495B0 8006E1B0 00000000 */ nop /* 495B4 8006E1B4 00EC0018 */ mult $a3, $t4 /* 495B8 8006E1B8 000A1402 */ srl $v0, $t2, 16 /* 495BC 8006E1BC 00031C00 */ sll $v1, $v1, 16 /* 495C0 8006E1C0 00621825 */ or $v1, $v1, $v0 /* 495C4 8006E1C4 00002812 */ mflo $a1 /* 495C8 8006E1C8 0065102B */ sltu $v0, $v1, $a1 /* 495CC 8006E1CC 1040000A */ beqz $v0, .L8006E1F8 /* 495D0 8006E1D0 01AB5804 */ sllv $t3, $t3, $t5 /* 495D4 8006E1D4 00691821 */ addu $v1, $v1, $t1 /* 495D8 8006E1D8 0069102B */ sltu $v0, $v1, $t1 /* 495DC 8006E1DC 14400006 */ bnez $v0, .L8006E1F8 /* 495E0 8006E1E0 24E7FFFF */ addiu $a3, $a3, -0x1 /* 495E4 8006E1E4 0065102B */ sltu $v0, $v1, $a1 /* 495E8 8006E1E8 50400004 */ beql $v0, $zero, .L8006E1FC /* 495EC 8006E1EC 00651823 */ subu $v1, $v1, $a1 /* 495F0 8006E1F0 24E7FFFF */ addiu $a3, $a3, -0x1 /* 495F4 8006E1F4 00691821 */ addu $v1, $v1, $t1 .L8006E1F8: /* 495F8 8006E1F8 00651823 */ subu $v1, $v1, $a1 .L8006E1FC: /* 495FC 8006E1FC 14C00002 */ bnez $a2, .L8006E208 /* 49600 8006E200 0066001B */ divu $zero, $v1, $a2 /* 49604 8006E204 0007000D */ break 7 .L8006E208: /* 49608 8006E208 00002012 */ mflo $a0 /* 4960C 8006E20C 00001810 */ mfhi $v1 /* 49610 8006E210 00000000 */ nop /* 49614 8006E214 00000000 */ nop /* 49618 8006E218 008C0018 */ mult $a0, $t4 /* 4961C 8006E21C 3142FFFF */ andi $v0, $t2, 0xFFFF /* 49620 8006E220 00031C00 */ sll $v1, $v1, 16 /* 49624 8006E224 00621825 */ or $v1, $v1, $v0 /* 49628 8006E228 00002812 */ mflo $a1 /* 4962C 8006E22C 0065102B */ sltu $v0, $v1, $a1 /* 49630 8006E230 5040000B */ beql $v0, $zero, .L8006E260 /* 49634 8006E234 00655023 */ subu $t2, $v1, $a1 /* 49638 8006E238 00691821 */ addu $v1, $v1, $t1 /* 4963C 8006E23C 0069102B */ sltu $v0, $v1, $t1 /* 49640 8006E240 14400006 */ bnez $v0, .L8006E25C /* 49644 8006E244 2484FFFF */ addiu $a0, $a0, -0x1 /* 49648 8006E248 0065102B */ sltu $v0, $v1, $a1 /* 4964C 8006E24C 10400004 */ beqz $v0, .L8006E260 /* 49650 8006E250 00655023 */ subu $t2, $v1, $a1 /* 49654 8006E254 2484FFFF */ addiu $a0, $a0, -0x1 /* 49658 8006E258 00691821 */ addu $v1, $v1, $t1 .L8006E25C: /* 4965C 8006E25C 00655023 */ subu $t2, $v1, $a1 .L8006E260: /* 49660 8006E260 00071400 */ sll $v0, $a3, 16 /* 49664 8006E264 00441025 */ or $v0, $v0, $a0 /* 49668 8006E268 00480019 */ multu $v0, $t0 /* 4966C 8006E26C 00003010 */ mfhi $a2 /* 49670 8006E270 0146102B */ sltu $v0, $t2, $a2 /* 49674 8006E274 00002812 */ mflo $a1 /* 49678 8006E278 54400005 */ bnel $v0, $zero, .L8006E290 /* 4967C 8006E27C 00A82023 */ subu $a0, $a1, $t0 /* 49680 8006E280 14CA0007 */ bne $a2, $t2, .L8006E2A0 /* 49684 8006E284 0165102B */ sltu $v0, $t3, $a1 /* 49688 8006E288 10400005 */ beqz $v0, .L8006E2A0 /* 4968C 8006E28C 00A82023 */ subu $a0, $a1, $t0 .L8006E290: /* 49690 8006E290 00C91823 */ subu $v1, $a2, $t1 /* 49694 8006E294 00A4102B */ sltu $v0, $a1, $a0 /* 49698 8006E298 00623023 */ subu $a2, $v1, $v0 /* 4969C 8006E29C 0080282D */ daddu $a1, $a0, $zero .L8006E2A0: /* 496A0 8006E2A0 1320000A */ beqz $t9, .L8006E2CC /* 496A4 8006E2A4 01651823 */ subu $v1, $t3, $a1 /* 496A8 8006E2A8 01462023 */ subu $a0, $t2, $a2 /* 496AC 8006E2AC 0163102B */ sltu $v0, $t3, $v1 /* 496B0 8006E2B0 00825023 */ subu $t2, $a0, $v0 /* 496B4 8006E2B4 030A1004 */ sllv $v0, $t2, $t8 /* 496B8 8006E2B8 01A31806 */ srlv $v1, $v1, $t5 /* 496BC 8006E2BC 00437825 */ or $t7, $v0, $v1 /* 496C0 8006E2C0 01AA7006 */ srlv $t6, $t2, $t5 .L8006E2C4: /* 496C4 8006E2C4 AF2E0000 */ sw $t6, 0x0($t9) /* 496C8 8006E2C8 AF2F0004 */ sw $t7, 0x4($t9) .L8006E2CC: /* 496CC 8006E2CC 12400009 */ beqz $s2, .L8006E2F4 /* 496D0 8006E2D0 00000000 */ nop /* 496D4 8006E2D4 8FA20000 */ lw $v0, 0x0($sp) /* 496D8 8006E2D8 8FA30004 */ lw $v1, 0x4($sp) /* 496DC 8006E2DC 00038823 */ negu $s1, $v1 /* 496E0 8006E2E0 00021023 */ negu $v0, $v0 /* 496E4 8006E2E4 0011202B */ sltu $a0, $zero, $s1 /* 496E8 8006E2E8 00448023 */ subu $s0, $v0, $a0 /* 496EC 8006E2EC AFB00000 */ sw $s0, 0x0($sp) /* 496F0 8006E2F0 AFB10004 */ sw $s1, 0x4($sp) .L8006E2F4: /* 496F4 8006E2F4 8FA20000 */ lw $v0, 0x0($sp) /* 496F8 8006E2F8 8FA30004 */ lw $v1, 0x4($sp) /* 496FC 8006E2FC 8FB20010 */ lw $s2, 0x10($sp) /* 49700 8006E300 8FB1000C */ lw $s1, 0xC($sp) /* 49704 8006E304 8FB00008 */ lw $s0, 0x8($sp) /* 49708 8006E308 03E00008 */ jr $ra /* 4970C 8006E30C 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: DItype __moddi3(DItype u, DItype v) { word_type c = 0; DIunion uu, vv; DItype w; uu.ll = u; vv.ll = v; if (uu.s.high < 0) { c = ~c; uu.ll = __negdi2(uu.ll); } if (vv.s.high < 0) { vv.ll = __negdi2(vv.ll); } __udivmoddi4 (uu.ll, vv.ll, &w); if (c) { w = __negdi2(w); } return w; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80273444 /* 1A1D24 80273444 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 1A1D28 80273448 AFB20020 */ sw $s2, 0x20($sp) /* 1A1D2C 8027344C 3C12800E */ lui $s2, %hi(gBattleStatus + 0xD8) /* 1A1D30 80273450 8E52C148 */ lw $s2, %lo(gBattleStatus + 0xD8)($s2) /* 1A1D34 80273454 AFB30024 */ sw $s3, 0x24($sp) /* 1A1D38 80273458 0080982D */ daddu $s3, $a0, $zero /* 1A1D3C 8027345C AFBF0028 */ sw $ra, 0x28($sp) /* 1A1D40 80273460 AFB1001C */ sw $s1, 0x1C($sp) /* 1A1D44 80273464 AFB00018 */ sw $s0, 0x18($sp) /* 1A1D48 80273468 F7BE0058 */ sdc1 $f30, 0x58($sp) /* 1A1D4C 8027346C F7BC0050 */ sdc1 $f28, 0x50($sp) /* 1A1D50 80273470 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 1A1D54 80273474 F7B80040 */ sdc1 $f24, 0x40($sp) /* 1A1D58 80273478 F7B60038 */ sdc1 $f22, 0x38($sp) /* 1A1D5C 8027347C F7B40030 */ sdc1 $f20, 0x30($sp) /* 1A1D60 80273480 8E70000C */ lw $s0, 0xC($s3) /* 1A1D64 80273484 10A00002 */ beqz $a1, .L80273490 /* 1A1D68 80273488 2651000C */ addiu $s1, $s2, 0xC /* 1A1D6C 8027348C AE600070 */ sw $zero, 0x70($s3) .L80273490: /* 1A1D70 80273490 8E620070 */ lw $v0, 0x70($s3) /* 1A1D74 80273494 14400081 */ bnez $v0, .L8027369C /* 1A1D78 80273498 00000000 */ nop /* 1A1D7C 8027349C 8E050000 */ lw $a1, 0x0($s0) /* 1A1D80 802734A0 26100004 */ addiu $s0, $s0, 0x4 /* 1A1D84 802734A4 0C0B1EAF */ jal evt_get_variable /* 1A1D88 802734A8 0260202D */ daddu $a0, $s3, $zero /* 1A1D8C 802734AC A6420070 */ sh $v0, 0x70($s2) /* 1A1D90 802734B0 8E050000 */ lw $a1, 0x0($s0) /* 1A1D94 802734B4 26100004 */ addiu $s0, $s0, 0x4 /* 1A1D98 802734B8 0C0B1EAF */ jal evt_get_variable /* 1A1D9C 802734BC 0260202D */ daddu $a0, $s3, $zero /* 1A1DA0 802734C0 A6420072 */ sh $v0, 0x72($s2) /* 1A1DA4 802734C4 8E050000 */ lw $a1, 0x0($s0) /* 1A1DA8 802734C8 0C0B1EAF */ jal evt_get_variable /* 1A1DAC 802734CC 0260202D */ daddu $a0, $s3, $zero /* 1A1DB0 802734D0 AE620074 */ sw $v0, 0x74($s3) /* 1A1DB4 802734D4 C6400148 */ lwc1 $f0, 0x148($s2) /* 1A1DB8 802734D8 C65A0018 */ lwc1 $f26, 0x18($s2) /* 1A1DBC 802734DC C65C0020 */ lwc1 $f28, 0x20($s2) /* 1A1DC0 802734E0 C654014C */ lwc1 $f20, 0x14C($s2) /* 1A1DC4 802734E4 C658001C */ lwc1 $f24, 0x1C($s2) /* 1A1DC8 802734E8 E6400010 */ swc1 $f0, 0x10($s2) /* 1A1DCC 802734EC 46000786 */ mov.s $f30, $f0 /* 1A1DD0 802734F0 4406D000 */ mfc1 $a2, $f26 /* 1A1DD4 802734F4 4407E000 */ mfc1 $a3, $f28 /* 1A1DD8 802734F8 C6400144 */ lwc1 $f0, 0x144($s2) /* 1A1DDC 802734FC 4600A386 */ mov.s $f14, $f20 /* 1A1DE0 80273500 E6540014 */ swc1 $f20, 0x14($s2) /* 1A1DE4 80273504 E640000C */ swc1 $f0, 0xC($s2) /* 1A1DE8 80273508 46000586 */ mov.s $f22, $f0 /* 1A1DEC 8027350C 0C00A720 */ jal atan2 /* 1A1DF0 80273510 4600B306 */ mov.s $f12, $f22 /* 1A1DF4 80273514 4600B306 */ mov.s $f12, $f22 /* 1A1DF8 80273518 4600A386 */ mov.s $f14, $f20 /* 1A1DFC 8027351C 4406D000 */ mfc1 $a2, $f26 /* 1A1E00 80273520 4407E000 */ mfc1 $a3, $f28 /* 1A1E04 80273524 461EC781 */ sub.s $f30, $f24, $f30 /* 1A1E08 80273528 0C00A7B5 */ jal dist2D /* 1A1E0C 8027352C E6400054 */ swc1 $f0, 0x54($s2) /* 1A1E10 80273530 86420070 */ lh $v0, 0x70($s2) /* 1A1E14 80273534 46000106 */ mov.s $f4, $f0 /* 1A1E18 80273538 14400012 */ bnez $v0, .L80273584 /* 1A1E1C 8027353C E6440058 */ swc1 $f4, 0x58($s2) /* 1A1E20 80273540 C640004C */ lwc1 $f0, 0x4C($s2) /* 1A1E24 80273544 C642004C */ lwc1 $f2, 0x4C($s2) /* 1A1E28 80273548 46002003 */ div.s $f0, $f4, $f0 /* 1A1E2C 8027354C 4600028D */ trunc.w.s $f10, $f0 /* 1A1E30 80273550 44035000 */ mfc1 $v1, $f10 /* 1A1E34 80273554 00000000 */ nop /* 1A1E38 80273558 00031400 */ sll $v0, $v1, 16 /* 1A1E3C 8027355C 00021403 */ sra $v0, $v0, 16 /* 1A1E40 80273560 44820000 */ mtc1 $v0, $f0 /* 1A1E44 80273564 00000000 */ nop /* 1A1E48 80273568 46800020 */ cvt.s.w $f0, $f0 /* 1A1E4C 8027356C 46020002 */ mul.s $f0, $f0, $f2 /* 1A1E50 80273570 00000000 */ nop /* 1A1E54 80273574 46002086 */ mov.s $f2, $f4 /* 1A1E58 80273578 A6430070 */ sh $v1, 0x70($s2) /* 1A1E5C 8027357C 0809CD6E */ j .L802735B8 /* 1A1E60 80273580 46001201 */ sub.s $f8, $f2, $f0 .L80273584: /* 1A1E64 80273584 44821000 */ mtc1 $v0, $f2 /* 1A1E68 80273588 00000000 */ nop /* 1A1E6C 8027358C 468010A0 */ cvt.s.w $f2, $f2 /* 1A1E70 80273590 86420070 */ lh $v0, 0x70($s2) /* 1A1E74 80273594 46022083 */ div.s $f2, $f4, $f2 /* 1A1E78 80273598 44820000 */ mtc1 $v0, $f0 /* 1A1E7C 8027359C 00000000 */ nop /* 1A1E80 802735A0 46800020 */ cvt.s.w $f0, $f0 /* 1A1E84 802735A4 46020002 */ mul.s $f0, $f0, $f2 /* 1A1E88 802735A8 00000000 */ nop /* 1A1E8C 802735AC C6440058 */ lwc1 $f4, 0x58($s2) /* 1A1E90 802735B0 E642004C */ swc1 $f2, 0x4C($s2) /* 1A1E94 802735B4 46002201 */ sub.s $f8, $f4, $f0 .L802735B8: /* 1A1E98 802735B8 86220064 */ lh $v0, 0x64($s1) /* 1A1E9C 802735BC C622003C */ lwc1 $f2, 0x3C($s1) /* 1A1EA0 802735C0 44823000 */ mtc1 $v0, $f6 /* 1A1EA4 802735C4 00000000 */ nop /* 1A1EA8 802735C8 468031A0 */ cvt.s.w $f6, $f6 /* 1A1EAC 802735CC 46061082 */ mul.s $f2, $f2, $f6 /* 1A1EB0 802735D0 00000000 */ nop /* 1A1EB4 802735D4 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1A1EB8 802735D8 44810000 */ mtc1 $at, $f0 /* 1A1EBC 802735DC 00000000 */ nop /* 1A1EC0 802735E0 46001082 */ mul.s $f2, $f2, $f0 /* 1A1EC4 802735E4 00000000 */ nop /* 1A1EC8 802735E8 0000202D */ daddu $a0, $zero, $zero /* 1A1ECC 802735EC C6240040 */ lwc1 $f4, 0x40($s1) /* 1A1ED0 802735F0 46003006 */ mov.s $f0, $f6 /* 1A1ED4 802735F4 46004003 */ div.s $f0, $f8, $f0 /* 1A1ED8 802735F8 46002100 */ add.s $f4, $f4, $f0 /* 1A1EDC 802735FC 8E260058 */ lw $a2, 0x58($s1) /* 1A1EE0 80273600 4606F183 */ div.s $f6, $f30, $f6 /* 1A1EE4 80273604 46061080 */ add.s $f2, $f2, $f6 /* 1A1EE8 80273608 0080282D */ daddu $a1, $a0, $zero /* 1A1EEC 8027360C E6240040 */ swc1 $f4, 0x40($s1) /* 1A1EF0 80273610 0C098F3F */ jal set_animation /* 1A1EF4 80273614 E6220044 */ swc1 $f2, 0x44($s1) /* 1A1EF8 80273618 86230064 */ lh $v1, 0x64($s1) /* 1A1EFC 8027361C 240200B4 */ addiu $v0, $zero, 0xB4 /* 1A1F00 80273620 14600002 */ bnez $v1, .L8027362C /* 1A1F04 80273624 0043001A */ div $zero, $v0, $v1 /* 1A1F08 80273628 0007000D */ break 7 .L8027362C: /* 1A1F0C 8027362C 2401FFFF */ addiu $at, $zero, -0x1 /* 1A1F10 80273630 14610004 */ bne $v1, $at, .L80273644 /* 1A1F14 80273634 3C018000 */ lui $at, (0x80000000 >> 16) /* 1A1F18 80273638 14410002 */ bne $v0, $at, .L80273644 /* 1A1F1C 8027363C 00000000 */ nop /* 1A1F20 80273640 0006000D */ break 6 .L80273644: /* 1A1F24 80273644 00001012 */ mflo $v0 /* 1A1F28 80273648 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 1A1F2C 8027364C 44810000 */ mtc1 $at, $f0 /* 1A1F30 80273650 C6220010 */ lwc1 $f2, 0x10($s1) /* 1A1F34 80273654 E6200024 */ swc1 $f0, 0x24($s1) /* 1A1F38 80273658 E622002C */ swc1 $f2, 0x2C($s1) /* 1A1F3C 8027365C 44820000 */ mtc1 $v0, $f0 /* 1A1F40 80273660 00000000 */ nop /* 1A1F44 80273664 46800020 */ cvt.s.w $f0, $f0 /* 1A1F48 80273668 E6200028 */ swc1 $f0, 0x28($s1) /* 1A1F4C 8027366C 8E630074 */ lw $v1, 0x74($s3) /* 1A1F50 80273670 24020002 */ addiu $v0, $zero, 0x2 /* 1A1F54 80273674 10620007 */ beq $v1, $v0, .L80273694 /* 1A1F58 80273678 24040160 */ addiu $a0, $zero, 0x160 /* 1A1F5C 8027367C C640014C */ lwc1 $f0, 0x14C($s2) /* 1A1F60 80273680 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A1F64 80273684 8E460144 */ lw $a2, 0x144($s2) /* 1A1F68 80273688 8E470148 */ lw $a3, 0x148($s2) /* 1A1F6C 8027368C 0C052757 */ jal sfx_play_sound_at_position /* 1A1F70 80273690 0000282D */ daddu $a1, $zero, $zero .L80273694: /* 1A1F74 80273694 24020001 */ addiu $v0, $zero, 0x1 /* 1A1F78 80273698 AE620070 */ sw $v0, 0x70($s3) .L8027369C: /* 1A1F7C 8027369C C6220044 */ lwc1 $f2, 0x44($s1) /* 1A1F80 802736A0 44800000 */ mtc1 $zero, $f0 /* 1A1F84 802736A4 00000000 */ nop /* 1A1F88 802736A8 4600103C */ c.lt.s $f2, $f0 /* 1A1F8C 802736AC 00000000 */ nop /* 1A1F90 802736B0 45000004 */ bc1f .L802736C4 /* 1A1F94 802736B4 0000202D */ daddu $a0, $zero, $zero /* 1A1F98 802736B8 8E26005C */ lw $a2, 0x5C($s1) /* 1A1F9C 802736BC 0C098F3F */ jal set_animation /* 1A1FA0 802736C0 0080282D */ daddu $a1, $a0, $zero .L802736C4: /* 1A1FA4 802736C4 24020001 */ addiu $v0, $zero, 0x1 /* 1A1FA8 802736C8 86230066 */ lh $v1, 0x66($s1) /* 1A1FAC 802736CC C6260044 */ lwc1 $f6, 0x44($s1) /* 1A1FB0 802736D0 10620007 */ beq $v1, $v0, .L802736F0 /* 1A1FB4 802736D4 28620002 */ slti $v0, $v1, 0x2 /* 1A1FB8 802736D8 1440001D */ bnez $v0, .L80273750 /* 1A1FBC 802736DC 24020002 */ addiu $v0, $zero, 0x2 /* 1A1FC0 802736E0 1062000C */ beq $v1, $v0, .L80273714 /* 1A1FC4 802736E4 00000000 */ nop /* 1A1FC8 802736E8 0809CDD4 */ j .L80273750 /* 1A1FCC 802736EC 00000000 */ nop .L802736F0: /* 1A1FD0 802736F0 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A1FD4 802736F4 C622002C */ lwc1 $f2, 0x2C($s1) /* 1A1FD8 802736F8 46020001 */ sub.s $f0, $f0, $f2 /* 1A1FDC 802736FC 3C014234 */ lui $at, (0x42340000 >> 16) /* 1A1FE0 80273700 44811000 */ mtc1 $at, $f2 /* 1A1FE4 80273704 00000000 */ nop /* 1A1FE8 80273708 4600103C */ c.lt.s $f2, $f0 /* 1A1FEC 8027370C 0809CDCD */ j .L80273734 /* 1A1FF0 80273710 00000000 */ nop .L80273714: /* 1A1FF4 80273714 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A1FF8 80273718 C622002C */ lwc1 $f2, 0x2C($s1) /* 1A1FFC 8027371C 46020001 */ sub.s $f0, $f0, $f2 /* 1A2000 80273720 3C01802A */ lui $at, %hi(D_8029D898) /* 1A2004 80273724 D422D898 */ ldc1 $f2, %lo(D_8029D898)($at) /* 1A2008 80273728 46000021 */ cvt.d.s $f0, $f0 /* 1A200C 8027372C 4620103C */ c.lt.d $f2, $f0 /* 1A2010 80273730 00000000 */ nop .L80273734: /* 1A2014 80273734 45000006 */ bc1f .L80273750 /* 1A2018 80273738 00000000 */ nop /* 1A201C 8027373C 3C013E80 */ lui $at, (0x3E800000 >> 16) /* 1A2020 80273740 44810000 */ mtc1 $at, $f0 /* 1A2024 80273744 00000000 */ nop /* 1A2028 80273748 46003182 */ mul.s $f6, $f6, $f0 /* 1A202C 8027374C 00000000 */ nop .L80273750: /* 1A2030 80273750 C6240004 */ lwc1 $f4, 0x4($s1) /* 1A2034 80273754 C6220044 */ lwc1 $f2, 0x44($s1) /* 1A2038 80273758 46062100 */ add.s $f4, $f4, $f6 /* 1A203C 8027375C C620003C */ lwc1 $f0, 0x3C($s1) /* 1A2040 80273760 C62C0024 */ lwc1 $f12, 0x24($s1) /* 1A2044 80273764 46001081 */ sub.s $f2, $f2, $f0 /* 1A2048 80273768 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 1A204C 8027376C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 1A2050 80273770 44810000 */ mtc1 $at, $f0 /* 1A2054 80273774 C6340040 */ lwc1 $f20, 0x40($s1) /* 1A2058 80273778 46006302 */ mul.s $f12, $f12, $f0 /* 1A205C 8027377C 00000000 */ nop /* 1A2060 80273780 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 1A2064 80273784 44810000 */ mtc1 $at, $f0 /* 1A2068 80273788 4600A521 */ cvt.d.s $f20, $f20 /* 1A206C 8027378C E6240004 */ swc1 $f4, 0x4($s1) /* 1A2070 80273790 E6220044 */ swc1 $f2, 0x44($s1) /* 1A2074 80273794 0C00A85B */ jal sin_rad /* 1A2078 80273798 46006303 */ div.s $f12, $f12, $f0 /* 1A207C 8027379C 46000021 */ cvt.d.s $f0, $f0 /* 1A2080 802737A0 4620A500 */ add.d $f20, $f20, $f0 /* 1A2084 802737A4 8E260048 */ lw $a2, 0x48($s1) /* 1A2088 802737A8 4620A520 */ cvt.s.d $f20, $f20 /* 1A208C 802737AC 4405A000 */ mfc1 $a1, $f20 /* 1A2090 802737B0 0C09904A */ jal add_xz_vec3f /* 1A2094 802737B4 0220202D */ daddu $a0, $s1, $zero /* 1A2098 802737B8 C62C0024 */ lwc1 $f12, 0x24($s1) /* 1A209C 802737BC C6200028 */ lwc1 $f0, 0x28($s1) /* 1A20A0 802737C0 46006300 */ add.s $f12, $f12, $f0 /* 1A20A4 802737C4 0C00A6C9 */ jal clamp_angle /* 1A20A8 802737C8 E62C0024 */ swc1 $f12, 0x24($s1) /* 1A20AC 802737CC C6220000 */ lwc1 $f2, 0x0($s1) /* 1A20B0 802737D0 E6200024 */ swc1 $f0, 0x24($s1) /* 1A20B4 802737D4 E6420144 */ swc1 $f2, 0x144($s2) /* 1A20B8 802737D8 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A20BC 802737DC E6400148 */ swc1 $f0, 0x148($s2) /* 1A20C0 802737E0 C6200008 */ lwc1 $f0, 0x8($s1) /* 1A20C4 802737E4 E640014C */ swc1 $f0, 0x14C($s2) /* 1A20C8 802737E8 96220064 */ lhu $v0, 0x64($s1) /* 1A20CC 802737EC 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A20D0 802737F0 A6220064 */ sh $v0, 0x64($s1) /* 1A20D4 802737F4 00021400 */ sll $v0, $v0, 16 /* 1A20D8 802737F8 04410019 */ bgez $v0, .L80273860 /* 1A20DC 802737FC 0000102D */ daddu $v0, $zero, $zero /* 1A20E0 80273800 C6200010 */ lwc1 $f0, 0x10($s1) /* 1A20E4 80273804 E6400148 */ swc1 $f0, 0x148($s2) /* 1A20E8 80273808 8E630074 */ lw $v1, 0x74($s3) /* 1A20EC 8027380C 24020001 */ addiu $v0, $zero, 0x1 /* 1A20F0 80273810 1062000A */ beq $v1, $v0, .L8027383C /* 1A20F4 80273814 24020002 */ addiu $v0, $zero, 0x2 /* 1A20F8 80273818 C640018C */ lwc1 $f0, 0x18C($s2) /* 1A20FC 8027381C E7A00010 */ swc1 $f0, 0x10($sp) /* 1A2100 80273820 8E450144 */ lw $a1, 0x144($s2) /* 1A2104 80273824 8E460148 */ lw $a2, 0x148($s2) /* 1A2108 80273828 8E47014C */ lw $a3, 0x14C($s2) /* 1A210C 8027382C 0C0990BC */ jal play_movement_dust_effects /* 1A2110 80273830 24040002 */ addiu $a0, $zero, 0x2 /* 1A2114 80273834 8E630074 */ lw $v1, 0x74($s3) /* 1A2118 80273838 24020002 */ addiu $v0, $zero, 0x2 .L8027383C: /* 1A211C 8027383C 10620007 */ beq $v1, $v0, .L8027385C /* 1A2120 80273840 24040148 */ addiu $a0, $zero, 0x148 /* 1A2124 80273844 C640014C */ lwc1 $f0, 0x14C($s2) /* 1A2128 80273848 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A212C 8027384C 8E460144 */ lw $a2, 0x144($s2) /* 1A2130 80273850 8E470148 */ lw $a3, 0x148($s2) /* 1A2134 80273854 0C052757 */ jal sfx_play_sound_at_position /* 1A2138 80273858 0000282D */ daddu $a1, $zero, $zero .L8027385C: /* 1A213C 8027385C 24020001 */ addiu $v0, $zero, 0x1 .L80273860: /* 1A2140 80273860 8FBF0028 */ lw $ra, 0x28($sp) /* 1A2144 80273864 8FB30024 */ lw $s3, 0x24($sp) /* 1A2148 80273868 8FB20020 */ lw $s2, 0x20($sp) /* 1A214C 8027386C 8FB1001C */ lw $s1, 0x1C($sp) /* 1A2150 80273870 8FB00018 */ lw $s0, 0x18($sp) /* 1A2154 80273874 D7BE0058 */ ldc1 $f30, 0x58($sp) /* 1A2158 80273878 D7BC0050 */ ldc1 $f28, 0x50($sp) /* 1A215C 8027387C D7BA0048 */ ldc1 $f26, 0x48($sp) /* 1A2160 80273880 D7B80040 */ ldc1 $f24, 0x40($sp) /* 1A2164 80273884 D7B60038 */ ldc1 $f22, 0x38($sp) /* 1A2168 80273888 D7B40030 */ ldc1 $f20, 0x30($sp) /* 1A216C 8027388C 03E00008 */ jr $ra /* 1A2170 80273890 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: ApiStatus func_80273444(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; Actor* player = battleStatus->playerActor; ActorState* playerState = &player->state; f32 playerVel; f32 x, y, z; f32 goalX, goalY, goalZ; f32 var_f8; f64 playerSpeed; if (isInitialCall) { script->functionTemp[0] = FALSE; } if (script->functionTemp[0] == 0) { player->state.moveTime = evt_get_variable(script, *args++); player->state.moveArcAmplitude = evt_get_variable(script, *args++); script->functionTemp[1] = evt_get_variable(script, *args++); player->state.currentPos.x = player->currentPos.x; player->state.currentPos.y = player->currentPos.y; player->state.currentPos.z = player->currentPos.z; x = player->state.currentPos.x; y = player->state.currentPos.y; z = player->state.currentPos.z; goalX = player->state.goalPos.x; goalY = player->state.goalPos.y; goalZ = player->state.goalPos.z; player->state.angle = atan2(x, z, goalX, goalZ); player->state.distance = dist2D(x, z, goalX, goalZ); y = goalY - y; if (player->state.moveTime == 0) { player->state.moveTime = player->state.distance / player->state.speed; var_f8 = player->state.distance - (player->state.moveTime * player->state.speed); } else { player->state.speed = player->state.distance / player->state.moveTime; var_f8 = player->state.distance - (player->state.moveTime * player->state.speed); } playerState->speed += var_f8 / playerState->moveTime; playerState->velocity = (playerState->acceleration * playerState->moveTime * 0.5f) + (y / playerState->moveTime); set_animation(0, 0, playerState->animJumpRise); playerState->unk_24 = 90.0f; playerState->unk_28 = 180 / playerState->moveTime; playerState->unk_2C = playerState->goalPos.y; if (script->functionTemp[1] != 2) { sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); } script->functionTemp[0] = TRUE; } if (playerState->velocity < 0.0f) { set_animation(0, 0, playerState->animJumpFall); } playerVel = playerState->velocity; switch (playerState->moveArcAmplitude) { case 0: break; case 1: if (playerState->currentPos.y - playerState->unk_2C > 45.0f) { playerVel *= 0.25f; } break; case 2: if (playerState->currentPos.y - playerState->unk_2C > 54.9) { playerVel *= 0.25f; } break; } playerState->currentPos.y += playerVel; playerState->velocity -= playerState->acceleration; playerSpeed = playerState->speed; add_xz_vec3f(&playerState->currentPos, playerSpeed + sin_rad(DEG_TO_RAD(playerState->unk_24)), playerState->angle); playerState->unk_24 += playerState->unk_28; playerState->unk_24 = clamp_angle(playerState->unk_24); player->currentPos.x = playerState->currentPos.x; player->currentPos.y = playerState->currentPos.y; player->currentPos.z = playerState->currentPos.z; playerState->moveTime--; if (playerState->moveTime >= 0) { return ApiStatus_BLOCK; } player->currentPos.y = playerState->goalPos.y; if (script->functionTemp[1] != 1) { play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw); } if (script->functionTemp[1] != 2) { sfx_play_sound_at_position(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); } return ApiStatus_DONE1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel RunToGoal /* 1A8744 80279E64 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 1A8748 80279E68 AFB20020 */ sw $s2, 0x20($sp) /* 1A874C 80279E6C 0080902D */ daddu $s2, $a0, $zero /* 1A8750 80279E70 AFBF0024 */ sw $ra, 0x24($sp) /* 1A8754 80279E74 AFB1001C */ sw $s1, 0x1C($sp) /* 1A8758 80279E78 AFB00018 */ sw $s0, 0x18($sp) /* 1A875C 80279E7C F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1A8760 80279E80 F7B80038 */ sdc1 $f24, 0x38($sp) /* 1A8764 80279E84 F7B60030 */ sdc1 $f22, 0x30($sp) /* 1A8768 80279E88 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1A876C 80279E8C 8E51000C */ lw $s1, 0xC($s2) /* 1A8770 80279E90 54A00001 */ bnel $a1, $zero, .L80279E98 /* 1A8774 80279E94 AE400070 */ sw $zero, 0x70($s2) .L80279E98: /* 1A8778 80279E98 8E420070 */ lw $v0, 0x70($s2) /* 1A877C 80279E9C 14400067 */ bnez $v0, .L8027A03C /* 1A8780 80279EA0 00000000 */ nop /* 1A8784 80279EA4 8E250000 */ lw $a1, 0x0($s1) /* 1A8788 80279EA8 26310004 */ addiu $s1, $s1, 0x4 /* 1A878C 80279EAC 0C0B1EAF */ jal evt_get_variable /* 1A8790 80279EB0 0240202D */ daddu $a0, $s2, $zero /* 1A8794 80279EB4 0040202D */ daddu $a0, $v0, $zero /* 1A8798 80279EB8 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A879C 80279EBC 14820002 */ bne $a0, $v0, .L80279EC8 /* 1A87A0 80279EC0 00000000 */ nop /* 1A87A4 80279EC4 8E440148 */ lw $a0, 0x148($s2) .L80279EC8: /* 1A87A8 80279EC8 0C09A75B */ jal get_actor /* 1A87AC 80279ECC 00000000 */ nop /* 1A87B0 80279ED0 0040802D */ daddu $s0, $v0, $zero /* 1A87B4 80279ED4 AE500074 */ sw $s0, 0x74($s2) /* 1A87B8 80279ED8 8E250000 */ lw $a1, 0x0($s1) /* 1A87BC 80279EDC 26310004 */ addiu $s1, $s1, 0x4 /* 1A87C0 80279EE0 0C0B1EAF */ jal evt_get_variable /* 1A87C4 80279EE4 0240202D */ daddu $a0, $s2, $zero /* 1A87C8 80279EE8 A6020070 */ sh $v0, 0x70($s0) /* 1A87CC 80279EEC 8E250000 */ lw $a1, 0x0($s1) /* 1A87D0 80279EF0 0C0B1EAF */ jal evt_get_variable /* 1A87D4 80279EF4 0240202D */ daddu $a0, $s2, $zero /* 1A87D8 80279EF8 AE420078 */ sw $v0, 0x78($s2) /* 1A87DC 80279EFC C6160018 */ lwc1 $f22, 0x18($s0) /* 1A87E0 80279F00 C6180020 */ lwc1 $f24, 0x20($s0) /* 1A87E4 80279F04 C6000144 */ lwc1 $f0, 0x144($s0) /* 1A87E8 80279F08 C614014C */ lwc1 $f20, 0x14C($s0) /* 1A87EC 80279F0C C602001C */ lwc1 $f2, 0x1C($s0) /* 1A87F0 80279F10 4406B000 */ mfc1 $a2, $f22 /* 1A87F4 80279F14 4407C000 */ mfc1 $a3, $f24 /* 1A87F8 80279F18 2611000C */ addiu $s1, $s0, 0xC /* 1A87FC 80279F1C E600000C */ swc1 $f0, 0xC($s0) /* 1A8800 80279F20 C6000148 */ lwc1 $f0, 0x148($s0) /* 1A8804 80279F24 C61A000C */ lwc1 $f26, 0xC($s0) /* 1A8808 80279F28 4600A386 */ mov.s $f14, $f20 /* 1A880C 80279F2C E6140014 */ swc1 $f20, 0x14($s0) /* 1A8810 80279F30 E6160024 */ swc1 $f22, 0x24($s0) /* 1A8814 80279F34 E6020028 */ swc1 $f2, 0x28($s0) /* 1A8818 80279F38 E618002C */ swc1 $f24, 0x2C($s0) /* 1A881C 80279F3C 4600D306 */ mov.s $f12, $f26 /* 1A8820 80279F40 0C00A720 */ jal atan2 /* 1A8824 80279F44 E6000010 */ swc1 $f0, 0x10($s0) /* 1A8828 80279F48 4600D306 */ mov.s $f12, $f26 /* 1A882C 80279F4C 4406B000 */ mfc1 $a2, $f22 /* 1A8830 80279F50 4407C000 */ mfc1 $a3, $f24 /* 1A8834 80279F54 4600A386 */ mov.s $f14, $f20 /* 1A8838 80279F58 0C00A7B5 */ jal dist2D /* 1A883C 80279F5C E6000054 */ swc1 $f0, 0x54($s0) /* 1A8840 80279F60 86020070 */ lh $v0, 0x70($s0) /* 1A8844 80279F64 46000086 */ mov.s $f2, $f0 /* 1A8848 80279F68 14400018 */ bnez $v0, .L80279FCC /* 1A884C 80279F6C E6020058 */ swc1 $f2, 0x58($s0) /* 1A8850 80279F70 C600004C */ lwc1 $f0, 0x4C($s0) /* 1A8854 80279F74 46001003 */ div.s $f0, $f2, $f0 /* 1A8858 80279F78 4600020D */ trunc.w.s $f8, $f0 /* 1A885C 80279F7C 44024000 */ mfc1 $v0, $f8 /* 1A8860 80279F80 00000000 */ nop /* 1A8864 80279F84 A6020070 */ sh $v0, 0x70($s0) /* 1A8868 80279F88 00021400 */ sll $v0, $v0, 16 /* 1A886C 80279F8C 14400002 */ bnez $v0, .L80279F98 /* 1A8870 80279F90 24020001 */ addiu $v0, $zero, 0x1 /* 1A8874 80279F94 A6020070 */ sh $v0, 0x70($s0) .L80279F98: /* 1A8878 80279F98 86020070 */ lh $v0, 0x70($s0) /* 1A887C 80279F9C C602004C */ lwc1 $f2, 0x4C($s0) /* 1A8880 80279FA0 44823000 */ mtc1 $v0, $f6 /* 1A8884 80279FA4 00000000 */ nop /* 1A8888 80279FA8 468031A0 */ cvt.s.w $f6, $f6 /* 1A888C 80279FAC 46023102 */ mul.s $f4, $f6, $f2 /* 1A8890 80279FB0 00000000 */ nop /* 1A8894 80279FB4 C6000058 */ lwc1 $f0, 0x58($s0) /* 1A8898 80279FB8 46040001 */ sub.s $f0, $f0, $f4 /* 1A889C 80279FBC 46060003 */ div.s $f0, $f0, $f6 /* 1A88A0 80279FC0 46001080 */ add.s $f2, $f2, $f0 /* 1A88A4 80279FC4 0809E7F8 */ j .L80279FE0 /* 1A88A8 80279FC8 E602004C */ swc1 $f2, 0x4C($s0) .L80279FCC: /* 1A88AC 80279FCC 44820000 */ mtc1 $v0, $f0 /* 1A88B0 80279FD0 00000000 */ nop /* 1A88B4 80279FD4 46800020 */ cvt.s.w $f0, $f0 /* 1A88B8 80279FD8 46001003 */ div.s $f0, $f2, $f0 /* 1A88BC 80279FDC E600004C */ swc1 $f0, 0x4C($s0) .L80279FE0: /* 1A88C0 80279FE0 860201B4 */ lh $v0, 0x1B4($s0) /* 1A88C4 80279FE4 04420002 */ bltzl $v0, .L80279FF0 /* 1A88C8 80279FE8 00021027 */ nor $v0, $zero, $v0 /* 1A88CC 80279FEC 24420001 */ addiu $v0, $v0, 0x1 .L80279FF0: /* 1A88D0 80279FF0 44820000 */ mtc1 $v0, $f0 /* 1A88D4 80279FF4 00000000 */ nop /* 1A88D8 80279FF8 46800020 */ cvt.s.w $f0, $f0 /* 1A88DC 80279FFC E620004C */ swc1 $f0, 0x4C($s1) /* 1A88E0 8027A000 8E02019C */ lw $v0, 0x19C($s0) /* 1A88E4 8027A004 1040000C */ beqz $v0, .L8027A038 /* 1A88E8 8027A008 24020001 */ addiu $v0, $zero, 0x1 /* 1A88EC 8027A00C 8E0201A0 */ lw $v0, 0x1A0($s0) /* 1A88F0 8027A010 14400009 */ bnez $v0, .L8027A038 /* 1A88F4 8027A014 24020001 */ addiu $v0, $zero, 0x1 /* 1A88F8 8027A018 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A88FC 8027A01C E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8900 8027A020 8E04019C */ lw $a0, 0x19C($s0) /* 1A8904 8027A024 8E060144 */ lw $a2, 0x144($s0) /* 1A8908 8027A028 8E070148 */ lw $a3, 0x148($s0) /* 1A890C 8027A02C 0C052757 */ jal sfx_play_sound_at_position /* 1A8910 8027A030 0000282D */ daddu $a1, $zero, $zero /* 1A8914 8027A034 24020001 */ addiu $v0, $zero, 0x1 .L8027A038: /* 1A8918 8027A038 AE420070 */ sw $v0, 0x70($s2) .L8027A03C: /* 1A891C 8027A03C 8E500074 */ lw $s0, 0x74($s2) /* 1A8920 8027A040 2611000C */ addiu $s1, $s0, 0xC /* 1A8924 8027A044 8E05004C */ lw $a1, 0x4C($s0) /* 1A8928 8027A048 8E060054 */ lw $a2, 0x54($s0) /* 1A892C 8027A04C 0C09904A */ jal add_xz_vec3f /* 1A8930 8027A050 0220202D */ daddu $a0, $s1, $zero /* 1A8934 8027A054 8E420078 */ lw $v0, 0x78($s2) /* 1A8938 8027A058 14400017 */ bnez $v0, .L8027A0B8 /* 1A893C 8027A05C 00000000 */ nop /* 1A8940 8027A060 C602004C */ lwc1 $f2, 0x4C($s0) /* 1A8944 8027A064 3C014080 */ lui $at, (0x40800000 >> 16) /* 1A8948 8027A068 44810000 */ mtc1 $at, $f0 /* 1A894C 8027A06C 00000000 */ nop /* 1A8950 8027A070 4600103C */ c.lt.s $f2, $f0 /* 1A8954 8027A074 00000000 */ nop /* 1A8958 8027A078 45000007 */ bc1f .L8027A098 /* 1A895C 8027A07C 0000202D */ daddu $a0, $zero, $zero /* 1A8960 8027A080 C6000054 */ lwc1 $f0, 0x54($s0) /* 1A8964 8027A084 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8968 8027A088 8E05000C */ lw $a1, 0xC($s0) /* 1A896C 8027A08C 8E060010 */ lw $a2, 0x10($s0) /* 1A8970 8027A090 0809E82C */ j .L8027A0B0 /* 1A8974 8027A094 8E070014 */ lw $a3, 0x14($s0) .L8027A098: /* 1A8978 8027A098 C6000054 */ lwc1 $f0, 0x54($s0) /* 1A897C 8027A09C E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8980 8027A0A0 8E05000C */ lw $a1, 0xC($s0) /* 1A8984 8027A0A4 8E060010 */ lw $a2, 0x10($s0) /* 1A8988 8027A0A8 8E070014 */ lw $a3, 0x14($s0) /* 1A898C 8027A0AC 24040001 */ addiu $a0, $zero, 0x1 .L8027A0B0: /* 1A8990 8027A0B0 0C0990BC */ jal play_movement_dust_effects /* 1A8994 8027A0B4 00000000 */ nop .L8027A0B8: /* 1A8998 8027A0B8 C6200000 */ lwc1 $f0, 0x0($s1) /* 1A899C 8027A0BC 8E02019C */ lw $v0, 0x19C($s0) /* 1A89A0 8027A0C0 E6000144 */ swc1 $f0, 0x144($s0) /* 1A89A4 8027A0C4 C6200008 */ lwc1 $f0, 0x8($s1) /* 1A89A8 8027A0C8 1040004A */ beqz $v0, .L8027A1F4 /* 1A89AC 8027A0CC E600014C */ swc1 $f0, 0x14C($s0) /* 1A89B0 8027A0D0 8E0201A0 */ lw $v0, 0x1A0($s0) /* 1A89B4 8027A0D4 10400047 */ beqz $v0, .L8027A1F4 /* 1A89B8 8027A0D8 00000000 */ nop /* 1A89BC 8027A0DC 860201B4 */ lh $v0, 0x1B4($s0) /* 1A89C0 8027A0E0 0440001C */ bltz $v0, .L8027A154 /* 1A89C4 8027A0E4 00000000 */ nop /* 1A89C8 8027A0E8 C622004C */ lwc1 $f2, 0x4C($s1) /* 1A89CC 8027A0EC C6200040 */ lwc1 $f0, 0x40($s1) /* 1A89D0 8027A0F0 46001080 */ add.s $f2, $f2, $f0 /* 1A89D4 8027A0F4 E622004C */ swc1 $f2, 0x4C($s1) /* 1A89D8 8027A0F8 860201B4 */ lh $v0, 0x1B4($s0) /* 1A89DC 8027A0FC 44820000 */ mtc1 $v0, $f0 /* 1A89E0 8027A100 00000000 */ nop /* 1A89E4 8027A104 46800020 */ cvt.s.w $f0, $f0 /* 1A89E8 8027A108 4602003C */ c.lt.s $f0, $f2 /* 1A89EC 8027A10C 00000000 */ nop /* 1A89F0 8027A110 45000038 */ bc1f .L8027A1F4 /* 1A89F4 8027A114 00000000 */ nop /* 1A89F8 8027A118 92020135 */ lbu $v0, 0x135($s0) /* 1A89FC 8027A11C 24420001 */ addiu $v0, $v0, 0x1 /* 1A8A00 8027A120 A2020135 */ sb $v0, 0x135($s0) /* 1A8A04 8027A124 AE20004C */ sw $zero, 0x4C($s1) /* 1A8A08 8027A128 92020135 */ lbu $v0, 0x135($s0) /* 1A8A0C 8027A12C 30420001 */ andi $v0, $v0, 0x1 /* 1A8A10 8027A130 10400026 */ beqz $v0, .L8027A1CC /* 1A8A14 8027A134 00000000 */ nop /* 1A8A18 8027A138 8E02019C */ lw $v0, 0x19C($s0) /* 1A8A1C 8027A13C 1040002D */ beqz $v0, .L8027A1F4 /* 1A8A20 8027A140 00000000 */ nop /* 1A8A24 8027A144 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A8A28 8027A148 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8A2C 8027A14C 0809E879 */ j .L8027A1E4 /* 1A8A30 8027A150 8E04019C */ lw $a0, 0x19C($s0) .L8027A154: /* 1A8A34 8027A154 C622004C */ lwc1 $f2, 0x4C($s1) /* 1A8A38 8027A158 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1A8A3C 8027A15C 44810000 */ mtc1 $at, $f0 /* 1A8A40 8027A160 00000000 */ nop /* 1A8A44 8027A164 46001080 */ add.s $f2, $f2, $f0 /* 1A8A48 8027A168 E622004C */ swc1 $f2, 0x4C($s1) /* 1A8A4C 8027A16C 860201B4 */ lh $v0, 0x1B4($s0) /* 1A8A50 8027A170 00021023 */ negu $v0, $v0 /* 1A8A54 8027A174 44820000 */ mtc1 $v0, $f0 /* 1A8A58 8027A178 00000000 */ nop /* 1A8A5C 8027A17C 46800020 */ cvt.s.w $f0, $f0 /* 1A8A60 8027A180 4602003E */ c.le.s $f0, $f2 /* 1A8A64 8027A184 00000000 */ nop /* 1A8A68 8027A188 4500001A */ bc1f .L8027A1F4 /* 1A8A6C 8027A18C 00000000 */ nop /* 1A8A70 8027A190 92020135 */ lbu $v0, 0x135($s0) /* 1A8A74 8027A194 24420001 */ addiu $v0, $v0, 0x1 /* 1A8A78 8027A198 A2020135 */ sb $v0, 0x135($s0) /* 1A8A7C 8027A19C AE20004C */ sw $zero, 0x4C($s1) /* 1A8A80 8027A1A0 92020135 */ lbu $v0, 0x135($s0) /* 1A8A84 8027A1A4 30420001 */ andi $v0, $v0, 0x1 /* 1A8A88 8027A1A8 10400008 */ beqz $v0, .L8027A1CC /* 1A8A8C 8027A1AC 00000000 */ nop /* 1A8A90 8027A1B0 8E02019C */ lw $v0, 0x19C($s0) /* 1A8A94 8027A1B4 1040000F */ beqz $v0, .L8027A1F4 /* 1A8A98 8027A1B8 00000000 */ nop /* 1A8A9C 8027A1BC C600014C */ lwc1 $f0, 0x14C($s0) /* 1A8AA0 8027A1C0 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8AA4 8027A1C4 0809E879 */ j .L8027A1E4 /* 1A8AA8 8027A1C8 8E04019C */ lw $a0, 0x19C($s0) .L8027A1CC: /* 1A8AAC 8027A1CC 8E0201A0 */ lw $v0, 0x1A0($s0) /* 1A8AB0 8027A1D0 10400008 */ beqz $v0, .L8027A1F4 /* 1A8AB4 8027A1D4 00000000 */ nop /* 1A8AB8 8027A1D8 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A8ABC 8027A1DC E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8AC0 8027A1E0 8E0401A0 */ lw $a0, 0x1A0($s0) .L8027A1E4: /* 1A8AC4 8027A1E4 8E060144 */ lw $a2, 0x144($s0) /* 1A8AC8 8027A1E8 8E070148 */ lw $a3, 0x148($s0) /* 1A8ACC 8027A1EC 0C052757 */ jal sfx_play_sound_at_position /* 1A8AD0 8027A1F0 0000282D */ daddu $a1, $zero, $zero .L8027A1F4: /* 1A8AD4 8027A1F4 96220064 */ lhu $v0, 0x64($s1) /* 1A8AD8 8027A1F8 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A8ADC 8027A1FC A6220064 */ sh $v0, 0x64($s1) /* 1A8AE0 8027A200 00021400 */ sll $v0, $v0, 16 /* 1A8AE4 8027A204 1C40000D */ bgtz $v0, .L8027A23C /* 1A8AE8 8027A208 0000102D */ daddu $v0, $zero, $zero /* 1A8AEC 8027A20C C6200018 */ lwc1 $f0, 0x18($s1) /* 1A8AF0 8027A210 8E04019C */ lw $a0, 0x19C($s0) /* 1A8AF4 8027A214 E6000144 */ swc1 $f0, 0x144($s0) /* 1A8AF8 8027A218 C6200020 */ lwc1 $f0, 0x20($s1) /* 1A8AFC 8027A21C 10800006 */ beqz $a0, .L8027A238 /* 1A8B00 8027A220 E600014C */ swc1 $f0, 0x14C($s0) /* 1A8B04 8027A224 8E0201A0 */ lw $v0, 0x1A0($s0) /* 1A8B08 8027A228 14400004 */ bnez $v0, .L8027A23C /* 1A8B0C 8027A22C 24020001 */ addiu $v0, $zero, 0x1 /* 1A8B10 8027A230 0C0154F0 */ jal snd_stop_sound /* 1A8B14 8027A234 00000000 */ nop .L8027A238: /* 1A8B18 8027A238 24020001 */ addiu $v0, $zero, 0x1 .L8027A23C: /* 1A8B1C 8027A23C 8FBF0024 */ lw $ra, 0x24($sp) /* 1A8B20 8027A240 8FB20020 */ lw $s2, 0x20($sp) /* 1A8B24 8027A244 8FB1001C */ lw $s1, 0x1C($sp) /* 1A8B28 8027A248 8FB00018 */ lw $s0, 0x18($sp) /* 1A8B2C 8027A24C D7BA0040 */ ldc1 $f26, 0x40($sp) /* 1A8B30 8027A250 D7B80038 */ ldc1 $f24, 0x38($sp) /* 1A8B34 8027A254 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1A8B38 8027A258 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1A8B3C 8027A25C 03E00008 */ jr $ra /* 1A8B40 8027A260 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: ApiStatus RunToGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorState* actorState; s32 actorID; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; if (isInitialCall) { script->functionTemp[0] = FALSE; } if (!script->functionTemp[0]) { 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++); script->functionTemp[2] = evt_get_variable(script, *args++); actorState->currentPos.x = actor->currentPos.x; actorState->currentPos.y = actor->currentPos.y; actorState->currentPos.z = actor->currentPos.z; goalX = actorState->goalPos.x; goalY = actorState->goalPos.y; goalZ = actorState->goalPos.z; posX = actorState->currentPos.x; posY = actorState->currentPos.y; posZ = actorState->currentPos.z; actorState->unk_18.x = goalX; actorState->unk_18.y = goalY; actorState->unk_18.z = goalZ; actorState->angle = atan2(posX, posZ, goalX, goalZ); actorState->distance = dist2D(posX, posZ, goalX, goalZ); if (actorState->moveTime == 0) { actorState->moveTime = actorState->distance / actorState->speed; if (actorState->moveTime == 0) { actorState->moveTime = 1; } actorState->speed += (actorState->distance - (actorState->moveTime * actorState->speed)) / actorState->moveTime; } else { actorState->speed = actorState->distance / actorState->moveTime; } if (actor->actorTypeData1b[0] >= 0) { actorState->distance = actor->actorTypeData1b[0] + 1; } else { actorState->distance = ~actor->actorTypeData1b[0]; //TODO optimization? } if ((actor->actorTypeData1[0] != 0) && (actor->actorTypeData1[1] == 0)) { sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } script->functionTemp[0] = TRUE; } actor = script->functionTempPtr[1]; actorState = &actor->state; add_xz_vec3f(&actorState->currentPos, actorState->speed, actorState->angle); if (script->functionTemp[2] == 0) { if (actorState->speed < 4.0f) { play_movement_dust_effects(0, actorState->currentPos.x, actorState->currentPos.y, actorState->currentPos.z, actorState->angle); } else { play_movement_dust_effects(1, actorState->currentPos.x, actorState->currentPos.y, actorState->currentPos.z, actorState->angle); } } actor->currentPos.x = actorState->currentPos.x; actor->currentPos.z = actorState->currentPos.z; if ((actor->actorTypeData1[0] != 0) && (actor->actorTypeData1[1] != 0)) { if (actor->actorTypeData1b[0] >= 0) { actorState->distance += actorState->speed; if (actor->actorTypeData1b[0] < actorState->distance) { actor->footStepCounter++; actorState->distance = 0.0f; if (actor->footStepCounter & 1) { if (actor->actorTypeData1[0] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } else { if (actor->actorTypeData1[1] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[1], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } } } else { actorState->distance += 1.0f; if (-actor->actorTypeData1b[0] <= actorState->distance) { actor->footStepCounter++; actorState->distance = 0.0f; if (actor->footStepCounter & 1) { if (actor->actorTypeData1[0] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } else { if (actor->actorTypeData1[1] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[1], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } } } } } actorState->moveTime--; if (actorState->moveTime > 0) { return ApiStatus_BLOCK; } actor->currentPos.x = actorState->unk_18.x; actor->currentPos.z = actorState->unk_18.z; if (actor->actorTypeData1[0] != 0) { if (actor->actorTypeData1[1] == 0) { snd_stop_sound(actor->actorTypeData1[0]); } } return ApiStatus_DONE1; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80247508 /* 13A848 80247508 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 13A84C 8024750C 240A0001 */ addiu $t2, $zero, 0x1 /* 13A850 80247510 3C028027 */ lui $v0, %hi(gPauseBadgesCurrentPage) /* 13A854 80247514 8C420280 */ lw $v0, %lo(gPauseBadgesCurrentPage)($v0) /* 13A858 80247518 3C038027 */ lui $v1, %hi(gPauseBadgesPages) /* 13A85C 8024751C 24630288 */ addiu $v1, $v1, %lo(gPauseBadgesPages) /* 13A860 80247520 AFBF00BC */ sw $ra, 0xBC($sp) /* 13A864 80247524 AFBE00B8 */ sw $fp, 0xB8($sp) /* 13A868 80247528 AFB700B4 */ sw $s7, 0xB4($sp) D_8024752C: /* 13A86C 8024752C AFB600B0 */ sw $s6, 0xB0($sp) /* 13A870 80247530 AFB500AC */ sw $s5, 0xAC($sp) /* 13A874 80247534 AFB400A8 */ sw $s4, 0xA8($sp) .L80247538: /* 13A878 80247538 AFB300A4 */ sw $s3, 0xA4($sp) /* 13A87C 8024753C AFB200A0 */ sw $s2, 0xA0($sp) /* 13A880 80247540 AFB1009C */ sw $s1, 0x9C($sp) /* 13A884 80247544 AFB00098 */ sw $s0, 0x98($sp) ### DECOMPILED C INSTRUCTIONS: void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { s32 pageIndex, i; s32 badgeIndex; s32 currentBadgeRow; s32 currentBadgeColumn; s32 style; s32 palette; s32 bpAvailable; s32 costBP; s32 canBeEquipped; PauseItemPage* page; s32 badgeListX; s32 badgeListY; s32 isEquipped; s32 isNone; s32 cannotBeEquipped; s32 x1, y1, x2, y2; s16 badgeID; s32 isSelected; s32 badgeEntryOffsetX, badgeEntryOffsetY; s32 posX, posY, cursorOffsetX, cursorOffsetY, selectedPosX, selectedPosY; s32 orbOffsetY; s32 numOrbs; s32 orbY, orbX; s32 bpAmount; s32 bpAvailOffsetX; s32 bpAvailOffsetY; f32 orbBlinkValue; s32 orbBlinkOpacity; s32 orbColorR, orbColorG, orbColorB; s32 orbColorR1, orbColorG1, orbColorB1; s32 badgeIconElement; s32 msg; s32 msgX, msgY; s32 msgOpacity; s32 maxBP; s32 itemIndex, j; s16* equippedBadges; s32 itemID; s32 orbIndex; s32* iconIDs; PlayerData* playerData = &gPlayerData; PauseItemPage* currentPage = &gPauseBadgesPages[gPauseBadgesCurrentPage]; costBP = 0; canBeEquipped = FALSE; style = DRAW_MSG_STYLE_MENU; bpAvailable = gPlayerData.maxBP - pause_get_total_equipped_bp_cost(); currentBadgeColumn = gPauseBadgesSelectedIndex / currentPage->numCols; currentBadgeRow = gPauseBadgesSelectedIndex % currentPage->numCols; draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_15, baseX + 84, baseY, 0, width - 84, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); hud_element_set_render_pos(gPauseBadgesIconIDs[20], baseX + 241, baseY + 11); palette = MSG_PAL_STANDARD; hud_element_draw_without_clipping(gPauseBadgesIconIDs[20]); x1 = baseX + 1; y1 = baseY + 14; x2 = baseX + width - 1; y2 = baseY + height - 9; if (x1 <= 0) { x1 = 1; } if (y1 <= 0) { y1 = 1; } if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) { return; } if (x2 >= SCREEN_WIDTH - 1) { x2 = SCREEN_WIDTH - 1; } if (y2 >= SCREEN_HEIGHT - 1) { y2 = SCREEN_HEIGHT - 1; } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2); badgeIndex = 0; for (i = 0; i < 3; i++) { for (pageIndex = 0; pageIndex < 20; pageIndex++) { iconIDs = gPauseBadgesIconIDs; badgeListX = baseX + 119; badgeListY = baseY + 17; page = &gPauseBadgesPages[pageIndex]; if (!page->enabled) { break; } pause_badges_get_pos_y(pageIndex, 0); for (itemIndex = 0; itemIndex < page->count; itemIndex++) { badgeID = gPauseBadgesItemIds[page->startIndex + itemIndex]; isEquipped = FALSE; isSelected = FALSE; equippedBadges = gPlayerData.equippedBadges; cannotBeEquipped = FALSE; if (badgeID == BADGE_INVALID) { continue; } posX = pause_badges_get_pos_x(pageIndex, itemIndex); posY = pause_badges_get_pos_y(pageIndex, itemIndex); isNone = badgeID == BADGE_NONE_STANDIN; for (j = 0; j < 64; equippedBadges++, j++) { if (badgeID == *equippedBadges) { isEquipped = TRUE; break; } } if (gPauseMenuCurrentTab == 2 && gPauseBadgesLevel == 1 && pause_badges_get_column(pageIndex, itemIndex) == currentBadgeRow && pause_badges_get_row(pageIndex, itemIndex) == currentBadgeColumn) { itemID = badgeID; isSelected = TRUE; if (!isNone) { costBP = gMoveTable[gItemTable[itemID].moveID].costBP; if (!isEquipped && bpAvailable >= costBP) { canBeEquipped = TRUE; } } } if (!isNone && bpAvailable < gMoveTable[gItemTable[badgeID].moveID].costBP) { cannotBeEquipped = TRUE; } badgeEntryOffsetX = 0; badgeEntryOffsetY = 0; if (isSelected) { badgeEntryOffsetX = -1; badgeEntryOffsetY = -1; } if (i == 0) { style = DRAW_MSG_STYLE_MENU; palette = MSG_PAL_STANDARD; if (isSelected) { style = DRAW_MSG_STYLE_MENU | DRAW_MSG_STYLE_DROP_SHADOW; } if (isEquipped) { draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_14, badgeListX + pause_badges_scroll_offset_x(posX) - 20, baseY + pause_badges_scroll_offset_y(posY) + 17, 0, 200, 13, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); } else if (cannotBeEquipped) { palette = MSG_PAL_0B; } } if (!pause_badges_is_visible(posY)) { continue; } if (i == 0) { if (isNone) { draw_msg(pause_get_menu_msg(PAUSE_MSG_NO_BADGE), badgeListX + pause_badges_scroll_offset_x(posX) + badgeEntryOffsetX, badgeListY + pause_badges_scroll_offset_y(posY) + badgeEntryOffsetY, 255, palette, style); } else { if (gItemTable[badgeID].nameMsg) { if (gItemTable[badgeID].nameMsg > 0) { draw_msg(gItemTable[badgeID].nameMsg, badgeListX + pause_badges_scroll_offset_x(posX) + badgeEntryOffsetX, badgeListY + pause_badges_scroll_offset_y(posY) + badgeEntryOffsetY, 255, palette, style); } } draw_number(gMoveTable[gItemTable[badgeID].moveID].costBP, baseX + 235 + pause_badges_scroll_offset_x(posX), baseY + 17 + pause_badges_scroll_offset_y(posY), DRAW_NUMBER_CHARSET_THIN, palette, 255, DRAW_NUMBER_STYLE_ALIGN_RIGHT | DRAW_NUMBER_STYLE_MONOSPACE); } } if (i == 1) { badgeIconElement = iconIDs[badgeIndex]; hud_element_clear_flags(badgeIconElement, HUD_ELEMENT_FLAG_DROP_SHADOW); hud_element_set_flags(badgeIconElement, HUD_ELEMENT_FLAG_FILTER_TEX); if (isNone) { badgeIconElement = gPauseBadgesIconIDs[21]; } else { if (isSelected) { hud_element_set_flags(badgeIconElement, HUD_ELEMENT_FLAG_DROP_SHADOW); gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[badgeID].hudElemID].enabled; } if (!isEquipped && cannotBeEquipped) { hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].hudElemID].disabled); } else { hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].hudElemID].enabled); } hud_element_set_scale(badgeIconElement, 0.670816f); } hud_element_set_render_pos(badgeIconElement, baseX + 107 + pause_badges_scroll_offset_x(posX) + badgeEntryOffsetX, baseY + 23 + pause_badges_scroll_offset_y(posY) + badgeEntryOffsetY); if (badgeIndex == 0) { hud_element_draw_without_clipping(badgeIconElement); } else { hud_element_draw_next(badgeIconElement); } badgeIndex++; } if (i == 2 && !isNone) { numOrbs = gMoveTable[gItemTable[badgeID].moveID].costBP; orbOffsetY = 1; if (numOrbs < 11) { orbOffsetY = 4; } orbColorR1 = 0; orbColorG1 = 255; orbColorB1 = 100; gSPDisplayList(gMainGfxPos++, gPauseDLOrbs); gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); if (isEquipped == 0) { for (j = 0; j < numOrbs; j++) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 227, 227, 227, 255); orbX = baseX + 235 + pause_badges_scroll_offset_x(posX) + 1 + (j % 5) * 6; orbY = baseY + 17 + pause_badges_scroll_offset_y(posY) + orbOffsetY; if (numOrbs >= 5) { orbY += j / 5 * 6 - 3; } pause_badges_draw_bp_orbs(0, orbX, orbY); } gDPPipeSync(gMainGfxPos++); gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); gDPSetPrimColor(gMainGfxPos++, 0, 0, orbColorR1, orbColorG1, orbColorB1, 128); for (j = 0; j < numOrbs; j++) { if (j < bpAvailable) { orbX = baseX + 235 + pause_badges_scroll_offset_x(posX) + 1 + (j % 5) * 6; orbY = baseY + 17 + pause_badges_scroll_offset_y(posY) + orbOffsetY; if (numOrbs >= 5) { orbY += j / 5 * 6 - 3; } pause_badges_draw_bp_orbs(1, orbX, orbY); } } } else { gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 255, 100, 255); for (j = 0; j < numOrbs; j++) { orbX = baseX + 235 + pause_badges_scroll_offset_x(posX) + 1 + (j % 5) * 6; orbY = baseY + 17 + pause_badges_scroll_offset_y(posY) + orbOffsetY; if (numOrbs >= 5) { orbY += j / 5 * 6 - 3; } pause_badges_draw_bp_orbs(2, orbX, orbY); } gDPPipeSync(gMainGfxPos++); } } } } } x1 = baseX + 1; y1 = baseY + 1; x2 = baseX + width - 1; y2 = baseY + height - 1; gDPPipeSync(gMainGfxPos++); if (x1 <= 0) { x1 = 1; } if (y1 <= 0) { y1 = 1; } if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) { return; } if (x2 >= SCREEN_WIDTH - 1) { x2 = SCREEN_WIDTH - 1; } if (y2 >= SCREEN_HEIGHT - 1) { y2 = SCREEN_HEIGHT - 1; } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2); if (gPauseMenuCurrentTab == 2 && gPauseBadgesLevel == 1) { if (gPauseBadgesCurrentPage > 0) { hud_element_set_render_pos(gPauseBadgesIconIDs[17], baseX + 278, baseY + 14); hud_element_draw_without_clipping(gPauseBadgesIconIDs[17]); } if (gPauseBadgesPages[gPauseBadgesCurrentPage + 1].enabled) { hud_element_set_render_pos(gPauseBadgesIconIDs[18], baseX + 278, baseY + 146); hud_element_draw_without_clipping(gPauseBadgesIconIDs[18]); } } hud_element_set_render_pos(gPauseBadgesIconIDs[16], baseX + OFFSET_1_X, baseY + OFFSET_1_Y); hud_element_draw_without_clipping(gPauseBadgesIconIDs[16]); draw_msg(pause_get_menu_msg(PAUSE_MSG_BADGE_BP), baseX + OFFSET_2_X, baseY + 74, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); draw_number(playerData->maxBP, baseX + OFFSET_3_X, baseY + OFFSET_3_Y, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); bpAmount = playerData->maxBP - pause_get_total_equipped_bp_cost(); bpAvailOffsetX = 0; bpAvailOffsetY = (playerData->maxBP - 1) / 10 * 8; if (bpAmount < 10) { bpAvailOffsetX = -4; } pause_draw_menu_label(PAUSE_LBL_AVAILABLE, baseX + 12, baseY + 100 + bpAvailOffsetY); draw_number(bpAmount, baseX + 73 + bpAvailOffsetX, baseY + 100 + bpAvailOffsetY, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); orbColorR = 0; orbColorG = 255; orbColorB = 100; maxBP = playerData->maxBP; gSPDisplayList(gMainGfxPos++, gPauseDLOrbs); gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); for (orbIndex = 0; orbIndex < maxBP; orbIndex++) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 227, 227, 227, 255); pause_badges_draw_bp_orbs(0, baseX + 11 + (orbIndex % 10) * 6, baseY + 92 + (orbIndex / 10) * 8); } gDPPipeSync(gMainGfxPos++); if (canBeEquipped) { gDPSetPrimColor(gMainGfxPos++, 0, 0, orbColorR, orbColorG, orbColorB, 255); for (orbIndex = 0; orbIndex < bpAvailable - costBP; orbIndex++) { pause_badges_draw_bp_orbs(2, baseX + 11 +(orbIndex % 10) * 6, baseY + 92 + (orbIndex / 10) * 8); } gDPPipeSync(gMainGfxPos++); orbBlinkValue = (sin_deg(gGameStatusPtr->frameCounter * 15) + 1.0f) * 0.2 + 0.5; gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); orbBlinkOpacity = orbBlinkValue * 255.0f; gDPSetPrimColor(gMainGfxPos++, 0, 0, orbColorR, orbColorG, orbColorB, orbBlinkOpacity); for (orbIndex = bpAvailable - costBP; orbIndex < bpAvailable; orbIndex++) { pause_badges_draw_bp_orbs(2, baseX + 11 +(orbIndex % 10) * 6, baseY + 92 + (orbIndex / 10) * 8); } gDPPipeSync(gMainGfxPos++); } else { gDPSetPrimColor(gMainGfxPos++, 0, 0, orbColorR, orbColorG, orbColorB, 255); for (orbIndex = 0; orbIndex < bpAvailable; orbIndex++) { pause_badges_draw_bp_orbs(2, baseX + 11 + (orbIndex % 10) * 6, baseY + 92 + (orbIndex / 10) * 8); } gDPPipeSync(gMainGfxPos++); } draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_13, gPauseBadgesCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0, 91, 34, 255, gPauseBadgesCurrentTab == 1 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); msg = pause_get_menu_msg(PAUSE_MSG_ALL_BADGES); msgX = baseX + 10; if (gPauseBadgesCurrentTab == 0) { msgX = baseX + 19; } msgOpacity = 255; msgY = baseY + 17; if (gPauseBadgesCurrentTab == 1) { msgOpacity = 191; } draw_msg(msg, msgX, msgY, msgOpacity, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_13, gPauseBadgesCurrentTab == 1 ? baseX + 9 : baseX, baseY + 37, 0, 91, 34, 255, gPauseBadgesCurrentTab == 0 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); msg = pause_get_menu_msg(PAUSE_MSG_ACTIVE); msgX = baseX + 12; if (gPauseBadgesCurrentTab == 1) { msgX = baseX + 21; } msgY = baseY + 42; msgOpacity = 255; if (gPauseBadgesCurrentTab == 0) { msgOpacity = 191; } draw_msg(msg, msgX, msgY, msgOpacity, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); msg = pause_get_menu_msg(PAUSE_MSG_BADGES); msgX = baseX + 26; if (gPauseBadgesCurrentTab == 1) { msgX = baseX + 35; } msgY = baseY + 52; msgOpacity = 255; if (gPauseBadgesCurrentTab == 0) { msgOpacity = 191; } draw_msg(msg, msgX, msgY, msgOpacity, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); if (gPauseMenuCurrentTab == 2) { if (gPauseBadgesLevel == 0) { pause_set_cursor_pos(32, baseX + 10, baseY + 26 + gPauseBadgesCurrentTab * 32); } else { selectedPosX = pause_badges_get_pos_x(gPauseBadgesCurrentPage, gPauseBadgesSelectedIndex - gPauseBadgesPages[gPauseBadgesCurrentPage].listStart * gPauseBadgesPages[gPauseBadgesCurrentPage].numCols); selectedPosY = pause_badges_get_pos_y(gPauseBadgesCurrentPage, gPauseBadgesSelectedIndex - gPauseBadgesPages[gPauseBadgesCurrentPage].listStart * gPauseBadgesPages[gPauseBadgesCurrentPage].numCols); cursorOffsetX = pause_badges_scroll_offset_x(selectedPosX); cursorOffsetY = pause_badges_scroll_offset_y(selectedPosY); if (cursorOffsetY < 0) { cursorOffsetY = 0; } else if (cursorOffsetY > 112) { cursorOffsetY = 112; } if (gPauseBadgesCurrentScrollPos != gPauseBadgesTargetScrollPos) { pause_set_cursor_pos_immediate(WINDOW_ID_PAUSE_BADGES, baseX + 93 + cursorOffsetX, baseY + 23 + cursorOffsetY); } else { pause_set_cursor_pos(WINDOW_ID_PAUSE_BADGES, baseX + 93 + cursorOffsetX, baseY + 23 + cursorOffsetY); } } } if (gPauseBadgesShowNotEnoughBP != 0) { pause_set_cursor_opacity(0); if (gPauseBadgesShowNotEnoughBP == 1) { draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 137, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); draw_msg(pause_get_menu_msg(PAUSE_MSG_NOT_ENOUGH_BP), baseX + 86, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); } else { draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 173, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); draw_msg(pause_get_menu_msg(PAUSE_MSG_DONT_WEAR_MORE), baseX + 90, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel fire_breath_appendGfx /* 372EF4 E006E764 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 372EF8 E006E768 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 372EFC E006E76C AFB500B4 */ sw $s5, 0xB4($sp) /* 372F00 E006E770 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 372F04 E006E774 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 372F08 E006E778 AFBF00C4 */ sw $ra, 0xC4($sp) /* 372F0C E006E77C AFBE00C0 */ sw $fp, 0xC0($sp) /* 372F10 E006E780 AFB700BC */ sw $s7, 0xBC($sp) /* 372F14 E006E784 AFB600B8 */ sw $s6, 0xB8($sp) /* 372F18 E006E788 AFB400B0 */ sw $s4, 0xB0($sp) /* 372F1C E006E78C AFB300AC */ sw $s3, 0xAC($sp) /* 372F20 E006E790 AFB200A8 */ sw $s2, 0xA8($sp) /* 372F24 E006E794 AFB100A4 */ sw $s1, 0xA4($sp) /* 372F28 E006E798 AFB000A0 */ sw $s0, 0xA0($sp) /* 372F2C E006E79C F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 372F30 E006E7A0 8EA50000 */ lw $a1, 0x0($s5) /* 372F34 E006E7A4 8C94000C */ lw $s4, 0xC($a0) /* 372F38 E006E7A8 00A0182D */ daddu $v1, $a1, $zero /* 372F3C E006E7AC 24A50008 */ addiu $a1, $a1, 0x8 /* 372F40 E006E7B0 AEA50000 */ sw $a1, 0x0($s5) /* 372F44 E006E7B4 8E860000 */ lw $a2, 0x0($s4) /* 372F48 E006E7B8 24A20008 */ addiu $v0, $a1, 0x8 /* 372F4C E006E7BC AEA20000 */ sw $v0, 0x0($s5) /* 372F50 E006E7C0 C682005C */ lwc1 $f2, 0x5C($s4) /* 372F54 E006E7C4 00061080 */ sll $v0, $a2, 2 /* 372F58 E006E7C8 3C0CE007 */ lui $t4, (0xE0070000 >> 16) /* 372F5C E006E7CC 01826021 */ addu $t4, $t4, $v0 /* 372F60 E006E7D0 8D8CEC00 */ lw $t4, -0x1400($t4) /* 372F64 E006E7D4 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 372F68 E006E7D8 AFAC0098 */ sw $t4, 0x98($sp) /* 372F6C E006E7DC 3C17E007 */ lui $s7, (0xE0070000 >> 16) /* 372F70 E006E7E0 02E2B821 */ addu $s7, $s7, $v0 /* 372F74 E006E7E4 8EF7EC0C */ lw $s7, -0x13F4($s7) /* 372F78 E006E7E8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 372F7C E006E7EC 4600110D */ trunc.w.s $f4, $f2 /* 372F80 E006E7F0 44162000 */ mfc1 $s6, $f4 /* 372F84 E006E7F4 00000000 */ nop /* 372F88 E006E7F8 44960000 */ mtc1 $s6, $f0 /* 372F8C E006E7FC 00000000 */ nop /* 372F90 E006E800 46800020 */ cvt.s.w $f0, $f0 /* 372F94 E006E804 46001081 */ sub.s $f2, $f2, $f0 /* 372F98 E006E808 AC620000 */ sw $v0, 0x0($v1) /* 372F9C E006E80C AC600004 */ sw $zero, 0x4($v1) /* 372FA0 E006E810 ACA70000 */ sw $a3, 0x0($a1) /* 372FA4 E006E814 8C820010 */ lw $v0, 0x10($a0) /* 372FA8 E006E818 3C014380 */ lui $at, (0x43800000 >> 16) /* 372FAC E006E81C 44810000 */ mtc1 $at, $f0 /* 372FB0 E006E820 8C42001C */ lw $v0, 0x1C($v0) /* 372FB4 E006E824 46001082 */ mul.s $f2, $f2, $f0 /* 372FB8 E006E828 00000000 */ nop /* 372FBC E006E82C 3C038000 */ lui $v1, (0x80000000 >> 16) /* 372FC0 E006E830 00431021 */ addu $v0, $v0, $v1 /* 372FC4 E006E834 ACA20004 */ sw $v0, 0x4($a1) /* 372FC8 E006E838 24020001 */ addiu $v0, $zero, 0x1 /* 372FCC E006E83C 4600110D */ trunc.w.s $f4, $f2 /* 372FD0 E006E840 441E2000 */ mfc1 $fp, $f4 /* 372FD4 E006E844 14C20051 */ bne $a2, $v0, .LE006E98C /* 372FD8 E006E848 3C0B0100 */ lui $t3, (0x1000080 >> 16) /* 372FDC E006E84C 27A40018 */ addiu $a0, $sp, 0x18 /* 372FE0 E006E850 3C120001 */ lui $s2, (0x11630 >> 16) /* 372FE4 E006E854 8E850018 */ lw $a1, 0x18($s4) /* 372FE8 E006E858 8E86001C */ lw $a2, 0x1C($s4) /* 372FEC E006E85C 8E870020 */ lw $a3, 0x20($s4) /* 372FF0 E006E860 0C080108 */ jal shim_guTranslateF /* 372FF4 E006E864 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 372FF8 E006E868 27B00058 */ addiu $s0, $sp, 0x58 /* 372FFC E006E86C 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 373000 E006E870 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 373004 E006E874 44800000 */ mtc1 $zero, $f0 /* 373008 E006E878 00031080 */ sll $v0, $v1, 2 /* 37300C E006E87C 00431021 */ addu $v0, $v0, $v1 /* 373010 E006E880 00021080 */ sll $v0, $v0, 2 /* 373014 E006E884 00431023 */ subu $v0, $v0, $v1 /* 373018 E006E888 000218C0 */ sll $v1, $v0, 3 /* 37301C E006E88C 00431021 */ addu $v0, $v0, $v1 /* 373020 E006E890 000210C0 */ sll $v0, $v0, 3 /* 373024 E006E894 44060000 */ mfc1 $a2, $f0 /* 373028 E006E898 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 37302C E006E89C 00220821 */ addu $at, $at, $v0 /* 373030 E006E8A0 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 373034 E006E8A4 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 373038 E006E8A8 46000007 */ neg.s $f0, $f0 /* 37303C E006E8AC 44050000 */ mfc1 $a1, $f0 /* 373040 E006E8B0 0200202D */ daddu $a0, $s0, $zero /* 373044 E006E8B4 0C080104 */ jal shim_guRotateF /* 373048 E006E8B8 AFA60010 */ sw $a2, 0x10($sp) /* 37304C E006E8BC 0200202D */ daddu $a0, $s0, $zero /* 373050 E006E8C0 27A50018 */ addiu $a1, $sp, 0x18 /* 373054 E006E8C4 0C080114 */ jal shim_guMtxCatF /* 373058 E006E8C8 00A0302D */ daddu $a2, $a1, $zero /* 37305C E006E8CC 27A40018 */ addiu $a0, $sp, 0x18 /* 373060 E006E8D0 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 373064 E006E8D4 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 373068 E006E8D8 3C11800A */ lui $s1, %hi(gDisplayContext) /* 37306C E006E8DC 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 373070 E006E8E0 96050000 */ lhu $a1, 0x0($s0) /* 373074 E006E8E4 8E220000 */ lw $v0, 0x0($s1) /* 373078 E006E8E8 00052980 */ sll $a1, $a1, 6 /* 37307C E006E8EC 00B22821 */ addu $a1, $a1, $s2 /* 373080 E006E8F0 0C080118 */ jal shim_guMtxF2L /* 373084 E006E8F4 00452821 */ addu $a1, $v0, $a1 /* 373088 E006E8F8 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 37308C E006E8FC 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 373090 E006E900 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 373094 E006E904 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 373098 E006E908 8EA40000 */ lw $a0, 0x0($s5) /* 37309C E006E90C 96020000 */ lhu $v0, 0x0($s0) /* 3730A0 E006E910 0080282D */ daddu $a1, $a0, $zero /* 3730A4 E006E914 24840008 */ addiu $a0, $a0, 0x8 /* 3730A8 E006E918 AEA40000 */ sw $a0, 0x0($s5) /* 3730AC E006E91C ACA30000 */ sw $v1, 0x0($a1) /* 3730B0 E006E920 24430001 */ addiu $v1, $v0, 0x1 /* 3730B4 E006E924 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3730B8 E006E928 00021180 */ sll $v0, $v0, 6 /* 3730BC E006E92C A6030000 */ sh $v1, 0x0($s0) /* 3730C0 E006E930 8E230000 */ lw $v1, 0x0($s1) /* 3730C4 E006E934 00521021 */ addu $v0, $v0, $s2 /* 3730C8 E006E938 00621821 */ addu $v1, $v1, $v0 /* 3730CC E006E93C 24820008 */ addiu $v0, $a0, 0x8 /* 3730D0 E006E940 ACA30004 */ sw $v1, 0x4($a1) /* 3730D4 E006E944 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 3730D8 E006E948 AEA20000 */ sw $v0, 0x0($s5) /* 3730DC E006E94C 3C020900 */ lui $v0, %hi(D_09000C20_415C80) /* 3730E0 E006E950 24420C20 */ addiu $v0, $v0, %lo(D_09000C20_415C80) /* 3730E4 E006E954 AC820004 */ sw $v0, 0x4($a0) /* 3730E8 E006E958 24820010 */ addiu $v0, $a0, 0x10 /* 3730EC E006E95C AC830000 */ sw $v1, 0x0($a0) /* 3730F0 E006E960 AEA20000 */ sw $v0, 0x0($s5) /* 3730F4 E006E964 3C020900 */ lui $v0, %hi(D_09000C00_415C60) /* 3730F8 E006E968 24420C00 */ addiu $v0, $v0, %lo(D_09000C00_415C60) /* 3730FC E006E96C AC82000C */ sw $v0, 0xC($a0) /* 373100 E006E970 24820018 */ addiu $v0, $a0, 0x18 /* 373104 E006E974 AC830008 */ sw $v1, 0x8($a0) /* 373108 E006E978 AEA20000 */ sw $v0, 0x0($s5) /* 37310C E006E97C 24020040 */ addiu $v0, $zero, 0x40 /* 373110 E006E980 AC860010 */ sw $a2, 0x10($a0) /* 373114 E006E984 AC820014 */ sw $v0, 0x14($a0) /* 373118 E006E988 3C0B0100 */ lui $t3, (0x1000080 >> 16) .LE006E98C: /* 37311C E006E98C 356B0080 */ ori $t3, $t3, (0x1000080 & 0xFFFF) /* 373120 E006E990 27A40018 */ addiu $a0, $sp, 0x18 /* 373124 E006E994 3C130001 */ lui $s3, (0x11630 >> 16) /* 373128 E006E998 3C12DE00 */ lui $s2, (0xDE000000 >> 16) /* 37312C E006E99C 8EA60000 */ lw $a2, 0x0($s5) /* 373130 E006E9A0 3C0AF200 */ lui $t2, (0xF2000000 >> 16) /* 373134 E006E9A4 00C0102D */ daddu $v0, $a2, $zero /* 373138 E006E9A8 24C60008 */ addiu $a2, $a2, 0x8 /* 37313C E006E9AC AEA60000 */ sw $a2, 0x0($s5) /* 373140 E006E9B0 AC520000 */ sw $s2, 0x0($v0) /* 373144 E006E9B4 AC570004 */ sw $s7, 0x4($v0) /* 373148 E006E9B8 24C20008 */ addiu $v0, $a2, 0x8 /* 37314C E006E9BC AEA20000 */ sw $v0, 0x0($s5) /* 373150 E006E9C0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 373154 E006E9C4 ACC20000 */ sw $v0, 0x0($a2) /* 373158 E006E9C8 92820067 */ lbu $v0, 0x67($s4) /* 37315C E006E9CC 9285006B */ lbu $a1, 0x6B($s4) /* 373160 E006E9D0 9287006F */ lbu $a3, 0x6F($s4) /* 373164 E006E9D4 92880043 */ lbu $t0, 0x43($s4) /* 373168 E006E9D8 24C30010 */ addiu $v1, $a2, 0x10 /* 37316C E006E9DC AEA30000 */ sw $v1, 0x0($s5) /* 373170 E006E9E0 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 373174 E006E9E4 ACC30008 */ sw $v1, 0x8($a2) /* 373178 E006E9E8 00161940 */ sll $v1, $s6, 5 /* 37317C E006E9EC 00021600 */ sll $v0, $v0, 24 /* 373180 E006E9F0 00052C00 */ sll $a1, $a1, 16 /* 373184 E006E9F4 00451025 */ or $v0, $v0, $a1 /* 373188 E006E9F8 00073A00 */ sll $a3, $a3, 8 /* 37318C E006E9FC 00471025 */ or $v0, $v0, $a3 /* 373190 E006EA00 00481025 */ or $v0, $v0, $t0 /* 373194 E006EA04 ACC20004 */ sw $v0, 0x4($a2) /* 373198 E006EA08 92870073 */ lbu $a3, 0x73($s4) /* 37319C E006EA0C 92880077 */ lbu $t0, 0x77($s4) /* 3731A0 E006EA10 9289007B */ lbu $t1, 0x7B($s4) /* 3731A4 E006EA14 24C20018 */ addiu $v0, $a2, 0x18 /* 3731A8 E006EA18 AEA20000 */ sw $v0, 0x0($s5) /* 3731AC E006EA1C 001611C0 */ sll $v0, $s6, 7 /* 3731B0 E006EA20 30420FFF */ andi $v0, $v0, 0xFFF /* 3731B4 E006EA24 00021300 */ sll $v0, $v0, 12 /* 3731B8 E006EA28 004A1025 */ or $v0, $v0, $t2 /* 3731BC E006EA2C ACC20010 */ sw $v0, 0x10($a2) /* 3731C0 E006EA30 24620020 */ addiu $v0, $v1, 0x20 /* 3731C4 E006EA34 00021080 */ sll $v0, $v0, 2 /* 3731C8 E006EA38 30420FFF */ andi $v0, $v0, 0xFFF /* 3731CC E006EA3C 00021300 */ sll $v0, $v0, 12 /* 3731D0 E006EA40 34450080 */ ori $a1, $v0, 0x80 /* 3731D4 E006EA44 ACC50014 */ sw $a1, 0x14($a2) /* 3731D8 E006EA48 24C50020 */ addiu $a1, $a2, 0x20 /* 3731DC E006EA4C 004A1025 */ or $v0, $v0, $t2 /* 3731E0 E006EA50 24630040 */ addiu $v1, $v1, 0x40 /* 3731E4 E006EA54 00031880 */ sll $v1, $v1, 2 /* 3731E8 E006EA58 30630FFF */ andi $v1, $v1, 0xFFF /* 3731EC E006EA5C 00031B00 */ sll $v1, $v1, 12 /* 3731F0 E006EA60 006B1825 */ or $v1, $v1, $t3 /* 3731F4 E006EA64 AEA50000 */ sw $a1, 0x0($s5) /* 3731F8 E006EA68 ACC20018 */ sw $v0, 0x18($a2) /* 3731FC E006EA6C 33C200FF */ andi $v0, $fp, 0xFF /* 373200 E006EA70 ACC3001C */ sw $v1, 0x1C($a2) /* 373204 E006EA74 00073E00 */ sll $a3, $a3, 24 /* 373208 E006EA78 00084400 */ sll $t0, $t0, 16 /* 37320C E006EA7C 00E83825 */ or $a3, $a3, $t0 /* 373210 E006EA80 00094A00 */ sll $t1, $t1, 8 /* 373214 E006EA84 00E93825 */ or $a3, $a3, $t1 /* 373218 E006EA88 00E23825 */ or $a3, $a3, $v0 /* 37321C E006EA8C ACC7000C */ sw $a3, 0xC($a2) /* 373220 E006EA90 8E85000C */ lw $a1, 0xC($s4) /* 373224 E006EA94 8E860010 */ lw $a2, 0x10($s4) /* 373228 E006EA98 8E870014 */ lw $a3, 0x14($s4) /* 37322C E006EA9C 4480A000 */ mtc1 $zero, $f20 /* 373230 E006EAA0 0C080108 */ jal shim_guTranslateF /* 373234 E006EAA4 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 373238 E006EAA8 27B00058 */ addiu $s0, $sp, 0x58 /* 37323C E006EAAC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 373240 E006EAB0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 373244 E006EAB4 4406A000 */ mfc1 $a2, $f20 /* 373248 E006EAB8 00031080 */ sll $v0, $v1, 2 /* 37324C E006EABC 00431021 */ addu $v0, $v0, $v1 /* 373250 E006EAC0 00021080 */ sll $v0, $v0, 2 /* 373254 E006EAC4 00431023 */ subu $v0, $v0, $v1 /* 373258 E006EAC8 000218C0 */ sll $v1, $v0, 3 /* 37325C E006EACC 00431021 */ addu $v0, $v0, $v1 /* 373260 E006EAD0 000210C0 */ sll $v0, $v0, 3 /* 373264 E006EAD4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 373268 E006EAD8 00220821 */ addu $at, $at, $v0 /* 37326C E006EADC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 373270 E006EAE0 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 373274 E006EAE4 46000007 */ neg.s $f0, $f0 /* 373278 E006EAE8 44050000 */ mfc1 $a1, $f0 /* 37327C E006EAEC 0200202D */ daddu $a0, $s0, $zero /* 373280 E006EAF0 0C080104 */ jal shim_guRotateF /* 373284 E006EAF4 E7B40010 */ swc1 $f20, 0x10($sp) /* 373288 E006EAF8 0200202D */ daddu $a0, $s0, $zero /* 37328C E006EAFC 27A50018 */ addiu $a1, $sp, 0x18 /* 373290 E006EB00 0C080114 */ jal shim_guMtxCatF /* 373294 E006EB04 00A0302D */ daddu $a2, $a1, $zero /* 373298 E006EB08 0200202D */ daddu $a0, $s0, $zero /* 37329C E006EB0C 8E850038 */ lw $a1, 0x38($s4) /* 3732A0 E006EB10 4407A000 */ mfc1 $a3, $f20 /* 3732A4 E006EB14 0C080110 */ jal shim_guScaleF /* 3732A8 E006EB18 00A0302D */ daddu $a2, $a1, $zero /* 3732AC E006EB1C 0200202D */ daddu $a0, $s0, $zero /* 3732B0 E006EB20 27A50018 */ addiu $a1, $sp, 0x18 /* 3732B4 E006EB24 0C080114 */ jal shim_guMtxCatF /* 3732B8 E006EB28 00A0302D */ daddu $a2, $a1, $zero /* 3732BC E006EB2C 27A40018 */ addiu $a0, $sp, 0x18 /* 3732C0 E006EB30 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3732C4 E006EB34 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3732C8 E006EB38 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3732CC E006EB3C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3732D0 E006EB40 96050000 */ lhu $a1, 0x0($s0) /* 3732D4 E006EB44 8E220000 */ lw $v0, 0x0($s1) /* 3732D8 E006EB48 00052980 */ sll $a1, $a1, 6 /* 3732DC E006EB4C 00B32821 */ addu $a1, $a1, $s3 /* 3732E0 E006EB50 0C080118 */ jal shim_guMtxF2L /* 3732E4 E006EB54 00452821 */ addu $a1, $v0, $a1 /* 3732E8 E006EB58 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3732EC E006EB5C 8EA40000 */ lw $a0, 0x0($s5) /* 3732F0 E006EB60 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3732F4 E006EB64 0080282D */ daddu $a1, $a0, $zero /* 3732F8 E006EB68 24840008 */ addiu $a0, $a0, 0x8 /* 3732FC E006EB6C AEA40000 */ sw $a0, 0x0($s5) /* 373300 E006EB70 96020000 */ lhu $v0, 0x0($s0) /* 373304 E006EB74 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 373308 E006EB78 ACA30000 */ sw $v1, 0x0($a1) /* 37330C E006EB7C 24430001 */ addiu $v1, $v0, 0x1 /* 373310 E006EB80 3042FFFF */ andi $v0, $v0, 0xFFFF /* 373314 E006EB84 00021180 */ sll $v0, $v0, 6 /* 373318 E006EB88 A6030000 */ sh $v1, 0x0($s0) /* 37331C E006EB8C 8E230000 */ lw $v1, 0x0($s1) /* 373320 E006EB90 00531021 */ addu $v0, $v0, $s3 /* 373324 E006EB94 00621821 */ addu $v1, $v1, $v0 /* 373328 E006EB98 24820008 */ addiu $v0, $a0, 0x8 /* 37332C E006EB9C ACA30004 */ sw $v1, 0x4($a1) /* 373330 E006EBA0 AEA20000 */ sw $v0, 0x0($s5) /* 373334 E006EBA4 AC920000 */ sw $s2, 0x0($a0) /* 373338 E006EBA8 8FAC0098 */ lw $t4, 0x98($sp) /* 37333C E006EBAC 24820010 */ addiu $v0, $a0, 0x10 /* 373340 E006EBB0 AC8C0004 */ sw $t4, 0x4($a0) /* 373344 E006EBB4 AEA20000 */ sw $v0, 0x0($s5) /* 373348 E006EBB8 24020040 */ addiu $v0, $zero, 0x40 /* 37334C E006EBBC AC860008 */ sw $a2, 0x8($a0) /* 373350 E006EBC0 AC82000C */ sw $v0, 0xC($a0) /* 373354 E006EBC4 8FBF00C4 */ lw $ra, 0xC4($sp) /* 373358 E006EBC8 8FBE00C0 */ lw $fp, 0xC0($sp) /* 37335C E006EBCC 8FB700BC */ lw $s7, 0xBC($sp) /* 373360 E006EBD0 8FB600B8 */ lw $s6, 0xB8($sp) /* 373364 E006EBD4 8FB500B4 */ lw $s5, 0xB4($sp) /* 373368 E006EBD8 8FB400B0 */ lw $s4, 0xB0($sp) /* 37336C E006EBDC 8FB300AC */ lw $s3, 0xAC($sp) /* 373370 E006EBE0 8FB200A8 */ lw $s2, 0xA8($sp) /* 373374 E006EBE4 8FB100A4 */ lw $s1, 0xA4($sp) /* 373378 E006EBE8 8FB000A0 */ lw $s0, 0xA0($sp) /* 37337C E006EBEC D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 373380 E006EBF0 03E00008 */ jr $ra /* 373384 E006EBF4 27BD00D0 */ addiu $sp, $sp, 0xD0 /* 373388 E006EBF8 00000000 */ nop /* 37338C E006EBFC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void fire_breath_appendGfx(void* effect) { Matrix4f sp18; Matrix4f sp58; FireBreathFXData* data = ((EffectInstance*)effect)->data.fireBreath; s32 type = data->type; s32 envAlpha = (data->unk_5C - (s32)data->unk_5C) * 256.0f; Gfx* dlist = D_E006EC00[type]; Gfx* dlist2 = D_E006EC0C[type]; s32 unk_5C = data->unk_5C; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); if (type == FIRE_BREATH_SMALL) { shim_guTranslateF(sp18, data->initPos.x, data->initPos.y, data->initPos.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); gSPDisplayList(gMainGfxPos++, D_09000C20_374000); gSPDisplayList(gMainGfxPos++, D_09000C00_373FE0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gSPDisplayList(gMainGfxPos++, dlist2); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, data->alpha); gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, envAlpha); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, ((unk_5C * 32) + 0) * 4, 0, ((unk_5C * 32) + 32) * 4, 128); gDPSetTileSize(gMainGfxPos++, 1, ((unk_5C * 32) + 32) * 4, 0, ((unk_5C * 32) + 64) * 4, 128); shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, data->scale, data->scale, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel calc_partner_test_enemy /* 1AC85C 8027DF7C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 1AC860 8027DF80 AFB1001C */ sw $s1, 0x1C($sp) /* 1AC864 8027DF84 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1AC868 8027DF88 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1AC86C 8027DF8C AFBF002C */ sw $ra, 0x2C($sp) /* 1AC870 8027DF90 AFB40028 */ sw $s4, 0x28($sp) /* 1AC874 8027DF94 AFB30024 */ sw $s3, 0x24($sp) /* 1AC878 8027DF98 AFB20020 */ sw $s2, 0x20($sp) /* 1AC87C 8027DF9C AFB00018 */ sw $s0, 0x18($sp) /* 1AC880 8027DFA0 962201A0 */ lhu $v0, 0x1A0($s1) /* 1AC884 8027DFA4 862401A0 */ lh $a0, 0x1A0($s1) /* 1AC888 8027DFA8 922301A2 */ lbu $v1, 0x1A2($s1) /* 1AC88C 8027DFAC 8E3400DC */ lw $s4, 0xDC($s1) /* 1AC890 8027DFB0 823201A2 */ lb $s2, 0x1A2($s1) /* 1AC894 8027DFB4 A62201A4 */ sh $v0, 0x1A4($s1) /* 1AC898 8027DFB8 0C09A75B */ jal get_actor /* 1AC89C 8027DFBC A22301A6 */ sb $v1, 0x1A6($s1) /* 1AC8A0 8027DFC0 0040982D */ daddu $s3, $v0, $zero /* 1AC8A4 8027DFC4 126000CF */ beqz $s3, .L8027E304 /* 1AC8A8 8027DFC8 2690000C */ addiu $s0, $s4, 0xC /* 1AC8AC 8027DFCC 0260202D */ daddu $a0, $s3, $zero /* 1AC8B0 8027DFD0 0C099117 */ jal get_actor_part /* 1AC8B4 8027DFD4 0240282D */ daddu $a1, $s2, $zero /* 1AC8B8 8027DFD8 0040902D */ daddu $s2, $v0, $zero /* 1AC8BC 8027DFDC 16400003 */ bnez $s2, .L8027DFEC /* 1AC8C0 8027DFE0 2402000C */ addiu $v0, $zero, 0xC .L8027DFE4: /* 1AC8C4 8027DFE4 0809F7F9 */ j .L8027DFE4 /* 1AC8C8 8027DFE8 00000000 */ nop .L8027DFEC: /* 1AC8CC 8027DFEC 82630214 */ lb $v1, 0x214($s3) /* 1AC8D0 8027DFF0 106200C5 */ beq $v1, $v0, .L8027E308 /* 1AC8D4 8027DFF4 24020008 */ addiu $v0, $zero, 0x8 /* 1AC8D8 8027DFF8 8E44007C */ lw $a0, 0x7C($s2) /* 1AC8DC 8027DFFC 30820020 */ andi $v0, $a0, 0x20 /* 1AC8E0 8027E000 144000C1 */ bnez $v0, .L8027E308 /* 1AC8E4 8027E004 24020006 */ addiu $v0, $zero, 0x6 /* 1AC8E8 8027E008 82630218 */ lb $v1, 0x218($s3) /* 1AC8EC 8027E00C 2402000E */ addiu $v0, $zero, 0xE /* 1AC8F0 8027E010 106200BD */ beq $v1, $v0, .L8027E308 /* 1AC8F4 8027E014 24020006 */ addiu $v0, $zero, 0x6 /* 1AC8F8 8027E018 8E220188 */ lw $v0, 0x188($s1) /* 1AC8FC 8027E01C 30420080 */ andi $v0, $v0, 0x80 /* 1AC900 8027E020 1040000F */ beqz $v0, .L8027E060 /* 1AC904 8027E024 30820010 */ andi $v0, $a0, 0x10 /* 1AC908 8027E028 1040000E */ beqz $v0, .L8027E064 /* 1AC90C 8027E02C 3C031000 */ lui $v1, (0x10000080 >> 16) /* 1AC910 8027E030 8E620004 */ lw $v0, 0x4($s3) /* 1AC914 8027E034 30420800 */ andi $v0, $v0, 0x800 /* 1AC918 8027E038 1440000A */ bnez $v0, .L8027E064 /* 1AC91C 8027E03C 24040108 */ addiu $a0, $zero, 0x108 /* 1AC920 8027E040 C6000014 */ lwc1 $f0, 0x14($s0) /* 1AC924 8027E044 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AC928 8027E048 8E06000C */ lw $a2, 0xC($s0) /* 1AC92C 8027E04C 8E070010 */ lw $a3, 0x10($s0) /* 1AC930 8027E050 0C052757 */ jal sfx_play_sound_at_position /* 1AC934 8027E054 0000282D */ daddu $a1, $zero, $zero /* 1AC938 8027E058 0809F8C2 */ j .L8027E308 /* 1AC93C 8027E05C 24020004 */ addiu $v0, $zero, 0x4 .L8027E060: /* 1AC940 8027E060 3C031000 */ lui $v1, (0x10000080 >> 16) .L8027E064: /* 1AC944 8027E064 8E220188 */ lw $v0, 0x188($s1) /* 1AC948 8027E068 34630080 */ ori $v1, $v1, (0x10000080 & 0xFFFF) /* 1AC94C 8027E06C 00431024 */ and $v0, $v0, $v1 /* 1AC950 8027E070 1440001B */ bnez $v0, .L8027E0E0 /* 1AC954 8027E074 3C031000 */ lui $v1, (0x10000040 >> 16) /* 1AC958 8027E078 8E42007C */ lw $v0, 0x7C($s2) /* 1AC95C 8027E07C 3C030001 */ lui $v1, (0x10000 >> 16) /* 1AC960 8027E080 00431024 */ and $v0, $v0, $v1 /* 1AC964 8027E084 10400016 */ beqz $v0, .L8027E0E0 /* 1AC968 8027E088 3C031000 */ lui $v1, (0x10000040 >> 16) /* 1AC96C 8027E08C 8E22018C */ lw $v0, 0x18C($s1) /* 1AC970 8027E090 30420004 */ andi $v0, $v0, 0x4 /* 1AC974 8027E094 14400012 */ bnez $v0, .L8027E0E0 /* 1AC978 8027E098 0280202D */ daddu $a0, $s4, $zero /* 1AC97C 8027E09C 0C099CAB */ jal player_team_is_ability_active /* 1AC980 8027E0A0 24050002 */ addiu $a1, $zero, 0x2 /* 1AC984 8027E0A4 1440000E */ bnez $v0, .L8027E0E0 /* 1AC988 8027E0A8 3C031000 */ lui $v1, (0x10000040 >> 16) /* 1AC98C 8027E0AC C6000014 */ lwc1 $f0, 0x14($s0) /* 1AC990 8027E0B0 24040108 */ addiu $a0, $zero, 0x108 /* 1AC994 8027E0B4 E7A00010 */ swc1 $f0, 0x10($sp) /* 1AC998 8027E0B8 8E06000C */ lw $a2, 0xC($s0) /* 1AC99C 8027E0BC 8E070010 */ lw $a3, 0x10($s0) /* 1AC9A0 8027E0C0 0C052757 */ jal sfx_play_sound_at_position /* 1AC9A4 8027E0C4 0000282D */ daddu $a1, $zero, $zero /* 1AC9A8 8027E0C8 24040001 */ addiu $a0, $zero, 0x1 /* 1AC9AC 8027E0CC 0C09FEE7 */ jal dispatch_damage_event_partner_1 /* 1AC9B0 8027E0D0 2405002A */ addiu $a1, $zero, 0x2A /* 1AC9B4 8027E0D4 0260202D */ daddu $a0, $s3, $zero /* 1AC9B8 8027E0D8 0809F8BB */ j .L8027E2EC /* 1AC9BC 8027E0DC 2405001B */ addiu $a1, $zero, 0x1B .L8027E0E0: /* 1AC9C0 8027E0E0 8E220188 */ lw $v0, 0x188($s1) /* 1AC9C4 8027E0E4 34630040 */ ori $v1, $v1, (0x10000040 & 0xFFFF) /* 1AC9C8 8027E0E8 00431024 */ and $v0, $v0, $v1 /* 1AC9CC 8027E0EC 14400009 */ bnez $v0, .L8027E114 /* 1AC9D0 8027E0F0 00000000 */ nop /* 1AC9D4 8027E0F4 8E42007C */ lw $v0, 0x7C($s2) /* 1AC9D8 8027E0F8 30420002 */ andi $v0, $v0, 0x2 /* 1AC9DC 8027E0FC 10400005 */ beqz $v0, .L8027E114 /* 1AC9E0 8027E100 00000000 */ nop /* 1AC9E4 8027E104 8E22018C */ lw $v0, 0x18C($s1) /* 1AC9E8 8027E108 30420010 */ andi $v0, $v0, 0x10 /* 1AC9EC 8027E10C 1040006B */ beqz $v0, .L8027E2BC /* 1AC9F0 8027E110 00000000 */ nop .L8027E114: /* 1AC9F4 8027E114 8E230188 */ lw $v1, 0x188($s1) /* 1AC9F8 8027E118 30628000 */ andi $v0, $v1, 0x8000 /* 1AC9FC 8027E11C 10400079 */ beqz $v0, .L8027E304 /* 1ACA00 8027E120 3C021000 */ lui $v0, (0x10000000 >> 16) /* 1ACA04 8027E124 00621024 */ and $v0, $v1, $v0 /* 1ACA08 8027E128 14400036 */ bnez $v0, .L8027E204 /* 1ACA0C 8027E12C 00000000 */ nop /* 1ACA10 8027E130 8E42007C */ lw $v0, 0x7C($s2) /* 1ACA14 8027E134 30420010 */ andi $v0, $v0, 0x10 /* 1ACA18 8027E138 10400015 */ beqz $v0, .L8027E190 /* 1ACA1C 8027E13C 00000000 */ nop /* 1ACA20 8027E140 8E620000 */ lw $v0, 0x0($s3) /* 1ACA24 8027E144 30420800 */ andi $v0, $v0, 0x800 /* 1ACA28 8027E148 14400011 */ bnez $v0, .L8027E190 /* 1ACA2C 8027E14C 00000000 */ nop /* 1ACA30 8027E150 8E22018C */ lw $v0, 0x18C($s1) /* 1ACA34 8027E154 30420001 */ andi $v0, $v0, 0x1 /* 1ACA38 8027E158 1440000D */ bnez $v0, .L8027E190 /* 1ACA3C 8027E15C 24040108 */ addiu $a0, $zero, 0x108 /* 1ACA40 8027E160 C6000014 */ lwc1 $f0, 0x14($s0) /* 1ACA44 8027E164 E7A00010 */ swc1 $f0, 0x10($sp) /* 1ACA48 8027E168 8E06000C */ lw $a2, 0xC($s0) /* 1ACA4C 8027E16C 8E070010 */ lw $a3, 0x10($s0) /* 1ACA50 8027E170 0C052757 */ jal sfx_play_sound_at_position /* 1ACA54 8027E174 0000282D */ daddu $a1, $zero, $zero /* 1ACA58 8027E178 24040001 */ addiu $a0, $zero, 0x1 /* 1ACA5C 8027E17C 0C09FEE7 */ jal dispatch_damage_event_partner_1 /* 1ACA60 8027E180 2405002A */ addiu $a1, $zero, 0x2A /* 1ACA64 8027E184 0260202D */ daddu $a0, $s3, $zero /* 1ACA68 8027E188 0809F8BB */ j .L8027E2EC /* 1ACA6C 8027E18C 2405001B */ addiu $a1, $zero, 0x1B .L8027E190: /* 1ACA70 8027E190 8E220188 */ lw $v0, 0x188($s1) /* 1ACA74 8027E194 3C031000 */ lui $v1, (0x10000000 >> 16) /* 1ACA78 8027E198 00431024 */ and $v0, $v0, $v1 /* 1ACA7C 8027E19C 14400019 */ bnez $v0, .L8027E204 /* 1ACA80 8027E1A0 3C030020 */ lui $v1, (0x200000 >> 16) /* 1ACA84 8027E1A4 8E42007C */ lw $v0, 0x7C($s2) /* 1ACA88 8027E1A8 00431024 */ and $v0, $v0, $v1 /* 1ACA8C 8027E1AC 10400015 */ beqz $v0, .L8027E204 /* 1ACA90 8027E1B0 00000000 */ nop /* 1ACA94 8027E1B4 8E620000 */ lw $v0, 0x0($s3) /* 1ACA98 8027E1B8 30420800 */ andi $v0, $v0, 0x800 /* 1ACA9C 8027E1BC 14400011 */ bnez $v0, .L8027E204 /* 1ACAA0 8027E1C0 00000000 */ nop /* 1ACAA4 8027E1C4 8E22018C */ lw $v0, 0x18C($s1) /* 1ACAA8 8027E1C8 30420080 */ andi $v0, $v0, 0x80 /* 1ACAAC 8027E1CC 1440000D */ bnez $v0, .L8027E204 /* 1ACAB0 8027E1D0 24040108 */ addiu $a0, $zero, 0x108 /* 1ACAB4 8027E1D4 C6000014 */ lwc1 $f0, 0x14($s0) /* 1ACAB8 8027E1D8 E7A00010 */ swc1 $f0, 0x10($sp) /* 1ACABC 8027E1DC 8E06000C */ lw $a2, 0xC($s0) /* 1ACAC0 8027E1E0 8E070010 */ lw $a3, 0x10($s0) /* 1ACAC4 8027E1E4 0C052757 */ jal sfx_play_sound_at_position /* 1ACAC8 8027E1E8 0000282D */ daddu $a1, $zero, $zero /* 1ACACC 8027E1EC 24040001 */ addiu $a0, $zero, 0x1 /* 1ACAD0 8027E1F0 0C09FEE7 */ jal dispatch_damage_event_partner_1 /* 1ACAD4 8027E1F4 2405002A */ addiu $a1, $zero, 0x2A /* 1ACAD8 8027E1F8 0260202D */ daddu $a0, $s3, $zero /* 1ACADC 8027E1FC 0809F8BB */ j .L8027E2EC /* 1ACAE0 8027E200 2405001B */ addiu $a1, $zero, 0x1B .L8027E204: /* 1ACAE4 8027E204 82820212 */ lb $v0, 0x212($s4) /* 1ACAE8 8027E208 2403000B */ addiu $v1, $zero, 0xB /* 1ACAEC 8027E20C 5043001E */ beql $v0, $v1, .L8027E288 /* 1ACAF0 8027E210 3C031000 */ lui $v1, (0x10000040 >> 16) /* 1ACAF4 8027E214 82620212 */ lb $v0, 0x212($s3) /* 1ACAF8 8027E218 10430005 */ beq $v0, $v1, .L8027E230 /* 1ACAFC 8027E21C 00000000 */ nop /* 1ACB00 8027E220 8E42007C */ lw $v0, 0x7C($s2) /* 1ACB04 8027E224 30420080 */ andi $v0, $v0, 0x80 /* 1ACB08 8027E228 10400017 */ beqz $v0, .L8027E288 /* 1ACB0C 8027E22C 3C031000 */ lui $v1, (0x10000040 >> 16) .L8027E230: /* 1ACB10 8027E230 8E220188 */ lw $v0, 0x188($s1) /* 1ACB14 8027E234 3C031000 */ lui $v1, (0x10000040 >> 16) /* 1ACB18 8027E238 00431024 */ and $v0, $v0, $v1 /* 1ACB1C 8027E23C 14400012 */ bnez $v0, .L8027E288 /* 1ACB20 8027E240 00000000 */ nop /* 1ACB24 8027E244 8E22018C */ lw $v0, 0x18C($s1) /* 1ACB28 8027E248 30420008 */ andi $v0, $v0, 0x8 /* 1ACB2C 8027E24C 1440000E */ bnez $v0, .L8027E288 /* 1ACB30 8027E250 2404037B */ addiu $a0, $zero, 0x37B /* 1ACB34 8027E254 C6000014 */ lwc1 $f0, 0x14($s0) /* 1ACB38 8027E258 E7A00010 */ swc1 $f0, 0x10($sp) /* 1ACB3C 8027E25C 8E06000C */ lw $a2, 0xC($s0) /* 1ACB40 8027E260 8E070010 */ lw $a3, 0x10($s0) /* 1ACB44 8027E264 0C052757 */ jal sfx_play_sound_at_position /* 1ACB48 8027E268 0000282D */ daddu $a1, $zero, $zero /* 1ACB4C 8027E26C 0C09451D */ jal apply_shock_effect /* 1ACB50 8027E270 0280202D */ daddu $a0, $s4, $zero /* 1ACB54 8027E274 24040001 */ addiu $a0, $zero, 0x1 /* 1ACB58 8027E278 0C09FEE7 */ jal dispatch_damage_event_partner_1 /* 1ACB5C 8027E27C 2405002F */ addiu $a1, $zero, 0x2F /* 1ACB60 8027E280 0809F8C2 */ j .L8027E308 /* 1ACB64 8027E284 2402FFFF */ addiu $v0, $zero, -0x1 .L8027E288: /* 1ACB68 8027E288 8E220188 */ lw $v0, 0x188($s1) /* 1ACB6C 8027E28C 34630040 */ ori $v1, $v1, (0x10000040 & 0xFFFF) /* 1ACB70 8027E290 00431024 */ and $v0, $v0, $v1 /* 1ACB74 8027E294 14400019 */ bnez $v0, .L8027E2FC /* 1ACB78 8027E298 0260202D */ daddu $a0, $s3, $zero /* 1ACB7C 8027E29C 8E42007C */ lw $v0, 0x7C($s2) /* 1ACB80 8027E2A0 30420002 */ andi $v0, $v0, 0x2 /* 1ACB84 8027E2A4 10400015 */ beqz $v0, .L8027E2FC /* 1ACB88 8027E2A8 00000000 */ nop /* 1ACB8C 8027E2AC 8E22018C */ lw $v0, 0x18C($s1) /* 1ACB90 8027E2B0 30420010 */ andi $v0, $v0, 0x10 /* 1ACB94 8027E2B4 14400011 */ bnez $v0, .L8027E2FC /* 1ACB98 8027E2B8 00000000 */ nop .L8027E2BC: /* 1ACB9C 8027E2BC C6000014 */ lwc1 $f0, 0x14($s0) /* 1ACBA0 8027E2C0 240400EA */ addiu $a0, $zero, 0xEA /* 1ACBA4 8027E2C4 E7A00010 */ swc1 $f0, 0x10($sp) /* 1ACBA8 8027E2C8 8E06000C */ lw $a2, 0xC($s0) /* 1ACBAC 8027E2CC 8E070010 */ lw $a3, 0x10($s0) /* 1ACBB0 8027E2D0 0C052757 */ jal sfx_play_sound_at_position /* 1ACBB4 8027E2D4 0000282D */ daddu $a1, $zero, $zero /* 1ACBB8 8027E2D8 24040001 */ addiu $a0, $zero, 0x1 /* 1ACBBC 8027E2DC 0C09FEE7 */ jal dispatch_damage_event_partner_1 /* 1ACBC0 8027E2E0 2405002C */ addiu $a1, $zero, 0x2C /* 1ACBC4 8027E2E4 0260202D */ daddu $a0, $s3, $zero /* 1ACBC8 8027E2E8 2405001C */ addiu $a1, $zero, 0x1C .L8027E2EC: /* 1ACBCC 8027E2EC 0C09DC58 */ jal dispatch_event_actor /* 1ACBD0 8027E2F0 00000000 */ nop /* 1ACBD4 8027E2F4 0809F8C2 */ j .L8027E308 /* 1ACBD8 8027E2F8 2402FFFF */ addiu $v0, $zero, -0x1 .L8027E2FC: /* 1ACBDC 8027E2FC 0C09DC58 */ jal dispatch_event_actor /* 1ACBE0 8027E300 2405003A */ addiu $a1, $zero, 0x3A .L8027E304: /* 1ACBE4 8027E304 0000102D */ daddu $v0, $zero, $zero .L8027E308: /* 1ACBE8 8027E308 8FBF002C */ lw $ra, 0x2C($sp) /* 1ACBEC 8027E30C 8FB40028 */ lw $s4, 0x28($sp) /* 1ACBF0 8027E310 8FB30024 */ lw $s3, 0x24($sp) /* 1ACBF4 8027E314 8FB20020 */ lw $s2, 0x20($sp) /* 1ACBF8 8027E318 8FB1001C */ lw $s1, 0x1C($sp) /* 1ACBFC 8027E31C 8FB00018 */ lw $s0, 0x18($sp) /* 1ACC00 8027E320 03E00008 */ jr $ra /* 1ACC04 8027E324 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: HitResult calc_partner_test_enemy(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; s32 currentTargetID = battleStatus->currentTargetID; s32 currentTargetPart = battleStatus->currentTargetPart; Actor* target; ActorState* state; ActorPart* part; battleStatus->currentTargetID2 = battleStatus->currentTargetID; battleStatus->currentTargetPart2 = battleStatus->currentTargetPart; target = get_actor(currentTargetID); state = &partner->state; if (target == NULL) { return HIT_RESULT_HIT; } part = get_actor_part(target, currentTargetPart); ASSERT(part != NULL); if (target->stoneStatus == STATUS_KEY_STONE) { return HIT_RESULT_IMMUNE; } if ((part->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) || target->transparentStatus == STATUS_KEY_TRANSPARENT) { return HIT_RESULT_MISS; } // check partner jumping on top-spiky enemy (cannot be suppressed) if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) && (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) && !(target->flags2 & ACTOR_FLAG_UPSIDE_DOWN) ) { sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); return HIT_RESULT_LANDED_ON_SPIKE; } // check partner contacting front-spiky enemy if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP)) && (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT) && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT) && !player_team_is_ability_active(partner, ABILITY_SPIKE_SHIELD) ) { sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT); dispatch_event_actor(target, EVENT_SPIKE_TAUNT); return HIT_RESULT_BACKFIRE; } // check partner contacting fiery enemy if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH)) && (part->eventFlags & ACTOR_EVENT_FLAG_FIREY) && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT) ) { sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT); dispatch_event_actor(target, EVENT_BURN_TAUNT); return HIT_RESULT_BACKFIRE; } // specifal handling for air lift if (battleStatus->currentAttackElement & DAMAGE_TYPE_AIR_LIFT) { // check partner airlifting top-spiky enemy if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)) { if ((part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) && !(target->flags & ACTOR_FLAG_UPSIDE_DOWN) && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SPIKY_TOP) ) { sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT); dispatch_event_actor(target, EVENT_SPIKE_TAUNT); return HIT_RESULT_BACKFIRE; } if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && (part->eventFlags & ACTOR_EVENT_FLAG_200000) && !(target->flags & ACTOR_FLAG_UPSIDE_DOWN) && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_FLAG_80) ) { sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT); dispatch_event_actor(target, EVENT_SPIKE_TAUNT); return HIT_RESULT_BACKFIRE; } } // check partner airlifting electrified enemy if (partner->staticStatus != STATUS_KEY_STATIC && (target->staticStatus == STATUS_KEY_STATIC || (part->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)) { sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); apply_shock_effect(partner); dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT); return HIT_RESULT_BACKFIRE; } // check partner airlifting fiery enemy if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH)) && (part->eventFlags & ACTOR_EVENT_FLAG_FIREY) && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)) { sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT); dispatch_event_actor(target, EVENT_BURN_TAUNT); return HIT_RESULT_BACKFIRE; } dispatch_event_actor(target, EVENT_BEGIN_AIR_LIFT); } return HIT_RESULT_HIT; }
### RAW ASSEMBLY INSTRUCTIONS: glabel __udivdi3 /* 49710 8006E310 00E0482D */ daddu $t1, $a3, $zero /* 49714 8006E314 00C0402D */ daddu $t0, $a2, $zero /* 49718 8006E318 150000DF */ bnez $t0, .L8006E698 /* 4971C 8006E31C 00A0582D */ daddu $t3, $a1, $zero /* 49720 8006E320 0089102B */ sltu $v0, $a0, $t1 /* 49724 8006E324 1040004E */ beqz $v0, .L8006E460 /* 49728 8006E328 3402FFFF */ ori $v0, $zero, 0xFFFF /* 4972C 8006E32C 0049102B */ sltu $v0, $v0, $t1 /* 49730 8006E330 14400005 */ bnez $v0, .L8006E348 /* 49734 8006E334 00E0302D */ daddu $a2, $a3, $zero /* 49738 8006E338 2D220100 */ sltiu $v0, $t1, 0x100 /* 4973C 8006E33C 38420001 */ xori $v0, $v0, 0x1 /* 49740 8006E340 0801B8D8 */ j .L8006E360 /* 49744 8006E344 000218C0 */ sll $v1, $v0, 3 .L8006E348: /* 49748 8006E348 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 4974C 8006E34C 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 49750 8006E350 0049102B */ sltu $v0, $v0, $t1 /* 49754 8006E354 14400002 */ bnez $v0, .L8006E360 /* 49758 8006E358 24030018 */ addiu $v1, $zero, 0x18 /* 4975C 8006E35C 24030010 */ addiu $v1, $zero, 0x10 .L8006E360: /* 49760 8006E360 00661006 */ srlv $v0, $a2, $v1 /* 49764 8006E364 3C01800A */ lui $at, %hi(D_8009A040) /* 49768 8006E368 00220821 */ addu $at, $at, $v0 /* 4976C 8006E36C 9022A040 */ lbu $v0, %lo(D_8009A040)($at) /* 49770 8006E370 24050020 */ addiu $a1, $zero, 0x20 /* 49774 8006E374 00431021 */ addu $v0, $v0, $v1 /* 49778 8006E378 00A23023 */ subu $a2, $a1, $v0 /* 4977C 8006E37C 10C00006 */ beqz $a2, .L8006E398 /* 49780 8006E380 00C41804 */ sllv $v1, $a0, $a2 /* 49784 8006E384 00C94804 */ sllv $t1, $t1, $a2 /* 49788 8006E388 00A61023 */ subu $v0, $a1, $a2 /* 4978C 8006E38C 004B1006 */ srlv $v0, $t3, $v0 /* 49790 8006E390 00622025 */ or $a0, $v1, $v0 /* 49794 8006E394 00CB5804 */ sllv $t3, $t3, $a2 .L8006E398: /* 49798 8006E398 00093402 */ srl $a2, $t1, 16 /* 4979C 8006E39C 14C00002 */ bnez $a2, .L8006E3A8 /* 497A0 8006E3A0 0086001B */ divu $zero, $a0, $a2 /* 497A4 8006E3A4 0007000D */ break 7 .L8006E3A8: /* 497A8 8006E3A8 00003812 */ mflo $a3 /* 497AC 8006E3AC 00001810 */ mfhi $v1 /* 497B0 8006E3B0 3128FFFF */ andi $t0, $t1, 0xFFFF /* 497B4 8006E3B4 00000000 */ nop /* 497B8 8006E3B8 00E80018 */ mult $a3, $t0 /* 497BC 8006E3BC 000B1402 */ srl $v0, $t3, 16 /* 497C0 8006E3C0 00031C00 */ sll $v1, $v1, 16 /* 497C4 8006E3C4 00621825 */ or $v1, $v1, $v0 /* 497C8 8006E3C8 00002812 */ mflo $a1 /* 497CC 8006E3CC 0065102B */ sltu $v0, $v1, $a1 /* 497D0 8006E3D0 5040000B */ beql $v0, $zero, .L8006E400 /* 497D4 8006E3D4 00651823 */ subu $v1, $v1, $a1 /* 497D8 8006E3D8 00691821 */ addu $v1, $v1, $t1 /* 497DC 8006E3DC 0069102B */ sltu $v0, $v1, $t1 /* 497E0 8006E3E0 14400006 */ bnez $v0, .L8006E3FC /* 497E4 8006E3E4 24E7FFFF */ addiu $a3, $a3, -0x1 /* 497E8 8006E3E8 0065102B */ sltu $v0, $v1, $a1 /* 497EC 8006E3EC 50400004 */ beql $v0, $zero, .L8006E400 /* 497F0 8006E3F0 00651823 */ subu $v1, $v1, $a1 /* 497F4 8006E3F4 24E7FFFF */ addiu $a3, $a3, -0x1 /* 497F8 8006E3F8 00691821 */ addu $v1, $v1, $t1 .L8006E3FC: /* 497FC 8006E3FC 00651823 */ subu $v1, $v1, $a1 .L8006E400: /* 49800 8006E400 14C00002 */ bnez $a2, .L8006E40C /* 49804 8006E404 0066001B */ divu $zero, $v1, $a2 /* 49808 8006E408 0007000D */ break 7 .L8006E40C: /* 4980C 8006E40C 00002012 */ mflo $a0 /* 49810 8006E410 00001810 */ mfhi $v1 /* 49814 8006E414 00000000 */ nop /* 49818 8006E418 00000000 */ nop /* 4981C 8006E41C 00880018 */ mult $a0, $t0 /* 49820 8006E420 3162FFFF */ andi $v0, $t3, 0xFFFF /* 49824 8006E424 00031C00 */ sll $v1, $v1, 16 /* 49828 8006E428 00621825 */ or $v1, $v1, $v0 /* 4982C 8006E42C 00002812 */ mflo $a1 /* 49830 8006E430 0065102B */ sltu $v0, $v1, $a1 /* 49834 8006E434 10400007 */ beqz $v0, .L8006E454 /* 49838 8006E438 00691821 */ addu $v1, $v1, $t1 /* 4983C 8006E43C 0069102B */ sltu $v0, $v1, $t1 /* 49840 8006E440 14400004 */ bnez $v0, .L8006E454 /* 49844 8006E444 2484FFFF */ addiu $a0, $a0, -0x1 /* 49848 8006E448 0065102B */ sltu $v0, $v1, $a1 /* 4984C 8006E44C 54400001 */ bnel $v0, $zero, .L8006E454 /* 49850 8006E450 2484FFFF */ addiu $a0, $a0, -0x1 .L8006E454: /* 49854 8006E454 00071400 */ sll $v0, $a3, 16 /* 49858 8006E458 0801BA13 */ j .L8006E84C /* 4985C 8006E45C 00443025 */ or $a2, $v0, $a0 .L8006E460: /* 49860 8006E460 15200008 */ bnez $t1, .L8006E484 /* 49864 8006E464 0049102B */ sltu $v0, $v0, $t1 /* 49868 8006E468 24020001 */ addiu $v0, $zero, 0x1 /* 4986C 8006E46C 15000002 */ bnez $t0, .L8006E478 /* 49870 8006E470 0048001B */ divu $zero, $v0, $t0 /* 49874 8006E474 0007000D */ break 7 .L8006E478: /* 49878 8006E478 00004812 */ mflo $t1 /* 4987C 8006E47C 3402FFFF */ ori $v0, $zero, 0xFFFF /* 49880 8006E480 0049102B */ sltu $v0, $v0, $t1 .L8006E484: /* 49884 8006E484 14400005 */ bnez $v0, .L8006E49C /* 49888 8006E488 0120282D */ daddu $a1, $t1, $zero /* 4988C 8006E48C 2D220100 */ sltiu $v0, $t1, 0x100 /* 49890 8006E490 38420001 */ xori $v0, $v0, 0x1 /* 49894 8006E494 0801B92D */ j .L8006E4B4 /* 49898 8006E498 000218C0 */ sll $v1, $v0, 3 .L8006E49C: /* 4989C 8006E49C 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 498A0 8006E4A0 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 498A4 8006E4A4 0049102B */ sltu $v0, $v0, $t1 /* 498A8 8006E4A8 14400002 */ bnez $v0, .L8006E4B4 /* 498AC 8006E4AC 24030018 */ addiu $v1, $zero, 0x18 /* 498B0 8006E4B0 24030010 */ addiu $v1, $zero, 0x10 .L8006E4B4: /* 498B4 8006E4B4 00651006 */ srlv $v0, $a1, $v1 /* 498B8 8006E4B8 3C01800A */ lui $at, %hi(D_8009A040) /* 498BC 8006E4BC 00220821 */ addu $at, $at, $v0 /* 498C0 8006E4C0 9022A040 */ lbu $v0, %lo(D_8009A040)($at) /* 498C4 8006E4C4 00431021 */ addu $v0, $v0, $v1 /* 498C8 8006E4C8 24030020 */ addiu $v1, $zero, 0x20 /* 498CC 8006E4CC 00623023 */ subu $a2, $v1, $v0 /* 498D0 8006E4D0 14C00004 */ bnez $a2, .L8006E4E4 /* 498D4 8006E4D4 00662823 */ subu $a1, $v1, $a2 /* 498D8 8006E4D8 00892023 */ subu $a0, $a0, $t1 /* 498DC 8006E4DC 0801B974 */ j .L8006E5D0 /* 498E0 8006E4E0 240A0001 */ addiu $t2, $zero, 0x1 .L8006E4E4: /* 498E4 8006E4E4 00C94804 */ sllv $t1, $t1, $a2 /* 498E8 8006E4E8 00A43806 */ srlv $a3, $a0, $a1 /* 498EC 8006E4EC 00C41804 */ sllv $v1, $a0, $a2 /* 498F0 8006E4F0 00AB1006 */ srlv $v0, $t3, $a1 /* 498F4 8006E4F4 00622025 */ or $a0, $v1, $v0 /* 498F8 8006E4F8 00CB5804 */ sllv $t3, $t3, $a2 /* 498FC 8006E4FC 00093402 */ srl $a2, $t1, 16 /* 49900 8006E500 14C00002 */ bnez $a2, .L8006E50C /* 49904 8006E504 00E6001B */ divu $zero, $a3, $a2 /* 49908 8006E508 0007000D */ break 7 .L8006E50C: /* 4990C 8006E50C 00004012 */ mflo $t0 /* 49910 8006E510 00001810 */ mfhi $v1 /* 49914 8006E514 3125FFFF */ andi $a1, $t1, 0xFFFF /* 49918 8006E518 00000000 */ nop /* 4991C 8006E51C 01050018 */ mult $t0, $a1 /* 49920 8006E520 00041402 */ srl $v0, $a0, 16 /* 49924 8006E524 00031C00 */ sll $v1, $v1, 16 /* 49928 8006E528 00621825 */ or $v1, $v1, $v0 /* 4992C 8006E52C 00003812 */ mflo $a3 /* 49930 8006E530 0067102B */ sltu $v0, $v1, $a3 /* 49934 8006E534 5040000B */ beql $v0, $zero, .L8006E564 /* 49938 8006E538 00671823 */ subu $v1, $v1, $a3 /* 4993C 8006E53C 00691821 */ addu $v1, $v1, $t1 /* 49940 8006E540 0069102B */ sltu $v0, $v1, $t1 /* 49944 8006E544 14400006 */ bnez $v0, .L8006E560 /* 49948 8006E548 2508FFFF */ addiu $t0, $t0, -0x1 /* 4994C 8006E54C 0067102B */ sltu $v0, $v1, $a3 /* 49950 8006E550 50400004 */ beql $v0, $zero, .L8006E564 /* 49954 8006E554 00671823 */ subu $v1, $v1, $a3 /* 49958 8006E558 2508FFFF */ addiu $t0, $t0, -0x1 /* 4995C 8006E55C 00691821 */ addu $v1, $v1, $t1 .L8006E560: /* 49960 8006E560 00671823 */ subu $v1, $v1, $a3 .L8006E564: /* 49964 8006E564 14C00002 */ bnez $a2, .L8006E570 /* 49968 8006E568 0066001B */ divu $zero, $v1, $a2 /* 4996C 8006E56C 0007000D */ break 7 .L8006E570: /* 49970 8006E570 00003012 */ mflo $a2 /* 49974 8006E574 00001810 */ mfhi $v1 /* 49978 8006E578 00000000 */ nop /* 4997C 8006E57C 00000000 */ nop /* 49980 8006E580 00C50018 */ mult $a2, $a1 /* 49984 8006E584 3082FFFF */ andi $v0, $a0, 0xFFFF /* 49988 8006E588 00031C00 */ sll $v1, $v1, 16 /* 4998C 8006E58C 00621825 */ or $v1, $v1, $v0 /* 49990 8006E590 00003812 */ mflo $a3 /* 49994 8006E594 0067102B */ sltu $v0, $v1, $a3 /* 49998 8006E598 1040000B */ beqz $v0, .L8006E5C8 /* 4999C 8006E59C 00081400 */ sll $v0, $t0, 16 /* 499A0 8006E5A0 00691821 */ addu $v1, $v1, $t1 /* 499A4 8006E5A4 0069102B */ sltu $v0, $v1, $t1 /* 499A8 8006E5A8 14400006 */ bnez $v0, .L8006E5C4 /* 499AC 8006E5AC 24C6FFFF */ addiu $a2, $a2, -0x1 /* 499B0 8006E5B0 0067102B */ sltu $v0, $v1, $a3 /* 499B4 8006E5B4 10400004 */ beqz $v0, .L8006E5C8 /* 499B8 8006E5B8 00081400 */ sll $v0, $t0, 16 /* 499BC 8006E5BC 24C6FFFF */ addiu $a2, $a2, -0x1 /* 499C0 8006E5C0 00691821 */ addu $v1, $v1, $t1 .L8006E5C4: /* 499C4 8006E5C4 00081400 */ sll $v0, $t0, 16 .L8006E5C8: /* 499C8 8006E5C8 00465025 */ or $t2, $v0, $a2 /* 499CC 8006E5CC 00672023 */ subu $a0, $v1, $a3 .L8006E5D0: /* 499D0 8006E5D0 00093402 */ srl $a2, $t1, 16 /* 499D4 8006E5D4 14C00002 */ bnez $a2, .L8006E5E0 /* 499D8 8006E5D8 0086001B */ divu $zero, $a0, $a2 /* 499DC 8006E5DC 0007000D */ break 7 .L8006E5E0: /* 499E0 8006E5E0 00003812 */ mflo $a3 /* 499E4 8006E5E4 00001810 */ mfhi $v1 /* 499E8 8006E5E8 3128FFFF */ andi $t0, $t1, 0xFFFF /* 499EC 8006E5EC 00000000 */ nop /* 499F0 8006E5F0 00E80018 */ mult $a3, $t0 /* 499F4 8006E5F4 000B1402 */ srl $v0, $t3, 16 /* 499F8 8006E5F8 00031C00 */ sll $v1, $v1, 16 /* 499FC 8006E5FC 00621825 */ or $v1, $v1, $v0 /* 49A00 8006E600 00002812 */ mflo $a1 /* 49A04 8006E604 0065102B */ sltu $v0, $v1, $a1 /* 49A08 8006E608 5040000B */ beql $v0, $zero, .L8006E638 /* 49A0C 8006E60C 00651823 */ subu $v1, $v1, $a1 /* 49A10 8006E610 00691821 */ addu $v1, $v1, $t1 /* 49A14 8006E614 0069102B */ sltu $v0, $v1, $t1 /* 49A18 8006E618 14400006 */ bnez $v0, .L8006E634 /* 49A1C 8006E61C 24E7FFFF */ addiu $a3, $a3, -0x1 /* 49A20 8006E620 0065102B */ sltu $v0, $v1, $a1 /* 49A24 8006E624 50400004 */ beql $v0, $zero, .L8006E638 /* 49A28 8006E628 00651823 */ subu $v1, $v1, $a1 /* 49A2C 8006E62C 24E7FFFF */ addiu $a3, $a3, -0x1 /* 49A30 8006E630 00691821 */ addu $v1, $v1, $t1 .L8006E634: /* 49A34 8006E634 00651823 */ subu $v1, $v1, $a1 .L8006E638: /* 49A38 8006E638 14C00002 */ bnez $a2, .L8006E644 /* 49A3C 8006E63C 0066001B */ divu $zero, $v1, $a2 /* 49A40 8006E640 0007000D */ break 7 .L8006E644: /* 49A44 8006E644 00002012 */ mflo $a0 /* 49A48 8006E648 00001810 */ mfhi $v1 /* 49A4C 8006E64C 00000000 */ nop /* 49A50 8006E650 00000000 */ nop /* 49A54 8006E654 00880018 */ mult $a0, $t0 /* 49A58 8006E658 3162FFFF */ andi $v0, $t3, 0xFFFF /* 49A5C 8006E65C 00031C00 */ sll $v1, $v1, 16 /* 49A60 8006E660 00621825 */ or $v1, $v1, $v0 /* 49A64 8006E664 00002812 */ mflo $a1 /* 49A68 8006E668 0065102B */ sltu $v0, $v1, $a1 /* 49A6C 8006E66C 10400007 */ beqz $v0, .L8006E68C /* 49A70 8006E670 00691821 */ addu $v1, $v1, $t1 /* 49A74 8006E674 0069102B */ sltu $v0, $v1, $t1 /* 49A78 8006E678 14400004 */ bnez $v0, .L8006E68C /* 49A7C 8006E67C 2484FFFF */ addiu $a0, $a0, -0x1 /* 49A80 8006E680 0065102B */ sltu $v0, $v1, $a1 /* 49A84 8006E684 54400001 */ bnel $v0, $zero, .L8006E68C /* 49A88 8006E688 2484FFFF */ addiu $a0, $a0, -0x1 .L8006E68C: /* 49A8C 8006E68C 00071400 */ sll $v0, $a3, 16 /* 49A90 8006E690 0801BA14 */ j .L8006E850 /* 49A94 8006E694 00443025 */ or $a2, $v0, $a0 .L8006E698: /* 49A98 8006E698 0088102B */ sltu $v0, $a0, $t0 /* 49A9C 8006E69C 10400003 */ beqz $v0, .L8006E6AC /* 49AA0 8006E6A0 3402FFFF */ ori $v0, $zero, 0xFFFF /* 49AA4 8006E6A4 0801BA13 */ j .L8006E84C /* 49AA8 8006E6A8 0000302D */ daddu $a2, $zero, $zero .L8006E6AC: /* 49AAC 8006E6AC 0048102B */ sltu $v0, $v0, $t0 /* 49AB0 8006E6B0 14400005 */ bnez $v0, .L8006E6C8 /* 49AB4 8006E6B4 0100282D */ daddu $a1, $t0, $zero /* 49AB8 8006E6B8 2D020100 */ sltiu $v0, $t0, 0x100 /* 49ABC 8006E6BC 38420001 */ xori $v0, $v0, 0x1 /* 49AC0 8006E6C0 0801B9B8 */ j .L8006E6E0 /* 49AC4 8006E6C4 000218C0 */ sll $v1, $v0, 3 .L8006E6C8: /* 49AC8 8006E6C8 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 49ACC 8006E6CC 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 49AD0 8006E6D0 0048102B */ sltu $v0, $v0, $t0 /* 49AD4 8006E6D4 14400002 */ bnez $v0, .L8006E6E0 /* 49AD8 8006E6D8 24030018 */ addiu $v1, $zero, 0x18 /* 49ADC 8006E6DC 24030010 */ addiu $v1, $zero, 0x10 .L8006E6E0: /* 49AE0 8006E6E0 00651006 */ srlv $v0, $a1, $v1 /* 49AE4 8006E6E4 3C01800A */ lui $at, %hi(D_8009A040) /* 49AE8 8006E6E8 00220821 */ addu $at, $at, $v0 /* 49AEC 8006E6EC 9022A040 */ lbu $v0, %lo(D_8009A040)($at) /* 49AF0 8006E6F0 00431021 */ addu $v0, $v0, $v1 /* 49AF4 8006E6F4 24030020 */ addiu $v1, $zero, 0x20 /* 49AF8 8006E6F8 00623023 */ subu $a2, $v1, $v0 /* 49AFC 8006E6FC 54C00009 */ bnel $a2, $zero, .L8006E724 /* 49B00 8006E700 00662823 */ subu $a1, $v1, $a2 /* 49B04 8006E704 0104102B */ sltu $v0, $t0, $a0 /* 49B08 8006E708 14400050 */ bnez $v0, .L8006E84C /* 49B0C 8006E70C 24060001 */ addiu $a2, $zero, 0x1 /* 49B10 8006E710 0169102B */ sltu $v0, $t3, $t1 /* 49B14 8006E714 1440004D */ bnez $v0, .L8006E84C /* 49B18 8006E718 0000302D */ daddu $a2, $zero, $zero /* 49B1C 8006E71C 0801BA13 */ j .L8006E84C /* 49B20 8006E720 24060001 */ addiu $a2, $zero, 0x1 .L8006E724: /* 49B24 8006E724 00C81804 */ sllv $v1, $t0, $a2 /* 49B28 8006E728 00A91006 */ srlv $v0, $t1, $a1 /* 49B2C 8006E72C 00624025 */ or $t0, $v1, $v0 /* 49B30 8006E730 00C94804 */ sllv $t1, $t1, $a2 /* 49B34 8006E734 00A43806 */ srlv $a3, $a0, $a1 /* 49B38 8006E738 00C41804 */ sllv $v1, $a0, $a2 /* 49B3C 8006E73C 00AB1006 */ srlv $v0, $t3, $a1 /* 49B40 8006E740 00622025 */ or $a0, $v1, $v0 /* 49B44 8006E744 00CB5804 */ sllv $t3, $t3, $a2 /* 49B48 8006E748 00083402 */ srl $a2, $t0, 16 /* 49B4C 8006E74C 14C00002 */ bnez $a2, .L8006E758 /* 49B50 8006E750 00E6001B */ divu $zero, $a3, $a2 /* 49B54 8006E754 0007000D */ break 7 .L8006E758: /* 49B58 8006E758 00005012 */ mflo $t2 /* 49B5C 8006E75C 00001810 */ mfhi $v1 /* 49B60 8006E760 3105FFFF */ andi $a1, $t0, 0xFFFF /* 49B64 8006E764 00000000 */ nop /* 49B68 8006E768 01450018 */ mult $t2, $a1 /* 49B6C 8006E76C 00041402 */ srl $v0, $a0, 16 /* 49B70 8006E770 00031C00 */ sll $v1, $v1, 16 /* 49B74 8006E774 00621825 */ or $v1, $v1, $v0 /* 49B78 8006E778 00003812 */ mflo $a3 /* 49B7C 8006E77C 0067102B */ sltu $v0, $v1, $a3 /* 49B80 8006E780 5040000B */ beql $v0, $zero, .L8006E7B0 /* 49B84 8006E784 00671823 */ subu $v1, $v1, $a3 /* 49B88 8006E788 00681821 */ addu $v1, $v1, $t0 /* 49B8C 8006E78C 0068102B */ sltu $v0, $v1, $t0 /* 49B90 8006E790 14400006 */ bnez $v0, .L8006E7AC /* 49B94 8006E794 254AFFFF */ addiu $t2, $t2, -0x1 /* 49B98 8006E798 0067102B */ sltu $v0, $v1, $a3 /* 49B9C 8006E79C 50400004 */ beql $v0, $zero, .L8006E7B0 /* 49BA0 8006E7A0 00671823 */ subu $v1, $v1, $a3 /* 49BA4 8006E7A4 254AFFFF */ addiu $t2, $t2, -0x1 /* 49BA8 8006E7A8 00681821 */ addu $v1, $v1, $t0 .L8006E7AC: /* 49BAC 8006E7AC 00671823 */ subu $v1, $v1, $a3 .L8006E7B0: /* 49BB0 8006E7B0 14C00002 */ bnez $a2, .L8006E7BC /* 49BB4 8006E7B4 0066001B */ divu $zero, $v1, $a2 /* 49BB8 8006E7B8 0007000D */ break 7 .L8006E7BC: /* 49BBC 8006E7BC 00003012 */ mflo $a2 /* 49BC0 8006E7C0 00001810 */ mfhi $v1 /* 49BC4 8006E7C4 00000000 */ nop /* 49BC8 8006E7C8 00000000 */ nop /* 49BCC 8006E7CC 00C50018 */ mult $a2, $a1 /* 49BD0 8006E7D0 3082FFFF */ andi $v0, $a0, 0xFFFF /* 49BD4 8006E7D4 00031C00 */ sll $v1, $v1, 16 /* 49BD8 8006E7D8 00621825 */ or $v1, $v1, $v0 /* 49BDC 8006E7DC 00003812 */ mflo $a3 /* 49BE0 8006E7E0 0067102B */ sltu $v0, $v1, $a3 /* 49BE4 8006E7E4 1040000B */ beqz $v0, .L8006E814 /* 49BE8 8006E7E8 000A1400 */ sll $v0, $t2, 16 /* 49BEC 8006E7EC 00681821 */ addu $v1, $v1, $t0 /* 49BF0 8006E7F0 0068102B */ sltu $v0, $v1, $t0 /* 49BF4 8006E7F4 14400006 */ bnez $v0, .L8006E810 /* 49BF8 8006E7F8 24C6FFFF */ addiu $a2, $a2, -0x1 /* 49BFC 8006E7FC 0067102B */ sltu $v0, $v1, $a3 /* 49C00 8006E800 10400004 */ beqz $v0, .L8006E814 /* 49C04 8006E804 000A1400 */ sll $v0, $t2, 16 /* 49C08 8006E808 24C6FFFF */ addiu $a2, $a2, -0x1 /* 49C0C 8006E80C 00681821 */ addu $v1, $v1, $t0 .L8006E810: /* 49C10 8006E810 000A1400 */ sll $v0, $t2, 16 .L8006E814: /* 49C14 8006E814 00463025 */ or $a2, $v0, $a2 /* 49C18 8006E818 00672023 */ subu $a0, $v1, $a3 /* 49C1C 8006E81C 00C90019 */ multu $a2, $t1 /* 49C20 8006E820 00001810 */ mfhi $v1 /* 49C24 8006E824 0083102B */ sltu $v0, $a0, $v1 /* 49C28 8006E828 00004012 */ mflo $t0 /* 49C2C 8006E82C 54400007 */ bnel $v0, $zero, .L8006E84C /* 49C30 8006E830 24C6FFFF */ addiu $a2, $a2, -0x1 /* 49C34 8006E834 14640006 */ bne $v1, $a0, .L8006E850 /* 49C38 8006E838 0000502D */ daddu $t2, $zero, $zero /* 49C3C 8006E83C 0168102B */ sltu $v0, $t3, $t0 /* 49C40 8006E840 10400004 */ beqz $v0, .L8006E854 /* 49C44 8006E844 00C0682D */ daddu $t5, $a2, $zero /* 49C48 8006E848 24C6FFFF */ addiu $a2, $a2, -0x1 .L8006E84C: /* 49C4C 8006E84C 0000502D */ daddu $t2, $zero, $zero .L8006E850: /* 49C50 8006E850 00C0682D */ daddu $t5, $a2, $zero .L8006E854: /* 49C54 8006E854 0140602D */ daddu $t4, $t2, $zero /* 49C58 8006E858 0180102D */ daddu $v0, $t4, $zero /* 49C5C 8006E85C 03E00008 */ jr $ra /* 49C60 8006E860 01A0182D */ daddu $v1, $t5, $zero /* 49C64 8006E864 00000000 */ nop /* 49C68 8006E868 00000000 */ nop /* 49C6C 8006E86C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: UDItype __udivdi3(UDItype n, UDItype d) { return __udivmoddi4(n, d, (UDItype *) 0); }
### RAW ASSEMBLY INSTRUCTIONS: glabel energy_orb_wave_appendGfx /* 3A3E30 E00A4650 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 3A3E34 E00A4654 0080302D */ daddu $a2, $a0, $zero /* 3A3E38 E00A4658 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3A3E3C E00A465C 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3A3E40 E00A4660 27A40018 */ addiu $a0, $sp, 0x18 /* 3A3E44 E00A4664 AFB700BC */ sw $s7, 0xBC($sp) /* 3A3E48 E00A4668 3C170001 */ lui $s7, (0x11630 >> 16) /* 3A3E4C E00A466C 3C0AE300 */ lui $t2, (0xE3001801 >> 16) /* 3A3E50 E00A4670 AFB500B4 */ sw $s5, 0xB4($sp) /* 3A3E54 E00A4674 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 3A3E58 E00A4678 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 3A3E5C E00A467C AFBF00C4 */ sw $ra, 0xC4($sp) /* 3A3E60 E00A4680 AFBE00C0 */ sw $fp, 0xC0($sp) /* 3A3E64 E00A4684 AFB600B8 */ sw $s6, 0xB8($sp) /* 3A3E68 E00A4688 AFB400B0 */ sw $s4, 0xB0($sp) /* 3A3E6C E00A468C AFB300AC */ sw $s3, 0xAC($sp) /* 3A3E70 E00A4690 AFB200A8 */ sw $s2, 0xA8($sp) /* 3A3E74 E00A4694 AFB100A4 */ sw $s1, 0xA4($sp) /* 3A3E78 E00A4698 AFB000A0 */ sw $s0, 0xA0($sp) /* 3A3E7C E00A469C F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 3A3E80 E00A46A0 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 3A3E84 E00A46A4 8EA50000 */ lw $a1, 0x0($s5) /* 3A3E88 E00A46A8 354A1801 */ ori $t2, $t2, (0xE3001801 & 0xFFFF) /* 3A3E8C E00A46AC AFAA009C */ sw $t2, 0x9C($sp) /* 3A3E90 E00A46B0 8CD2000C */ lw $s2, 0xC($a2) /* 3A3E94 E00A46B4 00A0182D */ daddu $v1, $a1, $zero /* 3A3E98 E00A46B8 24A50008 */ addiu $a1, $a1, 0x8 /* 3A3E9C E00A46BC AEA50000 */ sw $a1, 0x0($s5) /* 3A3EA0 E00A46C0 8E4A0014 */ lw $t2, 0x14($s2) /* 3A3EA4 E00A46C4 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* 3A3EA8 E00A46C8 AFAA0098 */ sw $t2, 0x98($sp) /* 3A3EAC E00A46CC 8E53002C */ lw $s3, 0x2C($s2) /* 3A3EB0 E00A46D0 8E540000 */ lw $s4, 0x0($s2) /* 3A3EB4 E00A46D4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3A3EB8 E00A46D8 AC620000 */ sw $v0, 0x0($v1) /* 3A3EBC E00A46DC AC600004 */ sw $zero, 0x4($v1) /* 3A3EC0 E00A46E0 ACA70000 */ sw $a3, 0x0($a1) /* 3A3EC4 E00A46E4 8CC30010 */ lw $v1, 0x10($a2) /* 3A3EC8 E00A46E8 24A20008 */ addiu $v0, $a1, 0x8 /* 3A3ECC E00A46EC AEA20000 */ sw $v0, 0x0($s5) /* 3A3ED0 E00A46F0 8C62001C */ lw $v0, 0x1C($v1) /* 3A3ED4 E00A46F4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3A3ED8 E00A46F8 00431021 */ addu $v0, $v0, $v1 /* 3A3EDC E00A46FC 3C03800B */ lui $v1, %hi(gCameras) /* 3A3EE0 E00A4700 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3A3EE4 E00A4704 ACA20004 */ sw $v0, 0x4($a1) /* 3A3EE8 E00A4708 8E450004 */ lw $a1, 0x4($s2) /* 3A3EEC E00A470C 8E460008 */ lw $a2, 0x8($s2) /* 3A3EF0 E00A4710 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3A3EF4 E00A4714 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3A3EF8 E00A4718 8E47000C */ lw $a3, 0xC($s2) /* 3A3EFC E00A471C 00028080 */ sll $s0, $v0, 2 /* 3A3F00 E00A4720 02028021 */ addu $s0, $s0, $v0 /* 3A3F04 E00A4724 00108080 */ sll $s0, $s0, 2 /* 3A3F08 E00A4728 02028023 */ subu $s0, $s0, $v0 /* 3A3F0C E00A472C 001010C0 */ sll $v0, $s0, 3 /* 3A3F10 E00A4730 02028021 */ addu $s0, $s0, $v0 /* 3A3F14 E00A4734 001080C0 */ sll $s0, $s0, 3 /* 3A3F18 E00A4738 0C080108 */ jal shim_guTranslateF /* 3A3F1C E00A473C 02038021 */ addu $s0, $s0, $v1 /* 3A3F20 E00A4740 27B10058 */ addiu $s1, $sp, 0x58 /* 3A3F24 E00A4744 8E450030 */ lw $a1, 0x30($s2) /* 3A3F28 E00A4748 0220202D */ daddu $a0, $s1, $zero /* 3A3F2C E00A474C 00A0302D */ daddu $a2, $a1, $zero /* 3A3F30 E00A4750 0C080110 */ jal shim_guScaleF /* 3A3F34 E00A4754 00A0382D */ daddu $a3, $a1, $zero /* 3A3F38 E00A4758 0220202D */ daddu $a0, $s1, $zero /* 3A3F3C E00A475C 27A50018 */ addiu $a1, $sp, 0x18 /* 3A3F40 E00A4760 0C080114 */ jal shim_guMtxCatF /* 3A3F44 E00A4764 00A0302D */ daddu $a2, $a1, $zero /* 3A3F48 E00A4768 27A40018 */ addiu $a0, $sp, 0x18 /* 3A3F4C E00A476C 3C168007 */ lui $s6, %hi(gMatrixListPos) /* 3A3F50 E00A4770 26D641F0 */ addiu $s6, $s6, %lo(gMatrixListPos) /* 3A3F54 E00A4774 3C1E800A */ lui $fp, %hi(gDisplayContext) /* 3A3F58 E00A4778 27DEA674 */ addiu $fp, $fp, %lo(gDisplayContext) /* 3A3F5C E00A477C 96C50000 */ lhu $a1, 0x0($s6) /* 3A3F60 E00A4780 8FC20000 */ lw $v0, 0x0($fp) /* 3A3F64 E00A4784 00052980 */ sll $a1, $a1, 6 /* 3A3F68 E00A4788 00B72821 */ addu $a1, $a1, $s7 /* 3A3F6C E00A478C 0C080118 */ jal shim_guMtxF2L /* 3A3F70 E00A4790 00452821 */ addu $a1, $v0, $a1 /* 3A3F74 E00A4794 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3A3F78 E00A4798 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3A3F7C E00A479C 3C05DA38 */ lui $a1, (0xDA380001 >> 16) /* 3A3F80 E00A47A0 34A50001 */ ori $a1, $a1, (0xDA380001 & 0xFFFF) /* 3A3F84 E00A47A4 3C06E300 */ lui $a2, (0xE3001A01 >> 16) /* 3A3F88 E00A47A8 34C61A01 */ ori $a2, $a2, (0xE3001A01 & 0xFFFF) /* 3A3F8C E00A47AC 327300FF */ andi $s3, $s3, 0xFF /* 3A3F90 E00A47B0 2A940003 */ slti $s4, $s4, 0x3 /* 3A3F94 E00A47B4 8EA80000 */ lw $t0, 0x0($s5) /* 3A3F98 E00A47B8 96C20000 */ lhu $v0, 0x0($s6) /* 3A3F9C E00A47BC 0100202D */ daddu $a0, $t0, $zero /* 3A3FA0 E00A47C0 25080008 */ addiu $t0, $t0, 0x8 /* 3A3FA4 E00A47C4 AEA80000 */ sw $t0, 0x0($s5) /* 3A3FA8 E00A47C8 AC830000 */ sw $v1, 0x0($a0) /* 3A3FAC E00A47CC 24430001 */ addiu $v1, $v0, 0x1 /* 3A3FB0 E00A47D0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3A3FB4 E00A47D4 00021180 */ sll $v0, $v0, 6 /* 3A3FB8 E00A47D8 A6C30000 */ sh $v1, 0x0($s6) /* 3A3FBC E00A47DC 8FC30000 */ lw $v1, 0x0($fp) /* 3A3FC0 E00A47E0 00571021 */ addu $v0, $v0, $s7 /* 3A3FC4 E00A47E4 00621821 */ addu $v1, $v1, $v0 /* 3A3FC8 E00A47E8 25020008 */ addiu $v0, $t0, 0x8 /* 3A3FCC E00A47EC AC830004 */ sw $v1, 0x4($a0) /* 3A3FD0 E00A47F0 AEA20000 */ sw $v0, 0x0($s5) /* 3A3FD4 E00A47F4 25020010 */ addiu $v0, $t0, 0x10 /* 3A3FD8 E00A47F8 AD050000 */ sw $a1, 0x0($t0) /* 3A3FDC E00A47FC AEA20000 */ sw $v0, 0x0($s5) /* 3A3FE0 E00A4800 8E030204 */ lw $v1, 0x204($s0) /* 3A3FE4 E00A4804 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3A3FE8 E00A4808 AD020008 */ sw $v0, 0x8($t0) /* 3A3FEC E00A480C AD030004 */ sw $v1, 0x4($t0) /* 3A3FF0 E00A4810 92430023 */ lbu $v1, 0x23($s2) /* 3A3FF4 E00A4814 92440027 */ lbu $a0, 0x27($s2) /* 3A3FF8 E00A4818 9245002B */ lbu $a1, 0x2B($s2) /* 3A3FFC E00A481C 25020018 */ addiu $v0, $t0, 0x18 /* 3A4000 E00A4820 AEA20000 */ sw $v0, 0x0($s5) /* 3A4004 E00A4824 8FAA009C */ lw $t2, 0x9C($sp) /* 3A4008 E00A4828 25020020 */ addiu $v0, $t0, 0x20 /* 3A400C E00A482C AD0A0010 */ sw $t2, 0x10($t0) /* 3A4010 E00A4830 240A0040 */ addiu $t2, $zero, 0x40 /* 3A4014 E00A4834 00031E00 */ sll $v1, $v1, 24 /* 3A4018 E00A4838 00042400 */ sll $a0, $a0, 16 /* 3A401C E00A483C 00641825 */ or $v1, $v1, $a0 /* 3A4020 E00A4840 00052A00 */ sll $a1, $a1, 8 /* 3A4024 E00A4844 00651825 */ or $v1, $v1, $a1 /* 3A4028 E00A4848 00731825 */ or $v1, $v1, $s3 /* 3A402C E00A484C AD0A0014 */ sw $t2, 0x14($t0) /* 3A4030 E00A4850 AEA20000 */ sw $v0, 0x0($s5) /* 3A4034 E00A4854 AD060018 */ sw $a2, 0x18($t0) /* 3A4038 E00A4858 AD00001C */ sw $zero, 0x1C($t0) /* 3A403C E00A485C 12800068 */ beqz $s4, .LE00A4A00 /* 3A4040 E00A4860 AD03000C */ sw $v1, 0xC($t0) /* 3A4044 E00A4864 27A40018 */ addiu $a0, $sp, 0x18 /* 3A4048 E00A4868 C7A00098 */ lwc1 $f0, 0x98($sp) /* 3A404C E00A486C 46800020 */ cvt.s.w $f0, $f0 /* 3A4050 E00A4870 3C12D838 */ lui $s2, (0xD8380002 >> 16) /* 3A4054 E00A4874 36520002 */ ori $s2, $s2, (0xD8380002 & 0xFFFF) /* 3A4058 E00A4878 25020028 */ addiu $v0, $t0, 0x28 /* 3A405C E00A487C 44050000 */ mfc1 $a1, $f0 /* 3A4060 E00A4880 4480A000 */ mtc1 $zero, $f20 /* 3A4064 E00A4884 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3A4068 E00A4888 4481B000 */ mtc1 $at, $f22 /* 3A406C E00A488C 3C10DE00 */ lui $s0, (0xDE000000 >> 16) /* 3A4070 E00A4890 AEA20000 */ sw $v0, 0x0($s5) /* 3A4074 E00A4894 4406A000 */ mfc1 $a2, $f20 /* 3A4078 E00A4898 4407A000 */ mfc1 $a3, $f20 /* 3A407C E00A489C 3C020900 */ lui $v0, %hi(D_09001000_40E290) /* 3A4080 E00A48A0 24421000 */ addiu $v0, $v0, %lo(D_09001000_40E290) /* 3A4084 E00A48A4 AD100020 */ sw $s0, 0x20($t0) /* 3A4088 E00A48A8 AD020024 */ sw $v0, 0x24($t0) /* 3A408C E00A48AC 0C080104 */ jal shim_guRotateF /* 3A4090 E00A48B0 E7B60010 */ swc1 $f22, 0x10($sp) /* 3A4094 E00A48B4 27A40018 */ addiu $a0, $sp, 0x18 /* 3A4098 E00A48B8 96C50000 */ lhu $a1, 0x0($s6) /* 3A409C E00A48BC 8FC20000 */ lw $v0, 0x0($fp) /* 3A40A0 E00A48C0 00052980 */ sll $a1, $a1, 6 /* 3A40A4 E00A48C4 00B72821 */ addu $a1, $a1, $s7 /* 3A40A8 E00A48C8 0C080118 */ jal shim_guMtxF2L /* 3A40AC E00A48CC 00452821 */ addu $a1, $v0, $a1 /* 3A40B0 E00A48D0 27A40018 */ addiu $a0, $sp, 0x18 /* 3A40B4 E00A48D4 8FAA0098 */ lw $t2, 0x98($sp) /* 3A40B8 E00A48D8 8EA80000 */ lw $t0, 0x0($s5) /* 3A40BC E00A48DC 4406A000 */ mfc1 $a2, $f20 /* 3A40C0 E00A48E0 000A1023 */ negu $v0, $t2 /* 3A40C4 E00A48E4 000210C0 */ sll $v0, $v0, 3 /* 3A40C8 E00A48E8 44820000 */ mtc1 $v0, $f0 /* 3A40CC E00A48EC 00000000 */ nop /* 3A40D0 E00A48F0 46800020 */ cvt.s.w $f0, $f0 /* 3A40D4 E00A48F4 0100482D */ daddu $t1, $t0, $zero /* 3A40D8 E00A48F8 44050000 */ mfc1 $a1, $f0 /* 3A40DC E00A48FC 25080008 */ addiu $t0, $t0, 0x8 /* 3A40E0 E00A4900 AEA80000 */ sw $t0, 0x0($s5) /* 3A40E4 E00A4904 96C20000 */ lhu $v0, 0x0($s6) /* 3A40E8 E00A4908 3C11DA38 */ lui $s1, (0xDA380000 >> 16) /* 3A40EC E00A490C AD310000 */ sw $s1, 0x0($t1) /* 3A40F0 E00A4910 24430001 */ addiu $v1, $v0, 0x1 /* 3A40F4 E00A4914 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3A40F8 E00A4918 00021180 */ sll $v0, $v0, 6 /* 3A40FC E00A491C A6C30000 */ sh $v1, 0x0($s6) /* 3A4100 E00A4920 8FC30000 */ lw $v1, 0x0($fp) /* 3A4104 E00A4924 00571021 */ addu $v0, $v0, $s7 /* 3A4108 E00A4928 00621821 */ addu $v1, $v1, $v0 /* 3A410C E00A492C 25020008 */ addiu $v0, $t0, 0x8 /* 3A4110 E00A4930 AD230004 */ sw $v1, 0x4($t1) /* 3A4114 E00A4934 AEA20000 */ sw $v0, 0x0($s5) /* 3A4118 E00A4938 3C020900 */ lui $v0, %hi(D_090011D0_40E460) /* 3A411C E00A493C 244211D0 */ addiu $v0, $v0, %lo(D_090011D0_40E460) /* 3A4120 E00A4940 AD020004 */ sw $v0, 0x4($t0) /* 3A4124 E00A4944 25020010 */ addiu $v0, $t0, 0x10 /* 3A4128 E00A4948 240A0040 */ addiu $t2, $zero, 0x40 /* 3A412C E00A494C AD100000 */ sw $s0, 0x0($t0) /* 3A4130 E00A4950 AEA20000 */ sw $v0, 0x0($s5) /* 3A4134 E00A4954 25020018 */ addiu $v0, $t0, 0x18 /* 3A4138 E00A4958 AD120008 */ sw $s2, 0x8($t0) /* 3A413C E00A495C AD0A000C */ sw $t2, 0xC($t0) /* 3A4140 E00A4960 AEA20000 */ sw $v0, 0x0($s5) /* 3A4144 E00A4964 8FAA009C */ lw $t2, 0x9C($sp) /* 3A4148 E00A4968 00C0382D */ daddu $a3, $a2, $zero /* 3A414C E00A496C AD0A0010 */ sw $t2, 0x10($t0) /* 3A4150 E00A4970 AD000014 */ sw $zero, 0x14($t0) /* 3A4154 E00A4974 0C080104 */ jal shim_guRotateF /* 3A4158 E00A4978 E7B60010 */ swc1 $f22, 0x10($sp) /* 3A415C E00A497C 27A40018 */ addiu $a0, $sp, 0x18 /* 3A4160 E00A4980 96C50000 */ lhu $a1, 0x0($s6) /* 3A4164 E00A4984 8FC20000 */ lw $v0, 0x0($fp) /* 3A4168 E00A4988 00052980 */ sll $a1, $a1, 6 /* 3A416C E00A498C 00B72821 */ addu $a1, $a1, $s7 /* 3A4170 E00A4990 0C080118 */ jal shim_guMtxF2L /* 3A4174 E00A4994 00452821 */ addu $a1, $v0, $a1 /* 3A4178 E00A4998 8EA40000 */ lw $a0, 0x0($s5) /* 3A417C E00A499C 96C20000 */ lhu $v0, 0x0($s6) /* 3A4180 E00A49A0 0080282D */ daddu $a1, $a0, $zero /* 3A4184 E00A49A4 24840008 */ addiu $a0, $a0, 0x8 /* 3A4188 E00A49A8 24430001 */ addiu $v1, $v0, 0x1 /* 3A418C E00A49AC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3A4190 E00A49B0 00021180 */ sll $v0, $v0, 6 /* 3A4194 E00A49B4 AEA40000 */ sw $a0, 0x0($s5) /* 3A4198 E00A49B8 ACB10000 */ sw $s1, 0x0($a1) /* 3A419C E00A49BC A6C30000 */ sh $v1, 0x0($s6) /* 3A41A0 E00A49C0 8FC30000 */ lw $v1, 0x0($fp) /* 3A41A4 E00A49C4 00571021 */ addu $v0, $v0, $s7 /* 3A41A8 E00A49C8 00621821 */ addu $v1, $v1, $v0 /* 3A41AC E00A49CC 24820008 */ addiu $v0, $a0, 0x8 /* 3A41B0 E00A49D0 ACA30004 */ sw $v1, 0x4($a1) /* 3A41B4 E00A49D4 AEA20000 */ sw $v0, 0x0($s5) /* 3A41B8 E00A49D8 3C020900 */ lui $v0, %hi(D_090011F0_40E480) /* 3A41BC E00A49DC 244211F0 */ addiu $v0, $v0, %lo(D_090011F0_40E480) /* 3A41C0 E00A49E0 AC820004 */ sw $v0, 0x4($a0) /* 3A41C4 E00A49E4 24820010 */ addiu $v0, $a0, 0x10 /* 3A41C8 E00A49E8 240A0040 */ addiu $t2, $zero, 0x40 /* 3A41CC E00A49EC AC900000 */ sw $s0, 0x0($a0) /* 3A41D0 E00A49F0 AEA20000 */ sw $v0, 0x0($s5) /* 3A41D4 E00A49F4 AC920008 */ sw $s2, 0x8($a0) /* 3A41D8 E00A49F8 0802928D */ j .LE00A4A34 /* 3A41DC E00A49FC AC8A000C */ sw $t2, 0xC($a0) .LE00A4A00: /* 3A41E0 E00A4A00 25020028 */ addiu $v0, $t0, 0x28 /* 3A41E4 E00A4A04 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 3A41E8 E00A4A08 AEA20000 */ sw $v0, 0x0($s5) /* 3A41EC E00A4A0C 3C020900 */ lui $v0, %hi(D_090010A8_40E338) /* 3A41F0 E00A4A10 244210A8 */ addiu $v0, $v0, %lo(D_090010A8_40E338) /* 3A41F4 E00A4A14 AD020024 */ sw $v0, 0x24($t0) /* 3A41F8 E00A4A18 25020030 */ addiu $v0, $t0, 0x30 /* 3A41FC E00A4A1C AD030020 */ sw $v1, 0x20($t0) /* 3A4200 E00A4A20 AEA20000 */ sw $v0, 0x0($s5) /* 3A4204 E00A4A24 3C020900 */ lui $v0, %hi(D_09001210_40E4A0) /* 3A4208 E00A4A28 24421210 */ addiu $v0, $v0, %lo(D_09001210_40E4A0) /* 3A420C E00A4A2C AD030028 */ sw $v1, 0x28($t0) /* 3A4210 E00A4A30 AD02002C */ sw $v0, 0x2C($t0) .LE00A4A34: /* 3A4214 E00A4A34 3C02E300 */ lui $v0, (0xE3001801 >> 16) /* 3A4218 E00A4A38 34421801 */ ori $v0, $v0, (0xE3001801 & 0xFFFF) /* 3A421C E00A4A3C 3C06E300 */ lui $a2, (0xE3001A01 >> 16) /* 3A4220 E00A4A40 34C61A01 */ ori $a2, $a2, (0xE3001A01 & 0xFFFF) /* 3A4224 E00A4A44 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3A4228 E00A4A48 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3A422C E00A4A4C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3A4230 E00A4A50 8C830000 */ lw $v1, 0x0($a0) /* 3A4234 E00A4A54 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3A4238 E00A4A58 0060282D */ daddu $a1, $v1, $zero /* 3A423C E00A4A5C 24630008 */ addiu $v1, $v1, 0x8 /* 3A4240 E00A4A60 AC830000 */ sw $v1, 0x0($a0) /* 3A4244 E00A4A64 ACA20000 */ sw $v0, 0x0($a1) /* 3A4248 E00A4A68 240200C0 */ addiu $v0, $zero, 0xC0 /* 3A424C E00A4A6C ACA20004 */ sw $v0, 0x4($a1) /* 3A4250 E00A4A70 24620008 */ addiu $v0, $v1, 0x8 /* 3A4254 E00A4A74 AC820000 */ sw $v0, 0x0($a0) /* 3A4258 E00A4A78 24020030 */ addiu $v0, $zero, 0x30 /* 3A425C E00A4A7C AC620004 */ sw $v0, 0x4($v1) /* 3A4260 E00A4A80 24620010 */ addiu $v0, $v1, 0x10 /* 3A4264 E00A4A84 AC660000 */ sw $a2, 0x0($v1) /* 3A4268 E00A4A88 AC820000 */ sw $v0, 0x0($a0) /* 3A426C E00A4A8C 24020040 */ addiu $v0, $zero, 0x40 /* 3A4270 E00A4A90 AC670008 */ sw $a3, 0x8($v1) /* 3A4274 E00A4A94 AC62000C */ sw $v0, 0xC($v1) /* 3A4278 E00A4A98 8FBF00C4 */ lw $ra, 0xC4($sp) /* 3A427C E00A4A9C 8FBE00C0 */ lw $fp, 0xC0($sp) /* 3A4280 E00A4AA0 8FB700BC */ lw $s7, 0xBC($sp) /* 3A4284 E00A4AA4 8FB600B8 */ lw $s6, 0xB8($sp) /* 3A4288 E00A4AA8 8FB500B4 */ lw $s5, 0xB4($sp) /* 3A428C E00A4AAC 8FB400B0 */ lw $s4, 0xB0($sp) /* 3A4290 E00A4AB0 8FB300AC */ lw $s3, 0xAC($sp) /* 3A4294 E00A4AB4 8FB200A8 */ lw $s2, 0xA8($sp) /* 3A4298 E00A4AB8 8FB100A4 */ lw $s1, 0xA4($sp) /* 3A429C E00A4ABC 8FB000A0 */ lw $s0, 0xA0($sp) /* 3A42A0 E00A4AC0 D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 3A42A4 E00A4AC4 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 3A42A8 E00A4AC8 03E00008 */ jr $ra /* 3A42AC E00A4ACC 27BD00D8 */ addiu $sp, $sp, 0xD8 ### DECOMPILED C INSTRUCTIONS: void energy_orb_wave_appendGfx(void* effect) { EnergyOrbWaveFXData* data = ((EffectInstance*)effect)->data.energyOrbWave; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_14 = data->unk_14; s32 unk_2C = data->unk_2C; s32 unk_00 = data->unk_00; Matrix4f sp18; Matrix4f sp58; 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->scale, data->scale, data->scale); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_20, data->unk_24, data->unk_28, unk_2C); gDPSetColorDither(gMainGfxPos++, G_CD_BAYER); gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN); if (unk_00 < 3) { gSPDisplayList(gMainGfxPos++, D_09001000_3A5320); shim_guRotateF(sp18, unk_14, 0.0f, 0.0f, 1.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090011D0_3A54F0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ); shim_guRotateF(sp18, -unk_14 * 8, 0.0f, 0.0f, 1.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090011F0_3A5510); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } else { gSPDisplayList(gMainGfxPos++, D_090010A8_3A53C8); gSPDisplayList(gMainGfxPos++, D_09001210_3A5530); } gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel star_spirits_energy_appendGfx /* 40CCAC E012270C 27BDFF70 */ addiu $sp, $sp, -0x90 /* 40CCB0 E0122710 0080402D */ daddu $t0, $a0, $zero /* 40CCB4 E0122714 3C09DB06 */ lui $t1, (0xDB060024 >> 16) /* 40CCB8 E0122718 35290024 */ ori $t1, $t1, (0xDB060024 & 0xFFFF) /* 40CCBC E012271C 27A40020 */ addiu $a0, $sp, 0x20 /* 40CCC0 E0122720 AFB00060 */ sw $s0, 0x60($sp) /* 40CCC4 E0122724 3C100001 */ lui $s0, (0x11630 >> 16) /* 40CCC8 E0122728 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 40CCCC E012272C AFB40070 */ sw $s4, 0x70($sp) /* 40CCD0 E0122730 0000A02D */ daddu $s4, $zero, $zero /* 40CCD4 E0122734 3C02800A */ lui $v0, %hi(gDisplayContext) /* 40CCD8 E0122738 2442A674 */ addiu $v0, $v0, %lo(gDisplayContext) /* 40CCDC E012273C AFBE0080 */ sw $fp, 0x80($sp) /* 40CCE0 E0122740 0040F02D */ daddu $fp, $v0, $zero /* 40CCE4 E0122744 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 40CCE8 E0122748 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos) /* 40CCEC E012274C AFB50074 */ sw $s5, 0x74($sp) /* 40CCF0 E0122750 0040A82D */ daddu $s5, $v0, $zero /* 40CCF4 E0122754 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 40CCF8 E0122758 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 40CCFC E012275C AFB3006C */ sw $s3, 0x6C($sp) /* 40CD00 E0122760 0040982D */ daddu $s3, $v0, $zero /* 40CD04 E0122764 AFBF0084 */ sw $ra, 0x84($sp) /* 40CD08 E0122768 AFB7007C */ sw $s7, 0x7C($sp) /* 40CD0C E012276C AFB60078 */ sw $s6, 0x78($sp) /* 40CD10 E0122770 AFB20068 */ sw $s2, 0x68($sp) /* 40CD14 E0122774 AFB10064 */ sw $s1, 0x64($sp) /* 40CD18 E0122778 F7B40088 */ sdc1 $f20, 0x88($sp) /* 40CD1C E012277C 8C460000 */ lw $a2, 0x0($v0) /* 40CD20 E0122780 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 40CD24 E0122784 44800000 */ mtc1 $zero, $f0 /* 40CD28 E0122788 8D11000C */ lw $s1, 0xC($t0) /* 40CD2C E012278C 00C0182D */ daddu $v1, $a2, $zero /* 40CD30 E0122790 8E370004 */ lw $s7, 0x4($s1) /* 40CD34 E0122794 24C60008 */ addiu $a2, $a2, 0x8 /* 40CD38 E0122798 AC620000 */ sw $v0, 0x0($v1) /* 40CD3C E012279C AC600004 */ sw $zero, 0x4($v1) /* 40CD40 E01227A0 ACC90000 */ sw $t1, 0x0($a2) /* 40CD44 E01227A4 8D020010 */ lw $v0, 0x10($t0) /* 40CD48 E01227A8 3C088000 */ lui $t0, (0x80000000 >> 16) /* 40CD4C E01227AC 44050000 */ mfc1 $a1, $f0 /* 40CD50 E01227B0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 40CD54 E01227B4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 40CD58 E01227B8 8C42001C */ lw $v0, 0x1C($v0) /* 40CD5C E01227BC 4485A000 */ mtc1 $a1, $f20 /* 40CD60 E01227C0 00481021 */ addu $v0, $v0, $t0 /* 40CD64 E01227C4 ACC20004 */ sw $v0, 0x4($a2) /* 40CD68 E01227C8 00031080 */ sll $v0, $v1, 2 /* 40CD6C E01227CC 00431021 */ addu $v0, $v0, $v1 /* 40CD70 E01227D0 00021080 */ sll $v0, $v0, 2 /* 40CD74 E01227D4 00431023 */ subu $v0, $v0, $v1 /* 40CD78 E01227D8 000218C0 */ sll $v1, $v0, 3 /* 40CD7C E01227DC 00431021 */ addu $v0, $v0, $v1 /* 40CD80 E01227E0 000210C0 */ sll $v0, $v0, 3 /* 40CD84 E01227E4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 40CD88 E01227E8 00220821 */ addu $at, $at, $v0 /* 40CD8C E01227EC C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 40CD90 E01227F0 C620003C */ lwc1 $f0, 0x3C($s1) /* 40CD94 E01227F4 3C160001 */ lui $s6, (0x11630 >> 16) /* 40CD98 E01227F8 E7A00010 */ swc1 $f0, 0x10($sp) /* 40CD9C E01227FC C6200008 */ lwc1 $f0, 0x8($s1) /* 40CDA0 E0122800 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 40CDA4 E0122804 AE660000 */ sw $a2, 0x0($s3) /* 40CDA8 E0122808 24C60008 */ addiu $a2, $a2, 0x8 /* 40CDAC E012280C E7A00014 */ swc1 $f0, 0x14($sp) /* 40CDB0 E0122810 C620000C */ lwc1 $f0, 0xC($s1) /* 40CDB4 E0122814 46001087 */ neg.s $f2, $f2 /* 40CDB8 E0122818 AE660000 */ sw $a2, 0x0($s3) /* 40CDBC E012281C 44061000 */ mfc1 $a2, $f2 /* 40CDC0 E0122820 0220902D */ daddu $s2, $s1, $zero /* 40CDC4 E0122824 E7A00018 */ swc1 $f0, 0x18($sp) /* 40CDC8 E0122828 C6200010 */ lwc1 $f0, 0x10($s1) /* 40CDCC E012282C 00A0382D */ daddu $a3, $a1, $zero /* 40CDD0 E0122830 0C080180 */ jal shim_guPositionF /* 40CDD4 E0122834 E7A0001C */ swc1 $f0, 0x1C($sp) /* 40CDD8 E0122838 27A40020 */ addiu $a0, $sp, 0x20 /* 40CDDC E012283C 96A50000 */ lhu $a1, 0x0($s5) /* 40CDE0 E0122840 8FC20000 */ lw $v0, 0x0($fp) /* 40CDE4 E0122844 00052980 */ sll $a1, $a1, 6 /* 40CDE8 E0122848 00B02821 */ addu $a1, $a1, $s0 /* 40CDEC E012284C 0C080118 */ jal shim_guMtxF2L /* 40CDF0 E0122850 00452821 */ addu $a1, $v0, $a1 /* 40CDF4 E0122854 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 40CDF8 E0122858 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 40CDFC E012285C 8E650000 */ lw $a1, 0x0($s3) /* 40CE00 E0122860 96A20000 */ lhu $v0, 0x0($s5) /* 40CE04 E0122864 00A0202D */ daddu $a0, $a1, $zero /* 40CE08 E0122868 24A50008 */ addiu $a1, $a1, 0x8 /* 40CE0C E012286C AE650000 */ sw $a1, 0x0($s3) /* 40CE10 E0122870 AC830000 */ sw $v1, 0x0($a0) /* 40CE14 E0122874 24430001 */ addiu $v1, $v0, 0x1 /* 40CE18 E0122878 3042FFFF */ andi $v0, $v0, 0xFFFF /* 40CE1C E012287C 00021180 */ sll $v0, $v0, 6 /* 40CE20 E0122880 A6A30000 */ sh $v1, 0x0($s5) /* 40CE24 E0122884 8FC30000 */ lw $v1, 0x0($fp) /* 40CE28 E0122888 00501021 */ addu $v0, $v0, $s0 /* 40CE2C E012288C 00621821 */ addu $v1, $v1, $v0 /* 40CE30 E0122890 24A20008 */ addiu $v0, $a1, 0x8 /* 40CE34 E0122894 AC830004 */ sw $v1, 0x4($a0) /* 40CE38 E0122898 AE620000 */ sw $v0, 0x0($s3) /* 40CE3C E012289C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 40CE40 E01228A0 ACA20000 */ sw $v0, 0x0($a1) /* 40CE44 E01228A4 24A20010 */ addiu $v0, $a1, 0x10 /* 40CE48 E01228A8 AE620000 */ sw $v0, 0x0($s3) /* 40CE4C E01228AC 3C03E012 */ lui $v1, (0xE0122BA4 >> 16) /* 40CE50 E01228B0 8C632BA4 */ lw $v1, (0xE0122BA4 & 0xFFFF)($v1) /* 40CE54 E01228B4 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 40CE58 E01228B8 ACA20008 */ sw $v0, 0x8($a1) /* 40CE5C E01228BC ACA30004 */ sw $v1, 0x4($a1) /* 40CE60 E01228C0 9222002F */ lbu $v0, 0x2F($s1) /* 40CE64 E01228C4 92230033 */ lbu $v1, 0x33($s1) /* 40CE68 E01228C8 92240037 */ lbu $a0, 0x37($s1) /* 40CE6C E01228CC 00021600 */ sll $v0, $v0, 24 /* 40CE70 E01228D0 00031C00 */ sll $v1, $v1, 16 /* 40CE74 E01228D4 00431025 */ or $v0, $v0, $v1 /* 40CE78 E01228D8 00042200 */ sll $a0, $a0, 8 /* 40CE7C E01228DC 9223003B */ lbu $v1, 0x3B($s1) /* 40CE80 E01228E0 00441025 */ or $v0, $v0, $a0 /* 40CE84 E01228E4 00431025 */ or $v0, $v0, $v1 /* 40CE88 E01228E8 ACA2000C */ sw $v0, 0xC($a1) .LE01228EC: /* 40CE8C E01228EC 24020001 */ addiu $v0, $zero, 0x1 /* 40CE90 E01228F0 16E20003 */ bne $s7, $v0, .LE0122900 /* 40CE94 E01228F4 24020002 */ addiu $v0, $zero, 0x2 /* 40CE98 E01228F8 52820047 */ beql $s4, $v0, .LE0122A18 /* 40CE9C E01228FC 26940001 */ addiu $s4, $s4, 0x1 .LE0122900: /* 40CEA0 E0122900 C6400040 */ lwc1 $f0, 0x40($s2) /* 40CEA4 E0122904 46140032 */ c.eq.s $f0, $f20 /* 40CEA8 E0122908 00000000 */ nop /* 40CEAC E012290C 45010041 */ bc1t .LE0122A14 /* 40CEB0 E0122910 00148080 */ sll $s0, $s4, 2 /* 40CEB4 E0122914 8E420050 */ lw $v0, 0x50($s2) /* 40CEB8 E0122918 5040003F */ beql $v0, $zero, .LE0122A18 /* 40CEBC E012291C 26940001 */ addiu $s4, $s4, 0x1 /* 40CEC0 E0122920 4405A000 */ mfc1 $a1, $f20 /* 40CEC4 E0122924 4406A000 */ mfc1 $a2, $f20 /* 40CEC8 E0122928 4407A000 */ mfc1 $a3, $f20 /* 40CECC E012292C 27A40020 */ addiu $a0, $sp, 0x20 /* 40CED0 E0122930 E7A00010 */ swc1 $f0, 0x10($sp) /* 40CED4 E0122934 E7B40014 */ swc1 $f20, 0x14($sp) /* 40CED8 E0122938 E7B40018 */ swc1 $f20, 0x18($sp) /* 40CEDC E012293C 0C080180 */ jal shim_guPositionF /* 40CEE0 E0122940 E7B4001C */ swc1 $f20, 0x1C($sp) /* 40CEE4 E0122944 27A40020 */ addiu $a0, $sp, 0x20 /* 40CEE8 E0122948 96A50000 */ lhu $a1, 0x0($s5) /* 40CEEC E012294C 8FC20000 */ lw $v0, 0x0($fp) /* 40CEF0 E0122950 00052980 */ sll $a1, $a1, 6 /* 40CEF4 E0122954 00B62821 */ addu $a1, $a1, $s6 /* 40CEF8 E0122958 0C080118 */ jal shim_guMtxF2L /* 40CEFC E012295C 00452821 */ addu $a1, $v0, $a1 /* 40CF00 E0122960 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 40CF04 E0122964 8E640000 */ lw $a0, 0x0($s3) /* 40CF08 E0122968 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 40CF0C E012296C 0080282D */ daddu $a1, $a0, $zero /* 40CF10 E0122970 24840008 */ addiu $a0, $a0, 0x8 /* 40CF14 E0122974 AE640000 */ sw $a0, 0x0($s3) /* 40CF18 E0122978 96A20000 */ lhu $v0, 0x0($s5) /* 40CF1C E012297C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 40CF20 E0122980 ACA30000 */ sw $v1, 0x0($a1) /* 40CF24 E0122984 24430001 */ addiu $v1, $v0, 0x1 /* 40CF28 E0122988 3042FFFF */ andi $v0, $v0, 0xFFFF /* 40CF2C E012298C 00021180 */ sll $v0, $v0, 6 /* 40CF30 E0122990 A6A30000 */ sh $v1, 0x0($s5) /* 40CF34 E0122994 8FC30000 */ lw $v1, 0x0($fp) /* 40CF38 E0122998 00561021 */ addu $v0, $v0, $s6 /* 40CF3C E012299C 00621821 */ addu $v1, $v1, $v0 /* 40CF40 E01229A0 24820008 */ addiu $v0, $a0, 0x8 /* 40CF44 E01229A4 ACA30004 */ sw $v1, 0x4($a1) /* 40CF48 E01229A8 AE620000 */ sw $v0, 0x0($s3) /* 40CF4C E01229AC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 40CF50 E01229B0 AC820000 */ sw $v0, 0x0($a0) /* 40CF54 E01229B4 9223001F */ lbu $v1, 0x1F($s1) /* 40CF58 E01229B8 92250023 */ lbu $a1, 0x23($s1) /* 40CF5C E01229BC 92260027 */ lbu $a2, 0x27($s1) /* 40CF60 E01229C0 92470053 */ lbu $a3, 0x53($s2) /* 40CF64 E01229C4 24820010 */ addiu $v0, $a0, 0x10 /* 40CF68 E01229C8 AE620000 */ sw $v0, 0x0($s3) /* 40CF6C E01229CC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 40CF70 E01229D0 AC820008 */ sw $v0, 0x8($a0) /* 40CF74 E01229D4 00031E00 */ sll $v1, $v1, 24 /* 40CF78 E01229D8 00052C00 */ sll $a1, $a1, 16 /* 40CF7C E01229DC 00651825 */ or $v1, $v1, $a1 /* 40CF80 E01229E0 00063200 */ sll $a2, $a2, 8 /* 40CF84 E01229E4 00661825 */ or $v1, $v1, $a2 /* 40CF88 E01229E8 00671825 */ or $v1, $v1, $a3 /* 40CF8C E01229EC AC830004 */ sw $v1, 0x4($a0) /* 40CF90 E01229F0 3C03E012 */ lui $v1, (0xE0122B90 >> 16) /* 40CF94 E01229F4 00701821 */ addu $v1, $v1, $s0 /* 40CF98 E01229F8 8C632B90 */ lw $v1, (0xE0122B90 & 0xFFFF)($v1) /* 40CF9C E01229FC 24820018 */ addiu $v0, $a0, 0x18 /* 40CFA0 E0122A00 AE620000 */ sw $v0, 0x0($s3) /* 40CFA4 E0122A04 24020040 */ addiu $v0, $zero, 0x40 /* 40CFA8 E0122A08 AC880010 */ sw $t0, 0x10($a0) /* 40CFAC E0122A0C AC820014 */ sw $v0, 0x14($a0) /* 40CFB0 E0122A10 AC83000C */ sw $v1, 0xC($a0) .LE0122A14: /* 40CFB4 E0122A14 26940001 */ addiu $s4, $s4, 0x1 .LE0122A18: /* 40CFB8 E0122A18 2A820004 */ slti $v0, $s4, 0x4 /* 40CFBC E0122A1C 1440FFB3 */ bnez $v0, .LE01228EC /* 40CFC0 E0122A20 26520004 */ addiu $s2, $s2, 0x4 /* 40CFC4 E0122A24 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 40CFC8 E0122A28 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 40CFCC E0122A2C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 40CFD0 E0122A30 8C620000 */ lw $v0, 0x0($v1) /* 40CFD4 E0122A34 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 40CFD8 E0122A38 0040202D */ daddu $a0, $v0, $zero /* 40CFDC E0122A3C 24420008 */ addiu $v0, $v0, 0x8 /* 40CFE0 E0122A40 AC620000 */ sw $v0, 0x0($v1) /* 40CFE4 E0122A44 24020040 */ addiu $v0, $zero, 0x40 /* 40CFE8 E0122A48 AC820004 */ sw $v0, 0x4($a0) /* 40CFEC E0122A4C 26E2FFFE */ addiu $v0, $s7, -0x2 /* 40CFF0 E0122A50 2C420002 */ sltiu $v0, $v0, 0x2 /* 40CFF4 E0122A54 10400037 */ beqz $v0, .LE0122B34 /* 40CFF8 E0122A58 AC850000 */ sw $a1, 0x0($a0) /* 40CFFC E0122A5C 8E230070 */ lw $v1, 0x70($s1) /* 40D000 E0122A60 24020001 */ addiu $v0, $zero, 0x1 /* 40D004 E0122A64 10620004 */ beq $v1, $v0, .LE0122A78 /* 40D008 E0122A68 0000382D */ daddu $a3, $zero, $zero /* 40D00C E0122A6C 24020064 */ addiu $v0, $zero, 0x64 /* 40D010 E0122A70 1462000E */ bne $v1, $v0, .LE0122AAC /* 40D014 E0122A74 24020005 */ addiu $v0, $zero, 0x5 .LE0122A78: /* 40D018 E0122A78 8E230074 */ lw $v1, 0x74($s1) /* 40D01C E0122A7C 28620003 */ slti $v0, $v1, 0x3 /* 40D020 E0122A80 14400008 */ bnez $v0, .LE0122AA4 /* 40D024 E0122A84 2862000B */ slti $v0, $v1, 0xB /* 40D028 E0122A88 10400006 */ beqz $v0, .LE0122AA4 /* 40D02C E0122A8C 2462FFFE */ addiu $v0, $v1, -0x2 /* 40D030 E0122A90 00021900 */ sll $v1, $v0, 4 /* 40D034 E0122A94 00621823 */ subu $v1, $v1, $v0 /* 40D038 E0122A98 00031840 */ sll $v1, $v1, 1 /* 40D03C E0122A9C 240200FF */ addiu $v0, $zero, 0xFF /* 40D040 E0122AA0 00433823 */ subu $a3, $v0, $v1 .LE0122AA4: /* 40D044 E0122AA4 8E230070 */ lw $v1, 0x70($s1) /* 40D048 E0122AA8 24020005 */ addiu $v0, $zero, 0x5 .LE0122AAC: /* 40D04C E0122AAC 1462000A */ bne $v1, $v0, .LE0122AD8 /* 40D050 E0122AB0 00000000 */ nop /* 40D054 E0122AB4 8E230074 */ lw $v1, 0x74($s1) /* 40D058 E0122AB8 18600007 */ blez $v1, .LE0122AD8 /* 40D05C E0122ABC 28620009 */ slti $v0, $v1, 0x9 /* 40D060 E0122AC0 10400005 */ beqz $v0, .LE0122AD8 /* 40D064 E0122AC4 00031100 */ sll $v0, $v1, 4 /* 40D068 E0122AC8 00431023 */ subu $v0, $v0, $v1 /* 40D06C E0122ACC 00021040 */ sll $v0, $v0, 1 /* 40D070 E0122AD0 240300FF */ addiu $v1, $zero, 0xFF /* 40D074 E0122AD4 00623823 */ subu $a3, $v1, $v0 .LE0122AD8: /* 40D078 E0122AD8 18E00014 */ blez $a3, .LE0122B2C /* 40D07C E0122ADC 3C06D0D0 */ lui $a2, (0xD0D0D000 >> 16) /* 40D080 E0122AE0 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 40D084 E0122AE4 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 40D088 E0122AE8 34C6D000 */ ori $a2, $a2, (0xD0D0D000 & 0xFFFF) /* 40D08C E0122AEC 8CA30000 */ lw $v1, 0x0($a1) /* 40D090 E0122AF0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 40D094 E0122AF4 0060202D */ daddu $a0, $v1, $zero /* 40D098 E0122AF8 24630008 */ addiu $v1, $v1, 0x8 /* 40D09C E0122AFC ACA30000 */ sw $v1, 0x0($a1) /* 40D0A0 E0122B00 AC820000 */ sw $v0, 0x0($a0) /* 40D0A4 E0122B04 30E200FF */ andi $v0, $a3, 0xFF /* 40D0A8 E0122B08 00461025 */ or $v0, $v0, $a2 /* 40D0AC E0122B0C AC820004 */ sw $v0, 0x4($a0) /* 40D0B0 E0122B10 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 40D0B4 E0122B14 AC620000 */ sw $v0, 0x0($v1) /* 40D0B8 E0122B18 3C04E012 */ lui $a0, (0xE0122BA0 >> 16) /* 40D0BC E0122B1C 8C842BA0 */ lw $a0, (0xE0122BA0 & 0xFFFF)($a0) /* 40D0C0 E0122B20 24620008 */ addiu $v0, $v1, 0x8 /* 40D0C4 E0122B24 ACA20000 */ sw $v0, 0x0($a1) /* 40D0C8 E0122B28 AC640004 */ sw $a0, 0x4($v1) .LE0122B2C: /* 40D0CC E0122B2C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 40D0D0 E0122B30 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) .LE0122B34: /* 40D0D4 E0122B34 8C620000 */ lw $v0, 0x0($v1) /* 40D0D8 E0122B38 0040202D */ daddu $a0, $v0, $zero /* 40D0DC E0122B3C 24420008 */ addiu $v0, $v0, 0x8 /* 40D0E0 E0122B40 AC620000 */ sw $v0, 0x0($v1) /* 40D0E4 E0122B44 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 40D0E8 E0122B48 AC820000 */ sw $v0, 0x0($a0) /* 40D0EC E0122B4C AC800004 */ sw $zero, 0x4($a0) /* 40D0F0 E0122B50 8FBF0084 */ lw $ra, 0x84($sp) /* 40D0F4 E0122B54 8FBE0080 */ lw $fp, 0x80($sp) /* 40D0F8 E0122B58 8FB7007C */ lw $s7, 0x7C($sp) /* 40D0FC E0122B5C 8FB60078 */ lw $s6, 0x78($sp) /* 40D100 E0122B60 8FB50074 */ lw $s5, 0x74($sp) /* 40D104 E0122B64 8FB40070 */ lw $s4, 0x70($sp) /* 40D108 E0122B68 8FB3006C */ lw $s3, 0x6C($sp) /* 40D10C E0122B6C 8FB20068 */ lw $s2, 0x68($sp) /* 40D110 E0122B70 8FB10064 */ lw $s1, 0x64($sp) /* 40D114 E0122B74 8FB00060 */ lw $s0, 0x60($sp) /* 40D118 E0122B78 D7B40088 */ ldc1 $f20, 0x88($sp) /* 40D11C E0122B7C 03E00008 */ jr $ra /* 40D120 E0122B80 27BD0090 */ addiu $sp, $sp, 0x90 /* 40D124 E0122B84 00000000 */ nop /* 40D128 E0122B88 00000000 */ nop /* 40D12C E0122B8C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void star_spirits_energy_appendGfx(void* effect) { StarSpiritsEnergyFXData* data = ((EffectInstance*)effect)->data.starSpiritsEnergy; s32 unk_04 = data->unk_04; s32 alpha; Matrix4f sp20; 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_3C, data->unk_08, data->unk_0C, data->unk_10); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E0122BA4[0]); gDPSetEnvColor(gMainGfxPos++, data->unk_2C, data->unk_30, data->unk_34, data->unk_38); for (i = 0; i < 4; i++) { if (unk_04 != 1 || i != 2) { if (data->unk_40[i] != 0.0f && data->unk_50[i] != 0) { shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, data->unk_40[i], 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, data->unk_1C, data->unk_20, data->unk_24, data->unk_50[i]); gSPDisplayList(gMainGfxPos++, D_E0122B90[i]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); if (unk_04 == 2 || unk_04 == 3) { alpha = 0; if ((data->unk_70 == 1 || data->unk_70 == 100) && data->unk_74 > 2 && data->unk_74 < 11) { alpha = 255 - (data->unk_74 - 2) * 30; } if (data->unk_70 == 5 && data->unk_74 > 0 && data->unk_74 < 9) { alpha = 255 - data->unk_74 * 30; } if (alpha > 0) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 208, 208, 208, alpha); gSPDisplayList(gMainGfxPos++, D_E0122BA0[0]); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel lens_flare_appendGfx /* 344D20 E0034310 27BDFEE8 */ addiu $sp, $sp, -0x118 /* 344D24 E0034314 3C03DB06 */ lui $v1, (0xDB060024 >> 16) /* 344D28 E0034318 AFB600F8 */ sw $s6, 0xF8($sp) /* 344D2C E003431C 3C16800A */ lui $s6, %hi(gMainGfxPos) /* 344D30 E0034320 26D6A66C */ addiu $s6, $s6, %lo(gMainGfxPos) /* 344D34 E0034324 34630024 */ ori $v1, $v1, (0xDB060024 & 0xFFFF) /* 344D38 E0034328 AFBF0104 */ sw $ra, 0x104($sp) /* 344D3C E003432C AFBE0100 */ sw $fp, 0x100($sp) /* 344D40 E0034330 AFB700FC */ sw $s7, 0xFC($sp) /* 344D44 E0034334 AFB500F4 */ sw $s5, 0xF4($sp) /* 344D48 E0034338 AFB400F0 */ sw $s4, 0xF0($sp) /* 344D4C E003433C AFB300EC */ sw $s3, 0xEC($sp) /* 344D50 E0034340 AFB200E8 */ sw $s2, 0xE8($sp) /* 344D54 E0034344 AFB100E4 */ sw $s1, 0xE4($sp) /* 344D58 E0034348 AFB000E0 */ sw $s0, 0xE0($sp) /* 344D5C E003434C F7B60110 */ sdc1 $f22, 0x110($sp) /* 344D60 E0034350 F7B40108 */ sdc1 $f20, 0x108($sp) /* 344D64 E0034354 8EC80000 */ lw $t0, 0x0($s6) /* 344D68 E0034358 8C94000C */ lw $s4, 0xC($a0) /* 344D6C E003435C 0100102D */ daddu $v0, $t0, $zero /* 344D70 E0034360 25080008 */ addiu $t0, $t0, 0x8 /* 344D74 E0034364 8E900000 */ lw $s0, 0x0($s4) /* 344D78 E0034368 3C0BE700 */ lui $t3, (0xE7000000 >> 16) /* 344D7C E003436C AC4B0000 */ sw $t3, 0x0($v0) /* 344D80 E0034370 AC400004 */ sw $zero, 0x4($v0) /* 344D84 E0034374 AD030000 */ sw $v1, 0x0($t0) /* 344D88 E0034378 8C820010 */ lw $v0, 0x10($a0) /* 344D8C E003437C 27A40018 */ addiu $a0, $sp, 0x18 /* 344D90 E0034380 AEC80000 */ sw $t0, 0x0($s6) /* 344D94 E0034384 8C43001C */ lw $v1, 0x1C($v0) /* 344D98 E0034388 3C0BDE00 */ lui $t3, (0xDE000000 >> 16) /* 344D9C E003438C 3C028000 */ lui $v0, (0x80000000 >> 16) /* 344DA0 E0034390 AD0B0008 */ sw $t3, 0x8($t0) /* 344DA4 E0034394 00105880 */ sll $t3, $s0, 2 /* 344DA8 E0034398 00621821 */ addu $v1, $v1, $v0 /* 344DAC E003439C AD030004 */ sw $v1, 0x4($t0) /* 344DB0 E00343A0 AFAB00D8 */ sw $t3, 0xD8($sp) /* 344DB4 E00343A4 3C03E003 */ lui $v1, (0xE0034788 >> 16) /* 344DB8 E00343A8 006B1821 */ addu $v1, $v1, $t3 /* 344DBC E00343AC 8C634788 */ lw $v1, (0xE0034788 & 0xFFFF)($v1) /* 344DC0 E00343B0 25020008 */ addiu $v0, $t0, 0x8 /* 344DC4 E00343B4 AEC20000 */ sw $v0, 0x0($s6) /* 344DC8 E00343B8 AD03000C */ sw $v1, 0xC($t0) /* 344DCC E00343BC 8E850004 */ lw $a1, 0x4($s4) /* 344DD0 E00343C0 8E860008 */ lw $a2, 0x8($s4) /* 344DD4 E00343C4 8E87000C */ lw $a3, 0xC($s4) /* 344DD8 E00343C8 25080010 */ addiu $t0, $t0, 0x10 /* 344DDC E00343CC 0C080108 */ jal shim_guTranslateF /* 344DE0 E00343D0 AEC80000 */ sw $t0, 0x0($s6) /* 344DE4 E00343D4 27B50058 */ addiu $s5, $sp, 0x58 /* 344DE8 E00343D8 4480A000 */ mtc1 $zero, $f20 /* 344DEC E00343DC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 344DF0 E00343E0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 344DF4 E00343E4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 344DF8 E00343E8 4481B000 */ mtc1 $at, $f22 /* 344DFC E00343EC 00031080 */ sll $v0, $v1, 2 /* 344E00 E00343F0 00431021 */ addu $v0, $v0, $v1 /* 344E04 E00343F4 00021080 */ sll $v0, $v0, 2 /* 344E08 E00343F8 00431023 */ subu $v0, $v0, $v1 /* 344E0C E00343FC 000218C0 */ sll $v1, $v0, 3 /* 344E10 E0034400 00431021 */ addu $v0, $v0, $v1 /* 344E14 E0034404 000210C0 */ sll $v0, $v0, 3 /* 344E18 E0034408 4406A000 */ mfc1 $a2, $f20 /* 344E1C E003440C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 344E20 E0034410 00220821 */ addu $at, $at, $v0 /* 344E24 E0034414 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 344E28 E0034418 4407B000 */ mfc1 $a3, $f22 /* 344E2C E003441C 46000007 */ neg.s $f0, $f0 /* 344E30 E0034420 44050000 */ mfc1 $a1, $f0 /* 344E34 E0034424 02A0202D */ daddu $a0, $s5, $zero /* 344E38 E0034428 0C080104 */ jal shim_guRotateF /* 344E3C E003442C E7B40010 */ swc1 $f20, 0x10($sp) /* 344E40 E0034430 02A0202D */ daddu $a0, $s5, $zero /* 344E44 E0034434 27A50018 */ addiu $a1, $sp, 0x18 /* 344E48 E0034438 27BE0098 */ addiu $fp, $sp, 0x98 /* 344E4C E003443C 0C080114 */ jal shim_guMtxCatF /* 344E50 E0034440 03C0302D */ daddu $a2, $fp, $zero /* 344E54 E0034444 8E830030 */ lw $v1, 0x30($s4) /* 344E58 E0034448 8E970028 */ lw $s7, 0x28($s4) /* 344E5C E003444C 00031040 */ sll $v0, $v1, 1 /* 344E60 E0034450 16000054 */ bnez $s0, .LE00345A4 /* 344E64 E0034454 00439821 */ addu $s3, $v0, $v1 /* 344E68 E0034458 02A0202D */ daddu $a0, $s5, $zero /* 344E6C E003445C 3C120001 */ lui $s2, (0x11630 >> 16) /* 344E70 E0034460 8E850020 */ lw $a1, 0x20($s4) /* 344E74 E0034464 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 344E78 E0034468 00A0302D */ daddu $a2, $a1, $zero /* 344E7C E003446C 0C080110 */ jal shim_guScaleF /* 344E80 E0034470 00A0382D */ daddu $a3, $a1, $zero /* 344E84 E0034474 02A0202D */ daddu $a0, $s5, $zero /* 344E88 E0034478 03C0282D */ daddu $a1, $fp, $zero /* 344E8C E003447C 0C080114 */ jal shim_guMtxCatF /* 344E90 E0034480 27A60018 */ addiu $a2, $sp, 0x18 /* 344E94 E0034484 27A40018 */ addiu $a0, $sp, 0x18 /* 344E98 E0034488 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 344E9C E003448C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 344EA0 E0034490 3C11800A */ lui $s1, %hi(gDisplayContext) /* 344EA4 E0034494 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 344EA8 E0034498 96050000 */ lhu $a1, 0x0($s0) /* 344EAC E003449C 8E220000 */ lw $v0, 0x0($s1) /* 344EB0 E00344A0 00052980 */ sll $a1, $a1, 6 /* 344EB4 E00344A4 00B22821 */ addu $a1, $a1, $s2 /* 344EB8 E00344A8 0C080118 */ jal shim_guMtxF2L /* 344EBC E00344AC 00452821 */ addu $a1, $v0, $a1 /* 344EC0 E00344B0 3C022AAA */ lui $v0, (0x2AAAAAAB >> 16) /* 344EC4 E00344B4 3442AAAB */ ori $v0, $v0, (0x2AAAAAAB & 0xFFFF) /* 344EC8 E00344B8 3C09D838 */ lui $t1, (0xD8380002 >> 16) /* 344ECC E00344BC 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF) /* 344ED0 E00344C0 02620018 */ mult $s3, $v0 /* 344ED4 E00344C4 8EC50000 */ lw $a1, 0x0($s6) /* 344ED8 E00344C8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 344EDC E00344CC 00A0402D */ daddu $t0, $a1, $zero /* 344EE0 E00344D0 24A50008 */ addiu $a1, $a1, 0x8 /* 344EE4 E00344D4 AEC50000 */ sw $a1, 0x0($s6) /* 344EE8 E00344D8 AD020000 */ sw $v0, 0x0($t0) /* 344EEC E00344DC 001317C3 */ sra $v0, $s3, 31 /* 344EF0 E00344E0 96040000 */ lhu $a0, 0x0($s0) /* 344EF4 E00344E4 00005810 */ mfhi $t3 /* 344EF8 E00344E8 000B1883 */ sra $v1, $t3, 2 /* 344EFC E00344EC 00621823 */ subu $v1, $v1, $v0 /* 344F00 E00344F0 00031040 */ sll $v0, $v1, 1 /* 344F04 E00344F4 00431021 */ addu $v0, $v0, $v1 /* 344F08 E00344F8 000210C0 */ sll $v0, $v0, 3 /* 344F0C E00344FC 02629823 */ subu $s3, $s3, $v0 /* 344F10 E0034500 3C03E003 */ lui $v1, (0xE0034790 >> 16) /* 344F14 E0034504 00731821 */ addu $v1, $v1, $s3 /* 344F18 E0034508 90634790 */ lbu $v1, (0xE0034790 & 0xFFFF)($v1) /* 344F1C E003450C 3C06E003 */ lui $a2, (0xE0034791 >> 16) /* 344F20 E0034510 00D33021 */ addu $a2, $a2, $s3 /* 344F24 E0034514 90C64791 */ lbu $a2, (0xE0034791 & 0xFFFF)($a2) /* 344F28 E0034518 3C07E003 */ lui $a3, (0xE0034792 >> 16) /* 344F2C E003451C 00F33821 */ addu $a3, $a3, $s3 /* 344F30 E0034520 90E74792 */ lbu $a3, (0xE0034792 & 0xFFFF)($a3) /* 344F34 E0034524 24A20008 */ addiu $v0, $a1, 0x8 /* 344F38 E0034528 AEC20000 */ sw $v0, 0x0($s6) /* 344F3C E003452C 24820001 */ addiu $v0, $a0, 0x1 /* 344F40 E0034530 A6020000 */ sh $v0, 0x0($s0) /* 344F44 E0034534 24A20010 */ addiu $v0, $a1, 0x10 /* 344F48 E0034538 AEC20000 */ sw $v0, 0x0($s6) /* 344F4C E003453C 32E200FF */ andi $v0, $s7, 0xFF /* 344F50 E0034540 3084FFFF */ andi $a0, $a0, 0xFFFF /* 344F54 E0034544 00042180 */ sll $a0, $a0, 6 /* 344F58 E0034548 00922021 */ addu $a0, $a0, $s2 /* 344F5C E003454C 00031E00 */ sll $v1, $v1, 24 /* 344F60 E0034550 00063400 */ sll $a2, $a2, 16 /* 344F64 E0034554 00661825 */ or $v1, $v1, $a2 /* 344F68 E0034558 00073A00 */ sll $a3, $a3, 8 /* 344F6C E003455C 00671825 */ or $v1, $v1, $a3 /* 344F70 E0034560 00621825 */ or $v1, $v1, $v0 /* 344F74 E0034564 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 344F78 E0034568 AD030004 */ sw $v1, 0x4($t0) /* 344F7C E003456C ACA20000 */ sw $v0, 0x0($a1) /* 344F80 E0034570 8E220000 */ lw $v0, 0x0($s1) /* 344F84 E0034574 3C0BDE00 */ lui $t3, (0xDE000000 >> 16) /* 344F88 E0034578 ACAB0008 */ sw $t3, 0x8($a1) /* 344F8C E003457C 00441021 */ addu $v0, $v0, $a0 /* 344F90 E0034580 ACA20004 */ sw $v0, 0x4($a1) /* 344F94 E0034584 3C03E003 */ lui $v1, (0xE0034780 >> 16) /* 344F98 E0034588 8C634780 */ lw $v1, (0xE0034780 & 0xFFFF)($v1) /* 344F9C E003458C 24A20018 */ addiu $v0, $a1, 0x18 /* 344FA0 E0034590 AEC20000 */ sw $v0, 0x0($s6) /* 344FA4 E0034594 24020040 */ addiu $v0, $zero, 0x40 /* 344FA8 E0034598 ACA90010 */ sw $t1, 0x10($a1) /* 344FAC E003459C ACA20014 */ sw $v0, 0x14($a1) /* 344FB0 E00345A0 ACA3000C */ sw $v1, 0xC($a1) .LE00345A4: /* 344FB4 E00345A4 8E970024 */ lw $s7, 0x24($s4) /* 344FB8 E00345A8 2AE20100 */ slti $v0, $s7, 0x100 /* 344FBC E00345AC 50400001 */ beql $v0, $zero, .LE00345B4 /* 344FC0 E00345B0 241700FF */ addiu $s7, $zero, 0xFF .LE00345B4: /* 344FC4 E00345B4 1AE0005A */ blez $s7, .LE0034720 /* 344FC8 E00345B8 02A0202D */ daddu $a0, $s5, $zero /* 344FCC E00345BC 3C120001 */ lui $s2, (0x11630 >> 16) /* 344FD0 E00345C0 8E850018 */ lw $a1, 0x18($s4) /* 344FD4 E00345C4 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 344FD8 E00345C8 00A0302D */ daddu $a2, $a1, $zero /* 344FDC E00345CC 0C080110 */ jal shim_guScaleF /* 344FE0 E00345D0 00A0382D */ daddu $a3, $a1, $zero /* 344FE4 E00345D4 02A0202D */ daddu $a0, $s5, $zero /* 344FE8 E00345D8 03C0282D */ daddu $a1, $fp, $zero /* 344FEC E00345DC 0C080114 */ jal shim_guMtxCatF /* 344FF0 E00345E0 27A60018 */ addiu $a2, $sp, 0x18 /* 344FF4 E00345E4 4406A000 */ mfc1 $a2, $f20 /* 344FF8 E00345E8 02A0202D */ daddu $a0, $s5, $zero /* 344FFC E00345EC E7B60010 */ swc1 $f22, 0x10($sp) /* 345000 E00345F0 8E850010 */ lw $a1, 0x10($s4) /* 345004 E00345F4 0C080104 */ jal shim_guRotateF /* 345008 E00345F8 00C0382D */ daddu $a3, $a2, $zero /* 34500C E00345FC 02A0202D */ daddu $a0, $s5, $zero /* 345010 E0034600 27A50018 */ addiu $a1, $sp, 0x18 /* 345014 E0034604 0C080114 */ jal shim_guMtxCatF /* 345018 E0034608 00A0302D */ daddu $a2, $a1, $zero /* 34501C E003460C 27A40018 */ addiu $a0, $sp, 0x18 /* 345020 E0034610 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 345024 E0034614 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 345028 E0034618 3C11800A */ lui $s1, %hi(gDisplayContext) /* 34502C E003461C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 345030 E0034620 96050000 */ lhu $a1, 0x0($s0) /* 345034 E0034624 8E220000 */ lw $v0, 0x0($s1) /* 345038 E0034628 00052980 */ sll $a1, $a1, 6 /* 34503C E003462C 00B22821 */ addu $a1, $a1, $s2 /* 345040 E0034630 0C080118 */ jal shim_guMtxF2L /* 345044 E0034634 00452821 */ addu $a1, $v0, $a1 /* 345048 E0034638 3C0AD838 */ lui $t2, (0xD8380002 >> 16) /* 34504C E003463C 8EC50000 */ lw $a1, 0x0($s6) /* 345050 E0034640 3C08FA00 */ lui $t0, (0xFA000000 >> 16) /* 345054 E0034644 00A0482D */ daddu $t1, $a1, $zero /* 345058 E0034648 24A50008 */ addiu $a1, $a1, 0x8 /* 34505C E003464C AEC50000 */ sw $a1, 0x0($s6) /* 345060 E0034650 AD280000 */ sw $t0, 0x0($t1) /* 345064 E0034654 3C04E003 */ lui $a0, (0xE0034790 >> 16) /* 345068 E0034658 00932021 */ addu $a0, $a0, $s3 /* 34506C E003465C 90844790 */ lbu $a0, (0xE0034790 & 0xFFFF)($a0) /* 345070 E0034660 3C03E003 */ lui $v1, (0xE0034791 >> 16) /* 345074 E0034664 00731821 */ addu $v1, $v1, $s3 /* 345078 E0034668 90634791 */ lbu $v1, (0xE0034791 & 0xFFFF)($v1) /* 34507C E003466C 3C07E003 */ lui $a3, (0xE0034792 >> 16) /* 345080 E0034670 00F33821 */ addu $a3, $a3, $s3 /* 345084 E0034674 90E74792 */ lbu $a3, (0xE0034792 & 0xFFFF)($a3) /* 345088 E0034678 24A20008 */ addiu $v0, $a1, 0x8 /* 34508C E003467C AEC20000 */ sw $v0, 0x0($s6) /* 345090 E0034680 96060000 */ lhu $a2, 0x0($s0) /* 345094 E0034684 24A20010 */ addiu $v0, $a1, 0x10 /* 345098 E0034688 AEC20000 */ sw $v0, 0x0($s6) /* 34509C E003468C 24C20001 */ addiu $v0, $a2, 0x1 /* 3450A0 E0034690 A6020000 */ sh $v0, 0x0($s0) /* 3450A4 E0034694 24A20018 */ addiu $v0, $a1, 0x18 /* 3450A8 E0034698 00042600 */ sll $a0, $a0, 24 /* 3450AC E003469C 00031C00 */ sll $v1, $v1, 16 /* 3450B0 E00346A0 00832025 */ or $a0, $a0, $v1 /* 3450B4 E00346A4 00073A00 */ sll $a3, $a3, 8 /* 3450B8 E00346A8 00872025 */ or $a0, $a0, $a3 /* 3450BC E00346AC 32E300FF */ andi $v1, $s7, 0xFF /* 3450C0 E00346B0 00832025 */ or $a0, $a0, $v1 /* 3450C4 E00346B4 AEC20000 */ sw $v0, 0x0($s6) /* 3450C8 E00346B8 2402FF00 */ addiu $v0, $zero, -0x100 /* 3450CC E00346BC 00621825 */ or $v1, $v1, $v0 /* 3450D0 E00346C0 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 3450D4 E00346C4 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 3450D8 E00346C8 00063180 */ sll $a2, $a2, 6 /* 3450DC E00346CC 00D23021 */ addu $a2, $a2, $s2 /* 3450E0 E00346D0 AD240004 */ sw $a0, 0x4($t1) /* 3450E4 E00346D4 ACA80000 */ sw $t0, 0x0($a1) /* 3450E8 E00346D8 ACA30004 */ sw $v1, 0x4($a1) /* 3450EC E00346DC ACA20008 */ sw $v0, 0x8($a1) /* 3450F0 E00346E0 8E220000 */ lw $v0, 0x0($s1) /* 3450F4 E00346E4 3C0BDE00 */ lui $t3, (0xDE000000 >> 16) /* 3450F8 E00346E8 ACAB0010 */ sw $t3, 0x10($a1) /* 3450FC E00346EC 00461021 */ addu $v0, $v0, $a2 /* 345100 E00346F0 ACA2000C */ sw $v0, 0xC($a1) /* 345104 E00346F4 8FAB00D8 */ lw $t3, 0xD8($sp) /* 345108 E00346F8 354A0002 */ ori $t2, $t2, (0xD8380002 & 0xFFFF) /* 34510C E00346FC 3C03E003 */ lui $v1, (0xE0034780 >> 16) /* 345110 E0034700 006B1821 */ addu $v1, $v1, $t3 /* 345114 E0034704 8C634780 */ lw $v1, (0xE0034780 & 0xFFFF)($v1) /* 345118 E0034708 24A20020 */ addiu $v0, $a1, 0x20 /* 34511C E003470C AEC20000 */ sw $v0, 0x0($s6) /* 345120 E0034710 24020040 */ addiu $v0, $zero, 0x40 /* 345124 E0034714 ACAA0018 */ sw $t2, 0x18($a1) /* 345128 E0034718 ACA2001C */ sw $v0, 0x1C($a1) /* 34512C E003471C ACA30014 */ sw $v1, 0x14($a1) .LE0034720: /* 345130 E0034720 8EC20000 */ lw $v0, 0x0($s6) /* 345134 E0034724 0040182D */ daddu $v1, $v0, $zero /* 345138 E0034728 24420008 */ addiu $v0, $v0, 0x8 /* 34513C E003472C 3C0BE700 */ lui $t3, (0xE7000000 >> 16) /* 345140 E0034730 AEC20000 */ sw $v0, 0x0($s6) /* 345144 E0034734 AC6B0000 */ sw $t3, 0x0($v1) /* 345148 E0034738 AC600004 */ sw $zero, 0x4($v1) /* 34514C E003473C 8FBF0104 */ lw $ra, 0x104($sp) /* 345150 E0034740 8FBE0100 */ lw $fp, 0x100($sp) /* 345154 E0034744 8FB700FC */ lw $s7, 0xFC($sp) /* 345158 E0034748 8FB600F8 */ lw $s6, 0xF8($sp) /* 34515C E003474C 8FB500F4 */ lw $s5, 0xF4($sp) /* 345160 E0034750 8FB400F0 */ lw $s4, 0xF0($sp) /* 345164 E0034754 8FB300EC */ lw $s3, 0xEC($sp) /* 345168 E0034758 8FB200E8 */ lw $s2, 0xE8($sp) /* 34516C E003475C 8FB100E4 */ lw $s1, 0xE4($sp) /* 345170 E0034760 8FB000E0 */ lw $s0, 0xE0($sp) /* 345174 E0034764 D7B60110 */ ldc1 $f22, 0x110($sp) /* 345178 E0034768 D7B40108 */ ldc1 $f20, 0x108($sp) /* 34517C E003476C 03E00008 */ jr $ra /* 345180 E0034770 27BD0118 */ addiu $sp, $sp, 0x118 /* 345184 E0034774 00000000 */ nop /* 345188 E0034778 00000000 */ nop /* 34518C E003477C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void lens_flare_appendGfx(void* effect) { LensFlareFXData* data = ((EffectInstance*)effect)->data.lensFlare; s32 type = data->type; s32 alpha; s32 idx; Matrix4f mtxTransform; Matrix4f mtxTemp; Matrix4f mtxShared; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_E0034788[type]); shim_guTranslateF(mtxTransform, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(mtxTemp, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxShared); alpha = data->smallFlareAlpha; idx = data->lifetime * 3; // small twinkling shine which changes color if (type == 0) { shim_guScaleF(mtxTemp, data->smallFlareScale, data->smallFlareScale, data->smallFlareScale); shim_guMtxCatF(mtxTemp, mtxShared, mtxTransform); shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); idx %= ARRAY_COUNT(D_E0034790); gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], alpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E0034780[0]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } alpha = data->largeFlareAlpha; if (alpha > 255) { alpha = 255; } // large growing white shine if (alpha > 0) { shim_guScaleF(mtxTemp, data->largeFlareScale, data->largeFlareScale, data->largeFlareScale); shim_guMtxCatF(mtxTemp, mtxShared, mtxTransform); shim_guRotateF(mtxTemp, data->largeFlareRot, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], alpha); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E0034780[type]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel mdl_create_model /* AC90C 8011620C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* AC910 80116210 AFB40040 */ sw $s4, 0x40($sp) /* AC914 80116214 0080A02D */ daddu $s4, $a0, $zero /* AC918 80116218 AFBF0044 */ sw $ra, 0x44($sp) /* AC91C 8011621C AFB3003C */ sw $s3, 0x3C($sp) /* AC920 80116220 AFB20038 */ sw $s2, 0x38($sp) /* AC924 80116224 AFB10034 */ sw $s1, 0x34($sp) /* AC928 80116228 AFB00030 */ sw $s0, 0x30($sp) /* AC92C 8011622C 8E920004 */ lw $s2, 0x4($s4) /* AC930 80116230 2405005F */ addiu $a1, $zero, 0x5F /* AC934 80116234 0C0456C3 */ jal get_model_property /* AC938 80116238 0240202D */ daddu $a0, $s2, $zero /* AC93C 8011623C 0040802D */ daddu $s0, $v0, $zero /* AC940 80116240 12000023 */ beqz $s0, .L801162D0 /* AC944 80116244 0000982D */ daddu $s3, $zero, $zero /* AC948 80116248 9202000B */ lbu $v0, 0xB($s0) /* AC94C 8011624C 00028902 */ srl $s1, $v0, 4 /* AC950 80116250 1220001F */ beqz $s1, .L801162D0 /* AC954 80116254 0240202D */ daddu $a0, $s2, $zero /* AC958 80116258 0C0456C3 */ jal get_model_property /* AC95C 8011625C 24050061 */ addiu $a1, $zero, 0x61 /* AC960 80116260 0040802D */ daddu $s0, $v0, $zero /* AC964 80116264 12000019 */ beqz $s0, .L801162CC /* AC968 80116268 27A20020 */ addiu $v0, $sp, 0x20 /* AC96C 8011626C C6000008 */ lwc1 $f0, 0x8($s0) /* AC970 80116270 C602002C */ lwc1 $f2, 0x2C($s0) /* AC974 80116274 46020000 */ add.s $f0, $f0, $f2 /* AC978 80116278 3C013F00 */ lui $at, (0x3F000000 >> 16) /* AC97C 8011627C 44812000 */ mtc1 $at, $f4 /* AC980 80116280 00000000 */ nop /* AC984 80116284 46040002 */ mul.s $f0, $f0, $f4 /* AC988 80116288 00000000 */ nop /* AC98C 8011628C C6020044 */ lwc1 $f2, 0x44($s0) /* AC990 80116290 44050000 */ mfc1 $a1, $f0 /* AC994 80116294 C6000020 */ lwc1 $f0, 0x20($s0) /* AC998 80116298 46020000 */ add.s $f0, $f0, $f2 /* AC99C 8011629C 46040002 */ mul.s $f0, $f0, $f4 /* AC9A0 801162A0 00000000 */ nop /* AC9A4 801162A4 44070000 */ mfc1 $a3, $f0 /* AC9A8 801162A8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* AC9AC 801162AC 44810000 */ mtc1 $at, $f0 /* AC9B0 801162B0 AFA20014 */ sw $v0, 0x14($sp) /* AC9B4 801162B4 E7A00010 */ swc1 $f0, 0x10($sp) /* AC9B8 801162B8 8E060014 */ lw $a2, 0x14($s0) /* AC9BC 801162BC 0C01C124 */ jal fx_flame /* AC9C0 801162C0 2624FFFF */ addiu $a0, $s1, -0x1 /* AC9C4 801162C4 08045995 */ j .L80116654 /* AC9C8 801162C8 00000000 */ nop .L801162CC: /* AC9CC 801162CC 0000982D */ daddu $s3, $zero, $zero .L801162D0: /* AC9D0 801162D0 3C108015 */ lui $s0, %hi(gCurrentModels) /* AC9D4 801162D4 261012CC */ addiu $s0, $s0, %lo(gCurrentModels) /* AC9D8 801162D8 8E030000 */ lw $v1, 0x0($s0) .L801162DC: /* AC9DC 801162DC 8C620000 */ lw $v0, 0x0($v1) /* AC9E0 801162E0 10400005 */ beqz $v0, .L801162F8 /* AC9E4 801162E4 00000000 */ nop /* AC9E8 801162E8 26730001 */ addiu $s3, $s3, 0x1 /* AC9EC 801162EC 2A620100 */ slti $v0, $s3, 0x100 /* AC9F0 801162F0 1440FFFA */ bnez $v0, .L801162DC /* AC9F4 801162F4 24630004 */ addiu $v1, $v1, 0x4 .L801162F8: /* AC9F8 801162F8 0C00AB39 */ jal heap_malloc /* AC9FC 801162FC 240400B0 */ addiu $a0, $zero, 0xB0 /* ACA00 80116300 00131880 */ sll $v1, $s3, 2 /* ACA04 80116304 8E040000 */ lw $a0, 0x0($s0) /* ACA08 80116308 0040882D */ daddu $s1, $v0, $zero /* ACA0C 8011630C 00641821 */ addu $v1, $v1, $a0 /* ACA10 80116310 AC710000 */ sw $s1, 0x0($v1) /* ACA14 80116314 96820000 */ lhu $v0, 0x0($s4) /* ACA18 80116318 3C038015 */ lui $v1, %hi(D_80153226) /* ACA1C 8011631C 94633226 */ lhu $v1, %lo(D_80153226)($v1) /* ACA20 80116320 34420001 */ ori $v0, $v0, 0x1 /* ACA24 80116324 A6230002 */ sh $v1, 0x2($s1) /* ACA28 80116328 A6220000 */ sh $v0, 0x0($s1) /* ACA2C 8011632C 8E820004 */ lw $v0, 0x4($s4) /* ACA30 80116330 2405005F */ addiu $a1, $zero, 0x5F /* ACA34 80116334 AE220008 */ sw $v0, 0x8($s1) /* ACA38 80116338 0040902D */ daddu $s2, $v0, $zero /* ACA3C 8011633C 8E820008 */ lw $v0, 0x8($s4) /* ACA40 80116340 0240202D */ daddu $a0, $s2, $zero /* ACA44 80116344 A22000A7 */ sb $zero, 0xA7($s1) /* ACA48 80116348 0C0456C3 */ jal get_model_property /* ACA4C 8011634C AE22000C */ sw $v0, 0xC($s1) /* ACA50 80116350 0040802D */ daddu $s0, $v0, $zero /* ACA54 80116354 52000004 */ beql $s0, $zero, .L80116368 /* ACA58 80116358 A22000A4 */ sb $zero, 0xA4($s1) /* ACA5C 8011635C 9202000B */ lbu $v0, 0xB($s0) /* ACA60 80116360 3042000F */ andi $v0, $v0, 0xF /* ACA64 80116364 A22200A4 */ sb $v0, 0xA4($s1) .L80116368: /* ACA68 80116368 A22000A5 */ sb $zero, 0xA5($s1) /* ACA6C 8011636C 8E430000 */ lw $v1, 0x0($s2) /* ACA70 80116370 24020005 */ addiu $v0, $zero, 0x5 /* ACA74 80116374 10620005 */ beq $v1, $v0, .L8011638C /* ACA78 80116378 0240202D */ daddu $a0, $s2, $zero /* ACA7C 8011637C 0C0456C3 */ jal get_model_property /* ACA80 80116380 2405005C */ addiu $a1, $zero, 0x5C /* ACA84 80116384 080458E8 */ j .L801163A0 /* ACA88 80116388 0040802D */ daddu $s0, $v0, $zero .L8011638C: /* ACA8C 8011638C 0C0456C3 */ jal get_model_property /* ACA90 80116390 24050060 */ addiu $a1, $zero, 0x60 /* ACA94 80116394 0040802D */ daddu $s0, $v0, $zero /* ACA98 80116398 12000006 */ beqz $s0, .L801163B4 /* ACA9C 8011639C 2610000C */ addiu $s0, $s0, 0xC .L801163A0: /* ACAA0 801163A0 12000005 */ beqz $s0, .L801163B8 /* ACAA4 801163A4 24020001 */ addiu $v0, $zero, 0x1 /* ACAA8 801163A8 9202000B */ lbu $v0, 0xB($s0) /* ACAAC 801163AC 080458EF */ j .L801163BC /* ACAB0 801163B0 A22200A6 */ sb $v0, 0xA6($s1) .L801163B4: /* ACAB4 801163B4 24020001 */ addiu $v0, $zero, 0x1 .L801163B8: /* ACAB8 801163B8 A22200A6 */ sb $v0, 0xA6($s1) .L801163BC: /* ACABC 801163BC 3C028015 */ lui $v0, %hi(mdl_treeIterPos) /* ACAC0 801163C0 8C423224 */ lw $v0, %lo(mdl_treeIterPos)($v0) /* ACAC4 801163C4 3C03800A */ lui $v1, %hi(mdl_currentModelTreeNodeInfo) /* ACAC8 801163C8 8C63A5F4 */ lw $v1, %lo(mdl_currentModelTreeNodeInfo)($v1) /* ACACC 801163CC 00021080 */ sll $v0, $v0, 2 /* ACAD0 801163D0 00431021 */ addu $v0, $v0, $v1 /* ACAD4 801163D4 90420002 */ lbu $v0, 0x2($v0) /* ACAD8 801163D8 A22000A9 */ sb $zero, 0xA9($s1) /* ACADC 801163DC A22200A8 */ sb $v0, 0xA8($s1) /* ACAE0 801163E0 0C046F85 */ jal is_identity_fixed_mtx /* ACAE4 801163E4 8E84000C */ lw $a0, 0xC($s4) /* ACAE8 801163E8 14400021 */ bnez $v0, .L80116470 /* ACAEC 801163EC 26240018 */ addiu $a0, $s1, 0x18 /* ACAF0 801163F0 0C00AB39 */ jal heap_malloc /* ACAF4 801163F4 24040040 */ addiu $a0, $zero, 0x40 /* ACAF8 801163F8 AE220004 */ sw $v0, 0x4($s1) /* ACAFC 801163FC 8E84000C */ lw $a0, 0xC($s4) /* ACB00 80116400 24830040 */ addiu $v1, $a0, 0x40 .L80116404: /* ACB04 80116404 8C880000 */ lw $t0, 0x0($a0) /* ACB08 80116408 8C890004 */ lw $t1, 0x4($a0) /* ACB0C 8011640C 8C8A0008 */ lw $t2, 0x8($a0) /* ACB10 80116410 8C8B000C */ lw $t3, 0xC($a0) /* ACB14 80116414 AC480000 */ sw $t0, 0x0($v0) /* ACB18 80116418 AC490004 */ sw $t1, 0x4($v0) /* ACB1C 8011641C AC4A0008 */ sw $t2, 0x8($v0) /* ACB20 80116420 AC4B000C */ sw $t3, 0xC($v0) /* ACB24 80116424 24840010 */ addiu $a0, $a0, 0x10 /* ACB28 80116428 1483FFF6 */ bne $a0, $v1, .L80116404 /* ACB2C 8011642C 24420010 */ addiu $v0, $v0, 0x10 /* ACB30 80116430 8E220004 */ lw $v0, 0x4($s1) /* ACB34 80116434 26230018 */ addiu $v1, $s1, 0x18 /* ACB38 80116438 24440040 */ addiu $a0, $v0, 0x40 .L8011643C: /* ACB3C 8011643C 8C480000 */ lw $t0, 0x0($v0) /* ACB40 80116440 8C490004 */ lw $t1, 0x4($v0) /* ACB44 80116444 8C4A0008 */ lw $t2, 0x8($v0) /* ACB48 80116448 8C4B000C */ lw $t3, 0xC($v0) /* ACB4C 8011644C AC680000 */ sw $t0, 0x0($v1) /* ACB50 80116450 AC690004 */ sw $t1, 0x4($v1) /* ACB54 80116454 AC6A0008 */ sw $t2, 0x8($v1) /* ACB58 80116458 AC6B000C */ sw $t3, 0xC($v1) /* ACB5C 8011645C 24420010 */ addiu $v0, $v0, 0x10 /* ACB60 80116460 1444FFF6 */ bne $v0, $a0, .L8011643C /* ACB64 80116464 24630010 */ addiu $v1, $v1, 0x10 /* ACB68 80116468 08045921 */ j .L80116484 /* ACB6C 8011646C 00000000 */ nop .L80116470: /* ACB70 80116470 0C019D10 */ jal guMtxIdent /* ACB74 80116474 AE200004 */ sw $zero, 0x4($s1) /* ACB78 80116478 96220000 */ lhu $v0, 0x0($s1) /* ACB7C 8011647C 34422000 */ ori $v0, $v0, 0x2000 /* ACB80 80116480 A6220000 */ sh $v0, 0x0($s1) .L80116484: /* ACB84 80116484 0C019D28 */ jal guMtxIdentF /* ACB88 80116488 26240058 */ addiu $a0, $s1, 0x58 /* ACB8C 8011648C AE200010 */ sw $zero, 0x10($s1) /* ACB90 80116490 0240202D */ daddu $a0, $s2, $zero /* ACB94 80116494 0C0456C3 */ jal get_model_property /* ACB98 80116498 24050061 */ addiu $a1, $zero, 0x61 /* ACB9C 8011649C 0040802D */ daddu $s0, $v0, $zero /* ACBA0 801164A0 12000017 */ beqz $s0, .L80116500 /* ACBA4 801164A4 00000000 */ nop /* ACBA8 801164A8 C6060008 */ lwc1 $f6, 0x8($s0) /* ACBAC 801164AC C600002C */ lwc1 $f0, 0x2C($s0) /* ACBB0 801164B0 46003180 */ add.s $f6, $f6, $f0 /* ACBB4 801164B4 3C013F00 */ lui $at, (0x3F000000 >> 16) /* ACBB8 801164B8 44814000 */ mtc1 $at, $f8 /* ACBBC 801164BC 00000000 */ nop /* ACBC0 801164C0 46083182 */ mul.s $f6, $f6, $f8 /* ACBC4 801164C4 00000000 */ nop /* ACBC8 801164C8 C6040014 */ lwc1 $f4, 0x14($s0) /* ACBCC 801164CC C6000038 */ lwc1 $f0, 0x38($s0) /* ACBD0 801164D0 46002100 */ add.s $f4, $f4, $f0 /* ACBD4 801164D4 46082102 */ mul.s $f4, $f4, $f8 /* ACBD8 801164D8 00000000 */ nop /* ACBDC 801164DC C6020044 */ lwc1 $f2, 0x44($s0) /* ACBE0 801164E0 C6000020 */ lwc1 $f0, 0x20($s0) /* ACBE4 801164E4 46020000 */ add.s $f0, $f0, $f2 /* ACBE8 801164E8 46080002 */ mul.s $f0, $f0, $f8 /* ACBEC 801164EC 00000000 */ nop /* ACBF0 801164F0 E7A60024 */ swc1 $f6, 0x24($sp) /* ACBF4 801164F4 E7A40028 */ swc1 $f4, 0x28($sp) /* ACBF8 801164F8 08045945 */ j .L80116514 /* ACBFC 801164FC E7A0002C */ swc1 $f0, 0x2C($sp) .L80116500: /* ACC00 80116500 44800000 */ mtc1 $zero, $f0 /* ACC04 80116504 00000000 */ nop /* ACC08 80116508 E7A0002C */ swc1 $f0, 0x2C($sp) /* ACC0C 8011650C E7A00028 */ swc1 $f0, 0x28($sp) /* ACC10 80116510 E7A00024 */ swc1 $f0, 0x24($sp) .L80116514: /* ACC14 80116514 8E220004 */ lw $v0, 0x4($s1) /* ACC18 80116518 1040000F */ beqz $v0, .L80116558 /* ACC1C 8011651C 27A20024 */ addiu $v0, $sp, 0x24 /* ACC20 80116520 C7A00024 */ lwc1 $f0, 0x24($sp) /* ACC24 80116524 C7A20028 */ lwc1 $f2, 0x28($sp) /* ACC28 80116528 C7A4002C */ lwc1 $f4, 0x2C($sp) /* ACC2C 8011652C AFA20010 */ sw $v0, 0x10($sp) /* ACC30 80116530 27A20028 */ addiu $v0, $sp, 0x28 /* ACC34 80116534 AFA20014 */ sw $v0, 0x14($sp) /* ACC38 80116538 27A2002C */ addiu $v0, $sp, 0x2C /* ACC3C 8011653C AFA20018 */ sw $v0, 0x18($sp) /* ACC40 80116540 8E240004 */ lw $a0, 0x4($s1) /* ACC44 80116544 44050000 */ mfc1 $a1, $f0 /* ACC48 80116548 44061000 */ mfc1 $a2, $f2 /* ACC4C 8011654C 44072000 */ mfc1 $a3, $f4 /* ACC50 80116550 0C019E78 */ jal guMtxXFML /* ACC54 80116554 00000000 */ nop .L80116558: /* ACC58 80116558 C7A00024 */ lwc1 $f0, 0x24($sp) /* ACC5C 8011655C C7A20028 */ lwc1 $f2, 0x28($sp) /* ACC60 80116560 C7A4002C */ lwc1 $f4, 0x2C($sp) /* ACC64 80116564 E6200098 */ swc1 $f0, 0x98($s1) /* ACC68 80116568 E622009C */ swc1 $f2, 0x9C($s1) /* ACC6C 8011656C E62400A0 */ swc1 $f4, 0xA0($s1) /* ACC70 80116570 C602002C */ lwc1 $f2, 0x2C($s0) /* ACC74 80116574 C6000008 */ lwc1 $f0, 0x8($s0) /* ACC78 80116578 46001301 */ sub.s $f12, $f2, $f0 /* ACC7C 8011657C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* ACC80 80116580 44812800 */ mtc1 $at, $f5 /* ACC84 80116584 44802000 */ mtc1 $zero, $f4 /* ACC88 80116588 460061A1 */ cvt.d.s $f6, $f12 /* ACC8C 8011658C 46243182 */ mul.d $f6, $f6, $f4 /* ACC90 80116590 00000000 */ nop /* ACC94 80116594 C6020038 */ lwc1 $f2, 0x38($s0) /* ACC98 80116598 C6000014 */ lwc1 $f0, 0x14($s0) /* ACC9C 8011659C 46001281 */ sub.s $f10, $f2, $f0 /* ACCA0 801165A0 460050A1 */ cvt.d.s $f2, $f10 /* ACCA4 801165A4 46241082 */ mul.d $f2, $f2, $f4 /* ACCA8 801165A8 00000000 */ nop /* ACCAC 801165AC C6080044 */ lwc1 $f8, 0x44($s0) /* ACCB0 801165B0 C6000020 */ lwc1 $f0, 0x20($s0) /* ACCB4 801165B4 46004201 */ sub.s $f8, $f8, $f0 /* ACCB8 801165B8 46004021 */ cvt.d.s $f0, $f8 /* ACCBC 801165BC 46240002 */ mul.d $f0, $f0, $f4 /* ACCC0 801165C0 00000000 */ nop /* ACCC4 801165C4 4620338D */ trunc.w.d $f14, $f6 /* ACCC8 801165C8 E60E0004 */ swc1 $f14, 0x4($s0) /* ACCCC 801165CC 4620138D */ trunc.w.d $f14, $f2 /* ACCD0 801165D0 E60E0010 */ swc1 $f14, 0x10($s0) /* ACCD4 801165D4 4620038D */ trunc.w.d $f14, $f0 /* ACCD8 801165D8 E60E001C */ swc1 $f14, 0x1C($s0) /* ACCDC 801165DC 8E220004 */ lw $v0, 0x4($s1) /* ACCE0 801165E0 E7AC0024 */ swc1 $f12, 0x24($sp) /* ACCE4 801165E4 E7AA0028 */ swc1 $f10, 0x28($sp) /* ACCE8 801165E8 14400013 */ bnez $v0, .L80116638 /* ACCEC 801165EC E7A8002C */ swc1 $f8, 0x2C($sp) /* ACCF0 801165F0 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* ACCF4 801165F4 44810000 */ mtc1 $at, $f0 /* ACCF8 801165F8 00000000 */ nop /* ACCFC 801165FC 4600603C */ c.lt.s $f12, $f0 /* ACD00 80116600 00000000 */ nop /* ACD04 80116604 4500000C */ bc1f .L80116638 /* ACD08 80116608 00000000 */ nop /* ACD0C 8011660C 4600503C */ c.lt.s $f10, $f0 /* ACD10 80116610 00000000 */ nop /* ACD14 80116614 45000008 */ bc1f .L80116638 /* ACD18 80116618 00000000 */ nop /* ACD1C 8011661C 4600403C */ c.lt.s $f8, $f0 /* ACD20 80116620 00000000 */ nop /* ACD24 80116624 45000004 */ bc1f .L80116638 /* ACD28 80116628 00000000 */ nop /* ACD2C 8011662C 96220000 */ lhu $v0, 0x0($s1) /* ACD30 80116630 34420200 */ ori $v0, $v0, 0x200 /* ACD34 80116634 A6220000 */ sh $v0, 0x0($s1) .L80116638: /* ACD38 80116638 3C028015 */ lui $v0, %hi(mdl_treeIterPos) /* ACD3C 8011663C 8C423224 */ lw $v0, %lo(mdl_treeIterPos)($v0) /* ACD40 80116640 3C03800A */ lui $v1, %hi(mdl_currentModelTreeNodeInfo) /* ACD44 80116644 8C63A5F4 */ lw $v1, %lo(mdl_currentModelTreeNodeInfo)($v1) /* ACD48 80116648 00021080 */ sll $v0, $v0, 2 /* ACD4C 8011664C 00431021 */ addu $v0, $v0, $v1 /* ACD50 80116650 A0530000 */ sb $s3, 0x0($v0) .L80116654: /* ACD54 80116654 8FBF0044 */ lw $ra, 0x44($sp) /* ACD58 80116658 8FB40040 */ lw $s4, 0x40($sp) /* ACD5C 8011665C 8FB3003C */ lw $s3, 0x3C($sp) /* ACD60 80116660 8FB20038 */ lw $s2, 0x38($sp) /* ACD64 80116664 8FB10034 */ lw $s1, 0x34($sp) /* ACD68 80116668 8FB00030 */ lw $s0, 0x30($sp) /* ACD6C 8011666C 03E00008 */ jr $ra /* ACD70 80116670 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void mdl_create_model(ModelBlueprint* bp, s32 arg1) { EffectInstance* effect; ModelNode* node = bp->mdlNode; ModelNodeProperty* prop; ModelBoundingBox* bb; s32 modelIdx; Model* model; f32 x, y, z; prop = get_model_property(node, MODEL_PROP_KEY_SPECIAL); modelIdx = 0; if (prop != NULL) { s32 temp_s1 = (u8) prop->data.s / 16; if (temp_s1 != 0) { prop = get_model_property(node, MODEL_PROP_KEY_BOUNDING_BOX); if (prop != NULL) { ModelBoundingBox* bb = (ModelBoundingBox*) prop; fx_flame( temp_s1 - 1, (bb->minX + bb->maxX) * 0.5f, bb->minY, (bb->minZ + bb->maxZ) * 0.5f, 1.0f, &effect ); return; } } } for (modelIdx = 0; modelIdx < ARRAY_COUNT(*gCurrentModels); modelIdx++) { if ((*gCurrentModels)[modelIdx] == NULL) { break; } } (*gCurrentModels)[modelIdx] = model = heap_malloc(sizeof(*model)); model->flags = bp->flags | MODEL_FLAG_FLAG_1; model->modelID = D_80153226; model->modelNode = bp->mdlNode; model->groupData = bp->groupData; model->matrixMode = 0; node = model->modelNode; prop = get_model_property(node, MODEL_PROP_KEY_SPECIAL); if (prop != NULL) { model->texPannerID = prop->data.s & 0xF; } else { model->texPannerID = TEX_PANNER_0; } model->customGfxIndex = CUSTOM_GFX_0; if (node->type != SHAPE_TYPE_GROUP) { prop = get_model_property(node, MODEL_PROP_KEY_RENDER_MODE); } else { prop = get_model_property(node, MODEL_PROP_KEY_GROUP_TYPE); if (prop != NULL) { prop = &prop[1]; } } if (prop != NULL) { model->renderMode = prop->data.s; } else { model->renderMode = RENDER_MODE_SURFACE_OPA; } model->textureID = (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID; model->textureVariation = 0; if (!is_identity_fixed_mtx(bp->mtx)) { model->currentMatrix = heap_malloc(sizeof(*model->currentMatrix)); *model->currentMatrix = *bp->mtx; model->specialMatrix = *model->currentMatrix; } else { model->currentMatrix = NULL; guMtxIdent(&model->specialMatrix); model->flags |= MODEL_FLAG_FLAG_2000; } guMtxIdentF(model->transformMatrix); model->currentSpecialMatrix = NULL; prop = get_model_property(node, MODEL_PROP_KEY_BOUNDING_BOX); if (prop != NULL) { ModelBoundingBox* bb = (ModelBoundingBox*) prop; x = (bb->minX + bb->maxX) * 0.5f; y = (bb->minY + bb->maxY) * 0.5f; z = (bb->minZ + bb->maxZ) * 0.5f; } else { x = y = z = 0.0f; } if (model->currentMatrix != NULL) { guMtxXFML(model->currentMatrix, x, y, z, &x, &y, &z); } model->center.x = x; model->center.y = y; model->center.z = z; bb = (ModelBoundingBox*) prop; x = bb->maxX - bb->minX; y = bb->maxY - bb->minY; z = bb->maxZ - bb->minZ; bb->halfSizeX = x * 0.5; bb->halfSizeY = y * 0.5; bb->halfSizeZ = z * 0.5; if (model->currentMatrix == NULL && x < 100.0f && y < 100.0f && z < 100.0f) { model->flags |= MODEL_FLAG_FLAG_200; } (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = modelIdx; }
### RAW ASSEMBLY INSTRUCTIONS: glabel step_model_animator /* B52F0 8011EBF0 27BDFFC8 */ addiu $sp, $sp, -0x38 /* B52F4 8011EBF4 AFB10014 */ sw $s1, 0x14($sp) /* B52F8 8011EBF8 0080882D */ daddu $s1, $a0, $zero /* B52FC 8011EBFC AFBF0018 */ sw $ra, 0x18($sp) /* B5300 8011EC00 AFB00010 */ sw $s0, 0x10($sp) /* B5304 8011EC04 F7B80030 */ sdc1 $f24, 0x30($sp) /* B5308 8011EC08 F7B60028 */ sdc1 $f22, 0x28($sp) /* B530C 8011EC0C F7B40020 */ sdc1 $f20, 0x20($sp) /* B5310 8011EC10 8E300008 */ lw $s0, 0x8($s1) /* B5314 8011EC14 86030000 */ lh $v1, 0x0($s0) /* B5318 8011EC18 2C620014 */ sltiu $v0, $v1, 0x14 /* B531C 8011EC1C 10400105 */ beqz $v0, .L8011F034 /* B5320 8011EC20 26100002 */ addiu $s0, $s0, 0x2 /* B5324 8011EC24 00031080 */ sll $v0, $v1, 2 /* B5328 8011EC28 3C018015 */ lui $at, %hi(jtbl_8014FE60) /* B532C 8011EC2C 00220821 */ addu $at, $at, $v0 /* B5330 8011EC30 8C22FE60 */ lw $v0, %lo(jtbl_8014FE60)($at) /* B5334 8011EC34 00400008 */ jr $v0 /* B5338 8011EC38 00000000 */ nop glabel .L8011EC3C /* B533C 8011EC3C 08047C0E */ j .L8011F038 /* B5340 8011EC40 2402FFFF */ addiu $v0, $zero, -0x1 glabel .L8011EC44 /* B5344 8011EC44 92030001 */ lbu $v1, 0x1($s0) /* B5348 8011EC48 26100002 */ addiu $s0, $s0, 0x2 /* B534C 8011EC4C 24020001 */ addiu $v0, $zero, 0x1 /* B5350 8011EC50 AE300008 */ sw $s0, 0x8($s1) /* B5354 8011EC54 08047C0E */ j .L8011F038 /* B5358 8011EC58 A2230004 */ sb $v1, 0x4($s1) glabel .L8011EC5C /* B535C 8011EC5C 86020000 */ lh $v0, 0x0($s0) /* B5360 8011EC60 26100002 */ addiu $s0, $s0, 0x2 /* B5364 8011EC64 AE300008 */ sw $s0, 0x8($s1) /* B5368 8011EC68 44820000 */ mtc1 $v0, $f0 /* B536C 8011EC6C 00000000 */ nop /* B5370 8011EC70 46800020 */ cvt.s.w $f0, $f0 /* B5374 8011EC74 08047C0D */ j .L8011F034 /* B5378 8011EC78 E6200090 */ swc1 $f0, 0x90($s1) glabel .L8011EC7C /* B537C 8011EC7C 8E23000C */ lw $v1, 0xC($s1) /* B5380 8011EC80 24020001 */ addiu $v0, $zero, 0x1 /* B5384 8011EC84 08047C0E */ j .L8011F038 /* B5388 8011EC88 AE230008 */ sw $v1, 0x8($s1) glabel .L8011EC8C /* B538C 8011EC8C 24020001 */ addiu $v0, $zero, 0x1 /* B5390 8011EC90 AE30000C */ sw $s0, 0xC($s1) /* B5394 8011EC94 08047C0E */ j .L8011F038 /* B5398 8011EC98 AE300008 */ sw $s0, 0x8($s1) glabel .L8011EC9C /* B539C 8011EC9C 86040000 */ lh $a0, 0x0($s0) /* B53A0 8011ECA0 26100002 */ addiu $s0, $s0, 0x2 /* B53A4 8011ECA4 8E230000 */ lw $v1, 0x0($s1) /* B53A8 8011ECA8 24020001 */ addiu $v0, $zero, 0x1 /* B53AC 8011ECAC AE300008 */ sw $s0, 0x8($s1) /* B53B0 8011ECB0 08047B4F */ j .L8011ED3C /* B53B4 8011ECB4 3084FFFF */ andi $a0, $a0, 0xFFFF glabel .L8011ECB8 /* B53B8 8011ECB8 86020000 */ lh $v0, 0x0($s0) /* B53BC 8011ECBC 8E240010 */ lw $a0, 0x10($s1) /* B53C0 8011ECC0 00511021 */ addu $v0, $v0, $s1 /* B53C4 8011ECC4 90450014 */ lbu $a1, 0x14($v0) /* B53C8 8011ECC8 0C047837 */ jal get_animator_child_with_id /* B53CC 8011ECCC 26100002 */ addiu $s0, $s0, 0x2 /* B53D0 8011ECD0 0040282D */ daddu $a1, $v0, $zero /* B53D4 8011ECD4 86040000 */ lh $a0, 0x0($s0) /* B53D8 8011ECD8 26100002 */ addiu $s0, $s0, 0x2 /* B53DC 8011ECDC 94A300F4 */ lhu $v1, 0xF4($a1) /* B53E0 8011ECE0 24020001 */ addiu $v0, $zero, 0x1 /* B53E4 8011ECE4 08047B48 */ j .L8011ED20 /* B53E8 8011ECE8 00641825 */ or $v1, $v1, $a0 glabel .L8011ECEC /* B53EC 8011ECEC 86020000 */ lh $v0, 0x0($s0) /* B53F0 8011ECF0 8E240010 */ lw $a0, 0x10($s1) /* B53F4 8011ECF4 00511021 */ addu $v0, $v0, $s1 /* B53F8 8011ECF8 90450014 */ lbu $a1, 0x14($v0) /* B53FC 8011ECFC 0C047837 */ jal get_animator_child_with_id /* B5400 8011ED00 26100002 */ addiu $s0, $s0, 0x2 /* B5404 8011ED04 0040282D */ daddu $a1, $v0, $zero /* B5408 8011ED08 86040000 */ lh $a0, 0x0($s0) /* B540C 8011ED0C 26100002 */ addiu $s0, $s0, 0x2 /* B5410 8011ED10 24020001 */ addiu $v0, $zero, 0x1 /* B5414 8011ED14 94A300F4 */ lhu $v1, 0xF4($a1) /* B5418 8011ED18 00042027 */ nor $a0, $zero, $a0 /* B541C 8011ED1C 00641824 */ and $v1, $v1, $a0 .L8011ED20: /* B5420 8011ED20 A4A300F4 */ sh $v1, 0xF4($a1) /* B5424 8011ED24 08047C0E */ j .L8011F038 /* B5428 8011ED28 AE300008 */ sw $s0, 0x8($s1) glabel .L8011ED2C /* B542C 8011ED2C 24020001 */ addiu $v0, $zero, 0x1 /* B5430 8011ED30 8E230000 */ lw $v1, 0x0($s1) /* B5434 8011ED34 3C040002 */ lui $a0, (0x20000 >> 16) /* B5438 8011ED38 AE300008 */ sw $s0, 0x8($s1) .L8011ED3C: /* B543C 8011ED3C 00641825 */ or $v1, $v1, $a0 /* B5440 8011ED40 08047C0E */ j .L8011F038 /* B5444 8011ED44 AE230000 */ sw $v1, 0x0($s1) glabel .L8011ED48 /* B5448 8011ED48 86030000 */ lh $v1, 0x0($s0) /* B544C 8011ED4C 26100002 */ addiu $s0, $s0, 0x2 /* B5450 8011ED50 86020000 */ lh $v0, 0x0($s0) /* B5454 8011ED54 3C018015 */ lui $at, %hi(D_8014FEB0) /* B5458 8011ED58 D424FEB0 */ ldc1 $f4, %lo(D_8014FEB0)($at) /* B545C 8011ED5C 44823000 */ mtc1 $v0, $f6 /* B5460 8011ED60 00000000 */ nop /* B5464 8011ED64 468031A0 */ cvt.s.w $f6, $f6 /* B5468 8011ED68 460031A1 */ cvt.d.s $f6, $f6 /* B546C 8011ED6C 46243182 */ mul.d $f6, $f6, $f4 /* B5470 8011ED70 00000000 */ nop /* B5474 8011ED74 26100002 */ addiu $s0, $s0, 0x2 /* B5478 8011ED78 86020000 */ lh $v0, 0x0($s0) /* B547C 8011ED7C 44821000 */ mtc1 $v0, $f2 /* B5480 8011ED80 00000000 */ nop /* B5484 8011ED84 468010A0 */ cvt.s.w $f2, $f2 /* B5488 8011ED88 460010A1 */ cvt.d.s $f2, $f2 /* B548C 8011ED8C 46241082 */ mul.d $f2, $f2, $f4 /* B5490 8011ED90 00000000 */ nop /* B5494 8011ED94 8E240010 */ lw $a0, 0x10($s1) /* B5498 8011ED98 26100002 */ addiu $s0, $s0, 0x2 /* B549C 8011ED9C 00711821 */ addu $v1, $v1, $s1 /* B54A0 8011EDA0 86020000 */ lh $v0, 0x0($s0) /* B54A4 8011EDA4 90650014 */ lbu $a1, 0x14($v1) /* B54A8 8011EDA8 44820000 */ mtc1 $v0, $f0 /* B54AC 8011EDAC 00000000 */ nop /* B54B0 8011EDB0 46800020 */ cvt.s.w $f0, $f0 /* B54B4 8011EDB4 46000021 */ cvt.d.s $f0, $f0 /* B54B8 8011EDB8 46240002 */ mul.d $f0, $f0, $f4 /* B54BC 8011EDBC 00000000 */ nop /* B54C0 8011EDC0 3C018015 */ lui $at, %hi(D_8014FEB8) /* B54C4 8011EDC4 D424FEB8 */ ldc1 $f4, %lo(D_8014FEB8)($at) /* B54C8 8011EDC8 26100002 */ addiu $s0, $s0, 0x2 /* B54CC 8011EDCC AE300008 */ sw $s0, 0x8($s1) /* B54D0 8011EDD0 46243183 */ div.d $f6, $f6, $f4 /* B54D4 8011EDD4 46203620 */ cvt.s.d $f24, $f6 /* B54D8 8011EDD8 46241083 */ div.d $f2, $f2, $f4 /* B54DC 8011EDDC 462015A0 */ cvt.s.d $f22, $f2 /* B54E0 8011EDE0 46240003 */ div.d $f0, $f0, $f4 /* B54E4 8011EDE4 0C047837 */ jal get_animator_child_with_id /* B54E8 8011EDE8 46200520 */ cvt.s.d $f20, $f0 /* B54EC 8011EDEC 0040282D */ daddu $a1, $v0, $zero /* B54F0 8011EDF0 14A00003 */ bnez $a1, .L8011EE00 /* B54F4 8011EDF4 24020001 */ addiu $v0, $zero, 0x1 .L8011EDF8: /* B54F8 8011EDF8 08047B7E */ j .L8011EDF8 /* B54FC 8011EDFC 00000000 */ nop .L8011EE00: /* B5500 8011EE00 E4B8009C */ swc1 $f24, 0x9C($a1) /* B5504 8011EE04 E4B600A0 */ swc1 $f22, 0xA0($a1) /* B5508 8011EE08 08047C0E */ j .L8011F038 /* B550C 8011EE0C E4B400A4 */ swc1 $f20, 0xA4($a1) glabel .L8011EE10 /* B5510 8011EE10 86030000 */ lh $v1, 0x0($s0) /* B5514 8011EE14 26100002 */ addiu $s0, $s0, 0x2 /* B5518 8011EE18 86020000 */ lh $v0, 0x0($s0) /* B551C 8011EE1C 3C018015 */ lui $at, %hi(D_8014FEC0) /* B5520 8011EE20 D424FEC0 */ ldc1 $f4, %lo(D_8014FEC0)($at) /* B5524 8011EE24 44823000 */ mtc1 $v0, $f6 /* B5528 8011EE28 00000000 */ nop /* B552C 8011EE2C 468031A0 */ cvt.s.w $f6, $f6 /* B5530 8011EE30 460031A1 */ cvt.d.s $f6, $f6 /* B5534 8011EE34 46243182 */ mul.d $f6, $f6, $f4 /* B5538 8011EE38 00000000 */ nop /* B553C 8011EE3C 26100002 */ addiu $s0, $s0, 0x2 /* B5540 8011EE40 86020000 */ lh $v0, 0x0($s0) /* B5544 8011EE44 44821000 */ mtc1 $v0, $f2 /* B5548 8011EE48 00000000 */ nop /* B554C 8011EE4C 468010A0 */ cvt.s.w $f2, $f2 /* B5550 8011EE50 460010A1 */ cvt.d.s $f2, $f2 /* B5554 8011EE54 46241082 */ mul.d $f2, $f2, $f4 /* B5558 8011EE58 00000000 */ nop /* B555C 8011EE5C 8E240010 */ lw $a0, 0x10($s1) /* B5560 8011EE60 26100002 */ addiu $s0, $s0, 0x2 /* B5564 8011EE64 00711821 */ addu $v1, $v1, $s1 /* B5568 8011EE68 86020000 */ lh $v0, 0x0($s0) /* B556C 8011EE6C 90650014 */ lbu $a1, 0x14($v1) /* B5570 8011EE70 44820000 */ mtc1 $v0, $f0 /* B5574 8011EE74 00000000 */ nop /* B5578 8011EE78 46800020 */ cvt.s.w $f0, $f0 /* B557C 8011EE7C 46000021 */ cvt.d.s $f0, $f0 /* B5580 8011EE80 46240002 */ mul.d $f0, $f0, $f4 /* B5584 8011EE84 00000000 */ nop /* B5588 8011EE88 3C018015 */ lui $at, %hi(D_8014FEC8) /* B558C 8011EE8C D424FEC8 */ ldc1 $f4, %lo(D_8014FEC8)($at) /* B5590 8011EE90 26100002 */ addiu $s0, $s0, 0x2 /* B5594 8011EE94 AE300008 */ sw $s0, 0x8($s1) /* B5598 8011EE98 46243183 */ div.d $f6, $f6, $f4 /* B559C 8011EE9C 46203620 */ cvt.s.d $f24, $f6 /* B55A0 8011EEA0 46241083 */ div.d $f2, $f2, $f4 /* B55A4 8011EEA4 462015A0 */ cvt.s.d $f22, $f2 /* B55A8 8011EEA8 46240003 */ div.d $f0, $f0, $f4 /* B55AC 8011EEAC 0C047837 */ jal get_animator_child_with_id /* B55B0 8011EEB0 46200520 */ cvt.s.d $f20, $f0 /* B55B4 8011EEB4 0040282D */ daddu $a1, $v0, $zero /* B55B8 8011EEB8 14A00003 */ bnez $a1, .L8011EEC8 /* B55BC 8011EEBC 24020001 */ addiu $v0, $zero, 0x1 .L8011EEC0: /* B55C0 8011EEC0 08047BB0 */ j .L8011EEC0 /* B55C4 8011EEC4 00000000 */ nop .L8011EEC8: /* B55C8 8011EEC8 C4A4009C */ lwc1 $f4, 0x9C($a1) /* B55CC 8011EECC 46182100 */ add.s $f4, $f4, $f24 /* B55D0 8011EED0 C4A200A0 */ lwc1 $f2, 0xA0($a1) /* B55D4 8011EED4 46161080 */ add.s $f2, $f2, $f22 /* B55D8 8011EED8 C4A000A4 */ lwc1 $f0, 0xA4($a1) /* B55DC 8011EEDC 46140000 */ add.s $f0, $f0, $f20 /* B55E0 8011EEE0 E4A4009C */ swc1 $f4, 0x9C($a1) /* B55E4 8011EEE4 E4A200A0 */ swc1 $f2, 0xA0($a1) /* B55E8 8011EEE8 08047C0E */ j .L8011F038 /* B55EC 8011EEEC E4A000A4 */ swc1 $f0, 0xA4($a1) glabel .L8011EEF0 /* B55F0 8011EEF0 86020000 */ lh $v0, 0x0($s0) /* B55F4 8011EEF4 26100002 */ addiu $s0, $s0, 0x2 /* B55F8 8011EEF8 86050000 */ lh $a1, 0x0($s0) /* B55FC 8011EEFC 26100002 */ addiu $s0, $s0, 0x2 /* B5600 8011EF00 86030000 */ lh $v1, 0x0($s0) /* B5604 8011EF04 26100002 */ addiu $s0, $s0, 0x2 /* B5608 8011EF08 86060000 */ lh $a2, 0x0($s0) /* B560C 8011EF0C 26100002 */ addiu $s0, $s0, 0x2 /* B5610 8011EF10 8E240010 */ lw $a0, 0x10($s1) /* B5614 8011EF14 4485C000 */ mtc1 $a1, $f24 /* B5618 8011EF18 00000000 */ nop /* B561C 8011EF1C 4680C620 */ cvt.s.w $f24, $f24 /* B5620 8011EF20 4483B000 */ mtc1 $v1, $f22 /* B5624 8011EF24 00000000 */ nop /* B5628 8011EF28 4680B5A0 */ cvt.s.w $f22, $f22 /* B562C 8011EF2C 00511021 */ addu $v0, $v0, $s1 /* B5630 8011EF30 90450014 */ lbu $a1, 0x14($v0) /* B5634 8011EF34 4486A000 */ mtc1 $a2, $f20 /* B5638 8011EF38 00000000 */ nop /* B563C 8011EF3C 4680A520 */ cvt.s.w $f20, $f20 /* B5640 8011EF40 0C047837 */ jal get_animator_child_with_id /* B5644 8011EF44 AE300008 */ sw $s0, 0x8($s1) /* B5648 8011EF48 0040282D */ daddu $a1, $v0, $zero /* B564C 8011EF4C 14A00003 */ bnez $a1, .L8011EF5C /* B5650 8011EF50 24020001 */ addiu $v0, $zero, 0x1 .L8011EF54: /* B5654 8011EF54 08047BD5 */ j .L8011EF54 /* B5658 8011EF58 00000000 */ nop .L8011EF5C: /* B565C 8011EF5C E4B80090 */ swc1 $f24, 0x90($a1) /* B5660 8011EF60 E4B60094 */ swc1 $f22, 0x94($a1) /* B5664 8011EF64 08047C0E */ j .L8011F038 /* B5668 8011EF68 E4B40098 */ swc1 $f20, 0x98($a1) glabel .L8011EF6C /* B566C 8011EF6C 86030000 */ lh $v1, 0x0($s0) /* B5670 8011EF70 26100002 */ addiu $s0, $s0, 0x2 /* B5674 8011EF74 86020000 */ lh $v0, 0x0($s0) /* B5678 8011EF78 3C018015 */ lui $at, %hi(D_8014FED0) /* B567C 8011EF7C D424FED0 */ ldc1 $f4, %lo(D_8014FED0)($at) /* B5680 8011EF80 44823000 */ mtc1 $v0, $f6 /* B5684 8011EF84 00000000 */ nop /* B5688 8011EF88 468031A0 */ cvt.s.w $f6, $f6 /* B568C 8011EF8C 460031A1 */ cvt.d.s $f6, $f6 /* B5690 8011EF90 46243182 */ mul.d $f6, $f6, $f4 /* B5694 8011EF94 00000000 */ nop /* B5698 8011EF98 26100002 */ addiu $s0, $s0, 0x2 /* B569C 8011EF9C 86020000 */ lh $v0, 0x0($s0) /* B56A0 8011EFA0 44821000 */ mtc1 $v0, $f2 /* B56A4 8011EFA4 00000000 */ nop /* B56A8 8011EFA8 468010A0 */ cvt.s.w $f2, $f2 /* B56AC 8011EFAC 460010A1 */ cvt.d.s $f2, $f2 /* B56B0 8011EFB0 46241082 */ mul.d $f2, $f2, $f4 /* B56B4 8011EFB4 00000000 */ nop /* B56B8 8011EFB8 8E240010 */ lw $a0, 0x10($s1) /* B56BC 8011EFBC 26100002 */ addiu $s0, $s0, 0x2 /* B56C0 8011EFC0 00711821 */ addu $v1, $v1, $s1 /* B56C4 8011EFC4 86020000 */ lh $v0, 0x0($s0) /* B56C8 8011EFC8 90650014 */ lbu $a1, 0x14($v1) /* B56CC 8011EFCC 44820000 */ mtc1 $v0, $f0 /* B56D0 8011EFD0 00000000 */ nop /* B56D4 8011EFD4 46800020 */ cvt.s.w $f0, $f0 /* B56D8 8011EFD8 46000021 */ cvt.d.s $f0, $f0 /* B56DC 8011EFDC 46240002 */ mul.d $f0, $f0, $f4 /* B56E0 8011EFE0 00000000 */ nop /* B56E4 8011EFE4 3C018015 */ lui $at, %hi(D_8014FED8) /* B56E8 8011EFE8 D424FED8 */ ldc1 $f4, %lo(D_8014FED8)($at) /* B56EC 8011EFEC 26100002 */ addiu $s0, $s0, 0x2 /* B56F0 8011EFF0 AE300008 */ sw $s0, 0x8($s1) /* B56F4 8011EFF4 46243183 */ div.d $f6, $f6, $f4 /* B56F8 8011EFF8 46203620 */ cvt.s.d $f24, $f6 /* B56FC 8011EFFC 46241083 */ div.d $f2, $f2, $f4 /* B5700 8011F000 462015A0 */ cvt.s.d $f22, $f2 /* B5704 8011F004 46240003 */ div.d $f0, $f0, $f4 /* B5708 8011F008 0C047837 */ jal get_animator_child_with_id /* B570C 8011F00C 46200520 */ cvt.s.d $f20, $f0 /* B5710 8011F010 0040282D */ daddu $a1, $v0, $zero /* B5714 8011F014 14A00003 */ bnez $a1, .L8011F024 /* B5718 8011F018 24020001 */ addiu $v0, $zero, 0x1 .L8011F01C: /* B571C 8011F01C 08047C07 */ j .L8011F01C /* B5720 8011F020 00000000 */ nop .L8011F024: /* B5724 8011F024 E4B800A8 */ swc1 $f24, 0xA8($a1) /* B5728 8011F028 E4B600AC */ swc1 $f22, 0xAC($a1) /* B572C 8011F02C 08047C0E */ j .L8011F038 /* B5730 8011F030 E4B400B0 */ swc1 $f20, 0xB0($a1) glabel .L8011F034 /* B5734 8011F034 0000102D */ daddu $v0, $zero, $zero .L8011F038: /* B5738 8011F038 8FBF0018 */ lw $ra, 0x18($sp) /* B573C 8011F03C 8FB10014 */ lw $s1, 0x14($sp) /* B5740 8011F040 8FB00010 */ lw $s0, 0x10($sp) /* B5744 8011F044 D7B80030 */ ldc1 $f24, 0x30($sp) /* B5748 8011F048 D7B60028 */ ldc1 $f22, 0x28($sp) /* B574C 8011F04C D7B40020 */ ldc1 $f20, 0x20($sp) /* B5750 8011F050 03E00008 */ jr $ra /* B5754 8011F054 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: s32 step_model_animator(ModelAnimator* animator) { s16* args = animator->animReadPos; AnimatorNode* node; f32 x, y, z; s32 flags; s32 nodeId; switch (*args++) { case AS_END: return -1; case AS_SET_RENDER_MODE: animator->renderMode = *args++; animator->animReadPos = args; return 1; case AS_WAIT: animator->nextUpdateTime = *args++; animator->animReadPos = args; break; case AS_END_LOOP: animator->animReadPos = animator->savedReadPos; return 1; case AS_LOOP: animator->animReadPos = animator->savedReadPos = args; return 1; case AS_SET_FLAGS: flags = *args++; animator->animReadPos = args; animator->flags |= flags & 0xFFFF; return 1; case AS_SET_NODE_FLAGS: node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]); flags = *args++; node->flags |= flags; animator->animReadPos = args; return 1; case AS_CLEAR_NODE_FLAGS: node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]); flags = *args++; node->flags &= ~flags; animator->animReadPos = args; return 1; case AS_OP_19: animator->flags |= MODEL_ANIMATOR_FLAG_NO_FLIP; animator->animReadPos = args; return 1; case AS_SET_ROTATION: nodeId = animator->staticNodeIDs[*args++ - 1]; x = (f32)*args++ * 180.0 / 32767.0; y = (f32)*args++ * 180.0 / 32767.0; z = (f32)*args++ * 180.0 / 32767.0; animator->animReadPos = args; node = get_animator_child_with_id(animator->rootNode, nodeId); ASSERT(node != NULL); node->rotation.x = x; node->rotation.y = y; node->rotation.z = z; return 1; case AS_ADD_ROTATION: nodeId = animator->staticNodeIDs[*args++ - 1]; x = (f32)*args++ * 180.0 / 32767.0; y = (f32)*args++ * 180.0 / 32767.0; z = (f32)*args++ * 180.0 / 32767.0; animator->animReadPos = args; node = get_animator_child_with_id(animator->rootNode, nodeId); ASSERT(node != NULL); node->rotation.x += x; node->rotation.y += y; node->rotation.z += z; return 1; case AS_SET_POS: nodeId = animator->staticNodeIDs[*args++ - 1]; x = *args++; y = *args++; z = *args++; animator->animReadPos = args; node = get_animator_child_with_id(animator->rootNode, nodeId); ASSERT(node != NULL); node->pos.x = x; node->pos.y = y; node->pos.z = z; return 1; case AS_SET_SCALE: nodeId = animator->staticNodeIDs[*args++ - 1]; x = (f32)*args++ * 180.0 / 32767.0; y = (f32)*args++ * 180.0 / 32767.0; z = (f32)*args++ * 180.0 / 32767.0; animator->animReadPos = args; node = get_animator_child_with_id(animator->rootNode, nodeId); ASSERT(node != NULL); node->scale.x = x; node->scale.y = y; node->scale.z = z; return 1; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_lerp /* 57B4 8002A3B4 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 57B8 8002A3B8 F7B60028 */ sdc1 $f22, 0x28($sp) /* 57BC 8002A3BC 4485B000 */ mtc1 $a1, $f22 /* 57C0 8002A3C0 F7B80030 */ sdc1 $f24, 0x30($sp) /* 57C4 8002A3C4 4486C000 */ mtc1 $a2, $f24 /* 57C8 8002A3C8 AFB00010 */ sw $s0, 0x10($sp) /* 57CC 8002A3CC 8FB00048 */ lw $s0, 0x48($sp) /* 57D0 8002A3D0 AFB10014 */ sw $s1, 0x14($sp) /* 57D4 8002A3D4 AFBF0018 */ sw $ra, 0x18($sp) /* 57D8 8002A3D8 F7B40020 */ sdc1 $f20, 0x20($sp) /* 57DC 8002A3DC 16000003 */ bnez $s0, .L8002A3EC /* 57E0 8002A3E0 00E0882D */ daddu $s1, $a3, $zero /* 57E4 8002A3E4 0800AA39 */ j .L8002A8E4 /* 57E8 8002A3E8 4600C006 */ mov.s $f0, $f24 .L8002A3EC: /* 57EC 8002A3EC 2C82000D */ sltiu $v0, $a0, 0xD /* 57F0 8002A3F0 1040013B */ beqz $v0, .L8002A8E0 /* 57F4 8002A3F4 00041080 */ sll $v0, $a0, 2 /* 57F8 8002A3F8 3C018009 */ lui $at, %hi(jtbl_80097D90) /* 57FC 8002A3FC 00220821 */ addu $at, $at, $v0 /* 5800 8002A400 8C227D90 */ lw $v0, %lo(jtbl_80097D90)($at) /* 5804 8002A404 00400008 */ jr $v0 /* 5808 8002A408 00000000 */ nop glabel .L8002A40C /* 580C 8002A40C 4616C001 */ sub.s $f0, $f24, $f22 /* 5810 8002A410 44911000 */ mtc1 $s1, $f2 /* 5814 8002A414 00000000 */ nop /* 5818 8002A418 468010A0 */ cvt.s.w $f2, $f2 /* 581C 8002A41C 46020002 */ mul.s $f0, $f0, $f2 /* 5820 8002A420 00000000 */ nop /* 5824 8002A424 44901000 */ mtc1 $s0, $f2 /* 5828 8002A428 00000000 */ nop /* 582C 8002A42C 468010A0 */ cvt.s.w $f2, $f2 /* 5830 8002A430 0800A938 */ j .L8002A4E0 /* 5834 8002A434 46020003 */ div.s $f0, $f0, $f2 glabel .L8002A438 /* 5838 8002A438 02310018 */ mult $s1, $s1 /* 583C 8002A43C 00004012 */ mflo $t0 /* 5840 8002A440 00000000 */ nop /* 5844 8002A444 0800A92D */ j .L8002A4B4 /* 5848 8002A448 02100018 */ mult $s0, $s0 glabel .L8002A44C /* 584C 8002A44C 02310018 */ mult $s1, $s1 /* 5850 8002A450 00004012 */ mflo $t0 /* 5854 8002A454 00000000 */ nop /* 5858 8002A458 0800A925 */ j .L8002A494 /* 585C 8002A45C 02100018 */ mult $s0, $s0 glabel .L8002A460 /* 5860 8002A460 02310018 */ mult $s1, $s1 /* 5864 8002A464 00004012 */ mflo $t0 /* 5868 8002A468 00000000 */ nop /* 586C 8002A46C 00000000 */ nop /* 5870 8002A470 02100018 */ mult $s0, $s0 /* 5874 8002A474 00001012 */ mflo $v0 /* 5878 8002A478 00000000 */ nop /* 587C 8002A47C 00000000 */ nop /* 5880 8002A480 01110018 */ mult $t0, $s1 /* 5884 8002A484 00004012 */ mflo $t0 /* 5888 8002A488 00000000 */ nop /* 588C 8002A48C 00000000 */ nop /* 5890 8002A490 00500018 */ mult $v0, $s0 .L8002A494: /* 5894 8002A494 00001012 */ mflo $v0 /* 5898 8002A498 00000000 */ nop /* 589C 8002A49C 00000000 */ nop /* 58A0 8002A4A0 01110018 */ mult $t0, $s1 /* 58A4 8002A4A4 00004012 */ mflo $t0 /* 58A8 8002A4A8 00000000 */ nop /* 58AC 8002A4AC 00000000 */ nop /* 58B0 8002A4B0 00500018 */ mult $v0, $s0 .L8002A4B4: /* 58B4 8002A4B4 4616C081 */ sub.s $f2, $f24, $f22 /* 58B8 8002A4B8 44880000 */ mtc1 $t0, $f0 /* 58BC 8002A4BC 00000000 */ nop /* 58C0 8002A4C0 46800020 */ cvt.s.w $f0, $f0 /* 58C4 8002A4C4 46020002 */ mul.s $f0, $f0, $f2 /* 58C8 8002A4C8 00000000 */ nop /* 58CC 8002A4CC 00001012 */ mflo $v0 /* 58D0 8002A4D0 44821000 */ mtc1 $v0, $f2 /* 58D4 8002A4D4 00000000 */ nop /* 58D8 8002A4D8 468010A0 */ cvt.s.w $f2, $f2 /* 58DC 8002A4DC 46020003 */ div.s $f0, $f0, $f2 .L8002A4E0: /* 58E0 8002A4E0 0800AA39 */ j .L8002A8E4 /* 58E4 8002A4E4 4600B000 */ add.s $f0, $f22, $f0 glabel .L8002A4E8 /* 58E8 8002A4E8 44916000 */ mtc1 $s1, $f12 /* 58EC 8002A4EC 00000000 */ nop /* 58F0 8002A4F0 46806320 */ cvt.s.w $f12, $f12 /* 58F4 8002A4F4 4490A000 */ mtc1 $s0, $f20 /* 58F8 8002A4F8 00000000 */ nop /* 58FC 8002A4FC 4680A520 */ cvt.s.w $f20, $f20 /* 5900 8002A500 46146303 */ div.s $f12, $f12, $f20 /* 5904 8002A504 3C018009 */ lui $at, %hi(D_80097DC8) /* 5908 8002A508 D4207DC8 */ ldc1 $f0, %lo(D_80097DC8)($at) /* 590C 8002A50C 46006321 */ cvt.d.s $f12, $f12 /* 5910 8002A510 46206302 */ mul.d $f12, $f12, $f0 /* 5914 8002A514 00000000 */ nop /* 5918 8002A518 3C014010 */ lui $at, (0x40100000 >> 16) /* 591C 8002A51C 44810800 */ mtc1 $at, $f1 /* 5920 8002A520 44800000 */ mtc1 $zero, $f0 /* 5924 8002A524 00000000 */ nop /* 5928 8002A528 46206302 */ mul.d $f12, $f12, $f0 /* 592C 8002A52C 0800A966 */ j .L8002A598 /* 5930 8002A530 00000000 */ nop glabel .L8002A534 /* 5934 8002A534 02310018 */ mult $s1, $s1 /* 5938 8002A538 4490A000 */ mtc1 $s0, $f20 /* 593C 8002A53C 00000000 */ nop /* 5940 8002A540 4680A520 */ cvt.s.w $f20, $f20 /* 5944 8002A544 3C018009 */ lui $at, %hi(D_80097DD0) /* 5948 8002A548 D4207DD0 */ ldc1 $f0, %lo(D_80097DD0)($at) /* 594C 8002A54C 00001812 */ mflo $v1 /* 5950 8002A550 44836000 */ mtc1 $v1, $f12 /* 5954 8002A554 00000000 */ nop /* 5958 8002A558 46806320 */ cvt.s.w $f12, $f12 /* 595C 8002A55C 46146303 */ div.s $f12, $f12, $f20 /* 5960 8002A560 46006321 */ cvt.d.s $f12, $f12 /* 5964 8002A564 46206302 */ mul.d $f12, $f12, $f0 /* 5968 8002A568 00000000 */ nop /* 596C 8002A56C 3C014010 */ lui $at, (0x40100000 >> 16) /* 5970 8002A570 44810800 */ mtc1 $at, $f1 /* 5974 8002A574 44800000 */ mtc1 $zero, $f0 /* 5978 8002A578 00000000 */ nop /* 597C 8002A57C 46206302 */ mul.d $f12, $f12, $f0 /* 5980 8002A580 00000000 */ nop /* 5984 8002A584 3C01402E */ lui $at, (0x402E0000 >> 16) /* 5988 8002A588 44810800 */ mtc1 $at, $f1 /* 598C 8002A58C 44800000 */ mtc1 $zero, $f0 /* 5990 8002A590 00000000 */ nop /* 5994 8002A594 46206303 */ div.d $f12, $f12, $f0 .L8002A598: /* 5998 8002A598 0C00A874 */ jal cos_rad /* 599C 8002A59C 46206320 */ cvt.s.d $f12, $f12 /* 59A0 8002A5A0 4614A502 */ mul.s $f20, $f20, $f20 /* 59A4 8002A5A4 00000000 */ nop /* 59A8 8002A5A8 4616C081 */ sub.s $f2, $f24, $f22 /* 59AC 8002A5AC 46001082 */ mul.s $f2, $f2, $f0 /* 59B0 8002A5B0 00000000 */ nop /* 59B4 8002A5B4 02111023 */ subu $v0, $s0, $s1 /* 59B8 8002A5B8 44820000 */ mtc1 $v0, $f0 /* 59BC 8002A5BC 00000000 */ nop /* 59C0 8002A5C0 46800020 */ cvt.s.w $f0, $f0 /* 59C4 8002A5C4 46001082 */ mul.s $f2, $f2, $f0 /* 59C8 8002A5C8 00000000 */ nop /* 59CC 8002A5CC 46001082 */ mul.s $f2, $f2, $f0 /* 59D0 8002A5D0 00000000 */ nop /* 59D4 8002A5D4 46141083 */ div.s $f2, $f2, $f20 /* 59D8 8002A5D8 0800AA39 */ j .L8002A8E4 /* 59DC 8002A5DC 4602C001 */ sub.s $f0, $f24, $f2 glabel .L8002A5E0 /* 59E0 8002A5E0 02113823 */ subu $a3, $s0, $s1 /* 59E4 8002A5E4 00E70018 */ mult $a3, $a3 /* 59E8 8002A5E8 4616C101 */ sub.s $f4, $f24, $f22 /* 59EC 8002A5EC 00001812 */ mflo $v1 /* 59F0 8002A5F0 44830000 */ mtc1 $v1, $f0 /* 59F4 8002A5F4 00000000 */ nop /* 59F8 8002A5F8 46800020 */ cvt.s.w $f0, $f0 /* 59FC 8002A5FC 46040002 */ mul.s $f0, $f0, $f4 /* 5A00 8002A600 00000000 */ nop /* 5A04 8002A604 02100018 */ mult $s0, $s0 /* 5A08 8002A608 00001812 */ mflo $v1 /* 5A0C 8002A60C 44831000 */ mtc1 $v1, $f2 /* 5A10 8002A610 00000000 */ nop /* 5A14 8002A614 468010A0 */ cvt.s.w $f2, $f2 /* 5A18 8002A618 0800A9B3 */ j .L8002A6CC /* 5A1C 8002A61C 4604B100 */ add.s $f4, $f22, $f4 glabel .L8002A620 /* 5A20 8002A620 02113823 */ subu $a3, $s0, $s1 /* 5A24 8002A624 00E70018 */ mult $a3, $a3 /* 5A28 8002A628 00001012 */ mflo $v0 /* 5A2C 8002A62C 00000000 */ nop /* 5A30 8002A630 00000000 */ nop /* 5A34 8002A634 00470018 */ mult $v0, $a3 /* 5A38 8002A638 00004012 */ mflo $t0 /* 5A3C 8002A63C 00000000 */ nop /* 5A40 8002A640 0800A9A4 */ j .L8002A690 /* 5A44 8002A644 02100018 */ mult $s0, $s0 glabel .L8002A648 /* 5A48 8002A648 02113823 */ subu $a3, $s0, $s1 /* 5A4C 8002A64C 00E70018 */ mult $a3, $a3 /* 5A50 8002A650 00001012 */ mflo $v0 /* 5A54 8002A654 00000000 */ nop /* 5A58 8002A658 00000000 */ nop /* 5A5C 8002A65C 00470018 */ mult $v0, $a3 /* 5A60 8002A660 00004012 */ mflo $t0 /* 5A64 8002A664 00000000 */ nop /* 5A68 8002A668 00000000 */ nop /* 5A6C 8002A66C 02100018 */ mult $s0, $s0 /* 5A70 8002A670 00001012 */ mflo $v0 /* 5A74 8002A674 00000000 */ nop /* 5A78 8002A678 00000000 */ nop /* 5A7C 8002A67C 01070018 */ mult $t0, $a3 /* 5A80 8002A680 00004012 */ mflo $t0 /* 5A84 8002A684 00000000 */ nop /* 5A88 8002A688 00000000 */ nop /* 5A8C 8002A68C 00500018 */ mult $v0, $s0 .L8002A690: /* 5A90 8002A690 4616C101 */ sub.s $f4, $f24, $f22 /* 5A94 8002A694 44880000 */ mtc1 $t0, $f0 /* 5A98 8002A698 00000000 */ nop /* 5A9C 8002A69C 46800020 */ cvt.s.w $f0, $f0 /* 5AA0 8002A6A0 46040002 */ mul.s $f0, $f0, $f4 /* 5AA4 8002A6A4 00000000 */ nop /* 5AA8 8002A6A8 00001012 */ mflo $v0 /* 5AAC 8002A6AC 00000000 */ nop /* 5AB0 8002A6B0 00000000 */ nop /* 5AB4 8002A6B4 00500018 */ mult $v0, $s0 /* 5AB8 8002A6B8 4604B100 */ add.s $f4, $f22, $f4 /* 5ABC 8002A6BC 00001012 */ mflo $v0 /* 5AC0 8002A6C0 44821000 */ mtc1 $v0, $f2 /* 5AC4 8002A6C4 00000000 */ nop /* 5AC8 8002A6C8 468010A0 */ cvt.s.w $f2, $f2 .L8002A6CC: /* 5ACC 8002A6CC 46020003 */ div.s $f0, $f0, $f2 /* 5AD0 8002A6D0 0800AA39 */ j .L8002A8E4 /* 5AD4 8002A6D4 46002001 */ sub.s $f0, $f4, $f0 glabel .L8002A6D8 /* 5AD8 8002A6D8 02310018 */ mult $s1, $s1 /* 5ADC 8002A6DC 4490A000 */ mtc1 $s0, $f20 /* 5AE0 8002A6E0 00000000 */ nop /* 5AE4 8002A6E4 4680A520 */ cvt.s.w $f20, $f20 /* 5AE8 8002A6E8 3C018009 */ lui $at, %hi(D_80097DD8) /* 5AEC 8002A6EC D4207DD8 */ ldc1 $f0, %lo(D_80097DD8)($at) /* 5AF0 8002A6F0 00001812 */ mflo $v1 /* 5AF4 8002A6F4 44836000 */ mtc1 $v1, $f12 /* 5AF8 8002A6F8 00000000 */ nop /* 5AFC 8002A6FC 46806320 */ cvt.s.w $f12, $f12 /* 5B00 8002A700 46146303 */ div.s $f12, $f12, $f20 /* 5B04 8002A704 46006321 */ cvt.d.s $f12, $f12 /* 5B08 8002A708 46206302 */ mul.d $f12, $f12, $f0 /* 5B0C 8002A70C 00000000 */ nop /* 5B10 8002A710 3C014010 */ lui $at, (0x40100000 >> 16) /* 5B14 8002A714 44810800 */ mtc1 $at, $f1 /* 5B18 8002A718 44800000 */ mtc1 $zero, $f0 /* 5B1C 8002A71C 00000000 */ nop /* 5B20 8002A720 46206302 */ mul.d $f12, $f12, $f0 /* 5B24 8002A724 00000000 */ nop /* 5B28 8002A728 3C014044 */ lui $at, (0x40440000 >> 16) /* 5B2C 8002A72C 44810800 */ mtc1 $at, $f1 /* 5B30 8002A730 44800000 */ mtc1 $zero, $f0 /* 5B34 8002A734 00000000 */ nop /* 5B38 8002A738 46206303 */ div.d $f12, $f12, $f0 /* 5B3C 8002A73C 0C00A874 */ jal cos_rad /* 5B40 8002A740 46206320 */ cvt.s.d $f12, $f12 /* 5B44 8002A744 02111023 */ subu $v0, $s0, $s1 /* 5B48 8002A748 44821000 */ mtc1 $v0, $f2 /* 5B4C 8002A74C 00000000 */ nop /* 5B50 8002A750 468010A0 */ cvt.s.w $f2, $f2 /* 5B54 8002A754 46020002 */ mul.s $f0, $f0, $f2 /* 5B58 8002A758 00000000 */ nop /* 5B5C 8002A75C 4614A502 */ mul.s $f20, $f20, $f20 /* 5B60 8002A760 00000000 */ nop /* 5B64 8002A764 46020002 */ mul.s $f0, $f0, $f2 /* 5B68 8002A768 00000000 */ nop /* 5B6C 8002A76C 44801000 */ mtc1 $zero, $f2 /* 5B70 8002A770 46140103 */ div.s $f4, $f0, $f20 /* 5B74 8002A774 4602203C */ c.lt.s $f4, $f2 /* 5B78 8002A778 00000000 */ nop /* 5B7C 8002A77C 45030001 */ bc1tl .L8002A784 /* 5B80 8002A780 46002107 */ neg.s $f4, $f4 .L8002A784: /* 5B84 8002A784 4616C001 */ sub.s $f0, $f24, $f22 /* 5B88 8002A788 46040002 */ mul.s $f0, $f0, $f4 /* 5B8C 8002A78C 00000000 */ nop /* 5B90 8002A790 0800AA39 */ j .L8002A8E4 /* 5B94 8002A794 4600C001 */ sub.s $f0, $f24, $f0 glabel .L8002A798 /* 5B98 8002A798 44916000 */ mtc1 $s1, $f12 /* 5B9C 8002A79C 00000000 */ nop /* 5BA0 8002A7A0 46806320 */ cvt.s.w $f12, $f12 /* 5BA4 8002A7A4 3C018009 */ lui $at, %hi(D_80097DE0) /* 5BA8 8002A7A8 D4207DE0 */ ldc1 $f0, %lo(D_80097DE0)($at) /* 5BAC 8002A7AC 46006321 */ cvt.d.s $f12, $f12 /* 5BB0 8002A7B0 46206302 */ mul.d $f12, $f12, $f0 /* 5BB4 8002A7B4 00000000 */ nop /* 5BB8 8002A7B8 44900000 */ mtc1 $s0, $f0 /* 5BBC 8002A7BC 00000000 */ nop /* 5BC0 8002A7C0 46800020 */ cvt.s.w $f0, $f0 /* 5BC4 8002A7C4 46000021 */ cvt.d.s $f0, $f0 /* 5BC8 8002A7C8 46206303 */ div.d $f12, $f12, $f0 /* 5BCC 8002A7CC 0C00A874 */ jal cos_rad /* 5BD0 8002A7D0 46206320 */ cvt.s.d $f12, $f12 /* 5BD4 8002A7D4 4616C081 */ sub.s $f2, $f24, $f22 /* 5BD8 8002A7D8 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 5BDC 8002A7DC 44812800 */ mtc1 $at, $f5 /* 5BE0 8002A7E0 44802000 */ mtc1 $zero, $f4 /* 5BE4 8002A7E4 46000021 */ cvt.d.s $f0, $f0 /* 5BE8 8002A7E8 46202101 */ sub.d $f4, $f4, $f0 /* 5BEC 8002A7EC 460010A1 */ cvt.d.s $f2, $f2 /* 5BF0 8002A7F0 46241082 */ mul.d $f2, $f2, $f4 /* 5BF4 8002A7F4 00000000 */ nop /* 5BF8 8002A7F8 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 5BFC 8002A7FC 44810800 */ mtc1 $at, $f1 /* 5C00 8002A800 44800000 */ mtc1 $zero, $f0 /* 5C04 8002A804 00000000 */ nop /* 5C08 8002A808 46201082 */ mul.d $f2, $f2, $f0 /* 5C0C 8002A80C 00000000 */ nop /* 5C10 8002A810 4600B021 */ cvt.d.s $f0, $f22 /* 5C14 8002A814 46220000 */ add.d $f0, $f0, $f2 /* 5C18 8002A818 0800AA39 */ j .L8002A8E4 /* 5C1C 8002A81C 46200020 */ cvt.s.d $f0, $f0 glabel .L8002A820 /* 5C20 8002A820 44916000 */ mtc1 $s1, $f12 /* 5C24 8002A824 00000000 */ nop /* 5C28 8002A828 46806320 */ cvt.s.w $f12, $f12 /* 5C2C 8002A82C 3C018009 */ lui $at, %hi(D_80097DE8) /* 5C30 8002A830 D4207DE8 */ ldc1 $f0, %lo(D_80097DE8)($at) /* 5C34 8002A834 46006321 */ cvt.d.s $f12, $f12 /* 5C38 8002A838 46206302 */ mul.d $f12, $f12, $f0 /* 5C3C 8002A83C 00000000 */ nop /* 5C40 8002A840 44900000 */ mtc1 $s0, $f0 /* 5C44 8002A844 00000000 */ nop /* 5C48 8002A848 46800020 */ cvt.s.w $f0, $f0 /* 5C4C 8002A84C 46000021 */ cvt.d.s $f0, $f0 /* 5C50 8002A850 46206303 */ div.d $f12, $f12, $f0 /* 5C54 8002A854 0C00A85B */ jal sin_rad /* 5C58 8002A858 46206320 */ cvt.s.d $f12, $f12 /* 5C5C 8002A85C 4616C081 */ sub.s $f2, $f24, $f22 /* 5C60 8002A860 46001082 */ mul.s $f2, $f2, $f0 /* 5C64 8002A864 00000000 */ nop /* 5C68 8002A868 0800AA39 */ j .L8002A8E4 /* 5C6C 8002A86C 4602B000 */ add.s $f0, $f22, $f2 glabel .L8002A870 /* 5C70 8002A870 44916000 */ mtc1 $s1, $f12 /* 5C74 8002A874 00000000 */ nop /* 5C78 8002A878 46806320 */ cvt.s.w $f12, $f12 /* 5C7C 8002A87C 3C018009 */ lui $at, %hi(D_80097DF0) /* 5C80 8002A880 D4207DF0 */ ldc1 $f0, %lo(D_80097DF0)($at) /* 5C84 8002A884 46006321 */ cvt.d.s $f12, $f12 /* 5C88 8002A888 46206302 */ mul.d $f12, $f12, $f0 /* 5C8C 8002A88C 00000000 */ nop /* 5C90 8002A890 44900000 */ mtc1 $s0, $f0 /* 5C94 8002A894 00000000 */ nop /* 5C98 8002A898 46800020 */ cvt.s.w $f0, $f0 /* 5C9C 8002A89C 46000021 */ cvt.d.s $f0, $f0 /* 5CA0 8002A8A0 46206303 */ div.d $f12, $f12, $f0 /* 5CA4 8002A8A4 0C00A874 */ jal cos_rad /* 5CA8 8002A8A8 46206320 */ cvt.s.d $f12, $f12 /* 5CAC 8002A8AC 4616C101 */ sub.s $f4, $f24, $f22 /* 5CB0 8002A8B0 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 5CB4 8002A8B4 44811800 */ mtc1 $at, $f3 /* 5CB8 8002A8B8 44801000 */ mtc1 $zero, $f2 /* 5CBC 8002A8BC 46000021 */ cvt.d.s $f0, $f0 /* 5CC0 8002A8C0 46201081 */ sub.d $f2, $f2, $f0 /* 5CC4 8002A8C4 46002121 */ cvt.d.s $f4, $f4 /* 5CC8 8002A8C8 46222102 */ mul.d $f4, $f4, $f2 /* 5CCC 8002A8CC 00000000 */ nop /* 5CD0 8002A8D0 4600B021 */ cvt.d.s $f0, $f22 /* 5CD4 8002A8D4 46240000 */ add.d $f0, $f0, $f4 /* 5CD8 8002A8D8 0800AA39 */ j .L8002A8E4 /* 5CDC 8002A8DC 46200020 */ cvt.s.d $f0, $f0 .L8002A8E0: /* 5CE0 8002A8E0 44800000 */ mtc1 $zero, $f0 .L8002A8E4: /* 5CE4 8002A8E4 8FBF0018 */ lw $ra, 0x18($sp) /* 5CE8 8002A8E8 8FB10014 */ lw $s1, 0x14($sp) /* 5CEC 8002A8EC 8FB00010 */ lw $s0, 0x10($sp) /* 5CF0 8002A8F0 D7B80030 */ ldc1 $f24, 0x30($sp) /* 5CF4 8002A8F4 D7B60028 */ ldc1 $f22, 0x28($sp) /* 5CF8 8002A8F8 D7B40020 */ ldc1 $f20, 0x20($sp) /* 5CFC 8002A8FC 03E00008 */ jr $ra /* 5D00 8002A900 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: f32 update_lerp(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration) { s32 timeLeft; f32 absMag; if (duration == 0) { return end; } switch (easing) { case EASING_LINEAR: return start + (end - start) * elapsed / duration; case EASING_QUADRATIC_IN: return start + SQ(elapsed) * (end - start) / SQ(duration); case EASING_CUBIC_IN: return start + CUBE(elapsed) * (end - start) / CUBE(duration); case EASING_QUARTIC_IN: return start + QUART(elapsed) * (end - start) / QUART(duration); case EASING_COS_SLOW_OVERSHOOT: return end - ((end - start) * cos_rad(((f32)elapsed / duration) * PI_D * 4.0) * (duration - elapsed) * (duration - elapsed)) / SQ((f32)duration); case EASING_COS_FAST_OVERSHOOT: return end - ((end - start) * cos_rad((((f32)SQ(elapsed) / duration) * PI_D * 4.0) / 15.0) * (duration - elapsed) * (duration - elapsed)) / SQ((f32)duration); case EASING_QUADRATIC_OUT: timeLeft = duration - elapsed; return start + (end - start) - ((SQ(timeLeft) * (end - start))) / SQ(duration); case EASING_CUBIC_OUT: timeLeft = duration - elapsed; return start + (end - start) - ((CUBE(timeLeft) * (end - start))) / CUBE(duration); case EASING_QUARTIC_OUT: timeLeft = duration - elapsed; return start + (end - start) - ((QUART(timeLeft) * (end - start))) / QUART(duration); case EASING_COS_BOUNCE: absMag = cos_rad((((f32)SQ(elapsed) / duration) * PI_D * 4.0) / 40.0) * (duration - elapsed) * (duration - elapsed) / SQ((f32)duration); if (absMag < 0.0f) { absMag = -absMag; } return end - (end - start) * absMag; case EASING_COS_IN_OUT: return start + (end - start) * (1.0 - cos_rad(((f32)elapsed * PI_D) / (f32)duration)) * 0.5; case EASING_SIN_OUT: return start + (end - start) * sin_rad(((f32)elapsed * (PI_D / 2)) / (f32)duration); case EASING_COS_IN: return start + (end - start) * (1.0 - cos_rad(((f32)elapsed * (PI_D / 2)) / (f32)duration)); } return 0.0f; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_entities /* A5DD0 8010F6D0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* A5DD4 8010F6D4 AFB10014 */ sw $s1, 0x14($sp) /* A5DD8 8010F6D8 0000882D */ daddu $s1, $zero, $zero /* A5DDC 8010F6DC AFB3001C */ sw $s3, 0x1C($sp) /* A5DE0 8010F6E0 3C130200 */ lui $s3, (0x2000000 >> 16) /* A5DE4 8010F6E4 3C038015 */ lui $v1, %hi(entity_updateCounter) /* A5DE8 8010F6E8 24631330 */ addiu $v1, $v1, %lo(entity_updateCounter) /* A5DEC 8010F6EC AFBF0020 */ sw $ra, 0x20($sp) /* A5DF0 8010F6F0 AFB20018 */ sw $s2, 0x18($sp) /* A5DF4 8010F6F4 AFB00010 */ sw $s0, 0x10($sp) /* A5DF8 8010F6F8 8C620000 */ lw $v0, 0x0($v1) /* A5DFC 8010F6FC 3C12800B */ lui $s2, %hi(gCameras) /* A5E00 8010F700 26521D80 */ addiu $s2, $s2, %lo(gCameras) /* A5E04 8010F704 3C018015 */ lui $at, %hi(D_801512BC) /* A5E08 8010F708 AC2012BC */ sw $zero, %lo(D_801512BC)($at) /* A5E0C 8010F70C 3C018015 */ lui $at, %hi(entity_numEntities) /* A5E10 8010F710 AC2012C0 */ sw $zero, %lo(entity_numEntities)($at) /* A5E14 8010F714 24420001 */ addiu $v0, $v0, 0x1 /* A5E18 8010F718 AC620000 */ sw $v0, 0x0($v1) .L8010F71C: /* A5E1C 8010F71C 0C04417A */ jal get_entity_by_index /* A5E20 8010F720 0220202D */ daddu $a0, $s1, $zero /* A5E24 8010F724 0040802D */ daddu $s0, $v0, $zero /* A5E28 8010F728 520000CD */ beql $s0, $zero, .L8010FA60 /* A5E2C 8010F72C 26310001 */ addiu $s1, $s1, 0x1 /* A5E30 8010F730 3C028015 */ lui $v0, %hi(entity_numEntities) /* A5E34 8010F734 244212C0 */ addiu $v0, $v0, %lo(entity_numEntities) /* A5E38 8010F738 8C430000 */ lw $v1, 0x0($v0) /* A5E3C 8010F73C 24630001 */ addiu $v1, $v1, 0x1 /* A5E40 8010F740 AC430000 */ sw $v1, 0x0($v0) /* A5E44 8010F744 8E030000 */ lw $v1, 0x0($s0) /* A5E48 8010F748 3C024000 */ lui $v0, (0x40000000 >> 16) /* A5E4C 8010F74C 00621024 */ and $v0, $v1, $v0 /* A5E50 8010F750 544000C3 */ bnel $v0, $zero, .L8010FA60 /* A5E54 8010F754 26310001 */ addiu $s1, $s1, 0x1 /* A5E58 8010F758 3C020100 */ lui $v0, (0x1000000 >> 16) /* A5E5C 8010F75C 00621024 */ and $v0, $v1, $v0 /* A5E60 8010F760 1040000D */ beqz $v0, .L8010F798 /* A5E64 8010F764 3C02FEFF */ lui $v0, (0xFEFFFFFF >> 16) /* A5E68 8010F768 3442FFFF */ ori $v0, $v0, (0xFEFFFFFF & 0xFFFF) /* A5E6C 8010F76C 00622024 */ and $a0, $v1, $v0 /* A5E70 8010F770 30628000 */ andi $v0, $v1, 0x8000 /* A5E74 8010F774 14400003 */ bnez $v0, .L8010F784 /* A5E78 8010F778 AE040000 */ sw $a0, 0x0($s0) /* A5E7C 8010F77C 00931025 */ or $v0, $a0, $s3 /* A5E80 8010F780 AE020000 */ sw $v0, 0x0($s0) .L8010F784: /* A5E84 8010F784 2405000A */ addiu $a1, $zero, 0xA /* A5E88 8010F788 8E040028 */ lw $a0, 0x28($s0) /* A5E8C 8010F78C 0C0B0CF8 */ jal start_script /* A5E90 8010F790 24060020 */ addiu $a2, $zero, 0x20 /* A5E94 8010F794 AE020024 */ sw $v0, 0x24($s0) .L8010F798: /* A5E98 8010F798 8E020000 */ lw $v0, 0x0($s0) /* A5E9C 8010F79C 00531024 */ and $v0, $v0, $s3 /* A5EA0 8010F7A0 1040002D */ beqz $v0, .L8010F858 /* A5EA4 8010F7A4 00000000 */ nop /* A5EA8 8010F7A8 8E020024 */ lw $v0, 0x24($s0) /* A5EAC 8010F7AC 0C0B1059 */ jal does_script_exist /* A5EB0 8010F7B0 8C440144 */ lw $a0, 0x144($v0) /* A5EB4 8010F7B4 10400024 */ beqz $v0, .L8010F848 /* A5EB8 8010F7B8 3C03FDFF */ lui $v1, (0xFDFFFFFF >> 16) /* A5EBC 8010F7BC 8E020000 */ lw $v0, 0x0($s0) /* A5EC0 8010F7C0 30420008 */ andi $v0, $v0, 0x8 /* A5EC4 8010F7C4 10400005 */ beqz $v0, .L8010F7DC /* A5EC8 8010F7C8 00000000 */ nop /* A5ECC 8010F7CC 0C047A2F */ jal update_model_animator /* A5ED0 8010F7D0 86040014 */ lh $a0, 0x14($s0) /* A5ED4 8010F7D4 08043DF9 */ j .L8010F7E4 /* A5ED8 8010F7D8 00000000 */ nop .L8010F7DC: /* A5EDC 8010F7DC 0C0483C1 */ jal exec_entity_model_commandlist /* A5EE0 8010F7E0 86040014 */ lh $a0, 0x14($s0) .L8010F7E4: /* A5EE4 8010F7E4 8E020000 */ lw $v0, 0x0($s0) /* A5EE8 8010F7E8 30422000 */ andi $v0, $v0, 0x2000 /* A5EEC 8010F7EC 1040000E */ beqz $v0, .L8010F828 /* A5EF0 8010F7F0 00000000 */ nop /* A5EF4 8010F7F4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* A5EF8 8010F7F8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* A5EFC 8010F7FC 00031080 */ sll $v0, $v1, 2 /* A5F00 8010F800 00431021 */ addu $v0, $v0, $v1 /* A5F04 8010F804 00021080 */ sll $v0, $v0, 2 /* A5F08 8010F808 00431023 */ subu $v0, $v0, $v1 /* A5F0C 8010F80C 000218C0 */ sll $v1, $v0, 3 /* A5F10 8010F810 00431021 */ addu $v0, $v0, $v1 /* A5F14 8010F814 000210C0 */ sll $v0, $v0, 3 /* A5F18 8010F818 00521021 */ addu $v0, $v0, $s2 /* A5F1C 8010F81C C440006C */ lwc1 $f0, 0x6C($v0) /* A5F20 8010F820 46000007 */ neg.s $f0, $f0 /* A5F24 8010F824 E6000064 */ swc1 $f0, 0x64($s0) .L8010F828: /* A5F28 8010F828 8E020000 */ lw $v0, 0x0($s0) /* A5F2C 8010F82C 30420010 */ andi $v0, $v0, 0x10 /* A5F30 8010F830 5440008B */ bnel $v0, $zero, .L8010FA60 /* A5F34 8010F834 26310001 */ addiu $s1, $s1, 0x1 /* A5F38 8010F838 0C04408B */ jal update_entity_transform_matrix /* A5F3C 8010F83C 0200202D */ daddu $a0, $s0, $zero /* A5F40 8010F840 08043E98 */ j .L8010FA60 /* A5F44 8010F844 26310001 */ addiu $s1, $s1, 0x1 .L8010F848: /* A5F48 8010F848 8E020000 */ lw $v0, 0x0($s0) /* A5F4C 8010F84C 3463FFFF */ ori $v1, $v1, (0xFDFFFFFF & 0xFFFF) /* A5F50 8010F850 00431024 */ and $v0, $v0, $v1 /* A5F54 8010F854 AE020000 */ sw $v0, 0x0($s0) .L8010F858: /* A5F58 8010F858 82020007 */ lb $v0, 0x7($s0) /* A5F5C 8010F85C 92030007 */ lbu $v1, 0x7($s0) /* A5F60 8010F860 14400015 */ bnez $v0, .L8010F8B8 /* A5F64 8010F864 2463FFFF */ addiu $v1, $v1, -0x1 /* A5F68 8010F868 0C04422E */ jal entity_get_collision_flags /* A5F6C 8010F86C 0200202D */ daddu $a0, $s0, $zero /* A5F70 8010F870 A2020006 */ sb $v0, 0x6($s0) /* A5F74 8010F874 304200FF */ andi $v0, $v0, 0xFF /* A5F78 8010F878 10400026 */ beqz $v0, .L8010F914 /* A5F7C 8010F87C 00000000 */ nop /* A5F80 8010F880 8E020038 */ lw $v0, 0x38($s0) /* A5F84 8010F884 8C420014 */ lw $v0, 0x14($v0) /* A5F88 8010F888 10400022 */ beqz $v0, .L8010F914 /* A5F8C 8010F88C 00000000 */ nop /* A5F90 8010F890 0040F809 */ jalr $v0 /* A5F94 8010F894 0200202D */ daddu $a0, $s0, $zero /* A5F98 8010F898 1040001E */ beqz $v0, .L8010F914 /* A5F9C 8010F89C 2402000A */ addiu $v0, $zero, 0xA /* A5FA0 8010F8A0 A2020007 */ sb $v0, 0x7($s0) /* A5FA4 8010F8A4 8E020000 */ lw $v0, 0x0($s0) /* A5FA8 8010F8A8 3C030001 */ lui $v1, (0x10000 >> 16) /* A5FAC 8010F8AC 00431025 */ or $v0, $v0, $v1 /* A5FB0 8010F8B0 08043E45 */ j .L8010F914 /* A5FB4 8010F8B4 AE020000 */ sw $v0, 0x0($s0) .L8010F8B8: /* A5FB8 8010F8B8 8E040000 */ lw $a0, 0x0($s0) /* A5FBC 8010F8BC 30820040 */ andi $v0, $a0, 0x40 /* A5FC0 8010F8C0 1040000A */ beqz $v0, .L8010F8EC /* A5FC4 8010F8C4 A2030007 */ sb $v1, 0x7($s0) /* A5FC8 8010F8C8 00031600 */ sll $v0, $v1, 24 /* A5FCC 8010F8CC 14400005 */ bnez $v0, .L8010F8E4 /* A5FD0 8010F8D0 34820020 */ ori $v0, $a0, 0x20 /* A5FD4 8010F8D4 2402FF9F */ addiu $v0, $zero, -0x61 /* A5FD8 8010F8D8 00821024 */ and $v0, $a0, $v0 /* A5FDC 8010F8DC 08043E45 */ j .L8010F914 /* A5FE0 8010F8E0 AE020000 */ sw $v0, 0x0($s0) .L8010F8E4: /* A5FE4 8010F8E4 08043E45 */ j .L8010F914 /* A5FE8 8010F8E8 AE020000 */ sw $v0, 0x0($s0) .L8010F8EC: /* A5FEC 8010F8EC 00031600 */ sll $v0, $v1, 24 /* A5FF0 8010F8F0 14400008 */ bnez $v0, .L8010F914 /* A5FF4 8010F8F4 3C02FFFE */ lui $v0, (0xFFFEFFFF >> 16) /* A5FF8 8010F8F8 3442FFFF */ ori $v0, $v0, (0xFFFEFFFF & 0xFFFF) /* A5FFC 8010F8FC 3C03FFFD */ lui $v1, (0xFFFDFFFF >> 16) /* A6000 8010F900 3463FFFF */ ori $v1, $v1, (0xFFFDFFFF & 0xFFFF) /* A6004 8010F904 00821024 */ and $v0, $a0, $v0 /* A6008 8010F908 00431024 */ and $v0, $v0, $v1 /* A600C 8010F90C AE020000 */ sw $v0, 0x0($s0) /* A6010 8010F910 A2000006 */ sb $zero, 0x6($s0) .L8010F914: /* A6014 8010F914 8E020000 */ lw $v0, 0x0($s0) /* A6018 8010F918 30422000 */ andi $v0, $v0, 0x2000 /* A601C 8010F91C 1040000E */ beqz $v0, .L8010F958 /* A6020 8010F920 00000000 */ nop /* A6024 8010F924 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* A6028 8010F928 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* A602C 8010F92C 00031080 */ sll $v0, $v1, 2 /* A6030 8010F930 00431021 */ addu $v0, $v0, $v1 /* A6034 8010F934 00021080 */ sll $v0, $v0, 2 /* A6038 8010F938 00431023 */ subu $v0, $v0, $v1 /* A603C 8010F93C 000218C0 */ sll $v1, $v0, 3 /* A6040 8010F940 00431021 */ addu $v0, $v0, $v1 /* A6044 8010F944 000210C0 */ sll $v0, $v0, 3 /* A6048 8010F948 00521021 */ addu $v0, $v0, $s2 /* A604C 8010F94C C440006C */ lwc1 $f0, 0x6C($v0) /* A6050 8010F950 46000007 */ neg.s $f0, $f0 /* A6054 8010F954 E6000064 */ swc1 $f0, 0x64($s0) .L8010F958: /* A6058 8010F958 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* A605C 8010F95C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* A6060 8010F960 80420078 */ lb $v0, 0x78($v0) /* A6064 8010F964 14400014 */ bnez $v0, .L8010F9B8 /* A6068 8010F968 00000000 */ nop /* A606C 8010F96C 8E02001C */ lw $v0, 0x1C($s0) /* A6070 8010F970 10400003 */ beqz $v0, .L8010F980 /* A6074 8010F974 00000000 */ nop /* A6078 8010F978 0040F809 */ jalr $v0 /* A607C 8010F97C 0200202D */ daddu $a0, $s0, $zero .L8010F980: /* A6080 8010F980 8E020018 */ lw $v0, 0x18($s0) /* A6084 8010F984 1040000C */ beqz $v0, .L8010F9B8 /* A6088 8010F988 00000000 */ nop /* A608C 8010F98C 92020009 */ lbu $v0, 0x9($s0) /* A6090 8010F990 10400009 */ beqz $v0, .L8010F9B8 /* A6094 8010F994 2442FFFF */ addiu $v0, $v0, -0x1 /* A6098 8010F998 A2020009 */ sb $v0, 0x9($s0) /* A609C 8010F99C 304200FF */ andi $v0, $v0, 0xFF /* A60A0 8010F9A0 14400005 */ bnez $v0, .L8010F9B8 /* A60A4 8010F9A4 00000000 */ nop .L8010F9A8: /* A60A8 8010F9A8 0C043EF6 */ jal step_entity_commandlist /* A60AC 8010F9AC 0200202D */ daddu $a0, $s0, $zero /* A60B0 8010F9B0 1440FFFD */ bnez $v0, .L8010F9A8 /* A60B4 8010F9B4 00000000 */ nop .L8010F9B8: /* A60B8 8010F9B8 8E020000 */ lw $v0, 0x0($s0) /* A60BC 8010F9BC 30420010 */ andi $v0, $v0, 0x10 /* A60C0 8010F9C0 14400003 */ bnez $v0, .L8010F9D0 /* A60C4 8010F9C4 00000000 */ nop /* A60C8 8010F9C8 0C04408B */ jal update_entity_transform_matrix /* A60CC 8010F9CC 0200202D */ daddu $a0, $s0, $zero .L8010F9D0: /* A60D0 8010F9D0 8E020000 */ lw $v0, 0x0($s0) /* A60D4 8010F9D4 30420020 */ andi $v0, $v0, 0x20 /* A60D8 8010F9D8 14400003 */ bnez $v0, .L8010F9E8 /* A60DC 8010F9DC 00000000 */ nop /* A60E0 8010F9E0 0C044129 */ jal update_entity_inverse_rotation_matrix /* A60E4 8010F9E4 0200202D */ daddu $a0, $s0, $zero .L8010F9E8: /* A60E8 8010F9E8 8E020000 */ lw $v0, 0x0($s0) /* A60EC 8010F9EC 30420008 */ andi $v0, $v0, 0x8 /* A60F0 8010F9F0 10400005 */ beqz $v0, .L8010FA08 /* A60F4 8010F9F4 00000000 */ nop /* A60F8 8010F9F8 0C047A2F */ jal update_model_animator /* A60FC 8010F9FC 86040014 */ lh $a0, 0x14($s0) /* A6100 8010FA00 08043E84 */ j .L8010FA10 /* A6104 8010FA04 00000000 */ nop .L8010FA08: /* A6108 8010FA08 0C0483C1 */ jal exec_entity_model_commandlist /* A610C 8010FA0C 86040014 */ lh $a0, 0x14($s0) .L8010FA10: /* A6110 8010FA10 86020016 */ lh $v0, 0x16($s0) /* A6114 8010FA14 04400003 */ bltz $v0, .L8010FA24 /* A6118 8010FA18 00000000 */ nop /* A611C 8010FA1C 0C0448D1 */ jal update_entity_shadow_position /* A6120 8010FA20 0200202D */ daddu $a0, $s0, $zero .L8010FA24: /* A6124 8010FA24 8E020000 */ lw $v0, 0x0($s0) /* A6128 8010FA28 3C032000 */ lui $v1, (0x20000000 >> 16) /* A612C 8010FA2C 00431024 */ and $v0, $v0, $v1 /* A6130 8010FA30 10400003 */ beqz $v0, .L8010FA40 /* A6134 8010FA34 00000000 */ nop /* A6138 8010FA38 0C0441B4 */ jal delete_entity /* A613C 8010FA3C 92040004 */ lbu $a0, 0x4($s0) .L8010FA40: /* A6140 8010FA40 8E020000 */ lw $v0, 0x0($s0) /* A6144 8010FA44 3C030400 */ lui $v1, (0x4000000 >> 16) /* A6148 8010FA48 00431024 */ and $v0, $v0, $v1 /* A614C 8010FA4C 10400004 */ beqz $v0, .L8010FA60 /* A6150 8010FA50 26310001 */ addiu $s1, $s1, 0x1 /* A6154 8010FA54 92040004 */ lbu $a0, 0x4($s0) /* A6158 8010FA58 0C0441E4 */ jal delete_entity_and_unload_data /* A615C 8010FA5C 00000000 */ nop .L8010FA60: /* A6160 8010FA60 2A22001E */ slti $v0, $s1, 0x1E /* A6164 8010FA64 1440FF2D */ bnez $v0, .L8010F71C /* A6168 8010FA68 00000000 */ nop /* A616C 8010FA6C 0C043EA6 */ jal update_shadows /* A6170 8010FA70 00000000 */ nop /* A6174 8010FA74 8FBF0020 */ lw $ra, 0x20($sp) /* A6178 8010FA78 8FB3001C */ lw $s3, 0x1C($sp) /* A617C 8010FA7C 8FB20018 */ lw $s2, 0x18($sp) /* A6180 8010FA80 8FB10014 */ lw $s1, 0x14($sp) /* A6184 8010FA84 8FB00010 */ lw $s0, 0x10($sp) /* A6188 8010FA88 3C018016 */ lui $at, %hi(gCurrentHiddenPanels) /* A618C 8010FA8C A020A578 */ sb $zero, %lo(gCurrentHiddenPanels)($at) /* A6190 8010FA90 03E00008 */ jr $ra /* A6194 8010FA94 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void update_entities(void) { s32 i; D_801512BC = 0; entity_numEntities = 0; entity_updateCounter++; for (i = 0; i < MAX_ENTITIES; i++) { Entity* entity = get_entity_by_index(i); if (entity != NULL) { entity_numEntities++; if (!(entity->flags & ENTITY_FLAG_SKIP_UPDATE)) { if (entity->flags & ENTITY_FLAG_BOUND_SCRIPT_DIRTY) { entity->flags &= ~ENTITY_FLAG_BOUND_SCRIPT_DIRTY; if (!(entity->flags & ENTITY_FLAG_8000)) { entity->flags |= ENTITY_FLAG_2000000; } entity->boundScript = start_script(entity->boundScriptBytecode, EVT_PRIORITY_A, EVT_FLAG_RUN_IMMEDIATELY); } if (entity->flags & ENTITY_FLAG_2000000) { if (does_script_exist(entity->boundScript->id)) { if (entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { update_model_animator(entity->virtualModelIndex); } else { exec_entity_model_commandlist(entity->virtualModelIndex); } if (entity->flags & ENTITY_FLAG_ALWAYS_FACE_CAMERA) { entity->rotation.y = -gCameras[gCurrentCameraID].currentYaw; } if (!(entity->flags & ENTITY_FLAG_SKIP_UPDATE_TRANSFORM_MATRIX)) { update_entity_transform_matrix(entity); } continue; } else { entity->flags &= ~ENTITY_FLAG_2000000; } } if (entity->collisionTimer == 0) { entity->collisionFlags = entity_get_collision_flags(entity); if (entity->collisionFlags) { EntityCallback handleCollision = entity->blueprint->fpHandleCollision; if (handleCollision != NULL && handleCollision(entity) != 0) { entity->collisionTimer = 10; entity->flags |= ENTITY_FLAG_DETECTED_COLLISION; } } } else { entity->collisionTimer--; if (entity->flags & ENTITY_FLAG_CONTINUOUS_COLLISION) { if (entity->collisionTimer == 0) { entity->flags &= ~(ENTITY_FLAG_DISABLE_COLLISION | ENTITY_FLAG_CONTINUOUS_COLLISION); } else { entity->flags |= ENTITY_FLAG_DISABLE_COLLISION; } } else if (entity->collisionTimer == 0) { entity->flags &= ~ENTITY_FLAG_DETECTED_COLLISION; entity->flags &= ~ENTITY_FLAG_PARTNER_COLLISION; entity->collisionFlags = 0; } } if (entity->flags & ENTITY_FLAG_ALWAYS_FACE_CAMERA) { entity->rotation.y = -gCameras[gCurrentCameraID].currentYaw; } if (!gGameStatusPtr->disableScripts) { if (entity->updateScriptCallback != NULL) { entity->updateScriptCallback(entity); } if (entity->scriptReadPos != NULL) { if (entity->scriptDelay != 0) { entity->scriptDelay--; if (entity->scriptDelay == 0) { while (step_entity_commandlist(entity)); } } } } if (!(entity->flags & ENTITY_FLAG_SKIP_UPDATE_TRANSFORM_MATRIX)) { update_entity_transform_matrix(entity); } if (!(entity->flags & ENTITY_FLAG_DISABLE_COLLISION)) { update_entity_inverse_rotation_matrix(entity); } if (entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { update_model_animator(entity->virtualModelIndex); } else { exec_entity_model_commandlist(entity->virtualModelIndex); } if (entity->shadowIndex >= 0) { update_entity_shadow_position(entity); } if (entity->flags & ENTITY_FLAG_PENDING_INSTANCE_DELETE) { delete_entity(entity->listIndex); } if (entity->flags & ENTITY_FLAG_PENDING_FULL_DELETE) { delete_entity_and_unload_data(entity->listIndex); } } } } update_shadows(); gCurrentHiddenPanels.tryFlipTrigger = FALSE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel player_jump /* F5E90 802D14E0 27BDFFB8 */ addiu $sp, $sp, -0x48 /* F5E94 802D14E4 AFB20020 */ sw $s2, 0x20($sp) /* F5E98 802D14E8 0080902D */ daddu $s2, $a0, $zero /* F5E9C 802D14EC AFB30024 */ sw $s3, 0x24($sp) /* F5EA0 802D14F0 AFB1001C */ sw $s1, 0x1C($sp) /* F5EA4 802D14F4 3C118011 */ lui $s1, %hi(gPlayerStatus) /* F5EA8 802D14F8 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* F5EAC 802D14FC AFBF0028 */ sw $ra, 0x28($sp) /* F5EB0 802D1500 AFB00018 */ sw $s0, 0x18($sp) /* F5EB4 802D1504 F7B80040 */ sdc1 $f24, 0x40($sp) /* F5EB8 802D1508 F7B60038 */ sdc1 $f22, 0x38($sp) /* F5EBC 802D150C F7B40030 */ sdc1 $f20, 0x30($sp) /* F5EC0 802D1510 8E50000C */ lw $s0, 0xC($s2) /* F5EC4 802D1514 10A00002 */ beqz $a1, .L802D1520 /* F5EC8 802D1518 00C0982D */ daddu $s3, $a2, $zero /* F5ECC 802D151C AE400070 */ sw $zero, 0x70($s2) .L802D1520: /* F5ED0 802D1520 8E420070 */ lw $v0, 0x70($s2) /* F5ED4 802D1524 1440007E */ bnez $v0, .L802D1720 /* F5ED8 802D1528 00000000 */ nop /* F5EDC 802D152C 8E050000 */ lw $a1, 0x0($s0) /* F5EE0 802D1530 26100004 */ addiu $s0, $s0, 0x4 /* F5EE4 802D1534 0C0B1EAF */ jal evt_get_variable /* F5EE8 802D1538 0240202D */ daddu $a0, $s2, $zero /* F5EEC 802D153C 8E050000 */ lw $a1, 0x0($s0) /* F5EF0 802D1540 26100004 */ addiu $s0, $s0, 0x4 /* F5EF4 802D1544 4482B000 */ mtc1 $v0, $f22 /* F5EF8 802D1548 00000000 */ nop /* F5EFC 802D154C 4680B5A0 */ cvt.s.w $f22, $f22 /* F5F00 802D1550 0C0B1EAF */ jal evt_get_variable /* F5F04 802D1554 0240202D */ daddu $a0, $s2, $zero /* F5F08 802D1558 4482C000 */ mtc1 $v0, $f24 /* F5F0C 802D155C 00000000 */ nop /* F5F10 802D1560 4680C620 */ cvt.s.w $f24, $f24 /* F5F14 802D1564 8E050000 */ lw $a1, 0x0($s0) /* F5F18 802D1568 26100004 */ addiu $s0, $s0, 0x4 /* F5F1C 802D156C 0C0B1EAF */ jal evt_get_variable /* F5F20 802D1570 0240202D */ daddu $a0, $s2, $zero /* F5F24 802D1574 8E050000 */ lw $a1, 0x0($s0) /* F5F28 802D1578 4482A000 */ mtc1 $v0, $f20 /* F5F2C 802D157C 00000000 */ nop /* F5F30 802D1580 4680A520 */ cvt.s.w $f20, $f20 /* F5F34 802D1584 0C0B1EAF */ jal evt_get_variable /* F5F38 802D1588 0240202D */ daddu $a0, $s2, $zero /* F5F3C 802D158C 3C10802E */ lui $s0, %hi(playerNpc) /* F5F40 802D1590 26109D20 */ addiu $s0, $s0, %lo(playerNpc) /* F5F44 802D1594 8E030000 */ lw $v1, 0x0($s0) /* F5F48 802D1598 C6200028 */ lwc1 $f0, 0x28($s1) /* F5F4C 802D159C E4600038 */ swc1 $f0, 0x38($v1) /* F5F50 802D15A0 46000306 */ mov.s $f12, $f0 /* F5F54 802D15A4 C620002C */ lwc1 $f0, 0x2C($s1) /* F5F58 802D15A8 E460003C */ swc1 $f0, 0x3C($v1) /* F5F5C 802D15AC C6200030 */ lwc1 $f0, 0x30($s1) /* F5F60 802D15B0 E4760060 */ swc1 $f22, 0x60($v1) /* F5F64 802D15B4 4406B000 */ mfc1 $a2, $f22 /* F5F68 802D15B8 E4740068 */ swc1 $f20, 0x68($v1) /* F5F6C 802D15BC 4407A000 */ mfc1 $a3, $f20 /* F5F70 802D15C0 E4780064 */ swc1 $f24, 0x64($v1) /* F5F74 802D15C4 A462008E */ sh $v0, 0x8E($v1) /* F5F78 802D15C8 E4600040 */ swc1 $f0, 0x40($v1) /* F5F7C 802D15CC 46000386 */ mov.s $f14, $f0 /* F5F80 802D15D0 C6200080 */ lwc1 $f0, 0x80($s1) /* F5F84 802D15D4 0C00A7B5 */ jal dist2D /* F5F88 802D15D8 E460000C */ swc1 $f0, 0xC($v1) /* F5F8C 802D15DC 46000506 */ mov.s $f20, $f0 /* F5F90 802D15E0 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* F5F94 802D15E4 44811800 */ mtc1 $at, $f3 /* F5F98 802D15E8 44801000 */ mtc1 $zero, $f2 /* F5F9C 802D15EC 4600A021 */ cvt.d.s $f0, $f20 /* F5FA0 802D15F0 4620103C */ c.lt.d $f2, $f0 /* F5FA4 802D15F4 00000000 */ nop /* F5FA8 802D15F8 45000009 */ bc1f .L802D1620 /* F5FAC 802D15FC 00000000 */ nop /* F5FB0 802D1600 8E020000 */ lw $v0, 0x0($s0) /* F5FB4 802D1604 C44C0038 */ lwc1 $f12, 0x38($v0) /* F5FB8 802D1608 C44E0040 */ lwc1 $f14, 0x40($v0) /* F5FBC 802D160C 8C460060 */ lw $a2, 0x60($v0) /* F5FC0 802D1610 0C00A720 */ jal atan2 /* F5FC4 802D1614 8C470068 */ lw $a3, 0x68($v0) /* F5FC8 802D1618 8E020000 */ lw $v0, 0x0($s0) /* F5FCC 802D161C E440000C */ swc1 $f0, 0xC($v0) .L802D1620: /* F5FD0 802D1620 8E030000 */ lw $v1, 0x0($s0) /* F5FD4 802D1624 C4620064 */ lwc1 $f2, 0x64($v1) /* F5FD8 802D1628 C460003C */ lwc1 $f0, 0x3C($v1) /* F5FDC 802D162C 8462008E */ lh $v0, 0x8E($v1) /* F5FE0 802D1630 14400007 */ bnez $v0, .L802D1650 /* F5FE4 802D1634 46001601 */ sub.s $f24, $f2, $f0 /* F5FE8 802D1638 C4600018 */ lwc1 $f0, 0x18($v1) /* F5FEC 802D163C 4600A003 */ div.s $f0, $f20, $f0 /* F5FF0 802D1640 4600018D */ trunc.w.s $f6, $f0 /* F5FF4 802D1644 44023000 */ mfc1 $v0, $f6 /* F5FF8 802D1648 080B4599 */ j .L802D1664 /* F5FFC 802D164C A462008E */ sh $v0, 0x8E($v1) .L802D1650: /* F6000 802D1650 44820000 */ mtc1 $v0, $f0 /* F6004 802D1654 00000000 */ nop /* F6008 802D1658 46800020 */ cvt.s.w $f0, $f0 /* F600C 802D165C 4600A003 */ div.s $f0, $f20, $f0 /* F6010 802D1660 E4600018 */ swc1 $f0, 0x18($v1) .L802D1664: /* F6014 802D1664 3C03802E */ lui $v1, %hi(playerNpc) /* F6018 802D1668 8C639D20 */ lw $v1, %lo(playerNpc)($v1) /* F601C 802D166C 8464008E */ lh $a0, 0x8E($v1) /* F6020 802D1670 C4620014 */ lwc1 $f2, 0x14($v1) /* F6024 802D1674 2482FFFF */ addiu $v0, $a0, -0x1 /* F6028 802D1678 44820000 */ mtc1 $v0, $f0 /* F602C 802D167C 00000000 */ nop /* F6030 802D1680 46800020 */ cvt.s.w $f0, $f0 /* F6034 802D1684 46001082 */ mul.s $f2, $f2, $f0 /* F6038 802D1688 00000000 */ nop /* F603C 802D168C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* F6040 802D1690 44810000 */ mtc1 $at, $f0 /* F6044 802D1694 00000000 */ nop /* F6048 802D1698 46001082 */ mul.s $f2, $f2, $f0 /* F604C 802D169C 00000000 */ nop /* F6050 802D16A0 44840000 */ mtc1 $a0, $f0 /* F6054 802D16A4 00000000 */ nop /* F6058 802D16A8 46800020 */ cvt.s.w $f0, $f0 /* F605C 802D16AC 4600C003 */ div.s $f0, $f24, $f0 /* F6060 802D16B0 46001080 */ add.s $f2, $f2, $f0 /* F6064 802D16B4 E462001C */ swc1 $f2, 0x1C($v1) /* F6068 802D16B8 8E220000 */ lw $v0, 0x0($s1) /* F606C 802D16BC 8E230004 */ lw $v1, 0x4($s1) /* F6070 802D16C0 34420008 */ ori $v0, $v0, 0x8 /* F6074 802D16C4 AE220000 */ sw $v0, 0x0($s1) /* F6078 802D16C8 3C021000 */ lui $v0, (0x10000000 >> 16) /* F607C 802D16CC 00621825 */ or $v1, $v1, $v0 /* F6080 802D16D0 16600011 */ bnez $s3, .L802D1718 /* F6084 802D16D4 AE230004 */ sw $v1, 0x4($s1) /* F6088 802D16D8 30624000 */ andi $v0, $v1, 0x4000 /* F608C 802D16DC 14400008 */ bnez $v0, .L802D1700 /* F6090 802D16E0 3C040009 */ lui $a0, (0x90005 >> 16) /* F6094 802D16E4 3C040006 */ lui $a0, (0x60009 >> 16) /* F6098 802D16E8 30620001 */ andi $v0, $v1, 0x1 /* F609C 802D16EC 14400005 */ bnez $v0, .L802D1704 /* F60A0 802D16F0 34840009 */ ori $a0, $a0, (0x60009 & 0xFFFF) /* F60A4 802D16F4 3C040001 */ lui $a0, (0x10005 >> 16) /* F60A8 802D16F8 080B45C1 */ j .L802D1704 /* F60AC 802D16FC 34840007 */ ori $a0, $a0, (0x10007 & 0xFFFF) .L802D1700: /* F60B0 802D1700 34840005 */ ori $a0, $a0, (0x10005 & 0xFFFF) .L802D1704: /* F60B4 802D1704 0C037FBF */ jal suggest_player_anim_allow_backward /* F60B8 802D1708 00000000 */ nop /* F60BC 802D170C 24042081 */ addiu $a0, $zero, 0x2081 /* F60C0 802D1710 0C052736 */ jal sfx_play_sound_at_player /* F60C4 802D1714 0000282D */ daddu $a1, $zero, $zero .L802D1718: /* F60C8 802D1718 24020001 */ addiu $v0, $zero, 0x1 /* F60CC 802D171C AE420070 */ sw $v0, 0x70($s2) .L802D1720: /* F60D0 802D1720 3C10802E */ lui $s0, %hi(playerNpc) /* F60D4 802D1724 26109D20 */ addiu $s0, $s0, %lo(playerNpc) /* F60D8 802D1728 8E040000 */ lw $a0, 0x0($s0) /* F60DC 802D172C 8C850018 */ lw $a1, 0x18($a0) /* F60E0 802D1730 0C00EA95 */ jal npc_move_heading /* F60E4 802D1734 8C86000C */ lw $a2, 0xC($a0) /* F60E8 802D1738 8E020000 */ lw $v0, 0x0($s0) /* F60EC 802D173C C440001C */ lwc1 $f0, 0x1C($v0) /* F60F0 802D1740 C442003C */ lwc1 $f2, 0x3C($v0) /* F60F4 802D1744 46000106 */ mov.s $f4, $f0 /* F60F8 802D1748 46001080 */ add.s $f2, $f2, $f0 /* F60FC 802D174C C4400014 */ lwc1 $f0, 0x14($v0) /* F6100 802D1750 46002001 */ sub.s $f0, $f4, $f0 /* F6104 802D1754 E442003C */ swc1 $f2, 0x3C($v0) /* F6108 802D1758 16600019 */ bnez $s3, .L802D17C0 /* F610C 802D175C E440001C */ swc1 $f0, 0x1C($v0) /* F6110 802D1760 44801000 */ mtc1 $zero, $f2 /* F6114 802D1764 00000000 */ nop /* F6118 802D1768 4604103C */ c.lt.s $f2, $f4 /* F611C 802D176C 00000000 */ nop /* F6120 802D1770 45000013 */ bc1f .L802D17C0 /* F6124 802D1774 00000000 */ nop /* F6128 802D1778 4602003E */ c.le.s $f0, $f2 /* F612C 802D177C 00000000 */ nop /* F6130 802D1780 4500000F */ bc1f .L802D17C0 /* F6134 802D1784 00000000 */ nop /* F6138 802D1788 8E230004 */ lw $v1, 0x4($s1) /* F613C 802D178C 30624000 */ andi $v0, $v1, 0x4000 /* F6140 802D1790 14400008 */ bnez $v0, .L802D17B4 /* F6144 802D1794 3C040009 */ lui $a0, (0x90005 >> 16) /* F6148 802D1798 3C040006 */ lui $a0, (0x6000A >> 16) /* F614C 802D179C 30620001 */ andi $v0, $v1, 0x1 /* F6150 802D17A0 14400005 */ bnez $v0, .L802D17B8 /* F6154 802D17A4 3484000A */ ori $a0, $a0, (0x6000A & 0xFFFF) /* F6158 802D17A8 3C040001 */ lui $a0, (0x10005 >> 16) /* F615C 802D17AC 080B45EE */ j .L802D17B8 /* F6160 802D17B0 34840008 */ ori $a0, $a0, (0x10008 & 0xFFFF) .L802D17B4: /* F6164 802D17B4 34840005 */ ori $a0, $a0, (0x10005 & 0xFFFF) .L802D17B8: /* F6168 802D17B8 0C037FBF */ jal suggest_player_anim_allow_backward /* F616C 802D17BC 00000000 */ nop .L802D17C0: /* F6170 802D17C0 3C03802E */ lui $v1, %hi(playerNpc) /* F6174 802D17C4 24639D20 */ addiu $v1, $v1, %lo(playerNpc) /* F6178 802D17C8 8C620000 */ lw $v0, 0x0($v1) /* F617C 802D17CC C4400038 */ lwc1 $f0, 0x38($v0) /* F6180 802D17D0 E6200028 */ swc1 $f0, 0x28($s1) /* F6184 802D17D4 C440003C */ lwc1 $f0, 0x3C($v0) /* F6188 802D17D8 E620002C */ swc1 $f0, 0x2C($s1) /* F618C 802D17DC C4400040 */ lwc1 $f0, 0x40($v0) /* F6190 802D17E0 16600003 */ bnez $s3, .L802D17F0 /* F6194 802D17E4 E6200030 */ swc1 $f0, 0x30($s1) /* F6198 802D17E8 C440000C */ lwc1 $f0, 0xC($v0) /* F619C 802D17EC E6200080 */ swc1 $f0, 0x80($s1) .L802D17F0: /* F61A0 802D17F0 8C630000 */ lw $v1, 0x0($v1) /* F61A4 802D17F4 9462008E */ lhu $v0, 0x8E($v1) /* F61A8 802D17F8 2442FFFF */ addiu $v0, $v0, -0x1 /* F61AC 802D17FC A462008E */ sh $v0, 0x8E($v1) /* F61B0 802D1800 00021400 */ sll $v0, $v0, 16 /* F61B4 802D1804 1440002E */ bnez $v0, .L802D18C0 /* F61B8 802D1808 0000102D */ daddu $v0, $zero, $zero /* F61BC 802D180C 3C02EFFF */ lui $v0, (0xEFFFFFFF >> 16) /* F61C0 802D1810 3442FFFF */ ori $v0, $v0, (0xEFFFFFFF & 0xFFFF) /* F61C4 802D1814 2404FFF7 */ addiu $a0, $zero, -0x9 /* F61C8 802D1818 8E230000 */ lw $v1, 0x0($s1) /* F61CC 802D181C 8E250004 */ lw $a1, 0x4($s1) /* F61D0 802D1820 00641824 */ and $v1, $v1, $a0 /* F61D4 802D1824 00A21024 */ and $v0, $a1, $v0 /* F61D8 802D1828 AE230000 */ sw $v1, 0x0($s1) /* F61DC 802D182C 16600014 */ bnez $s3, .L802D1880 /* F61E0 802D1830 AE220004 */ sw $v0, 0x4($s1) /* F61E4 802D1834 30A24000 */ andi $v0, $a1, 0x4000 /* F61E8 802D1838 14400008 */ bnez $v0, .L802D185C /* F61EC 802D183C 3C040001 */ lui $a0, (0x10003 >> 16) /* F61F0 802D1840 3C040006 */ lui $a0, (0x6000B >> 16) /* F61F4 802D1844 30A20001 */ andi $v0, $a1, 0x1 /* F61F8 802D1848 14400005 */ bnez $v0, .L802D1860 /* F61FC 802D184C 3484000B */ ori $a0, $a0, (0x6000B & 0xFFFF) /* F6200 802D1850 3C040001 */ lui $a0, (0x10003 >> 16) /* F6204 802D1854 080B4618 */ j .L802D1860 /* F6208 802D1858 34840009 */ ori $a0, $a0, (0x10009 & 0xFFFF) .L802D185C: /* F620C 802D185C 34840003 */ ori $a0, $a0, (0x10003 & 0xFFFF) .L802D1860: /* F6210 802D1860 0C037FBF */ jal suggest_player_anim_allow_backward /* F6214 802D1864 00000000 */ nop /* F6218 802D1868 3C04802E */ lui $a0, %hi(playerNpc) /* F621C 802D186C 8C849D20 */ lw $a0, %lo(playerNpc)($a0) /* F6220 802D1870 0C00F598 */ jal spawn_surface_effects /* F6224 802D1874 24050002 */ addiu $a1, $zero, 0x2 /* F6228 802D1878 12600004 */ beqz $s3, .L802D188C /* F622C 802D187C 00000000 */ nop .L802D1880: /* F6230 802D1880 24020002 */ addiu $v0, $zero, 0x2 /* F6234 802D1884 1662000E */ bne $s3, $v0, .L802D18C0 /* F6238 802D1888 24020001 */ addiu $v0, $zero, 0x1 .L802D188C: /* F623C 802D188C 3C02802E */ lui $v0, %hi(playerNpc) /* F6240 802D1890 8C429D20 */ lw $v0, %lo(playerNpc)($v0) /* F6244 802D1894 C44C001C */ lwc1 $f12, 0x1C($v0) /* F6248 802D1898 0C038D45 */ jal player_check_collision_below /* F624C 802D189C 27A50010 */ addiu $a1, $sp, 0x10 /* F6250 802D18A0 8FA40010 */ lw $a0, 0x10($sp) /* F6254 802D18A4 04800005 */ bltz $a0, .L802D18BC /* F6258 802D18A8 46000606 */ mov.s $f24, $f0 /* F625C 802D18AC 0C038C57 */ jal func_800E315C /* F6260 802D18B0 E638002C */ swc1 $f24, 0x2C($s1) /* F6264 802D18B4 0C03BF42 */ jal func_800EFD08 /* F6268 802D18B8 00000000 */ nop .L802D18BC: /* F626C 802D18BC 24020001 */ addiu $v0, $zero, 0x1 .L802D18C0: /* F6270 802D18C0 8FBF0028 */ lw $ra, 0x28($sp) /* F6274 802D18C4 8FB30024 */ lw $s3, 0x24($sp) /* F6278 802D18C8 8FB20020 */ lw $s2, 0x20($sp) /* F627C 802D18CC 8FB1001C */ lw $s1, 0x1C($sp) /* F6280 802D18D0 8FB00018 */ lw $s0, 0x18($sp) /* F6284 802D18D4 D7B80040 */ ldc1 $f24, 0x40($sp) /* F6288 802D18D8 D7B60038 */ ldc1 $f22, 0x38($sp) /* F628C 802D18DC D7B40030 */ ldc1 $f20, 0x30($sp) /* F6290 802D18E0 03E00008 */ jr $ra /* F6294 802D18E4 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 player_jump(Evt* script, s32 isInitialCall, s32 mode) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; f32 xTemp; f32 yTemp; f32 zTemp; f32 jumpVelocity; s32 duration; AnimID anim; f32 dist; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { xTemp = evt_get_variable(script, *args++); yTemp = evt_get_variable(script, *args++); zTemp = evt_get_variable(script, *args++); duration = evt_get_variable(script, *args++); playerNpc->pos.x = playerStatus->position.x; playerNpc->pos.y = playerStatus->position.y; playerNpc->pos.z = playerStatus->position.z; playerNpc->moveToPos.x = xTemp; playerNpc->moveToPos.y = yTemp; playerNpc->moveToPos.z = zTemp; playerNpc->duration = duration; playerNpc->yaw = playerStatus->targetYaw; dist = dist2D(playerNpc->pos.x, playerNpc->pos.z, playerNpc->moveToPos.x, playerNpc->moveToPos.z); if (dist > 1.0) { playerNpc->yaw = atan2(playerNpc->pos.x, playerNpc->pos.z, playerNpc->moveToPos.x, playerNpc->moveToPos.z); } yTemp = playerNpc->moveToPos.y - playerNpc->pos.y; if (playerNpc->duration == 0) { playerNpc->duration = dist / playerNpc->moveSpeed; } else { playerNpc->moveSpeed = dist / playerNpc->duration; } playerNpc->jumpVelocity = (playerNpc->jumpScale * (playerNpc->duration - 1) / 2) + (yTemp / playerNpc->duration); playerStatus->flags |= PS_FLAG_FLYING; playerStatus->animFlags |= PA_FLAG_NO_OOB_RESPAWN; if (mode == 0) { if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO)) { if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) { anim = ANIM_Mario1_Jump; } else { anim = ANIM_MarioW1_JumpWatt; } } else { anim = ANIM_MarioW3_8bit_Jump; } suggest_player_anim_allow_backward(anim); sfx_play_sound_at_player(SOUND_JUMP_2081, SOUND_SPACE_MODE_0); } script->functionTemp[0] = 1; } npc_move_heading(playerNpc, playerNpc->moveSpeed, playerNpc->yaw); playerNpc->pos.y += playerNpc->jumpVelocity; jumpVelocity = playerNpc->jumpVelocity; // TODO: temp needed and used specifically only once below for this to match playerNpc->jumpVelocity -= playerNpc->jumpScale; if (mode == 0 && jumpVelocity > 0.0f && playerNpc->jumpVelocity <= 0.0f) { if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO)) { if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) { anim = ANIM_Mario1_Fall; } else { anim = ANIM_MarioW1_FallWatt; } } else { anim = ANIM_MarioW3_8bit_Jump; } suggest_player_anim_allow_backward(anim); } playerStatus->position.x = playerNpc->pos.x; playerStatus->position.y = playerNpc->pos.y; playerStatus->position.z = playerNpc->pos.z; if (mode == 0) { playerStatus->targetYaw = playerNpc->yaw; } playerNpc->duration--; if (playerNpc->duration == 0) { playerStatus->flags &= ~PS_FLAG_FLYING; playerStatus->animFlags &= ~PA_FLAG_NO_OOB_RESPAWN; if (mode == 0) { if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO)) { if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) { anim = ANIM_Mario1_Land; } else { anim = ANIM_MarioW1_LandWatt; } } else { anim = ANIM_Mario1_TiredIdle; } suggest_player_anim_allow_backward(anim); spawn_surface_effects(playerNpc, SURFACE_INTERACT_LAND); } if (mode == 0 || mode == 2) { s32 colliderID; yTemp = player_check_collision_below(playerNpc->jumpVelocity, &colliderID); if (colliderID >= 0) { playerStatus->position.y = yTemp; player_handle_floor_collider_type(colliderID); handle_floor_behavior(); } } return TRUE; } return FALSE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel waterfall_appendGfx /* 3B7440 E00B62E0 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 3B7444 E00B62E4 0080302D */ daddu $a2, $a0, $zero /* 3B7448 E00B62E8 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3B744C E00B62EC 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3B7450 E00B62F0 27A40010 */ addiu $a0, $sp, 0x10 /* 3B7454 E00B62F4 AFB600A8 */ sw $s6, 0xA8($sp) /* 3B7458 E00B62F8 3C160001 */ lui $s6, (0x11630 >> 16) /* 3B745C E00B62FC AFB3009C */ sw $s3, 0x9C($sp) /* 3B7460 E00B6300 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3B7464 E00B6304 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3B7468 E00B6308 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 3B746C E00B630C AFBF00B0 */ sw $ra, 0xB0($sp) /* 3B7470 E00B6310 AFB700AC */ sw $s7, 0xAC($sp) /* 3B7474 E00B6314 AFB500A4 */ sw $s5, 0xA4($sp) /* 3B7478 E00B6318 AFB400A0 */ sw $s4, 0xA0($sp) /* 3B747C E00B631C AFB20098 */ sw $s2, 0x98($sp) /* 3B7480 E00B6320 AFB10094 */ sw $s1, 0x94($sp) /* 3B7484 E00B6324 AFB00090 */ sw $s0, 0x90($sp) /* 3B7488 E00B6328 F7B400B8 */ sdc1 $f20, 0xB8($sp) /* 3B748C E00B632C 8E650000 */ lw $a1, 0x0($s3) /* 3B7490 E00B6330 8CD2000C */ lw $s2, 0xC($a2) /* 3B7494 E00B6334 3C01E00B */ lui $at, (0xE00B6768 >> 16) /* 3B7498 E00B6338 D4206768 */ ldc1 $f0, (0xE00B6768 & 0xFFFF)($at) /* 3B749C E00B633C 00A0182D */ daddu $v1, $a1, $zero /* 3B74A0 E00B6340 24A50008 */ addiu $a1, $a1, 0x8 /* 3B74A4 E00B6344 AE650000 */ sw $a1, 0x0($s3) /* 3B74A8 E00B6348 8E570014 */ lw $s7, 0x14($s2) /* 3B74AC E00B634C 8E550024 */ lw $s5, 0x24($s2) /* 3B74B0 E00B6350 C6540028 */ lwc1 $f20, 0x28($s2) /* 3B74B4 E00B6354 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3B74B8 E00B6358 AC620000 */ sw $v0, 0x0($v1) /* 3B74BC E00B635C AC600004 */ sw $zero, 0x4($v1) /* 3B74C0 E00B6360 ACA70000 */ sw $a3, 0x0($a1) /* 3B74C4 E00B6364 8CC30010 */ lw $v1, 0x10($a2) /* 3B74C8 E00B6368 24A20008 */ addiu $v0, $a1, 0x8 /* 3B74CC E00B636C AE620000 */ sw $v0, 0x0($s3) /* 3B74D0 E00B6370 8C62001C */ lw $v0, 0x1C($v1) /* 3B74D4 E00B6374 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3B74D8 E00B6378 4600A521 */ cvt.d.s $f20, $f20 /* 3B74DC E00B637C 4620A502 */ mul.d $f20, $f20, $f0 /* 3B74E0 E00B6380 00000000 */ nop /* 3B74E4 E00B6384 00431021 */ addu $v0, $v0, $v1 /* 3B74E8 E00B6388 3C03800B */ lui $v1, %hi(gCameras) /* 3B74EC E00B638C 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3B74F0 E00B6390 ACA20004 */ sw $v0, 0x4($a1) /* 3B74F4 E00B6394 8E450004 */ lw $a1, 0x4($s2) /* 3B74F8 E00B6398 8E460008 */ lw $a2, 0x8($s2) /* 3B74FC E00B639C 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3B7500 E00B63A0 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3B7504 E00B63A4 8E47000C */ lw $a3, 0xC($s2) /* 3B7508 E00B63A8 00028880 */ sll $s1, $v0, 2 /* 3B750C E00B63AC 02228821 */ addu $s1, $s1, $v0 /* 3B7510 E00B63B0 00118880 */ sll $s1, $s1, 2 /* 3B7514 E00B63B4 02228823 */ subu $s1, $s1, $v0 /* 3B7518 E00B63B8 001110C0 */ sll $v0, $s1, 3 /* 3B751C E00B63BC 02228821 */ addu $s1, $s1, $v0 /* 3B7520 E00B63C0 001188C0 */ sll $s1, $s1, 3 /* 3B7524 E00B63C4 02238821 */ addu $s1, $s1, $v1 /* 3B7528 E00B63C8 0C080108 */ jal shim_guTranslateF /* 3B752C E00B63CC 4620A520 */ cvt.s.d $f20, $f20 /* 3B7530 E00B63D0 27B00050 */ addiu $s0, $sp, 0x50 /* 3B7534 E00B63D4 4405A000 */ mfc1 $a1, $f20 /* 3B7538 E00B63D8 0200202D */ daddu $a0, $s0, $zero /* 3B753C E00B63DC 00A0302D */ daddu $a2, $a1, $zero /* 3B7540 E00B63E0 0C080110 */ jal shim_guScaleF /* 3B7544 E00B63E4 00A0382D */ daddu $a3, $a1, $zero /* 3B7548 E00B63E8 0200202D */ daddu $a0, $s0, $zero /* 3B754C E00B63EC 27A50010 */ addiu $a1, $sp, 0x10 /* 3B7550 E00B63F0 0C080114 */ jal shim_guMtxCatF /* 3B7554 E00B63F4 00A0302D */ daddu $a2, $a1, $zero /* 3B7558 E00B63F8 27A40010 */ addiu $a0, $sp, 0x10 /* 3B755C E00B63FC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3B7560 E00B6400 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3B7564 E00B6404 3C14800A */ lui $s4, %hi(gDisplayContext) /* 3B7568 E00B6408 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 3B756C E00B640C 96050000 */ lhu $a1, 0x0($s0) /* 3B7570 E00B6410 8E820000 */ lw $v0, 0x0($s4) /* 3B7574 E00B6414 00052980 */ sll $a1, $a1, 6 /* 3B7578 E00B6418 00B62821 */ addu $a1, $a1, $s6 /* 3B757C E00B641C 0C080118 */ jal shim_guMtxF2L /* 3B7580 E00B6420 00452821 */ addu $a1, $v0, $a1 /* 3B7584 E00B6424 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3B7588 E00B6428 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3B758C E00B642C 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 3B7590 E00B6430 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 3B7594 E00B6434 0000482D */ daddu $t1, $zero, $zero /* 3B7598 E00B6438 240F0258 */ addiu $t7, $zero, 0x258 /* 3B759C E00B643C 240C00FF */ addiu $t4, $zero, 0xFF /* 3B75A0 E00B6440 240E0400 */ addiu $t6, $zero, 0x400 /* 3B75A4 E00B6444 240BFFFF */ addiu $t3, $zero, -0x1 /* 3B75A8 E00B6448 240AFED4 */ addiu $t2, $zero, -0x12C /* 3B75AC E00B644C 32B500FF */ andi $s5, $s5, 0xFF /* 3B75B0 E00B6450 8E640000 */ lw $a0, 0x0($s3) /* 3B75B4 E00B6454 3C014270 */ lui $at, (0x42700000 >> 16) /* 3B75B8 E00B6458 44812000 */ mtc1 $at, $f4 /* 3B75BC E00B645C 3C014120 */ lui $at, (0x41200000 >> 16) /* 3B75C0 E00B6460 44811000 */ mtc1 $at, $f2 /* 3B75C4 E00B6464 96020000 */ lhu $v0, 0x0($s0) /* 3B75C8 E00B6468 0080282D */ daddu $a1, $a0, $zero /* 3B75CC E00B646C 24840008 */ addiu $a0, $a0, 0x8 /* 3B75D0 E00B6470 248D0020 */ addiu $t5, $a0, 0x20 /* 3B75D4 E00B6474 01A0402D */ daddu $t0, $t5, $zero /* 3B75D8 E00B6478 2487002F */ addiu $a3, $a0, 0x2F /* 3B75DC E00B647C AE640000 */ sw $a0, 0x0($s3) /* 3B75E0 E00B6480 ACA30000 */ sw $v1, 0x0($a1) /* 3B75E4 E00B6484 24430001 */ addiu $v1, $v0, 0x1 /* 3B75E8 E00B6488 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3B75EC E00B648C 00021180 */ sll $v0, $v0, 6 /* 3B75F0 E00B6490 A6030000 */ sh $v1, 0x0($s0) /* 3B75F4 E00B6494 8E830000 */ lw $v1, 0x0($s4) /* 3B75F8 E00B6498 00561021 */ addu $v0, $v0, $s6 /* 3B75FC E00B649C 00621821 */ addu $v1, $v1, $v0 /* 3B7600 E00B64A0 24820008 */ addiu $v0, $a0, 0x8 /* 3B7604 E00B64A4 ACA30004 */ sw $v1, 0x4($a1) /* 3B7608 E00B64A8 AE620000 */ sw $v0, 0x0($s3) /* 3B760C E00B64AC 24820010 */ addiu $v0, $a0, 0x10 /* 3B7610 E00B64B0 AC860000 */ sw $a2, 0x0($a0) /* 3B7614 E00B64B4 AE620000 */ sw $v0, 0x0($s3) /* 3B7618 E00B64B8 8E230204 */ lw $v1, 0x204($s1) /* 3B761C E00B64BC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3B7620 E00B64C0 AC820008 */ sw $v0, 0x8($a0) /* 3B7624 E00B64C4 AC830004 */ sw $v1, 0x4($a0) /* 3B7628 E00B64C8 9243001B */ lbu $v1, 0x1B($s2) /* 3B762C E00B64CC 9245001F */ lbu $a1, 0x1F($s2) /* 3B7630 E00B64D0 92460023 */ lbu $a2, 0x23($s2) /* 3B7634 E00B64D4 24820018 */ addiu $v0, $a0, 0x18 /* 3B7638 E00B64D8 AE620000 */ sw $v0, 0x0($s3) /* 3B763C E00B64DC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3B7640 E00B64E0 AC820010 */ sw $v0, 0x10($a0) /* 3B7644 E00B64E4 3C020900 */ lui $v0, %hi(D_09000200_415260) /* 3B7648 E00B64E8 24420200 */ addiu $v0, $v0, %lo(D_09000200_415260) /* 3B764C E00B64EC AC820014 */ sw $v0, 0x14($a0) /* 3B7650 E00B64F0 3C02DE01 */ lui $v0, (0xDE010000 >> 16) /* 3B7654 E00B64F4 AC820018 */ sw $v0, 0x18($a0) /* 3B7658 E00B64F8 248201A0 */ addiu $v0, $a0, 0x1A0 /* 3B765C E00B64FC AC82001C */ sw $v0, 0x1C($a0) /* 3B7660 E00B6500 AE620000 */ sw $v0, 0x0($s3) /* 3B7664 E00B6504 00031E00 */ sll $v1, $v1, 24 /* 3B7668 E00B6508 00052C00 */ sll $a1, $a1, 16 /* 3B766C E00B650C 00651825 */ or $v1, $v1, $a1 /* 3B7670 E00B6510 00063200 */ sll $a2, $a2, 8 /* 3B7674 E00B6514 00661825 */ or $v1, $v1, $a2 /* 3B7678 E00B6518 00751825 */ or $v1, $v1, $s5 /* 3B767C E00B651C AC83000C */ sw $v1, 0xC($a0) .LE00B6520: /* 3B7680 E00B6520 A50A0000 */ sh $t2, 0x0($t0) /* 3B7684 E00B6524 25080010 */ addiu $t0, $t0, 0x10 /* 3B7688 E00B6528 00171940 */ sll $v1, $s7, 5 /* 3B768C E00B652C 26F70004 */ addiu $s7, $s7, 0x4 /* 3B7690 E00B6530 A4EFFFF3 */ sh $t7, -0xD($a3) /* 3B7694 E00B6534 A4E0FFF5 */ sh $zero, -0xB($a3) /* 3B7698 E00B6538 A4E3FFF9 */ sh $v1, -0x7($a3) /* 3B769C E00B653C C640002C */ lwc1 $f0, 0x2C($s2) /* 3B76A0 E00B6540 25290001 */ addiu $t1, $t1, 0x1 /* 3B76A4 E00B6544 A0ECFFFD */ sb $t4, -0x3($a3) /* 3B76A8 E00B6548 A0ECFFFE */ sb $t4, -0x2($a3) /* 3B76AC E00B654C A0ECFFFF */ sb $t4, -0x1($a3) /* 3B76B0 E00B6550 A0EB0000 */ sb $t3, 0x0($a3) /* 3B76B4 E00B6554 4600018D */ trunc.w.s $f6, $f0 /* 3B76B8 E00B6558 44023000 */ mfc1 $v0, $f6 /* 3B76BC E00B655C 00000000 */ nop /* 3B76C0 E00B6560 00021140 */ sll $v0, $v0, 5 /* 3B76C4 E00B6564 A4E2FFFB */ sh $v0, -0x5($a3) /* 3B76C8 E00B6568 24E70010 */ addiu $a3, $a3, 0x10 /* 3B76CC E00B656C A50A0000 */ sh $t2, 0x0($t0) /* 3B76D0 E00B6570 C640002C */ lwc1 $f0, 0x2C($s2) /* 3B76D4 E00B6574 25080010 */ addiu $t0, $t0, 0x10 /* 3B76D8 E00B6578 A0EB0000 */ sb $t3, 0x0($a3) /* 3B76DC E00B657C 256BFFEC */ addiu $t3, $t3, -0x14 /* 3B76E0 E00B6580 26520004 */ addiu $s2, $s2, 0x4 /* 3B76E4 E00B6584 254A0032 */ addiu $t2, $t2, 0x32 /* 3B76E8 E00B6588 46040000 */ add.s $f0, $f0, $f4 /* 3B76EC E00B658C A4E0FFF5 */ sh $zero, -0xB($a3) /* 3B76F0 E00B6590 A4E3FFF9 */ sh $v1, -0x7($a3) /* 3B76F4 E00B6594 46020002 */ mul.s $f0, $f0, $f2 /* 3B76F8 E00B6598 00000000 */ nop /* 3B76FC E00B659C A4EEFFFB */ sh $t6, -0x5($a3) /* 3B7700 E00B65A0 A0ECFFFD */ sb $t4, -0x3($a3) /* 3B7704 E00B65A4 A0ECFFFE */ sb $t4, -0x2($a3) /* 3B7708 E00B65A8 A0ECFFFF */ sb $t4, -0x1($a3) /* 3B770C E00B65AC 4600018D */ trunc.w.s $f6, $f0 /* 3B7710 E00B65B0 44023000 */ mfc1 $v0, $f6 /* 3B7714 E00B65B4 00000000 */ nop /* 3B7718 E00B65B8 A4E2FFF3 */ sh $v0, -0xD($a3) /* 3B771C E00B65BC 2922000C */ slti $v0, $t1, 0xC /* 3B7720 E00B65C0 1440FFD7 */ bnez $v0, .LE00B6520 /* 3B7724 E00B65C4 24E70010 */ addiu $a3, $a3, 0x10 /* 3B7728 E00B65C8 0120302D */ daddu $a2, $t1, $zero /* 3B772C E00B65CC 3C07800A */ lui $a3, %hi(gMainGfxPos) /* 3B7730 E00B65D0 24E7A66C */ addiu $a3, $a3, %lo(gMainGfxPos) /* 3B7734 E00B65D4 00061040 */ sll $v0, $a2, 1 /* 3B7738 E00B65D8 0000482D */ daddu $t1, $zero, $zero /* 3B773C E00B65DC 304400FF */ andi $a0, $v0, 0xFF /* 3B7740 E00B65E0 00042300 */ sll $a0, $a0, 12 /* 3B7744 E00B65E4 3042007F */ andi $v0, $v0, 0x7F /* 3B7748 E00B65E8 00021040 */ sll $v0, $v0, 1 /* 3B774C E00B65EC 8CE30000 */ lw $v1, 0x0($a3) /* 3B7750 E00B65F0 24C6FFFF */ addiu $a2, $a2, -0x1 /* 3B7754 E00B65F4 0060282D */ daddu $a1, $v1, $zero /* 3B7758 E00B65F8 24630008 */ addiu $v1, $v1, 0x8 /* 3B775C E00B65FC ACE30000 */ sw $v1, 0x0($a3) /* 3B7760 E00B6600 3C030100 */ lui $v1, (0x1000000 >> 16) /* 3B7764 E00B6604 00431025 */ or $v0, $v0, $v1 /* 3B7768 E00B6608 00822025 */ or $a0, $a0, $v0 /* 3B776C E00B660C ACA40000 */ sw $a0, 0x0($a1) /* 3B7770 E00B6610 18C00036 */ blez $a2, .LE00B66EC /* 3B7774 E00B6614 ACAD0004 */ sw $t5, 0x4($a1) /* 3B7778 E00B6618 00E0682D */ daddu $t5, $a3, $zero /* 3B777C E00B661C 3C0C0600 */ lui $t4, (0x6000000 >> 16) /* 3B7780 E00B6620 240B0001 */ addiu $t3, $zero, 0x1 /* 3B7784 E00B6624 3C100606 */ lui $s0, (0x6060402 >> 16) /* 3B7788 E00B6628 36100402 */ ori $s0, $s0, (0x6060402 & 0xFFFF) /* 3B778C E00B662C 3C0F0002 */ lui $t7, (0x20406 >> 16) /* 3B7790 E00B6630 35EF0406 */ ori $t7, $t7, (0x20406 & 0xFFFF) /* 3B7794 E00B6634 3C0E0006 */ lui $t6, (0x60804 >> 16) /* 3B7798 E00B6638 35CE0804 */ ori $t6, $t6, (0x60804 & 0xFFFF) /* 3B779C E00B663C 24080004 */ addiu $t0, $zero, 0x4 /* 3B77A0 E00B6640 24070002 */ addiu $a3, $zero, 0x2 /* 3B77A4 E00B6644 240A0006 */ addiu $t2, $zero, 0x6 .LE00B6648: /* 3B77A8 E00B6648 8DA40000 */ lw $a0, 0x0($t5) /* 3B77AC E00B664C 00092840 */ sll $a1, $t1, 1 /* 3B77B0 E00B6650 24820008 */ addiu $v0, $a0, 0x8 /* 3B77B4 E00B6654 14A00004 */ bnez $a1, .LE00B6668 /* 3B77B8 E00B6658 ADA20000 */ sw $v0, 0x0($t5) /* 3B77BC E00B665C 00091440 */ sll $v0, $t1, 17 /* 3B77C0 E00B6660 0802D9A4 */ j .LE00B6690 /* 3B77C4 E00B6664 34420402 */ ori $v0, $v0, 0x402 .LE00B6668: /* 3B77C8 E00B6668 14AB0003 */ bne $a1, $t3, .LE00B6678 /* 3B77CC E00B666C 30E200FF */ andi $v0, $a3, 0xFF /* 3B77D0 E00B6670 0802D9A6 */ j .LE00B6698 /* 3B77D4 E00B6674 AC900000 */ sw $s0, 0x0($a0) .LE00B6678: /* 3B77D8 E00B6678 00021400 */ sll $v0, $v0, 16 /* 3B77DC E00B667C 00091A80 */ sll $v1, $t1, 10 /* 3B77E0 E00B6680 3063FC00 */ andi $v1, $v1, 0xFC00 /* 3B77E4 E00B6684 00431025 */ or $v0, $v0, $v1 /* 3B77E8 E00B6688 310300FF */ andi $v1, $t0, 0xFF /* 3B77EC E00B668C 00431025 */ or $v0, $v0, $v1 .LE00B6690: /* 3B77F0 E00B6690 004C1025 */ or $v0, $v0, $t4 /* 3B77F4 E00B6694 AC820000 */ sw $v0, 0x0($a0) .LE00B6698: /* 3B77F8 E00B6698 14A00003 */ bnez $a1, .LE00B66A8 /* 3B77FC E00B669C 00000000 */ nop /* 3B7800 E00B66A0 0802D9B5 */ j .LE00B66D4 /* 3B7804 E00B66A4 AC8F0004 */ sw $t7, 0x4($a0) .LE00B66A8: /* 3B7808 E00B66A8 14AB0003 */ bne $a1, $t3, .LE00B66B8 /* 3B780C E00B66AC 314200FF */ andi $v0, $t2, 0xFF /* 3B7810 E00B66B0 0802D9B5 */ j .LE00B66D4 /* 3B7814 E00B66B4 AC8E0004 */ sw $t6, 0x4($a0) .LE00B66B8: /* 3B7818 E00B66B8 00021400 */ sll $v0, $v0, 16 /* 3B781C E00B66BC 30E300FF */ andi $v1, $a3, 0xFF /* 3B7820 E00B66C0 00031A00 */ sll $v1, $v1, 8 /* 3B7824 E00B66C4 00431025 */ or $v0, $v0, $v1 /* 3B7828 E00B66C8 310300FF */ andi $v1, $t0, 0xFF /* 3B782C E00B66CC 00431025 */ or $v0, $v0, $v1 /* 3B7830 E00B66D0 AC820004 */ sw $v0, 0x4($a0) .LE00B66D4: /* 3B7834 E00B66D4 25080004 */ addiu $t0, $t0, 0x4 /* 3B7838 E00B66D8 24E70004 */ addiu $a3, $a3, 0x4 /* 3B783C E00B66DC 25290001 */ addiu $t1, $t1, 0x1 /* 3B7840 E00B66E0 0126102A */ slt $v0, $t1, $a2 /* 3B7844 E00B66E4 1440FFD8 */ bnez $v0, .LE00B6648 /* 3B7848 E00B66E8 254A0004 */ addiu $t2, $t2, 0x4 .LE00B66EC: /* 3B784C E00B66EC 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3B7850 E00B66F0 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3B7854 E00B66F4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3B7858 E00B66F8 8C620000 */ lw $v0, 0x0($v1) /* 3B785C E00B66FC 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3B7860 E00B6700 0040202D */ daddu $a0, $v0, $zero /* 3B7864 E00B6704 24420008 */ addiu $v0, $v0, 0x8 /* 3B7868 E00B6708 AC620000 */ sw $v0, 0x0($v1) /* 3B786C E00B670C 24020040 */ addiu $v0, $zero, 0x40 /* 3B7870 E00B6710 AC850000 */ sw $a1, 0x0($a0) /* 3B7874 E00B6714 AC820004 */ sw $v0, 0x4($a0) /* 3B7878 E00B6718 8FBF00B0 */ lw $ra, 0xB0($sp) /* 3B787C E00B671C 8FB700AC */ lw $s7, 0xAC($sp) /* 3B7880 E00B6720 8FB600A8 */ lw $s6, 0xA8($sp) /* 3B7884 E00B6724 8FB500A4 */ lw $s5, 0xA4($sp) /* 3B7888 E00B6728 8FB400A0 */ lw $s4, 0xA0($sp) /* 3B788C E00B672C 8FB3009C */ lw $s3, 0x9C($sp) /* 3B7890 E00B6730 8FB20098 */ lw $s2, 0x98($sp) /* 3B7894 E00B6734 8FB10094 */ lw $s1, 0x94($sp) /* 3B7898 E00B6738 8FB00090 */ lw $s0, 0x90($sp) /* 3B789C E00B673C D7B400B8 */ ldc1 $f20, 0xB8($sp) /* 3B78A0 E00B6740 03E00008 */ jr $ra /* 3B78A4 E00B6744 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 3B78A8 E00B6748 00000000 */ nop /* 3B78AC E00B674C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void waterfall_appendGfx(void* effect) { WaterfallFXData* data = ((EffectInstance*)effect)->data.waterfall; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_14 = data->unk_14; s32 unk_24 = data->unk_24; f32 scale = data->unk_28 * 0.1; s32 savedIdx; Vtx_t* vtx; Gfx* savedGfxPos; 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, scale, scale, scale); shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24); gSPDisplayList(gMainGfxPos++, D_09000200_3B7AD0); gSPBranchList(gMainGfxPos, &gMainGfxPos[49]); savedGfxPos = gMainGfxPos + 1; gMainGfxPos = &gMainGfxPos[49]; vtx = (Vtx_t*) savedGfxPos; for (i = 0; i < ARRAY_COUNT(data->unk_2C); i++) { vtx->ob[0] = i * 50 - 300; vtx->ob[1] = 600; vtx->ob[2] = 0; vtx->tc[0] = (unk_14 + i * 4) * 32; vtx->tc[1] = (s32) data->unk_2C[i] * 32; vtx->cn[0] = 255; vtx->cn[1] = 255; vtx->cn[2] = 255; vtx->cn[3] = -i * 20 - 1; vtx++; vtx->ob[0] = i * 50 - 300; vtx->ob[1] = (data->unk_2C[i] + 60.0f) * 10.0f; vtx->ob[2] = 0; vtx->tc[0] = (unk_14 + i * 4) * 32; vtx->tc[1] = 1024; vtx->cn[0] = 255; vtx->cn[1] = 255; vtx->cn[2] = 255; vtx->cn[3] = -i * 20 - 1; vtx++; } savedIdx = i; gSPVertex(gMainGfxPos++, savedGfxPos, i * 2, 0); for (i = 0; i < savedIdx - 1; 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); }
### RAW ASSEMBLY INSTRUCTIONS: glabel explosion_appendGfx /* 343ADC E003245C 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 343AE0 E0032460 0080302D */ daddu $a2, $a0, $zero /* 343AE4 E0032464 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 343AE8 E0032468 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 343AEC E003246C 27A40018 */ addiu $a0, $sp, 0x18 /* 343AF0 E0032470 AFB600B0 */ sw $s6, 0xB0($sp) /* 343AF4 E0032474 3C160001 */ lui $s6, (0x11630 >> 16) /* 343AF8 E0032478 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 343AFC E003247C AFB200A0 */ sw $s2, 0xA0($sp) /* 343B00 E0032480 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 343B04 E0032484 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 343B08 E0032488 AFBF00B8 */ sw $ra, 0xB8($sp) /* 343B0C E003248C AFB700B4 */ sw $s7, 0xB4($sp) /* 343B10 E0032490 AFB500AC */ sw $s5, 0xAC($sp) /* 343B14 E0032494 AFB400A8 */ sw $s4, 0xA8($sp) /* 343B18 E0032498 AFB300A4 */ sw $s3, 0xA4($sp) /* 343B1C E003249C AFB1009C */ sw $s1, 0x9C($sp) /* 343B20 E00324A0 AFB00098 */ sw $s0, 0x98($sp) /* 343B24 E00324A4 F7B600C8 */ sdc1 $f22, 0xC8($sp) /* 343B28 E00324A8 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* 343B2C E00324AC 8E450000 */ lw $a1, 0x0($s2) /* 343B30 E00324B0 8CD1000C */ lw $s1, 0xC($a2) /* 343B34 E00324B4 00A0182D */ daddu $v1, $a1, $zero /* 343B38 E00324B8 24A50008 */ addiu $a1, $a1, 0x8 /* 343B3C E00324BC AE450000 */ sw $a1, 0x0($s2) /* 343B40 E00324C0 8E330034 */ lw $s3, 0x34($s1) /* 343B44 E00324C4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 343B48 E00324C8 AC620000 */ sw $v0, 0x0($v1) /* 343B4C E00324CC AC600004 */ sw $zero, 0x4($v1) /* 343B50 E00324D0 ACA70000 */ sw $a3, 0x0($a1) /* 343B54 E00324D4 8CC30010 */ lw $v1, 0x10($a2) /* 343B58 E00324D8 24A20008 */ addiu $v0, $a1, 0x8 /* 343B5C E00324DC AE420000 */ sw $v0, 0x0($s2) /* 343B60 E00324E0 8C62001C */ lw $v0, 0x1C($v1) /* 343B64 E00324E4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 343B68 E00324E8 00431021 */ addu $v0, $v0, $v1 /* 343B6C E00324EC ACA20004 */ sw $v0, 0x4($a1) /* 343B70 E00324F0 8E250004 */ lw $a1, 0x4($s1) /* 343B74 E00324F4 8E260008 */ lw $a2, 0x8($s1) /* 343B78 E00324F8 8E27000C */ lw $a3, 0xC($s1) /* 343B7C E00324FC 0C080108 */ jal shim_guTranslateF /* 343B80 E0032500 2631003C */ addiu $s1, $s1, 0x3C /* 343B84 E0032504 27B50058 */ addiu $s5, $sp, 0x58 /* 343B88 E0032508 4480B000 */ mtc1 $zero, $f22 /* 343B8C E003250C 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 343B90 E0032510 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 343B94 E0032514 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 343B98 E0032518 4481A000 */ mtc1 $at, $f20 /* 343B9C E003251C 00031080 */ sll $v0, $v1, 2 /* 343BA0 E0032520 00431021 */ addu $v0, $v0, $v1 /* 343BA4 E0032524 00021080 */ sll $v0, $v0, 2 /* 343BA8 E0032528 00431023 */ subu $v0, $v0, $v1 /* 343BAC E003252C 000218C0 */ sll $v1, $v0, 3 /* 343BB0 E0032530 00431021 */ addu $v0, $v0, $v1 /* 343BB4 E0032534 000210C0 */ sll $v0, $v0, 3 /* 343BB8 E0032538 4406B000 */ mfc1 $a2, $f22 /* 343BBC E003253C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 343BC0 E0032540 00220821 */ addu $at, $at, $v0 /* 343BC4 E0032544 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 343BC8 E0032548 4407A000 */ mfc1 $a3, $f20 /* 343BCC E003254C 46000007 */ neg.s $f0, $f0 /* 343BD0 E0032550 44050000 */ mfc1 $a1, $f0 /* 343BD4 E0032554 02A0202D */ daddu $a0, $s5, $zero /* 343BD8 E0032558 0C080104 */ jal shim_guRotateF /* 343BDC E003255C E7B60010 */ swc1 $f22, 0x10($sp) /* 343BE0 E0032560 02A0202D */ daddu $a0, $s5, $zero /* 343BE4 E0032564 27A50018 */ addiu $a1, $sp, 0x18 /* 343BE8 E0032568 0C080114 */ jal shim_guMtxCatF /* 343BEC E003256C 00A0302D */ daddu $a2, $a1, $zero /* 343BF0 E0032570 27A40018 */ addiu $a0, $sp, 0x18 /* 343BF4 E0032574 3C148007 */ lui $s4, %hi(gMatrixListPos) /* 343BF8 E0032578 269441F0 */ addiu $s4, $s4, %lo(gMatrixListPos) /* 343BFC E003257C 3C17800A */ lui $s7, %hi(gDisplayContext) /* 343C00 E0032580 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext) /* 343C04 E0032584 96850000 */ lhu $a1, 0x0($s4) /* 343C08 E0032588 8EE20000 */ lw $v0, 0x0($s7) /* 343C0C E003258C 00052980 */ sll $a1, $a1, 6 /* 343C10 E0032590 00B62821 */ addu $a1, $a1, $s6 /* 343C14 E0032594 0C080118 */ jal shim_guMtxF2L /* 343C18 E0032598 00452821 */ addu $a1, $v0, $a1 /* 343C1C E003259C 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 343C20 E00325A0 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 343C24 E00325A4 8E460000 */ lw $a2, 0x0($s2) /* 343C28 E00325A8 96820000 */ lhu $v0, 0x0($s4) /* 343C2C E00325AC 00C0202D */ daddu $a0, $a2, $zero /* 343C30 E00325B0 24C60008 */ addiu $a2, $a2, 0x8 /* 343C34 E00325B4 AE460000 */ sw $a2, 0x0($s2) /* 343C38 E00325B8 AC830000 */ sw $v1, 0x0($a0) /* 343C3C E00325BC 24430001 */ addiu $v1, $v0, 0x1 /* 343C40 E00325C0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 343C44 E00325C4 00021180 */ sll $v0, $v0, 6 /* 343C48 E00325C8 A6830000 */ sh $v1, 0x0($s4) /* 343C4C E00325CC 8EE30000 */ lw $v1, 0x0($s7) /* 343C50 E00325D0 00561021 */ addu $v0, $v0, $s6 /* 343C54 E00325D4 00621821 */ addu $v1, $v1, $v0 /* 343C58 E00325D8 AC830004 */ sw $v1, 0x4($a0) /* 343C5C E00325DC 8E230000 */ lw $v1, 0x0($s1) /* 343C60 E00325E0 2402FFFF */ addiu $v0, $zero, -0x1 /* 343C64 E00325E4 10620037 */ beq $v1, $v0, .LE00326C4 /* 343C68 E00325E8 27A40018 */ addiu $a0, $sp, 0x18 /* 343C6C E00325EC 3C10DE00 */ lui $s0, (0xDE000000 >> 16) /* 343C70 E00325F0 3C020900 */ lui $v0, %hi(D_09000840_4158A0) /* 343C74 E00325F4 24420840 */ addiu $v0, $v0, %lo(D_09000840_4158A0) /* 343C78 E00325F8 ACD00000 */ sw $s0, 0x0($a2) /* 343C7C E00325FC ACC20004 */ sw $v0, 0x4($a2) /* 343C80 E0032600 8E250020 */ lw $a1, 0x20($s1) /* 343C84 E0032604 4407A000 */ mfc1 $a3, $f20 /* 343C88 E0032608 24C20008 */ addiu $v0, $a2, 0x8 /* 343C8C E003260C AE420000 */ sw $v0, 0x0($s2) /* 343C90 E0032610 0C080110 */ jal shim_guScaleF /* 343C94 E0032614 00A0302D */ daddu $a2, $a1, $zero /* 343C98 E0032618 27A40018 */ addiu $a0, $sp, 0x18 /* 343C9C E003261C 96850000 */ lhu $a1, 0x0($s4) /* 343CA0 E0032620 8EE20000 */ lw $v0, 0x0($s7) /* 343CA4 E0032624 00052980 */ sll $a1, $a1, 6 /* 343CA8 E0032628 00B62821 */ addu $a1, $a1, $s6 /* 343CAC E003262C 0C080118 */ jal shim_guMtxF2L /* 343CB0 E0032630 00452821 */ addu $a1, $v0, $a1 /* 343CB4 E0032634 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 343CB8 E0032638 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 343CBC E003263C 8E440000 */ lw $a0, 0x0($s2) /* 343CC0 E0032640 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 343CC4 E0032644 0080302D */ daddu $a2, $a0, $zero /* 343CC8 E0032648 24840008 */ addiu $a0, $a0, 0x8 /* 343CCC E003264C AE440000 */ sw $a0, 0x0($s2) /* 343CD0 E0032650 ACC20000 */ sw $v0, 0x0($a2) /* 343CD4 E0032654 9225003B */ lbu $a1, 0x3B($s1) /* 343CD8 E0032658 96830000 */ lhu $v1, 0x0($s4) /* 343CDC E003265C 24820008 */ addiu $v0, $a0, 0x8 /* 343CE0 E0032660 AE420000 */ sw $v0, 0x0($s2) /* 343CE4 E0032664 24620001 */ addiu $v0, $v1, 0x1 /* 343CE8 E0032668 A6820000 */ sh $v0, 0x0($s4) /* 343CEC E003266C 24820010 */ addiu $v0, $a0, 0x10 /* 343CF0 E0032670 AE420000 */ sw $v0, 0x0($s2) /* 343CF4 E0032674 24820018 */ addiu $v0, $a0, 0x18 /* 343CF8 E0032678 AE420000 */ sw $v0, 0x0($s2) /* 343CFC E003267C 2402F000 */ addiu $v0, $zero, -0x1000 /* 343D00 E0032680 00A22825 */ or $a1, $a1, $v0 /* 343D04 E0032684 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 343D08 E0032688 3063FFFF */ andi $v1, $v1, 0xFFFF /* 343D0C E003268C 00031980 */ sll $v1, $v1, 6 /* 343D10 E0032690 ACC50004 */ sw $a1, 0x4($a2) /* 343D14 E0032694 AC820000 */ sw $v0, 0x0($a0) /* 343D18 E0032698 8EE20000 */ lw $v0, 0x0($s7) /* 343D1C E003269C 00761821 */ addu $v1, $v1, $s6 /* 343D20 E00326A0 AC900008 */ sw $s0, 0x8($a0) /* 343D24 E00326A4 AC870010 */ sw $a3, 0x10($a0) /* 343D28 E00326A8 00431021 */ addu $v0, $v0, $v1 /* 343D2C E00326AC AC820004 */ sw $v0, 0x4($a0) /* 343D30 E00326B0 3C020900 */ lui $v0, %hi(D_090008F0_415950) /* 343D34 E00326B4 244208F0 */ addiu $v0, $v0, %lo(D_090008F0_415950) /* 343D38 E00326B8 AC82000C */ sw $v0, 0xC($a0) /* 343D3C E00326BC 24020040 */ addiu $v0, $zero, 0x40 /* 343D40 E00326C0 AC820014 */ sw $v0, 0x14($a0) .LE00326C4: /* 343D44 E00326C4 2631003C */ addiu $s1, $s1, 0x3C /* 343D48 E00326C8 27A40018 */ addiu $a0, $sp, 0x18 /* 343D4C E00326CC 8E430000 */ lw $v1, 0x0($s2) /* 343D50 E00326D0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 343D54 E00326D4 0060282D */ daddu $a1, $v1, $zero /* 343D58 E00326D8 ACA20000 */ sw $v0, 0x0($a1) /* 343D5C E00326DC 3C020900 */ lui $v0, %hi(D_09000910_415970) /* 343D60 E00326E0 24420910 */ addiu $v0, $v0, %lo(D_09000910_415970) /* 343D64 E00326E4 ACA20004 */ sw $v0, 0x4($a1) /* 343D68 E00326E8 8E250020 */ lw $a1, 0x20($s1) /* 343D6C E00326EC 24630008 */ addiu $v1, $v1, 0x8 /* 343D70 E00326F0 AE430000 */ sw $v1, 0x0($s2) /* 343D74 E00326F4 00A0302D */ daddu $a2, $a1, $zero /* 343D78 E00326F8 0C080110 */ jal shim_guScaleF /* 343D7C E00326FC 00A0382D */ daddu $a3, $a1, $zero /* 343D80 E0032700 4406B000 */ mfc1 $a2, $f22 /* 343D84 E0032704 02A0202D */ daddu $a0, $s5, $zero /* 343D88 E0032708 E7B40010 */ swc1 $f20, 0x10($sp) /* 343D8C E003270C 8E250028 */ lw $a1, 0x28($s1) /* 343D90 E0032710 0C080104 */ jal shim_guRotateF /* 343D94 E0032714 00C0382D */ daddu $a3, $a2, $zero /* 343D98 E0032718 02A0202D */ daddu $a0, $s5, $zero /* 343D9C E003271C 27A50018 */ addiu $a1, $sp, 0x18 /* 343DA0 E0032720 0C080114 */ jal shim_guMtxCatF /* 343DA4 E0032724 00A0302D */ daddu $a2, $a1, $zero /* 343DA8 E0032728 27A40018 */ addiu $a0, $sp, 0x18 /* 343DAC E003272C 96850000 */ lhu $a1, 0x0($s4) /* 343DB0 E0032730 8EE20000 */ lw $v0, 0x0($s7) /* 343DB4 E0032734 00052980 */ sll $a1, $a1, 6 /* 343DB8 E0032738 00B62821 */ addu $a1, $a1, $s6 /* 343DBC E003273C 0C080118 */ jal shim_guMtxF2L /* 343DC0 E0032740 00452821 */ addu $a1, $v0, $a1 /* 343DC4 E0032744 24020001 */ addiu $v0, $zero, 0x1 /* 343DC8 E0032748 12620006 */ beq $s3, $v0, .LE0032764 /* 343DCC E003274C 24020002 */ addiu $v0, $zero, 0x2 /* 343DD0 E0032750 12620005 */ beq $s3, $v0, .LE0032768 /* 343DD4 E0032754 240400FF */ addiu $a0, $zero, 0xFF /* 343DD8 E0032758 8E240038 */ lw $a0, 0x38($s1) /* 343DDC E003275C 0800C9DB */ j .LE003276C /* 343DE0 E0032760 2A620003 */ slti $v0, $s3, 0x3 .LE0032764: /* 343DE4 E0032764 240400C0 */ addiu $a0, $zero, 0xC0 .LE0032768: /* 343DE8 E0032768 2A620003 */ slti $v0, $s3, 0x3 .LE003276C: /* 343DEC E003276C 14400005 */ bnez $v0, .LE0032784 /* 343DF0 E0032770 240300FF */ addiu $v1, $zero, 0xFF /* 343DF4 E0032774 2A620008 */ slti $v0, $s3, 0x8 /* 343DF8 E0032778 10400002 */ beqz $v0, .LE0032784 /* 343DFC E003277C 00131100 */ sll $v0, $s3, 4 /* 343E00 E0032780 24430080 */ addiu $v1, $v0, 0x80 .LE0032784: /* 343E04 E0032784 3C080001 */ lui $t0, (0x11630 >> 16) /* 343E08 E0032788 35081630 */ ori $t0, $t0, (0x11630 & 0xFFFF) /* 343E0C E003278C 3C0A5555 */ lui $t2, (0x55555556 >> 16) /* 343E10 E0032790 354A5556 */ ori $t2, $t2, (0x55555556 & 0xFFFF) /* 343E14 E0032794 3C09D838 */ lui $t1, (0xD8380002 >> 16) /* 343E18 E0032798 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 343E1C E003279C 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 343E20 E00327A0 35290002 */ ori $t1, $t1, (0xD8380002 & 0xFFFF) /* 343E24 E00327A4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 343E28 E00327A8 306300FF */ andi $v1, $v1, 0xFF /* 343E2C E00327AC 00031A00 */ sll $v1, $v1, 8 /* 343E30 E00327B0 8CC50000 */ lw $a1, 0x0($a2) /* 343E34 E00327B4 026A0018 */ mult $s3, $t2 /* 343E38 E00327B8 00A0382D */ daddu $a3, $a1, $zero /* 343E3C E00327BC 24A50008 */ addiu $a1, $a1, 0x8 /* 343E40 E00327C0 ACC50000 */ sw $a1, 0x0($a2) /* 343E44 E00327C4 ACE20000 */ sw $v0, 0x0($a3) /* 343E48 E00327C8 308200FF */ andi $v0, $a0, 0xFF /* 343E4C E00327CC 3C04FFFF */ lui $a0, (0xFFFF0000 >> 16) /* 343E50 E00327D0 00441025 */ or $v0, $v0, $a0 /* 343E54 E00327D4 00621825 */ or $v1, $v1, $v0 /* 343E58 E00327D8 24A20008 */ addiu $v0, $a1, 0x8 /* 343E5C E00327DC 3C048007 */ lui $a0, %hi(gMatrixListPos) /* 343E60 E00327E0 248441F0 */ addiu $a0, $a0, %lo(gMatrixListPos) /* 343E64 E00327E4 ACE30004 */ sw $v1, 0x4($a3) /* 343E68 E00327E8 ACC20000 */ sw $v0, 0x0($a2) /* 343E6C E00327EC 94820000 */ lhu $v0, 0x0($a0) /* 343E70 E00327F0 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 343E74 E00327F4 ACA30000 */ sw $v1, 0x0($a1) /* 343E78 E00327F8 24430001 */ addiu $v1, $v0, 0x1 /* 343E7C E00327FC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 343E80 E0032800 00021180 */ sll $v0, $v0, 6 /* 343E84 E0032804 A4830000 */ sh $v1, 0x0($a0) /* 343E88 E0032808 3C03800A */ lui $v1, %hi(gDisplayContext) /* 343E8C E003280C 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 343E90 E0032810 00481021 */ addu $v0, $v0, $t0 /* 343E94 E0032814 00621821 */ addu $v1, $v1, $v0 /* 343E98 E0032818 24A20010 */ addiu $v0, $a1, 0x10 /* 343E9C E003281C ACA30004 */ sw $v1, 0x4($a1) /* 343EA0 E0032820 ACC20000 */ sw $v0, 0x0($a2) /* 343EA4 E0032824 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 343EA8 E0032828 ACA20008 */ sw $v0, 0x8($a1) /* 343EAC E003282C 24A20018 */ addiu $v0, $a1, 0x18 /* 343EB0 E0032830 00131FC3 */ sra $v1, $s3, 31 /* 343EB4 E0032834 ACC20000 */ sw $v0, 0x0($a2) /* 343EB8 E0032838 00005810 */ mfhi $t3 /* 343EBC E003283C 01631823 */ subu $v1, $t3, $v1 /* 343EC0 E0032840 00031040 */ sll $v0, $v1, 1 /* 343EC4 E0032844 00431021 */ addu $v0, $v0, $v1 /* 343EC8 E0032848 02621023 */ subu $v0, $s3, $v0 /* 343ECC E003284C 00021080 */ sll $v0, $v0, 2 /* 343ED0 E0032850 3C03E003 */ lui $v1, (0xE00328B0 >> 16) /* 343ED4 E0032854 00621821 */ addu $v1, $v1, $v0 /* 343ED8 E0032858 8C6328B0 */ lw $v1, (0xE00328B0 & 0xFFFF)($v1) /* 343EDC E003285C 24A20020 */ addiu $v0, $a1, 0x20 /* 343EE0 E0032860 ACC20000 */ sw $v0, 0x0($a2) /* 343EE4 E0032864 24020040 */ addiu $v0, $zero, 0x40 /* 343EE8 E0032868 ACA90010 */ sw $t1, 0x10($a1) /* 343EEC E003286C ACA20014 */ sw $v0, 0x14($a1) /* 343EF0 E0032870 ACA90018 */ sw $t1, 0x18($a1) /* 343EF4 E0032874 ACA2001C */ sw $v0, 0x1C($a1) /* 343EF8 E0032878 ACA3000C */ sw $v1, 0xC($a1) /* 343EFC E003287C 8FBF00B8 */ lw $ra, 0xB8($sp) /* 343F00 E0032880 8FB700B4 */ lw $s7, 0xB4($sp) /* 343F04 E0032884 8FB600B0 */ lw $s6, 0xB0($sp) /* 343F08 E0032888 8FB500AC */ lw $s5, 0xAC($sp) /* 343F0C E003288C 8FB400A8 */ lw $s4, 0xA8($sp) /* 343F10 E0032890 8FB300A4 */ lw $s3, 0xA4($sp) /* 343F14 E0032894 8FB200A0 */ lw $s2, 0xA0($sp) /* 343F18 E0032898 8FB1009C */ lw $s1, 0x9C($sp) /* 343F1C E003289C 8FB00098 */ lw $s0, 0x98($sp) /* 343F20 E00328A0 D7B600C8 */ ldc1 $f22, 0xC8($sp) /* 343F24 E00328A4 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* 343F28 E00328A8 03E00008 */ jr $ra /* 343F2C E00328AC 27BD00D0 */ addiu $sp, $sp, 0xD0 ### DECOMPILED C INSTRUCTIONS: void explosion_appendGfx(void* effect) { ExplosionFXData* part = ((EffectInstance*)effect)->data.explosion; s32 unk_34 = part->unk_34; Matrix4f sp18; Matrix4f sp58; s32 primAlpha; s32 primB; s32 cond; 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]); part++; gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (part->unk_00 != -1) { gSPDisplayList(gMainGfxPos++, D_09000840_3447B0); shim_guScaleF(sp18, part->unk_20, part->unk_20, 1.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 240, part->unk_38); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090008F0_344860); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } part++; gSPDisplayList(gMainGfxPos++, D_09000910_344880); shim_guScaleF(sp18, part->unk_20, part->unk_20, part->unk_20); shim_guRotateF(sp58, part->unk_28, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); switch (unk_34) { default: primAlpha = part->unk_38; break; case 2: primAlpha = 255; break; case 1: primAlpha = 192; break; } cond = (unk_34 < 3); // required to match if (!cond && unk_34 < 8) { primB = unk_34 * 16 + 128; } else { primB = 255; } gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, primB, primAlpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E00328B0[unk_34 % 3]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel D_80245980 /* 138CC0 80245980 27BDFF80 */ addiu $sp, $sp, -0x80 .L80245984: /* 138CC4 80245984 AFBE0078 */ sw $fp, 0x78($sp) /* 138CC8 80245988 00C0F02D */ daddu $fp, $a2, $zero flo_08_pad_598C: /* 138CCC 8024598C AFA50084 */ sw $a1, 0x84($sp) D_80245990: /* 138CD0 80245990 24A8008F */ addiu $t0, $a1, 0x8F glabel .L80245994 /* 138CD4 80245994 0100282D */ daddu $a1, $t0, $zero /* 138CD8 80245998 AFB1005C */ sw $s1, 0x5C($sp) /* 138CDC 8024599C 3C118027 */ lui $s1, %hi(gPauseStatsIconIDs) D_802459A0: /* 138CE0 802459A0 26310150 */ addiu $s1, $s1, %lo(gPauseStatsIconIDs) /* 138CE4 802459A4 AFBF007C */ sw $ra, 0x7C($sp) /* 138CE8 802459A8 AFB70074 */ sw $s7, 0x74($sp) /* 138CEC 802459AC AFB60070 */ sw $s6, 0x70($sp) /* 138CF0 802459B0 AFB5006C */ sw $s5, 0x6C($sp) D_802459B4: /* 138CF4 802459B4 AFB40068 */ sw $s4, 0x68($sp) /* 138CF8 802459B8 AFB30064 */ sw $s3, 0x64($sp) /* 138CFC 802459BC AFB20060 */ sw $s2, 0x60($sp) ### DECOMPILED C INSTRUCTIONS: void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { StatsEntryData* statsEntryData; PlayerData* playerData; s16 bootsLevel; s16 hammerLevel; s32 powHudElemID; s32 powIncrements; s32 powIncIdx; s32 curIncrement; b32 drawingFirst; s32 powBarIdx; s32 boxWidth; s16 level; s32 frameCount; s32 powFullBars; // draw coin count hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_COIN], baseX + 143, baseY + 109); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_COIN]); draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_COINS), baseX + 155, baseY + 101, 255, MSG_PAL_STANDARD, 1); draw_number(gPlayerData.coins, baseX + 281, baseY + 101 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 108); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]); // draw star point count hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_STAR_POINT], baseX + 143, baseY + 94); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_STAR_POINT]); draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_STAR_POINTS), baseX + 155, baseY + 86, 255, MSG_PAL_STANDARD, 1); draw_number(gPlayerData.starPoints, baseX + 281, baseY + 86 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 93); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]); // draw star piece count hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_STAR_PIECE], baseX + 143, baseY + 123); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_STAR_PIECE]); draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_STAR_PIECES), baseX + 155, baseY + 116, 255, MSG_PAL_STANDARD, 1); draw_number(gPlayerData.starPieces, baseX + 281, baseY + 116 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 123); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]); // draw HP count pause_draw_menu_label(PAUSE_LBL_HP, baseX + 21, baseY + 35); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_HP], baseX + 52, baseY + 57); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_HP]); draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_HP), baseX + COL_A_X, baseY + ROW_1_Y, 255, MSG_PAL_WHITE, 1); draw_number(gPlayerData.curHP, baseX + 78, baseY + 51, 1, 0, 255, 3); draw_msg(pause_get_menu_msg(PAUSE_MSG_SLASH), baseX + COL_B_X, baseY + ROW_2_Y, 255, MSG_PAL_WHITE, 1); draw_number(gPlayerData.curMaxHP, baseX + COL_C_X, baseY + ROW_2_Y + NUMBER_OFFSET_Y, 1, 0, 255, 3); // draw FP count pause_draw_menu_label(PAUSE_LBL_FP, baseX + 21, baseY + 69); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_FP], baseX + 52, baseY + 92); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_FP]); draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_FP), baseX + COL_A_X, baseY + ROW_3_Y, 255, MSG_PAL_WHITE, 1); draw_number(gPlayerData.curFP, baseX + 78, baseY + 85, 1, MSG_PAL_WHITE, 255, 3); draw_msg(pause_get_menu_msg(PAUSE_MSG_SLASH), baseX + COL_B_X, baseY + ROW_3_Y, 255, MSG_PAL_WHITE, 1); draw_number(gPlayerData.curMaxFP, baseX + COL_C_X, baseY + ROW_3_Y + NUMBER_OFFSET_Y, 1, MSG_PAL_WHITE, 255, 3); // draw BP count pause_draw_menu_label(PAUSE_LBL_BP, baseX + 21, baseY + 103); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_BP], baseX + 52, baseY + 126); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_BP]); draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_BP), baseX + COL_A_X, baseY + ROW_4_Y, 255, MSG_PAL_WHITE, 1); draw_number(gPlayerData.maxBP, baseX + 78, baseY + 119, 1, MSG_PAL_WHITE, 255, 3); #define MINUTE (60 * 60) #define HOUR (MINUTE * 60) // draw play time hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_CLOCK], baseX + 143, baseY + 140); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_CLOCK]); draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_TIME), baseX + 155, baseY + 133, 255, MSG_PAL_STANDARD, 1); frameCount = gPlayerData.frameCounter; if (frameCount >= (100 * HOUR)) { frameCount = (100 * HOUR) - 1; } // draw hours draw_number((frameCount / (10 * HOUR)) % 10, baseX + 237, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); draw_number((frameCount / HOUR) % 10, baseX + 246, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); draw_msg(pause_get_menu_msg(PAUSE_MSG_DOT), baseX + 257, baseY + 132, 255, MSG_PAL_STANDARD, 1); draw_msg(pause_get_menu_msg(PAUSE_MSG_DOT), baseX + 257, baseY + 127, 255, MSG_PAL_STANDARD, 1); // draw minutes draw_number((frameCount / (10 * MINUTE)) % 6, baseX + 264, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); draw_number((frameCount / MINUTE) % 10, baseX + 273, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); bootsLevel = gPlayerData.bootsLevel; hammerLevel = gPlayerData.hammerLevel; level = gPlayerData.level; draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, level >= 10 ? 121 : 113, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); // draw level #if !VERSION_IQUE hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_MARIO], baseX + 61, baseY + 21); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_MARIO]); #endif draw_msg(pause_get_menu_msg(PAUSE_MSG_MARIO), baseX + 16, baseY + 14, 255, MSG_PAL_WHITE, 1); draw_msg(pause_get_menu_msg(PAUSE_MSG_LEVEL), baseX + POS_1_X, baseY + 14, 255, MSG_PAL_WHITE, 1); draw_number(level, baseX + POS_2_X, baseY + 14 + NUMBER_OFFSET_Y, 1, MSG_PAL_WHITE, 255, 2); bootsLevel++; if (bootsLevel < 0) { bootsLevel = 0; } if (bootsLevel > 3) { bootsLevel = 3; } hammerLevel++; if (hammerLevel < 0) { hammerLevel = 0; } if (hammerLevel > 3) { hammerLevel = 3; } pause_draw_menu_label(PAUSE_LBL_BOOTS, baseX + 137, baseY + 10); pause_draw_menu_label(PAUSE_LBL_HAMMER, baseX + 137, baseY + 35); // draw boots hud_element_set_script(gPauseStatsIconIDs[STAT_ICON_BOOTS], gStatsBootsElements[bootsLevel]); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_BOOTS], baseX + 163, baseY + 29); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_BOOTS]); draw_msg(pause_get_menu_msg(gPauseStatsBootsMessages[bootsLevel]), baseX + 176, baseY + 23, 255, MSG_PAL_WHITE, 1); // draw hammer hud_element_set_script(gPauseStatsIconIDs[STAT_ICON_HAMMER], gStatsHammerElements[hammerLevel]); hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_HAMMER], baseX + 163, baseY + 54); hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_HAMMER]); draw_msg(pause_get_menu_msg(gPauseStatsHammerMessages[hammerLevel]), baseX + 176, baseY + 48, 255, MSG_PAL_WHITE, 1); // draw star power bar pause_draw_menu_label(PAUSE_LBL_STATS, baseX + 130, baseY + 69); pause_draw_menu_label(PAUSE_LBL_ENERGY, baseX + 138, baseY + 60); drawingFirst = TRUE; curIncrement = 0; powBarIdx = 0; // which bar of the power meter we're drawing powIncIdx = 0; // which increment of the bar we're drawing powHudElemID = gPauseStatsIconIDs[STAT_ICON_STAR]; // get number of full power increments playerData = &gPlayerData; powFullBars = playerData->specialBarsFilled / 256; powIncrements = playerData->specialBarsFilled % 256; // get remainder in unfilled bar powIncrements /= 32; // subdivide unfilled bar into 8 segments (8 = 256/32) powIncrements += powFullBars * 8; // add 8 increments per full bar // draw filled bars while (TRUE) { if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[0], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[1], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[2], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[3], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[4], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[5], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[6], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } curIncrement++; hud_element_set_script(powHudElemID, gPauseStatsStarElements[powBarIdx]); hud_element_set_render_pos(powHudElemID, baseX + 152 + (powBarIdx * 20), baseY + 77); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; powIncIdx = 0; powBarIdx += 1; if (curIncrement >= powIncrements) { break; } } // get number of total power increments powFullBars = playerData->maxStarPower; powIncrements = 8 * powFullBars; // draw empty bars while (TRUE) { if (curIncrement >= powIncrements) { break; } if (powIncIdx == 0) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[0], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } if (curIncrement >= powIncrements) { break; } powIncIdx++; } if (powIncIdx == 1) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[1], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } } if (powIncIdx == 2) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[2], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } } if (powIncIdx == 3) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[3], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } } if (powIncIdx == 4) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[4], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } } if (powIncIdx == 5) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[5], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } } if (powIncIdx == 6) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[6], baseY + 75); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } } if (powIncIdx == 7) { curIncrement++; hud_element_set_script(powHudElemID, &HES_StatusStarEmpty); hud_element_set_render_pos(powHudElemID, baseX + 152 + (powBarIdx * 20), baseY + 77); if (drawingFirst) { hud_element_draw_without_clipping(powHudElemID); drawingFirst = FALSE; } else { hud_element_draw_next(powHudElemID); } powIncIdx++; if (curIncrement >= powIncrements) { break; } } powIncIdx = 0; powBarIdx++; } if (gPauseMenuCurrentTab == 1) { StatsEntryData* entry = &gStatsMenuEntries[menu->selected]; pause_set_cursor_pos(WINDOW_ID_PAUSE_STATS, baseX + entry->cursorX, baseY + entry->cursorY); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_801363A0 /* CCAA0 801363A0 27BDFFC0 */ addiu $sp, $sp, -0x40 /* CCAA4 801363A4 AFB40038 */ sw $s4, 0x38($sp) /* CCAA8 801363A8 0080A02D */ daddu $s4, $a0, $zero /* CCAAC 801363AC AFBF003C */ sw $ra, 0x3C($sp) /* CCAB0 801363B0 AFB30034 */ sw $s3, 0x34($sp) /* CCAB4 801363B4 AFB20030 */ sw $s2, 0x30($sp) /* CCAB8 801363B8 AFB1002C */ sw $s1, 0x2C($sp) /* CCABC 801363BC AFB00028 */ sw $s0, 0x28($sp) /* CCAC0 801363C0 86820018 */ lh $v0, 0x18($s4) /* CCAC4 801363C4 3C038008 */ lui $v1, %hi(gItemTable) /* CCAC8 801363C8 246378E0 */ addiu $v1, $v1, %lo(gItemTable) /* CCACC 801363CC 00021140 */ sll $v0, $v0, 5 /* CCAD0 801363D0 00432021 */ addu $a0, $v0, $v1 /* CCAD4 801363D4 8283001A */ lb $v1, 0x1A($s4) /* CCAD8 801363D8 2402000A */ addiu $v0, $zero, 0xA /* CCADC 801363DC 1062000C */ beq $v1, $v0, .L80136410 /* CCAE0 801363E0 2862000B */ slti $v0, $v1, 0xB /* CCAE4 801363E4 10400005 */ beqz $v0, .L801363FC /* CCAE8 801363E8 24020002 */ addiu $v0, $zero, 0x2 /* CCAEC 801363EC 10620008 */ beq $v1, $v0, .L80136410 /* CCAF0 801363F0 00000000 */ nop /* CCAF4 801363F4 0804D9C7 */ j .L8013671C /* CCAF8 801363F8 00000000 */ nop .L801363FC: /* CCAFC 801363FC 2402000C */ addiu $v0, $zero, 0xC /* CCB00 80136400 106200AC */ beq $v1, $v0, .L801366B4 /* CCB04 80136404 00000000 */ nop /* CCB08 80136408 0804D9C7 */ j .L8013671C /* CCB0C 8013640C 00000000 */ nop .L80136410: /* CCB10 80136410 94820018 */ lhu $v0, 0x18($a0) /* CCB14 80136414 30420040 */ andi $v0, $v0, 0x40 /* CCB18 80136418 1440003B */ bnez $v0, .L80136508 /* CCB1C 8013641C 3C030400 */ lui $v1, (0x4000000 >> 16) /* CCB20 80136420 8E820000 */ lw $v0, 0x0($s4) /* CCB24 80136424 00431024 */ and $v0, $v0, $v1 /* CCB28 80136428 10400005 */ beqz $v0, .L80136440 /* CCB2C 8013642C 3C12001D */ lui $s2, (0x1D0058 >> 16) /* CCB30 80136430 96820006 */ lhu $v0, 0x6($s4) /* CCB34 80136434 30420004 */ andi $v0, $v0, 0x4 /* CCB38 80136438 50400002 */ beql $v0, $zero, .L80136444 /* CCB3C 8013643C 3652005A */ ori $s2, $s2, (0x1D005A & 0xFFFF) .L80136440: /* CCB40 80136440 36520058 */ ori $s2, $s2, (0x1D0058 & 0xFFFF) .L80136444: /* CCB44 80136444 96830006 */ lhu $v1, 0x6($s4) /* CCB48 80136448 30620010 */ andi $v0, $v1, 0x10 /* CCB4C 8013644C 10400003 */ beqz $v0, .L8013645C /* CCB50 80136450 30620020 */ andi $v0, $v1, 0x20 /* CCB54 80136454 3C12001D */ lui $s2, (0x1D005D >> 16) /* CCB58 80136458 3652005D */ ori $s2, $s2, (0x1D005D & 0xFFFF) .L8013645C: /* CCB5C 8013645C 10400003 */ beqz $v0, .L8013646C /* CCB60 80136460 30620040 */ andi $v0, $v1, 0x40 /* CCB64 80136464 3C12001D */ lui $s2, (0x1D005E >> 16) /* CCB68 80136468 3652005E */ ori $s2, $s2, (0x1D005E & 0xFFFF) .L8013646C: /* CCB6C 8013646C 10400003 */ beqz $v0, .L8013647C /* CCB70 80136470 00000000 */ nop /* CCB74 80136474 3C12001D */ lui $s2, (0x1D005C >> 16) /* CCB78 80136478 3652005C */ ori $s2, $s2, (0x1D005C & 0xFFFF) .L8013647C: /* CCB7C 8013647C 8C840000 */ lw $a0, 0x0($a0) /* CCB80 80136480 0C0496CF */ jal set_message_msg /* CCB84 80136484 0000282D */ daddu $a1, $zero, $zero /* CCB88 80136488 86840018 */ lh $a0, 0x18($s4) /* CCB8C 8013648C 00041140 */ sll $v0, $a0, 5 /* CCB90 80136490 3C038008 */ lui $v1, %hi(gItemTable + 0x18) /* CCB94 80136494 00621821 */ addu $v1, $v1, $v0 /* CCB98 80136498 946378F8 */ lhu $v1, %lo(gItemTable + 0x18)($v1) /* CCB9C 8013649C 30620008 */ andi $v0, $v1, 0x8 /* CCBA0 801364A0 5440000F */ bnel $v0, $zero, .L801364E0 /* CCBA4 801364A4 0240202D */ daddu $a0, $s2, $zero /* CCBA8 801364A8 2402015C */ addiu $v0, $zero, 0x15C /* CCBAC 801364AC 1082000B */ beq $a0, $v0, .L801364DC /* CCBB0 801364B0 30620020 */ andi $v0, $v1, 0x20 /* CCBB4 801364B4 1440000A */ bnez $v0, .L801364E0 /* CCBB8 801364B8 0240202D */ daddu $a0, $s2, $zero /* CCBBC 801364BC 96820006 */ lhu $v0, 0x6($s4) /* CCBC0 801364C0 30420030 */ andi $v0, $v0, 0x30 /* CCBC4 801364C4 14400006 */ bnez $v0, .L801364E0 /* CCBC8 801364C8 00000000 */ nop /* CCBCC 801364CC 0C04991D */ jal get_msg_width /* CCBD0 801364D0 0000282D */ daddu $a1, $zero, $zero /* CCBD4 801364D4 0804D93B */ j .L801364EC /* CCBD8 801364D8 24500036 */ addiu $s0, $v0, 0x36 .L801364DC: /* CCBDC 801364DC 0240202D */ daddu $a0, $s2, $zero .L801364E0: /* CCBE0 801364E0 0C04991D */ jal get_msg_width /* CCBE4 801364E4 0000282D */ daddu $a1, $zero, $zero /* CCBE8 801364E8 2450001E */ addiu $s0, $v0, 0x1E .L801364EC: /* CCBEC 801364EC 001017C2 */ srl $v0, $s0, 31 /* CCBF0 801364F0 02021021 */ addu $v0, $s0, $v0 /* CCBF4 801364F4 00021043 */ sra $v0, $v0, 1 /* CCBF8 801364F8 240300A0 */ addiu $v1, $zero, 0xA0 /* CCBFC 801364FC 00628823 */ subu $s1, $v1, $v0 /* CCC00 80136500 0804D966 */ j .L80136598 /* CCC04 80136504 2413004C */ addiu $s3, $zero, 0x4C .L80136508: /* CCC08 80136508 8E820000 */ lw $v0, 0x0($s4) /* CCC0C 8013650C 00431024 */ and $v0, $v0, $v1 /* CCC10 80136510 10400005 */ beqz $v0, .L80136528 /* CCC14 80136514 3C12001D */ lui $s2, (0x1D0059 >> 16) /* CCC18 80136518 96820006 */ lhu $v0, 0x6($s4) /* CCC1C 8013651C 30420004 */ andi $v0, $v0, 0x4 /* CCC20 80136520 50400002 */ beql $v0, $zero, .L8013652C /* CCC24 80136524 3652005B */ ori $s2, $s2, (0x1D005B & 0xFFFF) .L80136528: /* CCC28 80136528 36520059 */ ori $s2, $s2, (0x1D0059 & 0xFFFF) .L8013652C: /* CCC2C 8013652C 96830006 */ lhu $v1, 0x6($s4) /* CCC30 80136530 30620010 */ andi $v0, $v1, 0x10 /* CCC34 80136534 10400003 */ beqz $v0, .L80136544 /* CCC38 80136538 30620020 */ andi $v0, $v1, 0x20 /* CCC3C 8013653C 3C12001D */ lui $s2, (0x1D005D >> 16) /* CCC40 80136540 3652005D */ ori $s2, $s2, (0x1D005D & 0xFFFF) .L80136544: /* CCC44 80136544 10400003 */ beqz $v0, .L80136554 /* CCC48 80136548 30620040 */ andi $v0, $v1, 0x40 /* CCC4C 8013654C 3C12001D */ lui $s2, (0x1D005E >> 16) /* CCC50 80136550 3652005E */ ori $s2, $s2, (0x1D005E & 0xFFFF) .L80136554: /* CCC54 80136554 10400003 */ beqz $v0, .L80136564 /* CCC58 80136558 00000000 */ nop /* CCC5C 8013655C 3C12001D */ lui $s2, (0x1D005C >> 16) /* CCC60 80136560 3652005C */ ori $s2, $s2, (0x1D005C & 0xFFFF) .L80136564: /* CCC64 80136564 8C840000 */ lw $a0, 0x0($a0) /* CCC68 80136568 0000282D */ daddu $a1, $zero, $zero /* CCC6C 8013656C 0C0496CF */ jal set_message_msg /* CCC70 80136570 2413004C */ addiu $s3, $zero, 0x4C /* CCC74 80136574 0240202D */ daddu $a0, $s2, $zero /* CCC78 80136578 0C04991D */ jal get_msg_width /* CCC7C 8013657C 0000282D */ daddu $a1, $zero, $zero /* CCC80 80136580 2450001E */ addiu $s0, $v0, 0x1E /* CCC84 80136584 001017C2 */ srl $v0, $s0, 31 /* CCC88 80136588 02021021 */ addu $v0, $s0, $v0 /* CCC8C 8013658C 00021043 */ sra $v0, $v0, 1 /* CCC90 80136590 240300A0 */ addiu $v1, $zero, 0xA0 /* CCC94 80136594 00628823 */ subu $s1, $v1, $v0 .L80136598: /* CCC98 80136598 0C04992C */ jal get_msg_lines /* CCC9C 8013659C 0240202D */ daddu $a0, $s2, $zero /* CCCA0 801365A0 2442FFFF */ addiu $v0, $v0, -0x1 /* CCCA4 801365A4 00021040 */ sll $v0, $v0, 1 /* CCCA8 801365A8 24040002 */ addiu $a0, $zero, 0x2 /* CCCAC 801365AC 8283001A */ lb $v1, 0x1A($s4) /* CCCB0 801365B0 3C088015 */ lui $t0, %hi(PickupHeaderWindowHeight) /* CCCB4 801365B4 01024021 */ addu $t0, $t0, $v0 /* CCCB8 801365B8 8508C6E0 */ lh $t0, %lo(PickupHeaderWindowHeight)($t0) /* CCCBC 801365BC 10640002 */ beq $v1, $a0, .L801365C8 /* CCCC0 801365C0 0000302D */ daddu $a2, $zero, $zero /* CCCC4 801365C4 2406001C */ addiu $a2, $zero, 0x1C .L801365C8: /* CCCC8 801365C8 86840018 */ lh $a0, 0x18($s4) /* CCCCC 801365CC 00041140 */ sll $v0, $a0, 5 /* CCCD0 801365D0 3C038008 */ lui $v1, %hi(gItemTable + 0x18) /* CCCD4 801365D4 00621821 */ addu $v1, $v1, $v0 /* CCCD8 801365D8 946378F8 */ lhu $v1, %lo(gItemTable + 0x18)($v1) /* CCCDC 801365DC 2404000C */ addiu $a0, $zero, 0xC /* CCCE0 801365E0 0220282D */ daddu $a1, $s1, $zero /* CCCE4 801365E4 24C6FFE8 */ addiu $a2, $a2, -0x18 /* CCCE8 801365E8 02663021 */ addu $a2, $s3, $a2 /* CCCEC 801365EC 0200382D */ daddu $a3, $s0, $zero /* CCCF0 801365F0 3C028013 */ lui $v0, %hi(draw_content_pickup_item_header) /* CCCF4 801365F4 2442673C */ addiu $v0, $v0, %lo(draw_content_pickup_item_header) /* CCCF8 801365F8 AFA20018 */ sw $v0, 0x18($sp) /* CCCFC 801365FC 2402FFFF */ addiu $v0, $zero, -0x1 /* CCD00 80136600 AFA80010 */ sw $t0, 0x10($sp) /* CCD04 80136604 AFA00014 */ sw $zero, 0x14($sp) /* CCD08 80136608 AFB4001C */ sw $s4, 0x1C($sp) /* CCD0C 8013660C 0C051F32 */ jal set_window_properties /* CCD10 80136610 AFA20020 */ sw $v0, 0x20($sp) /* CCD14 80136614 86830018 */ lh $v1, 0x18($s4) /* CCD18 80136618 2402015C */ addiu $v0, $zero, 0x15C /* CCD1C 8013661C 10620010 */ beq $v1, $v0, .L80136660 /* CCD20 80136620 24020157 */ addiu $v0, $zero, 0x157 /* CCD24 80136624 1062000E */ beq $v1, $v0, .L80136660 /* CCD28 80136628 24040013 */ addiu $a0, $zero, 0x13 /* CCD2C 8013662C 24050014 */ addiu $a1, $zero, 0x14 /* CCD30 80136630 240600BA */ addiu $a2, $zero, 0xBA /* CCD34 80136634 24070118 */ addiu $a3, $zero, 0x118 /* CCD38 80136638 24020020 */ addiu $v0, $zero, 0x20 /* CCD3C 8013663C AFA20010 */ sw $v0, 0x10($sp) /* CCD40 80136640 3C028013 */ lui $v0, %hi(draw_content_pickup_item_desc) /* CCD44 80136644 24426A08 */ addiu $v0, $v0, %lo(draw_content_pickup_item_desc) /* CCD48 80136648 AFA20018 */ sw $v0, 0x18($sp) /* CCD4C 8013664C 2402FFFF */ addiu $v0, $zero, -0x1 /* CCD50 80136650 AFA00014 */ sw $zero, 0x14($sp) /* CCD54 80136654 AFB4001C */ sw $s4, 0x1C($sp) /* CCD58 80136658 0C051F32 */ jal set_window_properties /* CCD5C 8013665C AFA20020 */ sw $v0, 0x20($sp) .L80136660: /* CCD60 80136660 8283001A */ lb $v1, 0x1A($s4) /* CCD64 80136664 24020002 */ addiu $v0, $zero, 0x2 /* CCD68 80136668 1062002C */ beq $v1, $v0, .L8013671C /* CCD6C 8013666C 3C04001D */ lui $a0, (0x1D0060 >> 16) /* CCD70 80136670 34840060 */ ori $a0, $a0, (0x1D0060 & 0xFFFF) /* CCD74 80136674 0C04991D */ jal get_msg_width /* CCD78 80136678 0000282D */ daddu $a1, $zero, $zero /* CCD7C 8013667C 24500018 */ addiu $s0, $v0, 0x18 /* CCD80 80136680 24040011 */ addiu $a0, $zero, 0x11 /* CCD84 80136684 00102FC2 */ srl $a1, $s0, 31 /* CCD88 80136688 02052821 */ addu $a1, $s0, $a1 /* CCD8C 8013668C 00052843 */ sra $a1, $a1, 1 /* CCD90 80136690 240200A0 */ addiu $v0, $zero, 0xA0 /* CCD94 80136694 00452823 */ subu $a1, $v0, $a1 /* CCD98 80136698 24060024 */ addiu $a2, $zero, 0x24 /* CCD9C 8013669C 24020028 */ addiu $v0, $zero, 0x28 /* CCDA0 801366A0 AFA20010 */ sw $v0, 0x10($sp) /* CCDA4 801366A4 3C028013 */ lui $v0, %hi(draw_content_cant_carry_more) /* CCDA8 801366A8 244269D0 */ addiu $v0, $v0, %lo(draw_content_cant_carry_more) /* CCDAC 801366AC 0804D9C1 */ j .L80136704 /* CCDB0 801366B0 0200382D */ daddu $a3, $s0, $zero .L801366B4: /* CCDB4 801366B4 8C840000 */ lw $a0, 0x0($a0) /* CCDB8 801366B8 0C0496CF */ jal set_message_msg /* CCDBC 801366BC 0000282D */ daddu $a1, $zero, $zero /* CCDC0 801366C0 3C04001D */ lui $a0, (0x1D005F >> 16) /* CCDC4 801366C4 3484005F */ ori $a0, $a0, (0x1D005F & 0xFFFF) /* CCDC8 801366C8 0C04991D */ jal get_msg_width /* CCDCC 801366CC 0000282D */ daddu $a1, $zero, $zero /* CCDD0 801366D0 24500036 */ addiu $s0, $v0, 0x36 /* CCDD4 801366D4 2404000C */ addiu $a0, $zero, 0xC /* CCDD8 801366D8 00102FC2 */ srl $a1, $s0, 31 /* CCDDC 801366DC 02052821 */ addu $a1, $s0, $a1 /* CCDE0 801366E0 00052843 */ sra $a1, $a1, 1 /* CCDE4 801366E4 240200A0 */ addiu $v0, $zero, 0xA0 /* CCDE8 801366E8 00452823 */ subu $a1, $v0, $a1 /* CCDEC 801366EC 2406004C */ addiu $a2, $zero, 0x4C /* CCDF0 801366F0 0200382D */ daddu $a3, $s0, $zero /* CCDF4 801366F4 24020028 */ addiu $v0, $zero, 0x28 /* CCDF8 801366F8 AFA20010 */ sw $v0, 0x10($sp) /* CCDFC 801366FC 3C028013 */ lui $v0, %hi(draw_content_pickup_item_header) /* CCE00 80136700 2442673C */ addiu $v0, $v0, %lo(draw_content_pickup_item_header) .L80136704: /* CCE04 80136704 AFA20018 */ sw $v0, 0x18($sp) /* CCE08 80136708 2402FFFF */ addiu $v0, $zero, -0x1 /* CCE0C 8013670C AFA00014 */ sw $zero, 0x14($sp) /* CCE10 80136710 AFB4001C */ sw $s4, 0x1C($sp) /* CCE14 80136714 0C051F32 */ jal set_window_properties /* CCE18 80136718 AFA20020 */ sw $v0, 0x20($sp) .L8013671C: /* CCE1C 8013671C 8FBF003C */ lw $ra, 0x3C($sp) /* CCE20 80136720 8FB40038 */ lw $s4, 0x38($sp) /* CCE24 80136724 8FB30034 */ lw $s3, 0x34($sp) /* CCE28 80136728 8FB20030 */ lw $s2, 0x30($sp) /* CCE2C 8013672C 8FB1002C */ lw $s1, 0x2C($sp) /* CCE30 80136730 8FB00028 */ lw $s0, 0x28($sp) /* CCE34 80136734 03E00008 */ jr $ra /* CCE38 80136738 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void func_801363A0(ItemEntity* item) { ItemData* itemData = &gItemTable[item->itemID]; s32 itemMsg; s32 width; s32 posX; s32 offsetY; s32 posY; s32 height; s32 v1; switch (item->state) { case ITEM_PICKUP_STATE_SHOW_GOT_ITEM: case ITEM_PICKUP_STATE_SHOW_TOO_MANY: if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BADGE)) { if (!(item->flags & ITEM_ENTITY_FLAG_4000000) || (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNKNOWN)) { itemMsg = MSG_Menus_0058; } else { itemMsg = MSG_Menus_005A; } if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_1_COIN) { itemMsg = MSG_Menus_005D; } if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_3_STAR_PIECES) { itemMsg = MSG_Menus_005E; } if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNIQUE) { itemMsg = MSG_Menus_005C; } set_message_msg(itemData->nameMsg, 0); if (!(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) && item->itemID != ITEM_STAR_PIECE && !(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) && !(item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES))) { width = get_msg_width(itemMsg, 0) + 54; } else { width = get_msg_width(itemMsg, 0) + 30; } posX = 160 - width / 2; posY = 76; } else { if (!(item->flags & ITEM_ENTITY_FLAG_4000000) || (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNKNOWN)) { itemMsg = MSG_Menus_0059; } else { itemMsg = MSG_Menus_005B; } if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_1_COIN) { itemMsg = MSG_Menus_005D; } if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_3_STAR_PIECES) { itemMsg = MSG_Menus_005E; } if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNIQUE) { itemMsg = MSG_Menus_005C; } set_message_msg(itemData->nameMsg, 0); width = get_msg_width(itemMsg, 0) + 30; posX = 160 - width / 2; posY = 76; } height = PickupHeaderWindowHeight[get_msg_lines(itemMsg) - 1]; if (item->state != ITEM_PICKUP_STATE_SHOW_GOT_ITEM) { offsetY = 28; } else { offsetY = 0; } if ( !(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) && !(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) && !(item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES) && item->itemID != ITEM_STAR_PIECE) ) { set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } else if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_WORLD_USABLE){ set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } else { set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } if (item->itemID != ITEM_STAR_PIECE && item->itemID != ITEM_COIN) { set_window_properties(WINDOW_ID_19, 20, 186, 280, 32, WINDOW_PRIORITY_0, draw_content_pickup_item_desc, item, -1); } if (item->state != ITEM_PICKUP_STATE_SHOW_GOT_ITEM) { width = get_msg_width(MSG_Menus_0060, 0) + 24; posX = 160 - width / 2; set_window_properties(WINDOW_ID_17, 160 - width / 2, 36, width, 40, WINDOW_PRIORITY_0, draw_content_cant_carry_more, item, -1); } break; case ITEM_PICKUP_STATE_AWAIT_THROW_AWAY: set_message_msg(itemData->nameMsg, 0); width = get_msg_width(MSG_Menus_005F, 0) + 54; posX = 160 - width / 2; set_window_properties(WINDOW_ID_12, 160 - width / 2, 76, width, 40, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel energy_orb_wave_update /* 3A398C E00A41AC 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 3A3990 E00A41B0 AFBF0018 */ sw $ra, 0x18($sp) /* 3A3994 E00A41B4 AFB10014 */ sw $s1, 0x14($sp) /* 3A3998 E00A41B8 AFB00010 */ sw $s0, 0x10($sp) /* 3A399C E00A41BC 8C830000 */ lw $v1, 0x0($a0) /* 3A39A0 E00A41C0 8C90000C */ lw $s0, 0xC($a0) /* 3A39A4 E00A41C4 30620010 */ andi $v0, $v1, 0x10 /* 3A39A8 E00A41C8 10400005 */ beqz $v0, .LE00A41E0 /* 3A39AC E00A41CC 2402FFEF */ addiu $v0, $zero, -0x11 /* 3A39B0 E00A41D0 00621024 */ and $v0, $v1, $v0 /* 3A39B4 E00A41D4 AC820000 */ sw $v0, 0x0($a0) /* 3A39B8 E00A41D8 2402001E */ addiu $v0, $zero, 0x1E /* 3A39BC E00A41DC AE020010 */ sw $v0, 0x10($s0) .LE00A41E0: /* 3A39C0 E00A41E0 8E030010 */ lw $v1, 0x10($s0) /* 3A39C4 E00A41E4 28620064 */ slti $v0, $v1, 0x64 /* 3A39C8 E00A41E8 10400002 */ beqz $v0, .LE00A41F4 /* 3A39CC E00A41EC 2462FFFF */ addiu $v0, $v1, -0x1 /* 3A39D0 E00A41F0 AE020010 */ sw $v0, 0x10($s0) .LE00A41F4: /* 3A39D4 E00A41F4 8E020014 */ lw $v0, 0x14($s0) /* 3A39D8 E00A41F8 8E050010 */ lw $a1, 0x10($s0) /* 3A39DC E00A41FC 24420001 */ addiu $v0, $v0, 0x1 /* 3A39E0 E00A4200 04A10005 */ bgez $a1, .LE00A4218 /* 3A39E4 E00A4204 AE020014 */ sw $v0, 0x14($s0) /* 3A39E8 E00A4208 0C080128 */ jal shim_remove_effect /* 3A39EC E00A420C 00000000 */ nop /* 3A39F0 E00A4210 08029172 */ j .LE00A45C8 /* 3A39F4 E00A4214 00000000 */ nop .LE00A4218: /* 3A39F8 E00A4218 241100FF */ addiu $s1, $zero, 0xFF /* 3A39FC E00A421C 0040182D */ daddu $v1, $v0, $zero /* 3A3A00 E00A4220 8E04001C */ lw $a0, 0x1C($s0) /* 3A3A04 E00A4224 28620010 */ slti $v0, $v1, 0x10 /* 3A3A08 E00A4228 10400003 */ beqz $v0, .LE00A4238 /* 3A3A0C E00A422C 0220302D */ daddu $a2, $s1, $zero /* 3A3A10 E00A4230 00031100 */ sll $v0, $v1, 4 /* 3A3A14 E00A4234 2451FFFF */ addiu $s1, $v0, -0x1 .LE00A4238: /* 3A3A18 E00A4238 28A20010 */ slti $v0, $a1, 0x10 /* 3A3A1C E00A423C 10400008 */ beqz $v0, .LE00A4260 /* 3A3A20 E00A4240 2C82000A */ sltiu $v0, $a0, 0xA /* 3A3A24 E00A4244 02250018 */ mult $s1, $a1 /* 3A3A28 E00A4248 00001012 */ mflo $v0 /* 3A3A2C E00A424C 04420001 */ bltzl $v0, .LE00A4254 /* 3A3A30 E00A4250 2442000F */ addiu $v0, $v0, 0xF .LE00A4254: /* 3A3A34 E00A4254 00028903 */ sra $s1, $v0, 4 /* 3A3A38 E00A4258 00053100 */ sll $a2, $a1, 4 /* 3A3A3C E00A425C 2C82000A */ sltiu $v0, $a0, 0xA .LE00A4260: /* 3A3A40 E00A4260 104000C4 */ beqz $v0, .LE00A4574 /* 3A3A44 E00A4264 00041080 */ sll $v0, $a0, 2 /* 3A3A48 E00A4268 3C01E00A */ lui $at, (0xE00A4AF8 >> 16) /* 3A3A4C E00A426C 00220821 */ addu $at, $at, $v0 /* 3A3A50 E00A4270 8C224AF8 */ lw $v0, (0xE00A4AF8 & 0xFFFF)($at) /* 3A3A54 E00A4274 00400008 */ jr $v0 /* 3A3A58 E00A4278 00000000 */ nop /* 3A3A5C E00A427C 00031040 */ sll $v0, $v1, 1 /* 3A3A60 E00A4280 44826000 */ mtc1 $v0, $f12 /* 3A3A64 E00A4284 00000000 */ nop /* 3A3A68 E00A4288 46806320 */ cvt.s.w $f12, $f12 /* 3A3A6C E00A428C 24020046 */ addiu $v0, $zero, 0x46 /* 3A3A70 E00A4290 AE020020 */ sw $v0, 0x20($s0) /* 3A3A74 E00A4294 240200B4 */ addiu $v0, $zero, 0xB4 /* 3A3A78 E00A4298 AE020024 */ sw $v0, 0x24($s0) /* 3A3A7C E00A429C 24020078 */ addiu $v0, $zero, 0x78 /* 3A3A80 E00A42A0 0C080140 */ jal shim_sin_deg /* 3A3A84 E00A42A4 AE020028 */ sw $v0, 0x28($s0) /* 3A3A88 E00A42A8 3C014120 */ lui $at, (0x41200000 >> 16) /* 3A3A8C E00A42AC 44811000 */ mtc1 $at, $f2 /* 3A3A90 E00A42B0 00000000 */ nop /* 3A3A94 E00A42B4 46020002 */ mul.s $f0, $f0, $f2 /* 3A3A98 E00A42B8 00000000 */ nop /* 3A3A9C E00A42BC 3C01433E */ lui $at, (0x433E0000 >> 16) /* 3A3AA0 E00A42C0 44811000 */ mtc1 $at, $f2 /* 3A3AA4 E00A42C4 080290F4 */ j .LE00A43D0 /* 3A3AA8 E00A42C8 46020000 */ add.s $f0, $f0, $f2 /* 3A3AAC E00A42CC 240500FF */ addiu $a1, $zero, 0xFF /* 3A3AB0 E00A42D0 02250018 */ mult $s1, $a1 /* 3A3AB4 E00A42D4 3C048080 */ lui $a0, (0x80808081 >> 16) /* 3A3AB8 E00A42D8 00001812 */ mflo $v1 /* 3A3ABC E00A42DC 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* 3A3AC0 E00A42E0 24020046 */ addiu $v0, $zero, 0x46 /* 3A3AC4 E00A42E4 00640018 */ mult $v1, $a0 /* 3A3AC8 E00A42E8 AE020020 */ sw $v0, 0x20($s0) /* 3A3ACC E00A42EC 240200E6 */ addiu $v0, $zero, 0xE6 /* 3A3AD0 E00A42F0 AE050024 */ sw $a1, 0x24($s0) /* 3A3AD4 E00A42F4 AE020028 */ sw $v0, 0x28($s0) /* 3A3AD8 E00A42F8 00003010 */ mfhi $a2 /* 3A3ADC E00A42FC 0802916E */ j .LE00A45B8 /* 3A3AE0 E00A4300 00C31021 */ addu $v0, $a2, $v1 /* 3A3AE4 E00A4304 00031040 */ sll $v0, $v1, 1 /* 3A3AE8 E00A4308 44826000 */ mtc1 $v0, $f12 /* 3A3AEC E00A430C 00000000 */ nop /* 3A3AF0 E00A4310 46806320 */ cvt.s.w $f12, $f12 /* 3A3AF4 E00A4314 240200AA */ addiu $v0, $zero, 0xAA /* 3A3AF8 E00A4318 AE020020 */ sw $v0, 0x20($s0) /* 3A3AFC E00A431C 24020028 */ addiu $v0, $zero, 0x28 /* 3A3B00 E00A4320 AE020024 */ sw $v0, 0x24($s0) /* 3A3B04 E00A4324 2402006E */ addiu $v0, $zero, 0x6E /* 3A3B08 E00A4328 0C080140 */ jal shim_sin_deg /* 3A3B0C E00A432C AE020028 */ sw $v0, 0x28($s0) /* 3A3B10 E00A4330 3C014120 */ lui $at, (0x41200000 >> 16) /* 3A3B14 E00A4334 44811000 */ mtc1 $at, $f2 /* 3A3B18 E00A4338 00000000 */ nop /* 3A3B1C E00A433C 46020002 */ mul.s $f0, $f0, $f2 /* 3A3B20 E00A4340 00000000 */ nop /* 3A3B24 E00A4344 3C01433E */ lui $at, (0x433E0000 >> 16) /* 3A3B28 E00A4348 44811000 */ mtc1 $at, $f2 /* 3A3B2C E00A434C 080290F4 */ j .LE00A43D0 /* 3A3B30 E00A4350 46020000 */ add.s $f0, $f0, $f2 /* 3A3B34 E00A4354 240300FF */ addiu $v1, $zero, 0xFF /* 3A3B38 E00A4358 02230018 */ mult $s1, $v1 /* 3A3B3C E00A435C 3C048080 */ lui $a0, (0x80808081 >> 16) /* 3A3B40 E00A4360 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* 3A3B44 E00A4364 00001812 */ mflo $v1 /* 3A3B48 E00A4368 240200DC */ addiu $v0, $zero, 0xDC /* 3A3B4C E00A436C AE020020 */ sw $v0, 0x20($s0) /* 3A3B50 E00A4370 00640018 */ mult $v1, $a0 /* 3A3B54 E00A4374 24020028 */ addiu $v0, $zero, 0x28 /* 3A3B58 E00A4378 AE020024 */ sw $v0, 0x24($s0) /* 3A3B5C E00A437C 0802916B */ j .LE00A45AC /* 3A3B60 E00A4380 240200AA */ addiu $v0, $zero, 0xAA /* 3A3B64 E00A4384 00031040 */ sll $v0, $v1, 1 /* 3A3B68 E00A4388 44826000 */ mtc1 $v0, $f12 /* 3A3B6C E00A438C 00000000 */ nop /* 3A3B70 E00A4390 46806320 */ cvt.s.w $f12, $f12 /* 3A3B74 E00A4394 240200EB */ addiu $v0, $zero, 0xEB /* 3A3B78 E00A4398 AE020020 */ sw $v0, 0x20($s0) /* 3A3B7C E00A439C AE020024 */ sw $v0, 0x24($s0) /* 3A3B80 E00A43A0 240200C8 */ addiu $v0, $zero, 0xC8 /* 3A3B84 E00A43A4 0C080140 */ jal shim_sin_deg /* 3A3B88 E00A43A8 AE020028 */ sw $v0, 0x28($s0) /* 3A3B8C E00A43AC 3C014170 */ lui $at, (0x41700000 >> 16) /* 3A3B90 E00A43B0 44811000 */ mtc1 $at, $f2 /* 3A3B94 E00A43B4 00000000 */ nop /* 3A3B98 E00A43B8 46020002 */ mul.s $f0, $f0, $f2 /* 3A3B9C E00A43BC 00000000 */ nop /* 3A3BA0 E00A43C0 3C014357 */ lui $at, (0x43570000 >> 16) /* 3A3BA4 E00A43C4 44811000 */ mtc1 $at, $f2 /* 3A3BA8 E00A43C8 00000000 */ nop /* 3A3BAC E00A43CC 46020000 */ add.s $f0, $f0, $f2 .LE00A43D0: /* 3A3BB0 E00A43D0 4600010D */ trunc.w.s $f4, $f0 /* 3A3BB4 E00A43D4 44022000 */ mfc1 $v0, $f4 /* 3A3BB8 E00A43D8 00000000 */ nop /* 3A3BBC E00A43DC 00510018 */ mult $v0, $s1 /* 3A3BC0 E00A43E0 00001012 */ mflo $v0 /* 3A3BC4 E00A43E4 3C038080 */ lui $v1, (0x80808081 >> 16) /* 3A3BC8 E00A43E8 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF) /* 3A3BCC E00A43EC 00430018 */ mult $v0, $v1 /* 3A3BD0 E00A43F0 00001810 */ mfhi $v1 /* 3A3BD4 E00A43F4 00621821 */ addu $v1, $v1, $v0 /* 3A3BD8 E00A43F8 000319C3 */ sra $v1, $v1, 7 /* 3A3BDC E00A43FC 000217C3 */ sra $v0, $v0, 31 /* 3A3BE0 E00A4400 00621823 */ subu $v1, $v1, $v0 /* 3A3BE4 E00A4404 08029172 */ j .LE00A45C8 /* 3A3BE8 E00A4408 AE03002C */ sw $v1, 0x2C($s0) /* 3A3BEC E00A440C 240300FF */ addiu $v1, $zero, 0xFF /* 3A3BF0 E00A4410 02230018 */ mult $s1, $v1 /* 3A3BF4 E00A4414 3C048080 */ lui $a0, (0x80808081 >> 16) /* 3A3BF8 E00A4418 00001812 */ mflo $v1 /* 3A3BFC E00A441C 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* 3A3C00 E00A4420 240200EB */ addiu $v0, $zero, 0xEB /* 3A3C04 E00A4424 00640018 */ mult $v1, $a0 /* 3A3C08 E00A4428 AE020020 */ sw $v0, 0x20($s0) /* 3A3C0C E00A442C AE020024 */ sw $v0, 0x24($s0) /* 3A3C10 E00A4430 0802916B */ j .LE00A45AC /* 3A3C14 E00A4434 240200C8 */ addiu $v0, $zero, 0xC8 /* 3A3C18 E00A4438 C6000030 */ lwc1 $f0, 0x30($s0) /* 3A3C1C E00A443C 3C01E00A */ lui $at, (0xE00A4B20 >> 16) /* 3A3C20 E00A4440 D4224B20 */ ldc1 $f2, (0xE00A4B20 & 0xFFFF)($at) /* 3A3C24 E00A4444 46000021 */ cvt.d.s $f0, $f0 /* 3A3C28 E00A4448 46220002 */ mul.d $f0, $f0, $f2 /* 3A3C2C E00A444C 00000000 */ nop /* 3A3C30 E00A4450 2403007F */ addiu $v1, $zero, 0x7F /* 3A3C34 E00A4454 00C30018 */ mult $a2, $v1 /* 3A3C38 E00A4458 3C048080 */ lui $a0, (0x80808081 >> 16) /* 3A3C3C E00A445C 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* 3A3C40 E00A4460 00001812 */ mflo $v1 /* 3A3C44 E00A4464 24020046 */ addiu $v0, $zero, 0x46 /* 3A3C48 E00A4468 AE020020 */ sw $v0, 0x20($s0) /* 3A3C4C E00A446C 00640018 */ mult $v1, $a0 /* 3A3C50 E00A4470 240200B4 */ addiu $v0, $zero, 0xB4 /* 3A3C54 E00A4474 AE020024 */ sw $v0, 0x24($s0) /* 3A3C58 E00A4478 08029153 */ j .LE00A454C /* 3A3C5C E00A447C 24020078 */ addiu $v0, $zero, 0x78 /* 3A3C60 E00A4480 C6000030 */ lwc1 $f0, 0x30($s0) /* 3A3C64 E00A4484 3C01E00A */ lui $at, (0xE00A4B28 >> 16) /* 3A3C68 E00A4488 D4224B28 */ ldc1 $f2, (0xE00A4B28 & 0xFFFF)($at) /* 3A3C6C E00A448C 46000021 */ cvt.d.s $f0, $f0 /* 3A3C70 E00A4490 46220002 */ mul.d $f0, $f0, $f2 /* 3A3C74 E00A4494 00000000 */ nop /* 3A3C78 E00A4498 240300A0 */ addiu $v1, $zero, 0xA0 /* 3A3C7C E00A449C 00C30018 */ mult $a2, $v1 /* 3A3C80 E00A44A0 3C048080 */ lui $a0, (0x80808081 >> 16) /* 3A3C84 E00A44A4 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* 3A3C88 E00A44A8 00001812 */ mflo $v1 /* 3A3C8C E00A44AC 240200A2 */ addiu $v0, $zero, 0xA2 /* 3A3C90 E00A44B0 AE020020 */ sw $v0, 0x20($s0) /* 3A3C94 E00A44B4 00640018 */ mult $v1, $a0 /* 3A3C98 E00A44B8 08029151 */ j .LE00A4544 /* 3A3C9C E00A44BC 240200BD */ addiu $v0, $zero, 0xBD /* 3A3CA0 E00A44C0 C6000030 */ lwc1 $f0, 0x30($s0) /* 3A3CA4 E00A44C4 3C01E00A */ lui $at, (0xE00A4B30 >> 16) /* 3A3CA8 E00A44C8 D4224B30 */ ldc1 $f2, (0xE00A4B30 & 0xFFFF)($at) /* 3A3CAC E00A44CC 46000021 */ cvt.d.s $f0, $f0 /* 3A3CB0 E00A44D0 46220002 */ mul.d $f0, $f0, $f2 /* 3A3CB4 E00A44D4 00000000 */ nop /* 3A3CB8 E00A44D8 2403007F */ addiu $v1, $zero, 0x7F /* 3A3CBC E00A44DC 00C30018 */ mult $a2, $v1 /* 3A3CC0 E00A44E0 3C048080 */ lui $a0, (0x80808081 >> 16) /* 3A3CC4 E00A44E4 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* 3A3CC8 E00A44E8 00001812 */ mflo $v1 /* 3A3CCC E00A44EC 240200AA */ addiu $v0, $zero, 0xAA /* 3A3CD0 E00A44F0 AE020020 */ sw $v0, 0x20($s0) /* 3A3CD4 E00A44F4 00640018 */ mult $v1, $a0 /* 3A3CD8 E00A44F8 24020028 */ addiu $v0, $zero, 0x28 /* 3A3CDC E00A44FC AE020024 */ sw $v0, 0x24($s0) /* 3A3CE0 E00A4500 08029153 */ j .LE00A454C /* 3A3CE4 E00A4504 2402006E */ addiu $v0, $zero, 0x6E /* 3A3CE8 E00A4508 C6000030 */ lwc1 $f0, 0x30($s0) /* 3A3CEC E00A450C 3C01E00A */ lui $at, (0xE00A4B38 >> 16) /* 3A3CF0 E00A4510 D4224B38 */ ldc1 $f2, (0xE00A4B38 & 0xFFFF)($at) /* 3A3CF4 E00A4514 46000021 */ cvt.d.s $f0, $f0 /* 3A3CF8 E00A4518 46220002 */ mul.d $f0, $f0, $f2 /* 3A3CFC E00A451C 00000000 */ nop /* 3A3D00 E00A4520 240300A0 */ addiu $v1, $zero, 0xA0 /* 3A3D04 E00A4524 00C30018 */ mult $a2, $v1 /* 3A3D08 E00A4528 3C048080 */ lui $a0, (0x80808081 >> 16) /* 3A3D0C E00A452C 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* 3A3D10 E00A4530 00001812 */ mflo $v1 /* 3A3D14 E00A4534 240200B4 */ addiu $v0, $zero, 0xB4 /* 3A3D18 E00A4538 AE020020 */ sw $v0, 0x20($s0) /* 3A3D1C E00A453C 00640018 */ mult $v1, $a0 /* 3A3D20 E00A4540 240200B2 */ addiu $v0, $zero, 0xB2 .LE00A4544: /* 3A3D24 E00A4544 AE020024 */ sw $v0, 0x24($s0) /* 3A3D28 E00A4548 240200AE */ addiu $v0, $zero, 0xAE .LE00A454C: /* 3A3D2C E00A454C AE020028 */ sw $v0, 0x28($s0) /* 3A3D30 E00A4550 00002810 */ mfhi $a1 /* 3A3D34 E00A4554 00A31021 */ addu $v0, $a1, $v1 /* 3A3D38 E00A4558 000211C3 */ sra $v0, $v0, 7 /* 3A3D3C E00A455C 00031FC3 */ sra $v1, $v1, 31 /* 3A3D40 E00A4560 00431023 */ subu $v0, $v0, $v1 /* 3A3D44 E00A4564 46200020 */ cvt.s.d $f0, $f0 /* 3A3D48 E00A4568 AE02002C */ sw $v0, 0x2C($s0) /* 3A3D4C E00A456C 08029172 */ j .LE00A45C8 /* 3A3D50 E00A4570 E6000030 */ swc1 $f0, 0x30($s0) .LE00A4574: /* 3A3D54 E00A4574 240300A0 */ addiu $v1, $zero, 0xA0 /* 3A3D58 E00A4578 00C30018 */ mult $a2, $v1 /* 3A3D5C E00A457C C6000030 */ lwc1 $f0, 0x30($s0) /* 3A3D60 E00A4580 C6020034 */ lwc1 $f2, 0x34($s0) /* 3A3D64 E00A4584 46020000 */ add.s $f0, $f0, $f2 /* 3A3D68 E00A4588 3C028080 */ lui $v0, (0x80808081 >> 16) /* 3A3D6C E00A458C 00001812 */ mflo $v1 /* 3A3D70 E00A4590 34428081 */ ori $v0, $v0, (0x80808081 & 0xFFFF) /* 3A3D74 E00A4594 E6000030 */ swc1 $f0, 0x30($s0) /* 3A3D78 E00A4598 00620018 */ mult $v1, $v0 /* 3A3D7C E00A459C 24020032 */ addiu $v0, $zero, 0x32 /* 3A3D80 E00A45A0 AE020020 */ sw $v0, 0x20($s0) /* 3A3D84 E00A45A4 AE020024 */ sw $v0, 0x24($s0) /* 3A3D88 E00A45A8 240200FF */ addiu $v0, $zero, 0xFF .LE00A45AC: /* 3A3D8C E00A45AC AE020028 */ sw $v0, 0x28($s0) /* 3A3D90 E00A45B0 00002810 */ mfhi $a1 /* 3A3D94 E00A45B4 00A31021 */ addu $v0, $a1, $v1 .LE00A45B8: /* 3A3D98 E00A45B8 000211C3 */ sra $v0, $v0, 7 /* 3A3D9C E00A45BC 00031FC3 */ sra $v1, $v1, 31 /* 3A3DA0 E00A45C0 00431023 */ subu $v0, $v0, $v1 /* 3A3DA4 E00A45C4 AE02002C */ sw $v0, 0x2C($s0) .LE00A45C8: /* 3A3DA8 E00A45C8 8FBF0018 */ lw $ra, 0x18($sp) /* 3A3DAC E00A45CC 8FB10014 */ lw $s1, 0x14($sp) /* 3A3DB0 E00A45D0 8FB00010 */ lw $s0, 0x10($sp) /* 3A3DB4 E00A45D4 03E00008 */ jr $ra /* 3A3DB8 E00A45D8 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void energy_orb_wave_update(EffectInstance* effect) { EnergyOrbWaveFXData* data = effect->data.energyOrbWave; f32 var_float; s32 unk_14; s32 var_2; s32 var_1; s32 unk_1C; u16 var_4; s32 var_3; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->unk_10 = 30; } if (data->unk_10 < 100) { data->unk_10--; } data->unk_14++; if (data->unk_10 < 0) { shim_remove_effect(effect); return; } unk_14 = data->unk_14; unk_1C = data->unk_1C; var_1 = 0xFF; var_2 = 0xFF; if (unk_14 < 16) { var_1 = (unk_14 * 16) - 1; } if (data->unk_10 < 16) { var_1 = var_1 * data->unk_10 / 16; var_2 = data->unk_10 * 16; } switch (unk_1C) { case 0: data->unk_20 = 70; data->unk_24 = 180; data->unk_28 = 120; var_float = shim_sin_deg(unk_14 * 2) * 10.0f + 190.0f; data->unk_2C = ((s32) var_float * var_1) / 255; break; case 1: var_3 = 255; data->unk_20 = 70; data->unk_24 = 255; data->unk_28 = 230; data->unk_2C = (var_1 * var_3) / 255; break; case 2: data->unk_20 = 170; data->unk_24 = 40; data->unk_28 = 110; var_float = shim_sin_deg(unk_14 * 2) * 10.0f + 190.0f; data->unk_2C = ((s32) var_float * var_1) / 255; break; case 3: var_4 = 255; data->unk_20 = 220; data->unk_24 = 40; data->unk_28 = 170; data->unk_2C = (var_1 * var_4) / 255; break; case 4: data->unk_20 = 235; data->unk_24 = 235; data->unk_28 = 200; var_float = shim_sin_deg(unk_14 * 2) * 15.0f + 215.0f; data->unk_2C = ((s32) var_float * var_1) / 255; break; case 5: var_4 = 255; data->unk_20 = 235; data->unk_24 = 235; data->unk_28 = 200; data->unk_2C = (var_1 * var_4) / 255; break; case 6: var_4 = 127; data->unk_20 = 70; data->unk_24 = 180; data->unk_28 = 120; data->unk_2C = (var_2 * var_4) / 255; data->scale *= 1.1; break; case 7: var_4 = 160; data->unk_20 = 162; data->unk_24 = 189; data->unk_28 = 174; data->unk_2C = (var_2 * var_4) / 255; data->scale *= 1.1; break; case 8: var_4 = 127; data->unk_20 = 170; data->unk_24 = 40; data->unk_28 = 110; data->unk_2C = (var_2 * var_4) / 255; data->scale *= 1.1; break; case 9: var_4 = 160; data->unk_20 = 180; data->unk_24 = 178; data->unk_28 = 174; data->unk_2C = (var_2 * var_4) / 255; data->scale *= 1.1; break; default: var_4 = 160; data->unk_20 = 50; data->unk_24 = 50; data->unk_28 = 255; data->unk_2C = (var_2 * var_4) / 255; data->scale += data->unk_34; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel phys_adjust_cam_on_landing /* 7E9E0 800E5530 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 7E9E4 800E5534 AFB00010 */ sw $s0, 0x10($sp) /* 7E9E8 800E5538 AFB10014 */ sw $s1, 0x14($sp) /* 7E9EC 800E553C 3C118011 */ lui $s1, %hi(gPartnerStatus) /* 7E9F0 800E5540 2631EBB0 */ addiu $s1, $s1, %lo(gPartnerStatus) /* 7E9F4 800E5544 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 7E9F8 800E5548 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 7E9FC 800E554C 3C058011 */ lui $a1, %hi(gPlayerStatus) /* 7EA00 800E5550 24A5EFC8 */ addiu $a1, $a1, %lo(gPlayerStatus) /* 7EA04 800E5554 AFBF0018 */ sw $ra, 0x18($sp) /* 7EA08 800E5558 84640086 */ lh $a0, 0x86($v1) /* 7EA0C 800E555C 2402000B */ addiu $v0, $zero, 0xB /* 7EA10 800E5560 10820008 */ beq $a0, $v0, .L800E5584 /* 7EA14 800E5564 24100001 */ addiu $s0, $zero, 0x1 /* 7EA18 800E5568 2402000D */ addiu $v0, $zero, 0xD /* 7EA1C 800E556C 148200B5 */ bne $a0, $v0, .L800E5844 /* 7EA20 800E5570 24020001 */ addiu $v0, $zero, 0x1 /* 7EA24 800E5574 8462008C */ lh $v0, 0x8C($v1) /* 7EA28 800E5578 38420004 */ xori $v0, $v0, 0x4 /* 7EA2C 800E557C 08039610 */ j .L800E5840 /* 7EA30 800E5580 0002802B */ sltu $s0, $zero, $v0 .L800E5584: /* 7EA34 800E5584 8463008C */ lh $v1, 0x8C($v1) /* 7EA38 800E5588 2C62000C */ sltiu $v0, $v1, 0xC /* 7EA3C 800E558C 104000AC */ beqz $v0, .L800E5840 /* 7EA40 800E5590 00031080 */ sll $v0, $v1, 2 /* 7EA44 800E5594 3C018011 */ lui $at, %hi(jtbl_8010BF00) /* 7EA48 800E5598 00220821 */ addu $at, $at, $v0 /* 7EA4C 800E559C 8C22BF00 */ lw $v0, %lo(jtbl_8010BF00)($at) /* 7EA50 800E55A0 00400008 */ jr $v0 /* 7EA54 800E55A4 00000000 */ nop glabel .L800E55A8 /* 7EA58 800E55A8 3C038011 */ lui $v1, %hi(D_8010C9B0) /* 7EA5C 800E55AC 2463C9B0 */ addiu $v1, $v1, %lo(D_8010C9B0) /* 7EA60 800E55B0 84620000 */ lh $v0, 0x0($v1) /* 7EA64 800E55B4 1440000A */ bnez $v0, .L800E55E0 /* 7EA68 800E55B8 00000000 */ nop /* 7EA6C 800E55BC C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EA70 800E55C0 44800000 */ mtc1 $zero, $f0 /* 7EA74 800E55C4 00000000 */ nop /* 7EA78 800E55C8 4600103E */ c.le.s $f2, $f0 /* 7EA7C 800E55CC 00000000 */ nop /* 7EA80 800E55D0 4500009A */ bc1f .L800E583C /* 7EA84 800E55D4 24020001 */ addiu $v0, $zero, 0x1 /* 7EA88 800E55D8 0803960F */ j .L800E583C /* 7EA8C 800E55DC A4620000 */ sh $v0, 0x0($v1) .L800E55E0: /* 7EA90 800E55E0 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EA94 800E55E4 44800000 */ mtc1 $zero, $f0 /* 7EA98 800E55E8 080395E6 */ j .L800E5798 /* 7EA9C 800E55EC 00000000 */ nop glabel .L800E55F0 /* 7EAA0 800E55F0 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EAA4 800E55F4 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 7EAA8 800E55F8 44810000 */ mtc1 $at, $f0 /* 7EAAC 800E55FC 080395E6 */ j .L800E5798 /* 7EAB0 800E5600 00000000 */ nop glabel .L800E5604 /* 7EAB4 800E5604 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EAB8 800E5608 3C014248 */ lui $at, (0x42480000 >> 16) /* 7EABC 800E560C 44810000 */ mtc1 $at, $f0 /* 7EAC0 800E5610 080395E6 */ j .L800E5798 /* 7EAC4 800E5614 00000000 */ nop glabel .L800E5618 /* 7EAC8 800E5618 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EACC 800E561C 3C01C3C3 */ lui $at, (0xC3C30000 >> 16) /* 7EAD0 800E5620 44810000 */ mtc1 $at, $f0 /* 7EAD4 800E5624 00000000 */ nop /* 7EAD8 800E5628 4602003C */ c.lt.s $f0, $f2 /* 7EADC 800E562C 00000000 */ nop /* 7EAE0 800E5630 45030083 */ bc1tl .L800E5840 /* 7EAE4 800E5634 0000802D */ daddu $s0, $zero, $zero /* 7EAE8 800E5638 3C01C3F7 */ lui $at, (0xC3F78000 >> 16) /* 7EAEC 800E563C 34218000 */ ori $at, $at, (0xC3F78000 & 0xFFFF) /* 7EAF0 800E5640 44810000 */ mtc1 $at, $f0 /* 7EAF4 800E5644 00000000 */ nop /* 7EAF8 800E5648 4600103C */ c.lt.s $f2, $f0 /* 7EAFC 800E564C 080395E8 */ j .L800E57A0 /* 7EB00 800E5650 00000000 */ nop glabel .L800E5654 /* 7EB04 800E5654 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EB08 800E5658 3C01C2B4 */ lui $at, (0xC2B40000 >> 16) /* 7EB0C 800E565C 44810000 */ mtc1 $at, $f0 /* 7EB10 800E5660 00000000 */ nop /* 7EB14 800E5664 4602003C */ c.lt.s $f0, $f2 /* 7EB18 800E5668 00000000 */ nop /* 7EB1C 800E566C 45030074 */ bc1tl .L800E5840 /* 7EB20 800E5670 0000802D */ daddu $s0, $zero, $zero /* 7EB24 800E5674 3C01C3B9 */ lui $at, (0xC3B90000 >> 16) /* 7EB28 800E5678 44810000 */ mtc1 $at, $f0 /* 7EB2C 800E567C 00000000 */ nop /* 7EB30 800E5680 4600103C */ c.lt.s $f2, $f0 /* 7EB34 800E5684 080395E8 */ j .L800E57A0 /* 7EB38 800E5688 00000000 */ nop glabel .L800E568C /* 7EB3C 800E568C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 7EB40 800E5690 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 7EB44 800E5694 8442008E */ lh $v0, 0x8E($v0) /* 7EB48 800E5698 54400069 */ bnel $v0, $zero, .L800E5840 /* 7EB4C 800E569C 24100002 */ addiu $s0, $zero, 0x2 /* 7EB50 800E56A0 3C038011 */ lui $v1, %hi(D_8010C9B0) /* 7EB54 800E56A4 2463C9B0 */ addiu $v1, $v1, %lo(D_8010C9B0) /* 7EB58 800E56A8 84620000 */ lh $v0, 0x0($v1) /* 7EB5C 800E56AC 1440000A */ bnez $v0, .L800E56D8 /* 7EB60 800E56B0 00000000 */ nop /* 7EB64 800E56B4 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EB68 800E56B8 44800000 */ mtc1 $zero, $f0 /* 7EB6C 800E56BC 00000000 */ nop /* 7EB70 800E56C0 4602003C */ c.lt.s $f0, $f2 /* 7EB74 800E56C4 00000000 */ nop /* 7EB78 800E56C8 4503005D */ bc1tl .L800E5840 /* 7EB7C 800E56CC 24100002 */ addiu $s0, $zero, 0x2 /* 7EB80 800E56D0 24020001 */ addiu $v0, $zero, 0x1 /* 7EB84 800E56D4 A4620000 */ sh $v0, 0x0($v1) .L800E56D8: /* 7EB88 800E56D8 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EB8C 800E56DC 44800000 */ mtc1 $zero, $f0 /* 7EB90 800E56E0 080395E6 */ j .L800E5798 /* 7EB94 800E56E4 00000000 */ nop glabel .L800E56E8 /* 7EB98 800E56E8 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 7EB9C 800E56EC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 7EBA0 800E56F0 8442008E */ lh $v0, 0x8E($v0) /* 7EBA4 800E56F4 54400052 */ bnel $v0, $zero, .L800E5840 /* 7EBA8 800E56F8 24100002 */ addiu $s0, $zero, 0x2 /* 7EBAC 800E56FC 3C038011 */ lui $v1, %hi(D_8010C9B0) /* 7EBB0 800E5700 2463C9B0 */ addiu $v1, $v1, %lo(D_8010C9B0) /* 7EBB4 800E5704 84620000 */ lh $v0, 0x0($v1) /* 7EBB8 800E5708 1440000B */ bnez $v0, .L800E5738 /* 7EBBC 800E570C 00000000 */ nop /* 7EBC0 800E5710 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EBC4 800E5714 3C01C302 */ lui $at, (0xC3020000 >> 16) /* 7EBC8 800E5718 44810000 */ mtc1 $at, $f0 /* 7EBCC 800E571C 00000000 */ nop /* 7EBD0 800E5720 4602003C */ c.lt.s $f0, $f2 /* 7EBD4 800E5724 00000000 */ nop /* 7EBD8 800E5728 45030045 */ bc1tl .L800E5840 /* 7EBDC 800E572C 24100002 */ addiu $s0, $zero, 0x2 /* 7EBE0 800E5730 24020001 */ addiu $v0, $zero, 0x1 /* 7EBE4 800E5734 A4620000 */ sh $v0, 0x0($v1) .L800E5738: /* 7EBE8 800E5738 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EBEC 800E573C 3C01C302 */ lui $at, (0xC3020000 >> 16) /* 7EBF0 800E5740 44810000 */ mtc1 $at, $f0 /* 7EBF4 800E5744 080395E6 */ j .L800E5798 /* 7EBF8 800E5748 00000000 */ nop glabel .L800E574C /* 7EBFC 800E574C 3C038011 */ lui $v1, %hi(D_8010C9B0) /* 7EC00 800E5750 2463C9B0 */ addiu $v1, $v1, %lo(D_8010C9B0) /* 7EC04 800E5754 84620000 */ lh $v0, 0x0($v1) /* 7EC08 800E5758 1440000B */ bnez $v0, .L800E5788 /* 7EC0C 800E575C 00000000 */ nop /* 7EC10 800E5760 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EC14 800E5764 3C01C402 */ lui $at, (0xC4020000 >> 16) /* 7EC18 800E5768 44810000 */ mtc1 $at, $f0 /* 7EC1C 800E576C 00000000 */ nop /* 7EC20 800E5770 4602003C */ c.lt.s $f0, $f2 /* 7EC24 800E5774 00000000 */ nop /* 7EC28 800E5778 45030031 */ bc1tl .L800E5840 /* 7EC2C 800E577C 24100002 */ addiu $s0, $zero, 0x2 /* 7EC30 800E5780 24020001 */ addiu $v0, $zero, 0x1 /* 7EC34 800E5784 A4620000 */ sh $v0, 0x0($v1) .L800E5788: /* 7EC38 800E5788 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EC3C 800E578C 3C01C402 */ lui $at, (0xC4020000 >> 16) /* 7EC40 800E5790 44810000 */ mtc1 $at, $f0 /* 7EC44 800E5794 00000000 */ nop .L800E5798: /* 7EC48 800E5798 4602003C */ c.lt.s $f0, $f2 /* 7EC4C 800E579C 00000000 */ nop .L800E57A0: /* 7EC50 800E57A0 45000028 */ bc1f .L800E5844 /* 7EC54 800E57A4 24020001 */ addiu $v0, $zero, 0x1 /* 7EC58 800E57A8 08039611 */ j .L800E5844 /* 7EC5C 800E57AC 0000802D */ daddu $s0, $zero, $zero glabel .L800E57B0 /* 7EC60 800E57B0 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 7EC64 800E57B4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 7EC68 800E57B8 8442008E */ lh $v0, 0x8E($v0) /* 7EC6C 800E57BC 14400019 */ bnez $v0, .L800E5824 /* 7EC70 800E57C0 0000202D */ daddu $a0, $zero, $zero /* 7EC74 800E57C4 3C038011 */ lui $v1, %hi(D_8010C9B0) /* 7EC78 800E57C8 2463C9B0 */ addiu $v1, $v1, %lo(D_8010C9B0) /* 7EC7C 800E57CC 84620000 */ lh $v0, 0x0($v1) /* 7EC80 800E57D0 1440000B */ bnez $v0, .L800E5800 /* 7EC84 800E57D4 00000000 */ nop /* 7EC88 800E57D8 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7EC8C 800E57DC 3C01C402 */ lui $at, (0xC4020000 >> 16) /* 7EC90 800E57E0 44810000 */ mtc1 $at, $f0 /* 7EC94 800E57E4 00000000 */ nop /* 7EC98 800E57E8 4602003C */ c.lt.s $f0, $f2 /* 7EC9C 800E57EC 00000000 */ nop /* 7ECA0 800E57F0 45030013 */ bc1tl .L800E5840 /* 7ECA4 800E57F4 24100002 */ addiu $s0, $zero, 0x2 /* 7ECA8 800E57F8 24020001 */ addiu $v0, $zero, 0x1 /* 7ECAC 800E57FC A4620000 */ sh $v0, 0x0($v1) .L800E5800: /* 7ECB0 800E5800 C4A2002C */ lwc1 $f2, 0x2C($a1) /* 7ECB4 800E5804 3C01C402 */ lui $at, (0xC4020000 >> 16) /* 7ECB8 800E5808 44810000 */ mtc1 $at, $f0 /* 7ECBC 800E580C 00000000 */ nop /* 7ECC0 800E5810 4602003C */ c.lt.s $f0, $f2 /* 7ECC4 800E5814 00000000 */ nop /* 7ECC8 800E5818 45030001 */ bc1tl .L800E5820 /* 7ECCC 800E581C 0000802D */ daddu $s0, $zero, $zero .L800E5820: /* 7ECD0 800E5820 0000202D */ daddu $a0, $zero, $zero .L800E5824: /* 7ECD4 800E5824 3C05F5DE */ lui $a1, (0xF5DE0180 >> 16) /* 7ECD8 800E5828 0C0B1EAF */ jal evt_get_variable /* 7ECDC 800E582C 34A50180 */ ori $a1, $a1, (0xF5DE0180 & 0xFFFF) /* 7ECE0 800E5830 2842FFC6 */ slti $v0, $v0, -0x3A /* 7ECE4 800E5834 14400003 */ bnez $v0, .L800E5844 /* 7ECE8 800E5838 24020001 */ addiu $v0, $zero, 0x1 glabel .L800E583C /* 7ECEC 800E583C 24100002 */ addiu $s0, $zero, 0x2 glabel .L800E5840 /* 7ECF0 800E5840 24020001 */ addiu $v0, $zero, 0x1 .L800E5844: /* 7ECF4 800E5844 16020014 */ bne $s0, $v0, .L800E5898 /* 7ECF8 800E5848 00000000 */ nop /* 7ECFC 800E584C 3C048016 */ lui $a0, %hi(gCollisionStatus + 0x2) /* 7ED00 800E5850 8484A552 */ lh $a0, %lo(gCollisionStatus + 0x2)($a0) /* 7ED04 800E5854 0C016F6A */ jal get_collider_flags /* 7ED08 800E5858 00000000 */ nop /* 7ED0C 800E585C 304200FF */ andi $v0, $v0, 0xFF /* 7ED10 800E5860 24030003 */ addiu $v1, $zero, 0x3 /* 7ED14 800E5864 14430007 */ bne $v0, $v1, .L800E5884 /* 7ED18 800E5868 00000000 */ nop /* 7ED1C 800E586C 3C03800B */ lui $v1, %hi(gCameras) /* 7ED20 800E5870 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 7ED24 800E5874 94620002 */ lhu $v0, 0x2($v1) /* 7ED28 800E5878 0000802D */ daddu $s0, $zero, $zero /* 7ED2C 800E587C 08039635 */ j .L800E58D4 /* 7ED30 800E5880 34420001 */ ori $v0, $v0, 0x1 .L800E5884: /* 7ED34 800E5884 3C03800B */ lui $v1, %hi(gCameras) /* 7ED38 800E5888 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 7ED3C 800E588C 94620002 */ lhu $v0, 0x2($v1) /* 7ED40 800E5890 08039635 */ j .L800E58D4 /* 7ED44 800E5894 3042FFFE */ andi $v0, $v0, 0xFFFE .L800E5898: /* 7ED48 800E5898 82220000 */ lb $v0, 0x0($s1) /* 7ED4C 800E589C 10400009 */ beqz $v0, .L800E58C4 /* 7ED50 800E58A0 24020004 */ addiu $v0, $zero, 0x4 /* 7ED54 800E58A4 82230003 */ lb $v1, 0x3($s1) /* 7ED58 800E58A8 14620006 */ bne $v1, $v0, .L800E58C4 /* 7ED5C 800E58AC 00000000 */ nop /* 7ED60 800E58B0 3C03800B */ lui $v1, %hi(gCameras) /* 7ED64 800E58B4 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 7ED68 800E58B8 94620002 */ lhu $v0, 0x2($v1) /* 7ED6C 800E58BC 08039635 */ j .L800E58D4 /* 7ED70 800E58C0 34420002 */ ori $v0, $v0, 0x2 .L800E58C4: /* 7ED74 800E58C4 3C03800B */ lui $v1, %hi(gCameras) /* 7ED78 800E58C8 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 7ED7C 800E58CC 94620002 */ lhu $v0, 0x2($v1) /* 7ED80 800E58D0 3042FFFD */ andi $v0, $v0, 0xFFFD .L800E58D4: /* 7ED84 800E58D4 A4620002 */ sh $v0, 0x2($v1) /* 7ED88 800E58D8 0200102D */ daddu $v0, $s0, $zero /* 7ED8C 800E58DC 8FBF0018 */ lw $ra, 0x18($sp) /* 7ED90 800E58E0 8FB10014 */ lw $s1, 0x14($sp) /* 7ED94 800E58E4 8FB00010 */ lw $s0, 0x10($sp) /* 7ED98 800E58E8 03E00008 */ jr $ra /* 7ED9C 800E58EC 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: s32 phys_adjust_cam_on_landing(void) { PartnerStatus* partnerStatus = &gPartnerStatus; GameStatus* gameStatus = gGameStatusPtr; PlayerStatus* playerStatus = &gPlayerStatus; s32 ret = 1; //TODO hardcoded map IDs switch (gameStatus->areaID) { case AREA_OBK: ret = gameStatus->mapID != 4; break; case AREA_ISK: switch (gameStatus->mapID) { case 0: ret = 2; break; case 1: if (D_8010C9B0 == 0) { if (playerStatus->position.y <= 0.0f) { D_8010C9B0 = 1; } ret = 2; } else if (playerStatus->position.y > 0.0f) { ret = 0; } break; case 3: if (playerStatus->position.y > 25.0f) { ret = 0; } break; case 4: if (playerStatus->position.y > 50.0f) { ret = 0; } break; case 7: if (playerStatus->position.y > -390.0f) { ret = 0; } else if (playerStatus->position.y < -495.0f) { ret = 0; } break; case 8: if (playerStatus->position.y > -90.0f) { ret = 0; } else if (playerStatus->position.y < -370.0f) { ret = 0; } break; case 2: if (gGameStatusPtr->entryID == 0) { if (D_8010C9B0 == 0) { if (!(playerStatus->position.y > 0.0f)) { D_8010C9B0 = 1; } else { ret = 2; break; } } if (playerStatus->position.y > 0.0f) { ret = 0; } } else { ret = 2; } break; case 5: if (gGameStatusPtr->entryID == 0) { if (D_8010C9B0 == 0) { if (!(playerStatus->position.y > -130.0f)) { D_8010C9B0 = 1; } else { ret = 2; break; } } if (playerStatus->position.y > -130.0f) { ret = 0; } } else { ret = 2; } break; case 10: if (D_8010C9B0 == 0) { if (!(playerStatus->position.y > -520.0f)) { D_8010C9B0 = 1; } else { ret = 2; break; } } if (playerStatus->position.y > -520.0f) { ret = 0; } break; case 11: if (gGameStatusPtr->entryID == 0) { if (D_8010C9B0 == 0) { if (!(playerStatus->position.y > -520.0f)) { D_8010C9B0 = 1; } else { ret = 2; break; } } if (playerStatus->position.y > -520.0f) { ret = 0; } } if (evt_get_variable(NULL, GB_StoryProgress) >= STORY_CH2_DRAINED_THIRD_SAND_ROOM) { ret = 2; } break; } break; } if (ret == 1) { s32 surfaceType = get_collider_flags(gCollisionStatus.currentFloor) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; if (surfaceType == SURFACE_TYPE_LAVA) { gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y; ret = 0; } else { gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_IGNORE_PLAYER_Y; } } else if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE && partnerStatus->actingPartner == PARTNER_PARAKARRY) { gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAG_2; } else { gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_FLAG_2; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel D_8024B9A0 /* 17A280 8024B9A0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 17A284 8024B9A4 AFB00018 */ sw $s0, 0x18($sp) sam_02_Quizmo_AnswerResult: /* 17A288 8024B9A8 3C10800B */ lui $s0, %hi(gCameras + 0x558) /* 17A28C 8024B9AC 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558) sam_02_Quizmo_StageEffect: /* 17A290 8024B9B0 AFBF001C */ sw $ra, 0x1C($sp) sam_02_Quizmo_AudienceEffect: /* 17A294 8024B9B4 F7BE0048 */ sdc1 $f30, 0x48($sp) sam_02_Quizmo_VannaTEffect: /* 17A298 8024B9B8 F7BC0040 */ sdc1 $f28, 0x40($sp) /* 17A29C 8024B9BC F7BA0038 */ sdc1 $f26, 0x38($sp) /* 17A2A0 8024B9C0 F7B80030 */ sdc1 $f24, 0x30($sp) /* 17A2A4 8024B9C4 F7B60028 */ sdc1 $f22, 0x28($sp) /* 17A2A8 8024B9C8 F7B40020 */ sdc1 $f20, 0x20($sp) /* 17A2AC 8024B9CC 10A00046 */ beqz $a1, .L8024BAE8 /* 17A2B0 8024B9D0 24030008 */ addiu $v1, $zero, 0x8 /* 17A2B4 8024B9D4 3C014270 */ lui $at, (0x42700000 >> 16) /* 17A2B8 8024B9D8 44811000 */ mtc1 $at, $f2 /* 17A2BC 8024B9DC 3C04802A */ lui $a0, %hi(BattleCam_PosX) .L8024B9E0: /* 17A2C0 8024B9E0 2484F270 */ addiu $a0, $a0, %lo(BattleCam_PosX) /* 17A2C4 8024B9E4 AC800000 */ sw $zero, 0x0($a0) .L8024B9E8: /* 17A2C8 8024B9E8 3C02802A */ lui $v0, %hi(BattleCam_SetImmediately) /* 17A2CC 8024B9EC 8042F2A4 */ lb $v0, %lo(BattleCam_SetImmediately)($v0) /* 17A2D0 8024B9F0 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17A2D4 8024B9F4 AC20F278 */ sw $zero, %lo(BattleCam_PosZ)($at) /* 17A2D8 8024B9F8 3C01802A */ lui $at, %hi(BattleCam_BoomYaw) /* 17A2DC 8024B9FC A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at) /* 17A2E0 8024BA00 3C01802A */ lui $at, %hi(BattleCam_BoomPitch) /* 17A2E4 8024BA04 A423F284 */ sh $v1, %lo(BattleCam_BoomPitch)($at) /* 17A2E8 8024BA08 3C01802A */ lui $at, %hi(BattleCam_BoomZOffset) /* 17A2EC 8024BA0C A420F286 */ sh $zero, %lo(BattleCam_BoomZOffset)($at) .L8024BA10: /* 17A2F0 8024BA10 3C01802A */ lui $at, %hi(BattleCam_PosY) /* 17A2F4 8024BA14 E422F274 */ swc1 $f2, %lo(BattleCam_PosY)($at) /* 17A2F8 8024BA18 1040000B */ beqz $v0, .L8024BA48 .L8024BA1C: /* 17A2FC 8024BA1C 00000000 */ nop /* 17A300 8024BA20 C4800000 */ lwc1 $f0, 0x0($a0) /* 17A304 8024BA24 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) /* 17A308 8024BA28 9442F280 */ lhu $v0, %lo(BattleCam_BoomLength)($v0) /* 17A30C 8024BA2C E6020058 */ swc1 $f2, 0x58($s0) D_8024BA30: /* 17A310 8024BA30 A6000026 */ sh $zero, 0x26($s0) /* 17A314 8024BA34 A6000024 */ sh $zero, 0x24($s0) /* 17A318 8024BA38 A6030022 */ sh $v1, 0x22($s0) /* 17A31C 8024BA3C E6000054 */ swc1 $f0, 0x54($s0) /* 17A320 8024BA40 E600005C */ swc1 $f0, 0x5C($s0) /* 17A324 8024BA44 A602001E */ sh $v0, 0x1E($s0) .L8024BA48: /* 17A328 8024BA48 8602001E */ lh $v0, 0x1E($s0) /* 17A32C 8024BA4C 86040026 */ lh $a0, 0x26($s0) D_8024BA50: /* 17A330 8024BA50 86030024 */ lh $v1, 0x24($s0) /* 17A334 8024BA54 44820000 */ mtc1 $v0, $f0 /* 17A338 8024BA58 00000000 */ nop /* 17A33C 8024BA5C 46800020 */ cvt.s.w $f0, $f0 D_8024BA60: /* 17A340 8024BA60 86020022 */ lh $v0, 0x22($s0) /* 17A344 8024BA64 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) D_8024BA68: /* 17A348 8024BA68 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at) /* 17A34C 8024BA6C 44820000 */ mtc1 $v0, $f0 /* 17A350 8024BA70 00000000 */ nop /* 17A354 8024BA74 46800020 */ cvt.s.w $f0, $f0 /* 17A358 8024BA78 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17A35C 8024BA7C E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) D_8024BA80: /* 17A360 8024BA80 44830000 */ mtc1 $v1, $f0 /* 17A364 8024BA84 00000000 */ nop /* 17A368 8024BA88 46800020 */ cvt.s.w $f0, $f0 /* 17A36C 8024BA8C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) D_8024BA90: /* 17A370 8024BA90 E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at) /* 17A374 8024BA94 04820001 */ bltzl $a0, D_8024BA9C /* 17A378 8024BA98 248400FF */ addiu $a0, $a0, 0xFF D_8024BA9C: /* 17A37C 8024BA9C 00041203 */ sra $v0, $a0, 8 D_8024BAA0_C09320: /* 17A380 8024BAA0 C6020054 */ lwc1 $f2, 0x54($s0) /* 17A384 8024BAA4 C6040058 */ lwc1 $f4, 0x58($s0) /* 17A388 8024BAA8 C606005C */ lwc1 $f6, 0x5C($s0) /* 17A38C 8024BAAC 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft) /* 17A390 8024BAB0 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1) /* 17A394 8024BAB4 44820000 */ mtc1 $v0, $f0 /* 17A398 8024BAB8 00000000 */ nop /* 17A39C 8024BABC 46800020 */ cvt.s.w $f0, $f0 /* 17A3A0 8024BAC0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 17A3A4 8024BAC4 E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at) /* 17A3A8 8024BAC8 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17A3AC 8024BACC E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at) D_8024BAD0: /* 17A3B0 8024BAD0 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 17A3B4 8024BAD4 E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at) /* 17A3B8 8024BAD8 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 17A3BC 8024BADC E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at) /* 17A3C0 8024BAE0 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal) /* 17A3C4 8024BAE4 A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at) .L8024BAE8: /* 17A3C8 8024BAE8 3C01802A */ lui $at, %hi(BattleCam_PosY) /* 17A3CC 8024BAEC C43CF274 */ lwc1 $f28, %lo(BattleCam_PosY)($at) /* 17A3D0 8024BAF0 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 17A3D4 8024BAF4 C43AF270 */ lwc1 $f26, %lo(BattleCam_PosX)($at) /* 17A3D8 8024BAF8 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp) /* 17A3DC 8024BAFC 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0) /* 17A3E0 8024BB00 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17A3E4 8024BB04 C43EF278 */ lwc1 $f30, %lo(BattleCam_PosZ)($at) D_8024BB08: /* 17A3E8 8024BB08 14400022 */ bnez $v0, .L8024BB94 /* 17A3EC 8024BB0C E7BC0010 */ swc1 $f28, 0x10($sp) /* 17A3F0 8024BB10 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17A3F4 8024BB14 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17A3F8 8024BB18 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17A3FC 8024BB1C 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17A400 8024BB20 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17A404 8024BB24 4481C000 */ mtc1 $at, $f24 /* 17A408 8024BB28 44822000 */ mtc1 $v0, $f4 /* 17A40C 8024BB2C 00000000 */ nop /* 17A410 8024BB30 46802120 */ cvt.s.w $f4, $f4 /* 17A414 8024BB34 44830000 */ mtc1 $v1, $f0 /* 17A418 8024BB38 00000000 */ nop /* 17A41C 8024BB3C 46800020 */ cvt.s.w $f0, $f0 D_8024BB40: /* 17A420 8024BB40 46002103 */ div.s $f4, $f4, $f0 /* 17A424 8024BB44 4604C301 */ sub.s $f12, $f24, $f4 /* 17A428 8024BB48 3C014049 */ lui $at, (0x40490FD0 >> 16) /* 17A42C 8024BB4C 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF) /* 17A430 8024BB50 4481B000 */ mtc1 $at, $f22 /* 17A434 8024BB54 00000000 */ nop /* 17A438 8024BB58 46166302 */ mul.s $f12, $f12, $f22 /* 17A43C 8024BB5C 00000000 */ nop /* 17A440 8024BB60 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 17A444 8024BB64 4481A000 */ mtc1 $at, $f20 .L8024BB68: /* 17A448 8024BB68 00000000 */ nop /* 17A44C 8024BB6C 46146302 */ mul.s $f12, $f12, $f20 /* 17A450 8024BB70 0C00A85B */ jal sin_rad /* 17A454 8024BB74 00000000 */ nop D_8024BB78: /* 17A458 8024BB78 46160002 */ mul.s $f0, $f0, $f22 /* 17A45C 8024BB7C 00000000 */ nop D_8024BB80: /* 17A460 8024BB80 46140302 */ mul.s $f12, $f0, $f20 /* 17A464 8024BB84 0C00A85B */ jal sin_rad /* 17A468 8024BB88 00000000 */ nop /* 17A46C 8024BB8C 08092EF0 */ j .L8024BBC0 /* 17A470 8024BB90 4600C101 */ sub.s $f4, $f24, $f0 .L8024BB94: /* 17A474 8024BB94 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17A478 8024BB98 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17A47C 8024BB9C 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17A480 8024BBA0 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17A484 8024BBA4 44822000 */ mtc1 $v0, $f4 /* 17A488 8024BBA8 00000000 */ nop D_8024BBAC: /* 17A48C 8024BBAC 46802120 */ cvt.s.w $f4, $f4 /* 17A490 8024BBB0 44830000 */ mtc1 $v1, $f0 /* 17A494 8024BBB4 00000000 */ nop D_8024BBB8: /* 17A498 8024BBB8 46800020 */ cvt.s.w $f0, $f0 /* 17A49C 8024BBBC 46002103 */ div.s $f4, $f4, $f0 .L8024BBC0: /* 17A4A0 8024BBC0 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17A4A4 8024BBC4 C434F2A8 */ lwc1 $f20, %lo(BattleCam_InitialPosX)($at) /* 17A4A8 8024BBC8 4604A502 */ mul.s $f20, $f20, $f4 /* 17A4AC 8024BBCC 00000000 */ nop D_8024BBD0: /* 17A4B0 8024BBD0 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 17A4B4 8024BBD4 C432F2AC */ lwc1 $f18, %lo(BattleCam_InitialPosY)($at) /* 17A4B8 8024BBD8 46049482 */ mul.s $f18, $f18, $f4 /* 17A4BC 8024BBDC 00000000 */ nop /* 17A4C0 8024BBE0 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 17A4C4 8024BBE4 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at) D_8024BBE8: /* 17A4C8 8024BBE8 46048402 */ mul.s $f16, $f16, $f4 /* 17A4CC 8024BBEC 00000000 */ nop /* 17A4D0 8024BBF0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 17A4D4 8024BBF4 C426F298 */ lwc1 $f6, %lo(BattleCam_InitialBoomZOffset)($at) /* 17A4D8 8024BBF8 46043182 */ mul.s $f6, $f6, $f4 /* 17A4DC 8024BBFC 00000000 */ nop /* 17A4E0 8024BC00 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 17A4E4 8024BC04 C42CF28C */ lwc1 $f12, %lo(BattleCam_InitialBoomLength)($at) /* 17A4E8 8024BC08 46046302 */ mul.s $f12, $f12, $f4 /* 17A4EC 8024BC0C 00000000 */ nop /* 17A4F0 8024BC10 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17A4F4 8024BC14 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at) /* 17A4F8 8024BC18 46044202 */ mul.s $f8, $f8, $f4 /* 17A4FC 8024BC1C 00000000 */ nop D_8024BC20: /* 17A500 8024BC20 3C013F80 */ lui $at, (0x3F800000 >> 16) D_8024BC24: /* 17A504 8024BC24 44811000 */ mtc1 $at, $f2 /* 17A508 8024BC28 00000000 */ nop /* 17A50C 8024BC2C 46041081 */ sub.s $f2, $f2, $f4 /* 17A510 8024BC30 4602D682 */ mul.s $f26, $f26, $f2 /* 17A514 8024BC34 00000000 */ nop /* 17A518 8024BC38 C7BC0010 */ lwc1 $f28, 0x10($sp) /* 17A51C 8024BC3C 4602E602 */ mul.s $f24, $f28, $f2 /* 17A520 8024BC40 00000000 */ nop /* 17A524 8024BC44 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset) D_8024BC48_C094C8: /* 17A528 8024BC48 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0) /* 17A52C 8024BC4C 44820000 */ mtc1 $v0, $f0 /* 17A530 8024BC50 00000000 */ nop D_8024BC54: /* 17A534 8024BC54 46800020 */ cvt.s.w $f0, $f0 D_8024BC58: /* 17A538 8024BC58 46020002 */ mul.s $f0, $f0, $f2 /* 17A53C 8024BC5C 00000000 */ nop /* 17A540 8024BC60 4602F582 */ mul.s $f22, $f30, $f2 /* 17A544 8024BC64 00000000 */ nop /* 17A548 8024BC68 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) /* 17A54C 8024BC6C 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0) .L8024BC70: /* 17A550 8024BC70 44827000 */ mtc1 $v0, $f14 /* 17A554 8024BC74 00000000 */ nop .L8024BC78: /* 17A558 8024BC78 468073A0 */ cvt.s.w $f14, $f14 /* 17A55C 8024BC7C 46027382 */ mul.s $f14, $f14, $f2 /* 17A560 8024BC80 00000000 */ nop /* 17A564 8024BC84 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw) /* 17A568 8024BC88 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0) /* 17A56C 8024BC8C 44825000 */ mtc1 $v0, $f10 D_8024BC90: /* 17A570 8024BC90 00000000 */ nop /* 17A574 8024BC94 468052A0 */ cvt.s.w $f10, $f10 /* 17A578 8024BC98 46025282 */ mul.s $f10, $f10, $f2 /* 17A57C 8024BC9C 00000000 */ nop /* 17A580 8024BCA0 46003180 */ add.s $f6, $f6, $f0 /* 17A584 8024BCA4 3C014380 */ lui $at, (0x43800000 >> 16) /* 17A588 8024BCA8 44810000 */ mtc1 $at, $f0 D_8024BCAC: /* 17A58C 8024BCAC 00000000 */ nop /* 17A590 8024BCB0 46003182 */ mul.s $f6, $f6, $f0 /* 17A594 8024BCB4 00000000 */ nop /* 17A598 8024BCB8 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17A59C 8024BCBC C420F294 */ lwc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 17A5A0 8024BCC0 46040002 */ mul.s $f0, $f0, $f4 /* 17A5A4 8024BCC4 00000000 */ nop D_8024BCC8: /* 17A5A8 8024BCC8 461AA500 */ add.s $f20, $f20, $f26 /* 17A5AC 8024BCCC 46189480 */ add.s $f18, $f18, $f24 .L8024BCD0: /* 17A5B0 8024BCD0 46168400 */ add.s $f16, $f16, $f22 D_8024BCD4: /* 17A5B4 8024BCD4 460E6300 */ add.s $f12, $f12, $f14 /* 17A5B8 8024BCD8 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft) /* 17A5BC 8024BCDC 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft) /* 17A5C0 8024BCE0 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch) /* 17A5C4 8024BCE4 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0) /* 17A5C8 8024BCE8 460A4200 */ add.s $f8, $f8, $f10 /* 17A5CC 8024BCEC E6140054 */ swc1 $f20, 0x54($s0) /* 17A5D0 8024BCF0 44822000 */ mtc1 $v0, $f4 /* 17A5D4 8024BCF4 00000000 */ nop dgb_01_D_8024BCF8_C09578: /* 17A5D8 8024BCF8 46802120 */ cvt.s.w $f4, $f4 D_8024BCFC: /* 17A5DC 8024BCFC 46022102 */ mul.s $f4, $f4, $f2 D_8024BD00: /* 17A5E0 8024BD00 00000000 */ nop /* 17A5E4 8024BD04 E6120058 */ swc1 $f18, 0x58($s0) /* 17A5E8 8024BD08 E610005C */ swc1 $f16, 0x5C($s0) /* 17A5EC 8024BD0C 4600670D */ trunc.w.s $f28, $f12 .L8024BD10: /* 17A5F0 8024BD10 4402E000 */ mfc1 $v0, $f28 /* 17A5F4 8024BD14 00000000 */ nop .L8024BD18: /* 17A5F8 8024BD18 A602001E */ sh $v0, 0x1E($s0) /* 17A5FC 8024BD1C 46040000 */ add.s $f0, $f0, $f4 /* 17A600 8024BD20 4600470D */ trunc.w.s $f28, $f8 /* 17A604 8024BD24 4402E000 */ mfc1 $v0, $f28 D_8024BD28: /* 17A608 8024BD28 00000000 */ nop /* 17A60C 8024BD2C A6020024 */ sh $v0, 0x24($s0) /* 17A610 8024BD30 4600070D */ trunc.w.s $f28, $f0 /* 17A614 8024BD34 4402E000 */ mfc1 $v0, $f28 glabel func_8024BD38 /* 17A618 8024BD38 00000000 */ nop /* 17A61C 8024BD3C A6020022 */ sh $v0, 0x22($s0) /* 17A620 8024BD40 4600370D */ trunc.w.s $f28, $f6 /* 17A624 8024BD44 4402E000 */ mfc1 $v0, $f28 /* 17A628 8024BD48 00000000 */ nop D_8024BD4C: /* 17A62C 8024BD4C A6020026 */ sh $v0, 0x26($s0) /* 17A630 8024BD50 84820000 */ lh $v0, 0x0($a0) /* 17A634 8024BD54 94830000 */ lhu $v1, 0x0($a0) /* 17A638 8024BD58 14400006 */ bnez $v0, .L8024BD74 /* 17A63C 8024BD5C 2462FFFF */ addiu $v0, $v1, -0x1 D_8024BD60: /* 17A640 8024BD60 24020001 */ addiu $v0, $zero, 0x1 /* 17A644 8024BD64 3C01802A */ lui $at, %hi(BattleCam_DoneMoving) /* 17A648 8024BD68 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at) /* 17A64C 8024BD6C 08092F5E */ j D_8024BD78 D_8024BD70: /* 17A650 8024BD70 00000000 */ nop .L8024BD74: /* 17A654 8024BD74 A4820000 */ sh $v0, 0x0($a0) D_8024BD78: /* 17A658 8024BD78 8FBF001C */ lw $ra, 0x1C($sp) /* 17A65C 8024BD7C 8FB00018 */ lw $s0, 0x18($sp) D_8024BD80_C09600: /* 17A660 8024BD80 D7BE0048 */ ldc1 $f30, 0x48($sp) /* 17A664 8024BD84 D7BC0040 */ ldc1 $f28, 0x40($sp) jtbl_8024BD88: /* 17A668 8024BD88 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 17A66C 8024BD8C D7B80030 */ ldc1 $f24, 0x30($sp) /* 17A670 8024BD90 D7B60028 */ ldc1 $f22, 0x28($sp) /* 17A674 8024BD94 D7B40020 */ ldc1 $f20, 0x20($sp) /* 17A678 8024BD98 0000102D */ daddu $v0, $zero, $zero D_8024BD9C: /* 17A67C 8024BD9C 03E00008 */ jr $ra /* 17A680 8024BDA0 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(BattleCamImpl_Default) { Camera* camera = &gCameras[CAM_BATTLE]; f32 alpha; f32 x, y, z; if (isInitialCall) { BattleCam_PosX = 0.0f; BattleCam_PosY = 60.0f; BattleCam_PosZ = 0.0f; BattleCam_BoomYaw = 0; BattleCam_BoomPitch = 8; BattleCam_BoomZOffset = 0; if (BattleCam_SetImmediately) { camera->lookAt_obj_target.x = BattleCam_PosX; camera->lookAt_obj_target.y = BattleCam_PosY; camera->lookAt_obj_target.z = BattleCam_PosZ; camera->auxBoomZOffset = BattleCam_BoomZOffset; camera->auxBoomYaw = BattleCam_BoomYaw; camera->auxBoomPitch = BattleCam_BoomPitch; camera->auxBoomLength = BattleCam_BoomLength; } 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; } x = BattleCam_PosX; y = BattleCam_PosY; z = BattleCam_PosZ; if (!BattleCam_UseLinearInterp) { alpha = BattleCam_MoveTimeLeft; alpha /= BattleCam_MoveTimeTotal; alpha = 1.0f - sin_rad(sin_rad((1.0f - alpha) * 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; camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha); camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha); camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha); if (BattleCam_MoveTimeLeft == 0) { BattleCam_DoneMoving = TRUE; } else { BattleCam_MoveTimeLeft--; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel D_80244A50 /* 173330 80244A50 3C03800E */ lui $v1, %hi(gBattleSubState) D_80244A54: /* 173334 80244A54 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) glabel .L80244A58 /* 173338 80244A58 3C06800E */ lui $a2, %hi(gCurrentBattlePtr) /* 17333C 80244A5C 8CC6C4FC */ lw $a2, %lo(gCurrentBattlePtr)($a2) D_80244A60: /* 173340 80244A60 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 173344 80244A64 AFB30024 */ sw $s3, 0x24($sp) D_80244A68: /* 173348 80244A68 3C13800B */ lui $s3, %hi(gCurrentEncounter) D_80244A6C: /* 17334C 80244A6C 26730F10 */ addiu $s3, $s3, %lo(gCurrentEncounter) D_80244A70: /* 173350 80244A70 AFB20020 */ sw $s2, 0x20($sp) D_80244A74: /* 173354 80244A74 3C12800E */ lui $s2, %hi(gBattleStatus) D_80244A78: /* 173358 80244A78 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) .L80244A7C: /* 17335C 80244A7C AFBF0028 */ sw $ra, 0x28($sp) /* 173360 80244A80 AFB1001C */ sw $s1, 0x1C($sp) .L80244A84: /* 173364 80244A84 2C620005 */ sltiu $v0, $v1, 0x5 /* 173368 80244A88 104000BA */ beqz $v0, D_80244D74 /* 17336C 80244A8C AFB00018 */ sw $s0, 0x18($sp) /* 173370 80244A90 00031080 */ sll $v0, $v1, 2 /* 173374 80244A94 3C01802A */ lui $at, %hi(jtbl_8029CAB8) /* 173378 80244A98 00220821 */ addu $at, $at, $v0 /* 17337C 80244A9C 8C22CAB8 */ lw $v0, %lo(jtbl_8029CAB8)($at) /* 173380 80244AA0 00400008 */ jr $v0 /* 173384 80244AA4 00000000 */ nop glabel .L80244AA8 /* 173388 80244AA8 3C028007 */ lui $v0, %hi(gGameStatusPtr) .L80244AAC: /* 17338C 80244AAC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 173390 80244AB0 3C048028 */ lui $a0, %hi(BattleScreenFadeAmt) .L80244AB4: /* 173394 80244AB4 24840A30 */ addiu $a0, $a0, %lo(BattleScreenFadeAmt) D_80244AB8: /* 173398 80244AB8 AC800000 */ sw $zero, 0x0($a0) D_80244ABC: /* 17339C 80244ABC 80430074 */ lb $v1, 0x74($v0) /* 1733A0 80244AC0 24020002 */ addiu $v0, $zero, 0x2 glabel .L80244AC4 /* 1733A4 80244AC4 14620002 */ bne $v1, $v0, D_80244AD0 /* 1733A8 80244AC8 240200FF */ addiu $v0, $zero, 0xFF /* 1733AC 80244ACC AC820000 */ sw $v0, 0x0($a0) D_80244AD0: /* 1733B0 80244AD0 82630009 */ lb $v1, 0x9($s3) /* 1733B4 80244AD4 24020001 */ addiu $v0, $zero, 0x1 .L80244AD8: /* 1733B8 80244AD8 14620015 */ bne $v1, $v0, D_80244B30 D_80244ADC: /* 1733BC 80244ADC 3C030080 */ lui $v1, (0x800000 >> 16) /* 1733C0 80244AE0 3C02800E */ lui $v0, %hi(gBattleStatus) .L80244AE4: /* 1733C4 80244AE4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) /* 1733C8 80244AE8 00431024 */ and $v0, $v0, $v1 glabel .L80244AEC /* 1733CC 80244AEC 14400010 */ bnez $v0, D_80244B30 /* 1733D0 80244AF0 24020001 */ addiu $v0, $zero, 0x1 D_80244AF4: /* 1733D4 80244AF4 0C093980 */ jal func_8024E600 /* 1733D8 80244AF8 00000000 */ nop /* 1733DC 80244AFC 0C093903 */ jal func_8024E40C glabel func_80244B00 /* 1733E0 80244B00 24040001 */ addiu $a0, $zero, 0x1 /* 1733E4 80244B04 0000202D */ daddu $a0, $zero, $zero .L80244B08: /* 1733E8 80244B08 0080282D */ daddu $a1, $a0, $zero /* 1733EC 80244B0C 0080302D */ daddu $a2, $a0, $zero /* 1733F0 80244B10 0C04DF84 */ jal set_screen_overlay_color /* 1733F4 80244B14 0080382D */ daddu $a3, $a0, $zero /* 1733F8 80244B18 0000202D */ daddu $a0, $zero, $zero .L80244B1C: /* 1733FC 80244B1C 0080282D */ daddu $a1, $a0, $zero D_80244B20: /* 173400 80244B20 240600A0 */ addiu $a2, $zero, 0xA0 /* 173404 80244B24 0C04DF93 */ jal set_screen_overlay_center /* 173408 80244B28 24070078 */ addiu $a3, $zero, 0x78 D_80244B2C: /* 17340C 80244B2C 24020001 */ addiu $v0, $zero, 0x1 D_80244B30: /* 173410 80244B30 3C01800E */ lui $at, %hi(gBattleSubState) .L80244B34: /* 173414 80244B34 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80244B38: /* 173418 80244B38 0809135D */ j D_80244D74 D_80244B3C: /* 17341C 80244B3C 00000000 */ nop D_80244B40: /* 173420 80244B40 3C048028 */ lui $a0, %hi(BattleScreenFadeAmt) .L80244B44: /* 173424 80244B44 24840A30 */ addiu $a0, $a0, %lo(BattleScreenFadeAmt) D_80244B48: /* 173428 80244B48 8C830000 */ lw $v1, 0x0($a0) /* 17342C 80244B4C 240500FF */ addiu $a1, $zero, 0xFF D_80244B50: /* 173430 80244B50 14650005 */ bne $v1, $a1, .L80244B68 .L80244B54: /* 173434 80244B54 24020002 */ addiu $v0, $zero, 0x2 .L80244B58: /* 173438 80244B58 3C01800E */ lui $at, %hi(gBattleSubState) .L80244B5C: /* 17343C 80244B5C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) .L80244B60: /* 173440 80244B60 0809135D */ j D_80244D74 .L80244B64: /* 173444 80244B64 00000000 */ nop .L80244B68: /* 173448 80244B68 8242008D */ lb $v0, 0x8D($s2) /* 17344C 80244B6C 00621021 */ addu $v0, $v1, $v0 .L80244B70: /* 173450 80244B70 AC820000 */ sw $v0, 0x0($a0) /* 173454 80244B74 28420100 */ slti $v0, $v0, 0x100 .L80244B78: /* 173458 80244B78 5040007E */ beql $v0, $zero, D_80244D74 /* 17345C 80244B7C AC850000 */ sw $a1, 0x0($a0) glabel .L80244B80 /* 173460 80244B80 0809135D */ j D_80244D74 .L80244B84: /* 173464 80244B84 00000000 */ nop D_80244B88: /* 173468 80244B88 240200FF */ addiu $v0, $zero, 0xFF D_80244B8C: /* 17346C 80244B8C 3C04800E */ lui $a0, %hi(gBattleStatus) D_80244B90: /* 173470 80244B90 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) /* 173474 80244B94 2403FFFE */ addiu $v1, $zero, -0x2 glabel func_80244B98 /* 173478 80244B98 3C018028 */ lui $at, %hi(BattleScreenFadeAmt) /* 17347C 80244B9C AC220A30 */ sw $v0, %lo(BattleScreenFadeAmt)($at) /* 173480 80244BA0 8C820000 */ lw $v0, 0x0($a0) /* 173484 80244BA4 3C05800E */ lui $a1, %hi(gCurrentStagePtr) /* 173488 80244BA8 8CA5C064 */ lw $a1, %lo(gCurrentStagePtr)($a1) /* 17348C 80244BAC 00431024 */ and $v0, $v0, $v1 D_80244BB0: /* 173490 80244BB0 14A00004 */ bnez $a1, func_80244BC4 /* 173494 80244BB4 AC820000 */ sw $v0, 0x0($a0) D_80244BB8_ED8DD8: /* 173498 80244BB8 8CC4000C */ lw $a0, 0xC($a2) /* 17349C 80244BBC 080912F2 */ j D_80244BC8 D_80244BC0: /* 1734A0 80244BC0 00000000 */ nop glabel func_80244BC4 /* 1734A4 80244BC4 8CA40004 */ lw $a0, 0x4($a1) D_80244BC8: /* 1734A8 80244BC8 8C840010 */ lw $a0, 0x10($a0) /* 1734AC 80244BCC 14800006 */ bnez $a0, .L80244BE8 /* 1734B0 80244BD0 2405000A */ addiu $a1, $zero, 0xA /* 1734B4 80244BD4 24020004 */ addiu $v0, $zero, 0x4 /* 1734B8 80244BD8 3C01800E */ lui $at, %hi(gBattleSubState) /* 1734BC 80244BDC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 1734C0 80244BE0 0809135D */ j D_80244D74 /* 1734C4 80244BE4 00000000 */ nop .L80244BE8: /* 1734C8 80244BE8 0C0B0CF8 */ jal start_script D_80244BEC_ED8E0C: /* 1734CC 80244BEC 0000302D */ daddu $a2, $zero, $zero D_80244BF0: /* 1734D0 80244BF0 AE4200BC */ sw $v0, 0xBC($s2) D_80244BF4: /* 1734D4 80244BF4 8C430144 */ lw $v1, 0x144($v0) D_80244BF8: /* 1734D8 80244BF8 24020003 */ addiu $v0, $zero, 0x3 .L80244BFC: /* 1734DC 80244BFC 3C01800E */ lui $at, %hi(gBattleSubState) /* 1734E0 80244C00 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) /* 1734E4 80244C04 0809135D */ j D_80244D74 /* 1734E8 80244C08 AE4300C0 */ sw $v1, 0xC0($s2) glabel .L80244C0C /* 1734EC 80244C0C 8E4400C0 */ lw $a0, 0xC0($s2) /* 1734F0 80244C10 0C0B1059 */ jal does_script_exist D_80244C14: /* 1734F4 80244C14 00000000 */ nop sbk_30_D_80244C18: /* 1734F8 80244C18 14400056 */ bnez $v0, D_80244D74 .L80244C1C: /* 1734FC 80244C1C 24020004 */ addiu $v0, $zero, 0x4 .L80244C20: /* 173500 80244C20 3C01800E */ lui $at, %hi(gBattleSubState) .L80244C24: /* 173504 80244C24 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) glabel .L80244C28 /* 173508 80244C28 0C0B1045 */ jal kill_all_scripts /* 17350C 80244C2C 0000882D */ daddu $s1, $zero, $zero glabel func_80244C30 /* 173510 80244C30 0240802D */ daddu $s0, $s2, $zero .L80244C34: /* 173514 80244C34 8E0400E0 */ lw $a0, 0xE0($s0) D_80244C38: /* 173518 80244C38 10800003 */ beqz $a0, D_80244C48 D_80244C3C: /* 17351C 80244C3C 26310001 */ addiu $s1, $s1, 0x1 D_80244C40: /* 173520 80244C40 0C0902EF */ jal func_80240BBC D_80244C44: /* 173524 80244C44 00000000 */ nop D_80244C48: /* 173528 80244C48 2A220018 */ slti $v0, $s1, 0x18 D_80244C4C: /* 17352C 80244C4C 1440FFF9 */ bnez $v0, .L80244C34 /* 173530 80244C50 26100004 */ addiu $s0, $s0, 0x4 D_80244C54: /* 173534 80244C54 8E4400DC */ lw $a0, 0xDC($s2) D_80244C58: /* 173538 80244C58 10800003 */ beqz $a0, .L80244C68 /* 17353C 80244C5C 00000000 */ nop glabel func_80244C60 /* 173540 80244C60 0C0902EF */ jal func_80240BBC D_80244C64: /* 173544 80244C64 00000000 */ nop .L80244C68: /* 173548 80244C68 0C09035A */ jal func_80240D68 /* 17354C 80244C6C 8E4400D8 */ lw $a0, 0xD8($s2) D_80244C70: /* 173550 80244C70 8243008A */ lb $v1, 0x8A($s2) glabel .L80244C74 /* 173554 80244C74 24020004 */ addiu $v0, $zero, 0x4 D_80244C78: /* 173558 80244C78 14620003 */ bne $v1, $v0, .L80244C88 /* 17355C 80244C7C 24020001 */ addiu $v0, $zero, 0x1 glabel .L80244C80 /* 173560 80244C80 A262000B */ sb $v0, 0xB($s3) D_80244C84: /* 173564 80244C84 A240008A */ sb $zero, 0x8A($s2) .L80244C88: /* 173568 80244C88 9242007B */ lbu $v0, 0x7B($s2) glabel func_80244C8C /* 17356C 80244C8C 3C10800E */ lui $s0, %hi(gBattleStatus) /* 173570 80244C90 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus) /* 173574 80244C94 A262000C */ sb $v0, 0xC($s3) D_80244C98: /* 173578 80244C98 8E020004 */ lw $v0, 0x4($s0) /* 17357C 80244C9C 3C031000 */ lui $v1, (0x10000000 >> 16) D_80244CA0: /* 173580 80244CA0 00431024 */ and $v0, $v0, $v1 glabel .L80244CA4 /* 173584 80244CA4 10400002 */ beqz $v0, D_80244CB0 /* 173588 80244CA8 24020001 */ addiu $v0, $zero, 0x1 .L80244CAC: /* 17358C 80244CAC A2620013 */ sb $v0, 0x13($s3) D_80244CB0: /* 173590 80244CB0 0C016938 */ jal remove_all_effects /* 173594 80244CB4 00000000 */ nop D_80244CB8: /* 173598 80244CB8 0C051FB1 */ jal set_windows_visible /* 17359C 80244CBC 0000202D */ daddu $a0, $zero, $zero D_80244CC0: /* 1735A0 80244CC0 8E020004 */ lw $v0, 0x4($s0) /* 1735A4 80244CC4 30420040 */ andi $v0, $v0, 0x40 D_80244CC8: /* 1735A8 80244CC8 10400003 */ beqz $v0, .L80244CD8 /* 1735AC 80244CCC 00000000 */ nop D_80244CD0: /* 1735B0 80244CD0 0C03A6CC */ jal decrement_status_bar_disabled D_80244CD4: /* 1735B4 80244CD4 00000000 */ nop .L80244CD8: /* 1735B8 80244CD8 82630009 */ lb $v1, 0x9($s3) /* 1735BC 80244CDC 24020001 */ addiu $v0, $zero, 0x1 /* 1735C0 80244CE0 14620019 */ bne $v1, $v0, .L80244D48 /* 1735C4 80244CE4 3C030080 */ lui $v1, (0x800000 >> 16) D_80244CE8: /* 1735C8 80244CE8 8E020000 */ lw $v0, 0x0($s0) glabel func_80244CEC /* 1735CC 80244CEC 00431024 */ and $v0, $v0, $v1 D_80244CF0: /* 1735D0 80244CF0 14400015 */ bnez $v0, .L80244D48 /* 1735D4 80244CF4 00000000 */ nop jtbl_80244CF8: /* 1735D8 80244CF8 0C090464 */ jal func_80241190 .L80244CFC: /* 1735DC 80244CFC 0000202D */ daddu $a0, $zero, $zero D_80244D00: /* 1735E0 80244D00 3C04802A */ lui $a0, %hi(D_8029CAAC) /* 1735E4 80244D04 2484CAAC */ addiu $a0, $a0, %lo(D_8029CAAC) D_80244D08: /* 1735E8 80244D08 27A50010 */ addiu $a1, $sp, 0x10 D_80244D0C: /* 1735EC 80244D0C 3C02800E */ lui $v0, %hi(gBattleState) D_80244D10: /* 1735F0 80244D10 8C42C068 */ lw $v0, %lo(gBattleState)($v0) /* 1735F4 80244D14 3C01800E */ lui $at, %hi(gLastDrawBattleState) jtbl_80244D18: /* 1735F8 80244D18 AC22C4D0 */ sw $v0, %lo(gLastDrawBattleState)($at) /* 1735FC 80244D1C 0C016AFE */ jal get_map_IDs_by_name /* 173600 80244D20 27A60012 */ addiu $a2, $sp, 0x12 D_80244D24: /* 173604 80244D24 3C028007 */ lui $v0, %hi(gGameStatusPtr) jtbl_80244D28: /* 173608 80244D28 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) .L80244D2C: /* 17360C 80244D2C 97A30010 */ lhu $v1, 0x10($sp) .L80244D30: /* 173610 80244D30 97A50012 */ lhu $a1, 0x12($sp) /* 173614 80244D34 24040006 */ addiu $a0, $zero, 0x6 D_80244D38: /* 173618 80244D38 A4430086 */ sh $v1, 0x86($v0) /* 17361C 80244D3C A445008C */ sh $a1, 0x8C($v0) /* 173620 80244D40 0809135B */ j D_80244D6C .L80244D44: /* 173624 80244D44 A440008E */ sh $zero, 0x8E($v0) .L80244D48: /* 173628 80244D48 0C090464 */ jal func_80241190 .L80244D4C: /* 17362C 80244D4C 0000202D */ daddu $a0, $zero, $zero D_80244D50: /* 173630 80244D50 3C02800E */ lui $v0, %hi(gBattleState) D_80244D54: /* 173634 80244D54 8C42C068 */ lw $v0, %lo(gBattleState)($v0) D_80244D58: /* 173638 80244D58 3C01800E */ lui $at, %hi(gLastDrawBattleState) .L80244D5C: /* 17363C 80244D5C AC22C4D0 */ sw $v0, %lo(gLastDrawBattleState)($at) D_80244D60: /* 173640 80244D60 0C00F945 */ jal func_8003E514 /* 173644 80244D64 24040001 */ addiu $a0, $zero, 0x1 glabel func_80244D68 /* 173648 80244D68 24040009 */ addiu $a0, $zero, 0x9 D_80244D6C: /* 17364C 80244D6C 0C00CD3C */ jal set_game_mode /* 173650 80244D70 00000000 */ nop D_80244D74: /* 173654 80244D74 8FBF0028 */ lw $ra, 0x28($sp) /* 173658 80244D78 8FB30024 */ lw $s3, 0x24($sp) D_80244D7C: /* 17365C 80244D7C 8FB20020 */ lw $s2, 0x20($sp) /* 173660 80244D80 8FB1001C */ lw $s1, 0x1C($sp) D_80244D84: /* 173664 80244D84 8FB00018 */ lw $s0, 0x18($sp) D_80244D88: /* 173668 80244D88 03E00008 */ jr $ra /* 17366C 80244D8C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_end_battle(void) { EncounterStatus* encounterStatus = &gCurrentEncounter; BattleStatus* battleStatus = &gBattleStatus; Battle* battle = gCurrentBattlePtr; Stage* stage; Evt* script; s32 i; switch (gBattleSubState) { case BTL_SUBSTATE_END_BATTLE_INIT: BattleScreenFadeAmt = 0; if (gGameStatusPtr->debugEnemyContact == DEBUG_CONTACT_DIE_ON_TOUCH) { BattleScreenFadeAmt = 255; } if (encounterStatus->battleOutcome == OUTCOME_PLAYER_LOST && !(gBattleStatus.flags1 & BS_FLAGS1_NO_GAME_OVER)) { btl_cam_unfreeze(); btl_cam_use_preset(BTL_CAM_PRESET_01); set_screen_overlay_color(SCREEN_LAYER_FRONT, 0, 0, 0); set_screen_overlay_center(SCREEN_LAYER_FRONT, 0, 160, 120); } gBattleSubState = BTL_SUBSTATE_END_BATTLE_FADE_OUT; break; case BTL_SUBSTATE_END_BATTLE_FADE_OUT: if (BattleScreenFadeAmt == 255) { gBattleSubState = BTL_SUBSTATE_END_BATTLE_EXEC_STAGE_SCRIPT; break; } BattleScreenFadeAmt += battleStatus->endBattleFadeOutRate; if (BattleScreenFadeAmt > 255) { BattleScreenFadeAmt = 255; } break; case BTL_SUBSTATE_END_BATTLE_EXEC_STAGE_SCRIPT: BattleScreenFadeAmt = 255; gBattleStatus.flags1 &= ~BS_FLAGS1_ACTORS_VISIBLE; if (gCurrentStagePtr == NULL) { stage = battle->stage; } else { stage = gCurrentStagePtr->stage; } if (stage->postBattle == NULL) { gBattleSubState = BTL_SUBSTATE_END_BATTLE_CLEANUP; return; } script = start_script(stage->postBattle, EVT_PRIORITY_A, 0); battleStatus->controlScript = script; battleStatus->controlScriptID = script->id; gBattleSubState = BTL_SUBSTATE_END_BATTLE_AWAIT_STAGE_SCRIPT; break; case BTL_SUBSTATE_END_BATTLE_AWAIT_STAGE_SCRIPT: if (does_script_exist(battleStatus->controlScriptID)) { break; } gBattleSubState = BTL_SUBSTATE_END_BATTLE_CLEANUP; // fallthrough case BTL_SUBSTATE_END_BATTLE_CLEANUP: kill_all_scripts(); for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { if (battleStatus->enemyActors[i] != NULL) { btl_delete_actor(battleStatus->enemyActors[i]); } } if (battleStatus->partnerActor != NULL) { btl_delete_actor(battleStatus->partnerActor); } btl_delete_player_actor(battleStatus->playerActor); if (battleStatus->nextMerleeSpellType == MERLEE_SPELL_COIN_BOOST) { encounterStatus->hasMerleeCoinBonus = TRUE; battleStatus->nextMerleeSpellType = MERLEE_SPELL_0; } encounterStatus->damageTaken = battleStatus->damageTaken; if (gBattleStatus.flags2 & BS_FLAGS2_DROP_WHACKA_BUMP) { encounterStatus->dropWhackaBump = TRUE; } remove_all_effects(); set_windows_visible(0); if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) { decrement_status_bar_disabled(); } if (encounterStatus->battleOutcome == OUTCOME_PLAYER_LOST && !(gBattleStatus.flags1 & BS_FLAGS1_NO_GAME_OVER)) { s16 areaID; s16 mapID; btl_set_state(BATTLE_STATE_0); gLastDrawBattleState = gBattleState; get_map_IDs_by_name("gv_01", &areaID, &mapID); gGameStatusPtr->areaID = areaID; gGameStatusPtr->mapID = mapID; gGameStatusPtr->entryID = gv_01_ENTRY_0; set_game_mode(GAME_MODE_ENTER_WORLD); } else { btl_set_state(BATTLE_STATE_0); gLastDrawBattleState = gBattleState; func_8003E514(1); set_game_mode(GAME_MODE_END_BATTLE); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel JumpToGoal /* 1A75E8 80278D08 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 1A75EC 80278D0C AFB30024 */ sw $s3, 0x24($sp) /* 1A75F0 80278D10 0080982D */ daddu $s3, $a0, $zero /* 1A75F4 80278D14 AFBF0028 */ sw $ra, 0x28($sp) /* 1A75F8 80278D18 AFB20020 */ sw $s2, 0x20($sp) /* 1A75FC 80278D1C AFB1001C */ sw $s1, 0x1C($sp) /* 1A7600 80278D20 AFB00018 */ sw $s0, 0x18($sp) /* 1A7604 80278D24 F7BE0058 */ sdc1 $f30, 0x58($sp) /* 1A7608 80278D28 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 1A760C 80278D2C F7BA0048 */ sdc1 $f26, 0x48($sp) /* 1A7610 80278D30 F7B80040 */ sdc1 $f24, 0x40($sp) /* 1A7614 80278D34 F7B60038 */ sdc1 $f22, 0x38($sp) /* 1A7618 80278D38 F7B40030 */ sdc1 $f20, 0x30($sp) /* 1A761C 80278D3C 8E71000C */ lw $s1, 0xC($s3) /* 1A7620 80278D40 54A00001 */ bnel $a1, $zero, .L80278D48 /* 1A7624 80278D44 AE600070 */ sw $zero, 0x70($s3) .L80278D48: /* 1A7628 80278D48 8E620070 */ lw $v0, 0x70($s3) /* 1A762C 80278D4C 14400096 */ bnez $v0, .L80278FA8 /* 1A7630 80278D50 00000000 */ nop /* 1A7634 80278D54 8E250000 */ lw $a1, 0x0($s1) /* 1A7638 80278D58 26310004 */ addiu $s1, $s1, 0x4 /* 1A763C 80278D5C 0C0B1EAF */ jal evt_get_variable /* 1A7640 80278D60 0260202D */ daddu $a0, $s3, $zero /* 1A7644 80278D64 0040202D */ daddu $a0, $v0, $zero /* 1A7648 80278D68 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A764C 80278D6C 14820002 */ bne $a0, $v0, .L80278D78 /* 1A7650 80278D70 00000000 */ nop /* 1A7654 80278D74 8E640148 */ lw $a0, 0x148($s3) .L80278D78: /* 1A7658 80278D78 0C09A75B */ jal get_actor /* 1A765C 80278D7C 00000000 */ nop /* 1A7660 80278D80 0040802D */ daddu $s0, $v0, $zero /* 1A7664 80278D84 2612000C */ addiu $s2, $s0, 0xC /* 1A7668 80278D88 AE700074 */ sw $s0, 0x74($s3) /* 1A766C 80278D8C 8E250000 */ lw $a1, 0x0($s1) /* 1A7670 80278D90 26310004 */ addiu $s1, $s1, 0x4 /* 1A7674 80278D94 0C0B1EAF */ jal evt_get_variable /* 1A7678 80278D98 0260202D */ daddu $a0, $s3, $zero /* 1A767C 80278D9C A6020070 */ sh $v0, 0x70($s0) /* 1A7680 80278DA0 8E250000 */ lw $a1, 0x0($s1) /* 1A7684 80278DA4 26310004 */ addiu $s1, $s1, 0x4 /* 1A7688 80278DA8 0C0B1EAF */ jal evt_get_variable /* 1A768C 80278DAC 0260202D */ daddu $a0, $s3, $zero /* 1A7690 80278DB0 AE620078 */ sw $v0, 0x78($s3) /* 1A7694 80278DB4 AE60007C */ sw $zero, 0x7C($s3) /* 1A7698 80278DB8 8E250000 */ lw $a1, 0x0($s1) /* 1A769C 80278DBC 26310004 */ addiu $s1, $s1, 0x4 /* 1A76A0 80278DC0 0C0B1EAF */ jal evt_get_variable /* 1A76A4 80278DC4 0260202D */ daddu $a0, $s3, $zero /* 1A76A8 80278DC8 10400004 */ beqz $v0, .L80278DDC /* 1A76AC 80278DCC 00000000 */ nop /* 1A76B0 80278DD0 8E62007C */ lw $v0, 0x7C($s3) /* 1A76B4 80278DD4 34420001 */ ori $v0, $v0, 0x1 /* 1A76B8 80278DD8 AE62007C */ sw $v0, 0x7C($s3) .L80278DDC: /* 1A76BC 80278DDC 8E250000 */ lw $a1, 0x0($s1) /* 1A76C0 80278DE0 0C0B1EAF */ jal evt_get_variable /* 1A76C4 80278DE4 0260202D */ daddu $a0, $s3, $zero /* 1A76C8 80278DE8 10400004 */ beqz $v0, .L80278DFC /* 1A76CC 80278DEC 00000000 */ nop /* 1A76D0 80278DF0 8E62007C */ lw $v0, 0x7C($s3) /* 1A76D4 80278DF4 34420002 */ ori $v0, $v0, 0x2 /* 1A76D8 80278DF8 AE62007C */ sw $v0, 0x7C($s3) .L80278DFC: /* 1A76DC 80278DFC C6000148 */ lwc1 $f0, 0x148($s0) /* 1A76E0 80278E00 C61A0018 */ lwc1 $f26, 0x18($s0) /* 1A76E4 80278E04 C61C0020 */ lwc1 $f28, 0x20($s0) /* 1A76E8 80278E08 C614014C */ lwc1 $f20, 0x14C($s0) /* 1A76EC 80278E0C C618001C */ lwc1 $f24, 0x1C($s0) /* 1A76F0 80278E10 E6000010 */ swc1 $f0, 0x10($s0) /* 1A76F4 80278E14 46000786 */ mov.s $f30, $f0 /* 1A76F8 80278E18 4406D000 */ mfc1 $a2, $f26 /* 1A76FC 80278E1C 4407E000 */ mfc1 $a3, $f28 /* 1A7700 80278E20 C6000144 */ lwc1 $f0, 0x144($s0) /* 1A7704 80278E24 4600A386 */ mov.s $f14, $f20 /* 1A7708 80278E28 E6140014 */ swc1 $f20, 0x14($s0) /* 1A770C 80278E2C E600000C */ swc1 $f0, 0xC($s0) /* 1A7710 80278E30 46000586 */ mov.s $f22, $f0 /* 1A7714 80278E34 0C00A720 */ jal atan2 /* 1A7718 80278E38 4600B306 */ mov.s $f12, $f22 /* 1A771C 80278E3C 4600B306 */ mov.s $f12, $f22 /* 1A7720 80278E40 4600A386 */ mov.s $f14, $f20 /* 1A7724 80278E44 4406D000 */ mfc1 $a2, $f26 /* 1A7728 80278E48 4407E000 */ mfc1 $a3, $f28 /* 1A772C 80278E4C 461EC781 */ sub.s $f30, $f24, $f30 /* 1A7730 80278E50 0C00A7B5 */ jal dist2D /* 1A7734 80278E54 E6000054 */ swc1 $f0, 0x54($s0) /* 1A7738 80278E58 86020070 */ lh $v0, 0x70($s0) /* 1A773C 80278E5C 46000106 */ mov.s $f4, $f0 /* 1A7740 80278E60 14400012 */ bnez $v0, .L80278EAC /* 1A7744 80278E64 E6040058 */ swc1 $f4, 0x58($s0) /* 1A7748 80278E68 C600004C */ lwc1 $f0, 0x4C($s0) /* 1A774C 80278E6C C602004C */ lwc1 $f2, 0x4C($s0) /* 1A7750 80278E70 46002003 */ div.s $f0, $f4, $f0 /* 1A7754 80278E74 4600028D */ trunc.w.s $f10, $f0 /* 1A7758 80278E78 44035000 */ mfc1 $v1, $f10 /* 1A775C 80278E7C 00000000 */ nop /* 1A7760 80278E80 00031400 */ sll $v0, $v1, 16 /* 1A7764 80278E84 00021403 */ sra $v0, $v0, 16 /* 1A7768 80278E88 44820000 */ mtc1 $v0, $f0 /* 1A776C 80278E8C 00000000 */ nop /* 1A7770 80278E90 46800020 */ cvt.s.w $f0, $f0 /* 1A7774 80278E94 46020002 */ mul.s $f0, $f0, $f2 /* 1A7778 80278E98 00000000 */ nop /* 1A777C 80278E9C 46002086 */ mov.s $f2, $f4 /* 1A7780 80278EA0 A6030070 */ sh $v1, 0x70($s0) /* 1A7784 80278EA4 0809E3B8 */ j .L80278EE0 /* 1A7788 80278EA8 46001201 */ sub.s $f8, $f2, $f0 .L80278EAC: /* 1A778C 80278EAC 44821000 */ mtc1 $v0, $f2 /* 1A7790 80278EB0 00000000 */ nop /* 1A7794 80278EB4 468010A0 */ cvt.s.w $f2, $f2 /* 1A7798 80278EB8 86020070 */ lh $v0, 0x70($s0) /* 1A779C 80278EBC 46022083 */ div.s $f2, $f4, $f2 /* 1A77A0 80278EC0 44820000 */ mtc1 $v0, $f0 /* 1A77A4 80278EC4 00000000 */ nop /* 1A77A8 80278EC8 46800020 */ cvt.s.w $f0, $f0 /* 1A77AC 80278ECC 46020002 */ mul.s $f0, $f0, $f2 /* 1A77B0 80278ED0 00000000 */ nop /* 1A77B4 80278ED4 C6040058 */ lwc1 $f4, 0x58($s0) /* 1A77B8 80278ED8 E602004C */ swc1 $f2, 0x4C($s0) /* 1A77BC 80278EDC 46002201 */ sub.s $f8, $f4, $f0 .L80278EE0: /* 1A77C0 80278EE0 86420064 */ lh $v0, 0x64($s2) /* 1A77C4 80278EE4 14400003 */ bnez $v0, .L80278EF4 /* 1A77C8 80278EE8 00000000 */ nop /* 1A77CC 80278EEC 0809E436 */ j .L802790D8 /* 1A77D0 80278EF0 24020002 */ addiu $v0, $zero, 0x2 .L80278EF4: /* 1A77D4 80278EF4 C642003C */ lwc1 $f2, 0x3C($s2) /* 1A77D8 80278EF8 44823000 */ mtc1 $v0, $f6 /* 1A77DC 80278EFC 00000000 */ nop /* 1A77E0 80278F00 468031A0 */ cvt.s.w $f6, $f6 /* 1A77E4 80278F04 46061082 */ mul.s $f2, $f2, $f6 /* 1A77E8 80278F08 00000000 */ nop /* 1A77EC 80278F0C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1A77F0 80278F10 44810000 */ mtc1 $at, $f0 /* 1A77F4 80278F14 00000000 */ nop /* 1A77F8 80278F18 46001082 */ mul.s $f2, $f2, $f0 /* 1A77FC 80278F1C 00000000 */ nop /* 1A7800 80278F20 86420064 */ lh $v0, 0x64($s2) /* 1A7804 80278F24 C6440040 */ lwc1 $f4, 0x40($s2) /* 1A7808 80278F28 44820000 */ mtc1 $v0, $f0 /* 1A780C 80278F2C 00000000 */ nop /* 1A7810 80278F30 46800020 */ cvt.s.w $f0, $f0 /* 1A7814 80278F34 46004003 */ div.s $f0, $f8, $f0 /* 1A7818 80278F38 46002100 */ add.s $f4, $f4, $f0 /* 1A781C 80278F3C 4606F183 */ div.s $f6, $f30, $f6 /* 1A7820 80278F40 46061080 */ add.s $f2, $f2, $f6 /* 1A7824 80278F44 E6440040 */ swc1 $f4, 0x40($s2) /* 1A7828 80278F48 E6420044 */ swc1 $f2, 0x44($s2) /* 1A782C 80278F4C 8E620078 */ lw $v0, 0x78($s3) /* 1A7830 80278F50 10400005 */ beqz $v0, .L80278F68 /* 1A7834 80278F54 00000000 */ nop /* 1A7838 80278F58 86040192 */ lh $a0, 0x192($s0) /* 1A783C 80278F5C 82050077 */ lb $a1, 0x77($s0) /* 1A7840 80278F60 0C098F3F */ jal set_animation /* 1A7844 80278F64 8E060064 */ lw $a2, 0x64($s0) .L80278F68: /* 1A7848 80278F68 8E62007C */ lw $v0, 0x7C($s3) /* 1A784C 80278F6C 30420002 */ andi $v0, $v0, 0x2 /* 1A7850 80278F70 1440000C */ bnez $v0, .L80278FA4 /* 1A7854 80278F74 24020001 */ addiu $v0, $zero, 0x1 /* 1A7858 80278F78 8E0201AC */ lw $v0, 0x1AC($s0) /* 1A785C 80278F7C 10400009 */ beqz $v0, .L80278FA4 /* 1A7860 80278F80 24020001 */ addiu $v0, $zero, 0x1 /* 1A7864 80278F84 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A7868 80278F88 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A786C 80278F8C 8E0401AC */ lw $a0, 0x1AC($s0) /* 1A7870 80278F90 8E060144 */ lw $a2, 0x144($s0) /* 1A7874 80278F94 8E070148 */ lw $a3, 0x148($s0) /* 1A7878 80278F98 0C052757 */ jal sfx_play_sound_at_position /* 1A787C 80278F9C 0000282D */ daddu $a1, $zero, $zero /* 1A7880 80278FA0 24020001 */ addiu $v0, $zero, 0x1 .L80278FA4: /* 1A7884 80278FA4 AE620070 */ sw $v0, 0x70($s3) .L80278FA8: /* 1A7888 80278FA8 8E700074 */ lw $s0, 0x74($s3) /* 1A788C 80278FAC C6000050 */ lwc1 $f0, 0x50($s0) /* 1A7890 80278FB0 C6020010 */ lwc1 $f2, 0x10($s0) /* 1A7894 80278FB4 46000106 */ mov.s $f4, $f0 /* 1A7898 80278FB8 46001080 */ add.s $f2, $f2, $f0 /* 1A789C 80278FBC C6000048 */ lwc1 $f0, 0x48($s0) /* 1A78A0 80278FC0 46002101 */ sub.s $f4, $f4, $f0 /* 1A78A4 80278FC4 E6020010 */ swc1 $f2, 0x10($s0) /* 1A78A8 80278FC8 E6040050 */ swc1 $f4, 0x50($s0) /* 1A78AC 80278FCC 8E620078 */ lw $v0, 0x78($s3) /* 1A78B0 80278FD0 1040000B */ beqz $v0, .L80279000 /* 1A78B4 80278FD4 2612000C */ addiu $s2, $s0, 0xC /* 1A78B8 80278FD8 44800000 */ mtc1 $zero, $f0 /* 1A78BC 80278FDC 00000000 */ nop /* 1A78C0 80278FE0 4600203C */ c.lt.s $f4, $f0 /* 1A78C4 80278FE4 00000000 */ nop /* 1A78C8 80278FE8 45000005 */ bc1f .L80279000 /* 1A78CC 80278FEC 00000000 */ nop /* 1A78D0 80278FF0 86040192 */ lh $a0, 0x192($s0) /* 1A78D4 80278FF4 82050077 */ lb $a1, 0x77($s0) /* 1A78D8 80278FF8 0C098F3F */ jal set_animation /* 1A78DC 80278FFC 8E060068 */ lw $a2, 0x68($s0) .L80279000: /* 1A78E0 80279000 C6420044 */ lwc1 $f2, 0x44($s2) /* 1A78E4 80279004 44800000 */ mtc1 $zero, $f0 /* 1A78E8 80279008 00000000 */ nop /* 1A78EC 8027900C 4600103C */ c.lt.s $f2, $f0 /* 1A78F0 80279010 00000000 */ nop /* 1A78F4 80279014 45000007 */ bc1f .L80279034 /* 1A78F8 80279018 00000000 */ nop /* 1A78FC 8027901C C6400004 */ lwc1 $f0, 0x4($s2) /* 1A7900 80279020 C6420010 */ lwc1 $f2, 0x10($s2) /* 1A7904 80279024 4602003C */ c.lt.s $f0, $f2 /* 1A7908 80279028 00000000 */ nop /* 1A790C 8027902C 45030001 */ bc1tl .L80279034 /* 1A7910 80279030 E6420004 */ swc1 $f2, 0x4($s2) .L80279034: /* 1A7914 80279034 8E450040 */ lw $a1, 0x40($s2) /* 1A7918 80279038 8E460048 */ lw $a2, 0x48($s2) /* 1A791C 8027903C 0C09904A */ jal add_xz_vec3f /* 1A7920 80279040 0240202D */ daddu $a0, $s2, $zero /* 1A7924 80279044 C6400000 */ lwc1 $f0, 0x0($s2) /* 1A7928 80279048 E6000144 */ swc1 $f0, 0x144($s0) /* 1A792C 8027904C C6400004 */ lwc1 $f0, 0x4($s2) /* 1A7930 80279050 E6000148 */ swc1 $f0, 0x148($s0) /* 1A7934 80279054 C6400008 */ lwc1 $f0, 0x8($s2) /* 1A7938 80279058 E600014C */ swc1 $f0, 0x14C($s0) /* 1A793C 8027905C 96420064 */ lhu $v0, 0x64($s2) /* 1A7940 80279060 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A7944 80279064 A6420064 */ sh $v0, 0x64($s2) /* 1A7948 80279068 00021400 */ sll $v0, $v0, 16 /* 1A794C 8027906C 1C40001A */ bgtz $v0, .L802790D8 /* 1A7950 80279070 0000102D */ daddu $v0, $zero, $zero /* 1A7954 80279074 8E62007C */ lw $v0, 0x7C($s3) /* 1A7958 80279078 30420001 */ andi $v0, $v0, 0x1 /* 1A795C 8027907C 10400008 */ beqz $v0, .L802790A0 /* 1A7960 80279080 00000000 */ nop /* 1A7964 80279084 C6400048 */ lwc1 $f0, 0x48($s2) /* 1A7968 80279088 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A796C 8027908C 8E45000C */ lw $a1, 0xC($s2) /* 1A7970 80279090 8E460010 */ lw $a2, 0x10($s2) /* 1A7974 80279094 8E470014 */ lw $a3, 0x14($s2) /* 1A7978 80279098 0C0990BC */ jal play_movement_dust_effects /* 1A797C 8027909C 24040002 */ addiu $a0, $zero, 0x2 .L802790A0: /* 1A7980 802790A0 C640000C */ lwc1 $f0, 0xC($s2) /* 1A7984 802790A4 E6000144 */ swc1 $f0, 0x144($s0) /* 1A7988 802790A8 C6400010 */ lwc1 $f0, 0x10($s2) /* 1A798C 802790AC E6000148 */ swc1 $f0, 0x148($s0) /* 1A7990 802790B0 C6400014 */ lwc1 $f0, 0x14($s2) /* 1A7994 802790B4 E600014C */ swc1 $f0, 0x14C($s0) /* 1A7998 802790B8 8E620078 */ lw $v0, 0x78($s3) /* 1A799C 802790BC 10400006 */ beqz $v0, .L802790D8 /* 1A79A0 802790C0 24020001 */ addiu $v0, $zero, 0x1 /* 1A79A4 802790C4 86040192 */ lh $a0, 0x192($s0) /* 1A79A8 802790C8 8245006B */ lb $a1, 0x6B($s2) /* 1A79AC 802790CC 0C098F3F */ jal set_animation /* 1A79B0 802790D0 8E460060 */ lw $a2, 0x60($s2) /* 1A79B4 802790D4 24020001 */ addiu $v0, $zero, 0x1 .L802790D8: /* 1A79B8 802790D8 8FBF0028 */ lw $ra, 0x28($sp) /* 1A79BC 802790DC 8FB30024 */ lw $s3, 0x24($sp) /* 1A79C0 802790E0 8FB20020 */ lw $s2, 0x20($sp) /* 1A79C4 802790E4 8FB1001C */ lw $s1, 0x1C($sp) /* 1A79C8 802790E8 8FB00018 */ lw $s0, 0x18($sp) /* 1A79CC 802790EC D7BE0058 */ ldc1 $f30, 0x58($sp) /* 1A79D0 802790F0 D7BC0050 */ ldc1 $f28, 0x50($sp) /* 1A79D4 802790F4 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 1A79D8 802790F8 D7B80040 */ ldc1 $f24, 0x40($sp) /* 1A79DC 802790FC D7B60038 */ ldc1 $f22, 0x38($sp) /* 1A79E0 80279100 D7B40030 */ ldc1 $f20, 0x30($sp) /* 1A79E4 80279104 03E00008 */ jr $ra /* 1A79E8 80279108 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorState* actorState; s32 actorID; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; f32 moveDist; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { 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++); script->functionTemp[2] = evt_get_variable(script, *args++); script->functionTemp[3] = 0; if (evt_get_variable(script, *args++) != 0) { script->functionTemp[3] |= 1; } if (evt_get_variable(script, *args++) != 0) { script->functionTemp[3] |= 2; } actorState->currentPos.x = actor->currentPos.x; actorState->currentPos.y = actor->currentPos.y; actorState->currentPos.z = actor->currentPos.z; posX = actorState->currentPos.x; posY = actorState->currentPos.y; posZ = actorState->currentPos.z; goalX = actorState->goalPos.x; goalY = actorState->goalPos.y; goalZ = actorState->goalPos.z; actorState->angle = atan2(posX, posZ, goalX, goalZ); actorState->distance = dist2D(posX, posZ, goalX, goalZ); // make relative posX = (goalX - posX); posY = (goalY - posY); posZ = (goalZ - posZ); if (actorState->moveTime == 0) { actorState->moveTime = actorState->distance / actorState->speed; moveDist = actorState->distance - (actorState->moveTime * actorState->speed); } else { actorState->speed = actorState->distance / actorState->moveTime; moveDist = actorState->distance - (actorState->moveTime * actorState->speed); } if (actorState->moveTime == 0) { return ApiStatus_DONE2; } actorState->velocity = (actorState->acceleration * actorState->moveTime * 0.5f) + (posY / actorState->moveTime); actorState->speed += (moveDist / actorState->moveTime); if (script->functionTemp[2] != 0) { set_animation(actor->actorID, (s8) actor->state.jumpPartIndex, actor->state.animJumpRise); } if (!(script->functionTemp[3] & 2) && (actor->actorTypeData1[4] != 0)) { sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } script->functionTemp[0] = 1; } actor = script->functionTempPtr[1]; actorState = &actor->state; actorState->currentPos.y += actorState->velocity; actorState->velocity -= actorState->acceleration; if ((script->functionTemp[2] != 0) && (actorState->velocity < 0.0f)) { set_animation(actor->actorID, (s8) actorState->jumpPartIndex, actorState->animJumpFall); } if (actorState->velocity < 0.0f) { if (actorState->currentPos.y < actorState->goalPos.y) { actorState->currentPos.y = actorState->goalPos.y; } } add_xz_vec3f(&actorState->currentPos, actorState->speed, actorState->angle); actor->currentPos.x = actorState->currentPos.x; actor->currentPos.y = actorState->currentPos.y; actor->currentPos.z = actorState->currentPos.z; actorState->moveTime--; if (actorState->moveTime > 0) { return ApiStatus_BLOCK; } if (script->functionTemp[3] & 1) { play_movement_dust_effects(2, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, actorState->angle); } actor->currentPos.x = actorState->goalPos.x; actor->currentPos.y = actorState->goalPos.y; actor->currentPos.z = actorState->goalPos.z; if (script->functionTemp[2] != 0) { set_animation(actor->actorID, (s8) actorState->jumpPartIndex, actorState->animJumpLand); } return ApiStatus_DONE1; }