1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-28 19:25:27 +00:00

Match BgMizuMovebg_Init (#1003)

* Match BgMizuMovebg_Init

* Re-add missing break
This commit is contained in:
Roman971 2021-10-19 21:37:02 +02:00 committed by GitHub
parent 750c0cab35
commit ceb571423d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 348 deletions

View file

@ -1,280 +0,0 @@
.late_rodata
glabel jtbl_8089EC08
.word L8089DD64
.word L8089DDC8
.word L8089DE2C
.word L8089DE90
.word L8089DED0
.word L8089DED0
.word L8089DED0
.word L8089DF24
glabel D_8089EC28
.word 0x44318000, 0x00000000
glabel D_8089EC30
.word 0x405CCCCC, 0xCCCCCCCC
glabel D_8089EC38
.float 9.58738019108e-05
.text
glabel BgMizuMovebg_Init
/* 00068 8089DC98 27BDFF98 */ addiu $sp, $sp, 0xFF98 ## $sp = FFFFFF98
/* 0006C 8089DC9C AFBF003C */ sw $ra, 0x003C($sp)
/* 00070 8089DCA0 AFB00038 */ sw $s0, 0x0038($sp)
/* 00074 8089DCA4 AFA5006C */ sw $a1, 0x006C($sp)
/* 00078 8089DCA8 8CAF07C0 */ lw $t7, 0x07C0($a1) ## 000007C0
/* 0007C 8089DCAC 3C05808A */ lui $a1, %hi(D_8089EB90) ## $a1 = 808A0000
/* 00080 8089DCB0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00084 8089DCB4 8DF80028 */ lw $t8, 0x0028($t7) ## 00000028
/* 00088 8089DCB8 AFA00054 */ sw $zero, 0x0054($sp)
/* 0008C 8089DCBC 24A5EB90 */ addiu $a1, $a1, %lo(D_8089EB90) ## $a1 = 8089EB90
/* 00090 8089DCC0 0C01E037 */ jal Actor_ProcessInitChain
/* 00094 8089DCC4 AFB8005C */ sw $t8, 0x005C($sp)
/* 00098 8089DCC8 9619001C */ lhu $t9, 0x001C($s0) ## 0000001C
/* 0009C 8089DCCC C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028
/* 000A0 8089DCD0 3C0C808A */ lui $t4, %hi(D_8089EB50) ## $t4 = 808A0000
/* 000A4 8089DCD4 00194B03 */ sra $t1, $t9, 12
/* 000A8 8089DCD8 312A000F */ andi $t2, $t1, 0x000F ## $t2 = 00000000
/* 000AC 8089DCDC 000A5880 */ sll $t3, $t2, 2
/* 000B0 8089DCE0 018B6021 */ addu $t4, $t4, $t3
/* 000B4 8089DCE4 E6040168 */ swc1 $f4, 0x0168($s0) ## 00000168
/* 000B8 8089DCE8 8D8CEB50 */ lw $t4, %lo(D_8089EB50)($t4)
/* 000BC 8089DCEC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000C0 8089DCF0 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 000C4 8089DCF4 0C010D20 */ jal DynaPolyActor_Init
/* 000C8 8089DCF8 AE0C0180 */ sw $t4, 0x0180($s0) ## 00000180
/* 000CC 8089DCFC 960D001C */ lhu $t5, 0x001C($s0) ## 0000001C
/* 000D0 8089DD00 3C04808A */ lui $a0, %hi(D_8089EB70) ## $a0 = 808A0000
/* 000D4 8089DD04 27A50054 */ addiu $a1, $sp, 0x0054 ## $a1 = FFFFFFEC
/* 000D8 8089DD08 000D7303 */ sra $t6, $t5, 12
/* 000DC 8089DD0C 31CF000F */ andi $t7, $t6, 0x000F ## $t7 = 00000000
/* 000E0 8089DD10 000FC080 */ sll $t8, $t7, 2
/* 000E4 8089DD14 00982021 */ addu $a0, $a0, $t8
/* 000E8 8089DD18 0C010620 */ jal CollisionHeader_GetVirtual
/* 000EC 8089DD1C 8C84EB70 */ lw $a0, %lo(D_8089EB70)($a0)
/* 000F0 8089DD20 8FA4006C */ lw $a0, 0x006C($sp)
/* 000F4 8089DD24 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 000F8 8089DD28 8FA70054 */ lw $a3, 0x0054($sp)
/* 000FC 8089DD2C 0C00FA9D */ jal DynaPoly_SetBgActor
## DynaPoly_SetBgActor
/* 00100 8089DD30 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810
/* 00104 8089DD34 9608001C */ lhu $t0, 0x001C($s0) ## 0000001C
/* 00108 8089DD38 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C
/* 0010C 8089DD3C 00081B03 */ sra $v1, $t0, 12
/* 00110 8089DD40 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
/* 00114 8089DD44 2C610008 */ sltiu $at, $v1, 0x0008
/* 00118 8089DD48 1020008B */ beq $at, $zero, .L8089DF78
/* 0011C 8089DD4C 0003C880 */ sll $t9, $v1, 2
/* 00120 8089DD50 3C01808A */ lui $at, %hi(jtbl_8089EC08) ## $at = 808A0000
/* 00124 8089DD54 00390821 */ addu $at, $at, $t9
/* 00128 8089DD58 8C39EC08 */ lw $t9, %lo(jtbl_8089EC08)($at)
/* 0012C 8089DD5C 03200008 */ jr $t9
/* 00130 8089DD60 00000000 */ nop
glabel L8089DD64
/* 00134 8089DD64 8FA9005C */ lw $t1, 0x005C($sp)
/* 00138 8089DD68 3C014170 */ lui $at, 0x4170 ## $at = 41700000
/* 0013C 8089DD6C 44815000 */ mtc1 $at, $f10 ## $f10 = 15.00
/* 00140 8089DD70 852A0022 */ lh $t2, 0x0022($t1) ## 00000022
/* 00144 8089DD74 3C01442F */ lui $at, 0x442F ## $at = 442F0000
/* 00148 8089DD78 44819000 */ mtc1 $at, $f18 ## $f18 = 700.00
/* 0014C 8089DD7C 448A3000 */ mtc1 $t2, $f6 ## $f6 = 0.00
/* 00150 8089DD80 C6100168 */ lwc1 $f16, 0x0168($s0) ## 00000168
/* 00154 8089DD84 3C0B808A */ lui $t3, %hi(func_8089E318) ## $t3 = 808A0000
/* 00158 8089DD88 46803220 */ cvt.s.w $f8, $f6
/* 0015C 8089DD8C 46128081 */ sub.s $f2, $f16, $f18
/* 00160 8089DD90 460A4000 */ add.s $f0, $f8, $f10
/* 00164 8089DD94 4602003C */ c.lt.s $f0, $f2
/* 00168 8089DD98 00000000 */ nop
/* 0016C 8089DD9C 45020004 */ bc1fl .L8089DDB0
/* 00170 8089DDA0 E6000028 */ swc1 $f0, 0x0028($s0) ## 00000028
/* 00174 8089DDA4 10000002 */ beq $zero, $zero, .L8089DDB0
/* 00178 8089DDA8 E6020028 */ swc1 $f2, 0x0028($s0) ## 00000028
/* 0017C 8089DDAC E6000028 */ swc1 $f0, 0x0028($s0) ## 00000028
.L8089DDB0:
/* 00180 8089DDB0 9603001C */ lhu $v1, 0x001C($s0) ## 0000001C
/* 00184 8089DDB4 256BE318 */ addiu $t3, $t3, %lo(func_8089E318) ## $t3 = 8089E318
/* 00188 8089DDB8 AE0B0164 */ sw $t3, 0x0164($s0) ## 00000164
/* 0018C 8089DDBC 00031B03 */ sra $v1, $v1, 12
/* 00190 8089DDC0 1000006D */ beq $zero, $zero, .L8089DF78
/* 00194 8089DDC4 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
glabel L8089DDC8
/* 00198 8089DDC8 8FAC005C */ lw $t4, 0x005C($sp)
/* 0019C 8089DDCC 3C014170 */ lui $at, 0x4170 ## $at = 41700000
/* 001A0 8089DDD0 44814000 */ mtc1 $at, $f8 ## $f8 = 15.00
/* 001A4 8089DDD4 858D0022 */ lh $t5, 0x0022($t4) ## 00000022
/* 001A8 8089DDD8 3C01808A */ lui $at, %hi(D_8089EC28) ## $at = 808A0000
/* 001AC 8089DDDC C430EC28 */ lwc1 $f16, %lo(D_8089EC28)($at)
/* 001B0 8089DDE0 448D2000 */ mtc1 $t5, $f4 ## $f4 = 0.00
/* 001B4 8089DDE4 C60A0168 */ lwc1 $f10, 0x0168($s0) ## 00000168
/* 001B8 8089DDE8 3C0E808A */ lui $t6, %hi(func_8089E318) ## $t6 = 808A0000
/* 001BC 8089DDEC 468021A0 */ cvt.s.w $f6, $f4
/* 001C0 8089DDF0 46105081 */ sub.s $f2, $f10, $f16
/* 001C4 8089DDF4 46083000 */ add.s $f0, $f6, $f8
/* 001C8 8089DDF8 4602003C */ c.lt.s $f0, $f2
/* 001CC 8089DDFC 00000000 */ nop
/* 001D0 8089DE00 45020004 */ bc1fl .L8089DE14
/* 001D4 8089DE04 E6000028 */ swc1 $f0, 0x0028($s0) ## 00000028
/* 001D8 8089DE08 10000002 */ beq $zero, $zero, .L8089DE14
/* 001DC 8089DE0C E6020028 */ swc1 $f2, 0x0028($s0) ## 00000028
/* 001E0 8089DE10 E6000028 */ swc1 $f0, 0x0028($s0) ## 00000028
.L8089DE14:
/* 001E4 8089DE14 9603001C */ lhu $v1, 0x001C($s0) ## 0000001C
/* 001E8 8089DE18 25CEE318 */ addiu $t6, $t6, %lo(func_8089E318) ## $t6 = 8089E318
/* 001EC 8089DE1C AE0E0164 */ sw $t6, 0x0164($s0) ## 00000164
/* 001F0 8089DE20 00031B03 */ sra $v1, $v1, 12
/* 001F4 8089DE24 10000054 */ beq $zero, $zero, .L8089DF78
/* 001F8 8089DE28 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
glabel L8089DE2C
/* 001FC 8089DE2C 8FAF005C */ lw $t7, 0x005C($sp)
/* 00200 8089DE30 3C014170 */ lui $at, 0x4170 ## $at = 41700000
/* 00204 8089DE34 44813000 */ mtc1 $at, $f6 ## $f6 = 15.00
/* 00208 8089DE38 85F80022 */ lh $t8, 0x0022($t7) ## 00000022
/* 0020C 8089DE3C 3C01442F */ lui $at, 0x442F ## $at = 442F0000
/* 00210 8089DE40 44815000 */ mtc1 $at, $f10 ## $f10 = 700.00
/* 00214 8089DE44 44989000 */ mtc1 $t8, $f18 ## $f18 = 0.00
/* 00218 8089DE48 C6080168 */ lwc1 $f8, 0x0168($s0) ## 00000168
/* 0021C 8089DE4C 3C19808A */ lui $t9, %hi(func_8089E318) ## $t9 = 808A0000
/* 00220 8089DE50 46809120 */ cvt.s.w $f4, $f18
/* 00224 8089DE54 460A4081 */ sub.s $f2, $f8, $f10
/* 00228 8089DE58 46062000 */ add.s $f0, $f4, $f6
/* 0022C 8089DE5C 4602003C */ c.lt.s $f0, $f2
/* 00230 8089DE60 00000000 */ nop
/* 00234 8089DE64 45020004 */ bc1fl .L8089DE78
/* 00238 8089DE68 E6000028 */ swc1 $f0, 0x0028($s0) ## 00000028
/* 0023C 8089DE6C 10000002 */ beq $zero, $zero, .L8089DE78
/* 00240 8089DE70 E6020028 */ swc1 $f2, 0x0028($s0) ## 00000028
/* 00244 8089DE74 E6000028 */ swc1 $f0, 0x0028($s0) ## 00000028
.L8089DE78:
/* 00248 8089DE78 9603001C */ lhu $v1, 0x001C($s0) ## 0000001C
/* 0024C 8089DE7C 2739E318 */ addiu $t9, $t9, %lo(func_8089E318) ## $t9 = 8089E318
/* 00250 8089DE80 AE190164 */ sw $t9, 0x0164($s0) ## 00000164
/* 00254 8089DE84 00031B03 */ sra $v1, $v1, 12
/* 00258 8089DE88 1000003B */ beq $zero, $zero, .L8089DF78
/* 0025C 8089DE8C 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
glabel L8089DE90
/* 00260 8089DE90 0C22770C */ jal func_8089DC30
/* 00264 8089DE94 8FA4006C */ lw $a0, 0x006C($sp)
/* 00268 8089DE98 00024880 */ sll $t1, $v0, 2
/* 0026C 8089DE9C 3C01808A */ lui $at, %hi(D_8089EB40) ## $at = 808A0000
/* 00270 8089DEA0 00290821 */ addu $at, $at, $t1
/* 00274 8089DEA4 C430EB40 */ lwc1 $f16, %lo(D_8089EB40)($at)
/* 00278 8089DEA8 C6120168 */ lwc1 $f18, 0x0168($s0) ## 00000168
/* 0027C 8089DEAC 9603001C */ lhu $v1, 0x001C($s0) ## 0000001C
/* 00280 8089DEB0 3C0A808A */ lui $t2, %hi(func_8089E318) ## $t2 = 808A0000
/* 00284 8089DEB4 46128100 */ add.s $f4, $f16, $f18
/* 00288 8089DEB8 254AE318 */ addiu $t2, $t2, %lo(func_8089E318) ## $t2 = 8089E318
/* 0028C 8089DEBC 00031B03 */ sra $v1, $v1, 12
/* 00290 8089DEC0 AE0A0164 */ sw $t2, 0x0164($s0) ## 00000164
/* 00294 8089DEC4 E6040028 */ swc1 $f4, 0x0028($s0) ## 00000028
/* 00298 8089DEC8 1000002B */ beq $zero, $zero, .L8089DF78
/* 0029C 8089DECC 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
glabel L8089DED0
/* 002A0 8089DED0 8FA4006C */ lw $a0, 0x006C($sp)
/* 002A4 8089DED4 0C00B2D0 */ jal Flags_GetSwitch
/* 002A8 8089DED8 3105003F */ andi $a1, $t0, 0x003F ## $a1 = 00000000
/* 002AC 8089DEDC 10400009 */ beq $v0, $zero, .L8089DF04
/* 002B0 8089DEE0 3C0B808A */ lui $t3, %hi(func_8089E318) ## $t3 = 808A0000
/* 002B4 8089DEE4 C6060168 */ lwc1 $f6, 0x0168($s0) ## 00000168
/* 002B8 8089DEE8 3C01808A */ lui $at, %hi(D_8089EC30) ## $at = 808A0000
/* 002BC 8089DEEC D42AEC30 */ ldc1 $f10, %lo(D_8089EC30)($at)
/* 002C0 8089DEF0 46003221 */ cvt.d.s $f8, $f6
/* 002C4 8089DEF4 462A4400 */ add.d $f16, $f8, $f10
/* 002C8 8089DEF8 462084A0 */ cvt.s.d $f18, $f16
/* 002CC 8089DEFC 10000003 */ beq $zero, $zero, .L8089DF0C
/* 002D0 8089DF00 E6120028 */ swc1 $f18, 0x0028($s0) ## 00000028
.L8089DF04:
/* 002D4 8089DF04 C6040168 */ lwc1 $f4, 0x0168($s0) ## 00000168
/* 002D8 8089DF08 E6040028 */ swc1 $f4, 0x0028($s0) ## 00000028
.L8089DF0C:
/* 002DC 8089DF0C 9603001C */ lhu $v1, 0x001C($s0) ## 0000001C
/* 002E0 8089DF10 256BE318 */ addiu $t3, $t3, %lo(func_8089E318) ## $t3 = 8089E318
/* 002E4 8089DF14 AE0B0164 */ sw $t3, 0x0164($s0) ## 00000164
/* 002E8 8089DF18 00031B03 */ sra $v1, $v1, 12
/* 002EC 8089DF1C 10000016 */ beq $zero, $zero, .L8089DF78
/* 002F0 8089DF20 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
glabel L8089DF24
/* 002F4 8089DF24 240200A0 */ addiu $v0, $zero, 0x00A0 ## $v0 = 000000A0
/* 002F8 8089DF28 3107000F */ andi $a3, $t0, 0x000F ## $a3 = 00000000
/* 002FC 8089DF2C AE02016C */ sw $v0, 0x016C($s0) ## 0000016C
/* 00300 8089DF30 AE020170 */ sw $v0, 0x0170($s0) ## 00000170
/* 00304 8089DF34 AE020174 */ sw $v0, 0x0174($s0) ## 00000174
/* 00308 8089DF38 AE020178 */ sw $v0, 0x0178($s0) ## 00000178
/* 0030C 8089DF3C AE070184 */ sw $a3, 0x0184($s0) ## 00000184
/* 00310 8089DF40 8FAC006C */ lw $t4, 0x006C($sp)
/* 00314 8089DF44 3C040001 */ lui $a0, 0x0001 ## $a0 = 00010000
/* 00318 8089DF48 00083203 */ sra $a2, $t0, 8
/* 0031C 8089DF4C 008C2021 */ addu $a0, $a0, $t4
/* 00320 8089DF50 8C841E08 */ lw $a0, 0x1E08($a0) ## 00011E08
/* 00324 8089DF54 30C6000F */ andi $a2, $a2, 0x000F ## $a2 = 00000000
/* 00328 8089DF58 0C227842 */ jal func_8089E108
/* 0032C 8089DF5C 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024
/* 00330 8089DF60 9603001C */ lhu $v1, 0x001C($s0) ## 0000001C
/* 00334 8089DF64 3C0D808A */ lui $t5, %hi(func_8089E650) ## $t5 = 808A0000
/* 00338 8089DF68 25ADE650 */ addiu $t5, $t5, %lo(func_8089E650) ## $t5 = 8089E650
/* 0033C 8089DF6C 00031B03 */ sra $v1, $v1, 12
/* 00340 8089DF70 AE0D0164 */ sw $t5, 0x0164($s0) ## 00000164
/* 00344 8089DF74 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
.L8089DF78:
/* 00348 8089DF78 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
/* 0034C 8089DF7C 10610007 */ beq $v1, $at, .L8089DF9C
/* 00350 8089DF80 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 00354 8089DF84 10610005 */ beq $v1, $at, .L8089DF9C
/* 00358 8089DF88 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005
/* 0035C 8089DF8C 10610003 */ beq $v1, $at, .L8089DF9C
/* 00360 8089DF90 24010006 */ addiu $at, $zero, 0x0006 ## $at = 00000006
/* 00364 8089DF94 5461002C */ bnel $v1, $at, .L8089E048
/* 00368 8089DF98 8FBF003C */ lw $ra, 0x003C($sp)
.L8089DF9C:
/* 0036C 8089DF9C 860E0032 */ lh $t6, 0x0032($s0) ## 00000032
/* 00370 8089DFA0 3C01808A */ lui $at, %hi(D_8089EC38) ## $at = 808A0000
/* 00374 8089DFA4 C42AEC38 */ lwc1 $f10, %lo(D_8089EC38)($at)
/* 00378 8089DFA8 448E3000 */ mtc1 $t6, $f6 ## $f6 = 0.00
/* 0037C 8089DFAC 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00380 8089DFB0 46803220 */ cvt.s.w $f8, $f6
/* 00384 8089DFB4 460A4302 */ mul.s $f12, $f8, $f10
/* 00388 8089DFB8 0C034348 */ jal Matrix_RotateY
/* 0038C 8089DFBC 00000000 */ nop
/* 00390 8089DFC0 3C04808A */ lui $a0, %hi(D_8089EBA0) ## $a0 = 808A0000
/* 00394 8089DFC4 2484EBA0 */ addiu $a0, $a0, %lo(D_8089EBA0) ## $a0 = 8089EBA0
/* 00398 8089DFC8 0C0346BD */ jal Matrix_MultVec3f
/* 0039C 8089DFCC 27A50048 */ addiu $a1, $sp, 0x0048 ## $a1 = FFFFFFE0
/* 003A0 8089DFD0 C6100024 */ lwc1 $f16, 0x0024($s0) ## 00000024
/* 003A4 8089DFD4 C7B20048 */ lwc1 $f18, 0x0048($sp)
/* 003A8 8089DFD8 C7A8004C */ lwc1 $f8, 0x004C($sp)
/* 003AC 8089DFDC 8FA6006C */ lw $a2, 0x006C($sp)
/* 003B0 8089DFE0 46128100 */ add.s $f4, $f16, $f18
/* 003B4 8089DFE4 C7B20050 */ lwc1 $f18, 0x0050($sp)
/* 003B8 8089DFE8 24090002 */ addiu $t1, $zero, 0x0002 ## $t1 = 00000002
/* 003BC 8089DFEC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 003C0 8089DFF0 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 003C4 8089DFF4 C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028
/* 003C8 8089DFF8 2407012D */ addiu $a3, $zero, 0x012D ## $a3 = 0000012D
/* 003CC 8089DFFC 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24
/* 003D0 8089E000 46083280 */ add.s $f10, $f6, $f8
/* 003D4 8089E004 E7AA0014 */ swc1 $f10, 0x0014($sp)
/* 003D8 8089E008 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C
/* 003DC 8089E00C 46128100 */ add.s $f4, $f16, $f18
/* 003E0 8089E010 E7A40018 */ swc1 $f4, 0x0018($sp)
/* 003E4 8089E014 860F0030 */ lh $t7, 0x0030($s0) ## 00000030
/* 003E8 8089E018 AFAF001C */ sw $t7, 0x001C($sp)
/* 003EC 8089E01C 86180032 */ lh $t8, 0x0032($s0) ## 00000032
/* 003F0 8089E020 AFB80020 */ sw $t8, 0x0020($sp)
/* 003F4 8089E024 86190034 */ lh $t9, 0x0034($s0) ## 00000034
/* 003F8 8089E028 AFA90028 */ sw $t1, 0x0028($sp)
/* 003FC 8089E02C 0C00C916 */ jal Actor_SpawnAsChild
/* 00400 8089E030 AFB90024 */ sw $t9, 0x0024($sp)
/* 00404 8089E034 54400004 */ bnel $v0, $zero, .L8089E048
/* 00408 8089E038 8FBF003C */ lw $ra, 0x003C($sp)
/* 0040C 8089E03C 0C00B55C */ jal Actor_Kill
/* 00410 8089E040 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00414 8089E044 8FBF003C */ lw $ra, 0x003C($sp)
.L8089E048:
/* 00418 8089E048 8FB00038 */ lw $s0, 0x0038($sp)
/* 0041C 8089E04C 27BD0068 */ addiu $sp, $sp, 0x0068 ## $sp = 00000000
/* 00420 8089E050 03E00008 */ jr $ra
/* 00424 8089E054 00000000 */ nop

View file

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

4
spec
View file

@ -1013,11 +1013,7 @@ endseg
beginseg
name "ovl_Bg_Mizu_Movebg"
include "build/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_Bg_Mizu_Movebg/ovl_Bg_Mizu_Movebg_reloc.o"
#else
include "build/data/overlays/actors/z_bg_mizu_movebg.reloc.o"
#endif
endseg
beginseg

View file

@ -80,93 +80,94 @@ s32 func_8089DC30(GlobalContext* globalCtx) {
return result;
}
#ifdef NON_MATCHING
// Codegen OK, Stack Issues
void BgMizuMovebg_Init(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2;
BgMizuMovebg* this = THIS;
void BgMizuMovebg_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 type;
s32 waypointId;
WaterBox* waterBoxes = globalCtx->colCtx.colHeader->waterBoxes;
f32 temp;
CollisionHeader* colHeader = NULL;
Vec3f sp48;
Actor_ProcessInitChain(&this->dyna.actor, D_8089EB90);
this->homeY = this->dyna.actor.world.pos.y;
this->dlist = D_8089EB50[MOVEBG_TYPE(this->dyna.actor.params)];
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
CollisionHeader_GetVirtual(D_8089EB70[MOVEBG_TYPE(this->dyna.actor.params)], &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
Actor_ProcessInitChain(thisx, D_8089EB90);
THIS->homeY = thisx->world.pos.y;
THIS->dlist = D_8089EB50[MOVEBG_TYPE(thisx->params)];
DynaPolyActor_Init(&THIS->dyna, DPM_PLAYER);
CollisionHeader_GetVirtual(D_8089EB70[MOVEBG_TYPE(thisx->params)], &colHeader);
THIS->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
switch (MOVEBG_TYPE(this->dyna.actor.params)) {
type = MOVEBG_TYPE(thisx->params);
switch (type) {
case 0:
if (waterBoxes[2].ySurface + 15.0f < this->homeY - 700.0f) {
this->dyna.actor.world.pos.y = this->homeY - 700.0f;
temp = waterBoxes[2].ySurface + 15.0f;
if (temp < THIS->homeY - 700.0f) {
thisx->world.pos.y = THIS->homeY - 700.0f;
} else {
this->dyna.actor.world.pos.y = waterBoxes[2].ySurface + 15.0f;
thisx->world.pos.y = temp;
}
this->actionFunc = func_8089E318;
THIS->actionFunc = func_8089E318;
break;
case 1:
if (waterBoxes[2].ySurface + 15.0f < this->homeY - 710.0f) {
this->dyna.actor.world.pos.y = this->homeY - 710.0f;
temp = waterBoxes[2].ySurface + 15.0f;
if (temp < THIS->homeY - 710.0f) {
thisx->world.pos.y = THIS->homeY - 710.0f;
} else {
this->dyna.actor.world.pos.y = waterBoxes[2].ySurface + 15.0f;
thisx->world.pos.y = temp;
}
this->actionFunc = func_8089E318;
THIS->actionFunc = func_8089E318;
break;
case 2:
if (waterBoxes[2].ySurface + 15.0f < this->homeY - 700.0f) {
this->dyna.actor.world.pos.y = this->homeY - 700.0f;
temp = waterBoxes[2].ySurface + 15.0f;
if (temp < THIS->homeY - 700.0f) {
thisx->world.pos.y = THIS->homeY - 700.0f;
} else {
this->dyna.actor.world.pos.y = waterBoxes[2].ySurface + 15.0f;
thisx->world.pos.y = temp;
}
this->actionFunc = func_8089E318;
THIS->actionFunc = func_8089E318;
break;
case 3:
this->dyna.actor.world.pos.y = this->homeY + D_8089EB40[func_8089DC30(globalCtx)];
this->actionFunc = func_8089E318;
thisx->world.pos.y = THIS->homeY + D_8089EB40[func_8089DC30(globalCtx)];
THIS->actionFunc = func_8089E318;
break;
case 4:
case 5:
case 6:
if (Flags_GetSwitch(globalCtx, MOVEBG_FLAGS(this->dyna.actor.params))) {
this->dyna.actor.world.pos.y = this->homeY + 115.2;
if (Flags_GetSwitch(globalCtx, MOVEBG_FLAGS(thisx->params))) {
thisx->world.pos.y = THIS->homeY + 115.19999999999999;
} else {
this->dyna.actor.world.pos.y = this->homeY;
thisx->world.pos.y = THIS->homeY;
}
this->actionFunc = func_8089E318;
THIS->actionFunc = func_8089E318;
break;
case 7:
this->scrollAlpha1 = 160;
this->scrollAlpha2 = 160;
this->scrollAlpha3 = 160;
this->scrollAlpha4 = 160;
this->waypointId = MOVEBG_POINT_ID(this->dyna.actor.params);
func_8089E108(globalCtx->setupPathList, &this->dyna.actor.world.pos,
MOVEBG_PATH_ID(this->dyna.actor.params), this->waypointId);
this->actionFunc = func_8089E650;
THIS->scrollAlpha1 = 160;
THIS->scrollAlpha2 = 160;
THIS->scrollAlpha3 = 160;
THIS->scrollAlpha4 = 160;
waypointId = MOVEBG_POINT_ID(thisx->params);
THIS->waypointId = waypointId;
func_8089E108(globalCtx->setupPathList, &thisx->world.pos, MOVEBG_PATH_ID(thisx->params), waypointId);
THIS->actionFunc = func_8089E650;
break;
}
switch (MOVEBG_TYPE(this->dyna.actor.params)) {
type = MOVEBG_TYPE(thisx->params);
switch (type) {
case 3:
case 4:
case 5:
case 6:
Matrix_RotateY(this->dyna.actor.world.rot.y * (M_PI / 32768), MTXMODE_NEW);
Matrix_RotateY(thisx->world.rot.y * (M_PI / 32768), MTXMODE_NEW);
Matrix_MultVec3f(&D_8089EBA0, &sp48);
if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_OBJ_HSBLOCK,
this->dyna.actor.world.pos.x + sp48.x, this->dyna.actor.world.pos.y + sp48.y,
this->dyna.actor.world.pos.z + sp48.z, this->dyna.actor.world.rot.x,
this->dyna.actor.world.rot.y, this->dyna.actor.world.rot.z, 2) == NULL) {
Actor_Kill(&this->dyna.actor);
if (Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_OBJ_HSBLOCK,
thisx->world.pos.x + sp48.x, thisx->world.pos.y + sp48.y,
thisx->world.pos.z + sp48.z, thisx->world.rot.x, thisx->world.rot.y,
thisx->world.rot.z, 2) == NULL) {
Actor_Kill(thisx);
}
break;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Movebg/BgMizuMovebg_Init.s")
#endif
void BgMizuMovebg_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgMizuMovebg* this = THIS;

View file

@ -2809,10 +2809,10 @@ void BossVa_Update(Actor* thisx, GlobalContext* globalCtx2) {
switch (this->actor.params) {
case BOSSVA_BODY:
if (THIS->colliderBody.base.acFlags & AC_HIT) {
if (this->colliderBody.base.acFlags & AC_HIT) {
this->colliderBody.base.acFlags &= ~AC_HIT;
if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) {
boomerang = (EnBoom*)this->colliderBody.base.ac;
if (boomerang->actor.id == ACTOR_EN_BOOM) {
boomerang->returnTimer = 0;
}
}