1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 07:07:09 +00:00

En_Wonder_Item (#451)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* wonder item and incidental cleanup on wondertalk2

* merge update

* now with function names

* static variables

* the macros will rise again

* better (?) translation

* fix names
This commit is contained in:
petrie911 2020-11-21 13:18:14 -06:00 committed by GitHub
parent cf24a76fe4
commit 84a0acc9cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 475 additions and 1149 deletions

View file

@ -1,20 +0,0 @@
glabel EnWonderItem_Destroy
/* 00000 80B38060 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00004 80B38064 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00008 80B38068 848E01C0 */ lh $t6, 0x01C0($a0) ## 000001C0
/* 0000C 80B3806C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 00010 80B38070 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000
/* 00014 80B38074 15C00004 */ bne $t6, $zero, .L80B38088
/* 00018 80B38078 24C50180 */ addiu $a1, $a2, 0x0180 ## $a1 = 00000180
/* 0001C 80B3807C 848F01C2 */ lh $t7, 0x01C2($a0) ## 000001C2
/* 00020 80B38080 51E00004 */ beql $t7, $zero, .L80B38094
/* 00024 80B38084 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B38088:
/* 00028 80B38088 0C0170EB */ jal Collider_DestroyCylinder
/* 0002C 80B3808C 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
/* 00030 80B38090 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B38094:
/* 00034 80B38094 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00038 80B38098 03E00008 */ jr $ra
/* 0003C 80B3809C 00000000 */ nop

View file

@ -1,280 +0,0 @@
.rdata
glabel D_80B38E10
.asciz "\n\n"
.balign 4
glabel D_80B38E14
.asciz "\x1b[32m %x\n\x1b[m"
.balign 4
glabel D_80B38E54
.asciz "\x1b[32m %d\n\x1b[m"
.balign 4
.late_rodata
glabel jtbl_80B38ECC
.word L80B382D8
.word L80B38338
.word L80B38388
.word L80B383A4
.word L80B3855C
.word L80B38410
.word L80B38470
.word L80B384C0
.word L80B384D0
.word L80B38538
.word 0x00000000, 0x00000000, 0x00000000
.text
glabel EnWonderItem_Init
/* 0019C 80B381FC 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 001A0 80B38200 AFB00018 */ sw $s0, 0x0018($sp)
/* 001A4 80B38204 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 001A8 80B38208 AFBF001C */ sw $ra, 0x001C($sp)
/* 001AC 80B3820C 3C0480B4 */ lui $a0, %hi(D_80B38E10) ## $a0 = 80B40000
/* 001B0 80B38210 AFA5003C */ sw $a1, 0x003C($sp)
/* 001B4 80B38214 0C00084C */ jal osSyncPrintf
/* 001B8 80B38218 24848E10 */ addiu $a0, $a0, %lo(D_80B38E10) ## $a0 = 80B38E10
/* 001BC 80B3821C 3C0480B4 */ lui $a0, %hi(D_80B38E14) ## $a0 = 80B40000
/* 001C0 80B38220 24848E14 */ addiu $a0, $a0, %lo(D_80B38E14) ## $a0 = 80B38E14
/* 001C4 80B38224 0C00084C */ jal osSyncPrintf
/* 001C8 80B38228 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 001CC 80B3822C 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 001D0 80B38230 8E0E0004 */ lw $t6, 0x0004($s0) ## 00000004
/* 001D4 80B38234 2401FFFE */ addiu $at, $zero, 0xFFFE ## $at = FFFFFFFE
/* 001D8 80B38238 304A003F */ andi $t2, $v0, 0x003F ## $t2 = 00000000
/* 001DC 80B3823C A60A0162 */ sh $t2, 0x0162($s0) ## 00000162
/* 001E0 80B38240 86050162 */ lh $a1, 0x0162($s0) ## 00000162
/* 001E4 80B38244 0002C2C3 */ sra $t8, $v0, 11
/* 001E8 80B38248 00024183 */ sra $t0, $v0, 6
/* 001EC 80B3824C 01C17824 */ and $t7, $t6, $at
/* 001F0 80B38250 3319001F */ andi $t9, $t8, 0x001F ## $t9 = 00000000
/* 001F4 80B38254 3109001F */ andi $t1, $t0, 0x001F ## $t1 = 00000000
/* 001F8 80B38258 2401003F */ addiu $at, $zero, 0x003F ## $at = 0000003F
/* 001FC 80B3825C AE0F0004 */ sw $t7, 0x0004($s0) ## 00000004
/* 00200 80B38260 A6190154 */ sh $t9, 0x0154($s0) ## 00000154
/* 00204 80B38264 14A10004 */ bne $a1, $at, .L80B38278
/* 00208 80B38268 A6090156 */ sh $t1, 0x0156($s0) ## 00000156
/* 0020C 80B3826C 240BFFFF */ addiu $t3, $zero, 0xFFFF ## $t3 = FFFFFFFF
/* 00210 80B38270 A60B0162 */ sh $t3, 0x0162($s0) ## 00000162
/* 00214 80B38274 86050162 */ lh $a1, 0x0162($s0) ## 00000162
.L80B38278:
/* 00218 80B38278 240C0001 */ addiu $t4, $zero, 0x0001 ## $t4 = 00000001
/* 0021C 80B3827C 04A0000D */ bltz $a1, .L80B382B4
/* 00220 80B38280 A20C001F */ sb $t4, 0x001F($s0) ## 0000001F
/* 00224 80B38284 0C00B2D0 */ jal Flags_GetSwitch
/* 00228 80B38288 8FA4003C */ lw $a0, 0x003C($sp)
/* 0022C 80B3828C 5040000A */ beql $v0, $zero, .L80B382B8
/* 00230 80B38290 960D0154 */ lhu $t5, 0x0154($s0) ## 00000154
/* 00234 80B38294 3C0480B4 */ lui $a0, %hi(D_80B38E54) ## $a0 = 80B40000
/* 00238 80B38298 24848E54 */ addiu $a0, $a0, %lo(D_80B38E54) ## $a0 = 80B38E54
/* 0023C 80B3829C 0C00084C */ jal osSyncPrintf
/* 00240 80B382A0 86050162 */ lh $a1, 0x0162($s0) ## 00000162
/* 00244 80B382A4 0C00B55C */ jal Actor_Kill
/* 00248 80B382A8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0024C 80B382AC 100000AC */ beq $zero, $zero, .L80B38560
/* 00250 80B382B0 8FBF001C */ lw $ra, 0x001C($sp)
.L80B382B4:
/* 00254 80B382B4 960D0154 */ lhu $t5, 0x0154($s0) ## 00000154
.L80B382B8:
/* 00258 80B382B8 2DA1000A */ sltiu $at, $t5, 0x000A
/* 0025C 80B382BC 102000A5 */ beq $at, $zero, .L80B38554
/* 00260 80B382C0 000D6880 */ sll $t5, $t5, 2
/* 00264 80B382C4 3C0180B4 */ lui $at, %hi(jtbl_80B38ECC) ## $at = 80B40000
/* 00268 80B382C8 002D0821 */ addu $at, $at, $t5
/* 0026C 80B382CC 8C2D8ECC */ lw $t5, %lo(jtbl_80B38ECC)($at)
/* 00270 80B382D0 01A00008 */ jr $t5
/* 00274 80B382D4 00000000 */ nop
glabel L80B382D8
/* 00278 80B382D8 86020034 */ lh $v0, 0x0034($s0) ## 00000034
/* 0027C 80B382DC 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
/* 00280 80B382E0 3C0880B4 */ lui $t0, %hi(func_80B38570) ## $t0 = 80B40000
/* 00284 80B382E4 304E000F */ andi $t6, $v0, 0x000F ## $t6 = 00000000
/* 00288 80B382E8 2841000A */ slti $at, $v0, 0x000A
/* 0028C 80B382EC 1420000A */ bne $at, $zero, .L80B38318
/* 00290 80B382F0 A60E0158 */ sh $t6, 0x0158($s0) ## 00000158
/* 00294 80B382F4 2401000A */ addiu $at, $zero, 0x000A ## $at = 0000000A
/* 00298 80B382F8 0041001A */ div $zero, $v0, $at
/* 0029C 80B382FC 00001812 */ mflo $v1
/* 002A0 80B38300 00031C00 */ sll $v1, $v1, 16
/* 002A4 80B38304 00031C03 */ sra $v1, $v1, 16
/* 002A8 80B38308 00037880 */ sll $t7, $v1, 2
/* 002AC 80B3830C 01E37821 */ addu $t7, $t7, $v1
/* 002B0 80B38310 000F7880 */ sll $t7, $t7, 2
/* 002B4 80B38314 A60F016A */ sh $t7, 0x016A($s0) ## 0000016A
.L80B38318:
/* 002B8 80B38318 0003C080 */ sll $t8, $v1, 2
/* 002BC 80B3831C 0303C021 */ addu $t8, $t8, $v1
/* 002C0 80B38320 0018C040 */ sll $t8, $t8, 1
/* 002C4 80B38324 0058C823 */ subu $t9, $v0, $t8
/* 002C8 80B38328 25088570 */ addiu $t0, $t0, %lo(func_80B38570) ## $t0 = 80B38570
/* 002CC 80B3832C A6190158 */ sh $t9, 0x0158($s0) ## 00000158
/* 002D0 80B38330 1000008A */ beq $zero, $zero, .L80B3855C
/* 002D4 80B38334 AE08014C */ sw $t0, 0x014C($s0) ## 0000014C
glabel L80B38338
/* 002D8 80B38338 86020034 */ lh $v0, 0x0034($s0) ## 00000034
/* 002DC 80B3833C 8E0D0024 */ lw $t5, 0x0024($s0) ## 00000024
/* 002E0 80B38340 3C0A80B4 */ lui $t2, %hi(D_80B39010) ## $t2 = 80B40000
/* 002E4 80B38344 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
/* 002E8 80B38348 00021400 */ sll $v0, $v0, 16
/* 002EC 80B3834C 00021403 */ sra $v0, $v0, 16
/* 002F0 80B38350 00024880 */ sll $t1, $v0, 2
/* 002F4 80B38354 01224823 */ subu $t1, $t1, $v0
/* 002F8 80B38358 00094880 */ sll $t1, $t1, 2
/* 002FC 80B3835C 254A9010 */ addiu $t2, $t2, %lo(D_80B39010) ## $t2 = 80B39010
/* 00300 80B38360 012A5821 */ addu $t3, $t1, $t2
/* 00304 80B38364 AD6D0000 */ sw $t5, 0x0000($t3) ## 00000000
/* 00308 80B38368 8E0C0028 */ lw $t4, 0x0028($s0) ## 00000028
/* 0030C 80B3836C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00310 80B38370 AD6C0004 */ sw $t4, 0x0004($t3) ## 00000004
/* 00314 80B38374 8E0D002C */ lw $t5, 0x002C($s0) ## 0000002C
/* 00318 80B38378 0C00B55C */ jal Actor_Kill
/* 0031C 80B3837C AD6D0008 */ sw $t5, 0x0008($t3) ## 00000008
/* 00320 80B38380 10000077 */ beq $zero, $zero, .L80B38560
/* 00324 80B38384 8FBF001C */ lw $ra, 0x001C($sp)
glabel L80B38388
/* 00328 80B38388 860E0034 */ lh $t6, 0x0034($s0) ## 00000034
/* 0032C 80B3838C 3C1880B4 */ lui $t8, %hi(func_80B38788) ## $t8 = 80B40000
/* 00330 80B38390 27188788 */ addiu $t8, $t8, %lo(func_80B38788) ## $t8 = 80B38788
/* 00334 80B38394 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000
/* 00338 80B38398 A60F015A */ sh $t7, 0x015A($s0) ## 0000015A
/* 0033C 80B3839C 1000006F */ beq $zero, $zero, .L80B3855C
/* 00340 80B383A0 AE18014C */ sw $t8, 0x014C($s0) ## 0000014C
glabel L80B383A4
/* 00344 80B383A4 86190034 */ lh $t9, 0x0034($s0) ## 00000034
/* 00348 80B383A8 26050180 */ addiu $a1, $s0, 0x0180 ## $a1 = 00000180
/* 0034C 80B383AC AFA50024 */ sw $a1, 0x0024($sp)
/* 00350 80B383B0 332800FF */ andi $t0, $t9, 0x00FF ## $t0 = 00000000
/* 00354 80B383B4 A7A80032 */ sh $t0, 0x0032($sp)
/* 00358 80B383B8 0C0170D9 */ jal Collider_InitCylinder
/* 0035C 80B383BC 8FA4003C */ lw $a0, 0x003C($sp)
/* 00360 80B383C0 3C0780B4 */ lui $a3, %hi(D_80B38D40) ## $a3 = 80B40000
/* 00364 80B383C4 8FA50024 */ lw $a1, 0x0024($sp)
/* 00368 80B383C8 24E78D40 */ addiu $a3, $a3, %lo(D_80B38D40) ## $a3 = 80B38D40
/* 0036C 80B383CC 8FA4003C */ lw $a0, 0x003C($sp)
/* 00370 80B383D0 0C01712B */ jal Collider_SetCylinder
/* 00374 80B383D4 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00378 80B383D8 87A90032 */ lh $t1, 0x0032($sp)
/* 0037C 80B383DC 3C0B80B4 */ lui $t3, %hi(D_80B38DA4) ## $t3 = 80B40000
/* 00380 80B383E0 3C0E80B4 */ lui $t6, %hi(func_80B387F0) ## $t6 = 80B40000
/* 00384 80B383E4 00095080 */ sll $t2, $t1, 2
/* 00388 80B383E8 016A5821 */ addu $t3, $t3, $t2
/* 0038C 80B383EC 8D6B8DA4 */ lw $t3, %lo(D_80B38DA4)($t3)
/* 00390 80B383F0 240C0014 */ addiu $t4, $zero, 0x0014 ## $t4 = 00000014
/* 00394 80B383F4 240D001E */ addiu $t5, $zero, 0x001E ## $t5 = 0000001E
/* 00398 80B383F8 25CE87F0 */ addiu $t6, $t6, %lo(func_80B387F0) ## $t6 = 80B387F0
/* 0039C 80B383FC A60C01C0 */ sh $t4, 0x01C0($s0) ## 000001C0
/* 003A0 80B38400 A60D01C2 */ sh $t5, 0x01C2($s0) ## 000001C2
/* 003A4 80B38404 AE0E014C */ sw $t6, 0x014C($s0) ## 0000014C
/* 003A8 80B38408 10000054 */ beq $zero, $zero, .L80B3855C
/* 003AC 80B3840C AE0B01A0 */ sw $t3, 0x01A0($s0) ## 000001A0
glabel L80B38410
/* 003B0 80B38410 86020034 */ lh $v0, 0x0034($s0) ## 00000034
/* 003B4 80B38414 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
/* 003B8 80B38418 3C0980B4 */ lui $t1, %hi(func_80B388AC) ## $t1 = 80B40000
/* 003BC 80B3841C 304F000F */ andi $t7, $v0, 0x000F ## $t7 = 00000000
/* 003C0 80B38420 2841000A */ slti $at, $v0, 0x000A
/* 003C4 80B38424 1420000A */ bne $at, $zero, .L80B38450
/* 003C8 80B38428 A60F0158 */ sh $t7, 0x0158($s0) ## 00000158
/* 003CC 80B3842C 2401000A */ addiu $at, $zero, 0x000A ## $at = 0000000A
/* 003D0 80B38430 0041001A */ div $zero, $v0, $at
/* 003D4 80B38434 00001812 */ mflo $v1
/* 003D8 80B38438 00031C00 */ sll $v1, $v1, 16
/* 003DC 80B3843C 00031C03 */ sra $v1, $v1, 16
/* 003E0 80B38440 0003C080 */ sll $t8, $v1, 2
/* 003E4 80B38444 0303C021 */ addu $t8, $t8, $v1
/* 003E8 80B38448 0018C080 */ sll $t8, $t8, 2
/* 003EC 80B3844C A618016A */ sh $t8, 0x016A($s0) ## 0000016A
.L80B38450:
/* 003F0 80B38450 0003C880 */ sll $t9, $v1, 2
/* 003F4 80B38454 0323C821 */ addu $t9, $t9, $v1
/* 003F8 80B38458 0019C840 */ sll $t9, $t9, 1
/* 003FC 80B3845C 00594023 */ subu $t0, $v0, $t9
/* 00400 80B38460 252988AC */ addiu $t1, $t1, %lo(func_80B388AC) ## $t1 = 80B388AC
/* 00404 80B38464 A6080158 */ sh $t0, 0x0158($s0) ## 00000158
/* 00408 80B38468 1000003C */ beq $zero, $zero, .L80B3855C
/* 0040C 80B3846C AE09014C */ sw $t1, 0x014C($s0) ## 0000014C
glabel L80B38470
/* 00410 80B38470 86020034 */ lh $v0, 0x0034($s0) ## 00000034
/* 00414 80B38474 8E0E0024 */ lw $t6, 0x0024($s0) ## 00000024
/* 00418 80B38478 3C0B80B4 */ lui $t3, %hi(D_80B39080) ## $t3 = 80B40000
/* 0041C 80B3847C 304200FF */ andi $v0, $v0, 0x00FF ## $v0 = 00000000
/* 00420 80B38480 00021400 */ sll $v0, $v0, 16
/* 00424 80B38484 00021403 */ sra $v0, $v0, 16
/* 00428 80B38488 00025080 */ sll $t2, $v0, 2
/* 0042C 80B3848C 01425023 */ subu $t2, $t2, $v0
/* 00430 80B38490 000A5080 */ sll $t2, $t2, 2
/* 00434 80B38494 256B9080 */ addiu $t3, $t3, %lo(D_80B39080) ## $t3 = 80B39080
/* 00438 80B38498 014B6021 */ addu $t4, $t2, $t3
/* 0043C 80B3849C AD8E0000 */ sw $t6, 0x0000($t4) ## 00000014
/* 00440 80B384A0 8E0D0028 */ lw $t5, 0x0028($s0) ## 00000028
/* 00444 80B384A4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00448 80B384A8 AD8D0004 */ sw $t5, 0x0004($t4) ## 00000018
/* 0044C 80B384AC 8E0E002C */ lw $t6, 0x002C($s0) ## 0000002C
/* 00450 80B384B0 0C00B55C */ jal Actor_Kill
/* 00454 80B384B4 AD8E0008 */ sw $t6, 0x0008($t4) ## 0000001C
/* 00458 80B384B8 10000029 */ beq $zero, $zero, .L80B38560
/* 0045C 80B384BC 8FBF001C */ lw $ra, 0x001C($sp)
glabel L80B384C0
/* 00460 80B384C0 3C0F80B4 */ lui $t7, %hi(func_80B38824) ## $t7 = 80B40000
/* 00464 80B384C4 25EF8824 */ addiu $t7, $t7, %lo(func_80B38824) ## $t7 = 80B38824
/* 00468 80B384C8 10000024 */ beq $zero, $zero, .L80B3855C
/* 0046C 80B384CC AE0F014C */ sw $t7, 0x014C($s0) ## 0000014C
glabel L80B384D0
/* 00470 80B384D0 26050180 */ addiu $a1, $s0, 0x0180 ## $a1 = 00000180
/* 00474 80B384D4 AFA50024 */ sw $a1, 0x0024($sp)
/* 00478 80B384D8 0C0170D9 */ jal Collider_InitCylinder
/* 0047C 80B384DC 8FA4003C */ lw $a0, 0x003C($sp)
/* 00480 80B384E0 3C0780B4 */ lui $a3, %hi(D_80B38D40) ## $a3 = 80B40000
/* 00484 80B384E4 8FA50024 */ lw $a1, 0x0024($sp)
/* 00488 80B384E8 24E78D40 */ addiu $a3, $a3, %lo(D_80B38D40) ## $a3 = 80B38D40
/* 0048C 80B384EC 8FA4003C */ lw $a0, 0x003C($sp)
/* 00490 80B384F0 0C01712B */ jal Collider_SetCylinder
/* 00494 80B384F4 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00498 80B384F8 8E080024 */ lw $t0, 0x0024($s0) ## 00000024
/* 0049C 80B384FC 8E190028 */ lw $t9, 0x0028($s0) ## 00000028
/* 004A0 80B38500 3C0B80B4 */ lui $t3, %hi(func_80B38AD8) ## $t3 = 80B40000
/* 004A4 80B38504 AE08016C */ sw $t0, 0x016C($s0) ## 0000016C
/* 004A8 80B38508 8E08002C */ lw $t0, 0x002C($s0) ## 0000002C
/* 004AC 80B3850C 24180004 */ addiu $t8, $zero, 0x0004 ## $t8 = 00000004
/* 004B0 80B38510 24090023 */ addiu $t1, $zero, 0x0023 ## $t1 = 00000023
/* 004B4 80B38514 240A004B */ addiu $t2, $zero, 0x004B ## $t2 = 0000004B
/* 004B8 80B38518 256B8AD8 */ addiu $t3, $t3, %lo(func_80B38AD8) ## $t3 = 80B38AD8
/* 004BC 80B3851C AE1801A0 */ sw $t8, 0x01A0($s0) ## 000001A0
/* 004C0 80B38520 A60901C0 */ sh $t1, 0x01C0($s0) ## 000001C0
/* 004C4 80B38524 A60A01C2 */ sh $t2, 0x01C2($s0) ## 000001C2
/* 004C8 80B38528 AE0B014C */ sw $t3, 0x014C($s0) ## 0000014C
/* 004CC 80B3852C AE190170 */ sw $t9, 0x0170($s0) ## 00000170
/* 004D0 80B38530 1000000A */ beq $zero, $zero, .L80B3855C
/* 004D4 80B38534 AE080174 */ sw $t0, 0x0174($s0) ## 00000174
glabel L80B38538
/* 004D8 80B38538 860C0034 */ lh $t4, 0x0034($s0) ## 00000034
/* 004DC 80B3853C 3C0E80B4 */ lui $t6, %hi(func_80B38B78) ## $t6 = 80B40000
/* 004E0 80B38540 25CE8B78 */ addiu $t6, $t6, %lo(func_80B38B78) ## $t6 = 80B38B78
/* 004E4 80B38544 318D00FF */ andi $t5, $t4, 0x00FF ## $t5 = 00000000
/* 004E8 80B38548 A60D015A */ sh $t5, 0x015A($s0) ## 0000015A
/* 004EC 80B3854C 10000003 */ beq $zero, $zero, .L80B3855C
/* 004F0 80B38550 AE0E014C */ sw $t6, 0x014C($s0) ## 0000014C
.L80B38554:
/* 004F4 80B38554 0C00B55C */ jal Actor_Kill
/* 004F8 80B38558 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
glabel L80B3855C
.L80B3855C:
/* 004FC 80B3855C 8FBF001C */ lw $ra, 0x001C($sp)
.L80B38560:
/* 00500 80B38560 8FB00018 */ lw $s0, 0x0018($sp)
/* 00504 80B38564 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 00508 80B38568 03E00008 */ jr $ra
/* 0050C 80B3856C 00000000 */ nop

View file

@ -1,96 +0,0 @@
glabel EnWonderItem_Update
/* 00B8C 80B38BEC 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0
/* 00B90 80B38BF0 AFBF004C */ sw $ra, 0x004C($sp)
/* 00B94 80B38BF4 AFB00048 */ sw $s0, 0x0048($sp)
/* 00B98 80B38BF8 AFA50064 */ sw $a1, 0x0064($sp)
/* 00B9C 80B38BFC 8482015C */ lh $v0, 0x015C($a0) ## 0000015C
/* 00BA0 80B38C00 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00BA4 80B38C04 10400002 */ beq $v0, $zero, .L80B38C10
/* 00BA8 80B38C08 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF
/* 00BAC 80B38C0C A48E015C */ sh $t6, 0x015C($a0) ## 0000015C
.L80B38C10:
/* 00BB0 80B38C10 8E19014C */ lw $t9, 0x014C($s0) ## 0000014C
/* 00BB4 80B38C14 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00BB8 80B38C18 8FA50064 */ lw $a1, 0x0064($sp)
/* 00BBC 80B38C1C 0320F809 */ jalr $ra, $t9
/* 00BC0 80B38C20 00000000 */ nop
/* 00BC4 80B38C24 86020154 */ lh $v0, 0x0154($s0) ## 00000154
/* 00BC8 80B38C28 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 00BCC 80B38C2C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00BD0 80B38C30 54410005 */ bnel $v0, $at, .L80B38C48
/* 00BD4 80B38C34 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
/* 00BD8 80B38C38 0C00B56E */ jal Actor_SetHeight
/* 00BDC 80B38C3C 8E050150 */ lw $a1, 0x0150($s0) ## 00000150
/* 00BE0 80B38C40 86020154 */ lh $v0, 0x0154($s0) ## 00000154
/* 00BE4 80B38C44 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
.L80B38C48:
/* 00BE8 80B38C48 10410003 */ beq $v0, $at, .L80B38C58
/* 00BEC 80B38C4C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00BF0 80B38C50 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008
/* 00BF4 80B38C54 1441000B */ bne $v0, $at, .L80B38C84
.L80B38C58:
/* 00BF8 80B38C58 26060180 */ addiu $a2, $s0, 0x0180 ## $a2 = 00000180
/* 00BFC 80B38C5C 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000180
/* 00C00 80B38C60 0C0189B7 */ jal Collider_CylinderUpdate
/* 00C04 80B38C64 AFA60050 */ sw $a2, 0x0050($sp)
/* 00C08 80B38C68 8FA40064 */ lw $a0, 0x0064($sp)
/* 00C0C 80B38C6C 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 00C10 80B38C70 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 00C14 80B38C74 8FA60050 */ lw $a2, 0x0050($sp)
/* 00C18 80B38C78 0C01767D */ jal CollisionCheck_SetAC
## CollisionCheck_setAC
/* 00C1C 80B38C7C 00812821 */ addu $a1, $a0, $at
/* 00C20 80B38C80 86020154 */ lh $v0, 0x0154($s0) ## 00000154
.L80B38C84:
/* 00C24 80B38C84 2841000D */ slti $at, $v0, 0x000D
/* 00C28 80B38C88 14200002 */ bne $at, $zero, .L80B38C94
/* 00C2C 80B38C8C 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
/* 00C30 80B38C90 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000
.L80B38C94:
/* 00C34 80B38C94 3C0F8016 */ lui $t7, %hi(gGameInfo)
/* 00C38 80B38C98 8DEFFA90 */ lw $t7, %lo(gGameInfo)($t7)
/* 00C3C 80B38C9C 3C0B80B4 */ lui $t3, %hi(D_80B38DC0) ## $t3 = 80B40000
/* 00C40 80B38CA0 256B8DC0 */ addiu $t3, $t3, %lo(D_80B38DC0) ## $t3 = 80B38DC0
/* 00C44 80B38CA4 85F812D4 */ lh $t8, 0x12D4($t7) ## 801612D4
/* 00C48 80B38CA8 00035040 */ sll $t2, $v1, 1
/* 00C4C 80B38CAC 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00C50 80B38CB0 1300001B */ beq $t8, $zero, .L80B38D20
/* 00C54 80B38CB4 014B1021 */ addu $v0, $t2, $t3
/* 00C58 80B38CB8 86080032 */ lh $t0, 0x0032($s0) ## 00000032
/* 00C5C 80B38CBC C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 00C60 80B38CC0 C60E0028 */ lwc1 $f14, 0x0028($s0) ## 00000028
/* 00C64 80B38CC4 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C
/* 00C68 80B38CC8 86070030 */ lh $a3, 0x0030($s0) ## 00000030
/* 00C6C 80B38CCC AFA80010 */ sw $t0, 0x0010($sp)
/* 00C70 80B38CD0 86090034 */ lh $t1, 0x0034($s0) ## 00000034
/* 00C74 80B38CD4 44810000 */ mtc1 $at, $f0 ## $f0 = 1.00
/* 00C78 80B38CD8 844C0000 */ lh $t4, 0x0000($v0) ## 00000000
/* 00C7C 80B38CDC 844D0002 */ lh $t5, 0x0002($v0) ## 00000002
/* 00C80 80B38CE0 844E0004 */ lh $t6, 0x0004($v0) ## 00000004
/* 00C84 80B38CE4 8FB80064 */ lw $t8, 0x0064($sp)
/* 00C88 80B38CE8 241900FF */ addiu $t9, $zero, 0x00FF ## $t9 = 000000FF
/* 00C8C 80B38CEC 240F0004 */ addiu $t7, $zero, 0x0004 ## $t7 = 00000004
/* 00C90 80B38CF0 AFAF0034 */ sw $t7, 0x0034($sp)
/* 00C94 80B38CF4 AFB90030 */ sw $t9, 0x0030($sp)
/* 00C98 80B38CF8 AFA90014 */ sw $t1, 0x0014($sp)
/* 00C9C 80B38CFC AFAC0024 */ sw $t4, 0x0024($sp)
/* 00CA0 80B38D00 E7A00018 */ swc1 $f0, 0x0018($sp)
/* 00CA4 80B38D04 E7A0001C */ swc1 $f0, 0x001C($sp)
/* 00CA8 80B38D08 E7A00020 */ swc1 $f0, 0x0020($sp)
/* 00CAC 80B38D0C AFAD0028 */ sw $t5, 0x0028($sp)
/* 00CB0 80B38D10 AFAE002C */ sw $t6, 0x002C($sp)
/* 00CB4 80B38D14 8F080000 */ lw $t0, 0x0000($t8) ## 00000000
/* 00CB8 80B38D18 0C018FA7 */ jal DebugDisplay_AddObject
/* 00CBC 80B38D1C AFA80038 */ sw $t0, 0x0038($sp)
.L80B38D20:
/* 00CC0 80B38D20 8FBF004C */ lw $ra, 0x004C($sp)
/* 00CC4 80B38D24 8FB00048 */ lw $s0, 0x0048($sp)
/* 00CC8 80B38D28 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000
/* 00CCC 80B38D2C 03E00008 */ jr $ra
/* 00CD0 80B38D30 00000000 */ nop
/* 00CD4 80B38D34 00000000 */ nop
/* 00CD8 80B38D38 00000000 */ nop
/* 00CDC 80B38D3C 00000000 */ nop

View file

@ -1,103 +0,0 @@
glabel func_80B380A0
/* 00040 80B380A0 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 00044 80B380A4 AFB5002C */ sw $s5, 0x002C($sp)
/* 00048 80B380A8 0080A825 */ or $s5, $a0, $zero ## $s5 = 00000000
/* 0004C 80B380AC AFBF0034 */ sw $ra, 0x0034($sp)
/* 00050 80B380B0 AFB40028 */ sw $s4, 0x0028($sp)
/* 00054 80B380B4 AFB20020 */ sw $s2, 0x0020($sp)
/* 00058 80B380B8 00A09025 */ or $s2, $a1, $zero ## $s2 = 00000000
/* 0005C 80B380BC 00C0A025 */ or $s4, $a2, $zero ## $s4 = 00000000
/* 00060 80B380C0 AFB60030 */ sw $s6, 0x0030($sp)
/* 00064 80B380C4 AFB30024 */ sw $s3, 0x0024($sp)
/* 00068 80B380C8 AFB1001C */ sw $s1, 0x001C($sp)
/* 0006C 80B380CC AFB00018 */ sw $s0, 0x0018($sp)
/* 00070 80B380D0 0C01E221 */ jal func_80078884
/* 00074 80B380D4 24044824 */ addiu $a0, $zero, 0x4824 ## $a0 = 00004824
/* 00078 80B380D8 86A2015A */ lh $v0, 0x015A($s5) ## 0000015A
/* 0007C 80B380DC 26B00024 */ addiu $s0, $s5, 0x0024 ## $s0 = 00000024
/* 00080 80B380E0 2416000B */ addiu $s6, $zero, 0x000B ## $s6 = 0000000B
/* 00084 80B380E4 14400003 */ bne $v0, $zero, .L80B380F4
/* 00088 80B380E8 244E0001 */ addiu $t6, $v0, 0x0001 ## $t6 = 00000001
/* 0008C 80B380EC A6AE015A */ sh $t6, 0x015A($s5) ## 0000015A
/* 00090 80B380F0 86A2015A */ lh $v0, 0x015A($s5) ## 0000015A
.L80B380F4:
/* 00094 80B380F4 18400030 */ blez $v0, .L80B381B8
/* 00098 80B380F8 00408825 */ or $s1, $v0, $zero ## $s1 = 00000000
/* 0009C 80B380FC 3C1380B4 */ lui $s3, %hi(D_80B38D8C) ## $s3 = 80B40000
/* 000A0 80B38100 26738D8C */ addiu $s3, $s3, %lo(D_80B38D8C) ## $s3 = 80B38D8C
/* 000A4 80B38104 86A20156 */ lh $v0, 0x0156($s5) ## 00000156
.L80B38108:
/* 000A8 80B38108 2841000C */ slti $at, $v0, 0x000C
/* 000AC 80B3810C 10200016 */ beq $at, $zero, .L80B38168
/* 000B0 80B38110 00000000 */ nop
/* 000B4 80B38114 12C20003 */ beq $s6, $v0, .L80B38124
/* 000B8 80B38118 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
/* 000BC 80B3811C 16800008 */ bne $s4, $zero, .L80B38140
/* 000C0 80B38120 0002C840 */ sll $t9, $v0, 1
.L80B38124:
/* 000C4 80B38124 00027840 */ sll $t7, $v0, 1
/* 000C8 80B38128 026FC021 */ addu $t8, $s3, $t7
/* 000CC 80B3812C 87060000 */ lh $a2, 0x0000($t8) ## 00000000
/* 000D0 80B38130 0C007D52 */ jal Item_DropCollectible
/* 000D4 80B38134 02002825 */ or $a1, $s0, $zero ## $a1 = 00000024
/* 000D8 80B38138 1000001D */ beq $zero, $zero, .L80B381B0
/* 000DC 80B3813C 2631FFFF */ addiu $s1, $s1, 0xFFFF ## $s1 = FFFFFFFF
.L80B38140:
/* 000E0 80B38140 02794021 */ addu $t0, $s3, $t9
/* 000E4 80B38144 85060000 */ lh $a2, 0x0000($t0) ## 00000000
/* 000E8 80B38148 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
/* 000EC 80B3814C 02002825 */ or $a1, $s0, $zero ## $a1 = 00000024
/* 000F0 80B38150 34C68000 */ ori $a2, $a2, 0x8000 ## $a2 = 00008000
/* 000F4 80B38154 00063400 */ sll $a2, $a2, 16
/* 000F8 80B38158 0C007D52 */ jal Item_DropCollectible
/* 000FC 80B3815C 00063403 */ sra $a2, $a2, 16
/* 00100 80B38160 10000013 */ beq $zero, $zero, .L80B381B0
/* 00104 80B38164 2631FFFF */ addiu $s1, $s1, 0xFFFF ## $s1 = FFFFFFFE
.L80B38168:
/* 00108 80B38168 16800009 */ bne $s4, $zero, .L80B38190
/* 0010C 80B3816C 2443FFF4 */ addiu $v1, $v0, 0xFFF4 ## $v1 = FFFFFFF4
/* 00110 80B38170 00033C00 */ sll $a3, $v1, 16
/* 00114 80B38174 00073C03 */ sra $a3, $a3, 16
/* 00118 80B38178 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
/* 0011C 80B3817C 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00120 80B38180 0C007E50 */ jal Item_DropCollectibleRandom
/* 00124 80B38184 02003025 */ or $a2, $s0, $zero ## $a2 = 00000024
/* 00128 80B38188 10000009 */ beq $zero, $zero, .L80B381B0
/* 0012C 80B3818C 2631FFFF */ addiu $s1, $s1, 0xFFFF ## $s1 = FFFFFFFD
.L80B38190:
/* 00130 80B38190 34678000 */ ori $a3, $v1, 0x8000 ## $a3 = 00008000
/* 00134 80B38194 00073C00 */ sll $a3, $a3, 16
/* 00138 80B38198 00073C03 */ sra $a3, $a3, 16
/* 0013C 80B3819C 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
/* 00140 80B381A0 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000
/* 00144 80B381A4 0C007E50 */ jal Item_DropCollectibleRandom
/* 00148 80B381A8 02003025 */ or $a2, $s0, $zero ## $a2 = 00000024
/* 0014C 80B381AC 2631FFFF */ addiu $s1, $s1, 0xFFFF ## $s1 = FFFFFFFC
.L80B381B0:
/* 00150 80B381B0 5E20FFD5 */ bgtzl $s1, .L80B38108
/* 00154 80B381B4 86A20156 */ lh $v0, 0x0156($s5) ## 00000156
.L80B381B8:
/* 00158 80B381B8 86A50162 */ lh $a1, 0x0162($s5) ## 00000162
/* 0015C 80B381BC 04A00003 */ bltz $a1, .L80B381CC
/* 00160 80B381C0 00000000 */ nop
/* 00164 80B381C4 0C00B2DD */ jal Flags_SetSwitch
/* 00168 80B381C8 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
.L80B381CC:
/* 0016C 80B381CC 0C00B55C */ jal Actor_Kill
/* 00170 80B381D0 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000
/* 00174 80B381D4 8FBF0034 */ lw $ra, 0x0034($sp)
/* 00178 80B381D8 8FB00018 */ lw $s0, 0x0018($sp)
/* 0017C 80B381DC 8FB1001C */ lw $s1, 0x001C($sp)
/* 00180 80B381E0 8FB20020 */ lw $s2, 0x0020($sp)
/* 00184 80B381E4 8FB30024 */ lw $s3, 0x0024($sp)
/* 00188 80B381E8 8FB40028 */ lw $s4, 0x0028($sp)
/* 0018C 80B381EC 8FB5002C */ lw $s5, 0x002C($sp)
/* 00190 80B381F0 8FB60030 */ lw $s6, 0x0030($sp)
/* 00194 80B381F4 03E00008 */ jr $ra
/* 00198 80B381F8 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000

View file

@ -1,146 +0,0 @@
glabel func_80B38570
/* 00510 80B38570 27BDFF70 */ addiu $sp, $sp, 0xFF70 ## $sp = FFFFFF70
/* 00514 80B38574 AFBF008C */ sw $ra, 0x008C($sp)
/* 00518 80B38578 AFBE0088 */ sw $s8, 0x0088($sp)
/* 0051C 80B3857C AFB70084 */ sw $s7, 0x0084($sp)
/* 00520 80B38580 AFB60080 */ sw $s6, 0x0080($sp)
/* 00524 80B38584 AFB5007C */ sw $s5, 0x007C($sp)
/* 00528 80B38588 AFB40078 */ sw $s4, 0x0078($sp)
/* 0052C 80B3858C AFB30074 */ sw $s3, 0x0074($sp)
/* 00530 80B38590 AFB20070 */ sw $s2, 0x0070($sp)
/* 00534 80B38594 AFB1006C */ sw $s1, 0x006C($sp)
/* 00538 80B38598 AFB00068 */ sw $s0, 0x0068($sp)
/* 0053C 80B3859C F7BA0060 */ sdc1 $f26, 0x0060($sp)
/* 00540 80B385A0 F7B80058 */ sdc1 $f24, 0x0058($sp)
/* 00544 80B385A4 F7B60050 */ sdc1 $f22, 0x0050($sp)
/* 00548 80B385A8 F7B40048 */ sdc1 $f20, 0x0048($sp)
/* 0054C 80B385AC 84830158 */ lh $v1, 0x0158($a0) ## 00000158
/* 00550 80B385B0 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000
/* 00554 80B385B4 00A0F025 */ or $s8, $a1, $zero ## $s8 = 00000000
/* 00558 80B385B8 8CB31C44 */ lw $s3, 0x1C44($a1) ## 00001C44
/* 0055C 80B385BC 8494015E */ lh $s4, 0x015E($a0) ## 0000015E
/* 00560 80B385C0 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000
/* 00564 80B385C4 1860004C */ blez $v1, .L80B386F8
/* 00568 80B385C8 24110001 */ addiu $s1, $zero, 0x0001 ## $s1 = 00000001
/* 0056C 80B385CC 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00570 80B385D0 4481D000 */ mtc1 $at, $f26 ## $f26 = 50.00
/* 00574 80B385D4 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00578 80B385D8 3C178016 */ lui $s7, %hi(gGameInfo)
/* 0057C 80B385DC 3C1580B4 */ lui $s5, %hi(D_80B39010) ## $s5 = 80B40000
/* 00580 80B385E0 4481C000 */ mtc1 $at, $f24 ## $f24 = 1.00
/* 00584 80B385E4 26B59010 */ addiu $s5, $s5, %lo(D_80B39010) ## $s5 = 80B39010
/* 00588 80B385E8 26F7FA90 */ addiu $s7, %lo(gGameInfo)
/* 0058C 80B385EC 2416000C */ addiu $s6, $zero, 0x000C ## $s6 = 0000000C
.L80B385F0:
/* 00590 80B385F0 02917024 */ and $t6, $s4, $s1
/* 00594 80B385F4 55C0003D */ bnel $t6, $zero, .L80B386EC
/* 00598 80B385F8 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001
/* 0059C 80B385FC 02160019 */ multu $s0, $s6
/* 005A0 80B38600 C6640024 */ lwc1 $f4, 0x0024($s3) ## 00000024
/* 005A4 80B38604 C6660028 */ lwc1 $f6, 0x0028($s3) ## 00000028
/* 005A8 80B38608 C668002C */ lwc1 $f8, 0x002C($s3) ## 0000002C
/* 005AC 80B3860C 241800FF */ addiu $t8, $zero, 0x00FF ## $t8 = 000000FF
/* 005B0 80B38610 241900FF */ addiu $t9, $zero, 0x00FF ## $t9 = 000000FF
/* 005B4 80B38614 24080004 */ addiu $t0, $zero, 0x0004 ## $t0 = 00000004
/* 005B8 80B38618 00007812 */ mflo $t7
/* 005BC 80B3861C 02AF1021 */ addu $v0, $s5, $t7
/* 005C0 80B38620 C4540000 */ lwc1 $f20, 0x0000($v0) ## 00000000
/* 005C4 80B38624 C4560004 */ lwc1 $f22, 0x0004($v0) ## 00000004
/* 005C8 80B38628 C4500008 */ lwc1 $f16, 0x0008($v0) ## 00000008
/* 005CC 80B3862C 46142081 */ sub.s $f2, $f4, $f20
/* 005D0 80B38630 46163301 */ sub.s $f12, $f6, $f22
/* 005D4 80B38634 46021282 */ mul.s $f10, $f2, $f2
/* 005D8 80B38638 46104381 */ sub.s $f14, $f8, $f16
/* 005DC 80B3863C 460C6482 */ mul.s $f18, $f12, $f12
/* 005E0 80B38640 46125100 */ add.s $f4, $f10, $f18
/* 005E4 80B38644 460E7182 */ mul.s $f6, $f14, $f14
/* 005E8 80B38648 46062000 */ add.s $f0, $f4, $f6
/* 005EC 80B3864C 46000004 */ sqrt.s $f0, $f0
/* 005F0 80B38650 461A003C */ c.lt.s $f0, $f26
/* 005F4 80B38654 00000000 */ nop
/* 005F8 80B38658 4502000C */ bc1fl .L80B3868C
/* 005FC 80B3865C 8EEC0000 */ lw $t4, 0x0000($s7) ## 8015FA90
/* 00600 80B38660 8658015E */ lh $t8, 0x015E($s2) ## 0000015E
/* 00604 80B38664 86480160 */ lh $t0, 0x0160($s2) ## 00000160
/* 00608 80B38668 864A016A */ lh $t2, 0x016A($s2) ## 0000016A
/* 0060C 80B3866C 0311C825 */ or $t9, $t8, $s1 ## $t9 = 000000FF
/* 00610 80B38670 25090001 */ addiu $t1, $t0, 0x0001 ## $t1 = 00000005
/* 00614 80B38674 254B0051 */ addiu $t3, $t2, 0x0051 ## $t3 = 00000051
/* 00618 80B38678 A659015E */ sh $t9, 0x015E($s2) ## 0000015E
/* 0061C 80B3867C A6490160 */ sh $t1, 0x0160($s2) ## 00000160
/* 00620 80B38680 10000031 */ beq $zero, $zero, .L80B38748
/* 00624 80B38684 A64B015C */ sh $t3, 0x015C($s2) ## 0000015C
/* 00628 80B38688 8EEC0000 */ lw $t4, 0x0000($s7) ## 8015FA90
.L80B3868C:
/* 0062C 80B3868C 858D12D4 */ lh $t5, 0x12D4($t4) ## 000012D4
/* 00630 80B38690 51A00016 */ beql $t5, $zero, .L80B386EC
/* 00634 80B38694 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000002
/* 00638 80B38698 864E0032 */ lh $t6, 0x0032($s2) ## 00000032
/* 0063C 80B3869C 86470030 */ lh $a3, 0x0030($s2) ## 00000030
/* 00640 80B386A0 44068000 */ mfc1 $a2, $f16
/* 00644 80B386A4 AFAE0010 */ sw $t6, 0x0010($sp)
/* 00648 80B386A8 864F0034 */ lh $t7, 0x0034($s2) ## 00000034
/* 0064C 80B386AC AFA80034 */ sw $t0, 0x0034($sp)
/* 00650 80B386B0 AFB90030 */ sw $t9, 0x0030($sp)
/* 00654 80B386B4 AFA0002C */ sw $zero, 0x002C($sp)
/* 00658 80B386B8 AFB80028 */ sw $t8, 0x0028($sp)
/* 0065C 80B386BC AFA00024 */ sw $zero, 0x0024($sp)
/* 00660 80B386C0 E7B80020 */ swc1 $f24, 0x0020($sp)
/* 00664 80B386C4 E7B8001C */ swc1 $f24, 0x001C($sp)
/* 00668 80B386C8 E7B80018 */ swc1 $f24, 0x0018($sp)
/* 0066C 80B386CC AFAF0014 */ sw $t7, 0x0014($sp)
/* 00670 80B386D0 8FC90000 */ lw $t1, 0x0000($s8) ## 00000000
/* 00674 80B386D4 4600A306 */ mov.s $f12, $f20
/* 00678 80B386D8 4600B386 */ mov.s $f14, $f22
/* 0067C 80B386DC 0C018FA7 */ jal DebugDisplay_AddObject
/* 00680 80B386E0 AFA90038 */ sw $t1, 0x0038($sp)
/* 00684 80B386E4 86430158 */ lh $v1, 0x0158($s2) ## 00000158
/* 00688 80B386E8 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000003
.L80B386EC:
/* 0068C 80B386EC 0203082A */ slt $at, $s0, $v1
/* 00690 80B386F0 1420FFBF */ bne $at, $zero, .L80B385F0
/* 00694 80B386F4 00118840 */ sll $s1, $s1, 1
.L80B386F8:
/* 00698 80B386F8 864A015C */ lh $t2, 0x015C($s2) ## 0000015C
/* 0069C 80B386FC 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 006A0 80B38700 55410006 */ bnel $t2, $at, .L80B3871C
/* 006A4 80B38704 864B0160 */ lh $t3, 0x0160($s2) ## 00000160
/* 006A8 80B38708 0C00B55C */ jal Actor_Kill
/* 006AC 80B3870C 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
/* 006B0 80B38710 1000000E */ beq $zero, $zero, .L80B3874C
/* 006B4 80B38714 8FBF008C */ lw $ra, 0x008C($sp)
/* 006B8 80B38718 864B0160 */ lh $t3, 0x0160($s2) ## 00000160
.L80B3871C:
/* 006BC 80B3871C 546B000B */ bnel $v1, $t3, .L80B3874C
/* 006C0 80B38720 8FBF008C */ lw $ra, 0x008C($sp)
/* 006C4 80B38724 86450162 */ lh $a1, 0x0162($s2) ## 00000162
/* 006C8 80B38728 04A20004 */ bltzl $a1, .L80B3873C
/* 006CC 80B3872C 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
/* 006D0 80B38730 0C00B2DD */ jal Flags_SetSwitch
/* 006D4 80B38734 03C02025 */ or $a0, $s8, $zero ## $a0 = 00000000
/* 006D8 80B38738 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000
.L80B3873C:
/* 006DC 80B3873C 03C02825 */ or $a1, $s8, $zero ## $a1 = 00000000
/* 006E0 80B38740 0C2CE028 */ jal func_80B380A0
/* 006E4 80B38744 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
.L80B38748:
/* 006E8 80B38748 8FBF008C */ lw $ra, 0x008C($sp)
.L80B3874C:
/* 006EC 80B3874C D7B40048 */ ldc1 $f20, 0x0048($sp)
/* 006F0 80B38750 D7B60050 */ ldc1 $f22, 0x0050($sp)
/* 006F4 80B38754 D7B80058 */ ldc1 $f24, 0x0058($sp)
/* 006F8 80B38758 D7BA0060 */ ldc1 $f26, 0x0060($sp)
/* 006FC 80B3875C 8FB00068 */ lw $s0, 0x0068($sp)
/* 00700 80B38760 8FB1006C */ lw $s1, 0x006C($sp)
/* 00704 80B38764 8FB20070 */ lw $s2, 0x0070($sp)
/* 00708 80B38768 8FB30074 */ lw $s3, 0x0074($sp)
/* 0070C 80B3876C 8FB40078 */ lw $s4, 0x0078($sp)
/* 00710 80B38770 8FB5007C */ lw $s5, 0x007C($sp)
/* 00714 80B38774 8FB60080 */ lw $s6, 0x0080($sp)
/* 00718 80B38778 8FB70084 */ lw $s7, 0x0084($sp)
/* 0071C 80B3877C 8FBE0088 */ lw $s8, 0x0088($sp)
/* 00720 80B38780 03E00008 */ jr $ra
/* 00724 80B38784 27BD0090 */ addiu $sp, $sp, 0x0090 ## $sp = 00000000

View file

@ -1,28 +0,0 @@
glabel func_80B38788
/* 00728 80B38788 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 0072C 80B3878C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00730 80B38790 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00734 80B38794 44813000 */ mtc1 $at, $f6 ## $f6 = 50.00
/* 00738 80B38798 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090
/* 0073C 80B3879C 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 00740 80B387A0 4606203C */ c.lt.s $f4, $f6
/* 00744 80B387A4 00000000 */ nop
/* 00748 80B387A8 4502000E */ bc1fl .L80B387E4
/* 0074C 80B387AC 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00750 80B387B0 C4880028 */ lwc1 $f8, 0x0028($a0) ## 00000028
/* 00754 80B387B4 C44A0028 */ lwc1 $f10, 0x0028($v0) ## 00000028
/* 00758 80B387B8 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000
/* 0075C 80B387BC 44818000 */ mtc1 $at, $f16 ## $f16 = 30.00
/* 00760 80B387C0 460A4001 */ sub.s $f0, $f8, $f10
/* 00764 80B387C4 46000005 */ abs.s $f0, $f0
/* 00768 80B387C8 4610003C */ c.lt.s $f0, $f16
/* 0076C 80B387CC 00000000 */ nop
/* 00770 80B387D0 45020004 */ bc1fl .L80B387E4
/* 00774 80B387D4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00778 80B387D8 0C2CE028 */ jal func_80B380A0
/* 0077C 80B387DC 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 00780 80B387E0 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B387E4:
/* 00784 80B387E4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00788 80B387E8 03E00008 */ jr $ra
/* 0078C 80B387EC 00000000 */ nop

View file

@ -1,15 +0,0 @@
glabel func_80B387F0
/* 00790 80B387F0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00794 80B387F4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00798 80B387F8 90820191 */ lbu $v0, 0x0191($a0) ## 00000191
/* 0079C 80B387FC 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000
/* 007A0 80B38800 304E0002 */ andi $t6, $v0, 0x0002 ## $t6 = 00000000
/* 007A4 80B38804 11C00003 */ beq $t6, $zero, .L80B38814
/* 007A8 80B38808 304FFFFD */ andi $t7, $v0, 0xFFFD ## $t7 = 00000000
/* 007AC 80B3880C 0C2CE028 */ jal func_80B380A0
/* 007B0 80B38810 A08F0191 */ sb $t7, 0x0191($a0) ## 00000191
.L80B38814:
/* 007B4 80B38814 8FBF0014 */ lw $ra, 0x0014($sp)
/* 007B8 80B38818 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 007BC 80B3881C 03E00008 */ jr $ra
/* 007C0 80B38820 00000000 */ nop

View file

@ -1,39 +0,0 @@
glabel func_80B38824
/* 007C4 80B38824 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 007C8 80B38828 AFBF0014 */ sw $ra, 0x0014($sp)
/* 007CC 80B3882C 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 007D0 80B38830 44813000 */ mtc1 $at, $f6 ## $f6 = 50.00
/* 007D4 80B38834 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090
/* 007D8 80B38838 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 007DC 80B3883C 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000
/* 007E0 80B38840 4606203C */ c.lt.s $f4, $f6
/* 007E4 80B38844 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 007E8 80B38848 45020015 */ bc1fl .L80B388A0
/* 007EC 80B3884C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 007F0 80B38850 C4880028 */ lwc1 $f8, 0x0028($a0) ## 00000028
/* 007F4 80B38854 C44A0028 */ lwc1 $f10, 0x0028($v0) ## 00000028
/* 007F8 80B38858 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000
/* 007FC 80B3885C 44818000 */ mtc1 $at, $f16 ## $f16 = 30.00
/* 00800 80B38860 460A4001 */ sub.s $f0, $f8, $f10
/* 00804 80B38864 46000005 */ abs.s $f0, $f0
/* 00808 80B38868 4610003C */ c.lt.s $f0, $f16
/* 0080C 80B3886C 00000000 */ nop
/* 00810 80B38870 4502000B */ bc1fl .L80B388A0
/* 00814 80B38874 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00818 80B38878 84850162 */ lh $a1, 0x0162($a0) ## 00000162
/* 0081C 80B3887C 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
/* 00820 80B38880 04A00004 */ bltz $a1, .L80B38894
/* 00824 80B38884 00000000 */ nop
/* 00828 80B38888 0C00B2DD */ jal Flags_SetSwitch
/* 0082C 80B3888C AFA60018 */ sw $a2, 0x0018($sp)
/* 00830 80B38890 8FA60018 */ lw $a2, 0x0018($sp)
.L80B38894:
/* 00834 80B38894 0C00B55C */ jal Actor_Kill
/* 00838 80B38898 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
/* 0083C 80B3889C 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B388A0:
/* 00840 80B388A0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00844 80B388A4 03E00008 */ jr $ra
/* 00848 80B388A8 00000000 */ nop

View file

@ -1,151 +0,0 @@
glabel func_80B388AC
/* 0084C 80B388AC 27BDFF70 */ addiu $sp, $sp, 0xFF70 ## $sp = FFFFFF70
/* 00850 80B388B0 AFBF008C */ sw $ra, 0x008C($sp)
/* 00854 80B388B4 AFBE0088 */ sw $s8, 0x0088($sp)
/* 00858 80B388B8 AFB70084 */ sw $s7, 0x0084($sp)
/* 0085C 80B388BC AFB60080 */ sw $s6, 0x0080($sp)
/* 00860 80B388C0 AFB5007C */ sw $s5, 0x007C($sp)
/* 00864 80B388C4 AFB40078 */ sw $s4, 0x0078($sp)
/* 00868 80B388C8 AFB30074 */ sw $s3, 0x0074($sp)
/* 0086C 80B388CC AFB20070 */ sw $s2, 0x0070($sp)
/* 00870 80B388D0 AFB1006C */ sw $s1, 0x006C($sp)
/* 00874 80B388D4 AFB00068 */ sw $s0, 0x0068($sp)
/* 00878 80B388D8 F7BA0060 */ sdc1 $f26, 0x0060($sp)
/* 0087C 80B388DC F7B80058 */ sdc1 $f24, 0x0058($sp)
/* 00880 80B388E0 F7B60050 */ sdc1 $f22, 0x0050($sp)
/* 00884 80B388E4 F7B40048 */ sdc1 $f20, 0x0048($sp)
/* 00888 80B388E8 84860158 */ lh $a2, 0x0158($a0) ## 00000158
/* 0088C 80B388EC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00890 80B388F0 00A0F025 */ or $s8, $a1, $zero ## $s8 = 00000000
/* 00894 80B388F4 8CB21C44 */ lw $s2, 0x1C44($a1) ## 00001C44
/* 00898 80B388F8 8494015E */ lh $s4, 0x015E($a0) ## 0000015E
/* 0089C 80B388FC 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000
/* 008A0 80B38900 18C00056 */ blez $a2, .L80B38A5C
/* 008A4 80B38904 24130001 */ addiu $s3, $zero, 0x0001 ## $s3 = 00000001
/* 008A8 80B38908 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 008AC 80B3890C 4481D000 */ mtc1 $at, $f26 ## $f26 = 50.00
/* 008B0 80B38910 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 008B4 80B38914 3C178016 */ lui $s7, %hi(gGameInfo)
/* 008B8 80B38918 3C1580B4 */ lui $s5, %hi(D_80B39080) ## $s5 = 80B40000
/* 008BC 80B3891C 4481C000 */ mtc1 $at, $f24 ## $f24 = 1.00
/* 008C0 80B38920 26B59080 */ addiu $s5, $s5, %lo(D_80B39080) ## $s5 = 80B39080
/* 008C4 80B38924 26F7FA90 */ addiu $s7, %lo(gGameInfo)
/* 008C8 80B38928 2416000C */ addiu $s6, $zero, 0x000C ## $s6 = 0000000C
.L80B3892C:
/* 008CC 80B3892C 02931824 */ and $v1, $s4, $s3
/* 008D0 80B38930 54600047 */ bnel $v1, $zero, .L80B38A50
/* 008D4 80B38934 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001
/* 008D8 80B38938 02360019 */ multu $s1, $s6
/* 008DC 80B3893C C6440024 */ lwc1 $f4, 0x0024($s2) ## 00000024
/* 008E0 80B38940 C6460028 */ lwc1 $f6, 0x0028($s2) ## 00000028
/* 008E4 80B38944 C648002C */ lwc1 $f8, 0x002C($s2) ## 0000002C
/* 008E8 80B38948 241800FF */ addiu $t8, $zero, 0x00FF ## $t8 = 000000FF
/* 008EC 80B3894C 241900FF */ addiu $t9, $zero, 0x00FF ## $t9 = 000000FF
/* 008F0 80B38950 24080004 */ addiu $t0, $zero, 0x0004 ## $t0 = 00000004
/* 008F4 80B38954 00007012 */ mflo $t6
/* 008F8 80B38958 02AE1021 */ addu $v0, $s5, $t6
/* 008FC 80B3895C C4540000 */ lwc1 $f20, 0x0000($v0) ## 00000000
/* 00900 80B38960 C4560004 */ lwc1 $f22, 0x0004($v0) ## 00000004
/* 00904 80B38964 C4500008 */ lwc1 $f16, 0x0008($v0) ## 00000008
/* 00908 80B38968 46142081 */ sub.s $f2, $f4, $f20
/* 0090C 80B3896C 46163301 */ sub.s $f12, $f6, $f22
/* 00910 80B38970 46021282 */ mul.s $f10, $f2, $f2
/* 00914 80B38974 46104381 */ sub.s $f14, $f8, $f16
/* 00918 80B38978 460C6482 */ mul.s $f18, $f12, $f12
/* 0091C 80B3897C 46125100 */ add.s $f4, $f10, $f18
/* 00920 80B38980 460E7182 */ mul.s $f6, $f14, $f14
/* 00924 80B38984 46062000 */ add.s $f0, $f4, $f6
/* 00928 80B38988 46000004 */ sqrt.s $f0, $f0
/* 0092C 80B3898C 461A003C */ c.lt.s $f0, $f26
/* 00930 80B38990 00000000 */ nop
/* 00934 80B38994 45020016 */ bc1fl .L80B389F0
/* 00938 80B38998 8EEC0000 */ lw $t4, 0x0000($s7) ## 8015FA90
/* 0093C 80B3899C 5460003F */ bnel $v1, $zero, .L80B38A9C
/* 00940 80B389A0 8FBF008C */ lw $ra, 0x008C($sp)
/* 00944 80B389A4 86020168 */ lh $v0, 0x0168($s0) ## 00000168
/* 00948 80B389A8 1622000C */ bne $s1, $v0, .L80B389DC
/* 0094C 80B389AC 24490001 */ addiu $t1, $v0, 0x0001 ## $t1 = 00000001
/* 00950 80B389B0 860F015E */ lh $t7, 0x015E($s0) ## 0000015E
/* 00954 80B389B4 86190160 */ lh $t9, 0x0160($s0) ## 00000160
/* 00958 80B389B8 860A016A */ lh $t2, 0x016A($s0) ## 0000016A
/* 0095C 80B389BC 01F3C025 */ or $t8, $t7, $s3 ## $t8 = 00000001
/* 00960 80B389C0 27280001 */ addiu $t0, $t9, 0x0001 ## $t0 = 00000100
/* 00964 80B389C4 254B0051 */ addiu $t3, $t2, 0x0051 ## $t3 = 00000051
/* 00968 80B389C8 A618015E */ sh $t8, 0x015E($s0) ## 0000015E
/* 0096C 80B389CC A6080160 */ sh $t0, 0x0160($s0) ## 00000160
/* 00970 80B389D0 A6090168 */ sh $t1, 0x0168($s0) ## 00000168
/* 00974 80B389D4 10000030 */ beq $zero, $zero, .L80B38A98
/* 00978 80B389D8 A60B015C */ sh $t3, 0x015C($s0) ## 0000015C
.L80B389DC:
/* 0097C 80B389DC 0C00B55C */ jal Actor_Kill
/* 00980 80B389E0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00984 80B389E4 1000002D */ beq $zero, $zero, .L80B38A9C
/* 00988 80B389E8 8FBF008C */ lw $ra, 0x008C($sp)
/* 0098C 80B389EC 8EEC0000 */ lw $t4, 0x0000($s7) ## 8015FA90
.L80B389F0:
/* 00990 80B389F0 858D12D4 */ lh $t5, 0x12D4($t4) ## 000012D4
/* 00994 80B389F4 51A00016 */ beql $t5, $zero, .L80B38A50
/* 00998 80B389F8 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000002
/* 0099C 80B389FC 860E0032 */ lh $t6, 0x0032($s0) ## 00000032
/* 009A0 80B38A00 86070030 */ lh $a3, 0x0030($s0) ## 00000030
/* 009A4 80B38A04 44068000 */ mfc1 $a2, $f16
/* 009A8 80B38A08 AFAE0010 */ sw $t6, 0x0010($sp)
/* 009AC 80B38A0C 860F0034 */ lh $t7, 0x0034($s0) ## 00000034
/* 009B0 80B38A10 AFA80034 */ sw $t0, 0x0034($sp)
/* 009B4 80B38A14 AFB90030 */ sw $t9, 0x0030($sp)
/* 009B8 80B38A18 AFB8002C */ sw $t8, 0x002C($sp)
/* 009BC 80B38A1C AFA00028 */ sw $zero, 0x0028($sp)
/* 009C0 80B38A20 AFA00024 */ sw $zero, 0x0024($sp)
/* 009C4 80B38A24 E7B80020 */ swc1 $f24, 0x0020($sp)
/* 009C8 80B38A28 E7B8001C */ swc1 $f24, 0x001C($sp)
/* 009CC 80B38A2C E7B80018 */ swc1 $f24, 0x0018($sp)
/* 009D0 80B38A30 AFAF0014 */ sw $t7, 0x0014($sp)
/* 009D4 80B38A34 8FC90000 */ lw $t1, 0x0000($s8) ## 00000000
/* 009D8 80B38A38 4600A306 */ mov.s $f12, $f20
/* 009DC 80B38A3C 4600B386 */ mov.s $f14, $f22
/* 009E0 80B38A40 0C018FA7 */ jal DebugDisplay_AddObject
/* 009E4 80B38A44 AFA90038 */ sw $t1, 0x0038($sp)
/* 009E8 80B38A48 86060158 */ lh $a2, 0x0158($s0) ## 00000158
/* 009EC 80B38A4C 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000003
.L80B38A50:
/* 009F0 80B38A50 0226082A */ slt $at, $s1, $a2
/* 009F4 80B38A54 1420FFB5 */ bne $at, $zero, .L80B3892C
/* 009F8 80B38A58 00139840 */ sll $s3, $s3, 1
.L80B38A5C:
/* 009FC 80B38A5C 860A015C */ lh $t2, 0x015C($s0) ## 0000015C
/* 00A00 80B38A60 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 00A04 80B38A64 55410006 */ bnel $t2, $at, .L80B38A80
/* 00A08 80B38A68 860B0160 */ lh $t3, 0x0160($s0) ## 00000160
/* 00A0C 80B38A6C 0C00B55C */ jal Actor_Kill
/* 00A10 80B38A70 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00A14 80B38A74 10000009 */ beq $zero, $zero, .L80B38A9C
/* 00A18 80B38A78 8FBF008C */ lw $ra, 0x008C($sp)
/* 00A1C 80B38A7C 860B0160 */ lh $t3, 0x0160($s0) ## 00000160
.L80B38A80:
/* 00A20 80B38A80 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00A24 80B38A84 03C02825 */ or $a1, $s8, $zero ## $a1 = 00000000
/* 00A28 80B38A88 54CB0004 */ bnel $a2, $t3, .L80B38A9C
/* 00A2C 80B38A8C 8FBF008C */ lw $ra, 0x008C($sp)
/* 00A30 80B38A90 0C2CE028 */ jal func_80B380A0
/* 00A34 80B38A94 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
.L80B38A98:
/* 00A38 80B38A98 8FBF008C */ lw $ra, 0x008C($sp)
.L80B38A9C:
/* 00A3C 80B38A9C D7B40048 */ ldc1 $f20, 0x0048($sp)
/* 00A40 80B38AA0 D7B60050 */ ldc1 $f22, 0x0050($sp)
/* 00A44 80B38AA4 D7B80058 */ ldc1 $f24, 0x0058($sp)
/* 00A48 80B38AA8 D7BA0060 */ ldc1 $f26, 0x0060($sp)
/* 00A4C 80B38AAC 8FB00068 */ lw $s0, 0x0068($sp)
/* 00A50 80B38AB0 8FB1006C */ lw $s1, 0x006C($sp)
/* 00A54 80B38AB4 8FB20070 */ lw $s2, 0x0070($sp)
/* 00A58 80B38AB8 8FB30074 */ lw $s3, 0x0074($sp)
/* 00A5C 80B38ABC 8FB40078 */ lw $s4, 0x0078($sp)
/* 00A60 80B38AC0 8FB5007C */ lw $s5, 0x007C($sp)
/* 00A64 80B38AC4 8FB60080 */ lw $s6, 0x0080($sp)
/* 00A68 80B38AC8 8FB70084 */ lw $s7, 0x0084($sp)
/* 00A6C 80B38ACC 8FBE0088 */ lw $s8, 0x0088($sp)
/* 00A70 80B38AD0 03E00008 */ jr $ra
/* 00A74 80B38AD4 27BD0090 */ addiu $sp, $sp, 0x0090 ## $sp = 00000000

View file

@ -1,54 +0,0 @@
.rdata
glabel D_80B38E94
.asciz "\x1b[33m \n\x1b[m"
.balign 4
.text
glabel func_80B38AD8
/* 00A78 80B38AD8 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 00A7C 80B38ADC AFBF0034 */ sw $ra, 0x0034($sp)
/* 00A80 80B38AE0 AFB00030 */ sw $s0, 0x0030($sp)
/* 00A84 80B38AE4 90820191 */ lbu $v0, 0x0191($a0) ## 00000191
/* 00A88 80B38AE8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00A8C 80B38AEC 240600B3 */ addiu $a2, $zero, 0x00B3 ## $a2 = 000000B3
/* 00A90 80B38AF0 304E0002 */ andi $t6, $v0, 0x0002 ## $t6 = 00000000
/* 00A94 80B38AF4 11C0001B */ beq $t6, $zero, .L80B38B64
/* 00A98 80B38AF8 304FFFFD */ andi $t7, $v0, 0xFFFD ## $t7 = 00000000
/* 00A9C 80B38AFC A08F0191 */ sb $t7, 0x0191($a0) ## 00000191
/* 00AA0 80B38B00 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028
/* 00AA4 80B38B04 8E070024 */ lw $a3, 0x0024($s0) ## 00000024
/* 00AA8 80B38B08 24190009 */ addiu $t9, $zero, 0x0009 ## $t9 = 00000009
/* 00AAC 80B38B0C E7A40010 */ swc1 $f4, 0x0010($sp)
/* 00AB0 80B38B10 C606002C */ lwc1 $f6, 0x002C($s0) ## 0000002C
/* 00AB4 80B38B14 AFA00018 */ sw $zero, 0x0018($sp)
/* 00AB8 80B38B18 24A41C24 */ addiu $a0, $a1, 0x1C24 ## $a0 = 00001C24
/* 00ABC 80B38B1C E7A60014 */ swc1 $f6, 0x0014($sp)
/* 00AC0 80B38B20 8618008A */ lh $t8, 0x008A($s0) ## 0000008A
/* 00AC4 80B38B24 AFA5003C */ sw $a1, 0x003C($sp)
/* 00AC8 80B38B28 AFB90024 */ sw $t9, 0x0024($sp)
/* 00ACC 80B38B2C AFA00020 */ sw $zero, 0x0020($sp)
/* 00AD0 80B38B30 0C00C7D4 */ jal Actor_Spawn
## ActorSpawn
/* 00AD4 80B38B34 AFB8001C */ sw $t8, 0x001C($sp)
/* 00AD8 80B38B38 10400003 */ beq $v0, $zero, .L80B38B48
/* 00ADC 80B38B3C 3C0480B4 */ lui $a0, %hi(D_80B38E94) ## $a0 = 80B40000
/* 00AE0 80B38B40 0C00084C */ jal osSyncPrintf
/* 00AE4 80B38B44 24848E94 */ addiu $a0, $a0, %lo(D_80B38E94) ## $a0 = 80B38E94
.L80B38B48:
/* 00AE8 80B38B48 86050162 */ lh $a1, 0x0162($s0) ## 00000162
/* 00AEC 80B38B4C 04A00003 */ bltz $a1, .L80B38B5C
/* 00AF0 80B38B50 00000000 */ nop
/* 00AF4 80B38B54 0C00B2DD */ jal Flags_SetSwitch
/* 00AF8 80B38B58 8FA4003C */ lw $a0, 0x003C($sp)
.L80B38B5C:
/* 00AFC 80B38B5C 0C00B55C */ jal Actor_Kill
/* 00B00 80B38B60 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80B38B64:
/* 00B04 80B38B64 8FBF0034 */ lw $ra, 0x0034($sp)
/* 00B08 80B38B68 8FB00030 */ lw $s0, 0x0030($sp)
/* 00B0C 80B38B6C 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 00B10 80B38B70 03E00008 */ jr $ra
/* 00B14 80B38B74 00000000 */ nop

View file

@ -1,31 +0,0 @@
glabel func_80B38B78
/* 00B18 80B38B78 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00B1C 80B38B7C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00B20 80B38B80 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00B24 80B38B84 44813000 */ mtc1 $at, $f6 ## $f6 = 50.00
/* 00B28 80B38B88 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090
/* 00B2C 80B38B8C 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 00B30 80B38B90 4606203C */ c.lt.s $f4, $f6
/* 00B34 80B38B94 00000000 */ nop
/* 00B38 80B38B98 45020011 */ bc1fl .L80B38BE0
/* 00B3C 80B38B9C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00B40 80B38BA0 804E0A78 */ lb $t6, 0x0A78($v0) ## 00000A78
/* 00B44 80B38BA4 05C3000E */ bgezl $t6, .L80B38BE0
/* 00B48 80B38BA8 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00B4C 80B38BAC C4880028 */ lwc1 $f8, 0x0028($a0) ## 00000028
/* 00B50 80B38BB0 C44A0028 */ lwc1 $f10, 0x0028($v0) ## 00000028
/* 00B54 80B38BB4 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000
/* 00B58 80B38BB8 44818000 */ mtc1 $at, $f16 ## $f16 = 30.00
/* 00B5C 80B38BBC 460A4001 */ sub.s $f0, $f8, $f10
/* 00B60 80B38BC0 46000005 */ abs.s $f0, $f0
/* 00B64 80B38BC4 4610003C */ c.lt.s $f0, $f16
/* 00B68 80B38BC8 00000000 */ nop
/* 00B6C 80B38BCC 45020004 */ bc1fl .L80B38BE0
/* 00B70 80B38BD0 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00B74 80B38BD4 0C2CE028 */ jal func_80B380A0
/* 00B78 80B38BD8 24060001 */ addiu $a2, $zero, 0x0001 ## $a2 = 00000001
/* 00B7C 80B38BDC 8FBF0014 */ lw $ra, 0x0014($sp)
.L80B38BE0:
/* 00B80 80B38BE0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00B84 80B38BE4 03E00008 */ jr $ra
/* 00B88 80B38BE8 00000000 */ nop

View file

@ -1,16 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .bss
.balign 16
glabel D_80B39010
.space 0x70
glabel D_80B39080
.space 0x70

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 D_80B38D40
.word 0x0A000900, 0x20010000, 0x00000000, 0x00000000, 0x00000000, 0xFFCFFFFF, 0x00000000, 0x00010000, 0x0014001E, 0x00000000, 0x00000000
glabel En_Wonder_Item_InitVars
.word 0x01120600, 0x00000000, 0x00010000, 0x000001D0
.word EnWonderItem_Init
.word EnWonderItem_Destroy
.word EnWonderItem_Update
.word 0x00000000
glabel D_80B38D8C
.word 0x000C0006, 0x000E000F, 0x00030008, 0x0009000A, 0x00000001, 0x00020012
glabel D_80B38DA4
.word 0x00000702, 0x0001F820, 0x00000040, 0x00000008, 0x00000004, 0x00000010, 0x00000080
glabel D_80B38DC0
.word 0x00FF00FF, 0x000000FF, 0x000000FF, 0x000000FF, 0x00FF00FF, 0x00000000, 0x000000FF, 0x00000000, 0x000000FF, 0x00800080, 0x00800080, 0x00800000, 0x00800000, 0x00800000, 0x00800000, 0x00800000, 0x00000000, 0x00800000, 0x00000000, 0x00800000

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_80B38F00
.incbin "baserom/ovl_En_Wonder_Item", 0xEA0, 0x00000110

4
spec
View file

@ -3245,9 +3245,7 @@ endseg
beginseg
name "ovl_En_Wonder_Item"
include "build/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.o"
include "build/data/overlays/actors/z_en_wonder_item.data.o"
include "build/data/overlays/actors/z_en_wonder_item.bss.o"
include "build/data/overlays/actors/z_en_wonder_item.reloc.o"
include "build/src/overlays/actors/ovl_En_Wonder_Item/ovl_En_Wonder_Item_reloc.o"
endseg
beginseg

View file

@ -5,6 +5,7 @@
*/
#include "z_en_wonder_item.h"
#include "vt.h"
#define FLAGS 0x00000000
@ -14,7 +15,20 @@ void EnWonderItem_Init(Actor* thisx, GlobalContext* globalCtx);
void EnWonderItem_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnWonderItem_Update(Actor* thisx, GlobalContext* globalCtx);
/*
void EnWonderItem_MultitagFree(EnWonderItem* this, GlobalContext* globalCtx);
void EnWonderItem_ProximityDrop(EnWonderItem* this, GlobalContext* globalCtx);
void EnWonderItem_InteractSwitch(EnWonderItem* this, GlobalContext* globalCtx);
void EnWonderItem_ProximitySwitch(EnWonderItem* this, GlobalContext* globalCtx);
void EnWonderItem_MultitagOrdered(EnWonderItem* this, GlobalContext* globalCtx);
void EnWonderItem_BombSoldier(EnWonderItem* this, GlobalContext* globalCtx);
void EnWonderItem_RollDrop(EnWonderItem* this, GlobalContext* globalCtx);
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{ 20, 30, 0, { 0, 0, 0 } },
};
const ActorInit En_Wonder_Item_InitVars = {
ACTOR_EN_WONDER_ITEM,
ACTORTYPE_PROP,
@ -26,25 +40,314 @@ const ActorInit En_Wonder_Item_InitVars = {
(ActorFunc)EnWonderItem_Update,
NULL,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/EnWonderItem_Destroy.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B380A0.s")
static Vec3f sTagPointsFree[9];
static Vec3f sTagPointsOrdered[9];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/EnWonderItem_Init.s")
void EnWonderItem_Destroy(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnWonderItem* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B38570.s")
if ((this->collider.dim.radius != 0) || (this->collider.dim.height != 0)) {
Collider_DestroyCylinder(globalCtx, &this->collider);
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B38788.s")
void EnWonderItem_DropCollectible(EnWonderItem* this, GlobalContext* globalCtx, s32 autoCollect) {
static s16 dropTable[] = {
ITEM00_NUTS, ITEM00_HEART_PIECE, ITEM00_MAGIC_LARGE, ITEM00_MAGIC_SMALL,
ITEM00_HEART, ITEM00_ARROWS_SMALL, ITEM00_ARROWS_MEDIUM, ITEM00_ARROWS_LARGE,
ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED, ITEM00_FLEXIBLE,
};
s32 i;
s32 randomDrop;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B387F0.s")
func_80078884(NA_SE_SY_GET_ITEM);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B38824.s")
if (this->dropCount == 0) {
this->dropCount++;
}
for (i = this->dropCount; i > 0; i--) {
if (this->itemDrop < WONDERITEM_DROP_RANDOM) {
if ((this->itemDrop == WONDERITEM_DROP_FLEXIBLE) || !autoCollect) {
Item_DropCollectible(globalCtx, &this->actor.posRot.pos, dropTable[this->itemDrop]);
} else {
Item_DropCollectible(globalCtx, &this->actor.posRot.pos, dropTable[this->itemDrop] | 0x8000);
}
} else {
randomDrop = this->itemDrop - WONDERITEM_DROP_RANDOM;
if (!autoCollect) {
Item_DropCollectibleRandom(globalCtx, NULL, &this->actor.posRot.pos, randomDrop);
} else {
Item_DropCollectibleRandom(globalCtx, NULL, &this->actor.posRot.pos, randomDrop | 0x8000);
}
}
}
if (this->switchFlag >= 0) {
Flags_SetSwitch(globalCtx, this->switchFlag);
}
Actor_Kill(&this->actor);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B388AC.s")
void EnWonderItem_Init(Actor* thisx, GlobalContext* globalCtx) {
static u32 collisionTypes[] = {
0x00000702 /* sword slash */, 0x0001F820 /* arrow */, 0x00000040 /* hammer */, 0x00000008 /* bomb */,
0x00000004 /* slingshot */, 0x00000010 /* boomerang */, 0x00000080 /* hookshot */,
};
s32 pad;
s16 colTypeIndex;
EnWonderItem* this = THIS;
s16 rotZover10;
s16 tagIndex;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B38AD8.s")
osSyncPrintf("\n\n");
// Mysterious mystery, very mysterious
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 不思議不思議まか不思議 \t ☆☆☆☆☆ %x\n" VT_RST, this->actor.params);
this->actor.flags &= ~1;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/func_80B38B78.s")
this->wonderMode = (this->actor.params >> 0xB) & 0x1F;
this->itemDrop = (this->actor.params >> 6) & 0x1F;
this->switchFlag = this->actor.params & 0x3F;
if (this->switchFlag == 0x3F) {
this->switchFlag = -1;
}
this->actor.unk_1F = 1;
if ((this->switchFlag >= 0) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
Actor_Kill(&this->actor);
return;
}
switch (this->wonderMode) {
case WONDERITEM_MULTITAG_FREE:
this->numTagPoints = this->actor.posRot.rot.z & 0xF;
rotZover10 = 0;
if (this->actor.posRot.rot.z >= 10) {
rotZover10 = this->actor.posRot.rot.z / 10;
this->timerMod = rotZover10 * 20;
}
this->numTagPoints = this->actor.posRot.rot.z - rotZover10 * 10;
// i.e timerMod = rot.z / 10 seconds, numTagPoints = rot.z % 10
this->updateFunc = EnWonderItem_MultitagFree;
break;
case WONDERITEM_TAG_POINT_FREE:
tagIndex = this->actor.posRot.rot.z & 0xFF;
sTagPointsFree[tagIndex] = this->actor.posRot.pos;
Actor_Kill(&this->actor);
break;
case WONDERITEM_PROXIMITY_DROP:
this->dropCount = this->actor.posRot.rot.z & 0xFF;
this->updateFunc = EnWonderItem_ProximityDrop;
break;
case WONDERITEM_INTERACT_SWITCH:
colTypeIndex = this->actor.posRot.rot.z & 0xFF;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->collider.body.bumper.flags = collisionTypes[colTypeIndex];
this->collider.dim.radius = 20;
this->collider.dim.height = 30;
this->updateFunc = EnWonderItem_InteractSwitch;
break;
case WONDERITEM_UNUSED:
break;
case WONDERITEM_MULTITAG_ORDERED:
this->numTagPoints = this->actor.posRot.rot.z & 0xF;
rotZover10 = 0;
if (this->actor.posRot.rot.z >= 10) {
rotZover10 = this->actor.posRot.rot.z / 10;
this->timerMod = rotZover10 * 20;
}
this->numTagPoints = this->actor.posRot.rot.z - rotZover10 * 10;
// i.e timerMod = rot.z / 10 seconds, numTagPoints = rot.z % 10
this->updateFunc = EnWonderItem_MultitagOrdered;
break;
case WONDERITEM_TAG_POINT_ORDERED:
tagIndex = this->actor.posRot.rot.z & 0xFF;
sTagPointsOrdered[tagIndex] = this->actor.posRot.pos;
Actor_Kill(&this->actor);
break;
case WONDERITEM_PROXIMITY_SWITCH:
this->updateFunc = EnWonderItem_ProximitySwitch;
break;
case WONDERITEM_BOMB_SOLDIER:
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->collider.body.bumper.flags = 0x00000004; // slingshot
this->unkPos = this->actor.posRot.pos;
this->collider.dim.radius = 35;
this->collider.dim.height = 75;
this->updateFunc = EnWonderItem_BombSoldier;
break;
case WONDERITEM_ROLL_DROP:
this->dropCount = this->actor.posRot.rot.z & 0xFF;
this->updateFunc = EnWonderItem_RollDrop;
break;
default:
Actor_Kill(&this->actor);
break;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Wonder_Item/EnWonderItem_Update.s")
void EnWonderItem_MultitagFree(EnWonderItem* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s32 prevTagFlags = this->tagFlags;
s32 i;
s32 mask;
for (i = 0, mask = 1; i < this->numTagPoints; i++, mask <<= 1) {
if (!(prevTagFlags & mask)) {
f32 dx = player->actor.posRot.pos.x - sTagPointsFree[i].x;
f32 dy = player->actor.posRot.pos.y - sTagPointsFree[i].y;
f32 dz = player->actor.posRot.pos.z - sTagPointsFree[i].z;
if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < 50.0f) {
this->tagFlags |= mask;
this->tagCount++;
this->timer = this->timerMod + 81;
return;
}
if (BREG(0) != 0) {
DebugDisplay_AddObject(sTagPointsFree[i].x, sTagPointsFree[i].y, sTagPointsFree[i].z,
this->actor.posRot.rot.x, this->actor.posRot.rot.y, this->actor.posRot.rot.z,
1.0f, 1.0f, 1.0f, 0, 255, 0, 255, 4, globalCtx->state.gfxCtx);
}
}
}
if (this->timer == 1) {
Actor_Kill(&this->actor);
return;
}
if (this->tagCount == this->numTagPoints) {
if (this->switchFlag >= 0) {
Flags_SetSwitch(globalCtx, this->switchFlag);
}
EnWonderItem_DropCollectible(this, globalCtx, true);
}
}
void EnWonderItem_ProximityDrop(EnWonderItem* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if ((this->actor.xzDistFromLink < 50.0f) &&
(fabsf(this->actor.posRot.pos.y - player->actor.posRot.pos.y) < 30.0f)) {
EnWonderItem_DropCollectible(this, globalCtx, true);
}
}
void EnWonderItem_InteractSwitch(EnWonderItem* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
EnWonderItem_DropCollectible(this, globalCtx, false);
}
}
void EnWonderItem_ProximitySwitch(EnWonderItem* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if ((this->actor.xzDistFromLink < 50.0f) &&
(fabsf(this->actor.posRot.pos.y - player->actor.posRot.pos.y) < 30.0f)) {
if (this->switchFlag >= 0) {
Flags_SetSwitch(globalCtx, this->switchFlag);
}
Actor_Kill(&this->actor);
}
}
void EnWonderItem_MultitagOrdered(EnWonderItem* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s32 prevTagFlags = this->tagFlags;
s32 i;
s32 mask;
for (i = 0, mask = 1; i < this->numTagPoints; i++, mask <<= 1) {
if (!(prevTagFlags & mask)) {
f32 dx = player->actor.posRot.pos.x - sTagPointsOrdered[i].x;
f32 dy = player->actor.posRot.pos.y - sTagPointsOrdered[i].y;
f32 dz = player->actor.posRot.pos.z - sTagPointsOrdered[i].z;
if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < 50.0f) {
if (prevTagFlags & mask) {
return;
} else if (i == this->nextTag) {
this->tagFlags |= mask;
this->tagCount++;
this->nextTag++;
this->timer = this->timerMod + 81;
return;
} else {
Actor_Kill(&this->actor);
return;
}
} else if (BREG(0) != 0) {
DebugDisplay_AddObject(sTagPointsOrdered[i].x, sTagPointsOrdered[i].y, sTagPointsOrdered[i].z,
this->actor.posRot.rot.x, this->actor.posRot.rot.y, this->actor.posRot.rot.z,
1.0f, 1.0f, 1.0f, 0, 0, 255, 255, 4, globalCtx->state.gfxCtx);
}
}
}
if (this->timer == 1) {
Actor_Kill(&this->actor);
return;
}
if (this->tagCount == this->numTagPoints) {
EnWonderItem_DropCollectible(this, globalCtx, true);
}
}
void EnWonderItem_BombSoldier(EnWonderItem* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
if (Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HEISHI2, this->actor.posRot.pos.x,
this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, this->actor.yawTowardsLink, 0,
9) != NULL) {
// Careless soldier spawned
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ うっかり兵セット完了 ☆☆☆☆☆ \n" VT_RST);
}
if (this->switchFlag >= 0) {
Flags_SetSwitch(globalCtx, this->switchFlag);
}
Actor_Kill(&this->actor);
}
}
void EnWonderItem_RollDrop(EnWonderItem* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if ((this->actor.xzDistFromLink < 50.0f) && (player->invincibilityTimer < 0) &&
(fabsf(this->actor.posRot.pos.y - player->actor.posRot.pos.y) < 30.0f)) {
EnWonderItem_DropCollectible(this, globalCtx, true);
}
}
void EnWonderItem_Update(Actor* thisx, GlobalContext* globalCtx) {
static s16 debugArrowColors[] = {
255, 255, 0, 255, 0, 255, 0, 255, 255, 255, 0, 0, 0, 255, 0, 0, 0, 255, 128, 128,
128, 128, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 0, 0, 128, 0, 0, 0, 128,
}; // These seem to be mistyped. Logically they should be s16[13][3] and be indexed as [colorIndex][i]
s32 pad;
EnWonderItem* this = THIS;
s32 colorIndex;
if (this->timer != 0) {
this->timer--;
}
this->updateFunc(this, globalCtx);
if (this->wonderMode == WONDERITEM_UNUSED) {
Actor_SetHeight(&this->actor, this->unkHeight);
}
if ((this->wonderMode == WONDERITEM_INTERACT_SWITCH) || (this->wonderMode == WONDERITEM_BOMB_SOLDIER)) {
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
colorIndex = this->wonderMode;
if (this->wonderMode > 12) {
colorIndex = 0;
}
if (BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z,
this->actor.posRot.rot.x, this->actor.posRot.rot.y, this->actor.posRot.rot.z, 1.0f, 1.0f,
1.0f, debugArrowColors[colorIndex], debugArrowColors[colorIndex + 1],
debugArrowColors[colorIndex + 2], 255, 4, globalCtx->state.gfxCtx);
}
}

