mirror of
https://github.com/pmret/papermario.git
synced 2024-11-10 04:52:34 +01:00
6da5c0e41b
* get_spirits_rescued: use enum StoryProgress * rename 6240_len_c00 to fio * rename 1b40_len_20b0 to main_loop * rename 3bf0_len_6f0 to input * rename 42e0_len_1f60 to rumble * rename 6e40_len_500 to curtains * rename 7340_len_b00 crash * match func_8002C890 * intro_logos and state_battle split * rename e940_len_290 to state_startup * split state_logos and state_pause * state_file_select * state_world, state_intro * state_title_screen * state_demo * split game_modes and camera
268 lines
13 KiB
ArmAsm
268 lines
13 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
glabel func_8002725C
|
|
/* 265C 8002725C 27BDFF88 */ addiu $sp, $sp, -0x78
|
|
/* 2660 80027260 0080582D */ daddu $t3, $a0, $zero
|
|
/* 2664 80027264 AFA5007C */ sw $a1, 0x7c($sp)
|
|
/* 2668 80027268 0000282D */ daddu $a1, $zero, $zero
|
|
/* 266C 8002726C 27A90018 */ addiu $t1, $sp, 0x18
|
|
/* 2670 80027270 27A80038 */ addiu $t0, $sp, 0x38
|
|
/* 2674 80027274 27A70058 */ addiu $a3, $sp, 0x58
|
|
/* 2678 80027278 8BAC007C */ lwl $t4, 0x7c($sp)
|
|
/* 267C 8002727C 9BAC007F */ lwr $t4, 0x7f($sp)
|
|
/* 2680 80027280 ABAC0008 */ swl $t4, 8($sp)
|
|
/* 2684 80027284 BBAC000B */ swr $t4, 0xb($sp)
|
|
/* 2688 80027288 8BAC007C */ lwl $t4, 0x7c($sp)
|
|
/* 268C 8002728C 9BAC007F */ lwr $t4, 0x7f($sp)
|
|
/* 2690 80027290 ABAC0000 */ swl $t4, ($sp)
|
|
/* 2694 80027294 BBAC0003 */ swr $t4, 3($sp)
|
|
.L80027298:
|
|
/* 2698 80027298 01251021 */ addu $v0, $t1, $a1
|
|
/* 269C 8002729C 01051821 */ addu $v1, $t0, $a1
|
|
/* 26A0 800272A0 00E52021 */ addu $a0, $a3, $a1
|
|
/* 26A4 800272A4 24A50001 */ addiu $a1, $a1, 1
|
|
/* 26A8 800272A8 A0400000 */ sb $zero, ($v0)
|
|
/* 26AC 800272AC 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 26B0 800272B0 A0600000 */ sb $zero, ($v1)
|
|
/* 26B4 800272B4 1440FFF8 */ bnez $v0, .L80027298
|
|
/* 26B8 800272B8 A0800000 */ sb $zero, ($a0)
|
|
/* 26BC 800272BC 0000282D */ daddu $a1, $zero, $zero
|
|
/* 26C0 800272C0 240A0008 */ addiu $t2, $zero, 8
|
|
/* 26C4 800272C4 27A90018 */ addiu $t1, $sp, 0x18
|
|
/* 26C8 800272C8 27A80038 */ addiu $t0, $sp, 0x38
|
|
/* 26CC 800272CC 27A70058 */ addiu $a3, $sp, 0x58
|
|
/* 26D0 800272D0 0160202D */ daddu $a0, $t3, $zero
|
|
.L800272D4:
|
|
/* 26D4 800272D4 90820003 */ lbu $v0, 3($a0)
|
|
/* 26D8 800272D8 144A0010 */ bne $v0, $t2, .L8002731C
|
|
/* 26DC 800272DC 24A50001 */ addiu $a1, $a1, 1
|
|
/* 26E0 800272E0 90830000 */ lbu $v1, ($a0)
|
|
/* 26E4 800272E4 01231821 */ addu $v1, $t1, $v1
|
|
/* 26E8 800272E8 90620000 */ lbu $v0, ($v1)
|
|
/* 26EC 800272EC 24420001 */ addiu $v0, $v0, 1
|
|
/* 26F0 800272F0 A0620000 */ sb $v0, ($v1)
|
|
/* 26F4 800272F4 90830001 */ lbu $v1, 1($a0)
|
|
/* 26F8 800272F8 01031821 */ addu $v1, $t0, $v1
|
|
/* 26FC 800272FC 90620000 */ lbu $v0, ($v1)
|
|
/* 2700 80027300 24420001 */ addiu $v0, $v0, 1
|
|
/* 2704 80027304 A0620000 */ sb $v0, ($v1)
|
|
/* 2708 80027308 90830002 */ lbu $v1, 2($a0)
|
|
/* 270C 8002730C 00E31821 */ addu $v1, $a3, $v1
|
|
/* 2710 80027310 90620000 */ lbu $v0, ($v1)
|
|
/* 2714 80027314 24420001 */ addiu $v0, $v0, 1
|
|
/* 2718 80027318 A0620000 */ sb $v0, ($v1)
|
|
.L8002731C:
|
|
/* 271C 8002731C 28A20006 */ slti $v0, $a1, 6
|
|
/* 2720 80027320 1440FFEC */ bnez $v0, .L800272D4
|
|
/* 2724 80027324 24840004 */ addiu $a0, $a0, 4
|
|
/* 2728 80027328 0000282D */ daddu $a1, $zero, $zero
|
|
/* 272C 8002732C 27A40018 */ addiu $a0, $sp, 0x18
|
|
/* 2730 80027330 00851821 */ addu $v1, $a0, $a1
|
|
.L80027334:
|
|
/* 2734 80027334 90620000 */ lbu $v0, ($v1)
|
|
/* 2738 80027338 50400004 */ beql $v0, $zero, .L8002734C
|
|
/* 273C 8002733C 24A50001 */ addiu $a1, $a1, 1
|
|
/* 2740 80027340 2442FFFF */ addiu $v0, $v0, -1
|
|
/* 2744 80027344 08009CD6 */ j .L80027358
|
|
/* 2748 80027348 A0620000 */ sb $v0, ($v1)
|
|
.L8002734C:
|
|
/* 274C 8002734C 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 2750 80027350 1440FFF8 */ bnez $v0, .L80027334
|
|
/* 2754 80027354 00851821 */ addu $v1, $a0, $a1
|
|
.L80027358:
|
|
/* 2758 80027358 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 275C 8002735C 10400009 */ beqz $v0, .L80027384
|
|
/* 2760 80027360 27A30018 */ addiu $v1, $sp, 0x18
|
|
/* 2764 80027364 00651021 */ addu $v0, $v1, $a1
|
|
.L80027368:
|
|
/* 2768 80027368 90420000 */ lbu $v0, ($v0)
|
|
/* 276C 8002736C 14400005 */ bnez $v0, .L80027384
|
|
/* 2770 80027370 00000000 */ nop
|
|
/* 2774 80027374 24A50001 */ addiu $a1, $a1, 1
|
|
/* 2778 80027378 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 277C 8002737C 1440FFFA */ bnez $v0, .L80027368
|
|
/* 2780 80027380 00651021 */ addu $v0, $v1, $a1
|
|
.L80027384:
|
|
/* 2784 80027384 93A20000 */ lbu $v0, ($sp)
|
|
/* 2788 80027388 00A2102A */ slt $v0, $a1, $v0
|
|
/* 278C 8002738C 54400001 */ bnel $v0, $zero, .L80027394
|
|
/* 2790 80027390 A3A50000 */ sb $a1, ($sp)
|
|
.L80027394:
|
|
/* 2794 80027394 0000282D */ daddu $a1, $zero, $zero
|
|
/* 2798 80027398 27A40038 */ addiu $a0, $sp, 0x38
|
|
/* 279C 8002739C 00851821 */ addu $v1, $a0, $a1
|
|
.L800273A0:
|
|
/* 27A0 800273A0 90620000 */ lbu $v0, ($v1)
|
|
/* 27A4 800273A4 50400004 */ beql $v0, $zero, .L800273B8
|
|
/* 27A8 800273A8 24A50001 */ addiu $a1, $a1, 1
|
|
/* 27AC 800273AC 2442FFFF */ addiu $v0, $v0, -1
|
|
/* 27B0 800273B0 08009CF1 */ j .L800273C4
|
|
/* 27B4 800273B4 A0620000 */ sb $v0, ($v1)
|
|
.L800273B8:
|
|
/* 27B8 800273B8 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 27BC 800273BC 1440FFF8 */ bnez $v0, .L800273A0
|
|
/* 27C0 800273C0 00851821 */ addu $v1, $a0, $a1
|
|
.L800273C4:
|
|
/* 27C4 800273C4 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 27C8 800273C8 10400009 */ beqz $v0, .L800273F0
|
|
/* 27CC 800273CC 27A30038 */ addiu $v1, $sp, 0x38
|
|
/* 27D0 800273D0 00651021 */ addu $v0, $v1, $a1
|
|
.L800273D4:
|
|
/* 27D4 800273D4 90420000 */ lbu $v0, ($v0)
|
|
/* 27D8 800273D8 14400005 */ bnez $v0, .L800273F0
|
|
/* 27DC 800273DC 00000000 */ nop
|
|
/* 27E0 800273E0 24A50001 */ addiu $a1, $a1, 1
|
|
/* 27E4 800273E4 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 27E8 800273E8 1440FFFA */ bnez $v0, .L800273D4
|
|
/* 27EC 800273EC 00651021 */ addu $v0, $v1, $a1
|
|
.L800273F0:
|
|
/* 27F0 800273F0 93A20001 */ lbu $v0, 1($sp)
|
|
/* 27F4 800273F4 00A2102A */ slt $v0, $a1, $v0
|
|
/* 27F8 800273F8 54400001 */ bnel $v0, $zero, .L80027400
|
|
/* 27FC 800273FC A3A50001 */ sb $a1, 1($sp)
|
|
.L80027400:
|
|
/* 2800 80027400 0000282D */ daddu $a1, $zero, $zero
|
|
/* 2804 80027404 27A40058 */ addiu $a0, $sp, 0x58
|
|
/* 2808 80027408 00851821 */ addu $v1, $a0, $a1
|
|
.L8002740C:
|
|
/* 280C 8002740C 90620000 */ lbu $v0, ($v1)
|
|
/* 2810 80027410 50400004 */ beql $v0, $zero, .L80027424
|
|
/* 2814 80027414 24A50001 */ addiu $a1, $a1, 1
|
|
/* 2818 80027418 2442FFFF */ addiu $v0, $v0, -1
|
|
/* 281C 8002741C 08009D0C */ j .L80027430
|
|
/* 2820 80027420 A0620000 */ sb $v0, ($v1)
|
|
.L80027424:
|
|
/* 2824 80027424 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 2828 80027428 1440FFF8 */ bnez $v0, .L8002740C
|
|
/* 282C 8002742C 00851821 */ addu $v1, $a0, $a1
|
|
.L80027430:
|
|
/* 2830 80027430 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 2834 80027434 10400009 */ beqz $v0, .L8002745C
|
|
/* 2838 80027438 27A30058 */ addiu $v1, $sp, 0x58
|
|
/* 283C 8002743C 00651021 */ addu $v0, $v1, $a1
|
|
.L80027440:
|
|
/* 2840 80027440 90420000 */ lbu $v0, ($v0)
|
|
/* 2844 80027444 14400005 */ bnez $v0, .L8002745C
|
|
/* 2848 80027448 00000000 */ nop
|
|
/* 284C 8002744C 24A50001 */ addiu $a1, $a1, 1
|
|
/* 2850 80027450 28A20020 */ slti $v0, $a1, 0x20
|
|
/* 2854 80027454 1440FFFA */ bnez $v0, .L80027440
|
|
/* 2858 80027458 00651021 */ addu $v0, $v1, $a1
|
|
.L8002745C:
|
|
/* 285C 8002745C 93A20002 */ lbu $v0, 2($sp)
|
|
/* 2860 80027460 00A2102A */ slt $v0, $a1, $v0
|
|
/* 2864 80027464 54400001 */ bnel $v0, $zero, .L8002746C
|
|
/* 2868 80027468 A3A50002 */ sb $a1, 2($sp)
|
|
.L8002746C:
|
|
/* 286C 8002746C 2405001F */ addiu $a1, $zero, 0x1f
|
|
/* 2870 80027470 27A30018 */ addiu $v1, $sp, 0x18
|
|
/* 2874 80027474 00651021 */ addu $v0, $v1, $a1
|
|
.L80027478:
|
|
/* 2878 80027478 90420000 */ lbu $v0, ($v0)
|
|
/* 287C 8002747C 14400004 */ bnez $v0, .L80027490
|
|
/* 2880 80027480 00000000 */ nop
|
|
/* 2884 80027484 24A5FFFF */ addiu $a1, $a1, -1
|
|
/* 2888 80027488 04A1FFFB */ bgez $a1, .L80027478
|
|
/* 288C 8002748C 00651021 */ addu $v0, $v1, $a1
|
|
.L80027490:
|
|
/* 2890 80027490 93A20008 */ lbu $v0, 8($sp)
|
|
/* 2894 80027494 0045102A */ slt $v0, $v0, $a1
|
|
/* 2898 80027498 54400001 */ bnel $v0, $zero, .L800274A0
|
|
/* 289C 8002749C A3A50008 */ sb $a1, 8($sp)
|
|
.L800274A0:
|
|
/* 28A0 800274A0 2405001F */ addiu $a1, $zero, 0x1f
|
|
/* 28A4 800274A4 27A30038 */ addiu $v1, $sp, 0x38
|
|
/* 28A8 800274A8 00651021 */ addu $v0, $v1, $a1
|
|
.L800274AC:
|
|
/* 28AC 800274AC 90420000 */ lbu $v0, ($v0)
|
|
/* 28B0 800274B0 14400004 */ bnez $v0, .L800274C4
|
|
/* 28B4 800274B4 00000000 */ nop
|
|
/* 28B8 800274B8 24A5FFFF */ addiu $a1, $a1, -1
|
|
/* 28BC 800274BC 04A1FFFB */ bgez $a1, .L800274AC
|
|
/* 28C0 800274C0 00651021 */ addu $v0, $v1, $a1
|
|
.L800274C4:
|
|
/* 28C4 800274C4 93A20009 */ lbu $v0, 9($sp)
|
|
/* 28C8 800274C8 0045102A */ slt $v0, $v0, $a1
|
|
/* 28CC 800274CC 54400001 */ bnel $v0, $zero, .L800274D4
|
|
/* 28D0 800274D0 A3A50009 */ sb $a1, 9($sp)
|
|
.L800274D4:
|
|
/* 28D4 800274D4 2405001F */ addiu $a1, $zero, 0x1f
|
|
/* 28D8 800274D8 27A30058 */ addiu $v1, $sp, 0x58
|
|
/* 28DC 800274DC 00651021 */ addu $v0, $v1, $a1
|
|
.L800274E0:
|
|
/* 28E0 800274E0 90420000 */ lbu $v0, ($v0)
|
|
/* 28E4 800274E4 14400004 */ bnez $v0, .L800274F8
|
|
/* 28E8 800274E8 00000000 */ nop
|
|
/* 28EC 800274EC 24A5FFFF */ addiu $a1, $a1, -1
|
|
/* 28F0 800274F0 04A1FFFB */ bgez $a1, .L800274E0
|
|
/* 28F4 800274F4 00651021 */ addu $v0, $v1, $a1
|
|
.L800274F8:
|
|
/* 28F8 800274F8 93A2000A */ lbu $v0, 0xa($sp)
|
|
/* 28FC 800274FC 0045102A */ slt $v0, $v0, $a1
|
|
/* 2900 80027500 54400001 */ bnel $v0, $zero, .L80027508
|
|
/* 2904 80027504 A3A5000A */ sb $a1, 0xa($sp)
|
|
.L80027508:
|
|
/* 2908 80027508 93A20008 */ lbu $v0, 8($sp)
|
|
/* 290C 8002750C 93A30000 */ lbu $v1, ($sp)
|
|
/* 2910 80027510 93A4007C */ lbu $a0, 0x7c($sp)
|
|
/* 2914 80027514 00431021 */ addu $v0, $v0, $v1
|
|
/* 2918 80027518 00441023 */ subu $v0, $v0, $a0
|
|
/* 291C 8002751C A3A20010 */ sb $v0, 0x10($sp)
|
|
/* 2920 80027520 93A20009 */ lbu $v0, 9($sp)
|
|
/* 2924 80027524 93A30001 */ lbu $v1, 1($sp)
|
|
/* 2928 80027528 93A4007D */ lbu $a0, 0x7d($sp)
|
|
/* 292C 8002752C 00431021 */ addu $v0, $v0, $v1
|
|
/* 2930 80027530 00441023 */ subu $v0, $v0, $a0
|
|
/* 2934 80027534 A3A20011 */ sb $v0, 0x11($sp)
|
|
/* 2938 80027538 93A2000A */ lbu $v0, 0xa($sp)
|
|
/* 293C 8002753C 93A30002 */ lbu $v1, 2($sp)
|
|
/* 2940 80027540 93A4007E */ lbu $a0, 0x7e($sp)
|
|
/* 2944 80027544 00431021 */ addu $v0, $v0, $v1
|
|
/* 2948 80027548 00441023 */ subu $v0, $v0, $a0
|
|
/* 294C 8002754C A3A20012 */ sb $v0, 0x12($sp)
|
|
/* 2950 80027550 93A2007C */ lbu $v0, 0x7c($sp)
|
|
/* 2954 80027554 93A4007F */ lbu $a0, 0x7f($sp)
|
|
/* 2958 80027558 00440018 */ mult $v0, $a0
|
|
/* 295C 8002755C 24030008 */ addiu $v1, $zero, 8
|
|
/* 2960 80027560 00002812 */ mflo $a1
|
|
/* 2964 80027564 93A20010 */ lbu $v0, 0x10($sp)
|
|
/* 2968 80027568 00641823 */ subu $v1, $v1, $a0
|
|
/* 296C 8002756C 00430018 */ mult $v0, $v1
|
|
/* 2970 80027570 00001012 */ mflo $v0
|
|
/* 2974 80027574 00A21021 */ addu $v0, $a1, $v0
|
|
/* 2978 80027578 000210C3 */ sra $v0, $v0, 3
|
|
/* 297C 8002757C A3A20010 */ sb $v0, 0x10($sp)
|
|
/* 2980 80027580 93A2007D */ lbu $v0, 0x7d($sp)
|
|
/* 2984 80027584 00440018 */ mult $v0, $a0
|
|
/* 2988 80027588 00002812 */ mflo $a1
|
|
/* 298C 8002758C 93A20011 */ lbu $v0, 0x11($sp)
|
|
/* 2990 80027590 00000000 */ nop
|
|
/* 2994 80027594 00430018 */ mult $v0, $v1
|
|
/* 2998 80027598 00001012 */ mflo $v0
|
|
/* 299C 8002759C 00A21021 */ addu $v0, $a1, $v0
|
|
/* 29A0 800275A0 000210C3 */ sra $v0, $v0, 3
|
|
/* 29A4 800275A4 A3A20011 */ sb $v0, 0x11($sp)
|
|
/* 29A8 800275A8 93A2007E */ lbu $v0, 0x7e($sp)
|
|
/* 29AC 800275AC 00440018 */ mult $v0, $a0
|
|
/* 29B0 800275B0 00002012 */ mflo $a0
|
|
/* 29B4 800275B4 93A20012 */ lbu $v0, 0x12($sp)
|
|
/* 29B8 800275B8 00000000 */ nop
|
|
/* 29BC 800275BC 00430018 */ mult $v0, $v1
|
|
/* 29C0 800275C0 00001012 */ mflo $v0
|
|
/* 29C4 800275C4 00821021 */ addu $v0, $a0, $v0
|
|
/* 29C8 800275C8 000210C3 */ sra $v0, $v0, 3
|
|
/* 29CC 800275CC A3A20012 */ sb $v0, 0x12($sp)
|
|
/* 29D0 800275D0 93A20010 */ lbu $v0, 0x10($sp)
|
|
/* 29D4 800275D4 93A40011 */ lbu $a0, 0x11($sp)
|
|
/* 29D8 800275D8 93A30012 */ lbu $v1, 0x12($sp)
|
|
/* 29DC 800275DC 000212C0 */ sll $v0, $v0, 0xb
|
|
/* 29E0 800275E0 00042180 */ sll $a0, $a0, 6
|
|
/* 29E4 800275E4 00441021 */ addu $v0, $v0, $a0
|
|
/* 29E8 800275E8 00031840 */ sll $v1, $v1, 1
|
|
/* 29EC 800275EC 00431021 */ addu $v0, $v0, $v1
|
|
/* 29F0 800275F0 24420001 */ addiu $v0, $v0, 1
|
|
/* 29F4 800275F4 A4C20000 */ sh $v0, ($a2)
|
|
/* 29F8 800275F8 03E00008 */ jr $ra
|
|
/* 29FC 800275FC 27BD0078 */ addiu $sp, $sp, 0x78
|