mirror of
https://github.com/pmret/papermario.git
synced 2024-11-10 13:02:41 +01:00
287 lines
13 KiB
ArmAsm
287 lines
13 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel func_800490B4
|
|
/* 0244B4 800490B4 27BDFFA0 */ addiu $sp, $sp, -0x60
|
|
/* 0244B8 800490B8 F7B60050 */ sdc1 $f22, 0x50($sp)
|
|
/* 0244BC 800490BC 4486B000 */ mtc1 $a2, $f22
|
|
/* 0244C0 800490C0 F7B80058 */ sdc1 $f24, 0x58($sp)
|
|
/* 0244C4 800490C4 4487C000 */ mtc1 $a3, $f24
|
|
/* 0244C8 800490C8 AFB10034 */ sw $s1, 0x34($sp)
|
|
/* 0244CC 800490CC 0080882D */ daddu $s1, $a0, $zero
|
|
/* 0244D0 800490D0 AFB3003C */ sw $s3, 0x3c($sp)
|
|
/* 0244D4 800490D4 00A0982D */ daddu $s3, $a1, $zero
|
|
/* 0244D8 800490D8 AFBF0044 */ sw $ra, 0x44($sp)
|
|
/* 0244DC 800490DC AFB40040 */ sw $s4, 0x40($sp)
|
|
/* 0244E0 800490E0 AFB20038 */ sw $s2, 0x38($sp)
|
|
/* 0244E4 800490E4 AFB00030 */ sw $s0, 0x30($sp)
|
|
/* 0244E8 800490E8 F7B40048 */ sdc1 $f20, 0x48($sp)
|
|
/* 0244EC 800490EC 86640008 */ lh $a0, 8($s3)
|
|
/* 0244F0 800490F0 0C00EABB */ jal get_npc_unsafe
|
|
/* 0244F4 800490F4 93B40073 */ lbu $s4, 0x73($sp)
|
|
/* 0244F8 800490F8 0040802D */ daddu $s0, $v0, $zero
|
|
/* 0244FC 800490FC 8E6200B0 */ lw $v0, 0xb0($s3)
|
|
/* 024500 80049100 3C128011 */ lui $s2, 0x8011
|
|
/* 024504 80049104 2652EFC8 */ addiu $s2, $s2, -0x1038
|
|
/* 024508 80049108 30420002 */ andi $v0, $v0, 2
|
|
/* 02450C 8004910C 144000AC */ bnez $v0, .L800493C0
|
|
/* 024510 80049110 0000102D */ daddu $v0, $zero, $zero
|
|
/* 024514 80049114 3C048011 */ lui $a0, 0x8011
|
|
/* 024518 80049118 2484EBB0 */ addiu $a0, $a0, -0x1450
|
|
/* 02451C 8004911C 80830003 */ lb $v1, 3($a0)
|
|
/* 024520 80049120 24020009 */ addiu $v0, $zero, 9
|
|
/* 024524 80049124 14620008 */ bne $v1, $v0, .L80049148
|
|
/* 024528 80049128 24020007 */ addiu $v0, $zero, 7
|
|
/* 02452C 8004912C 80820000 */ lb $v0, ($a0)
|
|
/* 024530 80049130 10400005 */ beqz $v0, .L80049148
|
|
/* 024534 80049134 24020007 */ addiu $v0, $zero, 7
|
|
/* 024538 80049138 9622001C */ lhu $v0, 0x1c($s1)
|
|
/* 02453C 8004913C 30420001 */ andi $v0, $v0, 1
|
|
/* 024540 80049140 1040009E */ beqz $v0, .L800493BC
|
|
/* 024544 80049144 24020007 */ addiu $v0, $zero, 7
|
|
.L80049148:
|
|
/* 024548 80049148 14620008 */ bne $v1, $v0, .L8004916C
|
|
/* 02454C 8004914C 00000000 */ nop
|
|
/* 024550 80049150 80820000 */ lb $v0, ($a0)
|
|
/* 024554 80049154 10400005 */ beqz $v0, .L8004916C
|
|
/* 024558 80049158 00000000 */ nop
|
|
/* 02455C 8004915C 9622001C */ lhu $v0, 0x1c($s1)
|
|
/* 024560 80049160 30420001 */ andi $v0, $v0, 1
|
|
/* 024564 80049164 10400096 */ beqz $v0, .L800493C0
|
|
/* 024568 80049168 0000102D */ daddu $v0, $zero, $zero
|
|
.L8004916C:
|
|
/* 02456C 8004916C 8E220000 */ lw $v0, ($s1)
|
|
/* 024570 80049170 04400093 */ bltz $v0, .L800493C0
|
|
/* 024574 80049174 0000102D */ daddu $v0, $zero, $zero
|
|
/* 024578 80049178 C600003C */ lwc1 $f0, 0x3c($s0)
|
|
/* 02457C 8004917C C642002C */ lwc1 $f2, 0x2c($s2)
|
|
/* 024580 80049180 46020001 */ sub.s $f0, $f0, $f2
|
|
/* 024584 80049184 C6220018 */ lwc1 $f2, 0x18($s1)
|
|
/* 024588 80049188 46000005 */ abs.s $f0, $f0
|
|
/* 02458C 8004918C 4600103E */ c.le.s $f2, $f0
|
|
/* 024590 80049190 00000000 */ nop
|
|
/* 024594 80049194 45000005 */ bc1f .L800491AC
|
|
/* 024598 80049198 00000000 */ nop
|
|
/* 02459C 8004919C 9622001C */ lhu $v0, 0x1c($s1)
|
|
/* 0245A0 800491A0 30420002 */ andi $v0, $v0, 2
|
|
/* 0245A4 800491A4 10400086 */ beqz $v0, .L800493C0
|
|
/* 0245A8 800491A8 0000102D */ daddu $v0, $zero, $zero
|
|
.L800491AC:
|
|
/* 0245AC 800491AC 8E220010 */ lw $v0, 0x10($s1)
|
|
/* 0245B0 800491B0 8E230014 */ lw $v1, 0x14($s1)
|
|
/* 0245B4 800491B4 00431025 */ or $v0, $v0, $v1
|
|
/* 0245B8 800491B8 10400014 */ beqz $v0, .L8004920C
|
|
/* 0245BC 800491BC 00000000 */ nop
|
|
/* 0245C0 800491C0 C6200008 */ lwc1 $f0, 8($s1)
|
|
/* 0245C4 800491C4 46800020 */ cvt.s.w $f0, $f0
|
|
/* 0245C8 800491C8 44050000 */ mfc1 $a1, $f0
|
|
/* 0245CC 800491CC C620000C */ lwc1 $f0, 0xc($s1)
|
|
/* 0245D0 800491D0 46800020 */ cvt.s.w $f0, $f0
|
|
/* 0245D4 800491D4 44060000 */ mfc1 $a2, $f0
|
|
/* 0245D8 800491D8 C6400030 */ lwc1 $f0, 0x30($s2)
|
|
/* 0245DC 800491DC 8E470028 */ lw $a3, 0x28($s2)
|
|
/* 0245E0 800491E0 E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 0245E4 800491E4 C6200010 */ lwc1 $f0, 0x10($s1)
|
|
/* 0245E8 800491E8 46800020 */ cvt.s.w $f0, $f0
|
|
/* 0245EC 800491EC E7A00014 */ swc1 $f0, 0x14($sp)
|
|
/* 0245F0 800491F0 C6200014 */ lwc1 $f0, 0x14($s1)
|
|
/* 0245F4 800491F4 46800020 */ cvt.s.w $f0, $f0
|
|
/* 0245F8 800491F8 E7A00018 */ swc1 $f0, 0x18($sp)
|
|
/* 0245FC 800491FC 0C0123F5 */ jal is_point_within_region
|
|
/* 024600 80049200 8E240004 */ lw $a0, 4($s1)
|
|
/* 024604 80049204 1440006E */ bnez $v0, .L800493C0
|
|
/* 024608 80049208 0000102D */ daddu $v0, $zero, $zero
|
|
.L8004920C:
|
|
/* 02460C 8004920C 824300B4 */ lb $v1, 0xb4($s2)
|
|
/* 024610 80049210 2402001D */ addiu $v0, $zero, 0x1d
|
|
/* 024614 80049214 1062006A */ beq $v1, $v0, .L800493C0
|
|
/* 024618 80049218 0000102D */ daddu $v0, $zero, $zero
|
|
/* 02461C 8004921C 926200AC */ lbu $v0, 0xac($s3)
|
|
/* 024620 80049220 30420001 */ andi $v0, $v0, 1
|
|
/* 024624 80049224 1040002C */ beqz $v0, .L800492D8
|
|
/* 024628 80049228 00000000 */ nop
|
|
/* 02462C 8004922C C60C0038 */ lwc1 $f12, 0x38($s0)
|
|
/* 024630 80049230 860200A8 */ lh $v0, 0xa8($s0)
|
|
/* 024634 80049234 3C013FE0 */ lui $at, 0x3fe0
|
|
/* 024638 80049238 44810800 */ mtc1 $at, $f1
|
|
/* 02463C 8004923C 44800000 */ mtc1 $zero, $f0
|
|
/* 024640 80049240 44821000 */ mtc1 $v0, $f2
|
|
/* 024644 80049244 00000000 */ nop
|
|
/* 024648 80049248 468010A1 */ cvt.d.w $f2, $f2
|
|
/* 02464C 8004924C 46201082 */ mul.d $f2, $f2, $f0
|
|
/* 024650 80049250 00000000 */ nop
|
|
/* 024654 80049254 C60E0040 */ lwc1 $f14, 0x40($s0)
|
|
/* 024658 80049258 8E460028 */ lw $a2, 0x28($s2)
|
|
/* 02465C 8004925C 8E470030 */ lw $a3, 0x30($s2)
|
|
/* 024660 80049260 46006106 */ mov.s $f4, $f12
|
|
/* 024664 80049264 C600003C */ lwc1 $f0, 0x3c($s0)
|
|
/* 024668 80049268 46007186 */ mov.s $f6, $f14
|
|
/* 02466C 8004926C 46000021 */ cvt.d.s $f0, $f0
|
|
/* 024670 80049270 46220000 */ add.d $f0, $f0, $f2
|
|
/* 024674 80049274 E7A40020 */ swc1 $f4, 0x20($sp)
|
|
/* 024678 80049278 E7A60028 */ swc1 $f6, 0x28($sp)
|
|
/* 02467C 8004927C 46200020 */ cvt.s.d $f0, $f0
|
|
/* 024680 80049280 0C00A7B5 */ jal dist2D
|
|
/* 024684 80049284 E7A00024 */ swc1 $f0, 0x24($sp)
|
|
/* 024688 80049288 C60C0038 */ lwc1 $f12, 0x38($s0)
|
|
/* 02468C 8004928C C60E0040 */ lwc1 $f14, 0x40($s0)
|
|
/* 024690 80049290 8E460028 */ lw $a2, 0x28($s2)
|
|
/* 024694 80049294 8E470030 */ lw $a3, 0x30($s2)
|
|
/* 024698 80049298 0C00A720 */ jal atan2
|
|
/* 02469C 8004929C 46000506 */ mov.s $f20, $f0
|
|
/* 0246A0 800492A0 3C040005 */ lui $a0, 5
|
|
/* 0246A4 800492A4 27A50020 */ addiu $a1, $sp, 0x20
|
|
/* 0246A8 800492A8 27A60024 */ addiu $a2, $sp, 0x24
|
|
/* 0246AC 800492AC 3C013DCC */ lui $at, 0x3dcc
|
|
/* 0246B0 800492B0 3421CCCD */ ori $at, $at, 0xcccd
|
|
/* 0246B4 800492B4 44811000 */ mtc1 $at, $f2
|
|
/* 0246B8 800492B8 27A70028 */ addiu $a3, $sp, 0x28
|
|
/* 0246BC 800492BC E7B40010 */ swc1 $f20, 0x10($sp)
|
|
/* 0246C0 800492C0 E7A00014 */ swc1 $f0, 0x14($sp)
|
|
/* 0246C4 800492C4 E7A20018 */ swc1 $f2, 0x18($sp)
|
|
/* 0246C8 800492C8 0C037711 */ jal func_800DDC44
|
|
/* 0246CC 800492CC E7A2001C */ swc1 $f2, 0x1c($sp)
|
|
/* 0246D0 800492D0 1440003B */ bnez $v0, .L800493C0
|
|
/* 0246D4 800492D4 0000102D */ daddu $v0, $zero, $zero
|
|
.L800492D8:
|
|
/* 0246D8 800492D8 8E220000 */ lw $v0, ($s1)
|
|
/* 0246DC 800492DC 14400003 */ bnez $v0, .L800492EC
|
|
/* 0246E0 800492E0 00000000 */ nop
|
|
/* 0246E4 800492E4 080124BD */ j .L800492F4
|
|
/* 0246E8 800492E8 0000102D */ daddu $v0, $zero, $zero
|
|
|
|
.L800492EC:
|
|
/* 0246EC 800492EC 0C00A67F */ jal rand_int
|
|
/* 0246F0 800492F0 24440001 */ addiu $a0, $v0, 1
|
|
.L800492F4:
|
|
/* 0246F4 800492F4 14400032 */ bnez $v0, .L800493C0
|
|
/* 0246F8 800492F8 0000102D */ daddu $v0, $zero, $zero
|
|
/* 0246FC 800492FC 926200AC */ lbu $v0, 0xac($s3)
|
|
/* 024700 80049300 30420002 */ andi $v0, $v0, 2
|
|
/* 024704 80049304 10400010 */ beqz $v0, .L80049348
|
|
/* 024708 80049308 24020001 */ addiu $v0, $zero, 1
|
|
/* 02470C 8004930C 824300B4 */ lb $v1, 0xb4($s2)
|
|
/* 024710 80049310 14620005 */ bne $v1, $v0, .L80049328
|
|
/* 024714 80049314 24020002 */ addiu $v0, $zero, 2
|
|
/* 024718 80049318 3C01800A */ lui $at, 0x800a
|
|
/* 02471C 8004931C D4228710 */ ldc1 $f2, -0x78f0($at)
|
|
/* 024720 80049320 080124CF */ j .L8004933C
|
|
/* 024724 80049324 4600B021 */ cvt.d.s $f0, $f22
|
|
|
|
.L80049328:
|
|
/* 024728 80049328 14620007 */ bne $v1, $v0, .L80049348
|
|
/* 02472C 8004932C 00000000 */ nop
|
|
/* 024730 80049330 3C01800A */ lui $at, 0x800a
|
|
/* 024734 80049334 D4228718 */ ldc1 $f2, -0x78e8($at)
|
|
/* 024738 80049338 4600B021 */ cvt.d.s $f0, $f22
|
|
.L8004933C:
|
|
/* 02473C 8004933C 46220002 */ mul.d $f0, $f0, $f2
|
|
/* 024740 80049340 00000000 */ nop
|
|
/* 024744 80049344 462005A0 */ cvt.s.d $f22, $f0
|
|
.L80049348:
|
|
/* 024748 80049348 C6000038 */ lwc1 $f0, 0x38($s0)
|
|
/* 02474C 8004934C C6020040 */ lwc1 $f2, 0x40($s0)
|
|
/* 024750 80049350 328200FF */ andi $v0, $s4, 0xff
|
|
/* 024754 80049354 E7A00020 */ swc1 $f0, 0x20($sp)
|
|
/* 024758 80049358 10400005 */ beqz $v0, .L80049370
|
|
/* 02475C 8004935C E7A20028 */ swc1 $f2, 0x28($sp)
|
|
/* 024760 80049360 4406C000 */ mfc1 $a2, $f24
|
|
/* 024764 80049364 8E07000C */ lw $a3, 0xc($s0)
|
|
/* 024768 80049368 080124E4 */ j .L80049390
|
|
/* 02476C 8004936C 27A40020 */ addiu $a0, $sp, 0x20
|
|
|
|
.L80049370:
|
|
/* 024770 80049370 C6020034 */ lwc1 $f2, 0x34($s0)
|
|
/* 024774 80049374 3C014387 */ lui $at, 0x4387
|
|
/* 024778 80049378 44810000 */ mtc1 $at, $f0
|
|
/* 02477C 8004937C 00000000 */ nop
|
|
/* 024780 80049380 46020001 */ sub.s $f0, $f0, $f2
|
|
/* 024784 80049384 27A40020 */ addiu $a0, $sp, 0x20
|
|
/* 024788 80049388 4406C000 */ mfc1 $a2, $f24
|
|
/* 02478C 8004938C 44070000 */ mfc1 $a3, $f0
|
|
.L80049390:
|
|
/* 024790 80049390 0C00A7E7 */ jal add_vec2D_polar
|
|
/* 024794 80049394 27A50028 */ addiu $a1, $sp, 0x28
|
|
/* 024798 80049398 C7AC0020 */ lwc1 $f12, 0x20($sp)
|
|
/* 02479C 8004939C C7AE0028 */ lwc1 $f14, 0x28($sp)
|
|
/* 0247A0 800493A0 8E460028 */ lw $a2, 0x28($s2)
|
|
/* 0247A4 800493A4 0C00A7B5 */ jal dist2D
|
|
/* 0247A8 800493A8 8E470030 */ lw $a3, 0x30($s2)
|
|
/* 0247AC 800493AC 4616003E */ c.le.s $f0, $f22
|
|
/* 0247B0 800493B0 00000000 */ nop
|
|
/* 0247B4 800493B4 45010002 */ bc1t .L800493C0
|
|
/* 0247B8 800493B8 24020001 */ addiu $v0, $zero, 1
|
|
.L800493BC:
|
|
/* 0247BC 800493BC 0000102D */ daddu $v0, $zero, $zero
|
|
.L800493C0:
|
|
/* 0247C0 800493C0 8FBF0044 */ lw $ra, 0x44($sp)
|
|
/* 0247C4 800493C4 8FB40040 */ lw $s4, 0x40($sp)
|
|
/* 0247C8 800493C8 8FB3003C */ lw $s3, 0x3c($sp)
|
|
/* 0247CC 800493CC 8FB20038 */ lw $s2, 0x38($sp)
|
|
/* 0247D0 800493D0 8FB10034 */ lw $s1, 0x34($sp)
|
|
/* 0247D4 800493D4 8FB00030 */ lw $s0, 0x30($sp)
|
|
/* 0247D8 800493D8 D7B80058 */ ldc1 $f24, 0x58($sp)
|
|
/* 0247DC 800493DC D7B60050 */ ldc1 $f22, 0x50($sp)
|
|
/* 0247E0 800493E0 D7B40048 */ ldc1 $f20, 0x48($sp)
|
|
/* 0247E4 800493E4 03E00008 */ jr $ra
|
|
/* 0247E8 800493E8 27BD0060 */ addiu $sp, $sp, 0x60
|
|
|
|
/* 0247EC 800493EC 27BDFFC8 */ addiu $sp, $sp, -0x38
|
|
/* 0247F0 800493F0 F7B60030 */ sdc1 $f22, 0x30($sp)
|
|
/* 0247F4 800493F4 4486B000 */ mtc1 $a2, $f22
|
|
/* 0247F8 800493F8 AFB00018 */ sw $s0, 0x18($sp)
|
|
/* 0247FC 800493FC AFBF0024 */ sw $ra, 0x24($sp)
|
|
/* 024800 80049400 AFB20020 */ sw $s2, 0x20($sp)
|
|
/* 024804 80049404 AFB1001C */ sw $s1, 0x1c($sp)
|
|
/* 024808 80049408 F7B40028 */ sdc1 $f20, 0x28($sp)
|
|
/* 02480C 8004940C 84840008 */ lh $a0, 8($a0)
|
|
/* 024810 80049410 4487A000 */ mtc1 $a3, $f20
|
|
/* 024814 80049414 0C00EABB */ jal get_npc_unsafe
|
|
/* 024818 80049418 00A0802D */ daddu $s0, $a1, $zero
|
|
/* 02481C 8004941C 3C128011 */ lui $s2, 0x8011
|
|
/* 024820 80049420 2652EFC8 */ addiu $s2, $s2, -0x1038
|
|
/* 024824 80049424 0600001D */ bltz $s0, .L8004949C
|
|
/* 024828 80049428 0040882D */ daddu $s1, $v0, $zero
|
|
/* 02482C 8004942C 12000003 */ beqz $s0, .L8004943C
|
|
/* 024830 80049430 0000102D */ daddu $v0, $zero, $zero
|
|
/* 024834 80049434 0C00A67F */ jal rand_int
|
|
/* 024838 80049438 26040001 */ addiu $a0, $s0, 1
|
|
.L8004943C:
|
|
/* 02483C 8004943C 14400018 */ bnez $v0, .L800494A0
|
|
/* 024840 80049440 0000102D */ daddu $v0, $zero, $zero
|
|
/* 024844 80049444 27A40010 */ addiu $a0, $sp, 0x10
|
|
/* 024848 80049448 C6220034 */ lwc1 $f2, 0x34($s1)
|
|
/* 02484C 8004944C 3C014387 */ lui $at, 0x4387
|
|
/* 024850 80049450 44810000 */ mtc1 $at, $f0
|
|
/* 024854 80049454 4406A000 */ mfc1 $a2, $f20
|
|
/* 024858 80049458 46020001 */ sub.s $f0, $f0, $f2
|
|
/* 02485C 8004945C C6260038 */ lwc1 $f6, 0x38($s1)
|
|
/* 024860 80049460 C6240040 */ lwc1 $f4, 0x40($s1)
|
|
/* 024864 80049464 44070000 */ mfc1 $a3, $f0
|
|
/* 024868 80049468 27A50014 */ addiu $a1, $sp, 0x14
|
|
/* 02486C 8004946C E7A60010 */ swc1 $f6, 0x10($sp)
|
|
/* 024870 80049470 0C00A7E7 */ jal add_vec2D_polar
|
|
/* 024874 80049474 E7A40014 */ swc1 $f4, 0x14($sp)
|
|
/* 024878 80049478 8E460028 */ lw $a2, 0x28($s2)
|
|
/* 02487C 8004947C 8E470030 */ lw $a3, 0x30($s2)
|
|
/* 024880 80049480 C7AC0010 */ lwc1 $f12, 0x10($sp)
|
|
/* 024884 80049484 0C00A7B5 */ jal dist2D
|
|
/* 024888 80049488 C7AE0014 */ lwc1 $f14, 0x14($sp)
|
|
/* 02488C 8004948C 4616003E */ c.le.s $f0, $f22
|
|
/* 024890 80049490 00000000 */ nop
|
|
/* 024894 80049494 45010002 */ bc1t .L800494A0
|
|
/* 024898 80049498 24020001 */ addiu $v0, $zero, 1
|
|
.L8004949C:
|
|
/* 02489C 8004949C 0000102D */ daddu $v0, $zero, $zero
|
|
.L800494A0:
|
|
/* 0248A0 800494A0 8FBF0024 */ lw $ra, 0x24($sp)
|
|
/* 0248A4 800494A4 8FB20020 */ lw $s2, 0x20($sp)
|
|
/* 0248A8 800494A8 8FB1001C */ lw $s1, 0x1c($sp)
|
|
/* 0248AC 800494AC 8FB00018 */ lw $s0, 0x18($sp)
|
|
/* 0248B0 800494B0 D7B60030 */ ldc1 $f22, 0x30($sp)
|
|
/* 0248B4 800494B4 D7B40028 */ ldc1 $f20, 0x28($sp)
|
|
/* 0248B8 800494B8 03E00008 */ jr $ra
|
|
/* 0248BC 800494BC 27BD0038 */ addiu $sp, $sp, 0x38
|
|
|