View file

@ -6,11 +6,58 @@
struct EnWonderItem;
typedef void (*EnWonderItemUpdateFunc)(struct EnWonderItem*, GlobalContext*);
typedef struct EnWonderItem {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x84];
/* 0x014C */ EnWonderItemUpdateFunc updateFunc;
/* 0x0150 */ f32 unkHeight; // sets height of dummied out mode 4
/* 0x0154 */ s16 wonderMode;
/* 0x0156 */ s16 itemDrop;
/* 0x0158 */ s16 numTagPoints;
/* 0x015A */ s16 dropCount;
/* 0x015C */ s16 timer;
/* 0x015E */ s16 tagFlags;
/* 0x015A */ s16 tagCount;
/* 0x0162 */ s16 switchFlag;
/* 0x0164 */ char unk_164[4];
/* 0x0168 */ s16 nextTag;
/* 0x016A */ s16 timerMod;
/* 0x016C */ Vec3f unkPos; // set to initial position by mode bomb soldier, then never used.
/* 0x0178 */ char unk_178[8];
/* 0x0180 */ ColliderCylinder collider;
/* 0x01CC */ char unk_1CC[4];
} EnWonderItem; // size = 0x01D0
typedef enum {
/* 0 */ WONDERITEM_MULTITAG_FREE,
/* 1 */ WONDERITEM_TAG_POINT_FREE,
/* 2 */ WONDERITEM_PROXIMITY_DROP,
/* 3 */ WONDERITEM_INTERACT_SWITCH,
/* 4 */ WONDERITEM_UNUSED,
/* 5 */ WONDERITEM_MULTITAG_ORDERED,
/* 6 */ WONDERITEM_TAG_POINT_ORDERED,
/* 7 */ WONDERITEM_PROXIMITY_SWITCH,
/* 8 */ WONDERITEM_BOMB_SOLDIER,
/* 9 */ WONDERITEM_ROLL_DROP
} EnWonderItemMode;
typedef enum {
/* 0 */ WONDERITEM_DROP_NUTS,
/* 1 */ WONDERITEM_DROP_HEART_PIECE,
/* 2 */ WONDERITEM_DROP_MAGIC_LARGE,
/* 3 */ WONDERITEM_DROP_MAGIC_SMALL,
/* 4 */ WONDERITEM_DROP_HEART,
/* 5 */ WONDERITEM_DROP_ARROWS_SMALL,
/* 6 */ WONDERITEM_DROP_ARROWS_MEDIUM,
/* 7 */ WONDERITEM_DROP_ARROWS_LARGE,
/* 8 */ WONDERITEM_DROP_GREEN_RUPEE,
/* 9 */ WONDERITEM_DROP_BLUE_RUPEE,
/* A */ WONDERITEM_DROP_RED_RUPEE,
/* B */ WONDERITEM_DROP_FLEXIBLE,
/* C */ WONDERITEM_DROP_RANDOM
} EnWonderItemDrop;
extern const ActorInit En_Wonder_Item_InitVars;
#endif

