1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

Obj_Mure3 OK (#720)

* matched

* format

* review

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
petrie911 2021-03-27 14:50:26 -05:00 committed by GitHub
parent 8b57f36d32
commit cf78de2b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 166 additions and 555 deletions

View file

@ -1,4 +0,0 @@
glabel ObjMure3_Destroy
/* 00548 80B9AF18 AFA40000 */ sw $a0, 0x0000($sp)
/* 0054C 80B9AF1C 03E00008 */ jr $ra
/* 00550 80B9AF20 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,29 +0,0 @@
glabel ObjMure3_Init
/* 004EC 80B9AEBC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 004F0 80B9AEC0 AFA40018 */ sw $a0, 0x0018($sp)
/* 004F4 80B9AEC4 8FAE0018 */ lw $t6, 0x0018($sp)
/* 004F8 80B9AEC8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 004FC 80B9AECC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00500 80B9AED0 85C5001C */ lh $a1, 0x001C($t6) ## 0000001C
/* 00504 80B9AED4 0C00B2D0 */ jal Flags_GetSwitch
/* 00508 80B9AED8 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 0050C 80B9AEDC 10400005 */ beq $v0, $zero, .L80B9AEF4
/* 00510 80B9AEE0 8FA40018 */ lw $a0, 0x0018($sp)
/* 00514 80B9AEE4 0C00B55C */ jal Actor_Kill
/* 00518 80B9AEE8 8FA40018 */ lw $a0, 0x0018($sp)
/* 0051C 80B9AEEC 10000007 */ beq $zero, $zero, .L80B9AF0C
/* 00520 80B9AEF0 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B9AEF4:
/* 00524 80B9AEF4 3C0580BA */ lui $a1, %hi(D_80B9B0C8) ## $a1 = 80BA0000
/* 00528 80B9AEF8 0C01E037 */ jal Actor_ProcessInitChain
/* 0052C 80B9AEFC 24A5B0C8 */ addiu $a1, $a1, %lo(D_80B9B0C8) ## $a1 = 80B9B0C8
/* 00530 80B9AF00 0C2E6BC9 */ jal func_80B9AF24
/* 00534 80B9AF04 8FA40018 */ lw $a0, 0x0018($sp)
/* 00538 80B9AF08 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B9AF0C:
/* 0053C 80B9AF0C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00540 80B9AF10 03E00008 */ jr $ra
/* 00544 80B9AF14 00000000 */ nop

View file

@ -1,13 +0,0 @@
glabel ObjMure3_Update
/* 006A0 80B9B070 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 006A4 80B9B074 AFBF0014 */ sw $ra, 0x0014($sp)
/* 006A8 80B9B078 8C99014C */ lw $t9, 0x014C($a0) ## 0000014C
/* 006AC 80B9B07C 0320F809 */ jalr $ra, $t9
/* 006B0 80B9B080 00000000 */ nop
/* 006B4 80B9B084 8FBF0014 */ lw $ra, 0x0014($sp)
/* 006B8 80B9B088 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 006BC 80B9B08C 03E00008 */ jr $ra
/* 006C0 80B9B090 00000000 */ nop
/* 006C4 80B9B094 00000000 */ nop
/* 006C8 80B9B098 00000000 */ nop
/* 006CC 80B9B09C 00000000 */ nop

View file

@ -1,53 +0,0 @@
glabel func_80B9A9D0
/* 00000 80B9A9D0 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0
/* 00004 80B9A9D4 AFB50030 */ sw $s5, 0x0030($sp)
/* 00008 80B9A9D8 AFB4002C */ sw $s4, 0x002C($sp)
/* 0000C 80B9A9DC AFB20024 */ sw $s2, 0x0024($sp)
/* 00010 80B9A9E0 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000
/* 00014 80B9A9E4 00A0A025 */ or $s4, $a1, $zero ## $s4 = 00000000
/* 00018 80B9A9E8 27B50040 */ addiu $s5, $sp, 0x0040 ## $s5 = FFFFFFF0
/* 0001C 80B9A9EC AFBF0034 */ sw $ra, 0x0034($sp)
/* 00020 80B9A9F0 AFB30028 */ sw $s3, 0x0028($sp)
/* 00024 80B9A9F4 AFB10020 */ sw $s1, 0x0020($sp)
/* 00028 80B9A9F8 AFB0001C */ sw $s0, 0x001C($sp)
/* 0002C 80B9A9FC F7B40010 */ sdc1 $f20, 0x0010($sp)
/* 00030 80B9AA00 02A02025 */ or $a0, $s5, $zero ## $a0 = FFFFFFF0
/* 00034 80B9AA04 0C01DF90 */ jal Math_Vec3f_Copy
## Vec3f_Copy
/* 00038 80B9AA08 26450024 */ addiu $a1, $s2, 0x0024 ## $a1 = 00000024
/* 0003C 80B9AA0C 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 00040 80B9AA10 4481A000 */ mtc1 $at, $f20 ## $f20 = 20.00
/* 00044 80B9AA14 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000
/* 00048 80B9AA18 24130005 */ addiu $s3, $zero, 0x0005 ## $s3 = 00000005
.L80B9AA1C:
/* 0004C 80B9AA1C 964E016C */ lhu $t6, 0x016C($s2) ## 0000016C
/* 00050 80B9AA20 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 00054 80B9AA24 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFF0
/* 00058 80B9AA28 020E7807 */ srav $t7, $t6, $s0
/* 0005C 80B9AA2C 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000
/* 00060 80B9AA30 17000008 */ bne $t8, $zero, .L80B9AA54
/* 00064 80B9AA34 24064001 */ addiu $a2, $zero, 0x4001 ## $a2 = 00004001
/* 00068 80B9AA38 0010C880 */ sll $t9, $s0, 2
/* 0006C 80B9AA3C 0C007DDF */ jal Item_DropCollectible2
/* 00070 80B9AA40 02598821 */ addu $s1, $s2, $t9
/* 00074 80B9AA44 10400003 */ beq $v0, $zero, .L80B9AA54
/* 00078 80B9AA48 AE220150 */ sw $v0, 0x0150($s1) ## 00000150
/* 0007C 80B9AA4C 82480003 */ lb $t0, 0x0003($s2) ## 00000003
/* 00080 80B9AA50 A0480003 */ sb $t0, 0x0003($v0) ## 00000003
.L80B9AA54:
/* 00084 80B9AA54 C7A40044 */ lwc1 $f4, 0x0044($sp)
/* 00088 80B9AA58 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001
/* 0008C 80B9AA5C 46142180 */ add.s $f6, $f4, $f20
/* 00090 80B9AA60 1613FFEE */ bne $s0, $s3, .L80B9AA1C
/* 00094 80B9AA64 E7A60044 */ swc1 $f6, 0x0044($sp)
/* 00098 80B9AA68 8FBF0034 */ lw $ra, 0x0034($sp)
/* 0009C 80B9AA6C D7B40010 */ ldc1 $f20, 0x0010($sp)
/* 000A0 80B9AA70 8FB0001C */ lw $s0, 0x001C($sp)
/* 000A4 80B9AA74 8FB10020 */ lw $s1, 0x0020($sp)
/* 000A8 80B9AA78 8FB20024 */ lw $s2, 0x0024($sp)
/* 000AC 80B9AA7C 8FB30028 */ lw $s3, 0x0028($sp)
/* 000B0 80B9AA80 8FB4002C */ lw $s4, 0x002C($sp)
/* 000B4 80B9AA84 8FB50030 */ lw $s5, 0x0030($sp)
/* 000B8 80B9AA88 03E00008 */ jr $ra
/* 000BC 80B9AA8C 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000

View file

@ -1,75 +0,0 @@
glabel func_80B9AA90
/* 000C0 80B9AA90 27BDFF90 */ addiu $sp, $sp, 0xFF90 ## $sp = FFFFFF90
/* 000C4 80B9AA94 AFB00034 */ sw $s0, 0x0034($sp)
/* 000C8 80B9AA98 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 000CC 80B9AA9C AFBF004C */ sw $ra, 0x004C($sp)
/* 000D0 80B9AAA0 AFB50048 */ sw $s5, 0x0048($sp)
/* 000D4 80B9AAA4 AFB40044 */ sw $s4, 0x0044($sp)
/* 000D8 80B9AAA8 AFB30040 */ sw $s3, 0x0040($sp)
/* 000DC 80B9AAAC AFB2003C */ sw $s2, 0x003C($sp)
/* 000E0 80B9AAB0 AFB10038 */ sw $s1, 0x0038($sp)
/* 000E4 80B9AAB4 F7BA0028 */ sdc1 $f26, 0x0028($sp)
/* 000E8 80B9AAB8 F7B80020 */ sdc1 $f24, 0x0020($sp)
/* 000EC 80B9AABC F7B60018 */ sdc1 $f22, 0x0018($sp)
/* 000F0 80B9AAC0 F7B40010 */ sdc1 $f20, 0x0010($sp)
/* 000F4 80B9AAC4 00A0A825 */ or $s5, $a1, $zero ## $s5 = 00000000
/* 000F8 80B9AAC8 0C01DE1C */ jal Math_SinS
## sins?
/* 000FC 80B9AACC 84840032 */ lh $a0, 0x0032($a0) ## 00000032
/* 00100 80B9AAD0 46000606 */ mov.s $f24, $f0
/* 00104 80B9AAD4 0C01DE0D */ jal Math_CosS
## coss?
/* 00108 80B9AAD8 86040032 */ lh $a0, 0x0032($s0) ## 00000032
/* 0010C 80B9AADC 3C01C220 */ lui $at, 0xC220 ## $at = C2200000
/* 00110 80B9AAE0 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028
/* 00114 80B9AAE4 4481A000 */ mtc1 $at, $f20 ## $f20 = -40.00
/* 00118 80B9AAE8 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 0011C 80B9AAEC 4481B000 */ mtc1 $at, $f22 ## $f22 = 20.00
/* 00120 80B9AAF0 46000686 */ mov.s $f26, $f0
/* 00124 80B9AAF4 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000
/* 00128 80B9AAF8 24140005 */ addiu $s4, $zero, 0x0005 ## $s4 = 00000005
/* 0012C 80B9AAFC 27B30060 */ addiu $s3, $sp, 0x0060 ## $s3 = FFFFFFF0
/* 00130 80B9AB00 E7A40064 */ swc1 $f4, 0x0064($sp)
.L80B9AB04:
/* 00134 80B9AB04 960E016C */ lhu $t6, 0x016C($s0) ## 0000016C
/* 00138 80B9AB08 022E7807 */ srav $t7, $t6, $s1
/* 0013C 80B9AB0C 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000
/* 00140 80B9AB10 57000014 */ bnel $t8, $zero, .L80B9AB64
/* 00144 80B9AB14 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001
/* 00148 80B9AB18 4614C202 */ mul.s $f8, $f24, $f20
/* 0014C 80B9AB1C C6060024 */ lwc1 $f6, 0x0024($s0) ## 00000024
/* 00150 80B9AB20 0011C880 */ sll $t9, $s1, 2
/* 00154 80B9AB24 4614D482 */ mul.s $f18, $f26, $f20
/* 00158 80B9AB28 02199021 */ addu $s2, $s0, $t9
/* 0015C 80B9AB2C 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000
/* 00160 80B9AB30 02602825 */ or $a1, $s3, $zero ## $a1 = FFFFFFF0
/* 00164 80B9AB34 24064000 */ addiu $a2, $zero, 0x4000 ## $a2 = 00004000
/* 00168 80B9AB38 46083280 */ add.s $f10, $f6, $f8
/* 0016C 80B9AB3C E7AA0060 */ swc1 $f10, 0x0060($sp)
/* 00170 80B9AB40 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C
/* 00174 80B9AB44 46128100 */ add.s $f4, $f16, $f18
/* 00178 80B9AB48 0C007DDF */ jal Item_DropCollectible2
/* 0017C 80B9AB4C E7A40068 */ swc1 $f4, 0x0068($sp)
/* 00180 80B9AB50 10400003 */ beq $v0, $zero, .L80B9AB60
/* 00184 80B9AB54 AE420150 */ sw $v0, 0x0150($s2) ## 00000150
/* 00188 80B9AB58 82080003 */ lb $t0, 0x0003($s0) ## 00000003
/* 0018C 80B9AB5C A0480003 */ sb $t0, 0x0003($v0) ## 00000003
.L80B9AB60:
/* 00190 80B9AB60 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000002
.L80B9AB64:
/* 00194 80B9AB64 1634FFE7 */ bne $s1, $s4, .L80B9AB04
/* 00198 80B9AB68 4616A500 */ add.s $f20, $f20, $f22
/* 0019C 80B9AB6C 8FBF004C */ lw $ra, 0x004C($sp)
/* 001A0 80B9AB70 D7B40010 */ ldc1 $f20, 0x0010($sp)
/* 001A4 80B9AB74 D7B60018 */ ldc1 $f22, 0x0018($sp)
/* 001A8 80B9AB78 D7B80020 */ ldc1 $f24, 0x0020($sp)
/* 001AC 80B9AB7C D7BA0028 */ ldc1 $f26, 0x0028($sp)
/* 001B0 80B9AB80 8FB00034 */ lw $s0, 0x0034($sp)
/* 001B4 80B9AB84 8FB10038 */ lw $s1, 0x0038($sp)
/* 001B8 80B9AB88 8FB2003C */ lw $s2, 0x003C($sp)
/* 001BC 80B9AB8C 8FB30040 */ lw $s3, 0x0040($sp)
/* 001C0 80B9AB90 8FB40044 */ lw $s4, 0x0044($sp)
/* 001C4 80B9AB94 8FB50048 */ lw $s5, 0x0048($sp)
/* 001C8 80B9AB98 03E00008 */ jr $ra
/* 001CC 80B9AB9C 27BD0070 */ addiu $sp, $sp, 0x0070 ## $sp = 00000000

View file

@ -1,90 +0,0 @@
glabel func_80B9ABA0
/* 001D0 80B9ABA0 27BDFFA8 */ addiu $sp, $sp, 0xFFA8 ## $sp = FFFFFFA8
/* 001D4 80B9ABA4 AFBF003C */ sw $ra, 0x003C($sp)
/* 001D8 80B9ABA8 AFB60038 */ sw $s6, 0x0038($sp)
/* 001DC 80B9ABAC AFB50034 */ sw $s5, 0x0034($sp)
/* 001E0 80B9ABB0 AFB40030 */ sw $s4, 0x0030($sp)
/* 001E4 80B9ABB4 AFB3002C */ sw $s3, 0x002C($sp)
/* 001E8 80B9ABB8 AFB20028 */ sw $s2, 0x0028($sp)
/* 001EC 80B9ABBC AFB10024 */ sw $s1, 0x0024($sp)
/* 001F0 80B9ABC0 AFB00020 */ sw $s0, 0x0020($sp)
/* 001F4 80B9ABC4 F7B40018 */ sdc1 $f20, 0x0018($sp)
/* 001F8 80B9ABC8 C4840028 */ lwc1 $f4, 0x0028($a0) ## 00000028
/* 001FC 80B9ABCC 3C014220 */ lui $at, 0x4220 ## $at = 42200000
/* 00200 80B9ABD0 4481A000 */ mtc1 $at, $f20 ## $f20 = 40.00
/* 00204 80B9ABD4 E7A4004C */ swc1 $f4, 0x004C($sp)
/* 00208 80B9ABD8 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000
/* 0020C 80B9ABDC 00A0A825 */ or $s5, $a1, $zero ## $s5 = 00000000
/* 00210 80B9ABE0 84930032 */ lh $s3, 0x0032($a0) ## 00000032
/* 00214 80B9ABE4 9482016C */ lhu $v0, 0x016C($a0) ## 0000016C
/* 00218 80B9ABE8 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000
/* 0021C 80B9ABEC 24140006 */ addiu $s4, $zero, 0x0006 ## $s4 = 00000006
/* 00220 80B9ABF0 27B60048 */ addiu $s6, $sp, 0x0048 ## $s6 = FFFFFFF0
.L80B9ABF4:
/* 00224 80B9ABF4 02027007 */ srav $t6, $v0, $s0
/* 00228 80B9ABF8 31CF0001 */ andi $t7, $t6, 0x0001 ## $t7 = 00000000
/* 0022C 80B9ABFC 15E00018 */ bne $t7, $zero, .L80B9AC60
/* 00230 80B9AC00 00132400 */ sll $a0, $s3, 16
/* 00234 80B9AC04 0010C080 */ sll $t8, $s0, 2
/* 00238 80B9AC08 02588821 */ addu $s1, $s2, $t8
/* 0023C 80B9AC0C 0C01DE1C */ jal Math_SinS
## sins?
/* 00240 80B9AC10 00042403 */ sra $a0, $a0, 16
/* 00244 80B9AC14 46140182 */ mul.s $f6, $f0, $f20
/* 00248 80B9AC18 C6480024 */ lwc1 $f8, 0x0024($s2) ## 00000024
/* 0024C 80B9AC1C 00132400 */ sll $a0, $s3, 16
/* 00250 80B9AC20 00042403 */ sra $a0, $a0, 16
/* 00254 80B9AC24 46083280 */ add.s $f10, $f6, $f8
/* 00258 80B9AC28 0C01DE0D */ jal Math_CosS
## coss?
/* 0025C 80B9AC2C E7AA0048 */ swc1 $f10, 0x0048($sp)
/* 00260 80B9AC30 46140402 */ mul.s $f16, $f0, $f20
/* 00264 80B9AC34 C652002C */ lwc1 $f18, 0x002C($s2) ## 0000002C
/* 00268 80B9AC38 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000
/* 0026C 80B9AC3C 02C02825 */ or $a1, $s6, $zero ## $a1 = FFFFFFF0
/* 00270 80B9AC40 24064000 */ addiu $a2, $zero, 0x4000 ## $a2 = 00004000
/* 00274 80B9AC44 46128100 */ add.s $f4, $f16, $f18
/* 00278 80B9AC48 0C007DDF */ jal Item_DropCollectible2
/* 0027C 80B9AC4C E7A40050 */ swc1 $f4, 0x0050($sp)
/* 00280 80B9AC50 10400003 */ beq $v0, $zero, .L80B9AC60
/* 00284 80B9AC54 AE220150 */ sw $v0, 0x0150($s1) ## 00000150
/* 00288 80B9AC58 82590003 */ lb $t9, 0x0003($s2) ## 00000003
/* 0028C 80B9AC5C A0590003 */ sb $t9, 0x0003($v0) ## 00000003
.L80B9AC60:
/* 00290 80B9AC60 26732AAA */ addiu $s3, $s3, 0x2AAA ## $s3 = 00002AAA
/* 00294 80B9AC64 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001
/* 00298 80B9AC68 00139C00 */ sll $s3, $s3, 16
/* 0029C 80B9AC6C 9642016C */ lhu $v0, 0x016C($s2) ## 0000016C
/* 002A0 80B9AC70 1614FFE0 */ bne $s0, $s4, .L80B9ABF4
/* 002A4 80B9AC74 00139C03 */ sra $s3, $s3, 16
/* 002A8 80B9AC78 00024983 */ sra $t1, $v0, 6
/* 002AC 80B9AC7C 312A0001 */ andi $t2, $t1, 0x0001 ## $t2 = 00000000
/* 002B0 80B9AC80 5540000E */ bnel $t2, $zero, .L80B9ACBC
/* 002B4 80B9AC84 8FBF003C */ lw $ra, 0x003C($sp)
/* 002B8 80B9AC88 C6460024 */ lwc1 $f6, 0x0024($s2) ## 00000024
/* 002BC 80B9AC8C 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000
/* 002C0 80B9AC90 02C02825 */ or $a1, $s6, $zero ## $a1 = FFFFFFF0
/* 002C4 80B9AC94 E7A60048 */ swc1 $f6, 0x0048($sp)
/* 002C8 80B9AC98 C648002C */ lwc1 $f8, 0x002C($s2) ## 0000002C
/* 002CC 80B9AC9C 24064002 */ addiu $a2, $zero, 0x4002 ## $a2 = 00004002
/* 002D0 80B9ACA0 0C007DDF */ jal Item_DropCollectible2
/* 002D4 80B9ACA4 E7A80050 */ swc1 $f8, 0x0050($sp)
/* 002D8 80B9ACA8 10400003 */ beq $v0, $zero, .L80B9ACB8
/* 002DC 80B9ACAC AE420168 */ sw $v0, 0x0168($s2) ## 00000168
/* 002E0 80B9ACB0 824B0003 */ lb $t3, 0x0003($s2) ## 00000003
/* 002E4 80B9ACB4 A04B0003 */ sb $t3, 0x0003($v0) ## 00000003
.L80B9ACB8:
/* 002E8 80B9ACB8 8FBF003C */ lw $ra, 0x003C($sp)
.L80B9ACBC:
/* 002EC 80B9ACBC D7B40018 */ ldc1 $f20, 0x0018($sp)
/* 002F0 80B9ACC0 8FB00020 */ lw $s0, 0x0020($sp)
/* 002F4 80B9ACC4 8FB10024 */ lw $s1, 0x0024($sp)
/* 002F8 80B9ACC8 8FB20028 */ lw $s2, 0x0028($sp)
/* 002FC 80B9ACCC 8FB3002C */ lw $s3, 0x002C($sp)
/* 00300 80B9ACD0 8FB40030 */ lw $s4, 0x0030($sp)
/* 00304 80B9ACD4 8FB50034 */ lw $s5, 0x0034($sp)
/* 00308 80B9ACD8 8FB60038 */ lw $s6, 0x0038($sp)
/* 0030C 80B9ACDC 03E00008 */ jr $ra
/* 00310 80B9ACE0 27BD0058 */ addiu $sp, $sp, 0x0058 ## $sp = 00000000

View file

@ -1,66 +0,0 @@
glabel func_80B9ACE4
/* 00314 80B9ACE4 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 00318 80B9ACE8 AFBF002C */ sw $ra, 0x002C($sp)
/* 0031C 80B9ACEC AFB50028 */ sw $s5, 0x0028($sp)
/* 00320 80B9ACF0 AFB40024 */ sw $s4, 0x0024($sp)
/* 00324 80B9ACF4 AFB30020 */ sw $s3, 0x0020($sp)
/* 00328 80B9ACF8 AFB2001C */ sw $s2, 0x001C($sp)
/* 0032C 80B9ACFC AFB10018 */ sw $s1, 0x0018($sp)
/* 00330 80B9AD00 AFB00014 */ sw $s0, 0x0014($sp)
/* 00334 80B9AD04 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 00338 80B9AD08 3C1480BA */ lui $s4, %hi(D_80B9B0C0) ## $s4 = 80BA0000
/* 0033C 80B9AD0C 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000
/* 00340 80B9AD10 000E7B43 */ sra $t7, $t6, 13
/* 00344 80B9AD14 31F80007 */ andi $t8, $t7, 0x0007 ## $t8 = 00000000
/* 00348 80B9AD18 0018C840 */ sll $t9, $t8, 1
/* 0034C 80B9AD1C 0299A021 */ addu $s4, $s4, $t9
/* 00350 80B9AD20 8694B0C0 */ lh $s4, %lo(D_80B9B0C0)($s4)
/* 00354 80B9AD24 00A0A825 */ or $s5, $a1, $zero ## $s5 = 00000000
/* 00358 80B9AD28 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000
/* 0035C 80B9AD2C 1A80001E */ blez $s4, .L80B9ADA8
/* 00360 80B9AD30 24910150 */ addiu $s1, $a0, 0x0150 ## $s1 = 00000150
.L80B9AD34:
/* 00364 80B9AD34 9648016C */ lhu $t0, 0x016C($s2) ## 0000016C
/* 00368 80B9AD38 02209825 */ or $s3, $s1, $zero ## $s3 = 00000150
/* 0036C 80B9AD3C 02084807 */ srav $t1, $t0, $s0
/* 00370 80B9AD40 312A0001 */ andi $t2, $t1, 0x0001 ## $t2 = 00000000
/* 00374 80B9AD44 55400015 */ bnel $t2, $zero, .L80B9AD9C
/* 00378 80B9AD48 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001
/* 0037C 80B9AD4C 8E240000 */ lw $a0, 0x0000($s1) ## 00000150
/* 00380 80B9AD50 50800012 */ beql $a0, $zero, .L80B9AD9C
/* 00384 80B9AD54 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000002
/* 00388 80B9AD58 0C00BD04 */ jal Actor_HasParent
/* 0038C 80B9AD5C 02A02825 */ or $a1, $s5, $zero ## $a1 = 00000000
/* 00390 80B9AD60 54400006 */ bnel $v0, $zero, .L80B9AD7C
/* 00394 80B9AD64 964C016C */ lhu $t4, 0x016C($s2) ## 0000016C
/* 00398 80B9AD68 8E240000 */ lw $a0, 0x0000($s1) ## 00000150
/* 0039C 80B9AD6C 8C8B0130 */ lw $t3, 0x0130($a0) ## 00000130
/* 003A0 80B9AD70 15600007 */ bne $t3, $zero, .L80B9AD90
/* 003A4 80B9AD74 00000000 */ nop
/* 003A8 80B9AD78 964C016C */ lhu $t4, 0x016C($s2) ## 0000016C
.L80B9AD7C:
/* 003AC 80B9AD7C 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001
/* 003B0 80B9AD80 020D7004 */ sllv $t6, $t5, $s0
/* 003B4 80B9AD84 018E7825 */ or $t7, $t4, $t6 ## $t7 = 00000000
/* 003B8 80B9AD88 10000003 */ beq $zero, $zero, .L80B9AD98
/* 003BC 80B9AD8C A64F016C */ sh $t7, 0x016C($s2) ## 0000016C
.L80B9AD90:
/* 003C0 80B9AD90 0C00B55C */ jal Actor_Kill
/* 003C4 80B9AD94 00000000 */ nop
.L80B9AD98:
/* 003C8 80B9AD98 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000003
.L80B9AD9C:
/* 003CC 80B9AD9C 26310004 */ addiu $s1, $s1, 0x0004 ## $s1 = 00000154
/* 003D0 80B9ADA0 1614FFE4 */ bne $s0, $s4, .L80B9AD34
/* 003D4 80B9ADA4 AE600000 */ sw $zero, 0x0000($s3) ## 00000150
.L80B9ADA8:
/* 003D8 80B9ADA8 8FBF002C */ lw $ra, 0x002C($sp)
/* 003DC 80B9ADAC 8FB00014 */ lw $s0, 0x0014($sp)
/* 003E0 80B9ADB0 8FB10018 */ lw $s1, 0x0018($sp)
/* 003E4 80B9ADB4 8FB2001C */ lw $s2, 0x001C($sp)
/* 003E8 80B9ADB8 8FB30020 */ lw $s3, 0x0020($sp)
/* 003EC 80B9ADBC 8FB40024 */ lw $s4, 0x0024($sp)
/* 003F0 80B9ADC0 8FB50028 */ lw $s5, 0x0028($sp)
/* 003F4 80B9ADC4 03E00008 */ jr $ra
/* 003F8 80B9ADC8 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000

View file

@ -1,66 +0,0 @@
glabel func_80B9ADCC
/* 003FC 80B9ADCC 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 00400 80B9ADD0 AFBF002C */ sw $ra, 0x002C($sp)
/* 00404 80B9ADD4 AFB50028 */ sw $s5, 0x0028($sp)
/* 00408 80B9ADD8 AFB40024 */ sw $s4, 0x0024($sp)
/* 0040C 80B9ADDC AFB30020 */ sw $s3, 0x0020($sp)
/* 00410 80B9ADE0 AFB2001C */ sw $s2, 0x001C($sp)
/* 00414 80B9ADE4 AFB10018 */ sw $s1, 0x0018($sp)
/* 00418 80B9ADE8 AFB00014 */ sw $s0, 0x0014($sp)
/* 0041C 80B9ADEC 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 00420 80B9ADF0 3C1580BA */ lui $s5, %hi(D_80B9B0C0) ## $s5 = 80BA0000
/* 00424 80B9ADF4 00809825 */ or $s3, $a0, $zero ## $s3 = 00000000
/* 00428 80B9ADF8 000E7B43 */ sra $t7, $t6, 13
/* 0042C 80B9ADFC 31F80007 */ andi $t8, $t7, 0x0007 ## $t8 = 00000000
/* 00430 80B9AE00 0018C840 */ sll $t9, $t8, 1
/* 00434 80B9AE04 02B9A821 */ addu $s5, $s5, $t9
/* 00438 80B9AE08 86B5B0C0 */ lh $s5, %lo(D_80B9B0C0)($s5)
/* 0043C 80B9AE0C 00A0A025 */ or $s4, $a1, $zero ## $s4 = 00000000
/* 00440 80B9AE10 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000
/* 00444 80B9AE14 1AA00020 */ blez $s5, .L80B9AE98
/* 00448 80B9AE18 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000
.L80B9AE1C:
/* 0044C 80B9AE1C 8E480150 */ lw $t0, 0x0150($s2) ## 00000150
/* 00450 80B9AE20 5100001B */ beql $t0, $zero, .L80B9AE90
/* 00454 80B9AE24 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001
/* 00458 80B9AE28 9669016C */ lhu $t1, 0x016C($s3) ## 0000016C
/* 0045C 80B9AE2C 26500150 */ addiu $s0, $s2, 0x0150 ## $s0 = 00000150
/* 00460 80B9AE30 02802825 */ or $a1, $s4, $zero ## $a1 = 00000000
/* 00464 80B9AE34 02295007 */ srav $t2, $t1, $s1
/* 00468 80B9AE38 314B0001 */ andi $t3, $t2, 0x0001 ## $t3 = 00000000
/* 0046C 80B9AE3C 55600014 */ bnel $t3, $zero, .L80B9AE90
/* 00470 80B9AE40 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000002
/* 00474 80B9AE44 0C00BD04 */ jal Actor_HasParent
/* 00478 80B9AE48 8E040000 */ lw $a0, 0x0000($s0) ## 00000150
/* 0047C 80B9AE4C 50400006 */ beql $v0, $zero, .L80B9AE68
/* 00480 80B9AE50 8E0C0000 */ lw $t4, 0x0000($s0) ## 00000150
/* 00484 80B9AE54 8665001C */ lh $a1, 0x001C($s3) ## 0000001C
/* 00488 80B9AE58 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000
/* 0048C 80B9AE5C 0C00B2DD */ jal Flags_SetSwitch
/* 00490 80B9AE60 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000
/* 00494 80B9AE64 8E0C0000 */ lw $t4, 0x0000($s0) ## 00000150
.L80B9AE68:
/* 00498 80B9AE68 8D8D0130 */ lw $t5, 0x0130($t4) ## 00000130
/* 0049C 80B9AE6C 55A00008 */ bnel $t5, $zero, .L80B9AE90
/* 004A0 80B9AE70 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000003
/* 004A4 80B9AE74 966E016C */ lhu $t6, 0x016C($s3) ## 0000016C
/* 004A8 80B9AE78 240F0001 */ addiu $t7, $zero, 0x0001 ## $t7 = 00000001
/* 004AC 80B9AE7C 022FC004 */ sllv $t8, $t7, $s1
/* 004B0 80B9AE80 01D8C825 */ or $t9, $t6, $t8 ## $t9 = 00000000
/* 004B4 80B9AE84 A679016C */ sh $t9, 0x016C($s3) ## 0000016C
/* 004B8 80B9AE88 AE400150 */ sw $zero, 0x0150($s2) ## 00000150
/* 004BC 80B9AE8C 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000004
.L80B9AE90:
/* 004C0 80B9AE90 1635FFE2 */ bne $s1, $s5, .L80B9AE1C
/* 004C4 80B9AE94 26520004 */ addiu $s2, $s2, 0x0004 ## $s2 = 00000004
.L80B9AE98:
/* 004C8 80B9AE98 8FBF002C */ lw $ra, 0x002C($sp)
/* 004CC 80B9AE9C 8FB00014 */ lw $s0, 0x0014($sp)
/* 004D0 80B9AEA0 8FB10018 */ lw $s1, 0x0018($sp)
/* 004D4 80B9AEA4 8FB2001C */ lw $s2, 0x001C($sp)
/* 004D8 80B9AEA8 8FB30020 */ lw $s3, 0x0020($sp)
/* 004DC 80B9AEAC 8FB40024 */ lw $s4, 0x0024($sp)
/* 004E0 80B9AEB0 8FB50028 */ lw $s5, 0x0028($sp)
/* 004E4 80B9AEB4 03E00008 */ jr $ra
/* 004E8 80B9AEB8 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000

View file

@ -1,5 +0,0 @@
glabel func_80B9AF24
/* 00554 80B9AF24 3C0E80BA */ lui $t6, %hi(func_80B9AF34) ## $t6 = 80BA0000
/* 00558 80B9AF28 25CEAF34 */ addiu $t6, $t6, %lo(func_80B9AF34) ## $t6 = 80B9AF34
/* 0055C 80B9AF2C 03E00008 */ jr $ra
/* 00560 80B9AF30 AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C

View file

@ -1,9 +0,0 @@
glabel func_80B9AF34
/* 00564 80B9AF34 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00568 80B9AF38 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0056C 80B9AF3C 0C2E6BD5 */ jal func_80B9AF54
/* 00570 80B9AF40 AFA5001C */ sw $a1, 0x001C($sp)
/* 00574 80B9AF44 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00578 80B9AF48 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0057C 80B9AF4C 03E00008 */ jr $ra
/* 00580 80B9AF50 00000000 */ nop

View file

@ -1,5 +0,0 @@
glabel func_80B9AF54
/* 00584 80B9AF54 3C0E80BA */ lui $t6, %hi(func_80B9AF64) ## $t6 = 80BA0000
/* 00588 80B9AF58 25CEAF64 */ addiu $t6, $t6, %lo(func_80B9AF64) ## $t6 = 80B9AF64
/* 0058C 80B9AF5C 03E00008 */ jr $ra
/* 00590 80B9AF60 AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C

View file

@ -1,41 +0,0 @@
.late_rodata
glabel D_80B9B0E0
.float 1322500.0
.text
glabel func_80B9AF64
/* 00594 80B9AF64 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00598 80B9AF68 AFBF0014 */ sw $ra, 0x0014($sp)
/* 0059C 80B9AF6C AFA5001C */ sw $a1, 0x001C($sp)
/* 005A0 80B9AF70 C48E00EC */ lwc1 $f14, 0x00EC($a0) ## 000000EC
/* 005A4 80B9AF74 C48C00E4 */ lwc1 $f12, 0x00E4($a0) ## 000000E4
/* 005A8 80B9AF78 0C032D57 */ jal Math3D_Dist1DSq
/* 005AC 80B9AF7C AFA40018 */ sw $a0, 0x0018($sp)
/* 005B0 80B9AF80 3C0180BA */ lui $at, %hi(D_80B9B0E0) ## $at = 80BA0000
/* 005B4 80B9AF84 C424B0E0 */ lwc1 $f4, %lo(D_80B9B0E0)($at)
/* 005B8 80B9AF88 8FA40018 */ lw $a0, 0x0018($sp)
/* 005BC 80B9AF8C 4604003C */ c.lt.s $f0, $f4
/* 005C0 80B9AF90 00000000 */ nop
/* 005C4 80B9AF94 45020012 */ bc1fl .L80B9AFE0
/* 005C8 80B9AF98 8FBF0014 */ lw $ra, 0x0014($sp)
/* 005CC 80B9AF9C 8C8E0004 */ lw $t6, 0x0004($a0) ## 00000004
/* 005D0 80B9AFA0 35CF0010 */ ori $t7, $t6, 0x0010 ## $t7 = 00000010
/* 005D4 80B9AFA4 AC8F0004 */ sw $t7, 0x0004($a0) ## 00000004
/* 005D8 80B9AFA8 AFA40018 */ sw $a0, 0x0018($sp)
/* 005DC 80B9AFAC 8498001C */ lh $t8, 0x001C($a0) ## 0000001C
/* 005E0 80B9AFB0 8FA5001C */ lw $a1, 0x001C($sp)
/* 005E4 80B9AFB4 0018CB43 */ sra $t9, $t8, 13
/* 005E8 80B9AFB8 33280007 */ andi $t0, $t9, 0x0007 ## $t0 = 00000000
/* 005EC 80B9AFBC 00084880 */ sll $t1, $t0, 2
/* 005F0 80B9AFC0 3C1980BA */ lui $t9, %hi(D_80B9B0D4) ## $t9 = 80BA0000
/* 005F4 80B9AFC4 0329C821 */ addu $t9, $t9, $t1
/* 005F8 80B9AFC8 8F39B0D4 */ lw $t9, %lo(D_80B9B0D4)($t9)
/* 005FC 80B9AFCC 0320F809 */ jalr $ra, $t9
/* 00600 80B9AFD0 00000000 */ nop
/* 00604 80B9AFD4 0C2E6BFB */ jal func_80B9AFEC
/* 00608 80B9AFD8 8FA40018 */ lw $a0, 0x0018($sp)
/* 0060C 80B9AFDC 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B9AFE0:
/* 00610 80B9AFE0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00614 80B9AFE4 03E00008 */ jr $ra
/* 00618 80B9AFE8 00000000 */ nop

View file

@ -1,5 +0,0 @@
glabel func_80B9AFEC
/* 0061C 80B9AFEC 3C0E80BA */ lui $t6, %hi(func_80B9AFFC) ## $t6 = 80BA0000
/* 00620 80B9AFF0 25CEAFFC */ addiu $t6, $t6, %lo(func_80B9AFFC) ## $t6 = 80B9AFFC
/* 00624 80B9AFF4 03E00008 */ jr $ra
/* 00628 80B9AFF8 AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C

View file

@ -1,36 +0,0 @@
.late_rodata
glabel D_80B9B0E4
.float 2102500.0
.text
glabel func_80B9AFFC
/* 0062C 80B9AFFC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 00630 80B9B000 AFBF001C */ sw $ra, 0x001C($sp)
/* 00634 80B9B004 AFB00018 */ sw $s0, 0x0018($sp)
/* 00638 80B9B008 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0063C 80B9B00C 0C2E6B73 */ jal func_80B9ADCC
/* 00640 80B9B010 AFA50024 */ sw $a1, 0x0024($sp)
/* 00644 80B9B014 C60C00E4 */ lwc1 $f12, 0x00E4($s0) ## 000000E4
/* 00648 80B9B018 0C032D57 */ jal Math3D_Dist1DSq
/* 0064C 80B9B01C C60E00EC */ lwc1 $f14, 0x00EC($s0) ## 000000EC
/* 00650 80B9B020 3C0180BA */ lui $at, %hi(D_80B9B0E4) ## $at = 80BA0000
/* 00654 80B9B024 C424B0E4 */ lwc1 $f4, %lo(D_80B9B0E4)($at)
/* 00658 80B9B028 4600203E */ c.le.s $f4, $f0
/* 0065C 80B9B02C 00000000 */ nop
/* 00660 80B9B030 4502000B */ bc1fl .L80B9B060
/* 00664 80B9B034 8FBF001C */ lw $ra, 0x001C($sp)
/* 00668 80B9B038 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004
/* 0066C 80B9B03C 2401FFEF */ addiu $at, $zero, 0xFFEF ## $at = FFFFFFEF
/* 00670 80B9B040 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00674 80B9B044 01C17824 */ and $t7, $t6, $at
/* 00678 80B9B048 AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004
/* 0067C 80B9B04C 0C2E6B39 */ jal func_80B9ACE4
/* 00680 80B9B050 8FA50024 */ lw $a1, 0x0024($sp)
/* 00684 80B9B054 0C2E6BD5 */ jal func_80B9AF54
/* 00688 80B9B058 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0068C 80B9B05C 8FBF001C */ lw $ra, 0x001C($sp)
.L80B9B060:
/* 00690 80B9B060 8FB00018 */ lw $s0, 0x0018($sp)
/* 00694 80B9B064 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00698 80B9B068 03E00008 */ jr $ra
/* 0069C 80B9B06C 00000000 */ nop

View file

@ -1,26 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .data
.balign 16
glabel Obj_Mure3_InitVars
.word 0x01AB0100, 0x00000000, 0x00010000, 0x00000170
.word ObjMure3_Init
.word ObjMure3_Destroy
.word ObjMure3_Update
.word 0x00000000
glabel D_80B9B0C0
.word 0x00050005, 0x00070000
glabel D_80B9B0C8
.word 0xB0F40064, 0xB0F80708, 0x30FC0064
glabel D_80B9B0D4
.word func_80B9A9D0
.word func_80B9AA90
.word func_80B9ABA0

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_80B9B0F0
.incbin "baserom/ovl_Obj_Mure3", 0x720, 0x00000090

3
spec
View file

@ -3384,8 +3384,7 @@ endseg
beginseg
name "ovl_Obj_Mure3"
include "build/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.o"
include "build/data/overlays/actors/z_obj_mure3.data.o"
include "build/data/overlays/actors/z_obj_mure3.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Mure3/ovl_Obj_Mure3_reloc.o"
endseg
beginseg

View file

@ -14,7 +14,13 @@ void ObjMure3_Init(Actor* thisx, GlobalContext* globalCtx);
void ObjMure3_Destroy(Actor* thisx, GlobalContext* globalCtx);
void ObjMure3_Update(Actor* thisx, GlobalContext* globalCtx);
/*
void func_80B9AF24(ObjMure3* this);
void func_80B9AF34(ObjMure3* this, GlobalContext* globalCtx);
void func_80B9AF54(ObjMure3* this);
void func_80B9AF64(ObjMure3* this, GlobalContext* globalCtx);
void func_80B9AFEC(ObjMure3* this);
void func_80B9AFFC(ObjMure3* this, GlobalContext* globalCtx);
const ActorInit Obj_Mure3_InitVars = {
ACTOR_OBJ_MURE3,
ACTORCAT_BG,
@ -26,31 +32,168 @@ const ActorInit Obj_Mure3_InitVars = {
(ActorFunc)ObjMure3_Update,
NULL,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9A9D0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9AA90.s")
static s16 sRupeeCounts[] = { 5, 5, 7, 0 };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ABA0.s")
static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneForward, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 1800, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ACE4.s")
void func_80B9A9D0(ObjMure3* this, GlobalContext* globalCtx) {
s32 i;
Vec3f spawnPos;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9ADCC.s")
Math_Vec3f_Copy(&spawnPos, &this->actor.world.pos);
for (i = 0; i < 5; i++, spawnPos.y += 20.0f) {
if (!((this->unk_16C >> i) & 1)) {
this->unk_150[i] = Item_DropCollectible2(globalCtx, &spawnPos, 0x4000 | ITEM00_RUPEE_BLUE);
if (this->unk_150[i] != NULL) {
this->unk_150[i]->actor.room = this->actor.room;
}
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/ObjMure3_Init.s")
void func_80B9AA90(ObjMure3* this, GlobalContext* globalCtx) {
s32 i;
Vec3f spawnPos;
f32 sn = Math_SinS(this->actor.world.rot.y);
f32 cos = Math_CosS(this->actor.world.rot.y);
f32 radius;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/ObjMure3_Destroy.s")
spawnPos.y = this->actor.world.pos.y;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9AF24.s")
for (i = 0, radius = -40.0f; i < 5; i++, radius += 20.0f) {
if (!((this->unk_16C >> i) & 1)) {
spawnPos.x = this->actor.world.pos.x + (sn * radius);
spawnPos.z = this->actor.world.pos.z + (cos * radius);
this->unk_150[i] = Item_DropCollectible2(globalCtx, &spawnPos, 0x4000 | ITEM00_RUPEE_GREEN);
if (this->unk_150[i] != NULL) {
this->unk_150[i]->actor.room = this->actor.room;
}
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9AF34.s")
void func_80B9ABA0(ObjMure3* this, GlobalContext* globalCtx) {
s32 i;
Vec3f spawnPos;
s16 yRot;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9AF54.s")
spawnPos.y = this->actor.world.pos.y;
yRot = this->actor.world.rot.y;
for (i = 0; i < 6; i++) {
if (!((this->unk_16C >> i) & 1)) {
spawnPos.x = (Math_SinS(yRot) * 40.0f) + this->actor.world.pos.x;
spawnPos.z = (Math_CosS(yRot) * 40.0f) + this->actor.world.pos.z;
this->unk_150[i] = Item_DropCollectible2(globalCtx, &spawnPos, 0x4000 | ITEM00_RUPEE_GREEN);
if (this->unk_150[i] != NULL) {
this->unk_150[i]->actor.room = this->actor.room;
}
}
yRot += 0x2AAA;
}
if (!((this->unk_16C >> 6) & 1)) {
spawnPos.x = this->actor.world.pos.x;
spawnPos.z = this->actor.world.pos.z;
this->unk_150[6] = Item_DropCollectible2(globalCtx, &spawnPos, 0x4000 | ITEM00_RUPEE_RED);
if (this->unk_150[6] != NULL) {
this->unk_150[6]->actor.room = this->actor.room;
}
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9AF64.s")
void func_80B9ACE4(ObjMure3* this, GlobalContext* globalCtx) {
s16 count = sRupeeCounts[(this->actor.params >> 13) & 7];
s32 i;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9AFEC.s")
for (i = 0; i < count; i++) {
EnItem00** collectible = &this->unk_150[i];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/func_80B9AFFC.s")
if (!((this->unk_16C >> i) & 1) && (*collectible != NULL)) {
if (Actor_HasParent(&(*collectible)->actor, globalCtx) || ((*collectible)->actor.update == NULL)) {
this->unk_16C |= (1 << i);
} else {
Actor_Kill(&(*collectible)->actor);
}
}
*collectible = NULL;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Mure3/ObjMure3_Update.s")
void func_80B9ADCC(ObjMure3* this, GlobalContext* globalCtx) {
s16 count = sRupeeCounts[(this->actor.params >> 13) & 7];
s32 i;
for (i = 0; i < count; i++) {
EnItem00** collectible = &this->unk_150[i];
if ((*collectible != NULL) && !((this->unk_16C >> i) & 1)) {
if (Actor_HasParent(&(*collectible)->actor, globalCtx)) {
Flags_SetSwitch(globalCtx, this->actor.params & 0x3F);
}
if ((*collectible)->actor.update == NULL) {
this->unk_16C |= (1 << i);
this->unk_150[i] = NULL;
}
}
}
}
void ObjMure3_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
ObjMure3* this = THIS;
if (Flags_GetSwitch(globalCtx, this->actor.params & 0x3F)) {
Actor_Kill(&this->actor);
return;
}
Actor_ProcessInitChain(&this->actor, sInitChain);
func_80B9AF24(this);
}
void ObjMure3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80B9AF24(ObjMure3* this) {
this->actionFunc = func_80B9AF34;
}
void func_80B9AF34(ObjMure3* this, GlobalContext* globalCtx) {
func_80B9AF54(this);
}
void func_80B9AF54(ObjMure3* this) {
this->actionFunc = func_80B9AF64;
}
void func_80B9AF64(ObjMure3* this, GlobalContext* globalCtx) {
static ObjMure3SpawnFunc spawnFuncs[] = { func_80B9A9D0, func_80B9AA90, func_80B9ABA0 };
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) {
this->actor.flags |= 0x10;
spawnFuncs[(this->actor.params >> 13) & 7](this, globalCtx);
func_80B9AFEC(this);
}
}
void func_80B9AFEC(ObjMure3* this) {
this->actionFunc = func_80B9AFFC;
}
void func_80B9AFFC(ObjMure3* this, GlobalContext* globalCtx) {
func_80B9ADCC(this, globalCtx);
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) >= SQ(1450.0f)) {
this->actor.flags &= ~0x10;
func_80B9ACE4(this, globalCtx);
func_80B9AF54(this);
}
}
void ObjMure3_Update(Actor* thisx, GlobalContext* globalCtx) {
ObjMure3* this = THIS;
this->actionFunc(this, globalCtx);
}

View file

@ -6,9 +6,14 @@
struct ObjMure3;
typedef void (*ObjMure3ActionFunc)(struct ObjMure3*, GlobalContext*);
typedef void (*ObjMure3SpawnFunc)(struct ObjMure3*, GlobalContext*);
typedef struct ObjMure3 {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x24];
/* 0x014C */ ObjMure3ActionFunc actionFunc;
/* 0x0150 */ EnItem00* unk_150[7];
/* 0x016C */ u16 unk_16C;
} ObjMure3; // size = 0x0170
extern const ActorInit Obj_Mure3_InitVars;