1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-13 04:39:36 +00:00

Decompiled ovl_Bg_Ddan_Kd (#110)

* Decompiled ovl_Bg_Ddan_Kd

* ovl_Bg_Ddan_Kd renamed arguments
This commit is contained in:
zelda2773 2020-05-04 14:29:53 -04:00 committed by GitHub
parent 713de9b942
commit 8efddb0fe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 148 additions and 611 deletions

View file

@ -1,21 +0,0 @@
glabel BgDdanKd_Destroy
/* 000FC 808711EC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00100 808711F0 AFA40018 */ sw $a0, 0x0018($sp)
/* 00104 808711F4 8FAE0018 */ lw $t6, 0x0018($sp)
/* 00108 808711F8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0010C 808711FC 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000
/* 00110 80871200 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00114 80871204 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C
/* 00118 80871208 AFA7001C */ sw $a3, 0x001C($sp)
/* 0011C 8087120C 0C00FB56 */ jal DynaPolyInfo_Free
## DynaPolyInfo_delReserve
/* 00120 80871210 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
/* 00124 80871214 8FA50018 */ lw $a1, 0x0018($sp)
/* 00128 80871218 8FA4001C */ lw $a0, 0x001C($sp)
/* 0012C 8087121C 0C0170EB */ jal Collider_DestroyCylinder
/* 00130 80871220 24A50178 */ addiu $a1, $a1, 0x0178 ## $a1 = 00000178
/* 00134 80871224 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00138 80871228 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0013C 8087122C 03E00008 */ jr $ra
/* 00140 80871230 00000000 */ nop

View file

@ -1,16 +0,0 @@
glabel BgDdanKd_Draw
/* 00778 80871868 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 0077C 8087186C AFA40018 */ sw $a0, 0x0018($sp)
/* 00780 80871870 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00784 80871874 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00788 80871878 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000
/* 0078C 8087187C 0C00D498 */ jal Gfx_DrawDListOpa
/* 00790 80871880 24A548A8 */ addiu $a1, $a1, 0x48A8 ## $a1 = 060048A8
/* 00794 80871884 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00798 80871888 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0079C 8087188C 03E00008 */ jr $ra
/* 007A0 80871890 00000000 */ nop
/* 007A4 80871894 00000000 */ nop
/* 007A8 80871898 00000000 */ nop
/* 007AC 8087189C 00000000 */ nop

View file

@ -1,71 +0,0 @@
glabel BgDdanKd_Init
/* 00008 808710F8 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 0000C 808710FC AFB10018 */ sw $s1, 0x0018($sp)
/* 00010 80871100 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 00014 80871104 AFBF001C */ sw $ra, 0x001C($sp)
/* 00018 80871108 AFB00014 */ sw $s0, 0x0014($sp)
/* 0001C 8087110C AFA00024 */ sw $zero, 0x0024($sp)
/* 00020 80871110 3C058087 */ lui $a1, %hi(D_808718EC) ## $a1 = 80870000
/* 00024 80871114 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00028 80871118 AC800164 */ sw $zero, 0x0164($a0) ## 00000164
/* 0002C 8087111C 0C01E037 */ jal Actor_ProcessInitChain
/* 00030 80871120 24A518EC */ addiu $a1, $a1, %lo(D_808718EC) ## $a1 = 808718EC
/* 00034 80871124 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00038 80871128 0C010D20 */ jal DynaPolyInfo_SetActorMove
/* 0003C 8087112C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00040 80871130 26050178 */ addiu $a1, $s0, 0x0178 ## $a1 = 00000178
/* 00044 80871134 AFA50020 */ sw $a1, 0x0020($sp)
/* 00048 80871138 0C0170D9 */ jal Collider_InitCylinder
/* 0004C 8087113C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00050 80871140 3C078087 */ lui $a3, %hi(D_808718C0) ## $a3 = 80870000
/* 00054 80871144 8FA50020 */ lw $a1, 0x0020($sp)
/* 00058 80871148 24E718C0 */ addiu $a3, $a3, %lo(D_808718C0) ## $a3 = 808718C0
/* 0005C 8087114C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00060 80871150 0C01712B */ jal Collider_SetCylinder
/* 00064 80871154 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00068 80871158 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000
/* 0006C 8087115C 24844F30 */ addiu $a0, $a0, 0x4F30 ## $a0 = 06004F30
/* 00070 80871160 0C010620 */ jal DynaPolyInfo_Alloc
/* 00074 80871164 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4
/* 00078 80871168 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0007C 8087116C 26250810 */ addiu $a1, $s1, 0x0810 ## $a1 = 00000810
/* 00080 80871170 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00084 80871174 0C00FA9D */ jal DynaPolyInfo_RegisterActor
## DynaPolyInfo_setActor
/* 00088 80871178 8FA70024 */ lw $a3, 0x0024($sp)
/* 0008C 8087117C AE02014C */ sw $v0, 0x014C($s0) ## 0000014C
/* 00090 80871180 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00094 80871184 0C00B2D0 */ jal Flags_GetSwitch
/* 00098 80871188 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 0009C 8087118C 14400007 */ bne $v0, $zero, .L808711AC
/* 000A0 80871190 3C014348 */ lui $at, 0x4348 ## $at = 43480000
/* 000A4 80871194 3C058087 */ lui $a1, %hi(func_80871234) ## $a1 = 80870000
/* 000A8 80871198 24A51234 */ addiu $a1, $a1, %lo(func_80871234) ## $a1 = 80871234
/* 000AC 8087119C 0C21C43C */ jal BgDdanKd_SetupAction
/* 000B0 808711A0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000B4 808711A4 1000000D */ beq $zero, $zero, .L808711DC
/* 000B8 808711A8 8FBF001C */ lw $ra, 0x001C($sp)
.L808711AC:
/* 000BC 808711AC C604000C */ lwc1 $f4, 0x000C($s0) ## 0000000C
/* 000C0 808711B0 44813000 */ mtc1 $at, $f6 ## $f6 = 0.00
/* 000C4 808711B4 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 000C8 808711B8 44815000 */ mtc1 $at, $f10 ## $f10 = 20.00
/* 000CC 808711BC 46062201 */ sub.s $f8, $f4, $f6
/* 000D0 808711C0 3C058087 */ lui $a1, %hi(func_80871838) ## $a1 = 80870000
/* 000D4 808711C4 24A51838 */ addiu $a1, $a1, %lo(func_80871838) ## $a1 = 80871838
/* 000D8 808711C8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000DC 808711CC 460A4401 */ sub.s $f16, $f8, $f10
/* 000E0 808711D0 0C21C43C */ jal BgDdanKd_SetupAction
/* 000E4 808711D4 E6100028 */ swc1 $f16, 0x0028($s0) ## 00000028
/* 000E8 808711D8 8FBF001C */ lw $ra, 0x001C($sp)
.L808711DC:
/* 000EC 808711DC 8FB00014 */ lw $s0, 0x0014($sp)
/* 000F0 808711E0 8FB10018 */ lw $s1, 0x0018($sp)
/* 000F4 808711E4 03E00008 */ jr $ra
/* 000F8 808711E8 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000

View file

@ -1,3 +0,0 @@
glabel BgDdanKd_SetupAction
/* 00000 808710F0 03E00008 */ jr $ra
/* 00004 808710F4 AC8501C4 */ sw $a1, 0x01C4($a0) ## 000001C4

View file

@ -1,10 +0,0 @@
glabel BgDdanKd_Update
/* 00754 80871844 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00758 80871848 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0075C 8087184C 8C9901C4 */ lw $t9, 0x01C4($a0) ## 000001C4
/* 00760 80871850 0320F809 */ jalr $ra, $t9
/* 00764 80871854 00000000 */ nop
/* 00768 80871858 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0076C 8087185C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00770 80871860 03E00008 */ jr $ra
/* 00774 80871864 00000000 */ nop

View file

@ -1,93 +0,0 @@
.rdata
glabel D_80871920
.asciz "dam %d\n"
.balign 4
.text
glabel func_80871234
/* 00144 80871234 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 00148 80871238 AFB00020 */ sw $s0, 0x0020($sp)
/* 0014C 8087123C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00150 80871240 AFA50034 */ sw $a1, 0x0034($sp)
/* 00154 80871244 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00158 80871248 AFBF0024 */ sw $ra, 0x0024($sp)
/* 0015C 8087124C 26050178 */ addiu $a1, $s0, 0x0178 ## $a1 = 00000178
/* 00160 80871250 0C00CD90 */ jal func_80033640
/* 00164 80871254 AFA50028 */ sw $a1, 0x0028($sp)
/* 00168 80871258 10400009 */ beq $v0, $zero, .L80871280
/* 0016C 8087125C 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
/* 00170 80871260 3C048087 */ lui $a0, %hi(D_80871920) ## $a0 = 80870000
/* 00174 80871264 920500B0 */ lbu $a1, 0x00B0($s0) ## 000000B0
/* 00178 80871268 AFA2002C */ sw $v0, 0x002C($sp)
/* 0017C 8087126C 0C00084C */ jal osSyncPrintf
/* 00180 80871270 24841920 */ addiu $a0, $a0, %lo(D_80871920) ## $a0 = 80871920
/* 00184 80871274 8FA3002C */ lw $v1, 0x002C($sp)
/* 00188 80871278 240E0002 */ addiu $t6, $zero, 0x0002 ## $t6 = 00000002
/* 0018C 8087127C A46E001C */ sh $t6, 0x001C($v1) ## 0000001C
.L80871280:
/* 00190 80871280 5060001C */ beql $v1, $zero, .L808712F4
/* 00194 80871284 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 00198 80871288 8E020164 */ lw $v0, 0x0164($s0) ## 00000164
/* 0019C 8087128C 50400019 */ beql $v0, $zero, .L808712F4
/* 001A0 80871290 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 001A4 80871294 10620016 */ beq $v1, $v0, .L808712F0
/* 001A8 80871298 2604016C */ addiu $a0, $s0, 0x016C ## $a0 = 0000016C
/* 001AC 8087129C 24650024 */ addiu $a1, $v1, 0x0024 ## $a1 = 00000024
/* 001B0 808712A0 0C01E00A */ jal Math_Vec3f_DistXZ
/* 001B4 808712A4 AFA3002C */ sw $v1, 0x002C($sp)
/* 001B8 808712A8 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 001BC 808712AC 44812000 */ mtc1 $at, $f4 ## $f4 = 80.00
/* 001C0 808712B0 8FA3002C */ lw $v1, 0x002C($sp)
/* 001C4 808712B4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 001C8 808712B8 4600203C */ c.lt.s $f4, $f0
/* 001CC 808712BC 3C058087 */ lui $a1, %hi(func_80871364) ## $a1 = 80870000
/* 001D0 808712C0 4502000C */ bc1fl .L808712F4
/* 001D4 808712C4 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 001D8 808712C8 0C21C43C */ jal BgDdanKd_SetupAction
/* 001DC 808712CC 24A51364 */ addiu $a1, $a1, %lo(func_80871364) ## $a1 = 80871364
/* 001E0 808712D0 8FA40034 */ lw $a0, 0x0034($sp)
/* 001E4 808712D4 24050BEA */ addiu $a1, $zero, 0x0BEA ## $a1 = 00000BEA
/* 001E8 808712D8 240603E7 */ addiu $a2, $zero, 0x03E7 ## $a2 = 000003E7
/* 001EC 808712DC 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000
/* 001F0 808712E0 0C02003E */ jal func_800800F8
/* 001F4 808712E4 AFA00010 */ sw $zero, 0x0010($sp)
/* 001F8 808712E8 1000001A */ beq $zero, $zero, .L80871354
/* 001FC 808712EC 8FBF0024 */ lw $ra, 0x0024($sp)
.L808712F0:
/* 00200 808712F0 86020168 */ lh $v0, 0x0168($s0) ## 00000168
.L808712F4:
/* 00204 808712F4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00208 808712F8 10400003 */ beq $v0, $zero, .L80871308
/* 0020C 808712FC 244FFFFF */ addiu $t7, $v0, 0xFFFF ## $t7 = FFFFFFFF
/* 00210 80871300 1000000B */ beq $zero, $zero, .L80871330
/* 00214 80871304 A60F0168 */ sh $t7, 0x0168($s0) ## 00000168
.L80871308:
/* 00218 80871308 10600009 */ beq $v1, $zero, .L80871330
/* 0021C 8087130C AE030164 */ sw $v1, 0x0164($s0) ## 00000164
/* 00220 80871310 2418000D */ addiu $t8, $zero, 0x000D ## $t8 = 0000000D
/* 00224 80871314 A6180168 */ sh $t8, 0x0168($s0) ## 00000168
/* 00228 80871318 8C680024 */ lw $t0, 0x0024($v1) ## 00000024
/* 0022C 8087131C AE08016C */ sw $t0, 0x016C($s0) ## 0000016C
/* 00230 80871320 8C790028 */ lw $t9, 0x0028($v1) ## 00000028
/* 00234 80871324 AE190170 */ sw $t9, 0x0170($s0) ## 00000170
/* 00238 80871328 8C68002C */ lw $t0, 0x002C($v1) ## 0000002C
/* 0023C 8087132C AE080174 */ sw $t0, 0x0174($s0) ## 00000174
.L80871330:
/* 00240 80871330 0C0189B7 */ jal Collider_CylinderUpdate
/* 00244 80871334 8FA50028 */ lw $a1, 0x0028($sp)
/* 00248 80871338 8FA40034 */ lw $a0, 0x0034($sp)
/* 0024C 8087133C 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 00250 80871340 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 00254 80871344 8FA60028 */ lw $a2, 0x0028($sp)
/* 00258 80871348 0C01767D */ jal CollisionCheck_SetAC
## CollisionCheck_setAC
/* 0025C 8087134C 00812821 */ addu $a1, $a0, $at
/* 00260 80871350 8FBF0024 */ lw $ra, 0x0024($sp)
.L80871354:
/* 00264 80871354 8FB00020 */ lw $s0, 0x0020($sp)
/* 00268 80871358 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
/* 0026C 8087135C 03E00008 */ jr $ra
/* 00270 80871360 00000000 */ nop

View file

@ -1,340 +0,0 @@
.late_rodata
glabel D_8087192C
.float 0.007499999832361937
glabel D_80871930
.float 0.6
.text
glabel func_80871364
/* 00274 80871364 27BDFF98 */ addiu $sp, $sp, 0xFF98 ## $sp = FFFFFF98
/* 00278 80871368 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 0027C 8087136C AFB10028 */ sw $s1, 0x0028($sp)
/* 00280 80871370 AFB00024 */ sw $s0, 0x0024($sp)
/* 00284 80871374 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00288 80871378 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 0028C 8087137C AFBF002C */ sw $ra, 0x002C($sp)
/* 00290 80871380 3C073CCC */ lui $a3, 0x3CCC ## $a3 = 3CCC0000
/* 00294 80871384 34E7CCCD */ ori $a3, $a3, 0xCCCD ## $a3 = 3CCCCCCD
/* 00298 80871388 3C054080 */ lui $a1, 0x4080 ## $a1 = 40800000
/* 0029C 8087138C 24840068 */ addiu $a0, $a0, 0x0068 ## $a0 = 00000068
/* 002A0 80871390 3C063F00 */ lui $a2, 0x3F00 ## $a2 = 3F000000
/* 002A4 80871394 0C01E0C4 */ jal Math_SmoothScaleMaxMinF
/* 002A8 80871398 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 002AC 8087139C 3C0143FA */ lui $at, 0x43FA ## $at = 43FA0000
/* 002B0 808713A0 44816000 */ mtc1 $at, $f12 ## $f12 = 500.00
/* 002B4 808713A4 24050078 */ addiu $a1, $zero, 0x0078 ## $a1 = 00000078
/* 002B8 808713A8 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014
/* 002BC 808713AC 0C02A800 */ jal func_800AA000
/* 002C0 808713B0 2407000A */ addiu $a3, $zero, 0x000A ## $a3 = 0000000A
/* 002C4 808713B4 3C014348 */ lui $at, 0x4348 ## $at = 43480000
/* 002C8 808713B8 44814000 */ mtc1 $at, $f8 ## $f8 = 200.00
/* 002CC 808713BC C606000C */ lwc1 $f6, 0x000C($s0) ## 0000000C
/* 002D0 808713C0 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 002D4 808713C4 44818000 */ mtc1 $at, $f16 ## $f16 = 20.00
/* 002D8 808713C8 46083281 */ sub.s $f10, $f6, $f8
/* 002DC 808713CC 3C018087 */ lui $at, %hi(D_8087192C) ## $at = 80870000
/* 002E0 808713D0 C424192C */ lwc1 $f4, %lo(D_8087192C)($at)
/* 002E4 808713D4 3C063D99 */ lui $a2, 0x3D99 ## $a2 = 3D990000
/* 002E8 808713D8 46105481 */ sub.s $f18, $f10, $f16
/* 002EC 808713DC 8E070068 */ lw $a3, 0x0068($s0) ## 00000068
/* 002F0 808713E0 34C6999A */ ori $a2, $a2, 0x999A ## $a2 = 3D99999A
/* 002F4 808713E4 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028
/* 002F8 808713E8 44059000 */ mfc1 $a1, $f18
/* 002FC 808713EC 0C01E0C4 */ jal Math_SmoothScaleMaxMinF
/* 00300 808713F0 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 00304 808713F4 44803000 */ mtc1 $zero, $f6 ## $f6 = 0.00
/* 00308 808713F8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0030C 808713FC 3C013E80 */ lui $at, 0x3E80 ## $at = 3E800000
/* 00310 80871400 46060032 */ c.eq.s $f0, $f6
/* 00314 80871404 00000000 */ nop
/* 00318 80871408 4502000A */ bc1fl .L80871434
/* 0031C 8087140C C6120068 */ lwc1 $f18, 0x0068($s0) ## 00000068
/* 00320 80871410 0C00B2DD */ jal Flags_SetSwitch
/* 00324 80871414 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00328 80871418 3C058087 */ lui $a1, %hi(func_80871838) ## $a1 = 80870000
/* 0032C 8087141C 24A51838 */ addiu $a1, $a1, %lo(func_80871838) ## $a1 = 80871838
/* 00330 80871420 0C21C43C */ jal BgDdanKd_SetupAction
/* 00334 80871424 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00338 80871428 100000FF */ beq $zero, $zero, .L80871828
/* 0033C 8087142C 8FBF002C */ lw $ra, 0x002C($sp)
/* 00340 80871430 C6120068 */ lwc1 $f18, 0x0068($s0) ## 00000068
.L80871434:
/* 00344 80871434 44812000 */ mtc1 $at, $f4 ## $f4 = 0.00
/* 00348 80871438 C6080104 */ lwc1 $f8, 0x0104($s0) ## 00000104
/* 0034C 8087143C C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
/* 00350 80871440 46049182 */ mul.s $f6, $f18, $f4
/* 00354 80871444 26180024 */ addiu $t8, $s0, 0x0024 ## $t8 = 00000024
/* 00358 80871448 460A4401 */ sub.s $f16, $f8, $f10
/* 0035C 8087144C 46068200 */ add.s $f8, $f16, $f6
/* 00360 80871450 E7A8004C */ swc1 $f8, 0x004C($sp)
/* 00364 80871454 8E2E009C */ lw $t6, 0x009C($s1) ## 0000009C
/* 00368 80871458 31CF0001 */ andi $t7, $t6, 0x0001 ## $t7 = 00000000
/* 0036C 8087145C 11E000DA */ beq $t7, $zero, .L808717C8
/* 00370 80871460 00000000 */ nop
/* 00374 80871464 AFB80038 */ sw $t8, 0x0038($sp)
/* 00378 80871468 8F090000 */ lw $t1, 0x0000($t8) ## 00000024
/* 0037C 8087146C 27A20040 */ addiu $v0, $sp, 0x0040 ## $v0 = FFFFFFD8
/* 00380 80871470 27AA0050 */ addiu $t2, $sp, 0x0050 ## $t2 = FFFFFFE8
/* 00384 80871474 AC490000 */ sw $t1, 0x0000($v0) ## FFFFFFD8
/* 00388 80871478 8F080004 */ lw $t0, 0x0004($t8) ## 00000028
/* 0038C 8087147C 8C4C0000 */ lw $t4, 0x0000($v0) ## FFFFFFD8
/* 00390 80871480 27AD005C */ addiu $t5, $sp, 0x005C ## $t5 = FFFFFFF4
/* 00394 80871484 AC480004 */ sw $t0, 0x0004($v0) ## FFFFFFDC
/* 00398 80871488 8F090008 */ lw $t1, 0x0008($t8) ## 0000002C
/* 0039C 8087148C AC490008 */ sw $t1, 0x0008($v0) ## FFFFFFE0
/* 003A0 80871490 AD4C0000 */ sw $t4, 0x0000($t2) ## FFFFFFE8
/* 003A4 80871494 8C4B0004 */ lw $t3, 0x0004($v0) ## FFFFFFDC
/* 003A8 80871498 AD4B0004 */ sw $t3, 0x0004($t2) ## FFFFFFEC
/* 003AC 8087149C 8C4C0008 */ lw $t4, 0x0008($v0) ## FFFFFFE0
/* 003B0 808714A0 AD4C0008 */ sw $t4, 0x0008($t2) ## FFFFFFF0
/* 003B4 808714A4 8C4F0000 */ lw $t7, 0x0000($v0) ## FFFFFFD8
/* 003B8 808714A8 ADAF0000 */ sw $t7, 0x0000($t5) ## FFFFFFF4
/* 003BC 808714AC 8C4E0004 */ lw $t6, 0x0004($v0) ## FFFFFFDC
/* 003C0 808714B0 ADAE0004 */ sw $t6, 0x0004($t5) ## FFFFFFF8
/* 003C4 808714B4 8C4F0008 */ lw $t7, 0x0008($v0) ## FFFFFFE0
/* 003C8 808714B8 ADAF0008 */ sw $t7, 0x0008($t5) ## FFFFFFFC
/* 003CC 808714BC 8E38009C */ lw $t8, 0x009C($s1) ## 0000009C
/* 003D0 808714C0 33190002 */ andi $t9, $t8, 0x0002 ## $t9 = 00000000
/* 003D4 808714C4 13200017 */ beq $t9, $zero, .L80871524
/* 003D8 808714C8 00000000 */ nop
/* 003DC 808714CC 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 003E0 808714D0 00000000 */ nop
/* 003E4 808714D4 3C014352 */ lui $at, 0x4352 ## $at = 43520000
/* 003E8 808714D8 44815000 */ mtc1 $at, $f10 ## $f10 = 210.00
/* 003EC 808714DC 3C014366 */ lui $at, 0x4366 ## $at = 43660000
/* 003F0 808714E0 44819000 */ mtc1 $at, $f18 ## $f18 = 230.00
/* 003F4 808714E4 C7A60064 */ lwc1 $f6, 0x0064($sp)
/* 003F8 808714E8 46120102 */ mul.s $f4, $f0, $f18
/* 003FC 808714EC 46045400 */ add.s $f16, $f10, $f4
/* 00400 808714F0 46103200 */ add.s $f8, $f6, $f16
/* 00404 808714F4 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00408 808714F8 E7A80064 */ swc1 $f8, 0x0064($sp)
/* 0040C 808714FC 3C014352 */ lui $at, 0x4352 ## $at = 43520000
/* 00410 80871500 44819000 */ mtc1 $at, $f18 ## $f18 = 210.00
/* 00414 80871504 3C014366 */ lui $at, 0x4366 ## $at = 43660000
/* 00418 80871508 44815000 */ mtc1 $at, $f10 ## $f10 = 230.00
/* 0041C 8087150C C7B00058 */ lwc1 $f16, 0x0058($sp)
/* 00420 80871510 460A0102 */ mul.s $f4, $f0, $f10
/* 00424 80871514 46049180 */ add.s $f6, $f18, $f4
/* 00428 80871518 46068200 */ add.s $f8, $f16, $f6
/* 0042C 8087151C 10000016 */ beq $zero, $zero, .L80871578
/* 00430 80871520 E7A80058 */ swc1 $f8, 0x0058($sp)
.L80871524:
/* 00434 80871524 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00438 80871528 00000000 */ nop
/* 0043C 8087152C 3C0143A5 */ lui $at, 0x43A5 ## $at = 43A50000
/* 00440 80871530 44815000 */ mtc1 $at, $f10 ## $f10 = 330.00
/* 00444 80871534 3C014370 */ lui $at, 0x4370 ## $at = 43700000
/* 00448 80871538 44819000 */ mtc1 $at, $f18 ## $f18 = 240.00
/* 0044C 8087153C C7A60064 */ lwc1 $f6, 0x0064($sp)
/* 00450 80871540 46120102 */ mul.s $f4, $f0, $f18
/* 00454 80871544 46045400 */ add.s $f16, $f10, $f4
/* 00458 80871548 46103200 */ add.s $f8, $f6, $f16
/* 0045C 8087154C 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00460 80871550 E7A80064 */ swc1 $f8, 0x0064($sp)
/* 00464 80871554 3C0143A5 */ lui $at, 0x43A5 ## $at = 43A50000
/* 00468 80871558 44819000 */ mtc1 $at, $f18 ## $f18 = 330.00
/* 0046C 8087155C 3C014370 */ lui $at, 0x4370 ## $at = 43700000
/* 00470 80871560 44815000 */ mtc1 $at, $f10 ## $f10 = 240.00
/* 00474 80871564 C7B00058 */ lwc1 $f16, 0x0058($sp)
/* 00478 80871568 460A0102 */ mul.s $f4, $f0, $f10
/* 0047C 8087156C 46049180 */ add.s $f6, $f18, $f4
/* 00480 80871570 46068200 */ add.s $f8, $f16, $f6
/* 00484 80871574 E7A80058 */ swc1 $f8, 0x0058($sp)
.L80871578:
/* 00488 80871578 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 0048C 8087157C 00000000 */ nop
/* 00490 80871580 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 00494 80871584 44815000 */ mtc1 $at, $f10 ## $f10 = 80.00
/* 00498 80871588 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 0049C 8087158C 44819000 */ mtc1 $at, $f18 ## $f18 = 10.00
/* 004A0 80871590 C7A6005C */ lwc1 $f6, 0x005C($sp)
/* 004A4 80871594 46120102 */ mul.s $f4, $f0, $f18
/* 004A8 80871598 46045400 */ add.s $f16, $f10, $f4
/* 004AC 8087159C 46103200 */ add.s $f8, $f6, $f16
/* 004B0 808715A0 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 004B4 808715A4 E7A8005C */ swc1 $f8, 0x005C($sp)
/* 004B8 808715A8 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 004BC 808715AC 44819000 */ mtc1 $at, $f18 ## $f18 = 80.00
/* 004C0 808715B0 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 004C4 808715B4 44815000 */ mtc1 $at, $f10 ## $f10 = 10.00
/* 004C8 808715B8 C7B00050 */ lwc1 $f16, 0x0050($sp)
/* 004CC 808715BC 460A0102 */ mul.s $f4, $f0, $f10
/* 004D0 808715C0 46049180 */ add.s $f6, $f18, $f4
/* 004D4 808715C4 46068201 */ sub.s $f8, $f16, $f6
/* 004D8 808715C8 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 004DC 808715CC E7A80050 */ swc1 $f8, 0x0050($sp)
/* 004E0 808715D0 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 004E4 808715D4 44819000 */ mtc1 $at, $f18 ## $f18 = 20.00
/* 004E8 808715D8 C60A0080 */ lwc1 $f10, 0x0080($s0) ## 00000080
/* 004EC 808715DC 46125100 */ add.s $f4, $f10, $f18
/* 004F0 808715E0 46040400 */ add.s $f16, $f0, $f4
/* 004F4 808715E4 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 004F8 808715E8 E7B00060 */ swc1 $f16, 0x0060($sp)
/* 004FC 808715EC 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 00500 808715F0 44811000 */ mtc1 $at, $f2 ## $f2 = 20.00
/* 00504 808715F4 3C014307 */ lui $at, 0x4307 ## $at = 43070000
/* 00508 808715F8 44812000 */ mtc1 $at, $f4 ## $f4 = 135.00
/* 0050C 808715FC C7B2004C */ lwc1 $f18, 0x004C($sp)
/* 00510 80871600 C6060080 */ lwc1 $f6, 0x0080($s0) ## 00000080
/* 00514 80871604 2409003C */ addiu $t1, $zero, 0x003C ## $t1 = 0000003C
/* 00518 80871608 46049402 */ mul.s $f16, $f18, $f4
/* 0051C 8087160C 46023200 */ add.s $f8, $f6, $f2
/* 00520 80871610 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001
/* 00524 80871614 44061000 */ mfc1 $a2, $f2
/* 00528 80871618 AFAA0018 */ sw $t2, 0x0018($sp)
/* 0052C 8087161C 46080280 */ add.s $f10, $f0, $f8
/* 00530 80871620 AFA90014 */ sw $t1, 0x0014($sp)
/* 00534 80871624 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00538 80871628 4600818D */ trunc.w.s $f6, $f16
/* 0053C 8087162C E7AA0054 */ swc1 $f10, 0x0054($sp)
/* 00540 80871630 27A5005C */ addiu $a1, $sp, 0x005C ## $a1 = FFFFFFF4
/* 00544 80871634 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 00548 80871638 44023000 */ mfc1 $v0, $f6
/* 0054C 8087163C 00000000 */ nop
/* 00550 80871640 00021400 */ sll $v0, $v0, 16
/* 00554 80871644 00021403 */ sra $v0, $v0, 16
/* 00558 80871648 AFA20010 */ sw $v0, 0x0010($sp)
/* 0055C 8087164C 0C00CD20 */ jal func_80033480
/* 00560 80871650 AFA20034 */ sw $v0, 0x0034($sp)
/* 00564 80871654 8FAB0034 */ lw $t3, 0x0034($sp)
/* 00568 80871658 240C003C */ addiu $t4, $zero, 0x003C ## $t4 = 0000003C
/* 0056C 8087165C 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001
/* 00570 80871660 AFAD0018 */ sw $t5, 0x0018($sp)
/* 00574 80871664 AFAC0014 */ sw $t4, 0x0014($sp)
/* 00578 80871668 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0057C 8087166C 27A50050 */ addiu $a1, $sp, 0x0050 ## $a1 = FFFFFFE8
/* 00580 80871670 3C0641A0 */ lui $a2, 0x41A0 ## $a2 = 41A00000
/* 00584 80871674 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 00588 80871678 0C00CD20 */ jal func_80033480
/* 0058C 8087167C AFAB0010 */ sw $t3, 0x0010($sp)
/* 00590 80871680 3C014040 */ lui $at, 0x4040 ## $at = 40400000
/* 00594 80871684 44816000 */ mtc1 $at, $f12 ## $f12 = 3.00
/* 00598 80871688 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 0059C 8087168C 00000000 */ nop
/* 005A0 80871690 3C018087 */ lui $at, %hi(D_808718FC) ## $at = 80870000
/* 005A4 80871694 E42018FC */ swc1 $f0, %lo(D_808718FC)($at)
/* 005A8 80871698 3C014040 */ lui $at, 0x4040 ## $at = 40400000
/* 005AC 8087169C 44816000 */ mtc1 $at, $f12 ## $f12 = 3.00
/* 005B0 808716A0 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 005B4 808716A4 00000000 */ nop
/* 005B8 808716A8 3C018087 */ lui $at, %hi(D_80871904) ## $at = 80870000
/* 005BC 808716AC 3C068087 */ lui $a2, %hi(D_808718FC) ## $a2 = 80870000
/* 005C0 808716B0 3C078087 */ lui $a3, %hi(D_80871908) ## $a3 = 80870000
/* 005C4 808716B4 E4201904 */ swc1 $f0, %lo(D_80871904)($at)
/* 005C8 808716B8 24E71908 */ addiu $a3, $a3, %lo(D_80871908) ## $a3 = 80871908
/* 005CC 808716BC 24C618FC */ addiu $a2, $a2, %lo(D_808718FC) ## $a2 = 808718FC
/* 005D0 808716C0 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 005D4 808716C4 0C00D557 */ jal func_8003555C
/* 005D8 808716C8 27A5005C */ addiu $a1, $sp, 0x005C ## $a1 = FFFFFFF4
/* 005DC 808716CC 3C068087 */ lui $a2, %hi(D_808718FC) ## $a2 = 80870000
/* 005E0 808716D0 3C078087 */ lui $a3, %hi(D_80871908) ## $a3 = 80870000
/* 005E4 808716D4 24E71908 */ addiu $a3, $a3, %lo(D_80871908) ## $a3 = 80871908
/* 005E8 808716D8 24C618FC */ addiu $a2, $a2, %lo(D_808718FC) ## $a2 = 808718FC
/* 005EC 808716DC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 005F0 808716E0 0C00D557 */ jal func_8003555C
/* 005F4 808716E4 27A50050 */ addiu $a1, $sp, 0x0050 ## $a1 = FFFFFFE8
/* 005F8 808716E8 8FAF0038 */ lw $t7, 0x0038($sp)
/* 005FC 808716EC 27AE005C */ addiu $t6, $sp, 0x005C ## $t6 = FFFFFFF4
/* 00600 808716F0 8DF90000 */ lw $t9, 0x0000($t7) ## 00000000
/* 00604 808716F4 ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF4
/* 00608 808716F8 8DF80004 */ lw $t8, 0x0004($t7) ## 00000004
/* 0060C 808716FC ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFF8
/* 00610 80871700 8DF90008 */ lw $t9, 0x0008($t7) ## 00000008
/* 00614 80871704 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00618 80871708 ADD90008 */ sw $t9, 0x0008($t6) ## FFFFFFFC
/* 0061C 8087170C 3C01440C */ lui $at, 0x440C ## $at = 440C0000
/* 00620 80871710 44814000 */ mtc1 $at, $f8 ## $f8 = 560.00
/* 00624 80871714 3C0140A0 */ lui $at, 0x40A0 ## $at = 40A00000
/* 00628 80871718 44815000 */ mtc1 $at, $f10 ## $f10 = 5.00
/* 0062C 8087171C C7B00064 */ lwc1 $f16, 0x0064($sp)
/* 00630 80871720 460A0482 */ mul.s $f18, $f0, $f10
/* 00634 80871724 46124100 */ add.s $f4, $f8, $f18
/* 00638 80871728 46048180 */ add.s $f6, $f16, $f4
/* 0063C 8087172C 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00640 80871730 E7A60064 */ swc1 $f6, 0x0064($sp)
/* 00644 80871734 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
/* 00648 80871738 44815000 */ mtc1 $at, $f10 ## $f10 = 0.50
/* 0064C 8087173C 3C014320 */ lui $at, 0x4320 ## $at = 43200000
/* 00650 80871740 44819000 */ mtc1 $at, $f18 ## $f18 = 160.00
/* 00654 80871744 460A0201 */ sub.s $f8, $f0, $f10
/* 00658 80871748 C7A4005C */ lwc1 $f4, 0x005C($sp)
/* 0065C 8087174C 46124402 */ mul.s $f16, $f8, $f18
/* 00660 80871750 46102180 */ add.s $f6, $f4, $f16
/* 00664 80871754 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 00668 80871758 E7A6005C */ swc1 $f6, 0x005C($sp)
/* 0066C 8087175C 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 00670 80871760 44814000 */ mtc1 $at, $f8 ## $f8 = 20.00
/* 00674 80871764 3C014040 */ lui $at, 0x4040 ## $at = 40400000
/* 00678 80871768 44812000 */ mtc1 $at, $f4 ## $f4 = 3.00
/* 0067C 8087176C C60A0080 */ lwc1 $f10, 0x0080($s0) ## 00000080
/* 00680 80871770 8FA80034 */ lw $t0, 0x0034($sp)
/* 00684 80871774 46040402 */ mul.s $f16, $f0, $f4
/* 00688 80871778 46085480 */ add.s $f18, $f10, $f8
/* 0068C 8087177C 2409003C */ addiu $t1, $zero, 0x003C ## $t1 = 0000003C
/* 00690 80871780 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001
/* 00694 80871784 AFAA0018 */ sw $t2, 0x0018($sp)
/* 00698 80871788 AFA90014 */ sw $t1, 0x0014($sp)
/* 0069C 8087178C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 006A0 80871790 46128180 */ add.s $f6, $f16, $f18
/* 006A4 80871794 27A5005C */ addiu $a1, $sp, 0x005C ## $a1 = FFFFFFF4
/* 006A8 80871798 3C0641A0 */ lui $a2, 0x41A0 ## $a2 = 41A00000
/* 006AC 8087179C 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 006B0 808717A0 E7A60060 */ swc1 $f6, 0x0060($sp)
/* 006B4 808717A4 0C00CD20 */ jal func_80033480
/* 006B8 808717A8 AFA80010 */ sw $t0, 0x0010($sp)
/* 006BC 808717AC 3C068087 */ lui $a2, %hi(D_808718FC) ## $a2 = 80870000
/* 006C0 808717B0 3C078087 */ lui $a3, %hi(D_80871908) ## $a3 = 80870000
/* 006C4 808717B4 24E71908 */ addiu $a3, $a3, %lo(D_80871908) ## $a3 = 80871908
/* 006C8 808717B8 24C618FC */ addiu $a2, $a2, %lo(D_808718FC) ## $a2 = 808718FC
/* 006CC 808717BC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 006D0 808717C0 0C00D557 */ jal func_8003555C
/* 006D4 808717C4 27A5005C */ addiu $a1, $sp, 0x005C ## $a1 = FFFFFFF4
.L808717C8:
/* 006D8 808717C8 3C018087 */ lui $at, %hi(D_80871930) ## $at = 80870000
/* 006DC 808717CC C4281930 */ lwc1 $f8, %lo(D_80871930)($at)
/* 006E0 808717D0 C7AA004C */ lwc1 $f10, 0x004C($sp)
/* 006E4 808717D4 262401E0 */ addiu $a0, $s1, 0x01E0 ## $a0 = 000001E0
/* 006E8 808717D8 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 006EC 808717DC 46085102 */ mul.s $f4, $f10, $f8
/* 006F0 808717E0 24070003 */ addiu $a3, $zero, 0x0003 ## $a3 = 00000003
/* 006F4 808717E4 4600240D */ trunc.w.s $f16, $f4
/* 006F8 808717E8 44068000 */ mfc1 $a2, $f16
/* 006FC 808717EC 00000000 */ nop
/* 00700 808717F0 00063400 */ sll $a2, $a2, 16
/* 00704 808717F4 0C016A87 */ jal func_8005AA1C
/* 00708 808717F8 00063403 */ sra $a2, $a2, 16
/* 0070C 808717FC 3C078013 */ lui $a3, %hi(D_801333E0)
/* 00710 80871800 3C0C8013 */ lui $t4, %hi(D_801333E8)
/* 00714 80871804 24E733E0 */ addiu $a3, %lo(D_801333E0)
/* 00718 80871808 258C33E8 */ addiu $t4, %lo(D_801333E8)
/* 0071C 8087180C AFAC0014 */ sw $t4, 0x0014($sp)
/* 00720 80871810 AFA70010 */ sw $a3, 0x0010($sp)
/* 00724 80871814 24042027 */ addiu $a0, $zero, 0x2027 ## $a0 = 00002027
/* 00728 80871818 260500E4 */ addiu $a1, $s0, 0x00E4 ## $a1 = 000000E4
/* 0072C 8087181C 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* 00730 80871820 24060004 */ addiu $a2, $zero, 0x0004 ## $a2 = 00000004
/* 00734 80871824 8FBF002C */ lw $ra, 0x002C($sp)
.L80871828:
/* 00738 80871828 8FB00024 */ lw $s0, 0x0024($sp)
/* 0073C 8087182C 8FB10028 */ lw $s1, 0x0028($sp)
/* 00740 80871830 03E00008 */ jr $ra
/* 00744 80871834 27BD0068 */ addiu $sp, $sp, 0x0068 ## $sp = 00000000

View file

@ -1,4 +0,0 @@
glabel func_80871838
/* 00748 80871838 AFA40000 */ sw $a0, 0x0000($sp)
/* 0074C 8087183C 03E00008 */ jr $ra
/* 00750 80871840 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,26 +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 purposee registers
.section .data
glabel Bg_Ddan_Kd_InitVars
.word 0x005C0100, 0x00000010, 0x002B0000, 0x000001C8
.word BgDdanKd_Init
.word BgDdanKd_Destroy
.word BgDdanKd_Update
.word BgDdanKd_Draw
glabel D_808718C0
.word 0x0A003900, 0x00010000, 0x02000000, 0x00000000, 0x00000000, 0xFFCFFFFF, 0x00000000, 0x00010000, 0x00F500B4, 0xFE700000, 0x00000000
glabel D_808718EC
.word 0xC8500064, 0xB0F87FFF, 0xB0FC7FFF, 0x30F47FFF
glabel D_808718FC
.word 0x00000000, 0x40A00000
glabel D_80871904
.word 0x00000000
glabel D_80871908
.word 0x00000000, 0xBEE66666, 0x00000000, 0x00000000, 0x00000000, 0x00000000

View file

@ -1,11 +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 purposee registers
.section .rodata
glabel D_80871940
.incbin "baserom/ovl_Bg_Ddan_Kd", 0x850, 0x000000C0

View file

@ -646,6 +646,7 @@ s32 func_8005A77C(Camera* camera, s16 button);
// ? func_8005A8C4(?);
s16 func_8005A970(Vec3s, Camera*);
s16 func_8005A9F4(Camera* camera);
void func_8005AA1C(Camera* camera, s32, s16, s32);
s32 func_8005AA90(Camera*, s32, Vec3f*);
// ? func_8005AC48(?);
// ? func_8005AC60(?);

3
spec
View file

@ -707,8 +707,7 @@ endseg
beginseg
name "ovl_Bg_Ddan_Kd"
include "build/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.o"
include "build/data/overlays/actors/z_bg_ddan_kd.data.o"
include "build/data/overlays/actors/z_bg_ddan_kd.reloc.o"
include "build/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd_reloc.o"
endseg
beginseg

View file

@ -13,11 +13,10 @@ void BgDdanKd_Destroy(BgDdanKd* this, GlobalContext* globalCtx);
void BgDdanKd_Update(BgDdanKd* this, GlobalContext* globalCtx);
void BgDdanKd_Draw(BgDdanKd* this, GlobalContext* globalCtx);
void BgDdanKd_SetupAction(BgDdanKd* this, ActorFunc actionFunc);
void func_80871234(BgDdanKd* this, GlobalContext* globalCtx);
void func_80873164(BgDdanKd* this, GlobalContext* globalCtx);
void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx);
void BgDdanKd_LowerStairs(BgDdanKd* this, GlobalContext* globalCtx);
void func_80871838(BgDdanKd* this, GlobalContext* globalCtx);
/*
const ActorInit Bg_Ddan_Kd_InitVars = {
ACTOR_BG_DDAN_KD,
ACTORTYPE_BG,
@ -29,19 +28,146 @@ const ActorInit Bg_Ddan_Kd_InitVars = {
(ActorFunc)BgDdanKd_Update,
(ActorFunc)BgDdanKd_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/BgDdanKd_SetupAction.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/BgDdanKd_Init.s")
static ColliderCylinderInit cylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x39, 0x00, 0x00, COLSHAPE_CYLINDER },
{ 0x02, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{ 245, 180, -400, { 0, 0, 0 } },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/BgDdanKd_Destroy.s")
static InitChainEntry initChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(unk_F8, 32767, ICHAIN_CONTINUE),
ICHAIN_F32(unk_FC, 32767, ICHAIN_CONTINUE),
ICHAIN_F32(unk_F4, 32767, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/func_80871234.s")
static f32 D_808718FC[] = { 0.0f, 5.0f };
static f32 D_80871904[] = { 0.0f };
static f32 D_80871908[] = { 0.0f, -0.45f, 0.0f, 0.0f, 0.0f, 0.0f };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/func_80871364.s")
extern UNK_TYPE D_06004F30;
extern UNK_TYPE D_060048A8;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/func_80871838.s")
void BgDdanKd_SetupAction(BgDdanKd* this, ActorFunc actionFunc) {
this->actionFunc = actionFunc;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/BgDdanKd_Update.s")
void BgDdanKd_Init(BgDdanKd* this, GlobalContext* globalCtx) {
s32 pad;
s32 pad2;
s32 sp24 = 0;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ddan_Kd/BgDdanKd_Draw.s")
this->previousCollidingExplosion = NULL;
Actor_ProcessInitChain(&this->dyna.actor, &initChain);
DynaPolyInfo_SetActorMove(&this->dyna.actor, 1);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &cylinderInit);
DynaPolyInfo_Alloc(&D_06004F30, &sp24);
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24);
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params) == 0) {
BgDdanKd_SetupAction(this, &BgDdanKd_CheckForExplosions);
} else {
this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y - 200.0f - 20.0f;
BgDdanKd_SetupAction(this, &func_80871838);
}
}
void BgDdanKd_Destroy(BgDdanKd* this, GlobalContext* globalCtx) {
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
Collider_DestroyCylinder(globalCtx, &this->collider);
}
void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx) {
Actor* currentCollidingExplosion;
currentCollidingExplosion = func_80033640(globalCtx, &this->collider);
if (currentCollidingExplosion != NULL) {
osSyncPrintf("dam %d\n", this->dyna.actor.colChkInfo.damage);
currentCollidingExplosion->params = 2;
}
if ((currentCollidingExplosion != NULL) && (this->previousCollidingExplosion != NULL) &&
(currentCollidingExplosion != this->previousCollidingExplosion) &&
(Math_Vec3f_DistXZ(&this->previousCollidingExplosionPos, &currentCollidingExplosion->posRot.pos) > 80.0f)) {
BgDdanKd_SetupAction(this, &BgDdanKd_LowerStairs);
func_800800F8(globalCtx, 0xBEA, 0x3E7, this, 0);
} else {
if (this->timer != 0) {
this->timer -= 1;
} else {
this->previousCollidingExplosion = currentCollidingExplosion;
if (currentCollidingExplosion != NULL) {
this->timer = 13;
this->previousCollidingExplosionPos = currentCollidingExplosion->posRot.pos;
}
}
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
}
}
void BgDdanKd_LowerStairs(BgDdanKd* this, GlobalContext* globalCtx) {
Vec3f sp5C;
Vec3f sp50;
f32 sp4C;
Math_SmoothScaleMaxMinF(&this->dyna.actor.speedXZ, 4.0f, 0.5f, 0.025f, 0.0f);
func_800AA000(500.0f, 0x78, 0x14, 0xA);
if (Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, (this->dyna.actor.initPosRot.pos.y - 200.0f) - 20.0f,
0.075f, this->dyna.actor.speedXZ, 0.0075f) == 0.0f) {
Flags_SetSwitch(globalCtx, this->dyna.actor.params);
BgDdanKd_SetupAction(this, &func_80871838);
} else {
sp4C = (this->dyna.actor.pos4.y - this->dyna.actor.posRot.pos.y) + (this->dyna.actor.speedXZ * 0.25f);
if (globalCtx->state.frames & 1) {
sp5C = sp50 = this->dyna.actor.posRot.pos;
if (globalCtx->state.frames & 2) {
sp5C.z += 210.0f + Math_Rand_ZeroOne() * 230.0f;
sp50.z += 210.0f + Math_Rand_ZeroOne() * 230.0f;
} else {
sp5C.z += 330.0f + Math_Rand_ZeroOne() * 240.0f;
sp50.z += 330.0f + Math_Rand_ZeroOne() * 240.0f;
}
sp5C.x += 80.0f + Math_Rand_ZeroOne() * 10.0f;
sp50.x -= 80.0f + Math_Rand_ZeroOne() * 10.0f;
sp5C.y = this->dyna.actor.unk_80 + 20.0f + Math_Rand_ZeroOne();
sp50.y = this->dyna.actor.unk_80 + 20.0f + Math_Rand_ZeroOne();
func_80033480(globalCtx, &sp5C, 20.0f, 1, sp4C * 135.0f, 60, 1);
func_80033480(globalCtx, &sp50, 20.0f, 1, sp4C * 135.0f, 60, 1);
D_808718FC[0] = Math_Rand_CenteredFloat(3.0f);
D_80871904[0] = Math_Rand_CenteredFloat(3.0f);
func_8003555C(globalCtx, &sp5C, &D_808718FC, &D_80871908);
func_8003555C(globalCtx, &sp50, &D_808718FC, &D_80871908);
sp5C = this->dyna.actor.posRot.pos;
sp5C.z += 560.0f + Math_Rand_ZeroOne() * 5.0f;
sp5C.x += (Math_Rand_ZeroOne() - 0.5f) * 160.0f;
sp5C.y = Math_Rand_ZeroOne() * 3.0f + (this->dyna.actor.unk_80 + 20.0f);
func_80033480(globalCtx, &sp5C, 20.0f, 1, sp4C * 135.0f, 60, 1);
func_8003555C(globalCtx, &sp5C, &D_808718FC, &D_80871908);
}
func_8005AA1C(&globalCtx->cameras, 0, sp4C * 0.6f, 3);
Audio_PlaySoundGeneral(0x2027, &this->dyna.actor.unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
void func_80871838(BgDdanKd* this, GlobalContext* globalCtx) {
}
void BgDdanKd_Update(BgDdanKd* this, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
void BgDdanKd_Draw(BgDdanKd* this, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, &D_060048A8);
}

View file

@ -6,8 +6,10 @@
typedef struct {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ Actor* unk_164; // pointer to bombflower actor
/* 0x0168 */ char unk_168[0x5C];
/* 0x0164 */ Actor* previousCollidingExplosion;
/* 0x0168 */ s16 timer;
/* 0x016C */ Vec3f previousCollidingExplosionPos;
/* 0x0178 */ ColliderCylinder collider;
/* 0x01C4 */ ActorFunc actionFunc;
} BgDdanKd; // size = 0x01C8

View file

@ -529,6 +529,10 @@ D_060067B8 = 0x060067B8;
D_060076EC = 0x060076EC;
D_060070F0 = 0x060070F0;
// z_bg_ddan_kd
D_06004F30 = 0x06004F30;
D_060048A8 = 0x060048A8;
// z_en_horse_ganon
D_06008668 = 0x06008668;
D_06004AA4 = 0x06004AA4;