1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 07:07:09 +00:00

Match a few more functions (#446)

This commit is contained in:
Roman971 2020-10-13 05:15:42 +02:00 committed by GitHub
parent 08c4065a5e
commit 57db7ba526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 120 additions and 2077 deletions

View file

@ -1,210 +0,0 @@
.rdata
glabel D_801440D8
.asciz "PR_KAREIDOSCOPE_MODE=%d\n"
.balign 4
glabel D_801440F4
.asciz "\x1b[32m"
.balign 4
glabel D_801440FC
.asciz " \n"
# EUC-JP: | Kaleid Zone Player Forced Elimination
.balign 4
glabel D_80144120
.asciz "\x1b[m"
.balign 4
glabel D_80144124
.asciz "\x1b[32m"
.balign 4
glabel D_8014412C
.asciz " \n"
# EUC-JP: | Kaleid area Kaleidoscope loading
.balign 4
glabel D_80144150
.asciz "\x1b[m"
.balign 4
glabel D_80144154
.asciz "\x1b[32m"
.balign 4
glabel D_8014415C
.asciz " \n"
# EUC-JP: | Kaleid area Kaleidoscope emission
.balign 4
glabel D_80144180
.asciz "\x1b[m"
.balign 4
.text
glabel KaleidoScopeCall_Update
/* B33308 800BC168 27BDFFD8 */ addiu $sp, $sp, -0x28
/* B3330C 800BC16C 3C010001 */ lui $at, 1
/* B33310 800BC170 00817821 */ addu $t7, $a0, $at
/* B33314 800BC174 3C180001 */ lui $t8, 1
/* B33318 800BC178 AFBF0014 */ sw $ra, 0x14($sp)
/* B3331C 800BC17C AFA40028 */ sw $a0, 0x28($sp)
/* B33320 800BC180 0304C021 */ addu $t8, $t8, $a0
/* B33324 800BC184 AFAF0018 */ sw $t7, 0x18($sp)
/* B33328 800BC188 97180934 */ lhu $t8, 0x934($t8)
/* B3332C 800BC18C 3C190001 */ lui $t9, 1
/* B33330 800BC190 0324C821 */ addu $t9, $t9, $a0
/* B33334 800BC194 17000003 */ bnez $t8, .L800BC1A4
/* B33338 800BC198 8FA30028 */ lw $v1, 0x28($sp)
/* B3333C 800BC19C 97390936 */ lhu $t9, 0x936($t9)
/* B33340 800BC1A0 13200087 */ beqz $t9, .L800BC3C0
.L800BC1A4:
/* B33344 800BC1A4 3C010001 */ lui $at, (0x00010760 >> 16) # lui $at, 1
/* B33348 800BC1A8 34210760 */ ori $at, (0x00010760 & 0xFFFF) # ori $at, $at, 0x760
/* B3334C 800BC1AC 00611821 */ addu $v1, $v1, $at
/* B33350 800BC1B0 946201D4 */ lhu $v0, 0x1d4($v1)
/* B33354 800BC1B4 24040001 */ li $a0, 1
/* B33358 800BC1B8 24010008 */ li $at, 8
/* B3335C 800BC1BC 14820016 */ bne $a0, $v0, .L800BC218
/* B33360 800BC1C0 00000000 */ nop
/* B33364 800BC1C4 0C02CE3F */ jal ShrinkWindow_GetCurrentVal
/* B33368 800BC1C8 AFA3001C */ sw $v1, 0x1c($sp)
/* B3336C 800BC1CC 8FA3001C */ lw $v1, 0x1c($sp)
/* B33370 800BC1D0 1440007B */ bnez $v0, .L800BC3C0
/* B33374 800BC1D4 24040001 */ li $a0, 1
/* B33378 800BC1D8 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B3337C 800BC1DC 2442FA90 */ addiu $v0, %lo(gGameInfo) # addiu $v0, $v0, -0x570
/* B33380 800BC1E0 8C490000 */ lw $t1, ($v0)
/* B33384 800BC1E4 24080007 */ li $t0, 7
/* B33388 800BC1E8 240A0003 */ li $t2, 3
/* B3338C 800BC1EC A5281074 */ sh $t0, 0x1074($t1)
/* B33390 800BC1F0 8C4B0000 */ lw $t3, ($v0)
/* B33394 800BC1F4 A56A1078 */ sh $t2, 0x1078($t3)
/* B33398 800BC1F8 8C4C0000 */ lw $t4, ($v0)
/* B3339C 800BC1FC A5840190 */ sh $a0, 0x190($t4)
/* B333A0 800BC200 946F01D4 */ lhu $t7, 0x1d4($v1)
/* B333A4 800BC204 A46001E4 */ sh $zero, 0x1e4($v1)
/* B333A8 800BC208 A46001EC */ sh $zero, 0x1ec($v1)
/* B333AC 800BC20C 25F80001 */ addiu $t8, $t7, 1
/* B333B0 800BC210 1000006B */ b .L800BC3C0
/* B333B4 800BC214 A47801D4 */ sh $t8, 0x1d4($v1)
.L800BC218:
/* B333B8 800BC218 54410012 */ bnel $v0, $at, .L800BC264
/* B333BC 800BC21C 24010002 */ li $at, 2
/* B333C0 800BC220 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B333C4 800BC224 2442FA90 */ addiu $v0, %lo(gGameInfo) # addiu $v0, $v0, -0x570
/* B333C8 800BC228 8C590000 */ lw $t9, ($v0)
/* B333CC 800BC22C 240E0007 */ li $t6, 7
/* B333D0 800BC230 24080003 */ li $t0, 3
/* B333D4 800BC234 A72E1074 */ sh $t6, 0x1074($t9)
/* B333D8 800BC238 8C490000 */ lw $t1, ($v0)
/* B333DC 800BC23C A5281078 */ sh $t0, 0x1078($t1)
/* B333E0 800BC240 8C4A0000 */ lw $t2, ($v0)
/* B333E4 800BC244 A5440190 */ sh $a0, 0x190($t2)
/* B333E8 800BC248 946C01D4 */ lhu $t4, 0x1d4($v1)
/* B333EC 800BC24C A46001E4 */ sh $zero, 0x1e4($v1)
/* B333F0 800BC250 A46001EC */ sh $zero, 0x1ec($v1)
/* B333F4 800BC254 258D0001 */ addiu $t5, $t4, 1
/* B333F8 800BC258 10000059 */ b .L800BC3C0
/* B333FC 800BC25C A46D01D4 */ sh $t5, 0x1d4($v1)
/* B33400 800BC260 24010002 */ li $at, 2
.L800BC264:
/* B33404 800BC264 10410003 */ beq $v0, $at, .L800BC274
/* B33408 800BC268 24010009 */ li $at, 9
/* B3340C 800BC26C 14410015 */ bne $v0, $at, .L800BC2C4
/* B33410 800BC270 00000000 */ nop
.L800BC274:
/* B33414 800BC274 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B33418 800BC278 2442FA90 */ addiu $v0, %lo(gGameInfo) # addiu $v0, $v0, -0x570
/* B3341C 800BC27C 8C4F0000 */ lw $t7, ($v0)
/* B33420 800BC280 3C048014 */ lui $a0, %hi(D_801440D8) # $a0, 0x8014
/* B33424 800BC284 248440D8 */ addiu $a0, %lo(D_801440D8) # addiu $a0, $a0, 0x40d8
/* B33428 800BC288 85E50190 */ lh $a1, 0x190($t7)
/* B3342C 800BC28C 0C00084C */ jal osSyncPrintf
/* B33430 800BC290 AFA3001C */ sw $v1, 0x1c($sp)
/* B33434 800BC294 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016
/* B33438 800BC298 2442FA90 */ addiu $v0, %lo(gGameInfo) # addiu $v0, $v0, -0x570
/* B3343C 800BC29C 8C580000 */ lw $t8, ($v0)
/* B33440 800BC2A0 8FA3001C */ lw $v1, 0x1c($sp)
/* B33444 800BC2A4 870E0190 */ lh $t6, 0x190($t8)
/* B33448 800BC2A8 29C10003 */ slti $at, $t6, 3
/* B3344C 800BC2AC 54200045 */ bnezl $at, .L800BC3C4
/* B33450 800BC2B0 8FBF0014 */ lw $ra, 0x14($sp)
/* B33454 800BC2B4 947901D4 */ lhu $t9, 0x1d4($v1)
/* B33458 800BC2B8 27280001 */ addiu $t0, $t9, 1
/* B3345C 800BC2BC 10000040 */ b .L800BC3C0
/* B33460 800BC2C0 A46801D4 */ sh $t0, 0x1d4($v1)
.L800BC2C4:
/* B33464 800BC2C4 1040003E */ beqz $v0, .L800BC3C0
/* B33468 800BC2C8 3C028013 */ lui $v0, %hi(gKaleidoMgrCurOvl) # $v0, 0x8013
/* B3346C 800BC2CC 8C42D1DC */ lw $v0, %lo(gKaleidoMgrCurOvl)($v0)
/* B33470 800BC2D0 3C098013 */ lui $t1, %hi(gKaleidoMgrOverlayTable) # $t1, 0x8013
/* B33474 800BC2D4 2529D1A0 */ addiu $t1, %lo(gKaleidoMgrOverlayTable) # addiu $t1, $t1, -0x2e60
/* B33478 800BC2D8 1122001C */ beq $t1, $v0, .L800BC34C
/* B3347C 800BC2DC 00000000 */ nop
/* B33480 800BC2E0 1040000C */ beqz $v0, .L800BC314
/* B33484 800BC2E4 3C048014 */ lui $a0, %hi(D_801440F4) # $a0, 0x8014
/* B33488 800BC2E8 0C00084C */ jal osSyncPrintf
/* B3348C 800BC2EC 248440F4 */ addiu $a0, %lo(D_801440F4) # addiu $a0, $a0, 0x40f4
/* B33490 800BC2F0 3C048014 */ lui $a0, %hi(D_801440FC) # $a0, 0x8014
/* B33494 800BC2F4 0C00084C */ jal osSyncPrintf
/* B33498 800BC2F8 248440FC */ addiu $a0, %lo(D_801440FC) # addiu $a0, $a0, 0x40fc
/* B3349C 800BC2FC 3C048014 */ lui $a0, %hi(D_80144120) # $a0, 0x8014
/* B334A0 800BC300 0C00084C */ jal osSyncPrintf
/* B334A4 800BC304 24844120 */ addiu $a0, %lo(D_80144120) # addiu $a0, $a0, 0x4120
/* B334A8 800BC308 3C048013 */ lui $a0, %hi(gKaleidoMgrCurOvl) # $a0, 0x8013
/* B334AC 800BC30C 0C02EF58 */ jal KaleidoManager_ClearOvl
/* B334B0 800BC310 8C84D1DC */ lw $a0, %lo(gKaleidoMgrCurOvl)($a0)
.L800BC314:
/* B334B4 800BC314 3C048014 */ lui $a0, %hi(D_80144124) # $a0, 0x8014
/* B334B8 800BC318 0C00084C */ jal osSyncPrintf
/* B334BC 800BC31C 24844124 */ addiu $a0, %lo(D_80144124) # addiu $a0, $a0, 0x4124
/* B334C0 800BC320 3C048014 */ lui $a0, %hi(D_8014412C) # $a0, 0x8014
/* B334C4 800BC324 0C00084C */ jal osSyncPrintf
/* B334C8 800BC328 2484412C */ addiu $a0, %lo(D_8014412C) # addiu $a0, $a0, 0x412c
/* B334CC 800BC32C 3C048014 */ lui $a0, %hi(D_80144150) # $a0, 0x8014
/* B334D0 800BC330 0C00084C */ jal osSyncPrintf
/* B334D4 800BC334 24844150 */ addiu $a0, %lo(D_80144150) # addiu $a0, $a0, 0x4150
/* B334D8 800BC338 3C048013 */ lui $a0, %hi(gKaleidoMgrOverlayTable) # $a0, 0x8013
/* B334DC 800BC33C 0C02EF24 */ jal KaleidoManager_LoadOvl
/* B334E0 800BC340 2484D1A0 */ addiu $a0, %lo(gKaleidoMgrOverlayTable) # addiu $a0, $a0, -0x2e60
/* B334E4 800BC344 3C028013 */ lui $v0, %hi(gKaleidoMgrCurOvl) # $v0, 0x8013
/* B334E8 800BC348 8C42D1DC */ lw $v0, %lo(gKaleidoMgrCurOvl)($v0)
.L800BC34C:
/* B334EC 800BC34C 3C0A8013 */ lui $t2, %hi(gKaleidoMgrOverlayTable) # $t2, 0x8013
/* B334F0 800BC350 254AD1A0 */ addiu $t2, %lo(gKaleidoMgrOverlayTable) # addiu $t2, $t2, -0x2e60
/* B334F4 800BC354 1542001A */ bne $t2, $v0, .L800BC3C0
/* B334F8 800BC358 3C198016 */ lui $t9, %hi(sKaleidoScopeUpdateFunc) # $t9, 0x8016
/* B334FC 800BC35C 8F391390 */ lw $t9, %lo(sKaleidoScopeUpdateFunc)($t9)
/* B33500 800BC360 8FA40028 */ lw $a0, 0x28($sp)
/* B33504 800BC364 0320F809 */ jalr $t9
/* B33508 800BC368 00000000 */ nop
/* B3350C 800BC36C 8FAB0018 */ lw $t3, 0x18($sp)
/* B33510 800BC370 956C0934 */ lhu $t4, 0x934($t3)
/* B33514 800BC374 55800013 */ bnezl $t4, .L800BC3C4
/* B33518 800BC378 8FBF0014 */ lw $ra, 0x14($sp)
/* B3351C 800BC37C 956D0936 */ lhu $t5, 0x936($t3)
/* B33520 800BC380 3C048014 */ lui $a0, %hi(D_80144154) # $a0, 0x8014
/* B33524 800BC384 55A0000F */ bnezl $t5, .L800BC3C4
/* B33528 800BC388 8FBF0014 */ lw $ra, 0x14($sp)
/* B3352C 800BC38C 0C00084C */ jal osSyncPrintf
/* B33530 800BC390 24844154 */ addiu $a0, %lo(D_80144154) # addiu $a0, $a0, 0x4154
/* B33534 800BC394 3C048014 */ lui $a0, %hi(D_8014415C) # $a0, 0x8014
/* B33538 800BC398 0C00084C */ jal osSyncPrintf
/* B3353C 800BC39C 2484415C */ addiu $a0, %lo(D_8014415C) # addiu $a0, $a0, 0x415c
/* B33540 800BC3A0 3C048014 */ lui $a0, %hi(D_80144180) # $a0, 0x8014
/* B33544 800BC3A4 0C00084C */ jal osSyncPrintf
/* B33548 800BC3A8 24844180 */ addiu $a0, %lo(D_80144180) # addiu $a0, $a0, 0x4180
/* B3354C 800BC3AC 3C048013 */ lui $a0, %hi(gKaleidoMgrOverlayTable) # $a0, 0x8013
/* B33550 800BC3B0 0C02EF58 */ jal KaleidoManager_ClearOvl
/* B33554 800BC3B4 2484D1A0 */ addiu $a0, %lo(gKaleidoMgrOverlayTable) # addiu $a0, $a0, -0x2e60
/* B33558 800BC3B8 0C02EFF0 */ jal KaleidoScopeCall_LoadPlayer
/* B3355C 800BC3BC 00000000 */ nop
.L800BC3C0:
/* B33560 800BC3C0 8FBF0014 */ lw $ra, 0x14($sp)
.L800BC3C4:
/* B33564 800BC3C4 27BD0028 */ addiu $sp, $sp, 0x28
/* B33568 800BC3C8 03E00008 */ jr $ra
/* B3356C 800BC3CC 00000000 */ nop

View file

@ -1,940 +0,0 @@
.rdata
glabel D_8013E2D8
.asciz "../z_parameter.c"
.balign 4
glabel D_8013E2EC
.asciz "../z_parameter.c"
.balign 4
.text
glabel Interface_DrawItemButtons
/* AFFE5C 80088CBC 27BDFEA8 */ addiu $sp, $sp, -0x158
/* AFFE60 80088CC0 AFBF002C */ sw $ra, 0x2c($sp)
/* AFFE64 80088CC4 AFA40158 */ sw $a0, 0x158($sp)
/* AFFE68 80088CC8 8C8F1C44 */ lw $t7, 0x1c44($a0)
/* AFFE6C 80088CCC 3C068014 */ lui $a2, %hi(D_8013E2D8) # $a2, 0x8014
/* AFFE70 80088CD0 24C6E2D8 */ addiu $a2, %lo(D_8013E2D8) # addiu $a2, $a2, -0x1d28
/* AFFE74 80088CD4 AFAF0150 */ sw $t7, 0x150($sp)
/* AFFE78 80088CD8 8C850000 */ lw $a1, ($a0)
/* AFFE7C 80088CDC 27A40130 */ addiu $a0, $sp, 0x130
/* AFFE80 80088CE0 24070B54 */ li $a3, 2900
/* AFFE84 80088CE4 0C031AB1 */ jal Graph_OpenDisps
/* AFFE88 80088CE8 AFA50140 */ sw $a1, 0x140($sp)
/* AFFE8C 80088CEC 8FAA0140 */ lw $t2, 0x140($sp)
/* AFFE90 80088CF0 3C19E700 */ lui $t9, 0xe700
/* AFFE94 80088CF4 3C0EFC11 */ lui $t6, (0xFC119623 >> 16) # lui $t6, 0xfc11
/* AFFE98 80088CF8 8D4402B0 */ lw $a0, 0x2b0($t2)
/* AFFE9C 80088CFC 35CE9623 */ ori $t6, (0xFC119623 & 0xFFFF) # ori $t6, $t6, 0x9623
/* AFFEA0 80088D00 3C0B8016 */ lui $t3, %hi(gGameInfo) # $t3, 0x8016
/* AFFEA4 80088D04 24980008 */ addiu $t8, $a0, 8
/* AFFEA8 80088D08 AD5802B0 */ sw $t8, 0x2b0($t2)
/* AFFEAC 80088D0C AC800004 */ sw $zero, 4($a0)
/* AFFEB0 80088D10 AC990000 */ sw $t9, ($a0)
/* AFFEB4 80088D14 8D4402B0 */ lw $a0, 0x2b0($t2)
/* AFFEB8 80088D18 3C18FF2F */ lui $t8, (0xFF2FFFFF >> 16) # lui $t8, 0xff2f
/* AFFEBC 80088D1C 3718FFFF */ ori $t8, (0xFF2FFFFF & 0xFFFF) # ori $t8, $t8, 0xffff
/* AFFEC0 80088D20 248F0008 */ addiu $t7, $a0, 8
/* AFFEC4 80088D24 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* AFFEC8 80088D28 AC980004 */ sw $t8, 4($a0)
/* AFFECC 80088D2C AC8E0000 */ sw $t6, ($a0)
/* AFFED0 80088D30 8D4402B0 */ lw $a0, 0x2b0($t2)
/* AFFED4 80088D34 3C0DFA00 */ lui $t5, 0xfa00
/* AFFED8 80088D38 256BFA90 */ addiu $t3, %lo(gGameInfo) # addiu $t3, $t3, -0x570
/* AFFEDC 80088D3C 24990008 */ addiu $t9, $a0, 8
/* AFFEE0 80088D40 AD5902B0 */ sw $t9, 0x2b0($t2)
/* AFFEE4 80088D44 AC8D0000 */ sw $t5, ($a0)
/* AFFEE8 80088D48 8D620000 */ lw $v0, ($t3)
/* AFFEEC 80088D4C 8FAC0158 */ lw $t4, 0x158($sp)
/* AFFEF0 80088D50 3C010001 */ lui $at, (0x000104F0 >> 16) # lui $at, 1
/* AFFEF4 80088D54 844F07EE */ lh $t7, 0x7ee($v0)
/* AFFEF8 80088D58 342104F0 */ ori $at, (0x000104F0 & 0xFFFF) # ori $at, $at, 0x4f0
/* AFFEFC 80088D5C 01816021 */ addu $t4, $t4, $at
/* AFFF00 80088D60 31EE00FF */ andi $t6, $t7, 0xff
/* AFFF04 80088D64 844F07EA */ lh $t7, 0x7ea($v0)
/* AFFF08 80088D68 000EC200 */ sll $t8, $t6, 8
/* AFFF0C 80088D6C 3C050200 */ lui $a1, %hi(D_02000A00) # $a1, 0x200
/* AFFF10 80088D70 000F7600 */ sll $t6, $t7, 0x18
/* AFFF14 80088D74 844F07EC */ lh $t7, 0x7ec($v0)
/* AFFF18 80088D78 030EC825 */ or $t9, $t8, $t6
/* AFFF1C 80088D7C 24A50A00 */ addiu $a1, %lo(D_02000A00) # addiu $a1, $a1, 0xa00
/* AFFF20 80088D80 31F800FF */ andi $t8, $t7, 0xff
/* AFFF24 80088D84 00187400 */ sll $t6, $t8, 0x10
/* AFFF28 80088D88 95980248 */ lhu $t8, 0x248($t4)
/* AFFF2C 80088D8C 032E7825 */ or $t7, $t9, $t6
/* AFFF30 80088D90 24060020 */ li $a2, 32
/* AFFF34 80088D94 331900FF */ andi $t9, $t8, 0xff
/* AFFF38 80088D98 01F97025 */ or $t6, $t7, $t9
/* AFFF3C 80088D9C AC8E0004 */ sw $t6, 4($a0)
/* AFFF40 80088DA0 8D4402B0 */ lw $a0, 0x2b0($t2)
/* AFFF44 80088DA4 241900FF */ li $t9, 255
/* AFFF48 80088DA8 3C0FFB00 */ lui $t7, 0xfb00
/* AFFF4C 80088DAC 24980008 */ addiu $t8, $a0, 8
/* AFFF50 80088DB0 AD5802B0 */ sw $t8, 0x2b0($t2)
/* AFFF54 80088DB4 AC990004 */ sw $t9, 4($a0)
/* AFFF58 80088DB8 AC8F0000 */ sw $t7, ($a0)
/* AFFF5C 80088DBC 8D620000 */ lw $v0, ($t3)
/* AFFF60 80088DC0 8D4402B0 */ lw $a0, 0x2b0($t2)
/* AFFF64 80088DC4 24070020 */ li $a3, 32
/* AFFF68 80088DC8 844E0820 */ lh $t6, 0x820($v0)
/* AFFF6C 80088DCC AFAE0010 */ sw $t6, 0x10($sp)
/* AFFF70 80088DD0 84580828 */ lh $t8, 0x828($v0)
/* AFFF74 80088DD4 AFB80014 */ sw $t8, 0x14($sp)
/* AFFF78 80088DD8 84430FB4 */ lh $v1, 0xfb4($v0)
/* AFFF7C 80088DDC AFA30018 */ sw $v1, 0x18($sp)
/* AFFF80 80088DE0 AFA3001C */ sw $v1, 0x1c($sp)
/* AFFF84 80088DE4 84480830 */ lh $t0, 0x830($v0)
/* AFFF88 80088DE8 AFAC003C */ sw $t4, 0x3c($sp)
/* AFFF8C 80088DEC AFAA0140 */ sw $t2, 0x140($sp)
/* AFFF90 80088DF0 00084040 */ sll $t0, $t0, 1
/* AFFF94 80088DF4 3108FFFF */ andi $t0, $t0, 0xffff
/* AFFF98 80088DF8 AFA80020 */ sw $t0, 0x20($sp)
/* AFFF9C 80088DFC 0C0210A6 */ jal Gfx_TextureIA8
/* AFFFA0 80088E00 AFA80024 */ sw $t0, 0x24($sp)
/* AFFFA4 80088E04 8FAA0140 */ lw $t2, 0x140($sp)
/* AFFFA8 80088E08 8FAC003C */ lw $t4, 0x3c($sp)
/* AFFFAC 80088E0C 244F0008 */ addiu $t7, $v0, 8
/* AFFFB0 80088E10 AD4202B0 */ sw $v0, 0x2b0($t2)
/* AFFFB4 80088E14 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* AFFFB8 80088E18 3C08E700 */ lui $t0, 0xe700
/* AFFFBC 80088E1C AC480000 */ sw $t0, ($v0)
/* AFFFC0 80088E20 AC400004 */ sw $zero, 4($v0)
/* AFFFC4 80088E24 8D4402B0 */ lw $a0, 0x2b0($t2)
/* AFFFC8 80088E28 3C0B8016 */ lui $t3, %hi(gGameInfo) # $t3, 0x8016
/* AFFFCC 80088E2C 3C0DFA00 */ lui $t5, 0xfa00
/* AFFFD0 80088E30 24990008 */ addiu $t9, $a0, 8
/* AFFFD4 80088E34 AD5902B0 */ sw $t9, 0x2b0($t2)
/* AFFFD8 80088E38 256BFA90 */ addiu $t3, %lo(gGameInfo) # addiu $t3, $t3, -0x570
/* AFFFDC 80088E3C AC8D0000 */ sw $t5, ($a0)
/* AFFFE0 80088E40 8D620000 */ lw $v0, ($t3)
/* AFFFE4 80088E44 3C06E400 */ lui $a2, 0xe400
/* AFFFE8 80088E48 3C07E100 */ lui $a3, 0xe100
/* AFFFEC 80088E4C 844E07E6 */ lh $t6, 0x7e6($v0)
/* AFFFF0 80088E50 3C01E400 */ lui $at, 0xe400
/* AFFFF4 80088E54 31D800FF */ andi $t8, $t6, 0xff
/* AFFFF8 80088E58 844E07E2 */ lh $t6, 0x7e2($v0)
/* AFFFFC 80088E5C 00187A00 */ sll $t7, $t8, 8
/* B00000 80088E60 000EC600 */ sll $t8, $t6, 0x18
/* B00004 80088E64 844E07E4 */ lh $t6, 0x7e4($v0)
/* B00008 80088E68 01F8C825 */ or $t9, $t7, $t8
/* B0000C 80088E6C 31CF00FF */ andi $t7, $t6, 0xff
/* B00010 80088E70 000FC400 */ sll $t8, $t7, 0x10
/* B00014 80088E74 958F024A */ lhu $t7, 0x24a($t4)
/* B00018 80088E78 03387025 */ or $t6, $t9, $t8
/* B0001C 80088E7C 31F900FF */ andi $t9, $t7, 0xff
/* B00020 80088E80 01D9C025 */ or $t8, $t6, $t9
/* B00024 80088E84 AC980004 */ sw $t8, 4($a0)
/* B00028 80088E88 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0002C 80088E8C 248F0008 */ addiu $t7, $a0, 8
/* B00030 80088E90 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00034 80088E94 8D620000 */ lw $v0, ($t3)
/* B00038 80088E98 84450FB6 */ lh $a1, 0xfb6($v0)
/* B0003C 80088E9C 844E082A */ lh $t6, 0x82a($v0)
/* B00040 80088EA0 00AEC821 */ addu $t9, $a1, $t6
/* B00044 80088EA4 0019C080 */ sll $t8, $t9, 2
/* B00048 80088EA8 84590822 */ lh $t9, 0x822($v0)
/* B0004C 80088EAC 330F0FFF */ andi $t7, $t8, 0xfff
/* B00050 80088EB0 01E67025 */ or $t6, $t7, $a2
/* B00054 80088EB4 0325C021 */ addu $t8, $t9, $a1
/* B00058 80088EB8 00187880 */ sll $t7, $t8, 2
/* B0005C 80088EBC 31F90FFF */ andi $t9, $t7, 0xfff
/* B00060 80088EC0 0019C300 */ sll $t8, $t9, 0xc
/* B00064 80088EC4 01D87825 */ or $t7, $t6, $t8
/* B00068 80088EC8 AC8F0000 */ sw $t7, ($a0)
/* B0006C 80088ECC 8D620000 */ lw $v0, ($t3)
/* B00070 80088ED0 8459082A */ lh $t9, 0x82a($v0)
/* B00074 80088ED4 844F0822 */ lh $t7, 0x822($v0)
/* B00078 80088ED8 00197080 */ sll $t6, $t9, 2
/* B0007C 80088EDC 31D80FFF */ andi $t8, $t6, 0xfff
/* B00080 80088EE0 000FC880 */ sll $t9, $t7, 2
/* B00084 80088EE4 332E0FFF */ andi $t6, $t9, 0xfff
/* B00088 80088EE8 000E7B00 */ sll $t7, $t6, 0xc
/* B0008C 80088EEC 030FC825 */ or $t9, $t8, $t7
/* B00090 80088EF0 AC990004 */ sw $t9, 4($a0)
/* B00094 80088EF4 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00098 80088EF8 3C0FF100 */ lui $t7, 0xf100
/* B0009C 80088EFC 248E0008 */ addiu $t6, $a0, 8
/* B000A0 80088F00 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B000A4 80088F04 AC800004 */ sw $zero, 4($a0)
/* B000A8 80088F08 AC870000 */ sw $a3, ($a0)
/* B000AC 80088F0C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B000B0 80088F10 24980008 */ addiu $t8, $a0, 8
/* B000B4 80088F14 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B000B8 80088F18 AC8F0000 */ sw $t7, ($a0)
/* B000BC 80088F1C 8D790000 */ lw $t9, ($t3)
/* B000C0 80088F20 87230832 */ lh $v1, 0x832($t9)
/* B000C4 80088F24 00031840 */ sll $v1, $v1, 1
/* B000C8 80088F28 3063FFFF */ andi $v1, $v1, 0xffff
/* B000CC 80088F2C 00037400 */ sll $t6, $v1, 0x10
/* B000D0 80088F30 006EC025 */ or $t8, $v1, $t6
/* B000D4 80088F34 AC980004 */ sw $t8, 4($a0)
/* B000D8 80088F38 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B000DC 80088F3C 248F0008 */ addiu $t7, $a0, 8
/* B000E0 80088F40 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B000E4 80088F44 AC8D0000 */ sw $t5, ($a0)
/* B000E8 80088F48 8D620000 */ lw $v0, ($t3)
/* B000EC 80088F4C 845907E6 */ lh $t9, 0x7e6($v0)
/* B000F0 80088F50 332E00FF */ andi $t6, $t9, 0xff
/* B000F4 80088F54 845907E2 */ lh $t9, 0x7e2($v0)
/* B000F8 80088F58 000EC200 */ sll $t8, $t6, 8
/* B000FC 80088F5C 00197600 */ sll $t6, $t9, 0x18
/* B00100 80088F60 845907E4 */ lh $t9, 0x7e4($v0)
/* B00104 80088F64 030E7825 */ or $t7, $t8, $t6
/* B00108 80088F68 333800FF */ andi $t8, $t9, 0xff
/* B0010C 80088F6C 00187400 */ sll $t6, $t8, 0x10
/* B00110 80088F70 9598024C */ lhu $t8, 0x24c($t4)
/* B00114 80088F74 01EEC825 */ or $t9, $t7, $t6
/* B00118 80088F78 330F00FF */ andi $t7, $t8, 0xff
/* B0011C 80088F7C 032F7025 */ or $t6, $t9, $t7
/* B00120 80088F80 AC8E0004 */ sw $t6, 4($a0)
/* B00124 80088F84 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00128 80088F88 24980008 */ addiu $t8, $a0, 8
/* B0012C 80088F8C AD5802B0 */ sw $t8, 0x2b0($t2)
/* B00130 80088F90 8D620000 */ lw $v0, ($t3)
/* B00134 80088F94 84450FB8 */ lh $a1, 0xfb8($v0)
/* B00138 80088F98 8459082C */ lh $t9, 0x82c($v0)
/* B0013C 80088F9C 00B97821 */ addu $t7, $a1, $t9
/* B00140 80088FA0 000F7080 */ sll $t6, $t7, 2
/* B00144 80088FA4 844F0824 */ lh $t7, 0x824($v0)
/* B00148 80088FA8 31D80FFF */ andi $t8, $t6, 0xfff
/* B0014C 80088FAC 0306C825 */ or $t9, $t8, $a2
/* B00150 80088FB0 01E57021 */ addu $t6, $t7, $a1
/* B00154 80088FB4 000EC080 */ sll $t8, $t6, 2
/* B00158 80088FB8 330F0FFF */ andi $t7, $t8, 0xfff
/* B0015C 80088FBC 000F7300 */ sll $t6, $t7, 0xc
/* B00160 80088FC0 032EC025 */ or $t8, $t9, $t6
/* B00164 80088FC4 AC980000 */ sw $t8, ($a0)
/* B00168 80088FC8 8D620000 */ lw $v0, ($t3)
/* B0016C 80088FCC 844F082C */ lh $t7, 0x82c($v0)
/* B00170 80088FD0 84580824 */ lh $t8, 0x824($v0)
/* B00174 80088FD4 000FC880 */ sll $t9, $t7, 2
/* B00178 80088FD8 332E0FFF */ andi $t6, $t9, 0xfff
/* B0017C 80088FDC 00187880 */ sll $t7, $t8, 2
/* B00180 80088FE0 31F90FFF */ andi $t9, $t7, 0xfff
/* B00184 80088FE4 0019C300 */ sll $t8, $t9, 0xc
/* B00188 80088FE8 01D87825 */ or $t7, $t6, $t8
/* B0018C 80088FEC AC8F0004 */ sw $t7, 4($a0)
/* B00190 80088FF0 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00194 80088FF4 3C18F100 */ lui $t8, 0xf100
/* B00198 80088FF8 24990008 */ addiu $t9, $a0, 8
/* B0019C 80088FFC AD5902B0 */ sw $t9, 0x2b0($t2)
/* B001A0 80089000 AC800004 */ sw $zero, 4($a0)
/* B001A4 80089004 AC870000 */ sw $a3, ($a0)
/* B001A8 80089008 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B001AC 8008900C 248E0008 */ addiu $t6, $a0, 8
/* B001B0 80089010 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B001B4 80089014 AC980000 */ sw $t8, ($a0)
/* B001B8 80089018 8D6F0000 */ lw $t7, ($t3)
/* B001BC 8008901C 85E30834 */ lh $v1, 0x834($t7)
/* B001C0 80089020 00031840 */ sll $v1, $v1, 1
/* B001C4 80089024 3063FFFF */ andi $v1, $v1, 0xffff
/* B001C8 80089028 0003CC00 */ sll $t9, $v1, 0x10
/* B001CC 8008902C 00797025 */ or $t6, $v1, $t9
/* B001D0 80089030 AC8E0004 */ sw $t6, 4($a0)
/* B001D4 80089034 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B001D8 80089038 24980008 */ addiu $t8, $a0, 8
/* B001DC 8008903C AD5802B0 */ sw $t8, 0x2b0($t2)
/* B001E0 80089040 AC8D0000 */ sw $t5, ($a0)
/* B001E4 80089044 8D620000 */ lw $v0, ($t3)
/* B001E8 80089048 844F07E6 */ lh $t7, 0x7e6($v0)
/* B001EC 8008904C 31F900FF */ andi $t9, $t7, 0xff
/* B001F0 80089050 844F07E2 */ lh $t7, 0x7e2($v0)
/* B001F4 80089054 00197200 */ sll $t6, $t9, 8
/* B001F8 80089058 000FCE00 */ sll $t9, $t7, 0x18
/* B001FC 8008905C 844F07E4 */ lh $t7, 0x7e4($v0)
/* B00200 80089060 01D9C025 */ or $t8, $t6, $t9
/* B00204 80089064 31EE00FF */ andi $t6, $t7, 0xff
/* B00208 80089068 000ECC00 */ sll $t9, $t6, 0x10
/* B0020C 8008906C 958E024E */ lhu $t6, 0x24e($t4)
/* B00210 80089070 03197825 */ or $t7, $t8, $t9
/* B00214 80089074 31D800FF */ andi $t8, $t6, 0xff
/* B00218 80089078 01F8C825 */ or $t9, $t7, $t8
/* B0021C 8008907C AC990004 */ sw $t9, 4($a0)
/* B00220 80089080 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00224 80089084 248E0008 */ addiu $t6, $a0, 8
/* B00228 80089088 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B0022C 8008908C 8D620000 */ lw $v0, ($t3)
/* B00230 80089090 84450FBA */ lh $a1, 0xfba($v0)
/* B00234 80089094 844F082E */ lh $t7, 0x82e($v0)
/* B00238 80089098 00AFC021 */ addu $t8, $a1, $t7
/* B0023C 8008909C 0018C880 */ sll $t9, $t8, 2
/* B00240 800890A0 84580826 */ lh $t8, 0x826($v0)
/* B00244 800890A4 332E0FFF */ andi $t6, $t9, 0xfff
/* B00248 800890A8 01C17825 */ or $t7, $t6, $at
/* B0024C 800890AC 0305C821 */ addu $t9, $t8, $a1
/* B00250 800890B0 00197080 */ sll $t6, $t9, 2
/* B00254 800890B4 31D80FFF */ andi $t8, $t6, 0xfff
/* B00258 800890B8 0018CB00 */ sll $t9, $t8, 0xc
/* B0025C 800890BC 01F97025 */ or $t6, $t7, $t9
/* B00260 800890C0 AC8E0000 */ sw $t6, ($a0)
/* B00264 800890C4 8D620000 */ lw $v0, ($t3)
/* B00268 800890C8 8458082E */ lh $t8, 0x82e($v0)
/* B0026C 800890CC 844E0826 */ lh $t6, 0x826($v0)
/* B00270 800890D0 3C020001 */ lui $v0, 1
/* B00274 800890D4 00187880 */ sll $t7, $t8, 2
/* B00278 800890D8 31F90FFF */ andi $t9, $t7, 0xfff
/* B0027C 800890DC 000EC080 */ sll $t8, $t6, 2
/* B00280 800890E0 330F0FFF */ andi $t7, $t8, 0xfff
/* B00284 800890E4 000F7300 */ sll $t6, $t7, 0xc
/* B00288 800890E8 032EC025 */ or $t8, $t9, $t6
/* B0028C 800890EC AC980004 */ sw $t8, 4($a0)
/* B00290 800890F0 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00294 800890F4 3C19E100 */ lui $t9, 0xe100
/* B00298 800890F8 3C18F100 */ lui $t8, 0xf100
/* B0029C 800890FC 248F0008 */ addiu $t7, $a0, 8
/* B002A0 80089100 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B002A4 80089104 AC800004 */ sw $zero, 4($a0)
/* B002A8 80089108 AC990000 */ sw $t9, ($a0)
/* B002AC 8008910C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B002B0 80089110 248E0008 */ addiu $t6, $a0, 8
/* B002B4 80089114 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B002B8 80089118 AC980000 */ sw $t8, ($a0)
/* B002BC 8008911C 8D6F0000 */ lw $t7, ($t3)
/* B002C0 80089120 85E30836 */ lh $v1, 0x836($t7)
/* B002C4 80089124 00031840 */ sll $v1, $v1, 1
/* B002C8 80089128 3063FFFF */ andi $v1, $v1, 0xffff
/* B002CC 8008912C 0003CC00 */ sll $t9, $v1, 0x10
/* B002D0 80089130 00797025 */ or $t6, $v1, $t9
/* B002D4 80089134 AC8E0004 */ sw $t6, 4($a0)
/* B002D8 80089138 8FB80158 */ lw $t8, 0x158($sp)
/* B002DC 8008913C 00581021 */ addu $v0, $v0, $t8
/* B002E0 80089140 94420934 */ lhu $v0, 0x934($v0)
/* B002E4 80089144 28410008 */ slti $at, $v0, 8
/* B002E8 80089148 14200003 */ bnez $at, .L80089158
/* B002EC 8008914C 28410012 */ slti $at, $v0, 0x12
/* B002F0 80089150 542000E4 */ bnezl $at, .L800894E4
/* B002F4 80089154 859801F8 */ lh $t8, 0x1f8($t4)
.L80089158:
/* B002F8 80089158 8FA20158 */ lw $v0, 0x158($sp)
/* B002FC 8008915C 3C010001 */ lui $at, 1
/* B00300 80089160 00411021 */ addu $v0, $v0, $at
/* B00304 80089164 944F0934 */ lhu $t7, 0x934($v0)
/* B00308 80089168 55E00005 */ bnezl $t7, .L80089180
/* B0030C 8008916C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00310 80089170 94590936 */ lhu $t9, 0x936($v0)
/* B00314 80089174 532000DB */ beql $t9, $zero, .L800894E4
/* B00318 80089178 859801F8 */ lh $t8, 0x1f8($t4)
/* B0031C 8008917C 8D4402B0 */ lw $a0, 0x2b0($t2)
.L80089180:
/* B00320 80089180 3C017878 */ lui $at, (0x78787800 >> 16) # lui $at, 0x7878
/* B00324 80089184 34217800 */ ori $at, (0x78787800 & 0xFFFF) # ori $at, $at, 0x7800
/* B00328 80089188 248E0008 */ addiu $t6, $a0, 8
/* B0032C 8008918C AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B00330 80089190 AC800004 */ sw $zero, 4($a0)
/* B00334 80089194 AC880000 */ sw $t0, ($a0)
/* B00338 80089198 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0033C 8008919C 3C1F8016 */ lui $ra, %hi(gSaveContext) # $ra, 0x8016
/* B00340 800891A0 27FFE660 */ addiu $ra, %lo(gSaveContext) # addiu $ra, $ra, -0x19a0
/* B00344 800891A4 24980008 */ addiu $t8, $a0, 8
/* B00348 800891A8 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B0034C 800891AC AC8D0000 */ sw $t5, ($a0)
/* B00350 800891B0 858F0256 */ lh $t7, 0x256($t4)
/* B00354 800891B4 3C038012 */ lui $v1, %hi(sStartButtonLeftPos) # $v1, 0x8012
/* B00358 800891B8 24635AE4 */ addiu $v1, %lo(sStartButtonLeftPos) # addiu $v1, $v1, 0x5ae4
/* B0035C 800891BC 31F900FF */ andi $t9, $t7, 0xff
/* B00360 800891C0 03217025 */ or $t6, $t9, $at
/* B00364 800891C4 AC8E0004 */ sw $t6, 4($a0)
/* B00368 800891C8 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0036C 800891CC 3C01E400 */ lui $at, 0xe400
/* B00370 800891D0 24980008 */ addiu $t8, $a0, 8
/* B00374 800891D4 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B00378 800891D8 93EF1409 */ lbu $t7, 0x1409($ra)
/* B0037C 800891DC 000FC840 */ sll $t9, $t7, 1
/* B00380 800891E0 00797021 */ addu $t6, $v1, $t9
/* B00384 800891E4 85D80000 */ lh $t8, ($t6)
/* B00388 800891E8 270F0016 */ addiu $t7, $t8, 0x16
/* B0038C 800891EC 000FC880 */ sll $t9, $t7, 2
/* B00390 800891F0 332E0FFF */ andi $t6, $t9, 0xfff
/* B00394 800891F4 000EC300 */ sll $t8, $t6, 0xc
/* B00398 800891F8 03017825 */ or $t7, $t8, $at
/* B0039C 800891FC 35F9009C */ ori $t9, $t7, 0x9c
/* B003A0 80089200 AC990000 */ sw $t9, ($a0)
/* B003A4 80089204 93EE1409 */ lbu $t6, 0x1409($ra)
/* B003A8 80089208 2401FF00 */ li $at, -256
/* B003AC 8008920C 000EC040 */ sll $t8, $t6, 1
/* B003B0 80089210 00787821 */ addu $t7, $v1, $t8
/* B003B4 80089214 85F90000 */ lh $t9, ($t7)
/* B003B8 80089218 00197080 */ sll $t6, $t9, 2
/* B003BC 8008921C 31D80FFF */ andi $t8, $t6, 0xfff
/* B003C0 80089220 00187B00 */ sll $t7, $t8, 0xc
/* B003C4 80089224 35F90044 */ ori $t9, $t7, 0x44
/* B003C8 80089228 AC990004 */ sw $t9, 4($a0)
/* B003CC 8008922C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B003D0 80089230 3C18E100 */ lui $t8, 0xe100
/* B003D4 80089234 3C19F100 */ lui $t9, 0xf100
/* B003D8 80089238 248E0008 */ addiu $t6, $a0, 8
/* B003DC 8008923C AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B003E0 80089240 AC800004 */ sw $zero, 4($a0)
/* B003E4 80089244 AC980000 */ sw $t8, ($a0)
/* B003E8 80089248 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B003EC 8008924C 3C0E05B6 */ lui $t6, (0x05B605B6 >> 16) # lui $t6, 0x5b6
/* B003F0 80089250 35CE05B6 */ ori $t6, (0x05B605B6 & 0xFFFF) # ori $t6, $t6, 0x5b6
/* B003F4 80089254 248F0008 */ addiu $t7, $a0, 8
/* B003F8 80089258 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B003FC 8008925C AC8E0004 */ sw $t6, 4($a0)
/* B00400 80089260 AC990000 */ sw $t9, ($a0)
/* B00404 80089264 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00408 80089268 24980008 */ addiu $t8, $a0, 8
/* B0040C 8008926C AD5802B0 */ sw $t8, 0x2b0($t2)
/* B00410 80089270 AC800004 */ sw $zero, 4($a0)
/* B00414 80089274 AC880000 */ sw $t0, ($a0)
/* B00418 80089278 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0041C 8008927C 248F0008 */ addiu $t7, $a0, 8
/* B00420 80089280 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00424 80089284 AC8D0000 */ sw $t5, ($a0)
/* B00428 80089288 85990256 */ lh $t9, 0x256($t4)
/* B0042C 8008928C 332E00FF */ andi $t6, $t9, 0xff
/* B00430 80089290 01C1C025 */ or $t8, $t6, $at
/* B00434 80089294 AC980004 */ sw $t8, 4($a0)
/* B00438 80089298 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0043C 8008929C 3C19FB00 */ lui $t9, 0xfb00
/* B00440 800892A0 3C18FC30 */ lui $t8, (0xFC309661 >> 16) # lui $t8, 0xfc30
/* B00444 800892A4 248F0008 */ addiu $t7, $a0, 8
/* B00448 800892A8 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B0044C 800892AC AC800004 */ sw $zero, 4($a0)
/* B00450 800892B0 AC990000 */ sw $t9, ($a0)
/* B00454 800892B4 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00458 800892B8 3C0F552E */ lui $t7, (0x552EFF7F >> 16) # lui $t7, 0x552e
/* B0045C 800892BC 35EFFF7F */ ori $t7, (0x552EFF7F & 0xFFFF) # ori $t7, $t7, 0xff7f
/* B00460 800892C0 248E0008 */ addiu $t6, $a0, 8
/* B00464 800892C4 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B00468 800892C8 37189661 */ ori $t8, (0xFC309661 & 0xFFFF) # ori $t8, $t8, 0x9661
/* B0046C 800892CC AC980000 */ sw $t8, ($a0)
/* B00470 800892D0 AC8F0004 */ sw $t7, 4($a0)
/* B00474 800892D4 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00478 800892D8 3C0EFD70 */ lui $t6, 0xfd70
/* B0047C 800892DC 3C0142C8 */ lui $at, 0x42c8
/* B00480 800892E0 24990008 */ addiu $t9, $a0, 8
/* B00484 800892E4 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B00488 800892E8 AC8E0000 */ sw $t6, ($a0)
/* B0048C 800892EC 8D980134 */ lw $t8, 0x134($t4)
/* B00490 800892F0 3C0EF570 */ li $t6, 0xF5700000 # 0.000000
/* B00494 800892F4 44814000 */ mtc1 $at, $f8
/* B00498 800892F8 270F0300 */ addiu $t7, $t8, 0x300
/* B0049C 800892FC AC8F0004 */ sw $t7, 4($a0)
/* B004A0 80089300 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B004A4 80089304 3C180700 */ lui $t8, 0x700
/* B004A8 80089308 3C014480 */ lui $at, 0x4480
/* B004AC 8008930C 24990008 */ addiu $t9, $a0, 8
/* B004B0 80089310 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B004B4 80089314 AC980004 */ sw $t8, 4($a0)
/* B004B8 80089318 AC8E0000 */ sw $t6, ($a0)
/* B004BC 8008931C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B004C0 80089320 3C19E600 */ lui $t9, 0xe600
/* B004C4 80089324 3C18F300 */ lui $t8, 0xf300
/* B004C8 80089328 248F0008 */ addiu $t7, $a0, 8
/* B004CC 8008932C AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B004D0 80089330 AC800004 */ sw $zero, 4($a0)
/* B004D4 80089334 AC990000 */ sw $t9, ($a0)
/* B004D8 80089338 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B004DC 8008933C 3C0F070B */ lui $t7, (0x070BF2AB >> 16) # lui $t7, 0x70b
/* B004E0 80089340 35EFF2AB */ ori $t7, (0x070BF2AB & 0xFFFF) # ori $t7, $t7, 0xf2ab
/* B004E4 80089344 248E0008 */ addiu $t6, $a0, 8
/* B004E8 80089348 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B004EC 8008934C AC8F0004 */ sw $t7, 4($a0)
/* B004F0 80089350 AC980000 */ sw $t8, ($a0)
/* B004F4 80089354 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B004F8 80089358 3C18F560 */ lui $t8, (0xF5600600 >> 16) # lui $t8, 0xf560
/* B004FC 8008935C 37180600 */ ori $t8, (0xF5600600 & 0xFFFF) # ori $t8, $t8, 0x600
/* B00500 80089360 24990008 */ addiu $t9, $a0, 8
/* B00504 80089364 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B00508 80089368 AC800004 */ sw $zero, 4($a0)
/* B0050C 8008936C AC880000 */ sw $t0, ($a0)
/* B00510 80089370 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00514 80089374 3C19F200 */ li $t9, 0xF2000000 # 0.000000
/* B00518 80089378 44815000 */ mtc1 $at, $f10
/* B0051C 8008937C 248E0008 */ addiu $t6, $a0, 8
/* B00520 80089380 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B00524 80089384 AC800004 */ sw $zero, 4($a0)
/* B00528 80089388 AC980000 */ sw $t8, ($a0)
/* B0052C 8008938C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00530 80089390 3C0E000B */ lui $t6, (0x000BC03C >> 16) # lui $t6, 0xb
/* B00534 80089394 35CEC03C */ ori $t6, (0x000BC03C & 0xFFFF) # ori $t6, $t6, 0xc03c
/* B00538 80089398 248F0008 */ addiu $t7, $a0, 8
/* B0053C 8008939C AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00540 800893A0 AC8E0004 */ sw $t6, 4($a0)
/* B00544 800893A4 AC990000 */ sw $t9, ($a0)
/* B00548 800893A8 93EF1409 */ lbu $t7, 0x1409($ra)
/* B0054C 800893AC 8D780000 */ lw $t8, ($t3)
/* B00550 800893B0 3C014240 */ li $at, 0x42400000 # 0.000000
/* B00554 800893B4 000FC840 */ sll $t9, $t7, 1
/* B00558 800893B8 03197021 */ addu $t6, $t8, $t9
/* B0055C 800893BC 85CF07F4 */ lh $t7, 0x7f4($t6)
/* B00560 800893C0 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00564 800893C4 448F2000 */ mtc1 $t7, $f4
/* B00568 800893C8 248F0008 */ addiu $t7, $a0, 8
/* B0056C 800893CC AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00570 800893D0 468021A0 */ cvt.s.w $f6, $f4
/* B00574 800893D4 44812000 */ mtc1 $at, $f4
/* B00578 800893D8 3C014180 */ li $at, 0x41800000 # 0.000000
/* B0057C 800893DC 93F91409 */ lbu $t9, 0x1409($ra)
/* B00580 800893E0 8D780000 */ lw $t8, ($t3)
/* B00584 800893E4 46083003 */ div.s $f0, $f6, $f8
/* B00588 800893E8 00197040 */ sll $t6, $t9, 1
/* B0058C 800893EC 030E1021 */ addu $v0, $t8, $t6
/* B00590 800893F0 844F07FA */ lh $t7, 0x7fa($v0)
/* B00594 800893F4 46005403 */ div.s $f16, $f10, $f0
/* B00598 800893F8 44815000 */ mtc1 $at, $f10
/* B0059C 800893FC 3C01E400 */ lui $at, 0xe400
/* B005A0 80089400 46002183 */ div.s $f6, $f4, $f0
/* B005A4 80089404 4600848D */ trunc.w.s $f18, $f16
/* B005A8 80089408 44059000 */ mfc1 $a1, $f18
/* B005AC 8008940C 00000000 */ nop
/* B005B0 80089410 00052C00 */ sll $a1, $a1, 0x10
/* B005B4 80089414 00052C03 */ sra $a1, $a1, 0x10
/* B005B8 80089418 30A3FFFF */ andi $v1, $a1, 0xffff
/* B005BC 8008941C 46005403 */ div.s $f16, $f10, $f0
/* B005C0 80089420 4600320D */ trunc.w.s $f8, $f6
/* B005C4 80089424 44064000 */ mfc1 $a2, $f8
/* B005C8 80089428 00000000 */ nop
/* B005CC 8008942C 00063400 */ sll $a2, $a2, 0x10
/* B005D0 80089430 00063403 */ sra $a2, $a2, 0x10
/* B005D4 80089434 4600848D */ trunc.w.s $f18, $f16
/* B005D8 80089438 44079000 */ mfc1 $a3, $f18
/* B005DC 8008943C 00000000 */ nop
/* B005E0 80089440 00073C00 */ sll $a3, $a3, 0x10
/* B005E4 80089444 00073C03 */ sra $a3, $a3, 0x10
/* B005E8 80089448 01E7C821 */ addu $t9, $t7, $a3
/* B005EC 8008944C 0019C080 */ sll $t8, $t9, 2
/* B005F0 80089450 84590800 */ lh $t9, 0x800($v0)
/* B005F4 80089454 330E0FFF */ andi $t6, $t8, 0xfff
/* B005F8 80089458 01C17825 */ or $t7, $t6, $at
/* B005FC 8008945C 0326C021 */ addu $t8, $t9, $a2
/* B00600 80089460 00187080 */ sll $t6, $t8, 2
/* B00604 80089464 31D90FFF */ andi $t9, $t6, 0xfff
/* B00608 80089468 0019C300 */ sll $t8, $t9, 0xc
/* B0060C 8008946C 01F87025 */ or $t6, $t7, $t8
/* B00610 80089470 AC8E0000 */ sw $t6, ($a0)
/* B00614 80089474 93EF1409 */ lbu $t7, 0x1409($ra)
/* B00618 80089478 8D790000 */ lw $t9, ($t3)
/* B0061C 8008947C 000FC040 */ sll $t8, $t7, 1
/* B00620 80089480 03381021 */ addu $v0, $t9, $t8
/* B00624 80089484 844E07FA */ lh $t6, 0x7fa($v0)
/* B00628 80089488 84580800 */ lh $t8, 0x800($v0)
/* B0062C 8008948C 000E7880 */ sll $t7, $t6, 2
/* B00630 80089490 31F90FFF */ andi $t9, $t7, 0xfff
/* B00634 80089494 00187080 */ sll $t6, $t8, 2
/* B00638 80089498 31CF0FFF */ andi $t7, $t6, 0xfff
/* B0063C 8008949C 000FC300 */ sll $t8, $t7, 0xc
/* B00640 800894A0 03387025 */ or $t6, $t9, $t8
/* B00644 800894A4 AC8E0004 */ sw $t6, 4($a0)
/* B00648 800894A8 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0064C 800894AC 3C19E100 */ lui $t9, 0xe100
/* B00650 800894B0 3C0EF100 */ lui $t6, 0xf100
/* B00654 800894B4 248F0008 */ addiu $t7, $a0, 8
/* B00658 800894B8 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B0065C 800894BC AC800004 */ sw $zero, 4($a0)
/* B00660 800894C0 AC990000 */ sw $t9, ($a0)
/* B00664 800894C4 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00668 800894C8 00037C00 */ sll $t7, $v1, 0x10
/* B0066C 800894CC 01E3C825 */ or $t9, $t7, $v1
/* B00670 800894D0 24980008 */ addiu $t8, $a0, 8
/* B00674 800894D4 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B00678 800894D8 AC990004 */ sw $t9, 4($a0)
/* B0067C 800894DC AC8E0000 */ sw $t6, ($a0)
/* B00680 800894E0 859801F8 */ lh $t8, 0x1f8($t4)
.L800894E4:
/* B00684 800894E4 3C1F8016 */ lui $ra, %hi(gSaveContext) # $ra, 0x8016
/* B00688 800894E8 27FFE660 */ addiu $ra, %lo(gSaveContext) # addiu $ra, $ra, -0x19a0
/* B0068C 800894EC 13000104 */ beqz $t8, .L80089900
/* B00690 800894F0 8FAE0158 */ lw $t6, 0x158($sp)
/* B00694 800894F4 3C010001 */ lui $at, 1
/* B00698 800894F8 01C11021 */ addu $v0, $t6, $at
/* B0069C 800894FC 944F0934 */ lhu $t7, 0x934($v0)
/* B006A0 80089500 55E00100 */ bnezl $t7, .L80089904
/* B006A4 80089504 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B006A8 80089508 94590936 */ lhu $t9, 0x936($v0)
/* B006AC 8008950C 572000FD */ bnezl $t9, .L80089904
/* B006B0 80089510 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B006B4 80089514 91D81D6C */ lbu $t8, 0x1d6c($t6)
/* B006B8 80089518 3C068012 */ lui $a2, %hi(sCUpInvisible) # $a2, 0x8012
/* B006BC 8008951C 24C65A10 */ addiu $a2, %lo(sCUpInvisible) # addiu $a2, $a2, 0x5a10
/* B006C0 80089520 570000F8 */ bnezl $t8, .L80089904
/* B006C4 80089524 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B006C8 80089528 94CF0000 */ lhu $t7, ($a2)
/* B006CC 8008952C 15E000E8 */ bnez $t7, .L800898D0
/* B006D0 80089530 00000000 */ nop
/* B006D4 80089534 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B006D8 80089538 24010001 */ li $at, 1
/* B006DC 8008953C 24990008 */ addiu $t9, $a0, 8
/* B006E0 80089540 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B006E4 80089544 AC800004 */ sw $zero, 4($a0)
/* B006E8 80089548 AC880000 */ sw $t0, ($a0)
/* B006EC 8008954C 97E213EA */ lhu $v0, 0x13ea($ra)
/* B006F0 80089550 10410005 */ beq $v0, $at, .L80089568
/* B006F4 80089554 24010002 */ li $at, 2
/* B006F8 80089558 10410003 */ beq $v0, $at, .L80089568
/* B006FC 8008955C 24010005 */ li $at, 5
/* B00700 80089560 14410003 */ bne $v0, $at, .L80089570
/* B00704 80089564 8FAE0150 */ lw $t6, 0x150($sp)
.L80089568:
/* B00708 80089568 1000001D */ b .L800895E0
/* B0070C 8008956C 00004825 */ move $t1, $zero
.L80089570:
/* B00710 80089570 8DD8067C */ lw $t8, 0x67c($t6)
/* B00714 80089574 8FA40158 */ lw $a0, 0x158($sp)
/* B00718 80089578 00187A80 */ sll $t7, $t8, 0xa
/* B0071C 8008957C 05E00015 */ bltz $t7, .L800895D4
/* B00720 80089580 00000000 */ nop
/* B00724 80089584 AFAA0140 */ sw $t2, 0x140($sp)
/* B00728 80089588 0C023CBE */ jal func_8008F2F8
/* B0072C 8008958C AFAC003C */ sw $t4, 0x3c($sp)
/* B00730 80089590 3C068012 */ lui $a2, %hi(sCUpInvisible) # $a2, 0x8012
/* B00734 80089594 3C0B8016 */ lui $t3, %hi(gGameInfo) # $t3, 0x8016
/* B00738 80089598 3C1F8016 */ lui $ra, %hi(gSaveContext) # $ra, 0x8016
/* B0073C 8008959C 24010004 */ li $at, 4
/* B00740 800895A0 27FFE660 */ addiu $ra, %lo(gSaveContext) # addiu $ra, $ra, -0x19a0
/* B00744 800895A4 256BFA90 */ addiu $t3, %lo(gGameInfo) # addiu $t3, $t3, -0x570
/* B00748 800895A8 24C65A10 */ addiu $a2, %lo(sCUpInvisible) # addiu $a2, $a2, 0x5a10
/* B0074C 800895AC 3C08E700 */ lui $t0, 0xe700
/* B00750 800895B0 8FAA0140 */ lw $t2, 0x140($sp)
/* B00754 800895B4 8FAC003C */ lw $t4, 0x3c($sp)
/* B00758 800895B8 10410006 */ beq $v0, $at, .L800895D4
/* B0075C 800895BC 3C0DFA00 */ lui $t5, 0xfa00
/* B00760 800895C0 8FB90150 */ lw $t9, 0x150($sp)
/* B00764 800895C4 8F2E0680 */ lw $t6, 0x680($t9)
/* B00768 800895C8 000EC340 */ sll $t8, $t6, 0xd
/* B0076C 800895CC 07030004 */ bgezl $t8, .L800895E0
/* B00770 800895D0 85890250 */ lh $t1, 0x250($t4)
.L800895D4:
/* B00774 800895D4 10000002 */ b .L800895E0
/* B00778 800895D8 24090046 */ li $t1, 70
/* B0077C 800895DC 85890250 */ lh $t1, 0x250($t4)
.L800895E0:
/* B00780 800895E0 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00784 800895E4 312500FF */ andi $a1, $t1, 0xff
/* B00788 800895E8 3C01E400 */ lui $at, 0xe400
/* B0078C 800895EC 248F0008 */ addiu $t7, $a0, 8
/* B00790 800895F0 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00794 800895F4 AC8D0000 */ sw $t5, ($a0)
/* B00798 800895F8 8D620000 */ lw $v0, ($t3)
/* B0079C 800895FC 845907E6 */ lh $t9, 0x7e6($v0)
/* B007A0 80089600 332E00FF */ andi $t6, $t9, 0xff
/* B007A4 80089604 845907E2 */ lh $t9, 0x7e2($v0)
/* B007A8 80089608 000EC200 */ sll $t8, $t6, 8
/* B007AC 8008960C 00197600 */ sll $t6, $t9, 0x18
/* B007B0 80089610 845907E4 */ lh $t9, 0x7e4($v0)
/* B007B4 80089614 030E7825 */ or $t7, $t8, $t6
/* B007B8 80089618 333800FF */ andi $t8, $t9, 0xff
/* B007BC 8008961C 00187400 */ sll $t6, $t8, 0x10
/* B007C0 80089620 01EEC825 */ or $t9, $t7, $t6
/* B007C4 80089624 0325C025 */ or $t8, $t9, $a1
/* B007C8 80089628 AC980004 */ sw $t8, 4($a0)
/* B007CC 8008962C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B007D0 80089630 3C19FF2F */ lui $t9, (0xFF2FFFFF >> 16) # lui $t9, 0xff2f
/* B007D4 80089634 3C0EFC11 */ lui $t6, (0xFC119623 >> 16) # lui $t6, 0xfc11
/* B007D8 80089638 248F0008 */ addiu $t7, $a0, 8
/* B007DC 8008963C AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B007E0 80089640 35CE9623 */ ori $t6, (0xFC119623 & 0xFFFF) # ori $t6, $t6, 0x9623
/* B007E4 80089644 3739FFFF */ ori $t9, (0xFF2FFFFF & 0xFFFF) # ori $t9, $t9, 0xffff
/* B007E8 80089648 AC990004 */ sw $t9, 4($a0)
/* B007EC 8008964C AC8E0000 */ sw $t6, ($a0)
/* B007F0 80089650 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B007F4 80089654 24980008 */ addiu $t8, $a0, 8
/* B007F8 80089658 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B007FC 8008965C 8D620000 */ lw $v0, ($t3)
/* B00800 80089660 844F0812 */ lh $t7, 0x812($v0)
/* B00804 80089664 25EE0010 */ addiu $t6, $t7, 0x10
/* B00808 80089668 000EC880 */ sll $t9, $t6, 2
/* B0080C 8008966C 844E0810 */ lh $t6, 0x810($v0)
/* B00810 80089670 33380FFF */ andi $t8, $t9, 0xfff
/* B00814 80089674 03017825 */ or $t7, $t8, $at
/* B00818 80089678 25D90010 */ addiu $t9, $t6, 0x10
/* B0081C 8008967C 0019C080 */ sll $t8, $t9, 2
/* B00820 80089680 330E0FFF */ andi $t6, $t8, 0xfff
/* B00824 80089684 000ECB00 */ sll $t9, $t6, 0xc
/* B00828 80089688 01F9C025 */ or $t8, $t7, $t9
/* B0082C 8008968C AC980000 */ sw $t8, ($a0)
/* B00830 80089690 8D620000 */ lw $v0, ($t3)
/* B00834 80089694 2401FF00 */ li $at, -256
/* B00838 80089698 844E0812 */ lh $t6, 0x812($v0)
/* B0083C 8008969C 84580810 */ lh $t8, 0x810($v0)
/* B00840 800896A0 000E7880 */ sll $t7, $t6, 2
/* B00844 800896A4 31F90FFF */ andi $t9, $t7, 0xfff
/* B00848 800896A8 00187080 */ sll $t6, $t8, 2
/* B0084C 800896AC 31CF0FFF */ andi $t7, $t6, 0xfff
/* B00850 800896B0 000FC300 */ sll $t8, $t7, 0xc
/* B00854 800896B4 03387025 */ or $t6, $t9, $t8
/* B00858 800896B8 AC8E0004 */ sw $t6, 4($a0)
/* B0085C 800896BC 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00860 800896C0 3C19E100 */ lui $t9, 0xe100
/* B00864 800896C4 3C0EF100 */ lui $t6, 0xf100
/* B00868 800896C8 248F0008 */ addiu $t7, $a0, 8
/* B0086C 800896CC AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00870 800896D0 AC800004 */ sw $zero, 4($a0)
/* B00874 800896D4 AC990000 */ sw $t9, ($a0)
/* B00878 800896D8 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0087C 800896DC 3C0F0800 */ lui $t7, (0x08000800 >> 16) # lui $t7, 0x800
/* B00880 800896E0 35EF0800 */ ori $t7, (0x08000800 & 0xFFFF) # ori $t7, $t7, 0x800
/* B00884 800896E4 24980008 */ addiu $t8, $a0, 8
/* B00888 800896E8 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B0088C 800896EC AC8F0004 */ sw $t7, 4($a0)
/* B00890 800896F0 AC8E0000 */ sw $t6, ($a0)
/* B00894 800896F4 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00898 800896F8 00A17025 */ or $t6, $a1, $at
/* B0089C 800896FC 3C01E400 */ lui $at, 0xe400
/* B008A0 80089700 24990008 */ addiu $t9, $a0, 8
/* B008A4 80089704 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B008A8 80089708 AC800004 */ sw $zero, 4($a0)
/* B008AC 8008970C AC880000 */ sw $t0, ($a0)
/* B008B0 80089710 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B008B4 80089714 3C19FB00 */ lui $t9, 0xfb00
/* B008B8 80089718 24980008 */ addiu $t8, $a0, 8
/* B008BC 8008971C AD5802B0 */ sw $t8, 0x2b0($t2)
/* B008C0 80089720 AC8E0004 */ sw $t6, 4($a0)
/* B008C4 80089724 AC8D0000 */ sw $t5, ($a0)
/* B008C8 80089728 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B008CC 8008972C 3C0EFC30 */ lui $t6, (0xFC309661 >> 16) # lui $t6, 0xfc30
/* B008D0 80089730 35CE9661 */ ori $t6, (0xFC309661 & 0xFFFF) # ori $t6, $t6, 0x9661
/* B008D4 80089734 248F0008 */ addiu $t7, $a0, 8
/* B008D8 80089738 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B008DC 8008973C AC800004 */ sw $zero, 4($a0)
/* B008E0 80089740 AC990000 */ sw $t9, ($a0)
/* B008E4 80089744 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B008E8 80089748 3C0F552E */ lui $t7, (0x552EFF7F >> 16) # lui $t7, 0x552e
/* B008EC 8008974C 35EFFF7F */ ori $t7, (0x552EFF7F & 0xFFFF) # ori $t7, $t7, 0xff7f
/* B008F0 80089750 24980008 */ addiu $t8, $a0, 8
/* B008F4 80089754 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B008F8 80089758 AC8F0004 */ sw $t7, 4($a0)
/* B008FC 8008975C AC8E0000 */ sw $t6, ($a0)
/* B00900 80089760 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00904 80089764 3C18FD70 */ lui $t8, 0xfd70
/* B00908 80089768 24990008 */ addiu $t9, $a0, 8
/* B0090C 8008976C AD5902B0 */ sw $t9, 0x2b0($t2)
/* B00910 80089770 AC980000 */ sw $t8, ($a0)
/* B00914 80089774 93EE1409 */ lbu $t6, 0x1409($ra)
/* B00918 80089778 3C198012 */ lui $t9, %hi(sCUpLabelTextures)
/* B0091C 8008977C 000E7880 */ sll $t7, $t6, 2
/* B00920 80089780 032FC821 */ addu $t9, $t9, $t7
/* B00924 80089784 8F395AD8 */ lw $t9, %lo(sCUpLabelTextures)($t9)
/* B00928 80089788 3C0F0700 */ lui $t7, 0x700
/* B0092C 8008978C 3C0EF570 */ lui $t6, 0xf570
/* B00930 80089790 AC990004 */ sw $t9, 4($a0)
/* B00934 80089794 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00938 80089798 24980008 */ addiu $t8, $a0, 8
/* B0093C 8008979C AD5802B0 */ sw $t8, 0x2b0($t2)
/* B00940 800897A0 AC8F0004 */ sw $t7, 4($a0)
/* B00944 800897A4 AC8E0000 */ sw $t6, ($a0)
/* B00948 800897A8 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B0094C 800897AC 3C18E600 */ lui $t8, 0xe600
/* B00950 800897B0 3C0FF300 */ lui $t7, 0xf300
/* B00954 800897B4 24990008 */ addiu $t9, $a0, 8
/* B00958 800897B8 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B0095C 800897BC AC800004 */ sw $zero, 4($a0)
/* B00960 800897C0 AC980000 */ sw $t8, ($a0)
/* B00964 800897C4 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00968 800897C8 3C190703 */ lui $t9, (0x0703F400 >> 16) # lui $t9, 0x703
/* B0096C 800897CC 3739F400 */ ori $t9, (0x0703F400 & 0xFFFF) # ori $t9, $t9, 0xf400
/* B00970 800897D0 248E0008 */ addiu $t6, $a0, 8
/* B00974 800897D4 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B00978 800897D8 AC990004 */ sw $t9, 4($a0)
/* B0097C 800897DC AC8F0000 */ sw $t7, ($a0)
/* B00980 800897E0 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00984 800897E4 3C0FF560 */ lui $t7, (0xF5600400 >> 16) # lui $t7, 0xf560
/* B00988 800897E8 35EF0400 */ ori $t7, (0xF5600400 & 0xFFFF) # ori $t7, $t7, 0x400
/* B0098C 800897EC 24980008 */ addiu $t8, $a0, 8
/* B00990 800897F0 AD5802B0 */ sw $t8, 0x2b0($t2)
/* B00994 800897F4 AC800004 */ sw $zero, 4($a0)
/* B00998 800897F8 AC880000 */ sw $t0, ($a0)
/* B0099C 800897FC 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B009A0 80089800 3C18F200 */ lui $t8, 0xf200
/* B009A4 80089804 248E0008 */ addiu $t6, $a0, 8
/* B009A8 80089808 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B009AC 8008980C AC800004 */ sw $zero, 4($a0)
/* B009B0 80089810 AC8F0000 */ sw $t7, ($a0)
/* B009B4 80089814 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B009B8 80089818 3C0E0007 */ lui $t6, (0x0007C01C >> 16) # lui $t6, 7
/* B009BC 8008981C 35CEC01C */ ori $t6, (0x0007C01C & 0xFFFF) # ori $t6, $t6, 0xc01c
/* B009C0 80089820 24990008 */ addiu $t9, $a0, 8
/* B009C4 80089824 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B009C8 80089828 AC8E0004 */ sw $t6, 4($a0)
/* B009CC 8008982C AC980000 */ sw $t8, ($a0)
/* B009D0 80089830 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B009D4 80089834 248F0008 */ addiu $t7, $a0, 8
/* B009D8 80089838 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B009DC 8008983C 8D620000 */ lw $v0, ($t3)
/* B009E0 80089840 84590546 */ lh $t9, 0x546($v0)
/* B009E4 80089844 27380008 */ addiu $t8, $t9, 8
/* B009E8 80089848 00187080 */ sll $t6, $t8, 2
/* B009EC 8008984C 84580544 */ lh $t8, 0x544($v0)
/* B009F0 80089850 31CF0FFF */ andi $t7, $t6, 0xfff
/* B009F4 80089854 01E1C825 */ or $t9, $t7, $at
/* B009F8 80089858 270E0020 */ addiu $t6, $t8, 0x20
/* B009FC 8008985C 000E7880 */ sll $t7, $t6, 2
/* B00A00 80089860 31F80FFF */ andi $t8, $t7, 0xfff
/* B00A04 80089864 00187300 */ sll $t6, $t8, 0xc
/* B00A08 80089868 032E7825 */ or $t7, $t9, $t6
/* B00A0C 8008986C AC8F0000 */ sw $t7, ($a0)
/* B00A10 80089870 8D620000 */ lw $v0, ($t3)
/* B00A14 80089874 84580546 */ lh $t8, 0x546($v0)
/* B00A18 80089878 844F0544 */ lh $t7, 0x544($v0)
/* B00A1C 8008987C 0018C880 */ sll $t9, $t8, 2
/* B00A20 80089880 332E0FFF */ andi $t6, $t9, 0xfff
/* B00A24 80089884 000FC080 */ sll $t8, $t7, 2
/* B00A28 80089888 33190FFF */ andi $t9, $t8, 0xfff
/* B00A2C 8008988C 00197B00 */ sll $t7, $t9, 0xc
/* B00A30 80089890 01CFC025 */ or $t8, $t6, $t7
/* B00A34 80089894 AC980004 */ sw $t8, 4($a0)
/* B00A38 80089898 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00A3C 8008989C 3C0EE100 */ lui $t6, 0xe100
/* B00A40 800898A0 3C18F100 */ lui $t8, 0xf100
/* B00A44 800898A4 24990008 */ addiu $t9, $a0, 8
/* B00A48 800898A8 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B00A4C 800898AC AC800004 */ sw $zero, 4($a0)
/* B00A50 800898B0 AC8E0000 */ sw $t6, ($a0)
/* B00A54 800898B4 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00A58 800898B8 3C190400 */ lui $t9, (0x04000400 >> 16) # lui $t9, 0x400
/* B00A5C 800898BC 37390400 */ ori $t9, (0x04000400 & 0xFFFF) # ori $t9, $t9, 0x400
/* B00A60 800898C0 248F0008 */ addiu $t7, $a0, 8
/* B00A64 800898C4 AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00A68 800898C8 AC990004 */ sw $t9, 4($a0)
/* B00A6C 800898CC AC980000 */ sw $t8, ($a0)
.L800898D0:
/* B00A70 800898D0 3C028012 */ lui $v0, %hi(sCUpTimer) # $v0, 0x8012
/* B00A74 800898D4 24425A14 */ addiu $v0, %lo(sCUpTimer) # addiu $v0, $v0, 0x5a14
/* B00A78 800898D8 944E0000 */ lhu $t6, ($v0)
/* B00A7C 800898DC 25CFFFFF */ addiu $t7, $t6, -1
/* B00A80 800898E0 31F8FFFF */ andi $t8, $t7, 0xffff
/* B00A84 800898E4 17000006 */ bnez $t8, .L80089900
/* B00A88 800898E8 A44F0000 */ sh $t7, ($v0)
/* B00A8C 800898EC 94D90000 */ lhu $t9, ($a2)
/* B00A90 800898F0 240F000A */ li $t7, 10
/* B00A94 800898F4 A44F0000 */ sh $t7, ($v0)
/* B00A98 800898F8 3B2E0001 */ xori $t6, $t9, 1
/* B00A9C 800898FC A4CE0000 */ sh $t6, ($a2)
.L80089900:
/* B00AA0 80089900 8D4402B0 */ lw $a0, 0x2b0($t2)
.L80089904:
/* B00AA4 80089904 24090001 */ li $t1, 1
/* B00AA8 80089908 24980008 */ addiu $t8, $a0, 8
/* B00AAC 8008990C AD5802B0 */ sw $t8, 0x2b0($t2)
/* B00AB0 80089910 AC800004 */ sw $zero, 4($a0)
/* B00AB4 80089914 AC880000 */ sw $t0, ($a0)
/* B00AB8 80089918 03E9C821 */ addu $t9, $ra, $t1
.L8008991C:
/* B00ABC 8008991C 932E0068 */ lbu $t6, 0x68($t9)
/* B00AC0 80089920 29C100F1 */ slti $at, $t6, 0xf1
/* B00AC4 80089924 14200065 */ bnez $at, .L80089ABC
/* B00AC8 80089928 24010001 */ li $at, 1
/* B00ACC 8008992C 55210016 */ bnel $t1, $at, .L80089988
/* B00AD0 80089930 24010002 */ li $at, 2
/* B00AD4 80089934 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00AD8 80089938 248F0008 */ addiu $t7, $a0, 8
/* B00ADC 8008993C AD4F02B0 */ sw $t7, 0x2b0($t2)
/* B00AE0 80089940 AC8D0000 */ sw $t5, ($a0)
/* B00AE4 80089944 8D620000 */ lw $v0, ($t3)
/* B00AE8 80089948 845807E6 */ lh $t8, 0x7e6($v0)
/* B00AEC 8008994C 331900FF */ andi $t9, $t8, 0xff
/* B00AF0 80089950 845807E2 */ lh $t8, 0x7e2($v0)
/* B00AF4 80089954 00197200 */ sll $t6, $t9, 8
/* B00AF8 80089958 0018CE00 */ sll $t9, $t8, 0x18
/* B00AFC 8008995C 845807E4 */ lh $t8, 0x7e4($v0)
/* B00B00 80089960 01D97825 */ or $t7, $t6, $t9
/* B00B04 80089964 330E00FF */ andi $t6, $t8, 0xff
/* B00B08 80089968 000ECC00 */ sll $t9, $t6, 0x10
/* B00B0C 8008996C 958E024A */ lhu $t6, 0x24a($t4)
/* B00B10 80089970 01F9C025 */ or $t8, $t7, $t9
/* B00B14 80089974 31CF00FF */ andi $t7, $t6, 0xff
/* B00B18 80089978 030FC825 */ or $t9, $t8, $t7
/* B00B1C 8008997C 1000002B */ b .L80089A2C
/* B00B20 80089980 AC990004 */ sw $t9, 4($a0)
/* B00B24 80089984 24010002 */ li $at, 2
.L80089988:
/* B00B28 80089988 55210016 */ bnel $t1, $at, .L800899E4
/* B00B2C 8008998C 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00B30 80089990 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00B34 80089994 248E0008 */ addiu $t6, $a0, 8
/* B00B38 80089998 AD4E02B0 */ sw $t6, 0x2b0($t2)
/* B00B3C 8008999C AC8D0000 */ sw $t5, ($a0)
/* B00B40 800899A0 8D620000 */ lw $v0, ($t3)
/* B00B44 800899A4 845807E6 */ lh $t8, 0x7e6($v0)
/* B00B48 800899A8 330F00FF */ andi $t7, $t8, 0xff
/* B00B4C 800899AC 845807E2 */ lh $t8, 0x7e2($v0)
/* B00B50 800899B0 000FCA00 */ sll $t9, $t7, 8
/* B00B54 800899B4 00187E00 */ sll $t7, $t8, 0x18
/* B00B58 800899B8 845807E4 */ lh $t8, 0x7e4($v0)
/* B00B5C 800899BC 032F7025 */ or $t6, $t9, $t7
/* B00B60 800899C0 331900FF */ andi $t9, $t8, 0xff
/* B00B64 800899C4 00197C00 */ sll $t7, $t9, 0x10
/* B00B68 800899C8 9599024C */ lhu $t9, 0x24c($t4)
/* B00B6C 800899CC 01CFC025 */ or $t8, $t6, $t7
/* B00B70 800899D0 332E00FF */ andi $t6, $t9, 0xff
/* B00B74 800899D4 030E7825 */ or $t7, $t8, $t6
/* B00B78 800899D8 10000014 */ b .L80089A2C
/* B00B7C 800899DC AC8F0004 */ sw $t7, 4($a0)
/* B00B80 800899E0 8D4402B0 */ lw $a0, 0x2b0($t2)
.L800899E4:
/* B00B84 800899E4 24990008 */ addiu $t9, $a0, 8
/* B00B88 800899E8 AD5902B0 */ sw $t9, 0x2b0($t2)
/* B00B8C 800899EC AC8D0000 */ sw $t5, ($a0)
/* B00B90 800899F0 8D620000 */ lw $v0, ($t3)
/* B00B94 800899F4 845807E6 */ lh $t8, 0x7e6($v0)
/* B00B98 800899F8 330E00FF */ andi $t6, $t8, 0xff
/* B00B9C 800899FC 845807E2 */ lh $t8, 0x7e2($v0)
/* B00BA0 80089A00 000E7A00 */ sll $t7, $t6, 8
/* B00BA4 80089A04 00187600 */ sll $t6, $t8, 0x18
/* B00BA8 80089A08 845807E4 */ lh $t8, 0x7e4($v0)
/* B00BAC 80089A0C 01EEC825 */ or $t9, $t7, $t6
/* B00BB0 80089A10 330F00FF */ andi $t7, $t8, 0xff
/* B00BB4 80089A14 000F7400 */ sll $t6, $t7, 0x10
/* B00BB8 80089A18 958F024E */ lhu $t7, 0x24e($t4)
/* B00BBC 80089A1C 032EC025 */ or $t8, $t9, $t6
/* B00BC0 80089A20 31F900FF */ andi $t9, $t7, 0xff
/* B00BC4 80089A24 03197025 */ or $t6, $t8, $t9
/* B00BC8 80089A28 AC8E0004 */ sw $t6, 4($a0)
.L80089A2C:
/* B00BCC 80089A2C 8D6E0000 */ lw $t6, ($t3)
/* B00BD0 80089A30 00097A80 */ sll $t7, $t1, 0xa
/* B00BD4 80089A34 25F80400 */ addiu $t8, $t7, 0x400
/* B00BD8 80089A38 3C190200 */ lui $t9, %hi(D_02000A00) # $t9, 0x200
/* B00BDC 80089A3C 27390A00 */ addiu $t9, %lo(D_02000A00) # addiu $t9, $t9, 0xa00
/* B00BE0 80089A40 00097840 */ sll $t7, $t1, 1
/* B00BE4 80089A44 03192821 */ addu $a1, $t8, $t9
/* B00BE8 80089A48 01CF1021 */ addu $v0, $t6, $t7
/* B00BEC 80089A4C 84580820 */ lh $t8, 0x820($v0)
/* B00BF0 80089A50 8D4402B0 */ lw $a0, 0x2b0($t2)
/* B00BF4 80089A54 24060020 */ li $a2, 32
/* B00BF8 80089A58 AFB80010 */ sw $t8, 0x10($sp)
/* B00BFC 80089A5C 84590828 */ lh $t9, 0x828($v0)
/* B00C00 80089A60 24070020 */ li $a3, 32
/* B00C04 80089A64 AFB90014 */ sw $t9, 0x14($sp)
/* B00C08 80089A68 84430FB4 */ lh $v1, 0xfb4($v0)
/* B00C0C 80089A6C AFA30018 */ sw $v1, 0x18($sp)
/* B00C10 80089A70 AFA3001C */ sw $v1, 0x1c($sp)
/* B00C14 80089A74 84480830 */ lh $t0, 0x830($v0)
/* B00C18 80089A78 AFAC003C */ sw $t4, 0x3c($sp)
/* B00C1C 80089A7C AFAA0140 */ sw $t2, 0x140($sp)
/* B00C20 80089A80 00084040 */ sll $t0, $t0, 1
/* B00C24 80089A84 3108FFFF */ andi $t0, $t0, 0xffff
/* B00C28 80089A88 AFA80020 */ sw $t0, 0x20($sp)
/* B00C2C 80089A8C AFA80024 */ sw $t0, 0x24($sp)
/* B00C30 80089A90 0C0210A6 */ jal Gfx_TextureIA8
/* B00C34 80089A94 A7A9014A */ sh $t1, 0x14a($sp)
/* B00C38 80089A98 8FAA0140 */ lw $t2, 0x140($sp)
/* B00C3C 80089A9C 87A9014A */ lh $t1, 0x14a($sp)
/* B00C40 80089AA0 3C0B8016 */ lui $t3, %hi(gGameInfo) # $t3, 0x8016
/* B00C44 80089AA4 8FAC003C */ lw $t4, 0x3c($sp)
/* B00C48 80089AA8 3C1F8016 */ lui $ra, %hi(gSaveContext) # $ra, 0x8016
/* B00C4C 80089AAC 27FFE660 */ addiu $ra, %lo(gSaveContext) # addiu $ra, $ra, -0x19a0
/* B00C50 80089AB0 256BFA90 */ addiu $t3, %lo(gGameInfo) # addiu $t3, $t3, -0x570
/* B00C54 80089AB4 3C0DFA00 */ lui $t5, 0xfa00
/* B00C58 80089AB8 AD4202B0 */ sw $v0, 0x2b0($t2)
.L80089ABC:
/* B00C5C 80089ABC 25290001 */ addiu $t1, $t1, 1
/* B00C60 80089AC0 00094C00 */ sll $t1, $t1, 0x10
/* B00C64 80089AC4 00094C03 */ sra $t1, $t1, 0x10
/* B00C68 80089AC8 29210004 */ slti $at, $t1, 4
/* B00C6C 80089ACC 5420FF93 */ bnezl $at, .L8008991C
/* B00C70 80089AD0 03E9C821 */ addu $t9, $ra, $t1
/* B00C74 80089AD4 8FAE0158 */ lw $t6, 0x158($sp)
/* B00C78 80089AD8 3C068014 */ lui $a2, %hi(D_8013E2EC) # $a2, 0x8014
/* B00C7C 80089ADC 24C6E2EC */ addiu $a2, %lo(D_8013E2EC) # addiu $a2, $a2, -0x1d14
/* B00C80 80089AE0 27A40130 */ addiu $a0, $sp, 0x130
/* B00C84 80089AE4 24070BFF */ li $a3, 3071
/* B00C88 80089AE8 0C031AD5 */ jal Graph_CloseDisps
/* B00C8C 80089AEC 8DC50000 */ lw $a1, ($t6)
/* B00C90 80089AF0 8FBF002C */ lw $ra, 0x2c($sp)
/* B00C94 80089AF4 27BD0158 */ addiu $sp, $sp, 0x158
/* B00C98 80089AF8 03E00008 */ jr $ra
/* B00C9C 80089AFC 00000000 */ nop

View file

@ -1,646 +0,0 @@
.rdata
glabel D_8013E26C
.asciz " MAGIC_NOW=%d (%d)\n"
# Translation: Storage
.balign 4
.late_rodata
glabel jtbl_8013E5F0
.word L80087B04
.word L80087B1C
.word L80087BA0
.word L80087BA0
.word L80087DF8
.word L80087BA0
.word L80087E24
.word L800879F4
.word L80087A6C
.word L80088208
.text
glabel Interface_UpdateMagicBar
/* AFEB5C 800879BC 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFEB60 800879C0 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
/* AFEB64 800879C4 846E13F0 */ lh $t6, 0x13f0($v1)
/* AFEB68 800879C8 27BDFFE0 */ addiu $sp, $sp, -0x20
/* AFEB6C 800879CC AFBF001C */ sw $ra, 0x1c($sp)
/* AFEB70 800879D0 25CFFFFF */ addiu $t7, $t6, -1
/* AFEB74 800879D4 2DE1000A */ sltiu $at, $t7, 0xa
/* AFEB78 800879D8 10200225 */ beqz $at, .L80088270
/* AFEB7C 800879DC 000F7880 */ sll $t7, $t7, 2
/* AFEB80 800879E0 3C018014 */ lui $at, %hi(jtbl_8013E5F0)
/* AFEB84 800879E4 002F0821 */ addu $at, $at, $t7
/* AFEB88 800879E8 8C2FE5F0 */ lw $t7, %lo(jtbl_8013E5F0)($at)
/* AFEB8C 800879EC 01E00008 */ jr $t7
/* AFEB90 800879F0 00000000 */ nop
glabel L800879F4
/* AFEB94 800879F4 80620032 */ lb $v0, 0x32($v1)
/* AFEB98 800879F8 846413F4 */ lh $a0, 0x13f4($v1)
/* AFEB9C 800879FC 24180009 */ li $t8, 9
/* AFEBA0 80087A00 00400821 */ addu $at, $v0, $zero
/* AFEBA4 80087A04 00021080 */ sll $v0, $v0, 2
/* AFEBA8 80087A08 00411023 */ subu $v0, $v0, $at
/* AFEBAC 80087A0C 00021100 */ sll $v0, $v0, 4
/* AFEBB0 80087A10 00021400 */ sll $v0, $v0, 0x10
/* AFEBB4 80087A14 00021403 */ sra $v0, $v0, 0x10
/* AFEBB8 80087A18 10440012 */ beq $v0, $a0, .L80087A64
/* AFEBBC 80087A1C 0082082A */ slt $at, $a0, $v0
/* AFEBC0 80087A20 10200009 */ beqz $at, .L80087A48
/* AFEBC4 80087A24 248EFFF8 */ addiu $t6, $a0, -8
/* AFEBC8 80087A28 24980008 */ addiu $t8, $a0, 8
/* AFEBCC 80087A2C A47813F4 */ sh $t8, 0x13f4($v1)
/* AFEBD0 80087A30 847913F4 */ lh $t9, 0x13f4($v1)
/* AFEBD4 80087A34 0059082A */ slt $at, $v0, $t9
/* AFEBD8 80087A38 5020020F */ beql $at, $zero, .L80088278
/* AFEBDC 80087A3C 8FBF001C */ lw $ra, 0x1c($sp)
/* AFEBE0 80087A40 1000020C */ b .L80088274
/* AFEBE4 80087A44 A46213F4 */ sh $v0, 0x13f4($v1)
.L80087A48:
/* AFEBE8 80087A48 A46E13F4 */ sh $t6, 0x13f4($v1)
/* AFEBEC 80087A4C 846F13F4 */ lh $t7, 0x13f4($v1)
/* AFEBF0 80087A50 004F082A */ slt $at, $v0, $t7
/* AFEBF4 80087A54 54200208 */ bnezl $at, .L80088278
/* AFEBF8 80087A58 8FBF001C */ lw $ra, 0x1c($sp)
/* AFEBFC 80087A5C 10000205 */ b .L80088274
/* AFEC00 80087A60 A46213F4 */ sh $v0, 0x13f4($v1)
.L80087A64:
/* AFEC04 80087A64 10000203 */ b .L80088274
/* AFEC08 80087A68 A47813F0 */ sh $t8, 0x13f0($v1)
glabel L80087A6C
/* AFEC0C 80087A6C 80790033 */ lb $t9, 0x33($v1)
/* AFEC10 80087A70 8C6F135C */ lw $t7, 0x135c($v1)
/* AFEC14 80087A74 272E0004 */ addiu $t6, $t9, 4
/* AFEC18 80087A78 15E00011 */ bnez $t7, .L80087AC0
/* AFEC1C 80087A7C A06E0033 */ sb $t6, 0x33($v1)
/* AFEC20 80087A80 8C781360 */ lw $t8, 0x1360($v1)
/* AFEC24 80087A84 3C078013 */ lui $a3, %hi(D_801333E0) # $a3, 0x8013
/* AFEC28 80087A88 24E733E0 */ addiu $a3, %lo(D_801333E0) # addiu $a3, $a3, 0x33e0
/* AFEC2C 80087A8C 2B010004 */ slti $at, $t8, 4
/* AFEC30 80087A90 1020000B */ beqz $at, .L80087AC0
/* AFEC34 80087A94 2404401F */ li $a0, 16415
/* AFEC38 80087A98 3C198013 */ lui $t9, %hi(D_801333E8) # $t9, 0x8013
/* AFEC3C 80087A9C 273933E8 */ addiu $t9, %lo(D_801333E8) # addiu $t9, $t9, 0x33e8
/* AFEC40 80087AA0 3C058013 */ lui $a1, %hi(D_801333D4) # $a1, 0x8013
/* AFEC44 80087AA4 24A533D4 */ addiu $a1, %lo(D_801333D4) # addiu $a1, $a1, 0x33d4
/* AFEC48 80087AA8 AFB90014 */ sw $t9, 0x14($sp)
/* AFEC4C 80087AAC 24060004 */ li $a2, 4
/* AFEC50 80087AB0 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* AFEC54 80087AB4 AFA70010 */ sw $a3, 0x10($sp)
/* AFEC58 80087AB8 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFEC5C 80087ABC 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
.L80087AC0:
/* AFEC60 80087AC0 3C048014 */ lui $a0, %hi(D_8013E26C) # $a0, 0x8014
/* AFEC64 80087AC4 2484E26C */ addiu $a0, %lo(D_8013E26C) # addiu $a0, $a0, -0x1d94
/* AFEC68 80087AC8 80650033 */ lb $a1, 0x33($v1)
/* AFEC6C 80087ACC 0C00084C */ jal osSyncPrintf
/* AFEC70 80087AD0 846613F6 */ lh $a2, 0x13f6($v1)
/* AFEC74 80087AD4 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFEC78 80087AD8 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
/* AFEC7C 80087ADC 846213F6 */ lh $v0, 0x13f6($v1)
/* AFEC80 80087AE0 806E0033 */ lb $t6, 0x33($v1)
/* AFEC84 80087AE4 01C2082A */ slt $at, $t6, $v0
/* AFEC88 80087AE8 542001E3 */ bnezl $at, .L80088278
/* AFEC8C 80087AEC 8FBF001C */ lw $ra, 0x1c($sp)
/* AFEC90 80087AF0 846F13F2 */ lh $t7, 0x13f2($v1)
/* AFEC94 80087AF4 A0620033 */ sb $v0, 0x33($v1)
/* AFEC98 80087AF8 A46013F2 */ sh $zero, 0x13f2($v1)
/* AFEC9C 80087AFC 100001DD */ b .L80088274
/* AFECA0 80087B00 A46F13F0 */ sh $t7, 0x13f0($v1)
glabel L80087B04
/* AFECA4 80087B04 24180002 */ li $t8, 2
/* AFECA8 80087B08 24090002 */ li $t1, 2
/* AFECAC 80087B0C A47813F0 */ sh $t8, 0x13f0($v1)
/* AFECB0 80087B10 3C018012 */ lui $at, %hi(sMagicBorderRatio) # $at, 0x8012
/* AFECB4 80087B14 100001D7 */ b .L80088274
/* AFECB8 80087B18 A4295AD0 */ sh $t1, %lo(sMagicBorderRatio)($at)
glabel L80087B1C
/* AFECBC 80087B1C 80790033 */ lb $t9, 0x33($v1)
/* AFECC0 80087B20 240F0003 */ li $t7, 3
/* AFECC4 80087B24 241800FF */ li $t8, 255
/* AFECC8 80087B28 272EFFFE */ addiu $t6, $t9, -2
/* AFECCC 80087B2C A06E0033 */ sb $t6, 0x33($v1)
/* AFECD0 80087B30 80620033 */ lb $v0, 0x33($v1)
/* AFECD4 80087B34 241900FF */ li $t9, 255
/* AFECD8 80087B38 5C40000C */ bgtzl $v0, .L80087B6C
/* AFECDC 80087B3C 846F13F8 */ lh $t7, 0x13f8($v1)
/* AFECE0 80087B40 A0600033 */ sb $zero, 0x33($v1)
/* AFECE4 80087B44 A46F13F0 */ sh $t7, 0x13f0($v1)
/* AFECE8 80087B48 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFECEC 80087B4C A4385A30 */ sh $t8, %lo(sMagicBorderB)($at)
/* AFECF0 80087B50 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFECF4 80087B54 A4395A2C */ sh $t9, %lo(sMagicBorderG)($at)
/* AFECF8 80087B58 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFECFC 80087B5C 240E00FF */ li $t6, 255
/* AFED00 80087B60 1000000F */ b .L80087BA0
/* AFED04 80087B64 A42E5A28 */ sh $t6, %lo(sMagicBorderR)($at)
/* AFED08 80087B68 846F13F8 */ lh $t7, 0x13f8($v1)
.L80087B6C:
/* AFED0C 80087B6C 24180003 */ li $t8, 3
/* AFED10 80087B70 241900FF */ li $t9, 255
/* AFED14 80087B74 15E2000A */ bne $t7, $v0, .L80087BA0
/* AFED18 80087B78 00000000 */ nop
/* AFED1C 80087B7C A47813F0 */ sh $t8, 0x13f0($v1)
/* AFED20 80087B80 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFED24 80087B84 A4395A30 */ sh $t9, %lo(sMagicBorderB)($at)
/* AFED28 80087B88 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFED2C 80087B8C 240E00FF */ li $t6, 255
/* AFED30 80087B90 A42E5A2C */ sh $t6, %lo(sMagicBorderG)($at)
/* AFED34 80087B94 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFED38 80087B98 240F00FF */ li $t7, 255
/* AFED3C 80087B9C A42F5A28 */ sh $t7, %lo(sMagicBorderR)($at)
glabel L80087BA0
.L80087BA0:
/* AFED40 80087BA0 3C1F8012 */ lui $ra, %hi(sMagicBorderStep) # $ra, 0x8012
/* AFED44 80087BA4 87FF5AD4 */ lh $ra, %lo(sMagicBorderStep)($ra)
/* AFED48 80087BA8 3C028012 */ lui $v0, %hi(sMagicBorderIndexes)
/* AFED4C 80087BAC 3C198012 */ lui $t9, %hi(sMagicBorderColors) # $t9, 0x8012
/* AFED50 80087BB0 001FF840 */ sll $ra, $ra, 1
/* AFED54 80087BB4 005F1021 */ addu $v0, $v0, $ra
/* AFED58 80087BB8 84425AC8 */ lh $v0, %lo(sMagicBorderIndexes)($v0)
/* AFED5C 80087BBC 27395AB0 */ addiu $t9, %lo(sMagicBorderColors) # addiu $t9, $t9, 0x5ab0
/* AFED60 80087BC0 3C068012 */ lui $a2, %hi(sMagicBorderR) # $a2, 0x8012
/* AFED64 80087BC4 0002C080 */ sll $t8, $v0, 2
/* AFED68 80087BC8 0302C023 */ subu $t8, $t8, $v0
/* AFED6C 80087BCC 0018C040 */ sll $t8, $t8, 1
/* AFED70 80087BD0 03192821 */ addu $a1, $t8, $t9
/* AFED74 80087BD4 84AD0000 */ lh $t5, ($a1)
/* AFED78 80087BD8 84C65A28 */ lh $a2, %lo(sMagicBorderR)($a2)
/* AFED7C 80087BDC 3C088012 */ lui $t0, %hi(sMagicBorderB) # $t0, 0x8012
/* AFED80 80087BE0 3C078012 */ lui $a3, %hi(sMagicBorderG) # $a3, 0x8012
/* AFED84 80087BE4 00CD1823 */ subu $v1, $a2, $t5
/* AFED88 80087BE8 84E75A2C */ lh $a3, %lo(sMagicBorderG)($a3)
/* AFED8C 80087BEC 04600003 */ bltz $v1, .L80087BFC
/* AFED90 80087BF0 85085A30 */ lh $t0, %lo(sMagicBorderB)($t0)
/* AFED94 80087BF4 10000002 */ b .L80087C00
/* AFED98 80087BF8 00602025 */ move $a0, $v1
.L80087BFC:
/* AFED9C 80087BFC 00032023 */ negu $a0, $v1
.L80087C00:
/* AFEDA0 80087C00 3C098012 */ lui $t1, %hi(sMagicBorderRatio) # $t1, 0x8012
/* AFEDA4 80087C04 85295AD0 */ lh $t1, %lo(sMagicBorderRatio)($t1)
/* AFEDA8 80087C08 84AC0002 */ lh $t4, 2($a1)
/* AFEDAC 80087C0C 0089001A */ div $zero, $a0, $t1
/* AFEDB0 80087C10 00001812 */ mflo $v1
/* AFEDB4 80087C14 00031C00 */ sll $v1, $v1, 0x10
/* AFEDB8 80087C18 15200002 */ bnez $t1, .L80087C24
/* AFEDBC 80087C1C 00000000 */ nop
/* AFEDC0 80087C20 0007000D */ break 7
.L80087C24:
/* AFEDC4 80087C24 2401FFFF */ li $at, -1
/* AFEDC8 80087C28 15210004 */ bne $t1, $at, .L80087C3C
/* AFEDCC 80087C2C 3C018000 */ lui $at, 0x8000
/* AFEDD0 80087C30 14810002 */ bne $a0, $at, .L80087C3C
/* AFEDD4 80087C34 00000000 */ nop
/* AFEDD8 80087C38 0006000D */ break 6
.L80087C3C:
/* AFEDDC 80087C3C 00EC1023 */ subu $v0, $a3, $t4
/* AFEDE0 80087C40 04400003 */ bltz $v0, .L80087C50
/* AFEDE4 80087C44 00031C03 */ sra $v1, $v1, 0x10
/* AFEDE8 80087C48 10000002 */ b .L80087C54
/* AFEDEC 80087C4C 00402025 */ move $a0, $v0
.L80087C50:
/* AFEDF0 80087C50 00022023 */ negu $a0, $v0
.L80087C54:
/* AFEDF4 80087C54 0089001A */ div $zero, $a0, $t1
/* AFEDF8 80087C58 84AB0004 */ lh $t3, 4($a1)
/* AFEDFC 80087C5C 00005012 */ mflo $t2
/* AFEE00 80087C60 000A5400 */ sll $t2, $t2, 0x10
/* AFEE04 80087C64 15200002 */ bnez $t1, .L80087C70
/* AFEE08 80087C68 00000000 */ nop
/* AFEE0C 80087C6C 0007000D */ break 7
.L80087C70:
/* AFEE10 80087C70 2401FFFF */ li $at, -1
/* AFEE14 80087C74 15210004 */ bne $t1, $at, .L80087C88
/* AFEE18 80087C78 3C018000 */ lui $at, 0x8000
/* AFEE1C 80087C7C 14810002 */ bne $a0, $at, .L80087C88
/* AFEE20 80087C80 00000000 */ nop
/* AFEE24 80087C84 0006000D */ break 6
.L80087C88:
/* AFEE28 80087C88 010B1023 */ subu $v0, $t0, $t3
/* AFEE2C 80087C8C 04400003 */ bltz $v0, .L80087C9C
/* AFEE30 80087C90 000A5403 */ sra $t2, $t2, 0x10
/* AFEE34 80087C94 10000002 */ b .L80087CA0
/* AFEE38 80087C98 00402025 */ move $a0, $v0
.L80087C9C:
/* AFEE3C 80087C9C 00022023 */ negu $a0, $v0
.L80087CA0:
/* AFEE40 80087CA0 00CD082A */ slt $at, $a2, $t5
/* AFEE44 80087CA4 54200006 */ bnezl $at, .L80087CC0
/* AFEE48 80087CA8 00C37821 */ addu $t7, $a2, $v1
/* AFEE4C 80087CAC 00C37023 */ subu $t6, $a2, $v1
/* AFEE50 80087CB0 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFEE54 80087CB4 10000004 */ b .L80087CC8
/* AFEE58 80087CB8 A42E5A28 */ sh $t6, %lo(sMagicBorderR)($at)
/* AFEE5C 80087CBC 00C37821 */ addu $t7, $a2, $v1
.L80087CC0:
/* AFEE60 80087CC0 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFEE64 80087CC4 A42F5A28 */ sh $t7, %lo(sMagicBorderR)($at)
.L80087CC8:
/* AFEE68 80087CC8 00EC082A */ slt $at, $a3, $t4
/* AFEE6C 80087CCC 54200006 */ bnezl $at, .L80087CE8
/* AFEE70 80087CD0 00EAC821 */ addu $t9, $a3, $t2
/* AFEE74 80087CD4 00EAC023 */ subu $t8, $a3, $t2
/* AFEE78 80087CD8 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFEE7C 80087CDC 10000004 */ b .L80087CF0
/* AFEE80 80087CE0 A4385A2C */ sh $t8, %lo(sMagicBorderG)($at)
/* AFEE84 80087CE4 00EAC821 */ addu $t9, $a3, $t2
.L80087CE8:
/* AFEE88 80087CE8 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFEE8C 80087CEC A4395A2C */ sh $t9, %lo(sMagicBorderG)($at)
.L80087CF0:
/* AFEE90 80087CF0 010B082A */ slt $at, $t0, $t3
/* AFEE94 80087CF4 14200012 */ bnez $at, .L80087D40
/* AFEE98 80087CF8 00000000 */ nop
/* AFEE9C 80087CFC 0089001A */ div $zero, $a0, $t1
/* AFEEA0 80087D00 15200002 */ bnez $t1, .L80087D0C
/* AFEEA4 80087D04 00000000 */ nop
/* AFEEA8 80087D08 0007000D */ break 7
.L80087D0C:
/* AFEEAC 80087D0C 2401FFFF */ li $at, -1
/* AFEEB0 80087D10 15210004 */ bne $t1, $at, .L80087D24
/* AFEEB4 80087D14 3C018000 */ lui $at, 0x8000
/* AFEEB8 80087D18 14810002 */ bne $a0, $at, .L80087D24
/* AFEEBC 80087D1C 00000000 */ nop
/* AFEEC0 80087D20 0006000D */ break 6
.L80087D24:
/* AFEEC4 80087D24 00007012 */ mflo $t6
/* AFEEC8 80087D28 000E7C00 */ sll $t7, $t6, 0x10
/* AFEECC 80087D2C 000FC403 */ sra $t8, $t7, 0x10
/* AFEED0 80087D30 0118C823 */ subu $t9, $t0, $t8
/* AFEED4 80087D34 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFEED8 80087D38 10000011 */ b .L80087D80
/* AFEEDC 80087D3C A4395A30 */ sh $t9, %lo(sMagicBorderB)($at)
.L80087D40:
/* AFEEE0 80087D40 0089001A */ div $zero, $a0, $t1
/* AFEEE4 80087D44 15200002 */ bnez $t1, .L80087D50
/* AFEEE8 80087D48 00000000 */ nop
/* AFEEEC 80087D4C 0007000D */ break 7
.L80087D50:
/* AFEEF0 80087D50 2401FFFF */ li $at, -1
/* AFEEF4 80087D54 15210004 */ bne $t1, $at, .L80087D68
/* AFEEF8 80087D58 3C018000 */ lui $at, 0x8000
/* AFEEFC 80087D5C 14810002 */ bne $a0, $at, .L80087D68
/* AFEF00 80087D60 00000000 */ nop
/* AFEF04 80087D64 0006000D */ break 6
.L80087D68:
/* AFEF08 80087D68 00007012 */ mflo $t6
/* AFEF0C 80087D6C 000E7C00 */ sll $t7, $t6, 0x10
/* AFEF10 80087D70 000FC403 */ sra $t8, $t7, 0x10
/* AFEF14 80087D74 0118C821 */ addu $t9, $t0, $t8
/* AFEF18 80087D78 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFEF1C 80087D7C A4395A30 */ sh $t9, %lo(sMagicBorderB)($at)
.L80087D80:
/* AFEF20 80087D80 2529FFFF */ addiu $t1, $t1, -1
/* AFEF24 80087D84 00094C00 */ sll $t1, $t1, 0x10
/* AFEF28 80087D88 00094C03 */ sra $t1, $t1, 0x10
/* AFEF2C 80087D8C 3C018012 */ lui $at, %hi(sMagicBorderRatio) # $at, 0x8012
/* AFEF30 80087D90 15200138 */ bnez $t1, .L80088274
/* AFEF34 80087D94 A4295AD0 */ sh $t1, %lo(sMagicBorderRatio)($at)
/* AFEF38 80087D98 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFEF3C 80087D9C A42D5A28 */ sh $t5, %lo(sMagicBorderR)($at)
/* AFEF40 80087DA0 3C0E8016 */ lui $t6, %hi(gGameInfo) # $t6, 0x8016
/* AFEF44 80087DA4 8DCEFA90 */ lw $t6, %lo(gGameInfo)($t6)
/* AFEF48 80087DA8 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFEF4C 80087DAC A42C5A2C */ sh $t4, %lo(sMagicBorderG)($at)
/* AFEF50 80087DB0 3C188012 */ lui $t8, %hi(sMagicBorderStep) # $t8, 0x8012
/* AFEF54 80087DB4 87185AD4 */ lh $t8, %lo(sMagicBorderStep)($t8)
/* AFEF58 80087DB8 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFEF5C 80087DBC A42B5A30 */ sh $t3, %lo(sMagicBorderB)($at)
/* AFEF60 80087DC0 01DF7821 */ addu $t7, $t6, $ra
/* AFEF64 80087DC4 85E904E4 */ lh $t1, 0x4e4($t7)
/* AFEF68 80087DC8 3C018012 */ lui $at, %hi(sMagicBorderStep) # $at, 0x8012
/* AFEF6C 80087DCC 27190001 */ addiu $t9, $t8, 1
/* AFEF70 80087DD0 A4395AD4 */ sh $t9, %lo(sMagicBorderStep)($at)
/* AFEF74 80087DD4 3C018012 */ lui $at, %hi(sMagicBorderRatio) # $at, 0x8012
/* AFEF78 80087DD8 00197400 */ sll $t6, $t9, 0x10
/* AFEF7C 80087DDC 000E7C03 */ sra $t7, $t6, 0x10
/* AFEF80 80087DE0 A4295AD0 */ sh $t1, %lo(sMagicBorderRatio)($at)
/* AFEF84 80087DE4 29E10004 */ slti $at, $t7, 4
/* AFEF88 80087DE8 14200122 */ bnez $at, .L80088274
/* AFEF8C 80087DEC 3C018012 */ lui $at, %hi(sMagicBorderStep) # $at, 0x8012
/* AFEF90 80087DF0 10000120 */ b .L80088274
/* AFEF94 80087DF4 A4205AD4 */ sh $zero, %lo(sMagicBorderStep)($at)
glabel L80087DF8
/* AFEF98 80087DF8 241800FF */ li $t8, 255
/* AFEF9C 80087DFC 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFEFA0 80087E00 A4385A30 */ sh $t8, %lo(sMagicBorderB)($at)
/* AFEFA4 80087E04 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFEFA8 80087E08 241900FF */ li $t9, 255
/* AFEFAC 80087E0C A4395A2C */ sh $t9, %lo(sMagicBorderG)($at)
/* AFEFB0 80087E10 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFEFB4 80087E14 240E00FF */ li $t6, 255
/* AFEFB8 80087E18 A42E5A28 */ sh $t6, %lo(sMagicBorderR)($at)
/* AFEFBC 80087E1C 10000115 */ b .L80088274
/* AFEFC0 80087E20 A46013F0 */ sh $zero, 0x13f0($v1)
glabel L80087E24
/* AFEFC4 80087E24 3C010001 */ lui $at, 1
/* AFEFC8 80087E28 00811021 */ addu $v0, $a0, $at
/* AFEFCC 80087E2C 944F0934 */ lhu $t7, 0x934($v0)
/* AFEFD0 80087E30 15E0005F */ bnez $t7, .L80087FB0
/* AFEFD4 80087E34 00000000 */ nop
/* AFEFD8 80087E38 94580936 */ lhu $t8, 0x936($v0)
/* AFEFDC 80087E3C 1700005C */ bnez $t8, .L80087FB0
/* AFEFE0 80087E40 00000000 */ nop
/* AFEFE4 80087E44 3C190001 */ lui $t9, 1
/* AFEFE8 80087E48 0324C821 */ addu $t9, $t9, $a0
/* AFEFEC 80087E4C 933903DC */ lbu $t9, 0x3dc($t9)
/* AFEFF0 80087E50 17200057 */ bnez $t9, .L80087FB0
/* AFEFF4 80087E54 00000000 */ nop
/* AFEFF8 80087E58 944E0A20 */ lhu $t6, 0xa20($v0)
/* AFEFFC 80087E5C 15C00054 */ bnez $t6, .L80087FB0
/* AFF000 80087E60 00000000 */ nop
/* AFF004 80087E64 804F1E15 */ lb $t7, 0x1e15($v0)
/* AFF008 80087E68 15E00051 */ bnez $t7, .L80087FB0
/* AFF00C 80087E6C 00000000 */ nop
/* AFF010 80087E70 9058241B */ lbu $t8, 0x241b($v0)
/* AFF014 80087E74 1700004E */ bnez $t8, .L80087FB0
/* AFF018 80087E78 00000000 */ nop
/* AFF01C 80087E7C 0C02FF21 */ jal Gameplay_InCsMode
/* AFF020 80087E80 AFA40020 */ sw $a0, 0x20($sp)
/* AFF024 80087E84 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFF028 80087E88 14400049 */ bnez $v0, .L80087FB0
/* AFF02C 80087E8C 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
/* AFF030 80087E90 80790033 */ lb $t9, 0x33($v1)
/* AFF034 80087E94 5320001C */ beql $t9, $zero, .L80087F08
/* AFF038 80087E98 8FAF0020 */ lw $t7, 0x20($sp)
/* AFF03C 80087E9C 0C023CBE */ jal func_8008F2F8
/* AFF040 80087EA0 8FA40020 */ lw $a0, 0x20($sp)
/* AFF044 80087EA4 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFF048 80087EA8 28410002 */ slti $at, $v0, 2
/* AFF04C 80087EAC 14200007 */ bnez $at, .L80087ECC
/* AFF050 80087EB0 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
/* AFF054 80087EB4 0C023CBE */ jal func_8008F2F8
/* AFF058 80087EB8 8FA40020 */ lw $a0, 0x20($sp)
/* AFF05C 80087EBC 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFF060 80087EC0 28410005 */ slti $at, $v0, 5
/* AFF064 80087EC4 1420000F */ bnez $at, .L80087F04
/* AFF068 80087EC8 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
.L80087ECC:
/* AFF06C 80087ECC 906E0069 */ lbu $t6, 0x69($v1)
/* AFF070 80087ED0 2402000F */ li $v0, 15
/* AFF074 80087ED4 8FB90020 */ lw $t9, 0x20($sp)
/* AFF078 80087ED8 504E0008 */ beql $v0, $t6, .L80087EFC
/* AFF07C 80087EDC 932E1C27 */ lbu $t6, 0x1c27($t9)
/* AFF080 80087EE0 906F006A */ lbu $t7, 0x6a($v1)
/* AFF084 80087EE4 504F0005 */ beql $v0, $t7, .L80087EFC
/* AFF088 80087EE8 932E1C27 */ lbu $t6, 0x1c27($t9)
/* AFF08C 80087EEC 9078006B */ lbu $t8, 0x6b($v1)
/* AFF090 80087EF0 54580005 */ bnel $v0, $t8, .L80087F08
/* AFF094 80087EF4 8FAF0020 */ lw $t7, 0x20($sp)
/* AFF098 80087EF8 932E1C27 */ lbu $t6, 0x1c27($t9)
.L80087EFC:
/* AFF09C 80087EFC 55C0001E */ bnezl $t6, .L80087F78
/* AFF0A0 80087F00 8FA20020 */ lw $v0, 0x20($sp)
.L80087F04:
/* AFF0A4 80087F04 8FAF0020 */ lw $t7, 0x20($sp)
.L80087F08:
/* AFF0A8 80087F08 3C078013 */ lui $a3, %hi(D_801333E0) # $a3, 0x8013
/* AFF0AC 80087F0C 3C188013 */ lui $t8, %hi(D_801333E8) # $t8, 0x8013
/* AFF0B0 80087F10 24E733E0 */ addiu $a3, %lo(D_801333E0) # addiu $a3, $a3, 0x33e0
/* AFF0B4 80087F14 271833E8 */ addiu $t8, %lo(D_801333E8) # addiu $t8, $t8, 0x33e8
/* AFF0B8 80087F18 3C058013 */ lui $a1, %hi(D_801333D4) # $a1, 0x8013
/* AFF0BC 80087F1C A1E01C27 */ sb $zero, 0x1c27($t7)
/* AFF0C0 80087F20 AFB80014 */ sw $t8, 0x14($sp)
/* AFF0C4 80087F24 AFA70010 */ sw $a3, 0x10($sp)
/* AFF0C8 80087F28 24A533D4 */ addiu $a1, %lo(D_801333D4) # addiu $a1, $a1, 0x33d4
/* AFF0CC 80087F2C 2404482B */ li $a0, 18475
/* AFF0D0 80087F30 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* AFF0D4 80087F34 24060004 */ li $a2, 4
/* AFF0D8 80087F38 3C048012 */ lui $a0, %hi(sMagicBorderB) # $a0, 0x8012
/* AFF0DC 80087F3C 24845A30 */ addiu $a0, %lo(sMagicBorderB) # addiu $a0, $a0, 0x5a30
/* AFF0E0 80087F40 241900FF */ li $t9, 255
/* AFF0E4 80087F44 A4990000 */ sh $t9, ($a0)
/* AFF0E8 80087F48 848E0000 */ lh $t6, ($a0)
/* AFF0EC 80087F4C 3C028012 */ lui $v0, %hi(sMagicBorderG) # $v0, 0x8012
/* AFF0F0 80087F50 24425A2C */ addiu $v0, %lo(sMagicBorderG) # addiu $v0, $v0, 0x5a2c
/* AFF0F4 80087F54 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFF0F8 80087F58 A44E0000 */ sh $t6, ($v0)
/* AFF0FC 80087F5C 844F0000 */ lh $t7, ($v0)
/* AFF100 80087F60 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
/* AFF104 80087F64 A46013F0 */ sh $zero, 0x13f0($v1)
/* AFF108 80087F68 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFF10C 80087F6C 100000C1 */ b .L80088274
/* AFF110 80087F70 A42F5A28 */ sh $t7, %lo(sMagicBorderR)($at)
/* AFF114 80087F74 8FA20020 */ lw $v0, 0x20($sp)
.L80087F78:
/* AFF118 80087F78 3C010001 */ lui $at, (0x000104F0 >> 16) # lui $at, 1
/* AFF11C 80087F7C 342104F0 */ ori $at, (0x000104F0 & 0xFFFF) # ori $at, $at, 0x4f0
/* AFF120 80087F80 00411021 */ addu $v0, $v0, $at
/* AFF124 80087F84 84580230 */ lh $t8, 0x230($v0)
/* AFF128 80087F88 2719FFFF */ addiu $t9, $t8, -1
/* AFF12C 80087F8C A4590230 */ sh $t9, 0x230($v0)
/* AFF130 80087F90 844E0230 */ lh $t6, 0x230($v0)
/* AFF134 80087F94 15C00006 */ bnez $t6, .L80087FB0
/* AFF138 80087F98 00000000 */ nop
/* AFF13C 80087F9C 806F0033 */ lb $t7, 0x33($v1)
/* AFF140 80087FA0 24190050 */ li $t9, 80
/* AFF144 80087FA4 25F8FFFF */ addiu $t8, $t7, -1
/* AFF148 80087FA8 A0780033 */ sb $t8, 0x33($v1)
/* AFF14C 80087FAC A4590230 */ sh $t9, 0x230($v0)
.L80087FB0:
/* AFF150 80087FB0 3C1F8012 */ lui $ra, %hi(sMagicBorderStep) # $ra, 0x8012
/* AFF154 80087FB4 87FF5AD4 */ lh $ra, %lo(sMagicBorderStep)($ra)
/* AFF158 80087FB8 3C028012 */ lui $v0, %hi(sMagicBorderIndexes)
/* AFF15C 80087FBC 3C0F8012 */ lui $t7, %hi(sMagicBorderColors) # $t7, 0x8012
/* AFF160 80087FC0 001FF840 */ sll $ra, $ra, 1
/* AFF164 80087FC4 005F1021 */ addu $v0, $v0, $ra
/* AFF168 80087FC8 84425AC8 */ lh $v0, %lo(sMagicBorderIndexes)($v0)
/* AFF16C 80087FCC 25EF5AB0 */ addiu $t7, %lo(sMagicBorderColors) # addiu $t7, $t7, 0x5ab0
/* AFF170 80087FD0 3C068012 */ lui $a2, %hi(sMagicBorderR) # $a2, 0x8012
/* AFF174 80087FD4 00027080 */ sll $t6, $v0, 2
/* AFF178 80087FD8 01C27023 */ subu $t6, $t6, $v0
/* AFF17C 80087FDC 000E7040 */ sll $t6, $t6, 1
/* AFF180 80087FE0 01CF2821 */ addu $a1, $t6, $t7
/* AFF184 80087FE4 84AD0000 */ lh $t5, ($a1)
/* AFF188 80087FE8 84C65A28 */ lh $a2, %lo(sMagicBorderR)($a2)
/* AFF18C 80087FEC 3C098012 */ lui $t1, %hi(sMagicBorderRatio) # $t1, 0x8012
/* AFF190 80087FF0 3C078012 */ lui $a3, %hi(sMagicBorderG) # $a3, 0x8012
/* AFF194 80087FF4 00CD1823 */ subu $v1, $a2, $t5
/* AFF198 80087FF8 04600003 */ bltz $v1, .L80088008
/* AFF19C 80087FFC 3C088012 */ lui $t0, %hi(sMagicBorderB) # $t0, 0x8012
/* AFF1A0 80088000 10000002 */ b .L8008800C
/* AFF1A4 80088004 00602025 */ move $a0, $v1
.L80088008:
/* AFF1A8 80088008 00032023 */ negu $a0, $v1
.L8008800C:
/* AFF1AC 8008800C 85295AD0 */ lh $t1, %lo(sMagicBorderRatio)($t1)
/* AFF1B0 80088010 84E75A2C */ lh $a3, %lo(sMagicBorderG)($a3)
/* AFF1B4 80088014 84AC0002 */ lh $t4, 2($a1)
/* AFF1B8 80088018 0089001A */ div $zero, $a0, $t1
/* AFF1BC 8008801C 00001812 */ mflo $v1
/* AFF1C0 80088020 00031C00 */ sll $v1, $v1, 0x10
/* AFF1C4 80088024 15200002 */ bnez $t1, .L80088030
/* AFF1C8 80088028 00000000 */ nop
/* AFF1CC 8008802C 0007000D */ break 7
.L80088030:
/* AFF1D0 80088030 2401FFFF */ li $at, -1
/* AFF1D4 80088034 15210004 */ bne $t1, $at, .L80088048
/* AFF1D8 80088038 3C018000 */ lui $at, 0x8000
/* AFF1DC 8008803C 14810002 */ bne $a0, $at, .L80088048
/* AFF1E0 80088040 00000000 */ nop
/* AFF1E4 80088044 0006000D */ break 6
.L80088048:
/* AFF1E8 80088048 00EC1023 */ subu $v0, $a3, $t4
/* AFF1EC 8008804C 04400003 */ bltz $v0, .L8008805C
/* AFF1F0 80088050 00031C03 */ sra $v1, $v1, 0x10
/* AFF1F4 80088054 10000002 */ b .L80088060
/* AFF1F8 80088058 00402025 */ move $a0, $v0
.L8008805C:
/* AFF1FC 8008805C 00022023 */ negu $a0, $v0
.L80088060:
/* AFF200 80088060 0089001A */ div $zero, $a0, $t1
/* AFF204 80088064 85085A30 */ lh $t0, %lo(sMagicBorderB)($t0)
/* AFF208 80088068 84AB0004 */ lh $t3, 4($a1)
/* AFF20C 8008806C 00005012 */ mflo $t2
/* AFF210 80088070 000A5400 */ sll $t2, $t2, 0x10
/* AFF214 80088074 15200002 */ bnez $t1, .L80088080
/* AFF218 80088078 00000000 */ nop
/* AFF21C 8008807C 0007000D */ break 7
.L80088080:
/* AFF220 80088080 2401FFFF */ li $at, -1
/* AFF224 80088084 15210004 */ bne $t1, $at, .L80088098
/* AFF228 80088088 3C018000 */ lui $at, 0x8000
/* AFF22C 8008808C 14810002 */ bne $a0, $at, .L80088098
/* AFF230 80088090 00000000 */ nop
/* AFF234 80088094 0006000D */ break 6
.L80088098:
/* AFF238 80088098 010B1023 */ subu $v0, $t0, $t3
/* AFF23C 8008809C 04400003 */ bltz $v0, .L800880AC
/* AFF240 800880A0 000A5403 */ sra $t2, $t2, 0x10
/* AFF244 800880A4 10000002 */ b .L800880B0
/* AFF248 800880A8 00402025 */ move $a0, $v0
.L800880AC:
/* AFF24C 800880AC 00022023 */ negu $a0, $v0
.L800880B0:
/* AFF250 800880B0 00CD082A */ slt $at, $a2, $t5
/* AFF254 800880B4 54200006 */ bnezl $at, .L800880D0
/* AFF258 800880B8 00C3C821 */ addu $t9, $a2, $v1
/* AFF25C 800880BC 00C3C023 */ subu $t8, $a2, $v1
/* AFF260 800880C0 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFF264 800880C4 10000004 */ b .L800880D8
/* AFF268 800880C8 A4385A28 */ sh $t8, %lo(sMagicBorderR)($at)
/* AFF26C 800880CC 00C3C821 */ addu $t9, $a2, $v1
.L800880D0:
/* AFF270 800880D0 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFF274 800880D4 A4395A28 */ sh $t9, %lo(sMagicBorderR)($at)
.L800880D8:
/* AFF278 800880D8 00EC082A */ slt $at, $a3, $t4
/* AFF27C 800880DC 54200006 */ bnezl $at, .L800880F8
/* AFF280 800880E0 00EA7821 */ addu $t7, $a3, $t2
/* AFF284 800880E4 00EA7023 */ subu $t6, $a3, $t2
/* AFF288 800880E8 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFF28C 800880EC 10000004 */ b .L80088100
/* AFF290 800880F0 A42E5A2C */ sh $t6, %lo(sMagicBorderG)($at)
/* AFF294 800880F4 00EA7821 */ addu $t7, $a3, $t2
.L800880F8:
/* AFF298 800880F8 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFF29C 800880FC A42F5A2C */ sh $t7, %lo(sMagicBorderG)($at)
.L80088100:
/* AFF2A0 80088100 010B082A */ slt $at, $t0, $t3
/* AFF2A4 80088104 14200012 */ bnez $at, .L80088150
/* AFF2A8 80088108 00000000 */ nop
/* AFF2AC 8008810C 0089001A */ div $zero, $a0, $t1
/* AFF2B0 80088110 15200002 */ bnez $t1, .L8008811C
/* AFF2B4 80088114 00000000 */ nop
/* AFF2B8 80088118 0007000D */ break 7
.L8008811C:
/* AFF2BC 8008811C 2401FFFF */ li $at, -1
/* AFF2C0 80088120 15210004 */ bne $t1, $at, .L80088134
/* AFF2C4 80088124 3C018000 */ lui $at, 0x8000
/* AFF2C8 80088128 14810002 */ bne $a0, $at, .L80088134
/* AFF2CC 8008812C 00000000 */ nop
/* AFF2D0 80088130 0006000D */ break 6
.L80088134:
/* AFF2D4 80088134 0000C012 */ mflo $t8
/* AFF2D8 80088138 0018CC00 */ sll $t9, $t8, 0x10
/* AFF2DC 8008813C 00197403 */ sra $t6, $t9, 0x10
/* AFF2E0 80088140 010E7823 */ subu $t7, $t0, $t6
/* AFF2E4 80088144 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFF2E8 80088148 10000011 */ b .L80088190
/* AFF2EC 8008814C A42F5A30 */ sh $t7, %lo(sMagicBorderB)($at)
.L80088150:
/* AFF2F0 80088150 0089001A */ div $zero, $a0, $t1
/* AFF2F4 80088154 15200002 */ bnez $t1, .L80088160
/* AFF2F8 80088158 00000000 */ nop
/* AFF2FC 8008815C 0007000D */ break 7
.L80088160:
/* AFF300 80088160 2401FFFF */ li $at, -1
/* AFF304 80088164 15210004 */ bne $t1, $at, .L80088178
/* AFF308 80088168 3C018000 */ lui $at, 0x8000
/* AFF30C 8008816C 14810002 */ bne $a0, $at, .L80088178
/* AFF310 80088170 00000000 */ nop
/* AFF314 80088174 0006000D */ break 6
.L80088178:
/* AFF318 80088178 0000C012 */ mflo $t8
/* AFF31C 8008817C 0018CC00 */ sll $t9, $t8, 0x10
/* AFF320 80088180 00197403 */ sra $t6, $t9, 0x10
/* AFF324 80088184 010E7821 */ addu $t7, $t0, $t6
/* AFF328 80088188 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFF32C 8008818C A42F5A30 */ sh $t7, %lo(sMagicBorderB)($at)
.L80088190:
/* AFF330 80088190 2529FFFF */ addiu $t1, $t1, -1
/* AFF334 80088194 00094C00 */ sll $t1, $t1, 0x10
/* AFF338 80088198 00094C03 */ sra $t1, $t1, 0x10
/* AFF33C 8008819C 3C018012 */ lui $at, %hi(sMagicBorderRatio) # $at, 0x8012
/* AFF340 800881A0 15200034 */ bnez $t1, .L80088274
/* AFF344 800881A4 A4295AD0 */ sh $t1, %lo(sMagicBorderRatio)($at)
/* AFF348 800881A8 3C018012 */ lui $at, %hi(sMagicBorderR) # $at, 0x8012
/* AFF34C 800881AC A42D5A28 */ sh $t5, %lo(sMagicBorderR)($at)
/* AFF350 800881B0 3C188016 */ lui $t8, %hi(gGameInfo) # $t8, 0x8016
/* AFF354 800881B4 8F18FA90 */ lw $t8, %lo(gGameInfo)($t8)
/* AFF358 800881B8 3C018012 */ lui $at, %hi(sMagicBorderG) # $at, 0x8012
/* AFF35C 800881BC A42C5A2C */ sh $t4, %lo(sMagicBorderG)($at)
/* AFF360 800881C0 3C0E8012 */ lui $t6, %hi(sMagicBorderStep) # $t6, 0x8012
/* AFF364 800881C4 85CE5AD4 */ lh $t6, %lo(sMagicBorderStep)($t6)
/* AFF368 800881C8 3C018012 */ lui $at, %hi(sMagicBorderB) # $at, 0x8012
/* AFF36C 800881CC A42B5A30 */ sh $t3, %lo(sMagicBorderB)($at)
/* AFF370 800881D0 031FC821 */ addu $t9, $t8, $ra
/* AFF374 800881D4 872904E4 */ lh $t1, 0x4e4($t9)
/* AFF378 800881D8 3C018012 */ lui $at, %hi(sMagicBorderStep) # $at, 0x8012
/* AFF37C 800881DC 25CF0001 */ addiu $t7, $t6, 1
/* AFF380 800881E0 A42F5AD4 */ sh $t7, %lo(sMagicBorderStep)($at)
/* AFF384 800881E4 3C018012 */ lui $at, %hi(sMagicBorderRatio) # $at, 0x8012
/* AFF388 800881E8 000FC400 */ sll $t8, $t7, 0x10
/* AFF38C 800881EC 0018CC03 */ sra $t9, $t8, 0x10
/* AFF390 800881F0 A4295AD0 */ sh $t1, %lo(sMagicBorderRatio)($at)
/* AFF394 800881F4 2B210004 */ slti $at, $t9, 4
/* AFF398 800881F8 1420001E */ bnez $at, .L80088274
/* AFF39C 800881FC 3C018012 */ lui $at, %hi(sMagicBorderStep) # $at, 0x8012
/* AFF3A0 80088200 1000001C */ b .L80088274
/* AFF3A4 80088204 A4205AD4 */ sh $zero, %lo(sMagicBorderStep)($at)
glabel L80088208
/* AFF3A8 80088208 806E0033 */ lb $t6, 0x33($v1)
/* AFF3AC 8008820C 3C078013 */ lui $a3, %hi(D_801333E0) # $a3, 0x8013
/* AFF3B0 80088210 3C188013 */ lui $t8, %hi(D_801333E8) # $t8, 0x8013
/* AFF3B4 80088214 24E733E0 */ addiu $a3, %lo(D_801333E0) # addiu $a3, $a3, 0x33e0
/* AFF3B8 80088218 271833E8 */ addiu $t8, %lo(D_801333E8) # addiu $t8, $t8, 0x33e8
/* AFF3BC 8008821C 3C058013 */ lui $a1, %hi(D_801333D4) # $a1, 0x8013
/* AFF3C0 80088220 25CF0004 */ addiu $t7, $t6, 4
/* AFF3C4 80088224 A06F0033 */ sb $t7, 0x33($v1)
/* AFF3C8 80088228 24A533D4 */ addiu $a1, %lo(D_801333D4) # addiu $a1, $a1, 0x33d4
/* AFF3CC 8008822C AFB80014 */ sw $t8, 0x14($sp)
/* AFF3D0 80088230 AFA70010 */ sw $a3, 0x10($sp)
/* AFF3D4 80088234 2404401F */ li $a0, 16415
/* AFF3D8 80088238 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* AFF3DC 8008823C 24060004 */ li $a2, 4
/* AFF3E0 80088240 3C038016 */ lui $v1, %hi(gSaveContext) # $v1, 0x8016
/* AFF3E4 80088244 2463E660 */ addiu $v1, %lo(gSaveContext) # addiu $v1, $v1, -0x19a0
/* AFF3E8 80088248 846213F8 */ lh $v0, 0x13f8($v1)
/* AFF3EC 8008824C 80790033 */ lb $t9, 0x33($v1)
/* AFF3F0 80088250 0322082A */ slt $at, $t9, $v0
/* AFF3F4 80088254 54200008 */ bnezl $at, .L80088278
/* AFF3F8 80088258 8FBF001C */ lw $ra, 0x1c($sp)
/* AFF3FC 8008825C 846E13F2 */ lh $t6, 0x13f2($v1)
/* AFF400 80088260 A0620033 */ sb $v0, 0x33($v1)
/* AFF404 80088264 A46013F2 */ sh $zero, 0x13f2($v1)
/* AFF408 80088268 10000002 */ b .L80088274
/* AFF40C 8008826C A46E13F0 */ sh $t6, 0x13f0($v1)
.L80088270:
/* AFF410 80088270 A46013F0 */ sh $zero, 0x13f0($v1)
.L80088274:
/* AFF414 80088274 8FBF001C */ lw $ra, 0x1c($sp)
.L80088278:
/* AFF418 80088278 27BD0020 */ addiu $sp, $sp, 0x20
/* AFF41C 8008827C 03E00008 */ jr $ra
/* AFF420 80088280 00000000 */ nop

View file

@ -1,115 +0,0 @@
glabel func_80AE3F9C
/* 01B9C 80AE3F9C AFA50004 */ sw $a1, 0x0004($sp)
/* 01BA0 80AE3FA0 84860310 */ lh $a2, 0x0310($a0) ## 00000310
/* 01BA4 80AE3FA4 848500B6 */ lh $a1, 0x00B6($a0) ## 000000B6
/* 01BA8 80AE3FA8 8483008A */ lh $v1, 0x008A($a0) ## 0000008A
/* 01BAC 80AE3FAC 00A6C021 */ addu $t8, $a1, $a2
/* 01BB0 80AE3FB0 00781023 */ subu $v0, $v1, $t8
/* 01BB4 80AE3FB4 00021400 */ sll $v0, $v0, 16
/* 01BB8 80AE3FB8 00021403 */ sra $v0, $v0, 16
/* 01BBC 80AE3FBC 2841FE0C */ slti $at, $v0, 0xFE0C
/* 01BC0 80AE3FC0 10200003 */ beq $at, $zero, .L80AE3FD0
/* 01BC4 80AE3FC4 00654823 */ subu $t1, $v1, $a1
/* 01BC8 80AE3FC8 10000008 */ beq $zero, $zero, .L80AE3FEC
/* 01BCC 80AE3FCC 2407FE0C */ addiu $a3, $zero, 0xFE0C ## $a3 = FFFFFE0C
.L80AE3FD0:
/* 01BD0 80AE3FD0 284101F5 */ slti $at, $v0, 0x01F5
/* 01BD4 80AE3FD4 14200003 */ bne $at, $zero, .L80AE3FE4
/* 01BD8 80AE3FD8 00404025 */ or $t0, $v0, $zero ## $t0 = 00000000
/* 01BDC 80AE3FDC 10000001 */ beq $zero, $zero, .L80AE3FE4
/* 01BE0 80AE3FE0 240801F4 */ addiu $t0, $zero, 0x01F4 ## $t0 = 000001F4
.L80AE3FE4:
/* 01BE4 80AE3FE4 00083C00 */ sll $a3, $t0, 16
/* 01BE8 80AE3FE8 00073C03 */ sra $a3, $a3, 16
.L80AE3FEC:
/* 01BEC 80AE3FEC 8499030E */ lh $t9, 0x030E($a0) ## 0000030E
/* 01BF0 80AE3FF0 00095400 */ sll $t2, $t1, 16
/* 01BF4 80AE3FF4 000A5C03 */ sra $t3, $t2, 16
/* 01BF8 80AE3FF8 00591023 */ subu $v0, $v0, $t9
/* 01BFC 80AE3FFC 00021400 */ sll $v0, $v0, 16
/* 01C00 80AE4000 00021403 */ sra $v0, $v0, 16
/* 01C04 80AE4004 2841FE0C */ slti $at, $v0, 0xFE0C
/* 01C08 80AE4008 50200004 */ beql $at, $zero, .L80AE401C
/* 01C0C 80AE400C 284101F5 */ slti $at, $v0, 0x01F5
/* 01C10 80AE4010 10000008 */ beq $zero, $zero, .L80AE4034
/* 01C14 80AE4014 2402FE0C */ addiu $v0, $zero, 0xFE0C ## $v0 = FFFFFE0C
/* 01C18 80AE4018 284101F5 */ slti $at, $v0, 0x01F5
.L80AE401C:
/* 01C1C 80AE401C 14200003 */ bne $at, $zero, .L80AE402C
/* 01C20 80AE4020 00404025 */ or $t0, $v0, $zero ## $t0 = FFFFFE0C
/* 01C24 80AE4024 10000001 */ beq $zero, $zero, .L80AE402C
/* 01C28 80AE4028 240801F4 */ addiu $t0, $zero, 0x01F4 ## $t0 = 000001F4
.L80AE402C:
/* 01C2C 80AE402C 00081400 */ sll $v0, $t0, 16
/* 01C30 80AE4030 00021403 */ sra $v0, $v0, 16
.L80AE4034:
/* 01C34 80AE4034 0560000F */ bltz $t3, .L80AE4074
/* 01C38 80AE4038 2409B6A1 */ addiu $t1, $zero, 0xB6A1 ## $t1 = FFFFB6A1
/* 01C3C 80AE403C 04E00003 */ bltz $a3, .L80AE404C
/* 01C40 80AE4040 00074023 */ subu $t0, $zero, $a3
/* 01C44 80AE4044 10000001 */ beq $zero, $zero, .L80AE404C
/* 01C48 80AE4048 00E04025 */ or $t0, $a3, $zero ## $t0 = FFFFFE0C
.L80AE404C:
/* 01C4C 80AE404C 00C86021 */ addu $t4, $a2, $t0
/* 01C50 80AE4050 04400003 */ bltz $v0, .L80AE4060
/* 01C54 80AE4054 A48C0310 */ sh $t4, 0x0310($a0) ## 00000310
/* 01C58 80AE4058 10000002 */ beq $zero, $zero, .L80AE4064
/* 01C5C 80AE405C 00404025 */ or $t0, $v0, $zero ## $t0 = FFFFFE0C
.L80AE4060:
/* 01C60 80AE4060 00024023 */ subu $t0, $zero, $v0
.L80AE4064:
/* 01C64 80AE4064 848D030E */ lh $t5, 0x030E($a0) ## 0000030E
/* 01C68 80AE4068 01A87021 */ addu $t6, $t5, $t0
/* 01C6C 80AE406C 1000000E */ beq $zero, $zero, .L80AE40A8
/* 01C70 80AE4070 A48E030E */ sh $t6, 0x030E($a0) ## 0000030E
.L80AE4074:
/* 01C74 80AE4074 04E00003 */ bltz $a3, .L80AE4084
/* 01C78 80AE4078 00074023 */ subu $t0, $zero, $a3
/* 01C7C 80AE407C 10000001 */ beq $zero, $zero, .L80AE4084
/* 01C80 80AE4080 00E04025 */ or $t0, $a3, $zero ## $t0 = FFFFFE0C
.L80AE4084:
/* 01C84 80AE4084 00C87823 */ subu $t7, $a2, $t0
/* 01C88 80AE4088 04400003 */ bltz $v0, .L80AE4098
/* 01C8C 80AE408C A48F0310 */ sh $t7, 0x0310($a0) ## 00000310
/* 01C90 80AE4090 10000002 */ beq $zero, $zero, .L80AE409C
/* 01C94 80AE4094 00404025 */ or $t0, $v0, $zero ## $t0 = FFFFFE0C
.L80AE4098:
/* 01C98 80AE4098 00024023 */ subu $t0, $zero, $v0
.L80AE409C:
/* 01C9C 80AE409C 8498030E */ lh $t8, 0x030E($a0) ## 0000030E
/* 01CA0 80AE40A0 0308C823 */ subu $t9, $t8, $t0
/* 01CA4 80AE40A4 A499030E */ sh $t9, 0x030E($a0) ## 0000030E
.L80AE40A8:
/* 01CA8 80AE40A8 84860310 */ lh $a2, 0x0310($a0) ## 00000310
/* 01CAC 80AE40AC 240ADA91 */ addiu $t2, $zero, 0xDA91 ## $t2 = FFFFDA91
/* 01CB0 80AE40B0 28C1B6A1 */ slti $at, $a2, 0xB6A1
/* 01CB4 80AE40B4 50200004 */ beql $at, $zero, .L80AE40C8
/* 01CB8 80AE40B8 28C14960 */ slti $at, $a2, 0x4960
/* 01CBC 80AE40BC 10000007 */ beq $zero, $zero, .L80AE40DC
/* 01CC0 80AE40C0 A4890310 */ sh $t1, 0x0310($a0) ## 00000310
/* 01CC4 80AE40C4 28C14960 */ slti $at, $a2, 0x4960
.L80AE40C8:
/* 01CC8 80AE40C8 14200003 */ bne $at, $zero, .L80AE40D8
/* 01CCC 80AE40CC 00C04025 */ or $t0, $a2, $zero ## $t0 = 00000000
/* 01CD0 80AE40D0 10000001 */ beq $zero, $zero, .L80AE40D8
/* 01CD4 80AE40D4 2408495F */ addiu $t0, $zero, 0x495F ## $t0 = 0000495F
.L80AE40D8:
/* 01CD8 80AE40D8 A4880310 */ sh $t0, 0x0310($a0) ## 00000310
.L80AE40DC:
/* 01CDC 80AE40DC 8482030E */ lh $v0, 0x030E($a0) ## 0000030E
/* 01CE0 80AE40E0 2841DA91 */ slti $at, $v0, 0xDA91
/* 01CE4 80AE40E4 50200004 */ beql $at, $zero, .L80AE40F8
/* 01CE8 80AE40E8 28412570 */ slti $at, $v0, 0x2570
/* 01CEC 80AE40EC 03E00008 */ jr $ra
/* 01CF0 80AE40F0 A48A030E */ sh $t2, 0x030E($a0) ## 0000030E
.L80AE40F4:
/* 01CF4 80AE40F4 28412570 */ slti $at, $v0, 0x2570
.L80AE40F8:
/* 01CF8 80AE40F8 14200003 */ bne $at, $zero, .L80AE4108
/* 01CFC 80AE40FC 00404025 */ or $t0, $v0, $zero ## $t0 = FFFFFE0C
/* 01D00 80AE4100 10000001 */ beq $zero, $zero, .L80AE4108
/* 01D04 80AE4104 2408256F */ addiu $t0, $zero, 0x256F ## $t0 = 0000256F
.L80AE4108:
/* 01D08 80AE4108 A488030E */ sh $t0, 0x030E($a0) ## 0000030E
/* 01D0C 80AE410C 03E00008 */ jr $ra
/* 01D10 80AE4110 00000000 */ nop

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_80AE4A30
.incbin "baserom/ovl_En_Rd", 0x2630, 0x000002A0

4
spec
View file

@ -2923,11 +2923,7 @@ endseg
beginseg
name "ovl_En_Rd"
include "build/src/overlays/actors/ovl_En_Rd/z_en_rd.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Rd/ovl_En_Rd_reloc.o"
#else
include "build/data/overlays/actors/z_en_rd.reloc.o"
#endif
endseg
beginseg

View file

@ -2016,9 +2016,7 @@ void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx) {
}
void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
s32 temp; // inline temp needed to match regalloc
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", temp = gSaveContext.respawnFlag);
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag));
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC)) {
@ -2037,12 +2035,12 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
gSaveContext.cutsceneIndex = 0xFFF0;
} else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
LINK_IS_ADULT && !Flags_GetEventChkInf(0xC4) &&
(gEntranceTable[temp = gSaveContext.entranceIndex].scene == SCENE_TOKINOMA)) {
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA)) {
Flags_SetEventChkInf(0xC4);
gSaveContext.entranceIndex = 0x0053;
gSaveContext.cutsceneIndex = 0xFFF8;
} else if (!Flags_GetEventChkInf(0xC7) &&
(gEntranceTable[temp = gSaveContext.entranceIndex].scene == SCENE_GANON_DEMO)) {
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_DEMO)) {
Flags_SetEventChkInf(0xC7);
gSaveContext.entranceIndex = 0x0517;
gSaveContext.cutsceneIndex = 0xFFF0;

View file

@ -11,7 +11,9 @@ extern void KaleidoScope_Update(GlobalContext*);
extern void KaleidoScope_Draw(GlobalContext*);
void KaleidoScopeCall_LoadPlayer() {
if ((u32)gKaleidoMgrCurOvl != (u32)&gKaleidoMgrOverlayTable[KALEIDO_OVL_PLAYER_ACTOR]) {
KaleidoManagerOvl* playerActorOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_PLAYER_ACTOR];
if (gKaleidoMgrCurOvl != playerActorOvl) {
if (gKaleidoMgrCurOvl) {
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("カレイド領域 強制排除\n"); // Kaleido area forced exclusion
@ -21,7 +23,7 @@ void KaleidoScopeCall_LoadPlayer() {
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("プレイヤーアクター搬入\n"); // Player actor import
osSyncPrintf(VT_RST);
KaleidoManager_LoadOvl(&gKaleidoMgrOverlayTable[KALEIDO_OVL_PLAYER_ACTOR]);
KaleidoManager_LoadOvl(playerActorOvl);
}
}
@ -44,13 +46,9 @@ void KaleidoScopeCall_Destroy(GlobalContext* globalCtx) {
KaleidoSetup_Destroy(globalCtx);
}
// regalloc
#ifdef NON_MATCHING
void KaleidoScopeCall_Update(GlobalContext* globalCtx) {
s32 pad;
PauseContext* pauseCtx;
pauseCtx = &globalCtx->pauseCtx;
KaleidoManagerOvl* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
PauseContext* pauseCtx = &globalCtx->pauseCtx;
if (pauseCtx->state != 0 || pauseCtx->flag != 0) {
if (pauseCtx->state == 1) {
@ -60,7 +58,7 @@ void KaleidoScopeCall_Update(GlobalContext* globalCtx) {
R_PAUSE_MENU_MODE = 1;
pauseCtx->unk_1E4 = 0;
pauseCtx->unk_1EC = 0;
pauseCtx->state++;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
}
} else if (pauseCtx->state == 8) {
HREG(80) = 7;
@ -68,15 +66,15 @@ void KaleidoScopeCall_Update(GlobalContext* globalCtx) {
R_PAUSE_MENU_MODE = 1;
pauseCtx->unk_1E4 = 0;
pauseCtx->unk_1EC = 0;
pauseCtx->state++;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
} else if (pauseCtx->state == 2 || pauseCtx->state == 9) {
osSyncPrintf("PR_KAREIDOSCOPE_MODE=%d\n", R_PAUSE_MENU_MODE);
if (R_PAUSE_MENU_MODE >= 3) {
pauseCtx->state++;
}
} else if (pauseCtx->state != 0) {
if (&gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE] != gKaleidoMgrCurOvl) {
if (gKaleidoMgrCurOvl) {
if (gKaleidoMgrCurOvl != kaleidoScopeOvl) {
if (gKaleidoMgrCurOvl != NULL) {
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("カレイド領域 プレイヤー 強制排除\n"); // Kaleid Zone Player Forced Elimination
osSyncPrintf(VT_RST);
@ -85,32 +83,29 @@ void KaleidoScopeCall_Update(GlobalContext* globalCtx) {
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("カレイド領域 カレイドスコープ搬入\n"); // Kaleid area Kaleidoscope loading
osSyncPrintf(VT_RST);
KaleidoManager_LoadOvl(&gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE]);
KaleidoManager_LoadOvl(kaleidoScopeOvl);
}
if (&gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE] == gKaleidoMgrCurOvl) {
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
sKaleidoScopeUpdateFunc(globalCtx);
if (globalCtx->pauseCtx.state == 0 && globalCtx->pauseCtx.flag == 0) {
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("カレイド領域 カレイドスコープ排出\n"); // Kaleid area Kaleidoscope emission
osSyncPrintf(VT_RST);
KaleidoManager_ClearOvl(&gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE]);
KaleidoManager_ClearOvl(kaleidoScopeOvl);
KaleidoScopeCall_LoadPlayer();
}
}
}
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kaleido_scope_call/KaleidoScopeCall_Update.s")
#endif
void KaleidoScopeCall_Draw(GlobalContext* globalCtx) {
KaleidoManagerOvl* kaleidoScopeOvl;
KaleidoManagerOvl* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
if (R_PAUSE_MENU_MODE >= 3) {
if ((globalCtx->pauseCtx.state >= 4 && globalCtx->pauseCtx.state < 8) ||
(globalCtx->pauseCtx.state >= 11 && globalCtx->pauseCtx.state < 19)) {
kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
sKaleidoScopeDrawFunc(globalCtx);
}

View file

@ -2356,8 +2356,6 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2) {
return 0;
}
#ifdef NON_MATCHING
// this function still needs some work
void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
static s16 sMagicBorderColors[][3] = {
{ 0xFF, 0xFF, 0xFF },
@ -2368,28 +2366,33 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
static s16 sMagicBorderIndexes[] = { 0, 1, 1, 0 };
static s16 sMagicBorderRatio = 2;
static s16 sMagicBorderStep = 1;
s16* color;
s16 maxMagic;
MessageContext* msgCtx = &globalCtx->msgCtx;
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
s16 borderChangeR;
s16 borderChangeG;
s16 borderChangeB;
s16 temp;
switch (gSaveContext.unk_13F0) {
case 8:
maxMagic = gSaveContext.magicLevel * 0x30;
if (gSaveContext.unk_13F4 != maxMagic) {
if (gSaveContext.unk_13F4 < maxMagic) {
temp = gSaveContext.magicLevel * 0x30;
if (gSaveContext.unk_13F4 != temp) {
if (gSaveContext.unk_13F4 < temp) {
gSaveContext.unk_13F4 += 8;
if (gSaveContext.unk_13F4 > maxMagic) {
gSaveContext.unk_13F4 = maxMagic;
if (gSaveContext.unk_13F4 > temp) {
gSaveContext.unk_13F4 = temp;
}
} else {
gSaveContext.unk_13F4 -= 8;
if (gSaveContext.unk_13F4 <= maxMagic) {
gSaveContext.unk_13F4 = maxMagic;
if (gSaveContext.unk_13F4 <= temp) {
gSaveContext.unk_13F4 = temp;
}
}
} else {
gSaveContext.unk_13F0 = 9;
}
break;
case 9:
gSaveContext.magic += 4;
@ -2398,60 +2401,61 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
&D_801333E8);
}
// Translates to: "Storage MAGIC_NOW=%d (%d)"
osSyncPrintf("蓄電 MAGIC_NOW=%d (%d)\n", gSaveContext.magic, gSaveContext.unk_13F6);
// Translates to: "Storage MAGIC_NOW=%d (%d)"
osSyncPrintf("蓄電 MAGIC_NOW=%d (%d)\n", gSaveContext.magic, gSaveContext.unk_13F6);
if (gSaveContext.magic >= gSaveContext.unk_13F6) {
gSaveContext.magic = gSaveContext.unk_13F6;
gSaveContext.unk_13F0 = gSaveContext.unk_13F2;
gSaveContext.unk_13F2 = 0;
}
break;
case 1:
sMagicBorderRatio = 2;
gSaveContext.unk_13F0 = 2;
break;
case 2:
gSaveContext.magic -= 2;
if (gSaveContext.magic <= 0) {
gSaveContext.magic = 0;
gSaveContext.unk_13F0 = 3;
sMagicBorderB = 255;
sMagicBorderG = 255;
sMagicBorderR = 255;
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
} else if (gSaveContext.magic == gSaveContext.unk_13F8) {
gSaveContext.unk_13F0 = 3;
sMagicBorderB = 255;
sMagicBorderG = 255;
sMagicBorderR = 255;
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
}
case 3:
case 4:
case 6:
color = sMagicBorderColors[sMagicBorderIndexes[sMagicBorderStep]];
temp = sMagicBorderIndexes[sMagicBorderStep];
borderChangeR = ABS(sMagicBorderR - sMagicBorderColors[temp][0]) / sMagicBorderRatio;
borderChangeG = ABS(sMagicBorderG - sMagicBorderColors[temp][1]) / sMagicBorderRatio;
borderChangeB = ABS(sMagicBorderB - sMagicBorderColors[temp][2]) / sMagicBorderRatio;
if (sMagicBorderR >= color[0]) {
sMagicBorderR -= ABS(sMagicBorderR - color[0]) / sMagicBorderRatio;
if (sMagicBorderR >= sMagicBorderColors[temp][0]) {
sMagicBorderR -= borderChangeR;
} else {
sMagicBorderR += ABS(sMagicBorderR - color[0]) / sMagicBorderRatio;
sMagicBorderR += borderChangeR;
}
if (sMagicBorderG >= color[1]) {
sMagicBorderG -= ABS(sMagicBorderG - color[1]) / sMagicBorderRatio;
if (sMagicBorderG >= sMagicBorderColors[temp][1]) {
sMagicBorderG -= borderChangeG;
} else {
sMagicBorderG += ABS(sMagicBorderG - color[1]) / sMagicBorderRatio;
sMagicBorderG += borderChangeG;
}
if (sMagicBorderB >= color[2]) {
sMagicBorderB -= ABS(sMagicBorderB - color[2]) / sMagicBorderRatio;
if (sMagicBorderB >= sMagicBorderColors[temp][2]) {
sMagicBorderB -= borderChangeB;
} else {
sMagicBorderB += ABS(sMagicBorderB - color[2]) / sMagicBorderRatio;
sMagicBorderB += borderChangeB;
}
sMagicBorderRatio--;
if (sMagicBorderRatio == 0) {
sMagicBorderR = color[0];
sMagicBorderG = color[1];
sMagicBorderB = color[2];
sMagicBorderR = sMagicBorderColors[temp][0];
sMagicBorderG = sMagicBorderColors[temp][1];
sMagicBorderB = sMagicBorderColors[temp][2];
sMagicBorderRatio = YREG(40 + sMagicBorderStep);
sMagicBorderStep++;
if (sMagicBorderStep >= 4) {
@ -2459,16 +2463,16 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
}
}
break;
case 5:
sMagicBorderB = 255;
sMagicBorderG = 255;
sMagicBorderR = 255;
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
gSaveContext.unk_13F0 = 0;
break;
case 7:
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) &&
(globalCtx->msgCtx.msgMode == 0) && (globalCtx->unk_10A20 == 0) && (globalCtx->sceneLoadFlag == 0) &&
(globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx)) {
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && (msgCtx->msgMode == 0) &&
(globalCtx->unk_10A20 == 0) && (globalCtx->sceneLoadFlag == 0) && (globalCtx->transitionMode == 0) &&
!Gameplay_InCsMode(globalCtx)) {
if ((gSaveContext.magic == 0) || ((func_8008F2F8(globalCtx) >= 2) && (func_8008F2F8(globalCtx) < 5)) ||
((gSaveContext.equips.buttonItems[1] != ITEM_LENS) &&
(gSaveContext.equips.buttonItems[2] != ITEM_LENS) &&
@ -2482,38 +2486,41 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
break;
}
globalCtx->interfaceCtx.unk_230--;
if (globalCtx->interfaceCtx.unk_230 == 0) {
interfaceCtx->unk_230--;
if (interfaceCtx->unk_230 == 0) {
gSaveContext.magic--;
globalCtx->interfaceCtx.unk_230 = 80;
interfaceCtx->unk_230 = 80;
}
}
color = sMagicBorderColors[sMagicBorderIndexes[sMagicBorderStep]];
temp = sMagicBorderIndexes[sMagicBorderStep];
borderChangeR = ABS(sMagicBorderR - sMagicBorderColors[temp][0]) / sMagicBorderRatio;
borderChangeG = ABS(sMagicBorderG - sMagicBorderColors[temp][1]) / sMagicBorderRatio;
borderChangeB = ABS(sMagicBorderB - sMagicBorderColors[temp][2]) / sMagicBorderRatio;
if (sMagicBorderR >= color[0]) {
sMagicBorderR -= ABS(sMagicBorderR - color[0]) / sMagicBorderRatio;
if (sMagicBorderR >= sMagicBorderColors[temp][0]) {
sMagicBorderR -= borderChangeR;
} else {
sMagicBorderR += ABS(sMagicBorderR - color[0]) / sMagicBorderRatio;
sMagicBorderR += borderChangeR;
}
if (sMagicBorderG >= color[1]) {
sMagicBorderG -= ABS(sMagicBorderG - color[1]) / sMagicBorderRatio;
if (sMagicBorderG >= sMagicBorderColors[temp][1]) {
sMagicBorderG -= borderChangeG;
} else {
sMagicBorderG += ABS(sMagicBorderG - color[1]) / sMagicBorderRatio;
sMagicBorderG += borderChangeG;
}
if (sMagicBorderB >= color[2]) {
sMagicBorderB -= ABS(sMagicBorderB - color[2]) / sMagicBorderRatio;
if (sMagicBorderB >= sMagicBorderColors[temp][2]) {
sMagicBorderB -= borderChangeB;
} else {
sMagicBorderB += ABS(sMagicBorderB - color[2]) / sMagicBorderRatio;
sMagicBorderB += borderChangeB;
}
sMagicBorderRatio--;
if (sMagicBorderRatio == 0) {
sMagicBorderR = color[0];
sMagicBorderG = color[1];
sMagicBorderB = color[2];
sMagicBorderR = sMagicBorderColors[temp][0];
sMagicBorderG = sMagicBorderColors[temp][1];
sMagicBorderB = sMagicBorderColors[temp][2];
sMagicBorderRatio = YREG(40 + sMagicBorderStep);
sMagicBorderStep++;
if (sMagicBorderStep >= 4) {
@ -2521,6 +2528,7 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
}
}
break;
case 10:
gSaveContext.magic += 4;
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
@ -2530,24 +2538,12 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
gSaveContext.unk_13F2 = 0;
}
break;
default:
gSaveContext.unk_13F0 = 0;
break;
}
}
#else
s16 sMagicBorderColors[][3] = {
{ 0xFF, 0xFF, 0xFF },
{ 0x96, 0x96, 0x96 },
{ 0xFF, 0xFF, 0x96 },
{ 0xFF, 0xFF, 0x32 },
};
s16 sMagicBorderIndexes[] = { 0, 1, 1, 0 };
s16 sMagicBorderRatio = 2;
s16 sMagicBorderStep = 1;
void Interface_UpdateMagicBar(GlobalContext* globalCtx);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_UpdateMagicBar.s")
#endif
void Interface_DrawMagicBar(GlobalContext* globalCtx) {
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
@ -2689,15 +2685,14 @@ u8* sCUpLabelTextures[] = { D_02002FC0, D_02002FC0, D_02002FC0 };
s16 sStartButtonLeftPos[] = { 132, 130, 130 };
#ifdef NON_MATCHING
// regalloc and ordering differences
void Interface_DrawItemButtons(GlobalContext* globalCtx) {
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
Player* player = PLAYER;
f32 temp;
s16 i; // sp+0x14A
s16 cUpAlpha;
s32 pad;
PauseContext* pauseCtx = &globalCtx->pauseCtx;
s16 temp;
s16 dxdy;
s16 width;
s16 height;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 2900);
@ -2734,7 +2729,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
(R_ITEM_BTN_X(3) + R_ITEM_BTN_WIDTH(3)) << 2, (R_ITEM_BTN_Y(3) + R_ITEM_BTN_WIDTH(3)) << 2,
G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(3) * 2, R_ITEM_BTN_DD(3) * 2);
if ((globalCtx->pauseCtx.state < 8) || (globalCtx->pauseCtx.state >= 18)) {
if ((pauseCtx->state < 8) || (pauseCtx->state >= 18)) {
if ((globalCtx->pauseCtx.state != 0) || (globalCtx->pauseCtx.flag != 0)) {
// Start Button Texture, Color & Label
gDPPipeSync(oGfxCtx->overlay.p++);
@ -2761,12 +2756,13 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
G_TX_NOLOD);
gDPSetTileSize(oGfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60);
temp = R_START_LABEL_DD(gSaveContext.language) / 100.0f;
gSPTextureRectangle(oGfxCtx->overlay.p++, R_START_LABEL_X(gSaveContext.language) << 2,
R_START_LABEL_Y(gSaveContext.language) << 2,
(R_START_LABEL_X(gSaveContext.language) + (s16)(16.0f / temp)) << 2,
(R_START_LABEL_Y(gSaveContext.language) + (s16)(48.0f / temp)) << 2, G_TX_RENDERTILE, 0,
0, (s16)(1024.0f / temp), (s16)(1024.0f / temp));
dxdy = 1024.0f / (R_START_LABEL_DD(gSaveContext.language) / 100.0f);
width = 48.0f / (R_START_LABEL_DD(gSaveContext.language) / 100.0f);
height = 16.0f / (R_START_LABEL_DD(gSaveContext.language) / 100.0f);
gSPTextureRectangle(
oGfxCtx->overlay.p++, R_START_LABEL_X(gSaveContext.language) << 2,
R_START_LABEL_Y(gSaveContext.language) << 2, (R_START_LABEL_X(gSaveContext.language) + width) << 2,
(R_START_LABEL_Y(gSaveContext.language) + height) << 2, G_TX_RENDERTILE, 0, 0, dxdy, dxdy);
}
}
@ -2777,20 +2773,20 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
gDPPipeSync(oGfxCtx->overlay.p++);
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
cUpAlpha = 0;
} else if ((player->stateFlags2 & 0x00200000) || (func_8008F2F8(globalCtx) == 4) ||
temp = 0;
} else if ((player->stateFlags1 & 0x00200000) || (func_8008F2F8(globalCtx) == 4) ||
(player->stateFlags2 & 0x00040000)) {
cUpAlpha = 70;
temp = 70;
} else {
cUpAlpha = interfaceCtx->healthAlpha;
temp = interfaceCtx->healthAlpha;
}
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), cUpAlpha);
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), temp);
gDPSetCombineMode(oGfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gSPTextureRectangle(oGfxCtx->overlay.p++, R_C_UP_BTN_X << 2, R_C_UP_BTN_Y << 2, (R_C_UP_BTN_X + 16) << 2,
(R_C_UP_BTN_Y + 16) << 2, G_TX_RENDERTILE, 0, 0, 2048, 2048);
gDPPipeSync(oGfxCtx->overlay.p++);
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, cUpAlpha);
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 255, 255, 255, temp);
gDPSetEnvColor(oGfxCtx->overlay.p++, 0, 0, 0, 0);
gDPSetCombineLERP(oGfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
@ -2814,20 +2810,20 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
sCUpTimer--;
if (sCUpTimer == 0) {
sCUpTimer = 10;
sCUpInvisible ^= 1;
sCUpTimer = 10;
}
}
gDPPipeSync(oGfxCtx->overlay.p++);
// Empty C Button Arrows
for (i = 1; i < 4; i++) {
if (gSaveContext.equips.buttonItems[i] > 0xF0) {
if (i == 1) {
for (temp = 1; temp < 4; temp++) {
if (gSaveContext.equips.buttonItems[temp] > 0xF0) {
if (temp == 1) {
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2),
interfaceCtx->cLeftAlpha);
} else if (i == 2) {
} else if (temp == 2) {
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2),
interfaceCtx->cDownAlpha);
} else {
@ -2835,18 +2831,14 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
interfaceCtx->cRightAlpha);
}
oGfxCtx->overlay.p =
Gfx_TextureIA8(oGfxCtx->overlay.p, &D_02000A00[i + 1], 0x20, 0x20, R_ITEM_BTN_X(i), R_ITEM_BTN_Y(i),
R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_WIDTH(i), R_ITEM_BTN_DD(i) * 2, R_ITEM_BTN_DD(i) * 2);
oGfxCtx->overlay.p = Gfx_TextureIA8(
oGfxCtx->overlay.p, &D_02000A00[temp + 1], 0x20, 0x20, R_ITEM_BTN_X(temp), R_ITEM_BTN_Y(temp),
R_ITEM_BTN_WIDTH(temp), R_ITEM_BTN_WIDTH(temp), R_ITEM_BTN_DD(temp) * 2, R_ITEM_BTN_DD(temp) * 2);
}
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3071);
}
#else
void Interface_DrawItemButtons(GlobalContext* globalCtx);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_DrawItemButtons.s")
#endif
void Interface_DrawItemIconTexture(GlobalContext* globalCtx, void* texture, s16 button) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3079);

View file

@ -682,42 +682,28 @@ void func_80AE3ECC(EnRd* this, GlobalContext* globalCtx) {
}
}
// Regalloc..I can get the score lower by using permuter suggestions, but they all seem silly
#ifdef NON_MATCHING
void func_80AE3F9C(EnRd* this, GlobalContext* globalCtx) {
s16 unk_310;
s16 shapeRotY;
s16 yawTowardsLink;
s16 new_var;
s16 temp_v0;
s16 phi_a3;
s16 phi_v0;
s16 temp1;
s16 temp2;
s16 temp3;
unk_310 = this->unk_310;
shapeRotY = this->actor.shape.rot.y;
yawTowardsLink = this->actor.yawTowardsLink;
new_var = unk_310 + shapeRotY;
temp1 = this->actor.yawTowardsLink - (s16)(this->actor.shape.rot.y + this->unk_310);
temp2 = CLAMP(temp1, -500, 500);
temp_v0 = yawTowardsLink - new_var;
phi_a3 = CLAMP(temp_v0, -500, 500);
temp1 -= this->unk_30E;
temp3 = CLAMP(temp1, -500, 500);
temp_v0 -= this->unk_30E;
phi_v0 = CLAMP(temp_v0, -500, 500);
if ((s16)(yawTowardsLink - shapeRotY) >= 0) {
this->unk_310 += ABS(phi_a3);
this->unk_30E += ABS(phi_v0);
if ((s16)(this->actor.yawTowardsLink - this->actor.shape.rot.y) >= 0) {
this->unk_310 += ABS(temp2);
this->unk_30E += ABS(temp3);
} else {
this->unk_310 -= ABS(phi_a3);
this->unk_30E -= ABS(phi_v0);
this->unk_310 -= ABS(temp2);
this->unk_30E -= ABS(temp3);
}
this->unk_310 = CLAMP(this->unk_310, -18783, 18783);
this->unk_30E = CLAMP(this->unk_30E, -9583, 9583);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Rd/func_80AE3F9C.s")
#endif
void func_80AE4114(EnRd* this, GlobalContext* globalCtx) {
s32 pad;