From 3369d0657ded129671b11545faaf3a7b8a1950c1 Mon Sep 17 00:00:00 2001 From: Zelllll <56516451+Zelllll@users.noreply.github.com> Date: Fri, 18 Dec 2020 22:46:52 -0600 Subject: [PATCH] Bg_Relay_Objects OK (#536) * bg_relay_objects OK * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update z_bg_relay_objects.c Co-authored-by: Zelllll Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> --- .../BgRelayObjects_Destroy.s | 29 --- .../BgRelayObjects_Draw.s | 25 --- .../BgRelayObjects_Init.s | 165 --------------- .../BgRelayObjects_Update.s | 10 - .../ovl_Bg_Relay_Objects/func_808A90F4.s | 54 ----- .../ovl_Bg_Relay_Objects/func_808A91AC.s | 40 ---- .../ovl_Bg_Relay_Objects/func_808A9234.s | 66 ------ .../ovl_Bg_Relay_Objects/func_808A9320.s | 4 - .../ovl_Bg_Relay_Objects/func_808A932C.s | 31 --- .../ovl_Bg_Relay_Objects/func_808A939C.s | 63 ------ .../overlays/actors/z_bg_relay_objects.data.s | 22 -- .../actors/z_bg_relay_objects.reloc.s | 13 -- include/functions.h | 1 + spec | 3 +- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 189 ++++++++++++++++-- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.h | 9 +- 16 files changed, 184 insertions(+), 540 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A90F4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A91AC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9234.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9320.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A932C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A939C.s delete mode 100644 data/overlays/actors/z_bg_relay_objects.data.s delete mode 100644 data/overlays/actors/z_bg_relay_objects.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Destroy.s deleted file mode 100644 index 776d9be07..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Destroy.s +++ /dev/null @@ -1,29 +0,0 @@ -glabel BgRelayObjects_Destroy -/* 0023C 808A908C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00240 808A9090 AFA40018 */ sw $a0, 0x0018($sp) -/* 00244 808A9094 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00248 808A9098 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0024C 808A909C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00250 808A90A0 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 00254 808A90A4 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 00258 808A90A8 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 0025C 808A90AC 8FAF0018 */ lw $t7, 0x0018($sp) -/* 00260 808A90B0 3C028016 */ lui $v0, %hi(gSaveContext) -/* 00264 808A90B4 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 00268 808A90B8 85F8001C */ lh $t8, 0x001C($t7) ## 0000001C -/* 0026C 808A90BC 5700000A */ bnel $t8, $zero, .L808A90E8 -/* 00270 808A90C0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00274 808A90C4 8C590008 */ lw $t9, 0x0008($v0) ## 8015E668 -/* 00278 808A90C8 3401FFF0 */ ori $at, $zero, 0xFFF0 ## $at = 0000FFF0 -/* 0027C 808A90CC 0321082A */ slt $at, $t9, $at -/* 00280 808A90D0 50200005 */ beql $at, $zero, .L808A90E8 -/* 00284 808A90D4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00288 808A90D8 94480EE0 */ lhu $t0, 0x0EE0($v0) ## 8015F540 -/* 0028C 808A90DC 3109FFDF */ andi $t1, $t0, 0xFFDF ## $t1 = 00000000 -/* 00290 808A90E0 A4490EE0 */ sh $t1, 0x0EE0($v0) ## 8015F540 -/* 00294 808A90E4 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A90E8: -/* 00298 808A90E8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0029C 808A90EC 03E00008 */ jr $ra -/* 002A0 808A90F0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Draw.s deleted file mode 100644 index 435e440dd..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Draw.s +++ /dev/null @@ -1,25 +0,0 @@ -glabel BgRelayObjects_Draw -/* 00640 808A9490 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00644 808A9494 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00648 808A9498 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 0064C 808A949C 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000 -/* 00650 808A94A0 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00654 808A94A4 15C00007 */ bne $t6, $zero, .L808A94C4 -/* 00658 808A94A8 00000000 */ nop -/* 0065C 808A94AC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00660 808A94B0 3C050600 */ lui $a1, %hi(D_06001AB0) ## $a1 = 06000000 -/* 00664 808A94B4 0C00D498 */ jal Gfx_DrawDListOpa - -/* 00668 808A94B8 24A51AB0 */ addiu $a1, $a1, %lo(D_06001AB0) ## $a1 = 06001AB0 -/* 0066C 808A94BC 10000005 */ beq $zero, $zero, .L808A94D4 -/* 00670 808A94C0 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A94C4: -/* 00674 808A94C4 3C050600 */ lui $a1, %hi(D_060001A0) ## $a1 = 06000000 -/* 00678 808A94C8 0C00D498 */ jal Gfx_DrawDListOpa - -/* 0067C 808A94CC 24A501A0 */ addiu $a1, $a1, %lo(D_060001A0) ## $a1 = 060001A0 -/* 00680 808A94D0 8FBF0014 */ lw $ra, 0x0014($sp) -.L808A94D4: -/* 00684 808A94D4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00688 808A94D8 03E00008 */ jr $ra -/* 0068C 808A94DC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Init.s deleted file mode 100644 index c691bd1b9..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Init.s +++ /dev/null @@ -1,165 +0,0 @@ -glabel BgRelayObjects_Init -/* 00000 808A8E50 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00004 808A8E54 AFA50034 */ sw $a1, 0x0034($sp) -/* 00008 808A8E58 AFBF001C */ sw $ra, 0x001C($sp) -/* 0000C 808A8E5C AFB00018 */ sw $s0, 0x0018($sp) -/* 00010 808A8E60 3C05808B */ lui $a1, %hi(D_808A9500) ## $a1 = 808B0000 -/* 00014 808A8E64 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00018 808A8E68 AFA00024 */ sw $zero, 0x0024($sp) -/* 0001C 808A8E6C 0C01E037 */ jal Actor_ProcessInitChain - -/* 00020 808A8E70 24A59500 */ addiu $a1, $a1, %lo(D_808A9500) ## $a1 = 808A9500 -/* 00024 808A8E74 8618001C */ lh $t8, 0x001C($s0) ## 0000001C -/* 00028 808A8E78 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 0002C 808A8E7C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00030 808A8E80 0018CA03 */ sra $t9, $t8, 8 -/* 00034 808A8E84 332800FF */ andi $t0, $t9, 0x00FF ## $t0 = 00000000 -/* 00038 808A8E88 31CF003F */ andi $t7, $t6, 0x003F ## $t7 = 00000000 -/* 0003C 808A8E8C A20F0168 */ sb $t7, 0x0168($s0) ## 00000168 -/* 00040 808A8E90 A608001C */ sh $t0, 0x001C($s0) ## 0000001C -/* 00044 808A8E94 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 00048 808A8E98 24050003 */ addiu $a1, $zero, 0x0003 ## $a1 = 00000003 -/* 0004C 808A8E9C 8609001C */ lh $t1, 0x001C($s0) ## 0000001C -/* 00050 808A8EA0 3C040600 */ lui $a0, %hi(D_060003C4) ## $a0 = 06000000 -/* 00054 808A8EA4 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4 -/* 00058 808A8EA8 15200026 */ bne $t1, $zero, .L808A8F44 -/* 0005C 808A8EAC 248403C4 */ addiu $a0, $a0, %lo(D_060003C4) ## $a0 = 060003C4 -/* 00060 808A8EB0 3C040600 */ lui $a0, %hi(D_060025FC) ## $a0 = 06000000 -/* 00064 808A8EB4 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00068 808A8EB8 248425FC */ addiu $a0, $a0, %lo(D_060025FC) ## $a0 = 060025FC -/* 0006C 808A8EBC 3C0A8016 */ lui $t2, %hi(gSaveContext+0xee0) -/* 00070 808A8EC0 954AF540 */ lhu $t2, %lo(gSaveContext+0xee0)($t2) -/* 00074 808A8EC4 240C0400 */ addiu $t4, $zero, 0x0400 ## $t4 = 00000400 -/* 00078 808A8EC8 240D0080 */ addiu $t5, $zero, 0x0080 ## $t5 = 00000080 -/* 0007C 808A8ECC 314B0020 */ andi $t3, $t2, 0x0020 ## $t3 = 00000000 -/* 00080 808A8ED0 51600004 */ beql $t3, $zero, .L808A8EE4 -/* 00084 808A8ED4 A60D0032 */ sh $t5, 0x0032($s0) ## 00000032 -/* 00088 808A8ED8 10000002 */ beq $zero, $zero, .L808A8EE4 -/* 0008C 808A8EDC A60C0032 */ sh $t4, 0x0032($s0) ## 00000032 -/* 00090 808A8EE0 A60D0032 */ sh $t5, 0x0032($s0) ## 00000032 -.L808A8EE4: -/* 00094 808A8EE4 0C03D5C6 */ jal func_800F5718 -/* 00098 808A8EE8 00000000 */ nop -/* 0009C 808A8EEC 3C03808B */ lui $v1, %hi(D_808A9508) ## $v1 = 808B0000 -/* 000A0 808A8EF0 8C639508 */ lw $v1, %lo(D_808A9508)($v1) -/* 000A4 808A8EF4 8E0F0004 */ lw $t7, 0x0004($s0) ## 00000004 -/* 000A8 808A8EF8 240EFFFF */ addiu $t6, $zero, 0xFFFF ## $t6 = FFFFFFFF -/* 000AC 808A8EFC 30790002 */ andi $t9, $v1, 0x0002 ## $t9 = 00000000 -/* 000B0 808A8F00 35F80020 */ ori $t8, $t7, 0x0020 ## $t8 = 00000020 -/* 000B4 808A8F04 A20E0003 */ sb $t6, 0x0003($s0) ## 00000003 -/* 000B8 808A8F08 13200007 */ beq $t9, $zero, .L808A8F28 -/* 000BC 808A8F0C AE180004 */ sw $t8, 0x0004($s0) ## 00000004 -/* 000C0 808A8F10 240800FF */ addiu $t0, $zero, 0x00FF ## $t0 = 000000FF -/* 000C4 808A8F14 A608001C */ sh $t0, 0x001C($s0) ## 0000001C -/* 000C8 808A8F18 0C00B55C */ jal Actor_Kill - -/* 000CC 808A8F1C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000D0 808A8F20 10000050 */ beq $zero, $zero, .L808A9064 -/* 000D4 808A8F24 8FA40034 */ lw $a0, 0x0034($sp) -.L808A8F28: -/* 000D8 808A8F28 3C09808B */ lui $t1, %hi(func_808A939C) ## $t1 = 808B0000 -/* 000DC 808A8F2C 2529939C */ addiu $t1, $t1, %lo(func_808A939C) ## $t1 = 808A939C -/* 000E0 808A8F30 34630002 */ ori $v1, $v1, 0x0002 ## $v1 = 00000002 -/* 000E4 808A8F34 AE090164 */ sw $t1, 0x0164($s0) ## 00000164 -/* 000E8 808A8F38 3C01808B */ lui $at, %hi(D_808A9508) ## $at = 808B0000 -/* 000EC 808A8F3C 10000048 */ beq $zero, $zero, .L808A9060 -/* 000F0 808A8F40 AC239508 */ sw $v1, %lo(D_808A9508)($at) -.L808A8F44: -/* 000F4 808A8F44 0C010620 */ jal DynaPolyInfo_Alloc - -/* 000F8 808A8F48 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4 -/* 000FC 808A8F4C 82020003 */ lb $v0, 0x0003($s0) ## 00000003 -/* 00100 808A8F50 240DFFFF */ addiu $t5, $zero, 0xFFFF ## $t5 = FFFFFFFF -/* 00104 808A8F54 3C03808B */ lui $v1, %hi(D_808A9508) ## $v1 = 808B0000 -/* 00108 808A8F58 14400005 */ bne $v0, $zero, .L808A8F70 -/* 0010C 808A8F5C 244C0001 */ addiu $t4, $v0, 0x0001 ## $t4 = 00000001 -/* 00110 808A8F60 920A0168 */ lbu $t2, 0x0168($s0) ## 00000168 -/* 00114 808A8F64 254BFFCD */ addiu $t3, $t2, 0xFFCD ## $t3 = FFFFFFCD -/* 00118 808A8F68 10000002 */ beq $zero, $zero, .L808A8F74 -/* 0011C 808A8F6C A20B0169 */ sb $t3, 0x0169($s0) ## 00000169 -.L808A8F70: -/* 00120 808A8F70 A20C0169 */ sb $t4, 0x0169($s0) ## 00000169 -.L808A8F74: -/* 00124 808A8F74 82020169 */ lb $v0, 0x0169($s0) ## 00000169 -/* 00128 808A8F78 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 0012C 808A8F7C A20D0003 */ sb $t5, 0x0003($s0) ## 00000003 -/* 00130 808A8F80 28410006 */ slti $at, $v0, 0x0006 -/* 00134 808A8F84 1420000F */ bne $at, $zero, .L808A8FC4 -/* 00138 808A8F88 A60E016A */ sh $t6, 0x016A($s0) ## 0000016A -/* 0013C 808A8F8C 8C639508 */ lw $v1, %lo(D_808A9508)($v1) -/* 00140 808A8F90 3C18808B */ lui $t8, %hi(func_808A9320) ## $t8 = 808B0000 -/* 00144 808A8F94 27189320 */ addiu $t8, $t8, %lo(func_808A9320) ## $t8 = 808A9320 -/* 00148 808A8F98 306F0001 */ andi $t7, $v1, 0x0001 ## $t7 = 00000000 -/* 0014C 808A8F9C 11E00005 */ beq $t7, $zero, .L808A8FB4 -/* 00150 808A8FA0 34630001 */ ori $v1, $v1, 0x0001 ## $v1 = 808B0001 -/* 00154 808A8FA4 0C00B55C */ jal Actor_Kill - -/* 00158 808A8FA8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0015C 808A8FAC 1000002D */ beq $zero, $zero, .L808A9064 -/* 00160 808A8FB0 8FA40034 */ lw $a0, 0x0034($sp) -.L808A8FB4: -/* 00164 808A8FB4 AE180164 */ sw $t8, 0x0164($s0) ## 00000164 -/* 00168 808A8FB8 3C01808B */ lui $at, %hi(D_808A9508) ## $at = 808B0000 -/* 0016C 808A8FBC 10000028 */ beq $zero, $zero, .L808A9060 -/* 00170 808A8FC0 AC239508 */ sw $v1, %lo(D_808A9508)($at) -.L808A8FC4: -/* 00174 808A8FC4 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 00178 808A8FC8 10410016 */ beq $v0, $at, .L808A9024 -/* 0017C 808A8FCC 8FA40034 */ lw $a0, 0x0034($sp) -/* 00180 808A8FD0 8FA40034 */ lw $a0, 0x0034($sp) -/* 00184 808A8FD4 0C00B2ED */ jal Flags_UnsetSwitch - -/* 00188 808A8FD8 92050168 */ lbu $a1, 0x0168($s0) ## 00000168 -/* 0018C 808A8FDC 82190169 */ lb $t9, 0x0169($s0) ## 00000169 -/* 00190 808A8FE0 3C03808B */ lui $v1, %hi(D_808A9508) ## $v1 = 808B0000 -/* 00194 808A8FE4 8C639508 */ lw $v1, %lo(D_808A9508)($v1) -/* 00198 808A8FE8 24080001 */ addiu $t0, $zero, 0x0001 ## $t0 = 00000001 -/* 0019C 808A8FEC 03281004 */ sllv $v0, $t0, $t9 -/* 001A0 808A8FF0 00434824 */ and $t1, $v0, $v1 -/* 001A4 808A8FF4 11200005 */ beq $t1, $zero, .L808A900C -/* 001A8 808A8FF8 00621825 */ or $v1, $v1, $v0 ## $v1 = 808B0000 -/* 001AC 808A8FFC 0C00B55C */ jal Actor_Kill - -/* 001B0 808A9000 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001B4 808A9004 10000017 */ beq $zero, $zero, .L808A9064 -/* 001B8 808A9008 8FA40034 */ lw $a0, 0x0034($sp) -.L808A900C: -/* 001BC 808A900C 3C0A808B */ lui $t2, %hi(func_808A90F4) ## $t2 = 808B0000 -/* 001C0 808A9010 254A90F4 */ addiu $t2, $t2, %lo(func_808A90F4) ## $t2 = 808A90F4 -/* 001C4 808A9014 AE0A0164 */ sw $t2, 0x0164($s0) ## 00000164 -/* 001C8 808A9018 3C01808B */ lui $at, %hi(D_808A9508) ## $at = 808B0000 -/* 001CC 808A901C 10000010 */ beq $zero, $zero, .L808A9060 -/* 001D0 808A9020 AC239508 */ sw $v1, %lo(D_808A9508)($at) -.L808A9024: -/* 001D4 808A9024 0C00B2DD */ jal Flags_SetSwitch - -/* 001D8 808A9028 92050168 */ lbu $a1, 0x0168($s0) ## 00000168 -/* 001DC 808A902C 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000 -/* 001E0 808A9030 44813000 */ mtc1 $at, $f6 ## $f6 = 120.00 -/* 001E4 808A9034 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028 -/* 001E8 808A9038 3C03808B */ lui $v1, %hi(D_808A9508) ## $v1 = 808B0000 -/* 001EC 808A903C 8C639508 */ lw $v1, %lo(D_808A9508)($v1) -/* 001F0 808A9040 46062200 */ add.s $f8, $f4, $f6 -/* 001F4 808A9044 3C0B808B */ lui $t3, %hi(func_808A91AC) ## $t3 = 808B0000 -/* 001F8 808A9048 256B91AC */ addiu $t3, $t3, %lo(func_808A91AC) ## $t3 = 808A91AC -/* 001FC 808A904C AE0B0164 */ sw $t3, 0x0164($s0) ## 00000164 -/* 00200 808A9050 E6080028 */ swc1 $f8, 0x0028($s0) ## 00000028 -/* 00204 808A9054 3C01808B */ lui $at, %hi(D_808A9508) ## $at = 808B0000 -/* 00208 808A9058 34630001 */ ori $v1, $v1, 0x0001 ## $v1 = 808B0001 -/* 0020C 808A905C AC239508 */ sw $v1, %lo(D_808A9508)($at) -.L808A9060: -/* 00210 808A9060 8FA40034 */ lw $a0, 0x0034($sp) -.L808A9064: -/* 00214 808A9064 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00218 808A9068 8FA70024 */ lw $a3, 0x0024($sp) -/* 0021C 808A906C 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 00220 808A9070 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00224 808A9074 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 00228 808A9078 8FBF001C */ lw $ra, 0x001C($sp) -/* 0022C 808A907C 8FB00018 */ lw $s0, 0x0018($sp) -/* 00230 808A9080 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 00234 808A9084 03E00008 */ jr $ra -/* 00238 808A9088 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Update.s deleted file mode 100644 index 9cd46b2a3..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Update.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel BgRelayObjects_Update -/* 0061C 808A946C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00620 808A9470 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00624 808A9474 8C990164 */ lw $t9, 0x0164($a0) ## 00000164 -/* 00628 808A9478 0320F809 */ jalr $ra, $t9 -/* 0062C 808A947C 00000000 */ nop -/* 00630 808A9480 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00634 808A9484 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00638 808A9488 03E00008 */ jr $ra -/* 0063C 808A948C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A90F4.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A90F4.s deleted file mode 100644 index a263a9f64..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A90F4.s +++ /dev/null @@ -1,54 +0,0 @@ -glabel func_808A90F4 -/* 002A4 808A90F4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 002A8 808A90F8 AFB00018 */ sw $s0, 0x0018($sp) -/* 002AC 808A90FC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 002B0 808A9100 AFBF001C */ sw $ra, 0x001C($sp) -/* 002B4 808A9104 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 002B8 808A9108 0C00B2D0 */ jal Flags_GetSwitch - -/* 002BC 808A910C 92050168 */ lbu $a1, 0x0168($s0) ## 00000168 -/* 002C0 808A9110 50400022 */ beql $v0, $zero, .L808A919C -/* 002C4 808A9114 8FBF001C */ lw $ra, 0x001C($sp) -/* 002C8 808A9118 860E016A */ lh $t6, 0x016A($s0) ## 0000016A -/* 002CC 808A911C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002D0 808A9120 51C00011 */ beql $t6, $zero, .L808A9168 -/* 002D4 808A9124 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000 -/* 002D8 808A9128 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 002DC 808A912C 24052814 */ addiu $a1, $zero, 0x2814 ## $a1 = 00002814 -/* 002E0 808A9130 3C0F8012 */ lui $t7, %hi(gItemSlots+0xa) -/* 002E4 808A9134 91EF746E */ lbu $t7, %lo(gItemSlots+0xa)($t7) -/* 002E8 808A9138 3C188016 */ lui $t8, %hi(gSaveContext+0x74) -/* 002EC 808A913C 240100FF */ addiu $at, $zero, 0x00FF ## $at = 000000FF -/* 002F0 808A9140 030FC021 */ addu $t8, $t8, $t7 -/* 002F4 808A9144 9318E6D4 */ lbu $t8, %lo(gSaveContext+0x74)($t8) -/* 002F8 808A9148 24190078 */ addiu $t9, $zero, 0x0078 ## $t9 = 00000078 -/* 002FC 808A914C 240800A0 */ addiu $t0, $zero, 0x00A0 ## $t0 = 000000A0 -/* 00300 808A9150 53010004 */ beql $t8, $at, .L808A9164 -/* 00304 808A9154 A608016A */ sh $t0, 0x016A($s0) ## 0000016A -/* 00308 808A9158 10000002 */ beq $zero, $zero, .L808A9164 -/* 0030C 808A915C A619016A */ sh $t9, 0x016A($s0) ## 0000016A -/* 00310 808A9160 A608016A */ sh $t0, 0x016A($s0) ## 0000016A -.L808A9164: -/* 00314 808A9164 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000 -.L808A9168: -/* 00318 808A9168 44813000 */ mtc1 $at, $f6 ## $f6 = 120.00 -/* 0031C 808A916C C604000C */ lwc1 $f4, 0x000C($s0) ## 0000000C -/* 00320 808A9170 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028 -/* 00324 808A9174 3C064140 */ lui $a2, 0x4140 ## $a2 = 41400000 -/* 00328 808A9178 46062200 */ add.s $f8, $f4, $f6 -/* 0032C 808A917C 44054000 */ mfc1 $a1, $f8 -/* 00330 808A9180 0C01DE80 */ jal Math_ApproxF - -/* 00334 808A9184 00000000 */ nop -/* 00338 808A9188 10400003 */ beq $v0, $zero, .L808A9198 -/* 0033C 808A918C 3C09808B */ lui $t1, %hi(func_808A91AC) ## $t1 = 808B0000 -/* 00340 808A9190 252991AC */ addiu $t1, $t1, %lo(func_808A91AC) ## $t1 = 808A91AC -/* 00344 808A9194 AE090164 */ sw $t1, 0x0164($s0) ## 00000164 -.L808A9198: -/* 00348 808A9198 8FBF001C */ lw $ra, 0x001C($sp) -.L808A919C: -/* 0034C 808A919C 8FB00018 */ lw $s0, 0x0018($sp) -/* 00350 808A91A0 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00354 808A91A4 03E00008 */ jr $ra -/* 00358 808A91A8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A91AC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A91AC.s deleted file mode 100644 index 2ac420f4e..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A91AC.s +++ /dev/null @@ -1,40 +0,0 @@ -glabel func_808A91AC -/* 0035C 808A91AC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00360 808A91B0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00364 808A91B4 AFA5001C */ sw $a1, 0x001C($sp) -/* 00368 808A91B8 808E0169 */ lb $t6, 0x0169($a0) ## 00000169 -/* 0036C 808A91BC 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 00370 808A91C0 51C1000A */ beql $t6, $at, .L808A91EC -/* 00374 808A91C4 8498016A */ lh $t8, 0x016A($a0) ## 0000016A -/* 00378 808A91C8 8485016A */ lh $a1, 0x016A($a0) ## 0000016A -/* 0037C 808A91CC 10A00003 */ beq $a1, $zero, .L808A91DC -/* 00380 808A91D0 24AFFFFF */ addiu $t7, $a1, 0xFFFF ## $t7 = FFFFFFFF -/* 00384 808A91D4 A48F016A */ sh $t7, 0x016A($a0) ## 0000016A -/* 00388 808A91D8 8485016A */ lh $a1, 0x016A($a0) ## 0000016A -.L808A91DC: -/* 0038C 808A91DC 0C00BE65 */ jal func_8002F994 -/* 00390 808A91E0 AFA40018 */ sw $a0, 0x0018($sp) -/* 00394 808A91E4 8FA40018 */ lw $a0, 0x0018($sp) -/* 00398 808A91E8 8498016A */ lh $t8, 0x016A($a0) ## 0000016A -.L808A91EC: -/* 0039C 808A91EC 8FB9001C */ lw $t9, 0x001C($sp) -/* 003A0 808A91F0 3C080001 */ lui $t0, 0x0001 ## $t0 = 00010000 -/* 003A4 808A91F4 13000004 */ beq $t8, $zero, .L808A9208 -/* 003A8 808A91F8 01194021 */ addu $t0, $t0, $t9 -/* 003AC 808A91FC 81081CBC */ lb $t0, 0x1CBC($t0) ## 00011CBC -/* 003B0 808A9200 80890169 */ lb $t1, 0x0169($a0) ## 00000169 -/* 003B4 808A9204 15090007 */ bne $t0, $t1, .L808A9224 -.L808A9208: -/* 003B8 808A9208 2405281C */ addiu $a1, $zero, 0x281C ## $a1 = 0000281C -/* 003BC 808A920C 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 003C0 808A9210 AFA40018 */ sw $a0, 0x0018($sp) -/* 003C4 808A9214 8FA40018 */ lw $a0, 0x0018($sp) -/* 003C8 808A9218 3C0A808B */ lui $t2, %hi(func_808A9234) ## $t2 = 808B0000 -/* 003CC 808A921C 254A9234 */ addiu $t2, $t2, %lo(func_808A9234) ## $t2 = 808A9234 -/* 003D0 808A9220 AC8A0164 */ sw $t2, 0x0164($a0) ## 00000164 -.L808A9224: -/* 003D4 808A9224 8FBF0014 */ lw $ra, 0x0014($sp) -/* 003D8 808A9228 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 003DC 808A922C 03E00008 */ jr $ra -/* 003E0 808A9230 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9234.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9234.s deleted file mode 100644 index 94f292fd0..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9234.s +++ /dev/null @@ -1,66 +0,0 @@ -glabel func_808A9234 -/* 003E4 808A9234 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 003E8 808A9238 AFBF001C */ sw $ra, 0x001C($sp) -/* 003EC 808A923C AFB00018 */ sw $s0, 0x0018($sp) -/* 003F0 808A9240 AFA5002C */ sw $a1, 0x002C($sp) -/* 003F4 808A9244 C4840060 */ lwc1 $f4, 0x0060($a0) ## 00000060 -/* 003F8 808A9248 C486006C */ lwc1 $f6, 0x006C($a0) ## 0000006C -/* 003FC 808A924C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00400 808A9250 24840028 */ addiu $a0, $a0, 0x0028 ## $a0 = 00000028 -/* 00404 808A9254 46062200 */ add.s $f8, $f4, $f6 -/* 00408 808A9258 E4880038 */ swc1 $f8, 0x0038($a0) ## 00000060 -/* 0040C 808A925C 8E060060 */ lw $a2, 0x0060($s0) ## 00000060 -/* 00410 808A9260 0C01DE80 */ jal Math_ApproxF - -/* 00414 808A9264 8E05000C */ lw $a1, 0x000C($s0) ## 0000000C -/* 00418 808A9268 10400028 */ beq $v0, $zero, .L808A930C -/* 0041C 808A926C 240500B4 */ addiu $a1, $zero, 0x00B4 ## $a1 = 000000B4 -/* 00420 808A9270 C60C008C */ lwc1 $f12, 0x008C($s0) ## 0000008C -/* 00424 808A9274 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014 -/* 00428 808A9278 0C02A800 */ jal func_800AA000 -/* 0042C 808A927C 24070064 */ addiu $a3, $zero, 0x0064 ## $a3 = 00000064 -/* 00430 808A9280 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00434 808A9284 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00438 808A9288 2405281D */ addiu $a1, $zero, 0x281D ## $a1 = 0000281D -/* 0043C 808A928C 8FA4002C */ lw $a0, 0x002C($sp) -/* 00440 808A9290 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00444 808A9294 820F0169 */ lb $t7, 0x0169($s0) ## 00000169 -/* 00448 808A9298 00811021 */ addu $v0, $a0, $at -/* 0044C 808A929C 804E1CBC */ lb $t6, 0x1CBC($v0) ## 00001CBC -/* 00450 808A92A0 51CF000A */ beql $t6, $t7, .L808A92CC -/* 00454 808A92A4 92050168 */ lbu $a1, 0x0168($s0) ## 00000168 -/* 00458 808A92A8 0C01E233 */ jal func_800788CC -/* 0045C 808A92AC 240438EC */ addiu $a0, $zero, 0x38EC ## $a0 = 000038EC -/* 00460 808A92B0 3C19808B */ lui $t9, %hi(func_808A932C) ## $t9 = 808B0000 -/* 00464 808A92B4 24180005 */ addiu $t8, $zero, 0x0005 ## $t8 = 00000005 -/* 00468 808A92B8 2739932C */ addiu $t9, $t9, %lo(func_808A932C) ## $t9 = 808A932C -/* 0046C 808A92BC A618016A */ sh $t8, 0x016A($s0) ## 0000016A -/* 00470 808A92C0 10000012 */ beq $zero, $zero, .L808A930C -/* 00474 808A92C4 AE190164 */ sw $t9, 0x0164($s0) ## 00000164 -/* 00478 808A92C8 92050168 */ lbu $a1, 0x0168($s0) ## 00000168 -.L808A92CC: -/* 0047C 808A92CC 0C00B2ED */ jal Flags_UnsetSwitch - -/* 00480 808A92D0 AFA20024 */ sw $v0, 0x0024($sp) -/* 00484 808A92D4 8E080004 */ lw $t0, 0x0004($s0) ## 00000004 -/* 00488 808A92D8 8FA20024 */ lw $v0, 0x0024($sp) -/* 0048C 808A92DC 2401FFEF */ addiu $at, $zero, 0xFFEF ## $at = FFFFFFEF -/* 00490 808A92E0 01014824 */ and $t1, $t0, $at -/* 00494 808A92E4 AE090004 */ sw $t1, 0x0004($s0) ## 00000004 -/* 00498 808A92E8 804A1CBC */ lb $t2, 0x1CBC($v0) ## 00001CBC -/* 0049C 808A92EC 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 004A0 808A92F0 3C0C808B */ lui $t4, %hi(func_808A9320) ## $t4 = 808B0000 -/* 004A4 808A92F4 15410004 */ bne $t2, $at, .L808A9308 -/* 004A8 808A92F8 258C9320 */ addiu $t4, $t4, %lo(func_808A9320) ## $t4 = 808A9320 -/* 004AC 808A92FC 240B000F */ addiu $t3, $zero, 0x000F ## $t3 = 0000000F -/* 004B0 808A9300 3C018016 */ lui $at, %hi(gSaveContext+0x13ce) -/* 004B4 808A9304 A42BFA2E */ sh $t3, %lo(gSaveContext+0x13ce)($at) -.L808A9308: -/* 004B8 808A9308 AE0C0164 */ sw $t4, 0x0164($s0) ## 00000164 -.L808A930C: -/* 004BC 808A930C 8FBF001C */ lw $ra, 0x001C($sp) -/* 004C0 808A9310 8FB00018 */ lw $s0, 0x0018($sp) -/* 004C4 808A9314 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 004C8 808A9318 03E00008 */ jr $ra -/* 004CC 808A931C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9320.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9320.s deleted file mode 100644 index 929b7fdfe..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9320.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel func_808A9320 -/* 004D0 808A9320 AFA40000 */ sw $a0, 0x0000($sp) -/* 004D4 808A9324 03E00008 */ jr $ra -/* 004D8 808A9328 AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A932C.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A932C.s deleted file mode 100644 index 44527b2ba..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A932C.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_808A932C -/* 004DC 808A932C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 004E0 808A9330 AFBF0014 */ sw $ra, 0x0014($sp) -/* 004E4 808A9334 AFA5001C */ sw $a1, 0x001C($sp) -/* 004E8 808A9338 8482016A */ lh $v0, 0x016A($a0) ## 0000016A -/* 004EC 808A933C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 004F0 808A9340 10400003 */ beq $v0, $zero, .L808A9350 -/* 004F4 808A9344 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 004F8 808A9348 A48E016A */ sh $t6, 0x016A($a0) ## 0000016A -/* 004FC 808A934C 8482016A */ lh $v0, 0x016A($a0) ## 0000016A -.L808A9350: -/* 00500 808A9350 1440000E */ bne $v0, $zero, .L808A938C -/* 00504 808A9354 8FA4001C */ lw $a0, 0x001C($sp) -/* 00508 808A9358 0C023A62 */ jal Player_InCsMode -/* 0050C 808A935C AFA60018 */ sw $a2, 0x0018($sp) -/* 00510 808A9360 1440000A */ bne $v0, $zero, .L808A938C -/* 00514 808A9364 8FA60018 */ lw $a2, 0x0018($sp) -/* 00518 808A9368 24045801 */ addiu $a0, $zero, 0x5801 ## $a0 = 00005801 -/* 0051C 808A936C 0C01E221 */ jal func_80078884 -/* 00520 808A9370 AFA60018 */ sw $a2, 0x0018($sp) -/* 00524 808A9374 0C030322 */ jal Gameplay_TriggerRespawn -/* 00528 808A9378 8FA4001C */ lw $a0, 0x001C($sp) -/* 0052C 808A937C 8FA60018 */ lw $a2, 0x0018($sp) -/* 00530 808A9380 3C0F808B */ lui $t7, %hi(func_808A9320) ## $t7 = 808B0000 -/* 00534 808A9384 25EF9320 */ addiu $t7, $t7, %lo(func_808A9320) ## $t7 = 808A9320 -/* 00538 808A9388 ACCF0164 */ sw $t7, 0x0164($a2) ## 00000164 -.L808A938C: -/* 0053C 808A938C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00540 808A9390 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00544 808A9394 03E00008 */ jr $ra -/* 00548 808A9398 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A939C.s b/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A939C.s deleted file mode 100644 index 57a752bdd..000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A939C.s +++ /dev/null @@ -1,63 +0,0 @@ -.late_rodata -glabel D_808A9510 - .float 0.0011160715 - -.text -glabel func_808A939C -/* 0054C 808A939C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00550 808A93A0 AFB00018 */ sw $s0, 0x0018($sp) -/* 00554 808A93A4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00558 808A93A8 AFBF001C */ sw $ra, 0x001C($sp) -/* 0055C 808A93AC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00560 808A93B0 0C01B129 */ jal Flags_GetEnv -/* 00564 808A93B4 24050005 */ addiu $a1, $zero, 0x0005 ## $a1 = 00000005 -/* 00568 808A93B8 10400006 */ beq $v0, $zero, .L808A93D4 -/* 0056C 808A93BC 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00570 808A93C0 3C028016 */ lui $v0, %hi(gSaveContext) -/* 00574 808A93C4 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 00578 808A93C8 944E0EE0 */ lhu $t6, 0x0EE0($v0) ## 8015F540 -/* 0057C 808A93CC 35CF0020 */ ori $t7, $t6, 0x0020 ## $t7 = 00000020 -/* 00580 808A93D0 A44F0EE0 */ sh $t7, 0x0EE0($v0) ## 8015F540 -.L808A93D4: -/* 00584 808A93D4 3C028016 */ lui $v0, %hi(gSaveContext) -/* 00588 808A93D8 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 0058C 808A93DC 94580EE0 */ lhu $t8, 0x0EE0($v0) ## 8015F540 -/* 00590 808A93E0 24060008 */ addiu $a2, $zero, 0x0008 ## $a2 = 00000008 -/* 00594 808A93E4 24050080 */ addiu $a1, $zero, 0x0080 ## $a1 = 00000080 -/* 00598 808A93E8 33190020 */ andi $t9, $t8, 0x0020 ## $t9 = 00000000 -/* 0059C 808A93EC 13200006 */ beq $t9, $zero, .L808A9408 -/* 005A0 808A93F0 00000000 */ nop -/* 005A4 808A93F4 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 005A8 808A93F8 0C01DE2B */ jal Math_ApproxUpdateScaledS - -/* 005AC 808A93FC 24050400 */ addiu $a1, $zero, 0x0400 ## $a1 = 00000400 -/* 005B0 808A9400 10000004 */ beq $zero, $zero, .L808A9414 -/* 005B4 808A9404 86020032 */ lh $v0, 0x0032($s0) ## 00000032 -.L808A9408: -/* 005B8 808A9408 0C01DE2B */ jal Math_ApproxUpdateScaledS - -/* 005BC 808A940C 24060008 */ addiu $a2, $zero, 0x0008 ## $a2 = 00000008 -/* 005C0 808A9410 86020032 */ lh $v0, 0x0032($s0) ## 00000032 -.L808A9414: -/* 005C4 808A9414 860800B6 */ lh $t0, 0x00B6($s0) ## 000000B6 -/* 005C8 808A9418 3C01808B */ lui $at, %hi(D_808A9510) ## $at = 808B0000 -/* 005CC 808A941C 244AFF80 */ addiu $t2, $v0, 0xFF80 ## $t2 = FFFFFF80 -/* 005D0 808A9420 448A2000 */ mtc1 $t2, $f4 ## $f4 = NaN -/* 005D4 808A9424 01024821 */ addu $t1, $t0, $v0 -/* 005D8 808A9428 A60900B6 */ sh $t1, 0x00B6($s0) ## 000000B6 -/* 005DC 808A942C 468021A0 */ cvt.s.w $f6, $f4 -/* 005E0 808A9430 C4289510 */ lwc1 $f8, %lo(D_808A9510)($at) -/* 005E4 808A9434 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 005E8 808A9438 44818000 */ mtc1 $at, $f16 ## $f16 = 1.00 -/* 005EC 808A943C 260400E4 */ addiu $a0, $s0, 0x00E4 ## $a0 = 000000E4 -/* 005F0 808A9440 24052076 */ addiu $a1, $zero, 0x2076 ## $a1 = 00002076 -/* 005F4 808A9444 46083282 */ mul.s $f10, $f6, $f8 -/* 005F8 808A9448 46105480 */ add.s $f18, $f10, $f16 -/* 005FC 808A944C 44069000 */ mfc1 $a2, $f18 -/* 00600 808A9450 0C03D0DB */ jal func_800F436C -/* 00604 808A9454 00000000 */ nop -/* 00608 808A9458 8FBF001C */ lw $ra, 0x001C($sp) -/* 0060C 808A945C 8FB00018 */ lw $s0, 0x0018($sp) -/* 00610 808A9460 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00614 808A9464 03E00008 */ jr $ra -/* 00618 808A9468 00000000 */ nop diff --git a/data/overlays/actors/z_bg_relay_objects.data.s b/data/overlays/actors/z_bg_relay_objects.data.s deleted file mode 100644 index 0ac275d5e..000000000 --- a/data/overlays/actors/z_bg_relay_objects.data.s +++ /dev/null @@ -1,22 +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_Relay_Objects_InitVars - .word 0x01230100, 0x00000010, 0x006C0000, 0x0000016C -.word BgRelayObjects_Init -.word BgRelayObjects_Destroy -.word BgRelayObjects_Update -.word BgRelayObjects_Draw -glabel D_808A9500 - .word 0xB06C0005, 0x48500064 -glabel D_808A9508 - .word 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_bg_relay_objects.reloc.s b/data/overlays/actors/z_bg_relay_objects.reloc.s deleted file mode 100644 index 9acbdd5d6..000000000 --- a/data/overlays/actors/z_bg_relay_objects.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_808A9520 - .incbin "baserom/ovl_Bg_Relay_Objects", 0x6D0, 0x000000C0 diff --git a/include/functions.h b/include/functions.h index 410442a27..7fa813358 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2229,6 +2229,7 @@ void func_800F4C58(Vec3f*, u16 sfxId, u8); // ? func_800F5510(?); // ? func_800F5550(?); // ? func_800F56A8(?); +void func_800F5718(void); void func_800F574C(f32 arg0, UNK_TYPE arg2); void func_800F5918(void); void func_800F595C(u16); diff --git a/spec b/spec index b0eeb7ff4..1378cc1ce 100644 --- a/spec +++ b/spec @@ -1148,8 +1148,7 @@ endseg beginseg name "ovl_Bg_Relay_Objects" include "build/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.o" - include "build/data/overlays/actors/z_bg_relay_objects.data.o" - include "build/data/overlays/actors/z_bg_relay_objects.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Relay_Objects/ovl_Bg_Relay_Objects_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index dee99fc66..118d3af3d 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -10,17 +10,28 @@ #define THIS ((BgRelayObjects*)thisx) +typedef enum { + WINDMILL_ROTATING_GEAR, + WINDMILL_DAMPE_STONE_DOOR +} WindmillSetpiecesMode; + void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx); void BgRelayObjects_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgRelayObjects_Update(Actor* thisx, GlobalContext* globalCtx); void BgRelayObjects_Draw(Actor* thisx, GlobalContext* globalCtx); -extern UNK_TYPE D_060001A0; +void func_808A90F4(BgRelayObjects* this, GlobalContext* globalCtx); +void func_808A91AC(BgRelayObjects* this, GlobalContext* globalCtx); +void func_808A9234(BgRelayObjects* this, GlobalContext* globalCtx); +void BgRelayObjects_DoNothing(BgRelayObjects* this, GlobalContext* globalCtx); +void func_808A932C(BgRelayObjects* this, GlobalContext* globalCtx); +void func_808A939C(BgRelayObjects* this, GlobalContext* globalCtx); + +extern Gfx D_060001A0[]; extern UNK_TYPE D_060003C4; -extern UNK_TYPE D_06001AB0; +extern Gfx D_06001AB0[]; extern UNK_TYPE D_060025FC; -/* const ActorInit Bg_Relay_Objects_InitVars = { ACTOR_BG_RELAY_OBJECTS, ACTORTYPE_BG, @@ -32,23 +43,173 @@ const ActorInit Bg_Relay_Objects_InitVars = { (ActorFunc)BgRelayObjects_Update, (ActorFunc)BgRelayObjects_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Destroy.s") +static InitChainEntry sInitChain[] = { + ICHAIN_F32(gravity, 5, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A90F4.s") +void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) { + static u32 D_808A9508 = 0; + BgRelayObjects* this = THIS; + s32 pad; + s32 sp24 = 0; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A91AC.s") + Actor_ProcessInitChain(thisx, sInitChain); + this->switchFlag = thisx->params & 0x3F; + thisx->params = (thisx->params >> 8) & 0xFF; + DynaPolyInfo_SetActorMove(&this->dyna, 3); + if (thisx->params == WINDMILL_ROTATING_GEAR) { + DynaPolyInfo_Alloc(&D_060025FC, &sp24); + if (gSaveContext.eventChkInf[6] & 0x20) { + thisx->posRot.rot.y = 0x400; + } else { + thisx->posRot.rot.y = 0x80; + } + func_800F5718(); + thisx->room = -1; + thisx->flags |= 0x20; + if (D_808A9508 & 2) { + thisx->params = 0xFF; + Actor_Kill(thisx); + } else { + D_808A9508 |= 2; + this->actionFunc = func_808A939C; + } + } else { + DynaPolyInfo_Alloc(&D_060003C4, &sp24); + if (thisx->room == 0) { + this->unk_169 = this->switchFlag - 0x33; + } else { + this->unk_169 = thisx->room + 1; + } + thisx->room = -1; + this->timer = 1; + if (this->unk_169 >= 6) { + if (D_808A9508 & 1) { + Actor_Kill(thisx); + } else { + D_808A9508 |= 1; + this->actionFunc = BgRelayObjects_DoNothing; + } + } else if (this->unk_169 != 5) { + Flags_UnsetSwitch(globalCtx, this->switchFlag); + if (D_808A9508 & (1 << this->unk_169)) { + Actor_Kill(thisx); + } else { + D_808A9508 |= (1 << this->unk_169); + this->actionFunc = func_808A90F4; + } + } else { + Flags_SetSwitch(globalCtx, this->switchFlag); + this->actionFunc = func_808A91AC; + thisx->posRot.pos.y += 120.0f; + D_808A9508 |= 1; + } + } + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp24); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9234.s") +void BgRelayObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) { + BgRelayObjects* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A9320.s") + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + if ((this->dyna.actor.params == WINDMILL_ROTATING_GEAR) && (gSaveContext.cutsceneIndex < 0xFFF0)) { + gSaveContext.eventChkInf[6] &= ~0x20; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A932C.s") +void func_808A90F4(BgRelayObjects* this, GlobalContext* globalCtx) { + if (Flags_GetSwitch(globalCtx, this->switchFlag)) { + if (this->timer != 0) { + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN); + if (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE) { + this->timer = 120; + } else { + this->timer = 160; + } + } + if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y + 120.0f, 12.0f)) { + this->actionFunc = func_808A91AC; + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/func_808A939C.s") +void func_808A91AC(BgRelayObjects* this, GlobalContext* globalCtx) { + if (this->unk_169 != 5) { + if (this->timer != 0) { + this->timer--; + } + func_8002F994(&this->dyna.actor, this->timer); + } + if ((this->timer == 0) || (this->unk_169 == globalCtx->roomCtx.curRoom.num)) { + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE); + this->actionFunc = func_808A9234; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Update.s") +void func_808A9234(BgRelayObjects* this, GlobalContext* globalCtx) { + this->dyna.actor.velocity.y += this->dyna.actor.gravity; + if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y, this->dyna.actor.velocity.y)) { + func_800AA000(this->dyna.actor.xyzDistFromLinkSq, 180, 20, 100); + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND); + if (this->unk_169 != globalCtx->roomCtx.curRoom.num) { + func_800788CC(NA_SE_EN_PO_LAUGH); + this->timer = 5; + this->actionFunc = func_808A932C; + return; + } + Flags_UnsetSwitch(globalCtx, this->switchFlag); + this->dyna.actor.flags &= ~0x10; + if (globalCtx->roomCtx.curRoom.num == 4) { + gSaveContext.timer1State = 0xF; + } + this->actionFunc = BgRelayObjects_DoNothing; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Relay_Objects/BgRelayObjects_Draw.s") +void BgRelayObjects_DoNothing(BgRelayObjects* this, GlobalContext* globalCtx) { +} + +void func_808A932C(BgRelayObjects* this, GlobalContext* globalCtx) { + if (this->timer != 0) { + this->timer--; + } + if (this->timer == 0) { + if (!Player_InCsMode(globalCtx)) { + func_80078884(NA_SE_OC_ABYSS); + Gameplay_TriggerRespawn(globalCtx); + this->actionFunc = BgRelayObjects_DoNothing; + } + } +} + +void func_808A939C(BgRelayObjects* this, GlobalContext* globalCtx) { + if (Flags_GetEnv(globalCtx, 5)) { + gSaveContext.eventChkInf[6] |= 0x20; + } + if (gSaveContext.eventChkInf[6] & 0x20) { + Math_ApproxUpdateScaledS(&this->dyna.actor.posRot.rot.y, 0x400, 8); + } else { + Math_ApproxUpdateScaledS(&this->dyna.actor.posRot.rot.y, 0x80, 8); + } + this->dyna.actor.shape.rot.y += this->dyna.actor.posRot.rot.y; + func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WOOD_GEAR - SFX_FLAG, + ((this->dyna.actor.posRot.rot.y - 0x80) * (1.0f / 0x380)) + 1.0f); +} + +void BgRelayObjects_Update(Actor* thisx, GlobalContext* globalCtx) { + BgRelayObjects* this = THIS; + + this->actionFunc(this, globalCtx); +} + +void BgRelayObjects_Draw(Actor* thisx, GlobalContext* globalCtx) { + BgRelayObjects* this = THIS; + + if (this->dyna.actor.params == WINDMILL_ROTATING_GEAR) { + Gfx_DrawDListOpa(globalCtx, D_06001AB0); + } else { + Gfx_DrawDListOpa(globalCtx, D_060001A0); + } +} diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h index 416d8c548..1ce516e22 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h @@ -6,9 +6,14 @@ struct BgRelayObjects; +typedef void (*BgRelayObjectsActionFunc)(struct BgRelayObjects*, GlobalContext*); + typedef struct BgRelayObjects { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x20]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ BgRelayObjectsActionFunc actionFunc; + /* 0x0168 */ u8 switchFlag; + /* 0x0169 */ s8 unk_169; // a room id + /* 0x016A */ s16 timer; } BgRelayObjects; // size = 0x016C extern const ActorInit Bg_Relay_Objects_InitVars;