Skip to content

Commit

Permalink
Match ft_80081A00
Browse files Browse the repository at this point in the history
  • Loading branch information
freyja-lynx-dev authored and ribbanya committed Oct 12, 2024
1 parent 63f9e40 commit 170c447
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 144 deletions.
283 changes: 144 additions & 139 deletions asm/melee/ft/ft_0819.s
Original file line number Diff line number Diff line change
@@ -1,162 +1,167 @@
.include "macros.inc"
.file "ft_0819.c"

# 0x00000000 - 0x00000200
# 0x80081938..0x80081B38 | size: 0x200
.text
.balign 4

# .text:0x0 | 0x80081938 | size: 0x70
.fn ft_80081938, global
/* 00000000 00000040 94 21 FF 88 */ stwu r1, -0x78(r1)
/* 00000004 00000044 80 A3 00 2C */ lwz r5, 0x2c(r3)
/* 00000008 00000048 80 65 06 F4 */ lwz r3, 0x6f4(r5)
/* 0000000C 0000004C 80 05 06 F8 */ lwz r0, 0x6f8(r5)
/* 00000010 00000050 90 61 00 44 */ stw r3, 0x44(r1)
/* 00000014 00000054 90 01 00 48 */ stw r0, 0x48(r1)
/* 00000018 00000058 80 05 06 FC */ lwz r0, 0x6fc(r5)
/* 0000001C 0000005C 90 01 00 4C */ stw r0, 0x4c(r1)
/* 00000020 00000060 C0 25 07 AC */ lfs f1, 0x7ac(r5)
/* 00000024 00000064 C0 01 00 44 */ lfs f0, 0x44(r1)
/* 00000028 00000068 C0 45 07 A4 */ lfs f2, 0x7a4(r5)
/* 0000002C 0000006C EC 01 00 2A */ fadds f0, f1, f0
/* 00000030 00000070 D0 05 19 3C */ stfs f0, 0x193c(r5)
/* 00000034 00000074 C0 01 00 44 */ lfs f0, 0x44(r1)
/* 00000038 00000078 EC 02 00 2A */ fadds f0, f2, f0
/* 0000003C 0000007C D0 05 19 40 */ stfs f0, 0x1940(r5)
/* 00000040 00000080 C0 25 00 B4 */ lfs f1, 0xb4(r5)
/* 00000044 00000084 C0 05 02 8C */ lfs f0, 0x28c(r5)
/* 00000048 00000088 EC 01 00 2A */ fadds f0, f1, f0
/* 0000004C 0000008C D0 05 19 44 */ stfs f0, 0x1944(r5)
/* 00000050 00000090 80 65 19 3C */ lwz r3, 0x193c(r5)
/* 00000054 00000094 80 05 19 40 */ lwz r0, 0x1940(r5)
/* 00000058 00000098 90 65 19 30 */ stw r3, 0x1930(r5)
/* 0000005C 0000009C 90 05 19 34 */ stw r0, 0x1934(r5)
/* 00000060 000000A0 80 05 19 44 */ lwz r0, 0x1944(r5)
/* 00000064 000000A4 90 05 19 38 */ stw r0, 0x1938(r5)
/* 00000068 000000A8 38 21 00 78 */ addi r1, r1, 0x78
/* 0000006C 000000AC 4E 80 00 20 */ blr
/* 80081938 0007E518 94 21 FF 88 */ stwu r1, -0x78(r1)
/* 8008193C 0007E51C 80 A3 00 2C */ lwz r5, 0x2c(r3)
/* 80081940 0007E520 80 65 06 F4 */ lwz r3, 0x6f4(r5)
/* 80081944 0007E524 80 05 06 F8 */ lwz r0, 0x6f8(r5)
/* 80081948 0007E528 90 61 00 44 */ stw r3, 0x44(r1)
/* 8008194C 0007E52C 90 01 00 48 */ stw r0, 0x48(r1)
/* 80081950 0007E530 80 05 06 FC */ lwz r0, 0x6fc(r5)
/* 80081954 0007E534 90 01 00 4C */ stw r0, 0x4c(r1)
/* 80081958 0007E538 C0 25 07 AC */ lfs f1, 0x7ac(r5)
/* 8008195C 0007E53C C0 01 00 44 */ lfs f0, 0x44(r1)
/* 80081960 0007E540 C0 45 07 A4 */ lfs f2, 0x7a4(r5)
/* 80081964 0007E544 EC 01 00 2A */ fadds f0, f1, f0
/* 80081968 0007E548 D0 05 19 3C */ stfs f0, 0x193c(r5)
/* 8008196C 0007E54C C0 01 00 44 */ lfs f0, 0x44(r1)
/* 80081970 0007E550 EC 02 00 2A */ fadds f0, f2, f0
/* 80081974 0007E554 D0 05 19 40 */ stfs f0, 0x1940(r5)
/* 80081978 0007E558 C0 25 00 B4 */ lfs f1, 0xb4(r5)
/* 8008197C 0007E55C C0 05 02 8C */ lfs f0, 0x28c(r5)
/* 80081980 0007E560 EC 01 00 2A */ fadds f0, f1, f0
/* 80081984 0007E564 D0 05 19 44 */ stfs f0, 0x1944(r5)
/* 80081988 0007E568 80 65 19 3C */ lwz r3, 0x193c(r5)
/* 8008198C 0007E56C 80 05 19 40 */ lwz r0, 0x1940(r5)
/* 80081990 0007E570 90 65 19 30 */ stw r3, 0x1930(r5)
/* 80081994 0007E574 90 05 19 34 */ stw r0, 0x1934(r5)
/* 80081998 0007E578 80 05 19 44 */ lwz r0, 0x1944(r5)
/* 8008199C 0007E57C 90 05 19 38 */ stw r0, 0x1938(r5)
/* 800819A0 0007E580 38 21 00 78 */ addi r1, r1, 0x78
/* 800819A4 0007E584 4E 80 00 20 */ blr
.endfn ft_80081938

