1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00
* EnBx

* Memes

* PR

* PR
This commit is contained in:
Kelebek1 2020-07-20 07:49:42 +01:00 committed by GitHub
parent 741c140aef
commit 00836ddebc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 241 additions and 495 deletions

View File

@ -1,12 +0,0 @@
glabel EnBx_Destroy
/* 00204 809D1CE4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00208 809D1CE8 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 0020C 809D1CEC AFBF0014 */ sw $ra, 0x0014($sp)
/* 00210 809D1CF0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00214 809D1CF4 0C0170EB */ jal Collider_DestroyCylinder
/* 00218 809D1CF8 24C501CC */ addiu $a1, $a2, 0x01CC ## $a1 = 000001CC
/* 0021C 809D1CFC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00220 809D1D00 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00224 809D1D04 03E00008 */ jr $ra
/* 00228 809D1D08 00000000 */ nop

View File

@ -1,147 +0,0 @@
.late_rodata
glabel D_809D25B0
.float 0.01
glabel D_809D25B4
.float 0.03
.text
glabel EnBx_Init
/* 00000 809D1AE0 27BDFFA8 */ addiu $sp, $sp, 0xFFA8 ## $sp = FFFFFFA8
/* 00004 809D1AE4 3C0E809D */ lui $t6, %hi(D_809D250C) ## $t6 = 809D0000
/* 00008 809D1AE8 AFBF001C */ sw $ra, 0x001C($sp)
/* 0000C 809D1AEC AFB10018 */ sw $s1, 0x0018($sp)
/* 00010 809D1AF0 AFB00014 */ sw $s0, 0x0014($sp)
/* 00014 809D1AF4 25CE250C */ addiu $t6, $t6, %lo(D_809D250C) ## $t6 = 809D250C
/* 00018 809D1AF8 8DD80000 */ lw $t8, 0x0000($t6) ## 809D250C
/* 0001C 809D1AFC 27A80048 */ addiu $t0, $sp, 0x0048 ## $t0 = FFFFFFF0
/* 00020 809D1B00 3C0B809D */ lui $t3, %hi(D_809D2518) ## $t3 = 809D0000
/* 00024 809D1B04 AD180000 */ sw $t8, 0x0000($t0) ## FFFFFFF0
/* 00028 809D1B08 8DCF0004 */ lw $t7, 0x0004($t6) ## 809D2510
/* 0002C 809D1B0C 256B2518 */ addiu $t3, $t3, %lo(D_809D2518) ## $t3 = 809D2518
/* 00030 809D1B10 27B9003C */ addiu $t9, $sp, 0x003C ## $t9 = FFFFFFE4
/* 00034 809D1B14 AD0F0004 */ sw $t7, 0x0004($t0) ## FFFFFFF4
/* 00038 809D1B18 8DD80008 */ lw $t8, 0x0008($t6) ## 809D2514
/* 0003C 809D1B1C 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 00040 809D1B20 3C05809D */ lui $a1, %hi(D_809D2524) ## $a1 = 809D0000
/* 00044 809D1B24 AD180008 */ sw $t8, 0x0008($t0) ## FFFFFFF8
/* 00048 809D1B28 8D6D0000 */ lw $t5, 0x0000($t3) ## 809D2518
/* 0004C 809D1B2C 8D6C0004 */ lw $t4, 0x0004($t3) ## 809D251C
/* 00050 809D1B30 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00054 809D1B34 AF2D0000 */ sw $t5, 0x0000($t9) ## FFFFFFE4
/* 00058 809D1B38 8D6D0008 */ lw $t5, 0x0008($t3) ## 809D2520
/* 0005C 809D1B3C 24A52524 */ addiu $a1, $a1, %lo(D_809D2524) ## $a1 = 809D2524
/* 00060 809D1B40 AF2C0004 */ sw $t4, 0x0004($t9) ## FFFFFFE8
/* 00064 809D1B44 0C01E037 */ jal Actor_ProcessInitChain
/* 00068 809D1B48 AF2D0008 */ sw $t5, 0x0008($t9) ## FFFFFFEC
/* 0006C 809D1B4C 3C01809D */ lui $at, %hi(D_809D25B0) ## $at = 809D0000
/* 00070 809D1B50 C42025B0 */ lwc1 $f0, %lo(D_809D25B0)($at)
/* 00074 809D1B54 3C01809D */ lui $at, %hi(D_809D25B4) ## $at = 809D0000
/* 00078 809D1B58 C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028
/* 0007C 809D1B5C E6000058 */ swc1 $f0, 0x0058($s0) ## 00000058
/* 00080 809D1B60 E6000050 */ swc1 $f0, 0x0050($s0) ## 00000050
/* 00084 809D1B64 C42425B4 */ lwc1 $f4, %lo(D_809D25B4)($at)
/* 00088 809D1B68 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000
/* 0008C 809D1B6C 44814000 */ mtc1 $at, $f8 ## $f8 = 100.00
/* 00090 809D1B70 3C01430C */ lui $at, 0x430C ## $at = 430C0000
/* 00094 809D1B74 44810000 */ mtc1 $at, $f0 ## $f0 = 140.00
/* 00098 809D1B78 46083281 */ sub.s $f10, $f6, $f8
/* 0009C 809D1B7C 27A80048 */ addiu $t0, $sp, 0x0048 ## $t0 = FFFFFFF0
/* 000A0 809D1B80 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
/* 000A4 809D1B84 26070024 */ addiu $a3, $s0, 0x0024 ## $a3 = 00000024
/* 000A8 809D1B88 E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028
/* 000AC 809D1B8C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 000B0 809D1B90 26050154 */ addiu $a1, $s0, 0x0154 ## $a1 = 00000154
/* 000B4 809D1B94 26060184 */ addiu $a2, $s0, 0x0184 ## $a2 = 00000184
/* 000B8 809D1B98 240A0004 */ addiu $t2, $zero, 0x0004 ## $t2 = 00000004
/* 000BC 809D1B9C 24090006 */ addiu $t1, $zero, 0x0006 ## $t1 = 00000006
/* 000C0 809D1BA0 E6040054 */ swc1 $f4, 0x0054($s0) ## 00000054
.L809D1BA4:
/* 000C4 809D1BA4 8D0F0000 */ lw $t7, 0x0000($t0) ## FFFFFFF0
/* 000C8 809D1BA8 24620001 */ addiu $v0, $v1, 0x0001 ## $v0 = 00000001
/* 000CC 809D1BAC 44829000 */ mtc1 $v0, $f18 ## $f18 = 0.00
/* 000D0 809D1BB0 ACCF0000 */ sw $t7, 0x0000($a2) ## 00000184
/* 000D4 809D1BB4 8D0E0004 */ lw $t6, 0x0004($t0) ## FFFFFFF4
/* 000D8 809D1BB8 46809120 */ cvt.s.w $f4, $f18
/* 000DC 809D1BBC ACCE0004 */ sw $t6, 0x0004($a2) ## 00000188
/* 000E0 809D1BC0 8D0F0008 */ lw $t7, 0x0008($t0) ## FFFFFFF8
/* 000E4 809D1BC4 14600007 */ bne $v1, $zero, .L809D1BE4
/* 000E8 809D1BC8 ACCF0008 */ sw $t7, 0x0008($a2) ## 0000018C
/* 000EC 809D1BCC 00690019 */ multu $v1, $t1
/* 000F0 809D1BD0 861800B4 */ lh $t8, 0x00B4($s0) ## 000000B4
/* 000F4 809D1BD4 2719C000 */ addiu $t9, $t8, 0xC000 ## $t9 = FFFFC000
/* 000F8 809D1BD8 00005812 */ mflo $t3
/* 000FC 809D1BDC 020B6021 */ addu $t4, $s0, $t3
/* 00100 809D1BE0 A59901B4 */ sh $t9, 0x01B4($t4) ## 000001B4
.L809D1BE4:
/* 00104 809D1BE4 8CEE0000 */ lw $t6, 0x0000($a3) ## 00000024
/* 00108 809D1BE8 46002182 */ mul.s $f6, $f4, $f0
/* 0010C 809D1BEC 00401825 */ or $v1, $v0, $zero ## $v1 = 00000001
/* 00110 809D1BF0 ACAE0000 */ sw $t6, 0x0000($a1) ## 00000154
/* 00114 809D1BF4 8CED0004 */ lw $t5, 0x0004($a3) ## 00000028
/* 00118 809D1BF8 2484000C */ addiu $a0, $a0, 0x000C ## $a0 = 0000000C
/* 0011C 809D1BFC 24A5000C */ addiu $a1, $a1, 0x000C ## $a1 = 00000160
/* 00120 809D1C00 ACADFFF8 */ sw $t5, -0x0008($a1) ## 00000158
/* 00124 809D1C04 8CEE0008 */ lw $t6, 0x0008($a3) ## 0000002C
/* 00128 809D1C08 24C6000C */ addiu $a2, $a2, 0x000C ## $a2 = 00000190
/* 0012C 809D1C0C ACAEFFFC */ sw $t6, -0x0004($a1) ## 0000015C
/* 00130 809D1C10 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028
/* 00134 809D1C14 46068200 */ add.s $f8, $f16, $f6
/* 00138 809D1C18 144AFFE2 */ bne $v0, $t2, .L809D1BA4
/* 0013C 809D1C1C E488014C */ swc1 $f8, 0x014C($a0) ## 00000158
/* 00140 809D1C20 3C068003 */ lui $a2, %hi(ActorShadow_DrawFunc_Circle)
/* 00144 809D1C24 24C6B5EC */ addiu $a2, %lo(ActorShadow_DrawFunc_Circle)
/* 00148 809D1C28 260400B4 */ addiu $a0, $s0, 0x00B4 ## $a0 = 000000B4
/* 0014C 809D1C2C 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000
/* 00150 809D1C30 0C00AC78 */ jal ActorShape_Init
/* 00154 809D1C34 3C074240 */ lui $a3, 0x4240 ## $a3 = 42400000
/* 00158 809D1C38 260501CC */ addiu $a1, $s0, 0x01CC ## $a1 = 000001CC
/* 0015C 809D1C3C AFA50030 */ sw $a1, 0x0030($sp)
/* 00160 809D1C40 0C0170D9 */ jal Collider_InitCylinder
/* 00164 809D1C44 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00168 809D1C48 3C07809D */ lui $a3, %hi(D_809D2490) ## $a3 = 809D0000
/* 0016C 809D1C4C 8FA50030 */ lw $a1, 0x0030($sp)
/* 00170 809D1C50 24E72490 */ addiu $a3, $a3, %lo(D_809D2490) ## $a3 = 809D2490
/* 00174 809D1C54 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00178 809D1C58 0C01712B */ jal Collider_SetCylinder
/* 0017C 809D1C5C 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00180 809D1C60 26050218 */ addiu $a1, $s0, 0x0218 ## $a1 = 00000218
/* 00184 809D1C64 AFA50030 */ sw $a1, 0x0030($sp)
/* 00188 809D1C68 0C017406 */ jal Collider_InitQuad
/* 0018C 809D1C6C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00190 809D1C70 3C07809D */ lui $a3, %hi(D_809D24BC) ## $a3 = 809D0000
/* 00194 809D1C74 8FA50030 */ lw $a1, 0x0030($sp)
/* 00198 809D1C78 24E724BC */ addiu $a3, $a3, %lo(D_809D24BC) ## $a3 = 809D24BC
/* 0019C 809D1C7C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 001A0 809D1C80 0C017441 */ jal Collider_SetQuad
/* 001A4 809D1C84 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 001A8 809D1C88 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 001AC 809D1C8C 3C0144FA */ lui $at, 0x44FA ## $at = 44FA0000
/* 001B0 809D1C90 44815000 */ mtc1 $at, $f10 ## $f10 = 2000.00
/* 001B4 809D1C94 240F00FF */ addiu $t7, $zero, 0x00FF ## $t7 = 000000FF
/* 001B8 809D1C98 00052A03 */ sra $a1, $a1, 8
/* 001BC 809D1C9C A20F00AE */ sb $t7, 0x00AE($s0) ## 000000AE
/* 001C0 809D1CA0 A600014C */ sh $zero, 0x014C($s0) ## 0000014C
/* 001C4 809D1CA4 30A500FF */ andi $a1, $a1, 0x00FF ## $a1 = 00000000
/* 001C8 809D1CA8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 001CC 809D1CAC 0C00B2D0 */ jal Flags_GetSwitch
/* 001D0 809D1CB0 E60A00FC */ swc1 $f10, 0x00FC($s0) ## 000000FC
/* 001D4 809D1CB4 50400004 */ beql $v0, $zero, .L809D1CC8
/* 001D8 809D1CB8 8618001C */ lh $t8, 0x001C($s0) ## 0000001C
/* 001DC 809D1CBC 0C00B55C */ jal Actor_Kill
/* 001E0 809D1CC0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 001E4 809D1CC4 8618001C */ lh $t8, 0x001C($s0) ## 0000001C
.L809D1CC8:
/* 001E8 809D1CC8 330B00FF */ andi $t3, $t8, 0x00FF ## $t3 = 00000000
/* 001EC 809D1CCC A60B001C */ sh $t3, 0x001C($s0) ## 0000001C
/* 001F0 809D1CD0 8FBF001C */ lw $ra, 0x001C($sp)
/* 001F4 809D1CD4 8FB10018 */ lw $s1, 0x0018($sp)
/* 001F8 809D1CD8 8FB00014 */ lw $s0, 0x0014($sp)
/* 001FC 809D1CDC 03E00008 */ jr $ra
/* 00200 809D1CE0 27BD0058 */ addiu $sp, $sp, 0x0058 ## $sp = 00000000

