1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-26 22:56:20 +00:00

Decompiled ovl_Bg_Hidan_Kousi (#136)

This commit is contained in:
Ethan Roseman 2020-05-14 19:42:26 -04:00 committed by GitHub
parent 44ffb7ec62
commit d35a47e044
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 141 additions and 431 deletions

View file

@ -1,14 +0,0 @@
glabel BgHidanKousi_Destroy
/* 0013C 80889A9C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00140 80889AA0 AFA40018 */ sw $a0, 0x0018($sp)
/* 00144 80889AA4 8FAE0018 */ lw $t6, 0x0018($sp)
/* 00148 80889AA8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0014C 80889AAC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00150 80889AB0 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
/* 00154 80889AB4 0C00FB56 */ jal DynaPolyInfo_Free
## DynaPolyInfo_delReserve
/* 00158 80889AB8 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C
/* 0015C 80889ABC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00160 80889AC0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00164 80889AC4 03E00008 */ jr $ra
/* 00168 80889AC8 00000000 */ nop

View file

@ -1,73 +0,0 @@
.rdata
glabel D_80889EEC
.asciz "../z_bg_hidan_kousi.c"
.balign 4
glabel D_80889F04
.asciz "../z_bg_hidan_kousi.c"
.balign 4
glabel D_80889F1C
.asciz "../z_bg_hidan_kousi.c"
.balign 4
.text
glabel BgHidanKousi_Draw
/* 003F8 80889D58 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 003FC 80889D5C AFBF001C */ sw $ra, 0x001C($sp)
/* 00400 80889D60 AFB00018 */ sw $s0, 0x0018($sp)
/* 00404 80889D64 AFA40040 */ sw $a0, 0x0040($sp)
/* 00408 80889D68 AFA50044 */ sw $a1, 0x0044($sp)
/* 0040C 80889D6C 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 00410 80889D70 3C068089 */ lui $a2, %hi(D_80889EEC) ## $a2 = 80890000
/* 00414 80889D74 24C69EEC */ addiu $a2, $a2, %lo(D_80889EEC) ## $a2 = 80889EEC
/* 00418 80889D78 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFEC
/* 0041C 80889D7C 2407015E */ addiu $a3, $zero, 0x015E ## $a3 = 0000015E
/* 00420 80889D80 0C031AB1 */ jal Graph_OpenDisps
/* 00424 80889D84 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
/* 00428 80889D88 8FAF0044 */ lw $t7, 0x0044($sp)
/* 0042C 80889D8C 0C024F46 */ jal func_80093D18
/* 00430 80889D90 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000
/* 00434 80889D94 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 00438 80889D98 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000
/* 0043C 80889D9C 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003
/* 00440 80889DA0 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008
/* 00444 80889DA4 AE1802C0 */ sw $t8, 0x02C0($s0) ## 000002C0
/* 00448 80889DA8 AC590000 */ sw $t9, 0x0000($v0) ## 00000000
/* 0044C 80889DAC 8FA80044 */ lw $t0, 0x0044($sp)
/* 00450 80889DB0 3C058089 */ lui $a1, %hi(D_80889F04) ## $a1 = 80890000
/* 00454 80889DB4 24A59F04 */ addiu $a1, $a1, %lo(D_80889F04) ## $a1 = 80889F04
/* 00458 80889DB8 8D040000 */ lw $a0, 0x0000($t0) ## 00000000
/* 0045C 80889DBC 24060162 */ addiu $a2, $zero, 0x0162 ## $a2 = 00000162
/* 00460 80889DC0 0C0346A2 */ jal Matrix_NewMtx
/* 00464 80889DC4 AFA20028 */ sw $v0, 0x0028($sp)
/* 00468 80889DC8 8FA30028 */ lw $v1, 0x0028($sp)
/* 0046C 80889DCC 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000
/* 00470 80889DD0 3C0F8089 */ lui $t7, %hi(D_80889E84) ## $t7 = 80890000
/* 00474 80889DD4 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 00478 80889DD8 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
/* 0047C 80889DDC 3C068089 */ lui $a2, %hi(D_80889F1C) ## $a2 = 80890000
/* 00480 80889DE0 24C69F1C */ addiu $a2, $a2, %lo(D_80889F1C) ## $a2 = 80889F1C
/* 00484 80889DE4 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008
/* 00488 80889DE8 AE0902C0 */ sw $t1, 0x02C0($s0) ## 000002C0
/* 0048C 80889DEC AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000
/* 00490 80889DF0 8FAB0040 */ lw $t3, 0x0040($sp)
/* 00494 80889DF4 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFEC
/* 00498 80889DF8 24070167 */ addiu $a3, $zero, 0x0167 ## $a3 = 00000167
/* 0049C 80889DFC 856C001C */ lh $t4, 0x001C($t3) ## 0000001C
/* 004A0 80889E00 318D00FF */ andi $t5, $t4, 0x00FF ## $t5 = 00000000
/* 004A4 80889E04 000D7080 */ sll $t6, $t5, 2
/* 004A8 80889E08 01EE7821 */ addu $t7, $t7, $t6
/* 004AC 80889E0C 8DEF9E84 */ lw $t7, %lo(D_80889E84)($t7)
/* 004B0 80889E10 AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
/* 004B4 80889E14 8FB80044 */ lw $t8, 0x0044($sp)
/* 004B8 80889E18 0C031AD5 */ jal Graph_CloseDisps
/* 004BC 80889E1C 8F050000 */ lw $a1, 0x0000($t8) ## 00000000
/* 004C0 80889E20 8FBF001C */ lw $ra, 0x001C($sp)
/* 004C4 80889E24 8FB00018 */ lw $s0, 0x0018($sp)
/* 004C8 80889E28 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 004CC 80889E2C 03E00008 */ jr $ra
/* 004D0 80889E30 00000000 */ nop
/* 004D4 80889E34 00000000 */ nop
/* 004D8 80889E38 00000000 */ nop
/* 004DC 80889E3C 00000000 */ nop

View file

@ -1,100 +0,0 @@
.rdata
glabel D_80889E90
.asciz "殿(arg_data : %0x) (%d %d)\n"
.balign 4
glabel D_80889ED0
.asciz "arg_data \n"
.balign 4
.text
glabel BgHidanKousi_Init
/* 00008 80889968 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 0000C 8088996C AFBF001C */ sw $ra, 0x001C($sp)
/* 00010 80889970 AFB00018 */ sw $s0, 0x0018($sp)
/* 00014 80889974 AFA50034 */ sw $a1, 0x0034($sp)
/* 00018 80889978 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0001C 8088997C AFA00024 */ sw $zero, 0x0024($sp)
/* 00020 80889980 0C010D20 */ jal DynaPolyInfo_SetActorMove
/* 00024 80889984 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00028 80889988 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0002C 8088998C 0C00B56E */ jal Actor_SetHeight
/* 00030 80889990 3C054248 */ lui $a1, 0x4248 ## $a1 = 42480000
/* 00034 80889994 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00038 80889998 3C048089 */ lui $a0, %hi(D_80889E90) ## $a0 = 80890000
/* 0003C 8088999C 24849E90 */ addiu $a0, $a0, %lo(D_80889E90) ## $a0 = 80889E90
/* 00040 808899A0 00053A03 */ sra $a3, $a1, 8
/* 00044 808899A4 30E700FF */ andi $a3, $a3, 0x00FF ## $a3 = 00000000
/* 00048 808899A8 0C00084C */ jal osSyncPrintf
/* 0004C 808899AC 30A600FF */ andi $a2, $a1, 0x00FF ## $a2 = 00000000
/* 00050 808899B0 3C058089 */ lui $a1, %hi(D_80889E6C) ## $a1 = 80890000
/* 00054 808899B4 24A59E6C */ addiu $a1, $a1, %lo(D_80889E6C) ## $a1 = 80889E6C
/* 00058 808899B8 0C01E037 */ jal Actor_ProcessInitChain
/* 0005C 808899BC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00060 808899C0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 00064 808899C4 3C048089 */ lui $a0, %hi(D_80889ED0) ## $a0 = 80890000
/* 00068 808899C8 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
/* 0006C 808899CC 04400003 */ bltz $v0, .L808899DC
/* 00070 808899D0 28410003 */ slti $at, $v0, 0x0003
/* 00074 808899D4 54200006 */ bnel $at, $zero, .L808899F0
/* 00078 808899D8 00027080 */ sll $t6, $v0, 2
.L808899DC:
/* 0007C 808899DC 0C00084C */ jal osSyncPrintf
/* 00080 808899E0 24849ED0 */ addiu $a0, $a0, %lo(D_80889ED0) ## $a0 = 80889ED0
/* 00084 808899E4 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 00088 808899E8 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
/* 0008C 808899EC 00027080 */ sll $t6, $v0, 2
.L808899F0:
/* 00090 808899F0 3C048089 */ lui $a0, %hi(D_80889E70) ## $a0 = 80890000
/* 00094 808899F4 008E2021 */ addu $a0, $a0, $t6
/* 00098 808899F8 8C849E70 */ lw $a0, %lo(D_80889E70)($a0)
/* 0009C 808899FC 0C010620 */ jal DynaPolyInfo_Alloc
/* 000A0 80889A00 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4
/* 000A4 80889A04 8FA40034 */ lw $a0, 0x0034($sp)
/* 000A8 80889A08 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 000AC 80889A0C 8FA70024 */ lw $a3, 0x0024($sp)
/* 000B0 80889A10 0C00FA9D */ jal DynaPolyInfo_RegisterActor
## DynaPolyInfo_setActor
/* 000B4 80889A14 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810
/* 000B8 80889A18 860F001C */ lh $t7, 0x001C($s0) ## 0000001C
/* 000BC 80889A1C 3C088089 */ lui $t0, %hi(D_80889E7C) ## $t0 = 80890000
/* 000C0 80889A20 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C
/* 000C4 80889A24 31F800FF */ andi $t8, $t7, 0x00FF ## $t8 = 00000000
/* 000C8 80889A28 0018C840 */ sll $t9, $t8, 1
/* 000CC 80889A2C 01194021 */ addu $t0, $t0, $t9
/* 000D0 80889A30 85089E7C */ lh $t0, %lo(D_80889E7C)($t0)
/* 000D4 80889A34 860900B6 */ lh $t1, 0x00B6($s0) ## 000000B6
/* 000D8 80889A38 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 000DC 80889A3C 01095021 */ addu $t2, $t0, $t1
/* 000E0 80889A40 A60A0032 */ sh $t2, 0x0032($s0) ## 00000032
/* 000E4 80889A44 00052A03 */ sra $a1, $a1, 8
/* 000E8 80889A48 30A500FF */ andi $a1, $a1, 0x00FF ## $a1 = 00000000
/* 000EC 80889A4C 0C00B2D0 */ jal Flags_GetSwitch
/* 000F0 80889A50 8FA40034 */ lw $a0, 0x0034($sp)
/* 000F4 80889A54 10400009 */ beq $v0, $zero, .L80889A7C
/* 000F8 80889A58 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000FC 80889A5C 0C2226B3 */ jal func_80889ACC
/* 00100 80889A60 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00104 80889A64 3C058089 */ lui $a1, %hi(func_80889D28) ## $a1 = 80890000
/* 00108 80889A68 24A59D28 */ addiu $a1, $a1, %lo(func_80889D28) ## $a1 = 80889D28
/* 0010C 80889A6C 0C222658 */ jal BgHidanKousi_SetupAction
/* 00110 80889A70 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00114 80889A74 10000005 */ beq $zero, $zero, .L80889A8C
/* 00118 80889A78 8FBF001C */ lw $ra, 0x001C($sp)
.L80889A7C:
/* 0011C 80889A7C 3C058089 */ lui $a1, %hi(func_80889B5C) ## $a1 = 80890000
/* 00120 80889A80 0C222658 */ jal BgHidanKousi_SetupAction
/* 00124 80889A84 24A59B5C */ addiu $a1, $a1, %lo(func_80889B5C) ## $a1 = 80889B5C
/* 00128 80889A88 8FBF001C */ lw $ra, 0x001C($sp)
.L80889A8C:
/* 0012C 80889A8C 8FB00018 */ lw $s0, 0x0018($sp)
/* 00130 80889A90 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
/* 00134 80889A94 03E00008 */ jr $ra
/* 00138 80889A98 00000000 */ nop

View file

@ -1,3 +0,0 @@
glabel BgHidanKousi_SetupAction
/* 00000 80889960 03E00008 */ jr $ra
/* 00004 80889964 AC850164 */ sw $a1, 0x0164($a0) ## 00000164

View file

@ -1,10 +0,0 @@
glabel BgHidanKousi_Update
/* 003D4 80889D34 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 003D8 80889D38 AFBF0014 */ sw $ra, 0x0014($sp)
/* 003DC 80889D3C 8C990164 */ lw $t9, 0x0164($a0) ## 00000164
/* 003E0 80889D40 0320F809 */ jalr $ra, $t9
/* 003E4 80889D44 00000000 */ nop
/* 003E8 80889D48 8FBF0014 */ lw $ra, 0x0014($sp)
/* 003EC 80889D4C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 003F0 80889D50 03E00008 */ jr $ra
/* 003F4 80889D54 00000000 */ nop

View file

@ -1,39 +0,0 @@
glabel func_80889ACC
/* 0016C 80889ACC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 00170 80889AD0 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00174 80889AD4 00802825 */ or $a1, $a0, $zero ## $a1 = 00000000
/* 00178 80889AD8 84840032 */ lh $a0, 0x0032($a0) ## 00000032
/* 0017C 80889ADC 0C01DE1C */ jal Math_Sins
## sins?
/* 00180 80889AE0 AFA50028 */ sw $a1, 0x0028($sp)
/* 00184 80889AE4 8FA50028 */ lw $a1, 0x0028($sp)
/* 00188 80889AE8 3C018089 */ lui $at, %hi(D_80889E40) ## $at = 80890000
/* 0018C 80889AEC 84AE001C */ lh $t6, 0x001C($a1) ## 0000001C
/* 00190 80889AF0 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000
/* 00194 80889AF4 000FC080 */ sll $t8, $t7, 2
/* 00198 80889AF8 00380821 */ addu $at, $at, $t8
/* 0019C 80889AFC C4249E40 */ lwc1 $f4, %lo(D_80889E40)($at)
/* 001A0 80889B00 46040182 */ mul.s $f6, $f0, $f4
/* 001A4 80889B04 E7A60018 */ swc1 $f6, 0x0018($sp)
/* 001A8 80889B08 0C01DE0D */ jal Math_Coss
## coss?
/* 001AC 80889B0C 84A40032 */ lh $a0, 0x0032($a1) ## 00000032
/* 001B0 80889B10 8FA50028 */ lw $a1, 0x0028($sp)
/* 001B4 80889B14 3C018089 */ lui $at, %hi(D_80889E40) ## $at = 80890000
/* 001B8 80889B18 C7B00018 */ lwc1 $f16, 0x0018($sp)
/* 001BC 80889B1C 84B9001C */ lh $t9, 0x001C($a1) ## 0000001C
/* 001C0 80889B20 C4AA0008 */ lwc1 $f10, 0x0008($a1) ## 00000008
/* 001C4 80889B24 C4A40010 */ lwc1 $f4, 0x0010($a1) ## 00000010
/* 001C8 80889B28 332800FF */ andi $t0, $t9, 0x00FF ## $t0 = 00000000
/* 001CC 80889B2C 00084880 */ sll $t1, $t0, 2
/* 001D0 80889B30 00290821 */ addu $at, $at, $t1
/* 001D4 80889B34 C4289E40 */ lwc1 $f8, %lo(D_80889E40)($at)
/* 001D8 80889B38 46105480 */ add.s $f18, $f10, $f16
/* 001DC 80889B3C 46080082 */ mul.s $f2, $f0, $f8
/* 001E0 80889B40 E4B20024 */ swc1 $f18, 0x0024($a1) ## 00000024
/* 001E4 80889B44 46022180 */ add.s $f6, $f4, $f2
/* 001E8 80889B48 E4A6002C */ swc1 $f6, 0x002C($a1) ## 0000002C
/* 001EC 80889B4C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 001F0 80889B50 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 001F4 80889B54 03E00008 */ jr $ra
/* 001F8 80889B58 00000000 */ nop

View file

@ -1,28 +0,0 @@
glabel func_80889B5C
/* 001FC 80889B5C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00200 80889B60 AFA40018 */ sw $a0, 0x0018($sp)
/* 00204 80889B64 8FAE0018 */ lw $t6, 0x0018($sp)
/* 00208 80889B68 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0020C 80889B6C AFA5001C */ sw $a1, 0x001C($sp)
/* 00210 80889B70 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00214 80889B74 85C5001C */ lh $a1, 0x001C($t6) ## 0000001C
/* 00218 80889B78 00052A03 */ sra $a1, $a1, 8
/* 0021C 80889B7C 0C00B2D0 */ jal Flags_GetSwitch
/* 00220 80889B80 30A500FF */ andi $a1, $a1, 0x00FF ## $a1 = 00000000
/* 00224 80889B84 1040000A */ beq $v0, $zero, .L80889BB0
/* 00228 80889B88 8FA40018 */ lw $a0, 0x0018($sp)
/* 0022C 80889B8C 3C058089 */ lui $a1, %hi(func_80889BC0) ## $a1 = 80890000
/* 00230 80889B90 0C222658 */ jal BgHidanKousi_SetupAction
/* 00234 80889B94 24A59BC0 */ addiu $a1, $a1, %lo(func_80889BC0) ## $a1 = 80889BC0
/* 00238 80889B98 8FA4001C */ lw $a0, 0x001C($sp)
/* 0023C 80889B9C 0C020120 */ jal func_80080480
/* 00240 80889BA0 8FA50018 */ lw $a1, 0x0018($sp)
/* 00244 80889BA4 8FB80018 */ lw $t8, 0x0018($sp)
/* 00248 80889BA8 240F00C8 */ addiu $t7, $zero, 0x00C8 ## $t7 = 000000C8
/* 0024C 80889BAC A70F0168 */ sh $t7, 0x0168($t8) ## 00000168
.L80889BB0:
/* 00250 80889BB0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00254 80889BB4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00258 80889BB8 03E00008 */ jr $ra
/* 0025C 80889BBC 00000000 */ nop

View file

@ -1,25 +0,0 @@
glabel func_80889BC0
/* 00260 80889BC0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00264 80889BC4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00268 80889BC8 AFA5001C */ sw $a1, 0x001C($sp)
/* 0026C 80889BCC 848E0168 */ lh $t6, 0x0168($a0) ## 00000168
/* 00270 80889BD0 25CFFFFF */ addiu $t7, $t6, 0xFFFF ## $t7 = FFFFFFFF
/* 00274 80889BD4 A48F0168 */ sh $t7, 0x0168($a0) ## 00000168
/* 00278 80889BD8 0C016C66 */ jal func_8005B198
/* 0027C 80889BDC AFA40018 */ sw $a0, 0x0018($sp)
/* 00280 80889BE0 8FA40018 */ lw $a0, 0x0018($sp)
/* 00284 80889BE4 3C058089 */ lui $a1, %hi(func_80889C18) ## $a1 = 80890000
/* 00288 80889BE8 90980002 */ lbu $t8, 0x0002($a0) ## 00000002
/* 0028C 80889BEC 10580004 */ beq $v0, $t8, .L80889C00
/* 00290 80889BF0 00000000 */ nop
/* 00294 80889BF4 84990168 */ lh $t9, 0x0168($a0) ## 00000168
/* 00298 80889BF8 5F200004 */ bgtzl $t9, .L80889C0C
/* 0029C 80889BFC 8FBF0014 */ lw $ra, 0x0014($sp)
.L80889C00:
/* 002A0 80889C00 0C222658 */ jal BgHidanKousi_SetupAction
/* 002A4 80889C04 24A59C18 */ addiu $a1, $a1, %lo(func_80889C18) ## $a1 = 80889C18
/* 002A8 80889C08 8FBF0014 */ lw $ra, 0x0014($sp)
.L80889C0C:
/* 002AC 80889C0C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 002B0 80889C10 03E00008 */ jr $ra
/* 002B4 80889C14 00000000 */ nop

View file

@ -1,38 +0,0 @@
.late_rodata
glabel D_80889F34
.float 0.2
.text
glabel func_80889C18
/* 002B8 80889C18 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 002BC 80889C1C 3C014000 */ lui $at, 0x4000 ## $at = 40000000
/* 002C0 80889C20 44810000 */ mtc1 $at, $f0 ## $f0 = 2.00
/* 002C4 80889C24 AFBF0014 */ sw $ra, 0x0014($sp)
/* 002C8 80889C28 AFA5001C */ sw $a1, 0x001C($sp)
/* 002CC 80889C2C 3C018089 */ lui $at, %hi(D_80889F34) ## $at = 80890000
/* 002D0 80889C30 C4269F34 */ lwc1 $f6, %lo(D_80889F34)($at)
/* 002D4 80889C34 C4840068 */ lwc1 $f4, 0x0068($a0) ## 00000068
/* 002D8 80889C38 3C058089 */ lui $a1, %hi(func_80889C90) ## $a1 = 80890000
/* 002DC 80889C3C 24A59C90 */ addiu $a1, $a1, %lo(func_80889C90) ## $a1 = 80889C90
/* 002E0 80889C40 46062200 */ add.s $f8, $f4, $f6
/* 002E4 80889C44 E4880068 */ swc1 $f8, 0x0068($a0) ## 00000068
/* 002E8 80889C48 C48A0068 */ lwc1 $f10, 0x0068($a0) ## 00000068
/* 002EC 80889C4C 460A003C */ c.lt.s $f0, $f10
/* 002F0 80889C50 00000000 */ nop
/* 002F4 80889C54 45000005 */ bc1f .L80889C6C
/* 002F8 80889C58 00000000 */ nop
/* 002FC 80889C5C E4800068 */ swc1 $f0, 0x0068($a0) ## 00000068
/* 00300 80889C60 0C222658 */ jal BgHidanKousi_SetupAction
/* 00304 80889C64 AFA40018 */ sw $a0, 0x0018($sp)
/* 00308 80889C68 8FA40018 */ lw $a0, 0x0018($sp)
.L80889C6C:
/* 0030C 80889C6C 0C00B638 */ jal Actor_MoveForward
/* 00310 80889C70 AFA40018 */ sw $a0, 0x0018($sp)
/* 00314 80889C74 8FA40018 */ lw $a0, 0x0018($sp)
/* 00318 80889C78 0C00BE5D */ jal func_8002F974
/* 0031C 80889C7C 24052036 */ addiu $a1, $zero, 0x2036 ## $a1 = 00002036
/* 00320 80889C80 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00324 80889C84 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00328 80889C88 03E00008 */ jr $ra
/* 0032C 80889C8C 00000000 */ nop

View file

@ -1,43 +0,0 @@
glabel func_80889C90
/* 00330 80889C90 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 00334 80889C94 AFBF001C */ sw $ra, 0x001C($sp)
/* 00338 80889C98 AFB00018 */ sw $s0, 0x0018($sp)
/* 0033C 80889C9C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00340 80889CA0 0C00B5FB */ jal func_8002D7EC
/* 00344 80889CA4 AFA50024 */ sw $a1, 0x0024($sp)
/* 00348 80889CA8 26040008 */ addiu $a0, $s0, 0x0008 ## $a0 = 00000008
/* 0034C 80889CAC 0C01DFE4 */ jal Math_Vec3f_DistXYZ
/* 00350 80889CB0 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024
/* 00354 80889CB4 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
/* 00358 80889CB8 3C018089 */ lui $at, %hi(D_80889E40) ## $at = 80890000
/* 0035C 80889CBC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00360 80889CC0 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000
/* 00364 80889CC4 000FC080 */ sll $t8, $t7, 2
/* 00368 80889CC8 00380821 */ addu $at, $at, $t8
/* 0036C 80889CCC C4249E40 */ lwc1 $f4, %lo(D_80889E40)($at)
/* 00370 80889CD0 4600203C */ c.lt.s $f4, $f0
/* 00374 80889CD4 00000000 */ nop
/* 00378 80889CD8 4500000C */ bc1f .L80889D0C
/* 0037C 80889CDC 00000000 */ nop
/* 00380 80889CE0 0C2226B3 */ jal func_80889ACC
/* 00384 80889CE4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00388 80889CE8 3C058089 */ lui $a1, %hi(func_80889D28) ## $a1 = 80890000
/* 0038C 80889CEC 24A59D28 */ addiu $a1, $a1, %lo(func_80889D28) ## $a1 = 80889D28
/* 00390 80889CF0 0C222658 */ jal BgHidanKousi_SetupAction
/* 00394 80889CF4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00398 80889CF8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0039C 80889CFC 0C00BE0A */ jal Audio_PlayActorSound2
/* 003A0 80889D00 24052837 */ addiu $a1, $zero, 0x2837 ## $a1 = 00002837
/* 003A4 80889D04 10000004 */ beq $zero, $zero, .L80889D18
/* 003A8 80889D08 8FBF001C */ lw $ra, 0x001C($sp)
.L80889D0C:
/* 003AC 80889D0C 0C00BE5D */ jal func_8002F974
/* 003B0 80889D10 24052036 */ addiu $a1, $zero, 0x2036 ## $a1 = 00002036
/* 003B4 80889D14 8FBF001C */ lw $ra, 0x001C($sp)
.L80889D18:
/* 003B8 80889D18 8FB00018 */ lw $s0, 0x0018($sp)
/* 003BC 80889D1C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 003C0 80889D20 03E00008 */ jr $ra
/* 003C4 80889D24 00000000 */ nop

View file

@ -1,4 +0,0 @@
glabel func_80889D28
/* 003C8 80889D28 AFA40000 */ sw $a0, 0x0000($sp)
/* 003CC 80889D2C 03E00008 */ jr $ra
/* 003D0 80889D30 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 D_80889E40
.word 0x42F00000, 0x43160000, 0x43160000
glabel Bg_Hidan_Kousi_InitVars
.word 0x006F0600, 0x00000010, 0x002C0000, 0x0000016C
.word BgHidanKousi_Init
.word BgHidanKousi_Destroy
.word BgHidanKousi_Update
.word BgHidanKousi_Draw
glabel D_80889E6C
.word 0x48500064
glabel D_80889E70
.word 0x0600E2CC, 0x0600E380, 0x0600E430
glabel D_80889E7C
.word 0x4000C000, 0xC0000000
glabel D_80889E84
.word 0x0600C798, 0x0600BFA8, 0x0600BB58

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_80889F40
.incbin "baserom/ovl_Bg_Hidan_Kousi", 0x5E0, 0x000000E0

3
spec
View file

@ -907,8 +907,7 @@ endseg
beginseg beginseg
name "ovl_Bg_Hidan_Kousi" name "ovl_Bg_Hidan_Kousi"
include "build/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.o" include "build/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.o"
include "build/data/overlays/actors/z_bg_hidan_kousi.data.o" include "build/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi_reloc.o"
include "build/data/overlays/actors/z_bg_hidan_kousi.reloc.o"
endseg endseg
beginseg beginseg

View file

@ -1,3 +1,9 @@
/*
* File: z_bg_hidan_kousi.c
* Overlay: ovl_Bg_Hidan_Kousi
* Description:
*/
#include "z_bg_hidan_kousi.h" #include "z_bg_hidan_kousi.h"
#define FLAGS 0x00000010 #define FLAGS 0x00000010
@ -9,7 +15,19 @@ void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgHidanKousi_Update(Actor* thisx, GlobalContext* globalCtx); void BgHidanKousi_Update(Actor* thisx, GlobalContext* globalCtx);
void BgHidanKousi_Draw(Actor* thisx, GlobalContext* globalCtx); void BgHidanKousi_Draw(Actor* thisx, GlobalContext* globalCtx);
/* void func_80889ACC(BgHidanKousi* this);
void func_80889B5C(BgHidanKousi* this, GlobalContext* globalCtx);
void func_80889BC0(BgHidanKousi* this, GlobalContext* globalCtx);
void func_80889C18(BgHidanKousi* this, GlobalContext* globalCtx);
void func_80889C90(BgHidanKousi* this, GlobalContext* globalCtx);
void func_80889D28(BgHidanKousi* this, GlobalContext* globalCtx);
f32 D_80889E40[] = {
120.0f,
150.0f,
150.0f,
};
const ActorInit Bg_Hidan_Kousi_InitVars = { const ActorInit Bg_Hidan_Kousi_InitVars = {
ACTOR_BG_HIDAN_KOUSI, ACTOR_BG_HIDAN_KOUSI,
ACTORTYPE_PROP, ACTORTYPE_PROP,
@ -21,25 +39,129 @@ const ActorInit Bg_Hidan_Kousi_InitVars = {
(ActorFunc)BgHidanKousi_Update, (ActorFunc)BgHidanKousi_Update,
(ActorFunc)BgHidanKousi_Draw, (ActorFunc)BgHidanKousi_Draw,
}; };
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/BgHidanKousi_SetupAction.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/BgHidanKousi_Init.s") static InitChainEntry D_80889E6C[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/BgHidanKousi_Destroy.s") u32 D_80889E70[] = {
0x0600E2CC,
0x0600E380,
0x0600E430,
};
s16 D_80889E7C[] = {
0x4000,
0xC000,
0xC000,
0x0000,
};
u32 D_80889E84[] = {
0x0600C798,
0x0600BFA8,
0x0600BB58,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/func_80889ACC.s") void BgHidanKousi_SetupAction(BgHidanKousi* this, BgHidanKousiActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/func_80889B5C.s") void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx) {
BgHidanKousi* this = THIS;
s32 pad;
u32 localC = 0;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/func_80889BC0.s") DynaPolyInfo_SetActorMove(&this->dyna, 0);
Actor_SetHeight(thisx, 50.0f);
osSyncPrintf("◯◯◯炎の神殿オブジェクト【格子(arg_data : %0x)】出現 (%d %d)\n", thisx->params, thisx->params & 0xFF,
((s32)thisx->params >> 8) & 0xFF);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/func_80889C18.s") Actor_ProcessInitChain(thisx, D_80889E6C);
if (((thisx->params & 0xFF) < 0) || ((thisx->params & 0xFF) >= 3)) {
osSyncPrintf("arg_data おかしい 【格子】\n");
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/func_80889C90.s") DynaPolyInfo_Alloc(D_80889E70[thisx->params & 0xFF], &localC);
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
thisx->posRot.rot.y = D_80889E7C[this->dyna.actor.params & 0xFF] + thisx->shape.rot.y;
if (Flags_GetSwitch(globalCtx, (thisx->params >> 8) & 0xFF)) {
func_80889ACC(this);
BgHidanKousi_SetupAction(this, func_80889D28);
} else {
BgHidanKousi_SetupAction(this, func_80889B5C);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/func_80889D28.s") void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgHidanKousi* this = THIS;
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/BgHidanKousi_Update.s") void func_80889ACC(BgHidanKousi* this) {
s32 pad[2];
Vec3s* rot = &this->dyna.actor.posRot.rot;
f32 temp1 = D_80889E40[this->dyna.actor.params & 0xFF] * Math_Sins(rot->y);
f32 temp2 = D_80889E40[this->dyna.actor.params & 0xFF] * Math_Coss(rot->y);
Vec3f* initPos = &this->dyna.actor.initPosRot.pos;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Kousi/BgHidanKousi_Draw.s") this->dyna.actor.posRot.pos.x = initPos->x + temp1;
this->dyna.actor.posRot.pos.z = initPos->z + temp2;
}
void func_80889B5C(BgHidanKousi* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0xFF)) {
BgHidanKousi_SetupAction(this, func_80889BC0);
func_80080480(globalCtx, this);
this->unk_168 = 0xC8;
}
}
void func_80889BC0(BgHidanKousi* this, GlobalContext* globalCtx) {
this->unk_168 -= 1;
if (this->dyna.actor.type == func_8005B198() || (this->unk_168 <= 0)) {
BgHidanKousi_SetupAction(this, func_80889C18);
}
}
void func_80889C18(BgHidanKousi* this, GlobalContext* globalCtx) {
this->dyna.actor.speedXZ += 0.2f;
if (this->dyna.actor.speedXZ > 2.0f) {
this->dyna.actor.speedXZ = 2.0f;
BgHidanKousi_SetupAction(this, func_80889C90);
}
Actor_MoveForward(&this->dyna.actor);
func_8002F974(&this->dyna.actor, 0x2036);
}
void func_80889C90(BgHidanKousi* this, GlobalContext* globalCtx) {
func_8002D7EC(&this->dyna.actor);
if (D_80889E40[this->dyna.actor.params & 0xFF] <
Math_Vec3f_DistXYZ(&this->dyna.actor.initPosRot.pos, &this->dyna.actor.posRot.pos)) {
func_80889ACC(this);
BgHidanKousi_SetupAction(this, func_80889D28);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
} else {
func_8002F974(&this->dyna.actor, 0x2036);
}
}
void func_80889D28(BgHidanKousi* this, GlobalContext* globalCtx) {
}
void BgHidanKousi_Update(Actor* thisx, GlobalContext* globalCtx) {
BgHidanKousi* this = THIS;
this->actionFunc(this, globalCtx);
}
void BgHidanKousi_Draw(Actor* thisx, GlobalContext* globalCtx) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[4];
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 350);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 354),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, D_80889E84[thisx->params & 0xFF]);
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_hidan_kousi.c", 359);
}

View file

@ -6,9 +6,12 @@
struct BgHidanKousi; struct BgHidanKousi;
typedef void (*BgHidanKousiActionFunc)(struct BgHidanKousi*, GlobalContext*);
typedef struct BgHidanKousi { typedef struct BgHidanKousi {
/* 0x0000 */ Actor actor; /* 0x0000 */ DynaPolyActor dyna;
/* 0x014C */ char unk_14C[0x20]; /* 0x0164 */ BgHidanKousiActionFunc actionFunc;
/* 0x0168 */ s16 unk_168;
} BgHidanKousi; // size = 0x016C } BgHidanKousi; // size = 0x016C
extern const ActorInit Bg_Hidan_Kousi_InitVars; extern const ActorInit Bg_Hidan_Kousi_InitVars;