# .text:0x70 | 0x800819A8 | size: 0x58
.fn ft_800819A8, global
/* 00000070 000000B0 94 21 FF 88 */ stwu r1, -0x78(r1)
/* 00000074 000000B4 80 A3 00 2C */ lwz r5, 0x2c(r3)
/* 00000078 000000B8 80 65 06 F4 */ lwz r3, 0x6f4(r5)
/* 0000007C 000000BC 80 05 06 F8 */ lwz r0, 0x6f8(r5)
/* 00000080 000000C0 90 61 00 44 */ stw r3, 0x44(r1)
/* 00000084 000000C4 90 01 00 48 */ stw r0, 0x48(r1)
/* 00000088 000000C8 80 05 06 FC */ lwz r0, 0x6fc(r5)
/* 0000008C 000000CC 90 01 00 4C */ stw r0, 0x4c(r1)
/* 00000090 000000D0 C0 25 07 AC */ lfs f1, 0x7ac(r5)
/* 00000094 000000D4 C0 01 00 44 */ lfs f0, 0x44(r1)
/* 00000098 000000D8 C0 45 07 A4 */ lfs f2, 0x7a4(r5)
/* 0000009C 000000DC EC 01 00 2A */ fadds f0, f1, f0
/* 000000A0 000000E0 D0 05 19 30 */ stfs f0, 0x1930(r5)
/* 000000A4 000000E4 C0 01 00 44 */ lfs f0, 0x44(r1)
/* 000000A8 000000E8 EC 02 00 2A */ fadds f0, f2, f0
/* 000000AC 000000EC D0 05 19 34 */ stfs f0, 0x1934(r5)
/* 000000B0 000000F0 C0 25 00 B4 */ lfs f1, 0xb4(r5)
/* 000000B4 000000F4 C0 05 02 8C */ lfs f0, 0x28c(r5)
/* 000000B8 000000F8 EC 01 00 2A */ fadds f0, f1, f0
/* 000000BC 000000FC D0 05 19 38 */ stfs f0, 0x1938(r5)
/* 000000C0 00000100 38 21 00 78 */ addi r1, r1, 0x78
/* 000000C4 00000104 4E 80 00 20 */ blr
/* 800819A8 0007E588 94 21 FF 88 */ stwu r1, -0x78(r1)
/* 800819AC 0007E58C 80 A3 00 2C */ lwz r5, 0x2c(r3)
/* 800819B0 0007E590 80 65 06 F4 */ lwz r3, 0x6f4(r5)
/* 800819B4 0007E594 80 05 06 F8 */ lwz r0, 0x6f8(r5)
/* 800819B8 0007E598 90 61 00 44 */ stw r3, 0x44(r1)
/* 800819BC 0007E59C 90 01 00 48 */ stw r0, 0x48(r1)
/* 800819C0 0007E5A0 80 05 06 FC */ lwz r0, 0x6fc(r5)
/* 800819C4 0007E5A4 90 01 00 4C */ stw r0, 0x4c(r1)
/* 800819C8 0007E5A8 C0 25 07 AC */ lfs f1, 0x7ac(r5)
/* 800819CC 0007E5AC C0 01 00 44 */ lfs f0, 0x44(r1)
/* 800819D0 0007E5B0 C0 45 07 A4 */ lfs f2, 0x7a4(r5)
/* 800819D4 0007E5B4 EC 01 00 2A */ fadds f0, f1, f0
/* 800819D8 0007E5B8 D0 05 19 30 */ stfs f0, 0x1930(r5)
/* 800819DC 0007E5BC C0 01 00 44 */ lfs f0, 0x44(r1)
/* 800819E0 0007E5C0 EC 02 00 2A */ fadds f0, f2, f0
/* 800819E4 0007E5C4 D0 05 19 34 */ stfs f0, 0x1934(r5)
/* 800819E8 0007E5C8 C0 25 00 B4 */ lfs f1, 0xb4(r5)
/* 800819EC 0007E5CC C0 05 02 8C */ lfs f0, 0x28c(r5)
/* 800819F0 0007E5D0 EC 01 00 2A */ fadds f0, f1, f0
/* 800819F4 0007E5D4 D0 05 19 38 */ stfs f0, 0x1938(r5)
/* 800819F8 0007E5D8 38 21 00 78 */ addi r1, r1, 0x78
/* 800819FC 0007E5DC 4E 80 00 20 */ blr
.endfn ft_800819A8