View File

@ -1,223 +0,0 @@
glabel EnBx_Update
/* 002FC 809D1DDC 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88
/* 00300 809D1DE0 AFBF0044 */ sw $ra, 0x0044($sp)
/* 00304 809D1DE4 AFB40040 */ sw $s4, 0x0040($sp)
/* 00308 809D1DE8 AFB3003C */ sw $s3, 0x003C($sp)
/* 0030C 809D1DEC AFB20038 */ sw $s2, 0x0038($sp)
/* 00310 809D1DF0 AFB10034 */ sw $s1, 0x0034($sp)
/* 00314 809D1DF4 AFB00030 */ sw $s0, 0x0030($sp)
/* 00318 809D1DF8 F7B40028 */ sdc1 $f20, 0x0028($sp)
/* 0031C 809D1DFC 3C01428C */ lui $at, 0x428C ## $at = 428C0000
/* 00320 809D1E00 44811000 */ mtc1 $at, $f2 ## $f2 = 70.00
/* 00324 809D1E04 C4800090 */ lwc1 $f0, 0x0090($a0) ## 00000090
/* 00328 809D1E08 00809825 */ or $s3, $a0, $zero ## $s3 = 00000000
/* 0032C 809D1E0C 00A0A025 */ or $s4, $a1, $zero ## $s4 = 00000000
/* 00330 809D1E10 4602003E */ c.le.s $f0, $f2
/* 00334 809D1E14 8CB01C44 */ lw $s0, 0x1C44($a1) ## 00001C44
/* 00338 809D1E18 4503000E */ bc1tl .L809D1E54
/* 0033C 809D1E1C 4602003E */ c.le.s $f0, $f2
/* 00340 809D1E20 908E01DC */ lbu $t6, 0x01DC($a0) ## 000001DC
/* 00344 809D1E24 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000
/* 00348 809D1E28 55E0000A */ bnel $t7, $zero, .L809D1E54
/* 0034C 809D1E2C 4602003E */ c.le.s $f0, $f2
/* 00350 809D1E30 909801DD */ lbu $t8, 0x01DD($a0) ## 000001DD
/* 00354 809D1E34 33190002 */ andi $t9, $t8, 0x0002 ## $t9 = 00000000
/* 00358 809D1E38 57200006 */ bnel $t9, $zero, .L809D1E54
/* 0035C 809D1E3C 4602003E */ c.le.s $f0, $f2
/* 00360 809D1E40 90880228 */ lbu $t0, 0x0228($a0) ## 00000228
/* 00364 809D1E44 31090002 */ andi $t1, $t0, 0x0002 ## $t1 = 00000000
/* 00368 809D1E48 51200044 */ beql $t1, $zero, .L809D1F5C
/* 0036C 809D1E4C 8662014C */ lh $v0, 0x014C($s3) ## 0000014C
/* 00370 809D1E50 4602003E */ c.le.s $f0, $f2
.L809D1E54:
/* 00374 809D1E54 00000000 */ nop
/* 00378 809D1E58 4503000B */ bc1tl .L809D1E88
/* 0037C 809D1E5C 866D001C */ lh $t5, 0x001C($s3) ## 0000001C
/* 00380 809D1E60 8E6A01D0 */ lw $t2, 0x01D0($s3) ## 000001D0
/* 00384 809D1E64 520A0008 */ beql $s0, $t2, .L809D1E88
/* 00388 809D1E68 866D001C */ lh $t5, 0x001C($s3) ## 0000001C
/* 0038C 809D1E6C 8E6B01D4 */ lw $t3, 0x01D4($s3) ## 000001D4
/* 00390 809D1E70 520B0005 */ beql $s0, $t3, .L809D1E88
/* 00394 809D1E74 866D001C */ lh $t5, 0x001C($s3) ## 0000001C
/* 00398 809D1E78 8E6C021C */ lw $t4, 0x021C($s3) ## 0000021C
/* 0039C 809D1E7C 560C0029 */ bnel $s0, $t4, .L809D1F24
/* 003A0 809D1E80 926801DC */ lbu $t0, 0x01DC($s3) ## 000001DC
/* 003A4 809D1E84 866D001C */ lh $t5, 0x001C($s3) ## 0000001C
.L809D1E88:
/* 003A8 809D1E88 82020A78 */ lb $v0, 0x0A78($s0) ## 00000A78
/* 003AC 809D1E8C 86710032 */ lh $s1, 0x0032($s3) ## 00000032
/* 003B0 809D1E90 31AE0080 */ andi $t6, $t5, 0x0080 ## $t6 = 00000000
/* 003B4 809D1E94 8E6301D0 */ lw $v1, 0x01D0($s3) ## 000001D0
/* 003B8 809D1E98 15C00002 */ bne $t6, $zero, .L809D1EA4
/* 003BC 809D1E9C 305200FF */ andi $s2, $v0, 0x00FF ## $s2 = 00000000
/* 003C0 809D1EA0 8671008A */ lh $s1, 0x008A($s3) ## 0000008A
.L809D1EA4:
/* 003C4 809D1EA4 52030015 */ beql $s0, $v1, .L809D1EFC
/* 003C8 809D1EA8 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000
/* 003CC 809D1EAC 8E6F01D4 */ lw $t7, 0x01D4($s3) ## 000001D4
/* 003D0 809D1EB0 520F0012 */ beql $s0, $t7, .L809D1EFC
/* 003D4 809D1EB4 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000
/* 003D8 809D1EB8 8E78021C */ lw $t8, 0x021C($s3) ## 0000021C
/* 003DC 809D1EBC 5218000F */ beql $s0, $t8, .L809D1EFC
/* 003E0 809D1EC0 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000
/* 003E4 809D1EC4 1C40000C */ bgtz $v0, .L809D1EF8
/* 003E8 809D1EC8 2841FFD9 */ slti $at, $v0, 0xFFD9
/* 003EC 809D1ECC 10200003 */ beq $at, $zero, .L809D1EDC
/* 003F0 809D1ED0 3C190001 */ lui $t9, 0x0001 ## $t9 = 00010000
/* 003F4 809D1ED4 10000008 */ beq $zero, $zero, .L809D1EF8
/* 003F8 809D1ED8 A2000A78 */ sb $zero, 0x0A78($s0) ## 00000A78
.L809D1EDC:
/* 003FC 809D1EDC A2000A78 */ sb $zero, 0x0A78($s0) ## 00000A78
/* 00400 809D1EE0 0334C821 */ addu $t9, $t9, $s4
/* 00404 809D1EE4 8F391D58 */ lw $t9, 0x1D58($t9) ## 00011D58
/* 00408 809D1EE8 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 0040C 809D1EEC 2405FFFC */ addiu $a1, $zero, 0xFFFC ## $a1 = FFFFFFFC
/* 00410 809D1EF0 0320F809 */ jalr $ra, $t9
/* 00414 809D1EF4 00000000 */ nop
.L809D1EF8:
/* 00418 809D1EF8 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000
.L809D1EFC:
/* 0041C 809D1EFC 44810000 */ mtc1 $at, $f0 ## $f0 = 6.00
/* 00420 809D1F00 00113C00 */ sll $a3, $s1, 16
/* 00424 809D1F04 00073C03 */ sra $a3, $a3, 16
/* 00428 809D1F08 44060000 */ mfc1 $a2, $f0
/* 0042C 809D1F0C 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 00430 809D1F10 02602825 */ or $a1, $s3, $zero ## $a1 = 00000000
/* 00434 809D1F14 0C00BDC7 */ jal func_8002F71C
/* 00438 809D1F18 E7A00010 */ swc1 $f0, 0x0010($sp)
/* 0043C 809D1F1C A2120A78 */ sb $s2, 0x0A78($s0) ## 00000A78
/* 00440 809D1F20 926801DC */ lbu $t0, 0x01DC($s3) ## 000001DC
.L809D1F24:
/* 00444 809D1F24 926A01DD */ lbu $t2, 0x01DD($s3) ## 000001DD
/* 00448 809D1F28 926C0228 */ lbu $t4, 0x0228($s3) ## 00000228
/* 0044C 809D1F2C 240E0014 */ addiu $t6, $zero, 0x0014 ## $t6 = 00000014
/* 00450 809D1F30 3109FFFD */ andi $t1, $t0, 0xFFFD ## $t1 = 00000000
/* 00454 809D1F34 314BFFFD */ andi $t3, $t2, 0xFFFD ## $t3 = 00000000
/* 00458 809D1F38 318DFFFD */ andi $t5, $t4, 0xFFFD ## $t5 = 00000000
/* 0045C 809D1F3C A26901DC */ sb $t1, 0x01DC($s3) ## 000001DC
/* 00460 809D1F40 A26B01DD */ sb $t3, 0x01DD($s3) ## 000001DD
/* 00464 809D1F44 A26D0228 */ sb $t5, 0x0228($s3) ## 00000228
/* 00468 809D1F48 AE60021C */ sw $zero, 0x021C($s3) ## 0000021C
/* 0046C 809D1F4C AE6001D4 */ sw $zero, 0x01D4($s3) ## 000001D4
/* 00470 809D1F50 AE6001D0 */ sw $zero, 0x01D0($s3) ## 000001D0
/* 00474 809D1F54 A66E014C */ sh $t6, 0x014C($s3) ## 0000014C
/* 00478 809D1F58 8662014C */ lh $v0, 0x014C($s3) ## 0000014C
.L809D1F5C:
/* 0047C 809D1F5C 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000
/* 00480 809D1F60 3C0140A0 */ lui $at, 0x40A0 ## $at = 40A00000
/* 00484 809D1F64 1040003F */ beq $v0, $zero, .L809D2064
/* 00488 809D1F68 244FFFFF */ addiu $t7, $v0, 0xFFFF ## $t7 = FFFFFFFF
/* 0048C 809D1F6C 4481A000 */ mtc1 $at, $f20 ## $f20 = 5.00
/* 00490 809D1F70 A66F014C */ sh $t7, 0x014C($s3) ## 0000014C
/* 00494 809D1F74 8678014C */ lh $t8, 0x014C($s3) ## 0000014C
.L809D1F78:
/* 00498 809D1F78 0010C840 */ sll $t9, $s0, 1
/* 0049C 809D1F7C 3C014640 */ lui $at, 0x4640 ## $at = 46400000
/* 004A0 809D1F80 03194021 */ addu $t0, $t8, $t9
/* 004A4 809D1F84 05010004 */ bgez $t0, .L809D1F98
/* 004A8 809D1F88 31090003 */ andi $t1, $t0, 0x0003 ## $t1 = 00000000
/* 004AC 809D1F8C 11200002 */ beq $t1, $zero, .L809D1F98
/* 004B0 809D1F90 00000000 */ nop
/* 004B4 809D1F94 2529FFFC */ addiu $t1, $t1, 0xFFFC ## $t1 = FFFFFFFC
.L809D1F98:
/* 004B8 809D1F98 5520002C */ bnel $t1, $zero, .L809D204C
/* 004BC 809D1F9C 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001
/* 004C0 809D1FA0 44816000 */ mtc1 $at, $f12 ## $f12 = 12288.00
/* 004C4 809D1FA4 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 004C8 809D1FA8 00109380 */ sll $s2, $s0, 14
/* 004CC 809D1FAC 4600010D */ trunc.w.s $f4, $f0
/* 004D0 809D1FB0 4600A306 */ mov.s $f12, $f20
/* 004D4 809D1FB4 440D2000 */ mfc1 $t5, $f4
/* 004D8 809D1FB8 00000000 */ nop
/* 004DC 809D1FBC 01B28821 */ addu $s1, $t5, $s2
/* 004E0 809D1FC0 26312000 */ addiu $s1, $s1, 0x2000 ## $s1 = 00002000
/* 004E4 809D1FC4 00118C00 */ sll $s1, $s1, 16
/* 004E8 809D1FC8 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 004EC 809D1FCC 00118C03 */ sra $s1, $s1, 16
/* 004F0 809D1FD0 C6660024 */ lwc1 $f6, 0x0024($s3) ## 00000024
/* 004F4 809D1FD4 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000
/* 004F8 809D1FD8 44816000 */ mtc1 $at, $f12 ## $f12 = 30.00
/* 004FC 809D1FDC 46060200 */ add.s $f8, $f0, $f6
/* 00500 809D1FE0 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 00504 809D1FE4 E7A80058 */ swc1 $f8, 0x0058($sp)
/* 00508 809D1FE8 C66A0028 */ lwc1 $f10, 0x0028($s3) ## 00000028
/* 0050C 809D1FEC 3C01432A */ lui $at, 0x432A ## $at = 432A0000
/* 00510 809D1FF0 44819000 */ mtc1 $at, $f18 ## $f18 = 170.00
/* 00514 809D1FF4 460A0400 */ add.s $f16, $f0, $f10
/* 00518 809D1FF8 4600A306 */ mov.s $f12, $f20
/* 0051C 809D1FFC 46128100 */ add.s $f4, $f16, $f18
/* 00520 809D2000 0C00CFC8 */ jal Math_Rand_CenteredFloat
/* 00524 809D2004 E7A4005C */ swc1 $f4, 0x005C($sp)
/* 00528 809D2008 C666002C */ lwc1 $f6, 0x002C($s3) ## 0000002C
/* 0052C 809D200C 3C06809D */ lui $a2, %hi(D_809D2558) ## $a2 = 809D0000
/* 00530 809D2010 3C07809D */ lui $a3, %hi(D_809D255C) ## $a3 = 809D0000
/* 00534 809D2014 46060200 */ add.s $f8, $f0, $f6
/* 00538 809D2018 240E00E6 */ addiu $t6, $zero, 0x00E6 ## $t6 = 000000E6
/* 0053C 809D201C 240F0006 */ addiu $t7, $zero, 0x0006 ## $t7 = 00000006
/* 00540 809D2020 AFAF0018 */ sw $t7, 0x0018($sp)
/* 00544 809D2024 E7A80060 */ swc1 $f8, 0x0060($sp)
/* 00548 809D2028 AFAE0010 */ sw $t6, 0x0010($sp)
/* 0054C 809D202C 24E7255C */ addiu $a3, $a3, %lo(D_809D255C) ## $a3 = 809D255C
/* 00550 809D2030 24C62558 */ addiu $a2, $a2, %lo(D_809D2558) ## $a2 = 809D2558
/* 00554 809D2034 AFA0001C */ sw $zero, 0x001C($sp)
/* 00558 809D2038 AFB10014 */ sw $s1, 0x0014($sp)
/* 0055C 809D203C 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 00560 809D2040 0C00A568 */ jal func_800295A0
/* 00564 809D2044 27A50058 */ addiu $a1, $sp, 0x0058 ## $a1 = FFFFFFE0
/* 00568 809D2048 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000002
.L809D204C:
/* 0056C 809D204C 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 00570 809D2050 5601FFC9 */ bnel $s0, $at, .L809D1F78
/* 00574 809D2054 8678014C */ lh $t8, 0x014C($s3) ## 0000014C
/* 00578 809D2058 02602025 */ or $a0, $s3, $zero ## $a0 = 00000000
/* 0057C 809D205C 0C00BE0A */ jal Audio_PlayActorSound2
/* 00580 809D2060 2405309A */ addiu $a1, $zero, 0x309A ## $a1 = 0000309A
.L809D2064:
/* 00584 809D2064 8E790024 */ lw $t9, 0x0024($s3) ## 00000024
/* 00588 809D2068 8E780028 */ lw $t8, 0x0028($s3) ## 00000028
/* 0058C 809D206C 267101CC */ addiu $s1, $s3, 0x01CC ## $s1 = 000001CC
/* 00590 809D2070 AE790038 */ sw $t9, 0x0038($s3) ## 00000038
/* 00594 809D2074 8E79002C */ lw $t9, 0x002C($s3) ## 0000002C
/* 00598 809D2078 02202825 */ or $a1, $s1, $zero ## $a1 = 000001CC
/* 0059C 809D207C 02602025 */ or $a0, $s3, $zero ## $a0 = 00000000
/* 005A0 809D2080 AE78003C */ sw $t8, 0x003C($s3) ## 0000003C
/* 005A4 809D2084 0C0189B7 */ jal Collider_CylinderUpdate
/* 005A8 809D2088 AE790040 */ sw $t9, 0x0040($s3) ## 00000040
/* 005AC 809D208C 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 005B0 809D2090 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 005B4 809D2094 02818021 */ addu $s0, $s4, $at
/* 005B8 809D2098 02002825 */ or $a1, $s0, $zero ## $a1 = 00000002
/* 005BC 809D209C 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 005C0 809D20A0 0C01767D */ jal CollisionCheck_SetAC
## CollisionCheck_setAC
/* 005C4 809D20A4 02203025 */ or $a2, $s1, $zero ## $a2 = 000001CC
/* 005C8 809D20A8 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 005CC 809D20AC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000002
/* 005D0 809D20B0 0C0175E7 */ jal CollisionCheck_SetAT
## CollisionCheck_setAT
/* 005D4 809D20B4 02203025 */ or $a2, $s1, $zero ## $a2 = 000001CC
/* 005D8 809D20B8 8668001C */ lh $t0, 0x001C($s3) ## 0000001C
/* 005DC 809D20BC 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 005E0 809D20C0 02002825 */ or $a1, $s0, $zero ## $a1 = 00000002
/* 005E4 809D20C4 31090080 */ andi $t1, $t0, 0x0080 ## $t1 = 00000000
/* 005E8 809D20C8 51200004 */ beql $t1, $zero, .L809D20DC
/* 005EC 809D20CC 8FBF0044 */ lw $ra, 0x0044($sp)
/* 005F0 809D20D0 0C0175E7 */ jal CollisionCheck_SetAT
## CollisionCheck_setAT
/* 005F4 809D20D4 26660218 */ addiu $a2, $s3, 0x0218 ## $a2 = 00000218
/* 005F8 809D20D8 8FBF0044 */ lw $ra, 0x0044($sp)
.L809D20DC:
/* 005FC 809D20DC D7B40028 */ ldc1 $f20, 0x0028($sp)
/* 00600 809D20E0 8FB00030 */ lw $s0, 0x0030($sp)
/* 00604 809D20E4 8FB10034 */ lw $s1, 0x0034($sp)
/* 00608 809D20E8 8FB20038 */ lw $s2, 0x0038($sp)
/* 0060C 809D20EC 8FB3003C */ lw $s3, 0x003C($sp)
/* 00610 809D20F0 8FB40040 */ lw $s4, 0x0040($sp)
/* 00614 809D20F4 03E00008 */ jr $ra
/* 00618 809D20F8 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000

View File

@ -1,53 +0,0 @@
glabel func_809D1D0C
/* 0022C 809D1D0C 27BDFF98 */ addiu $sp, $sp, 0xFF98 ## $sp = FFFFFF98
/* 00230 809D1D10 3C0F809D */ lui $t7, %hi(D_809D2528) ## $t7 = 809D0000
/* 00234 809D1D14 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00238 809D1D18 AFB00020 */ sw $s0, 0x0020($sp)
/* 0023C 809D1D1C AFA5006C */ sw $a1, 0x006C($sp)
/* 00240 809D1D20 25EF2528 */ addiu $t7, $t7, %lo(D_809D2528) ## $t7 = 809D2528
/* 00244 809D1D24 8DF90000 */ lw $t9, 0x0000($t7) ## 809D2528
/* 00248 809D1D28 27AE005C */ addiu $t6, $sp, 0x005C ## $t6 = FFFFFFF4
/* 0024C 809D1D2C 8DF80004 */ lw $t8, 0x0004($t7) ## 809D252C
/* 00250 809D1D30 ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF4
/* 00254 809D1D34 8DF90008 */ lw $t9, 0x0008($t7) ## 809D2530
/* 00258 809D1D38 3C09809D */ lui $t1, %hi(D_809D2534) ## $t1 = 809D0000
/* 0025C 809D1D3C 25292534 */ addiu $t1, $t1, %lo(D_809D2534) ## $t1 = 809D2534
/* 00260 809D1D40 ADD80004 */ sw $t8, 0x0004($t6) ## FFFFFFF8
/* 00264 809D1D44 ADD90008 */ sw $t9, 0x0008($t6) ## FFFFFFFC
/* 00268 809D1D48 8D2B0000 */ lw $t3, 0x0000($t1) ## 809D2534
/* 0026C 809D1D4C 27A80050 */ addiu $t0, $sp, 0x0050 ## $t0 = FFFFFFE8
/* 00270 809D1D50 8D2A0004 */ lw $t2, 0x0004($t1) ## 809D2538
/* 00274 809D1D54 AD0B0000 */ sw $t3, 0x0000($t0) ## FFFFFFE8
/* 00278 809D1D58 8D2B0008 */ lw $t3, 0x0008($t1) ## 809D253C
/* 0027C 809D1D5C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00280 809D1D60 3C04809D */ lui $a0, %hi(D_809D2540) ## $a0 = 809D0000
/* 00284 809D1D64 24842540 */ addiu $a0, $a0, %lo(D_809D2540) ## $a0 = 809D2540
/* 00288 809D1D68 27A50044 */ addiu $a1, $sp, 0x0044 ## $a1 = FFFFFFDC
/* 0028C 809D1D6C AD0A0004 */ sw $t2, 0x0004($t0) ## FFFFFFEC
/* 00290 809D1D70 0C0346BD */ jal Matrix_MultVec3f
/* 00294 809D1D74 AD0B0008 */ sw $t3, 0x0008($t0) ## FFFFFFF0
/* 00298 809D1D78 3C04809D */ lui $a0, %hi(D_809D254C) ## $a0 = 809D0000
/* 0029C 809D1D7C 2484254C */ addiu $a0, $a0, %lo(D_809D254C) ## $a0 = 809D254C
/* 002A0 809D1D80 0C0346BD */ jal Matrix_MultVec3f
/* 002A4 809D1D84 27A50038 */ addiu $a1, $sp, 0x0038 ## $a1 = FFFFFFD0
/* 002A8 809D1D88 26050264 */ addiu $a1, $s0, 0x0264 ## $a1 = 00000264
/* 002AC 809D1D8C AFA5002C */ sw $a1, 0x002C($sp)
/* 002B0 809D1D90 0C0346BD */ jal Matrix_MultVec3f
/* 002B4 809D1D94 27A4005C */ addiu $a0, $sp, 0x005C ## $a0 = FFFFFFF4
/* 002B8 809D1D98 26070258 */ addiu $a3, $s0, 0x0258 ## $a3 = 00000258
/* 002BC 809D1D9C 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000258
/* 002C0 809D1DA0 AFA70030 */ sw $a3, 0x0030($sp)
/* 002C4 809D1DA4 0C0346BD */ jal Matrix_MultVec3f
/* 002C8 809D1DA8 27A40050 */ addiu $a0, $sp, 0x0050 ## $a0 = FFFFFFE8
/* 002CC 809D1DAC 8FAC002C */ lw $t4, 0x002C($sp)
/* 002D0 809D1DB0 8FA70030 */ lw $a3, 0x0030($sp)
/* 002D4 809D1DB4 26040218 */ addiu $a0, $s0, 0x0218 ## $a0 = 00000218
/* 002D8 809D1DB8 27A50038 */ addiu $a1, $sp, 0x0038 ## $a1 = FFFFFFD0
/* 002DC 809D1DBC 27A60044 */ addiu $a2, $sp, 0x0044 ## $a2 = FFFFFFDC
/* 002E0 809D1DC0 0C0189CD */ jal func_80062734
/* 002E4 809D1DC4 AFAC0010 */ sw $t4, 0x0010($sp)
/* 002E8 809D1DC8 8FBF0024 */ lw $ra, 0x0024($sp)
/* 002EC 809D1DCC 8FB00020 */ lw $s0, 0x0020($sp)
/* 002F0 809D1DD0 27BD0068 */ addiu $sp, $sp, 0x0068 ## $sp = 00000000
/* 002F4 809D1DD4 03E00008 */ jr $ra
/* 002F8 809D1DD8 00000000 */ nop

