mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
146 lines
6.7 KiB
ArmAsm
146 lines
6.7 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel calc_player_test_enemy
|
|
/* 1A0034 80271754 27BDFFD0 */ addiu $sp, $sp, -0x30
|
|
/* 1A0038 80271758 AFB20020 */ sw $s2, 0x20($sp)
|
|
/* 1A003C 8027175C 3C12800E */ lui $s2, 0x800e
|
|
/* 1A0040 80271760 2652C070 */ addiu $s2, $s2, -0x3f90
|
|
/* 1A0044 80271764 AFBF002C */ sw $ra, 0x2c($sp)
|
|
/* 1A0048 80271768 AFB40028 */ sw $s4, 0x28($sp)
|
|
/* 1A004C 8027176C AFB30024 */ sw $s3, 0x24($sp)
|
|
/* 1A0050 80271770 AFB1001C */ sw $s1, 0x1c($sp)
|
|
/* 1A0054 80271774 AFB00018 */ sw $s0, 0x18($sp)
|
|
/* 1A0058 80271778 964201A0 */ lhu $v0, 0x1a0($s2)
|
|
/* 1A005C 8027177C 864401A0 */ lh $a0, 0x1a0($s2)
|
|
/* 1A0060 80271780 924301A2 */ lbu $v1, 0x1a2($s2)
|
|
/* 1A0064 80271784 8E5400D8 */ lw $s4, 0xd8($s2)
|
|
/* 1A0068 80271788 825101A2 */ lb $s1, 0x1a2($s2)
|
|
/* 1A006C 8027178C A64201A4 */ sh $v0, 0x1a4($s2)
|
|
/* 1A0070 80271790 0C09A75B */ jal get_actor
|
|
/* 1A0074 80271794 A24301A6 */ sb $v1, 0x1a6($s2)
|
|
/* 1A0078 80271798 0040982D */ daddu $s3, $v0, $zero
|
|
/* 1A007C 8027179C 12600060 */ beqz $s3, .L80271920
|
|
/* 1A0080 802717A0 2690000C */ addiu $s0, $s4, 0xc
|
|
/* 1A0084 802717A4 0260202D */ daddu $a0, $s3, $zero
|
|
/* 1A0088 802717A8 0C099117 */ jal get_actor_part
|
|
/* 1A008C 802717AC 0220282D */ daddu $a1, $s1, $zero
|
|
/* 1A0090 802717B0 0040882D */ daddu $s1, $v0, $zero
|
|
/* 1A0094 802717B4 16200003 */ bnez $s1, .L802717C4
|
|
/* 1A0098 802717B8 00000000 */ nop
|
|
.L802717BC:
|
|
/* 1A009C 802717BC 0809C5EF */ j .L802717BC
|
|
/* 1A00A0 802717C0 00000000 */ nop
|
|
|
|
.L802717C4:
|
|
/* 1A00A4 802717C4 8E24007C */ lw $a0, 0x7c($s1)
|
|
/* 1A00A8 802717C8 30820020 */ andi $v0, $a0, 0x20
|
|
/* 1A00AC 802717CC 14400055 */ bnez $v0, .L80271924
|
|
/* 1A00B0 802717D0 24020006 */ addiu $v0, $zero, 6
|
|
/* 1A00B4 802717D4 82630218 */ lb $v1, 0x218($s3)
|
|
/* 1A00B8 802717D8 2402000E */ addiu $v0, $zero, 0xe
|
|
/* 1A00BC 802717DC 10620007 */ beq $v1, $v0, .L802717FC
|
|
/* 1A00C0 802717E0 30820800 */ andi $v0, $a0, 0x800
|
|
/* 1A00C4 802717E4 10400007 */ beqz $v0, .L80271804
|
|
/* 1A00C8 802717E8 00000000 */ nop
|
|
/* 1A00CC 802717EC 8E420188 */ lw $v0, 0x188($s2)
|
|
/* 1A00D0 802717F0 30420800 */ andi $v0, $v0, 0x800
|
|
/* 1A00D4 802717F4 14400003 */ bnez $v0, .L80271804
|
|
/* 1A00D8 802717F8 00000000 */ nop
|
|
.L802717FC:
|
|
/* 1A00DC 802717FC 0809C649 */ j .L80271924
|
|
/* 1A00E0 80271800 24020006 */ addiu $v0, $zero, 6
|
|
|
|
.L80271804:
|
|
/* 1A00E4 80271804 82630214 */ lb $v1, 0x214($s3)
|
|
/* 1A00E8 80271808 2402000C */ addiu $v0, $zero, 0xc
|
|
/* 1A00EC 8027180C 14620009 */ bne $v1, $v0, .L80271834
|
|
/* 1A00F0 80271810 2404010C */ addiu $a0, $zero, 0x10c
|
|
/* 1A00F4 80271814 C6000014 */ lwc1 $f0, 0x14($s0)
|
|
/* 1A00F8 80271818 E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 1A00FC 8027181C 8E06000C */ lw $a2, 0xc($s0)
|
|
/* 1A0100 80271820 8E070010 */ lw $a3, 0x10($s0)
|
|
/* 1A0104 80271824 0C052757 */ jal play_sound_at_position
|
|
/* 1A0108 80271828 0000282D */ daddu $a1, $zero, $zero
|
|
/* 1A010C 8027182C 0809C649 */ j .L80271924
|
|
/* 1A0110 80271830 24020008 */ addiu $v0, $zero, 8
|
|
|
|
.L80271834:
|
|
/* 1A0114 80271834 8E420188 */ lw $v0, 0x188($s2)
|
|
/* 1A0118 80271838 30420080 */ andi $v0, $v0, 0x80
|
|
/* 1A011C 8027183C 10400012 */ beqz $v0, .L80271888
|
|
/* 1A0120 80271840 3C031000 */ lui $v1, 0x1000
|
|
/* 1A0124 80271844 8E22007C */ lw $v0, 0x7c($s1)
|
|
/* 1A0128 80271848 30420010 */ andi $v0, $v0, 0x10
|
|
/* 1A012C 8027184C 1040000E */ beqz $v0, .L80271888
|
|
/* 1A0130 80271850 0280202D */ daddu $a0, $s4, $zero
|
|
/* 1A0134 80271854 0C099CAB */ jal heroes_is_ability_active
|
|
/* 1A0138 80271858 24050002 */ addiu $a1, $zero, 2
|
|
/* 1A013C 8027185C 1440000A */ bnez $v0, .L80271888
|
|
/* 1A0140 80271860 3C031000 */ lui $v1, 0x1000
|
|
/* 1A0144 80271864 C6000014 */ lwc1 $f0, 0x14($s0)
|
|
/* 1A0148 80271868 24040108 */ addiu $a0, $zero, 0x108
|
|
/* 1A014C 8027186C E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 1A0150 80271870 8E06000C */ lw $a2, 0xc($s0)
|
|
/* 1A0154 80271874 8E070010 */ lw $a3, 0x10($s0)
|
|
/* 1A0158 80271878 0C052757 */ jal play_sound_at_position
|
|
/* 1A015C 8027187C 0000282D */ daddu $a1, $zero, $zero
|
|
/* 1A0160 80271880 0809C649 */ j .L80271924
|
|
/* 1A0164 80271884 24020004 */ addiu $v0, $zero, 4
|
|
|
|
.L80271888:
|
|
/* 1A0168 80271888 8E420188 */ lw $v0, 0x188($s2)
|
|
/* 1A016C 8027188C 34630080 */ ori $v1, $v1, 0x80
|
|
/* 1A0170 80271890 00431024 */ and $v0, $v0, $v1
|
|
/* 1A0174 80271894 1440001B */ bnez $v0, .L80271904
|
|
/* 1A0178 80271898 3C030001 */ lui $v1, 1
|
|
/* 1A017C 8027189C 8E22007C */ lw $v0, 0x7c($s1)
|
|
/* 1A0180 802718A0 00431024 */ and $v0, $v0, $v1
|
|
/* 1A0184 802718A4 10400017 */ beqz $v0, .L80271904
|
|
/* 1A0188 802718A8 00000000 */ nop
|
|
/* 1A018C 802718AC 8E42018C */ lw $v0, 0x18c($s2)
|
|
/* 1A0190 802718B0 30420004 */ andi $v0, $v0, 4
|
|
/* 1A0194 802718B4 14400013 */ bnez $v0, .L80271904
|
|
/* 1A0198 802718B8 0280202D */ daddu $a0, $s4, $zero
|
|
/* 1A019C 802718BC 0C099CAB */ jal heroes_is_ability_active
|
|
/* 1A01A0 802718C0 24050002 */ addiu $a1, $zero, 2
|
|
/* 1A01A4 802718C4 1440000F */ bnez $v0, .L80271904
|
|
/* 1A01A8 802718C8 24040108 */ addiu $a0, $zero, 0x108
|
|
/* 1A01AC 802718CC C6000014 */ lwc1 $f0, 0x14($s0)
|
|
/* 1A01B0 802718D0 E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 1A01B4 802718D4 8E06000C */ lw $a2, 0xc($s0)
|
|
/* 1A01B8 802718D8 8E070010 */ lw $a3, 0x10($s0)
|
|
/* 1A01BC 802718DC 0C052757 */ jal play_sound_at_position
|
|
/* 1A01C0 802718E0 0000282D */ daddu $a1, $zero, $zero
|
|
/* 1A01C4 802718E4 24040001 */ addiu $a0, $zero, 1
|
|
/* 1A01C8 802718E8 0C09CCEA */ jal dispatch_damage_event_player_1
|
|
/* 1A01CC 802718EC 2405002A */ addiu $a1, $zero, 0x2a
|
|
/* 1A01D0 802718F0 0260202D */ daddu $a0, $s3, $zero
|
|
/* 1A01D4 802718F4 0C09DC58 */ jal dispatch_event_actor
|
|
/* 1A01D8 802718F8 2405001B */ addiu $a1, $zero, 0x1b
|
|
/* 1A01DC 802718FC 0809C649 */ j .L80271924
|
|
/* 1A01E0 80271900 2402FFFF */ addiu $v0, $zero, -1
|
|
|
|
.L80271904:
|
|
/* 1A01E4 80271904 82820212 */ lb $v0, 0x212($s4)
|
|
/* 1A01E8 80271908 2404000B */ addiu $a0, $zero, 0xb
|
|
/* 1A01EC 8027190C 10440005 */ beq $v0, $a0, .L80271924
|
|
/* 1A01F0 80271910 0000102D */ daddu $v0, $zero, $zero
|
|
/* 1A01F4 80271914 82630212 */ lb $v1, 0x212($s3)
|
|
/* 1A01F8 80271918 10640002 */ beq $v1, $a0, .L80271924
|
|
/* 1A01FC 8027191C 24020007 */ addiu $v0, $zero, 7
|
|
.L80271920:
|
|
/* 1A0200 80271920 0000102D */ daddu $v0, $zero, $zero
|
|
.L80271924:
|
|
.L80271924:
|
|
/* 1A0204 80271924 8FBF002C */ lw $ra, 0x2c($sp)
|
|
/* 1A0208 80271928 8FB40028 */ lw $s4, 0x28($sp)
|
|
/* 1A020C 8027192C 8FB30024 */ lw $s3, 0x24($sp)
|
|
/* 1A0210 80271930 8FB20020 */ lw $s2, 0x20($sp)
|
|
/* 1A0214 80271934 8FB1001C */ lw $s1, 0x1c($sp)
|
|
/* 1A0218 80271938 8FB00018 */ lw $s0, 0x18($sp)
|
|
/* 1A021C 8027193C 03E00008 */ jr $ra
|
|
/* 1A0220 80271940 27BD0030 */ addiu $sp, $sp, 0x30
|
|
|