# .text:0xC8 | 0x80081A00 | size: 0x138
.fn ft_80081A00, global
/* 000000C8 00000108 7C 08 02 A6 */ mflr r0
/* 000000CC 0000010C 90 01 00 04 */ stw r0, 0x4(r1)
/* 000000D0 00000110 94 21 FF 50 */ stwu r1, -0xb0(r1)
/* 000000D4 00000114 BF 61 00 9C */ stmw r27, 0x9c(r1)
/* 000000D8 00000118 7C 7E 1B 78 */ mr r30, r3
/* 000000DC 0000011C 83 E3 00 2C */ lwz r31, 0x2c(r3)
/* 000000E0 00000120 88 1F 22 19 */ lbz r0, 0x2219(r31)
/* 000000E4 00000124 54 00 D7 FF */ extrwi. r0, r0, 1, 25
/* 000000E8 00000128 40 82 01 00 */ bne .L_000001E8
/* 000000EC 0000012C 88 7F 22 23 */ lbz r3, 0x2223(r31)
/* 000000F0 00000130 54 60 EF FF */ extrwi. r0, r3, 1, 28
/* 000000F4 00000134 40 82 00 F4 */ bne .L_000001E8
/* 000000F8 00000138 38 00 00 01 */ li r0, 0x1
/* 000000FC 0000013C 50 03 17 7A */ rlwimi r3, r0, 2, 29, 29
/* 00000100 00000140 98 7F 22 23 */ stb r3, 0x2223(r31)
/* 00000104 00000144 80 7F 06 F4 */ lwz r3, 0x6f4(r31)
/* 00000108 00000148 80 1F 06 F8 */ lwz r0, 0x6f8(r31)
/* 0000010C 0000014C 90 61 00 64 */ stw r3, 0x64(r1)
/* 00000110 00000150 90 01 00 68 */ stw r0, 0x68(r1)
/* 00000114 00000154 80 1F 06 FC */ lwz r0, 0x6fc(r31)
/* 00000118 00000158 90 01 00 6C */ stw r0, 0x6c(r1)
/* 0000011C 0000015C C0 3F 07 AC */ lfs f1, 0x7ac(r31)
/* 00000120 00000160 C0 01 00 64 */ lfs f0, 0x64(r1)
/* 00000124 00000164 C0 5F 07 A4 */ lfs f2, 0x7a4(r31)
/* 00000128 00000168 EC 01 00 2A */ fadds f0, f1, f0
/* 0000012C 0000016C D0 1F 19 3C */ stfs f0, 0x193c(r31)
/* 00000130 00000170 C0 01 00 64 */ lfs f0, 0x64(r1)
/* 00000134 00000174 EC 02 00 2A */ fadds f0, f2, f0
/* 00000138 00000178 D0 1F 19 40 */ stfs f0, 0x1940(r31)
/* 0000013C 0000017C C0 3F 00 B4 */ lfs f1, 0xb4(r31)
/* 00000140 00000180 C0 1F 02 8C */ lfs f0, 0x28c(r31)
/* 00000144 00000184 EC 01 00 2A */ fadds f0, f1, f0
/* 00000148 00000188 D0 1F 19 44 */ stfs f0, 0x1944(r31)
/* 0000014C 0000018C 80 60 00 00 */ lwz r3, HSD_GObj_Entities@sda21(r0)
/* 00000150 00000190 83 7E 00 2C */ lwz r27, 0x2c(r30)
/* 00000154 00000194 83 83 00 24 */ lwz r28, 0x24(r3)
/* 00000158 00000198 48 00 00 64 */ b .L_000001BC
.L_0000015C:
/* 0000015C 0000019C 7F 83 E3 78 */ mr r3, r28
/* 00000160 000001A0 48 00 00 01 */ bl it_8026BC68
/* 00000164 000001A4 2C 03 00 00 */ cmpwi r3, 0x0
/* 00000168 000001A8 41 82 00 50 */ beq .L_000001B8
/* 0000016C 000001AC 83 BC 00 2C */ lwz r29, 0x2c(r28)
/* 00000170 000001B0 38 7B 19 30 */ addi r3, r27, 0x1930
/* 00000174 000001B4 38 9D 0B 54 */ addi r4, r29, 0xb54
/* 00000178 000001B8 48 00 00 01 */ bl lb_80014638
/* 0000017C 000001BC 2C 03 00 00 */ cmpwi r3, 0x0
/* 00000180 000001C0 41 82 00 38 */ beq .L_000001B8
/* 00000184 000001C4 C0 3D 00 4C */ lfs f1, 0x4c(r29)
/* 00000188 000001C8 C0 1B 00 B0 */ lfs f0, 0xb0(r27)
/* 0000018C 000001CC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 00000190 000001D0 40 81 00 0C */ ble .L_0000019C
/* 00000194 000001D4 C0 00 00 00 */ lfs f0, ft_804D83A0@sda21(r0)
/* 00000198 000001D8 48 00 00 08 */ b .L_000001A0
.L_0000019C:
/* 0000019C 000001DC C0 00 00 00 */ lfs f0, ft_804D83A4@sda21(r0)
.L_000001A0:
/* 000001A0 000001E0 D0 1D 0C D0 */ stfs f0, 0xcd0(r29)
/* 000001A4 000001E4 38 00 00 01 */ li r0, 0x1
/* 000001A8 000001E8 93 DD 0C FC */ stw r30, 0xcfc(r29)
/* 000001AC 000001EC 88 7B 00 0C */ lbz r3, 0xc(r27)
/* 000001B0 000001F0 90 7D 0C B0 */ stw r3, 0xcb0(r29)
/* 000001B4 000001F4 90 1B 19 50 */ stw r0, 0x1950(r27)
.L_000001B8:
/* 000001B8 000001F8 83 9C 00 08 */ lwz r28, 0x8(r28)
.L_000001BC:
/* 000001BC 000001FC 28 1C 00 00 */ cmplwi r28, 0x0
/* 000001C0 00000200 40 82 FF 9C */ bne .L_0000015C
/* 000001C4 00000204 80 1F 19 50 */ lwz r0, 0x1950(r31)
/* 000001C8 00000208 2C 00 00 00 */ cmpwi r0, 0x0
/* 000001CC 0000020C 41 82 00 1C */ beq .L_000001E8
/* 000001D0 00000210 7F C3 F3 78 */ mr r3, r30
/* 000001D4 00000214 48 00 00 01 */ bl ftCo_800C703C
/* 000001D8 00000218 38 00 00 00 */ li r0, 0x0
/* 000001DC 0000021C 90 1F 19 50 */ stw r0, 0x1950(r31)
/* 000001E0 00000220 38 60 00 01 */ li r3, 0x1
/* 000001E4 00000224 48 00 00 08 */ b .L_000001EC
.L_000001E8:
/* 000001E8 00000228 38 60 00 00 */ li r3, 0x0
.L_000001EC:
/* 000001EC 0000022C BB 61 00 9C */ lmw r27, 0x9c(r1)
/* 000001F0 00000230 80 01 00 B4 */ lwz r0, 0xb4(r1)
/* 000001F4 00000234 38 21 00 B0 */ addi r1, r1, 0xb0
/* 000001F8 00000238 7C 08 03 A6 */ mtlr r0
/* 000001FC 0000023C 4E 80 00 20 */ blr
/* 80081A00 0007E5E0 7C 08 02 A6 */ mflr r0
/* 80081A04 0007E5E4 90 01 00 04 */ stw r0, 0x4(r1)
/* 80081A08 0007E5E8 94 21 FF 50 */ stwu r1, -0xb0(r1)
/* 80081A0C 0007E5EC BF 61 00 9C */ stmw r27, 0x9c(r1)
/* 80081A10 0007E5F0 7C 7E 1B 78 */ mr r30, r3
/* 80081A14 0007E5F4 83 E3 00 2C */ lwz r31, 0x2c(r3)
/* 80081A18 0007E5F8 88 1F 22 19 */ lbz r0, 0x2219(r31)
/* 80081A1C 0007E5FC 54 00 D7 FF */ extrwi. r0, r0, 1, 25
/* 80081A20 0007E600 40 82 01 00 */ bne .L_80081B20
/* 80081A24 0007E604 88 7F 22 23 */ lbz r3, 0x2223(r31)
/* 80081A28 0007E608 54 60 EF FF */ extrwi. r0, r3, 1, 28
/* 80081A2C 0007E60C 40 82 00 F4 */ bne .L_80081B20
/* 80081A30 0007E610 38 00 00 01 */ li r0, 0x1
/* 80081A34 0007E614 50 03 17 7A */ rlwimi r3, r0, 2, 29, 29
/* 80081A38 0007E618 98 7F 22 23 */ stb r3, 0x2223(r31)
/* 80081A3C 0007E61C 80 7F 06 F4 */ lwz r3, 0x6f4(r31)
/* 80081A40 0007E620 80 1F 06 F8 */ lwz r0, 0x6f8(r31)
/* 80081A44 0007E624 90 61 00 64 */ stw r3, 0x64(r1)
/* 80081A48 0007E628 90 01 00 68 */ stw r0, 0x68(r1)
/* 80081A4C 0007E62C 80 1F 06 FC */ lwz r0, 0x6fc(r31)
/* 80081A50 0007E630 90 01 00 6C */ stw r0, 0x6c(r1)
/* 80081A54 0007E634 C0 3F 07 AC */ lfs f1, 0x7ac(r31)
/* 80081A58 0007E638 C0 01 00 64 */ lfs f0, 0x64(r1)
/* 80081A5C 0007E63C C0 5F 07 A4 */ lfs f2, 0x7a4(r31)
/* 80081A60 0007E640 EC 01 00 2A */ fadds f0, f1, f0
/* 80081A64 0007E644 D0 1F 19 3C */ stfs f0, 0x193c(r31)
/* 80081A68 0007E648 C0 01 00 64 */ lfs f0, 0x64(r1)
/* 80081A6C 0007E64C EC 02 00 2A */ fadds f0, f2, f0
/* 80081A70 0007E650 D0 1F 19 40 */ stfs f0, 0x1940(r31)
/* 80081A74 0007E654 C0 3F 00 B4 */ lfs f1, 0xb4(r31)
/* 80081A78 0007E658 C0 1F 02 8C */ lfs f0, 0x28c(r31)
/* 80081A7C 0007E65C EC 01 00 2A */ fadds f0, f1, f0
/* 80081A80 0007E660 D0 1F 19 44 */ stfs f0, 0x1944(r31)
/* 80081A84 0007E664 80 6D C1 8C */ lwz r3, HSD_GObj_Entities@sda21(r0)
/* 80081A88 0007E668 83 7E 00 2C */ lwz r27, 0x2c(r30)
/* 80081A8C 0007E66C 83 83 00 24 */ lwz r28, 0x24(r3)
/* 80081A90 0007E670 48 00 00 64 */ b .L_80081AF4
.L_80081A94:
/* 80081A94 0007E674 7F 83 E3 78 */ mr r3, r28
/* 80081A98 0007E678 48 1E A1 D1 */ bl it_8026BC68
/* 80081A9C 0007E67C 2C 03 00 00 */ cmpwi r3, 0x0
/* 80081AA0 0007E680 41 82 00 50 */ beq .L_80081AF0
/* 80081AA4 0007E684 83 BC 00 2C */ lwz r29, 0x2c(r28)
/* 80081AA8 0007E688 38 7B 19 30 */ addi r3, r27, 0x1930
/* 80081AAC 0007E68C 38 9D 0B 54 */ addi r4, r29, 0xb54
/* 80081AB0 0007E690 4B F9 2B 89 */ bl lb_80014638
/* 80081AB4 0007E694 2C 03 00 00 */ cmpwi r3, 0x0
/* 80081AB8 0007E698 41 82 00 38 */ beq .L_80081AF0
/* 80081ABC 0007E69C C0 3D 00 4C */ lfs f1, 0x4c(r29)
/* 80081AC0 0007E6A0 C0 1B 00 B0 */ lfs f0, 0xb0(r27)
/* 80081AC4 0007E6A4 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80081AC8 0007E6A8 40 81 00 0C */ ble .L_80081AD4
/* 80081ACC 0007E6AC C0 02 89 C0 */ lfs f0, ft_804D83A0@sda21(r0)
/* 80081AD0 0007E6B0 48 00 00 08 */ b .L_80081AD8
.L_80081AD4:
/* 80081AD4 0007E6B4 C0 02 89 C4 */ lfs f0, ft_804D83A4@sda21(r0)
.L_80081AD8:
/* 80081AD8 0007E6B8 D0 1D 0C D0 */ stfs f0, 0xcd0(r29)
/* 80081ADC 0007E6BC 38 00 00 01 */ li r0, 0x1
/* 80081AE0 0007E6C0 93 DD 0C FC */ stw r30, 0xcfc(r29)
/* 80081AE4 0007E6C4 88 7B 00 0C */ lbz r3, 0xc(r27)
/* 80081AE8 0007E6C8 90 7D 0C B0 */ stw r3, 0xcb0(r29)
/* 80081AEC 0007E6CC 90 1B 19 50 */ stw r0, 0x1950(r27)
.L_80081AF0:
/* 80081AF0 0007E6D0 83 9C 00 08 */ lwz r28, 0x8(r28)
.L_80081AF4:
/* 80081AF4 0007E6D4 28 1C 00 00 */ cmplwi r28, 0x0
/* 80081AF8 0007E6D8 40 82 FF 9C */ bne .L_80081A94
/* 80081AFC 0007E6DC 80 1F 19 50 */ lwz r0, 0x1950(r31)
/* 80081B00 0007E6E0 2C 00 00 00 */ cmpwi r0, 0x0
/* 80081B04 0007E6E4 41 82 00 1C */ beq .L_80081B20
/* 80081B08 0007E6E8 7F C3 F3 78 */ mr r3, r30
/* 80081B0C 0007E6EC 48 04 55 31 */ bl ftCo_800C703C
/* 80081B10 0007E6F0 38 00 00 00 */ li r0, 0x0
/* 80081B14 0007E6F4 90 1F 19 50 */ stw r0, 0x1950(r31)
/* 80081B18 0007E6F8 38 60 00 01 */ li r3, 0x1
/* 80081B1C 0007E6FC 48 00 00 08 */ b .L_80081B24
.L_80081B20:
/* 80081B20 0007E700 38 60 00 00 */ li r3, 0x0
.L_80081B24:
/* 80081B24 0007E704 BB 61 00 9C */ lmw r27, 0x9c(r1)
/* 80081B28 0007E708 80 01 00 B4 */ lwz r0, 0xb4(r1)
/* 80081B2C 0007E70C 38 21 00 B0 */ addi r1, r1, 0xb0
/* 80081B30 0007E710 7C 08 03 A6 */ mtlr r0
/* 80081B34 0007E714 4E 80 00 20 */ blr
.endfn ft_80081A00

