mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-25 22:26:12 +00:00
Hashira (#384)
* Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * Hashira4 done * forgot some names * minor cleanup * .gitignore reverted * merge and rename * merge and cleanup * needs a description * dlists * wait for mori tex
This commit is contained in:
parent
7c7d292730
commit
bc898fcbfc
19 changed files with 158 additions and 488 deletions
|
@ -1,14 +0,0 @@
|
|||
glabel BgMoriHashira4_Destroy
|
||||
/* 001CC 808A322C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 001D0 808A3230 AFA40018 */ sw $a0, 0x0018($sp)
|
||||
/* 001D4 808A3234 8FAE0018 */ lw $t6, 0x0018($sp)
|
||||
/* 001D8 808A3238 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 001DC 808A323C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
|
||||
/* 001E0 808A3240 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810
|
||||
/* 001E4 808A3244 0C00FB56 */ jal DynaPolyInfo_Free
|
||||
## DynaPolyInfo_delReserve
|
||||
/* 001E8 808A3248 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C
|
||||
/* 001EC 808A324C 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 001F0 808A3250 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 001F4 808A3254 03E00008 */ jr $ra
|
||||
/* 001F8 808A3258 00000000 */ nop
|
|
@ -1,107 +0,0 @@
|
|||
.rdata
|
||||
glabel D_808A3638
|
||||
.asciz "Error : バンク危険!(arg_data 0x%04x)(%s %d)\n"
|
||||
.balign 4
|
||||
|
||||
glabel D_808A3668
|
||||
.asciz "../z_bg_mori_hashira4.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_808A3680
|
||||
.asciz "(森の神殿 4本柱)(arg_data 0x%04x)\n"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel BgMoriHashira4_Init
|
||||
/* 00090 808A30F0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
|
||||
/* 00094 808A30F4 AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 00098 808A30F8 AFB00018 */ sw $s0, 0x0018($sp)
|
||||
/* 0009C 808A30FC AFA50024 */ sw $a1, 0x0024($sp)
|
||||
/* 000A0 808A3100 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 000A4 808A3104 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 000A8 808A3108 3C060601 */ lui $a2, 0x0601 ## $a2 = 06010000
|
||||
/* 000AC 808A310C 305800FF */ andi $t8, $v0, 0x00FF ## $t8 = 00000000
|
||||
/* 000B0 808A3110 A498001C */ sh $t8, 0x001C($a0) ## 0000001C
|
||||
/* 000B4 808A3114 8499001C */ lh $t9, 0x001C($a0) ## 0000001C
|
||||
/* 000B8 808A3118 00027203 */ sra $t6, $v0, 8
|
||||
/* 000BC 808A311C 31CF003F */ andi $t7, $t6, 0x003F ## $t7 = 00000000
|
||||
/* 000C0 808A3120 17200008 */ bne $t9, $zero, .L808A3144
|
||||
/* 000C4 808A3124 A08F0169 */ sb $t7, 0x0169($a0) ## 00000169
|
||||
/* 000C8 808A3128 3C060600 */ lui $a2, 0x0600 ## $a2 = 06000000
|
||||
/* 000CC 808A312C 24C61AF8 */ addiu $a2, $a2, 0x1AF8 ## $a2 = 06001AF8
|
||||
/* 000D0 808A3130 8FA50024 */ lw $a1, 0x0024($sp)
|
||||
/* 000D4 808A3134 0C228C1A */ jal func_808A3068
|
||||
/* 000D8 808A3138 24070003 */ addiu $a3, $zero, 0x0003 ## $a3 = 00000003
|
||||
/* 000DC 808A313C 10000006 */ beq $zero, $zero, .L808A3158
|
||||
/* 000E0 808A3140 00000000 */ nop
|
||||
.L808A3144:
|
||||
/* 000E4 808A3144 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 000E8 808A3148 8FA50024 */ lw $a1, 0x0024($sp)
|
||||
/* 000EC 808A314C 24C689E0 */ addiu $a2, $a2, 0x89E0 ## $a2 = FFFF89E0
|
||||
/* 000F0 808A3150 0C228C1A */ jal func_808A3068
|
||||
/* 000F4 808A3154 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
|
||||
.L808A3158:
|
||||
/* 000F8 808A3158 3C05808A */ lui $a1, %hi(D_808A35C0) ## $a1 = 808A0000
|
||||
/* 000FC 808A315C 24A535C0 */ addiu $a1, $a1, %lo(D_808A35C0) ## $a1 = 808A35C0
|
||||
/* 00100 808A3160 0C01E037 */ jal Actor_ProcessInitChain
|
||||
|
||||
/* 00104 808A3164 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00108 808A3168 8FA40024 */ lw $a0, 0x0024($sp)
|
||||
/* 0010C 808A316C 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 00110 808A3170 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4
|
||||
/* 00114 808A3174 24050073 */ addiu $a1, $zero, 0x0073 ## $a1 = 00000073
|
||||
/* 00118 808A3178 0C02604B */ jal Object_GetIndex
|
||||
## ObjectIndex
|
||||
/* 0011C 808A317C 00812021 */ addu $a0, $a0, $at
|
||||
/* 00120 808A3180 A2020168 */ sb $v0, 0x0168($s0) ## 00000168
|
||||
/* 00124 808A3184 82080168 */ lb $t0, 0x0168($s0) ## 00000168
|
||||
/* 00128 808A3188 0503000D */ bgezl $t0, .L808A31C0
|
||||
/* 0012C 808A318C 8609001C */ lh $t1, 0x001C($s0) ## 0000001C
|
||||
/* 00130 808A3190 0C00B55C */ jal Actor_Kill
|
||||
|
||||
/* 00134 808A3194 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00138 808A3198 3C04808A */ lui $a0, %hi(D_808A3638) ## $a0 = 808A0000
|
||||
/* 0013C 808A319C 3C06808A */ lui $a2, %hi(D_808A3668) ## $a2 = 808A0000
|
||||
/* 00140 808A31A0 24C63668 */ addiu $a2, $a2, %lo(D_808A3668) ## $a2 = 808A3668
|
||||
/* 00144 808A31A4 24843638 */ addiu $a0, $a0, %lo(D_808A3638) ## $a0 = 808A3638
|
||||
/* 00148 808A31A8 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
|
||||
/* 0014C 808A31AC 0C00084C */ jal osSyncPrintf
|
||||
|
||||
/* 00150 808A31B0 240700C4 */ addiu $a3, $zero, 0x00C4 ## $a3 = 000000C4
|
||||
/* 00154 808A31B4 10000019 */ beq $zero, $zero, .L808A321C
|
||||
/* 00158 808A31B8 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 0015C 808A31BC 8609001C */ lh $t1, 0x001C($s0) ## 0000001C
|
||||
.L808A31C0:
|
||||
/* 00160 808A31C0 8FA40024 */ lw $a0, 0x0024($sp)
|
||||
/* 00164 808A31C4 5120000A */ beql $t1, $zero, .L808A31F0
|
||||
/* 00168 808A31C8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 0016C 808A31CC 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00170 808A31D0 82050169 */ lb $a1, 0x0169($s0) ## 00000169
|
||||
/* 00174 808A31D4 50400006 */ beql $v0, $zero, .L808A31F0
|
||||
/* 00178 808A31D8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 0017C 808A31DC 0C00B55C */ jal Actor_Kill
|
||||
|
||||
/* 00180 808A31E0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00184 808A31E4 1000000D */ beq $zero, $zero, .L808A321C
|
||||
/* 00188 808A31E8 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 0018C 808A31EC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
.L808A31F0:
|
||||
/* 00190 808A31F0 0C00B56E */ jal Actor_SetHeight
|
||||
|
||||
/* 00194 808A31F4 3C054248 */ lui $a1, 0x4248 ## $a1 = 42480000
|
||||
/* 00198 808A31F8 0C228C97 */ jal func_808A325C
|
||||
/* 0019C 808A31FC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 001A0 808A3200 3C04808A */ lui $a0, %hi(D_808A3680) ## $a0 = 808A0000
|
||||
/* 001A4 808A3204 24843680 */ addiu $a0, $a0, %lo(D_808A3680) ## $a0 = 808A3680
|
||||
/* 001A8 808A3208 0C00084C */ jal osSyncPrintf
|
||||
|
||||
/* 001AC 808A320C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
|
||||
/* 001B0 808A3210 3C01808A */ lui $at, %hi(D_808A37C0) ## $at = 808A0000
|
||||
/* 001B4 808A3214 A42037C0 */ sh $zero, %lo(D_808A37C0)($at)
|
||||
/* 001B8 808A3218 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
.L808A321C:
|
||||
/* 001BC 808A321C 8FB00018 */ lw $s0, 0x0018($sp)
|
||||
/* 001C0 808A3220 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
|
||||
/* 001C4 808A3224 03E00008 */ jr $ra
|
||||
/* 001C8 808A3228 00000000 */ nop
|
|
@ -1,13 +0,0 @@
|
|||
glabel BgMoriHashira4_Update
|
||||
/* 003F8 808A3458 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 003FC 808A345C AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 00400 808A3460 8C820164 */ lw $v0, 0x0164($a0) ## 00000164
|
||||
/* 00404 808A3464 50400004 */ beql $v0, $zero, .L808A3478
|
||||
/* 00408 808A3468 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 0040C 808A346C 0040F809 */ jalr $ra, $v0
|
||||
/* 00410 808A3470 00000000 */ nop
|
||||
/* 00414 808A3474 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
.L808A3478:
|
||||
/* 00418 808A3478 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 0041C 808A347C 03E00008 */ jr $ra
|
||||
/* 00420 808A3480 00000000 */ nop
|
|
@ -1,3 +0,0 @@
|
|||
glabel func_808A3060
|
||||
/* 00000 808A3060 03E00008 */ jr $ra
|
||||
/* 00004 808A3064 AC850164 */ sw $a1, 0x0164($a0) ## 00000164
|
|
@ -1,52 +0,0 @@
|
|||
.rdata
|
||||
glabel D_808A35E0
|
||||
.asciz "Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n"
|
||||
.balign 4
|
||||
|
||||
.balign 4
|
||||
|
||||
glabel D_808A3620
|
||||
.asciz "../z_bg_mori_hashira4.c"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel func_808A3068
|
||||
/* 00008 808A3068 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
|
||||
/* 0000C 808A306C AFBF0024 */ sw $ra, 0x0024($sp)
|
||||
/* 00010 808A3070 AFB00020 */ sw $s0, 0x0020($sp)
|
||||
/* 00014 808A3074 AFA5003C */ sw $a1, 0x003C($sp)
|
||||
/* 00018 808A3078 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 0001C 808A307C AFA60040 */ sw $a2, 0x0040($sp)
|
||||
/* 00020 808A3080 AFA00030 */ sw $zero, 0x0030($sp)
|
||||
/* 00024 808A3084 0C010D20 */ jal DynaPolyInfo_SetActorMove
|
||||
|
||||
/* 00028 808A3088 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000
|
||||
/* 0002C 808A308C 8FA40040 */ lw $a0, 0x0040($sp)
|
||||
/* 00030 808A3090 0C010620 */ jal DynaPolyInfo_Alloc
|
||||
|
||||
/* 00034 808A3094 27A50030 */ addiu $a1, $sp, 0x0030 ## $a1 = FFFFFFF8
|
||||
/* 00038 808A3098 8FA4003C */ lw $a0, 0x003C($sp)
|
||||
/* 0003C 808A309C 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
|
||||
/* 00040 808A30A0 8FA70030 */ lw $a3, 0x0030($sp)
|
||||
/* 00044 808A30A4 0C00FA9D */ jal DynaPolyInfo_RegisterActor
|
||||
## DynaPolyInfo_setActor
|
||||
/* 00048 808A30A8 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810
|
||||
/* 0004C 808A30AC 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032
|
||||
/* 00050 808A30B0 1441000A */ bne $v0, $at, .L808A30DC
|
||||
/* 00054 808A30B4 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C
|
||||
/* 00058 808A30B8 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
|
||||
/* 0005C 808A30BC 3C04808A */ lui $a0, %hi(D_808A35E0) ## $a0 = 808A0000
|
||||
/* 00060 808A30C0 3C05808A */ lui $a1, %hi(D_808A3620) ## $a1 = 808A0000
|
||||
/* 00064 808A30C4 86070000 */ lh $a3, 0x0000($s0) ## 00000000
|
||||
/* 00068 808A30C8 24A53620 */ addiu $a1, $a1, %lo(D_808A3620) ## $a1 = 808A3620
|
||||
/* 0006C 808A30CC 248435E0 */ addiu $a0, $a0, %lo(D_808A35E0) ## $a0 = 808A35E0
|
||||
/* 00070 808A30D0 2406009B */ addiu $a2, $zero, 0x009B ## $a2 = 0000009B
|
||||
/* 00074 808A30D4 0C00084C */ jal osSyncPrintf
|
||||
|
||||
/* 00078 808A30D8 AFAE0010 */ sw $t6, 0x0010($sp)
|
||||
.L808A30DC:
|
||||
/* 0007C 808A30DC 8FBF0024 */ lw $ra, 0x0024($sp)
|
||||
/* 00080 808A30E0 8FB00020 */ lw $s0, 0x0020($sp)
|
||||
/* 00084 808A30E4 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
|
||||
/* 00088 808A30E8 03E00008 */ jr $ra
|
||||
/* 0008C 808A30EC 00000000 */ nop
|
|
@ -1,10 +0,0 @@
|
|||
glabel func_808A325C
|
||||
/* 001FC 808A325C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 00200 808A3260 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 00204 808A3264 3C05808A */ lui $a1, %hi(func_808A3280) ## $a1 = 808A0000
|
||||
/* 00208 808A3268 0C228C18 */ jal func_808A3060
|
||||
/* 0020C 808A326C 24A53280 */ addiu $a1, $a1, %lo(func_808A3280) ## $a1 = 808A3280
|
||||
/* 00210 808A3270 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 00214 808A3274 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 00218 808A3278 03E00008 */ jr $ra
|
||||
/* 0021C 808A327C 00000000 */ nop
|
|
@ -1,35 +0,0 @@
|
|||
glabel func_808A3280
|
||||
/* 00220 808A3280 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
|
||||
/* 00224 808A3284 AFB00018 */ sw $s0, 0x0018($sp)
|
||||
/* 00228 808A3288 3C010001 */ lui $at, 0x0001 ## $at = 00010000
|
||||
/* 0022C 808A328C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 00230 808A3290 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4
|
||||
/* 00234 808A3294 AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 00238 808A3298 00A12021 */ addu $a0, $a1, $at
|
||||
/* 0023C 808A329C 0C026062 */ jal Object_IsLoaded
|
||||
|
||||
/* 00240 808A32A0 82050168 */ lb $a1, 0x0168($s0) ## 00000168
|
||||
/* 00244 808A32A4 50400010 */ beql $v0, $zero, .L808A32E8
|
||||
/* 00248 808A32A8 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 0024C 808A32AC 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
|
||||
/* 00250 808A32B0 A600016A */ sh $zero, 0x016A($s0) ## 0000016A
|
||||
/* 00254 808A32B4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00258 808A32B8 15C00005 */ bne $t6, $zero, .L808A32D0
|
||||
/* 0025C 808A32BC 3C05808A */ lui $a1, %hi(func_808A3354) ## $a1 = 808A0000
|
||||
/* 00260 808A32C0 0C228CBE */ jal func_808A32F8
|
||||
/* 00264 808A32C4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00268 808A32C8 10000003 */ beq $zero, $zero, .L808A32D8
|
||||
/* 0026C 808A32CC 00000000 */ nop
|
||||
.L808A32D0:
|
||||
/* 00270 808A32D0 0C228C18 */ jal func_808A3060
|
||||
/* 00274 808A32D4 24A53354 */ addiu $a1, $a1, %lo(func_808A3354) ## $a1 = 00003354
|
||||
.L808A32D8:
|
||||
/* 00278 808A32D8 3C0F808A */ lui $t7, %hi(func_808A3484) ## $t7 = 808A0000
|
||||
/* 0027C 808A32DC 25EF3484 */ addiu $t7, $t7, %lo(func_808A3484) ## $t7 = 808A3484
|
||||
/* 00280 808A32E0 AE0F0134 */ sw $t7, 0x0134($s0) ## 00000134
|
||||
/* 00284 808A32E4 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
.L808A32E8:
|
||||
/* 00288 808A32E8 8FB00018 */ lw $s0, 0x0018($sp)
|
||||
/* 0028C 808A32EC 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
|
||||
/* 00290 808A32F0 03E00008 */ jr $ra
|
||||
/* 00294 808A32F4 00000000 */ nop
|
|
@ -1,10 +0,0 @@
|
|||
glabel func_808A32F8
|
||||
/* 00298 808A32F8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 0029C 808A32FC AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 002A0 808A3300 3C05808A */ lui $a1, %hi(func_808A331C) ## $a1 = 808A0000
|
||||
/* 002A4 808A3304 0C228C18 */ jal func_808A3060
|
||||
/* 002A8 808A3308 24A5331C */ addiu $a1, $a1, %lo(func_808A331C) ## $a1 = 808A331C
|
||||
/* 002AC 808A330C 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 002B0 808A3310 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 002B4 808A3314 03E00008 */ jr $ra
|
||||
/* 002B8 808A3318 00000000 */ nop
|
|
@ -1,16 +0,0 @@
|
|||
glabel func_808A331C
|
||||
/* 002BC 808A331C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 002C0 808A3320 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 002C4 808A3324 AFA5001C */ sw $a1, 0x001C($sp)
|
||||
/* 002C8 808A3328 848E0032 */ lh $t6, 0x0032($a0) ## 00000032
|
||||
/* 002CC 808A332C 24052082 */ addiu $a1, $zero, 0x2082 ## $a1 = 00002082
|
||||
/* 002D0 808A3330 25CF0096 */ addiu $t7, $t6, 0x0096 ## $t7 = 00000096
|
||||
/* 002D4 808A3334 A48F0032 */ sh $t7, 0x0032($a0) ## 00000032
|
||||
/* 002D8 808A3338 84980032 */ lh $t8, 0x0032($a0) ## 00000032
|
||||
/* 002DC 808A333C 0C00BE0A */ jal Audio_PlayActorSound2
|
||||
|
||||
/* 002E0 808A3340 A49800B6 */ sh $t8, 0x00B6($a0) ## 000000B6
|
||||
/* 002E4 808A3344 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 002E8 808A3348 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 002EC 808A334C 03E00008 */ jr $ra
|
||||
/* 002F0 808A3350 00000000 */ nop
|
|
@ -1,48 +0,0 @@
|
|||
glabel func_808A3354
|
||||
/* 002F4 808A3354 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
|
||||
/* 002F8 808A3358 AFB00020 */ sw $s0, 0x0020($sp)
|
||||
/* 002FC 808A335C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 00300 808A3360 AFBF0024 */ sw $ra, 0x0024($sp)
|
||||
/* 00304 808A3364 AFA5002C */ sw $a1, 0x002C($sp)
|
||||
/* 00308 808A3368 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
|
||||
/* 0030C 808A336C 0C00B2D0 */ jal Flags_GetSwitch
|
||||
|
||||
/* 00310 808A3370 82050169 */ lb $a1, 0x0169($s0) ## 00000169
|
||||
/* 00314 808A3374 54400005 */ bnel $v0, $zero, .L808A338C
|
||||
/* 00318 808A3378 860F016A */ lh $t7, 0x016A($s0) ## 0000016A
|
||||
/* 0031C 808A337C 860E016A */ lh $t6, 0x016A($s0) ## 0000016A
|
||||
/* 00320 808A3380 51C0001B */ beql $t6, $zero, .L808A33F0
|
||||
/* 00324 808A3384 8FBF0024 */ lw $ra, 0x0024($sp)
|
||||
/* 00328 808A3388 860F016A */ lh $t7, 0x016A($s0) ## 0000016A
|
||||
.L808A338C:
|
||||
/* 0032C 808A338C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00330 808A3390 25F80001 */ addiu $t8, $t7, 0x0001 ## $t8 = 00000001
|
||||
/* 00334 808A3394 A618016A */ sh $t8, 0x016A($s0) ## 0000016A
|
||||
/* 00338 808A3398 8619016A */ lh $t9, 0x016A($s0) ## 0000016A
|
||||
/* 0033C 808A339C 2B21001F */ slti $at, $t9, 0x001F
|
||||
/* 00340 808A33A0 54200013 */ bnel $at, $zero, .L808A33F0
|
||||
/* 00344 808A33A4 8FBF0024 */ lw $ra, 0x0024($sp)
|
||||
/* 00348 808A33A8 0C00BE0A */ jal Audio_PlayActorSound2
|
||||
|
||||
/* 0034C 808A33AC 24052859 */ addiu $a1, $zero, 0x2859 ## $a1 = 00002859
|
||||
/* 00350 808A33B0 3C05808A */ lui $a1, %hi(func_808A3400) ## $a1 = 808A0000
|
||||
/* 00354 808A33B4 24A53400 */ addiu $a1, $a1, %lo(func_808A3400) ## $a1 = 808A3400
|
||||
/* 00358 808A33B8 0C228C18 */ jal func_808A3060
|
||||
/* 0035C 808A33BC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
|
||||
/* 00360 808A33C0 8FA4002C */ lw $a0, 0x002C($sp)
|
||||
/* 00364 808A33C4 2405177A */ addiu $a1, $zero, 0x177A ## $a1 = 0000177A
|
||||
/* 00368 808A33C8 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014
|
||||
/* 0036C 808A33CC 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000
|
||||
/* 00370 808A33D0 0C02003E */ jal func_800800F8
|
||||
/* 00374 808A33D4 AFA00010 */ sw $zero, 0x0010($sp)
|
||||
/* 00378 808A33D8 3C03808A */ lui $v1, %hi(D_808A37C0) ## $v1 = 808A0000
|
||||
/* 0037C 808A33DC 246337C0 */ addiu $v1, $v1, %lo(D_808A37C0) ## $v1 = 808A37C0
|
||||
/* 00380 808A33E0 84680000 */ lh $t0, 0x0000($v1) ## 808A37C0
|
||||
/* 00384 808A33E4 25090001 */ addiu $t1, $t0, 0x0001 ## $t1 = 00000001
|
||||
/* 00388 808A33E8 A4690000 */ sh $t1, 0x0000($v1) ## 808A37C0
|
||||
/* 0038C 808A33EC 8FBF0024 */ lw $ra, 0x0024($sp)
|
||||
.L808A33F0:
|
||||
/* 00390 808A33F0 8FB00020 */ lw $s0, 0x0020($sp)
|
||||
/* 00394 808A33F4 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
|
||||
/* 00398 808A33F8 03E00008 */ jr $ra
|
||||
/* 0039C 808A33FC 00000000 */ nop
|
|
@ -1,26 +0,0 @@
|
|||
glabel func_808A3400
|
||||
/* 003A0 808A3400 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
|
||||
/* 003A4 808A3404 AFBF0014 */ sw $ra, 0x0014($sp)
|
||||
/* 003A8 808A3408 AFA5001C */ sw $a1, 0x001C($sp)
|
||||
/* 003AC 808A340C 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000
|
||||
/* 003B0 808A3410 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000
|
||||
/* 003B4 808A3414 44813000 */ mtc1 $at, $f6 ## $f6 = 120.00
|
||||
/* 003B8 808A3418 C4E4000C */ lwc1 $f4, 0x000C($a3) ## 0000000C
|
||||
/* 003BC 808A341C AFA70018 */ sw $a3, 0x0018($sp)
|
||||
/* 003C0 808A3420 24840028 */ addiu $a0, $a0, 0x0028 ## $a0 = 00000028
|
||||
/* 003C4 808A3424 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 003C8 808A3428 3C064120 */ lui $a2, 0x4120 ## $a2 = 41200000
|
||||
/* 003CC 808A342C 44054000 */ mfc1 $a1, $f8
|
||||
/* 003D0 808A3430 0C01DE80 */ jal Math_ApproxF
|
||||
|
||||
/* 003D4 808A3434 00000000 */ nop
|
||||
/* 003D8 808A3438 10400003 */ beq $v0, $zero, .L808A3448
|
||||
/* 003DC 808A343C 8FA70018 */ lw $a3, 0x0018($sp)
|
||||
/* 003E0 808A3440 0C00B55C */ jal Actor_Kill
|
||||
|
||||
/* 003E4 808A3444 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
|
||||
.L808A3448:
|
||||
/* 003E8 808A3448 8FBF0014 */ lw $ra, 0x0014($sp)
|
||||
/* 003EC 808A344C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
|
||||
/* 003F0 808A3450 03E00008 */ jr $ra
|
||||
/* 003F4 808A3454 00000000 */ nop
|
|
@ -1,86 +0,0 @@
|
|||
.rdata
|
||||
glabel D_808A36A4
|
||||
.asciz "../z_bg_mori_hashira4.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_808A36BC
|
||||
.asciz "../z_bg_mori_hashira4.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_808A36D4
|
||||
.asciz "../z_bg_mori_hashira4.c"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel func_808A3484
|
||||
/* 00424 808A3484 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0
|
||||
/* 00428 808A3488 AFB10018 */ sw $s1, 0x0018($sp)
|
||||
/* 0042C 808A348C 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
|
||||
/* 00430 808A3490 AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 00434 808A3494 AFB00014 */ sw $s0, 0x0014($sp)
|
||||
/* 00438 808A3498 AFA40050 */ sw $a0, 0x0050($sp)
|
||||
/* 0043C 808A349C 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
|
||||
/* 00440 808A34A0 3C06808A */ lui $a2, %hi(D_808A36A4) ## $a2 = 808A0000
|
||||
/* 00444 808A34A4 24C636A4 */ addiu $a2, $a2, %lo(D_808A36A4) ## $a2 = 808A36A4
|
||||
/* 00448 808A34A8 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFE4
|
||||
/* 0044C 808A34AC 24070153 */ addiu $a3, $zero, 0x0153 ## $a3 = 00000153
|
||||
/* 00450 808A34B0 0C031AB1 */ jal Graph_OpenDisps
|
||||
/* 00454 808A34B4 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
|
||||
/* 00458 808A34B8 0C024F46 */ jal func_80093D18
|
||||
/* 0045C 808A34BC 8E240000 */ lw $a0, 0x0000($s1) ## 00000000
|
||||
/* 00460 808A34C0 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
|
||||
/* 00464 808A34C4 3C0FDB06 */ lui $t7, 0xDB06 ## $t7 = DB060000
|
||||
/* 00468 808A34C8 35EF0020 */ ori $t7, $t7, 0x0020 ## $t7 = DB060020
|
||||
/* 0046C 808A34CC 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
|
||||
/* 00470 808A34D0 AE0E02C0 */ sw $t6, 0x02C0($s0) ## 000002C0
|
||||
/* 00474 808A34D4 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
|
||||
/* 00478 808A34D8 8FB80050 */ lw $t8, 0x0050($sp)
|
||||
/* 0047C 808A34DC 3C0A0001 */ lui $t2, 0x0001 ## $t2 = 00010000
|
||||
/* 00480 808A34E0 3C0CDA38 */ lui $t4, 0xDA38 ## $t4 = DA380000
|
||||
/* 00484 808A34E4 83190168 */ lb $t9, 0x0168($t8) ## 00000168
|
||||
/* 00488 808A34E8 358C0003 */ ori $t4, $t4, 0x0003 ## $t4 = DA380003
|
||||
/* 0048C 808A34EC 3C05808A */ lui $a1, %hi(D_808A36BC) ## $a1 = 808A0000
|
||||
/* 00490 808A34F0 00194100 */ sll $t0, $t9, 4
|
||||
/* 00494 808A34F4 01194021 */ addu $t0, $t0, $t9
|
||||
/* 00498 808A34F8 00084080 */ sll $t0, $t0, 2
|
||||
/* 0049C 808A34FC 02284821 */ addu $t1, $s1, $t0
|
||||
/* 004A0 808A3500 01495021 */ addu $t2, $t2, $t1
|
||||
/* 004A4 808A3504 8D4A17B4 */ lw $t2, 0x17B4($t2) ## 000117B4
|
||||
/* 004A8 808A3508 24A536BC */ addiu $a1, $a1, %lo(D_808A36BC) ## $a1 = 808A36BC
|
||||
/* 004AC 808A350C 24060158 */ addiu $a2, $zero, 0x0158 ## $a2 = 00000158
|
||||
/* 004B0 808A3510 AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004
|
||||
/* 004B4 808A3514 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
|
||||
/* 004B8 808A3518 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
|
||||
/* 004BC 808A351C AE0B02C0 */ sw $t3, 0x02C0($s0) ## 000002C0
|
||||
/* 004C0 808A3520 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
|
||||
/* 004C4 808A3524 8E240000 */ lw $a0, 0x0000($s1) ## 00000000
|
||||
/* 004C8 808A3528 0C0346A2 */ jal Matrix_NewMtx
|
||||
/* 004CC 808A352C AFA2002C */ sw $v0, 0x002C($sp)
|
||||
/* 004D0 808A3530 8FA3002C */ lw $v1, 0x002C($sp)
|
||||
/* 004D4 808A3534 3C0EDE00 */ lui $t6, 0xDE00 ## $t6 = DE000000
|
||||
/* 004D8 808A3538 3C08808A */ lui $t0, %hi(D_808A35D0) ## $t0 = 808A0000
|
||||
/* 004DC 808A353C AC620004 */ sw $v0, 0x0004($v1) ## 00000004
|
||||
/* 004E0 808A3540 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0
|
||||
/* 004E4 808A3544 3C06808A */ lui $a2, %hi(D_808A36D4) ## $a2 = 808A0000
|
||||
/* 004E8 808A3548 24C636D4 */ addiu $a2, $a2, %lo(D_808A36D4) ## $a2 = 808A36D4
|
||||
/* 004EC 808A354C 244D0008 */ addiu $t5, $v0, 0x0008 ## $t5 = 00000008
|
||||
/* 004F0 808A3550 AE0D02C0 */ sw $t5, 0x02C0($s0) ## 000002C0
|
||||
/* 004F4 808A3554 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000
|
||||
/* 004F8 808A3558 8FAF0050 */ lw $t7, 0x0050($sp)
|
||||
/* 004FC 808A355C 27A40034 */ addiu $a0, $sp, 0x0034 ## $a0 = FFFFFFE4
|
||||
/* 00500 808A3560 2407015C */ addiu $a3, $zero, 0x015C ## $a3 = 0000015C
|
||||
/* 00504 808A3564 85F8001C */ lh $t8, 0x001C($t7) ## 0000001C
|
||||
/* 00508 808A3568 0018C880 */ sll $t9, $t8, 2
|
||||
/* 0050C 808A356C 01194021 */ addu $t0, $t0, $t9
|
||||
/* 00510 808A3570 8D0835D0 */ lw $t0, %lo(D_808A35D0)($t0)
|
||||
/* 00514 808A3574 AC480004 */ sw $t0, 0x0004($v0) ## 00000004
|
||||
/* 00518 808A3578 0C031AD5 */ jal Graph_CloseDisps
|
||||
/* 0051C 808A357C 8E250000 */ lw $a1, 0x0000($s1) ## 00000000
|
||||
/* 00520 808A3580 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 00524 808A3584 8FB00014 */ lw $s0, 0x0014($sp)
|
||||
/* 00528 808A3588 8FB10018 */ lw $s1, 0x0018($sp)
|
||||
/* 0052C 808A358C 03E00008 */ jr $ra
|
||||
/* 00530 808A3590 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000
|
||||
/* 00534 808A3594 00000000 */ nop
|
||||
/* 00538 808A3598 00000000 */ nop
|
||||
/* 0053C 808A359C 00000000 */ nop
|
|
@ -1,14 +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 .bss
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel D_808A37C0
|
||||
.space 0x10
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .data
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel Bg_Mori_Hashira4_InitVars
|
||||
.word 0x00E30100, 0x00000010, 0x00720000, 0x0000016C
|
||||
.word BgMoriHashira4_Init
|
||||
.word BgMoriHashira4_Destroy
|
||||
.word BgMoriHashira4_Update
|
||||
.word 0x00000000
|
||||
glabel D_808A35C0
|
||||
.word 0xB0F403E8, 0xB0F802BC, 0xB0FC03E8, 0x485003E8
|
||||
glabel D_808A35D0
|
||||
.word 0x06001300, 0x06008840, 0x00000000, 0x00000000
|
||||
|
|
@ -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_808A36F0
|
||||
.incbin "baserom/ovl_Bg_Mori_Hashira4", 0x690, 0x000000D0
|
4
spec
4
spec
|
@ -1119,9 +1119,7 @@ endseg
|
|||
beginseg
|
||||
name "ovl_Bg_Mori_Hashira4"
|
||||
include "build/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.o"
|
||||
include "build/data/overlays/actors/z_bg_mori_hashira4.data.o"
|
||||
include "build/data/overlays/actors/z_bg_mori_hashira4.bss.o"
|
||||
include "build/data/overlays/actors/z_bg_mori_hashira4.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Bg_Mori_Hashira4/ovl_Bg_Mori_Hashira4_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* File: z_bg_mori_hashira4
|
||||
* Overlay: ovl_Bg_Mori_Hashira4
|
||||
* Description: Forest Temple gates and rotating pillars
|
||||
*/
|
||||
|
||||
#include "z_bg_mori_hashira4.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
@ -7,8 +13,18 @@
|
|||
void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgMoriHashira4_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgMoriHashira4_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void BgMoriHashira4_SetupWaitForMoriTex(BgMoriHashira4* this);
|
||||
void BgMoriHashira4_WaitForMoriTex(BgMoriHashira4* this, GlobalContext* globalCtx);
|
||||
void BgMoriHashira4_SetupPillarsRotate(BgMoriHashira4* this);
|
||||
void BgMoriHashira4_PillarsRotate(BgMoriHashira4* this, GlobalContext* globalCtx);
|
||||
void BgMoriHashira4_GateWait(BgMoriHashira4* this, GlobalContext* globalCtx);
|
||||
void BgMoriHashira4_GateOpen(BgMoriHashira4* this, GlobalContext* globalCtx);
|
||||
|
||||
extern ColHeader D_06001AF8;
|
||||
extern ColHeader D_060089E0;
|
||||
|
||||
/*
|
||||
const ActorInit Bg_Mori_Hashira4_InitVars = {
|
||||
ACTOR_BG_MORI_HASHIRA4,
|
||||
ACTORTYPE_BG,
|
||||
|
@ -20,27 +36,143 @@ const ActorInit Bg_Mori_Hashira4_InitVars = {
|
|||
(ActorFunc)BgMoriHashira4_Update,
|
||||
NULL,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A3060.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A3068.s")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 700, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/BgMoriHashira4_Init.s")
|
||||
static Gfx* sDisplayLists[] = { 0x06001300, 0x06008840 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/BgMoriHashira4_Destroy.s")
|
||||
static s16 sUnkTimer; // seems to be unused
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A325C.s")
|
||||
void BgMoriHashira4_SetupAction(BgMoriHashira4* this, BgMoriHashira4ActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A3280.s")
|
||||
void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, GlobalContext* globalCtx, ColHeader* collision, s32 moveFlag) {
|
||||
s32 pad;
|
||||
ColHeader* colHeader;
|
||||
s32 pad2;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A32F8.s")
|
||||
colHeader = NULL;
|
||||
DynaPolyInfo_SetActorMove(&this->dyna, moveFlag);
|
||||
DynaPolyInfo_Alloc(collision, &colHeader);
|
||||
this->dyna.dynaPolyId =
|
||||
DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A331C.s")
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
// Warning : move BG login failed
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashira4.c", 155,
|
||||
this->dyna.actor.id, this->dyna.actor.params);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A3354.s")
|
||||
void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgMoriHashira4* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A3400.s")
|
||||
this->switchFlag = (this->dyna.actor.params >> 8) & 0x3F;
|
||||
this->dyna.actor.params &= 0xFF;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/BgMoriHashira4_Update.s")
|
||||
if (this->dyna.actor.params == 0) {
|
||||
BgMoriHashira4_InitDynaPoly(this, globalCtx, &D_06001AF8, DPM_UNK3);
|
||||
} else {
|
||||
BgMoriHashira4_InitDynaPoly(this, globalCtx, &D_060089E0, DPM_UNK);
|
||||
}
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->moriTexObjIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_TEX);
|
||||
if (this->moriTexObjIndex < 0) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
// Bank danger!
|
||||
osSyncPrintf("Error : バンク危険!(arg_data 0x%04x)(%s %d)\n", this->dyna.actor.params,
|
||||
"../z_bg_mori_hashira4.c", 196);
|
||||
return;
|
||||
}
|
||||
if ((this->dyna.actor.params != 0) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
Actor_SetHeight(&this->dyna.actor, 50.0f);
|
||||
BgMoriHashira4_SetupWaitForMoriTex(this);
|
||||
// (4 pillars of the Forest Temple) Bank danger
|
||||
osSyncPrintf("(森の神殿 4本柱)(arg_data 0x%04x)\n", this->dyna.actor.params);
|
||||
sUnkTimer = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mori_Hashira4/func_808A3484.s")
|
||||
void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgMoriHashira4* this = THIS;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
}
|
||||
|
||||
void BgMoriHashira4_SetupWaitForMoriTex(BgMoriHashira4* this) {
|
||||
BgMoriHashira4_SetupAction(this, BgMoriHashira4_WaitForMoriTex);
|
||||
}
|
||||
|
||||
void BgMoriHashira4_WaitForMoriTex(BgMoriHashira4* this, GlobalContext* globalCtx) {
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, this->moriTexObjIndex)) {
|
||||
this->gateTimer = 0;
|
||||
if (this->dyna.actor.params == 0) {
|
||||
BgMoriHashira4_SetupPillarsRotate(this);
|
||||
} else {
|
||||
BgMoriHashira4_SetupAction(this, BgMoriHashira4_GateWait);
|
||||
}
|
||||
this->dyna.actor.draw = BgMoriHashira4_Draw;
|
||||
}
|
||||
}
|
||||
|
||||
void BgMoriHashira4_SetupPillarsRotate(BgMoriHashira4* this) {
|
||||
BgMoriHashira4_SetupAction(this, BgMoriHashira4_PillarsRotate);
|
||||
}
|
||||
|
||||
void BgMoriHashira4_PillarsRotate(BgMoriHashira4* this, GlobalContext* globalCtx) {
|
||||
this->dyna.actor.shape.rot.y = this->dyna.actor.posRot.rot.y += 0x96;
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ROLL_STAND_2 - SFX_FLAG);
|
||||
}
|
||||
|
||||
void BgMoriHashira4_GateWait(BgMoriHashira4* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag) || (this->gateTimer != 0)) {
|
||||
this->gateTimer++;
|
||||
if (this->gateTimer > 30) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
|
||||
BgMoriHashira4_SetupAction(this, BgMoriHashira4_GateOpen);
|
||||
func_800800F8(globalCtx, 0x177A, 0x14, &this->dyna.actor, 0);
|
||||
sUnkTimer++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BgMoriHashira4_GateOpen(BgMoriHashira4* this, GlobalContext* globalCtx) {
|
||||
if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y + 120.0f, 10.0f)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
void BgMoriHashira4_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgMoriHashira4* this = THIS;
|
||||
|
||||
if (this->actionFunc != NULL) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
||||
void BgMoriHashira4_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgMoriHashira4* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 339);
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPSegment(oGfxCtx->polyOpa.p++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment);
|
||||
|
||||
gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 344),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(oGfxCtx->polyOpa.p++, sDisplayLists[this->dyna.actor.params]);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 348);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,14 @@
|
|||
|
||||
struct BgMoriHashira4;
|
||||
|
||||
typedef void (*BgMoriHashira4ActionFunc)(struct BgMoriHashira4*, GlobalContext*);
|
||||
|
||||
typedef struct BgMoriHashira4 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x20];
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ BgMoriHashira4ActionFunc actionFunc;
|
||||
/* 0x0168 */ s8 moriTexObjIndex;
|
||||
/* 0x0169 */ s8 switchFlag;
|
||||
/* 0x016A */ s16 gateTimer;
|
||||
} BgMoriHashira4; // size = 0x016C
|
||||
|
||||
extern const ActorInit Bg_Mori_Hashira4_InitVars;
|
||||
|
|
|
@ -1087,3 +1087,7 @@ D_06000498 = 0x06000498;
|
|||
|
||||
// z_bg_menkuri_eye
|
||||
D_06002D20 = 0x06002D20;
|
||||
|
||||
// z_bg_mori_hashira4
|
||||
D_06001AF8 = 0x06001AF8;
|
||||
D_060089E0 = 0x060089E0;
|
||||
|
|
Loading…
Reference in a new issue