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

ovl_Item_Ocarina OK (#299)

* first commit

* fixes

* remove unwanted file

Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
Half-asian 2020-08-29 06:35:35 +12:00 committed by GitHub
parent 04a0d7c132
commit b687ef1143
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 178 additions and 566 deletions

View file

@ -1,4 +0,0 @@
glabel ItemOcarina_Destroy
/* 001B0 80B862E0 AFA40000 */ sw $a0, 0x0000($sp)
/* 001B4 80B862E4 03E00008 */ jr $ra
/* 001B8 80B862E8 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,18 +0,0 @@
glabel ItemOcarina_Draw
/* 0067C 80B867AC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00680 80B867B0 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00684 80B867B4 AFA40018 */ sw $a0, 0x0018($sp)
/* 00688 80B867B8 AFA5001C */ sw $a1, 0x001C($sp)
/* 0068C 80B867BC 0C00BAF3 */ jal func_8002EBCC
/* 00690 80B867C0 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 00694 80B867C4 8FA40018 */ lw $a0, 0x0018($sp)
/* 00698 80B867C8 8FA5001C */ lw $a1, 0x001C($sp)
/* 0069C 80B867CC 0C00BB60 */ jal func_8002ED80
/* 006A0 80B867D0 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 006A4 80B867D4 8FA4001C */ lw $a0, 0x001C($sp)
/* 006A8 80B867D8 0C01A528 */ jal func_800694A0
/* 006AC 80B867DC 2405002E */ addiu $a1, $zero, 0x002E ## $a1 = 0000002E
/* 006B0 80B867E0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 006B4 80B867E4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 006B8 80B867E8 03E00008 */ jr $ra
/* 006BC 80B867EC 00000000 */ nop

View file

@ -1,134 +0,0 @@
.rdata
glabel D_80B86810
.asciz "../z_item_ocarina.c"
.balign 4
glabel D_80B86824
.asciz "no = %d\n"
.balign 4
.text
glabel ItemOcarina_Init
/* 00008 80B86138 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 0000C 80B8613C 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 00010 80B86140 AFBF0034 */ sw $ra, 0x0034($sp)
/* 00014 80B86144 AFB00030 */ sw $s0, 0x0030($sp)
/* 00018 80B86148 AFA50044 */ sw $a1, 0x0044($sp)
/* 0001C 80B8614C 848E001C */ lh $t6, 0x001C($a0) ## 0000001C
/* 00020 80B86150 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00024 80B86154 44050000 */ mfc1 $a1, $f0
/* 00028 80B86158 44070000 */ mfc1 $a3, $f0
/* 0002C 80B8615C 248400B4 */ addiu $a0, $a0, 0x00B4 ## $a0 = 000000B4
/* 00030 80B86160 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 00034 80B86164 0C00AC78 */ jal ActorShape_Init
/* 00038 80B86168 AFAE0038 */ sw $t6, 0x0038($sp)
/* 0003C 80B8616C 3C053DCC */ lui $a1, 0x3DCC ## $a1 = 3DCC0000
/* 00040 80B86170 34A5CCCD */ ori $a1, $a1, 0xCCCD ## $a1 = 3DCCCCCD
/* 00044 80B86174 0C00B58B */ jal Actor_SetScale
/* 00048 80B86178 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0004C 80B8617C 8FA20038 */ lw $v0, 0x0038($sp)
/* 00050 80B86180 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 00054 80B86184 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00058 80B86188 1040000B */ beq $v0, $zero, .L80B861B8
/* 0005C 80B8618C 3C0580B8 */ lui $a1, %hi(func_80B86494) ## $a1 = 80B80000
/* 00060 80B86190 1041000D */ beq $v0, $at, .L80B861C8
/* 00064 80B86194 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00068 80B86198 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 0006C 80B8619C 1041000F */ beq $v0, $at, .L80B861DC
/* 00070 80B861A0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00074 80B861A4 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
/* 00078 80B861A8 10410011 */ beq $v0, $at, .L80B861F0
/* 0007C 80B861AC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00080 80B861B0 10000038 */ beq $zero, $zero, .L80B86294
/* 00084 80B861B4 00000000 */ nop
.L80B861B8:
/* 00088 80B861B8 0C2E184C */ jal func_80B86130
/* 0008C 80B861BC 24A56494 */ addiu $a1, $a1, %lo(func_80B86494) ## $a1 = 80B86494
/* 00090 80B861C0 10000038 */ beq $zero, $zero, .L80B862A4
/* 00094 80B861C4 00000000 */ nop
.L80B861C8:
/* 00098 80B861C8 3C0580B8 */ lui $a1, %hi(func_80B865E0) ## $a1 = 80B80000
/* 0009C 80B861CC 0C2E184C */ jal func_80B86130
/* 000A0 80B861D0 24A565E0 */ addiu $a1, $a1, %lo(func_80B865E0) ## $a1 = 80B865E0
/* 000A4 80B861D4 10000033 */ beq $zero, $zero, .L80B862A4
/* 000A8 80B861D8 00000000 */ nop
.L80B861DC:
/* 000AC 80B861DC 3C0580B8 */ lui $a1, %hi(func_80B86640) ## $a1 = 80B80000
/* 000B0 80B861E0 0C2E184C */ jal func_80B86130
/* 000B4 80B861E4 24A56640 */ addiu $a1, $a1, %lo(func_80B86640) ## $a1 = 80B86640
/* 000B8 80B861E8 1000002E */ beq $zero, $zero, .L80B862A4
/* 000BC 80B861EC 00000000 */ nop
.L80B861F0:
/* 000C0 80B861F0 3C0580B8 */ lui $a1, %hi(func_80B866BC) ## $a1 = 80B80000
/* 000C4 80B861F4 0C2E184C */ jal func_80B86130
/* 000C8 80B861F8 24A566BC */ addiu $a1, $a1, %lo(func_80B866BC) ## $a1 = 80B866BC
/* 000CC 80B861FC 3C028016 */ lui $v0, %hi(gSaveContext)
/* 000D0 80B86200 2442E660 */ addiu $v0, %lo(gSaveContext)
/* 000D4 80B86204 944F0EE4 */ lhu $t7, 0x0EE4($v0) ## 8015F544
/* 000D8 80B86208 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000
/* 000DC 80B8620C 13000007 */ beq $t8, $zero, .L80B8622C
/* 000E0 80B86210 00000000 */ nop
/* 000E4 80B86214 94590EDC */ lhu $t9, 0x0EDC($v0) ## 8015F53C
/* 000E8 80B86218 8FA50044 */ lw $a1, 0x0044($sp)
/* 000EC 80B8621C 24060173 */ addiu $a2, $zero, 0x0173 ## $a2 = 00000173
/* 000F0 80B86220 33280008 */ andi $t0, $t9, 0x0008 ## $t0 = 00000000
/* 000F4 80B86224 11000005 */ beq $t0, $zero, .L80B8623C
/* 000F8 80B86228 24A41C24 */ addiu $a0, $a1, 0x1C24 ## $a0 = 00001C24
.L80B8622C:
/* 000FC 80B8622C 0C00B55C */ jal Actor_Kill
/* 00100 80B86230 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00104 80B86234 10000026 */ beq $zero, $zero, .L80B862D0
/* 00108 80B86238 8FBF0034 */ lw $ra, 0x0034($sp)
.L80B8623C:
/* 0010C 80B8623C 3C01C30C */ lui $at, 0xC30C ## $at = C30C0000
/* 00110 80B86240 44812000 */ mtc1 $at, $f4 ## $f4 = -140.00
/* 00114 80B86244 3C01445D */ lui $at, 0x445D ## $at = 445D0000
/* 00118 80B86248 44813000 */ mtc1 $at, $f6 ## $f6 = 884.00
/* 0011C 80B8624C 3C074395 */ lui $a3, 0x4395 ## $a3 = 43950000
/* 00120 80B86250 24090004 */ addiu $t1, $zero, 0x0004 ## $t1 = 00000004
/* 00124 80B86254 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001
/* 00128 80B86258 240B3800 */ addiu $t3, $zero, 0x3800 ## $t3 = 00003800
/* 0012C 80B8625C AFAB0024 */ sw $t3, 0x0024($sp)
/* 00130 80B86260 AFAA0020 */ sw $t2, 0x0020($sp)
/* 00134 80B86264 AFA9001C */ sw $t1, 0x001C($sp)
/* 00138 80B86268 34E78000 */ ori $a3, $a3, 0x8000 ## $a3 = 43958000
/* 0013C 80B8626C AFA00018 */ sw $zero, 0x0018($sp)
/* 00140 80B86270 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 00144 80B86274 0C00C7D4 */ jal Actor_Spawn
## ActorSpawn
/* 00148 80B86278 E7A60014 */ swc1 $f6, 0x0014($sp)
/* 0014C 80B8627C 3C053E4C */ lui $a1, 0x3E4C ## $a1 = 3E4C0000
/* 00150 80B86280 34A5CCCD */ ori $a1, $a1, 0xCCCD ## $a1 = 3E4CCCCD
/* 00154 80B86284 0C00B58B */ jal Actor_SetScale
/* 00158 80B86288 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0015C 80B8628C 10000005 */ beq $zero, $zero, .L80B862A4
/* 00160 80B86290 00000000 */ nop
.L80B86294:
/* 00164 80B86294 0C00B55C */ jal Actor_Kill
/* 00168 80B86298 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0016C 80B8629C 1000000C */ beq $zero, $zero, .L80B862D0
/* 00170 80B862A0 8FBF0034 */ lw $ra, 0x0034($sp)
.L80B862A4:
/* 00174 80B862A4 3C0480B8 */ lui $a0, %hi(D_80B86810) ## $a0 = 80B80000
/* 00178 80B862A8 24846810 */ addiu $a0, $a0, %lo(D_80B86810) ## $a0 = 80B86810
/* 0017C 80B862AC 0C000B84 */ jal LogUtils_LogThreadId
/* 00180 80B862B0 240500D2 */ addiu $a1, $zero, 0x00D2 ## $a1 = 000000D2
/* 00184 80B862B4 3C0480B8 */ lui $a0, %hi(D_80B86824) ## $a0 = 80B80000
/* 00188 80B862B8 24846824 */ addiu $a0, $a0, %lo(D_80B86824) ## $a0 = 80B86824
/* 0018C 80B862BC 0C00084C */ jal osSyncPrintf
/* 00190 80B862C0 8FA50038 */ lw $a1, 0x0038($sp)
/* 00194 80B862C4 240C0400 */ addiu $t4, $zero, 0x0400 ## $t4 = 00000400
/* 00198 80B862C8 A60C0150 */ sh $t4, 0x0150($s0) ## 00000150
/* 0019C 80B862CC 8FBF0034 */ lw $ra, 0x0034($sp)
.L80B862D0:
/* 001A0 80B862D0 8FB00030 */ lw $s0, 0x0030($sp)
/* 001A4 80B862D4 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 001A8 80B862D8 03E00008 */ jr $ra
/* 001AC 80B862DC 00000000 */ nop

View file

@ -1,10 +0,0 @@
glabel ItemOcarina_Update
/* 00658 80B86788 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 0065C 80B8678C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00660 80B86790 8C99014C */ lw $t9, 0x014C($a0) ## 0000014C
/* 00664 80B86794 0320F809 */ jalr $ra, $t9
/* 00668 80B86798 00000000 */ nop
/* 0066C 80B8679C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00670 80B867A0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00674 80B867A4 03E00008 */ jr $ra
/* 00678 80B867A8 00000000 */ nop

View file

@ -1,3 +0,0 @@
glabel func_80B86130
/* 00000 80B86130 03E00008 */ jr $ra
/* 00004 80B86134 AC85014C */ sw $a1, 0x014C($a0) ## 0000014C

View file

@ -1,122 +0,0 @@
.late_rodata
glabel D_80B86830
.word 0x44866000
glabel D_80B86834
.word 0xBDCCCCCD
glabel D_80B86838
.word 0x4462C000
.text
glabel func_80B862EC
/* 001BC 80B862EC 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 001C0 80B862F0 AFBF0024 */ sw $ra, 0x0024($sp)
/* 001C4 80B862F4 AFB10020 */ sw $s1, 0x0020($sp)
/* 001C8 80B862F8 AFB0001C */ sw $s0, 0x001C($sp)
/* 001CC 80B862FC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 001D0 80B86300 0C00B5FB */ jal func_8002D7EC
/* 001D4 80B86304 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 001D8 80B86308 86020150 */ lh $v0, 0x0150($s0) ## 00000150
/* 001DC 80B8630C C6000070 */ lwc1 $f0, 0x0070($s0) ## 00000070
/* 001E0 80B86310 C6020060 */ lwc1 $f2, 0x0060($s0) ## 00000060
/* 001E4 80B86314 860E00B4 */ lh $t6, 0x00B4($s0) ## 000000B4
/* 001E8 80B86318 861900B6 */ lh $t9, 0x00B6($s0) ## 000000B6
/* 001EC 80B8631C 4602003C */ c.lt.s $f0, $f2
/* 001F0 80B86320 00024080 */ sll $t0, $v0, 2
/* 001F4 80B86324 00027840 */ sll $t7, $v0, 1
/* 001F8 80B86328 01024023 */ subu $t0, $t0, $v0
/* 001FC 80B8632C 01CFC021 */ addu $t8, $t6, $t7
/* 00200 80B86330 03284821 */ addu $t1, $t9, $t0
/* 00204 80B86334 A61800B4 */ sh $t8, 0x00B4($s0) ## 000000B4
/* 00208 80B86338 4500000A */ bc1f .L80B86364
/* 0020C 80B8633C A60900B6 */ sh $t1, 0x00B6($s0) ## 000000B6
/* 00210 80B86340 C604006C */ lwc1 $f4, 0x006C($s0) ## 0000006C
/* 00214 80B86344 46041180 */ add.s $f6, $f2, $f4
/* 00218 80B86348 E6060060 */ swc1 $f6, 0x0060($s0) ## 00000060
/* 0021C 80B8634C C6080060 */ lwc1 $f8, 0x0060($s0) ## 00000060
/* 00220 80B86350 4600403C */ c.lt.s $f8, $f0
/* 00224 80B86354 00000000 */ nop
/* 00228 80B86358 45020003 */ bc1fl .L80B86368
/* 0022C 80B8635C 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74
/* 00230 80B86360 E6000060 */ swc1 $f0, 0x0060($s0) ## 00000060
.L80B86364:
/* 00234 80B86364 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74
.L80B86368:
/* 00238 80B86368 24010371 */ addiu $at, $zero, 0x0371 ## $at = 00000371
/* 0023C 80B8636C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00240 80B86370 14410014 */ bne $v0, $at, .L80B863C4
/* 00244 80B86374 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024
/* 00248 80B86378 3C01437A */ lui $at, 0x437A ## $at = 437A0000
/* 0024C 80B8637C 44815000 */ mtc1 $at, $f10 ## $f10 = 250.00
/* 00250 80B86380 3C014270 */ lui $at, 0x4270 ## $at = 42700000
/* 00254 80B86384 44818000 */ mtc1 $at, $f16 ## $f16 = 60.00
/* 00258 80B86388 3C0180B8 */ lui $at, %hi(D_80B86830) ## $at = 80B80000
/* 0025C 80B8638C E60A0024 */ swc1 $f10, 0x0024($s0) ## 00000024
/* 00260 80B86390 E6100028 */ swc1 $f16, 0x0028($s0) ## 00000028
/* 00264 80B86394 C4326830 */ lwc1 $f18, %lo(D_80B86830)($at)
/* 00268 80B86398 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 0026C 80B8639C 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00
/* 00270 80B863A0 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000
/* 00274 80B863A4 44813000 */ mtc1 $at, $f6 ## $f6 = -5.00
/* 00278 80B863A8 3C01C0E0 */ lui $at, 0xC0E0 ## $at = C0E00000
/* 0027C 80B863AC 44814000 */ mtc1 $at, $f8 ## $f8 = -7.00
/* 00280 80B863B0 E612002C */ swc1 $f18, 0x002C($s0) ## 0000002C
/* 00284 80B863B4 E604005C */ swc1 $f4, 0x005C($s0) ## 0000005C
/* 00288 80B863B8 E6060060 */ swc1 $f6, 0x0060($s0) ## 00000060
/* 0028C 80B863BC E6080064 */ swc1 $f8, 0x0064($s0) ## 00000064
/* 00290 80B863C0 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74
.L80B863C4:
/* 00294 80B863C4 24010381 */ addiu $at, $zero, 0x0381 ## $at = 00000381
/* 00298 80B863C8 1441001C */ bne $v0, $at, .L80B8643C
/* 0029C 80B863CC 24060064 */ addiu $a2, $zero, 0x0064 ## $a2 = 00000064
/* 002A0 80B863D0 240701F4 */ addiu $a3, $zero, 0x01F4 ## $a3 = 000001F4
/* 002A4 80B863D4 AFA00010 */ sw $zero, 0x0010($sp)
/* 002A8 80B863D8 0C00A511 */ jal func_80029444
/* 002AC 80B863DC AFA50030 */ sw $a1, 0x0030($sp)
/* 002B0 80B863E0 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001
/* 002B4 80B863E4 8FA50030 */ lw $a1, 0x0030($sp)
/* 002B8 80B863E8 AFAA0010 */ sw $t2, 0x0010($sp)
/* 002BC 80B863EC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 002C0 80B863F0 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 002C4 80B863F4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 002C8 80B863F8 0C00A527 */ jal func_8002949C
/* 002CC 80B863FC AFA00014 */ sw $zero, 0x0014($sp)
/* 002D0 80B86400 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 002D4 80B86404 3C0180B8 */ lui $at, %hi(D_80B86834) ## $at = 80B80000
/* 002D8 80B86408 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 002DC 80B8640C E600005C */ swc1 $f0, 0x005C($s0) ## 0000005C
/* 002E0 80B86410 E6000060 */ swc1 $f0, 0x0060($s0) ## 00000060
/* 002E4 80B86414 E6000064 */ swc1 $f0, 0x0064($s0) ## 00000064
/* 002E8 80B86418 C42A6834 */ lwc1 $f10, %lo(D_80B86834)($at)
/* 002EC 80B8641C 3C01BF00 */ lui $at, 0xBF00 ## $at = BF000000
/* 002F0 80B86420 44818000 */ mtc1 $at, $f16 ## $f16 = -0.50
/* 002F4 80B86424 A6000150 */ sh $zero, 0x0150($s0) ## 00000150
/* 002F8 80B86428 24052817 */ addiu $a1, $zero, 0x2817 ## $a1 = 00002817
/* 002FC 80B8642C E60A006C */ swc1 $f10, 0x006C($s0) ## 0000006C
/* 00300 80B86430 0C00BE0A */ jal Audio_PlayActorSound2
/* 00304 80B86434 E6100070 */ swc1 $f16, 0x0070($s0) ## 00000070
/* 00308 80B86438 96221D74 */ lhu $v0, 0x1D74($s1) ## 00001D74
.L80B8643C:
/* 0030C 80B8643C 2401038A */ addiu $at, $zero, 0x038A ## $at = 0000038A
/* 00310 80B86440 1441000F */ bne $v0, $at, .L80B86480
/* 00314 80B86444 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00318 80B86448 3C014389 */ lui $at, 0x4389 ## $at = 43890000
/* 0031C 80B8644C 44819000 */ mtc1 $at, $f18 ## $f18 = 274.00
/* 00320 80B86450 3C01C270 */ lui $at, 0xC270 ## $at = C2700000
/* 00324 80B86454 44812000 */ mtc1 $at, $f4 ## $f4 = -60.00
/* 00328 80B86458 3C0180B8 */ lui $at, %hi(D_80B86838) ## $at = 80B80000
/* 0032C 80B8645C C4266838 */ lwc1 $f6, %lo(D_80B86838)($at)
/* 00330 80B86460 27A50034 */ addiu $a1, $sp, 0x0034 ## $a1 = FFFFFFF4
/* 00334 80B86464 24060064 */ addiu $a2, $zero, 0x0064 ## $a2 = 00000064
/* 00338 80B86468 240701F4 */ addiu $a3, $zero, 0x01F4 ## $a3 = 000001F4
/* 0033C 80B8646C AFA00010 */ sw $zero, 0x0010($sp)
/* 00340 80B86470 E7B20034 */ swc1 $f18, 0x0034($sp)
/* 00344 80B86474 E7A40038 */ swc1 $f4, 0x0038($sp)
/* 00348 80B86478 0C00A511 */ jal func_80029444
/* 0034C 80B8647C E7A6003C */ swc1 $f6, 0x003C($sp)
.L80B86480:
/* 00350 80B86480 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00354 80B86484 8FB0001C */ lw $s0, 0x001C($sp)
/* 00358 80B86488 8FB10020 */ lw $s1, 0x0020($sp)
/* 0035C 80B8648C 03E00008 */ jr $ra
/* 00360 80B86490 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000

View file

@ -1,28 +0,0 @@
.late_rodata
glabel D_80B8683C
.word 0xBE99999A
.text
glabel func_80B86494
/* 00364 80B86494 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00368 80B86498 3C0180B8 */ lui $at, %hi(D_80B8683C) ## $at = 80B80000
/* 0036C 80B8649C C424683C */ lwc1 $f4, %lo(D_80B8683C)($at)
/* 00370 80B864A0 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00374 80B864A4 AFA5001C */ sw $a1, 0x001C($sp)
/* 00378 80B864A8 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000
/* 0037C 80B864AC 44813000 */ mtc1 $at, $f6 ## $f6 = -5.00
/* 00380 80B864B0 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 00384 80B864B4 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000
/* 00388 80B864B8 44814000 */ mtc1 $at, $f8 ## $f8 = 6.00
/* 0038C 80B864BC 3C0580B8 */ lui $a1, %hi(func_80B862EC) ## $a1 = 80B80000
/* 00390 80B864C0 24A562EC */ addiu $a1, $a1, %lo(func_80B862EC) ## $a1 = 80B862EC
/* 00394 80B864C4 E484006C */ swc1 $f4, 0x006C($a0) ## 0000006C
/* 00398 80B864C8 E4860070 */ swc1 $f6, 0x0070($a0) ## 00000070
/* 0039C 80B864CC E480005C */ swc1 $f0, 0x005C($a0) ## 0000005C
/* 003A0 80B864D0 E4800064 */ swc1 $f0, 0x0064($a0) ## 00000064
/* 003A4 80B864D4 0C2E184C */ jal func_80B86130
/* 003A8 80B864D8 E4880060 */ swc1 $f8, 0x0060($a0) ## 00000060
/* 003AC 80B864DC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 003B0 80B864E0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 003B4 80B864E4 03E00008 */ jr $ra
/* 003B8 80B864E8 00000000 */ nop

View file

@ -1,72 +0,0 @@
.late_rodata
glabel D_80B86840
.word 0x44D2C000
glabel D_80B86844
.word 0xBE19999A
.text
glabel func_80B864EC
/* 003BC 80B864EC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 003C0 80B864F0 AFBF0014 */ sw $ra, 0x0014($sp)
/* 003C4 80B864F4 AFA5001C */ sw $a1, 0x001C($sp)
/* 003C8 80B864F8 0C00B5FB */ jal func_8002D7EC
/* 003CC 80B864FC AFA40018 */ sw $a0, 0x0018($sp)
/* 003D0 80B86500 8FA40018 */ lw $a0, 0x0018($sp)
/* 003D4 80B86504 84820150 */ lh $v0, 0x0150($a0) ## 00000150
/* 003D8 80B86508 C4800070 */ lwc1 $f0, 0x0070($a0) ## 00000070
/* 003DC 80B8650C C4820060 */ lwc1 $f2, 0x0060($a0) ## 00000060
/* 003E0 80B86510 848E00B4 */ lh $t6, 0x00B4($a0) ## 000000B4
/* 003E4 80B86514 849900B6 */ lh $t9, 0x00B6($a0) ## 000000B6
/* 003E8 80B86518 4602003C */ c.lt.s $f0, $f2
/* 003EC 80B8651C 00024080 */ sll $t0, $v0, 2
/* 003F0 80B86520 00027840 */ sll $t7, $v0, 1
/* 003F4 80B86524 01024023 */ subu $t0, $t0, $v0
/* 003F8 80B86528 01CFC021 */ addu $t8, $t6, $t7
/* 003FC 80B8652C 03284821 */ addu $t1, $t9, $t0
/* 00400 80B86530 A49800B4 */ sh $t8, 0x00B4($a0) ## 000000B4
/* 00404 80B86534 4500000A */ bc1f .L80B86560
/* 00408 80B86538 A48900B6 */ sh $t1, 0x00B6($a0) ## 000000B6
/* 0040C 80B8653C C484006C */ lwc1 $f4, 0x006C($a0) ## 0000006C
/* 00410 80B86540 46041180 */ add.s $f6, $f2, $f4
/* 00414 80B86544 E4860060 */ swc1 $f6, 0x0060($a0) ## 00000060
/* 00418 80B86548 C4880060 */ lwc1 $f8, 0x0060($a0) ## 00000060
/* 0041C 80B8654C 4600403C */ c.lt.s $f8, $f0
/* 00420 80B86550 00000000 */ nop
/* 00424 80B86554 45020003 */ bc1fl .L80B86564
/* 00428 80B86558 8FAA001C */ lw $t2, 0x001C($sp)
/* 0042C 80B8655C E4800060 */ swc1 $f0, 0x0060($a0) ## 00000060
.L80B86560:
/* 00430 80B86560 8FAA001C */ lw $t2, 0x001C($sp)
.L80B86564:
/* 00434 80B86564 240100DC */ addiu $at, $zero, 0x00DC ## $at = 000000DC
/* 00438 80B86568 954B1D74 */ lhu $t3, 0x1D74($t2) ## 00001D74
/* 0043C 80B8656C 15610018 */ bne $t3, $at, .L80B865D0
/* 00440 80B86570 3C014310 */ lui $at, 0x4310 ## $at = 43100000
/* 00444 80B86574 44815000 */ mtc1 $at, $f10 ## $f10 = 144.00
/* 00448 80B86578 3C0142A0 */ lui $at, 0x42A0 ## $at = 42A00000
/* 0044C 80B8657C 44818000 */ mtc1 $at, $f16 ## $f16 = 80.00
/* 00450 80B86580 3C0180B8 */ lui $at, %hi(D_80B86840) ## $at = 80B80000
/* 00454 80B86584 E48A0024 */ swc1 $f10, 0x0024($a0) ## 00000024
/* 00458 80B86588 E4900028 */ swc1 $f16, 0x0028($a0) ## 00000028
/* 0045C 80B8658C C4326840 */ lwc1 $f18, %lo(D_80B86840)($at)
/* 00460 80B86590 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00464 80B86594 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00
/* 00468 80B86598 3C014000 */ lui $at, 0x4000 ## $at = 40000000
/* 0046C 80B8659C 44813000 */ mtc1 $at, $f6 ## $f6 = 2.00
/* 00470 80B865A0 3C01C0E0 */ lui $at, 0xC0E0 ## $at = C0E00000
/* 00474 80B865A4 44814000 */ mtc1 $at, $f8 ## $f8 = -7.00
/* 00478 80B865A8 3C0180B8 */ lui $at, %hi(D_80B86844) ## $at = 80B80000
/* 0047C 80B865AC E492002C */ swc1 $f18, 0x002C($a0) ## 0000002C
/* 00480 80B865B0 E484005C */ swc1 $f4, 0x005C($a0) ## 0000005C
/* 00484 80B865B4 E4860060 */ swc1 $f6, 0x0060($a0) ## 00000060
/* 00488 80B865B8 E4880064 */ swc1 $f8, 0x0064($a0) ## 00000064
/* 0048C 80B865BC C42A6844 */ lwc1 $f10, %lo(D_80B86844)($at)
/* 00490 80B865C0 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000
/* 00494 80B865C4 44818000 */ mtc1 $at, $f16 ## $f16 = -5.00
/* 00498 80B865C8 E48A006C */ swc1 $f10, 0x006C($a0) ## 0000006C
/* 0049C 80B865CC E4900070 */ swc1 $f16, 0x0070($a0) ## 00000070
.L80B865D0:
/* 004A0 80B865D0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 004A4 80B865D4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 004A8 80B865D8 03E00008 */ jr $ra
/* 004AC 80B865DC 00000000 */ nop

View file

@ -1,30 +0,0 @@
.late_rodata
glabel D_80B86848
.word 0xBE99999A
.text
glabel func_80B865E0
/* 004B0 80B865E0 3C0180B8 */ lui $at, %hi(D_80B86848) ## $at = 80B80000
/* 004B4 80B865E4 C4246848 */ lwc1 $f4, %lo(D_80B86848)($at)
/* 004B8 80B865E8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 004BC 80B865EC 3C01C0A0 */ lui $at, 0xC0A0 ## $at = C0A00000
/* 004C0 80B865F0 44813000 */ mtc1 $at, $f6 ## $f6 = -5.00
/* 004C4 80B865F4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 004C8 80B865F8 AFA5001C */ sw $a1, 0x001C($sp)
/* 004CC 80B865FC 3C014080 */ lui $at, 0x4080 ## $at = 40800000
/* 004D0 80B86600 44815000 */ mtc1 $at, $f10 ## $f10 = 4.00
/* 004D4 80B86604 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000
/* 004D8 80B86608 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 004DC 80B8660C 44818000 */ mtc1 $at, $f16 ## $f16 = 6.00
/* 004E0 80B86610 3C0580B8 */ lui $a1, %hi(func_80B864EC) ## $a1 = 80B80000
/* 004E4 80B86614 24A564EC */ addiu $a1, $a1, %lo(func_80B864EC) ## $a1 = 80B864EC
/* 004E8 80B86618 E484006C */ swc1 $f4, 0x006C($a0) ## 0000006C
/* 004EC 80B8661C E4860070 */ swc1 $f6, 0x0070($a0) ## 00000070
/* 004F0 80B86620 E48A0060 */ swc1 $f10, 0x0060($a0) ## 00000060
/* 004F4 80B86624 E488005C */ swc1 $f8, 0x005C($a0) ## 0000005C
/* 004F8 80B86628 0C2E184C */ jal func_80B86130
/* 004FC 80B8662C E4900064 */ swc1 $f16, 0x0064($a0) ## 00000064
/* 00500 80B86630 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00504 80B86634 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00508 80B86638 03E00008 */ jr $ra
/* 0050C 80B8663C 00000000 */ nop

View file

@ -1,4 +0,0 @@
glabel func_80B86640
/* 00510 80B86640 AFA40000 */ sw $a0, 0x0000($sp)
/* 00514 80B86644 03E00008 */ jr $ra
/* 00518 80B86648 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,30 +0,0 @@
glabel func_80B8664C
/* 0051C 80B8664C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00520 80B86650 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00524 80B86654 0C00BCCD */ jal func_8002F334
/* 00528 80B86658 AFA5001C */ sw $a1, 0x001C($sp)
/* 0052C 80B8665C 10400013 */ beq $v0, $zero, .L80B866AC
/* 00530 80B86660 3C198016 */ lui $t9, %hi(gSegments)
/* 00534 80B86664 3C020201 */ lui $v0, 0x0201 ## $v0 = 02010000
/* 00538 80B86668 2442F870 */ addiu $v0, $v0, 0xF870 ## $v0 = 0200F870
/* 0053C 80B8666C 00027100 */ sll $t6, $v0, 4
/* 00540 80B86670 000E7F02 */ srl $t7, $t6, 28
/* 00544 80B86674 000FC080 */ sll $t8, $t7, 2
/* 00548 80B86678 0338C821 */ addu $t9, $t9, $t8
/* 0054C 80B8667C 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000
/* 00550 80B86680 8F396FA8 */ lw $t9, %lo(gSegments)($t9)
/* 00554 80B86684 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF
/* 00558 80B86688 00414024 */ and $t0, $v0, $at
/* 0055C 80B8668C 8FAB001C */ lw $t3, 0x001C($sp)
/* 00560 80B86690 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 00564 80B86694 03284821 */ addu $t1, $t9, $t0
/* 00568 80B86698 01215021 */ addu $t2, $t1, $at
/* 0056C 80B8669C 3C018016 */ lui $at, %hi(gSaveContext+0x1414)
/* 00570 80B866A0 240C0001 */ addiu $t4, $zero, 0x0001 ## $t4 = 00000001
/* 00574 80B866A4 AD6A1D68 */ sw $t2, 0x1D68($t3) ## 00001D68
/* 00578 80B866A8 A02CFA74 */ sb $t4, %lo(gSaveContext+0x1414)($at)
.L80B866AC:
/* 0057C 80B866AC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00580 80B866B0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00584 80B866B4 03E00008 */ jr $ra
/* 00588 80B866B8 00000000 */ nop

View file

@ -1,60 +0,0 @@
.late_rodata
glabel D_80B8684C
.word 0x3E051EB8
.text
glabel func_80B866BC
/* 0058C 80B866BC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 00590 80B866C0 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00594 80B866C4 AFB10020 */ sw $s1, 0x0020($sp)
/* 00598 80B866C8 AFB0001C */ sw $s0, 0x001C($sp)
/* 0059C 80B866CC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 005A0 80B866D0 0C00BD04 */ jal func_8002F410
/* 005A4 80B866D4 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 005A8 80B866D8 1040000E */ beq $v0, $zero, .L80B86714
/* 005AC 80B866DC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 005B0 80B866E0 3C028016 */ lui $v0, %hi(gSaveContext)
/* 005B4 80B866E4 2442E660 */ addiu $v0, %lo(gSaveContext)
/* 005B8 80B866E8 944E0EDC */ lhu $t6, 0x0EDC($v0) ## 8015F53C
/* 005BC 80B866EC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 005C0 80B866F0 24050003 */ addiu $a1, $zero, 0x0003 ## $a1 = 00000003
/* 005C4 80B866F4 35CF0008 */ ori $t7, $t6, 0x0008 ## $t7 = 00000008
/* 005C8 80B866F8 0C00B2DD */ jal Flags_SetSwitch
/* 005CC 80B866FC A44F0EDC */ sh $t7, 0x0EDC($v0) ## 8015F53C
/* 005D0 80B86700 3C1880B8 */ lui $t8, %hi(func_80B8664C) ## $t8 = 80B80000
/* 005D4 80B86704 2718664C */ addiu $t8, $t8, %lo(func_80B8664C) ## $t8 = 80B8664C
/* 005D8 80B86708 AE18014C */ sw $t8, 0x014C($s0) ## 0000014C
/* 005DC 80B8670C 10000019 */ beq $zero, $zero, .L80B86774
/* 005E0 80B86710 AE000134 */ sw $zero, 0x0134($s0) ## 00000134
.L80B86714:
/* 005E4 80B86714 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 005E8 80B86718 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00
/* 005EC 80B8671C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
/* 005F0 80B86720 2406000C */ addiu $a2, $zero, 0x000C ## $a2 = 0000000C
/* 005F4 80B86724 3C0741F0 */ lui $a3, 0x41F0 ## $a3 = 41F00000
/* 005F8 80B86728 0C00BD0D */ jal func_8002F434
/* 005FC 80B8672C E7A40010 */ swc1 $f4, 0x0010($sp)
/* 00600 80B86730 3C190001 */ lui $t9, 0x0001 ## $t9 = 00010000
/* 00604 80B86734 0331C821 */ addu $t9, $t9, $s1
/* 00608 80B86738 8F391DE4 */ lw $t9, 0x1DE4($t9) ## 00011DE4
/* 0060C 80B8673C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00610 80B86740 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024
/* 00614 80B86744 3328000D */ andi $t0, $t9, 0x000D ## $t0 = 00000000
/* 00618 80B86748 1500000A */ bne $t0, $zero, .L80B86774
/* 0061C 80B8674C 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 00620 80B86750 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 00624 80B86754 44813000 */ mtc1 $at, $f6 ## $f6 = 10.00
/* 00628 80B86758 3C0180B8 */ lui $at, %hi(D_80B8684C) ## $at = 80B80000
/* 0062C 80B8675C C428684C */ lwc1 $f8, %lo(D_80B8684C)($at)
/* 00630 80B86760 44060000 */ mfc1 $a2, $f0
/* 00634 80B86764 44070000 */ mfc1 $a3, $f0
/* 00638 80B86768 E7A60010 */ swc1 $f6, 0x0010($sp)
/* 0063C 80B8676C 0C00A4F9 */ jal func_800293E4
/* 00640 80B86770 E7A80014 */ swc1 $f8, 0x0014($sp)
.L80B86774:
/* 00644 80B86774 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00648 80B86778 8FB0001C */ lw $s0, 0x001C($sp)
/* 0064C 80B8677C 8FB10020 */ lw $s1, 0x0020($sp)
/* 00650 80B86780 03E00008 */ jr $ra
/* 00654 80B86784 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000

View file

@ -1,18 +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 Item_Ocarina_InitVars
.word 0x00F10700, 0x00000010, 0x00DE0000, 0x00000154
.word ItemOcarina_Init
.word ItemOcarina_Destroy
.word ItemOcarina_Update
.word ItemOcarina_Draw

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_80B86850
.incbin "baserom/ovl_Item_Ocarina", 0x720, 0x000000D0

View file

@ -237,9 +237,9 @@ void func_800292DC(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* ve
Color_RGBA8* envColor, Color_RGBA8* primColor);
// ? func_80029320(?);
// ? func_800293A0(?);
void func_800293E4(GlobalContext*, Vec3f* pos, f32, f32, f32, f32);
// ? func_80029444(?);
// ? func_8002949C(?);
void func_800293E4(GlobalContext* globalCtx, Vec3f* pos, f32, f32, f32, f32);
void func_80029444(GlobalContext* globalCtx, Vec3f* pos, u32, u32, u32);
void func_8002949C(GlobalContext* globalCtx, Vec3f* pos, u32, u32, u32, u32);
// ? func_80029530(?);
// ? func_80029568(?);
// ? func_800295A0(?);

BIN
qemu-irix Executable file

Binary file not shown.

3
spec
View file

@ -3467,8 +3467,7 @@ endseg
beginseg
name "ovl_Item_Ocarina"
include "build/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.o"
include "build/data/overlays/actors/z_item_ocarina.data.o"
include "build/data/overlays/actors/z_item_ocarina.reloc.o"
include "build/src/overlays/actors/ovl_Item_Ocarina/ovl_Item_Ocarina_reloc.o"
endseg
beginseg

View file

@ -15,7 +15,14 @@ void ItemOcarina_Destroy(Actor* thisx, GlobalContext* globalCtx);
void ItemOcarina_Update(Actor* thisx, GlobalContext* globalCtx);
void ItemOcarina_Draw(Actor* thisx, GlobalContext* globalCtx);
/*
void ItemOcarina_GetThrown(ItemOcarina* this, GlobalContext* globalCtx);
void ItemOcarina_Fly(ItemOcarina* this, GlobalContext* globalCtx);
void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx);
void ItemOcarina_StartSoTCutscene(ItemOcarina* this, GlobalContext* globalCtx);
void func_80B864EC(ItemOcarina* this, GlobalContext* globalCtx);
void func_80B865E0(ItemOcarina* this, GlobalContext* globalCtx);
void ItemOcarina_DoNothing(ItemOcarina* this, GlobalContext* globalCtx);
const ActorInit Item_Ocarina_InitVars = {
ACTOR_ITEM_OCARINA,
ACTORTYPE_ITEMACTION,
@ -27,27 +34,173 @@ const ActorInit Item_Ocarina_InitVars = {
(ActorFunc)ItemOcarina_Update,
(ActorFunc)ItemOcarina_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86130.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Init.s")
extern CutsceneData D_0200F870[]; // song of time cutscene
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Destroy.s")
void ItemOcarina_SetupAction(ItemOcarina* this, ItemOcarinaActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B862EC.s")
void ItemOcarina_Init(Actor* thisx, GlobalContext* globalCtx) {
ItemOcarina* this = THIS;
s32 params = thisx->params;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86494.s")
ActorShape_Init(&this->actor.shape, 0, 0, 0);
Actor_SetScale(&this->actor, 0.1f);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B864EC.s")
switch (params) {
case 0:
ItemOcarina_SetupAction(this, ItemOcarina_GetThrown);
break;
case 1:
ItemOcarina_SetupAction(this, func_80B865E0);
break;
case 2:
ItemOcarina_SetupAction(this, ItemOcarina_DoNothing);
break;
case 3:
ItemOcarina_SetupAction(this, ItemOcarina_WaitInWater);
if (!(gSaveContext.eventChkInf[8] & 1) || (gSaveContext.eventChkInf[4] & 8)) {
Actor_Kill(thisx);
return;
}
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ELF_MSG2, 299.0f, -140.0f, 884.0f, 0, 4, 1, 0x3800);
Actor_SetScale(thisx, 0.2f);
break;
default:
Actor_Kill(thisx);
return;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B865E0.s")
LOG_NUM("no", params, "../z_item_ocarina.c", 210);
this->spinRotOffset = 0x400;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B86640.s")
void ItemOcarina_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B8664C.s")
void ItemOcarina_Fly(ItemOcarina* this, GlobalContext* globalCtx) {
Vec3f ripplePos;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/func_80B866BC.s")
func_8002D7EC(&this->actor);
this->actor.shape.rot.x += this->spinRotOffset * 2;
this->actor.shape.rot.y += this->spinRotOffset * 3;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Update.s")
if (this->actor.minVelocityY < this->actor.velocity.y) {
this->actor.velocity.y += this->actor.gravity;
if (this->actor.velocity.y < this->actor.minVelocityY) {
this->actor.velocity.y = this->actor.minVelocityY;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Item_Ocarina/ItemOcarina_Draw.s")
if (globalCtx->csCtx.frames == 881) {
this->actor.posRot.pos.x = 250.0f;
this->actor.posRot.pos.y = 60.0f;
this->actor.posRot.pos.z = 1075.0f;
this->actor.velocity.x = 1.0f;
this->actor.velocity.y = -5.0f;
this->actor.velocity.z = -7.0f;
}
if (globalCtx->csCtx.frames == 897) {
func_80029444(globalCtx, &this->actor.posRot.pos, 100, 500, 0);
func_8002949C(globalCtx, &this->actor.posRot.pos, 0, 0, 1, 0);
this->actor.velocity.x = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.velocity.z = 0.0f;
this->actor.gravity = -0.1f;
this->actor.minVelocityY = -0.5f;
this->spinRotOffset = 0;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMB_DROP_WATER);
}
// landed in water
if (globalCtx->csCtx.frames == 906) {
ripplePos.x = 274.0f;
ripplePos.y = -60.0f;
ripplePos.z = 907.0f;
func_80029444(globalCtx, &ripplePos, 100, 500, 0);
}
}
void ItemOcarina_GetThrown(ItemOcarina* this, GlobalContext* globalCtx) {
this->actor.gravity = -0.3f;
this->actor.minVelocityY = -5.0f;
this->actor.velocity.x = 0.0f;
this->actor.velocity.y = 6.0f;
this->actor.velocity.z = 0.0f;
ItemOcarina_SetupAction(this, ItemOcarina_Fly);
}
void func_80B864EC(ItemOcarina* this, GlobalContext* globalCtx) {
func_8002D7EC(&this->actor);
this->actor.shape.rot.x += this->spinRotOffset * 2;
this->actor.shape.rot.y += this->spinRotOffset * 3;
if (this->actor.minVelocityY < this->actor.velocity.y) {
this->actor.velocity.y += this->actor.gravity;
if (this->actor.velocity.y < this->actor.minVelocityY) {
this->actor.velocity.y = this->actor.minVelocityY;
}
}
if (globalCtx->csCtx.frames == 220) {
this->actor.posRot.pos.x = 144.0f;
this->actor.posRot.pos.y = 80.0f;
this->actor.posRot.pos.z = 1686.0f;
this->actor.velocity.x = 1.0f;
this->actor.velocity.y = 2.0f;
this->actor.velocity.z = -7.0f;
this->actor.gravity = -0.15f;
this->actor.minVelocityY = -5.0f;
}
}
void func_80B865E0(ItemOcarina* this, GlobalContext* globalCtx) {
this->actor.gravity = -0.3f;
this->actor.minVelocityY = -5.0f;
this->actor.velocity.x = 0.0f;
this->actor.velocity.y = 4.0f;
this->actor.velocity.z = 6.0f;
ItemOcarina_SetupAction(this, func_80B864EC);
}
void ItemOcarina_DoNothing(ItemOcarina* this, GlobalContext* globalCtx) {
}
void ItemOcarina_StartSoTCutscene(ItemOcarina* this, GlobalContext* globalCtx) {
if (func_8002F334(&this->actor, globalCtx)) {
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(D_0200F870);
gSaveContext.cutsceneTrigger = 1;
}
}
void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx) {
if (func_8002F410(&this->actor, globalCtx)) {
gSaveContext.eventChkInf[4] |= 8;
Flags_SetSwitch(globalCtx, 3);
this->actionFunc = ItemOcarina_StartSoTCutscene;
this->actor.draw = NULL;
} else {
func_8002F434(&this->actor, globalCtx, GI_OCARINA_OOT, 30.0f, 50.0f);
if ((globalCtx->gameplayFrames & 13) == 0) {
func_800293E4(globalCtx, &this->actor.posRot.pos, 0.0f, 0.0f, 10.0f, 0.13f);
}
}
}
void ItemOcarina_Update(Actor* thisx, GlobalContext* globalCtx) {
ItemOcarina* this = THIS;
this->actionFunc(this, globalCtx);
}
void ItemOcarina_Draw(Actor* thisx, GlobalContext* globalCtx) {
ItemOcarina* this = THIS;
func_8002EBCC(thisx, globalCtx, 0);
func_8002ED80(thisx, globalCtx, 0);
func_800694A0(globalCtx, 0x2E);
}

View file

@ -6,9 +6,12 @@
struct ItemOcarina;
typedef void (*ItemOcarinaActionFunc)(struct ItemOcarina*, GlobalContext*);
typedef struct ItemOcarina {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x8];
/* 0x014C */ ItemOcarinaActionFunc actionFunc;
/* 0x0150 */ s16 spinRotOffset;
} ItemOcarina; // size = 0x0154
extern const ActorInit Item_Ocarina_InitVars;

View file

@ -869,6 +869,9 @@ D_0600FE40 = 0x0600FE40;
D_0400CD80 = 0x0400CD80;
D_040184B0 = 0x040184B0;
// z_item_ocarina
D_0200F870 = 0x0200F870;
// z_bg_ingate
D_060011B8 = 0x060011B8;
D_06001040 = 0x06001040;