View File

@ -1,42 +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 En_Bx_InitVars
.word 0x00DF0500, 0x00000010, 0x00D50000, 0x00000298
.word EnBx_Init
.word EnBx_Destroy
.word EnBx_Update
.word EnBx_Draw
glabel D_809D2490
.word 0x06110900, 0x00010000, 0x01000000, 0xFFCFFFFF, 0x03040000, 0xFFCFFFFF, 0x01000000, 0x01010000, 0x003C0064, 0x00640000, 0x00000000
glabel D_809D24BC
.word 0x0A110000, 0x00030000, 0x00000000, 0xFFCFFFFF, 0x03040000, 0x00000000, 0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
glabel D_809D250C
.word 0x3C75C28F, 0x3C75C28F, 0x3C75C28F
glabel D_809D2518
.word 0x00000000, 0x00000000, 0x00000000
glabel D_809D2524
.word 0x304C14B4
glabel D_809D2528
.word 0x45FA0000, 0x466A6000, 0x451C4000
glabel D_809D2534
.word 0x45FA0000, 0x461C4000, 0x451C4000
glabel D_809D2540
.word 0xC5FA0000, 0x466A6000, 0x451C4000
glabel D_809D254C
.word 0xC5FA0000, 0x461C4000, 0x451C4000
glabel D_809D2558
.word 0xFFFFFFFF
glabel D_809D255C
.word 0xC8FFFFFF
glabel D_809D2560
.word 0x060024F0, 0x060027F0, 0x060029F0, 0x00000000