# 0x00000000 - 0x00000008
# 0x804D83A0..0x804D83A8 | size: 0x8
.section .sdata2, "a"
.balign 8

# .sdata2:0x0 | 0x804D83A0 | size: 0x4
.obj ft_804D83A0, local
.4byte 0xBF800000
.float -1
.endobj ft_804D83A0

# .sdata2:0x4 | 0x804D83A4 | size: 0x4
.obj ft_804D83A4, local
.4byte 0x3F800000
.float 1
.endobj ft_804D83A4
53 changes: 52 additions & 1 deletion src/melee/ft/ft_0819.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#include <placeholder.h>

#include "ft_0819.h"

#include "ft/ft_0C31.h"
#include "ft/inlines.h"
#include "ft/types.h"
#include "it/inlines.h"
#include "it/it_26B1.h"
#include "lb/lb_00F9.h"
#include "lb/types.h"

#include <baselib/gobj.h>
Expand Down Expand Up @@ -40,4 +47,48 @@ void ft_800819A8(HSD_GObj* gobj)
fp->dmg.x1930.z = fp->cur_pos.y + fp->co_attrs.x15C;
}

/// #ft_80081A00
static inline void inlineA0(Fighter_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
Item_GObj* cur;
for (cur = HSD_GObj_Entities->items; cur != NULL;
cur = HSD_GObjGetNext(cur))
{
if (it_8026BC68(cur)) {
Item* ip = GET_ITEM(cur);
if (lb_80014638(&fp->dmg.x1930, &ip->xACC_itemHurtbox[1].b_pos.z))
{
ip->xCD0 = ip->pos.x > fp->cur_pos.x ? -1.0f : +1.0f;
ip->xCFC = gobj;
ip->xCB0_source_ply = fp->player_id;
fp->dmg.x1950 = true;
}
}
}
}

