1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-01-14 12:17:08 +00:00

ovl_bg_haka_ship OK (#712)

* 2 non matchings left

* decompiled ovl_Bg_Haka_Ship

* review suggestions

* parent/child (Actor*)

* removed unneeded cast

* removed DECR

* review 2 suggestions, removed some redundant parentheses
This commit is contained in:
emilybrooks 2021-03-10 17:02:22 -07:00 committed by GitHub
parent 80d0b2785d
commit 7c5ae8cc03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 216 additions and 813 deletions

View file

@ -1,17 +0,0 @@
glabel BgHakaShip_Destroy
/* 00140 8087F240 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00144 8087F244 AFA40018 */ sw $a0, 0x0018($sp)
/* 00148 8087F248 8FAE0018 */ lw $t6, 0x0018($sp)
/* 0014C 8087F24C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00150 8087F250 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00154 8087F254 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
/* 00158 8087F258 0C00FB56 */ jal DynaPoly_DeleteBgActor
## DynaPoly_DeleteBgActor
/* 0015C 8087F25C 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C
/* 00160 8087F260 8FA40018 */ lw $a0, 0x0018($sp)
/* 00164 8087F264 0C03E27A */ jal func_800F89E8
/* 00168 8087F268 2484016C */ addiu $a0, $a0, 0x016C ## $a0 = 0000016C
/* 0016C 8087F26C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00170 8087F270 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00174 8087F274 03E00008 */ jr $ra
/* 00178 8087F278 00000000 */ nop

View file

@ -1,226 +0,0 @@
.rdata
glabel D_8087FAF8
.asciz "../z_bg_haka_ship.c"
.balign 4
glabel D_8087FB0C
.asciz "../z_bg_haka_ship.c"
.balign 4
glabel D_8087FB20
.asciz "../z_bg_haka_ship.c"
.balign 4
glabel D_8087FB34
.asciz "../z_bg_haka_ship.c"
.balign 4
glabel D_8087FB48
.asciz "../z_bg_haka_ship.c"
.balign 4
glabel D_8087FB5C
.asciz "../z_bg_haka_ship.c"
.balign 4
.late_rodata
glabel D_8087FB88
.float 9.5873802e-5
glabel D_8087FB8C
.float -3670.0
glabel D_8087FB90
.float -367.0
.text
glabel BgHakaShip_Draw
/* 006B4 8087F7B4 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88
/* 006B8 8087F7B8 AFBF001C */ sw $ra, 0x001C($sp)
/* 006BC 8087F7BC AFB00018 */ sw $s0, 0x0018($sp)
/* 006C0 8087F7C0 AFA40078 */ sw $a0, 0x0078($sp)
/* 006C4 8087F7C4 AFA5007C */ sw $a1, 0x007C($sp)
/* 006C8 8087F7C8 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 006CC 8087F7CC 3C068088 */ lui $a2, %hi(D_8087FAF8) ## $a2 = 80880000
/* 006D0 8087F7D0 24C6FAF8 */ addiu $a2, $a2, %lo(D_8087FAF8) ## $a2 = 8087FAF8
/* 006D4 8087F7D4 27A4005C */ addiu $a0, $sp, 0x005C ## $a0 = FFFFFFE4
/* 006D8 8087F7D8 24070210 */ addiu $a3, $zero, 0x0210 ## $a3 = 00000210
/* 006DC 8087F7DC 0C031AB1 */ jal Graph_OpenDisps
/* 006E0 8087F7E0 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
/* 006E4 8087F7E4 8FAF007C */ lw $t7, 0x007C($sp)
/* 006E8 8087F7E8 0C024F46 */ jal func_80093D18
/* 006EC 8087F7EC 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000
/* 006F0 8087F7F0 8FB80078 */ lw $t8, 0x0078($sp)
/* 006F4 8087F7F4 3C09DA38 */ lui $t1, 0xDA38 ## $t1 = DA380000
/* 006F8 8087F7F8 3C08DA38 */ lui $t0, 0xDA38 ## $t0 = DA380000
/* 006FC 8087F7FC 8719001C */ lh $t9, 0x001C($t8) ## 0000001C
/* 00700 8087F800 57200065 */ bnel $t9, $zero, .L8087F998
/* 00704 8087F804 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 00708 8087F808 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 0070C 8087F80C 35290003 */ ori $t1, $t1, 0x0003 ## $t1 = DA380003
/* 00710 8087F810 3C058088 */ lui $a1, %hi(D_8087FB0C) ## $a1 = 80880000
/* 00714 8087F814 24480008 */ addiu $t0, $v0, 0x0008 ## $t0 = 00000008
/* 00718 8087F818 AE0802C0 */ sw $t0, 0x02C0($s0) ## 000002C0
/* 0071C 8087F81C AC490000 */ sw $t1, 0x0000($v0) ## 00000000
/* 00720 8087F820 8FAA007C */ lw $t2, 0x007C($sp)
/* 00724 8087F824 24A5FB0C */ addiu $a1, $a1, %lo(D_8087FB0C) ## $a1 = 8087FB0C
/* 00728 8087F828 24060216 */ addiu $a2, $zero, 0x0216 ## $a2 = 00000216
/* 0072C 8087F82C 8D440000 */ lw $a0, 0x0000($t2) ## 00000000
/* 00730 8087F830 0C0346A2 */ jal Matrix_NewMtx
/* 00734 8087F834 AFA20058 */ sw $v0, 0x0058($sp)
/* 00738 8087F838 8FA30058 */ lw $v1, 0x0058($sp)
/* 0073C 8087F83C 3C0D0601 */ lui $t5, %hi(D_0600D330) ## $t5 = 06010000
/* 00740 8087F840 25ADD330 */ addiu $t5, $t5, %lo(D_0600D330) ## $t5 = 0600D330
/* 00744 8087F844 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 00748 8087F848 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 0074C 8087F84C 3C0CDE00 */ lui $t4, 0xDE00 ## $t4 = DE000000
/* 00750 8087F850 3C018088 */ lui $at, %hi(D_8087FB88) ## $at = 80880000
/* 00754 8087F854 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 00758 8087F858 AE0B02C0 */ sw $t3, 0x02C0($s0) ## 000002C0
/* 0075C 8087F85C AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004
/* 00760 8087F860 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
/* 00764 8087F864 8FAE0078 */ lw $t6, 0x0078($sp)
/* 00768 8087F868 C428FB88 */ lwc1 $f8, %lo(D_8087FB88)($at)
/* 0076C 8087F86C 3C018088 */ lui $at, %hi(D_8087FB8C) ## $at = 80880000
/* 00770 8087F870 85CF016A */ lh $t7, 0x016A($t6) ## 0000016A
/* 00774 8087F874 C42CFB8C */ lwc1 $f12, %lo(D_8087FB8C)($at)
/* 00778 8087F878 3C01441B */ lui $at, 0x441B ## $at = 441B0000
/* 0077C 8087F87C 448F2000 */ mtc1 $t7, $f4 ## $f4 = 0.00
/* 00780 8087F880 44817000 */ mtc1 $at, $f14 ## $f14 = 620.00
/* 00784 8087F884 3C06448F */ lui $a2, 0x448F ## $a2 = 448F0000
/* 00788 8087F888 468021A0 */ cvt.s.w $f6, $f4
/* 0078C 8087F88C 34C6C000 */ ori $a2, $a2, 0xC000 ## $a2 = 448FC000
/* 00790 8087F890 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 00794 8087F894 46083282 */ mul.s $f10, $f6, $f8
/* 00798 8087F898 0C034261 */ jal Matrix_Translate
/* 0079C 8087F89C E7AA0070 */ swc1 $f10, 0x0070($sp)
/* 007A0 8087F8A0 C7AC0070 */ lwc1 $f12, 0x0070($sp)
/* 007A4 8087F8A4 0C0343B5 */ jal Matrix_RotateZ
/* 007A8 8087F8A8 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 007AC 8087F8AC 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 007B0 8087F8B0 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000
/* 007B4 8087F8B4 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003
/* 007B8 8087F8B8 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008
/* 007BC 8087F8BC AE1802C0 */ sw $t8, 0x02C0($s0) ## 000002C0
/* 007C0 8087F8C0 AC590000 */ sw $t9, 0x0000($v0) ## 00000000
/* 007C4 8087F8C4 8FA8007C */ lw $t0, 0x007C($sp)
/* 007C8 8087F8C8 3C058088 */ lui $a1, %hi(D_8087FB20) ## $a1 = 80880000
/* 007CC 8087F8CC 24A5FB20 */ addiu $a1, $a1, %lo(D_8087FB20) ## $a1 = 8087FB20
/* 007D0 8087F8D0 8D040000 */ lw $a0, 0x0000($t0) ## 00000000
/* 007D4 8087F8D4 24060223 */ addiu $a2, $zero, 0x0223 ## $a2 = 00000223
/* 007D8 8087F8D8 0C0346A2 */ jal Matrix_NewMtx
/* 007DC 8087F8DC AFA20050 */ sw $v0, 0x0050($sp)
/* 007E0 8087F8E0 8FA30050 */ lw $v1, 0x0050($sp)
/* 007E4 8087F8E4 3C040600 */ lui $a0, %hi(D_06005A70) ## $a0 = 06000000
/* 007E8 8087F8E8 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 007EC 8087F8EC AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 007F0 8087F8F0 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 007F4 8087F8F4 24845A70 */ addiu $a0, $a0, %lo(D_06005A70) ## $a0 = 06005A70
/* 007F8 8087F8F8 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000
/* 007FC 8087F8FC 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008
/* 00800 8087F900 AE0902C0 */ sw $t1, 0x02C0($s0) ## 000002C0
/* 00804 8087F904 3C06C50F */ lui $a2, 0xC50F ## $a2 = C50F0000
/* 00808 8087F908 AC440004 */ sw $a0, 0x0004($v0) ## 00000004
/* 0080C 8087F90C AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000
/* 00810 8087F910 AFA40028 */ sw $a0, 0x0028($sp)
/* 00814 8087F914 34C6C000 */ ori $a2, $a2, 0xC000 ## $a2 = C50FC000
/* 00818 8087F918 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 0081C 8087F91C 0C034261 */ jal Matrix_Translate
/* 00820 8087F920 46006386 */ mov.s $f14, $f12
/* 00824 8087F924 C7A00070 */ lwc1 $f0, 0x0070($sp)
/* 00828 8087F928 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 0082C 8087F92C 46000300 */ add.s $f12, $f0, $f0
/* 00830 8087F930 0C0343B5 */ jal Matrix_RotateZ
/* 00834 8087F934 46006307 */ neg.s $f12, $f12
/* 00838 8087F938 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 0083C 8087F93C 3C0CDA38 */ lui $t4, 0xDA38 ## $t4 = DA380000
/* 00840 8087F940 358C0003 */ ori $t4, $t4, 0x0003 ## $t4 = DA380003
/* 00844 8087F944 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 00848 8087F948 AE0B02C0 */ sw $t3, 0x02C0($s0) ## 000002C0
/* 0084C 8087F94C AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
/* 00850 8087F950 8FAD007C */ lw $t5, 0x007C($sp)
/* 00854 8087F954 3C058088 */ lui $a1, %hi(D_8087FB34) ## $a1 = 80880000
/* 00858 8087F958 24A5FB34 */ addiu $a1, $a1, %lo(D_8087FB34) ## $a1 = 8087FB34
/* 0085C 8087F95C 8DA40000 */ lw $a0, 0x0000($t5) ## 00000000
/* 00860 8087F960 2406022C */ addiu $a2, $zero, 0x022C ## $a2 = 0000022C
/* 00864 8087F964 0C0346A2 */ jal Matrix_NewMtx
/* 00868 8087F968 AFA20048 */ sw $v0, 0x0048($sp)
/* 0086C 8087F96C 8FA30048 */ lw $v1, 0x0048($sp)
/* 00870 8087F970 3C0FDE00 */ lui $t7, 0xDE00 ## $t7 = DE000000
/* 00874 8087F974 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 00878 8087F978 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 0087C 8087F97C 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 00880 8087F980 AE0E02C0 */ sw $t6, 0x02C0($s0) ## 000002C0
/* 00884 8087F984 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 00888 8087F988 8FB80028 */ lw $t8, 0x0028($sp)
/* 0088C 8087F98C 10000017 */ beq $zero, $zero, .L8087F9EC
/* 00890 8087F990 AC580004 */ sw $t8, 0x0004($v0) ## 00000004
/* 00894 8087F994 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
.L8087F998:
/* 00898 8087F998 35080003 */ ori $t0, $t0, 0x0003 ## $t0 = 00000003
/* 0089C 8087F99C 3C058088 */ lui $a1, %hi(D_8087FB48) ## $a1 = 80880000
/* 008A0 8087F9A0 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008
/* 008A4 8087F9A4 AE1902C0 */ sw $t9, 0x02C0($s0) ## 000002C0
/* 008A8 8087F9A8 AC480000 */ sw $t0, 0x0000($v0) ## 00000000
/* 008AC 8087F9AC 8FA9007C */ lw $t1, 0x007C($sp)
/* 008B0 8087F9B0 24A5FB48 */ addiu $a1, $a1, %lo(D_8087FB48) ## $a1 = 8087FB48
/* 008B4 8087F9B4 24060232 */ addiu $a2, $zero, 0x0232 ## $a2 = 00000232
/* 008B8 8087F9B8 8D240000 */ lw $a0, 0x0000($t1) ## 00000000
/* 008BC 8087F9BC 0C0346A2 */ jal Matrix_NewMtx
/* 008C0 8087F9C0 AFA20040 */ sw $v0, 0x0040($sp)
/* 008C4 8087F9C4 8FA30040 */ lw $v1, 0x0040($sp)
/* 008C8 8087F9C8 3C0C0601 */ lui $t4, %hi(D_0600E910) ## $t4 = 06010000
/* 008CC 8087F9CC 258CE910 */ addiu $t4, $t4, %lo(D_0600E910) ## $t4 = 0600E910
/* 008D0 8087F9D0 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 008D4 8087F9D4 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 008D8 8087F9D8 3C0BDE00 */ lui $t3, 0xDE00 ## $t3 = DE000000
/* 008DC 8087F9DC 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008
/* 008E0 8087F9E0 AE0A02C0 */ sw $t2, 0x02C0($s0) ## 000002C0
/* 008E4 8087F9E4 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004
/* 008E8 8087F9E8 AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000
.L8087F9EC:
/* 008EC 8087F9EC 8FAD007C */ lw $t5, 0x007C($sp)
/* 008F0 8087F9F0 3C068088 */ lui $a2, %hi(D_8087FB5C) ## $a2 = 80880000
/* 008F4 8087F9F4 24C6FB5C */ addiu $a2, $a2, %lo(D_8087FB5C) ## $a2 = 8087FB5C
/* 008F8 8087F9F8 27A4005C */ addiu $a0, $sp, 0x005C ## $a0 = FFFFFFE4
/* 008FC 8087F9FC 24070238 */ addiu $a3, $zero, 0x0238 ## $a3 = 00000238
/* 00900 8087FA00 0C031AD5 */ jal Graph_CloseDisps
/* 00904 8087FA04 8DA50000 */ lw $a1, 0x0000($t5) ## 00000000
/* 00908 8087FA08 8FA30078 */ lw $v1, 0x0078($sp)
/* 0090C 8087FA0C 3C0E8088 */ lui $t6, %hi(func_8087F364) ## $t6 = 80880000
/* 00910 8087FA10 25CEF364 */ addiu $t6, $t6, %lo(func_8087F364) ## $t6 = 8087F364
/* 00914 8087FA14 8C620164 */ lw $v0, 0x0164($v1) ## 00000164
/* 00918 8087FA18 3C0F8088 */ lui $t7, %hi(func_8087F400) ## $t7 = 80880000
/* 0091C 8087FA1C 25EFF400 */ addiu $t7, $t7, %lo(func_8087F400) ## $t7 = 8087F400
/* 00920 8087FA20 11C20003 */ beq $t6, $v0, .L8087FA30
/* 00924 8087FA24 3C018088 */ lui $at, %hi(D_8087FB90) ## $at = 80880000
/* 00928 8087FA28 55E20018 */ bnel $t7, $v0, .L8087FA8C
/* 0092C 8087FA2C 8FBF001C */ lw $ra, 0x001C($sp)
.L8087FA30:
/* 00930 8087FA30 C4700024 */ lwc1 $f16, 0x0024($v1) ## 00000024
/* 00934 8087FA34 C432FB90 */ lwc1 $f18, %lo(D_8087FB90)($at)
/* 00938 8087FA38 3C014278 */ lui $at, 0x4278 ## $at = 42780000
/* 0093C 8087FA3C 44814000 */ mtc1 $at, $f8 ## $f8 = 62.00
/* 00940 8087FA40 46128100 */ add.s $f4, $f16, $f18
/* 00944 8087FA44 8FA4007C */ lw $a0, 0x007C($sp)
/* 00948 8087FA48 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 0094C 8087FA4C 34211D60 */ ori $at, $at, 0x1D60 ## $at = 00011D60
/* 00950 8087FA50 E7A4002C */ swc1 $f4, 0x002C($sp)
/* 00954 8087FA54 C4660028 */ lwc1 $f6, 0x0028($v1) ## 00000028
/* 00958 8087FA58 2470016C */ addiu $s0, $v1, 0x016C ## $s0 = 0000016C
/* 0095C 8087FA5C 02003025 */ or $a2, $s0, $zero ## $a2 = 0000016C
/* 00960 8087FA60 46083280 */ add.s $f10, $f6, $f8
/* 00964 8087FA64 27A5002C */ addiu $a1, $sp, 0x002C ## $a1 = FFFFFFB4
/* 00968 8087FA68 00812021 */ addu $a0, $a0, $at
/* 0096C 8087FA6C E7AA0030 */ swc1 $f10, 0x0030($sp)
/* 00970 8087FA70 C470002C */ lwc1 $f16, 0x002C($v1) ## 0000002C
/* 00974 8087FA74 0C029BBD */ jal SkinMatrix_Vec3fMtxFMultXYZ
/* 00978 8087FA78 E7B00034 */ swc1 $f16, 0x0034($sp)
/* 0097C 8087FA7C 02002025 */ or $a0, $s0, $zero ## $a0 = 0000016C
/* 00980 8087FA80 0C01E245 */ jal func_80078914
/* 00984 8087FA84 2405204F */ addiu $a1, $zero, 0x204F ## $a1 = 0000204F
/* 00988 8087FA88 8FBF001C */ lw $ra, 0x001C($sp)
.L8087FA8C:
/* 0098C 8087FA8C 8FB00018 */ lw $s0, 0x0018($sp)
/* 00990 8087FA90 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000
/* 00994 8087FA94 03E00008 */ jr $ra
/* 00998 8087FA98 00000000 */ nop
/* 0099C 8087FA9C 00000000 */ nop

View file

@ -1,92 +0,0 @@
glabel BgHakaShip_Init
/* 00000 8087F100 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0
/* 00004 8087F104 AFA50054 */ sw $a1, 0x0054($sp)
/* 00008 8087F108 AFBF003C */ sw $ra, 0x003C($sp)
/* 0000C 8087F10C AFB00038 */ sw $s0, 0x0038($sp)
/* 00010 8087F110 3C058088 */ lui $a1, %hi(D_8087FAC0) ## $a1 = 80880000
/* 00014 8087F114 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00018 8087F118 AFA00044 */ sw $zero, 0x0044($sp)
/* 0001C 8087F11C 0C01E037 */ jal Actor_ProcessInitChain
/* 00020 8087F120 24A5FAC0 */ addiu $a1, $a1, %lo(D_8087FAC0) ## $a1 = 8087FAC0
/* 00024 8087F124 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00028 8087F128 0C010D20 */ jal DynaPolyActor_Init
/* 0002C 8087F12C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00030 8087F130 8619001C */ lh $t9, 0x001C($s0) ## 0000001C
/* 00034 8087F134 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
/* 00038 8087F138 3C040601 */ lui $a0, %hi(D_0600ED7C) ## $a0 = 06010000
/* 0003C 8087F13C 332800FF */ andi $t0, $t9, 0x00FF ## $t0 = 00000000
/* 00040 8087F140 A608001C */ sh $t0, 0x001C($s0) ## 0000001C
/* 00044 8087F144 8609001C */ lh $t1, 0x001C($s0) ## 0000001C
/* 00048 8087F148 000EC203 */ sra $t8, $t6, 8
/* 0004C 8087F14C A2180169 */ sb $t8, 0x0169($s0) ## 00000169
/* 00050 8087F150 1520000B */ bne $t1, $zero, .L8087F180
/* 00054 8087F154 2484ED7C */ addiu $a0, $a0, %lo(D_0600ED7C) ## $a0 = 0600ED7C
/* 00058 8087F158 3C040601 */ lui $a0, %hi(D_0600E408) ## $a0 = 06010000
/* 0005C 8087F15C 2484E408 */ addiu $a0, $a0, %lo(D_0600E408) ## $a0 = 0600E408
/* 00060 8087F160 0C010620 */ jal CollisionHeader_GetVirtual
/* 00064 8087F164 27A50044 */ addiu $a1, $sp, 0x0044 ## $a1 = FFFFFFF4
/* 00068 8087F168 3C0B8088 */ lui $t3, %hi(func_8087F2D8) ## $t3 = 80880000
/* 0006C 8087F16C 240A0008 */ addiu $t2, $zero, 0x0008 ## $t2 = 00000008
/* 00070 8087F170 256BF2D8 */ addiu $t3, $t3, %lo(func_8087F2D8) ## $t3 = 8087F2D8
/* 00074 8087F174 A20A0168 */ sb $t2, 0x0168($s0) ## 00000168
/* 00078 8087F178 10000006 */ beq $zero, $zero, .L8087F194
/* 0007C 8087F17C AE0B0164 */ sw $t3, 0x0164($s0) ## 00000164
.L8087F180:
/* 00080 8087F180 0C010620 */ jal CollisionHeader_GetVirtual
/* 00084 8087F184 27A50044 */ addiu $a1, $sp, 0x0044 ## $a1 = FFFFFFF4
/* 00088 8087F188 3C0C8088 */ lui $t4, %hi(func_8087F27C) ## $t4 = 80880000
/* 0008C 8087F18C 258CF27C */ addiu $t4, $t4, %lo(func_8087F27C) ## $t4 = 8087F27C
/* 00090 8087F190 AE0C0164 */ sw $t4, 0x0164($s0) ## 00000164
.L8087F194:
/* 00094 8087F194 8FA40054 */ lw $a0, 0x0054($sp)
/* 00098 8087F198 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 0009C 8087F19C 8FA70044 */ lw $a3, 0x0044($sp)
/* 000A0 8087F1A0 0C00FA9D */ jal DynaPoly_SetBgActor
## DynaPoly_SetBgActor
/* 000A4 8087F1A4 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810
/* 000A8 8087F1A8 860D00B6 */ lh $t5, 0x00B6($s0) ## 000000B6
/* 000AC 8087F1AC 860F001C */ lh $t7, 0x001C($s0) ## 0000001C
/* 000B0 8087F1B0 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C
/* 000B4 8087F1B4 25AEC000 */ addiu $t6, $t5, 0xC000 ## $t6 = FFFFC000
/* 000B8 8087F1B8 A60E0032 */ sh $t6, 0x0032($s0) ## 00000032
/* 000BC 8087F1BC 15E0001B */ bne $t7, $zero, .L8087F22C
/* 000C0 8087F1C0 A600016A */ sh $zero, 0x016A($s0) ## 0000016A
/* 000C4 8087F1C4 3C01C120 */ lui $at, 0xC120 ## $at = C1200000
/* 000C8 8087F1C8 44813000 */ mtc1 $at, $f6 ## $f6 = -10.00
/* 000CC 8087F1CC C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
/* 000D0 8087F1D0 3C0142A4 */ lui $at, 0x42A4 ## $at = 42A40000
/* 000D4 8087F1D4 44818000 */ mtc1 $at, $f16 ## $f16 = 82.00
/* 000D8 8087F1D8 46062200 */ add.s $f8, $f4, $f6
/* 000DC 8087F1DC 8FA60054 */ lw $a2, 0x0054($sp)
/* 000E0 8087F1E0 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001
/* 000E4 8087F1E4 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 000E8 8087F1E8 E7A80010 */ swc1 $f8, 0x0010($sp)
/* 000EC 8087F1EC C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
/* 000F0 8087F1F0 240700B0 */ addiu $a3, $zero, 0x00B0 ## $a3 = 000000B0
/* 000F4 8087F1F4 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24
/* 000F8 8087F1F8 46105480 */ add.s $f18, $f10, $f16
/* 000FC 8087F1FC E7B20014 */ swc1 $f18, 0x0014($sp)
/* 00100 8087F200 C604002C */ lwc1 $f4, 0x002C($s0) ## 0000002C
/* 00104 8087F204 AFB90028 */ sw $t9, 0x0028($sp)
/* 00108 8087F208 AFA00024 */ sw $zero, 0x0024($sp)
/* 0010C 8087F20C AFA00020 */ sw $zero, 0x0020($sp)
/* 00110 8087F210 AFA0001C */ sw $zero, 0x001C($sp)
/* 00114 8087F214 0C00C916 */ jal Actor_SpawnAsChild
/* 00118 8087F218 E7A40018 */ swc1 $f4, 0x0018($sp)
/* 0011C 8087F21C 54400004 */ bnel $v0, $zero, .L8087F230
/* 00120 8087F220 8FBF003C */ lw $ra, 0x003C($sp)
/* 00124 8087F224 0C00B55C */ jal Actor_Kill
/* 00128 8087F228 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L8087F22C:
/* 0012C 8087F22C 8FBF003C */ lw $ra, 0x003C($sp)
.L8087F230:
/* 00130 8087F230 8FB00038 */ lw $s0, 0x0038($sp)
/* 00134 8087F234 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000
/* 00138 8087F238 03E00008 */ jr $ra
/* 0013C 8087F23C 00000000 */ nop

View file

@ -1,19 +0,0 @@
glabel BgHakaShip_Update
/* 00674 8087F774 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00678 8087F778 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0067C 8087F77C AFA40018 */ sw $a0, 0x0018($sp)
/* 00680 8087F780 8C990164 */ lw $t9, 0x0164($a0) ## 00000164
/* 00684 8087F784 0320F809 */ jalr $ra, $t9
/* 00688 8087F788 00000000 */ nop
/* 0068C 8087F78C 8FA40018 */ lw $a0, 0x0018($sp)
/* 00690 8087F790 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 00694 8087F794 55C00004 */ bnel $t6, $zero, .L8087F7A8
/* 00698 8087F798 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0069C 8087F79C 0C00B638 */ jal Actor_MoveForward
/* 006A0 8087F7A0 00000000 */ nop
/* 006A4 8087F7A4 8FBF0014 */ lw $ra, 0x0014($sp)
.L8087F7A8:
/* 006A8 8087F7A8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 006AC 8087F7AC 03E00008 */ jr $ra
/* 006B0 8087F7B0 00000000 */ nop

View file

@ -1,26 +0,0 @@
glabel func_8087F27C
/* 0017C 8087F27C AFA50004 */ sw $a1, 0x0004($sp)
/* 00180 8087F280 8C820118 */ lw $v0, 0x0118($a0) ## 00000118
/* 00184 8087F284 50400012 */ beql $v0, $zero, .L8087F2D0
/* 00188 8087F288 AC800118 */ sw $zero, 0x0118($a0) ## 00000118
/* 0018C 8087F28C 8C4E0130 */ lw $t6, 0x0130($v0) ## 00000130
/* 00190 8087F290 3C01C120 */ lui $at, 0xC120 ## $at = C1200000
/* 00194 8087F294 51C0000E */ beql $t6, $zero, .L8087F2D0
/* 00198 8087F298 AC800118 */ sw $zero, 0x0118($a0) ## 00000118
/* 0019C 8087F29C C4440024 */ lwc1 $f4, 0x0024($v0) ## 00000024
/* 001A0 8087F2A0 44813000 */ mtc1 $at, $f6 ## $f6 = -10.00
/* 001A4 8087F2A4 3C0142A4 */ lui $at, 0x42A4 ## $at = 42A40000
/* 001A8 8087F2A8 44818000 */ mtc1 $at, $f16 ## $f16 = 82.00
/* 001AC 8087F2AC 46062200 */ add.s $f8, $f4, $f6
/* 001B0 8087F2B0 E4880024 */ swc1 $f8, 0x0024($a0) ## 00000024
/* 001B4 8087F2B4 C44A0028 */ lwc1 $f10, 0x0028($v0) ## 00000028
/* 001B8 8087F2B8 46105480 */ add.s $f18, $f10, $f16
/* 001BC 8087F2BC E4920028 */ swc1 $f18, 0x0028($a0) ## 00000028
/* 001C0 8087F2C0 C444002C */ lwc1 $f4, 0x002C($v0) ## 0000002C
/* 001C4 8087F2C4 03E00008 */ jr $ra
/* 001C8 8087F2C8 E484002C */ swc1 $f4, 0x002C($a0) ## 0000002C
.L8087F2CC:
/* 001CC 8087F2CC AC800118 */ sw $zero, 0x0118($a0) ## 00000118
.L8087F2D0:
/* 001D0 8087F2D0 03E00008 */ jr $ra
/* 001D4 8087F2D4 00000000 */ nop

View file

@ -1,46 +0,0 @@
.rdata
glabel D_8087FAD0
.asciz " ... \n"
.balign 4
.text
glabel func_8087F2D8
/* 001D8 8087F2D8 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 001DC 8087F2DC 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000
/* 001E0 8087F2E0 AFBF001C */ sw $ra, 0x001C($sp)
/* 001E4 8087F2E4 AFA50024 */ sw $a1, 0x0024($sp)
/* 001E8 8087F2E8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 001EC 8087F2EC 90E50169 */ lbu $a1, 0x0169($a3) ## 00000169
/* 001F0 8087F2F0 0C00B2D0 */ jal Flags_GetSwitch
/* 001F4 8087F2F4 AFA70020 */ sw $a3, 0x0020($sp)
/* 001F8 8087F2F8 10400016 */ beq $v0, $zero, .L8087F354
/* 001FC 8087F2FC 8FA70020 */ lw $a3, 0x0020($sp)
/* 00200 8087F300 90E20168 */ lbu $v0, 0x0168($a3) ## 00000168
/* 00204 8087F304 240F0082 */ addiu $t7, $zero, 0x0082 ## $t7 = 00000082
/* 00208 8087F308 3C188088 */ lui $t8, %hi(func_8087F364) ## $t8 = 80880000
/* 0020C 8087F30C 10400003 */ beq $v0, $zero, .L8087F31C
/* 00210 8087F310 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00214 8087F314 A0EE0168 */ sb $t6, 0x0168($a3) ## 00000168
/* 00218 8087F318 31C200FF */ andi $v0, $t6, 0x00FF ## $v0 = 000000FF
.L8087F31C:
/* 0021C 8087F31C 1440000D */ bne $v0, $zero, .L8087F354
/* 00220 8087F320 2718F364 */ addiu $t8, $t8, %lo(func_8087F364) ## $t8 = 8087F364
/* 00224 8087F324 A0EF0168 */ sb $t7, 0x0168($a3) ## 00000168
/* 00228 8087F328 ACF80164 */ sw $t8, 0x0164($a3) ## 00000164
/* 0022C 8087F32C 3C048088 */ lui $a0, %hi(D_8087FAD0) ## $a0 = 80880000
/* 00230 8087F330 2484FAD0 */ addiu $a0, $a0, %lo(D_8087FAD0) ## $a0 = 8087FAD0
/* 00234 8087F334 0C00084C */ jal osSyncPrintf
/* 00238 8087F338 AFA70020 */ sw $a3, 0x0020($sp)
/* 0023C 8087F33C 8FA70020 */ lw $a3, 0x0020($sp)
/* 00240 8087F340 8FA40024 */ lw $a0, 0x0024($sp)
/* 00244 8087F344 24050D3E */ addiu $a1, $zero, 0x0D3E ## $a1 = 00000D3E
/* 00248 8087F348 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7
/* 0024C 8087F34C 0C02003E */ jal func_800800F8
/* 00250 8087F350 AFA00010 */ sw $zero, 0x0010($sp)
.L8087F354:
/* 00254 8087F354 8FBF001C */ lw $ra, 0x001C($sp)
/* 00258 8087F358 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 0025C 8087F35C 03E00008 */ jr $ra
/* 00260 8087F360 00000000 */ nop

View file

@ -1,49 +0,0 @@
.late_rodata
glabel D_8087FB70
.float 0.12566371
.text
glabel func_8087F364
/* 00264 8087F364 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00268 8087F368 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0026C 8087F36C AFA5001C */ sw $a1, 0x001C($sp)
/* 00270 8087F370 90820168 */ lbu $v0, 0x0168($a0) ## 00000168
/* 00274 8087F374 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 00278 8087F378 10400003 */ beq $v0, $zero, .L8087F388
/* 0027C 8087F37C 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00280 8087F380 A08E0168 */ sb $t6, 0x0168($a0) ## 00000168
/* 00284 8087F384 31C200FF */ andi $v0, $t6, 0x00FF ## $v0 = 000000FF
.L8087F388:
/* 00288 8087F388 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00
/* 0028C 8087F38C 04410004 */ bgez $v0, .L8087F3A0
/* 00290 8087F390 468021A0 */ cvt.s.w $f6, $f4
/* 00294 8087F394 44814000 */ mtc1 $at, $f8 ## $f8 = 4294967296.00
/* 00298 8087F398 00000000 */ nop
/* 0029C 8087F39C 46083180 */ add.s $f6, $f6, $f8
.L8087F3A0:
/* 002A0 8087F3A0 3C018088 */ lui $at, %hi(D_8087FB70) ## $at = 80880000
/* 002A4 8087F3A4 C42AFB70 */ lwc1 $f10, %lo(D_8087FB70)($at)
/* 002A8 8087F3A8 AFA40018 */ sw $a0, 0x0018($sp)
/* 002AC 8087F3AC 460A3302 */ mul.s $f12, $f6, $f10
/* 002B0 8087F3B0 0C0400A4 */ jal sinf
/* 002B4 8087F3B4 00000000 */ nop
/* 002B8 8087F3B8 3C0145C0 */ lui $at, 0x45C0 ## $at = 45C00000
/* 002BC 8087F3BC 44818000 */ mtc1 $at, $f16 ## $f16 = 6144.00
/* 002C0 8087F3C0 8FA40018 */ lw $a0, 0x0018($sp)
/* 002C4 8087F3C4 3C098088 */ lui $t1, %hi(func_8087F400) ## $t1 = 80880000
/* 002C8 8087F3C8 46100482 */ mul.s $f18, $f0, $f16
/* 002CC 8087F3CC 90990168 */ lbu $t9, 0x0168($a0) ## 00000168
/* 002D0 8087F3D0 24080032 */ addiu $t0, $zero, 0x0032 ## $t0 = 00000032
/* 002D4 8087F3D4 2529F400 */ addiu $t1, $t1, %lo(func_8087F400) ## $t1 = 8087F400
/* 002D8 8087F3D8 4600910D */ trunc.w.s $f4, $f18
/* 002DC 8087F3DC 44182000 */ mfc1 $t8, $f4
/* 002E0 8087F3E0 17200003 */ bne $t9, $zero, .L8087F3F0
/* 002E4 8087F3E4 A498016A */ sh $t8, 0x016A($a0) ## 0000016A
/* 002E8 8087F3E8 A0880168 */ sb $t0, 0x0168($a0) ## 00000168
/* 002EC 8087F3EC AC890164 */ sw $t1, 0x0164($a0) ## 00000164
.L8087F3F0:
/* 002F0 8087F3F0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 002F4 8087F3F4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 002F8 8087F3F8 03E00008 */ jr $ra
/* 002FC 8087F3FC 00000000 */ nop

View file

@ -1,144 +0,0 @@
.late_rodata
glabel D_8087FB74
.float 0.12566371
glabel D_8087FB78
.float 7650.0
glabel D_8087FB7C
.float 7600.0
glabel D_8087FB80
.float 50.384617
glabel D_8087FB84
.float 0.12566371
.text
glabel func_8087F400
/* 00300 8087F400 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 00304 8087F404 AFBF001C */ sw $ra, 0x001C($sp)
/* 00308 8087F408 AFB00018 */ sw $s0, 0x0018($sp)
/* 0030C 8087F40C AFA50024 */ sw $a1, 0x0024($sp)
/* 00310 8087F410 90820168 */ lbu $v0, 0x0168($a0) ## 00000168
/* 00314 8087F414 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00318 8087F418 240F0032 */ addiu $t7, $zero, 0x0032 ## $t7 = 00000032
/* 0031C 8087F41C 10400003 */ beq $v0, $zero, .L8087F42C
/* 00320 8087F420 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00324 8087F424 A08E0168 */ sb $t6, 0x0168($a0) ## 00000168
/* 00328 8087F428 31C200FF */ andi $v0, $t6, 0x00FF ## $v0 = 000000FF
.L8087F42C:
/* 0032C 8087F42C 14400003 */ bne $v0, $zero, .L8087F43C
/* 00330 8087F430 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 00334 8087F434 A20F0168 */ sb $t7, 0x0168($s0) ## 00000168
/* 00338 8087F438 31E200FF */ andi $v0, $t7, 0x00FF ## $v0 = 00000032
.L8087F43C:
/* 0033C 8087F43C 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00
/* 00340 8087F440 04410004 */ bgez $v0, .L8087F454
/* 00344 8087F444 468021A0 */ cvt.s.w $f6, $f4
/* 00348 8087F448 44814000 */ mtc1 $at, $f8 ## $f8 = 4294967296.00
/* 0034C 8087F44C 00000000 */ nop
/* 00350 8087F450 46083180 */ add.s $f6, $f6, $f8
.L8087F454:
/* 00354 8087F454 3C018088 */ lui $at, %hi(D_8087FB74) ## $at = 80880000
/* 00358 8087F458 C42AFB74 */ lwc1 $f10, %lo(D_8087FB74)($at)
/* 0035C 8087F45C 460A3302 */ mul.s $f12, $f6, $f10
/* 00360 8087F460 0C0400A4 */ jal sinf
/* 00364 8087F464 00000000 */ nop
/* 00368 8087F468 3C018088 */ lui $at, %hi(D_8087FB78) ## $at = 80880000
/* 0036C 8087F46C C42EFB78 */ lwc1 $f14, %lo(D_8087FB78)($at)
/* 00370 8087F470 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00374 8087F474 44818000 */ mtc1 $at, $f16 ## $f16 = 50.00
/* 00378 8087F478 C60C0008 */ lwc1 $f12, 0x0008($s0) ## 00000008
/* 0037C 8087F47C C6060024 */ lwc1 $f6, 0x0024($s0) ## 00000024
/* 00380 8087F480 46100482 */ mul.s $f18, $f0, $f16
/* 00384 8087F484 C604000C */ lwc1 $f4, 0x000C($s0) ## 0000000C
/* 00388 8087F488 46066081 */ sub.s $f2, $f12, $f6
/* 0038C 8087F48C 3C018088 */ lui $at, %hi(D_8087FB7C) ## $at = 80880000
/* 00390 8087F490 4602703C */ c.lt.s $f14, $f2
/* 00394 8087F494 46049200 */ add.s $f8, $f18, $f4
/* 00398 8087F498 45000005 */ bc1f .L8087F4B0
/* 0039C 8087F49C E6080028 */ swc1 $f8, 0x0028($s0) ## 00000028
/* 003A0 8087F4A0 460E6281 */ sub.s $f10, $f12, $f14
/* 003A4 8087F4A4 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 003A8 8087F4A8 E60A0024 */ swc1 $f10, 0x0024($s0) ## 00000024
/* 003AC 8087F4AC E6100068 */ swc1 $f16, 0x0068($s0) ## 00000068
.L8087F4B0:
/* 003B0 8087F4B0 C432FB7C */ lwc1 $f18, %lo(D_8087FB7C)($at)
/* 003B4 8087F4B4 4602903C */ c.lt.s $f18, $f2
/* 003B8 8087F4B8 00000000 */ nop
/* 003BC 8087F4BC 45020011 */ bc1fl .L8087F504
/* 003C0 8087F4C0 3C063E4C */ lui $a2, 0x3E4C ## $a2 = 3E4C0000
/* 003C4 8087F4C4 0C02FF21 */ jal Gameplay_InCsMode
/* 003C8 8087F4C8 8FA40024 */ lw $a0, 0x0024($sp)
/* 003CC 8087F4CC 1440000C */ bne $v0, $zero, .L8087F500
/* 003D0 8087F4D0 24180028 */ addiu $t8, $zero, 0x0028 ## $t8 = 00000028
/* 003D4 8087F4D4 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 003D8 8087F4D8 A2180168 */ sb $t8, 0x0168($s0) ## 00000168
/* 003DC 8087F4DC 24055071 */ addiu $a1, $zero, 0x5071 ## $a1 = 00005071
/* 003E0 8087F4E0 E6040068 */ swc1 $f4, 0x0068($s0) ## 00000068
/* 003E4 8087F4E4 8FA40024 */ lw $a0, 0x0024($sp)
/* 003E8 8087F4E8 0C042DA0 */ jal func_8010B680
/* 003EC 8087F4EC 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 003F0 8087F4F0 3C198088 */ lui $t9, %hi(func_8087F5C8) ## $t9 = 80880000
/* 003F4 8087F4F4 2739F5C8 */ addiu $t9, $t9, %lo(func_8087F5C8) ## $t9 = 8087F5C8
/* 003F8 8087F4F8 10000006 */ beq $zero, $zero, .L8087F514
/* 003FC 8087F4FC AE190164 */ sw $t9, 0x0164($s0) ## 00000164
.L8087F500:
/* 00400 8087F500 3C063E4C */ lui $a2, 0x3E4C ## $a2 = 3E4C0000
.L8087F504:
/* 00404 8087F504 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3E4CCCCD
/* 00408 8087F508 26040068 */ addiu $a0, $s0, 0x0068 ## $a0 = 00000068
/* 0040C 8087F50C 0C01DE80 */ jal Math_StepToF
/* 00410 8087F510 3C054080 */ lui $a1, 0x4080 ## $a1 = 40800000
.L8087F514:
/* 00414 8087F514 8E02011C */ lw $v0, 0x011C($s0) ## 0000011C
/* 00418 8087F518 50400011 */ beql $v0, $zero, .L8087F560
/* 0041C 8087F51C AE00011C */ sw $zero, 0x011C($s0) ## 0000011C
/* 00420 8087F520 8C480130 */ lw $t0, 0x0130($v0) ## 00000130
/* 00424 8087F524 3C018088 */ lui $at, %hi(D_8087FB80) ## $at = 80880000
/* 00428 8087F528 5100000D */ beql $t0, $zero, .L8087F560
/* 0042C 8087F52C AE00011C */ sw $zero, 0x011C($s0) ## 0000011C
/* 00430 8087F530 844900B8 */ lh $t1, 0x00B8($v0) ## 000000B8
/* 00434 8087F534 C428FB80 */ lwc1 $f8, %lo(D_8087FB80)($at)
/* 00438 8087F538 C6060068 */ lwc1 $f6, 0x0068($s0) ## 00000068
/* 0043C 8087F53C 44898000 */ mtc1 $t1, $f16 ## $f16 = 0.00
/* 00440 8087F540 46064282 */ mul.s $f10, $f8, $f6
/* 00444 8087F544 468084A0 */ cvt.s.w $f18, $f16
/* 00448 8087F548 460A9100 */ add.s $f4, $f18, $f10
/* 0044C 8087F54C 4600220D */ trunc.w.s $f8, $f4
/* 00450 8087F550 440B4000 */ mfc1 $t3, $f8
/* 00454 8087F554 10000002 */ beq $zero, $zero, .L8087F560
/* 00458 8087F558 A44B00B8 */ sh $t3, 0x00B8($v0) ## 000000B8
/* 0045C 8087F55C AE00011C */ sw $zero, 0x011C($s0) ## 0000011C
.L8087F560:
/* 00460 8087F560 920C0168 */ lbu $t4, 0x0168($s0) ## 00000168
/* 00464 8087F564 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 00468 8087F568 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00
/* 0046C 8087F56C 05810004 */ bgez $t4, .L8087F580
/* 00470 8087F570 46803420 */ cvt.s.w $f16, $f6
/* 00474 8087F574 44819000 */ mtc1 $at, $f18 ## $f18 = 4294967296.00
/* 00478 8087F578 00000000 */ nop
/* 0047C 8087F57C 46128400 */ add.s $f16, $f16, $f18
.L8087F580:
/* 00480 8087F580 3C018088 */ lui $at, %hi(D_8087FB84) ## $at = 80880000
/* 00484 8087F584 C42AFB84 */ lwc1 $f10, %lo(D_8087FB84)($at)
/* 00488 8087F588 460A8302 */ mul.s $f12, $f16, $f10
/* 0048C 8087F58C 0C0400A4 */ jal sinf
/* 00490 8087F590 00000000 */ nop
/* 00494 8087F594 3C0145C0 */ lui $at, 0x45C0 ## $at = 45C00000
/* 00498 8087F598 44812000 */ mtc1 $at, $f4 ## $f4 = 6144.00
/* 0049C 8087F59C 00000000 */ nop
/* 004A0 8087F5A0 46040202 */ mul.s $f8, $f0, $f4
/* 004A4 8087F5A4 4600418D */ trunc.w.s $f6, $f8
/* 004A8 8087F5A8 440E3000 */ mfc1 $t6, $f6
/* 004AC 8087F5AC 00000000 */ nop
/* 004B0 8087F5B0 A60E016A */ sh $t6, 0x016A($s0) ## 0000016A
/* 004B4 8087F5B4 8FBF001C */ lw $ra, 0x001C($sp)
/* 004B8 8087F5B8 8FB00018 */ lw $s0, 0x0018($sp)
/* 004BC 8087F5BC 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 004C0 8087F5C0 03E00008 */ jr $ra
/* 004C4 8087F5C4 00000000 */ nop

View file

@ -1,27 +0,0 @@
glabel func_8087F5C8
/* 004C8 8087F5C8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 004CC 8087F5CC AFBF0014 */ sw $ra, 0x0014($sp)
/* 004D0 8087F5D0 AFA5001C */ sw $a1, 0x001C($sp)
/* 004D4 8087F5D4 90820168 */ lbu $v0, 0x0168($a0) ## 00000168
/* 004D8 8087F5D8 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000
/* 004DC 8087F5DC 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 004E0 8087F5E0 10400004 */ beq $v0, $zero, .L8087F5F4
/* 004E4 8087F5E4 24060080 */ addiu $a2, $zero, 0x0080 ## $a2 = 00000080
/* 004E8 8087F5E8 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 004EC 8087F5EC A08E0168 */ sb $t6, 0x0168($a0) ## 00000168
/* 004F0 8087F5F0 31C200FF */ andi $v0, $t6, 0x00FF ## $v0 = 000000FF
.L8087F5F4:
/* 004F4 8087F5F4 14400005 */ bne $v0, $zero, .L8087F60C
/* 004F8 8087F5F8 240F0028 */ addiu $t7, $zero, 0x0028 ## $t7 = 00000028
/* 004FC 8087F5FC 3C188088 */ lui $t8, %hi(func_8087F624) ## $t8 = 80880000
/* 00500 8087F600 2718F624 */ addiu $t8, $t8, %lo(func_8087F624) ## $t8 = 8087F624
/* 00504 8087F604 A0EF0168 */ sb $t7, 0x0168($a3) ## 00000168
/* 00508 8087F608 ACF80164 */ sw $t8, 0x0164($a3) ## 00000164
.L8087F60C:
/* 0050C 8087F60C 0C01DE2B */ jal Math_ScaledStepToS
/* 00510 8087F610 24E4016A */ addiu $a0, $a3, 0x016A ## $a0 = 0000016A
/* 00514 8087F614 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00518 8087F618 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0051C 8087F61C 03E00008 */ jr $ra
/* 00520 8087F620 00000000 */ nop

View file

@ -1,40 +0,0 @@
glabel func_8087F624
/* 00524 8087F624 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00528 8087F628 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0052C 8087F62C AFA5001C */ sw $a1, 0x001C($sp)
/* 00530 8087F630 90820168 */ lbu $v0, 0x0168($a0) ## 00000168
/* 00534 8087F634 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000
/* 00538 8087F638 3C088088 */ lui $t0, %hi(func_8087F6B4) ## $t0 = 80880000
/* 0053C 8087F63C 10400005 */ beq $v0, $zero, .L8087F654
/* 00540 8087F640 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
/* 00544 8087F644 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00548 8087F648 31C200FF */ andi $v0, $t6, 0x00FF ## $v0 = 000000FF
/* 0054C 8087F64C 00401825 */ or $v1, $v0, $zero ## $v1 = 000000FF
/* 00550 8087F650 A08E0168 */ sb $t6, 0x0168($a0) ## 00000168
.L8087F654:
/* 00554 8087F654 04610004 */ bgez $v1, .L8087F668
/* 00558 8087F658 306F0003 */ andi $t7, $v1, 0x0003 ## $t7 = 00000003
/* 0055C 8087F65C 11E00002 */ beq $t7, $zero, .L8087F668
/* 00560 8087F660 00000000 */ nop
/* 00564 8087F664 25EFFFFC */ addiu $t7, $t7, 0xFFFC ## $t7 = FFFFFFFF
.L8087F668:
/* 00568 8087F668 000FC080 */ sll $t8, $t7, 2
/* 0056C 8087F66C 030FC023 */ subu $t8, $t8, $t7
/* 00570 8087F670 2719FFFA */ addiu $t9, $t8, 0xFFFA ## $t9 = FFFFFFFA
/* 00574 8087F674 44992000 */ mtc1 $t9, $f4 ## $f4 = NaN
/* 00578 8087F678 C488000C */ lwc1 $f8, 0x000C($a0) ## 0000000C
/* 0057C 8087F67C 468021A0 */ cvt.s.w $f6, $f4
/* 00580 8087F680 46083280 */ add.s $f10, $f6, $f8
/* 00584 8087F684 14400005 */ bne $v0, $zero, .L8087F69C
/* 00588 8087F688 E48A0028 */ swc1 $f10, 0x0028($a0) ## 00000028
/* 0058C 8087F68C 44818000 */ mtc1 $at, $f16 ## $f16 = -1.00
/* 00590 8087F690 2508F6B4 */ addiu $t0, $t0, %lo(func_8087F6B4) ## $t0 = 8087F6B4
/* 00594 8087F694 AC880164 */ sw $t0, 0x0164($a0) ## 00000164
/* 00598 8087F698 E490006C */ swc1 $f16, 0x006C($a0) ## 0000006C
.L8087F69C:
/* 0059C 8087F69C 0C00BE5D */ jal func_8002F974
/* 005A0 8087F6A0 2405205C */ addiu $a1, $zero, 0x205C ## $a1 = 0000205C
/* 005A4 8087F6A4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 005A8 8087F6A8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 005AC 8087F6AC 03E00008 */ jr $ra
/* 005B0 8087F6B0 00000000 */ nop

View file

@ -1,54 +0,0 @@
glabel func_8087F6B4
/* 005B4 8087F6B4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 005B8 8087F6B8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 005BC 8087F6BC AFA5001C */ sw $a1, 0x001C($sp)
/* 005C0 8087F6C0 C4880028 */ lwc1 $f8, 0x0028($a0) ## 00000028
/* 005C4 8087F6C4 C486000C */ lwc1 $f6, 0x000C($a0) ## 0000000C
/* 005C8 8087F6C8 3C0144FA */ lui $at, 0x44FA ## $at = 44FA0000
/* 005CC 8087F6CC 44812000 */ mtc1 $at, $f4 ## $f4 = 2000.00
/* 005D0 8087F6D0 46083281 */ sub.s $f10, $f6, $f8
/* 005D4 8087F6D4 2405205C */ addiu $a1, $zero, 0x205C ## $a1 = 0000205C
/* 005D8 8087F6D8 460A203C */ c.lt.s $f4, $f10
/* 005DC 8087F6DC 00000000 */ nop
/* 005E0 8087F6E0 4500000E */ bc1f .L8087F71C
/* 005E4 8087F6E4 00000000 */ nop
/* 005E8 8087F6E8 0C00B55C */ jal Actor_Kill
/* 005EC 8087F6EC AFA40018 */ sw $a0, 0x0018($sp)
/* 005F0 8087F6F0 8FA40018 */ lw $a0, 0x0018($sp)
/* 005F4 8087F6F4 8C85011C */ lw $a1, 0x011C($a0) ## 0000011C
/* 005F8 8087F6F8 50A0001B */ beql $a1, $zero, .L8087F768
/* 005FC 8087F6FC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00600 8087F700 8CAE0130 */ lw $t6, 0x0130($a1) ## 00000130
/* 00604 8087F704 51C00018 */ beql $t6, $zero, .L8087F768
/* 00608 8087F708 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0060C 8087F70C 0C00B55C */ jal Actor_Kill
/* 00610 8087F710 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00614 8087F714 10000014 */ beq $zero, $zero, .L8087F768
/* 00618 8087F718 8FBF0014 */ lw $ra, 0x0014($sp)
.L8087F71C:
/* 0061C 8087F71C 0C00BE0A */ jal Audio_PlayActorSound2
/* 00620 8087F720 AFA40018 */ sw $a0, 0x0018($sp)
/* 00624 8087F724 8FA40018 */ lw $a0, 0x0018($sp)
/* 00628 8087F728 3C0143FA */ lui $at, 0x43FA ## $at = 43FA0000
/* 0062C 8087F72C 44818000 */ mtc1 $at, $f16 ## $f16 = 500.00
/* 00630 8087F730 C492000C */ lwc1 $f18, 0x000C($a0) ## 0000000C
/* 00634 8087F734 C4860028 */ lwc1 $f6, 0x0028($a0) ## 00000028
/* 00638 8087F738 46069201 */ sub.s $f8, $f18, $f6
/* 0063C 8087F73C 4608803C */ c.lt.s $f16, $f8
/* 00640 8087F740 00000000 */ nop
/* 00644 8087F744 45020008 */ bc1fl .L8087F768
/* 00648 8087F748 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0064C 8087F74C 0C010D5B */ jal func_8004356C
/* 00650 8087F750 00000000 */ nop
/* 00654 8087F754 50400004 */ beql $v0, $zero, .L8087F768
/* 00658 8087F758 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0065C 8087F75C 0C0302D8 */ jal Gameplay_TriggerVoidOut
/* 00660 8087F760 8FA4001C */ lw $a0, 0x001C($sp)
/* 00664 8087F764 8FBF0014 */ lw $ra, 0x0014($sp)
.L8087F768:
/* 00668 8087F768 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0066C 8087F76C 03E00008 */ jr $ra
/* 00670 8087F770 00000000 */ nop

View file

@ -1,20 +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_Haka_Ship_InitVars
.word 0x00B00100, 0x00000030, 0x00690000, 0x00000178
.word BgHakaShip_Init
.word BgHakaShip_Destroy
.word BgHakaShip_Update
.word BgHakaShip_Draw
glabel D_8087FAC0
.word 0x48500064, 0x00000000, 0x00000000, 0x00000000

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_8087FBA0
.incbin "baserom/ovl_Bg_Haka_Ship", 0xAA0, 0x00000100

3
spec
View file

@ -765,8 +765,7 @@ endseg
beginseg
name "ovl_Bg_Haka_Ship"
include "build/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.o"
include "build/data/overlays/actors/z_bg_haka_ship.data.o"
include "build/data/overlays/actors/z_bg_haka_ship.reloc.o"
include "build/src/overlays/actors/ovl_Bg_Haka_Ship/ovl_Bg_Haka_Ship_reloc.o"
endseg
beginseg

View file

@ -14,22 +14,20 @@ void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx);
void BgHakaShip_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgHakaShip_Update(Actor* thisx, GlobalContext* globalCtx);
void BgHakaShip_Draw(Actor* thisx, GlobalContext* globalCtx);
void BgHakaShip_ChildUpdatePosition(BgHakaShip* this, GlobalContext* globalCtx);
void BgHakaShip_WaitForSong(BgHakaShip* this, GlobalContext* globalCtx);
void BgHakaShip_CutsceneStationary(BgHakaShip* this, GlobalContext* globalCtx);
void BgHakaShip_Move(BgHakaShip* this, GlobalContext* globalCtx);
void BgHakaShip_SetupCrash(BgHakaShip* this, GlobalContext* globalCtx);
void BgHakaShip_CrashShake(BgHakaShip* this, GlobalContext* globalCtx);
void BgHakaShip_CrashFall(BgHakaShip* this, GlobalContext* globalCtx);
extern Gfx D_06005A70[];
extern Gfx D_0600D330[];
extern CollisionHeader D_0600E408;
extern Gfx D_0600E910[];
extern CollisionHeader D_0600ED7C;
void func_8087F27C(BgHakaShip* this, GlobalContext* globalCtx);
void func_8087F2D8(BgHakaShip* this, GlobalContext* globalCtx);
void func_8087F364(BgHakaShip* this, GlobalContext* globalCtx);
void func_8087F400(BgHakaShip* this, GlobalContext* globalCtx);
void func_8087F5C8(BgHakaShip* this, GlobalContext* globalCtx);
void func_8087F624(BgHakaShip* this, GlobalContext* globalCtx);
void func_8087F6B4(BgHakaShip* this, GlobalContext* globalCtx);
extern UNK_TYPE D_06005A70;
extern UNK_TYPE D_0600D330;
extern UNK_TYPE D_0600E408;
extern UNK_TYPE D_0600E910;
extern UNK_TYPE D_0600ED7C;
/*
const ActorInit Bg_Haka_Ship_InitVars = {
ACTOR_BG_HAKA_SHIP,
ACTORCAT_BG,
@ -41,25 +39,203 @@ const ActorInit Bg_Haka_Ship_InitVars = {
(ActorFunc)BgHakaShip_Update,
(ActorFunc)BgHakaShip_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/func_8087F27C.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/func_8087F2D8.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/func_8087F364.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/func_8087F400.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/func_8087F5C8.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/func_8087F624.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/func_8087F6B4.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Update.s")
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Ship/BgHakaShip_Draw.s")
void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx) {
BgHakaShip* this = THIS;
s32 pad;
CollisionHeader* colHeader = NULL;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
this->switchFlag = (thisx->params >> 8) & 0xFF;
this->dyna.actor.params &= 0xFF;
if (this->dyna.actor.params == 0) {
CollisionHeader_GetVirtual(&D_0600E408, &colHeader);
this->counter = 8;
this->actionFunc = BgHakaShip_WaitForSong;
} else {
CollisionHeader_GetVirtual(&D_0600ED7C, &colHeader);
this->actionFunc = BgHakaShip_ChildUpdatePosition;
}
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y - 0x4000;
this->yOffset = 0;
if (this->dyna.actor.params == 0 &&
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_HAKA_SHIP,
this->dyna.actor.world.pos.x + -10.0f, this->dyna.actor.world.pos.y + 82.0f,
this->dyna.actor.world.pos.z, 0, 0, 0, 1) == NULL) {
Actor_Kill(&this->dyna.actor);
}
}
void BgHakaShip_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgHakaShip* this = THIS;
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
func_800F89E8(&this->bellSoundPos);
}
void BgHakaShip_ChildUpdatePosition(BgHakaShip* this, GlobalContext* globalCtx) {
Actor* parent = this->dyna.actor.parent;
if (parent != NULL && parent->update != NULL) {
this->dyna.actor.world.pos.x = parent->world.pos.x + -10.0f;
this->dyna.actor.world.pos.y = parent->world.pos.y + 82.0f;
this->dyna.actor.world.pos.z = parent->world.pos.z;
} else {
this->dyna.actor.parent = NULL;
}
}
void BgHakaShip_WaitForSong(BgHakaShip* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
if (this->counter) {
this->counter--;
}
if (this->counter == 0) {
this->counter = 130;
this->actionFunc = BgHakaShip_CutsceneStationary;
osSyncPrintf("シーン 外輪船 ... アァクション!!\n");
func_800800F8(globalCtx, 0xD3E, 999, &this->dyna.actor, 0);
}
}
}
void BgHakaShip_CutsceneStationary(BgHakaShip* this, GlobalContext* globalCtx) {
if (this->counter) {
this->counter--;
}
this->yOffset = sinf(this->counter * (M_PI / 25)) * 6144.0f;
if (this->counter == 0) {
this->counter = 50;
this->actionFunc = BgHakaShip_Move;
}
}
void BgHakaShip_Move(BgHakaShip* this, GlobalContext* globalCtx) {
f32 distanceFromHome;
Actor* child;
if (this->counter) {
this->counter--;
}
if (this->counter == 0) {
this->counter = 50;
}
this->dyna.actor.world.pos.y = (sinf(this->counter * (M_PI / 25)) * 50.0f) + this->dyna.actor.home.pos.y;
distanceFromHome = this->dyna.actor.home.pos.x - this->dyna.actor.world.pos.x;
if (distanceFromHome > 7650.0f) {
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x - 7650.0f;
this->dyna.actor.speedXZ = 0.0f;
}
if (distanceFromHome > 7600.0f && !Gameplay_InCsMode(globalCtx)) {
this->counter = 40;
this->dyna.actor.speedXZ = 0.0f;
func_8010B680(globalCtx, 0x5071, NULL);
this->actionFunc = BgHakaShip_SetupCrash;
} else {
Math_StepToF(&this->dyna.actor.speedXZ, 4.0f, 0.2f);
}
child = this->dyna.actor.child;
if (child != NULL && child->update != NULL) {
child->shape.rot.z += ((655.0f / 13.0f) * this->dyna.actor.speedXZ);
} else {
this->dyna.actor.child = NULL;
}
this->yOffset = sinf(this->counter * (M_PI / 25)) * 6144.0f;
}
void BgHakaShip_SetupCrash(BgHakaShip* this, GlobalContext* globalCtx) {
if (this->counter) {
this->counter--;
}
if (this->counter == 0) {
this->counter = 40;
this->actionFunc = BgHakaShip_CrashShake;
}
Math_ScaledStepToS(&this->yOffset, 0, 128);
}
void BgHakaShip_CrashShake(BgHakaShip* this, GlobalContext* globalCtx) {
if (this->counter != 0) {
this->counter--;
}
this->dyna.actor.world.pos.y = this->counter % 4 * 3 - 6 + this->dyna.actor.home.pos.y;
if (!this->counter) {
this->dyna.actor.gravity = -1.0f;
this->actionFunc = BgHakaShip_CrashFall;
}
func_8002F974(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG);
}
void BgHakaShip_CrashFall(BgHakaShip* this, GlobalContext* globalCtx) {
Actor* child;
if (this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 2000.0f) {
Actor_Kill(&this->dyna.actor);
child = this->dyna.actor.child;
if (child != NULL && child->update != NULL) {
Actor_Kill(child);
}
} else {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG);
if ((this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 500.0f) && func_8004356C(&this->dyna)) {
Gameplay_TriggerVoidOut(globalCtx);
}
}
}
void BgHakaShip_Update(Actor* thisx, GlobalContext* globalCtx) {
BgHakaShip* this = THIS;
this->actionFunc(this, globalCtx);
if (this->dyna.actor.params == 0) {
Actor_MoveForward(&this->dyna.actor);
}
}
void BgHakaShip_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgHakaShip* this = THIS;
f32 angleTemp;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 528);
func_80093D18(globalCtx->state.gfxCtx);
if (this->dyna.actor.params == 0) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 534),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0600D330);
angleTemp = this->yOffset * (M_PI / 0x8000);
Matrix_Translate(-3670.0f, 620.0f, 1150.0f, MTXMODE_APPLY);
Matrix_RotateZ(angleTemp, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 547),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06005A70);
Matrix_Translate(0.0f, 0.0f, -2300.0f, MTXMODE_APPLY);
Matrix_RotateZ(-(2.0f * angleTemp), MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 556),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06005A70);
} else {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 562),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0600E910);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 568);
if (this->actionFunc == BgHakaShip_CutsceneStationary || this->actionFunc == BgHakaShip_Move) {
s32 pad;
Vec3f sp2C;
sp2C.x = this->dyna.actor.world.pos.x + -367.0f;
sp2C.y = this->dyna.actor.world.pos.y + 62.0f;
sp2C.z = this->dyna.actor.world.pos.z;
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->mf_11D60, &sp2C, &this->bellSoundPos);
func_80078914(&this->bellSoundPos, NA_SE_EV_SHIP_BELL - SFX_FLAG);
}
}

View file

@ -11,9 +11,10 @@ typedef void (*BgHakaShipActionFunc)(struct BgHakaShip*, GlobalContext*);
typedef struct BgHakaShip {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgHakaShipActionFunc actionFunc;
/* 0x0168 */ char unk_168[0x2];
/* 0x016A */ char unk_16A[0x2];
/* 0x016C */ Vec3f unk_16C;
/* 0x0168 */ u8 counter;
/* 0x0169 */ u8 switchFlag;
/* 0x016A */ s16 yOffset;
/* 0x016C */ Vec3f bellSoundPos;
} BgHakaShip; // size = 0x0178
extern const ActorInit Bg_Haka_Ship_InitVars;