1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-01-14 04:07:06 +00:00

Matched EnMb and EnDoor (#510)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* ZAP2 stuff

* ZAP why

* ZAP again

* new matches

* format

* again

* Update src/overlays/actors/ovl_En_Door/z_en_door.c

* Update src/overlays/actors/ovl_En_Mb/z_en_mb.c

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
petrie911 2020-12-04 12:47:50 -06:00 committed by GitHub
parent e455a24876
commit 4beeedd116
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 720 deletions

View file

@ -1,187 +0,0 @@
glabel EnDoor_Idle
/* 00400 809FC5D0 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 00404 809FC5D4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00408 809FC5D8 AFA50044 */ sw $a1, 0x0044($sp)
/* 0040C 809FC5DC 848F001C */ lh $t7, 0x001C($a0) ## 0000001C
/* 00410 809FC5E0 8CA81C44 */ lw $t0, 0x1C44($a1) ## 00001C44
/* 00414 809FC5E4 AFA40040 */ sw $a0, 0x0040($sp)
/* 00418 809FC5E8 000FC1C3 */ sra $t8, $t7, 7
/* 0041C 809FC5EC 33190007 */ andi $t9, $t8, 0x0007 ## $t9 = 00000000
/* 00420 809FC5F0 AFB90038 */ sw $t9, 0x0038($sp)
/* 00424 809FC5F4 27A5002C */ addiu $a1, $sp, 0x002C ## $a1 = FFFFFFEC
/* 00428 809FC5F8 25060024 */ addiu $a2, $t0, 0x0024 ## $a2 = 00000024
/* 0042C 809FC5FC 0C00B6F4 */ jal func_8002DBD0
/* 00430 809FC600 AFA8003C */ sw $t0, 0x003C($sp)
/* 00434 809FC604 8FA70040 */ lw $a3, 0x0040($sp)
/* 00438 809FC608 3C0A80A0 */ lui $t2, %hi(EnDoor_Open) ## $t2 = 80A00000
/* 0043C 809FC60C 8FA8003C */ lw $t0, 0x003C($sp)
/* 00440 809FC610 90E90191 */ lbu $t1, 0x0191($a3) ## 00000191
/* 00444 809FC614 254AC9DC */ addiu $t2, $t2, %lo(EnDoor_Open) ## $t2 = 809FC9DC
/* 00448 809FC618 3C0580A0 */ lui $a1, %hi(D_809FCECC) ## $a1 = 80A00000
/* 0044C 809FC61C 1120002A */ beq $t1, $zero, .L809FC6C8
/* 00450 809FC620 8FA40044 */ lw $a0, 0x0044($sp)
/* 00454 809FC624 ACEA01D4 */ sw $t2, 0x01D4($a3) ## 000001D4
/* 00458 809FC628 8D0B067C */ lw $t3, 0x067C($t0) ## 0000067C
/* 0045C 809FC62C 24E4014C */ addiu $a0, $a3, 0x014C ## $a0 = 0000014C
/* 00460 809FC630 3C013FC0 */ lui $at, 0x3FC0 ## $at = 3FC00000
/* 00464 809FC634 000B6100 */ sll $t4, $t3, 4
/* 00468 809FC638 05830006 */ bgezl $t4, .L809FC654
/* 0046C 809FC63C 44810000 */ mtc1 $at, $f0 ## $f0 = 1.50
/* 00470 809FC640 3C013F40 */ lui $at, 0x3F40 ## $at = 3F400000
/* 00474 809FC644 44810000 */ mtc1 $at, $f0 ## $f0 = 0.75
/* 00478 809FC648 10000004 */ beq $zero, $zero, .L809FC65C
/* 0047C 809FC64C 90ED0190 */ lbu $t5, 0x0190($a3) ## 00000190
/* 00480 809FC650 44810000 */ mtc1 $at, $f0 ## $f0 = 0.75
.L809FC654:
/* 00484 809FC654 00000000 */ nop
/* 00488 809FC658 90ED0190 */ lbu $t5, 0x0190($a3) ## 00000190
.L809FC65C:
/* 0048C 809FC65C 44060000 */ mfc1 $a2, $f0
/* 00490 809FC660 AFA70040 */ sw $a3, 0x0040($sp)
/* 00494 809FC664 000D7080 */ sll $t6, $t5, 2
/* 00498 809FC668 00AE2821 */ addu $a1, $a1, $t6
/* 0049C 809FC66C 0C0294A7 */ jal SkelAnime_ChangeAnimPlaybackStop
/* 004A0 809FC670 8CA5CECC */ lw $a1, %lo(D_809FCECC)($a1)
/* 004A4 809FC674 8FA70040 */ lw $a3, 0x0040($sp)
/* 004A8 809FC678 3C038016 */ lui $v1, %hi(gSaveContext)
/* 004AC 809FC67C 2463E660 */ addiu $v1, %lo(gSaveContext)
/* 004B0 809FC680 84EF0196 */ lh $t7, 0x0196($a3) ## 00000196
/* 004B4 809FC684 51E00079 */ beql $t7, $zero, .L809FC86C
/* 004B8 809FC688 8FBF0014 */ lw $ra, 0x0014($sp)
/* 004BC 809FC68C 94781402 */ lhu $t8, 0x1402($v1) ## 8015FA62
/* 004C0 809FC690 8FA40044 */ lw $a0, 0x0044($sp)
/* 004C4 809FC694 00781021 */ addu $v0, $v1, $t8
/* 004C8 809FC698 805900BC */ lb $t9, 0x00BC($v0) ## 000000BC
/* 004CC 809FC69C 2729FFFF */ addiu $t1, $t9, 0xFFFF ## $t1 = FFFFFFFF
/* 004D0 809FC6A0 A04900BC */ sb $t1, 0x00BC($v0) ## 000000BC
/* 004D4 809FC6A4 84E5001C */ lh $a1, 0x001C($a3) ## 0000001C
/* 004D8 809FC6A8 AFA70040 */ sw $a3, 0x0040($sp)
/* 004DC 809FC6AC 0C00B2DD */ jal Flags_SetSwitch
/* 004E0 809FC6B0 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 004E4 809FC6B4 8FA40040 */ lw $a0, 0x0040($sp)
/* 004E8 809FC6B8 0C00BE0A */ jal Audio_PlayActorSound2
/* 004EC 809FC6BC 2405287C */ addiu $a1, $zero, 0x287C ## $a1 = 0000287C
/* 004F0 809FC6C0 1000006A */ beq $zero, $zero, .L809FC86C
/* 004F4 809FC6C4 8FBF0014 */ lw $ra, 0x0014($sp)
.L809FC6C8:
/* 004F8 809FC6C8 AFA70040 */ sw $a3, 0x0040($sp)
/* 004FC 809FC6CC 0C023A62 */ jal Player_InCsMode
/* 00500 809FC6D0 AFA8003C */ sw $t0, 0x003C($sp)
/* 00504 809FC6D4 8FA70040 */ lw $a3, 0x0040($sp)
/* 00508 809FC6D8 14400063 */ bne $v0, $zero, .L809FC868
/* 0050C 809FC6DC 8FA8003C */ lw $t0, 0x003C($sp)
/* 00510 809FC6E0 C7A00030 */ lwc1 $f0, 0x0030($sp)
/* 00514 809FC6E4 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 00518 809FC6E8 44811000 */ mtc1 $at, $f2 ## $f2 = 20.00
/* 0051C 809FC6EC 46000005 */ abs.s $f0, $f0
/* 00520 809FC6F0 8FA90038 */ lw $t1, 0x0038($sp)
/* 00524 809FC6F4 4602003C */ c.lt.s $f0, $f2
/* 00528 809FC6F8 C7A0002C */ lwc1 $f0, 0x002C($sp)
/* 0052C 809FC6FC 4502004F */ bc1fl .L809FC83C
/* 00530 809FC700 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 00534 809FC704 46000005 */ abs.s $f0, $f0
/* 00538 809FC708 C7A40034 */ lwc1 $f4, 0x0034($sp)
/* 0053C 809FC70C 4602003C */ c.lt.s $f0, $f2
/* 00540 809FC710 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00544 809FC714 45020049 */ bc1fl .L809FC83C
/* 00548 809FC718 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 0054C 809FC71C 44813000 */ mtc1 $at, $f6 ## $f6 = 0.00
/* 00550 809FC720 46002005 */ abs.s $f0, $f4
/* 00554 809FC724 4606003C */ c.lt.s $f0, $f6
/* 00558 809FC728 00000000 */ nop
/* 0055C 809FC72C 45020043 */ bc1fl .L809FC83C
/* 00560 809FC730 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 00564 809FC734 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 00568 809FC738 850A00B6 */ lh $t2, 0x00B6($t0) ## 000000B6
/* 0056C 809FC73C 84EB00B6 */ lh $t3, 0x00B6($a3) ## 000000B6
/* 00570 809FC740 4604003C */ c.lt.s $f0, $f4
/* 00574 809FC744 340C8000 */ ori $t4, $zero, 0x8000 ## $t4 = 00008000
/* 00578 809FC748 014B1023 */ subu $v0, $t2, $t3
/* 0057C 809FC74C 00021400 */ sll $v0, $v0, 16
/* 00580 809FC750 45000004 */ bc1f .L809FC764
/* 00584 809FC754 00021403 */ sra $v0, $v0, 16
/* 00588 809FC758 01821023 */ subu $v0, $t4, $v0
/* 0058C 809FC75C 00021400 */ sll $v0, $v0, 16
/* 00590 809FC760 00021403 */ sra $v0, $v0, 16
.L809FC764:
/* 00594 809FC764 04400003 */ bltz $v0, .L809FC774
/* 00598 809FC768 00021823 */ subu $v1, $zero, $v0
/* 0059C 809FC76C 10000001 */ beq $zero, $zero, .L809FC774
/* 005A0 809FC770 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
.L809FC774:
/* 005A4 809FC774 28613000 */ slti $at, $v1, 0x3000
/* 005A8 809FC778 5020003C */ beql $at, $zero, .L809FC86C
/* 005AC 809FC77C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 005B0 809FC780 84ED0196 */ lh $t5, 0x0196($a3) ## 00000196
/* 005B4 809FC784 3C038016 */ lui $v1, %hi(gSaveContext)
/* 005B8 809FC788 2463E660 */ addiu $v1, %lo(gSaveContext)
/* 005BC 809FC78C 51A0000E */ beql $t5, $zero, .L809FC7C8
/* 005C0 809FC790 8FAB0038 */ lw $t3, 0x0038($sp)
/* 005C4 809FC794 946E1402 */ lhu $t6, 0x1402($v1) ## 8015FA62
/* 005C8 809FC798 8FB90044 */ lw $t9, 0x0044($sp)
/* 005CC 809FC79C 240A000A */ addiu $t2, $zero, 0x000A ## $t2 = 0000000A
/* 005D0 809FC7A0 006E7821 */ addu $t7, $v1, $t6
/* 005D4 809FC7A4 81F800BC */ lb $t8, 0x00BC($t7) ## 000000BC
/* 005D8 809FC7A8 5F000006 */ bgtzl $t8, .L809FC7C4
/* 005DC 809FC7AC A50A042E */ sh $t2, 0x042E($t0) ## 0000042E
/* 005E0 809FC7B0 8F221C44 */ lw $v0, 0x1C44($t9) ## 00001C44
/* 005E4 809FC7B4 2409FDFD */ addiu $t1, $zero, 0xFDFD ## $t1 = FFFFFDFD
/* 005E8 809FC7B8 1000002B */ beq $zero, $zero, .L809FC868
/* 005EC 809FC7BC A4490690 */ sh $t1, 0x0690($v0) ## 00000690
/* 005F0 809FC7C0 A50A042E */ sh $t2, 0x042E($t0) ## 0000042E
.L809FC7C4:
/* 005F4 809FC7C4 8FAB0038 */ lw $t3, 0x0038($sp)
.L809FC7C8:
/* 005F8 809FC7C8 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 005FC 809FC7CC 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001
/* 00600 809FC7D0 15610003 */ bne $t3, $at, .L809FC7E0
/* 00604 809FC7D4 240CFFFF */ addiu $t4, $zero, 0xFFFF ## $t4 = FFFFFFFF
/* 00608 809FC7D8 10000002 */ beq $zero, $zero, .L809FC7E4
/* 0060C 809FC7DC A10C042C */ sb $t4, 0x042C($t0) ## 0000042C
.L809FC7E0:
/* 00610 809FC7E0 A10D042C */ sb $t5, 0x042C($t0) ## 0000042C
.L809FC7E4:
/* 00614 809FC7E4 C7A80034 */ lwc1 $f8, 0x0034($sp)
/* 00618 809FC7E8 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000
/* 0061C 809FC7EC 4608003E */ c.le.s $f0, $f8
/* 00620 809FC7F0 00000000 */ nop
/* 00624 809FC7F4 45020009 */ bc1fl .L809FC81C
/* 00628 809FC7F8 44819000 */ mtc1 $at, $f18 ## $f18 = -1.00
/* 0062C 809FC7FC 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00630 809FC800 44815000 */ mtc1 $at, $f10 ## $f10 = 1.00
/* 00634 809FC804 00000000 */ nop
/* 00638 809FC808 4600540D */ trunc.w.s $f16, $f10
/* 0063C 809FC80C 440F8000 */ mfc1 $t7, $f16
/* 00640 809FC810 10000007 */ beq $zero, $zero, .L809FC830
/* 00644 809FC814 A10F042D */ sb $t7, 0x042D($t0) ## 0000042D
/* 00648 809FC818 44819000 */ mtc1 $at, $f18 ## $f18 = 1.00
.L809FC81C:
/* 0064C 809FC81C 00000000 */ nop
/* 00650 809FC820 4600918D */ trunc.w.s $f6, $f18
/* 00654 809FC824 44193000 */ mfc1 $t9, $f6
/* 00658 809FC828 00000000 */ nop
/* 0065C 809FC82C A119042D */ sb $t9, 0x042D($t0) ## 0000042D
.L809FC830:
/* 00660 809FC830 1000000D */ beq $zero, $zero, .L809FC868
/* 00664 809FC834 AD070430 */ sw $a3, 0x0430($t0) ## 00000430
/* 00668 809FC838 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
.L809FC83C:
/* 0066C 809FC83C 1521000A */ bne $t1, $at, .L809FC868
/* 00670 809FC840 3C014370 */ lui $at, 0x4370 ## $at = 43700000
/* 00674 809FC844 44812000 */ mtc1 $at, $f4 ## $f4 = 240.00
/* 00678 809FC848 C4E80090 */ lwc1 $f8, 0x0090($a3) ## 00000090
/* 0067C 809FC84C 3C0A80A0 */ lui $t2, %hi(EnDoor_AjarOpen) ## $t2 = 80A00000
/* 00680 809FC850 254AC928 */ addiu $t2, $t2, %lo(EnDoor_AjarOpen) ## $t2 = 809FC928
/* 00684 809FC854 4608203C */ c.lt.s $f4, $f8
/* 00688 809FC858 00000000 */ nop
/* 0068C 809FC85C 45020003 */ bc1fl .L809FC86C
/* 00690 809FC860 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00694 809FC864 ACEA01D4 */ sw $t2, 0x01D4($a3) ## 000001D4
.L809FC868:
/* 00698 809FC868 8FBF0014 */ lw $ra, 0x0014($sp)
.L809FC86C:
/* 0069C 809FC86C 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 006A0 809FC870 03E00008 */ jr $ra
/* 006A4 809FC874 00000000 */ nop

View file

@ -1,222 +0,0 @@
glabel func_80AA74BC
/* 0146C 80AA74BC 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0
/* 01470 80AA74C0 AFBF0034 */ sw $ra, 0x0034($sp)
/* 01474 80AA74C4 AFB00030 */ sw $s0, 0x0030($sp)
/* 01478 80AA74C8 AFA50054 */ sw $a1, 0x0054($sp)
/* 0147C 80AA74CC 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 01480 80AA74D0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 01484 80AA74D4 8C430680 */ lw $v1, 0x0680($v0) ## 00000680
/* 01488 80AA74D8 306F0080 */ andi $t7, $v1, 0x0080 ## $t7 = 00000000
/* 0148C 80AA74DC 51E00012 */ beql $t7, $zero, .L80AA7528
/* 01490 80AA74E0 96090088 */ lhu $t1, 0x0088($s0) ## 00000088
/* 01494 80AA74E4 8C580118 */ lw $t8, 0x0118($v0) ## 00000118
/* 01498 80AA74E8 3C014080 */ lui $at, 0x4080 ## $at = 40800000
/* 0149C 80AA74EC 240800C8 */ addiu $t0, $zero, 0x00C8 ## $t0 = 000000C8
/* 014A0 80AA74F0 1498000C */ bne $a0, $t8, .L80AA7524
/* 014A4 80AA74F4 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 014A8 80AA74F8 44810000 */ mtc1 $at, $f0 ## $f0 = 4.00
/* 014AC 80AA74FC 2401FF7F */ addiu $at, $zero, 0xFF7F ## $at = FFFFFF7F
/* 014B0 80AA7500 0061C824 */ and $t9, $v1, $at
/* 014B4 80AA7504 AC590680 */ sw $t9, 0x0680($v0) ## 00000680
/* 014B8 80AA7508 AC400118 */ sw $zero, 0x0118($v0) ## 00000118
/* 014BC 80AA750C A4480850 */ sh $t0, 0x0850($v0) ## 00000850
/* 014C0 80AA7510 86070032 */ lh $a3, 0x0032($s0) ## 00000032
/* 014C4 80AA7514 44060000 */ mfc1 $a2, $f0
/* 014C8 80AA7518 8FA40054 */ lw $a0, 0x0054($sp)
/* 014CC 80AA751C 0C00BDC7 */ jal func_8002F71C
/* 014D0 80AA7520 E7A00010 */ swc1 $f0, 0x0010($sp)
.L80AA7524:
/* 014D4 80AA7524 96090088 */ lhu $t1, 0x0088($s0) ## 00000088
.L80AA7528:
/* 014D8 80AA7528 26040068 */ addiu $a0, $s0, 0x0068 ## $a0 = 00000068
/* 014DC 80AA752C 312A0001 */ andi $t2, $t1, 0x0001 ## $t2 = 00000000
/* 014E0 80AA7530 514000A3 */ beql $t2, $zero, .L80AA77C0
/* 014E4 80AA7534 8FBF0034 */ lw $ra, 0x0034($sp)
/* 014E8 80AA7538 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 014EC 80AA753C 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
/* 014F0 80AA7540 3C073FC0 */ lui $a3, 0x3FC0 ## $a3 = 3FC00000
/* 014F4 80AA7544 44050000 */ mfc1 $a1, $f0
/* 014F8 80AA7548 0C01E0C4 */ jal Math_SmoothScaleMaxMinF
/* 014FC 80AA754C E7A00010 */ swc1 $f0, 0x0010($sp)
/* 01500 80AA7550 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 01504 80AA7554 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00
/* 01508 80AA7558 C6060068 */ lwc1 $f6, 0x0068($s0) ## 00000068
/* 0150C 80AA755C 3C014080 */ lui $at, 0x4080 ## $at = 40800000
/* 01510 80AA7560 8FA40054 */ lw $a0, 0x0054($sp)
/* 01514 80AA7564 4606203C */ c.lt.s $f4, $f6
/* 01518 80AA7568 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 0151C 80AA756C 26060024 */ addiu $a2, $s0, 0x0024 ## $a2 = 00000024
/* 01520 80AA7570 3C0740A0 */ lui $a3, 0x40A0 ## $a3 = 40A00000
/* 01524 80AA7574 4500000A */ bc1f .L80AA75A0
/* 01528 80AA7578 240B0003 */ addiu $t3, $zero, 0x0003 ## $t3 = 00000003
/* 0152C 80AA757C 44814000 */ mtc1 $at, $f8 ## $f8 = 4.00
/* 01530 80AA7580 240C0064 */ addiu $t4, $zero, 0x0064 ## $t4 = 00000064
/* 01534 80AA7584 240D000F */ addiu $t5, $zero, 0x000F ## $t5 = 0000000F
/* 01538 80AA7588 AFAD001C */ sw $t5, 0x001C($sp)
/* 0153C 80AA758C AFAC0018 */ sw $t4, 0x0018($sp)
/* 01540 80AA7590 AFAB0010 */ sw $t3, 0x0010($sp)
/* 01544 80AA7594 AFA00020 */ sw $zero, 0x0020($sp)
/* 01548 80AA7598 0C00CC98 */ jal func_80033260
/* 0154C 80AA759C E7A80014 */ swc1 $f8, 0x0014($sp)
.L80AA75A0:
/* 01550 80AA75A0 860E032A */ lh $t6, 0x032A($s0) ## 0000032A
/* 01554 80AA75A4 51C00056 */ beql $t6, $zero, .L80AA7700
/* 01558 80AA75A8 2604018C */ addiu $a0, $s0, 0x018C ## $a0 = 0000018C
/* 0155C 80AA75AC 860F032E */ lh $t7, 0x032E($s0) ## 0000032E
/* 01560 80AA75B0 3C014320 */ lui $at, 0x4320 ## $at = 43200000
/* 01564 80AA75B4 25F8FFFF */ addiu $t8, $t7, 0xFFFF ## $t8 = FFFFFFFF
/* 01568 80AA75B8 A618032E */ sh $t8, 0x032E($s0) ## 0000032E
/* 0156C 80AA75BC 8619032E */ lh $t9, 0x032E($s0) ## 0000032E
/* 01570 80AA75C0 57200042 */ bnel $t9, $zero, .L80AA76CC
/* 01574 80AA75C4 44815000 */ mtc1 $at, $f10 ## $f10 = 160.00
/* 01578 80AA75C8 C6000094 */ lwc1 $f0, 0x0094($s0) ## 00000094
/* 0157C 80AA75CC 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00
/* 01580 80AA75D0 860800B6 */ lh $t0, 0x00B6($s0) ## 000000B6
/* 01584 80AA75D4 8609008A */ lh $t1, 0x008A($s0) ## 0000008A
/* 01588 80AA75D8 4600503E */ c.le.s $f10, $f0
/* 0158C 80AA75DC 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 01590 80AA75E0 01091823 */ subu $v1, $t0, $t1
/* 01594 80AA75E4 00031C00 */ sll $v1, $v1, 16
/* 01598 80AA75E8 45000003 */ bc1f .L80AA75F8
/* 0159C 80AA75EC 00031C03 */ sra $v1, $v1, 16
/* 015A0 80AA75F0 10000002 */ beq $zero, $zero, .L80AA75FC
/* 015A4 80AA75F4 46000086 */ mov.s $f2, $f0
.L80AA75F8:
/* 015A8 80AA75F8 46000087 */ neg.s $f2, $f0
.L80AA75FC:
/* 015AC 80AA75FC 44818000 */ mtc1 $at, $f16 ## $f16 = 20.00
/* 015B0 80AA7600 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 015B4 80AA7604 8FA50054 */ lw $a1, 0x0054($sp)
/* 015B8 80AA7608 4610103E */ c.le.s $f2, $f16
/* 015BC 80AA760C 00000000 */ nop
/* 015C0 80AA7610 45000016 */ bc1f .L80AA766C
/* 015C4 80AA7614 00000000 */ nop
/* 015C8 80AA7618 0C2A994B */ jal func_80AA652C
/* 015CC 80AA761C A7A30046 */ sh $v1, 0x0046($sp)
/* 015D0 80AA7620 10400012 */ beq $v0, $zero, .L80AA766C
/* 015D4 80AA7624 87A30046 */ lh $v1, 0x0046($sp)
/* 015D8 80AA7628 04600003 */ bltz $v1, .L80AA7638
/* 015DC 80AA762C 00031023 */ subu $v0, $zero, $v1
/* 015E0 80AA7630 10000001 */ beq $zero, $zero, .L80AA7638
/* 015E4 80AA7634 00601025 */ or $v0, $v1, $zero ## $v0 = 00000000
.L80AA7638:
/* 015E8 80AA7638 28414001 */ slti $at, $v0, 0x4001
/* 015EC 80AA763C 1020000B */ beq $at, $zero, .L80AA766C
/* 015F0 80AA7640 3C014348 */ lui $at, 0x4348 ## $at = 43480000
/* 015F4 80AA7644 44819000 */ mtc1 $at, $f18 ## $f18 = 200.00
/* 015F8 80AA7648 C6040090 */ lwc1 $f4, 0x0090($s0) ## 00000090
/* 015FC 80AA764C 4612203E */ c.le.s $f4, $f18
/* 01600 80AA7650 00000000 */ nop
/* 01604 80AA7654 45000005 */ bc1f .L80AA766C
/* 01608 80AA7658 00000000 */ nop
/* 0160C 80AA765C 0C2A9AB2 */ jal func_80AA6AC8
/* 01610 80AA7660 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 01614 80AA7664 10000026 */ beq $zero, $zero, .L80AA7700
/* 01618 80AA7668 2604018C */ addiu $a0, $s0, 0x018C ## $a0 = 0000018C
.L80AA766C:
/* 0161C 80AA766C 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000
/* 01620 80AA7670 0C028800 */ jal SkelAnime_GetFrameCount
/* 01624 80AA7674 24842C10 */ addiu $a0, $a0, 0x2C10 ## $a0 = 06002C10
/* 01628 80AA7678 44823000 */ mtc1 $v0, $f6 ## $f6 = 0.00
/* 0162C 80AA767C 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 01630 80AA7680 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000
/* 01634 80AA7684 468031A0 */ cvt.s.w $f6, $f6
/* 01638 80AA7688 240A0002 */ addiu $t2, $zero, 0x0002 ## $t2 = 00000002
/* 0163C 80AA768C AFAA0014 */ sw $t2, 0x0014($sp)
/* 01640 80AA7690 24A52C10 */ addiu $a1, $a1, 0x2C10 ## $a1 = 06002C10
/* 01644 80AA7694 2604018C */ addiu $a0, $s0, 0x018C ## $a0 = 0000018C
/* 01648 80AA7698 3C06BF80 */ lui $a2, 0xBF80 ## $a2 = BF800000
/* 0164C 80AA769C 44073000 */ mfc1 $a3, $f6
/* 01650 80AA76A0 E7A00010 */ swc1 $f0, 0x0010($sp)
/* 01654 80AA76A4 0C029468 */ jal SkelAnime_ChangeAnim
/* 01658 80AA76A8 E7A00018 */ swc1 $f0, 0x0018($sp)
/* 0165C 80AA76AC 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 01660 80AA76B0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 01664 80AA76B4 240538BD */ addiu $a1, $zero, 0x38BD ## $a1 = 000038BD
/* 01668 80AA76B8 0C00BE0A */ jal Audio_PlayActorSound2
/* 0166C 80AA76BC E6080068 */ swc1 $f8, 0x0068($s0) ## 00000068
/* 01670 80AA76C0 1000000F */ beq $zero, $zero, .L80AA7700
/* 01674 80AA76C4 2604018C */ addiu $a0, $s0, 0x018C ## $a0 = 0000018C
/* 01678 80AA76C8 44815000 */ mtc1 $at, $f10 ## $f10 = 0.00
.L80AA76CC:
/* 0167C 80AA76CC C6100090 */ lwc1 $f16, 0x0090($s0) ## 00000090
/* 01680 80AA76D0 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000
/* 01684 80AA76D4 460A803E */ c.le.s $f16, $f10
/* 01688 80AA76D8 00000000 */ nop
/* 0168C 80AA76DC 45020005 */ bc1fl .L80AA76F4
/* 01690 80AA76E0 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 01694 80AA76E4 44819000 */ mtc1 $at, $f18 ## $f18 = -5.00
/* 01698 80AA76E8 10000004 */ beq $zero, $zero, .L80AA76FC
/* 0169C 80AA76EC E6120068 */ swc1 $f18, 0x0068($s0) ## 00000068
/* 016A0 80AA76F0 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
.L80AA76F4:
/* 016A4 80AA76F4 00000000 */ nop
/* 016A8 80AA76F8 E6040068 */ swc1 $f4, 0x0068($s0) ## 00000068
.L80AA76FC:
/* 016AC 80AA76FC 2604018C */ addiu $a0, $s0, 0x018C ## $a0 = 0000018C
.L80AA7700:
/* 016B0 80AA7700 0C02927F */ jal SkelAnime_FrameUpdateMatrix
/* 016B4 80AA7704 AFA40038 */ sw $a0, 0x0038($sp)
/* 016B8 80AA7708 5040002D */ beql $v0, $zero, .L80AA77C0
/* 016BC 80AA770C 8FBF0034 */ lw $ra, 0x0034($sp)
/* 016C0 80AA7710 860B032A */ lh $t3, 0x032A($s0) ## 0000032A
/* 016C4 80AA7714 26040024 */ addiu $a0, $s0, 0x0024 ## $a0 = 00000024
/* 016C8 80AA7718 15600014 */ bne $t3, $zero, .L80AA776C
/* 016CC 80AA771C 00000000 */ nop
/* 016D0 80AA7720 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000
/* 016D4 80AA7724 0C028800 */ jal SkelAnime_GetFrameCount
/* 016D8 80AA7728 24842F10 */ addiu $a0, $a0, 0x2F10 ## $a0 = 06002F10
/* 016DC 80AA772C 44823000 */ mtc1 $v0, $f6 ## $f6 = 0.00
/* 016E0 80AA7730 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 016E4 80AA7734 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000
/* 016E8 80AA7738 46803220 */ cvt.s.w $f8, $f6
/* 016EC 80AA773C 240C0001 */ addiu $t4, $zero, 0x0001 ## $t4 = 00000001
/* 016F0 80AA7740 44070000 */ mfc1 $a3, $f0
/* 016F4 80AA7744 AFAC0014 */ sw $t4, 0x0014($sp)
/* 016F8 80AA7748 24A52F10 */ addiu $a1, $a1, 0x2F10 ## $a1 = 06002F10
/* 016FC 80AA774C 8FA40038 */ lw $a0, 0x0038($sp)
/* 01700 80AA7750 E7A80010 */ swc1 $f8, 0x0010($sp)
/* 01704 80AA7754 3C063F00 */ lui $a2, 0x3F00 ## $a2 = 3F000000
/* 01708 80AA7758 0C029468 */ jal SkelAnime_ChangeAnim
/* 0170C 80AA775C E7A00018 */ swc1 $f0, 0x0018($sp)
/* 01710 80AA7760 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001
/* 01714 80AA7764 10000015 */ beq $zero, $zero, .L80AA77BC
/* 01718 80AA7768 A60D032A */ sh $t5, 0x032A($s0) ## 0000032A
.L80AA776C:
/* 0171C 80AA776C 0C01E01A */ jal Math_Vec3f_Yaw
/* 01720 80AA7770 26050344 */ addiu $a1, $s0, 0x0344 ## $a1 = 00000344
/* 01724 80AA7774 860E008A */ lh $t6, 0x008A($s0) ## 0000008A
/* 01728 80AA7778 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0172C 80AA777C 004E1823 */ subu $v1, $v0, $t6
/* 01730 80AA7780 00031C00 */ sll $v1, $v1, 16
/* 01734 80AA7784 00031C03 */ sra $v1, $v1, 16
/* 01738 80AA7788 04600003 */ bltz $v1, .L80AA7798
/* 0173C 80AA778C 00031023 */ subu $v0, $zero, $v1
/* 01740 80AA7790 10000001 */ beq $zero, $zero, .L80AA7798
/* 01744 80AA7794 00601025 */ or $v0, $v1, $zero ## $v0 = 00000000
.L80AA7798:
/* 01748 80AA7798 28414001 */ slti $at, $v0, 0x4001
/* 0174C 80AA779C 10200005 */ beq $at, $zero, .L80AA77B4
/* 01750 80AA77A0 00000000 */ nop
/* 01754 80AA77A4 0C2A9A3F */ jal func_80AA68FC
/* 01758 80AA77A8 8FA50054 */ lw $a1, 0x0054($sp)
/* 0175C 80AA77AC 10000004 */ beq $zero, $zero, .L80AA77C0
/* 01760 80AA77B0 8FBF0034 */ lw $ra, 0x0034($sp)
.L80AA77B4:
/* 01764 80AA77B4 0C2A9A86 */ jal func_80AA6A18
/* 01768 80AA77B8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80AA77BC:
/* 0176C 80AA77BC 8FBF0034 */ lw $ra, 0x0034($sp)
.L80AA77C0:
/* 01770 80AA77C0 8FB00030 */ lw $s0, 0x0030($sp)
/* 01774 80AA77C4 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000
/* 01778 80AA77C8 03E00008 */ jr $ra
/* 0177C 80AA77CC 00000000 */ nop

View file

@ -1,234 +0,0 @@
.late_rodata
glabel D_80AA9E8C
.float 0.7
.text
glabel func_80AA87D8
/* 02788 80AA87D8 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0
/* 0278C 80AA87DC AFBF0024 */ sw $ra, 0x0024($sp)
/* 02790 80AA87E0 AFB00020 */ sw $s0, 0x0020($sp)
/* 02794 80AA87E4 8CAE1C44 */ lw $t6, 0x1C44($a1) ## 00001C44
/* 02798 80AA87E8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0279C 80AA87EC 3C053F19 */ lui $a1, 0x3F19 ## $a1 = 3F190000
/* 027A0 80AA87F0 AFAE003C */ sw $t6, 0x003C($sp)
/* 027A4 80AA87F4 849800B6 */ lh $t8, 0x00B6($a0) ## 000000B6
/* 027A8 80AA87F8 848F008A */ lh $t7, 0x008A($a0) ## 0000008A
/* 027AC 80AA87FC 26040068 */ addiu $a0, $s0, 0x0068 ## $a0 = 00000068
/* 027B0 80AA8800 34A59999 */ ori $a1, $a1, 0x9999 ## $a1 = 3F199999
/* 027B4 80AA8804 01F81823 */ subu $v1, $t7, $t8
/* 027B8 80AA8808 00031C00 */ sll $v1, $v1, 16
/* 027BC 80AA880C 00031C03 */ sra $v1, $v1, 16
/* 027C0 80AA8810 04610004 */ bgez $v1, .L80AA8824
/* 027C4 80AA8814 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000
/* 027C8 80AA8818 00031823 */ subu $v1, $zero, $v1
/* 027CC 80AA881C 00031C00 */ sll $v1, $v1, 16
/* 027D0 80AA8820 00031C03 */ sra $v1, $v1, 16
.L80AA8824:
/* 027D4 80AA8824 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 027D8 80AA8828 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD
/* 027DC 80AA882C 3C073F80 */ lui $a3, 0x3F80 ## $a3 = 3F800000
/* 027E0 80AA8830 A7A3003A */ sh $v1, 0x003A($sp)
/* 027E4 80AA8834 0C01E0C4 */ jal Math_SmoothScaleMaxMinF
/* 027E8 80AA8838 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 027EC 80AA883C C60801A4 */ lwc1 $f8, 0x01A4($s0) ## 000001A4
/* 027F0 80AA8840 C6060068 */ lwc1 $f6, 0x0068($s0) ## 00000068
/* 027F4 80AA8844 2604018C */ addiu $a0, $s0, 0x018C ## $a0 = 0000018C
/* 027F8 80AA8848 4600428D */ trunc.w.s $f10, $f8
/* 027FC 80AA884C E60601A8 */ swc1 $f6, 0x01A8($s0) ## 000001A8
/* 02800 80AA8850 44085000 */ mfc1 $t0, $f10
/* 02804 80AA8854 0C02927F */ jal SkelAnime_FrameUpdateMatrix
/* 02808 80AA8858 AFA8004C */ sw $t0, 0x004C($sp)
/* 0280C 80AA885C 44801000 */ mtc1 $zero, $f2 ## $f2 = 0.00
/* 02810 80AA8860 C60001A8 */ lwc1 $f0, 0x01A8($s0) ## 000001A8
/* 02814 80AA8864 87A3003A */ lh $v1, 0x003A($sp)
/* 02818 80AA8868 26040008 */ addiu $a0, $s0, 0x0008 ## $a0 = 00000008
/* 0281C 80AA886C 4600103E */ c.le.s $f2, $f0
/* 02820 80AA8870 00000000 */ nop
/* 02824 80AA8874 45020004 */ bc1fl .L80AA8888
/* 02828 80AA8878 46000407 */ neg.s $f16, $f0
/* 0282C 80AA887C 10000003 */ beq $zero, $zero, .L80AA888C
/* 02830 80AA8880 E7A00034 */ swc1 $f0, 0x0034($sp)
/* 02834 80AA8884 46000407 */ neg.s $f16, $f0
.L80AA8888:
/* 02838 80AA8888 E7B00034 */ swc1 $f16, 0x0034($sp)
.L80AA888C:
/* 0283C 80AA888C C61201A4 */ lwc1 $f18, 0x01A4($s0) ## 000001A4
/* 02840 80AA8890 C7A40034 */ lwc1 $f4, 0x0034($sp)
/* 02844 80AA8894 4600103E */ c.le.s $f2, $f0
/* 02848 80AA8898 46049181 */ sub.s $f6, $f18, $f4
/* 0284C 80AA889C 4600320D */ trunc.w.s $f8, $f6
/* 02850 80AA88A0 440A4000 */ mfc1 $t2, $f8
/* 02854 80AA88A4 45000003 */ bc1f .L80AA88B4
/* 02858 80AA88A8 AFAA0048 */ sw $t2, 0x0048($sp)
/* 0285C 80AA88AC 10000003 */ beq $zero, $zero, .L80AA88BC
/* 02860 80AA88B0 E7A00034 */ swc1 $f0, 0x0034($sp)
.L80AA88B4:
/* 02864 80AA88B4 46000287 */ neg.s $f10, $f0
/* 02868 80AA88B8 E7AA0034 */ swc1 $f10, 0x0034($sp)
.L80AA88BC:
/* 0286C 80AA88BC 860B032E */ lh $t3, 0x032E($s0) ## 0000032E
/* 02870 80AA88C0 8FA5003C */ lw $a1, 0x003C($sp)
/* 02874 80AA88C4 15600020 */ bne $t3, $zero, .L80AA8948
/* 02878 80AA88C8 24A50024 */ addiu $a1, $a1, 0x0024 ## $a1 = 00000024
/* 0287C 80AA88CC 0C01E00A */ jal Math_Vec3f_DistXZ
/* 02880 80AA88D0 A7A3003A */ sh $v1, 0x003A($sp)
/* 02884 80AA88D4 C6100364 */ lwc1 $f16, 0x0364($s0) ## 00000364
/* 02888 80AA88D8 87A3003A */ lh $v1, 0x003A($sp)
/* 0288C 80AA88DC 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032
/* 02890 80AA88E0 4610003C */ c.lt.s $f0, $f16
/* 02894 80AA88E4 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 02898 80AA88E8 240702EE */ addiu $a3, $zero, 0x02EE ## $a3 = 000002EE
/* 0289C 80AA88EC 45020017 */ bc1fl .L80AA894C
/* 028A0 80AA88F0 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004
/* 028A4 80AA88F4 8605008A */ lh $a1, 0x008A($s0) ## 0000008A
/* 028A8 80AA88F8 A7A3003A */ sh $v1, 0x003A($sp)
/* 028AC 80AA88FC 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 028B0 80AA8900 AFA00010 */ sw $zero, 0x0010($sp)
/* 028B4 80AA8904 3C0143FA */ lui $at, 0x43FA ## $at = 43FA0000
/* 028B8 80AA8908 44812000 */ mtc1 $at, $f4 ## $f4 = 500.00
/* 028BC 80AA890C C6120090 */ lwc1 $f18, 0x0090($s0) ## 00000090
/* 028C0 80AA8910 8E0C0004 */ lw $t4, 0x0004($s0) ## 00000004
/* 028C4 80AA8914 87A3003A */ lh $v1, 0x003A($sp)
/* 028C8 80AA8918 4604903C */ c.lt.s $f18, $f4
/* 028CC 80AA891C 358D0001 */ ori $t5, $t4, 0x0001 ## $t5 = 00000001
/* 028D0 80AA8920 AE0D0004 */ sw $t5, 0x0004($s0) ## 00000004
/* 028D4 80AA8924 28611388 */ slti $at, $v1, 0x1388
/* 028D8 80AA8928 4502004B */ bc1fl .L80AA8A58
/* 028DC 80AA892C C60A01A4 */ lwc1 $f10, 0x01A4($s0) ## 000001A4
/* 028E0 80AA8930 50200049 */ beql $at, $zero, .L80AA8A58
/* 028E4 80AA8934 C60A01A4 */ lwc1 $f10, 0x01A4($s0) ## 000001A4
/* 028E8 80AA8938 0C2A9AB2 */ jal func_80AA6AC8
/* 028EC 80AA893C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 028F0 80AA8940 10000045 */ beq $zero, $zero, .L80AA8A58
/* 028F4 80AA8944 C60A01A4 */ lwc1 $f10, 0x01A4($s0) ## 000001A4
.L80AA8948:
/* 028F8 80AA8948 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004
.L80AA894C:
/* 028FC 80AA894C 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE
/* 02900 80AA8950 26040024 */ addiu $a0, $s0, 0x0024 ## $a0 = 00000024
/* 02904 80AA8954 01C17824 */ and $t7, $t6, $at
/* 02908 80AA8958 AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004
/* 0290C 80AA895C 26050008 */ addiu $a1, $s0, 0x0008 ## $a1 = 00000008
/* 02910 80AA8960 AFA50030 */ sw $a1, 0x0030($sp)
/* 02914 80AA8964 0C01E00A */ jal Math_Vec3f_DistXZ
/* 02918 80AA8968 AFA4002C */ sw $a0, 0x002C($sp)
/* 0291C 80AA896C C6060360 */ lwc1 $f6, 0x0360($s0) ## 00000360
/* 02920 80AA8970 8FA4002C */ lw $a0, 0x002C($sp)
/* 02924 80AA8974 8FA50030 */ lw $a1, 0x0030($sp)
/* 02928 80AA8978 4600303C */ c.lt.s $f6, $f0
/* 0292C 80AA897C 00000000 */ nop
/* 02930 80AA8980 45010004 */ bc1t .L80AA8994
/* 02934 80AA8984 00000000 */ nop
/* 02938 80AA8988 8603032C */ lh $v1, 0x032C($s0) ## 0000032C
/* 0293C 80AA898C 1060000B */ beq $v1, $zero, .L80AA89BC
/* 02940 80AA8990 00000000 */ nop
.L80AA8994:
/* 02944 80AA8994 0C01E01A */ jal Math_Vec3f_Yaw
/* 02948 80AA8998 00000000 */ nop
/* 0294C 80AA899C 00022C00 */ sll $a1, $v0, 16
/* 02950 80AA89A0 00052C03 */ sra $a1, $a1, 16
/* 02954 80AA89A4 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032
/* 02958 80AA89A8 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 0295C 80AA89AC 240702EE */ addiu $a3, $zero, 0x02EE ## $a3 = 000002EE
/* 02960 80AA89B0 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 02964 80AA89B4 AFA00010 */ sw $zero, 0x0010($sp)
/* 02968 80AA89B8 8603032C */ lh $v1, 0x032C($s0) ## 0000032C
.L80AA89BC:
/* 0296C 80AA89BC 10600002 */ beq $v1, $zero, .L80AA89C8
/* 02970 80AA89C0 2478FFFF */ addiu $t8, $v1, 0xFFFF ## $t8 = FFFFFFFF
/* 02974 80AA89C4 A618032C */ sh $t8, 0x032C($s0) ## 0000032C
.L80AA89C8:
/* 02978 80AA89C8 8602032E */ lh $v0, 0x032E($s0) ## 0000032E
/* 0297C 80AA89CC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 02980 80AA89D0 10400002 */ beq $v0, $zero, .L80AA89DC
/* 02984 80AA89D4 2459FFFF */ addiu $t9, $v0, 0xFFFF ## $t9 = FFFFFFFF
/* 02988 80AA89D8 A619032E */ sh $t9, 0x032E($s0) ## 0000032E
.L80AA89DC:
/* 0298C 80AA89DC 8608032C */ lh $t0, 0x032C($s0) ## 0000032C
/* 02990 80AA89E0 55000004 */ bnel $t0, $zero, .L80AA89F4
/* 02994 80AA89E4 8609032A */ lh $t1, 0x032A($s0) ## 0000032A
/* 02998 80AA89E8 0C00BE0A */ jal Audio_PlayActorSound2
/* 0299C 80AA89EC 240538BB */ addiu $a1, $zero, 0x38BB ## $a1 = 000038BB
/* 029A0 80AA89F0 8609032A */ lh $t1, 0x032A($s0) ## 0000032A
.L80AA89F4:
/* 029A4 80AA89F4 252AFFFF */ addiu $t2, $t1, 0xFFFF ## $t2 = FFFFFFFF
/* 029A8 80AA89F8 A60A032A */ sh $t2, 0x032A($s0) ## 0000032A
/* 029AC 80AA89FC 860B032A */ lh $t3, 0x032A($s0) ## 0000032A
/* 029B0 80AA8A00 55600015 */ bnel $t3, $zero, .L80AA8A58
/* 029B4 80AA8A04 C60A01A4 */ lwc1 $f10, 0x01A4($s0) ## 000001A4
/* 029B8 80AA8A08 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 029BC 80AA8A0C 00000000 */ nop
/* 029C0 80AA8A10 3C0180AB */ lui $at, %hi(D_80AA9E8C) ## $at = 80AB0000
/* 029C4 80AA8A14 C4289E8C */ lwc1 $f8, %lo(D_80AA9E8C)($at)
/* 029C8 80AA8A18 24040032 */ addiu $a0, $zero, 0x0032 ## $a0 = 00000032
/* 029CC 80AA8A1C 4600403C */ c.lt.s $f8, $f0
/* 029D0 80AA8A20 00000000 */ nop
/* 029D4 80AA8A24 45000009 */ bc1f .L80AA8A4C
/* 029D8 80AA8A28 00000000 */ nop
/* 029DC 80AA8A2C 0C01DF64 */ jal Math_Rand_S16Offset
/* 029E0 80AA8A30 24050046 */ addiu $a1, $zero, 0x0046 ## $a1 = 00000046
/* 029E4 80AA8A34 A602032A */ sh $v0, 0x032A($s0) ## 0000032A
/* 029E8 80AA8A38 2404000F */ addiu $a0, $zero, 0x000F ## $a0 = 0000000F
/* 029EC 80AA8A3C 0C01DF64 */ jal Math_Rand_S16Offset
/* 029F0 80AA8A40 24050028 */ addiu $a1, $zero, 0x0028 ## $a1 = 00000028
/* 029F4 80AA8A44 10000003 */ beq $zero, $zero, .L80AA8A54
/* 029F8 80AA8A48 A602032C */ sh $v0, 0x032C($s0) ## 0000032C
.L80AA8A4C:
/* 029FC 80AA8A4C 0C2A9A0C */ jal func_80AA6830
/* 02A00 80AA8A50 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80AA8A54:
/* 02A04 80AA8A54 C60A01A4 */ lwc1 $f10, 0x01A4($s0) ## 000001A4
.L80AA8A58:
/* 02A08 80AA8A58 8FA2004C */ lw $v0, 0x004C($sp)
/* 02A0C 80AA8A5C 8FAE0048 */ lw $t6, 0x0048($sp)
/* 02A10 80AA8A60 4600540D */ trunc.w.s $f16, $f10
/* 02A14 80AA8A64 29C10002 */ slti $at, $t6, 0x0002
/* 02A18 80AA8A68 440D8000 */ mfc1 $t5, $f16
/* 02A1C 80AA8A6C 00000000 */ nop
/* 02A20 80AA8A70 504D0018 */ beql $v0, $t5, .L80AA8AD4
/* 02A24 80AA8A74 860C0032 */ lh $t4, 0x0032($s0) ## 00000032
/* 02A28 80AA8A78 10200007 */ beq $at, $zero, .L80AA8A98
/* 02A2C 80AA8A7C C7B20034 */ lwc1 $f18, 0x0034($sp)
/* 02A30 80AA8A80 4600910D */ trunc.w.s $f4, $f18
/* 02A34 80AA8A84 44182000 */ mfc1 $t8, $f4
/* 02A38 80AA8A88 00000000 */ nop
/* 02A3C 80AA8A8C 0302C821 */ addu $t9, $t8, $v0
/* 02A40 80AA8A90 5F20000D */ bgtzl $t9, .L80AA8AC8
/* 02A44 80AA8A94 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80AA8A98:
/* 02A48 80AA8A98 8FA80048 */ lw $t0, 0x0048($sp)
/* 02A4C 80AA8A9C C7A60034 */ lwc1 $f6, 0x0034($sp)
/* 02A50 80AA8AA0 29010015 */ slti $at, $t0, 0x0015
/* 02A54 80AA8AA4 5020000B */ beql $at, $zero, .L80AA8AD4
/* 02A58 80AA8AA8 860C0032 */ lh $t4, 0x0032($s0) ## 00000032
/* 02A5C 80AA8AAC 4600320D */ trunc.w.s $f8, $f6
/* 02A60 80AA8AB0 440A4000 */ mfc1 $t2, $f8
/* 02A64 80AA8AB4 00000000 */ nop
/* 02A68 80AA8AB8 01425821 */ addu $t3, $t2, $v0
/* 02A6C 80AA8ABC 29610014 */ slti $at, $t3, 0x0014
/* 02A70 80AA8AC0 14200003 */ bne $at, $zero, .L80AA8AD0
/* 02A74 80AA8AC4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80AA8AC8:
/* 02A78 80AA8AC8 0C00BE0A */ jal Audio_PlayActorSound2
/* 02A7C 80AA8ACC 240538B8 */ addiu $a1, $zero, 0x38B8 ## $a1 = 000038B8
.L80AA8AD0:
/* 02A80 80AA8AD0 860C0032 */ lh $t4, 0x0032($s0) ## 00000032
.L80AA8AD4:
/* 02A84 80AA8AD4 A60C00B6 */ sh $t4, 0x00B6($s0) ## 000000B6
/* 02A88 80AA8AD8 8FBF0024 */ lw $ra, 0x0024($sp)
/* 02A8C 80AA8ADC 8FB00020 */ lw $s0, 0x0020($sp)
/* 02A90 80AA8AE0 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000
/* 02A94 80AA8AE4 03E00008 */ jr $ra
/* 02A98 80AA8AE8 00000000 */ nop

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_809FCF40
.incbin "baserom/ovl_En_Door", 0xD70, 0x000000F0

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_80AA9F00
.incbin "baserom/ovl_En_Mb", 0x3EB0, 0x00000350

8
spec
View file

@ -2186,11 +2186,7 @@ endseg
beginseg
name "ovl_En_Door"
include "build/src/overlays/actors/ovl_En_Door/z_en_door.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Door/ovl_En_Door_reloc.o"
#else
include "build/data/overlays/actors/z_en_door.reloc.o"
#endif
endseg
beginseg
@ -2715,11 +2711,7 @@ endseg
beginseg
name "ovl_En_Mb"
include "build/src/overlays/actors/ovl_En_Mb/z_en_mb.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Mb/ovl_En_Mb_reloc.o"
#else
include "build/data/overlays/actors/z_en_mb.reloc.o"
#endif
endseg
beginseg

View file

@ -222,10 +222,12 @@ ItemEquips sDebugSaveEquips = {
};
Inventory sDebugSaveInventory = {
{ ITEM_STICK, ITEM_NUT, ITEM_BOMB, ITEM_BOW, ITEM_ARROW_FIRE, ITEM_DINS_FIRE,
ITEM_SLINGSHOT, ITEM_OCARINA_FAIRY, ITEM_BOMBCHU, ITEM_HOOKSHOT, ITEM_ARROW_ICE, ITEM_FARORES_WIND,
ITEM_BOOMERANG, ITEM_LENS, ITEM_BEAN, ITEM_HAMMER, ITEM_ARROW_LIGHT, ITEM_NAYRUS_LOVE,
ITEM_BOTTLE, ITEM_POTION_RED, ITEM_POTION_GREEN, ITEM_POTION_BLUE, ITEM_POCKET_EGG, ITEM_WEIRD_EGG }, // items
{
ITEM_STICK, ITEM_NUT, ITEM_BOMB, ITEM_BOW, ITEM_ARROW_FIRE, ITEM_DINS_FIRE,
ITEM_SLINGSHOT, ITEM_OCARINA_FAIRY, ITEM_BOMBCHU, ITEM_HOOKSHOT, ITEM_ARROW_ICE, ITEM_FARORES_WIND,
ITEM_BOOMERANG, ITEM_LENS, ITEM_BEAN, ITEM_HAMMER, ITEM_ARROW_LIGHT, ITEM_NAYRUS_LOVE,
ITEM_BOTTLE, ITEM_POTION_RED, ITEM_POTION_GREEN, ITEM_POTION_BLUE, ITEM_POCKET_EGG, ITEM_WEIRD_EGG,
}, // items
{ 50, 50, 10, 30, 1, 1, 30, 1, 50, 1, 1, 1, 1, 1, 1, 1 }, // ammo
0x7777, // equipment
0x125249, // upgrades

View file

@ -182,15 +182,11 @@ void EnDoor_SetupType(EnDoor* this, GlobalContext* globalCtx) {
}
}
#ifdef NON_MATCHING
// Regalloc only
void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s32 doorType;
Vec3f sp2C;
s8 numKeys;
s16 phi_v0;
s16 temp_v0;
doorType = this->actor.params >> 7 & 7;
func_8002DBD0(&this->actor, &sp2C, &player->actor.posRot.pos);
@ -211,9 +207,10 @@ void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) {
}
if (ABS(phi_v0) < 0x3000) {
if (this->lockTimer != 0) {
numKeys = gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex];
if (numKeys <= 0) {
PLAYER->naviTextId = -0x203;
if (gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] <= 0) {
Player* player2 = PLAYER;
player2->naviTextId = -0x203;
return;
} else {
player->doorTimer = 10;
@ -228,9 +225,6 @@ void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) {
}
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Door/EnDoor_Idle.s")
#endif
void EnDoor_WaitForCheck(EnDoor* this, GlobalContext* globalCtx) {
if (func_8002F194(&this->actor, globalCtx)) {

View file

@ -576,14 +576,11 @@ void func_80AA7478(EnMb* this, GlobalContext* globalCtx) {
}
}
#ifdef NON_MATCHING
// stack
void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
Player* player;
Player* player = PLAYER;
f32 lastFrame;
s16 yawDiff;
s16 pad;
player = PLAYER;
if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~0x80;
player->actor.parent = NULL;
@ -604,8 +601,8 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
(ABS(yawDiff) <= 0x4000) && (this->actor.xzDistFromLink <= 200.0f)) {
func_80AA6AC8(this);
} else {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002C10, -1.0f, SkelAnime_GetFrameCount(&D_06002C10),
0.0f, 2, 0.0f);
lastFrame = SkelAnime_GetFrameCount(&D_06002C10);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002C10, -1.0f, lastFrame, 0.0f, 2, 0.0f);
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
}
@ -618,24 +615,21 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
}
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime) != 0) {
if (this->unk_32A == 0) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002F10, 0.5f, 0.0f, SkelAnime_GetFrameCount(&D_06002F10), 1,
0.0f);
lastFrame = SkelAnime_GetFrameCount(&D_06002F10);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002F10, 0.5f, 0.0f, lastFrame, 1, 0.0f);
this->unk_32A = 1;
return;
}
yawDiff = (Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->waypointPos) - this->actor.yawTowardsLink);
} else {
yawDiff = (Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->waypointPos) - this->actor.yawTowardsLink);
if (ABS(yawDiff) <= 0x4000) {
func_80AA68FC(this, globalCtx);
return;
if (ABS(yawDiff) <= 0x4000) {
func_80AA68FC(this, globalCtx);
} else {
func_80AA6A18(this);
}
}
func_80AA6A18(this);
}
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mb/func_80AA74BC.s")
#endif
void func_80AA77D0(EnMb* this, GlobalContext* globalCtx) {
s32 currentFrame;
@ -957,7 +951,6 @@ void func_80AA8514(EnMb* this, GlobalContext* globalCtx) {
}
}
#ifdef NON_MATCHING
void func_80AA87D8(EnMb* this, GlobalContext* globalCtx) {
s32 currentFrame;
s32 sp48;
@ -965,6 +958,7 @@ void func_80AA87D8(EnMb* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = PLAYER;
s16 yawDiff;
s16 yaw;
f32 playbackSpeedABS;
yawDiff = (this->actor.yawTowardsLink - this->actor.shape.rot.y);
@ -982,7 +976,7 @@ void func_80AA87D8(EnMb* this, GlobalContext* globalCtx) {
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, this->actor.yawTowardsLink, 1, 750, 0);
this->actor.flags |= 1;
if (this->actor.xzDistFromLink < 500.0f) {
if (yawDiff <= 0x1387) {
if (yawDiff < 0x1388) {
func_80AA6AC8(this);
}
}
@ -990,8 +984,8 @@ void func_80AA87D8(EnMb* this, GlobalContext* globalCtx) {
this->actor.flags &= ~1;
if ((this->unk_360 < Math_Vec3f_DistXZ(&this->actor.posRot.pos, &this->actor.initPosRot.pos)) ||
(this->soundTimer != 0)) {
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y,
Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot), 1, 750, 0);
yaw = Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot);
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, yaw, 1, 750, 0);
} else {
}
if (this->soundTimer != 0) {
@ -1007,23 +1001,20 @@ void func_80AA87D8(EnMb* this, GlobalContext* globalCtx) {
if (this->unk_32A == 0) {
if (Math_Rand_ZeroOne() > 0.7f) {
this->unk_32A = Math_Rand_S16Offset(50, 70);
this->soundTimer = Math_Rand_S16Offset(26, 40) & 0xFFFF;
this->soundTimer = Math_Rand_S16Offset(15, 40);
} else {
func_80AA6830(this);
}
}
}
if (currentFrame != (s32)this->skelAnime.animCurrentFrame) {
if (!((sp48 >= 2) || (((s32)playbackSpeedABS + (s32)this->skelAnime.animCurrentFrame) <= 0)) ||
((sp48 < 21) && (((s32)playbackSpeedABS + currentFrame >= 20)))) {
if (((sp48 <= 1) && ((s32)playbackSpeedABS + currentFrame >= 1)) ||
((sp48 <= 20) && (((s32)playbackSpeedABS + currentFrame >= 20)))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
}
}
this->actor.shape.rot.y = this->actor.posRot.rot.y;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mb/func_80AA87D8.s")
#endif
void func_80AA8AEC(EnMb* this, GlobalContext* globalCtx) {
s32 currentFrame;