bool ft_80081A00(Fighter_GObj* fp_gobj)
{
f32 lx, rx;
Fighter* fp = GET_FIGHTER(fp_gobj);
PAD_STACK(8 * 4);
if (!fp->x2219_b1 && !fp->x2223_b4) {
Vec3 sp64;
PAD_STACK(14 * 4);
fp->x2223_b5 = true;
sp64 = fp->coll_data.cur_topn;
lx = fp->coll_data.xA4_ecbCurrCorrect.left.x;
rx = fp->coll_data.xA4_ecbCurrCorrect.right.x;
fp->dmg.x193c.x = lx + sp64.x;
fp->dmg.x193c.y = rx + sp64.x;
fp->dmg.x193c.z = fp->cur_pos.y + fp->co_attrs.x15C;
inlineA0(fp_gobj);
if (fp->dmg.x1950) {
ftCo_800C703C(fp_gobj);
fp->dmg.x1950 = false;
return true;
}
}

return false;
}
3 changes: 2 additions & 1 deletion src/melee/ft/ft_0819.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#ifndef GALE01_081938
#define GALE01_081938

#include "ft/forward.h"
#include <baselib/forward.h>

/* 081938 */ void ft_80081938(HSD_GObj* gobj);
/* 0819A8 */ void ft_800819A8(HSD_GObj* gobj);
/* 081A00 */ void ft_80081A00(void);
/* 081A00 */ bool ft_80081A00(Fighter_GObj* gobj);

#endif
2 changes: 1 addition & 1 deletion src/melee/ft/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ struct Fighter {
/* fp+193C */ Vec3 x193c;
/* fp+1948 */ int x1948;
/* fp+194C */ int x194C;
/* fp+1950 */ int x1950;
/* fp+1950 */ bool x1950;
/* fp+1954 */ float x1954;
/* fp+1958 */ float x1958;
/* fp+195C */ float x195c_hitlag_frames;
Expand Down
Loading

0 comments on commit 170c447

Please sign in to comment.