mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
match AwaitPlayerApproach, IsPlayerWithin, AwaitPlayerLeave, GetDist2D
This commit is contained in:
parent
b6f7087c82
commit
cbc5f2fe40
@ -1,54 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
|
|
||||||
glabel AwaitPlayerApproach
|
|
||||||
/* 0F925C 802D48AC 27BDFFE0 */ addiu $sp, $sp, -0x20
|
|
||||||
/* 0F9260 802D48B0 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* 0F9264 802D48B4 0080882D */ daddu $s1, $a0, $zero
|
|
||||||
/* 0F9268 802D48B8 AFB20018 */ sw $s2, 0x18($sp)
|
|
||||||
/* 0F926C 802D48BC 3C128011 */ lui $s2, 0x8011
|
|
||||||
/* 0F9270 802D48C0 2652EFC8 */ addiu $s2, $s2, -0x1038
|
|
||||||
/* 0F9274 802D48C4 AFBF001C */ sw $ra, 0x1c($sp)
|
|
||||||
/* 0F9278 802D48C8 AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* 0F927C 802D48CC 10A0000E */ beqz $a1, .L802D4908
|
|
||||||
/* 0F9280 802D48D0 8E30000C */ lw $s0, 0xc($s1)
|
|
||||||
/* 0F9284 802D48D4 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F9288 802D48D8 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F928C 802D48DC 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0F9290 802D48E0 AE220070 */ sw $v0, 0x70($s1)
|
|
||||||
/* 0F9294 802D48E4 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F9298 802D48E8 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0F929C 802D48EC 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F92A0 802D48F0 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F92A4 802D48F4 AE220074 */ sw $v0, 0x74($s1)
|
|
||||||
/* 0F92A8 802D48F8 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F92AC 802D48FC 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F92B0 802D4900 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F92B4 802D4904 AE220078 */ sw $v0, 0x78($s1)
|
|
||||||
.L802D4908:
|
|
||||||
/* 0F92B8 802D4908 C6240070 */ lwc1 $f4, 0x70($s1)
|
|
||||||
/* 0F92BC 802D490C 46802120 */ cvt.s.w $f4, $f4
|
|
||||||
/* 0F92C0 802D4910 44062000 */ mfc1 $a2, $f4
|
|
||||||
/* 0F92C4 802D4914 C6240074 */ lwc1 $f4, 0x74($s1)
|
|
||||||
/* 0F92C8 802D4918 46802120 */ cvt.s.w $f4, $f4
|
|
||||||
/* 0F92CC 802D491C C64C0028 */ lwc1 $f12, 0x28($s2)
|
|
||||||
/* 0F92D0 802D4920 C64E0030 */ lwc1 $f14, 0x30($s2)
|
|
||||||
/* 0F92D4 802D4924 44072000 */ mfc1 $a3, $f4
|
|
||||||
/* 0F92D8 802D4928 0C00A7B5 */ jal dist2D
|
|
||||||
/* 0F92DC 802D492C 00000000 */ nop
|
|
||||||
/* 0F92E0 802D4930 C6220078 */ lwc1 $f2, 0x78($s1)
|
|
||||||
/* 0F92E4 802D4934 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* 0F92E8 802D4938 4602003C */ c.lt.s $f0, $f2
|
|
||||||
/* 0F92EC 802D493C 00000000 */ nop
|
|
||||||
/* 0F92F0 802D4940 45010002 */ bc1t .L802D494C
|
|
||||||
/* 0F92F4 802D4944 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* 0F92F8 802D4948 0000102D */ daddu $v0, $zero, $zero
|
|
||||||
.L802D494C:
|
|
||||||
/* 0F92FC 802D494C 8FBF001C */ lw $ra, 0x1c($sp)
|
|
||||||
/* 0F9300 802D4950 8FB20018 */ lw $s2, 0x18($sp)
|
|
||||||
/* 0F9304 802D4954 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* 0F9308 802D4958 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* 0F930C 802D495C 03E00008 */ jr $ra
|
|
||||||
/* 0F9310 802D4960 27BD0020 */ addiu $sp, $sp, 0x20
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
|
|
||||||
glabel AwaitPlayerLeave
|
|
||||||
/* 0F940C 802D4A5C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
|
||||||
/* 0F9410 802D4A60 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* 0F9414 802D4A64 0080882D */ daddu $s1, $a0, $zero
|
|
||||||
/* 0F9418 802D4A68 AFB20018 */ sw $s2, 0x18($sp)
|
|
||||||
/* 0F941C 802D4A6C 3C128011 */ lui $s2, 0x8011
|
|
||||||
/* 0F9420 802D4A70 2652EFC8 */ addiu $s2, $s2, -0x1038
|
|
||||||
/* 0F9424 802D4A74 AFBF001C */ sw $ra, 0x1c($sp)
|
|
||||||
/* 0F9428 802D4A78 AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* 0F942C 802D4A7C 10A0000E */ beqz $a1, .L802D4AB8
|
|
||||||
/* 0F9430 802D4A80 8E30000C */ lw $s0, 0xc($s1)
|
|
||||||
/* 0F9434 802D4A84 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F9438 802D4A88 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F943C 802D4A8C 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0F9440 802D4A90 AE220070 */ sw $v0, 0x70($s1)
|
|
||||||
/* 0F9444 802D4A94 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F9448 802D4A98 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0F944C 802D4A9C 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F9450 802D4AA0 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F9454 802D4AA4 AE220074 */ sw $v0, 0x74($s1)
|
|
||||||
/* 0F9458 802D4AA8 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F945C 802D4AAC 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F9460 802D4AB0 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F9464 802D4AB4 AE220078 */ sw $v0, 0x78($s1)
|
|
||||||
.L802D4AB8:
|
|
||||||
/* 0F9468 802D4AB8 C6240070 */ lwc1 $f4, 0x70($s1)
|
|
||||||
/* 0F946C 802D4ABC 46802120 */ cvt.s.w $f4, $f4
|
|
||||||
/* 0F9470 802D4AC0 44062000 */ mfc1 $a2, $f4
|
|
||||||
/* 0F9474 802D4AC4 C6240074 */ lwc1 $f4, 0x74($s1)
|
|
||||||
/* 0F9478 802D4AC8 46802120 */ cvt.s.w $f4, $f4
|
|
||||||
/* 0F947C 802D4ACC C64C0028 */ lwc1 $f12, 0x28($s2)
|
|
||||||
/* 0F9480 802D4AD0 C64E0030 */ lwc1 $f14, 0x30($s2)
|
|
||||||
/* 0F9484 802D4AD4 44072000 */ mfc1 $a3, $f4
|
|
||||||
/* 0F9488 802D4AD8 0C00A7B5 */ jal dist2D
|
|
||||||
/* 0F948C 802D4ADC 00000000 */ nop
|
|
||||||
/* 0F9490 802D4AE0 C6220078 */ lwc1 $f2, 0x78($s1)
|
|
||||||
/* 0F9494 802D4AE4 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* 0F9498 802D4AE8 4600103C */ c.lt.s $f2, $f0
|
|
||||||
/* 0F949C 802D4AEC 00000000 */ nop
|
|
||||||
/* 0F94A0 802D4AF0 45010002 */ bc1t .L802D4AFC
|
|
||||||
/* 0F94A4 802D4AF4 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* 0F94A8 802D4AF8 0000102D */ daddu $v0, $zero, $zero
|
|
||||||
.L802D4AFC:
|
|
||||||
/* 0F94AC 802D4AFC 8FBF001C */ lw $ra, 0x1c($sp)
|
|
||||||
/* 0F94B0 802D4B00 8FB20018 */ lw $s2, 0x18($sp)
|
|
||||||
/* 0F94B4 802D4B04 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* 0F94B8 802D4B08 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* 0F94BC 802D4B0C 03E00008 */ jr $ra
|
|
||||||
/* 0F94C0 802D4B10 27BD0020 */ addiu $sp, $sp, 0x20
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
|
|
||||||
glabel GetDist2D
|
|
||||||
/* 0FA120 802D5770 27BDFFC8 */ addiu $sp, $sp, -0x38
|
|
||||||
/* 0FA124 802D5774 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* 0FA128 802D5778 0080882D */ daddu $s1, $a0, $zero
|
|
||||||
/* 0FA12C 802D577C AFBF001C */ sw $ra, 0x1c($sp)
|
|
||||||
/* 0FA130 802D5780 AFB20018 */ sw $s2, 0x18($sp)
|
|
||||||
/* 0FA134 802D5784 AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* 0FA138 802D5788 F7B80030 */ sdc1 $f24, 0x30($sp)
|
|
||||||
/* 0FA13C 802D578C F7B60028 */ sdc1 $f22, 0x28($sp)
|
|
||||||
/* 0FA140 802D5790 F7B40020 */ sdc1 $f20, 0x20($sp)
|
|
||||||
/* 0FA144 802D5794 8E30000C */ lw $s0, 0xc($s1)
|
|
||||||
/* 0FA148 802D5798 8E120000 */ lw $s2, ($s0)
|
|
||||||
/* 0FA14C 802D579C 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0FA150 802D57A0 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0FA154 802D57A4 0C0B210B */ jal get_float_variable
|
|
||||||
/* 0FA158 802D57A8 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0FA15C 802D57AC 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0FA160 802D57B0 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0FA164 802D57B4 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0FA168 802D57B8 0C0B210B */ jal get_float_variable
|
|
||||||
/* 0FA16C 802D57BC 46000606 */ mov.s $f24, $f0
|
|
||||||
/* 0FA170 802D57C0 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0FA174 802D57C4 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0FA178 802D57C8 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0FA17C 802D57CC 0C0B210B */ jal get_float_variable
|
|
||||||
/* 0FA180 802D57D0 46000586 */ mov.s $f22, $f0
|
|
||||||
/* 0FA184 802D57D4 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0FA188 802D57D8 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0FA18C 802D57DC 0C0B210B */ jal get_float_variable
|
|
||||||
/* 0FA190 802D57E0 46000506 */ mov.s $f20, $f0
|
|
||||||
/* 0FA194 802D57E4 4600C306 */ mov.s $f12, $f24
|
|
||||||
/* 0FA198 802D57E8 4406A000 */ mfc1 $a2, $f20
|
|
||||||
/* 0FA19C 802D57EC 44070000 */ mfc1 $a3, $f0
|
|
||||||
/* 0FA1A0 802D57F0 0C00A7B5 */ jal dist2D
|
|
||||||
/* 0FA1A4 802D57F4 4600B386 */ mov.s $f14, $f22
|
|
||||||
/* 0FA1A8 802D57F8 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0FA1AC 802D57FC 44060000 */ mfc1 $a2, $f0
|
|
||||||
/* 0FA1B0 802D5800 0C0B2190 */ jal set_float_variable
|
|
||||||
/* 0FA1B4 802D5804 0240282D */ daddu $a1, $s2, $zero
|
|
||||||
/* 0FA1B8 802D5808 8FBF001C */ lw $ra, 0x1c($sp)
|
|
||||||
/* 0FA1BC 802D580C 8FB20018 */ lw $s2, 0x18($sp)
|
|
||||||
/* 0FA1C0 802D5810 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* 0FA1C4 802D5814 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* 0FA1C8 802D5818 D7B80030 */ ldc1 $f24, 0x30($sp)
|
|
||||||
/* 0FA1CC 802D581C D7B60028 */ ldc1 $f22, 0x28($sp)
|
|
||||||
/* 0FA1D0 802D5820 D7B40020 */ ldc1 $f20, 0x20($sp)
|
|
||||||
/* 0FA1D4 802D5824 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* 0FA1D8 802D5828 03E00008 */ jr $ra
|
|
||||||
/* 0FA1DC 802D582C 27BD0038 */ addiu $sp, $sp, 0x38
|
|
||||||
|
|
||||||
/* 0FA1E0 802D5830 27BDFFE8 */ addiu $sp, $sp, -0x18
|
|
||||||
/* 0FA1E4 802D5834 AFBF0010 */ sw $ra, 0x10($sp)
|
|
||||||
/* 0FA1E8 802D5838 8C82000C */ lw $v0, 0xc($a0)
|
|
||||||
/* 0FA1EC 802D583C 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0FA1F0 802D5840 8C450000 */ lw $a1, ($v0)
|
|
||||||
/* 0FA1F4 802D5844 0C009C22 */ jal func_80027088
|
|
||||||
/* 0FA1F8 802D5848 0040202D */ daddu $a0, $v0, $zero
|
|
||||||
/* 0FA1FC 802D584C 8FBF0010 */ lw $ra, 0x10($sp)
|
|
||||||
/* 0FA200 802D5850 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* 0FA204 802D5854 03E00008 */ jr $ra
|
|
||||||
/* 0FA208 802D5858 27BD0018 */ addiu $sp, $sp, 0x18
|
|
||||||
|
|
||||||
/* 0FA20C 802D585C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
|
||||||
/* 0FA210 802D5860 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* 0FA214 802D5864 0080882D */ daddu $s1, $a0, $zero
|
|
||||||
/* 0FA218 802D5868 AFBF0018 */ sw $ra, 0x18($sp)
|
|
||||||
/* 0FA21C 802D586C AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* 0FA220 802D5870 8E30000C */ lw $s0, 0xc($s1)
|
|
||||||
/* 0FA224 802D5874 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0FA228 802D5878 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0FA22C 802D587C 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0FA230 802D5880 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0FA234 802D5884 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0FA238 802D5888 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0FA23C 802D588C 0040802D */ daddu $s0, $v0, $zero
|
|
||||||
/* 0FA240 802D5890 12000007 */ beqz $s0, .L802D58B0
|
|
||||||
/* 0FA244 802D5894 0040202D */ daddu $a0, $v0, $zero
|
|
||||||
/* 0FA248 802D5898 3C03800A */ lui $v1, 0x800a
|
|
||||||
/* 0FA24C 802D589C 2463A650 */ addiu $v1, $v1, -0x59b0
|
|
||||||
/* 0FA250 802D58A0 8C620000 */ lw $v0, ($v1)
|
|
||||||
/* 0FA254 802D58A4 00441025 */ or $v0, $v0, $a0
|
|
||||||
/* 0FA258 802D58A8 080B5632 */ j .L802D58C8
|
|
||||||
/* 0FA25C 802D58AC AC620000 */ sw $v0, ($v1)
|
|
||||||
|
|
||||||
.L802D58B0:
|
|
||||||
/* 0FA260 802D58B0 3C02800A */ lui $v0, 0x800a
|
|
||||||
/* 0FA264 802D58B4 2442A650 */ addiu $v0, $v0, -0x59b0
|
|
||||||
/* 0FA268 802D58B8 8C430000 */ lw $v1, ($v0)
|
|
||||||
/* 0FA26C 802D58BC 00042027 */ nor $a0, $zero, $a0
|
|
||||||
/* 0FA270 802D58C0 00641824 */ and $v1, $v1, $a0
|
|
||||||
/* 0FA274 802D58C4 AC430000 */ sw $v1, ($v0)
|
|
||||||
.L802D58C8:
|
|
||||||
/* 0FA278 802D58C8 8FBF0018 */ lw $ra, 0x18($sp)
|
|
||||||
/* 0FA27C 802D58CC 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* 0FA280 802D58D0 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* 0FA284 802D58D4 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* 0FA288 802D58D8 03E00008 */ jr $ra
|
|
||||||
/* 0FA28C 802D58DC 27BD0020 */ addiu $sp, $sp, 0x20
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
|
|
||||||
glabel IsPlayerWithin
|
|
||||||
/* 0F9314 802D4964 27BDFFD0 */ addiu $sp, $sp, -0x30
|
|
||||||
/* 0F9318 802D4968 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* 0F931C 802D496C 0080882D */ daddu $s1, $a0, $zero
|
|
||||||
/* 0F9320 802D4970 AFB20018 */ sw $s2, 0x18($sp)
|
|
||||||
/* 0F9324 802D4974 3C12FE36 */ lui $s2, 0xfe36
|
|
||||||
/* 0F9328 802D4978 AFB3001C */ sw $s3, 0x1c($sp)
|
|
||||||
/* 0F932C 802D497C 3C138011 */ lui $s3, 0x8011
|
|
||||||
/* 0F9330 802D4980 2673EFC8 */ addiu $s3, $s3, -0x1038
|
|
||||||
/* 0F9334 802D4984 AFBF0020 */ sw $ra, 0x20($sp)
|
|
||||||
/* 0F9338 802D4988 AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* 0F933C 802D498C F7B40028 */ sdc1 $f20, 0x28($sp)
|
|
||||||
/* 0F9340 802D4990 8E30000C */ lw $s0, 0xc($s1)
|
|
||||||
/* 0F9344 802D4994 10A00010 */ beqz $a1, .L802D49D8
|
|
||||||
/* 0F9348 802D4998 36523C80 */ ori $s2, $s2, 0x3c80
|
|
||||||
/* 0F934C 802D499C 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F9350 802D49A0 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F9354 802D49A4 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0F9358 802D49A8 AE220070 */ sw $v0, 0x70($s1)
|
|
||||||
/* 0F935C 802D49AC 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F9360 802D49B0 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0F9364 802D49B4 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F9368 802D49B8 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F936C 802D49BC AE220074 */ sw $v0, 0x74($s1)
|
|
||||||
/* 0F9370 802D49C0 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* 0F9374 802D49C4 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* 0F9378 802D49C8 0C0B1EAF */ jal get_variable
|
|
||||||
/* 0F937C 802D49CC 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F9380 802D49D0 AE220078 */ sw $v0, 0x78($s1)
|
|
||||||
/* 0F9384 802D49D4 8E120000 */ lw $s2, ($s0)
|
|
||||||
.L802D49D8:
|
|
||||||
/* 0F9388 802D49D8 C6220070 */ lwc1 $f2, 0x70($s1)
|
|
||||||
/* 0F938C 802D49DC 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* 0F9390 802D49E0 44061000 */ mfc1 $a2, $f2
|
|
||||||
/* 0F9394 802D49E4 C6220074 */ lwc1 $f2, 0x74($s1)
|
|
||||||
/* 0F9398 802D49E8 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* 0F939C 802D49EC C66C0028 */ lwc1 $f12, 0x28($s3)
|
|
||||||
/* 0F93A0 802D49F0 C66E0030 */ lwc1 $f14, 0x30($s3)
|
|
||||||
/* 0F93A4 802D49F4 44071000 */ mfc1 $a3, $f2
|
|
||||||
/* 0F93A8 802D49F8 0C00A7B5 */ jal dist2D
|
|
||||||
/* 0F93AC 802D49FC 00000000 */ nop
|
|
||||||
/* 0F93B0 802D4A00 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F93B4 802D4A04 0240282D */ daddu $a1, $s2, $zero
|
|
||||||
/* 0F93B8 802D4A08 0000302D */ daddu $a2, $zero, $zero
|
|
||||||
/* 0F93BC 802D4A0C 0C0B2026 */ jal set_variable
|
|
||||||
/* 0F93C0 802D4A10 46000506 */ mov.s $f20, $f0
|
|
||||||
/* 0F93C4 802D4A14 C6200078 */ lwc1 $f0, 0x78($s1)
|
|
||||||
/* 0F93C8 802D4A18 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* 0F93CC 802D4A1C 4600A03C */ c.lt.s $f20, $f0
|
|
||||||
/* 0F93D0 802D4A20 00000000 */ nop
|
|
||||||
/* 0F93D4 802D4A24 45000004 */ bc1f .L802D4A38
|
|
||||||
/* 0F93D8 802D4A28 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* 0F93DC 802D4A2C 0240282D */ daddu $a1, $s2, $zero
|
|
||||||
/* 0F93E0 802D4A30 0C0B2026 */ jal set_variable
|
|
||||||
/* 0F93E4 802D4A34 24060001 */ addiu $a2, $zero, 1
|
|
||||||
.L802D4A38:
|
|
||||||
/* 0F93E8 802D4A38 8FBF0020 */ lw $ra, 0x20($sp)
|
|
||||||
/* 0F93EC 802D4A3C 8FB3001C */ lw $s3, 0x1c($sp)
|
|
||||||
/* 0F93F0 802D4A40 8FB20018 */ lw $s2, 0x18($sp)
|
|
||||||
/* 0F93F4 802D4A44 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* 0F93F8 802D4A48 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* 0F93FC 802D4A4C D7B40028 */ ldc1 $f20, 0x28($sp)
|
|
||||||
/* 0F9400 802D4A50 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* 0F9404 802D4A54 03E00008 */ jr $ra
|
|
||||||
/* 0F9408 802D4A58 27BD0030 */ addiu $sp, $sp, 0x30
|
|
||||||
|
|
17
asm/nonmatchings/code_f8f60_len_1560/func_802D5830.s
Normal file
17
asm/nonmatchings/code_f8f60_len_1560/func_802D5830.s
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.set noat # allow manual use of $at
|
||||||
|
.set noreorder # don't insert nops after branches
|
||||||
|
|
||||||
|
|
||||||
|
glabel func_802D5830
|
||||||
|
/* 0FA1E0 802D5830 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||||
|
/* 0FA1E4 802D5834 AFBF0010 */ sw $ra, 0x10($sp)
|
||||||
|
/* 0FA1E8 802D5838 8C82000C */ lw $v0, 0xc($a0)
|
||||||
|
/* 0FA1EC 802D583C 0C0B1EAF */ jal get_variable
|
||||||
|
/* 0FA1F0 802D5840 8C450000 */ lw $a1, ($v0)
|
||||||
|
/* 0FA1F4 802D5844 0C009C22 */ jal func_80027088
|
||||||
|
/* 0FA1F8 802D5848 0040202D */ daddu $a0, $v0, $zero
|
||||||
|
/* 0FA1FC 802D584C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||||
|
/* 0FA200 802D5850 24020002 */ addiu $v0, $zero, 2
|
||||||
|
/* 0FA204 802D5854 03E00008 */ jr $ra
|
||||||
|
/* 0FA208 802D5858 27BD0018 */ addiu $sp, $sp, 0x18
|
||||||
|
|
42
asm/nonmatchings/code_f8f60_len_1560/func_802D585C.s
Normal file
42
asm/nonmatchings/code_f8f60_len_1560/func_802D585C.s
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
.set noat # allow manual use of $at
|
||||||
|
.set noreorder # don't insert nops after branches
|
||||||
|
|
||||||
|
|
||||||
|
glabel func_802D585C
|
||||||
|
/* 0FA20C 802D585C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||||
|
/* 0FA210 802D5860 AFB10014 */ sw $s1, 0x14($sp)
|
||||||
|
/* 0FA214 802D5864 0080882D */ daddu $s1, $a0, $zero
|
||||||
|
/* 0FA218 802D5868 AFBF0018 */ sw $ra, 0x18($sp)
|
||||||
|
/* 0FA21C 802D586C AFB00010 */ sw $s0, 0x10($sp)
|
||||||
|
/* 0FA220 802D5870 8E30000C */ lw $s0, 0xc($s1)
|
||||||
|
/* 0FA224 802D5874 8E050000 */ lw $a1, ($s0)
|
||||||
|
/* 0FA228 802D5878 0C0B1EAF */ jal get_variable
|
||||||
|
/* 0FA22C 802D587C 26100004 */ addiu $s0, $s0, 4
|
||||||
|
/* 0FA230 802D5880 0220202D */ daddu $a0, $s1, $zero
|
||||||
|
/* 0FA234 802D5884 8E050000 */ lw $a1, ($s0)
|
||||||
|
/* 0FA238 802D5888 0C0B1EAF */ jal get_variable
|
||||||
|
/* 0FA23C 802D588C 0040802D */ daddu $s0, $v0, $zero
|
||||||
|
/* 0FA240 802D5890 12000007 */ beqz $s0, .L802D58B0
|
||||||
|
/* 0FA244 802D5894 0040202D */ daddu $a0, $v0, $zero
|
||||||
|
/* 0FA248 802D5898 3C03800A */ lui $v1, 0x800a
|
||||||
|
/* 0FA24C 802D589C 2463A650 */ addiu $v1, $v1, -0x59b0
|
||||||
|
/* 0FA250 802D58A0 8C620000 */ lw $v0, ($v1)
|
||||||
|
/* 0FA254 802D58A4 00441025 */ or $v0, $v0, $a0
|
||||||
|
/* 0FA258 802D58A8 080B5632 */ j .L802D58C8
|
||||||
|
/* 0FA25C 802D58AC AC620000 */ sw $v0, ($v1)
|
||||||
|
|
||||||
|
.L802D58B0:
|
||||||
|
/* 0FA260 802D58B0 3C02800A */ lui $v0, 0x800a
|
||||||
|
/* 0FA264 802D58B4 2442A650 */ addiu $v0, $v0, -0x59b0
|
||||||
|
/* 0FA268 802D58B8 8C430000 */ lw $v1, ($v0)
|
||||||
|
/* 0FA26C 802D58BC 00042027 */ nor $a0, $zero, $a0
|
||||||
|
/* 0FA270 802D58C0 00641824 */ and $v1, $v1, $a0
|
||||||
|
/* 0FA274 802D58C4 AC430000 */ sw $v1, ($v0)
|
||||||
|
.L802D58C8:
|
||||||
|
/* 0FA278 802D58C8 8FBF0018 */ lw $ra, 0x18($sp)
|
||||||
|
/* 0FA27C 802D58CC 8FB10014 */ lw $s1, 0x14($sp)
|
||||||
|
/* 0FA280 802D58D0 8FB00010 */ lw $s0, 0x10($sp)
|
||||||
|
/* 0FA284 802D58D4 24020002 */ addiu $v0, $zero, 2
|
||||||
|
/* 0FA288 802D58D8 03E00008 */ jr $ra
|
||||||
|
/* 0FA28C 802D58DC 27BD0020 */ addiu $sp, $sp, 0x20
|
||||||
|
|
@ -8,5 +8,6 @@
|
|||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
|
#include "si_vars.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,6 +33,9 @@ npc* get_npc_safe(NPC npcID);
|
|||||||
npc* get_npc_unsafe(NPC npcID);
|
npc* get_npc_unsafe(NPC npcID);
|
||||||
npc* resolve_npc(script_context* script, NPC npcID);
|
npc* resolve_npc(script_context* script, NPC npcID);
|
||||||
|
|
||||||
|
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
|
||||||
|
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
|
||||||
|
|
||||||
s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
|
s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
|
||||||
s32 set_music_track(s32 musicPlayer, s32 songID, s32 variation, s32 unk, s32 volume);
|
s32 set_music_track(s32 musicPlayer, s32 songID, s32 variation, s32 unk, s32 volume);
|
||||||
#endif
|
#endif
|
||||||
|
8
include/si_vars.h
Normal file
8
include/si_vars.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef _SI_VARS_H_
|
||||||
|
#define _SI_VARS_H
|
||||||
|
|
||||||
|
#define SI_VAR_0 0xFE363C80
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
#endif
|
@ -58,9 +58,9 @@ INCLUDE_ASM(code_42e0_len_1f60, get_player_normal_yaw);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_42e0_len_1f60, get_player_normal_pitch);
|
INCLUDE_ASM(code_42e0_len_1f60, get_player_normal_pitch);
|
||||||
|
|
||||||
INCLUDE_ASM(code_42e0_len_1f60, dist2D);
|
f32 INCLUDE_ASM(code_42e0_len_1f60, dist2D, f32 ax, f32 ay, f32 bx, f32 by);
|
||||||
|
|
||||||
INCLUDE_ASM(code_42e0_len_1f60, dist3D);
|
f32 INCLUDE_ASM(code_42e0_len_1f60, dist3D, f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
|
||||||
|
|
||||||
INCLUDE_ASM(code_42e0_len_1f60, add_vec2D_polar);
|
INCLUDE_ASM(code_42e0_len_1f60, add_vec2D_polar);
|
||||||
|
|
||||||
|
@ -82,11 +82,93 @@ s32 GetAngleToPlayer(script_context* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, AwaitPlayerApproach);
|
s32 AwaitPlayerApproach(script_context* script, s32 initialCall) {
|
||||||
|
bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
player_status* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, IsPlayerWithin);
|
s32* targetX = &script->functionTemp[0];
|
||||||
|
s32* targetZ = &script->functionTemp[1];
|
||||||
|
s32* distanceRequired = &script->functionTemp[2];
|
||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, AwaitPlayerLeave);
|
f32 distance;
|
||||||
|
|
||||||
|
if (initialCall) {
|
||||||
|
*targetX = get_variable(script, *ptrReadPos++);
|
||||||
|
*targetZ = get_variable(script, *ptrReadPos++);
|
||||||
|
*distanceRequired = get_variable(script, *ptrReadPos++);
|
||||||
|
}
|
||||||
|
|
||||||
|
distance = dist2D(
|
||||||
|
playerStatus->position.x, playerStatus->position.z,
|
||||||
|
*targetX, *targetZ
|
||||||
|
);
|
||||||
|
|
||||||
|
if (distance < *distanceRequired) {
|
||||||
|
return 2;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 IsPlayerWithin(script_context* script, s32 initialCall) {
|
||||||
|
bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
player_status* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
|
/* Function temporaries are redundant, stack should be used instead */
|
||||||
|
s32* targetX = &script->functionTemp[0];
|
||||||
|
s32* targetZ = &script->functionTemp[1];
|
||||||
|
s32* distanceRequired = &script->functionTemp[2];
|
||||||
|
|
||||||
|
f32 distance;
|
||||||
|
bytecode outVar = SI_VAR_0; /* Redundant */
|
||||||
|
|
||||||
|
if (initialCall) { /* Redundant condition, function always returns DONE */
|
||||||
|
*targetX = get_variable(script, *ptrReadPos++);
|
||||||
|
*targetZ = get_variable(script, *ptrReadPos++);
|
||||||
|
*distanceRequired = get_variable(script, *ptrReadPos++);
|
||||||
|
outVar = *ptrReadPos++;
|
||||||
|
}
|
||||||
|
|
||||||
|
distance = dist2D(
|
||||||
|
playerStatus->position.x, playerStatus->position.z,
|
||||||
|
*targetX, *targetZ
|
||||||
|
);
|
||||||
|
|
||||||
|
set_variable(script, outVar, 0);
|
||||||
|
if (distance < *distanceRequired) {
|
||||||
|
set_variable(script, outVar, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 AwaitPlayerLeave(script_context* script, s32 initialCall) {
|
||||||
|
bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
player_status* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
|
s32* targetX = &script->functionTemp[0];
|
||||||
|
s32* targetZ = &script->functionTemp[1];
|
||||||
|
s32* distanceRequired = &script->functionTemp[2];
|
||||||
|
|
||||||
|
f32 distance;
|
||||||
|
|
||||||
|
if (initialCall) {
|
||||||
|
*targetX = get_variable(script, *ptrReadPos++);
|
||||||
|
*targetZ = get_variable(script, *ptrReadPos++);
|
||||||
|
*distanceRequired = get_variable(script, *ptrReadPos++);
|
||||||
|
}
|
||||||
|
|
||||||
|
distance = dist2D(
|
||||||
|
playerStatus->position.x, playerStatus->position.z,
|
||||||
|
*targetX, *targetZ
|
||||||
|
);
|
||||||
|
|
||||||
|
if (distance > *distanceRequired) {
|
||||||
|
return 2;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, AddVectorPolar);
|
INCLUDE_ASM(code_f8f60_len_1560, AddVectorPolar);
|
||||||
|
|
||||||
@ -98,7 +180,23 @@ INCLUDE_ASM(code_f8f60_len_1560, LoadPath);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, GetNextPathPos);
|
INCLUDE_ASM(code_f8f60_len_1560, GetNextPathPos);
|
||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, GetDist2D);
|
s32 GetDist2D(script_context* script, s32 initialCall) {
|
||||||
|
bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
|
bytecode outVar = *ptrReadPos++;
|
||||||
|
set_float_variable(script, outVar, dist2D(
|
||||||
|
get_float_variable(script, *ptrReadPos++),
|
||||||
|
get_float_variable(script, *ptrReadPos++),
|
||||||
|
get_float_variable(script, *ptrReadPos++),
|
||||||
|
get_float_variable(script, *ptrReadPos++)
|
||||||
|
));
|
||||||
|
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
INCLUDE_ASM(code_f8f60_len_1560, func_802D5830);
|
||||||
|
|
||||||
|
INCLUDE_ASM(code_f8f60_len_1560, func_802D585C);
|
||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, SetValueByRef);
|
INCLUDE_ASM(code_f8f60_len_1560, SetValueByRef);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user