From 9b9122942221ab1da7249d802f5a194731e3c231 Mon Sep 17 00:00:00 2001 From: Zelllll <56516451+Zelllll@users.noreply.github.com> Date: Sun, 31 Jan 2021 14:09:04 -0600 Subject: [PATCH] Bg_Spot00_Hanebasi (Drawbridge) OK (#614) * drawbridge progress * matched cursed draw functions * drawbridge OK * fix error that made it not OK * documentation improvements * format fix * update with new actor struct * Update src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: Zelllll Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> --- .../BgSpot00Hanebasi_Destroy.s | 27 -- .../BgSpot00Hanebasi_Draw.s | 150 -------- .../BgSpot00Hanebasi_Init.s | 300 ---------------- .../BgSpot00Hanebasi_Update.s | 212 ------------ .../ovl_Bg_Spot00_Hanebasi/func_808A9BE8.s | 84 ----- .../ovl_Bg_Spot00_Hanebasi/func_808A9D18.s | 4 - .../ovl_Bg_Spot00_Hanebasi/func_808A9D24.s | 94 ----- .../ovl_Bg_Spot00_Hanebasi/func_808A9E58.s | 101 ------ .../ovl_Bg_Spot00_Hanebasi/func_808AA2B0.s | 214 ------------ .../actors/z_bg_spot00_hanebasi.data.s | 24 -- .../actors/z_bg_spot00_hanebasi.reloc.s | 13 - spec | 3 +- src/code/z_camera.c | 2 +- .../z_bg_spot00_hanebasi.c | 322 +++++++++++++++++- .../z_bg_spot00_hanebasi.h | 7 +- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 2 +- .../actors/ovl_En_Karebaba/z_en_karebaba.c | 2 +- 17 files changed, 317 insertions(+), 1244 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9BE8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D18.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D24.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808AA2B0.s delete mode 100644 data/overlays/actors/z_bg_spot00_hanebasi.data.s delete mode 100644 data/overlays/actors/z_bg_spot00_hanebasi.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s deleted file mode 100644 index 9a3ca4a51d..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s +++ /dev/null @@ -1,27 +0,0 @@ -glabel BgSpot00Hanebasi_Destroy -/* 0040C 808A9B8C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00410 808A9B90 AFA40018 */ sw $a0, 0x0018($sp) -/* 00414 808A9B94 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00418 808A9B98 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0041C 808A9B9C 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 00420 808A9BA0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00424 808A9BA4 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 00428 808A9BA8 AFA7001C */ sw $a3, 0x001C($sp) -/* 0042C 808A9BAC 0C00FB56 */ jal DynaPoly_DeleteBgActor - ## DynaPoly_DeleteBgActor -/* 00430 808A9BB0 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 00434 808A9BB4 8FA20018 */ lw $v0, 0x0018($sp) -/* 00438 808A9BB8 8FA7001C */ lw $a3, 0x001C($sp) -/* 0043C 808A9BBC 844F001C */ lh $t7, 0x001C($v0) ## 0000001C -/* 00440 808A9BC0 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00444 808A9BC4 24E507A8 */ addiu $a1, $a3, 0x07A8 ## $a1 = 000007A8 -/* 00448 808A9BC8 05E20004 */ bltzl $t7, .L808A9BDC -/* 0044C 808A9BCC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00450 808A9BD0 0C01E9F1 */ jal LightContext_RemoveLight - -/* 00454 808A9BD4 8C46016C */ lw $a2, 0x016C($v0) ## 0000016C -/* 00458 808A9BD8 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A9BDC: -/* 0045C 808A9BDC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00460 808A9BE0 03E00008 */ jr $ra -/* 00464 808A9BE4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Draw.s deleted file mode 100644 index e16b9364fd..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Draw.s +++ /dev/null @@ -1,150 +0,0 @@ -.rdata -glabel D_808AA824 - .asciz "../z_bg_spot00_hanebasi.c" - .balign 4 - -glabel D_808AA840 - .asciz "../z_bg_spot00_hanebasi.c" - .balign 4 - -glabel D_808AA85C - .asciz "../z_bg_spot00_hanebasi.c" - .balign 4 - -.text -glabel BgSpot00Hanebasi_Draw -/* 00E08 808AA588 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0 -/* 00E0C 808AA58C 3C0F808B */ lui $t7, %hi(D_808AA7C4) ## $t7 = 808B0000 -/* 00E10 808AA590 AFBF001C */ sw $ra, 0x001C($sp) -/* 00E14 808AA594 AFB00018 */ sw $s0, 0x0018($sp) -/* 00E18 808AA598 AFA50064 */ sw $a1, 0x0064($sp) -/* 00E1C 808AA59C 25EFA7C4 */ addiu $t7, $t7, %lo(D_808AA7C4) ## $t7 = 808AA7C4 -/* 00E20 808AA5A0 8DF90000 */ lw $t9, 0x0000($t7) ## 808AA7C4 -/* 00E24 808AA5A4 27AE0054 */ addiu $t6, $sp, 0x0054 ## $t6 = FFFFFFF4 -/* 00E28 808AA5A8 8DF80004 */ lw $t8, 0x0004($t7) ## 808AA7C8 -/* 00E2C 808AA5AC ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF4 -/* 00E30 808AA5B0 8DF90008 */ lw $t9, 0x0008($t7) ## 808AA7CC -/* 00E34 808AA5B4 ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFF8 -/* 00E38 808AA5B8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00E3C 808AA5BC ADD90008 */ sw $t9, 0x0008($t6) ## FFFFFFFC -/* 00E40 808AA5C0 8FA90064 */ lw $t1, 0x0064($sp) -/* 00E44 808AA5C4 3C06808B */ lui $a2, %hi(D_808AA824) ## $a2 = 808B0000 -/* 00E48 808AA5C8 24C6A824 */ addiu $a2, $a2, %lo(D_808AA824) ## $a2 = 808AA824 -/* 00E4C 808AA5CC 8D250000 */ lw $a1, 0x0000($t1) ## 00000000 -/* 00E50 808AA5D0 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFD4 -/* 00E54 808AA5D4 240702BA */ addiu $a3, $zero, 0x02BA ## $a3 = 000002BA -/* 00E58 808AA5D8 0C031AB1 */ jal Graph_OpenDisps -/* 00E5C 808AA5DC AFA50044 */ sw $a1, 0x0044($sp) -/* 00E60 808AA5E0 8FAA0064 */ lw $t2, 0x0064($sp) -/* 00E64 808AA5E4 0C024F46 */ jal func_80093D18 -/* 00E68 808AA5E8 8D440000 */ lw $a0, 0x0000($t2) ## 00000000 -/* 00E6C 808AA5EC 8FA80044 */ lw $t0, 0x0044($sp) -/* 00E70 808AA5F0 3C0CDA38 */ lui $t4, 0xDA38 ## $t4 = DA380000 -/* 00E74 808AA5F4 358C0003 */ ori $t4, $t4, 0x0003 ## $t4 = DA380003 -/* 00E78 808AA5F8 8D0202C0 */ lw $v0, 0x02C0($t0) ## 000002C0 -/* 00E7C 808AA5FC 3C05808B */ lui $a1, %hi(D_808AA840) ## $a1 = 808B0000 -/* 00E80 808AA600 24A5A840 */ addiu $a1, $a1, %lo(D_808AA840) ## $a1 = 808AA840 -/* 00E84 808AA604 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 00E88 808AA608 AD0B02C0 */ sw $t3, 0x02C0($t0) ## 000002C0 -/* 00E8C 808AA60C AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000 -/* 00E90 808AA610 8FAD0064 */ lw $t5, 0x0064($sp) -/* 00E94 808AA614 240602BE */ addiu $a2, $zero, 0x02BE ## $a2 = 000002BE -/* 00E98 808AA618 8DA40000 */ lw $a0, 0x0000($t5) ## 00000000 -/* 00E9C 808AA61C AFA80044 */ sw $t0, 0x0044($sp) -/* 00EA0 808AA620 0C0346A2 */ jal Matrix_NewMtx -/* 00EA4 808AA624 AFA20030 */ sw $v0, 0x0030($sp) -/* 00EA8 808AA628 8FA30030 */ lw $v1, 0x0030($sp) -/* 00EAC 808AA62C 8FA80044 */ lw $t0, 0x0044($sp) -/* 00EB0 808AA630 2401FFFF */ addiu $at, $zero, 0xFFFF ## $at = FFFFFFFF -/* 00EB4 808AA634 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00EB8 808AA638 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 00EBC 808AA63C 3C18DE00 */ lui $t8, 0xDE00 ## $t8 = DE000000 -/* 00EC0 808AA640 3C190600 */ lui $t9, %hi(D_06000430) ## $t9 = 06000000 -/* 00EC4 808AA644 15C1003E */ bne $t6, $at, .L808AA740 -/* 00EC8 808AA648 3C0CDE00 */ lui $t4, 0xDE00 ## $t4 = DE000000 -/* 00ECC 808AA64C 8D0202C0 */ lw $v0, 0x02C0($t0) ## 000002C0 -/* 00ED0 808AA650 27390430 */ addiu $t9, $t9, %lo(D_06000430) ## $t9 = 06000430 -/* 00ED4 808AA654 27A40054 */ addiu $a0, $sp, 0x0054 ## $a0 = FFFFFFF4 -/* 00ED8 808AA658 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008 -/* 00EDC 808AA65C AD0F02C0 */ sw $t7, 0x02C0($t0) ## 000002C0 -/* 00EE0 808AA660 27A50048 */ addiu $a1, $sp, 0x0048 ## $a1 = FFFFFFE8 -/* 00EE4 808AA664 AC590004 */ sw $t9, 0x0004($v0) ## 00000004 -/* 00EE8 808AA668 0C0346BD */ jal Matrix_MultVec3f -/* 00EEC 808AA66C AC580000 */ sw $t8, 0x0000($v0) ## 00000000 -/* 00EF0 808AA670 C7A40048 */ lwc1 $f4, 0x0048($sp) -/* 00EF4 808AA674 8E09011C */ lw $t1, 0x011C($s0) ## 0000011C -/* 00EF8 808AA678 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000 -/* 00EFC 808AA67C 44818000 */ mtc1 $at, $f16 ## $f16 = -1.00 -/* 00F00 808AA680 E5240024 */ swc1 $f4, 0x0024($t1) ## 00000024 -/* 00F04 808AA684 8E0A011C */ lw $t2, 0x011C($s0) ## 0000011C -/* 00F08 808AA688 C7A6004C */ lwc1 $f6, 0x004C($sp) -/* 00F0C 808AA68C 27A40054 */ addiu $a0, $sp, 0x0054 ## $a0 = FFFFFFF4 -/* 00F10 808AA690 27A50048 */ addiu $a1, $sp, 0x0048 ## $a1 = FFFFFFE8 -/* 00F14 808AA694 E5460028 */ swc1 $f6, 0x0028($t2) ## 00000028 -/* 00F18 808AA698 8E0B011C */ lw $t3, 0x011C($s0) ## 0000011C -/* 00F1C 808AA69C C7A80050 */ lwc1 $f8, 0x0050($sp) -/* 00F20 808AA6A0 E568002C */ swc1 $f8, 0x002C($t3) ## 0000002C -/* 00F24 808AA6A4 C7AA0054 */ lwc1 $f10, 0x0054($sp) -/* 00F28 808AA6A8 46105482 */ mul.s $f18, $f10, $f16 -/* 00F2C 808AA6AC 0C0346BD */ jal Matrix_MultVec3f -/* 00F30 808AA6B0 E7B20054 */ swc1 $f18, 0x0054($sp) -/* 00F34 808AA6B4 8E0C011C */ lw $t4, 0x011C($s0) ## 0000011C -/* 00F38 808AA6B8 C7A40048 */ lwc1 $f4, 0x0048($sp) -/* 00F3C 808AA6BC 3C038016 */ lui $v1, %hi(gSaveContext) -/* 00F40 808AA6C0 8D8D011C */ lw $t5, 0x011C($t4) ## 0000011C -/* 00F44 808AA6C4 2463E660 */ addiu $v1, %lo(gSaveContext) -/* 00F48 808AA6C8 2401000C */ addiu $at, $zero, 0x000C ## $at = 0000000C -/* 00F4C 808AA6CC E5A40024 */ swc1 $f4, 0x0024($t5) ## 00000024 -/* 00F50 808AA6D0 8E0E011C */ lw $t6, 0x011C($s0) ## 0000011C -/* 00F54 808AA6D4 C7A6004C */ lwc1 $f6, 0x004C($sp) -/* 00F58 808AA6D8 8DCF011C */ lw $t7, 0x011C($t6) ## 0000011C -/* 00F5C 808AA6DC E5E60028 */ swc1 $f6, 0x0028($t7) ## 00000028 -/* 00F60 808AA6E0 8E18011C */ lw $t8, 0x011C($s0) ## 0000011C -/* 00F64 808AA6E4 C7A80050 */ lwc1 $f8, 0x0050($sp) -/* 00F68 808AA6E8 8F19011C */ lw $t9, 0x011C($t8) ## 0000011C -/* 00F6C 808AA6EC E728002C */ swc1 $f8, 0x002C($t9) ## 0000002C -/* 00F70 808AA6F0 8C621360 */ lw $v0, 0x1360($v1) ## 8015F9C0 -/* 00F74 808AA6F4 10410019 */ beq $v0, $at, .L808AA75C -/* 00F78 808AA6F8 28410004 */ slti $at, $v0, 0x0004 -/* 00F7C 808AA6FC 10200008 */ beq $at, $zero, .L808AA720 -/* 00F80 808AA700 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00F84 808AA704 8C690004 */ lw $t1, 0x0004($v1) ## 8015E664 -/* 00F88 808AA708 5120000A */ beql $t1, $zero, .L808AA734 -/* 00F8C 808AA70C 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00 -/* 00F90 808AA710 860A00B4 */ lh $t2, 0x00B4($s0) ## 000000B4 -/* 00F94 808AA714 2941E000 */ slti $at, $t2, 0xE000 -/* 00F98 808AA718 50200006 */ beql $at, $zero, .L808AA734 -/* 00F9C 808AA71C 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00 -.L808AA720: -/* 00FA0 808AA720 0C22A8AC */ jal func_808AA2B0 -/* 00FA4 808AA724 8FA50064 */ lw $a1, 0x0064($sp) -/* 00FA8 808AA728 1000000D */ beq $zero, $zero, .L808AA760 -/* 00FAC 808AA72C 8FAE0064 */ lw $t6, 0x0064($sp) -/* 00FB0 808AA730 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00 -.L808AA734: -/* 00FB4 808AA734 3C01808B */ lui $at, %hi(D_808AA7B0) ## $at = 808B0000 -/* 00FB8 808AA738 10000008 */ beq $zero, $zero, .L808AA75C -/* 00FBC 808AA73C E42AA7B0 */ swc1 $f10, %lo(D_808AA7B0)($at) -.L808AA740: -/* 00FC0 808AA740 8D0202C0 */ lw $v0, 0x02C0($t0) ## 000002C0 -/* 00FC4 808AA744 3C0D0600 */ lui $t5, %hi(D_060000C0) ## $t5 = 06000000 -/* 00FC8 808AA748 25AD00C0 */ addiu $t5, $t5, %lo(D_060000C0) ## $t5 = 060000C0 -/* 00FCC 808AA74C 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 00FD0 808AA750 AD0B02C0 */ sw $t3, 0x02C0($t0) ## 000002C0 -/* 00FD4 808AA754 AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004 -/* 00FD8 808AA758 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000 -.L808AA75C: -/* 00FDC 808AA75C 8FAE0064 */ lw $t6, 0x0064($sp) -.L808AA760: -/* 00FE0 808AA760 3C06808B */ lui $a2, %hi(D_808AA85C) ## $a2 = 808B0000 -/* 00FE4 808AA764 24C6A85C */ addiu $a2, $a2, %lo(D_808AA85C) ## $a2 = 808AA85C -/* 00FE8 808AA768 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFD4 -/* 00FEC 808AA76C 240702DD */ addiu $a3, $zero, 0x02DD ## $a3 = 000002DD -/* 00FF0 808AA770 0C031AD5 */ jal Graph_CloseDisps -/* 00FF4 808AA774 8DC50000 */ lw $a1, 0x0000($t6) ## 00000000 -/* 00FF8 808AA778 8FBF001C */ lw $ra, 0x001C($sp) -/* 00FFC 808AA77C 8FB00018 */ lw $s0, 0x0018($sp) -/* 01000 808AA780 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000 -/* 01004 808AA784 03E00008 */ jr $ra -/* 01008 808AA788 00000000 */ nop -/* 0100C 808AA78C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s deleted file mode 100644 index 17a44020d8..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s +++ /dev/null @@ -1,300 +0,0 @@ -glabel BgSpot00Hanebasi_Init -/* 00000 808A9780 27BDFF90 */ addiu $sp, $sp, 0xFF90 ## $sp = FFFFFF90 -/* 00004 808A9784 AFA50074 */ sw $a1, 0x0074($sp) -/* 00008 808A9788 AFBF003C */ sw $ra, 0x003C($sp) -/* 0000C 808A978C AFB00038 */ sw $s0, 0x0038($sp) -/* 00010 808A9790 3C05808B */ lui $a1, %hi(D_808AA7B4) ## $a1 = 808B0000 -/* 00014 808A9794 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00018 808A9798 AFA00058 */ sw $zero, 0x0058($sp) -/* 0001C 808A979C 0C01E037 */ jal Actor_ProcessInitChain - -/* 00020 808A97A0 24A5A7B4 */ addiu $a1, $a1, %lo(D_808AA7B4) ## $a1 = 808AA7B4 -/* 00024 808A97A4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00028 808A97A8 0C010D20 */ jal DynaPolyActor_Init - -/* 0002C 808A97AC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00030 808A97B0 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 00034 808A97B4 2401FFFF */ addiu $at, $zero, 0xFFFF ## $at = FFFFFFFF -/* 00038 808A97B8 3C040600 */ lui $a0, %hi(D_06000280) ## $a0 = 06000000 -/* 0003C 808A97BC 15C10007 */ bne $t6, $at, .L808A97DC -/* 00040 808A97C0 24840280 */ addiu $a0, $a0, %lo(D_06000280) ## $a0 = 06000280 -/* 00044 808A97C4 3C040600 */ lui $a0, %hi(D_060005E0) ## $a0 = 06000000 -/* 00048 808A97C8 248405E0 */ addiu $a0, $a0, %lo(D_060005E0) ## $a0 = 060005E0 -/* 0004C 808A97CC 0C010620 */ jal CollisionHeader_GetVirtual - -/* 00050 808A97D0 27A50058 */ addiu $a1, $sp, 0x0058 ## $a1 = FFFFFFE8 -/* 00054 808A97D4 10000004 */ beq $zero, $zero, .L808A97E8 -/* 00058 808A97D8 8FA40074 */ lw $a0, 0x0074($sp) -.L808A97DC: -/* 0005C 808A97DC 0C010620 */ jal CollisionHeader_GetVirtual - -/* 00060 808A97E0 27A50058 */ addiu $a1, $sp, 0x0058 ## $a1 = FFFFFFE8 -/* 00064 808A97E4 8FA40074 */ lw $a0, 0x0074($sp) -.L808A97E8: -/* 00068 808A97E8 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 0006C 808A97EC 8FA70058 */ lw $a3, 0x0058($sp) -/* 00070 808A97F0 0C00FA9D */ jal DynaPoly_SetBgActor - ## DynaPoly_SetBgActor -/* 00074 808A97F4 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00078 808A97F8 8603001C */ lh $v1, 0x001C($s0) ## 0000001C -/* 0007C 808A97FC 2401FFFF */ addiu $at, $zero, 0xFFFF ## $at = FFFFFFFF -/* 00080 808A9800 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 00084 808A9804 14610091 */ bne $v1, $at, .L808A9A4C -/* 00088 808A9808 00000000 */ nop -/* 0008C 808A980C 3C038016 */ lui $v1, %hi(gSaveContext) -/* 00090 808A9810 2463E660 */ addiu $v1, %lo(gSaveContext) -/* 00094 808A9814 8C640004 */ lw $a0, 0x0004($v1) ## 8015E664 -/* 00098 808A9818 5480000A */ bnel $a0, $zero, .L808A9844 -/* 0009C 808A981C 8C621360 */ lw $v0, 0x1360($v1) ## 8015F9C0 -/* 000A0 808A9820 8C6F1360 */ lw $t7, 0x1360($v1) ## 8015F9C0 -/* 000A4 808A9824 29E10004 */ slti $at, $t7, 0x0004 -/* 000A8 808A9828 50200006 */ beql $at, $zero, .L808A9844 -/* 000AC 808A982C 8C621360 */ lw $v0, 0x1360($v1) ## 8015F9C0 -/* 000B0 808A9830 0C00B55C */ jal Actor_Kill - -/* 000B4 808A9834 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000B8 808A9838 100000D0 */ beq $zero, $zero, .L808A9B7C -/* 000BC 808A983C 8FBF003C */ lw $ra, 0x003C($sp) -/* 000C0 808A9840 8C621360 */ lw $v0, 0x1360($v1) ## 00001360 -.L808A9844: -/* 000C4 808A9844 24050006 */ addiu $a1, $zero, 0x0006 ## $a1 = 00000006 -/* 000C8 808A9848 10A2000D */ beq $a1, $v0, .L808A9880 -/* 000CC 808A984C 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 000D0 808A9850 10410009 */ beq $v0, $at, .L808A9878 -/* 000D4 808A9854 2419C000 */ addiu $t9, $zero, 0xC000 ## $t9 = FFFFC000 -/* 000D8 808A9858 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 000DC 808A985C 10410006 */ beq $v0, $at, .L808A9878 -/* 000E0 808A9860 00000000 */ nop -/* 000E4 808A9864 50800007 */ beql $a0, $zero, .L808A9884 -/* 000E8 808A9868 A60000B4 */ sh $zero, 0x00B4($s0) ## 000000B4 -/* 000EC 808A986C 8C780010 */ lw $t8, 0x0010($v1) ## 00000010 -/* 000F0 808A9870 53000004 */ beql $t8, $zero, .L808A9884 -/* 000F4 808A9874 A60000B4 */ sh $zero, 0x00B4($s0) ## 000000B4 -.L808A9878: -/* 000F8 808A9878 10000002 */ beq $zero, $zero, .L808A9884 -/* 000FC 808A987C A61900B4 */ sh $t9, 0x00B4($s0) ## 000000B4 -.L808A9880: -/* 00100 808A9880 A60000B4 */ sh $zero, 0x00B4($s0) ## 000000B4 -.L808A9884: -/* 00104 808A9884 8C681360 */ lw $t0, 0x1360($v1) ## 00001360 -/* 00108 808A9888 10A80015 */ beq $a1, $t0, .L808A98E0 -/* 0010C 808A988C 3C048012 */ lui $a0, %hi(gBitFlags) -/* 00110 808A9890 24847120 */ addiu $a0, %lo(gBitFlags) -/* 00114 808A9894 8C890048 */ lw $t1, 0x0048($a0) ## 80127168 -/* 00118 808A9898 8C6200A4 */ lw $v0, 0x00A4($v1) ## 000000A4 -/* 0011C 808A989C 01225024 */ and $t2, $t1, $v0 -/* 00120 808A98A0 1140000F */ beq $t2, $zero, .L808A98E0 -/* 00124 808A98A4 00000000 */ nop -/* 00128 808A98A8 8C8B004C */ lw $t3, 0x004C($a0) ## 8012716C -/* 0012C 808A98AC 01626024 */ and $t4, $t3, $v0 -/* 00130 808A98B0 1180000B */ beq $t4, $zero, .L808A98E0 -/* 00134 808A98B4 00000000 */ nop -/* 00138 808A98B8 8C8D0050 */ lw $t5, 0x0050($a0) ## 80127170 -/* 0013C 808A98BC 01A27024 */ and $t6, $t5, $v0 -/* 00140 808A98C0 11C00007 */ beq $t6, $zero, .L808A98E0 -/* 00144 808A98C4 00000000 */ nop -/* 00148 808A98C8 946F0EE4 */ lhu $t7, 0x0EE4($v1) ## 00000EE4 -/* 0014C 808A98CC 2419C000 */ addiu $t9, $zero, 0xC000 ## $t9 = FFFFC000 -/* 00150 808A98D0 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000 -/* 00154 808A98D4 17000002 */ bne $t8, $zero, .L808A98E0 -/* 00158 808A98D8 00000000 */ nop -/* 0015C 808A98DC A61900B4 */ sh $t9, 0x00B4($s0) ## 000000B4 -.L808A98E0: -/* 00160 808A98E0 0C01DE0D */ jal Math_CosS - ## coss? -/* 00164 808A98E4 860400B4 */ lh $a0, 0x00B4($s0) ## 000000B4 -/* 00168 808A98E8 E7A00054 */ swc1 $f0, 0x0054($sp) -/* 0016C 808A98EC 0C01DE1C */ jal Math_SinS - ## sins? -/* 00170 808A98F0 860400B4 */ lh $a0, 0x00B4($s0) ## 000000B4 -/* 00174 808A98F4 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 00178 808A98F8 44812000 */ mtc1 $at, $f4 ## $f4 = 10.00 -/* 0017C 808A98FC C7A20054 */ lwc1 $f2, 0x0054($sp) -/* 00180 808A9900 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000 -/* 00184 808A9904 44814000 */ mtc1 $at, $f8 ## $f8 = 400.00 -/* 00188 808A9908 46022182 */ mul.s $f6, $f4, $f2 -/* 0018C 808A990C 00000000 */ nop -/* 00190 808A9910 46080282 */ mul.s $f10, $f0, $f8 -/* 00194 808A9914 460A3401 */ sub.s $f16, $f6, $f10 -/* 00198 808A9918 E7B00060 */ swc1 $f16, 0x0060($sp) -/* 0019C 808A991C 0C01DE1C */ jal Math_SinS - ## sins? -/* 001A0 808A9920 860400B4 */ lh $a0, 0x00B4($s0) ## 000000B4 -/* 001A4 808A9924 E7A00054 */ swc1 $f0, 0x0054($sp) -/* 001A8 808A9928 0C01DE0D */ jal Math_CosS - ## coss? -/* 001AC 808A992C 860400B4 */ lh $a0, 0x00B4($s0) ## 000000B4 -/* 001B0 808A9930 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 001B4 808A9934 44819000 */ mtc1 $at, $f18 ## $f18 = 10.00 -/* 001B8 808A9938 C7A20054 */ lwc1 $f2, 0x0054($sp) -/* 001BC 808A993C 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000 -/* 001C0 808A9940 44814000 */ mtc1 $at, $f8 ## $f8 = 400.00 -/* 001C4 808A9944 46029102 */ mul.s $f4, $f18, $f2 -/* 001C8 808A9948 00000000 */ nop -/* 001CC 808A994C 46080182 */ mul.s $f6, $f0, $f8 -/* 001D0 808A9950 46062281 */ sub.s $f10, $f4, $f6 -/* 001D4 808A9954 E7AA0064 */ swc1 $f10, 0x0064($sp) -/* 001D8 808A9958 0C01DE0D */ jal Math_CosS - ## coss? -/* 001DC 808A995C 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 001E0 808A9960 E7A00054 */ swc1 $f0, 0x0054($sp) -/* 001E4 808A9964 0C01DE1C */ jal Math_SinS - ## sins? -/* 001E8 808A9968 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 001EC 808A996C C7B00064 */ lwc1 $f16, 0x0064($sp) -/* 001F0 808A9970 3C01431E */ lui $at, 0x431E ## $at = 431E0000 -/* 001F4 808A9974 44814000 */ mtc1 $at, $f8 ## $f8 = 158.00 -/* 001F8 808A9978 46100482 */ mul.s $f18, $f0, $f16 -/* 001FC 808A997C C7A20054 */ lwc1 $f2, 0x0054($sp) -/* 00200 808A9980 46024102 */ mul.s $f4, $f8, $f2 -/* 00204 808A9984 46049180 */ add.s $f6, $f18, $f4 -/* 00208 808A9988 E7A6005C */ swc1 $f6, 0x005C($sp) -/* 0020C 808A998C 0C01DE1C */ jal Math_SinS - ## sins? -/* 00210 808A9990 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 00214 808A9994 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 00218 808A9998 0C01DE0D */ jal Math_CosS - ## coss? -/* 0021C 808A999C E7A00054 */ swc1 $f0, 0x0054($sp) -/* 00220 808A99A0 C7AC0064 */ lwc1 $f12, 0x0064($sp) -/* 00224 808A99A4 3C01C31E */ lui $at, 0xC31E ## $at = C31E0000 -/* 00228 808A99A8 44818000 */ mtc1 $at, $f16 ## $f16 = -158.00 -/* 0022C 808A99AC 460C0282 */ mul.s $f10, $f0, $f12 -/* 00230 808A99B0 C7A20054 */ lwc1 $f2, 0x0054($sp) -/* 00234 808A99B4 860800B4 */ lh $t0, 0x00B4($s0) ## 000000B4 -/* 00238 808A99B8 C7A4005C */ lwc1 $f4, 0x005C($sp) -/* 0023C 808A99BC 46028202 */ mul.s $f8, $f16, $f2 -/* 00240 808A99C0 3402F020 */ ori $v0, $zero, 0xF020 ## $v0 = 0000F020 -/* 00244 808A99C4 15000003 */ bne $t0, $zero, .L808A99D4 -/* 00248 808A99C8 46085300 */ add.s $f12, $f10, $f8 -/* 0024C 808A99CC 10000001 */ beq $zero, $zero, .L808A99D4 -/* 00250 808A99D0 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L808A99D4: -/* 00254 808A99D4 C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 -/* 00258 808A99D8 C7AA0060 */ lwc1 $f10, 0x0060($sp) -/* 0025C 808A99DC 8FA60074 */ lw $a2, 0x0074($sp) -/* 00260 808A99E0 46049180 */ add.s $f6, $f18, $f4 -/* 00264 808A99E4 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00268 808A99E8 2407004A */ addiu $a3, $zero, 0x004A ## $a3 = 0000004A -/* 0026C 808A99EC 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 00270 808A99F0 E7A60010 */ swc1 $f6, 0x0010($sp) -/* 00274 808A99F4 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028 -/* 00278 808A99F8 460A8200 */ add.s $f8, $f16, $f10 -/* 0027C 808A99FC E7A80014 */ swc1 $f8, 0x0014($sp) -/* 00280 808A9A00 C612002C */ lwc1 $f18, 0x002C($s0) ## 0000002C -/* 00284 808A9A04 AFA2001C */ sw $v0, 0x001C($sp) -/* 00288 808A9A08 460C9100 */ add.s $f4, $f18, $f12 -/* 0028C 808A9A0C E7A40018 */ swc1 $f4, 0x0018($sp) -/* 00290 808A9A10 860900B6 */ lh $t1, 0x00B6($s0) ## 000000B6 -/* 00294 808A9A14 AFA00028 */ sw $zero, 0x0028($sp) -/* 00298 808A9A18 AFA00024 */ sw $zero, 0x0024($sp) -/* 0029C 808A9A1C 0C00C916 */ jal Actor_SpawnAsChild - -/* 002A0 808A9A20 AFA90020 */ sw $t1, 0x0020($sp) -/* 002A4 808A9A24 14400003 */ bne $v0, $zero, .L808A9A34 -/* 002A8 808A9A28 00000000 */ nop -/* 002AC 808A9A2C 0C00B55C */ jal Actor_Kill - -/* 002B0 808A9A30 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L808A9A34: -/* 002B4 808A9A34 3C0A808B */ lui $t2, %hi(func_808A9BE8) ## $t2 = 808B0000 -/* 002B8 808A9A38 254A9BE8 */ addiu $t2, $t2, %lo(func_808A9BE8) ## $t2 = 808A9BE8 -/* 002BC 808A9A3C 240B0028 */ addiu $t3, $zero, 0x0028 ## $t3 = 00000028 -/* 002C0 808A9A40 AE0A0164 */ sw $t2, 0x0164($s0) ## 00000164 -/* 002C4 808A9A44 1000002D */ beq $zero, $zero, .L808A9AFC -/* 002C8 808A9A48 A60B0168 */ sh $t3, 0x0168($s0) ## 00000168 -.L808A9A4C: -/* 002CC 808A9A4C 14600029 */ bne $v1, $zero, .L808A9AF4 -/* 002D0 808A9A50 3C19808B */ lui $t9, %hi(func_808A9E58) ## $t9 = 808B0000 -/* 002D4 808A9A54 0C01DE0D */ jal Math_CosS - ## coss? -/* 002D8 808A9A58 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 002DC 808A9A5C E7A0004C */ swc1 $f0, 0x004C($sp) -/* 002E0 808A9A60 0C01DE1C */ jal Math_SinS - ## sins? -/* 002E4 808A9A64 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 002E8 808A9A68 3C01439E */ lui $at, 0x439E ## $at = 439E0000 -/* 002EC 808A9A6C 44811000 */ mtc1 $at, $f2 ## $f2 = 316.00 -/* 002F0 808A9A70 C7B0004C */ lwc1 $f16, 0x004C($sp) -/* 002F4 808A9A74 C6060024 */ lwc1 $f6, 0x0024($s0) ## 00000024 -/* 002F8 808A9A78 8FA60074 */ lw $a2, 0x0074($sp) -/* 002FC 808A9A7C 46028282 */ mul.s $f10, $f16, $f2 -/* 00300 808A9A80 240F0001 */ addiu $t7, $zero, 0x0001 ## $t7 = 00000001 -/* 00304 808A9A84 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00308 808A9A88 46020102 */ mul.s $f4, $f0, $f2 -/* 0030C 808A9A8C 2407004A */ addiu $a3, $zero, 0x004A ## $a3 = 0000004A -/* 00310 808A9A90 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 00314 808A9A94 460A3201 */ sub.s $f8, $f6, $f10 -/* 00318 808A9A98 E7A80010 */ swc1 $f8, 0x0010($sp) -/* 0031C 808A9A9C C6120028 */ lwc1 $f18, 0x0028($s0) ## 00000028 -/* 00320 808A9AA0 E7B20014 */ swc1 $f18, 0x0014($sp) -/* 00324 808A9AA4 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C -/* 00328 808A9AA8 46102180 */ add.s $f6, $f4, $f16 -/* 0032C 808A9AAC E7A60018 */ swc1 $f6, 0x0018($sp) -/* 00330 808A9AB0 860D00B4 */ lh $t5, 0x00B4($s0) ## 000000B4 -/* 00334 808A9AB4 AFAD001C */ sw $t5, 0x001C($sp) -/* 00338 808A9AB8 860E00B6 */ lh $t6, 0x00B6($s0) ## 000000B6 -/* 0033C 808A9ABC AFAF0028 */ sw $t7, 0x0028($sp) -/* 00340 808A9AC0 AFA00024 */ sw $zero, 0x0024($sp) -/* 00344 808A9AC4 0C00C916 */ jal Actor_SpawnAsChild - -/* 00348 808A9AC8 AFAE0020 */ sw $t6, 0x0020($sp) -/* 0034C 808A9ACC 14400005 */ bne $v0, $zero, .L808A9AE4 -/* 00350 808A9AD0 00000000 */ nop -/* 00354 808A9AD4 0C00B55C */ jal Actor_Kill - -/* 00358 808A9AD8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0035C 808A9ADC 0C00B55C */ jal Actor_Kill - -/* 00360 808A9AE0 8E040118 */ lw $a0, 0x0118($s0) ## 00000118 -.L808A9AE4: -/* 00364 808A9AE4 3C18808B */ lui $t8, %hi(func_808A9E58) ## $t8 = 808B0000 -/* 00368 808A9AE8 27189E58 */ addiu $t8, $t8, %lo(func_808A9E58) ## $t8 = 808A9E58 -/* 0036C 808A9AEC 10000003 */ beq $zero, $zero, .L808A9AFC -/* 00370 808A9AF0 AE180164 */ sw $t8, 0x0164($s0) ## 00000164 -.L808A9AF4: -/* 00374 808A9AF4 27399E58 */ addiu $t9, $t9, %lo(func_808A9E58) ## $t9 = FFFF9E58 -/* 00378 808A9AF8 AE190164 */ sw $t9, 0x0164($s0) ## 00000164 -.L808A9AFC: -/* 0037C 808A9AFC 8608001C */ lh $t0, 0x001C($s0) ## 0000001C -/* 00380 808A9B00 8FA40074 */ lw $a0, 0x0074($sp) -/* 00384 808A9B04 26060170 */ addiu $a2, $s0, 0x0170 ## $a2 = 00000170 -/* 00388 808A9B08 0500001B */ bltz $t0, .L808A9B78 -/* 0038C 808A9B0C 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 -/* 00390 808A9B10 0C01E9D9 */ jal LightContext_InsertLight - -/* 00394 808A9B14 AFA60048 */ sw $a2, 0x0048($sp) -/* 00398 808A9B18 8609001C */ lh $t1, 0x001C($s0) ## 0000001C -/* 0039C 808A9B1C AE02016C */ sw $v0, 0x016C($s0) ## 0000016C -/* 003A0 808A9B20 8FA40048 */ lw $a0, 0x0048($sp) -/* 003A4 808A9B24 15200005 */ bne $t1, $zero, .L808A9B3C -/* 003A8 808A9B28 240600A8 */ addiu $a2, $zero, 0x00A8 ## $a2 = 000000A8 -/* 003AC 808A9B2C 3C014382 */ lui $at, 0x4382 ## $at = 43820000 -/* 003B0 808A9B30 44811000 */ mtc1 $at, $f2 ## $f2 = 260.00 -/* 003B4 808A9B34 10000005 */ beq $zero, $zero, .L808A9B4C -/* 003B8 808A9B38 4600128D */ trunc.w.s $f10, $f2 -.L808A9B3C: -/* 003BC 808A9B3C 3C01C382 */ lui $at, 0xC382 ## $at = C3820000 -/* 003C0 808A9B40 44811000 */ mtc1 $at, $f2 ## $f2 = -260.00 -/* 003C4 808A9B44 00000000 */ nop -/* 003C8 808A9B48 4600128D */ trunc.w.s $f10, $f2 -.L808A9B4C: -/* 003CC 808A9B4C 240B00FF */ addiu $t3, $zero, 0x00FF ## $t3 = 000000FF -/* 003D0 808A9B50 240C00FF */ addiu $t4, $zero, 0x00FF ## $t4 = 000000FF -/* 003D4 808A9B54 AFAC0014 */ sw $t4, 0x0014($sp) -/* 003D8 808A9B58 44055000 */ mfc1 $a1, $f10 -/* 003DC 808A9B5C AFAB0010 */ sw $t3, 0x0010($sp) -/* 003E0 808A9B60 240702B2 */ addiu $a3, $zero, 0x02B2 ## $a3 = 000002B2 -/* 003E4 808A9B64 00052C00 */ sll $a1, $a1, 16 -/* 003E8 808A9B68 00052C03 */ sra $a1, $a1, 16 -/* 003EC 808A9B6C AFA00018 */ sw $zero, 0x0018($sp) -/* 003F0 808A9B70 0C01E77C */ jal Lights_PointGlowSetInfo - -/* 003F4 808A9B74 AFA0001C */ sw $zero, 0x001C($sp) -.L808A9B78: -/* 003F8 808A9B78 8FBF003C */ lw $ra, 0x003C($sp) -.L808A9B7C: -/* 003FC 808A9B7C 8FB00038 */ lw $s0, 0x0038($sp) -/* 00400 808A9B80 27BD0070 */ addiu $sp, $sp, 0x0070 ## $sp = 00000000 -/* 00404 808A9B84 03E00008 */ jr $ra -/* 00408 808A9B88 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Update.s deleted file mode 100644 index 556a4ff7f7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Update.s +++ /dev/null @@ -1,212 +0,0 @@ -.late_rodata -glabel D_808AA884 - .word 0x44D48000 -glabel D_808AA888 - .word 0x3B3B3EE7 - -.text -glabel BgSpot00Hanebasi_Update -/* 0082C 808A9FAC 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00830 808A9FB0 AFBF001C */ sw $ra, 0x001C($sp) -/* 00834 808A9FB4 AFB00018 */ sw $s0, 0x0018($sp) -/* 00838 808A9FB8 AFA40030 */ sw $a0, 0x0030($sp) -/* 0083C 808A9FBC 8C990164 */ lw $t9, 0x0164($a0) ## 00000164 -/* 00840 808A9FC0 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00844 808A9FC4 0320F809 */ jalr $ra, $t9 -/* 00848 808A9FC8 00000000 */ nop -/* 0084C 808A9FCC 8FA70030 */ lw $a3, 0x0030($sp) -/* 00850 808A9FD0 2401FFFF */ addiu $at, $zero, 0xFFFF ## $at = FFFFFFFF -/* 00854 808A9FD4 84EE001C */ lh $t6, 0x001C($a3) ## 0000001C -/* 00858 808A9FD8 55C100B1 */ bnel $t6, $at, .L808AA2A0 -/* 0085C 808A9FDC 8FBF001C */ lw $ra, 0x001C($sp) -/* 00860 808A9FE0 860F00A4 */ lh $t7, 0x00A4($s0) ## 000000A4 -/* 00864 808A9FE4 24010051 */ addiu $at, $zero, 0x0051 ## $at = 00000051 -/* 00868 808A9FE8 3C038012 */ lui $v1, %hi(gBitFlags) -/* 0086C 808A9FEC 15E10066 */ bne $t7, $at, .L808AA188 -/* 00870 808A9FF0 24637120 */ addiu $v1, %lo(gBitFlags) -/* 00874 808A9FF4 3C088016 */ lui $t0, %hi(gSaveContext) -/* 00878 808A9FF8 2508E660 */ addiu $t0, %lo(gSaveContext) -/* 0087C 808A9FFC 8D0200A4 */ lw $v0, 0x00A4($t0) ## 8015E704 -/* 00880 808AA000 8C780048 */ lw $t8, 0x0048($v1) ## 80127168 -/* 00884 808AA004 03024824 */ and $t1, $t8, $v0 -/* 00888 808AA008 1120005F */ beq $t1, $zero, .L808AA188 -/* 0088C 808AA00C 00000000 */ nop -/* 00890 808AA010 8C6A004C */ lw $t2, 0x004C($v1) ## 8012716C -/* 00894 808AA014 01425824 */ and $t3, $t2, $v0 -/* 00898 808AA018 1160005B */ beq $t3, $zero, .L808AA188 -/* 0089C 808AA01C 00000000 */ nop -/* 008A0 808AA020 8C6C0050 */ lw $t4, 0x0050($v1) ## 80127170 -/* 008A4 808AA024 01826824 */ and $t5, $t4, $v0 -/* 008A8 808AA028 11A00057 */ beq $t5, $zero, .L808AA188 -/* 008AC 808AA02C 00000000 */ nop -/* 008B0 808AA030 95190EE4 */ lhu $t9, 0x0EE4($t0) ## 8015F544 -/* 008B4 808AA034 332E0001 */ andi $t6, $t9, 0x0001 ## $t6 = 00000000 -/* 008B8 808AA038 15C00053 */ bne $t6, $zero, .L808AA188 -/* 008BC 808AA03C 00000000 */ nop -/* 008C0 808AA040 8D0F0004 */ lw $t7, 0x0004($t0) ## 8015E664 -/* 008C4 808AA044 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 008C8 808AA048 15E1004F */ bne $t7, $at, .L808AA188 -/* 008CC 808AA04C 00000000 */ nop -/* 008D0 808AA050 8E051C44 */ lw $a1, 0x1C44($s0) ## 00001C44 -/* 008D4 808AA054 3C01C3E1 */ lui $at, 0xC3E1 ## $at = C3E10000 -/* 008D8 808AA058 44812000 */ mtc1 $at, $f4 ## $f4 = -450.00 -/* 008DC 808AA05C C4A00024 */ lwc1 $f0, 0x0024($a1) ## 00000024 -/* 008E0 808AA060 3C0143E1 */ lui $at, 0x43E1 ## $at = 43E10000 -/* 008E4 808AA064 4600203C */ c.lt.s $f4, $f0 -/* 008E8 808AA068 00000000 */ nop -/* 008EC 808AA06C 4502003D */ bc1fl .L808AA164 -/* 008F0 808AA070 3C05453B */ lui $a1, 0x453B ## $a1 = 453B0000 -/* 008F4 808AA074 44813000 */ mtc1 $at, $f6 ## $f6 = 450.00 -/* 008F8 808AA078 3C014487 */ lui $at, 0x4487 ## $at = 44870000 -/* 008FC 808AA07C 4606003C */ c.lt.s $f0, $f6 -/* 00900 808AA080 00000000 */ nop -/* 00904 808AA084 45020037 */ bc1fl .L808AA164 -/* 00908 808AA088 3C05453B */ lui $a1, 0x453B ## $a1 = 453B0000 -/* 0090C 808AA08C C4A0002C */ lwc1 $f0, 0x002C($a1) ## 453B002C -/* 00910 808AA090 44814000 */ mtc1 $at, $f8 ## $f8 = 1080.00 -/* 00914 808AA094 3C01808B */ lui $at, %hi(D_808AA884) ## $at = 808B0000 -/* 00918 808AA098 4600403C */ c.lt.s $f8, $f0 -/* 0091C 808AA09C 00000000 */ nop -/* 00920 808AA0A0 45020030 */ bc1fl .L808AA164 -/* 00924 808AA0A4 3C05453B */ lui $a1, 0x453B ## $a1 = 453B0000 -/* 00928 808AA0A8 C42AA884 */ lwc1 $f10, %lo(D_808AA884)($at) -/* 0092C 808AA0AC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00930 808AA0B0 460A003C */ c.lt.s $f0, $f10 -/* 00934 808AA0B4 00000000 */ nop -/* 00938 808AA0B8 4502002A */ bc1fl .L808AA164 -/* 0093C 808AA0BC 3C05453B */ lui $a1, 0x453B ## $a1 = 453B0000 -/* 00940 808AA0C0 AFA50024 */ sw $a1, 0x0024($sp) -/* 00944 808AA0C4 0C02FF21 */ jal Gameplay_InCsMode -/* 00948 808AA0C8 AFA70030 */ sw $a3, 0x0030($sp) -/* 0094C 808AA0CC 3C088016 */ lui $t0, %hi(gSaveContext) -/* 00950 808AA0D0 2508E660 */ addiu $t0, %lo(gSaveContext) -/* 00954 808AA0D4 8FA50024 */ lw $a1, 0x0024($sp) -/* 00958 808AA0D8 14400021 */ bne $v0, $zero, .L808AA160 -/* 0095C 808AA0DC 8FA70030 */ lw $a3, 0x0030($sp) -/* 00960 808AA0E0 95180EE4 */ lhu $t8, 0x0EE4($t0) ## 8015F544 -/* 00964 808AA0E4 24040082 */ addiu $a0, $zero, 0x0082 ## $a0 = 00000082 -/* 00968 808AA0E8 AFA50024 */ sw $a1, 0x0024($sp) -/* 0096C 808AA0EC 37090001 */ ori $t1, $t8, 0x0001 ## $t1 = 00000001 -/* 00970 808AA0F0 A5090EE4 */ sh $t1, 0x0EE4($t0) ## 8015F544 -/* 00974 808AA0F4 0C00D6DD */ jal Flags_SetEventChkInf - -/* 00978 808AA0F8 AFA70030 */ sw $a3, 0x0030($sp) -/* 0097C 808AA0FC 8FA70030 */ lw $a3, 0x0030($sp) -/* 00980 808AA100 3C0A808B */ lui $t2, %hi(func_808A9D18) ## $t2 = 808B0000 -/* 00984 808AA104 8FA50024 */ lw $a1, 0x0024($sp) -/* 00988 808AA108 254A9D18 */ addiu $t2, $t2, %lo(func_808A9D18) ## $t2 = 808A9D18 -/* 0098C 808AA10C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00990 808AA110 24060008 */ addiu $a2, $zero, 0x0008 ## $a2 = 00000008 -/* 00994 808AA114 0C00B7D5 */ jal func_8002DF54 -/* 00998 808AA118 ACEA0164 */ sw $t2, 0x0164($a3) ## 00000164 -/* 0099C 808AA11C 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 009A0 808AA120 00300821 */ addu $at, $at, $s0 -/* 009A4 808AA124 240B00CD */ addiu $t3, $zero, 0x00CD ## $t3 = 000000CD -/* 009A8 808AA128 3C088016 */ lui $t0, %hi(gSaveContext) -/* 009AC 808AA12C A42B1E1A */ sh $t3, 0x1E1A($at) ## 00011E1A -/* 009B0 808AA130 2508E660 */ addiu $t0, %lo(gSaveContext) -/* 009B4 808AA134 340CFFF1 */ ori $t4, $zero, 0xFFF1 ## $t4 = 0000FFF1 -/* 009B8 808AA138 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 009BC 808AA13C A50C1412 */ sh $t4, 0x1412($t0) ## 8015FA72 -/* 009C0 808AA140 00300821 */ addu $at, $at, $s0 -/* 009C4 808AA144 240D0014 */ addiu $t5, $zero, 0x0014 ## $t5 = 00000014 -/* 009C8 808AA148 A02D1E15 */ sb $t5, 0x1E15($at) ## 00011E15 -/* 009CC 808AA14C 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 009D0 808AA150 00300821 */ addu $at, $at, $s0 -/* 009D4 808AA154 24190004 */ addiu $t9, $zero, 0x0004 ## $t9 = 00000004 -/* 009D8 808AA158 1000000B */ beq $zero, $zero, .L808AA188 -/* 009DC 808AA15C A0391E5E */ sb $t9, 0x1E5E($at) ## 00011E5E -.L808AA160: -/* 009E0 808AA160 3C05453B */ lui $a1, 0x453B ## $a1 = 453B0000 -.L808AA164: -/* 009E4 808AA164 34A58000 */ ori $a1, $a1, 0x8000 ## $a1 = 453B8000 -/* 009E8 808AA168 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 009EC 808AA16C 0C00B84B */ jal func_8002E12C -/* 009F0 808AA170 24067530 */ addiu $a2, $zero, 0x7530 ## $a2 = 00007530 -/* 009F4 808AA174 10400004 */ beq $v0, $zero, .L808AA188 -/* 009F8 808AA178 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 009FC 808AA17C 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00A00 808AA180 00300821 */ addu $at, $at, $s0 -/* 00A04 808AA184 A02E0B01 */ sb $t6, 0x0B01($at) ## 00010B01 -.L808AA188: -/* 00A08 808AA188 3C088016 */ lui $t0, %hi(gSaveContext) -/* 00A0C 808AA18C 2508E660 */ addiu $t0, %lo(gSaveContext) -/* 00A10 808AA190 8D041360 */ lw $a0, 0x1360($t0) ## 8015F9C0 -/* 00A14 808AA194 24060005 */ addiu $a2, $zero, 0x0005 ## $a2 = 00000005 -/* 00A18 808AA198 3C058012 */ lui $a1, %hi(D_8011FB40) -/* 00A1C 808AA19C 14C4003F */ bne $a2, $a0, .L808AA29C -/* 00A20 808AA1A0 24A5FB40 */ addiu $a1, %lo(D_8011FB40) -/* 00A24 808AA1A4 94AF0000 */ lhu $t7, 0x0000($a1) ## 8011FB40 -/* 00A28 808AA1A8 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032 -/* 00A2C 808AA1AC 55E10033 */ bnel $t7, $at, .L808AA27C -/* 00A30 808AA1B0 9502000C */ lhu $v0, 0x000C($t0) ## 8015E66C -/* 00A34 808AA1B4 9503000C */ lhu $v1, 0x000C($t0) ## 8015E66C -/* 00A38 808AA1B8 3401D557 */ ori $at, $zero, 0xD557 ## $at = 0000D557 -/* 00A3C 808AA1BC 3402D556 */ ori $v0, $zero, 0xD556 ## $v0 = 0000D556 -/* 00A40 808AA1C0 0061082A */ slt $at, $v1, $at -/* 00A44 808AA1C4 54200004 */ bnel $at, $zero, .L808AA1D8 -/* 00A48 808AA1C8 0043C023 */ subu $t8, $v0, $v1 -/* 00A4C 808AA1CC 3C020001 */ lui $v0, 0x0001 ## $v0 = 00010000 -/* 00A50 808AA1D0 3442D556 */ ori $v0, $v0, 0xD556 ## $v0 = 0001D556 -/* 00A54 808AA1D4 0043C023 */ subu $t8, $v0, $v1 -.L808AA1D8: -/* 00A58 808AA1D8 44988000 */ mtc1 $t8, $f16 ## $f16 = 0.00 -/* 00A5C 808AA1DC 3C01808B */ lui $at, %hi(D_808AA888) ## $at = 808B0000 -/* 00A60 808AA1E0 C424A888 */ lwc1 $f4, %lo(D_808AA888)($at) -/* 00A64 808AA1E4 468084A0 */ cvt.s.w $f18, $f16 -/* 00A68 808AA1E8 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00A6C 808AA1EC 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000 -/* 00A70 808AA1F0 46049182 */ mul.s $f6, $f18, $f4 -/* 00A74 808AA1F4 4449F800 */ cfc1 $t1, $31 -/* 00A78 808AA1F8 44CAF800 */ ctc1 $t2, $31 -/* 00A7C 808AA1FC 00000000 */ nop -/* 00A80 808AA200 46003224 */ cvt.w.s $f8, $f6 -/* 00A84 808AA204 444AF800 */ cfc1 $t2, $31 -/* 00A88 808AA208 00000000 */ nop -/* 00A8C 808AA20C 314A0078 */ andi $t2, $t2, 0x0078 ## $t2 = 00000000 -/* 00A90 808AA210 51400013 */ beql $t2, $zero, .L808AA260 -/* 00A94 808AA214 440A4000 */ mfc1 $t2, $f8 -/* 00A98 808AA218 44814000 */ mtc1 $at, $f8 ## $f8 = 2147483648.00 -/* 00A9C 808AA21C 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00AA0 808AA220 46083201 */ sub.s $f8, $f6, $f8 -/* 00AA4 808AA224 44CAF800 */ ctc1 $t2, $31 -/* 00AA8 808AA228 00000000 */ nop -/* 00AAC 808AA22C 46004224 */ cvt.w.s $f8, $f8 -/* 00AB0 808AA230 444AF800 */ cfc1 $t2, $31 -/* 00AB4 808AA234 00000000 */ nop -/* 00AB8 808AA238 314A0078 */ andi $t2, $t2, 0x0078 ## $t2 = 00000000 -/* 00ABC 808AA23C 15400005 */ bne $t2, $zero, .L808AA254 -/* 00AC0 808AA240 00000000 */ nop -/* 00AC4 808AA244 440A4000 */ mfc1 $t2, $f8 -/* 00AC8 808AA248 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 00ACC 808AA24C 10000007 */ beq $zero, $zero, .L808AA26C -/* 00AD0 808AA250 01415025 */ or $t2, $t2, $at ## $t2 = 80000000 -.L808AA254: -/* 00AD4 808AA254 10000005 */ beq $zero, $zero, .L808AA26C -/* 00AD8 808AA258 240AFFFF */ addiu $t2, $zero, 0xFFFF ## $t2 = FFFFFFFF -/* 00ADC 808AA25C 440A4000 */ mfc1 $t2, $f8 -.L808AA260: -/* 00AE0 808AA260 00000000 */ nop -/* 00AE4 808AA264 0540FFFB */ bltz $t2, .L808AA254 -/* 00AE8 808AA268 00000000 */ nop -.L808AA26C: -/* 00AEC 808AA26C 44C9F800 */ ctc1 $t1, $31 -/* 00AF0 808AA270 A4AA0000 */ sh $t2, 0x0000($a1) ## 8011FB40 -/* 00AF4 808AA274 00000000 */ nop -/* 00AF8 808AA278 9502000C */ lhu $v0, 0x000C($t0) ## 8015E66C -.L808AA27C: -/* 00AFC 808AA27C 28412AAC */ slti $at, $v0, 0x2AAC -/* 00B00 808AA280 14200006 */ bne $at, $zero, .L808AA29C -/* 00B04 808AA284 28413000 */ slti $at, $v0, 0x3000 -/* 00B08 808AA288 50200005 */ beql $at, $zero, .L808AA2A0 -/* 00B0C 808AA28C 8FBF001C */ lw $ra, 0x001C($sp) -/* 00B10 808AA290 54C40003 */ bnel $a2, $a0, .L808AA2A0 -/* 00B14 808AA294 8FBF001C */ lw $ra, 0x001C($sp) -/* 00B18 808AA298 A4A00000 */ sh $zero, 0x0000($a1) ## 8011FB40 -.L808AA29C: -/* 00B1C 808AA29C 8FBF001C */ lw $ra, 0x001C($sp) -.L808AA2A0: -/* 00B20 808AA2A0 8FB00018 */ lw $s0, 0x0018($sp) -/* 00B24 808AA2A4 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 00B28 808AA2A8 03E00008 */ jr $ra -/* 00B2C 808AA2AC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9BE8.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9BE8.s deleted file mode 100644 index f9df2fd198..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9BE8.s +++ /dev/null @@ -1,84 +0,0 @@ -glabel func_808A9BE8 -/* 00468 808A9BE8 3C078016 */ lui $a3, %hi(gSaveContext) -/* 0046C 808A9BEC 24E7E660 */ addiu $a3, %lo(gSaveContext) -/* 00470 808A9BF0 8CE31360 */ lw $v1, 0x1360($a3) ## 8015F9C0 -/* 00474 808A9BF4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00478 808A9BF8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0047C 808A9BFC AFA50024 */ sw $a1, 0x0024($sp) -/* 00480 808A9C00 28610004 */ slti $at, $v1, 0x0004 -/* 00484 808A9C04 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00488 808A9C08 10200014 */ beq $at, $zero, .L808A9C5C -/* 0048C 808A9C0C 8C88011C */ lw $t0, 0x011C($a0) ## 0000011C -/* 00490 808A9C10 3C048012 */ lui $a0, %hi(gBitFlags) -/* 00494 808A9C14 24847120 */ addiu $a0, %lo(gBitFlags) -/* 00498 808A9C18 8C8E0048 */ lw $t6, 0x0048($a0) ## 80127168 -/* 0049C 808A9C1C 8CE200A4 */ lw $v0, 0x00A4($a3) ## 8015E704 -/* 004A0 808A9C20 01C27824 */ and $t7, $t6, $v0 -/* 004A4 808A9C24 51E0000E */ beql $t7, $zero, .L808A9C60 -/* 004A8 808A9C28 84CD00B4 */ lh $t5, 0x00B4($a2) ## 000000B4 -/* 004AC 808A9C2C 8C98004C */ lw $t8, 0x004C($a0) ## 8012716C -/* 004B0 808A9C30 0302C824 */ and $t9, $t8, $v0 -/* 004B4 808A9C34 5320000A */ beql $t9, $zero, .L808A9C60 -/* 004B8 808A9C38 84CD00B4 */ lh $t5, 0x00B4($a2) ## 000000B4 -/* 004BC 808A9C3C 8C890050 */ lw $t1, 0x0050($a0) ## 80127170 -/* 004C0 808A9C40 01225024 */ and $t2, $t1, $v0 -/* 004C4 808A9C44 51400006 */ beql $t2, $zero, .L808A9C60 -/* 004C8 808A9C48 84CD00B4 */ lh $t5, 0x00B4($a2) ## 000000B4 -/* 004CC 808A9C4C 94EB0EE4 */ lhu $t3, 0x0EE4($a3) ## 8015F544 -/* 004D0 808A9C50 316C0001 */ andi $t4, $t3, 0x0001 ## $t4 = 00000000 -/* 004D4 808A9C54 5180002D */ beql $t4, $zero, .L808A9D0C -/* 004D8 808A9C58 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A9C5C: -/* 004DC 808A9C5C 84CD00B4 */ lh $t5, 0x00B4($a2) ## 000000B4 -.L808A9C60: -/* 004E0 808A9C60 8FA40024 */ lw $a0, 0x0024($sp) -/* 004E4 808A9C64 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 004E8 808A9C68 51A00016 */ beql $t5, $zero, .L808A9CC4 -/* 004EC 808A9C6C 84D800B4 */ lh $t8, 0x00B4($a2) ## 000000B4 -/* 004F0 808A9C70 AFA60020 */ sw $a2, 0x0020($sp) -/* 004F4 808A9C74 0C01B129 */ jal Flags_GetEnv -/* 004F8 808A9C78 AFA8001C */ sw $t0, 0x001C($sp) -/* 004FC 808A9C7C 3C078016 */ lui $a3, %hi(gSaveContext) -/* 00500 808A9C80 24E7E660 */ addiu $a3, %lo(gSaveContext) -/* 00504 808A9C84 8FA60020 */ lw $a2, 0x0020($sp) -/* 00508 808A9C88 14400007 */ bne $v0, $zero, .L808A9CA8 -/* 0050C 808A9C8C 8FA8001C */ lw $t0, 0x001C($sp) -/* 00510 808A9C90 8CE31360 */ lw $v1, 0x1360($a3) ## 8015F9C0 -/* 00514 808A9C94 28610004 */ slti $at, $v1, 0x0004 -/* 00518 808A9C98 5020000A */ beql $at, $zero, .L808A9CC4 -/* 0051C 808A9C9C 84D800B4 */ lh $t8, 0x00B4($a2) ## 000000B4 -/* 00520 808A9CA0 8CEE0010 */ lw $t6, 0x0010($a3) ## 8015E670 -/* 00524 808A9CA4 15C00006 */ bne $t6, $zero, .L808A9CC0 -.L808A9CA8: -/* 00528 808A9CA8 3C0F808B */ lui $t7, %hi(func_808A9D24) ## $t7 = 808B0000 -/* 0052C 808A9CAC 25EF9D24 */ addiu $t7, $t7, %lo(func_808A9D24) ## $t7 = 808A9D24 -/* 00530 808A9CB0 ACCF0164 */ sw $t7, 0x0164($a2) ## 00000164 -/* 00534 808A9CB4 A4C00168 */ sh $zero, 0x0168($a2) ## 00000168 -/* 00538 808A9CB8 10000013 */ beq $zero, $zero, .L808A9D08 -/* 0053C 808A9CBC A5000168 */ sh $zero, 0x0168($t0) ## 00000168 -.L808A9CC0: -/* 00540 808A9CC0 84D800B4 */ lh $t8, 0x00B4($a2) ## 000000B4 -.L808A9CC4: -/* 00544 808A9CC4 28610004 */ slti $at, $v1, 0x0004 -/* 00548 808A9CC8 57000010 */ bnel $t8, $zero, .L808A9D0C -/* 0054C 808A9CCC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00550 808A9CD0 5020000E */ beql $at, $zero, .L808A9D0C -/* 00554 808A9CD4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00558 808A9CD8 8CF90004 */ lw $t9, 0x0004($a3) ## 8015E664 -/* 0055C 808A9CDC 5320000B */ beql $t9, $zero, .L808A9D0C -/* 00560 808A9CE0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00564 808A9CE4 8CE90010 */ lw $t1, 0x0010($a3) ## 8015E670 -/* 00568 808A9CE8 3C0A808B */ lui $t2, %hi(func_808A9D24) ## $t2 = 808B0000 -/* 0056C 808A9CEC 254A9D24 */ addiu $t2, $t2, %lo(func_808A9D24) ## $t2 = 808A9D24 -/* 00570 808A9CF0 11200005 */ beq $t1, $zero, .L808A9D08 -/* 00574 808A9CF4 240BC000 */ addiu $t3, $zero, 0xC000 ## $t3 = FFFFC000 -/* 00578 808A9CF8 ACCA0164 */ sw $t2, 0x0164($a2) ## 00000164 -/* 0057C 808A9CFC A4CB0168 */ sh $t3, 0x0168($a2) ## 00000168 -/* 00580 808A9D00 240CF020 */ addiu $t4, $zero, 0xF020 ## $t4 = FFFFF020 -/* 00584 808A9D04 A50C0168 */ sh $t4, 0x0168($t0) ## 00000168 -.L808A9D08: -/* 00588 808A9D08 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A9D0C: -/* 0058C 808A9D0C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00590 808A9D10 03E00008 */ jr $ra -/* 00594 808A9D14 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D18.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D18.s deleted file mode 100644 index 3c368132ef..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D18.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel func_808A9D18 -/* 00598 808A9D18 AFA40000 */ sw $a0, 0x0000($sp) -/* 0059C 808A9D1C 03E00008 */ jr $ra -/* 005A0 808A9D20 AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D24.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D24.s deleted file mode 100644 index 8a997944ff..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D24.s +++ /dev/null @@ -1,94 +0,0 @@ -.late_rodata -glabel D_808AA878 - .float 0.4 - -.text -glabel func_808A9D24 -/* 005A4 808A9D24 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 005A8 808A9D28 AFBF0014 */ sw $ra, 0x0014($sp) -/* 005AC 808A9D2C AFA5002C */ sw $a1, 0x002C($sp) -/* 005B0 808A9D30 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 005B4 808A9D34 84E50168 */ lh $a1, 0x0168($a3) ## 00000168 -/* 005B8 808A9D38 AFA70028 */ sw $a3, 0x0028($sp) -/* 005BC 808A9D3C 248400B4 */ addiu $a0, $a0, 0x00B4 ## $a0 = 000000B4 -/* 005C0 808A9D40 0C01DE2B */ jal Math_ScaledStepToS - -/* 005C4 808A9D44 24060050 */ addiu $a2, $zero, 0x0050 ## $a2 = 00000050 -/* 005C8 808A9D48 10400004 */ beq $v0, $zero, .L808A9D5C -/* 005CC 808A9D4C 8FA70028 */ lw $a3, 0x0028($sp) -/* 005D0 808A9D50 3C0E808B */ lui $t6, %hi(func_808A9BE8) ## $t6 = 808B0000 -/* 005D4 808A9D54 25CE9BE8 */ addiu $t6, $t6, %lo(func_808A9BE8) ## $t6 = 808A9BE8 -/* 005D8 808A9D58 ACEE0164 */ sw $t6, 0x0164($a3) ## 00000164 -.L808A9D5C: -/* 005DC 808A9D5C 84EF00B4 */ lh $t7, 0x00B4($a3) ## 000000B4 -/* 005E0 808A9D60 3C09808B */ lui $t1, %hi(func_808A9BE8) ## $t1 = 808B0000 -/* 005E4 808A9D64 25299BE8 */ addiu $t1, $t1, %lo(func_808A9BE8) ## $t1 = 808A9BE8 -/* 005E8 808A9D68 29E1D828 */ slti $at, $t7, 0xD828 -/* 005EC 808A9D6C 1420001B */ bne $at, $zero, .L808A9DDC -/* 005F0 808A9D70 24180050 */ addiu $t8, $zero, 0x0050 ## $t8 = 00000050 -/* 005F4 808A9D74 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00 -/* 005F8 808A9D78 3C01808B */ lui $at, %hi(D_808AA878) ## $at = 808B0000 -/* 005FC 808A9D7C C428A878 */ lwc1 $f8, %lo(D_808AA878)($at) -/* 00600 808A9D80 468021A0 */ cvt.s.w $f6, $f4 -/* 00604 808A9D84 8CE3011C */ lw $v1, 0x011C($a3) ## 0000011C -/* 00608 808A9D88 84650168 */ lh $a1, 0x0168($v1) ## 00000168 -/* 0060C 808A9D8C AFA90018 */ sw $t1, 0x0018($sp) -/* 00610 808A9D90 46083282 */ mul.s $f10, $f6, $f8 -/* 00614 808A9D94 AFA70028 */ sw $a3, 0x0028($sp) -/* 00618 808A9D98 AFA30024 */ sw $v1, 0x0024($sp) -/* 0061C 808A9D9C 246400B4 */ addiu $a0, $v1, 0x00B4 ## $a0 = 000000B4 -/* 00620 808A9DA0 4600540D */ trunc.w.s $f16, $f10 -/* 00624 808A9DA4 44068000 */ mfc1 $a2, $f16 -/* 00628 808A9DA8 00000000 */ nop -/* 0062C 808A9DAC 00063400 */ sll $a2, $a2, 16 -/* 00630 808A9DB0 00063403 */ sra $a2, $a2, 16 -/* 00634 808A9DB4 0C01DE2B */ jal Math_ScaledStepToS - -/* 00638 808A9DB8 A7A6001E */ sh $a2, 0x001E($sp) -/* 0063C 808A9DBC 8FA30024 */ lw $v1, 0x0024($sp) -/* 00640 808A9DC0 87A6001E */ lh $a2, 0x001E($sp) -/* 00644 808A9DC4 8C68011C */ lw $t0, 0x011C($v1) ## 0000011C -/* 00648 808A9DC8 84650168 */ lh $a1, 0x0168($v1) ## 00000168 -/* 0064C 808A9DCC 0C01DE2B */ jal Math_ScaledStepToS - -/* 00650 808A9DD0 250400B4 */ addiu $a0, $t0, 0x00B4 ## $a0 = 000000B4 -/* 00654 808A9DD4 8FA70028 */ lw $a3, 0x0028($sp) -/* 00658 808A9DD8 8FA90018 */ lw $t1, 0x0018($sp) -.L808A9DDC: -/* 0065C 808A9DDC 84EA0168 */ lh $t2, 0x0168($a3) ## 00000168 -/* 00660 808A9DE0 0543000F */ bgezl $t2, .L808A9E20 -/* 00664 808A9DE4 8CEC0164 */ lw $t4, 0x0164($a3) ## 00000164 -/* 00668 808A9DE8 8CEB0164 */ lw $t3, 0x0164($a3) ## 00000164 -/* 0066C 808A9DEC 2405280F */ addiu $a1, $zero, 0x280F ## $a1 = 0000280F -/* 00670 808A9DF0 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00674 808A9DF4 152B0005 */ bne $t1, $t3, .L808A9E0C -/* 00678 808A9DF8 00000000 */ nop -/* 0067C 808A9DFC 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00680 808A9E00 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00684 808A9E04 10000011 */ beq $zero, $zero, .L808A9E4C -/* 00688 808A9E08 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A9E0C: -/* 0068C 808A9E0C 0C00BE5D */ jal func_8002F974 -/* 00690 808A9E10 2405200D */ addiu $a1, $zero, 0x200D ## $a1 = 0000200D -/* 00694 808A9E14 1000000D */ beq $zero, $zero, .L808A9E4C -/* 00698 808A9E18 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0069C 808A9E1C 8CEC0164 */ lw $t4, 0x0164($a3) ## 00000164 -.L808A9E20: -/* 006A0 808A9E20 2405280E */ addiu $a1, $zero, 0x280E ## $a1 = 0000280E -/* 006A4 808A9E24 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 006A8 808A9E28 152C0005 */ bne $t1, $t4, .L808A9E40 -/* 006AC 808A9E2C 00000000 */ nop -/* 006B0 808A9E30 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 006B4 808A9E34 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 006B8 808A9E38 10000004 */ beq $zero, $zero, .L808A9E4C -/* 006BC 808A9E3C 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A9E40: -/* 006C0 808A9E40 0C00BE5D */ jal func_8002F974 -/* 006C4 808A9E44 2405200C */ addiu $a1, $zero, 0x200C ## $a1 = 0000200C -/* 006C8 808A9E48 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A9E4C: -/* 006CC 808A9E4C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 006D0 808A9E50 03E00008 */ jr $ra -/* 006D4 808A9E54 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s deleted file mode 100644 index 33b9439ae6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s +++ /dev/null @@ -1,101 +0,0 @@ -.late_rodata -glabel D_808AA87C - .float 5000.0 - -glabel D_808AA880 - .word 0x47127C00 - -.text -glabel func_808A9E58 -/* 006D8 808A9E58 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 006DC 808A9E5C AFBF0024 */ sw $ra, 0x0024($sp) -/* 006E0 808A9E60 AFA40028 */ sw $a0, 0x0028($sp) -/* 006E4 808A9E64 0C03F66B */ jal Rand_ZeroOne - ## Rand.Next() float -/* 006E8 808A9E68 AFA5002C */ sw $a1, 0x002C($sp) -/* 006EC 808A9E6C 3C0142FE */ lui $at, 0x42FE ## $at = 42FE0000 -/* 006F0 808A9E70 44812000 */ mtc1 $at, $f4 ## $f4 = 127.00 -/* 006F4 808A9E74 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 006F8 808A9E78 3C014F00 */ lui $at, 0x4F00 ## $at = 4F000000 -/* 006FC 808A9E7C 46040182 */ mul.s $f6, $f0, $f4 -/* 00700 808A9E80 8FA30028 */ lw $v1, 0x0028($sp) -/* 00704 808A9E84 444EF800 */ cfc1 $t6, $31 -/* 00708 808A9E88 44C2F800 */ ctc1 $v0, $31 -/* 0070C 808A9E8C 00000000 */ nop -/* 00710 808A9E90 46003224 */ cvt.w.s $f8, $f6 -/* 00714 808A9E94 4442F800 */ cfc1 $v0, $31 -/* 00718 808A9E98 00000000 */ nop -/* 0071C 808A9E9C 30420078 */ andi $v0, $v0, 0x0078 ## $v0 = 00000000 -/* 00720 808A9EA0 50400013 */ beql $v0, $zero, .L808A9EF0 -/* 00724 808A9EA4 44024000 */ mfc1 $v0, $f8 -/* 00728 808A9EA8 44814000 */ mtc1 $at, $f8 ## $f8 = 2147483648.00 -/* 0072C 808A9EAC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 00730 808A9EB0 46083201 */ sub.s $f8, $f6, $f8 -/* 00734 808A9EB4 44C2F800 */ ctc1 $v0, $31 -/* 00738 808A9EB8 00000000 */ nop -/* 0073C 808A9EBC 46004224 */ cvt.w.s $f8, $f8 -/* 00740 808A9EC0 4442F800 */ cfc1 $v0, $31 -/* 00744 808A9EC4 00000000 */ nop -/* 00748 808A9EC8 30420078 */ andi $v0, $v0, 0x0078 ## $v0 = 00000000 -/* 0074C 808A9ECC 14400005 */ bne $v0, $zero, .L808A9EE4 -/* 00750 808A9ED0 00000000 */ nop -/* 00754 808A9ED4 44024000 */ mfc1 $v0, $f8 -/* 00758 808A9ED8 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 0075C 808A9EDC 10000007 */ beq $zero, $zero, .L808A9EFC -/* 00760 808A9EE0 00411025 */ or $v0, $v0, $at ## $v0 = 80000000 -.L808A9EE4: -/* 00764 808A9EE4 10000005 */ beq $zero, $zero, .L808A9EFC -/* 00768 808A9EE8 2402FFFF */ addiu $v0, $zero, 0xFFFF ## $v0 = FFFFFFFF -/* 0076C 808A9EEC 44024000 */ mfc1 $v0, $f8 -.L808A9EF0: -/* 00770 808A9EF0 00000000 */ nop -/* 00774 808A9EF4 0440FFFB */ bltz $v0, .L808A9EE4 -/* 00778 808A9EF8 00000000 */ nop -.L808A9EFC: -/* 0077C 808A9EFC 846F001C */ lh $t7, 0x001C($v1) ## 0000001C -/* 00780 808A9F00 44CEF800 */ ctc1 $t6, $31 -/* 00784 808A9F04 24420080 */ addiu $v0, $v0, 0x0080 ## $v0 = 0000007F -/* 00788 808A9F08 15E00005 */ bne $t7, $zero, .L808A9F20 -/* 0078C 808A9F0C 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 0000007F -/* 00790 808A9F10 3C014382 */ lui $at, 0x4382 ## $at = 43820000 -/* 00794 808A9F14 44811000 */ mtc1 $at, $f2 ## $f2 = 260.00 -/* 00798 808A9F18 10000004 */ beq $zero, $zero, .L808A9F2C -/* 0079C 808A9F1C 00000000 */ nop -.L808A9F20: -/* 007A0 808A9F20 3C01C382 */ lui $at, 0xC382 ## $at = C3820000 -/* 007A4 808A9F24 44811000 */ mtc1 $at, $f2 ## $f2 = -260.00 -/* 007A8 808A9F28 00000000 */ nop -.L808A9F2C: -/* 007AC 808A9F2C 3C01808B */ lui $at, %hi(D_808AA7B0) ## $at = 808B0000 -/* 007B0 808A9F30 C420A7B0 */ lwc1 $f0, %lo(D_808AA7B0)($at) -/* 007B4 808A9F34 3C01808B */ lui $at, %hi(D_808AA87C) ## $at = 808B0000 -/* 007B8 808A9F38 C430A87C */ lwc1 $f16, %lo(D_808AA87C)($at) -/* 007BC 808A9F3C 4600128D */ trunc.w.s $f10, $f2 -/* 007C0 808A9F40 3C014300 */ lui $at, 0x4300 ## $at = 43000000 -/* 007C4 808A9F44 46008482 */ mul.s $f18, $f16, $f0 -/* 007C8 808A9F48 44812000 */ mtc1 $at, $f4 ## $f4 = 128.00 -/* 007CC 808A9F4C 44055000 */ mfc1 $a1, $f10 -/* 007D0 808A9F50 3C01808B */ lui $at, %hi(D_808AA880) ## $at = 808B0000 -/* 007D4 808A9F54 C42AA880 */ lwc1 $f10, %lo(D_808AA880)($at) -/* 007D8 808A9F58 00052C00 */ sll $a1, $a1, 16 -/* 007DC 808A9F5C 00052C03 */ sra $a1, $a1, 16 -/* 007E0 808A9F60 460A0402 */ mul.s $f16, $f0, $f10 -/* 007E4 808A9F64 46049180 */ add.s $f6, $f18, $f4 -/* 007E8 808A9F68 24640170 */ addiu $a0, $v1, 0x0170 ## $a0 = 00000170 -/* 007EC 808A9F6C 240702B2 */ addiu $a3, $zero, 0x02B2 ## $a3 = 000002B2 -/* 007F0 808A9F70 AFA20010 */ sw $v0, 0x0010($sp) -/* 007F4 808A9F74 AFA20014 */ sw $v0, 0x0014($sp) -/* 007F8 808A9F78 4600320D */ trunc.w.s $f8, $f6 -/* 007FC 808A9F7C AFA00018 */ sw $zero, 0x0018($sp) -/* 00800 808A9F80 4600848D */ trunc.w.s $f18, $f16 -/* 00804 808A9F84 44064000 */ mfc1 $a2, $f8 -/* 00808 808A9F88 44099000 */ mfc1 $t1, $f18 -/* 0080C 808A9F8C 00063400 */ sll $a2, $a2, 16 -/* 00810 808A9F90 00063403 */ sra $a2, $a2, 16 -/* 00814 808A9F94 0C01E77C */ jal Lights_PointGlowSetInfo - -/* 00818 808A9F98 AFA9001C */ sw $t1, 0x001C($sp) -/* 0081C 808A9F9C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00820 808A9FA0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00824 808A9FA4 03E00008 */ jr $ra -/* 00828 808A9FA8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808AA2B0.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808AA2B0.s deleted file mode 100644 index a7dc0b2fcd..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808AA2B0.s +++ /dev/null @@ -1,214 +0,0 @@ -.rdata -glabel D_808AA7D0 - .asciz "../z_bg_spot00_hanebasi.c" - .balign 4 - -glabel D_808AA7EC - .asciz "../z_bg_spot00_hanebasi.c" - .balign 4 - -glabel D_808AA808 - .asciz "../z_bg_spot00_hanebasi.c" - .balign 4 - -.late_rodata -glabel D_808AA88C - .float 0.008 - -glabel D_808AA890 - .word 0x3583126F -glabel D_808AA894 - .float 9.58738019108e-05 - -glabel D_808AA898 - .word 0x442C8000, 0x00000000 - -.text -glabel func_808AA2B0 -/* 00B30 808AA2B0 27BDFF30 */ addiu $sp, $sp, 0xFF30 ## $sp = FFFFFF30 -/* 00B34 808AA2B4 AFB3006C */ sw $s3, 0x006C($sp) -/* 00B38 808AA2B8 00A09825 */ or $s3, $a1, $zero ## $s3 = 00000000 -/* 00B3C 808AA2BC AFBF0084 */ sw $ra, 0x0084($sp) -/* 00B40 808AA2C0 AFBE0080 */ sw $s8, 0x0080($sp) -/* 00B44 808AA2C4 AFB7007C */ sw $s7, 0x007C($sp) -/* 00B48 808AA2C8 AFB60078 */ sw $s6, 0x0078($sp) -/* 00B4C 808AA2CC AFB50074 */ sw $s5, 0x0074($sp) -/* 00B50 808AA2D0 AFB40070 */ sw $s4, 0x0070($sp) -/* 00B54 808AA2D4 AFB20068 */ sw $s2, 0x0068($sp) -/* 00B58 808AA2D8 AFB10064 */ sw $s1, 0x0064($sp) -/* 00B5C 808AA2DC AFB00060 */ sw $s0, 0x0060($sp) -/* 00B60 808AA2E0 F7BC0058 */ sdc1 $f28, 0x0058($sp) -/* 00B64 808AA2E4 F7BA0050 */ sdc1 $f26, 0x0050($sp) -/* 00B68 808AA2E8 F7B80048 */ sdc1 $f24, 0x0048($sp) -/* 00B6C 808AA2EC F7B60040 */ sdc1 $f22, 0x0040($sp) -/* 00B70 808AA2F0 F7B40038 */ sdc1 $f20, 0x0038($sp) -/* 00B74 808AA2F4 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00B78 808AA2F8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00B7C 808AA2FC 3C06808B */ lui $a2, %hi(D_808AA7D0) ## $a2 = 808B0000 -/* 00B80 808AA300 24C6A7D0 */ addiu $a2, $a2, %lo(D_808AA7D0) ## $a2 = 808AA7D0 -/* 00B84 808AA304 27A400B0 */ addiu $a0, $sp, 0x00B0 ## $a0 = FFFFFFE0 -/* 00B88 808AA308 24070279 */ addiu $a3, $zero, 0x0279 ## $a3 = 00000279 -/* 00B8C 808AA30C 0C031AB1 */ jal Graph_OpenDisps -/* 00B90 808AA310 00A09025 */ or $s2, $a1, $zero ## $s2 = 00000000 -/* 00B94 808AA314 0C024F61 */ jal func_80093D84 -/* 00B98 808AA318 8E640000 */ lw $a0, 0x0000($s3) ## 00000000 -/* 00B9C 808AA31C 3C0E8016 */ lui $t6, %hi(gSaveContext+0x1360) -/* 00BA0 808AA320 8DCEF9C0 */ lw $t6, %lo(gSaveContext+0x1360)($t6) -/* 00BA4 808AA324 29C10004 */ slti $at, $t6, 0x0004 -/* 00BA8 808AA328 14200005 */ bne $at, $zero, .L808AA340 -/* 00BAC 808AA32C 3C01808B */ lui $at, %hi(D_808AA88C) ## $at = 808B0000 -/* 00BB0 808AA330 C424A88C */ lwc1 $f4, %lo(D_808AA88C)($at) -/* 00BB4 808AA334 3C01808B */ lui $at, %hi(D_808AA7B0) ## $at = 808B0000 -/* 00BB8 808AA338 1000000B */ beq $zero, $zero, .L808AA368 -/* 00BBC 808AA33C E424A7B0 */ swc1 $f4, %lo(D_808AA7B0)($at) -.L808AA340: -/* 00BC0 808AA340 860F00B4 */ lh $t7, 0x00B4($s0) ## 000000B4 -/* 00BC4 808AA344 3C01808B */ lui $at, %hi(D_808AA890) ## $at = 808B0000 -/* 00BC8 808AA348 C42AA890 */ lwc1 $f10, %lo(D_808AA890)($at) -/* 00BCC 808AA34C 000FC023 */ subu $t8, $zero, $t7 -/* 00BD0 808AA350 2719E000 */ addiu $t9, $t8, 0xE000 ## $t9 = FFFFE000 -/* 00BD4 808AA354 44993000 */ mtc1 $t9, $f6 ## $f6 = NaN -/* 00BD8 808AA358 3C01808B */ lui $at, %hi(D_808AA7B0) ## $at = 808B0000 -/* 00BDC 808AA35C 46803220 */ cvt.s.w $f8, $f6 -/* 00BE0 808AA360 460A4402 */ mul.s $f16, $f8, $f10 -/* 00BE4 808AA364 E430A7B0 */ swc1 $f16, %lo(D_808AA7B0)($at) -.L808AA368: -/* 00BE8 808AA368 866807A0 */ lh $t0, 0x07A0($s3) ## 000007A0 -/* 00BEC 808AA36C 00084880 */ sll $t1, $t0, 2 -/* 00BF0 808AA370 02695021 */ addu $t2, $s3, $t1 -/* 00BF4 808AA374 0C016A7D */ jal Camera_GetCamDirYaw -/* 00BF8 808AA378 8D440790 */ lw $a0, 0x0790($t2) ## 00000790 -/* 00BFC 808AA37C 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000 -/* 00C00 808AA380 00415821 */ addu $t3, $v0, $at -/* 00C04 808AA384 8E4202D0 */ lw $v0, 0x02D0($s2) ## 000002D0 -/* 00C08 808AA388 3C01808B */ lui $at, %hi(D_808AA894) ## $at = 808B0000 -/* 00C0C 808AA38C C426A894 */ lwc1 $f6, %lo(D_808AA894)($at) -/* 00C10 808AA390 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008 -/* 00C14 808AA394 AE4E02D0 */ sw $t6, 0x02D0($s2) ## 000002D0 -/* 00C18 808AA398 3C0FFA00 */ lui $t7, 0xFA00 ## $t7 = FA000000 -/* 00C1C 808AA39C 3C18FFFF */ lui $t8, 0xFFFF ## $t8 = FFFF0000 -/* 00C20 808AA3A0 371800FF */ ori $t8, $t8, 0x00FF ## $t8 = FFFF00FF -/* 00C24 808AA3A4 35EF8080 */ ori $t7, $t7, 0x8080 ## $t7 = FA008080 -/* 00C28 808AA3A8 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 00C2C 808AA3AC AC580004 */ sw $t8, 0x0004($v0) ## 00000004 -/* 00C30 808AA3B0 8E4202D0 */ lw $v0, 0x02D0($s2) ## 000002D0 -/* 00C34 808AA3B4 000B6400 */ sll $t4, $t3, 16 -/* 00C38 808AA3B8 000C6C03 */ sra $t5, $t4, 16 -/* 00C3C 808AA3BC 448D9000 */ mtc1 $t5, $f18 ## $f18 = 0.00 -/* 00C40 808AA3C0 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00C44 808AA3C4 0261A821 */ addu $s5, $s3, $at -/* 00C48 808AA3C8 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008 -/* 00C4C 808AA3CC AE5902D0 */ sw $t9, 0x02D0($s2) ## 000002D0 -/* 00C50 808AA3D0 3C01C382 */ lui $at, 0xC382 ## $at = C3820000 -/* 00C54 808AA3D4 46809120 */ cvt.s.w $f4, $f18 -/* 00C58 808AA3D8 3C08FB00 */ lui $t0, 0xFB00 ## $t0 = FB000000 -/* 00C5C 808AA3DC 3C09FF00 */ lui $t1, 0xFF00 ## $t1 = FF000000 -/* 00C60 808AA3E0 4481D000 */ mtc1 $at, $f26 ## $f26 = -260.00 -/* 00C64 808AA3E4 3C01808B */ lui $at, %hi(D_808AA898) ## $at = 808B0000 -/* 00C68 808AA3E8 AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 00C6C 808AA3EC AC480000 */ sw $t0, 0x0000($v0) ## 00000000 -/* 00C70 808AA3F0 C438A898 */ lwc1 $f24, %lo(D_808AA898)($at) -/* 00C74 808AA3F4 3C014300 */ lui $at, 0x4300 ## $at = 43000000 -/* 00C78 808AA3F8 4481B000 */ mtc1 $at, $f22 ## $f22 = 128.00 -/* 00C7C 808AA3FC 3C014382 */ lui $at, 0x4382 ## $at = 43820000 -/* 00C80 808AA400 3C140405 */ lui $s4, %hi(gEffFire1DL) ## $s4 = 04050000 -/* 00C84 808AA404 3C1EDA38 */ lui $s8, 0xDA38 ## $s8 = DA380000 -/* 00C88 808AA408 3C16DB06 */ lui $s6, 0xDB06 ## $s6 = DB060000 -/* 00C8C 808AA40C 4481A000 */ mtc1 $at, $f20 ## $f20 = 260.00 -/* 00C90 808AA410 46062702 */ mul.s $f28, $f4, $f6 -/* 00C94 808AA414 36D60020 */ ori $s6, $s6, 0x0020 ## $s6 = DB060020 -/* 00C98 808AA418 37DE0003 */ ori $s8, $s8, 0x0003 ## $s8 = DA380003 -/* 00C9C 808AA41C 2694D4E0 */ addiu $s4, $s4, %lo(gEffFire1DL) ## $s4 = 0404D4E0 -/* 00CA0 808AA420 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000 -/* 00CA4 808AA424 2417FFEC */ addiu $s7, $zero, 0xFFEC ## $s7 = FFFFFFEC -.L808AA428: -/* 00CA8 808AA428 8E4202D0 */ lw $v0, 0x02D0($s2) ## 000002D0 -/* 00CAC 808AA42C 240B0020 */ addiu $t3, $zero, 0x0020 ## $t3 = 00000020 -/* 00CB0 808AA430 240C0040 */ addiu $t4, $zero, 0x0040 ## $t4 = 00000040 -/* 00CB4 808AA434 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00CB8 808AA438 AE4A02D0 */ sw $t2, 0x02D0($s2) ## 000002D0 -/* 00CBC 808AA43C AC560000 */ sw $s6, 0x0000($v0) ## 00000000 -/* 00CC0 808AA440 8E640000 */ lw $a0, 0x0000($s3) ## 00000000 -/* 00CC4 808AA444 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001 -/* 00CC8 808AA448 AFAD0018 */ sw $t5, 0x0018($sp) -/* 00CCC 808AA44C AFA0001C */ sw $zero, 0x001C($sp) -/* 00CD0 808AA450 AFAC0014 */ sw $t4, 0x0014($sp) -/* 00CD4 808AA454 AFAB0010 */ sw $t3, 0x0010($sp) -/* 00CD8 808AA458 8EAE1DE4 */ lw $t6, 0x1DE4($s5) ## 00001DE4 -/* 00CDC 808AA45C 24080020 */ addiu $t0, $zero, 0x0020 ## $t0 = 00000020 -/* 00CE0 808AA460 24090080 */ addiu $t1, $zero, 0x0080 ## $t1 = 00000080 -/* 00CE4 808AA464 01D17821 */ addu $t7, $t6, $s1 -/* 00CE8 808AA468 01F70019 */ multu $t7, $s7 -/* 00CEC 808AA46C AFA90028 */ sw $t1, 0x0028($sp) -/* 00CF0 808AA470 AFA80024 */ sw $t0, 0x0024($sp) -/* 00CF4 808AA474 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00CF8 808AA478 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 00CFC 808AA47C 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00D00 808AA480 00408025 */ or $s0, $v0, $zero ## $s0 = 00000000 -/* 00D04 808AA484 0000C012 */ mflo $t8 -/* 00D08 808AA488 331901FF */ andi $t9, $t8, 0x01FF ## $t9 = 000000FF -/* 00D0C 808AA48C 0C0253D0 */ jal Gfx_TwoTexScroll -/* 00D10 808AA490 AFB90020 */ sw $t9, 0x0020($sp) -/* 00D14 808AA494 16200003 */ bne $s1, $zero, .L808AA4A4 -/* 00D18 808AA498 AE020004 */ sw $v0, 0x0004($s0) ## 00000004 -/* 00D1C 808AA49C 10000002 */ beq $zero, $zero, .L808AA4A8 -/* 00D20 808AA4A0 4600A306 */ mov.s $f12, $f20 -.L808AA4A4: -/* 00D24 808AA4A4 4600D306 */ mov.s $f12, $f26 -.L808AA4A8: -/* 00D28 808AA4A8 4406C000 */ mfc1 $a2, $f24 -/* 00D2C 808AA4AC 4600B386 */ mov.s $f14, $f22 -/* 00D30 808AA4B0 0C034261 */ jal Matrix_Translate -/* 00D34 808AA4B4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00D38 808AA4B8 4600E306 */ mov.s $f12, $f28 -/* 00D3C 808AA4BC 0C034348 */ jal Matrix_RotateY -/* 00D40 808AA4C0 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00D44 808AA4C4 3C01808B */ lui $at, %hi(D_808AA7B0) ## $at = 808B0000 -/* 00D48 808AA4C8 C42CA7B0 */ lwc1 $f12, %lo(D_808AA7B0)($at) -/* 00D4C 808AA4CC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 00D50 808AA4D0 44066000 */ mfc1 $a2, $f12 -/* 00D54 808AA4D4 0C0342A3 */ jal Matrix_Scale -/* 00D58 808AA4D8 46006386 */ mov.s $f14, $f12 -/* 00D5C 808AA4DC 8E4202D0 */ lw $v0, 0x02D0($s2) ## 000002D0 -/* 00D60 808AA4E0 3C05808B */ lui $a1, %hi(D_808AA7EC) ## $a1 = 808B0000 -/* 00D64 808AA4E4 24A5A7EC */ addiu $a1, $a1, %lo(D_808AA7EC) ## $a1 = 808AA7EC -/* 00D68 808AA4E8 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00D6C 808AA4EC AE4A02D0 */ sw $t2, 0x02D0($s2) ## 000002D0 -/* 00D70 808AA4F0 AC5E0000 */ sw $s8, 0x0000($v0) ## 00000000 -/* 00D74 808AA4F4 8E640000 */ lw $a0, 0x0000($s3) ## 00000000 -/* 00D78 808AA4F8 240602A2 */ addiu $a2, $zero, 0x02A2 ## $a2 = 000002A2 -/* 00D7C 808AA4FC 0C0346A2 */ jal Matrix_NewMtx -/* 00D80 808AA500 00408025 */ or $s0, $v0, $zero ## $s0 = 00000000 -/* 00D84 808AA504 AE020004 */ sw $v0, 0x0004($s0) ## 00000004 -/* 00D88 808AA508 8E4202D0 */ lw $v0, 0x02D0($s2) ## 000002D0 -/* 00D8C 808AA50C 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001 -/* 00D90 808AA510 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00D94 808AA514 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 00D98 808AA518 AE4B02D0 */ sw $t3, 0x02D0($s2) ## 000002D0 -/* 00D9C 808AA51C 3C0CDE00 */ lui $t4, 0xDE00 ## $t4 = DE000000 -/* 00DA0 808AA520 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000 -/* 00DA4 808AA524 1621FFC0 */ bne $s1, $at, .L808AA428 -/* 00DA8 808AA528 AC540004 */ sw $s4, 0x0004($v0) ## 00000004 -/* 00DAC 808AA52C 3C06808B */ lui $a2, %hi(D_808AA808) ## $a2 = 808B0000 -/* 00DB0 808AA530 24C6A808 */ addiu $a2, $a2, %lo(D_808AA808) ## $a2 = 808AA808 -/* 00DB4 808AA534 27A400B0 */ addiu $a0, $sp, 0x00B0 ## $a0 = FFFFFFE0 -/* 00DB8 808AA538 8E650000 */ lw $a1, 0x0000($s3) ## 00000000 -/* 00DBC 808AA53C 0C031AD5 */ jal Graph_CloseDisps -/* 00DC0 808AA540 240702A9 */ addiu $a3, $zero, 0x02A9 ## $a3 = 000002A9 -/* 00DC4 808AA544 8FBF0084 */ lw $ra, 0x0084($sp) -/* 00DC8 808AA548 D7B40038 */ ldc1 $f20, 0x0038($sp) -/* 00DCC 808AA54C D7B60040 */ ldc1 $f22, 0x0040($sp) -/* 00DD0 808AA550 D7B80048 */ ldc1 $f24, 0x0048($sp) -/* 00DD4 808AA554 D7BA0050 */ ldc1 $f26, 0x0050($sp) -/* 00DD8 808AA558 D7BC0058 */ ldc1 $f28, 0x0058($sp) -/* 00DDC 808AA55C 8FB00060 */ lw $s0, 0x0060($sp) -/* 00DE0 808AA560 8FB10064 */ lw $s1, 0x0064($sp) -/* 00DE4 808AA564 8FB20068 */ lw $s2, 0x0068($sp) -/* 00DE8 808AA568 8FB3006C */ lw $s3, 0x006C($sp) -/* 00DEC 808AA56C 8FB40070 */ lw $s4, 0x0070($sp) -/* 00DF0 808AA570 8FB50074 */ lw $s5, 0x0074($sp) -/* 00DF4 808AA574 8FB60078 */ lw $s6, 0x0078($sp) -/* 00DF8 808AA578 8FB7007C */ lw $s7, 0x007C($sp) -/* 00DFC 808AA57C 8FBE0080 */ lw $s8, 0x0080($sp) -/* 00E00 808AA580 03E00008 */ jr $ra -/* 00E04 808AA584 27BD00D0 */ addiu $sp, $sp, 0x00D0 ## $sp = 00000000 diff --git a/data/overlays/actors/z_bg_spot00_hanebasi.data.s b/data/overlays/actors/z_bg_spot00_hanebasi.data.s deleted file mode 100644 index 40cb3654d0..0000000000 --- a/data/overlays/actors/z_bg_spot00_hanebasi.data.s +++ /dev/null @@ -1,24 +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 .data - -.balign 16 - -glabel Bg_Spot00_Hanebasi_InitVars - .word 0x004A0100, 0x00000010, 0x002F0000, 0x00000180 -.word BgSpot00Hanebasi_Init -.word BgSpot00Hanebasi_Destroy -.word BgSpot00Hanebasi_Update -.word BgSpot00Hanebasi_Draw -glabel D_808AA7B0 - .word 0x00000000 -glabel D_808AA7B4 - .word 0xB0F80226, 0xB0FC07D0, 0xB0F41388, 0x485003E8 -glabel D_808AA7C4 - .word 0x431E0000, 0x41200000, 0x43C80000 - diff --git a/data/overlays/actors/z_bg_spot00_hanebasi.reloc.s b/data/overlays/actors/z_bg_spot00_hanebasi.reloc.s deleted file mode 100644 index ab058daa6d..0000000000 --- a/data/overlays/actors/z_bg_spot00_hanebasi.reloc.s +++ /dev/null @@ -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_808AA8A0 - .incbin "baserom/ovl_Bg_Spot00_Hanebasi", 0x1120, 0x00000120 diff --git a/spec b/spec index 371a8ff3df..45f01f7202 100644 --- a/spec +++ b/spec @@ -1139,8 +1139,7 @@ endseg beginseg name "ovl_Bg_Spot00_Hanebasi" include "build/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.o" - include "build/data/overlays/actors/z_bg_spot00_hanebasi.data.o" - include "build/data/overlays/actors/z_bg_spot00_hanebasi.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/ovl_Bg_Spot00_Hanebasi_reloc.o" endseg beginseg diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 3c3666a72d..33ae1a9777 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -7754,7 +7754,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) { return -2; } } - if (((setting == CAM_SET_SPOT05A) || (setting == CAM_SET_SPOT05B)) && (gSaveContext.linkAge == 0) && + if (((setting == CAM_SET_SPOT05A) || (setting == CAM_SET_SPOT05B)) && (LINK_IS_ADULT) && (camera->globalCtx->sceneNum == SCENE_SPOT05)) { camera->unk_14A |= 0x10; return -5; diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index b9888508d7..eed1f4e283 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -1,3 +1,9 @@ +/* + * File: z_bg_spot00_hanebasi.c + * Overlay: ovl_Bg_Spot00_Hanebasi + * Description: Hyrule Field Drawbridge and Torches + */ + #include "z_bg_spot00_hanebasi.h" #include "objects/gameplay_keep/gameplay_keep.h" @@ -5,17 +11,26 @@ #define THIS ((BgSpot00Hanebasi*)thisx) +typedef enum { + /* -1 */ DT_DRAWBRIDGE = -1, + /* 0 */ DT_CHAIN_1, + /* 1 */ DT_CHAIN_2 +} DrawbridgeType; + void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot00Hanebasi_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx); void BgSpot00Hanebasi_Draw(Actor* thisx, GlobalContext* globalCtx); -extern UNK_TYPE D_060000C0; -extern UNK_TYPE D_06000280; -extern UNK_TYPE D_06000430; -extern UNK_TYPE D_060005E0; +void BgSpot00Hanebasi_DrawBridgeWait(BgSpot00Hanebasi* this, GlobalContext* globalCtx); +void BgSpot00Hanebasi_DrawBridgeRiseAndFall(BgSpot00Hanebasi* this, GlobalContext* globalCtx); +void BgSpot00Hanebasi_SetTorchLightInfo(BgSpot00Hanebasi* this, GlobalContext* globalCtx); + +extern Gfx D_060000C0[]; // bridge chains +extern CollisionHeader D_06000280; // chains collision +extern Gfx D_06000430[]; // drawbridge +extern CollisionHeader D_060005E0; // drawbridge collision -/* const ActorInit Bg_Spot00_Hanebasi_InitVars = { ACTOR_BG_SPOT00_HANEBASI, ACTORCAT_BG, @@ -27,21 +42,298 @@ const ActorInit Bg_Spot00_Hanebasi_InitVars = { (ActorFunc)BgSpot00Hanebasi_Update, (ActorFunc)BgSpot00Hanebasi_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s") +static f32 sTorchFlameScale = 0.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9BE8.s") +static InitChainEntry sInitChain[] = { + ICHAIN_F32(uncullZoneScale, 550, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneForward, 5000, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D18.s") +void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx) { + BgSpot00Hanebasi* this = THIS; + s32 pad; + Vec3f chainPos; + CollisionHeader* colHeader = NULL; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D24.s") + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); + DynaPolyActor_Init(&this->dyna.actor, 1); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s") + if (this->dyna.actor.params == DT_DRAWBRIDGE) { + CollisionHeader_GetVirtual(&D_060005E0, &colHeader); + } else { + CollisionHeader_GetVirtual(&D_06000280, &colHeader); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Update.s") + this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808AA2B0.s") + if (this->dyna.actor.params == DT_DRAWBRIDGE) { + if ((LINK_IS_ADULT) && (gSaveContext.sceneSetupIndex < 4)) { + Actor_Kill(&this->dyna.actor); + return; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Draw.s") + if ((gSaveContext.sceneSetupIndex != 6) && + ((gSaveContext.sceneSetupIndex == 4) || (gSaveContext.sceneSetupIndex == 5) || + ((LINK_IS_CHILD) && (gSaveContext.nightFlag != 0)))) { + this->dyna.actor.shape.rot.x = -0x4000; + } else { + this->dyna.actor.shape.rot.x = 0; + } + + if (gSaveContext.sceneSetupIndex != 6) { + if ((CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) && (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) && + (CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) && (!(gSaveContext.eventChkInf[8] & 1))) { + this->dyna.actor.shape.rot.x = -0x4000; + } + } + + chainPos.y = + (10.0f * Math_CosS(this->dyna.actor.shape.rot.x)) - (Math_SinS(this->dyna.actor.shape.rot.x) * 400.0f); + chainPos.z = + (10.0f * Math_SinS(this->dyna.actor.shape.rot.x)) - (Math_CosS(this->dyna.actor.shape.rot.x) * 400.0f); + chainPos.x = + (158.0f * Math_CosS(this->dyna.actor.shape.rot.y)) + (Math_SinS(this->dyna.actor.shape.rot.y) * chainPos.z); + chainPos.z = (-158.0f * Math_SinS(this->dyna.actor.shape.rot.y)) + + (Math_CosS(this->dyna.actor.shape.rot.y) * chainPos.z); + + if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_SPOT00_HANEBASI, + this->dyna.actor.world.pos.x + chainPos.x, this->dyna.actor.world.pos.y + chainPos.y, + this->dyna.actor.world.pos.z + chainPos.z, + ((this->dyna.actor.shape.rot.x == 0) ? 0 : 0xF020), this->dyna.actor.shape.rot.y, 0, + DT_CHAIN_1) == NULL) { + Actor_Kill(&this->dyna.actor); + } + + this->actionFunc = BgSpot00Hanebasi_DrawBridgeWait; + this->destAngle = 40; + } else if (this->dyna.actor.params == DT_CHAIN_1) { + if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_SPOT00_HANEBASI, + this->dyna.actor.world.pos.x - (Math_CosS(this->dyna.actor.shape.rot.y) * 316.0f), + this->dyna.actor.world.pos.y, + this->dyna.actor.world.pos.z + (Math_SinS(this->dyna.actor.shape.rot.y) * 316.0f), + this->dyna.actor.shape.rot.x, this->dyna.actor.shape.rot.y, 0, DT_CHAIN_2) == NULL) { + Actor_Kill(&this->dyna.actor); + Actor_Kill(this->dyna.actor.parent); + } + + this->actionFunc = BgSpot00Hanebasi_SetTorchLightInfo; + } else { + this->actionFunc = BgSpot00Hanebasi_SetTorchLightInfo; + } + + if (this->dyna.actor.params >= DT_CHAIN_1) { + this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo); + Lights_PointGlowSetInfo(&this->lightInfo, ((this->dyna.actor.params == DT_CHAIN_1) ? 260.0f : -260.0f), 168, + 690, 255, 255, 0, 0); + } +} + +void BgSpot00Hanebasi_Destroy(Actor* thisx, GlobalContext* globalCtx) { + BgSpot00Hanebasi* this = THIS; + + DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); + + if (this->dyna.actor.params >= DT_CHAIN_1) { + LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); + } +} + +void BgSpot00Hanebasi_DrawBridgeWait(BgSpot00Hanebasi* this, GlobalContext* globalCtx) { + BgSpot00Hanebasi* child = (BgSpot00Hanebasi*)this->dyna.actor.child; + + if ((gSaveContext.sceneSetupIndex >= 4) || (!(CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD))) || + (!(CHECK_QUEST_ITEM(QUEST_GORON_RUBY))) || (!(CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE))) || + (gSaveContext.eventChkInf[8] & 1)) { + if (this->dyna.actor.shape.rot.x != 0) { + if (Flags_GetEnv(globalCtx, 0) || ((gSaveContext.sceneSetupIndex < 4) && (gSaveContext.nightFlag == 0))) { + this->actionFunc = BgSpot00Hanebasi_DrawBridgeRiseAndFall; + this->destAngle = 0; + child->destAngle = 0; + return; + } + + if (this) {} // required to match + } + + if ((this->dyna.actor.shape.rot.x == 0) && (gSaveContext.sceneSetupIndex < 4) && (LINK_IS_CHILD) && + (gSaveContext.nightFlag != 0)) { + this->actionFunc = BgSpot00Hanebasi_DrawBridgeRiseAndFall; + this->destAngle = -0x4000; + child->destAngle = -0xFE0; + } + } +} + +void BgSpot00Hanebasi_DoNothing(BgSpot00Hanebasi* this, GlobalContext* globalCtx) { +} + +void BgSpot00Hanebasi_DrawBridgeRiseAndFall(BgSpot00Hanebasi* this, GlobalContext* globalCtx) { + BgSpot00Hanebasi* child; + Actor* childsChild; + s16 angle = 80; + + if (Math_ScaledStepToS(&this->dyna.actor.shape, this->destAngle, 80)) { + this->actionFunc = BgSpot00Hanebasi_DrawBridgeWait; + } + + if (this->dyna.actor.shape.rot.x >= -0x27D8) { + child = this->dyna.actor.child; + angle *= 0.4f; + Math_ScaledStepToS(&child->dyna.actor.shape.rot.x, child->destAngle, angle); + childsChild = child->dyna.actor.child; + Math_ScaledStepToS(&childsChild->shape.rot.x, child->destAngle, angle); + } + + if (this->destAngle < 0) { + if (this->actionFunc == BgSpot00Hanebasi_DrawBridgeWait) { + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE_STOP); + } else { + func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); + } + } else { + if (this->actionFunc == BgSpot00Hanebasi_DrawBridgeWait) { + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP); + } else { + func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG); + } + } +} + +void BgSpot00Hanebasi_SetTorchLightInfo(BgSpot00Hanebasi* this, GlobalContext* globalCtx) { + u8 lightColor = (u8)(Rand_ZeroOne() * 127.0f) + 128; // intensity of the red and green channels + + Lights_PointGlowSetInfo(&this->lightInfo, (this->dyna.actor.params == DT_CHAIN_1) ? 260.0f : -260.0f, + (5000.0f * sTorchFlameScale) + 128.0f, 690, lightColor, lightColor, 0, + sTorchFlameScale * 37500.0f); +} + +void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) { + BgSpot00Hanebasi* this = THIS; + s32 pad; + + this->actionFunc(this, globalCtx); + + if (this->dyna.actor.params == DT_DRAWBRIDGE) { + if (globalCtx->sceneNum == SCENE_SPOT00) { + if ((CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) && (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) && + (CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) && (!(gSaveContext.eventChkInf[8] & 1)) && + (gSaveContext.linkAge == 1)) { + Player* player = PLAYER; + + if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) && + (player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) && + (!(Gameplay_InCsMode(globalCtx)))) { + gSaveContext.eventChkInf[8] |= 1; + Flags_SetEventChkInf(0x82); + this->actionFunc = BgSpot00Hanebasi_DoNothing; + func_8002DF54(globalCtx, player, 8); + globalCtx->nextEntranceIndex = 0x00CD; + gSaveContext.nextCutsceneIndex = 0xFFF1; + globalCtx->sceneLoadFlag = 0x14; + globalCtx->fadeTransition = 4; + } else if (func_8002E12C(&this->dyna.actor, 3000.0f, 30000)) { + globalCtx->envCtx.gloomySkyEvent = 1; + } + } + } + + if (gSaveContext.sceneSetupIndex == 5) { + u16 dayTime; + s32 tmp; + + if (D_8011FB40 == 50) { + tmp = 0xD556; + + if (gSaveContext.dayTime >= 0xD557) { + tmp = 0x1D556; + } + + D_8011FB40 = (tmp - gSaveContext.dayTime) * (1.0f / 350.0f); + } + + dayTime = gSaveContext.dayTime; + + if ((dayTime >= 0x2AAC) && (dayTime < 0x3000) && (gSaveContext.sceneSetupIndex == 5)) { + D_8011FB40 = 0; + } + } + } +} + +void BgSpot00Hanebasi_DrawTorches(Actor* thisx, GlobalContext* globalCtx2) { + GlobalContext* globalCtx = globalCtx2; + f32 angle; + s32 i; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 633); + + func_80093D84(globalCtx->state.gfxCtx); + + if (gSaveContext.sceneSetupIndex >= 4) { + sTorchFlameScale = 0.008f; + } else { + sTorchFlameScale = ((thisx->shape.rot.x * -1) - 0x2000) * (1.0f / 1024000.0f); + } + + angle = (s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * (M_PI / 32768.0f); + gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 0, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); + + for (i = 0; i < 2; i++) { + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, + ((globalCtx->gameplayFrames + i) * -20) & 0x1FF, 32, 128)); + + Matrix_Translate((i == 0) ? 260.0f : -260.0f, 128.0f, 690.0f, MTXMODE_NEW); + Matrix_RotateY(angle, MTXMODE_APPLY); + Matrix_Scale(sTorchFlameScale, sTorchFlameScale, sTorchFlameScale, MTXMODE_APPLY); + + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 674), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL); + } + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 681); +} + +void BgSpot00Hanebasi_Draw(Actor* thisx, GlobalContext* globalCtx) { + Vec3f basePos = { 158.0f, 10.0f, 400.0f }; + Vec3f newPos; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 698); + + func_80093D18(globalCtx->state.gfxCtx); + + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 702), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + if (thisx->params == DT_DRAWBRIDGE) { + gSPDisplayList(POLY_OPA_DISP++, D_06000430); + + Matrix_MultVec3f(&basePos, &newPos); + thisx->child->world.pos.x = newPos.x; + thisx->child->world.pos.y = newPos.y; + thisx->child->world.pos.z = newPos.z; + basePos.x *= -1.0f; + + Matrix_MultVec3f(&basePos, &newPos); + thisx->child->child->world.pos.x = newPos.x; + thisx->child->child->world.pos.y = newPos.y; + thisx->child->child->world.pos.z = newPos.z; + + if (gSaveContext.sceneSetupIndex != 12) { + if ((gSaveContext.sceneSetupIndex >= 4) || ((LINK_IS_CHILD) && (thisx->shape.rot.x < -0x2000))) { + BgSpot00Hanebasi_DrawTorches(thisx, globalCtx); + } else { + sTorchFlameScale = 0.0f; + } + } + } else { + gSPDisplayList(POLY_OPA_DISP++, D_060000C0); + } + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 733); +} diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h index 27a73d3806..ca33e9b3c0 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h @@ -6,9 +6,14 @@ struct BgSpot00Hanebasi; +typedef void (*BgSpot00HanebasiActionFunc)(struct BgSpot00Hanebasi*, GlobalContext*); + typedef struct BgSpot00Hanebasi { /* 0x0000 */ DynaPolyActor dyna; - /* 0x0164 */ char unk_164[0x1C]; + /* 0x0164 */ BgSpot00HanebasiActionFunc actionFunc; + /* 0x0168 */ s16 destAngle; + /* 0x016C */ LightNode* lightNode; + /* 0x0170 */ LightInfo lightInfo; } BgSpot00Hanebasi; // size = 0x0180 extern const ActorInit Bg_Spot00_Hanebasi_InitVars; diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index daa4bba25a..562f1c68cc 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -157,7 +157,7 @@ void EnDh_Init(Actor* thisx, GlobalContext* globalCtx) { ActorShape_Init(&this->actor.shape, 0.0f, &ActorShadow_DrawCircle, 64.0f); this->actor.params = ENDH_WAIT_UNDERGROUND; this->actor.colChkInfo.mass = MASS_HEAVY; - this->actor.colChkInfo.health = (gSaveContext.linkAge == 0) ? 14 : 20; + this->actor.colChkInfo.health = LINK_IS_ADULT ? 14 : 20; this->alpha = this->unk_258 = 255; this->actor.flags &= ~1; Collider_InitCylinder(globalCtx, &this->collider1); diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index b57116f370..b8b284c087 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -163,7 +163,7 @@ void EnKarebaba_SetupUpright(EnKarebaba* this) { Actor_SetScale(&this->actor, 0.01f); this->bodyCollider.base.colType = COLTYPE_HIT6; this->bodyCollider.base.acFlags &= ~AC_HARD; - this->bodyCollider.info.bumper.dmgFlags = gSaveContext.linkAge != 0 ? 0x07C00710 : 0x0FC00710; + this->bodyCollider.info.bumper.dmgFlags = LINK_IS_CHILD ? 0x07C00710 : 0x0FC00710; this->bodyCollider.dim.radius = 15; this->bodyCollider.dim.height = 80; this->headCollider.dim.height = 80;