mirror of
https://github.com/pmret/papermario.git
synced 2024-11-10 04:52:34 +01:00
222 lines
11 KiB
ArmAsm
222 lines
11 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
glabel draw_shop_items
|
|
/* 7E23A4 80281524 3C028007 */ lui $v0, %hi(gGameStatusPtr)
|
|
/* 7E23A8 80281528 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
|
|
/* 7E23AC 8028152C 27BDFF90 */ addiu $sp, $sp, -0x70
|
|
/* 7E23B0 80281530 AFBF005C */ sw $ra, 0x5c($sp)
|
|
/* 7E23B4 80281534 AFBE0058 */ sw $fp, 0x58($sp)
|
|
/* 7E23B8 80281538 AFB70054 */ sw $s7, 0x54($sp)
|
|
/* 7E23BC 8028153C AFB60050 */ sw $s6, 0x50($sp)
|
|
/* 7E23C0 80281540 AFB5004C */ sw $s5, 0x4c($sp)
|
|
/* 7E23C4 80281544 AFB40048 */ sw $s4, 0x48($sp)
|
|
/* 7E23C8 80281548 AFB30044 */ sw $s3, 0x44($sp)
|
|
/* 7E23CC 8028154C AFB20040 */ sw $s2, 0x40($sp)
|
|
/* 7E23D0 80281550 AFB1003C */ sw $s1, 0x3c($sp)
|
|
/* 7E23D4 80281554 AFB00038 */ sw $s0, 0x38($sp)
|
|
/* 7E23D8 80281558 F7B60068 */ sdc1 $f22, 0x68($sp)
|
|
/* 7E23DC 8028155C F7B40060 */ sdc1 $f20, 0x60($sp)
|
|
/* 7E23E0 80281560 8C520144 */ lw $s2, 0x144($v0)
|
|
/* 7E23E4 80281564 96420000 */ lhu $v0, ($s2)
|
|
/* 7E23E8 80281568 30420001 */ andi $v0, $v0, 1
|
|
/* 7E23EC 8028156C 10400005 */ beqz $v0, .L80281584
|
|
/* 7E23F0 80281570 2404000A */ addiu $a0, $zero, 0xa
|
|
/* 7E23F4 80281574 3C108014 */ lui $s0, %hi(D_80147474)
|
|
/* 7E23F8 80281578 26107474 */ addiu $s0, $s0, %lo(D_80147474)
|
|
/* 7E23FC 8028157C 080A0563 */ j .L8028158C
|
|
/* 7E2400 80281580 00000000 */ nop
|
|
.L80281584:
|
|
/* 7E2404 80281584 3C108014 */ lui $s0, %hi(D_80147574)
|
|
/* 7E2408 80281588 26107574 */ addiu $s0, $s0, %lo(D_80147574)
|
|
.L8028158C:
|
|
/* 7E240C 8028158C 0C051F9F */ jal func_80147E7C
|
|
/* 7E2410 80281590 0200282D */ daddu $a1, $s0, $zero
|
|
/* 7E2414 80281594 2404000B */ addiu $a0, $zero, 0xb
|
|
/* 7E2418 80281598 0C051F9F */ jal func_80147E7C
|
|
/* 7E241C 8028159C 0200282D */ daddu $a1, $s0, $zero
|
|
/* 7E2420 802815A0 96420000 */ lhu $v0, ($s2)
|
|
/* 7E2424 802815A4 30420001 */ andi $v0, $v0, 1
|
|
/* 7E2428 802815A8 10400096 */ beqz $v0, .L80281804
|
|
/* 7E242C 802815AC 00000000 */ nop
|
|
/* 7E2430 802815B0 3C04800B */ lui $a0, %hi(gCameras)
|
|
/* 7E2434 802815B4 24841D80 */ addiu $a0, $a0, %lo(gCameras)
|
|
/* 7E2438 802815B8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
|
|
/* 7E243C 802815BC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
|
|
/* 7E2440 802815C0 3C038007 */ lui $v1, %hi(gCurrentCameraID)
|
|
/* 7E2444 802815C4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
|
|
/* 7E2448 802815C8 8C5E0140 */ lw $fp, 0x140($v0)
|
|
/* 7E244C 802815CC 00031080 */ sll $v0, $v1, 2
|
|
/* 7E2450 802815D0 00431021 */ addu $v0, $v0, $v1
|
|
/* 7E2454 802815D4 00021080 */ sll $v0, $v0, 2
|
|
/* 7E2458 802815D8 00431023 */ subu $v0, $v0, $v1
|
|
/* 7E245C 802815DC 000218C0 */ sll $v1, $v0, 3
|
|
/* 7E2460 802815E0 00431021 */ addu $v0, $v0, $v1
|
|
/* 7E2464 802815E4 000210C0 */ sll $v0, $v0, 3
|
|
/* 7E2468 802815E8 0044A821 */ addu $s5, $v0, $a0
|
|
/* 7E246C 802815EC 86420002 */ lh $v0, 2($s2)
|
|
/* 7E2470 802815F0 8E440018 */ lw $a0, 0x18($s2)
|
|
/* 7E2474 802815F4 18400083 */ blez $v0, .L80281804
|
|
/* 7E2478 802815F8 0000B82D */ daddu $s7, $zero, $zero
|
|
/* 7E247C 802815FC 27D4000C */ addiu $s4, $fp, 0xc
|
|
/* 7E2480 80281600 24960004 */ addiu $s6, $a0, 4
|
|
/* 7E2484 80281604 3C013F80 */ lui $at, 0x3f80
|
|
/* 7E2488 80281608 4481B000 */ mtc1 $at, $f22
|
|
/* 7E248C 8028160C 3C013FE0 */ lui $at, 0x3fe0
|
|
/* 7E2490 80281610 4481A800 */ mtc1 $at, $f21
|
|
/* 7E2494 80281614 4480A000 */ mtc1 $zero, $f20
|
|
.L80281618:
|
|
/* 7E2498 80281618 26A400D4 */ addiu $a0, $s5, 0xd4
|
|
/* 7E249C 8028161C C686FFF8 */ lwc1 $f6, -8($s4)
|
|
/* 7E24A0 80281620 C682FFFC */ lwc1 $f2, -4($s4)
|
|
/* 7E24A4 80281624 C6840000 */ lwc1 $f4, ($s4)
|
|
/* 7E24A8 80281628 3C0141F0 */ lui $at, 0x41f0
|
|
/* 7E24AC 8028162C 44810000 */ mtc1 $at, $f0
|
|
/* 7E24B0 80281630 27A20028 */ addiu $v0, $sp, 0x28
|
|
/* 7E24B4 80281634 AFA20014 */ sw $v0, 0x14($sp)
|
|
/* 7E24B8 80281638 27A2002C */ addiu $v0, $sp, 0x2c
|
|
/* 7E24BC 8028163C AFA20018 */ sw $v0, 0x18($sp)
|
|
/* 7E24C0 80281640 27A20030 */ addiu $v0, $sp, 0x30
|
|
/* 7E24C4 80281644 AFA2001C */ sw $v0, 0x1c($sp)
|
|
/* 7E24C8 80281648 46001080 */ add.s $f2, $f2, $f0
|
|
/* 7E24CC 8028164C 44053000 */ mfc1 $a1, $f6
|
|
/* 7E24D0 80281650 44072000 */ mfc1 $a3, $f4
|
|
/* 7E24D4 80281654 44061000 */ mfc1 $a2, $f2
|
|
/* 7E24D8 80281658 27A20034 */ addiu $v0, $sp, 0x34
|
|
/* 7E24DC 8028165C E7B60010 */ swc1 $f22, 0x10($sp)
|
|
/* 7E24E0 80281660 0C00A588 */ jal transform_point
|
|
/* 7E24E4 80281664 AFA20020 */ sw $v0, 0x20($sp)
|
|
/* 7E24E8 80281668 C7A60034 */ lwc1 $f6, 0x34($sp)
|
|
/* 7E24EC 8028166C C7A00030 */ lwc1 $f0, 0x30($sp)
|
|
/* 7E24F0 80281670 4606B183 */ div.s $f6, $f22, $f6
|
|
/* 7E24F4 80281674 46060002 */ mul.s $f0, $f0, $f6
|
|
/* 7E24F8 80281678 00000000 */ nop
|
|
/* 7E24FC 8028167C 46160000 */ add.s $f0, $f0, $f22
|
|
/* 7E2500 80281680 46000021 */ cvt.d.s $f0, $f0
|
|
/* 7E2504 80281684 46340002 */ mul.d $f0, $f0, $f20
|
|
/* 7E2508 80281688 00000000 */ nop
|
|
/* 7E250C 8028168C C7A20028 */ lwc1 $f2, 0x28($sp)
|
|
/* 7E2510 80281690 46061202 */ mul.s $f8, $f2, $f6
|
|
/* 7E2514 80281694 00000000 */ nop
|
|
/* 7E2518 80281698 C7A4002C */ lwc1 $f4, 0x2c($sp)
|
|
/* 7E251C 8028169C 46003087 */ neg.s $f2, $f6
|
|
/* 7E2520 802816A0 46022282 */ mul.s $f10, $f4, $f2
|
|
/* 7E2524 802816A4 00000000 */ nop
|
|
/* 7E2528 802816A8 44801000 */ mtc1 $zero, $f2
|
|
/* 7E252C 802816AC E7A60034 */ swc1 $f6, 0x34($sp)
|
|
/* 7E2530 802816B0 E7A80028 */ swc1 $f8, 0x28($sp)
|
|
/* 7E2534 802816B4 E7AA002C */ swc1 $f10, 0x2c($sp)
|
|
/* 7E2538 802816B8 46200020 */ cvt.s.d $f0, $f0
|
|
/* 7E253C 802816BC 4600103C */ c.lt.s $f2, $f0
|
|
/* 7E2540 802816C0 00000000 */ nop
|
|
/* 7E2544 802816C4 45000048 */ bc1f .L802817E8
|
|
/* 7E2548 802816C8 E7A00030 */ swc1 $f0, 0x30($sp)
|
|
/* 7E254C 802816CC 4616003C */ c.lt.s $f0, $f22
|
|
/* 7E2550 802816D0 00000000 */ nop
|
|
/* 7E2554 802816D4 45020045 */ bc1fl .L802817EC
|
|
/* 7E2558 802816D8 26F70001 */ addiu $s7, $s7, 1
|
|
/* 7E255C 802816DC 86A2000A */ lh $v0, 0xa($s5)
|
|
/* 7E2560 802816E0 44820000 */ mtc1 $v0, $f0
|
|
/* 7E2564 802816E4 00000000 */ nop
|
|
/* 7E2568 802816E8 46800020 */ cvt.s.w $f0, $f0
|
|
/* 7E256C 802816EC 46004102 */ mul.s $f4, $f8, $f0
|
|
/* 7E2570 802816F0 00000000 */ nop
|
|
/* 7E2574 802816F4 46002100 */ add.s $f4, $f4, $f0
|
|
/* 7E2578 802816F8 46002121 */ cvt.d.s $f4, $f4
|
|
/* 7E257C 802816FC 46342102 */ mul.d $f4, $f4, $f20
|
|
/* 7E2580 80281700 00000000 */ nop
|
|
/* 7E2584 80281704 86A2000C */ lh $v0, 0xc($s5)
|
|
/* 7E2588 80281708 44820000 */ mtc1 $v0, $f0
|
|
/* 7E258C 8028170C 00000000 */ nop
|
|
/* 7E2590 80281710 46800020 */ cvt.s.w $f0, $f0
|
|
/* 7E2594 80281714 46005082 */ mul.s $f2, $f10, $f0
|
|
/* 7E2598 80281718 00000000 */ nop
|
|
/* 7E259C 8028171C 46001080 */ add.s $f2, $f2, $f0
|
|
/* 7E25A0 80281720 460010A1 */ cvt.d.s $f2, $f2
|
|
/* 7E25A4 80281724 46341082 */ mul.d $f2, $f2, $f20
|
|
/* 7E25A8 80281728 00000000 */ nop
|
|
/* 7E25AC 8028172C 86A2000E */ lh $v0, 0xe($s5)
|
|
/* 7E25B0 80281730 44820000 */ mtc1 $v0, $f0
|
|
/* 7E25B4 80281734 00000000 */ nop
|
|
/* 7E25B8 80281738 46800021 */ cvt.d.w $f0, $f0
|
|
/* 7E25BC 8028173C 86A20010 */ lh $v0, 0x10($s5)
|
|
/* 7E25C0 80281740 46202100 */ add.d $f4, $f4, $f0
|
|
/* 7E25C4 80281744 44820000 */ mtc1 $v0, $f0
|
|
/* 7E25C8 80281748 00000000 */ nop
|
|
/* 7E25CC 8028174C 46800021 */ cvt.d.w $f0, $f0
|
|
/* 7E25D0 80281750 8EC20000 */ lw $v0, ($s6)
|
|
/* 7E25D4 80281754 46201080 */ add.d $f2, $f2, $f0
|
|
/* 7E25D8 80281758 28420064 */ slti $v0, $v0, 0x64
|
|
/* 7E25DC 8028175C 4620230D */ trunc.w.d $f12, $f4
|
|
/* 7E25E0 80281760 44116000 */ mfc1 $s1, $f12
|
|
/* 7E25E4 80281764 4620130D */ trunc.w.d $f12, $f2
|
|
/* 7E25E8 80281768 44136000 */ mfc1 $s3, $f12
|
|
/* 7E25EC 8028176C 10400002 */ beqz $v0, .L80281778
|
|
/* 7E25F0 80281770 0000802D */ daddu $s0, $zero, $zero
|
|
/* 7E25F4 80281774 2410FFFC */ addiu $s0, $zero, -4
|
|
.L80281778:
|
|
/* 7E25F8 80281778 0C04C3D6 */ jal get_item_entity
|
|
/* 7E25FC 8028177C 8FC40000 */ lw $a0, ($fp)
|
|
/* 7E2600 80281780 8C420000 */ lw $v0, ($v0)
|
|
/* 7E2604 80281784 30420040 */ andi $v0, $v0, 0x40
|
|
/* 7E2608 80281788 14400009 */ bnez $v0, .L802817B0
|
|
/* 7E260C 8028178C 02302821 */ addu $a1, $s1, $s0
|
|
/* 7E2610 80281790 0260302D */ daddu $a2, $s3, $zero
|
|
/* 7E2614 80281794 240200FF */ addiu $v0, $zero, 0xff
|
|
/* 7E2618 80281798 AFA00010 */ sw $zero, 0x10($sp)
|
|
/* 7E261C 8028179C AFA20014 */ sw $v0, 0x14($sp)
|
|
/* 7E2620 802817A0 AFA00018 */ sw $zero, 0x18($sp)
|
|
/* 7E2624 802817A4 8EC40000 */ lw $a0, ($s6)
|
|
/* 7E2628 802817A8 0C049DA7 */ jal draw_number
|
|
/* 7E262C 802817AC 24070001 */ addiu $a3, $zero, 1
|
|
.L802817B0:
|
|
/* 7E2630 802817B0 8E420008 */ lw $v0, 8($s2)
|
|
/* 7E2634 802817B4 56E2000D */ bnel $s7, $v0, .L802817EC
|
|
/* 7E2638 802817B8 26F70001 */ addiu $s7, $s7, 1
|
|
/* 7E263C 802817BC 02302821 */ addu $a1, $s1, $s0
|
|
/* 7E2640 802817C0 24A5FFFA */ addiu $a1, $a1, -6
|
|
/* 7E2644 802817C4 8E440020 */ lw $a0, 0x20($s2)
|
|
/* 7E2648 802817C8 0C051261 */ jal set_icon_render_pos
|
|
/* 7E264C 802817CC 26660005 */ addiu $a2, $s3, 5
|
|
/* 7E2650 802817D0 8E440020 */ lw $a0, 0x20($s2)
|
|
/* 7E2654 802817D4 3C053F33 */ lui $a1, 0x3f33
|
|
/* 7E2658 802817D8 0C051308 */ jal func_80144C20
|
|
/* 7E265C 802817DC 34A53333 */ ori $a1, $a1, 0x3333
|
|
/* 7E2660 802817E0 0C0511EA */ jal draw_icon_0
|
|
/* 7E2664 802817E4 8E440020 */ lw $a0, 0x20($s2)
|
|
.L802817E8:
|
|
/* 7E2668 802817E8 26F70001 */ addiu $s7, $s7, 1
|
|
.L802817EC:
|
|
/* 7E266C 802817EC 26D6000C */ addiu $s6, $s6, 0xc
|
|
/* 7E2670 802817F0 26940010 */ addiu $s4, $s4, 0x10
|
|
/* 7E2674 802817F4 86420002 */ lh $v0, 2($s2)
|
|
/* 7E2678 802817F8 02E2102A */ slt $v0, $s7, $v0
|
|
/* 7E267C 802817FC 1440FF86 */ bnez $v0, .L80281618
|
|
/* 7E2680 80281800 27DE0010 */ addiu $fp, $fp, 0x10
|
|
.L80281804:
|
|
/* 7E2684 80281804 8E420358 */ lw $v0, 0x358($s2)
|
|
/* 7E2688 80281808 18400003 */ blez $v0, .L80281818
|
|
/* 7E268C 8028180C 2442FFFF */ addiu $v0, $v0, -1
|
|
/* 7E2690 80281810 080A060A */ j .L80281828
|
|
/* 7E2694 80281814 AE420358 */ sw $v0, 0x358($s2)
|
|
.L80281818:
|
|
/* 7E2698 80281818 96420000 */ lhu $v0, ($s2)
|
|
/* 7E269C 8028181C 3042FFFE */ andi $v0, $v0, 0xfffe
|
|
/* 7E26A0 80281820 0C03A640 */ jal func_800E9900
|
|
/* 7E26A4 80281824 A6420000 */ sh $v0, ($s2)
|
|
.L80281828:
|
|
/* 7E26A8 80281828 8FBF005C */ lw $ra, 0x5c($sp)
|
|
/* 7E26AC 8028182C 8FBE0058 */ lw $fp, 0x58($sp)
|
|
/* 7E26B0 80281830 8FB70054 */ lw $s7, 0x54($sp)
|
|
/* 7E26B4 80281834 8FB60050 */ lw $s6, 0x50($sp)
|
|
/* 7E26B8 80281838 8FB5004C */ lw $s5, 0x4c($sp)
|
|
/* 7E26BC 8028183C 8FB40048 */ lw $s4, 0x48($sp)
|
|
/* 7E26C0 80281840 8FB30044 */ lw $s3, 0x44($sp)
|
|
/* 7E26C4 80281844 8FB20040 */ lw $s2, 0x40($sp)
|
|
/* 7E26C8 80281848 8FB1003C */ lw $s1, 0x3c($sp)
|
|
/* 7E26CC 8028184C 8FB00038 */ lw $s0, 0x38($sp)
|
|
/* 7E26D0 80281850 D7B60068 */ ldc1 $f22, 0x68($sp)
|
|
/* 7E26D4 80281854 D7B40060 */ ldc1 $f20, 0x60($sp)
|
|
/* 7E26D8 80281858 03E00008 */ jr $ra
|
|
/* 7E26DC 8028185C 27BD0070 */ addiu $sp, $sp, 0x70
|