From 62fa0c2674ff025ade364c31ef55d8f2933012e3 Mon Sep 17 00:00:00 2001 From: Aaron B <74215195+AaronB-Hub@users.noreply.github.com> Date: Wed, 25 Sep 2024 19:13:34 -0400 Subject: [PATCH] Link `itrabbitc` (#1467) Co-authored-by: Robin Avery --- asm/melee/it/items/itrabbitc.s | 531 --------------------- config/GALE01/splits.txt | 2 +- config/GALE01/symbols.txt | 8 +- configure.py | 2 +- obj_files.mk | 2 +- src/melee/ft/chara/ftCommon/ftpickupitem.c | 34 +- src/melee/ft/chara/ftCommon/types.h | 2 +- src/melee/ft/ftcommon.c | 2 +- src/melee/ft/ftcommon.h | 3 +- src/melee/ft/ftlib.c | 2 +- src/melee/ft/ftlib.h | 2 +- src/melee/it/itCommonItems.h | 6 +- src/melee/it/item.c | 11 +- src/melee/it/item.h | 4 +- src/melee/it/items/itlgun.c | 2 +- src/melee/it/items/itrabbitc.c | 210 ++++++-- src/melee/it/items/itrabbitc.h | 16 +- src/melee/pl/pl_0371.h | 4 +- 18 files changed, 227 insertions(+), 616 deletions(-) delete mode 100644 asm/melee/it/items/itrabbitc.s diff --git a/asm/melee/it/items/itrabbitc.s b/asm/melee/it/items/itrabbitc.s deleted file mode 100644 index fbe8431172..0000000000 --- a/asm/melee/it/items/itrabbitc.s +++ /dev/null @@ -1,531 +0,0 @@ -.include "macros.inc" - -.section .text - -.global it_80294DA0 -it_80294DA0: -/* 80294DA0 00291980 7C 08 02 A6 */ mflr r0 -/* 80294DA4 00291984 90 01 00 04 */ stw r0, 4(r1) -/* 80294DA8 00291988 94 21 FF F8 */ stwu r1, -8(r1) -/* 80294DAC 0029198C 4B FD E2 CD */ bl itColl_BounceOffShield -/* 80294DB0 00291990 80 01 00 0C */ lwz r0, 0xc(r1) -/* 80294DB4 00291994 38 21 00 08 */ addi r1, r1, 8 -/* 80294DB8 00291998 7C 08 03 A6 */ mtlr r0 -/* 80294DBC 0029199C 4E 80 00 20 */ blr - -.global it_80294DC0 -it_80294DC0: -/* 80294DC0 002919A0 7C 08 02 A6 */ mflr r0 -/* 80294DC4 002919A4 38 A0 00 00 */ li r5, 0 -/* 80294DC8 002919A8 90 01 00 04 */ stw r0, 4(r1) -/* 80294DCC 002919AC 38 00 00 1F */ li r0, 0x1f -/* 80294DD0 002919B0 38 80 00 01 */ li r4, 1 -/* 80294DD4 002919B4 94 21 FF A0 */ stwu r1, -0x60(r1) -/* 80294DD8 002919B8 93 E1 00 5C */ stw r31, 0x5c(r1) -/* 80294DDC 002919BC 90 01 00 14 */ stw r0, 0x14(r1) -/* 80294DE0 002919C0 80 C3 00 00 */ lwz r6, 0(r3) -/* 80294DE4 002919C4 80 03 00 04 */ lwz r0, 4(r3) -/* 80294DE8 002919C8 90 C1 00 2C */ stw r6, 0x2c(r1) -/* 80294DEC 002919CC 90 01 00 30 */ stw r0, 0x30(r1) -/* 80294DF0 002919D0 80 03 00 08 */ lwz r0, 8(r3) -/* 80294DF4 002919D4 38 61 00 0C */ addi r3, r1, 0xc -/* 80294DF8 002919D8 90 01 00 34 */ stw r0, 0x34(r1) -/* 80294DFC 002919DC 80 C1 00 2C */ lwz r6, 0x2c(r1) -/* 80294E00 002919E0 80 01 00 30 */ lwz r0, 0x30(r1) -/* 80294E04 002919E4 C0 22 D1 78 */ lfs f1, it_804DCB58@sda21(r2) -/* 80294E08 002919E8 90 C1 00 20 */ stw r6, 0x20(r1) -/* 80294E0C 002919EC C0 02 D1 7C */ lfs f0, it_804DCB5C@sda21(r2) -/* 80294E10 002919F0 90 01 00 24 */ stw r0, 0x24(r1) -/* 80294E14 002919F4 80 01 00 34 */ lwz r0, 0x34(r1) -/* 80294E18 002919F8 90 01 00 28 */ stw r0, 0x28(r1) -/* 80294E1C 002919FC D0 21 00 44 */ stfs f1, 0x44(r1) -/* 80294E20 00291A00 B0 A1 00 48 */ sth r5, 0x48(r1) -/* 80294E24 00291A04 D0 01 00 40 */ stfs f0, 0x40(r1) -/* 80294E28 00291A08 D0 01 00 3C */ stfs f0, 0x3c(r1) -/* 80294E2C 00291A0C D0 01 00 38 */ stfs f0, 0x38(r1) -/* 80294E30 00291A10 90 A1 00 0C */ stw r5, 0xc(r1) -/* 80294E34 00291A14 80 01 00 0C */ lwz r0, 0xc(r1) -/* 80294E38 00291A18 90 01 00 10 */ stw r0, 0x10(r1) -/* 80294E3C 00291A1C 88 01 00 50 */ lbz r0, 0x50(r1) -/* 80294E40 00291A20 50 80 3E 30 */ rlwimi r0, r4, 7, 0x18, 0x18 -/* 80294E44 00291A24 98 01 00 50 */ stb r0, 0x50(r1) -/* 80294E48 00291A28 90 A1 00 4C */ stw r5, 0x4c(r1) -/* 80294E4C 00291A2C 4B FD 3D 11 */ bl Item_80268B5C -/* 80294E50 00291A30 7C 7F 1B 79 */ or. r31, r3, r3 -/* 80294E54 00291A34 41 82 00 0C */ beq .L_80294E60 -/* 80294E58 00291A38 7F E3 FB 78 */ mr r3, r31 -/* 80294E5C 00291A3C 48 00 02 DD */ bl it_80295138 -.L_80294E60: -/* 80294E60 00291A40 7F E3 FB 78 */ mr r3, r31 -/* 80294E64 00291A44 80 01 00 64 */ lwz r0, 0x64(r1) -/* 80294E68 00291A48 83 E1 00 5C */ lwz r31, 0x5c(r1) -/* 80294E6C 00291A4C 38 21 00 60 */ addi r1, r1, 0x60 -/* 80294E70 00291A50 7C 08 03 A6 */ mtlr r0 -/* 80294E74 00291A54 4E 80 00 20 */ blr - -.global it_80294E78 -it_80294E78: -/* 80294E78 00291A58 7C 08 02 A6 */ mflr r0 -/* 80294E7C 00291A5C 38 80 00 01 */ li r4, 1 -/* 80294E80 00291A60 90 01 00 04 */ stw r0, 4(r1) -/* 80294E84 00291A64 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80294E88 00291A68 DB E1 00 18 */ stfd f31, 0x18(r1) -/* 80294E8C 00291A6C FF E0 08 90 */ fmr f31, f1 -/* 80294E90 00291A70 4B FD DE 31 */ bl it_80272CC0 -/* 80294E94 00291A74 FC 20 F8 90 */ fmr f1, f31 -/* 80294E98 00291A78 4B FD E0 E5 */ bl it_80272F7C -/* 80294E9C 00291A7C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80294EA0 00291A80 CB E1 00 18 */ lfd f31, 0x18(r1) -/* 80294EA4 00291A84 38 21 00 20 */ addi r1, r1, 0x20 -/* 80294EA8 00291A88 7C 08 03 A6 */ mtlr r0 -/* 80294EAC 00291A8C 4E 80 00 20 */ blr - -.global it_80294EB0 -it_80294EB0: -/* 80294EB0 00291A90 7C 08 02 A6 */ mflr r0 -/* 80294EB4 00291A94 90 01 00 04 */ stw r0, 4(r1) -/* 80294EB8 00291A98 94 21 FF C8 */ stwu r1, -0x38(r1) -/* 80294EBC 00291A9C 93 E1 00 34 */ stw r31, 0x34(r1) -/* 80294EC0 00291AA0 3B E5 00 00 */ addi r31, r5, 0 -/* 80294EC4 00291AA4 93 C1 00 30 */ stw r30, 0x30(r1) -/* 80294EC8 00291AA8 93 A1 00 2C */ stw r29, 0x2c(r1) -/* 80294ECC 00291AAC 3B A4 00 00 */ addi r29, r4, 0 -/* 80294ED0 00291AB0 38 80 00 08 */ li r4, 8 -/* 80294ED4 00291AB4 93 81 00 28 */ stw r28, 0x28(r1) -/* 80294ED8 00291AB8 3B 83 00 00 */ addi r28, r3, 0 -/* 80294EDC 00291ABC 4B FD DD E5 */ bl it_80272CC0 -/* 80294EE0 00291AC0 7C 7E 1B 79 */ or. r30, r3, r3 -/* 80294EE4 00291AC4 40 82 00 14 */ bne .L_80294EF8 -/* 80294EE8 00291AC8 38 6D 9C 40 */ addi r3, r13, it_804D52E0@sda21 -/* 80294EEC 00291ACC 38 80 03 D3 */ li r4, 0x3d3 -/* 80294EF0 00291AD0 38 AD 9C 48 */ addi r5, r13, it_804D52E8@sda21 -/* 80294EF4 00291AD4 48 0F 33 2D */ bl __assert -.L_80294EF8: -/* 80294EF8 00291AD8 80 7E 00 38 */ lwz r3, 0x38(r30) -/* 80294EFC 00291ADC 28 1E 00 00 */ cmplwi r30, 0 -/* 80294F00 00291AE0 80 1E 00 3C */ lwz r0, 0x3c(r30) -/* 80294F04 00291AE4 90 61 00 18 */ stw r3, 0x18(r1) -/* 80294F08 00291AE8 90 01 00 1C */ stw r0, 0x1c(r1) -/* 80294F0C 00291AEC 80 1E 00 40 */ lwz r0, 0x40(r30) -/* 80294F10 00291AF0 90 01 00 20 */ stw r0, 0x20(r1) -/* 80294F14 00291AF4 C0 21 00 18 */ lfs f1, 0x18(r1) -/* 80294F18 00291AF8 C0 1D 00 00 */ lfs f0, 0(r29) -/* 80294F1C 00291AFC EC 01 00 2A */ fadds f0, f1, f0 -/* 80294F20 00291B00 D0 01 00 18 */ stfs f0, 0x18(r1) -/* 80294F24 00291B04 C0 21 00 1C */ lfs f1, 0x1c(r1) -/* 80294F28 00291B08 C0 1D 00 04 */ lfs f0, 4(r29) -/* 80294F2C 00291B0C EC 01 00 2A */ fadds f0, f1, f0 -/* 80294F30 00291B10 D0 01 00 1C */ stfs f0, 0x1c(r1) -/* 80294F34 00291B14 C0 21 00 20 */ lfs f1, 0x20(r1) -/* 80294F38 00291B18 C0 1D 00 08 */ lfs f0, 8(r29) -/* 80294F3C 00291B1C EC 01 00 2A */ fadds f0, f1, f0 -/* 80294F40 00291B20 D0 01 00 20 */ stfs f0, 0x20(r1) -/* 80294F44 00291B24 40 82 00 14 */ bne .L_80294F58 -/* 80294F48 00291B28 38 6D 9C 40 */ addi r3, r13, it_804D52E0@sda21 -/* 80294F4C 00291B2C 38 80 03 94 */ li r4, 0x394 -/* 80294F50 00291B30 38 AD 9C 48 */ addi r5, r13, it_804D52E8@sda21 -/* 80294F54 00291B34 48 0F 32 CD */ bl __assert -.L_80294F58: -/* 80294F58 00291B38 80 61 00 18 */ lwz r3, 0x18(r1) -/* 80294F5C 00291B3C 80 01 00 1C */ lwz r0, 0x1c(r1) -/* 80294F60 00291B40 90 7E 00 38 */ stw r3, 0x38(r30) -/* 80294F64 00291B44 90 1E 00 3C */ stw r0, 0x3c(r30) -/* 80294F68 00291B48 80 01 00 20 */ lwz r0, 0x20(r1) -/* 80294F6C 00291B4C 90 1E 00 40 */ stw r0, 0x40(r30) -/* 80294F70 00291B50 80 1E 00 14 */ lwz r0, 0x14(r30) -/* 80294F74 00291B54 54 00 01 8D */ rlwinm. r0, r0, 0, 6, 6 -/* 80294F78 00291B58 40 82 00 4C */ bne .L_80294FC4 -/* 80294F7C 00291B5C 28 1E 00 00 */ cmplwi r30, 0 -/* 80294F80 00291B60 41 82 00 44 */ beq .L_80294FC4 -/* 80294F84 00291B64 40 82 00 14 */ bne .L_80294F98 -/* 80294F88 00291B68 38 6D 9C 40 */ addi r3, r13, it_804D52E0@sda21 -/* 80294F8C 00291B6C 38 80 02 34 */ li r4, 0x234 -/* 80294F90 00291B70 38 AD 9C 48 */ addi r5, r13, it_804D52E8@sda21 -/* 80294F94 00291B74 48 0F 32 8D */ bl __assert -.L_80294F98: -/* 80294F98 00291B78 80 9E 00 14 */ lwz r4, 0x14(r30) -/* 80294F9C 00291B7C 38 60 00 00 */ li r3, 0 -/* 80294FA0 00291B80 54 80 02 11 */ rlwinm. r0, r4, 0, 8, 8 -/* 80294FA4 00291B84 40 82 00 10 */ bne .L_80294FB4 -/* 80294FA8 00291B88 54 80 06 73 */ rlwinm. r0, r4, 0, 0x19, 0x19 -/* 80294FAC 00291B8C 41 82 00 08 */ beq .L_80294FB4 -/* 80294FB0 00291B90 38 60 00 01 */ li r3, 1 -.L_80294FB4: -/* 80294FB4 00291B94 2C 03 00 00 */ cmpwi r3, 0 -/* 80294FB8 00291B98 40 82 00 0C */ bne .L_80294FC4 -/* 80294FBC 00291B9C 7F C3 F3 78 */ mr r3, r30 -/* 80294FC0 00291BA0 48 0D E3 29 */ bl HSD_JObjSetMtxDirtySub -.L_80294FC4: -/* 80294FC4 00291BA4 38 7C 00 00 */ addi r3, r28, 0 -/* 80294FC8 00291BA8 38 80 00 04 */ li r4, 4 -/* 80294FCC 00291BAC 4B FD DC F5 */ bl it_80272CC0 -/* 80294FD0 00291BB0 7C 7E 1B 79 */ or. r30, r3, r3 -/* 80294FD4 00291BB4 40 82 00 14 */ bne .L_80294FE8 -/* 80294FD8 00291BB8 38 6D 9C 40 */ addi r3, r13, it_804D52E0@sda21 -/* 80294FDC 00291BBC 38 80 03 D3 */ li r4, 0x3d3 -/* 80294FE0 00291BC0 38 AD 9C 48 */ addi r5, r13, it_804D52E8@sda21 -/* 80294FE4 00291BC4 48 0F 32 3D */ bl __assert -.L_80294FE8: -/* 80294FE8 00291BC8 80 7E 00 38 */ lwz r3, 0x38(r30) -/* 80294FEC 00291BCC 28 1E 00 00 */ cmplwi r30, 0 -/* 80294FF0 00291BD0 80 1E 00 3C */ lwz r0, 0x3c(r30) -/* 80294FF4 00291BD4 90 61 00 18 */ stw r3, 0x18(r1) -/* 80294FF8 00291BD8 90 01 00 1C */ stw r0, 0x1c(r1) -/* 80294FFC 00291BDC 80 1E 00 40 */ lwz r0, 0x40(r30) -/* 80295000 00291BE0 90 01 00 20 */ stw r0, 0x20(r1) -/* 80295004 00291BE4 C0 21 00 18 */ lfs f1, 0x18(r1) -/* 80295008 00291BE8 C0 1F 00 00 */ lfs f0, 0(r31) -/* 8029500C 00291BEC EC 01 00 2A */ fadds f0, f1, f0 -/* 80295010 00291BF0 D0 01 00 18 */ stfs f0, 0x18(r1) -/* 80295014 00291BF4 C0 21 00 1C */ lfs f1, 0x1c(r1) -/* 80295018 00291BF8 C0 1F 00 04 */ lfs f0, 4(r31) -/* 8029501C 00291BFC EC 01 00 2A */ fadds f0, f1, f0 -/* 80295020 00291C00 D0 01 00 1C */ stfs f0, 0x1c(r1) -/* 80295024 00291C04 C0 21 00 20 */ lfs f1, 0x20(r1) -/* 80295028 00291C08 C0 1F 00 08 */ lfs f0, 8(r31) -/* 8029502C 00291C0C EC 01 00 2A */ fadds f0, f1, f0 -/* 80295030 00291C10 D0 01 00 20 */ stfs f0, 0x20(r1) -/* 80295034 00291C14 40 82 00 14 */ bne .L_80295048 -/* 80295038 00291C18 38 6D 9C 40 */ addi r3, r13, it_804D52E0@sda21 -/* 8029503C 00291C1C 38 80 03 94 */ li r4, 0x394 -/* 80295040 00291C20 38 AD 9C 48 */ addi r5, r13, it_804D52E8@sda21 -/* 80295044 00291C24 48 0F 31 DD */ bl __assert -.L_80295048: -/* 80295048 00291C28 80 61 00 18 */ lwz r3, 0x18(r1) -/* 8029504C 00291C2C 80 01 00 1C */ lwz r0, 0x1c(r1) -/* 80295050 00291C30 90 7E 00 38 */ stw r3, 0x38(r30) -/* 80295054 00291C34 90 1E 00 3C */ stw r0, 0x3c(r30) -/* 80295058 00291C38 80 01 00 20 */ lwz r0, 0x20(r1) -/* 8029505C 00291C3C 90 1E 00 40 */ stw r0, 0x40(r30) -/* 80295060 00291C40 80 1E 00 14 */ lwz r0, 0x14(r30) -/* 80295064 00291C44 54 00 01 8D */ rlwinm. r0, r0, 0, 6, 6 -/* 80295068 00291C48 40 82 00 4C */ bne .L_802950B4 -/* 8029506C 00291C4C 28 1E 00 00 */ cmplwi r30, 0 -/* 80295070 00291C50 41 82 00 44 */ beq .L_802950B4 -/* 80295074 00291C54 40 82 00 14 */ bne .L_80295088 -/* 80295078 00291C58 38 6D 9C 40 */ addi r3, r13, it_804D52E0@sda21 -/* 8029507C 00291C5C 38 80 02 34 */ li r4, 0x234 -/* 80295080 00291C60 38 AD 9C 48 */ addi r5, r13, it_804D52E8@sda21 -/* 80295084 00291C64 48 0F 31 9D */ bl __assert -.L_80295088: -/* 80295088 00291C68 80 9E 00 14 */ lwz r4, 0x14(r30) -/* 8029508C 00291C6C 38 60 00 00 */ li r3, 0 -/* 80295090 00291C70 54 80 02 11 */ rlwinm. r0, r4, 0, 8, 8 -/* 80295094 00291C74 40 82 00 10 */ bne .L_802950A4 -/* 80295098 00291C78 54 80 06 73 */ rlwinm. r0, r4, 0, 0x19, 0x19 -/* 8029509C 00291C7C 41 82 00 08 */ beq .L_802950A4 -/* 802950A0 00291C80 38 60 00 01 */ li r3, 1 -.L_802950A4: -/* 802950A4 00291C84 2C 03 00 00 */ cmpwi r3, 0 -/* 802950A8 00291C88 40 82 00 0C */ bne .L_802950B4 -/* 802950AC 00291C8C 7F C3 F3 78 */ mr r3, r30 -/* 802950B0 00291C90 48 0D E2 39 */ bl HSD_JObjSetMtxDirtySub -.L_802950B4: -/* 802950B4 00291C94 80 01 00 3C */ lwz r0, 0x3c(r1) -/* 802950B8 00291C98 83 E1 00 34 */ lwz r31, 0x34(r1) -/* 802950BC 00291C9C 83 C1 00 30 */ lwz r30, 0x30(r1) -/* 802950C0 00291CA0 83 A1 00 2C */ lwz r29, 0x2c(r1) -/* 802950C4 00291CA4 83 81 00 28 */ lwz r28, 0x28(r1) -/* 802950C8 00291CA8 38 21 00 38 */ addi r1, r1, 0x38 -/* 802950CC 00291CAC 7C 08 03 A6 */ mtlr r0 -/* 802950D0 00291CB0 4E 80 00 20 */ blr - -.global it_802950D4 -it_802950D4: -/* 802950D4 00291CB4 7C 08 02 A6 */ mflr r0 -/* 802950D8 00291CB8 90 01 00 04 */ stw r0, 4(r1) -/* 802950DC 00291CBC 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 802950E0 00291CC0 93 E1 00 1C */ stw r31, 0x1c(r1) -/* 802950E4 00291CC4 3B E4 00 00 */ addi r31, r4, 0 -/* 802950E8 00291CC8 38 80 00 03 */ li r4, 3 -/* 802950EC 00291CCC 4B FD DB D5 */ bl it_80272CC0 -/* 802950F0 00291CD0 2C 1F 00 00 */ cmpwi r31, 0 -/* 802950F4 00291CD4 41 82 00 0C */ beq .L_80295100 -/* 802950F8 00291CD8 4B FD D9 21 */ bl it_80272A18 -/* 802950FC 00291CDC 48 00 00 08 */ b .L_80295104 -.L_80295100: -/* 80295100 00291CE0 4B FD D9 3D */ bl it_80272A3C -.L_80295104: -/* 80295104 00291CE4 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80295108 00291CE8 83 E1 00 1C */ lwz r31, 0x1c(r1) -/* 8029510C 00291CEC 38 21 00 20 */ addi r1, r1, 0x20 -/* 80295110 00291CF0 7C 08 03 A6 */ mtlr r0 -/* 80295114 00291CF4 4E 80 00 20 */ blr - -.global it_80295118 -it_80295118: -/* 80295118 00291CF8 7C 08 02 A6 */ mflr r0 -/* 8029511C 00291CFC 90 01 00 04 */ stw r0, 4(r1) -/* 80295120 00291D00 94 21 FF F8 */ stwu r1, -8(r1) -/* 80295124 00291D04 48 00 00 9D */ bl it_802951C0 -/* 80295128 00291D08 80 01 00 0C */ lwz r0, 0xc(r1) -/* 8029512C 00291D0C 38 21 00 08 */ addi r1, r1, 8 -/* 80295130 00291D10 7C 08 03 A6 */ mtlr r0 -/* 80295134 00291D14 4E 80 00 20 */ blr - -.global it_80295138 -it_80295138: -/* 80295138 00291D18 7C 08 02 A6 */ mflr r0 -/* 8029513C 00291D1C 90 01 00 04 */ stw r0, 4(r1) -/* 80295140 00291D20 94 21 FF E8 */ stwu r1, -0x18(r1) -/* 80295144 00291D24 93 E1 00 14 */ stw r31, 0x14(r1) -/* 80295148 00291D28 7C 7F 1B 78 */ mr r31, r3 -/* 8029514C 00291D2C C0 02 D1 7C */ lfs f0, it_804DCB5C@sda21(r2) -/* 80295150 00291D30 80 83 00 2C */ lwz r4, 0x2c(r3) -/* 80295154 00291D34 D0 04 00 48 */ stfs f0, 0x48(r4) -/* 80295158 00291D38 D0 04 00 44 */ stfs f0, 0x44(r4) -/* 8029515C 00291D3C D0 04 00 40 */ stfs f0, 0x40(r4) -/* 80295160 00291D40 4B FD 62 31 */ bl it_8026B390 -/* 80295164 00291D44 38 7F 00 00 */ addi r3, r31, 0 -/* 80295168 00291D48 38 80 00 00 */ li r4, 0 -/* 8029516C 00291D4C 38 A0 00 02 */ li r5, 2 -/* 80295170 00291D50 4B FD 3C ED */ bl Item_80268E5C -/* 80295174 00291D54 80 01 00 1C */ lwz r0, 0x1c(r1) -/* 80295178 00291D58 83 E1 00 14 */ lwz r31, 0x14(r1) -/* 8029517C 00291D5C 38 21 00 18 */ addi r1, r1, 0x18 -/* 80295180 00291D60 7C 08 03 A6 */ mtlr r0 -/* 80295184 00291D64 4E 80 00 20 */ blr - -.global it_80295188 -it_80295188: -/* 80295188 00291D68 38 60 00 00 */ li r3, 0 -/* 8029518C 00291D6C 4E 80 00 20 */ blr - -.global it_80295190 -it_80295190: -/* 80295190 00291D70 4E 80 00 20 */ blr - -.global it_80295194 -it_80295194: -/* 80295194 00291D74 7C 08 02 A6 */ mflr r0 -/* 80295198 00291D78 3C 80 80 29 */ lis r4, it_802951C0@ha -/* 8029519C 00291D7C 90 01 00 04 */ stw r0, 4(r1) -/* 802951A0 00291D80 38 84 51 C0 */ addi r4, r4, it_802951C0@l -/* 802951A4 00291D84 94 21 FF F8 */ stwu r1, -8(r1) -/* 802951A8 00291D88 4B FD 84 85 */ bl it_8026D62C -/* 802951AC 00291D8C 38 60 00 00 */ li r3, 0 -/* 802951B0 00291D90 80 01 00 0C */ lwz r0, 0xc(r1) -/* 802951B4 00291D94 38 21 00 08 */ addi r1, r1, 8 -/* 802951B8 00291D98 7C 08 03 A6 */ mtlr r0 -/* 802951BC 00291D9C 4E 80 00 20 */ blr - -.global it_802951C0 -it_802951C0: -/* 802951C0 00291DA0 7C 08 02 A6 */ mflr r0 -/* 802951C4 00291DA4 38 80 00 01 */ li r4, 1 -/* 802951C8 00291DA8 90 01 00 04 */ stw r0, 4(r1) -/* 802951CC 00291DAC 38 A0 00 02 */ li r5, 2 -/* 802951D0 00291DB0 94 21 FF F8 */ stwu r1, -8(r1) -/* 802951D4 00291DB4 4B FD 3C 89 */ bl Item_80268E5C -/* 802951D8 00291DB8 80 01 00 0C */ lwz r0, 0xc(r1) -/* 802951DC 00291DBC 38 21 00 08 */ addi r1, r1, 8 -/* 802951E0 00291DC0 7C 08 03 A6 */ mtlr r0 -/* 802951E4 00291DC4 4E 80 00 20 */ blr - -.global it_802951E8 -it_802951E8: -/* 802951E8 00291DC8 38 60 00 00 */ li r3, 0 -/* 802951EC 00291DCC 4E 80 00 20 */ blr - -.global it_802951F0 -it_802951F0: -/* 802951F0 00291DD0 7C 08 02 A6 */ mflr r0 -/* 802951F4 00291DD4 90 01 00 04 */ stw r0, 4(r1) -/* 802951F8 00291DD8 94 21 FF F8 */ stwu r1, -8(r1) -/* 802951FC 00291DDC 80 83 00 2C */ lwz r4, 0x2c(r3) -/* 80295200 00291DE0 80 84 00 CC */ lwz r4, 0xcc(r4) -/* 80295204 00291DE4 C0 24 00 10 */ lfs f1, 0x10(r4) -/* 80295208 00291DE8 C0 44 00 14 */ lfs f2, 0x14(r4) -/* 8029520C 00291DEC 4B FD D6 55 */ bl it_80272860 -/* 80295210 00291DF0 80 01 00 0C */ lwz r0, 0xc(r1) -/* 80295214 00291DF4 38 21 00 08 */ addi r1, r1, 8 -/* 80295218 00291DF8 7C 08 03 A6 */ mtlr r0 -/* 8029521C 00291DFC 4E 80 00 20 */ blr - -.global it_80295220 -it_80295220: -/* 80295220 00291E00 7C 08 02 A6 */ mflr r0 -/* 80295224 00291E04 3C 80 80 29 */ lis r4, it_80295138@ha -/* 80295228 00291E08 90 01 00 04 */ stw r0, 4(r1) -/* 8029522C 00291E0C 38 84 51 38 */ addi r4, r4, it_80295138@l -/* 80295230 00291E10 94 21 FF F8 */ stwu r1, -8(r1) -/* 80295234 00291E14 4B FD 8F 29 */ bl it_8026E15C -/* 80295238 00291E18 38 60 00 00 */ li r3, 0 -/* 8029523C 00291E1C 80 01 00 0C */ lwz r0, 0xc(r1) -/* 80295240 00291E20 38 21 00 08 */ addi r1, r1, 8 -/* 80295244 00291E24 7C 08 03 A6 */ mtlr r0 -/* 80295248 00291E28 4E 80 00 20 */ blr - -.global it_8029524C -it_8029524C: -/* 8029524C 00291E2C 7C 08 02 A6 */ mflr r0 -/* 80295250 00291E30 38 80 00 02 */ li r4, 2 -/* 80295254 00291E34 90 01 00 04 */ stw r0, 4(r1) -/* 80295258 00291E38 38 A0 00 02 */ li r5, 2 -/* 8029525C 00291E3C 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80295260 00291E40 93 E1 00 1C */ stw r31, 0x1c(r1) -/* 80295264 00291E44 3B E3 00 00 */ addi r31, r3, 0 -/* 80295268 00291E48 4B FD 3B F5 */ bl Item_80268E5C -/* 8029526C 00291E4C 38 7F 00 00 */ addi r3, r31, 0 -/* 80295270 00291E50 38 80 00 03 */ li r4, 3 -/* 80295274 00291E54 4B FD DA 4D */ bl it_80272CC0 -/* 80295278 00291E58 4B FD D7 C5 */ bl it_80272A3C -/* 8029527C 00291E5C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80295280 00291E60 83 E1 00 1C */ lwz r31, 0x1c(r1) -/* 80295284 00291E64 38 21 00 20 */ addi r1, r1, 0x20 -/* 80295288 00291E68 7C 08 03 A6 */ mtlr r0 -/* 8029528C 00291E6C 4E 80 00 20 */ blr - -.global it_80295290 -it_80295290: -/* 80295290 00291E70 38 60 00 00 */ li r3, 0 -/* 80295294 00291E74 4E 80 00 20 */ blr - -.global it_80295298 -it_80295298: -/* 80295298 00291E78 7C 08 02 A6 */ mflr r0 -/* 8029529C 00291E7C 38 80 00 01 */ li r4, 1 -/* 802952A0 00291E80 90 01 00 04 */ stw r0, 4(r1) -/* 802952A4 00291E84 38 A0 00 06 */ li r5, 6 -/* 802952A8 00291E88 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 802952AC 00291E8C 93 E1 00 1C */ stw r31, 0x1c(r1) -/* 802952B0 00291E90 3B E3 00 00 */ addi r31, r3, 0 -/* 802952B4 00291E94 4B FD 3B A9 */ bl Item_80268E5C -/* 802952B8 00291E98 38 7F 00 00 */ addi r3, r31, 0 -/* 802952BC 00291E9C 38 80 00 03 */ li r4, 3 -/* 802952C0 00291EA0 4B FD DA 01 */ bl it_80272CC0 -/* 802952C4 00291EA4 4B FD D7 55 */ bl it_80272A18 -/* 802952C8 00291EA8 80 01 00 24 */ lwz r0, 0x24(r1) -/* 802952CC 00291EAC 83 E1 00 1C */ lwz r31, 0x1c(r1) -/* 802952D0 00291EB0 38 21 00 20 */ addi r1, r1, 0x20 -/* 802952D4 00291EB4 7C 08 03 A6 */ mtlr r0 -/* 802952D8 00291EB8 4E 80 00 20 */ blr - -.global it_802952DC -it_802952DC: -/* 802952DC 00291EBC 7C 08 02 A6 */ mflr r0 -/* 802952E0 00291EC0 90 01 00 04 */ stw r0, 4(r1) -/* 802952E4 00291EC4 94 21 FF F8 */ stwu r1, -8(r1) -/* 802952E8 00291EC8 80 83 00 2C */ lwz r4, 0x2c(r3) -/* 802952EC 00291ECC 80 84 00 CC */ lwz r4, 0xcc(r4) -/* 802952F0 00291ED0 C0 24 00 10 */ lfs f1, 0x10(r4) -/* 802952F4 00291ED4 C0 44 00 14 */ lfs f2, 0x14(r4) -/* 802952F8 00291ED8 4B FD D5 69 */ bl it_80272860 -/* 802952FC 00291EDC 80 01 00 0C */ lwz r0, 0xc(r1) -/* 80295300 00291EE0 38 21 00 08 */ addi r1, r1, 8 -/* 80295304 00291EE4 7C 08 03 A6 */ mtlr r0 -/* 80295308 00291EE8 4E 80 00 20 */ blr - -.global it_8029530C -it_8029530C: -/* 8029530C 00291EEC 7C 08 02 A6 */ mflr r0 -/* 80295310 00291EF0 90 01 00 04 */ stw r0, 4(r1) -/* 80295314 00291EF4 94 21 FF F8 */ stwu r1, -8(r1) -/* 80295318 00291EF8 4B FD 86 F1 */ bl it_8026DA08 -/* 8029531C 00291EFC 2C 03 00 00 */ cmpwi r3, 0 -/* 80295320 00291F00 41 82 00 0C */ beq .L_8029532C -/* 80295324 00291F04 38 60 00 01 */ li r3, 1 -/* 80295328 00291F08 48 00 00 08 */ b .L_80295330 -.L_8029532C: -/* 8029532C 00291F0C 38 60 00 00 */ li r3, 0 -.L_80295330: -/* 80295330 00291F10 80 01 00 0C */ lwz r0, 0xc(r1) -/* 80295334 00291F14 38 21 00 08 */ addi r1, r1, 8 -/* 80295338 00291F18 7C 08 03 A6 */ mtlr r0 -/* 8029533C 00291F1C 4E 80 00 20 */ blr - -.global it_80295340 -it_80295340: -/* 80295340 00291F20 7C 08 02 A6 */ mflr r0 -/* 80295344 00291F24 38 80 00 04 */ li r4, 4 -/* 80295348 00291F28 90 01 00 04 */ stw r0, 4(r1) -/* 8029534C 00291F2C 38 A0 00 02 */ li r5, 2 -/* 80295350 00291F30 94 21 FF F8 */ stwu r1, -8(r1) -/* 80295354 00291F34 4B FD 3B 09 */ bl Item_80268E5C -/* 80295358 00291F38 80 01 00 0C */ lwz r0, 0xc(r1) -/* 8029535C 00291F3C 38 21 00 08 */ addi r1, r1, 8 -/* 80295360 00291F40 7C 08 03 A6 */ mtlr r0 -/* 80295364 00291F44 4E 80 00 20 */ blr - -.global it_80295368 -it_80295368: -/* 80295368 00291F48 38 60 00 00 */ li r3, 0 -/* 8029536C 00291F4C 4E 80 00 20 */ blr - -.global it_80295370 -it_80295370: -/* 80295370 00291F50 4E 80 00 20 */ blr - -.global it_80295374 -it_80295374: -/* 80295374 00291F54 7C 08 02 A6 */ mflr r0 -/* 80295378 00291F58 3C 80 80 29 */ lis r4, it_80295138@ha -/* 8029537C 00291F5C 90 01 00 04 */ stw r0, 4(r1) -/* 80295380 00291F60 3C A0 80 29 */ lis r5, it_802951C0@ha -/* 80295384 00291F64 38 84 51 38 */ addi r4, r4, it_80295138@l -/* 80295388 00291F68 94 21 FF F8 */ stwu r1, -8(r1) -/* 8029538C 00291F6C 38 A5 51 C0 */ addi r5, r5, it_802951C0@l -/* 80295390 00291F70 4B FD 95 35 */ bl it_8026E8C4 -/* 80295394 00291F74 38 60 00 00 */ li r3, 0 -/* 80295398 00291F78 80 01 00 0C */ lwz r0, 0xc(r1) -/* 8029539C 00291F7C 38 21 00 08 */ addi r1, r1, 8 -/* 802953A0 00291F80 7C 08 03 A6 */ mtlr r0 -/* 802953A4 00291F84 4E 80 00 20 */ blr - -.global it_802953A8 -it_802953A8: -/* 802953A8 00291F88 7C 08 02 A6 */ mflr r0 -/* 802953AC 00291F8C 90 01 00 04 */ stw r0, 4(r1) -/* 802953B0 00291F90 94 21 FF F8 */ stwu r1, -8(r1) -/* 802953B4 00291F94 4B FD 64 E1 */ bl it_8026B894 -/* 802953B8 00291F98 80 01 00 0C */ lwz r0, 0xc(r1) -/* 802953BC 00291F9C 38 21 00 08 */ addi r1, r1, 8 -/* 802953C0 00291FA0 7C 08 03 A6 */ mtlr r0 -/* 802953C4 00291FA4 4E 80 00 20 */ blr - - -.section .data - .balign 8 -.global it_803F6270 -it_803F6270: - .4byte -1 - .4byte it_80295188 - .4byte it_80295190 - .4byte it_80295194 - .4byte -1 - .4byte it_802951E8 - .4byte it_802951F0 - .4byte it_80295220 - .4byte -1 - .4byte it_80295290 - .4byte NULL - .4byte NULL - .4byte -1 - .4byte it_802951E8 - .4byte it_802952DC - .4byte it_8029530C - .4byte -1 - .4byte it_80295368 - .4byte it_80295370 - .4byte it_80295374 - - -.section .sdata - .balign 8 -.global it_804D52E0 -it_804D52E0: - .asciz "jobj.h" - .balign 4 -.global it_804D52E8 -it_804D52E8: - .asciz "jobj" - - -.section .sdata2 - .balign 8 -.global it_804DCB58 -it_804DCB58: - .4byte 0xBF800000 -.global it_804DCB5C -it_804DCB5C: - .4byte 0x00000000 diff --git a/config/GALE01/splits.txt b/config/GALE01/splits.txt index 415244c48b..2ff75ac570 100644 --- a/config/GALE01/splits.txt +++ b/config/GALE01/splits.txt @@ -2509,7 +2509,7 @@ melee/it/items/itscball.c: melee/it/items/itrabbitc.c: .text start:0x80294DA0 end:0x802953C8 .data start:0x803F6270 end:0x803F62C0 - .sdata start:0x804D52E0 end:0x804D52F0 + .sdata start:0x804D52E0 end:0x804D52ED .sdata2 start:0x804DCB58 end:0x804DCB60 melee/it/items/itmetalb.c: diff --git a/config/GALE01/symbols.txt b/config/GALE01/symbols.txt index 978c33cc32..98459d4e03 100644 --- a/config/GALE01/symbols.txt +++ b/config/GALE01/symbols.txt @@ -26289,8 +26289,8 @@ it_804D52C0 = .sdata:0x804D52C0; // type:object size:0x8 scope:global it_804D52C8 = .sdata:0x804D52C8; // type:object size:0x8 scope:global it_804D52D0 = .sdata:0x804D52D0; // type:object size:0x8 scope:global it_804D52D8 = .sdata:0x804D52D8; // type:object size:0x8 scope:global -it_804D52E0 = .sdata:0x804D52E0; // type:object size:0x8 scope:global -it_804D52E8 = .sdata:0x804D52E8; // type:object size:0x8 scope:global +@224 = .sdata:0x804D52E0; // type:object size:0x7 scope:local data:string +@225 = .sdata:0x804D52E8; // type:object size:0x5 scope:local data:string it_804D52F0 = .sdata:0x804D52F0; // type:object size:0x8 scope:global it_804D52F8 = .sdata:0x804D52F8; // type:object size:0x8 scope:global @261 = .sdata:0x804D5300; // type:object size:0x7 scope:local data:string @@ -32201,8 +32201,8 @@ it_804DCB44 = .sdata2:0x804DCB44; // type:object size:0x4 scope:global data:floa it_804DCB48 = .sdata2:0x804DCB48; // type:object size:0x4 scope:global data:float it_804DCB4C = .sdata2:0x804DCB4C; // type:object size:0x4 scope:global data:float @181 = .sdata2:0x804DCB50; // type:object size:0x4 scope:local data:float -it_804DCB58 = .sdata2:0x804DCB58; // type:object size:0x4 scope:global data:float -it_804DCB5C = .sdata2:0x804DCB5C; // type:object size:0x4 scope:global data:float +@183 = .sdata2:0x804DCB58; // type:object size:0x4 scope:local data:float +@184 = .sdata2:0x804DCB5C; // type:object size:0x4 scope:local data:float @181 = .sdata2:0x804DCB60; // type:object size:0x4 scope:local data:float it_804DCB68 = .sdata2:0x804DCB68; // type:object size:0x4 scope:global data:float @181 = .sdata2:0x804DCB70; // type:object size:0x4 scope:local data:float diff --git a/configure.py b/configure.py index 080549ae49..5257074b61 100755 --- a/configure.py +++ b/configure.py @@ -984,7 +984,7 @@ def RuntimeLib(lib_name: str, objects: Objects) -> Library: Object(Matching, "melee/it/items/ithammer.c"), Object(NonMatching, "melee/it/items/itwstar.c"), Object(Matching, "melee/it/items/itscball.c"), - Object(NonMatching, "melee/it/items/itrabbitc.c"), + Object(Matching, "melee/it/items/itrabbitc.c"), Object(Matching, "melee/it/items/itmetalb.c"), Object(NonMatching, "melee/it/items/itlipstick.c"), Object(Matching, "melee/it/items/itspycloak.c"), diff --git a/obj_files.mk b/obj_files.mk index f768ec4d3a..c5ab027503 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -590,7 +590,7 @@ TEXT_O_FILES +=\ $(BUILD_DIR)/src/melee/it/items/ithammer.c.o\ $(BUILD_DIR)/asm/melee/it/items/itwstar.s.o\ $(BUILD_DIR)/src/melee/it/items/itscball.c.o\ - $(BUILD_DIR)/asm/melee/it/items/itrabbitc.s.o\ + $(BUILD_DIR)/src/melee/it/items/itrabbitc.c.o\ $(BUILD_DIR)/src/melee/it/items/itmetalb.c.o\ $(BUILD_DIR)/asm/melee/it/items/itlipstick.s.o\ $(BUILD_DIR)/src/melee/it/items/itspycloak.c.o\ diff --git a/src/melee/ft/chara/ftCommon/ftpickupitem.c b/src/melee/ft/chara/ftCommon/ftpickupitem.c index 5a5c1e9546..350765a09f 100644 --- a/src/melee/ft/chara/ftCommon/ftpickupitem.c +++ b/src/melee/ft/chara/ftCommon/ftpickupitem.c @@ -74,7 +74,7 @@ bool ftpickupitem_80094150(ftCo_GObj* gobj, Item_GObj* item_gobj) return false; } -HSD_GObj* ftpickupitem_800942A0(HSD_GObj* gobj, u32 flags) +Item_GObj* ftpickupitem_800942A0(ftCo_GObj* gobj, u32 flags) { ftCo_Fighter* fp = GET_FIGHTER(gobj); itPickup* pickup = &fp->x294_itPickup; @@ -85,8 +85,8 @@ HSD_GObj* ftpickupitem_800942A0(HSD_GObj* gobj, u32 flags) } { float min_dist_sq = 30000; - HSD_GObj* cur = HSD_GObj_Entities->items; - HSD_GObj* result = NULL; + Item_GObj* cur = HSD_GObj_Entities->items; + Item_GObj* result = NULL; while (cur != NULL) { if (Item_IsGrabbable(cur)) { enum_t unk_enum = it_8026B2B4(cur); @@ -96,8 +96,10 @@ HSD_GObj* ftpickupitem_800942A0(HSD_GObj* gobj, u32 flags) if ((unk_enum == 0 && flags & (1 << 0)) || (unk_enum == 1 && flags & (1 << 1))) { - Vec4* vec; Vec3 it_pos; + Vec4* vec; + PAD_STACK(4); + it_8026B344(cur, &it_pos); { float x_range = it_8026B378(cur); @@ -134,7 +136,7 @@ HSD_GObj* ftpickupitem_800942A0(HSD_GObj* gobj, u32 flags) } } -bool ftpickupitem_8009447C(HSD_GObj* gobj, HSD_GObj* item_gobj) +bool ftpickupitem_8009447C(ftCo_GObj* gobj, Item_GObj* item_gobj) { ftCo_Fighter* fp = GET_FIGHTER(gobj); if (item_gobj == NULL) { @@ -189,7 +191,7 @@ bool ftpickupitem_8009447C(HSD_GObj* gobj, HSD_GObj* item_gobj) return false; } -void ftpickupitem_80094694(HSD_GObj* gobj, FtMotionId msid, bool loop) +void ftpickupitem_80094694(ftCo_GObj* gobj, FtMotionId msid, bool loop) { ftCo_Fighter* fp = gobj->user_data; { @@ -221,11 +223,11 @@ void ftpickupitem_80094694(HSD_GObj* gobj, FtMotionId msid, bool loop) } } -bool ftpickupitem_80094790(HSD_GObj* gobj) +bool ftpickupitem_80094790(ftCo_GObj* gobj) { u8 _[8] = { 0 }; if (GET_FIGHTER(gobj)->x1978 == NULL) { - HSD_GObj* unk_gobj = ftpickupitem_800942A0(gobj, 3); + Item_GObj* unk_gobj = ftpickupitem_800942A0(gobj, 3); if (unk_gobj != NULL) { if (!it_8026B2B4(unk_gobj)) { ftpickupitem_80094694(gobj, 92, 0); @@ -238,7 +240,7 @@ bool ftpickupitem_80094790(HSD_GObj* gobj) return false; } -void ftpickupitem_80094818(HSD_GObj* gobj, int arg1) +void ftpickupitem_80094818(ftCo_GObj* gobj, int arg1) { u8 _[8] = { 0 }; ftCo_Fighter* fp = gobj->user_data; @@ -306,7 +308,7 @@ static inline enum_t inlineA0(ftCo_Fighter* fp) return unk_enum; } -void ftpickupitem_Anim(HSD_GObj* gobj) +void ftpickupitem_Anim(ftCo_GObj* gobj) { ftCo_Fighter* fp = gobj->user_data; if (ftCheckThrowB3(fp)) { @@ -335,19 +337,19 @@ void ftpickupitem_Anim(HSD_GObj* gobj) } } -void ftpickupitem_IASA(HSD_GObj* gobj) {} +void ftpickupitem_IASA(ftCo_GObj* gobj) {} -void ftpickupitem_Phys(HSD_GObj* gobj) +void ftpickupitem_Phys(ftCo_GObj* gobj) { ft_80084F3C(gobj); } -void ftpickupitem_Coll(HSD_GObj* gobj) +void ftpickupitem_Coll(ftCo_GObj* gobj) { ft_800841B8(gobj, ftpickupitem_80094D90); } -void ftpickupitem_80094B6C(HSD_GObj* gobj, HSD_GObj* item_gobj) +void ftpickupitem_80094B6C(ftCo_GObj* gobj, Item_GObj* item_gobj) { Vec3 vec; u8 _[4] = { 0 }; @@ -403,7 +405,7 @@ void ftpickupitem_80094B6C(HSD_GObj* gobj, HSD_GObj* item_gobj) } } -void ftpickupitem_80094D90(HSD_GObj* gobj) +void ftpickupitem_80094D90(ftCo_GObj* gobj) { ftCo_Fighter* fp = gobj->user_data; ftCo_8009750C(gobj); @@ -417,7 +419,7 @@ void ftpickupitem_80094D90(HSD_GObj* gobj) ftCo_800CC730(gobj); } -void ftpickupitem_80094DF8(HSD_GObj* gobj) +void ftpickupitem_80094DF8(ftCo_GObj* gobj) { ftCo_Fighter* fp = gobj->user_data; if (fp->item_gobj != NULL) { diff --git a/src/melee/ft/chara/ftCommon/types.h b/src/melee/ft/chara/ftCommon/types.h index 66f535ee55..3fcf86de4b 100644 --- a/src/melee/ft/chara/ftCommon/types.h +++ b/src/melee/ft/chara/ftCommon/types.h @@ -83,7 +83,7 @@ union ftCommon_MotionVars { /* fp+236C */ float x2C; } guard; struct { - /* fp+2340 */ bool x0; + /* fp+2340 */ bool x0; // itemget action is heavy type? } itemget; struct { /* fp+2340 */ float facing_dir; diff --git a/src/melee/ft/ftcommon.c b/src/melee/ft/ftcommon.c index 6da75388b6..cc5c221786 100644 --- a/src/melee/ft/ftcommon.c +++ b/src/melee/ft/ftcommon.c @@ -1632,7 +1632,7 @@ void ftCommon_8007FA00(HSD_GObj* gobj) it_80294E78(fp->x197C, fp->x34_scale.y * vec[2].x); } -void ftCommon_8007FA58(HSD_GObj* gobj, HSD_GObj* arg1) +void ftCommon_8007FA58(ftCo_GObj* gobj, Item_GObj* arg1) { Fighter* fp = gobj->user_data; Vec3 vec; diff --git a/src/melee/ft/ftcommon.h b/src/melee/ft/ftcommon.h index 0a38e4783f..e6d09040ae 100644 --- a/src/melee/ft/ftcommon.h +++ b/src/melee/ft/ftcommon.h @@ -3,6 +3,7 @@ #include "ft/forward.h" #include "ftCommon/forward.h" +#include "it/forward.h" #include /* 07C930 */ void ftCommon_8007C930(ftCo_Fighter*, float); @@ -102,7 +103,7 @@ /* 07F948 */ void ftCommon_8007F948(ftCo_GObj*, ftCo_GObj*, s32); /* 07F9B4 */ void ftCommon_8007F9B4(ftCo_GObj*); /* 07FA00 */ void ftCommon_8007FA00(ftCo_GObj*); -/* 07FA58 */ void ftCommon_8007FA58(ftCo_GObj*, ftCo_GObj*); +/* 07FA58 */ void ftCommon_8007FA58(ftCo_GObj*, Item_GObj*); /* 07FC7C */ void ftCommon_8007FC7C(ftCo_GObj*, float); /* 07FDA0 */ void ftCommon_8007FDA0(ftCo_GObj*); /* 07FE84 */ void ftCommon_8007FE84(ftCo_GObj*, ftCo_GObj*, s32, float); diff --git a/src/melee/ft/ftlib.c b/src/melee/ft/ftlib.c index ddfe7eeba3..9c3d8e00ad 100644 --- a/src/melee/ft/ftlib.c +++ b/src/melee/ft/ftlib.c @@ -781,7 +781,7 @@ void ftLib_80087140(HSD_GObj* gobj) } } -void ftLib_800871A8(HSD_GObj* gobj, HSD_GObj* item_gobj) +void ftLib_800871A8(Fighter_GObj* gobj, Item_GObj* item_gobj) { Fighter* fp = GET_FIGHTER(gobj); HSD_ASSERT(1117, itGetKind(item_gobj) == It_Kind_MetalB); diff --git a/src/melee/ft/ftlib.h b/src/melee/ft/ftlib.h index 37790ce741..9d5dcd1d7b 100644 --- a/src/melee/ft/ftlib.h +++ b/src/melee/ft/ftlib.h @@ -72,7 +72,7 @@ /* 0870F0 */ void ftLib_800870F0(HSD_GObj*, s32); /* 087120 */ s32 ftLib_80087120(HSD_GObj*); /* 087140 */ void ftLib_80087140(HSD_GObj*); -/* 0871A8 */ void ftLib_800871A8(HSD_GObj*, HSD_GObj*); +/* 0871A8 */ void ftLib_800871A8(Fighter_GObj*, Item_GObj*); /* 087284 */ bool ftLib_80087284(HSD_GObj*); /* 0872A4 */ FighterKind ftLib_800872A4(HSD_GObj*); /* 0872B0 */ void* ftLib_800872B0(HSD_GObj*); diff --git a/src/melee/it/itCommonItems.h b/src/melee/it/itCommonItems.h index 512057cda0..38629c449c 100644 --- a/src/melee/it/itCommonItems.h +++ b/src/melee/it/itCommonItems.h @@ -16,7 +16,7 @@ typedef struct { } ItCapsuleVars; typedef struct { - bool x0; // [1 or true] + bool x0; // [true] s32 x4; // [8] } ItCapsuleAttr; @@ -152,8 +152,8 @@ typedef struct ItLGunVars { } ItLGunVars; typedef struct ItLGunAttr { - int x0; // [16] - Vec3 pos; // [0, 2.128, 6.668] + int max_ammo; // [16] + Vec3 pos; // [0, 2.128, 6.668] } ItLGunAttr; typedef struct ItLGunRayVars { diff --git a/src/melee/it/item.c b/src/melee/it/item.c index d4d83673c7..bea71e60d5 100644 --- a/src/melee/it/item.c +++ b/src/melee/it/item.c @@ -2027,22 +2027,19 @@ void Item_8026A8EC(Item_GObj* gobj) HSD_GObjPLink_80390228(gobj); } -// These param names do no match up with those in function declaration -// (Item_GObj* gobj, HSD_GObj* owner_gobj, Fighter_Part part) -void Item_8026AB54(HSD_GObj* gobj, HSD_GObj* pickup_gfx, - Fighter_Part pickup_sfx) +void Item_8026AB54(Item_GObj* gobj, HSD_GObj* owner_gobj, Fighter_Part part) { u8 _[16]; Item* item_data = (Item*) HSD_GObjGetUserData(gobj); it_80273168(gobj); - it_802742F4(gobj, pickup_gfx, pickup_sfx); + it_802742F4(gobj, owner_gobj, part); RunCallback(gobj, item_data->xB8_itemLogicTable->picked_up); Item_8026B074(item_data); } -void Item_8026ABD8(HSD_GObj* gobj, Vec3* pos, f32 arg2) +void Item_8026ABD8(Item_GObj* gobj, Vec3* pos, f32 arg2) { u8 _[8]; Item* item_data = (Item*) HSD_GObjGetUserData(gobj); @@ -2219,7 +2216,7 @@ static void Item_8026B0B4(HSD_GObj* gobj) } /// Check if item is grabbable -bool Item_IsGrabbable(HSD_GObj* gobj) +bool Item_IsGrabbable(Item_GObj* gobj) { Item* temp_item; diff --git a/src/melee/it/item.h b/src/melee/it/item.h index cccc749cba..c63a9e677a 100644 --- a/src/melee/it/item.h +++ b/src/melee/it/item.h @@ -39,7 +39,7 @@ struct ItemStateDesc; /* 26A8EC */ void Item_8026A8EC(Item_GObj* gobj); /* 26AB54 */ void Item_8026AB54(HSD_GObj* gobj, HSD_GObj* owner_gobj, Fighter_Part part); -/* 26ABD8 */ void Item_8026ABD8(HSD_GObj* gobj, Vec3* pos, float); +/* 26ABD8 */ void Item_8026ABD8(Item_GObj* gobj, Vec3* pos, float); /* 26AC74 */ void Item_8026AC74(HSD_GObj* gobj, Vec3*, Vec3*, float); /* 26AD20 */ void Item_8026AD20(HSD_GObj* gobj, Vec3*, Vec3*, float); /* 26ADC0 */ void Item_8026ADC0(HSD_GObj* gobj); @@ -54,7 +54,7 @@ struct ItemStateDesc; int volume); /* 26B034 */ void Item_8026B034(Item* item_data); /* 26B074 */ void Item_8026B074(Item* item_data); -/* 26B1A4 */ bool Item_IsGrabbable(HSD_GObj* gobj); +/* 26B1A4 */ bool Item_IsGrabbable(Item_GObj* gobj); /* 4A0C38 */ extern HSD_ObjAllocData Item_804A0C38; /* 4A0C64 */ extern HSD_ObjAllocUnk Item_804A0C64; /* 4A0CCC */ extern HSD_ObjAllocUnk2 Item_804A0CCC; diff --git a/src/melee/it/items/itlgun.c b/src/melee/it/items/itlgun.c index d2337b9987..71a9592438 100644 --- a/src/melee/it/items/itlgun.c +++ b/src/melee/it/items/itlgun.c @@ -43,7 +43,7 @@ void it_8028E738(Item_GObj* gobj) { Item* ip = gobj->user_data; ItLGunAttr* item_spec_attr = ip->xC4_article_data->x4_specialAttributes; - ip->xD4C = item_spec_attr->x0; + ip->xD4C = item_spec_attr->max_ammo; ip->xDD4_itemVar.lgun.timer = 0; it_8028E860(gobj); } diff --git a/src/melee/it/items/itrabbitc.c b/src/melee/it/items/itrabbitc.c index 44c1630a07..2f10d7ae59 100644 --- a/src/melee/it/items/itrabbitc.c +++ b/src/melee/it/items/itrabbitc.c @@ -1,63 +1,219 @@ -#include - -#include +#include "it/forward.h" + +#include "itrabbitc.h" + +#include "it/it_266F.h" +#include "it/it_26B1.h" +#include "it/it_2725.h" +#include "it/items/types.h" + +#include +#include +#include + +/* 295138 */ static void it_80295138(Item_GObj*); +/* 295188 */ static bool it_80295188(Item_GObj*); +/* 295190 */ static void it_80295190(Item_GObj*); +/* 295194 */ static bool it_80295194(Item_GObj*); +/* 2951C0 */ static void it_802951C0(Item_GObj*); +/* 2951E8 */ static bool it_802951E8(Item_GObj*); +/* 2951F0 */ static void it_802951F0(Item_GObj*); +/* 295220 */ static bool it_80295220(Item_GObj*); +/* 295290 */ static bool it_80295290(Item_GObj*); +/* 2952DC */ static void it_802952DC(Item_GObj*); +/* 29530C */ static bool it_8029530C(Item_GObj*); +/* 295368 */ static bool it_80295368(Item_GObj*); +/* 295370 */ static void it_80295370(Item_GObj*); +/* 295374 */ static bool it_80295374(Item_GObj*); + +ItemStateTable it_803F6270[] = { + { -1, it_80295188, it_80295190, it_80295194 }, + { -1, it_802951E8, it_802951F0, it_80295220 }, + { -1, it_80295290, NULL, NULL }, + { -1, it_802951E8, it_802952DC, it_8029530C }, + { -1, it_80295368, it_80295370, it_80295374 }, +}; + +bool it_80294DA0(Item_GObj* item_gobj) +{ + return itColl_BounceOffShield(item_gobj); +} -/// #it_80294DA0 +HSD_GObj* it_80294DC0(Vec3* pos) +{ + Item_GObj* item_gobj; + SpawnItem spawn; + + spawn.kind = It_Kind_RabbitC; + spawn.prev_pos = *pos; + spawn.pos = spawn.prev_pos; + spawn.facing_dir = -1.0f; + spawn.x3C_damage = 0; + spawn.vel.z = 0.0f; + spawn.vel.y = 0.0f; + spawn.vel.x = 0.0f; + spawn.x0_parent_gobj = 0; + spawn.x4_parent_gobj2 = spawn.x0_parent_gobj; + spawn.x44_flag.bits.b0 = 1; + spawn.x40 = 0; + item_gobj = Item_80268B5C(&spawn); + if (item_gobj != NULL) { + it_80295138(item_gobj); + } + return item_gobj; +} -/// #it_80294DC0 +void it_80294E78(Item_GObj* item_gobj, f32 arg1) +{ + PAD_STACK(4); -/// #it_80294E78 + it_80272F7C(it_80272CC0(item_gobj, 1), arg1); +} -/// #it_80294EB0 +void it_80294EB0(Item_GObj* item_gobj, Vec3* input_pos1, Vec3* input_pos2) +{ + HSD_JObj* item_jobj_var; + Vec3 pos_var; + PAD_STACK(4); + + item_jobj_var = it_80272CC0(item_gobj, 8); + HSD_JObjGetTranslation(item_jobj_var, &pos_var); + pos_var.x += input_pos1->x; + pos_var.y += input_pos1->y; + pos_var.z += input_pos1->z; + HSD_JObjSetTranslate(item_jobj_var, &pos_var); + + item_jobj_var = it_80272CC0(item_gobj, 4); + HSD_JObjGetTranslation(item_jobj_var, &pos_var); + pos_var.x += input_pos2->x; + pos_var.y += input_pos2->y; + pos_var.z += input_pos2->z; + HSD_JObjSetTranslate(item_jobj_var, &pos_var); +} -/// #it_802950D4 +void it_802950D4(Item_GObj* item_gobj, int arg1) +{ + HSD_JObj* item_jobj; + PAD_STACK(4); + + item_jobj = it_80272CC0(item_gobj, 3); + if (arg1 != 0) { + it_80272A18(item_jobj); + return; + } + it_80272A3C(item_jobj); +} -/// #it_80295118 +void it_80295118(Item_GObj* item_gobj) +{ + it_802951C0(item_gobj); +} -/// #it_80295138 +void it_80295138(Item_GObj* item_gobj) +{ + Item* item; + + item = item_gobj->user_data; + item->x40_vel.z = 0.0f; + item->x40_vel.y = 0.0f; + item->x40_vel.x = 0.0f; + it_8026B390(item_gobj); + Item_80268E5C(item_gobj, 0, ITEM_ANIM_UPDATE); +} -bool it_80295188(void) +bool it_80295188(Item_GObj* item_gobj) { return false; } -void it_80295190(void) {} +void it_80295190(Item_GObj* item_gobj) {} -/// #it_80295194 +bool it_80295194(Item_GObj* item_gobj) +{ + it_8026D62C(item_gobj, it_802951C0); + return false; +} -/// #it_802951C0 +void it_802951C0(HSD_GObj* gobj) +{ + Item_80268E5C(gobj, 1, ITEM_ANIM_UPDATE); +} -bool it_802951E8(void) +bool it_802951E8(Item_GObj* item_gobj) { return false; } -/// #it_802951F0 +void it_802951F0(Item_GObj* item_gobj) +{ + ItemAttr* attr; -/// #it_80295220 + attr = ((Item*) item_gobj->user_data)->xCC_item_attr; + it_80272860(item_gobj, attr->x10_fall_speed, attr->x14_fall_speed_max); +} -/// #it_8029524C +bool it_80295220(Item_GObj* item_gobj) +{ + it_8026E15C(item_gobj, it_80295138); + return false; +} + +void it_8029524C(Item_GObj* item_gobj) +{ + PAD_STACK(8); + + Item_80268E5C(item_gobj, 2, ITEM_ANIM_UPDATE); + it_80272A3C(it_80272CC0(item_gobj, 3)); +} -bool it_80295290(void) +bool it_80295290(Item_GObj* item_gobj) { return false; } -/// #it_80295298 +void it_80295298(Item_GObj* item_gobj) +{ + PAD_STACK(8); + + Item_80268E5C(item_gobj, 1, 6); + it_80272A18(it_80272CC0(item_gobj, 3)); +} + +void it_802952DC(Item_GObj* item_gobj) +{ + ItemAttr* attr; -/// #it_802952DC + attr = ((Item*) item_gobj->user_data)->xCC_item_attr; + it_80272860(item_gobj, attr->x10_fall_speed, attr->x14_fall_speed_max); +} -/// #it_8029530C +bool it_8029530C(Item_GObj* item_gobj) +{ + if (it_8026DA08(item_gobj) != 0) { + return true; + } + return false; +} -/// #it_80295340 +void it_80295340(Item_GObj* item_gobj) +{ + Item_80268E5C(item_gobj, 4, ITEM_ANIM_UPDATE); +} -bool it_80295368(void) +bool it_80295368(Item_GObj* item_gobj) { return false; } -void it_80295370(void) {} +void it_80295370(Item_GObj* item_gobj) {} -/// #it_80295374 +bool it_80295374(Item_GObj* item_gobj) +{ + it_8026E8C4(item_gobj, it_80295138, it_802951C0); + return false; +} -/// #it_802953A8 +void it_802953A8(Item_GObj* item_gobj, HSD_GObj* ref_gobj) +{ + it_8026B894(item_gobj, ref_gobj); +} diff --git a/src/melee/it/items/itrabbitc.h b/src/melee/it/items/itrabbitc.h index 2f6d019a48..00072c1f03 100644 --- a/src/melee/it/items/itrabbitc.h +++ b/src/melee/it/items/itrabbitc.h @@ -13,24 +13,10 @@ /* 294EB0 */ void it_80294EB0(Item_GObj*, Vec3*, Vec3*); /* 2950D4 */ void it_802950D4(Item_GObj*, bool); /* 295118 */ void it_80295118(Item_GObj*); -/* 295138 */ UNK_RET it_80295138(UNK_PARAMS); -/* 295188 */ UNK_RET it_80295188(UNK_PARAMS); -/* 295190 */ UNK_RET it_80295190(UNK_PARAMS); -/* 295194 */ UNK_RET it_80295194(UNK_PARAMS); -/* 2951C0 */ UNK_RET it_802951C0(UNK_PARAMS); -/* 2951E8 */ UNK_RET it_802951E8(UNK_PARAMS); -/* 2951F0 */ UNK_RET it_802951F0(UNK_PARAMS); -/* 295220 */ UNK_RET it_80295220(UNK_PARAMS); /* 29524C */ void it_8029524C(Item_GObj*); -/* 295290 */ UNK_RET it_80295290(UNK_PARAMS); /* 295298 */ void it_80295298(Item_GObj*); -/* 2952DC */ UNK_RET it_802952DC(UNK_PARAMS); -/* 29530C */ UNK_RET it_8029530C(UNK_PARAMS); /* 295340 */ void it_80295340(Item_GObj*); -/* 295368 */ UNK_RET it_80295368(UNK_PARAMS); -/* 295370 */ UNK_RET it_80295370(UNK_PARAMS); -/* 295374 */ UNK_RET it_80295374(UNK_PARAMS); -/* 2953A8 */ void it_802953A8(Item_GObj*, Item_GObj*); +/* 2953A8 */ void it_802953A8(Item_GObj*, HSD_GObj*); /* 3F6270 */ extern ItemStateTable it_803F6270[]; #endif diff --git a/src/melee/pl/pl_0371.h b/src/melee/pl/pl_0371.h index 3ca108eb3d..bdcbcf9c94 100644 --- a/src/melee/pl/pl_0371.h +++ b/src/melee/pl/pl_0371.h @@ -16,9 +16,9 @@ /* 03E0E8 */ void pl_8003E0E8(u8, int); /* 03E114 */ void pl_8003E114(u8, int, float); /* 03E150 */ void pl_8003E150(int slot, bool); -/* 03E17C */ void pl_8003E17C(u8, int, HSD_GObj*); +/* 03E17C */ void pl_8003E17C(u8, int, Item_GObj*); /* 03E4A4 */ void pl_8003E4A4(u8 slot, bool, s32, s32); -/* 03E854 */ void pl_8003E854(u8, int, HSD_GObj*); +/* 03E854 */ void pl_8003E854(u8, int, Item_GObj*); /* 03E978 */ void pl_8003E978(u8 slot, bool fp_x221F_b4, Item_GObj* item_gobj, float y0, float, float, float, float x1, float y1, float frame_speed_mul);