text
stringlengths
6.38k
228k
### RAW ASSEMBLY INSTRUCTIONS: glabel _Ldtob /* 46FD0 8006BBD0 27BDFF80 */ addiu $sp, $sp, -0x80 /* 46FD4 8006BBD4 AFB30054 */ sw $s3, 0x54($sp) /* 46FD8 8006BBD8 00809821 */ addu $s3, $a0, $zero /* 46FDC 8006BBDC AFB1004C */ sw $s1, 0x4C($sp) /* 46FE0 8006BBE0 27B10018 */ addiu $s1, $sp, 0x18 /* 46FE4 8006BBE4 AFBF0060 */ sw $ra, 0x60($sp) /* 46FE8 8006BBE8 AFB5005C */ sw $s5, 0x5C($sp) /* 46FEC 8006BBEC AFB40058 */ sw $s4, 0x58($sp) /* 46FF0 8006BBF0 AFB20050 */ sw $s2, 0x50($sp) /* 46FF4 8006BBF4 AFB00048 */ sw $s0, 0x48($sp) /* 46FF8 8006BBF8 F7B80078 */ sdc1 $f24, 0x78($sp) /* 46FFC 8006BBFC F7B60070 */ sdc1 $f22, 0x70($sp) /* 47000 8006BC00 F7B40068 */ sdc1 $f20, 0x68($sp) /* 47004 8006BC04 8E630024 */ lw $v1, 0x24($s3) /* 47008 8006BC08 D6740000 */ ldc1 $f20, 0x0($s3) /* 4700C 8006BC0C 04610003 */ bgez $v1, .L8006BC1C /* 47010 8006BC10 00A0A821 */ addu $s5, $a1, $zero /* 47014 8006BC14 0801AF12 */ j .L8006BC48 /* 47018 8006BC18 24020006 */ addiu $v0, $zero, 0x6 .L8006BC1C: /* 4701C 8006BC1C 1460000C */ bnez $v1, .L8006BC50 /* 47020 8006BC20 27A40038 */ addiu $a0, $sp, 0x38 /* 47024 8006BC24 00051600 */ sll $v0, $a1, 24 /* 47028 8006BC28 00021603 */ sra $v0, $v0, 24 /* 4702C 8006BC2C 38430067 */ xori $v1, $v0, 0x67 /* 47030 8006BC30 2C630001 */ sltiu $v1, $v1, 0x1 /* 47034 8006BC34 38420047 */ xori $v0, $v0, 0x47 /* 47038 8006BC38 2C420001 */ sltiu $v0, $v0, 0x1 /* 4703C 8006BC3C 00621825 */ or $v1, $v1, $v0 /* 47040 8006BC40 10600003 */ beqz $v1, .L8006BC50 /* 47044 8006BC44 24020001 */ addiu $v0, $zero, 0x1 .L8006BC48: /* 47048 8006BC48 AE620024 */ sw $v0, 0x24($s3) /* 4704C 8006BC4C 27A40038 */ addiu $a0, $sp, 0x38 .L8006BC50: /* 47050 8006BC50 0C01B007 */ jal _Ldunscale /* 47054 8006BC54 02602821 */ addu $a1, $s3, $zero /* 47058 8006BC58 00021400 */ sll $v0, $v0, 16 /* 4705C 8006BC5C 00021C03 */ sra $v1, $v0, 16 /* 47060 8006BC60 18600010 */ blez $v1, .L8006BCA4 /* 47064 8006BC64 24020002 */ addiu $v0, $zero, 0x2 /* 47068 8006BC68 3C06800A */ lui $a2, %hi(D_80099E1C) /* 4706C 8006BC6C 24C69E1C */ addiu $a2, $a2, %lo(D_80099E1C) /* 47070 8006BC70 8E670008 */ lw $a3, 0x8($s3) /* 47074 8006BC74 14620003 */ bne $v1, $v0, .L8006BC84 /* 47078 8006BC78 24020003 */ addiu $v0, $zero, 0x3 /* 4707C 8006BC7C 3C06800A */ lui $a2, %hi(D_80099E18) /* 47080 8006BC80 24C69E18 */ addiu $a2, $a2, %lo(D_80099E18) .L8006BC84: /* 47084 8006BC84 AE620014 */ sw $v0, 0x14($s3) /* 47088 8006BC88 80C20000 */ lb $v0, 0x0($a2) /* 4708C 8006BC8C 80C30001 */ lb $v1, 0x1($a2) /* 47090 8006BC90 80C40002 */ lb $a0, 0x2($a2) /* 47094 8006BC94 A0E20000 */ sb $v0, 0x0($a3) /* 47098 8006BC98 A0E30001 */ sb $v1, 0x1($a3) /* 4709C 8006BC9C 0801AFFB */ j .L8006BFEC /* 470A0 8006BCA0 A0E40002 */ sb $a0, 0x2($a3) .L8006BCA4: /* 470A4 8006BCA4 14600003 */ bnez $v1, .L8006BCB4 /* 470A8 8006BCA8 00003821 */ addu $a3, $zero, $zero /* 470AC 8006BCAC 0801AFF2 */ j .L8006BFC8 /* 470B0 8006BCB0 A7A00038 */ sh $zero, 0x38($sp) .L8006BCB4: /* 470B4 8006BCB4 44800000 */ mtc1 $zero, $f0 /* 470B8 8006BCB8 44800800 */ mtc1 $zero, $f1 /* 470BC 8006BCBC 00000000 */ nop /* 470C0 8006BCC0 4620A03C */ c.lt.d $f20, $f0 /* 470C4 8006BCC4 00000000 */ nop /* 470C8 8006BCC8 00000000 */ nop /* 470CC 8006BCCC 45030001 */ bc1tl .L8006BCD4 /* 470D0 8006BCD0 4620A507 */ neg.d $f20, $f20 .L8006BCD4: /* 470D4 8006BCD4 87A30038 */ lh $v1, 0x38($sp) /* 470D8 8006BCD8 24027597 */ addiu $v0, $zero, 0x7597 /* 470DC 8006BCDC 00620018 */ mult $v1, $v0 /* 470E0 8006BCE0 00001812 */ mflo $v1 /* 470E4 8006BCE4 3C0214F8 */ lui $v0, (0x14F8B589 >> 16) /* 470E8 8006BCE8 3442B589 */ ori $v0, $v0, (0x14F8B589 & 0xFFFF) /* 470EC 8006BCEC 00620018 */ mult $v1, $v0 /* 470F0 8006BCF0 00031FC3 */ sra $v1, $v1, 31 /* 470F4 8006BCF4 00004010 */ mfhi $t0 /* 470F8 8006BCF8 00081343 */ sra $v0, $t0, 13 /* 470FC 8006BCFC 00431023 */ subu $v0, $v0, $v1 /* 47100 8006BD00 2443FFFC */ addiu $v1, $v0, -0x4 /* 47104 8006BD04 00031400 */ sll $v0, $v1, 16 /* 47108 8006BD08 00021403 */ sra $v0, $v0, 16 /* 4710C 8006BD0C 04410013 */ bgez $v0, .L8006BD5C /* 47110 8006BD10 A7A30038 */ sh $v1, 0x38($sp) /* 47114 8006BD14 00021023 */ negu $v0, $v0 /* 47118 8006BD18 24420003 */ addiu $v0, $v0, 0x3 /* 4711C 8006BD1C 2403FFFC */ addiu $v1, $zero, -0x4 /* 47120 8006BD20 00431824 */ and $v1, $v0, $v1 /* 47124 8006BD24 00031023 */ negu $v0, $v1 /* 47128 8006BD28 1860001F */ blez $v1, .L8006BDA8 /* 4712C 8006BD2C A7A20038 */ sh $v0, 0x38($sp) /* 47130 8006BD30 3C04800A */ lui $a0, %hi(D_80099DD0) /* 47134 8006BD34 24849DD0 */ addiu $a0, $a0, %lo(D_80099DD0) .L8006BD38: /* 47138 8006BD38 30620001 */ andi $v0, $v1, 0x1 /* 4713C 8006BD3C 10400003 */ beqz $v0, .L8006BD4C /* 47140 8006BD40 00031843 */ sra $v1, $v1, 1 /* 47144 8006BD44 D4800000 */ ldc1 $f0, 0x0($a0) /* 47148 8006BD48 4620A502 */ mul.d $f20, $f20, $f0 .L8006BD4C: /* 4714C 8006BD4C 1C60FFFA */ bgtz $v1, .L8006BD38 /* 47150 8006BD50 24840008 */ addiu $a0, $a0, 0x8 /* 47154 8006BD54 0801AF6A */ j .L8006BDA8 /* 47158 8006BD58 00000000 */ nop .L8006BD5C: /* 4715C 8006BD5C 18400012 */ blez $v0, .L8006BDA8 /* 47160 8006BD60 2402FFFC */ addiu $v0, $zero, -0x4 /* 47164 8006BD64 3C01800A */ lui $at, %hi(D_80099E20) /* 47168 8006BD68 D4229E20 */ ldc1 $f2, %lo(D_80099E20)($at) /* 4716C 8006BD6C 00621024 */ and $v0, $v1, $v0 /* 47170 8006BD70 00021C00 */ sll $v1, $v0, 16 /* 47174 8006BD74 00031C03 */ sra $v1, $v1, 16 /* 47178 8006BD78 1860000A */ blez $v1, .L8006BDA4 /* 4717C 8006BD7C A7A20038 */ sh $v0, 0x38($sp) /* 47180 8006BD80 3C04800A */ lui $a0, %hi(D_80099DD0) /* 47184 8006BD84 24849DD0 */ addiu $a0, $a0, %lo(D_80099DD0) .L8006BD88: /* 47188 8006BD88 30620001 */ andi $v0, $v1, 0x1 /* 4718C 8006BD8C 10400003 */ beqz $v0, .L8006BD9C /* 47190 8006BD90 00031843 */ sra $v1, $v1, 1 /* 47194 8006BD94 D4800000 */ ldc1 $f0, 0x0($a0) /* 47198 8006BD98 46201082 */ mul.d $f2, $f2, $f0 .L8006BD9C: /* 4719C 8006BD9C 1C60FFFA */ bgtz $v1, .L8006BD88 /* 471A0 8006BDA0 24840008 */ addiu $a0, $a0, 0x8 .L8006BDA4: /* 471A4 8006BDA4 4622A503 */ div.d $f20, $f20, $f2 .L8006BDA8: /* 471A8 8006BDA8 8E640024 */ lw $a0, 0x24($s3) /* 471AC 8006BDAC 00151600 */ sll $v0, $s5, 24 /* 471B0 8006BDB0 00021603 */ sra $v0, $v0, 24 /* 471B4 8006BDB4 24030066 */ addiu $v1, $zero, 0x66 /* 471B8 8006BDB8 14430004 */ bne $v0, $v1, .L8006BDCC /* 471BC 8006BDBC 24920006 */ addiu $s2, $a0, 0x6 /* 471C0 8006BDC0 87A30038 */ lh $v1, 0x38($sp) /* 471C4 8006BDC4 2482000A */ addiu $v0, $a0, 0xA /* 471C8 8006BDC8 00439021 */ addu $s2, $v0, $v1 .L8006BDCC: /* 471CC 8006BDCC 2A420014 */ slti $v0, $s2, 0x14 /* 471D0 8006BDD0 50400001 */ beql $v0, $zero, .L8006BDD8 /* 471D4 8006BDD4 24120013 */ addiu $s2, $zero, 0x13 .L8006BDD8: /* 471D8 8006BDD8 24020030 */ addiu $v0, $zero, 0x30 /* 471DC 8006BDDC A2220000 */ sb $v0, 0x0($s1) /* 471E0 8006BDE0 26310001 */ addiu $s1, $s1, 0x1 /* 471E4 8006BDE4 4480C000 */ mtc1 $zero, $f24 /* 471E8 8006BDE8 4480C800 */ mtc1 $zero, $f25 /* 471EC 8006BDEC 3C01800A */ lui $at, %hi(D_80099E28) /* 471F0 8006BDF0 D4369E28 */ ldc1 $f22, %lo(D_80099E28)($at) /* 471F4 8006BDF4 24140030 */ addiu $s4, $zero, 0x30 .L8006BDF8: /* 471F8 8006BDF8 4634C03C */ c.lt.d $f24, $f20 /* 471FC 8006BDFC 24030001 */ addiu $v1, $zero, 0x1 /* 47200 8006BE00 00000000 */ nop /* 47204 8006BE04 45010002 */ bc1t .L8006BE10 /* 47208 8006BE08 0012102A */ slt $v0, $zero, $s2 /* 4720C 8006BE0C 00001821 */ addu $v1, $zero, $zero .L8006BE10: /* 47210 8006BE10 00431024 */ and $v0, $v0, $v1 /* 47214 8006BE14 10400021 */ beqz $v0, .L8006BE9C /* 47218 8006BE18 2652FFF8 */ addiu $s2, $s2, -0x8 /* 4721C 8006BE1C 4620A00D */ trunc.w.d $f0, $f20 /* 47220 8006BE20 44050000 */ mfc1 $a1, $f0 /* 47224 8006BE24 00000000 */ nop /* 47228 8006BE28 1A400006 */ blez $s2, .L8006BE44 /* 4722C 8006BE2C 26310008 */ addiu $s1, $s1, 0x8 /* 47230 8006BE30 44850000 */ mtc1 $a1, $f0 /* 47234 8006BE34 00000000 */ nop /* 47238 8006BE38 46800021 */ cvt.d.w $f0, $f0 /* 4723C 8006BE3C 4620A001 */ sub.d $f0, $f20, $f0 /* 47240 8006BE40 46360502 */ mul.d $f20, $f0, $f22 .L8006BE44: /* 47244 8006BE44 18A00010 */ blez $a1, .L8006BE88 /* 47248 8006BE48 24100008 */ addiu $s0, $zero, 0x8 /* 4724C 8006BE4C 2610FFFF */ addiu $s0, $s0, -0x1 .L8006BE50: /* 47250 8006BE50 0600000D */ bltz $s0, .L8006BE88 /* 47254 8006BE54 27A40040 */ addiu $a0, $sp, 0x40 /* 47258 8006BE58 0C01B588 */ jal ldiv /* 4725C 8006BE5C 2406000A */ addiu $a2, $zero, 0xA /* 47260 8006BE60 8FA20044 */ lw $v0, 0x44($sp) /* 47264 8006BE64 2631FFFF */ addiu $s1, $s1, -0x1 /* 47268 8006BE68 24420030 */ addiu $v0, $v0, 0x30 /* 4726C 8006BE6C A2220000 */ sb $v0, 0x0($s1) /* 47270 8006BE70 8FA50040 */ lw $a1, 0x40($sp) /* 47274 8006BE74 1CA0FFF6 */ bgtz $a1, .L8006BE50 /* 47278 8006BE78 2610FFFF */ addiu $s0, $s0, -0x1 /* 4727C 8006BE7C 0801AFA3 */ j .L8006BE8C /* 47280 8006BE80 00000000 */ nop .L8006BE84: /* 47284 8006BE84 A2340000 */ sb $s4, 0x0($s1) .L8006BE88: /* 47288 8006BE88 2610FFFF */ addiu $s0, $s0, -0x1 .L8006BE8C: /* 4728C 8006BE8C 0603FFFD */ bgezl $s0, .L8006BE84 /* 47290 8006BE90 2631FFFF */ addiu $s1, $s1, -0x1 /* 47294 8006BE94 0801AF7E */ j .L8006BDF8 /* 47298 8006BE98 26310008 */ addiu $s1, $s1, 0x8 .L8006BE9C: /* 4729C 8006BE9C 2623FFFF */ addiu $v1, $s1, -0x1 /* 472A0 8006BEA0 27A20018 */ addiu $v0, $sp, 0x18 /* 472A4 8006BEA4 00629023 */ subu $s2, $v1, $v0 /* 472A8 8006BEA8 97A20038 */ lhu $v0, 0x38($sp) /* 472AC 8006BEAC 83A30019 */ lb $v1, 0x19($sp) /* 472B0 8006BEB0 24420007 */ addiu $v0, $v0, 0x7 /* 472B4 8006BEB4 A7A20038 */ sh $v0, 0x38($sp) /* 472B8 8006BEB8 24020030 */ addiu $v0, $zero, 0x30 /* 472BC 8006BEBC 14620009 */ bne $v1, $v0, .L8006BEE4 /* 472C0 8006BEC0 27B10019 */ addiu $s1, $sp, 0x19 /* 472C4 8006BEC4 24030030 */ addiu $v1, $zero, 0x30 .L8006BEC8: /* 472C8 8006BEC8 97A20038 */ lhu $v0, 0x38($sp) /* 472CC 8006BECC 26310001 */ addiu $s1, $s1, 0x1 /* 472D0 8006BED0 2442FFFF */ addiu $v0, $v0, -0x1 /* 472D4 8006BED4 A7A20038 */ sh $v0, 0x38($sp) /* 472D8 8006BED8 82220000 */ lb $v0, 0x0($s1) /* 472DC 8006BEDC 1043FFFA */ beq $v0, $v1, .L8006BEC8 /* 472E0 8006BEE0 2652FFFF */ addiu $s2, $s2, -0x1 .L8006BEE4: /* 472E4 8006BEE4 8E650024 */ lw $a1, 0x24($s3) /* 472E8 8006BEE8 00151600 */ sll $v0, $s5, 24 /* 472EC 8006BEEC 00022603 */ sra $a0, $v0, 24 /* 472F0 8006BEF0 24020066 */ addiu $v0, $zero, 0x66 /* 472F4 8006BEF4 14820005 */ bne $a0, $v0, .L8006BF0C /* 472F8 8006BEF8 38830065 */ xori $v1, $a0, 0x65 /* 472FC 8006BEFC 87A30038 */ lh $v1, 0x38($sp) /* 47300 8006BF00 24A20001 */ addiu $v0, $a1, 0x1 /* 47304 8006BF04 0801AFC8 */ j .L8006BF20 /* 47308 8006BF08 00433821 */ addu $a3, $v0, $v1 .L8006BF0C: /* 4730C 8006BF0C 2C630001 */ sltiu $v1, $v1, 0x1 /* 47310 8006BF10 38820045 */ xori $v0, $a0, 0x45 /* 47314 8006BF14 2C420001 */ sltiu $v0, $v0, 0x1 /* 47318 8006BF18 00621825 */ or $v1, $v1, $v0 /* 4731C 8006BF1C 00A33821 */ addu $a3, $a1, $v1 .L8006BF20: /* 47320 8006BF20 00071400 */ sll $v0, $a3, 16 /* 47324 8006BF24 00021403 */ sra $v0, $v0, 16 /* 47328 8006BF28 0242102A */ slt $v0, $s2, $v0 /* 4732C 8006BF2C 54400001 */ bnel $v0, $zero, .L8006BF34 /* 47330 8006BF30 02403821 */ addu $a3, $s2, $zero .L8006BF34: /* 47334 8006BF34 00071400 */ sll $v0, $a3, 16 /* 47338 8006BF38 00022403 */ sra $a0, $v0, 16 /* 4733C 8006BF3C 18800022 */ blez $a0, .L8006BFC8 /* 47340 8006BF40 0092102A */ slt $v0, $a0, $s2 /* 47344 8006BF44 10400008 */ beqz $v0, .L8006BF68 /* 47348 8006BF48 24030030 */ addiu $v1, $zero, 0x30 /* 4734C 8006BF4C 02241021 */ addu $v0, $s1, $a0 /* 47350 8006BF50 80420000 */ lb $v0, 0x0($v0) /* 47354 8006BF54 28420035 */ slti $v0, $v0, 0x35 /* 47358 8006BF58 38420001 */ xori $v0, $v0, 0x1 /* 4735C 8006BF5C 00021023 */ negu $v0, $v0 /* 47360 8006BF60 30420039 */ andi $v0, $v0, 0x39 /* 47364 8006BF64 34430030 */ ori $v1, $v0, 0x30 .L8006BF68: /* 47368 8006BF68 2485FFFF */ addiu $a1, $a0, -0x1 /* 4736C 8006BF6C 02252021 */ addu $a0, $s1, $a1 /* 47370 8006BF70 80820000 */ lb $v0, 0x0($a0) /* 47374 8006BF74 54430008 */ bnel $v0, $v1, .L8006BF98 /* 47378 8006BF78 24020039 */ addiu $v0, $zero, 0x39 /* 4737C 8006BF7C 00403021 */ addu $a2, $v0, $zero .L8006BF80: /* 47380 8006BF80 2484FFFF */ addiu $a0, $a0, -0x1 /* 47384 8006BF84 80820000 */ lb $v0, 0x0($a0) /* 47388 8006BF88 24E7FFFF */ addiu $a3, $a3, -0x1 /* 4738C 8006BF8C 1046FFFC */ beq $v0, $a2, .L8006BF80 /* 47390 8006BF90 24A5FFFF */ addiu $a1, $a1, -0x1 /* 47394 8006BF94 24020039 */ addiu $v0, $zero, 0x39 .L8006BF98: /* 47398 8006BF98 14620004 */ bne $v1, $v0, .L8006BFAC /* 4739C 8006BF9C 02251821 */ addu $v1, $s1, $a1 /* 473A0 8006BFA0 90620000 */ lbu $v0, 0x0($v1) /* 473A4 8006BFA4 24420001 */ addiu $v0, $v0, 0x1 /* 473A8 8006BFA8 A0620000 */ sb $v0, 0x0($v1) .L8006BFAC: /* 473AC 8006BFAC 04A10007 */ bgez $a1, .L8006BFCC /* 473B0 8006BFB0 02602021 */ addu $a0, $s3, $zero /* 473B4 8006BFB4 97A20038 */ lhu $v0, 0x38($sp) /* 473B8 8006BFB8 2631FFFF */ addiu $s1, $s1, -0x1 /* 473BC 8006BFBC 24E70001 */ addiu $a3, $a3, 0x1 /* 473C0 8006BFC0 24420001 */ addiu $v0, $v0, 0x1 /* 473C4 8006BFC4 A7A20038 */ sh $v0, 0x38($sp) .L8006BFC8: /* 473C8 8006BFC8 02602021 */ addu $a0, $s3, $zero .L8006BFCC: /* 473CC 8006BFCC 00152E00 */ sll $a1, $s5, 24 /* 473D0 8006BFD0 87A20038 */ lh $v0, 0x38($sp) /* 473D4 8006BFD4 00052E03 */ sra $a1, $a1, 24 /* 473D8 8006BFD8 02203021 */ addu $a2, $s1, $zero /* 473DC 8006BFDC 00073C00 */ sll $a3, $a3, 16 /* 473E0 8006BFE0 00073C03 */ sra $a3, $a3, 16 /* 473E4 8006BFE4 0C01B02D */ jal _Genld /* 473E8 8006BFE8 AFA20010 */ sw $v0, 0x10($sp) .L8006BFEC: /* 473EC 8006BFEC 8FBF0060 */ lw $ra, 0x60($sp) /* 473F0 8006BFF0 8FB5005C */ lw $s5, 0x5C($sp) /* 473F4 8006BFF4 8FB40058 */ lw $s4, 0x58($sp) /* 473F8 8006BFF8 8FB30054 */ lw $s3, 0x54($sp) /* 473FC 8006BFFC 8FB20050 */ lw $s2, 0x50($sp) /* 47400 8006C000 8FB1004C */ lw $s1, 0x4C($sp) /* 47404 8006C004 8FB00048 */ lw $s0, 0x48($sp) /* 47408 8006C008 D7B80078 */ ldc1 $f24, 0x78($sp) /* 4740C 8006C00C D7B60070 */ ldc1 $f22, 0x70($sp) /* 47410 8006C010 D7B40068 */ ldc1 $f20, 0x68($sp) /* 47414 8006C014 03E00008 */ jr $ra /* 47418 8006C018 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: void _Ldtob(_Pft* px, char code) { char buff[BUFF_LEN]; char *p; f64 ldval; s16 err; s16 nsig; s16 xexp; // char unused[0x4]; p = buff; ldval = px->v.ld; if (px->prec < 0) { px->prec = 6; } else if (px->prec == 0 && (code == 'g' || code == 'G')) { px->prec = 1; } err = _Ldunscale(&xexp, px); if (err > 0) { memcpy(px->s, err == 2 ? "NaN" : "Inf", px->n1 = 3); return; } else if (err == 0) { nsig = 0; xexp = 0; } else { int i; int n; if (ldval < 0) { ldval = -ldval; } // what if ((xexp = xexp * 30103 / 100000 - 4) < 0) { n = ALIGN(-xexp, 4), xexp = -n; for (i = 0; n > 0; n >>= 1, i++) { if (n & 1) { ldval *= pows[i]; } } } else if (xexp > 0) { f64 factor = 1; xexp &= ~3; for (n = xexp, i = 0; n > 0; n >>= 1, i++) { if (n & 1) { factor *= pows[i]; } } ldval /= factor; } { int gen = px->prec + ((code == 'f') ? 10 + xexp : 6); if (gen > 0x13) { gen = 0x13; } for (*p++ = '0'; gen > 0 && 0 < ldval; p += 8) { int j; int lo = ldval; if ((gen -= 8) > 0) { ldval = (ldval - lo) * 1e8; } for (p += 8, j = 8; lo > 0 && --j >= 0;) { ldiv_t qr = ldiv(lo, 10); *--p = qr.rem + '0', lo = qr.quot; } while (--j >= 0) { *--p = '0'; } } gen = p - &buff[1]; for (p = &buff[1], xexp += 7; *p == '0'; p++) { --gen, --xexp; } nsig = px->prec + ((code == 'f') ? xexp + 1 : ((code == 'e' || code == 'E') ? 1 : 0)); if (gen < nsig) { nsig = gen; } if (nsig > 0) { char drop = nsig < gen && '5' <= p[nsig] ? '9' : '0'; int n; for (n = nsig; p[--n] == drop;) { --nsig; } if (drop == '9') { ++p[n]; } if (n < 0) { --p, ++nsig, ++xexp; } } } } _Genld(px, code, p, nsig, xexp); }
### RAW ASSEMBLY INSTRUCTIONS: glabel osPfsReadWriteFile /* 43BE0 800687E0 27BDFEA0 */ addiu $sp, $sp, -0x160 /* 43BE4 800687E4 AFB60158 */ sw $s6, 0x158($sp) /* 43BE8 800687E8 8FB60170 */ lw $s6, 0x170($sp) /* 43BEC 800687EC AFB00140 */ sw $s0, 0x140($sp) /* 43BF0 800687F0 00808021 */ addu $s0, $a0, $zero /* 43BF4 800687F4 AFB50154 */ sw $s5, 0x154($sp) /* 43BF8 800687F8 00A0A821 */ addu $s5, $a1, $zero /* 43BFC 800687FC AFB10144 */ sw $s1, 0x144($sp) /* 43C00 80068800 00E08821 */ addu $s1, $a3, $zero /* 43C04 80068804 AFBF015C */ sw $ra, 0x15C($sp) /* 43C08 80068808 AFB40150 */ sw $s4, 0x150($sp) /* 43C0C 8006880C AFB3014C */ sw $s3, 0x14C($sp) /* 43C10 80068810 AFB20148 */ sw $s2, 0x148($sp) /* 43C14 80068814 8E020050 */ lw $v0, 0x50($s0) /* 43C18 80068818 00151FC2 */ srl $v1, $s5, 31 /* 43C1C 8006881C 02A2102A */ slt $v0, $s5, $v0 /* 43C20 80068820 38420001 */ xori $v0, $v0, 0x1 /* 43C24 80068824 00431025 */ or $v0, $v0, $v1 /* 43C28 80068828 1440003F */ bnez $v0, .L80068928 /* 43C2C 8006882C 00C0A021 */ addu $s4, $a2, $zero /* 43C30 80068830 1AC0003D */ blez $s6, .L80068928 /* 43C34 80068834 32C2001F */ andi $v0, $s6, 0x1F /* 43C38 80068838 544000EF */ bnel $v0, $zero, .L80068BF8 /* 43C3C 8006883C 24020005 */ addiu $v0, $zero, 0x5 /* 43C40 80068840 06200039 */ bltz $s1, .L80068928 /* 43C44 80068844 3222001F */ andi $v0, $s1, 0x1F /* 43C48 80068848 144000EB */ bnez $v0, .L80068BF8 /* 43C4C 8006884C 24020005 */ addiu $v0, $zero, 0x5 /* 43C50 80068850 8E020000 */ lw $v0, 0x0($s0) /* 43C54 80068854 30420001 */ andi $v0, $v0, 0x1 /* 43C58 80068858 104000E7 */ beqz $v0, .L80068BF8 /* 43C5C 8006885C 24020005 */ addiu $v0, $zero, 0x5 /* 43C60 80068860 0C01A775 */ jal __osCheckId /* 43C64 80068864 02002021 */ addu $a0, $s0, $zero /* 43C68 80068868 24030002 */ addiu $v1, $zero, 0x2 /* 43C6C 8006886C 104300E2 */ beq $v0, $v1, .L80068BF8 /* 43C70 80068870 24020002 */ addiu $v0, $zero, 0x2 /* 43C74 80068874 92020065 */ lbu $v0, 0x65($s0) /* 43C78 80068878 10400006 */ beqz $v0, .L80068894 /* 43C7C 8006887C 02002021 */ addu $a0, $s0, $zero /* 43C80 80068880 0C01A5B4 */ jal __osPfsSelectBank /* 43C84 80068884 00002821 */ addu $a1, $zero, $zero /* 43C88 80068888 00401821 */ addu $v1, $v0, $zero /* 43C8C 8006888C 146000DA */ bnez $v1, .L80068BF8 /* 43C90 80068890 00000000 */ nop .L80068894: /* 43C94 80068894 8E040004 */ lw $a0, 0x4($s0) /* 43C98 80068898 8E06005C */ lw $a2, 0x5C($s0) /* 43C9C 8006889C 8E050008 */ lw $a1, 0x8($s0) /* 43CA0 800688A0 27A70018 */ addiu $a3, $sp, 0x18 /* 43CA4 800688A4 00D53021 */ addu $a2, $a2, $s5 /* 43CA8 800688A8 0C01A874 */ jal __osContRamRead /* 43CAC 800688AC 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 43CB0 800688B0 00401821 */ addu $v1, $v0, $zero /* 43CB4 800688B4 146000D0 */ bnez $v1, .L80068BF8 /* 43CB8 800688B8 00000000 */ nop /* 43CBC 800688BC 97A2001C */ lhu $v0, 0x1C($sp) /* 43CC0 800688C0 104000CD */ beqz $v0, .L80068BF8 /* 43CC4 800688C4 24020005 */ addiu $v0, $zero, 0x5 /* 43CC8 800688C8 8FA20018 */ lw $v0, 0x18($sp) /* 43CCC 800688CC 104000CA */ beqz $v0, .L80068BF8 /* 43CD0 800688D0 24020005 */ addiu $v0, $zero, 0x5 /* 43CD4 800688D4 97A2001E */ lhu $v0, 0x1E($sp) /* 43CD8 800688D8 8E030060 */ lw $v1, 0x60($s0) /* 43CDC 800688DC 0043102A */ slt $v0, $v0, $v1 /* 43CE0 800688E0 1440000D */ bnez $v0, .L80068918 /* 43CE4 800688E4 00000000 */ nop /* 43CE8 800688E8 93A2001E */ lbu $v0, 0x1E($sp) /* 43CEC 800688EC 92030064 */ lbu $v1, 0x64($s0) /* 43CF0 800688F0 0043102B */ sltu $v0, $v0, $v1 /* 43CF4 800688F4 10400008 */ beqz $v0, .L80068918 /* 43CF8 800688F8 00000000 */ nop /* 43CFC 800688FC 93A2001F */ lbu $v0, 0x1F($sp) /* 43D00 80068900 2C430001 */ sltiu $v1, $v0, 0x1 /* 43D04 80068904 2C420080 */ sltiu $v0, $v0, 0x80 /* 43D08 80068908 38420001 */ xori $v0, $v0, 0x1 /* 43D0C 8006890C 00621825 */ or $v1, $v1, $v0 /* 43D10 80068910 50600007 */ beql $v1, $zero, .L80068930 /* 43D14 80068914 328200FF */ andi $v0, $s4, 0xFF .L80068918: /* 43D18 80068918 97A4001E */ lhu $a0, 0x1E($sp) /* 43D1C 8006891C 24030001 */ addiu $v1, $zero, 0x1 /* 43D20 80068920 148300B5 */ bne $a0, $v1, .L80068BF8 /* 43D24 80068924 24020003 */ addiu $v0, $zero, 0x3 .L80068928: /* 43D28 80068928 0801A2FE */ j .L80068BF8 /* 43D2C 8006892C 24020005 */ addiu $v0, $zero, 0x5 .L80068930: /* 43D30 80068930 14400007 */ bnez $v0, .L80068950 /* 43D34 80068934 240200FF */ addiu $v0, $zero, 0xFF /* 43D38 80068938 93A20020 */ lbu $v0, 0x20($sp) /* 43D3C 8006893C 30420002 */ andi $v0, $v0, 0x2 /* 43D40 80068940 14400003 */ bnez $v0, .L80068950 /* 43D44 80068944 240200FF */ addiu $v0, $zero, 0xFF /* 43D48 80068948 0801A2FE */ j .L80068BF8 /* 43D4C 8006894C 24020006 */ addiu $v0, $zero, 0x6 .L80068950: /* 43D50 80068950 02203821 */ addu $a3, $s1, $zero /* 43D54 80068954 04E10002 */ bgez $a3, .L80068960 /* 43D58 80068958 A3A20138 */ sb $v0, 0x138($sp) /* 43D5C 8006895C 24E7001F */ addiu $a3, $a3, 0x1F .L80068960: /* 43D60 80068960 97A2001E */ lhu $v0, 0x1E($sp) /* 43D64 80068964 00078943 */ sra $s1, $a3, 5 /* 43D68 80068968 A7A2013A */ sh $v0, 0x13A($sp) /* 43D6C 8006896C 2A220008 */ slti $v0, $s1, 0x8 /* 43D70 80068970 1440002C */ bnez $v0, .L80068A24 /* 43D74 80068974 02C01021 */ addu $v0, $s6, $zero /* 43D78 80068978 27B20038 */ addiu $s2, $sp, 0x38 /* 43D7C 8006897C 24130001 */ addiu $s3, $zero, 0x1 .L80068980: /* 43D80 80068980 93A3013A */ lbu $v1, 0x13A($sp) /* 43D84 80068984 93A20138 */ lbu $v0, 0x138($sp) /* 43D88 80068988 306700FF */ andi $a3, $v1, 0xFF /* 43D8C 8006898C 10E20007 */ beq $a3, $v0, .L800689AC /* 43D90 80068990 02002021 */ addu $a0, $s0, $zero /* 43D94 80068994 A3A30138 */ sb $v1, 0x138($sp) /* 43D98 80068998 02402821 */ addu $a1, $s2, $zero /* 43D9C 8006899C 0C01A7A3 */ jal __osPfsRWInode /* 43DA0 800689A0 00003021 */ addu $a2, $zero, $zero /* 43DA4 800689A4 1440001A */ bnez $v0, .L80068A10 /* 43DA8 800689A8 00401821 */ addu $v1, $v0, $zero .L800689AC: /* 43DAC 800689AC 93A2013B */ lbu $v0, 0x13B($sp) /* 43DB0 800689B0 00021040 */ sll $v0, $v0, 1 /* 43DB4 800689B4 00521021 */ addu $v0, $v0, $s2 /* 43DB8 800689B8 94430000 */ lhu $v1, 0x0($v0) /* 43DBC 800689BC A7A3013A */ sh $v1, 0x13A($sp) /* 43DC0 800689C0 8E020060 */ lw $v0, 0x60($s0) /* 43DC4 800689C4 0062182A */ slt $v1, $v1, $v0 /* 43DC8 800689C8 1460000D */ bnez $v1, .L80068A00 /* 43DCC 800689CC 00000000 */ nop /* 43DD0 800689D0 93A2013A */ lbu $v0, 0x13A($sp) /* 43DD4 800689D4 92030064 */ lbu $v1, 0x64($s0) /* 43DD8 800689D8 0043102B */ sltu $v0, $v0, $v1 /* 43DDC 800689DC 10400008 */ beqz $v0, .L80068A00 /* 43DE0 800689E0 00000000 */ nop /* 43DE4 800689E4 93A2013B */ lbu $v0, 0x13B($sp) /* 43DE8 800689E8 2C430001 */ sltiu $v1, $v0, 0x1 /* 43DEC 800689EC 2C420080 */ sltiu $v0, $v0, 0x80 /* 43DF0 800689F0 38420001 */ xori $v0, $v0, 0x1 /* 43DF4 800689F4 00621825 */ or $v1, $v1, $v0 /* 43DF8 800689F8 50600005 */ beql $v1, $zero, .L80068A10 /* 43DFC 800689FC 00001821 */ addu $v1, $zero, $zero .L80068A00: /* 43E00 80068A00 97A2013A */ lhu $v0, 0x13A($sp) /* 43E04 80068A04 14530002 */ bne $v0, $s3, .L80068A10 /* 43E08 80068A08 24030003 */ addiu $v1, $zero, 0x3 /* 43E0C 80068A0C 24030005 */ addiu $v1, $zero, 0x5 .L80068A10: /* 43E10 80068A10 14600074 */ bnez $v1, .L80068BE4 /* 43E14 80068A14 2631FFF8 */ addiu $s1, $s1, -0x8 /* 43E18 80068A18 2A220008 */ slti $v0, $s1, 0x8 /* 43E1C 80068A1C 1040FFD8 */ beqz $v0, .L80068980 /* 43E20 80068A20 02C01021 */ addu $v0, $s6, $zero .L80068A24: /* 43E24 80068A24 04420001 */ bltzl $v0, .L80068A2C /* 43E28 80068A28 2442001F */ addiu $v0, $v0, 0x1F .L80068A2C: /* 43E2C 80068A2C 00029943 */ sra $s3, $v0, 5 /* 43E30 80068A30 8FB20174 */ lw $s2, 0x174($sp) /* 43E34 80068A34 5A60004E */ blezl $s3, .L80068B70 /* 43E38 80068A38 328300FF */ andi $v1, $s4, 0xFF /* 43E3C 80068A3C 24160001 */ addiu $s6, $zero, 0x1 .L80068A40: /* 43E40 80068A40 24020008 */ addiu $v0, $zero, 0x8 /* 43E44 80068A44 16220028 */ bne $s1, $v0, .L80068AE8 /* 43E48 80068A48 00000000 */ nop /* 43E4C 80068A4C 93A3013A */ lbu $v1, 0x13A($sp) /* 43E50 80068A50 93A20138 */ lbu $v0, 0x138($sp) /* 43E54 80068A54 306700FF */ andi $a3, $v1, 0xFF /* 43E58 80068A58 10E20008 */ beq $a3, $v0, .L80068A7C /* 43E5C 80068A5C 27B10038 */ addiu $s1, $sp, 0x38 /* 43E60 80068A60 A3A30138 */ sb $v1, 0x138($sp) /* 43E64 80068A64 02002021 */ addu $a0, $s0, $zero /* 43E68 80068A68 02202821 */ addu $a1, $s1, $zero /* 43E6C 80068A6C 0C01A7A3 */ jal __osPfsRWInode /* 43E70 80068A70 00003021 */ addu $a2, $zero, $zero /* 43E74 80068A74 1440001A */ bnez $v0, .L80068AE0 /* 43E78 80068A78 00401821 */ addu $v1, $v0, $zero .L80068A7C: /* 43E7C 80068A7C 93A2013B */ lbu $v0, 0x13B($sp) /* 43E80 80068A80 00021040 */ sll $v0, $v0, 1 /* 43E84 80068A84 00511021 */ addu $v0, $v0, $s1 /* 43E88 80068A88 94430000 */ lhu $v1, 0x0($v0) /* 43E8C 80068A8C A7A3013A */ sh $v1, 0x13A($sp) /* 43E90 80068A90 8E020060 */ lw $v0, 0x60($s0) /* 43E94 80068A94 0062182A */ slt $v1, $v1, $v0 /* 43E98 80068A98 1460000D */ bnez $v1, .L80068AD0 /* 43E9C 80068A9C 00000000 */ nop /* 43EA0 80068AA0 93A2013A */ lbu $v0, 0x13A($sp) /* 43EA4 80068AA4 92030064 */ lbu $v1, 0x64($s0) /* 43EA8 80068AA8 0043102B */ sltu $v0, $v0, $v1 /* 43EAC 80068AAC 10400008 */ beqz $v0, .L80068AD0 /* 43EB0 80068AB0 00000000 */ nop /* 43EB4 80068AB4 93A2013B */ lbu $v0, 0x13B($sp) /* 43EB8 80068AB8 2C430001 */ sltiu $v1, $v0, 0x1 /* 43EBC 80068ABC 2C420080 */ sltiu $v0, $v0, 0x80 /* 43EC0 80068AC0 38420001 */ xori $v0, $v0, 0x1 /* 43EC4 80068AC4 00621825 */ or $v1, $v1, $v0 /* 43EC8 80068AC8 50600005 */ beql $v1, $zero, .L80068AE0 /* 43ECC 80068ACC 00001821 */ addu $v1, $zero, $zero .L80068AD0: /* 43ED0 80068AD0 97A2013A */ lhu $v0, 0x13A($sp) /* 43ED4 80068AD4 14560002 */ bne $v0, $s6, .L80068AE0 /* 43ED8 80068AD8 24030003 */ addiu $v1, $zero, 0x3 /* 43EDC 80068ADC 24030005 */ addiu $v1, $zero, 0x5 .L80068AE0: /* 43EE0 80068AE0 14600040 */ bnez $v1, .L80068BE4 /* 43EE4 80068AE4 00008821 */ addu $s1, $zero, $zero .L80068AE8: /* 43EE8 80068AE8 92020065 */ lbu $v0, 0x65($s0) /* 43EEC 80068AEC 93A5013A */ lbu $a1, 0x13A($sp) /* 43EF0 80068AF0 10450006 */ beq $v0, $a1, .L80068B0C /* 43EF4 80068AF4 00000000 */ nop /* 43EF8 80068AF8 0C01A5B4 */ jal __osPfsSelectBank /* 43EFC 80068AFC 02002021 */ addu $a0, $s0, $zero /* 43F00 80068B00 00401821 */ addu $v1, $v0, $zero /* 43F04 80068B04 1460003C */ bnez $v1, .L80068BF8 /* 43F08 80068B08 00601021 */ addu $v0, $v1, $zero .L80068B0C: /* 43F0C 80068B0C 93A2013B */ lbu $v0, 0x13B($sp) /* 43F10 80068B10 000210C0 */ sll $v0, $v0, 3 /* 43F14 80068B14 00513021 */ addu $a2, $v0, $s1 /* 43F18 80068B18 328200FF */ andi $v0, $s4, 0xFF /* 43F1C 80068B1C 54400008 */ bnel $v0, $zero, .L80068B40 /* 43F20 80068B20 AFA00010 */ sw $zero, 0x10($sp) /* 43F24 80068B24 8E040004 */ lw $a0, 0x4($s0) /* 43F28 80068B28 8E050008 */ lw $a1, 0x8($s0) /* 43F2C 80068B2C 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 43F30 80068B30 0C01A874 */ jal __osContRamRead /* 43F34 80068B34 02403821 */ addu $a3, $s2, $zero /* 43F38 80068B38 0801A2D6 */ j .L80068B58 /* 43F3C 80068B3C 00401821 */ addu $v1, $v0, $zero .L80068B40: /* 43F40 80068B40 8E040004 */ lw $a0, 0x4($s0) /* 43F44 80068B44 8E050008 */ lw $a1, 0x8($s0) /* 43F48 80068B48 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 43F4C 80068B4C 0C01A8F0 */ jal osContRamWrite /* 43F50 80068B50 02403821 */ addu $a3, $s2, $zero /* 43F54 80068B54 00401821 */ addu $v1, $v0, $zero .L80068B58: /* 43F58 80068B58 14600022 */ bnez $v1, .L80068BE4 /* 43F5C 80068B5C 26520020 */ addiu $s2, $s2, 0x20 /* 43F60 80068B60 2673FFFF */ addiu $s3, $s3, -0x1 /* 43F64 80068B64 1E60FFB6 */ bgtz $s3, .L80068A40 /* 43F68 80068B68 26310001 */ addiu $s1, $s1, 0x1 /* 43F6C 80068B6C 328300FF */ andi $v1, $s4, 0xFF .L80068B70: /* 43F70 80068B70 24020001 */ addiu $v0, $zero, 0x1 /* 43F74 80068B74 1462001D */ bne $v1, $v0, .L80068BEC /* 43F78 80068B78 00000000 */ nop /* 43F7C 80068B7C 93A30020 */ lbu $v1, 0x20($sp) /* 43F80 80068B80 30620002 */ andi $v0, $v1, 0x2 /* 43F84 80068B84 14400019 */ bnez $v0, .L80068BEC /* 43F88 80068B88 34620002 */ ori $v0, $v1, 0x2 /* 43F8C 80068B8C A3A20020 */ sb $v0, 0x20($sp) /* 43F90 80068B90 92020065 */ lbu $v0, 0x65($s0) /* 43F94 80068B94 10400006 */ beqz $v0, .L80068BB0 /* 43F98 80068B98 02002021 */ addu $a0, $s0, $zero /* 43F9C 80068B9C 0C01A5B4 */ jal __osPfsSelectBank /* 43FA0 80068BA0 00002821 */ addu $a1, $zero, $zero /* 43FA4 80068BA4 00401821 */ addu $v1, $v0, $zero /* 43FA8 80068BA8 14600013 */ bnez $v1, .L80068BF8 /* 43FAC 80068BAC 00000000 */ nop .L80068BB0: /* 43FB0 80068BB0 8E06005C */ lw $a2, 0x5C($s0) /* 43FB4 80068BB4 AFA00010 */ sw $zero, 0x10($sp) /* 43FB8 80068BB8 8E040004 */ lw $a0, 0x4($s0) /* 43FBC 80068BBC 8E050008 */ lw $a1, 0x8($s0) /* 43FC0 80068BC0 27A70018 */ addiu $a3, $sp, 0x18 /* 43FC4 80068BC4 00D53021 */ addu $a2, $a2, $s5 /* 43FC8 80068BC8 0C01A8F0 */ jal osContRamWrite /* 43FCC 80068BCC 30C6FFFF */ andi $a2, $a2, 0xFFFF /* 43FD0 80068BD0 00401821 */ addu $v1, $v0, $zero /* 43FD4 80068BD4 10600005 */ beqz $v1, .L80068BEC /* 43FD8 80068BD8 00000000 */ nop /* 43FDC 80068BDC 0801A2FE */ j .L80068BF8 /* 43FE0 80068BE0 00000000 */ nop .L80068BE4: /* 43FE4 80068BE4 0801A2FE */ j .L80068BF8 /* 43FE8 80068BE8 00601021 */ addu $v0, $v1, $zero .L80068BEC: /* 43FEC 80068BEC 8E040004 */ lw $a0, 0x4($s0) /* 43FF0 80068BF0 0C01A530 */ jal __osPfsGetStatus /* 43FF4 80068BF4 8E050008 */ lw $a1, 0x8($s0) .L80068BF8: /* 43FF8 80068BF8 8FBF015C */ lw $ra, 0x15C($sp) /* 43FFC 80068BFC 8FB60158 */ lw $s6, 0x158($sp) /* 44000 80068C00 8FB50154 */ lw $s5, 0x154($sp) /* 44004 80068C04 8FB40150 */ lw $s4, 0x150($sp) /* 44008 80068C08 8FB3014C */ lw $s3, 0x14C($sp) /* 4400C 80068C0C 8FB20148 */ lw $s2, 0x148($sp) /* 44010 80068C10 8FB10144 */ lw $s1, 0x144($sp) /* 44014 80068C14 8FB00140 */ lw $s0, 0x140($sp) /* 44018 80068C18 03E00008 */ jr $ra /* 4401C 80068C1C 27BD0160 */ addiu $sp, $sp, 0x160 ### DECOMPILED C INSTRUCTIONS: s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, int offset, int size, u8* data) { s32 ret; __OSDir dir; __OSInode inode; __OSInodeUnit curPage; s32 curBlock; s32 blockSize; u8* buffer; u8 bank; u16 blockno; if ((fileNo >= pfs->dir_size) || (fileNo < 0)) { return PFS_ERR_INVALID; } if ((size <= 0) || ((size % BLOCKSIZE) != 0)) { return PFS_ERR_INVALID; } if ((offset < 0) || ((offset % BLOCKSIZE) != 0)) { return PFS_ERR_INVALID; } if (!(pfs->status & PFS_INITIALIZED)) { return PFS_ERR_INVALID; } if (__osCheckId(pfs) == PFS_ERR_NEW_PACK) { return PFS_ERR_NEW_PACK; } if (pfs->activebank != 0 && (ret = __osPfsSelectBank(pfs, 0)) != 0) { return ret; } if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + fileNo, (u8*)&dir)) != 0) { return ret; } if ((dir.company_code == 0) || (dir.game_code == 0)) { return PFS_ERR_INVALID; } if (!CHECK_IPAGE(dir.start_page, *pfs)) { if (dir.start_page.ipage == PFS_EOF) { return PFS_ERR_INVALID; } return PFS_ERR_INCONSISTENT; } if ((flag == PFS_READ) && ((dir.status & PFS_WRITTEN) == 0)) { return PFS_ERR_BAD_DATA; } bank = 255; curBlock = offset / BLOCKSIZE; curPage = dir.start_page; while (curBlock >= 8) { if ((ret = __osPfsGetNextPage(pfs, &bank, &inode, &curPage)) != 0) { return ret; } curBlock -= 8; } blockSize = size / BLOCKSIZE; buffer = data; while (blockSize > 0) { if (curBlock == 8) { if ((ret = __osPfsGetNextPage(pfs, &bank, &inode, &curPage)) != 0) { return ret; } curBlock = 0; } if (pfs->activebank != curPage.inode_t.bank && (ret = __osPfsSelectBank(pfs, curPage.inode_t.bank)) != 0) { return ret; } blockno = curPage.inode_t.page * PFS_ONE_PAGE + curBlock; if (flag == PFS_READ) { ret = __osContRamRead(pfs->queue, pfs->channel, blockno, buffer); } else { ret = __osContRamWrite(pfs->queue, pfs->channel, blockno, buffer, 0); } if (ret != 0) { return ret; } buffer += BLOCKSIZE; curBlock++; blockSize--; } if (flag == PFS_WRITE && !(dir.status & PFS_WRITTEN)) { dir.status |= PFS_WRITTEN; if (pfs->activebank != 0 && (ret = __osPfsSelectBank(pfs, 0)) != 0) { return ret; } if ((ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + fileNo, (u8*)&dir, 0)) != 0) { return ret; } } return __osPfsGetStatus(pfs->queue, pfs->channel); }
### RAW ASSEMBLY INSTRUCTIONS: glabel aura_update /* 3773E8 E0076378 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 3773EC E007637C AFBF0010 */ sw $ra, 0x10($sp) /* 3773F0 E0076380 8C830000 */ lw $v1, 0x0($a0) /* 3773F4 E0076384 8C85000C */ lw $a1, 0xC($a0) /* 3773F8 E0076388 30620010 */ andi $v0, $v1, 0x10 /* 3773FC E007638C 10400005 */ beqz $v0, .LE00763A4 /* 377400 E0076390 2402FFEF */ addiu $v0, $zero, -0x11 /* 377404 E0076394 00621024 */ and $v0, $v1, $v0 /* 377408 E0076398 AC820000 */ sw $v0, 0x0($a0) /* 37740C E007639C 24020005 */ addiu $v0, $zero, 0x5 /* 377410 E00763A0 ACA2002C */ sw $v0, 0x2C($a1) .LE00763A4: /* 377414 E00763A4 3C030004 */ lui $v1, (0x4F1A0 >> 16) /* 377418 E00763A8 8CA20030 */ lw $v0, 0x30($a1) /* 37741C E00763AC 3463F1A0 */ ori $v1, $v1, (0x4F1A0 & 0xFFFF) /* 377420 E00763B0 24420001 */ addiu $v0, $v0, 0x1 /* 377424 E00763B4 0062182A */ slt $v1, $v1, $v0 /* 377428 E00763B8 10600003 */ beqz $v1, .LE00763C8 /* 37742C E00763BC ACA20030 */ sw $v0, 0x30($a1) /* 377430 E00763C0 24020100 */ addiu $v0, $zero, 0x100 /* 377434 E00763C4 ACA20030 */ sw $v0, 0x30($a1) .LE00763C8: /* 377438 E00763C8 8CA3002C */ lw $v1, 0x2C($a1) /* 37743C E00763CC 2862000B */ slti $v0, $v1, 0xB /* 377440 E00763D0 10400002 */ beqz $v0, .LE00763DC /* 377444 E00763D4 2462FFFF */ addiu $v0, $v1, -0x1 /* 377448 E00763D8 ACA2002C */ sw $v0, 0x2C($a1) .LE00763DC: /* 37744C E00763DC 8CA2002C */ lw $v0, 0x2C($a1) /* 377450 E00763E0 04410005 */ bgez $v0, .LE00763F8 /* 377454 E00763E4 0040382D */ daddu $a3, $v0, $zero /* 377458 E00763E8 0C080128 */ jal shim_remove_effect /* 37745C E00763EC 00000000 */ nop /* 377460 E00763F0 0801D9FF */ j .LE00767FC /* 377464 E00763F4 00000000 */ nop .LE00763F8: /* 377468 E00763F8 8CA60000 */ lw $a2, 0x0($a1) /* 37746C E00763FC 8CA40030 */ lw $a0, 0x30($a1) /* 377470 E0076400 28C20002 */ slti $v0, $a2, 0x2 /* 377474 E0076404 10400015 */ beqz $v0, .LE007645C /* 377478 E0076408 2882000B */ slti $v0, $a0, 0xB /* 37747C E007640C 1040001E */ beqz $v0, .LE0076488 /* 377480 E0076410 24020080 */ addiu $v0, $zero, 0x80 /* 377484 E0076414 8CA30028 */ lw $v1, 0x28($a1) /* 377488 E0076418 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 37748C E007641C 44810800 */ mtc1 $at, $f1 /* 377490 E0076420 44800000 */ mtc1 $zero, $f0 /* 377494 E0076424 00431023 */ subu $v0, $v0, $v1 /* 377498 E0076428 44821000 */ mtc1 $v0, $f2 /* 37749C E007642C 00000000 */ nop /* 3774A0 E0076430 468010A1 */ cvt.d.w $f2, $f2 /* 3774A4 E0076434 46201082 */ mul.d $f2, $f2, $f0 /* 3774A8 E0076438 00000000 */ nop /* 3774AC E007643C 44830000 */ mtc1 $v1, $f0 /* 3774B0 E0076440 00000000 */ nop /* 3774B4 E0076444 46800021 */ cvt.d.w $f0, $f0 /* 3774B8 E0076448 46220000 */ add.d $f0, $f0, $f2 /* 3774BC E007644C 4620048D */ trunc.w.d $f18, $f0 /* 3774C0 E0076450 E4B20028 */ swc1 $f18, 0x28($a1) /* 3774C4 E0076454 0801D923 */ j .LE007648C /* 3774C8 E0076458 28E2000A */ slti $v0, $a3, 0xA .LE007645C: /* 3774CC E007645C 1040000A */ beqz $v0, .LE0076488 /* 3774D0 E0076460 3C036666 */ lui $v1, (0x66666667 >> 16) /* 3774D4 E0076464 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF) /* 3774D8 E0076468 00041200 */ sll $v0, $a0, 8 /* 3774DC E007646C 00441023 */ subu $v0, $v0, $a0 /* 3774E0 E0076470 00430018 */ mult $v0, $v1 /* 3774E4 E0076474 000217C3 */ sra $v0, $v0, 31 /* 3774E8 E0076478 00004010 */ mfhi $t0 /* 3774EC E007647C 00081883 */ sra $v1, $t0, 2 /* 3774F0 E0076480 00621823 */ subu $v1, $v1, $v0 /* 3774F4 E0076484 ACA30028 */ sw $v1, 0x28($a1) .LE0076488: /* 3774F8 E0076488 28E2000A */ slti $v0, $a3, 0xA .LE007648C: /* 3774FC E007648C 1040000A */ beqz $v0, .LE00764B8 /* 377500 E0076490 00000000 */ nop /* 377504 E0076494 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 377508 E0076498 44811800 */ mtc1 $at, $f3 /* 37750C E007649C 44801000 */ mtc1 $zero, $f2 /* 377510 E00764A0 C4A00028 */ lwc1 $f0, 0x28($a1) /* 377514 E00764A4 46800021 */ cvt.d.w $f0, $f0 /* 377518 E00764A8 46220002 */ mul.d $f0, $f0, $f2 /* 37751C E00764AC 00000000 */ nop /* 377520 E00764B0 4620048D */ trunc.w.d $f18, $f0 /* 377524 E00764B4 E4B20028 */ swc1 $f18, 0x28($a1) .LE00764B8: /* 377528 E00764B8 14C0002E */ bnez $a2, .LE0076574 /* 37752C E00764BC 00000000 */ nop /* 377530 E00764C0 C4AE0038 */ lwc1 $f14, 0x38($a1) /* 377534 E00764C4 C4AA003C */ lwc1 $f10, 0x3C($a1) /* 377538 E00764C8 460E5281 */ sub.s $f10, $f10, $f14 /* 37753C E00764CC 3C01E007 */ lui $at, (0xE0076EE8 >> 16) /* 377540 E00764D0 D4206EE8 */ ldc1 $f0, (0xE0076EE8 & 0xFFFF)($at) /* 377544 E00764D4 460052A1 */ cvt.d.s $f10, $f10 /* 377548 E00764D8 46205282 */ mul.d $f10, $f10, $f0 /* 37754C E00764DC 00000000 */ nop /* 377550 E00764E0 C4AC0044 */ lwc1 $f12, 0x44($a1) /* 377554 E00764E4 C4A40048 */ lwc1 $f4, 0x48($a1) /* 377558 E00764E8 460C2101 */ sub.s $f4, $f4, $f12 /* 37755C E00764EC 46002121 */ cvt.d.s $f4, $f4 /* 377560 E00764F0 46202102 */ mul.d $f4, $f4, $f0 /* 377564 E00764F4 00000000 */ nop /* 377568 E00764F8 C4A8001C */ lwc1 $f8, 0x1C($a1) /* 37756C E00764FC C4A60024 */ lwc1 $f6, 0x24($a1) /* 377570 E0076500 46083181 */ sub.s $f6, $f6, $f8 /* 377574 E0076504 3C01E007 */ lui $at, (0xE0076EF0 >> 16) /* 377578 E0076508 D4306EF0 */ ldc1 $f16, (0xE0076EF0 & 0xFFFF)($at) /* 37757C E007650C 460031A1 */ cvt.d.s $f6, $f6 /* 377580 E0076510 46303182 */ mul.d $f6, $f6, $f16 /* 377584 E0076514 00000000 */ nop /* 377588 E0076518 C4A20020 */ lwc1 $f2, 0x20($a1) /* 37758C E007651C C4A00024 */ lwc1 $f0, 0x24($a1) /* 377590 E0076520 46020001 */ sub.s $f0, $f0, $f2 /* 377594 E0076524 46000021 */ cvt.d.s $f0, $f0 /* 377598 E0076528 46300002 */ mul.d $f0, $f0, $f16 /* 37759C E007652C 00000000 */ nop /* 3775A0 E0076530 460073A1 */ cvt.d.s $f14, $f14 /* 3775A4 E0076534 462A7380 */ add.d $f14, $f14, $f10 /* 3775A8 E0076538 46006321 */ cvt.d.s $f12, $f12 /* 3775AC E007653C 46246300 */ add.d $f12, $f12, $f4 /* 3775B0 E0076540 46004221 */ cvt.d.s $f8, $f8 /* 3775B4 E0076544 460010A1 */ cvt.d.s $f2, $f2 /* 3775B8 E0076548 46264200 */ add.d $f8, $f8, $f6 /* 3775BC E007654C 462073A0 */ cvt.s.d $f14, $f14 /* 3775C0 E0076550 46206320 */ cvt.s.d $f12, $f12 /* 3775C4 E0076554 46204220 */ cvt.s.d $f8, $f8 /* 3775C8 E0076558 E4AE0038 */ swc1 $f14, 0x38($a1) /* 3775CC E007655C 46201080 */ add.d $f2, $f2, $f0 /* 3775D0 E0076560 E4AC0044 */ swc1 $f12, 0x44($a1) /* 3775D4 E0076564 E4A8001C */ swc1 $f8, 0x1C($a1) /* 3775D8 E0076568 462010A0 */ cvt.s.d $f2, $f2 /* 3775DC E007656C 0801D987 */ j .LE007661C /* 3775E0 E0076570 E4A20020 */ swc1 $f2, 0x20($a1) .LE0076574: /* 3775E4 E0076574 C4AE0038 */ lwc1 $f14, 0x38($a1) /* 3775E8 E0076578 C4AA003C */ lwc1 $f10, 0x3C($a1) /* 3775EC E007657C 460E5281 */ sub.s $f10, $f10, $f14 /* 3775F0 E0076580 3C01E007 */ lui $at, (0xE0076EF8 >> 16) /* 3775F4 E0076584 D4306EF8 */ ldc1 $f16, (0xE0076EF8 & 0xFFFF)($at) /* 3775F8 E0076588 460052A1 */ cvt.d.s $f10, $f10 /* 3775FC E007658C 46305282 */ mul.d $f10, $f10, $f16 /* 377600 E0076590 00000000 */ nop /* 377604 E0076594 C4AC0044 */ lwc1 $f12, 0x44($a1) /* 377608 E0076598 C4A20048 */ lwc1 $f2, 0x48($a1) /* 37760C E007659C 460C1081 */ sub.s $f2, $f2, $f12 /* 377610 E00765A0 460010A1 */ cvt.d.s $f2, $f2 /* 377614 E00765A4 46301082 */ mul.d $f2, $f2, $f16 /* 377618 E00765A8 00000000 */ nop /* 37761C E00765AC C4A80050 */ lwc1 $f8, 0x50($a1) /* 377620 E00765B0 C4A40054 */ lwc1 $f4, 0x54($a1) /* 377624 E00765B4 46082101 */ sub.s $f4, $f4, $f8 /* 377628 E00765B8 46002121 */ cvt.d.s $f4, $f4 /* 37762C E00765BC 46302102 */ mul.d $f4, $f4, $f16 /* 377630 E00765C0 00000000 */ nop /* 377634 E00765C4 C4A6005C */ lwc1 $f6, 0x5C($a1) /* 377638 E00765C8 C4A00060 */ lwc1 $f0, 0x60($a1) /* 37763C E00765CC 46060001 */ sub.s $f0, $f0, $f6 /* 377640 E00765D0 46000021 */ cvt.d.s $f0, $f0 /* 377644 E00765D4 46300002 */ mul.d $f0, $f0, $f16 /* 377648 E00765D8 00000000 */ nop /* 37764C E00765DC 460073A1 */ cvt.d.s $f14, $f14 /* 377650 E00765E0 462A7380 */ add.d $f14, $f14, $f10 /* 377654 E00765E4 46006321 */ cvt.d.s $f12, $f12 /* 377658 E00765E8 46226300 */ add.d $f12, $f12, $f2 /* 37765C E00765EC 46004221 */ cvt.d.s $f8, $f8 /* 377660 E00765F0 46244200 */ add.d $f8, $f8, $f4 /* 377664 E00765F4 460031A1 */ cvt.d.s $f6, $f6 /* 377668 E00765F8 46203180 */ add.d $f6, $f6, $f0 /* 37766C E00765FC 462073A0 */ cvt.s.d $f14, $f14 /* 377670 E0076600 46206320 */ cvt.s.d $f12, $f12 /* 377674 E0076604 46204220 */ cvt.s.d $f8, $f8 /* 377678 E0076608 462031A0 */ cvt.s.d $f6, $f6 /* 37767C E007660C E4AE0038 */ swc1 $f14, 0x38($a1) /* 377680 E0076610 E4AC0044 */ swc1 $f12, 0x44($a1) /* 377684 E0076614 E4A80050 */ swc1 $f8, 0x50($a1) /* 377688 E0076618 E4A6005C */ swc1 $f6, 0x5C($a1) .LE007661C: /* 37768C E007661C C4A00034 */ lwc1 $f0, 0x34($a1) /* 377690 E0076620 C4A20038 */ lwc1 $f2, 0x38($a1) /* 377694 E0076624 46020080 */ add.s $f2, $f0, $f2 /* 377698 E0076628 44800000 */ mtc1 $zero, $f0 /* 37769C E007662C 00000000 */ nop /* 3776A0 E0076630 4600103C */ c.lt.s $f2, $f0 /* 3776A4 E0076634 00000000 */ nop /* 3776A8 E0076638 45000005 */ bc1f .LE0076650 /* 3776AC E007663C E4A20034 */ swc1 $f2, 0x34($a1) /* 3776B0 E0076640 3C014280 */ lui $at, (0x42800000 >> 16) /* 3776B4 E0076644 44810000 */ mtc1 $at, $f0 /* 3776B8 E0076648 0801D99C */ j .LE0076670 /* 3776BC E007664C 46001000 */ add.s $f0, $f2, $f0 .LE0076650: /* 3776C0 E0076650 3C014280 */ lui $at, (0x42800000 >> 16) /* 3776C4 E0076654 44810000 */ mtc1 $at, $f0 /* 3776C8 E0076658 00000000 */ nop /* 3776CC E007665C 4602003C */ c.lt.s $f0, $f2 /* 3776D0 E0076660 00000000 */ nop /* 3776D4 E0076664 45000003 */ bc1f .LE0076674 /* 3776D8 E0076668 00000000 */ nop /* 3776DC E007666C 46001001 */ sub.s $f0, $f2, $f0 .LE0076670: /* 3776E0 E0076670 E4A00034 */ swc1 $f0, 0x34($a1) .LE0076674: /* 3776E4 E0076674 C4A00040 */ lwc1 $f0, 0x40($a1) /* 3776E8 E0076678 C4A20044 */ lwc1 $f2, 0x44($a1) /* 3776EC E007667C 46020080 */ add.s $f2, $f0, $f2 /* 3776F0 E0076680 44800000 */ mtc1 $zero, $f0 /* 3776F4 E0076684 00000000 */ nop /* 3776F8 E0076688 4600103C */ c.lt.s $f2, $f0 /* 3776FC E007668C 00000000 */ nop /* 377700 E0076690 45000005 */ bc1f .LE00766A8 /* 377704 E0076694 E4A20040 */ swc1 $f2, 0x40($a1) /* 377708 E0076698 3C014300 */ lui $at, (0x43000000 >> 16) /* 37770C E007669C 44810000 */ mtc1 $at, $f0 /* 377710 E00766A0 0801D9B2 */ j .LE00766C8 /* 377714 E00766A4 46001000 */ add.s $f0, $f2, $f0 .LE00766A8: /* 377718 E00766A8 3C014300 */ lui $at, (0x43000000 >> 16) /* 37771C E00766AC 44810000 */ mtc1 $at, $f0 /* 377720 E00766B0 00000000 */ nop /* 377724 E00766B4 4602003C */ c.lt.s $f0, $f2 /* 377728 E00766B8 00000000 */ nop /* 37772C E00766BC 45000003 */ bc1f .LE00766CC /* 377730 E00766C0 00000000 */ nop /* 377734 E00766C4 46001001 */ sub.s $f0, $f2, $f0 .LE00766C8: /* 377738 E00766C8 E4A00040 */ swc1 $f0, 0x40($a1) .LE00766CC: /* 37773C E00766CC C4A0004C */ lwc1 $f0, 0x4C($a1) /* 377740 E00766D0 C4A20050 */ lwc1 $f2, 0x50($a1) /* 377744 E00766D4 46020080 */ add.s $f2, $f0, $f2 /* 377748 E00766D8 44800000 */ mtc1 $zero, $f0 /* 37774C E00766DC 00000000 */ nop /* 377750 E00766E0 4600103C */ c.lt.s $f2, $f0 /* 377754 E00766E4 00000000 */ nop /* 377758 E00766E8 45000005 */ bc1f .LE0076700 /* 37775C E00766EC E4A2004C */ swc1 $f2, 0x4C($a1) /* 377760 E00766F0 3C014280 */ lui $at, (0x42800000 >> 16) /* 377764 E00766F4 44810000 */ mtc1 $at, $f0 /* 377768 E00766F8 0801D9C8 */ j .LE0076720 /* 37776C E00766FC 46001000 */ add.s $f0, $f2, $f0 .LE0076700: /* 377770 E0076700 3C014280 */ lui $at, (0x42800000 >> 16) /* 377774 E0076704 44810000 */ mtc1 $at, $f0 /* 377778 E0076708 00000000 */ nop /* 37777C E007670C 4602003C */ c.lt.s $f0, $f2 /* 377780 E0076710 00000000 */ nop /* 377784 E0076714 45000003 */ bc1f .LE0076724 /* 377788 E0076718 00000000 */ nop /* 37778C E007671C 46001001 */ sub.s $f0, $f2, $f0 .LE0076720: /* 377790 E0076720 E4A0004C */ swc1 $f0, 0x4C($a1) .LE0076724: /* 377794 E0076724 C4A00058 */ lwc1 $f0, 0x58($a1) /* 377798 E0076728 C4A2005C */ lwc1 $f2, 0x5C($a1) /* 37779C E007672C 46020080 */ add.s $f2, $f0, $f2 /* 3777A0 E0076730 44800000 */ mtc1 $zero, $f0 /* 3777A4 E0076734 00000000 */ nop /* 3777A8 E0076738 4600103C */ c.lt.s $f2, $f0 /* 3777AC E007673C 00000000 */ nop /* 3777B0 E0076740 45000005 */ bc1f .LE0076758 /* 3777B4 E0076744 E4A20058 */ swc1 $f2, 0x58($a1) /* 3777B8 E0076748 3C014300 */ lui $at, (0x43000000 >> 16) /* 3777BC E007674C 44810000 */ mtc1 $at, $f0 /* 3777C0 E0076750 0801D9DE */ j .LE0076778 /* 3777C4 E0076754 46001000 */ add.s $f0, $f2, $f0 .LE0076758: /* 3777C8 E0076758 3C014300 */ lui $at, (0x43000000 >> 16) /* 3777CC E007675C 44810000 */ mtc1 $at, $f0 /* 3777D0 E0076760 00000000 */ nop /* 3777D4 E0076764 4602003C */ c.lt.s $f0, $f2 /* 3777D8 E0076768 00000000 */ nop /* 3777DC E007676C 45000003 */ bc1f .LE007677C /* 3777E0 E0076770 00000000 */ nop /* 3777E4 E0076774 46001001 */ sub.s $f0, $f2, $f0 .LE0076778: /* 3777E8 E0076778 E4A00058 */ swc1 $f0, 0x58($a1) .LE007677C: /* 3777EC E007677C C4AA0010 */ lwc1 $f10, 0x10($a1) /* 3777F0 E0076780 C4A60004 */ lwc1 $f6, 0x4($a1) /* 3777F4 E0076784 460A3181 */ sub.s $f6, $f6, $f10 /* 3777F8 E0076788 3C01E007 */ lui $at, (0xE0076F00 >> 16) /* 3777FC E007678C D42C6F00 */ ldc1 $f12, (0xE0076F00 & 0xFFFF)($at) /* 377800 E0076790 460031A1 */ cvt.d.s $f6, $f6 /* 377804 E0076794 462C3182 */ mul.d $f6, $f6, $f12 /* 377808 E0076798 00000000 */ nop /* 37780C E007679C C4A80014 */ lwc1 $f8, 0x14($a1) /* 377810 E00767A0 C4A20008 */ lwc1 $f2, 0x8($a1) /* 377814 E00767A4 46081081 */ sub.s $f2, $f2, $f8 /* 377818 E00767A8 460010A1 */ cvt.d.s $f2, $f2 /* 37781C E00767AC 462C1082 */ mul.d $f2, $f2, $f12 /* 377820 E00767B0 00000000 */ nop /* 377824 E00767B4 C4A40018 */ lwc1 $f4, 0x18($a1) /* 377828 E00767B8 C4A0000C */ lwc1 $f0, 0xC($a1) /* 37782C E00767BC 46040001 */ sub.s $f0, $f0, $f4 /* 377830 E00767C0 46000021 */ cvt.d.s $f0, $f0 /* 377834 E00767C4 462C0002 */ mul.d $f0, $f0, $f12 /* 377838 E00767C8 00000000 */ nop /* 37783C E00767CC 460052A1 */ cvt.d.s $f10, $f10 /* 377840 E00767D0 46265280 */ add.d $f10, $f10, $f6 /* 377844 E00767D4 46004221 */ cvt.d.s $f8, $f8 /* 377848 E00767D8 46224200 */ add.d $f8, $f8, $f2 /* 37784C E00767DC 46002121 */ cvt.d.s $f4, $f4 /* 377850 E00767E0 46202100 */ add.d $f4, $f4, $f0 /* 377854 E00767E4 462052A0 */ cvt.s.d $f10, $f10 /* 377858 E00767E8 46204220 */ cvt.s.d $f8, $f8 /* 37785C E00767EC 46202120 */ cvt.s.d $f4, $f4 /* 377860 E00767F0 E4AA0010 */ swc1 $f10, 0x10($a1) /* 377864 E00767F4 E4A80014 */ swc1 $f8, 0x14($a1) /* 377868 E00767F8 E4A40018 */ swc1 $f4, 0x18($a1) .LE00767FC: /* 37786C E00767FC 8FBF0010 */ lw $ra, 0x10($sp) /* 377870 E0076800 03E00008 */ jr $ra /* 377874 E0076804 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void aura_update(EffectInstance* effect) { AuraFXData* data; s32 type; s32 fadeTime; s32 lifeTime; data = effect->data.aura; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->fadeTime = 5; } data->lifeTime++; if (data->lifeTime > 90*60*60) { data->lifeTime = 256; } if (data->fadeTime <= 10) { data->fadeTime--; } if (data->fadeTime < 0) { shim_remove_effect(effect); return; } type = data->type; fadeTime = data->fadeTime; lifeTime = data->lifeTime; if (type < 2) { if (lifeTime <= 10) { data->primA += (128 - data->primA) * 0.5; } } else { if (lifeTime <= 10) { data->primA = (lifeTime * 0xFF) / 10; } } if (fadeTime < 10) { data->primA *= 0.5; } if (type == 0) { data->unk_38 += (data->unk_3C - data->unk_38) * 0.02; data->unk_44 += (data->unk_48 - data->unk_44) * 0.02; data->scale.x += (data->unk_24 - data->scale.x) * 0.04; data->scale.y += (data->unk_24 - data->scale.y) * 0.04; } else { data->unk_38 += (data->unk_3C - data->unk_38) * 0.02; data->unk_44 += (data->unk_48 - data->unk_44) * 0.02; data->unk_50 += (data->unk_54 - data->unk_50) * 0.02; data->unk_5C += (data->unk_60 - data->unk_5C) * 0.02; } data->unk_34 += data->unk_38; if (data->unk_34 < 0.0f) { data->unk_34 += 64.0f; } else if (data->unk_34 > 64.0f) { data->unk_34 -= 64.0f; } data->unk_40 += data->unk_44; if (data->unk_40 < 0.0f) { data->unk_40 += 128.0f; } else if (data->unk_40 > 128.0f) { data->unk_40 -= 128.0f; } data->unk_4C += data->unk_50; if (data->unk_4C < 0.0f) { data->unk_4C += 64.0f; } else if (data->unk_4C > 64.0f) { data->unk_4C -= 64.0f; } data->unk_58 += data->unk_5C; if (data->unk_58 < 0.0f) { data->unk_58 += 128.0f; } else if (data->unk_58 > 128.0f) { data->unk_58 -= 128.0f; } data->posB.x += (data->posA.x - data->posB.x) * 0.1; data->posB.y += (data->posA.y - data->posB.y) * 0.1; data->posB.z += (data->posA.z - data->posB.z) * 0.1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80244710 /* 172FF0 80244710 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 172FF4 80244714 AFB30024 */ sw $s3, 0x24($sp) D_80244718: /* 172FF8 80244718 3C13800E */ lui $s3, %hi(gBattleStatus) /* 172FFC 8024471C 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus) jtbl_80244720: /* 173000 80244720 AFB5002C */ sw $s5, 0x2C($sp) .L80244724: /* 173004 80244724 3C158011 */ lui $s5, %hi(gPlayerData) /* 173008 80244728 26B5F290 */ addiu $s5, $s5, %lo(gPlayerData) /* 17300C 8024472C AFB20020 */ sw $s2, 0x20($sp) /* 173010 80244730 3C12800E */ lui $s2, %hi(gBattleSubState) flo_25_pad_4734: /* 173014 80244734 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState) D_80244738: /* 173018 80244738 AFBF0030 */ sw $ra, 0x30($sp) D_8024473C: /* 17301C 8024473C AFB40028 */ sw $s4, 0x28($sp) D_80244740: /* 173020 80244740 AFB1001C */ sw $s1, 0x1C($sp) /* 173024 80244744 AFB00018 */ sw $s0, 0x18($sp) /* 173028 80244748 8E7000D8 */ lw $s0, 0xD8($s3) /* 17302C 8024474C 8E430000 */ lw $v1, 0x0($s2) D_80244750: /* 173030 80244750 8E7100DC */ lw $s1, 0xDC($s3) /* 173034 80244754 10600005 */ beqz $v1, D_8024476C D_80244758: /* 173038 80244758 2402000A */ addiu $v0, $zero, 0xA .L8024475C: /* 17303C 8024475C 1062003B */ beq $v1, $v0, .L8024484C /* 173040 80244760 00000000 */ nop /* 173044 80244764 08091228 */ j D_802448A0 /* 173048 80244768 00000000 */ nop D_8024476C: /* 17304C 8024476C 3C03F3FF */ lui $v1, (0xF3FFFFFF >> 16) /* 173050 80244770 8E020000 */ lw $v0, 0x0($s0) D_80244774: /* 173054 80244774 3463FFFF */ ori $v1, $v1, (0xF3FFFFFF & 0xFFFF) .L80244778: /* 173058 80244778 00431024 */ and $v0, $v0, $v1 /* 17305C 8024477C 12200004 */ beqz $s1, D_80244790 /* 173060 80244780 AE020000 */ sw $v0, 0x0($s0) .L80244784: /* 173064 80244784 8E220000 */ lw $v0, 0x0($s1) D_80244788: /* 173068 80244788 00431024 */ and $v0, $v0, $v1 /* 17306C 8024478C AE220000 */ sw $v0, 0x0($s1) D_80244790: /* 173070 80244790 2402000B */ addiu $v0, $zero, 0xB /* 173074 80244794 AE420000 */ sw $v0, 0x0($s2) D_80244798: /* 173078 80244798 8E620004 */ lw $v0, 0x4($s3) /* 17307C 8024479C 2403FFFD */ addiu $v1, $zero, -0x3 D_802447A0: /* 173080 802447A0 00431024 */ and $v0, $v0, $v1 /* 173084 802447A4 2403FFFB */ addiu $v1, $zero, -0x5 D_802447A8: /* 173088 802447A8 00431024 */ and $v0, $v0, $v1 D_802447AC: /* 17308C 802447AC 2403FFF7 */ addiu $v1, $zero, -0x9 D_802447B0: /* 173090 802447B0 00431024 */ and $v0, $v0, $v1 /* 173094 802447B4 2403FFEF */ addiu $v1, $zero, -0x11 .L802447B8: /* 173098 802447B8 00431024 */ and $v0, $v0, $v1 .L802447BC: /* 17309C 802447BC AE620004 */ sw $v0, 0x4($s3) D_802447C0: /* 1730A0 802447C0 82020216 */ lb $v0, 0x216($s0) .L802447C4: /* 1730A4 802447C4 2414000D */ addiu $s4, $zero, 0xD /* 1730A8 802447C8 14540005 */ bne $v0, $s4, D_802447E0 /* 1730AC 802447CC 00000000 */ nop D_802447D0: /* 1730B0 802447D0 0C09C596 */ jal dispatch_event_player D_802447D4: /* 1730B4 802447D4 24040034 */ addiu $a0, $zero, 0x34 D_802447D8: /* 1730B8 802447D8 2402000A */ addiu $v0, $zero, 0xA arn_03_pad_47DC: /* 1730BC 802447DC AE420000 */ sw $v0, 0x0($s2) D_802447E0: /* 1730C0 802447E0 8E020440 */ lw $v0, 0x440($s0) D_802447E4: /* 1730C4 802447E4 A2000210 */ sb $zero, 0x210($s0) D_802447E8: /* 1730C8 802447E8 A2000212 */ sb $zero, 0x212($s0) /* 1730CC 802447EC A2000214 */ sb $zero, 0x214($s0) /* 1730D0 802447F0 A2000218 */ sb $zero, 0x218($s0) glabel func_802447F4 /* 1730D4 802447F4 A2000216 */ sb $zero, 0x216($s0) .L802447F8: /* 1730D8 802447F8 A2000217 */ sb $zero, 0x217($s0) /* 1730DC 802447FC 8C42000C */ lw $v0, 0xC($v0) /* 1730E0 80244800 12200027 */ beqz $s1, D_802448A0 D_80244804: /* 1730E4 80244804 AC40003C */ sw $zero, 0x3C($v0) /* 1730E8 80244808 82220216 */ lb $v0, 0x216($s1) /* 1730EC 8024480C 14540005 */ bne $v0, $s4, .L80244824 D_80244810: /* 1730F0 80244810 00000000 */ nop .L80244814: /* 1730F4 80244814 0C09F7A0 */ jal dispatch_event_partner D_80244818: /* 1730F8 80244818 24040034 */ addiu $a0, $zero, 0x34 /* 1730FC 8024481C 2402000A */ addiu $v0, $zero, 0xA D_80244820: /* 173100 80244820 AE420000 */ sw $v0, 0x0($s2) .L80244824: /* 173104 80244824 8E220440 */ lw $v0, 0x440($s1) jtbl_80244828: /* 173108 80244828 A2200210 */ sb $zero, 0x210($s1) /* 17310C 8024482C A2200212 */ sb $zero, 0x212($s1) D_80244830: /* 173110 80244830 A2200214 */ sb $zero, 0x214($s1) /* 173114 80244834 A2200218 */ sb $zero, 0x218($s1) D_80244838: /* 173118 80244838 A2200216 */ sb $zero, 0x216($s1) /* 17311C 8024483C A2200217 */ sb $zero, 0x217($s1) D_80244840: /* 173120 80244840 8C42000C */ lw $v0, 0xC($v0) .L80244844: /* 173124 80244844 08091228 */ j D_802448A0 glabel func_80244848 /* 173128 80244848 AC40003C */ sw $zero, 0x3C($v0) .L8024484C: /* 17312C 8024484C 8E0201D8 */ lw $v0, 0x1D8($s0) /* 173130 80244850 10400005 */ beqz $v0, D_80244868 /* 173134 80244854 00000000 */ nop glabel func_80244858 /* 173138 80244858 0C0B1059 */ jal does_script_exist .L8024485C: /* 17313C 8024485C 8E0401E8 */ lw $a0, 0x1E8($s0) D_80244860: /* 173140 80244860 1440000F */ bnez $v0, D_802448A0 /* 173144 80244864 00000000 */ nop D_80244868: /* 173148 80244868 1220000A */ beqz $s1, .L80244894 glabel func_8024486C /* 17314C 8024486C AE0001D8 */ sw $zero, 0x1D8($s0) jtbl_80244870: /* 173150 80244870 8E2201D8 */ lw $v0, 0x1D8($s1) /* 173154 80244874 50400007 */ beql $v0, $zero, .L80244894 D_80244878: /* 173158 80244878 AE2001D8 */ sw $zero, 0x1D8($s1) /* 17315C 8024487C 8E2401E8 */ lw $a0, 0x1E8($s1) D_80244880: /* 173160 80244880 0C0B1059 */ jal does_script_exist /* 173164 80244884 00000000 */ nop D_80244888: /* 173168 80244888 14400005 */ bnez $v0, D_802448A0 .L8024488C: /* 17316C 8024488C 00000000 */ nop D_80244890: /* 173170 80244890 AE2001D8 */ sw $zero, 0x1D8($s1) .L80244894: /* 173174 80244894 2402000B */ addiu $v0, $zero, 0xB jtbl_80244898: /* 173178 80244898 3C01800E */ lui $at, %hi(gBattleSubState) /* 17317C 8024489C AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) D_802448A0: /* 173180 802448A0 3C12800E */ lui $s2, %hi(gBattleSubState) /* 173184 802448A4 2652C4DC */ addiu $s2, $s2, %lo(gBattleSubState) D_802448A8: /* 173188 802448A8 8E500000 */ lw $s0, 0x0($s2) /* 17318C 802448AC 2402000B */ addiu $v0, $zero, 0xB D_802448B0: /* 173190 802448B0 12020005 */ beq $s0, $v0, .L802448C8 /* 173194 802448B4 2402000D */ addiu $v0, $zero, 0xD jtbl_802448B8: /* 173198 802448B8 12020023 */ beq $s0, $v0, .L80244948 D_802448BC: /* 17319C 802448BC 00000000 */ nop D_802448C0: /* 1731A0 802448C0 08091259 */ j .L80244964 /* 1731A4 802448C4 00000000 */ nop .L802448C8: /* 1731A8 802448C8 3C05800E */ lui $a1, %hi(gBattleStatus) /* 1731AC 802448CC 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus) /* 1731B0 802448D0 2403FFFD */ addiu $v1, $zero, -0x3 /* 1731B4 802448D4 A260008C */ sb $zero, 0x8C($s3) jtbl_802448D8: /* 1731B8 802448D8 8CA20004 */ lw $v0, 0x4($a1) /* 1731BC 802448DC 8264009A */ lb $a0, 0x9A($s3) glabel func_802448E0 /* 1731C0 802448E0 00431024 */ and $v0, $v0, $v1 .L802448E4: /* 1731C4 802448E4 2403FFFB */ addiu $v1, $zero, -0x5 /* 1731C8 802448E8 00431024 */ and $v0, $v0, $v1 /* 1731CC 802448EC 2403FFF7 */ addiu $v1, $zero, -0x9 /* 1731D0 802448F0 00431024 */ and $v0, $v0, $v1 D_802448F4: /* 1731D4 802448F4 2403FFEF */ addiu $v1, $zero, -0x11 /* 1731D8 802448F8 00431024 */ and $v0, $v0, $v1 D_802448FC: /* 1731DC 802448FC 14800004 */ bnez $a0, jtbl_80244910 D_80244900: /* 1731E0 80244900 ACA20004 */ sw $v0, 0x4($a1) /* 1731E4 80244904 2402000D */ addiu $v0, $zero, 0xD /* 1731E8 80244908 08091259 */ j .L80244964 D_8024490C: /* 1731EC 8024490C AE420000 */ sw $v0, 0x0($s2) jtbl_80244910: /* 1731F0 80244910 2405000A */ addiu $a1, $zero, 0xA /* 1731F4 80244914 2402000C */ addiu $v0, $zero, 0xC .L80244918: /* 1731F8 80244918 A26201A7 */ sb $v0, 0x1A7($s3) .L8024491C: /* 1731FC 8024491C 8E2401CC */ lw $a0, 0x1CC($s1) D_80244920: /* 173200 80244920 0C0B0CF8 */ jal start_script .L80244924: /* 173204 80244924 0000302D */ daddu $a2, $zero, $zero /* 173208 80244928 AE2201DC */ sw $v0, 0x1DC($s1) /* 17320C 8024492C 8C440144 */ lw $a0, 0x144($v0) /* 173210 80244930 2403000C */ addiu $v1, $zero, 0xC glabel func_80244934 /* 173214 80244934 AE430000 */ sw $v1, 0x0($s2) /* 173218 80244938 24030100 */ addiu $v1, $zero, 0x100 /* 17321C 8024493C AE2401EC */ sw $a0, 0x1EC($s1) .L80244940: /* 173220 80244940 08091259 */ j .L80244964 /* 173224 80244944 AC430148 */ sw $v1, 0x148($v0) .L80244948: /* 173228 80244948 8E2401EC */ lw $a0, 0x1EC($s1) /* 17322C 8024494C 0C0B1059 */ jal does_script_exist /* 173230 80244950 00000000 */ nop .L80244954: /* 173234 80244954 14400003 */ bnez $v0, .L80244964 /* 173238 80244958 00000000 */ nop /* 17323C 8024495C A260009A */ sb $zero, 0x9A($s3) D_80244960: /* 173240 80244960 AE500000 */ sw $s0, 0x0($s2) .L80244964: /* 173244 80244964 3C10800E */ lui $s0, %hi(gBattleSubState) D_80244968: /* 173248 80244968 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState) /* 17324C 8024496C 8E030000 */ lw $v1, 0x0($s0) /* 173250 80244970 2402000D */ addiu $v0, $zero, 0xD .L80244974: /* 173254 80244974 10620005 */ beq $v1, $v0, .L8024498C /* 173258 80244978 2402000E */ addiu $v0, $zero, 0xE /* 17325C 8024497C 1062000B */ beq $v1, $v0, .L802449AC /* 173260 80244980 00000000 */ nop glabel func_80244984 /* 173264 80244984 08091289 */ j .L80244A24 D_80244988: /* 173268 80244988 00000000 */ nop .L8024498C: /* 17326C 8024498C 0C093903 */ jal func_8024E40C .L80244990: /* 173270 80244990 24040002 */ addiu $a0, $zero, 0x2 /* 173274 80244994 2402001E */ addiu $v0, $zero, 0x1E D_80244998: /* 173278 80244998 3C01802A */ lui $at, %hi(D_8029F248) /* 17327C 8024499C AC22F248 */ sw $v0, %lo(D_8029F248)($at) .L802449A0: /* 173280 802449A0 2402000E */ addiu $v0, $zero, 0xE .L802449A4: /* 173284 802449A4 08091289 */ j .L80244A24 /* 173288 802449A8 AE020000 */ sw $v0, 0x0($s0) .L802449AC: /* 17328C 802449AC 3C03802A */ lui $v1, %hi(D_8029F248) D_802449B0: /* 173290 802449B0 2463F248 */ addiu $v1, $v1, %lo(D_8029F248) .L802449B4: /* 173294 802449B4 8C620000 */ lw $v0, 0x0($v1) .L802449B8: /* 173298 802449B8 10400003 */ beqz $v0, .L802449C8 /* 17329C 802449BC 2442FFFF */ addiu $v0, $v0, -0x1 /* 1732A0 802449C0 08091289 */ j .L80244A24 D_802449C4: /* 1732A4 802449C4 AC620000 */ sw $v0, 0x0($v1) .L802449C8: /* 1732A8 802449C8 96A302AA */ lhu $v1, 0x2AA($s5) D_802449CC: /* 1732AC 802449CC 2C62270F */ sltiu $v0, $v1, 0x270F D_802449D0: /* 1732B0 802449D0 10400002 */ beqz $v0, .L802449DC /* 1732B4 802449D4 24620001 */ addiu $v0, $v1, 0x1 D_802449D8: /* 1732B8 802449D8 A6A202AA */ sh $v0, 0x2AA($s5) .L802449DC: /* 1732BC 802449DC 24030003 */ addiu $v1, $zero, 0x3 .L802449E0: /* 1732C0 802449E0 3C02800B */ lui $v0, %hi(gCurrentEncounter) glabel func_802449E4 /* 1732C4 802449E4 24420F10 */ addiu $v0, $v0, %lo(gCurrentEncounter) /* 1732C8 802449E8 A0430009 */ sb $v1, 0x9($v0) D_802449EC: /* 1732CC 802449EC 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) D_802449F0: /* 1732D0 802449F0 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) D_802449F4: /* 1732D4 802449F4 3C030200 */ lui $v1, (0x2000000 >> 16) glabel func_802449F8 /* 1732D8 802449F8 00431024 */ and $v0, $v0, $v1 D_802449FC: /* 1732DC 802449FC 14400007 */ bnez $v0, .L80244A1C jtbl_80244A00: /* 1732E0 80244A00 24020008 */ addiu $v0, $zero, 0x8 D_80244A04: /* 1732E4 80244A04 AFA20010 */ sw $v0, 0x10($sp) /* 1732E8 80244A08 0000202D */ daddu $a0, $zero, $zero D_80244A0C: /* 1732EC 80244A0C 2405FFFF */ addiu $a1, $zero, -0x1 D_80244A10: /* 1732F0 80244A10 0080302D */ daddu $a2, $a0, $zero /* 1732F4 80244A14 0C052A46 */ jal bgm_set_song /* 1732F8 80244A18 240705DC */ addiu $a3, $zero, 0x5DC .L80244A1C: /* 1732FC 80244A1C 0C090464 */ jal func_80241190 D_80244A20: /* 173300 80244A20 24040020 */ addiu $a0, $zero, 0x20 .L80244A24: /* 173304 80244A24 8FBF0030 */ lw $ra, 0x30($sp) D_80244A28: /* 173308 80244A28 8FB5002C */ lw $s5, 0x2C($sp) D_80244A2C: /* 17330C 80244A2C 8FB40028 */ lw $s4, 0x28($sp) .L80244A30: /* 173310 80244A30 8FB30024 */ lw $s3, 0x24($sp) /* 173314 80244A34 8FB20020 */ lw $s2, 0x20($sp) /* 173318 80244A38 8FB1001C */ lw $s1, 0x1C($sp) /* 17331C 80244A3C 8FB00018 */ lw $s0, 0x18($sp) D_80244A40: /* 173320 80244A40 03E00008 */ jr $ra .L80244A44: /* 173324 80244A44 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_end_training_battle(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; EncounterStatus* encounterStatus = &gCurrentEncounter; Actor* player = gBattleStatus.playerActor; Actor* partner = gBattleStatus.partnerActor; Evt* script; switch (gBattleSubState) { case BTL_SUBSTATE_END_TRAINING_INIT: player->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000); if (partner != NULL) { partner->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000); } gBattleSubState = BTL_SUBSTATE_END_TRAINING_CHECK_OUTTA_SIGHT; gBattleStatus.flags2 &= ~BS_FLAGS2_2; gBattleStatus.flags2 &= ~BS_FLAGS2_4; gBattleStatus.flags2 &= ~BS_FLAGS2_8; gBattleStatus.flags2 &= ~BS_FLAGS2_10; if (player->koStatus == STATUS_KEY_DAZE) { dispatch_event_player(EVENT_RECOVER_FROM_KO); gBattleSubState = BTL_SUBSTATE_END_TRAINING_AWAIT_RECOVERING; } player->debuff = 0; player->staticStatus = 0; player->stoneStatus = 0; player->transparentStatus = 0; player->koStatus = 0; player->koDuration = 0; player->disableEffect->data.disableX->koDuration = 0; if (partner != NULL) { if (partner->koStatus == STATUS_KEY_DAZE) { dispatch_event_partner(EVENT_RECOVER_FROM_KO); gBattleSubState = BTL_SUBSTATE_END_TRAINING_AWAIT_RECOVERING; } partner->debuff = 0; partner->staticStatus = 0; partner->stoneStatus = 0; partner->transparentStatus = 0; partner->koStatus = 0; partner->koDuration = 0; partner->disableEffect->data.disableX->koDuration = 0; } break; case BTL_SUBSTATE_END_TRAINING_AWAIT_RECOVERING: if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) { break; } player->handleEventScript = NULL; if (partner != NULL) { if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) { break; } partner->handleEventScript = NULL; } gBattleSubState = BTL_SUBSTATE_END_TRAINING_CHECK_OUTTA_SIGHT; break; } switch (gBattleSubState) { case BTL_SUBSTATE_END_TRAINING_CHECK_OUTTA_SIGHT: battleStatus->stateFreezeCount = 0; gBattleStatus.flags2 &= ~BS_FLAGS2_2; gBattleStatus.flags2 &= ~BS_FLAGS2_4; gBattleStatus.flags2 &= ~BS_FLAGS2_8; gBattleStatus.flags2 &= ~BS_FLAGS2_10; if (!battleStatus->outtaSightActive) { gBattleSubState = BTL_SUBSTATE_END_TRAINING_RESET_CAM; } else { 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_END_TRAINING_AWAIT_OUTTA_SIGHT; } break; case BTL_SUBSTATE_END_TRAINING_RESET_CAM: //@bug should be BTL_SUBSTATE_END_TRAINING_AWAIT_OUTTA_SIGHT if (!does_script_exist(partner->handleBatttlePhaseScriptID)) { battleStatus->outtaSightActive = FALSE; gBattleSubState = BTL_SUBSTATE_END_TRAINING_RESET_CAM; } break; } switch (gBattleSubState) { case BTL_SUBSTATE_END_TRAINING_RESET_CAM: btl_cam_use_preset(BTL_CAM_DEFAULT); D_8029F248 = 30; gBattleSubState = BTL_SUBSTATE_END_TRAINING_DONE; break; case BTL_SUBSTATE_END_TRAINING_DONE: if (D_8029F248 != 0) { D_8029F248--; return; } if (playerData->trainingsDone < 9999) { playerData->trainingsDone++; } encounterStatus->battleOutcome = OUTCOME_ENEMY_FLED; if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) { bgm_set_song(0, -1, 0, 1500, 8); } btl_set_state(BATTLE_STATE_END_BATTLE); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_triggers /* DBF60 80145860 27BDFFD0 */ addiu $sp, $sp, -0x30 /* DBF64 80145864 AFB20020 */ sw $s2, 0x20($sp) /* DBF68 80145868 3C128016 */ lui $s2, %hi(gCollisionStatus) /* DBF6C 8014586C 2652A550 */ addiu $s2, $s2, %lo(gCollisionStatus) /* DBF70 80145870 AFB30024 */ sw $s3, 0x24($sp) /* DBF74 80145874 0000982D */ daddu $s3, $zero, $zero /* DBF78 80145878 AFBF0028 */ sw $ra, 0x28($sp) /* DBF7C 8014587C AFB1001C */ sw $s1, 0x1C($sp) /* DBF80 80145880 AFB00018 */ sw $s0, 0x18($sp) /* DBF84 80145884 A6400016 */ sh $zero, 0x16($s2) .L80145888: /* DBF88 80145888 3C038016 */ lui $v1, %hi(gCurrentTriggerListPtr) /* DBF8C 8014588C 8C639390 */ lw $v1, %lo(gCurrentTriggerListPtr)($v1) /* DBF90 80145890 00131080 */ sll $v0, $s3, 2 /* DBF94 80145894 00431021 */ addu $v0, $v0, $v1 /* DBF98 80145898 8C510000 */ lw $s1, 0x0($v0) /* DBF9C 8014589C 522000B1 */ beql $s1, $zero, .L80145B64 /* DBFA0 801458A0 26730001 */ addiu $s3, $s3, 0x1 /* DBFA4 801458A4 8E230000 */ lw $v1, 0x0($s1) /* DBFA8 801458A8 30620001 */ andi $v0, $v1, 0x1 /* DBFAC 801458AC 504000AD */ beql $v0, $zero, .L80145B64 /* DBFB0 801458B0 26730001 */ addiu $s3, $s3, 0x1 /* DBFB4 801458B4 30620010 */ andi $v0, $v1, 0x10 /* DBFB8 801458B8 144000A8 */ bnez $v0, .L80145B5C /* DBFBC 801458BC 34620002 */ ori $v0, $v1, 0x2 /* DBFC0 801458C0 30620040 */ andi $v0, $v1, 0x40 /* DBFC4 801458C4 1040000D */ beqz $v0, .L801458FC /* DBFC8 801458C8 00000000 */ nop /* DBFCC 801458CC 86430012 */ lh $v1, 0x12($s2) /* DBFD0 801458D0 8E220008 */ lw $v0, 0x8($s1) /* DBFD4 801458D4 14430003 */ bne $v0, $v1, .L801458E4 /* DBFD8 801458D8 00000000 */ nop /* DBFDC 801458DC 0C0381B0 */ jal func_800E06C0 /* DBFE0 801458E0 24040001 */ addiu $a0, $zero, 0x1 .L801458E4: /* DBFE4 801458E4 86430000 */ lh $v1, 0x0($s2) /* DBFE8 801458E8 8E220008 */ lw $v0, 0x8($s1) /* DBFEC 801458EC 5443009D */ bnel $v0, $v1, .L80145B64 /* DBFF0 801458F0 26730001 */ addiu $s3, $s3, 0x1 /* DBFF4 801458F4 0C0381B0 */ jal func_800E06C0 /* DBFF8 801458F8 0000202D */ daddu $a0, $zero, $zero .L801458FC: /* DBFFC 801458FC 8E240000 */ lw $a0, 0x0($s1) /* DC000 80145900 30820080 */ andi $v0, $a0, 0x80 /* DC004 80145904 10400006 */ beqz $v0, .L80145920 /* DC008 80145908 3C020008 */ lui $v0, (0x80000 >> 16) /* DC00C 8014590C 86430002 */ lh $v1, 0x2($s2) /* DC010 80145910 8E220008 */ lw $v0, 0x8($s1) /* DC014 80145914 54430093 */ bnel $v0, $v1, .L80145B64 /* DC018 80145918 26730001 */ addiu $s3, $s3, 0x1 /* DC01C 8014591C 3C020008 */ lui $v0, (0x80000 >> 16) .L80145920: /* DC020 80145920 00821024 */ and $v0, $a0, $v0 /* DC024 80145924 10400006 */ beqz $v0, .L80145940 /* DC028 80145928 30820100 */ andi $v0, $a0, 0x100 /* DC02C 8014592C 86430006 */ lh $v1, 0x6($s2) /* DC030 80145930 8E220008 */ lw $v0, 0x8($s1) /* DC034 80145934 5443008B */ bnel $v0, $v1, .L80145B64 /* DC038 80145938 26730001 */ addiu $s3, $s3, 0x1 /* DC03C 8014593C 30820100 */ andi $v0, $a0, 0x100 .L80145940: /* DC040 80145940 1040000E */ beqz $v0, .L8014597C /* DC044 80145944 00000000 */ nop /* DC048 80145948 86430012 */ lh $v1, 0x12($s2) /* DC04C 8014594C 8E220008 */ lw $v0, 0x8($s1) /* DC050 80145950 14430002 */ bne $v0, $v1, .L8014595C /* DC054 80145954 24020001 */ addiu $v0, $zero, 0x1 /* DC058 80145958 A6420016 */ sh $v0, 0x16($s2) .L8014595C: /* DC05C 8014595C 8643000A */ lh $v1, 0xA($s2) /* DC060 80145960 8E220008 */ lw $v0, 0x8($s1) /* DC064 80145964 5443007F */ bnel $v0, $v1, .L80145B64 /* DC068 80145968 26730001 */ addiu $s3, $s3, 0x1 /* DC06C 8014596C 0C0394BE */ jal phys_can_player_interact /* DC070 80145970 00000000 */ nop /* DC074 80145974 5040007B */ beql $v0, $zero, .L80145B64 /* DC078 80145978 26730001 */ addiu $s3, $s3, 0x1 .L8014597C: /* DC07C 8014597C 8E240000 */ lw $a0, 0x0($s1) /* DC080 80145980 30820400 */ andi $v0, $a0, 0x400 /* DC084 80145984 10400006 */ beqz $v0, .L801459A0 /* DC088 80145988 30820200 */ andi $v0, $a0, 0x200 /* DC08C 8014598C 86430012 */ lh $v1, 0x12($s2) /* DC090 80145990 8E220008 */ lw $v0, 0x8($s1) /* DC094 80145994 54430073 */ bnel $v0, $v1, .L80145B64 /* DC098 80145998 26730001 */ addiu $s3, $s3, 0x1 /* DC09C 8014599C 30820200 */ andi $v0, $a0, 0x200 .L801459A0: /* DC0A0 801459A0 10400006 */ beqz $v0, .L801459BC /* DC0A4 801459A4 30820800 */ andi $v0, $a0, 0x800 /* DC0A8 801459A8 86430004 */ lh $v1, 0x4($s2) /* DC0AC 801459AC 8E220008 */ lw $v0, 0x8($s1) /* DC0B0 801459B0 5443006C */ bnel $v0, $v1, .L80145B64 /* DC0B4 801459B4 26730001 */ addiu $s3, $s3, 0x1 /* DC0B8 801459B8 30820800 */ andi $v0, $a0, 0x800 .L801459BC: /* DC0BC 801459BC 10400011 */ beqz $v0, .L80145A04 /* DC0C0 801459C0 30821000 */ andi $v0, $a0, 0x1000 /* DC0C4 801459C4 86430002 */ lh $v1, 0x2($s2) /* DC0C8 801459C8 8E220008 */ lw $v0, 0x8($s1) /* DC0CC 801459CC 54430065 */ bnel $v0, $v1, .L80145B64 /* DC0D0 801459D0 26730001 */ addiu $s3, $s3, 0x1 /* DC0D4 801459D4 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* DC0D8 801459D8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* DC0DC 801459DC 8C420010 */ lw $v0, 0x10($v0) /* DC0E0 801459E0 30428000 */ andi $v0, $v0, 0x8000 /* DC0E4 801459E4 5040005F */ beql $v0, $zero, .L80145B64 /* DC0E8 801459E8 26730001 */ addiu $s3, $s3, 0x1 /* DC0EC 801459EC 3C028011 */ lui $v0, %hi(gPlayerStatus) /* DC0F0 801459F0 8C42EFC8 */ lw $v0, %lo(gPlayerStatus)($v0) /* DC0F4 801459F4 30422000 */ andi $v0, $v0, 0x2000 /* DC0F8 801459F8 5440005A */ bnel $v0, $zero, .L80145B64 /* DC0FC 801459FC 26730001 */ addiu $s3, $s3, 0x1 /* DC100 80145A00 30821000 */ andi $v0, $a0, 0x1000 .L80145A04: /* DC104 80145A04 10400006 */ beqz $v0, .L80145A20 /* DC108 80145A08 3C020004 */ lui $v0, (0x40000 >> 16) /* DC10C 80145A0C 86430014 */ lh $v1, 0x14($s2) /* DC110 80145A10 8E220008 */ lw $v0, 0x8($s1) /* DC114 80145A14 54430053 */ bnel $v0, $v1, .L80145B64 /* DC118 80145A18 26730001 */ addiu $s3, $s3, 0x1 /* DC11C 80145A1C 3C020004 */ lui $v0, (0x40000 >> 16) .L80145A20: /* DC120 80145A20 00821024 */ and $v0, $a0, $v0 /* DC124 80145A24 10400006 */ beqz $v0, .L80145A40 /* DC128 80145A28 30822000 */ andi $v0, $a0, 0x2000 /* DC12C 80145A2C 86430008 */ lh $v1, 0x8($s2) /* DC130 80145A30 8E220008 */ lw $v0, 0x8($s1) /* DC134 80145A34 5443004B */ bnel $v0, $v1, .L80145B64 /* DC138 80145A38 26730001 */ addiu $s3, $s3, 0x1 /* DC13C 80145A3C 30822000 */ andi $v0, $a0, 0x2000 .L80145A40: /* DC140 80145A40 10400006 */ beqz $v0, .L80145A5C /* DC144 80145A44 30824000 */ andi $v0, $a0, 0x4000 /* DC148 80145A48 8643000C */ lh $v1, 0xC($s2) /* DC14C 80145A4C 8E220008 */ lw $v0, 0x8($s1) /* DC150 80145A50 54430044 */ bnel $v0, $v1, .L80145B64 /* DC154 80145A54 26730001 */ addiu $s3, $s3, 0x1 /* DC158 80145A58 30824000 */ andi $v0, $a0, 0x4000 .L80145A5C: /* DC15C 80145A5C 10400006 */ beqz $v0, .L80145A78 /* DC160 80145A60 30828000 */ andi $v0, $a0, 0x8000 /* DC164 80145A64 8643000E */ lh $v1, 0xE($s2) /* DC168 80145A68 8E220008 */ lw $v0, 0x8($s1) /* DC16C 80145A6C 5443003D */ bnel $v0, $v1, .L80145B64 /* DC170 80145A70 26730001 */ addiu $s3, $s3, 0x1 /* DC174 80145A74 30828000 */ andi $v0, $a0, 0x8000 .L80145A78: /* DC178 80145A78 10400006 */ beqz $v0, .L80145A94 /* DC17C 80145A7C 3C020010 */ lui $v0, (0x100000 >> 16) /* DC180 80145A80 86430010 */ lh $v1, 0x10($s2) /* DC184 80145A84 8E220008 */ lw $v0, 0x8($s1) /* DC188 80145A88 54430036 */ bnel $v0, $v1, .L80145B64 /* DC18C 80145A8C 26730001 */ addiu $s3, $s3, 0x1 /* DC190 80145A90 3C020010 */ lui $v0, (0x100000 >> 16) .L80145A94: /* DC194 80145A94 00821024 */ and $v0, $a0, $v0 /* DC198 80145A98 1040001C */ beqz $v0, .L80145B0C /* DC19C 80145A9C 00000000 */ nop /* DC1A0 80145AA0 86420018 */ lh $v0, 0x18($s2) /* DC1A4 80145AA4 0442002F */ bltzl $v0, .L80145B64 /* DC1A8 80145AA8 26730001 */ addiu $s3, $s3, 0x1 /* DC1AC 80145AAC C6420020 */ lwc1 $f2, 0x20($s2) /* DC1B0 80145AB0 8E300008 */ lw $s0, 0x8($s1) /* DC1B4 80145AB4 C6400024 */ lwc1 $f0, 0x24($s2) /* DC1B8 80145AB8 E7A20010 */ swc1 $f2, 0x10($sp) /* DC1BC 80145ABC E7A00014 */ swc1 $f0, 0x14($sp) /* DC1C0 80145AC0 C60C0000 */ lwc1 $f12, 0x0($s0) /* DC1C4 80145AC4 C60E0004 */ lwc1 $f14, 0x4($s0) /* DC1C8 80145AC8 8E060008 */ lw $a2, 0x8($s0) /* DC1CC 80145ACC 0C00A7CB */ jal dist3D /* DC1D0 80145AD0 8E47001C */ lw $a3, 0x1C($s2) /* DC1D4 80145AD4 C604000C */ lwc1 $f4, 0xC($s0) /* DC1D8 80145AD8 3C013F00 */ lui $at, (0x3F000000 >> 16) /* DC1DC 80145ADC 44811000 */ mtc1 $at, $f2 /* DC1E0 80145AE0 00000000 */ nop /* DC1E4 80145AE4 46022102 */ mul.s $f4, $f4, $f2 /* DC1E8 80145AE8 00000000 */ nop /* DC1EC 80145AEC 3C014248 */ lui $at, (0x42480000 >> 16) /* DC1F0 80145AF0 44811000 */ mtc1 $at, $f2 /* DC1F4 80145AF4 00000000 */ nop /* DC1F8 80145AF8 46022100 */ add.s $f4, $f4, $f2 /* DC1FC 80145AFC 4600203C */ c.lt.s $f4, $f0 /* DC200 80145B00 00000000 */ nop /* DC204 80145B04 45030017 */ bc1tl .L80145B64 /* DC208 80145B08 26730001 */ addiu $s3, $s3, 0x1 .L80145B0C: /* DC20C 80145B0C 8E220000 */ lw $v0, 0x0($s1) /* DC210 80145B10 3C030001 */ lui $v1, (0x10000 >> 16) /* DC214 80145B14 00431024 */ and $v0, $v0, $v1 /* DC218 80145B18 10400005 */ beqz $v0, .L80145B30 /* DC21C 80145B1C 00000000 */ nop /* DC220 80145B20 0C05152F */ jal get_global_flag /* DC224 80145B24 8E240004 */ lw $a0, 0x4($s1) /* DC228 80145B28 5040000E */ beql $v0, $zero, .L80145B64 /* DC22C 80145B2C 26730001 */ addiu $s3, $s3, 0x1 .L80145B30: /* DC230 80145B30 8E220000 */ lw $v0, 0x0($s1) /* DC234 80145B34 3C030002 */ lui $v1, (0x20000 >> 16) /* DC238 80145B38 00431024 */ and $v0, $v0, $v1 /* DC23C 80145B3C 10400005 */ beqz $v0, .L80145B54 /* DC240 80145B40 00000000 */ nop /* DC244 80145B44 0C05157C */ jal get_area_flag /* DC248 80145B48 8E240004 */ lw $a0, 0x4($s1) /* DC24C 80145B4C 50400005 */ beql $v0, $zero, .L80145B64 /* DC250 80145B50 26730001 */ addiu $s3, $s3, 0x1 .L80145B54: /* DC254 80145B54 8E220000 */ lw $v0, 0x0($s1) /* DC258 80145B58 34420002 */ ori $v0, $v0, 0x2 .L80145B5C: /* DC25C 80145B5C AE220000 */ sw $v0, 0x0($s1) /* DC260 80145B60 26730001 */ addiu $s3, $s3, 0x1 .L80145B64: /* DC264 80145B64 2A620040 */ slti $v0, $s3, 0x40 /* DC268 80145B68 1440FF47 */ bnez $v0, .L80145888 /* DC26C 80145B6C 2410FFFD */ addiu $s0, $zero, -0x3 /* DC270 80145B70 0000982D */ daddu $s3, $zero, $zero .L80145B74: /* DC274 80145B74 3C038016 */ lui $v1, %hi(gCurrentTriggerListPtr) /* DC278 80145B78 8C639390 */ lw $v1, %lo(gCurrentTriggerListPtr)($v1) /* DC27C 80145B7C 00131080 */ sll $v0, $s3, 2 /* DC280 80145B80 00431021 */ addu $v0, $v0, $v1 /* DC284 80145B84 8C510000 */ lw $s1, 0x0($v0) /* DC288 80145B88 52200010 */ beql $s1, $zero, .L80145BCC /* DC28C 80145B8C 26730001 */ addiu $s3, $s3, 0x1 /* DC290 80145B90 8E230000 */ lw $v1, 0x0($s1) /* DC294 80145B94 30620001 */ andi $v0, $v1, 0x1 /* DC298 80145B98 5040000C */ beql $v0, $zero, .L80145BCC /* DC29C 80145B9C 26730001 */ addiu $s3, $s3, 0x1 /* DC2A0 80145BA0 30620002 */ andi $v0, $v1, 0x2 /* DC2A4 80145BA4 50400009 */ beql $v0, $zero, .L80145BCC /* DC2A8 80145BA8 26730001 */ addiu $s3, $s3, 0x1 /* DC2AC 80145BAC 8E22000C */ lw $v0, 0xC($s1) /* DC2B0 80145BB0 0040F809 */ jalr $v0 /* DC2B4 80145BB4 0220202D */ daddu $a0, $s1, $zero /* DC2B8 80145BB8 14400004 */ bnez $v0, .L80145BCC /* DC2BC 80145BBC 26730001 */ addiu $s3, $s3, 0x1 /* DC2C0 80145BC0 8E220000 */ lw $v0, 0x0($s1) /* DC2C4 80145BC4 00501024 */ and $v0, $v0, $s0 /* DC2C8 80145BC8 AE220000 */ sw $v0, 0x0($s1) .L80145BCC: /* DC2CC 80145BCC 2A620040 */ slti $v0, $s3, 0x40 /* DC2D0 80145BD0 1440FFE8 */ bnez $v0, .L80145B74 /* DC2D4 80145BD4 00000000 */ nop /* DC2D8 80145BD8 8FBF0028 */ lw $ra, 0x28($sp) /* DC2DC 80145BDC 8FB30024 */ lw $s3, 0x24($sp) /* DC2E0 80145BE0 8FB20020 */ lw $s2, 0x20($sp) /* DC2E4 80145BE4 8FB1001C */ lw $s1, 0x1C($sp) /* DC2E8 80145BE8 8FB00018 */ lw $s0, 0x18($sp) /* DC2EC 80145BEC 03E00008 */ jr $ra /* DC2F0 80145BF0 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void update_triggers(void) { CollisionStatus* collisionStatus = &gCollisionStatus; Trigger* listTrigger; s32 i; collisionStatus->touchingWallTrigger = 0; for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) { listTrigger = (*gCurrentTriggerListPtr)[i]; if (listTrigger == NULL) { continue; } if (!(listTrigger->flags.flags & TRIGGER_ACTIVE)) { continue; } if (listTrigger->flags.flags & TRIGGER_FORCE_ACTIVATE) { listTrigger->flags.flags |= TRIGGER_ACTIVATED; continue; } if (listTrigger->flags.flags & TRIGGER_WALL_PUSH) { if (listTrigger->location.colliderID == collisionStatus->currentWall) { func_800E06C0(1); } if (listTrigger->location.colliderID == collisionStatus->pushingAgainstWall) { func_800E06C0(0); } else { continue; } } if (listTrigger->flags.flags & TRIGGER_FLOOR_TOUCH) { if (listTrigger->location.colliderID != collisionStatus->currentFloor) { continue; } } if (listTrigger->flags.flags & TRIGGER_FLOOR_ABOVE) { if (listTrigger->location.colliderID != collisionStatus->floorBelow) { continue; } } if (listTrigger->flags.flags & TRIGGER_WALL_PRESS_A) { if (listTrigger->location.colliderID == collisionStatus->currentWall) { collisionStatus->touchingWallTrigger = 1; } if ((listTrigger->location.colliderID != collisionStatus->currentInspect) || !phys_can_player_interact()) { continue; } } if (listTrigger->flags.flags & TRIGGER_WALL_TOUCH) { if (listTrigger->location.colliderID != collisionStatus->currentWall) { continue; } } if (listTrigger->flags.flags & TRIGGER_FLOOR_JUMP) { if (listTrigger->location.colliderID != collisionStatus->lastTouchedFloor) { continue; } } if (listTrigger->flags.flags & TRIGGER_FLOOR_PRESS_A) { if ((listTrigger->location.colliderID != collisionStatus->currentFloor) || !(gGameStatusPtr->pressedButtons[0] & BUTTON_A) || (gPlayerStatus.flags & PS_FLAG_INPUT_DISABLED)) { continue; } } if (listTrigger->flags.flags & TRIGGER_WALL_HAMMER) { if (listTrigger->location.colliderID != collisionStatus->lastWallHammered) { continue; } } if (listTrigger->flags.flags & TRIGGER_CEILING_TOUCH) { if (listTrigger->location.colliderID != collisionStatus->currentCeiling) { continue; } } if (listTrigger->flags.flags & TRIGGER_FLAG_2000) { if (listTrigger->location.colliderID != collisionStatus->unk_0C) { continue; } } if (listTrigger->flags.flags & TRIGGER_FLAG_4000) { if (listTrigger->location.colliderID != collisionStatus->unk_0E) { continue; } } if (listTrigger->flags.flags & TRIGGER_FLAG_8000) { if (listTrigger->location.colliderID != collisionStatus->unk_10) { continue; } } if (listTrigger->flags.flags & TRIGGER_POINT_BOMB) { Vec4f* triggerPos; f32 dist; if (collisionStatus->bombetteExploded < 0) { continue; } triggerPos = listTrigger->location.pos; dist = dist3D(triggerPos->x, triggerPos->y, triggerPos->z, collisionStatus->bombetteExplosionPos.x, collisionStatus->bombetteExplosionPos.y, collisionStatus->bombetteExplosionPos.z); if ((triggerPos->yaw * 0.5f) + 50.0f < dist) { continue; } } if (listTrigger->flags.flags & TRIGGER_GAME_FLAG_SET && get_global_flag(listTrigger->varIndex) == 0) { continue; } if (listTrigger->flags.flags & TRIGGER_AREA_FLAG_SET && get_area_flag(listTrigger->varIndex) == 0) { continue; } listTrigger->flags.flags |= TRIGGER_ACTIVATED; } for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) { listTrigger = (*gCurrentTriggerListPtr)[i]; if (listTrigger == NULL) { continue; } if (listTrigger->flags.flags & TRIGGER_ACTIVE) { if (listTrigger->flags.flags & TRIGGER_ACTIVATED) { if (listTrigger->onActivateFunc(listTrigger) == 0) { listTrigger->flags.flags &= ~TRIGGER_ACTIVATED; } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel partner_flying_update_motion /* 86A80 800ED5D0 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 86A84 800ED5D4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 86A88 800ED5D8 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 86A8C 800ED5DC AFB00030 */ sw $s0, 0x30($sp) /* 86A90 800ED5E0 AFB20038 */ sw $s2, 0x38($sp) /* 86A94 800ED5E4 3C128011 */ lui $s2, %hi(gPlayerStatus) /* 86A98 800ED5E8 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* 86A9C 800ED5EC AFBF004C */ sw $ra, 0x4C($sp) /* 86AA0 800ED5F0 AFB60048 */ sw $s6, 0x48($sp) /* 86AA4 800ED5F4 AFB50044 */ sw $s5, 0x44($sp) /* 86AA8 800ED5F8 AFB40040 */ sw $s4, 0x40($sp) /* 86AAC 800ED5FC AFB3003C */ sw $s3, 0x3C($sp) /* 86AB0 800ED600 AFB10034 */ sw $s1, 0x34($sp) /* 86AB4 800ED604 80420081 */ lb $v0, 0x81($v0) /* 86AB8 800ED608 3C118011 */ lui $s1, %hi(gPartnerStatus) /* 86ABC 800ED60C 2631EBB0 */ addiu $s1, $s1, %lo(gPartnerStatus) /* 86AC0 800ED610 1040000B */ beqz $v0, .L800ED640 /* 86AC4 800ED614 0080802D */ daddu $s0, $a0, $zero /* 86AC8 800ED618 8E420000 */ lw $v0, 0x0($s2) /* 86ACC 800ED61C 30423000 */ andi $v0, $v0, 0x3000 /* 86AD0 800ED620 14400007 */ bnez $v0, .L800ED640 /* 86AD4 800ED624 00000000 */ nop /* 86AD8 800ED628 82220014 */ lb $v0, 0x14($s1) /* 86ADC 800ED62C 14400004 */ bnez $v0, .L800ED640 /* 86AE0 800ED630 00000000 */ nop /* 86AE4 800ED634 82220002 */ lb $v0, 0x2($s1) /* 86AE8 800ED638 1040000F */ beqz $v0, .L800ED678 /* 86AEC 800ED63C 00000000 */ nop .L800ED640: /* 86AF0 800ED640 8E420004 */ lw $v0, 0x4($s2) /* 86AF4 800ED644 30420800 */ andi $v0, $v0, 0x800 /* 86AF8 800ED648 10400005 */ beqz $v0, .L800ED660 /* 86AFC 800ED64C 00000000 */ nop /* 86B00 800ED650 3C028010 */ lui $v0, %hi(D_800F8020) /* 86B04 800ED654 8C428020 */ lw $v0, %lo(D_800F8020)($v0) /* 86B08 800ED658 14400003 */ bnez $v0, .L800ED668 /* 86B0C 800ED65C 00000000 */ nop .L800ED660: /* 86B10 800ED660 0C03B67E */ jal partner_flying_follow_player /* 86B14 800ED664 0200202D */ daddu $a0, $s0, $zero .L800ED668: /* 86B18 800ED668 8E22000C */ lw $v0, 0xC($s1) /* 86B1C 800ED66C 30426006 */ andi $v0, $v0, 0x6006 /* 86B20 800ED670 54400001 */ bnel $v0, $zero, .L800ED678 /* 86B24 800ED674 A2200002 */ sb $zero, 0x2($s1) .L800ED678: /* 86B28 800ED678 3C038011 */ lui $v1, %hi(wPartnerFollowState) /* 86B2C 800ED67C 8463CFC8 */ lh $v1, %lo(wPartnerFollowState)($v1) /* 86B30 800ED680 24020032 */ addiu $v0, $zero, 0x32 /* 86B34 800ED684 10620017 */ beq $v1, $v0, .L800ED6E4 /* 86B38 800ED688 0000202D */ daddu $a0, $zero, $zero /* 86B3C 800ED68C C600003C */ lwc1 $f0, 0x3C($s0) /* 86B40 800ED690 C642002C */ lwc1 $f2, 0x2C($s2) /* 86B44 800ED694 46020001 */ sub.s $f0, $f0, $f2 /* 86B48 800ED698 3C01447A */ lui $at, (0x447A0000 >> 16) /* 86B4C 800ED69C 44811000 */ mtc1 $at, $f2 /* 86B50 800ED6A0 46000005 */ abs.s $f0, $f0 /* 86B54 800ED6A4 4600103C */ c.lt.s $f2, $f0 /* 86B58 800ED6A8 00000000 */ nop /* 86B5C 800ED6AC 4500000D */ bc1f .L800ED6E4 /* 86B60 800ED6B0 2403F7FF */ addiu $v1, $zero, -0x801 /* 86B64 800ED6B4 C6400028 */ lwc1 $f0, 0x28($s2) /* 86B68 800ED6B8 8E020000 */ lw $v0, 0x0($s0) /* 86B6C 800ED6BC E6000038 */ swc1 $f0, 0x38($s0) /* 86B70 800ED6C0 C640002C */ lwc1 $f0, 0x2C($s2) /* 86B74 800ED6C4 E600003C */ swc1 $f0, 0x3C($s0) /* 86B78 800ED6C8 C6400030 */ lwc1 $f0, 0x30($s2) /* 86B7C 800ED6CC 00431024 */ and $v0, $v0, $v1 /* 86B80 800ED6D0 AE00001C */ sw $zero, 0x1C($s0) /* 86B84 800ED6D4 AE000014 */ sw $zero, 0x14($s0) /* 86B88 800ED6D8 AE020000 */ sw $v0, 0x0($s0) /* 86B8C 800ED6DC E6000040 */ swc1 $f0, 0x40($s0) /* 86B90 800ED6E0 0000202D */ daddu $a0, $zero, $zero .L800ED6E4: /* 86B94 800ED6E4 27B30020 */ addiu $s3, $sp, 0x20 /* 86B98 800ED6E8 0260282D */ daddu $a1, $s3, $zero /* 86B9C 800ED6EC 27B50024 */ addiu $s5, $sp, 0x24 /* 86BA0 800ED6F0 02A0302D */ daddu $a2, $s5, $zero /* 86BA4 800ED6F4 27B60028 */ addiu $s6, $sp, 0x28 /* 86BA8 800ED6F8 02C0382D */ daddu $a3, $s6, $zero /* 86BAC 800ED6FC 860200A8 */ lh $v0, 0xA8($s0) /* 86BB0 800ED700 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 86BB4 800ED704 44811000 */ mtc1 $at, $f2 /* 86BB8 800ED708 44823000 */ mtc1 $v0, $f6 /* 86BBC 800ED70C 00000000 */ nop /* 86BC0 800ED710 468031A0 */ cvt.s.w $f6, $f6 /* 86BC4 800ED714 46023182 */ mul.s $f6, $f6, $f2 /* 86BC8 800ED718 00000000 */ nop /* 86BCC 800ED71C 3C148010 */ lui $s4, %hi(D_800F8020) /* 86BD0 800ED720 26948020 */ addiu $s4, $s4, %lo(D_800F8020) /* 86BD4 800ED724 27B1002C */ addiu $s1, $sp, 0x2C /* 86BD8 800ED728 C6000038 */ lwc1 $f0, 0x38($s0) /* 86BDC 800ED72C 44822000 */ mtc1 $v0, $f4 /* 86BE0 800ED730 00000000 */ nop /* 86BE4 800ED734 46802120 */ cvt.s.w $f4, $f4 /* 86BE8 800ED738 46022102 */ mul.s $f4, $f4, $f2 /* 86BEC 800ED73C 00000000 */ nop /* 86BF0 800ED740 AE800000 */ sw $zero, 0x0($s4) /* 86BF4 800ED744 E7A00020 */ swc1 $f0, 0x20($sp) /* 86BF8 800ED748 C600003C */ lwc1 $f0, 0x3C($s0) /* 86BFC 800ED74C C6020040 */ lwc1 $f2, 0x40($s0) /* 86C00 800ED750 46060000 */ add.s $f0, $f0, $f6 /* 86C04 800ED754 E7A20028 */ swc1 $f2, 0x28($sp) /* 86C08 800ED758 E7A4002C */ swc1 $f4, 0x2C($sp) /* 86C0C 800ED75C E7A00024 */ swc1 $f0, 0x24($sp) /* 86C10 800ED760 0C03739C */ jal npc_raycast_up /* 86C14 800ED764 AFB10010 */ sw $s1, 0x10($sp) /* 86C18 800ED768 10400006 */ beqz $v0, .L800ED784 /* 86C1C 800ED76C 24020001 */ addiu $v0, $zero, 0x1 /* 86C20 800ED770 C6000038 */ lwc1 $f0, 0x38($s0) /* 86C24 800ED774 C602003C */ lwc1 $f2, 0x3C($s0) /* 86C28 800ED778 C6040040 */ lwc1 $f4, 0x40($s0) /* 86C2C 800ED77C 0803B66E */ j .L800ED9B8 /* 86C30 800ED780 AE820000 */ sw $v0, 0x0($s4) .L800ED784: /* 86C34 800ED784 0C03BD90 */ jal partner_do_player_collision /* 86C38 800ED788 0200202D */ daddu $a0, $s0, $zero /* 86C3C 800ED78C 3C038011 */ lui $v1, %hi(wPartnerFollowState) /* 86C40 800ED790 8463CFC8 */ lh $v1, %lo(wPartnerFollowState)($v1) /* 86C44 800ED794 24020032 */ addiu $v0, $zero, 0x32 /* 86C48 800ED798 10620084 */ beq $v1, $v0, .L800ED9AC /* 86C4C 800ED79C 3C040001 */ lui $a0, (0x10000 >> 16) /* 86C50 800ED7A0 C6000038 */ lwc1 $f0, 0x38($s0) /* 86C54 800ED7A4 C602003C */ lwc1 $f2, 0x3C($s0) /* 86C58 800ED7A8 C6040040 */ lwc1 $f4, 0x40($s0) /* 86C5C 800ED7AC 3C01447A */ lui $at, (0x447A0000 >> 16) /* 86C60 800ED7B0 44813000 */ mtc1 $at, $f6 /* 86C64 800ED7B4 0260282D */ daddu $a1, $s3, $zero /* 86C68 800ED7B8 E7A00020 */ swc1 $f0, 0x20($sp) /* 86C6C 800ED7BC E7A20024 */ swc1 $f2, 0x24($sp) /* 86C70 800ED7C0 E7A40028 */ swc1 $f4, 0x28($sp) /* 86C74 800ED7C4 E7A6002C */ swc1 $f6, 0x2C($sp) /* 86C78 800ED7C8 AFB10010 */ sw $s1, 0x10($sp) /* 86C7C 800ED7CC C600000C */ lwc1 $f0, 0xC($s0) /* 86C80 800ED7D0 02A0302D */ daddu $a2, $s5, $zero /* 86C84 800ED7D4 E7A00014 */ swc1 $f0, 0x14($sp) /* 86C88 800ED7D8 860200A6 */ lh $v0, 0xA6($s0) /* 86C8C 800ED7DC 02C0382D */ daddu $a3, $s6, $zero /* 86C90 800ED7E0 44820000 */ mtc1 $v0, $f0 /* 86C94 800ED7E4 00000000 */ nop /* 86C98 800ED7E8 46800020 */ cvt.s.w $f0, $f0 /* 86C9C 800ED7EC 0C0371DE */ jal npc_raycast_down_around /* 86CA0 800ED7F0 E7A00018 */ swc1 $f0, 0x18($sp) /* 86CA4 800ED7F4 14400003 */ bnez $v0, .L800ED804 /* 86CA8 800ED7F8 00000000 */ nop /* 86CAC 800ED7FC C640002C */ lwc1 $f0, 0x2C($s2) /* 86CB0 800ED800 E7A00024 */ swc1 $f0, 0x24($sp) .L800ED804: /* 86CB4 800ED804 960200A8 */ lhu $v0, 0xA8($s0) /* 86CB8 800ED808 C7A60024 */ lwc1 $f6, 0x24($sp) /* 86CBC 800ED80C 00021400 */ sll $v0, $v0, 16 /* 86CC0 800ED810 00021C03 */ sra $v1, $v0, 16 /* 86CC4 800ED814 44830000 */ mtc1 $v1, $f0 /* 86CC8 800ED818 00000000 */ nop /* 86CCC 800ED81C 46800020 */ cvt.s.w $f0, $f0 /* 86CD0 800ED820 46003200 */ add.s $f8, $f6, $f0 /* 86CD4 800ED824 3C014000 */ lui $at, (0x40000000 >> 16) /* 86CD8 800ED828 44815000 */ mtc1 $at, $f10 /* 86CDC 800ED82C 00000000 */ nop /* 86CE0 800ED830 460A4000 */ add.s $f0, $f8, $f10 /* 86CE4 800ED834 C604003C */ lwc1 $f4, 0x3C($s0) /* 86CE8 800ED838 4600203E */ c.le.s $f4, $f0 /* 86CEC 800ED83C 00000000 */ nop /* 86CF0 800ED840 45000024 */ bc1f .L800ED8D4 /* 86CF4 800ED844 00000000 */ nop /* 86CF8 800ED848 C6420054 */ lwc1 $f2, 0x54($s2) /* 86CFC 800ED84C 44800000 */ mtc1 $zero, $f0 /* 86D00 800ED850 00000000 */ nop /* 86D04 800ED854 46001032 */ c.eq.s $f2, $f0 /* 86D08 800ED858 00000000 */ nop /* 86D0C 800ED85C 4501000C */ bc1t .L800ED890 /* 86D10 800ED860 000217C2 */ srl $v0, $v0, 31 /* 86D14 800ED864 00621021 */ addu $v0, $v1, $v0 /* 86D18 800ED868 00021043 */ sra $v0, $v0, 1 /* 86D1C 800ED86C 44820000 */ mtc1 $v0, $f0 /* 86D20 800ED870 00000000 */ nop /* 86D24 800ED874 46800020 */ cvt.s.w $f0, $f0 /* 86D28 800ED878 46003000 */ add.s $f0, $f6, $f0 /* 86D2C 800ED87C 460A0000 */ add.s $f0, $f0, $f10 /* 86D30 800ED880 3C013E00 */ lui $at, (0x3E000000 >> 16) /* 86D34 800ED884 44811000 */ mtc1 $at, $f2 /* 86D38 800ED888 0803B662 */ j .L800ED988 /* 86D3C 800ED88C 46040001 */ sub.s $f0, $f0, $f4 .L800ED890: /* 86D40 800ED890 C642002C */ lwc1 $f2, 0x2C($s2) /* 86D44 800ED894 4602303C */ c.lt.s $f6, $f2 /* 86D48 800ED898 00000000 */ nop /* 86D4C 800ED89C 45000005 */ bc1f .L800ED8B4 /* 86D50 800ED8A0 00000000 */ nop /* 86D54 800ED8A4 3C014120 */ lui $at, (0x41200000 >> 16) /* 86D58 800ED8A8 44810000 */ mtc1 $at, $f0 /* 86D5C 800ED8AC 0803B631 */ j .L800ED8C4 /* 86D60 800ED8B0 46001000 */ add.s $f0, $f2, $f0 .L800ED8B4: /* 86D64 800ED8B4 3C014120 */ lui $at, (0x41200000 >> 16) /* 86D68 800ED8B8 44810000 */ mtc1 $at, $f0 /* 86D6C 800ED8BC 00000000 */ nop /* 86D70 800ED8C0 46003000 */ add.s $f0, $f6, $f0 .L800ED8C4: /* 86D74 800ED8C4 3C013E80 */ lui $at, (0x3E800000 >> 16) /* 86D78 800ED8C8 44811000 */ mtc1 $at, $f2 /* 86D7C 800ED8CC 0803B662 */ j .L800ED988 /* 86D80 800ED8D0 46040001 */ sub.s $f0, $f0, $f4 .L800ED8D4: /* 86D84 800ED8D4 864200B0 */ lh $v0, 0xB0($s2) /* 86D88 800ED8D8 C642002C */ lwc1 $f2, 0x2C($s2) /* 86D8C 800ED8DC 44820000 */ mtc1 $v0, $f0 /* 86D90 800ED8E0 00000000 */ nop /* 86D94 800ED8E4 46800020 */ cvt.s.w $f0, $f0 /* 86D98 800ED8E8 46001080 */ add.s $f2, $f2, $f0 /* 86D9C 800ED8EC 4606103C */ c.lt.s $f2, $f6 /* 86DA0 800ED8F0 00000000 */ nop /* 86DA4 800ED8F4 4500001C */ bc1f .L800ED968 /* 86DA8 800ED8F8 00000000 */ nop /* 86DAC 800ED8FC 46044081 */ sub.s $f2, $f8, $f4 /* 86DB0 800ED900 3C013E00 */ lui $at, (0x3E000000 >> 16) /* 86DB4 800ED904 44810000 */ mtc1 $at, $f0 /* 86DB8 800ED908 00000000 */ nop /* 86DBC 800ED90C 46001082 */ mul.s $f2, $f2, $f0 /* 86DC0 800ED910 00000000 */ nop /* 86DC4 800ED914 860200A8 */ lh $v0, 0xA8($s0) /* 86DC8 800ED918 44820000 */ mtc1 $v0, $f0 /* 86DCC 800ED91C 00000000 */ nop /* 86DD0 800ED920 46800020 */ cvt.s.w $f0, $f0 /* 86DD4 800ED924 46003000 */ add.s $f0, $f6, $f0 /* 86DD8 800ED928 C608003C */ lwc1 $f8, 0x3C($s0) /* 86DDC 800ED92C 46024100 */ add.s $f4, $f8, $f2 /* 86DE0 800ED930 3C028010 */ lui $v0, %hi(D_800F84F8) /* 86DE4 800ED934 244284F8 */ addiu $v0, $v0, %lo(D_800F84F8) /* 86DE8 800ED938 4600203E */ c.le.s $f4, $f0 /* 86DEC 800ED93C 00000000 */ nop /* 86DF0 800ED940 45000015 */ bc1f .L800ED998 /* 86DF4 800ED944 E4420000 */ swc1 $f2, 0x0($v0) /* 86DF8 800ED948 46080001 */ sub.s $f0, $f0, $f8 /* 86DFC 800ED94C 3C013E80 */ lui $at, (0x3E800000 >> 16) /* 86E00 800ED950 44811000 */ mtc1 $at, $f2 /* 86E04 800ED954 00000000 */ nop /* 86E08 800ED958 46020002 */ mul.s $f0, $f0, $f2 /* 86E0C 800ED95C 00000000 */ nop /* 86E10 800ED960 0803B666 */ j .L800ED998 /* 86E14 800ED964 E4400000 */ swc1 $f0, 0x0($v0) .L800ED968: /* 86E18 800ED968 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 86E1C 800ED96C 44810000 */ mtc1 $at, $f0 /* 86E20 800ED970 00000000 */ nop /* 86E24 800ED974 46001000 */ add.s $f0, $f2, $f0 /* 86E28 800ED978 46040001 */ sub.s $f0, $f0, $f4 /* 86E2C 800ED97C 3C013D80 */ lui $at, (0x3D800000 >> 16) /* 86E30 800ED980 44811000 */ mtc1 $at, $f2 /* 86E34 800ED984 00000000 */ nop .L800ED988: /* 86E38 800ED988 46020002 */ mul.s $f0, $f0, $f2 /* 86E3C 800ED98C 00000000 */ nop /* 86E40 800ED990 3C018010 */ lui $at, %hi(D_800F84F8) /* 86E44 800ED994 E42084F8 */ swc1 $f0, %lo(D_800F84F8)($at) .L800ED998: /* 86E48 800ED998 C600003C */ lwc1 $f0, 0x3C($s0) /* 86E4C 800ED99C 3C018010 */ lui $at, %hi(D_800F84F8) /* 86E50 800ED9A0 C42284F8 */ lwc1 $f2, %lo(D_800F84F8)($at) /* 86E54 800ED9A4 46020000 */ add.s $f0, $f0, $f2 /* 86E58 800ED9A8 E600003C */ swc1 $f0, 0x3C($s0) .L800ED9AC: /* 86E5C 800ED9AC C6000038 */ lwc1 $f0, 0x38($s0) /* 86E60 800ED9B0 C602003C */ lwc1 $f2, 0x3C($s0) /* 86E64 800ED9B4 C6040040 */ lwc1 $f4, 0x40($s0) .L800ED9B8: /* 86E68 800ED9B8 3C018010 */ lui $at, %hi(wSavedPartnerPosX) /* 86E6C 800ED9BC E420833C */ swc1 $f0, %lo(wSavedPartnerPosX)($at) /* 86E70 800ED9C0 3C018010 */ lui $at, %hi(wSavedPartnerPosY) /* 86E74 800ED9C4 E4228340 */ swc1 $f2, %lo(wSavedPartnerPosY)($at) /* 86E78 800ED9C8 3C018010 */ lui $at, %hi(wSavedPartnerPosZ) /* 86E7C 800ED9CC E4248344 */ swc1 $f4, %lo(wSavedPartnerPosZ)($at) /* 86E80 800ED9D0 8FBF004C */ lw $ra, 0x4C($sp) /* 86E84 800ED9D4 8FB60048 */ lw $s6, 0x48($sp) /* 86E88 800ED9D8 8FB50044 */ lw $s5, 0x44($sp) /* 86E8C 800ED9DC 8FB40040 */ lw $s4, 0x40($sp) /* 86E90 800ED9E0 8FB3003C */ lw $s3, 0x3C($sp) /* 86E94 800ED9E4 8FB20038 */ lw $s2, 0x38($sp) /* 86E98 800ED9E8 8FB10034 */ lw $s1, 0x34($sp) /* 86E9C 800ED9EC 8FB00030 */ lw $s0, 0x30($sp) /* 86EA0 800ED9F0 03E00008 */ jr $ra /* 86EA4 800ED9F4 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void partner_flying_update_motion(Npc* partner) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerStatus* partnerStatus = &gPartnerStatus; f32 x, y, z, hitDepth; f32 var_f0; f32 var_f2; if (gGameStatusPtr->multiplayerEnabled == 0 || (playerStatus->flags & (PS_FLAG_INPUT_DISABLED | PS_FLAG_NO_STATIC_COLLISION)) || partnerStatus->inputDisabledCount || partnerStatus->partnerAction_unk_2) { if (!(playerStatus->animFlags & PA_FLAG_OPENED_HIDDEN_PANEL) || D_800F8020 == 0) { partner_flying_follow_player(partner); } if (partnerStatus->pressedButtons & (BUTTON_B | BUTTON_Z | BUTTON_C_DOWN | BUTTON_C_LEFT)) { partnerStatus->partnerAction_unk_2 = FALSE; } } if (wPartnerFollowState != 50 && fabsf(partner->pos.y - playerStatus->position.y) > 1000.0f) { partner->pos.x = playerStatus->position.x; partner->pos.y = playerStatus->position.y; partner->pos.z = playerStatus->position.z; partner->jumpVelocity = 0.0f; partner->jumpScale = 0.0f; partner->flags &= ~NPC_FLAG_JUMPING; } D_800F8020 = 0; x = partner->pos.x; y = partner->pos.y + (partner->collisionHeight * 0.5f); z = partner->pos.z; hitDepth = partner->collisionHeight * 0.5f; if (npc_raycast_up(0, &x, &y, &z, &hitDepth) != 0) { D_800F8020 = 1; wSavedPartnerPosX = partner->pos.x; wSavedPartnerPosY = partner->pos.y; wSavedPartnerPosZ = partner->pos.z; } else { partner_do_player_collision(partner); if (wPartnerFollowState != 0x32) { x = partner->pos.x; y = partner->pos.y; z = partner->pos.z; hitDepth = 1000.0f; if (npc_raycast_down_around(COLLISION_CHANNEL_10000, &x, &y, &z, &hitDepth, partner->yaw, partner->collisionDiameter) == 0) { y = playerStatus->position.y; } if (partner->pos.y <= y + partner->collisionHeight + 2.0f) { if (playerStatus->currentSpeed != 0.0f) { D_800F84F8 = ((y + (partner->collisionHeight / 2) + 2.0f) - partner->pos.y) * 0.125f; } else { if (y < playerStatus->position.y) { var_f0 = playerStatus->position.y + 10.0f - partner->pos.y; } else { var_f0 = y + 10.0f - partner->pos.y; } var_f2 = 0.25f; D_800F84F8 = var_f0 * var_f2; } } else { if (playerStatus->position.y + playerStatus->colliderHeight < y) { D_800F84F8 = (y + partner->collisionHeight - partner->pos.y) * 0.125f; if (partner->pos.y + D_800F84F8 <= y + partner->collisionHeight) { D_800F84F8 = (y + partner->collisionHeight - partner->pos.y) * 0.25f; } } else { var_f0 = (playerStatus->position.y + playerStatus->colliderHeight + 5.0f) - partner->pos.y; var_f2 = 0.0625f; D_800F84F8 = var_f0 * var_f2; } } partner->pos.y += D_800F84F8; } wSavedPartnerPosX = partner->pos.x; wSavedPartnerPosY = partner->pos.y; wSavedPartnerPosZ = partner->pos.z; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel got_item_outline_appendGfx /* 345704 E0036224 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 345708 E0036228 0080402D */ daddu $t0, $a0, $zero /* 34570C E003622C AFBF00B8 */ sw $ra, 0xB8($sp) /* 345710 E0036230 AFB700B4 */ sw $s7, 0xB4($sp) /* 345714 E0036234 AFB600B0 */ sw $s6, 0xB0($sp) /* 345718 E0036238 AFB500AC */ sw $s5, 0xAC($sp) /* 34571C E003623C AFB400A8 */ sw $s4, 0xA8($sp) /* 345720 E0036240 AFB300A4 */ sw $s3, 0xA4($sp) /* 345724 E0036244 AFB200A0 */ sw $s2, 0xA0($sp) /* 345728 E0036248 AFB1009C */ sw $s1, 0x9C($sp) /* 34572C E003624C AFB00098 */ sw $s0, 0x98($sp) /* 345730 E0036250 F7B800D0 */ sdc1 $f24, 0xD0($sp) /* 345734 E0036254 F7B600C8 */ sdc1 $f22, 0xC8($sp) /* 345738 E0036258 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* 34573C E003625C 8D07000C */ lw $a3, 0xC($t0) /* 345740 E0036260 44800000 */ mtc1 $zero, $f0 /* 345744 E0036264 C4F80018 */ lwc1 $f24, 0x18($a3) /* 345748 E0036268 8CF30000 */ lw $s3, 0x0($a3) /* 34574C E003626C 4600C032 */ c.eq.s $f24, $f0 /* 345750 E0036270 00000000 */ nop /* 345754 E0036274 450100E0 */ bc1t .LE00365F8 /* 345758 E0036278 3C04DB06 */ lui $a0, (0xDB060024 >> 16) /* 34575C E003627C 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 345760 E0036280 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 345764 E0036284 34840024 */ ori $a0, $a0, (0xDB060024 & 0xFFFF) /* 345768 E0036288 8CC50000 */ lw $a1, 0x0($a2) /* 34576C E003628C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 345770 E0036290 00A0182D */ daddu $v1, $a1, $zero /* 345774 E0036294 24A50008 */ addiu $a1, $a1, 0x8 /* 345778 E0036298 ACC50000 */ sw $a1, 0x0($a2) /* 34577C E003629C AC620000 */ sw $v0, 0x0($v1) /* 345780 E00362A0 24A20008 */ addiu $v0, $a1, 0x8 /* 345784 E00362A4 AC600004 */ sw $zero, 0x4($v1) /* 345788 E00362A8 ACC20000 */ sw $v0, 0x0($a2) /* 34578C E00362AC ACA40000 */ sw $a0, 0x0($a1) /* 345790 E00362B0 8D030010 */ lw $v1, 0x10($t0) /* 345794 E00362B4 24A20010 */ addiu $v0, $a1, 0x10 /* 345798 E00362B8 ACC20000 */ sw $v0, 0x0($a2) /* 34579C E00362BC 8C63001C */ lw $v1, 0x1C($v1) /* 3457A0 E00362C0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3457A4 E00362C4 ACA20008 */ sw $v0, 0x8($a1) /* 3457A8 E00362C8 3C020901 */ lui $v0, %hi(D_09008100_3F3F60) /* 3457AC E00362CC 24428100 */ addiu $v0, $v0, %lo(D_09008100_3F3F60) /* 3457B0 E00362D0 ACA2000C */ sw $v0, 0xC($a1) /* 3457B4 E00362D4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3457B8 E00362D8 00621821 */ addu $v1, $v1, $v0 /* 3457BC E00362DC 1660000E */ bnez $s3, .LE0036318 /* 3457C0 E00362E0 ACA30004 */ sw $v1, 0x4($a1) /* 3457C4 E00362E4 24A20018 */ addiu $v0, $a1, 0x18 /* 3457C8 E00362E8 ACC20000 */ sw $v0, 0x0($a2) /* 3457CC E00362EC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3457D0 E00362F0 ACA20010 */ sw $v0, 0x10($a1) /* 3457D4 E00362F4 90E3001F */ lbu $v1, 0x1F($a3) /* 3457D8 E00362F8 24A20020 */ addiu $v0, $a1, 0x20 /* 3457DC E00362FC ACC20000 */ sw $v0, 0x0($a2) /* 3457E0 E0036300 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3457E4 E0036304 ACA20018 */ sw $v0, 0x18($a1) /* 3457E8 E0036308 240200FF */ addiu $v0, $zero, 0xFF /* 3457EC E003630C ACA2001C */ sw $v0, 0x1C($a1) /* 3457F0 E0036310 0800D8D3 */ j .LE003634C /* 3457F4 E0036314 2402FF00 */ addiu $v0, $zero, -0x100 .LE0036318: /* 3457F8 E0036318 3C04FFFF */ lui $a0, (0xFFFF00FF >> 16) /* 3457FC E003631C 348400FF */ ori $a0, $a0, (0xFFFF00FF & 0xFFFF) /* 345800 E0036320 24A20018 */ addiu $v0, $a1, 0x18 /* 345804 E0036324 ACC20000 */ sw $v0, 0x0($a2) /* 345808 E0036328 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 34580C E003632C ACA20010 */ sw $v0, 0x10($a1) /* 345810 E0036330 90E3001F */ lbu $v1, 0x1F($a3) /* 345814 E0036334 24A20020 */ addiu $v0, $a1, 0x20 /* 345818 E0036338 ACC20000 */ sw $v0, 0x0($a2) /* 34581C E003633C 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 345820 E0036340 ACA20018 */ sw $v0, 0x18($a1) /* 345824 E0036344 2402FF00 */ addiu $v0, $zero, -0x100 /* 345828 E0036348 ACA4001C */ sw $a0, 0x1C($a1) .LE003634C: /* 34582C E003634C 00621825 */ or $v1, $v1, $v0 /* 345830 E0036350 ACA30014 */ sw $v1, 0x14($a1) /* 345834 E0036354 8CE50004 */ lw $a1, 0x4($a3) /* 345838 E0036358 8CE60008 */ lw $a2, 0x8($a3) /* 34583C E003635C 8CE7000C */ lw $a3, 0xC($a3) /* 345840 E0036360 0C080108 */ jal shim_guTranslateF /* 345844 E0036364 27A40018 */ addiu $a0, $sp, 0x18 /* 345848 E0036368 27B00058 */ addiu $s0, $sp, 0x58 /* 34584C E003636C 4480A000 */ mtc1 $zero, $f20 /* 345850 E0036370 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 345854 E0036374 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 345858 E0036378 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 34585C E003637C 4481B000 */ mtc1 $at, $f22 /* 345860 E0036380 00031080 */ sll $v0, $v1, 2 /* 345864 E0036384 00431021 */ addu $v0, $v0, $v1 /* 345868 E0036388 00021080 */ sll $v0, $v0, 2 /* 34586C E003638C 00431023 */ subu $v0, $v0, $v1 /* 345870 E0036390 000218C0 */ sll $v1, $v0, 3 /* 345874 E0036394 00431021 */ addu $v0, $v0, $v1 /* 345878 E0036398 000210C0 */ sll $v0, $v0, 3 /* 34587C E003639C 4406A000 */ mfc1 $a2, $f20 /* 345880 E00363A0 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 345884 E00363A4 00220821 */ addu $at, $at, $v0 /* 345888 E00363A8 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 34588C E00363AC 4407B000 */ mfc1 $a3, $f22 /* 345890 E00363B0 46000007 */ neg.s $f0, $f0 /* 345894 E00363B4 44050000 */ mfc1 $a1, $f0 /* 345898 E00363B8 0200202D */ daddu $a0, $s0, $zero /* 34589C E00363BC 0C080104 */ jal shim_guRotateF /* 3458A0 E00363C0 E7B40010 */ swc1 $f20, 0x10($sp) /* 3458A4 E00363C4 0200202D */ daddu $a0, $s0, $zero /* 3458A8 E00363C8 27A50018 */ addiu $a1, $sp, 0x18 /* 3458AC E00363CC 0C080114 */ jal shim_guMtxCatF /* 3458B0 E00363D0 00A0302D */ daddu $a2, $a1, $zero /* 3458B4 E00363D4 0200202D */ daddu $a0, $s0, $zero /* 3458B8 E00363D8 4405A000 */ mfc1 $a1, $f20 /* 3458BC E00363DC 3C07C000 */ lui $a3, (0xC0000000 >> 16) /* 3458C0 E00363E0 0C080108 */ jal shim_guTranslateF /* 3458C4 E00363E4 00A0302D */ daddu $a2, $a1, $zero /* 3458C8 E00363E8 0200202D */ daddu $a0, $s0, $zero /* 3458CC E00363EC 27A50018 */ addiu $a1, $sp, 0x18 /* 3458D0 E00363F0 0C080114 */ jal shim_guMtxCatF /* 3458D4 E00363F4 00A0302D */ daddu $a2, $a1, $zero /* 3458D8 E00363F8 3C01E003 */ lui $at, (0xE0036650 >> 16) /* 3458DC E00363FC D4226650 */ ldc1 $f2, (0xE0036650 & 0xFFFF)($at) /* 3458E0 E0036400 4600C021 */ cvt.d.s $f0, $f24 /* 3458E4 E0036404 46220002 */ mul.d $f0, $f0, $f2 /* 3458E8 E0036408 00000000 */ nop /* 3458EC E003640C 3C120001 */ lui $s2, (0x11630 >> 16) /* 3458F0 E0036410 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3458F4 E0036414 0200202D */ daddu $a0, $s0, $zero /* 3458F8 E0036418 46200620 */ cvt.s.d $f24, $f0 /* 3458FC E003641C 4405C000 */ mfc1 $a1, $f24 /* 345900 E0036420 4407B000 */ mfc1 $a3, $f22 /* 345904 E0036424 0C080110 */ jal shim_guScaleF /* 345908 E0036428 00A0302D */ daddu $a2, $a1, $zero /* 34590C E003642C 0200202D */ daddu $a0, $s0, $zero /* 345910 E0036430 27A50018 */ addiu $a1, $sp, 0x18 /* 345914 E0036434 0C080114 */ jal shim_guMtxCatF /* 345918 E0036438 00A0302D */ daddu $a2, $a1, $zero /* 34591C E003643C 27A40018 */ addiu $a0, $sp, 0x18 /* 345920 E0036440 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 345924 E0036444 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 345928 E0036448 3C11800A */ lui $s1, %hi(gDisplayContext) /* 34592C E003644C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 345930 E0036450 96050000 */ lhu $a1, 0x0($s0) /* 345934 E0036454 8E220000 */ lw $v0, 0x0($s1) /* 345938 E0036458 00052980 */ sll $a1, $a1, 6 /* 34593C E003645C 00B22821 */ addu $a1, $a1, $s2 /* 345940 E0036460 0C080118 */ jal shim_guMtxF2L /* 345944 E0036464 00452821 */ addu $a1, $v0, $a1 /* 345948 E0036468 3C05DA38 */ lui $a1, (0xDA380002 >> 16) /* 34594C E003646C 34A50002 */ ori $a1, $a1, (0xDA380002 & 0xFFFF) /* 345950 E0036470 0000482D */ daddu $t1, $zero, $zero /* 345954 E0036474 3C170900 */ lui $s7, %hi(D_09000000_415060) /* 345958 E0036478 26F70000 */ addiu $s7, $s7, %lo(D_09000000_415060) /* 34595C E003647C 3C160900 */ lui $s6, %hi(D_09004000_411290) /* 345960 E0036480 26D64000 */ addiu $s6, $s6, %lo(D_09004000_411290) /* 345964 E0036484 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 345968 E0036488 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 34596C E003648C 0040302D */ daddu $a2, $v0, $zero /* 345970 E0036490 3C0DFD68 */ lui $t5, (0xFD68007F >> 16) /* 345974 E0036494 35AD007F */ ori $t5, $t5, (0xFD68007F & 0xFFFF) /* 345978 E0036498 3C0AF568 */ lui $t2, (0xF5682000 >> 16) /* 34597C E003649C 354A2000 */ ori $t2, $t2, (0xF5682000 & 0xFFFF) /* 345980 E00364A0 3C150700 */ lui $s5, (0x7000000 >> 16) /* 345984 E00364A4 3C14E600 */ lui $s4, (0xE6000000 >> 16) /* 345988 E00364A8 3C19F400 */ lui $t9, (0xF4000000 >> 16) /* 34598C E00364AC 3C0C071F */ lui $t4, (0x71FC07C >> 16) /* 345990 E00364B0 358CC07C */ ori $t4, $t4, (0x71FC07C & 0xFFFF) /* 345994 E00364B4 3C18E700 */ lui $t8, (0xE7000000 >> 16) /* 345998 E00364B8 3C0FF200 */ lui $t7, (0xF2000000 >> 16) /* 34599C E00364BC 3C0B001F */ lui $t3, (0x1FC07C >> 16) /* 3459A0 E00364C0 356BC07C */ ori $t3, $t3, (0x1FC07C & 0xFFFF) /* 3459A4 E00364C4 3C0EDE00 */ lui $t6, (0xDE000000 >> 16) /* 3459A8 E00364C8 3C08E003 */ lui $t0, %hi(D_E0036630) /* 3459AC E00364CC 25086630 */ addiu $t0, $t0, %lo(D_E0036630) /* 3459B0 E00364D0 0120382D */ daddu $a3, $t1, $zero /* 3459B4 E00364D4 8CC30000 */ lw $v1, 0x0($a2) /* 3459B8 E00364D8 96020000 */ lhu $v0, 0x0($s0) /* 3459BC E00364DC 0060202D */ daddu $a0, $v1, $zero /* 3459C0 E00364E0 24630008 */ addiu $v1, $v1, 0x8 /* 3459C4 E00364E4 ACC30000 */ sw $v1, 0x0($a2) /* 3459C8 E00364E8 24430001 */ addiu $v1, $v0, 0x1 /* 3459CC E00364EC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3459D0 E00364F0 00021180 */ sll $v0, $v0, 6 /* 3459D4 E00364F4 AC850000 */ sw $a1, 0x0($a0) /* 3459D8 E00364F8 A6030000 */ sh $v1, 0x0($s0) /* 3459DC E00364FC 8E230000 */ lw $v1, 0x0($s1) /* 3459E0 E0036500 00521021 */ addu $v0, $v0, $s2 /* 3459E4 E0036504 00621821 */ addu $v1, $v1, $v0 /* 3459E8 E0036508 AC830004 */ sw $v1, 0x4($a0) .LE003650C: /* 3459EC E003650C 16600002 */ bnez $s3, .LE0036518 /* 3459F0 E0036510 00F62021 */ addu $a0, $a3, $s6 /* 3459F4 E0036514 00F72021 */ addu $a0, $a3, $s7 .LE0036518: /* 3459F8 E0036518 24E71000 */ addiu $a3, $a3, 0x1000 /* 3459FC E003651C 8CC30000 */ lw $v1, 0x0($a2) /* 345A00 E0036520 25290001 */ addiu $t1, $t1, 0x1 /* 345A04 E0036524 0060102D */ daddu $v0, $v1, $zero /* 345A08 E0036528 24630008 */ addiu $v1, $v1, 0x8 /* 345A0C E003652C AC4D0000 */ sw $t5, 0x0($v0) /* 345A10 E0036530 AC440004 */ sw $a0, 0x4($v0) /* 345A14 E0036534 AC6A0000 */ sw $t2, 0x0($v1) /* 345A18 E0036538 AC750004 */ sw $s5, 0x4($v1) /* 345A1C E003653C AC740008 */ sw $s4, 0x8($v1) /* 345A20 E0036540 AC60000C */ sw $zero, 0xC($v1) /* 345A24 E0036544 AC790010 */ sw $t9, 0x10($v1) /* 345A28 E0036548 AC6C0014 */ sw $t4, 0x14($v1) /* 345A2C E003654C AC780018 */ sw $t8, 0x18($v1) /* 345A30 E0036550 AC60001C */ sw $zero, 0x1C($v1) /* 345A34 E0036554 AC6A0020 */ sw $t2, 0x20($v1) /* 345A38 E0036558 AC600024 */ sw $zero, 0x24($v1) /* 345A3C E003655C AC6F0028 */ sw $t7, 0x28($v1) /* 345A40 E0036560 AC6B002C */ sw $t3, 0x2C($v1) /* 345A44 E0036564 AC6E0030 */ sw $t6, 0x30($v1) /* 345A48 E0036568 8D040000 */ lw $a0, 0x0($t0) /* 345A4C E003656C 25080004 */ addiu $t0, $t0, 0x4 /* 345A50 E0036570 24620008 */ addiu $v0, $v1, 0x8 /* 345A54 E0036574 ACC30000 */ sw $v1, 0x0($a2) /* 345A58 E0036578 ACC20000 */ sw $v0, 0x0($a2) /* 345A5C E003657C 24620010 */ addiu $v0, $v1, 0x10 /* 345A60 E0036580 ACC20000 */ sw $v0, 0x0($a2) /* 345A64 E0036584 24620018 */ addiu $v0, $v1, 0x18 /* 345A68 E0036588 ACC20000 */ sw $v0, 0x0($a2) /* 345A6C E003658C 24620020 */ addiu $v0, $v1, 0x20 /* 345A70 E0036590 ACC20000 */ sw $v0, 0x0($a2) /* 345A74 E0036594 24620028 */ addiu $v0, $v1, 0x28 /* 345A78 E0036598 ACC20000 */ sw $v0, 0x0($a2) /* 345A7C E003659C 24620030 */ addiu $v0, $v1, 0x30 /* 345A80 E00365A0 ACC20000 */ sw $v0, 0x0($a2) /* 345A84 E00365A4 24620038 */ addiu $v0, $v1, 0x38 /* 345A88 E00365A8 ACC20000 */ sw $v0, 0x0($a2) /* 345A8C E00365AC 29220004 */ slti $v0, $t1, 0x4 /* 345A90 E00365B0 1440FFD6 */ bnez $v0, .LE003650C /* 345A94 E00365B4 AC640034 */ sw $a0, 0x34($v1) /* 345A98 E00365B8 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 345A9C E00365BC 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 345AA0 E00365C0 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 345AA4 E00365C4 8C820000 */ lw $v0, 0x0($a0) /* 345AA8 E00365C8 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 345AAC E00365CC 0040282D */ daddu $a1, $v0, $zero /* 345AB0 E00365D0 24420008 */ addiu $v0, $v0, 0x8 /* 345AB4 E00365D4 AC820000 */ sw $v0, 0x0($a0) /* 345AB8 E00365D8 ACA30000 */ sw $v1, 0x0($a1) /* 345ABC E00365DC 24030040 */ addiu $v1, $zero, 0x40 /* 345AC0 E00365E0 ACA30004 */ sw $v1, 0x4($a1) /* 345AC4 E00365E4 24430008 */ addiu $v1, $v0, 0x8 /* 345AC8 E00365E8 AC830000 */ sw $v1, 0x0($a0) /* 345ACC E00365EC 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 345AD0 E00365F0 AC430000 */ sw $v1, 0x0($v0) /* 345AD4 E00365F4 AC400004 */ sw $zero, 0x4($v0) .LE00365F8: /* 345AD8 E00365F8 8FBF00B8 */ lw $ra, 0xB8($sp) /* 345ADC E00365FC 8FB700B4 */ lw $s7, 0xB4($sp) /* 345AE0 E0036600 8FB600B0 */ lw $s6, 0xB0($sp) /* 345AE4 E0036604 8FB500AC */ lw $s5, 0xAC($sp) /* 345AE8 E0036608 8FB400A8 */ lw $s4, 0xA8($sp) /* 345AEC E003660C 8FB300A4 */ lw $s3, 0xA4($sp) /* 345AF0 E0036610 8FB200A0 */ lw $s2, 0xA0($sp) /* 345AF4 E0036614 8FB1009C */ lw $s1, 0x9C($sp) /* 345AF8 E0036618 8FB00098 */ lw $s0, 0x98($sp) /* 345AFC E003661C D7B800D0 */ ldc1 $f24, 0xD0($sp) /* 345B00 E0036620 D7B600C8 */ ldc1 $f22, 0xC8($sp) /* 345B04 E0036624 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* 345B08 E0036628 03E00008 */ jr $ra /* 345B0C E003662C 27BD00D8 */ addiu $sp, $sp, 0xD8 ### DECOMPILED C INSTRUCTIONS: void got_item_outline_appendGfx(void* effect) { GotItemOutlineFXData* data = ((EffectInstance*)effect)->data.gotItemOutline; s32 type = data->type; f32 scale = data->scale; Matrix4f mtxTransform; Matrix4f mtxTemp; s32 i; if (scale != 0.0f) { gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09008100_34DC40); if (type == 0) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->alpha); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 255); } else { gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->alpha); gDPSetEnvColor(gMainGfxPos++, 255, 255, 0, 255); } 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, mtxTransform); shim_guTranslateF(mtxTemp, 0.0f, 0.0f, -2.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); scale *= 0.6; shim_guScaleF(mtxTemp, scale, scale, 1.0f); shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform); shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); for (i = 0; i < 4; i++) { IMG_PTR img; if (type == 0) { img = D_09000000_345B40[i]; } else { img = D_09004000_349B40[i]; } gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 128, img); gDPSetTile(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); gDPLoadSync(gMainGfxPos++); gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 508, 124); gDPPipeSync(gMainGfxPos++); gDPSetTile(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, 0, 508, 124); gSPDisplayList(gMainGfxPos++, D_E0036630[i]); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80240DA4_EA9884 /* 9087D4 80240DA4 27BDFFA0 */ addiu $sp, $sp, -0x60 glabel func_80240DA8 /* 9087D8 80240DA8 0000202D */ daddu $a0, $zero, $zero glabel sam_08_MeleeHitbox_31 /* 9087DC 80240DAC 3C05FD05 */ lui $a1, (0xFD050F80 >> 16) glabel .L80240DB0 /* 9087E0 80240DB0 34A50F80 */ ori $a1, $a1, (0xFD050F80 & 0xFFFF) glabel mgm_00_PatrolNoAttackAI_15 /* 9087E4 80240DB4 AFBF0058 */ sw $ra, 0x58($sp) glabel mgm_01_EndBowserPanelAnimation /* 9087E8 80240DB8 AFB10054 */ sw $s1, 0x54($sp) glabel pra_31_UnkFunc12 /* 9087EC 80240DBC 0C0B1EAF */ jal evt_get_variable glabel func_80240DC0 /* 9087F0 80240DC0 AFB00050 */ sw $s0, 0x50($sp) glabel dead_kzn_17_func_80240DC4_EA16C4 /* 9087F4 80240DC4 241000E2 */ addiu $s0, $zero, 0xE2 glabel .L80240DC8 /* 9087F8 80240DC8 3C038024 */ lui $v1, %hi(func_802417C8) glabel func_80240DCC /* 9087FC 80240DCC 8C6317C8 */ lw $v1, %lo(func_802417C8)($v1) glabel func_80240DD0 /* 908800 80240DD0 0040202D */ daddu $a0, $v0, $zero glabel .L80240DD4 /* 908804 80240DD4 2C620005 */ sltiu $v0, $v1, 0x5 glabel .L80240DD8 /* 908808 80240DD8 1040003F */ beqz $v0, sam_02_Quizmo_NPC_Aux_Impl D_80240DDC: /* 90880C 80240DDC 24110046 */ addiu $s1, $zero, 0x46 glabel func_80240DE0 /* 908810 80240DE0 00031080 */ sll $v0, $v1, 2 D_80240DE4: /* 908814 80240DE4 3C018024 */ lui $at, %hi(D_802437F0) glabel dead_flo_16_SuperBlock_WaitForPlayerToLand /* 908818 80240DE8 00220821 */ addu $at, $at, $v0 glabel func_80240DEC /* 90881C 80240DEC 8C2237F0 */ lw $v0, %lo(D_802437F0)($at) glabel func_80240DF0 /* 908820 80240DF0 00400008 */ jr $v0 glabel func_80240DF4 /* 908824 80240DF4 00000000 */ nop glabel func_80240DF8 /* 908828 80240DF8 8482001E */ lh $v0, 0x1E($a0) glabel func_80240DFC /* 90882C 80240DFC 10400036 */ beqz $v0, sam_02_Quizmo_NPC_Aux_Impl glabel func_80240E00 /* 908830 80240E00 24020001 */ addiu $v0, $zero, 0x1 D_80240E04: /* 908834 80240E04 080903B4 */ j func_80240ED0 glabel flo_22_pad_E08 /* 908838 80240E08 00000000 */ nop glabel func_80240E0C /* 90883C 80240E0C 3C048024 */ lui $a0, %hi(dead_flo_08_AddPlayerHandsOffset) D_80240E10: /* 908840 80240E10 248417CC */ addiu $a0, $a0, %lo(dead_flo_08_AddPlayerHandsOffset) glabel func_80240E14 /* 908844 80240E14 3C058024 */ lui $a1, %hi(dead_flo_14_FlyingAI_ChaseInit) glabel dead_flo_16_IsPlayerPounding /* 908848 80240E18 24A517D0 */ addiu $a1, $a1, %lo(dead_flo_14_FlyingAI_ChaseInit) glabel func_80240E1C /* 90884C 80240E1C 8C820000 */ lw $v0, 0x0($a0) glabel func_80240E20 /* 908850 80240E20 8CA30000 */ lw $v1, 0x0($a1) D_80240E24: /* 908854 80240E24 24420014 */ addiu $v0, $v0, 0x14 glabel flo_12_pad_E28 /* 908858 80240E28 24630005 */ addiu $v1, $v1, 0x5 glabel func_80240E2C /* 90885C 80240E2C AC820000 */ sw $v0, 0x0($a0) D_80240E30: /* 908860 80240E30 0050102A */ slt $v0, $v0, $s0 glabel func_80240E34 /* 908864 80240E34 14400002 */ bnez $v0, D_80240E40 glabel func_80240E38 /* 908868 80240E38 ACA30000 */ sw $v1, 0x0($a1) D_80240E3C: /* 90886C 80240E3C AC900000 */ sw $s0, 0x0($a0) D_80240E40: /* 908870 80240E40 0071102A */ slt $v0, $v1, $s1 .L80240E44: /* 908874 80240E44 50400001 */ beql $v0, $zero, func_80240E4C glabel func_80240E48 /* 908878 80240E48 ACB10000 */ sw $s1, 0x0($a1) glabel func_80240E4C /* 90887C 80240E4C 8C820000 */ lw $v0, 0x0($a0) glabel dead_flo_16_FlyingAI_WanderInit /* 908880 80240E50 14500021 */ bne $v0, $s0, sam_02_Quizmo_NPC_Aux_Impl glabel func_80240E54 /* 908884 80240E54 00000000 */ nop glabel func_80240E58 /* 908888 80240E58 8CA20000 */ lw $v0, 0x0($a1) D_80240E5C: /* 90888C 80240E5C 1451001E */ bne $v0, $s1, sam_02_Quizmo_NPC_Aux_Impl glabel func_80240E60 /* 908890 80240E60 24020002 */ addiu $v0, $zero, 0x2 glabel dead_11_FlyingAI_Chase /* 908894 80240E64 080903B4 */ j func_80240ED0 D_80240E68: /* 908898 80240E68 00000000 */ nop glabel func_80240E6C /* 90889C 80240E6C 8482001E */ lh $v0, 0x1E($a0) glabel func_80240E70 /* 9088A0 80240E70 14400019 */ bnez $v0, sam_02_Quizmo_NPC_Aux_Impl glabel func_80240E74 /* 9088A4 80240E74 24020003 */ addiu $v0, $zero, 0x3 glabel .L80240E78 /* 9088A8 80240E78 080903B4 */ j func_80240ED0 glabel .L80240E7C /* 9088AC 80240E7C 00000000 */ nop glabel func_80240E80 /* 9088B0 80240E80 3C048024 */ lui $a0, %hi(dead_flo_08_AddPlayerHandsOffset) glabel dead_flo_13_FlyingAI_ChaseInit /* 9088B4 80240E84 248417CC */ addiu $a0, $a0, %lo(dead_flo_08_AddPlayerHandsOffset) flo_18_pad_E88: /* 9088B8 80240E88 3C058024 */ lui $a1, %hi(dead_flo_14_FlyingAI_ChaseInit) glabel sam_02_Quizmo_RenderInit /* 9088BC 80240E8C 24A517D0 */ addiu $a1, $a1, %lo(dead_flo_14_FlyingAI_ChaseInit) D_80240E90: /* 9088C0 80240E90 8C820000 */ lw $v0, 0x0($a0) glabel func_80240E94 /* 9088C4 80240E94 8CA30000 */ lw $v1, 0x0($a1) glabel func_80240E98 /* 9088C8 80240E98 2442FFEC */ addiu $v0, $v0, -0x14 glabel func_80240E9C /* 9088CC 80240E9C 2463FFFB */ addiu $v1, $v1, -0x5 glabel .L80240EA0 /* 9088D0 80240EA0 AC820000 */ sw $v0, 0x0($a0) glabel flo_03_pad_EA4 /* 9088D4 80240EA4 04410002 */ bgez $v0, func_80240EB0 glabel func_80240EA8 /* 9088D8 80240EA8 ACA30000 */ sw $v1, 0x0($a1) glabel func_80240EAC /* 9088DC 80240EAC AC800000 */ sw $zero, 0x0($a0) glabel func_80240EB0 /* 9088E0 80240EB0 04620001 */ bltzl $v1, func_80240EB8 glabel func_80240EB4 /* 9088E4 80240EB4 ACA00000 */ sw $zero, 0x0($a1) glabel func_80240EB8 /* 9088E8 80240EB8 8C820000 */ lw $v0, 0x0($a0) glabel sam_11_Quizmo_UpdateRecords /* 9088EC 80240EBC 1440000A */ bnez $v0, pra_39_worker_reflect_partner_floor glabel end_01_CharAnim_FadeIn_5 /* 9088F0 80240EC0 00000000 */ nop glabel .L80240EC4 /* 9088F4 80240EC4 8CA20000 */ lw $v0, 0x0($a1) glabel dead_11_FlyingAI_LosePlayer /* 9088F8 80240EC8 14400003 */ bnez $v0, sam_02_Quizmo_NPC_Aux_Impl glabel func_80240ECC /* 9088FC 80240ECC 24020004 */ addiu $v0, $zero, 0x4 glabel func_80240ED0 /* 908900 80240ED0 3C018024 */ lui $at, %hi(func_802417C8) glabel .L80240ED4 /* 908904 80240ED4 AC2217C8 */ sw $v0, %lo(func_802417C8)($at) glabel sam_02_Quizmo_NPC_Aux_Impl /* 908908 80240ED8 3C028024 */ lui $v0, %hi(dead_flo_08_AddPlayerHandsOffset) glabel omo_02_GuardAI_IdleInit /* 90890C 80240EDC 8C4217CC */ lw $v0, %lo(dead_flo_08_AddPlayerHandsOffset)($v0) D_80240EE0: /* 908910 80240EE0 10400074 */ beqz $v0, func_802410B4 glabel .L80240EE4 /* 908914 80240EE4 00000000 */ nop glabel pra_39_worker_reflect_partner_floor /* 908918 80240EE8 3C098024 */ lui $t1, %hi(dead_flo_14_FlyingAI_ChaseInit) glabel func_80240EEC /* 90891C 80240EEC 8D2917D0 */ lw $t1, %lo(dead_flo_14_FlyingAI_ChaseInit)($t1) D_80240EF0: /* 908920 80240EF0 11200070 */ beqz $t1, func_802410B4 glabel sam_08_MeleeHitbox_33 /* 908924 80240EF4 2402002F */ addiu $v0, $zero, 0x2F glabel func_80240EF8 /* 908928 80240EF8 3C013FE0 */ lui $at, (0x3FE00000 >> 16) glabel dead_flo_09_FlyingAI_JumpInit /* 90892C 80240EFC 44810800 */ mtc1 $at, $f1 glabel func_80240F00 /* 908930 80240F00 44800000 */ mtc1 $zero, $f0 glabel func_80240F04 /* 908934 80240F04 44902000 */ mtc1 $s0, $f4 flo_03_varStash: /* 908938 80240F08 00000000 */ nop D_80240F0C: /* 90893C 80240F0C 46802121 */ cvt.d.w $f4, $f4 glabel func_80240F10 /* 908940 80240F10 46202102 */ mul.d $f4, $f4, $f0 glabel func_80240F14 /* 908944 80240F14 00000000 */ nop glabel func_80240F18 /* 908948 80240F18 3C088024 */ lui $t0, %hi(dead_flo_08_AddPlayerHandsOffset) glabel func_80240F1C /* 90894C 80240F1C 8D0817CC */ lw $t0, %lo(dead_flo_08_AddPlayerHandsOffset)($t0) glabel func_80240F20 /* 908950 80240F20 44884000 */ mtc1 $t0, $f8 glabel .L80240F24 /* 908954 80240F24 00000000 */ nop dead_flo_03_varStash: /* 908958 80240F28 46804221 */ cvt.d.w $f8, $f8 glabel func_80240F2C_D7FC8C /* 90895C 80240F2C 46204202 */ mul.d $f8, $f8, $f0 glabel func_80240F30 /* 908960 80240F30 00000000 */ nop glabel .L80240F34 /* 908964 80240F34 44913000 */ mtc1 $s1, $f6 glabel func_80240F38 /* 908968 80240F38 00000000 */ nop D_80240F3C: /* 90896C 80240F3C 468031A1 */ cvt.d.w $f6, $f6 glabel func_80240F40_EB9D90 /* 908970 80240F40 46203182 */ mul.d $f6, $f6, $f0 glabel func_80240F44 /* 908974 80240F44 00000000 */ nop glabel func_80240F48 /* 908978 80240F48 44895000 */ mtc1 $t1, $f10 glabel func_80240F4C /* 90897C 80240F4C 00000000 */ nop glabel pra_39_SwooperAI_Main /* 908980 80240F50 468052A1 */ cvt.d.w $f10, $f10 glabel func_80240F54_DE33E4 /* 908984 80240F54 46205282 */ mul.d $f10, $f10, $f0 glabel func_80240F58 /* 908988 80240F58 00000000 */ nop .L80240F5C: /* 90898C 80240F5C 44821000 */ mtc1 $v0, $f2 glabel func_80240F60_D4DFA0 /* 908990 80240F60 00000000 */ nop D_80240F64: /* 908994 80240F64 468010A1 */ cvt.d.w $f2, $f2 glabel func_80240F68 /* 908998 80240F68 46241080 */ add.d $f2, $f2, $f4 D_80240F6C: /* 90899C 80240F6C 46281401 */ sub.d $f16, $f2, $f8 glabel func_80240F70 /* 9089A0 80240F70 3C014080 */ lui $at, (0x40800000 >> 16) glabel dead_flo_09lo_09_FlyingAI_Jump /* 9089A4 80240F74 44817000 */ mtc1 $at, $f14 glabel func_80240F78 /* 9089A8 80240F78 46208320 */ cvt.s.d $f12, $f16 glabel omo_04_FlyingAI_JumpInit /* 9089AC 80240F7C 460E6302 */ mul.s $f12, $f12, $f14 glabel func_80240F80 /* 9089B0 80240F80 00000000 */ nop glabel func_80240F84 /* 9089B4 80240F84 24020064 */ addiu $v0, $zero, 0x64 glabel kzn_04_SuperBlock_PartnerSparkles2 /* 9089B8 80240F88 44820000 */ mtc1 $v0, $f0 glabel func_80240F8C /* 9089BC 80240F8C 00000000 */ nop glabel func_80240F90 /* 9089C0 80240F90 46800021 */ cvt.d.w $f0, $f0 glabel func_80240F94 /* 9089C4 80240F94 46260000 */ add.d $f0, $f0, $f6 glabel .L80240F98 /* 9089C8 80240F98 462A0181 */ sub.d $f6, $f0, $f10 glabel func_80240F9C /* 9089CC 80240F9C 46203120 */ cvt.s.d $f4, $f6 glabel func_80240FA0 /* 9089D0 80240FA0 460E2102 */ mul.s $f4, $f4, $f14 glabel func_80240FA4 /* 9089D4 80240FA4 00000000 */ nop glabel func_80240FA8 /* 9089D8 80240FA8 46281080 */ add.d $f2, $f2, $f8 glabel func_80240FAC /* 9089DC 80240FAC 24040004 */ addiu $a0, $zero, 0x4 glabel func_80240FB0_EB9E00 /* 9089E0 80240FB0 3C03800A */ lui $v1, %hi(gMainGfxPos) glabel omo_17_FlyingAI_WanderInit /* 9089E4 80240FB4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) glabel func_80240FB8 /* 9089E8 80240FB8 462010A0 */ cvt.s.d $f2, $f2 glabel func_80240FBC /* 9089EC 80240FBC 460E1082 */ mul.s $f2, $f2, $f14 glabel func_80240FC0 /* 9089F0 80240FC0 00000000 */ nop glabel func_80240FC4 /* 9089F4 80240FC4 3C058024 */ lui $a1, %hi(func_802417D8) .L80240FC8: /* 9089F8 80240FC8 24A517D8 */ addiu $a1, $a1, %lo(func_802417D8) glabel func_80240FCC /* 9089FC 80240FCC 8C620000 */ lw $v0, 0x0($v1) tst_04_B_80240FD0: /* 908A00 80240FD0 3C06ED00 */ lui $a2, (0xED000000 >> 16) glabel func_80240FD4 /* 908A04 80240FD4 0040382D */ daddu $a3, $v0, $zero glabel omo_07_PatrolAI_LosePlayer /* 908A08 80240FD8 462A0000 */ add.d $f0, $f0, $f10 glabel func_80240FDC /* 908A0C 80240FDC 24420008 */ addiu $v0, $v0, 0x8 glabel func_80240FE0 /* 908A10 80240FE0 AC620000 */ sw $v0, 0x0($v1) glabel func_80240FE4 /* 908A14 80240FE4 46200020 */ cvt.s.d $f0, $f0 glabel func_80240FE8 /* 908A18 80240FE8 460E0002 */ mul.s $f0, $f0, $f14 glabel end_00_CharAnim_HoldClearImgFX /* 908A1C 80240FEC 00000000 */ nop glabel func_80240FF0 /* 908A20 80240FF0 4600648D */ trunc.w.s $f18, $f12 glabel omo_04_FlyingAI_Jump /* 908A24 80240FF4 44039000 */ mfc1 $v1, $f18 glabel func_80240FF8 /* 908A28 80240FF8 00000000 */ nop glabel func_80240FFC /* 908A2C 80240FFC 30630FFF */ andi $v1, $v1, 0xFFF glabel dead_flo_16_FlyingAI_Wander /* 908A30 80241000 00031B00 */ sll $v1, $v1, 12 glabel pra_28_GetItemName /* 908A34 80241004 4600248D */ trunc.w.s $f18, $f4 glabel func_80241008 /* 908A38 80241008 44029000 */ mfc1 $v0, $f18 D_8024100C: /* 908A3C 8024100C 00000000 */ nop glabel func_80241010 /* 908A40 80241010 30420FFF */ andi $v0, $v0, 0xFFF glabel func_80241014 /* 908A44 80241014 00461025 */ or $v0, $v0, $a2 glabel func_80241018 /* 908A48 80241018 00621825 */ or $v1, $v1, $v0 glabel dead_flo_13_FlyingAI_LosePlayer /* 908A4C 8024101C 4600148D */ trunc.w.s $f18, $f2 glabel func_80241020 /* 908A50 80241020 44029000 */ mfc1 $v0, $f18 glabel func_80241024 /* 908A54 80241024 00000000 */ nop glabel UpdateAntiGuyPosition /* 908A58 80241028 30420FFF */ andi $v0, $v0, 0xFFF glabel func_8024102C /* 908A5C 8024102C 00021300 */ sll $v0, $v0, 12 glabel func_80241030 /* 908A60 80241030 ACE30000 */ sw $v1, 0x0($a3) .L80241034: /* 908A64 80241034 4600048D */ trunc.w.s $f18, $f0 glabel func_80241038 /* 908A68 80241038 44039000 */ mfc1 $v1, $f18 glabel func_8024103C /* 908A6C 8024103C 00000000 */ nop glabel func_80241040 /* 908A70 80241040 30630FFF */ andi $v1, $v1, 0xFFF flo_19_pad_1044: /* 908A74 80241044 00431025 */ or $v0, $v0, $v1 glabel .L80241048 /* 908A78 80241048 ACE20004 */ sw $v0, 0x4($a3) D_8024104C: /* 908A7C 8024104C 240200B4 */ addiu $v0, $zero, 0xB4 D_80241050: /* 908A80 80241050 AFA2001C */ sw $v0, 0x1C($sp) glabel func_80241054 /* 908A84 80241054 24020140 */ addiu $v0, $zero, 0x140 glabel func_80241058 /* 908A88 80241058 AFA20044 */ sw $v0, 0x44($sp) .L8024105C: /* 908A8C 8024105C 240200F0 */ addiu $v0, $zero, 0xF0 glabel omo_04_FlyingAI_ChaseInit /* 908A90 80241060 4620848D */ trunc.w.d $f18, $f16 glabel func_80241064 /* 908A94 80241064 44069000 */ mfc1 $a2, $f18 glabel func_80241068 /* 908A98 80241068 3C013F80 */ lui $at, (0x3F800000 >> 16) glabel func_8024106C /* 908A9C 8024106C 44810000 */ mtc1 $at, $f0 glabel func_80241070 /* 908AA0 80241070 4620348D */ trunc.w.d $f18, $f6 glabel func_80241074 /* 908AA4 80241074 44079000 */ mfc1 $a3, $f18 glabel pra_35_PatrolAI_Move /* 908AA8 80241078 AFA00010 */ sw $zero, 0x10($sp) glabel func_8024107C /* 908AAC 8024107C AFA80014 */ sw $t0, 0x14($sp) glabel func_80241080 /* 908AB0 80241080 AFA90018 */ sw $t1, 0x18($sp) glabel func_80241084 /* 908AB4 80241084 AFA00020 */ sw $zero, 0x20($sp) glabel sam_07_PiranhaPlantAI_10 /* 908AB8 80241088 AFA0002C */ sw $zero, 0x2C($sp) glabel func_8024108C /* 908ABC 8024108C AFA00030 */ sw $zero, 0x30($sp) glabel mgm_01_OnBreakBlock /* 908AC0 80241090 AFA00034 */ sw $zero, 0x34($sp) D_80241094: /* 908AC4 80241094 AFA00038 */ sw $zero, 0x38($sp) glabel func_80241098 /* 908AC8 80241098 AFA0003C */ sw $zero, 0x3C($sp) glabel func_8024109C /* 908ACC 8024109C AFA00040 */ sw $zero, 0x40($sp) D_802410A0: /* 908AD0 802410A0 AFA20048 */ sw $v0, 0x48($sp) glabel omo_09_PatrolAI_Move /* 908AD4 802410A4 AFA0004C */ sw $zero, 0x4C($sp) D_802410A8: /* 908AD8 802410A8 E7A00024 */ swc1 $f0, 0x24($sp) D_802410AC: /* 908ADC 802410AC 0C03D4B8 */ jal draw_box glabel omo_02_GuardAI_AlertInit /* 908AE0 802410B0 E7A00028 */ swc1 $f0, 0x28($sp) glabel func_802410B4 /* 908AE4 802410B4 8FBF0058 */ lw $ra, 0x58($sp) glabel func_802410B8 /* 908AE8 802410B8 8FB10054 */ lw $s1, 0x54($sp) glabel func_802410BC /* 908AEC 802410BC 8FB00050 */ lw $s0, 0x50($sp) glabel func_802410C0 /* 908AF0 802410C0 03E00008 */ jr $ra glabel func_802410C4 /* 908AF4 802410C4 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void func_80240DA4_9087D4(void) { s32 fullWidth = 226; s32 fullHeight = 70; s32 baseX = SCREEN_WIDTH / 2 - fullWidth / 2; s32 baseY = 100; EndChapter* data = (EndChapter*) evt_get_variable(NULL, MV_EndChapterDataPtr); switch (D_802417C8_9091F8) { case 0: if (data->unk1E) { D_802417C8_9091F8 = 1; } break; case 1: D_802417CC_9091FC += 20; D_802417D0_909200 += 5; if (D_802417CC_9091FC >= fullWidth) { D_802417CC_9091FC = fullWidth; } if (D_802417D0_909200 >= fullHeight) { D_802417D0_909200 = fullHeight; } if (D_802417CC_9091FC == fullWidth && D_802417D0_909200 == fullHeight) { D_802417C8_9091F8 = 2; } break; case 2: if (!data->unk1E) { D_802417C8_9091F8 = 3; } break; case 3: D_802417CC_9091FC -= 20; D_802417D0_909200 -= 5; if (D_802417CC_9091FC < 0) { D_802417CC_9091FC = 0; } if (D_802417D0_909200 < 0) { D_802417D0_909200 = 0; } if (D_802417CC_9091FC == 0 && D_802417D0_909200 == 0) { D_802417C8_9091F8 = 4; } break; case 4: break; } if (D_802417CC_9091FC != 0 && D_802417D0_909200 != 0) { f64 ulx = baseX + (fullWidth * 0.5) - (D_802417CC_9091FC * 0.5); f64 uly = baseY + (fullHeight * 0.5) - (D_802417D0_909200 * 0.5); f64 lrx = baseX + (fullWidth * 0.5) + (D_802417CC_9091FC * 0.5); f64 lry = baseY + (fullHeight * 0.5) + (D_802417D0_909200 * 0.5); gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry); draw_box(DRAW_FLAG_NO_CLIP, &D_802417D8_909208, ulx, uly, 0, D_802417CC_9091FC, D_802417D0_909200, 180, 0, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel draw_coin_sparkles /* C720C 80130B0C 27BDFE78 */ addiu $sp, $sp, -0x188 /* C7210 80130B10 AFB20150 */ sw $s2, 0x150($sp) /* C7214 80130B14 0080902D */ daddu $s2, $a0, $zero /* C7218 80130B18 AFB70164 */ sw $s7, 0x164($sp) /* C721C 80130B1C 3C170001 */ lui $s7, (0x11630 >> 16) /* C7220 80130B20 3C03800A */ lui $v1, %hi(gCurrentCamID) /* C7224 80130B24 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* C7228 80130B28 3C014334 */ lui $at, (0x43340000 >> 16) /* C722C 80130B2C 44816000 */ mtc1 $at, $f12 /* C7230 80130B30 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* C7234 80130B34 AFBF016C */ sw $ra, 0x16C($sp) /* C7238 80130B38 AFBE0168 */ sw $fp, 0x168($sp) /* C723C 80130B3C AFB60160 */ sw $s6, 0x160($sp) /* C7240 80130B40 AFB5015C */ sw $s5, 0x15C($sp) /* C7244 80130B44 AFB40158 */ sw $s4, 0x158($sp) /* C7248 80130B48 AFB30154 */ sw $s3, 0x154($sp) /* C724C 80130B4C AFB1014C */ sw $s1, 0x14C($sp) /* C7250 80130B50 AFB00148 */ sw $s0, 0x148($sp) /* C7254 80130B54 F7B80180 */ sdc1 $f24, 0x180($sp) /* C7258 80130B58 F7B60178 */ sdc1 $f22, 0x178($sp) /* C725C 80130B5C F7B40170 */ sdc1 $f20, 0x170($sp) /* C7260 80130B60 00031080 */ sll $v0, $v1, 2 /* C7264 80130B64 00431021 */ addu $v0, $v0, $v1 /* C7268 80130B68 00021080 */ sll $v0, $v0, 2 /* C726C 80130B6C 00431023 */ subu $v0, $v0, $v1 /* C7270 80130B70 000218C0 */ sll $v1, $v0, 3 /* C7274 80130B74 00431021 */ addu $v0, $v0, $v1 /* C7278 80130B78 000210C0 */ sll $v0, $v0, 3 /* C727C 80130B7C 3C038015 */ lui $v1, %hi(D_80155D8C) /* C7280 80130B80 84635D8C */ lh $v1, %lo(D_80155D8C)($v1) /* C7284 80130B84 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* C7288 80130B88 00220821 */ addu $at, $at, $v0 /* C728C 80130B8C C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* C7290 80130B90 3C028015 */ lui $v0, %hi(D_80155D8E) /* C7294 80130B94 84425D8E */ lh $v0, %lo(D_80155D8E)($v0) /* C7298 80130B98 4483C000 */ mtc1 $v1, $f24 /* C729C 80130B9C 00000000 */ nop /* C72A0 80130BA0 4680C620 */ cvt.s.w $f24, $f24 /* C72A4 80130BA4 3C038015 */ lui $v1, %hi(D_80155D90) /* C72A8 80130BA8 84635D90 */ lh $v1, %lo(D_80155D90)($v1) /* C72AC 80130BAC 4482A000 */ mtc1 $v0, $f20 /* C72B0 80130BB0 00000000 */ nop /* C72B4 80130BB4 4680A520 */ cvt.s.w $f20, $f20 /* C72B8 80130BB8 4483B000 */ mtc1 $v1, $f22 /* C72BC 80130BBC 00000000 */ nop /* C72C0 80130BC0 4680B5A0 */ cvt.s.w $f22, $f22 /* C72C4 80130BC4 0C00A6C9 */ jal clamp_angle /* C72C8 80130BC8 46006301 */ sub.s $f12, $f12, $f0 /* C72CC 80130BCC 27A40018 */ addiu $a0, $sp, 0x18 /* C72D0 80130BD0 4405C000 */ mfc1 $a1, $f24 /* C72D4 80130BD4 4406A000 */ mfc1 $a2, $f20 /* C72D8 80130BD8 4407B000 */ mfc1 $a3, $f22 /* C72DC 80130BDC 0C019E40 */ jal guTranslateF /* C72E0 80130BE0 46000506 */ mov.s $f20, $f0 /* C72E4 80130BE4 C642000C */ lwc1 $f2, 0xC($s2) /* C72E8 80130BE8 3C014140 */ lui $at, (0x41400000 >> 16) /* C72EC 80130BEC 44810000 */ mtc1 $at, $f0 /* C72F0 80130BF0 27B10058 */ addiu $s1, $sp, 0x58 /* C72F4 80130BF4 46001080 */ add.s $f2, $f2, $f0 /* C72F8 80130BF8 8E450008 */ lw $a1, 0x8($s2) /* C72FC 80130BFC 8E470010 */ lw $a3, 0x10($s2) /* C7300 80130C00 44061000 */ mfc1 $a2, $f2 /* C7304 80130C04 0C019E40 */ jal guTranslateF /* C7308 80130C08 0220202D */ daddu $a0, $s1, $zero /* C730C 80130C0C 27B00098 */ addiu $s0, $sp, 0x98 /* C7310 80130C10 4405A000 */ mfc1 $a1, $f20 /* C7314 80130C14 44800000 */ mtc1 $zero, $f0 /* C7318 80130C18 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* C731C 80130C1C 44060000 */ mfc1 $a2, $f0 /* C7320 80130C20 0200202D */ daddu $a0, $s0, $zero /* C7324 80130C24 0C019EC8 */ jal guRotateF /* C7328 80130C28 AFA60010 */ sw $a2, 0x10($sp) /* C732C 80130C2C 27A40018 */ addiu $a0, $sp, 0x18 /* C7330 80130C30 0200282D */ daddu $a1, $s0, $zero /* C7334 80130C34 0C019D80 */ jal guMtxCatF /* C7338 80130C38 0200302D */ daddu $a2, $s0, $zero /* C733C 80130C3C 0200202D */ daddu $a0, $s0, $zero /* C7340 80130C40 0220282D */ daddu $a1, $s1, $zero /* C7344 80130C44 27B100D8 */ addiu $s1, $sp, 0xD8 /* C7348 80130C48 0C019D80 */ jal guMtxCatF /* C734C 80130C4C 0220302D */ daddu $a2, $s1, $zero /* C7350 80130C50 0220202D */ daddu $a0, $s1, $zero /* C7354 80130C54 3C138007 */ lui $s3, %hi(gMatrixListPos) /* C7358 80130C58 267341F0 */ addiu $s3, $s3, %lo(gMatrixListPos) /* C735C 80130C5C 3C14800A */ lui $s4, %hi(gDisplayContext) /* C7360 80130C60 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) glabel func_80130C64 /* C7364 80130C64 96650000 */ lhu $a1, 0x0($s3) /* C7368 80130C68 8E820000 */ lw $v0, 0x0($s4) /* C736C 80130C6C 00052980 */ sll $a1, $a1, 6 /* C7370 80130C70 00B72821 */ addu $a1, $a1, $s7 glabel func_80130C74 /* C7374 80130C74 0C019D40 */ jal guMtxF2L /* C7378 80130C78 00452821 */ addu $a1, $v0, $a1 /* C737C 80130C7C 3C08DA38 */ lui $t0, (0xDA380002 >> 16) /* C7380 80130C80 35080002 */ ori $t0, $t0, (0xDA380002 & 0xFFFF) /* C7384 80130C84 3C0AE300 */ lui $t2, (0xE3000A01 >> 16) /* C7388 80130C88 354A0A01 */ ori $t2, $t2, (0xE3000A01 & 0xFFFF) /* C738C 80130C8C 3C0BD9C0 */ lui $t3, (0xD9C0F9FA >> 16) /* C7390 80130C90 356BF9FA */ ori $t3, $t3, (0xD9C0F9FA & 0xFFFF) /* C7394 80130C94 3C0DD9FF */ lui $t5, (0xD9FFFFFF >> 16) /* C7398 80130C98 35ADFFFF */ ori $t5, $t5, (0xD9FFFFFF & 0xFFFF) /* C739C 80130C9C 3C0C0022 */ lui $t4, (0x220005 >> 16) /* C73A0 80130CA0 358C0005 */ ori $t4, $t4, (0x220005 & 0xFFFF) /* C73A4 80130CA4 3C0EDC08 */ lui $t6, (0xDC08060A >> 16) /* C73A8 80130CA8 35CE060A */ ori $t6, $t6, (0xDC08060A & 0xFFFF) /* C73AC 80130CAC 3C0FDC08 */ lui $t7, (0xDC08090A >> 16) /* C73B0 80130CB0 35EF090A */ ori $t7, $t7, (0xDC08090A & 0xFFFF) /* C73B4 80130CB4 3C15D700 */ lui $s5, (0xD7000002 >> 16) /* C73B8 80130CB8 36B50002 */ ori $s5, $s5, (0xD7000002 & 0xFFFF) /* C73BC 80130CBC 3C16E300 */ lui $s6, (0xE3000F00 >> 16) /* C73C0 80130CC0 36D60F00 */ ori $s6, $s6, (0xE3000F00 & 0xFFFF) /* C73C4 80130CC4 3C18E300 */ lui $t8, (0xE3000C00 >> 16) /* C73C8 80130CC8 37180C00 */ ori $t8, $t8, (0xE3000C00 & 0xFFFF) /* C73CC 80130CCC 3C19E300 */ lui $t9, (0xE3001201 >> 16) /* C73D0 80130CD0 37391201 */ ori $t9, $t9, (0xE3001201 & 0xFFFF) /* C73D4 80130CD4 3C1EE300 */ lui $fp, (0xE3001801 >> 16) /* C73D8 80130CD8 37DE1801 */ ori $fp, $fp, (0xE3001801 & 0xFFFF) /* C73DC 80130CDC AFAA0140 */ sw $t2, 0x140($sp) /* C73E0 80130CE0 3C0AE300 */ lui $t2, (0xE3000D01 >> 16) /* C73E4 80130CE4 354A0D01 */ ori $t2, $t2, (0xE3000D01 & 0xFFFF) /* C73E8 80130CE8 AFAA0130 */ sw $t2, 0x130($sp) /* C73EC 80130CEC 3C0AE300 */ lui $t2, (0xE3001402 >> 16) /* C73F0 80130CF0 354A1402 */ ori $t2, $t2, (0xE3001402 & 0xFFFF) /* C73F4 80130CF4 AFAA0134 */ sw $t2, 0x134($sp) /* C73F8 80130CF8 3C0AE300 */ lui $t2, (0xE3001700 >> 16) /* C73FC 80130CFC 354A1700 */ ori $t2, $t2, (0xE3001700 & 0xFFFF) /* C7400 80130D00 AFAA0138 */ sw $t2, 0x138($sp) /* C7404 80130D04 3C0AE200 */ lui $t2, (0xE2001E01 >> 16) /* C7408 80130D08 354A1E01 */ ori $t2, $t2, (0xE2001E01 & 0xFFFF) /* C740C 80130D0C 0000202D */ daddu $a0, $zero, $zero /* C7410 80130D10 3C10800A */ lui $s0, %hi(gMainGfxPos) /* C7414 80130D14 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* C7418 80130D18 AFAA013C */ sw $t2, 0x13C($sp) /* C741C 80130D1C 8E030000 */ lw $v1, 0x0($s0) /* C7420 80130D20 96620000 */ lhu $v0, 0x0($s3) /* C7424 80130D24 0060482D */ daddu $t1, $v1, $zero /* C7428 80130D28 24630008 */ addiu $v1, $v1, 0x8 /* C742C 80130D2C AE030000 */ sw $v1, 0x0($s0) /* C7430 80130D30 AD280000 */ sw $t0, 0x0($t1) /* C7434 80130D34 24480001 */ addiu $t0, $v0, 0x1 /* C7438 80130D38 3042FFFF */ andi $v0, $v0, 0xFFFF /* C743C 80130D3C 00021180 */ sll $v0, $v0, 6 /* C7440 80130D40 A6680000 */ sh $t0, 0x0($s3) /* C7444 80130D44 8E880000 */ lw $t0, 0x0($s4) /* C7448 80130D48 00571021 */ addu $v0, $v0, $s7 /* C744C 80130D4C 01024021 */ addu $t0, $t0, $v0 /* C7450 80130D50 24620008 */ addiu $v0, $v1, 0x8 /* C7454 80130D54 AD280004 */ sw $t0, 0x4($t1) /* C7458 80130D58 AE020000 */ sw $v0, 0x0($s0) /* C745C 80130D5C 24620010 */ addiu $v0, $v1, 0x10 /* C7460 80130D60 8FAA0140 */ lw $t2, 0x140($sp) /* C7464 80130D64 3C088015 */ lui $t0, %hi(D_8014C6D0) /* C7468 80130D68 2508C6D0 */ addiu $t0, $t0, %lo(D_8014C6D0) /* C746C 80130D6C AC6A0000 */ sw $t2, 0x0($v1) /* C7470 80130D70 AC600004 */ sw $zero, 0x4($v1) /* C7474 80130D74 AE020000 */ sw $v0, 0x0($s0) /* C7478 80130D78 24620018 */ addiu $v0, $v1, 0x18 /* C747C 80130D7C AC6B0008 */ sw $t3, 0x8($v1) /* C7480 80130D80 AC60000C */ sw $zero, 0xC($v1) /* C7484 80130D84 AE020000 */ sw $v0, 0x0($s0) /* C7488 80130D88 24620020 */ addiu $v0, $v1, 0x20 /* C748C 80130D8C AC6D0010 */ sw $t5, 0x10($v1) /* C7490 80130D90 AC6C0014 */ sw $t4, 0x14($v1) /* C7494 80130D94 AE020000 */ sw $v0, 0x0($s0) /* C7498 80130D98 3C02DB02 */ lui $v0, (0xDB020000 >> 16) /* C749C 80130D9C AC620018 */ sw $v0, 0x18($v1) /* C74A0 80130DA0 24020018 */ addiu $v0, $zero, 0x18 /* C74A4 80130DA4 AC62001C */ sw $v0, 0x1C($v1) /* C74A8 80130DA8 24620028 */ addiu $v0, $v1, 0x28 /* C74AC 80130DAC AE020000 */ sw $v0, 0x0($s0) /* C74B0 80130DB0 24620030 */ addiu $v0, $v1, 0x30 /* C74B4 80130DB4 AC680024 */ sw $t0, 0x24($v1) /* C74B8 80130DB8 2508FFF8 */ addiu $t0, $t0, -0x8 /* C74BC 80130DBC AC6E0020 */ sw $t6, 0x20($v1) /* C74C0 80130DC0 AE020000 */ sw $v0, 0x0($s0) /* C74C4 80130DC4 24620038 */ addiu $v0, $v1, 0x38 /* C74C8 80130DC8 AC6F0028 */ sw $t7, 0x28($v1) /* C74CC 80130DCC AC68002C */ sw $t0, 0x2C($v1) /* C74D0 80130DD0 AE020000 */ sw $v0, 0x0($s0) /* C74D4 80130DD4 2402FFFF */ addiu $v0, $zero, -0x1 /* C74D8 80130DD8 AC750030 */ sw $s5, 0x30($v1) /* C74DC 80130DDC AC620034 */ sw $v0, 0x34($v1) /* C74E0 80130DE0 24620040 */ addiu $v0, $v1, 0x40 /* C74E4 80130DE4 AE020000 */ sw $v0, 0x0($s0) /* C74E8 80130DE8 24620048 */ addiu $v0, $v1, 0x48 /* C74EC 80130DEC AC760038 */ sw $s6, 0x38($v1) /* C74F0 80130DF0 AC60003C */ sw $zero, 0x3C($v1) /* C74F4 80130DF4 AE020000 */ sw $v0, 0x0($s0) /* C74F8 80130DF8 3C020008 */ lui $v0, (0x80000 >> 16) /* C74FC 80130DFC AC780040 */ sw $t8, 0x40($v1) /* C7500 80130E00 AC620044 */ sw $v0, 0x44($v1) /* C7504 80130E04 24620050 */ addiu $v0, $v1, 0x50 /* C7508 80130E08 AE020000 */ sw $v0, 0x0($s0) /* C750C 80130E0C 24022000 */ addiu $v0, $zero, 0x2000 /* C7510 80130E10 AC62004C */ sw $v0, 0x4C($v1) /* C7514 80130E14 240200C0 */ addiu $v0, $zero, 0xC0 /* C7518 80130E18 AC790048 */ sw $t9, 0x48($v1) /* C751C 80130E1C AC7E0050 */ sw $fp, 0x50($v1) /* C7520 80130E20 AC620054 */ sw $v0, 0x54($v1) /* C7524 80130E24 8FAA0130 */ lw $t2, 0x130($sp) /* C7528 80130E28 27A50118 */ addiu $a1, $sp, 0x118 /* C752C 80130E2C AC6A0058 */ sw $t2, 0x58($v1) /* C7530 80130E30 AC60005C */ sw $zero, 0x5C($v1) /* C7534 80130E34 8FAA0134 */ lw $t2, 0x134($sp) /* C7538 80130E38 24020C00 */ addiu $v0, $zero, 0xC00 /* C753C 80130E3C AC6A0060 */ sw $t2, 0x60($v1) /* C7540 80130E40 AC620064 */ sw $v0, 0x64($v1) /* C7544 80130E44 8FAA0138 */ lw $t2, 0x138($sp) /* C7548 80130E48 0080302D */ daddu $a2, $a0, $zero /* C754C 80130E4C AC6A0068 */ sw $t2, 0x68($v1) /* C7550 80130E50 AC60006C */ sw $zero, 0x6C($v1) /* C7554 80130E54 8FAA013C */ lw $t2, 0x13C($sp) /* C7558 80130E58 0220382D */ daddu $a3, $s1, $zero /* C755C 80130E5C AC6A0070 */ sw $t2, 0x70($v1) /* C7560 80130E60 AC600074 */ sw $zero, 0x74($v1) /* C7564 80130E64 8E48004C */ lw $t0, 0x4C($s2) /* C7568 80130E68 24620058 */ addiu $v0, $v1, 0x58 /* C756C 80130E6C AE020000 */ sw $v0, 0x0($s0) /* C7570 80130E70 AFA80118 */ sw $t0, 0x118($sp) /* C7574 80130E74 8E480050 */ lw $t0, 0x50($s2) /* C7578 80130E78 24620060 */ addiu $v0, $v1, 0x60 /* C757C 80130E7C AE020000 */ sw $v0, 0x0($s0) /* C7580 80130E80 AFA8011C */ sw $t0, 0x11C($sp) /* C7584 80130E84 96480056 */ lhu $t0, 0x56($s2) /* C7588 80130E88 24620068 */ addiu $v0, $v1, 0x68 /* C758C 80130E8C AE020000 */ sw $v0, 0x0($s0) /* C7590 80130E90 A7A80120 */ sh $t0, 0x120($sp) /* C7594 80130E94 9648005A */ lhu $t0, 0x5A($s2) /* C7598 80130E98 24620070 */ addiu $v0, $v1, 0x70 /* C759C 80130E9C AE020000 */ sw $v0, 0x0($s0) /* C75A0 80130EA0 A7A80122 */ sh $t0, 0x122($sp) /* C75A4 80130EA4 8E420054 */ lw $v0, 0x54($s2) /* C75A8 80130EA8 24630078 */ addiu $v1, $v1, 0x78 /* C75AC 80130EAC AE030000 */ sw $v1, 0x0($s0) /* C75B0 80130EB0 00021023 */ negu $v0, $v0 /* C75B4 80130EB4 00021FC2 */ srl $v1, $v0, 31 /* C75B8 80130EB8 00431021 */ addu $v0, $v0, $v1 /* C75BC 80130EBC 00021043 */ sra $v0, $v0, 1 /* C75C0 80130EC0 A7A20124 */ sh $v0, 0x124($sp) /* C75C4 80130EC4 8E420058 */ lw $v0, 0x58($s2) /* C75C8 80130EC8 240300FF */ addiu $v1, $zero, 0xFF /* C75CC 80130ECC A3A30128 */ sb $v1, 0x128($sp) /* C75D0 80130ED0 00021FC2 */ srl $v1, $v0, 31 /* C75D4 80130ED4 00431021 */ addu $v0, $v0, $v1 /* C75D8 80130ED8 00021043 */ sra $v0, $v0, 1 /* C75DC 80130EDC 0C04EBDC */ jal imgfx_appendGfx_component /* C75E0 80130EE0 A7A20126 */ sh $v0, 0x126($sp) /* C75E4 80130EE4 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* C75E8 80130EE8 8E020000 */ lw $v0, 0x0($s0) /* C75EC 80130EEC 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* C75F0 80130EF0 0040202D */ daddu $a0, $v0, $zero /* C75F4 80130EF4 24420008 */ addiu $v0, $v0, 0x8 /* C75F8 80130EF8 AE020000 */ sw $v0, 0x0($s0) /* C75FC 80130EFC AC830000 */ sw $v1, 0x0($a0) /* C7600 80130F00 24030040 */ addiu $v1, $zero, 0x40 /* C7604 80130F04 AC830004 */ sw $v1, 0x4($a0) /* C7608 80130F08 24430008 */ addiu $v1, $v0, 0x8 /* C760C 80130F0C AE030000 */ sw $v1, 0x0($s0) /* C7610 80130F10 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* C7614 80130F14 AC430000 */ sw $v1, 0x0($v0) /* C7618 80130F18 AC400004 */ sw $zero, 0x4($v0) /* C761C 80130F1C 8FBF016C */ lw $ra, 0x16C($sp) /* C7620 80130F20 8FBE0168 */ lw $fp, 0x168($sp) /* C7624 80130F24 8FB70164 */ lw $s7, 0x164($sp) /* C7628 80130F28 8FB60160 */ lw $s6, 0x160($sp) /* C762C 80130F2C 8FB5015C */ lw $s5, 0x15C($sp) /* C7630 80130F30 8FB40158 */ lw $s4, 0x158($sp) /* C7634 80130F34 8FB30154 */ lw $s3, 0x154($sp) /* C7638 80130F38 8FB20150 */ lw $s2, 0x150($sp) /* C763C 80130F3C 8FB1014C */ lw $s1, 0x14C($sp) /* C7640 80130F40 8FB00148 */ lw $s0, 0x148($sp) /* C7644 80130F44 D7B80180 */ ldc1 $f24, 0x180($sp) /* C7648 80130F48 D7B60178 */ ldc1 $f22, 0x178($sp) /* C764C 80130F4C D7B40170 */ ldc1 $f20, 0x170($sp) /* C7650 80130F50 03E00008 */ jr $ra /* C7654 80130F54 27BD0188 */ addiu $sp, $sp, 0x188 ### DECOMPILED C INSTRUCTIONS: void draw_coin_sparkles(ItemEntity* item) { f32 x, y, z; f32 angle; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; Matrix4f spD8; ImgFXTexture ifxImg; x = D_80155D8C; y = D_80155D8E; z = D_80155D90; angle = clamp_angle(180.0f - gCameras[gCurrentCamID].currentYaw); guTranslateF(sp18, x, y, z); guTranslateF(sp58, item->position.x, item->position.y + 12.0f, item->position.z); guRotateF(sp98, angle, 0.0f, 1.0f, 0.0f); guMtxCatF(sp18, sp98, sp98); guMtxCatF(sp98, sp58, spD8); guMtxF2L(spD8, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH); gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); gSPSetLights1(gMainGfxPos++, D_8014C6C8); gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP); gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP); gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP); gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT); gDPSetCombineKey(gMainGfxPos++, G_CK_NONE); gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); ifxImg.raster = item->sparkleRaster; ifxImg.palette = item->sparklePalette; ifxImg.width = item->sparkleWidth; ifxImg.height = item->sparkleHeight; ifxImg.xOffset = -item->sparkleWidth / 2; ifxImg.yOffset = item->sparkleHeight / 2; ifxImg.alpha = 255; imgfx_appendGfx_component(0, &ifxImg, 0, spD8); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel confetti_main /* 38AF6C E008817C 27BDFF78 */ addiu $sp, $sp, -0x88 /* 38AF70 E0088180 F7B40058 */ sdc1 $f20, 0x58($sp) /* 38AF74 E0088184 4485A000 */ mtc1 $a1, $f20 /* 38AF78 E0088188 AFB50044 */ sw $s5, 0x44($sp) /* 38AF7C E008818C 0080A82D */ daddu $s5, $a0, $zero /* 38AF80 E0088190 F7B60060 */ sdc1 $f22, 0x60($sp) /* 38AF84 E0088194 4486B000 */ mtc1 $a2, $f22 /* 38AF88 E0088198 F7B80068 */ sdc1 $f24, 0x68($sp) /* 38AF8C E008819C 4487C000 */ mtc1 $a3, $f24 /* 38AF90 E00881A0 2EA20007 */ sltiu $v0, $s5, 0x7 /* 38AF94 E00881A4 AFBF0054 */ sw $ra, 0x54($sp) /* 38AF98 E00881A8 AFBE0050 */ sw $fp, 0x50($sp) /* 38AF9C E00881AC AFB7004C */ sw $s7, 0x4C($sp) /* 38AFA0 E00881B0 AFB60048 */ sw $s6, 0x48($sp) /* 38AFA4 E00881B4 AFB40040 */ sw $s4, 0x40($sp) /* 38AFA8 E00881B8 AFB3003C */ sw $s3, 0x3C($sp) /* 38AFAC E00881BC AFB20038 */ sw $s2, 0x38($sp) /* 38AFB0 E00881C0 AFB10034 */ sw $s1, 0x34($sp) /* 38AFB4 E00881C4 AFB00030 */ sw $s0, 0x30($sp) /* 38AFB8 E00881C8 F7BE0080 */ sdc1 $f30, 0x80($sp) /* 38AFBC E00881CC F7BC0078 */ sdc1 $f28, 0x78($sp) /* 38AFC0 E00881D0 F7BA0070 */ sdc1 $f26, 0x70($sp) /* 38AFC4 E00881D4 1040000D */ beqz $v0, .LE008820C /* 38AFC8 E00881D8 27A40010 */ addiu $a0, $sp, 0x10 /* 38AFCC E00881DC 00151080 */ sll $v0, $s5, 2 /* 38AFD0 E00881E0 3C01E009 */ lui $at, (0xE0090000 >> 16) /* 38AFD4 E00881E4 00220821 */ addu $at, $at, $v0 /* 38AFD8 E00881E8 8C228D30 */ lw $v0, -0x72D0($at) /* 38AFDC E00881EC 00400008 */ jr $v0 /* 38AFE0 E00881F0 00000000 */ nop /* 38AFE4 E00881F4 08022084 */ j .LE0088210 /* 38AFE8 E00881F8 2413000C */ addiu $s3, $zero, 0xC /* 38AFEC E00881FC 08022084 */ j .LE0088210 /* 38AFF0 E0088200 24130012 */ addiu $s3, $zero, 0x12 /* 38AFF4 E0088204 08022084 */ j .LE0088210 /* 38AFF8 E0088208 24130018 */ addiu $s3, $zero, 0x18 .LE008820C: /* 38AFFC E008820C 24130030 */ addiu $s3, $zero, 0x30 .LE0088210: /* 38B000 E0088210 2EA20007 */ sltiu $v0, $s5, 0x7 /* 38B004 E0088214 1040000E */ beqz $v0, .LE0088250 /* 38B008 E0088218 00151080 */ sll $v0, $s5, 2 /* 38B00C E008821C 3C01E009 */ lui $at, (0xE0090000 >> 16) /* 38B010 E0088220 00220821 */ addu $at, $at, $v0 /* 38B014 E0088224 8C228D50 */ lw $v0, -0x72B0($at) /* 38B018 E0088228 00400008 */ jr $v0 /* 38B01C E008822C 00000000 */ nop /* 38B020 E0088230 3C014040 */ lui $at, (0x40400000 >> 16) /* 38B024 E0088234 44818000 */ mtc1 $at, $f16 /* 38B028 E0088238 08022098 */ j .LE0088260 /* 38B02C E008823C E7B00028 */ swc1 $f16, 0x28($sp) /* 38B030 E0088240 3C014080 */ lui $at, (0x40800000 >> 16) /* 38B034 E0088244 44818000 */ mtc1 $at, $f16 /* 38B038 E0088248 08022098 */ j .LE0088260 /* 38B03C E008824C E7B00028 */ swc1 $f16, 0x28($sp) .LE0088250: /* 38B040 E0088250 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 38B044 E0088254 44818000 */ mtc1 $at, $f16 /* 38B048 E0088258 00000000 */ nop /* 38B04C E008825C E7B00028 */ swc1 $f16, 0x28($sp) .LE0088260: /* 38B050 E0088260 3C02E009 */ lui $v0, %hi(confetti_init) /* 38B054 E0088264 244285A0 */ addiu $v0, $v0, %lo(confetti_init) /* 38B058 E0088268 AC820008 */ sw $v0, 0x8($a0) /* 38B05C E008826C 3C02E009 */ lui $v0, %hi(confetti_update) /* 38B060 E0088270 244285A8 */ addiu $v0, $v0, %lo(confetti_update) /* 38B064 E0088274 AC82000C */ sw $v0, 0xC($a0) /* 38B068 E0088278 3C02E009 */ lui $v0, %hi(confetti_render) /* 38B06C E008827C 244287A8 */ addiu $v0, $v0, %lo(confetti_render) /* 38B070 E0088280 AC820010 */ sw $v0, 0x10($a0) /* 38B074 E0088284 24020044 */ addiu $v0, $zero, 0x44 /* 38B078 E0088288 AC800000 */ sw $zero, 0x0($a0) /* 38B07C E008828C AC800014 */ sw $zero, 0x14($a0) /* 38B080 E0088290 0C080124 */ jal shim_create_effect_instance /* 38B084 E0088294 AC820004 */ sw $v0, 0x4($a0) /* 38B088 E0088298 26630001 */ addiu $v1, $s3, 0x1 /* 38B08C E008829C 00032040 */ sll $a0, $v1, 1 /* 38B090 E00882A0 00832021 */ addu $a0, $a0, $v1 /* 38B094 E00882A4 00042080 */ sll $a0, $a0, 2 /* 38B098 E00882A8 00832021 */ addu $a0, $a0, $v1 /* 38B09C E00882AC 00042080 */ sll $a0, $a0, 2 /* 38B0A0 E00882B0 0040B02D */ daddu $s6, $v0, $zero /* 38B0A4 E00882B4 0C08012C */ jal shim_general_heap_malloc /* 38B0A8 E00882B8 AEC30008 */ sw $v1, 0x8($s6) /* 38B0AC E00882BC 0040902D */ daddu $s2, $v0, $zero /* 38B0B0 E00882C0 16400003 */ bnez $s2, .LE00882D0 /* 38B0B4 E00882C4 AED2000C */ sw $s2, 0xC($s6) .LE00882C8: /* 38B0B8 E00882C8 080220B2 */ j .LE00882C8 /* 38B0BC E00882CC 00000000 */ nop .LE00882D0: /* 38B0C0 E00882D0 E6540004 */ swc1 $f20, 0x4($s2) /* 38B0C4 E00882D4 E6560008 */ swc1 $f22, 0x8($s2) /* 38B0C8 E00882D8 E658000C */ swc1 $f24, 0xC($s2) /* 38B0CC E00882DC AE400024 */ sw $zero, 0x24($s2) /* 38B0D0 E00882E0 8FA2009C */ lw $v0, 0x9C($sp) /* 38B0D4 E00882E4 24040168 */ addiu $a0, $zero, 0x168 /* 38B0D8 E00882E8 AE550000 */ sw $s5, 0x0($s2) /* 38B0DC E00882EC AE53002C */ sw $s3, 0x2C($s2) /* 38B0E0 E00882F0 AE420020 */ sw $v0, 0x20($s2) /* 38B0E4 E00882F4 240200FF */ addiu $v0, $zero, 0xFF /* 38B0E8 E00882F8 AE420028 */ sw $v0, 0x28($s2) /* 38B0EC E00882FC 0C080138 */ jal shim_rand_int /* 38B0F0 E0088300 26520034 */ addiu $s2, $s2, 0x34 /* 38B0F4 E0088304 0000882D */ daddu $s1, $zero, $zero /* 38B0F8 E0088308 12600092 */ beqz $s3, .LE0088554 /* 38B0FC E008830C 0040F02D */ daddu $fp, $v0, $zero /* 38B100 E0088310 3C03E009 */ lui $v1, %hi(D_E0088D70) /* 38B104 E0088314 24638D70 */ addiu $v1, $v1, %lo(D_E0088D70) /* 38B108 E0088318 00151080 */ sll $v0, $s5, 2 /* 38B10C E008831C 0043B821 */ addu $s7, $v0, $v1 /* 38B110 E0088320 26500030 */ addiu $s0, $s2, 0x30 /* 38B114 E0088324 0220A02D */ daddu $s4, $s1, $zero .LE0088328: /* 38B118 E0088328 0C080000 */ jal effect_rand_int /* 38B11C E008832C 24040064 */ addiu $a0, $zero, 0x64 /* 38B120 E0088330 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 38B124 E0088334 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 38B128 E0088338 44810000 */ mtc1 $at, $f0 /* 38B12C E008833C 44821000 */ mtc1 $v0, $f2 /* 38B130 E0088340 00000000 */ nop /* 38B134 E0088344 468010A0 */ cvt.s.w $f2, $f2 /* 38B138 E0088348 46001082 */ mul.s $f2, $f2, $f0 /* 38B13C E008834C 00000000 */ nop /* 38B140 E0088350 C7B00028 */ lwc1 $f16, 0x28($sp) /* 38B144 E0088354 2EA20007 */ sltiu $v0, $s5, 0x7 /* 38B148 E0088358 46028782 */ mul.s $f30, $f16, $f2 /* 38B14C E008835C 00000000 */ nop /* 38B150 E0088360 10400006 */ beqz $v0, .LE008837C /* 38B154 E0088364 46008021 */ cvt.d.s $f0, $f16 /* 38B158 E0088368 8EE20000 */ lw $v0, 0x0($s7) /* 38B15C E008836C 080220DF */ j .LE008837C /* 38B160 E0088370 00000000 */ nop /* 38B164 E0088374 C7B00028 */ lwc1 $f16, 0x28($sp) /* 38B168 E0088378 46008021 */ cvt.d.s $f0, $f16 .LE008837C: /* 38B16C E008837C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 38B170 E0088380 44818800 */ mtc1 $at, $f17 /* 38B174 E0088384 44808000 */ mtc1 $zero, $f16 /* 38B178 E0088388 00000000 */ nop /* 38B17C E008838C 46300002 */ mul.d $f0, $f0, $f16 /* 38B180 E0088390 00000000 */ nop /* 38B184 E0088394 46200000 */ add.d $f0, $f0, $f0 /* 38B188 E0088398 0220102D */ daddu $v0, $s1, $zero /* 38B18C E008839C 06210002 */ bgez $s1, .LE00883A8 /* 38B190 E00883A0 46200720 */ cvt.s.d $f28, $f0 /* 38B194 E00883A4 26220003 */ addiu $v0, $s1, 0x3 .LE00883A8: /* 38B198 E00883A8 00021083 */ sra $v0, $v0, 2 /* 38B19C E00883AC 4491A000 */ mtc1 $s1, $f20 /* 38B1A0 E00883B0 00000000 */ nop /* 38B1A4 E00883B4 4680A520 */ cvt.s.w $f20, $f20 /* 38B1A8 E00883B8 00021080 */ sll $v0, $v0, 2 /* 38B1AC E00883BC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 38B1B0 E00883C0 44810000 */ mtc1 $at, $f0 /* 38B1B4 E00883C4 02221023 */ subu $v0, $s1, $v0 /* 38B1B8 E00883C8 4600A502 */ mul.s $f20, $f20, $f0 /* 38B1BC E00883CC 00000000 */ nop /* 38B1C0 E00883D0 3C08E009 */ lui $t0, %hi(D_E0088D08) /* 38B1C4 E00883D4 25088D08 */ addiu $t0, $t0, %lo(D_E0088D08) /* 38B1C8 E00883D8 00481021 */ addu $v0, $v0, $t0 /* 38B1CC E00883DC 90420000 */ lbu $v0, 0x0($v0) /* 38B1D0 E00883E0 44930000 */ mtc1 $s3, $f0 /* 38B1D4 E00883E4 00000000 */ nop /* 38B1D8 E00883E8 46800020 */ cvt.s.w $f0, $f0 /* 38B1DC E00883EC 4600A503 */ div.s $f20, $f20, $f0 /* 38B1E0 E00883F0 449E0000 */ mtc1 $fp, $f0 /* 38B1E4 E00883F4 00000000 */ nop /* 38B1E8 E00883F8 46800020 */ cvt.s.w $f0, $f0 /* 38B1EC E00883FC 4600A500 */ add.s $f20, $f20, $f0 /* 38B1F0 E0088400 AE550000 */ sw $s5, 0x0($s2) /* 38B1F4 E0088404 4482B000 */ mtc1 $v0, $f22 /* 38B1F8 E0088408 00000000 */ nop /* 38B1FC E008840C 4680B5A0 */ cvt.s.w $f22, $f22 /* 38B200 E0088410 0C080140 */ jal shim_sin_deg /* 38B204 E0088414 4600A306 */ mov.s $f12, $f20 /* 38B208 E0088418 4600A306 */ mov.s $f12, $f20 /* 38B20C E008841C 0C080144 */ jal shim_cos_deg /* 38B210 E0088420 46000606 */ mov.s $f24, $f0 /* 38B214 E0088424 4600B306 */ mov.s $f12, $f22 /* 38B218 E0088428 0C080140 */ jal shim_sin_deg /* 38B21C E008842C 46000686 */ mov.s $f26, $f0 /* 38B220 E0088430 4600B306 */ mov.s $f12, $f22 /* 38B224 E0088434 0C080144 */ jal shim_cos_deg /* 38B228 E0088438 46000506 */ mov.s $f20, $f0 /* 38B22C E008843C 24020003 */ addiu $v0, $zero, 0x3 /* 38B230 E0088440 16A20005 */ bne $s5, $v0, .LE0088458 /* 38B234 E0088444 46000386 */ mov.s $f14, $f0 /* 38B238 E0088448 0C022000 */ jal func_E0088000 /* 38B23C E008844C 0240202D */ daddu $a0, $s2, $zero /* 38B240 E0088450 0802214F */ j .LE008853C /* 38B244 E0088454 AE140000 */ sw $s4, 0x0($s0) .LE0088458: /* 38B248 E0088458 4618F182 */ mul.s $f6, $f30, $f24 /* 38B24C E008845C 00000000 */ nop /* 38B250 E0088460 461AF202 */ mul.s $f8, $f30, $f26 /* 38B254 E0088464 00000000 */ nop /* 38B258 E0088468 4618E082 */ mul.s $f2, $f28, $f24 /* 38B25C E008846C 00000000 */ nop /* 38B260 E0088470 4614F302 */ mul.s $f12, $f30, $f20 /* 38B264 E0088474 00000000 */ nop /* 38B268 E0088478 461AE002 */ mul.s $f0, $f28, $f26 /* 38B26C E008847C 00000000 */ nop /* 38B270 E0088480 4614E102 */ mul.s $f4, $f28, $f20 /* 38B274 E0088484 00000000 */ nop /* 38B278 E0088488 460E3182 */ mul.s $f6, $f6, $f14 /* 38B27C E008848C 00000000 */ nop /* 38B280 E0088490 460E4202 */ mul.s $f8, $f8, $f14 /* 38B284 E0088494 00000000 */ nop /* 38B288 E0088498 460E1082 */ mul.s $f2, $f2, $f14 /* 38B28C E008849C 00000000 */ nop /* 38B290 E00884A0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 38B294 E00884A4 44815000 */ mtc1 $at, $f10 /* 38B298 E00884A8 460E0002 */ mul.s $f0, $f0, $f14 /* 38B29C E00884AC 00000000 */ nop /* 38B2A0 E00884B0 2AA20004 */ slti $v0, $s5, 0x4 /* 38B2A4 E00884B4 E60CFFDC */ swc1 $f12, -0x24($s0) /* 38B2A8 E00884B8 E604FFE8 */ swc1 $f4, -0x18($s0) /* 38B2AC E00884BC E606FFD4 */ swc1 $f6, -0x2C($s0) /* 38B2B0 E00884C0 460A0000 */ add.s $f0, $f0, $f10 /* 38B2B4 E00884C4 E608FFD8 */ swc1 $f8, -0x28($s0) /* 38B2B8 E00884C8 E602FFE0 */ swc1 $f2, -0x20($s0) /* 38B2BC E00884CC 14400018 */ bnez $v0, .LE0088530 /* 38B2C0 E00884D0 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 38B2C4 E00884D4 3C025555 */ lui $v0, (0x55555556 >> 16) /* 38B2C8 E00884D8 34425556 */ ori $v0, $v0, (0x55555556 & 0xFFFF) /* 38B2CC E00884DC 26240001 */ addiu $a0, $s1, 0x1 /* 38B2D0 E00884E0 00820018 */ mult $a0, $v0 /* 38B2D4 E00884E4 00041FC3 */ sra $v1, $a0, 31 /* 38B2D8 E00884E8 3C01E009 */ lui $at, (0xE0090000 >> 16) /* 38B2DC E00884EC D4208D90 */ ldc1 $f0, -0x7270($at) /* 38B2E0 E00884F0 00004010 */ mfhi $t0 /* 38B2E4 E00884F4 01031823 */ subu $v1, $t0, $v1 /* 38B2E8 E00884F8 00031040 */ sll $v0, $v1, 1 /* 38B2EC E00884FC 00431021 */ addu $v0, $v0, $v1 /* 38B2F0 E0088500 00822023 */ subu $a0, $a0, $v0 /* 38B2F4 E0088504 44841000 */ mtc1 $a0, $f2 /* 38B2F8 E0088508 00000000 */ nop /* 38B2FC E008850C 468010A1 */ cvt.d.w $f2, $f2 /* 38B300 E0088510 46201082 */ mul.d $f2, $f2, $f0 /* 38B304 E0088514 00000000 */ nop /* 38B308 E0088518 3C01E009 */ lui $at, (0xE0090000 >> 16) /* 38B30C E008851C D4208D98 */ ldc1 $f0, -0x7268($at) /* 38B310 E0088520 46220001 */ sub.d $f0, $f0, $f2 /* 38B314 E0088524 46200020 */ cvt.s.d $f0, $f0 /* 38B318 E0088528 0802214D */ j .LE0088534 /* 38B31C E008852C E600FFEC */ swc1 $f0, -0x14($s0) .LE0088530: /* 38B320 E0088530 AE00FFEC */ sw $zero, -0x14($s0) .LE0088534: /* 38B324 E0088534 32220003 */ andi $v0, $s1, 0x3 /* 38B328 E0088538 AE020000 */ sw $v0, 0x0($s0) .LE008853C: /* 38B32C E008853C 26940003 */ addiu $s4, $s4, 0x3 /* 38B330 E0088540 26310001 */ addiu $s1, $s1, 0x1 /* 38B334 E0088544 26100034 */ addiu $s0, $s0, 0x34 /* 38B338 E0088548 0233102A */ slt $v0, $s1, $s3 /* 38B33C E008854C 1440FF76 */ bnez $v0, .LE0088328 /* 38B340 E0088550 26520034 */ addiu $s2, $s2, 0x34 .LE0088554: /* 38B344 E0088554 02C0102D */ daddu $v0, $s6, $zero /* 38B348 E0088558 8FBF0054 */ lw $ra, 0x54($sp) /* 38B34C E008855C 8FBE0050 */ lw $fp, 0x50($sp) /* 38B350 E0088560 8FB7004C */ lw $s7, 0x4C($sp) /* 38B354 E0088564 8FB60048 */ lw $s6, 0x48($sp) /* 38B358 E0088568 8FB50044 */ lw $s5, 0x44($sp) /* 38B35C E008856C 8FB40040 */ lw $s4, 0x40($sp) /* 38B360 E0088570 8FB3003C */ lw $s3, 0x3C($sp) /* 38B364 E0088574 8FB20038 */ lw $s2, 0x38($sp) /* 38B368 E0088578 8FB10034 */ lw $s1, 0x34($sp) /* 38B36C E008857C 8FB00030 */ lw $s0, 0x30($sp) /* 38B370 E0088580 D7BE0080 */ ldc1 $f30, 0x80($sp) /* 38B374 E0088584 D7BC0078 */ ldc1 $f28, 0x78($sp) /* 38B378 E0088588 D7BA0070 */ ldc1 $f26, 0x70($sp) /* 38B37C E008858C D7B80068 */ ldc1 $f24, 0x68($sp) /* 38B380 E0088590 D7B60060 */ ldc1 $f22, 0x60($sp) /* 38B384 E0088594 D7B40058 */ ldc1 $f20, 0x58($sp) /* 38B388 E0088598 03E00008 */ jr $ra /* 38B38C E008859C 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: EffectInstance* confetti_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; f32 sp28; ConfettiFXData* data; EffectInstance* effect; s32 numParts; f32 theta; f32 sinTheta; f32 cosTheta; f32 theta2; f32 sinTheta2; f32 cosTheta2; f32 temp_f28; f32 temp_f30; s32 temp_fp; s32 np; s32 var_v0; s32 i; switch (arg0) { case 0: case 4: np = 12; break; case 1: case 5: np = 18; break; case 2: case 6: np = 24; break; default: np = 48; break; } switch (arg0) { case 0: case 4: sp28 = 3.0f; break; case 1: case 5: sp28 = 4.0f; break; case 2: case 3: case 6: default: sp28 = 5.0f; break; } numParts = np + 1; bpPtr->init = confetti_init; bpPtr->update = confetti_update; bpPtr->renderWorld = confetti_render; bpPtr->unk_00 = 0; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_CONFETTI; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; data = effect->data.confetti = (ConfettiFXData*)shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.confetti != NULL); data->unk_04 = arg1; data->unk_08 = arg2; data->unk_0C = arg3; data->unk_24 = 0; data->unk_20 = arg5; data->unk_00 = arg0; data->unk_2C = np; data->unk_28 = 255; data++; temp_fp = shim_rand_int(360); for (i = 0; i < np; i++, data++) { temp_f30 = sp28 * (effect_rand_int(100) * 0.01f); switch (arg0) { case 0: case 4: temp_f28 = sp28 * 0.5 * 2.0; break; case 1: case 5: temp_f28 = sp28 * 0.5 * 2.0; break; case 2: case 6: temp_f28 = sp28 * 0.5 * 2.0; break; } temp_f28 = sp28 * 0.5 * 2.0; theta2 = D_E0088D08[i % 4]; theta = ((i * 360.0f) / np) + temp_fp; data->unk_00 = arg0; sinTheta = shim_sin_deg(theta); cosTheta = shim_cos_deg(theta); sinTheta2 = shim_sin_deg(theta2); cosTheta2 = shim_cos_deg(theta2); if (arg0 == 3) { func_E0088000(data); data->unk_30 = i * 3; } else { data->unk_04 = temp_f30 * sinTheta * cosTheta2; data->unk_08 = temp_f30 * cosTheta * cosTheta2; data->unk_0C = temp_f30 * sinTheta2; data->unk_10 = temp_f28 * sinTheta * cosTheta2; data->unk_14 = (temp_f28 * cosTheta * cosTheta2) + 1.0f; data->unk_18 = temp_f28 * sinTheta2; if (arg0 >= 4) { data->unk_1C = -0.02 - ((i + 1) % 3) * 0.02; } else { data->unk_1C = 0.0f; } data->unk_30 = i & 3; } } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel __osDevMgrMain /* 3C490 80061090 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 3C494 80061094 AFB20030 */ sw $s2, 0x30($sp) /* 3C498 80061098 00809021 */ addu $s2, $a0, $zero /* 3C49C 8006109C AFB40038 */ sw $s4, 0x38($sp) /* 3C4A0 800610A0 24140002 */ addiu $s4, $zero, 0x2 /* 3C4A4 800610A4 AFB5003C */ sw $s5, 0x3C($sp) /* 3C4A8 800610A8 24150001 */ addiu $s5, $zero, 0x1 /* 3C4AC 800610AC AFBF0040 */ sw $ra, 0x40($sp) /* 3C4B0 800610B0 AFB30034 */ sw $s3, 0x34($sp) /* 3C4B4 800610B4 AFB1002C */ sw $s1, 0x2C($sp) /* 3C4B8 800610B8 AFB00028 */ sw $s0, 0x28($sp) /* 3C4BC 800610BC AFA00018 */ sw $zero, 0x18($sp) .L800610C0: /* 3C4C0 800610C0 8E440008 */ lw $a0, 0x8($s2) /* 3C4C4 800610C4 27A50018 */ addiu $a1, $sp, 0x18 /* 3C4C8 800610C8 0C0195BC */ jal osRecvMesg /* 3C4CC 800610CC 24060001 */ addiu $a2, $zero, 0x1 /* 3C4D0 800610D0 8FA20018 */ lw $v0, 0x18($sp) /* 3C4D4 800610D4 8C500014 */ lw $s0, 0x14($v0) /* 3C4D8 800610D8 1200007C */ beqz $s0, .L800612CC /* 3C4DC 800610DC 00000000 */ nop /* 3C4E0 800610E0 92020004 */ lbu $v0, 0x4($s0) /* 3C4E4 800610E4 14540078 */ bne $v0, $s4, .L800612C8 /* 3C4E8 800610E8 00000000 */ nop /* 3C4EC 800610EC 8E020014 */ lw $v0, 0x14($s0) /* 3C4F0 800610F0 2C420002 */ sltiu $v0, $v0, 0x2 /* 3C4F4 800610F4 10400074 */ beqz $v0, .L800612C8 /* 3C4F8 800610F8 2402FFFF */ addiu $v0, $zero, -0x1 /* 3C4FC 800610FC 9603001A */ lhu $v1, 0x1A($s0) /* 3C500 80061100 AE02001C */ sw $v0, 0x1C($s0) /* 3C504 80061104 000310C0 */ sll $v0, $v1, 3 /* 3C508 80061108 00431021 */ addu $v0, $v0, $v1 /* 3C50C 8006110C 00021080 */ sll $v0, $v0, 2 /* 3C510 80061110 02021021 */ addu $v0, $s0, $v0 /* 3C514 80061114 96030018 */ lhu $v1, 0x18($s0) /* 3C518 80061118 2451002C */ addiu $s1, $v0, 0x2C /* 3C51C 8006111C 24020003 */ addiu $v0, $zero, 0x3 /* 3C520 80061120 10620005 */ beq $v1, $v0, .L80061138 /* 3C524 80061124 00000000 */ nop /* 3C528 80061128 8E220004 */ lw $v0, 0x4($s1) /* 3C52C 8006112C 8E23000C */ lw $v1, 0xC($s1) /* 3C530 80061130 00431023 */ subu $v0, $v0, $v1 /* 3C534 80061134 AE220004 */ sw $v0, 0x4($s1) .L80061138: /* 3C538 80061138 96020018 */ lhu $v0, 0x18($s0) /* 3C53C 8006113C 14540005 */ bne $v0, $s4, .L80061154 /* 3C540 80061140 00009821 */ addu $s3, $zero, $zero /* 3C544 80061144 8FA20018 */ lw $v0, 0x18($sp) /* 3C548 80061148 8C420014 */ lw $v0, 0x14($v0) /* 3C54C 8006114C 8C420014 */ lw $v0, 0x14($v0) /* 3C550 80061150 2C530001 */ sltiu $s3, $v0, 0x1 .L80061154: /* 3C554 80061154 8E440010 */ lw $a0, 0x10($s2) /* 3C558 80061158 27A5001C */ addiu $a1, $sp, 0x1C /* 3C55C 8006115C 0C0195BC */ jal osRecvMesg /* 3C560 80061160 24060001 */ addiu $a2, $zero, 0x1 /* 3C564 80061164 3C040010 */ lui $a0, (0x100401 >> 16) /* 3C568 80061168 0C01AD0C */ jal __osResetGlobalIntMask /* 3C56C 8006116C 34840401 */ ori $a0, $a0, (0x100401 & 0xFFFF) /* 3C570 80061170 3C050500 */ lui $a1, (0x5000510 >> 16) /* 3C574 80061174 8FA20018 */ lw $v0, 0x18($sp) /* 3C578 80061178 34A50510 */ ori $a1, $a1, (0x5000510 & 0xFFFF) /* 3C57C 8006117C 8E030024 */ lw $v1, 0x24($s0) /* 3C580 80061180 8C440014 */ lw $a0, 0x14($v0) /* 3C584 80061184 3C068000 */ lui $a2, (0x80000000 >> 16) /* 3C588 80061188 0C01ADB8 */ jal __osEPiRawWriteIo /* 3C58C 8006118C 00663025 */ or $a2, $v1, $a2 .L80061190: /* 3C590 80061190 8E44000C */ lw $a0, 0xC($s2) /* 3C594 80061194 27A50020 */ addiu $a1, $sp, 0x20 /* 3C598 80061198 0C0195BC */ jal osRecvMesg /* 3C59C 8006119C 24060001 */ addiu $a2, $zero, 0x1 /* 3C5A0 800611A0 8FA20018 */ lw $v0, 0x18($sp) /* 3C5A4 800611A4 8C500014 */ lw $s0, 0x14($v0) /* 3C5A8 800611A8 9603001A */ lhu $v1, 0x1A($s0) /* 3C5AC 800611AC 000310C0 */ sll $v0, $v1, 3 /* 3C5B0 800611B0 00431021 */ addu $v0, $v0, $v1 /* 3C5B4 800611B4 00021080 */ sll $v0, $v0, 2 /* 3C5B8 800611B8 02021021 */ addu $v0, $s0, $v0 /* 3C5BC 800611BC 2451002C */ addiu $s1, $v0, 0x2C /* 3C5C0 800611C0 8E230000 */ lw $v1, 0x0($s1) /* 3C5C4 800611C4 2402001D */ addiu $v0, $zero, 0x1D /* 3C5C8 800611C8 14620027 */ bne $v1, $v0, .L80061268 /* 3C5CC 800611CC 02002021 */ addu $a0, $s0, $zero /* 3C5D0 800611D0 3C050500 */ lui $a1, (0x5000510 >> 16) /* 3C5D4 800611D4 8E020024 */ lw $v0, 0x24($s0) /* 3C5D8 800611D8 34A50510 */ ori $a1, $a1, (0x5000510 & 0xFFFF) /* 3C5DC 800611DC 3C061000 */ lui $a2, (0x10000000 >> 16) /* 3C5E0 800611E0 0C01ADB8 */ jal __osEPiRawWriteIo /* 3C5E4 800611E4 00463025 */ or $a2, $v0, $a2 /* 3C5E8 800611E8 8FA20018 */ lw $v0, 0x18($sp) /* 3C5EC 800611EC 8E060024 */ lw $a2, 0x24($s0) /* 3C5F0 800611F0 8C440014 */ lw $a0, 0x14($v0) /* 3C5F4 800611F4 3C050500 */ lui $a1, (0x5000510 >> 16) /* 3C5F8 800611F8 0C01ADB8 */ jal __osEPiRawWriteIo /* 3C5FC 800611FC 34A50510 */ ori $a1, $a1, (0x5000510 & 0xFFFF) /* 3C600 80061200 8FA20018 */ lw $v0, 0x18($sp) /* 3C604 80061204 3C050500 */ lui $a1, (0x5000508 >> 16) /* 3C608 80061208 8C440014 */ lw $a0, 0x14($v0) /* 3C60C 8006120C 34A50508 */ ori $a1, $a1, (0x5000508 & 0xFFFF) /* 3C610 80061210 0C01AD5C */ jal __osEPiRawReadIo /* 3C614 80061214 27A60024 */ addiu $a2, $sp, 0x24 /* 3C618 80061218 8FA20024 */ lw $v0, 0x24($sp) /* 3C61C 8006121C 3C030200 */ lui $v1, (0x2000000 >> 16) /* 3C620 80061220 00431024 */ and $v0, $v0, $v1 /* 3C624 80061224 10400008 */ beqz $v0, .L80061248 /* 3C628 80061228 3C050500 */ lui $a1, (0x5000510 >> 16) /* 3C62C 8006122C 8FA20018 */ lw $v0, 0x18($sp) /* 3C630 80061230 34A50510 */ ori $a1, $a1, (0x5000510 & 0xFFFF) /* 3C634 80061234 8E030024 */ lw $v1, 0x24($s0) /* 3C638 80061238 8C440014 */ lw $a0, 0x14($v0) /* 3C63C 8006123C 3C060100 */ lui $a2, (0x1000000 >> 16) /* 3C640 80061240 0C01ADB8 */ jal __osEPiRawWriteIo /* 3C644 80061244 00663025 */ or $a2, $v1, $a2 .L80061248: /* 3C648 80061248 3C03A460 */ lui $v1, (0xA4600010 >> 16) /* 3C64C 8006124C 34630010 */ ori $v1, $v1, (0xA4600010 & 0xFFFF) /* 3C650 80061250 3C040010 */ lui $a0, (0x100C01 >> 16) /* 3C654 80061254 24020004 */ addiu $v0, $zero, 0x4 /* 3C658 80061258 AE220000 */ sw $v0, 0x0($s1) /* 3C65C 8006125C AC740000 */ sw $s4, 0x0($v1) /* 3C660 80061260 0C01ACFC */ jal __osSetGlobalIntMask /* 3C664 80061264 34840C01 */ ori $a0, $a0, (0x100C01 & 0xFFFF) .L80061268: /* 3C668 80061268 8FA50018 */ lw $a1, 0x18($sp) /* 3C66C 8006126C 8CA40004 */ lw $a0, 0x4($a1) /* 3C670 80061270 0C019608 */ jal osSendMesg /* 3C674 80061274 00003021 */ addu $a2, $zero, $zero /* 3C678 80061278 16750006 */ bne $s3, $s5, .L80061294 /* 3C67C 8006127C 00000000 */ nop /* 3C680 80061280 8FA20018 */ lw $v0, 0x18($sp) /* 3C684 80061284 8C420014 */ lw $v0, 0x14($v0) /* 3C688 80061288 8C42002C */ lw $v0, 0x2C($v0) /* 3C68C 8006128C 1040FFC0 */ beqz $v0, .L80061190 /* 3C690 80061290 00009821 */ addu $s3, $zero, $zero .L80061294: /* 3C694 80061294 8E440010 */ lw $a0, 0x10($s2) /* 3C698 80061298 00002821 */ addu $a1, $zero, $zero /* 3C69C 8006129C 0C019608 */ jal osSendMesg /* 3C6A0 800612A0 00003021 */ addu $a2, $zero, $zero /* 3C6A4 800612A4 8FA20018 */ lw $v0, 0x18($sp) /* 3C6A8 800612A8 8C420014 */ lw $v0, 0x14($v0) /* 3C6AC 800612AC 9442001A */ lhu $v0, 0x1A($v0) /* 3C6B0 800612B0 1455FF83 */ bne $v0, $s5, .L800610C0 /* 3C6B4 800612B4 00000000 */ nop /* 3C6B8 800612B8 0C019890 */ jal osYieldThread /* 3C6BC 800612BC 00000000 */ nop /* 3C6C0 800612C0 08018430 */ j .L800610C0 /* 3C6C4 800612C4 00000000 */ nop .L800612C8: /* 3C6C8 800612C8 8FA20018 */ lw $v0, 0x18($sp) .L800612CC: /* 3C6CC 800612CC 94420000 */ lhu $v0, 0x0($v0) /* 3C6D0 800612D0 2443FFF6 */ addiu $v1, $v0, -0xA /* 3C6D4 800612D4 2C620007 */ sltiu $v0, $v1, 0x7 /* 3C6D8 800612D8 10400042 */ beqz $v0, .L800613E4 /* 3C6DC 800612DC 00031080 */ sll $v0, $v1, 2 /* 3C6E0 800612E0 3C01800A */ lui $at, %hi(jtbl_80099B20) /* 3C6E4 800612E4 00220821 */ addu $at, $at, $v0 /* 3C6E8 800612E8 8C229B20 */ lw $v0, %lo(jtbl_80099B20)($at) /* 3C6EC 800612EC 00400008 */ jr $v0 /* 3C6F0 800612F0 00000000 */ nop glabel .L800612F4 /* 3C6F4 800612F4 8E440010 */ lw $a0, 0x10($s2) /* 3C6F8 800612F8 27A5001C */ addiu $a1, $sp, 0x1C /* 3C6FC 800612FC 0C0195BC */ jal osRecvMesg /* 3C700 80061300 24060001 */ addiu $a2, $zero, 0x1 /* 3C704 80061304 8FA20018 */ lw $v0, 0x18($sp) /* 3C708 80061308 8C45000C */ lw $a1, 0xC($v0) /* 3C70C 8006130C 8C460008 */ lw $a2, 0x8($v0) /* 3C710 80061310 8C470010 */ lw $a3, 0x10($v0) /* 3C714 80061314 8E420014 */ lw $v0, 0x14($s2) /* 3C718 80061318 0040F809 */ jalr $v0 /* 3C71C 8006131C 00002021 */ addu $a0, $zero, $zero /* 3C720 80061320 080184FA */ j .L800613E8 /* 3C724 80061324 00000000 */ nop glabel .L80061328 /* 3C728 80061328 8E440010 */ lw $a0, 0x10($s2) /* 3C72C 8006132C 27A5001C */ addiu $a1, $sp, 0x1C /* 3C730 80061330 0C0195BC */ jal osRecvMesg /* 3C734 80061334 24060001 */ addiu $a2, $zero, 0x1 /* 3C738 80061338 8FA20018 */ lw $v0, 0x18($sp) /* 3C73C 8006133C 8C45000C */ lw $a1, 0xC($v0) /* 3C740 80061340 8C460008 */ lw $a2, 0x8($v0) /* 3C744 80061344 8C470010 */ lw $a3, 0x10($v0) /* 3C748 80061348 8E420014 */ lw $v0, 0x14($s2) /* 3C74C 8006134C 0040F809 */ jalr $v0 /* 3C750 80061350 24040001 */ addiu $a0, $zero, 0x1 /* 3C754 80061354 080184FA */ j .L800613E8 /* 3C758 80061358 00000000 */ nop glabel .L8006135C /* 3C75C 8006135C 8E440010 */ lw $a0, 0x10($s2) /* 3C760 80061360 27A5001C */ addiu $a1, $sp, 0x1C /* 3C764 80061364 0C0195BC */ jal osRecvMesg /* 3C768 80061368 24060001 */ addiu $a2, $zero, 0x1 /* 3C76C 8006136C 8FA20018 */ lw $v0, 0x18($sp) /* 3C770 80061370 8C430010 */ lw $v1, 0x10($v0) /* 3C774 80061374 AFA30010 */ sw $v1, 0x10($sp) /* 3C778 80061378 8C440014 */ lw $a0, 0x14($v0) /* 3C77C 8006137C 8C46000C */ lw $a2, 0xC($v0) /* 3C780 80061380 8C470008 */ lw $a3, 0x8($v0) /* 3C784 80061384 8E420018 */ lw $v0, 0x18($s2) /* 3C788 80061388 0040F809 */ jalr $v0 /* 3C78C 8006138C 00002821 */ addu $a1, $zero, $zero /* 3C790 80061390 080184FA */ j .L800613E8 /* 3C794 80061394 00000000 */ nop glabel .L80061398 /* 3C798 80061398 8E440010 */ lw $a0, 0x10($s2) /* 3C79C 8006139C 27A5001C */ addiu $a1, $sp, 0x1C /* 3C7A0 800613A0 0C0195BC */ jal osRecvMesg /* 3C7A4 800613A4 24060001 */ addiu $a2, $zero, 0x1 /* 3C7A8 800613A8 8FA20018 */ lw $v0, 0x18($sp) /* 3C7AC 800613AC 8C430010 */ lw $v1, 0x10($v0) /* 3C7B0 800613B0 AFA30010 */ sw $v1, 0x10($sp) /* 3C7B4 800613B4 8C440014 */ lw $a0, 0x14($v0) /* 3C7B8 800613B8 8C46000C */ lw $a2, 0xC($v0) /* 3C7BC 800613BC 8C470008 */ lw $a3, 0x8($v0) /* 3C7C0 800613C0 8E420018 */ lw $v0, 0x18($s2) /* 3C7C4 800613C4 0040F809 */ jalr $v0 /* 3C7C8 800613C8 24050001 */ addiu $a1, $zero, 0x1 /* 3C7CC 800613CC 080184FA */ j .L800613E8 /* 3C7D0 800613D0 00000000 */ nop glabel .L800613D4 /* 3C7D4 800613D4 8FA50018 */ lw $a1, 0x18($sp) /* 3C7D8 800613D8 8CA40004 */ lw $a0, 0x4($a1) /* 3C7DC 800613DC 0C019608 */ jal osSendMesg /* 3C7E0 800613E0 00003021 */ addu $a2, $zero, $zero glabel .L800613E4 /* 3C7E4 800613E4 2402FFFF */ addiu $v0, $zero, -0x1 .L800613E8: /* 3C7E8 800613E8 1440FF35 */ bnez $v0, .L800610C0 /* 3C7EC 800613EC 27A50020 */ addiu $a1, $sp, 0x20 /* 3C7F0 800613F0 8E44000C */ lw $a0, 0xC($s2) /* 3C7F4 800613F4 0C0195BC */ jal osRecvMesg /* 3C7F8 800613F8 24060001 */ addiu $a2, $zero, 0x1 /* 3C7FC 800613FC 8FA50018 */ lw $a1, 0x18($sp) /* 3C800 80061400 8CA40004 */ lw $a0, 0x4($a1) /* 3C804 80061404 0C019608 */ jal osSendMesg /* 3C808 80061408 00003021 */ addu $a2, $zero, $zero /* 3C80C 8006140C 8E440010 */ lw $a0, 0x10($s2) /* 3C810 80061410 00002821 */ addu $a1, $zero, $zero /* 3C814 80061414 0C019608 */ jal osSendMesg /* 3C818 80061418 00003021 */ addu $a2, $zero, $zero /* 3C81C 8006141C 08018430 */ j .L800610C0 /* 3C820 80061420 00000000 */ nop /* 3C824 80061424 8FBF0040 */ lw $ra, 0x40($sp) /* 3C828 80061428 8FB5003C */ lw $s5, 0x3C($sp) /* 3C82C 8006142C 8FB40038 */ lw $s4, 0x38($sp) /* 3C830 80061430 8FB30034 */ lw $s3, 0x34($sp) /* 3C834 80061434 8FB20030 */ lw $s2, 0x30($sp) /* 3C838 80061438 8FB1002C */ lw $s1, 0x2C($sp) /* 3C83C 8006143C 8FB00028 */ lw $s0, 0x28($sp) /* 3C840 80061440 03E00008 */ jr $ra /* 3C844 80061444 27BD0048 */ addiu $sp, $sp, 0x48 /* 3C848 80061448 00000000 */ nop /* 3C84C 8006144C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void __osDevMgrMain(void *args) { OSIoMesg *mb = NULL; OSMesg em; OSMesg dummy; s32 ret = 0; OSDevMgr *dm = (OSDevMgr *)args; s32 messageSend = 0; while (TRUE) { osRecvMesg(dm->cmdQueue, (OSMesg)&mb, OS_MESG_BLOCK); if (mb->piHandle != NULL && mb->piHandle->type == DEVICE_TYPE_64DD && (mb->piHandle->transferInfo.cmdType == LEO_CMD_TYPE_0 || mb->piHandle->transferInfo.cmdType == LEO_CMD_TYPE_1)) { __OSBlockInfo *blockInfo; __OSTranxInfo *info; info = &mb->piHandle->transferInfo; blockInfo = &info->block[info->blockNum]; info->sectorNum = -1; if (info->transferMode != LEO_SECTOR_MODE) { blockInfo->dramAddr = (void *)((u32)blockInfo->dramAddr - blockInfo->sectorSize); } if (info->transferMode == LEO_TRACK_MODE && mb->piHandle->transferInfo.cmdType == LEO_CMD_TYPE_0) { messageSend = 1; } else { messageSend = 0; } osRecvMesg(dm->acsQueue, &dummy, OS_MESG_BLOCK); __osResetGlobalIntMask(OS_IM_PI); __osEPiRawWriteIo(mb->piHandle, LEO_BM_CTL, (info->bmCtlShadow | 0x80000000)); doMessageSend: osRecvMesg(dm->evtQueue, &em, OS_MESG_BLOCK); info = &mb->piHandle->transferInfo; blockInfo = &info->block[info->blockNum]; if (blockInfo->errStatus == LEO_ERROR_29) { u32 stat; __osEPiRawWriteIo(mb->piHandle, LEO_BM_CTL, info->bmCtlShadow | LEO_BM_CTL_RESET); __osEPiRawWriteIo(mb->piHandle, LEO_BM_CTL, info->bmCtlShadow); __osEPiRawReadIo(mb->piHandle, LEO_STATUS, &stat); if (stat & LEO_STATUS_MECHANIC_INTERRUPT) { __osEPiRawWriteIo(mb->piHandle, LEO_BM_CTL, info->bmCtlShadow | LEO_BM_CTL_CLR_MECHANIC_INTR); } blockInfo->errStatus = LEO_ERROR_4; IO_WRITE(PI_STATUS_REG, PI_CLR_INTR); __osSetGlobalIntMask(OS_IM_PI | SR_IBIT4); } osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK); if (messageSend == 1 && mb->piHandle->transferInfo.block[0].errStatus == LEO_ERROR_GOOD) { messageSend = 0; goto doMessageSend; } osSendMesg(dm->acsQueue, NULL, OS_MESG_NOBLOCK); if (mb->piHandle->transferInfo.blockNum == 1) { osYieldThread(); } } else { switch (mb->hdr.type) { case OS_MESG_TYPE_DMAREAD: osRecvMesg(dm->acsQueue, &dummy, OS_MESG_BLOCK); ret = dm->dma(OS_READ, mb->devAddr, mb->dramAddr, mb->size); break; case OS_MESG_TYPE_DMAWRITE: osRecvMesg(dm->acsQueue, &dummy, OS_MESG_BLOCK); ret = dm->dma(OS_WRITE, mb->devAddr, mb->dramAddr, mb->size); break; case OS_MESG_TYPE_EDMAREAD: osRecvMesg(dm->acsQueue, &dummy, OS_MESG_BLOCK); ret = dm->edma(mb->piHandle, OS_READ, mb->devAddr, mb->dramAddr, mb->size); break; case OS_MESG_TYPE_EDMAWRITE: osRecvMesg(dm->acsQueue, &dummy, OS_MESG_BLOCK); ret = dm->edma(mb->piHandle, OS_WRITE, mb->devAddr, mb->dramAddr, mb->size); break; case OS_MESG_TYPE_LOOPBACK: osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK); ret = -1; break; default: ret = -1; break; } if (ret == 0) { osRecvMesg(dm->evtQueue, &em, OS_MESG_BLOCK); osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK); osSendMesg(dm->acsQueue, NULL, OS_MESG_NOBLOCK); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel embers_appendGfx /* 3DBA60 E00E0600 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 3DBA64 E00E0604 AFBE00B0 */ sw $fp, 0xB0($sp) /* 3DBA68 E00E0608 0080F02D */ daddu $fp, $a0, $zero /* 3DBA6C E00E060C 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3DBA70 E00E0610 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3DBA74 E00E0614 27A40010 */ addiu $a0, $sp, 0x10 /* 3DBA78 E00E0618 AFB3009C */ sw $s3, 0x9C($sp) /* 3DBA7C E00E061C 3C130001 */ lui $s3, (0x11630 >> 16) /* 3DBA80 E00E0620 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3DBA84 E00E0624 AFB500A4 */ sw $s5, 0xA4($sp) /* 3DBA88 E00E0628 24150001 */ addiu $s5, $zero, 0x1 /* 3DBA8C E00E062C AFB600A8 */ sw $s6, 0xA8($sp) /* 3DBA90 E00E0630 3C16800A */ lui $s6, %hi(gMainGfxPos) /* 3DBA94 E00E0634 26D6A66C */ addiu $s6, $s6, %lo(gMainGfxPos) /* 3DBA98 E00E0638 AFBF00B4 */ sw $ra, 0xB4($sp) /* 3DBA9C E00E063C AFB700AC */ sw $s7, 0xAC($sp) /* 3DBAA0 E00E0640 AFB400A0 */ sw $s4, 0xA0($sp) /* 3DBAA4 E00E0644 AFB20098 */ sw $s2, 0x98($sp) /* 3DBAA8 E00E0648 AFB10094 */ sw $s1, 0x94($sp) /* 3DBAAC E00E064C AFB00090 */ sw $s0, 0x90($sp) /* 3DBAB0 E00E0650 8EC50000 */ lw $a1, 0x0($s6) /* 3DBAB4 E00E0654 8FD4000C */ lw $s4, 0xC($fp) /* 3DBAB8 E00E0658 00A0182D */ daddu $v1, $a1, $zero /* 3DBABC E00E065C 24A50008 */ addiu $a1, $a1, 0x8 /* 3DBAC0 E00E0660 AEC50000 */ sw $a1, 0x0($s6) /* 3DBAC4 E00E0664 8E92002C */ lw $s2, 0x2C($s4) /* 3DBAC8 E00E0668 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3DBACC E00E066C AC620000 */ sw $v0, 0x0($v1) /* 3DBAD0 E00E0670 AC600004 */ sw $zero, 0x4($v1) /* 3DBAD4 E00E0674 ACA60000 */ sw $a2, 0x0($a1) /* 3DBAD8 E00E0678 8FC30010 */ lw $v1, 0x10($fp) /* 3DBADC E00E067C 24A20008 */ addiu $v0, $a1, 0x8 /* 3DBAE0 E00E0680 AEC20000 */ sw $v0, 0x0($s6) /* 3DBAE4 E00E0684 8C62001C */ lw $v0, 0x1C($v1) /* 3DBAE8 E00E0688 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3DBAEC E00E068C 00431021 */ addu $v0, $v0, $v1 /* 3DBAF0 E00E0690 3C03800B */ lui $v1, %hi(gCameras) /* 3DBAF4 E00E0694 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3DBAF8 E00E0698 ACA20004 */ sw $v0, 0x4($a1) /* 3DBAFC E00E069C 8E850004 */ lw $a1, 0x4($s4) /* 3DBB00 E00E06A0 8E860008 */ lw $a2, 0x8($s4) /* 3DBB04 E00E06A4 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3DBB08 E00E06A8 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3DBB0C E00E06AC 8E87000C */ lw $a3, 0xC($s4) /* 3DBB10 E00E06B0 00028080 */ sll $s0, $v0, 2 /* 3DBB14 E00E06B4 02028021 */ addu $s0, $s0, $v0 /* 3DBB18 E00E06B8 00108080 */ sll $s0, $s0, 2 /* 3DBB1C E00E06BC 02028023 */ subu $s0, $s0, $v0 /* 3DBB20 E00E06C0 001010C0 */ sll $v0, $s0, 3 /* 3DBB24 E00E06C4 02028021 */ addu $s0, $s0, $v0 /* 3DBB28 E00E06C8 001080C0 */ sll $s0, $s0, 3 /* 3DBB2C E00E06CC 0C080108 */ jal shim_guTranslateF /* 3DBB30 E00E06D0 02038021 */ addu $s0, $s0, $v1 /* 3DBB34 E00E06D4 27B10050 */ addiu $s1, $sp, 0x50 /* 3DBB38 E00E06D8 8E850040 */ lw $a1, 0x40($s4) /* 3DBB3C E00E06DC 0220202D */ daddu $a0, $s1, $zero /* 3DBB40 E00E06E0 00A0302D */ daddu $a2, $a1, $zero /* 3DBB44 E00E06E4 0C080110 */ jal shim_guScaleF /* 3DBB48 E00E06E8 00A0382D */ daddu $a3, $a1, $zero /* 3DBB4C E00E06EC 0220202D */ daddu $a0, $s1, $zero /* 3DBB50 E00E06F0 27A50010 */ addiu $a1, $sp, 0x10 /* 3DBB54 E00E06F4 0C080114 */ jal shim_guMtxCatF /* 3DBB58 E00E06F8 00A0302D */ daddu $a2, $a1, $zero /* 3DBB5C E00E06FC 27A40010 */ addiu $a0, $sp, 0x10 /* 3DBB60 E00E0700 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 3DBB64 E00E0704 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 3DBB68 E00E0708 3C17800A */ lui $s7, %hi(gDisplayContext) /* 3DBB6C E00E070C 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext) /* 3DBB70 E00E0710 96250000 */ lhu $a1, 0x0($s1) /* 3DBB74 E00E0714 8EE20000 */ lw $v0, 0x0($s7) /* 3DBB78 E00E0718 00052980 */ sll $a1, $a1, 6 /* 3DBB7C E00E071C 00B32821 */ addu $a1, $a1, $s3 /* 3DBB80 E00E0720 0C080118 */ jal shim_guMtxF2L /* 3DBB84 E00E0724 00452821 */ addu $a1, $v0, $a1 /* 3DBB88 E00E0728 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3DBB8C E00E072C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3DBB90 E00E0730 3C06DA38 */ lui $a2, (0xDA380000 >> 16) /* 3DBB94 E00E0734 00D53025 */ or $a2, $a2, $s5 /* 3DBB98 E00E0738 325200FF */ andi $s2, $s2, 0xFF /* 3DBB9C E00E073C 8EC40000 */ lw $a0, 0x0($s6) /* 3DBBA0 E00E0740 96220000 */ lhu $v0, 0x0($s1) /* 3DBBA4 E00E0744 0080282D */ daddu $a1, $a0, $zero /* 3DBBA8 E00E0748 24840008 */ addiu $a0, $a0, 0x8 /* 3DBBAC E00E074C AEC40000 */ sw $a0, 0x0($s6) /* 3DBBB0 E00E0750 ACA30000 */ sw $v1, 0x0($a1) /* 3DBBB4 E00E0754 00551821 */ addu $v1, $v0, $s5 /* 3DBBB8 E00E0758 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3DBBBC E00E075C 00021180 */ sll $v0, $v0, 6 /* 3DBBC0 E00E0760 A6230000 */ sh $v1, 0x0($s1) /* 3DBBC4 E00E0764 8EE30000 */ lw $v1, 0x0($s7) /* 3DBBC8 E00E0768 00531021 */ addu $v0, $v0, $s3 /* 3DBBCC E00E076C 00621821 */ addu $v1, $v1, $v0 /* 3DBBD0 E00E0770 24820008 */ addiu $v0, $a0, 0x8 /* 3DBBD4 E00E0774 ACA30004 */ sw $v1, 0x4($a1) /* 3DBBD8 E00E0778 AEC20000 */ sw $v0, 0x0($s6) /* 3DBBDC E00E077C 24820010 */ addiu $v0, $a0, 0x10 /* 3DBBE0 E00E0780 AC860000 */ sw $a2, 0x0($a0) /* 3DBBE4 E00E0784 AEC20000 */ sw $v0, 0x0($s6) /* 3DBBE8 E00E0788 8E030204 */ lw $v1, 0x204($s0) /* 3DBBEC E00E078C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3DBBF0 E00E0790 AC820008 */ sw $v0, 0x8($a0) /* 3DBBF4 E00E0794 AC830004 */ sw $v1, 0x4($a0) /* 3DBBF8 E00E0798 92820023 */ lbu $v0, 0x23($s4) /* 3DBBFC E00E079C 92850027 */ lbu $a1, 0x27($s4) /* 3DBC00 E00E07A0 9286002B */ lbu $a2, 0x2B($s4) /* 3DBC04 E00E07A4 24830018 */ addiu $v1, $a0, 0x18 /* 3DBC08 E00E07A8 AEC30000 */ sw $v1, 0x0($s6) /* 3DBC0C E00E07AC 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3DBC10 E00E07B0 AC830010 */ sw $v1, 0x10($a0) /* 3DBC14 E00E07B4 00021600 */ sll $v0, $v0, 24 /* 3DBC18 E00E07B8 00052C00 */ sll $a1, $a1, 16 /* 3DBC1C E00E07BC 00451025 */ or $v0, $v0, $a1 /* 3DBC20 E00E07C0 00063200 */ sll $a2, $a2, 8 /* 3DBC24 E00E07C4 00461025 */ or $v0, $v0, $a2 /* 3DBC28 E00E07C8 00521025 */ or $v0, $v0, $s2 /* 3DBC2C E00E07CC AC82000C */ sw $v0, 0xC($a0) /* 3DBC30 E00E07D0 92820033 */ lbu $v0, 0x33($s4) /* 3DBC34 E00E07D4 92850037 */ lbu $a1, 0x37($s4) /* 3DBC38 E00E07D8 9286003B */ lbu $a2, 0x3B($s4) /* 3DBC3C E00E07DC 9287003F */ lbu $a3, 0x3F($s4) /* 3DBC40 E00E07E0 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 3DBC44 E00E07E4 AC830018 */ sw $v1, 0x18($a0) /* 3DBC48 E00E07E8 00021600 */ sll $v0, $v0, 24 /* 3DBC4C E00E07EC 00052C00 */ sll $a1, $a1, 16 /* 3DBC50 E00E07F0 00451025 */ or $v0, $v0, $a1 /* 3DBC54 E00E07F4 00063200 */ sll $a2, $a2, 8 /* 3DBC58 E00E07F8 00461025 */ or $v0, $v0, $a2 /* 3DBC5C E00E07FC 00471025 */ or $v0, $v0, $a3 /* 3DBC60 E00E0800 AC820014 */ sw $v0, 0x14($a0) /* 3DBC64 E00E0804 3C02E00E */ lui $v0, (0xE00E0A44 >> 16) /* 3DBC68 E00E0808 8C420A44 */ lw $v0, (0xE00E0A44 & 0xFFFF)($v0) /* 3DBC6C E00E080C 26940070 */ addiu $s4, $s4, 0x70 /* 3DBC70 E00E0810 AC82001C */ sw $v0, 0x1C($a0) /* 3DBC74 E00E0814 8FC20008 */ lw $v0, 0x8($fp) /* 3DBC78 E00E0818 24840020 */ addiu $a0, $a0, 0x20 /* 3DBC7C E00E081C 02A2102A */ slt $v0, $s5, $v0 /* 3DBC80 E00E0820 10400070 */ beqz $v0, .LE00E09E4 /* 3DBC84 E00E0824 AEC40000 */ sw $a0, 0x0($s6) /* 3DBC88 E00E0828 0220982D */ daddu $s3, $s1, $zero /* 3DBC8C E00E082C 3C120001 */ lui $s2, (0x11630 >> 16) /* 3DBC90 E00E0830 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3DBC94 E00E0834 02C0882D */ daddu $s1, $s6, $zero /* 3DBC98 E00E0838 3C16F200 */ lui $s6, (0xF2000000 >> 16) /* 3DBC9C E00E083C 26900060 */ addiu $s0, $s4, 0x60 .LE00E0840: /* 3DBCA0 E00E0840 8E020004 */ lw $v0, 0x4($s0) /* 3DBCA4 E00E0844 04420063 */ bltzl $v0, .LE00E09D4 /* 3DBCA8 E00E0848 26B50001 */ addiu $s5, $s5, 0x1 /* 3DBCAC E00E084C 8E05FFA4 */ lw $a1, -0x5C($s0) /* 3DBCB0 E00E0850 8E06FFA8 */ lw $a2, -0x58($s0) /* 3DBCB4 E00E0854 8E07FFAC */ lw $a3, -0x54($s0) /* 3DBCB8 E00E0858 0C080108 */ jal shim_guTranslateF /* 3DBCBC E00E085C 27A40010 */ addiu $a0, $sp, 0x10 /* 3DBCC0 E00E0860 27A40010 */ addiu $a0, $sp, 0x10 /* 3DBCC4 E00E0864 96650000 */ lhu $a1, 0x0($s3) /* 3DBCC8 E00E0868 8EE20000 */ lw $v0, 0x0($s7) /* 3DBCCC E00E086C 00052980 */ sll $a1, $a1, 6 /* 3DBCD0 E00E0870 00B22821 */ addu $a1, $a1, $s2 /* 3DBCD4 E00E0874 0C080118 */ jal shim_guMtxF2L /* 3DBCD8 E00E0878 00452821 */ addu $a1, $v0, $a1 /* 3DBCDC E00E087C 8E260000 */ lw $a2, 0x0($s1) /* 3DBCE0 E00E0880 02A0382D */ daddu $a3, $s5, $zero /* 3DBCE4 E00E0884 00C0202D */ daddu $a0, $a2, $zero /* 3DBCE8 E00E0888 24C60008 */ addiu $a2, $a2, 0x8 /* 3DBCEC E00E088C AE260000 */ sw $a2, 0x0($s1) /* 3DBCF0 E00E0890 96620000 */ lhu $v0, 0x0($s3) /* 3DBCF4 E00E0894 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3DBCF8 E00E0898 AC830000 */ sw $v1, 0x0($a0) /* 3DBCFC E00E089C 24430001 */ addiu $v1, $v0, 0x1 /* 3DBD00 E00E08A0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3DBD04 E00E08A4 00021180 */ sll $v0, $v0, 6 /* 3DBD08 E00E08A8 A6630000 */ sh $v1, 0x0($s3) /* 3DBD0C E00E08AC 8EE30000 */ lw $v1, 0x0($s7) /* 3DBD10 E00E08B0 00521021 */ addu $v0, $v0, $s2 /* 3DBD14 E00E08B4 00621821 */ addu $v1, $v1, $v0 /* 3DBD18 E00E08B8 24C20008 */ addiu $v0, $a2, 0x8 /* 3DBD1C E00E08BC AC830004 */ sw $v1, 0x4($a0) /* 3DBD20 E00E08C0 06A10002 */ bgez $s5, .LE00E08CC /* 3DBD24 E00E08C4 AE220000 */ sw $v0, 0x0($s1) /* 3DBD28 E00E08C8 26A70003 */ addiu $a3, $s5, 0x3 .LE00E08CC: /* 3DBD2C E00E08CC 3C040003 */ lui $a0, (0x3C000 >> 16) /* 3DBD30 E00E08D0 3484C000 */ ori $a0, $a0, (0x3C000 & 0xFFFF) /* 3DBD34 E00E08D4 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3DBD38 E00E08D8 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3DBD3C E00E08DC 00071883 */ sra $v1, $a3, 2 /* 3DBD40 E00E08E0 00031880 */ sll $v1, $v1, 2 /* 3DBD44 E00E08E4 02A31823 */ subu $v1, $s5, $v1 /* 3DBD48 E00E08E8 00031180 */ sll $v0, $v1, 6 /* 3DBD4C E00E08EC 30420FFF */ andi $v0, $v0, 0xFFF /* 3DBD50 E00E08F0 00561025 */ or $v0, $v0, $s6 /* 3DBD54 E00E08F4 00031980 */ sll $v1, $v1, 6 /* 3DBD58 E00E08F8 3463003C */ ori $v1, $v1, 0x3C /* 3DBD5C E00E08FC 30630FFF */ andi $v1, $v1, 0xFFF /* 3DBD60 E00E0900 00641825 */ or $v1, $v1, $a0 /* 3DBD64 E00E0904 ACC20000 */ sw $v0, 0x0($a2) /* 3DBD68 E00E0908 24C20010 */ addiu $v0, $a2, 0x10 /* 3DBD6C E00E090C ACC30004 */ sw $v1, 0x4($a2) /* 3DBD70 E00E0910 AE220000 */ sw $v0, 0x0($s1) /* 3DBD74 E00E0914 24C20018 */ addiu $v0, $a2, 0x18 /* 3DBD78 E00E0918 C600FFFC */ lwc1 $f0, -0x4($s0) /* 3DBD7C E00E091C 3C040100 */ lui $a0, (0x1000000 >> 16) /* 3DBD80 E00E0920 AE220000 */ sw $v0, 0x0($s1) /* 3DBD84 E00E0924 4600010D */ trunc.w.s $f4, $f0 /* 3DBD88 E00E0928 44032000 */ mfc1 $v1, $f4 /* 3DBD8C E00E092C 00000000 */ nop /* 3DBD90 E00E0930 00031880 */ sll $v1, $v1, 2 /* 3DBD94 E00E0934 30630FFF */ andi $v1, $v1, 0xFFF /* 3DBD98 E00E0938 C6000000 */ lwc1 $f0, 0x0($s0) /* 3DBD9C E00E093C 00031B00 */ sll $v1, $v1, 12 /* 3DBDA0 E00E0940 4600010D */ trunc.w.s $f4, $f0 /* 3DBDA4 E00E0944 44022000 */ mfc1 $v0, $f4 /* 3DBDA8 E00E0948 00000000 */ nop /* 3DBDAC E00E094C 00021080 */ sll $v0, $v0, 2 /* 3DBDB0 E00E0950 30420FFF */ andi $v0, $v0, 0xFFF /* 3DBDB4 E00E0954 00561025 */ or $v0, $v0, $s6 /* 3DBDB8 E00E0958 00621825 */ or $v1, $v1, $v0 /* 3DBDBC E00E095C ACC30008 */ sw $v1, 0x8($a2) /* 3DBDC0 E00E0960 C600FFFC */ lwc1 $f0, -0x4($s0) /* 3DBDC4 E00E0964 C6020000 */ lwc1 $f2, 0x0($s0) /* 3DBDC8 E00E0968 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3DBDCC E00E096C ACC20010 */ sw $v0, 0x10($a2) /* 3DBDD0 E00E0970 4600010D */ trunc.w.s $f4, $f0 /* 3DBDD4 E00E0974 44032000 */ mfc1 $v1, $f4 /* 3DBDD8 E00E0978 00000000 */ nop /* 3DBDDC E00E097C 2463000F */ addiu $v1, $v1, 0xF /* 3DBDE0 E00E0980 00031880 */ sll $v1, $v1, 2 /* 3DBDE4 E00E0984 30630FFF */ andi $v1, $v1, 0xFFF /* 3DBDE8 E00E0988 00031B00 */ sll $v1, $v1, 12 /* 3DBDEC E00E098C 4600110D */ trunc.w.s $f4, $f2 /* 3DBDF0 E00E0990 44022000 */ mfc1 $v0, $f4 /* 3DBDF4 E00E0994 00000000 */ nop /* 3DBDF8 E00E0998 2442000F */ addiu $v0, $v0, 0xF /* 3DBDFC E00E099C 00021080 */ sll $v0, $v0, 2 /* 3DBE00 E00E09A0 30420FFF */ andi $v0, $v0, 0xFFF /* 3DBE04 E00E09A4 00441025 */ or $v0, $v0, $a0 /* 3DBE08 E00E09A8 00621825 */ or $v1, $v1, $v0 /* 3DBE0C E00E09AC ACC3000C */ sw $v1, 0xC($a2) /* 3DBE10 E00E09B0 3C03E00E */ lui $v1, (0xE00E0A40 >> 16) /* 3DBE14 E00E09B4 8C630A40 */ lw $v1, (0xE00E0A40 & 0xFFFF)($v1) /* 3DBE18 E00E09B8 24C20020 */ addiu $v0, $a2, 0x20 /* 3DBE1C E00E09BC AE220000 */ sw $v0, 0x0($s1) /* 3DBE20 E00E09C0 24020040 */ addiu $v0, $zero, 0x40 /* 3DBE24 E00E09C4 ACC50018 */ sw $a1, 0x18($a2) /* 3DBE28 E00E09C8 ACC2001C */ sw $v0, 0x1C($a2) /* 3DBE2C E00E09CC ACC30014 */ sw $v1, 0x14($a2) /* 3DBE30 E00E09D0 26B50001 */ addiu $s5, $s5, 0x1 .LE00E09D4: /* 3DBE34 E00E09D4 8FC20008 */ lw $v0, 0x8($fp) /* 3DBE38 E00E09D8 02A2102A */ slt $v0, $s5, $v0 /* 3DBE3C E00E09DC 1440FF98 */ bnez $v0, .LE00E0840 /* 3DBE40 E00E09E0 26100070 */ addiu $s0, $s0, 0x70 .LE00E09E4: /* 3DBE44 E00E09E4 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3DBE48 E00E09E8 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3DBE4C E00E09EC 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3DBE50 E00E09F0 8C620000 */ lw $v0, 0x0($v1) /* 3DBE54 E00E09F4 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3DBE58 E00E09F8 0040202D */ daddu $a0, $v0, $zero /* 3DBE5C E00E09FC 24420008 */ addiu $v0, $v0, 0x8 /* 3DBE60 E00E0A00 AC620000 */ sw $v0, 0x0($v1) /* 3DBE64 E00E0A04 24020040 */ addiu $v0, $zero, 0x40 /* 3DBE68 E00E0A08 AC850000 */ sw $a1, 0x0($a0) /* 3DBE6C E00E0A0C AC820004 */ sw $v0, 0x4($a0) /* 3DBE70 E00E0A10 8FBF00B4 */ lw $ra, 0xB4($sp) /* 3DBE74 E00E0A14 8FBE00B0 */ lw $fp, 0xB0($sp) /* 3DBE78 E00E0A18 8FB700AC */ lw $s7, 0xAC($sp) /* 3DBE7C E00E0A1C 8FB600A8 */ lw $s6, 0xA8($sp) /* 3DBE80 E00E0A20 8FB500A4 */ lw $s5, 0xA4($sp) /* 3DBE84 E00E0A24 8FB400A0 */ lw $s4, 0xA0($sp) /* 3DBE88 E00E0A28 8FB3009C */ lw $s3, 0x9C($sp) /* 3DBE8C E00E0A2C 8FB20098 */ lw $s2, 0x98($sp) /* 3DBE90 E00E0A30 8FB10094 */ lw $s1, 0x94($sp) /* 3DBE94 E00E0A34 8FB00090 */ lw $s0, 0x90($sp) /* 3DBE98 E00E0A38 03E00008 */ jr $ra /* 3DBE9C E00E0A3C 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: void embers_appendGfx(void* effect) { EmbersFXData* part = ((EffectInstance*)effect)->data.embers; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_2C = part->unk_2C; Matrix4f sp10; Matrix4f sp50; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C); shim_guScaleF(sp50, part->unk_40, part->unk_40, part->unk_40); 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, part->unk_20, part->unk_24, part->unk_28, unk_2C); gDPSetEnvColor(gMainGfxPos++, part->unk_30, part->unk_34, part->unk_38, part->unk_3C); gSPDisplayList(gMainGfxPos++, D_E00E0A40[1]); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_64 >= 0) { shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (i % 4) * 16 * 4, 15 * 4, ((i % 4) * 16 + 15) * 4); gDPSetTileSize(gMainGfxPos++, 1, (s32) part->unk_5C * 4, (s32) part->unk_60 * 4, ((s32) part->unk_5C + 15) * 4, ((s32) part->unk_60 + 15) * 4); gSPDisplayList(gMainGfxPos++, D_E00E0A40[0]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_curtains /* 6E80 8002BA80 3C01800A */ lui $at, %hi(gCurtainScaleGoal) /* 6E84 8002BA84 C420BA94 */ lwc1 $f0, %lo(gCurtainScaleGoal)($at) /* 6E88 8002BA88 27BDFF78 */ addiu $sp, $sp, -0x88 /* 6E8C 8002BA8C AFB20068 */ sw $s2, 0x68($sp) /* 6E90 8002BA90 3C12800A */ lui $s2, %hi(gCurtainScale) /* 6E94 8002BA94 2652BA90 */ addiu $s2, $s2, %lo(gCurtainScale) /* 6E98 8002BA98 AFBF0078 */ sw $ra, 0x78($sp) /* 6E9C 8002BA9C AFB50074 */ sw $s5, 0x74($sp) /* 6EA0 8002BAA0 AFB40070 */ sw $s4, 0x70($sp) /* 6EA4 8002BAA4 AFB3006C */ sw $s3, 0x6C($sp) /* 6EA8 8002BAA8 AFB10064 */ sw $s1, 0x64($sp) /* 6EAC 8002BAAC AFB00060 */ sw $s0, 0x60($sp) /* 6EB0 8002BAB0 F7B40080 */ sdc1 $f20, 0x80($sp) /* 6EB4 8002BAB4 C6440000 */ lwc1 $f4, 0x0($s2) /* 6EB8 8002BAB8 46040032 */ c.eq.s $f0, $f4 /* 6EBC 8002BABC 00000000 */ nop /* 6EC0 8002BAC0 4501000B */ bc1t .L8002BAF0 /* 6EC4 8002BAC4 00000000 */ nop /* 6EC8 8002BAC8 46040001 */ sub.s $f0, $f0, $f4 /* 6ECC 8002BACC 3C018009 */ lui $at, %hi(D_80097E00) /* 6ED0 8002BAD0 D4227E00 */ ldc1 $f2, %lo(D_80097E00)($at) /* 6ED4 8002BAD4 46000021 */ cvt.d.s $f0, $f0 /* 6ED8 8002BAD8 46220002 */ mul.d $f0, $f0, $f2 /* 6EDC 8002BADC 00000000 */ nop /* 6EE0 8002BAE0 460020A1 */ cvt.d.s $f2, $f4 /* 6EE4 8002BAE4 46201080 */ add.d $f2, $f2, $f0 /* 6EE8 8002BAE8 462010A0 */ cvt.s.d $f2, $f2 /* 6EEC 8002BAEC E6420000 */ swc1 $f2, 0x0($s2) .L8002BAF0: /* 6EF0 8002BAF0 3C13800A */ lui $s3, %hi(gCurtainFade) /* 6EF4 8002BAF4 2673BA98 */ addiu $s3, $s3, %lo(gCurtainFade) /* 6EF8 8002BAF8 3C01800A */ lui $at, %hi(gCurtainFadeGoal) /* 6EFC 8002BAFC C420BA9C */ lwc1 $f0, %lo(gCurtainFadeGoal)($at) /* 6F00 8002BB00 C6640000 */ lwc1 $f4, 0x0($s3) /* 6F04 8002BB04 46040032 */ c.eq.s $f0, $f4 /* 6F08 8002BB08 00000000 */ nop /* 6F0C 8002BB0C 4501000B */ bc1t .L8002BB3C /* 6F10 8002BB10 00000000 */ nop /* 6F14 8002BB14 46040001 */ sub.s $f0, $f0, $f4 /* 6F18 8002BB18 3C018009 */ lui $at, %hi(D_80097E08) /* 6F1C 8002BB1C D4227E08 */ ldc1 $f2, %lo(D_80097E08)($at) /* 6F20 8002BB20 46000021 */ cvt.d.s $f0, $f0 /* 6F24 8002BB24 46220002 */ mul.d $f0, $f0, $f2 /* 6F28 8002BB28 00000000 */ nop /* 6F2C 8002BB2C 460020A1 */ cvt.d.s $f2, $f4 /* 6F30 8002BB30 46201080 */ add.d $f2, $f2, $f0 /* 6F34 8002BB34 462010A0 */ cvt.s.d $f2, $f2 /* 6F38 8002BB38 E6620000 */ swc1 $f2, 0x0($s3) .L8002BB3C: /* 6F3C 8002BB3C C6400000 */ lwc1 $f0, 0x0($s2) /* 6F40 8002BB40 3C018009 */ lui $at, %hi(D_80097E10) /* 6F44 8002BB44 D4227E10 */ ldc1 $f2, %lo(D_80097E10)($at) /* 6F48 8002BB48 46000021 */ cvt.d.s $f0, $f0 /* 6F4C 8002BB4C 4622003C */ c.lt.d $f0, $f2 /* 6F50 8002BB50 00000000 */ nop /* 6F54 8002BB54 45000087 */ bc1f .L8002BD74 /* 6F58 8002BB58 3C03FF10 */ lui $v1, (0xFF10013F >> 16) /* 6F5C 8002BB5C 3463013F */ ori $v1, $v1, (0xFF10013F & 0xFFFF) /* 6F60 8002BB60 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 6F64 8002BB64 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 6F68 8002BB68 3C15E700 */ lui $s5, (0xE7000000 >> 16) /* 6F6C 8002BB6C 8E300000 */ lw $s0, 0x0($s1) /* 6F70 8002BB70 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) /* 6F74 8002BB74 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) /* 6F78 8002BB78 0200102D */ daddu $v0, $s0, $zero /* 6F7C 8002BB7C 26100008 */ addiu $s0, $s0, 0x8 /* 6F80 8002BB80 AE300000 */ sw $s0, 0x0($s1) /* 6F84 8002BB84 AC550000 */ sw $s5, 0x0($v0) /* 6F88 8002BB88 AC400004 */ sw $zero, 0x4($v0) /* 6F8C 8002BB8C 26020008 */ addiu $v0, $s0, 0x8 /* 6F90 8002BB90 AE220000 */ sw $v0, 0x0($s1) /* 6F94 8002BB94 0C0187A4 */ jal osVirtualToPhysical /* 6F98 8002BB98 AE030000 */ sw $v1, 0x0($s0) /* 6F9C 8002BB9C 27A40020 */ addiu $a0, $sp, 0x20 /* 6FA0 8002BBA0 8E230000 */ lw $v1, 0x0($s1) /* 6FA4 8002BBA4 3C14DE00 */ lui $s4, (0xDE000000 >> 16) /* 6FA8 8002BBA8 AE020004 */ sw $v0, 0x4($s0) /* 6FAC 8002BBAC 3C028007 */ lui $v0, %hi(TheaterInitGfx) /* 6FB0 8002BBB0 244260C0 */ addiu $v0, $v0, %lo(TheaterInitGfx) /* 6FB4 8002BBB4 3C05C2A0 */ lui $a1, (0xC2A00000 >> 16) /* 6FB8 8002BBB8 3C0642A0 */ lui $a2, (0x42A00000 >> 16) /* 6FBC 8002BBBC 3C07C270 */ lui $a3, (0xC2700000 >> 16) /* 6FC0 8002BBC0 3C014270 */ lui $at, (0x42700000 >> 16) /* 6FC4 8002BBC4 44810000 */ mtc1 $at, $f0 /* 6FC8 8002BBC8 3C014320 */ lui $at, (0x43200000 >> 16) /* 6FCC 8002BBCC 44811000 */ mtc1 $at, $f2 /* 6FD0 8002BBD0 3C014420 */ lui $at, (0x44200000 >> 16) /* 6FD4 8002BBD4 44812000 */ mtc1 $at, $f4 /* 6FD8 8002BBD8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 6FDC 8002BBDC 4481A000 */ mtc1 $at, $f20 /* 6FE0 8002BBE0 0060402D */ daddu $t0, $v1, $zero /* 6FE4 8002BBE4 24630008 */ addiu $v1, $v1, 0x8 /* 6FE8 8002BBE8 AE230000 */ sw $v1, 0x0($s1) /* 6FEC 8002BBEC AD140000 */ sw $s4, 0x0($t0) /* 6FF0 8002BBF0 AD020004 */ sw $v0, 0x4($t0) /* 6FF4 8002BBF4 E7A00010 */ swc1 $f0, 0x10($sp) /* 6FF8 8002BBF8 E7A20014 */ swc1 $f2, 0x14($sp) /* 6FFC 8002BBFC E7A40018 */ swc1 $f4, 0x18($sp) /* 7000 8002BC00 0C0187CC */ jal guFrustumF /* 7004 8002BC04 E7B4001C */ swc1 $f20, 0x1C($sp) /* 7008 8002BC08 27A40020 */ addiu $a0, $sp, 0x20 /* 700C 8002BC0C 3C10800A */ lui $s0, %hi(D_8009BAA8) /* 7010 8002BC10 2610BAA8 */ addiu $s0, $s0, %lo(D_8009BAA8) /* 7014 8002BC14 0C019D40 */ jal guMtxF2L /* 7018 8002BC18 0200282D */ daddu $a1, $s0, $zero /* 701C 8002BC1C 3C04DA38 */ lui $a0, (0xDA380007 >> 16) /* 7020 8002BC20 8E220000 */ lw $v0, 0x0($s1) /* 7024 8002BC24 34840007 */ ori $a0, $a0, (0xDA380007 & 0xFFFF) /* 7028 8002BC28 0040182D */ daddu $v1, $v0, $zero /* 702C 8002BC2C 24420008 */ addiu $v0, $v0, 0x8 /* 7030 8002BC30 AE220000 */ sw $v0, 0x0($s1) /* 7034 8002BC34 C6400000 */ lwc1 $f0, 0x0($s2) /* 7038 8002BC38 3C018009 */ lui $at, %hi(D_80097E18) /* 703C 8002BC3C D4227E18 */ ldc1 $f2, %lo(D_80097E18)($at) /* 7040 8002BC40 46000021 */ cvt.d.s $f0, $f0 /* 7044 8002BC44 46220001 */ sub.d $f0, $f0, $f2 /* 7048 8002BC48 AC640000 */ sw $a0, 0x0($v1) /* 704C 8002BC4C 46200120 */ cvt.s.d $f4, $f0 /* 7050 8002BC50 4614203C */ c.lt.s $f4, $f20 /* 7054 8002BC54 00000000 */ nop /* 7058 8002BC58 45000002 */ bc1f .L8002BC64 /* 705C 8002BC5C AC700004 */ sw $s0, 0x4($v1) /* 7060 8002BC60 4600A106 */ mov.s $f4, $f20 .L8002BC64: /* 7064 8002BC64 44800000 */ mtc1 $zero, $f0 /* 7068 8002BC68 3C018009 */ lui $at, %hi(D_80097E20) /* 706C 8002BC6C D4227E20 */ ldc1 $f2, %lo(D_80097E20)($at) /* 7070 8002BC70 44050000 */ mfc1 $a1, $f0 /* 7074 8002BC74 46002021 */ cvt.d.s $f0, $f4 /* 7078 8002BC78 46220002 */ mul.d $f0, $f0, $f2 /* 707C 8002BC7C 00000000 */ nop /* 7080 8002BC80 27A40020 */ addiu $a0, $sp, 0x20 /* 7084 8002BC84 3C01C3A0 */ lui $at, (0xC3A00000 >> 16) /* 7088 8002BC88 44811000 */ mtc1 $at, $f2 /* 708C 8002BC8C 00A0302D */ daddu $a2, $a1, $zero /* 7090 8002BC90 00A0382D */ daddu $a3, $a1, $zero /* 7094 8002BC94 AFA50014 */ sw $a1, 0x14($sp) /* 7098 8002BC98 AFA50018 */ sw $a1, 0x18($sp) /* 709C 8002BC9C E7A2001C */ swc1 $f2, 0x1C($sp) /* 70A0 8002BCA0 46200020 */ cvt.s.d $f0, $f0 /* 70A4 8002BCA4 0C018FC4 */ jal guPositionF /* 70A8 8002BCA8 E7A00010 */ swc1 $f0, 0x10($sp) /* 70AC 8002BCAC 27A40020 */ addiu $a0, $sp, 0x20 /* 70B0 8002BCB0 26100040 */ addiu $s0, $s0, 0x40 /* 70B4 8002BCB4 0C019D40 */ jal guMtxF2L /* 70B8 8002BCB8 0200282D */ daddu $a1, $s0, $zero /* 70BC 8002BCBC 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 70C0 8002BCC0 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 70C4 8002BCC4 3C04D838 */ lui $a0, (0xD8380002 >> 16) /* 70C8 8002BCC8 34840002 */ ori $a0, $a0, (0xD8380002 & 0xFFFF) /* 70CC 8002BCCC 8E250000 */ lw $a1, 0x0($s1) /* 70D0 8002BCD0 3C01437F */ lui $at, (0x437F0000 >> 16) /* 70D4 8002BCD4 44810000 */ mtc1 $at, $f0 /* 70D8 8002BCD8 00A0102D */ daddu $v0, $a1, $zero /* 70DC 8002BCDC 24A50008 */ addiu $a1, $a1, 0x8 /* 70E0 8002BCE0 AE250000 */ sw $a1, 0x0($s1) /* 70E4 8002BCE4 AC430000 */ sw $v1, 0x0($v0) /* 70E8 8002BCE8 AC500004 */ sw $s0, 0x4($v0) /* 70EC 8002BCEC 24A20008 */ addiu $v0, $a1, 0x8 /* 70F0 8002BCF0 AE220000 */ sw $v0, 0x0($s1) /* 70F4 8002BCF4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 70F8 8002BCF8 ACA20000 */ sw $v0, 0x0($a1) /* 70FC 8002BCFC 24A20010 */ addiu $v0, $a1, 0x10 /* 7100 8002BD00 AE220000 */ sw $v0, 0x0($s1) /* 7104 8002BD04 3C028007 */ lui $v0, %hi(TheaterGfx) /* 7108 8002BD08 24426078 */ addiu $v0, $v0, %lo(TheaterGfx) /* 710C 8002BD0C ACB40008 */ sw $s4, 0x8($a1) /* 7110 8002BD10 ACA2000C */ sw $v0, 0xC($a1) /* 7114 8002BD14 C6620000 */ lwc1 $f2, 0x0($s3) /* 7118 8002BD18 24A20018 */ addiu $v0, $a1, 0x18 /* 711C 8002BD1C AE220000 */ sw $v0, 0x0($s1) /* 7120 8002BD20 24020040 */ addiu $v0, $zero, 0x40 /* 7124 8002BD24 46001082 */ mul.s $f2, $f2, $f0 /* 7128 8002BD28 00000000 */ nop /* 712C 8002BD2C ACA20014 */ sw $v0, 0x14($a1) /* 7130 8002BD30 24A20020 */ addiu $v0, $a1, 0x20 /* 7134 8002BD34 ACA40010 */ sw $a0, 0x10($a1) /* 7138 8002BD38 AE220000 */ sw $v0, 0x0($s1) /* 713C 8002BD3C 46020001 */ sub.s $f0, $f0, $f2 /* 7140 8002BD40 ACB50018 */ sw $s5, 0x18($a1) /* 7144 8002BD44 ACA0001C */ sw $zero, 0x1C($a1) /* 7148 8002BD48 4600018D */ trunc.w.s $f6, $f0 /* 714C 8002BD4C 44023000 */ mfc1 $v0, $f6 /* 7150 8002BD50 00000000 */ nop /* 7154 8002BD54 304200FF */ andi $v0, $v0, 0xFF /* 7158 8002BD58 00021E00 */ sll $v1, $v0, 24 /* 715C 8002BD5C 00022400 */ sll $a0, $v0, 16 /* 7160 8002BD60 00641825 */ or $v1, $v1, $a0 /* 7164 8002BD64 00021200 */ sll $v0, $v0, 8 /* 7168 8002BD68 00621825 */ or $v1, $v1, $v0 /* 716C 8002BD6C 346300FF */ ori $v1, $v1, 0xFF /* 7170 8002BD70 ACA30004 */ sw $v1, 0x4($a1) .L8002BD74: /* 7174 8002BD74 3C02800A */ lui $v0, %hi(gCurtainDrawCallback) /* 7178 8002BD78 8C42BAA0 */ lw $v0, %lo(gCurtainDrawCallback)($v0) /* 717C 8002BD7C 10400003 */ beqz $v0, .L8002BD8C /* 7180 8002BD80 00000000 */ nop /* 7184 8002BD84 0040F809 */ jalr $v0 /* 7188 8002BD88 00000000 */ nop .L8002BD8C: /* 718C 8002BD8C 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 7190 8002BD90 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 7194 8002BD94 8E020000 */ lw $v0, 0x0($s0) /* 7198 8002BD98 90420073 */ lbu $v0, 0x73($v0) /* 719C 8002BD9C 30420001 */ andi $v0, $v0, 0x1 /* 71A0 8002BDA0 14400044 */ bnez $v0, .L8002BEB4 /* 71A4 8002BDA4 00000000 */ nop /* 71A8 8002BDA8 0C00CD4A */ jal get_game_mode /* 71AC 8002BDAC 00000000 */ nop /* 71B0 8002BDB0 00021400 */ sll $v0, $v0, 16 /* 71B4 8002BDB4 00021403 */ sra $v0, $v0, 16 /* 71B8 8002BDB8 24030010 */ addiu $v1, $zero, 0x10 /* 71BC 8002BDBC 1043000C */ beq $v0, $v1, .L8002BDF0 /* 71C0 8002BDC0 00000000 */ nop /* 71C4 8002BDC4 0C00CD4A */ jal get_game_mode /* 71C8 8002BDC8 00000000 */ nop /* 71CC 8002BDCC 00021400 */ sll $v0, $v0, 16 /* 71D0 8002BDD0 00021403 */ sra $v0, $v0, 16 /* 71D4 8002BDD4 24030002 */ addiu $v1, $zero, 0x2 /* 71D8 8002BDD8 10430005 */ beq $v0, $v1, .L8002BDF0 /* 71DC 8002BDDC 00000000 */ nop /* 71E0 8002BDE0 8E020000 */ lw $v0, 0x0($s0) /* 71E4 8002BDE4 80420071 */ lb $v0, 0x71($v0) /* 71E8 8002BDE8 10400032 */ beqz $v0, .L8002BEB4 /* 71EC 8002BDEC 00000000 */ nop .L8002BDF0: /* 71F0 8002BDF0 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 71F4 8002BDF4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 71F8 8002BDF8 94430134 */ lhu $v1, 0x134($v0) /* 71FC 8002BDFC 3C02AAAA */ lui $v0, (0xAAAAAAAB >> 16) /* 7200 8002BE00 3442AAAB */ ori $v0, $v0, (0xAAAAAAAB & 0xFFFF) /* 7204 8002BE04 00620019 */ multu $v1, $v0 /* 7208 8002BE08 00004810 */ mfhi $t1 /* 720C 8002BE0C 00092102 */ srl $a0, $t1, 4 /* 7210 8002BE10 00041040 */ sll $v0, $a0, 1 /* 7214 8002BE14 00441021 */ addu $v0, $v0, $a0 /* 7218 8002BE18 000210C0 */ sll $v0, $v0, 3 /* 721C 8002BE1C 00621823 */ subu $v1, $v1, $v0 /* 7220 8002BE20 3063FFFF */ andi $v1, $v1, 0xFFFF /* 7224 8002BE24 00034140 */ sll $t0, $v1, 5 /* 7228 8002BE28 29020100 */ slti $v0, $t0, 0x100 /* 722C 8002BE2C 50400001 */ beql $v0, $zero, .L8002BE34 /* 7230 8002BE30 240800FF */ addiu $t0, $zero, 0xFF .L8002BE34: /* 7234 8002BE34 3C07FF20 */ lui $a3, (0xFF201000 >> 16) /* 7238 8002BE38 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 723C 8002BE3C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 7240 8002BE40 34E71000 */ ori $a3, $a3, (0xFF201000 & 0xFFFF) /* 7244 8002BE44 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 7248 8002BE48 8C830000 */ lw $v1, 0x0($a0) /* 724C 8002BE4C 3C028007 */ lui $v0, %hi(TheaterInitGfx) /* 7250 8002BE50 244260C0 */ addiu $v0, $v0, %lo(TheaterInitGfx) /* 7254 8002BE54 0060282D */ daddu $a1, $v1, $zero /* 7258 8002BE58 24630008 */ addiu $v1, $v1, 0x8 /* 725C 8002BE5C AC830000 */ sw $v1, 0x0($a0) /* 7260 8002BE60 ACA20004 */ sw $v0, 0x4($a1) /* 7264 8002BE64 24620008 */ addiu $v0, $v1, 0x8 /* 7268 8002BE68 ACA60000 */ sw $a2, 0x0($a1) /* 726C 8002BE6C AC820000 */ sw $v0, 0x0($a0) /* 7270 8002BE70 3C028007 */ lui $v0, %hi(NoControllerSetupTexGfx) /* 7274 8002BE74 24427140 */ addiu $v0, $v0, %lo(NoControllerSetupTexGfx) /* 7278 8002BE78 AC620004 */ sw $v0, 0x4($v1) /* 727C 8002BE7C 24620010 */ addiu $v0, $v1, 0x10 /* 7280 8002BE80 AC660000 */ sw $a2, 0x0($v1) /* 7284 8002BE84 AC820000 */ sw $v0, 0x0($a0) /* 7288 8002BE88 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 728C 8002BE8C AC620008 */ sw $v0, 0x8($v1) /* 7290 8002BE90 310200FF */ andi $v0, $t0, 0xFF /* 7294 8002BE94 00471025 */ or $v0, $v0, $a3 /* 7298 8002BE98 AC62000C */ sw $v0, 0xC($v1) /* 729C 8002BE9C 24620018 */ addiu $v0, $v1, 0x18 /* 72A0 8002BEA0 AC820000 */ sw $v0, 0x0($a0) /* 72A4 8002BEA4 3C028007 */ lui $v0, %hi(NoControllerGfx) /* 72A8 8002BEA8 244271E8 */ addiu $v0, $v0, %lo(NoControllerGfx) /* 72AC 8002BEAC AC660010 */ sw $a2, 0x10($v1) /* 72B0 8002BEB0 AC620014 */ sw $v0, 0x14($v1) .L8002BEB4: /* 72B4 8002BEB4 8FBF0078 */ lw $ra, 0x78($sp) /* 72B8 8002BEB8 8FB50074 */ lw $s5, 0x74($sp) /* 72BC 8002BEBC 8FB40070 */ lw $s4, 0x70($sp) /* 72C0 8002BEC0 8FB3006C */ lw $s3, 0x6C($sp) /* 72C4 8002BEC4 8FB20068 */ lw $s2, 0x68($sp) /* 72C8 8002BEC8 8FB10064 */ lw $s1, 0x64($sp) /* 72CC 8002BECC 8FB00060 */ lw $s0, 0x60($sp) /* 72D0 8002BED0 D7B40080 */ ldc1 $f20, 0x80($sp) /* 72D4 8002BED4 03E00008 */ jr $ra /* 72D8 8002BED8 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: void render_curtains(void) { if (gCurtainScaleGoal != gCurtainScale) { gCurtainScale += (gCurtainScaleGoal - gCurtainScale) * 0.1; } if (gCurtainFadeGoal != gCurtainFade) { gCurtainFade += (gCurtainFadeGoal - gCurtainFade) * 0.03; } if (gCurtainScale < 1.9) { Matrix4f m; f32 scale; s8 rgb; gDPPipeSync(gMainGfxPos++); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gSPDisplayList(gMainGfxPos++, &TheaterInitGfx); guFrustumF(m, -80.0f, 80.0f, -60.0f, 60.0f, 160.0f, 640.0f, 1.0f); guMtxF2L(m, &D_8009BAA8[0]); gSPMatrix(gMainGfxPos++, &D_8009BAA8[0], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); scale = gCurtainScale - 0.01; if (scale < 1.0f) { scale = 1.0f; } guPositionF(m, 0.0f, 0.0f, 0.0f, scale * 0.1, 0.0f, 0.0f, -320.0f); guMtxF2L(m, &D_8009BAA8[1]); gSPMatrix(gMainGfxPos++, &D_8009BAA8[1], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); rgb = 255.0f - (gCurtainFade * 255.0f); gDPSetPrimColor(gMainGfxPos++, 0, 0, rgb, rgb, rgb, 255); gSPDisplayList(gMainGfxPos++, &TheaterGfx); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); } if (gCurtainDrawCallback != NULL) { gCurtainDrawCallback(); } if (!(gGameStatusPtr->contBitPattern & 1)) { if ((get_game_mode() == GAME_MODE_INTRO) || (get_game_mode() == GAME_MODE_TITLE_SCREEN) || (gGameStatusPtr->demoState != DEMO_STATE_NONE)) { s32 alpha = ((gGameStatusPtr->frameCounter) % 0x18) << 5; if (alpha > 255) { alpha = 255; } gSPDisplayList(gMainGfxPos++, &TheaterInitGfx); gSPDisplayList(gMainGfxPos++, &NoControllerSetupTexGfx); gDPSetPrimColor(gMainGfxPos++, 0, 0, 0xFF, 0x20, 0x10, alpha); gSPDisplayList(gMainGfxPos++, &NoControllerGfx); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel big_smoke_puff_appendGfx /* 327BF0 E0002300 27BDFF68 */ addiu $sp, $sp, -0x98 /* 327BF4 E0002304 3C08DB06 */ lui $t0, (0xDB060024 >> 16) /* 327BF8 E0002308 35080024 */ ori $t0, $t0, (0xDB060024 & 0xFFFF) /* 327BFC E000230C AFB50074 */ sw $s5, 0x74($sp) /* 327C00 E0002310 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 327C04 E0002314 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 327C08 E0002318 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 327C0C E000231C AFBF0084 */ sw $ra, 0x84($sp) /* 327C10 E0002320 AFBE0080 */ sw $fp, 0x80($sp) /* 327C14 E0002324 AFB7007C */ sw $s7, 0x7C($sp) /* 327C18 E0002328 AFB60078 */ sw $s6, 0x78($sp) /* 327C1C E000232C AFB40070 */ sw $s4, 0x70($sp) /* 327C20 E0002330 AFB3006C */ sw $s3, 0x6C($sp) /* 327C24 E0002334 AFB20068 */ sw $s2, 0x68($sp) /* 327C28 E0002338 AFB10064 */ sw $s1, 0x64($sp) /* 327C2C E000233C AFB00060 */ sw $s0, 0x60($sp) /* 327C30 E0002340 F7B60090 */ sdc1 $f22, 0x90($sp) /* 327C34 E0002344 F7B40088 */ sdc1 $f20, 0x88($sp) /* 327C38 E0002348 AFA40098 */ sw $a0, 0x98($sp) /* 327C3C E000234C 8EA60000 */ lw $a2, 0x0($s5) /* 327C40 E0002350 8FA90098 */ lw $t1, 0x98($sp) /* 327C44 E0002354 4480A000 */ mtc1 $zero, $f20 /* 327C48 E0002358 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 327C4C E000235C 44810000 */ mtc1 $at, $f0 /* 327C50 E0002360 00C0182D */ daddu $v1, $a2, $zero /* 327C54 E0002364 8D34000C */ lw $s4, 0xC($t1) /* 327C58 E0002368 24C60008 */ addiu $a2, $a2, 0x8 /* 327C5C E000236C AC620000 */ sw $v0, 0x0($v1) /* 327C60 E0002370 AC600004 */ sw $zero, 0x4($v1) /* 327C64 E0002374 ACC80000 */ sw $t0, 0x0($a2) /* 327C68 E0002378 3C088000 */ lui $t0, (0x80000000 >> 16) /* 327C6C E000237C 4405A000 */ mfc1 $a1, $f20 /* 327C70 E0002380 8D220010 */ lw $v0, 0x10($t1) /* 327C74 E0002384 4407A000 */ mfc1 $a3, $f20 /* 327C78 E0002388 8C42001C */ lw $v0, 0x1C($v0) /* 327C7C E000238C 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 327C80 E0002390 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 327C84 E0002394 00481021 */ addu $v0, $v0, $t0 /* 327C88 E0002398 ACC20004 */ sw $v0, 0x4($a2) /* 327C8C E000239C 00031080 */ sll $v0, $v1, 2 /* 327C90 E00023A0 00431021 */ addu $v0, $v0, $v1 /* 327C94 E00023A4 00021080 */ sll $v0, $v0, 2 /* 327C98 E00023A8 00431023 */ subu $v0, $v0, $v1 /* 327C9C E00023AC 000218C0 */ sll $v1, $v0, 3 /* 327CA0 E00023B0 00431021 */ addu $v0, $v0, $v1 /* 327CA4 E00023B4 000210C0 */ sll $v0, $v0, 3 /* 327CA8 E00023B8 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 327CAC E00023BC 00220821 */ addu $at, $at, $v0 /* 327CB0 E00023C0 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 327CB4 E00023C4 E7A00010 */ swc1 $f0, 0x10($sp) /* 327CB8 E00023C8 C680000C */ lwc1 $f0, 0xC($s4) /* 327CBC E00023CC 27A40020 */ addiu $a0, $sp, 0x20 /* 327CC0 E00023D0 AEA60000 */ sw $a2, 0x0($s5) /* 327CC4 E00023D4 24C60008 */ addiu $a2, $a2, 0x8 /* 327CC8 E00023D8 E7A00014 */ swc1 $f0, 0x14($sp) /* 327CCC E00023DC C6800010 */ lwc1 $f0, 0x10($s4) /* 327CD0 E00023E0 46001087 */ neg.s $f2, $f2 /* 327CD4 E00023E4 AEA60000 */ sw $a2, 0x0($s5) /* 327CD8 E00023E8 44061000 */ mfc1 $a2, $f2 /* 327CDC E00023EC 3C100001 */ lui $s0, (0x11630 >> 16) /* 327CE0 E00023F0 E7A00018 */ swc1 $f0, 0x18($sp) /* 327CE4 E00023F4 C6800014 */ lwc1 $f0, 0x14($s4) /* 327CE8 E00023F8 36101630 */ ori $s0, $s0, (0x11630 & 0xFFFF) /* 327CEC E00023FC 0C080180 */ jal shim_guPositionF /* 327CF0 E0002400 E7A0001C */ swc1 $f0, 0x1C($sp) /* 327CF4 E0002404 27A40020 */ addiu $a0, $sp, 0x20 /* 327CF8 E0002408 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 327CFC E000240C 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 327D00 E0002410 3C13800A */ lui $s3, %hi(gDisplayContext) /* 327D04 E0002414 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 327D08 E0002418 96250000 */ lhu $a1, 0x0($s1) /* 327D0C E000241C 8E620000 */ lw $v0, 0x0($s3) /* 327D10 E0002420 00052980 */ sll $a1, $a1, 6 /* 327D14 E0002424 00B02821 */ addu $a1, $a1, $s0 /* 327D18 E0002428 0C080118 */ jal shim_guMtxF2L /* 327D1C E000242C 00452821 */ addu $a1, $v0, $a1 /* 327D20 E0002430 8EA20000 */ lw $v0, 0x0($s5) /* 327D24 E0002434 0040282D */ daddu $a1, $v0, $zero /* 327D28 E0002438 24420008 */ addiu $v0, $v0, 0x8 /* 327D2C E000243C AEA20000 */ sw $v0, 0x0($s5) /* 327D30 E0002440 96240000 */ lhu $a0, 0x0($s1) /* 327D34 E0002444 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 327D38 E0002448 ACA20000 */ sw $v0, 0x0($a1) /* 327D3C E000244C 8E630000 */ lw $v1, 0x0($s3) /* 327D40 E0002450 3082FFFF */ andi $v0, $a0, 0xFFFF /* 327D44 E0002454 00021180 */ sll $v0, $v0, 6 /* 327D48 E0002458 00501021 */ addu $v0, $v0, $s0 /* 327D4C E000245C 00621821 */ addu $v1, $v1, $v0 /* 327D50 E0002460 ACA30004 */ sw $v1, 0x4($a1) /* 327D54 E0002464 8FA90098 */ lw $t1, 0x98($sp) /* 327D58 E0002468 0000902D */ daddu $s2, $zero, $zero /* 327D5C E000246C 8D220008 */ lw $v0, 0x8($t1) /* 327D60 E0002470 24840001 */ addiu $a0, $a0, 0x1 /* 327D64 E0002474 18400092 */ blez $v0, .LE00026C0 /* 327D68 E0002478 A6240000 */ sh $a0, 0x0($s1) /* 327D6C E000247C 4600A586 */ mov.s $f22, $f20 /* 327D70 E0002480 0260F02D */ daddu $fp, $s3, $zero /* 327D74 E0002484 0220B82D */ daddu $s7, $s1, $zero /* 327D78 E0002488 3C160001 */ lui $s6, (0x11630 >> 16) /* 327D7C E000248C 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 327D80 E0002490 02A0982D */ daddu $s3, $s5, $zero /* 327D84 E0002494 3C15E000 */ lui $s5, %hi(D_E0002800) /* 327D88 E0002498 26B52800 */ addiu $s5, $s5, %lo(D_E0002800) /* 327D8C E000249C 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 327D90 E00024A0 4481A000 */ mtc1 $at, $f20 /* 327D94 E00024A4 26900004 */ addiu $s0, $s4, 0x4 .LE00024A8: /* 327D98 E00024A8 8603FFFE */ lh $v1, -0x2($s0) /* 327D9C E00024AC 0462007E */ bltzl $v1, .LE00026A8 /* 327DA0 E00024B0 26520001 */ addiu $s2, $s2, 0x1 /* 327DA4 E00024B4 8E020004 */ lw $v0, 0x4($s0) /* 327DA8 E00024B8 0443007B */ bgezl $v0, .LE00026A8 /* 327DAC E00024BC 26520001 */ addiu $s2, $s2, 0x1 /* 327DB0 E00024C0 0060882D */ daddu $s1, $v1, $zero /* 327DB4 E00024C4 2A220011 */ slti $v0, $s1, 0x11 /* 327DB8 E00024C8 50400001 */ beql $v0, $zero, .LE00024D0 /* 327DBC E00024CC 24110010 */ addiu $s1, $zero, 0x10 .LE00024D0: /* 327DC0 E00024D0 00121080 */ sll $v0, $s2, 2 /* 327DC4 E00024D4 3C01E000 */ lui $at, (0xE00027B0 >> 16) /* 327DC8 E00024D8 00220821 */ addu $at, $at, $v0 /* 327DCC E00024DC C42027B0 */ lwc1 $f0, (0xE00027B0 & 0xFFFF)($at) /* 327DD0 E00024E0 4405B000 */ mfc1 $a1, $f22 /* 327DD4 E00024E4 4406B000 */ mfc1 $a2, $f22 /* 327DD8 E00024E8 E7A00010 */ swc1 $f0, 0x10($sp) /* 327DDC E00024EC C6000014 */ lwc1 $f0, 0x14($s0) /* 327DE0 E00024F0 E7A00014 */ swc1 $f0, 0x14($sp) /* 327DE4 E00024F4 C6000018 */ lwc1 $f0, 0x18($s0) /* 327DE8 E00024F8 E7B6001C */ swc1 $f22, 0x1C($sp) /* 327DEC E00024FC E7A00018 */ swc1 $f0, 0x18($sp) /* 327DF0 E0002500 3C07E000 */ lui $a3, (0xE00027D8 >> 16) /* 327DF4 E0002504 00E23821 */ addu $a3, $a3, $v0 /* 327DF8 E0002508 8CE727D8 */ lw $a3, (0xE00027D8 & 0xFFFF)($a3) /* 327DFC E000250C 0C080180 */ jal shim_guPositionF /* 327E00 E0002510 27A40020 */ addiu $a0, $sp, 0x20 /* 327E04 E0002514 27A40020 */ addiu $a0, $sp, 0x20 /* 327E08 E0002518 96E50000 */ lhu $a1, 0x0($s7) /* 327E0C E000251C 8FC20000 */ lw $v0, 0x0($fp) /* 327E10 E0002520 00052980 */ sll $a1, $a1, 6 /* 327E14 E0002524 00B62821 */ addu $a1, $a1, $s6 /* 327E18 E0002528 0C080118 */ jal shim_guMtxF2L /* 327E1C E000252C 00452821 */ addu $a1, $v0, $a1 /* 327E20 E0002530 8E620000 */ lw $v0, 0x0($s3) /* 327E24 E0002534 0040282D */ daddu $a1, $v0, $zero /* 327E28 E0002538 24420008 */ addiu $v0, $v0, 0x8 /* 327E2C E000253C AE620000 */ sw $v0, 0x0($s3) /* 327E30 E0002540 96E40000 */ lhu $a0, 0x0($s7) /* 327E34 E0002544 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 327E38 E0002548 ACA20000 */ sw $v0, 0x0($a1) /* 327E3C E000254C 8FC30000 */ lw $v1, 0x0($fp) /* 327E40 E0002550 3082FFFF */ andi $v0, $a0, 0xFFFF /* 327E44 E0002554 00021180 */ sll $v0, $v0, 6 /* 327E48 E0002558 00561021 */ addu $v0, $v0, $s6 /* 327E4C E000255C 00621821 */ addu $v1, $v1, $v0 /* 327E50 E0002560 ACA30004 */ sw $v1, 0x4($a1) /* 327E54 E0002564 86820000 */ lh $v0, 0x0($s4) /* 327E58 E0002568 24840001 */ addiu $a0, $a0, 0x1 /* 327E5C E000256C A6E40000 */ sh $a0, 0x0($s7) /* 327E60 E0002570 86030000 */ lh $v1, 0x0($s0) /* 327E64 E0002574 2442FFFF */ addiu $v0, $v0, -0x1 /* 327E68 E0002578 44826000 */ mtc1 $v0, $f12 /* 327E6C E000257C 00000000 */ nop /* 327E70 E0002580 46806320 */ cvt.s.w $f12, $f12 /* 327E74 E0002584 44831000 */ mtc1 $v1, $f2 /* 327E78 E0002588 00000000 */ nop /* 327E7C E000258C 468010A0 */ cvt.s.w $f2, $f2 /* 327E80 E0002590 460C103E */ c.le.s $f2, $f12 /* 327E84 E0002594 00000000 */ nop /* 327E88 E0002598 45000004 */ bc1f .LE00025AC /* 327E8C E000259C 240700FF */ addiu $a3, $zero, 0xFF /* 327E90 E00025A0 8EA80018 */ lw $t0, 0x18($s5) /* 327E94 E00025A4 0800098B */ j .LE000262C /* 327E98 E00025A8 3C06D838 */ lui $a2, (0xD8380002 >> 16) .LE00025AC: /* 327E9C E00025AC 46146302 */ mul.s $f12, $f12, $f20 /* 327EA0 E00025B0 00000000 */ nop /* 327EA4 E00025B4 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 327EA8 E00025B8 44810000 */ mtc1 $at, $f0 /* 327EAC E00025BC 46026303 */ div.s $f12, $f12, $f2 /* 327EB0 E00025C0 46006302 */ mul.s $f12, $f12, $f0 /* 327EB4 E00025C4 00000000 */ nop /* 327EB8 E00025C8 0C080140 */ jal shim_sin_deg /* 327EBC E00025CC 46146303 */ div.s $f12, $f12, $f20 /* 327EC0 E00025D0 46140082 */ mul.s $f2, $f0, $f20 /* 327EC4 E00025D4 00000000 */ nop /* 327EC8 E00025D8 3C01437F */ lui $at, (0x437F0000 >> 16) /* 327ECC E00025DC 44810000 */ mtc1 $at, $f0 /* 327ED0 E00025E0 00000000 */ nop /* 327ED4 E00025E4 46001002 */ mul.s $f0, $f2, $f0 /* 327ED8 E00025E8 00000000 */ nop /* 327EDC E00025EC 4600010D */ trunc.w.s $f4, $f0 /* 327EE0 E00025F0 44032000 */ mfc1 $v1, $f4 /* 327EE4 E00025F4 00000000 */ nop /* 327EE8 E00025F8 04610002 */ bgez $v1, .LE0002604 /* 327EEC E00025FC 0060102D */ daddu $v0, $v1, $zero /* 327EF0 E0002600 246200FF */ addiu $v0, $v1, 0xFF .LE0002604: /* 327EF4 E0002604 00023A03 */ sra $a3, $v0, 8 /* 327EF8 E0002608 00071200 */ sll $v0, $a3, 8 /* 327EFC E000260C 00623823 */ subu $a3, $v1, $v0 /* 327F00 E0002610 4600110D */ trunc.w.s $f4, $f2 /* 327F04 E0002614 44022000 */ mfc1 $v0, $f4 /* 327F08 E0002618 00000000 */ nop /* 327F0C E000261C 00021080 */ sll $v0, $v0, 2 /* 327F10 E0002620 00551021 */ addu $v0, $v0, $s5 /* 327F14 E0002624 8C480000 */ lw $t0, 0x0($v0) /* 327F18 E0002628 3C06D838 */ lui $a2, (0xD8380002 >> 16) .LE000262C: /* 327F1C E000262C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 327F20 E0002630 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 327F24 E0002634 001118C0 */ sll $v1, $s1, 3 /* 327F28 E0002638 8E640000 */ lw $a0, 0x0($s3) /* 327F2C E000263C 00711823 */ subu $v1, $v1, $s1 /* 327F30 E0002640 0080282D */ daddu $a1, $a0, $zero /* 327F34 E0002644 24840008 */ addiu $a0, $a0, 0x8 /* 327F38 E0002648 AE640000 */ sw $a0, 0x0($s3) /* 327F3C E000264C ACA20000 */ sw $v0, 0x0($a1) /* 327F40 E0002650 00031100 */ sll $v0, $v1, 4 /* 327F44 E0002654 00431023 */ subu $v0, $v0, $v1 /* 327F48 E0002658 000210C2 */ srl $v0, $v0, 3 /* 327F4C E000265C 304200FF */ andi $v0, $v0, 0xFF /* 327F50 E0002660 ACA20004 */ sw $v0, 0x4($a1) /* 327F54 E0002664 24820008 */ addiu $v0, $a0, 0x8 /* 327F58 E0002668 AE620000 */ sw $v0, 0x0($s3) /* 327F5C E000266C 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 327F60 E0002670 AC820000 */ sw $v0, 0x0($a0) /* 327F64 E0002674 30E200FF */ andi $v0, $a3, 0xFF /* 327F68 E0002678 AC820004 */ sw $v0, 0x4($a0) /* 327F6C E000267C 24820010 */ addiu $v0, $a0, 0x10 /* 327F70 E0002680 AE620000 */ sw $v0, 0x0($s3) /* 327F74 E0002684 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 327F78 E0002688 AC820008 */ sw $v0, 0x8($a0) /* 327F7C E000268C 24820018 */ addiu $v0, $a0, 0x18 /* 327F80 E0002690 AC88000C */ sw $t0, 0xC($a0) /* 327F84 E0002694 AE620000 */ sw $v0, 0x0($s3) /* 327F88 E0002698 24020040 */ addiu $v0, $zero, 0x40 /* 327F8C E000269C AC860010 */ sw $a2, 0x10($a0) /* 327F90 E00026A0 AC820014 */ sw $v0, 0x14($a0) /* 327F94 E00026A4 26520001 */ addiu $s2, $s2, 0x1 .LE00026A8: /* 327F98 E00026A8 8FA90098 */ lw $t1, 0x98($sp) /* 327F9C E00026AC 2610002C */ addiu $s0, $s0, 0x2C /* 327FA0 E00026B0 8D220008 */ lw $v0, 0x8($t1) /* 327FA4 E00026B4 0242102A */ slt $v0, $s2, $v0 /* 327FA8 E00026B8 1440FF7B */ bnez $v0, .LE00024A8 /* 327FAC E00026BC 2694002C */ addiu $s4, $s4, 0x2C .LE00026C0: /* 327FB0 E00026C0 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 327FB4 E00026C4 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 327FB8 E00026C8 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 327FBC E00026CC 8C820000 */ lw $v0, 0x0($a0) /* 327FC0 E00026D0 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 327FC4 E00026D4 0040282D */ daddu $a1, $v0, $zero /* 327FC8 E00026D8 24420008 */ addiu $v0, $v0, 0x8 /* 327FCC E00026DC AC820000 */ sw $v0, 0x0($a0) /* 327FD0 E00026E0 ACA30000 */ sw $v1, 0x0($a1) /* 327FD4 E00026E4 24030040 */ addiu $v1, $zero, 0x40 /* 327FD8 E00026E8 ACA30004 */ sw $v1, 0x4($a1) /* 327FDC E00026EC 24430008 */ addiu $v1, $v0, 0x8 /* 327FE0 E00026F0 AC830000 */ sw $v1, 0x0($a0) /* 327FE4 E00026F4 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 327FE8 E00026F8 AC430000 */ sw $v1, 0x0($v0) /* 327FEC E00026FC AC400004 */ sw $zero, 0x4($v0) /* 327FF0 E0002700 8FBF0084 */ lw $ra, 0x84($sp) /* 327FF4 E0002704 8FBE0080 */ lw $fp, 0x80($sp) /* 327FF8 E0002708 8FB7007C */ lw $s7, 0x7C($sp) /* 327FFC E000270C 8FB60078 */ lw $s6, 0x78($sp) /* 328000 E0002710 8FB50074 */ lw $s5, 0x74($sp) /* 328004 E0002714 8FB40070 */ lw $s4, 0x70($sp) /* 328008 E0002718 8FB3006C */ lw $s3, 0x6C($sp) /* 32800C E000271C 8FB20068 */ lw $s2, 0x68($sp) /* 328010 E0002720 8FB10064 */ lw $s1, 0x64($sp) /* 328014 E0002724 8FB00060 */ lw $s0, 0x60($sp) /* 328018 E0002728 D7B60090 */ ldc1 $f22, 0x90($sp) /* 32801C E000272C D7B40088 */ ldc1 $f20, 0x88($sp) /* 328020 E0002730 03E00008 */ jr $ra /* 328024 E0002734 27BD0098 */ addiu $sp, $sp, 0x98 ### DECOMPILED C INSTRUCTIONS: void big_smoke_puff_appendGfx(void* effect) { EffectInstance* eff = (EffectInstance*)effect; BigSmokePuffFXData* data = ((EffectInstance*)effect)->data.bigSmokePuff; Matrix4f mtx; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guPositionF(mtx, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, data->x, data->y, data->z); shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, data++) { if (data->unk_02 >= 0 && data->unk_08 < 0) { s32 primAlpha = data->unk_02; f32 temp_f12; s32 envAlpha; Gfx* dlist; if (primAlpha > 16) { primAlpha = 16; } shim_guPositionF(mtx, 0.0f, 0.0f, sPartYaws[i], sPartScales[i], data->partX, data->partY, 0.0f); shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); temp_f12 = data->unk_00 - 1; if (data->unk_04 <= temp_f12) { envAlpha = 255; dlist = sDlists[ARRAY_COUNT(sDlists) - 1]; } else { f32 temp = shim_sin_deg((((temp_f12 * 7.0f) / data->unk_04) * 90.0f) / 7.0f) * 7.0f; envAlpha = (s32)(temp * 255.0f) % 256; dlist = sDlists[(s32)temp]; } gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, (u32)(primAlpha * 105) / 8); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_unpause /* 1003C 80034C3C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 10040 80034C40 AFB00018 */ sw $s0, 0x18($sp) /* 10044 80034C44 3C10800A */ lui $s0, %hi(D_800A0921) /* 10048 80034C48 26100921 */ addiu $s0, $s0, %lo(D_800A0921) /* 1004C 80034C4C AFBF0024 */ sw $ra, 0x24($sp) /* 10050 80034C50 AFB20020 */ sw $s2, 0x20($sp) /* 10054 80034C54 AFB1001C */ sw $s1, 0x1C($sp) /* 10058 80034C58 82030000 */ lb $v1, 0x0($s0) /* 1005C 80034C5C 24020003 */ addiu $v0, $zero, 0x3 /* 10060 80034C60 106200B8 */ beq $v1, $v0, .L80034F44 /* 10064 80034C64 28620004 */ slti $v0, $v1, 0x4 /* 10068 80034C68 14400006 */ bnez $v0, .L80034C84 /* 1006C 80034C6C 28620002 */ slti $v0, $v1, 0x2 /* 10070 80034C70 24020004 */ addiu $v0, $zero, 0x4 /* 10074 80034C74 106200CA */ beq $v1, $v0, .L80034FA0 /* 10078 80034C78 00000000 */ nop /* 1007C 80034C7C 0800D3F6 */ j .L80034FD8 /* 10080 80034C80 00000000 */ nop .L80034C84: /* 10084 80034C84 104000D4 */ beqz $v0, .L80034FD8 /* 10088 80034C88 00000000 */ nop /* 1008C 80034C8C 046000D2 */ bltz $v1, .L80034FD8 /* 10090 80034C90 24020004 */ addiu $v0, $zero, 0x4 /* 10094 80034C94 3C06800A */ lui $a2, %hi(D_800A0920) /* 10098 80034C98 24C60920 */ addiu $a2, $a2, %lo(D_800A0920) /* 1009C 80034C9C 80C30000 */ lb $v1, 0x0($a2) /* 100A0 80034CA0 14620007 */ bne $v1, $v0, .L80034CC0 /* 100A4 80034CA4 00000000 */ nop /* 100A8 80034CA8 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 100AC 80034CAC 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 100B0 80034CB0 8C620000 */ lw $v0, 0x0($v1) /* 100B4 80034CB4 34420008 */ ori $v0, $v0, 0x8 /* 100B8 80034CB8 AC620000 */ sw $v0, 0x0($v1) /* 100BC 80034CBC 80C30000 */ lb $v1, 0x0($a2) .L80034CC0: /* 100C0 80034CC0 046000C5 */ bltz $v1, .L80034FD8 /* 100C4 80034CC4 90C20000 */ lbu $v0, 0x0($a2) /* 100C8 80034CC8 10600005 */ beqz $v1, .L80034CE0 /* 100CC 80034CCC 2442FFFF */ addiu $v0, $v0, -0x1 /* 100D0 80034CD0 A0C20000 */ sb $v0, 0x0($a2) /* 100D4 80034CD4 00021600 */ sll $v0, $v0, 24 /* 100D8 80034CD8 144000BF */ bnez $v0, .L80034FD8 /* 100DC 80034CDC 00000000 */ nop .L80034CE0: /* 100E0 80034CE0 3C048007 */ lui $a0, %hi(pause_frameBuffers) /* 100E4 80034CE4 24847950 */ addiu $a0, $a0, %lo(pause_frameBuffers) /* 100E8 80034CE8 24050003 */ addiu $a1, $zero, 0x3 /* 100EC 80034CEC 2402FFFF */ addiu $v0, $zero, -0x1 /* 100F0 80034CF0 0C017CBC */ jal nuGfxSetCfb /* 100F4 80034CF4 A0C20000 */ sb $v0, 0x0($a2) /* 100F8 80034CF8 0C0911C2 */ jal func_80244708 /* 100FC 80034CFC 00000000 */ nop /* 10100 80034D00 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 10104 80034D04 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 10108 80034D08 8C820000 */ lw $v0, 0x0($a0) /* 1010C 80034D0C 2403FFF7 */ addiu $v1, $zero, -0x9 /* 10110 80034D10 00431024 */ and $v0, $v0, $v1 /* 10114 80034D14 0C016AFA */ jal get_current_map_settings /* 10118 80034D18 AC820000 */ sw $v0, 0x0($a0) /* 1011C 80034D1C 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 10120 80034D20 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 10124 80034D24 8E040000 */ lw $a0, 0x0($s0) /* 10128 80034D28 84830086 */ lh $v1, 0x86($a0) /* 1012C 80034D2C 00031900 */ sll $v1, $v1, 4 /* 10130 80034D30 3C068009 */ lui $a2, %hi(gAreas + 0x4) /* 10134 80034D34 00C33021 */ addu $a2, $a2, $v1 /* 10138 80034D38 8CC634F4 */ lw $a2, %lo(gAreas + 0x4)($a2) /* 1013C 80034D3C 0040902D */ daddu $s2, $v0, $zero /* 10140 80034D40 A0800070 */ sb $zero, 0x70($a0) /* 10144 80034D44 8484008C */ lh $a0, 0x8C($a0) /* 10148 80034D48 8E050000 */ lw $a1, 0x0($s0) /* 1014C 80034D4C 00042140 */ sll $a0, $a0, 5 /* 10150 80034D50 94A30148 */ lhu $v1, 0x148($a1) /* 10154 80034D54 00C48821 */ addu $s1, $a2, $a0 /* 10158 80034D58 3063FF0F */ andi $v1, $v1, 0xFF0F /* 1015C 80034D5C 0C016BE1 */ jal func_8005AF84 /* 10160 80034D60 A4A30148 */ sh $v1, 0x148($a1) /* 10164 80034D64 0C00AB37 */ jal func_8002ACDC /* 10168 80034D68 00000000 */ nop /* 1016C 80034D6C 0C018030 */ jal nuContRmbForceStopEnd /* 10170 80034D70 00000000 */ nop /* 10174 80034D74 0C05259C */ jal sfx_clear_env_sounds /* 10178 80034D78 24040001 */ addiu $a0, $zero, 0x1 /* 1017C 80034D7C 8E020000 */ lw $v0, 0x0($s0) /* 10180 80034D80 0C0B763E */ jal spr_init_sprites /* 10184 80034D84 80440084 */ lb $a0, 0x84($v0) /* 10188 80034D88 0C0457FA */ jal init_model_data /* 1018C 80034D8C 00000000 */ nop /* 10190 80034D90 0C05203C */ jal init_sprite_shading_data /* 10194 80034D94 00000000 */ nop /* 10198 80034D98 0C048316 */ jal init_entity_models /* 1019C 80034D9C 00000000 */ nop /* 101A0 80034DA0 0C0478C4 */ jal reset_animator_list /* 101A4 80034DA4 00000000 */ nop /* 101A8 80034DA8 0C048C45 */ jal init_worker_list /* 101AC 80034DAC 00000000 */ nop /* 101B0 80034DB0 0000202D */ daddu $a0, $zero, $zero /* 101B4 80034DB4 0C0514BA */ jal hud_element_set_aux_cache /* 101B8 80034DB8 0080282D */ daddu $a1, $a0, $zero /* 101BC 80034DBC 0C0504C0 */ jal init_hud_element_list /* 101C0 80034DC0 00000000 */ nop /* 101C4 80034DC4 0C04C433 */ jal init_item_entity_list /* 101C8 80034DC8 00000000 */ nop /* 101CC 80034DCC 0C0B0CBB */ jal init_script_list /* 101D0 80034DD0 00000000 */ nop /* 101D4 80034DD4 0C00E14B */ jal init_npc_list /* 101D8 80034DD8 00000000 */ nop /* 101DC 80034DDC 0C044396 */ jal init_entity_data /* 101E0 80034DE0 00000000 */ nop /* 101E4 80034DE4 0C0515CA */ jal init_trigger_list /* 101E8 80034DE8 00000000 */ nop /* 101EC 80034DEC 3C04800A */ lui $a0, %hi(SavedReverbMode) /* 101F0 80034DF0 8C840924 */ lw $a0, %lo(SavedReverbMode)($a0) /* 101F4 80034DF4 0C0525FF */ jal sfx_set_reverb_mode /* 101F8 80034DF8 00000000 */ nop /* 101FC 80034DFC 0C052B1C */ jal bgm_reset_max_volume /* 10200 80034E00 00000000 */ nop /* 10204 80034E04 0C0169B0 */ jal load_map_script_lib /* 10208 80034E08 00000000 */ nop /* 1020C 80034E0C 3C04800E */ lui $a0, %hi(wMapShapeName) /* 10210 80034E10 24849230 */ addiu $a0, $a0, %lo(wMapShapeName) /* 10214 80034E14 0C016B3A */ jal load_asset_by_name /* 10218 80034E18 27A50010 */ addiu $a1, $sp, 0x10 /* 1021C 80034E1C 0040802D */ daddu $s0, $v0, $zero /* 10220 80034E20 3C058021 */ lui $a1, %hi(gMapShapeData) /* 10224 80034E24 24A50000 */ addiu $a1, $a1, %lo(gMapShapeData) /* 10228 80034E28 0C01BB7C */ jal decode_yay0 /* 1022C 80034E2C 0200202D */ daddu $a0, $s0, $zero /* 10230 80034E30 0C00AB1E */ jal general_heap_free /* 10234 80034E34 0200202D */ daddu $a0, $s0, $zero /* 10238 80034E38 0C016BE5 */ jal initialize_collision /* 1023C 80034E3C 00000000 */ nop /* 10240 80034E40 0C016C16 */ jal restore_map_collision_data /* 10244 80034E44 00000000 */ nop /* 10248 80034E48 8E240008 */ lw $a0, 0x8($s1) /* 1024C 80034E4C 10800004 */ beqz $a0, .L80034E60 /* 10250 80034E50 00000000 */ nop /* 10254 80034E54 8E25000C */ lw $a1, 0xC($s1) /* 10258 80034E58 0C00A5CF */ jal dma_copy /* 1025C 80034E5C 8E260010 */ lw $a2, 0x10($s1) .L80034E60: /* 10260 80034E60 0C05175C */ jal load_map_bg /* 10264 80034E64 8E240014 */ lw $a0, 0x14($s1) /* 10268 80034E68 8E440038 */ lw $a0, 0x38($s2) /* 1026C 80034E6C 50800005 */ beql $a0, $zero, .L80034E84 /* 10270 80034E70 24040128 */ addiu $a0, $zero, 0x128 /* 10274 80034E74 0C05178A */ jal read_background_size /* 10278 80034E78 00000000 */ nop /* 1027C 80034E7C 0800D3A5 */ j .L80034E94 /* 10280 80034E80 00000000 */ nop .L80034E84: /* 10284 80034E84 240500C8 */ addiu $a1, $zero, 0xC8 /* 10288 80034E88 2406000C */ addiu $a2, $zero, 0xC /* 1028C 80034E8C 0C05179C */ jal set_background_size /* 10290 80034E90 24070014 */ addiu $a3, $zero, 0x14 .L80034E94: /* 10294 80034E94 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 10298 80034E98 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 1029C 80034E9C 9462015E */ lhu $v0, 0x15E($v1) /* 102A0 80034EA0 0C04584B */ jal calculate_model_sizes /* 102A4 80034EA4 A462015C */ sh $v0, 0x15C($v1) /* 102A8 80034EA8 0C00EC6C */ jal npc_reload_all /* 102AC 80034EAC 00000000 */ nop /* 102B0 80034EB0 0C051FB1 */ jal set_windows_visible /* 102B4 80034EB4 0000202D */ daddu $a0, $zero, $zero /* 102B8 80034EB8 0C03A631 */ jal status_bar_respond_to_changes /* 102BC 80034EBC 00000000 */ nop /* 102C0 80034EC0 0C009C22 */ jal set_time_freeze_mode /* 102C4 80034EC4 24040001 */ addiu $a0, $zero, 0x1 /* 102C8 80034EC8 24020003 */ addiu $v0, $zero, 0x3 /* 102CC 80034ECC 3C048011 */ lui $a0, %hi(gPlayerStatus) /* 102D0 80034ED0 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* 102D4 80034ED4 3C01800A */ lui $at, %hi(D_800A0921) /* 102D8 80034ED8 A0220921 */ sb $v0, %lo(D_800A0921)($at) /* 102DC 80034EDC 9082000E */ lbu $v0, 0xE($a0) /* 102E0 80034EE0 3C03802E */ lui $v1, %hi(D_802D9D70) /* 102E4 80034EE4 90639D70 */ lbu $v1, %lo(D_802D9D70)($v1) /* 102E8 80034EE8 2442FFFF */ addiu $v0, $v0, -0x1 /* 102EC 80034EEC 24630001 */ addiu $v1, $v1, 0x1 /* 102F0 80034EF0 A082000F */ sb $v0, 0xF($a0) /* 102F4 80034EF4 3C01802E */ lui $at, %hi(D_802D9D71) /* 102F8 80034EF8 A0239D71 */ sb $v1, %lo(D_802D9D71)($at) /* 102FC 80034EFC 0C00F949 */ jal update_encounters /* 10300 80034F00 00000000 */ nop /* 10304 80034F04 0C00E64C */ jal update_npcs /* 10308 80034F08 00000000 */ nop /* 1030C 80034F0C 0C037DD0 */ jal update_player /* 10310 80034F10 00000000 */ nop /* 10314 80034F14 0C016754 */ jal update_effects /* 10318 80034F18 00000000 */ nop /* 1031C 80034F1C 3C03800A */ lui $v1, %hi(D_800A0922) /* 10320 80034F20 24630922 */ addiu $v1, $v1, %lo(D_800A0922) /* 10324 80034F24 94620000 */ lhu $v0, 0x0($v1) /* 10328 80034F28 2442FFEC */ addiu $v0, $v0, -0x14 /* 1032C 80034F2C A4620000 */ sh $v0, 0x0($v1) /* 10330 80034F30 00021400 */ sll $v0, $v0, 16 /* 10334 80034F34 04420028 */ bltzl $v0, .L80034FD8 /* 10338 80034F38 A4600000 */ sh $zero, 0x0($v1) /* 1033C 80034F3C 0800D3F6 */ j .L80034FD8 /* 10340 80034F40 00000000 */ nop .L80034F44: /* 10344 80034F44 0C00F949 */ jal update_encounters /* 10348 80034F48 00000000 */ nop /* 1034C 80034F4C 0C00E64C */ jal update_npcs /* 10350 80034F50 00000000 */ nop /* 10354 80034F54 0C037DD0 */ jal update_player /* 10358 80034F58 00000000 */ nop /* 1035C 80034F5C 0C016754 */ jal update_effects /* 10360 80034F60 00000000 */ nop /* 10364 80034F64 3C04800A */ lui $a0, %hi(D_800A0922) /* 10368 80034F68 24840922 */ addiu $a0, $a0, %lo(D_800A0922) /* 1036C 80034F6C 84820000 */ lh $v0, 0x0($a0) /* 10370 80034F70 94830000 */ lhu $v1, 0x0($a0) /* 10374 80034F74 14400004 */ bnez $v0, .L80034F88 /* 10378 80034F78 2462FFEC */ addiu $v0, $v1, -0x14 /* 1037C 80034F7C 24020004 */ addiu $v0, $zero, 0x4 /* 10380 80034F80 0800D3F6 */ j .L80034FD8 /* 10384 80034F84 A2020000 */ sb $v0, 0x0($s0) .L80034F88: /* 10388 80034F88 A4820000 */ sh $v0, 0x0($a0) /* 1038C 80034F8C 00021400 */ sll $v0, $v0, 16 /* 10390 80034F90 04420011 */ bltzl $v0, .L80034FD8 /* 10394 80034F94 A4800000 */ sh $zero, 0x0($a0) /* 10398 80034F98 0800D3F6 */ j .L80034FD8 /* 1039C 80034F9C 00000000 */ nop .L80034FA0: /* 103A0 80034FA0 0C009C22 */ jal set_time_freeze_mode /* 103A4 80034FA4 0000202D */ daddu $a0, $zero, $zero /* 103A8 80034FA8 0C00F949 */ jal update_encounters /* 103AC 80034FAC 00000000 */ nop /* 103B0 80034FB0 0C00E64C */ jal update_npcs /* 103B4 80034FB4 00000000 */ nop /* 103B8 80034FB8 0C037DD0 */ jal update_player /* 103BC 80034FBC 00000000 */ nop /* 103C0 80034FC0 0C016754 */ jal update_effects /* 103C4 80034FC4 00000000 */ nop /* 103C8 80034FC8 0C038069 */ jal enable_player_input /* 103CC 80034FCC 00000000 */ nop /* 103D0 80034FD0 0C00CD3C */ jal set_game_mode /* 103D4 80034FD4 24040004 */ addiu $a0, $zero, 0x4 .L80034FD8: /* 103D8 80034FD8 8FBF0024 */ lw $ra, 0x24($sp) /* 103DC 80034FDC 8FB20020 */ lw $s2, 0x20($sp) /* 103E0 80034FE0 8FB1001C */ lw $s1, 0x1C($sp) /* 103E4 80034FE4 8FB00018 */ lw $s0, 0x18($sp) /* 103E8 80034FE8 03E00008 */ jr $ra /* 103EC 80034FEC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void state_step_unpause(void) { switch (D_800A0921) { case 0: case 1: if (D_800A0920 == 4) { gOverrideFlags |= GLOBAL_OVERRIDES_8; } if (D_800A0920 >= 0) { if (D_800A0920 != 0) { D_800A0920--; } if (D_800A0920 == 0) { if (D_800A0920 == 0) { MapSettings* mapSettings; MapConfig* mapConfig; void* mapShape; s32 assetSize; D_800A0920 = -1; nuGfxSetCfb(pause_frameBuffers, ARRAY_COUNT(pause_frameBuffers)); pause_cleanup(); gOverrideFlags &= ~GLOBAL_OVERRIDES_8; mapSettings = get_current_map_settings(); mapConfig = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID]; gGameStatusPtr->isBattle = FALSE; gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK; func_8005AF84(); func_8002ACDC(); nuContRmbForceStopEnd(); 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(); sfx_set_reverb_mode(SavedReverbMode); bgm_reset_max_volume(); load_map_script_lib(); mapShape = load_asset_by_name(wMapShapeName, &assetSize); decode_yay0(mapShape, &gMapShapeData); general_heap_free(mapShape); initialize_collision(); restore_map_collision_data(); if (mapConfig->dmaStart != NULL) { dma_copy(mapConfig->dmaStart, mapConfig->dmaEnd, mapConfig->dmaDest); } load_map_bg(mapConfig->bgName); if (mapSettings->background != NULL) { read_background_size(mapSettings->background); } else { set_background_size(296, 200, 12, 20); } gGameStatusPtr->backgroundDarkness = gGameStatusPtr->savedBackgroundDarkness; calculate_model_sizes(); npc_reload_all(); set_windows_visible(WINDOW_GROUP_ALL); status_bar_respond_to_changes(); set_time_freeze_mode(TIME_FREEZE_PARTIAL); D_800A0921 = 3; gPlayerStatus.alpha2 = gPlayerStatus.alpha1 - 1; D_802D9D71 = D_802D9D70 + 1; update_encounters(); update_npcs(); update_player(); update_effects(); D_800A0922 -= 20; if (D_800A0922 < 0) { D_800A0922 = 0; } } } } break; case 3: update_encounters(); update_npcs(); update_player(); update_effects(); if (D_800A0922 == 0) { D_800A0921 = 4; } else { D_800A0922 -= 20; if (D_800A0922 < 0) { D_800A0922 = 0; } } break; case 4: set_time_freeze_mode(TIME_FREEZE_NORMAL); update_encounters(); update_npcs(); update_player(); update_effects(); enable_player_input(); set_game_mode(GAME_MODE_CHANGE_MAP); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel spiky_white_aura_main /* 34DD20 E0038000 27BDFF38 */ addiu $sp, $sp, -0xC8 /* 34DD24 E0038004 F7BE00C0 */ sdc1 $f30, 0xC0($sp) /* 34DD28 E0038008 4485F000 */ mtc1 $a1, $f30 /* 34DD2C E003800C F7B600A0 */ sdc1 $f22, 0xA0($sp) /* 34DD30 E0038010 4480B000 */ mtc1 $zero, $f22 /* 34DD34 E0038014 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 34DD38 E0038018 44816000 */ mtc1 $at, $f12 /* 34DD3C E003801C F7B800A8 */ sdc1 $f24, 0xA8($sp) /* 34DD40 E0038020 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 34DD44 E0038024 4481C000 */ mtc1 $at, $f24 /* 34DD48 E0038028 AFBF0094 */ sw $ra, 0x94($sp) /* 34DD4C E003802C AFBE0090 */ sw $fp, 0x90($sp) /* 34DD50 E0038030 AFB7008C */ sw $s7, 0x8C($sp) /* 34DD54 E0038034 AFB60088 */ sw $s6, 0x88($sp) /* 34DD58 E0038038 AFB50084 */ sw $s5, 0x84($sp) /* 34DD5C E003803C AFB40080 */ sw $s4, 0x80($sp) /* 34DD60 E0038040 AFB3007C */ sw $s3, 0x7C($sp) /* 34DD64 E0038044 AFB20078 */ sw $s2, 0x78($sp) /* 34DD68 E0038048 AFB10074 */ sw $s1, 0x74($sp) /* 34DD6C E003804C AFB00070 */ sw $s0, 0x70($sp) /* 34DD70 E0038050 F7BC00B8 */ sdc1 $f28, 0xB8($sp) /* 34DD74 E0038054 F7BA00B0 */ sdc1 $f26, 0xB0($sp) /* 34DD78 E0038058 F7B40098 */ sdc1 $f20, 0x98($sp) /* 34DD7C E003805C AFA400C8 */ sw $a0, 0xC8($sp) /* 34DD80 E0038060 AFA600D0 */ sw $a2, 0xD0($sp) /* 34DD84 E0038064 AFA700D4 */ sw $a3, 0xD4($sp) /* 34DD88 E0038068 0C080154 */ jal shim_sqrtf /* 34DD8C E003806C 46006706 */ mov.s $f28, $f12 /* 34DD90 E0038070 4600C303 */ div.s $f12, $f24, $f0 /* 34DD94 E0038074 46166682 */ mul.s $f26, $f12, $f22 /* 34DD98 E0038078 00000000 */ nop /* 34DD9C E003807C 4600B506 */ mov.s $f20, $f22 /* 34DDA0 E0038080 27B00018 */ addiu $s0, $sp, 0x18 /* 34DDA4 E0038084 24150005 */ addiu $s5, $zero, 0x5 /* 34DDA8 E0038088 4600D586 */ mov.s $f22, $f26 /* 34DDAC E003808C 4614B032 */ c.eq.s $f22, $f20 /* 34DDB0 E0038090 00000000 */ nop /* 34DDB4 E0038094 45010005 */ bc1t .LE00380AC /* 34DDB8 E0038098 46006607 */ neg.s $f24, $f12 /* 34DDBC E003809C 46166003 */ div.s $f0, $f12, $f22 /* 34DDC0 E00380A0 4600E086 */ mov.s $f2, $f28 /* 34DDC4 E00380A4 0800E036 */ j .LE00380D8 /* 34DDC8 E00380A8 4600A106 */ mov.s $f4, $f20 .LE00380AC: /* 34DDCC E00380AC 4614C032 */ c.eq.s $f24, $f20 /* 34DDD0 E00380B0 00000000 */ nop /* 34DDD4 E00380B4 45010005 */ bc1t .LE00380CC /* 34DDD8 E00380B8 4600B007 */ neg.s $f0, $f22 /* 34DDDC E00380BC 46180083 */ div.s $f2, $f0, $f24 /* 34DDE0 E00380C0 4600E006 */ mov.s $f0, $f28 /* 34DDE4 E00380C4 0800E036 */ j .LE00380D8 /* 34DDE8 E00380C8 4600A106 */ mov.s $f4, $f20 .LE00380CC: /* 34DDEC E00380CC 46160103 */ div.s $f4, $f0, $f22 /* 34DDF0 E00380D0 4600A086 */ mov.s $f2, $f20 /* 34DDF4 E00380D4 4600E006 */ mov.s $f0, $f28 .LE00380D8: /* 34DDF8 E00380D8 46000002 */ mul.s $f0, $f0, $f0 /* 34DDFC E00380DC 00000000 */ nop /* 34DE00 E00380E0 46021082 */ mul.s $f2, $f2, $f2 /* 34DE04 E00380E4 00000000 */ nop /* 34DE08 E00380E8 46042102 */ mul.s $f4, $f4, $f4 /* 34DE0C E00380EC 00000000 */ nop /* 34DE10 E00380F0 46020000 */ add.s $f0, $f0, $f2 /* 34DE14 E00380F4 46040300 */ add.s $f12, $f0, $f4 /* 34DE18 E00380F8 44800000 */ mtc1 $zero, $f0 /* 34DE1C E00380FC 00000000 */ nop /* 34DE20 E0038100 46006032 */ c.eq.s $f12, $f0 /* 34DE24 E0038104 00000000 */ nop /* 34DE28 E0038108 450100B2 */ bc1t .LE00383D4 /* 34DE2C E003810C 00000000 */ nop /* 34DE30 E0038110 0C080154 */ jal shim_sqrtf /* 34DE34 E0038114 00000000 */ nop /* 34DE38 E0038118 0200202D */ daddu $a0, $s0, $zero /* 34DE3C E003811C 3C014190 */ lui $at, (0x41900000 >> 16) /* 34DE40 E0038120 44810000 */ mtc1 $at, $f0 /* 34DE44 E0038124 3C02E004 */ lui $v0, %hi(spiky_white_aura_init) /* 34DE48 E0038128 2442841C */ addiu $v0, $v0, %lo(spiky_white_aura_init) /* 34DE4C E003812C AC820008 */ sw $v0, 0x8($a0) /* 34DE50 E0038130 4600D682 */ mul.s $f26, $f26, $f0 /* 34DE54 E0038134 00000000 */ nop /* 34DE58 E0038138 3C02E004 */ lui $v0, %hi(spiky_white_aura_update) /* 34DE5C E003813C 24428424 */ addiu $v0, $v0, %lo(spiky_white_aura_update) /* 34DE60 E0038140 AC82000C */ sw $v0, 0xC($a0) /* 34DE64 E0038144 3C02E004 */ lui $v0, %hi(spiky_white_aura_render) /* 34DE68 E0038148 24428704 */ addiu $v0, $v0, %lo(spiky_white_aura_render) /* 34DE6C E003814C AC820010 */ sw $v0, 0x10($a0) /* 34DE70 E0038150 4600C602 */ mul.s $f24, $f24, $f0 /* 34DE74 E0038154 00000000 */ nop /* 34DE78 E0038158 2402001C */ addiu $v0, $zero, 0x1C /* 34DE7C E003815C AC800000 */ sw $zero, 0x0($a0) /* 34DE80 E0038160 AC800014 */ sw $zero, 0x14($a0) /* 34DE84 E0038164 4600B582 */ mul.s $f22, $f22, $f0 /* 34DE88 E0038168 00000000 */ nop /* 34DE8C E003816C 0C080124 */ jal shim_create_effect_instance /* 34DE90 E0038170 AC820004 */ sw $v0, 0x4($a0) /* 34DE94 E0038174 00152040 */ sll $a0, $s5, 1 /* 34DE98 E0038178 00952021 */ addu $a0, $a0, $s5 /* 34DE9C E003817C 00042100 */ sll $a0, $a0, 4 /* 34DEA0 E0038180 0040802D */ daddu $s0, $v0, $zero /* 34DEA4 E0038184 0C08012C */ jal shim_general_heap_malloc /* 34DEA8 E0038188 AE150008 */ sw $s5, 0x8($s0) /* 34DEAC E003818C 0040902D */ daddu $s2, $v0, $zero /* 34DEB0 E0038190 16400003 */ bnez $s2, .LE00381A0 /* 34DEB4 E0038194 AE12000C */ sw $s2, 0xC($s0) .LE0038198: /* 34DEB8 E0038198 0800E066 */ j .LE0038198 /* 34DEBC E003819C 00000000 */ nop .LE00381A0: /* 34DEC0 E00381A0 12A0008C */ beqz $s5, .LE00383D4 /* 34DEC4 E00381A4 0000A02D */ daddu $s4, $zero, $zero /* 34DEC8 E00381A8 3C17800B */ lui $s7, %hi(gCameras) /* 34DECC E00381AC 26F71D80 */ addiu $s7, $s7, %lo(gCameras) /* 34DED0 E00381B0 3C168007 */ lui $s6, %hi(gCurrentCameraID) /* 34DED4 E00381B4 26D67410 */ addiu $s6, $s6, %lo(gCurrentCameraID) /* 34DED8 E00381B8 27BE0030 */ addiu $fp, $sp, 0x30 /* 34DEDC E00381BC 26B3FFFF */ addiu $s3, $s5, -0x1 /* 34DEE0 E00381C0 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34DEE4 E00381C4 D43C8A20 */ ldc1 $f28, -0x75E0($at) /* 34DEE8 E00381C8 26500024 */ addiu $s0, $s2, 0x24 /* 34DEEC E00381CC 0280882D */ daddu $s1, $s4, $zero .LE00381D0: /* 34DEF0 E00381D0 8EC30000 */ lw $v1, 0x0($s6) /* 34DEF4 E00381D4 8FA800C8 */ lw $t0, 0xC8($sp) /* 34DEF8 E00381D8 00031080 */ sll $v0, $v1, 2 /* 34DEFC E00381DC 00431021 */ addu $v0, $v0, $v1 /* 34DF00 E00381E0 00021080 */ sll $v0, $v0, 2 /* 34DF04 E00381E4 00431023 */ subu $v0, $v0, $v1 /* 34DF08 E00381E8 000218C0 */ sll $v1, $v0, 3 /* 34DF0C E00381EC 00431021 */ addu $v0, $v0, $v1 /* 34DF10 E00381F0 AE480000 */ sw $t0, 0x0($s2) /* 34DF14 E00381F4 E61EFFE0 */ swc1 $f30, -0x20($s0) /* 34DF18 E00381F8 C7A600D0 */ lwc1 $f6, 0xD0($sp) /* 34DF1C E00381FC 000210C0 */ sll $v0, $v0, 3 /* 34DF20 E0038200 E606FFE4 */ swc1 $f6, -0x1C($s0) /* 34DF24 E0038204 C7A600D4 */ lwc1 $f6, 0xD4($sp) /* 34DF28 E0038208 00571021 */ addu $v0, $v0, $s7 /* 34DF2C E003820C E606FFE8 */ swc1 $f6, -0x18($s0) /* 34DF30 E0038210 0C080140 */ jal shim_sin_deg /* 34DF34 E0038214 C44C006C */ lwc1 $f12, 0x6C($v0) /* 34DF38 E0038218 8EC30000 */ lw $v1, 0x0($s6) /* 34DF3C E003821C 00031080 */ sll $v0, $v1, 2 /* 34DF40 E0038220 00431021 */ addu $v0, $v0, $v1 /* 34DF44 E0038224 00021080 */ sll $v0, $v0, 2 /* 34DF48 E0038228 00431023 */ subu $v0, $v0, $v1 /* 34DF4C E003822C 000218C0 */ sll $v1, $v0, 3 /* 34DF50 E0038230 00431021 */ addu $v0, $v0, $v1 /* 34DF54 E0038234 000210C0 */ sll $v0, $v0, 3 /* 34DF58 E0038238 00571021 */ addu $v0, $v0, $s7 /* 34DF5C E003823C C44C006C */ lwc1 $f12, 0x6C($v0) /* 34DF60 E0038240 0C080144 */ jal shim_cos_deg /* 34DF64 E0038244 46000506 */ mov.s $f20, $f0 /* 34DF68 E0038248 24020001 */ addiu $v0, $zero, 0x1 /* 34DF6C E003824C 12A20011 */ beq $s5, $v0, .LE0038294 /* 34DF70 E0038250 46000007 */ neg.s $f0, $f0 /* 34DF74 E0038254 16600002 */ bnez $s3, .LE0038260 /* 34DF78 E0038258 0233001A */ div $zero, $s1, $s3 /* 34DF7C E003825C 0007000D */ break 7 .LE0038260: /* 34DF80 E0038260 2401FFFF */ addiu $at, $zero, -0x1 /* 34DF84 E0038264 16610004 */ bne $s3, $at, .LE0038278 /* 34DF88 E0038268 3C018000 */ lui $at, (0x80000000 >> 16) /* 34DF8C E003826C 16210002 */ bne $s1, $at, .LE0038278 /* 34DF90 E0038270 00000000 */ nop /* 34DF94 E0038274 0006000D */ break 6 .LE0038278: /* 34DF98 E0038278 00001012 */ mflo $v0 /* 34DF9C E003827C 2442FFCE */ addiu $v0, $v0, -0x32 /* 34DFA0 E0038280 44821000 */ mtc1 $v0, $f2 /* 34DFA4 E0038284 00000000 */ nop /* 34DFA8 E0038288 468010A0 */ cvt.s.w $f2, $f2 /* 34DFAC E003828C 0800E0A7 */ j .LE003829C /* 34DFB0 E0038290 03C0202D */ daddu $a0, $fp, $zero .LE0038294: /* 34DFB4 E0038294 44801000 */ mtc1 $zero, $f2 /* 34DFB8 E0038298 03C0202D */ daddu $a0, $fp, $zero .LE003829C: /* 34DFBC E003829C 44051000 */ mfc1 $a1, $f2 /* 34DFC0 E00382A0 4406A000 */ mfc1 $a2, $f20 /* 34DFC4 E00382A4 0000382D */ daddu $a3, $zero, $zero /* 34DFC8 E00382A8 0C080104 */ jal shim_guRotateF /* 34DFCC E00382AC E7A00010 */ swc1 $f0, 0x10($sp) /* 34DFD0 E00382B0 16600002 */ bnez $s3, .LE00382BC /* 34DFD4 E00382B4 0233001A */ div $zero, $s1, $s3 /* 34DFD8 E00382B8 0007000D */ break 7 .LE00382BC: /* 34DFDC E00382BC 2401FFFF */ addiu $at, $zero, -0x1 /* 34DFE0 E00382C0 16610004 */ bne $s3, $at, .LE00382D4 /* 34DFE4 E00382C4 3C018000 */ lui $at, (0x80000000 >> 16) /* 34DFE8 E00382C8 16210002 */ bne $s1, $at, .LE00382D4 /* 34DFEC E00382CC 00000000 */ nop /* 34DFF0 E00382D0 0006000D */ break 6 .LE00382D4: /* 34DFF4 E00382D4 00001812 */ mflo $v1 /* 34DFF8 E00382D8 C7A00030 */ lwc1 $f0, 0x30($sp) /* 34DFFC E00382DC 461A0002 */ mul.s $f0, $f0, $f26 /* 34E000 E00382E0 00000000 */ nop /* 34E004 E00382E4 C7A40040 */ lwc1 $f4, 0x40($sp) /* 34E008 E00382E8 46182102 */ mul.s $f4, $f4, $f24 /* 34E00C E00382EC 00000000 */ nop /* 34E010 E00382F0 C7A20050 */ lwc1 $f2, 0x50($sp) /* 34E014 E00382F4 46161082 */ mul.s $f2, $f2, $f22 /* 34E018 E00382F8 00000000 */ nop /* 34E01C E00382FC 46040000 */ add.s $f0, $f0, $f4 /* 34E020 E0038300 46020000 */ add.s $f0, $f0, $f2 /* 34E024 E0038304 46000021 */ cvt.d.s $f0, $f0 /* 34E028 E0038308 463C0002 */ mul.d $f0, $f0, $f28 /* 34E02C E003830C 00000000 */ nop /* 34E030 E0038310 46200020 */ cvt.s.d $f0, $f0 /* 34E034 E0038314 E600FFEC */ swc1 $f0, -0x14($s0) /* 34E038 E0038318 C7A00034 */ lwc1 $f0, 0x34($sp) /* 34E03C E003831C 461A0002 */ mul.s $f0, $f0, $f26 /* 34E040 E0038320 00000000 */ nop /* 34E044 E0038324 C7A40044 */ lwc1 $f4, 0x44($sp) /* 34E048 E0038328 46182102 */ mul.s $f4, $f4, $f24 /* 34E04C E003832C 00000000 */ nop /* 34E050 E0038330 C7A20054 */ lwc1 $f2, 0x54($sp) /* 34E054 E0038334 46161082 */ mul.s $f2, $f2, $f22 /* 34E058 E0038338 00000000 */ nop /* 34E05C E003833C 46040000 */ add.s $f0, $f0, $f4 /* 34E060 E0038340 46020000 */ add.s $f0, $f0, $f2 /* 34E064 E0038344 E600FFF0 */ swc1 $f0, -0x10($s0) /* 34E068 E0038348 C7A00038 */ lwc1 $f0, 0x38($sp) /* 34E06C E003834C 461A0002 */ mul.s $f0, $f0, $f26 /* 34E070 E0038350 00000000 */ nop /* 34E074 E0038354 C7A20048 */ lwc1 $f2, 0x48($sp) /* 34E078 E0038358 46181082 */ mul.s $f2, $f2, $f24 /* 34E07C E003835C 00000000 */ nop /* 34E080 E0038360 C7A40058 */ lwc1 $f4, 0x58($sp) /* 34E084 E0038364 46162102 */ mul.s $f4, $f4, $f22 /* 34E088 E0038368 00000000 */ nop /* 34E08C E003836C 26940001 */ addiu $s4, $s4, 0x1 /* 34E090 E0038370 26520030 */ addiu $s2, $s2, 0x30 /* 34E094 E0038374 26310064 */ addiu $s1, $s1, 0x64 /* 34E098 E0038378 46020000 */ add.s $f0, $f0, $f2 /* 34E09C E003837C 24020032 */ addiu $v0, $zero, 0x32 /* 34E0A0 E0038380 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 34E0A4 E0038384 44811000 */ mtc1 $at, $f2 /* 34E0A8 E0038388 46040000 */ add.s $f0, $f0, $f4 /* 34E0AC E003838C E602FFFC */ swc1 $f2, -0x4($s0) /* 34E0B0 E0038390 8FA800D8 */ lw $t0, 0xD8($sp) /* 34E0B4 E0038394 46000021 */ cvt.d.s $f0, $f0 /* 34E0B8 E0038398 463C0002 */ mul.d $f0, $f0, $f28 /* 34E0BC E003839C 00000000 */ nop /* 34E0C0 E00383A0 AE000008 */ sw $zero, 0x8($s0) /* 34E0C4 E00383A4 AE000000 */ sw $zero, 0x0($s0) /* 34E0C8 E00383A8 AE080004 */ sw $t0, 0x4($s0) /* 34E0CC E00383AC 00431023 */ subu $v0, $v0, $v1 /* 34E0D0 E00383B0 44821000 */ mtc1 $v0, $f2 /* 34E0D4 E00383B4 00000000 */ nop /* 34E0D8 E00383B8 468010A0 */ cvt.s.w $f2, $f2 /* 34E0DC E00383BC 0295102A */ slt $v0, $s4, $s5 /* 34E0E0 E00383C0 E602FFF8 */ swc1 $f2, -0x8($s0) /* 34E0E4 E00383C4 46200020 */ cvt.s.d $f0, $f0 /* 34E0E8 E00383C8 E600FFF4 */ swc1 $f0, -0xC($s0) /* 34E0EC E00383CC 1440FF80 */ bnez $v0, .LE00381D0 /* 34E0F0 E00383D0 26100030 */ addiu $s0, $s0, 0x30 .LE00383D4: /* 34E0F4 E00383D4 8FBF0094 */ lw $ra, 0x94($sp) /* 34E0F8 E00383D8 8FBE0090 */ lw $fp, 0x90($sp) /* 34E0FC E00383DC 8FB7008C */ lw $s7, 0x8C($sp) /* 34E100 E00383E0 8FB60088 */ lw $s6, 0x88($sp) /* 34E104 E00383E4 8FB50084 */ lw $s5, 0x84($sp) /* 34E108 E00383E8 8FB40080 */ lw $s4, 0x80($sp) /* 34E10C E00383EC 8FB3007C */ lw $s3, 0x7C($sp) /* 34E110 E00383F0 8FB20078 */ lw $s2, 0x78($sp) /* 34E114 E00383F4 8FB10074 */ lw $s1, 0x74($sp) /* 34E118 E00383F8 8FB00070 */ lw $s0, 0x70($sp) /* 34E11C E00383FC D7BE00C0 */ ldc1 $f30, 0xC0($sp) /* 34E120 E0038400 D7BC00B8 */ ldc1 $f28, 0xB8($sp) /* 34E124 E0038404 D7BA00B0 */ ldc1 $f26, 0xB0($sp) /* 34E128 E0038408 D7B800A8 */ ldc1 $f24, 0xA8($sp) /* 34E12C E003840C D7B600A0 */ ldc1 $f22, 0xA0($sp) /* 34E130 E0038410 D7B40098 */ ldc1 $f20, 0x98($sp) /* 34E134 E0038414 03E00008 */ jr $ra /* 34E138 E0038418 27BD00C8 */ addiu $sp, $sp, 0xC8 ### DECOMPILED C INSTRUCTIONS: void spiky_white_aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; SpikyWhiteAuraFXData* part; s32 numParts = 5; f32 fs1 = 0.0f; f32 fs2 = -1.0f; f32 fs3 = 0.0f; f32 var_f0; f32 var_f2; f32 var_f4; f32 temp_f12; f32 sinYaw; f32 cosYaw; f32 rotateA; Matrix4f sp30; s32 i; temp_f12 = SQ(fs3) + SQ(fs2) + SQ(fs1); if (temp_f12 != 0.0f) { temp_f12 = -1.0f / shim_sqrtf(temp_f12); fs3 *= temp_f12; fs2 *= temp_f12; fs1 *= temp_f12; if (fs1 != 0.0f) { var_f0 = temp_f12 / fs1; var_f2 = 1.0f; var_f4 = 0.0f; } else if (fs2 != 0.0f) { var_f2 = -fs1 / fs2; var_f0 = 1.0f; var_f4 = 0.0f; } else { var_f4 = -fs1 / fs3; var_f2 = 0.0f; var_f0 = 1.0f; } temp_f12 = SQ(var_f0) + SQ(var_f2) + SQ(var_f4); if (temp_f12 != 0.0f) { temp_f12 = 1.0 / shim_sqrtf(temp_f12); fs3 *= 18.0f; fs2 *= 18.0f; fs1 *= 18.0f; bpPtr->init = spiky_white_aura_init; bpPtr->update = spiky_white_aura_update; bpPtr->renderWorld = spiky_white_aura_render; bpPtr->unk_00 = 0; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_SPIKY_WHITE_AURA; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.spikyWhiteAura = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.spikyWhiteAura != NULL); for (i = 0; i < numParts; i++, part++) { Camera* camera = &gCameras[gCurrentCameraID]; // required to match f32 (*matrix)[4] = &sp30[0]; // required to match part->unk_00 = arg0; part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; sinYaw = shim_sin_deg(gCameras[gCurrentCameraID].currentYaw); cosYaw = -shim_cos_deg(gCameras[gCurrentCameraID].currentYaw); if (numParts != 1) { rotateA = (i * 100) / (numParts - 1) - 50; } else { rotateA = 0.0f; } shim_guRotateF(matrix, rotateA, sinYaw, 0.0f, cosYaw); part->unk_10 = (sp30[0][0] * fs3 + sp30[1][0] * fs2 + sp30[2][0] * fs1) * 0.6; part->unk_14 = sp30[0][1] * fs3 + sp30[1][1] * fs2 + sp30[2][1] * fs1; part->unk_18 = (sp30[0][2] * fs3 + sp30[1][2] * fs2 + sp30[2][2] * fs1) * 0.6; part->unk_1C = 50 - (i * 100) / (numParts - 1); part->unk_20 = 0.5f; part->unk_28 = arg4; part->unk_2C = 0; part->unk_24 = 0; } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8024EFE0 /* 17D8C0 8024EFE0 27BDFF98 */ addiu $sp, $sp, -0x68 D_8024EFE4: /* 17D8C4 8024EFE4 F7BC0060 */ sdc1 $f28, 0x60($sp) D_8024EFE8: /* 17D8C8 8024EFE8 4486E000 */ mtc1 $a2, $f28 D_8024EFEC: /* 17D8CC 8024EFEC F7B60048 */ sdc1 $f22, 0x48($sp) /* 17D8D0 8024EFF0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17D8D4 8024EFF4 4481B000 */ mtc1 $at, $f22 D_8024EFF8_C0C878: /* 17D8D8 8024EFF8 AFB20020 */ sw $s2, 0x20($sp) /* 17D8DC 8024EFFC 8FB2007C */ lw $s2, 0x7C($sp) D_8024F000: /* 17D8E0 8024F000 F7B80050 */ sdc1 $f24, 0x50($sp) /* 17D8E4 8024F004 46006606 */ mov.s $f24, $f12 D_8024F008: /* 17D8E8 8024F008 F7BA0058 */ sdc1 $f26, 0x58($sp) D_8024F00C: /* 17D8EC 8024F00C 46007686 */ mov.s $f26, $f14 D_8024F010: /* 17D8F0 8024F010 AFB5002C */ sw $s5, 0x2C($sp) D_8024F014: /* 17D8F4 8024F014 00E0A82D */ daddu $s5, $a3, $zero D_8024F018: /* 17D8F8 8024F018 AFB70034 */ sw $s7, 0x34($sp) D_8024F01C: /* 17D8FC 8024F01C 0000B82D */ daddu $s7, $zero, $zero D_8024F020: /* 17D900 8024F020 AFB1001C */ sw $s1, 0x1C($sp) /* 17D904 8024F024 3C11800E */ lui $s1, %hi(gBattleStatus) /* 17D908 8024F028 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 17D90C 8024F02C AFBF003C */ sw $ra, 0x3C($sp) D_8024F030_C0C8B0: /* 17D910 8024F030 AFBE0038 */ sw $fp, 0x38($sp) /* 17D914 8024F034 AFB60030 */ sw $s6, 0x30($sp) /* 17D918 8024F038 AFB40028 */ sw $s4, 0x28($sp) D_8024F03C: /* 17D91C 8024F03C AFB30024 */ sw $s3, 0x24($sp) /* 17D920 8024F040 AFB00018 */ sw $s0, 0x18($sp) /* 17D924 8024F044 F7B40040 */ sdc1 $f20, 0x40($sp) /* 17D928 8024F048 1EA00009 */ bgtz $s5, .L8024F070 /* 17D92C 8024F04C 4600B506 */ mov.s $f20, $f22 /* 17D930 8024F050 24150001 */ addiu $s5, $zero, 0x1 /* 17D934 8024F054 02A0B82D */ daddu $s7, $s5, $zero D_8024F058: /* 17D938 8024F058 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 17D93C 8024F05C 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 17D940 8024F060 4481B000 */ mtc1 $at, $f22 /* 17D944 8024F064 3C013F33 */ lui $at, (0x3F333333 >> 16) /* 17D948 8024F068 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF) /* 17D94C 8024F06C 4481A000 */ mtc1 $at, $f20 .L8024F070: /* 17D950 8024F070 8E220000 */ lw $v0, 0x0($s1) D_8024F074: /* 17D954 8024F074 30420240 */ andi $v0, $v0, 0x240 /* 17D958 8024F078 10400004 */ beqz $v0, .L8024F08C dro_02_pad_D_8024F07C: /* 17D95C 8024F07C 00000000 */ nop dro_02_D_8024F080: /* 17D960 8024F080 4600B021 */ cvt.d.s $f0, $f22 /* 17D964 8024F084 46200000 */ add.d $f0, $f0, $f0 /* 17D968 8024F088 462005A0 */ cvt.s.d $f22, $f0 .L8024F08C: /* 17D96C 8024F08C 0C093BDA */ jal D_8024EF68 D_8024F090_C0C910: /* 17D970 8024F090 00000000 */ nop /* 17D974 8024F094 0040802D */ daddu $s0, $v0, $zero /* 17D978 8024F098 120000AD */ beqz $s0, .L8024F350 /* 17D97C 8024F09C 00000000 */ nop /* 17D980 8024F0A0 06410003 */ bgez $s2, .L8024F0B0 /* 17D984 8024F0A4 24140001 */ addiu $s4, $zero, 0x1 /* 17D988 8024F0A8 00129023 */ negu $s2, $s2 D_8024F0AC: /* 17D98C 8024F0AC 2414FFFF */ addiu $s4, $zero, -0x1 .L8024F0B0: /* 17D990 8024F0B0 2A420006 */ slti $v0, $s2, 0x6 /* 17D994 8024F0B4 14400003 */ bnez $v0, .L8024F0C4 /* 17D998 8024F0B8 00152080 */ sll $a0, $s5, 2 D_8024F0BC: /* 17D99C 8024F0BC 08093C2C */ j .L8024F0B0 /* 17D9A0 8024F0C0 2652FFFB */ addiu $s2, $s2, -0x5 .L8024F0C4: /* 17D9A4 8024F0C4 00952021 */ addu $a0, $a0, $s5 D_8024F0C8_C0C948: /* 17D9A8 8024F0C8 00042080 */ sll $a0, $a0, 2 D_8024F0CC: /* 17D9AC 8024F0CC 00952023 */ subu $a0, $a0, $s5 /* 17D9B0 8024F0D0 00042080 */ sll $a0, $a0, 2 /* 17D9B4 8024F0D4 3C028025 */ lui $v0, %hi(func_8024F394) /* 17D9B8 8024F0D8 2442F394 */ addiu $v0, $v0, %lo(func_8024F394) /* 17D9BC 8024F0DC A6200090 */ sh $zero, 0x90($s1) /* 17D9C0 8024F0E0 AE020004 */ sw $v0, 0x4($s0) /* 17D9C4 8024F0E4 3C028025 */ lui $v0, %hi(func_8024F5AC) /* 17D9C8 8024F0E8 2442F5AC */ addiu $v0, $v0, %lo(func_8024F5AC) /* 17D9CC 8024F0EC AE020008 */ sw $v0, 0x8($s0) /* 17D9D0 8024F0F0 96020010 */ lhu $v0, 0x10($s0) /* 17D9D4 8024F0F4 24030001 */ addiu $v1, $zero, 0x1 /* 17D9D8 8024F0F8 AE000000 */ sw $zero, 0x0($s0) /* 17D9DC 8024F0FC AE00000C */ sw $zero, 0xC($s0) D_8024F100: /* 17D9E0 8024F100 A6030012 */ sh $v1, 0x12($s0) /* 17D9E4 8024F104 34420010 */ ori $v0, $v0, 0x10 /* 17D9E8 8024F108 0C00AB39 */ jal heap_malloc /* 17D9EC 8024F10C A6020010 */ sh $v0, 0x10($s0) D_8024F110: /* 17D9F0 8024F110 0040982D */ daddu $s3, $v0, $zero D_8024F114: /* 17D9F4 8024F114 16600003 */ bnez $s3, .L8024F124 /* 17D9F8 8024F118 AE130018 */ sw $s3, 0x18($s0) .L8024F11C: /* 17D9FC 8024F11C 08093C47 */ j .L8024F11C /* 17DA00 8024F120 00000000 */ nop .L8024F124: /* 17DA04 8024F124 1AA0008A */ blez $s5, .L8024F350 D_8024F128_C0C9A8: /* 17DA08 8024F128 0000882D */ daddu $s1, $zero, $zero /* 17DA0C 8024F12C 3C038028 */ lui $v1, %hi(bBonkModelScripts) /* 17DA10 8024F130 24633744 */ addiu $v1, $v1, %lo(bBonkModelScripts) /* 17DA14 8024F134 00151080 */ sll $v0, $s5, 2 /* 17DA18 8024F138 00431021 */ addu $v0, $v0, $v1 /* 17DA1C 8024F13C AFA20010 */ sw $v0, 0x10($sp) /* 17DA20 8024F140 3C168028 */ lui $s6, %hi(D_802835DC) /* 17DA24 8024F144 26D635DC */ addiu $s6, $s6, %lo(D_802835DC) /* 17DA28 8024F148 001410C0 */ sll $v0, $s4, 3 /* 17DA2C 8024F14C 00541023 */ subu $v0, $v0, $s4 /* 17DA30 8024F150 00021080 */ sll $v0, $v0, 2 /* 17DA34 8024F154 00541023 */ subu $v0, $v0, $s4 /* 17DA38 8024F158 00021080 */ sll $v0, $v0, 2 /* 17DA3C 8024F15C 0054F023 */ subu $fp, $v0, $s4 D_8024F160_C0C9E0: /* 17DA40 8024F160 26700048 */ addiu $s0, $s3, 0x48 .L8024F164: /* 17DA44 8024F164 24020001 */ addiu $v0, $zero, 0x1 /* 17DA48 8024F168 AE620000 */ sw $v0, 0x0($s3) /* 17DA4C 8024F16C 8FA80010 */ lw $t0, 0x10($sp) /* 17DA50 8024F170 0C048338 */ jal load_entity_model /* 17DA54 8024F174 8D040000 */ lw $a0, 0x0($t0) /* 17DA58 8024F178 0040202D */ daddu $a0, $v0, $zero /* 17DA5C 8024F17C 24050020 */ addiu $a1, $zero, 0x20 /* 17DA60 8024F180 0C048BBA */ jal set_entity_model_flags /* 17DA64 8024F184 AE04FFBC */ sw $a0, -0x44($s0) /* 17DA68 8024F188 8E04FFBC */ lw $a0, -0x44($s0) /* 17DA6C 8024F18C 3C068025 */ lui $a2, %hi(func_8024F768) /* 17DA70 8024F190 24C6F768 */ addiu $a2, $a2, %lo(func_8024F768) /* 17DA74 8024F194 0C048BD9 */ jal bind_entity_model_setupGfx /* 17DA78 8024F198 0260282D */ daddu $a1, $s3, $zero /* 17DA7C 8024F19C 0240102D */ daddu $v0, $s2, $zero /* 17DA80 8024F1A0 E618FFF0 */ swc1 $f24, -0x10($s0) /* 17DA84 8024F1A4 E61AFFF4 */ swc1 $f26, -0xC($s0) /* 17DA88 8024F1A8 06410002 */ bgez $s2, .L8024F1B4 /* 17DA8C 8024F1AC E61CFFF8 */ swc1 $f28, -0x8($s0) D_8024F1B0: /* 17DA90 8024F1B0 26420007 */ addiu $v0, $s2, 0x7 .L8024F1B4: /* 17DA94 8024F1B4 000218C3 */ sra $v1, $v0, 3 /* 17DA98 8024F1B8 000310C0 */ sll $v0, $v1, 3 /* 17DA9C 8024F1BC 02421823 */ subu $v1, $s2, $v0 D_8024F1C0_C0CA40: /* 17DAA0 8024F1C0 00031040 */ sll $v0, $v1, 1 /* 17DAA4 8024F1C4 00431021 */ addu $v0, $v0, $v1 D_8024F1C8: /* 17DAA8 8024F1C8 00022080 */ sll $a0, $v0, 2 /* 17DAAC 8024F1CC 00962021 */ addu $a0, $a0, $s6 D_8024F1D0: /* 17DAB0 8024F1D0 C4800000 */ lwc1 $f0, 0x0($a0) /* 17DAB4 8024F1D4 46000021 */ cvt.d.s $f0, $f0 D_8024F1D8: /* 17DAB8 8024F1D8 46200000 */ add.d $f0, $f0, $f0 /* 17DABC 8024F1DC 44941000 */ mtc1 $s4, $f2 D_8024F1E0: /* 17DAC0 8024F1E0 00000000 */ nop /* 17DAC4 8024F1E4 468010A1 */ cvt.d.w $f2, $f2 D_8024F1E8: /* 17DAC8 8024F1E8 46220002 */ mul.d $f0, $f0, $f2 /* 17DACC 8024F1EC 00000000 */ nop jtbl_8024F1F0: /* 17DAD0 8024F1F0 4600A0A1 */ cvt.d.s $f2, $f20 /* 17DAD4 8024F1F4 46220002 */ mul.d $f0, $f0, $f2 D_8024F1F8_C0CA78: /* 17DAD8 8024F1F8 00000000 */ nop /* 17DADC 8024F1FC 24430001 */ addiu $v1, $v0, 0x1 /* 17DAE0 8024F200 00031880 */ sll $v1, $v1, 2 /* 17DAE4 8024F204 00761821 */ addu $v1, $v1, $s6 D_8024F208: /* 17DAE8 8024F208 46200020 */ cvt.s.d $f0, $f0 /* 17DAEC 8024F20C E600FFCC */ swc1 $f0, -0x34($s0) D_8024F210: /* 17DAF0 8024F210 C4600000 */ lwc1 $f0, 0x0($v1) D_8024F214: /* 17DAF4 8024F214 46000021 */ cvt.d.s $f0, $f0 D_8024F218: /* 17DAF8 8024F218 46200000 */ add.d $f0, $f0, $f0 /* 17DAFC 8024F21C 46220002 */ mul.d $f0, $f0, $f2 D_8024F220: /* 17DB00 8024F220 00000000 */ nop /* 17DB04 8024F224 24420002 */ addiu $v0, $v0, 0x2 D_8024F228: /* 17DB08 8024F228 00021080 */ sll $v0, $v0, 2 /* 17DB0C 8024F22C 00561021 */ addu $v0, $v0, $s6 D_8024F230: /* 17DB10 8024F230 46200020 */ cvt.s.d $f0, $f0 /* 17DB14 8024F234 E600FFD0 */ swc1 $f0, -0x30($s0) D_8024F238: /* 17DB18 8024F238 C4400000 */ lwc1 $f0, 0x0($v0) /* 17DB1C 8024F23C 46000021 */ cvt.d.s $f0, $f0 dro_02_pad_D_8024F240: /* 17DB20 8024F240 46200000 */ add.d $f0, $f0, $f0 /* 17DB24 8024F244 46220002 */ mul.d $f0, $f0, $f2 D_8024F248: /* 17DB28 8024F248 00000000 */ nop /* 17DB2C 8024F24C 46200020 */ cvt.s.d $f0, $f0 /* 17DB30 8024F250 E600FFD4 */ swc1 $f0, -0x2C($s0) /* 17DB34 8024F254 C4800000 */ lwc1 $f0, 0x0($a0) D_8024F258_C0CAD8: /* 17DB38 8024F258 44941000 */ mtc1 $s4, $f2 /* 17DB3C 8024F25C 00000000 */ nop jtbl_8024F260: /* 17DB40 8024F260 468010A0 */ cvt.s.w $f2, $f2 /* 17DB44 8024F264 46020002 */ mul.s $f0, $f0, $f2 /* 17DB48 8024F268 00000000 */ nop /* 17DB4C 8024F26C 46140002 */ mul.s $f0, $f0, $f20 /* 17DB50 8024F270 00000000 */ nop /* 17DB54 8024F274 E600FFC0 */ swc1 $f0, -0x40($s0) /* 17DB58 8024F278 C4600000 */ lwc1 $f0, 0x0($v1) D_8024F27C: /* 17DB5C 8024F27C 46140002 */ mul.s $f0, $f0, $f20 D_8024F280: /* 17DB60 8024F280 00000000 */ nop /* 17DB64 8024F284 E600FFC4 */ swc1 $f0, -0x3C($s0) /* 17DB68 8024F288 C4400000 */ lwc1 $f0, 0x0($v0) /* 17DB6C 8024F28C 46140002 */ mul.s $f0, $f0, $f20 D_8024F290_C0CB10: /* 17DB70 8024F290 00000000 */ nop /* 17DB74 8024F294 26520001 */ addiu $s2, $s2, 0x1 /* 17DB78 8024F298 0220102D */ daddu $v0, $s1, $zero /* 17DB7C 8024F29C 06210002 */ bgez $s1, .L8024F2A8 D_8024F2A0: /* 17DB80 8024F2A0 E600FFC8 */ swc1 $f0, -0x38($s0) D_8024F2A4: /* 17DB84 8024F2A4 26220007 */ addiu $v0, $s1, 0x7 .L8024F2A8: /* 17DB88 8024F2A8 000218C3 */ sra $v1, $v0, 3 D_8024F2AC: /* 17DB8C 8024F2AC 000310C0 */ sll $v0, $v1, 3 D_8024F2B0: /* 17DB90 8024F2B0 02221823 */ subu $v1, $s1, $v0 D_8024F2B4: /* 17DB94 8024F2B4 00031040 */ sll $v0, $v1, 1 D_8024F2B8: /* 17DB98 8024F2B8 00431021 */ addu $v0, $v0, $v1 D_8024F2BC: /* 17DB9C 8024F2BC 00021080 */ sll $v0, $v0, 2 D_8024F2C0: /* 17DBA0 8024F2C0 3C088028 */ lui $t0, %hi(D_80283690) D_8024F2C4: /* 17DBA4 8024F2C4 25083690 */ addiu $t0, $t0, %lo(D_80283690) D_8024F2C8: /* 17DBA8 8024F2C8 00481021 */ addu $v0, $v0, $t0 D_8024F2CC: /* 17DBAC 8024F2CC C4420000 */ lwc1 $f2, 0x0($v0) /* 17DBB0 8024F2D0 46161082 */ mul.s $f2, $f2, $f22 /* 17DBB4 8024F2D4 00000000 */ nop D_8024F2D8: /* 17DBB8 8024F2D8 3C014334 */ lui $at, (0x43340000 >> 16) D_8024F2DC: /* 17DBBC 8024F2DC 44816000 */ mtc1 $at, $f12 D_8024F2E0: /* 17DBC0 8024F2E0 449E0000 */ mtc1 $fp, $f0 D_8024F2E4: /* 17DBC4 8024F2E4 00000000 */ nop D_8024F2E8: /* 17DBC8 8024F2E8 46800020 */ cvt.s.w $f0, $f0 D_8024F2EC: /* 17DBCC 8024F2EC AE00FFE0 */ sw $zero, -0x20($s0) D_8024F2F0_C0CB70: /* 17DBD0 8024F2F0 E600FFE4 */ swc1 $f0, -0x1C($s0) D_8024F2F4: /* 17DBD4 8024F2F4 E602FFEC */ swc1 $f2, -0x14($s0) D_8024F2F8: /* 17DBD8 8024F2F8 3C01800B */ lui $at, %hi(gCameras + 0x5C4) D_8024F2FC: /* 17DBDC 8024F2FC C4202344 */ lwc1 $f0, %lo(gCameras + 0x5C4)($at) D_8024F300: /* 17DBE0 8024F300 0C00A6C9 */ jal clamp_angle D_8024F304: /* 17DBE4 8024F304 46006301 */ sub.s $f12, $f12, $f0 D_8024F308: /* 17DBE8 8024F308 2402000E */ addiu $v0, $zero, 0xE D_8024F30C: /* 17DBEC 8024F30C E600FFE8 */ swc1 $f0, -0x18($s0) D_8024F310: /* 17DBF0 8024F310 AE02FFD8 */ sw $v0, -0x28($s0) D_8024F314: /* 17DBF4 8024F314 8FA80078 */ lw $t0, 0x78($sp) D_8024F318: /* 17DBF8 8024F318 240200F0 */ addiu $v0, $zero, 0xF0 /* 17DBFC 8024F31C AE02FFFC */ sw $v0, -0x4($s0) /* 17DC00 8024F320 12E00003 */ beqz $s7, D_8024F330 /* 17DC04 8024F324 AE08FFDC */ sw $t0, -0x24($s0) D_8024F328_C0CBA8: /* 17DC08 8024F328 2402000A */ addiu $v0, $zero, 0xA /* 17DC0C 8024F32C AE02FFFC */ sw $v0, -0x4($s0) D_8024F330: /* 17DC10 8024F330 26310001 */ addiu $s1, $s1, 0x1 /* 17DC14 8024F334 2673004C */ addiu $s3, $s3, 0x4C D_8024F338: /* 17DC18 8024F338 3C01437F */ lui $at, (0x437F0000 >> 16) /* 17DC1C 8024F33C 44810000 */ mtc1 $at, $f0 /* 17DC20 8024F340 0235102A */ slt $v0, $s1, $s5 /* 17DC24 8024F344 E6000000 */ swc1 $f0, 0x0($s0) /* 17DC28 8024F348 1440FF86 */ bnez $v0, .L8024F164 /* 17DC2C 8024F34C 2610004C */ addiu $s0, $s0, 0x4C .L8024F350: /* 17DC30 8024F350 8FBF003C */ lw $ra, 0x3C($sp) /* 17DC34 8024F354 8FBE0038 */ lw $fp, 0x38($sp) D_8024F358: /* 17DC38 8024F358 8FB70034 */ lw $s7, 0x34($sp) /* 17DC3C 8024F35C 8FB60030 */ lw $s6, 0x30($sp) D_8024F360: /* 17DC40 8024F360 8FB5002C */ lw $s5, 0x2C($sp) /* 17DC44 8024F364 8FB40028 */ lw $s4, 0x28($sp) /* 17DC48 8024F368 8FB30024 */ lw $s3, 0x24($sp) /* 17DC4C 8024F36C 8FB20020 */ lw $s2, 0x20($sp) D_8024F370: /* 17DC50 8024F370 8FB1001C */ lw $s1, 0x1C($sp) D_8024F374: /* 17DC54 8024F374 8FB00018 */ lw $s0, 0x18($sp) D_8024F378: /* 17DC58 8024F378 D7BC0060 */ ldc1 $f28, 0x60($sp) /* 17DC5C 8024F37C D7BA0058 */ ldc1 $f26, 0x58($sp) D_8024F380: /* 17DC60 8024F380 D7B80050 */ ldc1 $f24, 0x50($sp) /* 17DC64 8024F384 D7B60048 */ ldc1 $f22, 0x48($sp) D_8024F388_C0CC08: /* 17DC68 8024F388 D7B40040 */ ldc1 $f20, 0x40($sp) /* 17DC6C 8024F38C 03E00008 */ jr $ra D_8024F390: /* 17DC70 8024F390 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: void show_immune_bonk(f32 x, f32 y, f32 z, s32 numStars, s32 arg4, s32 arg5) { BattleStatus* battleStatus = &gBattleStatus; PopupMessage* popup; Message* message; EntityModelScript** modelScript; f32 var_f20; f32 baseScale; f32* f1; f32* f2; f32* f3; s32 arg5mod8; s32 iMod8; s32 sign; s32 cond; s32 one; s32 two; s32 i; baseScale = 1.0f; cond = FALSE; var_f20 = 1.0f; if (numStars < 1) { numStars = 1; cond = TRUE; baseScale = 0.4f; var_f20 = 0.7f; } if (battleStatus->flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) { baseScale *= 2.0; } popup = btl_create_popup(); if (popup != NULL) { sign = 1; if (arg5 < 0) { arg5 = -arg5; sign = -1; } while (TRUE) { if (arg5 > 5) { arg5 -= 5; } else { break; } } battleStatus->unk_90 = 0; popup->updateFunc = btl_bonk_update; popup->renderWorldFunc = btl_bonk_render; popup->unk_00 = 0; popup->renderUIFunc = NULL; popup->messageIndex = 1; popup->active |= 0x10; message = popup->message = heap_malloc(numStars * sizeof(*popup->message)); ASSERT (popup->message != NULL); for (i = 0; i < numStars; i++, message++) { modelScript = &bBonkModelScripts[numStars]; message->unk_00 = TRUE; message->entityModelIndex = load_entity_model(*modelScript); set_entity_model_flags(message->entityModelIndex, ENTITY_MODEL_FLAG_HIDDEN); bind_entity_model_setupGfx(message->entityModelIndex, message, btl_bonk_setup_gfx); message->pos.x = x; message->pos.y = y; message->pos.z = z; arg5mod8 = arg5 % 8; arg5++; one = 1; two = 2; f1 = &D_802835DC[arg5mod8 * 3]; f2 = &D_802835DC[arg5mod8 * 3 + one]; f3 = &D_802835DC[arg5mod8 * 3 + two]; message->vel.x = 2.0 * *f1 * sign * var_f20; message->vel.y = 2.0 * *f2 * var_f20; message->vel.z = 2.0 * *f3 * var_f20; message->accel.x = *f1 * sign * var_f20; message->accel.y = *f2 * var_f20; message->accel.z = *f3 * var_f20; iMod8 = (i % 8); message->scale = D_80283690[iMod8].x * baseScale; message->rotZ = 0; message->rotVelZ = sign * 107; message->rotY = clamp_angle(180.0f - gCameras[CAM_BATTLE].currentYaw); message->appearTime = 14; message->unk_24 = arg4; message->deleteTime = 240; if (cond) { message->deleteTime = 10; } message->unk_48 = 255.0f; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8024BDA4 /* 17A684 8024BDA4 27BDFFB0 */ addiu $sp, $sp, -0x50 D_8024BDA8: /* 17A688 8024BDA8 AFB00018 */ sw $s0, 0x18($sp) /* 17A68C 8024BDAC 3C10800B */ lui $s0, %hi(gCameras + 0x558) /* 17A690 8024BDB0 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558) /* 17A694 8024BDB4 AFBF001C */ sw $ra, 0x1C($sp) .L8024BDB8: /* 17A698 8024BDB8 F7BE0048 */ sdc1 $f30, 0x48($sp) /* 17A69C 8024BDBC F7BC0040 */ sdc1 $f28, 0x40($sp) /* 17A6A0 8024BDC0 F7BA0038 */ sdc1 $f26, 0x38($sp) /* 17A6A4 8024BDC4 F7B80030 */ sdc1 $f24, 0x30($sp) D_8024BDC8_C09648: /* 17A6A8 8024BDC8 F7B60028 */ sdc1 $f22, 0x28($sp) D_8024BDCC: /* 17A6AC 8024BDCC F7B40020 */ sdc1 $f20, 0x20($sp) hos_03_Quizmo_Worker: /* 17A6B0 8024BDD0 10A00037 */ beqz $a1, .L8024BEB0 /* 17A6B4 8024BDD4 24020008 */ addiu $v0, $zero, 0x8 /* 17A6B8 8024BDD8 86040026 */ lh $a0, 0x26($s0) /* 17A6BC 8024BDDC 3C01420C */ lui $at, (0x420C0000 >> 16) /* 17A6C0 8024BDE0 44810000 */ mtc1 $at, $f0 /* 17A6C4 8024BDE4 3C014270 */ lui $at, (0x42700000 >> 16) hos_03_Quizmo_AnswerResult: /* 17A6C8 8024BDE8 44811000 */ mtc1 $at, $f2 /* 17A6CC 8024BDEC 8603001E */ lh $v1, 0x1E($s0) hos_03_Quizmo_StageEffect: /* 17A6D0 8024BDF0 3C01802A */ lui $at, %hi(BattleCam_BoomPitch) hos_03_Quizmo_AudienceEffect: /* 17A6D4 8024BDF4 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at) hos_03_Quizmo_VannaTEffect: /* 17A6D8 8024BDF8 86020022 */ lh $v0, 0x22($s0) /* 17A6DC 8024BDFC 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 17A6E0 8024BE00 E420F270 */ swc1 $f0, %lo(BattleCam_PosX)($at) /* 17A6E4 8024BE04 44830000 */ mtc1 $v1, $f0 /* 17A6E8 8024BE08 00000000 */ nop /* 17A6EC 8024BE0C 46800020 */ cvt.s.w $f0, $f0 /* 17A6F0 8024BE10 86030024 */ lh $v1, 0x24($s0) /* 17A6F4 8024BE14 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17A6F8 8024BE18 AC20F278 */ sw $zero, %lo(BattleCam_PosZ)($at) /* 17A6FC 8024BE1C 3C01802A */ lui $at, %hi(BattleCam_BoomYaw) /* 17A700 8024BE20 A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at) /* 17A704 8024BE24 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) D_8024BE28_C096A8: /* 17A708 8024BE28 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at) /* 17A70C 8024BE2C 44820000 */ mtc1 $v0, $f0 /* 17A710 8024BE30 00000000 */ nop /* 17A714 8024BE34 46800020 */ cvt.s.w $f0, $f0 D_8024BE38: /* 17A718 8024BE38 3C01802A */ lui $at, %hi(BattleCam_PosY) /* 17A71C 8024BE3C E422F274 */ swc1 $f2, %lo(BattleCam_PosY)($at) D_8024BE40_D2BCD0: /* 17A720 8024BE40 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) .L8024BE44: /* 17A724 8024BE44 E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) D_8024BE48_D2BCD8: /* 17A728 8024BE48 44830000 */ mtc1 $v1, $f0 /* 17A72C 8024BE4C 00000000 */ nop D_8024BE50_D2BCE0: /* 17A730 8024BE50 46800020 */ cvt.s.w $f0, $f0 /* 17A734 8024BE54 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) jtbl_8024BE58: /* 17A738 8024BE58 E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at) /* 17A73C 8024BE5C 04820001 */ bltzl $a0, .L8024BE64 D_8024BE60_C096E0: /* 17A740 8024BE60 248400FF */ addiu $a0, $a0, 0xFF .L8024BE64: /* 17A744 8024BE64 00041203 */ sra $v0, $a0, 8 /* 17A748 8024BE68 C6020054 */ lwc1 $f2, 0x54($s0) /* 17A74C 8024BE6C C6040058 */ lwc1 $f4, 0x58($s0) /* 17A750 8024BE70 C606005C */ lwc1 $f6, 0x5C($s0) /* 17A754 8024BE74 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft) /* 17A758 8024BE78 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1) /* 17A75C 8024BE7C 44820000 */ mtc1 $v0, $f0 /* 17A760 8024BE80 00000000 */ nop .L8024BE84: /* 17A764 8024BE84 46800020 */ cvt.s.w $f0, $f0 D_8024BE88: /* 17A768 8024BE88 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 17A76C 8024BE8C E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at) /* 17A770 8024BE90 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17A774 8024BE94 E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at) /* 17A778 8024BE98 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 17A77C 8024BE9C E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at) D_8024BEA0: /* 17A780 8024BEA0 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 17A784 8024BEA4 E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at) /* 17A788 8024BEA8 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal) /* 17A78C 8024BEAC A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at) .L8024BEB0: /* 17A790 8024BEB0 3C01802A */ lui $at, %hi(BattleCam_PosY) /* 17A794 8024BEB4 C43CF274 */ lwc1 $f28, %lo(BattleCam_PosY)($at) /* 17A798 8024BEB8 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 17A79C 8024BEBC C43AF270 */ lwc1 $f26, %lo(BattleCam_PosX)($at) D_8024BEC0_C09740: /* 17A7A0 8024BEC0 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp) /* 17A7A4 8024BEC4 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0) /* 17A7A8 8024BEC8 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17A7AC 8024BECC C43EF278 */ lwc1 $f30, %lo(BattleCam_PosZ)($at) /* 17A7B0 8024BED0 14400027 */ bnez $v0, .L8024BF70 /* 17A7B4 8024BED4 E7BC0010 */ swc1 $f28, 0x10($sp) /* 17A7B8 8024BED8 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17A7BC 8024BEDC 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17A7C0 8024BEE0 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17A7C4 8024BEE4 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17A7C8 8024BEE8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17A7CC 8024BEEC 4481C000 */ mtc1 $at, $f24 .L8024BEF0: /* 17A7D0 8024BEF0 44822000 */ mtc1 $v0, $f4 .L8024BEF4: /* 17A7D4 8024BEF4 00000000 */ nop D_8024BEF8_C09778: /* 17A7D8 8024BEF8 46802120 */ cvt.s.w $f4, $f4 /* 17A7DC 8024BEFC 44830000 */ mtc1 $v1, $f0 /* 17A7E0 8024BF00 00000000 */ nop /* 17A7E4 8024BF04 46800020 */ cvt.s.w $f0, $f0 /* 17A7E8 8024BF08 46002103 */ div.s $f4, $f4, $f0 /* 17A7EC 8024BF0C 4604C301 */ sub.s $f12, $f24, $f4 D_8024BF10: /* 17A7F0 8024BF10 3C014049 */ lui $at, (0x40490FD0 >> 16) /* 17A7F4 8024BF14 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF) /* 17A7F8 8024BF18 4481B000 */ mtc1 $at, $f22 /* 17A7FC 8024BF1C 00000000 */ nop /* 17A800 8024BF20 46166302 */ mul.s $f12, $f12, $f22 /* 17A804 8024BF24 00000000 */ nop /* 17A808 8024BF28 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 17A80C 8024BF2C 4481A000 */ mtc1 $at, $f20 D_8024BF30: /* 17A810 8024BF30 00000000 */ nop D_8024BF34: /* 17A814 8024BF34 46146302 */ mul.s $f12, $f12, $f20 /* 17A818 8024BF38 0C00A85B */ jal sin_rad /* 17A81C 8024BF3C 00000000 */ nop /* 17A820 8024BF40 46160002 */ mul.s $f0, $f0, $f22 /* 17A824 8024BF44 00000000 */ nop /* 17A828 8024BF48 46140302 */ mul.s $f12, $f0, $f20 /* 17A82C 8024BF4C 0C00A85B */ jal sin_rad /* 17A830 8024BF50 00000000 */ nop /* 17A834 8024BF54 46160002 */ mul.s $f0, $f0, $f22 D_8024BF58_C097D8: /* 17A838 8024BF58 00000000 */ nop /* 17A83C 8024BF5C 46140302 */ mul.s $f12, $f0, $f20 /* 17A840 8024BF60 0C00A85B */ jal sin_rad /* 17A844 8024BF64 00000000 */ nop /* 17A848 8024BF68 08092FE7 */ j .L8024BF9C /* 17A84C 8024BF6C 4600C101 */ sub.s $f4, $f24, $f0 .L8024BF70: /* 17A850 8024BF70 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17A854 8024BF74 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17A858 8024BF78 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17A85C 8024BF7C 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17A860 8024BF80 44822000 */ mtc1 $v0, $f4 /* 17A864 8024BF84 00000000 */ nop jtbl_8024BF88: /* 17A868 8024BF88 46802120 */ cvt.s.w $f4, $f4 /* 17A86C 8024BF8C 44830000 */ mtc1 $v1, $f0 D_8024BF90_C09810: /* 17A870 8024BF90 00000000 */ nop /* 17A874 8024BF94 46800020 */ cvt.s.w $f0, $f0 /* 17A878 8024BF98 46002103 */ div.s $f4, $f4, $f0 .L8024BF9C: /* 17A87C 8024BF9C 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) jtbl_8024BFA0: /* 17A880 8024BFA0 C434F2A8 */ lwc1 $f20, %lo(BattleCam_InitialPosX)($at) /* 17A884 8024BFA4 4604A502 */ mul.s $f20, $f20, $f4 /* 17A888 8024BFA8 00000000 */ nop .L8024BFAC: /* 17A88C 8024BFAC 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 17A890 8024BFB0 C432F2AC */ lwc1 $f18, %lo(BattleCam_InitialPosY)($at) /* 17A894 8024BFB4 46049482 */ mul.s $f18, $f18, $f4 jtbl_8024BFB8: /* 17A898 8024BFB8 00000000 */ nop /* 17A89C 8024BFBC 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 17A8A0 8024BFC0 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at) /* 17A8A4 8024BFC4 46048402 */ mul.s $f16, $f16, $f4 D_8024BFC8_C09848: /* 17A8A8 8024BFC8 00000000 */ nop /* 17A8AC 8024BFCC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) jtbl_8024BFD0: /* 17A8B0 8024BFD0 C426F298 */ lwc1 $f6, %lo(BattleCam_InitialBoomZOffset)($at) /* 17A8B4 8024BFD4 46043182 */ mul.s $f6, $f6, $f4 /* 17A8B8 8024BFD8 00000000 */ nop D_8024BFDC: /* 17A8BC 8024BFDC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 17A8C0 8024BFE0 C42CF28C */ lwc1 $f12, %lo(BattleCam_InitialBoomLength)($at) /* 17A8C4 8024BFE4 46046302 */ mul.s $f12, $f12, $f4 jtbl_8024BFE8: /* 17A8C8 8024BFE8 00000000 */ nop /* 17A8CC 8024BFEC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17A8D0 8024BFF0 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at) /* 17A8D4 8024BFF4 46044202 */ mul.s $f8, $f8, $f4 /* 17A8D8 8024BFF8 00000000 */ nop /* 17A8DC 8024BFFC 3C013F80 */ lui $at, (0x3F800000 >> 16) jtbl_8024C000: /* 17A8E0 8024C000 44811000 */ mtc1 $at, $f2 /* 17A8E4 8024C004 00000000 */ nop /* 17A8E8 8024C008 46041081 */ sub.s $f2, $f2, $f4 /* 17A8EC 8024C00C 4602D682 */ mul.s $f26, $f26, $f2 /* 17A8F0 8024C010 00000000 */ nop /* 17A8F4 8024C014 C7BC0010 */ lwc1 $f28, 0x10($sp) jtbl_8024C018: /* 17A8F8 8024C018 4602E602 */ mul.s $f24, $f28, $f2 /* 17A8FC 8024C01C 00000000 */ nop /* 17A900 8024C020 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset) /* 17A904 8024C024 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0) /* 17A908 8024C028 44820000 */ mtc1 $v0, $f0 /* 17A90C 8024C02C 00000000 */ nop D_8024C030_C098B0: /* 17A910 8024C030 46800020 */ cvt.s.w $f0, $f0 /* 17A914 8024C034 46020002 */ mul.s $f0, $f0, $f2 D_8024C038: /* 17A918 8024C038 00000000 */ nop /* 17A91C 8024C03C 4602F582 */ mul.s $f22, $f30, $f2 D_8024C040: /* 17A920 8024C040 00000000 */ nop /* 17A924 8024C044 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) glabel func_8024C048 /* 17A928 8024C048 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0) /* 17A92C 8024C04C 44827000 */ mtc1 $v0, $f14 /* 17A930 8024C050 00000000 */ nop /* 17A934 8024C054 468073A0 */ cvt.s.w $f14, $f14 /* 17A938 8024C058 46027382 */ mul.s $f14, $f14, $f2 D_8024C05C: /* 17A93C 8024C05C 00000000 */ nop jtbl_8024C060: /* 17A940 8024C060 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw) /* 17A944 8024C064 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0) D_8024C068: /* 17A948 8024C068 44825000 */ mtc1 $v0, $f10 /* 17A94C 8024C06C 00000000 */ nop /* 17A950 8024C070 468052A0 */ cvt.s.w $f10, $f10 /* 17A954 8024C074 46025282 */ mul.s $f10, $f10, $f2 /* 17A958 8024C078 00000000 */ nop /* 17A95C 8024C07C 46003180 */ add.s $f6, $f6, $f0 filemenu_iterFileIdx: /* 17A960 8024C080 3C014380 */ lui $at, (0x43800000 >> 16) D_8024C084: /* 17A964 8024C084 44810000 */ mtc1 $at, $f0 D_8024C088: /* 17A968 8024C088 00000000 */ nop D_8024C08C: /* 17A96C 8024C08C 46003182 */ mul.s $f6, $f6, $f0 D_8024C090: /* 17A970 8024C090 00000000 */ nop D_8024C094: /* 17A974 8024C094 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) D_8024C098_C09918: /* 17A978 8024C098 C420F294 */ lwc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) D_8024C09C: /* 17A97C 8024C09C 46040002 */ mul.s $f0, $f0, $f4 D_8024C0A0: /* 17A980 8024C0A0 00000000 */ nop D_8024C0A4: /* 17A984 8024C0A4 461AA500 */ add.s $f20, $f20, $f26 /* 17A988 8024C0A8 46189480 */ add.s $f18, $f18, $f24 /* 17A98C 8024C0AC 46168400 */ add.s $f16, $f16, $f22 D_8024C0B0: /* 17A990 8024C0B0 460E6300 */ add.s $f12, $f12, $f14 /* 17A994 8024C0B4 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft) D_8024C0B8: /* 17A998 8024C0B8 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft) /* 17A99C 8024C0BC 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch) /* 17A9A0 8024C0C0 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0) /* 17A9A4 8024C0C4 460A4200 */ add.s $f8, $f8, $f10 /* 17A9A8 8024C0C8 E6140054 */ swc1 $f20, 0x54($s0) /* 17A9AC 8024C0CC 44822000 */ mtc1 $v0, $f4 /* 17A9B0 8024C0D0 00000000 */ nop /* 17A9B4 8024C0D4 46802120 */ cvt.s.w $f4, $f4 /* 17A9B8 8024C0D8 46022102 */ mul.s $f4, $f4, $f2 /* 17A9BC 8024C0DC 00000000 */ nop glabel func_8024C0E0 /* 17A9C0 8024C0E0 E6120058 */ swc1 $f18, 0x58($s0) /* 17A9C4 8024C0E4 E610005C */ swc1 $f16, 0x5C($s0) /* 17A9C8 8024C0E8 4600670D */ trunc.w.s $f28, $f12 /* 17A9CC 8024C0EC 4402E000 */ mfc1 $v0, $f28 /* 17A9D0 8024C0F0 00000000 */ nop /* 17A9D4 8024C0F4 A602001E */ sh $v0, 0x1E($s0) /* 17A9D8 8024C0F8 46040000 */ add.s $f0, $f0, $f4 /* 17A9DC 8024C0FC 4600470D */ trunc.w.s $f28, $f8 D_8024C100_C09980: /* 17A9E0 8024C100 4402E000 */ mfc1 $v0, $f28 /* 17A9E4 8024C104 00000000 */ nop D_8024C108: /* 17A9E8 8024C108 A6020024 */ sh $v0, 0x24($s0) /* 17A9EC 8024C10C 4600070D */ trunc.w.s $f28, $f0 D_8024C110: /* 17A9F0 8024C110 4402E000 */ mfc1 $v0, $f28 /* 17A9F4 8024C114 00000000 */ nop /* 17A9F8 8024C118 A6020022 */ sh $v0, 0x22($s0) /* 17A9FC 8024C11C 4600370D */ trunc.w.s $f28, $f6 D_8024C120: /* 17AA00 8024C120 4402E000 */ mfc1 $v0, $f28 /* 17AA04 8024C124 00000000 */ nop /* 17AA08 8024C128 A6020026 */ sh $v0, 0x26($s0) .L8024C12C: /* 17AA0C 8024C12C 84820000 */ lh $v0, 0x0($a0) /* 17AA10 8024C130 94830000 */ lhu $v1, 0x0($a0) /* 17AA14 8024C134 14400006 */ bnez $v0, .L8024C150 /* 17AA18 8024C138 2462FFFF */ addiu $v0, $v1, -0x1 /* 17AA1C 8024C13C 24020001 */ addiu $v0, $zero, 0x1 /* 17AA20 8024C140 3C01802A */ lui $at, %hi(BattleCam_DoneMoving) /* 17AA24 8024C144 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at) /* 17AA28 8024C148 08093055 */ j .L8024C154 /* 17AA2C 8024C14C 00000000 */ nop .L8024C150: /* 17AA30 8024C150 A4820000 */ sh $v0, 0x0($a0) .L8024C154: /* 17AA34 8024C154 8FBF001C */ lw $ra, 0x1C($sp) /* 17AA38 8024C158 8FB00018 */ lw $s0, 0x18($sp) /* 17AA3C 8024C15C D7BE0048 */ ldc1 $f30, 0x48($sp) .L8024C160: /* 17AA40 8024C160 D7BC0040 */ ldc1 $f28, 0x40($sp) /* 17AA44 8024C164 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 17AA48 8024C168 D7B80030 */ ldc1 $f24, 0x30($sp) /* 17AA4C 8024C16C D7B60028 */ ldc1 $f22, 0x28($sp) /* 17AA50 8024C170 D7B40020 */ ldc1 $f20, 0x20($sp) /* 17AA54 8024C174 0000102D */ daddu $v0, $zero, $zero /* 17AA58 8024C178 03E00008 */ jr $ra /* 17AA5C 8024C17C 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[CAM_BATTLE]; f32 alpha; f32 x, y, z; if (isInitialCall) { BattleCam_PosX = 35.0f; BattleCam_PosY = 60.0f; BattleCam_PosZ = 0.0f; BattleCam_BoomPitch = 8; BattleCam_BoomYaw = 0; 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(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2); } else { alpha = BattleCam_MoveTimeLeft; alpha /= BattleCam_MoveTimeTotal; } camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha); camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha); camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha); camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f; 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 initialize_status_bar /* 80DE4 800E7934 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 80DE8 800E7938 AFB10014 */ sw $s1, 0x14($sp) /* 80DEC 800E793C 3C118011 */ lui $s1, %hi(gUIStatus) /* 80DF0 800E7940 2631EF58 */ addiu $s1, $s1, %lo(gUIStatus) /* 80DF4 800E7944 2402000C */ addiu $v0, $zero, 0xC /* 80DF8 800E7948 AFBF001C */ sw $ra, 0x1C($sp) /* 80DFC 800E794C AFB20018 */ sw $s2, 0x18($sp) /* 80E00 800E7950 AFB00010 */ sw $s0, 0x10($sp) /* 80E04 800E7954 A6220034 */ sh $v0, 0x34($s1) /* 80E08 800E7958 2402FF9C */ addiu $v0, $zero, -0x64 /* 80E0C 800E795C 3C038011 */ lui $v1, %hi(gPlayerData) /* 80E10 800E7960 2463F290 */ addiu $v1, $v1, %lo(gPlayerData) /* 80E14 800E7964 3C018011 */ lui $at, %hi(D_8010CD10) /* 80E18 800E7968 A420CD10 */ sh $zero, %lo(D_8010CD10)($at) /* 80E1C 800E796C 3C018011 */ lui $at, %hi(D_8010CD12) /* 80E20 800E7970 A420CD12 */ sh $zero, %lo(D_8010CD12)($at) /* 80E24 800E7974 A6220036 */ sh $v0, 0x36($s1) /* 80E28 800E7978 A220003A */ sb $zero, 0x3A($s1) /* 80E2C 800E797C 90640010 */ lbu $a0, 0x10($v1) /* 80E30 800E7980 240200D2 */ addiu $v0, $zero, 0xD2 /* 80E34 800E7984 A6220038 */ sh $v0, 0x38($s1) /* 80E38 800E7988 A220003B */ sb $zero, 0x3B($s1) /* 80E3C 800E798C A2200044 */ sb $zero, 0x44($s1) /* 80E40 800E7990 A2200045 */ sb $zero, 0x45($s1) /* 80E44 800E7994 A2200046 */ sb $zero, 0x46($s1) /* 80E48 800E7998 A220004A */ sb $zero, 0x4A($s1) /* 80E4C 800E799C A220004B */ sb $zero, 0x4B($s1) /* 80E50 800E79A0 A220004C */ sb $zero, 0x4C($s1) /* 80E54 800E79A4 A220004D */ sb $zero, 0x4D($s1) /* 80E58 800E79A8 A220004E */ sb $zero, 0x4E($s1) /* 80E5C 800E79AC A220004F */ sb $zero, 0x4F($s1) /* 80E60 800E79B0 A2200050 */ sb $zero, 0x50($s1) /* 80E64 800E79B4 A2200051 */ sb $zero, 0x51($s1) /* 80E68 800E79B8 A2200054 */ sb $zero, 0x54($s1) /* 80E6C 800E79BC A2200055 */ sb $zero, 0x55($s1) /* 80E70 800E79C0 A2200056 */ sb $zero, 0x56($s1) /* 80E74 800E79C4 A2200047 */ sb $zero, 0x47($s1) /* 80E78 800E79C8 A2200052 */ sb $zero, 0x52($s1) /* 80E7C 800E79CC 90620002 */ lbu $v0, 0x2($v1) /* 80E80 800E79D0 90650005 */ lbu $a1, 0x5($v1) /* 80E84 800E79D4 9466000C */ lhu $a2, 0xC($v1) /* 80E88 800E79D8 94630290 */ lhu $v1, 0x290($v1) /* 80E8C 800E79DC 00042600 */ sll $a0, $a0, 24 /* 80E90 800E79E0 00042603 */ sra $a0, $a0, 24 /* 80E94 800E79E4 A222003D */ sb $v0, 0x3D($s1) /* 80E98 800E79E8 2402FFFF */ addiu $v0, $zero, -0x1 /* 80E9C 800E79EC A225003E */ sb $a1, 0x3E($s1) /* 80EA0 800E79F0 A6260040 */ sh $a2, 0x40($s1) /* 80EA4 800E79F4 A6240042 */ sh $a0, 0x42($s1) /* 80EA8 800E79F8 A6230048 */ sh $v1, 0x48($s1) /* 80EAC 800E79FC A2200053 */ sb $zero, 0x53($s1) /* 80EB0 800E7A00 A222006E */ sb $v0, 0x6E($s1) /* 80EB4 800E7A04 2402FFFF */ addiu $v0, $zero, -0x1 /* 80EB8 800E7A08 A220003C */ sb $zero, 0x3C($s1) /* 80EBC 800E7A0C A2200057 */ sb $zero, 0x57($s1) /* 80EC0 800E7A10 A2200058 */ sb $zero, 0x58($s1) /* 80EC4 800E7A14 A2200059 */ sb $zero, 0x59($s1) /* 80EC8 800E7A18 A220005A */ sb $zero, 0x5A($s1) /* 80ECC 800E7A1C A220006C */ sb $zero, 0x6C($s1) /* 80ED0 800E7A20 A220006D */ sb $zero, 0x6D($s1) /* 80ED4 800E7A24 0C03A5EE */ jal close_status_bar /* 80ED8 800E7A28 AE220064 */ sw $v0, 0x64($s1) /* 80EDC 800E7A2C 3C048011 */ lui $a0, %hi(HES_StatusHP) /* 80EE0 800E7A30 24848248 */ addiu $a0, $a0, %lo(HES_StatusHP) /* 80EE4 800E7A34 0C050529 */ jal hud_element_create /* 80EE8 800E7A38 00000000 */ nop /* 80EEC 800E7A3C 0040802D */ daddu $s0, $v0, $zero /* 80EF0 800E7A40 0200202D */ daddu $a0, $s0, $zero /* 80EF4 800E7A44 24050080 */ addiu $a1, $zero, 0x80 /* 80EF8 800E7A48 0C051280 */ jal hud_element_set_flags /* 80EFC 800E7A4C AE300000 */ sw $s0, 0x0($s1) /* 80F00 800E7A50 0200202D */ daddu $a0, $s0, $zero /* 80F04 800E7A54 0C05128B */ jal hud_element_clear_flags /* 80F08 800E7A58 34058000 */ ori $a1, $zero, 0x8000 /* 80F0C 800E7A5C 3C048011 */ lui $a0, %hi(HES_StatusHeart) /* 80F10 800E7A60 24848518 */ addiu $a0, $a0, %lo(HES_StatusHeart) /* 80F14 800E7A64 0C050529 */ jal hud_element_create /* 80F18 800E7A68 00000000 */ nop /* 80F1C 800E7A6C 0040802D */ daddu $s0, $v0, $zero /* 80F20 800E7A70 0200202D */ daddu $a0, $s0, $zero /* 80F24 800E7A74 24050080 */ addiu $a1, $zero, 0x80 /* 80F28 800E7A78 0C051280 */ jal hud_element_set_flags /* 80F2C 800E7A7C AE300004 */ sw $s0, 0x4($s1) /* 80F30 800E7A80 0200202D */ daddu $a0, $s0, $zero /* 80F34 800E7A84 0C05128B */ jal hud_element_clear_flags /* 80F38 800E7A88 34058000 */ ori $a1, $zero, 0x8000 /* 80F3C 800E7A8C 3C048011 */ lui $a0, %hi(HES_StatusFP) /* 80F40 800E7A90 24848270 */ addiu $a0, $a0, %lo(HES_StatusFP) /* 80F44 800E7A94 0C050529 */ jal hud_element_create /* 80F48 800E7A98 00000000 */ nop /* 80F4C 800E7A9C 0040802D */ daddu $s0, $v0, $zero /* 80F50 800E7AA0 0200202D */ daddu $a0, $s0, $zero /* 80F54 800E7AA4 24050080 */ addiu $a1, $zero, 0x80 /* 80F58 800E7AA8 0C051280 */ jal hud_element_set_flags /* 80F5C 800E7AAC AE300008 */ sw $s0, 0x8($s1) /* 80F60 800E7AB0 0200202D */ daddu $a0, $s0, $zero /* 80F64 800E7AB4 0C05128B */ jal hud_element_clear_flags /* 80F68 800E7AB8 34058000 */ ori $a1, $zero, 0x8000 /* 80F6C 800E7ABC 3C048011 */ lui $a0, %hi(HES_StatusFlower) /* 80F70 800E7AC0 24848538 */ addiu $a0, $a0, %lo(HES_StatusFlower) /* 80F74 800E7AC4 0C050529 */ jal hud_element_create /* 80F78 800E7AC8 00000000 */ nop /* 80F7C 800E7ACC 0040802D */ daddu $s0, $v0, $zero /* 80F80 800E7AD0 0200202D */ daddu $a0, $s0, $zero /* 80F84 800E7AD4 24050080 */ addiu $a1, $zero, 0x80 /* 80F88 800E7AD8 0C051280 */ jal hud_element_set_flags /* 80F8C 800E7ADC AE30000C */ sw $s0, 0xC($s1) /* 80F90 800E7AE0 0200202D */ daddu $a0, $s0, $zero /* 80F94 800E7AE4 0C05128B */ jal hud_element_clear_flags /* 80F98 800E7AE8 34058000 */ ori $a1, $zero, 0x8000 /* 80F9C 800E7AEC 3C048011 */ lui $a0, %hi(HES_StatusCoin) /* 80FA0 800E7AF0 24848558 */ addiu $a0, $a0, %lo(HES_StatusCoin) /* 80FA4 800E7AF4 0C050529 */ jal hud_element_create /* 80FA8 800E7AF8 00000000 */ nop /* 80FAC 800E7AFC 0040802D */ daddu $s0, $v0, $zero /* 80FB0 800E7B00 0200202D */ daddu $a0, $s0, $zero /* 80FB4 800E7B04 24050080 */ addiu $a1, $zero, 0x80 /* 80FB8 800E7B08 0C051280 */ jal hud_element_set_flags /* 80FBC 800E7B0C AE300010 */ sw $s0, 0x10($s1) /* 80FC0 800E7B10 0200202D */ daddu $a0, $s0, $zero /* 80FC4 800E7B14 0C05128B */ jal hud_element_clear_flags /* 80FC8 800E7B18 34058000 */ ori $a1, $zero, 0x8000 /* 80FCC 800E7B1C 3C048008 */ lui $a0, %hi(HES_Item_CoinSparkleRandom) /* 80FD0 800E7B20 24840FC4 */ addiu $a0, $a0, %lo(HES_Item_CoinSparkleRandom) /* 80FD4 800E7B24 0C050529 */ jal hud_element_create /* 80FD8 800E7B28 00000000 */ nop /* 80FDC 800E7B2C 0040802D */ daddu $s0, $v0, $zero /* 80FE0 800E7B30 0200202D */ daddu $a0, $s0, $zero /* 80FE4 800E7B34 24050080 */ addiu $a1, $zero, 0x80 /* 80FE8 800E7B38 0C051280 */ jal hud_element_set_flags /* 80FEC 800E7B3C AE300014 */ sw $s0, 0x14($s1) /* 80FF0 800E7B40 0200202D */ daddu $a0, $s0, $zero /* 80FF4 800E7B44 0C05128B */ jal hud_element_clear_flags /* 80FF8 800E7B48 34058000 */ ori $a1, $zero, 0x8000 /* 80FFC 800E7B4C 3C048011 */ lui $a0, %hi(HES_StatusStarPoint) /* 81000 800E7B50 248486AC */ addiu $a0, $a0, %lo(HES_StatusStarPoint) /* 81004 800E7B54 0C050529 */ jal hud_element_create /* 81008 800E7B58 00000000 */ nop /* 8100C 800E7B5C 0040802D */ daddu $s0, $v0, $zero /* 81010 800E7B60 0200202D */ daddu $a0, $s0, $zero /* 81014 800E7B64 24050080 */ addiu $a1, $zero, 0x80 /* 81018 800E7B68 0C051280 */ jal hud_element_set_flags /* 8101C 800E7B6C AE300018 */ sw $s0, 0x18($s1) /* 81020 800E7B70 0200202D */ daddu $a0, $s0, $zero /* 81024 800E7B74 0C05128B */ jal hud_element_clear_flags /* 81028 800E7B78 34058000 */ ori $a1, $zero, 0x8000 /* 8102C 800E7B7C 3C048010 */ lui $a0, %hi(HES_StatusSPShine) /* 81030 800E7B80 24844BEC */ addiu $a0, $a0, %lo(HES_StatusSPShine) /* 81034 800E7B84 0C050529 */ jal hud_element_create /* 81038 800E7B88 00000000 */ nop /* 8103C 800E7B8C 0040802D */ daddu $s0, $v0, $zero /* 81040 800E7B90 0200202D */ daddu $a0, $s0, $zero /* 81044 800E7B94 24050080 */ addiu $a1, $zero, 0x80 /* 81048 800E7B98 0C051280 */ jal hud_element_set_flags /* 8104C 800E7B9C AE30001C */ sw $s0, 0x1C($s1) /* 81050 800E7BA0 0200202D */ daddu $a0, $s0, $zero /* 81054 800E7BA4 0C05128B */ jal hud_element_clear_flags /* 81058 800E7BA8 34058000 */ ori $a1, $zero, 0x8000 /* 8105C 800E7BAC 3C128011 */ lui $s2, %hi(HES_StatusTimes) /* 81060 800E7BB0 26528068 */ addiu $s2, $s2, %lo(HES_StatusTimes) /* 81064 800E7BB4 0C050529 */ jal hud_element_create /* 81068 800E7BB8 0240202D */ daddu $a0, $s2, $zero /* 8106C 800E7BBC 0040802D */ daddu $s0, $v0, $zero /* 81070 800E7BC0 0200202D */ daddu $a0, $s0, $zero /* 81074 800E7BC4 24050082 */ addiu $a1, $zero, 0x82 /* 81078 800E7BC8 0C051280 */ jal hud_element_set_flags /* 8107C 800E7BCC AE300020 */ sw $s0, 0x20($s1) /* 81080 800E7BD0 0200202D */ daddu $a0, $s0, $zero /* 81084 800E7BD4 0C05128B */ jal hud_element_clear_flags /* 81088 800E7BD8 34058000 */ ori $a1, $zero, 0x8000 /* 8108C 800E7BDC 0C050529 */ jal hud_element_create /* 81090 800E7BE0 0240202D */ daddu $a0, $s2, $zero /* 81094 800E7BE4 0040802D */ daddu $s0, $v0, $zero /* 81098 800E7BE8 0200202D */ daddu $a0, $s0, $zero /* 8109C 800E7BEC 24050082 */ addiu $a1, $zero, 0x82 /* 810A0 800E7BF0 0C051280 */ jal hud_element_set_flags /* 810A4 800E7BF4 AE300024 */ sw $s0, 0x24($s1) /* 810A8 800E7BF8 0200202D */ daddu $a0, $s0, $zero /* 810AC 800E7BFC 0C05128B */ jal hud_element_clear_flags /* 810B0 800E7C00 34058000 */ ori $a1, $zero, 0x8000 /* 810B4 800E7C04 0C050529 */ jal hud_element_create /* 810B8 800E7C08 0240202D */ daddu $a0, $s2, $zero /* 810BC 800E7C0C 0040802D */ daddu $s0, $v0, $zero /* 810C0 800E7C10 0200202D */ daddu $a0, $s0, $zero /* 810C4 800E7C14 24050082 */ addiu $a1, $zero, 0x82 /* 810C8 800E7C18 0C051280 */ jal hud_element_set_flags /* 810CC 800E7C1C AE300028 */ sw $s0, 0x28($s1) /* 810D0 800E7C20 0200202D */ daddu $a0, $s0, $zero /* 810D4 800E7C24 0C05128B */ jal hud_element_clear_flags /* 810D8 800E7C28 34058000 */ ori $a1, $zero, 0x8000 /* 810DC 800E7C2C 0C050529 */ jal hud_element_create /* 810E0 800E7C30 0240202D */ daddu $a0, $s2, $zero /* 810E4 800E7C34 0040802D */ daddu $s0, $v0, $zero /* 810E8 800E7C38 0200202D */ daddu $a0, $s0, $zero /* 810EC 800E7C3C 24050082 */ addiu $a1, $zero, 0x82 /* 810F0 800E7C40 0C051280 */ jal hud_element_set_flags /* 810F4 800E7C44 AE30002C */ sw $s0, 0x2C($s1) /* 810F8 800E7C48 0200202D */ daddu $a0, $s0, $zero /* 810FC 800E7C4C 0C05128B */ jal hud_element_clear_flags /* 81100 800E7C50 34058000 */ ori $a1, $zero, 0x8000 /* 81104 800E7C54 3C048011 */ lui $a0, %hi(HES_StatusStar1) /* 81108 800E7C58 248483D8 */ addiu $a0, $a0, %lo(HES_StatusStar1) /* 8110C 800E7C5C 0C050529 */ jal hud_element_create /* 81110 800E7C60 00000000 */ nop /* 81114 800E7C64 0040802D */ daddu $s0, $v0, $zero /* 81118 800E7C68 0200202D */ daddu $a0, $s0, $zero /* 8111C 800E7C6C 24050080 */ addiu $a1, $zero, 0x80 /* 81120 800E7C70 0C051280 */ jal hud_element_set_flags /* 81124 800E7C74 AE300030 */ sw $s0, 0x30($s1) /* 81128 800E7C78 0200202D */ daddu $a0, $s0, $zero /* 8112C 800E7C7C 0C05128B */ jal hud_element_clear_flags /* 81130 800E7C80 34058000 */ ori $a1, $zero, 0x8000 /* 81134 800E7C84 0C03C357 */ jal func_800F0D5C /* 81138 800E7C88 00000000 */ nop /* 8113C 800E7C8C 8FBF001C */ lw $ra, 0x1C($sp) /* 81140 800E7C90 8FB20018 */ lw $s2, 0x18($sp) /* 81144 800E7C94 8FB10014 */ lw $s1, 0x14($sp) /* 81148 800E7C98 8FB00010 */ lw $s0, 0x10($sp) /* 8114C 800E7C9C 03E00008 */ jr $ra /* 81150 800E7CA0 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void initialize_status_bar(void) { UiStatus* uiStatus = &gUIStatus; PlayerData* playerData = &gPlayerData; s32 iconIndex; s32 newVar; uiStatus->drawPosX = 12; D_8010CD10 = 0; D_8010CD12 = 0; uiStatus->drawPosY = -100; uiStatus->hidden = FALSE; uiStatus->showTimer = 210; uiStatus->unk_3B[0] = 0; uiStatus->ignoreChanges = FALSE; uiStatus->unk_45[0] = 0; uiStatus->unk_45[1] = 0; uiStatus->hpBlinking = 0; uiStatus->hpBlinkCounter = 0; uiStatus->hpBlinkTimer = 0; uiStatus->fpBlinking = 0; uiStatus->fpBlinkCounter = 0; uiStatus->fpBlinkTimer = 0; uiStatus->spBlinking = 0; uiStatus->spBlinkCounter = 0; uiStatus->coinsBlinking = 0; uiStatus->coinsBlinkCounter = 0; uiStatus->coinsBlinkTimer = 0; uiStatus->disabled = 0; uiStatus->starpointsBlinking = 0; uiStatus->displayHP = playerData->curHP; uiStatus->displayFP = playerData->curFP; uiStatus->displayCoins = playerData->coins; uiStatus->displayStarpoints = playerData->starPoints; uiStatus->displaySP = playerData->specialBarsFilled; uiStatus->starpointsBlinkCounter = 0; uiStatus->unk_6C[2] = -1; uiStatus->unk_3B[1] = 0; uiStatus->unk_57 = 0; uiStatus->unk_58 = 0; uiStatus->unk_59 = 0; uiStatus->spBarsToBlink = 0; uiStatus->unk_6C[0] = 0; uiStatus->unk_6C[1] = 0; uiStatus->iconIndex12 = -1; close_status_bar(); iconIndex = hud_element_create(&HES_StatusHP); uiStatus->hpIconIndices[0] = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusHeart); uiStatus->hpIconIndices[1] = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusFP); uiStatus->fpIconIndices[0] = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusFlower); uiStatus->fpIconIndices[1] = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusCoin); uiStatus->coinIconIndex = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_Item_CoinSparkleRandom); uiStatus->coinSparkleIconIndex = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusStarPoint); uiStatus->starpointsIconIndex = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusSPShine); uiStatus->starpointsShineIconIndex = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); newVar = hud_element_create(&HES_StatusTimes); iconIndex = newVar; uiStatus->iconIndex8 = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusTimes); uiStatus->iconIndex9 = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusTimes); uiStatus->iconIndexA = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusTimes); uiStatus->iconIndexB = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); iconIndex = hud_element_create(&HES_StatusStar1); uiStatus->starIconIndex = iconIndex; hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX); func_800F0D5C(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel shockwave_update /* 3587F0 E004A330 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 3587F4 E004A334 AFB40020 */ sw $s4, 0x20($sp) /* 3587F8 E004A338 0080A02D */ daddu $s4, $a0, $zero /* 3587FC E004A33C AFBF0028 */ sw $ra, 0x28($sp) /* 358800 E004A340 AFB50024 */ sw $s5, 0x24($sp) /* 358804 E004A344 AFB3001C */ sw $s3, 0x1C($sp) /* 358808 E004A348 AFB20018 */ sw $s2, 0x18($sp) /* 35880C E004A34C AFB10014 */ sw $s1, 0x14($sp) /* 358810 E004A350 AFB00010 */ sw $s0, 0x10($sp) /* 358814 E004A354 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 358818 E004A358 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 35881C E004A35C F7B80040 */ sdc1 $f24, 0x40($sp) /* 358820 E004A360 F7B60038 */ sdc1 $f22, 0x38($sp) /* 358824 E004A364 F7B40030 */ sdc1 $f20, 0x30($sp) /* 358828 E004A368 8E84000C */ lw $a0, 0xC($s4) /* 35882C E004A36C 8C82002C */ lw $v0, 0x2C($a0) /* 358830 E004A370 8C830028 */ lw $v1, 0x28($a0) /* 358834 E004A374 24420001 */ addiu $v0, $v0, 0x1 /* 358838 E004A378 2463FFFF */ addiu $v1, $v1, -0x1 /* 35883C E004A37C AC82002C */ sw $v0, 0x2C($a0) /* 358840 E004A380 04610005 */ bgez $v1, .LE004A398 /* 358844 E004A384 AC830028 */ sw $v1, 0x28($a0) /* 358848 E004A388 0C080128 */ jal shim_remove_effect /* 35884C E004A38C 0280202D */ daddu $a0, $s4, $zero /* 358850 E004A390 080129C4 */ j .LE004A710 /* 358854 E004A394 00000000 */ nop .LE004A398: /* 358858 E004A398 94920000 */ lhu $s2, 0x0($a0) /* 35885C E004A39C 8C83002C */ lw $v1, 0x2C($a0) /* 358860 E004A3A0 2A420002 */ slti $v0, $s2, 0x2 /* 358864 E004A3A4 10400008 */ beqz $v0, .LE004A3C8 /* 358868 E004A3A8 28620008 */ slti $v0, $v1, 0x8 /* 35886C E004A3AC 06400006 */ bltz $s2, .LE004A3C8 /* 358870 E004A3B0 00000000 */ nop /* 358874 E004A3B4 1440000E */ bnez $v0, .LE004A3F0 /* 358878 E004A3B8 00000000 */ nop /* 35887C E004A3BC 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358880 E004A3C0 080128F6 */ j .LE004A3D8 /* 358884 E004A3C4 D422AE98 */ ldc1 $f2, -0x5168($at) .LE004A3C8: /* 358888 E004A3C8 14400009 */ bnez $v0, .LE004A3F0 /* 35888C E004A3CC 00000000 */ nop /* 358890 E004A3D0 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358894 E004A3D4 D422AEA0 */ ldc1 $f2, -0x5160($at) .LE004A3D8: /* 358898 E004A3D8 C4800038 */ lwc1 $f0, 0x38($a0) /* 35889C E004A3DC 46800021 */ cvt.d.w $f0, $f0 /* 3588A0 E004A3E0 46220002 */ mul.d $f0, $f0, $f2 /* 3588A4 E004A3E4 00000000 */ nop /* 3588A8 E004A3E8 4620018D */ trunc.w.d $f6, $f0 /* 3588AC E004A3EC E4860038 */ swc1 $f6, 0x38($a0) .LE004A3F0: /* 3588B0 E004A3F0 8E820008 */ lw $v0, 0x8($s4) /* 3588B4 E004A3F4 24110001 */ addiu $s1, $zero, 0x1 /* 3588B8 E004A3F8 0222102A */ slt $v0, $s1, $v0 /* 3588BC E004A3FC 104000C4 */ beqz $v0, .LE004A710 /* 3588C0 E004A400 24840058 */ addiu $a0, $a0, 0x58 /* 3588C4 E004A404 3C03E005 */ lui $v1, %hi(jtbl_E004AEB0) /* 3588C8 E004A408 2463AEB0 */ addiu $v1, $v1, %lo(jtbl_E004AEB0) /* 3588CC E004A40C 00121080 */ sll $v0, $s2, 2 /* 3588D0 E004A410 0043A821 */ addu $s5, $v0, $v1 /* 3588D4 E004A414 2490003C */ addiu $s0, $a0, 0x3C /* 3588D8 E004A418 24130004 */ addiu $s3, $zero, 0x4 /* 3588DC E004A41C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3588E0 E004A420 4481A800 */ mtc1 $at, $f21 /* 3588E4 E004A424 4480A000 */ mtc1 $zero, $f20 /* 3588E8 E004A428 3C014200 */ lui $at, (0x42000000 >> 16) /* 3588EC E004A42C 4481C000 */ mtc1 $at, $f24 /* 3588F0 E004A430 3C014180 */ lui $at, (0x41800000 >> 16) /* 3588F4 E004A434 4481B000 */ mtc1 $at, $f22 /* 3588F8 E004A438 3C013FE8 */ lui $at, (0x3FE80000 >> 16) /* 3588FC E004A43C 4481E800 */ mtc1 $at, $f29 /* 358900 E004A440 4480E000 */ mtc1 $zero, $f28 /* 358904 E004A444 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358908 E004A448 D43AAEA8 */ ldc1 $f26, -0x5158($at) .LE004A44C: /* 35890C E004A44C 8E020010 */ lw $v0, 0x10($s0) /* 358910 E004A450 24420001 */ addiu $v0, $v0, 0x1 /* 358914 E004A454 044000A8 */ bltz $v0, .LE004A6F8 /* 358918 E004A458 AE020010 */ sw $v0, 0x10($s0) /* 35891C E004A45C 14400060 */ bnez $v0, .LE004A5E0 /* 358920 E004A460 00000000 */ nop /* 358924 E004A464 C60CFFF8 */ lwc1 $f12, -0x8($s0) /* 358928 E004A468 AE00FFC8 */ sw $zero, -0x38($s0) /* 35892C E004A46C AE00FFCC */ sw $zero, -0x34($s0) /* 358930 E004A470 0C080140 */ jal shim_sin_deg /* 358934 E004A474 AE00FFD0 */ sw $zero, -0x30($s0) /* 358938 E004A478 46000007 */ neg.s $f0, $f0 /* 35893C E004A47C 46000021 */ cvt.d.s $f0, $f0 /* 358940 E004A480 46340002 */ mul.d $f0, $f0, $f20 /* 358944 E004A484 00000000 */ nop /* 358948 E004A488 C60CFFF8 */ lwc1 $f12, -0x8($s0) /* 35894C E004A48C 46200020 */ cvt.s.d $f0, $f0 /* 358950 E004A490 0C080144 */ jal shim_cos_deg /* 358954 E004A494 E600FFD4 */ swc1 $f0, -0x2C($s0) /* 358958 E004A498 46000021 */ cvt.d.s $f0, $f0 /* 35895C E004A49C 46340002 */ mul.d $f0, $f0, $f20 /* 358960 E004A4A0 00000000 */ nop /* 358964 E004A4A4 44911000 */ mtc1 $s1, $f2 /* 358968 E004A4A8 00000000 */ nop /* 35896C E004A4AC 468010A0 */ cvt.s.w $f2, $f2 /* 358970 E004A4B0 460010A1 */ cvt.d.s $f2, $f2 /* 358974 E004A4B4 3C014020 */ lui $at, (0x40200000 >> 16) /* 358978 E004A4B8 44812800 */ mtc1 $at, $f5 /* 35897C E004A4BC 44802000 */ mtc1 $zero, $f4 /* 358980 E004A4C0 2E420006 */ sltiu $v0, $s2, 0x6 /* 358984 E004A4C4 AE00FFDC */ sw $zero, -0x24($s0) /* 358988 E004A4C8 E6180000 */ swc1 $f24, 0x0($s0) /* 35898C E004A4CC 46222101 */ sub.d $f4, $f4, $f2 /* 358990 E004A4D0 E6180004 */ swc1 $f24, 0x4($s0) /* 358994 E004A4D4 E618000C */ swc1 $f24, 0xC($s0) /* 358998 E004A4D8 46202120 */ cvt.s.d $f4, $f4 /* 35899C E004A4DC E604FFE4 */ swc1 $f4, -0x1C($s0) /* 3589A0 E004A4E0 46200020 */ cvt.s.d $f0, $f0 /* 3589A4 E004A4E4 10400027 */ beqz $v0, .LE004A584 /* 3589A8 E004A4E8 E600FFD8 */ swc1 $f0, -0x28($s0) /* 3589AC E004A4EC 8EA20000 */ lw $v0, 0x0($s5) /* 3589B0 E004A4F0 00400008 */ jr $v0 /* 3589B4 E004A4F4 00000000 */ nop glabel .LE004A4F8 /* 3589B8 E004A4F8 44910000 */ mtc1 $s1, $f0 /* 3589BC E004A4FC 00000000 */ nop /* 3589C0 E004A500 46800021 */ cvt.d.w $f0, $f0 /* 3589C4 E004A504 46340000 */ add.d $f0, $f0, $f20 /* 3589C8 E004A508 46340082 */ mul.d $f2, $f0, $f20 /* 3589CC E004A50C 00000000 */ nop /* 3589D0 E004A510 46200020 */ cvt.s.d $f0, $f0 /* 3589D4 E004A514 08012975 */ j .LE004A5D4 /* 3589D8 E004A518 E600FFE0 */ swc1 $f0, -0x20($s0) glabel .LE004A51C /* 3589DC E004A51C 26220002 */ addiu $v0, $s1, 0x2 /* 3589E0 E004A520 44820000 */ mtc1 $v0, $f0 /* 3589E4 E004A524 00000000 */ nop /* 3589E8 E004A528 46800021 */ cvt.d.w $f0, $f0 /* 3589EC E004A52C 46340002 */ mul.d $f0, $f0, $f20 /* 3589F0 E004A530 00000000 */ nop /* 3589F4 E004A534 44821000 */ mtc1 $v0, $f2 /* 3589F8 E004A538 00000000 */ nop /* 3589FC E004A53C 468010A0 */ cvt.s.w $f2, $f2 /* 358A00 E004A540 0801295E */ j .LE004A578 /* 358A04 E004A544 E602FFE0 */ swc1 $f2, -0x20($s0) glabel .LE004A548 /* 358A08 E004A548 44930000 */ mtc1 $s3, $f0 /* 358A0C E004A54C 00000000 */ nop /* 358A10 E004A550 46800021 */ cvt.d.w $f0, $f0 /* 358A14 E004A554 46340002 */ mul.d $f0, $f0, $f20 /* 358A18 E004A558 00000000 */ nop /* 358A1C E004A55C 44931000 */ mtc1 $s3, $f2 /* 358A20 E004A560 00000000 */ nop /* 358A24 E004A564 468010A0 */ cvt.s.w $f2, $f2 /* 358A28 E004A568 E602FFE0 */ swc1 $f2, -0x20($s0) /* 358A2C E004A56C E6160000 */ swc1 $f22, 0x0($s0) /* 358A30 E004A570 E6160004 */ swc1 $f22, 0x4($s0) /* 358A34 E004A574 E616000C */ swc1 $f22, 0xC($s0) .LE004A578: /* 358A38 E004A578 46200020 */ cvt.s.d $f0, $f0 /* 358A3C E004A57C 08012977 */ j .LE004A5DC /* 358A40 E004A580 E600FFE8 */ swc1 $f0, -0x18($s0) glabel .LE004A584 /* 358A44 E004A584 44932000 */ mtc1 $s3, $f4 /* 358A48 E004A588 00000000 */ nop /* 358A4C E004A58C 46802121 */ cvt.d.w $f4, $f4 /* 358A50 E004A590 46342102 */ mul.d $f4, $f4, $f20 /* 358A54 E004A594 00000000 */ nop /* 358A58 E004A598 C600FFE4 */ lwc1 $f0, -0x1C($s0) /* 358A5C E004A59C 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358A60 E004A5A0 D422AEC8 */ ldc1 $f2, -0x5138($at) /* 358A64 E004A5A4 46000021 */ cvt.d.s $f0, $f0 /* 358A68 E004A5A8 46220002 */ mul.d $f0, $f0, $f2 /* 358A6C E004A5AC 00000000 */ nop /* 358A70 E004A5B0 46342082 */ mul.d $f2, $f4, $f20 /* 358A74 E004A5B4 00000000 */ nop /* 358A78 E004A5B8 E6160000 */ swc1 $f22, 0x0($s0) /* 358A7C E004A5BC E6160004 */ swc1 $f22, 0x4($s0) /* 358A80 E004A5C0 E616000C */ swc1 $f22, 0xC($s0) /* 358A84 E004A5C4 46202120 */ cvt.s.d $f4, $f4 /* 358A88 E004A5C8 E604FFE0 */ swc1 $f4, -0x20($s0) /* 358A8C E004A5CC 46200020 */ cvt.s.d $f0, $f0 /* 358A90 E004A5D0 E600FFE4 */ swc1 $f0, -0x1C($s0) .LE004A5D4: /* 358A94 E004A5D4 462010A0 */ cvt.s.d $f2, $f2 /* 358A98 E004A5D8 E602FFE8 */ swc1 $f2, -0x18($s0) .LE004A5DC: /* 358A9C E004A5DC E6180008 */ swc1 $f24, 0x8($s0) .LE004A5E0: /* 358AA0 E004A5E0 C6040000 */ lwc1 $f4, 0x0($s0) /* 358AA4 E004A5E4 C6000004 */ lwc1 $f0, 0x4($s0) /* 358AA8 E004A5E8 C6020008 */ lwc1 $f2, 0x8($s0) /* 358AAC E004A5EC 46002100 */ add.s $f4, $f4, $f0 /* 358AB0 E004A5F0 C600000C */ lwc1 $f0, 0xC($s0) /* 358AB4 E004A5F4 46001080 */ add.s $f2, $f2, $f0 /* 358AB8 E004A5F8 24020002 */ addiu $v0, $zero, 0x2 /* 358ABC E004A5FC E6040000 */ swc1 $f4, 0x0($s0) /* 358AC0 E004A600 12420013 */ beq $s2, $v0, .LE004A650 /* 358AC4 E004A604 E6020008 */ swc1 $f2, 0x8($s0) /* 358AC8 E004A608 2A420003 */ slti $v0, $s2, 0x3 /* 358ACC E004A60C 14400005 */ bnez $v0, .LE004A624 /* 358AD0 E004A610 24020005 */ addiu $v0, $zero, 0x5 /* 358AD4 E004A614 1242000E */ beq $s2, $v0, .LE004A650 /* 358AD8 E004A618 00000000 */ nop /* 358ADC E004A61C 0801299D */ j .LE004A674 /* 358AE0 E004A620 00000000 */ nop .LE004A624: /* 358AE4 E004A624 06400013 */ bltz $s2, .LE004A674 /* 358AE8 E004A628 00000000 */ nop /* 358AEC E004A62C C6000004 */ lwc1 $f0, 0x4($s0) /* 358AF0 E004A630 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358AF4 E004A634 D422AED0 */ ldc1 $f2, -0x5130($at) /* 358AF8 E004A638 46000021 */ cvt.d.s $f0, $f0 /* 358AFC E004A63C 46220002 */ mul.d $f0, $f0, $f2 /* 358B00 E004A640 00000000 */ nop /* 358B04 E004A644 46200020 */ cvt.s.d $f0, $f0 /* 358B08 E004A648 080129AB */ j .LE004A6AC /* 358B0C E004A64C E6000004 */ swc1 $f0, 0x4($s0) .LE004A650: /* 358B10 E004A650 C6000004 */ lwc1 $f0, 0x4($s0) /* 358B14 E004A654 46000021 */ cvt.d.s $f0, $f0 /* 358B18 E004A658 463C0002 */ mul.d $f0, $f0, $f28 /* 358B1C E004A65C 00000000 */ nop /* 358B20 E004A660 C602000C */ lwc1 $f2, 0xC($s0) /* 358B24 E004A664 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358B28 E004A668 D424AED8 */ ldc1 $f4, -0x5128($at) /* 358B2C E004A66C 080129A5 */ j .LE004A694 /* 358B30 E004A670 460010A1 */ cvt.d.s $f2, $f2 .LE004A674: /* 358B34 E004A674 C6000004 */ lwc1 $f0, 0x4($s0) /* 358B38 E004A678 46000021 */ cvt.d.s $f0, $f0 /* 358B3C E004A67C 463C0002 */ mul.d $f0, $f0, $f28 /* 358B40 E004A680 00000000 */ nop /* 358B44 E004A684 C602000C */ lwc1 $f2, 0xC($s0) /* 358B48 E004A688 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 358B4C E004A68C D424AEE0 */ ldc1 $f4, -0x5120($at) /* 358B50 E004A690 460010A1 */ cvt.d.s $f2, $f2 .LE004A694: /* 358B54 E004A694 46241082 */ mul.d $f2, $f2, $f4 /* 358B58 E004A698 00000000 */ nop /* 358B5C E004A69C 46200020 */ cvt.s.d $f0, $f0 /* 358B60 E004A6A0 462010A0 */ cvt.s.d $f2, $f2 /* 358B64 E004A6A4 E6000004 */ swc1 $f0, 0x4($s0) /* 358B68 E004A6A8 E602000C */ swc1 $f2, 0xC($s0) .LE004A6AC: /* 358B6C E004A6AC C600FFE0 */ lwc1 $f0, -0x20($s0) /* 358B70 E004A6B0 46000021 */ cvt.d.s $f0, $f0 /* 358B74 E004A6B4 463A0002 */ mul.d $f0, $f0, $f26 /* 358B78 E004A6B8 00000000 */ nop /* 358B7C E004A6BC C602FFE8 */ lwc1 $f2, -0x18($s0) /* 358B80 E004A6C0 460010A1 */ cvt.d.s $f2, $f2 /* 358B84 E004A6C4 463A1082 */ mul.d $f2, $f2, $f26 /* 358B88 E004A6C8 00000000 */ nop /* 358B8C E004A6CC 3C014300 */ lui $at, (0x43000000 >> 16) /* 358B90 E004A6D0 44812000 */ mtc1 $at, $f4 /* 358B94 E004A6D4 46200020 */ cvt.s.d $f0, $f0 /* 358B98 E004A6D8 E600FFE0 */ swc1 $f0, -0x20($s0) /* 358B9C E004A6DC C6000000 */ lwc1 $f0, 0x0($s0) /* 358BA0 E004A6E0 462010A0 */ cvt.s.d $f2, $f2 /* 358BA4 E004A6E4 4600203C */ c.lt.s $f4, $f0 /* 358BA8 E004A6E8 00000000 */ nop /* 358BAC E004A6EC 45000002 */ bc1f .LE004A6F8 /* 358BB0 E004A6F0 E602FFE8 */ swc1 $f2, -0x18($s0) /* 358BB4 E004A6F4 E6040000 */ swc1 $f4, 0x0($s0) .LE004A6F8: /* 358BB8 E004A6F8 26730001 */ addiu $s3, $s3, 0x1 /* 358BBC E004A6FC 26310001 */ addiu $s1, $s1, 0x1 /* 358BC0 E004A700 8E820008 */ lw $v0, 0x8($s4) /* 358BC4 E004A704 0222102A */ slt $v0, $s1, $v0 /* 358BC8 E004A708 1440FF50 */ bnez $v0, .LE004A44C /* 358BCC E004A70C 26100058 */ addiu $s0, $s0, 0x58 .LE004A710: /* 358BD0 E004A710 8FBF0028 */ lw $ra, 0x28($sp) /* 358BD4 E004A714 8FB50024 */ lw $s5, 0x24($sp) /* 358BD8 E004A718 8FB40020 */ lw $s4, 0x20($sp) /* 358BDC E004A71C 8FB3001C */ lw $s3, 0x1C($sp) /* 358BE0 E004A720 8FB20018 */ lw $s2, 0x18($sp) /* 358BE4 E004A724 8FB10014 */ lw $s1, 0x14($sp) /* 358BE8 E004A728 8FB00010 */ lw $s0, 0x10($sp) /* 358BEC E004A72C D7BC0050 */ ldc1 $f28, 0x50($sp) /* 358BF0 E004A730 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 358BF4 E004A734 D7B80040 */ ldc1 $f24, 0x40($sp) /* 358BF8 E004A738 D7B60038 */ ldc1 $f22, 0x38($sp) /* 358BFC E004A73C D7B40030 */ ldc1 $f20, 0x30($sp) /* 358C00 E004A740 03E00008 */ jr $ra /* 358C04 E004A744 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void shockwave_update(EffectInstance* effect) { ShockwaveFXData* part = effect->data.shockwave; s32 unk_00; s32 unk_2C; s32 i; part->unk_2C++; part->unk_28--; if (part->unk_28 < 0) { shim_remove_effect(effect); return; } unk_00 = part->unk_00; unk_2C = part->unk_2C; switch (unk_00) { case 0: case 1: if (unk_2C >= 8) { part->alpha *= 0.8; } break; default: if (unk_2C >= 8) { part->alpha *= 0.94; } break; } part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_4C++; if (part->unk_4C >= 0) { if (part->unk_4C == 0) { part->pos.x = 0.0f; part->pos.y = 0.0f; part->pos.z = 0.0f; part->unk_10 = -shim_sin_deg(part->unk_34) * 0.5; part->unk_14 = shim_cos_deg(part->unk_34) * 0.5; part->unk_18 = 0; part->unk_3C = 32.0f; part->unk_40 = 32.0f; part->unk_48 = 32.0f; part->unk_20 = 8.0 - (f32) i; switch (unk_00) { case 0: case 1: part->unk_1C = i + 0.5; part->unk_24 = (i + 0.5) * 0.5; break; case 2: case 5: part->unk_1C = i + 2; part->unk_24 = (i + 2) * 0.5; break; case 3: part->unk_1C = i + 3; part->unk_24 = (i + 3) * 0.5; part->unk_3C = 16.0f; part->unk_40 = 16.0f; part->unk_48 = 16.0f; break; case 4: default: part->unk_1C = (i + 3) * 0.5; part->unk_24 = (i + 3) * 0.5 * 0.5; part->unk_3C = 16.0f; part->unk_40 = 16.0f; part->unk_48 = 16.0f; part->unk_20 *= 0.8; break; } part->unk_44 = 32.0f; } part->unk_3C += part->unk_40; part->unk_44 += part->unk_48; switch (unk_00) { case 0: case 1: part->unk_40 *= 0.9; break; case 2: case 5: part->unk_40 *= 0.75; part->unk_48 *= 0.99; break; default: part->unk_40 *= 0.75; part->unk_48 *= 0.95; break; } part->unk_1C *= 1.002; part->unk_24 *= 1.002; if (part->unk_3C > 128.0f) { part->unk_3C = 128.0f; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel stars_shimmer_main /* 354F60 E0044000 27BDFF80 */ addiu $sp, $sp, -0x80 /* 354F64 E0044004 F7B40050 */ sdc1 $f20, 0x50($sp) /* 354F68 E0044008 4485A000 */ mtc1 $a1, $f20 /* 354F6C E004400C F7B60058 */ sdc1 $f22, 0x58($sp) /* 354F70 E0044010 4486B000 */ mtc1 $a2, $f22 /* 354F74 E0044014 AFB3003C */ sw $s3, 0x3C($sp) /* 354F78 E0044018 0080982D */ daddu $s3, $a0, $zero /* 354F7C E004401C F7B80060 */ sdc1 $f24, 0x60($sp) /* 354F80 E0044020 4487C000 */ mtc1 $a3, $f24 /* 354F84 E0044024 27A40010 */ addiu $a0, $sp, 0x10 /* 354F88 E0044028 AFB20038 */ sw $s2, 0x38($sp) /* 354F8C E004402C 8FB20098 */ lw $s2, 0x98($sp) /* 354F90 E0044030 3C02E004 */ lui $v0, %hi(stars_shimmer_init) /* 354F94 E0044034 2442441C */ addiu $v0, $v0, %lo(stars_shimmer_init) /* 354F98 E0044038 AFA20018 */ sw $v0, 0x18($sp) /* 354F9C E004403C 3C02E004 */ lui $v0, %hi(stars_shimmer_update) /* 354FA0 E0044040 24424424 */ addiu $v0, $v0, %lo(stars_shimmer_update) /* 354FA4 E0044044 AFA2001C */ sw $v0, 0x1C($sp) /* 354FA8 E0044048 3C02E004 */ lui $v0, %hi(stars_shimmer_render) /* 354FAC E004404C 244248E4 */ addiu $v0, $v0, %lo(stars_shimmer_render) /* 354FB0 E0044050 AFA20020 */ sw $v0, 0x20($sp) /* 354FB4 E0044054 24020022 */ addiu $v0, $zero, 0x22 /* 354FB8 E0044058 AFBF0048 */ sw $ra, 0x48($sp) /* 354FBC E004405C AFB50044 */ sw $s5, 0x44($sp) /* 354FC0 E0044060 AFB40040 */ sw $s4, 0x40($sp) /* 354FC4 E0044064 AFB10034 */ sw $s1, 0x34($sp) /* 354FC8 E0044068 AFB00030 */ sw $s0, 0x30($sp) /* 354FCC E004406C F7BE0078 */ sdc1 $f30, 0x78($sp) /* 354FD0 E0044070 F7BC0070 */ sdc1 $f28, 0x70($sp) /* 354FD4 E0044074 F7BA0068 */ sdc1 $f26, 0x68($sp) /* 354FD8 E0044078 AFA00010 */ sw $zero, 0x10($sp) /* 354FDC E004407C AFA00024 */ sw $zero, 0x24($sp) /* 354FE0 E0044080 AFA20014 */ sw $v0, 0x14($sp) /* 354FE4 E0044084 0C080124 */ jal shim_create_effect_instance /* 354FE8 E0044088 26520001 */ addiu $s2, $s2, 0x1 /* 354FEC E004408C 00122040 */ sll $a0, $s2, 1 /* 354FF0 E0044090 00922021 */ addu $a0, $a0, $s2 /* 354FF4 E0044094 00042080 */ sll $a0, $a0, 2 /* 354FF8 E0044098 00922023 */ subu $a0, $a0, $s2 /* 354FFC E004409C 00042080 */ sll $a0, $a0, 2 /* 355000 E00440A0 0040802D */ daddu $s0, $v0, $zero /* 355004 E00440A4 0C08012C */ jal shim_general_heap_malloc /* 355008 E00440A8 AE120008 */ sw $s2, 0x8($s0) /* 35500C E00440AC 0040182D */ daddu $v1, $v0, $zero /* 355010 E00440B0 14600003 */ bnez $v1, .LE00440C0 /* 355014 E00440B4 AE03000C */ sw $v1, 0xC($s0) .LE00440B8: /* 355018 E00440B8 0801102E */ j .LE00440B8 /* 35501C E00440BC 00000000 */ nop .LE00440C0: /* 355020 E00440C0 24020006 */ addiu $v0, $zero, 0x6 /* 355024 E00440C4 56620004 */ bnel $s3, $v0, .LE00440D8 /* 355028 E00440C8 A4600000 */ sh $zero, 0x0($v1) /* 35502C E00440CC 24020001 */ addiu $v0, $zero, 0x1 /* 355030 E00440D0 A4620000 */ sh $v0, 0x0($v1) /* 355034 E00440D4 24130003 */ addiu $s3, $zero, 0x3 .LE00440D8: /* 355038 E00440D8 E4740004 */ swc1 $f20, 0x4($v1) /* 35503C E00440DC E4760008 */ swc1 $f22, 0x8($v1) /* 355040 E00440E0 E478000C */ swc1 $f24, 0xC($v1) /* 355044 E00440E4 AC600020 */ sw $zero, 0x20($v1) /* 355048 E00440E8 A4730002 */ sh $s3, 0x2($v1) /* 35504C E00440EC 8FA2009C */ lw $v0, 0x9C($sp) /* 355050 E00440F0 24110001 */ addiu $s1, $zero, 0x1 /* 355054 E00440F4 AC620024 */ sw $v0, 0x24($v1) /* 355058 E00440F8 0232102A */ slt $v0, $s1, $s2 /* 35505C E00440FC 104000B8 */ beqz $v0, .LE00443E0 /* 355060 E0044100 2463002C */ addiu $v1, $v1, 0x2C /* 355064 E0044104 3C15E004 */ lui $s5, %hi(jtbl_E0044E40) /* 355068 E0044108 26B54E40 */ addiu $s5, $s5, %lo(jtbl_E0044E40) /* 35506C E004410C 24700018 */ addiu $s0, $v1, 0x18 /* 355070 E0044110 2654FFFF */ addiu $s4, $s2, -0x1 /* 355074 E0044114 44940000 */ mtc1 $s4, $f0 /* 355078 E0044118 00000000 */ nop /* 35507C E004411C 46800020 */ cvt.s.w $f0, $f0 /* 355080 E0044120 4480D000 */ mtc1 $zero, $f26 /* 355084 E0044124 3C01E004 */ lui $at, (0xE0044E20 >> 16) /* 355088 E0044128 D43E4E20 */ ldc1 $f30, (0xE0044E20 & 0xFFFF)($at) /* 35508C E004412C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 355090 E0044130 44811000 */ mtc1 $at, $f2 /* 355094 E0044134 3C01E004 */ lui $at, (0xE0044E28 >> 16) /* 355098 E0044138 D43C4E28 */ ldc1 $f28, (0xE0044E28 & 0xFFFF)($at) /* 35509C E004413C 46001083 */ div.s $f2, $f2, $f0 /* 3550A0 E0044140 E7A20028 */ swc1 $f2, 0x28($sp) .LE0044144: /* 3550A4 E0044144 44910000 */ mtc1 $s1, $f0 /* 3550A8 E0044148 00000000 */ nop /* 3550AC E004414C 46800020 */ cvt.s.w $f0, $f0 /* 3550B0 E0044150 C7AA0028 */ lwc1 $f10, 0x28($sp) /* 3550B4 E0044154 2A620002 */ slti $v0, $s3, 0x2 /* 3550B8 E0044158 46005582 */ mul.s $f22, $f10, $f0 /* 3550BC E004415C 00000000 */ nop /* 3550C0 E0044160 54400007 */ bnel $v0, $zero, .LE0044180 /* 3550C4 E0044164 461AB600 */ add.s $f24, $f22, $f26 /* 3550C8 E0044168 0C080138 */ jal shim_rand_int /* 3550CC E004416C 24040167 */ addiu $a0, $zero, 0x167 /* 3550D0 E0044170 44820000 */ mtc1 $v0, $f0 /* 3550D4 E0044174 00000000 */ nop /* 3550D8 E0044178 46800020 */ cvt.s.w $f0, $f0 /* 3550DC E004417C 4600B600 */ add.s $f24, $f22, $f0 .LE0044180: /* 3550E0 E0044180 3C014120 */ lui $at, (0x41200000 >> 16) /* 3550E4 E0044184 4481A000 */ mtc1 $at, $f20 /* 3550E8 E0044188 00000000 */ nop /* 3550EC E004418C 4614B502 */ mul.s $f20, $f22, $f20 /* 3550F0 E0044190 00000000 */ nop /* 3550F4 E0044194 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 3550F8 E0044198 44810000 */ mtc1 $at, $f0 /* 3550FC E004419C 4600C306 */ mov.s $f12, $f24 /* 355100 E00441A0 0C080140 */ jal shim_sin_deg /* 355104 E00441A4 4600A501 */ sub.s $f20, $f20, $f0 /* 355108 E00441A8 4600C306 */ mov.s $f12, $f24 /* 35510C E00441AC 0C080144 */ jal shim_cos_deg /* 355110 E00441B0 46000586 */ mov.s $f22, $f0 /* 355114 E00441B4 4600A306 */ mov.s $f12, $f20 /* 355118 E00441B8 0C080140 */ jal shim_sin_deg /* 35511C E00441BC 46000506 */ mov.s $f20, $f0 /* 355120 E00441C0 C7AA0090 */ lwc1 $f10, 0x90($sp) /* 355124 E00441C4 460050A1 */ cvt.d.s $f2, $f10 /* 355128 E00441C8 3C01E004 */ lui $at, (0xE0044E30 >> 16) /* 35512C E00441CC D42A4E30 */ ldc1 $f10, (0xE0044E30 & 0xFFFF)($at) /* 355130 E00441D0 462A1202 */ mul.d $f8, $f2, $f10 /* 355134 E00441D4 00000000 */ nop /* 355138 E00441D8 463E1082 */ mul.d $f2, $f2, $f30 /* 35513C E00441DC 00000000 */ nop /* 355140 E00441E0 C7AA0094 */ lwc1 $f10, 0x94($sp) /* 355144 E00441E4 46005121 */ cvt.d.s $f4, $f10 /* 355148 E00441E8 463E2182 */ mul.d $f6, $f4, $f30 /* 35514C E00441EC 00000000 */ nop /* 355150 E00441F0 3C01E004 */ lui $at, (0xE0044E38 >> 16) /* 355154 E00441F4 D42A4E38 */ ldc1 $f10, (0xE0044E38 & 0xFFFF)($at) /* 355158 E00441F8 462A2102 */ mul.d $f4, $f4, $f10 /* 35515C E00441FC 00000000 */ nop /* 355160 E0044200 46000021 */ cvt.d.s $f0, $f0 /* 355164 E0044204 46201082 */ mul.d $f2, $f2, $f0 /* 355168 E0044208 00000000 */ nop /* 35516C E004420C 46203182 */ mul.d $f6, $f6, $f0 /* 355170 E0044210 00000000 */ nop /* 355174 E0044214 2622001E */ addiu $v0, $s1, 0x1E /* 355178 E0044218 AE02000C */ sw $v0, 0xC($s0) /* 35517C E004421C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 355180 E0044220 44810000 */ mtc1 $at, $f0 /* 355184 E0044224 2622FFFF */ addiu $v0, $s1, -0x1 /* 355188 E0044228 AE000008 */ sw $zero, 0x8($s0) /* 35518C E004422C E6000004 */ swc1 $f0, 0x4($s0) /* 355190 E0044230 C7AA0094 */ lwc1 $f10, 0x94($sp) /* 355194 E0044234 46224201 */ sub.d $f8, $f8, $f2 /* 355198 E0044238 44940000 */ mtc1 $s4, $f0 /* 35519C E004423C 00000000 */ nop /* 3551A0 E0044240 46800020 */ cvt.s.w $f0, $f0 /* 3551A4 E0044244 46005003 */ div.s $f0, $f10, $f0 /* 3551A8 E0044248 46262101 */ sub.d $f4, $f4, $f6 /* 3551AC E004424C 44821000 */ mtc1 $v0, $f2 /* 3551B0 E0044250 00000000 */ nop /* 3551B4 E0044254 468010A0 */ cvt.s.w $f2, $f2 /* 3551B8 E0044258 2E620006 */ sltiu $v0, $s3, 0x6 /* 3551BC E004425C 46020182 */ mul.s $f6, $f0, $f2 /* 3551C0 E0044260 00000000 */ nop /* 3551C4 E0044264 46204220 */ cvt.s.d $f8, $f8 /* 3551C8 E0044268 10400036 */ beqz $v0, .LE0044344 /* 3551CC E004426C 46202120 */ cvt.s.d $f4, $f4 /* 3551D0 E0044270 00131080 */ sll $v0, $s3, 2 /* 3551D4 E0044274 00551021 */ addu $v0, $v0, $s5 /* 3551D8 E0044278 8C420000 */ lw $v0, 0x0($v0) /* 3551DC E004427C 00400008 */ jr $v0 /* 3551E0 E0044280 00000000 */ nop glabel .LE0044284 /* 3551E4 E0044284 4608B002 */ mul.s $f0, $f22, $f8 /* 3551E8 E0044288 00000000 */ nop /* 3551EC E004428C 4604A082 */ mul.s $f2, $f20, $f4 /* 3551F0 E0044290 00000000 */ nop /* 3551F4 E0044294 AE000000 */ sw $zero, 0x0($s0) /* 3551F8 E0044298 AE00FFF4 */ sw $zero, -0xC($s0) /* 3551FC E004429C E600FFF8 */ swc1 $f0, -0x8($s0) /* 355200 E00442A0 080110F4 */ j .LE00443D0 /* 355204 E00442A4 E602FFFC */ swc1 $f2, -0x4($s0) glabel .LE00442A8 /* 355208 E00442A8 0C080138 */ jal shim_rand_int /* 35520C E00442AC 24040064 */ addiu $a0, $zero, 0x64 /* 355210 E00442B0 C7AA0090 */ lwc1 $f10, 0x90($sp) /* 355214 E00442B4 460AB002 */ mul.s $f0, $f22, $f10 /* 355218 E00442B8 00000000 */ nop /* 35521C E00442BC 44821000 */ mtc1 $v0, $f2 /* 355220 E00442C0 00000000 */ nop /* 355224 E00442C4 468010A0 */ cvt.s.w $f2, $f2 /* 355228 E00442C8 46020002 */ mul.s $f0, $f0, $f2 /* 35522C E00442CC 00000000 */ nop /* 355230 E00442D0 46000021 */ cvt.d.s $f0, $f0 /* 355234 E00442D4 463C0002 */ mul.d $f0, $f0, $f28 /* 355238 E00442D8 00000000 */ nop /* 35523C E00442DC 24040064 */ addiu $a0, $zero, 0x64 /* 355240 E00442E0 46200020 */ cvt.s.d $f0, $f0 /* 355244 E00442E4 0C080138 */ jal shim_rand_int /* 355248 E00442E8 E600FFEC */ swc1 $f0, -0x14($s0) /* 35524C E00442EC C7AA0094 */ lwc1 $f10, 0x94($sp) /* 355250 E00442F0 460AA002 */ mul.s $f0, $f20, $f10 /* 355254 E00442F4 00000000 */ nop /* 355258 E00442F8 44821000 */ mtc1 $v0, $f2 /* 35525C E00442FC 00000000 */ nop /* 355260 E0044300 468010A0 */ cvt.s.w $f2, $f2 /* 355264 E0044304 46020002 */ mul.s $f0, $f0, $f2 /* 355268 E0044308 00000000 */ nop /* 35526C E004430C 8E02000C */ lw $v0, 0xC($s0) /* 355270 E0044310 46000021 */ cvt.d.s $f0, $f0 /* 355274 E0044314 463C0002 */ mul.d $f0, $f0, $f28 /* 355278 E0044318 00000000 */ nop /* 35527C E004431C 00111840 */ sll $v1, $s1, 1 /* 355280 E0044320 AE00FFF4 */ sw $zero, -0xC($s0) /* 355284 E0044324 E61AFFFC */ swc1 $f26, -0x4($s0) /* 355288 E0044328 E61AFFF8 */ swc1 $f26, -0x8($s0) /* 35528C E004432C E61A0000 */ swc1 $f26, 0x0($s0) /* 355290 E0044330 00431021 */ addu $v0, $v0, $v1 /* 355294 E0044334 AE02000C */ sw $v0, 0xC($s0) /* 355298 E0044338 46200020 */ cvt.s.d $f0, $f0 /* 35529C E004433C 080110F4 */ j .LE00443D0 /* 3552A0 E0044340 E600FFF0 */ swc1 $f0, -0x10($s0) glabel .LE0044344 /* 3552A4 E0044344 4608B002 */ mul.s $f0, $f22, $f8 /* 3552A8 E0044348 00000000 */ nop /* 3552AC E004434C 4608A082 */ mul.s $f2, $f20, $f8 /* 3552B0 E0044350 00000000 */ nop /* 3552B4 E0044354 2404000A */ addiu $a0, $zero, 0xA /* 3552B8 E0044358 E606FFF0 */ swc1 $f6, -0x10($s0) /* 3552BC E004435C E600FFF8 */ swc1 $f0, -0x8($s0) /* 3552C0 E0044360 0C080138 */ jal shim_rand_int /* 3552C4 E0044364 E602FFF4 */ swc1 $f2, -0xC($s0) /* 3552C8 E0044368 00021023 */ negu $v0, $v0 /* 3552CC E004436C 3C013CF5 */ lui $at, (0x3CF5C28F >> 16) /* 3552D0 E0044370 3421C28F */ ori $at, $at, (0x3CF5C28F & 0xFFFF) /* 3552D4 E0044374 44811000 */ mtc1 $at, $f2 /* 3552D8 E0044378 44820000 */ mtc1 $v0, $f0 /* 3552DC E004437C 00000000 */ nop /* 3552E0 E0044380 46800020 */ cvt.s.w $f0, $f0 /* 3552E4 E0044384 46020002 */ mul.s $f0, $f0, $f2 /* 3552E8 E0044388 00000000 */ nop /* 3552EC E004438C 2404000A */ addiu $a0, $zero, 0xA /* 3552F0 E0044390 0C080138 */ jal shim_rand_int /* 3552F4 E0044394 E600FFFC */ swc1 $f0, -0x4($s0) /* 3552F8 E0044398 3C013D23 */ lui $at, (0x3D23D70A >> 16) /* 3552FC E004439C 3421D70A */ ori $at, $at, (0x3D23D70A & 0xFFFF) /* 355300 E00443A0 44811000 */ mtc1 $at, $f2 /* 355304 E00443A4 44820000 */ mtc1 $v0, $f0 /* 355308 E00443A8 00000000 */ nop /* 35530C E00443AC 46800020 */ cvt.s.w $f0, $f0 /* 355310 E00443B0 46020002 */ mul.s $f0, $f0, $f2 /* 355314 E00443B4 00000000 */ nop /* 355318 E00443B8 3C01E004 */ lui $at, (0xE0044E58 >> 16) /* 35531C E00443BC D4224E58 */ ldc1 $f2, (0xE0044E58 & 0xFFFF)($at) /* 355320 E00443C0 46000021 */ cvt.d.s $f0, $f0 /* 355324 E00443C4 46220000 */ add.d $f0, $f0, $f2 /* 355328 E00443C8 46200020 */ cvt.s.d $f0, $f0 /* 35532C E00443CC E6000000 */ swc1 $f0, 0x0($s0) .LE00443D0: /* 355330 E00443D0 26310001 */ addiu $s1, $s1, 0x1 /* 355334 E00443D4 0232102A */ slt $v0, $s1, $s2 /* 355338 E00443D8 1440FF5A */ bnez $v0, .LE0044144 /* 35533C E00443DC 2610002C */ addiu $s0, $s0, 0x2C .LE00443E0: /* 355340 E00443E0 8FBF0048 */ lw $ra, 0x48($sp) /* 355344 E00443E4 8FB50044 */ lw $s5, 0x44($sp) /* 355348 E00443E8 8FB40040 */ lw $s4, 0x40($sp) /* 35534C E00443EC 8FB3003C */ lw $s3, 0x3C($sp) /* 355350 E00443F0 8FB20038 */ lw $s2, 0x38($sp) /* 355354 E00443F4 8FB10034 */ lw $s1, 0x34($sp) /* 355358 E00443F8 8FB00030 */ lw $s0, 0x30($sp) /* 35535C E00443FC D7BE0078 */ ldc1 $f30, 0x78($sp) /* 355360 E0044400 D7BC0070 */ ldc1 $f28, 0x70($sp) /* 355364 E0044404 D7BA0068 */ ldc1 $f26, 0x68($sp) /* 355368 E0044408 D7B80060 */ ldc1 $f24, 0x60($sp) /* 35536C E004440C D7B60058 */ ldc1 $f22, 0x58($sp) /* 355370 E0044410 D7B40050 */ ldc1 $f20, 0x50($sp) /* 355374 E0044414 03E00008 */ jr $ra /* 355378 E0044418 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: void stars_shimmer_main(s32 type, f32 x, f32 y, f32 z, f32 arg4, f32 arg5, s32 numParts, s32 arg7) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; StarsShimmerFXData* part; f32 cosTheta; f32 sinTheta; f32 temp_f22; f32 temp_f8; f32 temp_ft; f32 theta; f32 temp5; f32 t3; f32 new_var; s32 i; numParts++; bpPtr->init = stars_shimmer_init; bpPtr->update = stars_shimmer_update; bpPtr->renderWorld = stars_shimmer_render; bpPtr->unk_00 = 0; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_STARS_SHIMMER; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.starsShimmer = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.starsShimmer != NULL); if (type == 6) { part->unk_00 = 1; type = 3; } else { part->unk_00 = 0; } part->pos.x = x; part->pos.y = y; part->pos.z = z; part->lifeTime = 0; part->state = type; part->timeLeft = arg7; part++; for (i = 1; i < numParts; i++, part++) { temp_f22 = (360.0f / (numParts - 1)) * i; if (type > 1) { theta = temp_f22 + shim_rand_int(359); } else { theta = temp_f22 + 0.0f; } t3 = (temp_f22 * 10.0f) - 90.0f; sinTheta = shim_sin_deg(theta); cosTheta = shim_cos_deg(theta); temp_f22 = shim_sin_deg(t3); temp_f8 = (arg4 * 0.4) - (arg4 * 0.1 * temp_f22); temp_ft = (arg5 * 0.4) - (arg5 * 0.1 * temp_f22); new_var = 1.0f; // TODO dumb temp and cast later required to match temp5 = (arg5 / (numParts - 1)) * (i - 1); part->unk_1C = (u8) new_var; part->lifeTime = 0; part->timeLeft = i + 30; switch (type) { case 0: case 1: part->unk_18 = 0; part->pos.z = 0.0f; part->unk_10 = sinTheta * temp_f8; part->unk_14 = cosTheta * temp_ft; break; case 3: part->pos.x = (sinTheta * arg4 * shim_rand_int(100)) * 0.005; part->pos.y = (cosTheta * arg5 * shim_rand_int(100)) * 0.005; part->pos.z = 0.0f; part->unk_18 = part->unk_10 = part->unk_14 = 0.0f; part->timeLeft += i * 2; break; case 2: case 4: case 5: default: part->unk_10 = sinTheta * temp_f8; part->pos.y = temp5; part->pos.z = cosTheta * temp_f8; part->unk_14 = -shim_rand_int(10) * 0.03f; part->unk_18 = (shim_rand_int(10) * 0.04f) + 0.01; break; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8024C180 /* 17AA60 8024C180 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 17AA64 8024C184 AFB00018 */ sw $s0, 0x18($sp) /* 17AA68 8024C188 3C10800B */ lui $s0, %hi(gCameras + 0x558) /* 17AA6C 8024C18C 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558) D_8024C190: /* 17AA70 8024C190 AFBF001C */ sw $ra, 0x1C($sp) /* 17AA74 8024C194 F7BE0048 */ sdc1 $f30, 0x48($sp) /* 17AA78 8024C198 F7BC0040 */ sdc1 $f28, 0x40($sp) /* 17AA7C 8024C19C F7BA0038 */ sdc1 $f26, 0x38($sp) .L8024C1A0: /* 17AA80 8024C1A0 F7B80030 */ sdc1 $f24, 0x30($sp) /* 17AA84 8024C1A4 F7B60028 */ sdc1 $f22, 0x28($sp) /* 17AA88 8024C1A8 10A0003D */ beqz $a1, .L8024C2A0 /* 17AA8C 8024C1AC F7B40020 */ sdc1 $f20, 0x20($sp) .L8024C1B0: /* 17AA90 8024C1B0 3C01420C */ lui $at, (0x420C0000 >> 16) /* 17AA94 8024C1B4 44810000 */ mtc1 $at, $f0 /* 17AA98 8024C1B8 C6060058 */ lwc1 $f6, 0x58($s0) /* 17AA9C 8024C1BC 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 17AAA0 8024C1C0 E420F270 */ swc1 $f0, %lo(BattleCam_PosX)($at) /* 17AAA4 8024C1C4 3C014270 */ lui $at, (0x42700000 >> 16) /* 17AAA8 8024C1C8 44810000 */ mtc1 $at, $f0 /* 17AAAC 8024C1CC 3C02802A */ lui $v0, %hi(BattleCam_PosY) /* 17AAB0 8024C1D0 2442F274 */ addiu $v0, $v0, %lo(BattleCam_PosY) /* 17AAB4 8024C1D4 4600303C */ c.lt.s $f6, $f0 D_8024C1D8: /* 17AAB8 8024C1D8 00000000 */ nop /* 17AABC 8024C1DC 45000002 */ bc1f .L8024C1E8 /* 17AAC0 8024C1E0 E4460000 */ swc1 $f6, 0x0($v0) /* 17AAC4 8024C1E4 E4400000 */ swc1 $f0, 0x0($v0) .L8024C1E8: /* 17AAC8 8024C1E8 86040026 */ lh $a0, 0x26($s0) /* 17AACC 8024C1EC 8603001E */ lh $v1, 0x1E($s0) D_8024C1F0_C09A70: /* 17AAD0 8024C1F0 24020008 */ addiu $v0, $zero, 0x8 /* 17AAD4 8024C1F4 3C01802A */ lui $at, %hi(BattleCam_BoomPitch) D_8024C1F8: /* 17AAD8 8024C1F8 A422F284 */ sh $v0, %lo(BattleCam_BoomPitch)($at) /* 17AADC 8024C1FC 86020022 */ lh $v0, 0x22($s0) D_8024C200: /* 17AAE0 8024C200 44830000 */ mtc1 $v1, $f0 /* 17AAE4 8024C204 00000000 */ nop D_8024C208: /* 17AAE8 8024C208 46800020 */ cvt.s.w $f0, $f0 /* 17AAEC 8024C20C 86030024 */ lh $v1, 0x24($s0) D_8024C210: /* 17AAF0 8024C210 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17AAF4 8024C214 AC20F278 */ sw $zero, %lo(BattleCam_PosZ)($at) /* 17AAF8 8024C218 3C01802A */ lui $at, %hi(BattleCam_BoomYaw) /* 17AAFC 8024C21C A420F282 */ sh $zero, %lo(BattleCam_BoomYaw)($at) .L8024C220: /* 17AB00 8024C220 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 17AB04 8024C224 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at) /* 17AB08 8024C228 44820000 */ mtc1 $v0, $f0 /* 17AB0C 8024C22C 00000000 */ nop /* 17AB10 8024C230 46800020 */ cvt.s.w $f0, $f0 /* 17AB14 8024C234 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17AB18 8024C238 E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 17AB1C 8024C23C 44830000 */ mtc1 $v1, $f0 /* 17AB20 8024C240 00000000 */ nop /* 17AB24 8024C244 46800020 */ cvt.s.w $f0, $f0 D_8024C248: /* 17AB28 8024C248 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17AB2C 8024C24C E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at) /* 17AB30 8024C250 04820001 */ bltzl $a0, .L8024C258 /* 17AB34 8024C254 248400FF */ addiu $a0, $a0, 0xFF .L8024C258: /* 17AB38 8024C258 00041203 */ sra $v0, $a0, 8 /* 17AB3C 8024C25C C6020054 */ lwc1 $f2, 0x54($s0) /* 17AB40 8024C260 C604005C */ lwc1 $f4, 0x5C($s0) /* 17AB44 8024C264 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft) /* 17AB48 8024C268 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1) /* 17AB4C 8024C26C 44820000 */ mtc1 $v0, $f0 .L8024C270: /* 17AB50 8024C270 00000000 */ nop /* 17AB54 8024C274 46800020 */ cvt.s.w $f0, $f0 /* 17AB58 8024C278 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 17AB5C 8024C27C E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at) /* 17AB60 8024C280 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 17AB64 8024C284 E426F2AC */ swc1 $f6, %lo(BattleCam_InitialPosY)($at) /* 17AB68 8024C288 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17AB6C 8024C28C E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at) /* 17AB70 8024C290 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 17AB74 8024C294 E424F2B0 */ swc1 $f4, %lo(BattleCam_InitialPosZ)($at) .L8024C298: /* 17AB78 8024C298 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal) /* 17AB7C 8024C29C A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at) .L8024C2A0: /* 17AB80 8024C2A0 3C01802A */ lui $at, %hi(BattleCam_PosY) /* 17AB84 8024C2A4 C43CF274 */ lwc1 $f28, %lo(BattleCam_PosY)($at) /* 17AB88 8024C2A8 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 17AB8C 8024C2AC C43AF270 */ lwc1 $f26, %lo(BattleCam_PosX)($at) /* 17AB90 8024C2B0 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp) /* 17AB94 8024C2B4 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0) /* 17AB98 8024C2B8 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17AB9C 8024C2BC C43EF278 */ lwc1 $f30, %lo(BattleCam_PosZ)($at) /* 17ABA0 8024C2C0 14400027 */ bnez $v0, .L8024C360 /* 17ABA4 8024C2C4 E7BC0010 */ swc1 $f28, 0x10($sp) .L8024C2C8: /* 17ABA8 8024C2C8 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17ABAC 8024C2CC 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17ABB0 8024C2D0 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17ABB4 8024C2D4 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17ABB8 8024C2D8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17ABBC 8024C2DC 4481C000 */ mtc1 $at, $f24 D_8024C2E0_C09B60: /* 17ABC0 8024C2E0 44822000 */ mtc1 $v0, $f4 /* 17ABC4 8024C2E4 00000000 */ nop /* 17ABC8 8024C2E8 46802120 */ cvt.s.w $f4, $f4 D_8024C2EC: /* 17ABCC 8024C2EC 44830000 */ mtc1 $v1, $f0 /* 17ABD0 8024C2F0 00000000 */ nop /* 17ABD4 8024C2F4 46800020 */ cvt.s.w $f0, $f0 /* 17ABD8 8024C2F8 46002103 */ div.s $f4, $f4, $f0 /* 17ABDC 8024C2FC 4604C301 */ sub.s $f12, $f24, $f4 /* 17ABE0 8024C300 3C014049 */ lui $at, (0x40490FD0 >> 16) /* 17ABE4 8024C304 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF) /* 17ABE8 8024C308 4481B000 */ mtc1 $at, $f22 /* 17ABEC 8024C30C 00000000 */ nop /* 17ABF0 8024C310 46166302 */ mul.s $f12, $f12, $f22 /* 17ABF4 8024C314 00000000 */ nop .L8024C318: /* 17ABF8 8024C318 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 17ABFC 8024C31C 4481A000 */ mtc1 $at, $f20 /* 17AC00 8024C320 00000000 */ nop /* 17AC04 8024C324 46146302 */ mul.s $f12, $f12, $f20 /* 17AC08 8024C328 0C00A85B */ jal sin_rad /* 17AC0C 8024C32C 00000000 */ nop /* 17AC10 8024C330 46160002 */ mul.s $f0, $f0, $f22 /* 17AC14 8024C334 00000000 */ nop glabel func_8024C338 /* 17AC18 8024C338 46140302 */ mul.s $f12, $f0, $f20 /* 17AC1C 8024C33C 0C00A85B */ jal sin_rad /* 17AC20 8024C340 00000000 */ nop /* 17AC24 8024C344 46160002 */ mul.s $f0, $f0, $f22 /* 17AC28 8024C348 00000000 */ nop /* 17AC2C 8024C34C 46140302 */ mul.s $f12, $f0, $f20 /* 17AC30 8024C350 0C00A85B */ jal sin_rad /* 17AC34 8024C354 00000000 */ nop /* 17AC38 8024C358 080930E3 */ j .L8024C38C /* 17AC3C 8024C35C 4600C101 */ sub.s $f4, $f24, $f0 .L8024C360: /* 17AC40 8024C360 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17AC44 8024C364 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17AC48 8024C368 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17AC4C 8024C36C 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17AC50 8024C370 44822000 */ mtc1 $v0, $f4 /* 17AC54 8024C374 00000000 */ nop /* 17AC58 8024C378 46802120 */ cvt.s.w $f4, $f4 /* 17AC5C 8024C37C 44830000 */ mtc1 $v1, $f0 /* 17AC60 8024C380 00000000 */ nop .L8024C384: /* 17AC64 8024C384 46800020 */ cvt.s.w $f0, $f0 /* 17AC68 8024C388 46002103 */ div.s $f4, $f4, $f0 .L8024C38C: /* 17AC6C 8024C38C 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17AC70 8024C390 C434F2A8 */ lwc1 $f20, %lo(BattleCam_InitialPosX)($at) /* 17AC74 8024C394 4604A502 */ mul.s $f20, $f20, $f4 /* 17AC78 8024C398 00000000 */ nop /* 17AC7C 8024C39C 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) .L8024C3A0: /* 17AC80 8024C3A0 C432F2AC */ lwc1 $f18, %lo(BattleCam_InitialPosY)($at) /* 17AC84 8024C3A4 46049482 */ mul.s $f18, $f18, $f4 /* 17AC88 8024C3A8 00000000 */ nop /* 17AC8C 8024C3AC 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) .L8024C3B0: /* 17AC90 8024C3B0 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at) /* 17AC94 8024C3B4 46048402 */ mul.s $f16, $f16, $f4 /* 17AC98 8024C3B8 00000000 */ nop .L8024C3BC: /* 17AC9C 8024C3BC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 17ACA0 8024C3C0 C426F298 */ lwc1 $f6, %lo(BattleCam_InitialBoomZOffset)($at) /* 17ACA4 8024C3C4 46043182 */ mul.s $f6, $f6, $f4 .L8024C3C8: /* 17ACA8 8024C3C8 00000000 */ nop /* 17ACAC 8024C3CC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) D_8024C3D0_C09C50: /* 17ACB0 8024C3D0 C42CF28C */ lwc1 $f12, %lo(BattleCam_InitialBoomLength)($at) /* 17ACB4 8024C3D4 46046302 */ mul.s $f12, $f12, $f4 /* 17ACB8 8024C3D8 00000000 */ nop /* 17ACBC 8024C3DC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17ACC0 8024C3E0 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at) /* 17ACC4 8024C3E4 46044202 */ mul.s $f8, $f8, $f4 /* 17ACC8 8024C3E8 00000000 */ nop /* 17ACCC 8024C3EC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17ACD0 8024C3F0 44811000 */ mtc1 $at, $f2 /* 17ACD4 8024C3F4 00000000 */ nop /* 17ACD8 8024C3F8 46041081 */ sub.s $f2, $f2, $f4 /* 17ACDC 8024C3FC 4602D682 */ mul.s $f26, $f26, $f2 /* 17ACE0 8024C400 00000000 */ nop /* 17ACE4 8024C404 C7BC0010 */ lwc1 $f28, 0x10($sp) /* 17ACE8 8024C408 4602E602 */ mul.s $f24, $f28, $f2 /* 17ACEC 8024C40C 00000000 */ nop /* 17ACF0 8024C410 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset) /* 17ACF4 8024C414 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0) /* 17ACF8 8024C418 44820000 */ mtc1 $v0, $f0 D_8024C41C: /* 17ACFC 8024C41C 00000000 */ nop D_8024C420_C09CA0: /* 17AD00 8024C420 46800020 */ cvt.s.w $f0, $f0 /* 17AD04 8024C424 46020002 */ mul.s $f0, $f0, $f2 .L8024C428: /* 17AD08 8024C428 00000000 */ nop /* 17AD0C 8024C42C 4602F582 */ mul.s $f22, $f30, $f2 /* 17AD10 8024C430 00000000 */ nop /* 17AD14 8024C434 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) /* 17AD18 8024C438 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0) /* 17AD1C 8024C43C 44827000 */ mtc1 $v0, $f14 /* 17AD20 8024C440 00000000 */ nop /* 17AD24 8024C444 468073A0 */ cvt.s.w $f14, $f14 /* 17AD28 8024C448 46027382 */ mul.s $f14, $f14, $f2 /* 17AD2C 8024C44C 00000000 */ nop D_8024C450: /* 17AD30 8024C450 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw) /* 17AD34 8024C454 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0) /* 17AD38 8024C458 44825000 */ mtc1 $v0, $f10 /* 17AD3C 8024C45C 00000000 */ nop /* 17AD40 8024C460 468052A0 */ cvt.s.w $f10, $f10 /* 17AD44 8024C464 46025282 */ mul.s $f10, $f10, $f2 /* 17AD48 8024C468 00000000 */ nop /* 17AD4C 8024C46C 46003180 */ add.s $f6, $f6, $f0 .L8024C470: /* 17AD50 8024C470 3C014380 */ lui $at, (0x43800000 >> 16) /* 17AD54 8024C474 44810000 */ mtc1 $at, $f0 .L8024C478: /* 17AD58 8024C478 00000000 */ nop /* 17AD5C 8024C47C 46003182 */ mul.s $f6, $f6, $f0 /* 17AD60 8024C480 00000000 */ nop /* 17AD64 8024C484 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17AD68 8024C488 C420F294 */ lwc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 17AD6C 8024C48C 46040002 */ mul.s $f0, $f0, $f4 /* 17AD70 8024C490 00000000 */ nop /* 17AD74 8024C494 461AA500 */ add.s $f20, $f20, $f26 /* 17AD78 8024C498 46189480 */ add.s $f18, $f18, $f24 /* 17AD7C 8024C49C 46168400 */ add.s $f16, $f16, $f22 /* 17AD80 8024C4A0 460E6300 */ add.s $f12, $f12, $f14 /* 17AD84 8024C4A4 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft) /* 17AD88 8024C4A8 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft) /* 17AD8C 8024C4AC 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch) /* 17AD90 8024C4B0 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0) /* 17AD94 8024C4B4 460A4200 */ add.s $f8, $f8, $f10 /* 17AD98 8024C4B8 E6140054 */ swc1 $f20, 0x54($s0) /* 17AD9C 8024C4BC 44822000 */ mtc1 $v0, $f4 D_8024C4C0_C09D40: /* 17ADA0 8024C4C0 00000000 */ nop /* 17ADA4 8024C4C4 46802120 */ cvt.s.w $f4, $f4 D_8024C4C8: /* 17ADA8 8024C4C8 46022102 */ mul.s $f4, $f4, $f2 /* 17ADAC 8024C4CC 00000000 */ nop /* 17ADB0 8024C4D0 E6120058 */ swc1 $f18, 0x58($s0) /* 17ADB4 8024C4D4 E610005C */ swc1 $f16, 0x5C($s0) .L8024C4D8: /* 17ADB8 8024C4D8 4600670D */ trunc.w.s $f28, $f12 /* 17ADBC 8024C4DC 4402E000 */ mfc1 $v0, $f28 .L8024C4E0: /* 17ADC0 8024C4E0 00000000 */ nop /* 17ADC4 8024C4E4 A602001E */ sh $v0, 0x1E($s0) /* 17ADC8 8024C4E8 46040000 */ add.s $f0, $f0, $f4 D_8024C4EC: /* 17ADCC 8024C4EC 4600470D */ trunc.w.s $f28, $f8 /* 17ADD0 8024C4F0 4402E000 */ mfc1 $v0, $f28 /* 17ADD4 8024C4F4 00000000 */ nop /* 17ADD8 8024C4F8 A6020024 */ sh $v0, 0x24($s0) /* 17ADDC 8024C4FC 4600070D */ trunc.w.s $f28, $f0 /* 17ADE0 8024C500 4402E000 */ mfc1 $v0, $f28 /* 17ADE4 8024C504 00000000 */ nop /* 17ADE8 8024C508 A6020022 */ sh $v0, 0x22($s0) /* 17ADEC 8024C50C 4600370D */ trunc.w.s $f28, $f6 /* 17ADF0 8024C510 4402E000 */ mfc1 $v0, $f28 /* 17ADF4 8024C514 00000000 */ nop /* 17ADF8 8024C518 A6020026 */ sh $v0, 0x26($s0) /* 17ADFC 8024C51C 84820000 */ lh $v0, 0x0($a0) /* 17AE00 8024C520 94830000 */ lhu $v1, 0x0($a0) /* 17AE04 8024C524 14400006 */ bnez $v0, .L8024C540 /* 17AE08 8024C528 2462FFFF */ addiu $v0, $v1, -0x1 /* 17AE0C 8024C52C 24020001 */ addiu $v0, $zero, 0x1 /* 17AE10 8024C530 3C01802A */ lui $at, %hi(BattleCam_DoneMoving) /* 17AE14 8024C534 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at) /* 17AE18 8024C538 08093151 */ j .L8024C544 /* 17AE1C 8024C53C 00000000 */ nop .L8024C540: /* 17AE20 8024C540 A4820000 */ sh $v0, 0x0($a0) .L8024C544: /* 17AE24 8024C544 8FBF001C */ lw $ra, 0x1C($sp) /* 17AE28 8024C548 8FB00018 */ lw $s0, 0x18($sp) /* 17AE2C 8024C54C D7BE0048 */ ldc1 $f30, 0x48($sp) /* 17AE30 8024C550 D7BC0040 */ ldc1 $f28, 0x40($sp) D_8024C554: /* 17AE34 8024C554 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 17AE38 8024C558 D7B80030 */ ldc1 $f24, 0x30($sp) /* 17AE3C 8024C55C D7B60028 */ ldc1 $f22, 0x28($sp) D_8024C560_C09DE0: /* 17AE40 8024C560 D7B40020 */ ldc1 $f20, 0x20($sp) /* 17AE44 8024C564 0000102D */ daddu $v0, $zero, $zero .L8024C568: /* 17AE48 8024C568 03E00008 */ jr $ra /* 17AE4C 8024C56C 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[CAM_BATTLE]; f32 alpha; f32 x, y, z; if (isInitialCall) { BattleCam_PosX = 35.0f; BattleCam_PosY = camera->lookAt_obj_target.y; if (BattleCam_PosY < 60.0f) { BattleCam_PosY = 60.0f; } BattleCam_PosZ = 0.0f; BattleCam_BoomPitch = 8; BattleCam_BoomYaw = 0; 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(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2); } else { alpha = BattleCam_MoveTimeLeft; alpha /= BattleCam_MoveTimeTotal; } camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha); camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha); camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha); camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f; 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 load_split_entity_data /* A7B08 80111408 27BDFFC8 */ addiu $sp, $sp, -0x38 /* A7B0C 8011140C AFB40028 */ sw $s4, 0x28($sp) /* A7B10 80111410 0080A02D */ daddu $s4, $a0, $zero /* A7B14 80111414 AFB60030 */ sw $s6, 0x30($sp) /* A7B18 80111418 00A0B02D */ daddu $s6, $a1, $zero /* A7B1C 8011141C AFBF0034 */ sw $ra, 0x34($sp) /* A7B20 80111420 AFB5002C */ sw $s5, 0x2C($sp) /* A7B24 80111424 AFB30024 */ sw $s3, 0x24($sp) /* A7B28 80111428 AFB20020 */ sw $s2, 0x20($sp) /* A7B2C 8011142C AFB1001C */ sw $s1, 0x1C($sp) /* A7B30 80111430 AFB00018 */ sw $s0, 0x18($sp) /* A7B34 80111434 96C20000 */ lhu $v0, 0x0($s6) /* A7B38 80111438 30420008 */ andi $v0, $v0, 0x8 /* A7B3C 8011143C 104000A8 */ beqz $v0, .L801116E0 /* A7B40 80111440 0000A82D */ daddu $s5, $zero, $zero /* A7B44 80111444 8ED30018 */ lw $s3, 0x18($s6) /* A7B48 80111448 2402000A */ addiu $v0, $zero, 0xA /* A7B4C 8011144C A6820012 */ sh $v0, 0x12($s4) /* A7B50 80111450 92C20020 */ lbu $v0, 0x20($s6) /* A7B54 80111454 2443FFBD */ addiu $v1, $v0, -0x43 /* A7B58 80111458 2C620008 */ sltiu $v0, $v1, 0x8 /* A7B5C 8011145C 1040000A */ beqz $v0, .L80111488 /* A7B60 80111460 00031080 */ sll $v0, $v1, 2 /* A7B64 80111464 3C018015 */ lui $at, %hi(jtbl_8014F858) /* A7B68 80111468 00220821 */ addu $at, $at, $v0 /* A7B6C 8011146C 8C22F858 */ lw $v0, %lo(jtbl_8014F858)($at) /* A7B70 80111470 00400008 */ jr $v0 /* A7B74 80111474 00000000 */ nop glabel .L80111478 /* A7B78 80111478 08044523 */ j .L8011148C /* A7B7C 8011147C 24121000 */ addiu $s2, $zero, 0x1000 glabel .L80111480 /* A7B80 80111480 08044523 */ j .L8011148C /* A7B84 80111484 24122BC0 */ addiu $s2, $zero, 0x2BC0 .L80111488: /* A7B88 80111488 0000902D */ daddu $s2, $zero, $zero .L8011148C: /* A7B8C 8011148C 12400020 */ beqz $s2, .L80111510 /* A7B90 80111490 24020043 */ addiu $v0, $zero, 0x43 /* A7B94 80111494 92C30020 */ lbu $v1, 0x20($s6) /* A7B98 80111498 54620007 */ bnel $v1, $v0, .L801114B8 /* A7B9C 8011149C 2652F000 */ addiu $s2, $s2, -0x1000 /* A7BA0 801114A0 0280202D */ daddu $a0, $s4, $zero /* A7BA4 801114A4 02C0282D */ daddu $a1, $s6, $zero /* A7BA8 801114A8 27A60010 */ addiu $a2, $sp, 0x10 /* A7BAC 801114AC 0C044457 */ jal is_entity_data_loaded /* A7BB0 801114B0 27A70014 */ addiu $a3, $sp, 0x14 /* A7BB4 801114B4 2652F000 */ addiu $s2, $s2, -0x1000 .L801114B8: /* A7BB8 801114B8 3C118015 */ lui $s1, %hi(D_80151300) /* A7BBC 801114BC 26311300 */ addiu $s1, $s1, %lo(D_80151300) /* A7BC0 801114C0 00129080 */ sll $s2, $s2, 2 /* A7BC4 801114C4 8E640000 */ lw $a0, 0x0($s3) /* A7BC8 801114C8 8E260000 */ lw $a2, 0x0($s1) /* A7BCC 801114CC 8E650004 */ lw $a1, 0x4($s3) /* A7BD0 801114D0 0C00A5CF */ jal dma_copy /* A7BD4 801114D4 00D23021 */ addu $a2, $a2, $s2 /* A7BD8 801114D8 00028082 */ srl $s0, $v0, 2 /* A7BDC 801114DC 8E260000 */ lw $a2, 0x0($s1) /* A7BE0 801114E0 00108080 */ sll $s0, $s0, 2 /* A7BE4 801114E4 00D23021 */ addu $a2, $a2, $s2 /* A7BE8 801114E8 AE860044 */ sw $a2, 0x44($s4) /* A7BEC 801114EC 8E640008 */ lw $a0, 0x8($s3) /* A7BF0 801114F0 8E65000C */ lw $a1, 0xC($s3) /* A7BF4 801114F4 0C00A5CF */ jal dma_copy /* A7BF8 801114F8 00D03021 */ addu $a2, $a2, $s0 /* A7BFC 801114FC 8E220000 */ lw $v0, 0x0($s1) /* A7C00 80111500 24150001 */ addiu $s5, $zero, 0x1 /* A7C04 80111504 00521021 */ addu $v0, $v0, $s2 /* A7C08 80111508 080445C4 */ j .L80111710 /* A7C0C 8011150C 00508021 */ addu $s0, $v0, $s0 .L80111510: /* A7C10 80111510 0280202D */ daddu $a0, $s4, $zero /* A7C14 80111514 02C0282D */ daddu $a1, $s6, $zero /* A7C18 80111518 27A60010 */ addiu $a2, $sp, 0x10 /* A7C1C 8011151C 0C044457 */ jal is_entity_data_loaded /* A7C20 80111520 27A70014 */ addiu $a3, $sp, 0x14 /* A7C24 80111524 10400055 */ beqz $v0, .L8011167C /* A7C28 80111528 00000000 */ nop /* A7C2C 8011152C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* A7C30 80111530 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* A7C34 80111534 80420070 */ lb $v0, 0x70($v0) /* A7C38 80111538 14400005 */ bnez $v0, .L80111550 /* A7C3C 8011153C 00000000 */ nop /* A7C40 80111540 3C128015 */ lui $s2, %hi(wEntityBlueprintSize) /* A7C44 80111544 8E52165C */ lw $s2, %lo(wEntityBlueprintSize)($s2) /* A7C48 80111548 08044556 */ j .L80111558 /* A7C4C 8011154C 00000000 */ nop .L80111550: /* A7C50 80111550 3C128015 */ lui $s2, %hi(bEntityBlueprintSize) /* A7C54 80111554 8E521660 */ lw $s2, %lo(bEntityBlueprintSize)($s2) .L80111558: /* A7C58 80111558 8E620004 */ lw $v0, 0x4($s3) /* A7C5C 8011155C 8E630000 */ lw $v1, 0x0($s3) /* A7C60 80111560 00431023 */ subu $v0, $v0, $v1 /* A7C64 80111564 00021083 */ sra $v0, $v0, 2 /* A7C68 80111568 02421021 */ addu $v0, $s2, $v0 /* A7C6C 8011156C 2C425FFD */ sltiu $v0, $v0, 0x5FFD /* A7C70 80111570 14400005 */ bnez $v0, .L80111588 /* A7C74 80111574 00000000 */ nop /* A7C78 80111578 0C0441A9 */ jal get_entity_type /* A7C7C 8011157C 92840004 */ lbu $a0, 0x4($s4) .L80111580: /* A7C80 80111580 08044560 */ j .L80111580 /* A7C84 80111584 00000000 */ nop .L80111588: /* A7C88 80111588 8E62000C */ lw $v0, 0xC($s3) /* A7C8C 8011158C 8E630008 */ lw $v1, 0x8($s3) /* A7C90 80111590 00431023 */ subu $v0, $v0, $v1 /* A7C94 80111594 00021083 */ sra $v0, $v0, 2 /* A7C98 80111598 02421021 */ addu $v0, $s2, $v0 /* A7C9C 8011159C 2C425FFD */ sltiu $v0, $v0, 0x5FFD /* A7CA0 801115A0 14400006 */ bnez $v0, .L801115BC /* A7CA4 801115A4 00128080 */ sll $s0, $s2, 2 /* A7CA8 801115A8 92840004 */ lbu $a0, 0x4($s4) /* A7CAC 801115AC 0C0441A9 */ jal get_entity_type /* A7CB0 801115B0 00000000 */ nop .L801115B4: /* A7CB4 801115B4 0804456D */ j .L801115B4 /* A7CB8 801115B8 00000000 */ nop .L801115BC: /* A7CBC 801115BC 3C118015 */ lui $s1, %hi(gEntityHeapBase) /* A7CC0 801115C0 263112C4 */ addiu $s1, $s1, %lo(gEntityHeapBase) /* A7CC4 801115C4 8E640000 */ lw $a0, 0x0($s3) /* A7CC8 801115C8 8E260000 */ lw $a2, 0x0($s1) /* A7CCC 801115CC 8E650004 */ lw $a1, 0x4($s3) /* A7CD0 801115D0 00D03023 */ subu $a2, $a2, $s0 /* A7CD4 801115D4 00C53023 */ subu $a2, $a2, $a1 /* A7CD8 801115D8 00063083 */ sra $a2, $a2, 2 /* A7CDC 801115DC 00063080 */ sll $a2, $a2, 2 /* A7CE0 801115E0 0C00A5CF */ jal dma_copy /* A7CE4 801115E4 00863021 */ addu $a2, $a0, $a2 /* A7CE8 801115E8 00021082 */ srl $v0, $v0, 2 /* A7CEC 801115EC 02429021 */ addu $s2, $s2, $v0 /* A7CF0 801115F0 8E260000 */ lw $a2, 0x0($s1) /* A7CF4 801115F4 00021080 */ sll $v0, $v0, 2 /* A7CF8 801115F8 00D08023 */ subu $s0, $a2, $s0 /* A7CFC 801115FC 02028023 */ subu $s0, $s0, $v0 /* A7D00 80111600 AE900044 */ sw $s0, 0x44($s4) /* A7D04 80111604 00128080 */ sll $s0, $s2, 2 /* A7D08 80111608 00D03023 */ subu $a2, $a2, $s0 /* A7D0C 8011160C 8E65000C */ lw $a1, 0xC($s3) /* A7D10 80111610 8E640008 */ lw $a0, 0x8($s3) /* A7D14 80111614 00C53023 */ subu $a2, $a2, $a1 /* A7D18 80111618 00063083 */ sra $a2, $a2, 2 /* A7D1C 8011161C 00063080 */ sll $a2, $a2, 2 /* A7D20 80111620 0C00A5CF */ jal dma_copy /* A7D24 80111624 00863021 */ addu $a2, $a0, $a2 /* A7D28 80111628 00021082 */ srl $v0, $v0, 2 /* A7D2C 8011162C 02429021 */ addu $s2, $s2, $v0 /* A7D30 80111630 00021080 */ sll $v0, $v0, 2 /* A7D34 80111634 8E230000 */ lw $v1, 0x0($s1) /* A7D38 80111638 92840004 */ lbu $a0, 0x4($s4) /* A7D3C 8011163C 00701823 */ subu $v1, $v1, $s0 /* A7D40 80111640 0C0441A9 */ jal get_entity_type /* A7D44 80111644 00628023 */ subu $s0, $v1, $v0 /* A7D48 80111648 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* A7D4C 8011164C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* A7D50 80111650 80420070 */ lb $v0, 0x70($v0) /* A7D54 80111654 14400005 */ bnez $v0, .L8011166C /* A7D58 80111658 24150001 */ addiu $s5, $zero, 0x1 /* A7D5C 8011165C 3C018015 */ lui $at, %hi(wEntityBlueprintSize) /* A7D60 80111660 AC32165C */ sw $s2, %lo(wEntityBlueprintSize)($at) /* A7D64 80111664 080445C4 */ j .L80111710 /* A7D68 80111668 00000000 */ nop .L8011166C: /* A7D6C 8011166C 3C018015 */ lui $at, %hi(bEntityBlueprintSize) /* A7D70 80111670 AC321660 */ sw $s2, %lo(bEntityBlueprintSize)($at) /* A7D74 80111674 080445C4 */ j .L80111710 /* A7D78 80111678 00000000 */ nop .L8011167C: /* A7D7C 8011167C 8E620004 */ lw $v0, 0x4($s3) /* A7D80 80111680 8E630000 */ lw $v1, 0x0($s3) /* A7D84 80111684 3C058015 */ lui $a1, %hi(gEntityHeapBase) /* A7D88 80111688 8CA512C4 */ lw $a1, %lo(gEntityHeapBase)($a1) /* A7D8C 8011168C 00431023 */ subu $v0, $v0, $v1 /* A7D90 80111690 00021883 */ sra $v1, $v0, 2 /* A7D94 80111694 8FA20010 */ lw $v0, 0x10($sp) /* A7D98 80111698 00031880 */ sll $v1, $v1, 2 /* A7D9C 8011169C 00021080 */ sll $v0, $v0, 2 /* A7DA0 801116A0 00A21023 */ subu $v0, $a1, $v0 /* A7DA4 801116A4 00431023 */ subu $v0, $v0, $v1 /* A7DA8 801116A8 AE820044 */ sw $v0, 0x44($s4) /* A7DAC 801116AC 8E63000C */ lw $v1, 0xC($s3) /* A7DB0 801116B0 8E620008 */ lw $v0, 0x8($s3) /* A7DB4 801116B4 92840004 */ lbu $a0, 0x4($s4) /* A7DB8 801116B8 00621823 */ subu $v1, $v1, $v0 /* A7DBC 801116BC 8FA20014 */ lw $v0, 0x14($sp) /* A7DC0 801116C0 00031883 */ sra $v1, $v1, 2 /* A7DC4 801116C4 00021080 */ sll $v0, $v0, 2 /* A7DC8 801116C8 00A22823 */ subu $a1, $a1, $v0 /* A7DCC 801116CC 00031080 */ sll $v0, $v1, 2 /* A7DD0 801116D0 0C0441A9 */ jal get_entity_type /* A7DD4 801116D4 00A28023 */ subu $s0, $a1, $v0 /* A7DD8 801116D8 080445C4 */ j .L80111710 /* A7DDC 801116DC 00000000 */ nop .L801116E0: /* A7DE0 801116E0 0C04792E */ jal create_model_animator /* A7DE4 801116E4 8EC40004 */ lw $a0, 0x4($s6) /* A7DE8 801116E8 A6820014 */ sh $v0, 0x14($s4) /* A7DEC 801116EC 00021400 */ sll $v0, $v0, 16 /* A7DF0 801116F0 8EC50008 */ lw $a1, 0x8($s6) /* A7DF4 801116F4 0C0480EB */ jal load_model_animator_tree /* A7DF8 801116F8 00022403 */ sra $a0, $v0, 16 /* A7DFC 801116FC 86840014 */ lh $a0, 0x14($s4) /* A7E00 80111700 0C047A2F */ jal update_model_animator /* A7E04 80111704 00000000 */ nop /* A7E08 80111708 080445DA */ j .L80111768 /* A7E0C 8011170C 00000000 */ nop .L80111710: /* A7E10 80111710 8EC20008 */ lw $v0, 0x8($s6) /* A7E14 80111714 8ED10004 */ lw $s1, 0x4($s6) /* A7E18 80111718 12A00005 */ beqz $s5, .L80111730 /* A7E1C 8011171C 02029021 */ addu $s2, $s0, $v0 /* A7E20 80111720 02C0202D */ daddu $a0, $s6, $zero /* A7E24 80111724 8E860044 */ lw $a2, 0x44($s4) /* A7E28 80111728 0C04442D */ jal entity_anim_make_vertex_pointers /* A7E2C 8011172C 0200282D */ daddu $a1, $s0, $zero .L80111730: /* A7E30 80111730 0220202D */ daddu $a0, $s1, $zero /* A7E34 80111734 0C047978 */ jal create_mesh_animator /* A7E38 80111738 0200282D */ daddu $a1, $s0, $zero /* A7E3C 8011173C 00022400 */ sll $a0, $v0, 16 /* A7E40 80111740 00042403 */ sra $a0, $a0, 16 /* A7E44 80111744 0240282D */ daddu $a1, $s2, $zero /* A7E48 80111748 0C04811D */ jal load_mesh_animator_tree /* A7E4C 8011174C A6820014 */ sh $v0, 0x14($s4) /* A7E50 80111750 86840014 */ lh $a0, 0x14($s4) /* A7E54 80111754 0C047A2F */ jal update_model_animator /* A7E58 80111758 00000000 */ nop /* A7E5C 8011175C 8E820000 */ lw $v0, 0x0($s4) /* A7E60 80111760 34420008 */ ori $v0, $v0, 0x8 /* A7E64 80111764 AE820000 */ sw $v0, 0x0($s4) .L80111768: /* A7E68 80111768 8FBF0034 */ lw $ra, 0x34($sp) /* A7E6C 8011176C 8FB60030 */ lw $s6, 0x30($sp) /* A7E70 80111770 8FB5002C */ lw $s5, 0x2C($sp) /* A7E74 80111774 8FB40028 */ lw $s4, 0x28($sp) /* A7E78 80111778 8FB30024 */ lw $s3, 0x24($sp) /* A7E7C 8011177C 8FB20020 */ lw $s2, 0x20($sp) /* A7E80 80111780 8FB1001C */ lw $s1, 0x1C($sp) /* A7E84 80111784 8FB00018 */ lw $s0, 0x18($sp) /* A7E88 80111788 03E00008 */ jr $ra /* A7E8C 8011178C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void load_split_entity_data(Entity* entity, EntityBlueprint* entityData, s32 listIndex) { s32 swizzlePointers = FALSE; s32 loadedStart, loadedEnd; void* animBaseAddr; s16* animationScript; StaticAnimatorNode** animationNodes; s32 specialSize; s32 dma1size; s32 dma2size_1; s32 dma2size_2; s32 totalLoaded; if (entityData->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { DmaEntry* dmaList = entityData->dmaList; entity->vertexSegment = 0xA; switch (entityData->entityType) { case ENTITY_TYPE_RESET_MUNCHLESIA: case ENTITY_TYPE_MUNCHLESIA_ENVELOP: case ENTITY_TYPE_MUNCHLESIA_CHEWING: case ENTITY_TYPE_MUNCHLESIA_RESET1: specialSize = 0x1000; break; case ENTITY_TYPE_MUNCHLESIA_GRAB: case ENTITY_TYPE_MUNCHLESIA_BEGIN_CHEW: case ENTITY_TYPE_MUNCHLESIA_SPIT_OUT: case ENTITY_TYPE_MUNCHLESIA_RESET2: specialSize = 0x2BC0; break; default: specialSize = 0; break; } if (specialSize != 0) { if (entityData->entityType == ENTITY_TYPE_RESET_MUNCHLESIA) { is_entity_data_loaded(entity, entityData, &loadedStart, &loadedEnd); } specialSize -= 0x1000; dma1size = dma_copy(dmaList[0].start, dmaList[0].end, (void*)(gEntityHeapBottom + specialSize * 4)) / 4; entity->gfxBaseAddr = (void*)(gEntityHeapBottom + specialSize * 4); dma_copy(dmaList[1].start, dmaList[1].end, (void*)(gEntityHeapBottom + specialSize * 4 + dma1size * 4)); animBaseAddr = (void*)(gEntityHeapBottom + specialSize * 4 + dma1size * 4); swizzlePointers = TRUE; } else if (is_entity_data_loaded(entity, entityData, &loadedStart, &loadedEnd)) { if (!gGameStatusPtr->isBattle) { totalLoaded = wEntityDataLoadedSize; } else { totalLoaded = bEntityDataLoadedSize; } if ((totalLoaded + ((dmaList[0].end - dmaList[0].start) >> 2)) > 0x5FFCU) { get_entity_type(entity->listIndex); PANIC(); } if ((totalLoaded + ((dmaList[1].end - dmaList[1].start) >> 2)) > 0x5FFCU) { get_entity_type(entity->listIndex); PANIC(); } dma2size_1 = dma_copy(dmaList[0].start, dmaList[0].end, dmaList[0].start + ((gEntityHeapBase - totalLoaded * 4 - (s32)dmaList[0].end) >> 2) * 4) >> 2; entity->gfxBaseAddr = (void*)(gEntityHeapBase - totalLoaded * 4 - dma2size_1 * 4); totalLoaded += dma2size_1; dma2size_2 = dma_copy(dmaList[1].start, dmaList[1].end, dmaList[1].start + ((gEntityHeapBase - totalLoaded * 4 - (s32)dmaList[1].end) >> 2) * 4) >> 2; animBaseAddr = (void*)(gEntityHeapBase - totalLoaded * 4 - dma2size_2 * 4); totalLoaded += dma2size_2; get_entity_type(entity->listIndex); if (!gGameStatusPtr->isBattle) { wEntityDataLoadedSize = totalLoaded; } else { bEntityDataLoadedSize = totalLoaded; } swizzlePointers = TRUE; } else { u32 temp = (dmaList[0].end - dmaList[0].start) >> 2; entity->gfxBaseAddr = (void*)(gEntityHeapBase - loadedStart * 4 - temp * 4); temp = (dmaList[1].end - dmaList[1].start) >> 2; animBaseAddr = (void*)(gEntityHeapBase - loadedEnd * 4 - temp * 4); get_entity_type(entity->listIndex); } } else { entity->virtualModelIndex = create_model_animator(entityData->renderCommandList); load_model_animator_tree(entity->virtualModelIndex, entityData->modelAnimationNodes); update_model_animator(entity->virtualModelIndex); return; } animationScript = entityData->renderCommandList; animationNodes = (StaticAnimatorNode**)((s32)animBaseAddr + (s32)entityData->modelAnimationNodes); if (swizzlePointers) { entity_swizzle_anim_pointers(entityData, animBaseAddr, entity->gfxBaseAddr); } entity->virtualModelIndex = create_mesh_animator(animationScript, animBaseAddr); load_mesh_animator_tree(entity->virtualModelIndex, animationNodes); update_model_animator(entity->virtualModelIndex); entity->flags |= ENTITY_FLAG_HAS_ANIMATED_MODEL; }
### RAW ASSEMBLY INSTRUCTIONS: glabel parasol_get_npc /* E2A340 802B6000 27BDFFD0 */ addiu $sp, $sp, -0x30 /* E2A344 802B6004 AFB1001C */ sw $s1, 0x1C($sp) /* E2A348 802B6008 3C118011 */ lui $s1, %hi(gPlayerStatus) /* E2A34C 802B600C 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* E2A350 802B6010 AFBF0024 */ sw $ra, 0x24($sp) /* E2A354 802B6014 AFB20020 */ sw $s2, 0x20($sp) .L802B6018: /* E2A358 802B6018 AFB00018 */ sw $s0, 0x18($sp) /* E2A35C 802B601C F7B40028 */ sdc1 $f20, 0x28($sp) /* E2A360 802B6020 8E230000 */ lw $v1, 0x0($s1) /* E2A364 802B6024 3C128011 */ lui $s2, %hi(TweesterTouchingPlayer) /* E2A368 802B6028 8E52C934 */ lw $s2, %lo(TweesterTouchingPlayer)($s2) /* E2A36C 802B602C 0461002F */ bgez $v1, .L802B60EC /* E2A370 802B6030 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16) /* E2A374 802B6034 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF) /* E2A378 802B6038 00621024 */ and $v0, $v1, $v0 /* E2A37C 802B603C 0C038045 */ jal disable_player_static_collisions .L802B6040: /* E2A380 802B6040 AE220000 */ sw $v0, 0x0($s1) .L802B6044: /* E2A384 802B6044 0C03805E */ jal disable_player_input glabel action_hammer_play_hit_fx /* E2A388 802B6048 00000000 */ nop .L802B604C: /* E2A38C 802B604C 3C030010 */ lui $v1, (0x100008 >> 16) .L802B6050: /* E2A390 802B6050 34630008 */ ori $v1, $v1, (0x100008 & 0xFFFF) /* E2A394 802B6054 3C040008 */ lui $a0, (0x8001F >> 16) .L802B6058: /* E2A398 802B6058 8E220000 */ lw $v0, 0x0($s1) /* E2A39C 802B605C 3484001F */ ori $a0, $a0, (0x8001F & 0xFFFF) glabel action_update_sliding /* E2A3A0 802B6060 00431025 */ or $v0, $v0, $v1 /* E2A3A4 802B6064 0C037FBF */ jal suggest_player_anim_allow_backward .L802B6068: /* E2A3A8 802B6068 AE220000 */ sw $v0, 0x0($s1) /* E2A3AC 802B606C 3C10802B */ lui $s0, %hi(PlayerTweesterPhysicsPtr) /* E2A3B0 802B6070 26106350 */ addiu $s0, $s0, %lo(PlayerTweesterPhysicsPtr) .L802B6074: /* E2A3B4 802B6074 8E040000 */ lw $a0, 0x0($s0) /* E2A3B8 802B6078 2405001C */ addiu $a1, $zero, 0x1C glabel .L802B607C /* E2A3BC 802B607C 0C00A580 */ jal mem_clear .L802B6080: /* E2A3C0 802B6080 A22000B6 */ sb $zero, 0xB6($s1) /* E2A3C4 802B6084 C62C0028 */ lwc1 $f12, 0x28($s1) /* E2A3C8 802B6088 C62E0030 */ lwc1 $f14, 0x30($s1) .L802B608C: /* E2A3CC 802B608C 8E460048 */ lw $a2, 0x48($s2) .L802B6090: /* E2A3D0 802B6090 0C00A7B5 */ jal dist2D .L802B6094: /* E2A3D4 802B6094 8E470050 */ lw $a3, 0x50($s2) /* E2A3D8 802B6098 8E020000 */ lw $v0, 0x0($s0) glabel action_update_state_23 /* E2A3DC 802B609C 46000005 */ abs.s $f0, $f0 /* E2A3E0 802B60A0 E440000C */ swc1 $f0, 0xC($v0) glabel action_update_use_spinning_flower /* E2A3E4 802B60A4 C64C0048 */ lwc1 $f12, 0x48($s2) .L802B60A8: /* E2A3E8 802B60A8 C64E0050 */ lwc1 $f14, 0x50($s2) .L802B60AC: /* E2A3EC 802B60AC 8E260028 */ lw $a2, 0x28($s1) /* E2A3F0 802B60B0 0C00A720 */ jal atan2 glabel action_update_jump /* E2A3F4 802B60B4 8E270030 */ lw $a3, 0x30($s1) /* E2A3F8 802B60B8 240402F6 */ addiu $a0, $zero, 0x2F6 /* E2A3FC 802B60BC 0000282D */ daddu $a1, $zero, $zero /* E2A400 802B60C0 8E030000 */ lw $v1, 0x0($s0) /* E2A404 802B60C4 3C0140C0 */ lui $at, (0x40C00000 >> 16) .L802B60C8: /* E2A408 802B60C8 44811000 */ mtc1 $at, $f2 /* E2A40C 802B60CC 3C014248 */ lui $at, (0x42480000 >> 16) glabel .L802B60D0 /* E2A410 802B60D0 44812000 */ mtc1 $at, $f4 .L802B60D4: /* E2A414 802B60D4 24020078 */ addiu $v0, $zero, 0x78 /* E2A418 802B60D8 E4600010 */ swc1 $f0, 0x10($v1) /* E2A41C 802B60DC E4620014 */ swc1 $f2, 0x14($v1) /* E2A420 802B60E0 E4640018 */ swc1 $f4, 0x18($v1) /* E2A424 802B60E4 0C052736 */ jal sfx_play_sound_at_player .L802B60E8: /* E2A428 802B60E8 AC620000 */ sw $v0, 0x0($v1) .L802B60EC: /* E2A42C 802B60EC 822300B6 */ lb $v1, 0xB6($s1) .L802B60F0: /* E2A430 802B60F0 10600005 */ beqz $v1, .L802B6108 glabel .L802B60F4 /* E2A434 802B60F4 24020001 */ addiu $v0, $zero, 0x1 /* E2A438 802B60F8 1062007A */ beq $v1, $v0, .L802B62E4 /* E2A43C 802B60FC 00000000 */ nop .L802B6100: /* E2A440 802B6100 080AD8CB */ j .L802B632C .L802B6104: /* E2A444 802B6104 00000000 */ nop .L802B6108: /* E2A448 802B6108 3C10802B */ lui $s0, %hi(PlayerTweesterPhysicsPtr) glabel .L802B610C /* E2A44C 802B610C 26106350 */ addiu $s0, $s0, %lo(PlayerTweesterPhysicsPtr) .L802B6110: /* E2A450 802B6110 8E020000 */ lw $v0, 0x0($s0) /* E2A454 802B6114 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) .L802B6118: /* E2A458 802B6118 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* E2A45C 802B611C 44810000 */ mtc1 $at, $f0 glabel action_update_parasol /* E2A460 802B6120 C44C0010 */ lwc1 $f12, 0x10($v0) .L802B6124: /* E2A464 802B6124 46006302 */ mul.s $f12, $f12, $f0 .L802B6128: /* E2A468 802B6128 00000000 */ nop /* E2A46C 802B612C 27A50010 */ addiu $a1, $sp, 0x10 /* E2A470 802B6130 3C0143B4 */ lui $at, (0x43B40000 >> 16) glabel .L802B6134 /* E2A474 802B6134 44810000 */ mtc1 $at, $f0 /* E2A478 802B6138 27A60014 */ addiu $a2, $sp, 0x14 .L802B613C: /* E2A47C 802B613C 0C00A82D */ jal sin_cos_rad .L802B6140: /* E2A480 802B6140 46006303 */ div.s $f12, $f12, $f0 .L802B6144: /* E2A484 802B6144 8E020000 */ lw $v0, 0x0($s0) /* E2A488 802B6148 C7A20010 */ lwc1 $f2, 0x10($sp) .L802B614C: /* E2A48C 802B614C C440000C */ lwc1 $f0, 0xC($v0) .L802B6150: /* E2A490 802B6150 46001082 */ mul.s $f2, $f2, $f0 .L802B6154: /* E2A494 802B6154 00000000 */ nop .L802B6158: /* E2A498 802B6158 C6400048 */ lwc1 $f0, 0x48($s2) .L802B615C: /* E2A49C 802B615C 46020000 */ add.s $f0, $f0, $f2 /* E2A4A0 802B6160 E6200028 */ swc1 $f0, 0x28($s1) .L802B6164: /* E2A4A4 802B6164 C7A20014 */ lwc1 $f2, 0x14($sp) .L802B6168: /* E2A4A8 802B6168 C440000C */ lwc1 $f0, 0xC($v0) /* E2A4AC 802B616C 46001082 */ mul.s $f2, $f2, $f0 glabel .L802B6170 /* E2A4B0 802B6170 00000000 */ nop glabel .L802B6174 /* E2A4B4 802B6174 C6400050 */ lwc1 $f0, 0x50($s2) /* E2A4B8 802B6178 46020001 */ sub.s $f0, $f0, $f2 .L802B617C: /* E2A4BC 802B617C E6200030 */ swc1 $f0, 0x30($s1) .L802B6180: /* E2A4C0 802B6180 C4400010 */ lwc1 $f0, 0x10($v0) glabel .L802B6184 /* E2A4C4 802B6184 C44C0014 */ lwc1 $f12, 0x14($v0) .L802B6188: /* E2A4C8 802B6188 0C00A6C9 */ jal clamp_angle .L802B618C: /* E2A4CC 802B618C 460C0301 */ sub.s $f12, $f0, $f12 .L802B6190: /* E2A4D0 802B6190 8E100000 */ lw $s0, 0x0($s0) .L802B6194: /* E2A4D4 802B6194 3C0141A0 */ lui $at, (0x41A00000 >> 16) glabel func_802B6198 /* E2A4D8 802B6198 44811000 */ mtc1 $at, $f2 /* E2A4DC 802B619C C604000C */ lwc1 $f4, 0xC($s0) .L802B61A0: /* E2A4E0 802B61A0 4604103C */ c.lt.s $f2, $f4 .L802B61A4: /* E2A4E4 802B61A4 00000000 */ nop .L802B61A8: /* E2A4E8 802B61A8 45000005 */ bc1f func_802B61C0 .L802B61AC: /* E2A4EC 802B61AC E6000010 */ swc1 $f0, 0x10($s0) .L802B61B0: /* E2A4F0 802B61B0 3C013F80 */ lui $at, (0x3F800000 >> 16) .L802B61B4: /* E2A4F4 802B61B4 44810000 */ mtc1 $at, $f0 /* E2A4F8 802B61B8 080AD87B */ j .L802B61EC /* E2A4FC 802B61BC 46002001 */ sub.s $f0, $f4, $f0 glabel func_802B61C0 /* E2A500 802B61C0 3C014198 */ lui $at, (0x41980000 >> 16) /* E2A504 802B61C4 44810000 */ mtc1 $at, $f0 .L802B61C8: /* E2A508 802B61C8 00000000 */ nop .L802B61CC: /* E2A50C 802B61CC 4600203C */ c.lt.s $f4, $f0 /* E2A510 802B61D0 00000000 */ nop .L802B61D4: /* E2A514 802B61D4 45000006 */ bc1f .L802B61F0 .L802B61D8: /* E2A518 802B61D8 00000000 */ nop .L802B61DC: /* E2A51C 802B61DC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* E2A520 802B61E0 44810000 */ mtc1 $at, $f0 glabel func_802B61E4 /* E2A524 802B61E4 00000000 */ nop .L802B61E8: /* E2A528 802B61E8 46002000 */ add.s $f0, $f4, $f0 .L802B61EC: /* E2A52C 802B61EC E600000C */ swc1 $f0, 0xC($s0) .L802B61F0: /* E2A530 802B61F0 3C10802B */ lui $s0, %hi(PlayerTweesterPhysicsPtr) .L802B61F4: /* E2A534 802B61F4 26106350 */ addiu $s0, $s0, %lo(PlayerTweesterPhysicsPtr) .L802B61F8: /* E2A538 802B61F8 8E020000 */ lw $v0, 0x0($s0) .L802B61FC: /* E2A53C 802B61FC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) .L802B6200: /* E2A540 802B6200 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) .L802B6204: /* E2A544 802B6204 44810000 */ mtc1 $at, $f0 glabel .L802B6208 /* E2A548 802B6208 C44C0018 */ lwc1 $f12, 0x18($v0) /* E2A54C 802B620C 46006302 */ mul.s $f12, $f12, $f0 .L802B6210: /* E2A550 802B6210 00000000 */ nop .L802B6214: /* E2A554 802B6214 3C0143B4 */ lui $at, (0x43B40000 >> 16) glabel .L802B6218 /* E2A558 802B6218 4481A000 */ mtc1 $at, $f20 /* E2A55C 802B621C 0C00A85B */ jal sin_rad .L802B6220: /* E2A560 802B6220 46146303 */ div.s $f12, $f12, $f20 .L802B6224: /* E2A564 802B6224 8E020000 */ lw $v0, 0x0($s0) glabel .L802B6228 /* E2A568 802B6228 3C014040 */ lui $at, (0x40400000 >> 16) .L802B622C: /* E2A56C 802B622C 44812000 */ mtc1 $at, $f4 glabel action_update_step_up_peach /* E2A570 802B6230 C4420018 */ lwc1 $f2, 0x18($v0) /* E2A574 802B6234 46041080 */ add.s $f2, $f2, $f4 glabel .L802B6238 /* E2A578 802B6238 3C014316 */ lui $at, (0x43160000 >> 16) glabel .L802B623C /* E2A57C 802B623C 44813000 */ mtc1 $at, $f6 glabel .L802B6240 /* E2A580 802B6240 00000000 */ nop glabel .L802B6244 /* E2A584 802B6244 4602303C */ c.lt.s $f6, $f2 glabel .L802B6248 /* E2A588 802B6248 E4420018 */ swc1 $f2, 0x18($v0) /* E2A58C 802B624C 46040082 */ mul.s $f2, $f0, $f4 glabel .L802B6250 /* E2A590 802B6250 00000000 */ nop .L802B6254: /* E2A594 802B6254 45030001 */ bc1tl .L802B625C glabel .L802B6258 /* E2A598 802B6258 E4460018 */ swc1 $f6, 0x18($v0) .L802B625C: /* E2A59C 802B625C C620002C */ lwc1 $f0, 0x2C($s1) /* E2A5A0 802B6260 46020000 */ add.s $f0, $f0, $f2 /* E2A5A4 802B6264 8E020000 */ lw $v0, 0x0($s0) .L802B6268: /* E2A5A8 802B6268 E620002C */ swc1 $f0, 0x2C($s1) .L802B626C: /* E2A5AC 802B626C C44C0010 */ lwc1 $f12, 0x10($v0) /* E2A5B0 802B6270 0C00A6C9 */ jal clamp_angle .L802B6274: /* E2A5B4 802B6274 460CA301 */ sub.s $f12, $f20, $f12 glabel .L802B6278 /* E2A5B8 802B6278 8E020000 */ lw $v0, 0x0($s0) /* E2A5BC 802B627C E62000A8 */ swc1 $f0, 0xA8($s1) .L802B6280: /* E2A5C0 802B6280 C4400014 */ lwc1 $f0, 0x14($v0) .L802B6284: /* E2A5C4 802B6284 3C01802B */ lui $at, %hi(D_802B6360) glabel action_update_run /* E2A5C8 802B6288 D4226360 */ ldc1 $f2, %lo(D_802B6360)($at) /* E2A5CC 802B628C 46000021 */ cvt.d.s $f0, $f0 .L802B6290: /* E2A5D0 802B6290 46220000 */ add.d $f0, $f0, $f2 glabel func_802B6294 /* E2A5D4 802B6294 3C014220 */ lui $at, (0x42200000 >> 16) glabel .L802B6298 /* E2A5D8 802B6298 44811000 */ mtc1 $at, $f2 /* E2A5DC 802B629C 46200020 */ cvt.s.d $f0, $f0 /* E2A5E0 802B62A0 4600103C */ c.lt.s $f2, $f0 glabel func_802B62A4 /* E2A5E4 802B62A4 00000000 */ nop .L802B62A8: /* E2A5E8 802B62A8 45000002 */ bc1f .L802B62B4 /* E2A5EC 802B62AC E4400014 */ swc1 $f0, 0x14($v0) jtbl_802B62B0: /* E2A5F0 802B62B0 E4420014 */ swc1 $f2, 0x14($v0) .L802B62B4: /* E2A5F4 802B62B4 8E030000 */ lw $v1, 0x0($s0) glabel .L802B62B8 /* E2A5F8 802B62B8 8C620000 */ lw $v0, 0x0($v1) /* E2A5FC 802B62BC 2442FFFF */ addiu $v0, $v0, -0x1 /* E2A600 802B62C0 1440001A */ bnez $v0, .L802B632C /* E2A604 802B62C4 AC620000 */ sw $v0, 0x0($v1) .L802B62C8: /* E2A608 802B62C8 922200B6 */ lbu $v0, 0xB6($s1) glabel action_update_peach_land /* E2A60C 802B62CC 0240202D */ daddu $a0, $s2, $zero Munchlesia_LaunchVelocity: /* E2A610 802B62D0 24420001 */ addiu $v0, $v0, 0x1 Munchlesia_LateralVelocity: /* E2A614 802B62D4 0C04419E */ jal entity_start_script Munchlesia_LaunchAccel: /* E2A618 802B62D8 A22200B6 */ sb $v0, 0xB6($s1) Munchlesia_LaunchYaw: /* E2A61C 802B62DC 080AD8CB */ j .L802B632C D_802B62E0: /* E2A620 802B62E0 00000000 */ nop .L802B62E4: /* E2A624 802B62E4 0C038039 */ jal disable_player_shadow /* E2A628 802B62E8 00000000 */ nop /* E2A62C 802B62EC 3C048011 */ lui $a0, %hi(wPartnerNpc) /* E2A630 802B62F0 8C84C930 */ lw $a0, %lo(wPartnerNpc)($a0) /* E2A634 802B62F4 0C00EAFF */ jal disable_npc_shadow glabel func_802B62F8 /* E2A638 802B62F8 00000000 */ nop .L802B62FC: /* E2A63C 802B62FC 24020032 */ addiu $v0, $zero, 0x32 D_802B6300: /* E2A640 802B6300 0C038050 */ jal enable_player_static_collisions /* E2A644 802B6304 A6220010 */ sh $v0, 0x10($s1) .L802B6308: /* E2A648 802B6308 0C038069 */ jal enable_player_input .L802B630C: /* E2A64C 802B630C 00000000 */ nop .L802B6310: /* E2A650 802B6310 3C03FFEF */ lui $v1, (0xFFEFFFF7 >> 16) /* E2A654 802B6314 3463FFF7 */ ori $v1, $v1, (0xFFEFFFF7 & 0xFFFF) /* E2A658 802B6318 8E220000 */ lw $v0, 0x0($s1) glabel .L802B631C /* E2A65C 802B631C 0000202D */ daddu $a0, $zero, $zero .L802B6320: /* E2A660 802B6320 00431024 */ and $v0, $v0, $v1 glabel .L802B6324 /* E2A664 802B6324 0C039769 */ jal set_action_state .L802B6328: /* E2A668 802B6328 AE220000 */ sw $v0, 0x0($s1) glabel .L802B632C /* E2A66C 802B632C 8FBF0024 */ lw $ra, 0x24($sp) .L802B6330: /* E2A670 802B6330 8FB20020 */ lw $s2, 0x20($sp) /* E2A674 802B6334 8FB1001C */ lw $s1, 0x1C($sp) .L802B6338: /* E2A678 802B6338 8FB00018 */ lw $s0, 0x18($sp) /* E2A67C 802B633C D7B40028 */ ldc1 $f20, 0x28($sp) .L802B6340: /* E2A680 802B6340 03E00008 */ jr $ra /* E2A684 802B6344 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void action_update_use_tweester(void) { PlayerStatus* playerStatus = &gPlayerStatus; f32 sinAngle, cosAngle, liftoffVelocity; Entity* entity; entity = TweesterTouchingPlayer; if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED; disable_player_static_collisions(); disable_player_input(); playerStatus->flags |= (PS_FLAG_ROTATION_LOCKED | PS_FLAG_FLYING); suggest_player_anim_allow_backward(ANIM_MarioW2_FlailArms); playerStatus->actionSubstate = SUBSTATE_LAUNCH; mem_clear(PlayerTweesterPhysicsPtr, sizeof(*PlayerTweesterPhysicsPtr)); PlayerTweesterPhysicsPtr->radius = fabsf(dist2D(playerStatus->position.x, playerStatus->position.z, entity->position.x, entity->position.z)); PlayerTweesterPhysicsPtr->angle = atan2(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z); PlayerTweesterPhysicsPtr->angularVelocity = 6.0f; PlayerTweesterPhysicsPtr->liftoffVelocityPhase = 50.0f; PlayerTweesterPhysicsPtr->countdown = 120; sfx_play_sound_at_player(SOUND_TWEESTER_LAUNCH, SOUND_SPACE_MODE_0); } switch (playerStatus->actionSubstate) { case SUBSTATE_LAUNCH: sin_cos_rad(DEG_TO_RAD(PlayerTweesterPhysicsPtr->angle), &sinAngle, &cosAngle); playerStatus->position.x = entity->position.x + (sinAngle * PlayerTweesterPhysicsPtr->radius); playerStatus->position.z = entity->position.z - (cosAngle * PlayerTweesterPhysicsPtr->radius); PlayerTweesterPhysicsPtr->angle = clamp_angle(PlayerTweesterPhysicsPtr->angle - PlayerTweesterPhysicsPtr->angularVelocity); if (PlayerTweesterPhysicsPtr->radius > 20.0f) { PlayerTweesterPhysicsPtr->radius--; } else if (PlayerTweesterPhysicsPtr->radius < 19.0f) { PlayerTweesterPhysicsPtr->radius++; } liftoffVelocity = sin_rad(DEG_TO_RAD(PlayerTweesterPhysicsPtr->liftoffVelocityPhase)) * 3.0f; PlayerTweesterPhysicsPtr->liftoffVelocityPhase += 3.0f; if (PlayerTweesterPhysicsPtr->liftoffVelocityPhase > 150.0f) { PlayerTweesterPhysicsPtr->liftoffVelocityPhase = 150.0f; } playerStatus->position.y += liftoffVelocity; playerStatus->spriteFacingAngle = clamp_angle(360.0f - PlayerTweesterPhysicsPtr->angle); PlayerTweesterPhysicsPtr->angularVelocity += 0.6; if (PlayerTweesterPhysicsPtr->angularVelocity > 40.0f) { PlayerTweesterPhysicsPtr->angularVelocity = 40.0f; } if (--PlayerTweesterPhysicsPtr->countdown == 0) { playerStatus->actionSubstate++; // SUBSTATE_DONE entity_start_script(entity); } break; case SUBSTATE_DONE: disable_player_shadow(); disable_npc_shadow(wPartnerNpc); playerStatus->blinkTimer = 50; enable_player_static_collisions(); enable_player_input(); playerStatus->flags &= ~(PS_FLAG_ROTATION_LOCKED | PS_FLAG_FLYING); set_action_state(ACTION_STATE_IDLE); break; } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel D_802470B0 /* 13A3F0 802470B0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 13A3F4 802470B4 AFB00010 */ sw $s0, 0x10($sp) D_802470B8: /* 13A3F8 802470B8 3C108011 */ lui $s0, %hi(gPlayerData) D_802470BC: /* 13A3FC 802470BC 2610F290 */ addiu $s0, $s0, %lo(gPlayerData) D_802470C0: /* 13A400 802470C0 26040208 */ addiu $a0, $s0, 0x208 glabel .L802470C4 /* 13A404 802470C4 3C068024 */ lui $a2, %hi(func_80246FE0) D_802470C8: /* 13A408 802470C8 24C66FE0 */ addiu $a2, $a2, %lo(func_80246FE0) glabel .L802470CC /* 13A40C 802470CC AFBF0014 */ sw $ra, 0x14($sp) /* 13A410 802470D0 0C091293 */ jal func_80244A4C glabel .L802470D4 /* 13A414 802470D4 24050040 */ addiu $a1, $zero, 0x40 /* 13A418 802470D8 0000182D */ daddu $v1, $zero, $zero glabel .L802470DC /* 13A41C 802470DC 86020208 */ lh $v0, 0x208($s0) /* 13A420 802470E0 10400005 */ beqz $v0, .L802470F8 glabel .L802470E4 /* 13A424 802470E4 00000000 */ nop /* 13A428 802470E8 24630001 */ addiu $v1, $v1, 0x1 glabel .L802470EC /* 13A42C 802470EC 28620040 */ slti $v0, $v1, 0x40 /* 13A430 802470F0 1440FFFA */ bnez $v0, .L802470DC glabel .L802470F4 /* 13A434 802470F4 26100002 */ addiu $s0, $s0, 0x2 .L802470F8: /* 13A438 802470F8 8FBF0014 */ lw $ra, 0x14($sp) .L802470FC: /* 13A43C 802470FC 8FB00010 */ lw $s0, 0x10($sp) /* 13A440 80247100 0060102D */ daddu $v0, $v1, $zero /* 13A444 80247104 03E00008 */ jr $ra /* 13A448 80247108 27BD0018 */ addiu $sp, $sp, 0x18 glabel func_8024710C /* 13A44C 8024710C 00041040 */ sll $v0, $a0, 1 /* 13A450 80247110 00441021 */ addu $v0, $v0, $a0 /* 13A454 80247114 00021080 */ sll $v0, $v0, 2 /* 13A458 80247118 3C018027 */ lui $at, %hi(D_8027028A) /* 13A45C 8024711C 00220821 */ addu $at, $at, $v0 D_80247120: /* 13A460 80247120 9022028A */ lbu $v0, %lo(D_8027028A)($at) /* 13A464 80247124 14400002 */ bnez $v0, .L80247130 .L80247128: /* 13A468 80247128 00A2001A */ div $zero, $a1, $v0 D_8024712C: /* 13A46C 8024712C 0007000D */ break 7 .L80247130: /* 13A470 80247130 2401FFFF */ addiu $at, $zero, -0x1 .L80247134: /* 13A474 80247134 14410004 */ bne $v0, $at, .L80247148 /* 13A478 80247138 3C018000 */ lui $at, (0x80000000 >> 16) /* 13A47C 8024713C 14A10002 */ bne $a1, $at, .L80247148 /* 13A480 80247140 00000000 */ nop /* 13A484 80247144 0006000D */ break 6 .L80247148: /* 13A488 80247148 00001810 */ mfhi $v1 /* 13A48C 8024714C 000310C0 */ sll $v0, $v1, 3 /* 13A490 80247150 00431021 */ addu $v0, $v0, $v1 D_80247154: /* 13A494 80247154 00021080 */ sll $v0, $v0, 2 .L80247158: /* 13A498 80247158 00431023 */ subu $v0, $v0, $v1 D_8024715C: /* 13A49C 8024715C 00021080 */ sll $v0, $v0, 2 D_80247160: /* 13A4A0 80247160 03E00008 */ jr $ra .L80247164: /* 13A4A4 80247164 00431021 */ addu $v0, $v0, $v1 glabel func_80247168 /* 13A4A8 80247168 3C028027 */ lui $v0, %hi(gPauseBadgesPages) D_8024716C: /* 13A4AC 8024716C 24420288 */ addiu $v0, $v0, %lo(gPauseBadgesPages) /* 13A4B0 80247170 00041840 */ sll $v1, $a0, 1 /* 13A4B4 80247174 00641821 */ addu $v1, $v1, $a0 .L80247178: /* 13A4B8 80247178 00031880 */ sll $v1, $v1, 2 D_8024717C: /* 13A4BC 8024717C 00621821 */ addu $v1, $v1, $v0 /* 13A4C0 80247180 90620002 */ lbu $v0, 0x2($v1) D_80247184: /* 13A4C4 80247184 14400002 */ bnez $v0, .L80247190 /* 13A4C8 80247188 00A2001A */ div $zero, $a1, $v0 .L8024718C: /* 13A4CC 8024718C 0007000D */ break 7 .L80247190: /* 13A4D0 80247190 2401FFFF */ addiu $at, $zero, -0x1 D_80247194: /* 13A4D4 80247194 14410004 */ bne $v0, $at, .L802471A8 glabel func_80247198 /* 13A4D8 80247198 3C018000 */ lui $at, (0x80000000 >> 16) /* 13A4DC 8024719C 14A10002 */ bne $a1, $at, .L802471A8 /* 13A4E0 802471A0 00000000 */ nop /* 13A4E4 802471A4 0006000D */ break 6 .L802471A8: /* 13A4E8 802471A8 00002812 */ mflo $a1 .L802471AC: /* 13A4EC 802471AC 24840001 */ addiu $a0, $a0, 0x1 .L802471B0: /* 13A4F0 802471B0 90630001 */ lbu $v1, 0x1($v1) .L802471B4: /* 13A4F4 802471B4 00041040 */ sll $v0, $a0, 1 /* 13A4F8 802471B8 00441021 */ addu $v0, $v0, $a0 D_802471BC: /* 13A4FC 802471BC 00021080 */ sll $v0, $v0, 2 /* 13A500 802471C0 00441023 */ subu $v0, $v0, $a0 D_802471C4: /* 13A504 802471C4 00031900 */ sll $v1, $v1, 4 /* 13A508 802471C8 00431021 */ addu $v0, $v0, $v1 D_802471CC: /* 13A50C 802471CC 00052900 */ sll $a1, $a1, 4 /* 13A510 802471D0 03E00008 */ jr $ra D_802471D4: /* 13A514 802471D4 00451021 */ addu $v0, $v0, $a1 glabel func_802471D8 /* 13A518 802471D8 00041040 */ sll $v0, $a0, 1 /* 13A51C 802471DC 00441021 */ addu $v0, $v0, $a0 D_802471E0: /* 13A520 802471E0 00021080 */ sll $v0, $v0, 2 D_802471E4: /* 13A524 802471E4 3C018027 */ lui $at, %hi(D_8027028A) jtbl_802471E8: /* 13A528 802471E8 00220821 */ addu $at, $at, $v0 glabel func_802471EC /* 13A52C 802471EC 9022028A */ lbu $v0, %lo(D_8027028A)($at) .L802471F0: /* 13A530 802471F0 14400002 */ bnez $v0, .L802471FC D_802471F4: /* 13A534 802471F4 00A2001A */ div $zero, $a1, $v0 /* 13A538 802471F8 0007000D */ break 7 .L802471FC: /* 13A53C 802471FC 2401FFFF */ addiu $at, $zero, -0x1 /* 13A540 80247200 14410004 */ bne $v0, $at, func_80247214 /* 13A544 80247204 3C018000 */ lui $at, (0x80000000 >> 16) /* 13A548 80247208 14A10002 */ bne $a1, $at, func_80247214 D_8024720C: /* 13A54C 8024720C 00000000 */ nop /* 13A550 80247210 0006000D */ break 6 glabel func_80247214 /* 13A554 80247214 00001010 */ mfhi $v0 /* 13A558 80247218 03E00008 */ jr $ra glabel func_8024721C /* 13A55C 8024721C 00000000 */ nop glabel func_80247220 /* 13A560 80247220 3C038027 */ lui $v1, %hi(gPauseBadgesPages) /* 13A564 80247224 24630288 */ addiu $v1, $v1, %lo(gPauseBadgesPages) /* 13A568 80247228 00041040 */ sll $v0, $a0, 1 /* 13A56C 8024722C 00441021 */ addu $v0, $v0, $a0 /* 13A570 80247230 00021080 */ sll $v0, $v0, 2 /* 13A574 80247234 00431021 */ addu $v0, $v0, $v1 .L80247238: /* 13A578 80247238 90430002 */ lbu $v1, 0x2($v0) /* 13A57C 8024723C 14600002 */ bnez $v1, jtbl_80247248 D_80247240: /* 13A580 80247240 00A3001A */ div $zero, $a1, $v1 /* 13A584 80247244 0007000D */ break 7 jtbl_80247248: /* 13A588 80247248 2401FFFF */ addiu $at, $zero, -0x1 /* 13A58C 8024724C 14610004 */ bne $v1, $at, .L80247260 D_80247250: /* 13A590 80247250 3C018000 */ lui $at, (0x80000000 >> 16) /* 13A594 80247254 14A10002 */ bne $a1, $at, .L80247260 /* 13A598 80247258 00000000 */ nop /* 13A59C 8024725C 0006000D */ break 6 .L80247260: /* 13A5A0 80247260 00002812 */ mflo $a1 /* 13A5A4 80247264 90420001 */ lbu $v0, 0x1($v0) /* 13A5A8 80247268 03E00008 */ jr $ra /* 13A5AC 8024726C 00451021 */ addu $v0, $v0, $a1 D_80247270: /* 13A5B0 80247270 3C038027 */ lui $v1, %hi(gPauseBadgesCurrentScrollPos) /* 13A5B4 80247274 8C63038C */ lw $v1, %lo(gPauseBadgesCurrentScrollPos)($v1) jtbl_80247278: /* 13A5B8 80247278 2462FFE0 */ addiu $v0, $v1, -0x20 .L8024727C: /* 13A5BC 8024727C 0082102A */ slt $v0, $a0, $v0 /* 13A5C0 80247280 14400003 */ bnez $v0, .L80247290 /* 13A5C4 80247284 24620080 */ addiu $v0, $v1, 0x80 .L80247288: /* 13A5C8 80247288 03E00008 */ jr $ra .L8024728C: /* 13A5CC 8024728C 0082102A */ slt $v0, $a0, $v0 .L80247290: /* 13A5D0 80247290 03E00008 */ jr $ra .L80247294: /* 13A5D4 80247294 0000102D */ daddu $v0, $zero, $zero glabel func_80247298 /* 13A5D8 80247298 3C028027 */ lui $v0, %hi(gPauseBadgesCurrentScrollPos) /* 13A5DC 8024729C 8C42038C */ lw $v0, %lo(gPauseBadgesCurrentScrollPos)($v0) /* 13A5E0 802472A0 03E00008 */ jr $ra glabel func_802472A4 /* 13A5E4 802472A4 00821023 */ subu $v0, $a0, $v0 glabel func_802472A8 /* 13A5E8 802472A8 03E00008 */ jr $ra D_802472AC: /* 13A5EC 802472AC 0080102D */ daddu $v0, $a0, $zero glabel func_802472B0 /* 13A5F0 802472B0 3C068011 */ lui $a2, %hi(gPlayerData + 0x208) /* 13A5F4 802472B4 24C6F498 */ addiu $a2, $a2, %lo(gPlayerData + 0x208) /* 13A5F8 802472B8 00C0182D */ daddu $v1, $a2, $zero /* 13A5FC 802472BC 00042400 */ sll $a0, $a0, 16 /* 13A600 802472C0 00042403 */ sra $a0, $a0, 16 D_802472C4: /* 13A604 802472C4 24027FFF */ addiu $v0, $zero, 0x7FFF /* 13A608 802472C8 14820005 */ bne $a0, $v0, .L802472E0 /* 13A60C 802472CC 0000382D */ daddu $a3, $zero, $zero /* 13A610 802472D0 03E00008 */ jr $ra /* 13A614 802472D4 00E0102D */ daddu $v0, $a3, $zero .L802472D8: /* 13A618 802472D8 08091CC5 */ j .L80247314 .L802472DC: /* 13A61C 802472DC 24070001 */ addiu $a3, $zero, 0x1 .L802472E0: /* 13A620 802472E0 0000282D */ daddu $a1, $zero, $zero .L802472E4: /* 13A624 802472E4 84620000 */ lh $v0, 0x0($v1) /* 13A628 802472E8 5082FFFB */ beql $a0, $v0, .L802472D8 /* 13A62C 802472EC 0060302D */ daddu $a2, $v1, $zero /* 13A630 802472F0 24A50001 */ addiu $a1, $a1, 0x1 .L802472F4: /* 13A634 802472F4 28A20040 */ slti $v0, $a1, 0x40 /* 13A638 802472F8 1440FFFA */ bnez $v0, .L802472E4 /* 13A63C 802472FC 24630002 */ addiu $v1, $v1, 0x2 /* 13A640 80247300 08091CC6 */ j .L80247318 /* 13A644 80247304 28A2003F */ slti $v0, $a1, 0x3F .L80247308: /* 13A648 80247308 94620002 */ lhu $v0, 0x2($v1) /* 13A64C 8024730C A4620000 */ sh $v0, 0x0($v1) D_80247310: /* 13A650 80247310 24630002 */ addiu $v1, $v1, 0x2 .L80247314: /* 13A654 80247314 28A2003F */ slti $v0, $a1, 0x3F .L80247318: /* 13A658 80247318 5440FFFB */ bnel $v0, $zero, .L80247308 .L8024731C: /* 13A65C 8024731C 24A50001 */ addiu $a1, $a1, 0x1 /* 13A660 80247320 A4600000 */ sh $zero, 0x0($v1) /* 13A664 80247324 84C20000 */ lh $v0, 0x0($a2) /* 13A668 80247328 50400001 */ beql $v0, $zero, .L80247330 /* 13A66C 8024732C 24070002 */ addiu $a3, $zero, 0x2 .L80247330: /* 13A670 80247330 03E00008 */ jr $ra /* 13A674 80247334 00E0102D */ daddu $v0, $a3, $zero glabel func_80247338 /* 13A678 80247338 27BDFFE0 */ addiu $sp, $sp, -0x20 D_8024733C: /* 13A67C 8024733C AFB00010 */ sw $s0, 0x10($sp) /* 13A680 80247340 0080802D */ daddu $s0, $a0, $zero D_80247344: /* 13A684 80247344 AFB10014 */ sw $s1, 0x14($sp) /* 13A688 80247348 3C118011 */ lui $s1, %hi(gPlayerData) .L8024734C: /* 13A68C 8024734C 2631F290 */ addiu $s1, $s1, %lo(gPlayerData) /* 13A690 80247350 26250208 */ addiu $a1, $s1, 0x208 .L80247354: /* 13A694 80247354 00042400 */ sll $a0, $a0, 16 /* 13A698 80247358 00042403 */ sra $a0, $a0, 16 /* 13A69C 8024735C 24027FFE */ addiu $v0, $zero, 0x7FFE D_80247360: /* 13A6A0 80247360 14820002 */ bne $a0, $v0, .L8024736C /* 13A6A4 80247364 AFBF0018 */ sw $ra, 0x18($sp) .L80247368: /* 13A6A8 80247368 0000802D */ daddu $s0, $zero, $zero .L8024736C: /* 13A6AC 8024736C 00101400 */ sll $v0, $s0, 16 glabel .L80247370 /* 13A6B0 80247370 00021403 */ sra $v0, $v0, 16 /* 13A6B4 80247374 24037FFF */ addiu $v1, $zero, 0x7FFF /* 13A6B8 80247378 50430001 */ beql $v0, $v1, .L80247380 .L8024737C: /* 13A6BC 8024737C 0000802D */ daddu $s0, $zero, $zero .L80247380: /* 13A6C0 80247380 00101400 */ sll $v0, $s0, 16 /* 13A6C4 80247384 00021403 */ sra $v0, $v0, 16 /* 13A6C8 80247388 1040001D */ beqz $v0, D_80247400 /* 13A6CC 8024738C 0000202D */ daddu $a0, $zero, $zero D_80247390: /* 13A6D0 80247390 0040182D */ daddu $v1, $v0, $zero .L80247394: /* 13A6D4 80247394 84A20000 */ lh $v0, 0x0($a1) /* 13A6D8 80247398 1043001B */ beq $v0, $v1, D_80247408 /* 13A6DC 8024739C 24840001 */ addiu $a0, $a0, 0x1 /* 13A6E0 802473A0 28820040 */ slti $v0, $a0, 0x40 /* 13A6E4 802473A4 1440FFFB */ bnez $v0, .L80247394 /* 13A6E8 802473A8 24A50002 */ addiu $a1, $a1, 0x2 .L802473AC: /* 13A6EC 802473AC 0C0911FD */ jal func_802447F4 D_802473B0: /* 13A6F0 802473B0 00000000 */ nop D_802473B4: /* 13A6F4 802473B4 0040202D */ daddu $a0, $v0, $zero .L802473B8: /* 13A6F8 802473B8 00101400 */ sll $v0, $s0, 16 /* 13A6FC 802473BC 00021403 */ sra $v0, $v0, 16 D_802473C0: /* 13A700 802473C0 10400013 */ beqz $v0, D_80247410 .L802473C4: /* 13A704 802473C4 00021140 */ sll $v0, $v0, 5 D_802473C8: /* 13A708 802473C8 3C038008 */ lui $v1, %hi(gItemTable + 0x1A) /* 13A70C 802473CC 00621821 */ addu $v1, $v1, $v0 .L802473D0: /* 13A710 802473D0 906378FA */ lbu $v1, %lo(gItemTable + 0x1A)($v1) /* 13A714 802473D4 00031080 */ sll $v0, $v1, 2 D_802473D8: /* 13A718 802473D8 00431021 */ addu $v0, $v0, $v1 D_802473DC: /* 13A71C 802473DC 00021080 */ sll $v0, $v0, 2 D_802473E0: /* 13A720 802473E0 3C018009 */ lui $at, %hi(D_8008F072) .L802473E4: /* 13A724 802473E4 00220821 */ addu $at, $at, $v0 D_802473E8: /* 13A728 802473E8 8022F072 */ lb $v0, %lo(D_8008F072)($at) .L802473EC: /* 13A72C 802473EC 82230008 */ lb $v1, 0x8($s1) D_802473F0: /* 13A730 802473F0 00821021 */ addu $v0, $a0, $v0 /* 13A734 802473F4 0062182A */ slt $v1, $v1, $v0 D_802473F8: /* 13A738 802473F8 10600006 */ beqz $v1, .L80247414 /* 13A73C 802473FC 26250208 */ addiu $a1, $s1, 0x208 D_80247400: /* 13A740 80247400 08091D11 */ j D_80247444 /* 13A744 80247404 24020001 */ addiu $v0, $zero, 0x1 D_80247408: /* 13A748 80247408 08091D11 */ j D_80247444 /* 13A74C 8024740C 0000102D */ daddu $v0, $zero, $zero D_80247410: /* 13A750 80247410 26250208 */ addiu $a1, $s1, 0x208 .L80247414: /* 13A754 80247414 0000202D */ daddu $a0, $zero, $zero D_80247418: /* 13A758 80247418 84A20000 */ lh $v0, 0x0($a1) /* 13A75C 8024741C 50400005 */ beql $v0, $zero, .L80247434 D_80247420: /* 13A760 80247420 A4B00000 */ sh $s0, 0x0($a1) /* 13A764 80247424 24840001 */ addiu $a0, $a0, 0x1 D_80247428: /* 13A768 80247428 28820040 */ slti $v0, $a0, 0x40 /* 13A76C 8024742C 1440FFFA */ bnez $v0, D_80247418 D_80247430: /* 13A770 80247430 24A50002 */ addiu $a1, $a1, 0x2 .L80247434: /* 13A774 80247434 24030040 */ addiu $v1, $zero, 0x40 D_80247438: /* 13A778 80247438 10830002 */ beq $a0, $v1, D_80247444 /* 13A77C 8024743C 24020002 */ addiu $v0, $zero, 0x2 jtbl_80247440: /* 13A780 80247440 24020003 */ addiu $v0, $zero, 0x3 D_80247444: /* 13A784 80247444 8FBF0018 */ lw $ra, 0x18($sp) D_80247448: /* 13A788 80247448 8FB10014 */ lw $s1, 0x14($sp) /* 13A78C 8024744C 8FB00010 */ lw $s0, 0x10($sp) /* 13A790 80247450 03E00008 */ jr $ra /* 13A794 80247454 27BD0020 */ addiu $sp, $sp, 0x20 D_80247458: /* 13A798 80247458 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 13A79C 8024745C AFBF0028 */ sw $ra, 0x28($sp) /* 13A7A0 80247460 00A0182D */ daddu $v1, $a1, $zero /* 13A7A4 80247464 00C0382D */ daddu $a3, $a2, $zero /* 13A7A8 80247468 10800006 */ beqz $a0, D_80247484 /* 13A7AC 8024746C 24080008 */ addiu $t0, $zero, 0x8 D_80247470: /* 13A7B0 80247470 24020001 */ addiu $v0, $zero, 0x1 /* 13A7B4 80247474 1082000B */ beq $a0, $v0, .L802474A4 /* 13A7B8 80247478 00032080 */ sll $a0, $v1, 2 /* 13A7BC 8024747C 08091D33 */ j .L802474CC .L80247480: /* 13A7C0 80247480 00072880 */ sll $a1, $a3, 2 D_80247484: /* 13A7C4 80247484 00032080 */ sll $a0, $v1, 2 D_80247488: /* 13A7C8 80247488 00072880 */ sll $a1, $a3, 2 .L8024748C: /* 13A7CC 8024748C 24660008 */ addiu $a2, $v1, 0x8 /* 13A7D0 80247490 00063080 */ sll $a2, $a2, 2 /* 13A7D4 80247494 24E70008 */ addiu $a3, $a3, 0x8 /* 13A7D8 80247498 00073880 */ sll $a3, $a3, 2 D_8024749C: /* 13A7DC 8024749C 08091D38 */ j D_802474E0 D_802474A0: /* 13A7E0 802474A0 24020100 */ addiu $v0, $zero, 0x100 .L802474A4: /* 13A7E4 802474A4 00072880 */ sll $a1, $a3, 2 /* 13A7E8 802474A8 24660008 */ addiu $a2, $v1, 0x8 /* 13A7EC 802474AC 00063080 */ sll $a2, $a2, 2 D_802474B0: /* 13A7F0 802474B0 24E70008 */ addiu $a3, $a3, 0x8 /* 13A7F4 802474B4 00073880 */ sll $a3, $a3, 2 /* 13A7F8 802474B8 24020400 */ addiu $v0, $zero, 0x400 /* 13A7FC 802474BC AFA00010 */ sw $zero, 0x10($sp) jtbl_802474C0: /* 13A800 802474C0 AFA00014 */ sw $zero, 0x14($sp) /* 13A804 802474C4 08091D3C */ j .L802474F0 D_802474C8: /* 13A808 802474C8 AFA00018 */ sw $zero, 0x18($sp) .L802474CC: /* 13A80C 802474CC 00683021 */ addu $a2, $v1, $t0 ### DECOMPILED C INSTRUCTIONS: s32 pause_badges_count_equipped(void) { PlayerData* playerData = &gPlayerData; s32 i; pause_sort_item_list(playerData->equippedBadges, ARRAY_COUNT(playerData->equippedBadges), &pause_badges_comparator); for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) { if (playerData->equippedBadges[i] == 0) { break; } } return i; }
### RAW ASSEMBLY INSTRUCTIONS: glabel misc_particles_appendGfx /* 3DE95C E00E495C 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 3DE960 E00E4960 AFB700BC */ sw $s7, 0xBC($sp) /* 3DE964 E00E4964 0080B82D */ daddu $s7, $a0, $zero /* 3DE968 E00E4968 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 3DE96C E00E496C 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 3DE970 E00E4970 AFB200A8 */ sw $s2, 0xA8($sp) /* 3DE974 E00E4974 24120001 */ addiu $s2, $zero, 0x1 /* 3DE978 E00E4978 3C09800A */ lui $t1, %hi(gMainGfxPos) /* 3DE97C E00E497C 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos) /* 3DE980 E00E4980 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3DE984 E00E4984 AFBF00C4 */ sw $ra, 0xC4($sp) /* 3DE988 E00E4988 AFBE00C0 */ sw $fp, 0xC0($sp) /* 3DE98C E00E498C AFB600B8 */ sw $s6, 0xB8($sp) /* 3DE990 E00E4990 AFB500B4 */ sw $s5, 0xB4($sp) /* 3DE994 E00E4994 AFB400B0 */ sw $s4, 0xB0($sp) /* 3DE998 E00E4998 AFB300AC */ sw $s3, 0xAC($sp) /* 3DE99C E00E499C AFB100A4 */ sw $s1, 0xA4($sp) /* 3DE9A0 E00E49A0 AFB000A0 */ sw $s0, 0xA0($sp) /* 3DE9A4 E00E49A4 F7B800D8 */ sdc1 $f24, 0xD8($sp) /* 3DE9A8 E00E49A8 F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 3DE9AC E00E49AC F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 3DE9B0 E00E49B0 8D240000 */ lw $a0, 0x0($t1) /* 3DE9B4 E00E49B4 8EE8000C */ lw $t0, 0xC($s7) /* 3DE9B8 E00E49B8 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3DE9BC E00E49BC 44810000 */ mtc1 $at, $f0 /* 3DE9C0 E00E49C0 0080182D */ daddu $v1, $a0, $zero /* 3DE9C4 E00E49C4 24840008 */ addiu $a0, $a0, 0x8 /* 3DE9C8 E00E49C8 AD240000 */ sw $a0, 0x0($t1) /* 3DE9CC E00E49CC 8D140000 */ lw $s4, 0x0($t0) /* 3DE9D0 E00E49D0 C5040058 */ lwc1 $f4, 0x58($t0) /* 3DE9D4 E00E49D4 C5020044 */ lwc1 $f2, 0x44($t0) /* 3DE9D8 E00E49D8 468010A0 */ cvt.s.w $f2, $f2 /* 3DE9DC E00E49DC AC620000 */ sw $v0, 0x0($v1) /* 3DE9E0 E00E49E0 24820008 */ addiu $v0, $a0, 0x8 /* 3DE9E4 E00E49E4 AC600004 */ sw $zero, 0x4($v1) /* 3DE9E8 E00E49E8 AD220000 */ sw $v0, 0x0($t1) /* 3DE9EC E00E49EC AC850000 */ sw $a1, 0x0($a0) /* 3DE9F0 E00E49F0 8EE30010 */ lw $v1, 0x10($s7) /* 3DE9F4 E00E49F4 24820010 */ addiu $v0, $a0, 0x10 /* 3DE9F8 E00E49F8 AD220000 */ sw $v0, 0x0($t1) /* 3DE9FC E00E49FC 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3DEA00 E00E4A00 8C63001C */ lw $v1, 0x1C($v1) /* 3DEA04 E00E4A04 46001083 */ div.s $f2, $f2, $f0 /* 3DEA08 E00E4A08 AC820008 */ sw $v0, 0x8($a0) /* 3DEA0C E00E4A0C 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3DEA10 E00E4A10 46041502 */ mul.s $f20, $f2, $f4 /* 3DEA14 E00E4A14 00000000 */ nop /* 3DEA18 E00E4A18 00621821 */ addu $v1, $v1, $v0 /* 3DEA1C E00E4A1C AC830004 */ sw $v1, 0x4($a0) /* 3DEA20 E00E4A20 9102004B */ lbu $v0, 0x4B($t0) /* 3DEA24 E00E4A24 9105004F */ lbu $a1, 0x4F($t0) /* 3DEA28 E00E4A28 91060053 */ lbu $a2, 0x53($t0) /* 3DEA2C E00E4A2C 91070057 */ lbu $a3, 0x57($t0) /* 3DEA30 E00E4A30 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 3DEA34 E00E4A34 AC830010 */ sw $v1, 0x10($a0) /* 3DEA38 E00E4A38 00021600 */ sll $v0, $v0, 24 /* 3DEA3C E00E4A3C 00052C00 */ sll $a1, $a1, 16 /* 3DEA40 E00E4A40 00451025 */ or $v0, $v0, $a1 /* 3DEA44 E00E4A44 00063200 */ sll $a2, $a2, 8 /* 3DEA48 E00E4A48 00461025 */ or $v0, $v0, $a2 /* 3DEA4C E00E4A4C 00471025 */ or $v0, $v0, $a3 /* 3DEA50 E00E4A50 AC82000C */ sw $v0, 0xC($a0) /* 3DEA54 E00E4A54 00141080 */ sll $v0, $s4, 2 /* 3DEA58 E00E4A58 3C03E00E */ lui $v1, (0xE00E4DA8 >> 16) /* 3DEA5C E00E4A5C 00621821 */ addu $v1, $v1, $v0 /* 3DEA60 E00E4A60 8C634DA8 */ lw $v1, (0xE00E4DA8 & 0xFFFF)($v1) /* 3DEA64 E00E4A64 24820018 */ addiu $v0, $a0, 0x18 /* 3DEA68 E00E4A68 AD220000 */ sw $v0, 0x0($t1) /* 3DEA6C E00E4A6C AC830014 */ sw $v1, 0x14($a0) /* 3DEA70 E00E4A70 8EE20008 */ lw $v0, 0x8($s7) /* 3DEA74 E00E4A74 0242102A */ slt $v0, $s2, $v0 /* 3DEA78 E00E4A78 104000B6 */ beqz $v0, .LE00E4D54 /* 3DEA7C E00E4A7C 25080064 */ addiu $t0, $t0, 0x64 /* 3DEA80 E00E4A80 3C16800A */ lui $s6, %hi(gDisplayContext) /* 3DEA84 E00E4A84 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 3DEA88 E00E4A88 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 3DEA8C E00E4A8C 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 3DEA90 E00E4A90 3C130001 */ lui $s3, (0x11630 >> 16) /* 3DEA94 E00E4A94 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 3DEA98 E00E4A98 0120882D */ daddu $s1, $t1, $zero /* 3DEA9C E00E4A9C 3C1EE00E */ lui $fp, %hi(D_E00E4D90) /* 3DEAA0 E00E4AA0 27DE4D90 */ addiu $fp, $fp, %lo(D_E00E4D90) /* 3DEAA4 E00E4AA4 25100060 */ addiu $s0, $t0, 0x60 /* 3DEAA8 E00E4AA8 4480C000 */ mtc1 $zero, $f24 /* 3DEAAC E00E4AAC 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 3DEAB0 E00E4AB0 4481B000 */ mtc1 $at, $f22 .LE00E4AB4: /* 3DEAB4 E00E4AB4 8E02FFCC */ lw $v0, -0x34($s0) /* 3DEAB8 E00E4AB8 044000A1 */ bltz $v0, .LE00E4D40 /* 3DEABC E00E4ABC 27A40020 */ addiu $a0, $sp, 0x20 /* 3DEAC0 E00E4AC0 3C0A800B */ lui $t2, %hi(gCameras) /* 3DEAC4 E00E4AC4 254A1D80 */ addiu $t2, $t2, %lo(gCameras) /* 3DEAC8 E00E4AC8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3DEACC E00E4ACC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3DEAD0 E00E4AD0 4405C000 */ mfc1 $a1, $f24 /* 3DEAD4 E00E4AD4 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 3DEAD8 E00E4AD8 00031080 */ sll $v0, $v1, 2 /* 3DEADC E00E4ADC 00431021 */ addu $v0, $v0, $v1 /* 3DEAE0 E00E4AE0 00021080 */ sll $v0, $v0, 2 /* 3DEAE4 E00E4AE4 00431023 */ subu $v0, $v0, $v1 /* 3DEAE8 E00E4AE8 000218C0 */ sll $v1, $v0, 3 /* 3DEAEC E00E4AEC 00431021 */ addu $v0, $v0, $v1 /* 3DEAF0 E00E4AF0 46140002 */ mul.s $f0, $f0, $f20 /* 3DEAF4 E00E4AF4 00000000 */ nop /* 3DEAF8 E00E4AF8 000210C0 */ sll $v0, $v0, 3 /* 3DEAFC E00E4AFC 004A1021 */ addu $v0, $v0, $t2 /* 3DEB00 E00E4B00 C442006C */ lwc1 $f2, 0x6C($v0) /* 3DEB04 E00E4B04 4407C000 */ mfc1 $a3, $f24 /* 3DEB08 E00E4B08 46001087 */ neg.s $f2, $f2 /* 3DEB0C E00E4B0C 44061000 */ mfc1 $a2, $f2 /* 3DEB10 E00E4B10 E7A00010 */ swc1 $f0, 0x10($sp) /* 3DEB14 E00E4B14 C600FFA4 */ lwc1 $f0, -0x5C($s0) /* 3DEB18 E00E4B18 E7A00014 */ swc1 $f0, 0x14($sp) /* 3DEB1C E00E4B1C C600FFA8 */ lwc1 $f0, -0x58($s0) /* 3DEB20 E00E4B20 E7A00018 */ swc1 $f0, 0x18($sp) /* 3DEB24 E00E4B24 C600FFAC */ lwc1 $f0, -0x54($s0) /* 3DEB28 E00E4B28 0C080180 */ jal shim_guPositionF /* 3DEB2C E00E4B2C E7A0001C */ swc1 $f0, 0x1C($sp) /* 3DEB30 E00E4B30 27A40020 */ addiu $a0, $sp, 0x20 /* 3DEB34 E00E4B34 96A50000 */ lhu $a1, 0x0($s5) /* 3DEB38 E00E4B38 8EC20000 */ lw $v0, 0x0($s6) /* 3DEB3C E00E4B3C 00052980 */ sll $a1, $a1, 6 /* 3DEB40 E00E4B40 00B32821 */ addu $a1, $a1, $s3 /* 3DEB44 E00E4B44 0C080118 */ jal shim_guMtxF2L /* 3DEB48 E00E4B48 00452821 */ addu $a1, $v0, $a1 /* 3DEB4C E00E4B4C 8E240000 */ lw $a0, 0x0($s1) /* 3DEB50 E00E4B50 0080282D */ daddu $a1, $a0, $zero /* 3DEB54 E00E4B54 24840008 */ addiu $a0, $a0, 0x8 /* 3DEB58 E00E4B58 AE240000 */ sw $a0, 0x0($s1) /* 3DEB5C E00E4B5C 96A20000 */ lhu $v0, 0x0($s5) /* 3DEB60 E00E4B60 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3DEB64 E00E4B64 ACA30000 */ sw $v1, 0x0($a1) /* 3DEB68 E00E4B68 24430001 */ addiu $v1, $v0, 0x1 /* 3DEB6C E00E4B6C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3DEB70 E00E4B70 00021180 */ sll $v0, $v0, 6 /* 3DEB74 E00E4B74 A6A30000 */ sh $v1, 0x0($s5) /* 3DEB78 E00E4B78 8EC30000 */ lw $v1, 0x0($s6) /* 3DEB7C E00E4B7C 00531021 */ addu $v0, $v0, $s3 /* 3DEB80 E00E4B80 00621821 */ addu $v1, $v1, $v0 /* 3DEB84 E00E4B84 24820008 */ addiu $v0, $a0, 0x8 /* 3DEB88 E00E4B88 ACA30004 */ sw $v1, 0x4($a1) /* 3DEB8C E00E4B8C AE220000 */ sw $v0, 0x0($s1) /* 3DEB90 E00E4B90 24020050 */ addiu $v0, $zero, 0x50 /* 3DEB94 E00E4B94 8E03FFCC */ lw $v1, -0x34($s0) /* 3DEB98 E00E4B98 24850004 */ addiu $a1, $a0, 0x4 /* 3DEB9C E00E4B9C 00431023 */ subu $v0, $v0, $v1 /* 3DEBA0 E00E4BA0 304200FF */ andi $v0, $v0, 0xFF /* 3DEBA4 E00E4BA4 3C03FA00 */ lui $v1, (0xFA000000 >> 16) /* 3DEBA8 E00E4BA8 00431025 */ or $v0, $v0, $v1 /* 3DEBAC E00E4BAC AC820000 */ sw $v0, 0x0($a0) /* 3DEBB0 E00E4BB0 C600FFE4 */ lwc1 $f0, -0x1C($s0) /* 3DEBB4 E00E4BB4 46800020 */ cvt.s.w $f0, $f0 /* 3DEBB8 E00E4BB8 4600A002 */ mul.s $f0, $f20, $f0 /* 3DEBBC E00E4BBC 00000000 */ nop /* 3DEBC0 E00E4BC0 9203FFDB */ lbu $v1, -0x25($s0) /* 3DEBC4 E00E4BC4 9204FFDF */ lbu $a0, -0x21($s0) /* 3DEBC8 E00E4BC8 9202FFE3 */ lbu $v0, -0x1D($s0) /* 3DEBCC E00E4BCC 00031E00 */ sll $v1, $v1, 24 /* 3DEBD0 E00E4BD0 00042400 */ sll $a0, $a0, 16 /* 3DEBD4 E00E4BD4 00641825 */ or $v1, $v1, $a0 /* 3DEBD8 E00E4BD8 00021200 */ sll $v0, $v0, 8 /* 3DEBDC E00E4BDC 4600B03E */ c.le.s $f22, $f0 /* 3DEBE0 E00E4BE0 00000000 */ nop /* 3DEBE4 E00E4BE4 45010005 */ bc1t .LE00E4BFC /* 3DEBE8 E00E4BE8 00621825 */ or $v1, $v1, $v0 /* 3DEBEC E00E4BEC 4600018D */ trunc.w.s $f6, $f0 /* 3DEBF0 E00E4BF0 44043000 */ mfc1 $a0, $f6 /* 3DEBF4 E00E4BF4 08039306 */ j .LE00E4C18 /* 3DEBF8 E00E4BF8 308200FF */ andi $v0, $a0, 0xFF .LE00E4BFC: /* 3DEBFC E00E4BFC 46160001 */ sub.s $f0, $f0, $f22 /* 3DEC00 E00E4C00 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3DEC04 E00E4C04 4600018D */ trunc.w.s $f6, $f0 /* 3DEC08 E00E4C08 44043000 */ mfc1 $a0, $f6 /* 3DEC0C E00E4C0C 00000000 */ nop /* 3DEC10 E00E4C10 00822025 */ or $a0, $a0, $v0 /* 3DEC14 E00E4C14 308200FF */ andi $v0, $a0, 0xFF .LE00E4C18: /* 3DEC18 E00E4C18 00621025 */ or $v0, $v1, $v0 /* 3DEC1C E00E4C1C 8E260000 */ lw $a2, 0x0($s1) /* 3DEC20 E00E4C20 3C03F200 */ lui $v1, (0xF2000000 >> 16) /* 3DEC24 E00E4C24 ACA20000 */ sw $v0, 0x0($a1) /* 3DEC28 E00E4C28 C600FFFC */ lwc1 $f0, -0x4($s0) /* 3DEC2C E00E4C2C 00C0282D */ daddu $a1, $a2, $zero /* 3DEC30 E00E4C30 4600018D */ trunc.w.s $f6, $f0 /* 3DEC34 E00E4C34 44043000 */ mfc1 $a0, $f6 /* 3DEC38 E00E4C38 00000000 */ nop /* 3DEC3C E00E4C3C 00042080 */ sll $a0, $a0, 2 /* 3DEC40 E00E4C40 30840FFF */ andi $a0, $a0, 0xFFF /* 3DEC44 E00E4C44 00042300 */ sll $a0, $a0, 12 /* 3DEC48 E00E4C48 C6000000 */ lwc1 $f0, 0x0($s0) /* 3DEC4C E00E4C4C 24C60008 */ addiu $a2, $a2, 0x8 /* 3DEC50 E00E4C50 4600018D */ trunc.w.s $f6, $f0 /* 3DEC54 E00E4C54 44023000 */ mfc1 $v0, $f6 /* 3DEC58 E00E4C58 00000000 */ nop /* 3DEC5C E00E4C5C 00021080 */ sll $v0, $v0, 2 /* 3DEC60 E00E4C60 30420FFF */ andi $v0, $v0, 0xFFF /* 3DEC64 E00E4C64 00431025 */ or $v0, $v0, $v1 /* 3DEC68 E00E4C68 00822025 */ or $a0, $a0, $v0 /* 3DEC6C E00E4C6C ACA40000 */ sw $a0, 0x0($a1) /* 3DEC70 E00E4C70 C600FFFC */ lwc1 $f0, -0x4($s0) /* 3DEC74 E00E4C74 3C030100 */ lui $v1, (0x1000000 >> 16) /* 3DEC78 E00E4C78 AE260000 */ sw $a2, 0x0($s1) /* 3DEC7C E00E4C7C 4600018D */ trunc.w.s $f6, $f0 /* 3DEC80 E00E4C80 44043000 */ mfc1 $a0, $f6 /* 3DEC84 E00E4C84 00000000 */ nop /* 3DEC88 E00E4C88 2484000F */ addiu $a0, $a0, 0xF /* 3DEC8C E00E4C8C 00042080 */ sll $a0, $a0, 2 /* 3DEC90 E00E4C90 30840FFF */ andi $a0, $a0, 0xFFF /* 3DEC94 E00E4C94 C6000000 */ lwc1 $f0, 0x0($s0) /* 3DEC98 E00E4C98 00042300 */ sll $a0, $a0, 12 /* 3DEC9C E00E4C9C 4600018D */ trunc.w.s $f6, $f0 /* 3DECA0 E00E4CA0 44023000 */ mfc1 $v0, $f6 /* 3DECA4 E00E4CA4 00000000 */ nop /* 3DECA8 E00E4CA8 2442000F */ addiu $v0, $v0, 0xF /* 3DECAC E00E4CAC 00021080 */ sll $v0, $v0, 2 /* 3DECB0 E00E4CB0 30420FFF */ andi $v0, $v0, 0xFFF /* 3DECB4 E00E4CB4 00431025 */ or $v0, $v0, $v1 /* 3DECB8 E00E4CB8 00822025 */ or $a0, $a0, $v0 /* 3DECBC E00E4CBC 24020002 */ addiu $v0, $zero, 0x2 /* 3DECC0 E00E4CC0 1682000E */ bne $s4, $v0, .LE00E4CFC /* 3DECC4 E00E4CC4 ACA40004 */ sw $a0, 0x4($a1) /* 3DECC8 E00E4CC8 3C04F200 */ lui $a0, (0xF200007C >> 16) /* 3DECCC E00E4CCC 3484007C */ ori $a0, $a0, (0xF200007C & 0xFFFF) /* 3DECD0 E00E4CD0 24C20008 */ addiu $v0, $a2, 0x8 /* 3DECD4 E00E4CD4 3243001F */ andi $v1, $s2, 0x1F /* 3DECD8 E00E4CD8 AE220000 */ sw $v0, 0x0($s1) /* 3DECDC E00E4CDC 000314C0 */ sll $v0, $v1, 19 /* 3DECE0 E00E4CE0 00441025 */ or $v0, $v0, $a0 /* 3DECE4 E00E4CE4 000319C0 */ sll $v1, $v1, 7 /* 3DECE8 E00E4CE8 3463007C */ ori $v1, $v1, 0x7C /* 3DECEC E00E4CEC 00031B00 */ sll $v1, $v1, 12 /* 3DECF0 E00E4CF0 3463007C */ ori $v1, $v1, 0x7C /* 3DECF4 E00E4CF4 ACC20000 */ sw $v0, 0x0($a2) /* 3DECF8 E00E4CF8 ACC30004 */ sw $v1, 0x4($a2) .LE00E4CFC: /* 3DECFC E00E4CFC 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3DED00 E00E4D00 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3DED04 E00E4D04 8E230000 */ lw $v1, 0x0($s1) /* 3DED08 E00E4D08 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3DED0C E00E4D0C 0060282D */ daddu $a1, $v1, $zero /* 3DED10 E00E4D10 24630008 */ addiu $v1, $v1, 0x8 /* 3DED14 E00E4D14 AE230000 */ sw $v1, 0x0($s1) /* 3DED18 E00E4D18 ACA20000 */ sw $v0, 0x0($a1) /* 3DED1C E00E4D1C 00141080 */ sll $v0, $s4, 2 /* 3DED20 E00E4D20 005E1021 */ addu $v0, $v0, $fp /* 3DED24 E00E4D24 8C440000 */ lw $a0, 0x0($v0) /* 3DED28 E00E4D28 24620008 */ addiu $v0, $v1, 0x8 /* 3DED2C E00E4D2C AE220000 */ sw $v0, 0x0($s1) /* 3DED30 E00E4D30 24020040 */ addiu $v0, $zero, 0x40 /* 3DED34 E00E4D34 ACA40004 */ sw $a0, 0x4($a1) /* 3DED38 E00E4D38 AC660000 */ sw $a2, 0x0($v1) /* 3DED3C E00E4D3C AC620004 */ sw $v0, 0x4($v1) .LE00E4D40: /* 3DED40 E00E4D40 26520001 */ addiu $s2, $s2, 0x1 /* 3DED44 E00E4D44 8EE20008 */ lw $v0, 0x8($s7) /* 3DED48 E00E4D48 0242102A */ slt $v0, $s2, $v0 /* 3DED4C E00E4D4C 1440FF59 */ bnez $v0, .LE00E4AB4 /* 3DED50 E00E4D50 26100064 */ addiu $s0, $s0, 0x64 .LE00E4D54: /* 3DED54 E00E4D54 8FBF00C4 */ lw $ra, 0xC4($sp) /* 3DED58 E00E4D58 8FBE00C0 */ lw $fp, 0xC0($sp) /* 3DED5C E00E4D5C 8FB700BC */ lw $s7, 0xBC($sp) /* 3DED60 E00E4D60 8FB600B8 */ lw $s6, 0xB8($sp) /* 3DED64 E00E4D64 8FB500B4 */ lw $s5, 0xB4($sp) /* 3DED68 E00E4D68 8FB400B0 */ lw $s4, 0xB0($sp) /* 3DED6C E00E4D6C 8FB300AC */ lw $s3, 0xAC($sp) /* 3DED70 E00E4D70 8FB200A8 */ lw $s2, 0xA8($sp) /* 3DED74 E00E4D74 8FB100A4 */ lw $s1, 0xA4($sp) /* 3DED78 E00E4D78 8FB000A0 */ lw $s0, 0xA0($sp) /* 3DED7C E00E4D7C D7B800D8 */ ldc1 $f24, 0xD8($sp) /* 3DED80 E00E4D80 D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 3DED84 E00E4D84 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 3DED88 E00E4D88 03E00008 */ jr $ra /* 3DED8C E00E4D8C 27BD00E0 */ addiu $sp, $sp, 0xE0 ### DECOMPILED C INSTRUCTIONS: void misc_particles_appendGfx(void* effect) { MiscParticlesFXData* particle = ((EffectInstance*)effect)->data.miscParticles; s32 variation = particle->variation; f32 alphaScale = (particle->innerColor.a / 255.0f) * particle->scale; Matrix4f mtxTransform; Matrix4f unused; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gDPSetEnvColor(gMainGfxPos++, particle->glowColor.r, particle->glowColor.g, particle->glowColor.b, particle->glowColor.a); gSPDisplayList(gMainGfxPos++, D_E00E4DA8[variation]); particle++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, particle++) { if (particle->animTime >= 0) { shim_guPositionF(mtxTransform, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, particle->scale * alphaScale, particle->pos.x, particle->pos.y, particle->pos.z); shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 80 - particle->animTime, particle->innerColor.r, particle->innerColor.g, particle->innerColor.b, alphaScale * particle->innerColor.a); gDPSetTileSize(gMainGfxPos++, 1, (s32) particle->unk_5C * 4, (s32) particle->unk_60 * 4, ((s32) particle->unk_5C + 15) * 4, ((s32) particle->unk_60 + 15) * 4); if (variation == 2) { gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, ((i & 0x1F) * 32 ) * 4, 31 * 4, ((i & 0x1F) * 32 + 31) * 4, 31 * 4); } gSPDisplayList(gMainGfxPos++, D_E00E4D90[variation]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel underwater_update /* 3B8D44 E00BA174 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 3B8D48 E00BA178 AFBF0024 */ sw $ra, 0x24($sp) /* 3B8D4C E00BA17C AFB40020 */ sw $s4, 0x20($sp) /* 3B8D50 E00BA180 AFB3001C */ sw $s3, 0x1C($sp) /* 3B8D54 E00BA184 AFB20018 */ sw $s2, 0x18($sp) /* 3B8D58 E00BA188 AFB10014 */ sw $s1, 0x14($sp) /* 3B8D5C E00BA18C AFB00010 */ sw $s0, 0x10($sp) /* 3B8D60 E00BA190 F7B60030 */ sdc1 $f22, 0x30($sp) /* 3B8D64 E00BA194 F7B40028 */ sdc1 $f20, 0x28($sp) /* 3B8D68 E00BA198 8C830000 */ lw $v1, 0x0($a0) /* 3B8D6C E00BA19C 8C90000C */ lw $s0, 0xC($a0) /* 3B8D70 E00BA1A0 30620010 */ andi $v0, $v1, 0x10 /* 3B8D74 E00BA1A4 10400005 */ beqz $v0, .LE00BA1BC /* 3B8D78 E00BA1A8 2402FFEF */ addiu $v0, $zero, -0x11 /* 3B8D7C E00BA1AC 00621024 */ and $v0, $v1, $v0 /* 3B8D80 E00BA1B0 AC820000 */ sw $v0, 0x0($a0) /* 3B8D84 E00BA1B4 24020020 */ addiu $v0, $zero, 0x20 /* 3B8D88 E00BA1B8 AE020010 */ sw $v0, 0x10($s0) .LE00BA1BC: /* 3B8D8C E00BA1BC 8E030010 */ lw $v1, 0x10($s0) /* 3B8D90 E00BA1C0 286203E8 */ slti $v0, $v1, 0x3E8 /* 3B8D94 E00BA1C4 10400002 */ beqz $v0, .LE00BA1D0 /* 3B8D98 E00BA1C8 2462FFFF */ addiu $v0, $v1, -0x1 /* 3B8D9C E00BA1CC AE020010 */ sw $v0, 0x10($s0) .LE00BA1D0: /* 3B8DA0 E00BA1D0 8E020014 */ lw $v0, 0x14($s0) /* 3B8DA4 E00BA1D4 8E030010 */ lw $v1, 0x10($s0) /* 3B8DA8 E00BA1D8 24420001 */ addiu $v0, $v0, 0x1 /* 3B8DAC E00BA1DC 04610005 */ bgez $v1, .LE00BA1F4 /* 3B8DB0 E00BA1E0 AE020014 */ sw $v0, 0x14($s0) /* 3B8DB4 E00BA1E4 0C080128 */ jal shim_remove_effect /* 3B8DB8 E00BA1E8 00000000 */ nop /* 3B8DBC E00BA1EC 0802E96D */ j .LE00BA5B4 /* 3B8DC0 E00BA1F0 00000000 */ nop .LE00BA1F4: /* 3B8DC4 E00BA1F4 0060A02D */ daddu $s4, $v1, $zero /* 3B8DC8 E00BA1F8 0040982D */ daddu $s3, $v0, $zero /* 3B8DCC E00BA1FC 2A820020 */ slti $v0, $s4, 0x20 /* 3B8DD0 E00BA200 10400002 */ beqz $v0, .LE00BA20C /* 3B8DD4 E00BA204 240400FF */ addiu $a0, $zero, 0xFF /* 3B8DD8 E00BA208 001420C0 */ sll $a0, $s4, 3 .LE00BA20C: /* 3B8DDC E00BA20C 2A620010 */ slti $v0, $s3, 0x10 /* 3B8DE0 E00BA210 10400002 */ beqz $v0, .LE00BA21C /* 3B8DE4 E00BA214 00131100 */ sll $v0, $s3, 4 /* 3B8DE8 E00BA218 2444000F */ addiu $a0, $v0, 0xF .LE00BA21C: /* 3B8DEC E00BA21C 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 3B8DF0 E00BA220 44811000 */ mtc1 $at, $f2 /* 3B8DF4 E00BA224 44840000 */ mtc1 $a0, $f0 /* 3B8DF8 E00BA228 00000000 */ nop /* 3B8DFC E00BA22C 46800020 */ cvt.s.w $f0, $f0 /* 3B8E00 E00BA230 4600103E */ c.le.s $f2, $f0 /* 3B8E04 E00BA234 00000000 */ nop /* 3B8E08 E00BA238 45010005 */ bc1t .LE00BA250 /* 3B8E0C E00BA23C 2605001F */ addiu $a1, $s0, 0x1F /* 3B8E10 E00BA240 4600038D */ trunc.w.s $f14, $f0 /* 3B8E14 E00BA244 44037000 */ mfc1 $v1, $f14 /* 3B8E18 E00BA248 0802E89B */ j .LE00BA26C /* 3B8E1C E00BA24C 24120001 */ addiu $s2, $zero, 0x1 .LE00BA250: /* 3B8E20 E00BA250 46020001 */ sub.s $f0, $f0, $f2 /* 3B8E24 E00BA254 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3B8E28 E00BA258 4600038D */ trunc.w.s $f14, $f0 /* 3B8E2C E00BA25C 44037000 */ mfc1 $v1, $f14 /* 3B8E30 E00BA260 00000000 */ nop /* 3B8E34 E00BA264 00621825 */ or $v1, $v1, $v0 /* 3B8E38 E00BA268 24120001 */ addiu $s2, $zero, 0x1 .LE00BA26C: /* 3B8E3C E00BA26C 2611000D */ addiu $s1, $s0, 0xD /* 3B8E40 E00BA270 3C01C280 */ lui $at, (0xC2800000 >> 16) /* 3B8E44 E00BA274 4481B000 */ mtc1 $at, $f22 /* 3B8E48 E00BA278 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3B8E4C E00BA27C 44811000 */ mtc1 $at, $f2 /* 3B8E50 E00BA280 44840000 */ mtc1 $a0, $f0 /* 3B8E54 E00BA284 00000000 */ nop /* 3B8E58 E00BA288 46800020 */ cvt.s.w $f0, $f0 /* 3B8E5C E00BA28C A0A30000 */ sb $v1, 0x0($a1) /* 3B8E60 E00BA290 46020503 */ div.s $f20, $f0, $f2 .LE00BA294: /* 3B8E64 E00BA294 02721823 */ subu $v1, $s3, $s2 /* 3B8E68 E00BA298 00031080 */ sll $v0, $v1, 2 /* 3B8E6C E00BA29C 00431021 */ addu $v0, $v0, $v1 /* 3B8E70 E00BA2A0 00021080 */ sll $v0, $v0, 2 /* 3B8E74 E00BA2A4 00021023 */ negu $v0, $v0 /* 3B8E78 E00BA2A8 44826000 */ mtc1 $v0, $f12 /* 3B8E7C E00BA2AC 00000000 */ nop /* 3B8E80 E00BA2B0 46806320 */ cvt.s.w $f12, $f12 /* 3B8E84 E00BA2B4 0C080140 */ jal shim_sin_deg /* 3B8E88 E00BA2B8 26520001 */ addiu $s2, $s2, 0x1 /* 3B8E8C E00BA2BC 46160002 */ mul.s $f0, $f0, $f22 /* 3B8E90 E00BA2C0 00000000 */ nop /* 3B8E94 E00BA2C4 46140002 */ mul.s $f0, $f0, $f20 /* 3B8E98 E00BA2C8 00000000 */ nop /* 3B8E9C E00BA2CC 4600038D */ trunc.w.s $f14, $f0 /* 3B8EA0 E00BA2D0 44027000 */ mfc1 $v0, $f14 /* 3B8EA4 E00BA2D4 00000000 */ nop /* 3B8EA8 E00BA2D8 A2220029 */ sb $v0, 0x29($s1) /* 3B8EAC E00BA2DC 2A420012 */ slti $v0, $s2, 0x12 /* 3B8EB0 E00BA2E0 1440FFEC */ bnez $v0, .LE00BA294 /* 3B8EB4 E00BA2E4 2631000D */ addiu $s1, $s1, 0xD /* 3B8EB8 E00BA2E8 24120001 */ addiu $s2, $zero, 0x1 /* 3B8EBC E00BA2EC 240F001A */ addiu $t7, $zero, 0x1A /* 3B8EC0 E00BA2F0 240EFFFF */ addiu $t6, $zero, -0x1 /* 3B8EC4 E00BA2F4 240D0019 */ addiu $t5, $zero, 0x19 /* 3B8EC8 E00BA2F8 0000602D */ daddu $t4, $zero, $zero /* 3B8ECC E00BA2FC 01E0582D */ daddu $t3, $t7, $zero /* 3B8ED0 E00BA300 240A000D */ addiu $t2, $zero, 0xD .LE00BA304: /* 3B8ED4 E00BA304 24050001 */ addiu $a1, $zero, 0x1 /* 3B8ED8 E00BA308 0140382D */ daddu $a3, $t2, $zero /* 3B8EDC E00BA30C 0160482D */ daddu $t1, $t3, $zero /* 3B8EE0 E00BA310 0180402D */ daddu $t0, $t4, $zero /* 3B8EE4 E00BA314 01A0982D */ daddu $s3, $t5, $zero /* 3B8EE8 E00BA318 01C0882D */ daddu $s1, $t6, $zero /* 3B8EEC E00BA31C 25E60002 */ addiu $a2, $t7, 0x2 .LE00BA320: /* 3B8EF0 E00BA320 25220001 */ addiu $v0, $t1, 0x1 /* 3B8EF4 E00BA324 00A21021 */ addu $v0, $a1, $v0 /* 3B8EF8 E00BA328 02021021 */ addu $v0, $s0, $v0 /* 3B8EFC E00BA32C 00A72021 */ addu $a0, $a1, $a3 /* 3B8F00 E00BA330 00B31821 */ addu $v1, $a1, $s3 /* 3B8F04 E00BA334 02031821 */ addu $v1, $s0, $v1 /* 3B8F08 E00BA338 80420023 */ lb $v0, 0x23($v0) /* 3B8F0C E00BA33C 80630023 */ lb $v1, 0x23($v1) /* 3B8F10 E00BA340 44822000 */ mtc1 $v0, $f4 /* 3B8F14 E00BA344 00000000 */ nop /* 3B8F18 E00BA348 46802120 */ cvt.s.w $f4, $f4 /* 3B8F1C E00BA34C 25020001 */ addiu $v0, $t0, 0x1 /* 3B8F20 E00BA350 00A21021 */ addu $v0, $a1, $v0 /* 3B8F24 E00BA354 02021021 */ addu $v0, $s0, $v0 /* 3B8F28 E00BA358 80420023 */ lb $v0, 0x23($v0) /* 3B8F2C E00BA35C 44831000 */ mtc1 $v1, $f2 /* 3B8F30 E00BA360 00000000 */ nop /* 3B8F34 E00BA364 468010A0 */ cvt.s.w $f2, $f2 /* 3B8F38 E00BA368 44820000 */ mtc1 $v0, $f0 /* 3B8F3C E00BA36C 00000000 */ nop /* 3B8F40 E00BA370 46800020 */ cvt.s.w $f0, $f0 /* 3B8F44 E00BA374 00B11021 */ addu $v0, $a1, $s1 /* 3B8F48 E00BA378 46002100 */ add.s $f4, $f4, $f0 /* 3B8F4C E00BA37C 02021021 */ addu $v0, $s0, $v0 /* 3B8F50 E00BA380 80420023 */ lb $v0, 0x23($v0) /* 3B8F54 E00BA384 46022100 */ add.s $f4, $f4, $f2 /* 3B8F58 E00BA388 02042021 */ addu $a0, $s0, $a0 /* 3B8F5C E00BA38C 44820000 */ mtc1 $v0, $f0 /* 3B8F60 E00BA390 00000000 */ nop /* 3B8F64 E00BA394 46800020 */ cvt.s.w $f0, $f0 /* 3B8F68 E00BA398 46002100 */ add.s $f4, $f4, $f0 /* 3B8F6C E00BA39C 80830023 */ lb $v1, 0x23($a0) /* 3B8F70 E00BA3A0 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3B8F74 E00BA3A4 44810800 */ mtc1 $at, $f1 /* 3B8F78 E00BA3A8 44800000 */ mtc1 $zero, $f0 /* 3B8F7C E00BA3AC 46002121 */ cvt.d.s $f4, $f4 /* 3B8F80 E00BA3B0 46202102 */ mul.d $f4, $f4, $f0 /* 3B8F84 E00BA3B4 00000000 */ nop /* 3B8F88 E00BA3B8 44835000 */ mtc1 $v1, $f10 /* 3B8F8C E00BA3BC 00000000 */ nop /* 3B8F90 E00BA3C0 468052A0 */ cvt.s.w $f10, $f10 /* 3B8F94 E00BA3C4 00A81821 */ addu $v1, $a1, $t0 /* 3B8F98 E00BA3C8 02031821 */ addu $v1, $s0, $v1 /* 3B8F9C E00BA3CC 00A91021 */ addu $v0, $a1, $t1 /* 3B8FA0 E00BA3D0 02021021 */ addu $v0, $s0, $v0 /* 3B8FA4 E00BA3D4 3C014080 */ lui $at, (0x40800000 >> 16) /* 3B8FA8 E00BA3D8 44810000 */ mtc1 $at, $f0 /* 3B8FAC E00BA3DC 80420023 */ lb $v0, 0x23($v0) /* 3B8FB0 E00BA3E0 46005282 */ mul.s $f10, $f10, $f0 /* 3B8FB4 E00BA3E4 00000000 */ nop /* 3B8FB8 E00BA3E8 44821000 */ mtc1 $v0, $f2 /* 3B8FBC E00BA3EC 00000000 */ nop /* 3B8FC0 E00BA3F0 468010A0 */ cvt.s.w $f2, $f2 /* 3B8FC4 E00BA3F4 24E20001 */ addiu $v0, $a3, 0x1 /* 3B8FC8 E00BA3F8 00A21021 */ addu $v0, $a1, $v0 /* 3B8FCC E00BA3FC 3C01E00C */ lui $at, (0xE00C0000 >> 16) /* 3B8FD0 E00BA400 D420AE80 */ ldc1 $f0, -0x5180($at) /* 3B8FD4 E00BA404 460051A1 */ cvt.d.s $f6, $f10 /* 3B8FD8 E00BA408 46203182 */ mul.d $f6, $f6, $f0 /* 3B8FDC E00BA40C 00000000 */ nop /* 3B8FE0 E00BA410 02021021 */ addu $v0, $s0, $v0 /* 3B8FE4 E00BA414 80420023 */ lb $v0, 0x23($v0) /* 3B8FE8 E00BA418 80630023 */ lb $v1, 0x23($v1) /* 3B8FEC E00BA41C 44824000 */ mtc1 $v0, $f8 /* 3B8FF0 E00BA420 00000000 */ nop /* 3B8FF4 E00BA424 46804220 */ cvt.s.w $f8, $f8 /* 3B8FF8 E00BA428 24E2FFFF */ addiu $v0, $a3, -0x1 /* 3B8FFC E00BA42C 00A21021 */ addu $v0, $a1, $v0 /* 3B9000 E00BA430 44830000 */ mtc1 $v1, $f0 /* 3B9004 E00BA434 00000000 */ nop /* 3B9008 E00BA438 46800020 */ cvt.s.w $f0, $f0 /* 3B900C E00BA43C 46001080 */ add.s $f2, $f2, $f0 /* 3B9010 E00BA440 02021021 */ addu $v0, $s0, $v0 /* 3B9014 E00BA444 80420023 */ lb $v0, 0x23($v0) /* 3B9018 E00BA448 46081080 */ add.s $f2, $f2, $f8 /* 3B901C E00BA44C 44820000 */ mtc1 $v0, $f0 /* 3B9020 E00BA450 00000000 */ nop /* 3B9024 E00BA454 46800020 */ cvt.s.w $f0, $f0 /* 3B9028 E00BA458 46001080 */ add.s $f2, $f2, $f0 /* 3B902C E00BA45C 460A1081 */ sub.s $f2, $f2, $f10 /* 3B9030 E00BA460 46202120 */ cvt.s.d $f4, $f4 /* 3B9034 E00BA464 46041080 */ add.s $f2, $f2, $f4 /* 3B9038 E00BA468 02061821 */ addu $v1, $s0, $a2 /* 3B903C E00BA46C 8462011A */ lh $v0, 0x11A($v1) /* 3B9040 E00BA470 460010A1 */ cvt.d.s $f2, $f2 /* 3B9044 E00BA474 46261081 */ sub.d $f2, $f2, $f6 /* 3B9048 E00BA478 44820000 */ mtc1 $v0, $f0 /* 3B904C E00BA47C 00000000 */ nop /* 3B9050 E00BA480 46800021 */ cvt.d.w $f0, $f0 /* 3B9054 E00BA484 46220000 */ add.d $f0, $f0, $f2 /* 3B9058 E00BA488 3C01E00C */ lui $at, (0xE00C0000 >> 16) /* 3B905C E00BA48C D422AE88 */ ldc1 $f2, -0x5178($at) /* 3B9060 E00BA490 4620038D */ trunc.w.d $f14, $f0 /* 3B9064 E00BA494 44027000 */ mfc1 $v0, $f14 /* 3B9068 E00BA498 00000000 */ nop /* 3B906C E00BA49C 00021400 */ sll $v0, $v0, 16 /* 3B9070 E00BA4A0 00021403 */ sra $v0, $v0, 16 /* 3B9074 E00BA4A4 44820000 */ mtc1 $v0, $f0 /* 3B9078 E00BA4A8 00000000 */ nop /* 3B907C E00BA4AC 46800021 */ cvt.d.w $f0, $f0 /* 3B9080 E00BA4B0 46220002 */ mul.d $f0, $f0, $f2 /* 3B9084 E00BA4B4 00000000 */ nop /* 3B9088 E00BA4B8 4620038D */ trunc.w.d $f14, $f0 /* 3B908C E00BA4BC 44027000 */ mfc1 $v0, $f14 /* 3B9090 E00BA4C0 00000000 */ nop /* 3B9094 E00BA4C4 A462011A */ sh $v0, 0x11A($v1) /* 3B9098 E00BA4C8 2A820020 */ slti $v0, $s4, 0x20 /* 3B909C E00BA4CC 1040000B */ beqz $v0, .LE00BA4FC /* 3B90A0 E00BA4D0 24A50001 */ addiu $a1, $a1, 0x1 /* 3B90A4 E00BA4D4 80820023 */ lb $v0, 0x23($a0) /* 3B90A8 E00BA4D8 44820000 */ mtc1 $v0, $f0 /* 3B90AC E00BA4DC 00000000 */ nop /* 3B90B0 E00BA4E0 46800020 */ cvt.s.w $f0, $f0 /* 3B90B4 E00BA4E4 46140002 */ mul.s $f0, $f0, $f20 /* 3B90B8 E00BA4E8 00000000 */ nop /* 3B90BC E00BA4EC 4600038D */ trunc.w.s $f14, $f0 /* 3B90C0 E00BA4F0 44027000 */ mfc1 $v0, $f14 /* 3B90C4 E00BA4F4 00000000 */ nop /* 3B90C8 E00BA4F8 A0820023 */ sb $v0, 0x23($a0) .LE00BA4FC: /* 3B90CC E00BA4FC 28A2000C */ slti $v0, $a1, 0xC /* 3B90D0 E00BA500 1440FF87 */ bnez $v0, .LE00BA320 /* 3B90D4 E00BA504 24C60002 */ addiu $a2, $a2, 0x2 /* 3B90D8 E00BA508 25EF001A */ addiu $t7, $t7, 0x1A /* 3B90DC E00BA50C 25CE000D */ addiu $t6, $t6, 0xD /* 3B90E0 E00BA510 25AD000D */ addiu $t5, $t5, 0xD /* 3B90E4 E00BA514 258C000D */ addiu $t4, $t4, 0xD /* 3B90E8 E00BA518 256B000D */ addiu $t3, $t3, 0xD /* 3B90EC E00BA51C 26520001 */ addiu $s2, $s2, 0x1 /* 3B90F0 E00BA520 2A420012 */ slti $v0, $s2, 0x12 /* 3B90F4 E00BA524 1440FF77 */ bnez $v0, .LE00BA304 /* 3B90F8 E00BA528 254A000D */ addiu $t2, $t2, 0xD /* 3B90FC E00BA52C 24120001 */ addiu $s2, $zero, 0x1 /* 3B9100 E00BA530 3C01E00C */ lui $at, (0xE00C0000 >> 16) /* 3B9104 E00BA534 D424AE90 */ ldc1 $f4, -0x5170($at) /* 3B9108 E00BA538 2407001A */ addiu $a3, $zero, 0x1A /* 3B910C E00BA53C 2406000D */ addiu $a2, $zero, 0xD .LE00BA540: /* 3B9110 E00BA540 24050001 */ addiu $a1, $zero, 0x1 /* 3B9114 E00BA544 24E40002 */ addiu $a0, $a3, 0x2 .LE00BA548: /* 3B9118 E00BA548 02041021 */ addu $v0, $s0, $a0 /* 3B911C E00BA54C 8442011A */ lh $v0, 0x11A($v0) /* 3B9120 E00BA550 44821000 */ mtc1 $v0, $f2 /* 3B9124 E00BA554 00000000 */ nop /* 3B9128 E00BA558 468010A1 */ cvt.d.w $f2, $f2 /* 3B912C E00BA55C 46241082 */ mul.d $f2, $f2, $f4 /* 3B9130 E00BA560 00000000 */ nop /* 3B9134 E00BA564 00A61821 */ addu $v1, $a1, $a2 /* 3B9138 E00BA568 02031821 */ addu $v1, $s0, $v1 /* 3B913C E00BA56C 80620023 */ lb $v0, 0x23($v1) /* 3B9140 E00BA570 44820000 */ mtc1 $v0, $f0 /* 3B9144 E00BA574 00000000 */ nop /* 3B9148 E00BA578 46800021 */ cvt.d.w $f0, $f0 /* 3B914C E00BA57C 46220000 */ add.d $f0, $f0, $f2 /* 3B9150 E00BA580 24A50001 */ addiu $a1, $a1, 0x1 /* 3B9154 E00BA584 4620038D */ trunc.w.d $f14, $f0 /* 3B9158 E00BA588 44027000 */ mfc1 $v0, $f14 /* 3B915C E00BA58C 00000000 */ nop /* 3B9160 E00BA590 A0620023 */ sb $v0, 0x23($v1) /* 3B9164 E00BA594 28A2000C */ slti $v0, $a1, 0xC /* 3B9168 E00BA598 1440FFEB */ bnez $v0, .LE00BA548 /* 3B916C E00BA59C 24840002 */ addiu $a0, $a0, 0x2 /* 3B9170 E00BA5A0 24E7001A */ addiu $a3, $a3, 0x1A /* 3B9174 E00BA5A4 26520001 */ addiu $s2, $s2, 0x1 /* 3B9178 E00BA5A8 2A420012 */ slti $v0, $s2, 0x12 /* 3B917C E00BA5AC 1440FFE4 */ bnez $v0, .LE00BA540 /* 3B9180 E00BA5B0 24C6000D */ addiu $a2, $a2, 0xD .LE00BA5B4: /* 3B9184 E00BA5B4 8FBF0024 */ lw $ra, 0x24($sp) /* 3B9188 E00BA5B8 8FB40020 */ lw $s4, 0x20($sp) /* 3B918C E00BA5BC 8FB3001C */ lw $s3, 0x1C($sp) /* 3B9190 E00BA5C0 8FB20018 */ lw $s2, 0x18($sp) /* 3B9194 E00BA5C4 8FB10014 */ lw $s1, 0x14($sp) /* 3B9198 E00BA5C8 8FB00010 */ lw $s0, 0x10($sp) /* 3B919C E00BA5CC D7B60030 */ ldc1 $f22, 0x30($sp) /* 3B91A0 E00BA5D0 D7B40028 */ ldc1 $f20, 0x28($sp) /* 3B91A4 E00BA5D4 03E00008 */ jr $ra /* 3B91A8 E00BA5D8 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void underwater_update(EffectInstance* effect) { UnderwaterFXData* data = effect->data.underwater; s32 timeLeft; s32 lifeTime; s32 alpha; f32 factor; s32 i; s32 j; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->timeLeft = 32; } if (data->timeLeft < 1000) { data->timeLeft--; } data->lifeTime++; if (data->timeLeft < 0) { shim_remove_effect(effect); return; } timeLeft = data->timeLeft; lifeTime = data->lifeTime; alpha = 255; if (timeLeft < 32) { alpha = timeLeft * 8; } if (lifeTime < 16) { alpha = lifeTime * 16 + 15; } data->waterColor.a = (f32) alpha; factor = (f32) alpha / 255.0f; for (i = 1; i < ARRAY_COUNT(data->unk_23) - 1; i++) { data->unk_23[i][6] = shim_sin_deg(-((lifeTime - i) * 20)) * -64.0f * factor; } for (i = 1; i < ARRAY_COUNT(data->unk_23) - 1; i++) { for (j = 1; j < ARRAY_COUNT(data->unk_23[0]) - 1; j++) { f32 m11 = data->unk_23[i][j] * 4.0f; f32 m21 = data->unk_23[i + 1][j]; f32 m01 = data->unk_23[i - 1][j]; f32 m12 = data->unk_23[i][j + 1]; f32 m10 = data->unk_23[i][j - 1]; f32 m22 = data->unk_23[i + 1][j + 1]; f32 m02 = data->unk_23[i - 1][j + 1]; f32 m20 = data->unk_23[i + 1][j - 1]; f32 m00 = data->unk_23[i - 1][j - 1]; f32 temp1 = m21 + m01 + m12 + m10 - m11; f32 temp2 = (m22 + m02 + m20 + m00) * 0.5; data->unk_11A[i][j] += temp1 + temp2 - m11 * 0.7; data->unk_11A[i][j] *= 0.98; if (timeLeft < 32) { data->unk_23[i][j] *= factor; } } } for (i = 1; i < ARRAY_COUNT(data->unk_23) - 1; i++) { for (j = 1; j < ARRAY_COUNT(data->unk_23[0]) - 1; j++) { data->unk_23[i][j] += data->unk_11A[i][j] * 0.02; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel __umoddi3 /* 49C70 8006E870 27BDFFF8 */ addiu $sp, $sp, -0x8 /* 49C74 8006E874 00E0402D */ daddu $t0, $a3, $zero /* 49C78 8006E878 00C0482D */ daddu $t1, $a2, $zero /* 49C7C 8006E87C 00A0582D */ daddu $t3, $a1, $zero /* 49C80 8006E880 0080502D */ daddu $t2, $a0, $zero /* 49C84 8006E884 152000A6 */ bnez $t1, .L8006EB20 /* 49C88 8006E888 03A0C82D */ daddu $t9, $sp, $zero /* 49C8C 8006E88C 0148102B */ sltu $v0, $t2, $t0 /* 49C90 8006E890 1040001D */ beqz $v0, .L8006E908 /* 49C94 8006E894 3402FFFF */ ori $v0, $zero, 0xFFFF /* 49C98 8006E898 0048102B */ sltu $v0, $v0, $t0 /* 49C9C 8006E89C 14400005 */ bnez $v0, .L8006E8B4 /* 49CA0 8006E8A0 00E0302D */ daddu $a2, $a3, $zero /* 49CA4 8006E8A4 2D020100 */ sltiu $v0, $t0, 0x100 /* 49CA8 8006E8A8 38420001 */ xori $v0, $v0, 0x1 /* 49CAC 8006E8AC 0801BA33 */ j .L8006E8CC /* 49CB0 8006E8B0 000218C0 */ sll $v1, $v0, 3 .L8006E8B4: /* 49CB4 8006E8B4 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 49CB8 8006E8B8 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 49CBC 8006E8BC 0048102B */ sltu $v0, $v0, $t0 /* 49CC0 8006E8C0 14400002 */ bnez $v0, .L8006E8CC /* 49CC4 8006E8C4 24030018 */ addiu $v1, $zero, 0x18 /* 49CC8 8006E8C8 24030010 */ addiu $v1, $zero, 0x10 .L8006E8CC: /* 49CCC 8006E8CC 00661006 */ srlv $v0, $a2, $v1 /* 49CD0 8006E8D0 3C01800A */ lui $at, %hi(D_8009A140) /* 49CD4 8006E8D4 00220821 */ addu $at, $at, $v0 /* 49CD8 8006E8D8 9022A140 */ lbu $v0, %lo(D_8009A140)($at) /* 49CDC 8006E8DC 24040020 */ addiu $a0, $zero, 0x20 /* 49CE0 8006E8E0 00431021 */ addu $v0, $v0, $v1 /* 49CE4 8006E8E4 00826823 */ subu $t5, $a0, $v0 /* 49CE8 8006E8E8 11A0005B */ beqz $t5, .L8006EA58 /* 49CEC 8006E8EC 01AA1804 */ sllv $v1, $t2, $t5 /* 49CF0 8006E8F0 01A84004 */ sllv $t0, $t0, $t5 /* 49CF4 8006E8F4 008D1023 */ subu $v0, $a0, $t5 /* 49CF8 8006E8F8 004B1006 */ srlv $v0, $t3, $v0 /* 49CFC 8006E8FC 00625025 */ or $t2, $v1, $v0 /* 49D00 8006E900 0801BA96 */ j .L8006EA58 /* 49D04 8006E904 01AB5804 */ sllv $t3, $t3, $t5 .L8006E908: /* 49D08 8006E908 15000008 */ bnez $t0, .L8006E92C /* 49D0C 8006E90C 0048102B */ sltu $v0, $v0, $t0 /* 49D10 8006E910 24020001 */ addiu $v0, $zero, 0x1 /* 49D14 8006E914 15200002 */ bnez $t1, .L8006E920 /* 49D18 8006E918 0049001B */ divu $zero, $v0, $t1 /* 49D1C 8006E91C 0007000D */ break 7 .L8006E920: /* 49D20 8006E920 00004012 */ mflo $t0 /* 49D24 8006E924 3402FFFF */ ori $v0, $zero, 0xFFFF /* 49D28 8006E928 0048102B */ sltu $v0, $v0, $t0 .L8006E92C: /* 49D2C 8006E92C 14400005 */ bnez $v0, .L8006E944 /* 49D30 8006E930 0100202D */ daddu $a0, $t0, $zero /* 49D34 8006E934 2D020100 */ sltiu $v0, $t0, 0x100 /* 49D38 8006E938 38420001 */ xori $v0, $v0, 0x1 /* 49D3C 8006E93C 0801BA57 */ j .L8006E95C /* 49D40 8006E940 000218C0 */ sll $v1, $v0, 3 .L8006E944: /* 49D44 8006E944 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 49D48 8006E948 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 49D4C 8006E94C 0048102B */ sltu $v0, $v0, $t0 /* 49D50 8006E950 14400002 */ bnez $v0, .L8006E95C /* 49D54 8006E954 24030018 */ addiu $v1, $zero, 0x18 /* 49D58 8006E958 24030010 */ addiu $v1, $zero, 0x10 .L8006E95C: /* 49D5C 8006E95C 00641006 */ srlv $v0, $a0, $v1 /* 49D60 8006E960 3C01800A */ lui $at, %hi(D_8009A140) /* 49D64 8006E964 00220821 */ addu $at, $at, $v0 /* 49D68 8006E968 9022A140 */ lbu $v0, %lo(D_8009A140)($at) /* 49D6C 8006E96C 00431021 */ addu $v0, $v0, $v1 /* 49D70 8006E970 24030020 */ addiu $v1, $zero, 0x20 /* 49D74 8006E974 00626823 */ subu $t5, $v1, $v0 /* 49D78 8006E978 15A00003 */ bnez $t5, .L8006E988 /* 49D7C 8006E97C 006DC023 */ subu $t8, $v1, $t5 /* 49D80 8006E980 0801BA96 */ j .L8006EA58 /* 49D84 8006E984 01485023 */ subu $t2, $t2, $t0 .L8006E988: /* 49D88 8006E988 01A84004 */ sllv $t0, $t0, $t5 /* 49D8C 8006E98C 030A2006 */ srlv $a0, $t2, $t8 /* 49D90 8006E990 01AA1804 */ sllv $v1, $t2, $t5 /* 49D94 8006E994 030B1006 */ srlv $v0, $t3, $t8 /* 49D98 8006E998 00625025 */ or $t2, $v1, $v0 /* 49D9C 8006E99C 00082C02 */ srl $a1, $t0, 16 /* 49DA0 8006E9A0 14A00002 */ bnez $a1, .L8006E9AC /* 49DA4 8006E9A4 0085001B */ divu $zero, $a0, $a1 /* 49DA8 8006E9A8 0007000D */ break 7 .L8006E9AC: /* 49DAC 8006E9AC 00001012 */ mflo $v0 /* 49DB0 8006E9B0 00001810 */ mfhi $v1 /* 49DB4 8006E9B4 3106FFFF */ andi $a2, $t0, 0xFFFF /* 49DB8 8006E9B8 00000000 */ nop /* 49DBC 8006E9BC 00460018 */ mult $v0, $a2 /* 49DC0 8006E9C0 00031C00 */ sll $v1, $v1, 16 /* 49DC4 8006E9C4 000A1402 */ srl $v0, $t2, 16 /* 49DC8 8006E9C8 00621825 */ or $v1, $v1, $v0 /* 49DCC 8006E9CC 00002012 */ mflo $a0 /* 49DD0 8006E9D0 0064102B */ sltu $v0, $v1, $a0 /* 49DD4 8006E9D4 10400008 */ beqz $v0, .L8006E9F8 /* 49DD8 8006E9D8 01AB5804 */ sllv $t3, $t3, $t5 /* 49DDC 8006E9DC 00681821 */ addu $v1, $v1, $t0 /* 49DE0 8006E9E0 0068102B */ sltu $v0, $v1, $t0 /* 49DE4 8006E9E4 54400005 */ bnel $v0, $zero, .L8006E9FC /* 49DE8 8006E9E8 00641823 */ subu $v1, $v1, $a0 /* 49DEC 8006E9EC 0064102B */ sltu $v0, $v1, $a0 /* 49DF0 8006E9F0 54400001 */ bnel $v0, $zero, .L8006E9F8 /* 49DF4 8006E9F4 00681821 */ addu $v1, $v1, $t0 .L8006E9F8: /* 49DF8 8006E9F8 00641823 */ subu $v1, $v1, $a0 .L8006E9FC: /* 49DFC 8006E9FC 14A00002 */ bnez $a1, .L8006EA08 /* 49E00 8006EA00 0065001B */ divu $zero, $v1, $a1 /* 49E04 8006EA04 0007000D */ break 7 .L8006EA08: /* 49E08 8006EA08 00001012 */ mflo $v0 /* 49E0C 8006EA0C 00001810 */ mfhi $v1 /* 49E10 8006EA10 00000000 */ nop /* 49E14 8006EA14 00000000 */ nop /* 49E18 8006EA18 00460018 */ mult $v0, $a2 /* 49E1C 8006EA1C 00031C00 */ sll $v1, $v1, 16 /* 49E20 8006EA20 3142FFFF */ andi $v0, $t2, 0xFFFF /* 49E24 8006EA24 00621825 */ or $v1, $v1, $v0 /* 49E28 8006EA28 00002012 */ mflo $a0 /* 49E2C 8006EA2C 0064102B */ sltu $v0, $v1, $a0 /* 49E30 8006EA30 50400009 */ beql $v0, $zero, .L8006EA58 /* 49E34 8006EA34 00645023 */ subu $t2, $v1, $a0 /* 49E38 8006EA38 00681821 */ addu $v1, $v1, $t0 /* 49E3C 8006EA3C 0068102B */ sltu $v0, $v1, $t0 /* 49E40 8006EA40 14400005 */ bnez $v0, .L8006EA58 /* 49E44 8006EA44 00645023 */ subu $t2, $v1, $a0 /* 49E48 8006EA48 0064102B */ sltu $v0, $v1, $a0 /* 49E4C 8006EA4C 54400001 */ bnel $v0, $zero, .L8006EA54 /* 49E50 8006EA50 00681821 */ addu $v1, $v1, $t0 .L8006EA54: /* 49E54 8006EA54 00645023 */ subu $t2, $v1, $a0 .L8006EA58: /* 49E58 8006EA58 00082C02 */ srl $a1, $t0, 16 /* 49E5C 8006EA5C 14A00002 */ bnez $a1, .L8006EA68 /* 49E60 8006EA60 0145001B */ divu $zero, $t2, $a1 /* 49E64 8006EA64 0007000D */ break 7 .L8006EA68: /* 49E68 8006EA68 00001012 */ mflo $v0 /* 49E6C 8006EA6C 00001810 */ mfhi $v1 /* 49E70 8006EA70 3106FFFF */ andi $a2, $t0, 0xFFFF /* 49E74 8006EA74 00000000 */ nop /* 49E78 8006EA78 00460018 */ mult $v0, $a2 /* 49E7C 8006EA7C 00031C00 */ sll $v1, $v1, 16 /* 49E80 8006EA80 000B1402 */ srl $v0, $t3, 16 /* 49E84 8006EA84 00621825 */ or $v1, $v1, $v0 /* 49E88 8006EA88 00002012 */ mflo $a0 /* 49E8C 8006EA8C 0064102B */ sltu $v0, $v1, $a0 /* 49E90 8006EA90 50400009 */ beql $v0, $zero, .L8006EAB8 /* 49E94 8006EA94 00641823 */ subu $v1, $v1, $a0 /* 49E98 8006EA98 00681821 */ addu $v1, $v1, $t0 /* 49E9C 8006EA9C 0068102B */ sltu $v0, $v1, $t0 /* 49EA0 8006EAA0 54400005 */ bnel $v0, $zero, .L8006EAB8 /* 49EA4 8006EAA4 00641823 */ subu $v1, $v1, $a0 /* 49EA8 8006EAA8 0064102B */ sltu $v0, $v1, $a0 /* 49EAC 8006EAAC 54400001 */ bnel $v0, $zero, .L8006EAB4 /* 49EB0 8006EAB0 00681821 */ addu $v1, $v1, $t0 .L8006EAB4: /* 49EB4 8006EAB4 00641823 */ subu $v1, $v1, $a0 .L8006EAB8: /* 49EB8 8006EAB8 14A00002 */ bnez $a1, .L8006EAC4 /* 49EBC 8006EABC 0065001B */ divu $zero, $v1, $a1 /* 49EC0 8006EAC0 0007000D */ break 7 .L8006EAC4: /* 49EC4 8006EAC4 00001012 */ mflo $v0 /* 49EC8 8006EAC8 00001810 */ mfhi $v1 /* 49ECC 8006EACC 00000000 */ nop /* 49ED0 8006EAD0 00000000 */ nop /* 49ED4 8006EAD4 00460018 */ mult $v0, $a2 /* 49ED8 8006EAD8 00031C00 */ sll $v1, $v1, 16 /* 49EDC 8006EADC 3162FFFF */ andi $v0, $t3, 0xFFFF /* 49EE0 8006EAE0 00621825 */ or $v1, $v1, $v0 /* 49EE4 8006EAE4 00002012 */ mflo $a0 /* 49EE8 8006EAE8 0064102B */ sltu $v0, $v1, $a0 /* 49EEC 8006EAEC 10400007 */ beqz $v0, .L8006EB0C /* 49EF0 8006EAF0 00000000 */ nop /* 49EF4 8006EAF4 00681821 */ addu $v1, $v1, $t0 /* 49EF8 8006EAF8 0068102B */ sltu $v0, $v1, $t0 /* 49EFC 8006EAFC 14400003 */ bnez $v0, .L8006EB0C /* 49F00 8006EB00 0064102B */ sltu $v0, $v1, $a0 /* 49F04 8006EB04 54400001 */ bnel $v0, $zero, .L8006EB0C /* 49F08 8006EB08 00681821 */ addu $v1, $v1, $t0 .L8006EB0C: /* 49F0C 8006EB0C 13200087 */ beqz $t9, .L8006ED2C /* 49F10 8006EB10 00645823 */ subu $t3, $v1, $a0 /* 49F14 8006EB14 01AB7806 */ srlv $t7, $t3, $t5 /* 49F18 8006EB18 0801BB49 */ j .L8006ED24 /* 49F1C 8006EB1C 0000702D */ daddu $t6, $zero, $zero .L8006EB20: /* 49F20 8006EB20 0149102B */ sltu $v0, $t2, $t1 /* 49F24 8006EB24 10400007 */ beqz $v0, .L8006EB44 /* 49F28 8006EB28 3402FFFF */ ori $v0, $zero, 0xFFFF /* 49F2C 8006EB2C 00A0782D */ daddu $t7, $a1, $zero /* 49F30 8006EB30 0140702D */ daddu $t6, $t2, $zero /* 49F34 8006EB34 AFAE0000 */ sw $t6, 0x0($sp) /* 49F38 8006EB38 AFAF0004 */ sw $t7, 0x4($sp) /* 49F3C 8006EB3C 0801BB4B */ j .L8006ED2C /* 49F40 8006EB40 00000000 */ nop .L8006EB44: /* 49F44 8006EB44 0049102B */ sltu $v0, $v0, $t1 /* 49F48 8006EB48 14400005 */ bnez $v0, .L8006EB60 /* 49F4C 8006EB4C 0120202D */ daddu $a0, $t1, $zero /* 49F50 8006EB50 2D220100 */ sltiu $v0, $t1, 0x100 /* 49F54 8006EB54 38420001 */ xori $v0, $v0, 0x1 /* 49F58 8006EB58 0801BADE */ j .L8006EB78 /* 49F5C 8006EB5C 000218C0 */ sll $v1, $v0, 3 .L8006EB60: /* 49F60 8006EB60 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 49F64 8006EB64 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 49F68 8006EB68 0049102B */ sltu $v0, $v0, $t1 /* 49F6C 8006EB6C 14400002 */ bnez $v0, .L8006EB78 /* 49F70 8006EB70 24030018 */ addiu $v1, $zero, 0x18 /* 49F74 8006EB74 24030010 */ addiu $v1, $zero, 0x10 .L8006EB78: /* 49F78 8006EB78 00641006 */ srlv $v0, $a0, $v1 /* 49F7C 8006EB7C 3C01800A */ lui $at, %hi(D_8009A140) /* 49F80 8006EB80 00220821 */ addu $at, $at, $v0 /* 49F84 8006EB84 9022A140 */ lbu $v0, %lo(D_8009A140)($at) /* 49F88 8006EB88 00431021 */ addu $v0, $v0, $v1 /* 49F8C 8006EB8C 24030020 */ addiu $v1, $zero, 0x20 /* 49F90 8006EB90 00626823 */ subu $t5, $v1, $v0 /* 49F94 8006EB94 15A0000F */ bnez $t5, .L8006EBD4 /* 49F98 8006EB98 006DC023 */ subu $t8, $v1, $t5 /* 49F9C 8006EB9C 012A102B */ sltu $v0, $t1, $t2 /* 49FA0 8006EBA0 14400004 */ bnez $v0, .L8006EBB4 /* 49FA4 8006EBA4 01682023 */ subu $a0, $t3, $t0 /* 49FA8 8006EBA8 0168102B */ sltu $v0, $t3, $t0 /* 49FAC 8006EBAC 14400005 */ bnez $v0, .L8006EBC4 /* 49FB0 8006EBB0 00000000 */ nop .L8006EBB4: /* 49FB4 8006EBB4 01491823 */ subu $v1, $t2, $t1 /* 49FB8 8006EBB8 0164102B */ sltu $v0, $t3, $a0 /* 49FBC 8006EBBC 00625023 */ subu $t2, $v1, $v0 /* 49FC0 8006EBC0 0080582D */ daddu $t3, $a0, $zero .L8006EBC4: /* 49FC4 8006EBC4 13200059 */ beqz $t9, .L8006ED2C /* 49FC8 8006EBC8 0160782D */ daddu $t7, $t3, $zero /* 49FCC 8006EBCC 0801BB49 */ j .L8006ED24 /* 49FD0 8006EBD0 0140702D */ daddu $t6, $t2, $zero .L8006EBD4: /* 49FD4 8006EBD4 01A91804 */ sllv $v1, $t1, $t5 /* 49FD8 8006EBD8 03081006 */ srlv $v0, $t0, $t8 /* 49FDC 8006EBDC 00624825 */ or $t1, $v1, $v0 /* 49FE0 8006EBE0 01A84004 */ sllv $t0, $t0, $t5 /* 49FE4 8006EBE4 030A2006 */ srlv $a0, $t2, $t8 /* 49FE8 8006EBE8 01AA1804 */ sllv $v1, $t2, $t5 /* 49FEC 8006EBEC 030B1006 */ srlv $v0, $t3, $t8 /* 49FF0 8006EBF0 00625025 */ or $t2, $v1, $v0 /* 49FF4 8006EBF4 00093402 */ srl $a2, $t1, 16 /* 49FF8 8006EBF8 14C00002 */ bnez $a2, .L8006EC04 /* 49FFC 8006EBFC 0086001B */ divu $zero, $a0, $a2 /* 4A000 8006EC00 0007000D */ break 7 .L8006EC04: /* 4A004 8006EC04 00003812 */ mflo $a3 /* 4A008 8006EC08 00001810 */ mfhi $v1 /* 4A00C 8006EC0C 312CFFFF */ andi $t4, $t1, 0xFFFF /* 4A010 8006EC10 00000000 */ nop /* 4A014 8006EC14 00EC0018 */ mult $a3, $t4 /* 4A018 8006EC18 000A1402 */ srl $v0, $t2, 16 /* 4A01C 8006EC1C 00031C00 */ sll $v1, $v1, 16 /* 4A020 8006EC20 00621825 */ or $v1, $v1, $v0 /* 4A024 8006EC24 00002812 */ mflo $a1 /* 4A028 8006EC28 0065102B */ sltu $v0, $v1, $a1 /* 4A02C 8006EC2C 1040000A */ beqz $v0, .L8006EC58 /* 4A030 8006EC30 01AB5804 */ sllv $t3, $t3, $t5 /* 4A034 8006EC34 00691821 */ addu $v1, $v1, $t1 /* 4A038 8006EC38 0069102B */ sltu $v0, $v1, $t1 /* 4A03C 8006EC3C 14400006 */ bnez $v0, .L8006EC58 /* 4A040 8006EC40 24E7FFFF */ addiu $a3, $a3, -0x1 /* 4A044 8006EC44 0065102B */ sltu $v0, $v1, $a1 /* 4A048 8006EC48 50400004 */ beql $v0, $zero, .L8006EC5C /* 4A04C 8006EC4C 00651823 */ subu $v1, $v1, $a1 /* 4A050 8006EC50 24E7FFFF */ addiu $a3, $a3, -0x1 /* 4A054 8006EC54 00691821 */ addu $v1, $v1, $t1 .L8006EC58: /* 4A058 8006EC58 00651823 */ subu $v1, $v1, $a1 .L8006EC5C: /* 4A05C 8006EC5C 14C00002 */ bnez $a2, .L8006EC68 /* 4A060 8006EC60 0066001B */ divu $zero, $v1, $a2 /* 4A064 8006EC64 0007000D */ break 7 .L8006EC68: /* 4A068 8006EC68 00002012 */ mflo $a0 /* 4A06C 8006EC6C 00001810 */ mfhi $v1 /* 4A070 8006EC70 00000000 */ nop /* 4A074 8006EC74 00000000 */ nop /* 4A078 8006EC78 008C0018 */ mult $a0, $t4 /* 4A07C 8006EC7C 3142FFFF */ andi $v0, $t2, 0xFFFF /* 4A080 8006EC80 00031C00 */ sll $v1, $v1, 16 /* 4A084 8006EC84 00621825 */ or $v1, $v1, $v0 /* 4A088 8006EC88 00002812 */ mflo $a1 /* 4A08C 8006EC8C 0065102B */ sltu $v0, $v1, $a1 /* 4A090 8006EC90 5040000B */ beql $v0, $zero, .L8006ECC0 /* 4A094 8006EC94 00655023 */ subu $t2, $v1, $a1 /* 4A098 8006EC98 00691821 */ addu $v1, $v1, $t1 /* 4A09C 8006EC9C 0069102B */ sltu $v0, $v1, $t1 /* 4A0A0 8006ECA0 14400006 */ bnez $v0, .L8006ECBC /* 4A0A4 8006ECA4 2484FFFF */ addiu $a0, $a0, -0x1 /* 4A0A8 8006ECA8 0065102B */ sltu $v0, $v1, $a1 /* 4A0AC 8006ECAC 10400004 */ beqz $v0, .L8006ECC0 /* 4A0B0 8006ECB0 00655023 */ subu $t2, $v1, $a1 /* 4A0B4 8006ECB4 2484FFFF */ addiu $a0, $a0, -0x1 /* 4A0B8 8006ECB8 00691821 */ addu $v1, $v1, $t1 .L8006ECBC: /* 4A0BC 8006ECBC 00655023 */ subu $t2, $v1, $a1 .L8006ECC0: /* 4A0C0 8006ECC0 00071400 */ sll $v0, $a3, 16 /* 4A0C4 8006ECC4 00441025 */ or $v0, $v0, $a0 /* 4A0C8 8006ECC8 00480019 */ multu $v0, $t0 /* 4A0CC 8006ECCC 00003010 */ mfhi $a2 /* 4A0D0 8006ECD0 0146102B */ sltu $v0, $t2, $a2 /* 4A0D4 8006ECD4 00002812 */ mflo $a1 /* 4A0D8 8006ECD8 54400005 */ bnel $v0, $zero, .L8006ECF0 /* 4A0DC 8006ECDC 00A82023 */ subu $a0, $a1, $t0 /* 4A0E0 8006ECE0 14CA0007 */ bne $a2, $t2, .L8006ED00 /* 4A0E4 8006ECE4 0165102B */ sltu $v0, $t3, $a1 /* 4A0E8 8006ECE8 10400005 */ beqz $v0, .L8006ED00 /* 4A0EC 8006ECEC 00A82023 */ subu $a0, $a1, $t0 .L8006ECF0: /* 4A0F0 8006ECF0 00C91823 */ subu $v1, $a2, $t1 /* 4A0F4 8006ECF4 00A4102B */ sltu $v0, $a1, $a0 /* 4A0F8 8006ECF8 00623023 */ subu $a2, $v1, $v0 /* 4A0FC 8006ECFC 0080282D */ daddu $a1, $a0, $zero .L8006ED00: /* 4A100 8006ED00 1320000A */ beqz $t9, .L8006ED2C /* 4A104 8006ED04 01651823 */ subu $v1, $t3, $a1 /* 4A108 8006ED08 01462023 */ subu $a0, $t2, $a2 /* 4A10C 8006ED0C 0163102B */ sltu $v0, $t3, $v1 /* 4A110 8006ED10 00825023 */ subu $t2, $a0, $v0 /* 4A114 8006ED14 030A1004 */ sllv $v0, $t2, $t8 /* 4A118 8006ED18 01A31806 */ srlv $v1, $v1, $t5 /* 4A11C 8006ED1C 00437825 */ or $t7, $v0, $v1 /* 4A120 8006ED20 01AA7006 */ srlv $t6, $t2, $t5 .L8006ED24: /* 4A124 8006ED24 AF2E0000 */ sw $t6, 0x0($t9) /* 4A128 8006ED28 AF2F0004 */ sw $t7, 0x4($t9) .L8006ED2C: /* 4A12C 8006ED2C 8FA20000 */ lw $v0, 0x0($sp) /* 4A130 8006ED30 8FA30004 */ lw $v1, 0x4($sp) /* 4A134 8006ED34 03E00008 */ jr $ra /* 4A138 8006ED38 27BD0008 */ addiu $sp, $sp, 0x8 /* 4A13C 8006ED3C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: UDItype __umoddi3(UDItype u, UDItype v) { UDItype w; __udivmoddi4(u, v, &w); return w; }
### RAW ASSEMBLY INSTRUCTIONS: glabel phys_main_collision_below /* 7DBF4 800E4744 27BDFF88 */ addiu $sp, $sp, -0x78 /* 7DBF8 800E4748 AFB00048 */ sw $s0, 0x48($sp) /* 7DBFC 800E474C 3C108011 */ lui $s0, %hi(gPlayerStatus) /* 7DC00 800E4750 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* 7DC04 800E4754 0200202D */ daddu $a0, $s0, $zero /* 7DC08 800E4758 27A50028 */ addiu $a1, $sp, 0x28 /* 7DC0C 800E475C 27A6002C */ addiu $a2, $sp, 0x2C /* 7DC10 800E4760 AFBF005C */ sw $ra, 0x5C($sp) /* 7DC14 800E4764 AFB40058 */ sw $s4, 0x58($sp) /* 7DC18 800E4768 AFB30054 */ sw $s3, 0x54($sp) /* 7DC1C 800E476C AFB20050 */ sw $s2, 0x50($sp) /* 7DC20 800E4770 AFB1004C */ sw $s1, 0x4C($sp) /* 7DC24 800E4774 F7B80070 */ sdc1 $f24, 0x70($sp) /* 7DC28 800E4778 F7B60068 */ sdc1 $f22, 0x68($sp) /* 7DC2C 800E477C F7B40060 */ sdc1 $f20, 0x60($sp) /* 7DC30 800E4780 860200B0 */ lh $v0, 0xB0($s0) /* 7DC34 800E4784 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 7DC38 800E4788 4481A000 */ mtc1 $at, $f20 /* 7DC3C 800E478C C6000028 */ lwc1 $f0, 0x28($s0) /* 7DC40 800E4790 44822000 */ mtc1 $v0, $f4 /* 7DC44 800E4794 00000000 */ nop /* 7DC48 800E4798 46802120 */ cvt.s.w $f4, $f4 /* 7DC4C 800E479C 46142582 */ mul.s $f22, $f4, $f20 /* 7DC50 800E47A0 00000000 */ nop /* 7DC54 800E47A4 27A70030 */ addiu $a3, $sp, 0x30 /* 7DC58 800E47A8 E7A00028 */ swc1 $f0, 0x28($sp) /* 7DC5C 800E47AC C600002C */ lwc1 $f0, 0x2C($s0) /* 7DC60 800E47B0 C6020030 */ lwc1 $f2, 0x30($s0) /* 7DC64 800E47B4 46160000 */ add.s $f0, $f0, $f22 /* 7DC68 800E47B8 27A20034 */ addiu $v0, $sp, 0x34 /* 7DC6C 800E47BC E7A40034 */ swc1 $f4, 0x34($sp) /* 7DC70 800E47C0 E7A0002C */ swc1 $f0, 0x2C($sp) /* 7DC74 800E47C4 3C0140E0 */ lui $at, (0x40E00000 >> 16) /* 7DC78 800E47C8 44810000 */ mtc1 $at, $f0 /* 7DC7C 800E47CC 46042100 */ add.s $f4, $f4, $f4 /* 7DC80 800E47D0 E7A20030 */ swc1 $f2, 0x30($sp) /* 7DC84 800E47D4 AFA20010 */ sw $v0, 0x10($sp) /* 7DC88 800E47D8 27A20038 */ addiu $v0, $sp, 0x38 /* 7DC8C 800E47DC AFA20014 */ sw $v0, 0x14($sp) /* 7DC90 800E47E0 27A2003C */ addiu $v0, $sp, 0x3C /* 7DC94 800E47E4 AFA20018 */ sw $v0, 0x18($sp) /* 7DC98 800E47E8 27A20040 */ addiu $v0, $sp, 0x40 /* 7DC9C 800E47EC AFA2001C */ sw $v0, 0x1C($sp) /* 7DCA0 800E47F0 27A20044 */ addiu $v0, $sp, 0x44 /* 7DCA4 800E47F4 AFA20020 */ sw $v0, 0x20($sp) /* 7DCA8 800E47F8 0C03791B */ jal player_raycast_below_cam_relative /* 7DCAC 800E47FC 46002603 */ div.s $f24, $f4, $f0 /* 7DCB0 800E4800 0C00A794 */ jal get_player_normal_pitch /* 7DCB4 800E4804 0040882D */ daddu $s1, $v0, $zero /* 7DCB8 800E4808 4614C502 */ mul.s $f20, $f24, $f20 /* 7DCBC 800E480C 00000000 */ nop /* 7DCC0 800E4810 3C138011 */ lui $s3, %hi(gPartnerStatus) /* 7DCC4 800E4814 2673EBB0 */ addiu $s3, $s3, %lo(gPartnerStatus) /* 7DCC8 800E4818 C7A20034 */ lwc1 $f2, 0x34($sp) /* 7DCCC 800E481C 4614B500 */ add.s $f20, $f22, $f20 /* 7DCD0 800E4820 3C148016 */ lui $s4, %hi(gCollisionStatus) /* 7DCD4 800E4824 2694A550 */ addiu $s4, $s4, %lo(gCollisionStatus) /* 7DCD8 800E4828 4602A03C */ c.lt.s $f20, $f2 /* 7DCDC 800E482C 00000000 */ nop /* 7DCE0 800E4830 45000002 */ bc1f .L800E483C /* 7DCE4 800E4834 E6000068 */ swc1 $f0, 0x68($s0) /* 7DCE8 800E4838 2411FFFF */ addiu $s1, $zero, -0x1 .L800E483C: /* 7DCEC 800E483C 860200C0 */ lh $v0, 0xC0($s0) /* 7DCF0 800E4840 50400001 */ beql $v0, $zero, .L800E4848 /* 7DCF4 800E4844 A6910002 */ sh $s1, 0x2($s4) .L800E4848: /* 7DCF8 800E4848 06200005 */ bltz $s1, .L800E4860 /* 7DCFC 800E484C 00000000 */ nop /* 7DD00 800E4850 C7A00040 */ lwc1 $f0, 0x40($sp) /* 7DD04 800E4854 C7A20044 */ lwc1 $f2, 0x44($sp) /* 7DD08 800E4858 E6000034 */ swc1 $f0, 0x34($s0) /* 7DD0C 800E485C E6020038 */ swc1 $f2, 0x38($s0) .L800E4860: /* 7DD10 800E4860 0C038082 */ jal func_800E0208 /* 7DD14 800E4864 00000000 */ nop /* 7DD18 800E4868 14400090 */ bnez $v0, .L800E4AAC /* 7DD1C 800E486C 00000000 */ nop /* 7DD20 800E4870 8E030000 */ lw $v1, 0x0($s0) /* 7DD24 800E4874 3062000E */ andi $v0, $v1, 0xE /* 7DD28 800E4878 1440008C */ bnez $v0, .L800E4AAC /* 7DD2C 800E487C 24120011 */ addiu $s2, $zero, 0x11 /* 7DD30 800E4880 820200B4 */ lb $v0, 0xB4($s0) /* 7DD34 800E4884 10520089 */ beq $v0, $s2, .L800E4AAC /* 7DD38 800E4888 30620010 */ andi $v0, $v1, 0x10 /* 7DD3C 800E488C 1040000C */ beqz $v0, .L800E48C0 /* 7DD40 800E4890 00000000 */ nop /* 7DD44 800E4894 0C03954C */ jal phys_adjust_cam_on_landing /* 7DD48 800E4898 00000000 */ nop /* 7DD4C 800E489C 0C039178 */ jal phys_should_player_be_sliding /* 7DD50 800E48A0 00000000 */ nop /* 7DD54 800E48A4 10400006 */ beqz $v0, .L800E48C0 /* 7DD58 800E48A8 00000000 */ nop /* 7DD5C 800E48AC 0C039769 */ jal set_action_state /* 7DD60 800E48B0 0240202D */ daddu $a0, $s2, $zero /* 7DD64 800E48B4 820200B4 */ lb $v0, 0xB4($s0) /* 7DD68 800E48B8 1052007C */ beq $v0, $s2, .L800E4AAC /* 7DD6C 800E48BC 00000000 */ nop .L800E48C0: /* 7DD70 800E48C0 0620005D */ bltz $s1, .L800E4A38 /* 7DD74 800E48C4 00000000 */ nop /* 7DD78 800E48C8 0C016F6A */ jal get_collider_flags /* 7DD7C 800E48CC 0220202D */ daddu $a0, $s1, $zero /* 7DD80 800E48D0 304400FF */ andi $a0, $v0, 0xFF /* 7DD84 800E48D4 24020002 */ addiu $v0, $zero, 0x2 /* 7DD88 800E48D8 10820005 */ beq $a0, $v0, .L800E48F0 /* 7DD8C 800E48DC 24020003 */ addiu $v0, $zero, 0x3 /* 7DD90 800E48E0 10820011 */ beq $a0, $v0, .L800E4928 /* 7DD94 800E48E4 0000282D */ daddu $a1, $zero, $zero /* 7DD98 800E48E8 0803925F */ j .L800E497C /* 7DD9C 800E48EC 00000000 */ nop .L800E48F0: /* 7DDA0 800E48F0 82620000 */ lb $v0, 0x0($s3) /* 7DDA4 800E48F4 10400004 */ beqz $v0, .L800E4908 /* 7DDA8 800E48F8 24020009 */ addiu $v0, $zero, 0x9 /* 7DDAC 800E48FC 82630003 */ lb $v1, 0x3($s3) /* 7DDB0 800E4900 1062006A */ beq $v1, $v0, .L800E4AAC /* 7DDB4 800E4904 00000000 */ nop .L800E4908: /* 7DDB8 800E4908 86020010 */ lh $v0, 0x10($s0) /* 7DDBC 800E490C 14400017 */ bnez $v0, .L800E496C /* 7DDC0 800E4910 24020017 */ addiu $v0, $zero, 0x17 /* 7DDC4 800E4914 820300B4 */ lb $v1, 0xB4($s0) /* 7DDC8 800E4918 10620064 */ beq $v1, $v0, .L800E4AAC /* 7DDCC 800E491C 00000000 */ nop /* 7DDD0 800E4920 08039257 */ j .L800E495C /* 7DDD4 800E4924 A20400BF */ sb $a0, 0xBF($s0) .L800E4928: /* 7DDD8 800E4928 82620000 */ lb $v0, 0x0($s3) /* 7DDDC 800E492C 10400004 */ beqz $v0, .L800E4940 /* 7DDE0 800E4930 24020009 */ addiu $v0, $zero, 0x9 /* 7DDE4 800E4934 82630003 */ lb $v1, 0x3($s3) /* 7DDE8 800E4938 1062005C */ beq $v1, $v0, .L800E4AAC /* 7DDEC 800E493C 00000000 */ nop .L800E4940: /* 7DDF0 800E4940 86020010 */ lh $v0, 0x10($s0) /* 7DDF4 800E4944 14400009 */ bnez $v0, .L800E496C /* 7DDF8 800E4948 24020017 */ addiu $v0, $zero, 0x17 /* 7DDFC 800E494C 820300B4 */ lb $v1, 0xB4($s0) /* 7DE00 800E4950 10620056 */ beq $v1, $v0, .L800E4AAC /* 7DE04 800E4954 24020001 */ addiu $v0, $zero, 0x1 /* 7DE08 800E4958 A20200BF */ sb $v0, 0xBF($s0) .L800E495C: /* 7DE0C 800E495C 0C039769 */ jal set_action_state /* 7DE10 800E4960 24040017 */ addiu $a0, $zero, 0x17 /* 7DE14 800E4964 080392AB */ j .L800E4AAC /* 7DE18 800E4968 00000000 */ nop .L800E496C: /* 7DE1C 800E496C 0C039769 */ jal set_action_state /* 7DE20 800E4970 24040016 */ addiu $a0, $zero, 0x16 /* 7DE24 800E4974 080392AB */ j .L800E4AAC /* 7DE28 800E4978 00000000 */ nop .L800E497C: /* 7DE2C 800E497C 96840002 */ lhu $a0, 0x2($s4) /* 7DE30 800E4980 30824000 */ andi $v0, $a0, 0x4000 /* 7DE34 800E4984 10400006 */ beqz $v0, .L800E49A0 /* 7DE38 800E4988 00000000 */ nop /* 7DE3C 800E498C 00042400 */ sll $a0, $a0, 16 /* 7DE40 800E4990 0C0441A9 */ jal get_entity_type /* 7DE44 800E4994 00042403 */ sra $a0, $a0, 16 /* 7DE48 800E4998 38420030 */ xori $v0, $v0, 0x30 /* 7DE4C 800E499C 2C450001 */ sltiu $a1, $v0, 0x1 .L800E49A0: /* 7DE50 800E49A0 820300B4 */ lb $v1, 0xB4($s0) /* 7DE54 800E49A4 24020022 */ addiu $v0, $zero, 0x22 /* 7DE58 800E49A8 10620040 */ beq $v1, $v0, .L800E4AAC /* 7DE5C 800E49AC 00000000 */ nop /* 7DE60 800E49B0 14A0003E */ bnez $a1, .L800E4AAC /* 7DE64 800E49B4 00000000 */ nop /* 7DE68 800E49B8 8E020004 */ lw $v0, 0x4($s0) /* 7DE6C 800E49BC 30421000 */ andi $v0, $v0, 0x1000 /* 7DE70 800E49C0 14400017 */ bnez $v0, .L800E4A20 /* 7DE74 800E49C4 00000000 */ nop /* 7DE78 800E49C8 C7A4002C */ lwc1 $f4, 0x2C($sp) /* 7DE7C 800E49CC C600002C */ lwc1 $f0, 0x2C($s0) /* 7DE80 800E49D0 46002001 */ sub.s $f0, $f4, $f0 /* 7DE84 800E49D4 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 7DE88 800E49D8 44811000 */ mtc1 $at, $f2 /* 7DE8C 800E49DC 00000000 */ nop /* 7DE90 800E49E0 4602003C */ c.lt.s $f0, $f2 /* 7DE94 800E49E4 00000000 */ nop /* 7DE98 800E49E8 45000003 */ bc1f .L800E49F8 /* 7DE9C 800E49EC 00000000 */ nop /* 7DEA0 800E49F0 0803928A */ j .L800E4A28 /* 7DEA4 800E49F4 E604002C */ swc1 $f4, 0x2C($s0) .L800E49F8: /* 7DEA8 800E49F8 0C039769 */ jal set_action_state /* 7DEAC 800E49FC 24040022 */ addiu $a0, $zero, 0x22 /* 7DEB0 800E4A00 C7A0002C */ lwc1 $f0, 0x2C($sp) /* 7DEB4 800E4A04 C6020080 */ lwc1 $f2, 0x80($s0) /* 7DEB8 800E4A08 3C018011 */ lui $at, %hi(D_8010C928) /* 7DEBC 800E4A0C E420C928 */ swc1 $f0, %lo(D_8010C928)($at) /* 7DEC0 800E4A10 3C018011 */ lui $at, %hi(D_8010C984) /* 7DEC4 800E4A14 E422C984 */ swc1 $f2, %lo(D_8010C984)($at) /* 7DEC8 800E4A18 0803928A */ j .L800E4A28 /* 7DECC 800E4A1C 00000000 */ nop .L800E4A20: /* 7DED0 800E4A20 C7A0002C */ lwc1 $f0, 0x2C($sp) /* 7DED4 800E4A24 E600002C */ swc1 $f0, 0x2C($s0) .L800E4A28: /* 7DED8 800E4A28 0C039538 */ jal phys_save_ground_pos /* 7DEDC 800E4A2C 00000000 */ nop /* 7DEE0 800E4A30 080392AB */ j .L800E4AAC /* 7DEE4 800E4A34 00000000 */ nop .L800E4A38: /* 7DEE8 800E4A38 8E020000 */ lw $v0, 0x0($s0) /* 7DEEC 800E4A3C 30420008 */ andi $v0, $v0, 0x8 /* 7DEF0 800E4A40 1440001A */ bnez $v0, .L800E4AAC /* 7DEF4 800E4A44 2402001D */ addiu $v0, $zero, 0x1D /* 7DEF8 800E4A48 820300B4 */ lb $v1, 0xB4($s0) /* 7DEFC 800E4A4C 10620017 */ beq $v1, $v0, .L800E4AAC /* 7DF00 800E4A50 00000000 */ nop /* 7DF04 800E4A54 4618B080 */ add.s $f2, $f22, $f24 /* 7DF08 800E4A58 C7A00034 */ lwc1 $f0, 0x34($sp) /* 7DF0C 800E4A5C 4602003E */ c.le.s $f0, $f2 /* 7DF10 800E4A60 00000000 */ nop /* 7DF14 800E4A64 4500000D */ bc1f .L800E4A9C /* 7DF18 800E4A68 24040008 */ addiu $a0, $zero, 0x8 /* 7DF1C 800E4A6C C7A00040 */ lwc1 $f0, 0x40($sp) /* 7DF20 800E4A70 44801000 */ mtc1 $zero, $f2 /* 7DF24 800E4A74 00000000 */ nop /* 7DF28 800E4A78 46020032 */ c.eq.s $f0, $f2 /* 7DF2C 800E4A7C 00000000 */ nop /* 7DF30 800E4A80 45000006 */ bc1f .L800E4A9C /* 7DF34 800E4A84 00000000 */ nop /* 7DF38 800E4A88 C7A00044 */ lwc1 $f0, 0x44($sp) /* 7DF3C 800E4A8C 46020032 */ c.eq.s $f0, $f2 /* 7DF40 800E4A90 00000000 */ nop /* 7DF44 800E4A94 45030001 */ bc1tl .L800E4A9C /* 7DF48 800E4A98 24040009 */ addiu $a0, $zero, 0x9 .L800E4A9C: /* 7DF4C 800E4A9C 0C039769 */ jal set_action_state /* 7DF50 800E4AA0 00000000 */ nop /* 7DF54 800E4AA4 0C038C1B */ jal gravity_use_fall_parms /* 7DF58 800E4AA8 00000000 */ nop .L800E4AAC: /* 7DF5C 800E4AAC 8FBF005C */ lw $ra, 0x5C($sp) /* 7DF60 800E4AB0 8FB40058 */ lw $s4, 0x58($sp) /* 7DF64 800E4AB4 8FB30054 */ lw $s3, 0x54($sp) /* 7DF68 800E4AB8 8FB20050 */ lw $s2, 0x50($sp) /* 7DF6C 800E4ABC 8FB1004C */ lw $s1, 0x4C($sp) /* 7DF70 800E4AC0 8FB00048 */ lw $s0, 0x48($sp) /* 7DF74 800E4AC4 D7B80070 */ ldc1 $f24, 0x70($sp) /* 7DF78 800E4AC8 D7B60068 */ ldc1 $f22, 0x68($sp) /* 7DF7C 800E4ACC D7B40060 */ ldc1 $f20, 0x60($sp) /* 7DF80 800E4AD0 03E00008 */ jr $ra /* 7DF84 800E4AD4 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: void phys_main_collision_below(void) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerStatus* partnerStatus = &gPartnerStatus; CollisionStatus* collisionStatus = &gCollisionStatus; f32 collHeightHalf = playerStatus->colliderHeight * 0.5f; f32 playerX = playerStatus->position.x; f32 playerY = playerStatus->position.y + collHeightHalf; f32 playerZ = playerStatus->position.z; f32 outLength = playerStatus->colliderHeight; f32 temp_f24 = (2.0f * playerStatus->colliderHeight) / 7.0f; f32 hitRx, hitRz; f32 hitDirX, hitDirZ; s32 colliderID; s32 cond; colliderID = player_raycast_below_cam_relative(playerStatus, &playerX, &playerY, &playerZ, &outLength, &hitRx, &hitRz, &hitDirX, &hitDirZ); playerStatus->groundNormalPitch = get_player_normal_pitch(); if (collHeightHalf + (temp_f24 * 0.5f) < outLength) { colliderID = NO_COLLIDER; } if (playerStatus->timeInAir == 0) { collisionStatus->currentFloor = colliderID; } if (colliderID >= 0) { playerStatus->groundAnglesXZ.x = hitDirX; playerStatus->groundAnglesXZ.y = hitDirZ; } if (game_scripts_disabled()) { return; } if (playerStatus->flags & PS_FLAG_AIRBORNE) { return; } if (playerStatus->actionState == ACTION_STATE_SLIDING) { return; } if ((!(playerStatus->flags & PS_FLAG_SLIDING) || (phys_adjust_cam_on_landing(), !phys_should_player_be_sliding()) || (set_action_state(ACTION_STATE_SLIDING), (playerStatus->actionState != ACTION_STATE_SLIDING)))) { if (colliderID >= 0) { s32 surfaceType = get_collider_flags(colliderID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; switch (surfaceType) { case SURFACE_TYPE_SPIKES: if (partnerStatus->partnerActionState == PARTNER_ACTION_NONE || partnerStatus->actingPartner != PARTNER_BOW) { if (playerStatus->blinkTimer == 0) { if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) { playerStatus->hazardType = HAZARD_TYPE_SPIKES; set_action_state(ACTION_STATE_HIT_LAVA); } } else { set_action_state(ACTION_STATE_KNOCKBACK); } } break; case SURFACE_TYPE_LAVA: if (partnerStatus->partnerActionState == PARTNER_ACTION_NONE || partnerStatus->actingPartner != PARTNER_BOW) { if (playerStatus->blinkTimer == 0) { if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) { playerStatus->hazardType = HAZARD_TYPE_LAVA; set_action_state(ACTION_STATE_HIT_LAVA); } } else { set_action_state(ACTION_STATE_KNOCKBACK); } } break; default: cond = FALSE; if (collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT) { cond = get_entity_type(collisionStatus->currentFloor) == ENTITY_TYPE_HIDDEN_PANEL; } if (playerStatus->actionState != ACTION_STATE_STEP_UP && !cond) { if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) { if (playerY - playerStatus->position.y < 6.0f) { playerStatus->position.y = playerY; } else { set_action_state(ACTION_STATE_STEP_UP); D_8010C928 = playerY; D_8010C984 = playerStatus->targetYaw; } } else { playerStatus->position.y = playerY; } phys_save_ground_pos(); } break; } } else if (!(playerStatus->flags & PS_FLAG_FLYING) && playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER ) { if (outLength <= collHeightHalf + temp_f24 && hitDirX == 0.0f && hitDirZ == 0.0f) { set_action_state(ACTION_STATE_STEP_DOWN); } else { set_action_state(ACTION_STATE_FALLING); } gravity_use_fall_parms(); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel inflict_status /* 194820 80265F40 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 194824 80265F44 AFB00018 */ sw $s0, 0x18($sp) /* 194828 80265F48 0080802D */ daddu $s0, $a0, $zero /* 19482C 80265F4C AFB1001C */ sw $s1, 0x1C($sp) /* 194830 80265F50 00A0882D */ daddu $s1, $a1, $zero /* 194834 80265F54 AFB20020 */ sw $s2, 0x20($sp) /* 194838 80265F58 00C0902D */ daddu $s2, $a2, $zero /* 19483C 80265F5C 2E22000F */ sltiu $v0, $s1, 0xF /* 194840 80265F60 104000B5 */ beqz $v0, .L80266238 /* 194844 80265F64 AFBF0024 */ sw $ra, 0x24($sp) /* 194848 80265F68 00111080 */ sll $v0, $s1, 2 /* 19484C 80265F6C 3C01802A */ lui $at, %hi(jtbl_8029D5E0) /* 194850 80265F70 00220821 */ addu $at, $at, $v0 /* 194854 80265F74 8C22D5E0 */ lw $v0, %lo(jtbl_8029D5E0)($at) /* 194858 80265F78 00400008 */ jr $v0 /* 19485C 80265F7C 00000000 */ nop glabel .L80265F80 /* 194860 80265F80 86020192 */ lh $v0, 0x192($s0) /* 194864 80265F84 1440000E */ bnez $v0, .L80265FC0 /* 194868 80265F88 00000000 */ nop /* 19486C 80265F8C 0C03A752 */ jal is_ability_active /* 194870 80265F90 2404000E */ addiu $a0, $zero, 0xE /* 194874 80265F94 144000A9 */ bnez $v0, .L8026623C /* 194878 80265F98 0000102D */ daddu $v0, $zero, $zero /* 19487C 80265F9C 0C03A752 */ jal is_ability_active /* 194880 80265FA0 24040015 */ addiu $a0, $zero, 0x15 /* 194884 80265FA4 144000A5 */ bnez $v0, .L8026623C /* 194888 80265FA8 0000102D */ daddu $v0, $zero, $zero /* 19488C 80265FAC 3C02800E */ lui $v0, %hi(gBattleStatus) /* 194890 80265FB0 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 194894 80265FB4 8042008B */ lb $v0, 0x8B($v0) /* 194898 80265FB8 144000A0 */ bnez $v0, .L8026623C /* 19489C 80265FBC 0000102D */ daddu $v0, $zero, $zero .L80265FC0: /* 1948A0 80265FC0 86030192 */ lh $v1, 0x192($s0) /* 1948A4 80265FC4 24020100 */ addiu $v0, $zero, 0x100 /* 1948A8 80265FC8 1062009C */ beq $v1, $v0, .L8026623C /* 1948AC 80265FCC 24020001 */ addiu $v0, $zero, 0x1 /* 1948B0 80265FD0 82020210 */ lb $v0, 0x210($s0) /* 1948B4 80265FD4 54510001 */ bnel $v0, $s1, .L80265FDC /* 1948B8 80265FD8 A211021C */ sb $s1, 0x21C($s0) .L80265FDC: /* 1948BC 80265FDC 8E020440 */ lw $v0, 0x440($s0) /* 1948C0 80265FE0 8C42000C */ lw $v0, 0xC($v0) /* 1948C4 80265FE4 AC40003C */ sw $zero, 0x3C($v0) /* 1948C8 80265FE8 00121600 */ sll $v0, $s2, 24 /* 1948CC 80265FEC 00021603 */ sra $v0, $v0, 24 /* 1948D0 80265FF0 2842000A */ slti $v0, $v0, 0xA /* 1948D4 80265FF4 A2110210 */ sb $s1, 0x210($s0) /* 1948D8 80265FF8 14400003 */ bnez $v0, .L80266008 /* 1948DC 80265FFC A2120211 */ sb $s2, 0x211($s0) /* 1948E0 80266000 24020009 */ addiu $v0, $zero, 0x9 /* 1948E4 80266004 A2020211 */ sb $v0, 0x211($s0) .L80266008: /* 1948E8 80266008 2625FFFD */ addiu $a1, $s1, -0x3 /* 1948EC 8026600C 2CA20008 */ sltiu $v0, $a1, 0x8 /* 1948F0 80266010 10400089 */ beqz $v0, .L80266238 /* 1948F4 80266014 00051080 */ sll $v0, $a1, 2 /* 1948F8 80266018 3C01802A */ lui $at, %hi(jtbl_8029D620) /* 1948FC 8026601C 00220821 */ addu $at, $at, $v0 /* 194900 80266020 8C22D620 */ lw $v0, %lo(jtbl_8029D620)($at) /* 194904 80266024 00400008 */ jr $v0 /* 194908 80266028 00000000 */ nop glabel .L8026602C /* 19490C 8026602C 86030192 */ lh $v1, 0x192($s0) /* 194910 80266030 24020100 */ addiu $v0, $zero, 0x100 /* 194914 80266034 10620081 */ beq $v1, $v0, .L8026623C /* 194918 80266038 24020001 */ addiu $v0, $zero, 0x1 /* 19491C 8026603C 8E030228 */ lw $v1, 0x228($s0) /* 194920 80266040 10600004 */ beqz $v1, .L80266054 /* 194924 80266044 00000000 */ nop /* 194928 80266048 8C620000 */ lw $v0, 0x0($v1) /* 19492C 8026604C 34420010 */ ori $v0, $v0, 0x10 /* 194930 80266050 AC620000 */ sw $v0, 0x0($v1) .L80266054: /* 194934 80266054 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 194938 80266058 44810000 */ mtc1 $at, $f0 /* 19493C 8026605C AFA00014 */ sw $zero, 0x14($sp) /* 194940 80266060 E7A00010 */ swc1 $f0, 0x10($sp) /* 194944 80266064 8E050144 */ lw $a1, 0x144($s0) /* 194948 80266068 8E060148 */ lw $a2, 0x148($s0) /* 19494C 8026606C 8E07014C */ lw $a3, 0x14C($s0) /* 194950 80266070 0C01CA3C */ jal fx_ice_pillar /* 194954 80266074 0000202D */ daddu $a0, $zero, $zero /* 194958 80266078 86040436 */ lh $a0, 0x436($s0) /* 19495C 8026607C 24050007 */ addiu $a1, $zero, 0x7 /* 194960 80266080 0C011E08 */ jal create_status_debuff /* 194964 80266084 AE020228 */ sw $v0, 0x228($s0) /* 194968 80266088 0809988F */ j .L8026623C /* 19496C 8026608C 24020001 */ addiu $v0, $zero, 0x1 glabel .L80266090 /* 194970 80266090 0200202D */ daddu $a0, $s0, $zero /* 194974 80266094 0C099B6B */ jal set_actor_pal_adjustment /* 194978 80266098 24050003 */ addiu $a1, $zero, 0x3 /* 19497C 8026609C 86040436 */ lh $a0, 0x436($s0) /* 194980 802660A0 0C011E08 */ jal create_status_debuff /* 194984 802660A4 24050006 */ addiu $a1, $zero, 0x6 /* 194988 802660A8 0809988F */ j .L8026623C /* 19498C 802660AC 24020001 */ addiu $v0, $zero, 0x1 glabel .L802660B0 /* 194990 802660B0 0200202D */ daddu $a0, $s0, $zero /* 194994 802660B4 0C099B6B */ jal set_actor_pal_adjustment /* 194998 802660B8 24050007 */ addiu $a1, $zero, 0x7 /* 19499C 802660BC 86040436 */ lh $a0, 0x436($s0) /* 1949A0 802660C0 0C011E08 */ jal create_status_debuff /* 1949A4 802660C4 24050005 */ addiu $a1, $zero, 0x5 /* 1949A8 802660C8 0809988F */ j .L8026623C /* 1949AC 802660CC 24020001 */ addiu $v0, $zero, 0x1 glabel .L802660D0 /* 1949B0 802660D0 86040436 */ lh $a0, 0x436($s0) /* 1949B4 802660D4 0C011E08 */ jal create_status_debuff /* 1949B8 802660D8 24050004 */ addiu $a1, $zero, 0x4 /* 1949BC 802660DC 0809988F */ j .L8026623C /* 1949C0 802660E0 24020001 */ addiu $v0, $zero, 0x1 glabel .L802660E4 /* 1949C4 802660E4 0200202D */ daddu $a0, $s0, $zero /* 1949C8 802660E8 0C099B6B */ jal set_actor_pal_adjustment /* 1949CC 802660EC 24050005 */ addiu $a1, $zero, 0x5 /* 1949D0 802660F0 86040436 */ lh $a0, 0x436($s0) /* 1949D4 802660F4 0C011E08 */ jal create_status_debuff /* 1949D8 802660F8 24050003 */ addiu $a1, $zero, 0x3 /* 1949DC 802660FC 0809988F */ j .L8026623C /* 1949E0 80266100 24020001 */ addiu $v0, $zero, 0x1 glabel .L80266104 /* 1949E4 80266104 0200202D */ daddu $a0, $s0, $zero /* 1949E8 80266108 0C099B6B */ jal set_actor_pal_adjustment /* 1949EC 8026610C 24050006 */ addiu $a1, $zero, 0x6 /* 1949F0 80266110 86040436 */ lh $a0, 0x436($s0) /* 1949F4 80266114 0C011E08 */ jal create_status_debuff /* 1949F8 80266118 24050009 */ addiu $a1, $zero, 0x9 /* 1949FC 8026611C 0809988F */ j .L8026623C /* 194A00 80266120 24020001 */ addiu $v0, $zero, 0x1 glabel .L80266124 /* 194A04 80266124 86040436 */ lh $a0, 0x436($s0) /* 194A08 80266128 0C011E08 */ jal create_status_debuff /* 194A0C 8026612C 2405000A */ addiu $a1, $zero, 0xA /* 194A10 80266130 0809988F */ j .L8026623C /* 194A14 80266134 24020001 */ addiu $v0, $zero, 0x1 glabel .L80266138 /* 194A18 80266138 86030192 */ lh $v1, 0x192($s0) /* 194A1C 8026613C 24020100 */ addiu $v0, $zero, 0x100 /* 194A20 80266140 1062003D */ beq $v1, $v0, .L80266238 /* 194A24 80266144 00121600 */ sll $v0, $s2, 24 /* 194A28 80266148 00021603 */ sra $v0, $v0, 24 /* 194A2C 8026614C 2842000A */ slti $v0, $v0, 0xA /* 194A30 80266150 A2110212 */ sb $s1, 0x212($s0) /* 194A34 80266154 14400003 */ bnez $v0, .L80266164 /* 194A38 80266158 A2120213 */ sb $s2, 0x213($s0) /* 194A3C 8026615C 24020009 */ addiu $v0, $zero, 0x9 /* 194A40 80266160 A2020213 */ sb $v0, 0x213($s0) .L80266164: /* 194A44 80266164 0200202D */ daddu $a0, $s0, $zero /* 194A48 80266168 24050004 */ addiu $a1, $zero, 0x4 /* 194A4C 8026616C 2402000B */ addiu $v0, $zero, 0xB /* 194A50 80266170 0C099B6B */ jal set_actor_pal_adjustment /* 194A54 80266174 A202021C */ sb $v0, 0x21C($s0) /* 194A58 80266178 86040436 */ lh $a0, 0x436($s0) /* 194A5C 8026617C 0C011E4A */ jal create_status_static /* 194A60 80266180 2405000B */ addiu $a1, $zero, 0xB /* 194A64 80266184 0809988F */ j .L8026623C /* 194A68 80266188 24020001 */ addiu $v0, $zero, 0x1 glabel .L8026618C /* 194A6C 8026618C 86030192 */ lh $v1, 0x192($s0) /* 194A70 80266190 24020100 */ addiu $v0, $zero, 0x100 /* 194A74 80266194 10620028 */ beq $v1, $v0, .L80266238 /* 194A78 80266198 2403000C */ addiu $v1, $zero, 0xC /* 194A7C 8026619C 00121600 */ sll $v0, $s2, 24 /* 194A80 802661A0 00021603 */ sra $v0, $v0, 24 /* 194A84 802661A4 2842000A */ slti $v0, $v0, 0xA /* 194A88 802661A8 A2030214 */ sb $v1, 0x214($s0) /* 194A8C 802661AC 14400010 */ bnez $v0, .L802661F0 /* 194A90 802661B0 A2120215 */ sb $s2, 0x215($s0) /* 194A94 802661B4 24020009 */ addiu $v0, $zero, 0x9 /* 194A98 802661B8 0809987C */ j .L802661F0 /* 194A9C 802661BC A2020215 */ sb $v0, 0x215($s0) glabel .L802661C0 /* 194AA0 802661C0 82020216 */ lb $v0, 0x216($s0) /* 194AA4 802661C4 0051102A */ slt $v0, $v0, $s1 /* 194AA8 802661C8 1040001B */ beqz $v0, .L80266238 /* 194AAC 802661CC 2403000D */ addiu $v1, $zero, 0xD /* 194AB0 802661D0 00121600 */ sll $v0, $s2, 24 /* 194AB4 802661D4 00021603 */ sra $v0, $v0, 24 /* 194AB8 802661D8 2842000A */ slti $v0, $v0, 0xA /* 194ABC 802661DC A2030216 */ sb $v1, 0x216($s0) /* 194AC0 802661E0 14400003 */ bnez $v0, .L802661F0 /* 194AC4 802661E4 A2120217 */ sb $s2, 0x217($s0) /* 194AC8 802661E8 24020009 */ addiu $v0, $zero, 0x9 /* 194ACC 802661EC A2020217 */ sb $v0, 0x217($s0) .L802661F0: /* 194AD0 802661F0 0809988E */ j .L80266238 /* 194AD4 802661F4 A203021C */ sb $v1, 0x21C($s0) glabel .L802661F8 /* 194AD8 802661F8 86030192 */ lh $v1, 0x192($s0) /* 194ADC 802661FC 24020100 */ addiu $v0, $zero, 0x100 /* 194AE0 80266200 1062000D */ beq $v1, $v0, .L80266238 /* 194AE4 80266204 2403000E */ addiu $v1, $zero, 0xE /* 194AE8 80266208 00121600 */ sll $v0, $s2, 24 /* 194AEC 8026620C 00021603 */ sra $v0, $v0, 24 /* 194AF0 80266210 2842000A */ slti $v0, $v0, 0xA /* 194AF4 80266214 A2030218 */ sb $v1, 0x218($s0) /* 194AF8 80266218 14400003 */ bnez $v0, .L80266228 /* 194AFC 8026621C A2120219 */ sb $s2, 0x219($s0) /* 194B00 80266220 24020009 */ addiu $v0, $zero, 0x9 /* 194B04 80266224 A2020219 */ sb $v0, 0x219($s0) .L80266228: /* 194B08 80266228 86040436 */ lh $a0, 0x436($s0) /* 194B0C 8026622C 2405000E */ addiu $a1, $zero, 0xE /* 194B10 80266230 0C011E8C */ jal create_status_transparent /* 194B14 80266234 A203021C */ sb $v1, 0x21C($s0) glabel .L80266238 /* 194B18 80266238 24020001 */ addiu $v0, $zero, 0x1 .L8026623C: /* 194B1C 8026623C 8FBF0024 */ lw $ra, 0x24($sp) /* 194B20 80266240 8FB20020 */ lw $s2, 0x20($sp) /* 194B24 80266244 8FB1001C */ lw $s1, 0x1C($sp) /* 194B28 80266248 8FB00018 */ lw $s0, 0x18($sp) /* 194B2C 8026624C 03E00008 */ jr $ra /* 194B30 80266250 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) { BattleStatus* battleStatus = &gBattleStatus; EffectInstance* effect; switch (statusTypeKey) { case STATUS_KEY_FEAR: case STATUS_KEY_DIZZY: case STATUS_KEY_PARALYZE: case STATUS_KEY_SLEEP: case STATUS_KEY_FROZEN: case STATUS_KEY_STOP: case STATUS_KEY_POISON: case STATUS_KEY_SHRINK: if (target->actorID != ACTOR_PLAYER || (!is_ability_active(ABILITY_FEELING_FINE) && !is_ability_active(ABILITY_BERSERKER) && battleStatus->hustleTurns == 0)) { if (target->actorID != ACTOR_PARTNER) { if (target->debuff != statusTypeKey) { target->statusAfflicted = statusTypeKey; } target->disableEffect->data.disableX->koDuration = 0; target->debuff = statusTypeKey; target->debuffDuration = duration; if ((s8)duration > 9) { target->debuffDuration = 9; } switch (statusTypeKey) { case STATUS_KEY_FROZEN: if (target->actorID != ACTOR_PARTNER) { effect = target->icePillarEffect; if (effect != NULL) { effect->flags |= FX_INSTANCE_FLAG_DISMISS; } target->icePillarEffect = fx_ice_pillar(0, target->currentPos.x, target->currentPos.y, target->currentPos.z, 1.0f, 0); create_status_debuff(target->hudElementDataIndex, STATUS_KEY_FROZEN); } return TRUE; case STATUS_KEY_SLEEP: set_actor_pal_adjustment(target, PAL_ADJUST_SLEEP); create_status_debuff(target->hudElementDataIndex, STATUS_KEY_SLEEP); return TRUE; case STATUS_KEY_PARALYZE: set_actor_pal_adjustment(target, PAL_ADJUST_PARALYZE); create_status_debuff(target->hudElementDataIndex, STATUS_KEY_PARALYZE); return TRUE; case STATUS_KEY_DIZZY: create_status_debuff(target->hudElementDataIndex, STATUS_KEY_DIZZY); return TRUE; case STATUS_KEY_FEAR: set_actor_pal_adjustment(target, PAL_ADJUST_FEAR); create_status_debuff(target->hudElementDataIndex, STATUS_KEY_FEAR); return TRUE; case STATUS_KEY_POISON: set_actor_pal_adjustment(target, PAL_ADJUST_POISON); create_status_debuff(target->hudElementDataIndex, STATUS_KEY_POISON); return TRUE; case STATUS_KEY_SHRINK: create_status_debuff(target->hudElementDataIndex, STATUS_KEY_SHRINK); return TRUE; } } return TRUE; } else { return FALSE; } break; case STATUS_KEY_STATIC: if (target->actorID != ACTOR_PARTNER) { target->staticStatus = statusTypeKey; target->staticDuration = duration; if ((s8)duration > 9) { target->staticDuration = 9; } target->statusAfflicted = STATUS_KEY_STATIC; set_actor_pal_adjustment(target, PAL_ADJUST_STATIC); create_status_static(target->hudElementDataIndex, STATUS_KEY_STATIC); } return TRUE; case STATUS_KEY_STONE: if (target->actorID != ACTOR_PARTNER) { target->stoneStatus = STATUS_KEY_STONE; target->stoneDuration = duration; if ((s8)duration > 9) { target->stoneDuration = 9; } target->statusAfflicted = STATUS_KEY_STONE; } return TRUE; case STATUS_KEY_DAZE: if (target->koStatus < statusTypeKey) { target->koStatus = STATUS_KEY_DAZE; target->koDuration = duration; if ((s8)duration > 9) { target->koDuration = 9; } target->statusAfflicted = STATUS_KEY_DAZE; } return TRUE; case STATUS_KEY_TRANSPARENT: if (target->actorID != ACTOR_PARTNER) { target->transparentStatus = STATUS_KEY_TRANSPARENT; target->transparentDuration = duration; if ((s8)duration > 9) { target->transparentDuration = 9; } target->statusAfflicted = STATUS_KEY_TRANSPARENT; create_status_transparent(target->hudElementDataIndex, STATUS_KEY_TRANSPARENT); } return TRUE; case 0: case STATUS_KEY_NORMAL: case STATUS_KEY_DEFAULT: default: return TRUE; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel sparkles_update /* 33778C E002254C 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 337790 E0022550 AFB50024 */ sw $s5, 0x24($sp) /* 337794 E0022554 0080A82D */ daddu $s5, $a0, $zero /* 337798 E0022558 AFBF0034 */ sw $ra, 0x34($sp) /* 33779C E002255C AFBE0030 */ sw $fp, 0x30($sp) /* 3377A0 E0022560 AFB7002C */ sw $s7, 0x2C($sp) /* 3377A4 E0022564 AFB60028 */ sw $s6, 0x28($sp) /* 3377A8 E0022568 AFB40020 */ sw $s4, 0x20($sp) /* 3377AC E002256C AFB3001C */ sw $s3, 0x1C($sp) /* 3377B0 E0022570 AFB20018 */ sw $s2, 0x18($sp) /* 3377B4 E0022574 AFB10014 */ sw $s1, 0x14($sp) /* 3377B8 E0022578 AFB00010 */ sw $s0, 0x10($sp) /* 3377BC E002257C F7BC0058 */ sdc1 $f28, 0x58($sp) /* 3377C0 E0022580 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 3377C4 E0022584 F7B80048 */ sdc1 $f24, 0x48($sp) /* 3377C8 E0022588 F7B60040 */ sdc1 $f22, 0x40($sp) /* 3377CC E002258C F7B40038 */ sdc1 $f20, 0x38($sp) /* 3377D0 E0022590 8EA4000C */ lw $a0, 0xC($s5) /* 3377D4 E0022594 0000A02D */ daddu $s4, $zero, $zero /* 3377D8 E0022598 0080F02D */ daddu $fp, $a0, $zero /* 3377DC E002259C 8C830020 */ lw $v1, 0x20($a0) /* 3377E0 E00225A0 8C820024 */ lw $v0, 0x24($a0) /* 3377E4 E00225A4 8C930000 */ lw $s3, 0x0($a0) /* 3377E8 E00225A8 24630001 */ addiu $v1, $v1, 0x1 /* 3377EC E00225AC 0060902D */ daddu $s2, $v1, $zero /* 3377F0 E00225B0 2442FFFF */ addiu $v0, $v0, -0x1 /* 3377F4 E00225B4 AC820024 */ sw $v0, 0x24($a0) /* 3377F8 E00225B8 12600004 */ beqz $s3, .LE00225CC /* 3377FC E00225BC AC920020 */ sw $s2, 0x20($a0) /* 337800 E00225C0 2402000A */ addiu $v0, $zero, 0xA /* 337804 E00225C4 56620004 */ bnel $s3, $v0, .LE00225D8 /* 337808 E00225C8 24840030 */ addiu $a0, $a0, 0x30 .LE00225CC: /* 33780C E00225CC 8C820024 */ lw $v0, 0x24($a0) /* 337810 E00225D0 044000D0 */ bltz $v0, .LE0022914 /* 337814 E00225D4 24840030 */ addiu $a0, $a0, 0x30 .LE00225D8: /* 337818 E00225D8 8EA20008 */ lw $v0, 0x8($s5) /* 33781C E00225DC 2442FFFF */ addiu $v0, $v0, -0x1 /* 337820 E00225E0 184000C3 */ blez $v0, .LE00228F0 /* 337824 E00225E4 0000882D */ daddu $s1, $zero, $zero /* 337828 E00225E8 2417000A */ addiu $s7, $zero, 0xA /* 33782C E00225EC 3C16E002 */ lui $s6, %hi(D_E0022D1C) /* 337830 E00225F0 26D62D1C */ addiu $s6, $s6, %lo(D_E0022D1C) /* 337834 E00225F4 2490001C */ addiu $s0, $a0, 0x1C /* 337838 E00225F8 3C01E002 */ lui $at, (0xE0022D58 >> 16) /* 33783C E00225FC D43A2D58 */ ldc1 $f26, (0xE0022D58 & 0xFFFF)($at) /* 337840 E0022600 3C01E002 */ lui $at, (0xE0022D60 >> 16) /* 337844 E0022604 D43C2D60 */ ldc1 $f28, (0xE0022D60 & 0xFFFF)($at) /* 337848 E0022608 3C01E002 */ lui $at, (0xE0022D68 >> 16) /* 33784C E002260C D4382D68 */ ldc1 $f24, (0xE0022D68 & 0xFFFF)($at) .LE0022610: /* 337850 E0022610 02511021 */ addu $v0, $s2, $s1 /* 337854 E0022614 30420007 */ andi $v0, $v0, 0x7 /* 337858 E0022618 12600005 */ beqz $s3, .LE0022630 /* 33785C E002261C AE020010 */ sw $v0, 0x10($s0) /* 337860 E0022620 12770057 */ beq $s3, $s7, .LE0022780 /* 337864 E0022624 00000000 */ nop /* 337868 E0022628 08008A00 */ j .LE0022800 /* 33786C E002262C 00000000 */ nop .LE0022630: /* 337870 E0022630 C600FFFC */ lwc1 $f0, -0x4($s0) /* 337874 E0022634 3C01E002 */ lui $at, (0xE0022D70 >> 16) /* 337878 E0022638 D4222D70 */ ldc1 $f2, (0xE0022D70 & 0xFFFF)($at) /* 33787C E002263C 46000021 */ cvt.d.s $f0, $f0 /* 337880 E0022640 46220000 */ add.d $f0, $f0, $f2 /* 337884 E0022644 2644FFFF */ addiu $a0, $s2, -0x1 /* 337888 E0022648 28820007 */ slti $v0, $a0, 0x7 /* 33788C E002264C 46200020 */ cvt.s.d $f0, $f0 /* 337890 E0022650 10400029 */ beqz $v0, .LE00226F8 /* 337894 E0022654 E600FFFC */ swc1 $f0, -0x4($s0) /* 337898 E0022658 3C03E002 */ lui $v1, %hi(D_E0022D14) /* 33789C E002265C 24632D14 */ addiu $v1, $v1, %lo(D_E0022D14) /* 3378A0 E0022660 00831821 */ addu $v1, $a0, $v1 /* 3378A4 E0022664 90620000 */ lbu $v0, 0x0($v1) /* 3378A8 E0022668 C600FFF4 */ lwc1 $f0, -0xC($s0) /* 3378AC E002266C 44821000 */ mtc1 $v0, $f2 /* 3378B0 E0022670 00000000 */ nop /* 3378B4 E0022674 468010A0 */ cvt.s.w $f2, $f2 /* 3378B8 E0022678 46020002 */ mul.s $f0, $f0, $f2 /* 3378BC E002267C 00000000 */ nop /* 3378C0 E0022680 46000021 */ cvt.d.s $f0, $f0 /* 3378C4 E0022684 463A0002 */ mul.d $f0, $f0, $f26 /* 3378C8 E0022688 00000000 */ nop /* 3378CC E002268C 46200020 */ cvt.s.d $f0, $f0 /* 3378D0 E0022690 E600FFE8 */ swc1 $f0, -0x18($s0) /* 3378D4 E0022694 90620000 */ lbu $v0, 0x0($v1) /* 3378D8 E0022698 C602FFF8 */ lwc1 $f2, -0x8($s0) /* 3378DC E002269C 44820000 */ mtc1 $v0, $f0 /* 3378E0 E00226A0 00000000 */ nop /* 3378E4 E00226A4 46800020 */ cvt.s.w $f0, $f0 /* 3378E8 E00226A8 46001082 */ mul.s $f2, $f2, $f0 /* 3378EC E00226AC 00000000 */ nop /* 3378F0 E00226B0 460010A1 */ cvt.d.s $f2, $f2 /* 3378F4 E00226B4 463A1082 */ mul.d $f2, $f2, $f26 /* 3378F8 E00226B8 00000000 */ nop /* 3378FC E00226BC C600FFFC */ lwc1 $f0, -0x4($s0) /* 337900 E00226C0 46000021 */ cvt.d.s $f0, $f0 /* 337904 E00226C4 46201080 */ add.d $f2, $f2, $f0 /* 337908 E00226C8 00961021 */ addu $v0, $a0, $s6 /* 33790C E00226CC 462010A0 */ cvt.s.d $f2, $f2 /* 337910 E00226D0 E602FFEC */ swc1 $f2, -0x14($s0) /* 337914 E00226D4 90420000 */ lbu $v0, 0x0($v0) /* 337918 E00226D8 44820000 */ mtc1 $v0, $f0 /* 33791C E00226DC 00000000 */ nop /* 337920 E00226E0 46800020 */ cvt.s.w $f0, $f0 /* 337924 E00226E4 46000021 */ cvt.d.s $f0, $f0 /* 337928 E00226E8 463A0002 */ mul.d $f0, $f0, $f26 /* 33792C E00226EC 00000000 */ nop /* 337930 E00226F0 08008A35 */ j .LE00228D4 /* 337934 E00226F4 46200020 */ cvt.s.d $f0, $f0 .LE00226F8: /* 337938 E00226F8 24040168 */ addiu $a0, $zero, 0x168 /* 33793C E00226FC 0C080011 */ jal func_E0200044 /* 337940 E0022700 262500B1 */ addiu $a1, $s1, 0xB1 /* 337944 E0022704 32230003 */ andi $v1, $s1, 0x3 /* 337948 E0022708 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 33794C E002270C 44810000 */ mtc1 $at, $f0 /* 337950 E0022710 4483A000 */ mtc1 $v1, $f20 /* 337954 E0022714 00000000 */ nop /* 337958 E0022718 4680A520 */ cvt.s.w $f20, $f20 /* 33795C E002271C 4600A502 */ mul.s $f20, $f20, $f0 /* 337960 E0022720 00000000 */ nop /* 337964 E0022724 4482B000 */ mtc1 $v0, $f22 /* 337968 E0022728 00000000 */ nop /* 33796C E002272C 4680B5A0 */ cvt.s.w $f22, $f22 /* 337970 E0022730 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 337974 E0022734 44810000 */ mtc1 $at, $f0 /* 337978 E0022738 4600B306 */ mov.s $f12, $f22 /* 33797C E002273C 4600A500 */ add.s $f20, $f20, $f0 /* 337980 E0022740 0C080140 */ jal shim_sin_deg /* 337984 E0022744 AFD70000 */ sw $s7, 0x0($fp) /* 337988 E0022748 4600A002 */ mul.s $f0, $f20, $f0 /* 33798C E002274C 00000000 */ nop /* 337990 E0022750 4600B306 */ mov.s $f12, $f22 /* 337994 E0022754 0C080144 */ jal shim_cos_deg /* 337998 E0022758 E600FFF4 */ swc1 $f0, -0xC($s0) /* 33799C E002275C 4600A502 */ mul.s $f20, $f20, $f0 /* 3379A0 E0022760 00000000 */ nop /* 3379A4 E0022764 3C01BD4C */ lui $at, (0xBD4CCCCD >> 16) /* 3379A8 E0022768 3421CCCD */ ori $at, $at, (0xBD4CCCCD & 0xFFFF) /* 3379AC E002276C 44810000 */ mtc1 $at, $f0 /* 3379B0 E0022770 00000000 */ nop /* 3379B4 E0022774 E600FFFC */ swc1 $f0, -0x4($s0) /* 3379B8 E0022778 08008A36 */ j .LE00228D8 /* 3379BC E002277C E614FFF8 */ swc1 $f20, -0x8($s0) .LE0022780: /* 3379C0 E0022780 C600FFF4 */ lwc1 $f0, -0xC($s0) /* 3379C4 E0022784 46000021 */ cvt.d.s $f0, $f0 /* 3379C8 E0022788 463C0002 */ mul.d $f0, $f0, $f28 /* 3379CC E002278C 00000000 */ nop /* 3379D0 E0022790 C602FFF8 */ lwc1 $f2, -0x8($s0) /* 3379D4 E0022794 460010A1 */ cvt.d.s $f2, $f2 /* 3379D8 E0022798 463C1082 */ mul.d $f2, $f2, $f28 /* 3379DC E002279C 00000000 */ nop /* 3379E0 E00227A0 C6040000 */ lwc1 $f4, 0x0($s0) /* 3379E4 E00227A4 46002121 */ cvt.d.s $f4, $f4 /* 3379E8 E00227A8 4624C181 */ sub.d $f6, $f24, $f4 /* 3379EC E00227AC 46383182 */ mul.d $f6, $f6, $f24 /* 3379F0 E00227B0 00000000 */ nop /* 3379F4 E00227B4 C608FFE8 */ lwc1 $f8, -0x18($s0) /* 3379F8 E00227B8 46200020 */ cvt.s.d $f0, $f0 /* 3379FC E00227BC E600FFF4 */ swc1 $f0, -0xC($s0) /* 337A00 E00227C0 C600FFFC */ lwc1 $f0, -0x4($s0) /* 337A04 E00227C4 462010A0 */ cvt.s.d $f2, $f2 /* 337A08 E00227C8 46001000 */ add.s $f0, $f2, $f0 /* 337A0C E00227CC C60AFFF4 */ lwc1 $f10, -0xC($s0) /* 337A10 E00227D0 460A4200 */ add.s $f8, $f8, $f10 /* 337A14 E00227D4 E602FFF8 */ swc1 $f2, -0x8($s0) /* 337A18 E00227D8 46262100 */ add.d $f4, $f4, $f6 /* 337A1C E00227DC E600FFF8 */ swc1 $f0, -0x8($s0) /* 337A20 E00227E0 C600FFEC */ lwc1 $f0, -0x14($s0) /* 337A24 E00227E4 C602FFF8 */ lwc1 $f2, -0x8($s0) /* 337A28 E00227E8 E608FFE8 */ swc1 $f8, -0x18($s0) /* 337A2C E00227EC 46020000 */ add.s $f0, $f0, $f2 /* 337A30 E00227F0 46202120 */ cvt.s.d $f4, $f4 /* 337A34 E00227F4 E6040000 */ swc1 $f4, 0x0($s0) /* 337A38 E00227F8 08008A36 */ j .LE00228D8 /* 337A3C E00227FC E600FFEC */ swc1 $f0, -0x14($s0) .LE0022800: /* 337A40 E0022800 C600FFF4 */ lwc1 $f0, -0xC($s0) /* 337A44 E0022804 3C01E002 */ lui $at, (0xE0022D78 >> 16) /* 337A48 E0022808 D4222D78 */ ldc1 $f2, (0xE0022D78 & 0xFFFF)($at) /* 337A4C E002280C 46000021 */ cvt.d.s $f0, $f0 /* 337A50 E0022810 46220002 */ mul.d $f0, $f0, $f2 /* 337A54 E0022814 00000000 */ nop /* 337A58 E0022818 C604FFF8 */ lwc1 $f4, -0x8($s0) /* 337A5C E002281C C602FFFC */ lwc1 $f2, -0x4($s0) /* 337A60 E0022820 46022100 */ add.s $f4, $f4, $f2 /* 337A64 E0022824 8E020008 */ lw $v0, 0x8($s0) /* 337A68 E0022828 E604FFF8 */ swc1 $f4, -0x8($s0) /* 337A6C E002282C 46200020 */ cvt.s.d $f0, $f0 /* 337A70 E0022830 E600FFF4 */ swc1 $f0, -0xC($s0) /* 337A74 E0022834 04410002 */ bgez $v0, .LE0022840 /* 337A78 E0022838 46000086 */ mov.s $f2, $f0 /* 337A7C E002283C 26940001 */ addiu $s4, $s4, 0x1 .LE0022840: /* 337A80 E0022840 C600FFE8 */ lwc1 $f0, -0x18($s0) /* 337A84 E0022844 8E020008 */ lw $v0, 0x8($s0) /* 337A88 E0022848 46020000 */ add.s $f0, $f0, $f2 /* 337A8C E002284C C602FFEC */ lwc1 $f2, -0x14($s0) /* 337A90 E0022850 2442FFFF */ addiu $v0, $v0, -0x1 /* 337A94 E0022854 AE020008 */ sw $v0, 0x8($s0) /* 337A98 E0022858 46041080 */ add.s $f2, $f2, $f4 /* 337A9C E002285C 2C420015 */ sltiu $v0, $v0, 0x15 /* 337AA0 E0022860 E600FFE8 */ swc1 $f0, -0x18($s0) /* 337AA4 E0022864 14400004 */ bnez $v0, .LE0022878 /* 337AA8 E0022868 E602FFEC */ swc1 $f2, -0x14($s0) /* 337AAC E002286C 2402FFFF */ addiu $v0, $zero, -0x1 /* 337AB0 E0022870 08008A36 */ j .LE00228D8 /* 337AB4 E0022874 AE020010 */ sw $v0, 0x10($s0) .LE0022878: /* 337AB8 E0022878 8E030004 */ lw $v1, 0x4($s0) /* 337ABC E002287C 24620001 */ addiu $v0, $v1, 0x1 /* 337AC0 E0022880 0040902D */ daddu $s2, $v0, $zero /* 337AC4 E0022884 28620007 */ slti $v0, $v1, 0x7 /* 337AC8 E0022888 1040000B */ beqz $v0, .LE00228B8 /* 337ACC E002288C AE120004 */ sw $s2, 0x4($s0) /* 337AD0 E0022890 00761021 */ addu $v0, $v1, $s6 /* 337AD4 E0022894 90420000 */ lbu $v0, 0x0($v0) /* 337AD8 E0022898 44820000 */ mtc1 $v0, $f0 /* 337ADC E002289C 00000000 */ nop /* 337AE0 E00228A0 46800020 */ cvt.s.w $f0, $f0 /* 337AE4 E00228A4 46000021 */ cvt.d.s $f0, $f0 /* 337AE8 E00228A8 463A0002 */ mul.d $f0, $f0, $f26 /* 337AEC E00228AC 00000000 */ nop /* 337AF0 E00228B0 08008A35 */ j .LE00228D4 /* 337AF4 E00228B4 46200020 */ cvt.s.d $f0, $f0 .LE00228B8: /* 337AF8 E00228B8 C6000000 */ lwc1 $f0, 0x0($s0) /* 337AFC E00228BC 46000021 */ cvt.d.s $f0, $f0 /* 337B00 E00228C0 4620C081 */ sub.d $f2, $f24, $f0 /* 337B04 E00228C4 46381082 */ mul.d $f2, $f2, $f24 /* 337B08 E00228C8 00000000 */ nop /* 337B0C E00228CC 46220000 */ add.d $f0, $f0, $f2 /* 337B10 E00228D0 46200020 */ cvt.s.d $f0, $f0 .LE00228D4: /* 337B14 E00228D4 E6000000 */ swc1 $f0, 0x0($s0) .LE00228D8: /* 337B18 E00228D8 26310001 */ addiu $s1, $s1, 0x1 /* 337B1C E00228DC 8EA20008 */ lw $v0, 0x8($s5) /* 337B20 E00228E0 2442FFFF */ addiu $v0, $v0, -0x1 /* 337B24 E00228E4 0222102A */ slt $v0, $s1, $v0 /* 337B28 E00228E8 1440FF49 */ bnez $v0, .LE0022610 /* 337B2C E00228EC 26100030 */ addiu $s0, $s0, 0x30 .LE00228F0: /* 337B30 E00228F0 1260000A */ beqz $s3, .LE002291C /* 337B34 E00228F4 2402000A */ addiu $v0, $zero, 0xA /* 337B38 E00228F8 12620008 */ beq $s3, $v0, .LE002291C /* 337B3C E00228FC 00000000 */ nop /* 337B40 E0022900 8EA20008 */ lw $v0, 0x8($s5) /* 337B44 E0022904 2442FFFF */ addiu $v0, $v0, -0x1 /* 337B48 E0022908 0282102A */ slt $v0, $s4, $v0 /* 337B4C E002290C 14400003 */ bnez $v0, .LE002291C /* 337B50 E0022910 00000000 */ nop .LE0022914: /* 337B54 E0022914 0C080128 */ jal shim_remove_effect /* 337B58 E0022918 02A0202D */ daddu $a0, $s5, $zero .LE002291C: /* 337B5C E002291C 8FBF0034 */ lw $ra, 0x34($sp) /* 337B60 E0022920 8FBE0030 */ lw $fp, 0x30($sp) /* 337B64 E0022924 8FB7002C */ lw $s7, 0x2C($sp) /* 337B68 E0022928 8FB60028 */ lw $s6, 0x28($sp) /* 337B6C E002292C 8FB50024 */ lw $s5, 0x24($sp) /* 337B70 E0022930 8FB40020 */ lw $s4, 0x20($sp) /* 337B74 E0022934 8FB3001C */ lw $s3, 0x1C($sp) /* 337B78 E0022938 8FB20018 */ lw $s2, 0x18($sp) /* 337B7C E002293C 8FB10014 */ lw $s1, 0x14($sp) /* 337B80 E0022940 8FB00010 */ lw $s0, 0x10($sp) /* 337B84 E0022944 D7BC0058 */ ldc1 $f28, 0x58($sp) /* 337B88 E0022948 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 337B8C E002294C D7B80048 */ ldc1 $f24, 0x48($sp) /* 337B90 E0022950 D7B60040 */ ldc1 $f22, 0x40($sp) /* 337B94 E0022954 D7B40038 */ ldc1 $f20, 0x38($sp) /* 337B98 E0022958 03E00008 */ jr $ra /* 337B9C E002295C 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void sparkles_update(EffectInstance *effect) { SparklesFXData* part = effect->data.sparkles; SparklesFXData* firstPart = part; s32 unk_00 = part->unk_00; f32 unk_10; f32 unk_14; s32 unk_20; s32 count = 0; f32 temp_f20; f32 angle; s32 i; part->unk_24--; part->unk_20++; unk_20 = part->unk_20; if ((unk_00 == 0 || unk_00 == 10) && part->unk_24 < 0) { shim_remove_effect(effect); return; } part++; for (i = 0; i < effect->numParts - 1; i++, part++) { part->unk_2C = (unk_20 + i) & 7; switch (unk_00) { case 0: part->unk_18 += -0.02; if (unk_20 - 1 < 7) { part->unk_04 = part->unk_10 * D_E0022D14[unk_20 - 1] * 0.01; part->unk_08 = part->unk_14 * D_E0022D14[unk_20 - 1] * 0.01 + part->unk_18; part->unk_1C = (f32) D_E0022D1C[unk_20 - 1] * 0.01; } else { angle = func_E0200044(360, i + 177); temp_f20 = (i & 3) * 0.5f + 1.0f; firstPart->unk_00 = 10; part->unk_10 = temp_f20 * shim_sin_deg(angle); part->unk_14 = temp_f20 * shim_cos_deg(angle); part->unk_18 = -0.05f; } break; case 10: part->unk_10 *= 0.96; part->unk_1C += (0.1 - part->unk_1C) * 0.1; part->unk_14 *= 0.96; part->unk_14 += part->unk_18; part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; break; default: part->unk_10 *= 0.9; part->unk_14 += part->unk_18; unk_10 = part->unk_10; unk_14 = part->unk_14; if (part->unk_24 < 0) { count++; } part->unk_04 += unk_10; part->unk_08 += unk_14; part->unk_24--; if (part->unk_24 < 0 || part->unk_24 >= 21) { part->unk_2C = -1; } else { part->unk_20++; unk_20 = part->unk_20; if (unk_20 - 1 < 7) { part->unk_1C = (f32) D_E0022D1C[unk_20 - 1] * 0.01; } else { part->unk_1C += (0.1 - part->unk_1C) * 0.1; } } break; } } if (unk_00 != 0 && unk_00 != 10 && count >= effect->numParts - 1) { shim_remove_effect(effect); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel imgfx_update /* D119C 8013AA9C 27BDFFE0 */ addiu $sp, $sp, -0x20 /* D11A0 8013AAA0 AFB00010 */ sw $s0, 0x10($sp) /* D11A4 8013AAA4 00C0802D */ daddu $s0, $a2, $zero /* D11A8 8013AAA8 00041140 */ sll $v0, $a0, 5 /* D11AC 8013AAAC 00441023 */ subu $v0, $v0, $a0 /* D11B0 8013AAB0 3C038015 */ lui $v1, %hi(ImgFXInstances) /* D11B4 8013AAB4 8C636954 */ lw $v1, %lo(ImgFXInstances)($v1) /* D11B8 8013AAB8 8FA80030 */ lw $t0, 0x30($sp) /* D11BC 8013AABC 8FA60034 */ lw $a2, 0x34($sp) /* D11C0 8013AAC0 00021080 */ sll $v0, $v0, 2 /* D11C4 8013AAC4 AFBF001C */ sw $ra, 0x1C($sp) /* D11C8 8013AAC8 AFB20018 */ sw $s2, 0x18($sp) /* D11CC 8013AACC AFB10014 */ sw $s1, 0x14($sp) /* D11D0 8013AAD0 00628821 */ addu $s1, $v1, $v0 /* D11D4 8013AAD4 8E220014 */ lw $v0, 0x14($s1) /* D11D8 8013AAD8 8FB20038 */ lw $s2, 0x38($sp) /* D11DC 8013AADC 30420001 */ andi $v0, $v0, 0x1 /* D11E0 8013AAE0 10400109 */ beqz $v0, .L8013AF08 /* D11E4 8013AAE4 2C82005A */ sltiu $v0, $a0, 0x5A /* D11E8 8013AAE8 10400107 */ beqz $v0, .L8013AF08 /* D11EC 8013AAEC 2CA20012 */ sltiu $v0, $a1, 0x12 /* D11F0 8013AAF0 10400048 */ beqz $v0, .L8013AC14 /* D11F4 8013AAF4 00051080 */ sll $v0, $a1, 2 /* D11F8 8013AAF8 3C018015 */ lui $at, %hi(jtbl_80150FB0) /* D11FC 8013AAFC 00220821 */ addu $at, $at, $v0 /* D1200 8013AB00 8C220FB0 */ lw $v0, %lo(jtbl_80150FB0)($at) /* D1204 8013AB04 00400008 */ jr $v0 /* D1208 8013AB08 00000000 */ nop glabel .L8013AB0C /* D120C 8013AB0C 8E300014 */ lw $s0, 0x14($s1) /* D1210 8013AB10 0C04EA4F */ jal imgfx_cache_instance_data /* D1214 8013AB14 0220202D */ daddu $a0, $s1, $zero /* D1218 8013AB18 0C04EA7A */ jal imgfx_init_instance /* D121C 8013AB1C 0220202D */ daddu $a0, $s1, $zero /* D1220 8013AB20 2402FFFF */ addiu $v0, $zero, -0x1 /* D1224 8013AB24 A2200005 */ sb $zero, 0x5($s1) /* D1228 8013AB28 A2200006 */ sb $zero, 0x6($s1) /* D122C 8013AB2C A2200001 */ sb $zero, 0x1($s1) /* D1230 8013AB30 A2200002 */ sb $zero, 0x2($s1) /* D1234 8013AB34 AE22001C */ sw $v0, 0x1C($s1) /* D1238 8013AB38 AE22002C */ sw $v0, 0x2C($s1) /* D123C 8013AB3C AE300014 */ sw $s0, 0x14($s1) /* D1240 8013AB40 0200182D */ daddu $v1, $s0, $zero /* D1244 8013AB44 30620001 */ andi $v0, $v1, 0x1 /* D1248 8013AB48 12400002 */ beqz $s2, .L8013AB54 /* D124C 8013AB4C AE220014 */ sw $v0, 0x14($s1) /* D1250 8013AB50 00521025 */ or $v0, $v0, $s2 .L8013AB54: /* D1254 8013AB54 0804EBC2 */ j .L8013AF08 /* D1258 8013AB58 AE220014 */ sw $v0, 0x14($s1) glabel .L8013AB5C /* D125C 8013AB5C 2402FFFF */ addiu $v0, $zero, -0x1 /* D1260 8013AB60 A2200005 */ sb $zero, 0x5($s1) /* D1264 8013AB64 A2200002 */ sb $zero, 0x2($s1) /* D1268 8013AB68 0804EBC2 */ j .L8013AF08 /* D126C 8013AB6C AE22001C */ sw $v0, 0x1C($s1) glabel .L8013AB70 /* D1270 8013AB70 2402FFFF */ addiu $v0, $zero, -0x1 /* D1274 8013AB74 A2200006 */ sb $zero, 0x6($s1) /* D1278 8013AB78 A2200001 */ sb $zero, 0x1($s1) /* D127C 8013AB7C 0804EBC2 */ j .L8013AF08 /* D1280 8013AB80 AE22002C */ sw $v0, 0x2C($s1) glabel .L8013AB84 /* D1284 8013AB84 8E24005C */ lw $a0, 0x5C($s1) /* D1288 8013AB88 10800004 */ beqz $a0, .L8013AB9C /* D128C 8013AB8C 00101080 */ sll $v0, $s0, 2 /* D1290 8013AB90 0C00AB4B */ jal heap_free /* D1294 8013AB94 00000000 */ nop /* D1298 8013AB98 00101080 */ sll $v0, $s0, 2 .L8013AB9C: /* D129C 8013AB9C A6220060 */ sh $v0, 0x60($s1) /* D12A0 8013ABA0 0C00AB39 */ jal heap_malloc /* D12A4 8013ABA4 3044FFFF */ andi $a0, $v0, 0xFFFF /* D12A8 8013ABA8 0804EBC2 */ j .L8013AF08 /* D12AC 8013ABAC AE22005C */ sw $v0, 0x5C($s1) glabel .L8013ABB0 /* D12B0 8013ABB0 82220006 */ lb $v0, 0x6($s1) /* D12B4 8013ABB4 14A20021 */ bne $a1, $v0, .L8013AC3C /* D12B8 8013ABB8 24030005 */ addiu $v1, $zero, 0x5 /* D12BC 8013ABBC 8E22002C */ lw $v0, 0x2C($s1) /* D12C0 8013ABC0 1602001E */ bne $s0, $v0, .L8013AC3C /* D12C4 8013ABC4 00000000 */ nop /* D12C8 8013ABC8 8E220030 */ lw $v0, 0x30($s1) /* D12CC 8013ABCC 10E200CE */ beq $a3, $v0, .L8013AF08 /* D12D0 8013ABD0 00000000 */ nop /* D12D4 8013ABD4 0804EB0F */ j .L8013AC3C /* D12D8 8013ABD8 00000000 */ nop glabel .L8013ABDC /* D12DC 8013ABDC 82220005 */ lb $v0, 0x5($s1) /* D12E0 8013ABE0 14450016 */ bne $v0, $a1, .L8013AC3C /* D12E4 8013ABE4 24030005 */ addiu $v1, $zero, 0x5 /* D12E8 8013ABE8 8E22001C */ lw $v0, 0x1C($s1) /* D12EC 8013ABEC 14500013 */ bne $v0, $s0, .L8013AC3C /* D12F0 8013ABF0 00000000 */ nop /* D12F4 8013ABF4 8E220020 */ lw $v0, 0x20($s1) /* D12F8 8013ABF8 14470010 */ bne $v0, $a3, .L8013AC3C /* D12FC 8013ABFC 00000000 */ nop /* D1300 8013AC00 8E220024 */ lw $v0, 0x24($s1) /* D1304 8013AC04 104800C0 */ beq $v0, $t0, .L8013AF08 /* D1308 8013AC08 00000000 */ nop /* D130C 8013AC0C 0804EB0F */ j .L8013AC3C /* D1310 8013AC10 00000000 */ nop glabel .L8013AC14 /* D1314 8013AC14 2403000D */ addiu $v1, $zero, 0xD /* D1318 8013AC18 50A30008 */ beql $a1, $v1, .L8013AC3C /* D131C 8013AC1C 24030005 */ addiu $v1, $zero, 0x5 /* D1320 8013AC20 82220006 */ lb $v0, 0x6($s1) /* D1324 8013AC24 14430005 */ bne $v0, $v1, .L8013AC3C /* D1328 8013AC28 24030005 */ addiu $v1, $zero, 0x5 /* D132C 8013AC2C 24020001 */ addiu $v0, $zero, 0x1 /* D1330 8013AC30 A2200001 */ sb $zero, 0x1($s1) /* D1334 8013AC34 A2220003 */ sb $v0, 0x3($s1) /* D1338 8013AC38 A2220004 */ sb $v0, 0x4($s1) .L8013AC3C: /* D133C 8013AC3C 10A30005 */ beq $a1, $v1, .L8013AC54 /* D1340 8013AC40 24A2FFFC */ addiu $v0, $a1, -0x4 /* D1344 8013AC44 82220005 */ lb $v0, 0x5($s1) /* D1348 8013AC48 50430001 */ beql $v0, $v1, .L8013AC50 /* D134C 8013AC4C A2200005 */ sb $zero, 0x5($s1) .L8013AC50: /* D1350 8013AC50 24A2FFFC */ addiu $v0, $a1, -0x4 .L8013AC54: /* D1354 8013AC54 2C420002 */ sltiu $v0, $v0, 0x2 /* D1358 8013AC58 10400007 */ beqz $v0, .L8013AC78 /* D135C 8013AC5C 24A2FFFA */ addiu $v0, $a1, -0x6 /* D1360 8013AC60 A2250005 */ sb $a1, 0x5($s1) /* D1364 8013AC64 AE30001C */ sw $s0, 0x1C($s1) /* D1368 8013AC68 AE270020 */ sw $a3, 0x20($s1) /* D136C 8013AC6C AE280024 */ sw $t0, 0x24($s1) /* D1370 8013AC70 0804EB26 */ j .L8013AC98 /* D1374 8013AC74 AE260028 */ sw $a2, 0x28($s1) .L8013AC78: /* D1378 8013AC78 2C42000B */ sltiu $v0, $v0, 0xB /* D137C 8013AC7C 10400006 */ beqz $v0, .L8013AC98 /* D1380 8013AC80 00000000 */ nop /* D1384 8013AC84 A2250006 */ sb $a1, 0x6($s1) /* D1388 8013AC88 AE30002C */ sw $s0, 0x2C($s1) /* D138C 8013AC8C AE270030 */ sw $a3, 0x30($s1) /* D1390 8013AC90 AE280034 */ sw $t0, 0x34($s1) /* D1394 8013AC94 AE260038 */ sw $a2, 0x38($s1) .L8013AC98: /* D1398 8013AC98 8E220014 */ lw $v0, 0x14($s1) /* D139C 8013AC9C 30420001 */ andi $v0, $v0, 0x1 /* D13A0 8013ACA0 12400003 */ beqz $s2, .L8013ACB0 /* D13A4 8013ACA4 AE220014 */ sw $v0, 0x14($s1) /* D13A8 8013ACA8 00521025 */ or $v0, $v0, $s2 /* D13AC 8013ACAC AE220014 */ sw $v0, 0x14($s1) .L8013ACB0: /* D13B0 8013ACB0 24A5FFFD */ addiu $a1, $a1, -0x3 /* D13B4 8013ACB4 2CA2000E */ sltiu $v0, $a1, 0xE /* D13B8 8013ACB8 10400093 */ beqz $v0, .L8013AF08 /* D13BC 8013ACBC A2200001 */ sb $zero, 0x1($s1) /* D13C0 8013ACC0 00051080 */ sll $v0, $a1, 2 /* D13C4 8013ACC4 3C018015 */ lui $at, %hi(jtbl_80150FF8) /* D13C8 8013ACC8 00220821 */ addu $at, $at, $v0 /* D13CC 8013ACCC 8C220FF8 */ lw $v0, %lo(jtbl_80150FF8)($at) /* D13D0 8013ACD0 00400008 */ jr $v0 /* D13D4 8013ACD4 00000000 */ nop glabel .L8013ACD8 /* D13D8 8013ACD8 A2200001 */ sb $zero, 0x1($s1) /* D13DC 8013ACDC 0804EBC2 */ j .L8013AF08 /* D13E0 8013ACE0 A2200002 */ sb $zero, 0x2($s1) glabel .L8013ACE4 /* D13E4 8013ACE4 0220202D */ daddu $a0, $s1, $zero /* D13E8 8013ACE8 24020004 */ addiu $v0, $zero, 0x4 /* D13EC 8013ACEC A0820003 */ sb $v0, 0x3($a0) /* D13F0 8013ACF0 A0820004 */ sb $v0, 0x4($a0) /* D13F4 8013ACF4 24020001 */ addiu $v0, $zero, 0x1 /* D13F8 8013ACF8 0C04FB92 */ jal imgfx_wavy_init /* D13FC 8013ACFC A0820001 */ sb $v0, 0x1($a0) /* D1400 8013AD00 0804EBC2 */ j .L8013AF08 /* D1404 8013AD04 00000000 */ nop glabel .L8013AD08 /* D1408 8013AD08 8E230014 */ lw $v1, 0x14($s1) /* D140C 8013AD0C 24020002 */ addiu $v0, $zero, 0x2 /* D1410 8013AD10 A2220001 */ sb $v0, 0x1($s1) /* D1414 8013AD14 2402000B */ addiu $v0, $zero, 0xB /* D1418 8013AD18 A2220002 */ sb $v0, 0x2($s1) /* D141C 8013AD1C AE20003C */ sw $zero, 0x3C($s1) /* D1420 8013AD20 AE200040 */ sw $zero, 0x40($s1) /* D1424 8013AD24 34630200 */ ori $v1, $v1, 0x200 /* D1428 8013AD28 0804EBC2 */ j .L8013AF08 /* D142C 8013AD2C AE230014 */ sw $v1, 0x14($s1) glabel .L8013AD30 /* D1430 8013AD30 2A0200FF */ slti $v0, $s0, 0xFF /* D1434 8013AD34 1440000B */ bnez $v0, .L8013AD64 /* D1438 8013AD38 28C200FF */ slti $v0, $a2, 0xFF /* D143C 8013AD3C 28E200FF */ slti $v0, $a3, 0xFF /* D1440 8013AD40 14400008 */ bnez $v0, .L8013AD64 /* D1444 8013AD44 28C200FF */ slti $v0, $a2, 0xFF /* D1448 8013AD48 290200FF */ slti $v0, $t0, 0xFF /* D144C 8013AD4C 14400005 */ bnez $v0, .L8013AD64 /* D1450 8013AD50 28C200FF */ slti $v0, $a2, 0xFF /* D1454 8013AD54 14400008 */ bnez $v0, .L8013AD78 /* D1458 8013AD58 2A0200FF */ slti $v0, $s0, 0xFF /* D145C 8013AD5C 0804EBC2 */ j .L8013AF08 /* D1460 8013AD60 A2200002 */ sb $zero, 0x2($s1) .L8013AD64: /* D1464 8013AD64 14400004 */ bnez $v0, .L8013AD78 /* D1468 8013AD68 2A0200FF */ slti $v0, $s0, 0xFF /* D146C 8013AD6C 24020001 */ addiu $v0, $zero, 0x1 /* D1470 8013AD70 0804EBC2 */ j .L8013AF08 /* D1474 8013AD74 A2220002 */ sb $v0, 0x2($s1) .L8013AD78: /* D1478 8013AD78 1440000A */ bnez $v0, .L8013ADA4 /* D147C 8013AD7C 24020003 */ addiu $v0, $zero, 0x3 /* D1480 8013AD80 28E200FF */ slti $v0, $a3, 0xFF /* D1484 8013AD84 14400007 */ bnez $v0, .L8013ADA4 /* D1488 8013AD88 24020003 */ addiu $v0, $zero, 0x3 /* D148C 8013AD8C 290200FF */ slti $v0, $t0, 0xFF /* D1490 8013AD90 14400004 */ bnez $v0, .L8013ADA4 /* D1494 8013AD94 24020003 */ addiu $v0, $zero, 0x3 /* D1498 8013AD98 24020002 */ addiu $v0, $zero, 0x2 /* D149C 8013AD9C 0804EBC2 */ j .L8013AF08 /* D14A0 8013ADA0 A2220002 */ sb $v0, 0x2($s1) .L8013ADA4: /* D14A4 8013ADA4 0804EBC2 */ j .L8013AF08 /* D14A8 8013ADA8 A2220002 */ sb $v0, 0x2($s1) glabel .L8013ADAC /* D14AC 8013ADAC 3C018015 */ lui $at, %hi(D_80151030) /* D14B0 8013ADB0 D4221030 */ ldc1 $f2, %lo(D_80151030)($at) /* D14B4 8013ADB4 44860000 */ mtc1 $a2, $f0 /* D14B8 8013ADB8 00000000 */ nop /* D14BC 8013ADBC 46800021 */ cvt.d.w $f0, $f0 /* D14C0 8013ADC0 46220032 */ c.eq.d $f0, $f2 /* D14C4 8013ADC4 00000000 */ nop /* D14C8 8013ADC8 45000003 */ bc1f .L8013ADD8 /* D14CC 8013ADCC 24020004 */ addiu $v0, $zero, 0x4 /* D14D0 8013ADD0 0804EBC2 */ j .L8013AF08 /* D14D4 8013ADD4 A2220002 */ sb $v0, 0x2($s1) .L8013ADD8: /* D14D8 8013ADD8 24020005 */ addiu $v0, $zero, 0x5 /* D14DC 8013ADDC 0804EBC2 */ j .L8013AF08 /* D14E0 8013ADE0 A2220002 */ sb $v0, 0x2($s1) glabel .L8013ADE4 /* D14E4 8013ADE4 96220060 */ lhu $v0, 0x60($s1) /* D14E8 8013ADE8 0202102A */ slt $v0, $s0, $v0 /* D14EC 8013ADEC 10400046 */ beqz $v0, .L8013AF08 /* D14F0 8013ADF0 00072602 */ srl $a0, $a3, 24 /* D14F4 8013ADF4 8E22005C */ lw $v0, 0x5C($s1) /* D14F8 8013ADF8 00101880 */ sll $v1, $s0, 2 /* D14FC 8013ADFC 00621021 */ addu $v0, $v1, $v0 /* D1500 8013AE00 A0440000 */ sb $a0, 0x0($v0) /* D1504 8013AE04 8E22005C */ lw $v0, 0x5C($s1) /* D1508 8013AE08 00072402 */ srl $a0, $a3, 16 /* D150C 8013AE0C 00621021 */ addu $v0, $v1, $v0 /* D1510 8013AE10 A0440001 */ sb $a0, 0x1($v0) /* D1514 8013AE14 8E22005C */ lw $v0, 0x5C($s1) /* D1518 8013AE18 00072202 */ srl $a0, $a3, 8 /* D151C 8013AE1C 00621021 */ addu $v0, $v1, $v0 /* D1520 8013AE20 A0440002 */ sb $a0, 0x2($v0) /* D1524 8013AE24 8E22005C */ lw $v0, 0x5C($s1) /* D1528 8013AE28 00621821 */ addu $v1, $v1, $v0 /* D152C 8013AE2C A0670003 */ sb $a3, 0x3($v1) /* D1530 8013AE30 30E300FF */ andi $v1, $a3, 0xFF /* D1534 8013AE34 240200FF */ addiu $v0, $zero, 0xFF /* D1538 8013AE38 14620004 */ bne $v1, $v0, .L8013AE4C /* D153C 8013AE3C A2200001 */ sb $zero, 0x1($s1) /* D1540 8013AE40 24020006 */ addiu $v0, $zero, 0x6 /* D1544 8013AE44 0804EBC2 */ j .L8013AF08 /* D1548 8013AE48 A2220002 */ sb $v0, 0x2($s1) .L8013AE4C: /* D154C 8013AE4C 24020008 */ addiu $v0, $zero, 0x8 /* D1550 8013AE50 0804EBC2 */ j .L8013AF08 /* D1554 8013AE54 A2220002 */ sb $v0, 0x2($s1) glabel .L8013AE58 /* D1558 8013AE58 96220060 */ lhu $v0, 0x60($s1) /* D155C 8013AE5C 0202102A */ slt $v0, $s0, $v0 /* D1560 8013AE60 10400029 */ beqz $v0, .L8013AF08 /* D1564 8013AE64 00072602 */ srl $a0, $a3, 24 /* D1568 8013AE68 8E22005C */ lw $v0, 0x5C($s1) /* D156C 8013AE6C 00101880 */ sll $v1, $s0, 2 /* D1570 8013AE70 00621021 */ addu $v0, $v1, $v0 /* D1574 8013AE74 A0440000 */ sb $a0, 0x0($v0) /* D1578 8013AE78 8E22005C */ lw $v0, 0x5C($s1) /* D157C 8013AE7C 00072402 */ srl $a0, $a3, 16 /* D1580 8013AE80 00621021 */ addu $v0, $v1, $v0 /* D1584 8013AE84 A0440001 */ sb $a0, 0x1($v0) /* D1588 8013AE88 8E22005C */ lw $v0, 0x5C($s1) /* D158C 8013AE8C 00072202 */ srl $a0, $a3, 8 /* D1590 8013AE90 00621021 */ addu $v0, $v1, $v0 /* D1594 8013AE94 A0440002 */ sb $a0, 0x2($v0) /* D1598 8013AE98 8E22005C */ lw $v0, 0x5C($s1) /* D159C 8013AE9C 00621821 */ addu $v1, $v1, $v0 /* D15A0 8013AEA0 A0670003 */ sb $a3, 0x3($v1) /* D15A4 8013AEA4 30E300FF */ andi $v1, $a3, 0xFF /* D15A8 8013AEA8 240200FF */ addiu $v0, $zero, 0xFF /* D15AC 8013AEAC 14620004 */ bne $v1, $v0, .L8013AEC0 /* D15B0 8013AEB0 A2200001 */ sb $zero, 0x1($s1) /* D15B4 8013AEB4 24020009 */ addiu $v0, $zero, 0x9 /* D15B8 8013AEB8 0804EBC2 */ j .L8013AF08 /* D15BC 8013AEBC A2220002 */ sb $v0, 0x2($s1) .L8013AEC0: /* D15C0 8013AEC0 2402000A */ addiu $v0, $zero, 0xA /* D15C4 8013AEC4 0804EBC2 */ j .L8013AF08 /* D15C8 8013AEC8 A2220002 */ sb $v0, 0x2($s1) glabel .L8013AECC /* D15CC 8013AECC 2402000C */ addiu $v0, $zero, 0xC /* D15D0 8013AED0 0804EBC2 */ j .L8013AF08 /* D15D4 8013AED4 A2220002 */ sb $v0, 0x2($s1) glabel .L8013AED8 /* D15D8 8013AED8 2402000D */ addiu $v0, $zero, 0xD /* D15DC 8013AEDC 0804EBC2 */ j .L8013AF08 /* D15E0 8013AEE0 A2220002 */ sb $v0, 0x2($s1) glabel .L8013AEE4 /* D15E4 8013AEE4 24020004 */ addiu $v0, $zero, 0x4 /* D15E8 8013AEE8 A2220001 */ sb $v0, 0x1($s1) /* D15EC 8013AEEC 28E200FF */ slti $v0, $a3, 0xFF /* D15F0 8013AEF0 14400002 */ bnez $v0, .L8013AEFC /* D15F4 8013AEF4 2402000F */ addiu $v0, $zero, 0xF /* D15F8 8013AEF8 2402000E */ addiu $v0, $zero, 0xE .L8013AEFC: /* D15FC 8013AEFC A2220002 */ sb $v0, 0x2($s1) /* D1600 8013AF00 AE20004C */ sw $zero, 0x4C($s1) /* D1604 8013AF04 AE200050 */ sw $zero, 0x50($s1) .L8013AF08: /* D1608 8013AF08 8FBF001C */ lw $ra, 0x1C($sp) /* D160C 8013AF0C 8FB20018 */ lw $s2, 0x18($sp) /* D1610 8013AF10 8FB10014 */ lw $s1, 0x14($sp) /* D1614 8013AF14 8FB00010 */ lw $s0, 0x10($sp) /* D1618 8013AF18 03E00008 */ jr $ra /* D161C 8013AF1C 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void imgfx_update_cache_impl(void) { s32 i; for (i = 0; i < ARRAY_COUNT(ImgFXDataCache); i++) { if (ImgFXDataCache[i].data != NULL) { ImgFXDataCache[i].staleCooldownTimer--; if (ImgFXDataCache[i].staleCooldownTimer == 0) { if (ImgFXDataCache[i].usingContextualHeap) { heap_free(ImgFXDataCache[i].data); ImgFXDataCache[i].data = NULL; } else { general_heap_free(ImgFXDataCache[i].data); ImgFXDataCache[i].data = NULL; } ImgFXDataCache[i].staleCooldownTimer = 0; ImgFXDataCache[i].usingContextualHeap = FALSE; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_demo_battle /* 4E214 80072E14 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 4E218 80072E18 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 4E21C 80072E1C 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) /* 4E220 80072E20 AFBF0018 */ sw $ra, 0x18($sp) /* 4E224 80072E24 AFB10014 */ sw $s1, 0x14($sp) /* 4E228 80072E28 AFB00010 */ sw $s0, 0x10($sp) /* 4E22C 80072E2C 8C620000 */ lw $v0, 0x0($v1) /* 4E230 80072E30 A04000AA */ sb $zero, 0xAA($v0) /* 4E234 80072E34 8C620000 */ lw $v0, 0x0($v1) /* 4E238 80072E38 0080882D */ daddu $s1, $a0, $zero /* 4E23C 80072E3C A4400086 */ sh $zero, 0x86($v0) /* 4E240 80072E40 A440008C */ sh $zero, 0x8C($v0) /* 4E244 80072E44 0C00AB00 */ jal general_heap_create /* 4E248 80072E48 A0400070 */ sb $zero, 0x70($v0) /* 4E24C 80072E4C 0C048C2E */ jal clear_worker_list /* 4E250 80072E50 00000000 */ nop /* 4E254 80072E54 0C0B0C77 */ jal clear_script_list /* 4E258 80072E58 00000000 */ nop /* 4E25C 80072E5C 0C00B7BD */ jal create_cameras_a /* 4E260 80072E60 00000000 */ nop /* 4E264 80072E64 0C0B763E */ jal spr_init_sprites /* 4E268 80072E68 0000202D */ daddu $a0, $zero, $zero /* 4E26C 80072E6C 0C047889 */ jal clear_animator_list /* 4E270 80072E70 00000000 */ nop /* 4E274 80072E74 0C0482EC */ jal clear_entity_models /* 4E278 80072E78 00000000 */ nop /* 4E27C 80072E7C 0C00E12F */ jal clear_npcs /* 4E280 80072E80 00000000 */ nop /* 4E284 80072E84 0C050440 */ jal hud_element_clear_cache /* 4E288 80072E88 00000000 */ nop /* 4E28C 80072E8C 0C0515A0 */ jal clear_trigger_data /* 4E290 80072E90 00000000 */ nop /* 4E294 80072E94 0C045751 */ jal clear_model_data /* 4E298 80072E98 00000000 */ nop /* 4E29C 80072E9C 0C052010 */ jal clear_sprite_shading_data /* 4E2A0 80072EA0 00000000 */ nop /* 4E2A4 80072EA4 0C05177E */ jal reset_background_settings /* 4E2A8 80072EA8 00000000 */ nop /* 4E2AC 80072EAC 0C04E062 */ jal func_80138188 /* 4E2B0 80072EB0 00000000 */ nop /* 4E2B4 80072EB4 0C01CACC */ jal reset_battle_status /* 4E2B8 80072EB8 00000000 */ nop /* 4E2BC 80072EBC 0C00F900 */ jal clear_encounter_status /* 4E2C0 80072EC0 00000000 */ nop /* 4E2C4 80072EC4 0C04432E */ jal clear_entity_data /* 4E2C8 80072EC8 24040001 */ addiu $a0, $zero, 0x1 /* 4E2CC 80072ECC 0C016727 */ jal clear_effect_data /* 4E2D0 80072ED0 00000000 */ nop /* 4E2D4 80072ED4 0C037F14 */ jal clear_player_status /* 4E2D8 80072ED8 00000000 */ nop /* 4E2DC 80072EDC 0C048D9D */ jal clear_printers /* 4E2E0 80072EE0 00000000 */ nop /* 4E2E4 80072EE4 0C04C3FC */ jal clear_item_entity_data /* 4E2E8 80072EE8 00000000 */ nop /* 4E2EC 80072EEC 0C039CE8 */ jal clear_player_data /* 4E2F0 80072EF0 00000000 */ nop /* 4E2F4 80072EF4 0C039E4D */ jal initialize_status_bar /* 4E2F8 80072EF8 00000000 */ nop /* 4E2FC 80072EFC 0C04C3FC */ jal clear_item_entity_data /* 4E300 80072F00 00000000 */ nop /* 4E304 80072F04 3C05437F */ lui $a1, (0x437F0000 >> 16) /* 4E308 80072F08 0C04DF62 */ jal set_screen_overlay_params_front /* 4E30C 80072F0C 24040009 */ addiu $a0, $zero, 0x9 /* 4E310 80072F10 3C108011 */ lui $s0, %hi(gPlayerData) /* 4E314 80072F14 2610F290 */ addiu $s0, $s0, %lo(gPlayerData) /* 4E318 80072F18 2E220005 */ sltiu $v0, $s1, 0x5 /* 4E31C 80072F1C 1040002D */ beqz $v0, .L80072FD4 /* 4E320 80072F20 00111080 */ sll $v0, $s1, 2 /* 4E324 80072F24 3C01800A */ lui $at, %hi(jtbl_8009A578) /* 4E328 80072F28 00220821 */ addu $at, $at, $v0 /* 4E32C 80072F2C 8C22A578 */ lw $v0, %lo(jtbl_8009A578)($at) /* 4E330 80072F30 00400008 */ jr $v0 /* 4E334 80072F34 00000000 */ nop glabel .L80072F38 /* 4E338 80072F38 0C01CB4B */ jal setup_demo_player /* 4E33C 80072F3C 24112700 */ addiu $s1, $zero, 0x2700 /* 4E340 80072F40 0000202D */ daddu $a0, $zero, $zero /* 4E344 80072F44 0801CBF8 */ j .L80072FE0 /* 4E348 80072F48 A200000A */ sb $zero, 0xA($s0) glabel .L80072F4C /* 4E34C 80072F4C 0C01CB4B */ jal setup_demo_player /* 4E350 80072F50 24112701 */ addiu $s1, $zero, 0x2701 /* 4E354 80072F54 0000202D */ daddu $a0, $zero, $zero /* 4E358 80072F58 24020009 */ addiu $v0, $zero, 0x9 /* 4E35C 80072F5C 0801CBF8 */ j .L80072FE0 /* 4E360 80072F60 A2020012 */ sb $v0, 0x12($s0) glabel .L80072F64 /* 4E364 80072F64 0C01CB4B */ jal setup_demo_player /* 4E368 80072F68 24112702 */ addiu $s1, $zero, 0x2702 /* 4E36C 80072F6C 0000202D */ daddu $a0, $zero, $zero /* 4E370 80072F70 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 4E374 80072F74 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 4E378 80072F78 24020004 */ addiu $v0, $zero, 0x4 /* 4E37C 80072F7C A2020012 */ sb $v0, 0x12($s0) /* 4E380 80072F80 906200AA */ lbu $v0, 0xAA($v1) /* 4E384 80072F84 34420002 */ ori $v0, $v0, 0x2 /* 4E388 80072F88 0801CBF8 */ j .L80072FE0 /* 4E38C 80072F8C A06200AA */ sb $v0, 0xAA($v1) glabel .L80072F90 /* 4E390 80072F90 0C01CB4B */ jal setup_demo_player /* 4E394 80072F94 24112703 */ addiu $s1, $zero, 0x2703 /* 4E398 80072F98 0000202D */ daddu $a0, $zero, $zero /* 4E39C 80072F9C 24020006 */ addiu $v0, $zero, 0x6 /* 4E3A0 80072FA0 0801CBF8 */ j .L80072FE0 /* 4E3A4 80072FA4 A2020012 */ sb $v0, 0x12($s0) glabel .L80072FA8 /* 4E3A8 80072FA8 0C01CB4B */ jal setup_demo_player /* 4E3AC 80072FAC 24112704 */ addiu $s1, $zero, 0x2704 /* 4E3B0 80072FB0 0000202D */ daddu $a0, $zero, $zero /* 4E3B4 80072FB4 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 4E3B8 80072FB8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 4E3BC 80072FBC 24020002 */ addiu $v0, $zero, 0x2 /* 4E3C0 80072FC0 A2020012 */ sb $v0, 0x12($s0) /* 4E3C4 80072FC4 906200AA */ lbu $v0, 0xAA($v1) /* 4E3C8 80072FC8 34420004 */ ori $v0, $v0, 0x4 /* 4E3CC 80072FCC 0801CBF8 */ j .L80072FE0 /* 4E3D0 80072FD0 A06200AA */ sb $v0, 0xAA($v1) .L80072FD4: /* 4E3D4 80072FD4 0C01CB4B */ jal setup_demo_player /* 4E3D8 80072FD8 24112700 */ addiu $s1, $zero, 0x2700 /* 4E3DC 80072FDC 24040002 */ addiu $a0, $zero, 0x2 .L80072FE0: /* 4E3E0 80072FE0 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 4E3E4 80072FE4 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) /* 4E3E8 80072FE8 8C620000 */ lw $v0, 0x0($v1) /* 4E3EC 80072FEC A0400074 */ sb $zero, 0x74($v0) /* 4E3F0 80072FF0 8C630000 */ lw $v1, 0x0($v1) /* 4E3F4 80072FF4 24020001 */ addiu $v0, $zero, 0x1 /* 4E3F8 80072FF8 A062007C */ sb $v0, 0x7C($v1) /* 4E3FC 80072FFC 2C820005 */ sltiu $v0, $a0, 0x5 /* 4E400 80073000 10400049 */ beqz $v0, .L80073128 /* 4E404 80073004 00041080 */ sll $v0, $a0, 2 /* 4E408 80073008 3C01800A */ lui $at, %hi(jtbl_8009A590) /* 4E40C 8007300C 00220821 */ addu $at, $at, $v0 /* 4E410 80073010 8C22A590 */ lw $v0, %lo(jtbl_8009A590)($at) /* 4E414 80073014 00400008 */ jr $v0 /* 4E418 80073018 00000000 */ nop glabel .L8007301C /* 4E41C 8007301C 3C03800B */ lui $v1, %hi(gCurrentEncounter) /* 4E420 80073020 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) /* 4E424 80073024 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 4E428 80073028 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* 4E42C 8007302C A0600004 */ sb $zero, 0x4($v1) /* 4E430 80073030 8C850000 */ lw $a1, 0x0($a0) /* 4E434 80073034 24020001 */ addiu $v0, $zero, 0x1 /* 4E438 80073038 A0620005 */ sb $v0, 0x5($v1) /* 4E43C 8007303C A0600006 */ sb $zero, 0x6($v1) /* 4E440 80073040 90A200AA */ lbu $v0, 0xAA($a1) /* 4E444 80073044 34420010 */ ori $v0, $v0, 0x10 /* 4E448 80073048 A0A200AA */ sb $v0, 0xAA($a1) /* 4E44C 8007304C 8C830000 */ lw $v1, 0x0($a0) /* 4E450 80073050 906200AA */ lbu $v0, 0xAA($v1) /* 4E454 80073054 34420020 */ ori $v0, $v0, 0x20 /* 4E458 80073058 A06200AA */ sb $v0, 0xAA($v1) /* 4E45C 8007305C 8C830000 */ lw $v1, 0x0($a0) /* 4E460 80073060 906200AA */ lbu $v0, 0xAA($v1) /* 4E464 80073064 34420040 */ ori $v0, $v0, 0x40 /* 4E468 80073068 0801CC4A */ j .L80073128 /* 4E46C 8007306C A06200AA */ sb $v0, 0xAA($v1) glabel .L80073070 /* 4E470 80073070 3C03800B */ lui $v1, %hi(gCurrentEncounter) /* 4E474 80073074 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) /* 4E478 80073078 24020001 */ addiu $v0, $zero, 0x1 /* 4E47C 8007307C A0620004 */ sb $v0, 0x4($v1) /* 4E480 80073080 92040001 */ lbu $a0, 0x1($s0) /* 4E484 80073084 3C058007 */ lui $a1, %hi(gGameStatusPtr) /* 4E488 80073088 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) /* 4E48C 8007308C 0801CC2D */ j .L800730B4 /* 4E490 80073090 24020004 */ addiu $v0, $zero, 0x4 glabel .L80073094 /* 4E494 80073094 3C03800B */ lui $v1, %hi(gCurrentEncounter) /* 4E498 80073098 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) /* 4E49C 8007309C 24020001 */ addiu $v0, $zero, 0x1 /* 4E4A0 800730A0 A0620004 */ sb $v0, 0x4($v1) /* 4E4A4 800730A4 92040000 */ lbu $a0, 0x0($s0) /* 4E4A8 800730A8 3C058007 */ lui $a1, %hi(gGameStatusPtr) /* 4E4AC 800730AC 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) /* 4E4B0 800730B0 24020002 */ addiu $v0, $zero, 0x2 .L800730B4: /* 4E4B4 800730B4 A0620005 */ sb $v0, 0x5($v1) /* 4E4B8 800730B8 A0640006 */ sb $a0, 0x6($v1) /* 4E4BC 800730BC 90A200AA */ lbu $v0, 0xAA($a1) /* 4E4C0 800730C0 34420010 */ ori $v0, $v0, 0x10 /* 4E4C4 800730C4 0801CC4A */ j .L80073128 /* 4E4C8 800730C8 A0A200AA */ sb $v0, 0xAA($a1) glabel .L800730CC /* 4E4CC 800730CC 3C03800B */ lui $v1, %hi(gCurrentEncounter) /* 4E4D0 800730D0 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) /* 4E4D4 800730D4 24020001 */ addiu $v0, $zero, 0x1 /* 4E4D8 800730D8 A0620004 */ sb $v0, 0x4($v1) /* 4E4DC 800730DC 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 4E4E0 800730E0 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* 4E4E4 800730E4 24020006 */ addiu $v0, $zero, 0x6 /* 4E4E8 800730E8 A0620005 */ sb $v0, 0x5($v1) /* 4E4EC 800730EC 908200AA */ lbu $v0, 0xAA($a0) /* 4E4F0 800730F0 0801CC49 */ j .L80073124 /* 4E4F4 800730F4 34420020 */ ori $v0, $v0, 0x20 glabel .L800730F8 /* 4E4F8 800730F8 3C03800B */ lui $v1, %hi(gCurrentEncounter) /* 4E4FC 800730FC 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) /* 4E500 80073100 24020002 */ addiu $v0, $zero, 0x2 /* 4E504 80073104 A0620004 */ sb $v0, 0x4($v1) /* 4E508 80073108 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 4E50C 8007310C 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* 4E510 80073110 24020001 */ addiu $v0, $zero, 0x1 /* 4E514 80073114 A0620005 */ sb $v0, 0x5($v1) /* 4E518 80073118 A0600006 */ sb $zero, 0x6($v1) /* 4E51C 8007311C 908200AA */ lbu $v0, 0xAA($a0) /* 4E520 80073120 34420040 */ ori $v0, $v0, 0x40 .L80073124: /* 4E524 80073124 A08200AA */ sb $v0, 0xAA($a0) .L80073128: /* 4E528 80073128 0000202D */ daddu $a0, $zero, $zero /* 4E52C 8007312C 3C05F840 */ lui $a1, (0xF8406299 >> 16) /* 4E530 80073130 34A56299 */ ori $a1, $a1, (0xF8406299 & 0xFFFF) /* 4E534 80073134 0C0B2026 */ jal evt_set_variable /* 4E538 80073138 24060001 */ addiu $a2, $zero, 0x1 /* 4E53C 8007313C 2404FFFF */ addiu $a0, $zero, -0x1 /* 4E540 80073140 3C02800B */ lui $v0, %hi(gCurrentEncounter) /* 4E544 80073144 24420F10 */ addiu $v0, $v0, %lo(gCurrentEncounter) /* 4E548 80073148 A0400007 */ sb $zero, 0x7($v0) /* 4E54C 8007314C 0C01CB33 */ jal set_battle_stage /* 4E550 80073150 A0400010 */ sb $zero, 0x10($v0) /* 4E554 80073154 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 4E558 80073158 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 4E55C 8007315C 0220202D */ daddu $a0, $s1, $zero /* 4E560 80073160 906200AA */ lbu $v0, 0xAA($v1) /* 4E564 80073164 3C05800A */ lui $a1, %hi(gOverrideFlags) /* 4E568 80073168 24A5A650 */ addiu $a1, $a1, %lo(gOverrideFlags) /* 4E56C 8007316C 34420001 */ ori $v0, $v0, 0x1 /* 4E570 80073170 A06200AA */ sb $v0, 0xAA($v1) /* 4E574 80073174 8CA20000 */ lw $v0, 0x0($a1) /* 4E578 80073178 2403FFF7 */ addiu $v1, $zero, -0x9 /* 4E57C 8007317C 00431024 */ and $v0, $v0, $v1 /* 4E580 80073180 0C01CB24 */ jal load_battle /* 4E584 80073184 ACA20000 */ sw $v0, 0x0($a1) /* 4E588 80073188 8FBF0018 */ lw $ra, 0x18($sp) /* 4E58C 8007318C 8FB10014 */ lw $s1, 0x14($sp) /* 4E590 80073190 8FB00010 */ lw $s0, 0x10($sp) /* 4E594 80073194 03E00008 */ jr $ra /* 4E598 80073198 27BD0020 */ addiu $sp, $sp, 0x20 /* 4E59C 8007319C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void load_demo_battle(u32 index) { PlayerData* playerData = &gPlayerData; u32 mode; s32 battleID; gGameStatusPtr->demoFlags = 0; gGameStatusPtr->areaID = 0; gGameStatusPtr->mapID = 0; gGameStatusPtr->isBattle = FALSE; general_heap_create(); clear_worker_list(); clear_script_list(); create_cameras_a(); spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD); 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(); func_80138188(); reset_battle_status(); clear_encounter_status(); clear_entity_data(1); clear_effect_data(); clear_player_status(); clear_printers(); clear_item_entity_data(); clear_player_data(); initialize_status_bar(); clear_item_entity_data(); set_screen_overlay_params_front(OVERLAY_TYPE_9, 255.0f); switch (index) { case 0: setup_demo_player(); mode = 0; playerData->hasActionCommands = FALSE; battleID = BTL_DIG_FORMATION_00; break; case 1: setup_demo_player(); mode = 0; playerData->currentPartner = PARTNER_BOW; battleID = BTL_DIG_FORMATION_01; break; case 2: setup_demo_player(); mode = 0; playerData->currentPartner = PARTNER_PARAKARRY; gGameStatusPtr->demoFlags |= 2; battleID = BTL_DIG_FORMATION_02; break; case 3: setup_demo_player(); mode = 0; playerData->currentPartner = PARTNER_WATT; battleID = BTL_DIG_FORMATION_03; break; case 4: setup_demo_player(); playerData->currentPartner = PARTNER_KOOPER; gGameStatusPtr->demoFlags |= 4; mode = 0; battleID = BTL_DIG_FORMATION_04; break; default: setup_demo_player(); mode = 2; battleID = BTL_DIG_FORMATION_00; } gGameStatusPtr->debugEnemyContact = DEBUG_CONTACT_NONE; gGameStatusPtr->unk_7C = 1; switch (mode) { case 0: gCurrentEncounter.firstStrikeType = FIRST_STRIKE_NONE; gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_NONE; gCurrentEncounter.hitTier = 0; gGameStatusPtr->demoFlags |= 0x10; gGameStatusPtr->demoFlags |= 0x20; gGameStatusPtr->demoFlags |= 0x40; break; case 1: gCurrentEncounter.firstStrikeType = FIRST_STRIKE_PLAYER; gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_HAMMER; gCurrentEncounter.hitTier = playerData->hammerLevel; gGameStatusPtr->demoFlags |= 0x10; break; case 2: gCurrentEncounter.firstStrikeType = FIRST_STRIKE_PLAYER; gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_JUMP; gCurrentEncounter.hitTier = playerData->bootsLevel; gGameStatusPtr->demoFlags |= 0x10; break; case 3: gCurrentEncounter.firstStrikeType = FIRST_STRIKE_PLAYER; gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_PARTNER; gGameStatusPtr->demoFlags |= 0x20; break; case 4: gCurrentEncounter.firstStrikeType = FIRST_STRIKE_ENEMY; gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_NONE; gCurrentEncounter.hitTier = 0; gGameStatusPtr->demoFlags |= 0x40; break; } evt_set_variable(NULL, GF_Tutorial_SwapTurnOrder, 1); gCurrentEncounter.unk_07 = 0; gCurrentEncounter.instigatorValue = 0; set_battle_stage(BTL_STAGE_DEFAULT); gGameStatusPtr->demoFlags |= 1; gOverrideFlags &= ~GLOBAL_OVERRIDES_8; load_battle(battleID); }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_player /* 7A7A4 800E12F4 3C03800A */ lui $v1, %hi(gCurrentCamID) /* 7A7A8 800E12F8 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* 7A7AC 800E12FC 27BDFEB0 */ addiu $sp, $sp, -0x150 /* 7A7B0 800E1300 AFB20128 */ sw $s2, 0x128($sp) /* 7A7B4 800E1304 3C128011 */ lui $s2, %hi(gPlayerStatus) /* 7A7B8 800E1308 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* 7A7BC 800E130C AFBF012C */ sw $ra, 0x12C($sp) /* 7A7C0 800E1310 AFB10124 */ sw $s1, 0x124($sp) /* 7A7C4 800E1314 AFB00120 */ sw $s0, 0x120($sp) /* 7A7C8 800E1318 F7BA0148 */ sdc1 $f26, 0x148($sp) /* 7A7CC 800E131C F7B80140 */ sdc1 $f24, 0x140($sp) /* 7A7D0 800E1320 F7B60138 */ sdc1 $f22, 0x138($sp) /* 7A7D4 800E1324 F7B40130 */ sdc1 $f20, 0x130($sp) /* 7A7D8 800E1328 00031080 */ sll $v0, $v1, 2 /* 7A7DC 800E132C 00431021 */ addu $v0, $v0, $v1 /* 7A7E0 800E1330 00021080 */ sll $v0, $v0, 2 /* 7A7E4 800E1334 00431023 */ subu $v0, $v0, $v1 /* 7A7E8 800E1338 000218C0 */ sll $v1, $v0, 3 /* 7A7EC 800E133C 00431021 */ addu $v0, $v0, $v1 /* 7A7F0 800E1340 000210C0 */ sll $v0, $v0, 3 /* 7A7F4 800E1344 24030011 */ addiu $v1, $zero, 0x11 /* 7A7F8 800E1348 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 7A7FC 800E134C 00220821 */ addu $at, $at, $v0 /* 7A800 800E1350 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 7A804 800E1354 824200B4 */ lb $v0, 0xB4($s2) /* 7A808 800E1358 14430035 */ bne $v0, $v1, .L800E1430 /* 7A80C 800E135C 46000687 */ neg.s $f26, $f0 /* 7A810 800E1360 3C013F36 */ lui $at, (0x3F36DB6E >> 16) /* 7A814 800E1364 3421DB6E */ ori $at, $at, (0x3F36DB6E & 0xFFFF) /* 7A818 800E1368 44810000 */ mtc1 $at, $f0 /* 7A81C 800E136C 27B000E0 */ addiu $s0, $sp, 0xE0 /* 7A820 800E1370 44050000 */ mfc1 $a1, $f0 /* 7A824 800E1374 0200202D */ daddu $a0, $s0, $zero /* 7A828 800E1378 00A0302D */ daddu $a2, $a1, $zero /* 7A82C 800E137C 0C019DF0 */ jal guScaleF /* 7A830 800E1380 00A0382D */ daddu $a3, $a1, $zero /* 7A834 800E1384 4405D000 */ mfc1 $a1, $f26 /* 7A838 800E1388 4480A000 */ mtc1 $zero, $f20 /* 7A83C 800E138C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 7A840 800E1390 4481B000 */ mtc1 $at, $f22 /* 7A844 800E1394 4406A000 */ mfc1 $a2, $f20 /* 7A848 800E1398 4407B000 */ mfc1 $a3, $f22 /* 7A84C 800E139C 27A40020 */ addiu $a0, $sp, 0x20 /* 7A850 800E13A0 0C019EC8 */ jal guRotateF /* 7A854 800E13A4 E7B40010 */ swc1 $f20, 0x10($sp) /* 7A858 800E13A8 0200202D */ daddu $a0, $s0, $zero /* 7A85C 800E13AC 27A50020 */ addiu $a1, $sp, 0x20 /* 7A860 800E13B0 0C019D80 */ jal guMtxCatF /* 7A864 800E13B4 00A0302D */ daddu $a2, $a1, $zero /* 7A868 800E13B8 27B000A0 */ addiu $s0, $sp, 0xA0 /* 7A86C 800E13BC 8E4500A8 */ lw $a1, 0xA8($s2) /* 7A870 800E13C0 4406A000 */ mfc1 $a2, $f20 /* 7A874 800E13C4 4407B000 */ mfc1 $a3, $f22 /* 7A878 800E13C8 0200202D */ daddu $a0, $s0, $zero /* 7A87C 800E13CC 0C019EC8 */ jal guRotateF /* 7A880 800E13D0 AFA60010 */ sw $a2, 0x10($sp) /* 7A884 800E13D4 27A40020 */ addiu $a0, $sp, 0x20 /* 7A888 800E13D8 0200282D */ daddu $a1, $s0, $zero /* 7A88C 800E13DC 0C019D80 */ jal guMtxCatF /* 7A890 800E13E0 0080302D */ daddu $a2, $a0, $zero /* 7A894 800E13E4 C640002C */ lwc1 $f0, 0x2C($s2) /* 7A898 800E13E8 27B00060 */ addiu $s0, $sp, 0x60 /* 7A89C 800E13EC 46160001 */ sub.s $f0, $f0, $f22 /* 7A8A0 800E13F0 8E450028 */ lw $a1, 0x28($s2) /* 7A8A4 800E13F4 8E470030 */ lw $a3, 0x30($s2) /* 7A8A8 800E13F8 44060000 */ mfc1 $a2, $f0 /* 7A8AC 800E13FC 0C019E40 */ jal guTranslateF /* 7A8B0 800E1400 0200202D */ daddu $a0, $s0, $zero /* 7A8B4 800E1404 27A40020 */ addiu $a0, $sp, 0x20 /* 7A8B8 800E1408 0200282D */ daddu $a1, $s0, $zero /* 7A8BC 800E140C 0C019D80 */ jal guMtxCatF /* 7A8C0 800E1410 0080302D */ daddu $a2, $a0, $zero /* 7A8C4 800E1414 0000202D */ daddu $a0, $zero, $zero /* 7A8C8 800E1418 0080282D */ daddu $a1, $a0, $zero /* 7A8CC 800E141C 0080302D */ daddu $a2, $a0, $zero /* 7A8D0 800E1420 0080382D */ daddu $a3, $a0, $zero /* 7A8D4 800E1424 27A20020 */ addiu $v0, $sp, 0x20 /* 7A8D8 800E1428 080385AD */ j .L800E16B4 /* 7A8DC 800E142C AFA20010 */ sw $v0, 0x10($sp) .L800E1430: /* 7A8E0 800E1430 27B000A0 */ addiu $s0, $sp, 0xA0 /* 7A8E4 800E1434 4405D000 */ mfc1 $a1, $f26 /* 7A8E8 800E1438 4480A000 */ mtc1 $zero, $f20 /* 7A8EC 800E143C 3C07BF80 */ lui $a3, (0xBF800000 >> 16) /* 7A8F0 800E1440 4406A000 */ mfc1 $a2, $f20 /* 7A8F4 800E1444 0200202D */ daddu $a0, $s0, $zero /* 7A8F8 800E1448 0C019EC8 */ jal guRotateF /* 7A8FC 800E144C E7B40010 */ swc1 $f20, 0x10($sp) /* 7A900 800E1450 C64C008C */ lwc1 $f12, 0x8C($s2) /* 7A904 800E1454 0C00A6C9 */ jal clamp_angle /* 7A908 800E1458 00000000 */ nop /* 7A90C 800E145C 44050000 */ mfc1 $a1, $f0 /* 7A910 800E1460 4406A000 */ mfc1 $a2, $f20 /* 7A914 800E1464 4407A000 */ mfc1 $a3, $f20 /* 7A918 800E1468 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 7A91C 800E146C 4481B000 */ mtc1 $at, $f22 /* 7A920 800E1470 27A40020 */ addiu $a0, $sp, 0x20 /* 7A924 800E1474 0C019EC8 */ jal guRotateF /* 7A928 800E1478 E7B60010 */ swc1 $f22, 0x10($sp) /* 7A92C 800E147C 0200202D */ daddu $a0, $s0, $zero /* 7A930 800E1480 27A50020 */ addiu $a1, $sp, 0x20 /* 7A934 800E1484 0C019D80 */ jal guMtxCatF /* 7A938 800E1488 00A0302D */ daddu $a2, $a1, $zero /* 7A93C 800E148C 864200B0 */ lh $v0, 0xB0($s2) /* 7A940 800E1490 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 7A944 800E1494 4481C000 */ mtc1 $at, $f24 /* 7A948 800E1498 00021023 */ negu $v0, $v0 /* 7A94C 800E149C 44820000 */ mtc1 $v0, $f0 /* 7A950 800E14A0 00000000 */ nop /* 7A954 800E14A4 46800020 */ cvt.s.w $f0, $f0 /* 7A958 800E14A8 46180002 */ mul.s $f0, $f0, $f24 /* 7A95C 800E14AC 00000000 */ nop /* 7A960 800E14B0 27B10060 */ addiu $s1, $sp, 0x60 /* 7A964 800E14B4 4405A000 */ mfc1 $a1, $f20 /* 7A968 800E14B8 4407A000 */ mfc1 $a3, $f20 /* 7A96C 800E14BC 44060000 */ mfc1 $a2, $f0 /* 7A970 800E14C0 0C019E40 */ jal guTranslateF /* 7A974 800E14C4 0220202D */ daddu $a0, $s1, $zero /* 7A978 800E14C8 0220202D */ daddu $a0, $s1, $zero /* 7A97C 800E14CC 27A50020 */ addiu $a1, $sp, 0x20 /* 7A980 800E14D0 0C019D80 */ jal guMtxCatF /* 7A984 800E14D4 00A0302D */ daddu $a2, $a1, $zero /* 7A988 800E14D8 4405D000 */ mfc1 $a1, $f26 /* 7A98C 800E14DC 4406A000 */ mfc1 $a2, $f20 /* 7A990 800E14E0 4407B000 */ mfc1 $a3, $f22 /* 7A994 800E14E4 0200202D */ daddu $a0, $s0, $zero /* 7A998 800E14E8 0C019EC8 */ jal guRotateF /* 7A99C 800E14EC E7B40010 */ swc1 $f20, 0x10($sp) /* 7A9A0 800E14F0 27A40020 */ addiu $a0, $sp, 0x20 /* 7A9A4 800E14F4 0200282D */ daddu $a1, $s0, $zero /* 7A9A8 800E14F8 0C019D80 */ jal guMtxCatF /* 7A9AC 800E14FC 0080302D */ daddu $a2, $a0, $zero /* 7A9B0 800E1500 8E4500A8 */ lw $a1, 0xA8($s2) /* 7A9B4 800E1504 4406A000 */ mfc1 $a2, $f20 /* 7A9B8 800E1508 4407B000 */ mfc1 $a3, $f22 /* 7A9BC 800E150C 0200202D */ daddu $a0, $s0, $zero /* 7A9C0 800E1510 0C019EC8 */ jal guRotateF /* 7A9C4 800E1514 E7B40010 */ swc1 $f20, 0x10($sp) /* 7A9C8 800E1518 27A40020 */ addiu $a0, $sp, 0x20 /* 7A9CC 800E151C 0200282D */ daddu $a1, $s0, $zero /* 7A9D0 800E1520 0C019D80 */ jal guMtxCatF /* 7A9D4 800E1524 0080302D */ daddu $a2, $a0, $zero /* 7A9D8 800E1528 864200B0 */ lh $v0, 0xB0($s2) /* 7A9DC 800E152C 44820000 */ mtc1 $v0, $f0 /* 7A9E0 800E1530 00000000 */ nop /* 7A9E4 800E1534 46800020 */ cvt.s.w $f0, $f0 /* 7A9E8 800E1538 46180002 */ mul.s $f0, $f0, $f24 /* 7A9EC 800E153C 00000000 */ nop /* 7A9F0 800E1540 0220202D */ daddu $a0, $s1, $zero /* 7A9F4 800E1544 4405A000 */ mfc1 $a1, $f20 /* 7A9F8 800E1548 44060000 */ mfc1 $a2, $f0 /* 7A9FC 800E154C 0C019E40 */ jal guTranslateF /* 7AA00 800E1550 00A0382D */ daddu $a3, $a1, $zero /* 7AA04 800E1554 27A40020 */ addiu $a0, $sp, 0x20 /* 7AA08 800E1558 0220282D */ daddu $a1, $s1, $zero /* 7AA0C 800E155C 0C019D80 */ jal guMtxCatF /* 7AA10 800E1560 0080302D */ daddu $a2, $a0, $zero /* 7AA14 800E1564 3C013F36 */ lui $at, (0x3F36DB6E >> 16) /* 7AA18 800E1568 3421DB6E */ ori $at, $at, (0x3F36DB6E & 0xFFFF) /* 7AA1C 800E156C 44810000 */ mtc1 $at, $f0 /* 7AA20 800E1570 27B000E0 */ addiu $s0, $sp, 0xE0 /* 7AA24 800E1574 44050000 */ mfc1 $a1, $f0 /* 7AA28 800E1578 0200202D */ daddu $a0, $s0, $zero /* 7AA2C 800E157C 00A0302D */ daddu $a2, $a1, $zero /* 7AA30 800E1580 0C019DF0 */ jal guScaleF /* 7AA34 800E1584 00A0382D */ daddu $a3, $a1, $zero /* 7AA38 800E1588 27A40020 */ addiu $a0, $sp, 0x20 /* 7AA3C 800E158C 0200282D */ daddu $a1, $s0, $zero /* 7AA40 800E1590 0C019D80 */ jal guMtxCatF /* 7AA44 800E1594 0080302D */ daddu $a2, $a0, $zero /* 7AA48 800E1598 8E450028 */ lw $a1, 0x28($s2) /* 7AA4C 800E159C 8E46002C */ lw $a2, 0x2C($s2) /* 7AA50 800E15A0 8E470030 */ lw $a3, 0x30($s2) /* 7AA54 800E15A4 0C019E40 */ jal guTranslateF /* 7AA58 800E15A8 0220202D */ daddu $a0, $s1, $zero /* 7AA5C 800E15AC 27A40020 */ addiu $a0, $sp, 0x20 /* 7AA60 800E15B0 0220282D */ daddu $a1, $s1, $zero /* 7AA64 800E15B4 0C019D80 */ jal guMtxCatF /* 7AA68 800E15B8 0080302D */ daddu $a2, $a0, $zero /* 7AA6C 800E15BC 8E430004 */ lw $v1, 0x4($s2) /* 7AA70 800E15C0 30620400 */ andi $v0, $v1, 0x400 /* 7AA74 800E15C4 10400017 */ beqz $v0, .L800E1624 /* 7AA78 800E15C8 0000202D */ daddu $a0, $zero, $zero /* 7AA7C 800E15CC 2405FFFF */ addiu $a1, $zero, -0x1 /* 7AA80 800E15D0 0080302D */ daddu $a2, $a0, $zero /* 7AA84 800E15D4 0080382D */ daddu $a3, $a0, $zero /* 7AA88 800E15D8 2402FBFF */ addiu $v0, $zero, -0x401 /* 7AA8C 800E15DC 00621024 */ and $v0, $v1, $v0 /* 7AA90 800E15E0 AE420004 */ sw $v0, 0x4($s2) /* 7AA94 800E15E4 24020016 */ addiu $v0, $zero, 0x16 /* 7AA98 800E15E8 A242000A */ sb $v0, 0xA($s2) /* 7AA9C 800E15EC AFA00010 */ sw $zero, 0x10($sp) /* 7AAA0 800E15F0 AFA00014 */ sw $zero, 0x14($sp) /* 7AAA4 800E15F4 AFA00018 */ sw $zero, 0x18($sp) /* 7AAA8 800E15F8 0C0B77B9 */ jal set_player_imgfx_comp /* 7AAAC 800E15FC AFA0001C */ sw $zero, 0x1C($sp) /* 7AAB0 800E1600 24050005 */ addiu $a1, $zero, 0x5 /* 7AAB4 800E1604 24060001 */ addiu $a2, $zero, 0x1 /* 7AAB8 800E1608 00C0382D */ daddu $a3, $a2, $zero /* 7AABC 800E160C 8E4400B8 */ lw $a0, 0xB8($s2) /* 7AAC0 800E1610 00C0102D */ daddu $v0, $a2, $zero /* 7AAC4 800E1614 AFA20010 */ sw $v0, 0x10($sp) /* 7AAC8 800E1618 AFA00014 */ sw $zero, 0x14($sp) /* 7AACC 800E161C 0C0B77FE */ jal set_player_imgfx_all /* 7AAD0 800E1620 AFA00018 */ sw $zero, 0x18($sp) .L800E1624: /* 7AAD4 800E1624 8242000A */ lb $v0, 0xA($s2) /* 7AAD8 800E1628 9243000A */ lbu $v1, 0xA($s2) /* 7AADC 800E162C 1040000D */ beqz $v0, .L800E1664 /* 7AAE0 800E1630 2462FFFF */ addiu $v0, $v1, -0x1 /* 7AAE4 800E1634 A242000A */ sb $v0, 0xA($s2) /* 7AAE8 800E1638 00021600 */ sll $v0, $v0, 24 /* 7AAEC 800E163C 14400009 */ bnez $v0, .L800E1664 /* 7AAF0 800E1640 0000202D */ daddu $a0, $zero, $zero /* 7AAF4 800E1644 2405FFFF */ addiu $a1, $zero, -0x1 /* 7AAF8 800E1648 0080302D */ daddu $a2, $a0, $zero /* 7AAFC 800E164C 0080382D */ daddu $a3, $a0, $zero /* 7AB00 800E1650 AFA00010 */ sw $zero, 0x10($sp) /* 7AB04 800E1654 AFA00014 */ sw $zero, 0x14($sp) /* 7AB08 800E1658 AFA00018 */ sw $zero, 0x18($sp) /* 7AB0C 800E165C 0C0B77B9 */ jal set_player_imgfx_comp /* 7AB10 800E1660 AFA0001C */ sw $zero, 0x1C($sp) .L800E1664: /* 7AB14 800E1664 C64200A8 */ lwc1 $f2, 0xA8($s2) /* 7AB18 800E1668 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7AB1C 800E166C 44810000 */ mtc1 $at, $f0 /* 7AB20 800E1670 00000000 */ nop /* 7AB24 800E1674 4602003E */ c.le.s $f0, $f2 /* 7AB28 800E1678 00000000 */ nop /* 7AB2C 800E167C 45000008 */ bc1f .L800E16A0 /* 7AB30 800E1680 0000202D */ daddu $a0, $zero, $zero /* 7AB34 800E1684 3C014387 */ lui $at, (0x43870000 >> 16) /* 7AB38 800E1688 44810000 */ mtc1 $at, $f0 /* 7AB3C 800E168C 00000000 */ nop /* 7AB40 800E1690 4600103C */ c.lt.s $f2, $f0 /* 7AB44 800E1694 00000000 */ nop /* 7AB48 800E1698 45030001 */ bc1tl .L800E16A0 /* 7AB4C 800E169C 3C041000 */ lui $a0, (0x10000000 >> 16) .L800E16A0: /* 7AB50 800E16A0 27A20020 */ addiu $v0, $sp, 0x20 /* 7AB54 800E16A4 AFA20010 */ sw $v0, 0x10($sp) /* 7AB58 800E16A8 0000282D */ daddu $a1, $zero, $zero /* 7AB5C 800E16AC 00A0302D */ daddu $a2, $a1, $zero /* 7AB60 800E16B0 00A0382D */ daddu $a3, $a1, $zero .L800E16B4: /* 7AB64 800E16B4 0C0B7710 */ jal spr_draw_player_sprite /* 7AB68 800E16B8 00000000 */ nop /* 7AB6C 800E16BC 3C03800F */ lui $v1, %hi(D_800F7B4C) /* 7AB70 800E16C0 24637B4C */ addiu $v1, $v1, %lo(D_800F7B4C) /* 7AB74 800E16C4 8C620000 */ lw $v0, 0x0($v1) /* 7AB78 800E16C8 24420001 */ addiu $v0, $v0, 0x1 /* 7AB7C 800E16CC AC620000 */ sw $v0, 0x0($v1) /* 7AB80 800E16D0 28420003 */ slti $v0, $v0, 0x3 /* 7AB84 800E16D4 50400001 */ beql $v0, $zero, .L800E16DC /* 7AB88 800E16D8 AC600000 */ sw $zero, 0x0($v1) .L800E16DC: /* 7AB8C 800E16DC 8FBF012C */ lw $ra, 0x12C($sp) /* 7AB90 800E16E0 8FB20128 */ lw $s2, 0x128($sp) /* 7AB94 800E16E4 8FB10124 */ lw $s1, 0x124($sp) /* 7AB98 800E16E8 8FB00120 */ lw $s0, 0x120($sp) /* 7AB9C 800E16EC D7BA0148 */ ldc1 $f26, 0x148($sp) /* 7ABA0 800E16F0 D7B80140 */ ldc1 $f24, 0x140($sp) /* 7ABA4 800E16F4 D7B60138 */ ldc1 $f22, 0x138($sp) /* 7ABA8 800E16F8 D7B40130 */ ldc1 $f20, 0x130($sp) /* 7ABAC 800E16FC 03E00008 */ jr $ra /* 7ABB0 800E1700 27BD0150 */ addiu $sp, $sp, 0x150 ### DECOMPILED C INSTRUCTIONS: void appendGfx_player(void* data) { PlayerStatus* playerStatus = &gPlayerStatus; Matrix4f sp20, sp60, spA0, spE0; f32 temp_f0 = -gCameras[gCurrentCamID].currentYaw; s32 spriteIdx; if (playerStatus->actionState == ACTION_STATE_SLIDING) { guScaleF(spE0, SPRITE_WORLD_SCALE_D, SPRITE_WORLD_SCALE_D, SPRITE_WORLD_SCALE_D); guRotateF(sp20, temp_f0, 0.0f, 1.0f, 0.0f); guMtxCatF(spE0, sp20, sp20); guRotateF(spA0, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f); guMtxCatF(sp20, spA0, sp20); guTranslateF(sp60, playerStatus->position.x, playerStatus->position.y - 1.0f, playerStatus->position.z); guMtxCatF(sp20, sp60, sp20); spr_draw_player_sprite(PLAYER_SPRITE_MAIN, 0, 0, 0, sp20); } else { guRotateF(spA0, temp_f0, 0.0f, -1.0f, 0.0f); guRotateF(sp20, clamp_angle(playerStatus->pitch), 0.0f, 0.0f, 1.0f); guMtxCatF(spA0, sp20, sp20); guTranslateF(sp60, 0.0f, -playerStatus->colliderHeight * 0.5f, 0.0f); guMtxCatF(sp60, sp20, sp20); guRotateF(spA0, temp_f0, 0.0f, 1.0f, 0.0f); guMtxCatF(sp20, spA0, sp20); guRotateF(spA0, playerStatus->spriteFacingAngle, 0.0f, 1.0f, 0.0f); guMtxCatF(sp20, spA0, sp20); guTranslateF(sp60, 0.0f, playerStatus->colliderHeight * 0.5f, 0.0f); guMtxCatF(sp20, sp60, sp20); guScaleF(spE0, SPRITE_WORLD_SCALE_D, SPRITE_WORLD_SCALE_D, SPRITE_WORLD_SCALE_D); guMtxCatF(sp20, spE0, sp20); guTranslateF(sp60, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z); guMtxCatF(sp20, sp60, sp20); if (playerStatus->animFlags & PA_FLAG_SHIVERING) { playerStatus->animFlags = playerStatus->animFlags & ~PA_FLAG_SHIVERING; playerStatus->shiverTime = 22; set_player_imgfx_comp(PLAYER_SPRITE_MAIN, -1, IMGFX_CLEAR, 0, 0, 0, 0, 0); set_player_imgfx_all(playerStatus->anim, IMGFX_SET_ANIM, IMGFX_ANIM_SHIVER, 1, 1, 0, 0); } if (playerStatus->shiverTime != 0) { playerStatus->shiverTime--; if (playerStatus->shiverTime == 0) { set_player_imgfx_comp(PLAYER_SPRITE_MAIN, -1, IMGFX_CLEAR, 0, 0, 0, 0, 0); } } 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, sp20); } D_800F7B4C++; if (D_800F7B4C >= 3) { D_800F7B4C = 0; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel steam_burst_appendGfx /* 361238 E005C2F8 27BDFEF8 */ addiu $sp, $sp, -0x108 /* 36123C E005C2FC AFBE0100 */ sw $fp, 0x100($sp) /* 361240 E005C300 0080F02D */ daddu $fp, $a0, $zero /* 361244 E005C304 3C08DB06 */ lui $t0, (0xDB060024 >> 16) /* 361248 E005C308 35080024 */ ori $t0, $t0, (0xDB060024 & 0xFFFF) /* 36124C E005C30C 27A40018 */ addiu $a0, $sp, 0x18 /* 361250 E005C310 AFB500F4 */ sw $s5, 0xF4($sp) /* 361254 E005C314 3C150001 */ lui $s5, (0x11630 >> 16) /* 361258 E005C318 AFB700FC */ sw $s7, 0xFC($sp) /* 36125C E005C31C 3C17800A */ lui $s7, %hi(gMainGfxPos) /* 361260 E005C320 26F7A66C */ addiu $s7, $s7, %lo(gMainGfxPos) /* 361264 E005C324 AFBF0104 */ sw $ra, 0x104($sp) /* 361268 E005C328 AFB600F8 */ sw $s6, 0xF8($sp) /* 36126C E005C32C AFB400F0 */ sw $s4, 0xF0($sp) /* 361270 E005C330 AFB300EC */ sw $s3, 0xEC($sp) /* 361274 E005C334 AFB200E8 */ sw $s2, 0xE8($sp) /* 361278 E005C338 AFB100E4 */ sw $s1, 0xE4($sp) /* 36127C E005C33C AFB000E0 */ sw $s0, 0xE0($sp) /* 361280 E005C340 8EE50000 */ lw $a1, 0x0($s7) /* 361284 E005C344 8FD6000C */ lw $s6, 0xC($fp) /* 361288 E005C348 00A0302D */ daddu $a2, $a1, $zero /* 36128C E005C34C 24A50008 */ addiu $a1, $a1, 0x8 /* 361290 E005C350 AEE50000 */ sw $a1, 0x0($s7) /* 361294 E005C354 96C30000 */ lhu $v1, 0x0($s6) /* 361298 E005C358 24A20008 */ addiu $v0, $a1, 0x8 /* 36129C E005C35C AEE20000 */ sw $v0, 0x0($s7) /* 3612A0 E005C360 C6C20030 */ lwc1 $f2, 0x30($s6) /* 3612A4 E005C364 00031880 */ sll $v1, $v1, 2 /* 3612A8 E005C368 3C09E006 */ lui $t1, (0xE0060000 >> 16) /* 3612AC E005C36C 01234821 */ addu $t1, $t1, $v1 /* 3612B0 E005C370 8D29C700 */ lw $t1, -0x3900($t1) /* 3612B4 E005C374 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 3612B8 E005C378 AFA900D8 */ sw $t1, 0xD8($sp) /* 3612BC E005C37C 3C07E006 */ lui $a3, (0xE0060000 >> 16) /* 3612C0 E005C380 00E33821 */ addu $a3, $a3, $v1 /* 3612C4 E005C384 8CE7C704 */ lw $a3, -0x38FC($a3) /* 3612C8 E005C388 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3612CC E005C38C ACC20000 */ sw $v0, 0x0($a2) /* 3612D0 E005C390 ACC00004 */ sw $zero, 0x4($a2) /* 3612D4 E005C394 ACA80000 */ sw $t0, 0x0($a1) /* 3612D8 E005C398 8FC30010 */ lw $v1, 0x10($fp) /* 3612DC E005C39C 24A20010 */ addiu $v0, $a1, 0x10 /* 3612E0 E005C3A0 AEE20000 */ sw $v0, 0x0($s7) /* 3612E4 E005C3A4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3612E8 E005C3A8 4600110D */ trunc.w.s $f4, $f2 /* 3612EC E005C3AC 44132000 */ mfc1 $s3, $f4 /* 3612F0 E005C3B0 00000000 */ nop /* 3612F4 E005C3B4 44930000 */ mtc1 $s3, $f0 /* 3612F8 E005C3B8 00000000 */ nop /* 3612FC E005C3BC 46800020 */ cvt.s.w $f0, $f0 /* 361300 E005C3C0 3A740006 */ xori $s4, $s3, 0x6 /* 361304 E005C3C4 46001081 */ sub.s $f2, $f2, $f0 /* 361308 E005C3C8 3C014380 */ lui $at, (0x43800000 >> 16) /* 36130C E005C3CC 44810000 */ mtc1 $at, $f0 /* 361310 E005C3D0 8C63001C */ lw $v1, 0x1C($v1) /* 361314 E005C3D4 ACA20008 */ sw $v0, 0x8($a1) /* 361318 E005C3D8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 36131C E005C3DC ACA7000C */ sw $a3, 0xC($a1) /* 361320 E005C3E0 00621821 */ addu $v1, $v1, $v0 /* 361324 E005C3E4 46001082 */ mul.s $f2, $f2, $f0 /* 361328 E005C3E8 00000000 */ nop /* 36132C E005C3EC ACA30004 */ sw $v1, 0x4($a1) /* 361330 E005C3F0 8EC50004 */ lw $a1, 0x4($s6) /* 361334 E005C3F4 8EC60008 */ lw $a2, 0x8($s6) /* 361338 E005C3F8 8EC7000C */ lw $a3, 0xC($s6) /* 36133C E005C3FC 4600110D */ trunc.w.s $f4, $f2 /* 361340 E005C400 44122000 */ mfc1 $s2, $f4 /* 361344 E005C404 0C080108 */ jal shim_guTranslateF /* 361348 E005C408 2E940001 */ sltiu $s4, $s4, 0x1 /* 36134C E005C40C 27B00058 */ addiu $s0, $sp, 0x58 /* 361350 E005C410 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 361354 E005C414 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 361358 E005C418 44800000 */ mtc1 $zero, $f0 /* 36135C E005C41C 00031080 */ sll $v0, $v1, 2 /* 361360 E005C420 00431021 */ addu $v0, $v0, $v1 /* 361364 E005C424 00021080 */ sll $v0, $v0, 2 /* 361368 E005C428 00431023 */ subu $v0, $v0, $v1 /* 36136C E005C42C 000218C0 */ sll $v1, $v0, 3 /* 361370 E005C430 00431021 */ addu $v0, $v0, $v1 /* 361374 E005C434 000210C0 */ sll $v0, $v0, 3 /* 361378 E005C438 44060000 */ mfc1 $a2, $f0 /* 36137C E005C43C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 361380 E005C440 00220821 */ addu $at, $at, $v0 /* 361384 E005C444 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 361388 E005C448 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 36138C E005C44C 46000007 */ neg.s $f0, $f0 /* 361390 E005C450 44050000 */ mfc1 $a1, $f0 /* 361394 E005C454 0200202D */ daddu $a0, $s0, $zero /* 361398 E005C458 0C080104 */ jal shim_guRotateF /* 36139C E005C45C AFA60010 */ sw $a2, 0x10($sp) /* 3613A0 E005C460 0200202D */ daddu $a0, $s0, $zero /* 3613A4 E005C464 27A50018 */ addiu $a1, $sp, 0x18 /* 3613A8 E005C468 27B00098 */ addiu $s0, $sp, 0x98 /* 3613AC E005C46C 0C080114 */ jal shim_guMtxCatF /* 3613B0 E005C470 0200302D */ daddu $a2, $s0, $zero /* 3613B4 E005C474 0200202D */ daddu $a0, $s0, $zero /* 3613B8 E005C478 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3613BC E005C47C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3613C0 E005C480 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3613C4 E005C484 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3613C8 E005C488 96050000 */ lhu $a1, 0x0($s0) /* 3613CC E005C48C 8E220000 */ lw $v0, 0x0($s1) /* 3613D0 E005C490 00052980 */ sll $a1, $a1, 6 /* 3613D4 E005C494 00B52821 */ addu $a1, $a1, $s5 /* 3613D8 E005C498 0C080118 */ jal shim_guMtxF2L /* 3613DC E005C49C 00452821 */ addu $a1, $v0, $a1 /* 3613E0 E005C4A0 3C05E6DE */ lui $a1, (0xE6DEDE82 >> 16) /* 3613E4 E005C4A4 34A5DE82 */ ori $a1, $a1, (0xE6DEDE82 & 0xFFFF) /* 3613E8 E005C4A8 8EE60000 */ lw $a2, 0x0($s7) /* 3613EC E005C4AC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3613F0 E005C4B0 00C0202D */ daddu $a0, $a2, $zero /* 3613F4 E005C4B4 24C60008 */ addiu $a2, $a2, 0x8 /* 3613F8 E005C4B8 AEE60000 */ sw $a2, 0x0($s7) /* 3613FC E005C4BC 96020000 */ lhu $v0, 0x0($s0) /* 361400 E005C4C0 325200FF */ andi $s2, $s2, 0xFF /* 361404 E005C4C4 AC830000 */ sw $v1, 0x0($a0) /* 361408 E005C4C8 24430001 */ addiu $v1, $v0, 0x1 /* 36140C E005C4CC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 361410 E005C4D0 00021180 */ sll $v0, $v0, 6 /* 361414 E005C4D4 A6030000 */ sh $v1, 0x0($s0) /* 361418 E005C4D8 8E230000 */ lw $v1, 0x0($s1) /* 36141C E005C4DC 00551021 */ addu $v0, $v0, $s5 /* 361420 E005C4E0 00621821 */ addu $v1, $v1, $v0 /* 361424 E005C4E4 24C20008 */ addiu $v0, $a2, 0x8 /* 361428 E005C4E8 AC830004 */ sw $v1, 0x4($a0) /* 36142C E005C4EC AEE20000 */ sw $v0, 0x0($s7) /* 361430 E005C4F0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 361434 E005C4F4 ACC20000 */ sw $v0, 0x0($a2) /* 361438 E005C4F8 24C20010 */ addiu $v0, $a2, 0x10 /* 36143C E005C4FC ACC50004 */ sw $a1, 0x4($a2) /* 361440 E005C500 AEE20000 */ sw $v0, 0x0($s7) /* 361444 E005C504 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 361448 E005C508 ACC20008 */ sw $v0, 0x8($a2) /* 36144C E005C50C 24C20018 */ addiu $v0, $a2, 0x18 /* 361450 E005C510 ACD2000C */ sw $s2, 0xC($a2) /* 361454 E005C514 AEE20000 */ sw $v0, 0x0($s7) /* 361458 E005C518 001311C0 */ sll $v0, $s3, 7 /* 36145C E005C51C 30420FFF */ andi $v0, $v0, 0xFFF /* 361460 E005C520 00021300 */ sll $v0, $v0, 12 /* 361464 E005C524 3C04F200 */ lui $a0, (0xF2000080 >> 16) /* 361468 E005C528 00441025 */ or $v0, $v0, $a0 /* 36146C E005C52C 00139940 */ sll $s3, $s3, 5 /* 361470 E005C530 ACC20010 */ sw $v0, 0x10($a2) /* 361474 E005C534 26620020 */ addiu $v0, $s3, 0x20 /* 361478 E005C538 00021080 */ sll $v0, $v0, 2 /* 36147C E005C53C 30420FFF */ andi $v0, $v0, 0xFFF /* 361480 E005C540 00022B00 */ sll $a1, $v0, 12 /* 361484 E005C544 34A20080 */ ori $v0, $a1, 0x80 /* 361488 E005C548 1280000F */ beqz $s4, .LE005C588 /* 36148C E005C54C ACC20014 */ sw $v0, 0x14($a2) /* 361490 E005C550 0080182D */ daddu $v1, $a0, $zero /* 361494 E005C554 34630080 */ ori $v1, $v1, (0xF2000080 & 0xFFFF) /* 361498 E005C558 3C040100 */ lui $a0, (0x1000100 >> 16) /* 36149C E005C55C 34840100 */ ori $a0, $a0, (0x1000100 & 0xFFFF) /* 3614A0 E005C560 24C20020 */ addiu $v0, $a2, 0x20 /* 3614A4 E005C564 00A31825 */ or $v1, $a1, $v1 /* 3614A8 E005C568 AEE20000 */ sw $v0, 0x0($s7) /* 3614AC E005C56C 26620040 */ addiu $v0, $s3, 0x40 /* 3614B0 E005C570 00021080 */ sll $v0, $v0, 2 /* 3614B4 E005C574 30420FFF */ andi $v0, $v0, 0xFFF /* 3614B8 E005C578 00021300 */ sll $v0, $v0, 12 /* 3614BC E005C57C 00441025 */ or $v0, $v0, $a0 /* 3614C0 E005C580 0801716D */ j .LE005C5B4 /* 3614C4 E005C584 ACC30018 */ sw $v1, 0x18($a2) .LE005C588: /* 3614C8 E005C588 3C030100 */ lui $v1, (0x1000080 >> 16) /* 3614CC E005C58C 34630080 */ ori $v1, $v1, (0x1000080 & 0xFFFF) /* 3614D0 E005C590 24C20020 */ addiu $v0, $a2, 0x20 /* 3614D4 E005C594 AEE20000 */ sw $v0, 0x0($s7) /* 3614D8 E005C598 00A41025 */ or $v0, $a1, $a0 /* 3614DC E005C59C ACC20018 */ sw $v0, 0x18($a2) /* 3614E0 E005C5A0 26620040 */ addiu $v0, $s3, 0x40 /* 3614E4 E005C5A4 00021080 */ sll $v0, $v0, 2 /* 3614E8 E005C5A8 30420FFF */ andi $v0, $v0, 0xFFF /* 3614EC E005C5AC 00021300 */ sll $v0, $v0, 12 /* 3614F0 E005C5B0 00431025 */ or $v0, $v0, $v1 .LE005C5B4: /* 3614F4 E005C5B4 ACC2001C */ sw $v0, 0x1C($a2) /* 3614F8 E005C5B8 8FC20008 */ lw $v0, 0x8($fp) /* 3614FC E005C5BC 24110001 */ addiu $s1, $zero, 0x1 /* 361500 E005C5C0 0222102A */ slt $v0, $s1, $v0 /* 361504 E005C5C4 10400037 */ beqz $v0, .LE005C6A4 /* 361508 E005C5C8 26D60034 */ addiu $s6, $s6, 0x34 /* 36150C E005C5CC 3C15800A */ lui $s5, %hi(gDisplayContext) /* 361510 E005C5D0 26B5A674 */ addiu $s5, $s5, %lo(gDisplayContext) /* 361514 E005C5D4 3C148007 */ lui $s4, %hi(gMatrixListPos) /* 361518 E005C5D8 269441F0 */ addiu $s4, $s4, %lo(gMatrixListPos) /* 36151C E005C5DC 3C130001 */ lui $s3, (0x11630 >> 16) /* 361520 E005C5E0 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 361524 E005C5E4 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 361528 E005C5E8 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 36152C E005C5EC 26D0000C */ addiu $s0, $s6, 0xC .LE005C5F0: /* 361530 E005C5F0 27A40018 */ addiu $a0, $sp, 0x18 /* 361534 E005C5F4 26310001 */ addiu $s1, $s1, 0x1 /* 361538 E005C5F8 8E05FFF8 */ lw $a1, -0x8($s0) /* 36153C E005C5FC 8E06FFFC */ lw $a2, -0x4($s0) /* 361540 E005C600 8E070000 */ lw $a3, 0x0($s0) /* 361544 E005C604 0C080108 */ jal shim_guTranslateF /* 361548 E005C608 26100034 */ addiu $s0, $s0, 0x34 /* 36154C E005C60C 27A40018 */ addiu $a0, $sp, 0x18 /* 361550 E005C610 96850000 */ lhu $a1, 0x0($s4) /* 361554 E005C614 8EA20000 */ lw $v0, 0x0($s5) /* 361558 E005C618 00052980 */ sll $a1, $a1, 6 /* 36155C E005C61C 00B32821 */ addu $a1, $a1, $s3 /* 361560 E005C620 0C080118 */ jal shim_guMtxF2L /* 361564 E005C624 00452821 */ addu $a1, $v0, $a1 /* 361568 E005C628 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 36156C E005C62C 8E440000 */ lw $a0, 0x0($s2) /* 361570 E005C630 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 361574 E005C634 0080282D */ daddu $a1, $a0, $zero /* 361578 E005C638 24840008 */ addiu $a0, $a0, 0x8 /* 36157C E005C63C AE440000 */ sw $a0, 0x0($s2) /* 361580 E005C640 96820000 */ lhu $v0, 0x0($s4) /* 361584 E005C644 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 361588 E005C648 ACA30000 */ sw $v1, 0x0($a1) /* 36158C E005C64C 24430001 */ addiu $v1, $v0, 0x1 /* 361590 E005C650 3042FFFF */ andi $v0, $v0, 0xFFFF /* 361594 E005C654 00021180 */ sll $v0, $v0, 6 /* 361598 E005C658 A6830000 */ sh $v1, 0x0($s4) /* 36159C E005C65C 8EA30000 */ lw $v1, 0x0($s5) /* 3615A0 E005C660 00531021 */ addu $v0, $v0, $s3 /* 3615A4 E005C664 00621821 */ addu $v1, $v1, $v0 /* 3615A8 E005C668 24820008 */ addiu $v0, $a0, 0x8 /* 3615AC E005C66C ACA30004 */ sw $v1, 0x4($a1) /* 3615B0 E005C670 AE420000 */ sw $v0, 0x0($s2) /* 3615B4 E005C674 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3615B8 E005C678 AC820000 */ sw $v0, 0x0($a0) /* 3615BC E005C67C 8FA900D8 */ lw $t1, 0xD8($sp) /* 3615C0 E005C680 24020040 */ addiu $v0, $zero, 0x40 /* 3615C4 E005C684 AC860008 */ sw $a2, 0x8($a0) /* 3615C8 E005C688 AC82000C */ sw $v0, 0xC($a0) /* 3615CC E005C68C AC890004 */ sw $t1, 0x4($a0) /* 3615D0 E005C690 8FC20008 */ lw $v0, 0x8($fp) /* 3615D4 E005C694 24840010 */ addiu $a0, $a0, 0x10 /* 3615D8 E005C698 0222102A */ slt $v0, $s1, $v0 /* 3615DC E005C69C 1440FFD4 */ bnez $v0, .LE005C5F0 /* 3615E0 E005C6A0 AE440000 */ sw $a0, 0x0($s2) .LE005C6A4: /* 3615E4 E005C6A4 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3615E8 E005C6A8 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3615EC E005C6AC 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3615F0 E005C6B0 8C620000 */ lw $v0, 0x0($v1) /* 3615F4 E005C6B4 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3615F8 E005C6B8 0040202D */ daddu $a0, $v0, $zero /* 3615FC E005C6BC 24420008 */ addiu $v0, $v0, 0x8 /* 361600 E005C6C0 AC620000 */ sw $v0, 0x0($v1) /* 361604 E005C6C4 24020040 */ addiu $v0, $zero, 0x40 /* 361608 E005C6C8 AC850000 */ sw $a1, 0x0($a0) /* 36160C E005C6CC AC820004 */ sw $v0, 0x4($a0) /* 361610 E005C6D0 8FBF0104 */ lw $ra, 0x104($sp) /* 361614 E005C6D4 8FBE0100 */ lw $fp, 0x100($sp) /* 361618 E005C6D8 8FB700FC */ lw $s7, 0xFC($sp) /* 36161C E005C6DC 8FB600F8 */ lw $s6, 0xF8($sp) /* 361620 E005C6E0 8FB500F4 */ lw $s5, 0xF4($sp) /* 361624 E005C6E4 8FB400F0 */ lw $s4, 0xF0($sp) /* 361628 E005C6E8 8FB300EC */ lw $s3, 0xEC($sp) /* 36162C E005C6EC 8FB200E8 */ lw $s2, 0xE8($sp) /* 361630 E005C6F0 8FB100E4 */ lw $s1, 0xE4($sp) /* 361634 E005C6F4 8FB000E0 */ lw $s0, 0xE0($sp) /* 361638 E005C6F8 03E00008 */ jr $ra /* 36163C E005C6FC 27BD0108 */ addiu $sp, $sp, 0x108 ### DECOMPILED C INSTRUCTIONS: void steam_burst_appendGfx(void* effect) { SteamBurstFXData* part = ((EffectInstance*)effect)->data.steamBurst; s32 unk_30_s32 = part->unk_30; s32 envAlpha = (part->unk_30 - unk_30_s32) * 256.0f; s32 cond = (unk_30_s32 == 6); Gfx* dlist = D_E005C700[part->unk_00]; Gfx* dlist2 = D_E005C704[part->unk_00]; 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); gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 130); 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); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80240D10 /* BD4580 80240D10 27BDFFC8 */ addiu $sp, $sp, -0x38 glabel func_80240D14 /* BD4584 80240D14 AFB20020 */ sw $s2, 0x20($sp) glabel func_80240D18 /* BD4588 80240D18 0080902D */ daddu $s2, $a0, $zero glabel func_80240D1C /* BD458C 80240D1C AFBF0028 */ sw $ra, 0x28($sp) .L80240D20: /* BD4590 80240D20 AFB30024 */ sw $s3, 0x24($sp) D_80240D24: /* BD4594 80240D24 AFB1001C */ sw $s1, 0x1C($sp) glabel func_80240D28 /* BD4598 80240D28 AFB00018 */ sw $s0, 0x18($sp) glabel .L80240D2C /* BD459C 80240D2C F7B40030 */ sdc1 $f20, 0x30($sp) glabel dead_11_FlyingAI_ChaseInit /* BD45A0 80240D30 0C00EABB */ jal get_npc_unsafe glabel .L80240D34 /* BD45A4 80240D34 8E44014C */ lw $a0, 0x14C($s2) flo_24_pad_D38: /* BD45A8 80240D38 0040802D */ daddu $s0, $v0, $zero glabel pra_40_EnablePartnerReflection /* BD45AC 80240D3C 8E430074 */ lw $v1, 0x74($s2) glabel dead_flo_08_DeadUnkFunc1 /* BD45B0 80240D40 8E110020 */ lw $s1, 0x20($s0) glabel func_80240D44 /* BD45B4 80240D44 2C62000E */ sltiu $v0, $v1, 0xE glabel func_80240D48 /* BD45B8 80240D48 8E330020 */ lw $s3, 0x20($s1) glabel mgm_00_PatrolAI_LosePlayer /* BD45BC 80240D4C 10400099 */ beqz $v0, omo_17_FlyingAI_WanderInit glabel func_80240D50 /* BD45C0 80240D50 00031080 */ sll $v0, $v1, 2 glabel func_80240D54 /* BD45C4 80240D54 3C018024 */ lui $at, %hi(jtbl_80246F00) glabel dead_flo_16_SuperBlock_PartnerSparkles2 /* BD45C8 80240D58 00220821 */ addu $at, $at, $v0 glabel func_80240D5C /* BD45CC 80240D5C 8C226F00 */ lw $v0, %lo(jtbl_80246F00)($at) glabel mim_08_FlyingAI_ChaseInit /* BD45D0 80240D60 00400008 */ jr $v0 glabel .L80240D64 /* BD45D4 80240D64 00000000 */ nop glabel func_80240D68 /* BD45D8 80240D68 C620000C */ lwc1 $f0, 0xC($s1) glabel func_80240D6C /* BD45DC 80240D6C C64C0078 */ lwc1 $f12, 0x78($s2) glabel func_80240D70 /* BD45E0 80240D70 46806320 */ cvt.s.w $f12, $f12 glabel func_80240D74 /* BD45E4 80240D74 0C00A6C9 */ jal clamp_angle glabel func_80240D78 /* BD45E8 80240D78 46006300 */ add.s $f12, $f12, $f0 glabel func_80240D7C /* BD45EC 80240D7C E600000C */ swc1 $f0, 0xC($s0) glabel dead_flo_08_AvoidPlayerAI_ChaseInit /* BD45F0 80240D80 8E630000 */ lw $v1, 0x0($s3) glabel mgm_01_DoubleScore /* BD45F4 80240D84 24020001 */ addiu $v0, $zero, 0x1 glabel omo_07_PatrolAI_ChaseInit /* BD45F8 80240D88 1462008A */ bne $v1, $v0, omo_17_FlyingAI_WanderInit .L80240D8C: /* BD45FC 80240D8C 24040014 */ addiu $a0, $zero, 0x14 glabel omo_11_SuperBlock_AnimateEnergyOrbs /* BD4600 80240D90 0C00A67F */ jal rand_int glabel .L80240D94 /* BD4604 80240D94 AE430074 */ sw $v1, 0x74($s2) D_80240D98: /* BD4608 80240D98 2442000A */ addiu $v0, $v0, 0xA D_80240D9C: /* BD460C 80240D9C 080903ED */ j omo_17_FlyingAI_WanderInit glabel dead_flo_16_SuperBlock_PartnerSparkles4 /* BD4610 80240DA0 A602008E */ sh $v0, 0x8E($s0) glabel func_80240DA4_EA9884 /* BD4614 80240DA4 C620000C */ lwc1 $f0, 0xC($s1) glabel func_80240DA8 /* BD4618 80240DA8 C64C0078 */ lwc1 $f12, 0x78($s2) glabel sam_08_MeleeHitbox_31 /* BD461C 80240DAC 46806320 */ cvt.s.w $f12, $f12 glabel .L80240DB0 /* BD4620 80240DB0 0C00A6C9 */ jal clamp_angle glabel mgm_00_PatrolNoAttackAI_15 /* BD4624 80240DB4 46006300 */ add.s $f12, $f12, $f0 glabel mgm_01_EndBowserPanelAnimation /* BD4628 80240DB8 9602008E */ lhu $v0, 0x8E($s0) glabel pra_31_UnkFunc12 /* BD462C 80240DBC E600000C */ swc1 $f0, 0xC($s0) glabel func_80240DC0 /* BD4630 80240DC0 2442FFFF */ addiu $v0, $v0, -0x1 glabel dead_kzn_17_func_80240DC4_EA16C4 /* BD4634 80240DC4 A602008E */ sh $v0, 0x8E($s0) glabel .L80240DC8 /* BD4638 80240DC8 00021400 */ sll $v0, $v0, 16 glabel func_80240DCC /* BD463C 80240DCC 14400079 */ bnez $v0, omo_17_FlyingAI_WanderInit glabel func_80240DD0 /* BD4640 80240DD0 3C04B000 */ lui $a0, (0xB000000F >> 16) glabel .L80240DD4 /* BD4644 80240DD4 C6000040 */ lwc1 $f0, 0x40($s0) glabel .L80240DD8 /* BD4648 80240DD8 3484000F */ ori $a0, $a0, (0xB000000F & 0xFFFF) D_80240DDC: /* BD464C 80240DDC E7A00010 */ swc1 $f0, 0x10($sp) glabel func_80240DE0 /* BD4650 80240DE0 8E060038 */ lw $a2, 0x38($s0) D_80240DE4: /* BD4654 80240DE4 8E07003C */ lw $a3, 0x3C($s0) glabel dead_flo_16_SuperBlock_WaitForPlayerToLand /* BD4658 80240DE8 0C052757 */ jal sfx_play_sound_at_position glabel func_80240DEC /* BD465C 80240DEC 0000282D */ daddu $a1, $zero, $zero glabel func_80240DF0 /* BD4660 80240DF0 24020002 */ addiu $v0, $zero, 0x2 glabel func_80240DF4 /* BD4664 80240DF4 AE420074 */ sw $v0, 0x74($s2) glabel func_80240DF8 /* BD4668 80240DF8 C6000038 */ lwc1 $f0, 0x38($s0) glabel func_80240DFC /* BD466C 80240DFC C602003C */ lwc1 $f2, 0x3C($s0) glabel func_80240E00 /* BD4670 80240E00 C6040040 */ lwc1 $f4, 0x40($s0) D_80240E04: /* BD4674 80240E04 A600008E */ sh $zero, 0x8E($s0) glabel flo_22_pad_E08 /* BD4678 80240E08 E6000060 */ swc1 $f0, 0x60($s0) glabel func_80240E0C /* BD467C 80240E0C E6020064 */ swc1 $f2, 0x64($s0) D_80240E10: /* BD4680 80240E10 080903ED */ j omo_17_FlyingAI_WanderInit glabel func_80240E14 /* BD4684 80240E14 E6040068 */ swc1 $f4, 0x68($s0) glabel dead_flo_16_IsPlayerPounding /* BD4688 80240E18 C620000C */ lwc1 $f0, 0xC($s1) glabel func_80240E1C /* BD468C 80240E1C C64C0078 */ lwc1 $f12, 0x78($s2) glabel func_80240E20 /* BD4690 80240E20 46806320 */ cvt.s.w $f12, $f12 D_80240E24: /* BD4694 80240E24 0C00A6C9 */ jal clamp_angle glabel flo_12_pad_E28 /* BD4698 80240E28 46006300 */ add.s $f12, $f12, $f0 glabel func_80240E2C /* BD469C 80240E2C 46000506 */ mov.s $f20, $f0 D_80240E30: /* BD46A0 80240E30 4406A000 */ mfc1 $a2, $f20 glabel func_80240E34 /* BD46A4 80240E34 00000000 */ nop glabel func_80240E38 /* BD46A8 80240E38 AE06000C */ sw $a2, 0xC($s0) D_80240E3C: /* BD46AC 80240E3C C6200038 */ lwc1 $f0, 0x38($s1) D_80240E40: /* BD46B0 80240E40 E6000038 */ swc1 $f0, 0x38($s0) .L80240E44: /* BD46B4 80240E44 C6200040 */ lwc1 $f0, 0x40($s1) glabel func_80240E48 /* BD46B8 80240E48 E6000040 */ swc1 $f0, 0x40($s0) glabel func_80240E4C /* BD46BC 80240E4C 8E250010 */ lw $a1, 0x10($s1) glabel dead_flo_16_FlyingAI_WanderInit /* BD46C0 80240E50 0C00EA95 */ jal npc_move_heading glabel func_80240E54 /* BD46C4 80240E54 0200202D */ daddu $a0, $s0, $zero glabel func_80240E58 /* BD46C8 80240E58 8602008E */ lh $v0, 0x8E($s0) D_80240E5C: /* BD46CC 80240E5C 3C014220 */ lui $at, (0x42200000 >> 16) glabel func_80240E60 /* BD46D0 80240E60 44817000 */ mtc1 $at, $f14 glabel dead_11_FlyingAI_Chase /* BD46D4 80240E64 44820000 */ mtc1 $v0, $f0 D_80240E68: /* BD46D8 80240E68 00000000 */ nop glabel func_80240E6C /* BD46DC 80240E6C 46800020 */ cvt.s.w $f0, $f0 glabel func_80240E70 /* BD46E0 80240E70 46007001 */ sub.s $f0, $f14, $f0 glabel func_80240E74 /* BD46E4 80240E74 460E0003 */ div.s $f0, $f0, $f14 glabel .L80240E78 /* BD46E8 80240E78 46000002 */ mul.s $f0, $f0, $f0 glabel .L80240E7C /* BD46EC 80240E7C 00000000 */ nop glabel func_80240E80 /* BD46F0 80240E80 C60C0038 */ lwc1 $f12, 0x38($s0) glabel dead_flo_13_FlyingAI_ChaseInit /* BD46F4 80240E84 C6060060 */ lwc1 $f6, 0x60($s0) flo_18_pad_E88: /* BD46F8 80240E88 46066181 */ sub.s $f6, $f12, $f6 glabel sam_02_Quizmo_RenderInit /* BD46FC 80240E8C 46003182 */ mul.s $f6, $f6, $f0 D_80240E90: /* BD4700 80240E90 00000000 */ nop glabel func_80240E94 /* BD4704 80240E94 C60A0040 */ lwc1 $f10, 0x40($s0) glabel func_80240E98 /* BD4708 80240E98 C6080068 */ lwc1 $f8, 0x68($s0) glabel func_80240E9C /* BD470C 80240E9C C624003C */ lwc1 $f4, 0x3C($s1) glabel .L80240EA0 /* BD4710 80240EA0 46085201 */ sub.s $f8, $f10, $f8 glabel flo_03_pad_EA4 /* BD4714 80240EA4 3C01447A */ lui $at, (0x447A0000 >> 16) glabel func_80240EA8 /* BD4718 80240EA8 44811000 */ mtc1 $at, $f2 glabel func_80240EAC /* BD471C 80240EAC 00000000 */ nop glabel func_80240EB0 /* BD4720 80240EB0 46022100 */ add.s $f4, $f4, $f2 glabel func_80240EB4 /* BD4724 80240EB4 46004202 */ mul.s $f8, $f8, $f0 glabel func_80240EB8 /* BD4728 80240EB8 00000000 */ nop glabel sam_11_Quizmo_UpdateRecords /* BD472C 80240EBC E604003C */ swc1 $f4, 0x3C($s0) glabel end_01_CharAnim_FadeIn_5 /* BD4730 80240EC0 46002006 */ mov.s $f0, $f4 glabel .L80240EC4 /* BD4734 80240EC4 C6040064 */ lwc1 $f4, 0x64($s0) glabel dead_11_FlyingAI_LosePlayer /* BD4738 80240EC8 46040001 */ sub.s $f0, $f0, $f4 glabel func_80240ECC /* BD473C 80240ECC 44821000 */ mtc1 $v0, $f2 glabel func_80240ED0 /* BD4740 80240ED0 00000000 */ nop glabel .L80240ED4 /* BD4744 80240ED4 468010A0 */ cvt.s.w $f2, $f2 glabel sam_02_Quizmo_NPC_Aux_Impl /* BD4748 80240ED8 46020002 */ mul.s $f0, $f0, $f2 glabel omo_02_GuardAI_IdleInit /* BD474C 80240EDC 00000000 */ nop D_80240EE0: /* BD4750 80240EE0 9602008E */ lhu $v0, 0x8E($s0) glabel .L80240EE4 /* BD4754 80240EE4 24030028 */ addiu $v1, $zero, 0x28 glabel pra_39_worker_reflect_partner_floor /* BD4758 80240EE8 24420001 */ addiu $v0, $v0, 0x1 glabel func_80240EEC /* BD475C 80240EEC 46066301 */ sub.s $f12, $f12, $f6 D_80240EF0: /* BD4760 80240EF0 A602008E */ sh $v0, 0x8E($s0) glabel sam_08_MeleeHitbox_33 /* BD4764 80240EF4 00021400 */ sll $v0, $v0, 16 glabel func_80240EF8 /* BD4768 80240EF8 46085281 */ sub.s $f10, $f10, $f8 glabel dead_flo_09_FlyingAI_JumpInit /* BD476C 80240EFC 00021403 */ sra $v0, $v0, 16 glabel func_80240F00 /* BD4770 80240F00 460E0003 */ div.s $f0, $f0, $f14 glabel func_80240F04 /* BD4774 80240F04 46040000 */ add.s $f0, $f0, $f4 flo_03_varStash: /* BD4778 80240F08 E60C0038 */ swc1 $f12, 0x38($s0) D_80240F0C: /* BD477C 80240F0C E60A0040 */ swc1 $f10, 0x40($s0) glabel func_80240F10 /* BD4780 80240F10 14430028 */ bne $v0, $v1, omo_17_FlyingAI_WanderInit glabel func_80240F14 /* BD4784 80240F14 E600003C */ swc1 $f0, 0x3C($s0) glabel func_80240F18 /* BD4788 80240F18 080903EC */ j func_80240FB0_EB9E00 glabel func_80240F1C /* BD478C 80240F1C 2402000A */ addiu $v0, $zero, 0xA glabel func_80240F20 /* BD4790 80240F20 C620000C */ lwc1 $f0, 0xC($s1) glabel .L80240F24 /* BD4794 80240F24 C64C0078 */ lwc1 $f12, 0x78($s2) dead_flo_03_varStash: /* BD4798 80240F28 46806320 */ cvt.s.w $f12, $f12 glabel func_80240F2C_D7FC8C /* BD479C 80240F2C 0C00A6C9 */ jal clamp_angle glabel func_80240F30 /* BD47A0 80240F30 46006300 */ add.s $f12, $f12, $f0 glabel .L80240F34 /* BD47A4 80240F34 46000506 */ mov.s $f20, $f0 glabel func_80240F38 /* BD47A8 80240F38 0240202D */ daddu $a0, $s2, $zero D_80240F3C: /* BD47AC 80240F3C 3C05FD05 */ lui $a1, (0xFD050F82 >> 16) glabel func_80240F40_EB9D90 /* BD47B0 80240F40 34A50F82 */ ori $a1, $a1, (0xFD050F82 & 0xFFFF) glabel func_80240F44 /* BD47B4 80240F44 0C0B1EAF */ jal evt_get_variable glabel func_80240F48 /* BD47B8 80240F48 E614000C */ swc1 $f20, 0xC($s0) glabel func_80240F4C /* BD47BC 80240F4C 24030001 */ addiu $v1, $zero, 0x1 glabel pra_39_SwooperAI_Main /* BD47C0 80240F50 14430002 */ bne $v0, $v1, .L80240F5C glabel func_80240F54_DE33E4 /* BD47C4 80240F54 2402000D */ addiu $v0, $zero, 0xD glabel func_80240F58 /* BD47C8 80240F58 AE420074 */ sw $v0, 0x74($s2) .L80240F5C: /* BD47CC 80240F5C C6200038 */ lwc1 $f0, 0x38($s1) glabel func_80240F60_D4DFA0 /* BD47D0 80240F60 4406A000 */ mfc1 $a2, $f20 D_80240F64: /* BD47D4 80240F64 E6000038 */ swc1 $f0, 0x38($s0) glabel func_80240F68 /* BD47D8 80240F68 C6200040 */ lwc1 $f0, 0x40($s1) D_80240F6C: /* BD47DC 80240F6C E6000040 */ swc1 $f0, 0x40($s0) glabel func_80240F70 /* BD47E0 80240F70 8E250010 */ lw $a1, 0x10($s1) glabel dead_flo_09lo_09_FlyingAI_Jump /* BD47E4 80240F74 0C00EA95 */ jal npc_move_heading glabel func_80240F78 /* BD47E8 80240F78 0200202D */ daddu $a0, $s0, $zero glabel omo_04_FlyingAI_JumpInit /* BD47EC 80240F7C C620003C */ lwc1 $f0, 0x3C($s1) glabel func_80240F80 /* BD47F0 80240F80 3C01447A */ lui $at, (0x447A0000 >> 16) glabel func_80240F84 /* BD47F4 80240F84 44811000 */ mtc1 $at, $f2 glabel kzn_04_SuperBlock_PartnerSparkles2 /* BD47F8 80240F88 00000000 */ nop glabel func_80240F8C /* BD47FC 80240F8C 46020000 */ add.s $f0, $f0, $f2 glabel func_80240F90 /* BD4800 80240F90 080903ED */ j omo_17_FlyingAI_WanderInit glabel func_80240F94 /* BD4804 80240F94 E600003C */ swc1 $f0, 0x3C($s0) glabel .L80240F98 /* BD4808 80240F98 0240202D */ daddu $a0, $s2, $zero glabel func_80240F9C /* BD480C 80240F9C 3C05FD05 */ lui $a1, (0xFD050F82 >> 16) glabel func_80240FA0 /* BD4810 80240FA0 0C0B1EAF */ jal evt_get_variable glabel func_80240FA4 /* BD4814 80240FA4 34A50F82 */ ori $a1, $a1, (0xFD050F82 & 0xFFFF) glabel func_80240FA8 /* BD4818 80240FA8 14400002 */ bnez $v0, omo_17_FlyingAI_WanderInit glabel func_80240FAC /* BD481C 80240FAC 2402000A */ addiu $v0, $zero, 0xA glabel func_80240FB0_EB9E00 /* BD4820 80240FB0 AE420074 */ sw $v0, 0x74($s2) glabel omo_17_FlyingAI_WanderInit /* BD4824 80240FB4 8FBF0028 */ lw $ra, 0x28($sp) glabel func_80240FB8 /* BD4828 80240FB8 8FB30024 */ lw $s3, 0x24($sp) glabel func_80240FBC /* BD482C 80240FBC 8FB20020 */ lw $s2, 0x20($sp) glabel func_80240FC0 /* BD4830 80240FC0 8FB1001C */ lw $s1, 0x1C($sp) glabel func_80240FC4 /* BD4834 80240FC4 8FB00018 */ lw $s0, 0x18($sp) .L80240FC8: /* BD4838 80240FC8 D7B40030 */ ldc1 $f20, 0x30($sp) glabel func_80240FCC /* BD483C 80240FCC 24020002 */ addiu $v0, $zero, 0x2 tst_04_B_80240FD0: /* BD4840 80240FD0 03E00008 */ jr $ra glabel func_80240FD4 /* BD4844 80240FD4 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(func_80240D10_BD4580) { Npc* npc = get_npc_unsafe(script->owner2.npcID); Npc* hiddenBoo = npc->blur.keepAwayNpc; f32 posX, posY, posZ; f32 interpAlpha, alphaSquared; f32 deltaX, deltaZ; s32* isGameStarted; f32 yaw; isGameStarted = hiddenBoo->blur.keepAwayStarted; switch (script->functionTemp[1]) { case RING_STATE_0: npc->yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw); if (*isGameStarted == TRUE) { script->functionTemp[1] = RING_STATE_1; npc->duration = rand_int(20) + 10; } break; case RING_STATE_1: yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw); npc->yaw = yaw; npc->duration--; if (npc->duration == 0) { sfx_play_sound_at_position(SOUND_B000000F, SOUND_SPACE_MODE_0, npc->pos.x, npc->pos.y, npc->pos.z); script->functionTemp[1] = RING_STATE_2; npc->duration = 0; npc->moveToPos.x = npc->pos.x; npc->moveToPos.y = npc->pos.y; npc->moveToPos.z = npc->pos.z; } break; case RING_STATE_2: // here `moveToPos` is original position yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw); npc->yaw = yaw; npc->pos.x = hiddenBoo->pos.x; npc->pos.z = hiddenBoo->pos.z; npc_move_heading(npc, hiddenBoo->planarFlyDist, yaw); interpAlpha = (40.0f - npc->duration) / 40.0f; alphaSquared = interpAlpha * interpAlpha; posX = npc->pos.x; posY = hiddenBoo->pos.y + 1000.0f; posZ = npc->pos.z; deltaX = (npc->pos.x - npc->moveToPos.x) * alphaSquared; deltaZ = (npc->pos.z - npc->moveToPos.z) * alphaSquared; npc->pos.y = posY; npc->pos.x = posX - deltaX; npc->pos.y = (npc->pos.y - npc->moveToPos.y) * npc->duration / 40.0f + npc->moveToPos.y; npc->pos.z = posZ - deltaZ; npc->duration++; if (npc->duration == 40) { script->functionTemp[1] = RING_STATE_10; } break; case RING_STATE_10: yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw); npc->yaw = yaw; if (evt_get_variable(script, MV_Unk_02) == 1) { script->functionTemp[1] = RING_STATE_13; } npc->pos.x = hiddenBoo->pos.x; npc->pos.z = hiddenBoo->pos.z; npc_move_heading(npc, hiddenBoo->planarFlyDist, yaw); npc->pos.y = hiddenBoo->pos.y + 1000.0f; break; case RING_STATE_13: if (evt_get_variable(script, MV_Unk_02) == 0) { script->functionTemp[1] = RING_STATE_10; } break; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel tubba_heart_attack_appendGfx /* 3D2060 E00CC9D0 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 3D2064 E00CC9D4 0080302D */ daddu $a2, $a0, $zero /* 3D2068 E00CC9D8 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3D206C E00CC9DC 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3D2070 E00CC9E0 27A40018 */ addiu $a0, $sp, 0x18 /* 3D2074 E00CC9E4 AFB100A4 */ sw $s1, 0xA4($sp) /* 3D2078 E00CC9E8 3C110001 */ lui $s1, (0x11630 >> 16) /* 3D207C E00CC9EC 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 3D2080 E00CC9F0 AFB600B8 */ sw $s6, 0xB8($sp) /* 3D2084 E00CC9F4 0000B02D */ daddu $s6, $zero, $zero /* 3D2088 E00CC9F8 27A20058 */ addiu $v0, $sp, 0x58 /* 3D208C E00CC9FC AFB300AC */ sw $s3, 0xAC($sp) /* 3D2090 E00CCA00 0040982D */ daddu $s3, $v0, $zero /* 3D2094 E00CCA04 3C02800A */ lui $v0, %hi(gDisplayContext) /* 3D2098 E00CCA08 2442A674 */ addiu $v0, $v0, %lo(gDisplayContext) /* 3D209C E00CCA0C AFBE00C0 */ sw $fp, 0xC0($sp) /* 3D20A0 E00CCA10 0040F02D */ daddu $fp, $v0, $zero /* 3D20A4 E00CCA14 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 3D20A8 E00CCA18 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos) /* 3D20AC E00CCA1C AFB500B4 */ sw $s5, 0xB4($sp) /* 3D20B0 E00CCA20 0040A82D */ daddu $s5, $v0, $zero /* 3D20B4 E00CCA24 AFB700BC */ sw $s7, 0xBC($sp) /* 3D20B8 E00CCA28 3C170001 */ lui $s7, (0x11630 >> 16) /* 3D20BC E00CCA2C 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* 3D20C0 E00CCA30 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 3D20C4 E00CCA34 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 3D20C8 E00CCA38 AFB400B0 */ sw $s4, 0xB0($sp) /* 3D20CC E00CCA3C 0040A02D */ daddu $s4, $v0, $zero /* 3D20D0 E00CCA40 3C08800B */ lui $t0, %hi(gCameras) /* 3D20D4 E00CCA44 25081D80 */ addiu $t0, $t0, %lo(gCameras) /* 3D20D8 E00CCA48 AFBF00C4 */ sw $ra, 0xC4($sp) /* 3D20DC E00CCA4C AFB200A8 */ sw $s2, 0xA8($sp) /* 3D20E0 E00CCA50 AFB000A0 */ sw $s0, 0xA0($sp) /* 3D20E4 E00CCA54 F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 3D20E8 E00CCA58 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 3D20EC E00CCA5C 8E850000 */ lw $a1, 0x0($s4) /* 3D20F0 E00CCA60 4480A000 */ mtc1 $zero, $f20 /* 3D20F4 E00CCA64 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3D20F8 E00CCA68 4481B000 */ mtc1 $at, $f22 /* 3D20FC E00CCA6C 8CC2000C */ lw $v0, 0xC($a2) /* 3D2100 E00CCA70 00A0182D */ daddu $v1, $a1, $zero /* 3D2104 E00CCA74 24A50008 */ addiu $a1, $a1, 0x8 /* 3D2108 E00CCA78 0040902D */ daddu $s2, $v0, $zero /* 3D210C E00CCA7C AE850000 */ sw $a1, 0x0($s4) /* 3D2110 E00CCA80 8E500024 */ lw $s0, 0x24($s2) /* 3D2114 E00CCA84 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D2118 E00CCA88 AC620000 */ sw $v0, 0x0($v1) /* 3D211C E00CCA8C AC600004 */ sw $zero, 0x4($v1) /* 3D2120 E00CCA90 ACA70000 */ sw $a3, 0x0($a1) /* 3D2124 E00CCA94 8CC30010 */ lw $v1, 0x10($a2) /* 3D2128 E00CCA98 24A20008 */ addiu $v0, $a1, 0x8 /* 3D212C E00CCA9C AE820000 */ sw $v0, 0x0($s4) /* 3D2130 E00CCAA0 8C62001C */ lw $v0, 0x1C($v1) /* 3D2134 E00CCAA4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3D2138 E00CCAA8 00431021 */ addu $v0, $v0, $v1 /* 3D213C E00CCAAC ACA20004 */ sw $v0, 0x4($a1) /* 3D2140 E00CCAB0 8E450004 */ lw $a1, 0x4($s2) /* 3D2144 E00CCAB4 8E460008 */ lw $a2, 0x8($s2) /* 3D2148 E00CCAB8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3D214C E00CCABC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3D2150 E00CCAC0 8E47000C */ lw $a3, 0xC($s2) /* 3D2154 E00CCAC4 00031080 */ sll $v0, $v1, 2 /* 3D2158 E00CCAC8 00431021 */ addu $v0, $v0, $v1 /* 3D215C E00CCACC 00021080 */ sll $v0, $v0, 2 /* 3D2160 E00CCAD0 00431023 */ subu $v0, $v0, $v1 /* 3D2164 E00CCAD4 000218C0 */ sll $v1, $v0, 3 /* 3D2168 E00CCAD8 00431021 */ addu $v0, $v0, $v1 /* 3D216C E00CCADC 000210C0 */ sll $v0, $v0, 3 /* 3D2170 E00CCAE0 00481021 */ addu $v0, $v0, $t0 /* 3D2174 E00CCAE4 0C080108 */ jal shim_guTranslateF /* 3D2178 E00CCAE8 AFA20098 */ sw $v0, 0x98($sp) /* 3D217C E00CCAEC 8E450028 */ lw $a1, 0x28($s2) /* 3D2180 E00CCAF0 0260202D */ daddu $a0, $s3, $zero /* 3D2184 E00CCAF4 00A0302D */ daddu $a2, $a1, $zero /* 3D2188 E00CCAF8 0C080110 */ jal shim_guScaleF /* 3D218C E00CCAFC 00A0382D */ daddu $a3, $a1, $zero /* 3D2190 E00CCB00 0260202D */ daddu $a0, $s3, $zero /* 3D2194 E00CCB04 27A50018 */ addiu $a1, $sp, 0x18 /* 3D2198 E00CCB08 0C080114 */ jal shim_guMtxCatF /* 3D219C E00CCB0C 00A0302D */ daddu $a2, $a1, $zero /* 3D21A0 E00CCB10 27A40018 */ addiu $a0, $sp, 0x18 /* 3D21A4 E00CCB14 96A50000 */ lhu $a1, 0x0($s5) /* 3D21A8 E00CCB18 8FC20000 */ lw $v0, 0x0($fp) /* 3D21AC E00CCB1C 00052980 */ sll $a1, $a1, 6 /* 3D21B0 E00CCB20 00B12821 */ addu $a1, $a1, $s1 /* 3D21B4 E00CCB24 0C080118 */ jal shim_guMtxF2L /* 3D21B8 E00CCB28 00452821 */ addu $a1, $v0, $a1 /* 3D21BC E00CCB2C 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3D21C0 E00CCB30 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3D21C4 E00CCB34 321000FF */ andi $s0, $s0, 0xFF /* 3D21C8 E00CCB38 8E840000 */ lw $a0, 0x0($s4) /* 3D21CC E00CCB3C 96A20000 */ lhu $v0, 0x0($s5) /* 3D21D0 E00CCB40 0080282D */ daddu $a1, $a0, $zero /* 3D21D4 E00CCB44 24840008 */ addiu $a0, $a0, 0x8 /* 3D21D8 E00CCB48 AE840000 */ sw $a0, 0x0($s4) /* 3D21DC E00CCB4C ACA30000 */ sw $v1, 0x0($a1) /* 3D21E0 E00CCB50 24430001 */ addiu $v1, $v0, 0x1 /* 3D21E4 E00CCB54 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D21E8 E00CCB58 00021180 */ sll $v0, $v0, 6 /* 3D21EC E00CCB5C A6A30000 */ sh $v1, 0x0($s5) /* 3D21F0 E00CCB60 8FC30000 */ lw $v1, 0x0($fp) /* 3D21F4 E00CCB64 00511021 */ addu $v0, $v0, $s1 /* 3D21F8 E00CCB68 00621821 */ addu $v1, $v1, $v0 /* 3D21FC E00CCB6C 24820008 */ addiu $v0, $a0, 0x8 /* 3D2200 E00CCB70 ACA30004 */ sw $v1, 0x4($a1) /* 3D2204 E00CCB74 AE820000 */ sw $v0, 0x0($s4) /* 3D2208 E00CCB78 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3D220C E00CCB7C AC820000 */ sw $v0, 0x0($a0) /* 3D2210 E00CCB80 9243001B */ lbu $v1, 0x1B($s2) /* 3D2214 E00CCB84 9245001F */ lbu $a1, 0x1F($s2) /* 3D2218 E00CCB88 92460023 */ lbu $a2, 0x23($s2) /* 3D221C E00CCB8C 24820010 */ addiu $v0, $a0, 0x10 /* 3D2220 E00CCB90 AE820000 */ sw $v0, 0x0($s4) /* 3D2224 E00CCB94 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3D2228 E00CCB98 AC820008 */ sw $v0, 0x8($a0) /* 3D222C E00CCB9C 24820018 */ addiu $v0, $a0, 0x18 /* 3D2230 E00CCBA0 AC80000C */ sw $zero, 0xC($a0) /* 3D2234 E00CCBA4 AE820000 */ sw $v0, 0x0($s4) /* 3D2238 E00CCBA8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D223C E00CCBAC AC820010 */ sw $v0, 0x10($a0) /* 3D2240 E00CCBB0 3C020900 */ lui $v0, %hi(D_09000400_415460) /* 3D2244 E00CCBB4 24420400 */ addiu $v0, $v0, %lo(D_09000400_415460) /* 3D2248 E00CCBB8 AC820014 */ sw $v0, 0x14($a0) /* 3D224C E00CCBBC 00031E00 */ sll $v1, $v1, 24 /* 3D2250 E00CCBC0 00052C00 */ sll $a1, $a1, 16 /* 3D2254 E00CCBC4 00651825 */ or $v1, $v1, $a1 /* 3D2258 E00CCBC8 00063200 */ sll $a2, $a2, 8 /* 3D225C E00CCBCC 00661825 */ or $v1, $v1, $a2 /* 3D2260 E00CCBD0 00701825 */ or $v1, $v1, $s0 /* 3D2264 E00CCBD4 AC830004 */ sw $v1, 0x4($a0) .LE00CCBD8: /* 3D2268 E00CCBD8 8E4306D0 */ lw $v1, 0x6D0($s2) /* 3D226C E00CCBDC 5060005F */ beql $v1, $zero, .LE00CCD5C /* 3D2270 E00CCBE0 26D60001 */ addiu $s6, $s6, 0x1 /* 3D2274 E00CCBE4 24020007 */ addiu $v0, $zero, 0x7 /* 3D2278 E00CCBE8 5062005C */ beql $v1, $v0, .LE00CCD5C /* 3D227C E00CCBEC 26D60001 */ addiu $s6, $s6, 0x1 /* 3D2280 E00CCBF0 E7B40010 */ swc1 $f20, 0x10($sp) /* 3D2284 E00CCBF4 8E4504DC */ lw $a1, 0x4DC($s2) /* 3D2288 E00CCBF8 4406A000 */ mfc1 $a2, $f20 /* 3D228C E00CCBFC 4407B000 */ mfc1 $a3, $f22 /* 3D2290 E00CCC00 0C080104 */ jal shim_guRotateF /* 3D2294 E00CCC04 27A40018 */ addiu $a0, $sp, 0x18 /* 3D2298 E00CCC08 8E45002C */ lw $a1, 0x2C($s2) /* 3D229C E00CCC0C 8E460090 */ lw $a2, 0x90($s2) /* 3D22A0 E00CCC10 8E4700F4 */ lw $a3, 0xF4($s2) /* 3D22A4 E00CCC14 0C080108 */ jal shim_guTranslateF /* 3D22A8 E00CCC18 0260202D */ daddu $a0, $s3, $zero /* 3D22AC E00CCC1C 0260202D */ daddu $a0, $s3, $zero /* 3D22B0 E00CCC20 27A50018 */ addiu $a1, $sp, 0x18 /* 3D22B4 E00CCC24 0C080114 */ jal shim_guMtxCatF /* 3D22B8 E00CCC28 00A0302D */ daddu $a2, $a1, $zero /* 3D22BC E00CCC2C 4406A000 */ mfc1 $a2, $f20 /* 3D22C0 E00CCC30 C64004DC */ lwc1 $f0, 0x4DC($s2) /* 3D22C4 E00CCC34 4407B000 */ mfc1 $a3, $f22 /* 3D22C8 E00CCC38 46000007 */ neg.s $f0, $f0 /* 3D22CC E00CCC3C 44050000 */ mfc1 $a1, $f0 /* 3D22D0 E00CCC40 0260202D */ daddu $a0, $s3, $zero /* 3D22D4 E00CCC44 0C080104 */ jal shim_guRotateF /* 3D22D8 E00CCC48 E7B40010 */ swc1 $f20, 0x10($sp) /* 3D22DC E00CCC4C 0260202D */ daddu $a0, $s3, $zero /* 3D22E0 E00CCC50 27A50018 */ addiu $a1, $sp, 0x18 /* 3D22E4 E00CCC54 0C080114 */ jal shim_guMtxCatF /* 3D22E8 E00CCC58 00A0302D */ daddu $a2, $a1, $zero /* 3D22EC E00CCC5C E7B60010 */ swc1 $f22, 0x10($sp) /* 3D22F0 E00CCC60 8E450478 */ lw $a1, 0x478($s2) /* 3D22F4 E00CCC64 4406A000 */ mfc1 $a2, $f20 /* 3D22F8 E00CCC68 4407A000 */ mfc1 $a3, $f20 /* 3D22FC E00CCC6C 0C080104 */ jal shim_guRotateF /* 3D2300 E00CCC70 0260202D */ daddu $a0, $s3, $zero /* 3D2304 E00CCC74 0260202D */ daddu $a0, $s3, $zero /* 3D2308 E00CCC78 27A50018 */ addiu $a1, $sp, 0x18 /* 3D230C E00CCC7C 0C080114 */ jal shim_guMtxCatF /* 3D2310 E00CCC80 00A0302D */ daddu $a2, $a1, $zero /* 3D2314 E00CCC84 8E4503B0 */ lw $a1, 0x3B0($s2) /* 3D2318 E00CCC88 8E460414 */ lw $a2, 0x414($s2) /* 3D231C E00CCC8C 4407B000 */ mfc1 $a3, $f22 /* 3D2320 E00CCC90 0C080110 */ jal shim_guScaleF /* 3D2324 E00CCC94 0260202D */ daddu $a0, $s3, $zero /* 3D2328 E00CCC98 0260202D */ daddu $a0, $s3, $zero /* 3D232C E00CCC9C 27A50018 */ addiu $a1, $sp, 0x18 /* 3D2330 E00CCCA0 0C080114 */ jal shim_guMtxCatF /* 3D2334 E00CCCA4 00A0302D */ daddu $a2, $a1, $zero /* 3D2338 E00CCCA8 27A40018 */ addiu $a0, $sp, 0x18 /* 3D233C E00CCCAC 96A50000 */ lhu $a1, 0x0($s5) /* 3D2340 E00CCCB0 8FC20000 */ lw $v0, 0x0($fp) /* 3D2344 E00CCCB4 00052980 */ sll $a1, $a1, 6 /* 3D2348 E00CCCB8 00B72821 */ addu $a1, $a1, $s7 /* 3D234C E00CCCBC 0C080118 */ jal shim_guMtxF2L /* 3D2350 E00CCCC0 00452821 */ addu $a1, $v0, $a1 /* 3D2354 E00CCCC4 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 3D2358 E00CCCC8 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 3D235C E00CCCCC 8E840000 */ lw $a0, 0x0($s4) /* 3D2360 E00CCCD0 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3D2364 E00CCCD4 0080282D */ daddu $a1, $a0, $zero /* 3D2368 E00CCCD8 24840008 */ addiu $a0, $a0, 0x8 /* 3D236C E00CCCDC AE840000 */ sw $a0, 0x0($s4) /* 3D2370 E00CCCE0 96A20000 */ lhu $v0, 0x0($s5) /* 3D2374 E00CCCE4 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3D2378 E00CCCE8 ACA30000 */ sw $v1, 0x0($a1) /* 3D237C E00CCCEC 24430001 */ addiu $v1, $v0, 0x1 /* 3D2380 E00CCCF0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D2384 E00CCCF4 00021180 */ sll $v0, $v0, 6 /* 3D2388 E00CCCF8 A6A30000 */ sh $v1, 0x0($s5) /* 3D238C E00CCCFC 8FC30000 */ lw $v1, 0x0($fp) /* 3D2390 E00CCD00 00571021 */ addu $v0, $v0, $s7 /* 3D2394 E00CCD04 00621821 */ addu $v1, $v1, $v0 /* 3D2398 E00CCD08 24820008 */ addiu $v0, $a0, 0x8 /* 3D239C E00CCD0C ACA30004 */ sw $v1, 0x4($a1) /* 3D23A0 E00CCD10 AE820000 */ sw $v0, 0x0($s4) /* 3D23A4 E00CCD14 24820010 */ addiu $v0, $a0, 0x10 /* 3D23A8 E00CCD18 AC860000 */ sw $a2, 0x0($a0) /* 3D23AC E00CCD1C AE820000 */ sw $v0, 0x0($s4) /* 3D23B0 E00CCD20 8FA90098 */ lw $t1, 0x98($sp) /* 3D23B4 E00CCD24 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3D23B8 E00CCD28 8D230204 */ lw $v1, 0x204($t1) /* 3D23BC E00CCD2C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3D23C0 E00CCD30 AC820008 */ sw $v0, 0x8($a0) /* 3D23C4 E00CCD34 3C020900 */ lui $v0, %hi(D_09000518_415578) /* 3D23C8 E00CCD38 24420518 */ addiu $v0, $v0, %lo(D_09000518_415578) /* 3D23CC E00CCD3C AC82000C */ sw $v0, 0xC($a0) /* 3D23D0 E00CCD40 24820018 */ addiu $v0, $a0, 0x18 /* 3D23D4 E00CCD44 AE820000 */ sw $v0, 0x0($s4) /* 3D23D8 E00CCD48 24020040 */ addiu $v0, $zero, 0x40 /* 3D23DC E00CCD4C AC870010 */ sw $a3, 0x10($a0) /* 3D23E0 E00CCD50 AC820014 */ sw $v0, 0x14($a0) /* 3D23E4 E00CCD54 AC830004 */ sw $v1, 0x4($a0) /* 3D23E8 E00CCD58 26D60001 */ addiu $s6, $s6, 0x1 .LE00CCD5C: /* 3D23EC E00CCD5C 2AC20019 */ slti $v0, $s6, 0x19 /* 3D23F0 E00CCD60 1440FF9D */ bnez $v0, .LE00CCBD8 /* 3D23F4 E00CCD64 26520004 */ addiu $s2, $s2, 0x4 /* 3D23F8 E00CCD68 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 3D23FC E00CCD6C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3D2400 E00CCD70 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3D2404 E00CCD74 8C620000 */ lw $v0, 0x0($v1) /* 3D2408 E00CCD78 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 3D240C E00CCD7C 0040202D */ daddu $a0, $v0, $zero /* 3D2410 E00CCD80 24420008 */ addiu $v0, $v0, 0x8 /* 3D2414 E00CCD84 AC620000 */ sw $v0, 0x0($v1) /* 3D2418 E00CCD88 24020040 */ addiu $v0, $zero, 0x40 /* 3D241C E00CCD8C AC850000 */ sw $a1, 0x0($a0) /* 3D2420 E00CCD90 AC820004 */ sw $v0, 0x4($a0) /* 3D2424 E00CCD94 8FBF00C4 */ lw $ra, 0xC4($sp) /* 3D2428 E00CCD98 8FBE00C0 */ lw $fp, 0xC0($sp) /* 3D242C E00CCD9C 8FB700BC */ lw $s7, 0xBC($sp) /* 3D2430 E00CCDA0 8FB600B8 */ lw $s6, 0xB8($sp) /* 3D2434 E00CCDA4 8FB500B4 */ lw $s5, 0xB4($sp) /* 3D2438 E00CCDA8 8FB400B0 */ lw $s4, 0xB0($sp) /* 3D243C E00CCDAC 8FB300AC */ lw $s3, 0xAC($sp) /* 3D2440 E00CCDB0 8FB200A8 */ lw $s2, 0xA8($sp) /* 3D2444 E00CCDB4 8FB100A4 */ lw $s1, 0xA4($sp) /* 3D2448 E00CCDB8 8FB000A0 */ lw $s0, 0xA0($sp) /* 3D244C E00CCDBC D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 3D2450 E00CCDC0 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 3D2454 E00CCDC4 03E00008 */ jr $ra /* 3D2458 E00CCDC8 27BD00D8 */ addiu $sp, $sp, 0xD8 /* 3D245C E00CCDCC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void tubba_heart_attack_appendGfx(void* effect) { TubbaHeartAttackFXData* data = ((EffectInstance*)effect)->data.tubbaHeartAttack; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_24 = data->unk_24; Matrix4f sp18; Matrix4f sp58; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C); shim_guScaleF(sp58, data->unk_28, data->unk_28, data->unk_28); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 0); gSPDisplayList(gMainGfxPos++, D_09000400_3D2980); for (i = 0; i < 25; i++) { if (data->unk_6D0[i] != 0 && data->unk_6D0[i] != 7) { shim_guRotateF(sp18, data->unk_4DC[i], 0.0f, 1.0f, 0.0f); shim_guTranslateF(sp58, data->unk_2C[i], data->unk_90[i], data->unk_F4[i]); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, -data->unk_4DC[i], 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, data->unk_478[i], 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, data->unk_3B0[i], data->unk_414[i], 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); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000518_3D2A98); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel damage_stars_appendGfx /* 342BA8 E0030A68 27BDFF20 */ addiu $sp, $sp, -0xE0 /* 342BAC E0030A6C 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 342BB0 E0030A70 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 342BB4 E0030A74 3C09800A */ lui $t1, %hi(gMainGfxPos) /* 342BB8 E0030A78 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos) /* 342BBC E0030A7C 3C0638E3 */ lui $a2, (0x38E38E39 >> 16) /* 342BC0 E0030A80 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 342BC4 E0030A84 AFBF00CC */ sw $ra, 0xCC($sp) /* 342BC8 E0030A88 AFBE00C8 */ sw $fp, 0xC8($sp) /* 342BCC E0030A8C AFB700C4 */ sw $s7, 0xC4($sp) /* 342BD0 E0030A90 AFB600C0 */ sw $s6, 0xC0($sp) /* 342BD4 E0030A94 AFB500BC */ sw $s5, 0xBC($sp) /* 342BD8 E0030A98 AFB400B8 */ sw $s4, 0xB8($sp) /* 342BDC E0030A9C AFB300B4 */ sw $s3, 0xB4($sp) /* 342BE0 E0030AA0 AFB200B0 */ sw $s2, 0xB0($sp) /* 342BE4 E0030AA4 AFB100AC */ sw $s1, 0xAC($sp) /* 342BE8 E0030AA8 AFB000A8 */ sw $s0, 0xA8($sp) /* 342BEC E0030AAC F7B600D8 */ sdc1 $f22, 0xD8($sp) /* 342BF0 E0030AB0 F7B400D0 */ sdc1 $f20, 0xD0($sp) /* 342BF4 E0030AB4 AFA400E0 */ sw $a0, 0xE0($sp) /* 342BF8 E0030AB8 8D240000 */ lw $a0, 0x0($t1) /* 342BFC E0030ABC 8FAA00E0 */ lw $t2, 0xE0($sp) /* 342C00 E0030AC0 0080182D */ daddu $v1, $a0, $zero /* 342C04 E0030AC4 8D47000C */ lw $a3, 0xC($t2) /* 342C08 E0030AC8 24840008 */ addiu $a0, $a0, 0x8 /* 342C0C E0030ACC AC620000 */ sw $v0, 0x0($v1) /* 342C10 E0030AD0 AC600004 */ sw $zero, 0x4($v1) /* 342C14 E0030AD4 AC850000 */ sw $a1, 0x0($a0) /* 342C18 E0030AD8 8D420010 */ lw $v0, 0x10($t2) /* 342C1C E0030ADC 34C68E39 */ ori $a2, $a2, (0x38E38E39 & 0xFFFF) /* 342C20 E0030AE0 8C43001C */ lw $v1, 0x1C($v0) /* 342C24 E0030AE4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 342C28 E0030AE8 AC820008 */ sw $v0, 0x8($a0) /* 342C2C E0030AEC 3C020900 */ lui $v0, %hi(D_090004C0_415520) /* 342C30 E0030AF0 244204C0 */ addiu $v0, $v0, %lo(D_090004C0_415520) /* 342C34 E0030AF4 AC82000C */ sw $v0, 0xC($a0) /* 342C38 E0030AF8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 342C3C E0030AFC 00621821 */ addu $v1, $v1, $v0 /* 342C40 E0030B00 AC830004 */ sw $v1, 0x4($a0) /* 342C44 E0030B04 8CE2002C */ lw $v0, 0x2C($a3) /* 342C48 E0030B08 0000A82D */ daddu $s5, $zero, $zero /* 342C4C E0030B0C AD240000 */ sw $a0, 0x0($t1) /* 342C50 E0030B10 2442FFFF */ addiu $v0, $v0, -0x1 /* 342C54 E0030B14 00021840 */ sll $v1, $v0, 1 /* 342C58 E0030B18 0062A021 */ addu $s4, $v1, $v0 /* 342C5C E0030B1C 24820008 */ addiu $v0, $a0, 0x8 /* 342C60 E0030B20 02860018 */ mult $s4, $a2 /* 342C64 E0030B24 24840010 */ addiu $a0, $a0, 0x10 /* 342C68 E0030B28 AD220000 */ sw $v0, 0x0($t1) /* 342C6C E0030B2C 001417C3 */ sra $v0, $s4, 31 /* 342C70 E0030B30 AD240000 */ sw $a0, 0x0($t1) /* 342C74 E0030B34 00005010 */ mfhi $t2 /* 342C78 E0030B38 000A18C3 */ sra $v1, $t2, 3 /* 342C7C E0030B3C 00621823 */ subu $v1, $v1, $v0 /* 342C80 E0030B40 000310C0 */ sll $v0, $v1, 3 /* 342C84 E0030B44 00431021 */ addu $v0, $v0, $v1 /* 342C88 E0030B48 8FAA00E0 */ lw $t2, 0xE0($sp) /* 342C8C E0030B4C 00021080 */ sll $v0, $v0, 2 /* 342C90 E0030B50 8D430008 */ lw $v1, 0x8($t2) /* 342C94 E0030B54 186000BE */ blez $v1, .LE0030E50 /* 342C98 E0030B58 0282A023 */ subu $s4, $s4, $v0 /* 342C9C E0030B5C 0120882D */ daddu $s1, $t1, $zero /* 342CA0 E0030B60 3C0A38E3 */ lui $t2, (0x38E38E39 >> 16) /* 342CA4 E0030B64 354A8E39 */ ori $t2, $t2, (0x38E38E39 & 0xFFFF) /* 342CA8 E0030B68 AFAA0098 */ sw $t2, 0x98($sp) /* 342CAC E0030B6C 27AA0058 */ addiu $t2, $sp, 0x58 /* 342CB0 E0030B70 3C168007 */ lui $s6, %hi(gMatrixListPos) /* 342CB4 E0030B74 26D641F0 */ addiu $s6, $s6, %lo(gMatrixListPos) /* 342CB8 E0030B78 3C130001 */ lui $s3, (0x11630 >> 16) /* 342CBC E0030B7C 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 342CC0 E0030B80 AFAA009C */ sw $t2, 0x9C($sp) /* 342CC4 E0030B84 3C0AD838 */ lui $t2, (0xD8380002 >> 16) /* 342CC8 E0030B88 354A0002 */ ori $t2, $t2, (0xD8380002 & 0xFFFF) /* 342CCC E0030B8C 24F0001C */ addiu $s0, $a3, 0x1C /* 342CD0 E0030B90 241E0002 */ addiu $fp, $zero, 0x2 /* 342CD4 E0030B94 24170001 */ addiu $s7, $zero, 0x1 /* 342CD8 E0030B98 4480A000 */ mtc1 $zero, $f20 /* 342CDC E0030B9C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 342CE0 E0030BA0 4481B000 */ mtc1 $at, $f22 /* 342CE4 E0030BA4 0280902D */ daddu $s2, $s4, $zero /* 342CE8 E0030BA8 AFAA00A0 */ sw $t2, 0xA0($sp) .LE0030BAC: /* 342CEC E0030BAC 27A40018 */ addiu $a0, $sp, 0x18 /* 342CF0 E0030BB0 029E3821 */ addu $a3, $s4, $fp /* 342CF4 E0030BB4 02973021 */ addu $a2, $s4, $s7 /* 342CF8 E0030BB8 8E220000 */ lw $v0, 0x0($s1) /* 342CFC E0030BBC 8FAA0098 */ lw $t2, 0x98($sp) /* 342D00 E0030BC0 0040402D */ daddu $t0, $v0, $zero /* 342D04 E0030BC4 24420008 */ addiu $v0, $v0, 0x8 /* 342D08 E0030BC8 024A0018 */ mult $s2, $t2 /* 342D0C E0030BCC AE220000 */ sw $v0, 0x0($s1) /* 342D10 E0030BD0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 342D14 E0030BD4 AD020000 */ sw $v0, 0x0($t0) /* 342D18 E0030BD8 001217C3 */ sra $v0, $s2, 31 /* 342D1C E0030BDC 00005010 */ mfhi $t2 /* 342D20 E0030BE0 000A18C3 */ sra $v1, $t2, 3 /* 342D24 E0030BE4 00621823 */ subu $v1, $v1, $v0 /* 342D28 E0030BE8 000328C0 */ sll $a1, $v1, 3 /* 342D2C E0030BEC 00A32821 */ addu $a1, $a1, $v1 /* 342D30 E0030BF0 00052880 */ sll $a1, $a1, 2 /* 342D34 E0030BF4 8FAA0098 */ lw $t2, 0x98($sp) /* 342D38 E0030BF8 02452823 */ subu $a1, $s2, $a1 /* 342D3C E0030BFC 00CA0018 */ mult $a2, $t2 /* 342D40 E0030C00 000617C3 */ sra $v0, $a2, 31 /* 342D44 E0030C04 3C0AE003 */ lui $t2, %hi(D_E0030E90) /* 342D48 E0030C08 254A0E90 */ addiu $t2, $t2, %lo(D_E0030E90) /* 342D4C E0030C0C 00AA2821 */ addu $a1, $a1, $t2 /* 342D50 E0030C10 90A50000 */ lbu $a1, 0x0($a1) /* 342D54 E0030C14 00005010 */ mfhi $t2 /* 342D58 E0030C18 000A18C3 */ sra $v1, $t2, 3 /* 342D5C E0030C1C 00621823 */ subu $v1, $v1, $v0 /* 342D60 E0030C20 000310C0 */ sll $v0, $v1, 3 /* 342D64 E0030C24 00431021 */ addu $v0, $v0, $v1 /* 342D68 E0030C28 00021080 */ sll $v0, $v0, 2 /* 342D6C E0030C2C 00C23023 */ subu $a2, $a2, $v0 /* 342D70 E0030C30 3C0AE003 */ lui $t2, %hi(D_E0030E90) /* 342D74 E0030C34 254A0E90 */ addiu $t2, $t2, %lo(D_E0030E90) /* 342D78 E0030C38 00CA3021 */ addu $a2, $a2, $t2 /* 342D7C E0030C3C 8FAA0098 */ lw $t2, 0x98($sp) /* 342D80 E0030C40 00052E00 */ sll $a1, $a1, 24 /* 342D84 E0030C44 00EA0018 */ mult $a3, $t2 /* 342D88 E0030C48 90C60000 */ lbu $a2, 0x0($a2) /* 342D8C E0030C4C 000717C3 */ sra $v0, $a3, 31 /* 342D90 E0030C50 00063400 */ sll $a2, $a2, 16 /* 342D94 E0030C54 00A62825 */ or $a1, $a1, $a2 /* 342D98 E0030C58 00005010 */ mfhi $t2 /* 342D9C E0030C5C 000A18C3 */ sra $v1, $t2, 3 /* 342DA0 E0030C60 00621823 */ subu $v1, $v1, $v0 /* 342DA4 E0030C64 000310C0 */ sll $v0, $v1, 3 /* 342DA8 E0030C68 00431021 */ addu $v0, $v0, $v1 /* 342DAC E0030C6C 00021080 */ sll $v0, $v0, 2 /* 342DB0 E0030C70 00E23823 */ subu $a3, $a3, $v0 /* 342DB4 E0030C74 3C0AE003 */ lui $t2, %hi(D_E0030E90) /* 342DB8 E0030C78 254A0E90 */ addiu $t2, $t2, %lo(D_E0030E90) /* 342DBC E0030C7C 00EA3821 */ addu $a3, $a3, $t2 /* 342DC0 E0030C80 90E20000 */ lbu $v0, 0x0($a3) /* 342DC4 E0030C84 9203000B */ lbu $v1, 0xB($s0) /* 342DC8 E0030C88 00021200 */ sll $v0, $v0, 8 /* 342DCC E0030C8C 00A22825 */ or $a1, $a1, $v0 /* 342DD0 E0030C90 00A32825 */ or $a1, $a1, $v1 /* 342DD4 E0030C94 AD050004 */ sw $a1, 0x4($t0) /* 342DD8 E0030C98 8E05FFE8 */ lw $a1, -0x18($s0) /* 342DDC E0030C9C 8E06FFEC */ lw $a2, -0x14($s0) /* 342DE0 E0030CA0 8E07FFF0 */ lw $a3, -0x10($s0) /* 342DE4 E0030CA4 0C080108 */ jal shim_guTranslateF /* 342DE8 E0030CA8 27DE0003 */ addiu $fp, $fp, 0x3 /* 342DEC E0030CAC 3C0A800B */ lui $t2, %hi(gCameras) /* 342DF0 E0030CB0 254A1D80 */ addiu $t2, $t2, %lo(gCameras) /* 342DF4 E0030CB4 4406A000 */ mfc1 $a2, $f20 /* 342DF8 E0030CB8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 342DFC E0030CBC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 342E00 E0030CC0 4407B000 */ mfc1 $a3, $f22 /* 342E04 E0030CC4 00031080 */ sll $v0, $v1, 2 /* 342E08 E0030CC8 00431021 */ addu $v0, $v0, $v1 /* 342E0C E0030CCC 00021080 */ sll $v0, $v0, 2 /* 342E10 E0030CD0 00431023 */ subu $v0, $v0, $v1 /* 342E14 E0030CD4 000218C0 */ sll $v1, $v0, 3 /* 342E18 E0030CD8 00431021 */ addu $v0, $v0, $v1 /* 342E1C E0030CDC 000210C0 */ sll $v0, $v0, 3 /* 342E20 E0030CE0 004A1021 */ addu $v0, $v0, $t2 /* 342E24 E0030CE4 C440006C */ lwc1 $f0, 0x6C($v0) /* 342E28 E0030CE8 8FA4009C */ lw $a0, 0x9C($sp) /* 342E2C E0030CEC 46000007 */ neg.s $f0, $f0 /* 342E30 E0030CF0 44050000 */ mfc1 $a1, $f0 /* 342E34 E0030CF4 26F70003 */ addiu $s7, $s7, 0x3 /* 342E38 E0030CF8 0C080104 */ jal shim_guRotateF /* 342E3C E0030CFC E7B40010 */ swc1 $f20, 0x10($sp) /* 342E40 E0030D00 27A50018 */ addiu $a1, $sp, 0x18 /* 342E44 E0030D04 8FA4009C */ lw $a0, 0x9C($sp) /* 342E48 E0030D08 0C080114 */ jal shim_guMtxCatF /* 342E4C E0030D0C 00A0302D */ daddu $a2, $a1, $zero /* 342E50 E0030D10 27A40018 */ addiu $a0, $sp, 0x18 /* 342E54 E0030D14 96C50000 */ lhu $a1, 0x0($s6) /* 342E58 E0030D18 3C02800A */ lui $v0, %hi(gDisplayContext) /* 342E5C E0030D1C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 342E60 E0030D20 00052980 */ sll $a1, $a1, 6 /* 342E64 E0030D24 00B32821 */ addu $a1, $a1, $s3 /* 342E68 E0030D28 0C080118 */ jal shim_guMtxF2L /* 342E6C E0030D2C 00452821 */ addu $a1, $v0, $a1 /* 342E70 E0030D30 27A40018 */ addiu $a0, $sp, 0x18 /* 342E74 E0030D34 8E290000 */ lw $t1, 0x0($s1) /* 342E78 E0030D38 4406A000 */ mfc1 $a2, $f20 /* 342E7C E0030D3C 4407A000 */ mfc1 $a3, $f20 /* 342E80 E0030D40 96C80000 */ lhu $t0, 0x0($s6) /* 342E84 E0030D44 3C03800A */ lui $v1, %hi(gDisplayContext) /* 342E88 E0030D48 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 342E8C E0030D4C 0120282D */ daddu $a1, $t1, $zero /* 342E90 E0030D50 3C0ADA38 */ lui $t2, (0xDA380000 >> 16) /* 342E94 E0030D54 3102FFFF */ andi $v0, $t0, 0xFFFF /* 342E98 E0030D58 00021180 */ sll $v0, $v0, 6 /* 342E9C E0030D5C 00531021 */ addu $v0, $v0, $s3 /* 342EA0 E0030D60 00621821 */ addu $v1, $v1, $v0 /* 342EA4 E0030D64 25290008 */ addiu $t1, $t1, 0x8 /* 342EA8 E0030D68 ACAA0000 */ sw $t2, 0x0($a1) /* 342EAC E0030D6C ACA30004 */ sw $v1, 0x4($a1) /* 342EB0 E0030D70 E7B60010 */ swc1 $f22, 0x10($sp) /* 342EB4 E0030D74 8E050000 */ lw $a1, 0x0($s0) /* 342EB8 E0030D78 25080001 */ addiu $t0, $t0, 0x1 /* 342EBC E0030D7C AE290000 */ sw $t1, 0x0($s1) /* 342EC0 E0030D80 0C080104 */ jal shim_guRotateF /* 342EC4 E0030D84 A6C80000 */ sh $t0, 0x0($s6) /* 342EC8 E0030D88 27A40018 */ addiu $a0, $sp, 0x18 /* 342ECC E0030D8C 96C50000 */ lhu $a1, 0x0($s6) /* 342ED0 E0030D90 3C02800A */ lui $v0, %hi(gDisplayContext) /* 342ED4 E0030D94 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 342ED8 E0030D98 00052980 */ sll $a1, $a1, 6 /* 342EDC E0030D9C 00B32821 */ addu $a1, $a1, $s3 /* 342EE0 E0030DA0 0C080118 */ jal shim_guMtxF2L /* 342EE4 E0030DA4 00452821 */ addu $a1, $v0, $a1 /* 342EE8 E0030DA8 8E240000 */ lw $a0, 0x0($s1) /* 342EEC E0030DAC 96C30000 */ lhu $v1, 0x0($s6) /* 342EF0 E0030DB0 0080282D */ daddu $a1, $a0, $zero /* 342EF4 E0030DB4 24840008 */ addiu $a0, $a0, 0x8 /* 342EF8 E0030DB8 3C0ADA38 */ lui $t2, (0xDA380000 >> 16) /* 342EFC E0030DBC 24620001 */ addiu $v0, $v1, 0x1 /* 342F00 E0030DC0 3063FFFF */ andi $v1, $v1, 0xFFFF /* 342F04 E0030DC4 00031980 */ sll $v1, $v1, 6 /* 342F08 E0030DC8 AE240000 */ sw $a0, 0x0($s1) /* 342F0C E0030DCC ACAA0000 */ sw $t2, 0x0($a1) /* 342F10 E0030DD0 A6C20000 */ sh $v0, 0x0($s6) /* 342F14 E0030DD4 3C02800A */ lui $v0, %hi(gDisplayContext) /* 342F18 E0030DD8 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 342F1C E0030DDC 00731821 */ addu $v1, $v1, $s3 /* 342F20 E0030DE0 00431021 */ addu $v0, $v0, $v1 /* 342F24 E0030DE4 ACA20004 */ sw $v0, 0x4($a1) /* 342F28 E0030DE8 24820008 */ addiu $v0, $a0, 0x8 /* 342F2C E0030DEC AE220000 */ sw $v0, 0x0($s1) /* 342F30 E0030DF0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 342F34 E0030DF4 AC820000 */ sw $v0, 0x0($a0) /* 342F38 E0030DF8 3C020900 */ lui $v0, %hi(D_090005E0_415640) /* 342F3C E0030DFC 244205E0 */ addiu $v0, $v0, %lo(D_090005E0_415640) /* 342F40 E0030E00 AC820004 */ sw $v0, 0x4($a0) /* 342F44 E0030E04 24820010 */ addiu $v0, $a0, 0x10 /* 342F48 E0030E08 AE220000 */ sw $v0, 0x0($s1) /* 342F4C E0030E0C 8FAA00A0 */ lw $t2, 0xA0($sp) /* 342F50 E0030E10 26B50001 */ addiu $s5, $s5, 0x1 /* 342F54 E0030E14 AC8A0008 */ sw $t2, 0x8($a0) /* 342F58 E0030E18 240A0040 */ addiu $t2, $zero, 0x40 /* 342F5C E0030E1C AC8A000C */ sw $t2, 0xC($a0) /* 342F60 E0030E20 8FAA00A0 */ lw $t2, 0xA0($sp) /* 342F64 E0030E24 26520003 */ addiu $s2, $s2, 0x3 /* 342F68 E0030E28 AC8A0010 */ sw $t2, 0x10($a0) /* 342F6C E0030E2C 240A0040 */ addiu $t2, $zero, 0x40 /* 342F70 E0030E30 AC8A0014 */ sw $t2, 0x14($a0) /* 342F74 E0030E34 8FAA00E0 */ lw $t2, 0xE0($sp) /* 342F78 E0030E38 26100030 */ addiu $s0, $s0, 0x30 /* 342F7C E0030E3C 8D420008 */ lw $v0, 0x8($t2) /* 342F80 E0030E40 24840018 */ addiu $a0, $a0, 0x18 /* 342F84 E0030E44 02A2102A */ slt $v0, $s5, $v0 /* 342F88 E0030E48 1440FF58 */ bnez $v0, .LE0030BAC /* 342F8C E0030E4C AE240000 */ sw $a0, 0x0($s1) .LE0030E50: /* 342F90 E0030E50 8FBF00CC */ lw $ra, 0xCC($sp) /* 342F94 E0030E54 8FBE00C8 */ lw $fp, 0xC8($sp) /* 342F98 E0030E58 8FB700C4 */ lw $s7, 0xC4($sp) /* 342F9C E0030E5C 8FB600C0 */ lw $s6, 0xC0($sp) /* 342FA0 E0030E60 8FB500BC */ lw $s5, 0xBC($sp) /* 342FA4 E0030E64 8FB400B8 */ lw $s4, 0xB8($sp) /* 342FA8 E0030E68 8FB300B4 */ lw $s3, 0xB4($sp) /* 342FAC E0030E6C 8FB200B0 */ lw $s2, 0xB0($sp) /* 342FB0 E0030E70 8FB100AC */ lw $s1, 0xAC($sp) /* 342FB4 E0030E74 8FB000A8 */ lw $s0, 0xA8($sp) /* 342FB8 E0030E78 D7B600D8 */ ldc1 $f22, 0xD8($sp) /* 342FBC E0030E7C D7B400D0 */ ldc1 $f20, 0xD0($sp) /* 342FC0 E0030E80 03E00008 */ jr $ra /* 342FC4 E0030E84 27BD00E0 */ addiu $sp, $sp, 0xE0 /* 342FC8 E0030E88 00000000 */ nop /* 342FCC E0030E8C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void damage_stars_appendGfx(void* effect) { DamageStarsFXData* part = ((EffectInstance*)effect)->data.damageStars; Matrix4f sp18; Matrix4f sp58; s32 baseIdx; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_090004C0_343500); baseIdx = (part->unk_2C - 1) * 3; baseIdx %= 36; for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, part++) { s32 rIdx = baseIdx + i * 3; s32 gIdx = baseIdx + 1 + i * 3; s32 bIdx = baseIdx + 2 + i * 3; gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0030E90[rIdx % 36], D_E0030E90[gIdx % 36], D_E0030E90[bIdx % 36], part->unk_24); shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); shim_guRotateF(sp18, part->unk_1C, 0.0f, 0.0f, 1.0f); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090005E0_343620); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_raycast_down_around /* 75C28 800DC778 27BDFF78 */ addiu $sp, $sp, -0x88 /* 75C2C 800DC77C F7B80068 */ sdc1 $f24, 0x68($sp) /* 75C30 800DC780 C7B800A0 */ lwc1 $f24, 0xA0($sp) /* 75C34 800DC784 AFB40050 */ sw $s4, 0x50($sp) /* 75C38 800DC788 8FB40098 */ lw $s4, 0x98($sp) /* 75C3C 800DC78C AFBF0054 */ sw $ra, 0x54($sp) /* 75C40 800DC790 AFB3004C */ sw $s3, 0x4C($sp) /* 75C44 800DC794 AFB20048 */ sw $s2, 0x48($sp) /* 75C48 800DC798 AFB10044 */ sw $s1, 0x44($sp) /* 75C4C 800DC79C AFB00040 */ sw $s0, 0x40($sp) /* 75C50 800DC7A0 F7BE0080 */ sdc1 $f30, 0x80($sp) /* 75C54 800DC7A4 F7BC0078 */ sdc1 $f28, 0x78($sp) /* 75C58 800DC7A8 F7BA0070 */ sdc1 $f26, 0x70($sp) /* 75C5C 800DC7AC F7B60060 */ sdc1 $f22, 0x60($sp) /* 75C60 800DC7B0 F7B40058 */ sdc1 $f20, 0x58($sp) /* 75C64 800DC7B4 C4A60000 */ lwc1 $f6, 0x0($a1) /* 75C68 800DC7B8 00C0882D */ daddu $s1, $a2, $zero /* 75C6C 800DC7BC E7A60028 */ swc1 $f6, 0x28($sp) /* 75C70 800DC7C0 C6260000 */ lwc1 $f6, 0x0($s1) /* 75C74 800DC7C4 0080902D */ daddu $s2, $a0, $zero /* 75C78 800DC7C8 E7A6002C */ swc1 $f6, 0x2C($sp) /* 75C7C 800DC7CC C4E60000 */ lwc1 $f6, 0x0($a3) /* 75C80 800DC7D0 3C138011 */ lui $s3, %hi(D_8010C970) /* 75C84 800DC7D4 2673C970 */ addiu $s3, $s3, %lo(D_8010C970) /* 75C88 800DC7D8 E7A60030 */ swc1 $f6, 0x30($sp) /* 75C8C 800DC7DC C7A6002C */ lwc1 $f6, 0x2C($sp) /* 75C90 800DC7E0 44806000 */ mtc1 $zero, $f12 /* 75C94 800DC7E4 4600318D */ trunc.w.s $f6, $f6 /* 75C98 800DC7E8 E6660000 */ swc1 $f6, 0x0($s3) /* 75C9C 800DC7EC C6200000 */ lwc1 $f0, 0x0($s1) /* 75CA0 800DC7F0 3C014004 */ lui $at, (0x40040000 >> 16) /* 75CA4 800DC7F4 44811800 */ mtc1 $at, $f3 /* 75CA8 800DC7F8 44801000 */ mtc1 $zero, $f2 /* 75CAC 800DC7FC 4600018D */ trunc.w.s $f6, $f0 /* 75CB0 800DC800 3C018011 */ lui $at, %hi(D_8010C94C) /* 75CB4 800DC804 E426C94C */ swc1 $f6, %lo(D_8010C94C)($at) /* 75CB8 800DC808 C7A6009C */ lwc1 $f6, 0x9C($sp) /* 75CBC 800DC80C C6200000 */ lwc1 $f0, 0x0($s1) /* 75CC0 800DC810 460C3300 */ add.s $f12, $f6, $f12 /* 75CC4 800DC814 4600018D */ trunc.w.s $f6, $f0 /* 75CC8 800DC818 3C018011 */ lui $at, %hi(D_8010C974) /* 75CCC 800DC81C E426C974 */ swc1 $f6, %lo(D_8010C974)($at) /* 75CD0 800DC820 4600C021 */ cvt.d.s $f0, $f24 /* 75CD4 800DC824 46220003 */ div.d $f0, $f0, $f2 /* 75CD8 800DC828 C6820000 */ lwc1 $f2, 0x0($s4) /* 75CDC 800DC82C 46200620 */ cvt.s.d $f24, $f0 /* 75CE0 800DC830 0C00A6C9 */ jal clamp_angle /* 75CE4 800DC834 46001685 */ abs.s $f26, $f2 /* 75CE8 800DC838 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 75CEC 800DC83C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 75CF0 800DC840 44811000 */ mtc1 $at, $f2 /* 75CF4 800DC844 00000000 */ nop /* 75CF8 800DC848 46020002 */ mul.s $f0, $f0, $f2 /* 75CFC 800DC84C 00000000 */ nop /* 75D00 800DC850 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 75D04 800DC854 44811000 */ mtc1 $at, $f2 /* 75D08 800DC858 00000000 */ nop /* 75D0C 800DC85C 46020503 */ div.s $f20, $f0, $f2 /* 75D10 800DC860 0C00A85B */ jal sin_rad /* 75D14 800DC864 4600A306 */ mov.s $f12, $f20 /* 75D18 800DC868 46000586 */ mov.s $f22, $f0 /* 75D1C 800DC86C 0C00A874 */ jal cos_rad /* 75D20 800DC870 4600A306 */ mov.s $f12, $f20 /* 75D24 800DC874 4616C102 */ mul.s $f4, $f24, $f22 /* 75D28 800DC878 00000000 */ nop /* 75D2C 800DC87C 0000802D */ daddu $s0, $zero, $zero /* 75D30 800DC880 0240202D */ daddu $a0, $s2, $zero /* 75D34 800DC884 27A50018 */ addiu $a1, $sp, 0x18 /* 75D38 800DC888 4600C087 */ neg.s $f2, $f24 /* 75D3C 800DC88C 46001002 */ mul.s $f0, $f2, $f0 /* 75D40 800DC890 00000000 */ nop /* 75D44 800DC894 27A6001C */ addiu $a2, $sp, 0x1C /* 75D48 800DC898 27A70020 */ addiu $a3, $sp, 0x20 /* 75D4C 800DC89C C7A60028 */ lwc1 $f6, 0x28($sp) /* 75D50 800DC8A0 3C01C6FF */ lui $at, (0xC6FFFE00 >> 16) /* 75D54 800DC8A4 3421FE00 */ ori $at, $at, (0xC6FFFE00 & 0xFFFF) /* 75D58 800DC8A8 4481E000 */ mtc1 $at, $f28 /* 75D5C 800DC8AC 46043080 */ add.s $f2, $f6, $f4 /* 75D60 800DC8B0 C7A6002C */ lwc1 $f6, 0x2C($sp) /* 75D64 800DC8B4 27A20024 */ addiu $v0, $sp, 0x24 /* 75D68 800DC8B8 E7BA0024 */ swc1 $f26, 0x24($sp) /* 75D6C 800DC8BC E7A6001C */ swc1 $f6, 0x1C($sp) /* 75D70 800DC8C0 C7A60030 */ lwc1 $f6, 0x30($sp) /* 75D74 800DC8C4 4600E786 */ mov.s $f30, $f28 /* 75D78 800DC8C8 46003000 */ add.s $f0, $f6, $f0 /* 75D7C 800DC8CC E7BC0038 */ swc1 $f28, 0x38($sp) /* 75D80 800DC8D0 E7A20018 */ swc1 $f2, 0x18($sp) /* 75D84 800DC8D4 E7A00020 */ swc1 $f0, 0x20($sp) /* 75D88 800DC8D8 0C037140 */ jal npc_raycast_down /* 75D8C 800DC8DC AFA20010 */ sw $v0, 0x10($sp) /* 75D90 800DC8E0 0440000F */ bltz $v0, .L800DC920 /* 75D94 800DC8E4 E7BA0034 */ swc1 $f26, 0x34($sp) /* 75D98 800DC8E8 C7A00024 */ lwc1 $f0, 0x24($sp) /* 75D9C 800DC8EC 461A003E */ c.le.s $f0, $f26 /* 75DA0 800DC8F0 00000000 */ nop /* 75DA4 800DC8F4 4500000A */ bc1f .L800DC920 /* 75DA8 800DC8F8 00000000 */ nop /* 75DAC 800DC8FC 46000686 */ mov.s $f26, $f0 /* 75DB0 800DC900 C7BC001C */ lwc1 $f28, 0x1C($sp) /* 75DB4 800DC904 24100001 */ addiu $s0, $zero, 0x1 /* 75DB8 800DC908 3C018011 */ lui $at, %hi(NpcHitQueryColliderID) /* 75DBC 800DC90C AC22C978 */ sw $v0, %lo(NpcHitQueryColliderID)($at) /* 75DC0 800DC910 3C018011 */ lui $at, %hi(D_8010C98C) /* 75DC4 800DC914 AC22C98C */ sw $v0, %lo(D_8010C98C)($at) /* 75DC8 800DC918 4600E18D */ trunc.w.s $f6, $f28 /* 75DCC 800DC91C E6660000 */ swc1 $f6, 0x0($s3) .L800DC920: /* 75DD0 800DC920 3C0142F0 */ lui $at, (0x42F00000 >> 16) /* 75DD4 800DC924 44816000 */ mtc1 $at, $f12 /* 75DD8 800DC928 C7A6009C */ lwc1 $f6, 0x9C($sp) /* 75DDC 800DC92C 0C00A6C9 */ jal clamp_angle /* 75DE0 800DC930 460C3300 */ add.s $f12, $f6, $f12 /* 75DE4 800DC934 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 75DE8 800DC938 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 75DEC 800DC93C 44811000 */ mtc1 $at, $f2 /* 75DF0 800DC940 00000000 */ nop /* 75DF4 800DC944 46020002 */ mul.s $f0, $f0, $f2 /* 75DF8 800DC948 00000000 */ nop /* 75DFC 800DC94C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 75E00 800DC950 44811000 */ mtc1 $at, $f2 /* 75E04 800DC954 00000000 */ nop /* 75E08 800DC958 46020503 */ div.s $f20, $f0, $f2 /* 75E0C 800DC95C 0C00A85B */ jal sin_rad /* 75E10 800DC960 4600A306 */ mov.s $f12, $f20 /* 75E14 800DC964 46000586 */ mov.s $f22, $f0 /* 75E18 800DC968 0C00A874 */ jal cos_rad /* 75E1C 800DC96C 4600A306 */ mov.s $f12, $f20 /* 75E20 800DC970 4616C102 */ mul.s $f4, $f24, $f22 /* 75E24 800DC974 00000000 */ nop /* 75E28 800DC978 4600C087 */ neg.s $f2, $f24 /* 75E2C 800DC97C 46001002 */ mul.s $f0, $f2, $f0 /* 75E30 800DC980 00000000 */ nop /* 75E34 800DC984 0240202D */ daddu $a0, $s2, $zero /* 75E38 800DC988 C7A60028 */ lwc1 $f6, 0x28($sp) /* 75E3C 800DC98C 27A50018 */ addiu $a1, $sp, 0x18 /* 75E40 800DC990 46043080 */ add.s $f2, $f6, $f4 /* 75E44 800DC994 C7A6002C */ lwc1 $f6, 0x2C($sp) /* 75E48 800DC998 27A6001C */ addiu $a2, $sp, 0x1C /* 75E4C 800DC99C E7A6001C */ swc1 $f6, 0x1C($sp) /* 75E50 800DC9A0 C7A60030 */ lwc1 $f6, 0x30($sp) /* 75E54 800DC9A4 27A70020 */ addiu $a3, $sp, 0x20 /* 75E58 800DC9A8 46003000 */ add.s $f0, $f6, $f0 /* 75E5C 800DC9AC C7A60034 */ lwc1 $f6, 0x34($sp) /* 75E60 800DC9B0 27A20024 */ addiu $v0, $sp, 0x24 /* 75E64 800DC9B4 E7A20018 */ swc1 $f2, 0x18($sp) /* 75E68 800DC9B8 E7A60024 */ swc1 $f6, 0x24($sp) /* 75E6C 800DC9BC E7A00020 */ swc1 $f0, 0x20($sp) /* 75E70 800DC9C0 0C037140 */ jal npc_raycast_down /* 75E74 800DC9C4 AFA20010 */ sw $v0, 0x10($sp) /* 75E78 800DC9C8 04400010 */ bltz $v0, .L800DCA0C /* 75E7C 800DC9CC 00000000 */ nop /* 75E80 800DC9D0 C7A00024 */ lwc1 $f0, 0x24($sp) /* 75E84 800DC9D4 461A003E */ c.le.s $f0, $f26 /* 75E88 800DC9D8 00000000 */ nop /* 75E8C 800DC9DC 4500000B */ bc1f .L800DCA0C /* 75E90 800DC9E0 00000000 */ nop /* 75E94 800DC9E4 46000686 */ mov.s $f26, $f0 /* 75E98 800DC9E8 C7BE001C */ lwc1 $f30, 0x1C($sp) /* 75E9C 800DC9EC 24100001 */ addiu $s0, $zero, 0x1 /* 75EA0 800DC9F0 3C018011 */ lui $at, %hi(NpcHitQueryColliderID) /* 75EA4 800DC9F4 AC22C978 */ sw $v0, %lo(NpcHitQueryColliderID)($at) /* 75EA8 800DC9F8 3C018011 */ lui $at, %hi(D_8010C968) /* 75EAC 800DC9FC AC22C968 */ sw $v0, %lo(D_8010C968)($at) /* 75EB0 800DCA00 4600F18D */ trunc.w.s $f6, $f30 /* 75EB4 800DCA04 3C018011 */ lui $at, %hi(D_8010C94C) /* 75EB8 800DCA08 E426C94C */ swc1 $f6, %lo(D_8010C94C)($at) .L800DCA0C: /* 75EBC 800DCA0C 3C0142F0 */ lui $at, (0x42F00000 >> 16) /* 75EC0 800DCA10 44816000 */ mtc1 $at, $f12 /* 75EC4 800DCA14 C7A6009C */ lwc1 $f6, 0x9C($sp) /* 75EC8 800DCA18 0C00A6C9 */ jal clamp_angle /* 75ECC 800DCA1C 460C3301 */ sub.s $f12, $f6, $f12 /* 75ED0 800DCA20 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 75ED4 800DCA24 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 75ED8 800DCA28 44811000 */ mtc1 $at, $f2 /* 75EDC 800DCA2C 00000000 */ nop /* 75EE0 800DCA30 46020002 */ mul.s $f0, $f0, $f2 /* 75EE4 800DCA34 00000000 */ nop /* 75EE8 800DCA38 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 75EEC 800DCA3C 44811000 */ mtc1 $at, $f2 /* 75EF0 800DCA40 00000000 */ nop /* 75EF4 800DCA44 46020503 */ div.s $f20, $f0, $f2 /* 75EF8 800DCA48 0C00A85B */ jal sin_rad /* 75EFC 800DCA4C 4600A306 */ mov.s $f12, $f20 /* 75F00 800DCA50 46000586 */ mov.s $f22, $f0 /* 75F04 800DCA54 0C00A874 */ jal cos_rad /* 75F08 800DCA58 4600A306 */ mov.s $f12, $f20 /* 75F0C 800DCA5C 4616C102 */ mul.s $f4, $f24, $f22 /* 75F10 800DCA60 00000000 */ nop /* 75F14 800DCA64 4600C087 */ neg.s $f2, $f24 /* 75F18 800DCA68 46001002 */ mul.s $f0, $f2, $f0 /* 75F1C 800DCA6C 00000000 */ nop /* 75F20 800DCA70 0240202D */ daddu $a0, $s2, $zero /* 75F24 800DCA74 C7A60028 */ lwc1 $f6, 0x28($sp) /* 75F28 800DCA78 27A50018 */ addiu $a1, $sp, 0x18 /* 75F2C 800DCA7C 46043080 */ add.s $f2, $f6, $f4 /* 75F30 800DCA80 C7A6002C */ lwc1 $f6, 0x2C($sp) /* 75F34 800DCA84 27A6001C */ addiu $a2, $sp, 0x1C /* 75F38 800DCA88 E7A6001C */ swc1 $f6, 0x1C($sp) /* 75F3C 800DCA8C C7A60030 */ lwc1 $f6, 0x30($sp) /* 75F40 800DCA90 27A70020 */ addiu $a3, $sp, 0x20 /* 75F44 800DCA94 46003000 */ add.s $f0, $f6, $f0 /* 75F48 800DCA98 C7A60034 */ lwc1 $f6, 0x34($sp) /* 75F4C 800DCA9C 27A20024 */ addiu $v0, $sp, 0x24 /* 75F50 800DCAA0 E7A20018 */ swc1 $f2, 0x18($sp) /* 75F54 800DCAA4 E7A60024 */ swc1 $f6, 0x24($sp) /* 75F58 800DCAA8 E7A00020 */ swc1 $f0, 0x20($sp) /* 75F5C 800DCAAC 0C037140 */ jal npc_raycast_down /* 75F60 800DCAB0 AFA20010 */ sw $v0, 0x10($sp) /* 75F64 800DCAB4 04400011 */ bltz $v0, .L800DCAFC /* 75F68 800DCAB8 00000000 */ nop /* 75F6C 800DCABC C7A00024 */ lwc1 $f0, 0x24($sp) /* 75F70 800DCAC0 461A003E */ c.le.s $f0, $f26 /* 75F74 800DCAC4 00000000 */ nop /* 75F78 800DCAC8 4500000C */ bc1f .L800DCAFC /* 75F7C 800DCACC 00000000 */ nop /* 75F80 800DCAD0 46000686 */ mov.s $f26, $f0 /* 75F84 800DCAD4 C7A6001C */ lwc1 $f6, 0x1C($sp) /* 75F88 800DCAD8 24100001 */ addiu $s0, $zero, 0x1 /* 75F8C 800DCADC 3C018011 */ lui $at, %hi(NpcHitQueryColliderID) /* 75F90 800DCAE0 AC22C978 */ sw $v0, %lo(NpcHitQueryColliderID)($at) /* 75F94 800DCAE4 3C018011 */ lui $at, %hi(D_8010C968) /* 75F98 800DCAE8 AC22C968 */ sw $v0, %lo(D_8010C968)($at) /* 75F9C 800DCAEC E7A60038 */ swc1 $f6, 0x38($sp) /* 75FA0 800DCAF0 4600318D */ trunc.w.s $f6, $f6 /* 75FA4 800DCAF4 3C018011 */ lui $at, %hi(D_8010C974) /* 75FA8 800DCAF8 E426C974 */ swc1 $f6, %lo(D_8010C974)($at) .L800DCAFC: /* 75FAC 800DCAFC 1200000F */ beqz $s0, .L800DCB3C /* 75FB0 800DCB00 0000102D */ daddu $v0, $zero, $zero /* 75FB4 800DCB04 461EE03C */ c.lt.s $f28, $f30 /* 75FB8 800DCB08 00000000 */ nop /* 75FBC 800DCB0C 45020002 */ bc1fl .L800DCB18 /* 75FC0 800DCB10 E63C0000 */ swc1 $f28, 0x0($s1) /* 75FC4 800DCB14 E63E0000 */ swc1 $f30, 0x0($s1) .L800DCB18: /* 75FC8 800DCB18 C6200000 */ lwc1 $f0, 0x0($s1) /* 75FCC 800DCB1C C7A60038 */ lwc1 $f6, 0x38($sp) /* 75FD0 800DCB20 4606003C */ c.lt.s $f0, $f6 /* 75FD4 800DCB24 00000000 */ nop /* 75FD8 800DCB28 45030001 */ bc1tl .L800DCB30 /* 75FDC 800DCB2C E6260000 */ swc1 $f6, 0x0($s1) .L800DCB30: /* 75FE0 800DCB30 E69A0000 */ swc1 $f26, 0x0($s4) /* 75FE4 800DCB34 080372D1 */ j .L800DCB44 /* 75FE8 800DCB38 24020001 */ addiu $v0, $zero, 0x1 .L800DCB3C: /* 75FEC 800DCB3C C7A0001C */ lwc1 $f0, 0x1C($sp) /* 75FF0 800DCB40 E6200000 */ swc1 $f0, 0x0($s1) .L800DCB44: /* 75FF4 800DCB44 8FBF0054 */ lw $ra, 0x54($sp) /* 75FF8 800DCB48 8FB40050 */ lw $s4, 0x50($sp) /* 75FFC 800DCB4C 8FB3004C */ lw $s3, 0x4C($sp) /* 76000 800DCB50 8FB20048 */ lw $s2, 0x48($sp) /* 76004 800DCB54 8FB10044 */ lw $s1, 0x44($sp) /* 76008 800DCB58 8FB00040 */ lw $s0, 0x40($sp) /* 7600C 800DCB5C D7BE0080 */ ldc1 $f30, 0x80($sp) /* 76010 800DCB60 D7BC0078 */ ldc1 $f28, 0x78($sp) /* 76014 800DCB64 D7BA0070 */ ldc1 $f26, 0x70($sp) /* 76018 800DCB68 D7B80068 */ ldc1 $f24, 0x68($sp) /* 7601C 800DCB6C D7B60060 */ ldc1 $f22, 0x60($sp) /* 76020 800DCB70 D7B40058 */ ldc1 $f20, 0x58($sp) /* 76024 800DCB74 03E00008 */ jr $ra /* 76028 800DCB78 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: b32 npc_raycast_down_around(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius) { f32 startX; f32 startY; f32 startZ; f32 depth; f32 x; f32 y; f32 z; f32 originalDepth; f32 hitYBehindLeft; s32 hasCollision; f32 cosTheta; s32 colliderID; f32 deltaX,deltaZ; f32 theta, sinTheta, minDepth, hitYAhead, hitYBehindRight; hasCollision = FALSE; x = *posX; y = *posY; z = *posZ; D_8010C970 = y; D_8010C94C = *posY; D_8010C974 = *posY; radius /= 2.5; hitYBehindLeft = hitYBehindRight = hitYAhead = -32767.0f; minDepth = fabsf(*hitDepth); theta = DEG_TO_RAD(clamp_angle(yaw + 0.0f)); sinTheta = sin_rad(theta); cosTheta = cos_rad(theta); deltaX = radius * sinTheta; deltaZ = -radius * cosTheta; startX = x + deltaX; startY = y; startZ = z + deltaZ; originalDepth = depth = minDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); if (colliderID >= 0) { if (depth <= minDepth) { hitYAhead = startY; NpcHitQueryColliderID = colliderID; D_8010C98C = colliderID; D_8010C970 = hitYAhead; minDepth = depth; hasCollision = TRUE; } } theta = DEG_TO_RAD(clamp_angle(yaw + 120.0f)); sinTheta = sin_rad(theta); cosTheta = cos_rad(theta); deltaX = radius * sinTheta; deltaZ = -radius * cosTheta; startX = x + deltaX; startY = y; startZ = z + deltaZ; depth = originalDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); if (colliderID >= 0) { if (depth <= minDepth) { hitYBehindRight = startY; NpcHitQueryColliderID = colliderID; D_8010C968 = colliderID; D_8010C94C = hitYBehindRight; minDepth = depth; hasCollision = TRUE; } } theta = DEG_TO_RAD(clamp_angle(yaw - 120.0f)); sinTheta = sin_rad(theta); cosTheta = cos_rad(theta); deltaX = radius * sinTheta; deltaZ = -radius * cosTheta; startX = x + deltaX; startY = y; startZ = z + deltaZ; depth = originalDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); if (colliderID >= 0) { if (depth <= minDepth) { hitYBehindLeft = startY; NpcHitQueryColliderID = colliderID; D_8010C968 = colliderID; D_8010C974 = hitYBehindLeft; minDepth = depth; hasCollision = TRUE; } } if (hasCollision) { *posY = MAX(hitYBehindRight, hitYAhead); if (*posY < hitYBehindLeft) { *posY = hitYBehindLeft; } *hitDepth = minDepth; return TRUE; } *posY = startY; return FALSE; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80252F30 /* 181810 80252F30 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 181814 80252F34 AFB3003C */ sw $s3, 0x3C($sp) /* 181818 80252F38 0080982D */ daddu $s3, $a0, $zero /* 18181C 80252F3C AFBF0044 */ sw $ra, 0x44($sp) /* 181820 80252F40 AFB40040 */ sw $s4, 0x40($sp) /* 181824 80252F44 AFB20038 */ sw $s2, 0x38($sp) /* 181828 80252F48 AFB10034 */ sw $s1, 0x34($sp) dgb_01_SmashBridgesSkeleton: /* 18182C 80252F4C AFB00030 */ sw $s0, 0x30($sp) /* 181830 80252F50 10A00075 */ beqz $a1, .L80253128 /* 181834 80252F54 8E71000C */ lw $s1, 0xC($s3) /* 181838 80252F58 8E250000 */ lw $a1, 0x0($s1) /* 18183C 80252F5C 0C0B1EAF */ jal evt_get_variable /* 181840 80252F60 26310004 */ addiu $s1, $s1, 0x4 /* 181844 80252F64 8E250000 */ lw $a1, 0x0($s1) /* 181848 80252F68 26310004 */ addiu $s1, $s1, 0x4 /* 18184C 80252F6C 0260202D */ daddu $a0, $s3, $zero /* 181850 80252F70 0C0B1EAF */ jal evt_get_variable /* 181854 80252F74 0040802D */ daddu $s0, $v0, $zero /* 181858 80252F78 0040902D */ daddu $s2, $v0, $zero /* 18185C 80252F7C 8E250000 */ lw $a1, 0x0($s1) /* 181860 80252F80 26310004 */ addiu $s1, $s1, 0x4 /* 181864 80252F84 0C0B1EAF */ jal evt_get_variable /* 181868 80252F88 0260202D */ daddu $a0, $s3, $zero /* 18186C 80252F8C 8E250000 */ lw $a1, 0x0($s1) /* 181870 80252F90 26310004 */ addiu $s1, $s1, 0x4 /* 181874 80252F94 0260202D */ daddu $a0, $s3, $zero /* 181878 80252F98 0C0B1EAF */ jal evt_get_variable /* 18187C 80252F9C 0040A02D */ daddu $s4, $v0, $zero /* 181880 80252FA0 3C01802A */ lui $at, %hi(gSpeakingActorTalkAnim) /* 181884 80252FA4 AC22FA6C */ sw $v0, %lo(gSpeakingActorTalkAnim)($at) /* 181888 80252FA8 8E250000 */ lw $a1, 0x0($s1) /* 18188C 80252FAC 0C0B1EAF */ jal evt_get_variable /* 181890 80252FB0 0260202D */ daddu $a0, $s3, $zero /* 181894 80252FB4 3C01802A */ lui $at, %hi(gSpeakingActorIdleAnim) /* 181898 80252FB8 AC22FA70 */ sw $v0, %lo(gSpeakingActorIdleAnim)($at) /* 18189C 80252FBC 2402FF81 */ addiu $v0, $zero, -0x7F /* 1818A0 80252FC0 16420002 */ bne $s2, $v0, .L80252FCC /* 1818A4 80252FC4 00000000 */ nop /* 1818A8 80252FC8 8E720148 */ lw $s2, 0x148($s3) .L80252FCC: /* 1818AC 80252FCC 0C09A75B */ jal get_actor /* 1818B0 80252FD0 0240202D */ daddu $a0, $s2, $zero /* 1818B4 80252FD4 0040882D */ daddu $s1, $v0, $zero /* 1818B8 80252FD8 0220202D */ daddu $a0, $s1, $zero /* 1818BC 80252FDC 0C099117 */ jal get_actor_part /* 1818C0 80252FE0 0280282D */ daddu $a1, $s4, $zero /* 1818C4 80252FE4 0040902D */ daddu $s2, $v0, $zero /* 1818C8 80252FE8 86230150 */ lh $v1, 0x150($s1) /* 1818CC 80252FEC C6200144 */ lwc1 $f0, 0x144($s1) /* 1818D0 80252FF0 8E220000 */ lw $v0, 0x0($s1) /* 1818D4 80252FF4 3C01802A */ lui $at, %hi(gSpeakingActor) /* 1818D8 80252FF8 AC31FA74 */ sw $s1, %lo(gSpeakingActor)($at) /* 1818DC 80252FFC 3C01802A */ lui $at, %hi(gSpeakingActorPart) D_80253000: /* 1818E0 80253000 AC32FA78 */ sw $s2, %lo(gSpeakingActorPart)($at) /* 1818E4 80253004 44831000 */ mtc1 $v1, $f2 D_80253008: /* 1818E8 80253008 00000000 */ nop /* 1818EC 8025300C 468010A0 */ cvt.s.w $f2, $f2 D_80253010: /* 1818F0 80253010 30428000 */ andi $v0, $v0, 0x8000 /* 1818F4 80253014 1440000D */ bnez $v0, .L8025304C D_80253018: /* 1818F8 80253018 46020100 */ add.s $f4, $f0, $f2 /* 1818FC 8025301C 86220152 */ lh $v0, 0x152($s1) D_80253020: /* 181900 80253020 C6200148 */ lwc1 $f0, 0x148($s1) /* 181904 80253024 44821000 */ mtc1 $v0, $f2 /* 181908 80253028 00000000 */ nop /* 18190C 8025302C 468010A0 */ cvt.s.w $f2, $f2 D_80253030: /* 181910 80253030 92220191 */ lbu $v0, 0x191($s1) /* 181914 80253034 46020000 */ add.s $f0, $f0, $f2 D_80253038: /* 181918 80253038 44821000 */ mtc1 $v0, $f2 /* 18191C 8025303C 00000000 */ nop jtbl_80253040: /* 181920 80253040 468010A0 */ cvt.s.w $f2, $f2 /* 181924 80253044 08094C1F */ j .L8025307C /* 181928 80253048 46001000 */ add.s $f0, $f2, $f0 .L8025304C: /* 18192C 8025304C 86220152 */ lh $v0, 0x152($s1) /* 181930 80253050 C6220148 */ lwc1 $f2, 0x148($s1) /* 181934 80253054 44820000 */ mtc1 $v0, $f0 /* 181938 80253058 00000000 */ nop /* 18193C 8025305C 46800020 */ cvt.s.w $f0, $f0 D_80253060: /* 181940 80253060 92220191 */ lbu $v0, 0x191($s1) /* 181944 80253064 46001080 */ add.s $f2, $f2, $f0 /* 181948 80253068 00021042 */ srl $v0, $v0, 1 /* 18194C 8025306C 44820000 */ mtc1 $v0, $f0 /* 181950 80253070 00000000 */ nop /* 181954 80253074 46800020 */ cvt.s.w $f0, $f0 /* 181958 80253078 46001000 */ add.s $f0, $f2, $f0 .L8025307C: /* 18195C 8025307C 24040001 */ addiu $a0, $zero, 0x1 /* 181960 80253080 44052000 */ mfc1 $a1, $f4 /* 181964 80253084 44060000 */ mfc1 $a2, $f0 /* 181968 80253088 86230154 */ lh $v1, 0x154($s1) /* 18196C 8025308C C622014C */ lwc1 $f2, 0x14C($s1) /* 181970 80253090 27A20020 */ addiu $v0, $sp, 0x20 /* 181974 80253094 AFA20010 */ sw $v0, 0x10($sp) /* 181978 80253098 44830000 */ mtc1 $v1, $f0 /* 18197C 8025309C 00000000 */ nop /* 181980 802530A0 46800020 */ cvt.s.w $f0, $f0 /* 181984 802530A4 46001080 */ add.s $f2, $f2, $f0 /* 181988 802530A8 27A20024 */ addiu $v0, $sp, 0x24 /* 18198C 802530AC AFA20014 */ sw $v0, 0x14($sp) /* 181990 802530B0 44071000 */ mfc1 $a3, $f2 /* 181994 802530B4 27A20028 */ addiu $v0, $sp, 0x28 /* 181998 802530B8 0C00B94E */ jal get_screen_coords /* 18199C 802530BC AFA20018 */ sw $v0, 0x18($sp) /* 1819A0 802530C0 0200202D */ daddu $a0, $s0, $zero /* 1819A4 802530C4 3C05802A */ lui $a1, %hi(gSpeakingActorPrintIsDone) /* 1819A8 802530C8 24A5FA68 */ addiu $a1, $a1, %lo(gSpeakingActorPrintIsDone) /* 1819AC 802530CC 0C049640 */ jal msg_get_printer_for_msg /* 1819B0 802530D0 ACA00000 */ sw $zero, 0x0($a1) /* 1819B4 802530D4 8FA50020 */ lw $a1, 0x20($sp) /* 1819B8 802530D8 8FA60024 */ lw $a2, 0x24($sp) /* 1819BC 802530DC 0040202D */ daddu $a0, $v0, $zero /* 1819C0 802530E0 3C01802A */ lui $at, %hi(gSpeakingActorPrintCtx) /* 1819C4 802530E4 AC24FA60 */ sw $a0, %lo(gSpeakingActorPrintCtx)($at) /* 1819C8 802530E8 0C0496AE */ jal msg_printer_set_origin_pos /* 1819CC 802530EC 00000000 */ nop /* 1819D0 802530F0 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 1819D4 802530F4 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 1819D8 802530F8 AE600070 */ sw $zero, 0x70($s3) /* 1819DC 802530FC 8C620000 */ lw $v0, 0x0($v1) /* 1819E0 80253100 3C06802A */ lui $a2, %hi(gSpeakingActorTalkAnim) /* 1819E4 80253104 8CC6FA6C */ lw $a2, %lo(gSpeakingActorTalkAnim)($a2) /* 1819E8 80253108 34420010 */ ori $v0, $v0, 0x10 /* 1819EC 8025310C 04C00004 */ bltz $a2, .L80253120 /* 1819F0 80253110 AC620000 */ sw $v0, 0x0($v1) /* 1819F4 80253114 0220202D */ daddu $a0, $s1, $zero /* 1819F8 80253118 0C098F82 */ jal func_80263E08 /* 1819FC 8025311C 0240282D */ daddu $a1, $s2, $zero .L80253120: /* 181A00 80253120 0C03A6D5 */ jal increment_status_bar_disabled /* 181A04 80253124 00000000 */ nop .L80253128: /* 181A08 80253128 8E620070 */ lw $v0, 0x70($s3) /* 181A0C 8025312C 14400060 */ bnez $v0, .L802532B0 /* 181A10 80253130 0000102D */ daddu $v0, $zero, $zero /* 181A14 80253134 3C11802A */ lui $s1, %hi(gSpeakingActor) /* 181A18 80253138 8E31FA74 */ lw $s1, %lo(gSpeakingActor)($s1) /* 181A1C 8025313C 3C12802A */ lui $s2, %hi(gSpeakingActorPart) dgb_01_D_80253140_C109C0: /* 181A20 80253140 8E52FA78 */ lw $s2, %lo(gSpeakingActorPart)($s2) /* 181A24 80253144 86220150 */ lh $v0, 0x150($s1) dgb_01_D_80253148_C109C8: /* 181A28 80253148 C6200144 */ lwc1 $f0, 0x144($s1) /* 181A2C 8025314C 44821000 */ mtc1 $v0, $f2 /* 181A30 80253150 00000000 */ nop /* 181A34 80253154 468010A0 */ cvt.s.w $f2, $f2 dgb_01_pad_2: /* 181A38 80253158 8E220000 */ lw $v0, 0x0($s1) /* 181A3C 8025315C 30428000 */ andi $v0, $v0, 0x8000 dgb_01_D_80253160_C109E0: /* 181A40 80253160 1440000D */ bnez $v0, .L80253198 /* 181A44 80253164 46020100 */ add.s $f4, $f0, $f2 /* 181A48 80253168 86220152 */ lh $v0, 0x152($s1) /* 181A4C 8025316C C6200148 */ lwc1 $f0, 0x148($s1) /* 181A50 80253170 44821000 */ mtc1 $v0, $f2 /* 181A54 80253174 00000000 */ nop /* 181A58 80253178 468010A0 */ cvt.s.w $f2, $f2 /* 181A5C 8025317C 92220191 */ lbu $v0, 0x191($s1) /* 181A60 80253180 46020000 */ add.s $f0, $f0, $f2 /* 181A64 80253184 44821000 */ mtc1 $v0, $f2 /* 181A68 80253188 00000000 */ nop /* 181A6C 8025318C 468010A0 */ cvt.s.w $f2, $f2 /* 181A70 80253190 08094C72 */ j .L802531C8 /* 181A74 80253194 46001000 */ add.s $f0, $f2, $f0 .L80253198: /* 181A78 80253198 86220152 */ lh $v0, 0x152($s1) /* 181A7C 8025319C C6220148 */ lwc1 $f2, 0x148($s1) dgb_01_D_802531A0_C10A20: /* 181A80 802531A0 44820000 */ mtc1 $v0, $f0 /* 181A84 802531A4 00000000 */ nop /* 181A88 802531A8 46800020 */ cvt.s.w $f0, $f0 /* 181A8C 802531AC 92220191 */ lbu $v0, 0x191($s1) /* 181A90 802531B0 46001080 */ add.s $f2, $f2, $f0 /* 181A94 802531B4 00021042 */ srl $v0, $v0, 1 /* 181A98 802531B8 44820000 */ mtc1 $v0, $f0 /* 181A9C 802531BC 00000000 */ nop /* 181AA0 802531C0 46800020 */ cvt.s.w $f0, $f0 /* 181AA4 802531C4 46001000 */ add.s $f0, $f2, $f0 .L802531C8: /* 181AA8 802531C8 24040001 */ addiu $a0, $zero, 0x1 /* 181AAC 802531CC 44052000 */ mfc1 $a1, $f4 /* 181AB0 802531D0 44060000 */ mfc1 $a2, $f0 /* 181AB4 802531D4 86230154 */ lh $v1, 0x154($s1) /* 181AB8 802531D8 C622014C */ lwc1 $f2, 0x14C($s1) /* 181ABC 802531DC 27A20020 */ addiu $v0, $sp, 0x20 dgb_01_D_802531E0_C10A60: /* 181AC0 802531E0 AFA20010 */ sw $v0, 0x10($sp) /* 181AC4 802531E4 44830000 */ mtc1 $v1, $f0 /* 181AC8 802531E8 00000000 */ nop /* 181ACC 802531EC 46800020 */ cvt.s.w $f0, $f0 /* 181AD0 802531F0 46001080 */ add.s $f2, $f2, $f0 /* 181AD4 802531F4 27A20024 */ addiu $v0, $sp, 0x24 /* 181AD8 802531F8 AFA20014 */ sw $v0, 0x14($sp) /* 181ADC 802531FC 44071000 */ mfc1 $a3, $f2 /* 181AE0 80253200 27A20028 */ addiu $v0, $sp, 0x28 /* 181AE4 80253204 0C00B94E */ jal get_screen_coords /* 181AE8 80253208 AFA20018 */ sw $v0, 0x18($sp) /* 181AEC 8025320C 3C10802A */ lui $s0, %hi(gSpeakingActorPrintCtx) /* 181AF0 80253210 2610FA60 */ addiu $s0, $s0, %lo(gSpeakingActorPrintCtx) /* 181AF4 80253214 8E040000 */ lw $a0, 0x0($s0) /* 181AF8 80253218 8FA50020 */ lw $a1, 0x20($sp) /* 181AFC 8025321C 0C0496AE */ jal msg_printer_set_origin_pos dgb_01_D_80253220_C10AA0: /* 181B00 80253220 8FA60024 */ lw $a2, 0x24($sp) /* 181B04 80253224 8E020000 */ lw $v0, 0x0($s0) /* 181B08 80253228 8C4304FC */ lw $v1, 0x4FC($v0) /* 181B0C 8025322C 30620040 */ andi $v0, $v1, 0x40 /* 181B10 80253230 10400005 */ beqz $v0, .L80253248 /* 181B14 80253234 30620080 */ andi $v0, $v1, 0x80 /* 181B18 80253238 0C03A6CC */ jal decrement_status_bar_disabled /* 181B1C 8025323C 00000000 */ nop /* 181B20 80253240 08094CAC */ j .L802532B0 /* 181B24 80253244 24020001 */ addiu $v0, $zero, 0x1 .L80253248: /* 181B28 80253248 10400005 */ beqz $v0, dgb_01_D_80253260_C10AE0 /* 181B2C 8025324C 00000000 */ nop /* 181B30 80253250 3C06802A */ lui $a2, %hi(gSpeakingActorTalkAnim) /* 181B34 80253254 8CC6FA6C */ lw $a2, %lo(gSpeakingActorTalkAnim)($a2) /* 181B38 80253258 08094C9A */ j .L80253268 /* 181B3C 8025325C 00000000 */ nop dgb_01_D_80253260_C10AE0: /* 181B40 80253260 3C06802A */ lui $a2, %hi(gSpeakingActorIdleAnim) /* 181B44 80253264 8CC6FA70 */ lw $a2, %lo(gSpeakingActorIdleAnim)($a2) .L80253268: /* 181B48 80253268 04C00003 */ bltz $a2, .L80253278 D_8025326C: /* 181B4C 8025326C 0220202D */ daddu $a0, $s1, $zero /* 181B50 80253270 0C098F82 */ jal func_80263E08 /* 181B54 80253274 0240282D */ daddu $a1, $s2, $zero .L80253278: /* 181B58 80253278 3C03802A */ lui $v1, %hi(gSpeakingActorPrintIsDone) /* 181B5C 8025327C 8C63FA68 */ lw $v1, %lo(gSpeakingActorPrintIsDone)($v1) /* 181B60 80253280 24020001 */ addiu $v0, $zero, 0x1 /* 181B64 80253284 1462000A */ bne $v1, $v0, .L802532B0 /* 181B68 80253288 0000102D */ daddu $v0, $zero, $zero /* 181B6C 8025328C 0C03A6CC */ jal decrement_status_bar_disabled /* 181B70 80253290 00000000 */ nop /* 181B74 80253294 24020001 */ addiu $v0, $zero, 0x1 D_80253298: /* 181B78 80253298 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 181B7C 8025329C 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) dgb_01_D_802532A0_C10B20: /* 181B80 802532A0 8C640000 */ lw $a0, 0x0($v1) /* 181B84 802532A4 2405FFEF */ addiu $a1, $zero, -0x11 /* 181B88 802532A8 00852024 */ and $a0, $a0, $a1 /* 181B8C 802532AC AC640000 */ sw $a0, 0x0($v1) .L802532B0: /* 181B90 802532B0 8FBF0044 */ lw $ra, 0x44($sp) /* 181B94 802532B4 8FB40040 */ lw $s4, 0x40($sp) /* 181B98 802532B8 8FB3003C */ lw $s3, 0x3C($sp) /* 181B9C 802532BC 8FB20038 */ lw $s2, 0x38($sp) /* 181BA0 802532C0 8FB10034 */ lw $s1, 0x34($sp) /* 181BA4 802532C4 8FB00030 */ lw $s0, 0x30($sp) /* 181BA8 802532C8 03E00008 */ jr $ra /* 181BAC 802532CC 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorPart* part; s32 msgID; s32 actorID; s32 partID; s32 anim; f32 headX, headY, headZ; s32 screenX, screenY, screenZ; s32 msgID2; if (isInitialCall) { msgID = evt_get_variable(script, *args++); actorID = evt_get_variable(script, *args++); partID = evt_get_variable(script, *args++); gSpeakingActorTalkAnim = evt_get_variable(script, *args++); gSpeakingActorIdleAnim = evt_get_variable(script, *args++); msgID2 = msgID; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); part = get_actor_part(actor, partID); gSpeakingActor = actor; gSpeakingActorPart = part; headX = actor->currentPos.x + actor->headOffset.x; if (!(actor->flags & ACTOR_FLAG_8000)) { headY = actor->size.y + (actor->currentPos.y + actor->headOffset.y); } else { headY = actor->currentPos.y + actor->headOffset.y + (actor->size.y / 2); } headZ = actor->currentPos.z + actor->headOffset.z; get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); gSpeakingActorPrintIsDone = FALSE; gSpeakingActorPrintCtx = msg_get_printer_for_msg(msgID2, &gSpeakingActorPrintIsDone); msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY); script->functionTemp[0] = 0; gOverrideFlags |= GLOBAL_OVERRIDES_10; if (gSpeakingActorTalkAnim >= 0) { func_80263E08(actor, part, gSpeakingActorTalkAnim); } increment_status_bar_disabled(); } if (script->functionTemp[0] == 0) { actor = gSpeakingActor; part = gSpeakingActorPart; headX = actor->currentPos.x + actor->headOffset.x; if (!(actor->flags & ACTOR_FLAG_8000)) { headY = actor->size.y + (actor->currentPos.y + actor->headOffset.y); } else { headY = actor->headOffset.y; headY = actor->currentPos.y + actor->headOffset.y + (actor->size.y / 2); } headZ = actor->currentPos.z + actor->headOffset.z; get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY); if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_40) { decrement_status_bar_disabled(); return ApiStatus_DONE1; } if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_80) { // "is talking" flag anim = gSpeakingActorTalkAnim; } else { anim = gSpeakingActorIdleAnim; } if (anim >= 0) { func_80263E08(actor, part, anim); } if (gSpeakingActorPrintIsDone == TRUE) { decrement_status_bar_disabled(); gOverrideFlags &= ~GLOBAL_OVERRIDES_10; return ApiStatus_DONE1; } } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel BringPartnerOut /* F3F68 802CF5B8 27BDFF98 */ addiu $sp, $sp, -0x68 /* F3F6C 802CF5BC AFB10024 */ sw $s1, 0x24($sp) /* F3F70 802CF5C0 AFB20028 */ sw $s2, 0x28($sp) /* F3F74 802CF5C4 3C128011 */ lui $s2, %hi(gPlayerStatus) /* F3F78 802CF5C8 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* F3F7C 802CF5CC AFBF0034 */ sw $ra, 0x34($sp) /* F3F80 802CF5D0 AFB40030 */ sw $s4, 0x30($sp) /* F3F84 802CF5D4 AFB3002C */ sw $s3, 0x2C($sp) /* F3F88 802CF5D8 AFB00020 */ sw $s0, 0x20($sp) /* F3F8C 802CF5DC F7BE0060 */ sdc1 $f30, 0x60($sp) /* F3F90 802CF5E0 F7BC0058 */ sdc1 $f28, 0x58($sp) /* F3F94 802CF5E4 F7BA0050 */ sdc1 $f26, 0x50($sp) /* F3F98 802CF5E8 F7B80048 */ sdc1 $f24, 0x48($sp) /* F3F9C 802CF5EC F7B60040 */ sdc1 $f22, 0x40($sp) /* F3FA0 802CF5F0 F7B40038 */ sdc1 $f20, 0x38($sp) /* F3FA4 802CF5F4 8C82000C */ lw $v0, 0xC($a0) /* F3FA8 802CF5F8 10A00089 */ beqz $a1, .L802CF820 /* F3FAC 802CF5FC 27B10010 */ addiu $s1, $sp, 0x10 /* F3FB0 802CF600 8C450000 */ lw $a1, 0x0($v0) /* F3FB4 802CF604 0C0B1EAF */ jal evt_get_variable /* F3FB8 802CF608 00000000 */ nop /* F3FBC 802CF60C 3C038011 */ lui $v1, %hi(gPlayerData) /* F3FC0 802CF610 2463F290 */ addiu $v1, $v1, %lo(gPlayerData) /* F3FC4 802CF614 80630012 */ lb $v1, 0x12($v1) /* F3FC8 802CF618 3C14802E */ lui $s4, %hi(wExtraPartnerID) /* F3FCC 802CF61C 2694AE40 */ addiu $s4, $s4, %lo(wExtraPartnerID) /* F3FD0 802CF620 14620004 */ bne $v1, $v0, .L802CF634 /* F3FD4 802CF624 AE820000 */ sw $v0, 0x0($s4) /* F3FD8 802CF628 AE800000 */ sw $zero, 0x0($s4) /* F3FDC 802CF62C 080B3E54 */ j .L802CF950 /* F3FE0 802CF630 24020002 */ addiu $v0, $zero, 0x2 .L802CF634: /* F3FE4 802CF634 0C00EABB */ jal get_npc_unsafe /* F3FE8 802CF638 2404FFFC */ addiu $a0, $zero, -0x4 /* F3FEC 802CF63C 0040802D */ daddu $s0, $v0, $zero /* F3FF0 802CF640 2402FFFB */ addiu $v0, $zero, -0x5 /* F3FF4 802CF644 A20200A4 */ sb $v0, 0xA4($s0) /* F3FF8 802CF648 8E830000 */ lw $v1, 0x0($s4) /* F3FFC 802CF64C 24020100 */ addiu $v0, $zero, 0x100 /* F4000 802CF650 AFA20010 */ sw $v0, 0x10($sp) /* F4004 802CF654 000310C0 */ sll $v0, $v1, 3 /* F4008 802CF658 00431021 */ addu $v0, $v0, $v1 /* F400C 802CF65C 00021080 */ sll $v0, $v0, 2 /* F4010 802CF660 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x10) /* F4014 802CF664 00220821 */ addu $at, $at, $v0 /* F4018 802CF668 8C228358 */ lw $v0, %lo(gPartnerAnimations + 0x10)($at) /* F401C 802CF66C 0220202D */ daddu $a0, $s1, $zero /* F4020 802CF670 AFA00018 */ sw $zero, 0x18($sp) /* F4024 802CF674 AFA0001C */ sw $zero, 0x1C($sp) /* F4028 802CF678 0C00E211 */ jal create_basic_npc /* F402C 802CF67C AFA20014 */ sw $v0, 0x14($sp) /* F4030 802CF680 0040202D */ daddu $a0, $v0, $zero /* F4034 802CF684 3C01802E */ lui $at, %hi(wExtraPartnerNpcID) /* F4038 802CF688 AC24AE44 */ sw $a0, %lo(wExtraPartnerNpcID)($at) /* F403C 802CF68C 0C00E2B7 */ jal get_npc_by_index /* F4040 802CF690 2413000A */ addiu $s3, $zero, 0xA /* F4044 802CF694 0040882D */ daddu $s1, $v0, $zero /* F4048 802CF698 2402FFFC */ addiu $v0, $zero, -0x4 /* F404C 802CF69C A63300A6 */ sh $s3, 0xA6($s1) /* F4050 802CF6A0 A63300A8 */ sh $s3, 0xA8($s1) /* F4054 802CF6A4 A22200A4 */ sb $v0, 0xA4($s1) /* F4058 802CF6A8 AE200054 */ sw $zero, 0x54($s1) /* F405C 802CF6AC AE200058 */ sw $zero, 0x58($s1) /* F4060 802CF6B0 AE20005C */ sw $zero, 0x5C($s1) /* F4064 802CF6B4 C61A0038 */ lwc1 $f26, 0x38($s0) /* F4068 802CF6B8 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* F406C 802CF6BC 44810000 */ mtc1 $at, $f0 /* F4070 802CF6C0 E63A0060 */ swc1 $f26, 0x60($s1) /* F4074 802CF6C4 C65E002C */ lwc1 $f30, 0x2C($s2) /* F4078 802CF6C8 E63E0064 */ swc1 $f30, 0x64($s1) /* F407C 802CF6CC C6160040 */ lwc1 $f22, 0x40($s0) /* F4080 802CF6D0 4600B580 */ add.s $f22, $f22, $f0 /* F4084 802CF6D4 4406D000 */ mfc1 $a2, $f26 /* F4088 802CF6D8 E6360068 */ swc1 $f22, 0x68($s1) /* F408C 802CF6DC C6580028 */ lwc1 $f24, 0x28($s2) /* F4090 802CF6E0 4407B000 */ mfc1 $a3, $f22 /* F4094 802CF6E4 E6380038 */ swc1 $f24, 0x38($s1) /* F4098 802CF6E8 964200B0 */ lhu $v0, 0xB0($s2) /* F409C 802CF6EC C642002C */ lwc1 $f2, 0x2C($s2) /* F40A0 802CF6F0 00021400 */ sll $v0, $v0, 16 /* F40A4 802CF6F4 00021C03 */ sra $v1, $v0, 16 /* F40A8 802CF6F8 000217C2 */ srl $v0, $v0, 31 /* F40AC 802CF6FC 00621821 */ addu $v1, $v1, $v0 /* F40B0 802CF700 00031843 */ sra $v1, $v1, 1 /* F40B4 802CF704 44830000 */ mtc1 $v1, $f0 /* F40B8 802CF708 00000000 */ nop /* F40BC 802CF70C 46800020 */ cvt.s.w $f0, $f0 /* F40C0 802CF710 46001700 */ add.s $f28, $f2, $f0 /* F40C4 802CF714 3C014080 */ lui $at, (0x40800000 >> 16) /* F40C8 802CF718 44810000 */ mtc1 $at, $f0 /* F40CC 802CF71C 3C013FCC */ lui $at, (0x3FCCCCCD >> 16) /* F40D0 802CF720 3421CCCD */ ori $at, $at, (0x3FCCCCCD & 0xFFFF) /* F40D4 802CF724 44811000 */ mtc1 $at, $f2 /* F40D8 802CF728 E63C003C */ swc1 $f28, 0x3C($s1) /* F40DC 802CF72C C6540030 */ lwc1 $f20, 0x30($s2) /* F40E0 802CF730 4600C306 */ mov.s $f12, $f24 /* F40E4 802CF734 E6200018 */ swc1 $f0, 0x18($s1) /* F40E8 802CF738 E6220014 */ swc1 $f2, 0x14($s1) /* F40EC 802CF73C 4600A386 */ mov.s $f14, $f20 /* F40F0 802CF740 0C00A7B5 */ jal dist2D /* F40F4 802CF744 E6340040 */ swc1 $f20, 0x40($s1) /* F40F8 802CF748 4600C306 */ mov.s $f12, $f24 /* F40FC 802CF74C 4406D000 */ mfc1 $a2, $f26 /* F4100 802CF750 4407B000 */ mfc1 $a3, $f22 /* F4104 802CF754 4600A386 */ mov.s $f14, $f20 /* F4108 802CF758 0C00A720 */ jal atan2 /* F410C 802CF75C E6200010 */ swc1 $f0, 0x10($s1) /* F4110 802CF760 C6220010 */ lwc1 $f2, 0x10($s1) /* F4114 802CF764 C6240018 */ lwc1 $f4, 0x18($s1) /* F4118 802CF768 3C108010 */ lui $s0, %hi(gPartnerAnimations) /* F411C 802CF76C 26108348 */ addiu $s0, $s0, %lo(gPartnerAnimations) /* F4120 802CF770 E620000C */ swc1 $f0, 0xC($s1) /* F4124 802CF774 46041083 */ div.s $f2, $f2, $f4 /* F4128 802CF778 4600118D */ trunc.w.s $f6, $f2 /* F412C 802CF77C 44023000 */ mfc1 $v0, $f6 /* F4130 802CF780 00000000 */ nop /* F4134 802CF784 A622008E */ sh $v0, 0x8E($s1) /* F4138 802CF788 00021400 */ sll $v0, $v0, 16 /* F413C 802CF78C 00021403 */ sra $v0, $v0, 16 /* F4140 802CF790 2842000A */ slti $v0, $v0, 0xA /* F4144 802CF794 10400007 */ beqz $v0, .L802CF7B4 /* F4148 802CF798 00000000 */ nop /* F414C 802CF79C 3C014120 */ lui $at, (0x41200000 >> 16) /* F4150 802CF7A0 44811000 */ mtc1 $at, $f2 /* F4154 802CF7A4 C6200010 */ lwc1 $f0, 0x10($s1) /* F4158 802CF7A8 A633008E */ sh $s3, 0x8E($s1) /* F415C 802CF7AC 46020003 */ div.s $f0, $f0, $f2 /* F4160 802CF7B0 E6200018 */ swc1 $f0, 0x18($s1) .L802CF7B4: /* F4164 802CF7B4 8622008E */ lh $v0, 0x8E($s1) /* F4168 802CF7B8 C6200014 */ lwc1 $f0, 0x14($s1) /* F416C 802CF7BC 44822000 */ mtc1 $v0, $f4 /* F4170 802CF7C0 00000000 */ nop /* F4174 802CF7C4 46802120 */ cvt.s.w $f4, $f4 /* F4178 802CF7C8 46040002 */ mul.s $f0, $f0, $f4 /* F417C 802CF7CC 00000000 */ nop /* F4180 802CF7D0 46040002 */ mul.s $f0, $f0, $f4 /* F4184 802CF7D4 00000000 */ nop /* F4188 802CF7D8 3C013F00 */ lui $at, (0x3F000000 >> 16) /* F418C 802CF7DC 44811000 */ mtc1 $at, $f2 /* F4190 802CF7E0 00000000 */ nop /* F4194 802CF7E4 46020002 */ mul.s $f0, $f0, $f2 /* F4198 802CF7E8 00000000 */ nop /* F419C 802CF7EC 8E830000 */ lw $v1, 0x0($s4) /* F41A0 802CF7F0 461CF081 */ sub.s $f2, $f30, $f28 /* F41A4 802CF7F4 000310C0 */ sll $v0, $v1, 3 /* F41A8 802CF7F8 00431021 */ addu $v0, $v0, $v1 /* F41AC 802CF7FC 46001080 */ add.s $f2, $f2, $f0 /* F41B0 802CF800 00021080 */ sll $v0, $v0, 2 /* F41B4 802CF804 00501021 */ addu $v0, $v0, $s0 /* F41B8 802CF808 46041083 */ div.s $f2, $f2, $f4 /* F41BC 802CF80C E622001C */ swc1 $f2, 0x1C($s1) /* F41C0 802CF810 8C430004 */ lw $v1, 0x4($v0) /* F41C4 802CF814 0000102D */ daddu $v0, $zero, $zero /* F41C8 802CF818 080B3E54 */ j .L802CF950 /* F41CC 802CF81C AE230028 */ sw $v1, 0x28($s1) .L802CF820: /* F41D0 802CF820 3C04802E */ lui $a0, %hi(wExtraPartnerNpcID) /* F41D4 802CF824 8C84AE44 */ lw $a0, %lo(wExtraPartnerNpcID)($a0) /* F41D8 802CF828 0C00E2B7 */ jal get_npc_by_index /* F41DC 802CF82C 00000000 */ nop /* F41E0 802CF830 0040882D */ daddu $s1, $v0, $zero /* F41E4 802CF834 C620001C */ lwc1 $f0, 0x1C($s1) /* F41E8 802CF838 C6220014 */ lwc1 $f2, 0x14($s1) /* F41EC 802CF83C 46020001 */ sub.s $f0, $f0, $f2 /* F41F0 802CF840 C622003C */ lwc1 $f2, 0x3C($s1) /* F41F4 802CF844 46001080 */ add.s $f2, $f2, $f0 /* F41F8 802CF848 4480A000 */ mtc1 $zero, $f20 /* F41FC 802CF84C 00000000 */ nop /* F4200 802CF850 4614003E */ c.le.s $f0, $f20 /* F4204 802CF854 E620001C */ swc1 $f0, 0x1C($s1) /* F4208 802CF858 4500000A */ bc1f .L802CF884 /* F420C 802CF85C E622003C */ swc1 $f2, 0x3C($s1) /* F4210 802CF860 3C02802E */ lui $v0, %hi(wExtraPartnerID) /* F4214 802CF864 8C42AE40 */ lw $v0, %lo(wExtraPartnerID)($v0) /* F4218 802CF868 000218C0 */ sll $v1, $v0, 3 /* F421C 802CF86C 00621821 */ addu $v1, $v1, $v0 /* F4220 802CF870 00031880 */ sll $v1, $v1, 2 /* F4224 802CF874 3C028010 */ lui $v0, %hi(gPartnerAnimations + 0x8) /* F4228 802CF878 00431021 */ addu $v0, $v0, $v1 /* F422C 802CF87C 8C428350 */ lw $v0, %lo(gPartnerAnimations + 0x8)($v0) /* F4230 802CF880 AE220028 */ sw $v0, 0x28($s1) .L802CF884: /* F4234 802CF884 8E250018 */ lw $a1, 0x18($s1) /* F4238 802CF888 8E26000C */ lw $a2, 0xC($s1) /* F423C 802CF88C 0C00EA95 */ jal npc_move_heading /* F4240 802CF890 0220202D */ daddu $a0, $s1, $zero /* F4244 802CF894 8622008E */ lh $v0, 0x8E($s1) /* F4248 802CF898 3C014120 */ lui $at, (0x41200000 >> 16) /* F424C 802CF89C 44811000 */ mtc1 $at, $f2 /* F4250 802CF8A0 44820000 */ mtc1 $v0, $f0 /* F4254 802CF8A4 00000000 */ nop /* F4258 802CF8A8 46800020 */ cvt.s.w $f0, $f0 /* F425C 802CF8AC 4600103C */ c.lt.s $f2, $f0 /* F4260 802CF8B0 00000000 */ nop /* F4264 802CF8B4 45030001 */ bc1tl .L802CF8BC /* F4268 802CF8B8 46001006 */ mov.s $f0, $f2 .L802CF8BC: /* F426C 802CF8BC 9622008E */ lhu $v0, 0x8E($s1) /* F4270 802CF8C0 46001001 */ sub.s $f0, $f2, $f0 /* F4274 802CF8C4 2442FFFF */ addiu $v0, $v0, -0x1 /* F4278 802CF8C8 A622008E */ sh $v0, 0x8E($s1) /* F427C 802CF8CC 00021400 */ sll $v0, $v0, 16 /* F4280 802CF8D0 46020003 */ div.s $f0, $f0, $f2 /* F4284 802CF8D4 E6200054 */ swc1 $f0, 0x54($s1) /* F4288 802CF8D8 46000086 */ mov.s $f2, $f0 /* F428C 802CF8DC E6200058 */ swc1 $f0, 0x58($s1) /* F4290 802CF8E0 04400003 */ bltz $v0, .L802CF8F0 /* F4294 802CF8E4 E622005C */ swc1 $f2, 0x5C($s1) /* F4298 802CF8E8 080B3E54 */ j .L802CF950 /* F429C 802CF8EC 0000102D */ daddu $v0, $zero, $zero .L802CF8F0: /* F42A0 802CF8F0 3C03802E */ lui $v1, %hi(wExtraPartnerID) /* F42A4 802CF8F4 8C63AE40 */ lw $v1, %lo(wExtraPartnerID)($v1) /* F42A8 802CF8F8 C6240064 */ lwc1 $f4, 0x64($s1) /* F42AC 802CF8FC C622000C */ lwc1 $f2, 0xC($s1) /* F42B0 802CF900 3C014334 */ lui $at, (0x43340000 >> 16) /* F42B4 802CF904 44816000 */ mtc1 $at, $f12 /* F42B8 802CF908 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F42BC 802CF90C 44810000 */ mtc1 $at, $f0 /* F42C0 802CF910 000310C0 */ sll $v0, $v1, 3 /* F42C4 802CF914 00431021 */ addu $v0, $v0, $v1 /* F42C8 802CF918 00021080 */ sll $v0, $v0, 2 /* F42CC 802CF91C 3C018010 */ lui $at, %hi(gPartnerAnimations + 0x14) /* F42D0 802CF920 00220821 */ addu $at, $at, $v0 /* F42D4 802CF924 8C22835C */ lw $v0, %lo(gPartnerAnimations + 0x14)($at) /* F42D8 802CF928 460C1300 */ add.s $f12, $f2, $f12 /* F42DC 802CF92C E634001C */ swc1 $f20, 0x1C($s1) /* F42E0 802CF930 E624003C */ swc1 $f4, 0x3C($s1) /* F42E4 802CF934 E6200054 */ swc1 $f0, 0x54($s1) /* F42E8 802CF938 E6200058 */ swc1 $f0, 0x58($s1) /* F42EC 802CF93C E620005C */ swc1 $f0, 0x5C($s1) /* F42F0 802CF940 0C00A6C9 */ jal clamp_angle /* F42F4 802CF944 AE220028 */ sw $v0, 0x28($s1) /* F42F8 802CF948 24020002 */ addiu $v0, $zero, 0x2 /* F42FC 802CF94C E620000C */ swc1 $f0, 0xC($s1) .L802CF950: /* F4300 802CF950 8FBF0034 */ lw $ra, 0x34($sp) /* F4304 802CF954 8FB40030 */ lw $s4, 0x30($sp) /* F4308 802CF958 8FB3002C */ lw $s3, 0x2C($sp) /* F430C 802CF95C 8FB20028 */ lw $s2, 0x28($sp) /* F4310 802CF960 8FB10024 */ lw $s1, 0x24($sp) /* F4314 802CF964 8FB00020 */ lw $s0, 0x20($sp) /* F4318 802CF968 D7BE0060 */ ldc1 $f30, 0x60($sp) /* F431C 802CF96C D7BC0058 */ ldc1 $f28, 0x58($sp) /* F4320 802CF970 D7BA0050 */ ldc1 $f26, 0x50($sp) /* F4324 802CF974 D7B80048 */ ldc1 $f24, 0x48($sp) /* F4328 802CF978 D7B60040 */ ldc1 $f22, 0x40($sp) /* F432C 802CF97C D7B40038 */ ldc1 $f20, 0x38($sp) /* F4330 802CF980 03E00008 */ jr $ra /* F4334 802CF984 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: s32 BringPartnerOut(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcBlueprint bp; NpcBlueprint* bpPointer = &bp; PlayerData* playerData = &gPlayerData; PlayerStatus* playerStatus = &gPlayerStatus; Npc* partner; Npc* npc; f32 duration; f32 playerZ; f32 targetZ; f32 playerX; f32 targetX; f32 targetY; f32 playerY; if (isInitialCall) { wExtraPartnerID = evt_get_variable(script, *args++); if (playerData->currentPartner == wExtraPartnerID) { wExtraPartnerID = 0; return ApiStatus_DONE2; } partner = get_npc_unsafe(NPC_PARTNER); partner->npcID = -5; bpPointer->flags = NPC_FLAG_IGNORE_PLAYER_COLLISION; bpPointer->initialAnim = gPartnerAnimations[wExtraPartnerID].fly; bpPointer->onUpdate = NULL; bpPointer->onRender = NULL; wExtraPartnerNpcID = create_basic_npc(bpPointer); npc = get_npc_by_index(wExtraPartnerNpcID); npc->collisionDiameter = 10; npc->collisionHeight = 10; npc->npcID = NPC_PARTNER; npc->scale.x = 0.0f; npc->scale.y = 0.0f; npc->scale.z = 0.0f; npc->moveToPos.x = targetX = partner->pos.x; playerY = playerStatus->position.y; npc->moveToPos.y = playerStatus->position.y; npc->moveToPos.z = targetZ = partner->pos.z + 30.0f; npc->pos.x = playerX = playerStatus->position.x; npc->pos.y = targetY = playerStatus->position.y + (playerStatus->colliderHeight / 2); playerZ = playerStatus->position.z; npc->moveSpeed = 4.0f; npc->jumpScale = 1.6f; npc->pos.z = playerZ; npc->planarFlyDist = dist2D(playerX, npc->pos.z, targetX, targetZ); npc->yaw = atan2(playerX, playerZ, targetX, targetZ); npc->duration = npc->planarFlyDist / npc->moveSpeed; if (npc->duration < 10) { npc->duration = 10; npc->moveSpeed = npc->planarFlyDist / npc->duration; } npc->jumpVelocity = ((playerY - targetY) + (npc->jumpScale * npc->duration * npc->duration * 0.5f)) / npc->duration; npc->currentAnim = gPartnerAnimations[wExtraPartnerID].walk; return ApiStatus_BLOCK; } npc = get_npc_by_index(wExtraPartnerNpcID); npc->jumpVelocity -= npc->jumpScale; npc->pos.y += npc->jumpVelocity; if (npc->jumpVelocity <= 0.0f) { npc->currentAnim = gPartnerAnimations[wExtraPartnerID].jump; } npc_move_heading(npc, npc->moveSpeed, npc->yaw); duration = npc->duration; if (duration > 10.0f) { duration = 10.0f; } npc->scale.x = (10.0f - duration) / 10.0f; npc->scale.y = npc->scale.x; npc->scale.z = npc->scale.x; npc->duration--; if (npc->duration < 0) { npc->currentAnim = gPartnerAnimations[wExtraPartnerID].idle; npc->jumpVelocity = 0.0f; npc->pos.y = npc->moveToPos.y; npc->scale.x = 1.0f; npc->scale.y = 1.0f; npc->scale.z = 1.0f; npc->yaw = clamp_angle(npc->yaw + 180.0f); return ApiStatus_DONE2; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_800F16CC /* 8AB7C 800F16CC 3C028011 */ lui $v0, %hi(PopupNotBattle) /* 8AB80 800F16D0 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0) /* 8AB84 800F16D4 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 8AB88 800F16D8 AFBF001C */ sw $ra, 0x1C($sp) /* 8AB8C 800F16DC AFB20018 */ sw $s2, 0x18($sp) /* 8AB90 800F16E0 AFB10014 */ sw $s1, 0x14($sp) /* 8AB94 800F16E4 1040002B */ beqz $v0, .L800F1794 /* 8AB98 800F16E8 AFB00010 */ sw $s0, 0x10($sp) /* 8AB9C 800F16EC 3C028011 */ lui $v0, %hi(gPopupMenu) /* 8ABA0 800F16F0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0) glabel func_800F16F4 /* 8ABA4 800F16F4 8C430318 */ lw $v1, 0x318($v0) /* 8ABA8 800F16F8 2C62000E */ sltiu $v0, $v1, 0xE /* 8ABAC 800F16FC 10400020 */ beqz $v0, .L800F1780 /* 8ABB0 800F1700 00031080 */ sll $v0, $v1, 2 /* 8ABB4 800F1704 3C018011 */ lui $at, %hi(jtbl_8010C3A0) /* 8ABB8 800F1708 00220821 */ addu $at, $at, $v0 /* 8ABBC 800F170C 8C22C3A0 */ lw $v0, %lo(jtbl_8010C3A0)($at) /* 8ABC0 800F1710 00400008 */ jr $v0 /* 8ABC4 800F1714 00000000 */ nop glabel .L800F1718 /* 8ABC8 800F1718 2404000E */ addiu $a0, $zero, 0xE /* 8ABCC 800F171C 3C108014 */ lui $s0, %hi(basic_window_update) /* 8ABD0 800F1720 26107474 */ addiu $s0, $s0, %lo(basic_window_update) /* 8ABD4 800F1724 0C051F9F */ jal set_window_update /* 8ABD8 800F1728 0200282D */ daddu $a1, $s0, $zero /* 8ABDC 800F172C 0803C5D3 */ j .L800F174C glabel func_800F1730 /* 8ABE0 800F1730 24040001 */ addiu $a0, $zero, 0x1 glabel .L800F1734 /* 8ABE4 800F1734 2404000E */ addiu $a0, $zero, 0xE /* 8ABE8 800F1738 3C108014 */ lui $s0, %hi(basic_window_update) /* 8ABEC 800F173C 26107474 */ addiu $s0, $s0, %lo(basic_window_update) /* 8ABF0 800F1740 0C051F9F */ jal set_window_update /* 8ABF4 800F1744 0200282D */ daddu $a1, $s0, $zero /* 8ABF8 800F1748 24040002 */ addiu $a0, $zero, 0x2 .L800F174C: /* 8ABFC 800F174C 0C05272D */ jal sfx_play_sound /* 8AC00 800F1750 00000000 */ nop /* 8AC04 800F1754 24040013 */ addiu $a0, $zero, 0x13 /* 8AC08 800F1758 0C051F9F */ jal set_window_update /* 8AC0C 800F175C 0200282D */ daddu $a1, $s0, $zero /* 8AC10 800F1760 0803C5E1 */ j .L800F1784 /* 8AC14 800F1764 24040015 */ addiu $a0, $zero, 0x15 glabel .L800F1768 /* 8AC18 800F1768 3C058014 */ lui $a1, %hi(basic_window_update) /* 8AC1C 800F176C 24A57474 */ addiu $a1, $a1, %lo(basic_window_update) /* 8AC20 800F1770 0C051F9F */ jal set_window_update /* 8AC24 800F1774 2404000E */ addiu $a0, $zero, 0xE /* 8AC28 800F1778 0C05272D */ jal sfx_play_sound /* 8AC2C 800F177C 24040001 */ addiu $a0, $zero, 0x1 .L800F1780: /* 8AC30 800F1780 24040015 */ addiu $a0, $zero, 0x15 .L800F1784: /* 8AC34 800F1784 3C058014 */ lui $a1, %hi(basic_window_update) /* 8AC38 800F1788 24A57474 */ addiu $a1, $a1, %lo(basic_window_update) /* 8AC3C 800F178C 0803C5FC */ j .L800F17F0 /* 8AC40 800F1790 00000000 */ nop .L800F1794: /* 8AC44 800F1794 3C028011 */ lui $v0, %hi(gPopupMenu) /* 8AC48 800F1798 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0) /* 8AC4C 800F179C 8C430318 */ lw $v1, 0x318($v0) /* 8AC50 800F17A0 2C62000E */ sltiu $v0, $v1, 0xE /* 8AC54 800F17A4 10400014 */ beqz $v0, .L800F17F8 /* 8AC58 800F17A8 00031080 */ sll $v0, $v1, 2 /* 8AC5C 800F17AC 3C018011 */ lui $at, %hi(jtbl_8010C3D8) /* 8AC60 800F17B0 00220821 */ addu $at, $at, $v0 /* 8AC64 800F17B4 8C22C3D8 */ lw $v0, %lo(jtbl_8010C3D8)($at) /* 8AC68 800F17B8 00400008 */ jr $v0 /* 8AC6C 800F17BC 00000000 */ nop glabel .L800F17C0 /* 8AC70 800F17C0 2404000E */ addiu $a0, $zero, 0xE /* 8AC74 800F17C4 0C051F9F */ jal set_window_update /* 8AC78 800F17C8 24050001 */ addiu $a1, $zero, 0x1 /* 8AC7C 800F17CC 0803C5FB */ j .L800F17EC /* 8AC80 800F17D0 24040013 */ addiu $a0, $zero, 0x13 glabel .L800F17D4 /* 8AC84 800F17D4 2404000E */ addiu $a0, $zero, 0xE /* 8AC88 800F17D8 0C051F9F */ jal set_window_update /* 8AC8C 800F17DC 24050001 */ addiu $a1, $zero, 0x1 /* 8AC90 800F17E0 0803C5FB */ j .L800F17EC /* 8AC94 800F17E4 24040013 */ addiu $a0, $zero, 0x13 glabel .L800F17E8 /* 8AC98 800F17E8 2404000E */ addiu $a0, $zero, 0xE .L800F17EC: /* 8AC9C 800F17EC 24050001 */ addiu $a1, $zero, 0x1 .L800F17F0: /* 8ACA0 800F17F0 0C051F9F */ jal set_window_update /* 8ACA4 800F17F4 00000000 */ nop .L800F17F8: /* 8ACA8 800F17F8 3C118011 */ lui $s1, %hi(gPopupMenu) /* 8ACAC 800F17FC 2631D69C */ addiu $s1, $s1, %lo(gPopupMenu) /* 8ACB0 800F1800 8E220000 */ lw $v0, 0x0($s1) /* 8ACB4 800F1804 8C420318 */ lw $v0, 0x318($v0) /* 8ACB8 800F1808 24120003 */ addiu $s2, $zero, 0x3 /* 8ACBC 800F180C 14520008 */ bne $v0, $s2, .L800F1830 /* 8ACC0 800F1810 24040010 */ addiu $a0, $zero, 0x10 /* 8ACC4 800F1814 3C108014 */ lui $s0, %hi(basic_window_update) /* 8ACC8 800F1818 26107474 */ addiu $s0, $s0, %lo(basic_window_update) /* 8ACCC 800F181C 0C051F9F */ jal set_window_update /* 8ACD0 800F1820 0200282D */ daddu $a1, $s0, $zero /* 8ACD4 800F1824 24040014 */ addiu $a0, $zero, 0x14 /* 8ACD8 800F1828 0C051F9F */ jal set_window_update /* 8ACDC 800F182C 0200282D */ daddu $a1, $s0, $zero .L800F1830: /* 8ACE0 800F1830 8E220000 */ lw $v0, 0x0($s1) /* 8ACE4 800F1834 8C420318 */ lw $v0, 0x318($v0) /* 8ACE8 800F1838 24100004 */ addiu $s0, $zero, 0x4 /* 8ACEC 800F183C 14500005 */ bne $v0, $s0, .L800F1854 /* 8ACF0 800F1840 00000000 */ nop /* 8ACF4 800F1844 3C058014 */ lui $a1, %hi(basic_window_update) /* 8ACF8 800F1848 24A57474 */ addiu $a1, $a1, %lo(basic_window_update) /* 8ACFC 800F184C 0C051F9F */ jal set_window_update /* 8AD00 800F1850 24040012 */ addiu $a0, $zero, 0x12 .L800F1854: /* 8AD04 800F1854 8E220000 */ lw $v0, 0x0($s1) /* 8AD08 800F1858 8C430318 */ lw $v1, 0x318($v0) /* 8AD0C 800F185C 24020005 */ addiu $v0, $zero, 0x5 /* 8AD10 800F1860 14620006 */ bne $v1, $v0, .L800F187C /* 8AD14 800F1864 240500FF */ addiu $a1, $zero, 0xFF /* 8AD18 800F1868 3C058014 */ lui $a1, %hi(basic_window_update) /* 8AD1C 800F186C 24A57474 */ addiu $a1, $a1, %lo(basic_window_update) /* 8AD20 800F1870 0C051F9F */ jal set_window_update /* 8AD24 800F1874 24040010 */ addiu $a0, $zero, 0x10 /* 8AD28 800F1878 240500FF */ addiu $a1, $zero, 0xFF .L800F187C: /* 8AD2C 800F187C 00A0302D */ daddu $a2, $a1, $zero /* 8AD30 800F1880 3C048011 */ lui $a0, %hi(PopupMenu_EmptybarHEID) /* 8AD34 800F1884 8C84D65C */ lw $a0, %lo(PopupMenu_EmptybarHEID)($a0) /* 8AD38 800F1888 0C0513BF */ jal hud_element_set_tint /* 8AD3C 800F188C 00A0382D */ daddu $a3, $a1, $zero /* 8AD40 800F1890 240500FF */ addiu $a1, $zero, 0xFF /* 8AD44 800F1894 00A0302D */ daddu $a2, $a1, $zero /* 8AD48 800F1898 3C048011 */ lui $a0, %hi(D_8010D678) /* 8AD4C 800F189C 8C84D678 */ lw $a0, %lo(D_8010D678)($a0) /* 8AD50 800F18A0 0C0513BF */ jal hud_element_set_tint /* 8AD54 800F18A4 00A0382D */ daddu $a3, $a1, $zero /* 8AD58 800F18A8 240500FF */ addiu $a1, $zero, 0xFF /* 8AD5C 800F18AC 00A0302D */ daddu $a2, $a1, $zero /* 8AD60 800F18B0 3C048011 */ lui $a0, %hi(D_8010D66C) /* 8AD64 800F18B4 8C84D66C */ lw $a0, %lo(D_8010D66C)($a0) /* 8AD68 800F18B8 0C0513BF */ jal hud_element_set_tint /* 8AD6C 800F18BC 00A0382D */ daddu $a3, $a1, $zero /* 8AD70 800F18C0 240500FF */ addiu $a1, $zero, 0xFF /* 8AD74 800F18C4 00A0302D */ daddu $a2, $a1, $zero /* 8AD78 800F18C8 3C048011 */ lui $a0, %hi(D_8010D670) /* 8AD7C 800F18CC 8C84D670 */ lw $a0, %lo(D_8010D670)($a0) /* 8AD80 800F18D0 0C0513BF */ jal hud_element_set_tint /* 8AD84 800F18D4 00A0382D */ daddu $a3, $a1, $zero /* 8AD88 800F18D8 240500FF */ addiu $a1, $zero, 0xFF /* 8AD8C 800F18DC 00A0302D */ daddu $a2, $a1, $zero /* 8AD90 800F18E0 3C048011 */ lui $a0, %hi(D_8010D674) /* 8AD94 800F18E4 8C84D674 */ lw $a0, %lo(D_8010D674)($a0) /* 8AD98 800F18E8 0C0513BF */ jal hud_element_set_tint /* 8AD9C 800F18EC 00A0382D */ daddu $a3, $a1, $zero /* 8ADA0 800F18F0 8E220000 */ lw $v0, 0x0($s1) /* 8ADA4 800F18F4 8C420318 */ lw $v0, 0x318($v0) /* 8ADA8 800F18F8 1452000C */ bne $v0, $s2, .L800F192C /* 8ADAC 800F18FC 240500FF */ addiu $a1, $zero, 0xFF /* 8ADB0 800F1900 00A0302D */ daddu $a2, $a1, $zero /* 8ADB4 800F1904 3C048011 */ lui $a0, %hi(PopupTitleIconHEID) /* 8ADB8 800F1908 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0) /* 8ADBC 800F190C 0C0513BF */ jal hud_element_set_tint /* 8ADC0 800F1910 00A0382D */ daddu $a3, $a1, $zero /* 8ADC4 800F1914 240500FF */ addiu $a1, $zero, 0xFF /* 8ADC8 800F1918 00A0302D */ daddu $a2, $a1, $zero /* 8ADCC 800F191C 3C048011 */ lui $a0, %hi(D_8010D664) /* 8ADD0 800F1920 8C84D664 */ lw $a0, %lo(D_8010D664)($a0) /* 8ADD4 800F1924 0C0513BF */ jal hud_element_set_tint /* 8ADD8 800F1928 00A0382D */ daddu $a3, $a1, $zero .L800F192C: /* 8ADDC 800F192C 8E220000 */ lw $v0, 0x0($s1) /* 8ADE0 800F1930 8C420318 */ lw $v0, 0x318($v0) /* 8ADE4 800F1934 1450000C */ bne $v0, $s0, .L800F1968 /* 8ADE8 800F1938 240500FF */ addiu $a1, $zero, 0xFF /* 8ADEC 800F193C 00A0302D */ daddu $a2, $a1, $zero /* 8ADF0 800F1940 3C048011 */ lui $a0, %hi(PopupTitleIconHEID) /* 8ADF4 800F1944 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0) /* 8ADF8 800F1948 0C0513BF */ jal hud_element_set_tint /* 8ADFC 800F194C 00A0382D */ daddu $a3, $a1, $zero /* 8AE00 800F1950 240500FF */ addiu $a1, $zero, 0xFF /* 8AE04 800F1954 00A0302D */ daddu $a2, $a1, $zero /* 8AE08 800F1958 3C048011 */ lui $a0, %hi(D_8010D664) /* 8AE0C 800F195C 8C84D664 */ lw $a0, %lo(D_8010D664)($a0) /* 8AE10 800F1960 0C0513BF */ jal hud_element_set_tint /* 8AE14 800F1964 00A0382D */ daddu $a3, $a1, $zero .L800F1968: /* 8AE18 800F1968 8E220000 */ lw $v0, 0x0($s1) /* 8AE1C 800F196C 8C430318 */ lw $v1, 0x318($v0) /* 8AE20 800F1970 24020001 */ addiu $v0, $zero, 0x1 /* 8AE24 800F1974 10620003 */ beq $v1, $v0, .L800F1984 /* 8AE28 800F1978 00000000 */ nop /* 8AE2C 800F197C 14700007 */ bne $v1, $s0, .L800F199C /* 8AE30 800F1980 00000000 */ nop .L800F1984: /* 8AE34 800F1984 3C048011 */ lui $a0, %hi(D_8010D668) /* 8AE38 800F1988 8C84D668 */ lw $a0, %lo(D_8010D668)($a0) /* 8AE3C 800F198C 240500FF */ addiu $a1, $zero, 0xFF /* 8AE40 800F1990 00A0302D */ daddu $a2, $a1, $zero /* 8AE44 800F1994 0C0513BF */ jal hud_element_set_tint /* 8AE48 800F1998 00A0382D */ daddu $a3, $a1, $zero .L800F199C: /* 8AE4C 800F199C 3C028011 */ lui $v0, %hi(gPopupMenu) /* 8AE50 800F19A0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0) /* 8AE54 800F19A4 8C430318 */ lw $v1, 0x318($v0) /* 8AE58 800F19A8 24020005 */ addiu $v0, $zero, 0x5 /* 8AE5C 800F19AC 14620006 */ bne $v1, $v0, .L800F19C8 /* 8AE60 800F19B0 240500FF */ addiu $a1, $zero, 0xFF /* 8AE64 800F19B4 3C048011 */ lui $a0, %hi(PopupTitleIconHEID) /* 8AE68 800F19B8 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0) /* 8AE6C 800F19BC 00A0302D */ daddu $a2, $a1, $zero /* 8AE70 800F19C0 0C0513BF */ jal hud_element_set_tint /* 8AE74 800F19C4 00A0382D */ daddu $a3, $a1, $zero .L800F19C8: /* 8AE78 800F19C8 3C048011 */ lui $a0, %hi(D_8010D66C) /* 8AE7C 800F19CC 8C84D66C */ lw $a0, %lo(D_8010D66C)($a0) /* 8AE80 800F19D0 3C058010 */ lui $a1, %hi(HES_AnimatedHandPointer) /* 8AE84 800F19D4 24A54A28 */ addiu $a1, $a1, %lo(HES_AnimatedHandPointer) /* 8AE88 800F19D8 0C0511FF */ jal hud_element_set_script /* 8AE8C 800F19DC 00000000 */ nop /* 8AE90 800F19E0 8FBF001C */ lw $ra, 0x1C($sp) /* 8AE94 800F19E4 8FB20018 */ lw $s2, 0x18($sp) /* 8AE98 800F19E8 8FB10014 */ lw $s1, 0x14($sp) /* 8AE9C 800F19EC 8FB00010 */ lw $s0, 0x10($sp) /* 8AEA0 800F19F0 2402000A */ addiu $v0, $zero, 0xA /* 8AEA4 800F19F4 3C018011 */ lui $at, %hi(D_8010D690) /* 8AEA8 800F19F8 A022D690 */ sb $v0, %lo(D_8010D690)($at) /* 8AEAC 800F19FC 24020014 */ addiu $v0, $zero, 0x14 /* 8AEB0 800F1A00 3C018011 */ lui $at, %hi(gPopupState) /* 8AEB4 800F1A04 AC22D640 */ sw $v0, %lo(gPopupState)($at) /* 8AEB8 800F1A08 03E00008 */ jr $ra /* 8AEBC 800F1A0C 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void func_800F16CC(void) { if (PopupNotBattle) { switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: case POPUP_MENU_THROW_AWAY_ITEM: case POPUP_MENU_TRADE_FOR_BADGE: case POPUP_MENU_SELL_ITEM: case POPUP_MENU_CHECK_ITEM: case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: set_window_update(WINDOW_ID_14, (s32) basic_window_update); sfx_play_sound(SOUND_1); set_window_update(WINDOW_ID_19, (s32) basic_window_update); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: set_window_update(WINDOW_ID_14, (s32) basic_window_update); sfx_play_sound(SOUND_2); set_window_update(WINDOW_ID_19, (s32) basic_window_update); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: set_window_update(WINDOW_ID_14, (s32) basic_window_update); sfx_play_sound(SOUND_1); break; } set_window_update(WINDOW_ID_21, (s32) basic_window_update); } else { switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: case POPUP_MENU_THROW_AWAY_ITEM: case POPUP_MENU_TRADE_FOR_BADGE: case POPUP_MENU_SELL_ITEM: case POPUP_MENU_CHECK_ITEM: case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); break; } } if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { set_window_update(WINDOW_ID_16, (s32) basic_window_update); set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { set_window_update(WINDOW_ID_18, (s32) basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { set_window_update(WINDOW_ID_16, (s32) basic_window_update); } hud_element_set_tint(PopupMenu_EmptybarHEID, 255, 255, 255); hud_element_set_tint(PopupMenu_EntryIconHEID, 255, 255, 255); hud_element_set_tint(PopupMenu_CursorHEID, 255, 255, 255); hud_element_set_tint(PopupMenu_UpArrowHEID, 255, 255, 255); hud_element_set_tint(PopupMenu_DownArrowHEID, 255, 255, 255); if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255); hud_element_set_tint(PopupMenu_TimesHEID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255); hud_element_set_tint(PopupMenu_TimesHEID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { hud_element_set_tint(PopupMenu_PartnerLevelHEID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255); } hud_element_set_script(PopupMenu_CursorHEID, &HES_AnimatedHandPointer); D_8010D690 = MSG_PAL_STANDARD; gPopupState = POPUP_STATE_20; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8024C570 /* 17AE50 8024C570 27BDFFB0 */ addiu $sp, $sp, -0x50 D_8024C574: /* 17AE54 8024C574 AFB00018 */ sw $s0, 0x18($sp) .L8024C578: /* 17AE58 8024C578 3C10800B */ lui $s0, %hi(gCameras + 0x558) /* 17AE5C 8024C57C 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558) D_8024C580: /* 17AE60 8024C580 AFBF001C */ sw $ra, 0x1C($sp) /* 17AE64 8024C584 F7BE0048 */ sdc1 $f30, 0x48($sp) /* 17AE68 8024C588 F7BC0040 */ sdc1 $f28, 0x40($sp) /* 17AE6C 8024C58C F7BA0038 */ sdc1 $f26, 0x38($sp) /* 17AE70 8024C590 F7B80030 */ sdc1 $f24, 0x30($sp) /* 17AE74 8024C594 F7B60028 */ sdc1 $f22, 0x28($sp) /* 17AE78 8024C598 10A00036 */ beqz $a1, .L8024C674 /* 17AE7C 8024C59C F7B40020 */ sdc1 $f20, 0x20($sp) /* 17AE80 8024C5A0 3C02802A */ lui $v0, %hi(BattleCam_SetImmediately) /* 17AE84 8024C5A4 8042F2A4 */ lb $v0, %lo(BattleCam_SetImmediately)($v0) /* 17AE88 8024C5A8 1040000A */ beqz $v0, .L8024C5D4 /* 17AE8C 8024C5AC 00000000 */ nop .L8024C5B0: /* 17AE90 8024C5B0 C6000054 */ lwc1 $f0, 0x54($s0) /* 17AE94 8024C5B4 C6020058 */ lwc1 $f2, 0x58($s0) /* 17AE98 8024C5B8 C604005C */ lwc1 $f4, 0x5C($s0) /* 17AE9C 8024C5BC 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 17AEA0 8024C5C0 E420F270 */ swc1 $f0, %lo(BattleCam_PosX)($at) /* 17AEA4 8024C5C4 3C01802A */ lui $at, %hi(BattleCam_PosY) /* 17AEA8 8024C5C8 E422F274 */ swc1 $f2, %lo(BattleCam_PosY)($at) /* 17AEAC 8024C5CC 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17AEB0 8024C5D0 E424F278 */ swc1 $f4, %lo(BattleCam_PosZ)($at) .L8024C5D4: /* 17AEB4 8024C5D4 8602001E */ lh $v0, 0x1E($s0) .L8024C5D8: /* 17AEB8 8024C5D8 86040026 */ lh $a0, 0x26($s0) /* 17AEBC 8024C5DC 86030024 */ lh $v1, 0x24($s0) D_8024C5E0: /* 17AEC0 8024C5E0 44820000 */ mtc1 $v0, $f0 /* 17AEC4 8024C5E4 00000000 */ nop /* 17AEC8 8024C5E8 46800020 */ cvt.s.w $f0, $f0 /* 17AECC 8024C5EC 86020022 */ lh $v0, 0x22($s0) /* 17AED0 8024C5F0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 17AED4 8024C5F4 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at) .L8024C5F8: /* 17AED8 8024C5F8 44820000 */ mtc1 $v0, $f0 /* 17AEDC 8024C5FC 00000000 */ nop D_8024C600_C09E80: /* 17AEE0 8024C600 46800020 */ cvt.s.w $f0, $f0 /* 17AEE4 8024C604 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17AEE8 8024C608 E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 17AEEC 8024C60C 44830000 */ mtc1 $v1, $f0 /* 17AEF0 8024C610 00000000 */ nop /* 17AEF4 8024C614 46800020 */ cvt.s.w $f0, $f0 .L8024C618: /* 17AEF8 8024C618 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17AEFC 8024C61C E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at) /* 17AF00 8024C620 04820001 */ bltzl $a0, .L8024C628 /* 17AF04 8024C624 248400FF */ addiu $a0, $a0, 0xFF .L8024C628: /* 17AF08 8024C628 00041203 */ sra $v0, $a0, 8 /* 17AF0C 8024C62C C6020054 */ lwc1 $f2, 0x54($s0) /* 17AF10 8024C630 C6040058 */ lwc1 $f4, 0x58($s0) /* 17AF14 8024C634 C606005C */ lwc1 $f6, 0x5C($s0) D_8024C638_C09EB8: /* 17AF18 8024C638 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft) /* 17AF1C 8024C63C 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1) /* 17AF20 8024C640 44820000 */ mtc1 $v0, $f0 D_8024C644: /* 17AF24 8024C644 00000000 */ nop /* 17AF28 8024C648 46800020 */ cvt.s.w $f0, $f0 /* 17AF2C 8024C64C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 17AF30 8024C650 E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at) /* 17AF34 8024C654 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17AF38 8024C658 E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at) /* 17AF3C 8024C65C 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) .L8024C660: /* 17AF40 8024C660 E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at) /* 17AF44 8024C664 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 17AF48 8024C668 E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at) /* 17AF4C 8024C66C 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal) D_8024C670_C09EF0: /* 17AF50 8024C670 A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at) .L8024C674: /* 17AF54 8024C674 3C01802A */ lui $at, %hi(BattleCam_PosY) /* 17AF58 8024C678 C43CF274 */ lwc1 $f28, %lo(BattleCam_PosY)($at) /* 17AF5C 8024C67C 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 17AF60 8024C680 C43AF270 */ lwc1 $f26, %lo(BattleCam_PosX)($at) /* 17AF64 8024C684 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp) /* 17AF68 8024C688 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0) /* 17AF6C 8024C68C 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 17AF70 8024C690 C43EF278 */ lwc1 $f30, %lo(BattleCam_PosZ)($at) /* 17AF74 8024C694 14400027 */ bnez $v0, .L8024C734 /* 17AF78 8024C698 E7BC0010 */ swc1 $f28, 0x10($sp) /* 17AF7C 8024C69C 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) .L8024C6A0: /* 17AF80 8024C6A0 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17AF84 8024C6A4 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17AF88 8024C6A8 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17AF8C 8024C6AC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17AF90 8024C6B0 4481C000 */ mtc1 $at, $f24 /* 17AF94 8024C6B4 44822000 */ mtc1 $v0, $f4 /* 17AF98 8024C6B8 00000000 */ nop .L8024C6BC: /* 17AF9C 8024C6BC 46802120 */ cvt.s.w $f4, $f4 /* 17AFA0 8024C6C0 44830000 */ mtc1 $v1, $f0 /* 17AFA4 8024C6C4 00000000 */ nop /* 17AFA8 8024C6C8 46800020 */ cvt.s.w $f0, $f0 /* 17AFAC 8024C6CC 46002103 */ div.s $f4, $f4, $f0 /* 17AFB0 8024C6D0 4604C301 */ sub.s $f12, $f24, $f4 /* 17AFB4 8024C6D4 3C014049 */ lui $at, (0x40490FD0 >> 16) /* 17AFB8 8024C6D8 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF) /* 17AFBC 8024C6DC 4481B000 */ mtc1 $at, $f22 /* 17AFC0 8024C6E0 00000000 */ nop /* 17AFC4 8024C6E4 46166302 */ mul.s $f12, $f12, $f22 /* 17AFC8 8024C6E8 00000000 */ nop /* 17AFCC 8024C6EC 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 17AFD0 8024C6F0 4481A000 */ mtc1 $at, $f20 /* 17AFD4 8024C6F4 00000000 */ nop /* 17AFD8 8024C6F8 46146302 */ mul.s $f12, $f12, $f20 /* 17AFDC 8024C6FC 0C00A85B */ jal sin_rad .L8024C700: /* 17AFE0 8024C700 00000000 */ nop /* 17AFE4 8024C704 46160002 */ mul.s $f0, $f0, $f22 /* 17AFE8 8024C708 00000000 */ nop /* 17AFEC 8024C70C 46140302 */ mul.s $f12, $f0, $f20 /* 17AFF0 8024C710 0C00A85B */ jal sin_rad /* 17AFF4 8024C714 00000000 */ nop /* 17AFF8 8024C718 46160002 */ mul.s $f0, $f0, $f22 /* 17AFFC 8024C71C 00000000 */ nop /* 17B000 8024C720 46140302 */ mul.s $f12, $f0, $f20 /* 17B004 8024C724 0C00A85B */ jal sin_rad /* 17B008 8024C728 00000000 */ nop /* 17B00C 8024C72C 080931D8 */ j .L8024C760 /* 17B010 8024C730 4600C101 */ sub.s $f4, $f24, $f0 .L8024C734: /* 17B014 8024C734 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17B018 8024C738 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17B01C 8024C73C 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) .L8024C740: /* 17B020 8024C740 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17B024 8024C744 44822000 */ mtc1 $v0, $f4 /* 17B028 8024C748 00000000 */ nop /* 17B02C 8024C74C 46802120 */ cvt.s.w $f4, $f4 /* 17B030 8024C750 44830000 */ mtc1 $v1, $f0 /* 17B034 8024C754 00000000 */ nop /* 17B038 8024C758 46800020 */ cvt.s.w $f0, $f0 /* 17B03C 8024C75C 46002103 */ div.s $f4, $f4, $f0 .L8024C760: /* 17B040 8024C760 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17B044 8024C764 C434F2A8 */ lwc1 $f20, %lo(BattleCam_InitialPosX)($at) /* 17B048 8024C768 4604A502 */ mul.s $f20, $f20, $f4 /* 17B04C 8024C76C 00000000 */ nop /* 17B050 8024C770 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) .L8024C774: /* 17B054 8024C774 C432F2AC */ lwc1 $f18, %lo(BattleCam_InitialPosY)($at) D_8024C778: /* 17B058 8024C778 46049482 */ mul.s $f18, $f18, $f4 /* 17B05C 8024C77C 00000000 */ nop /* 17B060 8024C780 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) D_8024C784: /* 17B064 8024C784 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at) .L8024C788: /* 17B068 8024C788 46048402 */ mul.s $f16, $f16, $f4 /* 17B06C 8024C78C 00000000 */ nop .L8024C790: /* 17B070 8024C790 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 17B074 8024C794 C426F298 */ lwc1 $f6, %lo(BattleCam_InitialBoomZOffset)($at) /* 17B078 8024C798 46043182 */ mul.s $f6, $f6, $f4 /* 17B07C 8024C79C 00000000 */ nop /* 17B080 8024C7A0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) glabel func_8024C7A4 /* 17B084 8024C7A4 C42CF28C */ lwc1 $f12, %lo(BattleCam_InitialBoomLength)($at) /* 17B088 8024C7A8 46046302 */ mul.s $f12, $f12, $f4 /* 17B08C 8024C7AC 00000000 */ nop /* 17B090 8024C7B0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17B094 8024C7B4 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at) /* 17B098 8024C7B8 46044202 */ mul.s $f8, $f8, $f4 /* 17B09C 8024C7BC 00000000 */ nop /* 17B0A0 8024C7C0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17B0A4 8024C7C4 44811000 */ mtc1 $at, $f2 /* 17B0A8 8024C7C8 00000000 */ nop /* 17B0AC 8024C7CC 46041081 */ sub.s $f2, $f2, $f4 D_8024C7D0_C0A050: /* 17B0B0 8024C7D0 4602D682 */ mul.s $f26, $f26, $f2 .L8024C7D4: /* 17B0B4 8024C7D4 00000000 */ nop /* 17B0B8 8024C7D8 C7BC0010 */ lwc1 $f28, 0x10($sp) /* 17B0BC 8024C7DC 4602E602 */ mul.s $f24, $f28, $f2 /* 17B0C0 8024C7E0 00000000 */ nop /* 17B0C4 8024C7E4 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset) /* 17B0C8 8024C7E8 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0) .L8024C7EC: /* 17B0CC 8024C7EC 44820000 */ mtc1 $v0, $f0 /* 17B0D0 8024C7F0 00000000 */ nop /* 17B0D4 8024C7F4 46800020 */ cvt.s.w $f0, $f0 /* 17B0D8 8024C7F8 46020002 */ mul.s $f0, $f0, $f2 /* 17B0DC 8024C7FC 00000000 */ nop /* 17B0E0 8024C800 4602F582 */ mul.s $f22, $f30, $f2 /* 17B0E4 8024C804 00000000 */ nop D_8024C808_C0A088: /* 17B0E8 8024C808 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) /* 17B0EC 8024C80C 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0) /* 17B0F0 8024C810 44827000 */ mtc1 $v0, $f14 /* 17B0F4 8024C814 00000000 */ nop /* 17B0F8 8024C818 468073A0 */ cvt.s.w $f14, $f14 /* 17B0FC 8024C81C 46027382 */ mul.s $f14, $f14, $f2 /* 17B100 8024C820 00000000 */ nop /* 17B104 8024C824 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw) /* 17B108 8024C828 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0) /* 17B10C 8024C82C 44825000 */ mtc1 $v0, $f10 /* 17B110 8024C830 00000000 */ nop /* 17B114 8024C834 468052A0 */ cvt.s.w $f10, $f10 /* 17B118 8024C838 46025282 */ mul.s $f10, $f10, $f2 /* 17B11C 8024C83C 00000000 */ nop .L8024C840: /* 17B120 8024C840 46003180 */ add.s $f6, $f6, $f0 /* 17B124 8024C844 3C014380 */ lui $at, (0x43800000 >> 16) /* 17B128 8024C848 44810000 */ mtc1 $at, $f0 /* 17B12C 8024C84C 00000000 */ nop /* 17B130 8024C850 46003182 */ mul.s $f6, $f6, $f0 /* 17B134 8024C854 00000000 */ nop /* 17B138 8024C858 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17B13C 8024C85C C420F294 */ lwc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 17B140 8024C860 46040002 */ mul.s $f0, $f0, $f4 /* 17B144 8024C864 00000000 */ nop /* 17B148 8024C868 461AA500 */ add.s $f20, $f20, $f26 /* 17B14C 8024C86C 46189480 */ add.s $f18, $f18, $f24 /* 17B150 8024C870 46168400 */ add.s $f16, $f16, $f22 .L8024C874: /* 17B154 8024C874 460E6300 */ add.s $f12, $f12, $f14 /* 17B158 8024C878 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft) /* 17B15C 8024C87C 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft) /* 17B160 8024C880 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch) /* 17B164 8024C884 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0) /* 17B168 8024C888 460A4200 */ add.s $f8, $f8, $f10 /* 17B16C 8024C88C E6140054 */ swc1 $f20, 0x54($s0) /* 17B170 8024C890 44822000 */ mtc1 $v0, $f4 /* 17B174 8024C894 00000000 */ nop /* 17B178 8024C898 46802120 */ cvt.s.w $f4, $f4 /* 17B17C 8024C89C 46022102 */ mul.s $f4, $f4, $f2 /* 17B180 8024C8A0 00000000 */ nop /* 17B184 8024C8A4 E6120058 */ swc1 $f18, 0x58($s0) /* 17B188 8024C8A8 E610005C */ swc1 $f16, 0x5C($s0) /* 17B18C 8024C8AC 4600670D */ trunc.w.s $f28, $f12 /* 17B190 8024C8B0 4402E000 */ mfc1 $v0, $f28 .L8024C8B4: /* 17B194 8024C8B4 00000000 */ nop /* 17B198 8024C8B8 A602001E */ sh $v0, 0x1E($s0) /* 17B19C 8024C8BC 46040000 */ add.s $f0, $f0, $f4 /* 17B1A0 8024C8C0 4600470D */ trunc.w.s $f28, $f8 /* 17B1A4 8024C8C4 4402E000 */ mfc1 $v0, $f28 /* 17B1A8 8024C8C8 00000000 */ nop /* 17B1AC 8024C8CC A6020024 */ sh $v0, 0x24($s0) /* 17B1B0 8024C8D0 4600070D */ trunc.w.s $f28, $f0 D_8024C8D4: /* 17B1B4 8024C8D4 4402E000 */ mfc1 $v0, $f28 /* 17B1B8 8024C8D8 00000000 */ nop /* 17B1BC 8024C8DC A6020022 */ sh $v0, 0x22($s0) D_8024C8E0_C0A160: /* 17B1C0 8024C8E0 4600370D */ trunc.w.s $f28, $f6 /* 17B1C4 8024C8E4 4402E000 */ mfc1 $v0, $f28 /* 17B1C8 8024C8E8 00000000 */ nop /* 17B1CC 8024C8EC A6020026 */ sh $v0, 0x26($s0) .L8024C8F0: /* 17B1D0 8024C8F0 84820000 */ lh $v0, 0x0($a0) /* 17B1D4 8024C8F4 94830000 */ lhu $v1, 0x0($a0) /* 17B1D8 8024C8F8 14400006 */ bnez $v0, .L8024C914 /* 17B1DC 8024C8FC 2462FFFF */ addiu $v0, $v1, -0x1 /* 17B1E0 8024C900 24020001 */ addiu $v0, $zero, 0x1 /* 17B1E4 8024C904 3C01802A */ lui $at, %hi(BattleCam_DoneMoving) /* 17B1E8 8024C908 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at) /* 17B1EC 8024C90C 08093246 */ j D_8024C918_C0A198 /* 17B1F0 8024C910 00000000 */ nop .L8024C914: /* 17B1F4 8024C914 A4820000 */ sh $v0, 0x0($a0) D_8024C918_C0A198: /* 17B1F8 8024C918 8FBF001C */ lw $ra, 0x1C($sp) /* 17B1FC 8024C91C 8FB00018 */ lw $s0, 0x18($sp) /* 17B200 8024C920 D7BE0048 */ ldc1 $f30, 0x48($sp) .L8024C924: /* 17B204 8024C924 D7BC0040 */ ldc1 $f28, 0x40($sp) /* 17B208 8024C928 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 17B20C 8024C92C D7B80030 */ ldc1 $f24, 0x30($sp) /* 17B210 8024C930 D7B60028 */ ldc1 $f22, 0x28($sp) /* 17B214 8024C934 D7B40020 */ ldc1 $f20, 0x20($sp) /* 17B218 8024C938 0000102D */ daddu $v0, $zero, $zero /* 17B21C 8024C93C 03E00008 */ jr $ra /* 17B220 8024C940 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[CAM_BATTLE]; f32 alpha; f32 x, y, z; if (isInitialCall) { if (BattleCam_SetImmediately) { BattleCam_PosX = camera->lookAt_obj_target.x; BattleCam_PosY = camera->lookAt_obj_target.y; BattleCam_PosZ = camera->lookAt_obj_target.z; } 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(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2); } else { alpha = BattleCam_MoveTimeLeft; alpha /= BattleCam_MoveTimeTotal; } camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha); camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha); camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha); camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f; 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 basic_ai_wander /* 24AB8 800496B8 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 24ABC 800496BC AFB3004C */ sw $s3, 0x4C($sp) /* 24AC0 800496C0 0080982D */ daddu $s3, $a0, $zero /* 24AC4 800496C4 AFB40050 */ sw $s4, 0x50($sp) /* 24AC8 800496C8 00A0A02D */ daddu $s4, $a1, $zero /* 24ACC 800496CC AFBF0058 */ sw $ra, 0x58($sp) /* 24AD0 800496D0 AFB50054 */ sw $s5, 0x54($sp) /* 24AD4 800496D4 AFB20048 */ sw $s2, 0x48($sp) /* 24AD8 800496D8 AFB10044 */ sw $s1, 0x44($sp) /* 24ADC 800496DC AFB00040 */ sw $s0, 0x40($sp) /* 24AE0 800496E0 8E710148 */ lw $s1, 0x148($s3) /* 24AE4 800496E4 00C0902D */ daddu $s2, $a2, $zero /* 24AE8 800496E8 86240008 */ lh $a0, 0x8($s1) /* 24AEC 800496EC 0C00EABB */ jal get_npc_unsafe /* 24AF0 800496F0 0000A82D */ daddu $s5, $zero, $zero /* 24AF4 800496F4 8E830014 */ lw $v1, 0x14($s4) /* 24AF8 800496F8 0460005D */ bltz $v1, .L80049870 /* 24AFC 800496FC 0040802D */ daddu $s0, $v0, $zero /* 24B00 80049700 8E620074 */ lw $v0, 0x74($s3) /* 24B04 80049704 1C400059 */ bgtz $v0, .L8004986C /* 24B08 80049708 2442FFFF */ addiu $v0, $v0, -0x1 /* 24B0C 8004970C 0240202D */ daddu $a0, $s2, $zero /* 24B10 80049710 AE630074 */ sw $v1, 0x74($s3) /* 24B14 80049714 AFA00010 */ sw $zero, 0x10($sp) /* 24B18 80049718 8E86000C */ lw $a2, 0xC($s4) /* 24B1C 8004971C 8E870010 */ lw $a3, 0x10($s4) /* 24B20 80049720 0C01242D */ jal basic_ai_check_player_dist /* 24B24 80049724 0220282D */ daddu $a1, $s1, $zero /* 24B28 80049728 1040004E */ beqz $v0, .L80049864 /* 24B2C 8004972C 00000000 */ nop /* 24B30 80049730 C60C0038 */ lwc1 $f12, 0x38($s0) /* 24B34 80049734 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) /* 24B38 80049738 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) /* 24B3C 8004973C C60E0040 */ lwc1 $f14, 0x40($s0) /* 24B40 80049740 C602003C */ lwc1 $f2, 0x3C($s0) /* 24B44 80049744 46006006 */ mov.s $f0, $f12 /* 24B48 80049748 8C460028 */ lw $a2, 0x28($v0) /* 24B4C 8004974C 8C470030 */ lw $a3, 0x30($v0) /* 24B50 80049750 46007106 */ mov.s $f4, $f14 /* 24B54 80049754 E7A00028 */ swc1 $f0, 0x28($sp) /* 24B58 80049758 E7A2002C */ swc1 $f2, 0x2C($sp) /* 24B5C 8004975C 0C00A720 */ jal atan2 /* 24B60 80049760 E7A40030 */ swc1 $f4, 0x30($sp) /* 24B64 80049764 C6820018 */ lwc1 $f2, 0x18($s4) /* 24B68 80049768 E7A00038 */ swc1 $f0, 0x38($sp) /* 24B6C 8004976C E7A00014 */ swc1 $f0, 0x14($sp) /* 24B70 80049770 E7A20010 */ swc1 $f2, 0x10($sp) /* 24B74 80049774 860200A8 */ lh $v0, 0xA8($s0) /* 24B78 80049778 27A50028 */ addiu $a1, $sp, 0x28 /* 24B7C 8004977C 44820000 */ mtc1 $v0, $f0 /* 24B80 80049780 00000000 */ nop /* 24B84 80049784 46800020 */ cvt.s.w $f0, $f0 /* 24B88 80049788 E7A00018 */ swc1 $f0, 0x18($sp) /* 24B8C 8004978C 860200A6 */ lh $v0, 0xA6($s0) /* 24B90 80049790 27A6002C */ addiu $a2, $sp, 0x2C /* 24B94 80049794 44820000 */ mtc1 $v0, $f0 /* 24B98 80049798 00000000 */ nop /* 24B9C 8004979C 46800020 */ cvt.s.w $f0, $f0 /* 24BA0 800497A0 E7A0001C */ swc1 $f0, 0x1C($sp) /* 24BA4 800497A4 8E040080 */ lw $a0, 0x80($s0) /* 24BA8 800497A8 0C037711 */ jal npc_test_move_simple_with_slipping /* 24BAC 800497AC 27A70030 */ addiu $a3, $sp, 0x30 /* 24BB0 800497B0 1440002C */ bnez $v0, .L80049864 /* 24BB4 800497B4 0200202D */ daddu $a0, $s0, $zero /* 24BB8 800497B8 240502F4 */ addiu $a1, $zero, 0x2F4 /* 24BBC 800497BC C7A00038 */ lwc1 $f0, 0x38($sp) /* 24BC0 800497C0 3C060020 */ lui $a2, (0x200000 >> 16) /* 24BC4 800497C4 0C012530 */ jal ai_enemy_play_sound /* 24BC8 800497C8 E600000C */ swc1 $f0, 0xC($s0) /* 24BCC 800497CC 02A0202D */ daddu $a0, $s5, $zero /* 24BD0 800497D0 0200282D */ daddu $a1, $s0, $zero /* 24BD4 800497D4 0000302D */ daddu $a2, $zero, $zero /* 24BD8 800497D8 84A300A8 */ lh $v1, 0xA8($a1) /* 24BDC 800497DC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 24BE0 800497E0 44810000 */ mtc1 $at, $f0 /* 24BE4 800497E4 3C014000 */ lui $at, (0x40000000 >> 16) /* 24BE8 800497E8 44811000 */ mtc1 $at, $f2 /* 24BEC 800497EC 3C01C1A0 */ lui $at, (0xC1A00000 >> 16) /* 24BF0 800497F0 44812000 */ mtc1 $at, $f4 /* 24BF4 800497F4 2402000F */ addiu $v0, $zero, 0xF /* 24BF8 800497F8 AFA2001C */ sw $v0, 0x1C($sp) /* 24BFC 800497FC 44833000 */ mtc1 $v1, $f6 /* 24C00 80049800 00000000 */ nop /* 24C04 80049804 468031A0 */ cvt.s.w $f6, $f6 /* 24C08 80049808 44073000 */ mfc1 $a3, $f6 /* 24C0C 8004980C 27A20034 */ addiu $v0, $sp, 0x34 /* 24C10 80049810 AFA20020 */ sw $v0, 0x20($sp) /* 24C14 80049814 E7A00010 */ swc1 $f0, 0x10($sp) /* 24C18 80049818 E7A20014 */ swc1 $f2, 0x14($sp) /* 24C1C 8004981C 0C01BFA4 */ jal fx_emote /* 24C20 80049820 E7A40018 */ swc1 $f4, 0x18($sp) /* 24C24 80049824 2403FFBF */ addiu $v1, $zero, -0x41 /* 24C28 80049828 8E2200B0 */ lw $v0, 0xB0($s1) /* 24C2C 8004982C 8E240018 */ lw $a0, 0x18($s1) /* 24C30 80049830 00431024 */ and $v0, $v0, $v1 /* 24C34 80049834 2403FFDF */ addiu $v1, $zero, -0x21 /* 24C38 80049838 00431024 */ and $v0, $v0, $v1 /* 24C3C 8004983C AE2200B0 */ sw $v0, 0xB0($s1) /* 24C40 80049840 9482002A */ lhu $v0, 0x2A($a0) /* 24C44 80049844 30420001 */ andi $v0, $v0, 0x1 /* 24C48 80049848 10400003 */ beqz $v0, .L80049858 /* 24C4C 8004984C 2402000A */ addiu $v0, $zero, 0xA /* 24C50 80049850 080126C8 */ j .L80049B20 /* 24C54 80049854 AE620070 */ sw $v0, 0x70($s3) .L80049858: /* 24C58 80049858 2402000C */ addiu $v0, $zero, 0xC /* 24C5C 8004985C 080126C8 */ j .L80049B20 /* 24C60 80049860 AE620070 */ sw $v0, 0x70($s3) .L80049864: /* 24C64 80049864 8E620074 */ lw $v0, 0x74($s3) /* 24C68 80049868 2442FFFF */ addiu $v0, $v0, -0x1 .L8004986C: /* 24C6C 8004986C AE620074 */ sw $v0, 0x74($s3) .L80049870: /* 24C70 80049870 8E2300D0 */ lw $v1, 0xD0($s1) /* 24C74 80049874 C6000040 */ lwc1 $f0, 0x40($s0) /* 24C78 80049878 C4620000 */ lwc1 $f2, 0x0($v1) /* 24C7C 8004987C 468010A0 */ cvt.s.w $f2, $f2 /* 24C80 80049880 C4640008 */ lwc1 $f4, 0x8($v1) /* 24C84 80049884 46802120 */ cvt.s.w $f4, $f4 /* 24C88 80049888 E7A00010 */ swc1 $f0, 0x10($sp) /* 24C8C 8004988C 8E2200D0 */ lw $v0, 0xD0($s1) /* 24C90 80049890 44051000 */ mfc1 $a1, $f2 /* 24C94 80049894 C440000C */ lwc1 $f0, 0xC($v0) /* 24C98 80049898 46800020 */ cvt.s.w $f0, $f0 /* 24C9C 8004989C E7A00014 */ swc1 $f0, 0x14($sp) /* 24CA0 800498A0 8E2200D0 */ lw $v0, 0xD0($s1) /* 24CA4 800498A4 44062000 */ mfc1 $a2, $f4 /* 24CA8 800498A8 C4400010 */ lwc1 $f0, 0x10($v0) /* 24CAC 800498AC 46800020 */ cvt.s.w $f0, $f0 /* 24CB0 800498B0 E7A00018 */ swc1 $f0, 0x18($sp) /* 24CB4 800498B4 8C640018 */ lw $a0, 0x18($v1) /* 24CB8 800498B8 0C0123F5 */ jal is_point_within_region /* 24CBC 800498BC 8E070038 */ lw $a3, 0x38($s0) /* 24CC0 800498C0 10400064 */ beqz $v0, .L80049A54 /* 24CC4 800498C4 00000000 */ nop /* 24CC8 800498C8 8E060038 */ lw $a2, 0x38($s0) /* 24CCC 800498CC 8E2200D0 */ lw $v0, 0xD0($s1) /* 24CD0 800498D0 8E070040 */ lw $a3, 0x40($s0) /* 24CD4 800498D4 C44C0000 */ lwc1 $f12, 0x0($v0) /* 24CD8 800498D8 46806320 */ cvt.s.w $f12, $f12 /* 24CDC 800498DC C44E0008 */ lwc1 $f14, 0x8($v0) /* 24CE0 800498E0 0C00A7B5 */ jal dist2D /* 24CE4 800498E4 468073A0 */ cvt.s.w $f14, $f14 /* 24CE8 800498E8 C6020018 */ lwc1 $f2, 0x18($s0) /* 24CEC 800498EC 4600103C */ c.lt.s $f2, $f0 /* 24CF0 800498F0 00000000 */ nop /* 24CF4 800498F4 45000057 */ bc1f .L80049A54 /* 24CF8 800498F8 00000000 */ nop /* 24CFC 800498FC 8E2300B0 */ lw $v1, 0xB0($s1) /* 24D00 80049900 30620020 */ andi $v0, $v1, 0x20 /* 24D04 80049904 14400002 */ bnez $v0, .L80049910 /* 24D08 80049908 34620060 */ ori $v0, $v1, 0x60 /* 24D0C 8004990C AE2200B0 */ sw $v0, 0xB0($s1) .L80049910: /* 24D10 80049910 8E2200B0 */ lw $v0, 0xB0($s1) /* 24D14 80049914 30420040 */ andi $v0, $v0, 0x40 /* 24D18 80049918 10400013 */ beqz $v0, .L80049968 /* 24D1C 8004991C 00000000 */ nop /* 24D20 80049920 C60C0038 */ lwc1 $f12, 0x38($s0) /* 24D24 80049924 8E2200D0 */ lw $v0, 0xD0($s1) /* 24D28 80049928 C60E0040 */ lwc1 $f14, 0x40($s0) /* 24D2C 8004992C C4460000 */ lwc1 $f6, 0x0($v0) /* 24D30 80049930 468031A0 */ cvt.s.w $f6, $f6 /* 24D34 80049934 44063000 */ mfc1 $a2, $f6 /* 24D38 80049938 C4460008 */ lwc1 $f6, 0x8($v0) /* 24D3C 8004993C 468031A0 */ cvt.s.w $f6, $f6 /* 24D40 80049940 44073000 */ mfc1 $a3, $f6 /* 24D44 80049944 0C00A720 */ jal atan2 /* 24D48 80049948 00000000 */ nop /* 24D4C 8004994C 0C00A6C9 */ jal clamp_angle /* 24D50 80049950 46000306 */ mov.s $f12, $f0 /* 24D54 80049954 E600000C */ swc1 $f0, 0xC($s0) /* 24D58 80049958 8E2200B0 */ lw $v0, 0xB0($s1) /* 24D5C 8004995C 2403FFBF */ addiu $v1, $zero, -0x41 /* 24D60 80049960 00431024 */ and $v0, $v0, $v1 /* 24D64 80049964 AE2200B0 */ sw $v0, 0xB0($s1) .L80049968: /* 24D68 80049968 C6000018 */ lwc1 $f0, 0x18($s0) /* 24D6C 8004996C C6020038 */ lwc1 $f2, 0x38($s0) /* 24D70 80049970 46000021 */ cvt.d.s $f0, $f0 /* 24D74 80049974 E7A20028 */ swc1 $f2, 0x28($sp) /* 24D78 80049978 C602003C */ lwc1 $f2, 0x3C($s0) /* 24D7C 8004997C C6040040 */ lwc1 $f4, 0x40($s0) /* 24D80 80049980 46200000 */ add.d $f0, $f0, $f0 /* 24D84 80049984 E7A2002C */ swc1 $f2, 0x2C($sp) /* 24D88 80049988 E7A40030 */ swc1 $f4, 0x30($sp) /* 24D8C 8004998C 46200020 */ cvt.s.d $f0, $f0 /* 24D90 80049990 E7A00010 */ swc1 $f0, 0x10($sp) /* 24D94 80049994 C600000C */ lwc1 $f0, 0xC($s0) /* 24D98 80049998 E7A00014 */ swc1 $f0, 0x14($sp) /* 24D9C 8004999C 860200A8 */ lh $v0, 0xA8($s0) /* 24DA0 800499A0 27A50028 */ addiu $a1, $sp, 0x28 /* 24DA4 800499A4 44820000 */ mtc1 $v0, $f0 /* 24DA8 800499A8 00000000 */ nop /* 24DAC 800499AC 46800020 */ cvt.s.w $f0, $f0 /* 24DB0 800499B0 E7A00018 */ swc1 $f0, 0x18($sp) /* 24DB4 800499B4 860200A6 */ lh $v0, 0xA6($s0) /* 24DB8 800499B8 27A6002C */ addiu $a2, $sp, 0x2C /* 24DBC 800499BC 44820000 */ mtc1 $v0, $f0 /* 24DC0 800499C0 00000000 */ nop /* 24DC4 800499C4 46800020 */ cvt.s.w $f0, $f0 /* 24DC8 800499C8 E7A0001C */ swc1 $f0, 0x1C($sp) /* 24DCC 800499CC 8E040080 */ lw $a0, 0x80($s0) /* 24DD0 800499D0 0C037711 */ jal npc_test_move_simple_with_slipping /* 24DD4 800499D4 27A70030 */ addiu $a3, $sp, 0x30 /* 24DD8 800499D8 10400026 */ beqz $v0, .L80049A74 /* 24DDC 800499DC 24150001 */ addiu $s5, $zero, 0x1 /* 24DE0 800499E0 C60C0038 */ lwc1 $f12, 0x38($s0) /* 24DE4 800499E4 8E2200D0 */ lw $v0, 0xD0($s1) /* 24DE8 800499E8 C60E0040 */ lwc1 $f14, 0x40($s0) /* 24DEC 800499EC C4460000 */ lwc1 $f6, 0x0($v0) /* 24DF0 800499F0 468031A0 */ cvt.s.w $f6, $f6 /* 24DF4 800499F4 44063000 */ mfc1 $a2, $f6 /* 24DF8 800499F8 C4460008 */ lwc1 $f6, 0x8($v0) /* 24DFC 800499FC 468031A0 */ cvt.s.w $f6, $f6 /* 24E00 80049A00 44073000 */ mfc1 $a3, $f6 /* 24E04 80049A04 0C00A720 */ jal atan2 /* 24E08 80049A08 00000000 */ nop /* 24E0C 80049A0C 0C00A6C9 */ jal clamp_angle /* 24E10 80049A10 46000306 */ mov.s $f12, $f0 /* 24E14 80049A14 0200202D */ daddu $a0, $s0, $zero /* 24E18 80049A18 27A60038 */ addiu $a2, $sp, 0x38 /* 24E1C 80049A1C 0000382D */ daddu $a3, $zero, $zero /* 24E20 80049A20 2403FFBF */ addiu $v1, $zero, -0x41 /* 24E24 80049A24 E7A00038 */ swc1 $f0, 0x38($sp) /* 24E28 80049A28 8E2200B0 */ lw $v0, 0xB0($s1) /* 24E2C 80049A2C 3C0540A0 */ lui $a1, (0x40A00000 >> 16) /* 24E30 80049A30 00431024 */ and $v0, $v0, $v1 /* 24E34 80049A34 AE2200B0 */ sw $v0, 0xB0($s1) /* 24E38 80049A38 AFA00010 */ sw $zero, 0x10($sp) /* 24E3C 80049A3C 0C0129E1 */ jal ai_check_fwd_collisions /* 24E40 80049A40 AFA00014 */ sw $zero, 0x14($sp) /* 24E44 80049A44 C7A00038 */ lwc1 $f0, 0x38($sp) /* 24E48 80049A48 E600000C */ swc1 $f0, 0xC($s0) /* 24E4C 80049A4C 0801269D */ j .L80049A74 /* 24E50 80049A50 24150001 */ addiu $s5, $zero, 0x1 .L80049A54: /* 24E54 80049A54 8E2300B0 */ lw $v1, 0xB0($s1) /* 24E58 80049A58 30620020 */ andi $v0, $v1, 0x20 /* 24E5C 80049A5C 10400005 */ beqz $v0, .L80049A74 /* 24E60 80049A60 2402FFDF */ addiu $v0, $zero, -0x21 /* 24E64 80049A64 00621024 */ and $v0, $v1, $v0 /* 24E68 80049A68 2403FFBF */ addiu $v1, $zero, -0x41 /* 24E6C 80049A6C 00431024 */ and $v0, $v0, $v1 /* 24E70 80049A70 AE2200B0 */ sw $v0, 0xB0($s1) .L80049A74: /* 24E74 80049A74 8E2200D0 */ lw $v0, 0xD0($s1) /* 24E78 80049A78 8C43000C */ lw $v1, 0xC($v0) /* 24E7C 80049A7C 8C420010 */ lw $v0, 0x10($v0) /* 24E80 80049A80 00621825 */ or $v1, $v1, $v0 /* 24E84 80049A84 00751825 */ or $v1, $v1, $s5 /* 24E88 80049A88 10600008 */ beqz $v1, .L80049AAC /* 24E8C 80049A8C 00000000 */ nop /* 24E90 80049A90 8602008C */ lh $v0, 0x8C($s0) /* 24E94 80049A94 14400022 */ bnez $v0, .L80049B20 /* 24E98 80049A98 00000000 */ nop /* 24E9C 80049A9C 8E050018 */ lw $a1, 0x18($s0) /* 24EA0 80049AA0 8E06000C */ lw $a2, 0xC($s0) /* 24EA4 80049AA4 0C00EA95 */ jal npc_move_heading /* 24EA8 80049AA8 0200202D */ daddu $a0, $s0, $zero .L80049AAC: /* 24EAC 80049AAC 8E820004 */ lw $v0, 0x4($s4) /* 24EB0 80049AB0 1840001B */ blez $v0, .L80049B20 /* 24EB4 80049AB4 00000000 */ nop /* 24EB8 80049AB8 9602008E */ lhu $v0, 0x8E($s0) /* 24EBC 80049ABC 2442FFFF */ addiu $v0, $v0, -0x1 /* 24EC0 80049AC0 A602008E */ sh $v0, 0x8E($s0) /* 24EC4 80049AC4 00021400 */ sll $v0, $v0, 16 /* 24EC8 80049AC8 1C400015 */ bgtz $v0, .L80049B20 /* 24ECC 80049ACC 240403E8 */ addiu $a0, $zero, 0x3E8 /* 24ED0 80049AD0 24020002 */ addiu $v0, $zero, 0x2 /* 24ED4 80049AD4 0C00A67F */ jal rand_int /* 24ED8 80049AD8 AE620070 */ sw $v0, 0x70($s3) /* 24EDC 80049ADC 3C035555 */ lui $v1, (0x55555556 >> 16) /* 24EE0 80049AE0 34635556 */ ori $v1, $v1, (0x55555556 & 0xFFFF) /* 24EE4 80049AE4 00430018 */ mult $v0, $v1 /* 24EE8 80049AE8 000227C3 */ sra $a0, $v0, 31 /* 24EEC 80049AEC 00004010 */ mfhi $t0 /* 24EF0 80049AF0 01042023 */ subu $a0, $t0, $a0 /* 24EF4 80049AF4 00041840 */ sll $v1, $a0, 1 /* 24EF8 80049AF8 00641821 */ addu $v1, $v1, $a0 /* 24EFC 80049AFC 00431023 */ subu $v0, $v0, $v1 /* 24F00 80049B00 24420002 */ addiu $v0, $v0, 0x2 /* 24F04 80049B04 AE620074 */ sw $v0, 0x74($s3) /* 24F08 80049B08 8E82002C */ lw $v0, 0x2C($s4) /* 24F0C 80049B0C 58400004 */ blezl $v0, .L80049B20 /* 24F10 80049B10 AE600070 */ sw $zero, 0x70($s3) /* 24F14 80049B14 8E820008 */ lw $v0, 0x8($s4) /* 24F18 80049B18 58400001 */ blezl $v0, .L80049B20 /* 24F1C 80049B1C AE600070 */ sw $zero, 0x70($s3) .L80049B20: /* 24F20 80049B20 8FBF0058 */ lw $ra, 0x58($sp) /* 24F24 80049B24 8FB50054 */ lw $s5, 0x54($sp) /* 24F28 80049B28 8FB40050 */ lw $s4, 0x50($sp) /* 24F2C 80049B2C 8FB3004C */ lw $s3, 0x4C($sp) /* 24F30 80049B30 8FB20048 */ lw $s2, 0x48($sp) /* 24F34 80049B34 8FB10044 */ lw $s1, 0x44($sp) /* 24F38 80049B38 8FB00040 */ lw $s0, 0x40($sp) /* 24F3C 80049B3C 03E00008 */ jr $ra /* 24F40 80049B40 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void basic_ai_wander_init(Evt* script, MobileAISettings* npcAISettings, EnemyDetectVolume* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); // chose a random direction and move time npc->duration = (npcAISettings->moveTime / 2) + rand_int((npcAISettings->moveTime / 2) + 1); npc->yaw = clamp_angle(npc->yaw + rand_int(60) - 30.0f); npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_WALK]; script->functionTemp[1] = 0; if (enemy->territory->wander.moveSpeedOverride < 0) { npc->moveSpeed = npcAISettings->moveSpeed; } else { npc->moveSpeed = enemy->territory->wander.moveSpeedOverride / 32767.0; } enemy->aiFlags &= ~ENEMY_AI_FLAG_40; enemy->aiFlags &= ~ENEMY_AI_FLAG_20; script->AI_TEMP_STATE = AI_STATE_WANDER; }
### RAW ASSEMBLY INSTRUCTIONS: glabel JumpWithBounce /* 1A8008 80279728 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 1A800C 8027972C AFB20020 */ sw $s2, 0x20($sp) /* 1A8010 80279730 0080902D */ daddu $s2, $a0, $zero /* 1A8014 80279734 AFBF0024 */ sw $ra, 0x24($sp) /* 1A8018 80279738 AFB1001C */ sw $s1, 0x1C($sp) /* 1A801C 8027973C AFB00018 */ sw $s0, 0x18($sp) /* 1A8020 80279740 F7BE0050 */ sdc1 $f30, 0x50($sp) /* 1A8024 80279744 F7BC0048 */ sdc1 $f28, 0x48($sp) /* 1A8028 80279748 F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1A802C 8027974C F7B80038 */ sdc1 $f24, 0x38($sp) /* 1A8030 80279750 F7B60030 */ sdc1 $f22, 0x30($sp) /* 1A8034 80279754 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1A8038 80279758 8E51000C */ lw $s1, 0xC($s2) /* 1A803C 8027975C 54A00001 */ bnel $a1, $zero, .L80279764 /* 1A8040 80279760 AE400070 */ sw $zero, 0x70($s2) .L80279764: /* 1A8044 80279764 8E420070 */ lw $v0, 0x70($s2) /* 1A8048 80279768 14400079 */ bnez $v0, .L80279950 /* 1A804C 8027976C 24040002 */ addiu $a0, $zero, 0x2 /* 1A8050 80279770 8E250000 */ lw $a1, 0x0($s1) /* 1A8054 80279774 26310004 */ addiu $s1, $s1, 0x4 /* 1A8058 80279778 0C0B1EAF */ jal evt_get_variable /* 1A805C 8027977C 0240202D */ daddu $a0, $s2, $zero /* 1A8060 80279780 0040202D */ daddu $a0, $v0, $zero /* 1A8064 80279784 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A8068 80279788 14820002 */ bne $a0, $v0, .L80279794 /* 1A806C 8027978C 00000000 */ nop /* 1A8070 80279790 8E440148 */ lw $a0, 0x148($s2) .L80279794: /* 1A8074 80279794 0C09A75B */ jal get_actor /* 1A8078 80279798 00000000 */ nop /* 1A807C 8027979C 0040802D */ daddu $s0, $v0, $zero /* 1A8080 802797A0 AE500074 */ sw $s0, 0x74($s2) /* 1A8084 802797A4 8E250000 */ lw $a1, 0x0($s1) /* 1A8088 802797A8 26310004 */ addiu $s1, $s1, 0x4 /* 1A808C 802797AC 0C0B1EAF */ jal evt_get_variable /* 1A8090 802797B0 0240202D */ daddu $a0, $s2, $zero /* 1A8094 802797B4 A6020070 */ sh $v0, 0x70($s0) /* 1A8098 802797B8 8E250000 */ lw $a1, 0x0($s1) /* 1A809C 802797BC 0C0B210B */ jal evt_get_float_variable /* 1A80A0 802797C0 0240202D */ daddu $a0, $s2, $zero /* 1A80A4 802797C4 C6020148 */ lwc1 $f2, 0x148($s0) /* 1A80A8 802797C8 C61A0018 */ lwc1 $f26, 0x18($s0) /* 1A80AC 802797CC C61C0020 */ lwc1 $f28, 0x20($s0) /* 1A80B0 802797D0 C614014C */ lwc1 $f20, 0x14C($s0) /* 1A80B4 802797D4 C618001C */ lwc1 $f24, 0x1C($s0) /* 1A80B8 802797D8 2611000C */ addiu $s1, $s0, 0xC /* 1A80BC 802797DC E600005C */ swc1 $f0, 0x5C($s0) /* 1A80C0 802797E0 E6020010 */ swc1 $f2, 0x10($s0) /* 1A80C4 802797E4 46001786 */ mov.s $f30, $f2 /* 1A80C8 802797E8 4406D000 */ mfc1 $a2, $f26 /* 1A80CC 802797EC 4407E000 */ mfc1 $a3, $f28 /* 1A80D0 802797F0 C6020144 */ lwc1 $f2, 0x144($s0) /* 1A80D4 802797F4 4600A386 */ mov.s $f14, $f20 /* 1A80D8 802797F8 E6140014 */ swc1 $f20, 0x14($s0) /* 1A80DC 802797FC E602000C */ swc1 $f2, 0xC($s0) /* 1A80E0 80279800 46001586 */ mov.s $f22, $f2 /* 1A80E4 80279804 0C00A720 */ jal atan2 /* 1A80E8 80279808 4600B306 */ mov.s $f12, $f22 /* 1A80EC 8027980C 4600B306 */ mov.s $f12, $f22 /* 1A80F0 80279810 4600A386 */ mov.s $f14, $f20 /* 1A80F4 80279814 4406D000 */ mfc1 $a2, $f26 /* 1A80F8 80279818 4407E000 */ mfc1 $a3, $f28 /* 1A80FC 8027981C 461EC781 */ sub.s $f30, $f24, $f30 /* 1A8100 80279820 0C00A7B5 */ jal dist2D /* 1A8104 80279824 E6000054 */ swc1 $f0, 0x54($s0) /* 1A8108 80279828 86020070 */ lh $v0, 0x70($s0) /* 1A810C 8027982C 46000106 */ mov.s $f4, $f0 /* 1A8110 80279830 14400012 */ bnez $v0, .L8027987C /* 1A8114 80279834 E6040058 */ swc1 $f4, 0x58($s0) /* 1A8118 80279838 C600004C */ lwc1 $f0, 0x4C($s0) /* 1A811C 8027983C C602004C */ lwc1 $f2, 0x4C($s0) /* 1A8120 80279840 46002003 */ div.s $f0, $f4, $f0 /* 1A8124 80279844 4600028D */ trunc.w.s $f10, $f0 /* 1A8128 80279848 44035000 */ mfc1 $v1, $f10 /* 1A812C 8027984C 00000000 */ nop /* 1A8130 80279850 00031400 */ sll $v0, $v1, 16 /* 1A8134 80279854 00021403 */ sra $v0, $v0, 16 /* 1A8138 80279858 44820000 */ mtc1 $v0, $f0 /* 1A813C 8027985C 00000000 */ nop /* 1A8140 80279860 46800020 */ cvt.s.w $f0, $f0 /* 1A8144 80279864 46020002 */ mul.s $f0, $f0, $f2 /* 1A8148 80279868 00000000 */ nop /* 1A814C 8027986C 46002086 */ mov.s $f2, $f4 /* 1A8150 80279870 A6030070 */ sh $v1, 0x70($s0) /* 1A8154 80279874 0809E62C */ j .L802798B0 /* 1A8158 80279878 46001201 */ sub.s $f8, $f2, $f0 .L8027987C: /* 1A815C 8027987C 44821000 */ mtc1 $v0, $f2 /* 1A8160 80279880 00000000 */ nop /* 1A8164 80279884 468010A0 */ cvt.s.w $f2, $f2 /* 1A8168 80279888 86020070 */ lh $v0, 0x70($s0) /* 1A816C 8027988C 46022083 */ div.s $f2, $f4, $f2 /* 1A8170 80279890 44820000 */ mtc1 $v0, $f0 /* 1A8174 80279894 00000000 */ nop /* 1A8178 80279898 46800020 */ cvt.s.w $f0, $f0 /* 1A817C 8027989C 46020002 */ mul.s $f0, $f0, $f2 /* 1A8180 802798A0 00000000 */ nop /* 1A8184 802798A4 C6040058 */ lwc1 $f4, 0x58($s0) /* 1A8188 802798A8 E602004C */ swc1 $f2, 0x4C($s0) /* 1A818C 802798AC 46002201 */ sub.s $f8, $f4, $f0 .L802798B0: /* 1A8190 802798B0 86220064 */ lh $v0, 0x64($s1) /* 1A8194 802798B4 14400003 */ bnez $v0, .L802798C4 /* 1A8198 802798B8 00000000 */ nop /* 1A819C 802798BC 0809E6A9 */ j .L80279AA4 /* 1A81A0 802798C0 24020002 */ addiu $v0, $zero, 0x2 .L802798C4: /* 1A81A4 802798C4 C622003C */ lwc1 $f2, 0x3C($s1) /* 1A81A8 802798C8 44823000 */ mtc1 $v0, $f6 /* 1A81AC 802798CC 00000000 */ nop /* 1A81B0 802798D0 468031A0 */ cvt.s.w $f6, $f6 /* 1A81B4 802798D4 46061082 */ mul.s $f2, $f2, $f6 /* 1A81B8 802798D8 00000000 */ nop /* 1A81BC 802798DC 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1A81C0 802798E0 44810000 */ mtc1 $at, $f0 /* 1A81C4 802798E4 00000000 */ nop /* 1A81C8 802798E8 46001082 */ mul.s $f2, $f2, $f0 /* 1A81CC 802798EC 00000000 */ nop /* 1A81D0 802798F0 86220064 */ lh $v0, 0x64($s1) /* 1A81D4 802798F4 C6240040 */ lwc1 $f4, 0x40($s1) /* 1A81D8 802798F8 44820000 */ mtc1 $v0, $f0 /* 1A81DC 802798FC 00000000 */ nop /* 1A81E0 80279900 46800020 */ cvt.s.w $f0, $f0 /* 1A81E4 80279904 46004003 */ div.s $f0, $f8, $f0 /* 1A81E8 80279908 46002100 */ add.s $f4, $f4, $f0 /* 1A81EC 8027990C 4606F183 */ div.s $f6, $f30, $f6 /* 1A81F0 80279910 46061080 */ add.s $f2, $f2, $f6 /* 1A81F4 80279914 E6240040 */ swc1 $f4, 0x40($s1) /* 1A81F8 80279918 E6220044 */ swc1 $f2, 0x44($s1) /* 1A81FC 8027991C 8E0201AC */ lw $v0, 0x1AC($s0) /* 1A8200 80279920 10400009 */ beqz $v0, .L80279948 /* 1A8204 80279924 24020001 */ addiu $v0, $zero, 0x1 /* 1A8208 80279928 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A820C 8027992C E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8210 80279930 8E0401AC */ lw $a0, 0x1AC($s0) /* 1A8214 80279934 8E060144 */ lw $a2, 0x144($s0) /* 1A8218 80279938 8E070148 */ lw $a3, 0x148($s0) /* 1A821C 8027993C 0C052757 */ jal sfx_play_sound_at_position /* 1A8220 80279940 0000282D */ daddu $a1, $zero, $zero /* 1A8224 80279944 24020001 */ addiu $v0, $zero, 0x1 .L80279948: /* 1A8228 80279948 AE420070 */ sw $v0, 0x70($s2) /* 1A822C 8027994C 24040002 */ addiu $a0, $zero, 0x2 .L80279950: /* 1A8230 80279950 8E500074 */ lw $s0, 0x74($s2) /* 1A8234 80279954 8E430070 */ lw $v1, 0x70($s2) /* 1A8238 80279958 1064002D */ beq $v1, $a0, .L80279A10 /* 1A823C 8027995C 2611000C */ addiu $s1, $s0, 0xC /* 1A8240 80279960 28620003 */ slti $v0, $v1, 0x3 /* 1A8244 80279964 10400005 */ beqz $v0, .L8027997C /* 1A8248 80279968 24020001 */ addiu $v0, $zero, 0x1 /* 1A824C 8027996C 10620008 */ beq $v1, $v0, .L80279990 /* 1A8250 80279970 00000000 */ nop /* 1A8254 80279974 0809E6A2 */ j .L80279A88 /* 1A8258 80279978 00000000 */ nop .L8027997C: /* 1A825C 8027997C 24020003 */ addiu $v0, $zero, 0x3 /* 1A8260 80279980 10620048 */ beq $v1, $v0, .L80279AA4 /* 1A8264 80279984 24020002 */ addiu $v0, $zero, 0x2 /* 1A8268 80279988 0809E6A2 */ j .L80279A88 /* 1A826C 8027998C 00000000 */ nop .L80279990: /* 1A8270 80279990 C6000050 */ lwc1 $f0, 0x50($s0) /* 1A8274 80279994 C6040010 */ lwc1 $f4, 0x10($s0) /* 1A8278 80279998 46000086 */ mov.s $f2, $f0 /* 1A827C 8027999C 46002100 */ add.s $f4, $f4, $f0 /* 1A8280 802799A0 C6000048 */ lwc1 $f0, 0x48($s0) /* 1A8284 802799A4 46001081 */ sub.s $f2, $f2, $f0 /* 1A8288 802799A8 44800000 */ mtc1 $zero, $f0 /* 1A828C 802799AC E6040010 */ swc1 $f4, 0x10($s0) /* 1A8290 802799B0 4600103C */ c.lt.s $f2, $f0 /* 1A8294 802799B4 00000000 */ nop /* 1A8298 802799B8 4500000F */ bc1f .L802799F8 /* 1A829C 802799BC E6020050 */ swc1 $f2, 0x50($s0) /* 1A82A0 802799C0 C600001C */ lwc1 $f0, 0x1C($s0) /* 1A82A4 802799C4 46002086 */ mov.s $f2, $f4 /* 1A82A8 802799C8 4600103C */ c.lt.s $f2, $f0 /* 1A82AC 802799CC 00000000 */ nop /* 1A82B0 802799D0 45000009 */ bc1f .L802799F8 /* 1A82B4 802799D4 00000000 */ nop /* 1A82B8 802799D8 C6020050 */ lwc1 $f2, 0x50($s0) /* 1A82BC 802799DC C604005C */ lwc1 $f4, 0x5C($s0) /* 1A82C0 802799E0 C6000048 */ lwc1 $f0, 0x48($s0) /* 1A82C4 802799E4 46041083 */ div.s $f2, $f2, $f4 /* 1A82C8 802799E8 46000007 */ neg.s $f0, $f0 /* 1A82CC 802799EC E6000048 */ swc1 $f0, 0x48($s0) /* 1A82D0 802799F0 E6020050 */ swc1 $f2, 0x50($s0) /* 1A82D4 802799F4 AE440070 */ sw $a0, 0x70($s2) .L802799F8: /* 1A82D8 802799F8 8E250040 */ lw $a1, 0x40($s1) /* 1A82DC 802799FC 8E260048 */ lw $a2, 0x48($s1) /* 1A82E0 80279A00 0C09904A */ jal add_xz_vec3f /* 1A82E4 80279A04 0220202D */ daddu $a0, $s1, $zero /* 1A82E8 80279A08 0809E6A2 */ j .L80279A88 /* 1A82EC 80279A0C 00000000 */ nop .L80279A10: /* 1A82F0 80279A10 C6000050 */ lwc1 $f0, 0x50($s0) /* 1A82F4 80279A14 C6040010 */ lwc1 $f4, 0x10($s0) /* 1A82F8 80279A18 46000086 */ mov.s $f2, $f0 /* 1A82FC 80279A1C 46002100 */ add.s $f4, $f4, $f0 /* 1A8300 80279A20 C6000048 */ lwc1 $f0, 0x48($s0) /* 1A8304 80279A24 46001081 */ sub.s $f2, $f2, $f0 /* 1A8308 80279A28 44800000 */ mtc1 $zero, $f0 /* 1A830C 80279A2C E6040010 */ swc1 $f4, 0x10($s0) /* 1A8310 80279A30 4602003C */ c.lt.s $f0, $f2 /* 1A8314 80279A34 00000000 */ nop /* 1A8318 80279A38 45000009 */ bc1f .L80279A60 /* 1A831C 80279A3C E6020050 */ swc1 $f2, 0x50($s0) /* 1A8320 80279A40 C602001C */ lwc1 $f2, 0x1C($s0) /* 1A8324 80279A44 46002006 */ mov.s $f0, $f4 /* 1A8328 80279A48 4600103C */ c.lt.s $f2, $f0 /* 1A832C 80279A4C 00000000 */ nop /* 1A8330 80279A50 45000003 */ bc1f .L80279A60 /* 1A8334 80279A54 24020003 */ addiu $v0, $zero, 0x3 /* 1A8338 80279A58 E6020010 */ swc1 $f2, 0x10($s0) /* 1A833C 80279A5C AE420070 */ sw $v0, 0x70($s2) .L80279A60: /* 1A8340 80279A60 8E250040 */ lw $a1, 0x40($s1) /* 1A8344 80279A64 8E260048 */ lw $a2, 0x48($s1) /* 1A8348 80279A68 0C09904A */ jal add_xz_vec3f /* 1A834C 80279A6C 0220202D */ daddu $a0, $s1, $zero /* 1A8350 80279A70 C6200000 */ lwc1 $f0, 0x0($s1) /* 1A8354 80279A74 E6000144 */ swc1 $f0, 0x144($s0) /* 1A8358 80279A78 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A835C 80279A7C E6000148 */ swc1 $f0, 0x148($s0) /* 1A8360 80279A80 C6200008 */ lwc1 $f0, 0x8($s1) /* 1A8364 80279A84 E600014C */ swc1 $f0, 0x14C($s0) .L80279A88: /* 1A8368 80279A88 C6200000 */ lwc1 $f0, 0x0($s1) /* 1A836C 80279A8C E6000144 */ swc1 $f0, 0x144($s0) /* 1A8370 80279A90 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A8374 80279A94 E6000148 */ swc1 $f0, 0x148($s0) /* 1A8378 80279A98 C6200008 */ lwc1 $f0, 0x8($s1) /* 1A837C 80279A9C 0000102D */ daddu $v0, $zero, $zero /* 1A8380 80279AA0 E600014C */ swc1 $f0, 0x14C($s0) .L80279AA4: /* 1A8384 80279AA4 8FBF0024 */ lw $ra, 0x24($sp) /* 1A8388 80279AA8 8FB20020 */ lw $s2, 0x20($sp) /* 1A838C 80279AAC 8FB1001C */ lw $s1, 0x1C($sp) /* 1A8390 80279AB0 8FB00018 */ lw $s0, 0x18($sp) /* 1A8394 80279AB4 D7BE0050 */ ldc1 $f30, 0x50($sp) /* 1A8398 80279AB8 D7BC0048 */ ldc1 $f28, 0x48($sp) /* 1A839C 80279ABC D7BA0040 */ ldc1 $f26, 0x40($sp) /* 1A83A0 80279AC0 D7B80038 */ ldc1 $f24, 0x38($sp) /* 1A83A4 80279AC4 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1A83A8 80279AC8 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1A83AC 80279ACC 03E00008 */ jr $ra /* 1A83B0 80279AD0 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: ApiStatus JumpWithBounce(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] = 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++); actorState->bounceDivisor = evt_get_float_variable(script, *args++); 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; goalZ = actorState->goalPos.z; goalY = actorState->goalPos.y; 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 = (s32) (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 (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] = TRUE; } actor = script->functionTempPtr[1]; actorState = &actor->state; switch (script->functionTemp[0]) { case 1: actorState->currentPos.y += actorState->velocity; actorState->velocity -= actorState->acceleration; if ((actorState->velocity < 0.0f) && (actorState->currentPos.y < actorState->goalPos.y)) { actorState->acceleration = -actorState->acceleration; actorState->velocity /= actorState->bounceDivisor; script->functionTemp[0] = 2; } add_xz_vec3f(&actorState->currentPos, actorState->speed, actorState->angle); break; case 2: actorState->currentPos.y += actorState->velocity; actorState->velocity -= actorState->acceleration; if (actorState->velocity > 0.0f) { if (actorState->goalPos.y < actorState->currentPos.y) { actorState->currentPos.y = actorState->goalPos.y; script->functionTemp[0] = 3; } } 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; break; case 3: return ApiStatus_DONE2; } actor->currentPos.x = actorState->currentPos.x; actor->currentPos.y = actorState->currentPos.y; actor->currentPos.z = actorState->currentPos.z; return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel walking_dust_appendGfx /* 32C398 E000E288 27BDFF38 */ addiu $sp, $sp, -0xC8 /* 32C39C E000E28C AFB700B4 */ sw $s7, 0xB4($sp) /* 32C3A0 E000E290 0080B82D */ daddu $s7, $a0, $zero /* 32C3A4 E000E294 AFBF00BC */ sw $ra, 0xBC($sp) /* 32C3A8 E000E298 AFBE00B8 */ sw $fp, 0xB8($sp) /* 32C3AC E000E29C AFB600B0 */ sw $s6, 0xB0($sp) /* 32C3B0 E000E2A0 AFB500AC */ sw $s5, 0xAC($sp) /* 32C3B4 E000E2A4 AFB400A8 */ sw $s4, 0xA8($sp) /* 32C3B8 E000E2A8 AFB300A4 */ sw $s3, 0xA4($sp) /* 32C3BC E000E2AC AFB200A0 */ sw $s2, 0xA0($sp) /* 32C3C0 E000E2B0 AFB1009C */ sw $s1, 0x9C($sp) /* 32C3C4 E000E2B4 AFB00098 */ sw $s0, 0x98($sp) /* 32C3C8 E000E2B8 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* 32C3CC E000E2BC 8EE7000C */ lw $a3, 0xC($s7) /* 32C3D0 E000E2C0 3C1E0900 */ lui $fp, %hi(D_09002B40_40FDD0) /* 32C3D4 E000E2C4 27DE2B40 */ addiu $fp, $fp, %lo(D_09002B40_40FDD0) /* 32C3D8 E000E2C8 94EB0004 */ lhu $t3, 0x4($a3) /* 32C3DC E000E2CC 8CEC0074 */ lw $t4, 0x74($a3) /* 32C3E0 E000E2D0 15600005 */ bnez $t3, .LE000E2E8 /* 32C3E4 E000E2D4 0000682D */ daddu $t5, $zero, $zero /* 32C3E8 E000E2D8 3C1E0900 */ lui $fp, %hi(D_09002B20_40FDB0) /* 32C3EC E000E2DC 27DE2B20 */ addiu $fp, $fp, %lo(D_09002B20_40FDB0) /* 32C3F0 E000E2E0 1160000A */ beqz $t3, .LE000E30C /* 32C3F4 E000E2E4 00000000 */ nop .LE000E2E8: /* 32C3F8 E000E2E8 3C0A0900 */ lui $t2, %hi(D_09002950_40FBE0) /* 32C3FC E000E2EC 254A2950 */ addiu $t2, $t2, %lo(D_09002950_40FBE0) /* 32C400 E000E2F0 24020001 */ addiu $v0, $zero, 0x1 /* 32C404 E000E2F4 15620007 */ bne $t3, $v0, .LE000E314 /* 32C408 E000E2F8 00000000 */ nop /* 32C40C E000E2FC 3C0A0900 */ lui $t2, %hi(D_09002868_40FAF8) /* 32C410 E000E300 254A2868 */ addiu $t2, $t2, %lo(D_09002868_40FAF8) /* 32C414 E000E304 080038C5 */ j .LE000E314 /* 32C418 E000E308 00000000 */ nop .LE000E30C: /* 32C41C E000E30C 3C0A0900 */ lui $t2, %hi(D_09002780_40FA10) /* 32C420 E000E310 254A2780 */ addiu $t2, $t2, %lo(D_09002780_40FA10) .LE000E314: /* 32C424 E000E314 8CE3006C */ lw $v1, 0x6C($a3) /* 32C428 E000E318 14600004 */ bnez $v1, .LE000E32C /* 32C42C E000E31C 24020001 */ addiu $v0, $zero, 0x1 /* 32C430 E000E320 24020006 */ addiu $v0, $zero, 0x6 /* 32C434 E000E324 11820006 */ beq $t4, $v0, .LE000E340 /* 32C438 E000E328 24020001 */ addiu $v0, $zero, 0x1 .LE000E32C: /* 32C43C E000E32C 14620006 */ bne $v1, $v0, .LE000E348 /* 32C440 E000E330 3C04DB06 */ lui $a0, (0xDB060024 >> 16) /* 32C444 E000E334 24020007 */ addiu $v0, $zero, 0x7 /* 32C448 E000E338 15820004 */ bne $t4, $v0, .LE000E34C /* 32C44C E000E33C 34840024 */ ori $a0, $a0, (0xDB060024 & 0xFFFF) .LE000E340: /* 32C450 E000E340 240D0001 */ addiu $t5, $zero, 0x1 /* 32C454 E000E344 3C04DB06 */ lui $a0, (0xDB060024 >> 16) .LE000E348: /* 32C458 E000E348 34840024 */ ori $a0, $a0, (0xDB060024 & 0xFFFF) .LE000E34C: /* 32C45C E000E34C 3C05E6DE */ lui $a1, (0xE6DEDE6E >> 16) /* 32C460 E000E350 34A5DE6E */ ori $a1, $a1, (0xE6DEDE6E & 0xFFFF) /* 32C464 E000E354 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 32C468 E000E358 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 32C46C E000E35C 24090020 */ addiu $t1, $zero, 0x20 /* 32C470 E000E360 8D060000 */ lw $a2, 0x0($t0) /* 32C474 E000E364 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32C478 E000E368 00C0182D */ daddu $v1, $a2, $zero /* 32C47C E000E36C 24C60008 */ addiu $a2, $a2, 0x8 /* 32C480 E000E370 AD060000 */ sw $a2, 0x0($t0) /* 32C484 E000E374 AC620000 */ sw $v0, 0x0($v1) /* 32C488 E000E378 24C20008 */ addiu $v0, $a2, 0x8 /* 32C48C E000E37C AC600004 */ sw $zero, 0x4($v1) /* 32C490 E000E380 AD020000 */ sw $v0, 0x0($t0) /* 32C494 E000E384 24C20010 */ addiu $v0, $a2, 0x10 /* 32C498 E000E388 ACC40000 */ sw $a0, 0x0($a2) /* 32C49C E000E38C AD020000 */ sw $v0, 0x0($t0) /* 32C4A0 E000E390 24C20018 */ addiu $v0, $a2, 0x18 /* 32C4A4 E000E394 AD020000 */ sw $v0, 0x0($t0) /* 32C4A8 E000E398 8EE30010 */ lw $v1, 0x10($s7) /* 32C4AC E000E39C 00C91021 */ addu $v0, $a2, $t1 /* 32C4B0 E000E3A0 AD020000 */ sw $v0, 0x0($t0) /* 32C4B4 E000E3A4 8C63001C */ lw $v1, 0x1C($v1) /* 32C4B8 E000E3A8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 32C4BC E000E3AC ACC20008 */ sw $v0, 0x8($a2) /* 32C4C0 E000E3B0 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 32C4C4 E000E3B4 ACC20010 */ sw $v0, 0x10($a2) /* 32C4C8 E000E3B8 2402007F */ addiu $v0, $zero, 0x7F /* 32C4CC E000E3BC ACC20014 */ sw $v0, 0x14($a2) /* 32C4D0 E000E3C0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 32C4D4 E000E3C4 ACC20018 */ sw $v0, 0x18($a2) /* 32C4D8 E000E3C8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 32C4DC E000E3CC ACCA000C */ sw $t2, 0xC($a2) /* 32C4E0 E000E3D0 ACC5001C */ sw $a1, 0x1C($a2) /* 32C4E4 E000E3D4 00621821 */ addu $v1, $v1, $v0 /* 32C4E8 E000E3D8 15600002 */ bnez $t3, .LE000E3E4 /* 32C4EC E000E3DC ACC30004 */ sw $v1, 0x4($a2) /* 32C4F0 E000E3E0 24090018 */ addiu $t1, $zero, 0x18 .LE000E3E4: /* 32C4F4 E000E3E4 01890018 */ mult $t4, $t1 /* 32C4F8 E000E3E8 24C20028 */ addiu $v0, $a2, 0x28 /* 32C4FC E000E3EC 3C0BF200 */ lui $t3, (0xF2000000 >> 16) /* 32C500 E000E3F0 AD020000 */ sw $v0, 0x0($t0) /* 32C504 E000E3F4 00002812 */ mflo $a1 /* 32C508 E000E3F8 00051080 */ sll $v0, $a1, 2 /* 32C50C E000E3FC 30420FFF */ andi $v0, $v0, 0xFFF /* 32C510 E000E400 00021300 */ sll $v0, $v0, 12 /* 32C514 E000E404 004B1025 */ or $v0, $v0, $t3 /* 32C518 E000E408 00A92021 */ addu $a0, $a1, $t1 /* 32C51C E000E40C 2483FFFF */ addiu $v1, $a0, -0x1 /* 32C520 E000E410 00031880 */ sll $v1, $v1, 2 /* 32C524 E000E414 30630FFF */ andi $v1, $v1, 0xFFF /* 32C528 E000E418 00031B00 */ sll $v1, $v1, 12 /* 32C52C E000E41C ACC20020 */ sw $v0, 0x20($a2) /* 32C530 E000E420 2522FFFF */ addiu $v0, $t1, -0x1 /* 32C534 E000E424 00021080 */ sll $v0, $v0, 2 /* 32C538 E000E428 304A0FFF */ andi $t2, $v0, 0xFFF /* 32C53C E000E42C 006A1825 */ or $v1, $v1, $t2 /* 32C540 E000E430 11A00010 */ beqz $t5, .LE000E474 /* 32C544 E000E434 ACC30024 */ sw $v1, 0x24($a2) /* 32C548 E000E438 24C20030 */ addiu $v0, $a2, 0x30 /* 32C54C E000E43C AD020000 */ sw $v0, 0x0($t0) /* 32C550 E000E440 00041080 */ sll $v0, $a0, 2 /* 32C554 E000E444 30420FFF */ andi $v0, $v0, 0xFFF /* 32C558 E000E448 00021300 */ sll $v0, $v0, 12 /* 32C55C E000E44C 004B1025 */ or $v0, $v0, $t3 /* 32C560 E000E450 ACC20028 */ sw $v0, 0x28($a2) /* 32C564 E000E454 00091040 */ sll $v0, $t1, 1 /* 32C568 E000E458 00A21021 */ addu $v0, $a1, $v0 /* 32C56C E000E45C 2442FFFF */ addiu $v0, $v0, -0x1 /* 32C570 E000E460 00021080 */ sll $v0, $v0, 2 /* 32C574 E000E464 30420FFF */ andi $v0, $v0, 0xFFF /* 32C578 E000E468 00021300 */ sll $v0, $v0, 12 /* 32C57C E000E46C 0800392C */ j .LE000E4B0 /* 32C580 E000E470 3C030100 */ lui $v1, (0x1000000 >> 16) .LE000E474: /* 32C584 E000E474 24C20030 */ addiu $v0, $a2, 0x30 /* 32C588 E000E478 AD020000 */ sw $v0, 0x0($t0) /* 32C58C E000E47C 00041080 */ sll $v0, $a0, 2 /* 32C590 E000E480 30420FFF */ andi $v0, $v0, 0xFFF /* 32C594 E000E484 00021300 */ sll $v0, $v0, 12 /* 32C598 E000E488 004B1025 */ or $v0, $v0, $t3 /* 32C59C E000E48C ACC20028 */ sw $v0, 0x28($a2) /* 32C5A0 E000E490 00091040 */ sll $v0, $t1, 1 /* 32C5A4 E000E494 00A21021 */ addu $v0, $a1, $v0 /* 32C5A8 E000E498 2442FFFF */ addiu $v0, $v0, -0x1 /* 32C5AC E000E49C 00021080 */ sll $v0, $v0, 2 /* 32C5B0 E000E4A0 30420FFF */ andi $v0, $v0, 0xFFF /* 32C5B4 E000E4A4 00021300 */ sll $v0, $v0, 12 /* 32C5B8 E000E4A8 3C030100 */ lui $v1, (0x1000000 >> 16) /* 32C5BC E000E4AC 01431825 */ or $v1, $t2, $v1 .LE000E4B0: /* 32C5C0 E000E4B0 00431025 */ or $v0, $v0, $v1 /* 32C5C4 E000E4B4 ACC2002C */ sw $v0, 0x2C($a2) /* 32C5C8 E000E4B8 8EE20008 */ lw $v0, 0x8($s7) /* 32C5CC E000E4BC 18400051 */ blez $v0, .LE000E604 /* 32C5D0 E000E4C0 0000882D */ daddu $s1, $zero, $zero /* 32C5D4 E000E4C4 27B40058 */ addiu $s4, $sp, 0x58 /* 32C5D8 E000E4C8 4480A000 */ mtc1 $zero, $f20 /* 32C5DC E000E4CC 3C16800A */ lui $s6, %hi(gDisplayContext) /* 32C5E0 E000E4D0 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 32C5E4 E000E4D4 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 32C5E8 E000E4D8 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 32C5EC E000E4DC 3C130001 */ lui $s3, (0x11630 >> 16) /* 32C5F0 E000E4E0 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 32C5F4 E000E4E4 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 32C5F8 E000E4E8 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 32C5FC E000E4EC 24F00010 */ addiu $s0, $a3, 0x10 .LE000E4F0: /* 32C600 E000E4F0 27A40018 */ addiu $a0, $sp, 0x18 /* 32C604 E000E4F4 26310001 */ addiu $s1, $s1, 0x1 /* 32C608 E000E4F8 8E05FFF8 */ lw $a1, -0x8($s0) /* 32C60C E000E4FC 8E06FFFC */ lw $a2, -0x4($s0) /* 32C610 E000E500 8E070000 */ lw $a3, 0x0($s0) /* 32C614 E000E504 0C080108 */ jal shim_guTranslateF /* 32C618 E000E508 26100078 */ addiu $s0, $s0, 0x78 /* 32C61C E000E50C 3C0E800B */ lui $t6, %hi(gCameras) /* 32C620 E000E510 25CE1D80 */ addiu $t6, $t6, %lo(gCameras) /* 32C624 E000E514 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 32C628 E000E518 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 32C62C E000E51C 4406A000 */ mfc1 $a2, $f20 /* 32C630 E000E520 00031080 */ sll $v0, $v1, 2 /* 32C634 E000E524 00431021 */ addu $v0, $v0, $v1 /* 32C638 E000E528 00021080 */ sll $v0, $v0, 2 /* 32C63C E000E52C 00431023 */ subu $v0, $v0, $v1 /* 32C640 E000E530 000218C0 */ sll $v1, $v0, 3 /* 32C644 E000E534 00431021 */ addu $v0, $v0, $v1 /* 32C648 E000E538 000210C0 */ sll $v0, $v0, 3 /* 32C64C E000E53C 004E1021 */ addu $v0, $v0, $t6 /* 32C650 E000E540 C440006C */ lwc1 $f0, 0x6C($v0) /* 32C654 E000E544 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 32C658 E000E548 46000007 */ neg.s $f0, $f0 /* 32C65C E000E54C 44050000 */ mfc1 $a1, $f0 /* 32C660 E000E550 0280202D */ daddu $a0, $s4, $zero /* 32C664 E000E554 0C080104 */ jal shim_guRotateF /* 32C668 E000E558 E7B40010 */ swc1 $f20, 0x10($sp) /* 32C66C E000E55C 0280202D */ daddu $a0, $s4, $zero /* 32C670 E000E560 27A50018 */ addiu $a1, $sp, 0x18 /* 32C674 E000E564 0C080114 */ jal shim_guMtxCatF /* 32C678 E000E568 00A0302D */ daddu $a2, $a1, $zero /* 32C67C E000E56C 27A40018 */ addiu $a0, $sp, 0x18 /* 32C680 E000E570 96A50000 */ lhu $a1, 0x0($s5) /* 32C684 E000E574 8EC20000 */ lw $v0, 0x0($s6) /* 32C688 E000E578 00052980 */ sll $a1, $a1, 6 /* 32C68C E000E57C 00B32821 */ addu $a1, $a1, $s3 /* 32C690 E000E580 0C080118 */ jal shim_guMtxF2L /* 32C694 E000E584 00452821 */ addu $a1, $v0, $a1 /* 32C698 E000E588 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 32C69C E000E58C 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 32C6A0 E000E590 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 32C6A4 E000E594 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 32C6A8 E000E598 8E440000 */ lw $a0, 0x0($s2) /* 32C6AC E000E59C 96A30000 */ lhu $v1, 0x0($s5) /* 32C6B0 E000E5A0 0080282D */ daddu $a1, $a0, $zero /* 32C6B4 E000E5A4 24840008 */ addiu $a0, $a0, 0x8 /* 32C6B8 E000E5A8 AE440000 */ sw $a0, 0x0($s2) /* 32C6BC E000E5AC ACA20000 */ sw $v0, 0x0($a1) /* 32C6C0 E000E5B0 24620001 */ addiu $v0, $v1, 0x1 /* 32C6C4 E000E5B4 3063FFFF */ andi $v1, $v1, 0xFFFF /* 32C6C8 E000E5B8 00031980 */ sll $v1, $v1, 6 /* 32C6CC E000E5BC A6A20000 */ sh $v0, 0x0($s5) /* 32C6D0 E000E5C0 8EC20000 */ lw $v0, 0x0($s6) /* 32C6D4 E000E5C4 00731821 */ addu $v1, $v1, $s3 /* 32C6D8 E000E5C8 00431021 */ addu $v0, $v0, $v1 /* 32C6DC E000E5CC ACA20004 */ sw $v0, 0x4($a1) /* 32C6E0 E000E5D0 24820008 */ addiu $v0, $a0, 0x8 /* 32C6E4 E000E5D4 AE420000 */ sw $v0, 0x0($s2) /* 32C6E8 E000E5D8 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 32C6EC E000E5DC AC820000 */ sw $v0, 0x0($a0) /* 32C6F0 E000E5E0 24020040 */ addiu $v0, $zero, 0x40 /* 32C6F4 E000E5E4 AC9E0004 */ sw $fp, 0x4($a0) /* 32C6F8 E000E5E8 AC860008 */ sw $a2, 0x8($a0) /* 32C6FC E000E5EC AC82000C */ sw $v0, 0xC($a0) /* 32C700 E000E5F0 8EE20008 */ lw $v0, 0x8($s7) /* 32C704 E000E5F4 24840010 */ addiu $a0, $a0, 0x10 /* 32C708 E000E5F8 0222102A */ slt $v0, $s1, $v0 /* 32C70C E000E5FC 1440FFBC */ bnez $v0, .LE000E4F0 /* 32C710 E000E600 AE440000 */ sw $a0, 0x0($s2) .LE000E604: /* 32C714 E000E604 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 32C718 E000E608 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 32C71C E000E60C 8C620000 */ lw $v0, 0x0($v1) /* 32C720 E000E610 0040202D */ daddu $a0, $v0, $zero /* 32C724 E000E614 24420008 */ addiu $v0, $v0, 0x8 /* 32C728 E000E618 AC620000 */ sw $v0, 0x0($v1) /* 32C72C E000E61C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32C730 E000E620 AC820000 */ sw $v0, 0x0($a0) /* 32C734 E000E624 AC800004 */ sw $zero, 0x4($a0) /* 32C738 E000E628 8FBF00BC */ lw $ra, 0xBC($sp) /* 32C73C E000E62C 8FBE00B8 */ lw $fp, 0xB8($sp) /* 32C740 E000E630 8FB700B4 */ lw $s7, 0xB4($sp) /* 32C744 E000E634 8FB600B0 */ lw $s6, 0xB0($sp) /* 32C748 E000E638 8FB500AC */ lw $s5, 0xAC($sp) /* 32C74C E000E63C 8FB400A8 */ lw $s4, 0xA8($sp) /* 32C750 E000E640 8FB300A4 */ lw $s3, 0xA4($sp) /* 32C754 E000E644 8FB200A0 */ lw $s2, 0xA0($sp) /* 32C758 E000E648 8FB1009C */ lw $s1, 0x9C($sp) /* 32C75C E000E64C 8FB00098 */ lw $s0, 0x98($sp) /* 32C760 E000E650 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* 32C764 E000E654 03E00008 */ jr $ra /* 32C768 E000E658 27BD00C8 */ addiu $sp, $sp, 0xC8 /* 32C76C E000E65C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void walking_dust_appendGfx(void* effect) { EffectInstance* effectTemp = effect; WalkingDustFXData* data = effectTemp->data.walkingDust; s32 temp_t3 = data->unk_04; s32 temp_t4 = data->unk_74; s32 cond = FALSE; Matrix4f sp18; Matrix4f sp58; s32 temp_a0; s32 temp_lo; Gfx* dlist; Gfx* dlist2; s32 phi_t1; s32 i; if (temp_t3 == 0) { dlist2 = D_09002B20_32B9C0; } else { dlist2 = D_09002B40_32B9E0; } switch (temp_t3) { case 1: dlist = D_09002868_32B708; break; default: dlist = D_09002950_32B7F0; break; case 0: dlist = D_09002780_32B620; break; } if ((data->unk_6C == 0 && temp_t4 == 6) || (data->unk_6C == 1 && temp_t4 == 7)) { cond = TRUE; } gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 127); gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 110); if (temp_t3 == 0) { phi_t1 = 24; } else { phi_t1 = 32; } temp_lo = temp_t4 * phi_t1; temp_a0 = temp_lo + phi_t1; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, temp_lo * 4, 0, (temp_a0 - 1) * 4, ((phi_t1 - 1) * 4)); if (cond) { gDPSetTileSize(gMainGfxPos++, 1, temp_a0 * 4, 0, ((temp_lo + (phi_t1 * 2)) - 1) * 4, 0); } else { gDPSetTileSize(gMainGfxPos++, 1, temp_a0 * 4, 0, ((temp_lo + (phi_t1 * 2)) - 1) * 4, (phi_t1 - 1) * 4); } for (i = 0; i < effectTemp->numParts; i++, data++) { shim_guTranslateF(sp18, data->unk_08, data->unk_0C, data->unk_10); 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++, dlist2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_demo /* 134F4 800380F4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 134F8 800380F8 3C058007 */ lui $a1, %hi(gGameStatusPtr) /* 134FC 800380FC 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) /* 13500 80038100 3C048007 */ lui $a0, %hi(DemoScenes) /* 13504 80038104 24847AE0 */ addiu $a0, $a0, %lo(DemoScenes) /* 13508 80038108 AFBF002C */ sw $ra, 0x2C($sp) /* 1350C 8003810C AFB20028 */ sw $s2, 0x28($sp) /* 13510 80038110 AFB10024 */ sw $s1, 0x24($sp) /* 13514 80038114 AFB00020 */ sw $s0, 0x20($sp) /* 13518 80038118 80A30072 */ lb $v1, 0x72($a1) /* 1351C 8003811C 3C128011 */ lui $s2, %hi(gPlayerData) /* 13520 80038120 2652F290 */ addiu $s2, $s2, %lo(gPlayerData) /* 13524 80038124 00031040 */ sll $v0, $v1, 1 /* 13528 80038128 00431021 */ addu $v0, $v0, $v1 /* 1352C 8003812C 00021080 */ sll $v0, $v0, 2 /* 13530 80038130 00448821 */ addu $s1, $v0, $a0 /* 13534 80038134 24020004 */ addiu $v0, $zero, 0x4 /* 13538 80038138 80A40071 */ lb $a0, 0x71($a1) /* 1353C 8003813C 96230000 */ lhu $v1, 0x0($s1) /* 13540 80038140 50820001 */ beql $a0, $v0, .L80038148 /* 13544 80038144 24030003 */ addiu $v1, $zero, 0x3 .L80038148: /* 13548 80038148 24020005 */ addiu $v0, $zero, 0x5 /* 1354C 8003814C 50820001 */ beql $a0, $v0, .L80038154 /* 13550 80038150 24030004 */ addiu $v1, $zero, 0x4 .L80038154: /* 13554 80038154 00031400 */ sll $v0, $v1, 16 /* 13558 80038158 00021C03 */ sra $v1, $v0, 16 /* 1355C 8003815C 2C620005 */ sltiu $v0, $v1, 0x5 /* 13560 80038160 104000AC */ beqz $v0, .L80038414 /* 13564 80038164 00031080 */ sll $v0, $v1, 2 /* 13568 80038168 3C01800A */ lui $at, %hi(jtbl_80098460) /* 1356C 8003816C 00220821 */ addu $at, $at, $v0 /* 13570 80038170 8C228460 */ lw $v0, %lo(jtbl_80098460)($at) /* 13574 80038174 00400008 */ jr $v0 /* 13578 80038178 00000000 */ nop glabel .L8003817C /* 1357C 8003817C 0C00CDF4 */ jal intro_logos_set_fade_alpha /* 13580 80038180 240400FF */ addiu $a0, $zero, 0xFF /* 13584 80038184 0C00CDF8 */ jal intro_logos_set_fade_color /* 13588 80038188 240400E0 */ addiu $a0, $zero, 0xE0 /* 1358C 8003818C 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 13590 80038190 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 13594 80038194 8E030000 */ lw $v1, 0x0($s0) /* 13598 80038198 24020003 */ addiu $v0, $zero, 0x3 /* 1359C 8003819C A06200AC */ sb $v0, 0xAC($v1) /* 135A0 800381A0 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 135A4 800381A4 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 135A8 800381A8 8C620000 */ lw $v0, 0x0($v1) /* 135AC 800381AC 34420008 */ ori $v0, $v0, 0x8 /* 135B0 800381B0 0C00CE1D */ jal intro_logos_update_fade /* 135B4 800381B4 AC620000 */ sw $v0, 0x0($v1) /* 135B8 800381B8 8E030000 */ lw $v1, 0x0($s0) /* 135BC 800381BC 24020005 */ addiu $v0, $zero, 0x5 /* 135C0 800381C0 0800E105 */ j .L80038414 /* 135C4 800381C4 A0620071 */ sb $v0, 0x71($v1) glabel .L800381C8 /* 135C8 800381C8 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 135CC 800381CC 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 135D0 800381D0 8E040000 */ lw $a0, 0x0($s0) /* 135D4 800381D4 808200AC */ lb $v0, 0xAC($a0) /* 135D8 800381D8 908300AC */ lbu $v1, 0xAC($a0) /* 135DC 800381DC 10400006 */ beqz $v0, .L800381F8 /* 135E0 800381E0 2462FFFF */ addiu $v0, $v1, -0x1 /* 135E4 800381E4 A08200AC */ sb $v0, 0xAC($a0) /* 135E8 800381E8 8E020000 */ lw $v0, 0x0($s0) /* 135EC 800381EC 804200AC */ lb $v0, 0xAC($v0) /* 135F0 800381F0 14400094 */ bnez $v0, .L80038444 /* 135F4 800381F4 00000000 */ nop .L800381F8: /* 135F8 800381F8 8E020000 */ lw $v0, 0x0($s0) /* 135FC 800381FC A0400072 */ sb $zero, 0x72($v0) /* 13600 80038200 8E020000 */ lw $v0, 0x0($s0) /* 13604 80038204 A0400071 */ sb $zero, 0x71($v0) /* 13608 80038208 8E020000 */ lw $v0, 0x0($s0) /* 1360C 8003820C 0C015881 */ jal enable_sounds /* 13610 80038210 A040007E */ sb $zero, 0x7E($v0) /* 13614 80038214 8E020000 */ lw $v0, 0x0($s0) /* 13618 80038218 A0400070 */ sb $zero, 0x70($v0) /* 1361C 8003821C 8E020000 */ lw $v0, 0x0($s0) /* 13620 80038220 A0400076 */ sb $zero, 0x76($v0) /* 13624 80038224 8E020000 */ lw $v0, 0x0($s0) /* 13628 80038228 A0400078 */ sb $zero, 0x78($v0) /* 1362C 8003822C 8E020000 */ lw $v0, 0x0($s0) /* 13630 80038230 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 13634 80038234 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 13638 80038238 A040007D */ sb $zero, 0x7D($v0) /* 1363C 8003823C 8C820000 */ lw $v0, 0x0($a0) /* 13640 80038240 2403FFF7 */ addiu $v1, $zero, -0x9 /* 13644 80038244 00431024 */ and $v0, $v0, $v1 /* 13648 80038248 0C00AB00 */ jal general_heap_create /* 1364C 8003824C AC820000 */ sw $v0, 0x0($a0) /* 13650 80038250 0C047624 */ jal clear_render_tasks /* 13654 80038254 00000000 */ nop /* 13658 80038258 0C048C2E */ jal clear_worker_list /* 1365C 8003825C 00000000 */ nop /* 13660 80038260 0C0B0C77 */ jal clear_script_list /* 13664 80038264 00000000 */ nop /* 13668 80038268 0C00B7BD */ jal create_cameras_a /* 1366C 8003826C 00000000 */ nop /* 13670 80038270 0C0B763E */ jal spr_init_sprites /* 13674 80038274 0000202D */ daddu $a0, $zero, $zero /* 13678 80038278 0C0482EC */ jal clear_entity_models /* 1367C 8003827C 00000000 */ nop /* 13680 80038280 0C047889 */ jal clear_animator_list /* 13684 80038284 00000000 */ nop /* 13688 80038288 0C045751 */ jal clear_model_data /* 1368C 8003828C 00000000 */ nop /* 13690 80038290 0C052010 */ jal clear_sprite_shading_data /* 13694 80038294 00000000 */ nop /* 13698 80038298 0C05177E */ jal reset_background_settings /* 1369C 8003829C 00000000 */ nop /* 136A0 800382A0 0C050440 */ jal hud_element_clear_cache /* 136A4 800382A4 00000000 */ nop /* 136A8 800382A8 0C0515A0 */ jal clear_trigger_data /* 136AC 800382AC 00000000 */ nop /* 136B0 800382B0 0C048D9D */ jal clear_printers /* 136B4 800382B4 00000000 */ nop /* 136B8 800382B8 0C04432E */ jal clear_entity_data /* 136BC 800382BC 0000202D */ daddu $a0, $zero, $zero /* 136C0 800382C0 0C04E042 */ jal clear_screen_overlays /* 136C4 800382C4 00000000 */ nop /* 136C8 800382C8 0C037F14 */ jal clear_player_status /* 136CC 800382CC 00000000 */ nop /* 136D0 800382D0 0C00E12F */ jal clear_npcs /* 136D4 800382D4 00000000 */ nop /* 136D8 800382D8 0C039CE8 */ jal clear_player_data /* 136DC 800382DC 00000000 */ nop /* 136E0 800382E0 0C01CACC */ jal reset_battle_status /* 136E4 800382E4 00000000 */ nop /* 136E8 800382E8 0C00F8CE */ jal init_encounter_status /* 136EC 800382EC 00000000 */ nop /* 136F0 800382F0 0C016727 */ jal clear_effect_data /* 136F4 800382F4 00000000 */ nop /* 136F8 800382F8 0C04C3FC */ jal clear_item_entity_data /* 136FC 800382FC 00000000 */ nop /* 13700 80038300 0C0514C8 */ jal clear_saved_variables /* 13704 80038304 00000000 */ nop /* 13708 80038308 0C016BE5 */ jal initialize_collision /* 1370C 8003830C 00000000 */ nop /* 13710 80038310 0C00CD3C */ jal set_game_mode /* 13714 80038314 24040002 */ addiu $a0, $zero, 0x2 /* 13718 80038318 0800E111 */ j .L80038444 /* 1371C 8003831C 00000000 */ nop glabel .L80038320 /* 13720 80038320 27A50018 */ addiu $a1, $sp, 0x18 /* 13724 80038324 8E240008 */ lw $a0, 0x8($s1) /* 13728 80038328 0C016AFE */ jal get_map_IDs_by_name /* 1372C 8003832C 27A6001A */ addiu $a2, $sp, 0x1A /* 13730 80038330 0000202D */ daddu $a0, $zero, $zero /* 13734 80038334 2405001D */ addiu $a1, $zero, 0x1D /* 13738 80038338 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 1373C 8003833C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 13740 80038340 8E020000 */ lw $v0, 0x0($s0) /* 13744 80038344 97A30018 */ lhu $v1, 0x18($sp) /* 13748 80038348 97A7001A */ lhu $a3, 0x1A($sp) /* 1374C 8003834C 24060014 */ addiu $a2, $zero, 0x14 /* 13750 80038350 A4430086 */ sh $v1, 0x86($v0) /* 13754 80038354 A447008C */ sh $a3, 0x8C($v0) /* 13758 80038358 96230002 */ lhu $v1, 0x2($s1) /* 1375C 8003835C 2407FEFA */ addiu $a3, $zero, -0x106 /* 13760 80038360 A040007E */ sb $zero, 0x7E($v0) /* 13764 80038364 0800E0EE */ j .L800383B8 /* 13768 80038368 A443008E */ sh $v1, 0x8E($v0) glabel .L8003836C /* 1376C 8003836C 27A50018 */ addiu $a1, $sp, 0x18 /* 13770 80038370 8E240008 */ lw $a0, 0x8($s1) /* 13774 80038374 0C016AFE */ jal get_map_IDs_by_name /* 13778 80038378 27A6001A */ addiu $a2, $sp, 0x1A /* 1377C 8003837C 0000202D */ daddu $a0, $zero, $zero /* 13780 80038380 2405001D */ addiu $a1, $zero, 0x1D /* 13784 80038384 24060014 */ addiu $a2, $zero, 0x14 /* 13788 80038388 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 1378C 8003838C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 13790 80038390 8E030000 */ lw $v1, 0x0($s0) /* 13794 80038394 97A20018 */ lhu $v0, 0x18($sp) /* 13798 80038398 97A8001A */ lhu $t0, 0x1A($sp) /* 1379C 8003839C 2407FEFA */ addiu $a3, $zero, -0x106 /* 137A0 800383A0 A4620086 */ sh $v0, 0x86($v1) /* 137A4 800383A4 A468008C */ sh $t0, 0x8C($v1) /* 137A8 800383A8 96280002 */ lhu $t0, 0x2($s1) /* 137AC 800383AC 24020001 */ addiu $v0, $zero, 0x1 /* 137B0 800383B0 A062007E */ sb $v0, 0x7E($v1) /* 137B4 800383B4 A468008E */ sh $t0, 0x8E($v1) .L800383B8: /* 137B8 800383B8 92230005 */ lbu $v1, 0x5($s1) /* 137BC 800383BC 240200B1 */ addiu $v0, $zero, 0xB1 /* 137C0 800383C0 AFA20010 */ sw $v0, 0x10($sp) /* 137C4 800383C4 0C00B8C5 */ jal set_cam_viewport /* 137C8 800383C8 A2430012 */ sb $v1, 0x12($s2) /* 137CC 800383CC 0000202D */ daddu $a0, $zero, $zero /* 137D0 800383D0 3C05F5DE */ lui $a1, (0xF5DE0180 >> 16) /* 137D4 800383D4 82260006 */ lb $a2, 0x6($s1) /* 137D8 800383D8 0C0B2026 */ jal evt_set_variable /* 137DC 800383DC 34A50180 */ ori $a1, $a1, (0xF5DE0180 & 0xFFFF) /* 137E0 800383E0 8E020000 */ lw $v0, 0x0($s0) /* 137E4 800383E4 80420072 */ lb $v0, 0x72($v0) /* 137E8 800383E8 14400002 */ bnez $v0, .L800383F4 /* 137EC 800383EC 24040002 */ addiu $a0, $zero, 0x2 /* 137F0 800383F0 24040003 */ addiu $a0, $zero, 0x3 .L800383F4: /* 137F4 800383F4 0C04E0A8 */ jal set_map_transition_effect /* 137F8 800383F8 00000000 */ nop /* 137FC 800383FC 0C00CD3C */ jal set_game_mode /* 13800 80038400 24040003 */ addiu $a0, $zero, 0x3 /* 13804 80038404 0800E105 */ j .L80038414 /* 13808 80038408 00000000 */ nop glabel .L8003840C /* 1380C 8003840C 0C01CB85 */ jal load_demo_battle /* 13810 80038410 96240002 */ lhu $a0, 0x2($s1) .L80038414: /* 13814 80038414 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 13818 80038418 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* 1381C 8003841C 8C830000 */ lw $v1, 0x0($a0) /* 13820 80038420 90620072 */ lbu $v0, 0x72($v1) /* 13824 80038424 24420001 */ addiu $v0, $v0, 0x1 /* 13828 80038428 A0620072 */ sb $v0, 0x72($v1) /* 1382C 8003842C 8C840000 */ lw $a0, 0x0($a0) /* 13830 80038430 80820072 */ lb $v0, 0x72($a0) /* 13834 80038434 28420013 */ slti $v0, $v0, 0x13 /* 13838 80038438 14400002 */ bnez $v0, .L80038444 /* 1383C 8003843C 24020012 */ addiu $v0, $zero, 0x12 /* 13840 80038440 A0820072 */ sb $v0, 0x72($a0) .L80038444: /* 13844 80038444 8FBF002C */ lw $ra, 0x2C($sp) /* 13848 80038448 8FB20028 */ lw $s2, 0x28($sp) /* 1384C 8003844C 8FB10024 */ lw $s1, 0x24($sp) /* 13850 80038450 8FB00020 */ lw $s0, 0x20($sp) /* 13854 80038454 03E00008 */ jr $ra /* 13858 80038458 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void state_step_demo(void) { PlayerData* playerData = &gPlayerData; DemoSceneData* demoSceneData = &DemoScenes[gGameStatusPtr->nextDemoScene]; s16 mode = demoSceneData->sceneType; s16 mapID; s16 areaID; if (gGameStatusPtr->demoState == DEMO_STATE_4) { mode = DEMO_SCENE_DONE; } if (gGameStatusPtr->demoState == DEMO_STATE_DONE) { mode = DEMO_SCENE_EXIT; } switch (mode) { case DEMO_SCENE_DONE: intro_logos_set_fade_alpha(255); intro_logos_set_fade_color(224); gGameStatusPtr->introState = INTRO_STATE_3; gOverrideFlags |= GLOBAL_OVERRIDES_8; intro_logos_update_fade(); gGameStatusPtr->demoState = DEMO_STATE_DONE; break; case DEMO_SCENE_EXIT: if (gGameStatusPtr->introState != INTRO_STATE_0) { gGameStatusPtr->introState--; } if (gGameStatusPtr->introState == INTRO_STATE_0) { gGameStatusPtr->nextDemoScene = 0; gGameStatusPtr->demoState = DEMO_STATE_NONE; gGameStatusPtr->peachFlags = 0; enable_sounds(); gGameStatusPtr->isBattle = FALSE; gGameStatusPtr->unk_76 = 0; gGameStatusPtr->disableScripts = FALSE; gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE; gOverrideFlags &= ~GLOBAL_OVERRIDES_8; general_heap_create(); clear_render_tasks(); clear_worker_list(); clear_script_list(); create_cameras_a(); spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD); clear_entity_models(); clear_animator_list(); clear_model_data(); clear_sprite_shading_data(); reset_background_settings(); hud_element_clear_cache(); clear_trigger_data(); clear_printers(); clear_entity_data(0); clear_screen_overlays(); clear_player_status(); clear_npcs(); clear_player_data(); reset_battle_status(); init_encounter_status(); clear_effect_data(); clear_item_entity_data(); clear_saved_variables(); initialize_collision(); set_game_mode(GAME_MODE_TITLE_SCREEN); } return; case DEMO_SCENE_WORLD: get_map_IDs_by_name(demoSceneData->mapName, &areaID, &mapID); gGameStatusPtr->areaID = areaID; gGameStatusPtr->mapID = mapID; gGameStatusPtr->entryID = demoSceneData->index; gGameStatusPtr->peachFlags = 0; playerData->currentPartner = demoSceneData->partnerID; set_cam_viewport(0, 29, 20, -262, 177); evt_set_variable(NULL, GB_StoryProgress, demoSceneData->storyProgress); if (gGameStatusPtr->nextDemoScene == 0) { set_map_transition_effect(TRANSITION_END_DEMO_SCENE_WHITE); } else { set_map_transition_effect(TRANSITION_END_DEMO_SCENE_BLACK); } set_game_mode(GAME_MODE_ENTER_DEMO_WORLD); break; case DEMO_SCENE_PEACH: get_map_IDs_by_name(demoSceneData->mapName, &areaID, &mapID); gGameStatusPtr->areaID = areaID; gGameStatusPtr->mapID = mapID; gGameStatusPtr->entryID = demoSceneData->index; gGameStatusPtr->peachFlags = PEACH_STATUS_FLAG_IS_PEACH; playerData->currentPartner = demoSceneData->partnerID; set_cam_viewport(0, 29, 20, -262, 177); evt_set_variable(NULL, GB_StoryProgress, demoSceneData->storyProgress); if (gGameStatusPtr->nextDemoScene == 0) { set_map_transition_effect(TRANSITION_END_DEMO_SCENE_WHITE); } else { set_map_transition_effect(TRANSITION_END_DEMO_SCENE_BLACK); } set_game_mode(GAME_MODE_ENTER_DEMO_WORLD); break; case DEMO_SCENE_BATTLE: load_demo_battle(demoSceneData->index); break; } gGameStatusPtr->nextDemoScene++; if (gGameStatusPtr->nextDemoScene > LAST_DEMO_SCENE_IDX) { gGameStatusPtr->nextDemoScene = LAST_DEMO_SCENE_IDX; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel water_block_update /* 3B5E2C E00B413C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 3B5E30 E00B4140 AFB20020 */ sw $s2, 0x20($sp) /* 3B5E34 E00B4144 0080902D */ daddu $s2, $a0, $zero /* 3B5E38 E00B4148 AFBF0024 */ sw $ra, 0x24($sp) /* 3B5E3C E00B414C AFB1001C */ sw $s1, 0x1C($sp) /* 3B5E40 E00B4150 AFB00018 */ sw $s0, 0x18($sp) /* 3B5E44 E00B4154 F7BA0040 */ sdc1 $f26, 0x40($sp) /* 3B5E48 E00B4158 F7B80038 */ sdc1 $f24, 0x38($sp) /* 3B5E4C E00B415C F7B60030 */ sdc1 $f22, 0x30($sp) /* 3B5E50 E00B4160 F7B40028 */ sdc1 $f20, 0x28($sp) /* 3B5E54 E00B4164 8E430000 */ lw $v1, 0x0($s2) /* 3B5E58 E00B4168 8E51000C */ lw $s1, 0xC($s2) /* 3B5E5C E00B416C 30620010 */ andi $v0, $v1, 0x10 /* 3B5E60 E00B4170 8E240000 */ lw $a0, 0x0($s1) /* 3B5E64 E00B4174 1040000B */ beqz $v0, .LE00B41A4 /* 3B5E68 E00B4178 24020001 */ addiu $v0, $zero, 0x1 /* 3B5E6C E00B417C 14820005 */ bne $a0, $v0, .LE00B4194 /* 3B5E70 E00B4180 2402FFEF */ addiu $v0, $zero, -0x11 /* 3B5E74 E00B4184 00621024 */ and $v0, $v1, $v0 /* 3B5E78 E00B4188 AE420000 */ sw $v0, 0x0($s2) /* 3B5E7C E00B418C 0802D068 */ j .LE00B41A0 /* 3B5E80 E00B4190 24020004 */ addiu $v0, $zero, 0x4 .LE00B4194: /* 3B5E84 E00B4194 00621024 */ and $v0, $v1, $v0 /* 3B5E88 E00B4198 AE420000 */ sw $v0, 0x0($s2) /* 3B5E8C E00B419C 24020010 */ addiu $v0, $zero, 0x10 .LE00B41A0: /* 3B5E90 E00B41A0 AE220010 */ sw $v0, 0x10($s1) .LE00B41A4: /* 3B5E94 E00B41A4 8E230010 */ lw $v1, 0x10($s1) /* 3B5E98 E00B41A8 286203E8 */ slti $v0, $v1, 0x3E8 /* 3B5E9C E00B41AC 10400002 */ beqz $v0, .LE00B41B8 /* 3B5EA0 E00B41B0 2462FFFF */ addiu $v0, $v1, -0x1 /* 3B5EA4 E00B41B4 AE220010 */ sw $v0, 0x10($s1) .LE00B41B8: /* 3B5EA8 E00B41B8 3C030004 */ lui $v1, (0x4F1A0 >> 16) /* 3B5EAC E00B41BC 8E220014 */ lw $v0, 0x14($s1) /* 3B5EB0 E00B41C0 3463F1A0 */ ori $v1, $v1, (0x4F1A0 & 0xFFFF) /* 3B5EB4 E00B41C4 24420001 */ addiu $v0, $v0, 0x1 /* 3B5EB8 E00B41C8 0062182A */ slt $v1, $v1, $v0 /* 3B5EBC E00B41CC 10600003 */ beqz $v1, .LE00B41DC /* 3B5EC0 E00B41D0 AE220014 */ sw $v0, 0x14($s1) /* 3B5EC4 E00B41D4 24020100 */ addiu $v0, $zero, 0x100 /* 3B5EC8 E00B41D8 AE220014 */ sw $v0, 0x14($s1) .LE00B41DC: /* 3B5ECC E00B41DC 8E230010 */ lw $v1, 0x10($s1) /* 3B5ED0 E00B41E0 04610020 */ bgez $v1, .LE00B4264 /* 3B5ED4 E00B41E4 24020001 */ addiu $v0, $zero, 0x1 /* 3B5ED8 E00B41E8 1482001A */ bne $a0, $v0, .LE00B4254 /* 3B5EDC E00B41EC 00000000 */ nop /* 3B5EE0 E00B41F0 0C080150 */ jal shim_load_effect /* 3B5EE4 E00B41F4 2404005F */ addiu $a0, $zero, 0x5F /* 3B5EE8 E00B41F8 C6200008 */ lwc1 $f0, 0x8($s1) /* 3B5EEC E00B41FC 3C0141C0 */ lui $at, (0x41C00000 >> 16) /* 3B5EF0 E00B4200 4481B000 */ mtc1 $at, $f22 /* 3B5EF4 E00B4204 3C014000 */ lui $at, (0x40000000 >> 16) /* 3B5EF8 E00B4208 4481A000 */ mtc1 $at, $f20 /* 3B5EFC E00B420C 2410001E */ addiu $s0, $zero, 0x1E /* 3B5F00 E00B4210 AFB00014 */ sw $s0, 0x14($sp) /* 3B5F04 E00B4214 46160000 */ add.s $f0, $f0, $f22 /* 3B5F08 E00B4218 E7B40010 */ swc1 $f20, 0x10($sp) /* 3B5F0C E00B421C 8E250004 */ lw $a1, 0x4($s1) /* 3B5F10 E00B4220 8E27000C */ lw $a3, 0xC($s1) /* 3B5F14 E00B4224 44060000 */ mfc1 $a2, $f0 /* 3B5F18 E00B4228 0C02F800 */ jal water_splash_main /* 3B5F1C E00B422C 0000202D */ daddu $a0, $zero, $zero /* 3B5F20 E00B4230 C6200008 */ lwc1 $f0, 0x8($s1) /* 3B5F24 E00B4234 E7B40010 */ swc1 $f20, 0x10($sp) /* 3B5F28 E00B4238 AFB00014 */ sw $s0, 0x14($sp) /* 3B5F2C E00B423C 46160000 */ add.s $f0, $f0, $f22 /* 3B5F30 E00B4240 8E250004 */ lw $a1, 0x4($s1) /* 3B5F34 E00B4244 8E27000C */ lw $a3, 0xC($s1) /* 3B5F38 E00B4248 44060000 */ mfc1 $a2, $f0 /* 3B5F3C E00B424C 0C02F800 */ jal water_splash_main /* 3B5F40 E00B4250 24040001 */ addiu $a0, $zero, 0x1 .LE00B4254: /* 3B5F44 E00B4254 0C080128 */ jal shim_remove_effect /* 3B5F48 E00B4258 0240202D */ daddu $a0, $s2, $zero /* 3B5F4C E00B425C 0802D141 */ j .LE00B4504 /* 3B5F50 E00B4260 00000000 */ nop .LE00B4264: /* 3B5F54 E00B4264 8E300014 */ lw $s0, 0x14($s1) /* 3B5F58 E00B4268 1480000B */ bnez $a0, .LE00B4298 /* 3B5F5C E00B426C 2A020004 */ slti $v0, $s0, 0x4 /* 3B5F60 E00B4270 28620010 */ slti $v0, $v1, 0x10 /* 3B5F64 E00B4274 10400003 */ beqz $v0, .LE00B4284 /* 3B5F68 E00B4278 00031100 */ sll $v0, $v1, 4 /* 3B5F6C E00B427C AE220024 */ sw $v0, 0x24($s1) /* 3B5F70 E00B4280 AE220028 */ sw $v0, 0x28($s1) .LE00B4284: /* 3B5F74 E00B4284 2A020010 */ slti $v0, $s0, 0x10 /* 3B5F78 E00B4288 10400008 */ beqz $v0, .LE00B42AC /* 3B5F7C E00B428C 00101100 */ sll $v0, $s0, 4 /* 3B5F80 E00B4290 0802D0A9 */ j .LE00B42A4 /* 3B5F84 E00B4294 2442000F */ addiu $v0, $v0, 0xF .LE00B4298: /* 3B5F88 E00B4298 10400004 */ beqz $v0, .LE00B42AC /* 3B5F8C E00B429C 00101180 */ sll $v0, $s0, 6 /* 3B5F90 E00B42A0 2442003F */ addiu $v0, $v0, 0x3F .LE00B42A4: /* 3B5F94 E00B42A4 AE220024 */ sw $v0, 0x24($s1) /* 3B5F98 E00B42A8 AE220028 */ sw $v0, 0x28($s1) .LE00B42AC: /* 3B5F9C E00B42AC 00101040 */ sll $v0, $s0, 1 /* 3B5FA0 E00B42B0 00501021 */ addu $v0, $v0, $s0 /* 3B5FA4 E00B42B4 00021040 */ sll $v0, $v0, 1 /* 3B5FA8 E00B42B8 00501021 */ addu $v0, $v0, $s0 /* 3B5FAC E00B42BC 44826000 */ mtc1 $v0, $f12 /* 3B5FB0 E00B42C0 00000000 */ nop /* 3B5FB4 E00B42C4 0C080140 */ jal shim_sin_deg /* 3B5FB8 E00B42C8 46806320 */ cvt.s.w $f12, $f12 /* 3B5FBC E00B42CC 4490A000 */ mtc1 $s0, $f20 /* 3B5FC0 E00B42D0 00000000 */ nop /* 3B5FC4 E00B42D4 4680A520 */ cvt.s.w $f20, $f20 /* 3B5FC8 E00B42D8 3C01E00B */ lui $at, (0xE00B4ED0 >> 16) /* 3B5FCC E00B42DC D4224ED0 */ ldc1 $f2, (0xE00B4ED0 & 0xFFFF)($at) /* 3B5FD0 E00B42E0 4600A521 */ cvt.d.s $f20, $f20 /* 3B5FD4 E00B42E4 4622A502 */ mul.d $f20, $f20, $f2 /* 3B5FD8 E00B42E8 00000000 */ nop /* 3B5FDC E00B42EC 3C014200 */ lui $at, (0x42000000 >> 16) /* 3B5FE0 E00B42F0 4481C000 */ mtc1 $at, $f24 /* 3B5FE4 E00B42F4 00000000 */ nop /* 3B5FE8 E00B42F8 46180002 */ mul.s $f0, $f0, $f24 /* 3B5FEC E00B42FC 00000000 */ nop /* 3B5FF0 E00B4300 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 3B5FF4 E00B4304 44816000 */ mtc1 $at, $f12 /* 3B5FF8 E00B4308 4620A520 */ cvt.s.d $f20, $f20 /* 3B5FFC E00B430C 460CA302 */ mul.s $f12, $f20, $f12 /* 3B6000 E00B4310 00000000 */ nop /* 3B6004 E00B4314 3C0142FE */ lui $at, (0x42FE0000 >> 16) /* 3B6008 E00B4318 44811000 */ mtc1 $at, $f2 /* 3B600C E00B431C 00000000 */ nop /* 3B6010 E00B4320 46020000 */ add.s $f0, $f0, $f2 /* 3B6014 E00B4324 4600038D */ trunc.w.s $f14, $f0 /* 3B6018 E00B4328 0C080140 */ jal shim_sin_deg /* 3B601C E00B432C E62E001C */ swc1 $f14, 0x1C($s1) /* 3B6020 E00B4330 4600A306 */ mov.s $f12, $f20 /* 3B6024 E00B4334 0C080140 */ jal shim_sin_deg /* 3B6028 E00B4338 46000586 */ mov.s $f22, $f0 /* 3B602C E00B433C 4614A300 */ add.s $f12, $f20, $f20 /* 3B6030 E00B4340 0C080144 */ jal shim_cos_deg /* 3B6034 E00B4344 46000686 */ mov.s $f26, $f0 /* 3B6038 E00B4348 4600A306 */ mov.s $f12, $f20 /* 3B603C E00B434C 0C080144 */ jal shim_cos_deg /* 3B6040 E00B4350 46000506 */ mov.s $f20, $f0 /* 3B6044 E00B4354 4618B582 */ mul.s $f22, $f22, $f24 /* 3B6048 E00B4358 00000000 */ nop /* 3B604C E00B435C 4618A502 */ mul.s $f20, $f20, $f24 /* 3B6050 E00B4360 00000000 */ nop /* 3B6054 E00B4364 46180002 */ mul.s $f0, $f0, $f24 /* 3B6058 E00B4368 00000000 */ nop /* 3B605C E00B436C 461AB582 */ mul.s $f22, $f22, $f26 /* 3B6060 E00B4370 00000000 */ nop /* 3B6064 E00B4374 3C014380 */ lui $at, (0x43800000 >> 16) /* 3B6068 E00B4378 44811000 */ mtc1 $at, $f2 /* 3B606C E00B437C 00000000 */ nop /* 3B6070 E00B4380 4602B580 */ add.s $f22, $f22, $f2 /* 3B6074 E00B4384 C6220034 */ lwc1 $f2, 0x34($s1) /* 3B6078 E00B4388 3C01E00B */ lui $at, (0xE00B4ED8 >> 16) /* 3B607C E00B438C D4244ED8 */ ldc1 $f4, (0xE00B4ED8 & 0xFFFF)($at) /* 3B6080 E00B4390 460010A1 */ cvt.d.s $f2, $f2 /* 3B6084 E00B4394 46241080 */ add.d $f2, $f2, $f4 /* 3B6088 E00B4398 4614B580 */ add.s $f22, $f22, $f20 /* 3B608C E00B439C 3C014300 */ lui $at, (0x43000000 >> 16) /* 3B6090 E00B43A0 44812000 */ mtc1 $at, $f4 /* 3B6094 E00B43A4 4600B580 */ add.s $f22, $f22, $f0 /* 3B6098 E00B43A8 462010A0 */ cvt.s.d $f2, $f2 /* 3B609C E00B43AC E6220034 */ swc1 $f2, 0x34($s1) /* 3B60A0 E00B43B0 4602203E */ c.le.s $f4, $f2 /* 3B60A4 E00B43B4 00000000 */ nop /* 3B60A8 E00B43B8 45000002 */ bc1f .LE00B43C4 /* 3B60AC E00B43BC E6360030 */ swc1 $f22, 0x30($s1) /* 3B60B0 E00B43C0 AE200034 */ sw $zero, 0x34($s1) .LE00B43C4: /* 3B60B4 E00B43C4 0000902D */ daddu $s2, $zero, $zero /* 3B60B8 E00B43C8 0220802D */ daddu $s0, $s1, $zero .LE00B43CC: /* 3B60BC E00B43CC 8E020088 */ lw $v0, 0x88($s0) /* 3B60C0 E00B43D0 24420001 */ addiu $v0, $v0, 0x1 /* 3B60C4 E00B43D4 04400047 */ bltz $v0, .LE00B44F4 /* 3B60C8 E00B43D8 AE020088 */ sw $v0, 0x88($s0) /* 3B60CC E00B43DC 1440001E */ bnez $v0, .LE00B4458 /* 3B60D0 E00B43E0 2404000A */ addiu $a0, $zero, 0xA /* 3B60D4 E00B43E4 3C014370 */ lui $at, (0x43700000 >> 16) /* 3B60D8 E00B43E8 44810000 */ mtc1 $at, $f0 /* 3B60DC E00B43EC AE000038 */ sw $zero, 0x38($s0) /* 3B60E0 E00B43F0 0C080138 */ jal shim_rand_int /* 3B60E4 E00B43F4 E6000048 */ swc1 $f0, 0x48($s0) /* 3B60E8 E00B43F8 2442FFFB */ addiu $v0, $v0, -0x5 /* 3B60EC E00B43FC 3C01E00B */ lui $at, (0xE00B4EE0 >> 16) /* 3B60F0 E00B4400 D4224EE0 */ ldc1 $f2, (0xE00B4EE0 & 0xFFFF)($at) /* 3B60F4 E00B4404 44820000 */ mtc1 $v0, $f0 /* 3B60F8 E00B4408 00000000 */ nop /* 3B60FC E00B440C 46800021 */ cvt.d.w $f0, $f0 /* 3B6100 E00B4410 46220002 */ mul.d $f0, $f0, $f2 /* 3B6104 E00B4414 00000000 */ nop /* 3B6108 E00B4418 2404000A */ addiu $a0, $zero, 0xA /* 3B610C E00B441C 46200020 */ cvt.s.d $f0, $f0 /* 3B6110 E00B4420 0C080138 */ jal shim_rand_int /* 3B6114 E00B4424 E6000058 */ swc1 $f0, 0x58($s0) /* 3B6118 E00B4428 2404000A */ addiu $a0, $zero, 0xA /* 3B611C E00B442C 24420002 */ addiu $v0, $v0, 0x2 /* 3B6120 E00B4430 44820000 */ mtc1 $v0, $f0 /* 3B6124 E00B4434 00000000 */ nop /* 3B6128 E00B4438 46800020 */ cvt.s.w $f0, $f0 /* 3B612C E00B443C 0C080138 */ jal shim_rand_int /* 3B6130 E00B4440 E6000068 */ swc1 $f0, 0x68($s0) /* 3B6134 E00B4444 24420001 */ addiu $v0, $v0, 0x1 /* 3B6138 E00B4448 44820000 */ mtc1 $v0, $f0 /* 3B613C E00B444C 00000000 */ nop /* 3B6140 E00B4450 46800020 */ cvt.s.w $f0, $f0 /* 3B6144 E00B4454 E6000078 */ swc1 $f0, 0x78($s0) .LE00B4458: /* 3B6148 E00B4458 C6060058 */ lwc1 $f6, 0x58($s0) /* 3B614C E00B445C 3C01E00B */ lui $at, (0xE00B4EE8 >> 16) /* 3B6150 E00B4460 D4204EE8 */ ldc1 $f0, (0xE00B4EE8 & 0xFFFF)($at) /* 3B6154 E00B4464 460031A1 */ cvt.d.s $f6, $f6 /* 3B6158 E00B4468 46203182 */ mul.d $f6, $f6, $f0 /* 3B615C E00B446C 00000000 */ nop /* 3B6160 E00B4470 C6040068 */ lwc1 $f4, 0x68($s0) /* 3B6164 E00B4474 3C014120 */ lui $at, (0x41200000 >> 16) /* 3B6168 E00B4478 44811000 */ mtc1 $at, $f2 /* 3B616C E00B447C 00000000 */ nop /* 3B6170 E00B4480 46041081 */ sub.s $f2, $f2, $f4 /* 3B6174 E00B4484 3C01E00B */ lui $at, (0xE00B4EF0 >> 16) /* 3B6178 E00B4488 D4204EF0 */ ldc1 $f0, (0xE00B4EF0 & 0xFFFF)($at) /* 3B617C E00B448C 460010A1 */ cvt.d.s $f2, $f2 /* 3B6180 E00B4490 46201082 */ mul.d $f2, $f2, $f0 /* 3B6184 E00B4494 00000000 */ nop /* 3B6188 E00B4498 C6080048 */ lwc1 $f8, 0x48($s0) /* 3B618C E00B449C C60A0058 */ lwc1 $f10, 0x58($s0) /* 3B6190 E00B44A0 46002006 */ mov.s $f0, $f4 /* 3B6194 E00B44A4 46004200 */ add.s $f8, $f8, $f0 /* 3B6198 E00B44A8 C6000038 */ lwc1 $f0, 0x38($s0) /* 3B619C E00B44AC 460A0000 */ add.s $f0, $f0, $f10 /* 3B61A0 E00B44B0 E6080048 */ swc1 $f8, 0x48($s0) /* 3B61A4 E00B44B4 46004286 */ mov.s $f10, $f8 /* 3B61A8 E00B44B8 3C0143F0 */ lui $at, (0x43F00000 >> 16) /* 3B61AC E00B44BC 44814000 */ mtc1 $at, $f8 /* 3B61B0 E00B44C0 46002121 */ cvt.d.s $f4, $f4 /* 3B61B4 E00B44C4 460A403C */ c.lt.s $f8, $f10 /* 3B61B8 E00B44C8 E6000038 */ swc1 $f0, 0x38($s0) /* 3B61BC E00B44CC 46222100 */ add.d $f4, $f4, $f2 /* 3B61C0 E00B44D0 462031A0 */ cvt.s.d $f6, $f6 /* 3B61C4 E00B44D4 E6060058 */ swc1 $f6, 0x58($s0) /* 3B61C8 E00B44D8 46202120 */ cvt.s.d $f4, $f4 /* 3B61CC E00B44DC 45000005 */ bc1f .LE00B44F4 /* 3B61D0 E00B44E0 E6040068 */ swc1 $f4, 0x68($s0) /* 3B61D4 E00B44E4 0C080138 */ jal shim_rand_int /* 3B61D8 E00B44E8 2404000A */ addiu $a0, $zero, 0xA /* 3B61DC E00B44EC 00021027 */ nor $v0, $zero, $v0 /* 3B61E0 E00B44F0 AE020088 */ sw $v0, 0x88($s0) .LE00B44F4: /* 3B61E4 E00B44F4 26520001 */ addiu $s2, $s2, 0x1 /* 3B61E8 E00B44F8 2A420004 */ slti $v0, $s2, 0x4 /* 3B61EC E00B44FC 1440FFB3 */ bnez $v0, .LE00B43CC /* 3B61F0 E00B4500 26100004 */ addiu $s0, $s0, 0x4 .LE00B4504: /* 3B61F4 E00B4504 8FBF0024 */ lw $ra, 0x24($sp) /* 3B61F8 E00B4508 8FB20020 */ lw $s2, 0x20($sp) /* 3B61FC E00B450C 8FB1001C */ lw $s1, 0x1C($sp) /* 3B6200 E00B4510 8FB00018 */ lw $s0, 0x18($sp) /* 3B6204 E00B4514 D7BA0040 */ ldc1 $f26, 0x40($sp) /* 3B6208 E00B4518 D7B80038 */ ldc1 $f24, 0x38($sp) /* 3B620C E00B451C D7B60030 */ ldc1 $f22, 0x30($sp) /* 3B6210 E00B4520 D7B40028 */ ldc1 $f20, 0x28($sp) /* 3B6214 E00B4524 03E00008 */ jr $ra /* 3B6218 E00B4528 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void water_block_update(EffectInstance* effect) { WaterBlockFXData *data; f32 temp_f20; s32 temp_a0; s32 temp_s0; s32 temp_v1_3; s32 i; data = effect->data.waterBlock; temp_a0 = data->unk_00; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { if (temp_a0 == 1) { effect->flags = effect->flags & ~FX_INSTANCE_FLAG_DISMISS; data->unk_10 = 4; } else { effect->flags = effect->flags & ~FX_INSTANCE_FLAG_DISMISS; data->unk_10 = 16; } } if (data->unk_10 < 1000) { data->unk_10--; } data->unk_14++; if (data->unk_14 > 324000) { data->unk_14 = 256; } temp_v1_3 = data->unk_10; if (temp_v1_3 < 0) { if (temp_a0 == 1) { shim_load_effect(EFFECT_WATER_SPLASH); water_splash_main(0, data->pos.x, data->pos.y + 24.0f, data->pos.z, 2.0f, 0x1E); water_splash_main(1, data->pos.x, data->pos.y + 24.0f, data->pos.z, 2.0f, 0x1E); } shim_remove_effect(effect); return; } temp_s0 = data->unk_14; if (temp_a0 == 0) { if (temp_v1_3 < 16) { data->unk_24 = temp_v1_3 * 16; data->unk_28 = temp_v1_3 * 16; } if (temp_s0 < 16) { data->unk_24 = (temp_s0 * 16) + 15; data->unk_28 = (temp_s0 * 16) + 15; } } else if (temp_s0 < 4) { data->unk_24 = (temp_s0 * 64) + 63; data->unk_28 = (temp_s0 * 64) + 63; } data->unk_1C = shim_sin_deg((temp_s0 * 6) + temp_s0) * 32.0f + 127.0f; temp_f20 = (f32)temp_s0 * 0.01; data->unk_30 = (shim_sin_deg(temp_f20 * 6.0f) * 32.0f * shim_sin_deg(temp_f20)) + 256.0f + (shim_cos_deg(2.0f * temp_f20) * 32.0f) + (shim_cos_deg(temp_f20) * 32.0f); data->unk_34 += 0.2; if (data->unk_34 >= 128.0f) { data->unk_34 = 0.0f; } for (i = 0; i < NUM_WATER_BLOCK_COMPONENTS; i++) { data->unk_88[i]++; if (data->unk_88[i] >= 0) { if (data->unk_88[i] == 0) { data->unk_38[i] = 0.0f; data->unk_48[i] = 240.0f; data->unk_58[i] = (shim_rand_int(10) - 5) * 0.2; data->unk_68[i] = shim_rand_int(10) + 2; data->unk_78[i] = shim_rand_int(10) + 1; } data->unk_48[i] += data->unk_68[i]; data->unk_38[i] += data->unk_58[i]; data->unk_58[i] *= 0.97; data->unk_68[i] += (10.0f - data->unk_68[i]) * 0.1; if (data->unk_48[i] > 480.0f) { data->unk_88[i] = ~shim_rand_int(10); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel imgfx_mesh_make_strip /* D2388 8013BC88 0080C02D */ daddu $t8, $a0, $zero /* D238C 8013BC8C 3C068015 */ lui $a2, %hi(ImgFXCurrentTexturePtr) /* D2390 8013BC90 24C6EE10 */ addiu $a2, $a2, %lo(ImgFXCurrentTexturePtr) /* D2394 8013BC94 8CC40000 */ lw $a0, 0x0($a2) /* D2398 8013BC98 94830008 */ lhu $v1, 0x8($a0) /* D239C 8013BC9C 24021000 */ addiu $v0, $zero, 0x1000 /* D23A0 8013BCA0 14600002 */ bnez $v1, .L8013BCAC /* D23A4 8013BCA4 0043001A */ div $zero, $v0, $v1 /* D23A8 8013BCA8 0007000D */ break 7 .L8013BCAC: /* D23AC 8013BCAC 2401FFFF */ addiu $at, $zero, -0x1 /* D23B0 8013BCB0 14610004 */ bne $v1, $at, .L8013BCC4 /* D23B4 8013BCB4 3C018000 */ lui $at, (0x80000000 >> 16) /* D23B8 8013BCB8 14410002 */ bne $v0, $at, .L8013BCC4 /* D23BC 8013BCBC 00000000 */ nop /* D23C0 8013BCC0 0006000D */ break 6 .L8013BCC4: /* D23C4 8013BCC4 00006812 */ mflo $t5 /* D23C8 8013BCC8 9483000A */ lhu $v1, 0xA($a0) /* D23CC 8013BCCC 006D102A */ slt $v0, $v1, $t5 /* D23D0 8013BCD0 54400001 */ bnel $v0, $zero, .L8013BCD8 /* D23D4 8013BCD4 0060682D */ daddu $t5, $v1, $zero .L8013BCD8: /* D23D8 8013BCD8 01A0502D */ daddu $t2, $t5, $zero /* D23DC 8013BCDC 00C0782D */ daddu $t7, $a2, $zero /* D23E0 8013BCE0 3C028015 */ lui $v0, %hi(imgfx_vtxCount) /* D23E4 8013BCE4 2442EE14 */ addiu $v0, $v0, %lo(imgfx_vtxCount) /* D23E8 8013BCE8 0040482D */ daddu $t1, $v0, $zero /* D23EC 8013BCEC 3C068015 */ lui $a2, %hi(imgfx_vtxBuf) /* D23F0 8013BCF0 24C66950 */ addiu $a2, $a2, %lo(imgfx_vtxBuf) /* D23F4 8013BCF4 24072000 */ addiu $a3, $zero, 0x2000 /* D23F8 8013BCF8 00C0602D */ daddu $t4, $a2, $zero /* D23FC 8013BCFC 8488000E */ lh $t0, 0xE($a0) /* D2400 8013BD00 848E000C */ lh $t6, 0xC($a0) /* D2404 8013BD04 94430000 */ lhu $v1, 0x0($v0) /* D2408 8013BD08 00E0C82D */ daddu $t9, $a3, $zero /* D240C 8013BD0C A7030008 */ sh $v1, 0x8($t8) /* D2410 8013BD10 95220000 */ lhu $v0, 0x0($t1) /* D2414 8013BD14 8CC50000 */ lw $a1, 0x0($a2) /* D2418 8013BD18 95230000 */ lhu $v1, 0x0($t1) /* D241C 8013BD1C 00021100 */ sll $v0, $v0, 4 /* D2420 8013BD20 00451021 */ addu $v0, $v0, $a1 /* D2424 8013BD24 00031900 */ sll $v1, $v1, 4 /* D2428 8013BD28 A44E0000 */ sh $t6, 0x0($v0) /* D242C 8013BD2C 95220000 */ lhu $v0, 0x0($t1) /* D2430 8013BD30 00651821 */ addu $v1, $v1, $a1 /* D2434 8013BD34 A4680002 */ sh $t0, 0x2($v1) /* D2438 8013BD38 95230000 */ lhu $v1, 0x0($t1) /* D243C 8013BD3C 00021100 */ sll $v0, $v0, 4 /* D2440 8013BD40 00451021 */ addu $v0, $v0, $a1 /* D2444 8013BD44 00031900 */ sll $v1, $v1, 4 /* D2448 8013BD48 00651821 */ addu $v1, $v1, $a1 /* D244C 8013BD4C A4400004 */ sh $zero, 0x4($v0) /* D2450 8013BD50 95240000 */ lhu $a0, 0x0($t1) /* D2454 8013BD54 24022000 */ addiu $v0, $zero, 0x2000 /* D2458 8013BD58 A4620008 */ sh $v0, 0x8($v1) /* D245C 8013BD5C 95220000 */ lhu $v0, 0x0($t1) /* D2460 8013BD60 00042100 */ sll $a0, $a0, 4 /* D2464 8013BD64 00852021 */ addu $a0, $a0, $a1 /* D2468 8013BD68 00021100 */ sll $v0, $v0, 4 /* D246C 8013BD6C 00451021 */ addu $v0, $v0, $a1 /* D2470 8013BD70 A487000A */ sh $a3, 0xA($a0) /* D2474 8013BD74 240400F0 */ addiu $a0, $zero, 0xF0 /* D2478 8013BD78 A044000C */ sb $a0, 0xC($v0) /* D247C 8013BD7C 95220000 */ lhu $v0, 0x0($t1) /* D2480 8013BD80 8CC30000 */ lw $v1, 0x0($a2) /* D2484 8013BD84 00021100 */ sll $v0, $v0, 4 /* D2488 8013BD88 00431021 */ addu $v0, $v0, $v1 /* D248C 8013BD8C A044000D */ sb $a0, 0xD($v0) /* D2490 8013BD90 95220000 */ lhu $v0, 0x0($t1) /* D2494 8013BD94 8CC30000 */ lw $v1, 0x0($a2) /* D2498 8013BD98 00021100 */ sll $v0, $v0, 4 /* D249C 8013BD9C 00431021 */ addu $v0, $v0, $v1 /* D24A0 8013BDA0 A044000E */ sb $a0, 0xE($v0) /* D24A4 8013BDA4 95240000 */ lhu $a0, 0x0($t1) /* D24A8 8013BDA8 8D850000 */ lw $a1, 0x0($t4) /* D24AC 8013BDAC 8DE60000 */ lw $a2, 0x0($t7) /* D24B0 8013BDB0 95230000 */ lhu $v1, 0x0($t1) /* D24B4 8013BDB4 00042100 */ sll $a0, $a0, 4 /* D24B8 8013BDB8 00852021 */ addu $a0, $a0, $a1 /* D24BC 8013BDBC 00031900 */ sll $v1, $v1, 4 /* D24C0 8013BDC0 94C20008 */ lhu $v0, 0x8($a2) /* D24C4 8013BDC4 00651821 */ addu $v1, $v1, $a1 /* D24C8 8013BDC8 004E1021 */ addu $v0, $v0, $t6 /* D24CC 8013BDCC A4820010 */ sh $v0, 0x10($a0) /* D24D0 8013BDD0 95220000 */ lhu $v0, 0x0($t1) /* D24D4 8013BDD4 24040078 */ addiu $a0, $zero, 0x78 /* D24D8 8013BDD8 A4680012 */ sh $t0, 0x12($v1) /* D24DC 8013BDDC 95230000 */ lhu $v1, 0x0($t1) /* D24E0 8013BDE0 00021100 */ sll $v0, $v0, 4 /* D24E4 8013BDE4 00451021 */ addu $v0, $v0, $a1 /* D24E8 8013BDE8 00031900 */ sll $v1, $v1, 4 /* D24EC 8013BDEC A4400014 */ sh $zero, 0x14($v0) /* D24F0 8013BDF0 94C20008 */ lhu $v0, 0x8($a2) /* D24F4 8013BDF4 00651821 */ addu $v1, $v1, $a1 /* D24F8 8013BDF8 24420100 */ addiu $v0, $v0, 0x100 /* D24FC 8013BDFC 00021140 */ sll $v0, $v0, 5 /* D2500 8013BE00 A4620018 */ sh $v0, 0x18($v1) /* D2504 8013BE04 95220000 */ lhu $v0, 0x0($t1) /* D2508 8013BE08 95230000 */ lhu $v1, 0x0($t1) /* D250C 8013BE0C 00021100 */ sll $v0, $v0, 4 /* D2510 8013BE10 00451021 */ addu $v0, $v0, $a1 /* D2514 8013BE14 00031900 */ sll $v1, $v1, 4 /* D2518 8013BE18 00651821 */ addu $v1, $v1, $a1 /* D251C 8013BE1C A447001A */ sh $a3, 0x1A($v0) /* D2520 8013BE20 A064001C */ sb $a0, 0x1C($v1) /* D2524 8013BE24 95220000 */ lhu $v0, 0x0($t1) /* D2528 8013BE28 8D830000 */ lw $v1, 0x0($t4) /* D252C 8013BE2C 00021100 */ sll $v0, $v0, 4 /* D2530 8013BE30 00431021 */ addu $v0, $v0, $v1 /* D2534 8013BE34 A044001D */ sb $a0, 0x1D($v0) /* D2538 8013BE38 95220000 */ lhu $v0, 0x0($t1) /* D253C 8013BE3C 8D830000 */ lw $v1, 0x0($t4) /* D2540 8013BE40 00021100 */ sll $v0, $v0, 4 /* D2544 8013BE44 00431021 */ addu $v0, $v0, $v1 /* D2548 8013BE48 A044001E */ sb $a0, 0x1E($v0) .L8013BE4C: /* D254C 8013BE4C 000A3100 */ sll $a2, $t2, 4 /* D2550 8013BE50 8DE20000 */ lw $v0, 0x0($t7) /* D2554 8013BE54 00CA3023 */ subu $a2, $a2, $t2 /* D2558 8013BE58 9442000A */ lhu $v0, 0xA($v0) /* D255C 8013BE5C 000630C0 */ sll $a2, $a2, 3 /* D2560 8013BE60 14400002 */ bnez $v0, .L8013BE6C /* D2564 8013BE64 00C2001A */ div $zero, $a2, $v0 /* D2568 8013BE68 0007000D */ break 7 .L8013BE6C: /* D256C 8013BE6C 2401FFFF */ addiu $at, $zero, -0x1 /* D2570 8013BE70 14410004 */ bne $v0, $at, .L8013BE84 /* D2574 8013BE74 3C018000 */ lui $at, (0x80000000 >> 16) /* D2578 8013BE78 14C10002 */ bne $a2, $at, .L8013BE84 /* D257C 8013BE7C 00000000 */ nop /* D2580 8013BE80 0006000D */ break 6 .L8013BE84: /* D2584 8013BE84 00003012 */ mflo $a2 /* D2588 8013BE88 010D5823 */ subu $t3, $t0, $t5 /* D258C 8013BE8C 25480100 */ addiu $t0, $t2, 0x100 /* D2590 8013BE90 95220000 */ lhu $v0, 0x0($t1) /* D2594 8013BE94 00084140 */ sll $t0, $t0, 5 /* D2598 8013BE98 24420002 */ addiu $v0, $v0, 0x2 /* D259C 8013BE9C A5220000 */ sh $v0, 0x0($t1) /* D25A0 8013BEA0 3042FFFF */ andi $v0, $v0, 0xFFFF /* D25A4 8013BEA4 00021100 */ sll $v0, $v0, 4 /* D25A8 8013BEA8 8D850000 */ lw $a1, 0x0($t4) /* D25AC 8013BEAC 95230000 */ lhu $v1, 0x0($t1) /* D25B0 8013BEB0 00451021 */ addu $v0, $v0, $a1 /* D25B4 8013BEB4 00031900 */ sll $v1, $v1, 4 /* D25B8 8013BEB8 A44E0000 */ sh $t6, 0x0($v0) /* D25BC 8013BEBC 95220000 */ lhu $v0, 0x0($t1) /* D25C0 8013BEC0 00651821 */ addu $v1, $v1, $a1 /* D25C4 8013BEC4 A46B0002 */ sh $t3, 0x2($v1) /* D25C8 8013BEC8 95230000 */ lhu $v1, 0x0($t1) /* D25CC 8013BECC 00021100 */ sll $v0, $v0, 4 /* D25D0 8013BED0 00451021 */ addu $v0, $v0, $a1 /* D25D4 8013BED4 00031900 */ sll $v1, $v1, 4 /* D25D8 8013BED8 A4400004 */ sh $zero, 0x4($v0) /* D25DC 8013BEDC 95220000 */ lhu $v0, 0x0($t1) /* D25E0 8013BEE0 00651821 */ addu $v1, $v1, $a1 /* D25E4 8013BEE4 A4790008 */ sh $t9, 0x8($v1) /* D25E8 8013BEE8 00021100 */ sll $v0, $v0, 4 /* D25EC 8013BEEC 00451021 */ addu $v0, $v0, $a1 /* D25F0 8013BEF0 A448000A */ sh $t0, 0xA($v0) /* D25F4 8013BEF4 95220000 */ lhu $v0, 0x0($t1) /* D25F8 8013BEF8 00021100 */ sll $v0, $v0, 4 /* D25FC 8013BEFC 00451021 */ addu $v0, $v0, $a1 /* D2600 8013BF00 24C40078 */ addiu $a0, $a2, 0x78 /* D2604 8013BF04 A044000C */ sb $a0, 0xC($v0) /* D2608 8013BF08 95220000 */ lhu $v0, 0x0($t1) /* D260C 8013BF0C 8D830000 */ lw $v1, 0x0($t4) /* D2610 8013BF10 00021100 */ sll $v0, $v0, 4 /* D2614 8013BF14 00431021 */ addu $v0, $v0, $v1 /* D2618 8013BF18 A044000D */ sb $a0, 0xD($v0) /* D261C 8013BF1C 95220000 */ lhu $v0, 0x0($t1) /* D2620 8013BF20 8D830000 */ lw $v1, 0x0($t4) /* D2624 8013BF24 00021100 */ sll $v0, $v0, 4 /* D2628 8013BF28 00431021 */ addu $v0, $v0, $v1 /* D262C 8013BF2C A044000E */ sb $a0, 0xE($v0) /* D2630 8013BF30 95240000 */ lhu $a0, 0x0($t1) /* D2634 8013BF34 8D850000 */ lw $a1, 0x0($t4) /* D2638 8013BF38 8DE70000 */ lw $a3, 0x0($t7) /* D263C 8013BF3C 95230000 */ lhu $v1, 0x0($t1) /* D2640 8013BF40 00042100 */ sll $a0, $a0, 4 /* D2644 8013BF44 00852021 */ addu $a0, $a0, $a1 /* D2648 8013BF48 94E20008 */ lhu $v0, 0x8($a3) /* D264C 8013BF4C 00031900 */ sll $v1, $v1, 4 /* D2650 8013BF50 004E1021 */ addu $v0, $v0, $t6 /* D2654 8013BF54 A4820010 */ sh $v0, 0x10($a0) /* D2658 8013BF58 95220000 */ lhu $v0, 0x0($t1) /* D265C 8013BF5C 00651821 */ addu $v1, $v1, $a1 /* D2660 8013BF60 A46B0012 */ sh $t3, 0x12($v1) /* D2664 8013BF64 95230000 */ lhu $v1, 0x0($t1) /* D2668 8013BF68 00021100 */ sll $v0, $v0, 4 /* D266C 8013BF6C 00451021 */ addu $v0, $v0, $a1 /* D2670 8013BF70 00031900 */ sll $v1, $v1, 4 /* D2674 8013BF74 A4400014 */ sh $zero, 0x14($v0) /* D2678 8013BF78 94E20008 */ lhu $v0, 0x8($a3) /* D267C 8013BF7C 00651821 */ addu $v1, $v1, $a1 /* D2680 8013BF80 24420100 */ addiu $v0, $v0, 0x100 /* D2684 8013BF84 00021140 */ sll $v0, $v0, 5 /* D2688 8013BF88 A4620018 */ sh $v0, 0x18($v1) /* D268C 8013BF8C 95220000 */ lhu $v0, 0x0($t1) /* D2690 8013BF90 95230000 */ lhu $v1, 0x0($t1) /* D2694 8013BF94 00021100 */ sll $v0, $v0, 4 /* D2698 8013BF98 00451021 */ addu $v0, $v0, $a1 /* D269C 8013BF9C 00031900 */ sll $v1, $v1, 4 /* D26A0 8013BFA0 00651821 */ addu $v1, $v1, $a1 /* D26A4 8013BFA4 A448001A */ sh $t0, 0x1A($v0) /* D26A8 8013BFA8 A066001C */ sb $a2, 0x1C($v1) /* D26AC 8013BFAC 95220000 */ lhu $v0, 0x0($t1) /* D26B0 8013BFB0 8D830000 */ lw $v1, 0x0($t4) /* D26B4 8013BFB4 00021100 */ sll $v0, $v0, 4 /* D26B8 8013BFB8 00431021 */ addu $v0, $v0, $v1 /* D26BC 8013BFBC A046001D */ sb $a2, 0x1D($v0) /* D26C0 8013BFC0 95220000 */ lhu $v0, 0x0($t1) /* D26C4 8013BFC4 8D830000 */ lw $v1, 0x0($t4) /* D26C8 8013BFC8 00021100 */ sll $v0, $v0, 4 /* D26CC 8013BFCC 00431021 */ addu $v0, $v0, $v1 /* D26D0 8013BFD0 A046001E */ sb $a2, 0x1E($v0) /* D26D4 8013BFD4 8DE20000 */ lw $v0, 0x0($t7) /* D26D8 8013BFD8 9443000A */ lhu $v1, 0xA($v0) /* D26DC 8013BFDC 15430005 */ bne $t2, $v1, .L8013BFF4 /* D26E0 8013BFE0 014D1021 */ addu $v0, $t2, $t5 /* D26E4 8013BFE4 95220000 */ lhu $v0, 0x0($t1) /* D26E8 8013BFE8 24420002 */ addiu $v0, $v0, 0x2 /* D26EC 8013BFEC 0804F003 */ j .L8013C00C /* D26F0 8013BFF0 A5220000 */ sh $v0, 0x0($t1) .L8013BFF4: /* D26F4 8013BFF4 0062102A */ slt $v0, $v1, $v0 /* D26F8 8013BFF8 10400002 */ beqz $v0, .L8013C004 /* D26FC 8013BFFC 0160402D */ daddu $t0, $t3, $zero /* D2700 8013C000 006A6823 */ subu $t5, $v1, $t2 .L8013C004: /* D2704 8013C004 0804EF93 */ j .L8013BE4C /* D2708 8013C008 014D5021 */ addu $t2, $t2, $t5 .L8013C00C: /* D270C 8013C00C 3C028015 */ lui $v0, %hi(imgfx_vtxCount) /* D2710 8013C010 9442EE14 */ lhu $v0, %lo(imgfx_vtxCount)($v0) /* D2714 8013C014 97040008 */ lhu $a0, 0x8($t8) /* D2718 8013C018 24030001 */ addiu $v1, $zero, 0x1 /* D271C 8013C01C A3030003 */ sb $v1, 0x3($t8) /* D2720 8013C020 2442FFFF */ addiu $v0, $v0, -0x1 /* D2724 8013C024 A702000A */ sh $v0, 0xA($t8) /* D2728 8013C028 3042FFFF */ andi $v0, $v0, 0xFFFF /* D272C 8013C02C 00441023 */ subu $v0, $v0, $a0 /* D2730 8013C030 2442FFFF */ addiu $v0, $v0, -0x1 /* D2734 8013C034 00021FC2 */ srl $v1, $v0, 31 /* D2738 8013C038 00431021 */ addu $v0, $v0, $v1 /* D273C 8013C03C 00021043 */ sra $v0, $v0, 1 /* D2740 8013C040 03E00008 */ jr $ra /* D2744 8013C044 A3020004 */ sb $v0, 0x4($t8) ### DECOMPILED C INSTRUCTIONS: void imgfx_mesh_make_strip(ImgFXState* state) { s32 offsetY; s32 offsetX; s32 stepY; s32 rightColor; s32 leftColor; s32 temp2; s32 nextY; stepY = (128 * 32) / ImgFXCurrentTexturePtr->tex.width; if (stepY > ImgFXCurrentTexturePtr->tex.height) { stepY = ImgFXCurrentTexturePtr->tex.height; } offsetX = ImgFXCurrentTexturePtr->tex.xOffset; offsetY = ImgFXCurrentTexturePtr->tex.yOffset; state->firstVtxIdx = imgfx_vtxCount; // create first pair of vertices to begin the strip // 'left' side imgfx_vtxBuf[imgfx_vtxCount].v.ob[0] = offsetX; imgfx_vtxBuf[imgfx_vtxCount].v.ob[1] = offsetY; imgfx_vtxBuf[imgfx_vtxCount].v.ob[2] = 0; imgfx_vtxBuf[imgfx_vtxCount].v.tc[0] = (0 + 256) * 32; imgfx_vtxBuf[imgfx_vtxCount].v.tc[1] = temp2 = (0 + 256) * 32; // required to match imgfx_vtxBuf[imgfx_vtxCount].v.cn[0] = 240; imgfx_vtxBuf[imgfx_vtxCount].v.cn[1] = 240; imgfx_vtxBuf[imgfx_vtxCount].v.cn[2] = 240; // 'right' side imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[0] = ImgFXCurrentTexturePtr->tex.width + offsetX; imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[1] = offsetY; imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[2] = 0; imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[0] = (ImgFXCurrentTexturePtr->tex.width + 256) * 32; imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[1] = temp2; imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[0] = 120; imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[1] = 120; imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[2] = 120; // create remaining pairs of vertices along the strip nextY = stepY; while (TRUE) { rightColor = (nextY * 120) / ImgFXCurrentTexturePtr->tex.height; leftColor = rightColor + 120; imgfx_vtxCount += 2; // 'left' side imgfx_vtxBuf[imgfx_vtxCount].v.ob[0] = offsetX; imgfx_vtxBuf[imgfx_vtxCount].v.ob[1] = offsetY - stepY; imgfx_vtxBuf[imgfx_vtxCount].v.ob[2] = 0; imgfx_vtxBuf[imgfx_vtxCount].v.tc[0] = (0 + 256) * 32; imgfx_vtxBuf[imgfx_vtxCount].v.tc[1] = (nextY + 256) * 32; imgfx_vtxBuf[imgfx_vtxCount].v.cn[0] = leftColor; imgfx_vtxBuf[imgfx_vtxCount].v.cn[1] = leftColor; imgfx_vtxBuf[imgfx_vtxCount].v.cn[2] = leftColor; // 'right' side imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[0] = ImgFXCurrentTexturePtr->tex.width + offsetX; imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[1] = offsetY - stepY; imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[2] = 0; imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[0] = (ImgFXCurrentTexturePtr->tex.width + 256) * 32; imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[1] = (nextY + 256) * 32; imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[0] = rightColor; imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[1] = rightColor; imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[2] = rightColor; if (nextY != ImgFXCurrentTexturePtr->tex.height) { offsetY -= stepY; if (ImgFXCurrentTexturePtr->tex.height < nextY + stepY) { stepY = ImgFXCurrentTexturePtr->tex.height - nextY; } } else { imgfx_vtxCount += 2; break; } nextY += stepY; } state->lastVtxIdx = imgfx_vtxCount - 1; state->subdivX = 1; state->subdivY = ((state->lastVtxIdx - state->firstVtxIdx) - 1) / 2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel smoke_ring_appendGfx /* 341D48 E002E368 27BDFEF8 */ addiu $sp, $sp, -0x108 /* 341D4C E002E36C AFBE0100 */ sw $fp, 0x100($sp) /* 341D50 E002E370 0080F02D */ daddu $fp, $a0, $zero /* 341D54 E002E374 AFBF0104 */ sw $ra, 0x104($sp) /* 341D58 E002E378 AFB700FC */ sw $s7, 0xFC($sp) /* 341D5C E002E37C AFB600F8 */ sw $s6, 0xF8($sp) /* 341D60 E002E380 AFB500F4 */ sw $s5, 0xF4($sp) /* 341D64 E002E384 AFB400F0 */ sw $s4, 0xF0($sp) /* 341D68 E002E388 AFB300EC */ sw $s3, 0xEC($sp) /* 341D6C E002E38C AFB200E8 */ sw $s2, 0xE8($sp) /* 341D70 E002E390 AFB100E4 */ sw $s1, 0xE4($sp) /* 341D74 E002E394 AFB000E0 */ sw $s0, 0xE0($sp) /* 341D78 E002E398 8FD4000C */ lw $s4, 0xC($fp) /* 341D7C E002E39C 8E820040 */ lw $v0, 0x40($s4) /* 341D80 E002E3A0 3C170900 */ lui $s7, %hi(D_09002B40_40FDD0) /* 341D84 E002E3A4 26F72B40 */ addiu $s7, $s7, %lo(D_09002B40_40FDD0) /* 341D88 E002E3A8 30550007 */ andi $s5, $v0, 0x7 /* 341D8C E002E3AC 30430038 */ andi $v1, $v0, 0x38 /* 341D90 E002E3B0 0003B080 */ sll $s6, $v1, 2 /* 341D94 E002E3B4 96830000 */ lhu $v1, 0x0($s4) /* 341D98 E002E3B8 30420040 */ andi $v0, $v0, 0x40 /* 341D9C E002E3BC 10600003 */ beqz $v1, .LE002E3CC /* 341DA0 E002E3C0 AFA200D8 */ sw $v0, 0xD8($sp) /* 341DA4 E002E3C4 3C170900 */ lui $s7, %hi(D_09002B60_40FDF0) /* 341DA8 E002E3C8 26F72B60 */ addiu $s7, $s7, %lo(D_09002B60_40FDF0) .LE002E3CC: /* 341DAC E002E3CC 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 341DB0 E002E3D0 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 341DB4 E002E3D4 27A40018 */ addiu $a0, $sp, 0x18 /* 341DB8 E002E3D8 3C120001 */ lui $s2, (0x11630 >> 16) /* 341DBC E002E3DC 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 341DC0 E002E3E0 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 341DC4 E002E3E4 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 341DC8 E002E3E8 8E630000 */ lw $v1, 0x0($s3) /* 341DCC E002E3EC 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 341DD0 E002E3F0 0060282D */ daddu $a1, $v1, $zero /* 341DD4 E002E3F4 24630008 */ addiu $v1, $v1, 0x8 /* 341DD8 E002E3F8 AE630000 */ sw $v1, 0x0($s3) /* 341DDC E002E3FC ACA20000 */ sw $v0, 0x0($a1) /* 341DE0 E002E400 ACA00004 */ sw $zero, 0x4($a1) /* 341DE4 E002E404 AC660000 */ sw $a2, 0x0($v1) /* 341DE8 E002E408 8FC50010 */ lw $a1, 0x10($fp) /* 341DEC E002E40C 24620008 */ addiu $v0, $v1, 0x8 /* 341DF0 E002E410 AE620000 */ sw $v0, 0x0($s3) /* 341DF4 E002E414 8CA5001C */ lw $a1, 0x1C($a1) /* 341DF8 E002E418 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 341DFC E002E41C AC620008 */ sw $v0, 0x8($v1) /* 341E00 E002E420 3C020900 */ lui $v0, %hi(D_09002950_40FBE0) /* 341E04 E002E424 24422950 */ addiu $v0, $v0, %lo(D_09002950_40FBE0) /* 341E08 E002E428 AC62000C */ sw $v0, 0xC($v1) /* 341E0C E002E42C 3C028000 */ lui $v0, (0x80000000 >> 16) /* 341E10 E002E430 00A22821 */ addu $a1, $a1, $v0 /* 341E14 E002E434 AC650004 */ sw $a1, 0x4($v1) /* 341E18 E002E438 8E850004 */ lw $a1, 0x4($s4) /* 341E1C E002E43C 8E860008 */ lw $a2, 0x8($s4) /* 341E20 E002E440 8E87000C */ lw $a3, 0xC($s4) /* 341E24 E002E444 24630010 */ addiu $v1, $v1, 0x10 /* 341E28 E002E448 0C080108 */ jal shim_guTranslateF /* 341E2C E002E44C AE630000 */ sw $v1, 0x0($s3) /* 341E30 E002E450 27B00058 */ addiu $s0, $sp, 0x58 /* 341E34 E002E454 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 341E38 E002E458 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 341E3C E002E45C 44800000 */ mtc1 $zero, $f0 /* 341E40 E002E460 00031080 */ sll $v0, $v1, 2 /* 341E44 E002E464 00431021 */ addu $v0, $v0, $v1 /* 341E48 E002E468 00021080 */ sll $v0, $v0, 2 /* 341E4C E002E46C 00431023 */ subu $v0, $v0, $v1 /* 341E50 E002E470 000218C0 */ sll $v1, $v0, 3 /* 341E54 E002E474 00431021 */ addu $v0, $v0, $v1 /* 341E58 E002E478 000210C0 */ sll $v0, $v0, 3 /* 341E5C E002E47C 44060000 */ mfc1 $a2, $f0 /* 341E60 E002E480 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 341E64 E002E484 00220821 */ addu $at, $at, $v0 /* 341E68 E002E488 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 341E6C E002E48C 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 341E70 E002E490 46000007 */ neg.s $f0, $f0 /* 341E74 E002E494 44050000 */ mfc1 $a1, $f0 /* 341E78 E002E498 0200202D */ daddu $a0, $s0, $zero /* 341E7C E002E49C 0C080104 */ jal shim_guRotateF /* 341E80 E002E4A0 AFA60010 */ sw $a2, 0x10($sp) /* 341E84 E002E4A4 0200202D */ daddu $a0, $s0, $zero /* 341E88 E002E4A8 27A50018 */ addiu $a1, $sp, 0x18 /* 341E8C E002E4AC 27B00098 */ addiu $s0, $sp, 0x98 /* 341E90 E002E4B0 0C080114 */ jal shim_guMtxCatF /* 341E94 E002E4B4 0200302D */ daddu $a2, $s0, $zero /* 341E98 E002E4B8 0200202D */ daddu $a0, $s0, $zero /* 341E9C E002E4BC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 341EA0 E002E4C0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 341EA4 E002E4C4 3C11800A */ lui $s1, %hi(gDisplayContext) /* 341EA8 E002E4C8 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 341EAC E002E4CC 96050000 */ lhu $a1, 0x0($s0) /* 341EB0 E002E4D0 8E220000 */ lw $v0, 0x0($s1) /* 341EB4 E002E4D4 00052980 */ sll $a1, $a1, 6 /* 341EB8 E002E4D8 00B22821 */ addu $a1, $a1, $s2 /* 341EBC E002E4DC 0C080118 */ jal shim_guMtxF2L /* 341EC0 E002E4E0 00452821 */ addu $a1, $v0, $a1 /* 341EC4 E002E4E4 3C05EEDC */ lui $a1, (0xEEDCD7A0 >> 16) /* 341EC8 E002E4E8 8E660000 */ lw $a2, 0x0($s3) /* 341ECC E002E4EC 34A5D7A0 */ ori $a1, $a1, (0xEEDCD7A0 & 0xFFFF) /* 341ED0 E002E4F0 00C0202D */ daddu $a0, $a2, $zero /* 341ED4 E002E4F4 24C60008 */ addiu $a2, $a2, 0x8 /* 341ED8 E002E4F8 AE660000 */ sw $a2, 0x0($s3) /* 341EDC E002E4FC 96020000 */ lhu $v0, 0x0($s0) /* 341EE0 E002E500 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 341EE4 E002E504 AC830000 */ sw $v1, 0x0($a0) /* 341EE8 E002E508 24430001 */ addiu $v1, $v0, 0x1 /* 341EEC E002E50C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 341EF0 E002E510 00021180 */ sll $v0, $v0, 6 /* 341EF4 E002E514 A6030000 */ sh $v1, 0x0($s0) /* 341EF8 E002E518 8E230000 */ lw $v1, 0x0($s1) /* 341EFC E002E51C 00521021 */ addu $v0, $v0, $s2 /* 341F00 E002E520 00621821 */ addu $v1, $v1, $v0 /* 341F04 E002E524 24C20008 */ addiu $v0, $a2, 0x8 /* 341F08 E002E528 AC830004 */ sw $v1, 0x4($a0) /* 341F0C E002E52C AE620000 */ sw $v0, 0x0($s3) /* 341F10 E002E530 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 341F14 E002E534 ACC20000 */ sw $v0, 0x0($a2) /* 341F18 E002E538 24C20010 */ addiu $v0, $a2, 0x10 /* 341F1C E002E53C ACC50004 */ sw $a1, 0x4($a2) /* 341F20 E002E540 AE620000 */ sw $v0, 0x0($s3) /* 341F24 E002E544 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 341F28 E002E548 ACC20008 */ sw $v0, 0x8($a2) /* 341F2C E002E54C 24C20018 */ addiu $v0, $a2, 0x18 /* 341F30 E002E550 ACD6000C */ sw $s6, 0xC($a2) /* 341F34 E002E554 AE620000 */ sw $v0, 0x0($s3) /* 341F38 E002E558 001514C0 */ sll $v0, $s5, 19 /* 341F3C E002E55C 3C04F200 */ lui $a0, (0xF2000080 >> 16) /* 341F40 E002E560 00441025 */ or $v0, $v0, $a0 /* 341F44 E002E564 00152940 */ sll $a1, $s5, 5 /* 341F48 E002E568 ACC20010 */ sw $v0, 0x10($a2) /* 341F4C E002E56C 24A2001F */ addiu $v0, $a1, 0x1F /* 341F50 E002E570 00021380 */ sll $v0, $v0, 14 /* 341F54 E002E574 3442007C */ ori $v0, $v0, 0x7C /* 341F58 E002E578 ACC20014 */ sw $v0, 0x14($a2) /* 341F5C E002E57C 8FA800D8 */ lw $t0, 0xD8($sp) /* 341F60 E002E580 1100000E */ beqz $t0, .LE002E5BC /* 341F64 E002E584 24A70020 */ addiu $a3, $a1, 0x20 /* 341F68 E002E588 0080182D */ daddu $v1, $a0, $zero /* 341F6C E002E58C 34630080 */ ori $v1, $v1, (0xF2000080 & 0xFFFF) /* 341F70 E002E590 3C040100 */ lui $a0, (0x10000FC >> 16) /* 341F74 E002E594 348400FC */ ori $a0, $a0, (0x10000FC & 0xFFFF) /* 341F78 E002E598 24C20020 */ addiu $v0, $a2, 0x20 /* 341F7C E002E59C AE620000 */ sw $v0, 0x0($s3) /* 341F80 E002E5A0 00071380 */ sll $v0, $a3, 14 /* 341F84 E002E5A4 00431025 */ or $v0, $v0, $v1 /* 341F88 E002E5A8 ACC20018 */ sw $v0, 0x18($a2) /* 341F8C E002E5AC 24A2003F */ addiu $v0, $a1, 0x3F /* 341F90 E002E5B0 00021380 */ sll $v0, $v0, 14 /* 341F94 E002E5B4 0800B979 */ j .LE002E5E4 /* 341F98 E002E5B8 00441025 */ or $v0, $v0, $a0 .LE002E5BC: /* 341F9C E002E5BC 3C030100 */ lui $v1, (0x100007C >> 16) /* 341FA0 E002E5C0 3463007C */ ori $v1, $v1, (0x100007C & 0xFFFF) /* 341FA4 E002E5C4 24C20020 */ addiu $v0, $a2, 0x20 /* 341FA8 E002E5C8 AE620000 */ sw $v0, 0x0($s3) /* 341FAC E002E5CC 00071380 */ sll $v0, $a3, 14 /* 341FB0 E002E5D0 00441025 */ or $v0, $v0, $a0 /* 341FB4 E002E5D4 ACC20018 */ sw $v0, 0x18($a2) /* 341FB8 E002E5D8 24A2003F */ addiu $v0, $a1, 0x3F /* 341FBC E002E5DC 00021380 */ sll $v0, $v0, 14 /* 341FC0 E002E5E0 00431025 */ or $v0, $v0, $v1 .LE002E5E4: /* 341FC4 E002E5E4 ACC2001C */ sw $v0, 0x1C($a2) /* 341FC8 E002E5E8 8FC20008 */ lw $v0, 0x8($fp) /* 341FCC E002E5EC 24110001 */ addiu $s1, $zero, 0x1 /* 341FD0 E002E5F0 0222102A */ slt $v0, $s1, $v0 /* 341FD4 E002E5F4 10400036 */ beqz $v0, .LE002E6D0 /* 341FD8 E002E5F8 26940044 */ addiu $s4, $s4, 0x44 /* 341FDC E002E5FC 3C16800A */ lui $s6, %hi(gDisplayContext) /* 341FE0 E002E600 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 341FE4 E002E604 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 341FE8 E002E608 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 341FEC E002E60C 3C130001 */ lui $s3, (0x11630 >> 16) /* 341FF0 E002E610 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 341FF4 E002E614 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 341FF8 E002E618 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 341FFC E002E61C 2690000C */ addiu $s0, $s4, 0xC .LE002E620: /* 342000 E002E620 27A40018 */ addiu $a0, $sp, 0x18 /* 342004 E002E624 26310001 */ addiu $s1, $s1, 0x1 /* 342008 E002E628 8E05FFF8 */ lw $a1, -0x8($s0) /* 34200C E002E62C 8E06FFFC */ lw $a2, -0x4($s0) /* 342010 E002E630 8E070000 */ lw $a3, 0x0($s0) /* 342014 E002E634 0C080108 */ jal shim_guTranslateF /* 342018 E002E638 26100044 */ addiu $s0, $s0, 0x44 /* 34201C E002E63C 27A40018 */ addiu $a0, $sp, 0x18 /* 342020 E002E640 96A50000 */ lhu $a1, 0x0($s5) /* 342024 E002E644 8EC20000 */ lw $v0, 0x0($s6) /* 342028 E002E648 00052980 */ sll $a1, $a1, 6 /* 34202C E002E64C 00B32821 */ addu $a1, $a1, $s3 /* 342030 E002E650 0C080118 */ jal shim_guMtxF2L /* 342034 E002E654 00452821 */ addu $a1, $v0, $a1 /* 342038 E002E658 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 34203C E002E65C 8E440000 */ lw $a0, 0x0($s2) /* 342040 E002E660 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 342044 E002E664 0080282D */ daddu $a1, $a0, $zero /* 342048 E002E668 24840008 */ addiu $a0, $a0, 0x8 /* 34204C E002E66C AE440000 */ sw $a0, 0x0($s2) /* 342050 E002E670 96A20000 */ lhu $v0, 0x0($s5) /* 342054 E002E674 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 342058 E002E678 ACA30000 */ sw $v1, 0x0($a1) /* 34205C E002E67C 24430001 */ addiu $v1, $v0, 0x1 /* 342060 E002E680 3042FFFF */ andi $v0, $v0, 0xFFFF /* 342064 E002E684 00021180 */ sll $v0, $v0, 6 /* 342068 E002E688 A6A30000 */ sh $v1, 0x0($s5) /* 34206C E002E68C 8EC30000 */ lw $v1, 0x0($s6) /* 342070 E002E690 00531021 */ addu $v0, $v0, $s3 /* 342074 E002E694 00621821 */ addu $v1, $v1, $v0 /* 342078 E002E698 24820008 */ addiu $v0, $a0, 0x8 /* 34207C E002E69C ACA30004 */ sw $v1, 0x4($a1) /* 342080 E002E6A0 AE420000 */ sw $v0, 0x0($s2) /* 342084 E002E6A4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 342088 E002E6A8 AC820000 */ sw $v0, 0x0($a0) /* 34208C E002E6AC 24020040 */ addiu $v0, $zero, 0x40 /* 342090 E002E6B0 AC970004 */ sw $s7, 0x4($a0) /* 342094 E002E6B4 AC860008 */ sw $a2, 0x8($a0) /* 342098 E002E6B8 AC82000C */ sw $v0, 0xC($a0) /* 34209C E002E6BC 8FC20008 */ lw $v0, 0x8($fp) /* 3420A0 E002E6C0 24840010 */ addiu $a0, $a0, 0x10 /* 3420A4 E002E6C4 0222102A */ slt $v0, $s1, $v0 /* 3420A8 E002E6C8 1440FFD5 */ bnez $v0, .LE002E620 /* 3420AC E002E6CC AE440000 */ sw $a0, 0x0($s2) .LE002E6D0: /* 3420B0 E002E6D0 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 3420B4 E002E6D4 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3420B8 E002E6D8 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3420BC E002E6DC 8C820000 */ lw $v0, 0x0($a0) /* 3420C0 E002E6E0 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 3420C4 E002E6E4 0040282D */ daddu $a1, $v0, $zero /* 3420C8 E002E6E8 24420008 */ addiu $v0, $v0, 0x8 /* 3420CC E002E6EC AC820000 */ sw $v0, 0x0($a0) /* 3420D0 E002E6F0 ACA30000 */ sw $v1, 0x0($a1) /* 3420D4 E002E6F4 24030040 */ addiu $v1, $zero, 0x40 /* 3420D8 E002E6F8 ACA30004 */ sw $v1, 0x4($a1) /* 3420DC E002E6FC 24430008 */ addiu $v1, $v0, 0x8 /* 3420E0 E002E700 AC830000 */ sw $v1, 0x0($a0) /* 3420E4 E002E704 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 3420E8 E002E708 AC430000 */ sw $v1, 0x0($v0) /* 3420EC E002E70C AC400004 */ sw $zero, 0x4($v0) /* 3420F0 E002E710 8FBF0104 */ lw $ra, 0x104($sp) /* 3420F4 E002E714 8FBE0100 */ lw $fp, 0x100($sp) /* 3420F8 E002E718 8FB700FC */ lw $s7, 0xFC($sp) /* 3420FC E002E71C 8FB600F8 */ lw $s6, 0xF8($sp) /* 342100 E002E720 8FB500F4 */ lw $s5, 0xF4($sp) /* 342104 E002E724 8FB400F0 */ lw $s4, 0xF0($sp) /* 342108 E002E728 8FB300EC */ lw $s3, 0xEC($sp) /* 34210C E002E72C 8FB200E8 */ lw $s2, 0xE8($sp) /* 342110 E002E730 8FB100E4 */ lw $s1, 0xE4($sp) /* 342114 E002E734 8FB000E0 */ lw $s0, 0xE0($sp) /* 342118 E002E738 03E00008 */ jr $ra /* 34211C E002E73C 27BD0108 */ addiu $sp, $sp, 0x108 ### DECOMPILED C INSTRUCTIONS: void smoke_ring_appendGfx(void* effect) { SmokeRingFXData* part = ((EffectInstance*)effect)->data.smokeRing; s32 temp_s5 = part->unk_40 & 7; s32 envAlpha = (part->unk_40 & 0x38) * 4; s32 spD8 = part->unk_40 & 0x40; s32 temp_a3; Gfx* dlist; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; s32 i; if (part->unk_00 != 0) { dlist = D_09002B60_32BA00; } else { dlist = D_09002B40_32B9E0; } gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09002950_32B7F0); 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); gDPSetPrimColor(gMainGfxPos++, 0, 0, 238, 220, 215, 160); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (temp_s5 * 32 ) * 4, 0, (temp_s5 * 32 + 0x1F) * 4, 31 * 4); temp_a3 = temp_s5 * 32 + 32; if (spD8 != 0) { gDPSetTileSize(gMainGfxPos++, 1, (temp_a3 ) * 4, 32 * 4, (temp_a3 + 31) * 4, 63 * 4); } else { gDPSetTileSize(gMainGfxPos++, 1, (temp_a3 ) * 4, 0, (temp_a3 + 31) * 4, 31 * 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); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel small_gold_sparkle_appendGfx /* 391FD0 E00922A0 44800000 */ mtc1 $zero, $f0 /* 391FD4 E00922A4 27BDFEE8 */ addiu $sp, $sp, -0x118 /* 391FD8 E00922A8 AFB000E0 */ sw $s0, 0xE0($sp) /* 391FDC E00922AC 27B00098 */ addiu $s0, $sp, 0x98 /* 391FE0 E00922B0 AFA40118 */ sw $a0, 0x118($sp) /* 391FE4 E00922B4 8FA90118 */ lw $t1, 0x118($sp) /* 391FE8 E00922B8 0200202D */ daddu $a0, $s0, $zero /* 391FEC E00922BC AFB100E4 */ sw $s1, 0xE4($sp) /* 391FF0 E00922C0 3C110001 */ lui $s1, (0x11630 >> 16) /* 391FF4 E00922C4 F7B40108 */ sdc1 $f20, 0x108($sp) /* 391FF8 E00922C8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 391FFC E00922CC 4481A000 */ mtc1 $at, $f20 /* 392000 E00922D0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 392004 E00922D4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 392008 E00922D8 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 39200C E00922DC AFBF0104 */ sw $ra, 0x104($sp) /* 392010 E00922E0 AFBE0100 */ sw $fp, 0x100($sp) /* 392014 E00922E4 AFB700FC */ sw $s7, 0xFC($sp) /* 392018 E00922E8 AFB600F8 */ sw $s6, 0xF8($sp) /* 39201C E00922EC AFB500F4 */ sw $s5, 0xF4($sp) /* 392020 E00922F0 AFB400F0 */ sw $s4, 0xF0($sp) /* 392024 E00922F4 AFB300EC */ sw $s3, 0xEC($sp) /* 392028 E00922F8 AFB200E8 */ sw $s2, 0xE8($sp) /* 39202C E00922FC F7B60110 */ sdc1 $f22, 0x110($sp) /* 392030 E0092300 00031080 */ sll $v0, $v1, 2 /* 392034 E0092304 00431021 */ addu $v0, $v0, $v1 /* 392038 E0092308 00021080 */ sll $v0, $v0, 2 /* 39203C E009230C 00431023 */ subu $v0, $v0, $v1 /* 392040 E0092310 000218C0 */ sll $v1, $v0, 3 /* 392044 E0092314 00431021 */ addu $v0, $v0, $v1 /* 392048 E0092318 000210C0 */ sll $v0, $v0, 3 /* 39204C E009231C 8D34000C */ lw $s4, 0xC($t1) /* 392050 E0092320 44060000 */ mfc1 $a2, $f0 /* 392054 E0092324 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 392058 E0092328 00220821 */ addu $at, $at, $v0 /* 39205C E009232C C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 392060 E0092330 4407A000 */ mfc1 $a3, $f20 /* 392064 E0092334 46000007 */ neg.s $f0, $f0 /* 392068 E0092338 44050000 */ mfc1 $a1, $f0 /* 39206C E009233C 24130001 */ addiu $s3, $zero, 0x1 /* 392070 E0092340 0C080104 */ jal shim_guRotateF /* 392074 E0092344 AFA60010 */ sw $a2, 0x10($sp) /* 392078 E0092348 0200202D */ daddu $a0, $s0, $zero /* 39207C E009234C 3C128007 */ lui $s2, %hi(gMatrixListPos) /* 392080 E0092350 265241F0 */ addiu $s2, $s2, %lo(gMatrixListPos) /* 392084 E0092354 3C16800A */ lui $s6, %hi(gDisplayContext) /* 392088 E0092358 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 39208C E009235C 96450000 */ lhu $a1, 0x0($s2) /* 392090 E0092360 8EC20000 */ lw $v0, 0x0($s6) /* 392094 E0092364 00052980 */ sll $a1, $a1, 6 /* 392098 E0092368 00B12821 */ addu $a1, $a1, $s1 /* 39209C E009236C 0C080118 */ jal shim_guMtxF2L /* 3920A0 E0092370 00452821 */ addu $a1, $v0, $a1 /* 3920A4 E0092374 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3920A8 E0092378 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3920AC E009237C 3C10800A */ lui $s0, %hi(gMainGfxPos) /* 3920B0 E0092380 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* 3920B4 E0092384 27A40018 */ addiu $a0, $sp, 0x18 /* 3920B8 E0092388 8E050000 */ lw $a1, 0x0($s0) /* 3920BC E009238C 96480000 */ lhu $t0, 0x0($s2) /* 3920C0 E0092390 00A0182D */ daddu $v1, $a1, $zero /* 3920C4 E0092394 24A50008 */ addiu $a1, $a1, 0x8 /* 3920C8 E0092398 01131021 */ addu $v0, $t0, $s3 /* 3920CC E009239C A6420000 */ sh $v0, 0x0($s2) /* 3920D0 E00923A0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3920D4 E00923A4 AE050000 */ sw $a1, 0x0($s0) /* 3920D8 E00923A8 AC620000 */ sw $v0, 0x0($v1) /* 3920DC E00923AC 24A20008 */ addiu $v0, $a1, 0x8 /* 3920E0 E00923B0 3108FFFF */ andi $t0, $t0, 0xFFFF /* 3920E4 E00923B4 AC600004 */ sw $zero, 0x4($v1) /* 3920E8 E00923B8 ACA60000 */ sw $a2, 0x0($a1) /* 3920EC E00923BC 8FA90118 */ lw $t1, 0x118($sp) /* 3920F0 E00923C0 00084180 */ sll $t0, $t0, 6 /* 3920F4 E00923C4 8D230010 */ lw $v1, 0x10($t1) /* 3920F8 E00923C8 01114021 */ addu $t0, $t0, $s1 /* 3920FC E00923CC AE020000 */ sw $v0, 0x0($s0) /* 392100 E00923D0 8C62001C */ lw $v0, 0x1C($v1) /* 392104 E00923D4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 392108 E00923D8 00431021 */ addu $v0, $v0, $v1 /* 39210C E00923DC ACA20004 */ sw $v0, 0x4($a1) /* 392110 E00923E0 8E850008 */ lw $a1, 0x8($s4) /* 392114 E00923E4 8E86000C */ lw $a2, 0xC($s4) /* 392118 E00923E8 8EC20000 */ lw $v0, 0x0($s6) /* 39211C E00923EC 8E870010 */ lw $a3, 0x10($s4) /* 392120 E00923F0 00481021 */ addu $v0, $v0, $t0 /* 392124 E00923F4 0C080108 */ jal shim_guTranslateF /* 392128 E00923F8 AFA200D8 */ sw $v0, 0xD8($sp) /* 39212C E00923FC 27A40018 */ addiu $a0, $sp, 0x18 /* 392130 E0092400 96450000 */ lhu $a1, 0x0($s2) /* 392134 E0092404 8EC20000 */ lw $v0, 0x0($s6) /* 392138 E0092408 00052980 */ sll $a1, $a1, 6 /* 39213C E009240C 00B12821 */ addu $a1, $a1, $s1 /* 392140 E0092410 0C080118 */ jal shim_guMtxF2L /* 392144 E0092414 00452821 */ addu $a1, $v0, $a1 /* 392148 E0092418 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 39214C E009241C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 392150 E0092420 3C06FFFF */ lui $a2, (0xFFFF0FFF >> 16) /* 392154 E0092424 34C60FFF */ ori $a2, $a2, (0xFFFF0FFF & 0xFFFF) /* 392158 E0092428 8E040000 */ lw $a0, 0x0($s0) /* 39215C E009242C 96420000 */ lhu $v0, 0x0($s2) /* 392160 E0092430 0080282D */ daddu $a1, $a0, $zero /* 392164 E0092434 24840008 */ addiu $a0, $a0, 0x8 /* 392168 E0092438 AE040000 */ sw $a0, 0x0($s0) /* 39216C E009243C ACA30000 */ sw $v1, 0x0($a1) /* 392170 E0092440 00531821 */ addu $v1, $v0, $s3 /* 392174 E0092444 3042FFFF */ andi $v0, $v0, 0xFFFF /* 392178 E0092448 00021180 */ sll $v0, $v0, 6 /* 39217C E009244C A6430000 */ sh $v1, 0x0($s2) /* 392180 E0092450 8EC30000 */ lw $v1, 0x0($s6) /* 392184 E0092454 00511021 */ addu $v0, $v0, $s1 /* 392188 E0092458 00621821 */ addu $v1, $v1, $v0 /* 39218C E009245C 24820008 */ addiu $v0, $a0, 0x8 /* 392190 E0092460 ACA30004 */ sw $v1, 0x4($a1) /* 392194 E0092464 AE020000 */ sw $v0, 0x0($s0) /* 392198 E0092468 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 39219C E009246C AC820000 */ sw $v0, 0x0($a0) /* 3921A0 E0092470 3C020900 */ lui $v0, %hi(D_090002C0_415320) /* 3921A4 E0092474 244202C0 */ addiu $v0, $v0, %lo(D_090002C0_415320) /* 3921A8 E0092478 AC820004 */ sw $v0, 0x4($a0) /* 3921AC E009247C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3921B0 E0092480 AC820008 */ sw $v0, 0x8($a0) /* 3921B4 E0092484 AC86000C */ sw $a2, 0xC($a0) /* 3921B8 E0092488 8FA90118 */ lw $t1, 0x118($sp) /* 3921BC E009248C 26940024 */ addiu $s4, $s4, 0x24 /* 3921C0 E0092490 8D220008 */ lw $v0, 0x8($t1) /* 3921C4 E0092494 24840010 */ addiu $a0, $a0, 0x10 /* 3921C8 E0092498 0262102A */ slt $v0, $s3, $v0 /* 3921CC E009249C 1040005B */ beqz $v0, .LE009260C /* 3921D0 E00924A0 AE040000 */ sw $a0, 0x0($s0) /* 3921D4 E00924A4 4600A586 */ mov.s $f22, $f20 /* 3921D8 E00924A8 27B50058 */ addiu $s5, $sp, 0x58 /* 3921DC E00924AC 02C0F02D */ daddu $fp, $s6, $zero /* 3921E0 E00924B0 0240B02D */ daddu $s6, $s2, $zero /* 3921E4 E00924B4 3C120001 */ lui $s2, (0x11630 >> 16) /* 3921E8 E00924B8 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3921EC E00924BC 0200882D */ daddu $s1, $s0, $zero /* 3921F0 E00924C0 3C17DE00 */ lui $s7, (0xDE000000 >> 16) /* 3921F4 E00924C4 26900004 */ addiu $s0, $s4, 0x4 .LE00924C8: /* 3921F8 E00924C8 8E02001C */ lw $v0, 0x1C($s0) /* 3921FC E00924CC 14400049 */ bnez $v0, .LE00925F4 /* 392200 E00924D0 00000000 */ nop /* 392204 E00924D4 8E050004 */ lw $a1, 0x4($s0) /* 392208 E00924D8 8E060008 */ lw $a2, 0x8($s0) /* 39220C E00924DC 8E07000C */ lw $a3, 0xC($s0) /* 392210 E00924E0 C6140018 */ lwc1 $f20, 0x18($s0) /* 392214 E00924E4 0C080108 */ jal shim_guTranslateF /* 392218 E00924E8 27A40018 */ addiu $a0, $sp, 0x18 /* 39221C E00924EC 4616A032 */ c.eq.s $f20, $f22 /* 392220 E00924F0 00000000 */ nop /* 392224 E00924F4 4501000B */ bc1t .LE0092524 /* 392228 E00924F8 27A40018 */ addiu $a0, $sp, 0x18 /* 39222C E00924FC 02A0202D */ daddu $a0, $s5, $zero /* 392230 E0092500 4405A000 */ mfc1 $a1, $f20 /* 392234 E0092504 4407B000 */ mfc1 $a3, $f22 /* 392238 E0092508 0C080110 */ jal shim_guScaleF /* 39223C E009250C 00A0302D */ daddu $a2, $a1, $zero /* 392240 E0092510 02A0202D */ daddu $a0, $s5, $zero /* 392244 E0092514 27A50018 */ addiu $a1, $sp, 0x18 /* 392248 E0092518 0C080114 */ jal shim_guMtxCatF /* 39224C E009251C 00A0302D */ daddu $a2, $a1, $zero /* 392250 E0092520 27A40018 */ addiu $a0, $sp, 0x18 .LE0092524: /* 392254 E0092524 96C50000 */ lhu $a1, 0x0($s6) /* 392258 E0092528 8FC20000 */ lw $v0, 0x0($fp) /* 39225C E009252C 00052980 */ sll $a1, $a1, 6 /* 392260 E0092530 00B22821 */ addu $a1, $a1, $s2 /* 392264 E0092534 0C080118 */ jal shim_guMtxF2L /* 392268 E0092538 00452821 */ addu $a1, $v0, $a1 /* 39226C E009253C 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 392270 E0092540 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 392274 E0092544 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 392278 E0092548 8E240000 */ lw $a0, 0x0($s1) /* 39227C E009254C 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 392280 E0092550 0080282D */ daddu $a1, $a0, $zero /* 392284 E0092554 24840008 */ addiu $a0, $a0, 0x8 /* 392288 E0092558 AE240000 */ sw $a0, 0x0($s1) /* 39228C E009255C 96C20000 */ lhu $v0, 0x0($s6) /* 392290 E0092560 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 392294 E0092564 ACA30000 */ sw $v1, 0x0($a1) /* 392298 E0092568 24430001 */ addiu $v1, $v0, 0x1 /* 39229C E009256C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3922A0 E0092570 00021180 */ sll $v0, $v0, 6 /* 3922A4 E0092574 A6C30000 */ sh $v1, 0x0($s6) /* 3922A8 E0092578 8FC30000 */ lw $v1, 0x0($fp) /* 3922AC E009257C 00521021 */ addu $v0, $v0, $s2 /* 3922B0 E0092580 00621821 */ addu $v1, $v1, $v0 /* 3922B4 E0092584 24820008 */ addiu $v0, $a0, 0x8 /* 3922B8 E0092588 ACA30004 */ sw $v1, 0x4($a1) /* 3922BC E009258C AE220000 */ sw $v0, 0x0($s1) /* 3922C0 E0092590 24820010 */ addiu $v0, $a0, 0x10 /* 3922C4 E0092594 AC860000 */ sw $a2, 0x0($a0) /* 3922C8 E0092598 8FA900D8 */ lw $t1, 0xD8($sp) /* 3922CC E009259C 24830018 */ addiu $v1, $a0, 0x18 /* 3922D0 E00925A0 AC890004 */ sw $t1, 0x4($a0) /* 3922D4 E00925A4 AE220000 */ sw $v0, 0x0($s1) /* 3922D8 E00925A8 AC970008 */ sw $s7, 0x8($a0) /* 3922DC E00925AC 8E020000 */ lw $v0, 0x0($s0) /* 3922E0 E00925B0 3C09E009 */ lui $t1, %hi(D_E0092690) /* 3922E4 E00925B4 25292690 */ addiu $t1, $t1, %lo(D_E0092690) /* 3922E8 E00925B8 AE230000 */ sw $v1, 0x0($s1) /* 3922EC E00925BC 00021043 */ sra $v0, $v0, 1 /* 3922F0 E00925C0 00021080 */ sll $v0, $v0, 2 /* 3922F4 E00925C4 00491021 */ addu $v0, $v0, $t1 /* 3922F8 E00925C8 8C430000 */ lw $v1, 0x0($v0) /* 3922FC E00925CC 24820020 */ addiu $v0, $a0, 0x20 /* 392300 E00925D0 AE220000 */ sw $v0, 0x0($s1) /* 392304 E00925D4 3C020900 */ lui $v0, %hi(D_09000470_4154D0) /* 392308 E00925D8 24420470 */ addiu $v0, $v0, %lo(D_09000470_4154D0) /* 39230C E00925DC AC820014 */ sw $v0, 0x14($a0) /* 392310 E00925E0 24020040 */ addiu $v0, $zero, 0x40 /* 392314 E00925E4 AC970010 */ sw $s7, 0x10($a0) /* 392318 E00925E8 AC870018 */ sw $a3, 0x18($a0) /* 39231C E00925EC AC82001C */ sw $v0, 0x1C($a0) /* 392320 E00925F0 AC83000C */ sw $v1, 0xC($a0) .LE00925F4: /* 392324 E00925F4 8FA90118 */ lw $t1, 0x118($sp) /* 392328 E00925F8 26730001 */ addiu $s3, $s3, 0x1 /* 39232C E00925FC 8D220008 */ lw $v0, 0x8($t1) /* 392330 E0092600 0262102A */ slt $v0, $s3, $v0 /* 392334 E0092604 1440FFB0 */ bnez $v0, .LE00924C8 /* 392338 E0092608 26100024 */ addiu $s0, $s0, 0x24 .LE009260C: /* 39233C E009260C 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 392340 E0092610 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 392344 E0092614 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 392348 E0092618 8C820000 */ lw $v0, 0x0($a0) /* 39234C E009261C 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 392350 E0092620 0040282D */ daddu $a1, $v0, $zero /* 392354 E0092624 24420008 */ addiu $v0, $v0, 0x8 /* 392358 E0092628 AC820000 */ sw $v0, 0x0($a0) /* 39235C E009262C ACA30000 */ sw $v1, 0x0($a1) /* 392360 E0092630 24030040 */ addiu $v1, $zero, 0x40 /* 392364 E0092634 ACA30004 */ sw $v1, 0x4($a1) /* 392368 E0092638 24430008 */ addiu $v1, $v0, 0x8 /* 39236C E009263C AC830000 */ sw $v1, 0x0($a0) /* 392370 E0092640 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 392374 E0092644 AC430000 */ sw $v1, 0x0($v0) /* 392378 E0092648 AC400004 */ sw $zero, 0x4($v0) /* 39237C E009264C 8FBF0104 */ lw $ra, 0x104($sp) /* 392380 E0092650 8FBE0100 */ lw $fp, 0x100($sp) /* 392384 E0092654 8FB700FC */ lw $s7, 0xFC($sp) /* 392388 E0092658 8FB600F8 */ lw $s6, 0xF8($sp) /* 39238C E009265C 8FB500F4 */ lw $s5, 0xF4($sp) /* 392390 E0092660 8FB400F0 */ lw $s4, 0xF0($sp) /* 392394 E0092664 8FB300EC */ lw $s3, 0xEC($sp) /* 392398 E0092668 8FB200E8 */ lw $s2, 0xE8($sp) /* 39239C E009266C 8FB100E4 */ lw $s1, 0xE4($sp) /* 3923A0 E0092670 8FB000E0 */ lw $s0, 0xE0($sp) /* 3923A4 E0092674 D7B60110 */ ldc1 $f22, 0x110($sp) /* 3923A8 E0092678 D7B40108 */ ldc1 $f20, 0x108($sp) /* 3923AC E009267C 03E00008 */ jr $ra /* 3923B0 E0092680 27BD0118 */ addiu $sp, $sp, 0x118 /* 3923B4 E0092684 00000000 */ nop /* 3923B8 E0092688 00000000 */ nop /* 3923BC E009268C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void small_gold_sparkle_appendGfx(void* effect) { SmallGoldSparkleFXData* part = ((EffectInstance*)effect)->data.smallGoldSparkle; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; Mtx* spD8; s32 i; shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]); spD8 = &gDisplayContext->matrixStack[gMatrixListPos++]; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090002C0_392700); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 15, 255); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { if (part->unk_20 == 0) { f32 temp_f20 = part->unk_1C; shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10); if (temp_f20 != 1.0f) { shim_guScaleF(sp58, temp_f20, temp_f20, 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); gSPMatrix(gMainGfxPos++, spD8, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, sDlists[part->unk_04 >> 1]); gSPDisplayList(gMainGfxPos++, D_09000470_3928B0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel MakeShop /* 7E26E0 80281860 27BDFF98 */ addiu $sp, $sp, -0x68 /* 7E26E4 80281864 AFB10044 */ sw $s1, 0x44($sp) /* 7E26E8 80281868 0080882D */ daddu $s1, $a0, $zero /* 7E26EC 8028186C AFBF0064 */ sw $ra, 0x64($sp) /* 7E26F0 80281870 AFBE0060 */ sw $fp, 0x60($sp) /* 7E26F4 80281874 AFB7005C */ sw $s7, 0x5C($sp) /* 7E26F8 80281878 AFB60058 */ sw $s6, 0x58($sp) /* 7E26FC 8028187C AFB50054 */ sw $s5, 0x54($sp) /* 7E2700 80281880 AFB40050 */ sw $s4, 0x50($sp) /* 7E2704 80281884 AFB3004C */ sw $s3, 0x4C($sp) /* 7E2708 80281888 AFB20048 */ sw $s2, 0x48($sp) /* 7E270C 8028188C AFB00040 */ sw $s0, 0x40($sp) /* 7E2710 80281890 8E30000C */ lw $s0, 0xC($s1) /* 7E2714 80281894 8E050000 */ lw $a1, 0x0($s0) /* 7E2718 80281898 0C0B1EAF */ jal evt_get_variable /* 7E271C 8028189C 26100004 */ addiu $s0, $s0, 0x4 /* 7E2720 802818A0 8E050000 */ lw $a1, 0x0($s0) /* 7E2724 802818A4 26100004 */ addiu $s0, $s0, 0x4 /* 7E2728 802818A8 0220202D */ daddu $a0, $s1, $zero /* 7E272C 802818AC 0C0B1EAF */ jal evt_get_variable /* 7E2730 802818B0 0040A82D */ daddu $s5, $v0, $zero /* 7E2734 802818B4 8E050000 */ lw $a1, 0x0($s0) /* 7E2738 802818B8 26100004 */ addiu $s0, $s0, 0x4 /* 7E273C 802818BC 0220202D */ daddu $a0, $s1, $zero /* 7E2740 802818C0 0C0B1EAF */ jal evt_get_variable /* 7E2744 802818C4 0040982D */ daddu $s3, $v0, $zero /* 7E2748 802818C8 0220202D */ daddu $a0, $s1, $zero /* 7E274C 802818CC 8E050000 */ lw $a1, 0x0($s0) /* 7E2750 802818D0 0C0B1EAF */ jal evt_get_variable /* 7E2754 802818D4 0040882D */ daddu $s1, $v0, $zero /* 7E2758 802818D8 2404035C */ addiu $a0, $zero, 0x35C /* 7E275C 802818DC 0C00AB39 */ jal heap_malloc /* 7E2760 802818E0 0040802D */ daddu $s0, $v0, $zero /* 7E2764 802818E4 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 7E2768 802818E8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 7E276C 802818EC 0040A02D */ daddu $s4, $v0, $zero /* 7E2770 802818F0 AC740144 */ sw $s4, 0x144($v1) /* 7E2774 802818F4 AE950014 */ sw $s5, 0x14($s4) /* 7E2778 802818F8 AE930018 */ sw $s3, 0x18($s4) /* 7E277C 802818FC AE91001C */ sw $s1, 0x1C($s4) /* 7E2780 80281900 AE900024 */ sw $s0, 0x24($s4) /* 7E2784 80281904 8E620000 */ lw $v0, 0x0($s3) /* 7E2788 80281908 10400005 */ beqz $v0, .L80281920 /* 7E278C 8028190C 0000902D */ daddu $s2, $zero, $zero .L80281910: /* 7E2790 80281910 2673000C */ addiu $s3, $s3, 0xC /* 7E2794 80281914 8E620000 */ lw $v0, 0x0($s3) /* 7E2798 80281918 1440FFFD */ bnez $v0, .L80281910 /* 7E279C 8028191C 26520001 */ addiu $s2, $s2, 0x1 .L80281920: /* 7E27A0 80281920 A6920002 */ sh $s2, 0x2($s4) /* 7E27A4 80281924 12200008 */ beqz $s1, .L80281948 /* 7E27A8 80281928 0000902D */ daddu $s2, $zero, $zero /* 7E27AC 8028192C 8E220000 */ lw $v0, 0x0($s1) /* 7E27B0 80281930 10400005 */ beqz $v0, .L80281948 /* 7E27B4 80281934 00000000 */ nop .L80281938: /* 7E27B8 80281938 2631000C */ addiu $s1, $s1, 0xC /* 7E27BC 8028193C 8E220000 */ lw $v0, 0x0($s1) /* 7E27C0 80281940 1440FFFD */ bnez $v0, .L80281938 /* 7E27C4 80281944 26520001 */ addiu $s2, $s2, 0x1 .L80281948: /* 7E27C8 80281948 86840002 */ lh $a0, 0x2($s4) /* 7E27CC 8028194C 18800006 */ blez $a0, .L80281968 /* 7E27D0 80281950 A6920004 */ sh $s2, 0x4($s4) /* 7E27D4 80281954 0C00AB39 */ jal heap_malloc /* 7E27D8 80281958 00042100 */ sll $a0, $a0, 4 /* 7E27DC 8028195C 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 7E27E0 80281960 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 7E27E4 80281964 AC620140 */ sw $v0, 0x140($v1) .L80281968: /* 7E27E8 80281968 8E930018 */ lw $s3, 0x18($s4) /* 7E27EC 8028196C 8E620000 */ lw $v0, 0x0($s3) /* 7E27F0 80281970 8E950014 */ lw $s5, 0x14($s4) /* 7E27F4 80281974 10400055 */ beqz $v0, .L80281ACC /* 7E27F8 80281978 0000902D */ daddu $s2, $zero, $zero /* 7E27FC 8028197C 3C1E8007 */ lui $fp, %hi(gGameStatusPtr) /* 7E2800 80281980 27DE419C */ addiu $fp, $fp, %lo(gGameStatusPtr) /* 7E2804 80281984 3C178028 */ lui $s7, %hi(D_80283F58_7E4DD8) /* 7E2808 80281988 26F73F58 */ addiu $s7, $s7, %lo(D_80283F58_7E4DD8) /* 7E280C 8028198C 24160003 */ addiu $s6, $zero, 0x3 /* 7E2810 80281990 26B10002 */ addiu $s1, $s5, 0x2 .L80281994: /* 7E2814 80281994 27A50028 */ addiu $a1, $sp, 0x28 /* 7E2818 80281998 27A6002C */ addiu $a2, $sp, 0x2C /* 7E281C 8028199C 27A70030 */ addiu $a3, $sp, 0x30 /* 7E2820 802819A0 96A40000 */ lhu $a0, 0x0($s5) /* 7E2824 802819A4 27A20034 */ addiu $v0, $sp, 0x34 /* 7E2828 802819A8 AFA20010 */ sw $v0, 0x10($sp) /* 7E282C 802819AC 27A20038 */ addiu $v0, $sp, 0x38 /* 7E2830 802819B0 AFA20014 */ sw $v0, 0x14($sp) /* 7E2834 802819B4 27A2003C */ addiu $v0, $sp, 0x3C /* 7E2838 802819B8 0C046C3B */ jal get_model_center_and_size /* 7E283C 802819BC AFA20018 */ sw $v0, 0x18($sp) /* 7E2840 802819C0 00128100 */ sll $s0, $s2, 4 /* 7E2844 802819C4 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 7E2848 802819C8 8FC30000 */ lw $v1, 0x0($fp) /* 7E284C 802819CC 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 7E2850 802819D0 44812000 */ mtc1 $at, $f4 /* 7E2854 802819D4 C7A00028 */ lwc1 $f0, 0x28($sp) /* 7E2858 802819D8 8C620140 */ lw $v0, 0x140($v1) /* 7E285C 802819DC 46041080 */ add.s $f2, $f2, $f4 /* 7E2860 802819E0 02021021 */ addu $v0, $s0, $v0 /* 7E2864 802819E4 E4400004 */ swc1 $f0, 0x4($v0) /* 7E2868 802819E8 8C620140 */ lw $v0, 0x140($v1) /* 7E286C 802819EC 02021021 */ addu $v0, $s0, $v0 /* 7E2870 802819F0 E4420008 */ swc1 $f2, 0x8($v0) /* 7E2874 802819F4 8C620140 */ lw $v0, 0x140($v1) /* 7E2878 802819F8 C7A00030 */ lwc1 $f0, 0x30($sp) /* 7E287C 802819FC 02021021 */ addu $v0, $s0, $v0 /* 7E2880 80281A00 E440000C */ swc1 $f0, 0xC($v0) /* 7E2884 80281A04 96A40000 */ lhu $a0, 0x0($s5) /* 7E2888 80281A08 0C046C04 */ jal get_model_list_index_from_tree_index /* 7E288C 80281A0C E7A2002C */ swc1 $f2, 0x2C($sp) /* 7E2890 80281A10 0C046B4C */ jal get_model_from_list_index /* 7E2894 80281A14 0040202D */ daddu $a0, $v0, $zero /* 7E2898 80281A18 C7A00028 */ lwc1 $f0, 0x28($sp) /* 7E289C 80281A1C C7A2002C */ lwc1 $f2, 0x2C($sp) /* 7E28A0 80281A20 94430000 */ lhu $v1, 0x0($v0) /* 7E28A4 80281A24 44050000 */ mfc1 $a1, $f0 /* 7E28A8 80281A28 44061000 */ mfc1 $a2, $f2 /* 7E28AC 80281A2C C7A00030 */ lwc1 $f0, 0x30($sp) /* 7E28B0 80281A30 34630004 */ ori $v1, $v1, 0x4 /* 7E28B4 80281A34 A4430000 */ sh $v1, 0x0($v0) /* 7E28B8 80281A38 8E630000 */ lw $v1, 0x0($s3) /* 7E28BC 80281A3C 8E840024 */ lw $a0, 0x24($s4) /* 7E28C0 80281A40 24020001 */ addiu $v0, $zero, 0x1 /* 7E28C4 80281A44 AFA20010 */ sw $v0, 0x10($sp) /* 7E28C8 80281A48 AFA00014 */ sw $zero, 0x14($sp) /* 7E28CC 80281A4C 44070000 */ mfc1 $a3, $f0 /* 7E28D0 80281A50 0C04C6A5 */ jal make_item_entity_nodelay /* 7E28D4 80281A54 00642025 */ or $a0, $v1, $a0 /* 7E28D8 80281A58 8FC40000 */ lw $a0, 0x0($fp) /* 7E28DC 80281A5C 8C830140 */ lw $v1, 0x140($a0) /* 7E28E0 80281A60 26B50004 */ addiu $s5, $s5, 0x4 /* 7E28E4 80281A64 02031821 */ addu $v1, $s0, $v1 /* 7E28E8 80281A68 AC620000 */ sw $v0, 0x0($v1) /* 7E28EC 80281A6C 8C820140 */ lw $v0, 0x140($a0) /* 7E28F0 80281A70 2673000C */ addiu $s3, $s3, 0xC /* 7E28F4 80281A74 02028021 */ addu $s0, $s0, $v0 /* 7E28F8 80281A78 8E040000 */ lw $a0, 0x0($s0) /* 7E28FC 80281A7C 0C04D052 */ jal set_item_entity_flags /* 7E2900 80281A80 24054000 */ addiu $a1, $zero, 0x4000 /* 7E2904 80281A84 02E0202D */ daddu $a0, $s7, $zero /* 7E2908 80281A88 24050080 */ addiu $a1, $zero, 0x80 /* 7E290C 80281A8C 96260000 */ lhu $a2, 0x0($s1) /* 7E2910 80281A90 0240382D */ daddu $a3, $s2, $zero /* 7E2914 80281A94 AFA00010 */ sw $zero, 0x10($sp) /* 7E2918 80281A98 0C0B10AA */ jal bind_trigger_1 /* 7E291C 80281A9C AFB60014 */ sw $s6, 0x14($sp) /* 7E2920 80281AA0 02E0202D */ daddu $a0, $s7, $zero /* 7E2924 80281AA4 24050800 */ addiu $a1, $zero, 0x800 /* 7E2928 80281AA8 0240382D */ daddu $a3, $s2, $zero /* 7E292C 80281AAC 96260000 */ lhu $a2, 0x0($s1) /* 7E2930 80281AB0 26310004 */ addiu $s1, $s1, 0x4 /* 7E2934 80281AB4 AFA00010 */ sw $zero, 0x10($sp) /* 7E2938 80281AB8 0C0B10AA */ jal bind_trigger_1 /* 7E293C 80281ABC AFB60014 */ sw $s6, 0x14($sp) /* 7E2940 80281AC0 8E620000 */ lw $v0, 0x0($s3) /* 7E2944 80281AC4 1440FFB3 */ bnez $v0, .L80281994 /* 7E2948 80281AC8 26520001 */ addiu $s2, $s2, 0x1 .L80281ACC: /* 7E294C 80281ACC 3C048008 */ lui $a0, %hi(HES_Item_Coin) /* 7E2950 80281AD0 24840868 */ addiu $a0, $a0, %lo(HES_Item_Coin) /* 7E2954 80281AD4 0C050529 */ jal hud_element_create /* 7E2958 80281AD8 2410FFFF */ addiu $s0, $zero, -0x1 /* 7E295C 80281ADC 0040202D */ daddu $a0, $v0, $zero /* 7E2960 80281AE0 24050080 */ addiu $a1, $zero, 0x80 /* 7E2964 80281AE4 0C051280 */ jal hud_element_set_flags /* 7E2968 80281AE8 AE840020 */ sw $a0, 0x20($s4) /* 7E296C 80281AEC 8E840020 */ lw $a0, 0x20($s4) /* 7E2970 80281AF0 0C05128B */ jal hud_element_clear_flags /* 7E2974 80281AF4 34058000 */ ori $a1, $zero, 0x8000 /* 7E2978 80281AF8 3C058028 */ lui $a1, %hi(draw_shop_items) /* 7E297C 80281AFC 24A51524 */ addiu $a1, $a1, %lo(draw_shop_items) /* 7E2980 80281B00 0C048C8F */ jal create_worker_frontUI /* 7E2984 80281B04 0000202D */ daddu $a0, $zero, $zero /* 7E2988 80281B08 0C048D8F */ jal get_worker /* 7E298C 80281B0C 0040202D */ daddu $a0, $v0, $zero /* 7E2990 80281B10 2404000A */ addiu $a0, $zero, 0xA /* 7E2994 80281B14 24050064 */ addiu $a1, $zero, 0x64 /* 7E2998 80281B18 24060042 */ addiu $a2, $zero, 0x42 /* 7E299C 80281B1C 24070078 */ addiu $a3, $zero, 0x78 /* 7E29A0 80281B20 2402001C */ addiu $v0, $zero, 0x1C /* 7E29A4 80281B24 AFA20010 */ sw $v0, 0x10($sp) /* 7E29A8 80281B28 3C028028 */ lui $v0, %hi(shop_draw_item_name) /* 7E29AC 80281B2C 24421434 */ addiu $v0, $v0, %lo(shop_draw_item_name) /* 7E29B0 80281B30 AFA00014 */ sw $zero, 0x14($sp) /* 7E29B4 80281B34 AFA20018 */ sw $v0, 0x18($sp) /* 7E29B8 80281B38 AFA0001C */ sw $zero, 0x1C($sp) /* 7E29BC 80281B3C 0C051F32 */ jal set_window_properties /* 7E29C0 80281B40 AFB00020 */ sw $s0, 0x20($sp) /* 7E29C4 80281B44 2404000B */ addiu $a0, $zero, 0xB /* 7E29C8 80281B48 24050020 */ addiu $a1, $zero, 0x20 /* 7E29CC 80281B4C 240600B8 */ addiu $a2, $zero, 0xB8 /* 7E29D0 80281B50 24070100 */ addiu $a3, $zero, 0x100 /* 7E29D4 80281B54 00A0102D */ daddu $v0, $a1, $zero /* 7E29D8 80281B58 AFA20010 */ sw $v0, 0x10($sp) /* 7E29DC 80281B5C 24020001 */ addiu $v0, $zero, 0x1 /* 7E29E0 80281B60 AFA20014 */ sw $v0, 0x14($sp) /* 7E29E4 80281B64 3C028028 */ lui $v0, %hi(shop_draw_item_desc) /* 7E29E8 80281B68 244214D0 */ addiu $v0, $v0, %lo(shop_draw_item_desc) /* 7E29EC 80281B6C AFA20018 */ sw $v0, 0x18($sp) /* 7E29F0 80281B70 AFA0001C */ sw $zero, 0x1C($sp) /* 7E29F4 80281B74 0C051F32 */ jal set_window_properties /* 7E29F8 80281B78 AFB00020 */ sw $s0, 0x20($sp) /* 7E29FC 80281B7C 3C048015 */ lui $a0, %hi(gWindowStyles) /* 7E2A00 80281B80 2484F150 */ addiu $a0, $a0, %lo(gWindowStyles) /* 7E2A04 80281B84 24030009 */ addiu $v1, $zero, 0x9 /* 7E2A08 80281B88 AC830028 */ sw $v1, 0x28($a0) /* 7E2A0C 80281B8C 24030003 */ addiu $v1, $zero, 0x3 /* 7E2A10 80281B90 AC83002C */ sw $v1, 0x2C($a0) /* 7E2A14 80281B94 AE800008 */ sw $zero, 0x8($s4) /* 7E2A18 80281B98 AE80000C */ sw $zero, 0xC($s4) /* 7E2A1C 80281B9C A6800000 */ sh $zero, 0x0($s4) /* 7E2A20 80281BA0 AE800010 */ sw $zero, 0x10($s4) /* 7E2A24 80281BA4 8FBF0064 */ lw $ra, 0x64($sp) /* 7E2A28 80281BA8 8FBE0060 */ lw $fp, 0x60($sp) /* 7E2A2C 80281BAC 8FB7005C */ lw $s7, 0x5C($sp) /* 7E2A30 80281BB0 8FB60058 */ lw $s6, 0x58($sp) /* 7E2A34 80281BB4 8FB50054 */ lw $s5, 0x54($sp) /* 7E2A38 80281BB8 8FB40050 */ lw $s4, 0x50($sp) /* 7E2A3C 80281BBC 8FB3004C */ lw $s3, 0x4C($sp) /* 7E2A40 80281BC0 8FB20048 */ lw $s2, 0x48($sp) /* 7E2A44 80281BC4 8FB10044 */ lw $s1, 0x44($sp) /* 7E2A48 80281BC8 8FB00040 */ lw $s0, 0x40($sp) /* 7E2A4C 80281BCC 24020002 */ addiu $v0, $zero, 0x2 /* 7E2A50 80281BD0 03E00008 */ jr $ra /* 7E2A54 80281BD4 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(MakeShop) { Bytecode* args = script->ptrReadPos; ShopItemLocation* itemDataPositions; ShopItemData* inventory; ShopSellPriceData* prices; s32 inventoryItemFlags; Shop* shop; Model* model; s32 numShopItems; f32 centerX; f32 centerY; f32 centerZ; s32 var1; s32 var2; s32 var3; s32 var4; f32 sizeX; f32 sizeY; f32 sizeZ; var1 = evt_get_variable(script, *args++); var2 = evt_get_variable(script, *args++); var3 = evt_get_variable(script, *args++); var4 = evt_get_variable(script, *args++); itemDataPositions = (ShopItemLocation*) var1; inventory = (ShopItemData*) var2; prices = (ShopSellPriceData*) var3; inventoryItemFlags = var4; shop = heap_malloc(sizeof(*shop)); gGameStatusPtr->mapShop = shop; shop->itemDataPositions = itemDataPositions; shop->staticInventory = inventory; shop->staticPriceList = prices; shop->inventoryItemFlags = inventoryItemFlags; numShopItems = 0; while (inventory->itemID != ITEM_NONE) { numShopItems++; inventory++; } shop->numItems = numShopItems; numShopItems = 0; if (prices != NULL) { while (prices->itemID != ITEM_NONE) { numShopItems++; prices++; } } shop->numSpecialPrices = numShopItems; if (shop->numItems > 0) { gGameStatusPtr->shopItemEntities = heap_malloc(sizeof(ShopItemEntity) * shop->numItems); } inventory = shop->staticInventory; itemDataPositions = shop->itemDataPositions; numShopItems = 0; while (inventory->itemID != 0) { get_model_center_and_size(itemDataPositions->posModelID, &centerX, &centerY, &centerZ, &sizeX, &sizeY, &sizeZ); centerY += 6; gGameStatusPtr->shopItemEntities[numShopItems].pos.x = centerX; gGameStatusPtr->shopItemEntities[numShopItems].pos.y = centerY; gGameStatusPtr->shopItemEntities[numShopItems].pos.z = centerZ; model = get_model_from_list_index(get_model_list_index_from_tree_index(itemDataPositions->posModelID)); model->flags |= MODEL_FLAG_FLAG_4; gGameStatusPtr->shopItemEntities[numShopItems].index = make_item_entity_nodelay(inventory->itemID | shop->inventoryItemFlags, centerX, centerY, centerZ, 1, 0); set_item_entity_flags(gGameStatusPtr->shopItemEntities[numShopItems].index, ITEM_ENTITY_RESIZABLE); bind_trigger_1(&D_80283F58_7E4DD8, TRIGGER_FLOOR_TOUCH, itemDataPositions->triggerColliderID, numShopItems, 0, 3); bind_trigger_1(&D_80283F58_7E4DD8, TRIGGER_FLOOR_PRESS_A, itemDataPositions->triggerColliderID, numShopItems, 0, 3); itemDataPositions++; inventory++; numShopItems++; } shop->costIconID = hud_element_create(&HES_Item_Coin); hud_element_set_flags(shop->costIconID, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(shop->costIconID, HUD_ELEMENT_FLAG_FILTER_TEX); get_worker(create_worker_frontUI(NULL, draw_shop_items)); set_window_properties(WINDOW_ID_ITEM_INFO_NAME, 100, 66, 120, 28, WINDOW_PRIORITY_0, shop_draw_item_name, NULL, -1); set_window_properties(WINDOW_ID_ITEM_INFO_DESC, 32, 184, 256, 32, WINDOW_PRIORITY_1, shop_draw_item_desc, NULL, -1); gWindowStyles[10].defaultStyleID = WINDOW_STYLE_9; gWindowStyles[11].defaultStyleID = WINDOW_STYLE_3; shop->currentItemSlot = 0; shop->selectedStoreItemSlot = 0; shop->flags = SHOP_FLAG_0; shop->owner = NULL; return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_HeartBlockContent__setupGfx /* 105FB0 802E4730 27BDFF78 */ addiu $sp, $sp, -0x88 /* 105FB4 802E4734 AFB00060 */ sw $s0, 0x60($sp) /* 105FB8 802E4738 00A0802D */ daddu $s0, $a1, $zero /* 105FBC 802E473C AFBF0084 */ sw $ra, 0x84($sp) /* 105FC0 802E4740 AFBE0080 */ sw $fp, 0x80($sp) /* 105FC4 802E4744 AFB7007C */ sw $s7, 0x7C($sp) /* 105FC8 802E4748 AFB60078 */ sw $s6, 0x78($sp) /* 105FCC 802E474C AFB50074 */ sw $s5, 0x74($sp) /* 105FD0 802E4750 AFB40070 */ sw $s4, 0x70($sp) /* 105FD4 802E4754 AFB3006C */ sw $s3, 0x6C($sp) /* 105FD8 802E4758 AFB20068 */ sw $s2, 0x68($sp) /* 105FDC 802E475C 0C04417A */ jal get_entity_by_index /* 105FE0 802E4760 AFB10064 */ sw $s1, 0x64($sp) /* 105FE4 802E4764 3C04FCFF */ lui $a0, (0xFCFFB3FF >> 16) /* 105FE8 802E4768 3484B3FF */ ori $a0, $a0, (0xFCFFB3FF & 0xFFFF) /* 105FEC 802E476C 3C03FF2C */ lui $v1, (0xFF2CFE7F >> 16) /* 105FF0 802E4770 3463FE7F */ ori $v1, $v1, (0xFF2CFE7F & 0xFFFF) /* 105FF4 802E4774 2415005C */ addiu $s5, $zero, 0x5C /* 105FF8 802E4778 0040882D */ daddu $s1, $v0, $zero /* 105FFC 802E477C 3210FFFF */ andi $s0, $s0, 0xFFFF /* 106000 802E4780 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 106004 802E4784 8E52A66C */ lw $s2, %lo(gMainGfxPos)($s2) /* 106008 802E4788 8E330040 */ lw $s3, 0x40($s1) /* 10600C 802E478C 8E250044 */ lw $a1, 0x44($s1) /* 106010 802E4790 0240102D */ daddu $v0, $s2, $zero /* 106014 802E4794 26520008 */ addiu $s2, $s2, 0x8 /* 106018 802E4798 AC430004 */ sw $v1, 0x4($v0) /* 10601C 802E479C 0240182D */ daddu $v1, $s2, $zero /* 106020 802E47A0 AC440000 */ sw $a0, 0x0($v0) /* 106024 802E47A4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 106028 802E47A8 AC620000 */ sw $v0, 0x0($v1) /* 10602C 802E47AC 9222000B */ lbu $v0, 0xB($s1) /* 106030 802E47B0 26520008 */ addiu $s2, $s2, 0x8 /* 106034 802E47B4 AC620004 */ sw $v0, 0x4($v1) /* 106038 802E47B8 9223000B */ lbu $v1, 0xB($s1) /* 10603C 802E47BC 0075102A */ slt $v0, $v1, $s5 /* 106040 802E47C0 10400002 */ beqz $v0, .L802E47CC /* 106044 802E47C4 00B0F021 */ addu $fp, $a1, $s0 /* 106048 802E47C8 0060A82D */ daddu $s5, $v1, $zero .L802E47CC: /* 10604C 802E47CC 0260202D */ daddu $a0, $s3, $zero /* 106050 802E47D0 0C0B91C4 */ jal entity_HeartBlockContent_get_previous_yaw /* 106054 802E47D4 24050002 */ addiu $a1, $zero, 0x2 /* 106058 802E47D8 44050000 */ mfc1 $a1, $f0 /* 10605C 802E47DC 44800000 */ mtc1 $zero, $f0 /* 106060 802E47E0 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 106064 802E47E4 44060000 */ mfc1 $a2, $f0 /* 106068 802E47E8 27A40018 */ addiu $a0, $sp, 0x18 /* 10606C 802E47EC 0C019EC8 */ jal guRotateF /* 106070 802E47F0 AFA60010 */ sw $a2, 0x10($sp) /* 106074 802E47F4 27A40018 */ addiu $a0, $sp, 0x18 /* 106078 802E47F8 26700058 */ addiu $s0, $s3, 0x58 /* 10607C 802E47FC 0C019D40 */ jal guMtxF2L /* 106080 802E4800 0200282D */ daddu $a1, $s0, $zero /* 106084 802E4804 3C040001 */ lui $a0, (0x11630 >> 16) /* 106088 802E4808 34841630 */ ori $a0, $a0, (0x11630 & 0xFFFF) /* 10608C 802E480C 26650098 */ addiu $a1, $s3, 0x98 /* 106090 802E4810 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 106094 802E4814 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0) /* 106098 802E4818 3C03800A */ lui $v1, %hi(gDisplayContext) /* 10609C 802E481C 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 1060A0 802E4820 00021180 */ sll $v0, $v0, 6 /* 1060A4 802E4824 00621821 */ addu $v1, $v1, $v0 /* 1060A8 802E4828 00641821 */ addu $v1, $v1, $a0 .L802E482C: /* 1060AC 802E482C 8E160000 */ lw $s6, 0x0($s0) /* 1060B0 802E4830 8E170004 */ lw $s7, 0x4($s0) /* 1060B4 802E4834 8E180008 */ lw $t8, 0x8($s0) /* 1060B8 802E4838 8E19000C */ lw $t9, 0xC($s0) /* 1060BC 802E483C AC760000 */ sw $s6, 0x0($v1) /* 1060C0 802E4840 AC770004 */ sw $s7, 0x4($v1) /* 1060C4 802E4844 AC780008 */ sw $t8, 0x8($v1) /* 1060C8 802E4848 AC79000C */ sw $t9, 0xC($v1) /* 1060CC 802E484C 26100010 */ addiu $s0, $s0, 0x10 /* 1060D0 802E4850 1605FFF6 */ bne $s0, $a1, .L802E482C /* 1060D4 802E4854 24630010 */ addiu $v1, $v1, 0x10 /* 1060D8 802E4858 0240502D */ daddu $t2, $s2, $zero /* 1060DC 802E485C 26520008 */ addiu $s2, $s2, 0x8 /* 1060E0 802E4860 3C160001 */ lui $s6, (0x11630 >> 16) /* 1060E4 802E4864 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 1060E8 802E4868 0240482D */ daddu $t1, $s2, $zero /* 1060EC 802E486C 26520008 */ addiu $s2, $s2, 0x8 /* 1060F0 802E4870 3C0FE200 */ lui $t7, (0xE200001C >> 16) /* 1060F4 802E4874 35EF001C */ ori $t7, $t7, (0xE200001C & 0xFFFF) /* 1060F8 802E4878 3C0E0050 */ lui $t6, (0x504358 >> 16) /* 1060FC 802E487C 35CE4358 */ ori $t6, $t6, (0x504358 & 0xFFFF) /* 106100 802E4880 0240302D */ daddu $a2, $s2, $zero /* 106104 802E4884 26520008 */ addiu $s2, $s2, 0x8 /* 106108 802E4888 0240382D */ daddu $a3, $s2, $zero /* 10610C 802E488C 26520008 */ addiu $s2, $s2, 0x8 /* 106110 802E4890 0240402D */ daddu $t0, $s2, $zero /* 106114 802E4894 26520008 */ addiu $s2, $s2, 0x8 /* 106118 802E4898 3C0DFCFF */ lui $t5, (0xFCFFB3FF >> 16) /* 10611C 802E489C 35ADB3FF */ ori $t5, $t5, (0xFCFFB3FF & 0xFFFF) /* 106120 802E48A0 3C0CFF2C */ lui $t4, (0xFF2CFE7F >> 16) /* 106124 802E48A4 358CFE7F */ ori $t4, $t4, (0xFF2CFE7F & 0xFFFF) /* 106128 802E48A8 0240202D */ daddu $a0, $s2, $zero /* 10612C 802E48AC 26520008 */ addiu $s2, $s2, 0x8 /* 106130 802E48B0 0240282D */ daddu $a1, $s2, $zero /* 106134 802E48B4 3C0BD838 */ lui $t3, (0xD8380002 >> 16) /* 106138 802E48B8 356B0002 */ ori $t3, $t3, (0xD8380002 & 0xFFFF) /* 10613C 802E48BC 3C148007 */ lui $s4, %hi(gMatrixListPos) /* 106140 802E48C0 269441F0 */ addiu $s4, $s4, %lo(gMatrixListPos) /* 106144 802E48C4 AFB60058 */ sw $s6, 0x58($sp) /* 106148 802E48C8 96820000 */ lhu $v0, 0x0($s4) /* 10614C 802E48CC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 106150 802E48D0 AD430000 */ sw $v1, 0x0($t2) /* 106154 802E48D4 24430001 */ addiu $v1, $v0, 0x1 /* 106158 802E48D8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 10615C 802E48DC 00021180 */ sll $v0, $v0, 6 /* 106160 802E48E0 A6830000 */ sh $v1, 0x0($s4) /* 106164 802E48E4 3C03800A */ lui $v1, %hi(gDisplayContext) /* 106168 802E48E8 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 10616C 802E48EC 00561021 */ addu $v0, $v0, $s6 /* 106170 802E48F0 00621821 */ addu $v1, $v1, $v0 /* 106174 802E48F4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 106178 802E48F8 AD430004 */ sw $v1, 0x4($t2) /* 10617C 802E48FC AD2F0000 */ sw $t7, 0x0($t1) /* 106180 802E4900 AD2E0004 */ sw $t6, 0x4($t1) /* 106184 802E4904 ACC20000 */ sw $v0, 0x0($a2) /* 106188 802E4908 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 10618C 802E490C ACDE0004 */ sw $fp, 0x4($a2) /* 106190 802E4910 ACE20000 */ sw $v0, 0x0($a3) /* 106194 802E4914 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 106198 802E4918 ACE00004 */ sw $zero, 0x4($a3) /* 10619C 802E491C AD0D0000 */ sw $t5, 0x0($t0) /* 1061A0 802E4920 AD0C0004 */ sw $t4, 0x4($t0) /* 1061A4 802E4924 AC820000 */ sw $v0, 0x0($a0) /* 1061A8 802E4928 24020040 */ addiu $v0, $zero, 0x40 /* 1061AC 802E492C AC950004 */ sw $s5, 0x4($a0) /* 1061B0 802E4930 ACAB0000 */ sw $t3, 0x0($a1) /* 1061B4 802E4934 ACA20004 */ sw $v0, 0x4($a1) /* 1061B8 802E4938 9223000B */ lbu $v1, 0xB($s1) /* 1061BC 802E493C 24150048 */ addiu $s5, $zero, 0x48 /* 1061C0 802E4940 0075102A */ slt $v0, $v1, $s5 /* 1061C4 802E4944 10400002 */ beqz $v0, .L802E4950 /* 1061C8 802E4948 26520008 */ addiu $s2, $s2, 0x8 /* 1061CC 802E494C 0060A82D */ daddu $s5, $v1, $zero .L802E4950: /* 1061D0 802E4950 0260202D */ daddu $a0, $s3, $zero /* 1061D4 802E4954 0C0B91C4 */ jal entity_HeartBlockContent_get_previous_yaw /* 1061D8 802E4958 24050003 */ addiu $a1, $zero, 0x3 /* 1061DC 802E495C 44050000 */ mfc1 $a1, $f0 /* 1061E0 802E4960 44800000 */ mtc1 $zero, $f0 /* 1061E4 802E4964 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 1061E8 802E4968 44060000 */ mfc1 $a2, $f0 /* 1061EC 802E496C 27A40018 */ addiu $a0, $sp, 0x18 /* 1061F0 802E4970 0C019EC8 */ jal guRotateF /* 1061F4 802E4974 AFA60010 */ sw $a2, 0x10($sp) /* 1061F8 802E4978 27A40018 */ addiu $a0, $sp, 0x18 /* 1061FC 802E497C 26700098 */ addiu $s0, $s3, 0x98 /* 106200 802E4980 0C019D40 */ jal guMtxF2L /* 106204 802E4984 0200282D */ daddu $a1, $s0, $zero /* 106208 802E4988 266400D8 */ addiu $a0, $s3, 0xD8 /* 10620C 802E498C 96820000 */ lhu $v0, 0x0($s4) /* 106210 802E4990 3C03800A */ lui $v1, %hi(gDisplayContext) /* 106214 802E4994 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 106218 802E4998 8FB70058 */ lw $s7, 0x58($sp) /* 10621C 802E499C 00021180 */ sll $v0, $v0, 6 /* 106220 802E49A0 00621821 */ addu $v1, $v1, $v0 /* 106224 802E49A4 00771821 */ addu $v1, $v1, $s7 .L802E49A8: /* 106228 802E49A8 8E180000 */ lw $t8, 0x0($s0) /* 10622C 802E49AC 8E190004 */ lw $t9, 0x4($s0) /* 106230 802E49B0 8E160008 */ lw $s6, 0x8($s0) /* 106234 802E49B4 8E17000C */ lw $s7, 0xC($s0) /* 106238 802E49B8 AC780000 */ sw $t8, 0x0($v1) /* 10623C 802E49BC AC790004 */ sw $t9, 0x4($v1) /* 106240 802E49C0 AC760008 */ sw $s6, 0x8($v1) /* 106244 802E49C4 AC77000C */ sw $s7, 0xC($v1) /* 106248 802E49C8 26100010 */ addiu $s0, $s0, 0x10 /* 10624C 802E49CC 1604FFF6 */ bne $s0, $a0, .L802E49A8 /* 106250 802E49D0 24630010 */ addiu $v1, $v1, 0x10 /* 106254 802E49D4 0240582D */ daddu $t3, $s2, $zero /* 106258 802E49D8 26520008 */ addiu $s2, $s2, 0x8 /* 10625C 802E49DC 3C110001 */ lui $s1, (0x11630 >> 16) /* 106260 802E49E0 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 106264 802E49E4 0240502D */ daddu $t2, $s2, $zero /* 106268 802E49E8 26520008 */ addiu $s2, $s2, 0x8 /* 10626C 802E49EC 3C10E200 */ lui $s0, (0xE200001C >> 16) /* 106270 802E49F0 3610001C */ ori $s0, $s0, (0xE200001C & 0xFFFF) /* 106274 802E49F4 3C0F0050 */ lui $t7, (0x504358 >> 16) /* 106278 802E49F8 35EF4358 */ ori $t7, $t7, (0x504358 & 0xFFFF) /* 10627C 802E49FC 0240382D */ daddu $a3, $s2, $zero /* 106280 802E4A00 26520008 */ addiu $s2, $s2, 0x8 /* 106284 802E4A04 0240402D */ daddu $t0, $s2, $zero /* 106288 802E4A08 26520008 */ addiu $s2, $s2, 0x8 /* 10628C 802E4A0C 0240482D */ daddu $t1, $s2, $zero /* 106290 802E4A10 26520008 */ addiu $s2, $s2, 0x8 /* 106294 802E4A14 3C0EFCFF */ lui $t6, (0xFCFFB3FF >> 16) /* 106298 802E4A18 35CEB3FF */ ori $t6, $t6, (0xFCFFB3FF & 0xFFFF) /* 10629C 802E4A1C 3C0DFF2C */ lui $t5, (0xFF2CFE7F >> 16) /* 1062A0 802E4A20 35ADFE7F */ ori $t5, $t5, (0xFF2CFE7F & 0xFFFF) /* 1062A4 802E4A24 0240282D */ daddu $a1, $s2, $zero /* 1062A8 802E4A28 26520008 */ addiu $s2, $s2, 0x8 /* 1062AC 802E4A2C 0240302D */ daddu $a2, $s2, $zero /* 1062B0 802E4A30 26520008 */ addiu $s2, $s2, 0x8 /* 1062B4 802E4A34 3C0CD838 */ lui $t4, (0xD8380002 >> 16) /* 1062B8 802E4A38 358C0002 */ ori $t4, $t4, (0xD8380002 & 0xFFFF) /* 1062BC 802E4A3C 3C048007 */ lui $a0, %hi(gMatrixListPos) /* 1062C0 802E4A40 248441F0 */ addiu $a0, $a0, %lo(gMatrixListPos) /* 1062C4 802E4A44 94820000 */ lhu $v0, 0x0($a0) /* 1062C8 802E4A48 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 1062CC 802E4A4C AD630000 */ sw $v1, 0x0($t3) /* 1062D0 802E4A50 3C01800A */ lui $at, %hi(gMainGfxPos) /* 1062D4 802E4A54 AC32A66C */ sw $s2, %lo(gMainGfxPos)($at) /* 1062D8 802E4A58 24430001 */ addiu $v1, $v0, 0x1 /* 1062DC 802E4A5C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 1062E0 802E4A60 00021180 */ sll $v0, $v0, 6 /* 1062E4 802E4A64 A4830000 */ sh $v1, 0x0($a0) /* 1062E8 802E4A68 3C03800A */ lui $v1, %hi(gDisplayContext) /* 1062EC 802E4A6C 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 1062F0 802E4A70 00511021 */ addu $v0, $v0, $s1 /* 1062F4 802E4A74 00621821 */ addu $v1, $v1, $v0 /* 1062F8 802E4A78 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 1062FC 802E4A7C AD630004 */ sw $v1, 0x4($t3) /* 106300 802E4A80 AD500000 */ sw $s0, 0x0($t2) /* 106304 802E4A84 AD4F0004 */ sw $t7, 0x4($t2) /* 106308 802E4A88 ACE20000 */ sw $v0, 0x0($a3) /* 10630C 802E4A8C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 106310 802E4A90 ACFE0004 */ sw $fp, 0x4($a3) /* 106314 802E4A94 AD020000 */ sw $v0, 0x0($t0) /* 106318 802E4A98 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 10631C 802E4A9C AD000004 */ sw $zero, 0x4($t0) /* 106320 802E4AA0 AD2E0000 */ sw $t6, 0x0($t1) /* 106324 802E4AA4 AD2D0004 */ sw $t5, 0x4($t1) /* 106328 802E4AA8 ACA20000 */ sw $v0, 0x0($a1) /* 10632C 802E4AAC 24020040 */ addiu $v0, $zero, 0x40 /* 106330 802E4AB0 ACB50004 */ sw $s5, 0x4($a1) /* 106334 802E4AB4 ACCC0000 */ sw $t4, 0x0($a2) /* 106338 802E4AB8 ACC20004 */ sw $v0, 0x4($a2) /* 10633C 802E4ABC 8FBF0084 */ lw $ra, 0x84($sp) /* 106340 802E4AC0 8FBE0080 */ lw $fp, 0x80($sp) /* 106344 802E4AC4 8FB7007C */ lw $s7, 0x7C($sp) /* 106348 802E4AC8 8FB60078 */ lw $s6, 0x78($sp) /* 10634C 802E4ACC 8FB50074 */ lw $s5, 0x74($sp) /* 106350 802E4AD0 8FB40070 */ lw $s4, 0x70($sp) /* 106354 802E4AD4 8FB3006C */ lw $s3, 0x6C($sp) /* 106358 802E4AD8 8FB20068 */ lw $s2, 0x68($sp) /* 10635C 802E4ADC 8FB10064 */ lw $s1, 0x64($sp) /* 106360 802E4AE0 8FB00060 */ lw $s0, 0x60($sp) /* 106364 802E4AE4 03E00008 */ jr $ra /* 106368 802E4AE8 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: void entity_HeartBlockContent__setupGfx(s32 entityIndex, Gfx* arg1) { Entity* entity = get_entity_by_index(entityIndex); HeartBlockContentData* data = entity->dataBuf.heartBlockContent; Gfx* gfxPos = gMainGfxPos; s32 alpha; Matrix4f sp18; Gfx* dlist; dlist = ENTITY_ADDR(entity, Gfx*, arg1); gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02); gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, entity->alpha); alpha = 92; if (entity->alpha < alpha) { alpha = entity->alpha; } guRotateF(sp18, entity_HeartBlockContent_get_previous_yaw(data, 2), 0.0f, 1.0f, 0.0f); guMtxF2L(sp18, &data->unk_58); gDisplayContext->matrixStack[gMatrixListPos] = data->unk_58; gSPMatrix(gfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetRenderMode(gfxPos++, AA_EN | Z_CMP | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), AA_EN | Z_CMP | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); gSPDisplayList(gfxPos++, dlist); gDPPipeSync(gfxPos++); gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02); gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, alpha); gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW); alpha = 72; if (entity->alpha < alpha) { alpha = entity->alpha; } guRotateF(sp18, entity_HeartBlockContent_get_previous_yaw(data, 3), 0.0f, 1.0f, 0.0f); guMtxF2L(sp18, &data->unk_98); gDisplayContext->matrixStack[gMatrixListPos] = data->unk_98; gSPMatrix(gfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetRenderMode(gfxPos++, AA_EN | Z_CMP | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), AA_EN | Z_CMP | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); gSPDisplayList(gfxPos++, dlist); gDPPipeSync(gfxPos++); gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02); gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, alpha); gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW); gMainGfxPos = gfxPos; }
### RAW ASSEMBLY INSTRUCTIONS: glabel aura_main /* 377070 E0076000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 377074 E0076004 F7B60040 */ sdc1 $f22, 0x40($sp) /* 377078 E0076008 4485B000 */ mtc1 $a1, $f22 /* 37707C E007600C F7B80048 */ sdc1 $f24, 0x48($sp) /* 377080 E0076010 4486C000 */ mtc1 $a2, $f24 /* 377084 E0076014 AFB00028 */ sw $s0, 0x28($sp) /* 377088 E0076018 0080802D */ daddu $s0, $a0, $zero /* 37708C E007601C F7BA0050 */ sdc1 $f26, 0x50($sp) /* 377090 E0076020 4487D000 */ mtc1 $a3, $f26 /* 377094 E0076024 27A40010 */ addiu $a0, $sp, 0x10 /* 377098 E0076028 F7B40038 */ sdc1 $f20, 0x38($sp) /* 37709C E007602C C7B40068 */ lwc1 $f20, 0x68($sp) /* 3770A0 E0076030 3C02E007 */ lui $v0, %hi(aura_init) /* 3770A4 E0076034 24426370 */ addiu $v0, $v0, %lo(aura_init) /* 3770A8 E0076038 AFA20018 */ sw $v0, 0x18($sp) /* 3770AC E007603C 3C02E007 */ lui $v0, %hi(aura_update) /* 3770B0 E0076040 24426378 */ addiu $v0, $v0, %lo(aura_update) /* 3770B4 E0076044 AFA2001C */ sw $v0, 0x1C($sp) /* 3770B8 E0076048 3C02E007 */ lui $v0, %hi(aura_render) /* 3770BC E007604C 24426808 */ addiu $v0, $v0, %lo(aura_render) /* 3770C0 E0076050 AFA20020 */ sw $v0, 0x20($sp) /* 3770C4 E0076054 2402003B */ addiu $v0, $zero, 0x3B /* 3770C8 E0076058 AFBF0030 */ sw $ra, 0x30($sp) /* 3770CC E007605C AFB1002C */ sw $s1, 0x2C($sp) /* 3770D0 E0076060 AFA00010 */ sw $zero, 0x10($sp) /* 3770D4 E0076064 AFA00024 */ sw $zero, 0x24($sp) /* 3770D8 E0076068 0C080124 */ jal shim_create_effect_instance /* 3770DC E007606C AFA20014 */ sw $v0, 0x14($sp) /* 3770E0 E0076070 24040070 */ addiu $a0, $zero, 0x70 /* 3770E4 E0076074 24030001 */ addiu $v1, $zero, 0x1 /* 3770E8 E0076078 0040882D */ daddu $s1, $v0, $zero /* 3770EC E007607C 0C08012C */ jal shim_general_heap_malloc /* 3770F0 E0076080 AE230008 */ sw $v1, 0x8($s1) /* 3770F4 E0076084 0040182D */ daddu $v1, $v0, $zero /* 3770F8 E0076088 14600003 */ bnez $v1, .LE0076098 /* 3770FC E007608C AE22000C */ sw $v0, 0xC($s1) .LE0076090: /* 377100 E0076090 0801D824 */ j .LE0076090 /* 377104 E0076094 00000000 */ nop .LE0076098: /* 377108 E0076098 AC600064 */ sw $zero, 0x64($v1) /* 37710C E007609C C46A0064 */ lwc1 $f10, 0x64($v1) /* 377110 E00760A0 24020064 */ addiu $v0, $zero, 0x64 /* 377114 E00760A4 AC62002C */ sw $v0, 0x2C($v1) /* 377118 E00760A8 24020001 */ addiu $v0, $zero, 0x1 /* 37711C E00760AC AC700000 */ sw $s0, 0x0($v1) /* 377120 E00760B0 AC600030 */ sw $zero, 0x30($v1) /* 377124 E00760B4 AC600028 */ sw $zero, 0x28($v1) /* 377128 E00760B8 E4760004 */ swc1 $f22, 0x4($v1) /* 37712C E00760BC E4780008 */ swc1 $f24, 0x8($v1) /* 377130 E00760C0 E47A000C */ swc1 $f26, 0xC($v1) /* 377134 E00760C4 E46A0040 */ swc1 $f10, 0x40($v1) /* 377138 E00760C8 E46A0034 */ swc1 $f10, 0x34($v1) /* 37713C E00760CC E46A0058 */ swc1 $f10, 0x58($v1) /* 377140 E00760D0 12020033 */ beq $s0, $v0, .LE00761A0 /* 377144 E00760D4 E46A004C */ swc1 $f10, 0x4C($v1) /* 377148 E00760D8 2A020002 */ slti $v0, $s0, 0x2 /* 37714C E00760DC 10400005 */ beqz $v0, .LE00760F4 /* 377150 E00760E0 24020002 */ addiu $v0, $zero, 0x2 /* 377154 E00760E4 12000007 */ beqz $s0, .LE0076104 /* 377158 E00760E8 2402004B */ addiu $v0, $zero, 0x4B /* 37715C E00760EC 0801D8A4 */ j .LE0076290 /* 377160 E00760F0 00000000 */ nop .LE00760F4: /* 377164 E00760F4 12020045 */ beq $s0, $v0, .LE007620C /* 377168 E00760F8 24020019 */ addiu $v0, $zero, 0x19 /* 37716C E00760FC 0801D8A4 */ j .LE0076290 /* 377170 E0076100 00000000 */ nop .LE0076104: /* 377174 E0076104 A0620068 */ sb $v0, 0x68($v1) /* 377178 E0076108 A0620069 */ sb $v0, 0x69($v1) /* 37717C E007610C A062006A */ sb $v0, 0x6A($v1) /* 377180 E0076110 240200FF */ addiu $v0, $zero, 0xFF /* 377184 E0076114 4600A021 */ cvt.d.s $f0, $f20 /* 377188 E0076118 3C01E007 */ lui $at, (0xE0076EE0 >> 16) /* 37718C E007611C D4226EE0 */ ldc1 $f2, (0xE0076EE0 & 0xFFFF)($at) /* 377190 E0076120 3C01BF66 */ lui $at, (0xBF666666 >> 16) /* 377194 E0076124 34216666 */ ori $at, $at, (0xBF666666 & 0xFFFF) /* 377198 E0076128 44813000 */ mtc1 $at, $f6 /* 37719C E007612C 3C013D23 */ lui $at, (0x3D23D70A >> 16) /* 3771A0 E0076130 3421D70A */ ori $at, $at, (0x3D23D70A & 0xFFFF) /* 3771A4 E0076134 44812000 */ mtc1 $at, $f4 /* 3771A8 E0076138 3C013F66 */ lui $at, (0x3F666666 >> 16) /* 3771AC E007613C 34216666 */ ori $at, $at, (0x3F666666 & 0xFFFF) /* 3771B0 E0076140 44814000 */ mtc1 $at, $f8 /* 3771B4 E0076144 46220082 */ mul.d $f2, $f0, $f2 /* 3771B8 E0076148 00000000 */ nop /* 3771BC E007614C A062006B */ sb $v0, 0x6B($v1) /* 3771C0 E0076150 240200F7 */ addiu $v0, $zero, 0xF7 /* 3771C4 E0076154 A062006C */ sb $v0, 0x6C($v1) /* 3771C8 E0076158 2402009B */ addiu $v0, $zero, 0x9B /* 3771CC E007615C A062006D */ sb $v0, 0x6D($v1) /* 3771D0 E0076160 A060006E */ sb $zero, 0x6E($v1) /* 3771D4 E0076164 E4740024 */ swc1 $f20, 0x24($v1) /* 3771D8 E0076168 46200000 */ add.d $f0, $f0, $f0 /* 3771DC E007616C E4660038 */ swc1 $f6, 0x38($v1) /* 3771E0 E0076170 E4640044 */ swc1 $f4, 0x44($v1) /* 3771E4 E0076174 E464003C */ swc1 $f4, 0x3C($v1) /* 3771E8 E0076178 E4680048 */ swc1 $f8, 0x48($v1) /* 3771EC E007617C E4660050 */ swc1 $f6, 0x50($v1) /* 3771F0 E0076180 E464005C */ swc1 $f4, 0x5C($v1) /* 3771F4 E0076184 E4640054 */ swc1 $f4, 0x54($v1) /* 3771F8 E0076188 E4680060 */ swc1 $f8, 0x60($v1) /* 3771FC E007618C 46200020 */ cvt.s.d $f0, $f0 /* 377200 E0076190 E460001C */ swc1 $f0, 0x1C($v1) /* 377204 E0076194 462010A0 */ cvt.s.d $f2, $f2 /* 377208 E0076198 0801D8CB */ j .LE007632C /* 37720C E007619C E4620020 */ swc1 $f2, 0x20($v1) .LE00761A0: /* 377210 E00761A0 3C013D23 */ lui $at, (0x3D23D70A >> 16) /* 377214 E00761A4 3421D70A */ ori $at, $at, (0x3D23D70A & 0xFFFF) /* 377218 E00761A8 44810000 */ mtc1 $at, $f0 /* 37721C E00761AC 3C013F66 */ lui $at, (0x3F666666 >> 16) /* 377220 E00761B0 34216666 */ ori $at, $at, (0x3F666666 & 0xFFFF) /* 377224 E00761B4 44811000 */ mtc1 $at, $f2 /* 377228 E00761B8 2402004B */ addiu $v0, $zero, 0x4B /* 37722C E00761BC A0620068 */ sb $v0, 0x68($v1) /* 377230 E00761C0 A0620069 */ sb $v0, 0x69($v1) /* 377234 E00761C4 A062006A */ sb $v0, 0x6A($v1) /* 377238 E00761C8 240200FF */ addiu $v0, $zero, 0xFF /* 37723C E00761CC A062006B */ sb $v0, 0x6B($v1) /* 377240 E00761D0 A060006C */ sb $zero, 0x6C($v1) /* 377244 E00761D4 A060006D */ sb $zero, 0x6D($v1) /* 377248 E00761D8 A060006E */ sb $zero, 0x6E($v1) /* 37724C E00761DC E474001C */ swc1 $f20, 0x1C($v1) /* 377250 E00761E0 E4740020 */ swc1 $f20, 0x20($v1) /* 377254 E00761E4 E4740024 */ swc1 $f20, 0x24($v1) /* 377258 E00761E8 E46A0038 */ swc1 $f10, 0x38($v1) /* 37725C E00761EC E46A0050 */ swc1 $f10, 0x50($v1) /* 377260 E00761F0 E4600044 */ swc1 $f0, 0x44($v1) /* 377264 E00761F4 E460003C */ swc1 $f0, 0x3C($v1) /* 377268 E00761F8 E4620048 */ swc1 $f2, 0x48($v1) /* 37726C E00761FC E460005C */ swc1 $f0, 0x5C($v1) /* 377270 E0076200 E4600054 */ swc1 $f0, 0x54($v1) /* 377274 E0076204 0801D8CB */ j .LE007632C /* 377278 E0076208 E4620060 */ swc1 $f2, 0x60($v1) .LE007620C: /* 37727C E007620C 3C013D23 */ lui $at, (0x3D23D70A >> 16) /* 377280 E0076210 3421D70A */ ori $at, $at, (0x3D23D70A & 0xFFFF) /* 377284 E0076214 44810000 */ mtc1 $at, $f0 /* 377288 E0076218 3C013E4C */ lui $at, (0x3E4CCCCD >> 16) /* 37728C E007621C 3421CCCD */ ori $at, $at, (0x3E4CCCCD & 0xFFFF) /* 377290 E0076220 44811000 */ mtc1 $at, $f2 /* 377294 E0076224 3C013FA6 */ lui $at, (0x3FA66666 >> 16) /* 377298 E0076228 34216666 */ ori $at, $at, (0x3FA66666 & 0xFFFF) /* 37729C E007622C 44812000 */ mtc1 $at, $f4 /* 3772A0 E0076230 3C013E23 */ lui $at, (0x3E23D70A >> 16) /* 3772A4 E0076234 3421D70A */ ori $at, $at, (0x3E23D70A & 0xFFFF) /* 3772A8 E0076238 44813000 */ mtc1 $at, $f6 /* 3772AC E007623C 3C013F85 */ lui $at, (0x3F851EB8 >> 16) /* 3772B0 E0076240 34211EB8 */ ori $at, $at, (0x3F851EB8 & 0xFFFF) /* 3772B4 E0076244 44814000 */ mtc1 $at, $f8 /* 3772B8 E0076248 A0620068 */ sb $v0, 0x68($v1) /* 3772BC E007624C 24020079 */ addiu $v0, $zero, 0x79 /* 3772C0 E0076250 A0620069 */ sb $v0, 0x69($v1) /* 3772C4 E0076254 2402008E */ addiu $v0, $zero, 0x8E /* 3772C8 E0076258 A062006A */ sb $v0, 0x6A($v1) /* 3772CC E007625C 24020022 */ addiu $v0, $zero, 0x22 /* 3772D0 E0076260 A062006B */ sb $v0, 0x6B($v1) /* 3772D4 E0076264 240200FF */ addiu $v0, $zero, 0xFF /* 3772D8 E0076268 A062006D */ sb $v0, 0x6D($v1) /* 3772DC E007626C 24020051 */ addiu $v0, $zero, 0x51 /* 3772E0 E0076270 A060006C */ sb $zero, 0x6C($v1) /* 3772E4 E0076274 A062006E */ sb $v0, 0x6E($v1) /* 3772E8 E0076278 E474001C */ swc1 $f20, 0x1C($v1) /* 3772EC E007627C E4740020 */ swc1 $f20, 0x20($v1) /* 3772F0 E0076280 E4740024 */ swc1 $f20, 0x24($v1) /* 3772F4 E0076284 E46A0038 */ swc1 $f10, 0x38($v1) /* 3772F8 E0076288 0801D8C5 */ j .LE0076314 /* 3772FC E007628C E46A0050 */ swc1 $f10, 0x50($v1) .LE0076290: /* 377300 E0076290 3C013D23 */ lui $at, (0x3D23D70A >> 16) /* 377304 E0076294 3421D70A */ ori $at, $at, (0x3D23D70A & 0xFFFF) /* 377308 E0076298 44810000 */ mtc1 $at, $f0 /* 37730C E007629C 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) /* 377310 E00762A0 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) /* 377314 E00762A4 44811000 */ mtc1 $at, $f2 /* 377318 E00762A8 3C013FD9 */ lui $at, (0x3FD9999A >> 16) /* 37731C E00762AC 3421999A */ ori $at, $at, (0x3FD9999A & 0xFFFF) /* 377320 E00762B0 44812000 */ mtc1 $at, $f4 /* 377324 E00762B4 3C013DA3 */ lui $at, (0x3DA3D70A >> 16) /* 377328 E00762B8 3421D70A */ ori $at, $at, (0x3DA3D70A & 0xFFFF) /* 37732C E00762BC 44813000 */ mtc1 $at, $f6 /* 377330 E00762C0 3C013FAE */ lui $at, (0x3FAE147B >> 16) /* 377334 E00762C4 3421147B */ ori $at, $at, (0x3FAE147B & 0xFFFF) /* 377338 E00762C8 44814000 */ mtc1 $at, $f8 /* 37733C E00762CC 240200B3 */ addiu $v0, $zero, 0xB3 /* 377340 E00762D0 A0620068 */ sb $v0, 0x68($v1) /* 377344 E00762D4 240200A9 */ addiu $v0, $zero, 0xA9 /* 377348 E00762D8 A0620069 */ sb $v0, 0x69($v1) /* 37734C E00762DC 24020055 */ addiu $v0, $zero, 0x55 /* 377350 E00762E0 A062006A */ sb $v0, 0x6A($v1) /* 377354 E00762E4 24020022 */ addiu $v0, $zero, 0x22 /* 377358 E00762E8 A062006B */ sb $v0, 0x6B($v1) /* 37735C E00762EC 240200FF */ addiu $v0, $zero, 0xFF /* 377360 E00762F0 A062006D */ sb $v0, 0x6D($v1) /* 377364 E00762F4 2402003F */ addiu $v0, $zero, 0x3F /* 377368 E00762F8 A060006C */ sb $zero, 0x6C($v1) /* 37736C E00762FC A062006E */ sb $v0, 0x6E($v1) /* 377370 E0076300 E474001C */ swc1 $f20, 0x1C($v1) /* 377374 E0076304 E4740020 */ swc1 $f20, 0x20($v1) /* 377378 E0076308 E4740024 */ swc1 $f20, 0x24($v1) /* 37737C E007630C AC600038 */ sw $zero, 0x38($v1) /* 377380 E0076310 AC600050 */ sw $zero, 0x50($v1) .LE0076314: /* 377384 E0076314 E4600044 */ swc1 $f0, 0x44($v1) /* 377388 E0076318 E462003C */ swc1 $f2, 0x3C($v1) /* 37738C E007631C E4640048 */ swc1 $f4, 0x48($v1) /* 377390 E0076320 E460005C */ swc1 $f0, 0x5C($v1) /* 377394 E0076324 E4660054 */ swc1 $f6, 0x54($v1) /* 377398 E0076328 E4680060 */ swc1 $f8, 0x60($v1) .LE007632C: /* 37739C E007632C C4600004 */ lwc1 $f0, 0x4($v1) /* 3773A0 E0076330 C4620008 */ lwc1 $f2, 0x8($v1) /* 3773A4 E0076334 C464000C */ lwc1 $f4, 0xC($v1) /* 3773A8 E0076338 E4600010 */ swc1 $f0, 0x10($v1) /* 3773AC E007633C E4620014 */ swc1 $f2, 0x14($v1) /* 3773B0 E0076340 E4640018 */ swc1 $f4, 0x18($v1) /* 3773B4 E0076344 8FA2006C */ lw $v0, 0x6C($sp) /* 3773B8 E0076348 AC510000 */ sw $s1, 0x0($v0) /* 3773BC E007634C 8FBF0030 */ lw $ra, 0x30($sp) /* 3773C0 E0076350 8FB1002C */ lw $s1, 0x2C($sp) /* 3773C4 E0076354 8FB00028 */ lw $s0, 0x28($sp) /* 3773C8 E0076358 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 3773CC E007635C D7B80048 */ ldc1 $f24, 0x48($sp) /* 3773D0 E0076360 D7B60040 */ ldc1 $f22, 0x40($sp) /* 3773D4 E0076364 D7B40038 */ ldc1 $f20, 0x38($sp) /* 3773D8 E0076368 03E00008 */ jr $ra /* 3773DC E007636C 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance** outEffect) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; AuraFXData* part; s32 numParts = 1; f32 zero; bp.init = aura_init; bp.update = aura_update; bp.renderWorld = aura_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_AURA; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.aura = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.aura != NULL); part->renderYaw = 0.0f; zero = 0.0f; part->unk_40 = zero; part->unk_34 = zero; part->unk_58 = zero; part->unk_4C = zero; part->fadeTime = 100; part->type = arg0; part->lifeTime = 0; part->primA = 0; part->posA.x = arg1; part->posA.y = arg2; part->posA.z = arg3; switch (arg0) { case 0: part->primR = 75; part->primG = 75; part->primB = 75; part->envR = 255; part->envG = 247; part->engB = 155; part->engA = 0; part->scale.x = arg4 * 2.0; part->scale.y = arg4 * 0.6; part->unk_24 = arg4; part->unk_38 = -0.9f; part->unk_44 = 0.04f; part->unk_3C = 0.04f; part->unk_48 = 0.9f; part->unk_50 = -0.9f; part->unk_5C = 0.04f; part->unk_54 = 0.04f; part->unk_60 = 0.9f; break; case 1: part->primR = 75; part->primG = 75; part->primB = 75; part->envR = 255; part->envG = 0; part->engB = 0; part->engA = 0; part->scale.x = arg4; part->scale.y = arg4; part->unk_24 = arg4; part->unk_38 = zero; part->unk_50 = zero; part->unk_44 = 0.04f; part->unk_3C = 0.04f; part->unk_48 = 0.9f; part->unk_5C = 0.04f; part->unk_54 = 0.04f; part->unk_60 = 0.9f; break; case 2: part->primR = 25; part->primG = 121; part->primB = 142; part->envR = 34; part->engB = 255; part->envG = 0; part->engA = 81; part->scale.x = arg4; part->scale.y = arg4; part->unk_24 = arg4; part->unk_38 = zero; part->unk_50 = zero; part->unk_44 = 0.04f; part->unk_3C = 0.2f; part->unk_48 = 1.3f; part->unk_5C = 0.04f; part->unk_54 = 0.16f; part->unk_60 = 1.04f; break; default: part->primR = 179; part->primG = 169; part->primB = 85; part->envR = 34; part->engB = 255; part->envG = 0; part->engA = 63; part->scale.x = arg4; part->scale.y = arg4; part->unk_24 = arg4; part->unk_38 = 0.0f; part->unk_50 = 0.0f; part->unk_44 = 0.04f; part->unk_3C = 0.1f; part->unk_48 = 1.7f; part->unk_5C = 0.04f; part->unk_54 = 0.08f; part->unk_60 = 1.36f; break; } part->posB.x = part->posA.x; part->posB.y = part->posA.y; part->posB.z = part->posA.z; *outEffect = effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_camera_mode_4 /* 9D10 8002E910 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 9D14 8002E914 AFB00010 */ sw $s0, 0x10($sp) /* 9D18 8002E918 0080802D */ daddu $s0, $a0, $zero /* 9D1C 8002E91C AFBF0014 */ sw $ra, 0x14($sp) /* 9D20 8002E920 F7BE0040 */ sdc1 $f30, 0x40($sp) /* 9D24 8002E924 F7BC0038 */ sdc1 $f28, 0x38($sp) /* 9D28 8002E928 F7BA0030 */ sdc1 $f26, 0x30($sp) /* 9D2C 8002E92C F7B80028 */ sdc1 $f24, 0x28($sp) /* 9D30 8002E930 F7B60020 */ sdc1 $f22, 0x20($sp) /* 9D34 8002E934 F7B40018 */ sdc1 $f20, 0x18($sp) /* 9D38 8002E938 8602001C */ lh $v0, 0x1C($s0) /* 9D3C 8002E93C C6000060 */ lwc1 $f0, 0x60($s0) /* 9D40 8002E940 4482B000 */ mtc1 $v0, $f22 /* 9D44 8002E944 00000000 */ nop /* 9D48 8002E948 4680B5A0 */ cvt.s.w $f22, $f22 /* 9D4C 8002E94C 4600B03C */ c.lt.s $f22, $f0 /* 9D50 8002E950 00000000 */ nop /* 9D54 8002E954 45030001 */ bc1tl .L8002E95C /* 9D58 8002E958 4600B006 */ mov.s $f0, $f22 .L8002E95C: /* 9D5C 8002E95C 4600B107 */ neg.s $f4, $f22 /* 9D60 8002E960 4604003C */ c.lt.s $f0, $f4 /* 9D64 8002E964 00000000 */ nop /* 9D68 8002E968 45030001 */ bc1tl .L8002E970 /* 9D6C 8002E96C 46002006 */ mov.s $f0, $f4 .L8002E970: /* 9D70 8002E970 C6080068 */ lwc1 $f8, 0x68($s0) /* 9D74 8002E974 8602001E */ lh $v0, 0x1E($s0) /* 9D78 8002E978 4482C000 */ mtc1 $v0, $f24 /* 9D7C 8002E97C 00000000 */ nop /* 9D80 8002E980 4680C620 */ cvt.s.w $f24, $f24 /* 9D84 8002E984 4608C03C */ c.lt.s $f24, $f8 /* 9D88 8002E988 00000000 */ nop /* 9D8C 8002E98C 45000002 */ bc1f .L8002E998 /* 9D90 8002E990 E6000054 */ swc1 $f0, 0x54($s0) /* 9D94 8002E994 4600C206 */ mov.s $f8, $f24 .L8002E998: /* 9D98 8002E998 4600C007 */ neg.s $f0, $f24 /* 9D9C 8002E99C 4600403C */ c.lt.s $f8, $f0 /* 9DA0 8002E9A0 00000000 */ nop /* 9DA4 8002E9A4 45030001 */ bc1tl .L8002E9AC /* 9DA8 8002E9A8 46000206 */ mov.s $f8, $f0 .L8002E9AC: /* 9DAC 8002E9AC 86020020 */ lh $v0, 0x20($s0) /* 9DB0 8002E9B0 3C01800A */ lui $at, %hi(D_8009A5EC) /* 9DB4 8002E9B4 C424A5EC */ lwc1 $f4, %lo(D_8009A5EC)($at) /* 9DB8 8002E9B8 AE000070 */ sw $zero, 0x70($s0) /* 9DBC 8002E9BC 44821000 */ mtc1 $v0, $f2 /* 9DC0 8002E9C0 00000000 */ nop /* 9DC4 8002E9C4 468010A0 */ cvt.s.w $f2, $f2 /* 9DC8 8002E9C8 46041082 */ mul.s $f2, $f2, $f4 /* 9DCC 8002E9CC 00000000 */ nop /* 9DD0 8002E9D0 86020022 */ lh $v0, 0x22($s0) /* 9DD4 8002E9D4 C6060070 */ lwc1 $f6, 0x70($s0) /* 9DD8 8002E9D8 44820000 */ mtc1 $v0, $f0 /* 9DDC 8002E9DC 00000000 */ nop /* 9DE0 8002E9E0 46800020 */ cvt.s.w $f0, $f0 /* 9DE4 8002E9E4 86020006 */ lh $v0, 0x6($s0) /* 9DE8 8002E9E8 46040002 */ mul.s $f0, $f0, $f4 /* 9DEC 8002E9EC 00000000 */ nop /* 9DF0 8002E9F0 E608005C */ swc1 $f8, 0x5C($s0) /* 9DF4 8002E9F4 AE000074 */ sw $zero, 0x74($s0) /* 9DF8 8002E9F8 E6060084 */ swc1 $f6, 0x84($s0) /* 9DFC 8002E9FC E6020078 */ swc1 $f2, 0x78($s0) /* 9E00 8002EA00 10400047 */ beqz $v0, .L8002EB20 /* 9E04 8002EA04 E600007C */ swc1 $f0, 0x7C($s0) /* 9E08 8002EA08 4480F000 */ mtc1 $zero, $f30 /* 9E0C 8002EA0C C6020074 */ lwc1 $f2, 0x74($s0) /* 9E10 8002EA10 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 9E14 8002EA14 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 9E18 8002EA18 4481B000 */ mtc1 $at, $f22 /* 9E1C 8002EA1C C6080054 */ lwc1 $f8, 0x54($s0) /* 9E20 8002EA20 C6000058 */ lwc1 $f0, 0x58($s0) /* 9E24 8002EA24 C604007C */ lwc1 $f4, 0x7C($s0) /* 9E28 8002EA28 C606005C */ lwc1 $f6, 0x5C($s0) /* 9E2C 8002EA2C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 9E30 8002EA30 4481A000 */ mtc1 $at, $f20 /* 9E34 8002EA34 46161082 */ mul.s $f2, $f2, $f22 /* 9E38 8002EA38 00000000 */ nop /* 9E3C 8002EA3C A6000006 */ sh $zero, 0x6($s0) /* 9E40 8002EA40 E61E0098 */ swc1 $f30, 0x98($s0) /* 9E44 8002EA44 E61E009C */ swc1 $f30, 0x9C($s0) /* 9E48 8002EA48 46040000 */ add.s $f0, $f0, $f4 /* 9E4C 8002EA4C E6080048 */ swc1 $f8, 0x48($s0) /* 9E50 8002EA50 E6060050 */ swc1 $f6, 0x50($s0) /* 9E54 8002EA54 E600004C */ swc1 $f0, 0x4C($s0) /* 9E58 8002EA58 46141683 */ div.s $f26, $f2, $f20 /* 9E5C 8002EA5C 0C00A85B */ jal sin_rad /* 9E60 8002EA60 4600D306 */ mov.s $f12, $f26 /* 9E64 8002EA64 46000706 */ mov.s $f28, $f0 /* 9E68 8002EA68 0C00A874 */ jal cos_rad /* 9E6C 8002EA6C 4600D306 */ mov.s $f12, $f26 /* 9E70 8002EA70 46000286 */ mov.s $f10, $f0 /* 9E74 8002EA74 461E5202 */ mul.s $f8, $f10, $f30 /* 9E78 8002EA78 00000000 */ nop /* 9E7C 8002EA7C 4600F087 */ neg.s $f2, $f30 /* 9E80 8002EA80 4602E082 */ mul.s $f2, $f28, $f2 /* 9E84 8002EA84 00000000 */ nop /* 9E88 8002EA88 C6180078 */ lwc1 $f24, 0x78($s0) /* 9E8C 8002EA8C 461CC102 */ mul.s $f4, $f24, $f28 /* 9E90 8002EA90 00000000 */ nop /* 9E94 8002EA94 460AC182 */ mul.s $f6, $f24, $f10 /* 9E98 8002EA98 00000000 */ nop /* 9E9C 8002EA9C C6000070 */ lwc1 $f0, 0x70($s0) /* 9EA0 8002EAA0 46160002 */ mul.s $f0, $f0, $f22 /* 9EA4 8002EAA4 00000000 */ nop /* 9EA8 8002EAA8 4600F286 */ mov.s $f10, $f30 /* 9EAC 8002EAAC 46005586 */ mov.s $f22, $f10 /* 9EB0 8002EAB0 46044780 */ add.s $f30, $f8, $f4 /* 9EB4 8002EAB4 46140683 */ div.s $f26, $f0, $f20 /* 9EB8 8002EAB8 4600D306 */ mov.s $f12, $f26 /* 9EBC 8002EABC 0C00A85B */ jal sin_rad /* 9EC0 8002EAC0 46061600 */ add.s $f24, $f2, $f6 /* 9EC4 8002EAC4 46000706 */ mov.s $f28, $f0 /* 9EC8 8002EAC8 0C00A874 */ jal cos_rad /* 9ECC 8002EACC 4600D306 */ mov.s $f12, $f26 /* 9ED0 8002EAD0 46000286 */ mov.s $f10, $f0 /* 9ED4 8002EAD4 46165182 */ mul.s $f6, $f10, $f22 /* 9ED8 8002EAD8 00000000 */ nop /* 9EDC 8002EADC 4616E102 */ mul.s $f4, $f28, $f22 /* 9EE0 8002EAE0 00000000 */ nop /* 9EE4 8002EAE4 461CC082 */ mul.s $f2, $f24, $f28 /* 9EE8 8002EAE8 00000000 */ nop /* 9EEC 8002EAEC 460AC002 */ mul.s $f0, $f24, $f10 /* 9EF0 8002EAF0 00000000 */ nop /* 9EF4 8002EAF4 46023281 */ sub.s $f10, $f6, $f2 /* 9EF8 8002EAF8 46002180 */ add.s $f6, $f4, $f0 /* 9EFC 8002EAFC C600004C */ lwc1 $f0, 0x4C($s0) /* 9F00 8002EB00 461E0000 */ add.s $f0, $f0, $f30 /* 9F04 8002EB04 C6040048 */ lwc1 $f4, 0x48($s0) /* 9F08 8002EB08 460A2100 */ add.s $f4, $f4, $f10 /* 9F0C 8002EB0C C6020050 */ lwc1 $f2, 0x50($s0) /* 9F10 8002EB10 46061080 */ add.s $f2, $f2, $f6 /* 9F14 8002EB14 E6000040 */ swc1 $f0, 0x40($s0) /* 9F18 8002EB18 E604003C */ swc1 $f4, 0x3C($s0) /* 9F1C 8002EB1C E6020044 */ swc1 $f2, 0x44($s0) .L8002EB20: /* 9F20 8002EB20 4480F000 */ mtc1 $zero, $f30 /* 9F24 8002EB24 C6020074 */ lwc1 $f2, 0x74($s0) /* 9F28 8002EB28 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 9F2C 8002EB2C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 9F30 8002EB30 4481B000 */ mtc1 $at, $f22 /* 9F34 8002EB34 C6080054 */ lwc1 $f8, 0x54($s0) /* 9F38 8002EB38 46161082 */ mul.s $f2, $f2, $f22 /* 9F3C 8002EB3C 00000000 */ nop /* 9F40 8002EB40 C6000058 */ lwc1 $f0, 0x58($s0) /* 9F44 8002EB44 C604007C */ lwc1 $f4, 0x7C($s0) /* 9F48 8002EB48 C606005C */ lwc1 $f6, 0x5C($s0) /* 9F4C 8002EB4C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 9F50 8002EB50 4481A000 */ mtc1 $at, $f20 /* 9F54 8002EB54 46040000 */ add.s $f0, $f0, $f4 /* 9F58 8002EB58 E6080048 */ swc1 $f8, 0x48($s0) /* 9F5C 8002EB5C E6060050 */ swc1 $f6, 0x50($s0) /* 9F60 8002EB60 E600004C */ swc1 $f0, 0x4C($s0) /* 9F64 8002EB64 46141683 */ div.s $f26, $f2, $f20 /* 9F68 8002EB68 0C00A85B */ jal sin_rad /* 9F6C 8002EB6C 4600D306 */ mov.s $f12, $f26 /* 9F70 8002EB70 46000706 */ mov.s $f28, $f0 /* 9F74 8002EB74 0C00A874 */ jal cos_rad /* 9F78 8002EB78 4600D306 */ mov.s $f12, $f26 /* 9F7C 8002EB7C 46000286 */ mov.s $f10, $f0 /* 9F80 8002EB80 461E5202 */ mul.s $f8, $f10, $f30 /* 9F84 8002EB84 00000000 */ nop /* 9F88 8002EB88 4600F087 */ neg.s $f2, $f30 /* 9F8C 8002EB8C 4602E082 */ mul.s $f2, $f28, $f2 /* 9F90 8002EB90 00000000 */ nop /* 9F94 8002EB94 C6180078 */ lwc1 $f24, 0x78($s0) /* 9F98 8002EB98 461CC102 */ mul.s $f4, $f24, $f28 /* 9F9C 8002EB9C 00000000 */ nop /* 9FA0 8002EBA0 460AC182 */ mul.s $f6, $f24, $f10 /* 9FA4 8002EBA4 00000000 */ nop /* 9FA8 8002EBA8 C6000070 */ lwc1 $f0, 0x70($s0) /* 9FAC 8002EBAC 46160002 */ mul.s $f0, $f0, $f22 /* 9FB0 8002EBB0 00000000 */ nop /* 9FB4 8002EBB4 4600F286 */ mov.s $f10, $f30 /* 9FB8 8002EBB8 46005586 */ mov.s $f22, $f10 /* 9FBC 8002EBBC 46044780 */ add.s $f30, $f8, $f4 /* 9FC0 8002EBC0 46140683 */ div.s $f26, $f0, $f20 /* 9FC4 8002EBC4 4600D306 */ mov.s $f12, $f26 /* 9FC8 8002EBC8 0C00A85B */ jal sin_rad /* 9FCC 8002EBCC 46061600 */ add.s $f24, $f2, $f6 /* 9FD0 8002EBD0 46000706 */ mov.s $f28, $f0 /* 9FD4 8002EBD4 0C00A874 */ jal cos_rad /* 9FD8 8002EBD8 4600D306 */ mov.s $f12, $f26 /* 9FDC 8002EBDC 46000286 */ mov.s $f10, $f0 /* 9FE0 8002EBE0 46165102 */ mul.s $f4, $f10, $f22 /* 9FE4 8002EBE4 00000000 */ nop /* 9FE8 8002EBE8 4616E182 */ mul.s $f6, $f28, $f22 /* 9FEC 8002EBEC 00000000 */ nop /* 9FF0 8002EBF0 461CC002 */ mul.s $f0, $f24, $f28 /* 9FF4 8002EBF4 00000000 */ nop /* 9FF8 8002EBF8 460AC082 */ mul.s $f2, $f24, $f10 /* 9FFC 8002EBFC 00000000 */ nop /* A000 8002EC00 46002281 */ sub.s $f10, $f4, $f0 /* A004 8002EC04 46023180 */ add.s $f6, $f6, $f2 /* A008 8002EC08 C602004C */ lwc1 $f2, 0x4C($s0) /* A00C 8002EC0C 461E1080 */ add.s $f2, $f2, $f30 /* A010 8002EC10 C6000048 */ lwc1 $f0, 0x48($s0) /* A014 8002EC14 8E060048 */ lw $a2, 0x48($s0) /* A018 8002EC18 460A0000 */ add.s $f0, $f0, $f10 /* A01C 8002EC1C C60E0050 */ lwc1 $f14, 0x50($s0) /* A020 8002EC20 8E070050 */ lw $a3, 0x50($s0) /* A024 8002EC24 46067380 */ add.s $f14, $f14, $f6 /* A028 8002EC28 E6020040 */ swc1 $f2, 0x40($s0) /* A02C 8002EC2C E600003C */ swc1 $f0, 0x3C($s0) /* A030 8002EC30 46000306 */ mov.s $f12, $f0 /* A034 8002EC34 0C00A720 */ jal atan2 /* A038 8002EC38 E60E0044 */ swc1 $f14, 0x44($s0) /* A03C 8002EC3C 4600B506 */ mov.s $f20, $f22 /* A040 8002EC40 C6040048 */ lwc1 $f4, 0x48($s0) /* A044 8002EC44 C602003C */ lwc1 $f2, 0x3C($s0) /* A048 8002EC48 4600A306 */ mov.s $f12, $f20 /* A04C 8002EC4C 46022581 */ sub.s $f22, $f4, $f2 /* A050 8002EC50 C6040050 */ lwc1 $f4, 0x50($s0) /* A054 8002EC54 C6020044 */ lwc1 $f2, 0x44($s0) /* A058 8002EC58 4600A386 */ mov.s $f14, $f20 /* A05C 8002EC5C 46022601 */ sub.s $f24, $f4, $f2 /* A060 8002EC60 C604004C */ lwc1 $f4, 0x4C($s0) /* A064 8002EC64 C6020040 */ lwc1 $f2, 0x40($s0) /* A068 8002EC68 4406B000 */ mfc1 $a2, $f22 /* A06C 8002EC6C 4407C000 */ mfc1 $a3, $f24 /* A070 8002EC70 46022781 */ sub.s $f30, $f4, $f2 /* A074 8002EC74 0C00A720 */ jal atan2 /* A078 8002EC78 E600006C */ swc1 $f0, 0x6C($s0) /* A07C 8002EC7C 4616B102 */ mul.s $f4, $f22, $f22 /* A080 8002EC80 00000000 */ nop /* A084 8002EC84 4618C082 */ mul.s $f2, $f24, $f24 /* A088 8002EC88 00000000 */ nop /* A08C 8002EC8C 46022300 */ add.s $f12, $f4, $f2 /* A090 8002EC90 46000007 */ neg.s $f0, $f0 /* A094 8002EC94 E6000090 */ swc1 $f0, 0x90($s0) /* A098 8002EC98 46006004 */ sqrt.s $f0, $f12 /* A09C 8002EC9C 46000032 */ c.eq.s $f0, $f0 /* A0A0 8002ECA0 00000000 */ nop /* A0A4 8002ECA4 45030004 */ bc1tl .L8002ECB8 /* A0A8 8002ECA8 4600A306 */ mov.s $f12, $f20 /* A0AC 8002ECAC 0C0187BC */ jal sqrtf /* A0B0 8002ECB0 00000000 */ nop /* A0B4 8002ECB4 4600A306 */ mov.s $f12, $f20 .L8002ECB8: /* A0B8 8002ECB8 46000007 */ neg.s $f0, $f0 /* A0BC 8002ECBC 4406F000 */ mfc1 $a2, $f30 /* A0C0 8002ECC0 44070000 */ mfc1 $a3, $f0 /* A0C4 8002ECC4 0C00A720 */ jal atan2 /* A0C8 8002ECC8 46006386 */ mov.s $f14, $f12 /* A0CC 8002ECCC E6000094 */ swc1 $f0, 0x94($s0) /* A0D0 8002ECD0 8FBF0014 */ lw $ra, 0x14($sp) /* A0D4 8002ECD4 8FB00010 */ lw $s0, 0x10($sp) /* A0D8 8002ECD8 D7BE0040 */ ldc1 $f30, 0x40($sp) /* A0DC 8002ECDC D7BC0038 */ ldc1 $f28, 0x38($sp) /* A0E0 8002ECE0 D7BA0030 */ ldc1 $f26, 0x30($sp) /* A0E4 8002ECE4 D7B80028 */ ldc1 $f24, 0x28($sp) /* A0E8 8002ECE8 D7B60020 */ ldc1 $f22, 0x20($sp) /* A0EC 8002ECEC D7B40018 */ ldc1 $f20, 0x18($sp) /* A0F0 8002ECF0 03E00008 */ jr $ra /* A0F4 8002ECF4 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void update_camera_mode_4(Camera* camera) { f32 sinBoom; f32 cosBoom; f32 deltaX; f32 deltaY; f32 deltaZ; f32 deltaX2; f32 deltaY2; f32 deltaZ2; f32 boomYaw; f32 boomLength; f32 f0; f32 f4; f32 new_var; f0 = camera->targetPos.x; deltaX = camera->auxPitch; if (f0 > deltaX) { f0 = deltaX; } if (f0 < -deltaX) { f0 = -deltaX; } camera->lookAt_obj_target.x = f0; f4 = camera->targetPos.z; deltaZ = camera->auxBoomLength; if (f4 > deltaZ) { f4 = deltaZ; } if (f4 < -deltaZ) { f4 = -deltaZ; } camera->lookAt_obj_target.z = f4; camera->unk_70 = 0.0f; camera->currentBoomYaw = 0.0f; camera->trueRotation.x = camera->unk_70; camera->currentBoomLength = camera->lookAt_dist * D_8009A5EC; camera->currentYOffset = camera->auxBoomPitch * D_8009A5EC; 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; deltaX2 = deltaX; deltaY2 = deltaY; boomYaw = deltaX = -deltaY2; deltaZ2 = deltaZ; new_var = boomYaw; deltaX = deltaX2; deltaY = cosBoom * deltaY2 + deltaZ2 * sinBoom; deltaZ = sinBoom * new_var + deltaZ2 * cosBoom; boomYaw = DEG_TO_RAD(camera->unk_70); sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX2 = cosBoom * deltaX - deltaZ * sinBoom; deltaY2 = deltaY; deltaZ2 = sinBoom * deltaX + deltaZ * cosBoom; camera->lookAt_eye.x = camera->lookAt_obj.x + deltaX2; camera->lookAt_eye.y = camera->lookAt_obj.y + deltaY2; camera->lookAt_eye.z = camera->lookAt_obj.z + deltaZ2; } 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; deltaX2 = deltaX; deltaY2 = deltaY; boomYaw = deltaX = -deltaY2; deltaZ2 = deltaZ; new_var = boomYaw; deltaX = deltaX2; deltaY = cosBoom * deltaY2 + deltaZ2 * sinBoom; deltaZ = sinBoom * new_var + deltaZ2 * cosBoom; boomYaw = DEG_TO_RAD(camera->unk_70); sinBoom = sin_rad(boomYaw); cosBoom = cos_rad(boomYaw); deltaX2 = cosBoom * deltaX - deltaZ * sinBoom; deltaY2 = deltaY; deltaZ2 = sinBoom * deltaX + deltaZ * cosBoom; camera->lookAt_eye.x = camera->lookAt_obj.x + deltaX2; camera->lookAt_eye.y = camera->lookAt_obj.y + deltaY2; camera->lookAt_eye.z = camera->lookAt_obj.z + 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 func_8024D44C /* 14078C 8024D44C 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 140790 8024D450 AFB00010 */ sw $s0, 0x10($sp) /* 140794 8024D454 0080802D */ daddu $s0, $a0, $zero /* 140798 8024D458 3C028027 */ lui $v0, %hi(gPauseHeldButtons) /* 14079C 8024D45C 8C4200C0 */ lw $v0, %lo(gPauseHeldButtons)($v0) /* 1407A0 8024D460 3C030004 */ lui $v1, (0x40000 >> 16) /* 1407A4 8024D464 AFBF0014 */ sw $ra, 0x14($sp) /* 1407A8 8024D468 92070003 */ lbu $a3, 0x3($s0) /* 1407AC 8024D46C 00431024 */ and $v0, $v0, $v1 /* 1407B0 8024D470 1040001C */ beqz $v0, .L8024D4E4 /* 1407B4 8024D474 00000000 */ nop .L8024D478: /* 1407B8 8024D478 92020001 */ lbu $v0, 0x1($s0) /* 1407BC 8024D47C 2442FFFF */ addiu $v0, $v0, -0x1 /* 1407C0 8024D480 A2020001 */ sb $v0, 0x1($s0) /* 1407C4 8024D484 00021600 */ sll $v0, $v0, 24 /* 1407C8 8024D488 00022E03 */ sra $a1, $v0, 24 /* 1407CC 8024D48C 04A20015 */ bltzl $a1, .L8024D4E4 /* 1407D0 8024D490 A2000001 */ sb $zero, 0x1($s0) D_8024D494: /* 1407D4 8024D494 82020004 */ lb $v0, 0x4($s0) /* 1407D8 8024D498 82030005 */ lb $v1, 0x5($s0) /* 1407DC 8024D49C 00430018 */ mult $v0, $v1 glabel .L8024D4A0 /* 1407E0 8024D4A0 00003012 */ mflo $a2 /* 1407E4 8024D4A4 82020006 */ lb $v0, 0x6($s0) /* 1407E8 8024D4A8 00000000 */ nop /* 1407EC 8024D4AC 00C20018 */ mult $a2, $v0 /* 1407F0 8024D4B0 00002012 */ mflo $a0 /* 1407F4 8024D4B4 82020002 */ lb $v0, 0x2($s0) /* 1407F8 8024D4B8 00000000 */ nop /* 1407FC 8024D4BC 00620018 */ mult $v1, $v0 /* 140800 8024D4C0 00001812 */ mflo $v1 D_8024D4C4: /* 140804 8024D4C4 00831021 */ addu $v0, $a0, $v1 /* 140808 8024D4C8 00451021 */ addu $v0, $v0, $a1 /* 14080C 8024D4CC 8E030008 */ lw $v1, 0x8($s0) /* 140810 8024D4D0 92040003 */ lbu $a0, 0x3($s0) /* 140814 8024D4D4 00621821 */ addu $v1, $v1, $v0 /* 140818 8024D4D8 90620000 */ lbu $v0, 0x0($v1) /* 14081C 8024D4DC 1082FFE6 */ beq $a0, $v0, .L8024D478 /* 140820 8024D4E0 00000000 */ nop .L8024D4E4: /* 140824 8024D4E4 3C028027 */ lui $v0, %hi(gPauseHeldButtons) /* 140828 8024D4E8 8C4200C0 */ lw $v0, %lo(gPauseHeldButtons)($v0) glabel .L8024D4EC /* 14082C 8024D4EC 3C030008 */ lui $v1, (0x80000 >> 16) /* 140830 8024D4F0 00431024 */ and $v0, $v0, $v1 /* 140834 8024D4F4 1040001E */ beqz $v0, .L8024D570 /* 140838 8024D4F8 00000000 */ nop /* 14083C 8024D4FC 92060005 */ lbu $a2, 0x5($s0) /* 140840 8024D500 82050005 */ lb $a1, 0x5($s0) .L8024D504: /* 140844 8024D504 92020001 */ lbu $v0, 0x1($s0) /* 140848 8024D508 24420001 */ addiu $v0, $v0, 0x1 /* 14084C 8024D50C A2020001 */ sb $v0, 0x1($s0) /* 140850 8024D510 00021600 */ sll $v0, $v0, 24 /* 140854 8024D514 00022603 */ sra $a0, $v0, 24 /* 140858 8024D518 0085102A */ slt $v0, $a0, $a1 /* 14085C 8024D51C 1040001F */ beqz $v0, .L8024D59C /* 140860 8024D520 24C2FFFF */ addiu $v0, $a2, -0x1 /* 140864 8024D524 82020004 */ lb $v0, 0x4($s0) /* 140868 8024D528 00450018 */ mult $v0, $a1 /* 14086C 8024D52C 00001812 */ mflo $v1 /* 140870 8024D530 82020006 */ lb $v0, 0x6($s0) /* 140874 8024D534 00000000 */ nop D_8024D538_C0ADB8: /* 140878 8024D538 00620018 */ mult $v1, $v0 /* 14087C 8024D53C 00001812 */ mflo $v1 /* 140880 8024D540 82020002 */ lb $v0, 0x2($s0) /* 140884 8024D544 00000000 */ nop glabel .L8024D548 /* 140888 8024D548 00A20018 */ mult $a1, $v0 /* 14088C 8024D54C 00004812 */ mflo $t1 /* 140890 8024D550 00691021 */ addu $v0, $v1, $t1 /* 140894 8024D554 00441021 */ addu $v0, $v0, $a0 /* 140898 8024D558 8E030008 */ lw $v1, 0x8($s0) /* 14089C 8024D55C 92040003 */ lbu $a0, 0x3($s0) /* 1408A0 8024D560 00621821 */ addu $v1, $v1, $v0 /* 1408A4 8024D564 90620000 */ lbu $v0, 0x0($v1) /* 1408A8 8024D568 1082FFE6 */ beq $a0, $v0, .L8024D504 /* 1408AC 8024D56C 00000000 */ nop .L8024D570: /* 1408B0 8024D570 3C028027 */ lui $v0, %hi(gPauseHeldButtons) /* 1408B4 8024D574 8C4200C0 */ lw $v0, %lo(gPauseHeldButtons)($v0) /* 1408B8 8024D578 3C030001 */ lui $v1, (0x10000 >> 16) /* 1408BC 8024D57C 00431024 */ and $v0, $v0, $v1 D_8024D580_C0AE00: /* 1408C0 8024D580 10400029 */ beqz $v0, .L8024D628 /* 1408C4 8024D584 24020002 */ addiu $v0, $zero, 0x2 /* 1408C8 8024D588 92030003 */ lbu $v1, 0x3($s0) /* 1408CC 8024D58C 14620005 */ bne $v1, $v0, .L8024D5A4 /* 1408D0 8024D590 24020005 */ addiu $v0, $zero, 0x5 /* 1408D4 8024D594 0809356B */ j .L8024D5AC /* 1408D8 8024D598 24020003 */ addiu $v0, $zero, 0x3 .L8024D59C: /* 1408DC 8024D59C 0809355C */ j .L8024D570 glabel .L8024D5A0 /* 1408E0 8024D5A0 A2020001 */ sb $v0, 0x1($s0) .L8024D5A4: /* 1408E4 8024D5A4 14620004 */ bne $v1, $v0, .L8024D5B8 /* 1408E8 8024D5A8 24020001 */ addiu $v0, $zero, 0x1 .L8024D5AC: /* 1408EC 8024D5AC A2020001 */ sb $v0, 0x1($s0) /* 1408F0 8024D5B0 0809358A */ j .L8024D628 /* 1408F4 8024D5B4 A2000002 */ sb $zero, 0x2($s0) .L8024D5B8: /* 1408F8 8024D5B8 92020002 */ lbu $v0, 0x2($s0) /* 1408FC 8024D5BC 2442FFFF */ addiu $v0, $v0, -0x1 /* 140900 8024D5C0 A2020002 */ sb $v0, 0x2($s0) /* 140904 8024D5C4 00021600 */ sll $v0, $v0, 24 /* 140908 8024D5C8 00022603 */ sra $a0, $v0, 24 /* 14090C 8024D5CC 04820016 */ bltzl $a0, .L8024D628 /* 140910 8024D5D0 A2000002 */ sb $zero, 0x2($s0) /* 140914 8024D5D4 82020004 */ lb $v0, 0x4($s0) /* 140918 8024D5D8 82030005 */ lb $v1, 0x5($s0) /* 14091C 8024D5DC 00430018 */ mult $v0, $v1 /* 140920 8024D5E0 00002812 */ mflo $a1 glabel .L8024D5E4 /* 140924 8024D5E4 82020006 */ lb $v0, 0x6($s0) /* 140928 8024D5E8 00000000 */ nop /* 14092C 8024D5EC 00A20018 */ mult $a1, $v0 /* 140930 8024D5F0 00001012 */ mflo $v0 /* 140934 8024D5F4 00000000 */ nop /* 140938 8024D5F8 00000000 */ nop /* 14093C 8024D5FC 00640018 */ mult $v1, $a0 /* 140940 8024D600 82040001 */ lb $a0, 0x1($s0) /* 140944 8024D604 00001812 */ mflo $v1 D_8024D608_C0AE88: /* 140948 8024D608 00431021 */ addu $v0, $v0, $v1 /* 14094C 8024D60C 00441021 */ addu $v0, $v0, $a0 /* 140950 8024D610 8E030008 */ lw $v1, 0x8($s0) /* 140954 8024D614 92040003 */ lbu $a0, 0x3($s0) /* 140958 8024D618 00621821 */ addu $v1, $v1, $v0 /* 14095C 8024D61C 90620000 */ lbu $v0, 0x0($v1) /* 140960 8024D620 1082FFE5 */ beq $a0, $v0, .L8024D5B8 /* 140964 8024D624 00000000 */ nop .L8024D628: /* 140968 8024D628 3C028027 */ lui $v0, %hi(gPauseHeldButtons) /* 14096C 8024D62C 8C4200C0 */ lw $v0, %lo(gPauseHeldButtons)($v0) /* 140970 8024D630 3C030002 */ lui $v1, (0x20000 >> 16) /* 140974 8024D634 00431024 */ and $v0, $v0, $v1 /* 140978 8024D638 1040002F */ beqz $v0, .L8024D6F8 /* 14097C 8024D63C 24020002 */ addiu $v0, $zero, 0x2 /* 140980 8024D640 92030003 */ lbu $v1, 0x3($s0) /* 140984 8024D644 14620006 */ bne $v1, $v0, .L8024D660 /* 140988 8024D648 24020005 */ addiu $v0, $zero, 0x5 /* 14098C 8024D64C 24020003 */ addiu $v0, $zero, 0x3 /* 140990 8024D650 A2020001 */ sb $v0, 0x1($s0) glabel .L8024D654 /* 140994 8024D654 24020001 */ addiu $v0, $zero, 0x1 /* 140998 8024D658 080935BE */ j .L8024D6F8 /* 14099C 8024D65C A2020002 */ sb $v0, 0x2($s0) .L8024D660: /* 1409A0 8024D660 14620006 */ bne $v1, $v0, .L8024D67C /* 1409A4 8024D664 24020001 */ addiu $v0, $zero, 0x1 /* 1409A8 8024D668 A2020001 */ sb $v0, 0x1($s0) /* 1409AC 8024D66C 080935BE */ j .L8024D6F8 /* 1409B0 8024D670 A2020002 */ sb $v0, 0x2($s0) .L8024D674: /* 1409B4 8024D674 080935BE */ j .L8024D6F8 /* 1409B8 8024D678 A2020002 */ sb $v0, 0x2($s0) .L8024D67C: /* 1409BC 8024D67C 92060006 */ lbu $a2, 0x6($s0) D_8024D680_C0AF00: /* 1409C0 8024D680 82050006 */ lb $a1, 0x6($s0) .L8024D684: /* 1409C4 8024D684 92020002 */ lbu $v0, 0x2($s0) /* 1409C8 8024D688 24420001 */ addiu $v0, $v0, 0x1 /* 1409CC 8024D68C A2020002 */ sb $v0, 0x2($s0) /* 1409D0 8024D690 00021600 */ sll $v0, $v0, 24 /* 1409D4 8024D694 00022603 */ sra $a0, $v0, 24 /* 1409D8 8024D698 0085102A */ slt $v0, $a0, $a1 /* 1409DC 8024D69C 1040FFF5 */ beqz $v0, .L8024D674 glabel .L8024D6A0 /* 1409E0 8024D6A0 24C2FFFF */ addiu $v0, $a2, -0x1 /* 1409E4 8024D6A4 82020004 */ lb $v0, 0x4($s0) /* 1409E8 8024D6A8 82030005 */ lb $v1, 0x5($s0) /* 1409EC 8024D6AC 00430018 */ mult $v0, $v1 /* 1409F0 8024D6B0 00004812 */ mflo $t1 D_8024D6B4: /* 1409F4 8024D6B4 00000000 */ nop /* 1409F8 8024D6B8 00000000 */ nop /* 1409FC 8024D6BC 01250018 */ mult $t1, $a1 /* 140A00 8024D6C0 00001012 */ mflo $v0 /* 140A04 8024D6C4 00000000 */ nop /* 140A08 8024D6C8 00000000 */ nop /* 140A0C 8024D6CC 00640018 */ mult $v1, $a0 /* 140A10 8024D6D0 82040001 */ lb $a0, 0x1($s0) glabel .L8024D6D4 /* 140A14 8024D6D4 00001812 */ mflo $v1 /* 140A18 8024D6D8 00431021 */ addu $v0, $v0, $v1 /* 140A1C 8024D6DC 00441021 */ addu $v0, $v0, $a0 /* 140A20 8024D6E0 8E030008 */ lw $v1, 0x8($s0) /* 140A24 8024D6E4 92040003 */ lbu $a0, 0x3($s0) /* 140A28 8024D6E8 00621821 */ addu $v1, $v1, $v0 /* 140A2C 8024D6EC 90620000 */ lbu $v0, 0x0($v1) /* 140A30 8024D6F0 1082FFE4 */ beq $a0, $v0, .L8024D684 /* 140A34 8024D6F4 00000000 */ nop .L8024D6F8: /* 140A38 8024D6F8 82020004 */ lb $v0, 0x4($s0) /* 140A3C 8024D6FC 82030005 */ lb $v1, 0x5($s0) D_8024D700_C0AF80: /* 140A40 8024D700 00430018 */ mult $v0, $v1 /* 140A44 8024D704 00002812 */ mflo $a1 /* 140A48 8024D708 82020006 */ lb $v0, 0x6($s0) /* 140A4C 8024D70C 00000000 */ nop /* 140A50 8024D710 00A20018 */ mult $a1, $v0 /* 140A54 8024D714 00002012 */ mflo $a0 .L8024D718: /* 140A58 8024D718 82020002 */ lb $v0, 0x2($s0) /* 140A5C 8024D71C 00000000 */ nop D_8024D720: /* 140A60 8024D720 00620018 */ mult $v1, $v0 /* 140A64 8024D724 00001812 */ mflo $v1 /* 140A68 8024D728 00831821 */ addu $v1, $a0, $v1 /* 140A6C 8024D72C 82040001 */ lb $a0, 0x1($s0) /* 140A70 8024D730 8E020008 */ lw $v0, 0x8($s0) /* 140A74 8024D734 00641821 */ addu $v1, $v1, $a0 /* 140A78 8024D738 00431021 */ addu $v0, $v0, $v1 /* 140A7C 8024D73C 90420000 */ lbu $v0, 0x0($v0) glabel .L8024D740 /* 140A80 8024D740 24030004 */ addiu $v1, $zero, 0x4 /* 140A84 8024D744 A2020003 */ sb $v0, 0x3($s0) /* 140A88 8024D748 304200FF */ andi $v0, $v0, 0xFF /* 140A8C 8024D74C 14430003 */ bne $v0, $v1, .L8024D75C /* 140A90 8024D750 24020001 */ addiu $v0, $zero, 0x1 /* 140A94 8024D754 A2020001 */ sb $v0, 0x1($s0) /* 140A98 8024D758 A2020002 */ sb $v0, 0x2($s0) .L8024D75C: /* 140A9C 8024D75C 92020003 */ lbu $v0, 0x3($s0) /* 140AA0 8024D760 10470003 */ beq $v0, $a3, .L8024D770 /* 140AA4 8024D764 00000000 */ nop /* 140AA8 8024D768 0C05272D */ jal sfx_play_sound /* 140AAC 8024D76C 240400C7 */ addiu $a0, $zero, 0xC7 .L8024D770: /* 140AB0 8024D770 3C028027 */ lui $v0, %hi(gPausePressedButtons) /* 140AB4 8024D774 8C4200C4 */ lw $v0, %lo(gPausePressedButtons)($v0) /* 140AB8 8024D778 30424000 */ andi $v0, $v0, 0x4000 /* 140ABC 8024D77C 10400007 */ beqz $v0, .L8024D79C /* 140AC0 8024D780 00000000 */ nop /* 140AC4 8024D784 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab) D_8024D788_C0B008: /* 140AC8 8024D788 A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at) /* 140ACC 8024D78C 0C05272D */ jal sfx_play_sound D_8024D790: /* 140AD0 8024D790 240400CA */ addiu $a0, $zero, 0xCA /* 140AD4 8024D794 080935FC */ j .L8024D7F0 /* 140AD8 8024D798 00000000 */ nop .L8024D79C: /* 140ADC 8024D79C 3C018027 */ lui $at, %hi(gPauseCurrentDescIconScript) glabel .L8024D7A0 /* 140AE0 8024D7A0 AC2000CC */ sw $zero, %lo(gPauseCurrentDescIconScript)($at) /* 140AE4 8024D7A4 0C039D59 */ jal get_player_data /* 140AE8 8024D7A8 00000000 */ nop /* 140AEC 8024D7AC 92030003 */ lbu $v1, 0x3($s0) /* 140AF0 8024D7B0 8042028E */ lb $v0, 0x28E($v0) D_8024D7B4: /* 140AF4 8024D7B4 00031880 */ sll $v1, $v1, 2 /* 140AF8 8024D7B8 3C018027 */ lui $at, %hi(gPauseSpiritsIndexes) /* 140AFC 8024D7BC 00230821 */ addu $at, $at, $v1 /* 140B00 8024D7C0 8C2306E0 */ lw $v1, %lo(gPauseSpiritsIndexes)($at) /* 140B04 8024D7C4 0062102A */ slt $v0, $v1, $v0 /* 140B08 8024D7C8 14400005 */ bnez $v0, .L8024D7E0 /* 140B0C 8024D7CC 3C02001D */ lui $v0, (0x1D0031 >> 16) /* 140B10 8024D7D0 0C093BA0 */ jal func_8024EE80 /* 140B14 8024D7D4 24040056 */ addiu $a0, $zero, 0x56 /* 140B18 8024D7D8 080935FA */ j .L8024D7E8 /* 140B1C 8024D7DC 00000000 */ nop .L8024D7E0: /* 140B20 8024D7E0 34420031 */ ori $v0, $v0, (0x1D0031 & 0xFFFF) /* 140B24 8024D7E4 00621021 */ addu $v0, $v1, $v0 .L8024D7E8: /* 140B28 8024D7E8 3C018027 */ lui $at, %hi(gPauseCurrentDescMsg) .L8024D7EC: /* 140B2C 8024D7EC AC2200C8 */ sw $v0, %lo(gPauseCurrentDescMsg)($at) .L8024D7F0: /* 140B30 8024D7F0 8FBF0014 */ lw $ra, 0x14($sp) /* 140B34 8024D7F4 8FB00010 */ lw $s0, 0x10($sp) /* 140B38 8024D7F8 03E00008 */ jr $ra glabel .L8024D7FC /* 140B3C 8024D7FC 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void pause_spirits_handle_input(MenuPanel* panel) { s32 oldSelected = panel->selected; if (gPauseHeldButtons & BUTTON_STICK_LEFT) { while (TRUE) { panel->col--; if (panel->col < 0) { panel->col = 0; break; } if (panel->selected != MENU_PANEL_SELECTED_GRID_DATA(panel)) { break; } } } if (gPauseHeldButtons & BUTTON_STICK_RIGHT) { while (TRUE) { panel->col++; if (panel->col >= panel->numCols) { panel->col = panel->numCols - 1; break; } if (panel->selected != MENU_PANEL_SELECTED_GRID_DATA(panel)) { break; } } } if (gPauseHeldButtons & BUTTON_STICK_UP) { if (panel->selected == 2) { panel->col = 3; panel->row = 0; } else if (panel->selected == 5) { panel->col = 1; panel->row = 0; } else { while (TRUE) { panel->row--; if (panel->row < 0) { panel->row = 0; break; } if (panel->selected != MENU_PANEL_SELECTED_GRID_DATA(panel)) { break; } } } } if (gPauseHeldButtons & BUTTON_STICK_DOWN) { if (panel->selected == 2) { panel->col = 3; panel->row = 1; } else if (panel->selected == 5) { panel->col = 1; panel->row = 1; } else { while (TRUE) { panel->row++; if (panel->row >= panel->numRows) { panel->row = panel->numRows - 1; break; } if (panel->selected != MENU_PANEL_SELECTED_GRID_DATA(panel)) { break; } } } } panel->selected = MENU_PANEL_SELECTED_GRID_DATA(panel); if (panel->selected == 4) { panel->col = 1; panel->row = 1; } if (panel->selected != oldSelected) { sfx_play_sound(SOUND_MENU_CHANGE_SELECTION); } if (gPausePressedButtons & BUTTON_B) { gPauseMenuCurrentTab = 0; sfx_play_sound(SOUND_MENU_BACK); return; } gPauseCurrentDescIconScript = 0; if (get_player_data()->maxStarPower <= gPauseSpiritsIndexes[panel->selected]) { gPauseCurrentDescMsg = pause_get_menu_msg(PAUSE_MSG_UNKNOWN_SPIRIT); } else { gPauseCurrentDescMsg = MSG_Menus_SpiritDesc_Eldstar + gPauseSpiritsIndexes[panel->selected]; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_draw_palswap_mode_1 /* 169B4 8003B5B4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 169B8 8003B5B8 AFB00018 */ sw $s0, 0x18($sp) /* 169BC 8003B5BC 0080802D */ daddu $s0, $a0, $zero /* 169C0 8003B5C0 AFB20020 */ sw $s2, 0x20($sp) /* 169C4 8003B5C4 00A0902D */ daddu $s2, $a1, $zero /* 169C8 8003B5C8 AFBF0024 */ sw $ra, 0x24($sp) /* 169CC 8003B5CC AFB1001C */ sw $s1, 0x1C($sp) /* 169D0 8003B5D0 820200B6 */ lb $v0, 0xB6($s0) /* 169D4 8003B5D4 10400034 */ beqz $v0, .L8003B6A8 /* 169D8 8003B5D8 00C0882D */ daddu $s1, $a2, $zero /* 169DC 8003B5DC 96040028 */ lhu $a0, 0x28($s0) /* 169E0 8003B5E0 0C0B7A90 */ jal spr_get_npc_palettes /* 169E4 8003B5E4 00000000 */ nop /* 169E8 8003B5E8 AE0200C4 */ sw $v0, 0xC4($s0) /* 169EC 8003B5EC 0040202D */ daddu $a0, $v0, $zero /* 169F0 8003B5F0 A20000C1 */ sb $zero, 0xC1($s0) /* 169F4 8003B5F4 8C830000 */ lw $v1, 0x0($a0) /* 169F8 8003B5F8 2402FFFF */ addiu $v0, $zero, -0x1 /* 169FC 8003B5FC 1062000B */ beq $v1, $v0, .L8003B62C /* 16A00 8003B600 0080182D */ daddu $v1, $a0, $zero /* 16A04 8003B604 0040202D */ daddu $a0, $v0, $zero .L8003B608: /* 16A08 8003B608 920200C1 */ lbu $v0, 0xC1($s0) /* 16A0C 8003B60C 24420001 */ addiu $v0, $v0, 0x1 /* 16A10 8003B610 A20200C1 */ sb $v0, 0xC1($s0) /* 16A14 8003B614 00021600 */ sll $v0, $v0, 24 /* 16A18 8003B618 00021583 */ sra $v0, $v0, 22 /* 16A1C 8003B61C 00431021 */ addu $v0, $v0, $v1 /* 16A20 8003B620 8C420000 */ lw $v0, 0x0($v0) /* 16A24 8003B624 1444FFF8 */ bne $v0, $a0, .L8003B608 /* 16A28 8003B628 00000000 */ nop .L8003B62C: /* 16A2C 8003B62C 0C0B7A9B */ jal spr_get_npc_color_variations /* 16A30 8003B630 96040028 */ lhu $a0, 0x28($s0) /* 16A34 8003B634 820300C1 */ lb $v1, 0xC1($s0) /* 16A38 8003B638 0000302D */ daddu $a2, $zero, $zero /* 16A3C 8003B63C 18600015 */ blez $v1, .L8003B694 /* 16A40 8003B640 A20200C0 */ sb $v0, 0xC0($s0) /* 16A44 8003B644 240700C8 */ addiu $a3, $zero, 0xC8 .L8003B648: /* 16A48 8003B648 8E0300C4 */ lw $v1, 0xC4($s0) /* 16A4C 8003B64C 00061080 */ sll $v0, $a2, 2 /* 16A50 8003B650 00431021 */ addu $v0, $v0, $v1 /* 16A54 8003B654 8C430000 */ lw $v1, 0x0($v0) /* 16A58 8003B658 10600009 */ beqz $v1, .L8003B680 /* 16A5C 8003B65C 02072821 */ addu $a1, $s0, $a3 /* 16A60 8003B660 0000202D */ daddu $a0, $zero, $zero .L8003B664: /* 16A64 8003B664 94620000 */ lhu $v0, 0x0($v1) /* 16A68 8003B668 24630002 */ addiu $v1, $v1, 0x2 /* 16A6C 8003B66C 24840001 */ addiu $a0, $a0, 0x1 /* 16A70 8003B670 A4A20000 */ sh $v0, 0x0($a1) /* 16A74 8003B674 28820010 */ slti $v0, $a0, 0x10 /* 16A78 8003B678 1440FFFA */ bnez $v0, .L8003B664 /* 16A7C 8003B67C 24A50002 */ addiu $a1, $a1, 0x2 .L8003B680: /* 16A80 8003B680 820200C1 */ lb $v0, 0xC1($s0) /* 16A84 8003B684 24C60001 */ addiu $a2, $a2, 0x1 /* 16A88 8003B688 00C2102A */ slt $v0, $a2, $v0 /* 16A8C 8003B68C 1440FFEE */ bnez $v0, .L8003B648 /* 16A90 8003B690 24E70020 */ addiu $a3, $a3, 0x20 .L8003B694: /* 16A94 8003B694 2402FFFE */ addiu $v0, $zero, -0x2 /* 16A98 8003B698 A20200B7 */ sb $v0, 0xB7($s0) /* 16A9C 8003B69C A60000BE */ sh $zero, 0xBE($s0) /* 16AA0 8003B6A0 A20000B6 */ sb $zero, 0xB6($s0) /* 16AA4 8003B6A4 A60000BC */ sh $zero, 0xBC($s0) .L8003B6A8: /* 16AA8 8003B6A8 860200BC */ lh $v0, 0xBC($s0) /* 16AAC 8003B6AC 14400013 */ bnez $v0, .L8003B6FC /* 16AB0 8003B6B0 00000000 */ nop /* 16AB4 8003B6B4 920200B7 */ lbu $v0, 0xB7($s0) /* 16AB8 8003B6B8 3C038007 */ lui $v1, %hi(D_80077BF0) /* 16ABC 8003B6BC 24637BF0 */ addiu $v1, $v1, %lo(D_80077BF0) /* 16AC0 8003B6C0 24420002 */ addiu $v0, $v0, 0x2 /* 16AC4 8003B6C4 A20200B7 */ sb $v0, 0xB7($s0) /* 16AC8 8003B6C8 00021600 */ sll $v0, $v0, 24 /* 16ACC 8003B6CC 00021603 */ sra $v0, $v0, 24 /* 16AD0 8003B6D0 3C048007 */ lui $a0, %hi(D_80077BF0) /* 16AD4 8003B6D4 00822021 */ addu $a0, $a0, $v0 /* 16AD8 8003B6D8 90847BF0 */ lbu $a0, %lo(D_80077BF0)($a0) /* 16ADC 8003B6DC 240200FF */ addiu $v0, $zero, 0xFF /* 16AE0 8003B6E0 50820001 */ beql $a0, $v0, .L8003B6E8 /* 16AE4 8003B6E4 A20000B7 */ sb $zero, 0xB7($s0) .L8003B6E8: /* 16AE8 8003B6E8 820200B7 */ lb $v0, 0xB7($s0) /* 16AEC 8003B6EC 00431021 */ addu $v0, $v0, $v1 /* 16AF0 8003B6F0 90420001 */ lbu $v0, 0x1($v0) /* 16AF4 8003B6F4 00021042 */ srl $v0, $v0, 1 /* 16AF8 8003B6F8 A60200BC */ sh $v0, 0xBC($s0) .L8003B6FC: /* 16AFC 8003B6FC 960300BC */ lhu $v1, 0xBC($s0) /* 16B00 8003B700 820200B7 */ lb $v0, 0xB7($s0) /* 16B04 8003B704 2463FFFF */ addiu $v1, $v1, -0x1 /* 16B08 8003B708 3C048007 */ lui $a0, %hi(D_80077BF0) /* 16B0C 8003B70C 00822021 */ addu $a0, $a0, $v0 /* 16B10 8003B710 90847BF0 */ lbu $a0, %lo(D_80077BF0)($a0) /* 16B14 8003B714 24020001 */ addiu $v0, $zero, 0x1 /* 16B18 8003B718 10820025 */ beq $a0, $v0, .L8003B7B0 /* 16B1C 8003B71C A60300BC */ sh $v1, 0xBC($s0) /* 16B20 8003B720 28820002 */ slti $v0, $a0, 0x2 /* 16B24 8003B724 10400005 */ beqz $v0, .L8003B73C /* 16B28 8003B728 24020002 */ addiu $v0, $zero, 0x2 /* 16B2C 8003B72C 10800007 */ beqz $a0, .L8003B74C /* 16B30 8003B730 00000000 */ nop /* 16B34 8003B734 0800EE2B */ j .L8003B8AC /* 16B38 8003B738 00000000 */ nop .L8003B73C: /* 16B3C 8003B73C 1082003C */ beq $a0, $v0, .L8003B830 /* 16B40 8003B740 00000000 */ nop /* 16B44 8003B744 0800EE2B */ j .L8003B8AC /* 16B48 8003B748 00000000 */ nop .L8003B74C: /* 16B4C 8003B74C 820200C0 */ lb $v0, 0xC0($s0) /* 16B50 8003B750 18400056 */ blez $v0, .L8003B8AC /* 16B54 8003B754 0000302D */ daddu $a2, $zero, $zero /* 16B58 8003B758 240700C8 */ addiu $a3, $zero, 0xC8 .L8003B75C: /* 16B5C 8003B75C 8E0300C4 */ lw $v1, 0xC4($s0) /* 16B60 8003B760 00061080 */ sll $v0, $a2, 2 /* 16B64 8003B764 00431021 */ addu $v0, $v0, $v1 /* 16B68 8003B768 8C430000 */ lw $v1, 0x0($v0) /* 16B6C 8003B76C 10600009 */ beqz $v1, .L8003B794 /* 16B70 8003B770 02072821 */ addu $a1, $s0, $a3 /* 16B74 8003B774 0000202D */ daddu $a0, $zero, $zero .L8003B778: /* 16B78 8003B778 94620000 */ lhu $v0, 0x0($v1) /* 16B7C 8003B77C 24630002 */ addiu $v1, $v1, 0x2 /* 16B80 8003B780 24840001 */ addiu $a0, $a0, 0x1 /* 16B84 8003B784 A4A20000 */ sh $v0, 0x0($a1) /* 16B88 8003B788 28820010 */ slti $v0, $a0, 0x10 /* 16B8C 8003B78C 1440FFFA */ bnez $v0, .L8003B778 /* 16B90 8003B790 24A50002 */ addiu $a1, $a1, 0x2 .L8003B794: /* 16B94 8003B794 820200C0 */ lb $v0, 0xC0($s0) /* 16B98 8003B798 24C60001 */ addiu $a2, $a2, 0x1 /* 16B9C 8003B79C 00C2102A */ slt $v0, $a2, $v0 /* 16BA0 8003B7A0 1440FFEE */ bnez $v0, .L8003B75C /* 16BA4 8003B7A4 24E70020 */ addiu $a3, $a3, 0x20 /* 16BA8 8003B7A8 0800EE2B */ j .L8003B8AC /* 16BAC 8003B7AC 00000000 */ nop .L8003B7B0: /* 16BB0 8003B7B0 820200C0 */ lb $v0, 0xC0($s0) /* 16BB4 8003B7B4 920300C0 */ lbu $v1, 0xC0($s0) /* 16BB8 8003B7B8 1840003C */ blez $v0, .L8003B8AC /* 16BBC 8003B7BC 0000302D */ daddu $a2, $zero, $zero /* 16BC0 8003B7C0 240700C8 */ addiu $a3, $zero, 0xC8 .L8003B7C4: /* 16BC4 8003B7C4 00031600 */ sll $v0, $v1, 24 /* 16BC8 8003B7C8 00021603 */ sra $v0, $v0, 24 /* 16BCC 8003B7CC 00021880 */ sll $v1, $v0, 2 /* 16BD0 8003B7D0 00621821 */ addu $v1, $v1, $v0 /* 16BD4 8003B7D4 00661821 */ addu $v1, $v1, $a2 /* 16BD8 8003B7D8 8E0200C4 */ lw $v0, 0xC4($s0) /* 16BDC 8003B7DC 00031880 */ sll $v1, $v1, 2 /* 16BE0 8003B7E0 00621821 */ addu $v1, $v1, $v0 /* 16BE4 8003B7E4 8C630000 */ lw $v1, 0x0($v1) /* 16BE8 8003B7E8 10600009 */ beqz $v1, .L8003B810 /* 16BEC 8003B7EC 02072821 */ addu $a1, $s0, $a3 /* 16BF0 8003B7F0 0000202D */ daddu $a0, $zero, $zero .L8003B7F4: /* 16BF4 8003B7F4 94620000 */ lhu $v0, 0x0($v1) /* 16BF8 8003B7F8 24630002 */ addiu $v1, $v1, 0x2 /* 16BFC 8003B7FC 24840001 */ addiu $a0, $a0, 0x1 /* 16C00 8003B800 A4A20000 */ sh $v0, 0x0($a1) /* 16C04 8003B804 28820010 */ slti $v0, $a0, 0x10 /* 16C08 8003B808 1440FFFA */ bnez $v0, .L8003B7F4 /* 16C0C 8003B80C 24A50002 */ addiu $a1, $a1, 0x2 .L8003B810: /* 16C10 8003B810 24C60001 */ addiu $a2, $a2, 0x1 /* 16C14 8003B814 820200C0 */ lb $v0, 0xC0($s0) /* 16C18 8003B818 920300C0 */ lbu $v1, 0xC0($s0) /* 16C1C 8003B81C 00C2102A */ slt $v0, $a2, $v0 /* 16C20 8003B820 1440FFE8 */ bnez $v0, .L8003B7C4 /* 16C24 8003B824 24E70020 */ addiu $a3, $a3, 0x20 /* 16C28 8003B828 0800EE2B */ j .L8003B8AC /* 16C2C 8003B82C 00000000 */ nop .L8003B830: /* 16C30 8003B830 820200C0 */ lb $v0, 0xC0($s0) /* 16C34 8003B834 920300C0 */ lbu $v1, 0xC0($s0) /* 16C38 8003B838 1840001C */ blez $v0, .L8003B8AC /* 16C3C 8003B83C 0000302D */ daddu $a2, $zero, $zero /* 16C40 8003B840 240700C8 */ addiu $a3, $zero, 0xC8 .L8003B844: /* 16C44 8003B844 00031600 */ sll $v0, $v1, 24 /* 16C48 8003B848 00021603 */ sra $v0, $v0, 24 /* 16C4C 8003B84C 00021840 */ sll $v1, $v0, 1 /* 16C50 8003B850 00621821 */ addu $v1, $v1, $v0 /* 16C54 8003B854 00031840 */ sll $v1, $v1, 1 /* 16C58 8003B858 00661821 */ addu $v1, $v1, $a2 /* 16C5C 8003B85C 8E0200C4 */ lw $v0, 0xC4($s0) /* 16C60 8003B860 00031880 */ sll $v1, $v1, 2 /* 16C64 8003B864 00621821 */ addu $v1, $v1, $v0 /* 16C68 8003B868 8C630000 */ lw $v1, 0x0($v1) /* 16C6C 8003B86C 10600009 */ beqz $v1, .L8003B894 /* 16C70 8003B870 02072821 */ addu $a1, $s0, $a3 /* 16C74 8003B874 0000202D */ daddu $a0, $zero, $zero .L8003B878: /* 16C78 8003B878 94620000 */ lhu $v0, 0x0($v1) /* 16C7C 8003B87C 24630002 */ addiu $v1, $v1, 0x2 /* 16C80 8003B880 24840001 */ addiu $a0, $a0, 0x1 /* 16C84 8003B884 A4A20000 */ sh $v0, 0x0($a1) /* 16C88 8003B888 28820010 */ slti $v0, $a0, 0x10 /* 16C8C 8003B88C 1440FFFA */ bnez $v0, .L8003B878 /* 16C90 8003B890 24A50002 */ addiu $a1, $a1, 0x2 .L8003B894: /* 16C94 8003B894 24C60001 */ addiu $a2, $a2, 0x1 /* 16C98 8003B898 820200C0 */ lb $v0, 0xC0($s0) /* 16C9C 8003B89C 920300C0 */ lbu $v1, 0xC0($s0) /* 16CA0 8003B8A0 00C2102A */ slt $v0, $a2, $v0 /* 16CA4 8003B8A4 1440FFE7 */ bnez $v0, .L8003B844 /* 16CA8 8003B8A8 24E70020 */ addiu $a3, $a3, 0x20 .L8003B8AC: /* 16CAC 8003B8AC 820200C1 */ lb $v0, 0xC1($s0) /* 16CB0 8003B8B0 1840000B */ blez $v0, .L8003B8E0 /* 16CB4 8003B8B4 0000302D */ daddu $a2, $zero, $zero /* 16CB8 8003B8B8 240400C8 */ addiu $a0, $zero, 0xC8 /* 16CBC 8003B8BC 0200182D */ daddu $v1, $s0, $zero .L8003B8C0: /* 16CC0 8003B8C0 02041021 */ addu $v0, $s0, $a0 /* 16CC4 8003B8C4 24840020 */ addiu $a0, $a0, 0x20 /* 16CC8 8003B8C8 AC6202C8 */ sw $v0, 0x2C8($v1) /* 16CCC 8003B8CC 820200C1 */ lb $v0, 0xC1($s0) /* 16CD0 8003B8D0 24C60001 */ addiu $a2, $a2, 0x1 /* 16CD4 8003B8D4 00C2102A */ slt $v0, $a2, $v0 /* 16CD8 8003B8D8 1440FFF9 */ bnez $v0, .L8003B8C0 /* 16CDC 8003B8DC 24630004 */ addiu $v1, $v1, 0x4 .L8003B8E0: /* 16CE0 8003B8E0 8E020000 */ lw $v0, 0x0($s0) /* 16CE4 8003B8E4 3C034000 */ lui $v1, (0x40000000 >> 16) /* 16CE8 8003B8E8 00431024 */ and $v0, $v0, $v1 /* 16CEC 8003B8EC 14400016 */ bnez $v0, .L8003B948 /* 16CF0 8003B8F0 0240282D */ daddu $a1, $s2, $zero /* 16CF4 8003B8F4 920200AC */ lbu $v0, 0xAC($s0) /* 16CF8 8003B8F8 920300AD */ lbu $v1, 0xAD($s0) /* 16CFC 8003B8FC 00430018 */ mult $v0, $v1 /* 16D00 8003B900 00001012 */ mflo $v0 /* 16D04 8003B904 3C038080 */ lui $v1, (0x80808081 >> 16) /* 16D08 8003B908 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF) /* 16D0C 8003B90C 00430018 */ mult $v0, $v1 /* 16D10 8003B910 8E030024 */ lw $v1, 0x24($s0) /* 16D14 8003B914 260702C8 */ addiu $a3, $s0, 0x2C8 /* 16D18 8003B918 AFB10010 */ sw $s1, 0x10($sp) /* 16D1C 8003B91C 00004810 */ mfhi $t1 /* 16D20 8003B920 01223021 */ addu $a2, $t1, $v0 /* 16D24 8003B924 000631C3 */ sra $a2, $a2, 7 /* 16D28 8003B928 000217C3 */ sra $v0, $v0, 31 /* 16D2C 8003B92C 00C23023 */ subu $a2, $a2, $v0 /* 16D30 8003B930 28C400FF */ slti $a0, $a2, 0xFF /* 16D34 8003B934 000427C0 */ sll $a0, $a0, 31 /* 16D38 8003B938 3C022000 */ lui $v0, (0x20000000 >> 16) /* 16D3C 8003B93C 00822025 */ or $a0, $a0, $v0 /* 16D40 8003B940 0C0B78F6 */ jal spr_draw_npc_sprite /* 16D44 8003B944 00642025 */ or $a0, $v1, $a0 .L8003B948: /* 16D48 8003B948 960200BE */ lhu $v0, 0xBE($s0) /* 16D4C 8003B94C 2442FFFF */ addiu $v0, $v0, -0x1 /* 16D50 8003B950 A60200BE */ sh $v0, 0xBE($s0) /* 16D54 8003B954 8FBF0024 */ lw $ra, 0x24($sp) /* 16D58 8003B958 8FB20020 */ lw $s2, 0x20($sp) /* 16D5C 8003B95C 8FB1001C */ lw $s1, 0x1C($sp) /* 16D60 8003B960 8FB00018 */ lw $s0, 0x18($sp) /* 16D64 8003B964 03E00008 */ jr $ra /* 16D68 8003B968 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 npc_draw_palswap_mode_1(Npc* npc, s32 arg1, Matrix4f mtx) { s32 i, j; s32 temp3; PAL_PTR src; PAL_PTR dst; if (npc->dirtyPalettes != 0) { npc->spritePaletteList = spr_get_npc_palettes(npc->currentAnim >> 16); npc->paletteCount = 0; while ((s32)npc->spritePaletteList[npc->paletteCount] != -1) { npc->paletteCount++; } npc->unk_C0 = spr_get_npc_color_variations(npc->currentAnim >> 16); for (i = 0; i < npc->paletteCount; i++) { dst = npc->localPaletteData[i]; src = npc->spritePaletteList[i]; if (src != NULL) { for (j = 0; j < 16; j++) { *dst++ = *src++; } } } npc->palSwapState = -2; npc->palSwapLerpAlpha = 0; npc->dirtyPalettes = 0; npc->palSwapTimer = 0; } if (npc->palSwapTimer == 0) { npc->palSwapState += 2; temp3 = D_80077BF0[npc->palSwapState]; if (temp3 == 255) { npc->palSwapState = 0; } npc->palSwapTimer = D_80077BF0[npc->palSwapState + 1] / 2; } temp3 = D_80077BF0[npc->palSwapState]; npc->palSwapTimer--; switch(temp3) { case 0: for (i = 0; i < npc->unk_C0; i++) { dst = npc->localPaletteData[i]; src = npc->spritePaletteList[i]; if (src != NULL) { for (j = 0; j < 16; j++) { *dst++ = *src++; } } } break; case 1: for (i = 0; i < npc->unk_C0; i++) { dst = npc->localPaletteData[i]; src = npc->spritePaletteList[npc->unk_C0 * 5 + i]; if (src != NULL) { for (j = 0; j < 16; j++) { *dst++ = *src++; } } } break; case 2: for (i = 0; i < npc->unk_C0; i++) { dst = npc->localPaletteData[i]; src = npc->spritePaletteList[npc->unk_C0 * 6 + i]; if (src != NULL) { for (j = 0; j < 16; j++) { *dst++ = *src++; } } } break; } for (i = 0; i < npc->paletteCount; i++) { npc->localPalettes[i] = npc->localPaletteData[i]; } if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) { s32 alpha = npc->alpha * npc->alpha2 / 255; u32 mask; if (alpha < 255) { mask = DRAW_SPRITE_OVERRIDE_ALPHA; } else { mask = 0; } mask |= DRAW_SPRITE_OVERRIDE_PALETTES; spr_draw_npc_sprite(npc->spriteInstanceID | mask, arg1, alpha, npc->localPalettes, mtx); } npc->palSwapLerpAlpha--; }
### RAW ASSEMBLY INSTRUCTIONS: glabel pink_sparkles_appendGfx /* 412BF4 E01244C4 27BDFEE0 */ addiu $sp, $sp, -0x120 /* 412BF8 E01244C8 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 412BFC E01244CC 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 412C00 E01244D0 AFB000E0 */ sw $s0, 0xE0($sp) /* 412C04 E01244D4 27B00098 */ addiu $s0, $sp, 0x98 /* 412C08 E01244D8 AFA40120 */ sw $a0, 0x120($sp) /* 412C0C E01244DC 0200202D */ daddu $a0, $s0, $zero /* 412C10 E01244E0 AFB300EC */ sw $s3, 0xEC($sp) /* 412C14 E01244E4 0000982D */ daddu $s3, $zero, $zero /* 412C18 E01244E8 AFB400F0 */ sw $s4, 0xF0($sp) /* 412C1C E01244EC 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 412C20 E01244F0 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 412C24 E01244F4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 412C28 E01244F8 AFBF0104 */ sw $ra, 0x104($sp) /* 412C2C E01244FC AFBE0100 */ sw $fp, 0x100($sp) /* 412C30 E0124500 AFB700FC */ sw $s7, 0xFC($sp) /* 412C34 E0124504 AFB600F8 */ sw $s6, 0xF8($sp) /* 412C38 E0124508 AFB500F4 */ sw $s5, 0xF4($sp) /* 412C3C E012450C AFB200E8 */ sw $s2, 0xE8($sp) /* 412C40 E0124510 AFB100E4 */ sw $s1, 0xE4($sp) /* 412C44 E0124514 F7B80118 */ sdc1 $f24, 0x118($sp) /* 412C48 E0124518 F7B60110 */ sdc1 $f22, 0x110($sp) /* 412C4C E012451C F7B40108 */ sdc1 $f20, 0x108($sp) /* 412C50 E0124520 8E830000 */ lw $v1, 0x0($s4) /* 412C54 E0124524 8FA90120 */ lw $t1, 0x120($sp) /* 412C58 E0124528 0060282D */ daddu $a1, $v1, $zero /* 412C5C E012452C 8D31000C */ lw $s1, 0xC($t1) /* 412C60 E0124530 24630008 */ addiu $v1, $v1, 0x8 /* 412C64 E0124534 AE830000 */ sw $v1, 0x0($s4) /* 412C68 E0124538 ACA20000 */ sw $v0, 0x0($a1) /* 412C6C E012453C 24620008 */ addiu $v0, $v1, 0x8 /* 412C70 E0124540 ACA00004 */ sw $zero, 0x4($a1) /* 412C74 E0124544 AE820000 */ sw $v0, 0x0($s4) /* 412C78 E0124548 AC660000 */ sw $a2, 0x0($v1) /* 412C7C E012454C 8D250010 */ lw $a1, 0x10($t1) /* 412C80 E0124550 24620010 */ addiu $v0, $v1, 0x10 /* 412C84 E0124554 AE820000 */ sw $v0, 0x0($s4) /* 412C88 E0124558 8CA5001C */ lw $a1, 0x1C($a1) /* 412C8C E012455C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 412C90 E0124560 AC620008 */ sw $v0, 0x8($v1) /* 412C94 E0124564 3C020900 */ lui $v0, %hi(D_09000F20_327330) /* 412C98 E0124568 24420F20 */ addiu $v0, $v0, %lo(D_09000F20_327330) /* 412C9C E012456C AC62000C */ sw $v0, 0xC($v1) /* 412CA0 E0124570 3C028000 */ lui $v0, (0x80000000 >> 16) /* 412CA4 E0124574 00A22821 */ addu $a1, $a1, $v0 /* 412CA8 E0124578 AC650004 */ sw $a1, 0x4($v1) /* 412CAC E012457C 8E250004 */ lw $a1, 0x4($s1) /* 412CB0 E0124580 8E260008 */ lw $a2, 0x8($s1) /* 412CB4 E0124584 8E27000C */ lw $a3, 0xC($s1) /* 412CB8 E0124588 8E220020 */ lw $v0, 0x20($s1) /* 412CBC E012458C 2631002C */ addiu $s1, $s1, 0x2C /* 412CC0 E0124590 2442FFFF */ addiu $v0, $v0, -0x1 /* 412CC4 E0124594 00021840 */ sll $v1, $v0, 1 /* 412CC8 E0124598 00621821 */ addu $v1, $v1, $v0 /* 412CCC E012459C 0C080108 */ jal shim_guTranslateF /* 412CD0 E01245A0 AFA300D8 */ sw $v1, 0xD8($sp) /* 412CD4 E01245A4 27B20058 */ addiu $s2, $sp, 0x58 /* 412CD8 E01245A8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 412CDC E01245AC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 412CE0 E01245B0 44800000 */ mtc1 $zero, $f0 /* 412CE4 E01245B4 00031080 */ sll $v0, $v1, 2 /* 412CE8 E01245B8 00431021 */ addu $v0, $v0, $v1 /* 412CEC E01245BC 00021080 */ sll $v0, $v0, 2 /* 412CF0 E01245C0 00431023 */ subu $v0, $v0, $v1 /* 412CF4 E01245C4 000218C0 */ sll $v1, $v0, 3 /* 412CF8 E01245C8 00431021 */ addu $v0, $v0, $v1 /* 412CFC E01245CC 000210C0 */ sll $v0, $v0, 3 /* 412D00 E01245D0 44060000 */ mfc1 $a2, $f0 /* 412D04 E01245D4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 412D08 E01245D8 00220821 */ addu $at, $at, $v0 /* 412D0C E01245DC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 412D10 E01245E0 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 412D14 E01245E4 46000007 */ neg.s $f0, $f0 /* 412D18 E01245E8 44050000 */ mfc1 $a1, $f0 /* 412D1C E01245EC 0240202D */ daddu $a0, $s2, $zero /* 412D20 E01245F0 0C080104 */ jal shim_guRotateF /* 412D24 E01245F4 AFA60010 */ sw $a2, 0x10($sp) /* 412D28 E01245F8 0240202D */ daddu $a0, $s2, $zero /* 412D2C E01245FC 0200282D */ daddu $a1, $s0, $zero /* 412D30 E0124600 0C080114 */ jal shim_guMtxCatF /* 412D34 E0124604 00A0302D */ daddu $a2, $a1, $zero /* 412D38 E0124608 3C013F33 */ lui $at, (0x3F333333 >> 16) /* 412D3C E012460C 34213333 */ ori $at, $at, (0x3F333333 & 0xFFFF) /* 412D40 E0124610 4481A000 */ mtc1 $at, $f20 /* 412D44 E0124614 8FA90120 */ lw $t1, 0x120($sp) /* 412D48 E0124618 3C013FB3 */ lui $at, (0x3FB33333 >> 16) /* 412D4C E012461C 34213333 */ ori $at, $at, (0x3FB33333 & 0xFFFF) /* 412D50 E0124620 4481B000 */ mtc1 $at, $f22 /* 412D54 E0124624 8D220008 */ lw $v0, 0x8($t1) /* 412D58 E0124628 2442FFFF */ addiu $v0, $v0, -0x1 /* 412D5C E012462C 18400083 */ blez $v0, .LE012483C /* 412D60 E0124630 4600A606 */ mov.s $f24, $f20 /* 412D64 E0124634 0240B02D */ daddu $s6, $s2, $zero /* 412D68 E0124638 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 412D6C E012463C 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 412D70 E0124640 3C150001 */ lui $s5, (0x11630 >> 16) /* 412D74 E0124644 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 412D78 E0124648 0280902D */ daddu $s2, $s4, $zero /* 412D7C E012464C 26310024 */ addiu $s1, $s1, 0x24 /* 412D80 E0124650 8FA900D8 */ lw $t1, 0xD8($sp) /* 412D84 E0124654 3C1EE012 */ lui $fp, %hi(D_E0124BC0) /* 412D88 E0124658 27DE4BC0 */ addiu $fp, $fp, %lo(D_E0124BC0) /* 412D8C E012465C 013E8021 */ addu $s0, $t1, $fp .LE0124660: /* 412D90 E0124660 8E340004 */ lw $s4, 0x4($s1) /* 412D94 E0124664 0680006E */ bltz $s4, .LE0124820 /* 412D98 E0124668 00000000 */ nop /* 412D9C E012466C 8E25FFE0 */ lw $a1, -0x20($s1) /* 412DA0 E0124670 8E26FFE4 */ lw $a2, -0x1C($s1) /* 412DA4 E0124674 8E27FFE8 */ lw $a3, -0x18($s1) /* 412DA8 E0124678 0C080108 */ jal shim_guTranslateF /* 412DAC E012467C 02C0202D */ daddu $a0, $s6, $zero /* 412DB0 E0124680 02C0202D */ daddu $a0, $s6, $zero /* 412DB4 E0124684 27A50098 */ addiu $a1, $sp, 0x98 /* 412DB8 E0124688 C6200000 */ lwc1 $f0, 0x0($s1) /* 412DBC E012468C 27A60018 */ addiu $a2, $sp, 0x18 /* 412DC0 E0124690 E7A00080 */ swc1 $f0, 0x80($sp) /* 412DC4 E0124694 E7A0006C */ swc1 $f0, 0x6C($sp) /* 412DC8 E0124698 0C080114 */ jal shim_guMtxCatF /* 412DCC E012469C E7A00058 */ swc1 $f0, 0x58($sp) /* 412DD0 E01246A0 27A40018 */ addiu $a0, $sp, 0x18 /* 412DD4 E01246A4 96E50000 */ lhu $a1, 0x0($s7) /* 412DD8 E01246A8 3C02800A */ lui $v0, %hi(gDisplayContext) /* 412DDC E01246AC 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 412DE0 E01246B0 00052980 */ sll $a1, $a1, 6 /* 412DE4 E01246B4 00B52821 */ addu $a1, $a1, $s5 /* 412DE8 E01246B8 0C080118 */ jal shim_guMtxF2L /* 412DEC E01246BC 00452821 */ addu $a1, $v0, $a1 /* 412DF0 E01246C0 27C20024 */ addiu $v0, $fp, 0x24 /* 412DF4 E01246C4 0202102A */ slt $v0, $s0, $v0 /* 412DF8 E01246C8 50400001 */ beql $v0, $zero, .LE01246D0 /* 412DFC E01246CC 03C0802D */ daddu $s0, $fp, $zero .LE01246D0: /* 412E00 E01246D0 92020000 */ lbu $v0, 0x0($s0) /* 412E04 E01246D4 44822000 */ mtc1 $v0, $f4 /* 412E08 E01246D8 00000000 */ nop /* 412E0C E01246DC 46802120 */ cvt.s.w $f4, $f4 /* 412E10 E01246E0 46162102 */ mul.s $f4, $f4, $f22 /* 412E14 E01246E4 00000000 */ nop /* 412E18 E01246E8 26100001 */ addiu $s0, $s0, 0x1 /* 412E1C E01246EC 92020000 */ lbu $v0, 0x0($s0) /* 412E20 E01246F0 44821000 */ mtc1 $v0, $f2 /* 412E24 E01246F4 00000000 */ nop /* 412E28 E01246F8 468010A0 */ cvt.s.w $f2, $f2 /* 412E2C E01246FC 46181082 */ mul.s $f2, $f2, $f24 /* 412E30 E0124700 00000000 */ nop /* 412E34 E0124704 26100001 */ addiu $s0, $s0, 0x1 /* 412E38 E0124708 92020000 */ lbu $v0, 0x0($s0) /* 412E3C E012470C 44820000 */ mtc1 $v0, $f0 /* 412E40 E0124710 00000000 */ nop /* 412E44 E0124714 46800020 */ cvt.s.w $f0, $f0 /* 412E48 E0124718 46140002 */ mul.s $f0, $f0, $f20 /* 412E4C E012471C 00000000 */ nop /* 412E50 E0124720 4600218D */ trunc.w.s $f6, $f4 /* 412E54 E0124724 44033000 */ mfc1 $v1, $f6 /* 412E58 E0124728 00000000 */ nop /* 412E5C E012472C 28620100 */ slti $v0, $v1, 0x100 /* 412E60 E0124730 4600118D */ trunc.w.s $f6, $f2 /* 412E64 E0124734 44073000 */ mfc1 $a3, $f6 /* 412E68 E0124738 4600018D */ trunc.w.s $f6, $f0 /* 412E6C E012473C 44083000 */ mfc1 $t0, $f6 /* 412E70 E0124740 14400002 */ bnez $v0, .LE012474C /* 412E74 E0124744 26100001 */ addiu $s0, $s0, 0x1 /* 412E78 E0124748 240300FF */ addiu $v1, $zero, 0xFF .LE012474C: /* 412E7C E012474C 28E20100 */ slti $v0, $a3, 0x100 /* 412E80 E0124750 50400001 */ beql $v0, $zero, .LE0124758 /* 412E84 E0124754 240700FF */ addiu $a3, $zero, 0xFF .LE0124758: /* 412E88 E0124758 29020100 */ slti $v0, $t0, 0x100 /* 412E8C E012475C 50400001 */ beql $v0, $zero, .LE0124764 /* 412E90 E0124760 240800FF */ addiu $t0, $zero, 0xFF .LE0124764: /* 412E94 E0124764 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 412E98 E0124768 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 412E9C E012476C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 412EA0 E0124770 00031E00 */ sll $v1, $v1, 24 /* 412EA4 E0124774 8E440000 */ lw $a0, 0x0($s2) /* 412EA8 E0124778 3C09E012 */ lui $t1, %hi(D_E01248A0) /* 412EAC E012477C 252948A0 */ addiu $t1, $t1, %lo(D_E01248A0) /* 412EB0 E0124780 0080282D */ daddu $a1, $a0, $zero /* 412EB4 E0124784 24840008 */ addiu $a0, $a0, 0x8 /* 412EB8 E0124788 AE440000 */ sw $a0, 0x0($s2) /* 412EBC E012478C ACA20000 */ sw $v0, 0x0($a1) /* 412EC0 E0124790 30E200FF */ andi $v0, $a3, 0xFF /* 412EC4 E0124794 00021400 */ sll $v0, $v0, 16 /* 412EC8 E0124798 00621825 */ or $v1, $v1, $v0 /* 412ECC E012479C 310200FF */ andi $v0, $t0, 0xFF /* 412ED0 E01247A0 00021200 */ sll $v0, $v0, 8 /* 412ED4 E01247A4 00621825 */ or $v1, $v1, $v0 /* 412ED8 E01247A8 346300FF */ ori $v1, $v1, 0xFF /* 412EDC E01247AC 24820008 */ addiu $v0, $a0, 0x8 /* 412EE0 E01247B0 ACA30004 */ sw $v1, 0x4($a1) /* 412EE4 E01247B4 AE420000 */ sw $v0, 0x0($s2) /* 412EE8 E01247B8 96E20000 */ lhu $v0, 0x0($s7) /* 412EEC E01247BC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 412EF0 E01247C0 AC830000 */ sw $v1, 0x0($a0) /* 412EF4 E01247C4 24430001 */ addiu $v1, $v0, 0x1 /* 412EF8 E01247C8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 412EFC E01247CC 00021180 */ sll $v0, $v0, 6 /* 412F00 E01247D0 A6E30000 */ sh $v1, 0x0($s7) /* 412F04 E01247D4 3C03800A */ lui $v1, %hi(gDisplayContext) /* 412F08 E01247D8 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 412F0C E01247DC 00551021 */ addu $v0, $v0, $s5 /* 412F10 E01247E0 00621821 */ addu $v1, $v1, $v0 /* 412F14 E01247E4 24820010 */ addiu $v0, $a0, 0x10 /* 412F18 E01247E8 AC830004 */ sw $v1, 0x4($a0) /* 412F1C E01247EC AE420000 */ sw $v0, 0x0($s2) /* 412F20 E01247F0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 412F24 E01247F4 AC820008 */ sw $v0, 0x8($a0) /* 412F28 E01247F8 32820007 */ andi $v0, $s4, 0x7 /* 412F2C E01247FC 00021080 */ sll $v0, $v0, 2 /* 412F30 E0124800 00491021 */ addu $v0, $v0, $t1 /* 412F34 E0124804 8C430000 */ lw $v1, 0x0($v0) /* 412F38 E0124808 24820018 */ addiu $v0, $a0, 0x18 /* 412F3C E012480C AE420000 */ sw $v0, 0x0($s2) /* 412F40 E0124810 24020040 */ addiu $v0, $zero, 0x40 /* 412F44 E0124814 AC860010 */ sw $a2, 0x10($a0) /* 412F48 E0124818 AC820014 */ sw $v0, 0x14($a0) /* 412F4C E012481C AC83000C */ sw $v1, 0xC($a0) .LE0124820: /* 412F50 E0124820 8FA90120 */ lw $t1, 0x120($sp) /* 412F54 E0124824 26730001 */ addiu $s3, $s3, 0x1 /* 412F58 E0124828 8D220008 */ lw $v0, 0x8($t1) /* 412F5C E012482C 2442FFFF */ addiu $v0, $v0, -0x1 /* 412F60 E0124830 0262102A */ slt $v0, $s3, $v0 /* 412F64 E0124834 1440FF8A */ bnez $v0, .LE0124660 /* 412F68 E0124838 2631002C */ addiu $s1, $s1, 0x2C .LE012483C: /* 412F6C E012483C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 412F70 E0124840 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 412F74 E0124844 8C620000 */ lw $v0, 0x0($v1) /* 412F78 E0124848 0040202D */ daddu $a0, $v0, $zero /* 412F7C E012484C 24420008 */ addiu $v0, $v0, 0x8 /* 412F80 E0124850 AC620000 */ sw $v0, 0x0($v1) /* 412F84 E0124854 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 412F88 E0124858 AC820000 */ sw $v0, 0x0($a0) /* 412F8C E012485C AC800004 */ sw $zero, 0x4($a0) /* 412F90 E0124860 8FBF0104 */ lw $ra, 0x104($sp) /* 412F94 E0124864 8FBE0100 */ lw $fp, 0x100($sp) /* 412F98 E0124868 8FB700FC */ lw $s7, 0xFC($sp) /* 412F9C E012486C 8FB600F8 */ lw $s6, 0xF8($sp) /* 412FA0 E0124870 8FB500F4 */ lw $s5, 0xF4($sp) /* 412FA4 E0124874 8FB400F0 */ lw $s4, 0xF0($sp) /* 412FA8 E0124878 8FB300EC */ lw $s3, 0xEC($sp) /* 412FAC E012487C 8FB200E8 */ lw $s2, 0xE8($sp) /* 412FB0 E0124880 8FB100E4 */ lw $s1, 0xE4($sp) /* 412FB4 E0124884 8FB000E0 */ lw $s0, 0xE0($sp) /* 412FB8 E0124888 D7B80118 */ ldc1 $f24, 0x118($sp) /* 412FBC E012488C D7B60110 */ ldc1 $f22, 0x110($sp) /* 412FC0 E0124890 D7B40108 */ ldc1 $f20, 0x108($sp) /* 412FC4 E0124894 03E00008 */ jr $ra /* 412FC8 E0124898 27BD0120 */ addiu $sp, $sp, 0x120 /* 412FCC E012489C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void pink_sparkles_appendGfx(void* effect) { PinkSparklesFXData* part = ((EffectInstance*)effect)->data.pinkSparkles; s32 primR; s32 primG; s32 primB; f32 factorR = 1.4f; f32 factorG = 0.7f; f32 factorB = 0.7f; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; s32 colorIdx; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000F20_338EE0); colorIdx = (part->unk_20 - 1) * 3; shim_guTranslateF(sp98, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp98, sp98); part++; for (i = 0; i < ((EffectInstance*)effect)->numParts - 1; i++, part++) { s32 unk_28 = part->unk_28; if (unk_28 >= 0) { shim_guTranslateF(sp58, part->unk_04, part->unk_08, part->unk_0C); sp58[0][0] = sp58[1][1] = sp58[2][2] = part->unk_24; shim_guMtxCatF(sp58, sp98, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); if (colorIdx >= ARRAY_COUNT(D_E0124BC0)) { colorIdx = 0; } primR = D_E0124BC0[colorIdx++] * factorR; primG = D_E0124BC0[colorIdx++] * factorG; primB = D_E0124BC0[colorIdx++] * factorB; if (primR > 255) { primR = 255; } if (primG > 255) { primG = 255; } if (primB > 255) { primB = 255; } gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, 255); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E01248A0[unk_28 & 7]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_screen_transition_stencil /* D0610 80139F10 0080782D */ daddu $t7, $a0, $zero /* D0614 80139F14 8FA3001C */ lw $v1, 0x1C($sp) /* D0618 80139F18 44864000 */ mtc1 $a2, $f8 /* D061C 80139F1C 04600014 */ bltz $v1, .L80139F70 /* D0620 80139F20 00A0C02D */ daddu $t8, $a1, $zero /* D0624 80139F24 3C04800B */ lui $a0, %hi(gCameras) /* D0628 80139F28 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* D062C 80139F2C 00031080 */ sll $v0, $v1, 2 /* D0630 80139F30 00431021 */ addu $v0, $v0, $v1 /* D0634 80139F34 00021080 */ sll $v0, $v0, 2 /* D0638 80139F38 00431023 */ subu $v0, $v0, $v1 /* D063C 80139F3C 000218C0 */ sll $v1, $v0, 3 /* D0640 80139F40 00431021 */ addu $v0, $v0, $v1 /* D0644 80139F44 000210C0 */ sll $v0, $v0, 3 /* D0648 80139F48 00441021 */ addu $v0, $v0, $a0 /* D064C 80139F4C 8449000E */ lh $t1, 0xE($v0) /* D0650 80139F50 844A0010 */ lh $t2, 0x10($v0) /* D0654 80139F54 8443000A */ lh $v1, 0xA($v0) /* D0658 80139F58 8442000C */ lh $v0, 0xC($v0) /* D065C 80139F5C 01235821 */ addu $t3, $t1, $v1 /* D0660 80139F60 01426021 */ addu $t4, $t2, $v0 /* D0664 80139F64 0120682D */ daddu $t5, $t1, $zero /* D0668 80139F68 0804E7E2 */ j .L80139F88 /* D066C 80139F6C 0140702D */ daddu $t6, $t2, $zero .L80139F70: /* D0670 80139F70 0000482D */ daddu $t1, $zero, $zero /* D0674 80139F74 0120502D */ daddu $t2, $t1, $zero /* D0678 80139F78 240B0140 */ addiu $t3, $zero, 0x140 /* D067C 80139F7C 240C00F0 */ addiu $t4, $zero, 0xF0 /* D0680 80139F80 0120682D */ daddu $t5, $t1, $zero /* D0684 80139F84 0120702D */ daddu $t6, $t1, $zero .L80139F88: /* D0688 80139F88 44800000 */ mtc1 $zero, $f0 /* D068C 80139F8C 00000000 */ nop /* D0690 80139F90 46004032 */ c.eq.s $f8, $f0 /* D0694 80139F94 00000000 */ nop /* D0698 80139F98 450100F0 */ bc1t .L8013A35C /* D069C 80139F9C 3C04ED00 */ lui $a0, (0xED000000 >> 16) /* D06A0 80139FA0 3C014080 */ lui $at, (0x40800000 >> 16) /* D06A4 80139FA4 44812000 */ mtc1 $at, $f4 /* D06A8 80139FA8 44891000 */ mtc1 $t1, $f2 /* D06AC 80139FAC 00000000 */ nop /* D06B0 80139FB0 468010A0 */ cvt.s.w $f2, $f2 /* D06B4 80139FB4 46041082 */ mul.s $f2, $f2, $f4 /* D06B8 80139FB8 00000000 */ nop /* D06BC 80139FBC 3C08800A */ lui $t0, %hi(gMainGfxPos) /* D06C0 80139FC0 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* D06C4 80139FC4 448A0000 */ mtc1 $t2, $f0 /* D06C8 80139FC8 00000000 */ nop /* D06CC 80139FCC 46800020 */ cvt.s.w $f0, $f0 /* D06D0 80139FD0 8D060000 */ lw $a2, 0x0($t0) /* D06D4 80139FD4 46040002 */ mul.s $f0, $f0, $f4 /* D06D8 80139FD8 00000000 */ nop /* D06DC 80139FDC 3C01437F */ lui $at, (0x437F0000 >> 16) /* D06E0 80139FE0 44813000 */ mtc1 $at, $f6 /* D06E4 80139FE4 00C0282D */ daddu $a1, $a2, $zero /* D06E8 80139FE8 24C60008 */ addiu $a2, $a2, 0x8 /* D06EC 80139FEC AD060000 */ sw $a2, 0x0($t0) /* D06F0 80139FF0 46064032 */ c.eq.s $f8, $f6 /* D06F4 80139FF4 4600128D */ trunc.w.s $f10, $f2 /* D06F8 80139FF8 44025000 */ mfc1 $v0, $f10 /* D06FC 80139FFC 00000000 */ nop /* D0700 8013A000 30420FFF */ andi $v0, $v0, 0xFFF /* D0704 8013A004 00021300 */ sll $v0, $v0, 12 /* D0708 8013A008 4600028D */ trunc.w.s $f10, $f0 /* D070C 8013A00C 44035000 */ mfc1 $v1, $f10 /* D0710 8013A010 448B1000 */ mtc1 $t3, $f2 /* D0714 8013A014 00000000 */ nop /* D0718 8013A018 468010A0 */ cvt.s.w $f2, $f2 /* D071C 8013A01C 46041082 */ mul.s $f2, $f2, $f4 /* D0720 8013A020 00000000 */ nop /* D0724 8013A024 30630FFF */ andi $v1, $v1, 0xFFF /* D0728 8013A028 00641825 */ or $v1, $v1, $a0 /* D072C 8013A02C 00431025 */ or $v0, $v0, $v1 /* D0730 8013A030 448C0000 */ mtc1 $t4, $f0 /* D0734 8013A034 00000000 */ nop /* D0738 8013A038 46800020 */ cvt.s.w $f0, $f0 /* D073C 8013A03C 46040002 */ mul.s $f0, $f0, $f4 /* D0740 8013A040 00000000 */ nop /* D0744 8013A044 ACA20000 */ sw $v0, 0x0($a1) /* D0748 8013A048 4600128D */ trunc.w.s $f10, $f2 /* D074C 8013A04C 44025000 */ mfc1 $v0, $f10 /* D0750 8013A050 00000000 */ nop /* D0754 8013A054 30420FFF */ andi $v0, $v0, 0xFFF /* D0758 8013A058 00021300 */ sll $v0, $v0, 12 /* D075C 8013A05C 4600028D */ trunc.w.s $f10, $f0 /* D0760 8013A060 44035000 */ mfc1 $v1, $f10 /* D0764 8013A064 00000000 */ nop /* D0768 8013A068 30630FFF */ andi $v1, $v1, 0xFFF /* D076C 8013A06C 00431025 */ or $v0, $v0, $v1 /* D0770 8013A070 45000009 */ bc1f .L8013A098 /* D0774 8013A074 ACA20004 */ sw $v0, 0x4($a1) /* D0778 8013A078 3C04FCFF */ lui $a0, (0xFCFFFFFF >> 16) /* D077C 8013A07C 3484FFFF */ ori $a0, $a0, (0xFCFFFFFF & 0xFFFF) /* D0780 8013A080 3C03FFFD */ lui $v1, (0xFFFDFCFE >> 16) /* D0784 8013A084 3463FCFE */ ori $v1, $v1, (0xFFFDFCFE & 0xFFFF) /* D0788 8013A088 24C20008 */ addiu $v0, $a2, 0x8 /* D078C 8013A08C AD020000 */ sw $v0, 0x0($t0) /* D0790 8013A090 ACC40000 */ sw $a0, 0x0($a2) /* D0794 8013A094 ACC30004 */ sw $v1, 0x4($a2) .L8013A098: /* D0798 8013A098 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* D079C 8013A09C 00071E00 */ sll $v1, $a3, 24 /* D07A0 8013A0A0 46083001 */ sub.s $f0, $f6, $f8 /* D07A4 8013A0A4 8D050000 */ lw $a1, 0x0($t0) /* D07A8 8013A0A8 3C014128 */ lui $at, (0x41280000 >> 16) /* D07AC 8013A0AC 44811000 */ mtc1 $at, $f2 /* D07B0 8013A0B0 3C014200 */ lui $at, (0x42000000 >> 16) /* D07B4 8013A0B4 44812000 */ mtc1 $at, $f4 /* D07B8 8013A0B8 00A0202D */ daddu $a0, $a1, $zero /* D07BC 8013A0BC 24A50008 */ addiu $a1, $a1, 0x8 /* D07C0 8013A0C0 AD050000 */ sw $a1, 0x0($t0) /* D07C4 8013A0C4 AC820000 */ sw $v0, 0x0($a0) /* D07C8 8013A0C8 8FA20010 */ lw $v0, 0x10($sp) /* D07CC 8013A0CC 24A7000C */ addiu $a3, $a1, 0xC /* D07D0 8013A0D0 304200FF */ andi $v0, $v0, 0xFF /* D07D4 8013A0D4 00021400 */ sll $v0, $v0, 16 /* D07D8 8013A0D8 00621825 */ or $v1, $v1, $v0 /* D07DC 8013A0DC 8FA20014 */ lw $v0, 0x14($sp) /* D07E0 8013A0E0 46020002 */ mul.s $f0, $f0, $f2 /* D07E4 8013A0E4 00000000 */ nop /* D07E8 8013A0E8 304200FF */ andi $v0, $v0, 0xFF /* D07EC 8013A0EC 00021200 */ sll $v0, $v0, 8 /* D07F0 8013A0F0 00621825 */ or $v1, $v1, $v0 /* D07F4 8013A0F4 8FA20018 */ lw $v0, 0x18($sp) /* D07F8 8013A0F8 3C018015 */ lui $at, %hi(D_80150FA0) /* D07FC 8013A0FC D4220FA0 */ ldc1 $f2, %lo(D_80150FA0)($at) /* D0800 8013A100 304200FF */ andi $v0, $v0, 0xFF /* D0804 8013A104 00621825 */ or $v1, $v1, $v0 /* D0808 8013A108 24A20008 */ addiu $v0, $a1, 0x8 /* D080C 8013A10C AC830004 */ sw $v1, 0x4($a0) /* D0810 8013A110 AD020000 */ sw $v0, 0x0($t0) /* D0814 8013A114 000B1080 */ sll $v0, $t3, 2 /* D0818 8013A118 30420FFF */ andi $v0, $v0, 0xFFF /* D081C 8013A11C 00021300 */ sll $v0, $v0, 12 /* D0820 8013A120 000C2080 */ sll $a0, $t4, 2 /* D0824 8013A124 30840FFF */ andi $a0, $a0, 0xFFF /* D0828 8013A128 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* D082C 8013A12C 00832025 */ or $a0, $a0, $v1 /* D0830 8013A130 00441025 */ or $v0, $v0, $a0 /* D0834 8013A134 ACA20000 */ sw $v0, 0x0($a1) /* D0838 8013A138 00091080 */ sll $v0, $t1, 2 /* D083C 8013A13C 30420FFF */ andi $v0, $v0, 0xFFF /* D0840 8013A140 00021300 */ sll $v0, $v0, 12 /* D0844 8013A144 000A1880 */ sll $v1, $t2, 2 /* D0848 8013A148 30630FFF */ andi $v1, $v1, 0xFFF /* D084C 8013A14C 46060003 */ div.s $f0, $f0, $f6 /* D0850 8013A150 46000021 */ cvt.d.s $f0, $f0 /* D0854 8013A154 46220000 */ add.d $f0, $f0, $f2 /* D0858 8013A158 01AF2023 */ subu $a0, $t5, $t7 /* D085C 8013A15C 44841000 */ mtc1 $a0, $f2 /* D0860 8013A160 00000000 */ nop /* D0864 8013A164 468010A0 */ cvt.s.w $f2, $f2 /* D0868 8013A168 46041082 */ mul.s $f2, $f2, $f4 /* D086C 8013A16C 00000000 */ nop /* D0870 8013A170 00431025 */ or $v0, $v0, $v1 /* D0874 8013A174 ACA20004 */ sw $v0, 0x4($a1) /* D0878 8013A178 46200120 */ cvt.s.d $f4, $f0 /* D087C 8013A17C 3C014180 */ lui $at, (0x41800000 >> 16) /* D0880 8013A180 44810000 */ mtc1 $at, $f0 /* D0884 8013A184 46041083 */ div.s $f2, $f2, $f4 /* D0888 8013A188 46001080 */ add.s $f2, $f2, $f0 /* D088C 8013A18C 3C014480 */ lui $at, (0x44800000 >> 16) /* D0890 8013A190 44810000 */ mtc1 $at, $f0 /* D0894 8013A194 24A20010 */ addiu $v0, $a1, 0x10 /* D0898 8013A198 AD020000 */ sw $v0, 0x0($t0) /* D089C 8013A19C 46001000 */ add.s $f0, $f2, $f0 /* D08A0 8013A1A0 3C014F00 */ lui $at, (0x4F000000 >> 16) /* D08A4 8013A1A4 44811000 */ mtc1 $at, $f2 /* D08A8 8013A1A8 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* D08AC 8013A1AC 4600103E */ c.le.s $f2, $f0 /* D08B0 8013A1B0 00000000 */ nop /* D08B4 8013A1B4 45010005 */ bc1t .L8013A1CC /* D08B8 8013A1B8 ACA20008 */ sw $v0, 0x8($a1) /* D08BC 8013A1BC 4600028D */ trunc.w.s $f10, $f0 /* D08C0 8013A1C0 44035000 */ mfc1 $v1, $f10 /* D08C4 8013A1C4 0804E87A */ j .L8013A1E8 /* D08C8 8013A1C8 01D81023 */ subu $v0, $t6, $t8 .L8013A1CC: /* D08CC 8013A1CC 46020001 */ sub.s $f0, $f0, $f2 /* D08D0 8013A1D0 3C028000 */ lui $v0, (0x80000000 >> 16) /* D08D4 8013A1D4 4600028D */ trunc.w.s $f10, $f0 /* D08D8 8013A1D8 44035000 */ mfc1 $v1, $f10 /* D08DC 8013A1DC 00000000 */ nop /* D08E0 8013A1E0 00621825 */ or $v1, $v1, $v0 /* D08E4 8013A1E4 01D81023 */ subu $v0, $t6, $t8 .L8013A1E8: /* D08E8 8013A1E8 3C014200 */ lui $at, (0x42000000 >> 16) /* D08EC 8013A1EC 44811000 */ mtc1 $at, $f2 /* D08F0 8013A1F0 44820000 */ mtc1 $v0, $f0 /* D08F4 8013A1F4 00000000 */ nop /* D08F8 8013A1F8 46800020 */ cvt.s.w $f0, $f0 /* D08FC 8013A1FC 46020002 */ mul.s $f0, $f0, $f2 /* D0900 8013A200 00000000 */ nop /* D0904 8013A204 3C014180 */ lui $at, (0x41800000 >> 16) /* D0908 8013A208 44811000 */ mtc1 $at, $f2 /* D090C 8013A20C 46040003 */ div.s $f0, $f0, $f4 /* D0910 8013A210 46020000 */ add.s $f0, $f0, $f2 /* D0914 8013A214 3C014480 */ lui $at, (0x44800000 >> 16) /* D0918 8013A218 44811000 */ mtc1 $at, $f2 /* D091C 8013A21C 00000000 */ nop /* D0920 8013A220 46020000 */ add.s $f0, $f0, $f2 /* D0924 8013A224 3C014F00 */ lui $at, (0x4F000000 >> 16) /* D0928 8013A228 44811000 */ mtc1 $at, $f2 /* D092C 8013A22C 00000000 */ nop /* D0930 8013A230 4600103E */ c.le.s $f2, $f0 /* D0934 8013A234 00000000 */ nop /* D0938 8013A238 45010005 */ bc1t .L8013A250 /* D093C 8013A23C 00033400 */ sll $a2, $v1, 16 /* D0940 8013A240 4600028D */ trunc.w.s $f10, $f0 /* D0944 8013A244 44045000 */ mfc1 $a0, $f10 /* D0948 8013A248 0804E89A */ j .L8013A268 /* D094C 8013A24C 00000000 */ nop .L8013A250: /* D0950 8013A250 46020001 */ sub.s $f0, $f0, $f2 /* D0954 8013A254 3C028000 */ lui $v0, (0x80000000 >> 16) /* D0958 8013A258 4600028D */ trunc.w.s $f10, $f0 /* D095C 8013A25C 44045000 */ mfc1 $a0, $f10 /* D0960 8013A260 00000000 */ nop /* D0964 8013A264 00822025 */ or $a0, $a0, $v0 .L8013A268: /* D0968 8013A268 3C05800A */ lui $a1, %hi(gMainGfxPos) /* D096C 8013A26C 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* D0970 8013A270 3082FFFF */ andi $v0, $a0, 0xFFFF /* D0974 8013A274 8CA30000 */ lw $v1, 0x0($a1) /* D0978 8013A278 00C21025 */ or $v0, $a2, $v0 /* D097C 8013A27C ACE20000 */ sw $v0, 0x0($a3) /* D0980 8013A280 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* D0984 8013A284 3C014480 */ lui $at, (0x44800000 >> 16) /* D0988 8013A288 44810000 */ mtc1 $at, $f0 /* D098C 8013A28C 3C014F00 */ lui $at, (0x4F000000 >> 16) /* D0990 8013A290 44811000 */ mtc1 $at, $f2 /* D0994 8013A294 0060202D */ daddu $a0, $v1, $zero /* D0998 8013A298 24630008 */ addiu $v1, $v1, 0x8 /* D099C 8013A29C 46040003 */ div.s $f0, $f0, $f4 /* D09A0 8013A2A0 ACA30000 */ sw $v1, 0x0($a1) /* D09A4 8013A2A4 AC820000 */ sw $v0, 0x0($a0) /* D09A8 8013A2A8 4600103E */ c.le.s $f2, $f0 /* D09AC 8013A2AC 00000000 */ nop /* D09B0 8013A2B0 45010005 */ bc1t .L8013A2C8 /* D09B4 8013A2B4 24840004 */ addiu $a0, $a0, 0x4 /* D09B8 8013A2B8 4600028D */ trunc.w.s $f10, $f0 /* D09BC 8013A2BC 44035000 */ mfc1 $v1, $f10 /* D09C0 8013A2C0 0804E8B9 */ j .L8013A2E4 /* D09C4 8013A2C4 00033C00 */ sll $a3, $v1, 16 .L8013A2C8: /* D09C8 8013A2C8 46020001 */ sub.s $f0, $f0, $f2 /* D09CC 8013A2CC 3C028000 */ lui $v0, (0x80000000 >> 16) /* D09D0 8013A2D0 4600028D */ trunc.w.s $f10, $f0 /* D09D4 8013A2D4 44035000 */ mfc1 $v1, $f10 /* D09D8 8013A2D8 00000000 */ nop /* D09DC 8013A2DC 00621825 */ or $v1, $v1, $v0 /* D09E0 8013A2E0 00033C00 */ sll $a3, $v1, 16 .L8013A2E4: /* D09E4 8013A2E4 3C014480 */ lui $at, (0x44800000 >> 16) /* D09E8 8013A2E8 44810000 */ mtc1 $at, $f0 /* D09EC 8013A2EC 3C014F00 */ lui $at, (0x4F000000 >> 16) /* D09F0 8013A2F0 44811000 */ mtc1 $at, $f2 /* D09F4 8013A2F4 46040003 */ div.s $f0, $f0, $f4 /* D09F8 8013A2F8 4600103E */ c.le.s $f2, $f0 /* D09FC 8013A2FC 00000000 */ nop /* D0A00 8013A300 45030005 */ bc1tl .L8013A318 /* D0A04 8013A304 46020001 */ sub.s $f0, $f0, $f2 /* D0A08 8013A308 4600028D */ trunc.w.s $f10, $f0 /* D0A0C 8013A30C 44065000 */ mfc1 $a2, $f10 /* D0A10 8013A310 0804E8CB */ j .L8013A32C /* D0A14 8013A314 00000000 */ nop .L8013A318: /* D0A18 8013A318 3C028000 */ lui $v0, (0x80000000 >> 16) /* D0A1C 8013A31C 4600028D */ trunc.w.s $f10, $f0 /* D0A20 8013A320 44065000 */ mfc1 $a2, $f10 /* D0A24 8013A324 00000000 */ nop /* D0A28 8013A328 00C23025 */ or $a2, $a2, $v0 .L8013A32C: /* D0A2C 8013A32C 3C05800A */ lui $a1, %hi(gMainGfxPos) /* D0A30 8013A330 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* D0A34 8013A334 30C2FFFF */ andi $v0, $a2, 0xFFFF /* D0A38 8013A338 8CA30000 */ lw $v1, 0x0($a1) /* D0A3C 8013A33C 00E21025 */ or $v0, $a3, $v0 /* D0A40 8013A340 AC820000 */ sw $v0, 0x0($a0) /* D0A44 8013A344 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* D0A48 8013A348 0060202D */ daddu $a0, $v1, $zero /* D0A4C 8013A34C 24630008 */ addiu $v1, $v1, 0x8 /* D0A50 8013A350 ACA30000 */ sw $v1, 0x0($a1) /* D0A54 8013A354 AC820000 */ sw $v0, 0x0($a0) /* D0A58 8013A358 AC800004 */ sw $zero, 0x4($a0) .L8013A35C: /* D0A5C 8013A35C 03E00008 */ jr $ra /* D0A60 8013A360 00000000 */ nop /* D0A64 8013A364 00000000 */ nop /* D0A68 8013A368 00000000 */ nop /* D0A6C 8013A36C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void appendGfx_screen_transition_stencil(s32 arg0, s32 arg1, f32 progress, s32 primR, s32 primG, s32 primB, s32 primA, s32 camID) { s32 x1, y1, x2, y2, t5, t6; f32 texScale; if (camID >= 0) { x1 = gCameras[camID].viewportStartX; y1 = gCameras[camID].viewportStartY; x2 = gCameras[camID].viewportStartX + gCameras[camID].viewportW; y2 = gCameras[camID].viewportStartY + gCameras[camID].viewportH; t5 = x1; t6 = y1; } else { x1 = 0; y1 = 0; x2 = SCREEN_WIDTH; y2 = SCREEN_HEIGHT; t5 = 0; t6 = 0; } if (progress == 0.0f) { return; } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2); if (progress == 255.0f) { gDPSetCombineMode(gMainGfxPos++, PM_CC_08, PM_CC_08); } gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, primA); texScale = (255.0f - progress) * 10.5f / 255.0f + 0.09; // range from gSPTextureRectangle(gMainGfxPos++, x1 * 4, y1 * 4, x2 * 4, y2 * 4, G_TX_RENDERTILE, (t5 - arg0) * 32.0f / texScale + 16.0f + 1024.0f, (t6 - arg1) * 32.0f / texScale + 16.0f + 1024.0f, 1024.0f / texScale, 1024.0f / texScale); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel evt_set_variable /* ECA48 802C8098 27BDFFE0 */ addiu $sp, $sp, -0x20 /* ECA4C 802C809C 0080382D */ daddu $a3, $a0, $zero /* ECA50 802C80A0 AFB00010 */ sw $s0, 0x10($sp) /* ECA54 802C80A4 00A0802D */ daddu $s0, $a1, $zero /* ECA58 802C80A8 AFB20018 */ sw $s2, 0x18($sp) /* ECA5C 802C80AC 00C0902D */ daddu $s2, $a2, $zero /* ECA60 802C80B0 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16) /* ECA64 802C80B4 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF) /* ECA68 802C80B8 0050102A */ slt $v0, $v0, $s0 /* ECA6C 802C80BC AFBF001C */ sw $ra, 0x1C($sp) /* ECA70 802C80C0 10400099 */ beqz $v0, .L802C8328 /* ECA74 802C80C4 AFB10014 */ sw $s1, 0x14($sp) /* ECA78 802C80C8 3C02F2E3 */ lui $v0, (0xF2E31100 >> 16) /* ECA7C 802C80CC 34421100 */ ori $v0, $v0, (0xF2E31100 & 0xFFFF) /* ECA80 802C80D0 0050102A */ slt $v0, $v0, $s0 /* ECA84 802C80D4 14400007 */ bnez $v0, .L802C80F4 /* ECA88 802C80D8 3C02F414 */ lui $v0, (0xF4143E00 >> 16) /* ECA8C 802C80DC 0C0B1248 */ jal evt_fixed_var_to_float /* ECA90 802C80E0 0240202D */ daddu $a0, $s2, $zero /* ECA94 802C80E4 4600008D */ trunc.w.s $f2, $f0 /* ECA98 802C80E8 44021000 */ mfc1 $v0, $f2 /* ECA9C 802C80EC 080B2105 */ j .L802C8414 /* ECAA0 802C80F0 00000000 */ nop .L802C80F4: /* ECAA4 802C80F4 34423E00 */ ori $v0, $v0, (0xF4143E00 & 0xFFFF) /* ECAA8 802C80F8 0050102A */ slt $v0, $v0, $s0 /* ECAAC 802C80FC 54400017 */ bnel $v0, $zero, .L802C815C /* ECAB0 802C8100 3C02F545 */ lui $v0, (0xF5456B00 >> 16) /* ECAB4 802C8104 3C020C84 */ lui $v0, (0xC845880 >> 16) /* ECAB8 802C8108 34425880 */ ori $v0, $v0, (0xC845880 & 0xFFFF) /* ECABC 802C810C 02028021 */ addu $s0, $s0, $v0 /* ECAC0 802C8110 06010002 */ bgez $s0, .L802C811C /* ECAC4 802C8114 0200102D */ daddu $v0, $s0, $zero /* ECAC8 802C8118 2602001F */ addiu $v0, $s0, 0x1F .L802C811C: /* ECACC 802C811C 00022943 */ sra $a1, $v0, 5 /* ECAD0 802C8120 00A0202D */ daddu $a0, $a1, $zero /* ECAD4 802C8124 00041140 */ sll $v0, $a0, 5 /* ECAD8 802C8128 12400009 */ beqz $s2, .L802C8150 /* ECADC 802C812C 02022823 */ subu $a1, $s0, $v0 /* ECAE0 802C8130 8CE20140 */ lw $v0, 0x140($a3) /* ECAE4 802C8134 00042080 */ sll $a0, $a0, 2 /* ECAE8 802C8138 00822021 */ addu $a0, $a0, $v0 /* ECAEC 802C813C 24020001 */ addiu $v0, $zero, 0x1 /* ECAF0 802C8140 8C830000 */ lw $v1, 0x0($a0) /* ECAF4 802C8144 00A21004 */ sllv $v0, $v0, $a1 /* ECAF8 802C8148 080B20C9 */ j .L802C8324 /* ECAFC 802C814C 00621825 */ or $v1, $v1, $v0 .L802C8150: /* ECB00 802C8150 8CE20140 */ lw $v0, 0x140($a3) /* ECB04 802C8154 080B20C3 */ j .L802C830C /* ECB08 802C8158 00042080 */ sll $a0, $a0, 2 .L802C815C: /* ECB0C 802C815C 34426B00 */ ori $v0, $v0, (0xF5456B00 & 0xFFFF) /* ECB10 802C8160 0050102A */ slt $v0, $v0, $s0 /* ECB14 802C8164 1440000A */ bnez $v0, .L802C8190 /* ECB18 802C8168 3C02F676 */ lui $v0, (0xF6769800 >> 16) /* ECB1C 802C816C 3C020B53 */ lui $v0, (0xB532B80 >> 16) /* ECB20 802C8170 34422B80 */ ori $v0, $v0, (0xB532B80 & 0xFFFF) /* ECB24 802C8174 02028021 */ addu $s0, $s0, $v0 /* ECB28 802C8178 8CE3013C */ lw $v1, 0x13C($a3) /* ECB2C 802C817C 00101080 */ sll $v0, $s0, 2 /* ECB30 802C8180 00431021 */ addu $v0, $v0, $v1 /* ECB34 802C8184 8C510000 */ lw $s1, 0x0($v0) /* ECB38 802C8188 080B2104 */ j .L802C8410 /* ECB3C 802C818C AC520000 */ sw $s2, 0x0($v0) .L802C8190: /* ECB40 802C8190 34429800 */ ori $v0, $v0, (0xF6769800 & 0xFFFF) /* ECB44 802C8194 0050102A */ slt $v0, $v0, $s0 /* ECB48 802C8198 1440000C */ bnez $v0, .L802C81CC /* ECB4C 802C819C 3C02F7A7 */ lui $v0, (0xF7A7C500 >> 16) /* ECB50 802C81A0 3C020A21 */ lui $v0, (0xA21FE80 >> 16) /* ECB54 802C81A4 3442FE80 */ ori $v0, $v0, (0xA21FE80 & 0xFFFF) /* ECB58 802C81A8 02028021 */ addu $s0, $s0, $v0 /* ECB5C 802C81AC 0C05154E */ jal get_global_byte /* ECB60 802C81B0 0200202D */ daddu $a0, $s0, $zero /* ECB64 802C81B4 0040882D */ daddu $s1, $v0, $zero /* ECB68 802C81B8 0200202D */ daddu $a0, $s0, $zero /* ECB6C 802C81BC 0C051548 */ jal set_global_byte /* ECB70 802C81C0 0240282D */ daddu $a1, $s2, $zero /* ECB74 802C81C4 080B2105 */ j .L802C8414 /* ECB78 802C81C8 0220102D */ daddu $v0, $s1, $zero .L802C81CC: /* ECB7C 802C81CC 3442C500 */ ori $v0, $v0, (0xF7A7C500 & 0xFFFF) /* ECB80 802C81D0 0050102A */ slt $v0, $v0, $s0 /* ECB84 802C81D4 1440000C */ bnez $v0, .L802C8208 /* ECB88 802C81D8 3C02F8D8 */ lui $v0, (0xF8D8F200 >> 16) /* ECB8C 802C81DC 3C0208F0 */ lui $v0, (0x8F0D180 >> 16) /* ECB90 802C81E0 3442D180 */ ori $v0, $v0, (0x8F0D180 & 0xFFFF) /* ECB94 802C81E4 02028021 */ addu $s0, $s0, $v0 /* ECB98 802C81E8 0C051594 */ jal get_area_byte /* ECB9C 802C81EC 0200202D */ daddu $a0, $s0, $zero /* ECBA0 802C81F0 0040882D */ daddu $s1, $v0, $zero /* ECBA4 802C81F4 0200202D */ daddu $a0, $s0, $zero /* ECBA8 802C81F8 0C05158E */ jal set_area_byte /* ECBAC 802C81FC 0240282D */ daddu $a1, $s2, $zero /* ECBB0 802C8200 080B2105 */ j .L802C8414 /* ECBB4 802C8204 0220102D */ daddu $v0, $s1, $zero .L802C8208: /* ECBB8 802C8208 3442F200 */ ori $v0, $v0, (0xF8D8F200 & 0xFFFF) /* ECBBC 802C820C 0050102A */ slt $v0, $v0, $s0 /* ECBC0 802C8210 14400010 */ bnez $v0, .L802C8254 /* ECBC4 802C8214 3C02FA0A */ lui $v0, (0xFA0A1F00 >> 16) /* ECBC8 802C8218 3C0207BF */ lui $v0, (0x7BFA480 >> 16) /* ECBCC 802C821C 3442A480 */ ori $v0, $v0, (0x7BFA480 & 0xFFFF) /* ECBD0 802C8220 02028021 */ addu $s0, $s0, $v0 /* ECBD4 802C8224 0C05152F */ jal get_global_flag /* ECBD8 802C8228 0200202D */ daddu $a0, $s0, $zero /* ECBDC 802C822C 12400005 */ beqz $s2, .L802C8244 /* ECBE0 802C8230 0040882D */ daddu $s1, $v0, $zero /* ECBE4 802C8234 0C051514 */ jal set_global_flag /* ECBE8 802C8238 0200202D */ daddu $a0, $s0, $zero /* ECBEC 802C823C 080B2105 */ j .L802C8414 /* ECBF0 802C8240 0220102D */ daddu $v0, $s1, $zero .L802C8244: /* ECBF4 802C8244 0C0514F8 */ jal clear_global_flag /* ECBF8 802C8248 0200202D */ daddu $a0, $s0, $zero /* ECBFC 802C824C 080B2105 */ j .L802C8414 /* ECC00 802C8250 0220102D */ daddu $v0, $s1, $zero .L802C8254: /* ECC04 802C8254 34421F00 */ ori $v0, $v0, (0xFA0A1F00 & 0xFFFF) /* ECC08 802C8258 0050102A */ slt $v0, $v0, $s0 /* ECC0C 802C825C 14400010 */ bnez $v0, .L802C82A0 /* ECC10 802C8260 3C02FB3B */ lui $v0, (0xFB3B4C00 >> 16) /* ECC14 802C8264 3C02068E */ lui $v0, (0x68E7780 >> 16) /* ECC18 802C8268 34427780 */ ori $v0, $v0, (0x68E7780 & 0xFFFF) /* ECC1C 802C826C 02028021 */ addu $s0, $s0, $v0 /* ECC20 802C8270 0C05157C */ jal get_area_flag /* ECC24 802C8274 0200202D */ daddu $a0, $s0, $zero /* ECC28 802C8278 12400005 */ beqz $s2, .L802C8290 /* ECC2C 802C827C 0040882D */ daddu $s1, $v0, $zero /* ECC30 802C8280 0C051568 */ jal set_area_flag /* ECC34 802C8284 0200202D */ daddu $a0, $s0, $zero /* ECC38 802C8288 080B2105 */ j .L802C8414 /* ECC3C 802C828C 0220102D */ daddu $v0, $s1, $zero .L802C8290: /* ECC40 802C8290 0C051553 */ jal clear_area_flag /* ECC44 802C8294 0200202D */ daddu $a0, $s0, $zero /* ECC48 802C8298 080B2105 */ j .L802C8414 /* ECC4C 802C829C 0220102D */ daddu $v0, $s1, $zero .L802C82A0: /* ECC50 802C82A0 34424C00 */ ori $v0, $v0, (0xFB3B4C00 & 0xFFFF) /* ECC54 802C82A4 0050102A */ slt $v0, $v0, $s0 /* ECC58 802C82A8 54400021 */ bnel $v0, $zero, .L802C8330 /* ECC5C 802C82AC 3C02FC6C */ lui $v0, (0xFC6C7900 >> 16) /* ECC60 802C82B0 3C02055D */ lui $v0, (0x55D4A80 >> 16) /* ECC64 802C82B4 34424A80 */ ori $v0, $v0, (0x55D4A80 & 0xFFFF) /* ECC68 802C82B8 02028021 */ addu $s0, $s0, $v0 /* ECC6C 802C82BC 06010002 */ bgez $s0, .L802C82C8 /* ECC70 802C82C0 0200102D */ daddu $v0, $s0, $zero /* ECC74 802C82C4 2602001F */ addiu $v0, $s0, 0x1F .L802C82C8: /* ECC78 802C82C8 00022943 */ sra $a1, $v0, 5 /* ECC7C 802C82CC 00A0202D */ daddu $a0, $a1, $zero /* ECC80 802C82D0 00041140 */ sll $v0, $a0, 5 /* ECC84 802C82D4 1240000A */ beqz $s2, .L802C8300 /* ECC88 802C82D8 02022823 */ subu $a1, $s0, $v0 /* ECC8C 802C82DC 3C02802E */ lui $v0, %hi(gMapFlags) /* ECC90 802C82E0 8C42A480 */ lw $v0, %lo(gMapFlags)($v0) /* ECC94 802C82E4 00042080 */ sll $a0, $a0, 2 /* ECC98 802C82E8 00822021 */ addu $a0, $a0, $v0 /* ECC9C 802C82EC 24020001 */ addiu $v0, $zero, 0x1 /* ECCA0 802C82F0 8C830000 */ lw $v1, 0x0($a0) /* ECCA4 802C82F4 00A21004 */ sllv $v0, $v0, $a1 /* ECCA8 802C82F8 080B20C9 */ j .L802C8324 /* ECCAC 802C82FC 00621825 */ or $v1, $v1, $v0 .L802C8300: /* ECCB0 802C8300 3C02802E */ lui $v0, %hi(gMapFlags) /* ECCB4 802C8304 8C42A480 */ lw $v0, %lo(gMapFlags)($v0) /* ECCB8 802C8308 00042080 */ sll $a0, $a0, 2 .L802C830C: /* ECCBC 802C830C 00822021 */ addu $a0, $a0, $v0 /* ECCC0 802C8310 24020001 */ addiu $v0, $zero, 0x1 /* ECCC4 802C8314 00A21004 */ sllv $v0, $v0, $a1 /* ECCC8 802C8318 8C830000 */ lw $v1, 0x0($a0) /* ECCCC 802C831C 00021027 */ nor $v0, $zero, $v0 /* ECCD0 802C8320 00621824 */ and $v1, $v1, $v0 .L802C8324: /* ECCD4 802C8324 AC830000 */ sw $v1, 0x0($a0) .L802C8328: /* ECCD8 802C8328 080B2105 */ j .L802C8414 /* ECCDC 802C832C 0240102D */ daddu $v0, $s2, $zero .L802C8330: /* ECCE0 802C8330 34427900 */ ori $v0, $v0, (0xFC6C7900 & 0xFFFF) /* ECCE4 802C8334 0050102A */ slt $v0, $v0, $s0 /* ECCE8 802C8338 5440001C */ bnel $v0, $zero, .L802C83AC /* ECCEC 802C833C 3C02FD9D */ lui $v0, (0xFD9DA600 >> 16) /* ECCF0 802C8340 3C02042C */ lui $v0, (0x42C1D80 >> 16) /* ECCF4 802C8344 34421D80 */ ori $v0, $v0, (0x42C1D80 & 0xFFFF) /* ECCF8 802C8348 02028021 */ addu $s0, $s0, $v0 /* ECCFC 802C834C 06010002 */ bgez $s0, .L802C8358 /* ECD00 802C8350 0200102D */ daddu $v0, $s0, $zero /* ECD04 802C8354 2602001F */ addiu $v0, $s0, 0x1F .L802C8358: /* ECD08 802C8358 00022943 */ sra $a1, $v0, 5 /* ECD0C 802C835C 00A0182D */ daddu $v1, $a1, $zero /* ECD10 802C8360 00031140 */ sll $v0, $v1, 5 /* ECD14 802C8364 12400008 */ beqz $s2, .L802C8388 /* ECD18 802C8368 02022823 */ subu $a1, $s0, $v0 /* ECD1C 802C836C 00031080 */ sll $v0, $v1, 2 /* ECD20 802C8370 00E21021 */ addu $v0, $a3, $v0 /* ECD24 802C8374 24030001 */ addiu $v1, $zero, 0x1 /* ECD28 802C8378 8C4400C4 */ lw $a0, 0xC4($v0) /* ECD2C 802C837C 00A31804 */ sllv $v1, $v1, $a1 /* ECD30 802C8380 080B20E9 */ j .L802C83A4 /* ECD34 802C8384 00832025 */ or $a0, $a0, $v1 .L802C8388: /* ECD38 802C8388 00031080 */ sll $v0, $v1, 2 /* ECD3C 802C838C 00E21021 */ addu $v0, $a3, $v0 /* ECD40 802C8390 24030001 */ addiu $v1, $zero, 0x1 /* ECD44 802C8394 00A31804 */ sllv $v1, $v1, $a1 /* ECD48 802C8398 8C4400C4 */ lw $a0, 0xC4($v0) /* ECD4C 802C839C 00031827 */ nor $v1, $zero, $v1 /* ECD50 802C83A0 00832024 */ and $a0, $a0, $v1 .L802C83A4: /* ECD54 802C83A4 080B20CA */ j .L802C8328 /* ECD58 802C83A8 AC4400C4 */ sw $a0, 0xC4($v0) .L802C83AC: /* ECD5C 802C83AC 3442A600 */ ori $v0, $v0, (0xFD9DA600 & 0xFFFF) /* ECD60 802C83B0 0050102A */ slt $v0, $v0, $s0 /* ECD64 802C83B4 1440000B */ bnez $v0, .L802C83E4 /* ECD68 802C83B8 3C02FECE */ lui $v0, (0xFECED300 >> 16) /* ECD6C 802C83BC 3C0202FA */ lui $v0, (0x2FAF080 >> 16) /* ECD70 802C83C0 3442F080 */ ori $v0, $v0, (0x2FAF080 & 0xFFFF) /* ECD74 802C83C4 02028021 */ addu $s0, $s0, $v0 /* ECD78 802C83C8 3C03802E */ lui $v1, %hi(gMapVars) /* ECD7C 802C83CC 8C63A484 */ lw $v1, %lo(gMapVars)($v1) /* ECD80 802C83D0 00101080 */ sll $v0, $s0, 2 /* ECD84 802C83D4 00431021 */ addu $v0, $v0, $v1 /* ECD88 802C83D8 8C510000 */ lw $s1, 0x0($v0) /* ECD8C 802C83DC 080B2104 */ j .L802C8410 /* ECD90 802C83E0 AC520000 */ sw $s2, 0x0($v0) .L802C83E4: /* ECD94 802C83E4 3442D300 */ ori $v0, $v0, (0xFECED300 & 0xFFFF) /* ECD98 802C83E8 0050102A */ slt $v0, $v0, $s0 /* ECD9C 802C83EC 14400009 */ bnez $v0, .L802C8414 /* ECDA0 802C83F0 0240102D */ daddu $v0, $s2, $zero /* ECDA4 802C83F4 3C0201C9 */ lui $v0, (0x1C9C380 >> 16) /* ECDA8 802C83F8 3442C380 */ ori $v0, $v0, (0x1C9C380 & 0xFFFF) /* ECDAC 802C83FC 02028021 */ addu $s0, $s0, $v0 /* ECDB0 802C8400 00101080 */ sll $v0, $s0, 2 /* ECDB4 802C8404 00E21021 */ addu $v0, $a3, $v0 /* ECDB8 802C8408 8C510084 */ lw $s1, 0x84($v0) /* ECDBC 802C840C AC520084 */ sw $s2, 0x84($v0) .L802C8410: /* ECDC0 802C8410 0220102D */ daddu $v0, $s1, $zero .L802C8414: /* ECDC4 802C8414 8FBF001C */ lw $ra, 0x1C($sp) /* ECDC8 802C8418 8FB20018 */ lw $s2, 0x18($sp) /* ECDCC 802C841C 8FB10014 */ lw $s1, 0x14($sp) /* ECDD0 802C8420 8FB00010 */ lw $s0, 0x10($sp) /* ECDD4 802C8424 03E00008 */ jr $ra /* ECDD8 802C8428 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: s32 evt_set_variable(Evt* script, Bytecode var, s32 value) { s32 flagBitPos; s32 oldValue; if (var <= EVT_LIMIT) { return value; } else if (var <= EVT_FIXED_CUTOFF) { return evt_fixed_var_to_float(value); } else if (var <= EVT_ARRAY_FLAG_CUTOFF) { var = EVT_INDEX_OF_ARRAY_FLAG(var); flagBitPos = var % 32; if (value) { script->flagArray[var / 32] |= 1 << flagBitPos; } else { script->flagArray[var / 32] &= ~(1 << flagBitPos); } return value; } else if (var <= EVT_ARRAY_VAR_CUTOFF) { var = EVT_INDEX_OF_ARRAY_VAR(var); oldValue = script->array[var]; script->array[var] = value; return oldValue; } else if (var <= EVT_GAME_BYTE_CUTOFF) { var = EVT_INDEX_OF_GAME_BYTE(var); oldValue = get_global_byte(var); set_global_byte(var, value); return oldValue; } else if (var <= EVT_AREA_BYTE_CUTOFF) { var = EVT_INDEX_OF_AREA_BYTE(var); oldValue = get_area_byte(var); set_area_byte(var, value); return oldValue; } else if (var <= EVT_GAME_FLAG_CUTOFF) { var = EVT_INDEX_OF_GAME_FLAG(var); oldValue = get_global_flag(var); if (value) { set_global_flag(var); } else { clear_global_flag(var); } return oldValue; } else if (var <= EVT_AREA_FLAG_CUTOFF) { var = EVT_INDEX_OF_AREA_FLAG(var); oldValue = get_area_flag(var); if (value) { set_area_flag(var); } else { clear_area_flag(var); } return oldValue; } else if (var <= EVT_MAP_FLAG_CUTOFF) { var = EVT_INDEX_OF_MAP_FLAG(var); flagBitPos = var % 32; if (value) { gMapFlags[var / 32] |= 1 << flagBitPos; } else { gMapFlags[var / 32] &= ~(1 << flagBitPos); } return value; } else if (var <= EVT_LOCAL_FLAG_CUTOFF) { var = EVT_INDEX_OF_LOCAL_FLAG(var); flagBitPos = var % 32; if (value) { script->varFlags[var / 32] |= 1 << flagBitPos; } else { script->varFlags[var / 32] &= ~(1 << flagBitPos); } return value; } else if (var <= EVT_MAP_VAR_CUTOFF) { var = EVT_INDEX_OF_MAP_VAR(var); oldValue = gMapVars[var]; gMapVars[var] = value; return oldValue; } else if (var <= EVT_LOCAL_VAR_CUTOFF) { var = EVT_INDEX_OF_LOCAL_VAR(var); oldValue = script->varTable[var]; script->varTable[var] = value; return oldValue; } else { return value; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_exit_map_screen_overlay /* CE9AC 801382AC 3C038015 */ lui $v1, %hi(CurrentScreenTransition) /* CE9B0 801382B0 8C63C6F0 */ lw $v1, %lo(CurrentScreenTransition)($v1) /* CE9B4 801382B4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* CE9B8 801382B8 AFB60028 */ sw $s6, 0x28($sp) /* CE9BC 801382BC 0080B02D */ daddu $s6, $a0, $zero /* CE9C0 801382C0 AFB10014 */ sw $s1, 0x14($sp) /* CE9C4 801382C4 0000882D */ daddu $s1, $zero, $zero /* CE9C8 801382C8 AFB3001C */ sw $s3, 0x1C($sp) /* CE9CC 801382CC 0220982D */ daddu $s3, $s1, $zero /* CE9D0 801382D0 AFB40020 */ sw $s4, 0x20($sp) /* CE9D4 801382D4 0220A02D */ daddu $s4, $s1, $zero /* CE9D8 801382D8 AFB50024 */ sw $s5, 0x24($sp) /* CE9DC 801382DC 0220A82D */ daddu $s5, $s1, $zero /* CE9E0 801382E0 AFB20018 */ sw $s2, 0x18($sp) /* CE9E4 801382E4 24120014 */ addiu $s2, $zero, 0x14 /* CE9E8 801382E8 AFBF002C */ sw $ra, 0x2C($sp) /* CE9EC 801382EC 2C620011 */ sltiu $v0, $v1, 0x11 /* CE9F0 801382F0 1040005E */ beqz $v0, .L8013846C /* CE9F4 801382F4 AFB00010 */ sw $s0, 0x10($sp) /* CE9F8 801382F8 00031080 */ sll $v0, $v1, 2 /* CE9FC 801382FC 3C018015 */ lui $at, %hi(jtbl_80150EF0) /* CEA00 80138300 00220821 */ addu $at, $at, $v0 /* CEA04 80138304 8C220EF0 */ lw $v0, %lo(jtbl_80150EF0)($at) /* CEA08 80138308 00400008 */ jr $v0 /* CEA0C 8013830C 00000000 */ nop glabel .L80138310 /* CEA10 80138310 0804E11B */ j .L8013846C /* CEA14 80138314 0000882D */ daddu $s1, $zero, $zero glabel .L80138318 /* CEA18 80138318 241500D0 */ addiu $s5, $zero, 0xD0 /* CEA1C 8013831C 02A0A02D */ daddu $s4, $s5, $zero /* CEA20 80138320 02A0982D */ daddu $s3, $s5, $zero /* CEA24 80138324 24110001 */ addiu $s1, $zero, 0x1 /* CEA28 80138328 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* CEA2C 8013832C 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* CEA30 80138330 80830071 */ lb $v1, 0x71($a0) /* CEA34 80138334 24020002 */ addiu $v0, $zero, 0x2 /* CEA38 80138338 1462004C */ bne $v1, $v0, .L8013846C /* CEA3C 8013833C 2412000A */ addiu $s2, $zero, 0xA /* CEA40 80138340 24020012 */ addiu $v0, $zero, 0x12 /* CEA44 80138344 0804E11B */ j .L8013846C /* CEA48 80138348 A0820072 */ sb $v0, 0x72($a0) glabel .L8013834C /* CEA4C 8013834C 241500D0 */ addiu $s5, $zero, 0xD0 /* CEA50 80138350 02A0A02D */ daddu $s4, $s5, $zero /* CEA54 80138354 02A0982D */ daddu $s3, $s5, $zero glabel .L80138358 /* CEA58 80138358 0804E11B */ j .L8013846C /* CEA5C 8013835C 24110001 */ addiu $s1, $zero, 0x1 glabel .L80138360 /* CEA60 80138360 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* CEA64 80138364 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* CEA68 80138368 80830071 */ lb $v1, 0x71($a0) /* CEA6C 8013836C 24020002 */ addiu $v0, $zero, 0x2 /* CEA70 80138370 14620004 */ bne $v1, $v0, .L80138384 /* CEA74 80138374 241500D0 */ addiu $s5, $zero, 0xD0 /* CEA78 80138378 24020012 */ addiu $v0, $zero, 0x12 /* CEA7C 8013837C A0820072 */ sb $v0, 0x72($a0) glabel .L80138380 /* CEA80 80138380 241500D0 */ addiu $s5, $zero, 0xD0 .L80138384: /* CEA84 80138384 02A0A02D */ daddu $s4, $s5, $zero /* CEA88 80138388 02A0982D */ daddu $s3, $s5, $zero glabel .L8013838C /* CEA8C 8013838C 24110001 */ addiu $s1, $zero, 0x1 /* CEA90 80138390 0804E11B */ j .L8013846C /* CEA94 80138394 24120007 */ addiu $s2, $zero, 0x7 glabel .L80138398 /* CEA98 80138398 241500D0 */ addiu $s5, $zero, 0xD0 /* CEA9C 8013839C 02A0A02D */ daddu $s4, $s5, $zero /* CEAA0 801383A0 02A0982D */ daddu $s3, $s5, $zero glabel .L801383A4 /* CEAA4 801383A4 24110001 */ addiu $s1, $zero, 0x1 /* CEAA8 801383A8 0804E11B */ j .L8013846C /* CEAAC 801383AC 24120032 */ addiu $s2, $zero, 0x32 glabel .L801383B0 /* CEAB0 801383B0 0000202D */ daddu $a0, $zero, $zero /* CEAB4 801383B4 0C04E035 */ jal set_screen_overlay_alpha /* CEAB8 801383B8 0000282D */ daddu $a1, $zero, $zero /* CEABC 801383BC 0804E11B */ j .L8013846C /* CEAC0 801383C0 24110004 */ addiu $s1, $zero, 0x4 glabel .L801383C4 /* CEAC4 801383C4 241500D0 */ addiu $s5, $zero, 0xD0 /* CEAC8 801383C8 02A0A02D */ daddu $s4, $s5, $zero /* CEACC 801383CC 02A0982D */ daddu $s3, $s5, $zero glabel .L801383D0 /* CEAD0 801383D0 0000202D */ daddu $a0, $zero, $zero /* CEAD4 801383D4 0C04E035 */ jal set_screen_overlay_alpha /* CEAD8 801383D8 0000282D */ daddu $a1, $zero, $zero /* CEADC 801383DC 24110004 */ addiu $s1, $zero, 0x4 /* CEAE0 801383E0 0804E11B */ j .L8013846C /* CEAE4 801383E4 24120007 */ addiu $s2, $zero, 0x7 glabel .L801383E8 /* CEAE8 801383E8 0000202D */ daddu $a0, $zero, $zero /* CEAEC 801383EC 3C054320 */ lui $a1, (0x43200000 >> 16) /* CEAF0 801383F0 241500D0 */ addiu $s5, $zero, 0xD0 /* CEAF4 801383F4 02A0A02D */ daddu $s4, $s5, $zero /* CEAF8 801383F8 02A0982D */ daddu $s3, $s5, $zero /* CEAFC 801383FC 24110005 */ addiu $s1, $zero, 0x5 /* CEB00 80138400 0C04E035 */ jal set_screen_overlay_alpha /* CEB04 80138404 24120007 */ addiu $s2, $zero, 0x7 /* CEB08 80138408 0804E11B */ j .L8013846C /* CEB0C 8013840C 00000000 */ nop glabel .L80138410 /* CEB10 80138410 0000202D */ daddu $a0, $zero, $zero /* CEB14 80138414 0C04E035 */ jal set_screen_overlay_alpha /* CEB18 80138418 0000282D */ daddu $a1, $zero, $zero /* CEB1C 8013841C 24110005 */ addiu $s1, $zero, 0x5 /* CEB20 80138420 0804E11B */ j .L8013846C /* CEB24 80138424 24120007 */ addiu $s2, $zero, 0x7 glabel .L80138428 /* CEB28 80138428 0000202D */ daddu $a0, $zero, $zero /* CEB2C 8013842C 0080282D */ daddu $a1, $a0, $zero /* CEB30 80138430 2406000F */ addiu $a2, $zero, 0xF /* CEB34 80138434 0C04DF93 */ jal set_screen_overlay_center /* CEB38 80138438 2407001C */ addiu $a3, $zero, 0x1C /* CEB3C 8013843C 0000202D */ daddu $a0, $zero, $zero /* CEB40 80138440 24050001 */ addiu $a1, $zero, 0x1 /* CEB44 80138444 24060131 */ addiu $a2, $zero, 0x131 /* CEB48 80138448 0C04DF93 */ jal set_screen_overlay_center /* CEB4C 8013844C 2407009C */ addiu $a3, $zero, 0x9C /* CEB50 80138450 3C05437F */ lui $a1, (0x437F0000 >> 16) /* CEB54 80138454 0C04DF62 */ jal set_screen_overlay_params_front /* CEB58 80138458 2404000C */ addiu $a0, $zero, 0xC /* CEB5C 8013845C 24020001 */ addiu $v0, $zero, 0x1 /* CEB60 80138460 240300FF */ addiu $v1, $zero, 0xFF /* CEB64 80138464 0804E16B */ j .L801385AC /* CEB68 80138468 A6C30000 */ sh $v1, 0x0($s6) .L8013846C: /* CEB6C 8013846C 3C038015 */ lui $v1, %hi(CurrentScreenTransition) /* CEB70 80138470 8C63C6F0 */ lw $v1, %lo(CurrentScreenTransition)($v1) /* CEB74 80138474 24020005 */ addiu $v0, $zero, 0x5 /* CEB78 80138478 14620025 */ bne $v1, $v0, .L80138510 /* CEB7C 8013847C 0000802D */ daddu $s0, $zero, $zero /* CEB80 80138480 3C048080 */ lui $a0, (0x80808081 >> 16) /* CEB84 80138484 34848081 */ ori $a0, $a0, (0x80808081 & 0xFFFF) /* CEB88 80138488 86C30000 */ lh $v1, 0x0($s6) /* CEB8C 8013848C 241000FF */ addiu $s0, $zero, 0xFF /* CEB90 80138490 02031823 */ subu $v1, $s0, $v1 /* CEB94 80138494 00031040 */ sll $v0, $v1, 1 /* CEB98 80138498 00431021 */ addu $v0, $v0, $v1 /* CEB9C 8013849C 00021080 */ sll $v0, $v0, 2 /* CEBA0 801384A0 00431021 */ addu $v0, $v0, $v1 /* CEBA4 801384A4 00021100 */ sll $v0, $v0, 4 /* CEBA8 801384A8 00440018 */ mult $v0, $a0 /* CEBAC 801384AC 0000202D */ daddu $a0, $zero, $zero /* CEBB0 801384B0 00004010 */ mfhi $t0 /* CEBB4 801384B4 01022821 */ addu $a1, $t0, $v0 /* CEBB8 801384B8 000529C3 */ sra $a1, $a1, 7 /* CEBBC 801384BC 000217C3 */ sra $v0, $v0, 31 /* CEBC0 801384C0 00A22823 */ subu $a1, $a1, $v0 /* CEBC4 801384C4 30A500FF */ andi $a1, $a1, 0xFF /* CEBC8 801384C8 00A0302D */ daddu $a2, $a1, $zero /* CEBCC 801384CC 0C04DF84 */ jal set_screen_overlay_color /* CEBD0 801384D0 00A0382D */ daddu $a3, $a1, $zero /* CEBD4 801384D4 3C05437F */ lui $a1, (0x437F0000 >> 16) /* CEBD8 801384D8 0C04DF62 */ jal set_screen_overlay_params_front /* CEBDC 801384DC 0220202D */ daddu $a0, $s1, $zero /* CEBE0 801384E0 86C20000 */ lh $v0, 0x0($s6) /* CEBE4 801384E4 96C30000 */ lhu $v1, 0x0($s6) /* CEBE8 801384E8 10500027 */ beq $v0, $s0, .L80138588 /* CEBEC 801384EC 00721021 */ addu $v0, $v1, $s2 /* CEBF0 801384F0 A6C20000 */ sh $v0, 0x0($s6) /* CEBF4 801384F4 00021400 */ sll $v0, $v0, 16 /* CEBF8 801384F8 00021403 */ sra $v0, $v0, 16 /* CEBFC 801384FC 28420100 */ slti $v0, $v0, 0x100 /* CEC00 80138500 50400029 */ beql $v0, $zero, .L801385A8 /* CEC04 80138504 A6D00000 */ sh $s0, 0x0($s6) /* CEC08 80138508 0804E16B */ j .L801385AC /* CEC0C 8013850C 0000102D */ daddu $v0, $zero, $zero .L80138510: /* CEC10 80138510 00108400 */ sll $s0, $s0, 16 /* CEC14 80138514 00108403 */ sra $s0, $s0, 16 /* CEC18 80138518 0200202D */ daddu $a0, $s0, $zero /* CEC1C 8013851C 0260282D */ daddu $a1, $s3, $zero /* CEC20 80138520 0280302D */ daddu $a2, $s4, $zero /* CEC24 80138524 0C04DF84 */ jal set_screen_overlay_color /* CEC28 80138528 02A0382D */ daddu $a3, $s5, $zero /* CEC2C 8013852C 1600000A */ bnez $s0, .L80138558 /* CEC30 80138530 00000000 */ nop /* CEC34 80138534 86C20000 */ lh $v0, 0x0($s6) /* CEC38 80138538 44820000 */ mtc1 $v0, $f0 /* CEC3C 8013853C 00000000 */ nop /* CEC40 80138540 46800020 */ cvt.s.w $f0, $f0 /* CEC44 80138544 44050000 */ mfc1 $a1, $f0 /* CEC48 80138548 0C04DF62 */ jal set_screen_overlay_params_front /* CEC4C 8013854C 0220202D */ daddu $a0, $s1, $zero /* CEC50 80138550 0804E15E */ j .L80138578 /* CEC54 80138554 240400FF */ addiu $a0, $zero, 0xFF .L80138558: /* CEC58 80138558 86C20000 */ lh $v0, 0x0($s6) /* CEC5C 8013855C 44820000 */ mtc1 $v0, $f0 /* CEC60 80138560 00000000 */ nop /* CEC64 80138564 46800020 */ cvt.s.w $f0, $f0 /* CEC68 80138568 44050000 */ mfc1 $a1, $f0 /* CEC6C 8013856C 0C04DF69 */ jal set_screen_overlay_params_back /* CEC70 80138570 0220202D */ daddu $a0, $s1, $zero /* CEC74 80138574 240400FF */ addiu $a0, $zero, 0xFF .L80138578: /* CEC78 80138578 86C20000 */ lh $v0, 0x0($s6) /* CEC7C 8013857C 96C30000 */ lhu $v1, 0x0($s6) /* CEC80 80138580 14440003 */ bne $v0, $a0, .L80138590 /* CEC84 80138584 00721021 */ addu $v0, $v1, $s2 .L80138588: /* CEC88 80138588 0804E16B */ j .L801385AC /* CEC8C 8013858C 24020001 */ addiu $v0, $zero, 0x1 .L80138590: /* CEC90 80138590 A6C20000 */ sh $v0, 0x0($s6) /* CEC94 80138594 00021400 */ sll $v0, $v0, 16 /* CEC98 80138598 00021403 */ sra $v0, $v0, 16 /* CEC9C 8013859C 28420100 */ slti $v0, $v0, 0x100 /* CECA0 801385A0 50400001 */ beql $v0, $zero, .L801385A8 /* CECA4 801385A4 A6C40000 */ sh $a0, 0x0($s6) .L801385A8: /* CECA8 801385A8 0000102D */ daddu $v0, $zero, $zero .L801385AC: /* CECAC 801385AC 8FBF002C */ lw $ra, 0x2C($sp) /* CECB0 801385B0 8FB60028 */ lw $s6, 0x28($sp) /* CECB4 801385B4 8FB50024 */ lw $s5, 0x24($sp) /* CECB8 801385B8 8FB40020 */ lw $s4, 0x20($sp) /* CECBC 801385BC 8FB3001C */ lw $s3, 0x1C($sp) /* CECC0 801385C0 8FB20018 */ lw $s2, 0x18($sp) /* CECC4 801385C4 8FB10014 */ lw $s1, 0x14($sp) /* CECC8 801385C8 8FB00010 */ lw $s0, 0x10($sp) /* CECCC 801385CC 03E00008 */ jr $ra /* CECD0 801385D0 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: s16 update_exit_map_screen_overlay(s16* progress) { u8 overlayColor; u8 fadeOutType = OVERLAY_SCREEN_COLOR; u8 r = 0; u8 g = 0; u8 b = 0; s16 t = 0; s32 fadeRate = STANDARD_FADE_RATE; switch (CurrentScreenTransition) { case TRANSITION_STANDARD: fadeOutType = OVERLAY_VIEWPORT_COLOR; break; case TRANSITION_TOY_TRAIN: fadeOutType = OVERLAY_SCREEN_COLOR; break; case TRANSITION_END_DEMO_SCENE_BLACK: fadeOutType = OVERLAY_VIEWPORT_COLOR; fadeRate = FAST_FADE_RATE; break; case TRANSITION_END_DEMO_SCENE_WHITE: r = g = b = 208; fadeOutType = OVERLAY_VIEWPORT_COLOR; fadeRate = SLOWER_FADE_RATE; if (gGameStatusPtr->demoState == DEMO_STATE_CHANGE_MAP) { gGameStatusPtr->nextDemoScene = LAST_DEMO_SCENE_IDX; } break; case TRANSITION_BEGIN_OR_END_GAME: case TRANSITION_OUTRO_END_SCENE: fadeOutType = OVERLAY_VIEWPORT_COLOR; fadeRate = SLOW_FADE_RATE; break; case TRANSITION_BEGIN_OR_END_CHAPTER: r = g = b = 208; fadeOutType = OVERLAY_VIEWPORT_COLOR; break; case TRANSITION_SLOW_FADE_TO_WHITE: if (gGameStatusPtr->demoState == DEMO_STATE_CHANGE_MAP) { gGameStatusPtr->nextDemoScene = LAST_DEMO_SCENE_IDX; } r = g = b = 208; fadeOutType = OVERLAY_VIEWPORT_COLOR; fadeRate = SLOW_FADE_RATE; break; case TRANSITION_AFTER_SAVE_PROMPT: case TRANSITION_END_CHAPTER_INTERRUPTED: r = g = b = 208; fadeOutType = OVERLAY_VIEWPORT_COLOR; fadeRate = SLOW_FADE_RATE; break; case TRANSITION_GET_STAR_CARD: r = g = b = 208; fadeOutType = OVERLAY_VIEWPORT_COLOR; fadeRate = FAST_FADE_RATE; break; case TRANSITION_ENTER_WORLD: set_screen_overlay_alpha(SCREEN_LAYER_FRONT, 0.0f); fadeOutType = OVERLAY_VIEWPORT_MARIO; break; case TRANSITION_MARIO_WHITE: r = g = b = 208; set_screen_overlay_alpha(SCREEN_LAYER_FRONT, 0.0f); fadeOutType = OVERLAY_VIEWPORT_MARIO; fadeRate = SLOW_FADE_RATE; break; case TRANSITION_MARIO_BLACK: set_screen_overlay_alpha(SCREEN_LAYER_FRONT, 0.0f); fadeOutType = OVERLAY_VIEWPORT_MARIO; fadeRate = SLOW_FADE_RATE; break; case TRANSITION_END_PEACH_INTERLUDE: set_screen_overlay_alpha(SCREEN_LAYER_FRONT, 160.0f); r = g = b = 208; fadeOutType = OVERLAY_VIEWPORT_STAR; fadeRate = SLOW_FADE_RATE; break; case TRANSITION_PEACH_CAPTURED: set_screen_overlay_alpha(SCREEN_LAYER_FRONT, 0.0f); fadeOutType = OVERLAY_VIEWPORT_STAR; fadeRate = SLOW_FADE_RATE; break; case TRANSITION_SLOW_BLUR_MOTION: set_screen_overlay_center(SCREEN_LAYER_FRONT, 0, 15, 28); set_screen_overlay_center(SCREEN_LAYER_FRONT, 1, 305, 156); set_screen_overlay_params_front(OVERLAY_BLUR, 255.0f); *progress = 255; return 1; } if (CurrentScreenTransition == TRANSITION_OUTRO_END_SCENE) { overlayColor = ((255 - *progress) * 208) / 255; set_screen_overlay_color(SCREEN_LAYER_FRONT, overlayColor, overlayColor, overlayColor); set_screen_overlay_params_front(fadeOutType, 255.0f); if (*progress == 255) { return 1; } *progress += fadeRate; if (*progress > 255) { *progress = 255; } } else { set_screen_overlay_color(t, r, g, b); if (t == 0) { set_screen_overlay_params_front(fadeOutType, *progress); } else { set_screen_overlay_params_back(fadeOutType, *progress); } if (*progress == 255) { return 1; } *progress += fadeRate; if (*progress > 255) { *progress = 255; } } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8024B5FC /* 179EDC 8024B5FC 27BDFFB0 */ addiu $sp, $sp, -0x50 D_8024B600: /* 179EE0 8024B600 F7BA0038 */ sdc1 $f26, 0x38($sp) /* 179EE4 8024B604 3C01802A */ lui $at, %hi(BattleCam_PosX) /* 179EE8 8024B608 C43AF270 */ lwc1 $f26, %lo(BattleCam_PosX)($at) /* 179EEC 8024B60C F7BC0040 */ sdc1 $f28, 0x40($sp) /* 179EF0 8024B610 3C01802A */ lui $at, %hi(BattleCam_PosY) D_8024B614: /* 179EF4 8024B614 C43CF274 */ lwc1 $f28, %lo(BattleCam_PosY)($at) /* 179EF8 8024B618 F7BE0048 */ sdc1 $f30, 0x48($sp) /* 179EFC 8024B61C 3C01802A */ lui $at, %hi(BattleCam_PosZ) /* 179F00 8024B620 C43EF278 */ lwc1 $f30, %lo(BattleCam_PosZ)($at) /* 179F04 8024B624 AFB00018 */ sw $s0, 0x18($sp) /* 179F08 8024B628 3C10800B */ lui $s0, %hi(gCameras + 0x558) /* 179F0C 8024B62C 261022D8 */ addiu $s0, $s0, %lo(gCameras + 0x558) /* 179F10 8024B630 AFBF001C */ sw $ra, 0x1C($sp) /* 179F14 8024B634 F7B80030 */ sdc1 $f24, 0x30($sp) /* 179F18 8024B638 F7B60028 */ sdc1 $f22, 0x28($sp) /* 179F1C 8024B63C F7B40020 */ sdc1 $f20, 0x20($sp) /* 179F20 8024B640 10A00029 */ beqz $a1, .L8024B6E8 /* 179F24 8024B644 E7BC0010 */ swc1 $f28, 0x10($sp) /* 179F28 8024B648 8602001E */ lh $v0, 0x1E($s0) /* 179F2C 8024B64C 86040026 */ lh $a0, 0x26($s0) /* 179F30 8024B650 86030024 */ lh $v1, 0x24($s0) /* 179F34 8024B654 44820000 */ mtc1 $v0, $f0 /* 179F38 8024B658 00000000 */ nop /* 179F3C 8024B65C 46800020 */ cvt.s.w $f0, $f0 /* 179F40 8024B660 86020022 */ lh $v0, 0x22($s0) D_8024B664: /* 179F44 8024B664 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 179F48 8024B668 E420F28C */ swc1 $f0, %lo(BattleCam_InitialBoomLength)($at) /* 179F4C 8024B66C 44820000 */ mtc1 $v0, $f0 /* 179F50 8024B670 00000000 */ nop /* 179F54 8024B674 46800020 */ cvt.s.w $f0, $f0 /* 179F58 8024B678 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 179F5C 8024B67C E420F294 */ swc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 179F60 8024B680 44830000 */ mtc1 $v1, $f0 /* 179F64 8024B684 00000000 */ nop /* 179F68 8024B688 46800020 */ cvt.s.w $f0, $f0 /* 179F6C 8024B68C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 179F70 8024B690 E420F290 */ swc1 $f0, %lo(BattleCam_InitialBoomYaw)($at) /* 179F74 8024B694 04820001 */ bltzl $a0, .L8024B69C /* 179F78 8024B698 248400FF */ addiu $a0, $a0, 0xFF .L8024B69C: /* 179F7C 8024B69C 00041203 */ sra $v0, $a0, 8 /* 179F80 8024B6A0 C6020054 */ lwc1 $f2, 0x54($s0) /* 179F84 8024B6A4 C6040058 */ lwc1 $f4, 0x58($s0) /* 179F88 8024B6A8 C606005C */ lwc1 $f6, 0x5C($s0) /* 179F8C 8024B6AC 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeLeft) D_8024B6B0: /* 179F90 8024B6B0 9463F29E */ lhu $v1, %lo(BattleCam_MoveTimeLeft)($v1) D_8024B6B4: /* 179F94 8024B6B4 44820000 */ mtc1 $v0, $f0 /* 179F98 8024B6B8 00000000 */ nop /* 179F9C 8024B6BC 46800020 */ cvt.s.w $f0, $f0 /* 179FA0 8024B6C0 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) /* 179FA4 8024B6C4 E420F298 */ swc1 $f0, %lo(BattleCam_InitialBoomZOffset)($at) /* 179FA8 8024B6C8 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 179FAC 8024B6CC E422F2A8 */ swc1 $f2, %lo(BattleCam_InitialPosX)($at) D_8024B6D0: /* 179FB0 8024B6D0 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) /* 179FB4 8024B6D4 E424F2AC */ swc1 $f4, %lo(BattleCam_InitialPosY)($at) /* 179FB8 8024B6D8 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 179FBC 8024B6DC E426F2B0 */ swc1 $f6, %lo(BattleCam_InitialPosZ)($at) /* 179FC0 8024B6E0 3C01802A */ lui $at, %hi(BattleCam_MoveTimeTotal) /* 179FC4 8024B6E4 A423F2A0 */ sh $v1, %lo(BattleCam_MoveTimeTotal)($at) .L8024B6E8: /* 179FC8 8024B6E8 3C02802A */ lui $v0, %hi(BattleCam_UseLinearInterp) /* 179FCC 8024B6EC 8042F2A5 */ lb $v0, %lo(BattleCam_UseLinearInterp)($v0) dgb_01_img7_gfx: /* 179FD0 8024B6F0 14400027 */ bnez $v0, .L8024B790 /* 179FD4 8024B6F4 00000000 */ nop /* 179FD8 8024B6F8 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 179FDC 8024B6FC 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 179FE0 8024B700 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 179FE4 8024B704 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) D_8024B708: /* 179FE8 8024B708 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 179FEC 8024B70C 4481C000 */ mtc1 $at, $f24 /* 179FF0 8024B710 44822000 */ mtc1 $v0, $f4 /* 179FF4 8024B714 00000000 */ nop /* 179FF8 8024B718 46802120 */ cvt.s.w $f4, $f4 /* 179FFC 8024B71C 44830000 */ mtc1 $v1, $f0 /* 17A000 8024B720 00000000 */ nop /* 17A004 8024B724 46800020 */ cvt.s.w $f0, $f0 .L8024B728: /* 17A008 8024B728 46002103 */ div.s $f4, $f4, $f0 /* 17A00C 8024B72C 4604C301 */ sub.s $f12, $f24, $f4 D_8024B730: /* 17A010 8024B730 3C014049 */ lui $at, (0x40490FD0 >> 16) /* 17A014 8024B734 34210FD0 */ ori $at, $at, (0x40490FD0 & 0xFFFF) D_8024B738: /* 17A018 8024B738 4481B000 */ mtc1 $at, $f22 D_8024B73C: /* 17A01C 8024B73C 00000000 */ nop D_8024B740: /* 17A020 8024B740 46166302 */ mul.s $f12, $f12, $f22 /* 17A024 8024B744 00000000 */ nop D_8024B748: /* 17A028 8024B748 3C013F00 */ lui $at, (0x3F000000 >> 16) D_8024B74C: /* 17A02C 8024B74C 4481A000 */ mtc1 $at, $f20 /* 17A030 8024B750 00000000 */ nop /* 17A034 8024B754 46146302 */ mul.s $f12, $f12, $f20 /* 17A038 8024B758 0C00A85B */ jal sin_rad /* 17A03C 8024B75C 00000000 */ nop D_8024B760: /* 17A040 8024B760 46160002 */ mul.s $f0, $f0, $f22 /* 17A044 8024B764 00000000 */ nop /* 17A048 8024B768 46140302 */ mul.s $f12, $f0, $f20 /* 17A04C 8024B76C 0C00A85B */ jal sin_rad D_8024B770_C08FF0: /* 17A050 8024B770 00000000 */ nop /* 17A054 8024B774 46160002 */ mul.s $f0, $f0, $f22 /* 17A058 8024B778 00000000 */ nop /* 17A05C 8024B77C 46140302 */ mul.s $f12, $f0, $f20 /* 17A060 8024B780 0C00A85B */ jal sin_rad /* 17A064 8024B784 00000000 */ nop /* 17A068 8024B788 08092DEF */ j .L8024B7BC /* 17A06C 8024B78C 4600C101 */ sub.s $f4, $f24, $f0 .L8024B790: /* 17A070 8024B790 3C02802A */ lui $v0, %hi(BattleCam_MoveTimeLeft) /* 17A074 8024B794 8442F29E */ lh $v0, %lo(BattleCam_MoveTimeLeft)($v0) /* 17A078 8024B798 3C03802A */ lui $v1, %hi(BattleCam_MoveTimeTotal) /* 17A07C 8024B79C 8463F2A0 */ lh $v1, %lo(BattleCam_MoveTimeTotal)($v1) /* 17A080 8024B7A0 44822000 */ mtc1 $v0, $f4 /* 17A084 8024B7A4 00000000 */ nop /* 17A088 8024B7A8 46802120 */ cvt.s.w $f4, $f4 /* 17A08C 8024B7AC 44830000 */ mtc1 $v1, $f0 D_8024B7B0: /* 17A090 8024B7B0 00000000 */ nop /* 17A094 8024B7B4 46800020 */ cvt.s.w $f0, $f0 /* 17A098 8024B7B8 46002103 */ div.s $f4, $f4, $f0 .L8024B7BC: /* 17A09C 8024B7BC 3C01802A */ lui $at, %hi(BattleCam_InitialPosX) /* 17A0A0 8024B7C0 C434F2A8 */ lwc1 $f20, %lo(BattleCam_InitialPosX)($at) /* 17A0A4 8024B7C4 4604A502 */ mul.s $f20, $f20, $f4 D_8024B7C8: /* 17A0A8 8024B7C8 00000000 */ nop D_8024B7CC: /* 17A0AC 8024B7CC 3C01802A */ lui $at, %hi(BattleCam_InitialPosY) D_8024B7D0: /* 17A0B0 8024B7D0 C432F2AC */ lwc1 $f18, %lo(BattleCam_InitialPosY)($at) D_8024B7D4: /* 17A0B4 8024B7D4 46049482 */ mul.s $f18, $f18, $f4 D_8024B7D8: /* 17A0B8 8024B7D8 00000000 */ nop /* 17A0BC 8024B7DC 3C01802A */ lui $at, %hi(BattleCam_InitialPosZ) /* 17A0C0 8024B7E0 C430F2B0 */ lwc1 $f16, %lo(BattleCam_InitialPosZ)($at) /* 17A0C4 8024B7E4 46048402 */ mul.s $f16, $f16, $f4 D_8024B7E8: /* 17A0C8 8024B7E8 00000000 */ nop /* 17A0CC 8024B7EC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomZOffset) D_8024B7F0: /* 17A0D0 8024B7F0 C426F298 */ lwc1 $f6, %lo(BattleCam_InitialBoomZOffset)($at) /* 17A0D4 8024B7F4 46043182 */ mul.s $f6, $f6, $f4 /* 17A0D8 8024B7F8 00000000 */ nop /* 17A0DC 8024B7FC 3C01802A */ lui $at, %hi(BattleCam_InitialBoomLength) /* 17A0E0 8024B800 C42CF28C */ lwc1 $f12, %lo(BattleCam_InitialBoomLength)($at) /* 17A0E4 8024B804 46046302 */ mul.s $f12, $f12, $f4 D_8024B808: /* 17A0E8 8024B808 00000000 */ nop /* 17A0EC 8024B80C 3C01802A */ lui $at, %hi(BattleCam_InitialBoomYaw) /* 17A0F0 8024B810 C428F290 */ lwc1 $f8, %lo(BattleCam_InitialBoomYaw)($at) .L8024B814: /* 17A0F4 8024B814 46044202 */ mul.s $f8, $f8, $f4 /* 17A0F8 8024B818 00000000 */ nop D_8024B81C: /* 17A0FC 8024B81C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 17A100 8024B820 44811000 */ mtc1 $at, $f2 /* 17A104 8024B824 00000000 */ nop .L8024B828: /* 17A108 8024B828 46041081 */ sub.s $f2, $f2, $f4 /* 17A10C 8024B82C 4602D682 */ mul.s $f26, $f26, $f2 D_8024B830: /* 17A110 8024B830 00000000 */ nop /* 17A114 8024B834 C7BC0010 */ lwc1 $f28, 0x10($sp) /* 17A118 8024B838 4602E602 */ mul.s $f24, $f28, $f2 /* 17A11C 8024B83C 00000000 */ nop /* 17A120 8024B840 3C02802A */ lui $v0, %hi(BattleCam_BoomZOffset) D_8024B844: /* 17A124 8024B844 8442F286 */ lh $v0, %lo(BattleCam_BoomZOffset)($v0) D_8024B848: /* 17A128 8024B848 44820000 */ mtc1 $v0, $f0 /* 17A12C 8024B84C 00000000 */ nop D_8024B850: /* 17A130 8024B850 46800020 */ cvt.s.w $f0, $f0 /* 17A134 8024B854 46020002 */ mul.s $f0, $f0, $f2 /* 17A138 8024B858 00000000 */ nop D_8024B85C: /* 17A13C 8024B85C 4602F582 */ mul.s $f22, $f30, $f2 /* 17A140 8024B860 00000000 */ nop /* 17A144 8024B864 3C02802A */ lui $v0, %hi(BattleCam_BoomLength) D_8024B868: /* 17A148 8024B868 8442F280 */ lh $v0, %lo(BattleCam_BoomLength)($v0) /* 17A14C 8024B86C 44827000 */ mtc1 $v0, $f14 D_8024B870: /* 17A150 8024B870 00000000 */ nop /* 17A154 8024B874 468073A0 */ cvt.s.w $f14, $f14 /* 17A158 8024B878 46027382 */ mul.s $f14, $f14, $f2 D_8024B87C: /* 17A15C 8024B87C 00000000 */ nop /* 17A160 8024B880 3C02802A */ lui $v0, %hi(BattleCam_BoomYaw) /* 17A164 8024B884 8442F282 */ lh $v0, %lo(BattleCam_BoomYaw)($v0) D_8024B888: /* 17A168 8024B888 44825000 */ mtc1 $v0, $f10 D_8024B88C: /* 17A16C 8024B88C 00000000 */ nop D_8024B890: /* 17A170 8024B890 468052A0 */ cvt.s.w $f10, $f10 D_8024B894: /* 17A174 8024B894 46025282 */ mul.s $f10, $f10, $f2 D_8024B898: /* 17A178 8024B898 00000000 */ nop D_8024B89C: /* 17A17C 8024B89C 46003180 */ add.s $f6, $f6, $f0 D_8024B8A0: /* 17A180 8024B8A0 3C014380 */ lui $at, (0x43800000 >> 16) /* 17A184 8024B8A4 44810000 */ mtc1 $at, $f0 /* 17A188 8024B8A8 00000000 */ nop /* 17A18C 8024B8AC 46003182 */ mul.s $f6, $f6, $f0 D_8024B8B0: /* 17A190 8024B8B0 00000000 */ nop D_8024B8B4: /* 17A194 8024B8B4 3C01802A */ lui $at, %hi(BattleCam_InitialBoomPitch) /* 17A198 8024B8B8 C420F294 */ lwc1 $f0, %lo(BattleCam_InitialBoomPitch)($at) /* 17A19C 8024B8BC 46040002 */ mul.s $f0, $f0, $f4 D_8024B8C0: /* 17A1A0 8024B8C0 00000000 */ nop /* 17A1A4 8024B8C4 461AA500 */ add.s $f20, $f20, $f26 /* 17A1A8 8024B8C8 46189480 */ add.s $f18, $f18, $f24 /* 17A1AC 8024B8CC 46168400 */ add.s $f16, $f16, $f22 D_8024B8D0: /* 17A1B0 8024B8D0 460E6300 */ add.s $f12, $f12, $f14 D_8024B8D4: /* 17A1B4 8024B8D4 3C04802A */ lui $a0, %hi(BattleCam_MoveTimeLeft) D_8024B8D8: /* 17A1B8 8024B8D8 2484F29E */ addiu $a0, $a0, %lo(BattleCam_MoveTimeLeft) /* 17A1BC 8024B8DC 3C02802A */ lui $v0, %hi(BattleCam_BoomPitch) D_8024B8E0: /* 17A1C0 8024B8E0 8442F284 */ lh $v0, %lo(BattleCam_BoomPitch)($v0) /* 17A1C4 8024B8E4 460A4200 */ add.s $f8, $f8, $f10 /* 17A1C8 8024B8E8 E6140054 */ swc1 $f20, 0x54($s0) /* 17A1CC 8024B8EC 44822000 */ mtc1 $v0, $f4 D_8024B8F0: /* 17A1D0 8024B8F0 00000000 */ nop D_8024B8F4: /* 17A1D4 8024B8F4 46802120 */ cvt.s.w $f4, $f4 D_8024B8F8_C09178: /* 17A1D8 8024B8F8 46022102 */ mul.s $f4, $f4, $f2 /* 17A1DC 8024B8FC 00000000 */ nop /* 17A1E0 8024B900 E6120058 */ swc1 $f18, 0x58($s0) /* 17A1E4 8024B904 E610005C */ swc1 $f16, 0x5C($s0) /* 17A1E8 8024B908 4600670D */ trunc.w.s $f28, $f12 /* 17A1EC 8024B90C 4402E000 */ mfc1 $v0, $f28 D_8024B910: /* 17A1F0 8024B910 00000000 */ nop /* 17A1F4 8024B914 A602001E */ sh $v0, 0x1E($s0) /* 17A1F8 8024B918 46040000 */ add.s $f0, $f0, $f4 /* 17A1FC 8024B91C 4600470D */ trunc.w.s $f28, $f8 D_8024B920: /* 17A200 8024B920 4402E000 */ mfc1 $v0, $f28 /* 17A204 8024B924 00000000 */ nop D_8024B928: /* 17A208 8024B928 A6020024 */ sh $v0, 0x24($s0) /* 17A20C 8024B92C 4600070D */ trunc.w.s $f28, $f0 /* 17A210 8024B930 4402E000 */ mfc1 $v0, $f28 /* 17A214 8024B934 00000000 */ nop /* 17A218 8024B938 A6020022 */ sh $v0, 0x22($s0) D_8024B93C: /* 17A21C 8024B93C 4600370D */ trunc.w.s $f28, $f6 D_8024B940: /* 17A220 8024B940 4402E000 */ mfc1 $v0, $f28 /* 17A224 8024B944 00000000 */ nop /* 17A228 8024B948 A6020026 */ sh $v0, 0x26($s0) D_8024B94C: /* 17A22C 8024B94C 84820000 */ lh $v0, 0x0($a0) D_8024B950: /* 17A230 8024B950 94830000 */ lhu $v1, 0x0($a0) /* 17A234 8024B954 14400006 */ bnez $v0, .L8024B970 /* 17A238 8024B958 2462FFFF */ addiu $v0, $v1, -0x1 /* 17A23C 8024B95C 24020001 */ addiu $v0, $zero, 0x1 /* 17A240 8024B960 3C01802A */ lui $at, %hi(BattleCam_DoneMoving) D_8024B964: /* 17A244 8024B964 A022F29C */ sb $v0, %lo(BattleCam_DoneMoving)($at) /* 17A248 8024B968 08092E5D */ j .L8024B974 /* 17A24C 8024B96C 00000000 */ nop .L8024B970: /* 17A250 8024B970 A4820000 */ sh $v0, 0x0($a0) .L8024B974: /* 17A254 8024B974 8FBF001C */ lw $ra, 0x1C($sp) D_8024B978: /* 17A258 8024B978 8FB00018 */ lw $s0, 0x18($sp) /* 17A25C 8024B97C D7BE0048 */ ldc1 $f30, 0x48($sp) /* 17A260 8024B980 D7BC0040 */ ldc1 $f28, 0x40($sp) /* 17A264 8024B984 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 17A268 8024B988 D7B80030 */ ldc1 $f24, 0x30($sp) /* 17A26C 8024B98C D7B60028 */ ldc1 $f22, 0x28($sp) sam_02_Quizmo_Worker: /* 17A270 8024B990 D7B40020 */ ldc1 $f20, 0x20($sp) /* 17A274 8024B994 0000102D */ daddu $v0, $zero, $zero .L8024B998: /* 17A278 8024B998 03E00008 */ jr $ra /* 17A27C 8024B99C 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: ApiStatus CamPresetUpdate_N(Evt* script, s32 isInitialCall) { Camera* camera = &gCameras[CAM_BATTLE]; f32 alpha; f32 x, y, z; x = BattleCam_PosX; y = BattleCam_PosY; z = BattleCam_PosZ; if (isInitialCall) { BattleCam_InitialBoomLength = camera->auxBoomLength; BattleCam_InitialBoomPitch = camera->auxBoomPitch; BattleCam_InitialBoomYaw = camera->auxBoomYaw; BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256; BattleCam_InitialPosX = camera->lookAt_obj_target.x; BattleCam_InitialPosY = camera->lookAt_obj_target.y; BattleCam_InitialPosZ = camera->lookAt_obj_target.z; BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft; } if (!BattleCam_UseLinearInterp) { alpha = BattleCam_MoveTimeLeft; alpha /= BattleCam_MoveTimeTotal; alpha = 1.0f - sin_rad(sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2); } else { alpha = BattleCam_MoveTimeLeft; alpha /= BattleCam_MoveTimeTotal; } camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha); camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha); camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha); camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f; 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 debuff_appendGfx /* 3647EC E00624EC 27BDFEE0 */ addiu $sp, $sp, -0x120 /* 3647F0 E00624F0 AFBE0100 */ sw $fp, 0x100($sp) /* 3647F4 E00624F4 0080F02D */ daddu $fp, $a0, $zero /* 3647F8 E00624F8 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3647FC E00624FC 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 364800 E0062500 27A40018 */ addiu $a0, $sp, 0x18 /* 364804 E0062504 AFB100E4 */ sw $s1, 0xE4($sp) /* 364808 E0062508 3C110001 */ lui $s1, (0x11630 >> 16) /* 36480C E006250C 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 364810 E0062510 AFB300EC */ sw $s3, 0xEC($sp) /* 364814 E0062514 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 364818 E0062518 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 36481C E006251C AFBF0104 */ sw $ra, 0x104($sp) /* 364820 E0062520 AFB700FC */ sw $s7, 0xFC($sp) /* 364824 E0062524 AFB600F8 */ sw $s6, 0xF8($sp) /* 364828 E0062528 AFB500F4 */ sw $s5, 0xF4($sp) /* 36482C E006252C AFB400F0 */ sw $s4, 0xF0($sp) /* 364830 E0062530 AFB200E8 */ sw $s2, 0xE8($sp) /* 364834 E0062534 AFB000E0 */ sw $s0, 0xE0($sp) /* 364838 E0062538 F7B80118 */ sdc1 $f24, 0x118($sp) /* 36483C E006253C F7B60110 */ sdc1 $f22, 0x110($sp) /* 364840 E0062540 F7B40108 */ sdc1 $f20, 0x108($sp) /* 364844 E0062544 8E630000 */ lw $v1, 0x0($s3) /* 364848 E0062548 8FD2000C */ lw $s2, 0xC($fp) /* 36484C E006254C 0060282D */ daddu $a1, $v1, $zero /* 364850 E0062550 24630008 */ addiu $v1, $v1, 0x8 /* 364854 E0062554 AE630000 */ sw $v1, 0x0($s3) /* 364858 E0062558 3C08E006 */ lui $t0, (0xE00628C0 >> 16) /* 36485C E006255C 8D0828C0 */ lw $t0, (0xE00628C0 & 0xFFFF)($t0) /* 364860 E0062560 3C06E006 */ lui $a2, (0xE00628C4 >> 16) /* 364864 E0062564 8CC628C4 */ lw $a2, (0xE00628C4 & 0xFFFF)($a2) /* 364868 E0062568 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 36486C E006256C AFA800D8 */ sw $t0, 0xD8($sp) /* 364870 E0062570 ACA20000 */ sw $v0, 0x0($a1) /* 364874 E0062574 ACA00004 */ sw $zero, 0x4($a1) /* 364878 E0062578 AC670000 */ sw $a3, 0x0($v1) /* 36487C E006257C 8FC50010 */ lw $a1, 0x10($fp) /* 364880 E0062580 24620008 */ addiu $v0, $v1, 0x8 /* 364884 E0062584 AE620000 */ sw $v0, 0x0($s3) /* 364888 E0062588 8CA5001C */ lw $a1, 0x1C($a1) /* 36488C E006258C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 364890 E0062590 AC620008 */ sw $v0, 0x8($v1) /* 364894 E0062594 3C028000 */ lui $v0, (0x80000000 >> 16) /* 364898 E0062598 AC66000C */ sw $a2, 0xC($v1) /* 36489C E006259C 00A22821 */ addu $a1, $a1, $v0 /* 3648A0 E00625A0 AC650004 */ sw $a1, 0x4($v1) /* 3648A4 E00625A4 8E450004 */ lw $a1, 0x4($s2) /* 3648A8 E00625A8 8E460008 */ lw $a2, 0x8($s2) /* 3648AC E00625AC 8E47000C */ lw $a3, 0xC($s2) /* 3648B0 E00625B0 24630010 */ addiu $v1, $v1, 0x10 /* 3648B4 E00625B4 0C080108 */ jal shim_guTranslateF /* 3648B8 E00625B8 AE630000 */ sw $v1, 0x0($s3) /* 3648BC E00625BC 27B50058 */ addiu $s5, $sp, 0x58 /* 3648C0 E00625C0 4480A000 */ mtc1 $zero, $f20 /* 3648C4 E00625C4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3648C8 E00625C8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3648CC E00625CC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3648D0 E00625D0 4481C000 */ mtc1 $at, $f24 /* 3648D4 E00625D4 00031080 */ sll $v0, $v1, 2 /* 3648D8 E00625D8 00431021 */ addu $v0, $v0, $v1 /* 3648DC E00625DC 00021080 */ sll $v0, $v0, 2 /* 3648E0 E00625E0 00431023 */ subu $v0, $v0, $v1 /* 3648E4 E00625E4 000218C0 */ sll $v1, $v0, 3 /* 3648E8 E00625E8 00431021 */ addu $v0, $v0, $v1 /* 3648EC E00625EC 000210C0 */ sll $v0, $v0, 3 /* 3648F0 E00625F0 4406A000 */ mfc1 $a2, $f20 /* 3648F4 E00625F4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3648F8 E00625F8 00220821 */ addu $at, $at, $v0 /* 3648FC E00625FC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 364900 E0062600 4407C000 */ mfc1 $a3, $f24 /* 364904 E0062604 46000007 */ neg.s $f0, $f0 /* 364908 E0062608 44050000 */ mfc1 $a1, $f0 /* 36490C E006260C 02A0202D */ daddu $a0, $s5, $zero /* 364910 E0062610 0C080104 */ jal shim_guRotateF /* 364914 E0062614 E7B40010 */ swc1 $f20, 0x10($sp) /* 364918 E0062618 02A0202D */ daddu $a0, $s5, $zero /* 36491C E006261C 27A50018 */ addiu $a1, $sp, 0x18 /* 364920 E0062620 27B00098 */ addiu $s0, $sp, 0x98 /* 364924 E0062624 0C080114 */ jal shim_guMtxCatF /* 364928 E0062628 0200302D */ daddu $a2, $s0, $zero /* 36492C E006262C 0200202D */ daddu $a0, $s0, $zero /* 364930 E0062630 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 364934 E0062634 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 364938 E0062638 3C16800A */ lui $s6, %hi(gDisplayContext) /* 36493C E006263C 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 364940 E0062640 96050000 */ lhu $a1, 0x0($s0) /* 364944 E0062644 8EC20000 */ lw $v0, 0x0($s6) /* 364948 E0062648 00052980 */ sll $a1, $a1, 6 /* 36494C E006264C 00B12821 */ addu $a1, $a1, $s1 /* 364950 E0062650 0C080118 */ jal shim_guMtxF2L /* 364954 E0062654 00452821 */ addu $a1, $v0, $a1 /* 364958 E0062658 8E660000 */ lw $a2, 0x0($s3) /* 36495C E006265C 24140001 */ addiu $s4, $zero, 0x1 /* 364960 E0062660 00C0202D */ daddu $a0, $a2, $zero /* 364964 E0062664 24C60008 */ addiu $a2, $a2, 0x8 /* 364968 E0062668 AE660000 */ sw $a2, 0x0($s3) /* 36496C E006266C 96020000 */ lhu $v0, 0x0($s0) /* 364970 E0062670 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 364974 E0062674 AC830000 */ sw $v1, 0x0($a0) /* 364978 E0062678 00541821 */ addu $v1, $v0, $s4 /* 36497C E006267C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 364980 E0062680 00021180 */ sll $v0, $v0, 6 /* 364984 E0062684 A6030000 */ sh $v1, 0x0($s0) /* 364988 E0062688 8EC30000 */ lw $v1, 0x0($s6) /* 36498C E006268C 00511021 */ addu $v0, $v0, $s1 /* 364990 E0062690 00621821 */ addu $v1, $v1, $v0 /* 364994 E0062694 24C20008 */ addiu $v0, $a2, 0x8 /* 364998 E0062698 AC830004 */ sw $v1, 0x4($a0) /* 36499C E006269C AE620000 */ sw $v0, 0x0($s3) /* 3649A0 E00626A0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3649A4 E00626A4 ACC20000 */ sw $v0, 0x0($a2) /* 3649A8 E00626A8 92420038 */ lbu $v0, 0x38($s2) /* 3649AC E00626AC 92440039 */ lbu $a0, 0x39($s2) /* 3649B0 E00626B0 9245003A */ lbu $a1, 0x3A($s2) /* 3649B4 E00626B4 92470037 */ lbu $a3, 0x37($s2) /* 3649B8 E00626B8 24C30010 */ addiu $v1, $a2, 0x10 /* 3649BC E00626BC AE630000 */ sw $v1, 0x0($s3) /* 3649C0 E00626C0 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 3649C4 E00626C4 ACC30008 */ sw $v1, 0x8($a2) /* 3649C8 E00626C8 00021600 */ sll $v0, $v0, 24 /* 3649CC E00626CC 00042400 */ sll $a0, $a0, 16 /* 3649D0 E00626D0 00441025 */ or $v0, $v0, $a0 /* 3649D4 E00626D4 00052A00 */ sll $a1, $a1, 8 /* 3649D8 E00626D8 00451025 */ or $v0, $v0, $a1 /* 3649DC E00626DC 00471025 */ or $v0, $v0, $a3 /* 3649E0 E00626E0 ACC20004 */ sw $v0, 0x4($a2) /* 3649E4 E00626E4 9242003B */ lbu $v0, 0x3B($s2) /* 3649E8 E00626E8 9244003C */ lbu $a0, 0x3C($s2) /* 3649EC E00626EC 9243003D */ lbu $v1, 0x3D($s2) /* 3649F0 E00626F0 00021600 */ sll $v0, $v0, 24 /* 3649F4 E00626F4 00042400 */ sll $a0, $a0, 16 /* 3649F8 E00626F8 00441025 */ or $v0, $v0, $a0 /* 3649FC E00626FC 00031A00 */ sll $v1, $v1, 8 /* 364A00 E0062700 00431025 */ or $v0, $v0, $v1 /* 364A04 E0062704 ACC2000C */ sw $v0, 0xC($a2) /* 364A08 E0062708 8FC20008 */ lw $v0, 0x8($fp) /* 364A0C E006270C 0282102A */ slt $v0, $s4, $v0 /* 364A10 E0062710 10400049 */ beqz $v0, .LE0062838 /* 364A14 E0062714 26520040 */ addiu $s2, $s2, 0x40 /* 364A18 E0062718 02A0882D */ daddu $s1, $s5, $zero /* 364A1C E006271C 4600A586 */ mov.s $f22, $f20 /* 364A20 E0062720 4600C506 */ mov.s $f20, $f24 /* 364A24 E0062724 02C0B82D */ daddu $s7, $s6, $zero /* 364A28 E0062728 0200B02D */ daddu $s6, $s0, $zero /* 364A2C E006272C 3C150001 */ lui $s5, (0x11630 >> 16) /* 364A30 E0062730 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 364A34 E0062734 2650001C */ addiu $s0, $s2, 0x1C .LE0062738: /* 364A38 E0062738 27A40018 */ addiu $a0, $sp, 0x18 /* 364A3C E006273C 8E05FFE8 */ lw $a1, -0x18($s0) /* 364A40 E0062740 8E06FFEC */ lw $a2, -0x14($s0) /* 364A44 E0062744 8E07FFF0 */ lw $a3, -0x10($s0) /* 364A48 E0062748 0C080108 */ jal shim_guTranslateF /* 364A4C E006274C 26940001 */ addiu $s4, $s4, 0x1 /* 364A50 E0062750 E7B40010 */ swc1 $f20, 0x10($sp) /* 364A54 E0062754 8E050010 */ lw $a1, 0x10($s0) /* 364A58 E0062758 4406B000 */ mfc1 $a2, $f22 /* 364A5C E006275C 4407B000 */ mfc1 $a3, $f22 /* 364A60 E0062760 0C080104 */ jal shim_guRotateF /* 364A64 E0062764 0220202D */ daddu $a0, $s1, $zero /* 364A68 E0062768 0220202D */ daddu $a0, $s1, $zero /* 364A6C E006276C 27A50018 */ addiu $a1, $sp, 0x18 /* 364A70 E0062770 0C080114 */ jal shim_guMtxCatF /* 364A74 E0062774 00A0302D */ daddu $a2, $a1, $zero /* 364A78 E0062778 0220202D */ daddu $a0, $s1, $zero /* 364A7C E006277C 8E050004 */ lw $a1, 0x4($s0) /* 364A80 E0062780 8E060000 */ lw $a2, 0x0($s0) /* 364A84 E0062784 4407A000 */ mfc1 $a3, $f20 /* 364A88 E0062788 0C080110 */ jal shim_guScaleF /* 364A8C E006278C 26100040 */ addiu $s0, $s0, 0x40 /* 364A90 E0062790 0220202D */ daddu $a0, $s1, $zero /* 364A94 E0062794 27A50018 */ addiu $a1, $sp, 0x18 /* 364A98 E0062798 0C080114 */ jal shim_guMtxCatF /* 364A9C E006279C 00A0302D */ daddu $a2, $a1, $zero /* 364AA0 E00627A0 27A40018 */ addiu $a0, $sp, 0x18 /* 364AA4 E00627A4 96C50000 */ lhu $a1, 0x0($s6) /* 364AA8 E00627A8 8EE20000 */ lw $v0, 0x0($s7) /* 364AAC E00627AC 00052980 */ sll $a1, $a1, 6 /* 364AB0 E00627B0 00B52821 */ addu $a1, $a1, $s5 /* 364AB4 E00627B4 0C080118 */ jal shim_guMtxF2L /* 364AB8 E00627B8 00452821 */ addu $a1, $v0, $a1 /* 364ABC E00627BC 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 364AC0 E00627C0 8E640000 */ lw $a0, 0x0($s3) /* 364AC4 E00627C4 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 364AC8 E00627C8 0080282D */ daddu $a1, $a0, $zero /* 364ACC E00627CC 24840008 */ addiu $a0, $a0, 0x8 /* 364AD0 E00627D0 AE640000 */ sw $a0, 0x0($s3) /* 364AD4 E00627D4 96C20000 */ lhu $v0, 0x0($s6) /* 364AD8 E00627D8 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 364ADC E00627DC ACA30000 */ sw $v1, 0x0($a1) /* 364AE0 E00627E0 24430001 */ addiu $v1, $v0, 0x1 /* 364AE4 E00627E4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 364AE8 E00627E8 00021180 */ sll $v0, $v0, 6 /* 364AEC E00627EC A6C30000 */ sh $v1, 0x0($s6) /* 364AF0 E00627F0 8EE30000 */ lw $v1, 0x0($s7) /* 364AF4 E00627F4 00551021 */ addu $v0, $v0, $s5 /* 364AF8 E00627F8 00621821 */ addu $v1, $v1, $v0 /* 364AFC E00627FC 24820008 */ addiu $v0, $a0, 0x8 /* 364B00 E0062800 ACA30004 */ sw $v1, 0x4($a1) /* 364B04 E0062804 AE620000 */ sw $v0, 0x0($s3) /* 364B08 E0062808 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 364B0C E006280C AC820000 */ sw $v0, 0x0($a0) /* 364B10 E0062810 8FA800D8 */ lw $t0, 0xD8($sp) /* 364B14 E0062814 24020040 */ addiu $v0, $zero, 0x40 /* 364B18 E0062818 AC860008 */ sw $a2, 0x8($a0) /* 364B1C E006281C AC82000C */ sw $v0, 0xC($a0) /* 364B20 E0062820 AC880004 */ sw $t0, 0x4($a0) /* 364B24 E0062824 8FC20008 */ lw $v0, 0x8($fp) /* 364B28 E0062828 24840010 */ addiu $a0, $a0, 0x10 /* 364B2C E006282C 0282102A */ slt $v0, $s4, $v0 /* 364B30 E0062830 1440FFC1 */ bnez $v0, .LE0062738 /* 364B34 E0062834 AE640000 */ sw $a0, 0x0($s3) .LE0062838: /* 364B38 E0062838 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 364B3C E006283C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 364B40 E0062840 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 364B44 E0062844 8C820000 */ lw $v0, 0x0($a0) /* 364B48 E0062848 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 364B4C E006284C 0040282D */ daddu $a1, $v0, $zero /* 364B50 E0062850 24420008 */ addiu $v0, $v0, 0x8 /* 364B54 E0062854 AC820000 */ sw $v0, 0x0($a0) /* 364B58 E0062858 ACA30000 */ sw $v1, 0x0($a1) /* 364B5C E006285C 24030040 */ addiu $v1, $zero, 0x40 /* 364B60 E0062860 ACA30004 */ sw $v1, 0x4($a1) /* 364B64 E0062864 24430008 */ addiu $v1, $v0, 0x8 /* 364B68 E0062868 AC830000 */ sw $v1, 0x0($a0) /* 364B6C E006286C 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 364B70 E0062870 AC430000 */ sw $v1, 0x0($v0) /* 364B74 E0062874 AC400004 */ sw $zero, 0x4($v0) /* 364B78 E0062878 8FBF0104 */ lw $ra, 0x104($sp) /* 364B7C E006287C 8FBE0100 */ lw $fp, 0x100($sp) /* 364B80 E0062880 8FB700FC */ lw $s7, 0xFC($sp) /* 364B84 E0062884 8FB600F8 */ lw $s6, 0xF8($sp) /* 364B88 E0062888 8FB500F4 */ lw $s5, 0xF4($sp) /* 364B8C E006288C 8FB400F0 */ lw $s4, 0xF0($sp) /* 364B90 E0062890 8FB300EC */ lw $s3, 0xEC($sp) /* 364B94 E0062894 8FB200E8 */ lw $s2, 0xE8($sp) /* 364B98 E0062898 8FB100E4 */ lw $s1, 0xE4($sp) /* 364B9C E006289C 8FB000E0 */ lw $s0, 0xE0($sp) /* 364BA0 E00628A0 D7B80118 */ ldc1 $f24, 0x118($sp) /* 364BA4 E00628A4 D7B60110 */ ldc1 $f22, 0x110($sp) /* 364BA8 E00628A8 D7B40108 */ ldc1 $f20, 0x108($sp) /* 364BAC E00628AC 03E00008 */ jr $ra /* 364BB0 E00628B0 27BD0120 */ addiu $sp, $sp, 0x120 /* 364BB4 E00628B4 00000000 */ nop /* 364BB8 E00628B8 00000000 */ nop /* 364BBC E00628BC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void debuff_appendGfx(void* effect) { EffectInstance* eff = (EffectInstance*)effect; DebuffFXData* data = eff->data.debuff; Gfx* dlist = D_E00628C0[0]; Gfx* dlist2 = D_E00628C4[0]; Matrix4f mtxTranslate; Matrix4f mtxRotate; Matrix4f mtxTransform; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(eff->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist2); shim_guTranslateF(mtxTranslate, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(mtxRotate, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(mtxRotate, mtxTranslate, mtxTransform); shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, data->alpha); gDPSetEnvColor(gMainGfxPos++, data->envCol.r, data->envCol.g, data->envCol.b, 0); data++; for (i = 1; i < eff->numParts; i++, data++) { shim_guTranslateF(mtxTranslate, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(mtxRotate, data->rotZ, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(mtxRotate, mtxTranslate, mtxTranslate); shim_guScaleF(mtxRotate, data->scaleX, data->scaleY, 1.0f); shim_guMtxCatF(mtxRotate, mtxTranslate, mtxTranslate); shim_guMtxF2L(mtxTranslate, &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); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel D_802472AC /* 175B8C 802472AC 27BDFFE0 */ addiu $sp, $sp, -0x20 glabel func_802472B0 /* 175B90 802472B0 AFB10014 */ sw $s1, 0x14($sp) /* 175B94 802472B4 3C11800E */ lui $s1, %hi(gBattleStatus) /* 175B98 802472B8 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 175B9C 802472BC AFBF0018 */ sw $ra, 0x18($sp) /* 175BA0 802472C0 AFB00010 */ sw $s0, 0x10($sp) D_802472C4: /* 175BA4 802472C4 8E2A00D8 */ lw $t2, 0xD8($s1) /* 175BA8 802472C8 3C03800E */ lui $v1, %hi(gBattleSubState) /* 175BAC 802472CC 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) /* 175BB0 802472D0 8E2700DC */ lw $a3, 0xDC($s1) /* 175BB4 802472D4 0460009F */ bltz $v1, .L80247554 .L802472D8: /* 175BB8 802472D8 28620002 */ slti $v0, $v1, 0x2 .L802472DC: /* 175BBC 802472DC 14400005 */ bnez $v0, .L802472F4 .L802472E0: /* 175BC0 802472E0 24020002 */ addiu $v0, $zero, 0x2 .L802472E4: /* 175BC4 802472E4 10620080 */ beq $v1, $v0, jtbl_802474E8 /* 175BC8 802472E8 00000000 */ nop /* 175BCC 802472EC 08091D55 */ j .L80247554 /* 175BD0 802472F0 00000000 */ nop .L802472F4: /* 175BD4 802472F4 82240170 */ lb $a0, 0x170($s1) /* 175BD8 802472F8 82220171 */ lb $v0, 0x171($s1) /* 175BDC 802472FC 0082102A */ slt $v0, $a0, $v0 /* 175BE0 80247300 14400004 */ bnez $v0, .L80247314 /* 175BE4 80247304 3C050020 */ lui $a1, (0x204000 >> 16) .L80247308: /* 175BE8 80247308 A2200170 */ sb $zero, 0x170($s1) /* 175BEC 8024730C 08091D53 */ j .L8024754C D_80247310: /* 175BF0 80247310 24040006 */ addiu $a0, $zero, 0x6 .L80247314: /* 175BF4 80247314 34A54000 */ ori $a1, $a1, (0x204000 & 0xFFFF) .L80247318: /* 175BF8 80247318 00041040 */ sll $v0, $a0, 1 .L8024731C: /* 175BFC 8024731C 02221021 */ addu $v0, $s1, $v0 /* 175C00 80247320 84430140 */ lh $v1, 0x140($v0) /* 175C04 80247324 94420140 */ lhu $v0, 0x140($v0) /* 175C08 80247328 0460000A */ bltz $v1, .L80247354 /* 175C0C 8024732C 304200FF */ andi $v0, $v0, 0xFF .L80247330: /* 175C10 80247330 00021080 */ sll $v0, $v0, 2 /* 175C14 80247334 02221021 */ addu $v0, $s1, $v0 glabel func_80247338 /* 175C18 80247338 8C5000E0 */ lw $s0, 0xE0($v0) D_8024733C: /* 175C1C 8024733C 12000005 */ beqz $s0, .L80247354 /* 175C20 80247340 00000000 */ nop D_80247344: /* 175C24 80247344 8E020000 */ lw $v0, 0x0($s0) /* 175C28 80247348 00451024 */ and $v0, $v0, $a1 .L8024734C: /* 175C2C 8024734C 1040000B */ beqz $v0, .L8024737C /* 175C30 80247350 00041040 */ sll $v0, $a0, 1 .L80247354: /* 175C34 80247354 82220171 */ lb $v0, 0x171($s1) /* 175C38 80247358 24840001 */ addiu $a0, $a0, 0x1 /* 175C3C 8024735C 0082102A */ slt $v0, $a0, $v0 D_80247360: /* 175C40 80247360 50400001 */ beql $v0, $zero, .L80247368 /* 175C44 80247364 0000202D */ daddu $a0, $zero, $zero .L80247368: /* 175C48 80247368 1480FFEC */ bnez $a0, .L8024731C .L8024736C: /* 175C4C 8024736C 00041040 */ sll $v0, $a0, 1 glabel .L80247370 /* 175C50 80247370 A2200170 */ sb $zero, 0x170($s1) /* 175C54 80247374 08091D53 */ j .L8024754C /* 175C58 80247378 24040006 */ addiu $a0, $zero, 0x6 .L8024737C: /* 175C5C 8024737C 02221021 */ addu $v0, $s1, $v0 .L80247380: /* 175C60 80247380 94420140 */ lhu $v0, 0x140($v0) /* 175C64 80247384 24840001 */ addiu $a0, $a0, 0x1 /* 175C68 80247388 AE300174 */ sw $s0, 0x174($s1) /* 175C6C 8024738C A2240170 */ sb $a0, 0x170($s1) D_80247390: /* 175C70 80247390 A6220172 */ sh $v0, 0x172($s1) .L80247394: /* 175C74 80247394 82040210 */ lb $a0, 0x210($s0) /* 175C78 80247398 38820006 */ xori $v0, $a0, 0x6 /* 175C7C 8024739C 2C430001 */ sltiu $v1, $v0, 0x1 /* 175C80 802473A0 24020003 */ addiu $v0, $zero, 0x3 /* 175C84 802473A4 50820001 */ beql $a0, $v0, .L802473AC /* 175C88 802473A8 24030001 */ addiu $v1, $zero, 0x1 .L802473AC: /* 175C8C 802473AC 24020004 */ addiu $v0, $zero, 0x4 D_802473B0: /* 175C90 802473B0 50820001 */ beql $a0, $v0, .L802473B8 D_802473B4: /* 175C94 802473B4 24030001 */ addiu $v1, $zero, 0x1 .L802473B8: /* 175C98 802473B8 24020005 */ addiu $v0, $zero, 0x5 /* 175C9C 802473BC 50820001 */ beql $a0, $v0, .L802473C4 D_802473C0: /* 175CA0 802473C0 24030001 */ addiu $v1, $zero, 0x1 .L802473C4: /* 175CA4 802473C4 24020007 */ addiu $v0, $zero, 0x7 D_802473C8: /* 175CA8 802473C8 50820001 */ beql $a0, $v0, .L802473D0 /* 175CAC 802473CC 24030001 */ addiu $v1, $zero, 0x1 .L802473D0: /* 175CB0 802473D0 24020008 */ addiu $v0, $zero, 0x8 /* 175CB4 802473D4 50820001 */ beql $a0, $v0, D_802473DC D_802473D8: /* 175CB8 802473D8 24030001 */ addiu $v1, $zero, 0x1 D_802473DC: /* 175CBC 802473DC 82020214 */ lb $v0, 0x214($s0) D_802473E0: /* 175CC0 802473E0 240B000C */ addiu $t3, $zero, 0xC .L802473E4: /* 175CC4 802473E4 504B0001 */ beql $v0, $t3, .L802473EC D_802473E8: /* 175CC8 802473E8 24030001 */ addiu $v1, $zero, 0x1 .L802473EC: /* 175CCC 802473EC 8E020000 */ lw $v0, 0x0($s0) D_802473F0: /* 175CD0 802473F0 3C090001 */ lui $t1, (0x10000 >> 16) /* 175CD4 802473F4 00491024 */ and $v0, $v0, $t1 D_802473F8: /* 175CD8 802473F8 54400001 */ bnel $v0, $zero, D_80247400 /* 175CDC 802473FC 24030001 */ addiu $v1, $zero, 0x1 D_80247400: /* 175CE0 80247400 10600005 */ beqz $v1, D_80247418 /* 175CE4 80247404 3C03FFFB */ lui $v1, (0xFFFBFFFF >> 16) D_80247408: /* 175CE8 80247408 3C01800E */ lui $at, %hi(gBattleSubState) /* 175CEC 8024740C AC20C4DC */ sw $zero, %lo(gBattleSubState)($at) D_80247410: /* 175CF0 80247410 08091D55 */ j .L80247554 .L80247414: /* 175CF4 80247414 00000000 */ nop D_80247418: /* 175CF8 80247418 3463FFFF */ ori $v1, $v1, (0xFFFBFFFF & 0xFFFF) /* 175CFC 8024741C 3C04FFF7 */ lui $a0, (0xFFF7FFFF >> 16) D_80247420: /* 175D00 80247420 3484FFFF */ ori $a0, $a0, (0xFFF7FFFF & 0xFFFF) /* 175D04 80247424 3C06F7FF */ lui $a2, (0xF7FFFFFF >> 16) D_80247428: /* 175D08 80247428 3C05800E */ lui $a1, %hi(gBattleStatus) /* 175D0C 8024742C 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus) D_80247430: /* 175D10 80247430 2408FFFD */ addiu $t0, $zero, -0x3 .L80247434: /* 175D14 80247434 A220008C */ sb $zero, 0x8C($s1) D_80247438: /* 175D18 80247438 8CA20000 */ lw $v0, 0x0($a1) /* 175D1C 8024743C 34C6FFFF */ ori $a2, $a2, (0xF7FFFFFF & 0xFFFF) jtbl_80247440: /* 175D20 80247440 00481024 */ and $v0, $v0, $t0 D_80247444: /* 175D24 80247444 00431024 */ and $v0, $v0, $v1 D_80247448: /* 175D28 80247448 2403EFFF */ addiu $v1, $zero, -0x1001 /* 175D2C 8024744C 00431024 */ and $v0, $v0, $v1 /* 175D30 80247450 00441024 */ and $v0, $v0, $a0 /* 175D34 80247454 ACA20000 */ sw $v0, 0x0($a1) D_80247458: /* 175D38 80247458 8D420000 */ lw $v0, 0x0($t2) /* 175D3C 8024745C 3C030400 */ lui $v1, (0x4000000 >> 16) /* 175D40 80247460 00461024 */ and $v0, $v0, $a2 /* 175D44 80247464 00431025 */ or $v0, $v0, $v1 /* 175D48 80247468 10E00005 */ beqz $a3, .L80247480 /* 175D4C 8024746C AD420000 */ sw $v0, 0x0($t2) D_80247470: /* 175D50 80247470 8CE20000 */ lw $v0, 0x0($a3) /* 175D54 80247474 00461024 */ and $v0, $v0, $a2 /* 175D58 80247478 00431025 */ or $v0, $v0, $v1 /* 175D5C 8024747C ACE20000 */ sw $v0, 0x0($a3) .L80247480: /* 175D60 80247480 8CA20004 */ lw $v0, 0x4($a1) D_80247484: /* 175D64 80247484 2403FFFB */ addiu $v1, $zero, -0x5 D_80247488: /* 175D68 80247488 00481024 */ and $v0, $v0, $t0 .L8024748C: /* 175D6C 8024748C 00431024 */ and $v0, $v0, $v1 /* 175D70 80247490 00491025 */ or $v0, $v0, $t1 /* 175D74 80247494 ACA20004 */ sw $v0, 0x4($a1) /* 175D78 80247498 92020134 */ lbu $v0, 0x134($s0) D_8024749C: /* 175D7C 8024749C 8E0301CC */ lw $v1, 0x1CC($s0) D_802474A0: /* 175D80 802474A0 3C01802A */ lui $at, %hi(D_8029F244) .L802474A4: /* 175D84 802474A4 A022F244 */ sb $v0, %lo(D_8029F244)($at) /* 175D88 802474A8 1060000A */ beqz $v1, .L802474D4 /* 175D8C 802474AC 2405000A */ addiu $a1, $zero, 0xA D_802474B0: /* 175D90 802474B0 A22B01A7 */ sb $t3, 0x1A7($s1) /* 175D94 802474B4 8E0401CC */ lw $a0, 0x1CC($s0) /* 175D98 802474B8 0C0B0CF8 */ jal start_script /* 175D9C 802474BC 0000302D */ daddu $a2, $zero, $zero jtbl_802474C0: /* 175DA0 802474C0 AE0201DC */ sw $v0, 0x1DC($s0) /* 175DA4 802474C4 8C430144 */ lw $v1, 0x144($v0) D_802474C8: /* 175DA8 802474C8 AE0301EC */ sw $v1, 0x1EC($s0) .L802474CC: /* 175DAC 802474CC 86230172 */ lh $v1, 0x172($s1) glabel func_802474D0 /* 175DB0 802474D0 AC430148 */ sw $v1, 0x148($v0) .L802474D4: /* 175DB4 802474D4 24020002 */ addiu $v0, $zero, 0x2 D_802474D8: /* 175DB8 802474D8 3C01800E */ lui $at, %hi(gBattleSubState) D_802474DC: /* 175DBC 802474DC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) D_802474E0: /* 175DC0 802474E0 08091D55 */ j .L80247554 glabel .L802474E4 /* 175DC4 802474E4 00000000 */ nop jtbl_802474E8: /* 175DC8 802474E8 8222008C */ lb $v0, 0x8C($s1) /* 175DCC 802474EC 14400019 */ bnez $v0, .L80247554 .L802474F0: /* 175DD0 802474F0 00000000 */ nop D_802474F4: /* 175DD4 802474F4 0C09A75B */ jal get_actor /* 175DD8 802474F8 86240172 */ lh $a0, 0x172($s1) /* 175DDC 802474FC 0040802D */ daddu $s0, $v0, $zero D_80247500: /* 175DE0 80247500 12000012 */ beqz $s0, .L8024754C /* 175DE4 80247504 24040014 */ addiu $a0, $zero, 0x14 glabel func_80247508 /* 175DE8 80247508 92030134 */ lbu $v1, 0x134($s0) /* 175DEC 8024750C 3C02802A */ lui $v0, %hi(D_8029F244) /* 175DF0 80247510 9042F244 */ lbu $v0, %lo(D_8029F244)($v0) /* 175DF4 80247514 1462000D */ bne $v1, $v0, .L8024754C /* 175DF8 80247518 00000000 */ nop /* 175DFC 8024751C 8E0201CC */ lw $v0, 0x1CC($s0) /* 175E00 80247520 10400005 */ beqz $v0, .L80247538 /* 175E04 80247524 00000000 */ nop /* 175E08 80247528 0C0B1059 */ jal does_script_exist D_8024752C: /* 175E0C 8024752C 8E0401EC */ lw $a0, 0x1EC($s0) /* 175E10 80247530 14400008 */ bnez $v0, .L80247554 /* 175E14 80247534 00000000 */ nop .L80247538: /* 175E18 80247538 82220094 */ lb $v0, 0x94($s1) /* 175E1C 8024753C 04410003 */ bgez $v0, .L8024754C /* 175E20 80247540 24040015 */ addiu $a0, $zero, 0x15 /* 175E24 80247544 A2200094 */ sb $zero, 0x94($s1) D_80247548: /* 175E28 80247548 24040006 */ addiu $a0, $zero, 0x6 .L8024754C: /* 175E2C 8024754C 0C090464 */ jal func_80241190 .L80247550: /* 175E30 80247550 00000000 */ nop .L80247554: /* 175E34 80247554 8FBF0018 */ lw $ra, 0x18($sp) D_80247558: /* 175E38 80247558 8FB10014 */ lw $s1, 0x14($sp) .L8024755C: /* 175E3C 8024755C 8FB00010 */ lw $s0, 0x10($sp) /* 175E40 80247560 03E00008 */ jr $ra /* 175E44 80247564 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void btl_state_update_next_enemy(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = gBattleStatus.playerActor; Actor* partner = gBattleStatus.partnerActor; Actor* enemy; s32 skipEnemy; s32 i; switch (gBattleSubState) { case BTL_SUBSTATE_NEXT_ENEMY_INIT: case BTL_SUBSTATE_NEXT_ENEMY_UNUSED_1: i = battleStatus->nextEnemyIndex; if (i >= battleStatus->numEnemyActors) { // all enemies have been exhausted battleStatus->nextEnemyIndex = 0; btl_set_state(BATTLE_STATE_END_TURN); return; } // find the next eligible enemy while (TRUE) { if (battleStatus->enemyIDs[i] >= 0) { u16 enemyID = battleStatus->enemyIDs[i]; enemy = battleStatus->enemyActors[enemyID & 0xFF]; if (enemy != NULL) { if (!(enemy->flags & (ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_TARGET_ONLY))) { break; } } } i++; if (i >= battleStatus->numEnemyActors) { i = 0; } if (i == 0) { battleStatus->nextEnemyIndex = 0; btl_set_state(BATTLE_STATE_END_TURN); return; } } battleStatus->activeEnemyActorID = battleStatus->enemyIDs[i++]; battleStatus->currentTurnEnemy = enemy; battleStatus->nextEnemyIndex = i; skipEnemy = FALSE; if (enemy->debuff == STATUS_KEY_SLEEP) { skipEnemy = TRUE; } if (enemy->debuff == STATUS_KEY_FEAR) { skipEnemy = TRUE; } if (enemy->debuff == STATUS_KEY_DIZZY) { skipEnemy = TRUE; } if (enemy->debuff == STATUS_KEY_PARALYZE) { skipEnemy = TRUE; } if (enemy->debuff == STATUS_KEY_FROZEN) { skipEnemy = TRUE; } if (enemy->debuff == STATUS_KEY_STOP) { skipEnemy = TRUE; } if (enemy->stoneStatus == STATUS_KEY_STONE) { skipEnemy = TRUE; } if (enemy->flags & ACTOR_FLAG_10000) { skipEnemy = TRUE; } if (skipEnemy) { // reset state to fetch next enemy gBattleSubState = BTL_SUBSTATE_NEXT_ENEMY_INIT; return; } battleStatus->stateFreezeCount = 0; gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN; gBattleStatus.flags1 &= ~BS_FLAGS1_BATTLE_FLED; gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION; gBattleStatus.flags1 &= ~BS_FLAGS1_PARTNER_ACTING; player->flags &= ~ACTOR_FLAG_8000000; player->flags |= ACTOR_FLAG_4000000; if (partner != NULL) { partner->flags &= ~ACTOR_FLAG_8000000; partner->flags |= ACTOR_FLAG_4000000; } gBattleStatus.flags2 &= ~BS_FLAGS2_2; gBattleStatus.flags2 &= ~BS_FLAGS2_4; gBattleStatus.flags2 |= BS_FLAGS2_10000; D_8029F244 = enemy->unk_134; if (enemy->handlePhaseSource != NULL) { Evt* onTurnChanceScript; battleStatus->battlePhase = PHASE_ENEMY_BEGIN; onTurnChanceScript = start_script(enemy->handlePhaseSource, EVT_PRIORITY_A, 0); enemy->handlePhaseScript = onTurnChanceScript; enemy->handleBatttlePhaseScriptID = onTurnChanceScript->id; onTurnChanceScript->owner1.actorID = battleStatus->activeEnemyActorID; } gBattleSubState = BTL_SUBSTATE_NEXT_ENEMY_DONE; break; case BTL_SUBSTATE_NEXT_ENEMY_DONE: if (battleStatus->stateFreezeCount == 0) { enemy = get_actor(battleStatus->activeEnemyActorID); if (enemy == NULL || enemy->unk_134 != D_8029F244) { btl_set_state(BATTLE_STATE_NEXT_ENEMY); } else { if (enemy->handlePhaseSource == NULL || !does_script_exist(enemy->handleBatttlePhaseScriptID)) { if (battleStatus->unk_94 < 0) { battleStatus->unk_94 = 0; btl_set_state(BATTLE_STATE_END_TURN); } else { btl_set_state(BATTLE_STATE_ENEMY_MOVE); } } } } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel btl_render_actors /* 16D63C 8023ED5C 3C02800E */ lui $v0, %hi(gBattleState) /* 16D640 8023ED60 8C42C068 */ lw $v0, %lo(gBattleState)($v0) /* 16D644 8023ED64 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 16D648 8023ED68 AFB40030 */ sw $s4, 0x30($sp) /* 16D64C 8023ED6C 3C14800E */ lui $s4, %hi(gBattleStatus) /* 16D650 8023ED70 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) /* 16D654 8023ED74 AFB00020 */ sw $s0, 0x20($sp) /* 16D658 8023ED78 27B00010 */ addiu $s0, $sp, 0x10 /* 16D65C 8023ED7C AFBF0040 */ sw $ra, 0x40($sp) /* 16D660 8023ED80 AFB7003C */ sw $s7, 0x3C($sp) /* 16D664 8023ED84 AFB60038 */ sw $s6, 0x38($sp) /* 16D668 8023ED88 AFB50034 */ sw $s5, 0x34($sp) /* 16D66C 8023ED8C AFB3002C */ sw $s3, 0x2C($sp) /* 16D670 8023ED90 AFB20028 */ sw $s2, 0x28($sp) /* 16D674 8023ED94 104000A7 */ beqz $v0, .L8023F034 /* 16D678 8023ED98 AFB10024 */ sw $s1, 0x24($sp) /* 16D67C 8023ED9C 0C093BAA */ jal func_8024EEA8 /* 16D680 8023EDA0 00000000 */ nop /* 16D684 8023EDA4 8E8200B8 */ lw $v0, 0xB8($s4) /* 16D688 8023EDA8 10400003 */ beqz $v0, .L8023EDB8 /* 16D68C 8023EDAC 00000000 */ nop /* 16D690 8023EDB0 0040F809 */ jalr $v0 /* 16D694 8023EDB4 00000000 */ nop .L8023EDB8: /* 16D698 8023EDB8 8E820000 */ lw $v0, 0x0($s4) /* 16D69C 8023EDBC 30420001 */ andi $v0, $v0, 0x1 /* 16D6A0 8023EDC0 1040009C */ beqz $v0, .L8023F034 /* 16D6A4 8023EDC4 00000000 */ nop /* 16D6A8 8023EDC8 0C0957F6 */ jal func_80255FD8 /* 16D6AC 8023EDCC 00000000 */ nop /* 16D6B0 8023EDD0 3C02800A */ lui $v0, %hi(gCurrentCamID) /* 16D6B4 8023EDD4 9442A634 */ lhu $v0, %lo(gCurrentCamID)($v0) /* 16D6B8 8023EDD8 2442FFFF */ addiu $v0, $v0, -0x1 /* 16D6BC 8023EDDC 2C420002 */ sltiu $v0, $v0, 0x2 /* 16D6C0 8023EDE0 10400094 */ beqz $v0, .L8023F034 /* 16D6C4 8023EDE4 0000902D */ daddu $s2, $zero, $zero /* 16D6C8 8023EDE8 3C178025 */ lui $s7, %hi(D_80257B28) /* 16D6CC 8023EDEC 26F77B28 */ addiu $s7, $s7, %lo(D_80257B28) /* 16D6D0 8023EDF0 3C161000 */ lui $s6, (0x10000000 >> 16) /* 16D6D4 8023EDF4 3C158025 */ lui $s5, %hi(D_8025595C) /* 16D6D8 8023EDF8 26B5595C */ addiu $s5, $s5, %lo(D_8025595C) /* 16D6DC 8023EDFC 0280982D */ daddu $s3, $s4, $zero .L8023EE00: /* 16D6E0 8023EE00 8E7100E0 */ lw $s1, 0xE0($s3) /* 16D6E4 8023EE04 5220002A */ beql $s1, $zero, .L8023EEB0 /* 16D6E8 8023EE08 26520001 */ addiu $s2, $s2, 0x1 /* 16D6EC 8023EE0C 8E220000 */ lw $v0, 0x0($s1) /* 16D6F0 8023EE10 30420001 */ andi $v0, $v0, 0x1 /* 16D6F4 8023EE14 54400026 */ bnel $v0, $zero, .L8023EEB0 /* 16D6F8 8023EE18 26520001 */ addiu $s2, $s2, 0x1 /* 16D6FC 8023EE1C AE120008 */ sw $s2, 0x8($s0) /* 16D700 8023EE20 AE17000C */ sw $s7, 0xC($s0) /* 16D704 8023EE24 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D708 8023EE28 4600008D */ trunc.w.s $f2, $f0 /* 16D70C 8023EE2C E6020004 */ swc1 $f2, 0x4($s0) /* 16D710 8023EE30 86220434 */ lh $v0, 0x434($s1) /* 16D714 8023EE34 0200202D */ daddu $a0, $s0, $zero /* 16D718 8023EE38 0C047644 */ jal queue_render_task /* 16D71C 8023EE3C AE020000 */ sw $v0, 0x0($s0) /* 16D720 8023EE40 8E220000 */ lw $v0, 0x0($s1) /* 16D724 8023EE44 00561024 */ and $v0, $v0, $s6 /* 16D728 8023EE48 10400009 */ beqz $v0, .L8023EE70 /* 16D72C 8023EE4C 24020022 */ addiu $v0, $zero, 0x22 /* 16D730 8023EE50 AE110008 */ sw $s1, 0x8($s0) /* 16D734 8023EE54 AE15000C */ sw $s5, 0xC($s0) /* 16D738 8023EE58 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D73C 8023EE5C AE020000 */ sw $v0, 0x0($s0) /* 16D740 8023EE60 4600008D */ trunc.w.s $f2, $f0 /* 16D744 8023EE64 E6020004 */ swc1 $f2, 0x4($s0) /* 16D748 8023EE68 0C047644 */ jal queue_render_task /* 16D74C 8023EE6C 0200202D */ daddu $a0, $s0, $zero .L8023EE70: /* 16D750 8023EE70 92820092 */ lbu $v0, 0x92($s4) /* 16D754 8023EE74 30420001 */ andi $v0, $v0, 0x1 /* 16D758 8023EE78 5040000D */ beql $v0, $zero, .L8023EEB0 /* 16D75C 8023EE7C 26520001 */ addiu $s2, $s2, 0x1 /* 16D760 8023EE80 3C028025 */ lui $v0, %hi(D_80257B68) /* 16D764 8023EE84 24427B68 */ addiu $v0, $v0, %lo(D_80257B68) /* 16D768 8023EE88 AE110008 */ sw $s1, 0x8($s0) /* 16D76C 8023EE8C AE02000C */ sw $v0, 0xC($s0) /* 16D770 8023EE90 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D774 8023EE94 4600008D */ trunc.w.s $f2, $f0 /* 16D778 8023EE98 E6020004 */ swc1 $f2, 0x4($s0) /* 16D77C 8023EE9C 86220434 */ lh $v0, 0x434($s1) /* 16D780 8023EEA0 0200202D */ daddu $a0, $s0, $zero /* 16D784 8023EEA4 0C047644 */ jal queue_render_task /* 16D788 8023EEA8 AE020000 */ sw $v0, 0x0($s0) /* 16D78C 8023EEAC 26520001 */ addiu $s2, $s2, 0x1 .L8023EEB0: /* 16D790 8023EEB0 2A420018 */ slti $v0, $s2, 0x18 /* 16D794 8023EEB4 1440FFD2 */ bnez $v0, .L8023EE00 /* 16D798 8023EEB8 26730004 */ addiu $s3, $s3, 0x4 /* 16D79C 8023EEBC 8E9100DC */ lw $s1, 0xDC($s4) /* 16D7A0 8023EEC0 1220002D */ beqz $s1, .L8023EF78 /* 16D7A4 8023EEC4 00000000 */ nop /* 16D7A8 8023EEC8 8E220000 */ lw $v0, 0x0($s1) /* 16D7AC 8023EECC 30420001 */ andi $v0, $v0, 0x1 /* 16D7B0 8023EED0 14400029 */ bnez $v0, .L8023EF78 /* 16D7B4 8023EED4 0200202D */ daddu $a0, $s0, $zero /* 16D7B8 8023EED8 3C028025 */ lui $v0, %hi(D_80257B48) /* 16D7BC 8023EEDC 24427B48 */ addiu $v0, $v0, %lo(D_80257B48) /* 16D7C0 8023EEE0 AE000008 */ sw $zero, 0x8($s0) /* 16D7C4 8023EEE4 AE02000C */ sw $v0, 0xC($s0) /* 16D7C8 8023EEE8 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D7CC 8023EEEC 4600008D */ trunc.w.s $f2, $f0 /* 16D7D0 8023EEF0 E6020004 */ swc1 $f2, 0x4($s0) /* 16D7D4 8023EEF4 86220434 */ lh $v0, 0x434($s1) /* 16D7D8 8023EEF8 0C047644 */ jal queue_render_task /* 16D7DC 8023EEFC AE020000 */ sw $v0, 0x0($s0) /* 16D7E0 8023EF00 8E220000 */ lw $v0, 0x0($s1) /* 16D7E4 8023EF04 3C031000 */ lui $v1, (0x10000000 >> 16) /* 16D7E8 8023EF08 00431024 */ and $v0, $v0, $v1 /* 16D7EC 8023EF0C 1040000C */ beqz $v0, .L8023EF40 /* 16D7F0 8023EF10 00000000 */ nop /* 16D7F4 8023EF14 3C028025 */ lui $v0, %hi(D_8025599C) /* 16D7F8 8023EF18 2442599C */ addiu $v0, $v0, %lo(D_8025599C) /* 16D7FC 8023EF1C AE110008 */ sw $s1, 0x8($s0) /* 16D800 8023EF20 AE02000C */ sw $v0, 0xC($s0) /* 16D804 8023EF24 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D808 8023EF28 24020022 */ addiu $v0, $zero, 0x22 /* 16D80C 8023EF2C AE020000 */ sw $v0, 0x0($s0) /* 16D810 8023EF30 4600008D */ trunc.w.s $f2, $f0 /* 16D814 8023EF34 E6020004 */ swc1 $f2, 0x4($s0) /* 16D818 8023EF38 0C047644 */ jal queue_render_task /* 16D81C 8023EF3C 0200202D */ daddu $a0, $s0, $zero .L8023EF40: /* 16D820 8023EF40 92820092 */ lbu $v0, 0x92($s4) /* 16D824 8023EF44 30420001 */ andi $v0, $v0, 0x1 /* 16D828 8023EF48 1040000B */ beqz $v0, .L8023EF78 /* 16D82C 8023EF4C 0200202D */ daddu $a0, $s0, $zero /* 16D830 8023EF50 3C028025 */ lui $v0, %hi(D_80257B88) /* 16D834 8023EF54 24427B88 */ addiu $v0, $v0, %lo(D_80257B88) /* 16D838 8023EF58 AE000008 */ sw $zero, 0x8($s0) /* 16D83C 8023EF5C AE02000C */ sw $v0, 0xC($s0) /* 16D840 8023EF60 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D844 8023EF64 4600008D */ trunc.w.s $f2, $f0 /* 16D848 8023EF68 E6020004 */ swc1 $f2, 0x4($s0) /* 16D84C 8023EF6C 86220434 */ lh $v0, 0x434($s1) /* 16D850 8023EF70 0C047644 */ jal queue_render_task /* 16D854 8023EF74 AE020000 */ sw $v0, 0x0($s0) .L8023EF78: /* 16D858 8023EF78 8E9100D8 */ lw $s1, 0xD8($s4) /* 16D85C 8023EF7C 1220002D */ beqz $s1, .L8023F034 /* 16D860 8023EF80 00000000 */ nop /* 16D864 8023EF84 8E220000 */ lw $v0, 0x0($s1) /* 16D868 8023EF88 30420001 */ andi $v0, $v0, 0x1 /* 16D86C 8023EF8C 14400029 */ bnez $v0, .L8023F034 /* 16D870 8023EF90 0200202D */ daddu $a0, $s0, $zero /* 16D874 8023EF94 3C028025 */ lui $v0, %hi(D_80257DA4) /* 16D878 8023EF98 24427DA4 */ addiu $v0, $v0, %lo(D_80257DA4) /* 16D87C 8023EF9C AE000008 */ sw $zero, 0x8($s0) /* 16D880 8023EFA0 AE02000C */ sw $v0, 0xC($s0) /* 16D884 8023EFA4 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D888 8023EFA8 4600008D */ trunc.w.s $f2, $f0 /* 16D88C 8023EFAC E6020004 */ swc1 $f2, 0x4($s0) /* 16D890 8023EFB0 86220434 */ lh $v0, 0x434($s1) /* 16D894 8023EFB4 0C047644 */ jal queue_render_task /* 16D898 8023EFB8 AE020000 */ sw $v0, 0x0($s0) /* 16D89C 8023EFBC 8E220000 */ lw $v0, 0x0($s1) /* 16D8A0 8023EFC0 3C031000 */ lui $v1, (0x10000000 >> 16) /* 16D8A4 8023EFC4 00431024 */ and $v0, $v0, $v1 /* 16D8A8 8023EFC8 1040000C */ beqz $v0, .L8023EFFC /* 16D8AC 8023EFCC 00000000 */ nop /* 16D8B0 8023EFD0 3C028025 */ lui $v0, %hi(D_80254C50) /* 16D8B4 8023EFD4 24424C50 */ addiu $v0, $v0, %lo(D_80254C50) /* 16D8B8 8023EFD8 AE110008 */ sw $s1, 0x8($s0) /* 16D8BC 8023EFDC AE02000C */ sw $v0, 0xC($s0) /* 16D8C0 8023EFE0 C620014C */ lwc1 $f0, 0x14C($s1) /* 16D8C4 8023EFE4 24020022 */ addiu $v0, $zero, 0x22 /* 16D8C8 8023EFE8 AE020000 */ sw $v0, 0x0($s0) /* 16D8CC 8023EFEC 4600008D */ trunc.w.s $f2, $f0 /* 16D8D0 8023EFF0 E6020004 */ swc1 $f2, 0x4($s0) /* 16D8D4 8023EFF4 0C047644 */ jal queue_render_task /* 16D8D8 8023EFF8 0200202D */ daddu $a0, $s0, $zero .L8023EFFC: /* 16D8DC 8023EFFC 92820092 */ lbu $v0, 0x92($s4) /* 16D8E0 8023F000 30420001 */ andi $v0, $v0, 0x1 /* 16D8E4 8023F004 1040000B */ beqz $v0, .L8023F034 /* 16D8E8 8023F008 0200202D */ daddu $a0, $s0, $zero /* 16D8EC 8023F00C 3C028026 */ lui $v0, %hi(D_80258E14) /* 16D8F0 8023F010 24428E14 */ addiu $v0, $v0, %lo(D_80258E14) /* 16D8F4 8023F014 AE000008 */ sw $zero, 0x8($s0) /* 16D8F8 8023F018 AE02000C */ sw $v0, 0xC($s0) /* 16D8FC 8023F01C C620014C */ lwc1 $f0, 0x14C($s1) /* 16D900 8023F020 4600008D */ trunc.w.s $f2, $f0 /* 16D904 8023F024 E6020004 */ swc1 $f2, 0x4($s0) /* 16D908 8023F028 86220434 */ lh $v0, 0x434($s1) /* 16D90C 8023F02C 0C047644 */ jal queue_render_task /* 16D910 8023F030 AC820000 */ sw $v0, 0x0($a0) .L8023F034: /* 16D914 8023F034 8FBF0040 */ lw $ra, 0x40($sp) /* 16D918 8023F038 8FB7003C */ lw $s7, 0x3C($sp) /* 16D91C 8023F03C 8FB60038 */ lw $s6, 0x38($sp) /* 16D920 8023F040 8FB50034 */ lw $s5, 0x34($sp) /* 16D924 8023F044 8FB40030 */ lw $s4, 0x30($sp) /* 16D928 8023F048 8FB3002C */ lw $s3, 0x2C($sp) /* 16D92C 8023F04C 8FB20028 */ lw $s2, 0x28($sp) /* 16D930 8023F050 8FB10024 */ lw $s1, 0x24($sp) /* 16D934 8023F054 8FB00020 */ lw $s0, 0x20($sp) /* 16D938 8023F058 03E00008 */ jr $ra /* 16D93C 8023F05C 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void btl_render_actors(void) { BattleStatus* battleStatus = &gBattleStatus; RenderTask renderTask; RenderTask* renderTaskPtr = &renderTask; Actor* actor; s32 i; if (gBattleState != BATTLE_STATE_0) { btl_popup_messages_draw_world_geometry(); if (battleStatus->initBattleCallback != NULL) { battleStatus->initBattleCallback(); } if (battleStatus->flags1 & BS_FLAGS1_ACTORS_VISIBLE) { func_80255FD8(); if (gCurrentCamID == CAM_BATTLE || gCurrentCamID == CAM_TATTLE) { for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { actor = battleStatus->enemyActors[i]; if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) { renderTaskPtr->appendGfxArg = (void*)i; renderTaskPtr->appendGfx = appendGfx_enemy_actor; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { renderTaskPtr->appendGfxArg = actor; renderTaskPtr->appendGfx = appendGfx_enemy_actor_blur; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; queue_render_task(renderTaskPtr); } if (battleStatus->reflectFlags & BS_REFLECT_FLOOR) { renderTaskPtr->appendGfxArg = actor; renderTaskPtr->appendGfx = appendGfx_enemy_actor_reflection; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); } } } actor = battleStatus->partnerActor; if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) { renderTaskPtr->appendGfxArg = NULL; renderTaskPtr->appendGfx = appendGfx_partner_actor; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { renderTaskPtr->appendGfxArg = actor; renderTaskPtr->appendGfx = appendGfx_partner_actor_blur; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; queue_render_task(renderTaskPtr); } if (battleStatus->reflectFlags & BS_REFLECT_FLOOR) { renderTaskPtr->appendGfxArg = NULL; renderTaskPtr->appendGfx = appendGfx_partner_actor_reflection; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); } } actor = battleStatus->playerActor; if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) { renderTaskPtr->appendGfxArg = NULL; renderTaskPtr->appendGfx = appendGfx_player_actor; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { renderTaskPtr->appendGfxArg = actor; renderTaskPtr->appendGfx = (void (*) (void*)) appendGfx_player_actor_blur; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; queue_render_task(renderTaskPtr); } if (battleStatus->reflectFlags & BS_REFLECT_FLOOR) { renderTaskPtr->appendGfxArg = NULL; renderTaskPtr->appendGfx = appendGfx_player_actor_reflection; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); } } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel embers_update /* 3DB638 E00E01D8 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 3DB63C E00E01DC AFB20020 */ sw $s2, 0x20($sp) /* 3DB640 E00E01E0 0080902D */ daddu $s2, $a0, $zero /* 3DB644 E00E01E4 AFBF0028 */ sw $ra, 0x28($sp) /* 3DB648 E00E01E8 AFB30024 */ sw $s3, 0x24($sp) /* 3DB64C E00E01EC AFB1001C */ sw $s1, 0x1C($sp) /* 3DB650 E00E01F0 AFB00018 */ sw $s0, 0x18($sp) /* 3DB654 E00E01F4 F7BE0058 */ sdc1 $f30, 0x58($sp) /* 3DB658 E00E01F8 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 3DB65C E00E01FC F7BA0048 */ sdc1 $f26, 0x48($sp) /* 3DB660 E00E0200 F7B80040 */ sdc1 $f24, 0x40($sp) /* 3DB664 E00E0204 F7B60038 */ sdc1 $f22, 0x38($sp) /* 3DB668 E00E0208 F7B40030 */ sdc1 $f20, 0x30($sp) /* 3DB66C E00E020C 8E430000 */ lw $v1, 0x0($s2) /* 3DB670 E00E0210 8E44000C */ lw $a0, 0xC($s2) /* 3DB674 E00E0214 30620010 */ andi $v0, $v1, 0x10 /* 3DB678 E00E0218 10400005 */ beqz $v0, .LE00E0230 /* 3DB67C E00E021C 2402FFEF */ addiu $v0, $zero, -0x11 /* 3DB680 E00E0220 00621024 */ and $v0, $v1, $v0 /* 3DB684 E00E0224 AE420000 */ sw $v0, 0x0($s2) /* 3DB688 E00E0228 24020010 */ addiu $v0, $zero, 0x10 /* 3DB68C E00E022C AC820018 */ sw $v0, 0x18($a0) .LE00E0230: /* 3DB690 E00E0230 8C830018 */ lw $v1, 0x18($a0) /* 3DB694 E00E0234 286203E8 */ slti $v0, $v1, 0x3E8 /* 3DB698 E00E0238 10400002 */ beqz $v0, .LE00E0244 /* 3DB69C E00E023C 2462FFFF */ addiu $v0, $v1, -0x1 /* 3DB6A0 E00E0240 AC820018 */ sw $v0, 0x18($a0) .LE00E0244: /* 3DB6A4 E00E0244 3C030004 */ lui $v1, (0x4F1A0 >> 16) /* 3DB6A8 E00E0248 8C82001C */ lw $v0, 0x1C($a0) /* 3DB6AC E00E024C 3463F1A0 */ ori $v1, $v1, (0x4F1A0 & 0xFFFF) /* 3DB6B0 E00E0250 24420001 */ addiu $v0, $v0, 0x1 /* 3DB6B4 E00E0254 0062182A */ slt $v1, $v1, $v0 /* 3DB6B8 E00E0258 10600003 */ beqz $v1, .LE00E0268 /* 3DB6BC E00E025C AC82001C */ sw $v0, 0x1C($a0) /* 3DB6C0 E00E0260 24020100 */ addiu $v0, $zero, 0x100 /* 3DB6C4 E00E0264 AC82001C */ sw $v0, 0x1C($a0) .LE00E0268: /* 3DB6C8 E00E0268 8C830018 */ lw $v1, 0x18($a0) /* 3DB6CC E00E026C 04610005 */ bgez $v1, .LE00E0284 /* 3DB6D0 E00E0270 28620010 */ slti $v0, $v1, 0x10 /* 3DB6D4 E00E0274 0C080128 */ jal shim_remove_effect /* 3DB6D8 E00E0278 0240202D */ daddu $a0, $s2, $zero /* 3DB6DC E00E027C 0803815F */ j .LE00E057C /* 3DB6E0 E00E0280 00000000 */ nop .LE00E0284: /* 3DB6E4 E00E0284 8C85001C */ lw $a1, 0x1C($a0) /* 3DB6E8 E00E0288 10400002 */ beqz $v0, .LE00E0294 /* 3DB6EC E00E028C 00031100 */ sll $v0, $v1, 4 /* 3DB6F0 E00E0290 AC82002C */ sw $v0, 0x2C($a0) .LE00E0294: /* 3DB6F4 E00E0294 28A20010 */ slti $v0, $a1, 0x10 /* 3DB6F8 E00E0298 10400003 */ beqz $v0, .LE00E02A8 /* 3DB6FC E00E029C 00051100 */ sll $v0, $a1, 4 /* 3DB700 E00E02A0 2442000F */ addiu $v0, $v0, 0xF /* 3DB704 E00E02A4 AC82002C */ sw $v0, 0x2C($a0) .LE00E02A8: /* 3DB708 E00E02A8 C4980010 */ lwc1 $f24, 0x10($a0) /* 3DB70C E00E02AC C49E0014 */ lwc1 $f30, 0x14($a0) /* 3DB710 E00E02B0 C49C0068 */ lwc1 $f28, 0x68($a0) /* 3DB714 E00E02B4 C49A006C */ lwc1 $f26, 0x6C($a0) /* 3DB718 E00E02B8 E7BA0010 */ swc1 $f26, 0x10($sp) /* 3DB71C E00E02BC 8E420008 */ lw $v0, 0x8($s2) /* 3DB720 E00E02C0 24110001 */ addiu $s1, $zero, 0x1 /* 3DB724 E00E02C4 0222102A */ slt $v0, $s1, $v0 /* 3DB728 E00E02C8 104000AC */ beqz $v0, .LE00E057C /* 3DB72C E00E02CC 24840070 */ addiu $a0, $a0, 0x70 /* 3DB730 E00E02D0 3C13E00E */ lui $s3, %hi(D_E00E0A48) /* 3DB734 E00E02D4 26730A48 */ addiu $s3, $s3, %lo(D_E00E0A48) /* 3DB738 E00E02D8 2490004C */ addiu $s0, $a0, 0x4C /* 3DB73C E00E02DC 3C01E00E */ lui $at, (0xE00E0AC0 >> 16) /* 3DB740 E00E02E0 D4340AC0 */ ldc1 $f20, (0xE00E0AC0 & 0xFFFF)($at) /* 3DB744 E00E02E4 3C01E00E */ lui $at, (0xE00E0AC8 >> 16) /* 3DB748 E00E02E8 D4360AC8 */ ldc1 $f22, (0xE00E0AC8 & 0xFFFF)($at) .LE00E02EC: /* 3DB74C E00E02EC 8E020018 */ lw $v0, 0x18($s0) /* 3DB750 E00E02F0 24420001 */ addiu $v0, $v0, 0x1 /* 3DB754 E00E02F4 AE020018 */ sw $v0, 0x18($s0) /* 3DB758 E00E02F8 2842001E */ slti $v0, $v0, 0x1E /* 3DB75C E00E02FC 50400001 */ beql $v0, $zero, .LE00E0304 /* 3DB760 E00E0300 AE000018 */ sw $zero, 0x18($s0) .LE00E0304: /* 3DB764 E00E0304 8E020018 */ lw $v0, 0x18($s0) /* 3DB768 E00E0308 04420098 */ bltzl $v0, .LE00E056C /* 3DB76C E00E030C 26310001 */ addiu $s1, $s1, 0x1 /* 3DB770 E00E0310 14400058 */ bnez $v0, .LE00E0474 /* 3DB774 E00E0314 00000000 */ nop /* 3DB778 E00E0318 4600C68D */ trunc.w.s $f26, $f24 /* 3DB77C E00E031C 4404D000 */ mfc1 $a0, $f26 /* 3DB780 E00E0320 0C080138 */ jal shim_rand_int /* 3DB784 E00E0324 00000000 */ nop /* 3DB788 E00E0328 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3DB78C E00E032C 44810800 */ mtc1 $at, $f1 /* 3DB790 E00E0330 44800000 */ mtc1 $zero, $f0 /* 3DB794 E00E0334 4600C0A1 */ cvt.d.s $f2, $f24 /* 3DB798 E00E0338 46201082 */ mul.d $f2, $f2, $f0 /* 3DB79C E00E033C 00000000 */ nop /* 3DB7A0 E00E0340 44820000 */ mtc1 $v0, $f0 /* 3DB7A4 E00E0344 00000000 */ nop /* 3DB7A8 E00E0348 46800021 */ cvt.d.w $f0, $f0 /* 3DB7AC E00E034C 46220001 */ sub.d $f0, $f0, $f2 /* 3DB7B0 E00E0350 4600F68D */ trunc.w.s $f26, $f30 /* 3DB7B4 E00E0354 4404D000 */ mfc1 $a0, $f26 /* 3DB7B8 E00E0358 46200020 */ cvt.s.d $f0, $f0 /* 3DB7BC E00E035C 0C080138 */ jal shim_rand_int /* 3DB7C0 E00E0360 E600FFB8 */ swc1 $f0, -0x48($s0) /* 3DB7C4 E00E0364 24040014 */ addiu $a0, $zero, 0x14 /* 3DB7C8 E00E0368 44820000 */ mtc1 $v0, $f0 /* 3DB7CC E00E036C 00000000 */ nop /* 3DB7D0 E00E0370 46800020 */ cvt.s.w $f0, $f0 /* 3DB7D4 E00E0374 E600FFBC */ swc1 $f0, -0x44($s0) /* 3DB7D8 E00E0378 0C080138 */ jal shim_rand_int /* 3DB7DC E00E037C AE00FFC0 */ sw $zero, -0x40($s0) /* 3DB7E0 E00E0380 2442FFF6 */ addiu $v0, $v0, -0xA /* 3DB7E4 E00E0384 44820000 */ mtc1 $v0, $f0 /* 3DB7E8 E00E0388 00000000 */ nop /* 3DB7EC E00E038C 46800020 */ cvt.s.w $f0, $f0 /* 3DB7F0 E00E0390 46000021 */ cvt.d.s $f0, $f0 /* 3DB7F4 E00E0394 46340002 */ mul.d $f0, $f0, $f20 /* 3DB7F8 E00E0398 00000000 */ nop /* 3DB7FC E00E039C 24040028 */ addiu $a0, $zero, 0x28 /* 3DB800 E00E03A0 46200020 */ cvt.s.d $f0, $f0 /* 3DB804 E00E03A4 0C080138 */ jal shim_rand_int /* 3DB808 E00E03A8 E600FFF8 */ swc1 $f0, -0x8($s0) /* 3DB80C E00E03AC 2442FFFF */ addiu $v0, $v0, -0x1 /* 3DB810 E00E03B0 44820000 */ mtc1 $v0, $f0 /* 3DB814 E00E03B4 00000000 */ nop /* 3DB818 E00E03B8 46800020 */ cvt.s.w $f0, $f0 /* 3DB81C E00E03BC 461C0002 */ mul.s $f0, $f0, $f28 /* 3DB820 E00E03C0 00000000 */ nop /* 3DB824 E00E03C4 46000021 */ cvt.d.s $f0, $f0 /* 3DB828 E00E03C8 46340002 */ mul.d $f0, $f0, $f20 /* 3DB82C E00E03CC 00000000 */ nop /* 3DB830 E00E03D0 24040014 */ addiu $a0, $zero, 0x14 /* 3DB834 E00E03D4 AE000000 */ sw $zero, 0x0($s0) /* 3DB838 E00E03D8 46200020 */ cvt.s.d $f0, $f0 /* 3DB83C E00E03DC 0C080138 */ jal shim_rand_int /* 3DB840 E00E03E0 E600FFFC */ swc1 $f0, -0x4($s0) /* 3DB844 E00E03E4 2442FFF6 */ addiu $v0, $v0, -0xA /* 3DB848 E00E03E8 44820000 */ mtc1 $v0, $f0 /* 3DB84C E00E03EC 00000000 */ nop /* 3DB850 E00E03F0 46800020 */ cvt.s.w $f0, $f0 /* 3DB854 E00E03F4 46000021 */ cvt.d.s $f0, $f0 /* 3DB858 E00E03F8 46340002 */ mul.d $f0, $f0, $f20 /* 3DB85C E00E03FC 00000000 */ nop /* 3DB860 E00E0400 2404001E */ addiu $a0, $zero, 0x1E /* 3DB864 E00E0404 46200020 */ cvt.s.d $f0, $f0 /* 3DB868 E00E0408 0C080138 */ jal shim_rand_int /* 3DB86C E00E040C E6000004 */ swc1 $f0, 0x4($s0) /* 3DB870 E00E0410 2442FFFF */ addiu $v0, $v0, -0x1 /* 3DB874 E00E0414 C7BA0010 */ lwc1 $f26, 0x10($sp) /* 3DB878 E00E0418 44820000 */ mtc1 $v0, $f0 /* 3DB87C E00E041C 00000000 */ nop /* 3DB880 E00E0420 46800020 */ cvt.s.w $f0, $f0 /* 3DB884 E00E0424 461A0002 */ mul.s $f0, $f0, $f26 /* 3DB888 E00E0428 00000000 */ nop /* 3DB88C E00E042C 46000021 */ cvt.d.s $f0, $f0 /* 3DB890 E00E0430 46340002 */ mul.d $f0, $f0, $f20 /* 3DB894 E00E0434 00000000 */ nop /* 3DB898 E00E0438 2404000F */ addiu $a0, $zero, 0xF /* 3DB89C E00E043C AE00000C */ sw $zero, 0xC($s0) /* 3DB8A0 E00E0440 46200020 */ cvt.s.d $f0, $f0 /* 3DB8A4 E00E0444 0C080138 */ jal shim_rand_int /* 3DB8A8 E00E0448 E6000008 */ swc1 $f0, 0x8($s0) /* 3DB8AC E00E044C 2404000F */ addiu $a0, $zero, 0xF /* 3DB8B0 E00E0450 44820000 */ mtc1 $v0, $f0 /* 3DB8B4 E00E0454 00000000 */ nop /* 3DB8B8 E00E0458 46800020 */ cvt.s.w $f0, $f0 /* 3DB8BC E00E045C 0C080138 */ jal shim_rand_int /* 3DB8C0 E00E0460 E6000010 */ swc1 $f0, 0x10($s0) /* 3DB8C4 E00E0464 44820000 */ mtc1 $v0, $f0 /* 3DB8C8 E00E0468 00000000 */ nop /* 3DB8CC E00E046C 46800020 */ cvt.s.w $f0, $f0 /* 3DB8D0 E00E0470 E6000014 */ swc1 $f0, 0x14($s0) .LE00E0474: /* 3DB8D4 E00E0474 C610FFF8 */ lwc1 $f16, -0x8($s0) /* 3DB8D8 E00E0478 C60A0004 */ lwc1 $f10, 0x4($s0) /* 3DB8DC E00E047C 46105281 */ sub.s $f10, $f10, $f16 /* 3DB8E0 E00E0480 460052A1 */ cvt.d.s $f10, $f10 /* 3DB8E4 E00E0484 46365282 */ mul.d $f10, $f10, $f22 /* 3DB8E8 E00E0488 00000000 */ nop /* 3DB8EC E00E048C C60EFFFC */ lwc1 $f14, -0x4($s0) /* 3DB8F0 E00E0490 C60C0008 */ lwc1 $f12, 0x8($s0) /* 3DB8F4 E00E0494 460E6301 */ sub.s $f12, $f12, $f14 /* 3DB8F8 E00E0498 46006321 */ cvt.d.s $f12, $f12 /* 3DB8FC E00E049C 46366302 */ mul.d $f12, $f12, $f22 /* 3DB900 E00E04A0 00000000 */ nop /* 3DB904 E00E04A4 C6060000 */ lwc1 $f6, 0x0($s0) /* 3DB908 E00E04A8 C608000C */ lwc1 $f8, 0xC($s0) /* 3DB90C E00E04AC 46064201 */ sub.s $f8, $f8, $f6 /* 3DB910 E00E04B0 46004221 */ cvt.d.s $f8, $f8 /* 3DB914 E00E04B4 46364202 */ mul.d $f8, $f8, $f22 /* 3DB918 E00E04B8 00000000 */ nop /* 3DB91C E00E04BC 8E020018 */ lw $v0, 0x18($s0) /* 3DB920 E00E04C0 C600FFB8 */ lwc1 $f0, -0x48($s0) /* 3DB924 E00E04C4 C612FFBC */ lwc1 $f18, -0x44($s0) /* 3DB928 E00E04C8 00021080 */ sll $v0, $v0, 2 /* 3DB92C E00E04CC 00531021 */ addu $v0, $v0, $s3 /* 3DB930 E00E04D0 46008086 */ mov.s $f2, $f16 /* 3DB934 E00E04D4 C4440000 */ lwc1 $f4, 0x0($v0) /* 3DB938 E00E04D8 46020000 */ add.s $f0, $f0, $f2 /* 3DB93C E00E04DC C6020010 */ lwc1 $f2, 0x10($s0) /* 3DB940 E00E04E0 46008421 */ cvt.d.s $f16, $f16 /* 3DB944 E00E04E4 E604FFF4 */ swc1 $f4, -0xC($s0) /* 3DB948 E00E04E8 E600FFB8 */ swc1 $f0, -0x48($s0) /* 3DB94C E00E04EC 46007006 */ mov.s $f0, $f14 /* 3DB950 E00E04F0 46009480 */ add.s $f18, $f18, $f0 /* 3DB954 E00E04F4 C604FFC0 */ lwc1 $f4, -0x40($s0) /* 3DB958 E00E04F8 46003006 */ mov.s $f0, $f6 /* 3DB95C E00E04FC 46002100 */ add.s $f4, $f4, $f0 /* 3DB960 E00E0500 3C01E00E */ lui $at, (0xE00E0AD0 >> 16) /* 3DB964 E00E0504 D4200AD0 */ ldc1 $f0, (0xE00E0AD0 & 0xFFFF)($at) /* 3DB968 E00E0508 460010A1 */ cvt.d.s $f2, $f2 /* 3DB96C E00E050C 46201080 */ add.d $f2, $f2, $f0 /* 3DB970 E00E0510 C6000014 */ lwc1 $f0, 0x14($s0) /* 3DB974 E00E0514 460073A1 */ cvt.d.s $f14, $f14 /* 3DB978 E00E0518 E604FFC0 */ swc1 $f4, -0x40($s0) /* 3DB97C E00E051C 3C01E00E */ lui $at, (0xE00E0AD8 >> 16) /* 3DB980 E00E0520 D4240AD8 */ ldc1 $f4, (0xE00E0AD8 & 0xFFFF)($at) /* 3DB984 E00E0524 46000021 */ cvt.d.s $f0, $f0 /* 3DB988 E00E0528 46240000 */ add.d $f0, $f0, $f4 /* 3DB98C E00E052C 460031A1 */ cvt.d.s $f6, $f6 /* 3DB990 E00E0530 E612FFBC */ swc1 $f18, -0x44($s0) /* 3DB994 E00E0534 462A8400 */ add.d $f16, $f16, $f10 /* 3DB998 E00E0538 462010A0 */ cvt.s.d $f2, $f2 /* 3DB99C E00E053C E6020010 */ swc1 $f2, 0x10($s0) /* 3DB9A0 E00E0540 462C7380 */ add.d $f14, $f14, $f12 /* 3DB9A4 E00E0544 46200020 */ cvt.s.d $f0, $f0 /* 3DB9A8 E00E0548 E6000014 */ swc1 $f0, 0x14($s0) /* 3DB9AC E00E054C 46283180 */ add.d $f6, $f6, $f8 /* 3DB9B0 E00E0550 46208420 */ cvt.s.d $f16, $f16 /* 3DB9B4 E00E0554 462073A0 */ cvt.s.d $f14, $f14 /* 3DB9B8 E00E0558 462031A0 */ cvt.s.d $f6, $f6 /* 3DB9BC E00E055C E610FFF8 */ swc1 $f16, -0x8($s0) /* 3DB9C0 E00E0560 E60EFFFC */ swc1 $f14, -0x4($s0) /* 3DB9C4 E00E0564 E6060000 */ swc1 $f6, 0x0($s0) /* 3DB9C8 E00E0568 26310001 */ addiu $s1, $s1, 0x1 .LE00E056C: /* 3DB9CC E00E056C 8E420008 */ lw $v0, 0x8($s2) /* 3DB9D0 E00E0570 0222102A */ slt $v0, $s1, $v0 /* 3DB9D4 E00E0574 1440FF5D */ bnez $v0, .LE00E02EC /* 3DB9D8 E00E0578 26100070 */ addiu $s0, $s0, 0x70 .LE00E057C: /* 3DB9DC E00E057C 8FBF0028 */ lw $ra, 0x28($sp) /* 3DB9E0 E00E0580 8FB30024 */ lw $s3, 0x24($sp) /* 3DB9E4 E00E0584 8FB20020 */ lw $s2, 0x20($sp) /* 3DB9E8 E00E0588 8FB1001C */ lw $s1, 0x1C($sp) /* 3DB9EC E00E058C 8FB00018 */ lw $s0, 0x18($sp) /* 3DB9F0 E00E0590 D7BE0058 */ ldc1 $f30, 0x58($sp) /* 3DB9F4 E00E0594 D7BC0050 */ ldc1 $f28, 0x50($sp) /* 3DB9F8 E00E0598 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 3DB9FC E00E059C D7B80040 */ ldc1 $f24, 0x40($sp) /* 3DBA00 E00E05A0 D7B60038 */ ldc1 $f22, 0x38($sp) /* 3DBA04 E00E05A4 D7B40030 */ ldc1 $f20, 0x30($sp) /* 3DBA08 E00E05A8 03E00008 */ jr $ra /* 3DBA0C E00E05AC 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void embers_update(EffectInstance* effect) { EmbersFXData* part = effect->data.embers; f32 unk_10; f32 unk_14; s32 time; f32 unk_68; f32 unk_6C; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->timeLeft = 16; } if (part->timeLeft < 1000) { part->timeLeft--; } part->lifetime++; if (part->lifetime > 324000) { part->lifetime = 256; } if (part->timeLeft < 0) { shim_remove_effect(effect); return; } time = part->lifetime; if (part->timeLeft < 16) { part->unk_2C = part->timeLeft * 16; } if (time < 16) { part->unk_2C = time * 16 + 15; } unk_10 = part->unk_10; unk_14 = part->unk_14; unk_68 = part->unk_68; unk_6C = part->unk_6C; part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_64++; if (part->unk_64 >= 30) { part->unk_64 = 0; } if (part->unk_64 >= 0) { if (part->unk_64 == 0) { part->unk_04 = shim_rand_int(unk_10) - unk_10 * 0.5; part->unk_08 = shim_rand_int(unk_14); part->unk_0C = 0.0f; part->unk_44 = (f32) (shim_rand_int(20) - 10) * 0.05; part->unk_48 = (shim_rand_int(40) - 1) * unk_68 * 0.05; part->unk_4C = 0.0f; part->unk_50 = (f32) (shim_rand_int(20) - 10) * 0.05; part->unk_54 = (shim_rand_int(30) - 1) * unk_6C * 0.05; part->unk_58 = 0.0f; part->unk_5C = shim_rand_int(15); part->unk_60 = shim_rand_int(15); } part->unk_40 = D_E00E0A48[part->unk_64]; part->unk_04 += part->unk_44; part->unk_08 += part->unk_48; part->unk_0C += part->unk_4C; part->unk_5C += 0.1; part->unk_60 += 0.3; part->unk_44 += (part->unk_50 - part->unk_44) * 0.04; part->unk_48 += (part->unk_54 - part->unk_48) * 0.04; part->unk_4C += (part->unk_58 - part->unk_4C) * 0.04; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel smoke_burst_appendGfx /* 35BBE4 E004E214 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 35BBE8 E004E218 0080302D */ daddu $a2, $a0, $zero /* 35BBEC E004E21C 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 35BBF0 E004E220 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 35BBF4 E004E224 27A40020 */ addiu $a0, $sp, 0x20 /* 35BBF8 E004E228 AFB700BC */ sw $s7, 0xBC($sp) /* 35BBFC E004E22C 3C17800A */ lui $s7, %hi(gMainGfxPos) /* 35BC00 E004E230 26F7A66C */ addiu $s7, $s7, %lo(gMainGfxPos) /* 35BC04 E004E234 AFB600B8 */ sw $s6, 0xB8($sp) /* 35BC08 E004E238 3C160001 */ lui $s6, (0x11630 >> 16) /* 35BC0C E004E23C 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 35BC10 E004E240 AFBF00C4 */ sw $ra, 0xC4($sp) /* 35BC14 E004E244 AFBE00C0 */ sw $fp, 0xC0($sp) /* 35BC18 E004E248 AFB500B4 */ sw $s5, 0xB4($sp) /* 35BC1C E004E24C AFB400B0 */ sw $s4, 0xB0($sp) /* 35BC20 E004E250 AFB300AC */ sw $s3, 0xAC($sp) /* 35BC24 E004E254 AFB200A8 */ sw $s2, 0xA8($sp) /* 35BC28 E004E258 AFB100A4 */ sw $s1, 0xA4($sp) /* 35BC2C E004E25C AFB000A0 */ sw $s0, 0xA0($sp) /* 35BC30 E004E260 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 35BC34 E004E264 8EE80000 */ lw $t0, 0x0($s7) /* 35BC38 E004E268 8CD1000C */ lw $s1, 0xC($a2) /* 35BC3C E004E26C 4480A000 */ mtc1 $zero, $f20 /* 35BC40 E004E270 3C09E005 */ lui $t1, (0xE0050000 >> 16) /* 35BC44 E004E274 8D29E5EC */ lw $t1, -0x1A14($t1) /* 35BC48 E004E278 3C014380 */ lui $at, (0x43800000 >> 16) /* 35BC4C E004E27C 44812000 */ mtc1 $at, $f4 /* 35BC50 E004E280 0100182D */ daddu $v1, $t0, $zero /* 35BC54 E004E284 25080008 */ addiu $t0, $t0, 0x8 /* 35BC58 E004E288 96220000 */ lhu $v0, 0x0($s1) /* 35BC5C E004E28C 4405A000 */ mfc1 $a1, $f20 /* 35BC60 E004E290 C6260020 */ lwc1 $f6, 0x20($s1) /* 35BC64 E004E294 00021080 */ sll $v0, $v0, 2 /* 35BC68 E004E298 3C1EE005 */ lui $fp, (0xE0050000 >> 16) /* 35BC6C E004E29C 03C2F021 */ addu $fp, $fp, $v0 /* 35BC70 E004E2A0 8FDEE5E0 */ lw $fp, -0x1A20($fp) /* 35BC74 E004E2A4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 35BC78 E004E2A8 4600328D */ trunc.w.s $f10, $f6 /* 35BC7C E004E2AC 44145000 */ mfc1 $s4, $f10 /* 35BC80 E004E2B0 00000000 */ nop /* 35BC84 E004E2B4 44941000 */ mtc1 $s4, $f2 /* 35BC88 E004E2B8 00000000 */ nop /* 35BC8C E004E2BC 468010A0 */ cvt.s.w $f2, $f2 /* 35BC90 E004E2C0 3A950007 */ xori $s5, $s4, 0x7 /* 35BC94 E004E2C4 2EB50001 */ sltiu $s5, $s5, 0x1 /* 35BC98 E004E2C8 46023181 */ sub.s $f6, $f6, $f2 /* 35BC9C E004E2CC AC620000 */ sw $v0, 0x0($v1) /* 35BCA0 E004E2D0 AC600004 */ sw $zero, 0x4($v1) /* 35BCA4 E004E2D4 AD070000 */ sw $a3, 0x0($t0) /* 35BCA8 E004E2D8 8CC20010 */ lw $v0, 0x10($a2) /* 35BCAC E004E2DC 4407A000 */ mfc1 $a3, $f20 /* 35BCB0 E004E2E0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 35BCB4 E004E2E4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 35BCB8 E004E2E8 8C46001C */ lw $a2, 0x1C($v0) /* 35BCBC E004E2EC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35BCC0 E004E2F0 AD020008 */ sw $v0, 0x8($t0) /* 35BCC4 E004E2F4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 35BCC8 E004E2F8 AD09000C */ sw $t1, 0xC($t0) /* 35BCCC E004E2FC 00C23021 */ addu $a2, $a2, $v0 /* 35BCD0 E004E300 00031080 */ sll $v0, $v1, 2 /* 35BCD4 E004E304 00431021 */ addu $v0, $v0, $v1 /* 35BCD8 E004E308 00021080 */ sll $v0, $v0, 2 /* 35BCDC E004E30C 00431023 */ subu $v0, $v0, $v1 /* 35BCE0 E004E310 000218C0 */ sll $v1, $v0, 3 /* 35BCE4 E004E314 00431021 */ addu $v0, $v0, $v1 /* 35BCE8 E004E318 000210C0 */ sll $v0, $v0, 3 /* 35BCEC E004E31C AD060004 */ sw $a2, 0x4($t0) /* 35BCF0 E004E320 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 35BCF4 E004E324 00220821 */ addu $at, $at, $v0 /* 35BCF8 E004E328 C4281DEC */ lwc1 $f8, %lo(gCameras + 0x6C)($at) /* 35BCFC E004E32C C6200010 */ lwc1 $f0, 0x10($s1) /* 35BD00 E004E330 25020008 */ addiu $v0, $t0, 0x8 /* 35BD04 E004E334 AEE80000 */ sw $t0, 0x0($s7) /* 35BD08 E004E338 46004207 */ neg.s $f8, $f8 /* 35BD0C E004E33C E7A00010 */ swc1 $f0, 0x10($sp) /* 35BD10 E004E340 C6200004 */ lwc1 $f0, 0x4($s1) /* 35BD14 E004E344 44064000 */ mfc1 $a2, $f8 /* 35BD18 E004E348 46043182 */ mul.s $f6, $f6, $f4 /* 35BD1C E004E34C 00000000 */ nop /* 35BD20 E004E350 AEE20000 */ sw $v0, 0x0($s7) /* 35BD24 E004E354 E7A00014 */ swc1 $f0, 0x14($sp) /* 35BD28 E004E358 C6200008 */ lwc1 $f0, 0x8($s1) /* 35BD2C E004E35C 25080010 */ addiu $t0, $t0, 0x10 /* 35BD30 E004E360 AEE80000 */ sw $t0, 0x0($s7) /* 35BD34 E004E364 E7A00018 */ swc1 $f0, 0x18($sp) /* 35BD38 E004E368 C620000C */ lwc1 $f0, 0xC($s1) /* 35BD3C E004E36C 4600328D */ trunc.w.s $f10, $f6 /* 35BD40 E004E370 44135000 */ mfc1 $s3, $f10 /* 35BD44 E004E374 0C080180 */ jal shim_guPositionF /* 35BD48 E004E378 E7A0001C */ swc1 $f0, 0x1C($sp) /* 35BD4C E004E37C 27B00060 */ addiu $s0, $sp, 0x60 /* 35BD50 E004E380 0200202D */ daddu $a0, $s0, $zero /* 35BD54 E004E384 3C0541A0 */ lui $a1, (0x41A00000 >> 16) /* 35BD58 E004E388 4406A000 */ mfc1 $a2, $f20 /* 35BD5C E004E38C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 35BD60 E004E390 44810000 */ mtc1 $at, $f0 /* 35BD64 E004E394 00C0382D */ daddu $a3, $a2, $zero /* 35BD68 E004E398 0C080104 */ jal shim_guRotateF /* 35BD6C E004E39C E7A00010 */ swc1 $f0, 0x10($sp) /* 35BD70 E004E3A0 0200202D */ daddu $a0, $s0, $zero /* 35BD74 E004E3A4 27A50020 */ addiu $a1, $sp, 0x20 /* 35BD78 E004E3A8 0C080114 */ jal shim_guMtxCatF /* 35BD7C E004E3AC 00A0302D */ daddu $a2, $a1, $zero /* 35BD80 E004E3B0 27A40020 */ addiu $a0, $sp, 0x20 /* 35BD84 E004E3B4 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 35BD88 E004E3B8 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 35BD8C E004E3BC 3C12800A */ lui $s2, %hi(gDisplayContext) /* 35BD90 E004E3C0 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 35BD94 E004E3C4 96050000 */ lhu $a1, 0x0($s0) /* 35BD98 E004E3C8 8E420000 */ lw $v0, 0x0($s2) /* 35BD9C E004E3CC 00052980 */ sll $a1, $a1, 6 /* 35BDA0 E004E3D0 00B62821 */ addu $a1, $a1, $s6 /* 35BDA4 E004E3D4 0C080118 */ jal shim_guMtxF2L /* 35BDA8 E004E3D8 00452821 */ addu $a1, $v0, $a1 /* 35BDAC E004E3DC 3C07E200 */ lui $a3, (0xE2001E01 >> 16) /* 35BDB0 E004E3E0 34E71E01 */ ori $a3, $a3, (0xE2001E01 & 0xFFFF) /* 35BDB4 E004E3E4 8EE80000 */ lw $t0, 0x0($s7) /* 35BDB8 E004E3E8 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 35BDBC E004E3EC 0100202D */ daddu $a0, $t0, $zero /* 35BDC0 E004E3F0 25080008 */ addiu $t0, $t0, 0x8 /* 35BDC4 E004E3F4 AEE80000 */ sw $t0, 0x0($s7) /* 35BDC8 E004E3F8 96020000 */ lhu $v0, 0x0($s0) /* 35BDCC E004E3FC 327300FF */ andi $s3, $s3, 0xFF /* 35BDD0 E004E400 AC830000 */ sw $v1, 0x0($a0) /* 35BDD4 E004E404 24430001 */ addiu $v1, $v0, 0x1 /* 35BDD8 E004E408 3042FFFF */ andi $v0, $v0, 0xFFFF /* 35BDDC E004E40C 00021180 */ sll $v0, $v0, 6 /* 35BDE0 E004E410 A6030000 */ sh $v1, 0x0($s0) /* 35BDE4 E004E414 8E430000 */ lw $v1, 0x0($s2) /* 35BDE8 E004E418 00561021 */ addu $v0, $v0, $s6 /* 35BDEC E004E41C 00621821 */ addu $v1, $v1, $v0 /* 35BDF0 E004E420 25020008 */ addiu $v0, $t0, 0x8 /* 35BDF4 E004E424 AC830004 */ sw $v1, 0x4($a0) /* 35BDF8 E004E428 AEE20000 */ sw $v0, 0x0($s7) /* 35BDFC E004E42C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 35BE00 E004E430 AD020000 */ sw $v0, 0x0($t0) /* 35BE04 E004E434 92230024 */ lbu $v1, 0x24($s1) /* 35BE08 E004E438 92240025 */ lbu $a0, 0x25($s1) /* 35BE0C E004E43C 92250026 */ lbu $a1, 0x26($s1) /* 35BE10 E004E440 92260027 */ lbu $a2, 0x27($s1) /* 35BE14 E004E444 25020010 */ addiu $v0, $t0, 0x10 /* 35BE18 E004E448 AEE20000 */ sw $v0, 0x0($s7) /* 35BE1C E004E44C 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 35BE20 E004E450 AD020008 */ sw $v0, 0x8($t0) /* 35BE24 E004E454 25020018 */ addiu $v0, $t0, 0x18 /* 35BE28 E004E458 AD13000C */ sw $s3, 0xC($t0) /* 35BE2C E004E45C AEE20000 */ sw $v0, 0x0($s7) /* 35BE30 E004E460 24020003 */ addiu $v0, $zero, 0x3 /* 35BE34 E004E464 AD020014 */ sw $v0, 0x14($t0) /* 35BE38 E004E468 25020020 */ addiu $v0, $t0, 0x20 /* 35BE3C E004E46C AD070010 */ sw $a3, 0x10($t0) /* 35BE40 E004E470 AEE20000 */ sw $v0, 0x0($s7) /* 35BE44 E004E474 001411C0 */ sll $v0, $s4, 7 /* 35BE48 E004E478 30420FFF */ andi $v0, $v0, 0xFFF /* 35BE4C E004E47C 00021300 */ sll $v0, $v0, 12 /* 35BE50 E004E480 3C07F200 */ lui $a3, (0xF2000080 >> 16) /* 35BE54 E004E484 00471025 */ or $v0, $v0, $a3 /* 35BE58 E004E488 0014A140 */ sll $s4, $s4, 5 /* 35BE5C E004E48C AD020018 */ sw $v0, 0x18($t0) /* 35BE60 E004E490 2682001F */ addiu $v0, $s4, 0x1F /* 35BE64 E004E494 00021080 */ sll $v0, $v0, 2 /* 35BE68 E004E498 30420FFF */ andi $v0, $v0, 0xFFF /* 35BE6C E004E49C 00021300 */ sll $v0, $v0, 12 /* 35BE70 E004E4A0 3442007C */ ori $v0, $v0, 0x7C /* 35BE74 E004E4A4 AD02001C */ sw $v0, 0x1C($t0) /* 35BE78 E004E4A8 00031E00 */ sll $v1, $v1, 24 /* 35BE7C E004E4AC 00042400 */ sll $a0, $a0, 16 /* 35BE80 E004E4B0 00641825 */ or $v1, $v1, $a0 /* 35BE84 E004E4B4 00052A00 */ sll $a1, $a1, 8 /* 35BE88 E004E4B8 00651825 */ or $v1, $v1, $a1 /* 35BE8C E004E4BC 00661825 */ or $v1, $v1, $a2 /* 35BE90 E004E4C0 26850020 */ addiu $a1, $s4, 0x20 /* 35BE94 E004E4C4 12A00012 */ beqz $s5, .LE004E510 /* 35BE98 E004E4C8 AD030004 */ sw $v1, 0x4($t0) /* 35BE9C E004E4CC 00E0182D */ daddu $v1, $a3, $zero /* 35BEA0 E004E4D0 34630080 */ ori $v1, $v1, (0xF2000080 & 0xFFFF) /* 35BEA4 E004E4D4 3C040100 */ lui $a0, (0x10000FC >> 16) /* 35BEA8 E004E4D8 348400FC */ ori $a0, $a0, (0x10000FC & 0xFFFF) /* 35BEAC E004E4DC 25020028 */ addiu $v0, $t0, 0x28 /* 35BEB0 E004E4E0 AEE20000 */ sw $v0, 0x0($s7) /* 35BEB4 E004E4E4 00051080 */ sll $v0, $a1, 2 /* 35BEB8 E004E4E8 30420FFF */ andi $v0, $v0, 0xFFF /* 35BEBC E004E4EC 00021300 */ sll $v0, $v0, 12 /* 35BEC0 E004E4F0 00431025 */ or $v0, $v0, $v1 /* 35BEC4 E004E4F4 AD020020 */ sw $v0, 0x20($t0) /* 35BEC8 E004E4F8 2682003F */ addiu $v0, $s4, 0x3F /* 35BECC E004E4FC 00021080 */ sll $v0, $v0, 2 /* 35BED0 E004E500 30420FFF */ andi $v0, $v0, 0xFFF /* 35BED4 E004E504 00021300 */ sll $v0, $v0, 12 /* 35BED8 E004E508 08013952 */ j .LE004E548 /* 35BEDC E004E50C 00441025 */ or $v0, $v0, $a0 .LE004E510: /* 35BEE0 E004E510 3C030100 */ lui $v1, (0x100007C >> 16) /* 35BEE4 E004E514 3463007C */ ori $v1, $v1, (0x100007C & 0xFFFF) /* 35BEE8 E004E518 25020028 */ addiu $v0, $t0, 0x28 /* 35BEEC E004E51C AEE20000 */ sw $v0, 0x0($s7) /* 35BEF0 E004E520 00051080 */ sll $v0, $a1, 2 /* 35BEF4 E004E524 30420FFF */ andi $v0, $v0, 0xFFF /* 35BEF8 E004E528 00021300 */ sll $v0, $v0, 12 /* 35BEFC E004E52C 00471025 */ or $v0, $v0, $a3 /* 35BF00 E004E530 AD020020 */ sw $v0, 0x20($t0) /* 35BF04 E004E534 2682003F */ addiu $v0, $s4, 0x3F /* 35BF08 E004E538 00021080 */ sll $v0, $v0, 2 /* 35BF0C E004E53C 30420FFF */ andi $v0, $v0, 0xFFF /* 35BF10 E004E540 00021300 */ sll $v0, $v0, 12 /* 35BF14 E004E544 00431025 */ or $v0, $v0, $v1 .LE004E548: /* 35BF18 E004E548 AD020024 */ sw $v0, 0x24($t0) /* 35BF1C E004E54C 3C06E200 */ lui $a2, (0xE2001E01 >> 16) /* 35BF20 E004E550 34C61E01 */ ori $a2, $a2, (0xE2001E01 & 0xFFFF) /* 35BF24 E004E554 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 35BF28 E004E558 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 35BF2C E004E55C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 35BF30 E004E560 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 35BF34 E004E564 8C820000 */ lw $v0, 0x0($a0) /* 35BF38 E004E568 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 35BF3C E004E56C 0040282D */ daddu $a1, $v0, $zero /* 35BF40 E004E570 24420008 */ addiu $v0, $v0, 0x8 /* 35BF44 E004E574 AC820000 */ sw $v0, 0x0($a0) /* 35BF48 E004E578 ACA30000 */ sw $v1, 0x0($a1) /* 35BF4C E004E57C 24430008 */ addiu $v1, $v0, 0x8 /* 35BF50 E004E580 ACBE0004 */ sw $fp, 0x4($a1) /* 35BF54 E004E584 AC830000 */ sw $v1, 0x0($a0) /* 35BF58 E004E588 24430010 */ addiu $v1, $v0, 0x10 /* 35BF5C E004E58C AC460000 */ sw $a2, 0x0($v0) /* 35BF60 E004E590 AC400004 */ sw $zero, 0x4($v0) /* 35BF64 E004E594 AC830000 */ sw $v1, 0x0($a0) /* 35BF68 E004E598 24030040 */ addiu $v1, $zero, 0x40 /* 35BF6C E004E59C AC470008 */ sw $a3, 0x8($v0) /* 35BF70 E004E5A0 AC43000C */ sw $v1, 0xC($v0) /* 35BF74 E004E5A4 8FBF00C4 */ lw $ra, 0xC4($sp) /* 35BF78 E004E5A8 8FBE00C0 */ lw $fp, 0xC0($sp) /* 35BF7C E004E5AC 8FB700BC */ lw $s7, 0xBC($sp) /* 35BF80 E004E5B0 8FB600B8 */ lw $s6, 0xB8($sp) /* 35BF84 E004E5B4 8FB500B4 */ lw $s5, 0xB4($sp) /* 35BF88 E004E5B8 8FB400B0 */ lw $s4, 0xB0($sp) /* 35BF8C E004E5BC 8FB300AC */ lw $s3, 0xAC($sp) /* 35BF90 E004E5C0 8FB200A8 */ lw $s2, 0xA8($sp) /* 35BF94 E004E5C4 8FB100A4 */ lw $s1, 0xA4($sp) /* 35BF98 E004E5C8 8FB000A0 */ lw $s0, 0xA0($sp) /* 35BF9C E004E5CC D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 35BFA0 E004E5D0 03E00008 */ jr $ra /* 35BFA4 E004E5D4 27BD00D0 */ addiu $sp, $sp, 0xD0 /* 35BFA8 E004E5D8 00000000 */ nop /* 35BFAC E004E5DC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void smoke_burst_appendGfx(void* effect) { SmokeBurstFXData* data = ((EffectInstance*)effect)->data.smokeBurst; s32 unk_20_s32 = data->unk_20; s32 envAlpha = (data->unk_20 - unk_20_s32) * 256.0f; s32 cond = (unk_20_s32 == 7); s32 temp_a1; Gfx* dlist = D_E004E5E0[data->unk_00]; Gfx* dlist2 = D_E004E5EC[0]; Matrix4f sp20; Matrix4f sp60; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist2); shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->unk_10, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(sp60, 20.0f, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->rgba.r, data->rgba.g, data->rgba.b, data->rgba.a); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha); gDPSetAlphaCompare(gMainGfxPos++, G_AC_DITHER); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (unk_20_s32 * 32 ) * 4, 0, (unk_20_s32 * 32 + 31) * 4, 31 * 4); temp_a1 = unk_20_s32 * 32 + 32; if (cond) { gDPSetTileSize(gMainGfxPos++, 1, (temp_a1 ) * 4, 32 * 4, (temp_a1 + 31) * 4, 63 * 4); } else { gDPSetTileSize(gMainGfxPos++, 1, (temp_a1 ) * 4, 0, (temp_a1 + 31) * 4, 31 * 4); } gSPDisplayList(gMainGfxPos++, dlist); gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel something_rotating_appendGfx /* 402EC4 E0116884 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 402EC8 E0116888 AFB7002C */ sw $s7, 0x2C($sp) /* 402ECC E011688C 0080B82D */ daddu $s7, $a0, $zero /* 402ED0 E0116890 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 402ED4 E0116894 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 402ED8 E0116898 AFB3001C */ sw $s3, 0x1C($sp) /* 402EDC E011689C 24130001 */ addiu $s3, $zero, 0x1 /* 402EE0 E01168A0 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 402EE4 E01168A4 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 402EE8 E01168A8 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 402EEC E01168AC AFBF0034 */ sw $ra, 0x34($sp) /* 402EF0 E01168B0 AFBE0030 */ sw $fp, 0x30($sp) /* 402EF4 E01168B4 AFB60028 */ sw $s6, 0x28($sp) /* 402EF8 E01168B8 AFB50024 */ sw $s5, 0x24($sp) /* 402EFC E01168BC AFB40020 */ sw $s4, 0x20($sp) /* 402F00 E01168C0 AFB20018 */ sw $s2, 0x18($sp) /* 402F04 E01168C4 AFB10014 */ sw $s1, 0x14($sp) /* 402F08 E01168C8 AFB00010 */ sw $s0, 0x10($sp) /* 402F0C E01168CC F7B40038 */ sdc1 $f20, 0x38($sp) /* 402F10 E01168D0 8CC20000 */ lw $v0, 0x0($a2) /* 402F14 E01168D4 8EF2000C */ lw $s2, 0xC($s7) /* 402F18 E01168D8 0040202D */ daddu $a0, $v0, $zero /* 402F1C E01168DC 24420008 */ addiu $v0, $v0, 0x8 /* 402F20 E01168E0 8E5E0014 */ lw $fp, 0x14($s2) /* 402F24 E01168E4 26520030 */ addiu $s2, $s2, 0x30 /* 402F28 E01168E8 ACC20000 */ sw $v0, 0x0($a2) /* 402F2C E01168EC AC830000 */ sw $v1, 0x0($a0) /* 402F30 E01168F0 24430008 */ addiu $v1, $v0, 0x8 /* 402F34 E01168F4 AC800004 */ sw $zero, 0x4($a0) /* 402F38 E01168F8 ACC30000 */ sw $v1, 0x0($a2) /* 402F3C E01168FC AC450000 */ sw $a1, 0x0($v0) /* 402F40 E0116900 8EE40010 */ lw $a0, 0x10($s7) /* 402F44 E0116904 24430010 */ addiu $v1, $v0, 0x10 /* 402F48 E0116908 ACC30000 */ sw $v1, 0x0($a2) /* 402F4C E011690C 8C84001C */ lw $a0, 0x1C($a0) /* 402F50 E0116910 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 402F54 E0116914 AC430008 */ sw $v1, 0x8($v0) /* 402F58 E0116918 3C030900 */ lui $v1, %hi(D_090042E0_411570) /* 402F5C E011691C 246342E0 */ addiu $v1, $v1, %lo(D_090042E0_411570) /* 402F60 E0116920 AC43000C */ sw $v1, 0xC($v0) /* 402F64 E0116924 3C03FB00 */ lui $v1, (0xFB000000 >> 16) /* 402F68 E0116928 AC430010 */ sw $v1, 0x10($v0) /* 402F6C E011692C 240300FF */ addiu $v1, $zero, 0xFF /* 402F70 E0116930 AC430014 */ sw $v1, 0x14($v0) /* 402F74 E0116934 3C038000 */ lui $v1, (0x80000000 >> 16) /* 402F78 E0116938 00832021 */ addu $a0, $a0, $v1 /* 402F7C E011693C AC440004 */ sw $a0, 0x4($v0) /* 402F80 E0116940 8EE30008 */ lw $v1, 0x8($s7) /* 402F84 E0116944 24420018 */ addiu $v0, $v0, 0x18 /* 402F88 E0116948 0263182A */ slt $v1, $s3, $v1 /* 402F8C E011694C 106000B5 */ beqz $v1, .LE0116C24 /* 402F90 E0116950 ACC20000 */ sw $v0, 0x0($a2) /* 402F94 E0116954 00C0882D */ daddu $s1, $a2, $zero /* 402F98 E0116958 3C16FB00 */ lui $s6, (0xFB000000 >> 16) /* 402F9C E011695C 3C14DE00 */ lui $s4, (0xDE000000 >> 16) /* 402FA0 E0116960 3C013F50 */ lui $at, (0x3F500000 >> 16) /* 402FA4 E0116964 4481A800 */ mtc1 $at, $f21 /* 402FA8 E0116968 4480A000 */ mtc1 $zero, $f20 /* 402FAC E011696C 3C15F200 */ lui $s5, (0xF2000000 >> 16) /* 402FB0 E0116970 26500025 */ addiu $s0, $s2, 0x25 .LE0116974: /* 402FB4 E0116974 92030004 */ lbu $v1, 0x4($s0) /* 402FB8 E0116978 24020005 */ addiu $v0, $zero, 0x5 /* 402FBC E011697C 506200A4 */ beql $v1, $v0, .LE0116C10 /* 402FC0 E0116980 26730001 */ addiu $s3, $s3, 0x1 /* 402FC4 E0116984 24040001 */ addiu $a0, $zero, 0x1 /* 402FC8 E0116988 0C0459BA */ jal func_E01166E8 /* 402FCC E011698C 0240282D */ daddu $a1, $s2, $zero /* 402FD0 E0116990 9203FFFF */ lbu $v1, -0x1($s0) /* 402FD4 E0116994 240200FF */ addiu $v0, $zero, 0xFF /* 402FD8 E0116998 1062006E */ beq $v1, $v0, .LE0116B54 /* 402FDC E011699C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 402FE0 E01169A0 3C014080 */ lui $at, (0x40800000 >> 16) /* 402FE4 E01169A4 44810000 */ mtc1 $at, $f0 /* 402FE8 E01169A8 449E1000 */ mtc1 $fp, $f2 /* 402FEC E01169AC 00000000 */ nop /* 402FF0 E01169B0 468010A0 */ cvt.s.w $f2, $f2 /* 402FF4 E01169B4 46001082 */ mul.s $f2, $f2, $f0 /* 402FF8 E01169B8 00000000 */ nop /* 402FFC E01169BC 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 403000 E01169C0 44813000 */ mtc1 $at, $f6 /* 403004 E01169C4 00000000 */ nop /* 403008 E01169C8 46061182 */ mul.s $f6, $f2, $f6 /* 40300C E01169CC 00000000 */ nop /* 403010 E01169D0 460031A1 */ cvt.d.s $f6, $f6 /* 403014 E01169D4 46343182 */ mul.d $f6, $f6, $f20 /* 403018 E01169D8 00000000 */ nop /* 40301C E01169DC 8E260000 */ lw $a2, 0x0($s1) /* 403020 E01169E0 3C014220 */ lui $at, (0x42200000 >> 16) /* 403024 E01169E4 44812000 */ mtc1 $at, $f4 /* 403028 E01169E8 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 40302C E01169EC 44814000 */ mtc1 $at, $f8 /* 403030 E01169F0 00C0202D */ daddu $a0, $a2, $zero /* 403034 E01169F4 24C60008 */ addiu $a2, $a2, 0x8 /* 403038 E01169F8 AE260000 */ sw $a2, 0x0($s1) /* 40303C E01169FC AC820000 */ sw $v0, 0x0($a0) /* 403040 E0116A00 46041102 */ mul.s $f4, $f2, $f4 /* 403044 E0116A04 00000000 */ nop /* 403048 E0116A08 9203FFFF */ lbu $v1, -0x1($s0) /* 40304C E0116A0C 3C014348 */ lui $at, (0x43480000 >> 16) /* 403050 E0116A10 44810000 */ mtc1 $at, $f0 /* 403054 E0116A14 24C20008 */ addiu $v0, $a2, 0x8 /* 403058 E0116A18 AE220000 */ sw $v0, 0x0($s1) /* 40305C E0116A1C 46002121 */ cvt.d.s $f4, $f4 /* 403060 E0116A20 46342102 */ mul.d $f4, $f4, $f20 /* 403064 E0116A24 00000000 */ nop /* 403068 E0116A28 AC830004 */ sw $v1, 0x4($a0) /* 40306C E0116A2C ACD60000 */ sw $s6, 0x0($a2) /* 403070 E0116A30 92030001 */ lbu $v1, 0x1($s0) /* 403074 E0116A34 92040002 */ lbu $a0, 0x2($s0) /* 403078 E0116A38 92050003 */ lbu $a1, 0x3($s0) /* 40307C E0116A3C 24C20010 */ addiu $v0, $a2, 0x10 /* 403080 E0116A40 AE220000 */ sw $v0, 0x0($s1) /* 403084 E0116A44 46001002 */ mul.s $f0, $f2, $f0 /* 403088 E0116A48 00000000 */ nop /* 40308C E0116A4C 24C20018 */ addiu $v0, $a2, 0x18 /* 403090 E0116A50 ACD40008 */ sw $s4, 0x8($a2) /* 403094 E0116A54 AE220000 */ sw $v0, 0x0($s1) /* 403098 E0116A58 00031E00 */ sll $v1, $v1, 24 /* 40309C E0116A5C 46000021 */ cvt.d.s $f0, $f0 /* 4030A0 E0116A60 46340002 */ mul.d $f0, $f0, $f20 /* 4030A4 E0116A64 00000000 */ nop /* 4030A8 E0116A68 00042400 */ sll $a0, $a0, 16 /* 4030AC E0116A6C 00641825 */ or $v1, $v1, $a0 /* 4030B0 E0116A70 00052A00 */ sll $a1, $a1, 8 /* 4030B4 E0116A74 00651825 */ or $v1, $v1, $a1 /* 4030B8 E0116A78 34630078 */ ori $v1, $v1, 0x78 /* 4030BC E0116A7C ACC30004 */ sw $v1, 0x4($a2) /* 4030C0 E0116A80 3C03E011 */ lui $v1, (0xE0116C6C >> 16) /* 4030C4 E0116A84 8C636C6C */ lw $v1, (0xE0116C6C & 0xFFFF)($v1) /* 4030C8 E0116A88 46081082 */ mul.s $f2, $f2, $f8 /* 4030CC E0116A8C 00000000 */ nop /* 4030D0 E0116A90 24C20020 */ addiu $v0, $a2, 0x20 /* 4030D4 E0116A94 AE220000 */ sw $v0, 0x0($s1) /* 4030D8 E0116A98 ACD40020 */ sw $s4, 0x20($a2) /* 4030DC E0116A9C ACC3000C */ sw $v1, 0xC($a2) /* 4030E0 E0116AA0 460010A1 */ cvt.d.s $f2, $f2 /* 4030E4 E0116AA4 46341082 */ mul.d $f2, $f2, $f20 /* 4030E8 E0116AA8 00000000 */ nop /* 4030EC E0116AAC 4620328D */ trunc.w.d $f10, $f6 /* 4030F0 E0116AB0 44075000 */ mfc1 $a3, $f10 /* 4030F4 E0116AB4 4620228D */ trunc.w.d $f10, $f4 /* 4030F8 E0116AB8 44085000 */ mfc1 $t0, $f10 /* 4030FC E0116ABC 30E40FFF */ andi $a0, $a3, 0xFFF /* 403100 E0116AC0 24E200FC */ addiu $v0, $a3, 0xFC /* 403104 E0116AC4 4620028D */ trunc.w.d $f10, $f0 /* 403108 E0116AC8 44075000 */ mfc1 $a3, $f10 /* 40310C E0116ACC 31030FFF */ andi $v1, $t0, 0xFFF /* 403110 E0116AD0 250500FC */ addiu $a1, $t0, 0xFC /* 403114 E0116AD4 4620128D */ trunc.w.d $f10, $f2 /* 403118 E0116AD8 44085000 */ mfc1 $t0, $f10 /* 40311C E0116ADC 00042300 */ sll $a0, $a0, 12 /* 403120 E0116AE0 00751825 */ or $v1, $v1, $s5 /* 403124 E0116AE4 00832025 */ or $a0, $a0, $v1 /* 403128 E0116AE8 30420FFF */ andi $v0, $v0, 0xFFF /* 40312C E0116AEC 00021300 */ sll $v0, $v0, 12 /* 403130 E0116AF0 30A50FFF */ andi $a1, $a1, 0xFFF /* 403134 E0116AF4 00451025 */ or $v0, $v0, $a1 /* 403138 E0116AF8 30E30FFF */ andi $v1, $a3, 0xFFF /* 40313C E0116AFC 00031B00 */ sll $v1, $v1, 12 /* 403140 E0116B00 ACC20014 */ sw $v0, 0x14($a2) /* 403144 E0116B04 31020FFF */ andi $v0, $t0, 0xFFF /* 403148 E0116B08 00551025 */ or $v0, $v0, $s5 /* 40314C E0116B0C 00621825 */ or $v1, $v1, $v0 /* 403150 E0116B10 ACC30018 */ sw $v1, 0x18($a2) /* 403154 E0116B14 24E300FC */ addiu $v1, $a3, 0xFC /* 403158 E0116B18 30630FFF */ andi $v1, $v1, 0xFFF /* 40315C E0116B1C 00031B00 */ sll $v1, $v1, 12 /* 403160 E0116B20 250200FC */ addiu $v0, $t0, 0xFC /* 403164 E0116B24 30420FFF */ andi $v0, $v0, 0xFFF /* 403168 E0116B28 ACC40010 */ sw $a0, 0x10($a2) /* 40316C E0116B2C 3C040100 */ lui $a0, (0x1000000 >> 16) /* 403170 E0116B30 00441025 */ or $v0, $v0, $a0 /* 403174 E0116B34 00621825 */ or $v1, $v1, $v0 /* 403178 E0116B38 ACC3001C */ sw $v1, 0x1C($a2) /* 40317C E0116B3C 3C03E011 */ lui $v1, (0xE0116C64 >> 16) /* 403180 E0116B40 8C636C64 */ lw $v1, (0xE0116C64 & 0xFFFF)($v1) /* 403184 E0116B44 24C20028 */ addiu $v0, $a2, 0x28 /* 403188 E0116B48 AE220000 */ sw $v0, 0x0($s1) /* 40318C E0116B4C 08045AFA */ j .LE0116BE8 /* 403190 E0116B50 ACC30024 */ sw $v1, 0x24($a2) .LE0116B54: /* 403194 E0116B54 8E240000 */ lw $a0, 0x0($s1) /* 403198 E0116B58 0080282D */ daddu $a1, $a0, $zero /* 40319C E0116B5C 24840008 */ addiu $a0, $a0, 0x8 /* 4031A0 E0116B60 AE240000 */ sw $a0, 0x0($s1) /* 4031A4 E0116B64 ACB40000 */ sw $s4, 0x0($a1) /* 4031A8 E0116B68 3C03E011 */ lui $v1, (0xE0116C68 >> 16) /* 4031AC E0116B6C 8C636C68 */ lw $v1, (0xE0116C68 & 0xFFFF)($v1) /* 4031B0 E0116B70 24820008 */ addiu $v0, $a0, 0x8 /* 4031B4 E0116B74 AE220000 */ sw $v0, 0x0($s1) /* 4031B8 E0116B78 ACA30004 */ sw $v1, 0x4($a1) /* 4031BC E0116B7C AC960000 */ sw $s6, 0x0($a0) /* 4031C0 E0116B80 92020001 */ lbu $v0, 0x1($s0) /* 4031C4 E0116B84 92030002 */ lbu $v1, 0x2($s0) /* 4031C8 E0116B88 92050003 */ lbu $a1, 0x3($s0) /* 4031CC E0116B8C 92060000 */ lbu $a2, 0x0($s0) /* 4031D0 E0116B90 AC940008 */ sw $s4, 0x8($a0) /* 4031D4 E0116B94 00021600 */ sll $v0, $v0, 24 /* 4031D8 E0116B98 00031C00 */ sll $v1, $v1, 16 /* 4031DC E0116B9C 00431025 */ or $v0, $v0, $v1 /* 4031E0 E0116BA0 00052A00 */ sll $a1, $a1, 8 /* 4031E4 E0116BA4 00451025 */ or $v0, $v0, $a1 /* 4031E8 E0116BA8 00461025 */ or $v0, $v0, $a2 /* 4031EC E0116BAC AC820004 */ sw $v0, 0x4($a0) /* 4031F0 E0116BB0 2662FFFF */ addiu $v0, $s3, -0x1 /* 4031F4 E0116BB4 00021080 */ sll $v0, $v0, 2 /* 4031F8 E0116BB8 3C03E011 */ lui $v1, (0xE0116C70 >> 16) /* 4031FC E0116BBC 00621821 */ addu $v1, $v1, $v0 /* 403200 E0116BC0 8C636C70 */ lw $v1, (0xE0116C70 & 0xFFFF)($v1) /* 403204 E0116BC4 24820010 */ addiu $v0, $a0, 0x10 /* 403208 E0116BC8 AE220000 */ sw $v0, 0x0($s1) /* 40320C E0116BCC AC940010 */ sw $s4, 0x10($a0) /* 403210 E0116BD0 AC83000C */ sw $v1, 0xC($a0) /* 403214 E0116BD4 3C03E011 */ lui $v1, (0xE0116C60 >> 16) /* 403218 E0116BD8 8C636C60 */ lw $v1, (0xE0116C60 & 0xFFFF)($v1) /* 40321C E0116BDC 24820018 */ addiu $v0, $a0, 0x18 /* 403220 E0116BE0 AE220000 */ sw $v0, 0x0($s1) /* 403224 E0116BE4 AC830014 */ sw $v1, 0x14($a0) .LE0116BE8: /* 403228 E0116BE8 3C04D838 */ lui $a0, (0xD8380002 >> 16) /* 40322C E0116BEC 8E220000 */ lw $v0, 0x0($s1) /* 403230 E0116BF0 34840002 */ ori $a0, $a0, (0xD8380002 & 0xFFFF) /* 403234 E0116BF4 0040182D */ daddu $v1, $v0, $zero /* 403238 E0116BF8 24420008 */ addiu $v0, $v0, 0x8 /* 40323C E0116BFC AE220000 */ sw $v0, 0x0($s1) /* 403240 E0116C00 24020040 */ addiu $v0, $zero, 0x40 /* 403244 E0116C04 AC640000 */ sw $a0, 0x0($v1) /* 403248 E0116C08 AC620004 */ sw $v0, 0x4($v1) /* 40324C E0116C0C 26730001 */ addiu $s3, $s3, 0x1 .LE0116C10: /* 403250 E0116C10 26100030 */ addiu $s0, $s0, 0x30 /* 403254 E0116C14 8EE20008 */ lw $v0, 0x8($s7) /* 403258 E0116C18 0262102A */ slt $v0, $s3, $v0 /* 40325C E0116C1C 1440FF55 */ bnez $v0, .LE0116974 /* 403260 E0116C20 26520030 */ addiu $s2, $s2, 0x30 .LE0116C24: /* 403264 E0116C24 8FBF0034 */ lw $ra, 0x34($sp) /* 403268 E0116C28 8FBE0030 */ lw $fp, 0x30($sp) /* 40326C E0116C2C 8FB7002C */ lw $s7, 0x2C($sp) /* 403270 E0116C30 8FB60028 */ lw $s6, 0x28($sp) /* 403274 E0116C34 8FB50024 */ lw $s5, 0x24($sp) /* 403278 E0116C38 8FB40020 */ lw $s4, 0x20($sp) /* 40327C E0116C3C 8FB3001C */ lw $s3, 0x1C($sp) /* 403280 E0116C40 8FB20018 */ lw $s2, 0x18($sp) /* 403284 E0116C44 8FB10014 */ lw $s1, 0x14($sp) /* 403288 E0116C48 8FB00010 */ lw $s0, 0x10($sp) /* 40328C E0116C4C D7B40038 */ ldc1 $f20, 0x38($sp) /* 403290 E0116C50 03E00008 */ jr $ra /* 403294 E0116C54 27BD0040 */ addiu $sp, $sp, 0x40 /* 403298 E0116C58 00000000 */ nop /* 40329C E0116C5C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void something_rotating_appendGfx(void* effect) { SomethingRotatingFXData* data = ((EffectInstance*)effect)->data.somethingRotating; s32 unk_14 = data->unk_14; s32 l, t; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_090042E0_3FE790); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 255); data++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) { if (data->state != 5) { func_E01166E8(1, data); if (data->primAlpha != 255) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, data->primAlpha); gDPSetEnvColor(gMainGfxPos++, data->env.r, data->env.g, data->env.b, 0x78); gSPDisplayList(gMainGfxPos++, D_E0116C6C[0]); l = ((unk_14 * 4.0f) * 100.0f) * (1.0 / 1024); t = ((unk_14 * 4.0f) * 40.0f) * (1.0 / 1024); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, l, t, l + 0xFC, t + 0xFC); l = ((unk_14 * 4.0f) * 200.0f) * (1.0 / 1024); t = ((unk_14 * 4.0f) * 90.0f) * (1.0 / 1024); gDPSetTileSize(gMainGfxPos++, 1, l, t, l + 0xFC, t + 0xFC); gSPDisplayList(gMainGfxPos++, D_E0116C64[0]); } else { gSPDisplayList(gMainGfxPos++, D_E0116C68[0]); gDPSetEnvColor(gMainGfxPos++, data->env.r, data->env.g, data->env.b, data->unk_25); gSPDisplayList(gMainGfxPos++, D_E0116C70[i - 1]); gSPDisplayList(gMainGfxPos++, D_E0116C60[0]); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel JumpPartTo /* 1A8DC4 8027A4E4 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 1A8DC8 8027A4E8 AFB30024 */ sw $s3, 0x24($sp) /* 1A8DCC 8027A4EC 0080982D */ daddu $s3, $a0, $zero /* 1A8DD0 8027A4F0 AFBF0028 */ sw $ra, 0x28($sp) /* 1A8DD4 8027A4F4 AFB20020 */ sw $s2, 0x20($sp) /* 1A8DD8 8027A4F8 AFB1001C */ sw $s1, 0x1C($sp) /* 1A8DDC 8027A4FC AFB00018 */ sw $s0, 0x18($sp) /* 1A8DE0 8027A500 F7BE0058 */ sdc1 $f30, 0x58($sp) /* 1A8DE4 8027A504 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 1A8DE8 8027A508 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 1A8DEC 8027A50C F7B80040 */ sdc1 $f24, 0x40($sp) /* 1A8DF0 8027A510 F7B60038 */ sdc1 $f22, 0x38($sp) /* 1A8DF4 8027A514 F7B40030 */ sdc1 $f20, 0x30($sp) /* 1A8DF8 8027A518 8E72000C */ lw $s2, 0xC($s3) /* 1A8DFC 8027A51C 54A00001 */ bnel $a1, $zero, .L8027A524 /* 1A8E00 8027A520 AE600070 */ sw $zero, 0x70($s3) .L8027A524: /* 1A8E04 8027A524 8E620070 */ lw $v0, 0x70($s3) /* 1A8E08 8027A528 14400093 */ bnez $v0, .L8027A778 /* 1A8E0C 8027A52C 00000000 */ nop /* 1A8E10 8027A530 8E450000 */ lw $a1, 0x0($s2) /* 1A8E14 8027A534 26520004 */ addiu $s2, $s2, 0x4 /* 1A8E18 8027A538 0C0B1EAF */ jal evt_get_variable /* 1A8E1C 8027A53C 0260202D */ daddu $a0, $s3, $zero /* 1A8E20 8027A540 0040802D */ daddu $s0, $v0, $zero /* 1A8E24 8027A544 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A8E28 8027A548 16020002 */ bne $s0, $v0, .L8027A554 /* 1A8E2C 8027A54C 00000000 */ nop /* 1A8E30 8027A550 8E700148 */ lw $s0, 0x148($s3) .L8027A554: /* 1A8E34 8027A554 8E450000 */ lw $a1, 0x0($s2) /* 1A8E38 8027A558 26520004 */ addiu $s2, $s2, 0x4 /* 1A8E3C 8027A55C 0C0B1EAF */ jal evt_get_variable /* 1A8E40 8027A560 0260202D */ daddu $a0, $s3, $zero /* 1A8E44 8027A564 0200202D */ daddu $a0, $s0, $zero /* 1A8E48 8027A568 0C09A75B */ jal get_actor /* 1A8E4C 8027A56C 0040882D */ daddu $s1, $v0, $zero /* 1A8E50 8027A570 0040802D */ daddu $s0, $v0, $zero /* 1A8E54 8027A574 0200202D */ daddu $a0, $s0, $zero /* 1A8E58 8027A578 0C099117 */ jal get_actor_part /* 1A8E5C 8027A57C 0220282D */ daddu $a1, $s1, $zero /* 1A8E60 8027A580 0040882D */ daddu $s1, $v0, $zero /* 1A8E64 8027A584 AE700074 */ sw $s0, 0x74($s3) /* 1A8E68 8027A588 AE710078 */ sw $s1, 0x78($s3) /* 1A8E6C 8027A58C 8E450000 */ lw $a1, 0x0($s2) /* 1A8E70 8027A590 26520004 */ addiu $s2, $s2, 0x4 /* 1A8E74 8027A594 8E300010 */ lw $s0, 0x10($s1) /* 1A8E78 8027A598 0C0B1EAF */ jal evt_get_variable /* 1A8E7C 8027A59C 0260202D */ daddu $a0, $s3, $zero /* 1A8E80 8027A5A0 4482E000 */ mtc1 $v0, $f28 /* 1A8E84 8027A5A4 00000000 */ nop /* 1A8E88 8027A5A8 4680E720 */ cvt.s.w $f28, $f28 /* 1A8E8C 8027A5AC 8E450000 */ lw $a1, 0x0($s2) /* 1A8E90 8027A5B0 26520004 */ addiu $s2, $s2, 0x4 /* 1A8E94 8027A5B4 0C0B1EAF */ jal evt_get_variable /* 1A8E98 8027A5B8 0260202D */ daddu $a0, $s3, $zero /* 1A8E9C 8027A5BC 4482F000 */ mtc1 $v0, $f30 /* 1A8EA0 8027A5C0 00000000 */ nop /* 1A8EA4 8027A5C4 4680F7A0 */ cvt.s.w $f30, $f30 /* 1A8EA8 8027A5C8 8E450000 */ lw $a1, 0x0($s2) /* 1A8EAC 8027A5CC 26520004 */ addiu $s2, $s2, 0x4 /* 1A8EB0 8027A5D0 0C0B1EAF */ jal evt_get_variable /* 1A8EB4 8027A5D4 0260202D */ daddu $a0, $s3, $zero /* 1A8EB8 8027A5D8 44820000 */ mtc1 $v0, $f0 /* 1A8EBC 8027A5DC 00000000 */ nop /* 1A8EC0 8027A5E0 46800020 */ cvt.s.w $f0, $f0 /* 1A8EC4 8027A5E4 E61C000C */ swc1 $f28, 0xC($s0) /* 1A8EC8 8027A5E8 E61E0010 */ swc1 $f30, 0x10($s0) /* 1A8ECC 8027A5EC E6000014 */ swc1 $f0, 0x14($s0) /* 1A8ED0 8027A5F0 8E450000 */ lw $a1, 0x0($s2) /* 1A8ED4 8027A5F4 26520004 */ addiu $s2, $s2, 0x4 /* 1A8ED8 8027A5F8 0C0B1EAF */ jal evt_get_variable /* 1A8EDC 8027A5FC 0260202D */ daddu $a0, $s3, $zero /* 1A8EE0 8027A600 A6020038 */ sh $v0, 0x38($s0) /* 1A8EE4 8027A604 8E450000 */ lw $a1, 0x0($s2) /* 1A8EE8 8027A608 0C0B1EAF */ jal evt_get_variable /* 1A8EEC 8027A60C 0260202D */ daddu $a0, $s3, $zero /* 1A8EF0 8027A610 AE62007C */ sw $v0, 0x7C($s3) /* 1A8EF4 8027A614 C620002C */ lwc1 $f0, 0x2C($s1) /* 1A8EF8 8027A618 C618000C */ lwc1 $f24, 0xC($s0) /* 1A8EFC 8027A61C C61A0014 */ lwc1 $f26, 0x14($s0) /* 1A8F00 8027A620 C6160010 */ lwc1 $f22, 0x10($s0) /* 1A8F04 8027A624 E6000000 */ swc1 $f0, 0x0($s0) /* 1A8F08 8027A628 46000706 */ mov.s $f28, $f0 /* 1A8F0C 8027A62C 4406C000 */ mfc1 $a2, $f24 /* 1A8F10 8027A630 4407D000 */ mfc1 $a3, $f26 /* 1A8F14 8027A634 C6200030 */ lwc1 $f0, 0x30($s1) /* 1A8F18 8027A638 4600E306 */ mov.s $f12, $f28 /* 1A8F1C 8027A63C E6000004 */ swc1 $f0, 0x4($s0) /* 1A8F20 8027A640 C6340034 */ lwc1 $f20, 0x34($s1) /* 1A8F24 8027A644 46000786 */ mov.s $f30, $f0 /* 1A8F28 8027A648 4600A386 */ mov.s $f14, $f20 /* 1A8F2C 8027A64C 0C00A720 */ jal atan2 /* 1A8F30 8027A650 E6140008 */ swc1 $f20, 0x8($s0) /* 1A8F34 8027A654 4600E306 */ mov.s $f12, $f28 /* 1A8F38 8027A658 4600A386 */ mov.s $f14, $f20 /* 1A8F3C 8027A65C 4406C000 */ mfc1 $a2, $f24 /* 1A8F40 8027A660 4407D000 */ mfc1 $a3, $f26 /* 1A8F44 8027A664 461EB781 */ sub.s $f30, $f22, $f30 /* 1A8F48 8027A668 0C00A7B5 */ jal dist2D /* 1A8F4C 8027A66C E6000030 */ swc1 $f0, 0x30($s0) /* 1A8F50 8027A670 86020038 */ lh $v0, 0x38($s0) /* 1A8F54 8027A674 46000106 */ mov.s $f4, $f0 /* 1A8F58 8027A678 14400012 */ bnez $v0, .L8027A6C4 /* 1A8F5C 8027A67C E6040034 */ swc1 $f4, 0x34($s0) /* 1A8F60 8027A680 C6000028 */ lwc1 $f0, 0x28($s0) /* 1A8F64 8027A684 C6020028 */ lwc1 $f2, 0x28($s0) /* 1A8F68 8027A688 46002003 */ div.s $f0, $f4, $f0 /* 1A8F6C 8027A68C 4600028D */ trunc.w.s $f10, $f0 /* 1A8F70 8027A690 44035000 */ mfc1 $v1, $f10 /* 1A8F74 8027A694 00000000 */ nop /* 1A8F78 8027A698 00031400 */ sll $v0, $v1, 16 /* 1A8F7C 8027A69C 00021403 */ sra $v0, $v0, 16 /* 1A8F80 8027A6A0 44820000 */ mtc1 $v0, $f0 /* 1A8F84 8027A6A4 00000000 */ nop /* 1A8F88 8027A6A8 46800020 */ cvt.s.w $f0, $f0 /* 1A8F8C 8027A6AC 46020002 */ mul.s $f0, $f0, $f2 /* 1A8F90 8027A6B0 00000000 */ nop /* 1A8F94 8027A6B4 46002086 */ mov.s $f2, $f4 /* 1A8F98 8027A6B8 A6030038 */ sh $v1, 0x38($s0) /* 1A8F9C 8027A6BC 0809E9BE */ j .L8027A6F8 /* 1A8FA0 8027A6C0 46001201 */ sub.s $f8, $f2, $f0 .L8027A6C4: /* 1A8FA4 8027A6C4 44821000 */ mtc1 $v0, $f2 /* 1A8FA8 8027A6C8 00000000 */ nop /* 1A8FAC 8027A6CC 468010A0 */ cvt.s.w $f2, $f2 /* 1A8FB0 8027A6D0 86020038 */ lh $v0, 0x38($s0) /* 1A8FB4 8027A6D4 46022083 */ div.s $f2, $f4, $f2 /* 1A8FB8 8027A6D8 44820000 */ mtc1 $v0, $f0 /* 1A8FBC 8027A6DC 00000000 */ nop /* 1A8FC0 8027A6E0 46800020 */ cvt.s.w $f0, $f0 /* 1A8FC4 8027A6E4 46020002 */ mul.s $f0, $f0, $f2 /* 1A8FC8 8027A6E8 00000000 */ nop /* 1A8FCC 8027A6EC C6040034 */ lwc1 $f4, 0x34($s0) /* 1A8FD0 8027A6F0 E6020028 */ swc1 $f2, 0x28($s0) /* 1A8FD4 8027A6F4 46002201 */ sub.s $f8, $f4, $f0 .L8027A6F8: /* 1A8FD8 8027A6F8 86020038 */ lh $v0, 0x38($s0) /* 1A8FDC 8027A6FC C6020024 */ lwc1 $f2, 0x24($s0) /* 1A8FE0 8027A700 44823000 */ mtc1 $v0, $f6 /* 1A8FE4 8027A704 00000000 */ nop /* 1A8FE8 8027A708 468031A0 */ cvt.s.w $f6, $f6 /* 1A8FEC 8027A70C 46061082 */ mul.s $f2, $f2, $f6 /* 1A8FF0 8027A710 00000000 */ nop /* 1A8FF4 8027A714 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1A8FF8 8027A718 44810000 */ mtc1 $at, $f0 /* 1A8FFC 8027A71C 00000000 */ nop /* 1A9000 8027A720 46001082 */ mul.s $f2, $f2, $f0 /* 1A9004 8027A724 00000000 */ nop /* 1A9008 8027A728 C6040028 */ lwc1 $f4, 0x28($s0) /* 1A900C 8027A72C 46003006 */ mov.s $f0, $f6 /* 1A9010 8027A730 46004003 */ div.s $f0, $f8, $f0 /* 1A9014 8027A734 46002100 */ add.s $f4, $f4, $f0 /* 1A9018 8027A738 4606F183 */ div.s $f6, $f30, $f6 /* 1A901C 8027A73C 46061080 */ add.s $f2, $f2, $f6 /* 1A9020 8027A740 E6040028 */ swc1 $f4, 0x28($s0) /* 1A9024 8027A744 E602002C */ swc1 $f2, 0x2C($s0) /* 1A9028 8027A748 8E2200B4 */ lw $v0, 0xB4($s1) /* 1A902C 8027A74C 10400009 */ beqz $v0, .L8027A774 /* 1A9030 8027A750 24020001 */ addiu $v0, $zero, 0x1 /* 1A9034 8027A754 C6200034 */ lwc1 $f0, 0x34($s1) /* 1A9038 8027A758 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A903C 8027A75C 8E2400B4 */ lw $a0, 0xB4($s1) /* 1A9040 8027A760 8E26002C */ lw $a2, 0x2C($s1) /* 1A9044 8027A764 8E270030 */ lw $a3, 0x30($s1) /* 1A9048 8027A768 0C052757 */ jal sfx_play_sound_at_position /* 1A904C 8027A76C 0000282D */ daddu $a1, $zero, $zero /* 1A9050 8027A770 24020001 */ addiu $v0, $zero, 0x1 .L8027A774: /* 1A9054 8027A774 AE620070 */ sw $v0, 0x70($s3) .L8027A778: /* 1A9058 8027A778 8E710078 */ lw $s1, 0x78($s3) /* 1A905C 8027A77C 8E300010 */ lw $s0, 0x10($s1) /* 1A9060 8027A780 C6040004 */ lwc1 $f4, 0x4($s0) /* 1A9064 8027A784 C600002C */ lwc1 $f0, 0x2C($s0) /* 1A9068 8027A788 8E050028 */ lw $a1, 0x28($s0) /* 1A906C 8027A78C 46002100 */ add.s $f4, $f4, $f0 /* 1A9070 8027A790 C6020024 */ lwc1 $f2, 0x24($s0) /* 1A9074 8027A794 8E060030 */ lw $a2, 0x30($s0) /* 1A9078 8027A798 46020001 */ sub.s $f0, $f0, $f2 /* 1A907C 8027A79C 0200202D */ daddu $a0, $s0, $zero /* 1A9080 8027A7A0 E6040004 */ swc1 $f4, 0x4($s0) /* 1A9084 8027A7A4 0C099070 */ jal add_xz_vec3f_copy1 /* 1A9088 8027A7A8 E600002C */ swc1 $f0, 0x2C($s0) /* 1A908C 8027A7AC C6000000 */ lwc1 $f0, 0x0($s0) /* 1A9090 8027A7B0 E620002C */ swc1 $f0, 0x2C($s1) /* 1A9094 8027A7B4 C6000004 */ lwc1 $f0, 0x4($s0) /* 1A9098 8027A7B8 E6200030 */ swc1 $f0, 0x30($s1) /* 1A909C 8027A7BC C6000008 */ lwc1 $f0, 0x8($s0) /* 1A90A0 8027A7C0 E6200034 */ swc1 $f0, 0x34($s1) /* 1A90A4 8027A7C4 96020038 */ lhu $v0, 0x38($s0) /* 1A90A8 8027A7C8 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A90AC 8027A7CC A6020038 */ sh $v0, 0x38($s0) /* 1A90B0 8027A7D0 00021400 */ sll $v0, $v0, 16 /* 1A90B4 8027A7D4 1C400012 */ bgtz $v0, .L8027A820 /* 1A90B8 8027A7D8 0000102D */ daddu $v0, $zero, $zero /* 1A90BC 8027A7DC 8E62007C */ lw $v0, 0x7C($s3) /* 1A90C0 8027A7E0 10400008 */ beqz $v0, .L8027A804 /* 1A90C4 8027A7E4 00000000 */ nop /* 1A90C8 8027A7E8 C6000030 */ lwc1 $f0, 0x30($s0) /* 1A90CC 8027A7EC E7A00010 */ swc1 $f0, 0x10($sp) /* 1A90D0 8027A7F0 8E05000C */ lw $a1, 0xC($s0) /* 1A90D4 8027A7F4 8E060010 */ lw $a2, 0x10($s0) /* 1A90D8 8027A7F8 8E070014 */ lw $a3, 0x14($s0) /* 1A90DC 8027A7FC 0C0990BC */ jal play_movement_dust_effects /* 1A90E0 8027A800 24040002 */ addiu $a0, $zero, 0x2 .L8027A804: /* 1A90E4 8027A804 C600000C */ lwc1 $f0, 0xC($s0) /* 1A90E8 8027A808 E620002C */ swc1 $f0, 0x2C($s1) /* 1A90EC 8027A80C C6000010 */ lwc1 $f0, 0x10($s0) /* 1A90F0 8027A810 E6200030 */ swc1 $f0, 0x30($s1) /* 1A90F4 8027A814 C6000014 */ lwc1 $f0, 0x14($s0) /* 1A90F8 8027A818 24020001 */ addiu $v0, $zero, 0x1 /* 1A90FC 8027A81C E6200034 */ swc1 $f0, 0x34($s1) .L8027A820: /* 1A9100 8027A820 8FBF0028 */ lw $ra, 0x28($sp) /* 1A9104 8027A824 8FB30024 */ lw $s3, 0x24($sp) /* 1A9108 8027A828 8FB20020 */ lw $s2, 0x20($sp) /* 1A910C 8027A82C 8FB1001C */ lw $s1, 0x1C($sp) /* 1A9110 8027A830 8FB00018 */ lw $s0, 0x18($sp) /* 1A9114 8027A834 D7BE0058 */ ldc1 $f30, 0x58($sp) /* 1A9118 8027A838 D7BC0050 */ ldc1 $f28, 0x50($sp) /* 1A911C 8027A83C D7BA0048 */ ldc1 $f26, 0x48($sp) /* 1A9120 8027A840 D7B80040 */ ldc1 $f24, 0x40($sp) /* 1A9124 8027A844 D7B60038 */ ldc1 $f22, 0x38($sp) /* 1A9128 8027A848 D7B40030 */ ldc1 $f20, 0x30($sp) /* 1A912C 8027A84C 03E00008 */ jr $ra /* 1A9130 8027A850 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: ApiStatus JumpPartTo(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++); script->functionTemp[3] = 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); // make relative posX = (goalX - posX); posY = (goalY - posY); posZ = (goalZ - posZ); if (movement->moveTime == 0) { movement->moveTime = movement->distance / movement->moveSpeed; deltaDist = movement->distance - movement->moveTime * movement->moveSpeed; } else { movement->moveSpeed = movement->distance / movement->moveTime; deltaDist = movement->distance - movement->moveTime * movement->moveSpeed; } movement->moveSpeed += deltaDist / movement->moveTime; movement->unk_2C = movement->jumpScale * movement->moveTime * 0.5f + posY / movement->moveTime; if (part->partTypeData[4] != 0) { sfx_play_sound_at_position(part->partTypeData[4], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z); } script->functionTemp[0] = 1; } part = script->functionTempPtr[2]; movement = part->movement; movement->absolutePosition.y += movement->unk_2C; movement->unk_2C -= movement->jumpScale; add_xz_vec3f_copy1(&movement->absolutePosition, movement->moveSpeed, movement->angle); part->absolutePosition.x = movement->absolutePosition.x; part->absolutePosition.y = movement->absolutePosition.y; part->absolutePosition.z = movement->absolutePosition.z; movement->moveTime--; if (movement->moveTime <= 0) { if (script->functionTemp[3] != 0) { play_movement_dust_effects(2, movement->goalPos.x, movement->goalPos.y, movement->goalPos.z, movement->angle); } part->absolutePosition.x = movement->goalPos.x; part->absolutePosition.y = movement->goalPos.y; part->absolutePosition.z = movement->goalPos.z; return ApiStatus_DONE1; } else { return ApiStatus_BLOCK; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel IdleFlyToGoal /* 1AA498 8027BBB8 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 1AA49C 8027BBBC AFB20020 */ sw $s2, 0x20($sp) /* 1AA4A0 8027BBC0 0080902D */ daddu $s2, $a0, $zero /* 1AA4A4 8027BBC4 AFBF0024 */ sw $ra, 0x24($sp) /* 1AA4A8 8027BBC8 AFB1001C */ sw $s1, 0x1C($sp) /* 1AA4AC 8027BBCC AFB00018 */ sw $s0, 0x18($sp) /* 1AA4B0 8027BBD0 F7B60030 */ sdc1 $f22, 0x30($sp) /* 1AA4B4 8027BBD4 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1AA4B8 8027BBD8 10A0004F */ beqz $a1, .L8027BD18 /* 1AA4BC 8027BBDC 8E51000C */ lw $s1, 0xC($s2) /* 1AA4C0 8027BBE0 8E250000 */ lw $a1, 0x0($s1) /* 1AA4C4 8027BBE4 0C0B1EAF */ jal evt_get_variable /* 1AA4C8 8027BBE8 26310004 */ addiu $s1, $s1, 0x4 /* 1AA4CC 8027BBEC 0040202D */ daddu $a0, $v0, $zero /* 1AA4D0 8027BBF0 2402FF81 */ addiu $v0, $zero, -0x7F /* 1AA4D4 8027BBF4 14820002 */ bne $a0, $v0, .L8027BC00 /* 1AA4D8 8027BBF8 00000000 */ nop /* 1AA4DC 8027BBFC 8E440148 */ lw $a0, 0x148($s2) .L8027BC00: /* 1AA4E0 8027BC00 0C09A75B */ jal get_actor /* 1AA4E4 8027BC04 00000000 */ nop /* 1AA4E8 8027BC08 0040802D */ daddu $s0, $v0, $zero /* 1AA4EC 8027BC0C AE500074 */ sw $s0, 0x74($s2) /* 1AA4F0 8027BC10 8E250000 */ lw $a1, 0x0($s1) /* 1AA4F4 8027BC14 26310004 */ addiu $s1, $s1, 0x4 /* 1AA4F8 8027BC18 0C0B1EAF */ jal evt_get_variable /* 1AA4FC 8027BC1C 0240202D */ daddu $a0, $s2, $zero /* 1AA500 8027BC20 A6020120 */ sh $v0, 0x120($s0) /* 1AA504 8027BC24 8E250000 */ lw $a1, 0x0($s1) /* 1AA508 8027BC28 26310004 */ addiu $s1, $s1, 0x4 /* 1AA50C 8027BC2C 0C0B1EAF */ jal evt_get_variable /* 1AA510 8027BC30 0240202D */ daddu $a0, $s2, $zero /* 1AA514 8027BC34 A6020122 */ sh $v0, 0x122($s0) /* 1AA518 8027BC38 8E250000 */ lw $a1, 0x0($s1) /* 1AA51C 8027BC3C 0C0B1EAF */ jal evt_get_variable /* 1AA520 8027BC40 0240202D */ daddu $a0, $s2, $zero /* 1AA524 8027BC44 AE42007C */ sw $v0, 0x7C($s2) /* 1AA528 8027BC48 C60000D4 */ lwc1 $f0, 0xD4($s0) /* 1AA52C 8027BC4C C6060144 */ lwc1 $f6, 0x144($s0) /* 1AA530 8027BC50 46003081 */ sub.s $f2, $f6, $f0 /* 1AA534 8027BC54 46021202 */ mul.s $f8, $f2, $f2 /* 1AA538 8027BC58 00000000 */ nop /* 1AA53C 8027BC5C C6040148 */ lwc1 $f4, 0x148($s0) /* 1AA540 8027BC60 C60000D8 */ lwc1 $f0, 0xD8($s0) /* 1AA544 8027BC64 46002081 */ sub.s $f2, $f4, $f0 /* 1AA548 8027BC68 46021282 */ mul.s $f10, $f2, $f2 /* 1AA54C 8027BC6C 00000000 */ nop /* 1AA550 8027BC70 C60000DC */ lwc1 $f0, 0xDC($s0) /* 1AA554 8027BC74 C602014C */ lwc1 $f2, 0x14C($s0) /* 1AA558 8027BC78 46001001 */ sub.s $f0, $f2, $f0 /* 1AA55C 8027BC7C 46000002 */ mul.s $f0, $f0, $f0 /* 1AA560 8027BC80 00000000 */ nop /* 1AA564 8027BC84 E60600C8 */ swc1 $f6, 0xC8($s0) /* 1AA568 8027BC88 E60600E0 */ swc1 $f6, 0xE0($s0) /* 1AA56C 8027BC8C 460A4200 */ add.s $f8, $f8, $f10 /* 1AA570 8027BC90 E60400CC */ swc1 $f4, 0xCC($s0) /* 1AA574 8027BC94 E60400E4 */ swc1 $f4, 0xE4($s0) /* 1AA578 8027BC98 46004300 */ add.s $f12, $f8, $f0 /* 1AA57C 8027BC9C E60200D0 */ swc1 $f2, 0xD0($s0) /* 1AA580 8027BCA0 E60200E8 */ swc1 $f2, 0xE8($s0) /* 1AA584 8027BCA4 46006084 */ sqrt.s $f2, $f12 /* 1AA588 8027BCA8 46021032 */ c.eq.s $f2, $f2 /* 1AA58C 8027BCAC 00000000 */ nop /* 1AA590 8027BCB0 45010004 */ bc1t .L8027BCC4 /* 1AA594 8027BCB4 261100C8 */ addiu $s1, $s0, 0xC8 /* 1AA598 8027BCB8 0C0187BC */ jal sqrtf /* 1AA59C 8027BCBC 00000000 */ nop /* 1AA5A0 8027BCC0 46000086 */ mov.s $f2, $f0 .L8027BCC4: /* 1AA5A4 8027BCC4 86020120 */ lh $v0, 0x120($s0) /* 1AA5A8 8027BCC8 14400007 */ bnez $v0, .L8027BCE8 /* 1AA5AC 8027BCCC E6020114 */ swc1 $f2, 0x114($s0) /* 1AA5B0 8027BCD0 C6000108 */ lwc1 $f0, 0x108($s0) /* 1AA5B4 8027BCD4 46001003 */ div.s $f0, $f2, $f0 /* 1AA5B8 8027BCD8 4600038D */ trunc.w.s $f14, $f0 /* 1AA5BC 8027BCDC 44027000 */ mfc1 $v0, $f14 /* 1AA5C0 8027BCE0 0809EF3F */ j .L8027BCFC /* 1AA5C4 8027BCE4 A6020120 */ sh $v0, 0x120($s0) .L8027BCE8: /* 1AA5C8 8027BCE8 44820000 */ mtc1 $v0, $f0 /* 1AA5CC 8027BCEC 00000000 */ nop /* 1AA5D0 8027BCF0 46800020 */ cvt.s.w $f0, $f0 /* 1AA5D4 8027BCF4 46001003 */ div.s $f0, $f2, $f0 /* 1AA5D8 8027BCF8 E6000108 */ swc1 $f0, 0x108($s0) .L8027BCFC: /* 1AA5DC 8027BCFC 86220058 */ lh $v0, 0x58($s1) /* 1AA5E0 8027BD00 54400003 */ bnel $v0, $zero, .L8027BD10 /* 1AA5E4 8027BD04 AE200050 */ sw $zero, 0x50($s1) /* 1AA5E8 8027BD08 0809EFC6 */ j .L8027BF18 /* 1AA5EC 8027BD0C 24020002 */ addiu $v0, $zero, 0x2 .L8027BD10: /* 1AA5F0 8027BD10 AE200048 */ sw $zero, 0x48($s1) /* 1AA5F4 8027BD14 AE200044 */ sw $zero, 0x44($s1) .L8027BD18: /* 1AA5F8 8027BD18 8E500074 */ lw $s0, 0x74($s2) /* 1AA5FC 8027BD1C 86020120 */ lh $v0, 0x120($s0) /* 1AA600 8027BD20 C6000118 */ lwc1 $f0, 0x118($s0) /* 1AA604 8027BD24 AFA20010 */ sw $v0, 0x10($sp) /* 1AA608 8027BD28 8E44007C */ lw $a0, 0x7C($s2) /* 1AA60C 8027BD2C 8E0500E0 */ lw $a1, 0xE0($s0) /* 1AA610 8027BD30 8E0600D4 */ lw $a2, 0xD4($s0) /* 1AA614 8027BD34 4600038D */ trunc.w.s $f14, $f0 /* 1AA618 8027BD38 44077000 */ mfc1 $a3, $f14 /* 1AA61C 8027BD3C 0C09EC37 */ jal update_lerp_battle /* 1AA620 8027BD40 00000000 */ nop /* 1AA624 8027BD44 C6020118 */ lwc1 $f2, 0x118($s0) /* 1AA628 8027BD48 86020120 */ lh $v0, 0x120($s0) /* 1AA62C 8027BD4C E60000C8 */ swc1 $f0, 0xC8($s0) /* 1AA630 8027BD50 AFA20010 */ sw $v0, 0x10($sp) /* 1AA634 8027BD54 8E44007C */ lw $a0, 0x7C($s2) /* 1AA638 8027BD58 8E0500E4 */ lw $a1, 0xE4($s0) /* 1AA63C 8027BD5C 8E0600D8 */ lw $a2, 0xD8($s0) /* 1AA640 8027BD60 4600138D */ trunc.w.s $f14, $f2 /* 1AA644 8027BD64 44077000 */ mfc1 $a3, $f14 /* 1AA648 8027BD68 0C09EC37 */ jal update_lerp_battle /* 1AA64C 8027BD6C 00000000 */ nop /* 1AA650 8027BD70 C6020118 */ lwc1 $f2, 0x118($s0) /* 1AA654 8027BD74 86020120 */ lh $v0, 0x120($s0) /* 1AA658 8027BD78 E60000CC */ swc1 $f0, 0xCC($s0) /* 1AA65C 8027BD7C AFA20010 */ sw $v0, 0x10($sp) /* 1AA660 8027BD80 8E44007C */ lw $a0, 0x7C($s2) /* 1AA664 8027BD84 8E0500E8 */ lw $a1, 0xE8($s0) /* 1AA668 8027BD88 8E0600DC */ lw $a2, 0xDC($s0) /* 1AA66C 8027BD8C 4600138D */ trunc.w.s $f14, $f2 /* 1AA670 8027BD90 44077000 */ mfc1 $a3, $f14 /* 1AA674 8027BD94 0C09EC37 */ jal update_lerp_battle /* 1AA678 8027BD98 00000000 */ nop /* 1AA67C 8027BD9C C6020118 */ lwc1 $f2, 0x118($s0) /* 1AA680 8027BDA0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1AA684 8027BDA4 4481B000 */ mtc1 $at, $f22 /* 1AA688 8027BDA8 86020120 */ lh $v0, 0x120($s0) /* 1AA68C 8027BDAC 46161080 */ add.s $f2, $f2, $f22 /* 1AA690 8027BDB0 E60000D0 */ swc1 $f0, 0xD0($s0) /* 1AA694 8027BDB4 44820000 */ mtc1 $v0, $f0 /* 1AA698 8027BDB8 00000000 */ nop /* 1AA69C 8027BDBC 46800020 */ cvt.s.w $f0, $f0 /* 1AA6A0 8027BDC0 4602003C */ c.lt.s $f0, $f2 /* 1AA6A4 8027BDC4 00000000 */ nop /* 1AA6A8 8027BDC8 45000009 */ bc1f .L8027BDF0 /* 1AA6AC 8027BDCC E6020118 */ swc1 $f2, 0x118($s0) /* 1AA6B0 8027BDD0 C60000D4 */ lwc1 $f0, 0xD4($s0) /* 1AA6B4 8027BDD4 C60200D8 */ lwc1 $f2, 0xD8($s0) /* 1AA6B8 8027BDD8 C60400DC */ lwc1 $f4, 0xDC($s0) /* 1AA6BC 8027BDDC 24020002 */ addiu $v0, $zero, 0x2 /* 1AA6C0 8027BDE0 E6000144 */ swc1 $f0, 0x144($s0) /* 1AA6C4 8027BDE4 E6020148 */ swc1 $f2, 0x148($s0) /* 1AA6C8 8027BDE8 0809EFC6 */ j .L8027BF18 /* 1AA6CC 8027BDEC E604014C */ swc1 $f4, 0x14C($s0) .L8027BDF0: /* 1AA6D0 8027BDF0 C60200D4 */ lwc1 $f2, 0xD4($s0) /* 1AA6D4 8027BDF4 C60000C8 */ lwc1 $f0, 0xC8($s0) /* 1AA6D8 8027BDF8 46001081 */ sub.s $f2, $f2, $f0 /* 1AA6DC 8027BDFC 46021102 */ mul.s $f4, $f2, $f2 /* 1AA6E0 8027BE00 00000000 */ nop /* 1AA6E4 8027BE04 C60000CC */ lwc1 $f0, 0xCC($s0) /* 1AA6E8 8027BE08 C60200D8 */ lwc1 $f2, 0xD8($s0) /* 1AA6EC 8027BE0C 46001081 */ sub.s $f2, $f2, $f0 /* 1AA6F0 8027BE10 46021182 */ mul.s $f6, $f2, $f2 /* 1AA6F4 8027BE14 00000000 */ nop /* 1AA6F8 8027BE18 C60000D0 */ lwc1 $f0, 0xD0($s0) /* 1AA6FC 8027BE1C C60200DC */ lwc1 $f2, 0xDC($s0) /* 1AA700 8027BE20 46001001 */ sub.s $f0, $f2, $f0 /* 1AA704 8027BE24 46000002 */ mul.s $f0, $f0, $f0 /* 1AA708 8027BE28 00000000 */ nop /* 1AA70C 8027BE2C 46062100 */ add.s $f4, $f4, $f6 /* 1AA710 8027BE30 46002300 */ add.s $f12, $f4, $f0 /* 1AA714 8027BE34 46006004 */ sqrt.s $f0, $f12 /* 1AA718 8027BE38 46000032 */ c.eq.s $f0, $f0 /* 1AA71C 8027BE3C 00000000 */ nop /* 1AA720 8027BE40 45010003 */ bc1t .L8027BE50 /* 1AA724 8027BE44 00000000 */ nop /* 1AA728 8027BE48 0C0187BC */ jal sqrtf /* 1AA72C 8027BE4C 00000000 */ nop .L8027BE50: /* 1AA730 8027BE50 4480A000 */ mtc1 $zero, $f20 /* 1AA734 8027BE54 46000086 */ mov.s $f2, $f0 /* 1AA738 8027BE58 46141032 */ c.eq.s $f2, $f20 /* 1AA73C 8027BE5C 00000000 */ nop /* 1AA740 8027BE60 45030001 */ bc1tl .L8027BE68 /* 1AA744 8027BE64 4600B086 */ mov.s $f2, $f22 .L8027BE68: /* 1AA748 8027BE68 C6000114 */ lwc1 $f0, 0x114($s0) /* 1AA74C 8027BE6C 46140032 */ c.eq.s $f0, $f20 /* 1AA750 8027BE70 00000000 */ nop /* 1AA754 8027BE74 45030001 */ bc1tl .L8027BE7C /* 1AA758 8027BE78 E6160114 */ swc1 $f22, 0x114($s0) .L8027BE7C: /* 1AA75C 8027BE7C C6000114 */ lwc1 $f0, 0x114($s0) /* 1AA760 8027BE80 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 1AA764 8027BE84 44816800 */ mtc1 $at, $f13 /* 1AA768 8027BE88 44806000 */ mtc1 $zero, $f12 /* 1AA76C 8027BE8C 46001003 */ div.s $f0, $f2, $f0 /* 1AA770 8027BE90 46000021 */ cvt.d.s $f0, $f0 /* 1AA774 8027BE94 46206301 */ sub.d $f12, $f12, $f0 /* 1AA778 8027BE98 3C01802A */ lui $at, %hi(D_8029DA18) /* 1AA77C 8027BE9C D420DA18 */ ldc1 $f0, %lo(D_8029DA18)($at) /* 1AA780 8027BEA0 46206302 */ mul.d $f12, $f12, $f0 /* 1AA784 8027BEA4 00000000 */ nop /* 1AA788 8027BEA8 0C00A8BB */ jal sin_deg /* 1AA78C 8027BEAC 46206320 */ cvt.s.d $f12, $f12 /* 1AA790 8027BEB0 86030122 */ lh $v1, 0x122($s0) /* 1AA794 8027BEB4 14600002 */ bnez $v1, .L8027BEC0 /* 1AA798 8027BEB8 46000186 */ mov.s $f6, $f0 /* 1AA79C 8027BEBC 4600A186 */ mov.s $f6, $f20 .L8027BEC0: /* 1AA7A0 8027BEC0 04610007 */ bgez $v1, .L8027BEE0 /* 1AA7A4 8027BEC4 00031023 */ negu $v0, $v1 /* 1AA7A8 8027BEC8 44821000 */ mtc1 $v0, $f2 /* 1AA7AC 8027BECC 00000000 */ nop /* 1AA7B0 8027BED0 468010A0 */ cvt.s.w $f2, $f2 /* 1AA7B4 8027BED4 46003007 */ neg.s $f0, $f6 /* 1AA7B8 8027BED8 46020182 */ mul.s $f6, $f0, $f2 /* 1AA7BC 8027BEDC 00000000 */ nop .L8027BEE0: /* 1AA7C0 8027BEE0 18600006 */ blez $v1, .L8027BEFC /* 1AA7C4 8027BEE4 0000102D */ daddu $v0, $zero, $zero /* 1AA7C8 8027BEE8 44830000 */ mtc1 $v1, $f0 /* 1AA7CC 8027BEEC 00000000 */ nop /* 1AA7D0 8027BEF0 46800020 */ cvt.s.w $f0, $f0 /* 1AA7D4 8027BEF4 46003182 */ mul.s $f6, $f6, $f0 /* 1AA7D8 8027BEF8 00000000 */ nop .L8027BEFC: /* 1AA7DC 8027BEFC C60000C8 */ lwc1 $f0, 0xC8($s0) /* 1AA7E0 8027BF00 C60200CC */ lwc1 $f2, 0xCC($s0) /* 1AA7E4 8027BF04 C60400D0 */ lwc1 $f4, 0xD0($s0) /* 1AA7E8 8027BF08 46061080 */ add.s $f2, $f2, $f6 /* 1AA7EC 8027BF0C E6000144 */ swc1 $f0, 0x144($s0) /* 1AA7F0 8027BF10 E604014C */ swc1 $f4, 0x14C($s0) /* 1AA7F4 8027BF14 E6020148 */ swc1 $f2, 0x148($s0) .L8027BF18: /* 1AA7F8 8027BF18 8FBF0024 */ lw $ra, 0x24($sp) /* 1AA7FC 8027BF1C 8FB20020 */ lw $s2, 0x20($sp) /* 1AA800 8027BF20 8FB1001C */ lw $s1, 0x1C($sp) /* 1AA804 8027BF24 8FB00018 */ lw $s0, 0x18($sp) /* 1AA808 8027BF28 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1AA80C 8027BF2C D7B40028 */ ldc1 $f20, 0x28($sp) /* 1AA810 8027BF30 03E00008 */ jr $ra /* 1AA814 8027BF34 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: ApiStatus IdleFlyToGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorMovement* movement; s32 actorID; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; f32 deltaX, deltaY, deltaZ; f32 dist3D; f32 offsetY; if (isInitialCall) { actorID = evt_get_variable(script, *args++); if (actorID == ACTOR_SELF) { actorID = script->owner1.enemyID; } script->functionTempPtr[1] = actor = get_actor(actorID); movement = &actor->fly; movement->flyTime = evt_get_variable(script, *args++); movement->flyArcAmplitude = evt_get_variable(script, *args++); script->functionTemp[3] = evt_get_variable(script, *args++); goalX = movement->goalPos.x; goalY = movement->goalPos.y; goalZ = movement->goalPos.z; posX = actor->currentPos.x; posY = actor->currentPos.y; posZ = actor->currentPos.z; deltaX = posX - goalX; deltaY = posY - goalY; deltaZ = posZ - goalZ; movement->currentPos.x = posX; movement->unk_18.x = posX; movement->currentPos.y = posY; movement->unk_18.y = posY; movement->currentPos.z = posZ; movement->unk_18.z = posZ; movement->distance = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ)); if (movement->flyTime == 0) { movement->flyTime = movement->distance / movement->speed; } else { movement->speed = movement->distance / movement->flyTime; } if (movement->flyTime == 0) { return ApiStatus_DONE2; } movement->flyElapsed = 0.0f; movement->angle = 0.0f; movement->velocity = 0.0f; } actor = script->functionTempPtr[1]; movement = &actor->fly; movement->currentPos.x = update_lerp_battle(script->functionTemp[3], movement->unk_18.x, movement->goalPos.x, movement->flyElapsed, movement->flyTime); movement->currentPos.y = update_lerp_battle(script->functionTemp[3], movement->unk_18.y, movement->goalPos.y, movement->flyElapsed, movement->flyTime); movement->currentPos.z = update_lerp_battle(script->functionTemp[3], movement->unk_18.z, movement->goalPos.z, movement->flyElapsed, movement->flyTime); movement->flyElapsed += 1.0f; if (movement->flyTime < movement->flyElapsed) { actor->currentPos.x = movement->goalPos.x; actor->currentPos.y = movement->goalPos.y; actor->currentPos.z = movement->goalPos.z; return ApiStatus_DONE2; } deltaX = movement->goalPos.x - movement->currentPos.x; deltaY = movement->goalPos.y - movement->currentPos.y; deltaZ = movement->goalPos.z - movement->currentPos.z; dist3D = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ)); if (dist3D == 0.0f) { dist3D = 1.0f; } if (movement->distance == 0.0f) { movement->distance = 1.0f; } offsetY = sin_deg((1.0 - (dist3D / movement->distance)) * 180.0); if (movement->flyArcAmplitude == 0) { offsetY = 0.0f; } if (movement->flyArcAmplitude < 0) { offsetY = -offsetY * -movement->flyArcAmplitude; } if (movement->flyArcAmplitude > 0) { offsetY = offsetY * movement->flyArcAmplitude; } actor->currentPos.x = movement->currentPos.x; actor->currentPos.y = movement->currentPos.y + offsetY; actor->currentPos.z = movement->currentPos.z; return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_driver_init /* 31650 80056250 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 31654 80056254 AFB50024 */ sw $s5, 0x24($sp) /* 31658 80056258 00A0A82D */ daddu $s5, $a1, $zero /* 3165C 8005625C 3C038008 */ lui $v1, %hi(gActiveSynDriverPtr) /* 31660 80056260 24638E50 */ addiu $v1, $v1, %lo(gActiveSynDriverPtr) /* 31664 80056264 AFBF002C */ sw $ra, 0x2C($sp) /* 31668 80056268 AFB60028 */ sw $s6, 0x28($sp) /* 3166C 8005626C AFB40020 */ sw $s4, 0x20($sp) /* 31670 80056270 AFB3001C */ sw $s3, 0x1C($sp) /* 31674 80056274 AFB20018 */ sw $s2, 0x18($sp) /* 31678 80056278 AFB10014 */ sw $s1, 0x14($sp) /* 3167C 8005627C AFB00010 */ sw $s0, 0x10($sp) /* 31680 80056280 8C620000 */ lw $v0, 0x0($v1) /* 31684 80056284 8EB30014 */ lw $s3, 0x14($s5) /* 31688 80056288 144000BC */ bnez $v0, .L8005657C /* 3168C 8005628C 0080382D */ daddu $a3, $a0, $zero /* 31690 80056290 8EA20000 */ lw $v0, 0x0($s5) /* 31694 80056294 0260202D */ daddu $a0, $s3, $zero /* 31698 80056298 ACE2000C */ sw $v0, 0xC($a3) /* 3169C 8005629C 8EA20004 */ lw $v0, 0x4($s5) /* 316A0 800562A0 AC670000 */ sw $a3, 0x0($v1) /* 316A4 800562A4 ACE00000 */ sw $zero, 0x0($a3) /* 316A8 800562A8 ACE00004 */ sw $zero, 0x4($a3) /* 316AC 800562AC ACE20010 */ sw $v0, 0x10($a3) /* 316B0 800562B0 8EA20008 */ lw $v0, 0x8($s5) /* 316B4 800562B4 3C108008 */ lui $s0, %hi(gSynDriverPtr) /* 316B8 800562B8 26108E54 */ addiu $s0, $s0, %lo(gSynDriverPtr) /* 316BC 800562BC AE070000 */ sw $a3, 0x0($s0) /* 316C0 800562C0 3C018008 */ lui $at, %hi(AuUseGlobalVolume) /* 316C4 800562C4 A0208E58 */ sb $zero, %lo(AuUseGlobalVolume)($at) /* 316C8 800562C8 ACE20008 */ sw $v0, 0x8($a3) /* 316CC 800562CC 8EA30010 */ lw $v1, 0x10($s5) /* 316D0 800562D0 24027FFF */ addiu $v0, $zero, 0x7FFF /* 316D4 800562D4 3C018008 */ lui $at, %hi(AuGlobalVolume) /* 316D8 800562D8 A4228E5A */ sh $v0, %lo(AuGlobalVolume)($at) /* 316DC 800562DC ACE30014 */ sw $v1, 0x14($a3) /* 316E0 800562E0 8EA50000 */ lw $a1, 0x0($s5) /* 316E4 800562E4 24020001 */ addiu $v0, $zero, 0x1 /* 316E8 800562E8 3C018008 */ lui $at, %hi(AuSynStereoDirty) /* 316EC 800562EC A0228E5C */ sb $v0, %lo(AuSynStereoDirty)($at) /* 316F0 800562F0 0C015FE4 */ jal alHeapAlloc /* 316F4 800562F4 2406007C */ addiu $a2, $zero, 0x7C /* 316F8 800562F8 8E030000 */ lw $v1, 0x0($s0) /* 316FC 800562FC AC62001C */ sw $v0, 0x1C($v1) /* 31700 80056300 8EA20000 */ lw $v0, 0x0($s5) /* 31704 80056304 18400043 */ blez $v0, .L80056414 /* 31708 80056308 0000882D */ daddu $s1, $zero, $zero /* 3170C 8005630C 0200B02D */ daddu $s6, $s0, $zero /* 31710 80056310 24120001 */ addiu $s2, $zero, 0x1 /* 31714 80056314 0220A02D */ daddu $s4, $s1, $zero /* 31718 80056318 0260202D */ daddu $a0, $s3, $zero .L8005631C: /* 3171C 8005631C 8EC20000 */ lw $v0, 0x0($s6) /* 31720 80056320 24050001 */ addiu $a1, $zero, 0x1 /* 31724 80056324 8C50001C */ lw $s0, 0x1C($v0) /* 31728 80056328 24060020 */ addiu $a2, $zero, 0x20 /* 3172C 8005632C 0C015FE4 */ jal alHeapAlloc /* 31730 80056330 02148021 */ addu $s0, $s0, $s4 /* 31734 80056334 0260202D */ daddu $a0, $s3, $zero /* 31738 80056338 24050001 */ addiu $a1, $zero, 0x1 /* 3173C 8005633C 24060020 */ addiu $a2, $zero, 0x20 /* 31740 80056340 0C015FE4 */ jal alHeapAlloc /* 31744 80056344 AE020004 */ sw $v0, 0x4($s0) /* 31748 80056348 8EC30000 */ lw $v1, 0x0($s6) /* 3174C 8005634C 26040024 */ addiu $a0, $s0, 0x24 /* 31750 80056350 AE020008 */ sw $v0, 0x8($s0) /* 31754 80056354 8C620014 */ lw $v0, 0x14($v1) /* 31758 80056358 0040F809 */ jalr $v0 /* 3175C 8005635C 2694007C */ addiu $s4, $s4, 0x7C /* 31760 80056360 0260202D */ daddu $a0, $s3, $zero /* 31764 80056364 24050001 */ addiu $a1, $zero, 0x1 /* 31768 80056368 24060020 */ addiu $a2, $zero, 0x20 /* 3176C 8005636C AE020020 */ sw $v0, 0x20($s0) /* 31770 80056370 AE00002C */ sw $zero, 0x2C($s0) /* 31774 80056374 AE120030 */ sw $s2, 0x30($s0) /* 31778 80056378 0C015FE4 */ jal alHeapAlloc /* 3177C 8005637C AE000034 */ sw $zero, 0x34($s0) /* 31780 80056380 0260202D */ daddu $a0, $s3, $zero /* 31784 80056384 24050001 */ addiu $a1, $zero, 0x1 /* 31788 80056388 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3178C 8005638C 44810000 */ mtc1 $at, $f0 /* 31790 80056390 24060050 */ addiu $a2, $zero, 0x50 /* 31794 80056394 AE020038 */ sw $v0, 0x38($s0) /* 31798 80056398 AE000040 */ sw $zero, 0x40($s0) /* 3179C 8005639C AE120044 */ sw $s2, 0x44($s0) /* 317A0 800563A0 0C015FE4 */ jal alHeapAlloc /* 317A4 800563A4 E600003C */ swc1 $f0, 0x3C($s0) /* 317A8 800563A8 AE020048 */ sw $v0, 0x48($s0) /* 317AC 800563AC 24020040 */ addiu $v0, $zero, 0x40 /* 317B0 800563B0 AE12006C */ sw $s2, 0x6C($s0) /* 317B4 800563B4 AE000070 */ sw $zero, 0x70($s0) /* 317B8 800563B8 A612004E */ sh $s2, 0x4E($s0) /* 317BC 800563BC A612005C */ sh $s2, 0x5C($s0) /* 317C0 800563C0 A6120062 */ sh $s2, 0x62($s0) /* 317C4 800563C4 A6120050 */ sh $s2, 0x50($s0) /* 317C8 800563C8 A6120052 */ sh $s2, 0x52($s0) /* 317CC 800563CC A6000054 */ sh $zero, 0x54($s0) /* 317D0 800563D0 A6000056 */ sh $zero, 0x56($s0) /* 317D4 800563D4 A612005A */ sh $s2, 0x5A($s0) /* 317D8 800563D8 A6000058 */ sh $zero, 0x58($s0) /* 317DC 800563DC A6120060 */ sh $s2, 0x60($s0) /* 317E0 800563E0 A600005E */ sh $zero, 0x5E($s0) /* 317E4 800563E4 AE000064 */ sw $zero, 0x64($s0) /* 317E8 800563E8 AE000068 */ sw $zero, 0x68($s0) /* 317EC 800563EC A602004C */ sh $v0, 0x4C($s0) /* 317F0 800563F0 A6000074 */ sh $zero, 0x74($s0) /* 317F4 800563F4 AE000000 */ sw $zero, 0x0($s0) /* 317F8 800563F8 A2000078 */ sb $zero, 0x78($s0) /* 317FC 800563FC A2110079 */ sb $s1, 0x79($s0) /* 31800 80056400 8EA20000 */ lw $v0, 0x0($s5) /* 31804 80056404 26310001 */ addiu $s1, $s1, 0x1 /* 31808 80056408 0222102A */ slt $v0, $s1, $v0 /* 3180C 8005640C 1440FFC3 */ bnez $v0, .L8005631C /* 31810 80056410 0260202D */ daddu $a0, $s3, $zero .L80056414: /* 31814 80056414 0260202D */ daddu $a0, $s3, $zero /* 31818 80056418 8EA50004 */ lw $a1, 0x4($s5) /* 3181C 8005641C 0C015FE4 */ jal alHeapAlloc /* 31820 80056420 24060018 */ addiu $a2, $zero, 0x18 /* 31824 80056424 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 31828 80056428 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 3182C 8005642C AC620020 */ sw $v0, 0x20($v1) /* 31830 80056430 8EA20004 */ lw $v0, 0x4($s5) /* 31834 80056434 18400022 */ blez $v0, .L800564C0 /* 31838 80056438 0000882D */ daddu $s1, $zero, $zero /* 3183C 8005643C 24147FFF */ addiu $s4, $zero, 0x7FFF /* 31840 80056440 0220902D */ daddu $s2, $s1, $zero .L80056444: /* 31844 80056444 0260202D */ daddu $a0, $s3, $zero /* 31848 80056448 24050001 */ addiu $a1, $zero, 0x1 /* 3184C 8005644C 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 31850 80056450 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 31854 80056454 24060014 */ addiu $a2, $zero, 0x14 /* 31858 80056458 8C500020 */ lw $s0, 0x20($v0) /* 3185C 8005645C 02258821 */ addu $s1, $s1, $a1 /* 31860 80056460 02128021 */ addu $s0, $s0, $s2 /* 31864 80056464 AE000010 */ sw $zero, 0x10($s0) /* 31868 80056468 AE000014 */ sw $zero, 0x14($s0) /* 3186C 8005646C A6140000 */ sh $s4, 0x0($s0) /* 31870 80056470 0C015FE4 */ jal alHeapAlloc /* 31874 80056474 A200000C */ sb $zero, 0xC($s0) /* 31878 80056478 0260202D */ daddu $a0, $s3, $zero /* 3187C 8005647C 24050001 */ addiu $a1, $zero, 0x1 /* 31880 80056480 24060014 */ addiu $a2, $zero, 0x14 /* 31884 80056484 0C015FE4 */ jal alHeapAlloc /* 31888 80056488 AE020004 */ sw $v0, 0x4($s0) /* 3188C 8005648C 8E040004 */ lw $a0, 0x4($s0) /* 31890 80056490 9205000C */ lbu $a1, 0xC($s0) /* 31894 80056494 0260302D */ daddu $a2, $s3, $zero /* 31898 80056498 0C0163A1 */ jal func_80058E84 /* 3189C 8005649C AE020008 */ sw $v0, 0x8($s0) /* 318A0 800564A0 8E040008 */ lw $a0, 0x8($s0) /* 318A4 800564A4 9205000C */ lbu $a1, 0xC($s0) /* 318A8 800564A8 0C0163A1 */ jal func_80058E84 /* 318AC 800564AC 0260302D */ daddu $a2, $s3, $zero /* 318B0 800564B0 8EA20004 */ lw $v0, 0x4($s5) /* 318B4 800564B4 0222102A */ slt $v0, $s1, $v0 /* 318B8 800564B8 1440FFE2 */ bnez $v0, .L80056444 /* 318BC 800564BC 26520018 */ addiu $s2, $s2, 0x18 .L800564C0: /* 318C0 800564C0 0260202D */ daddu $a0, $s3, $zero /* 318C4 800564C4 24050170 */ addiu $a1, $zero, 0x170 /* 318C8 800564C8 0C015FE4 */ jal alHeapAlloc /* 318CC 800564CC 24060002 */ addiu $a2, $zero, 0x2 /* 318D0 800564D0 0260202D */ daddu $a0, $s3, $zero /* 318D4 800564D4 24050170 */ addiu $a1, $zero, 0x170 /* 318D8 800564D8 24060002 */ addiu $a2, $zero, 0x2 /* 318DC 800564DC 3C108008 */ lui $s0, %hi(gSynDriverPtr) /* 318E0 800564E0 26108E54 */ addiu $s0, $s0, %lo(gSynDriverPtr) /* 318E4 800564E4 8E030000 */ lw $v1, 0x0($s0) /* 318E8 800564E8 0000882D */ daddu $s1, $zero, $zero /* 318EC 800564EC 0C015FE4 */ jal alHeapAlloc /* 318F0 800564F0 AC620024 */ sw $v0, 0x24($v1) /* 318F4 800564F4 0260202D */ daddu $a0, $s3, $zero /* 318F8 800564F8 240502E0 */ addiu $a1, $zero, 0x2E0 /* 318FC 800564FC 24060002 */ addiu $a2, $zero, 0x2 /* 31900 80056500 3C01800A */ lui $at, %hi(AuDelayedVoiceGroup) /* 31904 80056504 A0203FEC */ sb $zero, %lo(AuDelayedVoiceGroup)($at) /* 31908 80056508 3C01800A */ lui $at, %hi(AuDelayedChannel) /* 3190C 8005650C A4203FEE */ sh $zero, %lo(AuDelayedChannel)($at) /* 31910 80056510 8E070000 */ lw $a3, 0x0($s0) /* 31914 80056514 24030004 */ addiu $v1, $zero, 0x4 /* 31918 80056518 3C01800A */ lui $at, %hi(AuDelayCount) /* 3191C 8005651C AC233FF0 */ sw $v1, %lo(AuDelayCount)($at) /* 31920 80056520 0C015FE4 */ jal alHeapAlloc /* 31924 80056524 ACE20028 */ sw $v0, 0x28($a3) /* 31928 80056528 0260202D */ daddu $a0, $s3, $zero /* 3192C 8005652C 240502E0 */ addiu $a1, $zero, 0x2E0 /* 31930 80056530 24060002 */ addiu $a2, $zero, 0x2 /* 31934 80056534 3C10800A */ lui $s0, %hi(AuDelayBufferMain) /* 31938 80056538 26103FE0 */ addiu $s0, $s0, %lo(AuDelayBufferMain) /* 3193C 8005653C 0C015FE4 */ jal alHeapAlloc /* 31940 80056540 AE020000 */ sw $v0, 0x0($s0) /* 31944 80056544 8E100000 */ lw $s0, 0x0($s0) /* 31948 80056548 0040182D */ daddu $v1, $v0, $zero /* 3194C 8005654C 3C01800A */ lui $at, %hi(AuDelayBufferAux) /* 31950 80056550 AC233FE4 */ sw $v1, %lo(AuDelayBufferAux)($at) .L80056554: /* 31954 80056554 A6000000 */ sh $zero, 0x0($s0) /* 31958 80056558 A4600000 */ sh $zero, 0x0($v1) /* 3195C 8005655C 24630002 */ addiu $v1, $v1, 0x2 /* 31960 80056560 26310001 */ addiu $s1, $s1, 0x1 /* 31964 80056564 2A2202E0 */ slti $v0, $s1, 0x2E0 /* 31968 80056568 1440FFFA */ bnez $v0, .L80056554 /* 3196C 8005656C 26100002 */ addiu $s0, $s0, 0x2 /* 31970 80056570 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 31974 80056574 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 31978 80056578 AC530018 */ sw $s3, 0x18($v0) .L8005657C: /* 3197C 8005657C 8FBF002C */ lw $ra, 0x2C($sp) /* 31980 80056580 8FB60028 */ lw $s6, 0x28($sp) /* 31984 80056584 8FB50024 */ lw $s5, 0x24($sp) /* 31988 80056588 8FB40020 */ lw $s4, 0x20($sp) /* 3198C 8005658C 8FB3001C */ lw $s3, 0x1C($sp) /* 31990 80056590 8FB20018 */ lw $s2, 0x18($sp) /* 31994 80056594 8FB10014 */ lw $s1, 0x14($sp) /* 31998 80056598 8FB00010 */ lw $s0, 0x10($sp) /* 3199C 8005659C 03E00008 */ jr $ra /* 319A0 800565A0 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void au_driver_init(AuSynDriver* driver, ALConfig* config) { ALHeap* heap = config->heap; s32 i; if (gActiveSynDriverPtr != NULL) { return; } driver->num_pvoice = config->num_pvoice; driver->num_bus = config->num_bus; driver->curSamples = 0; driver->unk_04 = 0; driver->outputRate = config->outputRate; driver->dmaNew = config->dmaNew; gActiveSynDriverPtr = driver; gSynDriverPtr = driver; AuUseGlobalVolume = FALSE; AuGlobalVolume = 0x7FFF; AuSynStereoDirty = TRUE; gSynDriverPtr->pvoices = alHeapAlloc(heap, config->num_pvoice, sizeof(*gSynDriverPtr->pvoices)); // this is inlined alN_PVoiceNew for (i = 0; i < config->num_pvoice; i++) { AuPVoice* voice = &gSynDriverPtr->pvoices[i]; voice->decoder.state = alHeapAlloc(heap, 1, sizeof(*voice->decoder.state)); voice->decoder.lstate = alHeapAlloc(heap, 1, sizeof(*voice->decoder.lstate)); voice->decoder.dmaFunc = gSynDriverPtr->dmaNew(&voice->decoder.dmaState); voice->decoder.lastsam = 0; voice->decoder.first = 1; voice->decoder.memin = NULL; voice->resampler.state = alHeapAlloc(heap, 1, sizeof(*voice->resampler.state)); voice->resampler.delta = 0; voice->resampler.first = 1; voice->resampler.ratio = 1.0f; voice->envMixer.state = alHeapAlloc(heap, 1, sizeof(*voice->envMixer.state)); voice->envMixer.first = 1; voice->envMixer.motion = AL_STOPPED; voice->envMixer.volume = 1; voice->envMixer.ltgt = 1; voice->envMixer.rtgt = 1; voice->envMixer.cvolL = 1; voice->envMixer.cvolR = 1; voice->envMixer.dryamt = 0; voice->envMixer.wetamt = 0; voice->envMixer.lratm = 1; voice->envMixer.lratl = 0; voice->envMixer.rratm = 1; voice->envMixer.rratl = 0; voice->envMixer.delta = 0; voice->envMixer.segEnd = 0; voice->envMixer.pan = 64; voice->unk_74 = 0; voice->next = NULL; voice->busId = FX_BUS_BGMA_MAIN; voice->index = i; } gSynDriverPtr->fxBus = alHeapAlloc(heap, config->num_bus, sizeof(*gSynDriverPtr->fxBus)); for (i = 0; i < config->num_bus; i++) { AuFxBus* fxBus = &gSynDriverPtr->fxBus[i]; fxBus->head = NULL; fxBus->tail = NULL; fxBus->gain = 0x7FFF; fxBus->currentEffectType = AU_FX_NONE; fxBus->fxL = alHeapAlloc(heap, 1, sizeof(*fxBus->fxL)); fxBus->fxR = alHeapAlloc(heap, 1, sizeof(*fxBus->fxR)); func_80058E84(fxBus->fxL, fxBus->currentEffectType, heap); func_80058E84(fxBus->fxR, fxBus->currentEffectType, heap); } gSynDriverPtr->savedMainOut = alHeapAlloc(heap, 2 * AUDIO_SAMPLES, 2); gSynDriverPtr->savedAuxOut = alHeapAlloc(heap, 2 * AUDIO_SAMPLES, 2); AuDelayedVoiceGroup = 0; AuDelayedChannel = 0; AuDelayCount = 4; AuDelayBufferMain = alHeapAlloc(heap, 4 * AUDIO_SAMPLES, 2); AuDelayBufferAux = alHeapAlloc(heap, 4 * AUDIO_SAMPLES, 2); for (i = 0; i < 4 * AUDIO_SAMPLES; i++) { AuDelayBufferAux[i] = AuDelayBufferMain[i] = 0; } gSynDriverPtr->heap = heap; }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_do_player_collision /* 146D8 800392D8 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 146DC 800392DC AFB1001C */ sw $s1, 0x1C($sp) /* 146E0 800392E0 0080882D */ daddu $s1, $a0, $zero /* 146E4 800392E4 AFBF0020 */ sw $ra, 0x20($sp) /* 146E8 800392E8 AFB00018 */ sw $s0, 0x18($sp) /* 146EC 800392EC F7BE0050 */ sdc1 $f30, 0x50($sp) /* 146F0 800392F0 F7BC0048 */ sdc1 $f28, 0x48($sp) /* 146F4 800392F4 F7BA0040 */ sdc1 $f26, 0x40($sp) /* 146F8 800392F8 F7B80038 */ sdc1 $f24, 0x38($sp) /* 146FC 800392FC F7B60030 */ sdc1 $f22, 0x30($sp) /* 14700 80039300 F7B40028 */ sdc1 $f20, 0x28($sp) /* 14704 80039304 8E230000 */ lw $v1, 0x0($s1) /* 14708 80039308 3C108011 */ lui $s0, %hi(gPlayerStatus) /* 1470C 8003930C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* 14710 80039310 30620100 */ andi $v0, $v1, 0x100 /* 14714 80039314 144000D1 */ bnez $v0, .L8003965C /* 14718 80039318 0000102D */ daddu $v0, $zero, $zero /* 1471C 8003931C 3C020400 */ lui $v0, (0x4000000 >> 16) /* 14720 80039320 00621024 */ and $v0, $v1, $v0 /* 14724 80039324 10400003 */ beqz $v0, .L80039334 /* 14728 80039328 00000000 */ nop .L8003932C: /* 1472C 8003932C 0800E597 */ j .L8003965C /* 14730 80039330 0000102D */ daddu $v0, $zero, $zero .L80039334: /* 14734 80039334 3C02800A */ lui $v0, %hi(gNpcPlayerCollisionsEnabled) /* 14738 80039338 80420B94 */ lb $v0, %lo(gNpcPlayerCollisionsEnabled)($v0) /* 1473C 8003933C 504000C7 */ beql $v0, $zero, .L8003965C /* 14740 80039340 0000102D */ daddu $v0, $zero, $zero /* 14744 80039344 860200B0 */ lh $v0, 0xB0($s0) /* 14748 80039348 C604002C */ lwc1 $f4, 0x2C($s0) /* 1474C 8003934C 44820000 */ mtc1 $v0, $f0 /* 14750 80039350 00000000 */ nop /* 14754 80039354 46800020 */ cvt.s.w $f0, $f0 /* 14758 80039358 46002000 */ add.s $f0, $f4, $f0 /* 1475C 8003935C C622003C */ lwc1 $f2, 0x3C($s1) /* 14760 80039360 4602003C */ c.lt.s $f0, $f2 /* 14764 80039364 00000000 */ nop /* 14768 80039368 450100BC */ bc1t .L8003965C /* 1476C 8003936C 0000102D */ daddu $v0, $zero, $zero /* 14770 80039370 862200A8 */ lh $v0, 0xA8($s1) /* 14774 80039374 44820000 */ mtc1 $v0, $f0 /* 14778 80039378 00000000 */ nop /* 1477C 8003937C 46800020 */ cvt.s.w $f0, $f0 /* 14780 80039380 46001000 */ add.s $f0, $f2, $f0 /* 14784 80039384 4604003C */ c.lt.s $f0, $f4 /* 14788 80039388 00000000 */ nop /* 1478C 8003938C 450100B3 */ bc1t .L8003965C /* 14790 80039390 0000102D */ daddu $v0, $zero, $zero /* 14794 80039394 C63A0038 */ lwc1 $f26, 0x38($s1) /* 14798 80039398 C61E0028 */ lwc1 $f30, 0x28($s0) /* 1479C 8003939C C61C0030 */ lwc1 $f28, 0x30($s0) /* 147A0 800393A0 962200A6 */ lhu $v0, 0xA6($s1) /* 147A4 800393A4 461AF581 */ sub.s $f22, $f30, $f26 /* 147A8 800393A8 960300B2 */ lhu $v1, 0xB2($s0) /* 147AC 800393AC 00021400 */ sll $v0, $v0, 16 /* 147B0 800393B0 4616B082 */ mul.s $f2, $f22, $f22 /* 147B4 800393B4 00000000 */ nop /* 147B8 800393B8 00022403 */ sra $a0, $v0, 16 /* 147BC 800393BC 000217C2 */ srl $v0, $v0, 31 /* 147C0 800393C0 C6360040 */ lwc1 $f22, 0x40($s1) /* 147C4 800393C4 00822021 */ addu $a0, $a0, $v0 /* 147C8 800393C8 4616E501 */ sub.s $f20, $f28, $f22 /* 147CC 800393CC 00042043 */ sra $a0, $a0, 1 /* 147D0 800393D0 00031C00 */ sll $v1, $v1, 16 /* 147D4 800393D4 4614A002 */ mul.s $f0, $f20, $f20 /* 147D8 800393D8 00000000 */ nop /* 147DC 800393DC 00031403 */ sra $v0, $v1, 16 /* 147E0 800393E0 00031FC2 */ srl $v1, $v1, 31 /* 147E4 800393E4 00431021 */ addu $v0, $v0, $v1 /* 147E8 800393E8 00021043 */ sra $v0, $v0, 1 /* 147EC 800393EC 46001300 */ add.s $f12, $f2, $f0 /* 147F0 800393F0 4484B000 */ mtc1 $a0, $f22 /* 147F4 800393F4 00000000 */ nop /* 147F8 800393F8 4680B5A0 */ cvt.s.w $f22, $f22 /* 147FC 800393FC 4482A000 */ mtc1 $v0, $f20 /* 14800 80039400 00000000 */ nop /* 14804 80039404 4680A520 */ cvt.s.w $f20, $f20 /* 14808 80039408 46006004 */ sqrt.s $f0, $f12 /* 1480C 8003940C 46000032 */ c.eq.s $f0, $f0 /* 14810 80039410 00000000 */ nop /* 14814 80039414 45010003 */ bc1t .L80039424 /* 14818 80039418 4614B580 */ add.s $f22, $f22, $f20 /* 1481C 8003941C 0C0187BC */ jal sqrtf /* 14820 80039420 00000000 */ nop .L80039424: /* 14824 80039424 4600B03C */ c.lt.s $f22, $f0 /* 14828 80039428 00000000 */ nop /* 1482C 8003942C 4501FFBF */ bc1t .L8003932C /* 14830 80039430 E7B60010 */ swc1 $f22, 0x10($sp) /* 14834 80039434 8E020004 */ lw $v0, 0x4($s0) /* 14838 80039438 34428000 */ ori $v0, $v0, 0x8000 /* 1483C 8003943C AE020004 */ sw $v0, 0x4($s0) /* 14840 80039440 C63A006C */ lwc1 $f26, 0x6C($s1) /* 14844 80039444 461AF581 */ sub.s $f22, $f30, $f26 /* 14848 80039448 4616B082 */ mul.s $f2, $f22, $f22 /* 1484C 8003944C 00000000 */ nop /* 14850 80039450 C6360074 */ lwc1 $f22, 0x74($s1) /* 14854 80039454 4616E501 */ sub.s $f20, $f28, $f22 /* 14858 80039458 4614A002 */ mul.s $f0, $f20, $f20 /* 1485C 8003945C 00000000 */ nop /* 14860 80039460 46001300 */ add.s $f12, $f2, $f0 /* 14864 80039464 46006004 */ sqrt.s $f0, $f12 /* 14868 80039468 46000032 */ c.eq.s $f0, $f0 /* 1486C 8003946C 00000000 */ nop /* 14870 80039470 45010004 */ bc1t .L80039484 /* 14874 80039474 46000606 */ mov.s $f24, $f0 /* 14878 80039478 0C0187BC */ jal sqrtf /* 1487C 8003947C 00000000 */ nop /* 14880 80039480 46000606 */ mov.s $f24, $f0 .L80039484: /* 14884 80039484 4600F306 */ mov.s $f12, $f30 /* 14888 80039488 4406D000 */ mfc1 $a2, $f26 /* 1488C 8003948C 4407B000 */ mfc1 $a3, $f22 /* 14890 80039490 0C00A720 */ jal atan2 /* 14894 80039494 4600E386 */ mov.s $f14, $f28 /* 14898 80039498 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 1489C 8003949C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 148A0 800394A0 4481A000 */ mtc1 $at, $f20 /* 148A4 800394A4 46000686 */ mov.s $f26, $f0 /* 148A8 800394A8 4614D502 */ mul.s $f20, $f26, $f20 /* 148AC 800394AC 00000000 */ nop /* 148B0 800394B0 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 148B4 800394B4 44810000 */ mtc1 $at, $f0 /* 148B8 800394B8 C7A80010 */ lwc1 $f8, 0x10($sp) /* 148BC 800394BC C61C0080 */ lwc1 $f28, 0x80($s0) /* 148C0 800394C0 46184601 */ sub.s $f24, $f8, $f24 /* 148C4 800394C4 4600A503 */ div.s $f20, $f20, $f0 /* 148C8 800394C8 0C00A85B */ jal sin_rad /* 148CC 800394CC 4600A306 */ mov.s $f12, $f20 /* 148D0 800394D0 4600C582 */ mul.s $f22, $f24, $f0 /* 148D4 800394D4 00000000 */ nop /* 148D8 800394D8 0C00A874 */ jal cos_rad /* 148DC 800394DC 4600A306 */ mov.s $f12, $f20 /* 148E0 800394E0 3C030040 */ lui $v1, (0x400000 >> 16) /* 148E4 800394E4 8E020004 */ lw $v0, 0x4($s0) /* 148E8 800394E8 4600C087 */ neg.s $f2, $f24 /* 148EC 800394EC 46001502 */ mul.s $f20, $f2, $f0 /* 148F0 800394F0 00000000 */ nop /* 148F4 800394F4 00431024 */ and $v0, $v0, $v1 /* 148F8 800394F8 1040002D */ beqz $v0, .L800395B0 /* 148FC 800394FC 4600D306 */ mov.s $f12, $f26 /* 14900 80039500 0C00A70A */ jal get_clamped_angle_diff /* 14904 80039504 4600E386 */ mov.s $f14, $f28 /* 14908 80039508 3C014234 */ lui $at, (0x42340000 >> 16) /* 1490C 8003950C 44811000 */ mtc1 $at, $f2 /* 14910 80039510 46000005 */ abs.s $f0, $f0 /* 14914 80039514 4602003C */ c.lt.s $f0, $f2 /* 14918 80039518 00000000 */ nop /* 1491C 8003951C 4500000E */ bc1f .L80039558 /* 14920 80039520 00000000 */ nop /* 14924 80039524 C6020028 */ lwc1 $f2, 0x28($s0) /* 14928 80039528 46161081 */ sub.s $f2, $f2, $f22 /* 1492C 8003952C C6000030 */ lwc1 $f0, 0x30($s0) /* 14930 80039530 3C028011 */ lui $v0, %hi(wPartnerNpc) /* 14934 80039534 8C42C930 */ lw $v0, %lo(wPartnerNpc)($v0) /* 14938 80039538 46140001 */ sub.s $f0, $f0, $f20 /* 1493C 8003953C E6020028 */ swc1 $f2, 0x28($s0) /* 14940 80039540 E6000030 */ swc1 $f0, 0x30($s0) /* 14944 80039544 C4420038 */ lwc1 $f2, 0x38($v0) /* 14948 80039548 46161081 */ sub.s $f2, $f2, $f22 /* 1494C 8003954C C4400040 */ lwc1 $f0, 0x40($v0) /* 14950 80039550 0800E569 */ j .L800395A4 /* 14954 80039554 46140001 */ sub.s $f0, $f0, $f20 .L80039558: /* 14958 80039558 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1495C 8003955C 44812000 */ mtc1 $at, $f4 /* 14960 80039560 00000000 */ nop /* 14964 80039564 4604B182 */ mul.s $f6, $f22, $f4 /* 14968 80039568 00000000 */ nop /* 1496C 8003956C 4604A102 */ mul.s $f4, $f20, $f4 /* 14970 80039570 00000000 */ nop /* 14974 80039574 C6020028 */ lwc1 $f2, 0x28($s0) /* 14978 80039578 46061081 */ sub.s $f2, $f2, $f6 /* 1497C 8003957C C6000030 */ lwc1 $f0, 0x30($s0) /* 14980 80039580 3C028011 */ lui $v0, %hi(wPartnerNpc) /* 14984 80039584 8C42C930 */ lw $v0, %lo(wPartnerNpc)($v0) /* 14988 80039588 46040001 */ sub.s $f0, $f0, $f4 /* 1498C 8003958C E6020028 */ swc1 $f2, 0x28($s0) /* 14990 80039590 E6000030 */ swc1 $f0, 0x30($s0) /* 14994 80039594 C4420038 */ lwc1 $f2, 0x38($v0) /* 14998 80039598 46061081 */ sub.s $f2, $f2, $f6 /* 1499C 8003959C C4400040 */ lwc1 $f0, 0x40($v0) /* 149A0 800395A0 46040001 */ sub.s $f0, $f0, $f4 .L800395A4: /* 149A4 800395A4 E4420038 */ swc1 $f2, 0x38($v0) /* 149A8 800395A8 0800E590 */ j .L80039640 /* 149AC 800395AC E4400040 */ swc1 $f0, 0x40($v0) .L800395B0: /* 149B0 800395B0 8E020000 */ lw $v0, 0x0($s0) /* 149B4 800395B4 30420006 */ andi $v0, $v0, 0x6 /* 149B8 800395B8 10400006 */ beqz $v0, .L800395D4 /* 149BC 800395BC 00000000 */ nop /* 149C0 800395C0 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 149C4 800395C4 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 149C8 800395C8 44812000 */ mtc1 $at, $f4 /* 149CC 800395CC 0800E586 */ j .L80039618 /* 149D0 800395D0 00000000 */ nop .L800395D4: /* 149D4 800395D4 0C00A70A */ jal get_clamped_angle_diff /* 149D8 800395D8 4600E386 */ mov.s $f14, $f28 /* 149DC 800395DC 3C014234 */ lui $at, (0x42340000 >> 16) /* 149E0 800395E0 44811000 */ mtc1 $at, $f2 /* 149E4 800395E4 46000005 */ abs.s $f0, $f0 /* 149E8 800395E8 4602003C */ c.lt.s $f0, $f2 /* 149EC 800395EC 00000000 */ nop /* 149F0 800395F0 45000006 */ bc1f .L8003960C /* 149F4 800395F4 00000000 */ nop /* 149F8 800395F8 C6020028 */ lwc1 $f2, 0x28($s0) /* 149FC 800395FC 46161081 */ sub.s $f2, $f2, $f22 /* 14A00 80039600 C6000030 */ lwc1 $f0, 0x30($s0) /* 14A04 80039604 0800E58E */ j .L80039638 /* 14A08 80039608 46140001 */ sub.s $f0, $f0, $f20 .L8003960C: /* 14A0C 8003960C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 14A10 80039610 44812000 */ mtc1 $at, $f4 /* 14A14 80039614 00000000 */ nop .L80039618: /* 14A18 80039618 4604B002 */ mul.s $f0, $f22, $f4 /* 14A1C 8003961C 00000000 */ nop /* 14A20 80039620 4604A102 */ mul.s $f4, $f20, $f4 /* 14A24 80039624 00000000 */ nop /* 14A28 80039628 C6020028 */ lwc1 $f2, 0x28($s0) /* 14A2C 8003962C 46001081 */ sub.s $f2, $f2, $f0 /* 14A30 80039630 C6000030 */ lwc1 $f0, 0x30($s0) /* 14A34 80039634 46040001 */ sub.s $f0, $f0, $f4 .L80039638: /* 14A38 80039638 E6020028 */ swc1 $f2, 0x28($s0) /* 14A3C 8003963C E6000030 */ swc1 $f0, 0x30($s0) .L80039640: /* 14A40 80039640 C620006C */ lwc1 $f0, 0x6C($s1) /* 14A44 80039644 C6220070 */ lwc1 $f2, 0x70($s1) /* 14A48 80039648 C6240074 */ lwc1 $f4, 0x74($s1) /* 14A4C 8003964C 24020001 */ addiu $v0, $zero, 0x1 /* 14A50 80039650 E6200038 */ swc1 $f0, 0x38($s1) /* 14A54 80039654 E622003C */ swc1 $f2, 0x3C($s1) /* 14A58 80039658 E6240040 */ swc1 $f4, 0x40($s1) .L8003965C: /* 14A5C 8003965C 8FBF0020 */ lw $ra, 0x20($sp) /* 14A60 80039660 8FB1001C */ lw $s1, 0x1C($sp) /* 14A64 80039664 8FB00018 */ lw $s0, 0x18($sp) /* 14A68 80039668 D7BE0050 */ ldc1 $f30, 0x50($sp) /* 14A6C 8003966C D7BC0048 */ ldc1 $f28, 0x48($sp) /* 14A70 80039670 D7BA0040 */ ldc1 $f26, 0x40($sp) /* 14A74 80039674 D7B80038 */ ldc1 $f24, 0x38($sp) /* 14A78 80039678 D7B60030 */ ldc1 $f22, 0x30($sp) /* 14A7C 8003967C D7B40028 */ ldc1 $f20, 0x28($sp) /* 14A80 80039680 03E00008 */ jr $ra /* 14A84 80039684 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: s32 npc_do_player_collision(Npc* npc) { PlayerStatus* playerStatus = &gPlayerStatus; f32 playerX, playerZ; f32 playerYaw, yaw; f32 npcX, npcZ; f32 dist, colDist, distToNpc; f32 npcColRadius, playerColRadius; f32 deltaX, deltaZ; if (npc->flags & NPC_FLAG_IGNORE_PLAYER_COLLISION) { return FALSE; } if (npc->flags & NPC_FLAG_PARTNER) { return FALSE; } if (!gNpcPlayerCollisionsEnabled) { return FALSE; } if (playerStatus->position.y + playerStatus->colliderHeight < npc->pos.y) { return FALSE; } if (npc->pos.y + npc->collisionHeight < playerStatus->position.y) { return FALSE; } playerX = playerStatus->position.x; playerZ = playerStatus->position.z; npcColRadius = npc->collisionDiameter / 2; playerColRadius = playerStatus->colliderDiameter / 2; npcX = npc->pos.x; npcZ = npc->pos.z; deltaX = playerX - npcX; deltaZ = playerZ - npcZ; distToNpc = sqrtf(SQ(deltaX) + SQ(deltaZ)); colDist = npcColRadius + playerColRadius; if (colDist < distToNpc) { return FALSE; } playerStatus->animFlags |= PA_FLAG_NPC_COLLIDED; npcX = npc->colliderPos.x; npcZ = npc->colliderPos.z; deltaX = playerX - npcX; deltaZ = playerZ - npcZ; dist = sqrtf(SQ(deltaX) + SQ(deltaZ)); yaw = atan2(playerX, playerZ, npcX, npcZ); playerYaw = playerStatus->targetYaw; dist = colDist - dist; deltaX = dist * sin_rad(DEG_TO_RAD(yaw)); deltaZ = -dist * cos_rad(DEG_TO_RAD(yaw)); if (playerStatus->animFlags & PA_FLAG_RIDING_PARTNER) { if (fabsf(get_clamped_angle_diff(yaw, playerYaw)) < 45.0f) { playerStatus->position.x -= deltaX; playerStatus->position.z -= deltaZ; wPartnerNpc->pos.x -= deltaX; wPartnerNpc->pos.z -= deltaZ; } else { playerStatus->position.x -= deltaX * 0.5f; playerStatus->position.z -= deltaZ * 0.5f; wPartnerNpc->pos.x -= deltaX * 0.5f; wPartnerNpc->pos.z -= deltaZ * 0.5f; } } else { if (playerStatus->flags & (PS_FLAG_JUMPING | PS_FLAG_FALLING)) { playerStatus->position.x -= deltaX * 0.4f; playerStatus->position.z -= deltaZ * 0.4f; } else { dist = get_clamped_angle_diff(yaw, playerYaw); // required to match if (fabsf(dist) < 45.0f) { playerStatus->position.x -= deltaX; playerStatus->position.z -= deltaZ; } else { playerStatus->position.x -= deltaX * 0.5f; playerStatus->position.z -= deltaZ * 0.5f; } } } npc->pos.x = npc->colliderPos.x; npc->pos.y = npc->colliderPos.y; npc->pos.z = npc->colliderPos.z; return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel sun_appendGfx /* 40B7D4 E01203E4 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 40B7D8 E01203E8 0080402D */ daddu $t0, $a0, $zero /* 40B7DC E01203EC AFBF00B8 */ sw $ra, 0xB8($sp) /* 40B7E0 E01203F0 AFB500B4 */ sw $s5, 0xB4($sp) /* 40B7E4 E01203F4 AFB400B0 */ sw $s4, 0xB0($sp) /* 40B7E8 E01203F8 AFB300AC */ sw $s3, 0xAC($sp) /* 40B7EC E01203FC AFB200A8 */ sw $s2, 0xA8($sp) /* 40B7F0 E0120400 AFB100A4 */ sw $s1, 0xA4($sp) /* 40B7F4 E0120404 AFB000A0 */ sw $s0, 0xA0($sp) /* 40B7F8 E0120408 8D14000C */ lw $s4, 0xC($t0) /* 40B7FC E012040C 8E950038 */ lw $s5, 0x38($s4) /* 40B800 E0120410 8E870000 */ lw $a3, 0x0($s4) /* 40B804 E0120414 12A000D1 */ beqz $s5, .LE012075C /* 40B808 E0120418 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 40B80C E012041C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 40B810 E0120420 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 40B814 E0120424 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 40B818 E0120428 8C640000 */ lw $a0, 0x0($v1) /* 40B81C E012042C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 40B820 E0120430 0080282D */ daddu $a1, $a0, $zero /* 40B824 E0120434 24840008 */ addiu $a0, $a0, 0x8 /* 40B828 E0120438 AC640000 */ sw $a0, 0x0($v1) /* 40B82C E012043C ACA20000 */ sw $v0, 0x0($a1) /* 40B830 E0120440 ACA00004 */ sw $zero, 0x4($a1) /* 40B834 E0120444 AC860000 */ sw $a2, 0x0($a0) /* 40B838 E0120448 8D050010 */ lw $a1, 0x10($t0) /* 40B83C E012044C 24820008 */ addiu $v0, $a0, 0x8 /* 40B840 E0120450 AC620000 */ sw $v0, 0x0($v1) /* 40B844 E0120454 8CA2001C */ lw $v0, 0x1C($a1) /* 40B848 E0120458 3C038000 */ lui $v1, (0x80000000 >> 16) /* 40B84C E012045C 00431021 */ addu $v0, $v0, $v1 /* 40B850 E0120460 14E00004 */ bnez $a3, .LE0120474 /* 40B854 E0120464 AC820004 */ sw $v0, 0x4($a0) /* 40B858 E0120468 3C05C4C8 */ lui $a1, (0xC4C80000 >> 16) /* 40B85C E012046C 0804811F */ j .LE012047C /* 40B860 E0120470 3C0644C8 */ lui $a2, (0x44C80000 >> 16) .LE0120474: /* 40B864 E0120474 3C0544C8 */ lui $a1, (0x44C80000 >> 16) /* 40B868 E0120478 3C06C4C8 */ lui $a2, (0xC4C80000 >> 16) .LE012047C: /* 40B86C E012047C 3C07C496 */ lui $a3, (0xC4960000 >> 16) /* 40B870 E0120480 3C014496 */ lui $at, (0x44960000 >> 16) /* 40B874 E0120484 44810000 */ mtc1 $at, $f0 /* 40B878 E0120488 3C01C2C8 */ lui $at, (0xC2C80000 >> 16) /* 40B87C E012048C 44811000 */ mtc1 $at, $f2 /* 40B880 E0120490 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 40B884 E0120494 44812000 */ mtc1 $at, $f4 /* 40B888 E0120498 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 40B88C E012049C 44813000 */ mtc1 $at, $f6 /* 40B890 E01204A0 27A40020 */ addiu $a0, $sp, 0x20 /* 40B894 E01204A4 E7A00010 */ swc1 $f0, 0x10($sp) /* 40B898 E01204A8 E7A20014 */ swc1 $f2, 0x14($sp) /* 40B89C E01204AC E7A40018 */ swc1 $f4, 0x18($sp) /* 40B8A0 E01204B0 0C080184 */ jal shim_guOrthoF /* 40B8A4 E01204B4 E7A6001C */ swc1 $f6, 0x1C($sp) /* 40B8A8 E01204B8 3C130001 */ lui $s3, (0x11630 >> 16) /* 40B8AC E01204BC 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 40B8B0 E01204C0 27A40020 */ addiu $a0, $sp, 0x20 /* 40B8B4 E01204C4 3C118007 */ lui $s1, %hi(gMatrixListPos) /* 40B8B8 E01204C8 263141F0 */ addiu $s1, $s1, %lo(gMatrixListPos) /* 40B8BC E01204CC 3C12800A */ lui $s2, %hi(gDisplayContext) /* 40B8C0 E01204D0 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 40B8C4 E01204D4 96250000 */ lhu $a1, 0x0($s1) /* 40B8C8 E01204D8 8E420000 */ lw $v0, 0x0($s2) /* 40B8CC E01204DC 00052980 */ sll $a1, $a1, 6 /* 40B8D0 E01204E0 00B32821 */ addu $a1, $a1, $s3 /* 40B8D4 E01204E4 0C080118 */ jal shim_guMtxF2L /* 40B8D8 E01204E8 00452821 */ addu $a1, $v0, $a1 /* 40B8DC E01204EC 3C09DA38 */ lui $t1, (0xDA380007 >> 16) /* 40B8E0 E01204F0 35290007 */ ori $t1, $t1, (0xDA380007 & 0xFFFF) /* 40B8E4 E01204F4 27A40020 */ addiu $a0, $sp, 0x20 /* 40B8E8 E01204F8 3C10800A */ lui $s0, %hi(gMainGfxPos) /* 40B8EC E01204FC 2610A66C */ addiu $s0, $s0, %lo(gMainGfxPos) /* 40B8F0 E0120500 44800000 */ mtc1 $zero, $f0 /* 40B8F4 E0120504 8E030000 */ lw $v1, 0x0($s0) /* 40B8F8 E0120508 96220000 */ lhu $v0, 0x0($s1) /* 40B8FC E012050C 0060402D */ daddu $t0, $v1, $zero /* 40B900 E0120510 24630008 */ addiu $v1, $v1, 0x8 /* 40B904 E0120514 AE030000 */ sw $v1, 0x0($s0) /* 40B908 E0120518 24430001 */ addiu $v1, $v0, 0x1 /* 40B90C E012051C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 40B910 E0120520 00021180 */ sll $v0, $v0, 6 /* 40B914 E0120524 44050000 */ mfc1 $a1, $f0 /* 40B918 E0120528 00531021 */ addu $v0, $v0, $s3 /* 40B91C E012052C AD090000 */ sw $t1, 0x0($t0) /* 40B920 E0120530 A6230000 */ sh $v1, 0x0($s1) /* 40B924 E0120534 8E430000 */ lw $v1, 0x0($s2) /* 40B928 E0120538 00A0302D */ daddu $a2, $a1, $zero /* 40B92C E012053C 00A0382D */ daddu $a3, $a1, $zero /* 40B930 E0120540 00621821 */ addu $v1, $v1, $v0 /* 40B934 E0120544 0C080108 */ jal shim_guTranslateF /* 40B938 E0120548 AD030004 */ sw $v1, 0x4($t0) /* 40B93C E012054C 27A40020 */ addiu $a0, $sp, 0x20 /* 40B940 E0120550 96250000 */ lhu $a1, 0x0($s1) /* 40B944 E0120554 8E420000 */ lw $v0, 0x0($s2) /* 40B948 E0120558 00052980 */ sll $a1, $a1, 6 /* 40B94C E012055C 00B32821 */ addu $a1, $a1, $s3 /* 40B950 E0120560 0C080118 */ jal shim_guMtxF2L /* 40B954 E0120564 00452821 */ addu $a1, $v0, $a1 /* 40B958 E0120568 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 40B95C E012056C 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 40B960 E0120570 0000582D */ daddu $t3, $zero, $zero /* 40B964 E0120574 3C0EF200 */ lui $t6, (0xF2000000 >> 16) /* 40B968 E0120578 3C0C0100 */ lui $t4, (0x100007C >> 16) /* 40B96C E012057C 358C007C */ ori $t4, $t4, (0x100007C & 0xFFFF) /* 40B970 E0120580 3C0DDE00 */ lui $t5, (0xDE000000 >> 16) /* 40B974 E0120584 3C0AE012 */ lui $t2, %hi(D_E0120780) /* 40B978 E0120588 254A0780 */ addiu $t2, $t2, %lo(D_E0120780) /* 40B97C E012058C 0160482D */ daddu $t1, $t3, $zero /* 40B980 E0120590 0280402D */ daddu $t0, $s4, $zero /* 40B984 E0120594 8E060000 */ lw $a2, 0x0($s0) /* 40B988 E0120598 3C014080 */ lui $at, (0x40800000 >> 16) /* 40B98C E012059C 44811000 */ mtc1 $at, $f2 /* 40B990 E01205A0 96220000 */ lhu $v0, 0x0($s1) /* 40B994 E01205A4 00C0202D */ daddu $a0, $a2, $zero /* 40B998 E01205A8 24C60008 */ addiu $a2, $a2, 0x8 /* 40B99C E01205AC AE060000 */ sw $a2, 0x0($s0) /* 40B9A0 E01205B0 AC830000 */ sw $v1, 0x0($a0) /* 40B9A4 E01205B4 24430001 */ addiu $v1, $v0, 0x1 /* 40B9A8 E01205B8 3042FFFF */ andi $v0, $v0, 0xFFFF /* 40B9AC E01205BC 00021180 */ sll $v0, $v0, 6 /* 40B9B0 E01205C0 A6230000 */ sh $v1, 0x0($s1) /* 40B9B4 E01205C4 8E430000 */ lw $v1, 0x0($s2) /* 40B9B8 E01205C8 00531021 */ addu $v0, $v0, $s3 /* 40B9BC E01205CC 00621821 */ addu $v1, $v1, $v0 /* 40B9C0 E01205D0 24C20008 */ addiu $v0, $a2, 0x8 /* 40B9C4 E01205D4 AC830004 */ sw $v1, 0x4($a0) /* 40B9C8 E01205D8 AE020000 */ sw $v0, 0x0($s0) /* 40B9CC E01205DC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 40B9D0 E01205E0 ACC20000 */ sw $v0, 0x0($a2) /* 40B9D4 E01205E4 91030018 */ lbu $v1, 0x18($t0) /* 40B9D8 E01205E8 91040019 */ lbu $a0, 0x19($t0) /* 40B9DC E01205EC 9105001A */ lbu $a1, 0x1A($t0) /* 40B9E0 E01205F0 24C20010 */ addiu $v0, $a2, 0x10 /* 40B9E4 E01205F4 AE020000 */ sw $v0, 0x0($s0) /* 40B9E8 E01205F8 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 40B9EC E01205FC ACC20008 */ sw $v0, 0x8($a2) /* 40B9F0 E0120600 00151043 */ sra $v0, $s5, 1 /* 40B9F4 E0120604 304200FF */ andi $v0, $v0, 0xFF /* 40B9F8 E0120608 00031E00 */ sll $v1, $v1, 24 /* 40B9FC E012060C 00042400 */ sll $a0, $a0, 16 /* 40BA00 E0120610 00641825 */ or $v1, $v1, $a0 /* 40BA04 E0120614 00052A00 */ sll $a1, $a1, 8 /* 40BA08 E0120618 00651825 */ or $v1, $v1, $a1 /* 40BA0C E012061C 00621825 */ or $v1, $v1, $v0 /* 40BA10 E0120620 ACC30004 */ sw $v1, 0x4($a2) /* 40BA14 E0120624 9102001B */ lbu $v0, 0x1B($t0) /* 40BA18 E0120628 9104001C */ lbu $a0, 0x1C($t0) /* 40BA1C E012062C 9105001D */ lbu $a1, 0x1D($t0) /* 40BA20 E0120630 9107001E */ lbu $a3, 0x1E($t0) /* 40BA24 E0120634 01A0182D */ daddu $v1, $t5, $zero /* 40BA28 E0120638 ACC30010 */ sw $v1, 0x10($a2) /* 40BA2C E012063C 00021600 */ sll $v0, $v0, 24 /* 40BA30 E0120640 00042400 */ sll $a0, $a0, 16 /* 40BA34 E0120644 00441025 */ or $v0, $v0, $a0 /* 40BA38 E0120648 00052A00 */ sll $a1, $a1, 8 /* 40BA3C E012064C 00451025 */ or $v0, $v0, $a1 /* 40BA40 E0120650 00471025 */ or $v0, $v0, $a3 /* 40BA44 E0120654 ACC2000C */ sw $v0, 0xC($a2) /* 40BA48 E0120658 3C03E012 */ lui $v1, (0xE0120794 >> 16) /* 40BA4C E012065C 8C630794 */ lw $v1, (0xE0120794 & 0xFFFF)($v1) /* 40BA50 E0120660 24C20018 */ addiu $v0, $a2, 0x18 /* 40BA54 E0120664 AE020000 */ sw $v0, 0x0($s0) /* 40BA58 E0120668 ACC30014 */ sw $v1, 0x14($a2) .LE012066C: /* 40BA5C E012066C C5000020 */ lwc1 $f0, 0x20($t0) /* 40BA60 E0120670 25080004 */ addiu $t0, $t0, 0x4 /* 40BA64 E0120674 8E040000 */ lw $a0, 0x0($s0) /* 40BA68 E0120678 256B0001 */ addiu $t3, $t3, 0x1 /* 40BA6C E012067C 0080282D */ daddu $a1, $a0, $zero /* 40BA70 E0120680 46020002 */ mul.s $f0, $f0, $f2 /* 40BA74 E0120684 00000000 */ nop /* 40BA78 E0120688 24840008 */ addiu $a0, $a0, 0x8 /* 40BA7C E012068C 24820008 */ addiu $v0, $a0, 0x8 /* 40BA80 E0120690 AE040000 */ sw $a0, 0x0($s0) /* 40BA84 E0120694 AE020000 */ sw $v0, 0x0($s0) /* 40BA88 E0120698 4600020D */ trunc.w.s $f8, $f0 /* 40BA8C E012069C 44034000 */ mfc1 $v1, $f8 /* 40BA90 E01206A0 00000000 */ nop /* 40BA94 E01206A4 00691821 */ addu $v1, $v1, $t1 /* 40BA98 E01206A8 30620FFF */ andi $v0, $v1, 0xFFF /* 40BA9C E01206AC 00021300 */ sll $v0, $v0, 12 /* 40BAA0 E01206B0 004E1025 */ or $v0, $v0, $t6 /* 40BAA4 E01206B4 246300FC */ addiu $v1, $v1, 0xFC /* 40BAA8 E01206B8 30630FFF */ andi $v1, $v1, 0xFFF /* 40BAAC E01206BC 00031B00 */ sll $v1, $v1, 12 /* 40BAB0 E01206C0 006C1825 */ or $v1, $v1, $t4 /* 40BAB4 E01206C4 ACA20000 */ sw $v0, 0x0($a1) /* 40BAB8 E01206C8 ACA30004 */ sw $v1, 0x4($a1) /* 40BABC E01206CC AC8D0000 */ sw $t5, 0x0($a0) /* 40BAC0 E01206D0 8D420000 */ lw $v0, 0x0($t2) /* 40BAC4 E01206D4 254A0004 */ addiu $t2, $t2, 0x4 /* 40BAC8 E01206D8 AC820004 */ sw $v0, 0x4($a0) /* 40BACC E01206DC 29620005 */ slti $v0, $t3, 0x5 /* 40BAD0 E01206E0 1440FFE2 */ bnez $v0, .LE012066C /* 40BAD4 E01206E4 2529002C */ addiu $t1, $t1, 0x2C /* 40BAD8 E01206E8 3C02D838 */ lui $v0, (0xD8380002 >> 16) /* 40BADC E01206EC 34420002 */ ori $v0, $v0, (0xD8380002 & 0xFFFF) /* 40BAE0 E01206F0 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 40BAE4 E01206F4 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 40BAE8 E01206F8 8CA40000 */ lw $a0, 0x0($a1) /* 40BAEC E01206FC 3C06DA38 */ lui $a2, (0xDA380007 >> 16) /* 40BAF0 E0120700 0080182D */ daddu $v1, $a0, $zero /* 40BAF4 E0120704 24840008 */ addiu $a0, $a0, 0x8 /* 40BAF8 E0120708 ACA40000 */ sw $a0, 0x0($a1) /* 40BAFC E012070C AC620000 */ sw $v0, 0x0($v1) /* 40BB00 E0120710 24020040 */ addiu $v0, $zero, 0x40 /* 40BB04 E0120714 AC620004 */ sw $v0, 0x4($v1) /* 40BB08 E0120718 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 40BB0C E012071C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 40BB10 E0120720 24820008 */ addiu $v0, $a0, 0x8 /* 40BB14 E0120724 ACA20000 */ sw $v0, 0x0($a1) /* 40BB18 E0120728 3C02800A */ lui $v0, %hi(gDisplayContext) /* 40BB1C E012072C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 40BB20 E0120730 34C60007 */ ori $a2, $a2, (0xDA380007 & 0xFFFF) /* 40BB24 E0120734 AC860000 */ sw $a2, 0x0($a0) /* 40BB28 E0120738 00031980 */ sll $v1, $v1, 6 /* 40BB2C E012073C 24630030 */ addiu $v1, $v1, 0x30 /* 40BB30 E0120740 00431021 */ addu $v0, $v0, $v1 /* 40BB34 E0120744 AC820004 */ sw $v0, 0x4($a0) /* 40BB38 E0120748 24820010 */ addiu $v0, $a0, 0x10 /* 40BB3C E012074C ACA20000 */ sw $v0, 0x0($a1) /* 40BB40 E0120750 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 40BB44 E0120754 AC820008 */ sw $v0, 0x8($a0) /* 40BB48 E0120758 AC80000C */ sw $zero, 0xC($a0) .LE012075C: /* 40BB4C E012075C 8FBF00B8 */ lw $ra, 0xB8($sp) /* 40BB50 E0120760 8FB500B4 */ lw $s5, 0xB4($sp) /* 40BB54 E0120764 8FB400B0 */ lw $s4, 0xB0($sp) /* 40BB58 E0120768 8FB300AC */ lw $s3, 0xAC($sp) /* 40BB5C E012076C 8FB200A8 */ lw $s2, 0xA8($sp) /* 40BB60 E0120770 8FB100A4 */ lw $s1, 0xA4($sp) /* 40BB64 E0120774 8FB000A0 */ lw $s0, 0xA0($sp) /* 40BB68 E0120778 03E00008 */ jr $ra /* 40BB6C E012077C 27BD00C0 */ addiu $sp, $sp, 0xC0 ### DECOMPILED C INSTRUCTIONS: void sun_appendGfx(void* argEffect) { EffectInstance* effect = (EffectInstance*) argEffect; SunFXData* data; Matrix4f mtx; Matrix4f mtxUnused; s32 alpha; s32 offsetS; s32 fromRight; s32 i; data = effect->data.sun; alpha = data->alpha; fromRight = data->shineFromRight; if (alpha != 0) { gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(effect->graphics->data)); if (!fromRight) { shim_guOrthoF(mtx, -1600.0f, 1600.0f, -1200.0f, 1200.0f, -100.0f, 100.0f, 1.0f); } else { shim_guOrthoF(mtx, 1600.0f, -1600.0f, -1200.0f, 1200.0f, -100.0f, 100.0f, 1.0f); } shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); shim_guTranslateF(mtx, 0.0f, 0.0f, 0.0f); shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primColor.r, data->primColor.g, data->primColor.b, alpha >> 1); gDPSetEnvColor(gMainGfxPos++, data->envColor.r, data->envColor.g, data->envColor.b, data->envColor.a); gSPDisplayList(gMainGfxPos++, D_E0120794[0]); for (i = 0; i < ARRAY_COUNT(data->texScrollAmt); i++) { offsetS = data->texScrollAmt[i] * 4.0f; gDPSetTileSize(gMainGfxPos++, 1, offsetS + (44 * i), 0, offsetS + (44 * i) + 252, 124); gSPDisplayList(gMainGfxPos++, D_E0120780[i]); } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025A74C /* 18902C 8025A74C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 189030 8025A750 AFB40020 */ sw $s4, 0x20($sp) /* 189034 8025A754 0080A02D */ daddu $s4, $a0, $zero /* 189038 8025A758 AFB10014 */ sw $s1, 0x14($sp) /* 18903C 8025A75C 00A0882D */ daddu $s1, $a1, $zero /* 189040 8025A760 AFB20018 */ sw $s2, 0x18($sp) /* 189044 8025A764 00C0902D */ daddu $s2, $a2, $zero /* 189048 8025A768 AFBF0028 */ sw $ra, 0x28($sp) /* 18904C 8025A76C AFB50024 */ sw $s5, 0x24($sp) /* 189050 8025A770 AFB3001C */ sw $s3, 0x1C($sp) /* 189054 8025A774 AFB00010 */ sw $s0, 0x10($sp) /* 189058 8025A778 8E3000C0 */ lw $s0, 0xC0($s1) /* 18905C 8025A77C 820206C1 */ lb $v0, 0x6C1($s0) /* 189060 8025A780 8FB50040 */ lw $s5, 0x40($sp) /* 189064 8025A784 10400032 */ beqz $v0, .L8025A850 /* 189068 8025A788 00E0982D */ daddu $s3, $a3, $zero /* 18906C 8025A78C 16800017 */ bnez $s4, .L8025A7EC /* 189070 8025A790 00000000 */ nop /* 189074 8025A794 0C0B7830 */ jal spr_get_player_palettes /* 189078 8025A798 96240088 */ lhu $a0, 0x88($s1) /* 18907C 8025A79C AE0206D0 */ sw $v0, 0x6D0($s0) /* 189080 8025A7A0 0040202D */ daddu $a0, $v0, $zero /* 189084 8025A7A4 A20006CD */ sb $zero, 0x6CD($s0) /* 189088 8025A7A8 8C830000 */ lw $v1, 0x0($a0) /* 18908C 8025A7AC 2402FFFF */ addiu $v0, $zero, -0x1 /* 189090 8025A7B0 50620023 */ beql $v1, $v0, .L8025A840 /* 189094 8025A7B4 2402000A */ addiu $v0, $zero, 0xA /* 189098 8025A7B8 0080182D */ daddu $v1, $a0, $zero /* 18909C 8025A7BC 0040202D */ daddu $a0, $v0, $zero .L8025A7C0: /* 1890A0 8025A7C0 920206CD */ lbu $v0, 0x6CD($s0) /* 1890A4 8025A7C4 24420001 */ addiu $v0, $v0, 0x1 /* 1890A8 8025A7C8 A20206CD */ sb $v0, 0x6CD($s0) /* 1890AC 8025A7CC 00021600 */ sll $v0, $v0, 24 /* 1890B0 8025A7D0 00021583 */ sra $v0, $v0, 22 /* 1890B4 8025A7D4 00431021 */ addu $v0, $v0, $v1 /* 1890B8 8025A7D8 8C420000 */ lw $v0, 0x0($v0) /* 1890BC 8025A7DC 1444FFF8 */ bne $v0, $a0, .L8025A7C0 /* 1890C0 8025A7E0 2402000A */ addiu $v0, $zero, 0xA /* 1890C4 8025A7E4 08096A11 */ j .L8025A844 /* 1890C8 8025A7E8 A20006C2 */ sb $zero, 0x6C2($s0) .L8025A7EC: /* 1890CC 8025A7EC 96240088 */ lhu $a0, 0x88($s1) /* 1890D0 8025A7F0 0C0B7A90 */ jal spr_get_npc_palettes /* 1890D4 8025A7F4 00000000 */ nop /* 1890D8 8025A7F8 AE0206D0 */ sw $v0, 0x6D0($s0) /* 1890DC 8025A7FC 0040202D */ daddu $a0, $v0, $zero /* 1890E0 8025A800 A20006CD */ sb $zero, 0x6CD($s0) /* 1890E4 8025A804 8C830000 */ lw $v1, 0x0($a0) /* 1890E8 8025A808 2402FFFF */ addiu $v0, $zero, -0x1 D_8025A80C: /* 1890EC 8025A80C 5062000C */ beql $v1, $v0, .L8025A840 /* 1890F0 8025A810 2402000A */ addiu $v0, $zero, 0xA /* 1890F4 8025A814 0080182D */ daddu $v1, $a0, $zero /* 1890F8 8025A818 0040202D */ daddu $a0, $v0, $zero .L8025A81C: /* 1890FC 8025A81C 920206CD */ lbu $v0, 0x6CD($s0) /* 189100 8025A820 24420001 */ addiu $v0, $v0, 0x1 /* 189104 8025A824 A20206CD */ sb $v0, 0x6CD($s0) /* 189108 8025A828 00021600 */ sll $v0, $v0, 24 /* 18910C 8025A82C 00021583 */ sra $v0, $v0, 22 /* 189110 8025A830 00431021 */ addu $v0, $v0, $v1 /* 189114 8025A834 8C420000 */ lw $v0, 0x0($v0) /* 189118 8025A838 1444FFF8 */ bne $v0, $a0, .L8025A81C /* 18911C 8025A83C 2402000A */ addiu $v0, $zero, 0xA .L8025A840: /* 189120 8025A840 A20006C2 */ sb $zero, 0x6C2($s0) .L8025A844: /* 189124 8025A844 A60006C8 */ sh $zero, 0x6C8($s0) /* 189128 8025A848 A60206CA */ sh $v0, 0x6CA($s0) /* 18912C 8025A84C A20006C1 */ sb $zero, 0x6C1($s0) .L8025A850: /* 189130 8025A850 820206CD */ lb $v0, 0x6CD($s0) /* 189134 8025A854 1840002F */ blez $v0, .L8025A914 /* 189138 8025A858 0000382D */ daddu $a3, $zero, $zero .L8025A85C: /* 18913C 8025A85C 8E0206D0 */ lw $v0, 0x6D0($s0) /* 189140 8025A860 00071880 */ sll $v1, $a3, 2 /* 189144 8025A864 00621821 */ addu $v1, $v1, $v0 /* 189148 8025A868 00071140 */ sll $v0, $a3, 5 /* 18914C 8025A86C 8C660000 */ lw $a2, 0x0($v1) /* 189150 8025A870 10C00022 */ beqz $a2, .L8025A8FC /* 189154 8025A874 02025021 */ addu $t2, $s0, $v0 /* 189158 8025A878 0000482D */ daddu $t1, $zero, $zero .L8025A87C: /* 18915C 8025A87C 94C30000 */ lhu $v1, 0x0($a2) /* 189160 8025A880 90C20001 */ lbu $v0, 0x1($a2) /* 189164 8025A884 24C60002 */ addiu $a2, $a2, 0x2 /* 189168 8025A888 304B0001 */ andi $t3, $v0, 0x1 /* 18916C 8025A88C 000312C2 */ srl $v0, $v1, 11 /* 189170 8025A890 24450004 */ addiu $a1, $v0, 0x4 /* 189174 8025A894 00031182 */ srl $v0, $v1, 6 /* 189178 8025A898 3044001F */ andi $a0, $v0, 0x1F /* 18917C 8025A89C 00031842 */ srl $v1, $v1, 1 /* 189180 8025A8A0 2CA20020 */ sltiu $v0, $a1, 0x20 /* 189184 8025A8A4 14400002 */ bnez $v0, .L8025A8B0 /* 189188 8025A8A8 3068001F */ andi $t0, $v1, 0x1F /* 18918C 8025A8AC 2405001F */ addiu $a1, $zero, 0x1F .L8025A8B0: /* 189190 8025A8B0 24830004 */ addiu $v1, $a0, 0x4 /* 189194 8025A8B4 2C620020 */ sltiu $v0, $v1, 0x20 /* 189198 8025A8B8 50400001 */ beql $v0, $zero, .L8025A8C0 /* 18919C 8025A8BC 2403001F */ addiu $v1, $zero, 0x1F .L8025A8C0: /* 1891A0 8025A8C0 25040004 */ addiu $a0, $t0, 0x4 /* 1891A4 8025A8C4 2C820020 */ sltiu $v0, $a0, 0x20 /* 1891A8 8025A8C8 50400001 */ beql $v0, $zero, .L8025A8D0 /* 1891AC 8025A8CC 2404001F */ addiu $a0, $zero, 0x1F .L8025A8D0: /* 1891B0 8025A8D0 000512C0 */ sll $v0, $a1, 11 /* 1891B4 8025A8D4 00031980 */ sll $v1, $v1, 6 /* 1891B8 8025A8D8 00431025 */ or $v0, $v0, $v1 /* 1891BC 8025A8DC 00041840 */ sll $v1, $a0, 1 /* 1891C0 8025A8E0 00431025 */ or $v0, $v0, $v1 /* 1891C4 8025A8E4 01621025 */ or $v0, $t3, $v0 /* 1891C8 8025A8E8 A5420000 */ sh $v0, 0x0($t2) /* 1891CC 8025A8EC 25290001 */ addiu $t1, $t1, 0x1 /* 1891D0 8025A8F0 29220010 */ slti $v0, $t1, 0x10 /* 1891D4 8025A8F4 1440FFE1 */ bnez $v0, .L8025A87C /* 1891D8 8025A8F8 254A0002 */ addiu $t2, $t2, 0x2 .L8025A8FC: /* 1891DC 8025A8FC 820206CD */ lb $v0, 0x6CD($s0) /* 1891E0 8025A900 24E70001 */ addiu $a3, $a3, 0x1 /* 1891E4 8025A904 00E2102A */ slt $v0, $a3, $v0 /* 1891E8 8025A908 1440FFD4 */ bnez $v0, .L8025A85C /* 1891EC 8025A90C 00000000 */ nop /* 1891F0 8025A910 820206CD */ lb $v0, 0x6CD($s0) .L8025A914: /* 1891F4 8025A914 1840000A */ blez $v0, .L8025A940 /* 1891F8 8025A918 0000382D */ daddu $a3, $zero, $zero /* 1891FC 8025A91C 0200202D */ daddu $a0, $s0, $zero /* 189200 8025A920 0200182D */ daddu $v1, $s0, $zero .L8025A924: /* 189204 8025A924 AC6406D4 */ sw $a0, 0x6D4($v1) /* 189208 8025A928 24840020 */ addiu $a0, $a0, 0x20 /* 18920C 8025A92C 820206CD */ lb $v0, 0x6CD($s0) /* 189210 8025A930 24E70001 */ addiu $a3, $a3, 0x1 /* 189214 8025A934 00E2102A */ slt $v0, $a3, $v0 /* 189218 8025A938 1440FFFA */ bnez $v0, .L8025A924 /* 18921C 8025A93C 24630004 */ addiu $v1, $v1, 0x4 .L8025A940: /* 189220 8025A940 820306C2 */ lb $v1, 0x6C2($s0) /* 189224 8025A944 28620002 */ slti $v0, $v1, 0x2 /* 189228 8025A948 10400044 */ beqz $v0, .L8025AA5C /* 18922C 8025A94C 00000000 */ nop /* 189230 8025A950 04600042 */ bltz $v1, .L8025AA5C /* 189234 8025A954 00000000 */ nop /* 189238 8025A958 860206C8 */ lh $v0, 0x6C8($s0) /* 18923C 8025A95C 1C400010 */ bgtz $v0, .L8025A9A0 /* 189240 8025A960 240300FF */ addiu $v1, $zero, 0xFF /* 189244 8025A964 04420001 */ bltzl $v0, .L8025A96C /* 189248 8025A968 00021023 */ negu $v0, $v0 .L8025A96C: /* 18924C 8025A96C 00021040 */ sll $v0, $v0, 1 /* 189250 8025A970 3C018028 */ lui $at, %hi(D_802840DC) /* 189254 8025A974 00220821 */ addu $at, $at, $v0 /* 189258 8025A978 942240DC */ lhu $v0, %lo(D_802840DC)($at) /* 18925C 8025A97C A622006A */ sh $v0, 0x6A($s1) /* 189260 8025A980 00021400 */ sll $v0, $v0, 16 /* 189264 8025A984 00021403 */ sra $v0, $v0, 16 /* 189268 8025A988 14430005 */ bne $v0, $v1, .L8025A9A0 /* 18926C 8025A98C 2404003C */ addiu $a0, $zero, 0x3C /* 189270 8025A990 0C00A67F */ jal rand_int /* 189274 8025A994 A620006A */ sh $zero, 0x6A($s1) /* 189278 8025A998 2442001E */ addiu $v0, $v0, 0x1E /* 18927C 8025A99C A60206C8 */ sh $v0, 0x6C8($s0) .L8025A9A0: /* 189280 8025A9A0 16A00004 */ bnez $s5, .L8025A9B4 /* 189284 8025A9A4 00000000 */ nop /* 189288 8025A9A8 960206C8 */ lhu $v0, 0x6C8($s0) /* 18928C 8025A9AC 2442FFFF */ addiu $v0, $v0, -0x1 /* 189290 8025A9B0 A60206C8 */ sh $v0, 0x6C8($s0) .L8025A9B4: /* 189294 8025A9B4 860306CA */ lh $v1, 0x6CA($s0) /* 189298 8025A9B8 2402000C */ addiu $v0, $zero, 0xC /* 18929C 8025A9BC 1062000C */ beq $v1, $v0, .L8025A9F0 /* 1892A0 8025A9C0 2862000D */ slti $v0, $v1, 0xD /* 1892A4 8025A9C4 10400005 */ beqz $v0, .L8025A9DC /* 1892A8 8025A9C8 2402000A */ addiu $v0, $zero, 0xA /* 1892AC 8025A9CC 10620008 */ beq $v1, $v0, .L8025A9F0 /* 1892B0 8025A9D0 00000000 */ nop /* 1892B4 8025A9D4 08096A88 */ j .L8025AA20 /* 1892B8 8025A9D8 00000000 */ nop .L8025A9DC: /* 1892BC 8025A9DC 2402000D */ addiu $v0, $zero, 0xD /* 1892C0 8025A9E0 5062000F */ beql $v1, $v0, .L8025AA20 /* 1892C4 8025A9E4 A60006CA */ sh $zero, 0x6CA($s0) /* 1892C8 8025A9E8 08096A88 */ j .L8025AA20 /* 1892CC 8025A9EC 00000000 */ nop .L8025A9F0: /* 1892D0 8025A9F0 16800006 */ bnez $s4, .L8025AA0C /* 1892D4 8025A9F4 0220202D */ daddu $a0, $s1, $zero /* 1892D8 8025A9F8 0240282D */ daddu $a1, $s2, $zero /* 1892DC 8025A9FC 0C096657 */ jal func_8025995C /* 1892E0 8025AA00 0260302D */ daddu $a2, $s3, $zero /* 1892E4 8025AA04 08096A92 */ j .L8025AA48 /* 1892E8 8025AA08 00000000 */ nop .L8025AA0C: /* 1892EC 8025AA0C 0240282D */ daddu $a1, $s2, $zero /* 1892F0 8025AA10 0C0965B0 */ jal func_802596C0 /* 1892F4 8025AA14 0260302D */ daddu $a2, $s3, $zero /* 1892F8 8025AA18 08096A92 */ j .L8025AA48 /* 1892FC 8025AA1C 00000000 */ nop .L8025AA20: /* 189300 8025AA20 16800006 */ bnez $s4, .L8025AA3C /* 189304 8025AA24 0220202D */ daddu $a0, $s1, $zero /* 189308 8025AA28 0240282D */ daddu $a1, $s2, $zero /* 18930C 8025AA2C 0C0965EC */ jal func_802597B0 /* 189310 8025AA30 0260302D */ daddu $a2, $s3, $zero /* 189314 8025AA34 08096A92 */ j .L8025AA48 /* 189318 8025AA38 00000000 */ nop .L8025AA3C: /* 18931C 8025AA3C 0240282D */ daddu $a1, $s2, $zero /* 189320 8025AA40 0C096543 */ jal func_8025950C /* 189324 8025AA44 0260302D */ daddu $a2, $s3, $zero .L8025AA48: /* 189328 8025AA48 16A00004 */ bnez $s5, .L8025AA5C /* 18932C 8025AA4C 00000000 */ nop /* 189330 8025AA50 960206CA */ lhu $v0, 0x6CA($s0) /* 189334 8025AA54 24420001 */ addiu $v0, $v0, 0x1 /* 189338 8025AA58 A60206CA */ sh $v0, 0x6CA($s0) .L8025AA5C: /* 18933C 8025AA5C 8FBF0028 */ lw $ra, 0x28($sp) /* 189340 8025AA60 8FB50024 */ lw $s5, 0x24($sp) /* 189344 8025AA64 8FB40020 */ lw $s4, 0x20($sp) D_8025AA68: /* 189348 8025AA68 8FB3001C */ lw $s3, 0x1C($sp) /* 18934C 8025AA6C 8FB20018 */ lw $s2, 0x18($sp) /* 189350 8025AA70 8FB10014 */ lw $s1, 0x14($sp) /* 189354 8025AA74 8FB00010 */ lw $s0, 0x10($sp) D_8025AA78: /* 189358 8025AA78 03E00008 */ jr $ra /* 18935C 8025AA7C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void render_with_paralyze_palettes(b32 isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, b32 skipAnimation) { DecorationTable* decorationTable = part->decorationTable; PAL_PTR palIn; PAL_PTR palOut; s32 i, j; 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++; } } else { decorationTable->originalPalettesList = spr_get_npc_palettes(part->currentAnimation >> 16); decorationTable->originalPalettesCount = 0; while ((s32)decorationTable->originalPalettesList[decorationTable->originalPalettesCount] != -1) { decorationTable->originalPalettesCount++; } } decorationTable->palAnimState = 0; decorationTable->nextPalTime = 0; decorationTable->palBlendAlpha = 10; decorationTable->resetPalAdjust = FALSE; } 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++) { u8 r = UNPACK_PAL_R(*palIn); u8 g = UNPACK_PAL_G(*palIn); u8 b = UNPACK_PAL_B(*palIn); u8 a = UNPACK_PAL_A(*palIn); palIn++; r += 4; if (r > 31) { r = 31; } g += 4; if (g > 31) { g = 31; } b += 4; if (b > 31) { b = 31; } *palOut++ = PACK_PAL_RGBA(r, g, b, a); } } } for (i = 0; i < decorationTable->originalPalettesCount; i++) { decorationTable->adjustedPalettes[i] = decorationTable->copiedPalettes[0][i]; } switch (decorationTable->palAnimState) { case 0: case 1: if (decorationTable->nextPalTime <= 0) { part->palAnimPosOffset[1] = ParalyzePaletteAnimXOffsets[abs(decorationTable->nextPalTime)]; if (part->palAnimPosOffset[1] == PAL_ANIM_END) { part->palAnimPosOffset[1] = 0; decorationTable->nextPalTime = rand_int(60) + 30; } } if (!skipAnimation) { decorationTable->nextPalTime--; } switch (decorationTable->palBlendAlpha) { case 10: case 12: if (isNpcSprite == SPRITE_MODE_PLAYER) { func_8025995C(part, yaw, mtx); } else { func_802596C0(part, yaw, mtx); } break; case 13: decorationTable->palBlendAlpha = 0; // fallthrough default: if (isNpcSprite == SPRITE_MODE_PLAYER) { func_802597B0(part, yaw, mtx); } else { func_8025950C(part, yaw, mtx); } break; } if (!skipAnimation) { decorationTable->palBlendAlpha++; } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel stars_burst_appendGfx /* 354B58 E00423B8 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 354B5C E00423BC 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 354B60 E00423C0 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 354B64 E00423C4 3C0638E3 */ lui $a2, (0x38E38E39 >> 16) /* 354B68 E00423C8 34C68E39 */ ori $a2, $a2, (0x38E38E39 & 0xFFFF) /* 354B6C E00423CC 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 354B70 E00423D0 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 354B74 E00423D4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 354B78 E00423D8 AFBF00C4 */ sw $ra, 0xC4($sp) /* 354B7C E00423DC AFBE00C0 */ sw $fp, 0xC0($sp) /* 354B80 E00423E0 AFB700BC */ sw $s7, 0xBC($sp) /* 354B84 E00423E4 AFB600B8 */ sw $s6, 0xB8($sp) /* 354B88 E00423E8 AFB500B4 */ sw $s5, 0xB4($sp) /* 354B8C E00423EC AFB400B0 */ sw $s4, 0xB0($sp) /* 354B90 E00423F0 AFB300AC */ sw $s3, 0xAC($sp) /* 354B94 E00423F4 AFB200A8 */ sw $s2, 0xA8($sp) /* 354B98 E00423F8 AFB100A4 */ sw $s1, 0xA4($sp) /* 354B9C E00423FC AFB000A0 */ sw $s0, 0xA0($sp) /* 354BA0 E0042400 F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 354BA4 E0042404 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 354BA8 E0042408 AFA400D8 */ sw $a0, 0xD8($sp) /* 354BAC E004240C 8D040000 */ lw $a0, 0x0($t0) /* 354BB0 E0042410 8FA900D8 */ lw $t1, 0xD8($sp) /* 354BB4 E0042414 0080182D */ daddu $v1, $a0, $zero /* 354BB8 E0042418 8D27000C */ lw $a3, 0xC($t1) /* 354BBC E004241C 24840008 */ addiu $a0, $a0, 0x8 /* 354BC0 E0042420 AC620000 */ sw $v0, 0x0($v1) /* 354BC4 E0042424 AC600004 */ sw $zero, 0x4($v1) /* 354BC8 E0042428 AC850000 */ sw $a1, 0x0($a0) /* 354BCC E004242C 8D220010 */ lw $v0, 0x10($t1) /* 354BD0 E0042430 24150001 */ addiu $s5, $zero, 0x1 /* 354BD4 E0042434 AD040000 */ sw $a0, 0x0($t0) /* 354BD8 E0042438 8C43001C */ lw $v1, 0x1C($v0) /* 354BDC E004243C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 354BE0 E0042440 AC820008 */ sw $v0, 0x8($a0) /* 354BE4 E0042444 3C020900 */ lui $v0, %hi(D_090004C0_415520) /* 354BE8 E0042448 244204C0 */ addiu $v0, $v0, %lo(D_090004C0_415520) /* 354BEC E004244C AC82000C */ sw $v0, 0xC($a0) /* 354BF0 E0042450 3C028000 */ lui $v0, (0x80000000 >> 16) /* 354BF4 E0042454 00621821 */ addu $v1, $v1, $v0 /* 354BF8 E0042458 AC830004 */ sw $v1, 0x4($a0) /* 354BFC E004245C 24830008 */ addiu $v1, $a0, 0x8 /* 354C00 E0042460 8CE20034 */ lw $v0, 0x34($a3) /* 354C04 E0042464 24840010 */ addiu $a0, $a0, 0x10 /* 354C08 E0042468 AD030000 */ sw $v1, 0x0($t0) /* 354C0C E004246C 2442FFFF */ addiu $v0, $v0, -0x1 /* 354C10 E0042470 02A21804 */ sllv $v1, $v0, $s5 /* 354C14 E0042474 00629821 */ addu $s3, $v1, $v0 /* 354C18 E0042478 02660018 */ mult $s3, $a2 /* 354C1C E004247C AD040000 */ sw $a0, 0x0($t0) /* 354C20 E0042480 8CE9002C */ lw $t1, 0x2C($a3) /* 354C24 E0042484 001317C3 */ sra $v0, $s3, 31 /* 354C28 E0042488 AFA90098 */ sw $t1, 0x98($sp) /* 354C2C E004248C 00004810 */ mfhi $t1 /* 354C30 E0042490 000918C3 */ sra $v1, $t1, 3 /* 354C34 E0042494 00621823 */ subu $v1, $v1, $v0 /* 354C38 E0042498 000310C0 */ sll $v0, $v1, 3 /* 354C3C E004249C 00431021 */ addu $v0, $v0, $v1 /* 354C40 E00424A0 00021080 */ sll $v0, $v0, 2 /* 354C44 E00424A4 8FA900D8 */ lw $t1, 0xD8($sp) /* 354C48 E00424A8 02629823 */ subu $s3, $s3, $v0 /* 354C4C E00424AC 8D220008 */ lw $v0, 0x8($t1) /* 354C50 E00424B0 02A2102A */ slt $v0, $s5, $v0 /* 354C54 E00424B4 104000A1 */ beqz $v0, .LE004273C /* 354C58 E00424B8 24E70038 */ addiu $a3, $a3, 0x38 /* 354C5C E00424BC 0100A02D */ daddu $s4, $t0, $zero /* 354C60 E00424C0 3C1E38E3 */ lui $fp, (0x38E38E39 >> 16) /* 354C64 E00424C4 37DE8E39 */ ori $fp, $fp, (0x38E38E39 & 0xFFFF) /* 354C68 E00424C8 27B20058 */ addiu $s2, $sp, 0x58 /* 354C6C E00424CC 3C090001 */ lui $t1, (0x11630 >> 16) /* 354C70 E00424D0 35291630 */ ori $t1, $t1, (0x11630 & 0xFFFF) /* 354C74 E00424D4 24F00024 */ addiu $s0, $a3, 0x24 /* 354C78 E00424D8 24170005 */ addiu $s7, $zero, 0x5 /* 354C7C E00424DC 24160004 */ addiu $s6, $zero, 0x4 /* 354C80 E00424E0 4480B000 */ mtc1 $zero, $f22 /* 354C84 E00424E4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 354C88 E00424E8 4481A000 */ mtc1 $at, $f20 /* 354C8C E00424EC 26710003 */ addiu $s1, $s3, 0x3 /* 354C90 E00424F0 AFA9009C */ sw $t1, 0x9C($sp) .LE00424F4: /* 354C94 E00424F4 27A40018 */ addiu $a0, $sp, 0x18 /* 354C98 E00424F8 02773821 */ addu $a3, $s3, $s7 /* 354C9C E00424FC 26F70003 */ addiu $s7, $s7, 0x3 /* 354CA0 E0042500 02763021 */ addu $a2, $s3, $s6 /* 354CA4 E0042504 26D60003 */ addiu $s6, $s6, 0x3 /* 354CA8 E0042508 26B50001 */ addiu $s5, $s5, 0x1 /* 354CAC E004250C 8E820000 */ lw $v0, 0x0($s4) /* 354CB0 E0042510 023E0018 */ mult $s1, $fp /* 354CB4 E0042514 0040402D */ daddu $t0, $v0, $zero /* 354CB8 E0042518 24420008 */ addiu $v0, $v0, 0x8 /* 354CBC E004251C AE820000 */ sw $v0, 0x0($s4) /* 354CC0 E0042520 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 354CC4 E0042524 AD020000 */ sw $v0, 0x0($t0) /* 354CC8 E0042528 001117C3 */ sra $v0, $s1, 31 /* 354CCC E004252C 00004810 */ mfhi $t1 /* 354CD0 E0042530 000918C3 */ sra $v1, $t1, 3 /* 354CD4 E0042534 00621823 */ subu $v1, $v1, $v0 /* 354CD8 E0042538 000328C0 */ sll $a1, $v1, 3 /* 354CDC E004253C 00A32821 */ addu $a1, $a1, $v1 /* 354CE0 E0042540 00052880 */ sll $a1, $a1, 2 /* 354CE4 E0042544 02252823 */ subu $a1, $s1, $a1 /* 354CE8 E0042548 3C09E004 */ lui $t1, %hi(D_E0042780) /* 354CEC E004254C 25292780 */ addiu $t1, $t1, %lo(D_E0042780) /* 354CF0 E0042550 00DE0018 */ mult $a2, $fp /* 354CF4 E0042554 00A92821 */ addu $a1, $a1, $t1 /* 354CF8 E0042558 90A50000 */ lbu $a1, 0x0($a1) /* 354CFC E004255C 000617C3 */ sra $v0, $a2, 31 /* 354D00 E0042560 00052E00 */ sll $a1, $a1, 24 /* 354D04 E0042564 00004810 */ mfhi $t1 /* 354D08 E0042568 000918C3 */ sra $v1, $t1, 3 /* 354D0C E004256C 00621823 */ subu $v1, $v1, $v0 /* 354D10 E0042570 000310C0 */ sll $v0, $v1, 3 /* 354D14 E0042574 00431021 */ addu $v0, $v0, $v1 /* 354D18 E0042578 00021080 */ sll $v0, $v0, 2 /* 354D1C E004257C 00C23023 */ subu $a2, $a2, $v0 /* 354D20 E0042580 3C09E004 */ lui $t1, %hi(D_E0042780) /* 354D24 E0042584 25292780 */ addiu $t1, $t1, %lo(D_E0042780) /* 354D28 E0042588 00C93021 */ addu $a2, $a2, $t1 /* 354D2C E004258C 00FE0018 */ mult $a3, $fp /* 354D30 E0042590 90C60000 */ lbu $a2, 0x0($a2) /* 354D34 E0042594 000717C3 */ sra $v0, $a3, 31 /* 354D38 E0042598 00063400 */ sll $a2, $a2, 16 /* 354D3C E004259C 00A62825 */ or $a1, $a1, $a2 /* 354D40 E00425A0 00004810 */ mfhi $t1 /* 354D44 E00425A4 000918C3 */ sra $v1, $t1, 3 /* 354D48 E00425A8 00621823 */ subu $v1, $v1, $v0 /* 354D4C E00425AC 000310C0 */ sll $v0, $v1, 3 /* 354D50 E00425B0 00431021 */ addu $v0, $v0, $v1 /* 354D54 E00425B4 00021080 */ sll $v0, $v0, 2 /* 354D58 E00425B8 00E23823 */ subu $a3, $a3, $v0 /* 354D5C E00425BC 3C09E004 */ lui $t1, %hi(D_E0042780) /* 354D60 E00425C0 25292780 */ addiu $t1, $t1, %lo(D_E0042780) /* 354D64 E00425C4 00E93821 */ addu $a3, $a3, $t1 /* 354D68 E00425C8 90E20000 */ lbu $v0, 0x0($a3) /* 354D6C E00425CC 8FA90098 */ lw $t1, 0x98($sp) /* 354D70 E00425D0 00021200 */ sll $v0, $v0, 8 /* 354D74 E00425D4 00A22825 */ or $a1, $a1, $v0 /* 354D78 E00425D8 312200FF */ andi $v0, $t1, 0xFF /* 354D7C E00425DC 00A22825 */ or $a1, $a1, $v0 /* 354D80 E00425E0 AD050004 */ sw $a1, 0x4($t0) /* 354D84 E00425E4 8E05FFE0 */ lw $a1, -0x20($s0) /* 354D88 E00425E8 8E06FFE4 */ lw $a2, -0x1C($s0) /* 354D8C E00425EC 8E07FFE8 */ lw $a3, -0x18($s0) /* 354D90 E00425F0 0C080108 */ jal shim_guTranslateF /* 354D94 E00425F4 26310003 */ addiu $s1, $s1, 0x3 /* 354D98 E00425F8 3C09800B */ lui $t1, %hi(gCameras) /* 354D9C E00425FC 25291D80 */ addiu $t1, $t1, %lo(gCameras) /* 354DA0 E0042600 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 354DA4 E0042604 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 354DA8 E0042608 4406B000 */ mfc1 $a2, $f22 /* 354DAC E004260C 00031080 */ sll $v0, $v1, 2 /* 354DB0 E0042610 00431021 */ addu $v0, $v0, $v1 /* 354DB4 E0042614 00021080 */ sll $v0, $v0, 2 /* 354DB8 E0042618 00431023 */ subu $v0, $v0, $v1 /* 354DBC E004261C 000218C0 */ sll $v1, $v0, 3 /* 354DC0 E0042620 00431021 */ addu $v0, $v0, $v1 /* 354DC4 E0042624 000210C0 */ sll $v0, $v0, 3 /* 354DC8 E0042628 00491021 */ addu $v0, $v0, $t1 /* 354DCC E004262C C440006C */ lwc1 $f0, 0x6C($v0) /* 354DD0 E0042630 4407A000 */ mfc1 $a3, $f20 /* 354DD4 E0042634 46000007 */ neg.s $f0, $f0 /* 354DD8 E0042638 44050000 */ mfc1 $a1, $f0 /* 354DDC E004263C 0240202D */ daddu $a0, $s2, $zero /* 354DE0 E0042640 0C080104 */ jal shim_guRotateF /* 354DE4 E0042644 E7B60010 */ swc1 $f22, 0x10($sp) /* 354DE8 E0042648 0240202D */ daddu $a0, $s2, $zero /* 354DEC E004264C 27A50018 */ addiu $a1, $sp, 0x18 /* 354DF0 E0042650 0C080114 */ jal shim_guMtxCatF /* 354DF4 E0042654 00A0302D */ daddu $a2, $a1, $zero /* 354DF8 E0042658 0240202D */ daddu $a0, $s2, $zero /* 354DFC E004265C 8E050000 */ lw $a1, 0x0($s0) /* 354E00 E0042660 4407A000 */ mfc1 $a3, $f20 /* 354E04 E0042664 0C080110 */ jal shim_guScaleF /* 354E08 E0042668 00A0302D */ daddu $a2, $a1, $zero /* 354E0C E004266C 0240202D */ daddu $a0, $s2, $zero /* 354E10 E0042670 27A50018 */ addiu $a1, $sp, 0x18 /* 354E14 E0042674 0C080114 */ jal shim_guMtxCatF /* 354E18 E0042678 00A0302D */ daddu $a2, $a1, $zero /* 354E1C E004267C 27A40018 */ addiu $a0, $sp, 0x18 /* 354E20 E0042680 3C058007 */ lui $a1, %hi(gMatrixListPos) /* 354E24 E0042684 94A541F0 */ lhu $a1, %lo(gMatrixListPos)($a1) /* 354E28 E0042688 3C02800A */ lui $v0, %hi(gDisplayContext) /* 354E2C E004268C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0) /* 354E30 E0042690 8FA9009C */ lw $t1, 0x9C($sp) /* 354E34 E0042694 00052980 */ sll $a1, $a1, 6 /* 354E38 E0042698 00A92821 */ addu $a1, $a1, $t1 /* 354E3C E004269C 0C080118 */ jal shim_guMtxF2L /* 354E40 E00426A0 00452821 */ addu $a1, $v0, $a1 /* 354E44 E00426A4 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 354E48 E00426A8 8E840000 */ lw $a0, 0x0($s4) /* 354E4C E00426AC 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 354E50 E00426B0 0080282D */ daddu $a1, $a0, $zero /* 354E54 E00426B4 24840008 */ addiu $a0, $a0, 0x8 /* 354E58 E00426B8 AE840000 */ sw $a0, 0x0($s4) /* 354E5C E00426BC 3C028007 */ lui $v0, %hi(gMatrixListPos) /* 354E60 E00426C0 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0) /* 354E64 E00426C4 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 354E68 E00426C8 ACA30000 */ sw $v1, 0x0($a1) /* 354E6C E00426CC 8FA9009C */ lw $t1, 0x9C($sp) /* 354E70 E00426D0 24430001 */ addiu $v1, $v0, 0x1 /* 354E74 E00426D4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 354E78 E00426D8 00021180 */ sll $v0, $v0, 6 /* 354E7C E00426DC 3C018007 */ lui $at, %hi(gMatrixListPos) /* 354E80 E00426E0 A42341F0 */ sh $v1, %lo(gMatrixListPos)($at) /* 354E84 E00426E4 3C03800A */ lui $v1, %hi(gDisplayContext) /* 354E88 E00426E8 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) /* 354E8C E00426EC 00491021 */ addu $v0, $v0, $t1 /* 354E90 E00426F0 00621821 */ addu $v1, $v1, $v0 /* 354E94 E00426F4 24820008 */ addiu $v0, $a0, 0x8 /* 354E98 E00426F8 ACA30004 */ sw $v1, 0x4($a1) /* 354E9C E00426FC AE820000 */ sw $v0, 0x0($s4) /* 354EA0 E0042700 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 354EA4 E0042704 3C090900 */ lui $t1, %hi(D_090005E0_415640) /* 354EA8 E0042708 252905E0 */ addiu $t1, $t1, %lo(D_090005E0_415640) /* 354EAC E004270C AC820000 */ sw $v0, 0x0($a0) /* 354EB0 E0042710 24020040 */ addiu $v0, $zero, 0x40 /* 354EB4 E0042714 AC890004 */ sw $t1, 0x4($a0) /* 354EB8 E0042718 AC860008 */ sw $a2, 0x8($a0) /* 354EBC E004271C AC82000C */ sw $v0, 0xC($a0) /* 354EC0 E0042720 8FA900D8 */ lw $t1, 0xD8($sp) /* 354EC4 E0042724 26100038 */ addiu $s0, $s0, 0x38 /* 354EC8 E0042728 8D220008 */ lw $v0, 0x8($t1) /* 354ECC E004272C 24840010 */ addiu $a0, $a0, 0x10 /* 354ED0 E0042730 02A2102A */ slt $v0, $s5, $v0 /* 354ED4 E0042734 1440FF6F */ bnez $v0, .LE00424F4 /* 354ED8 E0042738 AE840000 */ sw $a0, 0x0($s4) .LE004273C: /* 354EDC E004273C 8FBF00C4 */ lw $ra, 0xC4($sp) /* 354EE0 E0042740 8FBE00C0 */ lw $fp, 0xC0($sp) /* 354EE4 E0042744 8FB700BC */ lw $s7, 0xBC($sp) /* 354EE8 E0042748 8FB600B8 */ lw $s6, 0xB8($sp) /* 354EEC E004274C 8FB500B4 */ lw $s5, 0xB4($sp) /* 354EF0 E0042750 8FB400B0 */ lw $s4, 0xB0($sp) /* 354EF4 E0042754 8FB300AC */ lw $s3, 0xAC($sp) /* 354EF8 E0042758 8FB200A8 */ lw $s2, 0xA8($sp) /* 354EFC E004275C 8FB100A4 */ lw $s1, 0xA4($sp) /* 354F00 E0042760 8FB000A0 */ lw $s0, 0xA0($sp) /* 354F04 E0042764 D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 354F08 E0042768 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 354F0C E004276C 03E00008 */ jr $ra /* 354F10 E0042770 27BD00D8 */ addiu $sp, $sp, 0xD8 /* 354F14 E0042774 00000000 */ nop /* 354F18 E0042778 00000000 */ nop /* 354F1C E004277C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void stars_burst_appendGfx(void* effect) { StarsBurstFXData* part = ((EffectInstance*)effect)->data.starsBurst; Gfx* dlist = D_090005E0_343620; s32 unk_2C; Matrix4f sp18; Matrix4f sp58; s32 baseIdx; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_090004C0_343500); unk_2C = part->unk_2C; baseIdx = (part->unk_34 - 1) * 3; baseIdx %= 36; part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { s32 rIdx = baseIdx + i * 3; s32 gIdx = baseIdx + 1 + i * 3; s32 bIdx = baseIdx + 2 + i * 3; gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0042780[rIdx % 36], D_E0042780[gIdx % 36], D_E0042780[bIdx % 36], unk_2C); 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_guScaleF(sp58, part->unk_24, part->unk_24, 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++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel b_area_dig_SetAbsoluteStatusOffsets /* 63D1E0 80218000 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 63D1E4 80218004 AFB20088 */ sw $s2, 0x88($sp) /* 63D1E8 80218008 0080902D */ daddu $s2, $a0, $zero /* 63D1EC 8021800C AFBF0098 */ sw $ra, 0x98($sp) /* 63D1F0 80218010 AFB50094 */ sw $s5, 0x94($sp) /* 63D1F4 80218014 AFB40090 */ sw $s4, 0x90($sp) /* 63D1F8 80218018 AFB3008C */ sw $s3, 0x8C($sp) /* 63D1FC 8021801C AFB10084 */ sw $s1, 0x84($sp) glabel dup_b_area_kpa4_SetAbsoluteStatusOffsets /* 63D200 80218020 AFB00080 */ sw $s0, 0x80($sp) /* 63D204 80218024 F7B800B0 */ sdc1 $f24, 0xB0($sp) /* 63D208 80218028 F7B600A8 */ sdc1 $f22, 0xA8($sp) .L8021802C: /* 63D20C 8021802C F7B400A0 */ sdc1 $f20, 0xA0($sp) .L80218030: /* 63D210 80218030 8E440148 */ lw $a0, 0x148($s2) /* 63D214 80218034 0C09A75B */ jal get_actor glabel func_80218038_557418 /* 63D218 80218038 00A0802D */ daddu $s0, $a1, $zero /* 63D21C 8021803C 0040202D */ daddu $a0, $v0, $zero .L80218040: /* 63D220 80218040 0C099117 */ jal get_actor_part /* 63D224 80218044 24050001 */ addiu $a1, $zero, 0x1 .L80218048: /* 63D228 80218048 1200000E */ beqz $s0, .L80218084 b_area_dgb_clubba_DefenseTable_8021804C: /* 63D22C 8021804C 0040A02D */ daddu $s4, $v0, $zero /* 63D230 80218050 0000282D */ daddu $a1, $zero, $zero .L80218054: /* 63D234 80218054 24060011 */ addiu $a2, $zero, 0x11 glabel b_area_pra2_crystal_king_CosInterpMinMax /* 63D238 80218058 240200FF */ addiu $v0, $zero, 0xFF glabel b_area_iwa_cleft_StartRumbleWithParams /* 63D23C 8021805C AE400074 */ sw $zero, 0x74($s2) /* 63D240 80218060 AE400078 */ sw $zero, 0x78($s2) .L80218064: /* 63D244 80218064 AE400070 */ sw $zero, 0x70($s2) .L80218068: /* 63D248 80218068 AFA00010 */ sw $zero, 0x10($sp) /* 63D24C 8021806C AFA00014 */ sw $zero, 0x14($sp) glabel func_80218070_557450 /* 63D250 80218070 AFA20018 */ sw $v0, 0x18($sp) /* 63D254 80218074 AFA0001C */ sw $zero, 0x1C($sp) /* 63D258 80218078 8E840084 */ lw $a0, 0x84($s4) /* 63D25C 8021807C 0C0B79E0 */ jal set_npc_imgfx_comp /* 63D260 80218080 24070014 */ addiu $a3, $zero, 0x14 .L80218084: /* 63D264 80218084 24050001 */ addiu $a1, $zero, 0x1 .L80218088: /* 63D268 80218088 240200FF */ addiu $v0, $zero, 0xFF .L8021808C: /* 63D26C 8021808C AFA20010 */ sw $v0, 0x10($sp) .L80218090: /* 63D270 80218090 AFA00014 */ sw $zero, 0x14($sp) .L80218094: /* 63D274 80218094 AFA20018 */ sw $v0, 0x18($sp) glabel dup_b_area_kpa2_UnfadeBackgroundToBlack /* 63D278 80218098 AFA0001C */ sw $zero, 0x1C($sp) /* 63D27C 8021809C 8E840084 */ lw $a0, 0x84($s4) /* 63D280 802180A0 3C078022 */ lui $a3, %hi(b_area_sam2_monstar_MonstarDetailTexture) /* 63D284 802180A4 24E7A2B8 */ addiu $a3, $a3, %lo(b_area_sam2_monstar_MonstarDetailTexture) /* 63D288 802180A8 0C0B79E0 */ jal set_npc_imgfx_comp /* 63D28C 802180AC 2406000F */ addiu $a2, $zero, 0xF .L802180B0: /* 63D290 802180B0 8E420074 */ lw $v0, 0x74($s2) glabel func_802180B4 /* 63D294 802180B4 2444000A */ addiu $a0, $v0, 0xA glabel b_area_kkj_SetEntityPositionF /* 63D298 802180B8 28820168 */ slti $v0, $a0, 0x168 /* 63D29C 802180BC 14400010 */ bnez $v0, func_80218100 glabel b_area_iwa_buzzar_StartRumbleWithParams /* 63D2A0 802180C0 AE440074 */ sw $a0, 0x74($s2) .L802180C4: /* 63D2A4 802180C4 3C02B60B */ lui $v0, (0xB60B60B7 >> 16) glabel b_area_trd_part_3_StartBlinkingSP /* 63D2A8 802180C8 344260B7 */ ori $v0, $v0, (0xB60B60B7 & 0xFFFF) glabel func_802180CC /* 63D2AC 802180CC 00820018 */ mult $a0, $v0 glabel b_area_dig_SpawnDrainHealthStartFX /* 63D2B0 802180D0 00041FC3 */ sra $v1, $a0, 31 /* 63D2B4 802180D4 00004010 */ mfhi $t0 /* 63D2B8 802180D8 01041021 */ addu $v0, $t0, $a0 .L802180DC: /* 63D2BC 802180DC 00021203 */ sra $v0, $v0, 8 /* 63D2C0 802180E0 00431023 */ subu $v0, $v0, $v1 .L802180E4: /* 63D2C4 802180E4 00021840 */ sll $v1, $v0, 1 glabel func_802180E8 /* 63D2C8 802180E8 00621821 */ addu $v1, $v1, $v0 glabel dup_p_area_kpa4_StartRumbleWithParams /* 63D2CC 802180EC 00031100 */ sll $v0, $v1, 4 glabel func_802180F0 /* 63D2D0 802180F0 00431023 */ subu $v0, $v0, $v1 .L802180F4: /* 63D2D4 802180F4 000210C0 */ sll $v0, $v0, 3 /* 63D2D8 802180F8 00821023 */ subu $v0, $a0, $v0 .L802180FC: /* 63D2DC 802180FC AE420074 */ sw $v0, 0x74($s2) glabel func_80218100 /* 63D2E0 80218100 0000802D */ daddu $s0, $zero, $zero b_area_dgb_clubba_ActorParts: /* 63D2E4 80218104 3C138000 */ lui $s3, (0x80000000 >> 16) glabel func_80218108 /* 63D2E8 80218108 0200882D */ daddu $s1, $s0, $zero /* 63D2EC 8021810C 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 63D2F0 80218110 4481C800 */ mtc1 $at, $f25 glabel b_area_flo2_CosInterpMinMax /* 63D2F4 80218114 4480C000 */ mtc1 $zero, $f24 glabel func_80218118 /* 63D2F8 80218118 3C01404C */ lui $at, (0x404C0000 >> 16) /* 63D2FC 8021811C 4481B800 */ mtc1 $at, $f23 glabel dup_b_area_kpa2_StartRumbleWithParams /* 63D300 80218120 4480B000 */ mtc1 $zero, $f22 /* 63D304 80218124 3C0141E0 */ lui $at, (0x41E00000 >> 16) glabel dup_b_area_tik_SetAbsoluteStatusOffsets /* 63D308 80218128 4481A800 */ mtc1 $at, $f21 glabel b_area_kzn2_SetVineBonePos /* 63D30C 8021812C 4480A000 */ mtc1 $zero, $f20 glabel func_80218130 /* 63D310 80218130 96440076 */ lhu $a0, 0x76($s2) .L80218134: /* 63D314 80218134 00912021 */ addu $a0, $a0, $s1 .L80218138: /* 63D318 80218138 00042400 */ sll $a0, $a0, 16 .L8021813C: /* 63D31C 8021813C 0C00A4F5 */ jal cosine /* 63D320 80218140 00042403 */ sra $a0, $a0, 16 /* 63D324 80218144 46000021 */ cvt.d.s $f0, $f0 glabel func_80218148 /* 63D328 80218148 46380000 */ add.d $f0, $f0, $f24 .L8021814C: /* 63D32C 8021814C 46360002 */ mul.d $f0, $f0, $f22 glabel b_area_kpa4_ShrinkActor /* 63D330 80218150 00000000 */ nop .L80218154: /* 63D334 80218154 27A20020 */ addiu $v0, $sp, 0x20 glabel b_area_trd_part_3_ClearPlayerMenuSelections /* 63D338 80218158 4620A03E */ c.le.d $f20, $f0 .L8021815C: /* 63D33C 8021815C 00000000 */ nop .L80218160: /* 63D340 80218160 45010005 */ bc1t dup3_b_area_kpa2_UnkFireBreathFXFunc .L80218164: /* 63D344 80218164 00501021 */ addu $v0, $v0, $s0 /* 63D348 80218168 4620008D */ trunc.w.d $f2, $f0 /* 63D34C 8021816C 44031000 */ mfc1 $v1, $f2 glabel func_80218170 /* 63D350 80218170 08086064 */ j .L80218190 .L80218174: /* 63D354 80218174 A0430000 */ sb $v1, 0x0($v0) glabel dup3_b_area_kpa2_UnkFireBreathFXFunc /* 63D358 80218178 46340001 */ sub.d $f0, $f0, $f20 glabel b_area_trd_part_2_fake_bowser_UnkFunc26 /* 63D35C 8021817C 4620008D */ trunc.w.d $f2, $f0 glabel b_area_kkj_GetEntityPosition /* 63D360 80218180 44031000 */ mfc1 $v1, $f2 glabel b_area_dig_SpawnDrainHealthContinueFX /* 63D364 80218184 00000000 */ nop .L80218188: /* 63D368 80218188 00731825 */ or $v1, $v1, $s3 glabel b_area_nok_goomba_CalculateRotationZ /* 63D36C 8021818C A0430000 */ sb $v1, 0x0($v0) .L80218190: /* 63D370 80218190 96440076 */ lhu $a0, 0x76($s2) /* 63D374 80218194 00912021 */ addu $a0, $a0, $s1 /* 63D378 80218198 2484002D */ addiu $a0, $a0, 0x2D glabel b_area_kpa_StartRumbleWithParams /* 63D37C 8021819C 00042400 */ sll $a0, $a0, 16 glabel b_area_jan_jungle_fuzzy_SpawnDrainHealthStartFX /* 63D380 802181A0 0C00A4F5 */ jal cosine .L802181A4: /* 63D384 802181A4 00042403 */ sra $a0, $a0, 16 .L802181A8: /* 63D388 802181A8 46000021 */ cvt.d.s $f0, $f0 b_area_dgb_clubba_handleEvent_802181AC: /* 63D38C 802181AC 46380000 */ add.d $f0, $f0, $f24 /* 63D390 802181B0 46360002 */ mul.d $f0, $f0, $f22 glabel b_area_trd_part_3_func_802181B4_4CF364 /* 63D394 802181B4 00000000 */ nop /* 63D398 802181B8 27A20038 */ addiu $v0, $sp, 0x38 /* 63D39C 802181BC 4620A03E */ c.le.d $f20, $f0 glabel b_area_iwa_iwa_02_IsSaveVar123 /* 63D3A0 802181C0 00000000 */ nop /* 63D3A4 802181C4 45010005 */ bc1t .L802181DC .L802181C8: /* 63D3A8 802181C8 00501021 */ addu $v0, $v0, $s0 .L802181CC: /* 63D3AC 802181CC 4620008D */ trunc.w.d $f2, $f0 /* 63D3B0 802181D0 44031000 */ mfc1 $v1, $f2 /* 63D3B4 802181D4 0808607D */ j func_802181F4 /* 63D3B8 802181D8 A0430000 */ sb $v1, 0x0($v0) .L802181DC: /* 63D3BC 802181DC 46340001 */ sub.d $f0, $f0, $f20 /* 63D3C0 802181E0 4620008D */ trunc.w.d $f2, $f0 glabel func_802181E4_69F3E4 /* 63D3C4 802181E4 44031000 */ mfc1 $v1, $f2 glabel GetActorPartOpacity /* 63D3C8 802181E8 00000000 */ nop .L802181EC: /* 63D3CC 802181EC 00731825 */ or $v1, $v1, $s3 glabel b_area_flo_CosInterpMinMax /* 63D3D0 802181F0 A0430000 */ sb $v1, 0x0($v0) glabel func_802181F4 /* 63D3D4 802181F4 96440076 */ lhu $a0, 0x76($s2) glabel b_area_trd_part_3_AddStarPower /* 63D3D8 802181F8 00912021 */ addu $a0, $a0, $s1 glabel b_area_kzn_putrid_piranha_UnkEffect6FFunc /* 63D3DC 802181FC 2484005A */ addiu $a0, $a0, 0x5A glabel b_area_kpa_ShrinkActor /* 63D3E0 80218200 00042400 */ sll $a0, $a0, 16 .L80218204: /* 63D3E4 80218204 0C00A4F5 */ jal cosine /* 63D3E8 80218208 00042403 */ sra $a0, $a0, 16 .L8021820C: /* 63D3EC 8021820C 46000021 */ cvt.d.s $f0, $f0 b_area_iwa_Formation_00: /* 63D3F0 80218210 46380000 */ add.d $f0, $f0, $f24 /* 63D3F4 80218214 46360002 */ mul.d $f0, $f0, $f22 .L80218218: /* 63D3F8 80218218 00000000 */ nop /* 63D3FC 8021821C 27A20050 */ addiu $v0, $sp, 0x50 glabel func_80218220_6DBFC0 /* 63D400 80218220 4620A03E */ c.le.d $f20, $f0 glabel func_80218224 /* 63D404 80218224 00000000 */ nop /* 63D408 80218228 45010005 */ bc1t dup_b_area_dig_SetAbsoluteStatusOffsets D_8021822C: /* 63D40C 8021822C 00501021 */ addu $v0, $v0, $s0 .L80218230: /* 63D410 80218230 4620008D */ trunc.w.d $f2, $f0 /* 63D414 80218234 44031000 */ mfc1 $v1, $f2 glabel func_80218238 /* 63D418 80218238 08086096 */ j func_80218258 glabel func_8021823C /* 63D41C 8021823C A0430000 */ sb $v1, 0x0($v0) glabel dup_b_area_dig_SetAbsoluteStatusOffsets /* 63D420 80218240 46340001 */ sub.d $f0, $f0, $f20 /* 63D424 80218244 4620008D */ trunc.w.d $f2, $f0 /* 63D428 80218248 44031000 */ mfc1 $v1, $f2 /* 63D42C 8021824C 00000000 */ nop glabel b_area_tik3_SpawnDrainHealthContinueFX /* 63D430 80218250 00731825 */ or $v1, $v1, $s3 glabel b_area_jan_jungle_fuzzy_SpawnDrainHealthContinueFX /* 63D434 80218254 A0430000 */ sb $v1, 0x0($v0) glabel func_80218258 /* 63D438 80218258 26100001 */ addiu $s0, $s0, 0x1 glabel b_area_isk_part_2_chain_chomp_ChompChainUpdate /* 63D43C 8021825C 2A020014 */ slti $v0, $s0, 0x14 .L80218260: /* 63D440 80218260 1440FFB3 */ bnez $v0, func_80218130 D_80218264: /* 63D444 80218264 26310019 */ addiu $s1, $s1, 0x19 /* 63D448 80218268 0000802D */ daddu $s0, $zero, $zero /* 63D44C 8021826C 27B30020 */ addiu $s3, $sp, 0x20 glabel func_80218270 /* 63D450 80218270 27B20038 */ addiu $s2, $sp, 0x38 /* 63D454 80218274 27B10050 */ addiu $s1, $sp, 0x50 glabel func_80218278 /* 63D458 80218278 241500FF */ addiu $s5, $zero, 0xFF /* 63D45C 8021827C 0000282D */ daddu $a1, $zero, $zero glabel func_80218280_6609D0 /* 63D460 80218280 2406000C */ addiu $a2, $zero, 0xC .L80218284: /* 63D464 80218284 02701021 */ addu $v0, $s3, $s0 /* 63D468 80218288 02501821 */ addu $v1, $s2, $s0 b_area_trd_part_3_eldstar_DefenseTable_8021828C: /* 63D46C 8021828C 02302021 */ addu $a0, $s1, $s0 .L80218290: /* 63D470 80218290 90420000 */ lbu $v0, 0x0($v0) .L80218294: /* 63D474 80218294 90630000 */ lbu $v1, 0x0($v1) b_area_trd_part_3_eldstar_StatusTable_80218298: /* 63D478 80218298 90840000 */ lbu $a0, 0x0($a0) /* 63D47C 8021829C 0200382D */ daddu $a3, $s0, $zero .L802182A0: /* 63D480 802182A0 AFA00014 */ sw $zero, 0x14($sp) glabel func_802182A4_5CE934 /* 63D484 802182A4 AFB50018 */ sw $s5, 0x18($sp) glabel b_area_kpa4_CosInterpMinMax /* 63D488 802182A8 AFA0001C */ sw $zero, 0x1C($sp) .L802182AC: /* 63D48C 802182AC 00021600 */ sll $v0, $v0, 24 .L802182B0: /* 63D490 802182B0 00031C00 */ sll $v1, $v1, 16 .L802182B4: /* 63D494 802182B4 00431025 */ or $v0, $v0, $v1 b_area_iwa_Formation_03: /* 63D498 802182B8 00042200 */ sll $a0, $a0, 8 /* 63D49C 802182BC 00441025 */ or $v0, $v0, $a0 .L802182C0: /* 63D4A0 802182C0 344200FF */ ori $v0, $v0, 0xFF /* 63D4A4 802182C4 AFA20010 */ sw $v0, 0x10($sp) .L802182C8: /* 63D4A8 802182C8 8E840084 */ lw $a0, 0x84($s4) /* 63D4AC 802182CC 0C0B79E0 */ jal set_npc_imgfx_comp .L802182D0: /* 63D4B0 802182D0 26100001 */ addiu $s0, $s0, 0x1 glabel b_area_hos_magikoopa_SetAbsoluteStatusOffsets /* 63D4B4 802182D4 2A020014 */ slti $v0, $s0, 0x14 glabel func_802182D8 /* 63D4B8 802182D8 1440FFE9 */ bnez $v0, func_80218280_6609D0 .L802182DC: /* 63D4BC 802182DC 0000282D */ daddu $a1, $zero, $zero glabel func_802182E0 /* 63D4C0 802182E0 8FBF0098 */ lw $ra, 0x98($sp) glabel func_802182E4_660A34 /* 63D4C4 802182E4 8FB50094 */ lw $s5, 0x94($sp) /* 63D4C8 802182E8 8FB40090 */ lw $s4, 0x90($sp) glabel b_area_tik2_FadeBackgroundToBlack /* 63D4CC 802182EC 8FB3008C */ lw $s3, 0x8C($sp) b_area_iwa_Formation_04: /* 63D4D0 802182F0 8FB20088 */ lw $s2, 0x88($sp) .L802182F4: /* 63D4D4 802182F4 8FB10084 */ lw $s1, 0x84($sp) /* 63D4D8 802182F8 8FB00080 */ lw $s0, 0x80($sp) .L802182FC: /* 63D4DC 802182FC D7B800B0 */ ldc1 $f24, 0xB0($sp) glabel b_area_pra_ShrinkActor /* 63D4E0 80218300 D7B600A8 */ ldc1 $f22, 0xA8($sp) /* 63D4E4 80218304 D7B400A0 */ ldc1 $f20, 0xA0($sp) glabel func_80218308 /* 63D4E8 80218308 0000102D */ daddu $v0, $zero, $zero glabel func_8021830C /* 63D4EC 8021830C 03E00008 */ jr $ra glabel dup2_b_area_dig_SetAbsoluteStatusOffsets /* 63D4F0 80218310 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(func_80218000_63D1E0) { ActorPart* part = get_actor_part(get_actor(script->owner1.actorID), 1); s32 i; u8 colR[20]; u8 colG[20]; u8 colB[20]; u8 colA[20]; if (isInitialCall) { script->functionTemp[1] = 0; script->functionTemp[2] = 0; script->functionTemp[0] = 0; set_npc_imgfx_comp(part->spriteInstanceID, 0, IMGFX_ALLOC_COLOR_BUF, 20, 0, 0, 255, 0); } set_npc_imgfx_comp(part->spriteInstanceID, 1, IMGFX_OVERLAY, (s32)&N(MonstarDetailTexture), 255, 0, 255, 0); script->functionTemp[1] += 10; if (script->functionTemp[1] >= 360) { script->functionTemp[1] %= 360; } for (i = 0; i < 20; i++) { colR[i] = (cosine(script->functionTemp[1] + i * 25) + 1.0) * 56.0; colG[i] = (cosine(script->functionTemp[1] + i * 25 + 45) + 1.0) * 56.0; colB[i] = (cosine(script->functionTemp[1] + i * 25 + 90) + 1.0) * 56.0; } for (i = 0; i < 20; i++) { set_npc_imgfx_comp(part->spriteInstanceID, 0, IMGFX_COLOR_BUF_SET_MODULATE, i, colR[i] << 0x18 | colG[i] << 0x10 | colB[i] << 8 | 255, 0, 255, 0); } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel parasol_get_npc /* E291A0 802B6000 27BDFFD0 */ addiu $sp, $sp, -0x30 /* E291A4 802B6004 AFB1001C */ sw $s1, 0x1C($sp) /* E291A8 802B6008 3C118011 */ lui $s1, %hi(gPlayerStatus) /* E291AC 802B600C 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* E291B0 802B6010 AFBF0020 */ sw $ra, 0x20($sp) /* E291B4 802B6014 AFB00018 */ sw $s0, 0x18($sp) .L802B6018: /* E291B8 802B6018 F7B40028 */ sdc1 $f20, 0x28($sp) /* E291BC 802B601C 8E250000 */ lw $a1, 0x0($s1) /* E291C0 802B6020 04A1000D */ bgez $a1, .L802B6058 /* E291C4 802B6024 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16) /* E291C8 802B6028 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF) /* E291CC 802B602C 3C04800A */ lui $a0, %hi(gOverrideFlags) /* E291D0 802B6030 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* E291D4 802B6034 8C830000 */ lw $v1, 0x0($a0) /* E291D8 802B6038 00A21024 */ and $v0, $a1, $v0 /* E291DC 802B603C AE220000 */ sw $v0, 0x0($s1) .L802B6040: /* E291E0 802B6040 A22000B6 */ sb $zero, 0xB6($s1) .L802B6044: /* E291E4 802B6044 34630040 */ ori $v1, $v1, 0x40 glabel action_hammer_play_hit_fx /* E291E8 802B6048 0C038045 */ jal disable_player_static_collisions .L802B604C: /* E291EC 802B604C AC830000 */ sw $v1, 0x0($a0) .L802B6050: /* E291F0 802B6050 0C03805E */ jal disable_player_input /* E291F4 802B6054 00000000 */ nop .L802B6058: /* E291F8 802B6058 822300B6 */ lb $v1, 0xB6($s1) /* E291FC 802B605C 2C620006 */ sltiu $v0, $v1, 0x6 glabel action_update_sliding /* E29200 802B6060 1040008D */ beqz $v0, .L802B6298 /* E29204 802B6064 00031080 */ sll $v0, $v1, 2 .L802B6068: /* E29208 802B6068 3C01802B */ lui $at, %hi(jtbl_802B62B0) /* E2920C 802B606C 00220821 */ addu $at, $at, $v0 /* E29210 802B6070 8C2262B0 */ lw $v0, %lo(jtbl_802B62B0)($at) .L802B6074: /* E29214 802B6074 00400008 */ jr $v0 /* E29218 802B6078 00000000 */ nop glabel .L802B607C /* E2921C 802B607C 3C040001 */ lui $a0, (0x1002E >> 16) .L802B6080: /* E29220 802B6080 0C037FBF */ jal suggest_player_anim_allow_backward /* E29224 802B6084 3484002E */ ori $a0, $a0, (0x1002E & 0xFFFF) /* E29228 802B6088 3C014180 */ lui $at, (0x41800000 >> 16) .L802B608C: /* E2922C 802B608C 44810000 */ mtc1 $at, $f0 .L802B6090: /* E29230 802B6090 3C013F80 */ lui $at, (0x3F800000 >> 16) .L802B6094: /* E29234 802B6094 44811000 */ mtc1 $at, $f2 /* E29238 802B6098 3C013FF0 */ lui $at, (0x3FF00000 >> 16) glabel action_update_state_23 /* E2923C 802B609C 44812000 */ mtc1 $at, $f4 /* E29240 802B60A0 24020020 */ addiu $v0, $zero, 0x20 glabel action_update_use_spinning_flower /* E29244 802B60A4 3C01802B */ lui $at, %hi(D_802B62E0) .L802B60A8: /* E29248 802B60A8 AC2262E0 */ sw $v0, %lo(D_802B62E0)($at) .L802B60AC: /* E2924C 802B60AC 3C01802B */ lui $at, %hi(Munchlesia_LaunchVelocity) /* E29250 802B60B0 E42062D0 */ swc1 $f0, %lo(Munchlesia_LaunchVelocity)($at) glabel action_update_jump /* E29254 802B60B4 3C014080 */ lui $at, (0x40800000 >> 16) /* E29258 802B60B8 44810000 */ mtc1 $at, $f0 /* E2925C 802B60BC 3C02802B */ lui $v0, %hi(Munchlesia_LateralVelocity) /* E29260 802B60C0 244262D4 */ addiu $v0, $v0, %lo(Munchlesia_LateralVelocity) /* E29264 802B60C4 E4400000 */ swc1 $f0, 0x0($v0) .L802B60C8: /* E29268 802B60C8 3C01802B */ lui $at, %hi(Munchlesia_LaunchAccel) /* E2926C 802B60CC E42262D8 */ swc1 $f2, %lo(Munchlesia_LaunchAccel)($at) glabel .L802B60D0 /* E29270 802B60D0 E4440000 */ swc1 $f4, 0x0($v0) .L802B60D4: /* E29274 802B60D4 922200B6 */ lbu $v0, 0xB6($s1) /* E29278 802B60D8 C6200080 */ lwc1 $f0, 0x80($s1) /* E2927C 802B60DC 24420001 */ addiu $v0, $v0, 0x1 /* E29280 802B60E0 A22200B6 */ sb $v0, 0xB6($s1) /* E29284 802B60E4 3C01802B */ lui $at, %hi(Munchlesia_LaunchYaw) .L802B60E8: /* E29288 802B60E8 E42062DC */ swc1 $f0, %lo(Munchlesia_LaunchYaw)($at) .L802B60EC: /* E2928C 802B60EC 080AD8A6 */ j .L802B6298 .L802B60F0: /* E29290 802B60F0 00000000 */ nop glabel .L802B60F4 /* E29294 802B60F4 26240028 */ addiu $a0, $s1, 0x28 /* E29298 802B60F8 3C10802B */ lui $s0, %hi(Munchlesia_LaunchVelocity) /* E2929C 802B60FC 261062D0 */ addiu $s0, $s0, %lo(Munchlesia_LaunchVelocity) .L802B6100: /* E292A0 802B6100 C622002C */ lwc1 $f2, 0x2C($s1) .L802B6104: /* E292A4 802B6104 C6000000 */ lwc1 $f0, 0x0($s0) .L802B6108: /* E292A8 802B6108 3C06802B */ lui $a2, %hi(Munchlesia_LateralVelocity) glabel .L802B610C /* E292AC 802B610C 8CC662D4 */ lw $a2, %lo(Munchlesia_LateralVelocity)($a2) .L802B6110: /* E292B0 802B6110 46001080 */ add.s $f2, $f2, $f0 /* E292B4 802B6114 3C01802B */ lui $at, %hi(Munchlesia_LaunchAccel) .L802B6118: /* E292B8 802B6118 C42462D8 */ lwc1 $f4, %lo(Munchlesia_LaunchAccel)($at) /* E292BC 802B611C 3C07802B */ lui $a3, %hi(Munchlesia_LaunchYaw) glabel action_update_parasol /* E292C0 802B6120 8CE762DC */ lw $a3, %lo(Munchlesia_LaunchYaw)($a3) .L802B6124: /* E292C4 802B6124 46040001 */ sub.s $f0, $f0, $f4 .L802B6128: /* E292C8 802B6128 26250030 */ addiu $a1, $s1, 0x30 /* E292CC 802B612C E622002C */ swc1 $f2, 0x2C($s1) /* E292D0 802B6130 0C00A7E7 */ jal add_vec2D_polar glabel .L802B6134 /* E292D4 802B6134 E6000000 */ swc1 $f0, 0x0($s0) /* E292D8 802B6138 3C02800B */ lui $v0, %hi(gCameras) .L802B613C: /* E292DC 802B613C 24421D80 */ addiu $v0, $v0, %lo(gCameras) .L802B6140: /* E292E0 802B6140 C6220028 */ lwc1 $f2, 0x28($s1) .L802B6144: /* E292E4 802B6144 C624002C */ lwc1 $f4, 0x2C($s1) /* E292E8 802B6148 C6080000 */ lwc1 $f8, 0x0($s0) .L802B614C: /* E292EC 802B614C 44800000 */ mtc1 $zero, $f0 .L802B6150: /* E292F0 802B6150 C6260030 */ lwc1 $f6, 0x30($s1) .L802B6154: /* E292F4 802B6154 4600403E */ c.le.s $f8, $f0 .L802B6158: /* E292F8 802B6158 E4420060 */ swc1 $f2, 0x60($v0) .L802B615C: /* E292FC 802B615C E4440064 */ swc1 $f4, 0x64($v0) /* E29300 802B6160 4500004D */ bc1f .L802B6298 .L802B6164: /* E29304 802B6164 E4460068 */ swc1 $f6, 0x68($v0) .L802B6168: /* E29308 802B6168 922200B6 */ lbu $v0, 0xB6($s1) /* E2930C 802B616C 080AD888 */ j .L802B6220 glabel .L802B6170 /* E29310 802B6170 24420001 */ addiu $v0, $v0, 0x1 glabel .L802B6174 /* E29314 802B6174 26240028 */ addiu $a0, $s1, 0x28 /* E29318 802B6178 3C10802B */ lui $s0, %hi(Munchlesia_LaunchVelocity) .L802B617C: /* E2931C 802B617C 261062D0 */ addiu $s0, $s0, %lo(Munchlesia_LaunchVelocity) .L802B6180: /* E29320 802B6180 C622002C */ lwc1 $f2, 0x2C($s1) glabel .L802B6184 /* E29324 802B6184 C6000000 */ lwc1 $f0, 0x0($s0) .L802B6188: /* E29328 802B6188 3C06802B */ lui $a2, %hi(Munchlesia_LateralVelocity) .L802B618C: /* E2932C 802B618C 8CC662D4 */ lw $a2, %lo(Munchlesia_LateralVelocity)($a2) .L802B6190: /* E29330 802B6190 46001080 */ add.s $f2, $f2, $f0 .L802B6194: /* E29334 802B6194 3C01802B */ lui $at, %hi(Munchlesia_LaunchAccel) glabel func_802B6198 /* E29338 802B6198 C42462D8 */ lwc1 $f4, %lo(Munchlesia_LaunchAccel)($at) /* E2933C 802B619C 3C07802B */ lui $a3, %hi(Munchlesia_LaunchYaw) .L802B61A0: /* E29340 802B61A0 8CE762DC */ lw $a3, %lo(Munchlesia_LaunchYaw)($a3) .L802B61A4: /* E29344 802B61A4 46040001 */ sub.s $f0, $f0, $f4 .L802B61A8: /* E29348 802B61A8 26250030 */ addiu $a1, $s1, 0x30 .L802B61AC: /* E2934C 802B61AC E622002C */ swc1 $f2, 0x2C($s1) .L802B61B0: /* E29350 802B61B0 0C00A7E7 */ jal add_vec2D_polar .L802B61B4: /* E29354 802B61B4 E6000000 */ swc1 $f0, 0x0($s0) /* E29358 802B61B8 27A50010 */ addiu $a1, $sp, 0x10 /* E2935C 802B61BC C6200028 */ lwc1 $f0, 0x28($s1) glabel func_802B61C0 /* E29360 802B61C0 C622002C */ lwc1 $f2, 0x2C($s1) /* E29364 802B61C4 C6240030 */ lwc1 $f4, 0x30($s1) .L802B61C8: /* E29368 802B61C8 C60C0000 */ lwc1 $f12, 0x0($s0) .L802B61CC: /* E2936C 802B61CC 3C02800B */ lui $v0, %hi(gCameras) /* E29370 802B61D0 24421D80 */ addiu $v0, $v0, %lo(gCameras) .L802B61D4: /* E29374 802B61D4 E4400060 */ swc1 $f0, 0x60($v0) .L802B61D8: /* E29378 802B61D8 E4420064 */ swc1 $f2, 0x64($v0) .L802B61DC: /* E2937C 802B61DC 0C038D45 */ jal player_check_collision_below /* E29380 802B61E0 E4440068 */ swc1 $f4, 0x68($v0) glabel func_802B61E4 /* E29384 802B61E4 8FA20010 */ lw $v0, 0x10($sp) .L802B61E8: /* E29388 802B61E8 0440002B */ bltz $v0, .L802B6298 .L802B61EC: /* E2938C 802B61EC 46000506 */ mov.s $f20, $f0 .L802B61F0: /* E29390 802B61F0 24040162 */ addiu $a0, $zero, 0x162 .L802B61F4: /* E29394 802B61F4 0C052736 */ jal sfx_play_sound_at_player .L802B61F8: /* E29398 802B61F8 0000282D */ daddu $a1, $zero, $zero .L802B61FC: /* E2939C 802B61FC 3C040008 */ lui $a0, (0x80003 >> 16) .L802B6200: /* E293A0 802B6200 0C037FDE */ jal suggest_player_anim_always_forward .L802B6204: /* E293A4 802B6204 34840003 */ ori $a0, $a0, (0x80003 & 0xFFFF) glabel .L802B6208 /* E293A8 802B6208 922200B6 */ lbu $v0, 0xB6($s1) /* E293AC 802B620C 2403000A */ addiu $v1, $zero, 0xA .L802B6210: /* E293B0 802B6210 E634002C */ swc1 $f20, 0x2C($s1) .L802B6214: /* E293B4 802B6214 3C01802B */ lui $at, %hi(D_802B62E0) glabel .L802B6218 /* E293B8 802B6218 AC2362E0 */ sw $v1, %lo(D_802B62E0)($at) /* E293BC 802B621C 24420001 */ addiu $v0, $v0, 0x1 .L802B6220: /* E293C0 802B6220 080AD8A6 */ j .L802B6298 .L802B6224: /* E293C4 802B6224 A22200B6 */ sb $v0, 0xB6($s1) glabel .L802B6228 /* E293C8 802B6228 962200BC */ lhu $v0, 0xBC($s1) .L802B622C: /* E293CC 802B622C 1040001A */ beqz $v0, .L802B6298 glabel action_update_step_up_peach /* E293D0 802B6230 3C040001 */ lui $a0, (0x10030 >> 16) /* E293D4 802B6234 0C037FDE */ jal suggest_player_anim_always_forward glabel .L802B6238 /* E293D8 802B6238 34840030 */ ori $a0, $a0, (0x10030 & 0xFFFF) glabel .L802B623C /* E293DC 802B623C 24020005 */ addiu $v0, $zero, 0x5 glabel .L802B6240 /* E293E0 802B6240 A22200B6 */ sb $v0, 0xB6($s1) glabel .L802B6244 /* E293E4 802B6244 2402000F */ addiu $v0, $zero, 0xF glabel .L802B6248 /* E293E8 802B6248 080AD8A6 */ j .L802B6298 /* E293EC 802B624C A6220008 */ sh $v0, 0x8($s1) glabel .L802B6250 /* E293F0 802B6250 86220008 */ lh $v0, 0x8($s1) .L802B6254: /* E293F4 802B6254 96230008 */ lhu $v1, 0x8($s1) glabel .L802B6258 /* E293F8 802B6258 10400003 */ beqz $v0, .L802B6268 .L802B625C: /* E293FC 802B625C 2462FFFF */ addiu $v0, $v1, -0x1 /* E29400 802B6260 080AD8A6 */ j .L802B6298 /* E29404 802B6264 A6220008 */ sh $v0, 0x8($s1) .L802B6268: /* E29408 802B6268 0C038050 */ jal enable_player_static_collisions .L802B626C: /* E2940C 802B626C 00000000 */ nop /* E29410 802B6270 0C038069 */ jal enable_player_input .L802B6274: /* E29414 802B6274 00000000 */ nop glabel .L802B6278 /* E29418 802B6278 0C039769 */ jal set_action_state /* E2941C 802B627C 0000202D */ daddu $a0, $zero, $zero .L802B6280: /* E29420 802B6280 3C02800A */ lui $v0, %hi(gOverrideFlags) .L802B6284: /* E29424 802B6284 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags) glabel action_update_run /* E29428 802B6288 8C430000 */ lw $v1, 0x0($v0) /* E2942C 802B628C 2404FFBF */ addiu $a0, $zero, -0x41 .L802B6290: /* E29430 802B6290 00641824 */ and $v1, $v1, $a0 glabel func_802B6294 /* E29434 802B6294 AC430000 */ sw $v1, 0x0($v0) glabel .L802B6298 /* E29438 802B6298 8FBF0020 */ lw $ra, 0x20($sp) /* E2943C 802B629C 8FB1001C */ lw $s1, 0x1C($sp) /* E29440 802B62A0 8FB00018 */ lw $s0, 0x18($sp) glabel func_802B62A4 /* E29444 802B62A4 D7B40028 */ ldc1 $f20, 0x28($sp) .L802B62A8: /* E29448 802B62A8 03E00008 */ jr $ra /* E2944C 802B62AC 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void action_update_use_munchlesia(void) { PlayerStatus* playerStatus = &gPlayerStatus; s32 colliderID; f32 hitPosY; if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED; playerStatus->actionSubstate = SUBSTATE_INIT; gOverrideFlags |= GLOBAL_OVERRIDES_40; disable_player_static_collisions(); disable_player_input(); } switch (playerStatus->actionSubstate) { case SUBSTATE_INIT: suggest_player_anim_allow_backward(ANIM_Mario1_FallBack); D_802B62E0 = 32; Munchlesia_LaunchVelocity = 16.0f; Munchlesia_LateralVelocity = 4.0f; Munchlesia_LaunchAccel = 1.0f; Munchlesia_LateralVelocity = 1.875f; playerStatus->actionSubstate++; // SUBSTATE_EJECT Munchlesia_LaunchYaw = playerStatus->targetYaw; break; case SUBSTATE_EJECT: playerStatus->position.y += Munchlesia_LaunchVelocity; Munchlesia_LaunchVelocity -= Munchlesia_LaunchAccel; add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, Munchlesia_LateralVelocity, Munchlesia_LaunchYaw); gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; if (Munchlesia_LaunchVelocity <= 0.0f) { playerStatus->actionSubstate++; // SUBSTATE_FALL } break; case SUBSTATE_FALL: playerStatus->position.y += Munchlesia_LaunchVelocity; Munchlesia_LaunchVelocity -= Munchlesia_LaunchAccel; add_vec2D_polar(&playerStatus->position.x, &playerStatus->position.z, Munchlesia_LateralVelocity, Munchlesia_LaunchYaw); gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; hitPosY = player_check_collision_below(Munchlesia_LaunchVelocity, &colliderID); if (colliderID >= 0) { sfx_play_sound_at_player(SOUND_162, SOUND_SPACE_MODE_0); suggest_player_anim_always_forward(ANIM_MarioW2_Collapse); playerStatus->position.y = hitPosY; D_802B62E0 = 10; playerStatus->actionSubstate++; // SUBSTATE_CRASH } break; case SUBSTATE_CRASH: if (playerStatus->animNotifyValue != 0) { suggest_player_anim_always_forward(ANIM_Mario1_GetUp); playerStatus->actionSubstate = SUBSTATE_GET_UP; playerStatus->currentStateTime = 15; break; } break; case SUBSTATE_GET_UP: if (playerStatus->currentStateTime != 0) { playerStatus->currentStateTime--; break; } enable_player_static_collisions(); enable_player_input(); set_action_state(ACTION_STATE_IDLE); gOverrideFlags &= ~GLOBAL_OVERRIDES_40; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E02000AC /* 325B7C E02000AC 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 325B80 E02000B0 3C068080 */ lui $a2, (0x808080FF >> 16) /* 325B84 E02000B4 34C680FF */ ori $a2, $a2, (0x808080FF & 0xFFFF) /* 325B88 E02000B8 AFB50034 */ sw $s5, 0x34($sp) /* 325B8C E02000BC 0000A82D */ daddu $s5, $zero, $zero /* 325B90 E02000C0 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 325B94 E02000C4 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 325B98 E02000C8 0040502D */ daddu $t2, $v0, $zero /* 325B9C E02000CC 3C0EF510 */ lui $t6, (0xF5102800 >> 16) /* 325BA0 E02000D0 35CE2800 */ ori $t6, $t6, (0xF5102800 & 0xFFFF) /* 325BA4 E02000D4 AFBE0040 */ sw $fp, 0x40($sp) /* 325BA8 E02000D8 3C1E0701 */ lui $fp, (0x7018070 >> 16) /* 325BAC E02000DC 37DE8070 */ ori $fp, $fp, (0x7018070 & 0xFFFF) /* 325BB0 E02000E0 AFB7003C */ sw $s7, 0x3C($sp) /* 325BB4 E02000E4 3C17E700 */ lui $s7, (0xE7000000 >> 16) /* 325BB8 E02000E8 00041080 */ sll $v0, $a0, 2 /* 325BBC E02000EC 30420FFF */ andi $v0, $v0, 0xFFF /* 325BC0 E02000F0 AFB3002C */ sw $s3, 0x2C($sp) /* 325BC4 E02000F4 00029B00 */ sll $s3, $v0, 12 /* 325BC8 E02000F8 2482004F */ addiu $v0, $a0, 0x4F /* 325BCC E02000FC 00021080 */ sll $v0, $v0, 2 /* 325BD0 E0200100 30420FFF */ andi $v0, $v0, 0xFFF /* 325BD4 E0200104 00021300 */ sll $v0, $v0, 12 /* 325BD8 E0200108 AFAE0000 */ sw $t6, 0x0($sp) /* 325BDC E020010C 3C0EFD10 */ lui $t6, (0xFD10013F >> 16) /* 325BE0 E0200110 35CE013F */ ori $t6, $t6, (0xFD10013F & 0xFFFF) /* 325BE4 E0200114 AFB60038 */ sw $s6, 0x38($sp) /* 325BE8 E0200118 24960050 */ addiu $s6, $a0, 0x50 /* 325BEC E020011C AFAE0008 */ sw $t6, 0x8($sp) /* 325BF0 E0200120 240E00A0 */ addiu $t6, $zero, 0xA0 /* 325BF4 E0200124 00042540 */ sll $a0, $a0, 21 /* 325BF8 E0200128 AFB20028 */ sw $s2, 0x28($sp) /* 325BFC E020012C 24120014 */ addiu $s2, $zero, 0x14 /* 325C00 E0200130 AFB10024 */ sw $s1, 0x24($sp) /* 325C04 E0200134 02A0882D */ daddu $s1, $s5, $zero /* 325C08 E0200138 AFB40030 */ sw $s4, 0x30($sp) /* 325C0C E020013C AFB00020 */ sw $s0, 0x20($sp) /* 325C10 E0200140 AFA20004 */ sw $v0, 0x4($sp) /* 325C14 E0200144 AFAE000C */ sw $t6, 0xC($sp) /* 325C18 E0200148 AFA40010 */ sw $a0, 0x10($sp) /* 325C1C E020014C 8D420000 */ lw $v0, 0x0($t2) /* 325C20 E0200150 00A0582D */ daddu $t3, $a1, $zero /* 325C24 E0200154 0040182D */ daddu $v1, $v0, $zero /* 325C28 E0200158 24420008 */ addiu $v0, $v0, 0x8 /* 325C2C E020015C AD420000 */ sw $v0, 0x0($t2) /* 325C30 E0200160 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 325C34 E0200164 AC620000 */ sw $v0, 0x0($v1) /* 325C38 E0200168 AC660004 */ sw $a2, 0x4($v1) .LE020016C: /* 325C3C E020016C 3C07FD10 */ lui $a3, (0xFD10004F >> 16) /* 325C40 E0200170 34E7004F */ ori $a3, $a3, (0xFD10004F & 0xFFFF) /* 325C44 E0200174 3C080713 */ lui $t0, (0x713C000 >> 16) /* 325C48 E0200178 3508C000 */ ori $t0, $t0, (0x713C000 & 0xFFFF) /* 325C4C E020017C 3C090001 */ lui $t1, (0x18070 >> 16) /* 325C50 E0200180 35298070 */ ori $t1, $t1, (0x18070 & 0xFFFF) /* 325C54 E0200184 3C03F510 */ lui $v1, (0xF5100100 >> 16) /* 325C58 E0200188 34630100 */ ori $v1, $v1, (0xF5100100 & 0xFFFF) /* 325C5C E020018C 000B3080 */ sll $a2, $t3, 2 /* 325C60 E0200190 30C60FFF */ andi $a2, $a2, 0xFFF /* 325C64 E0200194 25650005 */ addiu $a1, $t3, 0x5 /* 325C68 E0200198 00052880 */ sll $a1, $a1, 2 /* 325C6C E020019C 30A50FFF */ andi $a1, $a1, 0xFFF /* 325C70 E02001A0 8FAE000C */ lw $t6, 0xC($sp) /* 325C74 E02001A4 02667825 */ or $t7, $s3, $a2 /* 325C78 E02001A8 000E1180 */ sll $v0, $t6, 6 /* 325C7C E02001AC 00436825 */ or $t5, $v0, $v1 /* 325C80 E02001B0 3C0EF400 */ lui $t6, (0xF4000000 >> 16) /* 325C84 E02001B4 00CE1025 */ or $v0, $a2, $t6 /* 325C88 E02001B8 0262A025 */ or $s4, $s3, $v0 /* 325C8C E02001BC 26C3FFFF */ addiu $v1, $s6, -0x1 /* 325C90 E02001C0 00031880 */ sll $v1, $v1, 2 /* 325C94 E02001C4 30630FFF */ andi $v1, $v1, 0xFFF /* 325C98 E02001C8 00031B00 */ sll $v1, $v1, 12 /* 325C9C E02001CC 3C020700 */ lui $v0, (0x7000000 >> 16) /* 325CA0 E02001D0 00A21025 */ or $v0, $a1, $v0 /* 325CA4 E02001D4 00628025 */ or $s0, $v1, $v0 /* 325CA8 E02001D8 00161080 */ sll $v0, $s6, 2 /* 325CAC E02001DC 30420FFF */ andi $v0, $v0, 0xFFF /* 325CB0 E02001E0 0002CB00 */ sll $t9, $v0, 12 /* 325CB4 E02001E4 25620006 */ addiu $v0, $t3, 0x6 /* 325CB8 E02001E8 00021080 */ sll $v0, $v0, 2 /* 325CBC E02001EC 30580FFF */ andi $t8, $v0, 0xFFF /* 325CC0 E02001F0 8D430000 */ lw $v1, 0x0($t2) /* 325CC4 E02001F4 3C0E800A */ lui $t6, %hi(nuGfxCfb_ptr) /* 325CC8 E02001F8 8DCEA64C */ lw $t6, %lo(nuGfxCfb_ptr)($t6) /* 325CCC E02001FC 0060102D */ daddu $v0, $v1, $zero /* 325CD0 E0200200 01C0202D */ daddu $a0, $t6, $zero /* 325CD4 E0200204 24630008 */ addiu $v1, $v1, 0x8 /* 325CD8 E0200208 AFAE0018 */ sw $t6, 0x18($sp) /* 325CDC E020020C AD430000 */ sw $v1, 0x0($t2) /* 325CE0 E0200210 AC470000 */ sw $a3, 0x0($v0) /* 325CE4 E0200214 AC440004 */ sw $a0, 0x4($v0) /* 325CE8 E0200218 24620008 */ addiu $v0, $v1, 0x8 /* 325CEC E020021C AD420000 */ sw $v0, 0x0($t2) /* 325CF0 E0200220 8FAE0000 */ lw $t6, 0x0($sp) /* 325CF4 E0200224 24620010 */ addiu $v0, $v1, 0x10 /* 325CF8 E0200228 AC7E0004 */ sw $fp, 0x4($v1) /* 325CFC E020022C AC6E0000 */ sw $t6, 0x0($v1) /* 325D00 E0200230 3C0EE600 */ lui $t6, (0xE6000000 >> 16) /* 325D04 E0200234 AD420000 */ sw $v0, 0x0($t2) /* 325D08 E0200238 24620018 */ addiu $v0, $v1, 0x18 /* 325D0C E020023C AC6E0008 */ sw $t6, 0x8($v1) /* 325D10 E0200240 AC60000C */ sw $zero, 0xC($v1) /* 325D14 E0200244 AD420000 */ sw $v0, 0x0($t2) /* 325D18 E0200248 32220FFF */ andi $v0, $s1, 0xFFF /* 325D1C E020024C 3C0EF400 */ lui $t6, (0xF4000000 >> 16) /* 325D20 E0200250 004E1025 */ or $v0, $v0, $t6 /* 325D24 E0200254 AC620010 */ sw $v0, 0x10($v1) /* 325D28 E0200258 32420FFF */ andi $v0, $s2, 0xFFF /* 325D2C E020025C 00481025 */ or $v0, $v0, $t0 /* 325D30 E0200260 AC620014 */ sw $v0, 0x14($v1) /* 325D34 E0200264 24620020 */ addiu $v0, $v1, 0x20 /* 325D38 E0200268 AD420000 */ sw $v0, 0x0($t2) /* 325D3C E020026C 24620028 */ addiu $v0, $v1, 0x28 /* 325D40 E0200270 AC770018 */ sw $s7, 0x18($v1) /* 325D44 E0200274 AC60001C */ sw $zero, 0x1C($v1) /* 325D48 E0200278 AD420000 */ sw $v0, 0x0($t2) /* 325D4C E020027C 8FAE0000 */ lw $t6, 0x0($sp) /* 325D50 E0200280 24620030 */ addiu $v0, $v1, 0x30 /* 325D54 E0200284 AC690024 */ sw $t1, 0x24($v1) /* 325D58 E0200288 AC6E0020 */ sw $t6, 0x20($v1) /* 325D5C E020028C AD420000 */ sw $v0, 0x0($t2) /* 325D60 E0200290 3C02F200 */ lui $v0, (0xF2000000 >> 16) /* 325D64 E0200294 00C23025 */ or $a2, $a2, $v0 /* 325D68 E0200298 02663025 */ or $a2, $s3, $a2 /* 325D6C E020029C AC660028 */ sw $a2, 0x28($v1) /* 325D70 E02002A0 8FAE0004 */ lw $t6, 0x4($sp) /* 325D74 E02002A4 0000602D */ daddu $t4, $zero, $zero /* 325D78 E02002A8 01C51025 */ or $v0, $t6, $a1 /* 325D7C E02002AC AC62002C */ sw $v0, 0x2C($v1) /* 325D80 E02002B0 24620038 */ addiu $v0, $v1, 0x38 /* 325D84 E02002B4 AD420000 */ sw $v0, 0x0($t2) /* 325D88 E02002B8 3C020100 */ lui $v0, (0x1000000 >> 16) /* 325D8C E02002BC 00A22825 */ or $a1, $a1, $v0 /* 325D90 E02002C0 01C52825 */ or $a1, $t6, $a1 /* 325D94 E02002C4 AC660030 */ sw $a2, 0x30($v1) /* 325D98 E02002C8 AC650034 */ sw $a1, 0x34($v1) .LE02002CC: /* 325D9C E02002CC 3C040101 */ lui $a0, (0x1018070 >> 16) /* 325DA0 E02002D0 34848070 */ ori $a0, $a0, (0x1018070 & 0xFFFF) /* 325DA4 E02002D4 8D430000 */ lw $v1, 0x0($t2) /* 325DA8 E02002D8 3C050400 */ lui $a1, (0x4000400 >> 16) /* 325DAC E02002DC 0060102D */ daddu $v0, $v1, $zero /* 325DB0 E02002E0 24630008 */ addiu $v1, $v1, 0x8 /* 325DB4 E02002E4 AD430000 */ sw $v1, 0x0($t2) /* 325DB8 E02002E8 8FAE0008 */ lw $t6, 0x8($sp) /* 325DBC E02002EC 34A50400 */ ori $a1, $a1, (0x4000400 & 0xFFFF) /* 325DC0 E02002F0 AC4E0000 */ sw $t6, 0x0($v0) /* 325DC4 E02002F4 8FAE0018 */ lw $t6, 0x18($sp) /* 325DC8 E02002F8 258C0001 */ addiu $t4, $t4, 0x1 /* 325DCC E02002FC AC4E0004 */ sw $t6, 0x4($v0) /* 325DD0 E0200300 24620008 */ addiu $v0, $v1, 0x8 /* 325DD4 E0200304 AD420000 */ sw $v0, 0x0($t2) /* 325DD8 E0200308 24620010 */ addiu $v0, $v1, 0x10 /* 325DDC E020030C 3C0EE600 */ lui $t6, (0xE6000000 >> 16) /* 325DE0 E0200310 AC6D0000 */ sw $t5, 0x0($v1) /* 325DE4 E0200314 AC7E0004 */ sw $fp, 0x4($v1) /* 325DE8 E0200318 AD420000 */ sw $v0, 0x0($t2) /* 325DEC E020031C 24620018 */ addiu $v0, $v1, 0x18 /* 325DF0 E0200320 AC6E0008 */ sw $t6, 0x8($v1) /* 325DF4 E0200324 AC60000C */ sw $zero, 0xC($v1) /* 325DF8 E0200328 AD420000 */ sw $v0, 0x0($t2) /* 325DFC E020032C 24620020 */ addiu $v0, $v1, 0x20 /* 325E00 E0200330 AC740010 */ sw $s4, 0x10($v1) /* 325E04 E0200334 AC700014 */ sw $s0, 0x14($v1) /* 325E08 E0200338 AD420000 */ sw $v0, 0x0($t2) /* 325E0C E020033C 24620028 */ addiu $v0, $v1, 0x28 /* 325E10 E0200340 AC770018 */ sw $s7, 0x18($v1) /* 325E14 E0200344 AC60001C */ sw $zero, 0x1C($v1) /* 325E18 E0200348 AD420000 */ sw $v0, 0x0($t2) /* 325E1C E020034C 24620030 */ addiu $v0, $v1, 0x30 /* 325E20 E0200350 AC6D0020 */ sw $t5, 0x20($v1) /* 325E24 E0200354 AC640024 */ sw $a0, 0x24($v1) /* 325E28 E0200358 AD420000 */ sw $v0, 0x0($t2) /* 325E2C E020035C 3C02E400 */ lui $v0, (0xE4000000 >> 16) /* 325E30 E0200360 03021025 */ or $v0, $t8, $v0 /* 325E34 E0200364 03221025 */ or $v0, $t9, $v0 /* 325E38 E0200368 AC620028 */ sw $v0, 0x28($v1) /* 325E3C E020036C 24620038 */ addiu $v0, $v1, 0x38 /* 325E40 E0200370 AC6F002C */ sw $t7, 0x2C($v1) /* 325E44 E0200374 AD420000 */ sw $v0, 0x0($t2) /* 325E48 E0200378 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 325E4C E020037C AC620030 */ sw $v0, 0x30($v1) /* 325E50 E0200380 000B1140 */ sll $v0, $t3, 5 /* 325E54 E0200384 8FAE0010 */ lw $t6, 0x10($sp) /* 325E58 E0200388 3042FFFF */ andi $v0, $v0, 0xFFFF /* 325E5C E020038C 01C21025 */ or $v0, $t6, $v0 /* 325E60 E0200390 AC620034 */ sw $v0, 0x34($v1) /* 325E64 E0200394 24620040 */ addiu $v0, $v1, 0x40 /* 325E68 E0200398 AD420000 */ sw $v0, 0x0($t2) /* 325E6C E020039C 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* 325E70 E02003A0 AC620038 */ sw $v0, 0x38($v1) /* 325E74 E02003A4 1980FFC9 */ blez $t4, .LE02002CC /* 325E78 E02003A8 AC65003C */ sw $a1, 0x3C($v1) /* 325E7C E02003AC 26520018 */ addiu $s2, $s2, 0x18 /* 325E80 E02003B0 26310018 */ addiu $s1, $s1, 0x18 /* 325E84 E02003B4 256B0006 */ addiu $t3, $t3, 0x6 /* 325E88 E02003B8 8D420000 */ lw $v0, 0x0($t2) /* 325E8C E02003BC 26B50001 */ addiu $s5, $s5, 0x1 /* 325E90 E02003C0 0040182D */ daddu $v1, $v0, $zero /* 325E94 E02003C4 24420008 */ addiu $v0, $v0, 0x8 /* 325E98 E02003C8 AD420000 */ sw $v0, 0x0($t2) /* 325E9C E02003CC 2AA2000A */ slti $v0, $s5, 0xA /* 325EA0 E02003D0 AC770000 */ sw $s7, 0x0($v1) /* 325EA4 E02003D4 1440FF65 */ bnez $v0, .LE020016C /* 325EA8 E02003D8 AC600004 */ sw $zero, 0x4($v1) /* 325EAC E02003DC 8FBE0040 */ lw $fp, 0x40($sp) /* 325EB0 E02003E0 8FB7003C */ lw $s7, 0x3C($sp) /* 325EB4 E02003E4 8FB60038 */ lw $s6, 0x38($sp) /* 325EB8 E02003E8 8FB50034 */ lw $s5, 0x34($sp) /* 325EBC E02003EC 8FB40030 */ lw $s4, 0x30($sp) /* 325EC0 E02003F0 8FB3002C */ lw $s3, 0x2C($sp) /* 325EC4 E02003F4 8FB20028 */ lw $s2, 0x28($sp) /* 325EC8 E02003F8 8FB10024 */ lw $s1, 0x24($sp) /* 325ECC E02003FC 8FB00020 */ lw $s0, 0x20($sp) /* 325ED0 E0200400 03E00008 */ jr $ra /* 325ED4 E0200404 27BD0048 */ addiu $sp, $sp, 0x48 /* 325ED8 E0200408 00000000 */ nop /* 325EDC E020040C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E02000AC(s32 arg0, s32 arg1) { s32 i; s32 j; s32 width; s32 x; s32 new_var; s32 var_t3; s32 s2 = 20; s32 s1 = 0; gDPSetPrimColor(gMainGfxPos++, 0, 0, 128, 128, 128, 255); width = 80; for (i = 0; i < 10; i++, s1 = i * 24, s2 = i * 24 + 20) { x = arg0; new_var = x + width; var_t3 = i * 6; gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, nuGfxCfb_ptr); gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 20, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, 6, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 7, G_TX_NOLOD); gDPLoadSync(gMainGfxPos++); gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, s1, 0x013C, s2); gDPPipeSync(gMainGfxPos++); gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 20, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, 6, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 7, G_TX_NOLOD); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, arg0 << G_TEXTURE_IMAGE_FRAC, (arg1 + var_t3) << G_TEXTURE_IMAGE_FRAC, (arg0 + 79) << G_TEXTURE_IMAGE_FRAC, ((arg1 + var_t3) + 5) << G_TEXTURE_IMAGE_FRAC); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE + 1, arg0 << G_TEXTURE_IMAGE_FRAC, (arg1 + var_t3) << G_TEXTURE_IMAGE_FRAC, (arg0 + 79) << G_TEXTURE_IMAGE_FRAC, ((arg1 + var_t3) + 5) << G_TEXTURE_IMAGE_FRAC); for (j = 0; j < 1; j++) { gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, nuGfxCfb_ptr); gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, ((((((x + width) - 1) - x) + 1) * G_IM_SIZ_16b_TILE_BYTES) + 7) >> 3, 0x100, G_TX_LOADTILE, 0, G_TX_WRAP, 6, G_TX_NOLOD, G_TX_WRAP, 7, G_TX_NOLOD); gDPLoadSync(gMainGfxPos++); gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, x << G_TEXTURE_IMAGE_FRAC, (arg1 + var_t3) << G_TEXTURE_IMAGE_FRAC, ((new_var) - 1) << G_TEXTURE_IMAGE_FRAC, ((arg1 + var_t3) + 5) << G_TEXTURE_IMAGE_FRAC); gDPPipeSync(gMainGfxPos++); gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, ((((((x + width) - 1) - x) + 1) * G_IM_SIZ_16b_TILE_BYTES) + 7) >> 3, 0x100, G_TX_RENDERTILE + 1, 0, G_TX_WRAP, 6, G_TX_NOLOD, G_TX_WRAP, 7, G_TX_NOLOD); gSPTextureRectangle(gMainGfxPos++, x * 4, (arg1 + var_t3) * 4, (x + width) * 4, ((arg1 + var_t3) + 6) * 4, 0, x * 32, (arg1 + (i * 6)) * 32, 0x400, 0x400); } gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel gather_magic_appendGfx /* 38F340 E008E4E0 27BDFEF8 */ addiu $sp, $sp, -0x108 /* 38F344 E008E4E4 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 38F348 E008E4E8 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 38F34C E008E4EC AFA40108 */ sw $a0, 0x108($sp) /* 38F350 E008E4F0 27A40018 */ addiu $a0, $sp, 0x18 /* 38F354 E008E4F4 AFB100DC */ sw $s1, 0xDC($sp) /* 38F358 E008E4F8 3C110001 */ lui $s1, (0x11630 >> 16) /* 38F35C E008E4FC 36311630 */ ori $s1, $s1, (0x11630 & 0xFFFF) /* 38F360 E008E500 AFB400E8 */ sw $s4, 0xE8($sp) /* 38F364 E008E504 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 38F368 E008E508 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 38F36C E008E50C 8FA90108 */ lw $t1, 0x108($sp) /* 38F370 E008E510 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 38F374 E008E514 AFBF00FC */ sw $ra, 0xFC($sp) /* 38F378 E008E518 AFBE00F8 */ sw $fp, 0xF8($sp) /* 38F37C E008E51C AFB700F4 */ sw $s7, 0xF4($sp) /* 38F380 E008E520 AFB600F0 */ sw $s6, 0xF0($sp) /* 38F384 E008E524 AFB500EC */ sw $s5, 0xEC($sp) /* 38F388 E008E528 AFB300E4 */ sw $s3, 0xE4($sp) /* 38F38C E008E52C AFB200E0 */ sw $s2, 0xE0($sp) /* 38F390 E008E530 AFB000D8 */ sw $s0, 0xD8($sp) /* 38F394 E008E534 F7B40100 */ sdc1 $f20, 0x100($sp) /* 38F398 E008E538 8E880000 */ lw $t0, 0x0($s4) /* 38F39C E008E53C 8D32000C */ lw $s2, 0xC($t1) /* 38F3A0 E008E540 0100182D */ daddu $v1, $t0, $zero /* 38F3A4 E008E544 8E550030 */ lw $s5, 0x30($s2) /* 38F3A8 E008E548 8E570034 */ lw $s7, 0x34($s2) /* 38F3AC E008E54C 8E5E0038 */ lw $fp, 0x38($s2) /* 38F3B0 E008E550 25080008 */ addiu $t0, $t0, 0x8 /* 38F3B4 E008E554 AC620000 */ sw $v0, 0x0($v1) /* 38F3B8 E008E558 AC600004 */ sw $zero, 0x4($v1) /* 38F3BC E008E55C AD050000 */ sw $a1, 0x0($t0) /* 38F3C0 E008E560 8D220010 */ lw $v0, 0x10($t1) /* 38F3C4 E008E564 24130001 */ addiu $s3, $zero, 0x1 /* 38F3C8 E008E568 AE880000 */ sw $t0, 0x0($s4) /* 38F3CC E008E56C 8C42001C */ lw $v0, 0x1C($v0) /* 38F3D0 E008E570 3C038000 */ lui $v1, (0x80000000 >> 16) /* 38F3D4 E008E574 00431021 */ addu $v0, $v0, $v1 /* 38F3D8 E008E578 AD020004 */ sw $v0, 0x4($t0) /* 38F3DC E008E57C 8E450008 */ lw $a1, 0x8($s2) /* 38F3E0 E008E580 8E46000C */ lw $a2, 0xC($s2) /* 38F3E4 E008E584 8E470010 */ lw $a3, 0x10($s2) /* 38F3E8 E008E588 25080008 */ addiu $t0, $t0, 0x8 /* 38F3EC E008E58C 0C080108 */ jal shim_guTranslateF /* 38F3F0 E008E590 AE880000 */ sw $t0, 0x0($s4) /* 38F3F4 E008E594 27B00098 */ addiu $s0, $sp, 0x98 /* 38F3F8 E008E598 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 38F3FC E008E59C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 38F400 E008E5A0 44800000 */ mtc1 $zero, $f0 /* 38F404 E008E5A4 00031080 */ sll $v0, $v1, 2 /* 38F408 E008E5A8 00431021 */ addu $v0, $v0, $v1 /* 38F40C E008E5AC 00021080 */ sll $v0, $v0, 2 /* 38F410 E008E5B0 00431023 */ subu $v0, $v0, $v1 /* 38F414 E008E5B4 000218C0 */ sll $v1, $v0, 3 /* 38F418 E008E5B8 00431021 */ addu $v0, $v0, $v1 /* 38F41C E008E5BC 000210C0 */ sll $v0, $v0, 3 /* 38F420 E008E5C0 44060000 */ mfc1 $a2, $f0 /* 38F424 E008E5C4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 38F428 E008E5C8 00220821 */ addu $at, $at, $v0 /* 38F42C E008E5CC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 38F430 E008E5D0 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 38F434 E008E5D4 46000007 */ neg.s $f0, $f0 /* 38F438 E008E5D8 44050000 */ mfc1 $a1, $f0 /* 38F43C E008E5DC 0200202D */ daddu $a0, $s0, $zero /* 38F440 E008E5E0 0C080104 */ jal shim_guRotateF /* 38F444 E008E5E4 AFA60010 */ sw $a2, 0x10($sp) /* 38F448 E008E5E8 0200202D */ daddu $a0, $s0, $zero /* 38F44C E008E5EC 27A50018 */ addiu $a1, $sp, 0x18 /* 38F450 E008E5F0 0C080114 */ jal shim_guMtxCatF /* 38F454 E008E5F4 00A0302D */ daddu $a2, $a1, $zero /* 38F458 E008E5F8 27A40018 */ addiu $a0, $sp, 0x18 /* 38F45C E008E5FC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 38F460 E008E600 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 38F464 E008E604 3C16800A */ lui $s6, %hi(gDisplayContext) /* 38F468 E008E608 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 38F46C E008E60C 96050000 */ lhu $a1, 0x0($s0) /* 38F470 E008E610 8EC20000 */ lw $v0, 0x0($s6) /* 38F474 E008E614 00052980 */ sll $a1, $a1, 6 /* 38F478 E008E618 00B12821 */ addu $a1, $a1, $s1 /* 38F47C E008E61C 0C080118 */ jal shim_guMtxF2L /* 38F480 E008E620 00452821 */ addu $a1, $v0, $a1 /* 38F484 E008E624 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 38F488 E008E628 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 38F48C E008E62C 8E850000 */ lw $a1, 0x0($s4) /* 38F490 E008E630 96020000 */ lhu $v0, 0x0($s0) /* 38F494 E008E634 00A0202D */ daddu $a0, $a1, $zero /* 38F498 E008E638 24A50008 */ addiu $a1, $a1, 0x8 /* 38F49C E008E63C AE850000 */ sw $a1, 0x0($s4) /* 38F4A0 E008E640 AC830000 */ sw $v1, 0x0($a0) /* 38F4A4 E008E644 00531821 */ addu $v1, $v0, $s3 /* 38F4A8 E008E648 3042FFFF */ andi $v0, $v0, 0xFFFF /* 38F4AC E008E64C 00021180 */ sll $v0, $v0, 6 /* 38F4B0 E008E650 A6030000 */ sh $v1, 0x0($s0) /* 38F4B4 E008E654 8EC30000 */ lw $v1, 0x0($s6) /* 38F4B8 E008E658 00511021 */ addu $v0, $v0, $s1 /* 38F4BC E008E65C 00621821 */ addu $v1, $v1, $v0 /* 38F4C0 E008E660 24A20008 */ addiu $v0, $a1, 0x8 /* 38F4C4 E008E664 AC830004 */ sw $v1, 0x4($a0) /* 38F4C8 E008E668 AE820000 */ sw $v0, 0x0($s4) /* 38F4CC E008E66C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 38F4D0 E008E670 ACA20000 */ sw $v0, 0x0($a1) /* 38F4D4 E008E674 3C020900 */ lui $v0, %hi(D_09000080_4150E0) /* 38F4D8 E008E678 24420080 */ addiu $v0, $v0, %lo(D_09000080_4150E0) /* 38F4DC E008E67C ACA20004 */ sw $v0, 0x4($a1) /* 38F4E0 E008E680 24A20010 */ addiu $v0, $a1, 0x10 /* 38F4E4 E008E684 AE820000 */ sw $v0, 0x0($s4) /* 38F4E8 E008E688 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 38F4EC E008E68C ACA20008 */ sw $v0, 0x8($a1) /* 38F4F0 E008E690 9242003F */ lbu $v0, 0x3F($s2) /* 38F4F4 E008E694 92440043 */ lbu $a0, 0x43($s2) /* 38F4F8 E008E698 92430047 */ lbu $v1, 0x47($s2) /* 38F4FC E008E69C 00021600 */ sll $v0, $v0, 24 /* 38F500 E008E6A0 00042400 */ sll $a0, $a0, 16 /* 38F504 E008E6A4 00441025 */ or $v0, $v0, $a0 /* 38F508 E008E6A8 00031A00 */ sll $v1, $v1, 8 /* 38F50C E008E6AC 00431025 */ or $v0, $v0, $v1 /* 38F510 E008E6B0 ACA2000C */ sw $v0, 0xC($a1) /* 38F514 E008E6B4 8FA90108 */ lw $t1, 0x108($sp) /* 38F518 E008E6B8 8D220008 */ lw $v0, 0x8($t1) /* 38F51C E008E6BC 0262102A */ slt $v0, $s3, $v0 /* 38F520 E008E6C0 1040005A */ beqz $v0, .LE008E82C /* 38F524 E008E6C4 26520048 */ addiu $s2, $s2, 0x48 /* 38F528 E008E6C8 0280882D */ daddu $s1, $s4, $zero /* 38F52C E008E6CC 00151600 */ sll $v0, $s5, 24 /* 38F530 E008E6D0 32E300FF */ andi $v1, $s7, 0xFF /* 38F534 E008E6D4 00031C00 */ sll $v1, $v1, 16 /* 38F538 E008E6D8 00431025 */ or $v0, $v0, $v1 /* 38F53C E008E6DC 33C300FF */ andi $v1, $fp, 0xFF /* 38F540 E008E6E0 00031A00 */ sll $v1, $v1, 8 /* 38F544 E008E6E4 0043F025 */ or $fp, $v0, $v1 /* 38F548 E008E6E8 27B50058 */ addiu $s5, $sp, 0x58 /* 38F54C E008E6EC 02C0B82D */ daddu $s7, $s6, $zero /* 38F550 E008E6F0 0200B02D */ daddu $s6, $s0, $zero /* 38F554 E008E6F4 3C140001 */ lui $s4, (0x11630 >> 16) /* 38F558 E008E6F8 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 38F55C E008E6FC 26500010 */ addiu $s0, $s2, 0x10 .LE008E700: /* 38F560 E008E700 C6140018 */ lwc1 $f20, 0x18($s0) /* 38F564 E008E704 44800000 */ mtc1 $zero, $f0 /* 38F568 E008E708 00000000 */ nop /* 38F56C E008E70C 4600A032 */ c.eq.s $f20, $f0 /* 38F570 E008E710 00000000 */ nop /* 38F574 E008E714 4501003F */ bc1t .LE008E814 /* 38F578 E008E718 00000000 */ nop /* 38F57C E008E71C 8E220000 */ lw $v0, 0x0($s1) /* 38F580 E008E720 0040182D */ daddu $v1, $v0, $zero /* 38F584 E008E724 24420008 */ addiu $v0, $v0, 0x8 /* 38F588 E008E728 AE220000 */ sw $v0, 0x0($s1) /* 38F58C E008E72C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 38F590 E008E730 AC620000 */ sw $v0, 0x0($v1) /* 38F594 E008E734 92020007 */ lbu $v0, 0x7($s0) /* 38F598 E008E738 03C21025 */ or $v0, $fp, $v0 /* 38F59C E008E73C AC620004 */ sw $v0, 0x4($v1) /* 38F5A0 E008E740 8E05FFF8 */ lw $a1, -0x8($s0) /* 38F5A4 E008E744 8E06FFFC */ lw $a2, -0x4($s0) /* 38F5A8 E008E748 8E070000 */ lw $a3, 0x0($s0) /* 38F5AC E008E74C 0C080108 */ jal shim_guTranslateF /* 38F5B0 E008E750 27A40018 */ addiu $a0, $sp, 0x18 /* 38F5B4 E008E754 4405A000 */ mfc1 $a1, $f20 /* 38F5B8 E008E758 02A0202D */ daddu $a0, $s5, $zero /* 38F5BC E008E75C 00A0302D */ daddu $a2, $a1, $zero /* 38F5C0 E008E760 0C080110 */ jal shim_guScaleF /* 38F5C4 E008E764 00A0382D */ daddu $a3, $a1, $zero /* 38F5C8 E008E768 02A0202D */ daddu $a0, $s5, $zero /* 38F5CC E008E76C 27A50018 */ addiu $a1, $sp, 0x18 /* 38F5D0 E008E770 0C080114 */ jal shim_guMtxCatF /* 38F5D4 E008E774 00A0302D */ daddu $a2, $a1, $zero /* 38F5D8 E008E778 27A40018 */ addiu $a0, $sp, 0x18 /* 38F5DC E008E77C 96C50000 */ lhu $a1, 0x0($s6) /* 38F5E0 E008E780 8EE20000 */ lw $v0, 0x0($s7) /* 38F5E4 E008E784 00052980 */ sll $a1, $a1, 6 /* 38F5E8 E008E788 00B42821 */ addu $a1, $a1, $s4 /* 38F5EC E008E78C 0C080118 */ jal shim_guMtxF2L /* 38F5F0 E008E790 00452821 */ addu $a1, $v0, $a1 /* 38F5F4 E008E794 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 38F5F8 E008E798 8E240000 */ lw $a0, 0x0($s1) /* 38F5FC E008E79C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 38F600 E008E7A0 0080282D */ daddu $a1, $a0, $zero /* 38F604 E008E7A4 24840008 */ addiu $a0, $a0, 0x8 /* 38F608 E008E7A8 AE240000 */ sw $a0, 0x0($s1) /* 38F60C E008E7AC 96C20000 */ lhu $v0, 0x0($s6) /* 38F610 E008E7B0 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 38F614 E008E7B4 ACA30000 */ sw $v1, 0x0($a1) /* 38F618 E008E7B8 24430001 */ addiu $v1, $v0, 0x1 /* 38F61C E008E7BC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 38F620 E008E7C0 00021180 */ sll $v0, $v0, 6 /* 38F624 E008E7C4 A6C30000 */ sh $v1, 0x0($s6) /* 38F628 E008E7C8 8EE30000 */ lw $v1, 0x0($s7) /* 38F62C E008E7CC 00541021 */ addu $v0, $v0, $s4 /* 38F630 E008E7D0 00621821 */ addu $v1, $v1, $v0 /* 38F634 E008E7D4 24820008 */ addiu $v0, $a0, 0x8 /* 38F638 E008E7D8 ACA30004 */ sw $v1, 0x4($a1) /* 38F63C E008E7DC AE220000 */ sw $v0, 0x0($s1) /* 38F640 E008E7E0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 38F644 E008E7E4 AC820000 */ sw $v0, 0x0($a0) /* 38F648 E008E7E8 32620001 */ andi $v0, $s3, 0x1 /* 38F64C E008E7EC 00021080 */ sll $v0, $v0, 2 /* 38F650 E008E7F0 3C03E009 */ lui $v1, (0xE0090000 >> 16) /* 38F654 E008E7F4 00621821 */ addu $v1, $v1, $v0 /* 38F658 E008E7F8 8C63E890 */ lw $v1, -0x1770($v1) /* 38F65C E008E7FC 24820010 */ addiu $v0, $a0, 0x10 /* 38F660 E008E800 AE220000 */ sw $v0, 0x0($s1) /* 38F664 E008E804 24020040 */ addiu $v0, $zero, 0x40 /* 38F668 E008E808 AC860008 */ sw $a2, 0x8($a0) /* 38F66C E008E80C AC82000C */ sw $v0, 0xC($a0) /* 38F670 E008E810 AC830004 */ sw $v1, 0x4($a0) .LE008E814: /* 38F674 E008E814 8FA90108 */ lw $t1, 0x108($sp) /* 38F678 E008E818 26730001 */ addiu $s3, $s3, 0x1 /* 38F67C E008E81C 8D220008 */ lw $v0, 0x8($t1) /* 38F680 E008E820 0262102A */ slt $v0, $s3, $v0 /* 38F684 E008E824 1440FFB6 */ bnez $v0, .LE008E700 /* 38F688 E008E828 26100048 */ addiu $s0, $s0, 0x48 .LE008E82C: /* 38F68C E008E82C 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 38F690 E008E830 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 38F694 E008E834 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 38F698 E008E838 8C620000 */ lw $v0, 0x0($v1) /* 38F69C E008E83C 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 38F6A0 E008E840 0040202D */ daddu $a0, $v0, $zero /* 38F6A4 E008E844 24420008 */ addiu $v0, $v0, 0x8 /* 38F6A8 E008E848 AC620000 */ sw $v0, 0x0($v1) /* 38F6AC E008E84C 24020040 */ addiu $v0, $zero, 0x40 /* 38F6B0 E008E850 AC850000 */ sw $a1, 0x0($a0) /* 38F6B4 E008E854 AC820004 */ sw $v0, 0x4($a0) /* 38F6B8 E008E858 8FBF00FC */ lw $ra, 0xFC($sp) /* 38F6BC E008E85C 8FBE00F8 */ lw $fp, 0xF8($sp) /* 38F6C0 E008E860 8FB700F4 */ lw $s7, 0xF4($sp) /* 38F6C4 E008E864 8FB600F0 */ lw $s6, 0xF0($sp) /* 38F6C8 E008E868 8FB500EC */ lw $s5, 0xEC($sp) /* 38F6CC E008E86C 8FB400E8 */ lw $s4, 0xE8($sp) /* 38F6D0 E008E870 8FB300E4 */ lw $s3, 0xE4($sp) /* 38F6D4 E008E874 8FB200E0 */ lw $s2, 0xE0($sp) /* 38F6D8 E008E878 8FB100DC */ lw $s1, 0xDC($sp) /* 38F6DC E008E87C 8FB000D8 */ lw $s0, 0xD8($sp) /* 38F6E0 E008E880 D7B40100 */ ldc1 $f20, 0x100($sp) /* 38F6E4 E008E884 03E00008 */ jr $ra /* 38F6E8 E008E888 27BD0108 */ addiu $sp, $sp, 0x108 /* 38F6EC E008E88C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void gather_magic_appendGfx(void* effect) { GatherMagicFXData* part = ((EffectInstance*)effect)->data.gatherMagic; s32 unk_30 = part->unk_30; s32 unk_34 = part->unk_34; s32 unk_38 = part->unk_38; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10); shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); 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); gSPDisplayList(gMainGfxPos++, D_09000080_38F790); gDPSetEnvColor(gMainGfxPos++, part->unk_3C, part->unk_40, part->unk_44, 0); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { f32 scale = part->unk_28; if (scale != 0.0f) { gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_30, unk_34, unk_38, part->unk_14); shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10); shim_guScaleF(sp58, scale, scale, scale); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E008E890[i & 1]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel water_splash_main /* 3BBF60 E00BE000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 3BBF64 E00BE004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 3BBF68 E00BE008 4485A000 */ mtc1 $a1, $f20 /* 3BBF6C E00BE00C F7B60048 */ sdc1 $f22, 0x48($sp) /* 3BBF70 E00BE010 4486B000 */ mtc1 $a2, $f22 /* 3BBF74 E00BE014 F7B80050 */ sdc1 $f24, 0x50($sp) /* 3BBF78 E00BE018 4487C000 */ mtc1 $a3, $f24 /* 3BBF7C E00BE01C AFB20030 */ sw $s2, 0x30($sp) /* 3BBF80 E00BE020 0080902D */ daddu $s2, $a0, $zero /* 3BBF84 E00BE024 AFB1002C */ sw $s1, 0x2C($sp) /* 3BBF88 E00BE028 8FB1006C */ lw $s1, 0x6C($sp) /* 3BBF8C E00BE02C 27A40010 */ addiu $a0, $sp, 0x10 /* 3BBF90 E00BE030 AFBF003C */ sw $ra, 0x3C($sp) /* 3BBF94 E00BE034 AFB40038 */ sw $s4, 0x38($sp) /* 3BBF98 E00BE038 AFB30034 */ sw $s3, 0x34($sp) /* 3BBF9C E00BE03C 06400009 */ bltz $s2, .LE00BE064 /* 3BBFA0 E00BE040 AFB00028 */ sw $s0, 0x28($sp) /* 3BBFA4 E00BE044 2A420002 */ slti $v0, $s2, 0x2 /* 3BBFA8 E00BE048 14400007 */ bnez $v0, .LE00BE068 /* 3BBFAC E00BE04C 24100015 */ addiu $s0, $zero, 0x15 /* 3BBFB0 E00BE050 24020002 */ addiu $v0, $zero, 0x2 /* 3BBFB4 E00BE054 16420004 */ bne $s2, $v0, .LE00BE068 /* 3BBFB8 E00BE058 2410000B */ addiu $s0, $zero, 0xB /* 3BBFBC E00BE05C 0802F81A */ j .LE00BE068 /* 3BBFC0 E00BE060 24100029 */ addiu $s0, $zero, 0x29 .LE00BE064: /* 3BBFC4 E00BE064 2410000B */ addiu $s0, $zero, 0xB .LE00BE068: /* 3BBFC8 E00BE068 3C02E00C */ lui $v0, %hi(water_splash_init) /* 3BBFCC E00BE06C 2442E39C */ addiu $v0, $v0, %lo(water_splash_init) /* 3BBFD0 E00BE070 AC820008 */ sw $v0, 0x8($a0) /* 3BBFD4 E00BE074 3C02E00C */ lui $v0, %hi(water_splash_update) /* 3BBFD8 E00BE078 2442E3A4 */ addiu $v0, $v0, %lo(water_splash_update) /* 3BBFDC E00BE07C AC82000C */ sw $v0, 0xC($a0) /* 3BBFE0 E00BE080 3C02E00C */ lui $v0, %hi(water_splash_render) /* 3BBFE4 E00BE084 2442E578 */ addiu $v0, $v0, %lo(water_splash_render) /* 3BBFE8 E00BE088 AC820010 */ sw $v0, 0x10($a0) /* 3BBFEC E00BE08C 2402005F */ addiu $v0, $zero, 0x5F /* 3BBFF0 E00BE090 AC800000 */ sw $zero, 0x0($a0) /* 3BBFF4 E00BE094 AC800014 */ sw $zero, 0x14($a0) /* 3BBFF8 E00BE098 0C080124 */ jal shim_create_effect_instance /* 3BBFFC E00BE09C AC820004 */ sw $v0, 0x4($a0) /* 3BC000 E00BE0A0 001020C0 */ sll $a0, $s0, 3 /* 3BC004 E00BE0A4 00902023 */ subu $a0, $a0, $s0 /* 3BC008 E00BE0A8 000420C0 */ sll $a0, $a0, 3 /* 3BC00C E00BE0AC 0040982D */ daddu $s3, $v0, $zero /* 3BC010 E00BE0B0 0C08012C */ jal shim_general_heap_malloc /* 3BC014 E00BE0B4 AE700008 */ sw $s0, 0x8($s3) /* 3BC018 E00BE0B8 0040202D */ daddu $a0, $v0, $zero /* 3BC01C E00BE0BC 14800003 */ bnez $a0, .LE00BE0CC /* 3BC020 E00BE0C0 AE64000C */ sw $a0, 0xC($s3) .LE00BE0C4: /* 3BC024 E00BE0C4 0802F831 */ j .LE00BE0C4 /* 3BC028 E00BE0C8 00000000 */ nop .LE00BE0CC: /* 3BC02C E00BE0CC AC920000 */ sw $s2, 0x0($a0) /* 3BC030 E00BE0D0 1E200004 */ bgtz $s1, .LE00BE0E4 /* 3BC034 E00BE0D4 AC800020 */ sw $zero, 0x20($a0) /* 3BC038 E00BE0D8 240203E8 */ addiu $v0, $zero, 0x3E8 /* 3BC03C E00BE0DC 0802F83A */ j .LE00BE0E8 /* 3BC040 E00BE0E0 AC82001C */ sw $v0, 0x1C($a0) .LE00BE0E4: /* 3BC044 E00BE0E4 AC91001C */ sw $s1, 0x1C($a0) .LE00BE0E8: /* 3BC048 E00BE0E8 240300FF */ addiu $v1, $zero, 0xFF /* 3BC04C E00BE0EC AC830030 */ sw $v1, 0x30($a0) /* 3BC050 E00BE0F0 E4940004 */ swc1 $f20, 0x4($a0) /* 3BC054 E00BE0F4 E4960008 */ swc1 $f22, 0x8($a0) /* 3BC058 E00BE0F8 E498000C */ swc1 $f24, 0xC($a0) /* 3BC05C E00BE0FC C7A00068 */ lwc1 $f0, 0x68($sp) /* 3BC060 E00BE100 24020046 */ addiu $v0, $zero, 0x46 /* 3BC064 E00BE104 AC820024 */ sw $v0, 0x24($a0) /* 3BC068 E00BE108 240200B4 */ addiu $v0, $zero, 0xB4 /* 3BC06C E00BE10C 24110001 */ addiu $s1, $zero, 0x1 /* 3BC070 E00BE110 AC820028 */ sw $v0, 0x28($a0) /* 3BC074 E00BE114 AC83002C */ sw $v1, 0x2C($a0) /* 3BC078 E00BE118 E4800034 */ swc1 $f0, 0x34($a0) /* 3BC07C E00BE11C 8E620008 */ lw $v0, 0x8($s3) /* 3BC080 E00BE120 0222102A */ slt $v0, $s1, $v0 /* 3BC084 E00BE124 10400091 */ beqz $v0, .LE00BE36C /* 3BC088 E00BE128 24840038 */ addiu $a0, $a0, 0x38 /* 3BC08C E00BE12C 24140002 */ addiu $s4, $zero, 0x2 /* 3BC090 E00BE130 24900030 */ addiu $s0, $a0, 0x30 /* 3BC094 E00BE134 3C013D8F */ lui $at, (0x3D8F5C29 >> 16) /* 3BC098 E00BE138 34215C29 */ ori $at, $at, (0x3D8F5C29 & 0xFFFF) /* 3BC09C E00BE13C 4481B000 */ mtc1 $at, $f22 /* 3BC0A0 E00BE140 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3BC0A4 E00BE144 4481A800 */ mtc1 $at, $f21 /* 3BC0A8 E00BE148 4480A000 */ mtc1 $zero, $f20 .LE00BE14C: /* 3BC0AC E00BE14C 3C014000 */ lui $at, (0x40000000 >> 16) /* 3BC0B0 E00BE150 44810000 */ mtc1 $at, $f0 /* 3BC0B4 E00BE154 24020001 */ addiu $v0, $zero, 0x1 /* 3BC0B8 E00BE158 AE00FFD4 */ sw $zero, -0x2C($s0) /* 3BC0BC E00BE15C AE00FFD8 */ sw $zero, -0x28($s0) /* 3BC0C0 E00BE160 AE00FFDC */ sw $zero, -0x24($s0) /* 3BC0C4 E00BE164 12420022 */ beq $s2, $v0, .LE00BE1F0 /* 3BC0C8 E00BE168 E6000004 */ swc1 $f0, 0x4($s0) /* 3BC0CC E00BE16C 2A420002 */ slti $v0, $s2, 0x2 /* 3BC0D0 E00BE170 10400005 */ beqz $v0, .LE00BE188 /* 3BC0D4 E00BE174 00000000 */ nop /* 3BC0D8 E00BE178 12400007 */ beqz $s2, .LE00BE198 /* 3BC0DC E00BE17C 00000000 */ nop /* 3BC0E0 E00BE180 0802F8B1 */ j .LE00BE2C4 /* 3BC0E4 E00BE184 00000000 */ nop .LE00BE188: /* 3BC0E8 E00BE188 1254002F */ beq $s2, $s4, .LE00BE248 /* 3BC0EC E00BE18C 00000000 */ nop /* 3BC0F0 E00BE190 0802F8B1 */ j .LE00BE2C4 /* 3BC0F4 E00BE194 00000000 */ nop .LE00BE198: /* 3BC0F8 E00BE198 0C080138 */ jal shim_rand_int /* 3BC0FC E00BE19C 2404000A */ addiu $a0, $zero, 0xA /* 3BC100 E00BE1A0 2404000A */ addiu $a0, $zero, 0xA /* 3BC104 E00BE1A4 2442FFFE */ addiu $v0, $v0, -0x2 /* 3BC108 E00BE1A8 44820000 */ mtc1 $v0, $f0 /* 3BC10C E00BE1AC 00000000 */ nop /* 3BC110 E00BE1B0 46800020 */ cvt.s.w $f0, $f0 /* 3BC114 E00BE1B4 0C080138 */ jal shim_rand_int /* 3BC118 E00BE1B8 E600FFE0 */ swc1 $f0, -0x20($s0) /* 3BC11C E00BE1BC 2404000A */ addiu $a0, $zero, 0xA /* 3BC120 E00BE1C0 2442FFFB */ addiu $v0, $v0, -0x5 /* 3BC124 E00BE1C4 44820000 */ mtc1 $v0, $f0 /* 3BC128 E00BE1C8 00000000 */ nop /* 3BC12C E00BE1CC 46800020 */ cvt.s.w $f0, $f0 /* 3BC130 E00BE1D0 0C080138 */ jal shim_rand_int /* 3BC134 E00BE1D4 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 3BC138 E00BE1D8 2442FFFB */ addiu $v0, $v0, -0x5 /* 3BC13C E00BE1DC 44820000 */ mtc1 $v0, $f0 /* 3BC140 E00BE1E0 00000000 */ nop /* 3BC144 E00BE1E4 46800020 */ cvt.s.w $f0, $f0 /* 3BC148 E00BE1E8 0802F8D4 */ j .LE00BE350 /* 3BC14C E00BE1EC E600FFE8 */ swc1 $f0, -0x18($s0) .LE00BE1F0: /* 3BC150 E00BE1F0 0C080138 */ jal shim_rand_int /* 3BC154 E00BE1F4 2404000A */ addiu $a0, $zero, 0xA /* 3BC158 E00BE1F8 2404000A */ addiu $a0, $zero, 0xA /* 3BC15C E00BE1FC 02821023 */ subu $v0, $s4, $v0 /* 3BC160 E00BE200 44820000 */ mtc1 $v0, $f0 /* 3BC164 E00BE204 00000000 */ nop /* 3BC168 E00BE208 46800020 */ cvt.s.w $f0, $f0 /* 3BC16C E00BE20C 0C080138 */ jal shim_rand_int /* 3BC170 E00BE210 E600FFE0 */ swc1 $f0, -0x20($s0) /* 3BC174 E00BE214 2404000A */ addiu $a0, $zero, 0xA /* 3BC178 E00BE218 2442FFFB */ addiu $v0, $v0, -0x5 /* 3BC17C E00BE21C 44820000 */ mtc1 $v0, $f0 /* 3BC180 E00BE220 00000000 */ nop /* 3BC184 E00BE224 46800020 */ cvt.s.w $f0, $f0 /* 3BC188 E00BE228 0C080138 */ jal shim_rand_int /* 3BC18C E00BE22C E600FFE4 */ swc1 $f0, -0x1C($s0) /* 3BC190 E00BE230 2442FFFB */ addiu $v0, $v0, -0x5 /* 3BC194 E00BE234 44820000 */ mtc1 $v0, $f0 /* 3BC198 E00BE238 00000000 */ nop /* 3BC19C E00BE23C 46800020 */ cvt.s.w $f0, $f0 /* 3BC1A0 E00BE240 0802F8D4 */ j .LE00BE350 /* 3BC1A4 E00BE244 E600FFE8 */ swc1 $f0, -0x18($s0) .LE00BE248: /* 3BC1A8 E00BE248 0C080138 */ jal shim_rand_int /* 3BC1AC E00BE24C 24040064 */ addiu $a0, $zero, 0x64 /* 3BC1B0 E00BE250 2442FFCE */ addiu $v0, $v0, -0x32 /* 3BC1B4 E00BE254 44820000 */ mtc1 $v0, $f0 /* 3BC1B8 E00BE258 00000000 */ nop /* 3BC1BC E00BE25C 46800020 */ cvt.s.w $f0, $f0 /* 3BC1C0 E00BE260 46160002 */ mul.s $f0, $f0, $f22 /* 3BC1C4 E00BE264 00000000 */ nop /* 3BC1C8 E00BE268 24040064 */ addiu $a0, $zero, 0x64 /* 3BC1CC E00BE26C 0C080138 */ jal shim_rand_int /* 3BC1D0 E00BE270 E600FFE0 */ swc1 $f0, -0x20($s0) /* 3BC1D4 E00BE274 2442000A */ addiu $v0, $v0, 0xA /* 3BC1D8 E00BE278 3C013E4C */ lui $at, (0x3E4CCCCD >> 16) /* 3BC1DC E00BE27C 3421CCCD */ ori $at, $at, (0x3E4CCCCD & 0xFFFF) /* 3BC1E0 E00BE280 44811000 */ mtc1 $at, $f2 /* 3BC1E4 E00BE284 44820000 */ mtc1 $v0, $f0 /* 3BC1E8 E00BE288 00000000 */ nop /* 3BC1EC E00BE28C 46800020 */ cvt.s.w $f0, $f0 /* 3BC1F0 E00BE290 46020002 */ mul.s $f0, $f0, $f2 /* 3BC1F4 E00BE294 00000000 */ nop /* 3BC1F8 E00BE298 24040064 */ addiu $a0, $zero, 0x64 /* 3BC1FC E00BE29C 0C080138 */ jal shim_rand_int /* 3BC200 E00BE2A0 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 3BC204 E00BE2A4 2442FFCE */ addiu $v0, $v0, -0x32 /* 3BC208 E00BE2A8 44820000 */ mtc1 $v0, $f0 /* 3BC20C E00BE2AC 00000000 */ nop /* 3BC210 E00BE2B0 46800020 */ cvt.s.w $f0, $f0 /* 3BC214 E00BE2B4 46160002 */ mul.s $f0, $f0, $f22 /* 3BC218 E00BE2B8 00000000 */ nop /* 3BC21C E00BE2BC 0802F8D4 */ j .LE00BE350 /* 3BC220 E00BE2C0 E600FFE8 */ swc1 $f0, -0x18($s0) .LE00BE2C4: /* 3BC224 E00BE2C4 0C080138 */ jal shim_rand_int /* 3BC228 E00BE2C8 2404000A */ addiu $a0, $zero, 0xA /* 3BC22C E00BE2CC 2442FFFB */ addiu $v0, $v0, -0x5 /* 3BC230 E00BE2D0 44820000 */ mtc1 $v0, $f0 /* 3BC234 E00BE2D4 00000000 */ nop /* 3BC238 E00BE2D8 46800021 */ cvt.d.w $f0, $f0 /* 3BC23C E00BE2DC 46340002 */ mul.d $f0, $f0, $f20 /* 3BC240 E00BE2E0 00000000 */ nop /* 3BC244 E00BE2E4 2404000A */ addiu $a0, $zero, 0xA /* 3BC248 E00BE2E8 46200020 */ cvt.s.d $f0, $f0 /* 3BC24C E00BE2EC 0C080138 */ jal shim_rand_int /* 3BC250 E00BE2F0 E600FFE0 */ swc1 $f0, -0x20($s0) /* 3BC254 E00BE2F4 2442FFFB */ addiu $v0, $v0, -0x5 /* 3BC258 E00BE2F8 44820000 */ mtc1 $v0, $f0 /* 3BC25C E00BE2FC 00000000 */ nop /* 3BC260 E00BE300 46800021 */ cvt.d.w $f0, $f0 /* 3BC264 E00BE304 46340002 */ mul.d $f0, $f0, $f20 /* 3BC268 E00BE308 00000000 */ nop /* 3BC26C E00BE30C 2404000A */ addiu $a0, $zero, 0xA /* 3BC270 E00BE310 46200020 */ cvt.s.d $f0, $f0 /* 3BC274 E00BE314 0C080138 */ jal shim_rand_int /* 3BC278 E00BE318 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 3BC27C E00BE31C 2442FFFB */ addiu $v0, $v0, -0x5 /* 3BC280 E00BE320 44820000 */ mtc1 $v0, $f0 /* 3BC284 E00BE324 00000000 */ nop /* 3BC288 E00BE328 46800021 */ cvt.d.w $f0, $f0 /* 3BC28C E00BE32C 46340002 */ mul.d $f0, $f0, $f20 /* 3BC290 E00BE330 00000000 */ nop /* 3BC294 E00BE334 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 3BC298 E00BE338 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 3BC29C E00BE33C 44811000 */ mtc1 $at, $f2 /* 3BC2A0 E00BE340 AE11FFEC */ sw $s1, -0x14($s0) /* 3BC2A4 E00BE344 E6020004 */ swc1 $f2, 0x4($s0) /* 3BC2A8 E00BE348 46200020 */ cvt.s.d $f0, $f0 /* 3BC2AC E00BE34C E600FFE8 */ swc1 $f0, -0x18($s0) .LE00BE350: /* 3BC2B0 E00BE350 26310001 */ addiu $s1, $s1, 0x1 /* 3BC2B4 E00BE354 240200FF */ addiu $v0, $zero, 0xFF /* 3BC2B8 E00BE358 AE020000 */ sw $v0, 0x0($s0) /* 3BC2BC E00BE35C 8E620008 */ lw $v0, 0x8($s3) /* 3BC2C0 E00BE360 0222102A */ slt $v0, $s1, $v0 /* 3BC2C4 E00BE364 1440FF79 */ bnez $v0, .LE00BE14C /* 3BC2C8 E00BE368 26100038 */ addiu $s0, $s0, 0x38 .LE00BE36C: /* 3BC2CC E00BE36C 0260102D */ daddu $v0, $s3, $zero /* 3BC2D0 E00BE370 8FBF003C */ lw $ra, 0x3C($sp) /* 3BC2D4 E00BE374 8FB40038 */ lw $s4, 0x38($sp) /* 3BC2D8 E00BE378 8FB30034 */ lw $s3, 0x34($sp) /* 3BC2DC E00BE37C 8FB20030 */ lw $s2, 0x30($sp) /* 3BC2E0 E00BE380 8FB1002C */ lw $s1, 0x2C($sp) /* 3BC2E4 E00BE384 8FB00028 */ lw $s0, 0x28($sp) /* 3BC2E8 E00BE388 D7B80050 */ ldc1 $f24, 0x50($sp) /* 3BC2EC E00BE38C D7B60048 */ ldc1 $f22, 0x48($sp) /* 3BC2F0 E00BE390 D7B40040 */ ldc1 $f20, 0x40($sp) /* 3BC2F4 E00BE394 03E00008 */ jr $ra /* 3BC2F8 E00BE398 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* water_splash_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance *effect; WaterSplashFXData* part; s32 i; s32 numParts; switch (arg0) { case 0: case 1: numParts = 21; break; case 2: numParts = 41; break; default: numParts = 11; break; } bpPtr->init = water_splash_init; bpPtr->update = water_splash_update; bpPtr->renderWorld = water_splash_render; bpPtr->unk_00 = 0; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_WATER_SPLASH; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; effect->data.waterSplash = part = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(part != NULL); part->unk_00 = arg0; part->unk_20 = 0; if (arg5 <= 0) { part->unk_1C = 1000; } else { part->unk_1C = arg5; } part->unk_30 = 255; part->unk_04.x = arg1; part->unk_04.y = arg2; part->unk_04.z = arg3; part->unk_34 = arg4; part->unk_24 = 70; part->unk_28 = 180; part->unk_2C = 255; part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_04.x = 0.0f; part->unk_04.y = 0.0f; part->unk_04.z = 0.0f; part->unk_34 = 2.0f; switch (arg0) { case 0: part->unk_10.x = shim_rand_int(10) - 2; part->unk_10.y = shim_rand_int(10) - 5; part->unk_10.z = shim_rand_int(10) - 5; break; case 1: part->unk_10.x = 2 - shim_rand_int(10); part->unk_10.y = shim_rand_int(10) - 5; part->unk_10.z = shim_rand_int(10) - 5; break; case 2: part->unk_10.x = (shim_rand_int(100) - 50) * 0.07f; part->unk_10.y = (shim_rand_int(100) + 10) * 0.2f; part->unk_10.z = (shim_rand_int(100) - 50) * 0.07f; break; default: part->unk_10.x = (shim_rand_int(10) - 5) * 0.5; part->unk_10.y = (shim_rand_int(10) - 5) * 0.5; part->unk_10.z = (shim_rand_int(10) - 5) * 0.5; part->unk_1C = i; part->unk_34 = 0.4f; break; } part->unk_30 = 0xFF; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel D_80258E14 /* 1876F4 80258E14 27BDFCE8 */ addiu $sp, $sp, -0x318 /* 1876F8 80258E18 AFB002D8 */ sw $s0, 0x2D8($sp) /* 1876FC 80258E1C 3C10800E */ lui $s0, %hi(gBattleStatus + 0xD8) /* 187700 80258E20 8E10C148 */ lw $s0, %lo(gBattleStatus + 0xD8)($s0) /* 187704 80258E24 AFBF02F8 */ sw $ra, 0x2F8($sp) /* 187708 80258E28 AFB702F4 */ sw $s7, 0x2F4($sp) /* 18770C 80258E2C AFB602F0 */ sw $s6, 0x2F0($sp) /* 187710 80258E30 AFB502EC */ sw $s5, 0x2EC($sp) /* 187714 80258E34 AFB402E8 */ sw $s4, 0x2E8($sp) /* 187718 80258E38 AFB302E4 */ sw $s3, 0x2E4($sp) /* 18771C 80258E3C AFB202E0 */ sw $s2, 0x2E0($sp) /* 187720 80258E40 AFB102DC */ sw $s1, 0x2DC($sp) /* 187724 80258E44 F7B80310 */ sdc1 $f24, 0x310($sp) /* 187728 80258E48 F7B60308 */ sdc1 $f22, 0x308($sp) /* 18772C 80258E4C F7B40300 */ sdc1 $f20, 0x300($sp) /* 187730 80258E50 86020150 */ lh $v0, 0x150($s0) /* 187734 80258E54 C6040144 */ lwc1 $f4, 0x144($s0) /* 187738 80258E58 C6020148 */ lwc1 $f2, 0x148($s0) /* 18773C 80258E5C 44820000 */ mtc1 $v0, $f0 /* 187740 80258E60 00000000 */ nop /* 187744 80258E64 46800020 */ cvt.s.w $f0, $f0 /* 187748 80258E68 46002100 */ add.s $f4, $f4, $f0 /* 18774C 80258E6C 86020152 */ lh $v0, 0x152($s0) /* 187750 80258E70 8E1301F4 */ lw $s3, 0x1F4($s0) /* 187754 80258E74 44820000 */ mtc1 $v0, $f0 /* 187758 80258E78 00000000 */ nop /* 18775C 80258E7C 46800020 */ cvt.s.w $f0, $f0 /* 187760 80258E80 46001080 */ add.s $f2, $f2, $f0 /* 187764 80258E84 86620068 */ lh $v0, 0x68($s3) /* 187768 80258E88 44820000 */ mtc1 $v0, $f0 /* 18776C 80258E8C 00000000 */ nop /* 187770 80258E90 46800020 */ cvt.s.w $f0, $f0 /* 187774 80258E94 46002100 */ add.s $f4, $f4, $f0 /* 187778 80258E98 8662006A */ lh $v0, 0x6A($s3) /* 18777C 80258E9C 44820000 */ mtc1 $v0, $f0 /* 187780 80258EA0 00000000 */ nop /* 187784 80258EA4 46800020 */ cvt.s.w $f0, $f0 /* 187788 80258EA8 46001080 */ add.s $f2, $f2, $f0 /* 18778C 80258EAC 86020154 */ lh $v0, 0x154($s0) /* 187790 80258EB0 C600014C */ lwc1 $f0, 0x14C($s0) /* 187794 80258EB4 44061000 */ mfc1 $a2, $f2 /* 187798 80258EB8 44821000 */ mtc1 $v0, $f2 /* 18779C 80258EBC 00000000 */ nop /* 1877A0 80258EC0 468010A0 */ cvt.s.w $f2, $f2 /* 1877A4 80258EC4 46020000 */ add.s $f0, $f0, $f2 /* 1877A8 80258EC8 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 1877AC 80258ECC 44811000 */ mtc1 $at, $f2 /* 1877B0 80258ED0 00000000 */ nop /* 1877B4 80258ED4 46020001 */ sub.s $f0, $f0, $f2 /* 1877B8 80258ED8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 1877BC 80258EDC 4481B000 */ mtc1 $at, $f22 /* 1877C0 80258EE0 27B701D8 */ addiu $s7, $sp, 0x1D8 /* 1877C4 80258EE4 46160001 */ sub.s $f0, $f0, $f22 /* 1877C8 80258EE8 C618018C */ lwc1 $f24, 0x18C($s0) /* 1877CC 80258EEC 44052000 */ mfc1 $a1, $f4 /* 1877D0 80258EF0 44070000 */ mfc1 $a3, $f0 /* 1877D4 80258EF4 02E0202D */ daddu $a0, $s7, $zero /* 1877D8 80258EF8 0C019E40 */ jal guTranslateF /* 1877DC 80258EFC E6780064 */ swc1 $f24, 0x64($s3) /* 1877E0 80258F00 86020168 */ lh $v0, 0x168($s0) /* 1877E4 80258F04 C6020188 */ lwc1 $f2, 0x188($s0) /* 1877E8 80258F08 00021023 */ negu $v0, $v0 /* 1877EC 80258F0C 44820000 */ mtc1 $v0, $f0 /* 1877F0 80258F10 00000000 */ nop /* 1877F4 80258F14 46800020 */ cvt.s.w $f0, $f0 /* 1877F8 80258F18 46020002 */ mul.s $f0, $f0, $f2 /* 1877FC 80258F1C 00000000 */ nop /* 187800 80258F20 8602016A */ lh $v0, 0x16A($s0) /* 187804 80258F24 00021023 */ negu $v0, $v0 /* 187808 80258F28 44050000 */ mfc1 $a1, $f0 /* 18780C 80258F2C 44820000 */ mtc1 $v0, $f0 /* 187810 80258F30 00000000 */ nop /* 187814 80258F34 46800020 */ cvt.s.w $f0, $f0 /* 187818 80258F38 46020002 */ mul.s $f0, $f0, $f2 /* 18781C 80258F3C 00000000 */ nop /* 187820 80258F40 8602016C */ lh $v0, 0x16C($s0) /* 187824 80258F44 00021023 */ negu $v0, $v0 /* 187828 80258F48 44060000 */ mfc1 $a2, $f0 /* 18782C 80258F4C 44820000 */ mtc1 $v0, $f0 /* 187830 80258F50 00000000 */ nop /* 187834 80258F54 46800020 */ cvt.s.w $f0, $f0 /* 187838 80258F58 46020002 */ mul.s $f0, $f0, $f2 /* 18783C 80258F5C 00000000 */ nop /* 187840 80258F60 27B60158 */ addiu $s6, $sp, 0x158 /* 187844 80258F64 44070000 */ mfc1 $a3, $f0 /* 187848 80258F68 0C019E40 */ jal guTranslateF /* 18784C 80258F6C 02C0202D */ daddu $a0, $s6, $zero /* 187850 80258F70 86020168 */ lh $v0, 0x168($s0) /* 187854 80258F74 C6020188 */ lwc1 $f2, 0x188($s0) /* 187858 80258F78 44820000 */ mtc1 $v0, $f0 /* 18785C 80258F7C 00000000 */ nop /* 187860 80258F80 46800020 */ cvt.s.w $f0, $f0 /* 187864 80258F84 46020002 */ mul.s $f0, $f0, $f2 /* 187868 80258F88 00000000 */ nop /* 18786C 80258F8C 8602016A */ lh $v0, 0x16A($s0) /* 187870 80258F90 44050000 */ mfc1 $a1, $f0 /* 187874 80258F94 44820000 */ mtc1 $v0, $f0 /* 187878 80258F98 00000000 */ nop /* 18787C 80258F9C 46800020 */ cvt.s.w $f0, $f0 /* 187880 80258FA0 46020002 */ mul.s $f0, $f0, $f2 /* 187884 80258FA4 00000000 */ nop /* 187888 80258FA8 8602016C */ lh $v0, 0x16C($s0) /* 18788C 80258FAC 44060000 */ mfc1 $a2, $f0 /* 187890 80258FB0 44820000 */ mtc1 $v0, $f0 /* 187894 80258FB4 00000000 */ nop /* 187898 80258FB8 46800020 */ cvt.s.w $f0, $f0 /* 18789C 80258FBC 46020002 */ mul.s $f0, $f0, $f2 /* 1878A0 80258FC0 00000000 */ nop /* 1878A4 80258FC4 27B50198 */ addiu $s5, $sp, 0x198 /* 1878A8 80258FC8 44070000 */ mfc1 $a3, $f0 /* 1878AC 80258FCC 4480A000 */ mtc1 $zero, $f20 /* 1878B0 80258FD0 0C019E40 */ jal guTranslateF /* 1878B4 80258FD4 02A0202D */ daddu $a0, $s5, $zero /* 1878B8 80258FD8 E7B40010 */ swc1 $f20, 0x10($sp) /* 1878BC 80258FDC 8E05015C */ lw $a1, 0x15C($s0) /* 1878C0 80258FE0 4406B000 */ mfc1 $a2, $f22 /* 1878C4 80258FE4 4407A000 */ mfc1 $a3, $f20 /* 1878C8 80258FE8 0C019EC8 */ jal guRotateF /* 1878CC 80258FEC 27A40018 */ addiu $a0, $sp, 0x18 /* 1878D0 80258FF0 27B10058 */ addiu $s1, $sp, 0x58 /* 1878D4 80258FF4 E7B40010 */ swc1 $f20, 0x10($sp) /* 1878D8 80258FF8 8E050160 */ lw $a1, 0x160($s0) /* 1878DC 80258FFC 4406A000 */ mfc1 $a2, $f20 /* 1878E0 80259000 4407B000 */ mfc1 $a3, $f22 /* 1878E4 80259004 0C019EC8 */ jal guRotateF /* 1878E8 80259008 0220202D */ daddu $a0, $s1, $zero /* 1878EC 8025900C 27B20098 */ addiu $s2, $sp, 0x98 /* 1878F0 80259010 4406A000 */ mfc1 $a2, $f20 /* 1878F4 80259014 0240202D */ daddu $a0, $s2, $zero /* 1878F8 80259018 E7B60010 */ swc1 $f22, 0x10($sp) /* 1878FC 8025901C 8E050164 */ lw $a1, 0x164($s0) /* 187900 80259020 0C019EC8 */ jal guRotateF /* 187904 80259024 00C0382D */ daddu $a3, $a2, $zero /* 187908 80259028 0220202D */ daddu $a0, $s1, $zero /* 18790C 8025902C 27A50018 */ addiu $a1, $sp, 0x18 /* 187910 80259030 27B10218 */ addiu $s1, $sp, 0x218 /* 187914 80259034 0C019D80 */ jal guMtxCatF /* 187918 80259038 0220302D */ daddu $a2, $s1, $zero /* 18791C 8025903C 0220202D */ daddu $a0, $s1, $zero /* 187920 80259040 0240282D */ daddu $a1, $s2, $zero /* 187924 80259044 27B400D8 */ addiu $s4, $sp, 0xD8 /* 187928 80259048 0C019D80 */ jal guMtxCatF /* 18792C 8025904C 0280302D */ daddu $a2, $s4, $zero /* 187930 80259050 C6060170 */ lwc1 $f6, 0x170($s0) /* 187934 80259054 3C01802A */ lui $at, %hi(D_8029D398) /* 187938 80259058 D428D398 */ ldc1 $f8, %lo(D_8029D398)($at) /* 18793C 8025905C 460031A1 */ cvt.d.s $f6, $f6 /* 187940 80259060 46283182 */ mul.d $f6, $f6, $f8 /* 187944 80259064 00000000 */ nop /* 187948 80259068 C6020174 */ lwc1 $f2, 0x174($s0) /* 18794C 8025906C 460010A1 */ cvt.d.s $f2, $f2 /* 187950 80259070 46281082 */ mul.d $f2, $f2, $f8 /* 187954 80259074 00000000 */ nop /* 187958 80259078 C6040178 */ lwc1 $f4, 0x178($s0) /* 18795C 8025907C 46002121 */ cvt.d.s $f4, $f4 /* 187960 80259080 46282102 */ mul.d $f4, $f4, $f8 /* 187964 80259084 00000000 */ nop /* 187968 80259088 C6000188 */ lwc1 $f0, 0x188($s0) /* 18796C 8025908C 46000021 */ cvt.d.s $f0, $f0 /* 187970 80259090 46203182 */ mul.d $f6, $f6, $f0 /* 187974 80259094 00000000 */ nop /* 187978 80259098 46201082 */ mul.d $f2, $f2, $f0 /* 18797C 8025909C 00000000 */ nop /* 187980 802590A0 82620074 */ lb $v0, 0x74($s3) /* 187984 802590A4 44820000 */ mtc1 $v0, $f0 /* 187988 802590A8 00000000 */ nop /* 18798C 802590AC 46800021 */ cvt.d.w $f0, $f0 /* 187990 802590B0 46201082 */ mul.d $f2, $f2, $f0 /* 187994 802590B4 00000000 */ nop /* 187998 802590B8 27B00118 */ addiu $s0, $sp, 0x118 /* 18799C 802590BC 46202120 */ cvt.s.d $f4, $f4 /* 1879A0 802590C0 44072000 */ mfc1 $a3, $f4 /* 1879A4 802590C4 462031A0 */ cvt.s.d $f6, $f6 /* 1879A8 802590C8 44053000 */ mfc1 $a1, $f6 /* 1879AC 802590CC 462010A0 */ cvt.s.d $f2, $f2 /* 1879B0 802590D0 44061000 */ mfc1 $a2, $f2 /* 1879B4 802590D4 0C019DF0 */ jal guScaleF /* 1879B8 802590D8 0200202D */ daddu $a0, $s0, $zero /* 1879BC 802590DC 27B20298 */ addiu $s2, $sp, 0x298 /* 1879C0 802590E0 0C0950A2 */ jal func_80254288 /* 1879C4 802590E4 0240202D */ daddu $a0, $s2, $zero /* 1879C8 802590E8 0200202D */ daddu $a0, $s0, $zero /* 1879CC 802590EC 02C0282D */ daddu $a1, $s6, $zero /* 1879D0 802590F0 0C019D80 */ jal guMtxCatF /* 1879D4 802590F4 0220302D */ daddu $a2, $s1, $zero /* 1879D8 802590F8 0220202D */ daddu $a0, $s1, $zero /* 1879DC 802590FC 0280282D */ daddu $a1, $s4, $zero /* 1879E0 80259100 0C019D80 */ jal guMtxCatF /* 1879E4 80259104 0220302D */ daddu $a2, $s1, $zero /* 1879E8 80259108 0220202D */ daddu $a0, $s1, $zero /* 1879EC 8025910C 02A0282D */ daddu $a1, $s5, $zero /* 1879F0 80259110 0C019D80 */ jal guMtxCatF /* 1879F4 80259114 0220302D */ daddu $a2, $s1, $zero /* 1879F8 80259118 0220202D */ daddu $a0, $s1, $zero /* 1879FC 8025911C 02E0282D */ daddu $a1, $s7, $zero /* 187A00 80259120 27B00258 */ addiu $s0, $sp, 0x258 /* 187A04 80259124 0C019D80 */ jal guMtxCatF /* 187A08 80259128 0200302D */ daddu $a2, $s0, $zero /* 187A0C 8025912C 0200202D */ daddu $a0, $s0, $zero /* 187A10 80259130 0240282D */ daddu $a1, $s2, $zero /* 187A14 80259134 0C019D80 */ jal guMtxCatF /* 187A18 80259138 0200302D */ daddu $a2, $s0, $zero /* 187A1C 8025913C 3C014334 */ lui $at, (0x43340000 >> 16) /* 187A20 80259140 44810000 */ mtc1 $at, $f0 /* 187A24 80259144 00000000 */ nop /* 187A28 80259148 4600C600 */ add.s $f24, $f24, $f0 /* 187A2C 8025914C 0C00A6C9 */ jal clamp_angle /* 187A30 80259150 4600C306 */ mov.s $f12, $f24 /* 187A34 80259154 0000202D */ daddu $a0, $zero, $zero /* 187A38 80259158 0260282D */ daddu $a1, $s3, $zero /* 187A3C 8025915C 4600028D */ trunc.w.s $f10, $f0 /* 187A40 80259160 44065000 */ mfc1 $a2, $f10 /* 187A44 80259164 0C097210 */ jal func_8025C840 /* 187A48 80259168 24070001 */ addiu $a3, $zero, 0x1 /* 187A4C 8025916C 0C00A6C9 */ jal clamp_angle /* 187A50 80259170 4600C306 */ mov.s $f12, $f24 /* 187A54 80259174 0000202D */ daddu $a0, $zero, $zero /* 187A58 80259178 0260282D */ daddu $a1, $s3, $zero /* 187A5C 8025917C 4600028D */ trunc.w.s $f10, $f0 /* 187A60 80259180 44065000 */ mfc1 $a2, $f10 /* 187A64 80259184 0C097332 */ jal func_8025CCC8 /* 187A68 80259188 24070001 */ addiu $a3, $zero, 0x1 /* 187A6C 8025918C 0C00A6C9 */ jal clamp_angle /* 187A70 80259190 4600C306 */ mov.s $f12, $f24 /* 187A74 80259194 0000202D */ daddu $a0, $zero, $zero /* 187A78 80259198 0260282D */ daddu $a1, $s3, $zero /* 187A7C 8025919C 4600028D */ trunc.w.s $f10, $f0 /* 187A80 802591A0 44065000 */ mfc1 $a2, $f10 /* 187A84 802591A4 0200382D */ daddu $a3, $s0, $zero /* 187A88 802591A8 24020001 */ addiu $v0, $zero, 0x1 /* 187A8C 802591AC 0C09647B */ jal func_802591EC /* 187A90 802591B0 AFA20010 */ sw $v0, 0x10($sp) /* 187A94 802591B4 8FBF02F8 */ lw $ra, 0x2F8($sp) /* 187A98 802591B8 8FB702F4 */ lw $s7, 0x2F4($sp) /* 187A9C 802591BC 8FB602F0 */ lw $s6, 0x2F0($sp) /* 187AA0 802591C0 8FB502EC */ lw $s5, 0x2EC($sp) /* 187AA4 802591C4 8FB402E8 */ lw $s4, 0x2E8($sp) /* 187AA8 802591C8 8FB302E4 */ lw $s3, 0x2E4($sp) /* 187AAC 802591CC 8FB202E0 */ lw $s2, 0x2E0($sp) /* 187AB0 802591D0 8FB102DC */ lw $s1, 0x2DC($sp) /* 187AB4 802591D4 8FB002D8 */ lw $s0, 0x2D8($sp) /* 187AB8 802591D8 D7B80310 */ ldc1 $f24, 0x310($sp) /* 187ABC 802591DC D7B60308 */ ldc1 $f22, 0x308($sp) /* 187AC0 802591E0 D7B40300 */ ldc1 $f20, 0x300($sp) /* 187AC4 802591E4 03E00008 */ jr $ra /* 187AC8 802591E8 27BD0318 */ addiu $sp, $sp, 0x318 ### DECOMPILED C INSTRUCTIONS: void appendGfx_player_actor_reflection(void* arg0) { Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation, mtxScale; Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate; Matrix4f mtxTemp, mtxTransform, mtxMirror; Actor* player = gBattleStatus.playerActor; ActorPart* part = &player->partsTable[0]; f32 playerYaw = player->yaw; f32 dx, dy, dz; dx = player->currentPos.x + player->headOffset.x; dx += part->palAnimPosOffset[0]; dy = player->currentPos.y + player->headOffset.y; dy += part->palAnimPosOffset[1]; dz = player->currentPos.z + player->headOffset.z - 5.0f; part->yaw = playerYaw; guTranslateF(mtxTranslate, dx, dy, dz - 1.0f); guTranslateF(mtxPivotOn, -player->rotationPivotOffset.x * player->scalingFactor, -player->rotationPivotOffset.y * player->scalingFactor, -player->rotationPivotOffset.z * player->scalingFactor); guTranslateF(mtxPivotOff, player->rotationPivotOffset.x * player->scalingFactor, player->rotationPivotOffset.y * player->scalingFactor, player->rotationPivotOffset.z * player->scalingFactor); guRotateF(mtxRotX, player->rotation.x, 1.0f, 0.0f, 0.0f); guRotateF(mtxRotY, player->rotation.y, 0.0f, 1.0f, 0.0f); guRotateF(mtxRotZ, player->rotation.z, 0.0f, 0.0f, 1.0f); guMtxCatF(mtxRotY, mtxRotX, mtxTemp); guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); guScaleF(mtxScale, player->scale.x * SPRITE_WORLD_SCALE_D * player->scalingFactor, player->scale.y * SPRITE_WORLD_SCALE_D * player->scalingFactor * part->verticalStretch, player->scale.z * SPRITE_WORLD_SCALE_D); mtx_mirror_y(mtxMirror); guMtxCatF(mtxScale, mtxPivotOn, mtxTemp); guMtxCatF(mtxTemp, mtxRotation, mtxTemp); guMtxCatF(mtxTemp, mtxPivotOff, mtxTemp); guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); guMtxCatF(mtxTransform, mtxMirror, mtxTransform); func_8025C840(0, part, clamp_angle(playerYaw + 180.0f), 1); func_8025CCC8(0, part, clamp_angle(playerYaw + 180.0f), 1); render_with_adjusted_palettes(SPRITE_MODE_PLAYER, part, clamp_angle(playerYaw + 180.0f), mtxTransform, TRUE); }
### RAW ASSEMBLY INSTRUCTIONS: glabel ElectrifyActor /* 19F23C 8027095C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 19F240 80270960 AFB20020 */ sw $s2, 0x20($sp) /* 19F244 80270964 0080902D */ daddu $s2, $a0, $zero /* 19F248 80270968 AFBF0024 */ sw $ra, 0x24($sp) /* 19F24C 8027096C AFB1001C */ sw $s1, 0x1C($sp) /* 19F250 80270970 AFB00018 */ sw $s0, 0x18($sp) /* 19F254 80270974 8E51000C */ lw $s1, 0xC($s2) /* 19F258 80270978 54A00001 */ bnel $a1, $zero, .L80270980 /* 19F25C 8027097C AE400070 */ sw $zero, 0x70($s2) .L80270980: /* 19F260 80270980 8E420070 */ lw $v0, 0x70($s2) /* 19F264 80270984 1440002D */ bnez $v0, .L80270A3C /* 19F268 80270988 00000000 */ nop /* 19F26C 8027098C 8E250000 */ lw $a1, 0x0($s1) /* 19F270 80270990 26310004 */ addiu $s1, $s1, 0x4 /* 19F274 80270994 0C0B1EAF */ jal evt_get_variable /* 19F278 80270998 0240202D */ daddu $a0, $s2, $zero /* 19F27C 8027099C 0040802D */ daddu $s0, $v0, $zero /* 19F280 802709A0 2402FF81 */ addiu $v0, $zero, -0x7F /* 19F284 802709A4 16020002 */ bne $s0, $v0, .L802709B0 /* 19F288 802709A8 00000000 */ nop /* 19F28C 802709AC 8E500148 */ lw $s0, 0x148($s2) .L802709B0: /* 19F290 802709B0 8E250000 */ lw $a1, 0x0($s1) /* 19F294 802709B4 0C0B1EAF */ jal evt_get_variable /* 19F298 802709B8 0240202D */ daddu $a0, $s2, $zero /* 19F29C 802709BC 0040882D */ daddu $s1, $v0, $zero /* 19F2A0 802709C0 0C09A75B */ jal get_actor /* 19F2A4 802709C4 0200202D */ daddu $a0, $s0, $zero /* 19F2A8 802709C8 0040802D */ daddu $s0, $v0, $zero /* 19F2AC 802709CC 24040008 */ addiu $a0, $zero, 0x8 /* 19F2B0 802709D0 AE500074 */ sw $s0, 0x74($s2) /* 19F2B4 802709D4 0C093903 */ jal func_8024E40C /* 19F2B8 802709D8 AE510078 */ sw $s1, 0x78($s2) /* 19F2BC 802709DC 0C093978 */ jal func_8024E5E0 /* 19F2C0 802709E0 2404000C */ addiu $a0, $zero, 0xC /* 19F2C4 802709E4 86040192 */ lh $a0, 0x192($s0) /* 19F2C8 802709E8 0C09390F */ jal func_8024E43C /* 19F2CC 802709EC 00000000 */ nop /* 19F2D0 802709F0 0C093965 */ jal func_8024E594 /* 19F2D4 802709F4 240400FA */ addiu $a0, $zero, 0xFA /* 19F2D8 802709F8 0C093936 */ jal D_8024E4D8_C0BD58 /* 19F2DC 802709FC 2404000A */ addiu $a0, $zero, 0xA /* 19F2E0 80270A00 0C093983 */ jal func_8024E60C /* 19F2E4 80270A04 00000000 */ nop /* 19F2E8 80270A08 8E020000 */ lw $v0, 0x0($s0) /* 19F2EC 80270A0C 30420800 */ andi $v0, $v0, 0x800 /* 19F2F0 80270A10 10400004 */ beqz $v0, .L80270A24 /* 19F2F4 80270A14 24020001 */ addiu $v0, $zero, 0x1 /* 19F2F8 80270A18 0C093978 */ jal func_8024E5E0 /* 19F2FC 80270A1C 0000202D */ daddu $a0, $zero, $zero /* 19F300 80270A20 24020001 */ addiu $v0, $zero, 0x1 .L80270A24: /* 19F304 80270A24 3C01802A */ lui $at, %hi(D_8029FBD4) /* 19F308 80270A28 A022FBD4 */ sb $v0, %lo(D_8029FBD4)($at) /* 19F30C 80270A2C 24020005 */ addiu $v0, $zero, 0x5 /* 19F310 80270A30 AE42007C */ sw $v0, 0x7C($s2) /* 19F314 80270A34 24020001 */ addiu $v0, $zero, 0x1 /* 19F318 80270A38 AE420070 */ sw $v0, 0x70($s2) .L80270A3C: /* 19F31C 80270A3C 0C09A75B */ jal get_actor /* 19F320 80270A40 8E440148 */ lw $a0, 0x148($s2) /* 19F324 80270A44 8E500074 */ lw $s0, 0x74($s2) /* 19F328 80270A48 8E510078 */ lw $s1, 0x78($s2) /* 19F32C 80270A4C 86020150 */ lh $v0, 0x150($s0) /* 19F330 80270A50 8E030000 */ lw $v1, 0x0($s0) /* 19F334 80270A54 C6000144 */ lwc1 $f0, 0x144($s0) /* 19F338 80270A58 44821000 */ mtc1 $v0, $f2 /* 19F33C 80270A5C 00000000 */ nop /* 19F340 80270A60 468010A0 */ cvt.s.w $f2, $f2 /* 19F344 80270A64 30620800 */ andi $v0, $v1, 0x800 /* 19F348 80270A68 1040000E */ beqz $v0, .L80270AA4 /* 19F34C 80270A6C 46020180 */ add.s $f6, $f0, $f2 /* 19F350 80270A70 86020152 */ lh $v0, 0x152($s0) /* 19F354 80270A74 C6020148 */ lwc1 $f2, 0x148($s0) /* 19F358 80270A78 44820000 */ mtc1 $v0, $f0 /* 19F35C 80270A7C 00000000 */ nop /* 19F360 80270A80 46800020 */ cvt.s.w $f0, $f0 /* 19F364 80270A84 92020191 */ lbu $v0, 0x191($s0) /* 19F368 80270A88 46001080 */ add.s $f2, $f2, $f0 /* 19F36C 80270A8C 00021042 */ srl $v0, $v0, 1 /* 19F370 80270A90 44820000 */ mtc1 $v0, $f0 /* 19F374 80270A94 00000000 */ nop /* 19F378 80270A98 46800020 */ cvt.s.w $f0, $f0 /* 19F37C 80270A9C 0809C2C4 */ j .L80270B10 /* 19F380 80270AA0 46001101 */ sub.s $f4, $f2, $f0 .L80270AA4: /* 19F384 80270AA4 30628000 */ andi $v0, $v1, 0x8000 /* 19F388 80270AA8 1440000E */ bnez $v0, .L80270AE4 /* 19F38C 80270AAC 00000000 */ nop /* 19F390 80270AB0 86020152 */ lh $v0, 0x152($s0) /* 19F394 80270AB4 C6020148 */ lwc1 $f2, 0x148($s0) /* 19F398 80270AB8 44820000 */ mtc1 $v0, $f0 /* 19F39C 80270ABC 00000000 */ nop /* 19F3A0 80270AC0 46800020 */ cvt.s.w $f0, $f0 /* 19F3A4 80270AC4 92020191 */ lbu $v0, 0x191($s0) /* 19F3A8 80270AC8 46001080 */ add.s $f2, $f2, $f0 /* 19F3AC 80270ACC 00021042 */ srl $v0, $v0, 1 /* 19F3B0 80270AD0 44820000 */ mtc1 $v0, $f0 /* 19F3B4 80270AD4 00000000 */ nop /* 19F3B8 80270AD8 46800020 */ cvt.s.w $f0, $f0 /* 19F3BC 80270ADC 0809C2C4 */ j .L80270B10 /* 19F3C0 80270AE0 46020100 */ add.s $f4, $f0, $f2 .L80270AE4: /* 19F3C4 80270AE4 86020152 */ lh $v0, 0x152($s0) /* 19F3C8 80270AE8 C6000148 */ lwc1 $f0, 0x148($s0) /* 19F3CC 80270AEC 44821000 */ mtc1 $v0, $f2 /* 19F3D0 80270AF0 00000000 */ nop /* 19F3D4 80270AF4 468010A0 */ cvt.s.w $f2, $f2 /* 19F3D8 80270AF8 92020191 */ lbu $v0, 0x191($s0) /* 19F3DC 80270AFC 46020000 */ add.s $f0, $f0, $f2 /* 19F3E0 80270B00 44821000 */ mtc1 $v0, $f2 /* 19F3E4 80270B04 00000000 */ nop /* 19F3E8 80270B08 468010A0 */ cvt.s.w $f2, $f2 /* 19F3EC 80270B0C 46020100 */ add.s $f4, $f0, $f2 .L80270B10: /* 19F3F0 80270B10 86020154 */ lh $v0, 0x154($s0) /* 19F3F4 80270B14 C600014C */ lwc1 $f0, 0x14C($s0) /* 19F3F8 80270B18 44821000 */ mtc1 $v0, $f2 /* 19F3FC 80270B1C 00000000 */ nop /* 19F400 80270B20 468010A0 */ cvt.s.w $f2, $f2 /* 19F404 80270B24 46020000 */ add.s $f0, $f0, $f2 /* 19F408 80270B28 8E420070 */ lw $v0, 0x70($s2) /* 19F40C 80270B2C 3C014120 */ lui $at, (0x41200000 >> 16) /* 19F410 80270B30 44811000 */ mtc1 $at, $f2 /* 19F414 80270B34 2443FFFF */ addiu $v1, $v0, -0x1 /* 19F418 80270B38 2C620005 */ sltiu $v0, $v1, 0x5 /* 19F41C 80270B3C 10400052 */ beqz $v0, .L80270C88 /* 19F420 80270B40 46020080 */ add.s $f2, $f0, $f2 /* 19F424 80270B44 00031080 */ sll $v0, $v1, 2 /* 19F428 80270B48 3C01802A */ lui $at, %hi(jtbl_8029D850) /* 19F42C 80270B4C 00220821 */ addu $at, $at, $v0 /* 19F430 80270B50 8C22D850 */ lw $v0, %lo(jtbl_8029D850)($at) /* 19F434 80270B54 00400008 */ jr $v0 /* 19F438 80270B58 00000000 */ nop glabel .L80270B5C /* 19F43C 80270B5C 8E42007C */ lw $v0, 0x7C($s2) /* 19F440 80270B60 1440003C */ bnez $v0, .L80270C54 /* 19F444 80270B64 2442FFFF */ addiu $v0, $v0, -0x1 /* 19F448 80270B68 24040008 */ addiu $a0, $zero, 0x8 /* 19F44C 80270B6C 44053000 */ mfc1 $a1, $f6 /* 19F450 80270B70 44062000 */ mfc1 $a2, $f4 /* 19F454 80270B74 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 19F458 80270B78 44810000 */ mtc1 $at, $f0 /* 19F45C 80270B7C 44071000 */ mfc1 $a3, $f2 /* 19F460 80270B80 2410001E */ addiu $s0, $zero, 0x1E /* 19F464 80270B84 AFB00014 */ sw $s0, 0x14($sp) /* 19F468 80270B88 0C01C64C */ jal fx_snaking_static /* 19F46C 80270B8C E7A00010 */ swc1 $f0, 0x10($sp) /* 19F470 80270B90 0C0938F6 */ jal func_8024E3D8 /* 19F474 80270B94 24040013 */ addiu $a0, $zero, 0x13 /* 19F478 80270B98 24020002 */ addiu $v0, $zero, 0x2 /* 19F47C 80270B9C AE50007C */ sw $s0, 0x7C($s2) /* 19F480 80270BA0 0809C322 */ j .L80270C88 /* 19F484 80270BA4 AE420070 */ sw $v0, 0x70($s2) glabel .L80270BA8 /* 19F488 80270BA8 8E42007C */ lw $v0, 0x7C($s2) /* 19F48C 80270BAC 14400029 */ bnez $v0, .L80270C54 /* 19F490 80270BB0 2442FFFF */ addiu $v0, $v0, -0x1 /* 19F494 80270BB4 0200202D */ daddu $a0, $s0, $zero /* 19F498 80270BB8 0C09DC58 */ jal dispatch_event_actor /* 19F49C 80270BBC 2405003F */ addiu $a1, $zero, 0x3F /* 19F4A0 80270BC0 0C093903 */ jal func_8024E40C /* 19F4A4 80270BC4 24040002 */ addiu $a0, $zero, 0x2 /* 19F4A8 80270BC8 0C093936 */ jal D_8024E4D8_C0BD58 /* 19F4AC 80270BCC 2404000F */ addiu $a0, $zero, 0xF /* 19F4B0 80270BD0 0200202D */ daddu $a0, $s0, $zero /* 19F4B4 80270BD4 2405000B */ addiu $a1, $zero, 0xB /* 19F4B8 80270BD8 0C0997D0 */ jal inflict_status /* 19F4BC 80270BDC 0220302D */ daddu $a2, $s1, $zero /* 19F4C0 80270BE0 2402000F */ addiu $v0, $zero, 0xF /* 19F4C4 80270BE4 AE42007C */ sw $v0, 0x7C($s2) /* 19F4C8 80270BE8 24020003 */ addiu $v0, $zero, 0x3 /* 19F4CC 80270BEC 0809C322 */ j .L80270C88 /* 19F4D0 80270BF0 AE420070 */ sw $v0, 0x70($s2) glabel .L80270BF4 /* 19F4D4 80270BF4 8E42007C */ lw $v0, 0x7C($s2) /* 19F4D8 80270BF8 14400016 */ bnez $v0, .L80270C54 /* 19F4DC 80270BFC 2442FFFF */ addiu $v0, $v0, -0x1 /* 19F4E0 80270C00 24040022 */ addiu $a0, $zero, 0x22 /* 19F4E4 80270C04 2405003C */ addiu $a1, $zero, 0x3C /* 19F4E8 80270C08 0C093E81 */ jal func_8024FA04 /* 19F4EC 80270C0C 0220302D */ daddu $a2, $s1, $zero /* 19F4F0 80270C10 24020004 */ addiu $v0, $zero, 0x4 /* 19F4F4 80270C14 0809C322 */ j .L80270C88 /* 19F4F8 80270C18 AE420070 */ sw $v0, 0x70($s2) glabel .L80270C1C /* 19F4FC 80270C1C 0C093EAD */ jal func_8024FAB4 /* 19F500 80270C20 00000000 */ nop /* 19F504 80270C24 14400019 */ bnez $v0, .L80270C8C /* 19F508 80270C28 0000102D */ daddu $v0, $zero, $zero /* 19F50C 80270C2C 0C093903 */ jal func_8024E40C /* 19F510 80270C30 24040002 */ addiu $a0, $zero, 0x2 /* 19F514 80270C34 2402000A */ addiu $v0, $zero, 0xA /* 19F518 80270C38 AE42007C */ sw $v0, 0x7C($s2) /* 19F51C 80270C3C 24020005 */ addiu $v0, $zero, 0x5 /* 19F520 80270C40 0809C322 */ j .L80270C88 /* 19F524 80270C44 AE420070 */ sw $v0, 0x70($s2) glabel .L80270C48 /* 19F528 80270C48 8E42007C */ lw $v0, 0x7C($s2) /* 19F52C 80270C4C 10400003 */ beqz $v0, .L80270C5C /* 19F530 80270C50 2442FFFF */ addiu $v0, $v0, -0x1 .L80270C54: /* 19F534 80270C54 0809C322 */ j .L80270C88 /* 19F538 80270C58 AE42007C */ sw $v0, 0x7C($s2) .L80270C5C: /* 19F53C 80270C5C 8E0201D8 */ lw $v0, 0x1D8($s0) /* 19F540 80270C60 10400005 */ beqz $v0, .L80270C78 /* 19F544 80270C64 00000000 */ nop /* 19F548 80270C68 0C0B1059 */ jal does_script_exist /* 19F54C 80270C6C 8E0401E8 */ lw $a0, 0x1E8($s0) /* 19F550 80270C70 14400006 */ bnez $v0, .L80270C8C /* 19F554 80270C74 0000102D */ daddu $v0, $zero, $zero .L80270C78: /* 19F558 80270C78 3C01802A */ lui $at, %hi(D_8029FBD4) /* 19F55C 80270C7C A020FBD4 */ sb $zero, %lo(D_8029FBD4)($at) /* 19F560 80270C80 0809C323 */ j .L80270C8C /* 19F564 80270C84 24020002 */ addiu $v0, $zero, 0x2 .L80270C88: /* 19F568 80270C88 0000102D */ daddu $v0, $zero, $zero .L80270C8C: /* 19F56C 80270C8C 8FBF0024 */ lw $ra, 0x24($sp) /* 19F570 80270C90 8FB20020 */ lw $s2, 0x20($sp) /* 19F574 80270C94 8FB1001C */ lw $s1, 0x1C($sp) /* 19F578 80270C98 8FB00018 */ lw $s0, 0x18($sp) /* 19F57C 80270C9C 03E00008 */ jr $ra /* 19F580 80270CA0 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus ElectrifyActor(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 actorID; Actor* actor; f32 x, y, z; s32 electrified; s32 flags; 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; } electrified = evt_get_variable(script, *args++); actor = get_actor(actorID); script->functionTempPtr[1] = actor; script->functionTemp[2] = electrified; btl_cam_use_preset(BTL_CAM_PRESET_08); btl_cam_set_zoffset(12); btl_cam_target_actor(actor->actorID); btl_cam_set_zoom(250); btl_cam_move(10); func_8024E60C(); if (actor->flags & ACTOR_FLAG_UPSIDE_DOWN) { btl_cam_set_zoffset(0); } D_8029FBD4 = 1; script->functionTemp[3] = 5; script->functionTemp[0] = 1; } get_actor(script->owner1.actorID); actor = script->functionTempPtr[1]; electrified = script->functionTemp[2]; flags = actor->flags; x = actor->currentPos.x + actor->headOffset.x; if (flags & ACTOR_FLAG_UPSIDE_DOWN) { y = actor->currentPos.y + actor->headOffset.y - actor->size.y / 2; } else if (!(flags & ACTOR_FLAG_8000)) { y = actor->currentPos.y + actor->headOffset.y + actor->size.y / 2; } else { y = actor->currentPos.y + actor->headOffset.y + actor->size.y; } z = actor->currentPos.z + actor->headOffset.z + 10.0f; switch (script->functionTemp[0]) { case 1: if (script->functionTemp[3] == 0) { fx_snaking_static(8, x, y, z, 1.0f, 30); btl_cam_use_preset_immediately(BTL_CAM_PRESET_19); script->functionTemp[3] = 0x1E; script->functionTemp[0] = 2; } else { script->functionTemp[3]--; break; } break; case 2: if (script->functionTemp[3] == 0) { dispatch_event_actor(actor, EVENT_SWAP_PARTNER); btl_cam_use_preset(BTL_CAM_DEFAULT); btl_cam_move(15); inflict_status(actor, 0xB, electrified); script->functionTemp[3] = 15; script->functionTemp[0] = 3; } else { script->functionTemp[3]--; break; } break; case 3: if (script->functionTemp[3] == 0) { btl_show_variable_battle_message(BTL_MSG_ENEMY_CHARGED, 60, electrified); script->functionTemp[0] = 4; } else { script->functionTemp[3]--; break; } break; case 4: if (btl_is_popup_displayed() == 0) { btl_cam_use_preset(BTL_CAM_DEFAULT); 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 UpdatePlayerImgFX /* F6ED0 802D2520 27BDFFC0 */ addiu $sp, $sp, -0x40 /* F6ED4 802D2524 AFB40030 */ sw $s4, 0x30($sp) /* F6ED8 802D2528 0080A02D */ daddu $s4, $a0, $zero /* F6EDC 802D252C AFBF0038 */ sw $ra, 0x38($sp) /* F6EE0 802D2530 AFB50034 */ sw $s5, 0x34($sp) /* F6EE4 802D2534 AFB3002C */ sw $s3, 0x2C($sp) /* F6EE8 802D2538 AFB20028 */ sw $s2, 0x28($sp) /* F6EEC 802D253C AFB10024 */ sw $s1, 0x24($sp) /* F6EF0 802D2540 AFB00020 */ sw $s0, 0x20($sp) /* F6EF4 802D2544 8E90000C */ lw $s0, 0xC($s4) /* F6EF8 802D2548 8E150000 */ lw $s5, 0x0($s0) /* F6EFC 802D254C 26100004 */ addiu $s0, $s0, 0x4 /* F6F00 802D2550 8E050000 */ lw $a1, 0x0($s0) /* F6F04 802D2554 0C0B1EAF */ jal evt_get_variable /* F6F08 802D2558 26100004 */ addiu $s0, $s0, 0x4 /* F6F0C 802D255C 02A0202D */ daddu $a0, $s5, $zero /* F6F10 802D2560 0000282D */ daddu $a1, $zero, $zero /* F6F14 802D2564 00A0302D */ daddu $a2, $a1, $zero /* F6F18 802D2568 00A0382D */ daddu $a3, $a1, $zero /* F6F1C 802D256C 0040882D */ daddu $s1, $v0, $zero /* F6F20 802D2570 AFA00010 */ sw $zero, 0x10($sp) /* F6F24 802D2574 AFA00014 */ sw $zero, 0x14($sp) /* F6F28 802D2578 0C0B77FE */ jal set_player_imgfx_all /* F6F2C 802D257C AFA00018 */ sw $zero, 0x18($sp) /* F6F30 802D2580 3C128011 */ lui $s2, %hi(gPlayerStatus) /* F6F34 802D2584 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* F6F38 802D2588 2E22000E */ sltiu $v0, $s1, 0xE /* F6F3C 802D258C 104000AB */ beqz $v0, .L802D283C /* F6F40 802D2590 00111080 */ sll $v0, $s1, 2 /* F6F44 802D2594 3C01802E */ lui $at, %hi(jtbl_802DA208) /* F6F48 802D2598 00220821 */ addu $at, $at, $v0 /* F6F4C 802D259C 8C22A208 */ lw $v0, %lo(jtbl_802DA208)($at) /* F6F50 802D25A0 00400008 */ jr $v0 /* F6F54 802D25A4 00000000 */ nop glabel .L802D25A8 /* F6F58 802D25A8 02A0202D */ daddu $a0, $s5, $zero /* F6F5C 802D25AC 0000282D */ daddu $a1, $zero, $zero /* F6F60 802D25B0 00A0302D */ daddu $a2, $a1, $zero /* F6F64 802D25B4 00A0382D */ daddu $a3, $a1, $zero /* F6F68 802D25B8 3C03802E */ lui $v1, %hi(PlayerImgFXFlags) /* F6F6C 802D25BC 9463B5B0 */ lhu $v1, %lo(PlayerImgFXFlags)($v1) /* F6F70 802D25C0 2402000D */ addiu $v0, $zero, 0xD /* F6F74 802D25C4 A24200BE */ sb $v0, 0xBE($s2) /* F6F78 802D25C8 AFA00010 */ sw $zero, 0x10($sp) /* F6F7C 802D25CC 080B4A0C */ j .L802D2830 /* F6F80 802D25D0 AFA00014 */ sw $zero, 0x14($sp) glabel .L802D25D4 /* F6F84 802D25D4 2402000D */ addiu $v0, $zero, 0xD /* F6F88 802D25D8 A24200BE */ sb $v0, 0xBE($s2) glabel .L802D25DC /* F6F8C 802D25DC 02A0202D */ daddu $a0, $s5, $zero /* F6F90 802D25E0 0220282D */ daddu $a1, $s1, $zero /* F6F94 802D25E4 0000302D */ daddu $a2, $zero, $zero /* F6F98 802D25E8 3C02802E */ lui $v0, %hi(PlayerImgFXFlags) /* F6F9C 802D25EC 9442B5B0 */ lhu $v0, %lo(PlayerImgFXFlags)($v0) /* F6FA0 802D25F0 00C0382D */ daddu $a3, $a2, $zero /* F6FA4 802D25F4 AFA00010 */ sw $zero, 0x10($sp) /* F6FA8 802D25F8 AFA00014 */ sw $zero, 0x14($sp) /* F6FAC 802D25FC 080B4A0D */ j .L802D2834 /* F6FB0 802D2600 AFA20018 */ sw $v0, 0x18($sp) glabel .L802D2604 /* F6FB4 802D2604 2402000D */ addiu $v0, $zero, 0xD /* F6FB8 802D2608 A24200BE */ sb $v0, 0xBE($s2) /* F6FBC 802D260C 8E050000 */ lw $a1, 0x0($s0) /* F6FC0 802D2610 26100004 */ addiu $s0, $s0, 0x4 /* F6FC4 802D2614 0C0B1EAF */ jal evt_get_variable /* F6FC8 802D2618 0280202D */ daddu $a0, $s4, $zero /* F6FCC 802D261C 0040982D */ daddu $s3, $v0, $zero /* F6FD0 802D2620 8E050000 */ lw $a1, 0x0($s0) /* F6FD4 802D2624 26100004 */ addiu $s0, $s0, 0x4 /* F6FD8 802D2628 0C0B1EAF */ jal evt_get_variable /* F6FDC 802D262C 0280202D */ daddu $a0, $s4, $zero /* F6FE0 802D2630 0040902D */ daddu $s2, $v0, $zero /* F6FE4 802D2634 8E050000 */ lw $a1, 0x0($s0) /* F6FE8 802D2638 0C0B1EAF */ jal evt_get_variable /* F6FEC 802D263C 0280202D */ daddu $a0, $s4, $zero /* F6FF0 802D2640 02A0202D */ daddu $a0, $s5, $zero /* F6FF4 802D2644 24050004 */ addiu $a1, $zero, 0x4 /* F6FF8 802D2648 0260302D */ daddu $a2, $s3, $zero /* F6FFC 802D264C 3C03802E */ lui $v1, %hi(PlayerImgFXFlags) /* F7000 802D2650 9463B5B0 */ lhu $v1, %lo(PlayerImgFXFlags)($v1) /* F7004 802D2654 0240382D */ daddu $a3, $s2, $zero /* F7008 802D2658 AFA20010 */ sw $v0, 0x10($sp) /* F700C 802D265C 080B4A0C */ j .L802D2830 /* F7010 802D2660 AFA00014 */ sw $zero, 0x14($sp) glabel .L802D2664 /* F7014 802D2664 2402000D */ addiu $v0, $zero, 0xD /* F7018 802D2668 A24200BE */ sb $v0, 0xBE($s2) /* F701C 802D266C 8E050000 */ lw $a1, 0x0($s0) /* F7020 802D2670 26100004 */ addiu $s0, $s0, 0x4 /* F7024 802D2674 0C0B1EAF */ jal evt_get_variable /* F7028 802D2678 0280202D */ daddu $a0, $s4, $zero /* F702C 802D267C 0040982D */ daddu $s3, $v0, $zero /* F7030 802D2680 8E050000 */ lw $a1, 0x0($s0) /* F7034 802D2684 26100004 */ addiu $s0, $s0, 0x4 /* F7038 802D2688 0C0B1EAF */ jal evt_get_variable /* F703C 802D268C 0280202D */ daddu $a0, $s4, $zero /* F7040 802D2690 0040902D */ daddu $s2, $v0, $zero /* F7044 802D2694 8E050000 */ lw $a1, 0x0($s0) /* F7048 802D2698 0C0B1EAF */ jal evt_get_variable /* F704C 802D269C 0280202D */ daddu $a0, $s4, $zero /* F7050 802D26A0 02A0202D */ daddu $a0, $s5, $zero /* F7054 802D26A4 24050006 */ addiu $a1, $zero, 0x6 /* F7058 802D26A8 0260302D */ daddu $a2, $s3, $zero /* F705C 802D26AC 3C03802E */ lui $v1, %hi(PlayerImgFXFlags) /* F7060 802D26B0 9463B5B0 */ lhu $v1, %lo(PlayerImgFXFlags)($v1) /* F7064 802D26B4 0240382D */ daddu $a3, $s2, $zero /* F7068 802D26B8 AFA20010 */ sw $v0, 0x10($sp) /* F706C 802D26BC 080B4A0B */ j .L802D282C /* F7070 802D26C0 240200FF */ addiu $v0, $zero, 0xFF glabel .L802D26C4 /* F7074 802D26C4 24020016 */ addiu $v0, $zero, 0x16 /* F7078 802D26C8 A24200BE */ sb $v0, 0xBE($s2) /* F707C 802D26CC 8E050000 */ lw $a1, 0x0($s0) /* F7080 802D26D0 0C0B1EAF */ jal evt_get_variable /* F7084 802D26D4 0280202D */ daddu $a0, $s4, $zero /* F7088 802D26D8 02A0202D */ daddu $a0, $s5, $zero /* F708C 802D26DC 24050007 */ addiu $a1, $zero, 0x7 /* F7090 802D26E0 240600FF */ addiu $a2, $zero, 0xFF /* F7094 802D26E4 00C0382D */ daddu $a3, $a2, $zero /* F7098 802D26E8 3C08802E */ lui $t0, %hi(PlayerImgFXFlags) /* F709C 802D26EC 9508B5B0 */ lhu $t0, %lo(PlayerImgFXFlags)($t0) /* F70A0 802D26F0 00C0182D */ daddu $v1, $a2, $zero /* F70A4 802D26F4 AFA30010 */ sw $v1, 0x10($sp) /* F70A8 802D26F8 AFA20014 */ sw $v0, 0x14($sp) /* F70AC 802D26FC 080B4A0D */ j .L802D2834 /* F70B0 802D2700 AFA80018 */ sw $t0, 0x18($sp) glabel .L802D2704 /* F70B4 802D2704 24020016 */ addiu $v0, $zero, 0x16 /* F70B8 802D2708 A24200BE */ sb $v0, 0xBE($s2) /* F70BC 802D270C 8E050000 */ lw $a1, 0x0($s0) /* F70C0 802D2710 26100004 */ addiu $s0, $s0, 0x4 /* F70C4 802D2714 0C0B1EAF */ jal evt_get_variable /* F70C8 802D2718 0280202D */ daddu $a0, $s4, $zero /* F70CC 802D271C 0040982D */ daddu $s3, $v0, $zero /* F70D0 802D2720 8E050000 */ lw $a1, 0x0($s0) /* F70D4 802D2724 26100004 */ addiu $s0, $s0, 0x4 /* F70D8 802D2728 0C0B1EAF */ jal evt_get_variable /* F70DC 802D272C 0280202D */ daddu $a0, $s4, $zero /* F70E0 802D2730 0040902D */ daddu $s2, $v0, $zero /* F70E4 802D2734 8E050000 */ lw $a1, 0x0($s0) /* F70E8 802D2738 26100004 */ addiu $s0, $s0, 0x4 /* F70EC 802D273C 0C0B1EAF */ jal evt_get_variable /* F70F0 802D2740 0280202D */ daddu $a0, $s4, $zero /* F70F4 802D2744 0040882D */ daddu $s1, $v0, $zero /* F70F8 802D2748 8E050000 */ lw $a1, 0x0($s0) /* F70FC 802D274C 0C0B1EAF */ jal evt_get_variable /* F7100 802D2750 0280202D */ daddu $a0, $s4, $zero /* F7104 802D2754 02A0202D */ daddu $a0, $s5, $zero /* F7108 802D2758 080B4A06 */ j .L802D2818 /* F710C 802D275C 24050008 */ addiu $a1, $zero, 0x8 glabel .L802D2760 /* F7110 802D2760 2402000D */ addiu $v0, $zero, 0xD /* F7114 802D2764 A24200BE */ sb $v0, 0xBE($s2) /* F7118 802D2768 8E050000 */ lw $a1, 0x0($s0) /* F711C 802D276C 26100004 */ addiu $s0, $s0, 0x4 /* F7120 802D2770 0C0B1EAF */ jal evt_get_variable /* F7124 802D2774 0280202D */ daddu $a0, $s4, $zero /* F7128 802D2778 0040982D */ daddu $s3, $v0, $zero /* F712C 802D277C 8E050000 */ lw $a1, 0x0($s0) /* F7130 802D2780 26100004 */ addiu $s0, $s0, 0x4 /* F7134 802D2784 0C0B1EAF */ jal evt_get_variable /* F7138 802D2788 0280202D */ daddu $a0, $s4, $zero /* F713C 802D278C 0040902D */ daddu $s2, $v0, $zero /* F7140 802D2790 8E050000 */ lw $a1, 0x0($s0) /* F7144 802D2794 0C0B1EAF */ jal evt_get_variable /* F7148 802D2798 0280202D */ daddu $a0, $s4, $zero /* F714C 802D279C 02A0202D */ daddu $a0, $s5, $zero /* F7150 802D27A0 24050005 */ addiu $a1, $zero, 0x5 /* F7154 802D27A4 0260302D */ daddu $a2, $s3, $zero /* F7158 802D27A8 3C03802E */ lui $v1, %hi(PlayerImgFXFlags) /* F715C 802D27AC 9463B5B0 */ lhu $v1, %lo(PlayerImgFXFlags)($v1) /* F7160 802D27B0 0240382D */ daddu $a3, $s2, $zero /* F7164 802D27B4 AFA20010 */ sw $v0, 0x10($sp) /* F7168 802D27B8 080B4A0C */ j .L802D2830 /* F716C 802D27BC AFA00014 */ sw $zero, 0x14($sp) glabel .L802D27C0 /* F7170 802D27C0 24020016 */ addiu $v0, $zero, 0x16 /* F7174 802D27C4 A24200BE */ sb $v0, 0xBE($s2) /* F7178 802D27C8 8E050000 */ lw $a1, 0x0($s0) /* F717C 802D27CC 26100004 */ addiu $s0, $s0, 0x4 /* F7180 802D27D0 0C0B1EAF */ jal evt_get_variable /* F7184 802D27D4 0280202D */ daddu $a0, $s4, $zero /* F7188 802D27D8 0040982D */ daddu $s3, $v0, $zero /* F718C 802D27DC 8E050000 */ lw $a1, 0x0($s0) /* F7190 802D27E0 26100004 */ addiu $s0, $s0, 0x4 /* F7194 802D27E4 0C0B1EAF */ jal evt_get_variable /* F7198 802D27E8 0280202D */ daddu $a0, $s4, $zero /* F719C 802D27EC 0040902D */ daddu $s2, $v0, $zero /* F71A0 802D27F0 8E050000 */ lw $a1, 0x0($s0) /* F71A4 802D27F4 26100004 */ addiu $s0, $s0, 0x4 /* F71A8 802D27F8 0C0B1EAF */ jal evt_get_variable /* F71AC 802D27FC 0280202D */ daddu $a0, $s4, $zero /* F71B0 802D2800 0040882D */ daddu $s1, $v0, $zero /* F71B4 802D2804 8E050000 */ lw $a1, 0x0($s0) /* F71B8 802D2808 0C0B1EAF */ jal evt_get_variable /* F71BC 802D280C 0280202D */ daddu $a0, $s4, $zero /* F71C0 802D2810 02A0202D */ daddu $a0, $s5, $zero /* F71C4 802D2814 2405000D */ addiu $a1, $zero, 0xD .L802D2818: /* F71C8 802D2818 0260302D */ daddu $a2, $s3, $zero /* F71CC 802D281C 3C03802E */ lui $v1, %hi(PlayerImgFXFlags) /* F71D0 802D2820 9463B5B0 */ lhu $v1, %lo(PlayerImgFXFlags)($v1) /* F71D4 802D2824 0240382D */ daddu $a3, $s2, $zero /* F71D8 802D2828 AFB10010 */ sw $s1, 0x10($sp) .L802D282C: /* F71DC 802D282C AFA20014 */ sw $v0, 0x14($sp) .L802D2830: /* F71E0 802D2830 AFA30018 */ sw $v1, 0x18($sp) .L802D2834: /* F71E4 802D2834 0C0B77FE */ jal set_player_imgfx_all /* F71E8 802D2838 00000000 */ nop glabel .L802D283C /* F71EC 802D283C 8FBF0038 */ lw $ra, 0x38($sp) /* F71F0 802D2840 8FB50034 */ lw $s5, 0x34($sp) /* F71F4 802D2844 8FB40030 */ lw $s4, 0x30($sp) /* F71F8 802D2848 8FB3002C */ lw $s3, 0x2C($sp) /* F71FC 802D284C 8FB20028 */ lw $s2, 0x28($sp) /* F7200 802D2850 8FB10024 */ lw $s1, 0x24($sp) /* F7204 802D2854 8FB00020 */ lw $s0, 0x20($sp) /* F7208 802D2858 24020002 */ addiu $v0, $zero, 0x2 /* F720C 802D285C 3C01802E */ lui $at, %hi(PlayerImgFXFlags) /* F7210 802D2860 A420B5B0 */ sh $zero, %lo(PlayerImgFXFlags)($at) /* F7214 802D2864 03E00008 */ jr $ra /* F7218 802D2868 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: ApiStatus UpdatePlayerImgFX(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; s32 a0 = *args++; s32 imgfxType = evt_get_variable(script, *args++); s32 a2, a3, a4, a5; set_player_imgfx_all(a0, IMGFX_CLEAR, 0, 0, 0, 0, 0); switch (imgfxType) { case IMGFX_CLEAR: playerStatus->renderMode = RENDER_MODE_ALPHATEST; set_player_imgfx_all(a0, IMGFX_CLEAR, 0, 0, 0, 0, PlayerImgFXFlags); break; case IMGFX_UNK_2: case IMGFX_RESET: playerStatus->renderMode = RENDER_MODE_ALPHATEST; case IMGFX_UNK_1: set_player_imgfx_all(a0, imgfxType, 0, 0, 0, 0, PlayerImgFXFlags); break; case IMGFX_SET_WAVY: playerStatus->renderMode = RENDER_MODE_ALPHATEST; a2 = evt_get_variable(script, *args++); a3 = evt_get_variable(script, *args++); a4 = evt_get_variable(script, *args++); set_player_imgfx_all(a0, IMGFX_SET_WAVY, a2, a3, a4, 0, PlayerImgFXFlags); break; case IMGFX_SET_COLOR: playerStatus->renderMode = RENDER_MODE_ALPHATEST; a2 = evt_get_variable(script, *args++); a3 = evt_get_variable(script, *args++); a4 = evt_get_variable(script, *args++); set_player_imgfx_all(a0, IMGFX_SET_COLOR, a2, a3, a4, 255, PlayerImgFXFlags); break; case IMGFX_SET_ALPHA: playerStatus->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; a5 = evt_get_variable(script, *args++); set_player_imgfx_all(a0, IMGFX_SET_ALPHA, 255, 255, 255, a5, PlayerImgFXFlags); break; case IMGFX_SET_TINT: playerStatus->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; a2 = evt_get_variable(script, *args++); a3 = evt_get_variable(script, *args++); a4 = evt_get_variable(script, *args++); a5 = evt_get_variable(script, *args++); set_player_imgfx_all(a0, IMGFX_SET_TINT, a2, a3, a4, a5, PlayerImgFXFlags); break; case IMGFX_SET_ANIM: playerStatus->renderMode = RENDER_MODE_ALPHATEST; a2 = evt_get_variable(script, *args++); a3 = evt_get_variable(script, *args++); a4 = evt_get_variable(script, *args++); set_player_imgfx_all(a0, IMGFX_SET_ANIM, a2, a3, a4, 0, PlayerImgFXFlags); break; case IMGFX_HOLOGRAM: playerStatus->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; a2 = evt_get_variable(script, *args++); a3 = evt_get_variable(script, *args++); a4 = evt_get_variable(script, *args++); a5 = evt_get_variable(script, *args++); set_player_imgfx_all(a0, IMGFX_HOLOGRAM, a2, a3, a4, a5, PlayerImgFXFlags); break; } PlayerImgFXFlags = 0; return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel shimmer_wave_update /* 376648 E00741E8 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 37664C E00741EC AFB20020 */ sw $s2, 0x20($sp) /* 376650 E00741F0 0080902D */ daddu $s2, $a0, $zero /* 376654 E00741F4 AFBF0028 */ sw $ra, 0x28($sp) /* 376658 E00741F8 AFB30024 */ sw $s3, 0x24($sp) /* 37665C E00741FC AFB1001C */ sw $s1, 0x1C($sp) /* 376660 E0074200 AFB00018 */ sw $s0, 0x18($sp) /* 376664 E0074204 F7BE0058 */ sdc1 $f30, 0x58($sp) /* 376668 E0074208 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 37666C E007420C F7BA0048 */ sdc1 $f26, 0x48($sp) /* 376670 E0074210 F7B80040 */ sdc1 $f24, 0x40($sp) /* 376674 E0074214 F7B60038 */ sdc1 $f22, 0x38($sp) /* 376678 E0074218 F7B40030 */ sdc1 $f20, 0x30($sp) /* 37667C E007421C 8E440000 */ lw $a0, 0x0($s2) /* 376680 E0074220 8E43000C */ lw $v1, 0xC($s2) /* 376684 E0074224 30820010 */ andi $v0, $a0, 0x10 /* 376688 E0074228 10400005 */ beqz $v0, .LE0074240 /* 37668C E007422C 2402FFEF */ addiu $v0, $zero, -0x11 /* 376690 E0074230 00821024 */ and $v0, $a0, $v0 /* 376694 E0074234 AE420000 */ sw $v0, 0x0($s2) /* 376698 E0074238 24020010 */ addiu $v0, $zero, 0x10 /* 37669C E007423C AC620038 */ sw $v0, 0x38($v1) .LE0074240: /* 3766A0 E0074240 8C640038 */ lw $a0, 0x38($v1) /* 3766A4 E0074244 288203E8 */ slti $v0, $a0, 0x3E8 /* 3766A8 E0074248 10400002 */ beqz $v0, .LE0074254 /* 3766AC E007424C 2482FFFF */ addiu $v0, $a0, -0x1 /* 3766B0 E0074250 AC620038 */ sw $v0, 0x38($v1) .LE0074254: /* 3766B4 E0074254 8C62003C */ lw $v0, 0x3C($v1) /* 3766B8 E0074258 8C640038 */ lw $a0, 0x38($v1) /* 3766BC E007425C 24420001 */ addiu $v0, $v0, 0x1 /* 3766C0 E0074260 04810005 */ bgez $a0, .LE0074278 /* 3766C4 E0074264 AC62003C */ sw $v0, 0x3C($v1) /* 3766C8 E0074268 0C080128 */ jal shim_remove_effect /* 3766CC E007426C 0240202D */ daddu $a0, $s2, $zero /* 3766D0 E0074270 0801D159 */ j .LE0074564 /* 3766D4 E0074274 00000000 */ nop .LE0074278: /* 3766D8 E0074278 28820008 */ slti $v0, $a0, 0x8 /* 3766DC E007427C 10400002 */ beqz $v0, .LE0074288 /* 3766E0 E0074280 00041140 */ sll $v0, $a0, 5 /* 3766E4 E0074284 AC62004C */ sw $v0, 0x4C($v1) .LE0074288: /* 3766E8 E0074288 C47E0010 */ lwc1 $f30, 0x10($v1) /* 3766EC E007428C C47C0014 */ lwc1 $f28, 0x14($v1) /* 3766F0 E0074290 E7BC0010 */ swc1 $f28, 0x10($sp) /* 3766F4 E0074294 8E420008 */ lw $v0, 0x8($s2) /* 3766F8 E0074298 24110001 */ addiu $s1, $zero, 0x1 /* 3766FC E007429C 0222102A */ slt $v0, $s1, $v0 /* 376700 E00742A0 104000B0 */ beqz $v0, .LE0074564 /* 376704 E00742A4 2463006C */ addiu $v1, $v1, 0x6C /* 376708 E00742A8 3C13E007 */ lui $s3, %hi(D_E0074B80) /* 37670C E00742AC 26734B80 */ addiu $s3, $s3, %lo(D_E0074B80) /* 376710 E00742B0 24700020 */ addiu $s0, $v1, 0x20 /* 376714 E00742B4 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 376718 E00742B8 4481C800 */ mtc1 $at, $f25 /* 37671C E00742BC 4480C000 */ mtc1 $zero, $f24 /* 376720 E00742C0 3C01E007 */ lui $at, (0xE0074BF0 >> 16) /* 376724 E00742C4 D43A4BF0 */ ldc1 $f26, (0xE0074BF0 & 0xFFFF)($at) .LE00742C8: /* 376728 E00742C8 8E020010 */ lw $v0, 0x10($s0) /* 37672C E00742CC 24420001 */ addiu $v0, $v0, 0x1 /* 376730 E00742D0 AE020010 */ sw $v0, 0x10($s0) /* 376734 E00742D4 28420014 */ slti $v0, $v0, 0x14 /* 376738 E00742D8 50400001 */ beql $v0, $zero, .LE00742E0 /* 37673C E00742DC AE000010 */ sw $zero, 0x10($s0) .LE00742E0: /* 376740 E00742E0 8E020010 */ lw $v0, 0x10($s0) /* 376744 E00742E4 0442009B */ bltzl $v0, .LE0074554 /* 376748 E00742E8 26310001 */ addiu $s1, $s1, 0x1 /* 37674C E00742EC 14400055 */ bnez $v0, .LE0074444 /* 376750 E00742F0 00000000 */ nop /* 376754 E00742F4 0C080138 */ jal shim_rand_int /* 376758 E00742F8 24040167 */ addiu $a0, $zero, 0x167 /* 37675C E00742FC 4482A000 */ mtc1 $v0, $f20 /* 376760 E0074300 00000000 */ nop /* 376764 E0074304 4680A520 */ cvt.s.w $f20, $f20 /* 376768 E0074308 0C080138 */ jal shim_rand_int /* 37676C E007430C 24040167 */ addiu $a0, $zero, 0x167 /* 376770 E0074310 0C080140 */ jal shim_sin_deg /* 376774 E0074314 4600A306 */ mov.s $f12, $f20 /* 376778 E0074318 4600F002 */ mul.s $f0, $f30, $f0 /* 37677C E007431C 00000000 */ nop /* 376780 E0074320 C7BC0010 */ lwc1 $f28, 0x10($sp) /* 376784 E0074324 4600E70D */ trunc.w.s $f28, $f28 /* 376788 E0074328 4404E000 */ mfc1 $a0, $f28 /* 37678C E007432C 0C080138 */ jal shim_rand_int /* 376790 E0074330 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 376794 E0074334 C7BC0010 */ lwc1 $f28, 0x10($sp) /* 376798 E0074338 4600E0A1 */ cvt.d.s $f2, $f28 /* 37679C E007433C 46381082 */ mul.d $f2, $f2, $f24 /* 3767A0 E0074340 00000000 */ nop /* 3767A4 E0074344 44820000 */ mtc1 $v0, $f0 /* 3767A8 E0074348 00000000 */ nop /* 3767AC E007434C 46800021 */ cvt.d.w $f0, $f0 /* 3767B0 E0074350 46220001 */ sub.d $f0, $f0, $f2 /* 3767B4 E0074354 4600A306 */ mov.s $f12, $f20 /* 3767B8 E0074358 46200020 */ cvt.s.d $f0, $f0 /* 3767BC E007435C 0C080144 */ jal shim_cos_deg /* 3767C0 E0074360 E600FFE8 */ swc1 $f0, -0x18($s0) /* 3767C4 E0074364 4600F002 */ mul.s $f0, $f30, $f0 /* 3767C8 E0074368 00000000 */ nop /* 3767CC E007436C 4600A306 */ mov.s $f12, $f20 /* 3767D0 E0074370 0C080140 */ jal shim_sin_deg /* 3767D4 E0074374 E600FFEC */ swc1 $f0, -0x14($s0) /* 3767D8 E0074378 C602FFE8 */ lwc1 $f2, -0x18($s0) /* 3767DC E007437C 3C01E007 */ lui $at, (0xE0074BF8 >> 16) /* 3767E0 E0074380 D4244BF8 */ ldc1 $f4, (0xE0074BF8 & 0xFFFF)($at) /* 3767E4 E0074384 460010A1 */ cvt.d.s $f2, $f2 /* 3767E8 E0074388 46241082 */ mul.d $f2, $f2, $f4 /* 3767EC E007438C 00000000 */ nop /* 3767F0 E0074390 3C014170 */ lui $at, (0x41700000 >> 16) /* 3767F4 E0074394 4481E000 */ mtc1 $at, $f28 /* 3767F8 E0074398 00000000 */ nop /* 3767FC E007439C 461C0002 */ mul.s $f0, $f0, $f28 /* 376800 E00743A0 00000000 */ nop /* 376804 E00743A4 4600A306 */ mov.s $f12, $f20 /* 376808 E00743A8 E600FFF8 */ swc1 $f0, -0x8($s0) /* 37680C E00743AC 462010A0 */ cvt.s.d $f2, $f2 /* 376810 E00743B0 0C080144 */ jal shim_cos_deg /* 376814 E00743B4 E602FFFC */ swc1 $f2, -0x4($s0) /* 376818 E00743B8 C604FFF8 */ lwc1 $f4, -0x8($s0) /* 37681C E00743BC 46002121 */ cvt.d.s $f4, $f4 /* 376820 E00743C0 46382102 */ mul.d $f4, $f4, $f24 /* 376824 E00743C4 00000000 */ nop /* 376828 E00743C8 C602FFFC */ lwc1 $f2, -0x4($s0) /* 37682C E00743CC 460010A1 */ cvt.d.s $f2, $f2 /* 376830 E00743D0 46381082 */ mul.d $f2, $f2, $f24 /* 376834 E00743D4 00000000 */ nop /* 376838 E00743D8 461C0002 */ mul.s $f0, $f0, $f28 /* 37683C E00743DC 00000000 */ nop /* 376840 E00743E0 E6000000 */ swc1 $f0, 0x0($s0) /* 376844 E00743E4 46000021 */ cvt.d.s $f0, $f0 /* 376848 E00743E8 46380002 */ mul.d $f0, $f0, $f24 /* 37684C E00743EC 00000000 */ nop /* 376850 E00743F0 2404000F */ addiu $a0, $zero, 0xF /* 376854 E00743F4 46202120 */ cvt.s.d $f4, $f4 /* 376858 E00743F8 462010A0 */ cvt.s.d $f2, $f2 /* 37685C E00743FC E6040004 */ swc1 $f4, 0x4($s0) /* 376860 E0074400 E6020008 */ swc1 $f2, 0x8($s0) /* 376864 E0074404 46200020 */ cvt.s.d $f0, $f0 /* 376868 E0074408 0C080138 */ jal shim_rand_int /* 37686C E007440C E600000C */ swc1 $f0, 0xC($s0) /* 376870 E0074410 2404000F */ addiu $a0, $zero, 0xF /* 376874 E0074414 44820000 */ mtc1 $v0, $f0 /* 376878 E0074418 00000000 */ nop /* 37687C E007441C 46800020 */ cvt.s.w $f0, $f0 /* 376880 E0074420 0C080138 */ jal shim_rand_int /* 376884 E0074424 E6000044 */ swc1 $f0, 0x44($s0) /* 376888 E0074428 44820000 */ mtc1 $v0, $f0 /* 37688C E007442C 00000000 */ nop /* 376890 E0074430 46800020 */ cvt.s.w $f0, $f0 /* 376894 E0074434 240200FF */ addiu $v0, $zero, 0xFF /* 376898 E0074438 E6000048 */ swc1 $f0, 0x48($s0) /* 37689C E007443C AE000014 */ sw $zero, 0x14($s0) /* 3768A0 E0074440 AE02002C */ sw $v0, 0x2C($s0) .LE0074444: /* 3768A4 E0074444 C610FFF8 */ lwc1 $f16, -0x8($s0) /* 3768A8 E0074448 C60A0004 */ lwc1 $f10, 0x4($s0) /* 3768AC E007444C 46105281 */ sub.s $f10, $f10, $f16 /* 3768B0 E0074450 460052A1 */ cvt.d.s $f10, $f10 /* 3768B4 E0074454 463A5282 */ mul.d $f10, $f10, $f26 /* 3768B8 E0074458 00000000 */ nop /* 3768BC E007445C C60EFFFC */ lwc1 $f14, -0x4($s0) /* 3768C0 E0074460 C60C0008 */ lwc1 $f12, 0x8($s0) /* 3768C4 E0074464 460E6301 */ sub.s $f12, $f12, $f14 /* 3768C8 E0074468 46006321 */ cvt.d.s $f12, $f12 /* 3768CC E007446C 463A6302 */ mul.d $f12, $f12, $f26 /* 3768D0 E0074470 00000000 */ nop /* 3768D4 E0074474 C6060000 */ lwc1 $f6, 0x0($s0) /* 3768D8 E0074478 C608000C */ lwc1 $f8, 0xC($s0) /* 3768DC E007447C 46064201 */ sub.s $f8, $f8, $f6 /* 3768E0 E0074480 8E020010 */ lw $v0, 0x10($s0) /* 3768E4 E0074484 46004221 */ cvt.d.s $f8, $f8 /* 3768E8 E0074488 463A4202 */ mul.d $f8, $f8, $f26 /* 3768EC E007448C 00000000 */ nop /* 3768F0 E0074490 C6000014 */ lwc1 $f0, 0x14($s0) /* 3768F4 E0074494 3C014080 */ lui $at, (0x40800000 >> 16) /* 3768F8 E0074498 44811000 */ mtc1 $at, $f2 /* 3768FC E007449C C614FFE4 */ lwc1 $f20, -0x1C($s0) /* 376900 E00744A0 C612FFE8 */ lwc1 $f18, -0x18($s0) /* 376904 E00744A4 C604FFEC */ lwc1 $f4, -0x14($s0) /* 376908 E00744A8 00021080 */ sll $v0, $v0, 2 /* 37690C E00744AC 00531021 */ addu $v0, $v0, $s3 /* 376910 E00744B0 46020000 */ add.s $f0, $f0, $f2 /* 376914 E00744B4 C4560000 */ lwc1 $f22, 0x0($v0) /* 376918 E00744B8 C6020044 */ lwc1 $f2, 0x44($s0) /* 37691C E00744BC 4616B580 */ add.s $f22, $f22, $f22 /* 376920 E00744C0 E6000014 */ swc1 $f0, 0x14($s0) /* 376924 E00744C4 46008006 */ mov.s $f0, $f16 /* 376928 E00744C8 4600A500 */ add.s $f20, $f20, $f0 /* 37692C E00744CC 460010A1 */ cvt.d.s $f2, $f2 /* 376930 E00744D0 46007006 */ mov.s $f0, $f14 /* 376934 E00744D4 46009480 */ add.s $f18, $f18, $f0 /* 376938 E00744D8 46003006 */ mov.s $f0, $f6 /* 37693C E00744DC 46008421 */ cvt.d.s $f16, $f16 /* 376940 E00744E0 46002100 */ add.s $f4, $f4, $f0 /* 376944 E00744E4 460073A1 */ cvt.d.s $f14, $f14 /* 376948 E00744E8 460031A1 */ cvt.d.s $f6, $f6 /* 37694C E00744EC E604FFEC */ swc1 $f4, -0x14($s0) /* 376950 E00744F0 3C01E007 */ lui $at, (0xE0074C00 >> 16) /* 376954 E00744F4 D4244C00 */ ldc1 $f4, (0xE0074C00 & 0xFFFF)($at) /* 376958 E00744F8 C6000048 */ lwc1 $f0, 0x48($s0) /* 37695C E00744FC 46241080 */ add.d $f2, $f2, $f4 /* 376960 E0074500 3C01E007 */ lui $at, (0xE0074C08 >> 16) /* 376964 E0074504 D4244C08 */ ldc1 $f4, (0xE0074C08 & 0xFFFF)($at) /* 376968 E0074508 46000021 */ cvt.d.s $f0, $f0 /* 37696C E007450C E6160040 */ swc1 $f22, 0x40($s0) /* 376970 E0074510 46240000 */ add.d $f0, $f0, $f4 /* 376974 E0074514 E614FFE4 */ swc1 $f20, -0x1C($s0) /* 376978 E0074518 E612FFE8 */ swc1 $f18, -0x18($s0) /* 37697C E007451C 462A8400 */ add.d $f16, $f16, $f10 /* 376980 E0074520 462010A0 */ cvt.s.d $f2, $f2 /* 376984 E0074524 E6020044 */ swc1 $f2, 0x44($s0) /* 376988 E0074528 462C7380 */ add.d $f14, $f14, $f12 /* 37698C E007452C 46200020 */ cvt.s.d $f0, $f0 /* 376990 E0074530 E6000048 */ swc1 $f0, 0x48($s0) /* 376994 E0074534 46283180 */ add.d $f6, $f6, $f8 /* 376998 E0074538 46208420 */ cvt.s.d $f16, $f16 /* 37699C E007453C 462073A0 */ cvt.s.d $f14, $f14 /* 3769A0 E0074540 462031A0 */ cvt.s.d $f6, $f6 /* 3769A4 E0074544 E610FFF8 */ swc1 $f16, -0x8($s0) /* 3769A8 E0074548 E60EFFFC */ swc1 $f14, -0x4($s0) /* 3769AC E007454C E6060000 */ swc1 $f6, 0x0($s0) /* 3769B0 E0074550 26310001 */ addiu $s1, $s1, 0x1 .LE0074554: /* 3769B4 E0074554 8E420008 */ lw $v0, 0x8($s2) /* 3769B8 E0074558 0222102A */ slt $v0, $s1, $v0 /* 3769BC E007455C 1440FF5A */ bnez $v0, .LE00742C8 /* 3769C0 E0074560 2610006C */ addiu $s0, $s0, 0x6C .LE0074564: /* 3769C4 E0074564 8FBF0028 */ lw $ra, 0x28($sp) /* 3769C8 E0074568 8FB30024 */ lw $s3, 0x24($sp) /* 3769CC E007456C 8FB20020 */ lw $s2, 0x20($sp) /* 3769D0 E0074570 8FB1001C */ lw $s1, 0x1C($sp) /* 3769D4 E0074574 8FB00018 */ lw $s0, 0x18($sp) /* 3769D8 E0074578 D7BE0058 */ ldc1 $f30, 0x58($sp) /* 3769DC E007457C D7BC0050 */ ldc1 $f28, 0x50($sp) /* 3769E0 E0074580 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 3769E4 E0074584 D7B80040 */ ldc1 $f24, 0x40($sp) /* 3769E8 E0074588 D7B60038 */ ldc1 $f22, 0x38($sp) /* 3769EC E007458C D7B40030 */ ldc1 $f20, 0x30($sp) /* 3769F0 E0074590 03E00008 */ jr $ra /* 3769F4 E0074594 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void shimmer_wave_update(EffectInstance* effect) { ShimmerWaveFXData* part = effect->data.shimmerWave; 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_E0074B80)) { part->unk_30 = 0; } if (part->unk_30 >= 0) { if (part->unk_30 == 0) { f32 rand = shim_rand_int(359); shim_rand_int(359); part->unk_04 = unk_10 * shim_sin_deg(rand); part->unk_08 = shim_rand_int(unk_14) - unk_14 * 0.5; part->unk_0C = unk_10 * shim_cos_deg(rand); part->unk_18 = shim_sin_deg(rand) * 15.0f; part->unk_1C = part->unk_08 * 0.4; part->unk_20 = shim_cos_deg(rand) * 15.0f; part->unk_24 = part->unk_18 * 0.5; part->unk_28 = part->unk_1C * 0.5; part->unk_2C = part->unk_20 * 0.5; 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 = 2.0f * D_E0074B80[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 crash_screen_draw /* 77B0 8002C3B0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 77B4 8002C3B4 AFB1001C */ sw $s1, 0x1C($sp) /* 77B8 8002C3B8 0080882D */ daddu $s1, $a0, $zero /* 77BC 8002C3BC AFB20020 */ sw $s2, 0x20($sp) /* 77C0 8002C3C0 26320020 */ addiu $s2, $s1, 0x20 /* 77C4 8002C3C4 AFBF0024 */ sw $ra, 0x24($sp) /* 77C8 8002C3C8 AFB00018 */ sw $s0, 0x18($sp) /* 77CC 8002C3CC 8E220120 */ lw $v0, 0x120($s1) /* 77D0 8002C3D0 24030017 */ addiu $v1, $zero, 0x17 /* 77D4 8002C3D4 00021082 */ srl $v0, $v0, 2 /* 77D8 8002C3D8 3042001F */ andi $v0, $v0, 0x1F /* 77DC 8002C3DC 14430002 */ bne $v0, $v1, .L8002C3E8 /* 77E0 8002C3E0 0040802D */ daddu $s0, $v0, $zero /* 77E4 8002C3E4 24100010 */ addiu $s0, $zero, 0x10 .L8002C3E8: /* 77E8 8002C3E8 2402001F */ addiu $v0, $zero, 0x1F /* 77EC 8002C3EC 52020001 */ beql $s0, $v0, .L8002C3F4 /* 77F0 8002C3F0 24100011 */ addiu $s0, $zero, 0x11 .L8002C3F4: /* 77F4 8002C3F4 0C018634 */ jal osWritebackDCacheAll /* 77F8 8002C3F8 00000000 */ nop /* 77FC 8002C3FC 24040019 */ addiu $a0, $zero, 0x19 /* 7800 8002C400 24050014 */ addiu $a1, $zero, 0x14 /* 7804 8002C404 2406010E */ addiu $a2, $zero, 0x10E /* 7808 8002C408 0C00AFEC */ jal crash_screen_draw_rect /* 780C 8002C40C 0080382D */ daddu $a3, $a0, $zero /* 7810 8002C410 2404001E */ addiu $a0, $zero, 0x1E /* 7814 8002C414 00101080 */ sll $v0, $s0, 2 /* 7818 8002C418 3C018007 */ lui $at, %hi(gFaultCauses) /* 781C 8002C41C 00220821 */ addu $at, $at, $v0 /* 7820 8002C420 8C227390 */ lw $v0, %lo(gFaultCauses)($at) /* 7824 8002C424 AFA20010 */ sw $v0, 0x10($sp) /* 7828 8002C428 8E270014 */ lw $a3, 0x14($s1) /* 782C 8002C42C 3C06800A */ lui $a2, %hi(D_80098064) /* 7830 8002C430 24C68064 */ addiu $a2, $a2, %lo(D_80098064) /* 7834 8002C434 0C00B082 */ jal crash_screen_printf /* 7838 8002C438 24050019 */ addiu $a1, $zero, 0x19 /* 783C 8002C43C 8E220118 */ lw $v0, 0x118($s1) /* 7840 8002C440 2404001E */ addiu $a0, $zero, 0x1E /* 7844 8002C444 AFA20010 */ sw $v0, 0x10($sp) /* 7848 8002C448 8E220124 */ lw $v0, 0x124($s1) /* 784C 8002C44C AFA20014 */ sw $v0, 0x14($sp) /* 7850 8002C450 8E27011C */ lw $a3, 0x11C($s1) /* 7854 8002C454 3C06800A */ lui $a2, %hi(D_80098074) /* 7858 8002C458 24C68074 */ addiu $a2, $a2, %lo(D_80098074) /* 785C 8002C45C 0C00B082 */ jal crash_screen_printf /* 7860 8002C460 24050023 */ addiu $a1, $zero, 0x23 /* 7864 8002C464 0C00AFD0 */ jal crash_screen_sleep /* 7868 8002C468 240407D0 */ addiu $a0, $zero, 0x7D0 /* 786C 8002C46C 0C019CE0 */ jal osViBlack /* 7870 8002C470 0000202D */ daddu $a0, $zero, $zero /* 7874 8002C474 0C019CF8 */ jal osViRepeatLine /* 7878 8002C478 0000202D */ daddu $a0, $zero, $zero /* 787C 8002C47C 3C04800A */ lui $a0, %hi(D_8009C4FC) /* 7880 8002C480 8C84C4FC */ lw $a0, %lo(D_8009C4FC)($a0) /* 7884 8002C484 0C019C08 */ jal osViSwapBuffer /* 7888 8002C488 00000000 */ nop /* 788C 8002C48C 24040019 */ addiu $a0, $zero, 0x19 /* 7890 8002C490 2405002D */ addiu $a1, $zero, 0x2D /* 7894 8002C494 2406010E */ addiu $a2, $zero, 0x10E /* 7898 8002C498 0C00AFEC */ jal crash_screen_draw_rect /* 789C 8002C49C 240700B9 */ addiu $a3, $zero, 0xB9 /* 78A0 8002C4A0 8E22002C */ lw $v0, 0x2C($s1) /* 78A4 8002C4A4 2404001E */ addiu $a0, $zero, 0x1E /* 78A8 8002C4A8 AFA20010 */ sw $v0, 0x10($sp) /* 78AC 8002C4AC 8E220034 */ lw $v0, 0x34($s1) /* 78B0 8002C4B0 AFA20014 */ sw $v0, 0x14($sp) /* 78B4 8002C4B4 8E270024 */ lw $a3, 0x24($s1) /* 78B8 8002C4B8 3C06800A */ lui $a2, %hi(D_80098094) /* 78BC 8002C4BC 24C68094 */ addiu $a2, $a2, %lo(D_80098094) /* 78C0 8002C4C0 0C00B082 */ jal crash_screen_printf /* 78C4 8002C4C4 24050032 */ addiu $a1, $zero, 0x32 /* 78C8 8002C4C8 8E220044 */ lw $v0, 0x44($s1) /* 78CC 8002C4CC 2404001E */ addiu $a0, $zero, 0x1E /* 78D0 8002C4D0 AFA20010 */ sw $v0, 0x10($sp) /* 78D4 8002C4D4 8E22004C */ lw $v0, 0x4C($s1) /* 78D8 8002C4D8 AFA20014 */ sw $v0, 0x14($sp) /* 78DC 8002C4DC 8E27003C */ lw $a3, 0x3C($s1) /* 78E0 8002C4E0 3C06800A */ lui $a2, %hi(D_800980B4) /* 78E4 8002C4E4 24C680B4 */ addiu $a2, $a2, %lo(D_800980B4) /* 78E8 8002C4E8 0C00B082 */ jal crash_screen_printf /* 78EC 8002C4EC 2405003C */ addiu $a1, $zero, 0x3C /* 78F0 8002C4F0 8E22005C */ lw $v0, 0x5C($s1) /* 78F4 8002C4F4 2404001E */ addiu $a0, $zero, 0x1E /* 78F8 8002C4F8 AFA20010 */ sw $v0, 0x10($sp) /* 78FC 8002C4FC 8E220064 */ lw $v0, 0x64($s1) /* 7900 8002C500 AFA20014 */ sw $v0, 0x14($sp) /* 7904 8002C504 8E270054 */ lw $a3, 0x54($s1) /* 7908 8002C508 3C06800A */ lui $a2, %hi(D_800980D4) /* 790C 8002C50C 24C680D4 */ addiu $a2, $a2, %lo(D_800980D4) /* 7910 8002C510 0C00B082 */ jal crash_screen_printf /* 7914 8002C514 24050046 */ addiu $a1, $zero, 0x46 /* 7918 8002C518 8E220074 */ lw $v0, 0x74($s1) /* 791C 8002C51C 2404001E */ addiu $a0, $zero, 0x1E /* 7920 8002C520 AFA20010 */ sw $v0, 0x10($sp) /* 7924 8002C524 8E22007C */ lw $v0, 0x7C($s1) /* 7928 8002C528 AFA20014 */ sw $v0, 0x14($sp) /* 792C 8002C52C 8E27006C */ lw $a3, 0x6C($s1) /* 7930 8002C530 3C06800A */ lui $a2, %hi(D_800980F4) /* 7934 8002C534 24C680F4 */ addiu $a2, $a2, %lo(D_800980F4) /* 7938 8002C538 0C00B082 */ jal crash_screen_printf /* 793C 8002C53C 24050050 */ addiu $a1, $zero, 0x50 /* 7940 8002C540 8E22008C */ lw $v0, 0x8C($s1) /* 7944 8002C544 2404001E */ addiu $a0, $zero, 0x1E /* 7948 8002C548 AFA20010 */ sw $v0, 0x10($sp) /* 794C 8002C54C 8E220094 */ lw $v0, 0x94($s1) /* 7950 8002C550 AFA20014 */ sw $v0, 0x14($sp) /* 7954 8002C554 8E270084 */ lw $a3, 0x84($s1) /* 7958 8002C558 3C06800A */ lui $a2, %hi(D_80098114) /* 795C 8002C55C 24C68114 */ addiu $a2, $a2, %lo(D_80098114) /* 7960 8002C560 0C00B082 */ jal crash_screen_printf /* 7964 8002C564 2405005A */ addiu $a1, $zero, 0x5A /* 7968 8002C568 8E2200A4 */ lw $v0, 0xA4($s1) /* 796C 8002C56C 2404001E */ addiu $a0, $zero, 0x1E /* 7970 8002C570 AFA20010 */ sw $v0, 0x10($sp) /* 7974 8002C574 8E2200AC */ lw $v0, 0xAC($s1) /* 7978 8002C578 AFA20014 */ sw $v0, 0x14($sp) /* 797C 8002C57C 8E27009C */ lw $a3, 0x9C($s1) /* 7980 8002C580 3C06800A */ lui $a2, %hi(D_80098134) /* 7984 8002C584 24C68134 */ addiu $a2, $a2, %lo(D_80098134) /* 7988 8002C588 0C00B082 */ jal crash_screen_printf /* 798C 8002C58C 24050064 */ addiu $a1, $zero, 0x64 /* 7990 8002C590 8E2200BC */ lw $v0, 0xBC($s1) /* 7994 8002C594 2404001E */ addiu $a0, $zero, 0x1E /* 7998 8002C598 AFA20010 */ sw $v0, 0x10($sp) /* 799C 8002C59C 8E2200C4 */ lw $v0, 0xC4($s1) /* 79A0 8002C5A0 AFA20014 */ sw $v0, 0x14($sp) /* 79A4 8002C5A4 8E2700B4 */ lw $a3, 0xB4($s1) /* 79A8 8002C5A8 3C06800A */ lui $a2, %hi(D_80098154) /* 79AC 8002C5AC 24C68154 */ addiu $a2, $a2, %lo(D_80098154) /* 79B0 8002C5B0 0C00B082 */ jal crash_screen_printf /* 79B4 8002C5B4 2405006E */ addiu $a1, $zero, 0x6E /* 79B8 8002C5B8 8E2200D4 */ lw $v0, 0xD4($s1) /* 79BC 8002C5BC 2404001E */ addiu $a0, $zero, 0x1E /* 79C0 8002C5C0 AFA20010 */ sw $v0, 0x10($sp) /* 79C4 8002C5C4 8E2200DC */ lw $v0, 0xDC($s1) /* 79C8 8002C5C8 AFA20014 */ sw $v0, 0x14($sp) /* 79CC 8002C5CC 8E2700CC */ lw $a3, 0xCC($s1) /* 79D0 8002C5D0 3C06800A */ lui $a2, %hi(D_80098174) /* 79D4 8002C5D4 24C68174 */ addiu $a2, $a2, %lo(D_80098174) /* 79D8 8002C5D8 0C00B082 */ jal crash_screen_printf /* 79DC 8002C5DC 24050078 */ addiu $a1, $zero, 0x78 /* 79E0 8002C5E0 8E2200EC */ lw $v0, 0xEC($s1) /* 79E4 8002C5E4 2404001E */ addiu $a0, $zero, 0x1E /* 79E8 8002C5E8 AFA20010 */ sw $v0, 0x10($sp) /* 79EC 8002C5EC 8E2200F4 */ lw $v0, 0xF4($s1) /* 79F0 8002C5F0 AFA20014 */ sw $v0, 0x14($sp) /* 79F4 8002C5F4 8E2700E4 */ lw $a3, 0xE4($s1) /* 79F8 8002C5F8 3C06800A */ lui $a2, %hi(D_80098194) /* 79FC 8002C5FC 24C68194 */ addiu $a2, $a2, %lo(D_80098194) /* 7A00 8002C600 0C00B082 */ jal crash_screen_printf /* 7A04 8002C604 24050082 */ addiu $a1, $zero, 0x82 /* 7A08 8002C608 2404001E */ addiu $a0, $zero, 0x1E /* 7A0C 8002C60C 8E220104 */ lw $v0, 0x104($s1) /* 7A10 8002C610 AFA20010 */ sw $v0, 0x10($sp) /* 7A14 8002C614 8E2700FC */ lw $a3, 0xFC($s1) /* 7A18 8002C618 3C06800A */ lui $a2, %hi(D_800981B4) /* 7A1C 8002C61C 24C681B4 */ addiu $a2, $a2, %lo(D_800981B4) /* 7A20 8002C620 0C00B082 */ jal crash_screen_printf /* 7A24 8002C624 2405008C */ addiu $a1, $zero, 0x8C /* 7A28 8002C628 8E24012C */ lw $a0, 0x12C($s1) /* 7A2C 8002C62C 0C00B0C9 */ jal crash_screen_print_fpcsr /* 7A30 8002C630 00000000 */ nop /* 7A34 8002C634 2404001E */ addiu $a0, $zero, 0x1E /* 7A38 8002C638 240500AA */ addiu $a1, $zero, 0xAA /* 7A3C 8002C63C 0000302D */ daddu $a2, $zero, $zero /* 7A40 8002C640 0C00B0AE */ jal crash_screen_print_fpr /* 7A44 8002C644 26270134 */ addiu $a3, $s1, 0x134 /* 7A48 8002C648 24040078 */ addiu $a0, $zero, 0x78 /* 7A4C 8002C64C 240500AA */ addiu $a1, $zero, 0xAA /* 7A50 8002C650 24060002 */ addiu $a2, $zero, 0x2 /* 7A54 8002C654 0C00B0AE */ jal crash_screen_print_fpr /* 7A58 8002C658 2627013C */ addiu $a3, $s1, 0x13C /* 7A5C 8002C65C 240400D2 */ addiu $a0, $zero, 0xD2 /* 7A60 8002C660 240500AA */ addiu $a1, $zero, 0xAA /* 7A64 8002C664 24060004 */ addiu $a2, $zero, 0x4 /* 7A68 8002C668 0C00B0AE */ jal crash_screen_print_fpr /* 7A6C 8002C66C 26270144 */ addiu $a3, $s1, 0x144 /* 7A70 8002C670 2404001E */ addiu $a0, $zero, 0x1E /* 7A74 8002C674 240500B4 */ addiu $a1, $zero, 0xB4 /* 7A78 8002C678 24060006 */ addiu $a2, $zero, 0x6 /* 7A7C 8002C67C 0C00B0AE */ jal crash_screen_print_fpr /* 7A80 8002C680 2627014C */ addiu $a3, $s1, 0x14C /* 7A84 8002C684 24040078 */ addiu $a0, $zero, 0x78 /* 7A88 8002C688 240500B4 */ addiu $a1, $zero, 0xB4 /* 7A8C 8002C68C 24060008 */ addiu $a2, $zero, 0x8 /* 7A90 8002C690 0C00B0AE */ jal crash_screen_print_fpr /* 7A94 8002C694 26270154 */ addiu $a3, $s1, 0x154 /* 7A98 8002C698 240400D2 */ addiu $a0, $zero, 0xD2 /* 7A9C 8002C69C 240500B4 */ addiu $a1, $zero, 0xB4 /* 7AA0 8002C6A0 2406000A */ addiu $a2, $zero, 0xA /* 7AA4 8002C6A4 0C00B0AE */ jal crash_screen_print_fpr /* 7AA8 8002C6A8 2627015C */ addiu $a3, $s1, 0x15C /* 7AAC 8002C6AC 2404001E */ addiu $a0, $zero, 0x1E /* 7AB0 8002C6B0 240500BE */ addiu $a1, $zero, 0xBE /* 7AB4 8002C6B4 2406000C */ addiu $a2, $zero, 0xC /* 7AB8 8002C6B8 0C00B0AE */ jal crash_screen_print_fpr /* 7ABC 8002C6BC 26270164 */ addiu $a3, $s1, 0x164 /* 7AC0 8002C6C0 24040078 */ addiu $a0, $zero, 0x78 /* 7AC4 8002C6C4 240500BE */ addiu $a1, $zero, 0xBE /* 7AC8 8002C6C8 2406000E */ addiu $a2, $zero, 0xE /* 7ACC 8002C6CC 0C00B0AE */ jal crash_screen_print_fpr /* 7AD0 8002C6D0 2627016C */ addiu $a3, $s1, 0x16C /* 7AD4 8002C6D4 240400D2 */ addiu $a0, $zero, 0xD2 /* 7AD8 8002C6D8 240500BE */ addiu $a1, $zero, 0xBE /* 7ADC 8002C6DC 24060010 */ addiu $a2, $zero, 0x10 /* 7AE0 8002C6E0 0C00B0AE */ jal crash_screen_print_fpr /* 7AE4 8002C6E4 26270174 */ addiu $a3, $s1, 0x174 /* 7AE8 8002C6E8 2404001E */ addiu $a0, $zero, 0x1E /* 7AEC 8002C6EC 240500C8 */ addiu $a1, $zero, 0xC8 /* 7AF0 8002C6F0 24060012 */ addiu $a2, $zero, 0x12 /* 7AF4 8002C6F4 0C00B0AE */ jal crash_screen_print_fpr /* 7AF8 8002C6F8 2627017C */ addiu $a3, $s1, 0x17C /* 7AFC 8002C6FC 24040078 */ addiu $a0, $zero, 0x78 /* 7B00 8002C700 240500C8 */ addiu $a1, $zero, 0xC8 /* 7B04 8002C704 24060014 */ addiu $a2, $zero, 0x14 /* 7B08 8002C708 0C00B0AE */ jal crash_screen_print_fpr /* 7B0C 8002C70C 26270184 */ addiu $a3, $s1, 0x184 /* 7B10 8002C710 240400D2 */ addiu $a0, $zero, 0xD2 /* 7B14 8002C714 240500C8 */ addiu $a1, $zero, 0xC8 /* 7B18 8002C718 24060016 */ addiu $a2, $zero, 0x16 /* 7B1C 8002C71C 0C00B0AE */ jal crash_screen_print_fpr /* 7B20 8002C720 2627018C */ addiu $a3, $s1, 0x18C /* 7B24 8002C724 2404001E */ addiu $a0, $zero, 0x1E /* 7B28 8002C728 240500D2 */ addiu $a1, $zero, 0xD2 /* 7B2C 8002C72C 24060018 */ addiu $a2, $zero, 0x18 /* 7B30 8002C730 0C00B0AE */ jal crash_screen_print_fpr /* 7B34 8002C734 26270194 */ addiu $a3, $s1, 0x194 /* 7B38 8002C738 24040078 */ addiu $a0, $zero, 0x78 /* 7B3C 8002C73C 240500D2 */ addiu $a1, $zero, 0xD2 /* 7B40 8002C740 2406001A */ addiu $a2, $zero, 0x1A /* 7B44 8002C744 0C00B0AE */ jal crash_screen_print_fpr /* 7B48 8002C748 2627019C */ addiu $a3, $s1, 0x19C /* 7B4C 8002C74C 240400D2 */ addiu $a0, $zero, 0xD2 /* 7B50 8002C750 0080282D */ daddu $a1, $a0, $zero /* 7B54 8002C754 2406001C */ addiu $a2, $zero, 0x1C /* 7B58 8002C758 0C00B0AE */ jal crash_screen_print_fpr /* 7B5C 8002C75C 262701A4 */ addiu $a3, $s1, 0x1A4 /* 7B60 8002C760 2404001E */ addiu $a0, $zero, 0x1E /* 7B64 8002C764 240500DC */ addiu $a1, $zero, 0xDC /* 7B68 8002C768 0080302D */ daddu $a2, $a0, $zero /* 7B6C 8002C76C 0C00B0AE */ jal crash_screen_print_fpr /* 7B70 8002C770 262701AC */ addiu $a3, $s1, 0x1AC /* 7B74 8002C774 0C00AFD0 */ jal crash_screen_sleep /* 7B78 8002C778 240401F4 */ addiu $a0, $zero, 0x1F4 /* 7B7C 8002C77C 240400D2 */ addiu $a0, $zero, 0xD2 /* 7B80 8002C780 8E4200FC */ lw $v0, 0xFC($s2) /* 7B84 8002C784 8C470000 */ lw $a3, 0x0($v0) /* 7B88 8002C788 3C06800A */ lui $a2, %hi(D_800981C8) /* 7B8C 8002C78C 24C681C8 */ addiu $a2, $a2, %lo(D_800981C8) /* 7B90 8002C790 0C00B082 */ jal crash_screen_printf /* 7B94 8002C794 2405008C */ addiu $a1, $zero, 0x8C /* 7B98 8002C798 8FBF0024 */ lw $ra, 0x24($sp) /* 7B9C 8002C79C 8FB20020 */ lw $s2, 0x20($sp) /* 7BA0 8002C7A0 8FB1001C */ lw $s1, 0x1C($sp) /* 7BA4 8002C7A4 8FB00018 */ lw $s0, 0x18($sp) /* 7BA8 8002C7A8 03E00008 */ jr $ra /* 7BAC 8002C7AC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void crash_screen_draw_rect(s32 x, s32 y, s32 width, s32 height) { u16* ptr; s32 i; s32 j; if (gCrashScreen.width == (SCREEN_WIDTH * 2)) { x <<= 1; y <<= 1; width <<= 1; height <<= 1; } ptr = gCrashScreen.frameBuf + gCrashScreen.width * y + x; for (i = 0; i < height; i++) { for (j = 0; j < width; j++) { *ptr = ((*ptr & 0xE738) >> 2) | 1; ptr++; } ptr += gCrashScreen.width - width; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_player_shadow /* 7B074 800E1BC4 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) /* 7B078 800E1BC8 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) /* 7B07C 800E1BCC 27BDFF90 */ addiu $sp, $sp, -0x70 /* 7B080 800E1BD0 AFBF0058 */ sw $ra, 0x58($sp) /* 7B084 800E1BD4 AFB30054 */ sw $s3, 0x54($sp) /* 7B088 800E1BD8 AFB20050 */ sw $s2, 0x50($sp) /* 7B08C 800E1BDC AFB1004C */ sw $s1, 0x4C($sp) /* 7B090 800E1BE0 AFB00048 */ sw $s0, 0x48($sp) /* 7B094 800E1BE4 F7B60068 */ sdc1 $f22, 0x68($sp) /* 7B098 800E1BE8 F7B40060 */ sdc1 $f20, 0x60($sp) /* 7B09C 800E1BEC 0C044181 */ jal get_shadow_by_index /* 7B0A0 800E1BF0 8C4400CC */ lw $a0, 0xCC($v0) /* 7B0A4 800E1BF4 3C128011 */ lui $s2, %hi(gPlayerStatus) /* 7B0A8 800E1BF8 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* 7B0AC 800E1BFC 0040802D */ daddu $s0, $v0, $zero /* 7B0B0 800E1C00 3C04800B */ lui $a0, %hi(gCameras) /* 7B0B4 800E1C04 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 7B0B8 800E1C08 44801000 */ mtc1 $zero, $f2 /* 7B0BC 800E1C0C C64400A8 */ lwc1 $f4, 0xA8($s2) /* 7B0C0 800E1C10 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7B0C4 800E1C14 44810000 */ mtc1 $at, $f0 /* 7B0C8 800E1C18 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 7B0CC 800E1C1C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 7B0D0 800E1C20 46001206 */ mov.s $f8, $f2 /* 7B0D4 800E1C24 00031080 */ sll $v0, $v1, 2 /* 7B0D8 800E1C28 00431021 */ addu $v0, $v0, $v1 /* 7B0DC 800E1C2C 00021080 */ sll $v0, $v0, 2 /* 7B0E0 800E1C30 00431023 */ subu $v0, $v0, $v1 /* 7B0E4 800E1C34 000218C0 */ sll $v1, $v0, 3 /* 7B0E8 800E1C38 00431021 */ addu $v0, $v0, $v1 /* 7B0EC 800E1C3C 000210C0 */ sll $v0, $v0, 3 /* 7B0F0 800E1C40 00448821 */ addu $s1, $v0, $a0 /* 7B0F4 800E1C44 4604003E */ c.le.s $f0, $f4 /* 7B0F8 800E1C48 00000000 */ nop /* 7B0FC 800E1C4C 4500000A */ bc1f .L800E1C78 /* 7B100 800E1C50 E7A80034 */ swc1 $f8, 0x34($sp) /* 7B104 800E1C54 3C014387 */ lui $at, (0x43870000 >> 16) /* 7B108 800E1C58 44810000 */ mtc1 $at, $f0 /* 7B10C 800E1C5C 00000000 */ nop /* 7B110 800E1C60 4600203C */ c.lt.s $f4, $f0 /* 7B114 800E1C64 00000000 */ nop /* 7B118 800E1C68 45000003 */ bc1f .L800E1C78 /* 7B11C 800E1C6C 00000000 */ nop /* 7B120 800E1C70 3C014334 */ lui $at, (0x43340000 >> 16) /* 7B124 800E1C74 44814000 */ mtc1 $at, $f8 .L800E1C78: /* 7B128 800E1C78 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 7B12C 800E1C7C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 7B130 800E1C80 C6420028 */ lwc1 $f2, 0x28($s2) /* 7B134 800E1C84 3C014480 */ lui $at, (0x44800000 >> 16) /* 7B138 800E1C88 44810000 */ mtc1 $at, $f0 /* 7B13C 800E1C8C 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7B140 800E1C90 44816000 */ mtc1 $at, $f12 /* 7B144 800E1C94 00031080 */ sll $v0, $v1, 2 /* 7B148 800E1C98 00431021 */ addu $v0, $v0, $v1 /* 7B14C 800E1C9C 00021080 */ sll $v0, $v0, 2 /* 7B150 800E1CA0 00431023 */ subu $v0, $v0, $v1 /* 7B154 800E1CA4 000218C0 */ sll $v1, $v0, 3 /* 7B158 800E1CA8 00431021 */ addu $v0, $v0, $v1 /* 7B15C 800E1CAC 000210C0 */ sll $v0, $v0, 3 /* 7B160 800E1CB0 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 7B164 800E1CB4 00220821 */ addu $at, $at, $v0 /* 7B168 800E1CB8 C4261DEC */ lwc1 $f6, %lo(gCameras + 0x6C)($at) /* 7B16C 800E1CBC E6020010 */ swc1 $f2, 0x10($s0) /* 7B170 800E1CC0 C6440030 */ lwc1 $f4, 0x30($s2) /* 7B174 800E1CC4 E6040018 */ swc1 $f4, 0x18($s0) /* 7B178 800E1CC8 864200B0 */ lh $v0, 0xB0($s2) /* 7B17C 800E1CCC 27A60028 */ addiu $a2, $sp, 0x28 /* 7B180 800E1CD0 E7A00034 */ swc1 $f0, 0x34($sp) /* 7B184 800E1CD4 3C014060 */ lui $at, (0x40600000 >> 16) /* 7B188 800E1CD8 44810000 */ mtc1 $at, $f0 /* 7B18C 800E1CDC 460C4301 */ sub.s $f12, $f8, $f12 /* 7B190 800E1CE0 E7A20028 */ swc1 $f2, 0x28($sp) /* 7B194 800E1CE4 44821000 */ mtc1 $v0, $f2 /* 7B198 800E1CE8 00000000 */ nop /* 7B19C 800E1CEC 468010A0 */ cvt.s.w $f2, $f2 /* 7B1A0 800E1CF0 46001083 */ div.s $f2, $f2, $f0 /* 7B1A4 800E1CF4 46066300 */ add.s $f12, $f12, $f6 /* 7B1A8 800E1CF8 C640002C */ lwc1 $f0, 0x2C($s2) /* 7B1AC 800E1CFC 864200B2 */ lh $v0, 0xB2($s2) /* 7B1B0 800E1D00 27A7002C */ addiu $a3, $sp, 0x2C /* 7B1B4 800E1D04 E7A40030 */ swc1 $f4, 0x30($sp) /* 7B1B8 800E1D08 46020000 */ add.s $f0, $f0, $f2 /* 7B1BC 800E1D0C 44827000 */ mtc1 $v0, $f14 /* 7B1C0 800E1D10 00000000 */ nop /* 7B1C4 800E1D14 468073A0 */ cvt.s.w $f14, $f14 /* 7B1C8 800E1D18 27A20030 */ addiu $v0, $sp, 0x30 /* 7B1CC 800E1D1C E7A0002C */ swc1 $f0, 0x2C($sp) /* 7B1D0 800E1D20 AFA20010 */ sw $v0, 0x10($sp) /* 7B1D4 800E1D24 27A20034 */ addiu $v0, $sp, 0x34 /* 7B1D8 800E1D28 AFA20014 */ sw $v0, 0x14($sp) /* 7B1DC 800E1D2C 27A20038 */ addiu $v0, $sp, 0x38 /* 7B1E0 800E1D30 AFA20018 */ sw $v0, 0x18($sp) /* 7B1E4 800E1D34 27A2003C */ addiu $v0, $sp, 0x3C /* 7B1E8 800E1D38 AFA2001C */ sw $v0, 0x1C($sp) /* 7B1EC 800E1D3C 27A20040 */ addiu $v0, $sp, 0x40 /* 7B1F0 800E1D40 AFA20020 */ sw $v0, 0x20($sp) /* 7B1F4 800E1D44 27A20044 */ addiu $v0, $sp, 0x44 /* 7B1F8 800E1D48 0C0377F4 */ jal player_raycast_below /* 7B1FC 800E1D4C AFA20024 */ sw $v0, 0x24($sp) /* 7B200 800E1D50 C7A00038 */ lwc1 $f0, 0x38($sp) /* 7B204 800E1D54 C7A2003C */ lwc1 $f2, 0x3C($sp) /* 7B208 800E1D58 3C018016 */ lui $at, %hi(gCollisionStatus + 0x6) /* 7B20C 800E1D5C A422A556 */ sh $v0, %lo(gCollisionStatus + 0x6)($at) /* 7B210 800E1D60 E6000028 */ swc1 $f0, 0x28($s0) /* 7B214 800E1D64 E6020030 */ swc1 $f2, 0x30($s0) /* 7B218 800E1D68 C62C006C */ lwc1 $f12, 0x6C($s1) /* 7B21C 800E1D6C 0C00A6C9 */ jal clamp_angle /* 7B220 800E1D70 46006307 */ neg.s $f12, $f12 /* 7B224 800E1D74 C7A40038 */ lwc1 $f4, 0x38($sp) /* 7B228 800E1D78 3C014334 */ lui $at, (0x43340000 >> 16) /* 7B22C 800E1D7C 44813000 */ mtc1 $at, $f6 /* 7B230 800E1D80 00000000 */ nop /* 7B234 800E1D84 46062100 */ add.s $f4, $f4, $f6 /* 7B238 800E1D88 C7A2003C */ lwc1 $f2, 0x3C($sp) /* 7B23C 800E1D8C 4480B000 */ mtc1 $zero, $f22 /* 7B240 800E1D90 46061080 */ add.s $f2, $f2, $f6 /* 7B244 800E1D94 E600002C */ swc1 $f0, 0x2C($s0) /* 7B248 800E1D98 46162032 */ c.eq.s $f4, $f22 /* 7B24C 800E1D9C E7A40038 */ swc1 $f4, 0x38($sp) /* 7B250 800E1DA0 45000005 */ bc1f .L800E1DB8 /* 7B254 800E1DA4 E7A2003C */ swc1 $f2, 0x3C($sp) /* 7B258 800E1DA8 46161032 */ c.eq.s $f2, $f22 /* 7B25C 800E1DAC 00000000 */ nop /* 7B260 800E1DB0 45010041 */ bc1t .L800E1EB8 /* 7B264 800E1DB4 00000000 */ nop .L800E1DB8: /* 7B268 800E1DB8 C7AC0028 */ lwc1 $f12, 0x28($sp) /* 7B26C 800E1DBC C7AE0030 */ lwc1 $f14, 0x30($sp) /* 7B270 800E1DC0 8E460028 */ lw $a2, 0x28($s2) /* 7B274 800E1DC4 0C00A7B5 */ jal dist2D /* 7B278 800E1DC8 8E470030 */ lw $a3, 0x30($s2) /* 7B27C 800E1DCC C64C0028 */ lwc1 $f12, 0x28($s2) /* 7B280 800E1DD0 C64E0030 */ lwc1 $f14, 0x30($s2) /* 7B284 800E1DD4 8FA60028 */ lw $a2, 0x28($sp) /* 7B288 800E1DD8 8FA70030 */ lw $a3, 0x30($sp) /* 7B28C 800E1DDC 4600028D */ trunc.w.s $f10, $f0 /* 7B290 800E1DE0 44135000 */ mfc1 $s3, $f10 /* 7B294 800E1DE4 0C00A720 */ jal atan2 /* 7B298 800E1DE8 00000000 */ nop /* 7B29C 800E1DEC 0C00A788 */ jal get_player_normal_yaw /* 7B2A0 800E1DF0 46000506 */ mov.s $f20, $f0 /* 7B2A4 800E1DF4 3C01C2B4 */ lui $at, (0xC2B40000 >> 16) /* 7B2A8 800E1DF8 44816000 */ mtc1 $at, $f12 /* 7B2AC 800E1DFC 00000000 */ nop /* 7B2B0 800E1E00 46146301 */ sub.s $f12, $f12, $f20 /* 7B2B4 800E1E04 0C00A6C9 */ jal clamp_angle /* 7B2B8 800E1E08 46006300 */ add.s $f12, $f12, $f0 /* 7B2BC 800E1E0C 3C118007 */ lui $s1, %hi(gGameStatusPtr) /* 7B2C0 800E1E10 2631419C */ addiu $s1, $s1, %lo(gGameStatusPtr) /* 7B2C4 800E1E14 8E220000 */ lw $v0, 0x0($s1) /* 7B2C8 800E1E18 C442012C */ lwc1 $f2, 0x12C($v0) /* 7B2CC 800E1E1C 4600028D */ trunc.w.s $f10, $f0 /* 7B2D0 800E1E20 44025000 */ mfc1 $v0, $f10 /* 7B2D4 800E1E24 46161032 */ c.eq.s $f2, $f22 /* 7B2D8 800E1E28 00000000 */ nop /* 7B2DC 800E1E2C 45010022 */ bc1t .L800E1EB8 /* 7B2E0 800E1E30 00000000 */ nop /* 7B2E4 800E1E34 44826000 */ mtc1 $v0, $f12 /* 7B2E8 800E1E38 00000000 */ nop /* 7B2EC 800E1E3C 0C00A8BB */ jal sin_deg /* 7B2F0 800E1E40 46806320 */ cvt.s.w $f12, $f12 /* 7B2F4 800E1E44 8E220000 */ lw $v0, 0x0($s1) /* 7B2F8 800E1E48 C4440128 */ lwc1 $f4, 0x128($v0) /* 7B2FC 800E1E4C 46042102 */ mul.s $f4, $f4, $f4 /* 7B300 800E1E50 00000000 */ nop /* 7B304 800E1E54 C4420130 */ lwc1 $f2, 0x130($v0) /* 7B308 800E1E58 46021082 */ mul.s $f2, $f2, $f2 /* 7B30C 800E1E5C 00000000 */ nop /* 7B310 800E1E60 46022300 */ add.s $f12, $f4, $f2 /* 7B314 800E1E64 46006084 */ sqrt.s $f2, $f12 /* 7B318 800E1E68 46021032 */ c.eq.s $f2, $f2 /* 7B31C 800E1E6C 00000000 */ nop /* 7B320 800E1E70 45010005 */ bc1t .L800E1E88 /* 7B324 800E1E74 46000506 */ mov.s $f20, $f0 /* 7B328 800E1E78 0C0187BC */ jal sqrtf /* 7B32C 800E1E7C 00000000 */ nop /* 7B330 800E1E80 46000086 */ mov.s $f2, $f0 /* 7B334 800E1E84 8E220000 */ lw $v0, 0x0($s1) .L800E1E88: /* 7B338 800E1E88 C440012C */ lwc1 $f0, 0x12C($v0) /* 7B33C 800E1E8C 46001003 */ div.s $f0, $f2, $f0 /* 7B340 800E1E90 44931000 */ mtc1 $s3, $f2 /* 7B344 800E1E94 00000000 */ nop /* 7B348 800E1E98 468010A0 */ cvt.s.w $f2, $f2 /* 7B34C 800E1E9C 46020002 */ mul.s $f0, $f0, $f2 /* 7B350 800E1EA0 00000000 */ nop /* 7B354 800E1EA4 46140002 */ mul.s $f0, $f0, $f20 /* 7B358 800E1EA8 00000000 */ nop /* 7B35C 800E1EAC C7A2002C */ lwc1 $f2, 0x2C($sp) /* 7B360 800E1EB0 46001081 */ sub.s $f2, $f2, $f0 /* 7B364 800E1EB4 E7A2002C */ swc1 $f2, 0x2C($sp) .L800E1EB8: /* 7B368 800E1EB8 C7A0002C */ lwc1 $f0, 0x2C($sp) /* 7B36C 800E1EBC E6000014 */ swc1 $f0, 0x14($s0) /* 7B370 800E1EC0 9242000E */ lbu $v0, 0xE($s2) /* 7B374 800E1EC4 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 7B378 800E1EC8 44811800 */ mtc1 $at, $f3 /* 7B37C 800E1ECC 44801000 */ mtc1 $zero, $f2 /* 7B380 800E1ED0 44820000 */ mtc1 $v0, $f0 /* 7B384 800E1ED4 00000000 */ nop /* 7B388 800E1ED8 46800021 */ cvt.d.w $f0, $f0 /* 7B38C 800E1EDC 46220002 */ mul.d $f0, $f0, $f2 /* 7B390 800E1EE0 00000000 */ nop /* 7B394 800E1EE4 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* 7B398 800E1EE8 44811800 */ mtc1 $at, $f3 /* 7B39C 800E1EEC 44801000 */ mtc1 $zero, $f2 /* 7B3A0 800E1EF0 00000000 */ nop /* 7B3A4 800E1EF4 4620103E */ c.le.d $f2, $f0 /* 7B3A8 800E1EF8 00000000 */ nop /* 7B3AC 800E1EFC 45010005 */ bc1t .L800E1F14 /* 7B3B0 800E1F00 26040005 */ addiu $a0, $s0, 0x5 /* 7B3B4 800E1F04 4620028D */ trunc.w.d $f10, $f0 /* 7B3B8 800E1F08 44035000 */ mfc1 $v1, $f10 /* 7B3BC 800E1F0C 080387CC */ j .L800E1F30 /* 7B3C0 800E1F10 A0830000 */ sb $v1, 0x0($a0) .L800E1F14: /* 7B3C4 800E1F14 46220001 */ sub.d $f0, $f0, $f2 /* 7B3C8 800E1F18 3C028000 */ lui $v0, (0x80000000 >> 16) /* 7B3CC 800E1F1C 4620028D */ trunc.w.d $f10, $f0 /* 7B3D0 800E1F20 44035000 */ mfc1 $v1, $f10 /* 7B3D4 800E1F24 00000000 */ nop /* 7B3D8 800E1F28 00621825 */ or $v1, $v1, $v0 /* 7B3DC 800E1F2C A0830000 */ sb $v1, 0x0($a0) .L800E1F30: /* 7B3E0 800E1F30 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 7B3E4 800E1F34 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 7B3E8 800E1F38 9042007E */ lbu $v0, 0x7E($v0) /* 7B3EC 800E1F3C 30420001 */ andi $v0, $v0, 0x1 /* 7B3F0 800E1F40 14400006 */ bnez $v0, .L800E1F5C /* 7B3F4 800E1F44 00000000 */ nop /* 7B3F8 800E1F48 8FA50034 */ lw $a1, 0x34($sp) /* 7B3FC 800E1F4C 0C044A17 */ jal set_standard_shadow_scale /* 7B400 800E1F50 0200202D */ daddu $a0, $s0, $zero /* 7B404 800E1F54 080387DA */ j .L800E1F68 /* 7B408 800E1F58 00000000 */ nop .L800E1F5C: /* 7B40C 800E1F5C 8FA50034 */ lw $a1, 0x34($sp) /* 7B410 800E1F60 0C044A75 */ jal set_peach_shadow_scale /* 7B414 800E1F64 0200202D */ daddu $a0, $s0, $zero .L800E1F68: /* 7B418 800E1F68 8FBF0058 */ lw $ra, 0x58($sp) /* 7B41C 800E1F6C 8FB30054 */ lw $s3, 0x54($sp) /* 7B420 800E1F70 8FB20050 */ lw $s2, 0x50($sp) /* 7B424 800E1F74 8FB1004C */ lw $s1, 0x4C($sp) /* 7B428 800E1F78 8FB00048 */ lw $s0, 0x48($sp) /* 7B42C 800E1F7C D7B60068 */ ldc1 $f22, 0x68($sp) /* 7B430 800E1F80 D7B40060 */ ldc1 $f20, 0x60($sp) /* 7B434 800E1F84 03E00008 */ jr $ra /* 7B438 800E1F88 27BD0070 */ addiu $sp, $sp, 0x70 /* 7B43C 800E1F8C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void update_player_shadow(void) { PlayerStatus* playerStatus = &gPlayerStatus; Shadow* shadow = get_shadow_by_index(gPlayerStatusPtr->shadowID); Camera* camera = &gCameras[gCurrentCameraID]; f32 shadowScale = 0.0f; f32 yawTemp = 0.0f; f32 hitDirX, hitDirZ; f32 hitRx, hitRz; f32 x, y, z; f32 playerX, playerZ; s32 dist; f32 raycastYaw; if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) { yawTemp = 180.0f; } raycastYaw = (yawTemp - 90.0f) + gCameras[gCurrentCameraID].currentYaw; shadow->position.x = playerX = playerStatus->position.x; shadow->position.z = playerZ = playerStatus->position.z; x = playerX; y = playerStatus->position.y + (playerStatus->colliderHeight / 3.5f); z = playerZ; shadowScale = 1024.0f; gCollisionStatus.floorBelow = player_raycast_below(raycastYaw, playerStatus->colliderDiameter, &x, &y, &z, &shadowScale, &hitRx, &hitRz, &hitDirX, &hitDirZ); shadow->rotation.x = hitRx; shadow->rotation.z = hitRz; shadow->rotation.y = clamp_angle(-camera->currentYaw); hitRx += 180.0f; hitRz += 180.0f; if (hitRx != 0.0f || hitRz != 0.0f) { s32 dist = dist2D(x, z, playerStatus->position.x, playerStatus->position.z); f32 tan = atan2(playerStatus->position.x, playerStatus->position.z, x, z); s32 angleTemp = clamp_angle((-90.0f - tan) + get_player_normal_yaw()); if (gGameStatusPtr->playerGroundTraceNormal.y != 0.0f) { y -= sqrtf(SQ(gGameStatusPtr->playerGroundTraceNormal.x) + SQ(gGameStatusPtr->playerGroundTraceNormal.z)) / gGameStatusPtr->playerGroundTraceNormal.y * dist * sin_deg(angleTemp); } } shadow->position.y = y; shadow->alpha = (f64)playerStatus->alpha1 / 2; if (!(gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH)) { set_standard_shadow_scale(shadow, shadowScale); } else { set_peach_shadow_scale(shadow, shadowScale); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel gfx_frame_filter_pass_1 /* 265C 8002725C 27BDFF88 */ addiu $sp, $sp, -0x78 /* 2660 80027260 0080582D */ daddu $t3, $a0, $zero /* 2664 80027264 AFA5007C */ sw $a1, 0x7C($sp) /* 2668 80027268 0000282D */ daddu $a1, $zero, $zero /* 266C 8002726C 27A90018 */ addiu $t1, $sp, 0x18 /* 2670 80027270 27A80038 */ addiu $t0, $sp, 0x38 /* 2674 80027274 27A70058 */ addiu $a3, $sp, 0x58 /* 2678 80027278 8BAC007C */ lwl $t4, 0x7C($sp) /* 267C 8002727C 9BAC007F */ lwr $t4, 0x7F($sp) /* 2680 80027280 ABAC0008 */ swl $t4, 0x8($sp) /* 2684 80027284 BBAC000B */ swr $t4, 0xB($sp) /* 2688 80027288 8BAC007C */ lwl $t4, 0x7C($sp) /* 268C 8002728C 9BAC007F */ lwr $t4, 0x7F($sp) /* 2690 80027290 ABAC0000 */ swl $t4, 0x0($sp) /* 2694 80027294 BBAC0003 */ swr $t4, 0x3($sp) .L80027298: /* 2698 80027298 01251021 */ addu $v0, $t1, $a1 /* 269C 8002729C 01051821 */ addu $v1, $t0, $a1 /* 26A0 800272A0 00E52021 */ addu $a0, $a3, $a1 /* 26A4 800272A4 24A50001 */ addiu $a1, $a1, 0x1 /* 26A8 800272A8 A0400000 */ sb $zero, 0x0($v0) /* 26AC 800272AC 28A20020 */ slti $v0, $a1, 0x20 /* 26B0 800272B0 A0600000 */ sb $zero, 0x0($v1) /* 26B4 800272B4 1440FFF8 */ bnez $v0, .L80027298 /* 26B8 800272B8 A0800000 */ sb $zero, 0x0($a0) /* 26BC 800272BC 0000282D */ daddu $a1, $zero, $zero /* 26C0 800272C0 240A0008 */ addiu $t2, $zero, 0x8 /* 26C4 800272C4 27A90018 */ addiu $t1, $sp, 0x18 /* 26C8 800272C8 27A80038 */ addiu $t0, $sp, 0x38 /* 26CC 800272CC 27A70058 */ addiu $a3, $sp, 0x58 /* 26D0 800272D0 0160202D */ daddu $a0, $t3, $zero .L800272D4: /* 26D4 800272D4 90820003 */ lbu $v0, 0x3($a0) /* 26D8 800272D8 144A0010 */ bne $v0, $t2, .L8002731C /* 26DC 800272DC 24A50001 */ addiu $a1, $a1, 0x1 /* 26E0 800272E0 90830000 */ lbu $v1, 0x0($a0) /* 26E4 800272E4 01231821 */ addu $v1, $t1, $v1 /* 26E8 800272E8 90620000 */ lbu $v0, 0x0($v1) /* 26EC 800272EC 24420001 */ addiu $v0, $v0, 0x1 /* 26F0 800272F0 A0620000 */ sb $v0, 0x0($v1) /* 26F4 800272F4 90830001 */ lbu $v1, 0x1($a0) /* 26F8 800272F8 01031821 */ addu $v1, $t0, $v1 /* 26FC 800272FC 90620000 */ lbu $v0, 0x0($v1) /* 2700 80027300 24420001 */ addiu $v0, $v0, 0x1 /* 2704 80027304 A0620000 */ sb $v0, 0x0($v1) /* 2708 80027308 90830002 */ lbu $v1, 0x2($a0) /* 270C 8002730C 00E31821 */ addu $v1, $a3, $v1 /* 2710 80027310 90620000 */ lbu $v0, 0x0($v1) /* 2714 80027314 24420001 */ addiu $v0, $v0, 0x1 /* 2718 80027318 A0620000 */ sb $v0, 0x0($v1) .L8002731C: /* 271C 8002731C 28A20006 */ slti $v0, $a1, 0x6 /* 2720 80027320 1440FFEC */ bnez $v0, .L800272D4 /* 2724 80027324 24840004 */ addiu $a0, $a0, 0x4 /* 2728 80027328 0000282D */ daddu $a1, $zero, $zero /* 272C 8002732C 27A40018 */ addiu $a0, $sp, 0x18 /* 2730 80027330 00851821 */ addu $v1, $a0, $a1 .L80027334: /* 2734 80027334 90620000 */ lbu $v0, 0x0($v1) /* 2738 80027338 50400004 */ beql $v0, $zero, .L8002734C /* 273C 8002733C 24A50001 */ addiu $a1, $a1, 0x1 /* 2740 80027340 2442FFFF */ addiu $v0, $v0, -0x1 /* 2744 80027344 08009CD6 */ j .L80027358 /* 2748 80027348 A0620000 */ sb $v0, 0x0($v1) .L8002734C: /* 274C 8002734C 28A20020 */ slti $v0, $a1, 0x20 /* 2750 80027350 1440FFF8 */ bnez $v0, .L80027334 /* 2754 80027354 00851821 */ addu $v1, $a0, $a1 .L80027358: /* 2758 80027358 28A20020 */ slti $v0, $a1, 0x20 /* 275C 8002735C 10400009 */ beqz $v0, .L80027384 /* 2760 80027360 27A30018 */ addiu $v1, $sp, 0x18 /* 2764 80027364 00651021 */ addu $v0, $v1, $a1 .L80027368: /* 2768 80027368 90420000 */ lbu $v0, 0x0($v0) /* 276C 8002736C 14400005 */ bnez $v0, .L80027384 /* 2770 80027370 00000000 */ nop /* 2774 80027374 24A50001 */ addiu $a1, $a1, 0x1 /* 2778 80027378 28A20020 */ slti $v0, $a1, 0x20 /* 277C 8002737C 1440FFFA */ bnez $v0, .L80027368 /* 2780 80027380 00651021 */ addu $v0, $v1, $a1 .L80027384: /* 2784 80027384 93A20000 */ lbu $v0, 0x0($sp) /* 2788 80027388 00A2102A */ slt $v0, $a1, $v0 /* 278C 8002738C 54400001 */ bnel $v0, $zero, .L80027394 /* 2790 80027390 A3A50000 */ sb $a1, 0x0($sp) .L80027394: /* 2794 80027394 0000282D */ daddu $a1, $zero, $zero /* 2798 80027398 27A40038 */ addiu $a0, $sp, 0x38 /* 279C 8002739C 00851821 */ addu $v1, $a0, $a1 .L800273A0: /* 27A0 800273A0 90620000 */ lbu $v0, 0x0($v1) /* 27A4 800273A4 50400004 */ beql $v0, $zero, .L800273B8 /* 27A8 800273A8 24A50001 */ addiu $a1, $a1, 0x1 /* 27AC 800273AC 2442FFFF */ addiu $v0, $v0, -0x1 /* 27B0 800273B0 08009CF1 */ j .L800273C4 /* 27B4 800273B4 A0620000 */ sb $v0, 0x0($v1) .L800273B8: /* 27B8 800273B8 28A20020 */ slti $v0, $a1, 0x20 /* 27BC 800273BC 1440FFF8 */ bnez $v0, .L800273A0 /* 27C0 800273C0 00851821 */ addu $v1, $a0, $a1 .L800273C4: /* 27C4 800273C4 28A20020 */ slti $v0, $a1, 0x20 /* 27C8 800273C8 10400009 */ beqz $v0, .L800273F0 /* 27CC 800273CC 27A30038 */ addiu $v1, $sp, 0x38 /* 27D0 800273D0 00651021 */ addu $v0, $v1, $a1 .L800273D4: /* 27D4 800273D4 90420000 */ lbu $v0, 0x0($v0) /* 27D8 800273D8 14400005 */ bnez $v0, .L800273F0 /* 27DC 800273DC 00000000 */ nop /* 27E0 800273E0 24A50001 */ addiu $a1, $a1, 0x1 /* 27E4 800273E4 28A20020 */ slti $v0, $a1, 0x20 /* 27E8 800273E8 1440FFFA */ bnez $v0, .L800273D4 /* 27EC 800273EC 00651021 */ addu $v0, $v1, $a1 .L800273F0: /* 27F0 800273F0 93A20001 */ lbu $v0, 0x1($sp) /* 27F4 800273F4 00A2102A */ slt $v0, $a1, $v0 /* 27F8 800273F8 54400001 */ bnel $v0, $zero, .L80027400 /* 27FC 800273FC A3A50001 */ sb $a1, 0x1($sp) .L80027400: /* 2800 80027400 0000282D */ daddu $a1, $zero, $zero /* 2804 80027404 27A40058 */ addiu $a0, $sp, 0x58 /* 2808 80027408 00851821 */ addu $v1, $a0, $a1 .L8002740C: /* 280C 8002740C 90620000 */ lbu $v0, 0x0($v1) /* 2810 80027410 50400004 */ beql $v0, $zero, .L80027424 /* 2814 80027414 24A50001 */ addiu $a1, $a1, 0x1 /* 2818 80027418 2442FFFF */ addiu $v0, $v0, -0x1 /* 281C 8002741C 08009D0C */ j .L80027430 /* 2820 80027420 A0620000 */ sb $v0, 0x0($v1) .L80027424: /* 2824 80027424 28A20020 */ slti $v0, $a1, 0x20 /* 2828 80027428 1440FFF8 */ bnez $v0, .L8002740C /* 282C 8002742C 00851821 */ addu $v1, $a0, $a1 .L80027430: /* 2830 80027430 28A20020 */ slti $v0, $a1, 0x20 /* 2834 80027434 10400009 */ beqz $v0, .L8002745C /* 2838 80027438 27A30058 */ addiu $v1, $sp, 0x58 /* 283C 8002743C 00651021 */ addu $v0, $v1, $a1 .L80027440: /* 2840 80027440 90420000 */ lbu $v0, 0x0($v0) /* 2844 80027444 14400005 */ bnez $v0, .L8002745C /* 2848 80027448 00000000 */ nop /* 284C 8002744C 24A50001 */ addiu $a1, $a1, 0x1 /* 2850 80027450 28A20020 */ slti $v0, $a1, 0x20 /* 2854 80027454 1440FFFA */ bnez $v0, .L80027440 /* 2858 80027458 00651021 */ addu $v0, $v1, $a1 .L8002745C: /* 285C 8002745C 93A20002 */ lbu $v0, 0x2($sp) /* 2860 80027460 00A2102A */ slt $v0, $a1, $v0 /* 2864 80027464 54400001 */ bnel $v0, $zero, .L8002746C /* 2868 80027468 A3A50002 */ sb $a1, 0x2($sp) .L8002746C: /* 286C 8002746C 2405001F */ addiu $a1, $zero, 0x1F /* 2870 80027470 27A30018 */ addiu $v1, $sp, 0x18 /* 2874 80027474 00651021 */ addu $v0, $v1, $a1 .L80027478: /* 2878 80027478 90420000 */ lbu $v0, 0x0($v0) /* 287C 8002747C 14400004 */ bnez $v0, .L80027490 /* 2880 80027480 00000000 */ nop /* 2884 80027484 24A5FFFF */ addiu $a1, $a1, -0x1 /* 2888 80027488 04A1FFFB */ bgez $a1, .L80027478 /* 288C 8002748C 00651021 */ addu $v0, $v1, $a1 .L80027490: /* 2890 80027490 93A20008 */ lbu $v0, 0x8($sp) /* 2894 80027494 0045102A */ slt $v0, $v0, $a1 /* 2898 80027498 54400001 */ bnel $v0, $zero, .L800274A0 /* 289C 8002749C A3A50008 */ sb $a1, 0x8($sp) .L800274A0: /* 28A0 800274A0 2405001F */ addiu $a1, $zero, 0x1F /* 28A4 800274A4 27A30038 */ addiu $v1, $sp, 0x38 /* 28A8 800274A8 00651021 */ addu $v0, $v1, $a1 .L800274AC: /* 28AC 800274AC 90420000 */ lbu $v0, 0x0($v0) /* 28B0 800274B0 14400004 */ bnez $v0, .L800274C4 /* 28B4 800274B4 00000000 */ nop /* 28B8 800274B8 24A5FFFF */ addiu $a1, $a1, -0x1 /* 28BC 800274BC 04A1FFFB */ bgez $a1, .L800274AC /* 28C0 800274C0 00651021 */ addu $v0, $v1, $a1 .L800274C4: /* 28C4 800274C4 93A20009 */ lbu $v0, 0x9($sp) /* 28C8 800274C8 0045102A */ slt $v0, $v0, $a1 /* 28CC 800274CC 54400001 */ bnel $v0, $zero, .L800274D4 /* 28D0 800274D0 A3A50009 */ sb $a1, 0x9($sp) .L800274D4: /* 28D4 800274D4 2405001F */ addiu $a1, $zero, 0x1F /* 28D8 800274D8 27A30058 */ addiu $v1, $sp, 0x58 /* 28DC 800274DC 00651021 */ addu $v0, $v1, $a1 .L800274E0: /* 28E0 800274E0 90420000 */ lbu $v0, 0x0($v0) /* 28E4 800274E4 14400004 */ bnez $v0, .L800274F8 /* 28E8 800274E8 00000000 */ nop /* 28EC 800274EC 24A5FFFF */ addiu $a1, $a1, -0x1 /* 28F0 800274F0 04A1FFFB */ bgez $a1, .L800274E0 /* 28F4 800274F4 00651021 */ addu $v0, $v1, $a1 .L800274F8: /* 28F8 800274F8 93A2000A */ lbu $v0, 0xA($sp) /* 28FC 800274FC 0045102A */ slt $v0, $v0, $a1 /* 2900 80027500 54400001 */ bnel $v0, $zero, .L80027508 /* 2904 80027504 A3A5000A */ sb $a1, 0xA($sp) .L80027508: /* 2908 80027508 93A20008 */ lbu $v0, 0x8($sp) /* 290C 8002750C 93A30000 */ lbu $v1, 0x0($sp) /* 2910 80027510 93A4007C */ lbu $a0, 0x7C($sp) /* 2914 80027514 00431021 */ addu $v0, $v0, $v1 /* 2918 80027518 00441023 */ subu $v0, $v0, $a0 /* 291C 8002751C A3A20010 */ sb $v0, 0x10($sp) /* 2920 80027520 93A20009 */ lbu $v0, 0x9($sp) /* 2924 80027524 93A30001 */ lbu $v1, 0x1($sp) /* 2928 80027528 93A4007D */ lbu $a0, 0x7D($sp) /* 292C 8002752C 00431021 */ addu $v0, $v0, $v1 /* 2930 80027530 00441023 */ subu $v0, $v0, $a0 /* 2934 80027534 A3A20011 */ sb $v0, 0x11($sp) /* 2938 80027538 93A2000A */ lbu $v0, 0xA($sp) /* 293C 8002753C 93A30002 */ lbu $v1, 0x2($sp) /* 2940 80027540 93A4007E */ lbu $a0, 0x7E($sp) /* 2944 80027544 00431021 */ addu $v0, $v0, $v1 /* 2948 80027548 00441023 */ subu $v0, $v0, $a0 /* 294C 8002754C A3A20012 */ sb $v0, 0x12($sp) /* 2950 80027550 93A2007C */ lbu $v0, 0x7C($sp) /* 2954 80027554 93A4007F */ lbu $a0, 0x7F($sp) /* 2958 80027558 00440018 */ mult $v0, $a0 /* 295C 8002755C 24030008 */ addiu $v1, $zero, 0x8 /* 2960 80027560 00002812 */ mflo $a1 /* 2964 80027564 93A20010 */ lbu $v0, 0x10($sp) /* 2968 80027568 00641823 */ subu $v1, $v1, $a0 /* 296C 8002756C 00430018 */ mult $v0, $v1 /* 2970 80027570 00001012 */ mflo $v0 /* 2974 80027574 00A21021 */ addu $v0, $a1, $v0 /* 2978 80027578 000210C3 */ sra $v0, $v0, 3 /* 297C 8002757C A3A20010 */ sb $v0, 0x10($sp) /* 2980 80027580 93A2007D */ lbu $v0, 0x7D($sp) /* 2984 80027584 00440018 */ mult $v0, $a0 /* 2988 80027588 00002812 */ mflo $a1 /* 298C 8002758C 93A20011 */ lbu $v0, 0x11($sp) /* 2990 80027590 00000000 */ nop /* 2994 80027594 00430018 */ mult $v0, $v1 /* 2998 80027598 00001012 */ mflo $v0 /* 299C 8002759C 00A21021 */ addu $v0, $a1, $v0 /* 29A0 800275A0 000210C3 */ sra $v0, $v0, 3 /* 29A4 800275A4 A3A20011 */ sb $v0, 0x11($sp) /* 29A8 800275A8 93A2007E */ lbu $v0, 0x7E($sp) /* 29AC 800275AC 00440018 */ mult $v0, $a0 /* 29B0 800275B0 00002012 */ mflo $a0 /* 29B4 800275B4 93A20012 */ lbu $v0, 0x12($sp) /* 29B8 800275B8 00000000 */ nop /* 29BC 800275BC 00430018 */ mult $v0, $v1 /* 29C0 800275C0 00001012 */ mflo $v0 /* 29C4 800275C4 00821021 */ addu $v0, $a0, $v0 /* 29C8 800275C8 000210C3 */ sra $v0, $v0, 3 /* 29CC 800275CC A3A20012 */ sb $v0, 0x12($sp) /* 29D0 800275D0 93A20010 */ lbu $v0, 0x10($sp) /* 29D4 800275D4 93A40011 */ lbu $a0, 0x11($sp) /* 29D8 800275D8 93A30012 */ lbu $v1, 0x12($sp) /* 29DC 800275DC 000212C0 */ sll $v0, $v0, 11 /* 29E0 800275E0 00042180 */ sll $a0, $a0, 6 /* 29E4 800275E4 00441021 */ addu $v0, $v0, $a0 /* 29E8 800275E8 00031840 */ sll $v1, $v1, 1 /* 29EC 800275EC 00431021 */ addu $v0, $v0, $v1 /* 29F0 800275F0 24420001 */ addiu $v0, $v0, 0x1 /* 29F4 800275F4 A4C20000 */ sh $v0, 0x0($a2) /* 29F8 800275F8 03E00008 */ jr $ra /* 29FC 800275FC 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: void gfx_frame_filter_pass_1(Color_RGBA8* filterBuf0, Color_RGBA8 filterBuf1, u16* out) { Color_RGBA8 sp0; Color_RGBA8 sp8; Color_RGBA8 final; u8 rs[0x20]; u8 gs[0x20]; u8 bs[0x20]; s32 i; sp8 = filterBuf1; sp0 = filterBuf1; for (i = 0; i < ARRAY_COUNT(rs); i++) { rs[i] = 0; gs[i] = 0; bs[i] = 0; } for (i = 0; i < 6; i++) { if (filterBuf0[i].a == 8) { rs[filterBuf0[i].r]++; gs[filterBuf0[i].g]++; bs[filterBuf0[i].b]++; } } for (i = 0; i < ARRAY_COUNT(rs); i++) { if (rs[i] != 0) { rs[i]--; break; } } for (; i < ARRAY_COUNT(rs); i++) { if (rs[i] != 0) { break; } } if (sp0.r > i) { sp0.r = i; } for (i = 0; i < ARRAY_COUNT(gs); i++) { if (gs[i] != 0) { gs[i]--; break; } } for (; i < ARRAY_COUNT(gs); i++) { if (gs[i] != 0) { break; } } if (sp0.g > i) { sp0.g = i; } for (i = 0; i < ARRAY_COUNT(bs); i++) { if (bs[i] != 0) { bs[i]--; break; } } for (; i < ARRAY_COUNT(bs); i++) { if (bs[i] != 0) { break; } } if (sp0.b > i) { sp0.b = i; } for (i = ARRAY_COUNT(rs) - 1; i >= 0; i--) { if (rs[i] != 0) { break; } } if (sp8.r < i) { sp8.r = i; } for (i = ARRAY_COUNT(gs) - 1; i >= 0; i--) { if (gs[i] != 0) { break; } } if (sp8.g < i) { sp8.g = i; } for (i = ARRAY_COUNT(bs) - 1; i >= 0; i--) { if (bs[i] != 0) { break; } } if (sp8.b < i) { sp8.b = i; } final.r = (sp8.r + sp0.r) - filterBuf1.r; final.g = (sp8.g + sp0.g) - filterBuf1.g; final.b = (sp8.b + sp0.b) - filterBuf1.b; final.r = ((filterBuf1.r * filterBuf1.a) + (final.r * (8 - filterBuf1.a))) >> 3; final.g = ((filterBuf1.g * filterBuf1.a) + (final.g * (8 - filterBuf1.a))) >> 3; final.b = ((filterBuf1.b * filterBuf1.a) + (final.b * (8 - filterBuf1.a))) >> 3; *out = (final.r << 11) + (final.g << 6) + (final.b << 1) + 1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel disable_x_update /* 3857F8 E00821B8 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 3857FC E00821BC AFB40028 */ sw $s4, 0x28($sp) /* 385800 E00821C0 0080A02D */ daddu $s4, $a0, $zero /* 385804 E00821C4 AFBF0038 */ sw $ra, 0x38($sp) /* 385808 E00821C8 AFB70034 */ sw $s7, 0x34($sp) /* 38580C E00821CC AFB60030 */ sw $s6, 0x30($sp) /* 385810 E00821D0 AFB5002C */ sw $s5, 0x2C($sp) /* 385814 E00821D4 AFB30024 */ sw $s3, 0x24($sp) /* 385818 E00821D8 AFB20020 */ sw $s2, 0x20($sp) /* 38581C E00821DC AFB1001C */ sw $s1, 0x1C($sp) /* 385820 E00821E0 AFB00018 */ sw $s0, 0x18($sp) /* 385824 E00821E4 F7B60048 */ sdc1 $f22, 0x48($sp) /* 385828 E00821E8 F7B40040 */ sdc1 $f20, 0x40($sp) /* 38582C E00821EC 8E830000 */ lw $v1, 0x0($s4) /* 385830 E00821F0 8E90000C */ lw $s0, 0xC($s4) /* 385834 E00821F4 30620010 */ andi $v0, $v1, 0x10 /* 385838 E00821F8 10400005 */ beqz $v0, .LE0082210 /* 38583C E00821FC 2402FFEF */ addiu $v0, $zero, -0x11 /* 385840 E0082200 00621024 */ and $v0, $v1, $v0 /* 385844 E0082204 AE820000 */ sw $v0, 0x0($s4) /* 385848 E0082208 24020015 */ addiu $v0, $zero, 0x15 /* 38584C E008220C AE020028 */ sw $v0, 0x28($s0) .LE0082210: /* 385850 E0082210 8E030028 */ lw $v1, 0x28($s0) /* 385854 E0082214 28620064 */ slti $v0, $v1, 0x64 /* 385858 E0082218 10400002 */ beqz $v0, .LE0082224 /* 38585C E008221C 2462FFFF */ addiu $v0, $v1, -0x1 /* 385860 E0082220 AE020028 */ sw $v0, 0x28($s0) .LE0082224: /* 385864 E0082224 8E020028 */ lw $v0, 0x28($s0) /* 385868 E0082228 04410005 */ bgez $v0, .LE0082240 /* 38586C E008222C 3C030004 */ lui $v1, (0x4F1A0 >> 16) /* 385870 E0082230 0C080128 */ jal shim_remove_effect /* 385874 E0082234 0280202D */ daddu $a0, $s4, $zero /* 385878 E0082238 0802093B */ j .LE00824EC /* 38587C E008223C 00000000 */ nop .LE0082240: /* 385880 E0082240 8E02002C */ lw $v0, 0x2C($s0) /* 385884 E0082244 3463F1A0 */ ori $v1, $v1, (0x4F1A0 & 0xFFFF) /* 385888 E0082248 24420001 */ addiu $v0, $v0, 0x1 /* 38588C E008224C 0062182A */ slt $v1, $v1, $v0 /* 385890 E0082250 10600003 */ beqz $v1, .LE0082260 /* 385894 E0082254 AE02002C */ sw $v0, 0x2C($s0) /* 385898 E0082258 24020100 */ addiu $v0, $zero, 0x100 /* 38589C E008225C AE02002C */ sw $v0, 0x2C($s0) .LE0082260: /* 3858A0 E0082260 8E03003C */ lw $v1, 0x3C($s0) /* 3858A4 E0082264 8E130000 */ lw $s3, 0x0($s0) /* 3858A8 E0082268 8E120028 */ lw $s2, 0x28($s0) /* 3858AC E008226C 8E15002C */ lw $s5, 0x2C($s0) /* 3858B0 E0082270 8E040038 */ lw $a0, 0x38($s0) /* 3858B4 E0082274 16600034 */ bnez $s3, .LE0082348 /* 3858B8 E0082278 C6160034 */ lwc1 $f22, 0x34($s0) /* 3858BC E008227C 8E020044 */ lw $v0, 0x44($s0) /* 3858C0 E0082280 1C400030 */ bgtz $v0, .LE0082344 /* 3858C4 E0082284 2442FFFF */ addiu $v0, $v0, -0x1 /* 3858C8 E0082288 1064002F */ beq $v1, $a0, .LE0082348 /* 3858CC E008228C 00000000 */ nop /* 3858D0 E0082290 04620001 */ bltzl $v1, .LE0082298 /* 3858D4 E0082294 0000182D */ daddu $v1, $zero, $zero .LE0082298: /* 3858D8 E0082298 0083102A */ slt $v0, $a0, $v1 /* 3858DC E008229C 10400017 */ beqz $v0, .LE00822FC /* 3858E0 E00822A0 24020064 */ addiu $v0, $zero, 0x64 /* 3858E4 E00822A4 AE020028 */ sw $v0, 0x28($s0) /* 3858E8 E00822A8 24020001 */ addiu $v0, $zero, 0x1 /* 3858EC E00822AC AE02002C */ sw $v0, 0x2C($s0) /* 3858F0 E00822B0 8E020038 */ lw $v0, 0x38($s0) /* 3858F4 E00822B4 C602000C */ lwc1 $f2, 0xC($s0) /* 3858F8 E00822B8 3C01C3FA */ lui $at, (0xC3FA0000 >> 16) /* 3858FC E00822BC 44810000 */ mtc1 $at, $f0 /* 385900 E00822C0 AE000070 */ sw $zero, 0x70($s0) /* 385904 E00822C4 24420001 */ addiu $v0, $v0, 0x1 /* 385908 E00822C8 4602003C */ c.lt.s $f0, $f2 /* 38590C E00822CC 00000000 */ nop /* 385910 E00822D0 4500001B */ bc1f .LE0082340 /* 385914 E00822D4 AE020038 */ sw $v0, 0x38($s0) /* 385918 E00822D8 C6000010 */ lwc1 $f0, 0x10($s0) /* 38591C E00822DC 24042107 */ addiu $a0, $zero, 0x2107 /* 385920 E00822E0 E7A00010 */ swc1 $f0, 0x10($sp) /* 385924 E00822E4 8E060008 */ lw $a2, 0x8($s0) /* 385928 E00822E8 8E07000C */ lw $a3, 0xC($s0) /* 38592C E00822EC 0C0801A0 */ jal shim_sfx_play_sound_at_position /* 385930 E00822F0 0000282D */ daddu $a1, $zero, $zero /* 385934 E00822F4 080208D1 */ j .LE0082344 /* 385938 E00822F8 24020008 */ addiu $v0, $zero, 0x8 .LE00822FC: /* 38593C E00822FC 0064102A */ slt $v0, $v1, $a0 /* 385940 E0082300 10400010 */ beqz $v0, .LE0082344 /* 385944 E0082304 24020008 */ addiu $v0, $zero, 0x8 /* 385948 E0082308 0C080150 */ jal shim_load_effect /* 38594C E008230C 24040041 */ addiu $a0, $zero, 0x41 /* 385950 E0082310 C602000C */ lwc1 $f2, 0xC($s0) /* 385954 E0082314 C6000068 */ lwc1 $f0, 0x68($s0) /* 385958 E0082318 AFA00010 */ sw $zero, 0x10($sp) /* 38595C E008231C 46001080 */ add.s $f2, $f2, $f0 /* 385960 E0082320 8E050008 */ lw $a1, 0x8($s0) /* 385964 E0082324 8E070010 */ lw $a3, 0x10($s0) /* 385968 E0082328 44061000 */ mfc1 $a2, $f2 /* 38596C E008232C 0C020800 */ jal disable_x_main /* 385970 E0082330 2404000A */ addiu $a0, $zero, 0xA /* 385974 E0082334 8E020038 */ lw $v0, 0x38($s0) /* 385978 E0082338 2442FFFF */ addiu $v0, $v0, -0x1 /* 38597C E008233C AE020038 */ sw $v0, 0x38($s0) .LE0082340: /* 385980 E0082340 24020008 */ addiu $v0, $zero, 0x8 .LE0082344: /* 385984 E0082344 AE020044 */ sw $v0, 0x44($s0) .LE0082348: /* 385988 E0082348 8E820008 */ lw $v0, 0x8($s4) /* 38598C E008234C 24110001 */ addiu $s1, $zero, 0x1 /* 385990 E0082350 0222102A */ slt $v0, $s1, $v0 /* 385994 E0082354 10400065 */ beqz $v0, .LE00824EC /* 385998 E0082358 26100048 */ addiu $s0, $s0, 0x48 /* 38599C E008235C 3C17E008 */ lui $s7, %hi(D_E0082D30) /* 3859A0 E0082360 26F72D30 */ addiu $s7, $s7, %lo(D_E0082D30) /* 3859A4 E0082364 02351004 */ sllv $v0, $s5, $s1 /* 3859A8 E0082368 00551021 */ addu $v0, $v0, $s5 /* 3859AC E008236C 0002B080 */ sll $s6, $v0, 2 /* 3859B0 E0082370 3C014080 */ lui $at, (0x40800000 >> 16) /* 3859B4 E0082374 4481A000 */ mtc1 $at, $f20 /* 3859B8 E0082378 02321004 */ sllv $v0, $s2, $s1 /* 3859BC E008237C 00521021 */ addu $v0, $v0, $s2 /* 3859C0 E0082380 000210C0 */ sll $v0, $v0, 3 /* 3859C4 E0082384 0052A821 */ addu $s5, $v0, $s2 /* 3859C8 E0082388 26100028 */ addiu $s0, $s0, 0x28 .LE008238C: /* 3859CC E008238C 8E030000 */ lw $v1, 0x0($s0) /* 3859D0 E0082390 28620009 */ slti $v0, $v1, 0x9 /* 3859D4 E0082394 10400007 */ beqz $v0, .LE00823B4 /* 3859D8 E0082398 2402000A */ addiu $v0, $zero, 0xA /* 3859DC E008239C 12620005 */ beq $s3, $v0, .LE00823B4 /* 3859E0 E00823A0 00031080 */ sll $v0, $v1, 2 /* 3859E4 E00823A4 00571021 */ addu $v0, $v0, $s7 /* 3859E8 E00823A8 C4400000 */ lwc1 $f0, 0x0($v0) /* 3859EC E00823AC 080208F1 */ j .LE00823C4 /* 3859F0 E00823B0 E6000008 */ swc1 $f0, 0x8($s0) .LE00823B4: /* 3859F4 E00823B4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3859F8 E00823B8 44810000 */ mtc1 $at, $f0 /* 3859FC E00823BC 00000000 */ nop /* 385A00 E00823C0 E6000008 */ swc1 $f0, 0x8($s0) .LE00823C4: /* 385A04 E00823C4 C6000008 */ lwc1 $f0, 0x8($s0) /* 385A08 E00823C8 46160002 */ mul.s $f0, $f0, $f22 /* 385A0C E00823CC 00000000 */ nop /* 385A10 E00823D0 2E620002 */ sltiu $v0, $s3, 0x2 /* 385A14 E00823D4 10400009 */ beqz $v0, .LE00823FC /* 385A18 E00823D8 E6000008 */ swc1 $f0, 0x8($s0) /* 385A1C E00823DC 44966000 */ mtc1 $s6, $f12 /* 385A20 E00823E0 00000000 */ nop /* 385A24 E00823E4 0C080144 */ jal shim_cos_deg /* 385A28 E00823E8 46806320 */ cvt.s.w $f12, $f12 /* 385A2C E00823EC 46140002 */ mul.s $f0, $f0, $f20 /* 385A30 E00823F0 00000000 */ nop /* 385A34 E00823F4 08020900 */ j .LE0082400 /* 385A38 E00823F8 E600FFF8 */ swc1 $f0, -0x8($s0) .LE00823FC: /* 385A3C E00823FC AE00FFF8 */ sw $zero, -0x8($s0) .LE0082400: /* 385A40 E0082400 C606FFE0 */ lwc1 $f6, -0x20($s0) /* 385A44 E0082404 C600FFEC */ lwc1 $f0, -0x14($s0) /* 385A48 E0082408 C604FFE4 */ lwc1 $f4, -0x1C($s0) /* 385A4C E008240C 46003180 */ add.s $f6, $f6, $f0 /* 385A50 E0082410 C600FFF0 */ lwc1 $f0, -0x10($s0) /* 385A54 E0082414 C602FFE8 */ lwc1 $f2, -0x18($s0) /* 385A58 E0082418 46002100 */ add.s $f4, $f4, $f0 /* 385A5C E008241C C600FFF4 */ lwc1 $f0, -0xC($s0) /* 385A60 E0082420 24020014 */ addiu $v0, $zero, 0x14 /* 385A64 E0082424 46001080 */ add.s $f2, $f2, $f0 /* 385A68 E0082428 E606FFE0 */ swc1 $f6, -0x20($s0) /* 385A6C E008242C E604FFE4 */ swc1 $f4, -0x1C($s0) /* 385A70 E0082430 16420005 */ bne $s2, $v0, .LE0082448 /* 385A74 E0082434 E602FFE8 */ swc1 $f2, -0x18($s0) /* 385A78 E0082438 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 385A7C E008243C 44810000 */ mtc1 $at, $f0 /* 385A80 E0082440 E614FFF0 */ swc1 $f20, -0x10($s0) /* 385A84 E0082444 E600FFEC */ swc1 $f0, -0x14($s0) .LE0082448: /* 385A88 E0082448 2A420014 */ slti $v0, $s2, 0x14 /* 385A8C E008244C 1040001D */ beqz $v0, .LE00824C4 /* 385A90 E0082450 2A42000A */ slti $v0, $s2, 0xA /* 385A94 E0082454 44920000 */ mtc1 $s2, $f0 /* 385A98 E0082458 00000000 */ nop /* 385A9C E008245C 46800020 */ cvt.s.w $f0, $f0 /* 385AA0 E0082460 3C01E008 */ lui $at, (0xE0082D60 >> 16) /* 385AA4 E0082464 D4222D60 */ ldc1 $f2, (0xE0082D60 & 0xFFFF)($at) /* 385AA8 E0082468 46000021 */ cvt.d.s $f0, $f0 /* 385AAC E008246C 46220002 */ mul.d $f0, $f0, $f2 /* 385AB0 E0082470 00000000 */ nop /* 385AB4 E0082474 C602FFF8 */ lwc1 $f2, -0x8($s0) /* 385AB8 E0082478 460010A1 */ cvt.d.s $f2, $f2 /* 385ABC E008247C 46201082 */ mul.d $f2, $f2, $f0 /* 385AC0 E0082480 00000000 */ nop /* 385AC4 E0082484 3C01BFE0 */ lui $at, (0xBFE00000 >> 16) /* 385AC8 E0082488 44812800 */ mtc1 $at, $f5 /* 385ACC E008248C 44802000 */ mtc1 $zero, $f4 /* 385AD0 E0082490 C600FFF0 */ lwc1 $f0, -0x10($s0) /* 385AD4 E0082494 C6060018 */ lwc1 $f6, 0x18($s0) /* 385AD8 E0082498 46000021 */ cvt.d.s $f0, $f0 /* 385ADC E008249C 46240000 */ add.d $f0, $f0, $f4 /* 385AE0 E00824A0 3C014120 */ lui $at, (0x41200000 >> 16) /* 385AE4 E00824A4 44812000 */ mtc1 $at, $f4 /* 385AE8 E00824A8 00000000 */ nop /* 385AEC E00824AC 46043180 */ add.s $f6, $f6, $f4 /* 385AF0 E00824B0 46200020 */ cvt.s.d $f0, $f0 /* 385AF4 E00824B4 E600FFF0 */ swc1 $f0, -0x10($s0) /* 385AF8 E00824B8 E6060018 */ swc1 $f6, 0x18($s0) /* 385AFC E00824BC 462010A0 */ cvt.s.d $f2, $f2 /* 385B00 E00824C0 E602FFF8 */ swc1 $f2, -0x8($s0) .LE00824C4: /* 385B04 E00824C4 54400001 */ bnel $v0, $zero, .LE00824CC /* 385B08 E00824C8 AE15FFFC */ sw $s5, -0x4($s0) .LE00824CC: /* 385B0C E00824CC 8E020000 */ lw $v0, 0x0($s0) /* 385B10 E00824D0 26310001 */ addiu $s1, $s1, 0x1 /* 385B14 E00824D4 24420001 */ addiu $v0, $v0, 0x1 /* 385B18 E00824D8 AE020000 */ sw $v0, 0x0($s0) /* 385B1C E00824DC 8E820008 */ lw $v0, 0x8($s4) /* 385B20 E00824E0 0222102A */ slt $v0, $s1, $v0 /* 385B24 E00824E4 1440FFA9 */ bnez $v0, .LE008238C /* 385B28 E00824E8 26100048 */ addiu $s0, $s0, 0x48 .LE00824EC: /* 385B2C E00824EC 8FBF0038 */ lw $ra, 0x38($sp) /* 385B30 E00824F0 8FB70034 */ lw $s7, 0x34($sp) /* 385B34 E00824F4 8FB60030 */ lw $s6, 0x30($sp) /* 385B38 E00824F8 8FB5002C */ lw $s5, 0x2C($sp) /* 385B3C E00824FC 8FB40028 */ lw $s4, 0x28($sp) /* 385B40 E0082500 8FB30024 */ lw $s3, 0x24($sp) /* 385B44 E0082504 8FB20020 */ lw $s2, 0x20($sp) /* 385B48 E0082508 8FB1001C */ lw $s1, 0x1C($sp) /* 385B4C E008250C 8FB00018 */ lw $s0, 0x18($sp) /* 385B50 E0082510 D7B60048 */ ldc1 $f22, 0x48($sp) /* 385B54 E0082514 D7B40040 */ ldc1 $f20, 0x40($sp) /* 385B58 E0082518 03E00008 */ jr $ra /* 385B5C E008251C 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void disable_x_update(EffectInstance* effect) { static const f32 D_E0082D30[12] = { 5.0f, 4.0f, 4.0f, 3.0f, 2.0f, 1.0f, 0.7f, 1.2f, 1.0f, 0.0f, 0.0f, 0.0f }; DisableXFXData* data = effect->data.disableX; s32 unk_28; s32 unk_2C; f32 unk_34; s32 unk_3C; s32 unk_38; u32 type; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->unk_28 = 21; } if (data->unk_28 < 100) { data->unk_28--; } if (data->unk_28 < 0) { shim_remove_effect(effect); return; } data->unk_2C++; if (data->unk_2C > 324000) { data->unk_2C = 256; } type = data->type; unk_28 = data->unk_28; unk_2C = data->unk_2C; unk_38 = data->unk_38; unk_34 = data->scale; unk_3C = data->koDuration; if (type == 0) { if (data->unk_44 > 0) { data->unk_44--; } else { if (data->koDuration != unk_38) { if (data->koDuration < 0) { unk_3C = 0; } if (unk_38 < unk_3C) { data->unk_28 = 100; data->unk_2C = 1; data[1].unk_28 = 0; data->unk_38++; if (data->pos.y > -500.0f) { shim_sfx_play_sound_at_position(SOUND_2107, SOUND_SPACE_MODE_0, data->pos.x, data->pos.y, data->pos.z); } } else if (unk_3C < unk_38) { shim_load_effect(EFFECT_DISABLE_X); disable_x_main(10, data->pos.x, data->pos.y + data[1].unk_20, data->pos.z, 0); data->unk_38--; } data->unk_44 = 8; } } } data++; for (i = 1; i < effect->numParts; i++, data++) { if (data->unk_28 < 9 && type != 10) { data->unk_30 = D_E0082D30[data->unk_28]; } else { data->unk_30 = 1.0f; } data->unk_30 *= unk_34; if (type < 2) { data->unk_20 = shim_cos_deg(unk_2C * 12) * 4.0f; } else { data->unk_20 = 0.0f; } data->pos.x += data->unk_14; data->pos.y += data->unk_18; data->pos.z += data->unk_1C; if (unk_28 == 20) { data->unk_18 = 4.0f; data->unk_14 = -2.0f; } if (unk_28 < 20) { data->unk_18 += -0.5; data->unk_40 += 10.0f; data->unk_20 *= (f32) unk_28 * 0.05; } if (unk_28 < 10) { data->alpha = unk_28 * 25; } data->unk_28 += 1; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_collider_transform /* 36E24 8005BA24 27BDFF58 */ addiu $sp, $sp, -0xA8 /* 36E28 8005BA28 00042400 */ sll $a0, $a0, 16 /* 36E2C 8005BA2C 00042403 */ sra $a0, $a0, 16 /* 36E30 8005BA30 000410C0 */ sll $v0, $a0, 3 /* 36E34 8005BA34 00441023 */ subu $v0, $v0, $a0 /* 36E38 8005BA38 3C03800B */ lui $v1, %hi(D_800B42E4) /* 36E3C 8005BA3C 8C6342E4 */ lw $v1, %lo(D_800B42E4)($v1) /* 36E40 8005BA40 00021080 */ sll $v0, $v0, 2 /* 36E44 8005BA44 AFBF0074 */ sw $ra, 0x74($sp) /* 36E48 8005BA48 AFB40070 */ sw $s4, 0x70($sp) /* 36E4C 8005BA4C AFB3006C */ sw $s3, 0x6C($sp) /* 36E50 8005BA50 AFB20068 */ sw $s2, 0x68($sp) /* 36E54 8005BA54 AFB10064 */ sw $s1, 0x64($sp) /* 36E58 8005BA58 AFB00060 */ sw $s0, 0x60($sp) /* 36E5C 8005BA5C F7BE00A0 */ sdc1 $f30, 0xA0($sp) /* 36E60 8005BA60 F7BC0098 */ sdc1 $f28, 0x98($sp) /* 36E64 8005BA64 F7BA0090 */ sdc1 $f26, 0x90($sp) /* 36E68 8005BA68 F7B80088 */ sdc1 $f24, 0x88($sp) /* 36E6C 8005BA6C F7B60080 */ sdc1 $f22, 0x80($sp) /* 36E70 8005BA70 F7B40078 */ sdc1 $f20, 0x78($sp) /* 36E74 8005BA74 00629821 */ addu $s3, $v1, $v0 /* 36E78 8005BA78 0C046B4C */ jal get_model_from_list_index /* 36E7C 8005BA7C 86640008 */ lh $a0, 0x8($s3) /* 36E80 8005BA80 0040802D */ daddu $s0, $v0, $zero /* 36E84 8005BA84 8E050004 */ lw $a1, 0x4($s0) /* 36E88 8005BA88 14A00005 */ bnez $a1, .L8005BAA0 /* 36E8C 8005BA8C 26040058 */ addiu $a0, $s0, 0x58 /* 36E90 8005BA90 0C00A5C8 */ jal copy_matrix /* 36E94 8005BA94 27A50020 */ addiu $a1, $sp, 0x20 /* 36E98 8005BA98 08016EAF */ j .L8005BABC /* 36E9C 8005BA9C 0000902D */ daddu $s2, $zero, $zero .L8005BAA0: /* 36EA0 8005BAA0 0C019D60 */ jal guMtxL2F /* 36EA4 8005BAA4 27A40020 */ addiu $a0, $sp, 0x20 /* 36EA8 8005BAA8 26040058 */ addiu $a0, $s0, 0x58 /* 36EAC 8005BAAC 27A50020 */ addiu $a1, $sp, 0x20 /* 36EB0 8005BAB0 0C019D80 */ jal guMtxCatF /* 36EB4 8005BAB4 00A0302D */ daddu $a2, $a1, $zero /* 36EB8 8005BAB8 0000902D */ daddu $s2, $zero, $zero .L8005BABC: /* 36EBC 8005BABC 8E74000C */ lw $s4, 0xC($s3) /* 36EC0 8005BAC0 8E710018 */ lw $s1, 0x18($s3) /* 36EC4 8005BAC4 3C014974 */ lui $at, (0x497423FE >> 16) /* 36EC8 8005BAC8 342123FE */ ori $at, $at, (0x497423FE & 0xFFFF) /* 36ECC 8005BACC 4481A000 */ mtc1 $at, $f20 /* 36ED0 8005BAD0 3C01C974 */ lui $at, (0xC97423FE >> 16) /* 36ED4 8005BAD4 342123FE */ ori $at, $at, (0xC97423FE & 0xFFFF) /* 36ED8 8005BAD8 4481B000 */ mtc1 $at, $f22 /* 36EDC 8005BADC 86620014 */ lh $v0, 0x14($s3) /* 36EE0 8005BAE0 4600A686 */ mov.s $f26, $f20 /* 36EE4 8005BAE4 4600A606 */ mov.s $f24, $f20 /* 36EE8 8005BAE8 4600B786 */ mov.s $f30, $f22 /* 36EEC 8005BAEC 1840002C */ blez $v0, .L8005BBA0 /* 36EF0 8005BAF0 4600B706 */ mov.s $f28, $f22 /* 36EF4 8005BAF4 26300008 */ addiu $s0, $s1, 0x8 .L8005BAF8: /* 36EF8 8005BAF8 26220004 */ addiu $v0, $s1, 0x4 /* 36EFC 8005BAFC AFB10010 */ sw $s1, 0x10($sp) /* 36F00 8005BB00 AFA20014 */ sw $v0, 0x14($sp) /* 36F04 8005BB04 AFB00018 */ sw $s0, 0x18($sp) /* 36F08 8005BB08 8E050004 */ lw $a1, 0x4($s0) /* 36F0C 8005BB0C 8E060008 */ lw $a2, 0x8($s0) /* 36F10 8005BB10 8E07000C */ lw $a3, 0xC($s0) /* 36F14 8005BB14 0C019E9C */ jal guMtxXFMF /* 36F18 8005BB18 27A40020 */ addiu $a0, $sp, 0x20 /* 36F1C 8005BB1C C6200000 */ lwc1 $f0, 0x0($s1) /* 36F20 8005BB20 4618003C */ c.lt.s $f0, $f24 /* 36F24 8005BB24 00000000 */ nop /* 36F28 8005BB28 45030001 */ bc1tl .L8005BB30 /* 36F2C 8005BB2C 46000606 */ mov.s $f24, $f0 .L8005BB30: /* 36F30 8005BB30 4600E03C */ c.lt.s $f28, $f0 /* 36F34 8005BB34 00000000 */ nop /* 36F38 8005BB38 45030001 */ bc1tl .L8005BB40 /* 36F3C 8005BB3C 46000706 */ mov.s $f28, $f0 .L8005BB40: /* 36F40 8005BB40 C600FFFC */ lwc1 $f0, -0x4($s0) /* 36F44 8005BB44 461A003C */ c.lt.s $f0, $f26 /* 36F48 8005BB48 00000000 */ nop /* 36F4C 8005BB4C 45030001 */ bc1tl .L8005BB54 /* 36F50 8005BB50 46000686 */ mov.s $f26, $f0 .L8005BB54: /* 36F54 8005BB54 4600F03C */ c.lt.s $f30, $f0 /* 36F58 8005BB58 00000000 */ nop /* 36F5C 8005BB5C 45030001 */ bc1tl .L8005BB64 /* 36F60 8005BB60 46000786 */ mov.s $f30, $f0 .L8005BB64: /* 36F64 8005BB64 C6000000 */ lwc1 $f0, 0x0($s0) /* 36F68 8005BB68 4614003C */ c.lt.s $f0, $f20 /* 36F6C 8005BB6C 00000000 */ nop /* 36F70 8005BB70 45030001 */ bc1tl .L8005BB78 /* 36F74 8005BB74 46000506 */ mov.s $f20, $f0 .L8005BB78: /* 36F78 8005BB78 4600B03C */ c.lt.s $f22, $f0 /* 36F7C 8005BB7C 00000000 */ nop /* 36F80 8005BB80 45030001 */ bc1tl .L8005BB88 /* 36F84 8005BB84 46000586 */ mov.s $f22, $f0 .L8005BB88: /* 36F88 8005BB88 26100018 */ addiu $s0, $s0, 0x18 /* 36F8C 8005BB8C 86620014 */ lh $v0, 0x14($s3) /* 36F90 8005BB90 26520001 */ addiu $s2, $s2, 0x1 /* 36F94 8005BB94 0242102A */ slt $v0, $s2, $v0 /* 36F98 8005BB98 1440FFD7 */ bnez $v0, .L8005BAF8 /* 36F9C 8005BB9C 26310018 */ addiu $s1, $s1, 0x18 .L8005BBA0: /* 36FA0 8005BBA0 8E620010 */ lw $v0, 0x10($s3) /* 36FA4 8005BBA4 E4580000 */ swc1 $f24, 0x0($v0) /* 36FA8 8005BBA8 8E620010 */ lw $v0, 0x10($s3) /* 36FAC 8005BBAC E45A0004 */ swc1 $f26, 0x4($v0) /* 36FB0 8005BBB0 8E620010 */ lw $v0, 0x10($s3) /* 36FB4 8005BBB4 E4540008 */ swc1 $f20, 0x8($v0) /* 36FB8 8005BBB8 8E620010 */ lw $v0, 0x10($s3) /* 36FBC 8005BBBC E45C000C */ swc1 $f28, 0xC($v0) /* 36FC0 8005BBC0 8E620010 */ lw $v0, 0x10($s3) /* 36FC4 8005BBC4 E45E0010 */ swc1 $f30, 0x10($v0) /* 36FC8 8005BBC8 8E620010 */ lw $v0, 0x10($s3) /* 36FCC 8005BBCC E4560014 */ swc1 $f22, 0x14($v0) /* 36FD0 8005BBD0 8662000A */ lh $v0, 0xA($s3) /* 36FD4 8005BBD4 18400066 */ blez $v0, .L8005BD70 /* 36FD8 8005BBD8 0000902D */ daddu $s2, $zero, $zero /* 36FDC 8005BBDC 4480D000 */ mtc1 $zero, $f26 /* 36FE0 8005BBE0 26900038 */ addiu $s0, $s4, 0x38 .L8005BBE4: /* 36FE4 8005BBE4 8E04FFD0 */ lw $a0, -0x30($s0) /* 36FE8 8005BBE8 8E820000 */ lw $v0, 0x0($s4) /* 36FEC 8005BBEC C4800000 */ lwc1 $f0, 0x0($a0) /* 36FF0 8005BBF0 C4420000 */ lwc1 $f2, 0x0($v0) /* 36FF4 8005BBF4 46020001 */ sub.s $f0, $f0, $f2 /* 36FF8 8005BBF8 E600FFD4 */ swc1 $f0, -0x2C($s0) /* 36FFC 8005BBFC C4800004 */ lwc1 $f0, 0x4($a0) /* 37000 8005BC00 C4420004 */ lwc1 $f2, 0x4($v0) /* 37004 8005BC04 46020001 */ sub.s $f0, $f0, $f2 /* 37008 8005BC08 E600FFD8 */ swc1 $f0, -0x28($s0) /* 3700C 8005BC0C C4800008 */ lwc1 $f0, 0x8($a0) /* 37010 8005BC10 C4420008 */ lwc1 $f2, 0x8($v0) /* 37014 8005BC14 46020001 */ sub.s $f0, $f0, $f2 /* 37018 8005BC18 8E03FFCC */ lw $v1, -0x34($s0) /* 3701C 8005BC1C E600FFDC */ swc1 $f0, -0x24($s0) /* 37020 8005BC20 C4400000 */ lwc1 $f0, 0x0($v0) /* 37024 8005BC24 C4620000 */ lwc1 $f2, 0x0($v1) /* 37028 8005BC28 46020001 */ sub.s $f0, $f0, $f2 /* 3702C 8005BC2C E600FFE0 */ swc1 $f0, -0x20($s0) /* 37030 8005BC30 C4400004 */ lwc1 $f0, 0x4($v0) /* 37034 8005BC34 C4620004 */ lwc1 $f2, 0x4($v1) /* 37038 8005BC38 46020001 */ sub.s $f0, $f0, $f2 /* 3703C 8005BC3C E600FFE4 */ swc1 $f0, -0x1C($s0) /* 37040 8005BC40 C4400008 */ lwc1 $f0, 0x8($v0) /* 37044 8005BC44 C4620008 */ lwc1 $f2, 0x8($v1) /* 37048 8005BC48 46020001 */ sub.s $f0, $f0, $f2 /* 3704C 8005BC4C C60AFFD8 */ lwc1 $f10, -0x28($s0) /* 37050 8005BC50 E600FFE8 */ swc1 $f0, -0x18($s0) /* 37054 8005BC54 46000186 */ mov.s $f6, $f0 /* 37058 8005BC58 46065382 */ mul.s $f14, $f10, $f6 /* 3705C 8005BC5C 00000000 */ nop /* 37060 8005BC60 C604FFD4 */ lwc1 $f4, -0x2C($s0) /* 37064 8005BC64 46062182 */ mul.s $f6, $f4, $f6 /* 37068 8005BC68 00000000 */ nop /* 3706C 8005BC6C C608FFE4 */ lwc1 $f8, -0x1C($s0) /* 37070 8005BC70 46082102 */ mul.s $f4, $f4, $f8 /* 37074 8005BC74 00000000 */ nop /* 37078 8005BC78 C602FFE0 */ lwc1 $f2, -0x20($s0) /* 3707C 8005BC7C 46025282 */ mul.s $f10, $f10, $f2 /* 37080 8005BC80 00000000 */ nop /* 37084 8005BC84 C600FFDC */ lwc1 $f0, -0x24($s0) /* 37088 8005BC88 46080302 */ mul.s $f12, $f0, $f8 /* 3708C 8005BC8C 00000000 */ nop /* 37090 8005BC90 46020002 */ mul.s $f0, $f0, $f2 /* 37094 8005BC94 00000000 */ nop /* 37098 8005BC98 460A2501 */ sub.s $f20, $f4, $f10 /* 3709C 8005BC9C 4614A102 */ mul.s $f4, $f20, $f20 /* 370A0 8005BCA0 00000000 */ nop /* 370A4 8005BCA4 460C7601 */ sub.s $f24, $f14, $f12 /* 370A8 8005BCA8 4618C202 */ mul.s $f8, $f24, $f24 /* 370AC 8005BCAC 00000000 */ nop /* 370B0 8005BCB0 C4620000 */ lwc1 $f2, 0x0($v1) /* 370B4 8005BCB4 46060581 */ sub.s $f22, $f0, $f6 /* 370B8 8005BCB8 C4800000 */ lwc1 $f0, 0x0($a0) /* 370BC 8005BCBC 46001081 */ sub.s $f2, $f2, $f0 /* 370C0 8005BCC0 4616B182 */ mul.s $f6, $f22, $f22 /* 370C4 8005BCC4 00000000 */ nop /* 370C8 8005BCC8 E602FFEC */ swc1 $f2, -0x14($s0) /* 370CC 8005BCCC C4620004 */ lwc1 $f2, 0x4($v1) /* 370D0 8005BCD0 C4800004 */ lwc1 $f0, 0x4($a0) /* 370D4 8005BCD4 46001081 */ sub.s $f2, $f2, $f0 /* 370D8 8005BCD8 E602FFF0 */ swc1 $f2, -0x10($s0) /* 370DC 8005BCDC C4620008 */ lwc1 $f2, 0x8($v1) /* 370E0 8005BCE0 46064200 */ add.s $f8, $f8, $f6 /* 370E4 8005BCE4 C4800008 */ lwc1 $f0, 0x8($a0) /* 370E8 8005BCE8 46001081 */ sub.s $f2, $f2, $f0 /* 370EC 8005BCEC 46044300 */ add.s $f12, $f8, $f4 /* 370F0 8005BCF0 461A6032 */ c.eq.s $f12, $f26 /* 370F4 8005BCF4 00000000 */ nop /* 370F8 8005BCF8 4501000D */ bc1t .L8005BD30 /* 370FC 8005BCFC E602FFF4 */ swc1 $f2, -0xC($s0) /* 37100 8005BD00 46006084 */ sqrt.s $f2, $f12 /* 37104 8005BD04 46021032 */ c.eq.s $f2, $f2 /* 37108 8005BD08 00000000 */ nop /* 3710C 8005BD0C 45010004 */ bc1t .L8005BD20 /* 37110 8005BD10 00000000 */ nop /* 37114 8005BD14 0C0187BC */ jal sqrtf /* 37118 8005BD18 00000000 */ nop /* 3711C 8005BD1C 46000086 */ mov.s $f2, $f0 .L8005BD20: /* 37120 8005BD20 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 37124 8005BD24 44810000 */ mtc1 $at, $f0 /* 37128 8005BD28 08016F4D */ j .L8005BD34 /* 3712C 8005BD2C 46020303 */ div.s $f12, $f0, $f2 .L8005BD30: /* 37130 8005BD30 4600D306 */ mov.s $f12, $f26 .L8005BD34: /* 37134 8005BD34 460CC002 */ mul.s $f0, $f24, $f12 /* 37138 8005BD38 00000000 */ nop /* 3713C 8005BD3C 460CB082 */ mul.s $f2, $f22, $f12 /* 37140 8005BD40 00000000 */ nop /* 37144 8005BD44 460CA102 */ mul.s $f4, $f20, $f12 /* 37148 8005BD48 00000000 */ nop /* 3714C 8005BD4C 26940040 */ addiu $s4, $s4, 0x40 /* 37150 8005BD50 26520001 */ addiu $s2, $s2, 0x1 /* 37154 8005BD54 E600FFF8 */ swc1 $f0, -0x8($s0) /* 37158 8005BD58 E602FFFC */ swc1 $f2, -0x4($s0) /* 3715C 8005BD5C E6040000 */ swc1 $f4, 0x0($s0) /* 37160 8005BD60 8662000A */ lh $v0, 0xA($s3) /* 37164 8005BD64 0242102A */ slt $v0, $s2, $v0 /* 37168 8005BD68 1440FF9E */ bnez $v0, .L8005BBE4 /* 3716C 8005BD6C 26100040 */ addiu $s0, $s0, 0x40 .L8005BD70: /* 37170 8005BD70 8FBF0074 */ lw $ra, 0x74($sp) /* 37174 8005BD74 8FB40070 */ lw $s4, 0x70($sp) /* 37178 8005BD78 8FB3006C */ lw $s3, 0x6C($sp) /* 3717C 8005BD7C 8FB20068 */ lw $s2, 0x68($sp) /* 37180 8005BD80 8FB10064 */ lw $s1, 0x64($sp) /* 37184 8005BD84 8FB00060 */ lw $s0, 0x60($sp) /* 37188 8005BD88 D7BE00A0 */ ldc1 $f30, 0xA0($sp) /* 3718C 8005BD8C D7BC0098 */ ldc1 $f28, 0x98($sp) /* 37190 8005BD90 D7BA0090 */ ldc1 $f26, 0x90($sp) /* 37194 8005BD94 D7B80088 */ ldc1 $f24, 0x88($sp) /* 37198 8005BD98 D7B60080 */ ldc1 $f22, 0x80($sp) /* 3719C 8005BD9C D7B40078 */ ldc1 $f20, 0x78($sp) /* 371A0 8005BDA0 03E00008 */ jr $ra /* 371A4 8005BDA4 27BD00A8 */ addiu $sp, $sp, 0xA8 ### DECOMPILED C INSTRUCTIONS: void update_collider_transform(s16 colliderID) { Collider* collider; struct Model* model; Matrix4f matrix; s32 i; Vec3f* vertexTable; f32 min_x, min_y, min_z, max_x, max_y, max_z; ColliderTriangle* triangle; f32 e13_y, e21_z, e13_z, e21_y, e21_x, e13_x, normalX, normalY, normalZ, coeff; collider = &gCollisionData.colliderList[colliderID]; model = get_model_from_list_index(collider->parentModelIndex); if (!model->currentMatrix) { copy_matrix(model->transformMatrix, matrix); } else { guMtxL2F(matrix, (Mtx*)model->currentMatrix); guMtxCatF(model->transformMatrix, matrix, matrix); } triangle = collider->triangleTable; vertexTable = collider->vertexTable; min_x = min_y = min_z = 999999.9f; max_x = max_y = max_z = -999999.9f; for (i = 0; i < collider->numVertices; vertexTable += 2, i++) { guMtxXFMF(matrix, vertexTable[1].x, vertexTable[1].y, vertexTable[1].z, &vertexTable[0].x, &vertexTable[0].y, &vertexTable[0].z); if (vertexTable[0].x < min_x) min_x = vertexTable[0].x; if (vertexTable[0].x > max_x) max_x = vertexTable[0].x; if (vertexTable[0].y < min_y) min_y = vertexTable[0].y; if (vertexTable[0].y > max_y) max_y = vertexTable[0].y; if (vertexTable[0].z < min_z) min_z = vertexTable[0].z; if (vertexTable[0].z > max_z) max_z = vertexTable[0].z; } collider->aabb->min.x = min_x; collider->aabb->min.y = min_y; collider->aabb->min.z = min_z; collider->aabb->max.x = max_x; collider->aabb->max.y = max_y; collider->aabb->max.z = max_z; for (i = 0; i < collider->numTriangles; triangle++, i++) { Vec3f* v1 = triangle->v1; Vec3f* v2 = triangle->v2; Vec3f* v3 = triangle->v3; triangle->e13.x = v3->x - v1->x; triangle->e13.y = v3->y - v1->y; triangle->e13.z = v3->z - v1->z; triangle->e21.x = v1->x - v2->x; triangle->e21.y = v1->y - v2->y; triangle->e21.z = v1->z - v2->z; triangle->e32.x = v2->x - v3->x; triangle->e32.y = v2->y - v3->y; triangle->e32.z = v2->z - v3->z; e13_x = triangle->e13.x; e13_y = triangle->e13.y; e13_z = triangle->e13.z; e21_x = triangle->e21.x; e21_y = triangle->e21.y; e21_z = triangle->e21.z; // vector product normalX = e13_y * e21_z - e13_z * e21_y; normalY = e13_z * e21_x - e13_x * e21_z; normalZ = e13_x * e21_y - e13_y * e21_x; coeff = SQ(normalX) + SQ(normalY) + SQ(normalZ); if (coeff != 0) { coeff = 1.0f / sqrtf(coeff); } else { coeff = 0.0f; } triangle->normal.x = normalX * coeff; triangle->normal.y = normalY * coeff; triangle->normal.z = normalZ * coeff; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_logos /* F4A4 800340A4 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* F4A8 800340A8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* F4AC 800340AC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* F4B0 800340B0 AFBF0014 */ sw $ra, 0x14($sp) /* F4B4 800340B4 AFB00010 */ sw $s0, 0x10($sp) /* F4B8 800340B8 806200AE */ lb $v0, 0xAE($v1) /* F4BC 800340BC 1040000E */ beqz $v0, .L800340F8 /* F4C0 800340C0 00000000 */ nop /* F4C4 800340C4 0C00CE0C */ jal intro_logos_fade_out /* F4C8 800340C8 2404000A */ addiu $a0, $zero, 0xA /* F4CC 800340CC 104000A4 */ beqz $v0, .L80034360 /* F4D0 800340D0 00000000 */ nop /* F4D4 800340D4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F4D8 800340D8 44816000 */ mtc1 $at, $f12 /* F4DC 800340DC 0C00AFBB */ jal set_curtain_scale /* F4E0 800340E0 00000000 */ nop /* F4E4 800340E4 44806000 */ mtc1 $zero, $f12 /* F4E8 800340E8 0C00AFC9 */ jal set_curtain_fade /* F4EC 800340EC 00000000 */ nop /* F4F0 800340F0 0800D0D6 */ j .L80034358 /* F4F4 800340F4 24040002 */ addiu $a0, $zero, 0x2 .L800340F8: /* F4F8 800340F8 806300AC */ lb $v1, 0xAC($v1) /* F4FC 800340FC 2C62000C */ sltiu $v0, $v1, 0xC /* F500 80034100 10400097 */ beqz $v0, .L80034360 /* F504 80034104 00031080 */ sll $v0, $v1, 2 /* F508 80034108 3C01800A */ lui $at, %hi(jtbl_80098290) /* F50C 8003410C 00220821 */ addu $at, $at, $v0 /* F510 80034110 8C228290 */ lw $v0, %lo(jtbl_80098290)($at) /* F514 80034114 00400008 */ jr $v0 /* F518 80034118 00000000 */ nop glabel .L8003411C /* F51C 8003411C 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* F520 80034120 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* F524 80034124 8E020000 */ lw $v0, 0x0($s0) /* F528 80034128 804200AD */ lb $v0, 0xAD($v0) /* F52C 8003412C 1440004D */ bnez $v0, .L80034264 /* F530 80034130 00000000 */ nop /* F534 80034134 0C00CDF8 */ jal intro_logos_set_fade_color /* F538 80034138 240400D0 */ addiu $a0, $zero, 0xD0 /* F53C 8003413C 8E030000 */ lw $v1, 0x0($s0) /* F540 80034140 906200AC */ lbu $v0, 0xAC($v1) /* F544 80034144 24420001 */ addiu $v0, $v0, 0x1 /* F548 80034148 0800D099 */ j .L80034264 /* F54C 8003414C A06200AC */ sb $v0, 0xAC($v1) glabel .L80034150 /* F550 80034150 0C00CE0C */ jal intro_logos_fade_out /* F554 80034154 2404000A */ addiu $a0, $zero, 0xA /* F558 80034158 10400081 */ beqz $v0, .L80034360 /* F55C 8003415C 00000000 */ nop /* F560 80034160 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* F564 80034164 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* F568 80034168 0800D0C5 */ j .L80034314 /* F56C 8003416C 00000000 */ nop glabel .L80034170 /* F570 80034170 0C00CDFE */ jal intro_logos_fade_in /* F574 80034174 2404000A */ addiu $a0, $zero, 0xA /* F578 80034178 10400079 */ beqz $v0, .L80034360 /* F57C 8003417C 00000000 */ nop /* F580 80034180 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* F584 80034184 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* F588 80034188 8C830000 */ lw $v1, 0x0($a0) /* F58C 8003418C 906200AC */ lbu $v0, 0xAC($v1) /* F590 80034190 24420001 */ addiu $v0, $v0, 0x1 /* F594 80034194 A06200AC */ sb $v0, 0xAC($v1) /* F598 80034198 8C830000 */ lw $v1, 0x0($a0) /* F59C 8003419C 24020028 */ addiu $v0, $zero, 0x28 /* F5A0 800341A0 0800D0D8 */ j .L80034360 /* F5A4 800341A4 A06200AD */ sb $v0, 0xAD($v1) glabel .L800341A8 /* F5A8 800341A8 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* F5AC 800341AC 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* F5B0 800341B0 8E030000 */ lw $v1, 0x0($s0) /* F5B4 800341B4 806200AD */ lb $v0, 0xAD($v1) /* F5B8 800341B8 1440002B */ bnez $v0, .L80034268 /* F5BC 800341BC 240400D0 */ addiu $a0, $zero, 0xD0 /* F5C0 800341C0 906200AC */ lbu $v0, 0xAC($v1) /* F5C4 800341C4 24420001 */ addiu $v0, $v0, 0x1 /* F5C8 800341C8 0C00CDF8 */ jal intro_logos_set_fade_color /* F5CC 800341CC A06200AC */ sb $v0, 0xAC($v1) /* F5D0 800341D0 0800D099 */ j .L80034264 /* F5D4 800341D4 00000000 */ nop glabel .L800341D8 /* F5D8 800341D8 0C00CE0C */ jal intro_logos_fade_out /* F5DC 800341DC 2404000A */ addiu $a0, $zero, 0xA /* F5E0 800341E0 1040005F */ beqz $v0, .L80034360 /* F5E4 800341E4 00000000 */ nop /* F5E8 800341E8 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* F5EC 800341EC 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* F5F0 800341F0 0800D0C5 */ j .L80034314 /* F5F4 800341F4 00000000 */ nop glabel .L800341F8 /* F5F8 800341F8 0C00CDFE */ jal intro_logos_fade_in /* F5FC 800341FC 2404000A */ addiu $a0, $zero, 0xA /* F600 80034200 10400057 */ beqz $v0, .L80034360 /* F604 80034204 00000000 */ nop /* F608 80034208 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* F60C 8003420C 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* F610 80034210 8C830000 */ lw $v1, 0x0($a0) /* F614 80034214 906200AC */ lbu $v0, 0xAC($v1) /* F618 80034218 24420001 */ addiu $v0, $v0, 0x1 /* F61C 8003421C A06200AC */ sb $v0, 0xAC($v1) /* F620 80034220 8C830000 */ lw $v1, 0x0($a0) /* F624 80034224 2402001E */ addiu $v0, $zero, 0x1E /* F628 80034228 0800D0D8 */ j .L80034360 /* F62C 8003422C A06200AD */ sb $v0, 0xAD($v1) glabel .L80034230 /* F630 80034230 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* F634 80034234 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* F638 80034238 8E030000 */ lw $v1, 0x0($s0) /* F63C 8003423C 806200AD */ lb $v0, 0xAD($v1) /* F640 80034240 14400009 */ bnez $v0, .L80034268 /* F644 80034244 240400D0 */ addiu $a0, $zero, 0xD0 /* F648 80034248 906200AC */ lbu $v0, 0xAC($v1) /* F64C 8003424C 24420001 */ addiu $v0, $v0, 0x1 /* F650 80034250 0C00CDF8 */ jal intro_logos_set_fade_color /* F654 80034254 A06200AC */ sb $v0, 0xAC($v1) /* F658 80034258 8E030000 */ lw $v1, 0x0($s0) /* F65C 8003425C 2402001E */ addiu $v0, $zero, 0x1E /* F660 80034260 A06200AD */ sb $v0, 0xAD($v1) .L80034264: /* F664 80034264 8E030000 */ lw $v1, 0x0($s0) .L80034268: /* F668 80034268 906200AD */ lbu $v0, 0xAD($v1) /* F66C 8003426C 2442FFFF */ addiu $v0, $v0, -0x1 /* F670 80034270 0800D0D8 */ j .L80034360 /* F674 80034274 A06200AD */ sb $v0, 0xAD($v1) glabel .L80034278 /* F678 80034278 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* F67C 8003427C 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* F680 80034280 808200AD */ lb $v0, 0xAD($a0) /* F684 80034284 908300AD */ lbu $v1, 0xAD($a0) /* F688 80034288 14400010 */ bnez $v0, .L800342CC /* F68C 8003428C 2462FFFF */ addiu $v0, $v1, -0x1 /* F690 80034290 908200AC */ lbu $v0, 0xAC($a0) /* F694 80034294 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F698 80034298 44816000 */ mtc1 $at, $f12 /* F69C 8003429C 24420001 */ addiu $v0, $v0, 0x1 /* F6A0 800342A0 0C00AFB7 */ jal set_curtain_scale_goal /* F6A4 800342A4 A08200AC */ sb $v0, 0xAC($a0) /* F6A8 800342A8 0C00AFC1 */ jal set_curtain_draw_callback /* F6AC 800342AC 0000202D */ daddu $a0, $zero, $zero /* F6B0 800342B0 3C013E99 */ lui $at, (0x3E99999A >> 16) /* F6B4 800342B4 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF) /* F6B8 800342B8 44816000 */ mtc1 $at, $f12 /* F6BC 800342BC 0C00AFC5 */ jal set_curtain_fade_goal /* F6C0 800342C0 00000000 */ nop /* F6C4 800342C4 0800D0D8 */ j .L80034360 /* F6C8 800342C8 00000000 */ nop .L800342CC: /* F6CC 800342CC 0800D0D8 */ j .L80034360 /* F6D0 800342D0 A08200AD */ sb $v0, 0xAD($a0) glabel .L800342D4 /* F6D4 800342D4 0C00CE0C */ jal intro_logos_fade_out /* F6D8 800342D8 2404000A */ addiu $a0, $zero, 0xA /* F6DC 800342DC 10400020 */ beqz $v0, .L80034360 /* F6E0 800342E0 2402000F */ addiu $v0, $zero, 0xF /* F6E4 800342E4 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* F6E8 800342E8 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) /* F6EC 800342EC 8C830000 */ lw $v1, 0x0($a0) /* F6F0 800342F0 A06200AD */ sb $v0, 0xAD($v1) /* F6F4 800342F4 0800D0C5 */ j .L80034314 /* F6F8 800342F8 8C830000 */ lw $v1, 0x0($a0) glabel .L800342FC /* F6FC 800342FC 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* F700 80034300 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* F704 80034304 806200AD */ lb $v0, 0xAD($v1) /* F708 80034308 906400AD */ lbu $a0, 0xAD($v1) /* F70C 8003430C 14400005 */ bnez $v0, .L80034324 /* F710 80034310 2482FFFF */ addiu $v0, $a0, -0x1 .L80034314: /* F714 80034314 906200AC */ lbu $v0, 0xAC($v1) /* F718 80034318 24420001 */ addiu $v0, $v0, 0x1 /* F71C 8003431C 0800D0D8 */ j .L80034360 /* F720 80034320 A06200AC */ sb $v0, 0xAC($v1) .L80034324: /* F724 80034324 0800D0D8 */ j .L80034360 /* F728 80034328 A06200AD */ sb $v0, 0xAD($v1) glabel .L8003432C /* F72C 8003432C 3C10800A */ lui $s0, %hi(gLogosImages) /* F730 80034330 26100910 */ addiu $s0, $s0, %lo(gLogosImages) /* F734 80034334 0C00AB4B */ jal heap_free /* F738 80034338 8E040000 */ lw $a0, 0x0($s0) /* F73C 8003433C 240400FF */ addiu $a0, $zero, 0xFF /* F740 80034340 0C00CDF4 */ jal intro_logos_set_fade_alpha /* F744 80034344 AE000000 */ sw $zero, 0x0($s0) /* F748 80034348 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* F74C 8003434C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* F750 80034350 24040010 */ addiu $a0, $zero, 0x10 /* F754 80034354 A04000A8 */ sb $zero, 0xA8($v0) .L80034358: /* F758 80034358 0C00CD3C */ jal set_game_mode /* F75C 8003435C 00000000 */ nop .L80034360: /* F760 80034360 0C00E64C */ jal update_npcs /* F764 80034364 00000000 */ nop /* F768 80034368 0C00B500 */ jal update_cameras /* F76C 8003436C 00000000 */ nop /* F770 80034370 0C00CE1D */ jal intro_logos_update_fade /* F774 80034374 00000000 */ nop /* F778 80034378 8FBF0014 */ lw $ra, 0x14($sp) /* F77C 8003437C 8FB00010 */ lw $s0, 0x10($sp) /* F780 80034380 03E00008 */ jr $ra /* F784 80034384 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void state_step_logos(void) { #if VERSION_JP int pressedButtons = gGameStatusPtr->pressedButtons[0]; #endif if (gGameStatusPtr->bSkipIntro) { if (intro_logos_fade_out(10)) { set_curtain_scale(1.0f); set_curtain_fade(0.0f); set_game_mode(GAME_MODE_TITLE_SCREEN); } } else { #if VERSION_JP if ((gGameStatusPtr->introState == INTRO_STATE_1 || gGameStatusPtr->introState == INTRO_STATE_2 || gGameStatusPtr->introState == INTRO_STATE_3 || gGameStatusPtr->introState == INTRO_STATE_4 || gGameStatusPtr->introState == INTRO_STATE_5 || gGameStatusPtr->introState == INTRO_STATE_6 || gGameStatusPtr->introState == INTRO_STATE_7 || gGameStatusPtr->introState == INTRO_STATE_8 || gGameStatusPtr->introState == INTRO_STATE_9 || gGameStatusPtr->introState == INTRO_STATE_A) && (pressedButtons & (BUTTON_START | BUTTON_Z | BUTTON_A))) { intro_logos_set_fade_color(208); gGameStatusPtr->bSkipIntro = 1; } #endif switch (gGameStatusPtr->introState) { case INTRO_STATE_0: if (intro_logos_fade_in(10)) { gGameStatusPtr->introState++; gGameStatusPtr->introCounter = 30; } break; case INTRO_STATE_1: if (gGameStatusPtr->introCounter == 0) { intro_logos_set_fade_color(208); gGameStatusPtr->introState++; } gGameStatusPtr->introCounter--; break; case INTRO_STATE_2: if (intro_logos_fade_out(10)) { gGameStatusPtr->introState++; #if VERSION_JP gGameStatusPtr->introState += 2; #endif } break; case INTRO_STATE_3: if (intro_logos_fade_in(10)) { gGameStatusPtr->introState++; #if VERSION_JP gGameStatusPtr->introCounter = 30; #else gGameStatusPtr->introCounter = 40; #endif } break; case INTRO_STATE_4: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; #if VERSION_JP intro_logos_set_fade_color(0); #else intro_logos_set_fade_color(208); #endif } gGameStatusPtr->introCounter--; break; case INTRO_STATE_5: if (intro_logos_fade_out(10)) { gGameStatusPtr->introState++; } break; case INTRO_STATE_6: if (intro_logos_fade_in(10)) { gGameStatusPtr->introState++; gGameStatusPtr->introCounter = 30; } break; case INTRO_STATE_7: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; intro_logos_set_fade_color(208); gGameStatusPtr->introCounter = 30; } gGameStatusPtr->introCounter--; break; case INTRO_STATE_8: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; set_curtain_scale_goal(1.0f); set_curtain_draw_callback(NULL); set_curtain_fade_goal(0.3f); } else { gGameStatusPtr->introCounter--; } break; case INTRO_STATE_9: if (intro_logos_fade_out(10)) { gGameStatusPtr->introCounter = 15; gGameStatusPtr->introState++; } break; case INTRO_STATE_A: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; } else { gGameStatusPtr->introCounter--; } break; case INTRO_STATE_B: heap_free(gLogosImages); gLogosImages = NULL; intro_logos_set_fade_alpha(255); gGameStatusPtr->creditsViewportMode = 0; set_game_mode(GAME_MODE_INTRO); break; } } update_npcs(); update_cameras(); intro_logos_update_fade(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel CancelablePlayerRunToGoal /* 1A27DC 80273EFC 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 1A27E0 80273F00 AFB30024 */ sw $s3, 0x24($sp) /* 1A27E4 80273F04 0080982D */ daddu $s3, $a0, $zero /* 1A27E8 80273F08 AFB40028 */ sw $s4, 0x28($sp) /* 1A27EC 80273F0C 3C14800E */ lui $s4, %hi(gBattleStatus) /* 1A27F0 80273F10 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) /* 1A27F4 80273F14 AFBF002C */ sw $ra, 0x2C($sp) /* 1A27F8 80273F18 AFB20020 */ sw $s2, 0x20($sp) /* 1A27FC 80273F1C AFB1001C */ sw $s1, 0x1C($sp) /* 1A2800 80273F20 AFB00018 */ sw $s0, 0x18($sp) /* 1A2804 80273F24 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 1A2808 80273F28 F7B80040 */ sdc1 $f24, 0x40($sp) /* 1A280C 80273F2C F7B60038 */ sdc1 $f22, 0x38($sp) /* 1A2810 80273F30 F7B40030 */ sdc1 $f20, 0x30($sp) /* 1A2814 80273F34 8E9000D8 */ lw $s0, 0xD8($s4) /* 1A2818 80273F38 8E71000C */ lw $s1, 0xC($s3) /* 1A281C 80273F3C 10A00002 */ beqz $a1, .L80273F48 /* 1A2820 80273F40 2612000C */ addiu $s2, $s0, 0xC /* 1A2824 80273F44 AE600070 */ sw $zero, 0x70($s3) .L80273F48: /* 1A2828 80273F48 8E620070 */ lw $v0, 0x70($s3) /* 1A282C 80273F4C 14400046 */ bnez $v0, .L80274068 /* 1A2830 80273F50 00000000 */ nop /* 1A2834 80273F54 8E250000 */ lw $a1, 0x0($s1) /* 1A2838 80273F58 26310004 */ addiu $s1, $s1, 0x4 /* 1A283C 80273F5C 0C0B1EAF */ jal evt_get_variable /* 1A2840 80273F60 0260202D */ daddu $a0, $s3, $zero /* 1A2844 80273F64 A6020070 */ sh $v0, 0x70($s0) /* 1A2848 80273F68 8E220000 */ lw $v0, 0x0($s1) /* 1A284C 80273F6C AE620074 */ sw $v0, 0x74($s3) /* 1A2850 80273F70 C6180018 */ lwc1 $f24, 0x18($s0) /* 1A2854 80273F74 C61A0020 */ lwc1 $f26, 0x20($s0) /* 1A2858 80273F78 C6000144 */ lwc1 $f0, 0x144($s0) /* 1A285C 80273F7C C614014C */ lwc1 $f20, 0x14C($s0) /* 1A2860 80273F80 4406C000 */ mfc1 $a2, $f24 /* 1A2864 80273F84 4407D000 */ mfc1 $a3, $f26 /* 1A2868 80273F88 E600000C */ swc1 $f0, 0xC($s0) /* 1A286C 80273F8C C6000148 */ lwc1 $f0, 0x148($s0) /* 1A2870 80273F90 C616000C */ lwc1 $f22, 0xC($s0) /* 1A2874 80273F94 4600A386 */ mov.s $f14, $f20 /* 1A2878 80273F98 E6140014 */ swc1 $f20, 0x14($s0) /* 1A287C 80273F9C 4600B306 */ mov.s $f12, $f22 /* 1A2880 80273FA0 0C00A720 */ jal atan2 /* 1A2884 80273FA4 E6000010 */ swc1 $f0, 0x10($s0) /* 1A2888 80273FA8 4600B306 */ mov.s $f12, $f22 /* 1A288C 80273FAC 4406C000 */ mfc1 $a2, $f24 /* 1A2890 80273FB0 4407D000 */ mfc1 $a3, $f26 /* 1A2894 80273FB4 4600A386 */ mov.s $f14, $f20 /* 1A2898 80273FB8 0C00A7B5 */ jal dist2D /* 1A289C 80273FBC E6000054 */ swc1 $f0, 0x54($s0) /* 1A28A0 80273FC0 86020070 */ lh $v0, 0x70($s0) /* 1A28A4 80273FC4 46000086 */ mov.s $f2, $f0 /* 1A28A8 80273FC8 14400015 */ bnez $v0, .L80274020 /* 1A28AC 80273FCC E6020058 */ swc1 $f2, 0x58($s0) /* 1A28B0 80273FD0 C600004C */ lwc1 $f0, 0x4C($s0) /* 1A28B4 80273FD4 46001003 */ div.s $f0, $f2, $f0 /* 1A28B8 80273FD8 4600020D */ trunc.w.s $f8, $f0 /* 1A28BC 80273FDC 44034000 */ mfc1 $v1, $f8 /* 1A28C0 80273FE0 00000000 */ nop /* 1A28C4 80273FE4 00031400 */ sll $v0, $v1, 16 /* 1A28C8 80273FE8 00021403 */ sra $v0, $v0, 16 /* 1A28CC 80273FEC C602004C */ lwc1 $f2, 0x4C($s0) /* 1A28D0 80273FF0 44823000 */ mtc1 $v0, $f6 /* 1A28D4 80273FF4 00000000 */ nop /* 1A28D8 80273FF8 468031A0 */ cvt.s.w $f6, $f6 /* 1A28DC 80273FFC 46023102 */ mul.s $f4, $f6, $f2 /* 1A28E0 80274000 00000000 */ nop /* 1A28E4 80274004 C6000058 */ lwc1 $f0, 0x58($s0) /* 1A28E8 80274008 46040001 */ sub.s $f0, $f0, $f4 /* 1A28EC 8027400C 46060003 */ div.s $f0, $f0, $f6 /* 1A28F0 80274010 46001080 */ add.s $f2, $f2, $f0 /* 1A28F4 80274014 A6030070 */ sh $v1, 0x70($s0) /* 1A28F8 80274018 0809D00D */ j .L80274034 /* 1A28FC 8027401C E602004C */ swc1 $f2, 0x4C($s0) .L80274020: /* 1A2900 80274020 44820000 */ mtc1 $v0, $f0 /* 1A2904 80274024 00000000 */ nop /* 1A2908 80274028 46800020 */ cvt.s.w $f0, $f0 /* 1A290C 8027402C 46001003 */ div.s $f0, $f2, $f0 /* 1A2910 80274030 E600004C */ swc1 $f0, 0x4C($s0) .L80274034: /* 1A2914 80274034 860201B4 */ lh $v0, 0x1B4($s0) /* 1A2918 80274038 86430064 */ lh $v1, 0x64($s2) /* 1A291C 8027403C 24420001 */ addiu $v0, $v0, 0x1 /* 1A2920 80274040 44820000 */ mtc1 $v0, $f0 /* 1A2924 80274044 00000000 */ nop /* 1A2928 80274048 46800020 */ cvt.s.w $f0, $f0 /* 1A292C 8027404C E640004C */ swc1 $f0, 0x4C($s2) /* 1A2930 80274050 1060006C */ beqz $v1, .L80274204 /* 1A2934 80274054 24020002 */ addiu $v0, $zero, 0x2 /* 1A2938 80274058 24020001 */ addiu $v0, $zero, 0x1 /* 1A293C 8027405C AE600078 */ sw $zero, 0x78($s3) /* 1A2940 80274060 AE60007C */ sw $zero, 0x7C($s3) /* 1A2944 80274064 AE620070 */ sw $v0, 0x70($s3) .L80274068: /* 1A2948 80274068 8E450040 */ lw $a1, 0x40($s2) /* 1A294C 8027406C 8E460048 */ lw $a2, 0x48($s2) /* 1A2950 80274070 0C09904A */ jal add_xz_vec3f /* 1A2954 80274074 0240202D */ daddu $a0, $s2, $zero /* 1A2958 80274078 C6400000 */ lwc1 $f0, 0x0($s2) /* 1A295C 8027407C E6000144 */ swc1 $f0, 0x144($s0) /* 1A2960 80274080 C6400004 */ lwc1 $f0, 0x4($s2) /* 1A2964 80274084 E6000148 */ swc1 $f0, 0x148($s0) /* 1A2968 80274088 C6400008 */ lwc1 $f0, 0x8($s2) /* 1A296C 8027408C E600014C */ swc1 $f0, 0x14C($s0) /* 1A2970 80274090 C6420040 */ lwc1 $f2, 0x40($s2) /* 1A2974 80274094 3C014080 */ lui $at, (0x40800000 >> 16) /* 1A2978 80274098 44810000 */ mtc1 $at, $f0 /* 1A297C 8027409C 00000000 */ nop /* 1A2980 802740A0 4600103C */ c.lt.s $f2, $f0 /* 1A2984 802740A4 00000000 */ nop /* 1A2988 802740A8 45000007 */ bc1f .L802740C8 /* 1A298C 802740AC 0000202D */ daddu $a0, $zero, $zero /* 1A2990 802740B0 C600018C */ lwc1 $f0, 0x18C($s0) /* 1A2994 802740B4 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A2998 802740B8 8E050144 */ lw $a1, 0x144($s0) /* 1A299C 802740BC 8E060148 */ lw $a2, 0x148($s0) /* 1A29A0 802740C0 0809D038 */ j .L802740E0 /* 1A29A4 802740C4 8E07014C */ lw $a3, 0x14C($s0) .L802740C8: /* 1A29A8 802740C8 C600018C */ lwc1 $f0, 0x18C($s0) /* 1A29AC 802740CC E7A00010 */ swc1 $f0, 0x10($sp) /* 1A29B0 802740D0 8E050144 */ lw $a1, 0x144($s0) /* 1A29B4 802740D4 8E060148 */ lw $a2, 0x148($s0) /* 1A29B8 802740D8 8E07014C */ lw $a3, 0x14C($s0) /* 1A29BC 802740DC 24040001 */ addiu $a0, $zero, 0x1 .L802740E0: /* 1A29C0 802740E0 0C0990BC */ jal play_movement_dust_effects /* 1A29C4 802740E4 00000000 */ nop /* 1A29C8 802740E8 C642004C */ lwc1 $f2, 0x4C($s2) /* 1A29CC 802740EC C6400040 */ lwc1 $f0, 0x40($s2) /* 1A29D0 802740F0 46001080 */ add.s $f2, $f2, $f0 /* 1A29D4 802740F4 E642004C */ swc1 $f2, 0x4C($s2) /* 1A29D8 802740F8 860201B4 */ lh $v0, 0x1B4($s0) /* 1A29DC 802740FC 44820000 */ mtc1 $v0, $f0 /* 1A29E0 80274100 00000000 */ nop /* 1A29E4 80274104 46800020 */ cvt.s.w $f0, $f0 /* 1A29E8 80274108 4602003C */ c.lt.s $f0, $f2 /* 1A29EC 8027410C 00000000 */ nop /* 1A29F0 80274110 45000013 */ bc1f .L80274160 /* 1A29F4 80274114 00000000 */ nop /* 1A29F8 80274118 92020135 */ lbu $v0, 0x135($s0) /* 1A29FC 8027411C 24420001 */ addiu $v0, $v0, 0x1 /* 1A2A00 80274120 A2020135 */ sb $v0, 0x135($s0) /* 1A2A04 80274124 AE40004C */ sw $zero, 0x4C($s2) /* 1A2A08 80274128 92020135 */ lbu $v0, 0x135($s0) /* 1A2A0C 8027412C 30420001 */ andi $v0, $v0, 0x1 /* 1A2A10 80274130 10400004 */ beqz $v0, .L80274144 /* 1A2A14 80274134 24040141 */ addiu $a0, $zero, 0x141 /* 1A2A18 80274138 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A2A1C 8027413C 0809D054 */ j .L80274150 /* 1A2A20 80274140 E7A00010 */ swc1 $f0, 0x10($sp) .L80274144: /* 1A2A24 80274144 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A2A28 80274148 24040142 */ addiu $a0, $zero, 0x142 /* 1A2A2C 8027414C E7A00010 */ swc1 $f0, 0x10($sp) .L80274150: /* 1A2A30 80274150 8E060144 */ lw $a2, 0x144($s0) /* 1A2A34 80274154 8E070148 */ lw $a3, 0x148($s0) /* 1A2A38 80274158 0C052757 */ jal sfx_play_sound_at_position /* 1A2A3C 8027415C 0000282D */ daddu $a1, $zero, $zero .L80274160: /* 1A2A40 80274160 8E62007C */ lw $v0, 0x7C($s3) /* 1A2A44 80274164 2842000D */ slti $v0, $v0, 0xD /* 1A2A48 80274168 14400013 */ bnez $v0, .L802741B8 /* 1A2A4C 8027416C 00000000 */ nop /* 1A2A50 80274170 8E620078 */ lw $v0, 0x78($s3) /* 1A2A54 80274174 14400009 */ bnez $v0, .L8027419C /* 1A2A58 80274178 00000000 */ nop /* 1A2A5C 8027417C 8E820210 */ lw $v0, 0x210($s4) /* 1A2A60 80274180 30428000 */ andi $v0, $v0, 0x8000 /* 1A2A64 80274184 14400002 */ bnez $v0, .L80274190 /* 1A2A68 80274188 24020001 */ addiu $v0, $zero, 0x1 /* 1A2A6C 8027418C AE620078 */ sw $v0, 0x78($s3) .L80274190: /* 1A2A70 80274190 8E620078 */ lw $v0, 0x78($s3) /* 1A2A74 80274194 10400008 */ beqz $v0, .L802741B8 /* 1A2A78 80274198 00000000 */ nop .L8027419C: /* 1A2A7C 8027419C 8E820214 */ lw $v0, 0x214($s4) /* 1A2A80 802741A0 30428000 */ andi $v0, $v0, 0x8000 /* 1A2A84 802741A4 10400004 */ beqz $v0, .L802741B8 /* 1A2A88 802741A8 0260202D */ daddu $a0, $s3, $zero /* 1A2A8C 802741AC 8C850074 */ lw $a1, 0x74($a0) /* 1A2A90 802741B0 0809D07E */ j .L802741F8 /* 1A2A94 802741B4 24060001 */ addiu $a2, $zero, 0x1 .L802741B8: /* 1A2A98 802741B8 8E62007C */ lw $v0, 0x7C($s3) /* 1A2A9C 802741BC 24420001 */ addiu $v0, $v0, 0x1 /* 1A2AA0 802741C0 AE62007C */ sw $v0, 0x7C($s3) /* 1A2AA4 802741C4 96420064 */ lhu $v0, 0x64($s2) /* 1A2AA8 802741C8 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A2AAC 802741CC A6420064 */ sh $v0, 0x64($s2) /* 1A2AB0 802741D0 00021400 */ sll $v0, $v0, 16 /* 1A2AB4 802741D4 1C40000B */ bgtz $v0, .L80274204 /* 1A2AB8 802741D8 0000102D */ daddu $v0, $zero, $zero /* 1A2ABC 802741DC C640000C */ lwc1 $f0, 0xC($s2) /* 1A2AC0 802741E0 E6000144 */ swc1 $f0, 0x144($s0) /* 1A2AC4 802741E4 C6400014 */ lwc1 $f0, 0x14($s2) /* 1A2AC8 802741E8 0260202D */ daddu $a0, $s3, $zero /* 1A2ACC 802741EC E600014C */ swc1 $f0, 0x14C($s0) /* 1A2AD0 802741F0 8C850074 */ lw $a1, 0x74($a0) /* 1A2AD4 802741F4 0000302D */ daddu $a2, $zero, $zero .L802741F8: /* 1A2AD8 802741F8 0C0B2026 */ jal evt_set_variable /* 1A2ADC 802741FC 00000000 */ nop /* 1A2AE0 80274200 24020002 */ addiu $v0, $zero, 0x2 .L80274204: /* 1A2AE4 80274204 8FBF002C */ lw $ra, 0x2C($sp) /* 1A2AE8 80274208 8FB40028 */ lw $s4, 0x28($sp) /* 1A2AEC 8027420C 8FB30024 */ lw $s3, 0x24($sp) /* 1A2AF0 80274210 8FB20020 */ lw $s2, 0x20($sp) /* 1A2AF4 80274214 8FB1001C */ lw $s1, 0x1C($sp) /* 1A2AF8 80274218 8FB00018 */ lw $s0, 0x18($sp) /* 1A2AFC 8027421C D7BA0048 */ ldc1 $f26, 0x48($sp) /* 1A2B00 80274220 D7B80040 */ ldc1 $f24, 0x40($sp) /* 1A2B04 80274224 D7B60038 */ ldc1 $f22, 0x38($sp) /* 1A2B08 80274228 D7B40030 */ ldc1 $f20, 0x30($sp) /* 1A2B0C 8027422C 03E00008 */ jr $ra /* 1A2B10 80274230 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; Actor* player = battleStatus->playerActor; ActorState* playerState = &player->state; f32 currentX, currentZ, goalX, goalZ; if (isInitialCall) { script->functionTemp[0] = FALSE; } if (!script->functionTemp[0]) { player->state.moveTime = evt_get_variable(script, *args++); script->functionTemp[1] = *args++; player->state.currentPos.x = player->currentPos.x; player->state.currentPos.y = player->currentPos.y; player->state.currentPos.z = player->currentPos.z; goalX = player->state.goalPos.x; goalZ = player->state.goalPos.z; currentX = player->state.currentPos.x; currentZ = player->state.currentPos.z; player->state.angle = atan2(currentX, currentZ, goalX, goalZ); player->state.distance = dist2D(currentX, currentZ, goalX, goalZ); if (player->state.moveTime == 0) { player->state.moveTime = player->state.distance / player->state.speed; player->state.speed += (player->state.distance - (player->state.moveTime * player->state.speed)) / player->state.moveTime; } else { player->state.speed = player->state.distance / player->state.moveTime; } playerState->distance = player->actorTypeData1b[0] + 1; if (playerState->moveTime == 0) { return ApiStatus_DONE2; } script->functionTemp[2] = FALSE; script->functionTemp[3] = 0; script->functionTemp[0] = TRUE; } add_xz_vec3f(&playerState->currentPos, playerState->speed, playerState->angle); player->currentPos.x = playerState->currentPos.x; player->currentPos.y = playerState->currentPos.y; player->currentPos.z = playerState->currentPos.z; if (playerState->speed < 4.0f) { play_movement_dust_effects(0, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw); } else { play_movement_dust_effects(1, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw); } playerState->distance += playerState->speed; if (playerState->distance > player->actorTypeData1b[0]) { player->footStepCounter++; playerState->distance = 0.0f; if ((player->footStepCounter % 2) != 0) { sfx_play_sound_at_position(SOUND_STEP_NORMAL1, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); } else { sfx_play_sound_at_position(SOUND_STEP_NORMAL2, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); } } if (script->functionTemp[3] > 12) { if (!script->functionTemp[2]) { if (!(battleStatus->currentButtonsDown & BUTTON_A)) { script->functionTemp[2] = TRUE; } } if (script->functionTemp[2]) { if (battleStatus->currentButtonsPressed & BUTTON_A) { evt_set_variable(script, script->functionTemp[1], 1); return ApiStatus_DONE2; } } } script->functionTemp[3]++; playerState->moveTime--; if (playerState->moveTime > 0) { return ApiStatus_BLOCK; } player->currentPos.x = playerState->goalPos.x; player->currentPos.z = playerState->goalPos.z; evt_set_variable(script, script->functionTemp[1], 0); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025C918 /* 18B1F8 8025C918 27BDFF58 */ addiu $sp, $sp, -0xA8 /* 18B1FC 8025C91C AFB70084 */ sw $s7, 0x84($sp) /* 18B200 8025C920 00A0B82D */ daddu $s7, $a1, $zero /* 18B204 8025C924 AFBF008C */ sw $ra, 0x8C($sp) /* 18B208 8025C928 AFBE0088 */ sw $fp, 0x88($sp) /* 18B20C 8025C92C AFB60080 */ sw $s6, 0x80($sp) /* 18B210 8025C930 AFB5007C */ sw $s5, 0x7C($sp) /* 18B214 8025C934 AFB40078 */ sw $s4, 0x78($sp) /* 18B218 8025C938 AFB30074 */ sw $s3, 0x74($sp) /* 18B21C 8025C93C AFB20070 */ sw $s2, 0x70($sp) /* 18B220 8025C940 AFB1006C */ sw $s1, 0x6C($sp) /* 18B224 8025C944 AFB00068 */ sw $s0, 0x68($sp) /* 18B228 8025C948 F7B800A0 */ sdc1 $f24, 0xA0($sp) /* 18B22C 8025C94C F7B60098 */ sdc1 $f22, 0x98($sp) /* 18B230 8025C950 F7B40090 */ sdc1 $f20, 0x90($sp) /* 18B234 8025C954 AFA700B4 */ sw $a3, 0xB4($sp) /* 18B238 8025C958 8EF200C0 */ lw $s2, 0xC0($s7) /* 18B23C 8025C95C 82420751 */ lb $v0, 0x751($s2) /* 18B240 8025C960 1040001B */ beqz $v0, .L8025C9D0 /* 18B244 8025C964 0080F02D */ daddu $fp, $a0, $zero /* 18B248 8025C968 2402FFFE */ addiu $v0, $zero, -0x2 /* 18B24C 8025C96C A2420752 */ sb $v0, 0x752($s2) /* 18B250 8025C970 A640075A */ sh $zero, 0x75A($s2) /* 18B254 8025C974 A2400751 */ sb $zero, 0x751($s2) /* 18B258 8025C978 17C0000C */ bnez $fp, .L8025C9AC /* 18B25C 8025C97C A6400758 */ sh $zero, 0x758($s2) /* 18B260 8025C980 0000202D */ daddu $a0, $zero, $zero /* 18B264 8025C984 24050011 */ addiu $a1, $zero, 0x11 /* 18B268 8025C988 24060014 */ addiu $a2, $zero, 0x14 /* 18B26C 8025C98C 0080382D */ daddu $a3, $a0, $zero /* 18B270 8025C990 240200FF */ addiu $v0, $zero, 0xFF /* 18B274 8025C994 AFA00010 */ sw $zero, 0x10($sp) /* 18B278 8025C998 AFA20014 */ sw $v0, 0x14($sp) /* 18B27C 8025C99C 0C0B77FE */ jal set_player_imgfx_all /* 18B280 8025C9A0 AFA00018 */ sw $zero, 0x18($sp) /* 18B284 8025C9A4 08097274 */ j .L8025C9D0 /* 18B288 8025C9A8 00000000 */ nop .L8025C9AC: /* 18B28C 8025C9AC 24050011 */ addiu $a1, $zero, 0x11 /* 18B290 8025C9B0 24060014 */ addiu $a2, $zero, 0x14 /* 18B294 8025C9B4 240200FF */ addiu $v0, $zero, 0xFF /* 18B298 8025C9B8 AFA00010 */ sw $zero, 0x10($sp) /* 18B29C 8025C9BC AFA20014 */ sw $v0, 0x14($sp) /* 18B2A0 8025C9C0 AFA00018 */ sw $zero, 0x18($sp) /* 18B2A4 8025C9C4 8EE40084 */ lw $a0, 0x84($s7) /* 18B2A8 8025C9C8 0C0B7A25 */ jal set_npc_imgfx_all /* 18B2AC 8025C9CC 0000382D */ daddu $a3, $zero, $zero .L8025C9D0: /* 18B2B0 8025C9D0 9642075C */ lhu $v0, 0x75C($s2) /* 18B2B4 8025C9D4 24420007 */ addiu $v0, $v0, 0x7 /* 18B2B8 8025C9D8 00021C00 */ sll $v1, $v0, 16 /* 18B2BC 8025C9DC 00032403 */ sra $a0, $v1, 16 /* 18B2C0 8025C9E0 A642075C */ sh $v0, 0x75C($s2) /* 18B2C4 8025C9E4 28820168 */ slti $v0, $a0, 0x168 /* 18B2C8 8025C9E8 14400010 */ bnez $v0, .L8025CA2C /* 18B2CC 8025C9EC 0000802D */ daddu $s0, $zero, $zero /* 18B2D0 8025C9F0 3C02B60B */ lui $v0, (0xB60B60B7 >> 16) /* 18B2D4 8025C9F4 344260B7 */ ori $v0, $v0, (0xB60B60B7 & 0xFFFF) /* 18B2D8 8025C9F8 00820018 */ mult $a0, $v0 /* 18B2DC 8025C9FC 00031FC3 */ sra $v1, $v1, 31 /* 18B2E0 8025CA00 00004010 */ mfhi $t0 /* 18B2E4 8025CA04 01041021 */ addu $v0, $t0, $a0 /* 18B2E8 8025CA08 00021203 */ sra $v0, $v0, 8 /* 18B2EC 8025CA0C 00431023 */ subu $v0, $v0, $v1 /* 18B2F0 8025CA10 00021840 */ sll $v1, $v0, 1 /* 18B2F4 8025CA14 00621821 */ addu $v1, $v1, $v0 /* 18B2F8 8025CA18 00031100 */ sll $v0, $v1, 4 /* 18B2FC 8025CA1C 00431023 */ subu $v0, $v0, $v1 /* 18B300 8025CA20 000210C0 */ sll $v0, $v0, 3 /* 18B304 8025CA24 00821023 */ subu $v0, $a0, $v0 /* 18B308 8025CA28 A642075C */ sh $v0, 0x75C($s2) .L8025CA2C: /* 18B30C 8025CA2C 3C138000 */ lui $s3, (0x80000000 >> 16) /* 18B310 8025CA30 0200882D */ daddu $s1, $s0, $zero /* 18B314 8025CA34 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 18B318 8025CA38 4481C800 */ mtc1 $at, $f25 /* 18B31C 8025CA3C 4480C000 */ mtc1 $zero, $f24 /* 18B320 8025CA40 3C01405C */ lui $at, (0x405C0000 >> 16) /* 18B324 8025CA44 4481B800 */ mtc1 $at, $f23 /* 18B328 8025CA48 4480B000 */ mtc1 $zero, $f22 /* 18B32C 8025CA4C 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* 18B330 8025CA50 4481A800 */ mtc1 $at, $f21 /* 18B334 8025CA54 4480A000 */ mtc1 $zero, $f20 .L8025CA58: /* 18B338 8025CA58 9644075C */ lhu $a0, 0x75C($s2) /* 18B33C 8025CA5C 00912021 */ addu $a0, $a0, $s1 /* 18B340 8025CA60 00042400 */ sll $a0, $a0, 16 /* 18B344 8025CA64 0C00A4F5 */ jal cosine /* 18B348 8025CA68 00042403 */ sra $a0, $a0, 16 /* 18B34C 8025CA6C 46000021 */ cvt.d.s $f0, $f0 /* 18B350 8025CA70 46380000 */ add.d $f0, $f0, $f24 /* 18B354 8025CA74 46360002 */ mul.d $f0, $f0, $f22 /* 18B358 8025CA78 00000000 */ nop /* 18B35C 8025CA7C 27A20020 */ addiu $v0, $sp, 0x20 /* 18B360 8025CA80 4620A03E */ c.le.d $f20, $f0 /* 18B364 8025CA84 00000000 */ nop /* 18B368 8025CA88 45010005 */ bc1t .L8025CAA0 /* 18B36C 8025CA8C 00501021 */ addu $v0, $v0, $s0 /* 18B370 8025CA90 4620008D */ trunc.w.d $f2, $f0 /* 18B374 8025CA94 44031000 */ mfc1 $v1, $f2 /* 18B378 8025CA98 080972AE */ j .L8025CAB8 /* 18B37C 8025CA9C A0430000 */ sb $v1, 0x0($v0) .L8025CAA0: /* 18B380 8025CAA0 46340001 */ sub.d $f0, $f0, $f20 /* 18B384 8025CAA4 4620008D */ trunc.w.d $f2, $f0 /* 18B388 8025CAA8 44031000 */ mfc1 $v1, $f2 /* 18B38C 8025CAAC 00000000 */ nop /* 18B390 8025CAB0 00731825 */ or $v1, $v1, $s3 /* 18B394 8025CAB4 A0430000 */ sb $v1, 0x0($v0) .L8025CAB8: /* 18B398 8025CAB8 9644075C */ lhu $a0, 0x75C($s2) /* 18B39C 8025CABC 00912021 */ addu $a0, $a0, $s1 /* 18B3A0 8025CAC0 2484002D */ addiu $a0, $a0, 0x2D /* 18B3A4 8025CAC4 00042400 */ sll $a0, $a0, 16 /* 18B3A8 8025CAC8 0C00A4F5 */ jal cosine /* 18B3AC 8025CACC 00042403 */ sra $a0, $a0, 16 /* 18B3B0 8025CAD0 46000021 */ cvt.d.s $f0, $f0 /* 18B3B4 8025CAD4 46380000 */ add.d $f0, $f0, $f24 /* 18B3B8 8025CAD8 46360002 */ mul.d $f0, $f0, $f22 /* 18B3BC 8025CADC 00000000 */ nop /* 18B3C0 8025CAE0 27A20038 */ addiu $v0, $sp, 0x38 /* 18B3C4 8025CAE4 4620A03E */ c.le.d $f20, $f0 /* 18B3C8 8025CAE8 00000000 */ nop /* 18B3CC 8025CAEC 45010005 */ bc1t .L8025CB04 /* 18B3D0 8025CAF0 00501021 */ addu $v0, $v0, $s0 /* 18B3D4 8025CAF4 4620008D */ trunc.w.d $f2, $f0 /* 18B3D8 8025CAF8 44031000 */ mfc1 $v1, $f2 /* 18B3DC 8025CAFC 080972C7 */ j .L8025CB1C /* 18B3E0 8025CB00 A0430000 */ sb $v1, 0x0($v0) .L8025CB04: /* 18B3E4 8025CB04 46340001 */ sub.d $f0, $f0, $f20 /* 18B3E8 8025CB08 4620008D */ trunc.w.d $f2, $f0 /* 18B3EC 8025CB0C 44031000 */ mfc1 $v1, $f2 /* 18B3F0 8025CB10 00000000 */ nop /* 18B3F4 8025CB14 00731825 */ or $v1, $v1, $s3 /* 18B3F8 8025CB18 A0430000 */ sb $v1, 0x0($v0) .L8025CB1C: /* 18B3FC 8025CB1C 9644075C */ lhu $a0, 0x75C($s2) /* 18B400 8025CB20 00912021 */ addu $a0, $a0, $s1 /* 18B404 8025CB24 2484005A */ addiu $a0, $a0, 0x5A D_8025CB28: /* 18B408 8025CB28 00042400 */ sll $a0, $a0, 16 /* 18B40C 8025CB2C 0C00A4F5 */ jal cosine /* 18B410 8025CB30 00042403 */ sra $a0, $a0, 16 /* 18B414 8025CB34 46000021 */ cvt.d.s $f0, $f0 /* 18B418 8025CB38 46380000 */ add.d $f0, $f0, $f24 /* 18B41C 8025CB3C 46360002 */ mul.d $f0, $f0, $f22 /* 18B420 8025CB40 00000000 */ nop /* 18B424 8025CB44 27A20050 */ addiu $v0, $sp, 0x50 /* 18B428 8025CB48 4620A03E */ c.le.d $f20, $f0 /* 18B42C 8025CB4C 00000000 */ nop /* 18B430 8025CB50 45010005 */ bc1t .L8025CB68 /* 18B434 8025CB54 00501021 */ addu $v0, $v0, $s0 /* 18B438 8025CB58 4620008D */ trunc.w.d $f2, $f0 /* 18B43C 8025CB5C 44031000 */ mfc1 $v1, $f2 /* 18B440 8025CB60 080972E0 */ j .L8025CB80 /* 18B444 8025CB64 A0430000 */ sb $v1, 0x0($v0) .L8025CB68: /* 18B448 8025CB68 46340001 */ sub.d $f0, $f0, $f20 /* 18B44C 8025CB6C 4620008D */ trunc.w.d $f2, $f0 /* 18B450 8025CB70 44031000 */ mfc1 $v1, $f2 /* 18B454 8025CB74 00000000 */ nop /* 18B458 8025CB78 00731825 */ or $v1, $v1, $s3 D_8025CB7C: /* 18B45C 8025CB7C A0430000 */ sb $v1, 0x0($v0) .L8025CB80: /* 18B460 8025CB80 26100001 */ addiu $s0, $s0, 0x1 /* 18B464 8025CB84 2A020014 */ slti $v0, $s0, 0x14 /* 18B468 8025CB88 1440FFB3 */ bnez $v0, .L8025CA58 /* 18B46C 8025CB8C 26310019 */ addiu $s1, $s1, 0x19 /* 18B470 8025CB90 86E30098 */ lh $v1, 0x98($s7) /* 18B474 8025CB94 241100FF */ addiu $s1, $zero, 0xFF /* 18B478 8025CB98 0071102A */ slt $v0, $v1, $s1 /* 18B47C 8025CB9C 54400001 */ bnel $v0, $zero, .L8025CBA4 /* 18B480 8025CBA0 0060882D */ daddu $s1, $v1, $zero .L8025CBA4: /* 18B484 8025CBA4 8EE20000 */ lw $v0, 0x0($s7) /* 18B488 8025CBA8 30420100 */ andi $v0, $v0, 0x100 /* 18B48C 8025CBAC 1040000B */ beqz $v0, .L8025CBDC /* 18B490 8025CBB0 3C038080 */ lui $v1, (0x80808081 >> 16) /* 18B494 8025CBB4 34638081 */ ori $v1, $v1, (0x80808081 & 0xFFFF) /* 18B498 8025CBB8 00111100 */ sll $v0, $s1, 4 /* 18B49C 8025CBBC 00511023 */ subu $v0, $v0, $s1 /* 18B4A0 8025CBC0 000210C0 */ sll $v0, $v0, 3 /* 18B4A4 8025CBC4 00430018 */ mult $v0, $v1 /* 18B4A8 8025CBC8 00004010 */ mfhi $t0 /* 18B4AC 8025CBCC 01021821 */ addu $v1, $t0, $v0 /* 18B4B0 8025CBD0 000319C3 */ sra $v1, $v1, 7 /* 18B4B4 8025CBD4 000217C3 */ sra $v0, $v0, 31 /* 18B4B8 8025CBD8 00628823 */ subu $s1, $v1, $v0 .L8025CBDC: /* 18B4BC 8025CBDC 0000802D */ daddu $s0, $zero, $zero /* 18B4C0 8025CBE0 27B60020 */ addiu $s6, $sp, 0x20 /* 18B4C4 8025CBE4 27B50038 */ addiu $s5, $sp, 0x38 /* 18B4C8 8025CBE8 27B40050 */ addiu $s4, $sp, 0x50 /* 18B4CC 8025CBEC 241300FF */ addiu $s3, $zero, 0xFF D_8025CBF0: /* 18B4D0 8025CBF0 02D01021 */ addu $v0, $s6, $s0 .L8025CBF4: /* 18B4D4 8025CBF4 02B02021 */ addu $a0, $s5, $s0 /* 18B4D8 8025CBF8 90430000 */ lbu $v1, 0x0($v0) /* 18B4DC 8025CBFC 02901021 */ addu $v0, $s4, $s0 /* 18B4E0 8025CC00 90840000 */ lbu $a0, 0x0($a0) /* 18B4E4 8025CC04 90420000 */ lbu $v0, 0x0($v0) /* 18B4E8 8025CC08 00031E00 */ sll $v1, $v1, 24 /* 18B4EC 8025CC0C 00042400 */ sll $a0, $a0, 16 /* 18B4F0 8025CC10 00641825 */ or $v1, $v1, $a0 /* 18B4F4 8025CC14 00021200 */ sll $v0, $v0, 8 /* 18B4F8 8025CC18 00621825 */ or $v1, $v1, $v0 /* 18B4FC 8025CC1C 17C0000A */ bnez $fp, .L8025CC48 /* 18B500 8025CC20 00713825 */ or $a3, $v1, $s1 /* 18B504 8025CC24 0000202D */ daddu $a0, $zero, $zero /* 18B508 8025CC28 2405000C */ addiu $a1, $zero, 0xC /* 18B50C 8025CC2C 0200302D */ daddu $a2, $s0, $zero /* 18B510 8025CC30 AFA00010 */ sw $zero, 0x10($sp) /* 18B514 8025CC34 AFB30014 */ sw $s3, 0x14($sp) /* 18B518 8025CC38 0C0B77FE */ jal set_player_imgfx_all /* 18B51C 8025CC3C AFA00018 */ sw $zero, 0x18($sp) /* 18B520 8025CC40 0809731A */ j .L8025CC68 /* 18B524 8025CC44 26100001 */ addiu $s0, $s0, 0x1 .L8025CC48: /* 18B528 8025CC48 2405000C */ addiu $a1, $zero, 0xC /* 18B52C 8025CC4C AFA00010 */ sw $zero, 0x10($sp) /* 18B530 8025CC50 AFB30014 */ sw $s3, 0x14($sp) /* 18B534 8025CC54 AFA00018 */ sw $zero, 0x18($sp) /* 18B538 8025CC58 8EE40084 */ lw $a0, 0x84($s7) /* 18B53C 8025CC5C 0C0B7A25 */ jal set_npc_imgfx_all /* 18B540 8025CC60 0200302D */ daddu $a2, $s0, $zero /* 18B544 8025CC64 26100001 */ addiu $s0, $s0, 0x1 .L8025CC68: /* 18B548 8025CC68 2A020014 */ slti $v0, $s0, 0x14 /* 18B54C 8025CC6C 1440FFE1 */ bnez $v0, .L8025CBF4 /* 18B550 8025CC70 02D01021 */ addu $v0, $s6, $s0 /* 18B554 8025CC74 8FA800B4 */ lw $t0, 0xB4($sp) /* 18B558 8025CC78 15000004 */ bnez $t0, .L8025CC8C /* 18B55C 8025CC7C 00000000 */ nop D_8025CC80: /* 18B560 8025CC80 9642075A */ lhu $v0, 0x75A($s2) /* 18B564 8025CC84 2442FFFF */ addiu $v0, $v0, -0x1 /* 18B568 8025CC88 A642075A */ sh $v0, 0x75A($s2) .L8025CC8C: /* 18B56C 8025CC8C 8FBF008C */ lw $ra, 0x8C($sp) /* 18B570 8025CC90 8FBE0088 */ lw $fp, 0x88($sp) /* 18B574 8025CC94 8FB70084 */ lw $s7, 0x84($sp) D_8025CC98: /* 18B578 8025CC98 8FB60080 */ lw $s6, 0x80($sp) /* 18B57C 8025CC9C 8FB5007C */ lw $s5, 0x7C($sp) /* 18B580 8025CCA0 8FB40078 */ lw $s4, 0x78($sp) /* 18B584 8025CCA4 8FB30074 */ lw $s3, 0x74($sp) D_8025CCA8: /* 18B588 8025CCA8 8FB20070 */ lw $s2, 0x70($sp) /* 18B58C 8025CCAC 8FB1006C */ lw $s1, 0x6C($sp) /* 18B590 8025CCB0 8FB00068 */ lw $s0, 0x68($sp) /* 18B594 8025CCB4 D7B800A0 */ ldc1 $f24, 0xA0($sp) /* 18B598 8025CCB8 D7B60098 */ ldc1 $f22, 0x98($sp) /* 18B59C 8025CCBC D7B40090 */ ldc1 $f20, 0x90($sp) /* 18B5A0 8025CCC0 03E00008 */ jr $ra /* 18B5A4 8025CCC4 27BD00A8 */ addiu $sp, $sp, 0xA8 ### DECOMPILED C INSTRUCTIONS: void func_8025C918(b32 isNpcSprite, ActorPart* part, s32 yaw, s32 arg3) { DecorationTable* decor = part->decorationTable; u8 rbuf[20]; u8 gbuf[20]; u8 bbuf[20]; s32 alpha; s32 color; s32 i; s32 baseAngle; if (decor->unk_751 != 0) { decor->unk_752 = -2; decor->unk75A = 0; decor->unk_751 = 0; decor->unk758 = 0; if (isNpcSprite == SPRITE_MODE_PLAYER) { set_player_imgfx_all(PLAYER_SPRITE_MAIN, IMGFX_ALLOC_COLOR_BUF, 20, 0, 0, 255, 0); } else { set_npc_imgfx_all(part->spriteInstanceID, IMGFX_ALLOC_COLOR_BUF, 20, 0, 0, 255, 0); } } decor->unk75C += 7; baseAngle = decor->unk75C; if (decor->unk75C >= 360) { decor->unk75C = baseAngle % 360; } for (i = 0; i < ARRAY_COUNT(rbuf); i++) { rbuf[i] = (cosine(decor->unk75C + (25 * i)) + 1.0) * 112.0; gbuf[i] = (cosine(decor->unk75C + (25 * i) + 45) + 1.0) * 112.0; bbuf[i] = (cosine(decor->unk75C + (25 * i) + 90) + 1.0) * 112.0; } alpha = 255; if (part->opacity < 255) { alpha = part->opacity; } if (part->flags & 0x100) { alpha = (alpha * 120) / 255; } for (i = 0; i < ARRAY_COUNT(rbuf); i++) { color = (rbuf[i] << 0x18) | (gbuf[i] << 0x10) | (bbuf[i] << 8) | alpha; if (isNpcSprite == SPRITE_MODE_PLAYER) { set_player_imgfx_all(PLAYER_SPRITE_MAIN, IMGFX_COLOR_BUF_SET_MODULATE, i, color, 0, 255, 0); } else { set_npc_imgfx_all(part->spriteInstanceID, IMGFX_COLOR_BUF_SET_MODULATE, i, color, 0, 255, 0); } } if (arg3 == 0) { decor->unk75A -= 1; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel fire_breath_update /* 372AEC E006E35C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 372AF0 E006E360 AFBF0034 */ sw $ra, 0x34($sp) /* 372AF4 E006E364 AFB20030 */ sw $s2, 0x30($sp) /* 372AF8 E006E368 AFB1002C */ sw $s1, 0x2C($sp) /* 372AFC E006E36C AFB00028 */ sw $s0, 0x28($sp) /* 372B00 E006E370 8C90000C */ lw $s0, 0xC($a0) /* 372B04 E006E374 3C014080 */ lui $at, (0x40800000 >> 16) /* 372B08 E006E378 44811000 */ mtc1 $at, $f2 /* 372B0C E006E37C C600004C */ lwc1 $f0, 0x4C($s0) /* 372B10 E006E380 46800020 */ cvt.s.w $f0, $f0 /* 372B14 E006E384 8E020048 */ lw $v0, 0x48($s0) /* 372B18 E006E388 46020002 */ mul.s $f0, $f0, $f2 /* 372B1C E006E38C 00000000 */ nop /* 372B20 E006E390 2442FFFF */ addiu $v0, $v0, -0x1 /* 372B24 E006E394 AE020048 */ sw $v0, 0x48($s0) /* 372B28 E006E398 8E02004C */ lw $v0, 0x4C($s0) /* 372B2C E006E39C 3C014120 */ lui $at, (0x41200000 >> 16) /* 372B30 E006E3A0 44811000 */ mtc1 $at, $f2 /* 372B34 E006E3A4 24430001 */ addiu $v1, $v0, 0x1 /* 372B38 E006E3A8 8E020048 */ lw $v0, 0x48($s0) /* 372B3C E006E3AC AE03004C */ sw $v1, 0x4C($s0) /* 372B40 E006E3B0 46020003 */ div.s $f0, $f0, $f2 /* 372B44 E006E3B4 04410005 */ bgez $v0, .LE006E3CC /* 372B48 E006E3B8 E600005C */ swc1 $f0, 0x5C($s0) /* 372B4C E006E3BC 0C080128 */ jal shim_remove_effect /* 372B50 E006E3C0 00000000 */ nop /* 372B54 E006E3C4 0801B9B3 */ j .LE006E6CC /* 372B58 E006E3C8 00000000 */ nop .LE006E3CC: /* 372B5C E006E3CC 0040882D */ daddu $s1, $v0, $zero /* 372B60 E006E3D0 8E120044 */ lw $s2, 0x44($s0) /* 372B64 E006E3D4 2A220006 */ slti $v0, $s1, 0x6 /* 372B68 E006E3D8 14400011 */ bnez $v0, .LE006E420 /* 372B6C E006E3DC 0060202D */ daddu $a0, $v1, $zero /* 372B70 E006E3E0 8E020000 */ lw $v0, 0x0($s0) /* 372B74 E006E3E4 1440000E */ bnez $v0, .LE006E420 /* 372B78 E006E3E8 00000000 */ nop /* 372B7C E006E3EC C6000038 */ lwc1 $f0, 0x38($s0) /* 372B80 E006E3F0 3C014004 */ lui $at, (0x40040000 >> 16) /* 372B84 E006E3F4 44811800 */ mtc1 $at, $f3 /* 372B88 E006E3F8 44801000 */ mtc1 $zero, $f2 /* 372B8C E006E3FC 46000021 */ cvt.d.s $f0, $f0 /* 372B90 E006E400 46201081 */ sub.d $f2, $f2, $f0 /* 372B94 E006E404 3C01E007 */ lui $at, (0xE0070000 >> 16) /* 372B98 E006E408 D424EC30 */ ldc1 $f4, -0x13D0($at) /* 372B9C E006E40C 46241082 */ mul.d $f2, $f2, $f4 /* 372BA0 E006E410 00000000 */ nop /* 372BA4 E006E414 46220000 */ add.d $f0, $f0, $f2 /* 372BA8 E006E418 46200020 */ cvt.s.d $f0, $f0 /* 372BAC E006E41C E6000038 */ swc1 $f0, 0x38($s0) .LE006E420: /* 372BB0 E006E420 C6060024 */ lwc1 $f6, 0x24($s0) /* 372BB4 E006E424 C60C0018 */ lwc1 $f12, 0x18($s0) /* 372BB8 E006E428 460C3181 */ sub.s $f6, $f6, $f12 /* 372BBC E006E42C C6000050 */ lwc1 $f0, 0x50($s0) /* 372BC0 E006E430 46003180 */ add.s $f6, $f6, $f0 /* 372BC4 E006E434 44847000 */ mtc1 $a0, $f14 /* 372BC8 E006E438 00000000 */ nop /* 372BCC E006E43C 468073A0 */ cvt.s.w $f14, $f14 /* 372BD0 E006E440 460E3182 */ mul.s $f6, $f6, $f14 /* 372BD4 E006E444 00000000 */ nop /* 372BD8 E006E448 C6040028 */ lwc1 $f4, 0x28($s0) /* 372BDC E006E44C C60A001C */ lwc1 $f10, 0x1C($s0) /* 372BE0 E006E450 460A2101 */ sub.s $f4, $f4, $f10 /* 372BE4 E006E454 C6000054 */ lwc1 $f0, 0x54($s0) /* 372BE8 E006E458 46002100 */ add.s $f4, $f4, $f0 /* 372BEC E006E45C 460E2102 */ mul.s $f4, $f4, $f14 /* 372BF0 E006E460 00000000 */ nop /* 372BF4 E006E464 C6080020 */ lwc1 $f8, 0x20($s0) /* 372BF8 E006E468 C600002C */ lwc1 $f0, 0x2C($s0) /* 372BFC E006E46C 46080001 */ sub.s $f0, $f0, $f8 /* 372C00 E006E470 C6020058 */ lwc1 $f2, 0x58($s0) /* 372C04 E006E474 46020000 */ add.s $f0, $f0, $f2 /* 372C08 E006E478 460E0002 */ mul.s $f0, $f0, $f14 /* 372C0C E006E47C 00000000 */ nop /* 372C10 E006E480 44921000 */ mtc1 $s2, $f2 /* 372C14 E006E484 00000000 */ nop /* 372C18 E006E488 468010A0 */ cvt.s.w $f2, $f2 /* 372C1C E006E48C 46023183 */ div.s $f6, $f6, $f2 /* 372C20 E006E490 46066300 */ add.s $f12, $f12, $f6 /* 372C24 E006E494 24020001 */ addiu $v0, $zero, 0x1 /* 372C28 E006E498 46022103 */ div.s $f4, $f4, $f2 /* 372C2C E006E49C 46045280 */ add.s $f10, $f10, $f4 /* 372C30 E006E4A0 8E030000 */ lw $v1, 0x0($s0) /* 372C34 E006E4A4 46020003 */ div.s $f0, $f0, $f2 /* 372C38 E006E4A8 46004200 */ add.s $f8, $f8, $f0 /* 372C3C E006E4AC E60C000C */ swc1 $f12, 0xC($s0) /* 372C40 E006E4B0 E60A0010 */ swc1 $f10, 0x10($s0) /* 372C44 E006E4B4 1462000E */ bne $v1, $v0, .LE006E4F0 /* 372C48 E006E4B8 E6080014 */ swc1 $f8, 0x14($s0) /* 372C4C E006E4BC 3C01E007 */ lui $at, (0xE0070000 >> 16) /* 372C50 E006E4C0 D420EC38 */ ldc1 $f0, -0x13C8($at) /* 372C54 E006E4C4 460070A1 */ cvt.d.s $f2, $f14 /* 372C58 E006E4C8 46201082 */ mul.d $f2, $f2, $f0 /* 372C5C E006E4CC 00000000 */ nop /* 372C60 E006E4D0 C6000060 */ lwc1 $f0, 0x60($s0) /* 372C64 E006E4D4 46000021 */ cvt.d.s $f0, $f0 /* 372C68 E006E4D8 46220000 */ add.d $f0, $f0, $f2 /* 372C6C E006E4DC 46005086 */ mov.s $f2, $f10 /* 372C70 E006E4E0 46200020 */ cvt.s.d $f0, $f0 /* 372C74 E006E4E4 46001080 */ add.s $f2, $f2, $f0 /* 372C78 E006E4E8 E6000060 */ swc1 $f0, 0x60($s0) /* 372C7C E006E4EC E6020010 */ swc1 $f2, 0x10($s0) .LE006E4F0: /* 372C80 E006E4F0 8E020008 */ lw $v0, 0x8($s0) /* 372C84 E006E4F4 24420001 */ addiu $v0, $v0, 0x1 /* 372C88 E006E4F8 14820034 */ bne $a0, $v0, .LE006E5CC /* 372C8C E006E4FC 2A22000A */ slti $v0, $s1, 0xA /* 372C90 E006E500 8E020004 */ lw $v0, 0x4($s0) /* 372C94 E006E504 18400031 */ blez $v0, .LE006E5CC /* 372C98 E006E508 2A22000A */ slti $v0, $s1, 0xA /* 372C9C E006E50C 0C080150 */ jal shim_load_effect /* 372CA0 E006E510 24040037 */ addiu $a0, $zero, 0x37 /* 372CA4 E006E514 C6000024 */ lwc1 $f0, 0x24($s0) /* 372CA8 E006E518 E7A00010 */ swc1 $f0, 0x10($sp) /* 372CAC E006E51C C6000028 */ lwc1 $f0, 0x28($s0) /* 372CB0 E006E520 E7A00014 */ swc1 $f0, 0x14($sp) /* 372CB4 E006E524 C600002C */ lwc1 $f0, 0x2C($s0) /* 372CB8 E006E528 E7A00018 */ swc1 $f0, 0x18($sp) /* 372CBC E006E52C 8E020004 */ lw $v0, 0x4($s0) /* 372CC0 E006E530 2442FFFF */ addiu $v0, $v0, -0x1 /* 372CC4 E006E534 AFA2001C */ sw $v0, 0x1C($sp) /* 372CC8 E006E538 8E020008 */ lw $v0, 0x8($s0) /* 372CCC E006E53C AFB20024 */ sw $s2, 0x24($sp) /* 372CD0 E006E540 AFA20020 */ sw $v0, 0x20($sp) /* 372CD4 E006E544 8E040000 */ lw $a0, 0x0($s0) /* 372CD8 E006E548 8E050018 */ lw $a1, 0x18($s0) /* 372CDC E006E54C 8E06001C */ lw $a2, 0x1C($s0) /* 372CE0 E006E550 0C01B800 */ jal fire_breath_main /* 372CE4 E006E554 8E070020 */ lw $a3, 0x20($s0) /* 372CE8 E006E558 8C44000C */ lw $a0, 0xC($v0) /* 372CEC E006E55C 8E030064 */ lw $v1, 0x64($s0) /* 372CF0 E006E560 AC830064 */ sw $v1, 0x64($a0) /* 372CF4 E006E564 8C44000C */ lw $a0, 0xC($v0) /* 372CF8 E006E568 8E030068 */ lw $v1, 0x68($s0) /* 372CFC E006E56C AC830068 */ sw $v1, 0x68($a0) /* 372D00 E006E570 8C44000C */ lw $a0, 0xC($v0) /* 372D04 E006E574 8E03006C */ lw $v1, 0x6C($s0) /* 372D08 E006E578 AC83006C */ sw $v1, 0x6C($a0) /* 372D0C E006E57C 8C44000C */ lw $a0, 0xC($v0) /* 372D10 E006E580 8E030070 */ lw $v1, 0x70($s0) /* 372D14 E006E584 AC830070 */ sw $v1, 0x70($a0) /* 372D18 E006E588 8C44000C */ lw $a0, 0xC($v0) /* 372D1C E006E58C 8E030074 */ lw $v1, 0x74($s0) /* 372D20 E006E590 AC830074 */ sw $v1, 0x74($a0) /* 372D24 E006E594 8C44000C */ lw $a0, 0xC($v0) /* 372D28 E006E598 8E030078 */ lw $v1, 0x78($s0) /* 372D2C E006E59C AC830078 */ sw $v1, 0x78($a0) /* 372D30 E006E5A0 8C43000C */ lw $v1, 0xC($v0) /* 372D34 E006E5A4 C6000030 */ lwc1 $f0, 0x30($s0) /* 372D38 E006E5A8 E4600038 */ swc1 $f0, 0x38($v1) /* 372D3C E006E5AC E4600030 */ swc1 $f0, 0x30($v1) /* 372D40 E006E5B0 8C43000C */ lw $v1, 0xC($v0) /* 372D44 E006E5B4 C6000034 */ lwc1 $f0, 0x34($s0) /* 372D48 E006E5B8 E4600034 */ swc1 $f0, 0x34($v1) /* 372D4C E006E5BC 8C42000C */ lw $v0, 0xC($v0) /* 372D50 E006E5C0 C600003C */ lwc1 $f0, 0x3C($s0) /* 372D54 E006E5C4 E440003C */ swc1 $f0, 0x3C($v0) /* 372D58 E006E5C8 2A22000A */ slti $v0, $s1, 0xA .LE006E5CC: /* 372D5C E006E5CC 10400008 */ beqz $v0, .LE006E5F0 /* 372D60 E006E5D0 00000000 */ nop /* 372D64 E006E5D4 8E020000 */ lw $v0, 0x0($s0) /* 372D68 E006E5D8 14400005 */ bnez $v0, .LE006E5F0 /* 372D6C E006E5DC 00111040 */ sll $v0, $s1, 1 /* 372D70 E006E5E0 00511021 */ addu $v0, $v0, $s1 /* 372D74 E006E5E4 000210C0 */ sll $v0, $v0, 3 /* 372D78 E006E5E8 00511021 */ addu $v0, $v0, $s1 /* 372D7C E006E5EC AE020040 */ sw $v0, 0x40($s0) .LE006E5F0: /* 372D80 E006E5F0 8E030000 */ lw $v1, 0x0($s0) /* 372D84 E006E5F4 24020001 */ addiu $v0, $zero, 0x1 /* 372D88 E006E5F8 1462001D */ bne $v1, $v0, .LE006E670 /* 372D8C E006E5FC 24020002 */ addiu $v0, $zero, 0x2 /* 372D90 E006E600 001110C0 */ sll $v0, $s1, 3 /* 372D94 E006E604 00511023 */ subu $v0, $v0, $s1 /* 372D98 E006E608 00021140 */ sll $v0, $v0, 5 /* 372D9C E006E60C 16400002 */ bnez $s2, .LE006E618 /* 372DA0 E006E610 0052001A */ div $zero, $v0, $s2 /* 372DA4 E006E614 0007000D */ break 7 .LE006E618: /* 372DA8 E006E618 2401FFFF */ addiu $at, $zero, -0x1 /* 372DAC E006E61C 16410004 */ bne $s2, $at, .LE006E630 /* 372DB0 E006E620 3C018000 */ lui $at, (0x80000000 >> 16) /* 372DB4 E006E624 14410002 */ bne $v0, $at, .LE006E630 /* 372DB8 E006E628 00000000 */ nop /* 372DBC E006E62C 0006000D */ break 6 .LE006E630: /* 372DC0 E006E630 00001012 */ mflo $v0 /* 372DC4 E006E634 C6000038 */ lwc1 $f0, 0x38($s0) /* 372DC8 E006E638 3C01E007 */ lui $at, (0xE0070000 >> 16) /* 372DCC E006E63C D422EC40 */ ldc1 $f2, -0x13C0($at) /* 372DD0 E006E640 46000021 */ cvt.d.s $f0, $f0 /* 372DD4 E006E644 46201081 */ sub.d $f2, $f2, $f0 /* 372DD8 E006E648 3C01E007 */ lui $at, (0xE0070000 >> 16) /* 372DDC E006E64C D424EC48 */ ldc1 $f4, -0x13B8($at) /* 372DE0 E006E650 46241082 */ mul.d $f2, $f2, $f4 /* 372DE4 E006E654 00000000 */ nop /* 372DE8 E006E658 46220000 */ add.d $f0, $f0, $f2 /* 372DEC E006E65C 46200020 */ cvt.s.d $f0, $f0 /* 372DF0 E006E660 E6000038 */ swc1 $f0, 0x38($s0) /* 372DF4 E006E664 AE020040 */ sw $v0, 0x40($s0) /* 372DF8 E006E668 8E030000 */ lw $v1, 0x0($s0) /* 372DFC E006E66C 24020002 */ addiu $v0, $zero, 0x2 .LE006E670: /* 372E00 E006E670 14620016 */ bne $v1, $v0, .LE006E6CC /* 372E04 E006E674 001110C0 */ sll $v0, $s1, 3 /* 372E08 E006E678 00511023 */ subu $v0, $v0, $s1 /* 372E0C E006E67C 00021140 */ sll $v0, $v0, 5 /* 372E10 E006E680 16400002 */ bnez $s2, .LE006E68C /* 372E14 E006E684 0052001A */ div $zero, $v0, $s2 /* 372E18 E006E688 0007000D */ break 7 .LE006E68C: /* 372E1C E006E68C 2401FFFF */ addiu $at, $zero, -0x1 /* 372E20 E006E690 16410004 */ bne $s2, $at, .LE006E6A4 /* 372E24 E006E694 3C018000 */ lui $at, (0x80000000 >> 16) /* 372E28 E006E698 14410002 */ bne $v0, $at, .LE006E6A4 /* 372E2C E006E69C 00000000 */ nop /* 372E30 E006E6A0 0006000D */ break 6 .LE006E6A4: /* 372E34 E006E6A4 00001012 */ mflo $v0 /* 372E38 E006E6A8 C6000034 */ lwc1 $f0, 0x34($s0) /* 372E3C E006E6AC C6020038 */ lwc1 $f2, 0x38($s0) /* 372E40 E006E6B0 46020001 */ sub.s $f0, $f0, $f2 /* 372E44 E006E6B4 C604003C */ lwc1 $f4, 0x3C($s0) /* 372E48 E006E6B8 46040002 */ mul.s $f0, $f0, $f4 /* 372E4C E006E6BC 00000000 */ nop /* 372E50 E006E6C0 46001080 */ add.s $f2, $f2, $f0 /* 372E54 E006E6C4 E6020038 */ swc1 $f2, 0x38($s0) /* 372E58 E006E6C8 AE020040 */ sw $v0, 0x40($s0) .LE006E6CC: /* 372E5C E006E6CC 8FBF0034 */ lw $ra, 0x34($sp) /* 372E60 E006E6D0 8FB20030 */ lw $s2, 0x30($sp) /* 372E64 E006E6D4 8FB1002C */ lw $s1, 0x2C($sp) /* 372E68 E006E6D8 8FB00028 */ lw $s0, 0x28($sp) /* 372E6C E006E6DC 03E00008 */ jr $ra /* 372E70 E006E6E0 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void fire_breath_update(EffectInstance* effect) { FireBreathFXData* data = effect->data.fireBreath; s32 lifeTime; s32 timeLeft; s32 spawnTimer; data->timeLeft--; data->unk_5C = (data->spawnTimer * 4.0f) / 10.0f; data->spawnTimer++; if (data->timeLeft < 0) { shim_remove_effect(effect); return; } timeLeft = data->timeLeft; lifeTime = data->lifeTime; spawnTimer = data->spawnTimer; if (timeLeft >= 6 && data->type == FIRE_BREATH_LARGE) { data->scale += (2.5 - data->scale) * 0.05; } data->pos.x = data->initPos.x + (((data->endPos.x - data->initPos.x + data->unk_50.x) * spawnTimer) / lifeTime); data->pos.y = data->initPos.y + (((data->endPos.y - data->initPos.y + data->unk_50.y) * spawnTimer) / lifeTime); data->pos.z = data->initPos.z + (((data->endPos.z - data->initPos.z + data->unk_50.z) * spawnTimer) / lifeTime); if (data->type == FIRE_BREATH_SMALL) { data->unk_60 += (f32) spawnTimer * 0.01; data->pos.y += data->unk_60; } if (spawnTimer == data->spawnDelay + 1 && data->numChildren > 0) { EffectInstance* spawned; shim_load_effect(EFFECT_FIRE_BREATH); spawned = fire_breath_main( data->type, data->initPos.x, data->initPos.y, data->initPos.z, data->endPos.x, data->endPos.y, data->endPos.z, data->numChildren - 1, data->spawnDelay, lifeTime ); spawned->data.fireBreath->primR = data->primR; spawned->data.fireBreath->primG = data->primG; spawned->data.fireBreath->primB = data->primB; spawned->data.fireBreath->envR = data->envR; spawned->data.fireBreath->envG = data->envG; spawned->data.fireBreath->envB = data->envB; spawned->data.fireBreath->unk_30 = spawned->data.fireBreath->scale = data->unk_30; spawned->data.fireBreath->unk_34 = data->unk_34; spawned->data.fireBreath->scaleChangeFactor = data->scaleChangeFactor; } if (timeLeft < 10 && data->type == FIRE_BREATH_LARGE) { data->alpha = timeLeft * 25; } if (data->type == FIRE_BREATH_SMALL) { data->scale += (0.3 - data->scale) * 0.008; data->alpha = (timeLeft * 224) / lifeTime; } if (data->type == FIRE_BREATH_TINY) { data->scale += (data->unk_34 - data->scale) * data->scaleChangeFactor; data->alpha = (timeLeft * 224) / lifeTime; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel ice_pillar_update /* 409B24 E011E194 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 409B28 E011E198 AFB30024 */ sw $s3, 0x24($sp) /* 409B2C E011E19C 0080982D */ daddu $s3, $a0, $zero /* 409B30 E011E1A0 AFBF0028 */ sw $ra, 0x28($sp) /* 409B34 E011E1A4 AFB20020 */ sw $s2, 0x20($sp) /* 409B38 E011E1A8 AFB1001C */ sw $s1, 0x1C($sp) /* 409B3C E011E1AC AFB00018 */ sw $s0, 0x18($sp) /* 409B40 E011E1B0 F7B80040 */ sdc1 $f24, 0x40($sp) /* 409B44 E011E1B4 F7B60038 */ sdc1 $f22, 0x38($sp) /* 409B48 E011E1B8 F7B40030 */ sdc1 $f20, 0x30($sp) /* 409B4C E011E1BC 8E630000 */ lw $v1, 0x0($s3) /* 409B50 E011E1C0 8E71000C */ lw $s1, 0xC($s3) /* 409B54 E011E1C4 30620010 */ andi $v0, $v1, 0x10 /* 409B58 E011E1C8 10400005 */ beqz $v0, .LE011E1E0 /* 409B5C E011E1CC 2402FFEF */ addiu $v0, $zero, -0x11 /* 409B60 E011E1D0 00621024 */ and $v0, $v1, $v0 /* 409B64 E011E1D4 AE620000 */ sw $v0, 0x0($s3) /* 409B68 E011E1D8 24020010 */ addiu $v0, $zero, 0x10 /* 409B6C E011E1DC AE220010 */ sw $v0, 0x10($s1) .LE011E1E0: /* 409B70 E011E1E0 8E230010 */ lw $v1, 0x10($s1) /* 409B74 E011E1E4 286203E8 */ slti $v0, $v1, 0x3E8 /* 409B78 E011E1E8 10400002 */ beqz $v0, .LE011E1F4 /* 409B7C E011E1EC 2462FFFF */ addiu $v0, $v1, -0x1 /* 409B80 E011E1F0 AE220010 */ sw $v0, 0x10($s1) .LE011E1F4: /* 409B84 E011E1F4 8E220014 */ lw $v0, 0x14($s1) /* 409B88 E011E1F8 8E240010 */ lw $a0, 0x10($s1) /* 409B8C E011E1FC 24430001 */ addiu $v1, $v0, 0x1 /* 409B90 E011E200 04810085 */ bgez $a0, .LE011E418 /* 409B94 E011E204 AE230014 */ sw $v1, 0x14($s1) /* 409B98 E011E208 0C080150 */ jal shim_load_effect /* 409B9C E011E20C 2404007A */ addiu $a0, $zero, 0x7A /* 409BA0 E011E210 0000902D */ daddu $s2, $zero, $zero /* 409BA4 E011E214 3C01E012 */ lui $at, (0xE0120000 >> 16) /* 409BA8 E011E218 D438E810 */ ldc1 $f24, -0x17F0($at) .LE011E21C: /* 409BAC E011E21C 0C080138 */ jal shim_rand_int /* 409BB0 E011E220 24040014 */ addiu $a0, $zero, 0x14 /* 409BB4 E011E224 C6340004 */ lwc1 $f20, 0x4($s1) /* 409BB8 E011E228 44820000 */ mtc1 $v0, $f0 /* 409BBC E011E22C 00000000 */ nop /* 409BC0 E011E230 46800020 */ cvt.s.w $f0, $f0 /* 409BC4 E011E234 4600A500 */ add.s $f20, $f20, $f0 /* 409BC8 E011E238 3C014120 */ lui $at, (0x41200000 >> 16) /* 409BCC E011E23C 44810000 */ mtc1 $at, $f0 /* 409BD0 E011E240 24040028 */ addiu $a0, $zero, 0x28 /* 409BD4 E011E244 0C080138 */ jal shim_rand_int /* 409BD8 E011E248 4600A501 */ sub.s $f20, $f20, $f0 /* 409BDC E011E24C C6220020 */ lwc1 $f2, 0x20($s1) /* 409BE0 E011E250 44820000 */ mtc1 $v0, $f0 /* 409BE4 E011E254 00000000 */ nop /* 409BE8 E011E258 46800020 */ cvt.s.w $f0, $f0 /* 409BEC E011E25C 46020002 */ mul.s $f0, $f0, $f2 /* 409BF0 E011E260 00000000 */ nop /* 409BF4 E011E264 C6360008 */ lwc1 $f22, 0x8($s1) /* 409BF8 E011E268 2404000A */ addiu $a0, $zero, 0xA /* 409BFC E011E26C 0C080138 */ jal shim_rand_int /* 409C00 E011E270 4600B580 */ add.s $f22, $f22, $f0 /* 409C04 E011E274 3C01E012 */ lui $at, (0xE0120000 >> 16) /* 409C08 E011E278 D422E818 */ ldc1 $f2, -0x17E8($at) /* 409C0C E011E27C 44820000 */ mtc1 $v0, $f0 /* 409C10 E011E280 00000000 */ nop /* 409C14 E011E284 46800021 */ cvt.d.w $f0, $f0 /* 409C18 E011E288 46220002 */ mul.d $f0, $f0, $f2 /* 409C1C E011E28C 00000000 */ nop /* 409C20 E011E290 46380002 */ mul.d $f0, $f0, $f24 /* 409C24 E011E294 00000000 */ nop /* 409C28 E011E298 001227C2 */ srl $a0, $s2, 31 /* 409C2C E011E29C 02442021 */ addu $a0, $s2, $a0 /* 409C30 E011E2A0 3C01E012 */ lui $at, (0xE0120000 >> 16) /* 409C34 E011E2A4 D422E820 */ ldc1 $f2, -0x17E0($at) /* 409C38 E011E2A8 C6240020 */ lwc1 $f4, 0x20($s1) /* 409C3C E011E2AC 46220000 */ add.d $f0, $f0, $f2 /* 409C40 E011E2B0 00042043 */ sra $a0, $a0, 1 /* 409C44 E011E2B4 46002121 */ cvt.d.s $f4, $f4 /* 409C48 E011E2B8 46202102 */ mul.d $f4, $f4, $f0 /* 409C4C E011E2BC 00000000 */ nop /* 409C50 E011E2C0 00042040 */ sll $a0, $a0, 1 /* 409C54 E011E2C4 02442023 */ subu $a0, $s2, $a0 /* 409C58 E011E2C8 24840002 */ addiu $a0, $a0, 0x2 /* 409C5C E011E2CC 4405A000 */ mfc1 $a1, $f20 /* 409C60 E011E2D0 C622000C */ lwc1 $f2, 0xC($s1) /* 409C64 E011E2D4 3C014040 */ lui $at, (0x40400000 >> 16) /* 409C68 E011E2D8 44810000 */ mtc1 $at, $f0 /* 409C6C E011E2DC 4406B000 */ mfc1 $a2, $f22 /* 409C70 E011E2E0 46001080 */ add.s $f2, $f2, $f0 /* 409C74 E011E2E4 2642001E */ addiu $v0, $s2, 0x1E /* 409C78 E011E2E8 AFA20014 */ sw $v0, 0x14($sp) /* 409C7C E011E2EC 44071000 */ mfc1 $a3, $f2 /* 409C80 E011E2F0 46202120 */ cvt.s.d $f4, $f4 /* 409C84 E011E2F4 0C044000 */ jal ice_shard_main /* 409C88 E011E2F8 E7A40010 */ swc1 $f4, 0x10($sp) /* 409C8C E011E2FC 2404000A */ addiu $a0, $zero, 0xA /* 409C90 E011E300 0C080138 */ jal shim_rand_int /* 409C94 E011E304 0040802D */ daddu $s0, $v0, $zero /* 409C98 E011E308 44820000 */ mtc1 $v0, $f0 /* 409C9C E011E30C 00000000 */ nop /* 409CA0 E011E310 46800021 */ cvt.d.w $f0, $f0 /* 409CA4 E011E314 46380002 */ mul.d $f0, $f0, $f24 /* 409CA8 E011E318 00000000 */ nop /* 409CAC E011E31C 2404001E */ addiu $a0, $zero, 0x1E /* 409CB0 E011E320 8E02000C */ lw $v0, 0xC($s0) /* 409CB4 E011E324 46200020 */ cvt.s.d $f0, $f0 /* 409CB8 E011E328 0C080138 */ jal shim_rand_int /* 409CBC E011E32C E4400044 */ swc1 $f0, 0x44($v0) /* 409CC0 E011E330 3C01E012 */ lui $at, (0xE0120000 >> 16) /* 409CC4 E011E334 D422E828 */ ldc1 $f2, -0x17D8($at) /* 409CC8 E011E338 44820000 */ mtc1 $v0, $f0 /* 409CCC E011E33C 00000000 */ nop /* 409CD0 E011E340 46800021 */ cvt.d.w $f0, $f0 /* 409CD4 E011E344 46220002 */ mul.d $f0, $f0, $f2 /* 409CD8 E011E348 00000000 */ nop /* 409CDC E011E34C 46380000 */ add.d $f0, $f0, $f24 /* 409CE0 E011E350 24040167 */ addiu $a0, $zero, 0x167 /* 409CE4 E011E354 8E02000C */ lw $v0, 0xC($s0) /* 409CE8 E011E358 46200020 */ cvt.s.d $f0, $f0 /* 409CEC E011E35C 0C080138 */ jal shim_rand_int /* 409CF0 E011E360 E4400048 */ swc1 $f0, 0x48($v0) /* 409CF4 E011E364 24040014 */ addiu $a0, $zero, 0x14 /* 409CF8 E011E368 8E03000C */ lw $v1, 0xC($s0) /* 409CFC E011E36C 44820000 */ mtc1 $v0, $f0 /* 409D00 E011E370 00000000 */ nop /* 409D04 E011E374 46800020 */ cvt.s.w $f0, $f0 /* 409D08 E011E378 0C080138 */ jal shim_rand_int /* 409D0C E011E37C E460003C */ swc1 $f0, 0x3C($v1) /* 409D10 E011E380 2404000A */ addiu $a0, $zero, 0xA /* 409D14 E011E384 8E03000C */ lw $v1, 0xC($s0) /* 409D18 E011E388 44820000 */ mtc1 $v0, $f0 /* 409D1C E011E38C 00000000 */ nop /* 409D20 E011E390 46800020 */ cvt.s.w $f0, $f0 /* 409D24 E011E394 0C080138 */ jal shim_rand_int /* 409D28 E011E398 E4600040 */ swc1 $f0, 0x40($v1) /* 409D2C E011E39C 2404000A */ addiu $a0, $zero, 0xA /* 409D30 E011E3A0 2442FFFB */ addiu $v0, $v0, -0x5 /* 409D34 E011E3A4 8E03000C */ lw $v1, 0xC($s0) /* 409D38 E011E3A8 44820000 */ mtc1 $v0, $f0 /* 409D3C E011E3AC 00000000 */ nop /* 409D40 E011E3B0 46800020 */ cvt.s.w $f0, $f0 /* 409D44 E011E3B4 0C080138 */ jal shim_rand_int /* 409D48 E011E3B8 E460004C */ swc1 $f0, 0x4C($v1) /* 409D4C E011E3BC 2442FFFB */ addiu $v0, $v0, -0x5 /* 409D50 E011E3C0 8E03000C */ lw $v1, 0xC($s0) /* 409D54 E011E3C4 44820000 */ mtc1 $v0, $f0 /* 409D58 E011E3C8 00000000 */ nop /* 409D5C E011E3CC 46800020 */ cvt.s.w $f0, $f0 /* 409D60 E011E3D0 E4600050 */ swc1 $f0, 0x50($v1) /* 409D64 E011E3D4 8E02000C */ lw $v0, 0xC($s0) /* 409D68 E011E3D8 3C01BDCC */ lui $at, (0xBDCCCCCD >> 16) /* 409D6C E011E3DC 3421CCCD */ ori $at, $at, (0xBDCCCCCD & 0xFFFF) /* 409D70 E011E3E0 44810000 */ mtc1 $at, $f0 /* 409D74 E011E3E4 AC400054 */ sw $zero, 0x54($v0) /* 409D78 E011E3E8 8E02000C */ lw $v0, 0xC($s0) /* 409D7C E011E3EC 26520001 */ addiu $s2, $s2, 0x1 /* 409D80 E011E3F0 E4400058 */ swc1 $f0, 0x58($v0) /* 409D84 E011E3F4 2A420014 */ slti $v0, $s2, 0x14 /* 409D88 E011E3F8 1440FF88 */ bnez $v0, .LE011E21C /* 409D8C E011E3FC 00000000 */ nop /* 409D90 E011E400 0C080128 */ jal shim_remove_effect /* 409D94 E011E404 8E240028 */ lw $a0, 0x28($s1) /* 409D98 E011E408 0C080128 */ jal shim_remove_effect /* 409D9C E011E40C 0260202D */ daddu $a0, $s3, $zero /* 409DA0 E011E410 08047942 */ j .LE011E508 /* 409DA4 E011E414 00000000 */ nop .LE011E418: /* 409DA8 E011E418 0080802D */ daddu $s0, $a0, $zero /* 409DAC E011E41C 92220025 */ lbu $v0, 0x25($s1) /* 409DB0 E011E420 2442FFFF */ addiu $v0, $v0, -0x1 /* 409DB4 E011E424 A2220025 */ sb $v0, 0x25($s1) /* 409DB8 E011E428 00021600 */ sll $v0, $v0, 24 /* 409DBC E011E42C 04410005 */ bgez $v0, .LE011E444 /* 409DC0 E011E430 0060902D */ daddu $s2, $v1, $zero /* 409DC4 E011E434 0C080138 */ jal shim_rand_int /* 409DC8 E011E438 2404003C */ addiu $a0, $zero, 0x3C /* 409DCC E011E43C 24420008 */ addiu $v0, $v0, 0x8 /* 409DD0 E011E440 A2220025 */ sb $v0, 0x25($s1) .LE011E444: /* 409DD4 E011E444 92220025 */ lbu $v0, 0x25($s1) /* 409DD8 E011E448 00022600 */ sll $a0, $v0, 24 /* 409DDC E011E44C 00041E03 */ sra $v1, $a0, 24 /* 409DE0 E011E450 28620008 */ slti $v0, $v1, 0x8 /* 409DE4 E011E454 10400005 */ beqz $v0, .LE011E46C /* 409DE8 E011E458 000417C2 */ srl $v0, $a0, 31 /* 409DEC E011E45C 00621021 */ addu $v0, $v1, $v0 /* 409DF0 E011E460 00021043 */ sra $v0, $v0, 1 /* 409DF4 E011E464 0804791C */ j .LE011E470 /* 409DF8 E011E468 A2220024 */ sb $v0, 0x24($s1) .LE011E46C: /* 409DFC E011E46C A2200024 */ sb $zero, 0x24($s1) .LE011E470: /* 409E00 E011E470 2A020011 */ slti $v0, $s0, 0x11 /* 409E04 E011E474 14400015 */ bnez $v0, .LE011E4CC /* 409E08 E011E478 3242000F */ andi $v0, $s2, 0xF /* 409E0C E011E47C 14400013 */ bnez $v0, .LE011E4CC /* 409E10 E011E480 00000000 */ nop /* 409E14 E011E484 0C080150 */ jal shim_load_effect /* 409E18 E011E488 2404006F */ addiu $a0, $zero, 0x6F /* 409E1C E011E48C C6220020 */ lwc1 $f2, 0x20($s1) /* 409E20 E011E490 3C014220 */ lui $at, (0x42200000 >> 16) /* 409E24 E011E494 44810000 */ mtc1 $at, $f0 /* 409E28 E011E498 00000000 */ nop /* 409E2C E011E49C 46001002 */ mul.s $f0, $f2, $f0 /* 409E30 E011E4A0 00000000 */ nop /* 409E34 E011E4A4 C6240008 */ lwc1 $f4, 0x8($s1) /* 409E38 E011E4A8 2402001E */ addiu $v0, $zero, 0x1E /* 409E3C E011E4AC AFA20014 */ sw $v0, 0x14($sp) /* 409E40 E011E4B0 E7A20010 */ swc1 $f2, 0x10($sp) /* 409E44 E011E4B4 46002100 */ add.s $f4, $f4, $f0 /* 409E48 E011E4B8 8E250004 */ lw $a1, 0x4($s1) /* 409E4C E011E4BC 8E27000C */ lw $a3, 0xC($s1) /* 409E50 E011E4C0 44062000 */ mfc1 $a2, $f4 /* 409E54 E011E4C4 0C037800 */ jal cold_breath_main /* 409E58 E011E4C8 24040002 */ addiu $a0, $zero, 0x2 .LE011E4CC: /* 409E5C E011E4CC 8E220028 */ lw $v0, 0x28($s1) /* 409E60 E011E4D0 C6200004 */ lwc1 $f0, 0x4($s1) /* 409E64 E011E4D4 3C014120 */ lui $at, (0x41200000 >> 16) /* 409E68 E011E4D8 44811000 */ mtc1 $at, $f2 /* 409E6C E011E4DC 8C42000C */ lw $v0, 0xC($v0) /* 409E70 E011E4E0 E4400004 */ swc1 $f0, 0x4($v0) /* 409E74 E011E4E4 C6200008 */ lwc1 $f0, 0x8($s1) /* 409E78 E011E4E8 8E220028 */ lw $v0, 0x28($s1) /* 409E7C E011E4EC 46020000 */ add.s $f0, $f0, $f2 /* 409E80 E011E4F0 8C42000C */ lw $v0, 0xC($v0) /* 409E84 E011E4F4 E4400008 */ swc1 $f0, 0x8($v0) /* 409E88 E011E4F8 8E220028 */ lw $v0, 0x28($s1) /* 409E8C E011E4FC C620000C */ lwc1 $f0, 0xC($s1) /* 409E90 E011E500 8C42000C */ lw $v0, 0xC($v0) /* 409E94 E011E504 E440000C */ swc1 $f0, 0xC($v0) .LE011E508: /* 409E98 E011E508 8FBF0028 */ lw $ra, 0x28($sp) /* 409E9C E011E50C 8FB30024 */ lw $s3, 0x24($sp) /* 409EA0 E011E510 8FB20020 */ lw $s2, 0x20($sp) /* 409EA4 E011E514 8FB1001C */ lw $s1, 0x1C($sp) /* 409EA8 E011E518 8FB00018 */ lw $s0, 0x18($sp) /* 409EAC E011E51C D7B80040 */ ldc1 $f24, 0x40($sp) /* 409EB0 E011E520 D7B60038 */ ldc1 $f22, 0x38($sp) /* 409EB4 E011E524 D7B40030 */ ldc1 $f20, 0x30($sp) /* 409EB8 E011E528 03E00008 */ jr $ra /* 409EBC E011E52C 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void ice_pillar_update(EffectInstance* effect) { IcePillarFXData* data = effect->data.icePillar; s32 timeLeft; s32 lifeTime; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->timeLeft = 16; } if (data->timeLeft < 1000) { data->timeLeft--; } data->lifeTime++; if (data->timeLeft < 0) { shim_load_effect(EFFECT_ICE_SHARD); for (i = 0; i < 20; i++) { EffectInstance* iceShard; iceShard = ice_shard_main( (i % 2) + 2, (data->pos.x + shim_rand_int(20)) - 10.0f, data->pos.y + (shim_rand_int(40) * data->scale), data->pos.z + 3.0f, (data->scale * ((shim_rand_int(10) * 0.7 * 0.1) + 0.3)), i + 30 ); iceShard->data.iceShard->animFrame = shim_rand_int(10) * 0.1; iceShard->data.iceShard->animRate = (shim_rand_int(30) * 0.01) + 0.1; iceShard->data.iceShard->rotation = shim_rand_int(359); iceShard->data.iceShard->angularVel = shim_rand_int(20); iceShard->data.iceShard->vel.x = shim_rand_int(10) - 5; iceShard->data.iceShard->vel.y = shim_rand_int(10) - 5; iceShard->data.iceShard->vel.z = 0; iceShard->data.iceShard->gravAccel = -0.1f; } shim_remove_effect(data->miscParticles); shim_remove_effect(effect); return; } timeLeft = data->timeLeft; lifeTime = data->lifeTime; data->unk_25--; if (data->unk_25 < 0) { data->unk_25 = shim_rand_int(60) + 8; } if (data->unk_25 < 8) { data->unk_24 = data->unk_25 / 2; } else { data->unk_24 = 0; } if (timeLeft > 16 && (lifeTime % 16) == 0) { shim_load_effect(EFFECT_COLD_BREATH); cold_breath_main(2, data->pos.x, data->pos.y + (data->scale * 40.0f), data->pos.z, data->scale, 30); } data->miscParticles->data.miscParticles->pos.x = data->pos.x; data->miscParticles->data.miscParticles->pos.y = data->pos.y + 10.0f; data->miscParticles->data.miscParticles->pos.z = data->pos.z; }
### RAW ASSEMBLY INSTRUCTIONS: glabel sfx_compute_spatialized_sound_params_full /* DF950 80149250 44860000 */ mtc1 $a2, $f0 /* DF954 80149254 3C048007 */ lui $a0, %hi(gCurrentCameraID) /* DF958 80149258 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) /* DF95C 8014925C 44056000 */ mfc1 $a1, $f12 /* DF960 80149260 44067000 */ mfc1 $a2, $f14 /* DF964 80149264 27BDFF98 */ addiu $sp, $sp, -0x68 /* DF968 80149268 AFB20038 */ sw $s2, 0x38($sp) /* DF96C 8014926C 8FB20078 */ lw $s2, 0x78($sp) /* DF970 80149270 AFB10034 */ sw $s1, 0x34($sp) /* DF974 80149274 00E0882D */ daddu $s1, $a3, $zero /* DF978 80149278 AFB00030 */ sw $s0, 0x30($sp) /* DF97C 8014927C 8FB0007C */ lw $s0, 0x7C($sp) /* DF980 80149280 27A20020 */ addiu $v0, $sp, 0x20 /* DF984 80149284 AFA20010 */ sw $v0, 0x10($sp) /* DF988 80149288 27A20024 */ addiu $v0, $sp, 0x24 /* DF98C 8014928C AFA20014 */ sw $v0, 0x14($sp) /* DF990 80149290 44070000 */ mfc1 $a3, $f0 /* DF994 80149294 27A20028 */ addiu $v0, $sp, 0x28 /* DF998 80149298 AFBF003C */ sw $ra, 0x3C($sp) /* DF99C 8014929C F7BC0060 */ sdc1 $f28, 0x60($sp) /* DF9A0 801492A0 F7BA0058 */ sdc1 $f26, 0x58($sp) /* DF9A4 801492A4 F7B80050 */ sdc1 $f24, 0x50($sp) /* DF9A8 801492A8 F7B60048 */ sdc1 $f22, 0x48($sp) /* DF9AC 801492AC F7B40040 */ sdc1 $f20, 0x40($sp) /* DF9B0 801492B0 0C00B94E */ jal get_screen_coords /* DF9B4 801492B4 AFA20018 */ sw $v0, 0x18($sp) /* DF9B8 801492B8 8FA40020 */ lw $a0, 0x20($sp) /* DF9BC 801492BC 24821388 */ addiu $v0, $a0, 0x1388 /* DF9C0 801492C0 2C422711 */ sltiu $v0, $v0, 0x2711 /* DF9C4 801492C4 10400020 */ beqz $v0, .L80149348 /* DF9C8 801492C8 2402FFFF */ addiu $v0, $zero, -0x1 /* DF9CC 801492CC 8FA30024 */ lw $v1, 0x24($sp) /* DF9D0 801492D0 28621389 */ slti $v0, $v1, 0x1389 /* DF9D4 801492D4 1040001B */ beqz $v0, .L80149344 /* DF9D8 801492D8 2862EC78 */ slti $v0, $v1, -0x1388 /* DF9DC 801492DC 1440001A */ bnez $v0, .L80149348 /* DF9E0 801492E0 2402FFFF */ addiu $v0, $zero, -0x1 /* DF9E4 801492E4 3C020002 */ lui $v0, (0x20000 >> 16) /* DF9E8 801492E8 02021024 */ and $v0, $s0, $v0 /* DF9EC 801492EC 10400008 */ beqz $v0, .L80149310 /* DF9F0 801492F0 2482001E */ addiu $v0, $a0, 0x1E /* DF9F4 801492F4 2C42017D */ sltiu $v0, $v0, 0x17D /* DF9F8 801492F8 10400012 */ beqz $v0, .L80149344 /* DF9FC 801492FC 2862FFE2 */ slti $v0, $v1, -0x1E /* DFA00 80149300 14400011 */ bnez $v0, .L80149348 /* DFA04 80149304 2402FFFF */ addiu $v0, $zero, -0x1 /* DFA08 80149308 080524CF */ j .L8014933C /* DFA0C 8014930C 2862010F */ slti $v0, $v1, 0x10F .L80149310: /* DFA10 80149310 3C020004 */ lui $v0, (0x40000 >> 16) /* DFA14 80149314 02021024 */ and $v0, $s0, $v0 /* DFA18 80149318 10400003 */ beqz $v0, .L80149328 /* DFA1C 8014931C 2482001E */ addiu $v0, $a0, 0x1E /* DFA20 80149320 080524CF */ j .L8014933C /* DFA24 80149324 2C42017D */ sltiu $v0, $v0, 0x17D .L80149328: /* DFA28 80149328 3C020008 */ lui $v0, (0x80000 >> 16) /* DFA2C 8014932C 02021024 */ and $v0, $s0, $v0 /* DFA30 80149330 10400008 */ beqz $v0, .L80149354 /* DFA34 80149334 2462001E */ addiu $v0, $v1, 0x1E /* DFA38 80149338 2C42012D */ sltiu $v0, $v0, 0x12D .L8014933C: /* DFA3C 8014933C 14400006 */ bnez $v0, .L80149358 /* DFA40 80149340 240300A0 */ addiu $v1, $zero, 0xA0 .L80149344: /* DFA44 80149344 2402FFFF */ addiu $v0, $zero, -0x1 .L80149348: /* DFA48 80149348 A6220000 */ sh $v0, 0x0($s1) /* DFA4C 8014934C 08052575 */ j .L801495D4 /* DFA50 80149350 A6400000 */ sh $zero, 0x0($s2) .L80149354: /* DFA54 80149354 240300A0 */ addiu $v1, $zero, 0xA0 .L80149358: /* DFA58 80149358 8FA20020 */ lw $v0, 0x20($sp) /* DFA5C 8014935C 4480C000 */ mtc1 $zero, $f24 /* DFA60 80149360 4480C800 */ mtc1 $zero, $f25 /* DFA64 80149364 00621823 */ subu $v1, $v1, $v0 /* DFA68 80149368 04620001 */ bltzl $v1, .L80149370 /* DFA6C 8014936C 00031823 */ negu $v1, $v1 .L80149370: /* DFA70 80149370 2463FF6F */ addiu $v1, $v1, -0x91 /* DFA74 80149374 44831000 */ mtc1 $v1, $f2 /* DFA78 80149378 00000000 */ nop /* DFA7C 8014937C 468010A0 */ cvt.s.w $f2, $f2 /* DFA80 80149380 46001021 */ cvt.d.s $f0, $f2 /* DFA84 80149384 4638003C */ c.lt.d $f0, $f24 /* DFA88 80149388 00000000 */ nop /* DFA8C 8014938C 45000003 */ bc1f .L8014939C /* DFA90 80149390 0000202D */ daddu $a0, $zero, $zero /* DFA94 80149394 44801000 */ mtc1 $zero, $f2 /* DFA98 80149398 00000000 */ nop .L8014939C: /* DFA9C 8014939C 4600120D */ trunc.w.s $f8, $f2 /* DFAA0 801493A0 44074000 */ mfc1 $a3, $f8 /* DFAA4 801493A4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DFAA8 801493A8 4481E000 */ mtc1 $at, $f28 /* DFAAC 801493AC 4480B000 */ mtc1 $zero, $f22 /* DFAB0 801493B0 4405E000 */ mfc1 $a1, $f28 /* DFAB4 801493B4 4406B000 */ mfc1 $a2, $f22 /* DFAB8 801493B8 240200C8 */ addiu $v0, $zero, 0xC8 /* DFABC 801493BC 0C00A8ED */ jal update_lerp /* DFAC0 801493C0 AFA20010 */ sw $v0, 0x10($sp) /* DFAC4 801493C4 46000686 */ mov.s $f26, $f0 /* DFAC8 801493C8 4600D021 */ cvt.d.s $f0, $f26 /* DFACC 801493CC 4638003C */ c.lt.d $f0, $f24 /* DFAD0 801493D0 00000000 */ nop /* DFAD4 801493D4 45030001 */ bc1tl .L801493DC /* DFAD8 801493D8 4600B686 */ mov.s $f26, $f22 .L801493DC: /* DFADC 801493DC 8FA20024 */ lw $v0, 0x24($sp) /* DFAE0 801493E0 24030078 */ addiu $v1, $zero, 0x78 /* DFAE4 801493E4 00621823 */ subu $v1, $v1, $v0 /* DFAE8 801493E8 04620001 */ bltzl $v1, .L801493F0 /* DFAEC 801493EC 00031823 */ negu $v1, $v1 .L801493F0: /* DFAF0 801493F0 2463FF97 */ addiu $v1, $v1, -0x69 /* DFAF4 801493F4 44831000 */ mtc1 $v1, $f2 /* DFAF8 801493F8 00000000 */ nop /* DFAFC 801493FC 468010A0 */ cvt.s.w $f2, $f2 /* DFB00 80149400 46001021 */ cvt.d.s $f0, $f2 /* DFB04 80149404 4638003C */ c.lt.d $f0, $f24 /* DFB08 80149408 00000000 */ nop /* DFB0C 8014940C 45030001 */ bc1tl .L80149414 /* DFB10 80149410 4600B086 */ mov.s $f2, $f22 .L80149414: /* DFB14 80149414 0000202D */ daddu $a0, $zero, $zero /* DFB18 80149418 4600120D */ trunc.w.s $f8, $f2 /* DFB1C 8014941C 44074000 */ mfc1 $a3, $f8 /* DFB20 80149420 4405E000 */ mfc1 $a1, $f28 /* DFB24 80149424 4406B000 */ mfc1 $a2, $f22 /* DFB28 80149428 24020082 */ addiu $v0, $zero, 0x82 /* DFB2C 8014942C 0C00A8ED */ jal update_lerp /* DFB30 80149430 AFA20010 */ sw $v0, 0x10($sp) /* DFB34 80149434 46000506 */ mov.s $f20, $f0 /* DFB38 80149438 4600A021 */ cvt.d.s $f0, $f20 /* DFB3C 8014943C 4638003C */ c.lt.d $f0, $f24 /* DFB40 80149440 00000000 */ nop /* DFB44 80149444 45030001 */ bc1tl .L8014944C /* DFB48 80149448 4600B506 */ mov.s $f20, $f22 .L8014944C: /* DFB4C 8014944C 3C018015 */ lui $at, %hi(D_80151250) /* DFB50 80149450 D4201250 */ ldc1 $f0, %lo(D_80151250)($at) /* DFB54 80149454 C7A20028 */ lwc1 $f2, 0x28($sp) /* DFB58 80149458 468010A1 */ cvt.d.w $f2, $f2 /* DFB5C 8014945C 46201081 */ sub.d $f2, $f2, $f0 /* DFB60 80149460 462010A0 */ cvt.s.d $f2, $f2 /* DFB64 80149464 46001021 */ cvt.d.s $f0, $f2 /* DFB68 80149468 4638003C */ c.lt.d $f0, $f24 /* DFB6C 8014946C 00000000 */ nop /* DFB70 80149470 45030001 */ bc1tl .L80149478 /* DFB74 80149474 4600B086 */ mov.s $f2, $f22 .L80149478: /* DFB78 80149478 0000202D */ daddu $a0, $zero, $zero /* DFB7C 8014947C 4600120D */ trunc.w.s $f8, $f2 /* DFB80 80149480 44074000 */ mfc1 $a3, $f8 /* DFB84 80149484 4405E000 */ mfc1 $a1, $f28 /* DFB88 80149488 4406B000 */ mfc1 $a2, $f22 /* DFB8C 8014948C 240200FA */ addiu $v0, $zero, 0xFA /* DFB90 80149490 0C00A8ED */ jal update_lerp /* DFB94 80149494 AFA20010 */ sw $v0, 0x10($sp) /* DFB98 80149498 46000086 */ mov.s $f2, $f0 /* DFB9C 8014949C 46001021 */ cvt.d.s $f0, $f2 /* DFBA0 801494A0 4638003C */ c.lt.d $f0, $f24 /* DFBA4 801494A4 00000000 */ nop /* DFBA8 801494A8 45030001 */ bc1tl .L801494B0 /* DFBAC 801494AC 4600B086 */ mov.s $f2, $f22 .L801494B0: /* DFBB0 801494B0 4614D002 */ mul.s $f0, $f26, $f20 /* DFBB4 801494B4 00000000 */ nop /* DFBB8 801494B8 46020002 */ mul.s $f0, $f0, $f2 /* DFBBC 801494BC 00000000 */ nop /* DFBC0 801494C0 3C018015 */ lui $at, %hi(D_80151258) /* DFBC4 801494C4 D4261258 */ ldc1 $f6, %lo(D_80151258)($at) /* DFBC8 801494C8 46000021 */ cvt.d.s $f0, $f0 /* DFBCC 801494CC 46260002 */ mul.d $f0, $f0, $f6 /* DFBD0 801494D0 00000000 */ nop /* DFBD4 801494D4 46200120 */ cvt.s.d $f4, $f0 /* DFBD8 801494D8 3C01402E */ lui $at, (0x402E0000 >> 16) /* DFBDC 801494DC 44810800 */ mtc1 $at, $f1 /* DFBE0 801494E0 44800000 */ mtc1 $zero, $f0 /* DFBE4 801494E4 460020A1 */ cvt.d.s $f2, $f4 /* DFBE8 801494E8 4620103C */ c.lt.d $f2, $f0 /* DFBEC 801494EC 00000000 */ nop /* DFBF0 801494F0 45000005 */ bc1f .L80149508 /* DFBF4 801494F4 00000000 */ nop /* DFBF8 801494F8 3C014170 */ lui $at, (0x41700000 >> 16) /* DFBFC 801494FC 44812000 */ mtc1 $at, $f4 /* DFC00 80149500 08052549 */ j .L80149524 /* DFC04 80149504 00000000 */ nop .L80149508: /* DFC08 80149508 4622303C */ c.lt.d $f6, $f2 /* DFC0C 8014950C 00000000 */ nop /* DFC10 80149510 45000004 */ bc1f .L80149524 /* DFC14 80149514 00000000 */ nop /* DFC18 80149518 3C0142FE */ lui $at, (0x42FE0000 >> 16) /* DFC1C 8014951C 44812000 */ mtc1 $at, $f4 /* DFC20 80149520 00000000 */ nop .L80149524: /* DFC24 80149524 4600220D */ trunc.w.s $f8, $f4 /* DFC28 80149528 44024000 */ mfc1 $v0, $f8 /* DFC2C 8014952C 00000000 */ nop /* DFC30 80149530 A6220000 */ sh $v0, 0x0($s1) /* DFC34 80149534 C7A00020 */ lwc1 $f0, 0x20($sp) /* DFC38 80149538 46800020 */ cvt.s.w $f0, $f0 /* DFC3C 8014953C 3C014064 */ lui $at, (0x40640000 >> 16) /* DFC40 80149540 44811800 */ mtc1 $at, $f3 /* DFC44 80149544 44801000 */ mtc1 $zero, $f2 /* DFC48 80149548 46000021 */ cvt.d.s $f0, $f0 /* DFC4C 8014954C 46220001 */ sub.d $f0, $f0, $f2 /* DFC50 80149550 3C018015 */ lui $at, %hi(D_80151260) /* DFC54 80149554 D4221260 */ ldc1 $f2, %lo(D_80151260)($at) /* DFC58 80149558 3C014050 */ lui $at, (0x40500000 >> 16) /* DFC5C 8014955C 44812800 */ mtc1 $at, $f5 /* DFC60 80149560 44802000 */ mtc1 $zero, $f4 /* DFC64 80149564 46220003 */ div.d $f0, $f0, $f2 /* DFC68 80149568 46240000 */ add.d $f0, $f0, $f4 /* DFC6C 8014956C 46200120 */ cvt.s.d $f4, $f0 /* DFC70 80149570 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* DFC74 80149574 44810800 */ mtc1 $at, $f1 /* DFC78 80149578 44800000 */ mtc1 $zero, $f0 /* DFC7C 8014957C 460020A1 */ cvt.d.s $f2, $f4 /* DFC80 80149580 4620103C */ c.lt.d $f2, $f0 /* DFC84 80149584 00000000 */ nop /* DFC88 80149588 45000005 */ bc1f .L801495A0 /* DFC8C 8014958C 00000000 */ nop /* DFC90 80149590 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DFC94 80149594 44812000 */ mtc1 $at, $f4 /* DFC98 80149598 08052571 */ j .L801495C4 /* DFC9C 8014959C 00000000 */ nop .L801495A0: /* DFCA0 801495A0 3C018015 */ lui $at, %hi(D_80151268) /* DFCA4 801495A4 D4201268 */ ldc1 $f0, %lo(D_80151268)($at) /* DFCA8 801495A8 4622003C */ c.lt.d $f0, $f2 /* DFCAC 801495AC 00000000 */ nop /* DFCB0 801495B0 45000004 */ bc1f .L801495C4 /* DFCB4 801495B4 00000000 */ nop /* DFCB8 801495B8 3C0142FE */ lui $at, (0x42FE0000 >> 16) /* DFCBC 801495BC 44812000 */ mtc1 $at, $f4 /* DFCC0 801495C0 00000000 */ nop .L801495C4: /* DFCC4 801495C4 4600220D */ trunc.w.s $f8, $f4 /* DFCC8 801495C8 44024000 */ mfc1 $v0, $f8 /* DFCCC 801495CC 00000000 */ nop /* DFCD0 801495D0 A6420000 */ sh $v0, 0x0($s2) .L801495D4: /* DFCD4 801495D4 8FBF003C */ lw $ra, 0x3C($sp) /* DFCD8 801495D8 8FB20038 */ lw $s2, 0x38($sp) /* DFCDC 801495DC 8FB10034 */ lw $s1, 0x34($sp) /* DFCE0 801495E0 8FB00030 */ lw $s0, 0x30($sp) /* DFCE4 801495E4 D7BC0060 */ ldc1 $f28, 0x60($sp) /* DFCE8 801495E8 D7BA0058 */ ldc1 $f26, 0x58($sp) /* DFCEC 801495EC D7B80050 */ ldc1 $f24, 0x50($sp) /* DFCF0 801495F0 D7B60048 */ ldc1 $f22, 0x48($sp) /* DFCF4 801495F4 D7B40040 */ ldc1 $f20, 0x40($sp) /* DFCF8 801495F8 03E00008 */ jr $ra /* DFCFC 801495FC 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags) { s32 screenX, screenY, screenZ; f32 volAmtOffsetX, volAmtDeltaY, volAmtDepth; f32 offsetX, offsetY, depth; f32 volTemp, panTemp; s32 phi_v0; get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); if (screenX > 5000 || screenX < -5000 || screenY > 5000 || screenY < -5000) { *volume = -1; *pan = 0; return; } if (flags & SOUND_PARAM_CLIP_OFFSCREEN_ANY) { if (screenX < -30 || screenX > SCREEN_WIDTH + 30 || screenY < -30 || screenY > SCREEN_HEIGHT + 30) { *volume = -1; *pan = 0; return; } } else if (flags & SOUND_PARAM_CLIP_OFFSCREEN_X) { if (screenX < -30 || screenX > SCREEN_WIDTH + 30) { *volume = -1; *pan = 0; return; } } else if (flags & SOUND_PARAM_CLIP_OFFSCREEN_Y) { if (screenY < -30 || screenY > SCREEN_HEIGHT + 30) { *volume = -1; *pan = 0; return; } } offsetX = abs((SCREEN_WIDTH / 2) - screenX) - 145; if (offsetX < 0.0) { offsetX = 0.0f; } volAmtOffsetX = update_lerp(EASING_LINEAR, 1.0f, 0.0f, offsetX, 200); if (volAmtOffsetX < 0.0) { volAmtOffsetX = 0.0f; } offsetY = abs((SCREEN_HEIGHT / 2) - screenY) - 105; if (offsetY < 0.0) { offsetY = 0.0f; } volAmtDeltaY = update_lerp(EASING_LINEAR, 1.0f, 0.0f, offsetY, 130); if (volAmtDeltaY < 0.0) { volAmtDeltaY = 0.0f; } depth = screenZ - 5550.0; if (depth < 0.0) { depth = 0.0f; } volAmtDepth = update_lerp(EASING_LINEAR, 1.0f, 0.0f, depth, 250); if (volAmtDepth < 0.0) { volAmtDepth = 0.0f; } volTemp = (volAmtOffsetX * volAmtDeltaY * volAmtDepth) * 127.0; if (volTemp < 15.0) { volTemp = 15.0f; } else if (volTemp > 127.0) { volTemp = 127.0f; } *volume = volTemp; panTemp = (((f32) screenX - (SCREEN_WIDTH / 2.0)) / 3.6) + 64.0; if (panTemp < 1.0) { panTemp = 1.0f; } else if (panTemp > 127.0) { panTemp = 127.0f; } *pan = panTemp; }
### RAW ASSEMBLY INSTRUCTIONS: glabel star_main /* 331940 E001E000 27BDFF98 */ addiu $sp, $sp, -0x68 /* 331944 E001E004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 331948 E001E008 4485A000 */ mtc1 $a1, $f20 /* 33194C E001E00C F7B60040 */ sdc1 $f22, 0x40($sp) /* 331950 E001E010 4486B000 */ mtc1 $a2, $f22 /* 331954 E001E014 AFB00028 */ sw $s0, 0x28($sp) /* 331958 E001E018 0080802D */ daddu $s0, $a0, $zero /* 33195C E001E01C F7BA0050 */ sdc1 $f26, 0x50($sp) /* 331960 E001E020 4487D000 */ mtc1 $a3, $f26 /* 331964 E001E024 27A40010 */ addiu $a0, $sp, 0x10 /* 331968 E001E028 F7BE0060 */ sdc1 $f30, 0x60($sp) /* 33196C E001E02C C7BE0084 */ lwc1 $f30, 0x84($sp) /* 331970 E001E030 3C02E002 */ lui $v0, %hi(star_init) /* 331974 E001E034 2442E370 */ addiu $v0, $v0, %lo(star_init) /* 331978 E001E038 AFA20018 */ sw $v0, 0x18($sp) /* 33197C E001E03C 3C02E002 */ lui $v0, %hi(star_update) /* 331980 E001E040 2442E378 */ addiu $v0, $v0, %lo(star_update) /* 331984 E001E044 AFA2001C */ sw $v0, 0x1C($sp) /* 331988 E001E048 3C02E002 */ lui $v0, %hi(star_render) /* 33198C E001E04C 2442E6E8 */ addiu $v0, $v0, %lo(star_render) /* 331990 E001E050 AFA20020 */ sw $v0, 0x20($sp) /* 331994 E001E054 2402000F */ addiu $v0, $zero, 0xF /* 331998 E001E058 AFBF0034 */ sw $ra, 0x34($sp) /* 33199C E001E05C AFB20030 */ sw $s2, 0x30($sp) /* 3319A0 E001E060 AFB1002C */ sw $s1, 0x2C($sp) /* 3319A4 E001E064 F7BC0058 */ sdc1 $f28, 0x58($sp) /* 3319A8 E001E068 F7B80048 */ sdc1 $f24, 0x48($sp) /* 3319AC E001E06C AFA00010 */ sw $zero, 0x10($sp) /* 3319B0 E001E070 AFA00024 */ sw $zero, 0x24($sp) /* 3319B4 E001E074 0C080124 */ jal shim_create_effect_instance /* 3319B8 E001E078 AFA20014 */ sw $v0, 0x14($sp) /* 3319BC E001E07C 24040250 */ addiu $a0, $zero, 0x250 /* 3319C0 E001E080 24030001 */ addiu $v1, $zero, 0x1 /* 3319C4 E001E084 0040902D */ daddu $s2, $v0, $zero /* 3319C8 E001E088 0C08012C */ jal shim_general_heap_malloc /* 3319CC E001E08C AE430008 */ sw $v1, 0x8($s2) /* 3319D0 E001E090 0040882D */ daddu $s1, $v0, $zero /* 3319D4 E001E094 16200003 */ bnez $s1, .LE001E0A4 /* 3319D8 E001E098 AE42000C */ sw $v0, 0xC($s2) .LE001E09C: /* 3319DC E001E09C 08007827 */ j .LE001E09C /* 3319E0 E001E0A0 00000000 */ nop .LE001E0A4: /* 3319E4 E001E0A4 24020001 */ addiu $v0, $zero, 0x1 /* 3319E8 E001E0A8 AE220000 */ sw $v0, 0x0($s1) /* 3319EC E001E0AC 24020003 */ addiu $v0, $zero, 0x3 /* 3319F0 E001E0B0 E6340004 */ swc1 $f20, 0x4($s1) /* 3319F4 E001E0B4 E6360008 */ swc1 $f22, 0x8($s1) /* 3319F8 E001E0B8 E63A000C */ swc1 $f26, 0xC($s1) /* 3319FC E001E0BC AE20001C */ sw $zero, 0x1C($s1) /* 331A00 E001E0C0 AE200024 */ sw $zero, 0x24($s1) /* 331A04 E001E0C4 AE200028 */ sw $zero, 0x28($s1) /* 331A08 E001E0C8 16020011 */ bne $s0, $v0, .LE001E110 /* 331A0C E001E0CC AE300038 */ sw $s0, 0x38($s1) /* 331A10 E001E0D0 3C013E4C */ lui $at, (0x3E4CCCCD >> 16) /* 331A14 E001E0D4 3421CCCD */ ori $at, $at, (0x3E4CCCCD & 0xFFFF) /* 331A18 E001E0D8 44810000 */ mtc1 $at, $f0 /* 331A1C E001E0DC 240400FF */ addiu $a0, $zero, 0xFF /* 331A20 E001E0E0 0C080138 */ jal shim_rand_int /* 331A24 E001E0E4 E6200240 */ swc1 $f0, 0x240($s1) /* 331A28 E001E0E8 241000FF */ addiu $s0, $zero, 0xFF /* 331A2C E001E0EC 02022023 */ subu $a0, $s0, $v0 /* 331A30 E001E0F0 0C080138 */ jal shim_rand_int /* 331A34 E001E0F4 AE220244 */ sw $v0, 0x244($s1) /* 331A38 E001E0F8 8E230244 */ lw $v1, 0x244($s1) /* 331A3C E001E0FC 02028023 */ subu $s0, $s0, $v0 /* 331A40 E001E100 AE220248 */ sw $v0, 0x248($s1) /* 331A44 E001E104 02038023 */ subu $s0, $s0, $v1 /* 331A48 E001E108 0800784D */ j .LE001E134 /* 331A4C E001E10C AE30024C */ sw $s0, 0x24C($s1) .LE001E110: /* 331A50 E001E110 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 331A54 E001E114 44810000 */ mtc1 $at, $f0 /* 331A58 E001E118 240200D2 */ addiu $v0, $zero, 0xD2 /* 331A5C E001E11C AE220244 */ sw $v0, 0x244($s1) /* 331A60 E001E120 240200BA */ addiu $v0, $zero, 0xBA /* 331A64 E001E124 AE220248 */ sw $v0, 0x248($s1) /* 331A68 E001E128 2402005A */ addiu $v0, $zero, 0x5A /* 331A6C E001E12C AE22024C */ sw $v0, 0x24C($s1) /* 331A70 E001E130 E6200240 */ swc1 $f0, 0x240($s1) .LE001E134: /* 331A74 E001E134 C7A00078 */ lwc1 $f0, 0x78($sp) /* 331A78 E001E138 46140601 */ sub.s $f24, $f0, $f20 /* 331A7C E001E13C 4618C082 */ mul.s $f2, $f24, $f24 /* 331A80 E001E140 00000000 */ nop /* 331A84 E001E144 C7A0007C */ lwc1 $f0, 0x7C($sp) /* 331A88 E001E148 46160581 */ sub.s $f22, $f0, $f22 /* 331A8C E001E14C 4616B102 */ mul.s $f4, $f22, $f22 /* 331A90 E001E150 00000000 */ nop /* 331A94 E001E154 C7A00080 */ lwc1 $f0, 0x80($sp) /* 331A98 E001E158 461A0501 */ sub.s $f20, $f0, $f26 /* 331A9C E001E15C 4614A002 */ mul.s $f0, $f20, $f20 /* 331AA0 E001E160 00000000 */ nop /* 331AA4 E001E164 46041080 */ add.s $f2, $f2, $f4 /* 331AA8 E001E168 46001680 */ add.s $f26, $f2, $f0 /* 331AAC E001E16C 4480E000 */ mtc1 $zero, $f28 /* 331AB0 E001E170 00000000 */ nop /* 331AB4 E001E174 461CD032 */ c.eq.s $f26, $f28 /* 331AB8 E001E178 00000000 */ nop /* 331ABC E001E17C 45010005 */ bc1t .LE001E194 /* 331AC0 E001E180 4600D106 */ mov.s $f4, $f26 /* 331AC4 E001E184 0C080154 */ jal shim_sqrtf /* 331AC8 E001E188 4600D306 */ mov.s $f12, $f26 /* 331ACC E001E18C 46000686 */ mov.s $f26, $f0 /* 331AD0 E001E190 461AF103 */ div.s $f4, $f30, $f26 .LE001E194: /* 331AD4 E001E194 4604C002 */ mul.s $f0, $f24, $f4 /* 331AD8 E001E198 00000000 */ nop /* 331ADC E001E19C 4604B082 */ mul.s $f2, $f22, $f4 /* 331AE0 E001E1A0 00000000 */ nop /* 331AE4 E001E1A4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 331AE8 E001E1A8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 331AEC E001E1AC 4604A102 */ mul.s $f4, $f20, $f4 /* 331AF0 E001E1B0 00000000 */ nop /* 331AF4 E001E1B4 00031080 */ sll $v0, $v1, 2 /* 331AF8 E001E1B8 00431021 */ addu $v0, $v0, $v1 /* 331AFC E001E1BC 00021080 */ sll $v0, $v0, 2 /* 331B00 E001E1C0 00431023 */ subu $v0, $v0, $v1 /* 331B04 E001E1C4 000218C0 */ sll $v1, $v0, 3 /* 331B08 E001E1C8 00431021 */ addu $v0, $v0, $v1 /* 331B0C E001E1CC 000210C0 */ sll $v0, $v0, 3 /* 331B10 E001E1D0 E6200010 */ swc1 $f0, 0x10($s1) /* 331B14 E001E1D4 E6220014 */ swc1 $f2, 0x14($s1) /* 331B18 E001E1D8 E6240018 */ swc1 $f4, 0x18($s1) /* 331B1C E001E1DC 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 331B20 E001E1E0 00220821 */ addu $at, $at, $v0 /* 331B24 E001E1E4 C4341DEC */ lwc1 $f20, %lo(gCameras + 0x6C)($at) /* 331B28 E001E1E8 0C080144 */ jal shim_cos_deg /* 331B2C E001E1EC 4600A306 */ mov.s $f12, $f20 /* 331B30 E001E1F0 4600A306 */ mov.s $f12, $f20 /* 331B34 E001E1F4 0C080140 */ jal shim_sin_deg /* 331B38 E001E1F8 46000587 */ neg.s $f22, $f0 /* 331B3C E001E1FC C6240010 */ lwc1 $f4, 0x10($s1) /* 331B40 E001E200 4604B102 */ mul.s $f4, $f22, $f4 /* 331B44 E001E204 00000000 */ nop /* 331B48 E001E208 C6220018 */ lwc1 $f2, 0x18($s1) /* 331B4C E001E20C 46000507 */ neg.s $f20, $f0 /* 331B50 E001E210 4602A082 */ mul.s $f2, $f20, $f2 /* 331B54 E001E214 00000000 */ nop /* 331B58 E001E218 46042102 */ mul.s $f4, $f4, $f4 /* 331B5C E001E21C 00000000 */ nop /* 331B60 E001E220 46021082 */ mul.s $f2, $f2, $f2 /* 331B64 E001E224 00000000 */ nop /* 331B68 E001E228 46022300 */ add.s $f12, $f4, $f2 /* 331B6C E001E22C 461C6032 */ c.eq.s $f12, $f28 /* 331B70 E001E230 00000000 */ nop /* 331B74 E001E234 45010004 */ bc1t .LE001E248 /* 331B78 E001E238 00000000 */ nop /* 331B7C E001E23C 0C080154 */ jal shim_sqrtf /* 331B80 E001E240 00000000 */ nop /* 331B84 E001E244 46000306 */ mov.s $f12, $f0 .LE001E248: /* 331B88 E001E248 C6220010 */ lwc1 $f2, 0x10($s1) /* 331B8C E001E24C 4602B082 */ mul.s $f2, $f22, $f2 /* 331B90 E001E250 00000000 */ nop /* 331B94 E001E254 C6200018 */ lwc1 $f0, 0x18($s1) /* 331B98 E001E258 4600A002 */ mul.s $f0, $f20, $f0 /* 331B9C E001E25C 00000000 */ nop /* 331BA0 E001E260 46001080 */ add.s $f2, $f2, $f0 /* 331BA4 E001E264 461C103C */ c.lt.s $f2, $f28 /* 331BA8 E001E268 00000000 */ nop /* 331BAC E001E26C 45000005 */ bc1f .LE001E284 /* 331BB0 E001E270 00000000 */ nop /* 331BB4 E001E274 3C01C1A0 */ lui $at, (0xC1A00000 >> 16) /* 331BB8 E001E278 44810000 */ mtc1 $at, $f0 /* 331BBC E001E27C 080078A4 */ j .LE001E290 /* 331BC0 E001E280 46006307 */ neg.s $f12, $f12 .LE001E284: /* 331BC4 E001E284 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 331BC8 E001E288 44810000 */ mtc1 $at, $f0 /* 331BCC E001E28C 00000000 */ nop .LE001E290: /* 331BD0 E001E290 E620002C */ swc1 $f0, 0x2C($s1) /* 331BD4 E001E294 46006507 */ neg.s $f20, $f12 /* 331BD8 E001E298 4407A000 */ mfc1 $a3, $f20 /* 331BDC E001E29C C6200014 */ lwc1 $f0, 0x14($s1) /* 331BE0 E001E2A0 44806000 */ mtc1 $zero, $f12 /* 331BE4 E001E2A4 46000007 */ neg.s $f0, $f0 /* 331BE8 E001E2A8 44060000 */ mfc1 $a2, $f0 /* 331BEC E001E2AC 0C080148 */ jal shim_atan2 /* 331BF0 E001E2B0 46006386 */ mov.s $f14, $f12 /* 331BF4 E001E2B4 461ED083 */ div.s $f2, $f26, $f30 /* 331BF8 E001E2B8 4600118D */ trunc.w.s $f6, $f2 /* 331BFC E001E2BC E6260030 */ swc1 $f6, 0x30($s1) /* 331C00 E001E2C0 26300040 */ addiu $s0, $s1, 0x40 /* 331C04 E001E2C4 8E260008 */ lw $a2, 0x8($s1) /* 331C08 E001E2C8 8E27000C */ lw $a3, 0xC($s1) /* 331C0C E001E2CC 8E250004 */ lw $a1, 0x4($s1) /* 331C10 E001E2D0 0200202D */ daddu $a0, $s0, $zero /* 331C14 E001E2D4 E6200024 */ swc1 $f0, 0x24($s1) /* 331C18 E001E2D8 E6200020 */ swc1 $f0, 0x20($s1) /* 331C1C E001E2DC 0C08010C */ jal shim_guTranslate /* 331C20 E001E2E0 E6340034 */ swc1 $f20, 0x34($s1) /* 331C24 E001E2E4 24050001 */ addiu $a1, $zero, 0x1 /* 331C28 E001E2E8 26260080 */ addiu $a2, $s1, 0x80 /* 331C2C E001E2EC 0200202D */ daddu $a0, $s0, $zero .LE001E2F0: /* 331C30 E001E2F0 24830040 */ addiu $v1, $a0, 0x40 /* 331C34 E001E2F4 0200102D */ daddu $v0, $s0, $zero .LE001E2F8: /* 331C38 E001E2F8 8C490000 */ lw $t1, 0x0($v0) /* 331C3C E001E2FC 8C4A0004 */ lw $t2, 0x4($v0) /* 331C40 E001E300 8C4B0008 */ lw $t3, 0x8($v0) /* 331C44 E001E304 8C48000C */ lw $t0, 0xC($v0) /* 331C48 E001E308 AC690000 */ sw $t1, 0x0($v1) /* 331C4C E001E30C AC6A0004 */ sw $t2, 0x4($v1) /* 331C50 E001E310 AC6B0008 */ sw $t3, 0x8($v1) /* 331C54 E001E314 AC68000C */ sw $t0, 0xC($v1) /* 331C58 E001E318 24420010 */ addiu $v0, $v0, 0x10 /* 331C5C E001E31C 1446FFF6 */ bne $v0, $a2, .LE001E2F8 /* 331C60 E001E320 24630010 */ addiu $v1, $v1, 0x10 /* 331C64 E001E324 24A50001 */ addiu $a1, $a1, 0x1 /* 331C68 E001E328 28A20008 */ slti $v0, $a1, 0x8 /* 331C6C E001E32C 1440FFF0 */ bnez $v0, .LE001E2F0 /* 331C70 E001E330 24840040 */ addiu $a0, $a0, 0x40 /* 331C74 E001E334 2402FFFF */ addiu $v0, $zero, -0x1 /* 331C78 E001E338 AE22003C */ sw $v0, 0x3C($s1) /* 331C7C E001E33C 0240102D */ daddu $v0, $s2, $zero /* 331C80 E001E340 8FBF0034 */ lw $ra, 0x34($sp) /* 331C84 E001E344 8FB20030 */ lw $s2, 0x30($sp) /* 331C88 E001E348 8FB1002C */ lw $s1, 0x2C($sp) /* 331C8C E001E34C 8FB00028 */ lw $s0, 0x28($sp) /* 331C90 E001E350 D7BE0060 */ ldc1 $f30, 0x60($sp) /* 331C94 E001E354 D7BC0058 */ ldc1 $f28, 0x58($sp) /* 331C98 E001E358 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 331C9C E001E35C D7B80048 */ ldc1 $f24, 0x48($sp) /* 331CA0 E001E360 D7B60040 */ ldc1 $f22, 0x40($sp) /* 331CA4 E001E364 D7B40038 */ ldc1 $f20, 0x38($sp) /* 331CA8 E001E368 03E00008 */ jr $ra /* 331CAC E001E36C 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: EffectInstance* star_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { EffectBlueprint bp; StarFXData* part; EffectInstance* effect; s32 numParts = 1; s32 i; f32 temp_f12; f32 temp_f20; f32 currentYaw; f32 sinYaw; f32 cosYaw; f32 temp_f22; f32 temp_f24; f32 temp_f26; f32 temp_f2; f32 temp_f4; s32 temp_s0; f32 phi_f26; bp.unk_00 = 0; bp.init = star_init; bp.update = star_update; bp.renderWorld = star_render; bp.renderUI = NULL; bp.effectID = EFFECT_STAR; effect = shim_create_effect_instance(&bp); effect->numParts = 1; part = effect->data.star = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.star != NULL); part->unk_00 = 1; part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; part->unk_1C = 0; part->unk_24 = 0.0f; part->unk_28 = 0; part->unk_38 = arg0; if (arg0 == 3) { part->unk_240 = 0.2f; part->unk_244 = shim_rand_int(255); part->unk_248 = shim_rand_int(255 - part->unk_244); temp_s0 = 255 - part->unk_248; part->unk_24C = temp_s0 - part->unk_244; } else { part->unk_244 = 210; part->unk_248 = 186; part->unk_24C = 90; part->unk_240 = 0.5f; } temp_f24 = arg4 - arg1; temp_f22 = arg5 - arg2; temp_f20 = arg6 - arg3; temp_f26 = SQ(temp_f24) + SQ(temp_f22) + SQ(temp_f20); phi_f26 = temp_f26; if (temp_f26 != 0.0f) { phi_f26 = shim_sqrtf(temp_f26); temp_f26 = arg7 / phi_f26; } part->unk_10 = temp_f24 * temp_f26; part->unk_14 = temp_f22 * temp_f26; part->unk_18 = temp_f20 * temp_f26; currentYaw = gCameras[gCurrentCameraID].currentYaw; cosYaw = -shim_cos_deg(currentYaw); sinYaw = -shim_sin_deg(currentYaw); temp_f4 = cosYaw * part->unk_10; temp_f2 = sinYaw * part->unk_18; temp_f12 = SQ(temp_f4) + SQ(temp_f2); if (temp_f12 != 0.0f) { temp_f12 = shim_sqrtf(temp_f12); } if ((cosYaw * part->unk_10) + (sinYaw * part->unk_18) < 0.0f) { temp_f12 = -temp_f12; part->unk_2C = -20.0f; } else { part->unk_2C = 20.0f; } part->unk_20 = part->unk_24 = shim_atan2(0.0f, 0.0f, -part->unk_14, -temp_f12); part->unk_30 = phi_f26 / arg7; part->unk_34 = -temp_f12; shim_guTranslate(part->unk_40, part->unk_04, part->unk_08, part->unk_0C); for (i = 1; i < ARRAY_COUNT(part->unk_40); i++) { part->unk_40[i] = part->unk_40[0]; } part->unk_3C = -1; return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel shockwave_main /* 3584C0 E004A000 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 3584C4 E004A004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 3584C8 E004A008 4485A000 */ mtc1 $a1, $f20 /* 3584CC E004A00C F7B60048 */ sdc1 $f22, 0x48($sp) /* 3584D0 E004A010 4486B000 */ mtc1 $a2, $f22 /* 3584D4 E004A014 AFB20030 */ sw $s2, 0x30($sp) /* 3584D8 E004A018 0080902D */ daddu $s2, $a0, $zero /* 3584DC E004A01C F7B80050 */ sdc1 $f24, 0x50($sp) /* 3584E0 E004A020 4487C000 */ mtc1 $a3, $f24 /* 3584E4 E004A024 27A40010 */ addiu $a0, $sp, 0x10 /* 3584E8 E004A028 F7BA0058 */ sdc1 $f26, 0x58($sp) /* 3584EC E004A02C 4480D000 */ mtc1 $zero, $f26 /* 3584F0 E004A030 24020001 */ addiu $v0, $zero, 0x1 /* 3584F4 E004A034 AFBF0038 */ sw $ra, 0x38($sp) /* 3584F8 E004A038 AFB30034 */ sw $s3, 0x34($sp) /* 3584FC E004A03C AFB1002C */ sw $s1, 0x2C($sp) /* 358500 E004A040 1242000E */ beq $s2, $v0, .LE004A07C /* 358504 E004A044 AFB00028 */ sw $s0, 0x28($sp) /* 358508 E004A048 2A420002 */ slti $v0, $s2, 0x2 /* 35850C E004A04C 10400005 */ beqz $v0, .LE004A064 /* 358510 E004A050 24020002 */ addiu $v0, $zero, 0x2 /* 358514 E004A054 12400007 */ beqz $s2, .LE004A074 /* 358518 E004A058 24120005 */ addiu $s2, $zero, 0x5 /* 35851C E004A05C 08012823 */ j .LE004A08C /* 358520 E004A060 24020001 */ addiu $v0, $zero, 0x1 .LE004A064: /* 358524 E004A064 12420007 */ beq $s2, $v0, .LE004A084 /* 358528 E004A068 24120005 */ addiu $s2, $zero, 0x5 /* 35852C E004A06C 08012823 */ j .LE004A08C /* 358530 E004A070 24020001 */ addiu $v0, $zero, 0x1 .LE004A074: /* 358534 E004A074 08012822 */ j .LE004A088 /* 358538 E004A078 24120003 */ addiu $s2, $zero, 0x3 .LE004A07C: /* 35853C E004A07C 08012822 */ j .LE004A088 /* 358540 E004A080 24120002 */ addiu $s2, $zero, 0x2 .LE004A084: /* 358544 E004A084 24120004 */ addiu $s2, $zero, 0x4 .LE004A088: /* 358548 E004A088 24020001 */ addiu $v0, $zero, 0x1 .LE004A08C: /* 35854C E004A08C 1242000D */ beq $s2, $v0, .LE004A0C4 /* 358550 E004A090 2A420002 */ slti $v0, $s2, 0x2 /* 358554 E004A094 10400005 */ beqz $v0, .LE004A0AC /* 358558 E004A098 24020002 */ addiu $v0, $zero, 0x2 /* 35855C E004A09C 1240000B */ beqz $s2, .LE004A0CC /* 358560 E004A0A0 24130002 */ addiu $s3, $zero, 0x2 /* 358564 E004A0A4 08012835 */ j .LE004A0D4 /* 358568 E004A0A8 26730001 */ addiu $s3, $s3, 0x1 .LE004A0AC: /* 35856C E004A0AC 12420007 */ beq $s2, $v0, .LE004A0CC /* 358570 E004A0B0 24020005 */ addiu $v0, $zero, 0x5 /* 358574 E004A0B4 12420005 */ beq $s2, $v0, .LE004A0CC /* 358578 E004A0B8 24130002 */ addiu $s3, $zero, 0x2 /* 35857C E004A0BC 08012835 */ j .LE004A0D4 /* 358580 E004A0C0 26730001 */ addiu $s3, $s3, 0x1 .LE004A0C4: /* 358584 E004A0C4 08012834 */ j .LE004A0D0 /* 358588 E004A0C8 24130001 */ addiu $s3, $zero, 0x1 .LE004A0CC: /* 35858C E004A0CC 24130003 */ addiu $s3, $zero, 0x3 .LE004A0D0: /* 358590 E004A0D0 26730001 */ addiu $s3, $s3, 0x1 .LE004A0D4: /* 358594 E004A0D4 3C02E005 */ lui $v0, %hi(shockwave_init) /* 358598 E004A0D8 2442A328 */ addiu $v0, $v0, %lo(shockwave_init) /* 35859C E004A0DC AC820008 */ sw $v0, 0x8($a0) /* 3585A0 E004A0E0 3C02E005 */ lui $v0, %hi(shockwave_update) /* 3585A4 E004A0E4 2442A330 */ addiu $v0, $v0, %lo(shockwave_update) /* 3585A8 E004A0E8 AC82000C */ sw $v0, 0xC($a0) /* 3585AC E004A0EC 3C02E005 */ lui $v0, %hi(shockwave_render) /* 3585B0 E004A0F0 2442A748 */ addiu $v0, $v0, %lo(shockwave_render) /* 3585B4 E004A0F4 AC820010 */ sw $v0, 0x10($a0) /* 3585B8 E004A0F8 24020025 */ addiu $v0, $zero, 0x25 /* 3585BC E004A0FC AC800000 */ sw $zero, 0x0($a0) /* 3585C0 E004A100 AC800014 */ sw $zero, 0x14($a0) /* 3585C4 E004A104 0C080124 */ jal shim_create_effect_instance /* 3585C8 E004A108 AC820004 */ sw $v0, 0x4($a0) /* 3585CC E004A10C 00132040 */ sll $a0, $s3, 1 /* 3585D0 E004A110 00932021 */ addu $a0, $a0, $s3 /* 3585D4 E004A114 00042080 */ sll $a0, $a0, 2 /* 3585D8 E004A118 00932023 */ subu $a0, $a0, $s3 /* 3585DC E004A11C 000420C0 */ sll $a0, $a0, 3 /* 3585E0 E004A120 0040802D */ daddu $s0, $v0, $zero /* 3585E4 E004A124 0C08012C */ jal shim_general_heap_malloc /* 3585E8 E004A128 AE130008 */ sw $s3, 0x8($s0) /* 3585EC E004A12C 0040882D */ daddu $s1, $v0, $zero /* 3585F0 E004A130 16200003 */ bnez $s1, .LE004A140 /* 3585F4 E004A134 AE11000C */ sw $s1, 0xC($s0) .LE004A138: /* 3585F8 E004A138 0801284E */ j .LE004A138 /* 3585FC E004A13C 00000000 */ nop .LE004A140: /* 358600 E004A140 0220202D */ daddu $a0, $s1, $zero /* 358604 E004A144 00132840 */ sll $a1, $s3, 1 /* 358608 E004A148 00B32821 */ addu $a1, $a1, $s3 /* 35860C E004A14C 00052880 */ sll $a1, $a1, 2 /* 358610 E004A150 00B32823 */ subu $a1, $a1, $s3 /* 358614 E004A154 0C080130 */ jal shim_mem_clear /* 358618 E004A158 000528C0 */ sll $a1, $a1, 3 /* 35861C E004A15C 2A420002 */ slti $v0, $s2, 0x2 /* 358620 E004A160 14400002 */ bnez $v0, .LE004A16C /* 358624 E004A164 2402001E */ addiu $v0, $zero, 0x1E /* 358628 E004A168 2402003C */ addiu $v0, $zero, 0x3C .LE004A16C: /* 35862C E004A16C AE220028 */ sw $v0, 0x28($s1) /* 358630 E004A170 240200FF */ addiu $v0, $zero, 0xFF /* 358634 E004A174 AE220038 */ sw $v0, 0x38($s1) /* 358638 E004A178 2E420006 */ sltiu $v0, $s2, 0x6 /* 35863C E004A17C AE20002C */ sw $zero, 0x2C($s1) /* 358640 E004A180 A6320000 */ sh $s2, 0x0($s1) /* 358644 E004A184 E6340004 */ swc1 $f20, 0x4($s1) /* 358648 E004A188 E6360008 */ swc1 $f22, 0x8($s1) /* 35864C E004A18C 10400033 */ beqz $v0, .LE004A25C /* 358650 E004A190 E638000C */ swc1 $f24, 0xC($s1) /* 358654 E004A194 00121080 */ sll $v0, $s2, 2 /* 358658 E004A198 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 35865C E004A19C 00220821 */ addu $at, $at, $v0 /* 358660 E004A1A0 8C22AE80 */ lw $v0, -0x5180($at) /* 358664 E004A1A4 00400008 */ jr $v0 /* 358668 E004A1A8 00000000 */ nop /* 35866C E004A1AC 240300FF */ addiu $v1, $zero, 0xFF /* 358670 E004A1B0 2402007A */ addiu $v0, $zero, 0x7A /* 358674 E004A1B4 A2220052 */ sb $v0, 0x52($s1) /* 358678 E004A1B8 240200F0 */ addiu $v0, $zero, 0xF0 /* 35867C E004A1BC A2220053 */ sb $v0, 0x53($s1) /* 358680 E004A1C0 240200FA */ addiu $v0, $zero, 0xFA /* 358684 E004A1C4 A2200050 */ sb $zero, 0x50($s1) /* 358688 E004A1C8 A2230051 */ sb $v1, 0x51($s1) /* 35868C E004A1CC 080128A4 */ j .LE004A290 /* 358690 E004A1D0 A2230054 */ sb $v1, 0x54($s1) /* 358694 E004A1D4 2402007D */ addiu $v0, $zero, 0x7D /* 358698 E004A1D8 A2220050 */ sb $v0, 0x50($s1) /* 35869C E004A1DC 24020078 */ addiu $v0, $zero, 0x78 /* 3586A0 E004A1E0 A2220051 */ sb $v0, 0x51($s1) /* 3586A4 E004A1E4 24020064 */ addiu $v0, $zero, 0x64 /* 3586A8 E004A1E8 A2220052 */ sb $v0, 0x52($s1) /* 3586AC E004A1EC 240200FF */ addiu $v0, $zero, 0xFF /* 3586B0 E004A1F0 A2220053 */ sb $v0, 0x53($s1) /* 3586B4 E004A1F4 A2220054 */ sb $v0, 0x54($s1) /* 3586B8 E004A1F8 080128A4 */ j .LE004A290 /* 3586BC E004A1FC 240200F0 */ addiu $v0, $zero, 0xF0 /* 3586C0 E004A200 240200DC */ addiu $v0, $zero, 0xDC /* 3586C4 E004A204 A2220050 */ sb $v0, 0x50($s1) /* 3586C8 E004A208 240200D2 */ addiu $v0, $zero, 0xD2 /* 3586CC E004A20C A2220051 */ sb $v0, 0x51($s1) /* 3586D0 E004A210 240200C8 */ addiu $v0, $zero, 0xC8 /* 3586D4 E004A214 A2220052 */ sb $v0, 0x52($s1) /* 3586D8 E004A218 240200FF */ addiu $v0, $zero, 0xFF /* 3586DC E004A21C A2220053 */ sb $v0, 0x53($s1) /* 3586E0 E004A220 A2220054 */ sb $v0, 0x54($s1) /* 3586E4 E004A224 080128A4 */ j .LE004A290 /* 3586E8 E004A228 240200FA */ addiu $v0, $zero, 0xFA /* 3586EC E004A22C 240200E1 */ addiu $v0, $zero, 0xE1 /* 3586F0 E004A230 A2220050 */ sb $v0, 0x50($s1) /* 3586F4 E004A234 240200CC */ addiu $v0, $zero, 0xCC /* 3586F8 E004A238 A2220051 */ sb $v0, 0x51($s1) /* 3586FC E004A23C 2402005D */ addiu $v0, $zero, 0x5D /* 358700 E004A240 A2220052 */ sb $v0, 0x52($s1) /* 358704 E004A244 240200E8 */ addiu $v0, $zero, 0xE8 /* 358708 E004A248 A2220053 */ sb $v0, 0x53($s1) /* 35870C E004A24C 240200E7 */ addiu $v0, $zero, 0xE7 /* 358710 E004A250 A2220054 */ sb $v0, 0x54($s1) /* 358714 E004A254 080128A4 */ j .LE004A290 /* 358718 E004A258 240200AB */ addiu $v0, $zero, 0xAB .LE004A25C: /* 35871C E004A25C 24020032 */ addiu $v0, $zero, 0x32 /* 358720 E004A260 AE220028 */ sw $v0, 0x28($s1) /* 358724 E004A264 240200D0 */ addiu $v0, $zero, 0xD0 /* 358728 E004A268 A2220050 */ sb $v0, 0x50($s1) /* 35872C E004A26C 24020088 */ addiu $v0, $zero, 0x88 /* 358730 E004A270 A2220051 */ sb $v0, 0x51($s1) /* 358734 E004A274 24020028 */ addiu $v0, $zero, 0x28 /* 358738 E004A278 A2220052 */ sb $v0, 0x52($s1) /* 35873C E004A27C 240200D8 */ addiu $v0, $zero, 0xD8 /* 358740 E004A280 A2220053 */ sb $v0, 0x53($s1) /* 358744 E004A284 240200A9 */ addiu $v0, $zero, 0xA9 /* 358748 E004A288 A2220054 */ sb $v0, 0x54($s1) /* 35874C E004A28C 24020041 */ addiu $v0, $zero, 0x41 .LE004A290: /* 358750 E004A290 A2220055 */ sb $v0, 0x55($s1) /* 358754 E004A294 24030001 */ addiu $v1, $zero, 0x1 /* 358758 E004A298 0073102A */ slt $v0, $v1, $s3 /* 35875C E004A29C 10400017 */ beqz $v0, .LE004A2FC /* 358760 E004A2A0 26310058 */ addiu $s1, $s1, 0x58 /* 358764 E004A2A4 2A480002 */ slti $t0, $s2, 0x2 /* 358768 E004A2A8 26240030 */ addiu $a0, $s1, 0x30 /* 35876C E004A2AC 2407001E */ addiu $a3, $zero, 0x1E /* 358770 E004A2B0 2406FFFF */ addiu $a2, $zero, -0x1 /* 358774 E004A2B4 00C0282D */ daddu $a1, $a2, $zero .LE004A2B8: /* 358778 E004A2B8 51000004 */ beql $t0, $zero, .LE004A2CC /* 35877C E004A2BC AC86001C */ sw $a2, 0x1C($a0) /* 358780 E004A2C0 06420002 */ bltzl $s2, .LE004A2CC /* 358784 E004A2C4 AC86001C */ sw $a2, 0x1C($a0) /* 358788 E004A2C8 AC85001C */ sw $a1, 0x1C($a0) .LE004A2CC: /* 35878C E004A2CC 44870000 */ mtc1 $a3, $f0 /* 358790 E004A2D0 00000000 */ nop /* 358794 E004A2D4 46800020 */ cvt.s.w $f0, $f0 /* 358798 E004A2D8 24E7001E */ addiu $a3, $a3, 0x1E /* 35879C E004A2DC 24C6FFFD */ addiu $a2, $a2, -0x3 /* 3587A0 E004A2E0 24A5FFFE */ addiu $a1, $a1, -0x2 /* 3587A4 E004A2E4 24630001 */ addiu $v1, $v1, 0x1 /* 3587A8 E004A2E8 E49A0004 */ swc1 $f26, 0x4($a0) /* 3587AC E004A2EC E4800000 */ swc1 $f0, 0x0($a0) /* 3587B0 E004A2F0 0073102A */ slt $v0, $v1, $s3 /* 3587B4 E004A2F4 1440FFF0 */ bnez $v0, .LE004A2B8 /* 3587B8 E004A2F8 24840058 */ addiu $a0, $a0, 0x58 .LE004A2FC: /* 3587BC E004A2FC 8FBF0038 */ lw $ra, 0x38($sp) /* 3587C0 E004A300 8FB30034 */ lw $s3, 0x34($sp) /* 3587C4 E004A304 8FB20030 */ lw $s2, 0x30($sp) /* 3587C8 E004A308 8FB1002C */ lw $s1, 0x2C($sp) /* 3587CC E004A30C 8FB00028 */ lw $s0, 0x28($sp) /* 3587D0 E004A310 D7BA0058 */ ldc1 $f26, 0x58($sp) /* 3587D4 E004A314 D7B80050 */ ldc1 $f24, 0x50($sp) /* 3587D8 E004A318 D7B60048 */ ldc1 $f22, 0x48($sp) /* 3587DC E004A31C D7B40040 */ ldc1 $f20, 0x40($sp) /* 3587E0 E004A320 03E00008 */ jr $ra /* 3587E4 E004A324 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void shockwave_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; ShockwaveFXData* part; f32 zero = 0.0f; s32 numParts; s32 i; switch (arg0) { case 0: arg0 = 3; break; case 1: arg0 = 2; break; case 2: arg0 = 4; break; default: arg0 = 5; break; } switch (arg0) { case 1: numParts = 1; break; case 0: case 2: case 5: numParts = 3; break; default: numParts = 2; break; } numParts++; bpPtr->init = shockwave_init; bpPtr->update = shockwave_update; bpPtr->renderWorld = shockwave_render; bpPtr->unk_00 = 0; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_SHOCKWAVE; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.shockwave = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.shockwave != NULL); shim_mem_clear(part, numParts * sizeof(*part)); if (arg0 >= 2) { part->unk_28 = 60; } else { part->unk_28 = 30; } part->alpha = 255; part->unk_2C = 0; part->unk_00 = arg0; part->pos.x = arg1; part->pos.y = arg2; part->pos.z = arg3; switch (arg0) { case 0: case 1: part->prim.r = 0; part->prim.g = 255; part->prim.b = 122; part->env.r = 240; part->env.g = 255; part->env.b = 250; break; case 2: part->prim.r = 125; part->prim.g = 120; part->prim.b = 100; part->env.r = 255; part->env.g = 255; part->env.b = 240; break; case 3: part->prim.r = 220; part->prim.g = 210; part->prim.b = 200; part->env.r = 255; part->env.g = 255; part->env.b = 250; break; case 5: part->prim.r = 225; part->prim.g = 204; part->prim.b = 93; part->env.r = 232; part->env.g = 231; part->env.b = 171; break; default: part->unk_28 = 50; part->prim.r = 208; part->prim.g = 136; part->prim.b = 40; part->env.r = 216; part->env.g = 169; part->env.b = 65; break; } part++; for (i = 1; i < numParts; i++, part++) { switch (arg0) { case 0: case 1: part->unk_4C = 1 + i * -2; break; default: part->unk_4C = 2 + i * -3; break; } part->unk_34 = zero; part->unk_30 = i * 30; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_800F4944 /* 8DDF4 800F4944 3C028011 */ lui $v0, %hi(PopupNotBattle) /* 8DDF8 800F4948 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0) /* 8DDFC 800F494C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 8DE00 800F4950 AFB00018 */ sw $s0, 0x18($sp) /* 8DE04 800F4954 00A0802D */ daddu $s0, $a1, $zero /* 8DE08 800F4958 AFB1001C */ sw $s1, 0x1C($sp) /* 8DE0C 800F495C 24D10007 */ addiu $s1, $a2, 0x7 /* 8DE10 800F4960 104000A9 */ beqz $v0, .L800F4C08 /* 8DE14 800F4964 AFBF0020 */ sw $ra, 0x20($sp) /* 8DE18 800F4968 3C028011 */ lui $v0, %hi(gPopupMenu) /* 8DE1C 800F496C 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0) /* 8DE20 800F4970 8C430318 */ lw $v1, 0x318($v0) /* 8DE24 800F4974 2C62000E */ sltiu $v0, $v1, 0xE /* 8DE28 800F4978 104000A3 */ beqz $v0, .L800F4C08 /* 8DE2C 800F497C 00031080 */ sll $v0, $v1, 2 /* 8DE30 800F4980 3C018011 */ lui $at, %hi(jtbl_8010C8E0) /* 8DE34 800F4984 00220821 */ addu $at, $at, $v0 /* 8DE38 800F4988 8C22C8E0 */ lw $v0, %lo(jtbl_8010C8E0)($at) /* 8DE3C 800F498C 00400008 */ jr $v0 /* 8DE40 800F4990 00000000 */ nop glabel .L800F4994 /* 8DE44 800F4994 3C04001D */ lui $a0, (0x1D0061 >> 16) /* 8DE48 800F4998 34840061 */ ori $a0, $a0, (0x1D0061 & 0xFFFF) /* 8DE4C 800F499C 0C04991D */ jal get_msg_width /* 8DE50 800F49A0 0000282D */ daddu $a1, $zero, $zero /* 8DE54 800F49A4 3C04001D */ lui $a0, (0x1D0061 >> 16) /* 8DE58 800F49A8 0803D2F7 */ j .L800F4BDC /* 8DE5C 800F49AC 34840061 */ ori $a0, $a0, (0x1D0061 & 0xFFFF) glabel .L800F49B0 /* 8DE60 800F49B0 3C04001D */ lui $a0, (0x1D0063 >> 16) /* 8DE64 800F49B4 34840063 */ ori $a0, $a0, (0x1D0063 & 0xFFFF) /* 8DE68 800F49B8 0C04991D */ jal get_msg_width /* 8DE6C 800F49BC 0000282D */ daddu $a1, $zero, $zero /* 8DE70 800F49C0 3C04001D */ lui $a0, (0x1D0063 >> 16) /* 8DE74 800F49C4 34840063 */ ori $a0, $a0, (0x1D0063 & 0xFFFF) /* 8DE78 800F49C8 26050048 */ addiu $a1, $s0, 0x48 /* 8DE7C 800F49CC 00021FC2 */ srl $v1, $v0, 31 /* 8DE80 800F49D0 00621821 */ addu $v1, $v1, $v0 /* 8DE84 800F49D4 00031843 */ sra $v1, $v1, 1 /* 8DE88 800F49D8 00A32823 */ subu $a1, $a1, $v1 /* 8DE8C 800F49DC 0803D2FD */ j .L800F4BF4 /* 8DE90 800F49E0 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F49E4 /* 8DE94 800F49E4 3C04001D */ lui $a0, (0x1D0064 >> 16) /* 8DE98 800F49E8 34840064 */ ori $a0, $a0, (0x1D0064 & 0xFFFF) /* 8DE9C 800F49EC 0C04991D */ jal get_msg_width /* 8DEA0 800F49F0 0000282D */ daddu $a1, $zero, $zero /* 8DEA4 800F49F4 3C04001D */ lui $a0, (0x1D0064 >> 16) /* 8DEA8 800F49F8 34840064 */ ori $a0, $a0, (0x1D0064 & 0xFFFF) /* 8DEAC 800F49FC 26050048 */ addiu $a1, $s0, 0x48 /* 8DEB0 800F4A00 00021FC2 */ srl $v1, $v0, 31 /* 8DEB4 800F4A04 00621821 */ addu $v1, $v1, $v0 /* 8DEB8 800F4A08 00031843 */ sra $v1, $v1, 1 /* 8DEBC 800F4A0C 00A32823 */ subu $a1, $a1, $v1 /* 8DEC0 800F4A10 0803D2FD */ j .L800F4BF4 /* 8DEC4 800F4A14 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F4A18 /* 8DEC8 800F4A18 3C04001D */ lui $a0, (0x1D0070 >> 16) /* 8DECC 800F4A1C 34840070 */ ori $a0, $a0, (0x1D0070 & 0xFFFF) /* 8DED0 800F4A20 0C04991D */ jal get_msg_width /* 8DED4 800F4A24 0000282D */ daddu $a1, $zero, $zero /* 8DED8 800F4A28 3C04001D */ lui $a0, (0x1D0070 >> 16) /* 8DEDC 800F4A2C 34840070 */ ori $a0, $a0, (0x1D0070 & 0xFFFF) /* 8DEE0 800F4A30 26050040 */ addiu $a1, $s0, 0x40 /* 8DEE4 800F4A34 00021FC2 */ srl $v1, $v0, 31 /* 8DEE8 800F4A38 00621821 */ addu $v1, $v1, $v0 /* 8DEEC 800F4A3C 00031843 */ sra $v1, $v1, 1 /* 8DEF0 800F4A40 00A32823 */ subu $a1, $a1, $v1 /* 8DEF4 800F4A44 0803D2FD */ j .L800F4BF4 /* 8DEF8 800F4A48 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F4A4C /* 8DEFC 800F4A4C 3C04001D */ lui $a0, (0x1D006A >> 16) /* 8DF00 800F4A50 3484006A */ ori $a0, $a0, (0x1D006A & 0xFFFF) /* 8DF04 800F4A54 0C04991D */ jal get_msg_width /* 8DF08 800F4A58 0000282D */ daddu $a1, $zero, $zero /* 8DF0C 800F4A5C 3C04001D */ lui $a0, (0x1D006A >> 16) /* 8DF10 800F4A60 3484006A */ ori $a0, $a0, (0x1D006A & 0xFFFF) /* 8DF14 800F4A64 26050044 */ addiu $a1, $s0, 0x44 /* 8DF18 800F4A68 00021FC2 */ srl $v1, $v0, 31 /* 8DF1C 800F4A6C 00621821 */ addu $v1, $v1, $v0 /* 8DF20 800F4A70 00031843 */ sra $v1, $v1, 1 /* 8DF24 800F4A74 00A32823 */ subu $a1, $a1, $v1 /* 8DF28 800F4A78 0803D2FD */ j .L800F4BF4 /* 8DF2C 800F4A7C 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F4A80 /* 8DF30 800F4A80 3C04001D */ lui $a0, (0x1D0065 >> 16) /* 8DF34 800F4A84 34840065 */ ori $a0, $a0, (0x1D0065 & 0xFFFF) /* 8DF38 800F4A88 0C04991D */ jal get_msg_width /* 8DF3C 800F4A8C 0000282D */ daddu $a1, $zero, $zero /* 8DF40 800F4A90 3C04001D */ lui $a0, (0x1D0065 >> 16) /* 8DF44 800F4A94 34840065 */ ori $a0, $a0, (0x1D0065 & 0xFFFF) /* 8DF48 800F4A98 0803D2F8 */ j .L800F4BE0 /* 8DF4C 800F4A9C 2605003C */ addiu $a1, $s0, 0x3C glabel .L800F4AA0 /* 8DF50 800F4AA0 3C04001D */ lui $a0, (0x1D0066 >> 16) /* 8DF54 800F4AA4 34840066 */ ori $a0, $a0, (0x1D0066 & 0xFFFF) /* 8DF58 800F4AA8 0C04991D */ jal get_msg_width /* 8DF5C 800F4AAC 0000282D */ daddu $a1, $zero, $zero /* 8DF60 800F4AB0 3C04001D */ lui $a0, (0x1D0066 >> 16) /* 8DF64 800F4AB4 0803D2F7 */ j .L800F4BDC /* 8DF68 800F4AB8 34840066 */ ori $a0, $a0, (0x1D0066 & 0xFFFF) glabel .L800F4ABC /* 8DF6C 800F4ABC 3C04001D */ lui $a0, (0x1D0067 >> 16) /* 8DF70 800F4AC0 34840067 */ ori $a0, $a0, (0x1D0067 & 0xFFFF) /* 8DF74 800F4AC4 0C04991D */ jal get_msg_width /* 8DF78 800F4AC8 0000282D */ daddu $a1, $zero, $zero /* 8DF7C 800F4ACC 3C04001D */ lui $a0, (0x1D0067 >> 16) /* 8DF80 800F4AD0 0803D2F7 */ j .L800F4BDC /* 8DF84 800F4AD4 34840067 */ ori $a0, $a0, (0x1D0067 & 0xFFFF) glabel .L800F4AD8 /* 8DF88 800F4AD8 3C04001D */ lui $a0, (0x1D006F >> 16) /* 8DF8C 800F4ADC 3484006F */ ori $a0, $a0, (0x1D006F & 0xFFFF) /* 8DF90 800F4AE0 0C04991D */ jal get_msg_width /* 8DF94 800F4AE4 0000282D */ daddu $a1, $zero, $zero /* 8DF98 800F4AE8 3C04001D */ lui $a0, (0x1D006F >> 16) /* 8DF9C 800F4AEC 3484006F */ ori $a0, $a0, (0x1D006F & 0xFFFF) /* 8DFA0 800F4AF0 26050048 */ addiu $a1, $s0, 0x48 /* 8DFA4 800F4AF4 00021FC2 */ srl $v1, $v0, 31 /* 8DFA8 800F4AF8 00621821 */ addu $v1, $v1, $v0 /* 8DFAC 800F4AFC 00031843 */ sra $v1, $v1, 1 /* 8DFB0 800F4B00 00A32823 */ subu $a1, $a1, $v1 /* 8DFB4 800F4B04 0803D2FD */ j .L800F4BF4 /* 8DFB8 800F4B08 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F4B0C /* 8DFBC 800F4B0C 3C04001D */ lui $a0, (0x1D006D >> 16) /* 8DFC0 800F4B10 3484006D */ ori $a0, $a0, (0x1D006D & 0xFFFF) /* 8DFC4 800F4B14 0C04991D */ jal get_msg_width /* 8DFC8 800F4B18 0000282D */ daddu $a1, $zero, $zero /* 8DFCC 800F4B1C 3C04001D */ lui $a0, (0x1D006D >> 16) /* 8DFD0 800F4B20 3484006D */ ori $a0, $a0, (0x1D006D & 0xFFFF) /* 8DFD4 800F4B24 26050038 */ addiu $a1, $s0, 0x38 /* 8DFD8 800F4B28 00021FC2 */ srl $v1, $v0, 31 /* 8DFDC 800F4B2C 00621821 */ addu $v1, $v1, $v0 /* 8DFE0 800F4B30 00031843 */ sra $v1, $v1, 1 /* 8DFE4 800F4B34 00A32823 */ subu $a1, $a1, $v1 /* 8DFE8 800F4B38 0803D2FD */ j .L800F4BF4 /* 8DFEC 800F4B3C 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F4B40 /* 8DFF0 800F4B40 3C04001D */ lui $a0, (0x1D00D6 >> 16) /* 8DFF4 800F4B44 348400D6 */ ori $a0, $a0, (0x1D00D6 & 0xFFFF) /* 8DFF8 800F4B48 0C04991D */ jal get_msg_width /* 8DFFC 800F4B4C 0000282D */ daddu $a1, $zero, $zero /* 8E000 800F4B50 3C04001D */ lui $a0, (0x1D00D6 >> 16) /* 8E004 800F4B54 0803D2F7 */ j .L800F4BDC /* 8E008 800F4B58 348400D6 */ ori $a0, $a0, (0x1D00D6 & 0xFFFF) glabel .L800F4B5C /* 8E00C 800F4B5C 3C04001D */ lui $a0, (0x1D006C >> 16) /* 8E010 800F4B60 3484006C */ ori $a0, $a0, (0x1D006C & 0xFFFF) /* 8E014 800F4B64 0C04991D */ jal get_msg_width /* 8E018 800F4B68 0000282D */ daddu $a1, $zero, $zero /* 8E01C 800F4B6C 3C04001D */ lui $a0, (0x1D006C >> 16) /* 8E020 800F4B70 3484006C */ ori $a0, $a0, (0x1D006C & 0xFFFF) /* 8E024 800F4B74 26050040 */ addiu $a1, $s0, 0x40 /* 8E028 800F4B78 00021FC2 */ srl $v1, $v0, 31 /* 8E02C 800F4B7C 00621821 */ addu $v1, $v1, $v0 /* 8E030 800F4B80 00031843 */ sra $v1, $v1, 1 /* 8E034 800F4B84 00A32823 */ subu $a1, $a1, $v1 /* 8E038 800F4B88 0803D2FD */ j .L800F4BF4 /* 8E03C 800F4B8C 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F4B90 /* 8E040 800F4B90 3C04001D */ lui $a0, (0x1D006D >> 16) /* 8E044 800F4B94 3484006D */ ori $a0, $a0, (0x1D006D & 0xFFFF) /* 8E048 800F4B98 0C04991D */ jal get_msg_width /* 8E04C 800F4B9C 0000282D */ daddu $a1, $zero, $zero /* 8E050 800F4BA0 3C04001D */ lui $a0, (0x1D006D >> 16) /* 8E054 800F4BA4 3484006D */ ori $a0, $a0, (0x1D006D & 0xFFFF) /* 8E058 800F4BA8 26050040 */ addiu $a1, $s0, 0x40 /* 8E05C 800F4BAC 00021FC2 */ srl $v1, $v0, 31 /* 8E060 800F4BB0 00621821 */ addu $v1, $v1, $v0 /* 8E064 800F4BB4 00031843 */ sra $v1, $v1, 1 /* 8E068 800F4BB8 00A32823 */ subu $a1, $a1, $v1 /* 8E06C 800F4BBC 0803D2FD */ j .L800F4BF4 /* 8E070 800F4BC0 2626FFFC */ addiu $a2, $s1, -0x4 glabel .L800F4BC4 /* 8E074 800F4BC4 3C04001D */ lui $a0, (0x1D0062 >> 16) /* 8E078 800F4BC8 34840062 */ ori $a0, $a0, (0x1D0062 & 0xFFFF) /* 8E07C 800F4BCC 0C04991D */ jal get_msg_width /* 8E080 800F4BD0 0000282D */ daddu $a1, $zero, $zero /* 8E084 800F4BD4 3C04001D */ lui $a0, (0x1D0062 >> 16) /* 8E088 800F4BD8 34840062 */ ori $a0, $a0, (0x1D0062 & 0xFFFF) .L800F4BDC: /* 8E08C 800F4BDC 26050048 */ addiu $a1, $s0, 0x48 .L800F4BE0: /* 8E090 800F4BE0 00021FC2 */ srl $v1, $v0, 31 /* 8E094 800F4BE4 00621821 */ addu $v1, $v1, $v0 /* 8E098 800F4BE8 00031843 */ sra $v1, $v1, 1 /* 8E09C 800F4BEC 00A32823 */ subu $a1, $a1, $v1 /* 8E0A0 800F4BF0 0220302D */ daddu $a2, $s1, $zero .L800F4BF4: /* 8E0A4 800F4BF4 240700FF */ addiu $a3, $zero, 0xFF /* 8E0A8 800F4BF8 2402000F */ addiu $v0, $zero, 0xF /* 8E0AC 800F4BFC AFA20010 */ sw $v0, 0x10($sp) /* 8E0B0 800F4C00 0C04993B */ jal draw_msg /* 8E0B4 800F4C04 AFA00014 */ sw $zero, 0x14($sp) .L800F4C08: /* 8E0B8 800F4C08 8FBF0020 */ lw $ra, 0x20($sp) /* 8E0BC 800F4C0C 8FB1001C */ lw $s1, 0x1C($sp) /* 8E0C0 800F4C10 8FB00018 */ lw $s0, 0x18($sp) /* 8E0C4 800F4C14 03E00008 */ jr $ra /* 8E0C8 800F4C18 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void func_800F4944(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { s32 msgWidth; baseY += 7; if (PopupNotBattle) { switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: msgWidth = get_msg_width(MSG_Menus_0061, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_0061, baseX, baseY, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_SWITCH_PARTNER: msgWidth = get_msg_width(MSG_Menus_0063, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_0063, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_THROW_AWAY_ITEM: msgWidth = get_msg_width(MSG_Menus_0064, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_0064, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_TRADE_FOR_BADGE: msgWidth = get_msg_width(MSG_Menus_0070, 0); baseX += 64 - (msgWidth / 2); draw_msg(MSG_Menus_0070, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_UPGRADE_PARTNER: msgWidth = get_msg_width(MSG_Menus_006A, 0); baseX += 68 - (msgWidth / 2); draw_msg(MSG_Menus_006A, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_SELL_ITEM: msgWidth = get_msg_width(MSG_Menus_0065, 0); baseX += 60 - (msgWidth / 2); draw_msg(MSG_Menus_0065, baseX, baseY, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_CHECK_ITEM: msgWidth = get_msg_width(MSG_Menus_0066, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_0066, baseX, baseY, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_CLAIM_ITEM: msgWidth = get_msg_width(MSG_Menus_0067, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_0067, baseX, baseY, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_POST_OFFICE: msgWidth = get_msg_width(MSG_Menus_006F, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_006F, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_READ_LETTER: msgWidth = get_msg_width(MSG_Menus_006D, 0); baseX += 56 - (msgWidth / 2); draw_msg(MSG_Menus_006D, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_TAKE_FROM_CHEST: msgWidth = get_msg_width(MSG_Menus_00D6, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_00D6, baseX, baseY, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_READ_DIARY_PAGE: msgWidth = get_msg_width(MSG_Menus_006C, 0); baseX += 64 - (msgWidth / 2); draw_msg(MSG_Menus_006C, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_READ_POSTCARD: msgWidth = get_msg_width(MSG_Menus_006D, 0); baseX += 64 - (msgWidth / 2); draw_msg(MSG_Menus_006D, baseX, baseY - 4, 255, MSG_PAL_0F, 0); break; case POPUP_MENU_USEKEY: msgWidth = get_msg_width(MSG_Menus_0062, 0); baseX += 72 - (msgWidth / 2); draw_msg(MSG_Menus_0062, baseX, baseY, 255, MSG_PAL_0F, 0); break; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel ending_decals_appendGfx /* 36AB04 E0068234 27BDFF78 */ addiu $sp, $sp, -0x88 /* 36AB08 E0068238 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 36AB0C E006823C AFB10064 */ sw $s1, 0x64($sp) /* 36AB10 E0068240 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 36AB14 E0068244 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 36AB18 E0068248 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 36AB1C E006824C AFB3006C */ sw $s3, 0x6C($sp) /* 36AB20 E0068250 3C130001 */ lui $s3, (0x11630 >> 16) /* 36AB24 E0068254 AFBF0080 */ sw $ra, 0x80($sp) /* 36AB28 E0068258 AFB7007C */ sw $s7, 0x7C($sp) /* 36AB2C E006825C AFB60078 */ sw $s6, 0x78($sp) /* 36AB30 E0068260 AFB50074 */ sw $s5, 0x74($sp) /* 36AB34 E0068264 AFB40070 */ sw $s4, 0x70($sp) /* 36AB38 E0068268 AFB20068 */ sw $s2, 0x68($sp) /* 36AB3C E006826C AFB00060 */ sw $s0, 0x60($sp) /* 36AB40 E0068270 8E260000 */ lw $a2, 0x0($s1) /* 36AB44 E0068274 8C94000C */ lw $s4, 0xC($a0) /* 36AB48 E0068278 44800000 */ mtc1 $zero, $f0 /* 36AB4C E006827C 00C0182D */ daddu $v1, $a2, $zero /* 36AB50 E0068280 24C60008 */ addiu $a2, $a2, 0x8 /* 36AB54 E0068284 8E820000 */ lw $v0, 0x0($s4) /* 36AB58 E0068288 44050000 */ mfc1 $a1, $f0 /* 36AB5C E006828C 8E960020 */ lw $s6, 0x20($s4) /* 36AB60 E0068290 00021080 */ sll $v0, $v0, 2 /* 36AB64 E0068294 3C15E007 */ lui $s5, (0xE0070000 >> 16) /* 36AB68 E0068298 02A2A821 */ addu $s5, $s5, $v0 /* 36AB6C E006829C 8EB585B0 */ lw $s5, -0x7A50($s5) /* 36AB70 E00682A0 3C17E007 */ lui $s7, (0xE0070000 >> 16) /* 36AB74 E00682A4 02E2B821 */ addu $s7, $s7, $v0 /* 36AB78 E00682A8 8EF785F4 */ lw $s7, -0x7A0C($s7) /* 36AB7C E00682AC 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 36AB80 E00682B0 AC620000 */ sw $v0, 0x0($v1) /* 36AB84 E00682B4 AC600004 */ sw $zero, 0x4($v1) /* 36AB88 E00682B8 ACC70000 */ sw $a3, 0x0($a2) /* 36AB8C E00682BC 8C820010 */ lw $v0, 0x10($a0) /* 36AB90 E00682C0 3C048000 */ lui $a0, (0x80000000 >> 16) /* 36AB94 E00682C4 8C42001C */ lw $v0, 0x1C($v0) /* 36AB98 E00682C8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 36AB9C E00682CC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 36ABA0 E00682D0 00441021 */ addu $v0, $v0, $a0 /* 36ABA4 E00682D4 ACC20004 */ sw $v0, 0x4($a2) /* 36ABA8 E00682D8 00031080 */ sll $v0, $v1, 2 /* 36ABAC E00682DC 00431021 */ addu $v0, $v0, $v1 /* 36ABB0 E00682E0 00021080 */ sll $v0, $v0, 2 /* 36ABB4 E00682E4 00431023 */ subu $v0, $v0, $v1 /* 36ABB8 E00682E8 000218C0 */ sll $v1, $v0, 3 /* 36ABBC E00682EC 00431021 */ addu $v0, $v0, $v1 /* 36ABC0 E00682F0 000210C0 */ sll $v0, $v0, 3 /* 36ABC4 E00682F4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 36ABC8 E00682F8 00220821 */ addu $at, $at, $v0 /* 36ABCC E00682FC C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 36ABD0 E0068300 C6800010 */ lwc1 $f0, 0x10($s4) /* 36ABD4 E0068304 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 36ABD8 E0068308 E7A00010 */ swc1 $f0, 0x10($sp) /* 36ABDC E006830C C6800004 */ lwc1 $f0, 0x4($s4) /* 36ABE0 E0068310 00A0382D */ daddu $a3, $a1, $zero /* 36ABE4 E0068314 E7A00014 */ swc1 $f0, 0x14($sp) /* 36ABE8 E0068318 C6800008 */ lwc1 $f0, 0x8($s4) /* 36ABEC E006831C 46001087 */ neg.s $f2, $f2 /* 36ABF0 E0068320 AE260000 */ sw $a2, 0x0($s1) /* 36ABF4 E0068324 E7A00018 */ swc1 $f0, 0x18($sp) /* 36ABF8 E0068328 C680000C */ lwc1 $f0, 0xC($s4) /* 36ABFC E006832C 24C60008 */ addiu $a2, $a2, 0x8 /* 36AC00 E0068330 AE260000 */ sw $a2, 0x0($s1) /* 36AC04 E0068334 44061000 */ mfc1 $a2, $f2 /* 36AC08 E0068338 27A40020 */ addiu $a0, $sp, 0x20 /* 36AC0C E006833C 0C080180 */ jal shim_guPositionF /* 36AC10 E0068340 E7A0001C */ swc1 $f0, 0x1C($sp) /* 36AC14 E0068344 27A40020 */ addiu $a0, $sp, 0x20 /* 36AC18 E0068348 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 36AC1C E006834C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 36AC20 E0068350 3C12800A */ lui $s2, %hi(gDisplayContext) /* 36AC24 E0068354 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 36AC28 E0068358 96050000 */ lhu $a1, 0x0($s0) /* 36AC2C E006835C 8E420000 */ lw $v0, 0x0($s2) /* 36AC30 E0068360 00052980 */ sll $a1, $a1, 6 /* 36AC34 E0068364 00B32821 */ addu $a1, $a1, $s3 /* 36AC38 E0068368 0C080118 */ jal shim_guMtxF2L /* 36AC3C E006836C 00452821 */ addu $a1, $v0, $a1 /* 36AC40 E0068370 8E220000 */ lw $v0, 0x0($s1) /* 36AC44 E0068374 0040202D */ daddu $a0, $v0, $zero /* 36AC48 E0068378 24420008 */ addiu $v0, $v0, 0x8 /* 36AC4C E006837C AE220000 */ sw $v0, 0x0($s1) /* 36AC50 E0068380 96020000 */ lhu $v0, 0x0($s0) /* 36AC54 E0068384 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 36AC58 E0068388 AC830000 */ sw $v1, 0x0($a0) /* 36AC5C E006838C 24430001 */ addiu $v1, $v0, 0x1 /* 36AC60 E0068390 3042FFFF */ andi $v0, $v0, 0xFFFF /* 36AC64 E0068394 00021180 */ sll $v0, $v0, 6 /* 36AC68 E0068398 A6030000 */ sh $v1, 0x0($s0) /* 36AC6C E006839C 8E430000 */ lw $v1, 0x0($s2) /* 36AC70 E00683A0 00531021 */ addu $v0, $v0, $s3 /* 36AC74 E00683A4 00621821 */ addu $v1, $v1, $v0 /* 36AC78 E00683A8 AC830004 */ sw $v1, 0x4($a0) /* 36AC7C E00683AC C6820018 */ lwc1 $f2, 0x18($s4) /* 36AC80 E00683B0 468010A1 */ cvt.d.w $f2, $f2 /* 36AC84 E00683B4 32C20001 */ andi $v0, $s6, 0x1 /* 36AC88 E00683B8 14400009 */ bnez $v0, .LE00683E0 /* 36AC8C E00683BC 3C031A79 */ lui $v1, (0x1A791D9E >> 16) /* 36AC90 E00683C0 3C01E007 */ lui $at, (0xE0070000 >> 16) /* 36AC94 E00683C4 D4208600 */ ldc1 $f0, -0x7A00($at) /* 36AC98 E00683C8 46201002 */ mul.d $f0, $f2, $f0 /* 36AC9C E00683CC 00000000 */ nop /* 36ACA0 E00683D0 4620010D */ trunc.w.d $f4, $f0 /* 36ACA4 E00683D4 44092000 */ mfc1 $t1, $f4 /* 36ACA8 E00683D8 0801A0FB */ j .LE00683EC /* 36ACAC E00683DC 34631D9E */ ori $v1, $v1, (0x1A791D9E & 0xFFFF) .LE00683E0: /* 36ACB0 E00683E0 4620110D */ trunc.w.d $f4, $f2 /* 36ACB4 E00683E4 44092000 */ mfc1 $t1, $f4 /* 36ACB8 E00683E8 34631D9E */ ori $v1, $v1, (0x1A791D9E & 0xFFFF) .LE00683EC: /* 36ACBC E00683EC 3C0AE300 */ lui $t2, (0xE3001801 >> 16) /* 36ACC0 E00683F0 354A1801 */ ori $t2, $t2, (0xE3001801 & 0xFFFF) /* 36ACC4 E00683F4 3C0BE300 */ lui $t3, (0xE3001A01 >> 16) /* 36ACC8 E00683F8 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 36ACCC E00683FC 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 36ACD0 E0068400 356B1A01 */ ori $t3, $t3, (0xE3001A01 & 0xFFFF) /* 36ACD4 E0068404 3C06FB00 */ lui $a2, (0xFB000000 >> 16) /* 36ACD8 E0068408 240D0040 */ addiu $t5, $zero, 0x40 /* 36ACDC E006840C 8D070000 */ lw $a3, 0x0($t0) /* 36ACE0 E0068410 3C0CDE00 */ lui $t4, (0xDE000000 >> 16) /* 36ACE4 E0068414 00E0102D */ daddu $v0, $a3, $zero /* 36ACE8 E0068418 24E70008 */ addiu $a3, $a3, 0x8 /* 36ACEC E006841C AD070000 */ sw $a3, 0x0($t0) /* 36ACF0 E0068420 AC460000 */ sw $a2, 0x0($v0) /* 36ACF4 E0068424 AC430004 */ sw $v1, 0x4($v0) /* 36ACF8 E0068428 24E20008 */ addiu $v0, $a3, 0x8 /* 36ACFC E006842C AD020000 */ sw $v0, 0x0($t0) /* 36AD00 E0068430 24E20010 */ addiu $v0, $a3, 0x10 /* 36AD04 E0068434 ACEA0000 */ sw $t2, 0x0($a3) /* 36AD08 E0068438 ACED0004 */ sw $t5, 0x4($a3) /* 36AD0C E006843C AD020000 */ sw $v0, 0x0($t0) /* 36AD10 E0068440 24E20018 */ addiu $v0, $a3, 0x18 /* 36AD14 E0068444 ACEB0008 */ sw $t3, 0x8($a3) /* 36AD18 E0068448 ACE0000C */ sw $zero, 0xC($a3) /* 36AD1C E006844C AD020000 */ sw $v0, 0x0($t0) /* 36AD20 E0068450 24E20020 */ addiu $v0, $a3, 0x20 /* 36AD24 E0068454 ACEC0010 */ sw $t4, 0x10($a3) /* 36AD28 E0068458 ACF70014 */ sw $s7, 0x14($a3) /* 36AD2C E006845C AD020000 */ sw $v0, 0x0($t0) /* 36AD30 E0068460 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 36AD34 E0068464 ACE20018 */ sw $v0, 0x18($a3) /* 36AD38 E0068468 92820024 */ lbu $v0, 0x24($s4) /* 36AD3C E006846C 92840025 */ lbu $a0, 0x25($s4) /* 36AD40 E0068470 92850026 */ lbu $a1, 0x26($s4) /* 36AD44 E0068474 24E30028 */ addiu $v1, $a3, 0x28 /* 36AD48 E0068478 AD030000 */ sw $v1, 0x0($t0) /* 36AD4C E006847C 312300FF */ andi $v1, $t1, 0xFF /* 36AD50 E0068480 ACE60020 */ sw $a2, 0x20($a3) /* 36AD54 E0068484 00021600 */ sll $v0, $v0, 24 /* 36AD58 E0068488 00042400 */ sll $a0, $a0, 16 /* 36AD5C E006848C 00441025 */ or $v0, $v0, $a0 /* 36AD60 E0068490 00052A00 */ sll $a1, $a1, 8 /* 36AD64 E0068494 00451025 */ or $v0, $v0, $a1 /* 36AD68 E0068498 00431025 */ or $v0, $v0, $v1 /* 36AD6C E006849C ACE2001C */ sw $v0, 0x1C($a3) /* 36AD70 E00684A0 92820027 */ lbu $v0, 0x27($s4) /* 36AD74 E00684A4 92840028 */ lbu $a0, 0x28($s4) /* 36AD78 E00684A8 92830029 */ lbu $v1, 0x29($s4) /* 36AD7C E00684AC 00021600 */ sll $v0, $v0, 24 /* 36AD80 E00684B0 00042400 */ sll $a0, $a0, 16 /* 36AD84 E00684B4 00441025 */ or $v0, $v0, $a0 /* 36AD88 E00684B8 00031A00 */ sll $v1, $v1, 8 /* 36AD8C E00684BC 00431025 */ or $v0, $v0, $v1 /* 36AD90 E00684C0 ACE20024 */ sw $v0, 0x24($a3) /* 36AD94 E00684C4 3C020900 */ lui $v0, %hi(D_09001E40_40F0D0) /* 36AD98 E00684C8 24421E40 */ addiu $v0, $v0, %lo(D_09001E40_40F0D0) /* 36AD9C E00684CC 16A20010 */ bne $s5, $v0, .LE0068510 /* 36ADA0 E00684D0 3C03D838 */ lui $v1, (0xD8380002 >> 16) /* 36ADA4 E00684D4 00161842 */ srl $v1, $s6, 1 /* 36ADA8 E00684D8 3C029249 */ lui $v0, (0x92492493 >> 16) /* 36ADAC E00684DC 34422493 */ ori $v0, $v0, (0x92492493 & 0xFFFF) /* 36ADB0 E00684E0 00620019 */ multu $v1, $v0 /* 36ADB4 E00684E4 00007010 */ mfhi $t6 /* 36ADB8 E00684E8 000E1882 */ srl $v1, $t6, 2 /* 36ADBC E00684EC 000310C0 */ sll $v0, $v1, 3 /* 36ADC0 E00684F0 00431023 */ subu $v0, $v0, $v1 /* 36ADC4 E00684F4 00021040 */ sll $v0, $v0, 1 /* 36ADC8 E00684F8 02C21023 */ subu $v0, $s6, $v0 /* 36ADCC E00684FC 00021080 */ sll $v0, $v0, 2 /* 36ADD0 E0068500 3C15E007 */ lui $s5, (0xE0070000 >> 16) /* 36ADD4 E0068504 02A2A821 */ addu $s5, $s5, $v0 /* 36ADD8 E0068508 8EB585BC */ lw $s5, -0x7A44($s5) /* 36ADDC E006850C 3C03D838 */ lui $v1, (0xD8380002 >> 16) .LE0068510: /* 36ADE0 E0068510 34630002 */ ori $v1, $v1, (0xD8380002 & 0xFFFF) /* 36ADE4 E0068514 24E20030 */ addiu $v0, $a3, 0x30 /* 36ADE8 E0068518 AD020000 */ sw $v0, 0x0($t0) /* 36ADEC E006851C 24E20038 */ addiu $v0, $a3, 0x38 /* 36ADF0 E0068520 ACEC0028 */ sw $t4, 0x28($a3) /* 36ADF4 E0068524 ACF5002C */ sw $s5, 0x2C($a3) /* 36ADF8 E0068528 AD020000 */ sw $v0, 0x0($t0) /* 36ADFC E006852C 24E20040 */ addiu $v0, $a3, 0x40 /* 36AE00 E0068530 ACE30030 */ sw $v1, 0x30($a3) /* 36AE04 E0068534 3C03E700 */ lui $v1, (0xE7000000 >> 16) /* 36AE08 E0068538 ACED0034 */ sw $t5, 0x34($a3) /* 36AE0C E006853C AD020000 */ sw $v0, 0x0($t0) /* 36AE10 E0068540 24E20048 */ addiu $v0, $a3, 0x48 /* 36AE14 E0068544 ACE30038 */ sw $v1, 0x38($a3) /* 36AE18 E0068548 ACE0003C */ sw $zero, 0x3C($a3) /* 36AE1C E006854C AD020000 */ sw $v0, 0x0($t0) /* 36AE20 E0068550 240200C0 */ addiu $v0, $zero, 0xC0 /* 36AE24 E0068554 ACE20044 */ sw $v0, 0x44($a3) /* 36AE28 E0068558 24E20050 */ addiu $v0, $a3, 0x50 /* 36AE2C E006855C ACEA0040 */ sw $t2, 0x40($a3) /* 36AE30 E0068560 AD020000 */ sw $v0, 0x0($t0) /* 36AE34 E0068564 24020030 */ addiu $v0, $zero, 0x30 /* 36AE38 E0068568 ACE2004C */ sw $v0, 0x4C($a3) /* 36AE3C E006856C 24E20058 */ addiu $v0, $a3, 0x58 /* 36AE40 E0068570 ACEB0048 */ sw $t3, 0x48($a3) /* 36AE44 E0068574 AD020000 */ sw $v0, 0x0($t0) /* 36AE48 E0068578 ACE30050 */ sw $v1, 0x50($a3) /* 36AE4C E006857C ACE00054 */ sw $zero, 0x54($a3) /* 36AE50 E0068580 8FBF0080 */ lw $ra, 0x80($sp) /* 36AE54 E0068584 8FB7007C */ lw $s7, 0x7C($sp) /* 36AE58 E0068588 8FB60078 */ lw $s6, 0x78($sp) /* 36AE5C E006858C 8FB50074 */ lw $s5, 0x74($sp) /* 36AE60 E0068590 8FB40070 */ lw $s4, 0x70($sp) /* 36AE64 E0068594 8FB3006C */ lw $s3, 0x6C($sp) /* 36AE68 E0068598 8FB20068 */ lw $s2, 0x68($sp) /* 36AE6C E006859C 8FB10064 */ lw $s1, 0x64($sp) /* 36AE70 E00685A0 8FB00060 */ lw $s0, 0x60($sp) /* 36AE74 E00685A4 03E00008 */ jr $ra /* 36AE78 E00685A8 27BD0088 */ addiu $sp, $sp, 0x88 /* 36AE7C E00685AC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void ending_decals_appendGfx(void* effect) { EndingDecalsFXData* data = ((EffectInstance*)effect)->data.endingDecals; Gfx* dlist1; Gfx* dlist2; u32 unk_20; s32 alpha; f64 temp_f64; Matrix4f sp20; unk_20 = data->unk_20; dlist1 = D_E00685F4[data->type]; dlist2 = D_E00685B0[data->type]; 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); temp_f64 = data->haloAlpha; if (unk_20 % 2 == 0) { alpha = temp_f64 * 0.97; } else { alpha = temp_f64; } gDPSetEnvColor(gMainGfxPos++, 26, 121, 29, 158); gDPSetColorDither(gMainGfxPos++, G_CD_BAYER); gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN); gSPDisplayList(gMainGfxPos++, dlist1); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_24, data->unk_25, data->unk_26, alpha); gDPSetEnvColor(gMainGfxPos++, data->unk_27, data->unk_28, data->unk_29, 0); if (dlist2 == D_09001E40_36CD20) { dlist2 = D_E00685BC[unk_20 % 14]; } gSPDisplayList(gMainGfxPos++, dlist2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE); gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel remove_player_buffs /* 195D34 80267454 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 195D38 80267458 AFB30024 */ sw $s3, 0x24($sp) /* 195D3C 8026745C 0080982D */ daddu $s3, $a0, $zero /* 195D40 80267460 AFB20020 */ sw $s2, 0x20($sp) /* 195D44 80267464 3C12800E */ lui $s2, %hi(gBattleStatus) /* 195D48 80267468 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) /* 195D4C 8026746C 32620001 */ andi $v0, $s3, 0x1 /* 195D50 80267470 AFBF002C */ sw $ra, 0x2C($sp) /* 195D54 80267474 AFB40028 */ sw $s4, 0x28($sp) /* 195D58 80267478 AFB1001C */ sw $s1, 0x1C($sp) /* 195D5C 8026747C AFB00018 */ sw $s0, 0x18($sp) /* 195D60 80267480 F7B80040 */ sdc1 $f24, 0x40($sp) /* 195D64 80267484 F7B60038 */ sdc1 $f22, 0x38($sp) /* 195D68 80267488 F7B40030 */ sdc1 $f20, 0x30($sp) /* 195D6C 8026748C 8E5100D8 */ lw $s1, 0xD8($s2) /* 195D70 80267490 8E5400DC */ lw $s4, 0xDC($s2) /* 195D74 80267494 8E3001F4 */ lw $s0, 0x1F4($s1) /* 195D78 80267498 10400006 */ beqz $v0, .L802674B4 /* 195D7C 8026749C 3C03DFFF */ lui $v1, (0xDFFFFFFF >> 16) /* 195D80 802674A0 8E420000 */ lw $v0, 0x0($s2) /* 195D84 802674A4 3463FFFF */ ori $v1, $v1, (0xDFFFFFFF & 0xFFFF) /* 195D88 802674A8 A2400097 */ sb $zero, 0x97($s2) /* 195D8C 802674AC 00431024 */ and $v0, $v0, $v1 /* 195D90 802674B0 AE420000 */ sw $v0, 0x0($s2) .L802674B4: /* 195D94 802674B4 32620002 */ andi $v0, $s3, 0x2 /* 195D98 802674B8 10400006 */ beqz $v0, .L802674D4 /* 195D9C 802674BC 3C03EFFF */ lui $v1, (0xEFFFFFFF >> 16) /* 195DA0 802674C0 8E420000 */ lw $v0, 0x0($s2) /* 195DA4 802674C4 3463FFFF */ ori $v1, $v1, (0xEFFFFFFF & 0xFFFF) /* 195DA8 802674C8 A2400096 */ sb $zero, 0x96($s2) /* 195DAC 802674CC 00431024 */ and $v0, $v0, $v1 /* 195DB0 802674D0 AE420000 */ sw $v0, 0x0($s2) .L802674D4: /* 195DB4 802674D4 32620008 */ andi $v0, $s3, 0x8 /* 195DB8 802674D8 10400003 */ beqz $v0, .L802674E8 /* 195DBC 802674DC 32620010 */ andi $v0, $s3, 0x10 /* 195DC0 802674E0 A2200215 */ sb $zero, 0x215($s1) /* 195DC4 802674E4 A2200214 */ sb $zero, 0x214($s1) .L802674E8: /* 195DC8 802674E8 10400006 */ beqz $v0, .L80267504 /* 195DCC 802674EC 3C03FBFF */ lui $v1, (0xFBFFFFFF >> 16) /* 195DD0 802674F0 8E420000 */ lw $v0, 0x0($s2) /* 195DD4 802674F4 3463FFFF */ ori $v1, $v1, (0xFBFFFFFF & 0xFFFF) /* 195DD8 802674F8 A240008B */ sb $zero, 0x8B($s2) /* 195DDC 802674FC 00431024 */ and $v0, $v0, $v1 /* 195DE0 80267500 AE420000 */ sw $v0, 0x0($s2) .L80267504: /* 195DE4 80267504 32620020 */ andi $v0, $s3, 0x20 /* 195DE8 80267508 10400009 */ beqz $v0, .L80267530 /* 195DEC 8026750C 32620040 */ andi $v0, $s3, 0x40 /* 195DF0 80267510 82220212 */ lb $v0, 0x212($s1) /* 195DF4 80267514 10400006 */ beqz $v0, .L80267530 /* 195DF8 80267518 32620040 */ andi $v0, $s3, 0x40 /* 195DFC 8026751C 86240436 */ lh $a0, 0x436($s1) /* 195E00 80267520 A2200213 */ sb $zero, 0x213($s1) /* 195E04 80267524 0C011E68 */ jal remove_status_static /* 195E08 80267528 A2200212 */ sb $zero, 0x212($s1) /* 195E0C 8026752C 32620040 */ andi $v0, $s3, 0x40 .L80267530: /* 195E10 80267530 1040000C */ beqz $v0, .L80267564 /* 195E14 80267534 32620200 */ andi $v0, $s3, 0x200 /* 195E18 80267538 82220218 */ lb $v0, 0x218($s1) /* 195E1C 8026753C 10400008 */ beqz $v0, .L80267560 /* 195E20 80267540 2403FEFF */ addiu $v1, $zero, -0x101 /* 195E24 80267544 A2200219 */ sb $zero, 0x219($s1) /* 195E28 80267548 A2200218 */ sb $zero, 0x218($s1) /* 195E2C 8026754C 8E020000 */ lw $v0, 0x0($s0) /* 195E30 80267550 00431024 */ and $v0, $v0, $v1 /* 195E34 80267554 AE020000 */ sw $v0, 0x0($s0) /* 195E38 80267558 0C011EAA */ jal remove_status_transparent /* 195E3C 8026755C 86240436 */ lh $a0, 0x436($s1) .L80267560: /* 195E40 80267560 32620200 */ andi $v0, $s3, 0x200 .L80267564: /* 195E44 80267564 10400058 */ beqz $v0, .L802676C8 /* 195E48 80267568 32620100 */ andi $v0, $s3, 0x100 /* 195E4C 8026756C 8242009D */ lb $v0, 0x9D($s2) /* 195E50 80267570 10400055 */ beqz $v0, .L802676C8 /* 195E54 80267574 32620100 */ andi $v0, $s3, 0x100 /* 195E58 80267578 8E42043C */ lw $v0, 0x43C($s2) /* 195E5C 8026757C 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 195E60 80267580 44811000 */ mtc1 $at, $f2 /* 195E64 80267584 A240009D */ sb $zero, 0x9D($s2) /* 195E68 80267588 8C42000C */ lw $v0, 0xC($v0) /* 195E6C 8026758C A4400010 */ sh $zero, 0x10($v0) /* 195E70 80267590 8E4300A0 */ lw $v1, 0xA0($s2) /* 195E74 80267594 3C014190 */ lui $at, (0x41900000 >> 16) /* 195E78 80267598 44810000 */ mtc1 $at, $f0 /* 195E7C 8026759C 8C620000 */ lw $v0, 0x0($v1) /* 195E80 802675A0 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 195E84 802675A4 4481A000 */ mtc1 $at, $f20 /* 195E88 802675A8 34420010 */ ori $v0, $v0, 0x10 /* 195E8C 802675AC AC620000 */ sw $v0, 0x0($v1) /* 195E90 802675B0 2402000A */ addiu $v0, $zero, 0xA /* 195E94 802675B4 C6240148 */ lwc1 $f4, 0x148($s1) /* 195E98 802675B8 C626014C */ lwc1 $f6, 0x14C($s1) /* 195E9C 802675BC 46002100 */ add.s $f4, $f4, $f0 /* 195EA0 802675C0 E7A20010 */ swc1 $f2, 0x10($sp) /* 195EA4 802675C4 AFA20014 */ sw $v0, 0x14($sp) /* 195EA8 802675C8 46143180 */ add.s $f6, $f6, $f20 /* 195EAC 802675CC 8E250144 */ lw $a1, 0x144($s1) /* 195EB0 802675D0 44062000 */ mfc1 $a2, $f4 /* 195EB4 802675D4 44073000 */ mfc1 $a3, $f6 /* 195EB8 802675D8 0C01C694 */ jal fx_water_block /* 195EBC 802675DC 24040001 */ addiu $a0, $zero, 0x1 /* 195EC0 802675E0 C6220144 */ lwc1 $f2, 0x144($s1) /* 195EC4 802675E4 3C014120 */ lui $at, (0x41200000 >> 16) /* 195EC8 802675E8 44810000 */ mtc1 $at, $f0 /* 195ECC 802675EC 00000000 */ nop /* 195ED0 802675F0 46001081 */ sub.s $f2, $f2, $f0 /* 195ED4 802675F4 C6200148 */ lwc1 $f0, 0x148($s1) /* 195ED8 802675F8 46140000 */ add.s $f0, $f0, $f20 /* 195EDC 802675FC 44060000 */ mfc1 $a2, $f0 /* 195EE0 80267600 C620014C */ lwc1 $f0, 0x14C($s1) /* 195EE4 80267604 0000202D */ daddu $a0, $zero, $zero /* 195EE8 80267608 46140000 */ add.s $f0, $f0, $f20 /* 195EEC 8026760C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 195EF0 80267610 4481B000 */ mtc1 $at, $f22 /* 195EF4 80267614 44051000 */ mfc1 $a1, $f2 /* 195EF8 80267618 44070000 */ mfc1 $a3, $f0 /* 195EFC 8026761C 24100018 */ addiu $s0, $zero, 0x18 /* 195F00 80267620 E7B60010 */ swc1 $f22, 0x10($sp) /* 195F04 80267624 0C01C70C */ jal fx_water_splash /* 195F08 80267628 AFB00014 */ sw $s0, 0x14($sp) /* 195F0C 8026762C C6200144 */ lwc1 $f0, 0x144($s1) /* 195F10 80267630 3C014170 */ lui $at, (0x41700000 >> 16) /* 195F14 80267634 4481C000 */ mtc1 $at, $f24 /* 195F18 80267638 00000000 */ nop /* 195F1C 8026763C 46180001 */ sub.s $f0, $f0, $f24 /* 195F20 80267640 C6220148 */ lwc1 $f2, 0x148($s1) /* 195F24 80267644 44050000 */ mfc1 $a1, $f0 /* 195F28 80267648 3C014200 */ lui $at, (0x42000000 >> 16) /* 195F2C 8026764C 44810000 */ mtc1 $at, $f0 /* 195F30 80267650 00000000 */ nop /* 195F34 80267654 46001080 */ add.s $f2, $f2, $f0 /* 195F38 80267658 C620014C */ lwc1 $f0, 0x14C($s1) /* 195F3C 8026765C 46140000 */ add.s $f0, $f0, $f20 /* 195F40 80267660 44061000 */ mfc1 $a2, $f2 /* 195F44 80267664 44070000 */ mfc1 $a3, $f0 /* 195F48 80267668 0000202D */ daddu $a0, $zero, $zero /* 195F4C 8026766C E7B60010 */ swc1 $f22, 0x10($sp) /* 195F50 80267670 0C01C70C */ jal fx_water_splash /* 195F54 80267674 AFB00014 */ sw $s0, 0x14($sp) /* 195F58 80267678 C6200144 */ lwc1 $f0, 0x144($s1) /* 195F5C 8026767C 46180000 */ add.s $f0, $f0, $f24 /* 195F60 80267680 C6220148 */ lwc1 $f2, 0x148($s1) /* 195F64 80267684 44050000 */ mfc1 $a1, $f0 /* 195F68 80267688 3C0141B0 */ lui $at, (0x41B00000 >> 16) /* 195F6C 8026768C 44810000 */ mtc1 $at, $f0 /* 195F70 80267690 00000000 */ nop /* 195F74 80267694 46001080 */ add.s $f2, $f2, $f0 /* 195F78 80267698 C620014C */ lwc1 $f0, 0x14C($s1) /* 195F7C 8026769C 46140000 */ add.s $f0, $f0, $f20 /* 195F80 802676A0 44061000 */ mfc1 $a2, $f2 /* 195F84 802676A4 44070000 */ mfc1 $a3, $f0 /* 195F88 802676A8 24040001 */ addiu $a0, $zero, 0x1 /* 195F8C 802676AC E7B60010 */ swc1 $f22, 0x10($sp) /* 195F90 802676B0 0C01C70C */ jal fx_water_splash /* 195F94 802676B4 AFB00014 */ sw $s0, 0x14($sp) /* 195F98 802676B8 24040299 */ addiu $a0, $zero, 0x299 /* 195F9C 802676BC 0C05272D */ jal sfx_play_sound /* 195FA0 802676C0 AE4000A0 */ sw $zero, 0xA0($s2) /* 195FA4 802676C4 32620100 */ andi $v0, $s3, 0x100 .L802676C8: /* 195FA8 802676C8 10400009 */ beqz $v0, .L802676F0 /* 195FAC 802676CC 32620080 */ andi $v0, $s3, 0x80 /* 195FB0 802676D0 8242009B */ lb $v0, 0x9B($s2) /* 195FB4 802676D4 10400006 */ beqz $v0, .L802676F0 /* 195FB8 802676D8 32620080 */ andi $v0, $s3, 0x80 /* 195FBC 802676DC 8E42043C */ lw $v0, 0x43C($s2) /* 195FC0 802676E0 A240009B */ sb $zero, 0x9B($s2) /* 195FC4 802676E4 8C42000C */ lw $v0, 0xC($v0) /* 195FC8 802676E8 A4400024 */ sh $zero, 0x24($v0) /* 195FCC 802676EC 32620080 */ andi $v0, $s3, 0x80 .L802676F0: /* 195FD0 802676F0 1040000B */ beqz $v0, .L80267720 /* 195FD4 802676F4 00000000 */ nop /* 195FD8 802676F8 824200A4 */ lb $v0, 0xA4($s2) /* 195FDC 802676FC 10400008 */ beqz $v0, .L80267720 /* 195FE0 80267700 00000000 */ nop /* 195FE4 80267704 8E42043C */ lw $v0, 0x43C($s2) /* 195FE8 80267708 A24000A4 */ sb $zero, 0xA4($s2) /* 195FEC 8026770C 8C42000C */ lw $v0, 0xC($v0) /* 195FF0 80267710 A440001A */ sh $zero, 0x1A($v0) /* 195FF4 80267714 0C016914 */ jal remove_effect /* 195FF8 80267718 8E4400A8 */ lw $a0, 0xA8($s2) /* 195FFC 8026771C AE4000A8 */ sw $zero, 0xA8($s2) .L80267720: /* 196000 80267720 1280000B */ beqz $s4, .L80267750 /* 196004 80267724 3C020001 */ lui $v0, (0x10000 >> 16) /* 196008 80267728 02621024 */ and $v0, $s3, $v0 /* 19600C 8026772C 10400008 */ beqz $v0, .L80267750 /* 196010 80267730 3C04BFFF */ lui $a0, (0xBFFFFFFF >> 16) /* 196014 80267734 3C03800E */ lui $v1, %hi(gBattleStatus) /* 196018 80267738 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 19601C 8026773C A2800220 */ sb $zero, 0x220($s4) /* 196020 80267740 8C620000 */ lw $v0, 0x0($v1) /* 196024 80267744 3484FFFF */ ori $a0, $a0, (0xBFFFFFFF & 0xFFFF) /* 196028 80267748 00441024 */ and $v0, $v0, $a0 /* 19602C 8026774C AC620000 */ sw $v0, 0x0($v1) .L80267750: /* 196030 80267750 8FBF002C */ lw $ra, 0x2C($sp) /* 196034 80267754 8FB40028 */ lw $s4, 0x28($sp) /* 196038 80267758 8FB30024 */ lw $s3, 0x24($sp) /* 19603C 8026775C 8FB20020 */ lw $s2, 0x20($sp) /* 196040 80267760 8FB1001C */ lw $s1, 0x1C($sp) /* 196044 80267764 8FB00018 */ lw $s0, 0x18($sp) /* 196048 80267768 D7B80040 */ ldc1 $f24, 0x40($sp) /* 19604C 8026776C D7B60038 */ ldc1 $f22, 0x38($sp) /* 196050 80267770 D7B40030 */ ldc1 $f20, 0x30($sp) /* 196054 80267774 03E00008 */ jr $ra /* 196058 80267778 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void remove_player_buffs(s32 buffs) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; Actor* partner = battleStatus->partnerActor; ActorPart* playerActorParts = player->partsTable; if (buffs & PLAYER_BUFF_JUMP_CHARGE) { battleStatus->jumpCharge = 0; battleStatus->flags1 &= ~BS_FLAGS1_JUMP_CHARGED; } if (buffs & PLAYER_BUFF_HAMMER_CHARGE) { battleStatus->hammerCharge = 0; battleStatus->flags1 &= ~BS_FLAGS1_HAMMER_CHARGED; } if (buffs & PLAYER_BUFF_STONE) { player->stoneDuration = 0; player->stoneStatus = 0; } if (buffs & PLAYER_BUFF_HUSTLE) { battleStatus->hustleTurns = 0; battleStatus->flags1 &= ~BS_FLAGS1_HUSTLED; } if (buffs & PLAYER_BUFF_STATIC && (player->staticStatus != 0)) { player->staticDuration = 0; player->staticStatus = 0; remove_status_static(player->hudElementDataIndex); } if (buffs & PLAYER_BUFF_TRANSPARENT && (player->transparentStatus != 0)) { player->transparentDuration = 0; player->transparentStatus = 0; playerActorParts->flags &= ~ACTOR_PART_FLAG_100; remove_status_transparent(player->hudElementDataIndex); } if (buffs & PLAYER_BUFF_WATER_BLOCK && (battleStatus->waterBlockTurnsLeft != 0)) { battleStatus->waterBlockTurnsLeft = 0; battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].turnsLeft = 0; battleStatus->waterBlockEffect->flags |= FX_INSTANCE_FLAG_DISMISS; fx_water_block(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 0xA); fx_water_splash(0, player->currentPos.x - 10.0f, player->currentPos.y + 5.0f, player->currentPos.z + 5.0f, 1.0f, 0x18); fx_water_splash(0, player->currentPos.x - 15.0f, player->currentPos.y + 32.0f, player->currentPos.z + 5.0f, 1.0f, 0x18); fx_water_splash(1, player->currentPos.x + 15.0f, player->currentPos.y + 22.0f, player->currentPos.z + 5.0f, 1.0f, 0x18); battleStatus->waterBlockEffect = NULL; sfx_play_sound(SOUND_299); } if (buffs & PLAYER_BUFF_TURBO_CHARGE && (battleStatus->turboChargeTurnsLeft != 0)) { battleStatus->turboChargeTurnsLeft = 0; battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_TURBO_CHARGE].turnsLeft = 0; } if (buffs & PLAYER_BUFF_CLOUD_NINE && (battleStatus->cloudNineTurnsLeft != 0)) { battleStatus->cloudNineTurnsLeft = 0; battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_CLOUD_NINE].turnsLeft = 0; remove_effect(battleStatus->cloudNineEffect); battleStatus->cloudNineEffect = NULL; } if (partner != NULL && (buffs & PLAYER_BUFF_PARTNER_GLOWING)) { partner->isGlowing = FALSE; gBattleStatus.flags1 &= ~BS_FLAGS1_GOOMBARIO_CHARGED; } }