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

Match 5 more functions in z_player.c and improve the others (#559)

This commit is contained in:
Roman971 2020-12-23 05:37:42 +01:00 committed by GitHub
parent e4b84365ff
commit 09ddf4f71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 90 additions and 948 deletions

View file

@ -1,129 +0,0 @@
.late_rodata
glabel D_8085535C
.float 1.2
glabel D_80855360
.float -1.2
.text
glabel func_808340DC
/* 01ECC 808340DC 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0
/* 01ED0 808340E0 AFB00028 */ sw $s0, 0x0028($sp)
/* 01ED4 808340E4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 01ED8 808340E8 AFBF002C */ sw $ra, 0x002C($sp)
/* 01EDC 808340EC AFA50054 */ sw $a1, 0x0054($sp)
/* 01EE0 808340F0 0C20CDC9 */ jal Player_ItemToActionParam
/* 01EE4 808340F4 90840152 */ lbu $a0, 0x0152($a0) ## 00000152
/* 01EE8 808340F8 3C058083 */ lui $a1, %hi(func_80834A2C) ## $a1 = 80830000
/* 01EEC 808340FC 24A54A2C */ addiu $a1, $a1, %lo(func_80834A2C) ## $a1 = 80834A2C
/* 01EF0 80834100 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 01EF4 80834104 0C20CD8E */ jal func_80833638
/* 01EF8 80834108 A3A20037 */ sb $v0, 0x0037($sp)
/* 01EFC 8083410C 920E0159 */ lbu $t6, 0x0159($s0) ## 00000159
/* 01F00 80834110 24050005 */ addiu $a1, $zero, 0x0005 ## $a1 = 00000005
/* 01F04 80834114 92190158 */ lbu $t9, 0x0158($s0) ## 00000158
/* 01F08 80834118 01C50019 */ multu $t6, $a1
/* 01F0C 8083411C 3C048012 */ lui $a0, %hi(gPlayerModelTypes)
/* 01F10 80834120 24845C98 */ addiu $a0, %lo(gPlayerModelTypes)
/* 01F14 80834124 83A70037 */ lb $a3, 0x0037($sp)
/* 01F18 80834128 3C038085 */ lui $v1, %hi(D_80854164) ## $v1 = 80850000
/* 01F1C 8083412C 2406001E */ addiu $a2, $zero, 0x001E ## $a2 = 0000001E
/* 01F20 80834130 00007812 */ mflo $t7
/* 01F24 80834134 008FC021 */ addu $t8, $a0, $t7
/* 01F28 80834138 93020000 */ lbu $v0, 0x0000($t8) ## 00000000
/* 01F2C 8083413C 03250019 */ multu $t9, $a1
/* 01F30 80834140 00004012 */ mflo $t0
/* 01F34 80834144 00884821 */ addu $t1, $a0, $t0
/* 01F38 80834148 912A0000 */ lbu $t2, 0x0000($t1) ## 00000000
/* 01F3C 8083414C 24040014 */ addiu $a0, $zero, 0x0014 ## $a0 = 00000014
/* 01F40 80834150 000A5880 */ sll $t3, $t2, 2
/* 01F44 80834154 016A5823 */ subu $t3, $t3, $t2
/* 01F48 80834158 000B5840 */ sll $t3, $t3, 1
/* 01F4C 8083415C 01626021 */ addu $t4, $t3, $v0
/* 01F50 80834160 006C1821 */ addu $v1, $v1, $t4
/* 01F54 80834164 10E6000A */ beq $a3, $a2, .L80834190
/* 01F58 80834168 80634164 */ lb $v1, %lo(D_80854164)($v1)
/* 01F5C 8083416C 10E40008 */ beq $a3, $a0, .L80834190
/* 01F60 80834170 00000000 */ nop
/* 01F64 80834174 14E0000A */ bne $a3, $zero, .L808341A0
/* 01F68 80834178 00000000 */ nop
/* 01F6C 8083417C 82020151 */ lb $v0, 0x0151($s0) ## 00000151
/* 01F70 80834180 10C20003 */ beq $a2, $v0, .L80834190
/* 01F74 80834184 00000000 */ nop
/* 01F78 80834188 14820005 */ bne $a0, $v0, .L808341A0
/* 01F7C 8083418C 00000000 */ nop
.L80834190:
/* 01F80 80834190 14E00003 */ bne $a3, $zero, .L808341A0
/* 01F84 80834194 2403000D */ addiu $v1, $zero, 0x000D ## $v1 = 0000000D
/* 01F88 80834198 10000001 */ beq $zero, $zero, .L808341A0
/* 01F8C 8083419C 2403FFF3 */ addiu $v1, $zero, 0xFFF3 ## $v1 = FFFFFFF3
.L808341A0:
/* 01F90 808341A0 04600003 */ bltz $v1, .L808341B0
/* 01F94 808341A4 00036823 */ subu $t5, $zero, $v1
/* 01F98 808341A8 10000002 */ beq $zero, $zero, .L808341B4
/* 01F9C 808341AC A203015A */ sb $v1, 0x015A($s0) ## 0000015A
.L808341B0:
/* 01FA0 808341B0 A20D015A */ sb $t5, 0x015A($s0) ## 0000015A
.L808341B4:
/* 01FA4 808341B4 820E015A */ lb $t6, 0x015A($s0) ## 0000015A
/* 01FA8 808341B8 3C068085 */ lui $a2, %hi(D_808540F4) ## $a2 = 80850000
/* 01FAC 808341BC 3C180400 */ lui $t8, 0x0400 ## $t8 = 04000000
/* 01FB0 808341C0 000E78C0 */ sll $t7, $t6, 3
/* 01FB4 808341C4 00CF3021 */ addu $a2, $a2, $t7
/* 01FB8 808341C8 8CC640F4 */ lw $a2, %lo(D_808540F4)($a2)
/* 01FBC 808341CC 27182F30 */ addiu $t8, $t8, 0x2F30 ## $t8 = 04002F30
/* 01FC0 808341D0 54D80007 */ bnel $a2, $t8, .L808341F0
/* 01FC4 808341D4 00C02025 */ or $a0, $a2, $zero ## $a0 = 80850000
/* 01FC8 808341D8 8219014E */ lb $t9, 0x014E($s0) ## 0000014E
/* 01FCC 808341DC 57200004 */ bnel $t9, $zero, .L808341F0
/* 01FD0 808341E0 00C02025 */ or $a0, $a2, $zero ## $a0 = 80850000
/* 01FD4 808341E4 3C060400 */ lui $a2, 0x0400 ## $a2 = 04000000
/* 01FD8 808341E8 24C62F40 */ addiu $a2, $a2, 0x2F40 ## $a2 = 04002F40
/* 01FDC 808341EC 00C02025 */ or $a0, $a2, $zero ## $a0 = 04002F40
.L808341F0:
/* 01FE0 808341F0 AFA30038 */ sw $v1, 0x0038($sp)
/* 01FE4 808341F4 AFA6004C */ sw $a2, 0x004C($sp)
/* 01FE8 808341F8 0C028800 */ jal SkelAnime_GetFrameCount
/* 01FEC 808341FC A3A70037 */ sb $a3, 0x0037($sp)
/* 01FF0 80834200 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00
/* 01FF4 80834204 8FA30038 */ lw $v1, 0x0038($sp)
/* 01FF8 80834208 8FA6004C */ lw $a2, 0x004C($sp)
/* 01FFC 8083420C 468020A0 */ cvt.s.w $f2, $f4
/* 02000 80834210 83A70037 */ lb $a3, 0x0037($sp)
/* 02004 80834214 8FA40054 */ lw $a0, 0x0054($sp)
/* 02008 80834218 260506C8 */ addiu $a1, $s0, 0x06C8 ## $a1 = 000006C8
/* 0200C 8083421C 24080002 */ addiu $t0, $zero, 0x0002 ## $t0 = 00000002
/* 02010 80834220 04600006 */ bltz $v1, .L8083423C
/* 02014 80834224 46001386 */ mov.s $f14, $f2
/* 02018 80834228 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 0201C 8083422C 3C018085 */ lui $at, %hi(D_8085535C) ## $at = 80850000
/* 02020 80834230 C420535C */ lwc1 $f0, %lo(D_8085535C)($at)
/* 02024 80834234 10000006 */ beq $zero, $zero, .L80834250
/* 02028 80834238 46008306 */ mov.s $f12, $f16
.L8083423C:
/* 0202C 8083423C 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 02030 80834240 3C018085 */ lui $at, %hi(D_80855360) ## $at = 80850000
/* 02034 80834244 C4205360 */ lwc1 $f0, %lo(D_80855360)($at)
/* 02038 80834248 46001306 */ mov.s $f12, $f2
/* 0203C 8083424C 46008386 */ mov.s $f14, $f16
.L80834250:
/* 02040 80834250 50E00003 */ beql $a3, $zero, .L80834260
/* 02044 80834254 44070000 */ mfc1 $a3, $f0
/* 02048 80834258 46000000 */ add.s $f0, $f0, $f0
/* 0204C 8083425C 44070000 */ mfc1 $a3, $f0
.L80834260:
/* 02050 80834260 E7AC0010 */ swc1 $f12, 0x0010($sp)
/* 02054 80834264 E7AE0014 */ swc1 $f14, 0x0014($sp)
/* 02058 80834268 AFA80018 */ sw $t0, 0x0018($sp)
/* 0205C 8083426C 0C028FC2 */ jal SkelAnime_ChangeLinkAnim
/* 02060 80834270 E7B0001C */ swc1 $f16, 0x001C($sp)
/* 02064 80834274 8E09067C */ lw $t1, 0x067C($s0) ## 0000067C
/* 02068 80834278 2401FEFF */ addiu $at, $zero, 0xFEFF ## $at = FFFFFEFF
/* 0206C 8083427C 01215024 */ and $t2, $t1, $at
/* 02070 80834280 AE0A067C */ sw $t2, 0x067C($s0) ## 0000067C
/* 02074 80834284 8FBF002C */ lw $ra, 0x002C($sp)
/* 02078 80834288 8FB00028 */ lw $s0, 0x0028($sp)
/* 0207C 8083428C 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000
/* 02080 80834290 03E00008 */ jr $ra
/* 02084 80834294 00000000 */ nop

View file

@ -1,180 +0,0 @@
.late_rodata
glabel D_808553EC
.float 3.051851E-05
.text
glabel func_8083F0C8
/* 0CEB8 8083F0C8 3C0E8016 */ lui $t6, %hi(gSaveContext+4)
/* 0CEBC 8083F0CC 8DCEE664 */ lw $t6, %lo(gSaveContext+4)($t6)
/* 0CEC0 8083F0D0 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88
/* 0CEC4 8083F0D4 AFB00014 */ sw $s0, 0x0014($sp)
/* 0CEC8 8083F0D8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0CECC 8083F0DC AFBF001C */ sw $ra, 0x001C($sp)
/* 0CED0 8083F0E0 AFB10018 */ sw $s1, 0x0018($sp)
/* 0CED4 8083F0E4 11C00098 */ beq $t6, $zero, .L8083F348
/* 0CED8 8083F0E8 AFA5007C */ sw $a1, 0x007C($sp)
/* 0CEDC 8083F0EC 8C8F067C */ lw $t7, 0x067C($a0) ## 0000067C
/* 0CEE0 8083F0F0 30D90030 */ andi $t9, $a2, 0x0030 ## $t9 = 00000000
/* 0CEE4 8083F0F4 000FC100 */ sll $t8, $t7, 4
/* 0CEE8 8083F0F8 07020094 */ bltzl $t8, .L8083F34C
/* 0CEEC 8083F0FC 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 0CEF0 8083F100 13200091 */ beq $t9, $zero, .L8083F348
/* 0CEF4 8083F104 8FA6007C */ lw $a2, 0x007C($sp)
/* 0CEF8 8083F108 8C910074 */ lw $s1, 0x0074($a0) ## 00000074
/* 0CEFC 8083F10C 9205007C */ lbu $a1, 0x007C($s0) ## 0000007C
/* 0CF00 8083F110 24C607C0 */ addiu $a2, $a2, 0x07C0 ## $a2 = 000007C0
/* 0CF04 8083F114 27A70050 */ addiu $a3, $sp, 0x0050 ## $a3 = FFFFFFD8
/* 0CF08 8083F118 0C00E31E */ jal func_80038C78
/* 0CF0C 8083F11C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0CF10 8083F120 C7A20050 */ lwc1 $f2, 0x0050($sp)
/* 0CF14 8083F124 C7AC0058 */ lwc1 $f12, 0x0058($sp)
/* 0CF18 8083F128 27A2005C */ addiu $v0, $sp, 0x005C ## $v0 = FFFFFFE4
/* 0CF1C 8083F12C 27A30074 */ addiu $v1, $sp, 0x0074 ## $v1 = FFFFFFFC
/* 0CF20 8083F130 46001386 */ mov.s $f14, $f2
/* 0CF24 8083F134 46006406 */ mov.s $f16, $f12
/* 0CF28 8083F138 C4400000 */ lwc1 $f0, 0x0000($v0) ## FFFFFFE4
.L8083F13C:
/* 0CF2C 8083F13C 460E003C */ c.lt.s $f0, $f14
/* 0CF30 8083F140 00000000 */ nop
/* 0CF34 8083F144 45020004 */ bc1fl .L8083F158
/* 0CF38 8083F148 4600103C */ c.lt.s $f2, $f0
/* 0CF3C 8083F14C 10000006 */ beq $zero, $zero, .L8083F168
/* 0CF40 8083F150 46000386 */ mov.s $f14, $f0
/* 0CF44 8083F154 4600103C */ c.lt.s $f2, $f0
.L8083F158:
/* 0CF48 8083F158 00000000 */ nop
/* 0CF4C 8083F15C 45020003 */ bc1fl .L8083F16C
/* 0CF50 8083F160 C4400008 */ lwc1 $f0, 0x0008($v0) ## FFFFFFEC
/* 0CF54 8083F164 46000086 */ mov.s $f2, $f0
.L8083F168:
/* 0CF58 8083F168 C4400008 */ lwc1 $f0, 0x0008($v0) ## FFFFFFEC
.L8083F16C:
/* 0CF5C 8083F16C 2442000C */ addiu $v0, $v0, 0x000C ## $v0 = FFFFFFF0
/* 0CF60 8083F170 4610003C */ c.lt.s $f0, $f16
/* 0CF64 8083F174 00000000 */ nop
/* 0CF68 8083F178 45020004 */ bc1fl .L8083F18C
/* 0CF6C 8083F17C 4600603C */ c.lt.s $f12, $f0
/* 0CF70 8083F180 10000006 */ beq $zero, $zero, .L8083F19C
/* 0CF74 8083F184 46000406 */ mov.s $f16, $f0
/* 0CF78 8083F188 4600603C */ c.lt.s $f12, $f0
.L8083F18C:
/* 0CF7C 8083F18C 00000000 */ nop
/* 0CF80 8083F190 45000002 */ bc1f .L8083F19C
/* 0CF84 8083F194 00000000 */ nop
/* 0CF88 8083F198 46000306 */ mov.s $f12, $f0
.L8083F19C:
/* 0CF8C 8083F19C 5443FFE7 */ bnel $v0, $v1, .L8083F13C
/* 0CF90 8083F1A0 C4400000 */ lwc1 $f0, 0x0000($v0) ## FFFFFFF0
/* 0CF94 8083F1A4 3C018085 */ lui $at, %hi(D_808553EC) ## $at = 80850000
/* 0CF98 8083F1A8 C43253EC */ lwc1 $f18, %lo(D_808553EC)($at)
/* 0CF9C 8083F1AC 46027100 */ add.s $f4, $f14, $f2
/* 0CFA0 8083F1B0 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
/* 0CFA4 8083F1B4 44813000 */ mtc1 $at, $f6 ## $f6 = 0.50
/* 0CFA8 8083F1B8 460C8200 */ add.s $f8, $f16, $f12
/* 0CFAC 8083F1BC 44815000 */ mtc1 $at, $f10 ## $f10 = 0.50
/* 0CFB0 8083F1C0 46062382 */ mul.s $f14, $f4, $f6
/* 0CFB4 8083F1C4 8628000C */ lh $t0, 0x000C($s1) ## 0000000C
/* 0CFB8 8083F1C8 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024
/* 0CFBC 8083F1CC 460A4402 */ mul.s $f16, $f8, $f10
/* 0CFC0 8083F1D0 44884000 */ mtc1 $t0, $f8 ## $f8 = 0.00
/* 0CFC4 8083F1D4 86290008 */ lh $t1, 0x0008($s1) ## 00000008
/* 0CFC8 8083F1D8 3C014100 */ lui $at, 0x4100 ## $at = 41000000
/* 0CFCC 8083F1DC 460E2181 */ sub.s $f6, $f4, $f14
/* 0CFD0 8083F1E0 468042A0 */ cvt.s.w $f10, $f8
/* 0CFD4 8083F1E4 46125102 */ mul.s $f4, $f10, $f18
/* 0CFD8 8083F1E8 C60A002C */ lwc1 $f10, 0x002C($s0) ## 0000002C
/* 0CFDC 8083F1EC 46043202 */ mul.s $f8, $f6, $f4
/* 0CFE0 8083F1F0 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00
/* 0CFE4 8083F1F4 46105181 */ sub.s $f6, $f10, $f16
/* 0CFE8 8083F1F8 468022A0 */ cvt.s.w $f10, $f4
/* 0CFEC 8083F1FC 46125102 */ mul.s $f4, $f10, $f18
/* 0CFF0 8083F200 00000000 */ nop
/* 0CFF4 8083F204 46043282 */ mul.s $f10, $f6, $f4
/* 0CFF8 8083F208 44813000 */ mtc1 $at, $f6 ## $f6 = 8.00
/* 0CFFC 8083F20C 460A4081 */ sub.s $f2, $f8, $f10
/* 0D000 8083F210 46001005 */ abs.s $f0, $f2
/* 0D004 8083F214 4606003C */ c.lt.s $f0, $f6
/* 0D008 8083F218 00000000 */ nop
/* 0D00C 8083F21C 4500004A */ bc1f .L8083F348
/* 0D010 8083F220 00000000 */ nop
/* 0D014 8083F224 8E0A0680 */ lw $t2, 0x0680($s0) ## 00000680
/* 0D018 8083F228 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 0D01C 8083F22C 3C0C8086 */ lui $t4, %hi(sControlInput) ## $t4 = 80860000
/* 0D020 8083F230 01415825 */ or $t3, $t2, $at ## $t3 = 00010000
/* 0D024 8083F234 AE0B0680 */ sw $t3, 0x0680($s0) ## 00000680
/* 0D028 8083F238 8D8C8AB4 */ lw $t4, %lo(sControlInput)($t4)
/* 0D02C 8083F23C 3C01FFFF */ lui $at, 0xFFFF ## $at = FFFF0000
/* 0D030 8083F240 34217FFF */ ori $at, $at, 0x7FFF ## $at = FFFF7FFF
/* 0D034 8083F244 958D000C */ lhu $t5, 0x000C($t4) ## 8086000C
/* 0D038 8083F248 01A17027 */ nor $t6, $t5, $at
/* 0D03C 8083F24C 55C0003F */ bnel $t6, $zero, .L8083F34C
/* 0D040 8083F250 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 0D044 8083F254 862F0008 */ lh $t7, 0x0008($s1) ## 00000008
/* 0D048 8083F258 3C068084 */ lui $a2, %hi(func_8083A40C) ## $a2 = 80840000
/* 0D04C 8083F25C 24C6A40C */ addiu $a2, $a2, %lo(func_8083A40C) ## $a2 = 8083A40C
/* 0D050 8083F260 448F2000 */ mtc1 $t7, $f4 ## $f4 = 0.00
/* 0D054 8083F264 8FA4007C */ lw $a0, 0x007C($sp)
/* 0D058 8083F268 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 0D05C 8083F26C 46802220 */ cvt.s.w $f8, $f4
/* 0D060 8083F270 46124282 */ mul.s $f10, $f8, $f18
/* 0D064 8083F274 E7AA0038 */ swc1 $f10, 0x0038($sp)
/* 0D068 8083F278 8638000C */ lh $t8, 0x000C($s1) ## 0000000C
/* 0D06C 8083F27C 44983000 */ mtc1 $t8, $f6 ## $f6 = 0.00
/* 0D070 8083F280 00000000 */ nop
/* 0D074 8083F284 46803120 */ cvt.s.w $f4, $f6
/* 0D078 8083F288 46122202 */ mul.s $f8, $f4, $f18
/* 0D07C 8083F28C E7A80034 */ swc1 $f8, 0x0034($sp)
/* 0D080 8083F290 C6000888 */ lwc1 $f0, 0x0888($s0) ## 00000888
/* 0D084 8083F294 E7B00044 */ swc1 $f16, 0x0044($sp)
/* 0D088 8083F298 E7AE004C */ swc1 $f14, 0x004C($sp)
/* 0D08C 8083F29C 0C20DA26 */ jal func_80836898
/* 0D090 8083F2A0 E7A00030 */ swc1 $f0, 0x0030($sp)
/* 0D094 8083F2A4 8E190680 */ lw $t9, 0x0680($s0) ## 00000680
/* 0D098 8083F2A8 8602007E */ lh $v0, 0x007E($s0) ## 0000007E
/* 0D09C 8083F2AC 3C010004 */ lui $at, 0x0004 ## $at = 00040000
/* 0D0A0 8083F2B0 03214025 */ or $t0, $t9, $at ## $t0 = 00040000
/* 0D0A4 8083F2B4 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000
/* 0D0A8 8083F2B8 00411021 */ addu $v0, $v0, $at
/* 0D0AC 8083F2BC C7A00030 */ lwc1 $f0, 0x0030($sp)
/* 0D0B0 8083F2C0 C7AE004C */ lwc1 $f14, 0x004C($sp)
/* 0D0B4 8083F2C4 C7B00044 */ lwc1 $f16, 0x0044($sp)
/* 0D0B8 8083F2C8 00021400 */ sll $v0, $v0, 16
/* 0D0BC 8083F2CC 00021403 */ sra $v0, $v0, 16
/* 0D0C0 8083F2D0 AE080680 */ sw $t0, 0x0680($s0) ## 00000680
/* 0D0C4 8083F2D4 A602083C */ sh $v0, 0x083C($s0) ## 0000083C
/* 0D0C8 8083F2D8 A60200B6 */ sh $v0, 0x00B6($s0) ## 000000B6
/* 0D0CC 8083F2DC C7AA0038 */ lwc1 $f10, 0x0038($sp)
/* 0D0D0 8083F2E0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0D0D4 8083F2E4 460A0182 */ mul.s $f6, $f0, $f10
/* 0D0D8 8083F2E8 460E3100 */ add.s $f4, $f6, $f14
/* 0D0DC 8083F2EC E6040024 */ swc1 $f4, 0x0024($s0) ## 00000024
/* 0D0E0 8083F2F0 C7A80034 */ lwc1 $f8, 0x0034($sp)
/* 0D0E4 8083F2F4 46080282 */ mul.s $f10, $f0, $f8
/* 0D0E8 8083F2F8 46105180 */ add.s $f6, $f10, $f16
/* 0D0EC 8083F2FC 0C20C889 */ jal func_80832224
/* 0D0F0 8083F300 E606002C */ swc1 $f6, 0x002C($s0) ## 0000002C
/* 0D0F4 8083F304 8E0A0024 */ lw $t2, 0x0024($s0) ## 00000024
/* 0D0F8 8083F308 8E090028 */ lw $t1, 0x0028($s0) ## 00000028
/* 0D0FC 8083F30C 3C060400 */ lui $a2, 0x0400 ## $a2 = 04000000
/* 0D100 8083F310 AE0A0100 */ sw $t2, 0x0100($s0) ## 00000100
/* 0D104 8083F314 8E0A002C */ lw $t2, 0x002C($s0) ## 0000002C
/* 0D108 8083F318 AE090104 */ sw $t1, 0x0104($s0) ## 00000104
/* 0D10C 8083F31C 24C62708 */ addiu $a2, $a2, 0x2708 ## $a2 = 04002708
/* 0D110 8083F320 AE0A0108 */ sw $t2, 0x0108($s0) ## 00000108
/* 0D114 8083F324 8FA4007C */ lw $a0, 0x007C($sp)
/* 0D118 8083F328 0C20C899 */ jal func_80832264
/* 0D11C 8083F32C 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 0D120 8083F330 8FA4007C */ lw $a0, 0x007C($sp)
/* 0D124 8083F334 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 0D128 8083F338 0C20CBD5 */ jal func_80832F54
/* 0D12C 8083F33C 2406009D */ addiu $a2, $zero, 0x009D ## $a2 = 0000009D
/* 0D130 8083F340 10000002 */ beq $zero, $zero, .L8083F34C
/* 0D134 8083F344 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
.L8083F348:
/* 0D138 8083F348 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L8083F34C:
/* 0D13C 8083F34C 8FBF001C */ lw $ra, 0x001C($sp)
/* 0D140 8083F350 8FB00014 */ lw $s0, 0x0014($sp)
/* 0D144 8083F354 8FB10018 */ lw $s1, 0x0018($sp)
/* 0D148 8083F358 03E00008 */ jr $ra
/* 0D14C 8083F35C 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000

View file

@ -1,147 +0,0 @@
.late_rodata
glabel D_8085540C
.float 0.666666686535
.text
glabel func_808409CC
/* 0E7BC 808409CC 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8
/* 0E7C0 808409D0 AFBF002C */ sw $ra, 0x002C($sp)
/* 0E7C4 808409D4 AFB00028 */ sw $s0, 0x0028($sp)
/* 0E7C8 808409D8 AFA40048 */ sw $a0, 0x0048($sp)
/* 0E7CC 808409DC 8CAE0664 */ lw $t6, 0x0664($a1) ## 00000664
/* 0E7D0 808409E0 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
/* 0E7D4 808409E4 55C0000D */ bnel $t6, $zero, .L80840A1C
/* 0E7D8 808409E8 8E0F0680 */ lw $t7, 0x0680($s0) ## 00000680
/* 0E7DC 808409EC 0C01E72D */ jal Health_IsCritical
/* 0E7E0 808409F0 00000000 */ nop
/* 0E7E4 808409F4 54400012 */ bnel $v0, $zero, .L80840A40
/* 0E7E8 808409F8 8E190680 */ lw $t9, 0x0680($s0) ## 00000680
/* 0E7EC 808409FC 820306AC */ lb $v1, 0x06AC($s0) ## 000006AC
/* 0E7F0 80840A00 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 00000001
/* 0E7F4 80840A04 30630001 */ andi $v1, $v1, 0x0001 ## $v1 = 00000001
/* 0E7F8 80840A08 00031E00 */ sll $v1, $v1, 24
/* 0E7FC 80840A0C 00031E03 */ sra $v1, $v1, 24
/* 0E800 80840A10 1060000A */ beq $v1, $zero, .L80840A3C
/* 0E804 80840A14 A20306AC */ sb $v1, 0x06AC($s0) ## 000006AC
/* 0E808 80840A18 8E0F0680 */ lw $t7, 0x0680($s0) ## 00000680
.L80840A1C:
/* 0E80C 80840A1C 3C01EFFF */ lui $at, 0xEFFF ## $at = EFFF0000
/* 0E810 80840A20 3421FFFF */ ori $at, $at, 0xFFFF ## $at = EFFFFFFF
/* 0E814 80840A24 01E1C024 */ and $t8, $t7, $at
/* 0E818 80840A28 AE180680 */ sw $t8, 0x0680($s0) ## 00000680
/* 0E81C 80840A2C 0C20CCCE */ jal func_80833338
/* 0E820 80840A30 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0E824 80840A34 10000048 */ beq $zero, $zero, .L80840B58
/* 0E828 80840A38 00403025 */ or $a2, $v0, $zero ## $a2 = 00000000
.L80840A3C:
/* 0E82C 80840A3C 8E190680 */ lw $t9, 0x0680($s0) ## 00000680
.L80840A40:
/* 0E830 80840A40 8E09067C */ lw $t1, 0x067C($s0) ## 0000067C
/* 0E834 80840A44 3C011000 */ lui $at, 0x1000 ## $at = 10000000
/* 0E838 80840A48 03214025 */ or $t0, $t9, $at ## $t0 = 10000000
/* 0E83C 80840A4C 312A0800 */ andi $t2, $t1, 0x0800 ## $t2 = 00000000
/* 0E840 80840A50 11400005 */ beq $t2, $zero, .L80840A68
/* 0E844 80840A54 AE080680 */ sw $t0, 0x0680($s0) ## 00000680
/* 0E848 80840A58 0C20CCCE */ jal func_80833338
/* 0E84C 80840A5C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0E850 80840A60 1000003D */ beq $zero, $zero, .L80840B58
/* 0E854 80840A64 00403025 */ or $a2, $v0, $zero ## $a2 = 00000000
.L80840A68:
/* 0E858 80840A68 8FAB0048 */ lw $t3, 0x0048($sp)
/* 0E85C 80840A6C 3C050001 */ lui $a1, 0x0001 ## $a1 = 00010000
/* 0E860 80840A70 00AB2821 */ addu $a1, $a1, $t3
/* 0E864 80840A74 1040000A */ beq $v0, $zero, .L80840AA0
/* 0E868 80840A78 90A51CBE */ lbu $a1, 0x1CBE($a1) ## 00011CBE
/* 0E86C 80840A7C 820C06AC */ lb $t4, 0x06AC($s0) ## 000006AC
/* 0E870 80840A80 24050007 */ addiu $a1, $zero, 0x0007 ## $a1 = 00000007
/* 0E874 80840A84 240DFFFF */ addiu $t5, $zero, 0xFFFF ## $t5 = FFFFFFFF
/* 0E878 80840A88 05800003 */ bltz $t4, .L80840A98
/* 0E87C 80840A8C 00000000 */ nop
/* 0E880 80840A90 10000027 */ beq $zero, $zero, .L80840B30
/* 0E884 80840A94 A20D06AC */ sb $t5, 0x06AC($s0) ## 000006AC
.L80840A98:
/* 0E888 80840A98 10000025 */ beq $zero, $zero, .L80840B30
/* 0E88C 80840A9C 24050008 */ addiu $a1, $zero, 0x0008 ## $a1 = 00000008
.L80840AA0:
/* 0E890 80840AA0 0C03F66B */ jal Math_Rand_ZeroOne
## Rand.Next() float
/* 0E894 80840AA4 AFA50038 */ sw $a1, 0x0038($sp)
/* 0E898 80840AA8 3C0140A0 */ lui $at, 0x40A0 ## $at = 40A00000
/* 0E89C 80840AAC 44812000 */ mtc1 $at, $f4 ## $f4 = 5.00
/* 0E8A0 80840AB0 8FA50038 */ lw $a1, 0x0038($sp)
/* 0E8A4 80840AB4 46040182 */ mul.s $f6, $f0, $f4
/* 0E8A8 80840AB8 4600320D */ trunc.w.s $f8, $f6
/* 0E8AC 80840ABC 44024000 */ mfc1 $v0, $f8
/* 0E8B0 80840AC0 00000000 */ nop
/* 0E8B4 80840AC4 28410004 */ slti $at, $v0, 0x0004
/* 0E8B8 80840AC8 10200019 */ beq $at, $zero, .L80840B30
/* 0E8BC 80840ACC 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
/* 0E8C0 80840AD0 10400003 */ beq $v0, $zero, .L80840AE0
/* 0E8C4 80840AD4 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
/* 0E8C8 80840AD8 1441000D */ bne $v0, $at, .L80840B10
/* 0E8CC 80840ADC 00000000 */ nop
.L80840AE0:
/* 0E8D0 80840AE0 920F015D */ lbu $t7, 0x015D($s0) ## 0000015D
/* 0E8D4 80840AE4 2401000A */ addiu $at, $zero, 0x000A ## $at = 0000000A
/* 0E8D8 80840AE8 15E10011 */ bne $t7, $at, .L80840B30
/* 0E8DC 80840AEC 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
/* 0E8E0 80840AF0 10410007 */ beq $v0, $at, .L80840B10
/* 0E8E4 80840AF4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0E8E8 80840AF8 AFA30034 */ sw $v1, 0x0034($sp)
/* 0E8EC 80840AFC 0C023C60 */ jal Player_GetSwordHeld
/* 0E8F0 80840B00 AFA50038 */ sw $a1, 0x0038($sp)
/* 0E8F4 80840B04 8FA30034 */ lw $v1, 0x0034($sp)
/* 0E8F8 80840B08 10400009 */ beq $v0, $zero, .L80840B30
/* 0E8FC 80840B0C 8FA50038 */ lw $a1, 0x0038($sp)
.L80840B10:
/* 0E900 80840B10 14600006 */ bne $v1, $zero, .L80840B2C
/* 0E904 80840B14 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 0E908 80840B18 0C023C68 */ jal Player_HoldsTwoHandedWeapon
/* 0E90C 80840B1C AFA30034 */ sw $v1, 0x0034($sp)
/* 0E910 80840B20 10400002 */ beq $v0, $zero, .L80840B2C
/* 0E914 80840B24 8FA30034 */ lw $v1, 0x0034($sp)
/* 0E918 80840B28 24030004 */ addiu $v1, $zero, 0x0004 ## $v1 = 00000004
.L80840B2C:
/* 0E91C 80840B2C 24650009 */ addiu $a1, $v1, 0x0009 ## $a1 = 0000000D
.L80840B30:
/* 0E920 80840B30 9208015B */ lbu $t0, 0x015B($s0) ## 0000015B
/* 0E924 80840B34 3C198085 */ lui $t9, %hi(D_80853D7C) ## $t9 = 80850000
/* 0E928 80840B38 27393D7C */ addiu $t9, $t9, %lo(D_80853D7C) ## $t9 = 80853D7C
/* 0E92C 80840B3C 0005C0C0 */ sll $t8, $a1, 3
/* 0E930 80840B40 03191821 */ addu $v1, $t8, $t9
/* 0E934 80840B44 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 0E938 80840B48 11010002 */ beq $t0, $at, .L80840B54
/* 0E93C 80840B4C 00601025 */ or $v0, $v1, $zero ## $v0 = 00000004
/* 0E940 80840B50 24620004 */ addiu $v0, $v1, 0x0004 ## $v0 = 00000008
.L80840B54:
/* 0E944 80840B54 8C460000 */ lw $a2, 0x0000($v0) ## 00000008
.L80840B58:
/* 0E948 80840B58 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000
/* 0E94C 80840B5C 0C028800 */ jal SkelAnime_GetFrameCount
/* 0E950 80840B60 AFA60044 */ sw $a2, 0x0044($sp)
/* 0E954 80840B64 3C018085 */ lui $at, %hi(D_8085540C) ## $at = 80850000
/* 0E958 80840B68 C42A540C */ lwc1 $f10, %lo(D_8085540C)($at)
/* 0E95C 80840B6C 3C018085 */ lui $at, %hi(D_808535E8) ## $at = 80850000
/* 0E960 80840B70 C43035E8 */ lwc1 $f16, %lo(D_808535E8)($at)
/* 0E964 80840B74 44823000 */ mtc1 $v0, $f6 ## $f6 = 0.00
/* 0E968 80840B78 3C01C0C0 */ lui $at, 0xC0C0 ## $at = C0C00000
/* 0E96C 80840B7C 46105482 */ mul.s $f18, $f10, $f16
/* 0E970 80840B80 44815000 */ mtc1 $at, $f10 ## $f10 = -6.00
/* 0E974 80840B84 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 0E978 80840B88 24090002 */ addiu $t1, $zero, 0x0002 ## $t1 = 00000002
/* 0E97C 80840B8C AFA90018 */ sw $t1, 0x0018($sp)
/* 0E980 80840B90 8FA60044 */ lw $a2, 0x0044($sp)
/* 0E984 80840B94 46803220 */ cvt.s.w $f8, $f6
/* 0E988 80840B98 44079000 */ mfc1 $a3, $f18
/* 0E98C 80840B9C 8FA40048 */ lw $a0, 0x0048($sp)
/* 0E990 80840BA0 260501B4 */ addiu $a1, $s0, 0x01B4 ## $a1 = 000001B4
/* 0E994 80840BA4 E7AA001C */ swc1 $f10, 0x001C($sp)
/* 0E998 80840BA8 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 0E99C 80840BAC 0C028FC2 */ jal SkelAnime_ChangeLinkAnim
/* 0E9A0 80840BB0 E7A80014 */ swc1 $f8, 0x0014($sp)
/* 0E9A4 80840BB4 8FBF002C */ lw $ra, 0x002C($sp)
/* 0E9A8 80840BB8 8FB00028 */ lw $s0, 0x0028($sp)
/* 0E9AC 80840BBC 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000
/* 0E9B0 80840BC0 03E00008 */ jr $ra
/* 0E9B4 80840BC4 00000000 */ nop

View file

@ -1,152 +0,0 @@
glabel func_80845964
/* 13754 80845964 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 13758 80845968 44876000 */ mtc1 $a3, $f12 ## $f12 = 0.00
/* 1375C 8084596C 8FA7004C */ lw $a3, 0x004C($sp)
/* 13760 80845970 AFB00018 */ sw $s0, 0x0018($sp)
/* 13764 80845974 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
/* 13768 80845978 AFBF001C */ sw $ra, 0x001C($sp)
/* 1376C 8084597C 10E0000B */ beq $a3, $zero, .L808459AC
/* 13770 80845980 AFA40038 */ sw $a0, 0x0038($sp)
/* 13774 80845984 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 13778 80845988 C4A60838 */ lwc1 $f6, 0x0838($a1) ## 00000838
/* 1377C 8084598C 46062032 */ c.eq.s $f4, $f6
/* 13780 80845990 00000000 */ nop
/* 13784 80845994 45020006 */ bc1fl .L808459B0
/* 13788 80845998 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
/* 1378C 8084599C 0C028EF0 */ jal func_800A3BC0
/* 13790 808459A0 24A501B4 */ addiu $a1, $a1, 0x01B4 ## $a1 = 000001B4
/* 13794 808459A4 1000007A */ beq $zero, $zero, .L80845B90
/* 13798 808459A8 8FBF001C */ lw $ra, 0x001C($sp)
.L808459AC:
/* 1379C 808459AC 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002
.L808459B0:
/* 137A0 808459B0 10E10058 */ beq $a3, $at, .L80845B14
/* 137A4 808459B4 3C0E8016 */ lui $t6, %hi(gGameInfo)
/* 137A8 808459B8 8DCEFA90 */ lw $t6, %lo(gGameInfo)($t6)
/* 137AC 808459BC 8CD80018 */ lw $t8, 0x0018($a2) ## 00000018
/* 137B0 808459C0 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000
/* 137B4 808459C4 85CF0110 */ lh $t7, 0x0110($t6) ## 80160110
/* 137B8 808459C8 44812000 */ mtc1 $at, $f4 ## $f4 = 0.50
/* 137BC 808459CC 44983000 */ mtc1 $t8, $f6 ## $f6 = 0.00
/* 137C0 808459D0 448F4000 */ mtc1 $t7, $f8 ## $f8 = 0.00
/* 137C4 808459D4 8CD90020 */ lw $t9, 0x0020($a2) ## 00000020
/* 137C8 808459D8 8FA90038 */ lw $t1, 0x0038($sp)
/* 137CC 808459DC 468042A0 */ cvt.s.w $f10, $f8
/* 137D0 808459E0 94C80004 */ lhu $t0, 0x0004($a2) ## 00000004
/* 137D4 808459E4 952A1D74 */ lhu $t2, 0x1D74($t1) ## 00001D74
/* 137D8 808459E8 46803220 */ cvt.s.w $f8, $f6
/* 137DC 808459EC 46045402 */ mul.s $f16, $f10, $f4
/* 137E0 808459F0 44992000 */ mtc1 $t9, $f4 ## $f4 = 0.00
/* 137E4 808459F4 C60A0024 */ lwc1 $f10, 0x0024($s0) ## 00000024
/* 137E8 808459F8 010A1823 */ subu $v1, $t0, $t2
/* 137EC 808459FC 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 00000001
/* 137F0 80845A00 460A4381 */ sub.s $f14, $f8, $f10
/* 137F4 80845A04 C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C
/* 137F8 80845A08 E7B00034 */ swc1 $f16, 0x0034($sp)
/* 137FC 80845A0C 468021A0 */ cvt.s.w $f6, $f4
/* 13800 80845A10 460E7282 */ mul.s $f10, $f14, $f14
/* 13804 80845A14 AFA60040 */ sw $a2, 0x0040($sp)
/* 13808 80845A18 AFA30024 */ sw $v1, 0x0024($sp)
/* 1380C 80845A1C 46083301 */ sub.s $f12, $f6, $f8
/* 13810 80845A20 460C6102 */ mul.s $f4, $f12, $f12
/* 13814 80845A24 46045000 */ add.s $f0, $f10, $f4
/* 13818 80845A28 46000004 */ sqrt.s $f0, $f0
/* 1381C 80845A2C 46100483 */ div.s $f18, $f0, $f16
/* 13820 80845A30 0C034199 */ jal atan2s
/* 13824 80845A34 E7B20028 */ swc1 $f18, 0x0028($sp)
/* 13828 80845A38 8FA7004C */ lw $a3, 0x004C($sp)
/* 1382C 80845A3C 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 13830 80845A40 8FA30024 */ lw $v1, 0x0024($sp)
/* 13834 80845A44 8FA60040 */ lw $a2, 0x0040($sp)
/* 13838 80845A48 C7B00034 */ lwc1 $f16, 0x0034($sp)
/* 1383C 80845A4C C7B20028 */ lwc1 $f18, 0x0028($sp)
/* 13840 80845A50 14E1002C */ bne $a3, $at, .L80845B04
/* 13844 80845A54 A7A2004A */ sh $v0, 0x004A($sp)
/* 13848 80845A58 8CCB0018 */ lw $t3, 0x0018($a2) ## 00000018
/* 1384C 80845A5C 8CCC000C */ lw $t4, 0x000C($a2) ## 0000000C
/* 13850 80845A60 8CCE0020 */ lw $t6, 0x0020($a2) ## 00000020
/* 13854 80845A64 8CCF0014 */ lw $t7, 0x0014($a2) ## 00000014
/* 13858 80845A68 016C6823 */ subu $t5, $t3, $t4
/* 1385C 80845A6C 448D3000 */ mtc1 $t5, $f6 ## $f6 = 0.00
/* 13860 80845A70 01CFC023 */ subu $t8, $t6, $t7
/* 13864 80845A74 44984000 */ mtc1 $t8, $f8 ## $f8 = 0.00
/* 13868 80845A78 468030A0 */ cvt.s.w $f2, $f6
/* 1386C 80845A7C 94D90004 */ lhu $t9, 0x0004($a2) ## 00000004
/* 13870 80845A80 94C90002 */ lhu $t1, 0x0002($a2) ## 00000002
/* 13874 80845A84 3C013FC0 */ lui $at, 0x3FC0 ## $at = 3FC00000
/* 13878 80845A88 46804320 */ cvt.s.w $f12, $f8
/* 1387C 80845A8C 46021282 */ mul.s $f10, $f2, $f2
/* 13880 80845A90 03294023 */ subu $t0, $t9, $t1
/* 13884 80845A94 44883000 */ mtc1 $t0, $f6 ## $f6 = 0.00
/* 13888 80845A98 460C6102 */ mul.s $f4, $f12, $f12
/* 1388C 80845A9C 46803220 */ cvt.s.w $f8, $f6
/* 13890 80845AA0 44813000 */ mtc1 $at, $f6 ## $f6 = 1.50
/* 13894 80845AA4 3C014080 */ lui $at, 0x4080 ## $at = 40800000
/* 13898 80845AA8 46045000 */ add.s $f0, $f10, $f4
/* 1389C 80845AAC 46000004 */ sqrt.s $f0, $f0
/* 138A0 80845AB0 46100283 */ div.s $f10, $f0, $f16
/* 138A4 80845AB4 46085103 */ div.s $f4, $f10, $f8
/* 138A8 80845AB8 44814000 */ mtc1 $at, $f8 ## $f8 = 4.00
/* 138AC 80845ABC 46062283 */ div.s $f10, $f4, $f6
/* 138B0 80845AC0 46085102 */ mul.s $f4, $f10, $f8
/* 138B4 80845AC4 4600218D */ trunc.w.s $f6, $f4
/* 138B8 80845AC8 44023000 */ mfc1 $v0, $f6
/* 138BC 80845ACC 00000000 */ nop
/* 138C0 80845AD0 0043082A */ slt $at, $v0, $v1
/* 138C4 80845AD4 14200005 */ bne $at, $zero, .L80845AEC
/* 138C8 80845AD8 00626023 */ subu $t4, $v1, $v0
/* 138CC 80845ADC 860B00B6 */ lh $t3, 0x00B6($s0) ## 000000B6
/* 138D0 80845AE0 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 138D4 80845AE4 1000000B */ beq $zero, $zero, .L80845B14
/* 138D8 80845AE8 A7AB004A */ sh $t3, 0x004A($sp)
.L80845AEC:
/* 138DC 80845AEC 258D0001 */ addiu $t5, $t4, 0x0001 ## $t5 = 00000001
/* 138E0 80845AF0 448D5000 */ mtc1 $t5, $f10 ## $f10 = 0.00
/* 138E4 80845AF4 00000000 */ nop
/* 138E8 80845AF8 46805220 */ cvt.s.w $f8, $f10
/* 138EC 80845AFC 10000005 */ beq $zero, $zero, .L80845B14
/* 138F0 80845B00 46089303 */ div.s $f12, $f18, $f8
.L80845B04:
/* 138F4 80845B04 44832000 */ mtc1 $v1, $f4 ## $f4 = 0.00
/* 138F8 80845B08 00000000 */ nop
/* 138FC 80845B0C 468021A0 */ cvt.s.w $f6, $f4
/* 13900 80845B10 46069303 */ div.s $f12, $f18, $f6
.L80845B14:
/* 13904 80845B14 8E0E0680 */ lw $t6, 0x0680($s0) ## 00000680
/* 13908 80845B18 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 1390C 80845B1C 35CF0020 */ ori $t7, $t6, 0x0020 ## $t7 = 00000020
/* 13910 80845B20 AE0F0680 */ sw $t7, 0x0680($s0) ## 00000680
/* 13914 80845B24 E7AC0044 */ swc1 $f12, 0x0044($sp)
/* 13918 80845B28 0C2107B9 */ jal func_80841EE4
/* 1391C 80845B2C 8FA50038 */ lw $a1, 0x0038($sp)
/* 13920 80845B30 C7AC0044 */ lwc1 $f12, 0x0044($sp)
/* 13924 80845B34 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 13928 80845B38 87A6004A */ lh $a2, 0x004A($sp)
/* 1392C 80845B3C 44056000 */ mfc1 $a1, $f12
/* 13930 80845B40 0C20F7DA */ jal func_8083DF68
/* 13934 80845B44 00000000 */ nop
/* 13938 80845B48 C7AC0044 */ lwc1 $f12, 0x0044($sp)
/* 1393C 80845B4C 44805000 */ mtc1 $zero, $f10 ## $f10 = 0.00
/* 13940 80845B50 00000000 */ nop
/* 13944 80845B54 460A6032 */ c.eq.s $f12, $f10
/* 13948 80845B58 00000000 */ nop
/* 1394C 80845B5C 4502000B */ bc1fl .L80845B8C
/* 13950 80845B60 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 13954 80845B64 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00
/* 13958 80845B68 C6040838 */ lwc1 $f4, 0x0838($s0) ## 00000838
/* 1395C 80845B6C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 13960 80845B70 46044032 */ c.eq.s $f8, $f4
/* 13964 80845B74 00000000 */ nop
/* 13968 80845B78 45020004 */ bc1fl .L80845B8C
/* 1396C 80845B7C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 13970 80845B80 0C20EFD4 */ jal func_8083BF50
/* 13974 80845B84 8FA50038 */ lw $a1, 0x0038($sp)
/* 13978 80845B88 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
.L80845B8C:
/* 1397C 80845B8C 8FBF001C */ lw $ra, 0x001C($sp)
.L80845B90:
/* 13980 80845B90 8FB00018 */ lw $s0, 0x0018($sp)
/* 13984 80845B94 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 13988 80845B98 03E00008 */ jr $ra
/* 1398C 80845B9C 00000000 */ nop

View file

@ -1,225 +0,0 @@
.late_rodata
glabel D_808554F4
.float 1500.0
glabel D_808554F8
.float -1500.0
.text
glabel func_8084ABD8
/* 189C8 8084ABD8 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 189CC 8084ABDC AFBF0024 */ sw $ra, 0x0024($sp)
/* 189D0 8084ABE0 AFB10020 */ sw $s1, 0x0020($sp)
/* 189D4 8084ABE4 AFB0001C */ sw $s0, 0x001C($sp)
/* 189D8 8084ABE8 AFA40038 */ sw $a0, 0x0038($sp)
/* 189DC 8084ABEC 00C08025 */ or $s0, $a2, $zero ## $s0 = 00000000
/* 189E0 8084ABF0 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 189E4 8084ABF4 AFA70044 */ sw $a3, 0x0044($sp)
/* 189E8 8084ABF8 0C00B75E */ jal func_8002DD78
/* 189EC 8084ABFC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 189F0 8084AC00 5440003A */ bnel $v0, $zero, .L8084ACEC
/* 189F4 8084AC04 8E2D067C */ lw $t5, 0x067C($s1) ## 0000067C
/* 189F8 8084AC08 0C20CD2D */ jal func_808334B4
/* 189FC 8084AC0C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 18A00 8084AC10 54400036 */ bnel $v0, $zero, .L8084ACEC
/* 18A04 8084AC14 8E2D067C */ lw $t5, 0x067C($s1) ## 0000067C
/* 18A08 8084AC18 16000033 */ bne $s0, $zero, .L8084ACE8
/* 18A0C 8084AC1C 3C0E8086 */ lui $t6, %hi(sControlInput) ## $t6 = 80860000
/* 18A10 8084AC20 8DCE8AB4 */ lw $t6, %lo(sControlInput)($t6)
/* 18A14 8084AC24 3C014370 */ lui $at, 0x4370 ## $at = 43700000
/* 18A18 8084AC28 44814000 */ mtc1 $at, $f8 ## $f8 = 240.00
/* 18A1C 8084AC2C 81CF0015 */ lb $t7, 0x0015($t6) ## 80860015
/* 18A20 8084AC30 2419001E */ addiu $t9, $zero, 0x001E ## $t9 = 0000001E
/* 18A24 8084AC34 AFB90010 */ sw $t9, 0x0010($sp)
/* 18A28 8084AC38 448F2000 */ mtc1 $t7, $f4 ## $f4 = 0.00
/* 18A2C 8084AC3C 26240044 */ addiu $a0, $s1, 0x0044 ## $a0 = 00000044
/* 18A30 8084AC40 2406000E */ addiu $a2, $zero, 0x000E ## $a2 = 0000000E
/* 18A34 8084AC44 468021A0 */ cvt.s.w $f6, $f4
/* 18A38 8084AC48 24070FA0 */ addiu $a3, $zero, 0x0FA0 ## $a3 = 00000FA0
/* 18A3C 8084AC4C 46083282 */ mul.s $f10, $f6, $f8
/* 18A40 8084AC50 4600540D */ trunc.w.s $f16, $f10
/* 18A44 8084AC54 44108000 */ mfc1 $s0, $f16
/* 18A48 8084AC58 00000000 */ nop
/* 18A4C 8084AC5C 00108400 */ sll $s0, $s0, 16
/* 18A50 8084AC60 00108403 */ sra $s0, $s0, 16
/* 18A54 8084AC64 00102C00 */ sll $a1, $s0, 16
/* 18A58 8084AC68 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 18A5C 8084AC6C 00052C03 */ sra $a1, $a1, 16
/* 18A60 8084AC70 3C088086 */ lui $t0, %hi(sControlInput) ## $t0 = 80860000
/* 18A64 8084AC74 8D088AB4 */ lw $t0, %lo(sControlInput)($t0)
/* 18A68 8084AC78 3C01C180 */ lui $at, 0xC180 ## $at = C1800000
/* 18A6C 8084AC7C 44813000 */ mtc1 $at, $f6 ## $f6 = -16.00
/* 18A70 8084AC80 81090014 */ lb $t1, 0x0014($t0) ## 80860014
/* 18A74 8084AC84 44899000 */ mtc1 $t1, $f18 ## $f18 = 0.00
/* 18A78 8084AC88 00000000 */ nop
/* 18A7C 8084AC8C 46809120 */ cvt.s.w $f4, $f18
/* 18A80 8084AC90 46062202 */ mul.s $f8, $f4, $f6
/* 18A84 8084AC94 4600428D */ trunc.w.s $f10, $f8
/* 18A88 8084AC98 44105000 */ mfc1 $s0, $f10
/* 18A8C 8084AC9C 00000000 */ nop
/* 18A90 8084ACA0 00108400 */ sll $s0, $s0, 16
/* 18A94 8084ACA4 00108403 */ sra $s0, $s0, 16
/* 18A98 8084ACA8 2A01F448 */ slti $at, $s0, 0xF448
/* 18A9C 8084ACAC 50200004 */ beql $at, $zero, .L8084ACC0
/* 18AA0 8084ACB0 2A010BB9 */ slti $at, $s0, 0x0BB9
/* 18AA4 8084ACB4 10000008 */ beq $zero, $zero, .L8084ACD8
/* 18AA8 8084ACB8 2410F448 */ addiu $s0, $zero, 0xF448 ## $s0 = FFFFF448
/* 18AAC 8084ACBC 2A010BB9 */ slti $at, $s0, 0x0BB9
.L8084ACC0:
/* 18AB0 8084ACC0 14200003 */ bne $at, $zero, .L8084ACD0
/* 18AB4 8084ACC4 02002825 */ or $a1, $s0, $zero ## $a1 = FFFFF448
/* 18AB8 8084ACC8 10000001 */ beq $zero, $zero, .L8084ACD0
/* 18ABC 8084ACCC 24050BB8 */ addiu $a1, $zero, 0x0BB8 ## $a1 = 00000BB8
.L8084ACD0:
/* 18AC0 8084ACD0 00058400 */ sll $s0, $a1, 16
/* 18AC4 8084ACD4 00108403 */ sra $s0, $s0, 16
.L8084ACD8:
/* 18AC8 8084ACD8 862B0046 */ lh $t3, 0x0046($s1) ## 00000046
/* 18ACC 8084ACDC 01706021 */ addu $t4, $t3, $s0
/* 18AD0 8084ACE0 10000065 */ beq $zero, $zero, .L8084AE78
/* 18AD4 8084ACE4 A62C0046 */ sh $t4, 0x0046($s1) ## 00000046
.L8084ACE8:
/* 18AD8 8084ACE8 8E2D067C */ lw $t5, 0x067C($s1) ## 0000067C
.L8084ACEC:
/* 18ADC 8084ACEC 241036B0 */ addiu $s0, $zero, 0x36B0 ## $s0 = 000036B0
/* 18AE0 8084ACF0 3C0F8086 */ lui $t7, %hi(sControlInput) ## $t7 = 80860000
/* 18AE4 8084ACF4 000D7200 */ sll $t6, $t5, 8
/* 18AE8 8084ACF8 05C10003 */ bgez $t6, .L8084AD08
/* 18AEC 8084ACFC 2405FFFF */ addiu $a1, $zero, 0xFFFF ## $a1 = FFFFFFFF
/* 18AF0 8084AD00 10000001 */ beq $zero, $zero, .L8084AD08
/* 18AF4 8084AD04 24100DAC */ addiu $s0, $zero, 0x0DAC ## $s0 = 00000DAC
.L8084AD08:
/* 18AF8 8084AD08 8DEF8AB4 */ lw $t7, %lo(sControlInput)($t7)
/* 18AFC 8084AD0C 81E20015 */ lb $v0, 0x0015($t7) ## 80860015
/* 18B00 8084AD10 04400003 */ bltz $v0, .L8084AD20
/* 18B04 8084AD14 00022080 */ sll $a0, $v0, 2
/* 18B08 8084AD18 10000001 */ beq $zero, $zero, .L8084AD20
/* 18B0C 8084AD1C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
.L8084AD20:
/* 18B10 8084AD20 00822023 */ subu $a0, $a0, $v0
/* 18B14 8084AD24 000420C0 */ sll $a0, $a0, 3
/* 18B18 8084AD28 00822021 */ addu $a0, $a0, $v0
/* 18B1C 8084AD2C 000420C0 */ sll $a0, $a0, 3
/* 18B20 8084AD30 00042400 */ sll $a0, $a0, 16
/* 18B24 8084AD34 00042403 */ sra $a0, $a0, 16
/* 18B28 8084AD38 0C01DE0D */ jal Math_Coss
## coss?
/* 18B2C 8084AD3C AFA5002C */ sw $a1, 0x002C($sp)
/* 18B30 8084AD40 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 18B34 8084AD44 44818000 */ mtc1 $at, $f16 ## $f16 = 1.00
/* 18B38 8084AD48 3C018085 */ lui $at, %hi(D_808554F4) ## $at = 80850000
/* 18B3C 8084AD4C C42454F4 */ lwc1 $f4, %lo(D_808554F4)($at)
/* 18B40 8084AD50 46008481 */ sub.s $f18, $f16, $f0
/* 18B44 8084AD54 8FA5002C */ lw $a1, 0x002C($sp)
/* 18B48 8084AD58 862B0044 */ lh $t3, 0x0044($s1) ## 00000044
/* 18B4C 8084AD5C 00101823 */ subu $v1, $zero, $s0
/* 18B50 8084AD60 46049182 */ mul.s $f6, $f18, $f4
/* 18B54 8084AD64 3C0F8086 */ lui $t7, %hi(sControlInput) ## $t7 = 80860000
/* 18B58 8084AD68 4600320D */ trunc.w.s $f8, $f6
/* 18B5C 8084AD6C 44194000 */ mfc1 $t9, $f8
/* 18B60 8084AD70 00000000 */ nop
/* 18B64 8084AD74 03250019 */ multu $t9, $a1
/* 18B68 8084AD78 00005012 */ mflo $t2
/* 18B6C 8084AD7C 016A6021 */ addu $t4, $t3, $t2
/* 18B70 8084AD80 A62C0044 */ sh $t4, 0x0044($s1) ## 00000044
/* 18B74 8084AD84 86220044 */ lh $v0, 0x0044($s1) ## 00000044
/* 18B78 8084AD88 0043082A */ slt $at, $v0, $v1
/* 18B7C 8084AD8C 50200004 */ beql $at, $zero, .L8084ADA0
/* 18B80 8084AD90 0202082A */ slt $at, $s0, $v0
/* 18B84 8084AD94 10000007 */ beq $zero, $zero, .L8084ADB4
/* 18B88 8084AD98 A6230044 */ sh $v1, 0x0044($s1) ## 00000044
/* 18B8C 8084AD9C 0202082A */ slt $at, $s0, $v0
.L8084ADA0:
/* 18B90 8084ADA0 10200003 */ beq $at, $zero, .L8084ADB0
/* 18B94 8084ADA4 00402825 */ or $a1, $v0, $zero ## $a1 = 00000000
/* 18B98 8084ADA8 10000001 */ beq $zero, $zero, .L8084ADB0
/* 18B9C 8084ADAC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000DAC
.L8084ADB0:
/* 18BA0 8084ADB0 A6250044 */ sh $a1, 0x0044($s1) ## 00000044
.L8084ADB4:
/* 18BA4 8084ADB4 8DEF8AB4 */ lw $t7, %lo(sControlInput)($t7)
/* 18BA8 8084ADB8 862D0046 */ lh $t5, 0x0046($s1) ## 00000046
/* 18BAC 8084ADBC 862E00B6 */ lh $t6, 0x00B6($s1) ## 000000B6
/* 18BB0 8084ADC0 81E20014 */ lb $v0, 0x0014($t7) ## 80860014
/* 18BB4 8084ADC4 2405FFFF */ addiu $a1, $zero, 0xFFFF ## $a1 = FFFFFFFF
/* 18BB8 8084ADC8 01AE8023 */ subu $s0, $t5, $t6
/* 18BBC 8084ADCC 00108400 */ sll $s0, $s0, 16
/* 18BC0 8084ADD0 04400003 */ bltz $v0, .L8084ADE0
/* 18BC4 8084ADD4 00108403 */ sra $s0, $s0, 16
/* 18BC8 8084ADD8 10000001 */ beq $zero, $zero, .L8084ADE0
/* 18BCC 8084ADDC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
.L8084ADE0:
/* 18BD0 8084ADE0 00022080 */ sll $a0, $v0, 2
/* 18BD4 8084ADE4 00822023 */ subu $a0, $a0, $v0
/* 18BD8 8084ADE8 000420C0 */ sll $a0, $a0, 3
/* 18BDC 8084ADEC 00822021 */ addu $a0, $a0, $v0
/* 18BE0 8084ADF0 000420C0 */ sll $a0, $a0, 3
/* 18BE4 8084ADF4 00042400 */ sll $a0, $a0, 16
/* 18BE8 8084ADF8 00042403 */ sra $a0, $a0, 16
/* 18BEC 8084ADFC 0C01DE0D */ jal Math_Coss
## coss?
/* 18BF0 8084AE00 AFA5002C */ sw $a1, 0x002C($sp)
/* 18BF4 8084AE04 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 18BF8 8084AE08 44815000 */ mtc1 $at, $f10 ## $f10 = 1.00
/* 18BFC 8084AE0C 3C018085 */ lui $at, %hi(D_808554F8) ## $at = 80850000
/* 18C00 8084AE10 C43254F8 */ lwc1 $f18, %lo(D_808554F8)($at)
/* 18C04 8084AE14 46005401 */ sub.s $f16, $f10, $f0
/* 18C08 8084AE18 8FA5002C */ lw $a1, 0x002C($sp)
/* 18C0C 8084AE1C 46128102 */ mul.s $f4, $f16, $f18
/* 18C10 8084AE20 4600218D */ trunc.w.s $f6, $f4
/* 18C14 8084AE24 44193000 */ mfc1 $t9, $f6
/* 18C18 8084AE28 00000000 */ nop
/* 18C1C 8084AE2C 03250019 */ multu $t9, $a1
/* 18C20 8084AE30 00005812 */ mflo $t3
/* 18C24 8084AE34 020B8021 */ addu $s0, $s0, $t3
/* 18C28 8084AE38 00108400 */ sll $s0, $s0, 16
/* 18C2C 8084AE3C 00108403 */ sra $s0, $s0, 16
/* 18C30 8084AE40 2A01B556 */ slti $at, $s0, 0xB556
/* 18C34 8084AE44 50200004 */ beql $at, $zero, .L8084AE58
/* 18C38 8084AE48 2A014AAB */ slti $at, $s0, 0x4AAB
/* 18C3C 8084AE4C 10000007 */ beq $zero, $zero, .L8084AE6C
/* 18C40 8084AE50 2405B556 */ addiu $a1, $zero, 0xB556 ## $a1 = FFFFB556
/* 18C44 8084AE54 2A014AAB */ slti $at, $s0, 0x4AAB
.L8084AE58:
/* 18C48 8084AE58 14200003 */ bne $at, $zero, .L8084AE68
/* 18C4C 8084AE5C 02001025 */ or $v0, $s0, $zero ## $v0 = 00000DAC
/* 18C50 8084AE60 10000001 */ beq $zero, $zero, .L8084AE68
/* 18C54 8084AE64 24024AAA */ addiu $v0, $zero, 0x4AAA ## $v0 = 00004AAA
.L8084AE68:
/* 18C58 8084AE68 00402825 */ or $a1, $v0, $zero ## $a1 = 00004AAA
.L8084AE6C:
/* 18C5C 8084AE6C 862A00B6 */ lh $t2, 0x00B6($s1) ## 000000B6
/* 18C60 8084AE70 00AA6021 */ addu $t4, $a1, $t2
/* 18C64 8084AE74 A62C0046 */ sh $t4, 0x0046($s1) ## 00000046
.L8084AE78:
/* 18C68 8084AE78 962D06AE */ lhu $t5, 0x06AE($s1) ## 000006AE
/* 18C6C 8084AE7C 3C050001 */ lui $a1, 0x0001 ## $a1 = 00010000
/* 18C70 8084AE80 35AE0002 */ ori $t6, $t5, 0x0002 ## $t6 = 00000002
/* 18C74 8084AE84 A62E06AE */ sh $t6, 0x06AE($s1) ## 000006AE
/* 18C78 8084AE88 8FAF0038 */ lw $t7, 0x0038($sp)
/* 18C7C 8084AE8C 00AF2821 */ addu $a1, $a1, $t7
/* 18C80 8084AE90 80A51E5C */ lb $a1, 0x1E5C($a1) ## 00011E5C
/* 18C84 8084AE94 0005282B */ sltu $a1, $zero, $a1
/* 18C88 8084AE98 14A00009 */ bne $a1, $zero, .L8084AEC0
/* 18C8C 8084AE9C 00000000 */ nop
/* 18C90 8084AEA0 0C00B75E */ jal func_8002DD78
/* 18C94 8084AEA4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 18C98 8084AEA8 0002282B */ sltu $a1, $zero, $v0
/* 18C9C 8084AEAC 14A00004 */ bne $a1, $zero, .L8084AEC0
/* 18CA0 8084AEB0 00000000 */ nop
/* 18CA4 8084AEB4 0C20CD2D */ jal func_808334B4
/* 18CA8 8084AEB8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 18CAC 8084AEBC 0002282B */ sltu $a1, $zero, $v0
.L8084AEC0:
/* 18CB0 8084AEC0 0C20DAAE */ jal func_80836AB8
/* 18CB4 8084AEC4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 18CB8 8084AEC8 87B80046 */ lh $t8, 0x0046($sp)
/* 18CBC 8084AECC 8FBF0024 */ lw $ra, 0x0024($sp)
/* 18CC0 8084AED0 8FB0001C */ lw $s0, 0x001C($sp)
/* 18CC4 8084AED4 00581023 */ subu $v0, $v0, $t8
/* 18CC8 8084AED8 00021400 */ sll $v0, $v0, 16
/* 18CCC 8084AEDC 8FB10020 */ lw $s1, 0x0020($sp)
/* 18CD0 8084AEE0 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000
/* 18CD4 8084AEE4 03E00008 */ jr $ra
/* 18CD8 8084AEE8 00021403 */ sra $v0, $v0, 16

View file

@ -914,7 +914,7 @@ typedef struct GlobalContext {
/* 0x11D30 */ s16 unk_11D30[2];
/* 0x11D34 */ u8 nbTransitionActors;
/* 0x11D38 */ TransitionActorEntry* transitionActorList;
/* 0x11D3C */ void (*playerInit)(Player* player, struct GlobalContext* globalCtx, SkeletonHeader* skelHeader);
/* 0x11D3C */ void (*playerInit)(Player* player, struct GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader);
/* 0x11D40 */ void (*playerUpdate)(Player* player, struct GlobalContext* globalCtx, Input* input);
/* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct GlobalContext* globalCtx);
/* 0x11D48 */ s32 (*startPlayerFishing)(struct GlobalContext* globalCtx);

View file

@ -106,6 +106,14 @@ typedef struct {
};
} struct_80854B18; // size = 0x08
typedef struct {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ s16 unk_08;
} struct_80858AC8; // size = 0x0A
void func_80833770(GlobalContext* globalCtx, Player* this);
void func_80833790(GlobalContext* globalCtx, Player* this);
void func_8083379C(GlobalContext* globalCtx, Player* this);
@ -789,11 +797,11 @@ LinkAnimationHeader* D_80853D4C[][3] = {
{ 0x04002988, 0x04002998, 0x04002990 },
};
LinkAnimationHeader* D_80853D7C[] = {
0x04003248, 0x04003200, 0x04003258, 0x04003210, 0x04003250, 0x04003208, 0x04003250,
0x04003208, 0x04003430, 0x040033F0, 0x04003430, 0x040033F0, 0x04003430, 0x040033F0,
0x040033F8, 0x040033D0, 0x04003400, 0x040033D8, 0x04003420, 0x04003420, 0x04003408,
0x040033E0, 0x04003410, 0x040033E8, 0x04003418, 0x04003418, 0x04003428, 0x04003428,
LinkAnimationHeader* D_80853D7C[][2] = {
{ 0x04003248, 0x04003200 }, { 0x04003258, 0x04003210 }, { 0x04003250, 0x04003208 }, { 0x04003250, 0x04003208 },
{ 0x04003430, 0x040033F0 }, { 0x04003430, 0x040033F0 }, { 0x04003430, 0x040033F0 }, { 0x040033F8, 0x040033D0 },
{ 0x04003400, 0x040033D8 }, { 0x04003420, 0x04003420 }, { 0x04003408, 0x040033E0 }, { 0x04003410, 0x040033E8 },
{ 0x04003418, 0x04003418 }, { 0x04003428, 0x04003428 },
};
struct_80832924 D_80853DEC[] = {
@ -1629,7 +1637,7 @@ s32 func_80833350(Player* this) {
s32 i;
if (func_80833338(this) != this->skelAnime.animation) {
for (i = 0, entry = &D_80853D7C[0]; i < 28; i++, entry++) {
for (i = 0, entry = &D_80853D7C[0][0]; i < 28; i++, entry++) {
if (this->skelAnime.animation == *entry) {
return i + 1;
}
@ -1971,8 +1979,6 @@ void func_80833DF8(Player* this, GlobalContext* globalCtx) {
}
}
#ifdef NON_MATCHING
// ordering and deduplication differences
void func_808340DC(Player* this, GlobalContext* globalCtx) {
LinkAnimationHeader* anim;
f32 phi_f2;
@ -2002,15 +2008,15 @@ void func_808340DC(Player* this, GlobalContext* globalCtx) {
}
phi_f2 = SkelAnime_GetFrameCount(anim);
phi_f14 = phi_f2;
if (sp38 >= 0) {
phi_f12 = 0.0f;
phi_f14 = phi_f2;
phi_f0 = 1.2f;
phi_f12 = 0.0f;
} else {
phi_f12 = phi_f2;
phi_f14 = 0.0f;
phi_f0 = -1.2f;
phi_f12 = phi_f2;
}
if (sp37 != PLAYER_AP_NONE) {
@ -2021,9 +2027,6 @@ void func_808340DC(Player* this, GlobalContext* globalCtx) {
this->stateFlags1 &= ~0x100;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_player_actor/func_808340DC.s")
#endif
void func_80834298(Player* this, GlobalContext* globalCtx) {
if ((this->actor.type == ACTORTYPE_PLAYER) && !(this->stateFlags1 & 0x100) &&
@ -6069,14 +6072,12 @@ s32 func_8083EC18(Player* this, GlobalContext* globalCtx, u32 arg2) {
if ((sp8C != 0) || (arg2 & 2) ||
func_80041E4C(&globalCtx->colCtx, this->actor.wallPoly, this->actor.wallPolySource)) {
s32 i;
f32 phi_f20;
CollisionPoly* sp84 = this->actor.wallPoly;
f32 sp80;
f32 sp7C;
f32 phi_f12;
f32 phi_f14;
Vec3f sp50[3];
f32 phi_f20;
phi_f20 = phi_f12 = 0.0f;
@ -6084,6 +6085,8 @@ s32 func_8083EC18(Player* this, GlobalContext* globalCtx, u32 arg2) {
sp80 = this->actor.posRot.pos.x;
sp7C = this->actor.posRot.pos.z;
} else {
Vec3f sp50[3];
s32 i;
f32 sp48;
Vec3f* sp44 = &sp50[0];
s32 pad;
@ -6179,8 +6182,6 @@ void func_8083F070(Player* this, LinkAnimationHeader* anim, GlobalContext* globa
SkelAnime_ChangeLinkAnimPlaybackStop(globalCtx, &this->skelAnime, anim, (4.0f / 3.0f));
}
#ifdef NON_MATCHING
// single regalloc difference
s32 func_8083F0C8(Player* this, GlobalContext* globalCtx, u32 arg2) {
CollisionPoly* wallPoly;
Vec3f sp50[3];
@ -6192,7 +6193,7 @@ s32 func_8083F0C8(Player* this, GlobalContext* globalCtx, u32 arg2) {
if (LINK_IS_CHILD && !(this->stateFlags1 & 0x8000000) && (arg2 & 0x30)) {
wallPoly = this->actor.wallPoly;
func_80038C78(wallPoly, this->actor.wallPolySource, &globalCtx->colCtx, &sp50);
func_80038C78(wallPoly, this->actor.wallPolySource, &globalCtx->colCtx, sp50);
sp4C = phi_f2 = sp50[0].x;
sp44 = phi_f12 = sp50[0].z;
@ -6213,9 +6214,10 @@ s32 func_8083F0C8(Player* this, GlobalContext* globalCtx, u32 arg2) {
sp4C = (sp4C + phi_f2) * 0.5f;
sp44 = (sp44 + phi_f12) * 0.5f;
if (fabsf(((this->actor.posRot.pos.x - sp4C) * (wallPoly->norm.z * (1.0f / 32767.0f))) -
((this->actor.posRot.pos.z - sp44) * (wallPoly->norm.x * (1.0f / 32767.0f)))) < 8.0f) {
phi_f2 = ((this->actor.posRot.pos.x - sp4C) * (wallPoly->norm.z * (1.0f / 32767.0f))) -
((this->actor.posRot.pos.z - sp44) * (wallPoly->norm.x * (1.0f / 32767.0f)));
if (fabsf(phi_f2) < 8.0f) {
this->stateFlags2 |= 0x10000;
if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) {
@ -6240,9 +6242,6 @@ s32 func_8083F0C8(Player* this, GlobalContext* globalCtx, u32 arg2) {
return 0;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_player_actor/func_8083F0C8.s")
#endif
s32 func_8083F360(GlobalContext* globalCtx, Player* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
CollisionPoly* wallPoly;
@ -6745,8 +6744,6 @@ void func_808407CC(Player* this, GlobalContext* globalCtx) {
}
}
#ifdef NON_MATCHING
// regalloc differences
void func_808409CC(GlobalContext* globalCtx, Player* this) {
LinkAnimationHeader* anim;
LinkAnimationHeader** animPtr;
@ -6783,9 +6780,9 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) {
}
}
}
animPtr = &D_80853D7C[sp38 * 2];
animPtr = &D_80853D7C[sp38][0];
if (this->modelAnimType != 1) {
animPtr++;
animPtr = &D_80853D7C[sp38][1];
}
anim = *animPtr;
}
@ -6794,9 +6791,6 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) {
SkelAnime_ChangeLinkAnim(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f) * D_808535E8, 0.0f,
SkelAnime_GetFrameCount(anim), 2, -6.0f);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_player_actor/func_808409CC.s")
#endif
void func_80840BC8(Player* this, GlobalContext* globalCtx) {
s32 sp44;
@ -8568,8 +8562,6 @@ void func_808458D0(Player* this, GlobalContext* globalCtx) {
}
}
#ifdef NON_MATCHING
// single regalloc difference
s32 func_80845964(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2, f32 arg3, s16 arg4, s32 arg5) {
if ((arg5 != 0) && (this->linearVelocity == 0.0f)) {
return func_800A3BC0(globalCtx, &this->skelAnime);
@ -8582,7 +8574,7 @@ s32 func_80845964(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2
f32 sp28 = sqrtf(SQ(selfDistX) + SQ(selfDistZ)) / sp34;
s32 sp24 = (arg2->endFrame - globalCtx->csCtx.frames) + 1;
arg4 = atan2s(selfDistX, selfDistZ);
arg4 = atan2s(selfDistZ, selfDistX);
if (arg5 == 1) {
f32 distX = arg2->endPos.x - arg2->startPos.x;
@ -8610,10 +8602,6 @@ s32 func_80845964(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2
return 0;
}
#else
s32 func_80845964(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2, f32 arg3, s16 arg4, s32 arg5);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_player_actor/func_80845964.s")
#endif
s32 func_80845BA0(GlobalContext* arg0, Player* arg1, f32* arg2, s32 arg3) {
f32 dx = arg1->unk_450.x - arg1->actor.posRot.pos.x;
@ -9056,17 +9044,15 @@ void (*D_80854738[])(GlobalContext* globalCtx, Player* this) = {
Vec3f D_80854778 = { 0.0f, 50.0f, 0.0f };
#ifdef NON_MATCHING
// mostly regalloc differences
void Player_Init(Actor* thisx, GlobalContext* globalCtx) {
// single regalloc difference
void Player_Init(Actor* thisx, GlobalContext* globalCtx2) {
Player* this = THIS;
GlobalContext* globalCtx = globalCtx2;
Scene* scene = globalCtx->loadedScene;
s32 temp;
u8 temp2;
s32 initMode;
s32 pad;
s32 sp50;
s32 sp4C;
s32 initMode;
s16 params;
u16 entranceSound;
globalCtx->shootingGalleryStatus = globalCtx->bombchuBowlingStatus = 0;
@ -9080,7 +9066,7 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx) {
globalCtx->damagePlayer = Player_InflictDamage;
globalCtx->talkWithPlayer = func_80853148;
this->actor.room = -1;
thisx->room = -1;
this->ageProperties = &sAgeProperties[gSaveContext.linkAge];
this->itemActionParam = this->heldItemActionParam = -1;
this->heldItemId = ITEM_NONE;
@ -9088,30 +9074,29 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx) {
func_80835F44(globalCtx, this, ITEM_NONE);
Player_SetEquipmentData(globalCtx, this);
this->prevBoots = this->currentBoots;
Player_InitCommon(this, globalCtx, gPlayerSkelHeaders[(void)0, gSaveContext.linkAge]);
Player_InitCommon(this, globalCtx, gPlayerSkelHeaders[((void)0, gSaveContext.linkAge)]);
this->giObjectSegment = (void*)(((u32)ZeldaArena_MallocDebug(0x3008, "../z_player.c", 17175) + 8) & ~0xF);
sp50 = gSaveContext.respawnFlag;
if (sp50 != 0) {
if (sp50 == -3) {
this->actor.params = gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams;
thisx->params = gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams;
} else {
if ((sp50 == 1) || (sp50 == -1)) {
this->unk_A86 = -2;
}
temp = sp50 - 1;
if (sp50 < 0) {
sp4C = 0;
} else {
sp4C = temp;
Math_Vec3f_Copy(&this->actor.posRot.pos, &gSaveContext.respawn[sp50 - 1].pos);
Math_Vec3f_Copy(&this->actor.initPosRot.pos, &this->actor.posRot.pos);
Math_Vec3f_Copy(&this->actor.pos4, &this->actor.posRot.pos);
this->fallStartHeight = this->actor.posRot.pos.y;
this->currentYaw = this->actor.shape.rot.y = gSaveContext.respawn[temp].yaw;
this->actor.params = gSaveContext.respawn[temp].playerParams;
sp4C = sp50 - 1;
Math_Vec3f_Copy(&thisx->posRot.pos, &gSaveContext.respawn[sp50 - 1].pos);
Math_Vec3f_Copy(&thisx->initPosRot.pos, &thisx->posRot.pos);
Math_Vec3f_Copy(&thisx->pos4, &thisx->posRot.pos);
this->fallStartHeight = thisx->posRot.pos.y;
this->currentYaw = thisx->shape.rot.y = gSaveContext.respawn[sp4C].yaw;
thisx->params = gSaveContext.respawn[sp4C].playerParams;
}
globalCtx->actorCtx.flags.tempSwch = gSaveContext.respawn[sp4C].tempSwchFlags & 0xFFFFFF;
@ -9120,26 +9105,20 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if ((sp50 == 0) || (sp50 < -1)) {
if ((scene->titleFile.vromStart != scene->titleFile.vromEnd) && (gSaveContext.showTitleCard) &&
(gSaveContext.sceneSetupIndex < 4) &&
(gEntranceTable[gSaveContext.entranceIndex + gSaveContext.sceneSetupIndex].field & 0x4000) &&
((globalCtx->sceneNum != SCENE_DDAN) || (gSaveContext.eventChkInf[11] & 1)) &&
((globalCtx->sceneNum != SCENE_NIGHT_SHOP) || (gSaveContext.eventChkInf[2] & 0x20))) {
TitleCard_InitPlaceName(globalCtx, &globalCtx->actorCtx.titleCtx, this->giObjectSegment, 0xA0, 0x78, 0x90,
0x18, 0x14);
if ((scene->titleFile.vromStart != scene->titleFile.vromEnd) && gSaveContext.showTitleCard) {
if ((gSaveContext.sceneSetupIndex < 4) &&
(gEntranceTable[(0, gSaveContext.entranceIndex) + (0, gSaveContext.sceneSetupIndex)].field & 0x4000) &&
((globalCtx->sceneNum != SCENE_DDAN) || (gSaveContext.eventChkInf[11] & 1)) &&
((globalCtx->sceneNum != SCENE_NIGHT_SHOP) || (gSaveContext.eventChkInf[2] & 0x20))) {
TitleCard_InitPlaceName(globalCtx, &globalCtx->actorCtx.titleCtx, this->giObjectSegment, 0xA0, 0x78,
0x90, 0x18, 0x14);
}
}
gSaveContext.showTitleCard = true;
}
if (sp50 == 2) {
temp2 = 1;
} else {
temp2 = 0;
}
if (func_80845C68(globalCtx, temp2) == 0) {
params = this->actor.params;
gSaveContext.respawn[RESPAWN_MODE_DOWN].playerParams = (params & 0xFF) | 0xD00;
if (func_80845C68(globalCtx, (sp50 == 2) ? 1 : 0) == 0) {
gSaveContext.respawn[RESPAWN_MODE_DOWN].playerParams = (thisx->params & 0xFF) | 0xD00;
}
gSaveContext.respawn[RESPAWN_MODE_DOWN].data = 1;
@ -9148,7 +9127,7 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx) {
gSaveContext.infTable[26] |= gBitFlags[globalCtx->sceneNum];
}
initMode = (this->actor.params & 0xF00) >> 8;
initMode = (thisx->params & 0xF00) >> 8;
if ((initMode == 5) || (initMode == 6)) {
if (gSaveContext.cutsceneIndex >= 0xFFF0) {
initMode = 13;
@ -9159,7 +9138,7 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx) {
if (initMode != 0) {
if ((gSaveContext.gameMode == 0) || (gSaveContext.gameMode == 3)) {
this->naviActor = Player_SpawnFairy(globalCtx, this, &this->actor.posRot.pos, &D_80854778, FAIRY_NAVI);
this->naviActor = Player_SpawnFairy(globalCtx, this, &thisx->posRot.pos, &D_80854778, FAIRY_NAVI);
if (gSaveContext.dogParams != 0) {
gSaveContext.dogParams |= 0x8000;
}
@ -9173,8 +9152,7 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if (gSaveContext.entranceSound != 0) {
entranceSound = gSaveContext.entranceSound;
Audio_PlayActorSound2(&this->actor, entranceSound);
Audio_PlayActorSound2(&this->actor, (0, gSaveContext.entranceSound));
gSaveContext.entranceSound = 0;
}
@ -10331,7 +10309,7 @@ void Player_Update(Actor* thisx, GlobalContext* globalCtx) {
MREG(55) = this->actor.posRot.rot.y;
}
s16 D_80858AC8[5];
struct_80858AC8 D_80858AC8;
Vec3s D_80858AD8[25];
Gfx* D_80854844[PLAYER_MASK_MAX - 1] = {
@ -10361,15 +10339,15 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi
gSPSegment(POLY_OPA_DISP++, 0x0B, sp70);
sp68.x = D_80858AC8[1] + 0x3E2;
sp68.y = D_80858AC8[2] + 0xDBE;
sp68.z = D_80858AC8[0] - 0x348A;
sp68.x = D_80858AC8.unk_02 + 0x3E2;
sp68.y = D_80858AC8.unk_04 + 0xDBE;
sp68.z = D_80858AC8.unk_00 - 0x348A;
func_800D1694(97.0f, -1203.0f, -240.0f, &sp68);
Matrix_ToMtx(sp70++, "../z_player.c", 19273);
sp68.x = D_80858AC8[1] - 0x3E2;
sp68.y = -0xDBE - D_80858AC8[2];
sp68.z = D_80858AC8[0] - 0x348A;
sp68.x = D_80858AC8.unk_02 - 0x3E2;
sp68.y = -0xDBE - D_80858AC8.unk_04;
sp68.z = D_80858AC8.unk_00 - 0x348A;
func_800D1694(97.0f, -1203.0f, 240.0f, &sp68);
Matrix_ToMtx(sp70, "../z_player.c", 19279);
}
@ -10527,11 +10505,10 @@ void Player_Destroy(Actor* thisx, GlobalContext* globalCtx) {
gSaveContext.linkAge = globalCtx->linkAgeOnLoad;
}
#ifdef NON_MATCHING
// regalloc differences
s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
s32 temp1;
s16 temp2;
s16 temp3;
if (!func_8002DD78(this) && !func_808334B4(this) && (arg2 == 0)) {
temp2 = sControlInput->rel.stick_y * 240.0f;
@ -10542,14 +10519,16 @@ s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
this->actor.posRot2.rot.y += temp2;
} else {
temp1 = (this->stateFlags1 & 0x800000) ? 3500 : 14000;
this->actor.posRot2.rot.x += (s32)((1.0f - Math_Coss(sControlInput->rel.stick_y * 200)) * 1500.0f) *
((sControlInput->rel.stick_y >= 0) ? 1 : -1);
temp3 = ((sControlInput->rel.stick_y >= 0) ? 1 : -1) *
(s32)((1.0f - Math_Coss(sControlInput->rel.stick_y * 200)) * 1500.0f);
this->actor.posRot2.rot.x += temp3;
this->actor.posRot2.rot.x = CLAMP(this->actor.posRot2.rot.x, -temp1, temp1);
temp1 = 19114;
temp2 = this->actor.posRot2.rot.y - this->actor.shape.rot.y;
temp2 += (s32)((1.0f - Math_Coss(sControlInput->rel.stick_x * 200)) * -1500.0f) *
((sControlInput->rel.stick_x >= 0) ? 1 : -1);
temp3 = ((sControlInput->rel.stick_x >= 0) ? 1 : -1) *
(s32)((1.0f - Math_Coss(sControlInput->rel.stick_x * 200)) * -1500.0f);
temp2 += temp3;
this->actor.posRot2.rot.y = CLAMP(temp2, -temp1, temp1) + this->actor.shape.rot.y;
}
@ -10557,10 +10536,6 @@ s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
return func_80836AB8(this, (globalCtx->shootingGalleryStatus != 0) || func_8002DD78(this) || func_808334B4(this)) -
arg3;
}
#else
s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_player_actor/func_8084ABD8.s")
#endif
void func_8084AEEC(Player* this, f32* arg1, f32 arg2, s16 arg3) {
f32 temp1;
@ -12614,45 +12589,45 @@ void func_8084FF7C(Player* this) {
}
#ifdef NON_MATCHING
// minor ordering and regalloc differences
// regalloc differences
void func_8085002C(Player* this) {
s32 pad;
s16 sp2A;
s16 sp28;
s16 sp26;
D_80858AC8[3] -= D_80858AC8[3] >> 3;
D_80858AC8[4] -= D_80858AC8[4] >> 3;
D_80858AC8[3] += -D_80858AC8[0] >> 2;
D_80858AC8[4] += -D_80858AC8[1] >> 2;
D_80858AC8.unk_06 -= D_80858AC8.unk_06 >> 3;
D_80858AC8.unk_08 -= D_80858AC8.unk_08 >> 3;
D_80858AC8.unk_06 += -D_80858AC8.unk_00 >> 2;
D_80858AC8.unk_08 += -D_80858AC8.unk_02 >> 2;
sp26 = this->actor.posRot.rot.y - this->actor.shape.rot.y;
sp28 = this->actor.speedXZ * -200.0f * Math_Coss(sp26) * (Math_Rand_CenteredFloat(2.0f) + 10.0f);
sp2A = this->actor.speedXZ * 100.0f * Math_Sins(sp26) * (Math_Rand_CenteredFloat(2.0f) + 10.0f);
D_80858AC8[3] += sp28 >> 2;
D_80858AC8[4] += sp2A >> 2;
D_80858AC8.unk_06 += sp28 >> 2;
D_80858AC8.unk_08 += sp2A >> 2;
if (D_80858AC8[3] > 6000) {
D_80858AC8[3] = 6000;
} else if (D_80858AC8[3] < -6000) {
D_80858AC8[3] = -6000;
if (D_80858AC8.unk_06 > 6000) {
D_80858AC8.unk_06 = 6000;
} else if (D_80858AC8.unk_06 < -6000) {
D_80858AC8.unk_06 = -6000;
}
if (D_80858AC8[4] > 6000) {
D_80858AC8[4] = 6000;
} else if (D_80858AC8[4] < -6000) {
D_80858AC8[4] = -6000;
if (D_80858AC8.unk_08 > 6000) {
D_80858AC8.unk_08 = 6000;
} else if (D_80858AC8.unk_08 < -6000) {
D_80858AC8.unk_08 = -6000;
}
D_80858AC8[0] += D_80858AC8[3];
D_80858AC8[1] += D_80858AC8[4];
D_80858AC8.unk_00 += D_80858AC8.unk_06;
D_80858AC8.unk_02 += D_80858AC8.unk_08;
if (D_80858AC8[0] < 0) {
D_80858AC8[2] = D_80858AC8[0] >> 1;
if (D_80858AC8.unk_00 < 0) {
D_80858AC8.unk_04 = D_80858AC8.unk_00 >> 1;
} else {
D_80858AC8[2] = 0;
D_80858AC8.unk_04 = 0;
}
}
#else