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

Decompiles z_bg_jya_goroiwa (#307)

* Decompiles z_bg_jya_goroiwa

	* BgJyaGoroiwa_Init
	* func_808979C0
	* BgJyaGoroiwa_Destroy
	* func_80897970
	* func_80897A2C
	* BgJyaGoroiwa_Draw
	* func_80897DF0
	* func_80897DDC
	* BgJyaGoroiwa_Update
	* func_80897B48

* Adds description header to z_bg_jya_goroiwa.c

* Addresses PR comments

* Addresses PR comments #2

* Addresses PR comments (padding)

* PR comments, change paddings to s32

Co-authored-by: i82orbom <i82orbom@github>
Co-authored-by: i82orbom <i82orbom i82orbom@github>
This commit is contained in:
i82orbom 2020-08-21 03:53:00 +02:00 committed by GitHub
parent b406e041b3
commit 888f1b315f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 196 additions and 498 deletions

View file

@ -1,11 +0,0 @@
glabel BgJyaGoroiwa_Destroy
/* 00184 80897AF4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00188 80897AF8 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 0018C 80897AFC AFBF0014 */ sw $ra, 0x0014($sp)
/* 00190 80897B00 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00194 80897B04 0C016F32 */ jal Collider_DestroyJntSph
/* 00198 80897B08 24C50150 */ addiu $a1, $a2, 0x0150 ## $a1 = 00000150
/* 0019C 80897B0C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 001A0 80897B10 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 001A4 80897B14 03E00008 */ jr $ra
/* 001A8 80897B18 00000000 */ nop

View file

@ -1,13 +0,0 @@
glabel BgJyaGoroiwa_Draw
/* 005B4 80897F24 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 005B8 80897F28 AFA40018 */ sw $a0, 0x0018($sp)
/* 005BC 80897F2C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 005C0 80897F30 AFBF0014 */ sw $ra, 0x0014($sp)
/* 005C4 80897F34 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000
/* 005C8 80897F38 0C00D498 */ jal Gfx_DrawDListOpa
/* 005CC 80897F3C 24A506B0 */ addiu $a1, $a1, 0x06B0 ## $a1 = 060006B0
/* 005D0 80897F40 8FBF0014 */ lw $ra, 0x0014($sp)
/* 005D4 80897F44 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 005D8 80897F48 03E00008 */ jr $ra
/* 005DC 80897F4C 00000000 */ nop

View file

@ -1,39 +0,0 @@
glabel BgJyaGoroiwa_Init
/* 000F4 80897A64 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 000F8 80897A68 AFA50024 */ sw $a1, 0x0024($sp)
/* 000FC 80897A6C AFBF001C */ sw $ra, 0x001C($sp)
/* 00100 80897A70 AFB00018 */ sw $s0, 0x0018($sp)
/* 00104 80897A74 3C058089 */ lui $a1, %hi(D_80897FAC) ## $a1 = 80890000
/* 00108 80897A78 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0010C 80897A7C 0C01E037 */ jal Actor_ProcessInitChain
/* 00110 80897A80 24A57FAC */ addiu $a1, $a1, %lo(D_80897FAC) ## $a1 = 80897FAC
/* 00114 80897A84 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00118 80897A88 0C225E70 */ jal func_808979C0
/* 0011C 80897A8C 8FA50024 */ lw $a1, 0x0024($sp)
/* 00120 80897A90 A60000B8 */ sh $zero, 0x00B8($s0) ## 000000B8
/* 00124 80897A94 860200B8 */ lh $v0, 0x00B8($s0) ## 000000B8
/* 00128 80897A98 3C068089 */ lui $a2, %hi(D_80897FA4) ## $a2 = 80890000
/* 0012C 80897A9C 24C67FA4 */ addiu $a2, $a2, %lo(D_80897FA4) ## $a2 = 80897FA4
/* 00130 80897AA0 26040098 */ addiu $a0, $s0, 0x0098 ## $a0 = 00000098
/* 00134 80897AA4 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00138 80897AA8 A60200B6 */ sh $v0, 0x00B6($s0) ## 000000B6
/* 0013C 80897AAC 0C0187B5 */ jal func_80061ED4
/* 00140 80897AB0 A60200B4 */ sh $v0, 0x00B4($s0) ## 000000B4
/* 00144 80897AB4 3C054414 */ lui $a1, 0x4414 ## $a1 = 44140000
/* 00148 80897AB8 3C068003 */ lui $a2, %hi(ActorShadow_DrawFunc_Circle)
/* 0014C 80897ABC 24C6B5EC */ addiu $a2, %lo(ActorShadow_DrawFunc_Circle)
/* 00150 80897AC0 34A5C000 */ ori $a1, $a1, 0xC000 ## $a1 = 4414C000
/* 00154 80897AC4 260400B4 */ addiu $a0, $s0, 0x00B4 ## $a0 = 000000B4
/* 00158 80897AC8 0C00AC78 */ jal ActorShape_Init
/* 0015C 80897ACC 3C074110 */ lui $a3, 0x4110 ## $a3 = 41100000
/* 00160 80897AD0 240E0080 */ addiu $t6, $zero, 0x0080 ## $t6 = 00000080
/* 00164 80897AD4 A20E00C8 */ sb $t6, 0x00C8($s0) ## 000000C8
/* 00168 80897AD8 0C225EC7 */ jal func_80897B1C
/* 0016C 80897ADC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00170 80897AE0 8FBF001C */ lw $ra, 0x001C($sp)
/* 00174 80897AE4 8FB00018 */ lw $s0, 0x0018($sp)
/* 00178 80897AE8 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 0017C 80897AEC 03E00008 */ jr $ra
/* 00180 80897AF0 00000000 */ nop

View file

@ -1,62 +0,0 @@
glabel BgJyaGoroiwa_Update
/* 004D0 80897E40 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8
/* 004D4 80897E44 AFBF0024 */ sw $ra, 0x0024($sp)
/* 004D8 80897E48 AFB10020 */ sw $s1, 0x0020($sp)
/* 004DC 80897E4C AFB0001C */ sw $s0, 0x001C($sp)
/* 004E0 80897E50 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 004E4 80897E54 3C013000 */ lui $at, 0x3000 ## $at = 30000000
/* 004E8 80897E58 342100C0 */ ori $at, $at, 0x00C0 ## $at = 300000C0
/* 004EC 80897E5C 8C4E067C */ lw $t6, 0x067C($v0) ## 0000067C
/* 004F0 80897E60 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 004F4 80897E64 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 004F8 80897E68 01C17824 */ and $t7, $t6, $at
/* 004FC 80897E6C 55E00029 */ bnel $t7, $zero, .L80897F14
/* 00500 80897E70 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00504 80897E74 8E19014C */ lw $t9, 0x014C($s0) ## 0000014C
/* 00508 80897E78 0320F809 */ jalr $ra, $t9
/* 0050C 80897E7C 00000000 */ nop
/* 00510 80897E80 0C225E8B */ jal func_80897A2C
/* 00514 80897E84 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00518 80897E88 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
/* 0051C 80897E8C 3C01426E */ lui $at, 0x426E ## $at = 426E0000
/* 00520 80897E90 44814000 */ mtc1 $at, $f8 ## $f8 = 59.50
/* 00524 80897E94 E7A4002C */ swc1 $f4, 0x002C($sp)
/* 00528 80897E98 C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028
/* 0052C 80897E9C 27B8002C */ addiu $t8, $sp, 0x002C ## $t8 = FFFFFFE4
/* 00530 80897EA0 262407C0 */ addiu $a0, $s1, 0x07C0 ## $a0 = 000007C0
/* 00534 80897EA4 46083280 */ add.s $f10, $f6, $f8
/* 00538 80897EA8 26050078 */ addiu $a1, $s0, 0x0078 ## $a1 = 00000078
/* 0053C 80897EAC 27A60038 */ addiu $a2, $sp, 0x0038 ## $a2 = FFFFFFF0
/* 00540 80897EB0 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000
/* 00544 80897EB4 E7AA0030 */ swc1 $f10, 0x0030($sp)
/* 00548 80897EB8 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C
/* 0054C 80897EBC AFB80010 */ sw $t8, 0x0010($sp)
/* 00550 80897EC0 0C00F269 */ jal func_8003C9A4
/* 00554 80897EC4 E7B00034 */ swc1 $f16, 0x0034($sp)
/* 00558 80897EC8 E6000080 */ swc1 $f0, 0x0080($s0) ## 00000080
/* 0055C 80897ECC 0C225E5C */ jal func_80897970
/* 00560 80897ED0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00564 80897ED4 92080160 */ lbu $t0, 0x0160($s0) ## 00000160
/* 00568 80897ED8 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 0056C 80897EDC 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 00570 80897EE0 31090001 */ andi $t1, $t0, 0x0001 ## $t1 = 00000000
/* 00574 80897EE4 11200004 */ beq $t1, $zero, .L80897EF8
/* 00578 80897EE8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0057C 80897EEC 02212821 */ addu $a1, $s1, $at
/* 00580 80897EF0 0C0175E7 */ jal CollisionCheck_SetAT
## CollisionCheck_setAT
/* 00584 80897EF4 26060150 */ addiu $a2, $s0, 0x0150 ## $a2 = 00000150
.L80897EF8:
/* 00588 80897EF8 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 0058C 80897EFC 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 00590 80897F00 02212821 */ addu $a1, $s1, $at
/* 00594 80897F04 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00598 80897F08 0C017713 */ jal CollisionCheck_SetOC
## CollisionCheck_setOT
/* 0059C 80897F0C 26060150 */ addiu $a2, $s0, 0x0150 ## $a2 = 00000150
/* 005A0 80897F10 8FBF0024 */ lw $ra, 0x0024($sp)
.L80897F14:
/* 005A4 80897F14 8FB0001C */ lw $s0, 0x001C($sp)
/* 005A8 80897F18 8FB10020 */ lw $s1, 0x0020($sp)
/* 005AC 80897F1C 03E00008 */ jr $ra
/* 005B0 80897F20 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000

View file

@ -1,21 +0,0 @@
glabel func_80897970
/* 00000 80897970 C4840024 */ lwc1 $f4, 0x0024($a0) ## 00000024
/* 00004 80897974 8C82016C */ lw $v0, 0x016C($a0) ## 0000016C
/* 00008 80897978 3C01426E */ lui $at, 0x426E ## $at = 426E0000
/* 0000C 8089797C 4600218D */ trunc.w.s $f6, $f4
/* 00010 80897980 44815000 */ mtc1 $at, $f10 ## $f10 = 59.50
/* 00014 80897984 24420030 */ addiu $v0, $v0, 0x0030 ## $v0 = 00000030
/* 00018 80897988 440F3000 */ mfc1 $t7, $f6
/* 0001C 8089798C 00000000 */ nop
/* 00020 80897990 A44F0000 */ sh $t7, 0x0000($v0) ## 00000030
/* 00024 80897994 C4880028 */ lwc1 $f8, 0x0028($a0) ## 00000028
/* 00028 80897998 460A4400 */ add.s $f16, $f8, $f10
/* 0002C 8089799C 4600848D */ trunc.w.s $f18, $f16
/* 00030 808979A0 44199000 */ mfc1 $t9, $f18
/* 00034 808979A4 00000000 */ nop
/* 00038 808979A8 A4590002 */ sh $t9, 0x0002($v0) ## 00000032
/* 0003C 808979AC C484002C */ lwc1 $f4, 0x002C($a0) ## 0000002C
/* 00040 808979B0 4600218D */ trunc.w.s $f6, $f4
/* 00044 808979B4 44093000 */ mfc1 $t1, $f6
/* 00048 808979B8 03E00008 */ jr $ra
/* 0004C 808979BC A4490004 */ sh $t1, 0x0004($v0) ## 00000034

View file

@ -1,28 +0,0 @@
glabel func_808979C0
/* 00050 808979C0 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 00054 808979C4 AFB00020 */ sw $s0, 0x0020($sp)
/* 00058 808979C8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0005C 808979CC AFA50034 */ sw $a1, 0x0034($sp)
/* 00060 808979D0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00064 808979D4 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00068 808979D8 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150
/* 0006C 808979DC 0C016EFE */ jal Collider_InitJntSph
/* 00070 808979E0 AFA50028 */ sw $a1, 0x0028($sp)
/* 00074 808979E4 3C078089 */ lui $a3, %hi(D_80897F94) ## $a3 = 80890000
/* 00078 808979E8 260E0170 */ addiu $t6, $s0, 0x0170 ## $t6 = 00000170
/* 0007C 808979EC 8FA50028 */ lw $a1, 0x0028($sp)
/* 00080 808979F0 AFAE0010 */ sw $t6, 0x0010($sp)
/* 00084 808979F4 24E77F94 */ addiu $a3, $a3, %lo(D_80897F94) ## $a3 = 80897F94
/* 00088 808979F8 8FA40034 */ lw $a0, 0x0034($sp)
/* 0008C 808979FC 0C017014 */ jal Collider_SetJntSph
/* 00090 80897A00 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00094 80897A04 0C225E5C */ jal func_80897970
/* 00098 80897A08 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0009C 80897A0C 8E18016C */ lw $t8, 0x016C($s0) ## 0000016C
/* 000A0 80897A10 240F003A */ addiu $t7, $zero, 0x003A ## $t7 = 0000003A
/* 000A4 80897A14 A70F0036 */ sh $t7, 0x0036($t8) ## 00000036
/* 000A8 80897A18 8FBF0024 */ lw $ra, 0x0024($sp)
/* 000AC 80897A1C 8FB00020 */ lw $s0, 0x0020($sp)
/* 000B0 80897A20 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
/* 000B4 80897A24 03E00008 */ jr $ra
/* 000B8 80897A28 00000000 */ nop

View file

@ -1,20 +0,0 @@
.late_rodata
glabel D_80897FC0
.word 0x432F4CEB
.text
glabel func_80897A2C
/* 000BC 80897A2C C4840024 */ lwc1 $f4, 0x0024($a0) ## 00000024
/* 000C0 80897A30 C4860100 */ lwc1 $f6, 0x0100($a0) ## 00000100
/* 000C4 80897A34 848E00B8 */ lh $t6, 0x00B8($a0) ## 000000B8
/* 000C8 80897A38 3C018089 */ lui $at, %hi(D_80897FC0) ## $at = 80890000
/* 000CC 80897A3C 46062001 */ sub.s $f0, $f4, $f6
/* 000D0 80897A40 C4307FC0 */ lwc1 $f16, %lo(D_80897FC0)($at)
/* 000D4 80897A44 448E4000 */ mtc1 $t6, $f8 ## $f8 = 0.00
/* 000D8 80897A48 46008482 */ mul.s $f18, $f16, $f0
/* 000DC 80897A4C 468042A0 */ cvt.s.w $f10, $f8
/* 000E0 80897A50 46125101 */ sub.s $f4, $f10, $f18
/* 000E4 80897A54 4600218D */ trunc.w.s $f6, $f4
/* 000E8 80897A58 44183000 */ mfc1 $t8, $f6
/* 000EC 80897A5C 03E00008 */ jr $ra
/* 000F0 80897A60 A49800B8 */ sh $t8, 0x00B8($a0) ## 000000B8

View file

@ -1,12 +0,0 @@
glabel func_80897B1C
/* 001AC 80897B1C 908F0160 */ lbu $t7, 0x0160($a0) ## 00000160
/* 001B0 80897B20 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 001B4 80897B24 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00
/* 001B8 80897B28 3C0E8089 */ lui $t6, %hi(func_80897B48) ## $t6 = 80890000
/* 001BC 80897B2C 25CE7B48 */ addiu $t6, $t6, %lo(func_80897B48) ## $t6 = 80897B48
/* 001C0 80897B30 35F80001 */ ori $t8, $t7, 0x0001 ## $t8 = 00000001
/* 001C4 80897B34 AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C
/* 001C8 80897B38 A0980160 */ sb $t8, 0x0160($a0) ## 00000160
/* 001CC 80897B3C A48001B4 */ sh $zero, 0x01B4($a0) ## 000001B4
/* 001D0 80897B40 03E00008 */ jr $ra
/* 001D4 80897B44 E48401B0 */ swc1 $f4, 0x01B0($a0) ## 000001B0

View file

@ -1,203 +0,0 @@
.late_rodata
glabel D_80897FC4
.float 0.01
glabel D_80897FC8
.word 0x44B74000
glabel D_80897FCC
.word 0x44D12000
glabel D_80897FD0
.word 0xC3018000
glabel D_80897FD4
.word 0x44C42000
glabel D_80897FD8
.word 0x3EC2C859
glabel D_80897FDC
.word 0x43018000
glabel D_80897FE0
.word 0x4414C000
glabel D_80897FE4
.word 0x44DA2000
glabel D_80897FE8
.word 0x44AE2000
.text
glabel func_80897B48
/* 001D8 80897B48 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 001DC 80897B4C 3C018089 */ lui $at, %hi(D_80897FC4) ## $at = 80890000
/* 001E0 80897B50 C4207FC4 */ lwc1 $f0, %lo(D_80897FC4)($at)
/* 001E4 80897B54 AFBF0024 */ sw $ra, 0x0024($sp)
/* 001E8 80897B58 AFB00020 */ sw $s0, 0x0020($sp)
/* 001EC 80897B5C AFA5002C */ sw $a1, 0x002C($sp)
/* 001F0 80897B60 3C01C2C8 */ lui $at, 0xC2C8 ## $at = C2C80000
/* 001F4 80897B64 44812000 */ mtc1 $at, $f4 ## $f4 = -100.00
/* 001F8 80897B68 C4860028 */ lwc1 $f6, 0x0028($a0) ## 00000028
/* 001FC 80897B6C 3C014020 */ lui $at, 0x4020 ## $at = 40200000
/* 00200 80897B70 44815000 */ mtc1 $at, $f10 ## $f10 = 2.50
/* 00204 80897B74 46062201 */ sub.s $f8, $f4, $f6
/* 00208 80897B78 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0020C 80897B7C 460A4082 */ mul.s $f2, $f8, $f10
/* 00210 80897B80 4600103C */ c.lt.s $f2, $f0
/* 00214 80897B84 00000000 */ nop
/* 00218 80897B88 45020003 */ bc1fl .L80897B98
/* 0021C 80897B8C 46001004 */ sqrt.s $f0, $f2
/* 00220 80897B90 46000086 */ mov.s $f2, $f0
/* 00224 80897B94 46001004 */ sqrt.s $f0, $f2
.L80897B98:
/* 00228 80897B98 C61001B0 */ lwc1 $f16, 0x01B0($s0) ## 000001B0
/* 0022C 80897B9C 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 00230 80897BA0 46100482 */ mul.s $f18, $f0, $f16
/* 00234 80897BA4 0C01DE1C */ jal Math_Sins
## sins?
/* 00238 80897BA8 E6120068 */ swc1 $f18, 0x0068($s0) ## 00000068
/* 0023C 80897BAC C6040068 */ lwc1 $f4, 0x0068($s0) ## 00000068
/* 00240 80897BB0 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 00244 80897BB4 46040182 */ mul.s $f6, $f0, $f4
/* 00248 80897BB8 0C01DE0D */ jal Math_Coss
## coss?
/* 0024C 80897BBC E606005C */ swc1 $f6, 0x005C($s0) ## 0000005C
/* 00250 80897BC0 C6080068 */ lwc1 $f8, 0x0068($s0) ## 00000068
/* 00254 80897BC4 C60A0024 */ lwc1 $f10, 0x0024($s0) ## 00000024
/* 00258 80897BC8 C610005C */ lwc1 $f16, 0x005C($s0) ## 0000005C
/* 0025C 80897BCC 46080302 */ mul.s $f12, $f0, $f8
/* 00260 80897BD0 C604002C */ lwc1 $f4, 0x002C($s0) ## 0000002C
/* 00264 80897BD4 46105480 */ add.s $f18, $f10, $f16
/* 00268 80897BD8 3C018089 */ lui $at, %hi(D_80897FC8) ## $at = 80890000
/* 0026C 80897BDC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00270 80897BE0 3C064000 */ lui $a2, 0x4000 ## $a2 = 40000000
/* 00274 80897BE4 E6120024 */ swc1 $f18, 0x0024($s0) ## 00000024
/* 00278 80897BE8 460C2180 */ add.s $f6, $f4, $f12
/* 0027C 80897BEC E60C0064 */ swc1 $f12, 0x0064($s0) ## 00000064
/* 00280 80897BF0 C6020024 */ lwc1 $f2, 0x0024($s0) ## 00000024
/* 00284 80897BF4 E606002C */ swc1 $f6, 0x002C($s0) ## 0000002C
/* 00288 80897BF8 C4287FC8 */ lwc1 $f8, %lo(D_80897FC8)($at)
/* 0028C 80897BFC 3C018089 */ lui $at, %hi(D_80897FCC) ## $at = 80890000
/* 00290 80897C00 4602403C */ c.lt.s $f8, $f2
/* 00294 80897C04 00000000 */ nop
/* 00298 80897C08 4500000A */ bc1f .L80897C34
/* 0029C 80897C0C 00000000 */ nop
/* 002A0 80897C10 C42A7FCC */ lwc1 $f10, %lo(D_80897FCC)($at)
/* 002A4 80897C14 3C018089 */ lui $at, %hi(D_80897FD0) ## $at = 80890000
/* 002A8 80897C18 460A103C */ c.lt.s $f2, $f10
/* 002AC 80897C1C 00000000 */ nop
/* 002B0 80897C20 45000004 */ bc1f .L80897C34
/* 002B4 80897C24 00000000 */ nop
/* 002B8 80897C28 C4307FD0 */ lwc1 $f16, %lo(D_80897FD0)($at)
/* 002BC 80897C2C 1000000F */ beq $zero, $zero, .L80897C6C
/* 002C0 80897C30 E6100028 */ swc1 $f16, 0x0028($s0) ## 00000028
.L80897C34:
/* 002C4 80897C34 3C018089 */ lui $at, %hi(D_80897FD4) ## $at = 80890000
/* 002C8 80897C38 C4327FD4 */ lwc1 $f18, %lo(D_80897FD4)($at)
/* 002CC 80897C3C 3C018089 */ lui $at, %hi(D_80897FD8) ## $at = 80890000
/* 002D0 80897C40 C4247FD8 */ lwc1 $f4, %lo(D_80897FD8)($at)
/* 002D4 80897C44 46029301 */ sub.s $f12, $f18, $f2
/* 002D8 80897C48 3C0142CE */ lui $at, 0x42CE ## $at = 42CE0000
/* 002DC 80897C4C 44813000 */ mtc1 $at, $f6 ## $f6 = 103.00
/* 002E0 80897C50 3C018089 */ lui $at, %hi(D_80897FDC) ## $at = 80890000
/* 002E4 80897C54 46006005 */ abs.s $f0, $f12
/* 002E8 80897C58 C4307FDC */ lwc1 $f16, %lo(D_80897FDC)($at)
/* 002EC 80897C5C 46060201 */ sub.s $f8, $f0, $f6
/* 002F0 80897C60 46082282 */ mul.s $f10, $f4, $f8
/* 002F4 80897C64 46105481 */ sub.s $f18, $f10, $f16
/* 002F8 80897C68 E6120028 */ swc1 $f18, 0x0028($s0) ## 00000028
.L80897C6C:
/* 002FC 80897C6C 92020160 */ lbu $v0, 0x0160($s0) ## 00000160
/* 00300 80897C70 304E0002 */ andi $t6, $v0, 0x0002 ## $t6 = 00000000
/* 00304 80897C74 51C00022 */ beql $t6, $zero, .L80897D00
/* 00308 80897C78 860901B4 */ lh $t1, 0x01B4($s0) ## 000001B4
/* 0030C 80897C7C 8607008A */ lh $a3, 0x008A($s0) ## 0000008A
/* 00310 80897C80 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 00314 80897C84 304FFFFC */ andi $t7, $v0, 0xFFFC ## $t7 = 00000000
/* 00318 80897C88 44803000 */ mtc1 $zero, $f6 ## $f6 = 0.00
/* 0031C 80897C8C 00E41823 */ subu $v1, $a3, $a0
/* 00320 80897C90 00031C00 */ sll $v1, $v1, 16
/* 00324 80897C94 00031C03 */ sra $v1, $v1, 16
/* 00328 80897C98 2861C001 */ slti $at, $v1, 0xC001
/* 0032C 80897C9C 14200007 */ bne $at, $zero, .L80897CBC
/* 00330 80897CA0 A20F0160 */ sb $t7, 0x0160($s0) ## 00000160
/* 00334 80897CA4 28614000 */ slti $at, $v1, 0x4000
/* 00338 80897CA8 10200004 */ beq $at, $zero, .L80897CBC
/* 0033C 80897CAC 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000
/* 00340 80897CB0 0081C021 */ addu $t8, $a0, $at
/* 00344 80897CB4 A6180032 */ sh $t8, 0x0032($s0) ## 00000032
/* 00348 80897CB8 8607008A */ lh $a3, 0x008A($s0) ## 0000008A
.L80897CBC:
/* 0034C 80897CBC 8FA4002C */ lw $a0, 0x002C($sp)
/* 00350 80897CC0 E7A60010 */ swc1 $f6, 0x0010($sp)
/* 00354 80897CC4 0C00BDB5 */ jal func_8002F6D4
/* 00358 80897CC8 AFA00014 */ sw $zero, 0x0014($sp)
/* 0035C 80897CCC 8FB9002C */ lw $t9, 0x002C($sp)
/* 00360 80897CD0 2405083E */ addiu $a1, $zero, 0x083E ## $a1 = 0000083E
/* 00364 80897CD4 0C00BDF7 */ jal func_8002F7DC
/* 00368 80897CD8 8F241C44 */ lw $a0, 0x1C44($t9) ## 00001C44
/* 0036C 80897CDC 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 00370 80897CE0 44812000 */ mtc1 $at, $f4 ## $f4 = 10.00
/* 00374 80897CE4 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
/* 00378 80897CE8 44814000 */ mtc1 $at, $f8 ## $f8 = 0.50
/* 0037C 80897CEC 24080001 */ addiu $t0, $zero, 0x0001 ## $t0 = 00000001
/* 00380 80897CF0 A60801B4 */ sh $t0, 0x01B4($s0) ## 000001B4
/* 00384 80897CF4 E60401B8 */ swc1 $f4, 0x01B8($s0) ## 000001B8
/* 00388 80897CF8 E60801B0 */ swc1 $f8, 0x01B0($s0) ## 000001B0
/* 0038C 80897CFC 860901B4 */ lh $t1, 0x01B4($s0) ## 000001B4
.L80897D00:
/* 00390 80897D00 260401B0 */ addiu $a0, $s0, 0x01B0 ## $a0 = 000001B0
/* 00394 80897D04 3C053F80 */ lui $a1, 0x3F80 ## $a1 = 3F800000
/* 00398 80897D08 11200019 */ beq $t1, $zero, .L80897D70
/* 0039C 80897D0C 3C063D23 */ lui $a2, 0x3D23 ## $a2 = 3D230000
/* 003A0 80897D10 3C018089 */ lui $at, %hi(D_80897FE0) ## $at = 80890000
/* 003A4 80897D14 C4207FE0 */ lwc1 $f0, %lo(D_80897FE0)($at)
/* 003A8 80897D18 3C013FC0 */ lui $at, 0x3FC0 ## $at = 3FC00000
/* 003AC 80897D1C 44818000 */ mtc1 $at, $f16 ## $f16 = 1.50
/* 003B0 80897D20 C60A01B8 */ lwc1 $f10, 0x01B8($s0) ## 000001B8
/* 003B4 80897D24 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 003B8 80897D28 44812000 */ mtc1 $at, $f4 ## $f4 = 10.00
/* 003BC 80897D2C 46105481 */ sub.s $f18, $f10, $f16
/* 003C0 80897D30 C60A00BC */ lwc1 $f10, 0x00BC($s0) ## 000000BC
/* 003C4 80897D34 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 003C8 80897D38 E61201B8 */ swc1 $f18, 0x01B8($s0) ## 000001B8
/* 003CC 80897D3C C60601B8 */ lwc1 $f6, 0x01B8($s0) ## 000001B8
/* 003D0 80897D40 46043202 */ mul.s $f8, $f6, $f4
/* 003D4 80897D44 46085400 */ add.s $f16, $f10, $f8
/* 003D8 80897D48 E61000BC */ swc1 $f16, 0x00BC($s0) ## 000000BC
/* 003DC 80897D4C C61200BC */ lwc1 $f18, 0x00BC($s0) ## 000000BC
/* 003E0 80897D50 4600903C */ c.lt.s $f18, $f0
/* 003E4 80897D54 00000000 */ nop
/* 003E8 80897D58 45000007 */ bc1f .L80897D78
/* 003EC 80897D5C 00000000 */ nop
/* 003F0 80897D60 0C225F77 */ jal func_80897DDC
/* 003F4 80897D64 E60000BC */ swc1 $f0, 0x00BC($s0) ## 000000BC
/* 003F8 80897D68 10000003 */ beq $zero, $zero, .L80897D78
/* 003FC 80897D6C 00000000 */ nop
.L80897D70:
/* 00400 80897D70 0C01DE80 */ jal Math_ApproxF
/* 00404 80897D74 34C6D70A */ ori $a2, $a2, 0xD70A ## $a2 = 0000D70A
.L80897D78:
/* 00408 80897D78 3C018089 */ lui $at, %hi(D_80897FE4) ## $at = 80890000
/* 0040C 80897D7C C4267FE4 */ lwc1 $f6, %lo(D_80897FE4)($at)
/* 00410 80897D80 C6020024 */ lwc1 $f2, 0x0024($s0) ## 00000024
/* 00414 80897D84 240AC000 */ addiu $t2, $zero, 0xC000 ## $t2 = FFFFC000
/* 00418 80897D88 3C018089 */ lui $at, %hi(D_80897FE8) ## $at = 80890000
/* 0041C 80897D8C 4602303C */ c.lt.s $f6, $f2
/* 00420 80897D90 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00424 80897D94 45000003 */ bc1f .L80897DA4
/* 00428 80897D98 00000000 */ nop
/* 0042C 80897D9C 10000008 */ beq $zero, $zero, .L80897DC0
/* 00430 80897DA0 A60A0032 */ sh $t2, 0x0032($s0) ## 00000032
.L80897DA4:
/* 00434 80897DA4 C4247FE8 */ lwc1 $f4, %lo(D_80897FE8)($at)
/* 00438 80897DA8 240B4000 */ addiu $t3, $zero, 0x4000 ## $t3 = 00004000
/* 0043C 80897DAC 4604103C */ c.lt.s $f2, $f4
/* 00440 80897DB0 00000000 */ nop
/* 00444 80897DB4 45000002 */ bc1f .L80897DC0
/* 00448 80897DB8 00000000 */ nop
/* 0044C 80897DBC A60B0032 */ sh $t3, 0x0032($s0) ## 00000032
.L80897DC0:
/* 00450 80897DC0 0C00BE0A */ jal Audio_PlayActorSound2
/* 00454 80897DC4 240520B8 */ addiu $a1, $zero, 0x20B8 ## $a1 = 000020B8
/* 00458 80897DC8 8FBF0024 */ lw $ra, 0x0024($sp)
/* 0045C 80897DCC 8FB00020 */ lw $s0, 0x0020($sp)
/* 00460 80897DD0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 00464 80897DD4 03E00008 */ jr $ra
/* 00468 80897DD8 00000000 */ nop

View file

@ -1,6 +0,0 @@
glabel func_80897DDC
/* 0046C 80897DDC 3C0E8089 */ lui $t6, %hi(func_80897DF0) ## $t6 = 80890000
/* 00470 80897DE0 25CE7DF0 */ addiu $t6, $t6, %lo(func_80897DF0) ## $t6 = 80897DF0
/* 00474 80897DE4 AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C
/* 00478 80897DE8 03E00008 */ jr $ra
/* 0047C 80897DEC A48001B6 */ sh $zero, 0x01B6($a0) ## 000001B6

View file

@ -1,27 +0,0 @@
.late_rodata
glabel D_80897FEC
.float 0.1
.text
glabel func_80897DF0
/* 00480 80897DF0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00484 80897DF4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00488 80897DF8 AFA5001C */ sw $a1, 0x001C($sp)
/* 0048C 80897DFC 848E01B6 */ lh $t6, 0x01B6($a0) ## 000001B6
/* 00490 80897E00 25CF0001 */ addiu $t7, $t6, 0x0001 ## $t7 = 00000001
/* 00494 80897E04 A48F01B6 */ sh $t7, 0x01B6($a0) ## 000001B6
/* 00498 80897E08 849801B6 */ lh $t8, 0x01B6($a0) ## 000001B6
/* 0049C 80897E0C 2B01003D */ slti $at, $t8, 0x003D
/* 004A0 80897E10 54200008 */ bnel $at, $zero, .L80897E34
/* 004A4 80897E14 8FBF0014 */ lw $ra, 0x0014($sp)
/* 004A8 80897E18 0C225EC7 */ jal func_80897B1C
/* 004AC 80897E1C AFA40018 */ sw $a0, 0x0018($sp)
/* 004B0 80897E20 3C018089 */ lui $at, %hi(D_80897FEC) ## $at = 80890000
/* 004B4 80897E24 8FA40018 */ lw $a0, 0x0018($sp)
/* 004B8 80897E28 C4247FEC */ lwc1 $f4, %lo(D_80897FEC)($at)
/* 004BC 80897E2C E48401B0 */ swc1 $f4, 0x01B0($a0) ## 000001B0
/* 004C0 80897E30 8FBF0014 */ lw $ra, 0x0014($sp)
.L80897E34:
/* 004C4 80897E34 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 004C8 80897E38 03E00008 */ jr $ra
/* 004CC 80897E3C 00000000 */ nop

View file

@ -1,27 +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_Jya_Goroiwa_InitVars
.word 0x00F90600, 0x00000010, 0x011F0000, 0x000001BC
.word BgJyaGoroiwa_Init
.word BgJyaGoroiwa_Destroy
.word BgJyaGoroiwa_Update
.word BgJyaGoroiwa_Draw
glabel D_80897F70
.word 0x00000000, 0x20000000, 0x00040000, 0x00000000, 0x00000000, 0x01000100, 0x00000000, 0x00000000, 0x003A0064
glabel D_80897F94
.word 0x0A110039, 0x20000000, 0x00000001
.word D_80897F70
glabel D_80897FA4
.word 0x0100000F, 0x0000FE00
glabel D_80897FAC
.word 0xC8500064, 0xB0F403E8, 0xB0F801F4, 0x30FC03E8, 0x00000000

View file

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

3
spec
View file

@ -1006,8 +1006,7 @@ endseg
beginseg beginseg
name "ovl_Bg_Jya_Goroiwa" name "ovl_Bg_Jya_Goroiwa"
include "build/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.o" include "build/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.o"
include "build/data/overlays/actors/z_bg_jya_goroiwa.data.o" include "build/src/overlays/actors/ovl_Bg_Jya_Goroiwa/ovl_Bg_Jya_Goroiwa_reloc.o"
include "build/data/overlays/actors/z_bg_jya_goroiwa.reloc.o"
endseg endseg
beginseg beginseg

View file

@ -1,3 +1,10 @@
/*
* File: z_bg_jya_goroiwa.c
* Overlay: ovl_Bg_Jya_Goroiwa
* Description: Rolling Boulder
* moves very slowly in some cases
*/
#include "z_bg_jya_goroiwa.h" #include "z_bg_jya_goroiwa.h"
#define FLAGS 0x00000010 #define FLAGS 0x00000010
@ -9,7 +16,14 @@ void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx); void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx);
void BgJyaGoroiwa_Draw(Actor* thisx, GlobalContext* globalCtx); void BgJyaGoroiwa_Draw(Actor* thisx, GlobalContext* globalCtx);
/* void func_80897DF0(BgJyaGoroiwa* this, GlobalContext* globalCtx);
void func_80897B48(BgJyaGoroiwa* this, GlobalContext* globalCtx);
void func_80897DDC(BgJyaGoroiwa* this);
void func_80897B1C(BgJyaGoroiwa* this);
void func_80897A2C(BgJyaGoroiwa* this);
void func_80897970(BgJyaGoroiwa* this);
const ActorInit Bg_Jya_Goroiwa_InitVars = { const ActorInit Bg_Jya_Goroiwa_InitVars = {
ACTOR_BG_JYA_GOROIWA, ACTOR_BG_JYA_GOROIWA,
ACTORTYPE_PROP, ACTORTYPE_PROP,
@ -21,25 +35,181 @@ const ActorInit Bg_Jya_Goroiwa_InitVars = {
(ActorFunc)BgJyaGoroiwa_Update, (ActorFunc)BgJyaGoroiwa_Update,
(ActorFunc)BgJyaGoroiwa_Draw, (ActorFunc)BgJyaGoroiwa_Draw,
}; };
*/ extern Gfx D_060006B0[];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/func_80897970.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/func_808979C0.s") static ColliderJntSphItemInit sJntSphItemsInit[] = {
{
{ 0x00, { 0x20000000, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x01 },
{ 0, { { 0, 0, 0 }, 58 }, 100 },
},
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/func_80897A2C.s") static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x39, 0x20, COLSHAPE_JNTSPH },
1,
sJntSphItemsInit,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/BgJyaGoroiwa_Init.s") static CollisionCheckInfoInit sColChkInfoInit = { 0x01, 0xF, 0x0, 0xFE };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/BgJyaGoroiwa_Destroy.s") static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/func_80897B1C.s") void func_80897970(BgJyaGoroiwa* this) {
Sphere16* worldSphere = &this->collider.list->dim.worldSphere;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/func_80897B48.s") worldSphere->center.x = this->actor.posRot.pos.x;
worldSphere->center.y = (s32)(this->actor.posRot.pos.y + 59.5f);
worldSphere->center.z = this->actor.posRot.pos.z;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/func_80897DDC.s") void func_808979C0(BgJyaGoroiwa* this, GlobalContext* globalCtx) {
s32 pad;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/func_80897DF0.s") Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, &this->colliderItem);
func_80897970(this);
this->collider.list->dim.worldSphere.radius = 0x3A;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/BgJyaGoroiwa_Update.s") void func_80897A2C(BgJyaGoroiwa* this) {
Actor* thisx = &this->actor;
f32 rotFactor = 175.30046f;
f32 posDiff = thisx->posRot.pos.x - thisx->pos4.x;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Goroiwa/BgJyaGoroiwa_Draw.s") thisx->shape.rot.z -= rotFactor * posDiff;
}
void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaGoroiwa* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
func_808979C0(this, globalCtx);
this->actor.shape.rot.z = 0;
this->actor.shape.rot.y = this->actor.shape.rot.z;
this->actor.shape.rot.x = this->actor.shape.rot.z;
func_80061ED4(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
ActorShape_Init(&this->actor.shape, 595.0f, &ActorShadow_DrawFunc_Circle, 9.0f);
this->actor.shape.unk_14 = 0x80;
func_80897B1C(this);
}
void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgJyaGoroiwa* this = THIS;
Collider_DestroyJntSph(globalCtx, &this->collider);
}
void func_80897B1C(BgJyaGoroiwa* this) {
this->actionFunc = func_80897B48;
this->collider.base.atFlags = this->collider.base.atFlags | 1;
this->unk_1B4 = 0;
this->unk_1B0 = 1.0f;
}
void func_80897B48(BgJyaGoroiwa* this, GlobalContext* globalCtx) {
Actor* thisx = &this->actor;
f32 tmpf2;
s16 tmp16;
f32 tmpf1 = (-100.0f - thisx->posRot.pos.y) * 2.5f;
if (tmpf1 < 0.01f) {
tmpf1 = 0.01f;
}
thisx->speedXZ = (sqrtf(tmpf1) * this->unk_1B0);
thisx->velocity.x = (Math_Sins(thisx->posRot.rot.y) * thisx->speedXZ);
tmpf2 = Math_Coss(thisx->posRot.rot.y) * thisx->speedXZ;
thisx->velocity.z = tmpf2;
thisx->posRot.pos.x = thisx->posRot.pos.x + thisx->velocity.x;
thisx->posRot.pos.z = thisx->posRot.pos.z + tmpf2;
if ((1466.0f < thisx->posRot.pos.x) && (thisx->posRot.pos.x < 1673.0f)) {
thisx->posRot.pos.y = -129.5f;
} else {
tmpf2 = 1569.0f - thisx->posRot.pos.x;
tmpf1 = fabsf(tmpf2) - 103.0f;
thisx->posRot.pos.y = (0.38043478f * tmpf1) - 129.5f;
}
if (this->collider.base.atFlags & 2) {
this->collider.base.atFlags &= ~3;
tmp16 = thisx->yawTowardsLink - thisx->posRot.rot.y;
if ((tmp16 >= -0x3FFF) && (tmp16 < 0x4000)) {
thisx->posRot.rot.y += 0x8000;
}
func_8002F6D4(globalCtx, thisx, 2.0f, thisx->yawTowardsLink, 0.0f, 0);
func_8002F7DC(&PLAYER->actor, NA_SE_PL_BODY_HIT);
this->unk_1B8 = 10.0f;
this->unk_1B0 = 0.5f;
this->unk_1B4 = 1;
}
if (this->unk_1B4) {
this->unk_1B8 -= 1.5f;
thisx->shape.unk_08 += this->unk_1B8 * 10.0f;
if (thisx->shape.unk_08 < 595.0f) {
thisx->shape.unk_08 = 595.0f;
func_80897DDC(this);
}
} else {
Math_ApproxF(&this->unk_1B0, 1.0f, 0.04f);
}
if (thisx->posRot.pos.x > 1745.0f) {
thisx->posRot.rot.y = -0x4000;
} else if (thisx->posRot.pos.x < 1393.0f) {
thisx->posRot.rot.y = 0x4000;
}
Audio_PlayActorSound2(thisx, NA_SE_EV_BIGBALL_ROLL - SFX_FLAG);
}
void func_80897DDC(BgJyaGoroiwa* this) {
this->actionFunc = func_80897DF0;
this->unk_1B6 = 0;
}
void func_80897DF0(BgJyaGoroiwa* this, GlobalContext* globalCtx) {
this->unk_1B6++;
if (this->unk_1B6 >= 0x3D) {
func_80897B1C(this);
this->unk_1B0 = 0.1f;
}
}
void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
Player* player = PLAYER;
s32 pad;
BgJyaGoroiwa* this = THIS;
UNK_PTR sp38;
Vec3f pos;
if (!(player->stateFlags1 & 0x300000C0)) {
this->actionFunc(this, globalCtx);
func_80897A2C(this);
pos.x = this->actor.posRot.pos.x;
pos.y = this->actor.posRot.pos.y + 59.5f;
pos.z = this->actor.posRot.pos.z;
this->actor.groundY = func_8003C9A4(&globalCtx->colCtx, &this->actor.floorPoly, &sp38, &this->actor, &pos);
func_80897970(this);
if (this->collider.base.atFlags & 1) {
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
void BgJyaGoroiwa_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaGoroiwa* this = THIS;
Gfx_DrawDListOpa(globalCtx, D_060006B0);
}

View file

@ -6,9 +6,17 @@
struct BgJyaGoroiwa; struct BgJyaGoroiwa;
typedef void (*BgJyaGoroiwaFunc)(struct BgJyaGoroiwa*, GlobalContext*);
typedef struct BgJyaGoroiwa { typedef struct BgJyaGoroiwa {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x70]; /* 0x014C */ BgJyaGoroiwaFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
/* 0x0170 */ ColliderJntSphItem colliderItem;
/* 0x01B0 */ f32 unk_1B0;
/* 0x01B4 */ s16 unk_1B4;
/* 0x01B6 */ s16 unk_1B6;
/* 0x01B8 */ f32 unk_1B8;
} BgJyaGoroiwa; // size = 0x01BC } BgJyaGoroiwa; // size = 0x01BC
extern const ActorInit Bg_Jya_Goroiwa_InitVars; extern const ActorInit Bg_Jya_Goroiwa_InitVars;

View file

@ -846,3 +846,6 @@ D_06001040 = 0x06001040;
// z_en_yukabyun // z_en_yukabyun
D_06000A60 = 0x06000A60; D_06000A60 = 0x06000A60;
D_06000970 = 0x06000970; D_06000970 = 0x06000970;
// z_bg_jya_goroiwa
D_060006B0 = 0x060006B0;