View File

@ -380,11 +380,11 @@ void func_8002F5F0(Actor* actor, GlobalContext* globalCtx);
u32 func_8002F618(GlobalContext* globalCtx, Actor* actor);
u32 func_8002F63C(GlobalContext* globalCtx, Actor* actor, s32 arg2);
u32 func_8002F674(GlobalContext* globalCtx, Actor* actor);
void func_8002F698(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_8002F6D4(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F71C(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4);
void func_8002F758(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F7A0(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4);
void func_8002F698(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_8002F6D4(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F71C(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4);
void func_8002F758(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F7A0(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4);
void func_8002F7DC(Actor* actor, u16 sfxId);
void Audio_PlayActorSound2(Actor* actor, u16 sfxId);
void func_8002F850(GlobalContext* globalCtx, Actor* actor);

5
spec
View File

@ -2164,8 +2164,11 @@ endseg
beginseg
name "ovl_En_Bx"
include "build/src/overlays/actors/ovl_En_Bx/z_en_bx.o"
include "build/data/overlays/actors/z_en_bx.data.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Bx/ovl_En_Bx_reloc.o"
#else
include "build/data/overlays/actors/z_en_bx.reloc.o"
#endif
endseg
beginseg

View File

@ -1649,7 +1649,7 @@ u32 func_8002F674(GlobalContext* globalCtx, Actor* actor) {
}
}
void func_8002F698(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
void func_8002F698(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
Player* player = PLAYER;
player->unk_8A0 = arg6;
player->unk_8A1 = arg5;
@ -1658,19 +1658,19 @@ void func_8002F698(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 a
player->unk_8A8 = arg4;
}
void func_8002F6D4(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
void func_8002F6D4(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
func_8002F698(globalCtx, arg1, arg2, arg3, arg4, 2, arg5);
}
void func_8002F71C(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4) {
void func_8002F71C(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4) {
func_8002F6D4(globalCtx, arg1, arg2, arg3, arg4, 0);
}
void func_8002F758(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
void func_8002F758(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
func_8002F698(globalCtx, arg1, arg2, arg3, arg4, 1, arg5);
}
void func_8002F7A0(GlobalContext* globalCtx, u32 arg1, f32 arg2, s16 arg3, f32 arg4) {
void func_8002F7A0(GlobalContext* globalCtx, Actor* arg1, f32 arg2, s16 arg3, f32 arg4) {
func_8002F758(globalCtx, arg1, arg2, arg3, arg4, 0);
}

View File

@ -1,3 +1,9 @@
/*
* File: z_en_bx.c
* Overlay: ovl_En_Bx
* Description: Jabu-Jabu Electrified Tentacle
*/
#include "z_en_bx.h"
#define FLAGS 0x00000010
@ -9,7 +15,8 @@ void EnBx_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnBx_Update(Actor* thisx, GlobalContext* globalCtx);
void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx);
/*
extern Gfx D_060022F0[];
const ActorInit En_Bx_InitVars = {
ACTOR_EN_BX,
ACTORTYPE_ENEMY,
@ -21,13 +28,216 @@ const ActorInit En_Bx_InitVars = {
(ActorFunc)EnBx_Update,
(ActorFunc)EnBx_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bx/EnBx_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bx/EnBx_Destroy.s")
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK6, 0x11, 0x09, 0x00, 0x00, COLSHAPE_CYLINDER },
{ 0x01, { 0xFFCFFFFF, 0x03, 0x04 }, { 0xFFCFFFFF, 0x01, 0x00 }, 0x01, 0x01, 0x00 },
{ 60, 100, 100, { 0, 0, 0 } },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bx/func_809D1D0C.s")
static ColliderQuadInit sQuadInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x00, 0x00, COLSHAPE_QUAD },
{ 0x00, { 0xFFCFFFFF, 0x03, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bx/EnBx_Update.s")
Vec3f D_809D250C = { 0.015f, 0.015f, 0.015f };
Vec3f D_809D2518 = { 0.0f, 0.0f, 0.0f };
static InitChainEntry sInitChain[] = {
ICHAIN_F32(unk_4C, 5300, ICHAIN_STOP),
};
Vec3f D_809D2528 = { 8000.0f, 15000.0f, 2500.0f };
Vec3f D_809D2534 = { 8000.0f, 10000.0f, 2500.0f };
Vec3f D_809D2540 = { -8000.0f, 15000.0f, 2500.0f };
Vec3f D_809D254C = { -8000.0f, 10000.0f, 2500.0f };
Color_RGBA8 D_809D2558 = { 255, 255, 255, 255 };
Color_RGBA8 D_809D255C = { 200, 255, 255, 255 };
UNK_PTR D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 };
void EnBx_Init(Actor* thisx, GlobalContext* globalCtx) {
EnBx* this = THIS;
Vec3f sp48 = D_809D250C;
Vec3f sp3C = D_809D2518;
s32 i;
s32 pad;
Actor_ProcessInitChain(&this->actor, sInitChain);
thisx->scale.x = thisx->scale.z = 0.01f;
thisx->scale.y = 0.03f;
thisx->posRot.pos.y = thisx->posRot.pos.y - 100.0f;
for (i = 0; i < 4; i++) {
this->unk_184[i] = sp48;
if (i == 0) {
this->unk_1B4[i].x = thisx->shape.rot.x - 0x4000;
}
this->unk_154[i] = thisx->posRot.pos;
this->unk_154[i].y = thisx->posRot.pos.y + ((i + 1) * 140.0f);
}
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 48.0f);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
Collider_InitQuad(globalCtx, &this->colliderQuad);
Collider_SetQuad(globalCtx, &this->colliderQuad, &this->actor, &sQuadInit);
thisx->colChkInfo.mass = 0xFF;
this->unk_14C = 0;
thisx->uncullZoneDownward = 2000.0f;
if (Flags_GetSwitch(globalCtx, (thisx->params >> 8) & 0xFF)) {
Actor_Kill(&this->actor);
}
thisx->params &= 0xFF;
}
void EnBx_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnBx* this = THIS;
Collider_DestroyCylinder(globalCtx, &this->collider);
}
void func_809D1D0C(Actor* thisx, GlobalContext* globalCtx) {
Vec3f sp5C = D_809D2528;
Vec3f sp50 = D_809D2534;
Vec3f sp44;
Vec3f sp38;
EnBx* this = THIS;
Matrix_MultVec3f(&D_809D2540, &sp44);
Matrix_MultVec3f(&D_809D254C, &sp38);
Matrix_MultVec3f(&sp5C, &this->colliderQuad.dim.quad[1]);
Matrix_MultVec3f(&sp50, &this->colliderQuad.dim.quad[0]);
func_80062734(&this->colliderQuad, &sp38, &sp44, &this->colliderQuad.dim.quad[0], &this->colliderQuad.dim.quad[1]);
}
void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) {
EnBx* this = THIS;
Player* player = PLAYER;
s32 i;
s16 tmp32;
s32 tmp33;
Vec3f sp58;
s16 tmp16;
u32 test;
if ((thisx->xzDistFromLink <= 70.0f) || (this->collider.base.atFlags & 2) || (this->collider.base.acFlags & 2) ||
(this->colliderQuad.base.atFlags & 2)) {
if ((thisx->xzDistFromLink <= 70.0f) || (&player->actor == this->collider.base.at) ||
(&player->actor == this->collider.base.ac) || (&player->actor == this->colliderQuad.base.at)) {
tmp33 = player->invincibilityTimer & 0xFF;
tmp32 = thisx->posRot.rot.y;
if (!(thisx->params & 0x80)) {
tmp32 = thisx->yawTowardsLink;
}
if ((&player->actor != this->collider.base.at) && (&player->actor != this->collider.base.ac) &&
(&player->actor != this->colliderQuad.base.at) && (player->invincibilityTimer <= 0)) {
if (player->invincibilityTimer < -0x27) {
player->invincibilityTimer = 0;
} else {
player->invincibilityTimer = 0;
globalCtx->unk_11D58(globalCtx, -4);
}
}
func_8002F71C(globalCtx, &this->actor, 6.0f, tmp32, 6.0f);
player->invincibilityTimer = tmp33;
}
this->collider.base.atFlags &= ~2;
this->collider.base.acFlags &= ~2;
this->colliderQuad.base.atFlags &= ~2;
this->colliderQuad.base.at = NULL;
this->collider.base.ac = NULL;
this->collider.base.at = NULL;
this->unk_14C = 0x14;
}
if (this->unk_14C != 0) {
this->unk_14C--;
for (i = 0; i < 4; i++) {
if (!((this->unk_14C + (i << 1)) % 4)) {
tmp16 = (s32)Math_Rand_CenteredFloat(12288.0f);
tmp16 = (tmp16 + (i * 16384)) + 0x2000;
sp58.x = Math_Rand_CenteredFloat(5.0f) + thisx->posRot.pos.x;
sp58.y = Math_Rand_CenteredFloat(30.0f) + thisx->posRot.pos.y + 170.0f;
sp58.z = Math_Rand_CenteredFloat(5.0f) + thisx->posRot.pos.z;
func_800295A0(globalCtx, &sp58, &D_809D2558, &D_809D255C, 0xE6, tmp16, 6, 0);
}
}
Audio_PlayActorSound2(thisx, NA_SE_EN_BIRI_SPARK - SFX_FLAG);
}
thisx->posRot2.pos = thisx->posRot.pos;
Collider_CylinderUpdate(thisx, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
if (thisx->params & 0x80) {
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->colliderQuad.base);
}
}
#ifdef NON_MATCHING
// Issue with Gfx_TwoTexScroll I think
void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnBx* this = THIS;
void* matrices = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx));
f32 tmpf1;
f32 tmpf2;
{
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[4];
Mtx* matrix = &matrices[0];
s16 i;
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_bx.c", 464);
func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(gfxCtx->polyOpa.p++, 0x0C, matrices);
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[this->actor.params & 0x7F]));
gSPSegment(gfxCtx->polyOpa.p++, 0x09,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x10, 0x10, 1, 0,
(-globalCtx->gameplayFrames * 10) % 128, 0x20, 0x20));
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bx.c", 478),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->actor.params & 0x80) {
func_809D1D0C(&this->actor, globalCtx);
}
this->unk_14E -= 0xBB8;
tmpf1 = Math_Coss(this->unk_14E);
tmpf1 = (tmpf1 * 0.0075f) + 0.015f;
thisx->scale.x = tmpf1;
thisx->scale.z = tmpf1;
for (i = 3; i >= 0; i--) {
tmpf2 = Math_Coss(this->unk_14E + ((i & 0xFF) * 8192));
tmpf2 = (tmpf2 * 0.0075f) + 0.015f;
this->unk_184[i].x = tmpf2;
this->unk_184[i].z = tmpf2;
this->unk_1B4[i].x = thisx->shape.rot.x;
this->unk_1B4[i].y = thisx->shape.rot.y;
this->unk_1B4[i].z = thisx->shape.rot.z;
}
for (i = 0; i < 4; i++, matrix++) {
Matrix_Translate(this->unk_154[i].x, this->unk_154[i].y, this->unk_154[i].z, MTXMODE_NEW);
Matrix_RotateRPY(this->unk_1B4[i].x, this->unk_1B4[i].y, this->unk_1B4[i].z, MTXMODE_APPLY);
Matrix_Scale(this->unk_184[i].x, this->unk_184[i].y, this->unk_184[i].z, MTXMODE_APPLY);
Matrix_ToMtx(matrix, "../z_en_bx.c", 507);
}
gSPDisplayList(gfxCtx->polyOpa.p++, D_060022F0);
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_bx.c", 511);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bx/EnBx_Draw.s")
#endif

View File

@ -8,7 +8,14 @@ struct EnBx;
typedef struct EnBx {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x14C];
/* 0x014C */ s16 unk_14C;
/* 0x014E */ s16 unk_14E;
/* 0x0150 */ char unk_150[0x4];
/* 0x0154 */ Vec3f unk_154[4];
/* 0x0184 */ Vec3f unk_184[4];
/* 0x01B4 */ Vec3s unk_1B4[4];
/* 0x01CC */ ColliderCylinder collider;
/* 0x0218 */ ColliderQuad colliderQuad;
} EnBx; // size = 0x0298
extern const ActorInit En_Bx_InitVars;

View File

@ -665,6 +665,9 @@ D_04032C90 = 0x04032C90;
D_04032490 = 0x04032490;
D_04032890 = 0x04032890;
// z_en_bx
D_060022F0 = 0x060022F0;
// code_800AD920
D_0E000000 = 0x0E000000;