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

Arms_Hook OK (#210)

* Arms_Hook OK

* cleanup

* decr

* remove redundant include

* missed some things

* rename things

Co-authored-by: dark-samus <mathmcclintic@gmail.com>
This commit is contained in:
fig02 2020-06-17 15:44:22 -04:00 committed by GitHub
parent 4940621679
commit 67d13fe190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 341 additions and 906 deletions

View file

@ -1,19 +0,0 @@
glabel ArmsHook_Destroy
/* 00080 80864F80 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00084 80864F84 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00088 80864F88 8C820200 */ lw $v0, 0x0200($a0) ## 00000200
/* 0008C 80864F8C 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 00090 80864F90 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000
/* 00094 80864F94 10400005 */ beq $v0, $zero, .L80864FAC
/* 00098 80864F98 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000
/* 0009C 80864F9C 8C4E0004 */ lw $t6, 0x0004($v0) ## 00000004
/* 000A0 80864FA0 2401DFFF */ addiu $at, $zero, 0xDFFF ## $at = FFFFDFFF
/* 000A4 80864FA4 01C17824 */ and $t7, $t6, $at
/* 000A8 80864FA8 AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
.L80864FAC:
/* 000AC 80864FAC 0C017418 */ jal Collider_DestroyQuad
/* 000B0 80864FB0 24C5014C */ addiu $a1, $a2, 0x014C ## $a1 = 0000014C
/* 000B4 80864FB4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 000B8 80864FB8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 000BC 80864FBC 03E00008 */ jr $ra
/* 000C0 80864FC0 00000000 */ nop

View file

@ -1,204 +0,0 @@
.rdata
glabel D_80865BC0
.asciz "../z_arms_hook.c"
.balign 4
glabel D_80865BD4
.asciz "../z_arms_hook.c"
.balign 4
glabel D_80865BE8
.asciz "../z_arms_hook.c"
.balign 4
glabel D_80865BFC
.asciz "../z_arms_hook.c"
.balign 4
.late_rodata
glabel D_80865C14
.float 0.015
glabel D_80865C18
.float 0.01
.text
glabel ArmsHook_Draw
/* 00930 80865830 27BDFF70 */ addiu $sp, $sp, 0xFF70 ## $sp = FFFFFF70
/* 00934 80865834 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00938 80865838 AFB00020 */ sw $s0, 0x0020($sp)
/* 0093C 8086583C AFA50094 */ sw $a1, 0x0094($sp)
/* 00940 80865840 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 00944 80865844 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00948 80865848 8C4F0134 */ lw $t7, 0x0134($v0) ## 00000134
/* 0094C 8086584C 51E0009E */ beql $t7, $zero, .L80865AC8
/* 00950 80865850 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00954 80865854 9058015D */ lbu $t8, 0x015D($v0) ## 0000015D
/* 00958 80865858 2401000F */ addiu $at, $zero, 0x000F ## $at = 0000000F
/* 0095C 8086585C 27A40044 */ addiu $a0, $sp, 0x0044 ## $a0 = FFFFFFB4
/* 00960 80865860 17010098 */ bne $t8, $at, .L80865AC4
/* 00964 80865864 3C068086 */ lui $a2, %hi(D_80865BC0) ## $a2 = 80860000
/* 00968 80865868 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 0096C 8086586C AFA20084 */ sw $v0, 0x0084($sp)
/* 00970 80865870 24C65BC0 */ addiu $a2, $a2, %lo(D_80865BC0) ## $a2 = 80865BC0
/* 00974 80865874 24070352 */ addiu $a3, $zero, 0x0352 ## $a3 = 00000352
/* 00978 80865878 0C031AB1 */ jal Graph_OpenDisps
/* 0097C 8086587C AFA50054 */ sw $a1, 0x0054($sp)
/* 00980 80865880 8E190214 */ lw $t9, 0x0214($s0) ## 00000214
/* 00984 80865884 3C088086 */ lui $t0, %hi(func_8086518C) ## $t0 = 80860000
/* 00988 80865888 2508518C */ addiu $t0, $t0, %lo(func_8086518C) ## $t0 = 8086518C
/* 0098C 8086588C 17280006 */ bne $t9, $t0, .L808658A8
/* 00990 80865890 00000000 */ nop
/* 00994 80865894 86090210 */ lh $t1, 0x0210($s0) ## 00000210
/* 00998 80865898 3C048086 */ lui $a0, %hi(D_80865B7C) ## $a0 = 80860000
/* 0099C 8086589C 24845B7C */ addiu $a0, $a0, %lo(D_80865B7C) ## $a0 = 80865B7C
/* 009A0 808658A0 1D20000F */ bgtz $t1, .L808658E0
/* 009A4 808658A4 00000000 */ nop
.L808658A8:
/* 009A8 808658A8 3C048086 */ lui $a0, %hi(D_80865B70) ## $a0 = 80860000
/* 009AC 808658AC 24845B70 */ addiu $a0, $a0, %lo(D_80865B70) ## $a0 = 80865B70
/* 009B0 808658B0 0C0346BD */ jal Matrix_MultVec3f
/* 009B4 808658B4 260501E8 */ addiu $a1, $s0, 0x01E8 ## $a1 = 000001E8
/* 009B8 808658B8 3C048086 */ lui $a0, %hi(D_80865B88) ## $a0 = 80860000
/* 009BC 808658BC 24845B88 */ addiu $a0, $a0, %lo(D_80865B88) ## $a0 = 80865B88
/* 009C0 808658C0 0C0346BD */ jal Matrix_MultVec3f
/* 009C4 808658C4 27A5006C */ addiu $a1, $sp, 0x006C ## $a1 = FFFFFFDC
/* 009C8 808658C8 3C048086 */ lui $a0, %hi(D_80865B94) ## $a0 = 80860000
/* 009CC 808658CC 24845B94 */ addiu $a0, $a0, %lo(D_80865B94) ## $a0 = 80865B94
/* 009D0 808658D0 0C0346BD */ jal Matrix_MultVec3f
/* 009D4 808658D4 27A50060 */ addiu $a1, $sp, 0x0060 ## $a1 = FFFFFFD0
/* 009D8 808658D8 1000000B */ beq $zero, $zero, .L80865908
/* 009DC 808658DC AE0001CC */ sw $zero, 0x01CC($s0) ## 000001CC
.L808658E0:
/* 009E0 808658E0 0C0346BD */ jal Matrix_MultVec3f
/* 009E4 808658E4 260501E8 */ addiu $a1, $s0, 0x01E8 ## $a1 = 000001E8
/* 009E8 808658E8 3C048086 */ lui $a0, %hi(D_80865BA0) ## $a0 = 80860000
/* 009EC 808658EC 24845BA0 */ addiu $a0, $a0, %lo(D_80865BA0) ## $a0 = 80865BA0
/* 009F0 808658F0 0C0346BD */ jal Matrix_MultVec3f
/* 009F4 808658F4 27A5006C */ addiu $a1, $sp, 0x006C ## $a1 = FFFFFFDC
/* 009F8 808658F8 3C048086 */ lui $a0, %hi(D_80865BAC) ## $a0 = 80860000
/* 009FC 808658FC 24845BAC */ addiu $a0, $a0, %lo(D_80865BAC) ## $a0 = 80865BAC
/* 00A00 80865900 0C0346BD */ jal Matrix_MultVec3f
/* 00A04 80865904 27A50060 */ addiu $a1, $sp, 0x0060 ## $a1 = FFFFFFD0
.L80865908:
/* 00A08 80865908 27AA0060 */ addiu $t2, $sp, 0x0060 ## $t2 = FFFFFFD0
/* 00A0C 8086590C AFAA0010 */ sw $t2, 0x0010($sp)
/* 00A10 80865910 8FA40094 */ lw $a0, 0x0094($sp)
/* 00A14 80865914 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C
/* 00A18 80865918 260601CC */ addiu $a2, $s0, 0x01CC ## $a2 = 000001CC
/* 00A1C 8086591C 0C024120 */ jal func_80090480
/* 00A20 80865920 27A7006C */ addiu $a3, $sp, 0x006C ## $a3 = FFFFFFDC
/* 00A24 80865924 8FAB0094 */ lw $t3, 0x0094($sp)
/* 00A28 80865928 0C024F46 */ jal func_80093D18
/* 00A2C 8086592C 8D640000 */ lw $a0, 0x0000($t3) ## 00000000
/* 00A30 80865930 8FA70054 */ lw $a3, 0x0054($sp)
/* 00A34 80865934 3C0DDA38 */ lui $t5, 0xDA38 ## $t5 = DA380000
/* 00A38 80865938 35AD0003 */ ori $t5, $t5, 0x0003 ## $t5 = DA380003
/* 00A3C 8086593C 8CE202C0 */ lw $v0, 0x02C0($a3) ## 000002C0
/* 00A40 80865940 3C058086 */ lui $a1, %hi(D_80865BD4) ## $a1 = 80860000
/* 00A44 80865944 24A55BD4 */ addiu $a1, $a1, %lo(D_80865BD4) ## $a1 = 80865BD4
/* 00A48 80865948 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008
/* 00A4C 8086594C ACEC02C0 */ sw $t4, 0x02C0($a3) ## 000002C0
/* 00A50 80865950 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000
/* 00A54 80865954 8FAF0094 */ lw $t7, 0x0094($sp)
/* 00A58 80865958 2406037F */ addiu $a2, $zero, 0x037F ## $a2 = 0000037F
/* 00A5C 8086595C 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000
/* 00A60 80865960 0C0346A2 */ jal Matrix_NewMtx
/* 00A64 80865964 AFA20040 */ sw $v0, 0x0040($sp)
/* 00A68 80865968 8FA30040 */ lw $v1, 0x0040($sp)
/* 00A6C 8086596C 3C190603 */ lui $t9, 0x0603 ## $t9 = 06030000
/* 00A70 80865970 2739B288 */ addiu $t9, $t9, 0xB288 ## $t9 = 0602B288
/* 00A74 80865974 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 00A78 80865978 8FA40054 */ lw $a0, 0x0054($sp)
/* 00A7C 8086597C 3C0EDE00 */ lui $t6, 0xDE00 ## $t6 = DE000000
/* 00A80 80865980 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 00A84 80865984 8C8202C0 */ lw $v0, 0x02C0($a0) ## 000002C0
/* 00A88 80865988 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008
/* 00A8C 8086598C AC9802C0 */ sw $t8, 0x02C0($a0) ## 000002C0
/* 00A90 80865990 AC590004 */ sw $t9, 0x0004($v0) ## 00000004
/* 00A94 80865994 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000
/* 00A98 80865998 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C
/* 00A9C 8086599C C60E0028 */ lwc1 $f14, 0x0028($s0) ## 00000028
/* 00AA0 808659A0 0C034261 */ jal Matrix_Translate
/* 00AA4 808659A4 C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 00AA8 808659A8 8FA40084 */ lw $a0, 0x0084($sp)
/* 00AAC 808659AC 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024
/* 00AB0 808659B0 27A60078 */ addiu $a2, $sp, 0x0078 ## $a2 = FFFFFFE8
/* 00AB4 808659B4 0C01DFB4 */ jal Math_Vec3f_Diff
## Vec3f_Sub
/* 00AB8 808659B8 248403C8 */ addiu $a0, $a0, 0x03C8 ## $a0 = 000003C8
/* 00ABC 808659BC C7AC0078 */ lwc1 $f12, 0x0078($sp)
/* 00AC0 808659C0 C7AE0080 */ lwc1 $f14, 0x0080($sp)
/* 00AC4 808659C4 460C6102 */ mul.s $f4, $f12, $f12
/* 00AC8 808659C8 00000000 */ nop
/* 00ACC 808659CC 460E7182 */ mul.s $f6, $f14, $f14
/* 00AD0 808659D0 46062080 */ add.s $f2, $f4, $f6
/* 00AD4 808659D4 46001004 */ sqrt.s $f0, $f2
/* 00AD8 808659D8 E7A20058 */ swc1 $f2, 0x0058($sp)
/* 00ADC 808659DC 0C03F494 */ jal Math_atan2f
/* 00AE0 808659E0 E7A0005C */ swc1 $f0, 0x005C($sp)
/* 00AE4 808659E4 46000306 */ mov.s $f12, $f0
/* 00AE8 808659E8 0C034348 */ jal Matrix_RotateY
/* 00AEC 808659EC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00AF0 808659F0 C7A2007C */ lwc1 $f2, 0x007C($sp)
/* 00AF4 808659F4 C7AE005C */ lwc1 $f14, 0x005C($sp)
/* 00AF8 808659F8 0C03F494 */ jal Math_atan2f
/* 00AFC 808659FC 46001307 */ neg.s $f12, $f2
/* 00B00 80865A00 46000306 */ mov.s $f12, $f0
/* 00B04 80865A04 0C0342DC */ jal Matrix_RotateX
/* 00B08 80865A08 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 00B0C 80865A0C C7A2007C */ lwc1 $f2, 0x007C($sp)
/* 00B10 80865A10 C7AA0058 */ lwc1 $f10, 0x0058($sp)
/* 00B14 80865A14 3C018086 */ lui $at, %hi(D_80865C14) ## $at = 80860000
/* 00B18 80865A18 46021202 */ mul.s $f8, $f2, $f2
/* 00B1C 80865A1C C42C5C14 */ lwc1 $f12, %lo(D_80865C14)($at)
/* 00B20 80865A20 3C018086 */ lui $at, %hi(D_80865C18) ## $at = 80860000
/* 00B24 80865A24 C4305C18 */ lwc1 $f16, %lo(D_80865C18)($at)
/* 00B28 80865A28 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 00B2C 80865A2C 46006386 */ mov.s $f14, $f12
/* 00B30 80865A30 460A4000 */ add.s $f0, $f8, $f10
/* 00B34 80865A34 46000004 */ sqrt.s $f0, $f0
/* 00B38 80865A38 46100482 */ mul.s $f18, $f0, $f16
/* 00B3C 80865A3C 44069000 */ mfc1 $a2, $f18
/* 00B40 80865A40 0C0342A3 */ jal Matrix_Scale
/* 00B44 80865A44 00000000 */ nop
/* 00B48 80865A48 8FA30054 */ lw $v1, 0x0054($sp)
/* 00B4C 80865A4C 3C09DA38 */ lui $t1, 0xDA38 ## $t1 = DA380000
/* 00B50 80865A50 35290003 */ ori $t1, $t1, 0x0003 ## $t1 = DA380003
/* 00B54 80865A54 8C6202C0 */ lw $v0, 0x02C0($v1) ## 000002C0
/* 00B58 80865A58 3C058086 */ lui $a1, %hi(D_80865BE8) ## $a1 = 80860000
/* 00B5C 80865A5C 24A55BE8 */ addiu $a1, $a1, %lo(D_80865BE8) ## $a1 = 80865BE8
/* 00B60 80865A60 24480008 */ addiu $t0, $v0, 0x0008 ## $t0 = 00000008
/* 00B64 80865A64 AC6802C0 */ sw $t0, 0x02C0($v1) ## 000002C0
/* 00B68 80865A68 AC490000 */ sw $t1, 0x0000($v0) ## 00000000
/* 00B6C 80865A6C 8FAA0094 */ lw $t2, 0x0094($sp)
/* 00B70 80865A70 2406038E */ addiu $a2, $zero, 0x038E ## $a2 = 0000038E
/* 00B74 80865A74 00408025 */ or $s0, $v0, $zero ## $s0 = 00000000
/* 00B78 80865A78 0C0346A2 */ jal Matrix_NewMtx
/* 00B7C 80865A7C 8D440000 */ lw $a0, 0x0000($t2) ## 00000000
/* 00B80 80865A80 AE020004 */ sw $v0, 0x0004($s0) ## 00000004
/* 00B84 80865A84 8FAB0054 */ lw $t3, 0x0054($sp)
/* 00B88 80865A88 3C0F0603 */ lui $t7, 0x0603 ## $t7 = 06030000
/* 00B8C 80865A8C 25EFAFF0 */ addiu $t7, $t7, 0xAFF0 ## $t7 = 0602AFF0
/* 00B90 80865A90 8D6202C0 */ lw $v0, 0x02C0($t3) ## 000002C0
/* 00B94 80865A94 3C0DDE00 */ lui $t5, 0xDE00 ## $t5 = DE000000
/* 00B98 80865A98 3C068086 */ lui $a2, %hi(D_80865BFC) ## $a2 = 80860000
/* 00B9C 80865A9C 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008
/* 00BA0 80865AA0 AD6C02C0 */ sw $t4, 0x02C0($t3) ## 000002C0
/* 00BA4 80865AA4 AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
/* 00BA8 80865AA8 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000
/* 00BAC 80865AAC 8FB80094 */ lw $t8, 0x0094($sp)
/* 00BB0 80865AB0 24C65BFC */ addiu $a2, $a2, %lo(D_80865BFC) ## $a2 = 80865BFC
/* 00BB4 80865AB4 27A40044 */ addiu $a0, $sp, 0x0044 ## $a0 = FFFFFFB4
/* 00BB8 80865AB8 24070391 */ addiu $a3, $zero, 0x0391 ## $a3 = 00000391
/* 00BBC 80865ABC 0C031AD5 */ jal Graph_CloseDisps
/* 00BC0 80865AC0 8F050000 */ lw $a1, 0x0000($t8) ## 00000000
.L80865AC4:
/* 00BC4 80865AC4 8FBF0024 */ lw $ra, 0x0024($sp)
.L80865AC8:
/* 00BC8 80865AC8 8FB00020 */ lw $s0, 0x0020($sp)
/* 00BCC 80865ACC 27BD0090 */ addiu $sp, $sp, 0x0090 ## $sp = 00000000
/* 00BD0 80865AD0 03E00008 */ jr $ra
/* 00BD4 80865AD4 00000000 */ nop
/* 00BD8 80865AD8 00000000 */ nop
/* 00BDC 80865ADC 00000000 */ nop

View file

@ -1,31 +0,0 @@
glabel ArmsHook_Init
/* 00008 80864F08 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 0000C 80864F0C AFB00018 */ sw $s0, 0x0018($sp)
/* 00010 80864F10 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00014 80864F14 AFA5002C */ sw $a1, 0x002C($sp)
/* 00018 80864F18 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 0001C 80864F1C AFBF001C */ sw $ra, 0x001C($sp)
/* 00020 80864F20 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C
/* 00024 80864F24 0C017406 */ jal Collider_InitQuad
/* 00028 80864F28 AFA50020 */ sw $a1, 0x0020($sp)
/* 0002C 80864F2C 3C078086 */ lui $a3, %hi(D_80865B00) ## $a3 = 80860000
/* 00030 80864F30 8FA50020 */ lw $a1, 0x0020($sp)
/* 00034 80864F34 24E75B00 */ addiu $a3, $a3, %lo(D_80865B00) ## $a3 = 80865B00
/* 00038 80864F38 8FA4002C */ lw $a0, 0x002C($sp)
/* 0003C 80864F3C 0C017441 */ jal Collider_SetQuad
/* 00040 80864F40 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00044 80864F44 3C058086 */ lui $a1, %hi(func_80864FC4) ## $a1 = 80860000
/* 00048 80864F48 24A54FC4 */ addiu $a1, $a1, %lo(func_80864FC4) ## $a1 = 80864FC4
/* 0004C 80864F4C 0C2193C0 */ jal ArmsHook_SetupAction
/* 00050 80864F50 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00054 80864F54 8E0F0024 */ lw $t7, 0x0024($s0) ## 00000024
/* 00058 80864F58 8E0E0028 */ lw $t6, 0x0028($s0) ## 00000028
/* 0005C 80864F5C AE0F01E8 */ sw $t7, 0x01E8($s0) ## 000001E8
/* 00060 80864F60 8E0F002C */ lw $t7, 0x002C($s0) ## 0000002C
/* 00064 80864F64 AE0E01EC */ sw $t6, 0x01EC($s0) ## 000001EC
/* 00068 80864F68 AE0F01F0 */ sw $t7, 0x01F0($s0) ## 000001F0
/* 0006C 80864F6C 8FBF001C */ lw $ra, 0x001C($sp)
/* 00070 80864F70 8FB00018 */ lw $s0, 0x0018($sp)
/* 00074 80864F74 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 00078 80864F78 03E00008 */ jr $ra
/* 0007C 80864F7C 00000000 */ nop

View file

@ -1,3 +0,0 @@
glabel ArmsHook_SetupAction
/* 00000 80864F00 03E00008 */ jr $ra
/* 00004 80864F04 AC850214 */ sw $a1, 0x0214($a0) ## 00000214

View file

@ -1,18 +0,0 @@
glabel ArmsHook_Update
/* 008EC 808657EC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 008F0 808657F0 AFBF0014 */ sw $ra, 0x0014($sp)
/* 008F4 808657F4 AFA40018 */ sw $a0, 0x0018($sp)
/* 008F8 808657F8 8C990214 */ lw $t9, 0x0214($a0) ## 00000214
/* 008FC 808657FC 0320F809 */ jalr $ra, $t9
/* 00900 80865800 00000000 */ nop
/* 00904 80865804 8FA40018 */ lw $a0, 0x0018($sp)
/* 00908 80865808 8C8F01E8 */ lw $t7, 0x01E8($a0) ## 000001E8
/* 0090C 8086580C 8C8E01EC */ lw $t6, 0x01EC($a0) ## 000001EC
/* 00910 80865810 AC8F01F4 */ sw $t7, 0x01F4($a0) ## 000001F4
/* 00914 80865814 8C8F01F0 */ lw $t7, 0x01F0($a0) ## 000001F0
/* 00918 80865818 AC8E01F8 */ sw $t6, 0x01F8($a0) ## 000001F8
/* 0091C 8086581C AC8F01FC */ sw $t7, 0x01FC($a0) ## 000001FC
/* 00920 80865820 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00924 80865824 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00928 80865828 03E00008 */ jr $ra
/* 0092C 8086582C 00000000 */ nop

View file

@ -1,35 +0,0 @@
glabel func_80864FC4
/* 000C4 80864FC4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 000C8 80864FC8 AFBF0014 */ sw $ra, 0x0014($sp)
/* 000CC 80864FCC AFA50024 */ sw $a1, 0x0024($sp)
/* 000D0 80864FD0 8C8E0118 */ lw $t6, 0x0118($a0) ## 00000118
/* 000D4 80864FD4 55C00018 */ bnel $t6, $zero, .L80865038
/* 000D8 80864FD8 8FBF0014 */ lw $ra, 0x0014($sp)
/* 000DC 80864FDC 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 000E0 80864FE0 24010010 */ addiu $at, $zero, 0x0010 ## $at = 00000010
/* 000E4 80864FE4 3C058086 */ lui $a1, %hi(func_8086518C) ## $a1 = 80860000
/* 000E8 80864FE8 80580151 */ lb $t8, 0x0151($v0) ## 00000151
/* 000EC 80864FEC 2402001A */ addiu $v0, $zero, 0x001A ## $v0 = 0000001A
/* 000F0 80864FF0 24A5518C */ addiu $a1, $a1, %lo(func_8086518C) ## $a1 = 8086518C
/* 000F4 80864FF4 17010003 */ bne $t8, $at, .L80865004
/* 000F8 80864FF8 00000000 */ nop
/* 000FC 80864FFC 10000001 */ beq $zero, $zero, .L80865004
/* 00100 80865000 2402000D */ addiu $v0, $zero, 0x000D ## $v0 = 0000000D
.L80865004:
/* 00104 80865004 AFA20018 */ sw $v0, 0x0018($sp)
/* 00108 80865008 0C2193C0 */ jal ArmsHook_SetupAction
/* 0010C 8086500C AFA40020 */ sw $a0, 0x0020($sp)
/* 00110 80865010 8FA40020 */ lw $a0, 0x0020($sp)
/* 00114 80865014 0C00B669 */ jal func_8002D9A4
/* 00118 80865018 3C0541A0 */ lui $a1, 0x41A0 ## $a1 = 41A00000
/* 0011C 8086501C 8FB90024 */ lw $t9, 0x0024($sp)
/* 00120 80865020 8FA40020 */ lw $a0, 0x0020($sp)
/* 00124 80865024 8FA20018 */ lw $v0, 0x0018($sp)
/* 00128 80865028 8F281C44 */ lw $t0, 0x1C44($t9) ## 00001C44
/* 0012C 8086502C A4820210 */ sh $v0, 0x0210($a0) ## 00000210
/* 00130 80865030 AC880118 */ sw $t0, 0x0118($a0) ## 00000118
/* 00134 80865034 8FBF0014 */ lw $ra, 0x0014($sp)
.L80865038:
/* 00138 80865038 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 0013C 8086503C 03E00008 */ jr $ra
/* 00140 80865040 00000000 */ nop

View file

@ -1,5 +0,0 @@
glabel func_80865044
/* 00144 80865044 8C820118 */ lw $v0, 0x0118($a0) ## 00000118
/* 00148 80865048 AC82011C */ sw $v0, 0x011C($a0) ## 0000011C
/* 0014C 8086504C 03E00008 */ jr $ra
/* 00150 80865050 AC440118 */ sw $a0, 0x0118($v0) ## 00000118

View file

@ -1,14 +0,0 @@
glabel func_80865054
/* 00154 80865054 ACA4011C */ sw $a0, 0x011C($a1) ## 0000011C
/* 00158 80865058 ACA403AC */ sw $a0, 0x03AC($a1) ## 000003AC
/* 0015C 8086505C 8C8E011C */ lw $t6, 0x011C($a0) ## 0000011C
/* 00160 80865060 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 00164 80865064 11C00005 */ beq $t6, $zero, .L8086507C
/* 00168 80865068 00000000 */ nop
/* 0016C 8086506C ACA00118 */ sw $zero, 0x0118($a1) ## 00000118
/* 00170 80865070 AC80011C */ sw $zero, 0x011C($a0) ## 0000011C
/* 00174 80865074 03E00008 */ jr $ra
/* 00178 80865078 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
.L8086507C:
/* 0017C 8086507C 03E00008 */ jr $ra
/* 00180 80865080 00000000 */ nop

View file

@ -1,12 +0,0 @@
glabel func_80865084
/* 00184 80865084 8C820200 */ lw $v0, 0x0200($a0) ## 00000200
/* 00188 80865088 10400006 */ beq $v0, $zero, .L808650A4
/* 0018C 8086508C 00000000 */ nop
/* 00190 80865090 8C4E0004 */ lw $t6, 0x0004($v0) ## 00000004
/* 00194 80865094 2401DFFF */ addiu $at, $zero, 0xDFFF ## $at = FFFFDFFF
/* 00198 80865098 01C17824 */ and $t7, $t6, $at
/* 0019C 8086509C AC4F0004 */ sw $t7, 0x0004($v0) ## 00000004
/* 001A0 808650A0 AC800200 */ sw $zero, 0x0200($a0) ## 00000200
.L808650A4:
/* 001A4 808650A4 03E00008 */ jr $ra
/* 001A8 808650A8 00000000 */ nop

View file

@ -1,44 +0,0 @@
glabel func_808650AC
/* 001AC 808650AC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 001B0 808650B0 AFBF0014 */ sw $ra, 0x0014($sp)
/* 001B4 808650B4 AFA40020 */ sw $a0, 0x0020($sp)
/* 001B8 808650B8 8C860118 */ lw $a2, 0x0118($a0) ## 00000118
/* 001BC 808650BC 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
/* 001C0 808650C0 0C023C41 */ jal func_8008F104
/* 001C4 808650C4 AFA6001C */ sw $a2, 0x001C($sp)
/* 001C8 808650C8 1040001A */ beq $v0, $zero, .L80865134
/* 001CC 808650CC 8FA6001C */ lw $a2, 0x001C($sp)
/* 001D0 808650D0 80CF0151 */ lb $t7, 0x0151($a2) ## 00000151
/* 001D4 808650D4 80D80154 */ lb $t8, 0x0154($a2) ## 00000154
/* 001D8 808650D8 8FA40020 */ lw $a0, 0x0020($sp)
/* 001DC 808650DC 55F8000C */ bnel $t7, $t8, .L80865110
/* 001E0 808650E0 A4800210 */ sh $zero, 0x0210($a0) ## 00000210
/* 001E4 808650E4 8CD90004 */ lw $t9, 0x0004($a2) ## 00000004
/* 001E8 808650E8 33280100 */ andi $t0, $t9, 0x0100 ## $t0 = 00000000
/* 001EC 808650EC 55000008 */ bnel $t0, $zero, .L80865110
/* 001F0 808650F0 A4800210 */ sh $zero, 0x0210($a0) ## 00000210
/* 001F4 808650F4 8CC9067C */ lw $t1, 0x067C($a2) ## 0000067C
/* 001F8 808650F8 3C010400 */ lui $at, 0x0400 ## $at = 04000000
/* 001FC 808650FC 34210080 */ ori $at, $at, 0x0080 ## $at = 04000080
/* 00200 80865100 01215024 */ and $t2, $t1, $at
/* 00204 80865104 5140000C */ beql $t2, $zero, .L80865138
/* 00208 80865108 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 0020C 8086510C A4800210 */ sh $zero, 0x0210($a0) ## 00000210
.L80865110:
/* 00210 80865110 0C219421 */ jal func_80865084
/* 00214 80865114 AFA6001C */ sw $a2, 0x001C($sp)
/* 00218 80865118 8FA6001C */ lw $a2, 0x001C($sp)
/* 0021C 8086511C 8FA40020 */ lw $a0, 0x0020($sp)
/* 00220 80865120 24C503C8 */ addiu $a1, $a2, 0x03C8 ## $a1 = 000003C8
/* 00224 80865124 0C01DF90 */ jal Math_Vec3f_Copy
## Vec3f_Copy
/* 00228 80865128 24840024 */ addiu $a0, $a0, 0x0024 ## $a0 = 00000024
/* 0022C 8086512C 10000002 */ beq $zero, $zero, .L80865138
/* 00230 80865130 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
.L80865134:
/* 00234 80865134 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L80865138:
/* 00238 80865138 8FBF0014 */ lw $ra, 0x0014($sp)
/* 0023C 8086513C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00240 80865140 03E00008 */ jr $ra
/* 00244 80865144 00000000 */ nop

View file

@ -1,19 +0,0 @@
glabel func_80865148
/* 00248 80865148 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 0024C 8086514C AFBF0014 */ sw $ra, 0x0014($sp)
/* 00250 80865150 AFA40018 */ sw $a0, 0x0018($sp)
/* 00254 80865154 8CAE0004 */ lw $t6, 0x0004($a1) ## 00000004
/* 00258 80865158 24A40024 */ addiu $a0, $a1, 0x0024 ## $a0 = 00000024
/* 0025C 8086515C 35CF2000 */ ori $t7, $t6, 0x2000 ## $t7 = 00002000
/* 00260 80865160 ACAF0004 */ sw $t7, 0x0004($a1) ## 00000004
/* 00264 80865164 8FB80018 */ lw $t8, 0x0018($sp)
/* 00268 80865168 AF050200 */ sw $a1, 0x0200($t8) ## 00000200
/* 0026C 8086516C 8FB90018 */ lw $t9, 0x0018($sp)
/* 00270 80865170 27250024 */ addiu $a1, $t9, 0x0024 ## $a1 = 00000024
/* 00274 80865174 0C01DFB4 */ jal Math_Vec3f_Diff
## Vec3f_Sub
/* 00278 80865178 27260204 */ addiu $a2, $t9, 0x0204 ## $a2 = 00000204
/* 0027C 8086517C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00280 80865180 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00284 80865184 03E00008 */ jr $ra
/* 00288 80865188 00000000 */ nop

View file

@ -1,459 +0,0 @@
.late_rodata
glabel D_80865C10
.float 3.051851E-5
.text
glabel func_8086518C
/* 0028C 8086518C 27BDFF38 */ addiu $sp, $sp, 0xFF38 ## $sp = FFFFFF38
/* 00290 80865190 AFBF0034 */ sw $ra, 0x0034($sp)
/* 00294 80865194 AFB00030 */ sw $s0, 0x0030($sp)
/* 00298 80865198 AFA500CC */ sw $a1, 0x00CC($sp)
/* 0029C 8086519C 8C8F0118 */ lw $t7, 0x0118($a0) ## 00000118
/* 002A0 808651A0 8CA61C44 */ lw $a2, 0x1C44($a1) ## 00001C44
/* 002A4 808651A4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 002A8 808651A8 11E00005 */ beq $t7, $zero, .L808651C0
/* 002AC 808651AC 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
/* 002B0 808651B0 0C023C41 */ jal func_8008F104
/* 002B4 808651B4 AFA600C4 */ sw $a2, 0x00C4($sp)
/* 002B8 808651B8 14400007 */ bne $v0, $zero, .L808651D8
/* 002BC 808651BC 8FA400C4 */ lw $a0, 0x00C4($sp)
.L808651C0:
/* 002C0 808651C0 0C219421 */ jal func_80865084
/* 002C4 808651C4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 002C8 808651C8 0C00B55C */ jal Actor_Kill
/* 002CC 808651CC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 002D0 808651D0 10000182 */ beq $zero, $zero, .L808657DC
/* 002D4 808651D4 8FBF0034 */ lw $ra, 0x0034($sp)
.L808651D8:
/* 002D8 808651D8 0C00BE3C */ jal func_8002F8F0
/* 002DC 808651DC 2405100B */ addiu $a1, $zero, 0x100B ## $a1 = 0000100B
/* 002E0 808651E0 0C21942B */ jal func_808650AC
/* 002E4 808651E4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 002E8 808651E8 86030210 */ lh $v1, 0x0210($s0) ## 00000210
/* 002EC 808651EC 1060002E */ beq $v1, $zero, .L808652A8
/* 002F0 808651F0 00000000 */ nop
/* 002F4 808651F4 9218015C */ lbu $t8, 0x015C($s0) ## 0000015C
/* 002F8 808651F8 33190002 */ andi $t9, $t8, 0x0002 ## $t9 = 00000000
/* 002FC 808651FC 1320002A */ beq $t9, $zero, .L808652A8
/* 00300 80865200 00000000 */ nop
/* 00304 80865204 8E020184 */ lw $v0, 0x0184($s0) ## 00000184
/* 00308 80865208 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
/* 0030C 8086520C 90480014 */ lbu $t0, 0x0014($v0) ## 00000014
/* 00310 80865210 11010025 */ beq $t0, $at, .L808652A8
/* 00314 80865214 00000000 */ nop
/* 00318 80865218 8E050150 */ lw $a1, 0x0150($s0) ## 00000150
/* 0031C 8086521C 8CA90130 */ lw $t1, 0x0130($a1) ## 00000130
/* 00320 80865220 11200014 */ beq $t1, $zero, .L80865274
/* 00324 80865224 00000000 */ nop
/* 00328 80865228 8CAA0004 */ lw $t2, 0x0004($a1) ## 00000004
/* 0032C 8086522C 314B0600 */ andi $t3, $t2, 0x0600 ## $t3 = 00000000
/* 00330 80865230 11600010 */ beq $t3, $zero, .L80865274
/* 00334 80865234 00000000 */ nop
/* 00338 80865238 904C0016 */ lbu $t4, 0x0016($v0) ## 00000016
/* 0033C 8086523C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00340 80865240 318D0004 */ andi $t5, $t4, 0x0004 ## $t5 = 00000000
/* 00344 80865244 11A0000B */ beq $t5, $zero, .L80865274
/* 00348 80865248 00000000 */ nop
/* 0034C 8086524C 0C219452 */ jal func_80865148
/* 00350 80865250 AFA500C0 */ sw $a1, 0x00C0($sp)
/* 00354 80865254 8FA500C0 */ lw $a1, 0x00C0($sp)
/* 00358 80865258 24010400 */ addiu $at, $zero, 0x0400 ## $at = 00000400
/* 0035C 8086525C 8CAE0004 */ lw $t6, 0x0004($a1) ## 00000004
/* 00360 80865260 31CF0400 */ andi $t7, $t6, 0x0400 ## $t7 = 00000000
/* 00364 80865264 15E10003 */ bne $t7, $at, .L80865274
/* 00368 80865268 00000000 */ nop
/* 0036C 8086526C 0C219411 */ jal func_80865044
/* 00370 80865270 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80865274:
/* 00374 80865274 3C078013 */ lui $a3, %hi(D_801333E0)
/* 00378 80865278 3C188013 */ lui $t8, %hi(D_801333E8)
/* 0037C 8086527C 24E733E0 */ addiu $a3, %lo(D_801333E0)
/* 00380 80865280 A6000210 */ sh $zero, 0x0210($s0) ## 00000210
/* 00384 80865284 271833E8 */ addiu $t8, %lo(D_801333E8)
/* 00388 80865288 AFB80014 */ sw $t8, 0x0014($sp)
/* 0038C 8086528C AFA70010 */ sw $a3, 0x0010($sp)
/* 00390 80865290 24041814 */ addiu $a0, $zero, 0x1814 ## $a0 = 00001814
/* 00394 80865294 260500E4 */ addiu $a1, $s0, 0x00E4 ## $a1 = 000000E4
/* 00398 80865298 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* 0039C 8086529C 24060004 */ addiu $a2, $zero, 0x0004 ## $a2 = 00000004
/* 003A0 808652A0 1000014E */ beq $zero, $zero, .L808657DC
/* 003A4 808652A4 8FBF0034 */ lw $ra, 0x0034($sp)
.L808652A8:
/* 003A8 808652A8 14600003 */ bne $v1, $zero, .L808652B8
/* 003AC 808652AC 2479FFFF */ addiu $t9, $v1, 0xFFFF ## $t9 = FFFFFFFF
/* 003B0 808652B0 10000003 */ beq $zero, $zero, .L808652C0
/* 003B4 808652B4 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L808652B8:
/* 003B8 808652B8 A6190210 */ sh $t9, 0x0210($s0) ## 00000210
/* 003BC 808652BC 86020210 */ lh $v0, 0x0210($s0) ## 00000210
.L808652C0:
/* 003C0 808652C0 144000B8 */ bne $v0, $zero, .L808655A4
/* 003C4 808652C4 00000000 */ nop
/* 003C8 808652C8 8E070200 */ lw $a3, 0x0200($s0) ## 00000200
/* 003CC 808652CC 50E00031 */ beql $a3, $zero, .L80865394
/* 003D0 808652D0 8FA400C4 */ lw $a0, 0x00C4($sp)
/* 003D4 808652D4 8CE80130 */ lw $t0, 0x0130($a3) ## 00000130
/* 003D8 808652D8 51000007 */ beql $t0, $zero, .L808652F8
/* 003DC 808652DC 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 003E0 808652E0 8CE90004 */ lw $t1, 0x0004($a3) ## 00000004
/* 003E4 808652E4 24012000 */ addiu $at, $zero, 0x2000 ## $at = 00002000
/* 003E8 808652E8 312A2000 */ andi $t2, $t1, 0x2000 ## $t2 = 00000000
/* 003EC 808652EC 51410005 */ beql $t2, $at, .L80865304
/* 003F0 808652F0 8E0B011C */ lw $t3, 0x011C($s0) ## 0000011C
/* 003F4 808652F4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
.L808652F8:
/* 003F8 808652F8 10000025 */ beq $zero, $zero, .L80865390
/* 003FC 808652FC AE000200 */ sw $zero, 0x0200($s0) ## 00000200
/* 00400 80865300 8E0B011C */ lw $t3, 0x011C($s0) ## 0000011C
.L80865304:
/* 00404 80865304 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00408 80865308 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000
/* 0040C 8086530C 51600021 */ beql $t3, $zero, .L80865394
/* 00410 80865310 8FA400C4 */ lw $a0, 0x00C4($sp)
/* 00414 80865314 0C00B6D2 */ jal func_8002DB48
/* 00418 80865318 AFA700BC */ sw $a3, 0x00BC($sp)
/* 0041C 8086531C E7A00094 */ swc1 $f0, 0x0094($sp)
/* 00420 80865320 C6020204 */ lwc1 $f2, 0x0204($s0) ## 00000204
/* 00424 80865324 C60C0208 */ lwc1 $f12, 0x0208($s0) ## 00000208
/* 00428 80865328 C60E020C */ lwc1 $f14, 0x020C($s0) ## 0000020C
/* 0042C 8086532C 46021102 */ mul.s $f4, $f2, $f2
/* 00430 80865330 8FA700BC */ lw $a3, 0x00BC($sp)
/* 00434 80865334 26050204 */ addiu $a1, $s0, 0x0204 ## $a1 = 00000204
/* 00438 80865338 460C6182 */ mul.s $f6, $f12, $f12
/* 0043C 8086533C 26060024 */ addiu $a2, $s0, 0x0024 ## $a2 = 00000024
/* 00440 80865340 24E40024 */ addiu $a0, $a3, 0x0024 ## $a0 = 00000024
/* 00444 80865344 460E7282 */ mul.s $f10, $f14, $f14
/* 00448 80865348 46062200 */ add.s $f8, $f4, $f6
/* 0044C 8086534C 460A4000 */ add.s $f0, $f8, $f10
/* 00450 80865350 46000004 */ sqrt.s $f0, $f0
/* 00454 80865354 0C01DFB4 */ jal Math_Vec3f_Diff
## Vec3f_Sub
/* 00458 80865358 E7A00090 */ swc1 $f0, 0x0090($sp)
/* 0045C 8086535C C7A60094 */ lwc1 $f6, 0x0094($sp)
/* 00460 80865360 C7A80090 */ lwc1 $f8, 0x0090($sp)
/* 00464 80865364 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00468 80865368 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00
/* 0046C 8086536C 46083281 */ sub.s $f10, $f6, $f8
/* 00470 80865370 8FA700BC */ lw $a3, 0x00BC($sp)
/* 00474 80865374 460A203C */ c.lt.s $f4, $f10
/* 00478 80865378 00000000 */ nop
/* 0047C 8086537C 45020005 */ bc1fl .L80865394
/* 00480 80865380 8FA400C4 */ lw $a0, 0x00C4($sp)
/* 00484 80865384 0C219421 */ jal func_80865084
/* 00488 80865388 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0048C 8086538C 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
.L80865390:
/* 00490 80865390 8FA400C4 */ lw $a0, 0x00C4($sp)
.L80865394:
/* 00494 80865394 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024
/* 00498 80865398 AFA50044 */ sw $a1, 0x0044($sp)
/* 0049C 8086539C 248403C8 */ addiu $a0, $a0, 0x03C8 ## $a0 = 000003C8
/* 004A0 808653A0 AFA40040 */ sw $a0, 0x0040($sp)
/* 004A4 808653A4 27A600B0 */ addiu $a2, $sp, 0x00B0 ## $a2 = FFFFFFE8
/* 004A8 808653A8 0C01DFF4 */ jal Math_Vec3f_DistXYZAndStoreDiff
/* 004AC 808653AC AFA700BC */ sw $a3, 0x00BC($sp)
/* 004B0 808653B0 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000
/* 004B4 808653B4 44816000 */ mtc1 $at, $f12 ## $f12 = 30.00
/* 004B8 808653B8 8FA40040 */ lw $a0, 0x0040($sp)
/* 004BC 808653BC 8FA700BC */ lw $a3, 0x00BC($sp)
/* 004C0 808653C0 460C003C */ c.lt.s $f0, $f12
/* 004C4 808653C4 C7A600B0 */ lwc1 $f6, 0x00B0($sp)
/* 004C8 808653C8 27A500A4 */ addiu $a1, $sp, 0x00A4 ## $a1 = FFFFFFDC
/* 004CC 808653CC 45020006 */ bc1fl .L808653E8
/* 004D0 808653D0 8E0C011C */ lw $t4, 0x011C($s0) ## 0000011C
/* 004D4 808653D4 44801000 */ mtc1 $zero, $f2 ## $f2 = 0.00
/* 004D8 808653D8 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 004DC 808653DC 10000015 */ beq $zero, $zero, .L80865434
/* 004E0 808653E0 00000000 */ nop
/* 004E4 808653E4 8E0C011C */ lw $t4, 0x011C($s0) ## 0000011C
.L808653E8:
/* 004E8 808653E8 11800003 */ beq $t4, $zero, .L808653F8
/* 004EC 808653EC 00000000 */ nop
/* 004F0 808653F0 10000009 */ beq $zero, $zero, .L80865418
/* 004F4 808653F4 46006086 */ mov.s $f2, $f12
.L808653F8:
/* 004F8 808653F8 10E00005 */ beq $a3, $zero, .L80865410
/* 004FC 808653FC 3C014348 */ lui $at, 0x4348 ## $at = 43480000
/* 00500 80865400 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00504 80865404 44811000 */ mtc1 $at, $f2 ## $f2 = 50.00
/* 00508 80865408 10000004 */ beq $zero, $zero, .L8086541C
/* 0050C 8086540C 4602003E */ c.le.s $f0, $f2
.L80865410:
/* 00510 80865410 44811000 */ mtc1 $at, $f2 ## $f2 = 50.00
/* 00514 80865414 00000000 */ nop
.L80865418:
/* 00518 80865418 4602003E */ c.le.s $f0, $f2
.L8086541C:
/* 0051C 8086541C 46020401 */ sub.s $f16, $f0, $f2
/* 00520 80865420 45020004 */ bc1fl .L80865434
/* 00524 80865424 46008083 */ div.s $f2, $f16, $f0
/* 00528 80865428 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 0052C 8086542C 00000000 */ nop
/* 00530 80865430 46008083 */ div.s $f2, $f16, $f0
.L80865434:
/* 00534 80865434 46023202 */ mul.s $f8, $f6, $f2
/* 00538 80865438 C7A400B4 */ lwc1 $f4, 0x00B4($sp)
/* 0053C 8086543C C7A600B8 */ lwc1 $f6, 0x00B8($sp)
/* 00540 80865440 8FA600C4 */ lw $a2, 0x00C4($sp)
/* 00544 80865444 46022282 */ mul.s $f10, $f4, $f2
/* 00548 80865448 24C6005C */ addiu $a2, $a2, 0x005C ## $a2 = 0000005C
/* 0054C 8086544C E7A800A4 */ swc1 $f8, 0x00A4($sp)
/* 00550 80865450 46023202 */ mul.s $f8, $f6, $f2
/* 00554 80865454 E7AA00A8 */ swc1 $f10, 0x00A8($sp)
/* 00558 80865458 E7A800AC */ swc1 $f8, 0x00AC($sp)
/* 0055C 8086545C 8E0D011C */ lw $t5, 0x011C($s0) ## 0000011C
/* 00560 80865460 55A0001E */ bnel $t5, $zero, .L808654DC
/* 00564 80865464 27A400B0 */ addiu $a0, $sp, 0x00B0 ## $a0 = FFFFFFE8
/* 00568 80865468 10E0000D */ beq $a3, $zero, .L808654A0
/* 0056C 8086546C 27A500A4 */ addiu $a1, $sp, 0x00A4 ## $a1 = FFFFFFDC
/* 00570 80865470 84EE0000 */ lh $t6, 0x0000($a3) ## 00000000
/* 00574 80865474 240100D5 */ addiu $at, $zero, 0x00D5 ## $at = 000000D5
/* 00578 80865478 8FA60044 */ lw $a2, 0x0044($sp)
/* 0057C 8086547C 55C10009 */ bnel $t6, $at, .L808654A4
/* 00580 80865480 8FA60044 */ lw $a2, 0x0044($sp)
/* 00584 80865484 24E40024 */ addiu $a0, $a3, 0x0024 ## $a0 = 00000024
/* 00588 80865488 0C01DFB4 */ jal Math_Vec3f_Diff
## Vec3f_Sub
/* 0058C 8086548C 26050204 */ addiu $a1, $s0, 0x0204 ## $a1 = 00000204
/* 00590 80865490 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00594 80865494 44818000 */ mtc1 $at, $f16 ## $f16 = 1.00
/* 00598 80865498 1000001F */ beq $zero, $zero, .L80865518
/* 0059C 8086549C 3C014248 */ lui $at, 0x4248 ## $at = 42480000
.L808654A0:
/* 005A0 808654A0 8FA60044 */ lw $a2, 0x0044($sp)
.L808654A4:
/* 005A4 808654A4 AFA700BC */ sw $a3, 0x00BC($sp)
/* 005A8 808654A8 0C01DFA7 */ jal Math_Vec3f_Sum
## Vec3f_Add
/* 005AC 808654AC E7B0009C */ swc1 $f16, 0x009C($sp)
/* 005B0 808654B0 8FA700BC */ lw $a3, 0x00BC($sp)
/* 005B4 808654B4 C7B0009C */ lwc1 $f16, 0x009C($sp)
/* 005B8 808654B8 8FA40044 */ lw $a0, 0x0044($sp)
/* 005BC 808654BC 10E00015 */ beq $a3, $zero, .L80865514
/* 005C0 808654C0 26050204 */ addiu $a1, $s0, 0x0204 ## $a1 = 00000204
/* 005C4 808654C4 24E60024 */ addiu $a2, $a3, 0x0024 ## $a2 = 00000024
/* 005C8 808654C8 0C01DFA7 */ jal Math_Vec3f_Sum
## Vec3f_Add
/* 005CC 808654CC E7B0009C */ swc1 $f16, 0x009C($sp)
/* 005D0 808654D0 10000010 */ beq $zero, $zero, .L80865514
/* 005D4 808654D4 C7B0009C */ lwc1 $f16, 0x009C($sp)
/* 005D8 808654D8 27A400B0 */ addiu $a0, $sp, 0x00B0 ## $a0 = FFFFFFE8
.L808654DC:
/* 005DC 808654DC 0C01DFB4 */ jal Math_Vec3f_Diff
## Vec3f_Sub
/* 005E0 808654E0 E7B0009C */ swc1 $f16, 0x009C($sp)
/* 005E4 808654E4 C7A200B0 */ lwc1 $f2, 0x00B0($sp)
/* 005E8 808654E8 C7B200B8 */ lwc1 $f18, 0x00B8($sp)
/* 005EC 808654EC C7AE00B4 */ lwc1 $f14, 0x00B4($sp)
/* 005F0 808654F0 46021102 */ mul.s $f4, $f2, $f2
/* 005F4 808654F4 46007387 */ neg.s $f14, $f14
/* 005F8 808654F8 46129282 */ mul.s $f10, $f18, $f18
/* 005FC 808654FC 460A2000 */ add.s $f0, $f4, $f10
/* 00600 80865500 0C034199 */ jal atan2s
/* 00604 80865504 46000304 */ sqrt.s $f12, $f0
/* 00608 80865508 8FAF00C4 */ lw $t7, 0x00C4($sp)
/* 0060C 8086550C C7B0009C */ lwc1 $f16, 0x009C($sp)
/* 00610 80865510 A5E20030 */ sh $v0, 0x0030($t7) ## 00000030
.L80865514:
/* 00614 80865514 3C014248 */ lui $at, 0x4248 ## $at = 42480000
.L80865518:
/* 00618 80865518 44813000 */ mtc1 $at, $f6 ## $f6 = 50.00
/* 0061C 8086551C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00620 80865520 4606803C */ c.lt.s $f16, $f6
/* 00624 80865524 00000000 */ nop
/* 00628 80865528 450200AC */ bc1fl .L808657DC
/* 0062C 8086552C 8FBF0034 */ lw $ra, 0x0034($sp)
/* 00630 80865530 0C219421 */ jal func_80865084
/* 00634 80865534 E7B0009C */ swc1 $f16, 0x009C($sp)
/* 00638 80865538 C7B0009C */ lwc1 $f16, 0x009C($sp)
/* 0063C 8086553C 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 00640 80865540 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00644 80865544 3C058086 */ lui $a1, %hi(func_80864FC4) ## $a1 = 80860000
/* 00648 80865548 46088032 */ c.eq.s $f16, $f8
/* 0064C 8086554C 00000000 */ nop
/* 00650 80865550 450200A2 */ bc1fl .L808657DC
/* 00654 80865554 8FBF0034 */ lw $ra, 0x0034($sp)
/* 00658 80865558 0C2193C0 */ jal ArmsHook_SetupAction
/* 0065C 8086555C 24A54FC4 */ addiu $a1, $a1, %lo(func_80864FC4) ## $a1 = 80864FC4
/* 00660 80865560 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00664 80865564 0C219415 */ jal func_80865054
/* 00668 80865568 8FA500C4 */ lw $a1, 0x00C4($sp)
/* 0066C 8086556C 5040009B */ beql $v0, $zero, .L808657DC
/* 00670 80865570 8FBF0034 */ lw $ra, 0x0034($sp)
/* 00674 80865574 8FA200C4 */ lw $v0, 0x00C4($sp)
/* 00678 80865578 8FA40044 */ lw $a0, 0x0044($sp)
/* 0067C 8086557C 24450024 */ addiu $a1, $v0, 0x0024 ## $a1 = 00000024
/* 00680 80865580 0C01DFB4 */ jal Math_Vec3f_Diff
## Vec3f_Sub
/* 00684 80865584 2446005C */ addiu $a2, $v0, 0x005C ## $a2 = 0000005C
/* 00688 80865588 8FB800C4 */ lw $t8, 0x00C4($sp)
/* 0068C 8086558C 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000
/* 00690 80865590 44815000 */ mtc1 $at, $f10 ## $f10 = 20.00
/* 00694 80865594 C7040060 */ lwc1 $f4, 0x0060($t8) ## 00000060
/* 00698 80865598 460A2181 */ sub.s $f6, $f4, $f10
/* 0069C 8086559C 1000008E */ beq $zero, $zero, .L808657D8
/* 006A0 808655A0 E7060060 */ swc1 $f6, 0x0060($t8) ## 00000060
.L808655A4:
/* 006A4 808655A4 0C00B638 */ jal Actor_MoveForward
/* 006A8 808655A8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 006AC 808655AC 26040024 */ addiu $a0, $s0, 0x0024 ## $a0 = 00000024
/* 006B0 808655B0 AFA40044 */ sw $a0, 0x0044($sp)
/* 006B4 808655B4 26050100 */ addiu $a1, $s0, 0x0100 ## $a1 = 00000100
/* 006B8 808655B8 0C01DFB4 */ jal Math_Vec3f_Diff
## Vec3f_Sub
/* 006BC 808655BC 27A6006C */ addiu $a2, $sp, 0x006C ## $a2 = FFFFFFA4
/* 006C0 808655C0 260401E8 */ addiu $a0, $s0, 0x01E8 ## $a0 = 000001E8
/* 006C4 808655C4 00803025 */ or $a2, $a0, $zero ## $a2 = 000001E8
/* 006C8 808655C8 AFA40040 */ sw $a0, 0x0040($sp)
/* 006CC 808655CC 0C01DFA7 */ jal Math_Vec3f_Sum
## Vec3f_Add
/* 006D0 808655D0 27A5006C */ addiu $a1, $sp, 0x006C ## $a1 = FFFFFFA4
/* 006D4 808655D4 C60E0060 */ lwc1 $f14, 0x0060($s0) ## 00000060
/* 006D8 808655D8 C60C0068 */ lwc1 $f12, 0x0068($s0) ## 00000068
/* 006DC 808655DC 0C034199 */ jal atan2s
/* 006E0 808655E0 46007387 */ neg.s $f14, $f14
/* 006E4 808655E4 C60001F4 */ lwc1 $f0, 0x01F4($s0) ## 000001F4
/* 006E8 808655E8 C60801E8 */ lwc1 $f8, 0x01E8($s0) ## 000001E8
/* 006EC 808655EC A60200B4 */ sh $v0, 0x00B4($s0) ## 000000B4
/* 006F0 808655F0 8FA400CC */ lw $a0, 0x00CC($sp)
/* 006F4 808655F4 46004101 */ sub.s $f4, $f8, $f0
/* 006F8 808655F8 27B90088 */ addiu $t9, $sp, 0x0088 ## $t9 = FFFFFFC0
/* 006FC 808655FC 24080001 */ addiu $t0, $zero, 0x0001 ## $t0 = 00000001
/* 00700 80865600 24090001 */ addiu $t1, $zero, 0x0001 ## $t1 = 00000001
/* 00704 80865604 46040281 */ sub.s $f10, $f0, $f4
/* 00708 80865608 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001
/* 0070C 8086560C 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001
/* 00710 80865610 27AC0084 */ addiu $t4, $sp, 0x0084 ## $t4 = FFFFFFBC
/* 00714 80865614 E7AA0060 */ swc1 $f10, 0x0060($sp)
/* 00718 80865618 C60601EC */ lwc1 $f6, 0x01EC($s0) ## 000001EC
/* 0071C 8086561C C60201F8 */ lwc1 $f2, 0x01F8($s0) ## 000001F8
/* 00720 80865620 248407C0 */ addiu $a0, $a0, 0x07C0 ## $a0 = 000007C0
/* 00724 80865624 8FA60040 */ lw $a2, 0x0040($sp)
/* 00728 80865628 46023201 */ sub.s $f8, $f6, $f2
/* 0072C 8086562C 27A50060 */ addiu $a1, $sp, 0x0060 ## $a1 = FFFFFF98
/* 00730 80865630 27A70078 */ addiu $a3, $sp, 0x0078 ## $a3 = FFFFFFB0
/* 00734 80865634 46081101 */ sub.s $f4, $f2, $f8
/* 00738 80865638 E7A40064 */ swc1 $f4, 0x0064($sp)
/* 0073C 8086563C C60A01F0 */ lwc1 $f10, 0x01F0($s0) ## 000001F0
/* 00740 80865640 C60C01FC */ lwc1 $f12, 0x01FC($s0) ## 000001FC
/* 00744 80865644 AFA4003C */ sw $a0, 0x003C($sp)
/* 00748 80865648 AFAC0024 */ sw $t4, 0x0024($sp)
/* 0074C 8086564C 460C5181 */ sub.s $f6, $f10, $f12
/* 00750 80865650 AFAB0020 */ sw $t3, 0x0020($sp)
/* 00754 80865654 AFAA001C */ sw $t2, 0x001C($sp)
/* 00758 80865658 AFA90018 */ sw $t1, 0x0018($sp)
/* 0075C 8086565C 46066201 */ sub.s $f8, $f12, $f6
/* 00760 80865660 AFA80014 */ sw $t0, 0x0014($sp)
/* 00764 80865664 AFB90010 */ sw $t9, 0x0010($sp)
/* 00768 80865668 0C00F7A1 */ jal func_8003DE84
/* 0076C 8086566C E7A80068 */ swc1 $f8, 0x0068($sp)
/* 00770 80865670 10400053 */ beq $v0, $zero, .L808657C0
/* 00774 80865674 8FA70084 */ lw $a3, 0x0084($sp)
/* 00778 80865678 27AD0078 */ addiu $t5, $sp, 0x0078 ## $t5 = FFFFFFB0
/* 0077C 8086567C AFAD0010 */ sw $t5, 0x0010($sp)
/* 00780 80865680 8FA400CC */ lw $a0, 0x00CC($sp)
/* 00784 80865684 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00788 80865688 0C00BE7B */ jal func_8002F9EC
/* 0078C 8086568C 8FA60088 */ lw $a2, 0x0088($sp)
/* 00790 80865690 1440004B */ bne $v0, $zero, .L808657C0
/* 00794 80865694 8FAE0088 */ lw $t6, 0x0088($sp)
/* 00798 80865698 85CF0008 */ lh $t7, 0x0008($t6) ## 00000008
/* 0079C 8086569C 3C018086 */ lui $at, %hi(D_80865C10) ## $at = 80860000
/* 007A0 808656A0 C4205C10 */ lwc1 $f0, %lo(D_80865C10)($at)
/* 007A4 808656A4 448F2000 */ mtc1 $t7, $f4 ## $f4 = 0.00
/* 007A8 808656A8 8FA40044 */ lw $a0, 0x0044($sp)
/* 007AC 808656AC 27A50078 */ addiu $a1, $sp, 0x0078 ## $a1 = FFFFFFB0
/* 007B0 808656B0 468022A0 */ cvt.s.w $f10, $f4
/* 007B4 808656B4 46005182 */ mul.s $f6, $f10, $f0
/* 007B8 808656B8 E7A6005C */ swc1 $f6, 0x005C($sp)
/* 007BC 808656BC 85D8000C */ lh $t8, 0x000C($t6) ## 0000000C
/* 007C0 808656C0 44984000 */ mtc1 $t8, $f8 ## $f8 = 0.00
/* 007C4 808656C4 00000000 */ nop
/* 007C8 808656C8 46804120 */ cvt.s.w $f4, $f8
/* 007CC 808656CC 46002282 */ mul.s $f10, $f4, $f0
/* 007D0 808656D0 0C01DF90 */ jal Math_Vec3f_Copy
## Vec3f_Copy
/* 007D4 808656D4 E7AA0058 */ swc1 $f10, 0x0058($sp)
/* 007D8 808656D8 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 007DC 808656DC 44810000 */ mtc1 $at, $f0 ## $f0 = 10.00
/* 007E0 808656E0 C7A8005C */ lwc1 $f8, 0x005C($sp)
/* 007E4 808656E4 C6060024 */ lwc1 $f6, 0x0024($s0) ## 00000024
/* 007E8 808656E8 46080102 */ mul.s $f4, $f0, $f8
/* 007EC 808656EC C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C
/* 007F0 808656F0 46043280 */ add.s $f10, $f6, $f4
/* 007F4 808656F4 E60A0024 */ swc1 $f10, 0x0024($s0) ## 00000024
/* 007F8 808656F8 C7A60058 */ lwc1 $f6, 0x0058($sp)
/* 007FC 808656FC A6000210 */ sh $zero, 0x0210($s0) ## 00000210
/* 00800 80865700 46060102 */ mul.s $f4, $f0, $f6
/* 00804 80865704 46044280 */ add.s $f10, $f8, $f4
/* 00808 80865708 E60A002C */ swc1 $f10, 0x002C($s0) ## 0000002C
/* 0080C 8086570C 8FA60084 */ lw $a2, 0x0084($sp)
/* 00810 80865710 8FA50088 */ lw $a1, 0x0088($sp)
/* 00814 80865714 0C0107FA */ jal func_80041FE8
/* 00818 80865718 8FA4003C */ lw $a0, 0x003C($sp)
/* 0081C 8086571C 1040001A */ beq $v0, $zero, .L80865788
/* 00820 80865720 8FA400CC */ lw $a0, 0x00CC($sp)
/* 00824 80865724 8FA70084 */ lw $a3, 0x0084($sp)
/* 00828 80865728 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032
/* 0082C 8086572C 8FA4003C */ lw $a0, 0x003C($sp)
/* 00830 80865730 10E10007 */ beq $a3, $at, .L80865750
/* 00834 80865734 00000000 */ nop
/* 00838 80865738 0C00FAE1 */ jal DynaPolyInfo_GetActor
## DynaPolyInfo_getActor
/* 0083C 8086573C 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000
/* 00840 80865740 10400003 */ beq $v0, $zero, .L80865750
/* 00844 80865744 00402825 */ or $a1, $v0, $zero ## $a1 = 00000000
/* 00848 80865748 0C219452 */ jal func_80865148
/* 0084C 8086574C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
.L80865750:
/* 00850 80865750 0C219411 */ jal func_80865044
/* 00854 80865754 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00858 80865758 3C078013 */ lui $a3, %hi(D_801333E0)
/* 0085C 8086575C 3C198013 */ lui $t9, %hi(D_801333E8)
/* 00860 80865760 24E733E0 */ addiu $a3, %lo(D_801333E0)
/* 00864 80865764 273933E8 */ addiu $t9, %lo(D_801333E8)
/* 00868 80865768 AFB90014 */ sw $t9, 0x0014($sp)
/* 0086C 8086576C AFA70010 */ sw $a3, 0x0010($sp)
/* 00870 80865770 24041829 */ addiu $a0, $zero, 0x1829 ## $a0 = 00001829
/* 00874 80865774 260500E4 */ addiu $a1, $s0, 0x00E4 ## $a1 = 000000E4
/* 00878 80865778 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* 0087C 8086577C 24060004 */ addiu $a2, $zero, 0x0004 ## $a2 = 00000004
/* 00880 80865780 10000016 */ beq $zero, $zero, .L808657DC
/* 00884 80865784 8FBF0034 */ lw $ra, 0x0034($sp)
.L80865788:
/* 00888 80865788 0C018B58 */ jal func_80062D60
/* 0088C 8086578C 8FA50044 */ lw $a1, 0x0044($sp)
/* 00890 80865790 3C078013 */ lui $a3, %hi(D_801333E0)
/* 00894 80865794 3C088013 */ lui $t0, %hi(D_801333E8)
/* 00898 80865798 24E733E0 */ addiu $a3, %lo(D_801333E0)
/* 0089C 8086579C 250833E8 */ addiu $t0, %lo(D_801333E8)
/* 008A0 808657A0 AFA80014 */ sw $t0, 0x0014($sp)
/* 008A4 808657A4 AFA70010 */ sw $a3, 0x0010($sp)
/* 008A8 808657A8 24041813 */ addiu $a0, $zero, 0x1813 ## $a0 = 00001813
/* 008AC 808657AC 260500E4 */ addiu $a1, $s0, 0x00E4 ## $a1 = 000000E4
/* 008B0 808657B0 0C03DCE3 */ jal Audio_PlaySoundGeneral
/* 008B4 808657B4 24060004 */ addiu $a2, $zero, 0x0004 ## $a2 = 00000004
/* 008B8 808657B8 10000008 */ beq $zero, $zero, .L808657DC
/* 008BC 808657BC 8FBF0034 */ lw $ra, 0x0034($sp)
.L808657C0:
/* 008C0 808657C0 8FA900CC */ lw $t1, 0x00CC($sp)
/* 008C4 808657C4 952A0020 */ lhu $t2, 0x0020($t1) ## 00000020
/* 008C8 808657C8 314BC01F */ andi $t3, $t2, 0xC01F ## $t3 = 00000000
/* 008CC 808657CC 51600003 */ beql $t3, $zero, .L808657DC
/* 008D0 808657D0 8FBF0034 */ lw $ra, 0x0034($sp)
/* 008D4 808657D4 A6000210 */ sh $zero, 0x0210($s0) ## 00000210
.L808657D8:
/* 008D8 808657D8 8FBF0034 */ lw $ra, 0x0034($sp)
.L808657DC:
/* 008DC 808657DC 8FB00030 */ lw $s0, 0x0030($sp)
/* 008E0 808657E0 27BD00C8 */ addiu $sp, $sp, 0x00C8 ## $sp = 00000000
/* 008E4 808657E4 03E00008 */ jr $ra
/* 008E8 808657E8 00000000 */ nop

View file

@ -1,11 +1,8 @@
#ifndef _COLOR_H_
#define _COLOR_H_
typedef union {
struct {
typedef struct {
u8 r, g, b;
};
u32 rgb;
} Color_RGB8;
typedef union {

View file

@ -241,7 +241,9 @@ typedef struct Player {
/* 0x01B4 */ SkelAnime skelAnime;
/* 0x01F8 */ char unk_1F8[0x1B4];
/* 0x03AC */ Actor* heldActor;
/* 0x03B0 */ char unk_3B0[0x084];
/* 0x03B0 */ char unk_3B0[0x018];
/* 0x03C8 */ Vec3f unk_3C8;
/* 0x03D4 */ char unk_3D4[0x060];
/* 0x0434 */ u8 getItemId;
/* 0x0435 */ char unk_435[0x001];
/* 0x0436 */ u16 getItemDirection;

3
spec
View file

@ -622,8 +622,7 @@ endseg
beginseg
name "ovl_Arms_Hook"
include "build/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.o"
include "build/data/overlays/actors/z_arms_hook.data.o"
include "build/data/overlays/actors/z_arms_hook.reloc.o"
include "build/src/overlays/actors/ovl_Arms_Hook/ovl_Arms_Hook_reloc.o"
endseg
beginseg

View file

@ -1,6 +1,7 @@
#include <ultra64.h>
#include <global.h>
#include <vt.h>
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
#include "overlays/actors/ovl_En_Part/z_en_part.h"
@ -1020,24 +1021,14 @@ s32 func_8002DDF4(GlobalContext* globalCtx) {
return player->stateFlags2 & 0x1000;
}
typedef struct {
/* 0x000 */ Actor actor;
/* 0x14C */ char unk_14C[0xB4];
/* 0x200 */ Actor* unk_200;
/* 0x204 */ f32 unk_204;
/* 0x208 */ f32 unk_208;
/* 0x20C */ f32 unk_20C;
/* 0x210 */ s16 unk_210;
} ActorArmsHook;
void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) {
ActorArmsHook* hookActor;
ArmsHook* hookshot;
hookActor = (ActorArmsHook*)Actor_Find(&globalCtx->actorCtx, 0x0066, ACTORTYPE_ITEMACTION);
hookActor->unk_200 = actorB;
hookActor->unk_204 = 0.0f;
hookActor->unk_208 = 0.0f;
hookActor->unk_20C = 0.0f;
hookshot = (ArmsHook*)Actor_Find(&globalCtx->actorCtx, ACTOR_ARMS_HOOK, ACTORTYPE_ITEMACTION);
hookshot->grabbed = actorB;
hookshot->grabbedDistDiff.x = 0.0f;
hookshot->grabbedDistDiff.y = 0.0f;
hookshot->grabbedDistDiff.z = 0.0f;
actorB->flags |= 0x2000;
actorA->flags &= ~0x2000;
}

View file

@ -9,9 +9,9 @@ void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx);
void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx);
void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_80864FC4(ArmsHook* this, GlobalContext* globalCtx);
void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx);
void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx);
/*
const ActorInit Arms_Hook_InitVars = {
ACTOR_ARMS_HOOK,
ACTORTYPE_ITEMACTION,
@ -23,27 +23,327 @@ const ActorInit Arms_Hook_InitVars = {
(ActorFunc)ArmsHook_Update,
(ActorFunc)ArmsHook_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_SetupAction.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Init.s")
ColliderQuadInit sQuadInit = {
{ COLTYPE_UNK10, 0x09, 0x00, 0x00, 0x08, COLSHAPE_QUAD },
{ 0x02, { 0x00000080, 0x00, 0x01 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x05, 0x00, 0x00 },
{ 0 },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Destroy.s")
Vec3f sUnusedVec1 = { 0.0f, 0.5f, 0.0f };
Vec3f sUnusedVec2 = { 0.0f, 0.5f, 0.0f };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/func_80864FC4.s")
Color_RGB8 sUnusedColors[] = {
{ 0xFF, 0xFF, 0x64 },
{ 0xFF, 0xFF, 0x32 },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/func_80865044.s")
Vec3f D_80865B70 = { 0.0f, 0.0f, 0.0f };
Vec3f D_80865B7C = { 0.0f, 0.0f, 900.0f };
Vec3f D_80865B88 = { 0.0f, 500.0f, -3000.0f };
Vec3f D_80865B94 = { 0.0f, -500.0f, -3000.0f };
Vec3f D_80865BA0 = { 0.0f, 500.0f, 1200.0f };
Vec3f D_80865BAC = { 0.0f, -500.0f, 1200.0f };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/func_80865054.s")
extern Gfx D_0602B288[];
extern Gfx D_0602AFF0[];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/func_80865084.s")
void ArmsHook_SetupAction(ArmsHook* this, ArmsHookActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/func_808650AC.s")
void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx) {
ArmsHook* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/func_80865148.s")
Collider_InitQuad(globalCtx, &this->collider);
Collider_SetQuad(globalCtx, &this->collider, &this->actor, &sQuadInit);
ArmsHook_SetupAction(this, ArmsHook_Wait);
this->unk_1E8 = this->actor.posRot.pos;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/func_8086518C.s")
void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) {
ArmsHook* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Update.s")
if (this->grabbed != NULL) {
this->grabbed->flags &= ~0x2000;
}
Collider_DestroyQuad(globalCtx, &this->collider);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arms_Hook/ArmsHook_Draw.s")
void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) {
Player* player;
s32 length;
if (this->actor.attachedA == NULL) {
player = PLAYER;
// get correct timer length for hookshot or longshot
length = (player->heldItemActionParam == 0x10) ? 13 : 26;
ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f);
this->actor.attachedA = &PLAYER->actor;
this->timer = length;
}
}
void func_80865044(ArmsHook* this) {
this->actor.attachedB = this->actor.attachedA;
this->actor.attachedA->attachedA = &this->actor;
}
s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) {
player->actor.attachedB = &this->actor;
player->heldActor = &this->actor;
if (this->actor.attachedB != NULL) {
player->actor.attachedA = NULL;
this->actor.attachedB = NULL;
return 1;
}
return 0;
}
void ArmsHook_DetachHookFromActor(ArmsHook* this) {
if (this->grabbed != NULL) {
this->grabbed->flags &= ~0x2000;
this->grabbed = NULL;
}
}
s32 ArmsHook_CheckForCancel(ArmsHook* this) {
Player* player = (Player*)this->actor.attachedA;
if (func_8008F104(player)) {
if ((player->unk_154 != player->heldItemActionParam) || ((player->actor.flags & 0x100)) ||
((player->stateFlags1 & 0x4000080))) {
this->timer = 0;
ArmsHook_DetachHookFromActor(this);
Math_Vec3f_Copy(&this->actor.posRot.pos, &player->unk_3C8);
return 1;
}
}
return 0;
}
void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) {
actor->flags |= 0x2000;
this->grabbed = actor;
Math_Vec3f_Diff(&actor->posRot.pos, &this->actor.posRot.pos, &this->grabbedDistDiff);
}
void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
Actor* touchedActor;
Actor* grabbed;
Vec3f bodyDistDiffVec;
Vec3f newPos;
f32 bodyDistDiff;
f32 phi_f16;
DynaPolyActor* dynaPolyActor;
f32 sp94;
f32 sp90;
s32 pad;
CollisionPoly* poly;
u32 dynaPolyID;
Vec3f sp78;
Vec3f prevFrameDiff;
Vec3f sp60;
f32 sp5C;
f32 sp58;
f32 velocity;
s32 pad1;
if ((this->actor.attachedA == NULL) || (!func_8008F104(player))) {
ArmsHook_DetachHookFromActor(this);
Actor_Kill(&this->actor);
return;
}
func_8002F8F0(&player->actor, 0x100B);
ArmsHook_CheckForCancel(this);
if (this->timer != 0) {
if ((this->collider.base.atFlags & 2) && (this->collider.body.atHitItem->flags != 4)) {
touchedActor = this->collider.base.at;
if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) {
if (this->collider.body.atHitItem->bumperFlags & 4) {
ArmsHook_AttachHookToActor(this, touchedActor);
if ((touchedActor->flags & 0x400) == 0x400) {
func_80865044(this);
}
}
}
this->timer = 0;
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.unk_E4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
return;
}
}
if (DECR(this->timer) == 0) {
grabbed = this->grabbed;
if (grabbed != NULL) {
if ((grabbed->update == NULL) || (grabbed->flags & 0x2000) != 0x2000) {
grabbed = NULL;
this->grabbed = NULL;
} else {
if (this->actor.attachedB != NULL) {
sp94 = func_8002DB48(this, grabbed);
sp90 =
sqrtf(SQ(this->grabbedDistDiff.x) + SQ(this->grabbedDistDiff.y) + SQ(this->grabbedDistDiff.z));
Math_Vec3f_Diff(&grabbed->posRot.pos, &this->grabbedDistDiff, &this->actor.posRot.pos);
if (50.0f < (sp94 - sp90)) {
ArmsHook_DetachHookFromActor(this);
grabbed = NULL;
}
}
}
}
bodyDistDiff = Math_Vec3f_DistXYZAndStoreDiff(&player->unk_3C8, &this->actor.posRot.pos, &bodyDistDiffVec);
if (bodyDistDiff < 30.0f) {
velocity = 0.0f;
phi_f16 = 0.0f;
} else {
if (this->actor.attachedB != NULL) {
velocity = 30.0f;
} else {
if (grabbed != NULL) {
velocity = 50.0f;
} else {
velocity = 200.0f;
}
}
phi_f16 = bodyDistDiff - velocity;
if (bodyDistDiff <= velocity) {
phi_f16 = 0.0f;
}
velocity = phi_f16 / bodyDistDiff;
}
newPos.x = bodyDistDiffVec.x * velocity;
newPos.y = bodyDistDiffVec.y * velocity;
newPos.z = bodyDistDiffVec.z * velocity;
if (this->actor.attachedB == NULL) {
if ((grabbed != NULL) && (grabbed->id == ACTOR_BG_SPOT06_OBJECTS)) {
Math_Vec3f_Diff(&grabbed->posRot.pos, &this->grabbedDistDiff, &this->actor.posRot.pos);
phi_f16 = 1.0f;
} else {
Math_Vec3f_Sum(&player->unk_3C8, &newPos, &this->actor.posRot.pos);
if (grabbed != NULL) {
Math_Vec3f_Sum(&this->actor.posRot.pos, &this->grabbedDistDiff, &grabbed->posRot.pos);
}
}
} else {
Math_Vec3f_Diff(&bodyDistDiffVec, &newPos, &player->actor.velocity);
player->actor.posRot.rot.x =
atan2s(sqrtf(SQ(bodyDistDiffVec.x) + SQ(bodyDistDiffVec.z)), -bodyDistDiffVec.y);
}
if (phi_f16 < 50.0f) {
ArmsHook_DetachHookFromActor(this);
if (phi_f16 == 0.0f) {
ArmsHook_SetupAction(this, ArmsHook_Wait);
if (ArmsHook_AttachToPlayer(this, player)) {
Math_Vec3f_Diff(&this->actor.posRot.pos, &player->actor.posRot.pos, &player->actor.velocity);
player->actor.velocity.y -= 20.0f;
return;
}
}
}
} else {
Actor_MoveForward(&this->actor);
Math_Vec3f_Diff(&this->actor.posRot.pos, &this->actor.pos4, &prevFrameDiff);
Math_Vec3f_Sum(&this->unk_1E8, &prevFrameDiff, &this->unk_1E8);
this->actor.shape.rot.x = atan2s(this->actor.speedXZ, -this->actor.velocity.y);
sp60.x = this->unk_1F4.x - (this->unk_1E8.x - this->unk_1F4.x);
sp60.y = this->unk_1F4.y - (this->unk_1E8.y - this->unk_1F4.y);
sp60.z = this->unk_1F4.z - (this->unk_1E8.z - this->unk_1F4.z);
if (func_8003DE84(&globalCtx->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, 1, 1, 1, 1, &dynaPolyID) != 0) {
if (func_8002F9EC(globalCtx, &this->actor, poly, dynaPolyID, &sp78) == 0) {
sp5C = poly->norm.x * (1 / SHT_MAX);
sp58 = poly->norm.z * (1 / SHT_MAX);
Math_Vec3f_Copy(&this->actor.posRot.pos, &sp78);
this->actor.posRot.pos.x += 10.0f * sp5C;
this->actor.posRot.pos.z += 10.0f * sp58;
this->timer = 0;
if (func_80041FE8(&globalCtx->colCtx, poly, dynaPolyID) != 0) {
if (dynaPolyID != 0x32) {
dynaPolyActor = DynaPolyInfo_GetActor(&globalCtx->colCtx, dynaPolyID);
if (dynaPolyActor != NULL) {
ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
}
}
func_80865044(this);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.unk_E4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
return;
}
func_80062D60(globalCtx, &this->actor.posRot.pos);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.unk_E4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
return;
}
}
if ((globalCtx->state.input[0].press.in.button &
(A_BUTTON | B_BUTTON | R_TRIG | U_CBUTTONS | L_CBUTTONS | R_CBUTTONS | D_CBUTTONS))) {
this->timer = 0;
}
}
}
void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx) {
ArmsHook* this = THIS;
this->actionFunc(this, globalCtx);
this->unk_1F4 = this->unk_1E8;
}
void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
ArmsHook* this = THIS;
u32 pad3;
Player* player = PLAYER;
Vec3f sp78;
Vec3f sp6C;
Vec3f sp60;
f32 sp5C;
f32 sp58;
GraphicsContext* gfxCtx;
Gfx* dispRefs[4];
if (player->actor.draw != NULL) {
if (player->unk_15D == 0xF) {
gfxCtx = globalCtx->state.gfxCtx;
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arms_hook.c", 850);
if ((ArmsHook_Shoot != this->actionFunc) || (this->timer <= 0)) {
Matrix_MultVec3f(&D_80865B70, &this->unk_1E8);
Matrix_MultVec3f(&D_80865B88, &sp6C);
Matrix_MultVec3f(&D_80865B94, &sp60);
this->unk_1CC = 0;
} else {
Matrix_MultVec3f(&D_80865B7C, &this->unk_1E8);
Matrix_MultVec3f(&D_80865BA0, &sp6C);
Matrix_MultVec3f(&D_80865BAC, &sp60);
}
func_80090480(globalCtx, &this->collider.base, &this->unk_1CC, &sp6C, &sp60);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, D_0602B288);
Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, MTXMODE_NEW);
Math_Vec3f_Diff(&player->unk_3C8, &this->actor.posRot.pos, &sp78);
sp58 = SQ(sp78.x) + SQ(sp78.z);
sp5C = sqrtf(sp58);
Matrix_RotateY(Math_atan2f(sp78.x, sp78.z), MTXMODE_APPLY);
Matrix_RotateX(Math_atan2f(-sp78.y, sp5C), MTXMODE_APPLY);
Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, D_0602AFF0);
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_arms_hook.c", 913);
}
}
}

View file

@ -10,7 +10,14 @@ typedef void (*ArmsHookActionFunc)(struct ArmsHook*, GlobalContext*);
typedef struct ArmsHook {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0xC8];
/* 0x014C */ ColliderQuad collider;
/* 0x01CC */ s32 unk_1CC;
/* 0x01D0 */ char unk_1D0[0x18];
/* 0x01E8 */ Vec3f unk_1E8;
/* 0x01F4 */ Vec3f unk_1F4;
/* 0x0200 */ Actor* grabbed;
/* 0x0204 */ Vec3f grabbedDistDiff;
/* 0x0210 */ s16 timer;
/* 0x0214 */ ArmsHookActionFunc actionFunc;
} ArmsHook; // size = 0x0218

View file

@ -132,6 +132,8 @@ D_06025658 = 0x06025658;
D_060257B8 = 0x060257B8;
D_0602A738 = 0x0602A738;
D_0602CB48 = 0x0602CB48;
D_0602B288 = 0x0602B288;
D_0602AFF0 = 0x0602AFF0;
D_070380D4 = 0x070380D4;
D_0703811C = 0x0703811C;
D_080895C0 = 0x080895C0;