View file

@ -33,46 +33,50 @@ const ActorInit En_Wonder_Talk2_InitVars = {
NULL,
};
s16 D_80B3A8E0[] = { 0x6, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5 };
s16 D_80B3A8E0[] = { 6, 0, 1, 2, 3, 4, 5 };
void EnWonderTalk2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnWonderTalk2* this = THIS;
s32 offsetCounter;
s16 zOffset;
osSyncPrintf("\n\n");
// Transparent message
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 透明メッセージ君 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params);
this->unk_150 = (this->actor.params >> 6) & 0xFF;
this->baseMsgId = (this->actor.params >> 6) & 0xFF;
if (this->actor.posRot.rot.z > 0) {
offsetCounter = 0;
zOffset = this->actor.posRot.rot.z;
s32 rangeIndex = 0;
s16 rotZmod10 = this->actor.posRot.rot.z;
while (zOffset > 10) {
zOffset -= 10;
offsetCounter += 1;
while (rotZmod10 > 10) {
rotZmod10 -= 10;
rangeIndex++;
}
// rangeIndex = rot.z/10 here
this->triggerRange = rotZmod10 * 40.0f;
if (rangeIndex > 6) {
rangeIndex = 0;
}
this->unk_15C = zOffset * 40.0f;
if (offsetCounter > 6) {
offsetCounter = 0;
}
this->actor.unk_1F = D_80B3A8E0[offsetCounter];
this->actor.unk_1F = D_80B3A8E0[rangeIndex];
osSyncPrintf("\n\n");
// originally?
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 元は? ☆☆☆☆☆ %d\n" VT_RST, this->actor.posRot.rot.z);
// The range is?
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ レンジは? ☆☆☆☆☆ %d\n" VT_RST, this->actor.unk_1F);
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ は、範囲わ? ☆☆☆☆☆ %f\n" VT_RST, this->unk_15C);
// Is the range?
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ は、範囲わ? ☆☆☆☆☆ %f\n" VT_RST, this->triggerRange);
osSyncPrintf("\n\n");
osSyncPrintf("\n\n");
osSyncPrintf("\n\n");
}
this->posRot = this->actor.posRot.pos;
this->initPos = this->actor.posRot.pos;
this->switchFlag = (this->actor.params & 0x3F);
this->unk_154 = ((this->actor.params >> 0xE) & 3);
this->talkMode = ((this->actor.params >> 0xE) & 3);
if (this->switchFlag == 0x3F) {
this->switchFlag = -1;
@ -82,14 +86,14 @@ void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
return;
}
if ((this->unk_154 == 1) && (globalCtx->sceneNum == SCENE_MEN) && (this->switchFlag != 8) &&
if ((this->talkMode == 1) && (globalCtx->sceneNum == SCENE_MEN) && (this->switchFlag != 0x08) &&
(this->switchFlag != 0x16) && (this->switchFlag != 0x2F)) {
this->unk_15A = 0;
this->unk_154 = 4;
this->unk_15A = false;
this->talkMode = 4;
}
if (this->unk_154 == 3) {
this->actor.flags &= ~0x8000000;
if (this->talkMode == 3) {
this->actor.flags &= ~0x08000000;
this->actionFunc = EnWonderTalk2_DoNothing;
} else {
this->actionFunc = func_80B3A10C;
@ -98,8 +102,8 @@ void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx) {
void func_80B3A10C(EnWonderTalk2* this, GlobalContext* globalCtx) {
this->actor.textId = 0x200;
this->actor.textId |= this->unk_150;
if (this->unk_154 == 1 || this->unk_154 == 4) {
this->actor.textId |= this->baseMsgId;
if (this->talkMode == 1 || this->talkMode == 4) {
this->actionFunc = func_80B3A4F8;
} else {
this->actionFunc = func_80B3A15C;
@ -107,35 +111,27 @@ void func_80B3A10C(EnWonderTalk2* this, GlobalContext* globalCtx) {
}
void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) {
Player* player;
Actor* actor;
s16 yawDiff;
s16 yawDiffTemp;
Player* player = PLAYER;
actor = &this->actor;
player = PLAYER;
this->unk_158++;
if (this->switchFlag >= 0 && Flags_GetSwitch(globalCtx, this->switchFlag)) {
if (this->unk_15A == 0) {
this->actor.flags &= -2;
this->unk_15A = 1;
if ((this->switchFlag >= 0) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
if (!this->unk_15A) {
this->actor.flags &= ~1;
this->unk_15A = true;
}
} else if (func_8002F194(&this->actor, globalCtx)) {
if ((this->switchFlag >= 0) && (this->talkMode != 2)) {
Flags_SetSwitch(globalCtx, this->switchFlag);
// I saved it! All of it!
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag);
}
this->actionFunc = func_80B3A10C;
} else {
if (func_8002F194(&this->actor, globalCtx) != 0) {
if ((this->switchFlag >= 0) && (this->unk_154 != 2)) {
Flags_SetSwitch(globalCtx, this->switchFlag);
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag);
}
s16 yawDiff = ABS((s16)(this->actor.yawTowardsLink - this->actor.posRot.rot.y));
this->actionFunc = func_80B3A10C;
return;
}
yawDiffTemp = this->actor.yawTowardsLink - this->actor.posRot.rot.y;
yawDiff = ABS(yawDiffTemp);
if ((!((40.0f + this->unk_15C) < (*actor).xzDistFromLink)) &&
((!(fabsf(player->actor.posRot.pos.y - (*actor).posRot.pos.y) > 100.0f)) && (yawDiff < 0x4000))) {
if (!((this->actor.xzDistFromLink > 40.0f + this->triggerRange) ||
(fabsf(player->actor.posRot.pos.y - this->actor.posRot.pos.y) > 100.0f) || (yawDiff >= 0x4000))) {
if (this->unk_158 >= 2) {
osSyncPrintf("\n\n");
// Transparent Message Kimi Set
@ -143,14 +139,14 @@ void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) {
// Save Information
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ情報 \t %x\n" VT_RST, this->switchFlag);
// Specified message type
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->unk_150);
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->baseMsgId);
// Actual message type
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 実質メッセージ種類 %x\n" VT_RST, this->actor.textId);
// Specified range
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 指定範囲 %d\n" VT_RST, this->actor.posRot.rot.z);
// Processing range
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 処理範囲 %f\n" VT_RST, this->unk_15C);
switch (this->unk_154) {
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 処理範囲 %f\n" VT_RST, this->triggerRange);
switch (this->talkMode) {
case 0:
// Normal
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆ 通常 ☆☆ \n" VT_RST);
@ -167,13 +163,13 @@ void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) {
}
this->unk_158 = 0;
func_8002F1C4(&this->actor, globalCtx, this->unk_15C + 50.0f, 100.0f, EXCH_ITEM_NONE);
func_8002F1C4(&this->actor, globalCtx, this->triggerRange + 50.0f, 100.0f, EXCH_ITEM_NONE);
}
}
}
void func_80B3A3D4(EnWonderTalk2* this, GlobalContext* globalCtx) {
if (BREG(2)) {
if (BREG(2) != 0) {
// Oh
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ わー %d\n" VT_RST, func_8010BDBC(&globalCtx->msgCtx));
}
@ -189,18 +185,18 @@ void func_80B3A3D4(EnWonderTalk2* this, GlobalContext* globalCtx) {
break;
}
case 0:
if ((this->switchFlag >= 0) && (this->unk_154 != 4)) {
if ((this->switchFlag >= 0) && (this->talkMode != 4)) {
Flags_SetSwitch(globalCtx, this->switchFlag);
// (Forced) I saved! It's all about it!
// (Forced) I saved it! All of it!
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ (強制)セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag);
}
if (this->unk_154 == 4) {
this->unk_15A = 1;
if (this->talkMode == 4) {
this->unk_15A = true;
}
this->actor.flags &= ~0x11;
func_8002DF54(globalCtx, NULL, 7);
this->unk_156 = 1;
this->unk_156 = true;
this->actionFunc = func_80B3A4F8;
break;
}
@ -212,61 +208,59 @@ void func_80B3A4F8(EnWonderTalk2* this, GlobalContext* globalCtx) {
player = PLAYER;
this->unk_158++;
if (this->switchFlag >= 0 && Flags_GetSwitch(globalCtx, this->switchFlag)) {
if (this->unk_15A == 0) {
if (!this->unk_15A) {
this->actor.flags &= ~1;
this->unk_15A = 1;
this->unk_15A = true;
}
} else {
if ((this->unk_154 != 4) || (this->unk_15A == 0)) {
if (BREG(2) != 0) {
// distance
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ きょり %f\n" VT_RST, this->actor.xzDistFromLink);
}
if (((this->actor.xzDistFromLink < (40.0f + this->unk_15C)) &&
(fabsf(player->actor.posRot.pos.y - this->actor.posRot.pos.y) < 100.0f)) &&
!Gameplay_InCsMode(globalCtx)) {
if (this->unk_158 >= 2) {
osSyncPrintf("\n\n");
// Transparent Message Kimi Seto
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 透明メッセージ君せっと %x\n" VT_RST, this->actor.params);
// Save Information
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ情報 \t %x\n" VT_RST, this->switchFlag);
// Specified message type
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->unk_150);
// Real message type
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 実質メッセージ種類 %x\n" VT_RST, this->actor.textId);
// Specified range
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 指定範囲 %d\n" VT_RST, this->actor.posRot.rot.z);
// Processing range
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 処理範囲 %f\n" VT_RST, this->unk_15C);
// What is your range?
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ レンジは? \t\t %d\n" VT_RST, this->actor.unk_1F);
osSyncPrintf("\n\n");
osSyncPrintf("\n\n");
switch (this->unk_154) {
case 1:
// Compulsion
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆ 強制 ☆☆ \n" VT_RST);
break;
case 4:
// Geld Training Center Forced Check Only
osSyncPrintf(VT_FGCOL(RED) " ☆☆ ゲルドの修練場強制チェックのみ ☆☆ \n" VT_RST);
break;
}
osSyncPrintf("\n\n");
}
this->unk_158 = 0;
if (this->unk_156 == 0) {
func_8010B680(globalCtx, this->actor.textId, NULL);
func_8002DF54(globalCtx, NULL, 8);
this->actor.flags |= 0x11;
this->actionFunc = func_80B3A3D4;
} else if ((this->talkMode != 4) || !this->unk_15A) {
if (BREG(2) != 0) {
// distance
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ きょり %f\n" VT_RST, this->actor.xzDistFromLink);
}
if (((this->actor.xzDistFromLink < (40.0f + this->triggerRange)) &&
(fabsf(player->actor.posRot.pos.y - this->actor.posRot.pos.y) < 100.0f)) &&
!Gameplay_InCsMode(globalCtx)) {
if (this->unk_158 >= 2) {
osSyncPrintf("\n\n");
// Transparent Message Kimi Seto
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 透明メッセージ君せっと %x\n" VT_RST, this->actor.params);
// Save Information
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ情報 \t %x\n" VT_RST, this->switchFlag);
// Specified message type
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->baseMsgId);
// Real message type
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 実質メッセージ種類 %x\n" VT_RST, this->actor.textId);
// Specified range
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 指定範囲 %d\n" VT_RST, this->actor.posRot.rot.z);
// Processing range
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 処理範囲 %f\n" VT_RST, this->triggerRange);
// What is your range?
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ レンジは? \t\t %d\n" VT_RST, this->actor.unk_1F);
osSyncPrintf("\n\n");
osSyncPrintf("\n\n");
switch (this->talkMode) {
case 1:
// Compulsion
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆ 強制 ☆☆ \n" VT_RST);
break;
case 4:
// Gerudo Training Grounds Forced Check Only
osSyncPrintf(VT_FGCOL(RED) " ☆☆ ゲルドの修練場強制チェックのみ ☆☆ \n" VT_RST);
break;
}
} else {
this->unk_156 = 0;
osSyncPrintf("\n\n");
}
this->unk_158 = 0;
if (!this->unk_156) {
func_8010B680(globalCtx, this->actor.textId, NULL);
func_8002DF54(globalCtx, NULL, 8);
this->actor.flags |= 0x11;
this->actionFunc = func_80B3A3D4;
}
} else {
this->unk_156 = false;
}
}
}
@ -275,12 +269,14 @@ void EnWonderTalk2_DoNothing(EnWonderTalk2* this, GlobalContext* globalCtx) {
}
void EnWonderTalk2_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnWonderTalk2* this = THIS;
this->actionFunc(this, globalCtx);
this->actor.posRot.pos.y = this->posRot.y;
this->actor.posRot.pos.y = this->initPos.y;
Actor_SetHeight(&this->actor, this->height);
if (BREG(0) != 0) {
if (this->unk_158 != 0) {
if ((this->unk_158 & 1) == 0) {

View file

@ -11,16 +11,16 @@ typedef void (*EnWonderTalk2Func)(struct EnWonderTalk2*, GlobalContext*);
typedef struct EnWonderTalk2 {
/* 0x0000 */ Actor actor;
/* 0x014C */ EnWonderTalk2Func actionFunc;
/* 0x0150 */ s16 unk_150; // specified message type
/* 0x0150 */ s16 baseMsgId; // specified message type
/* 0x0152 */ s16 switchFlag;
/* 0x0154 */ s16 unk_154;
/* 0x0154 */ s16 talkMode;
/* 0x0156 */ s16 unk_156;
/* 0x0158 */ s16 unk_158;
/* 0x015A */ u8 unk_15A;
/* 0x015B */ u8 unk_15B;
/* 0x015C */ f32 unk_15C; // processing range
/* 0x015C */ f32 triggerRange;
/* 0x0160 */ f32 height;
/* 0x0164 */ Vec3f posRot;
/* 0x0164 */ Vec3f initPos;
} EnWonderTalk2; // size = 0x0170
extern const ActorInit En_Wonder_Talk2_InitVars;