mirror of
https://github.com/pmret/papermario.git
synced 2024-11-13 22:43:00 +01:00
226 lines
10 KiB
ArmAsm
226 lines
10 KiB
ArmAsm
|
.set noat # allow manual use of $at
|
||
|
.set noreorder # don't insert nops after branches
|
||
|
|
||
|
|
||
|
glabel func_800351C8_2
|
||
|
/* 0105C8 800351C8 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||
|
/* 0105CC 800351CC AFB10014 */ sw $s1, 0x14($sp)
|
||
|
/* 0105D0 800351D0 3C11800A */ lui $s1, 0x800a
|
||
|
/* 0105D4 800351D4 26310931 */ addiu $s1, $s1, 0x931
|
||
|
/* 0105D8 800351D8 AFBF0020 */ sw $ra, 0x20($sp)
|
||
|
/* 0105DC 800351DC AFB3001C */ sw $s3, 0x1c($sp)
|
||
|
/* 0105E0 800351E0 AFB20018 */ sw $s2, 0x18($sp)
|
||
|
/* 0105E4 800351E4 AFB00010 */ sw $s0, 0x10($sp)
|
||
|
/* 0105E8 800351E8 82230000 */ lb $v1, ($s1)
|
||
|
/* 0105EC 800351EC 24120001 */ addiu $s2, $zero, 1
|
||
|
/* 0105F0 800351F0 10720030 */ beq $v1, $s2, .L800352B4
|
||
|
/* 0105F4 800351F4 28620002 */ slti $v0, $v1, 2
|
||
|
/* 0105F8 800351F8 10400005 */ beqz $v0, .L80035210
|
||
|
/* 0105FC 800351FC 24130002 */ addiu $s3, $zero, 2
|
||
|
/* 010600 80035200 10600009 */ beqz $v1, .L80035228
|
||
|
/* 010604 80035204 00000000 */ nop
|
||
|
/* 010608 80035208 0800D534 */ j .L800354D0
|
||
|
/* 01060C 8003520C 00000000 */ nop
|
||
|
|
||
|
.L80035210:
|
||
|
/* 010610 80035210 10730033 */ beq $v1, $s3, .L800352E0
|
||
|
/* 010614 80035214 24020003 */ addiu $v0, $zero, 3
|
||
|
/* 010618 80035218 10620055 */ beq $v1, $v0, .L80035370
|
||
|
/* 01061C 8003521C 00000000 */ nop
|
||
|
/* 010620 80035220 0800D534 */ j .L800354D0
|
||
|
/* 010624 80035224 00000000 */ nop
|
||
|
|
||
|
.L80035228:
|
||
|
/* 010628 80035228 0C037DD0 */ jal func_800DF740
|
||
|
/* 01062C 8003522C 00000000 */ nop
|
||
|
/* 010630 80035230 0C00E64C */ jal func_80039930
|
||
|
/* 010634 80035234 00000000 */ nop
|
||
|
/* 010638 80035238 0C00F949 */ jal func_8003E524
|
||
|
/* 01063C 8003523C 00000000 */ nop
|
||
|
/* 010640 80035240 0C016754 */ jal func_80059D50
|
||
|
/* 010644 80035244 00000000 */ nop
|
||
|
/* 010648 80035248 3C10800A */ lui $s0, 0x800a
|
||
|
/* 01064C 8003524C 26100932 */ addiu $s0, $s0, 0x932
|
||
|
/* 010650 80035250 86020000 */ lh $v0, ($s0)
|
||
|
/* 010654 80035254 96030000 */ lhu $v1, ($s0)
|
||
|
/* 010658 80035258 284200FF */ slti $v0, $v0, 0xff
|
||
|
/* 01065C 8003525C 10400013 */ beqz $v0, .L800352AC
|
||
|
/* 010660 80035260 24620014 */ addiu $v0, $v1, 0x14
|
||
|
/* 010664 80035264 A6020000 */ sh $v0, ($s0)
|
||
|
/* 010668 80035268 00021400 */ sll $v0, $v0, 0x10
|
||
|
/* 01066C 8003526C 00021403 */ sra $v0, $v0, 0x10
|
||
|
/* 010670 80035270 28420100 */ slti $v0, $v0, 0x100
|
||
|
/* 010674 80035274 14400002 */ bnez $v0, .L80035280
|
||
|
/* 010678 80035278 240200FF */ addiu $v0, $zero, 0xff
|
||
|
/* 01067C 8003527C A6020000 */ sh $v0, ($s0)
|
||
|
.L80035280:
|
||
|
/* 010680 80035280 86020000 */ lh $v0, ($s0)
|
||
|
/* 010684 80035284 44820000 */ mtc1 $v0, $f0
|
||
|
/* 010688 80035288 00000000 */ nop
|
||
|
/* 01068C 8003528C 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 010690 80035290 44050000 */ mfc1 $a1, $f0
|
||
|
/* 010694 80035294 0C04DF62 */ jal func_80137D88
|
||
|
/* 010698 80035298 0000202D */ daddu $a0, $zero, $zero
|
||
|
/* 01069C 8003529C 86030000 */ lh $v1, ($s0)
|
||
|
/* 0106A0 800352A0 240200FF */ addiu $v0, $zero, 0xff
|
||
|
/* 0106A4 800352A4 1462008A */ bne $v1, $v0, .L800354D0
|
||
|
/* 0106A8 800352A8 00000000 */ nop
|
||
|
.L800352AC:
|
||
|
/* 0106AC 800352AC 0800D534 */ j .L800354D0
|
||
|
/* 0106B0 800352B0 A2320000 */ sb $s2, ($s1)
|
||
|
|
||
|
.L800352B4:
|
||
|
/* 0106B4 800352B4 24020005 */ addiu $v0, $zero, 5
|
||
|
/* 0106B8 800352B8 3C04800A */ lui $a0, 0x800a
|
||
|
/* 0106BC 800352BC 2484A650 */ addiu $a0, $a0, -0x59b0
|
||
|
/* 0106C0 800352C0 3C01800A */ lui $at, 0x800a
|
||
|
/* 0106C4 800352C4 A0220930 */ sb $v0, 0x930($at)
|
||
|
/* 0106C8 800352C8 8C820000 */ lw $v0, ($a0)
|
||
|
/* 0106CC 800352CC 24030002 */ addiu $v1, $zero, 2
|
||
|
/* 0106D0 800352D0 A2230000 */ sb $v1, ($s1)
|
||
|
/* 0106D4 800352D4 34420008 */ ori $v0, $v0, 8
|
||
|
/* 0106D8 800352D8 0800D534 */ j .L800354D0
|
||
|
/* 0106DC 800352DC AC820000 */ sw $v0, ($a0)
|
||
|
|
||
|
.L800352E0:
|
||
|
/* 0106E0 800352E0 3C10800A */ lui $s0, 0x800a
|
||
|
/* 0106E4 800352E4 26100930 */ addiu $s0, $s0, 0x930
|
||
|
/* 0106E8 800352E8 92020000 */ lbu $v0, ($s0)
|
||
|
/* 0106EC 800352EC 2442FFFF */ addiu $v0, $v0, -1
|
||
|
/* 0106F0 800352F0 A2020000 */ sb $v0, ($s0)
|
||
|
/* 0106F4 800352F4 00021600 */ sll $v0, $v0, 0x18
|
||
|
/* 0106F8 800352F8 14400075 */ bnez $v0, .L800354D0
|
||
|
/* 0106FC 800352FC 00000000 */ nop
|
||
|
/* 010700 80035300 3C048007 */ lui $a0, 0x8007
|
||
|
/* 010704 80035304 24847980 */ addiu $a0, $a0, 0x7980
|
||
|
/* 010708 80035308 0C017CBC */ jal nuGfxSetCfb
|
||
|
/* 01070C 8003530C 24050002 */ addiu $a1, $zero, 2
|
||
|
/* 010710 80035310 3C02800A */ lui $v0, 0x800a
|
||
|
/* 010714 80035314 8C42A658 */ lw $v0, -0x59a8($v0)
|
||
|
/* 010718 80035318 8C430008 */ lw $v1, 8($v0)
|
||
|
/* 01071C 8003531C 3C02800A */ lui $v0, 0x800a
|
||
|
/* 010720 80035320 8C42A64C */ lw $v0, -0x59b4($v0)
|
||
|
/* 010724 80035324 14620008 */ bne $v1, $v0, .L80035348
|
||
|
/* 010728 80035328 24040003 */ addiu $a0, $zero, 3
|
||
|
/* 01072C 8003532C 3C02800A */ lui $v0, 0x800a
|
||
|
/* 010730 80035330 2442A650 */ addiu $v0, $v0, -0x59b0
|
||
|
/* 010734 80035334 8C430000 */ lw $v1, ($v0)
|
||
|
/* 010738 80035338 2404FFF7 */ addiu $a0, $zero, -9
|
||
|
/* 01073C 8003533C 00641824 */ and $v1, $v1, $a0
|
||
|
/* 010740 80035340 0800D534 */ j .L800354D0
|
||
|
/* 010744 80035344 AC430000 */ sw $v1, ($v0)
|
||
|
|
||
|
.L80035348:
|
||
|
/* 010748 80035348 3C02800A */ lui $v0, 0x800a
|
||
|
/* 01074C 8003534C 2442A650 */ addiu $v0, $v0, -0x59b0
|
||
|
/* 010750 80035350 8C430000 */ lw $v1, ($v0)
|
||
|
/* 010754 80035354 34630008 */ ori $v1, $v1, 8
|
||
|
/* 010758 80035358 0C051FB1 */ jal func_80147EC4
|
||
|
/* 01075C 8003535C AC430000 */ sw $v1, ($v0)
|
||
|
/* 010760 80035360 24020003 */ addiu $v0, $zero, 3
|
||
|
/* 010764 80035364 A2120000 */ sb $s2, ($s0)
|
||
|
/* 010768 80035368 0800D534 */ j .L800354D0
|
||
|
/* 01076C 8003536C A2220000 */ sb $v0, ($s1)
|
||
|
|
||
|
.L80035370:
|
||
|
/* 010770 80035370 3C10800A */ lui $s0, 0x800a
|
||
|
/* 010774 80035374 26100930 */ addiu $s0, $s0, 0x930
|
||
|
/* 010778 80035378 82020000 */ lb $v0, ($s0)
|
||
|
/* 01077C 8003537C 92030000 */ lbu $v1, ($s0)
|
||
|
/* 010780 80035380 04400042 */ bltz $v0, .L8003548C
|
||
|
/* 010784 80035384 2462FFFF */ addiu $v0, $v1, -1
|
||
|
/* 010788 80035388 A2020000 */ sb $v0, ($s0)
|
||
|
/* 01078C 8003538C 00021600 */ sll $v0, $v0, 0x18
|
||
|
/* 010790 80035390 1440003B */ bnez $v0, .L80035480
|
||
|
/* 010794 80035394 2402FFFF */ addiu $v0, $zero, -1
|
||
|
/* 010798 80035398 0C05260E */ jal func_80149838
|
||
|
/* 01079C 8003539C A2020000 */ sb $v0, ($s0)
|
||
|
/* 0107A0 800353A0 0C00EC6A */ jal func_8003B1A8
|
||
|
/* 0107A4 800353A4 00000000 */ nop
|
||
|
/* 0107A8 800353A8 3C028007 */ lui $v0, 0x8007
|
||
|
/* 0107AC 800353AC 8C42419C */ lw $v0, 0x419c($v0)
|
||
|
/* 0107B0 800353B0 0C016BA8 */ jal allocate_hit_tables
|
||
|
/* 0107B4 800353B4 A0530070 */ sb $s3, 0x70($v0)
|
||
|
/* 0107B8 800353B8 0C00AB28 */ jal battle_heap_create
|
||
|
/* 0107BC 800353BC 00000000 */ nop
|
||
|
/* 0107C0 800353C0 0C05259C */ jal func_80149670
|
||
|
/* 0107C4 800353C4 0000202D */ daddu $a0, $zero, $zero
|
||
|
/* 0107C8 800353C8 0C0B763E */ jal func_802DD8F8
|
||
|
/* 0107CC 800353CC 0000202D */ daddu $a0, $zero, $zero
|
||
|
/* 0107D0 800353D0 0C045751 */ jal clear_model_data
|
||
|
/* 0107D4 800353D4 00000000 */ nop
|
||
|
/* 0107D8 800353D8 0C052010 */ jal func_80148040
|
||
|
/* 0107DC 800353DC 00000000 */ nop
|
||
|
/* 0107E0 800353E0 0C05177E */ jal func_80145DF8
|
||
|
/* 0107E4 800353E4 00000000 */ nop
|
||
|
/* 0107E8 800353E8 0C0482EC */ jal func_80120BB0
|
||
|
/* 0107EC 800353EC 00000000 */ nop
|
||
|
/* 0107F0 800353F0 0C047889 */ jal func_8011E224
|
||
|
/* 0107F4 800353F4 00000000 */ nop
|
||
|
/* 0107F8 800353F8 0C048C2E */ jal func_801230B8
|
||
|
/* 0107FC 800353FC 00000000 */ nop
|
||
|
/* 010800 80035400 3C048020 */ lui $a0, 0x8020
|
||
|
/* 010804 80035404 24840000 */ addiu $a0, $a0, 0
|
||
|
/* 010808 80035408 0C0514BA */ jal func_801452E8
|
||
|
/* 01080C 8003540C 3C050002 */ lui $a1, 2
|
||
|
/* 010810 80035410 0C050440 */ jal func_80141100
|
||
|
/* 010814 80035414 00000000 */ nop
|
||
|
/* 010818 80035418 0C03A6EC */ jal reset_status_menu
|
||
|
/* 01081C 8003541C 00000000 */ nop
|
||
|
/* 010820 80035420 0C04C3FC */ jal clear_item_entity_data
|
||
|
/* 010824 80035424 00000000 */ nop
|
||
|
/* 010828 80035428 0C0B0C77 */ jal clear_script_list
|
||
|
/* 01082C 8003542C 00000000 */ nop
|
||
|
/* 010830 80035430 0C00E12F */ jal func_800384BC
|
||
|
/* 010834 80035434 00000000 */ nop
|
||
|
/* 010838 80035438 0C04432E */ jal func_80110CB8
|
||
|
/* 01083C 8003543C 0000202D */ daddu $a0, $zero, $zero
|
||
|
/* 010840 80035440 0C0515A0 */ jal clear_trigger_data
|
||
|
/* 010844 80035444 00000000 */ nop
|
||
|
/* 010848 80035448 3C048007 */ lui $a0, 0x8007
|
||
|
/* 01084C 8003544C 0C018038 */ jal nuPiReadRomOverlay
|
||
|
/* 010850 80035450 2484798C */ addiu $a0, $a0, 0x798c
|
||
|
/* 010854 80035454 0C091238 */ jal func_802448E0
|
||
|
/* 010858 80035458 24040001 */ addiu $a0, $zero, 1
|
||
|
/* 01085C 8003545C 240400FF */ addiu $a0, $zero, 0xff
|
||
|
/* 010860 80035460 3C06800A */ lui $a2, 0x800a
|
||
|
/* 010864 80035464 24C6A650 */ addiu $a2, $a2, -0x59b0
|
||
|
/* 010868 80035468 2403FFF7 */ addiu $v1, $zero, -9
|
||
|
/* 01086C 8003546C 8CC20000 */ lw $v0, ($a2)
|
||
|
/* 010870 80035470 3C05437F */ lui $a1, 0x437f
|
||
|
/* 010874 80035474 00431024 */ and $v0, $v0, $v1
|
||
|
/* 010878 80035478 0C04DF62 */ jal func_80137D88
|
||
|
/* 01087C 8003547C ACC20000 */ sw $v0, ($a2)
|
||
|
.L80035480:
|
||
|
/* 010880 80035480 82020000 */ lb $v0, ($s0)
|
||
|
/* 010884 80035484 04410012 */ bgez $v0, .L800354D0
|
||
|
/* 010888 80035488 00000000 */ nop
|
||
|
.L8003548C:
|
||
|
/* 01088C 8003548C 0C090C68 */ jal func_802431A0
|
||
|
/* 010890 80035490 00000000 */ nop
|
||
|
/* 010894 80035494 3C03800A */ lui $v1, 0x800a
|
||
|
/* 010898 80035498 24630932 */ addiu $v1, $v1, 0x932
|
||
|
/* 01089C 8003549C 94620000 */ lhu $v0, ($v1)
|
||
|
/* 0108A0 800354A0 2442FFEC */ addiu $v0, $v0, -0x14
|
||
|
/* 0108A4 800354A4 A4620000 */ sh $v0, ($v1)
|
||
|
/* 0108A8 800354A8 00021400 */ sll $v0, $v0, 0x10
|
||
|
/* 0108AC 800354AC 04420001 */ bltzl $v0, .L800354B4
|
||
|
/* 0108B0 800354B0 A4600000 */ sh $zero, ($v1)
|
||
|
.L800354B4:
|
||
|
/* 0108B4 800354B4 84620000 */ lh $v0, ($v1)
|
||
|
/* 0108B8 800354B8 44820000 */ mtc1 $v0, $f0
|
||
|
/* 0108BC 800354BC 00000000 */ nop
|
||
|
/* 0108C0 800354C0 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 0108C4 800354C4 44050000 */ mfc1 $a1, $f0
|
||
|
/* 0108C8 800354C8 0C04DF62 */ jal func_80137D88
|
||
|
/* 0108CC 800354CC 0000202D */ daddu $a0, $zero, $zero
|
||
|
.L800354D0:
|
||
|
/* 0108D0 800354D0 8FBF0020 */ lw $ra, 0x20($sp)
|
||
|
/* 0108D4 800354D4 8FB3001C */ lw $s3, 0x1c($sp)
|
||
|
/* 0108D8 800354D8 8FB20018 */ lw $s2, 0x18($sp)
|
||
|
/* 0108DC 800354DC 8FB10014 */ lw $s1, 0x14($sp)
|
||
|
/* 0108E0 800354E0 8FB00010 */ lw $s0, 0x10($sp)
|
||
|
/* 0108E4 800354E4 03E00008 */ jr $ra
|
||
|
/* 0108E8 800354E8 27BD0028 */ addiu $sp, $sp, 0x28
|
||
|
|