diff --git a/asm/d/a/item/d_a_item_static.s b/asm/d/a/item/d_a_item_static.s deleted file mode 100644 index 190b0532105..00000000000 --- a/asm/d/a/item/d_a_item_static.s +++ /dev/null @@ -1,19 +0,0 @@ -.include "macros.inc" - -.section .text, "ax" # 80037be0 - - -/* 80037BE0 00034B20 88 03 09 48 */ lbz r0, 0x948(r3) -/* 80037BE4 00034B24 60 00 00 04 */ ori r0, r0, 4 -/* 80037BE8 00034B28 98 03 09 48 */ stb r0, 0x948(r3) -/* 80037BEC 00034B2C 38 60 00 01 */ li r3, 1 -/* 80037BF0 00034B30 4E 80 00 20 */ blr -/* 80037BF4 00034B34 38 00 00 01 */ li r0, 1 -/* 80037BF8 00034B38 98 03 09 4A */ stb r0, 0x94a(r3) -/* 80037BFC 00034B3C 38 60 00 01 */ li r3, 1 -/* 80037C00 00034B40 4E 80 00 20 */ blr -/* 80037C04 00034B44 38 00 00 00 */ li r0, 0 -/* 80037C08 00034B48 98 03 09 4A */ stb r0, 0x94a(r3) -/* 80037C0C 00034B4C 38 60 00 01 */ li r3, 1 -/* 80037C10 00034B50 4E 80 00 20 */ blr - diff --git a/include/d/d_a/d_a_item_static/d_a_item_static.h b/include/d/d_a/d_a_item_static/d_a_item_static.h new file mode 100644 index 00000000000..f1508cf86ca --- /dev/null +++ b/include/d/d_a/d_a_item_static/d_a_item_static.h @@ -0,0 +1,14 @@ +#include "dolphin/types.h" + +class daItem_c{ + public: + u32 startCtrl(void); + u32 startControl(void); + u32 endControl(void); + + private: + u8 unk0[0x948]; + u8 unk2376; + u8 unk2377; + u8 unk2378; +}; \ No newline at end of file diff --git a/ldscript.lcf b/ldscript.lcf index 112189d53bb..dfc81f45fd5 100644 --- a/ldscript.lcf +++ b/ldscript.lcf @@ -774,6 +774,9 @@ FORCEACTIVE { deleteObject__14Z2CreatureLinkFv framework__14Z2CreatureLinkFUlSc startCollisionSE__14Z2CreatureLinkFUlUl + startCtrl__8daItem_cFv + startControl__8daItem_cFv + endControl__8daItem_cFv } /* .init 80003100 - 80005600 diff --git a/obj_files.mk b/obj_files.mk index 63e58ff37f4..555c5748b57 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -93,7 +93,7 @@ TEXT_O_FILES := \ $(BUILD_DIR)/asm/d/jnt/d_jnt_col.o \ $(BUILD_DIR)/asm/d/a/d_a_obj.o \ $(BUILD_DIR)/asm/d/a/itembase/d_a_itembase_static.o \ - $(BUILD_DIR)/asm/d/a/item/d_a_item_static.o \ + $(BUILD_DIR)/src/d/d_a/d_a_item_static.o \ $(BUILD_DIR)/asm/d/a/shop/item/d_a_shop_item_static.o \ $(BUILD_DIR)/asm/d/a/horse/d_a_horse_static.o \ $(BUILD_DIR)/asm/d/d_demo.o \ diff --git a/src/d/d_a/d_a_item_static.cpp b/src/d/d_a/d_a_item_static.cpp index 4bf93c8658d..63a4032eade 100644 --- a/src/d/d_a/d_a_item_static.cpp +++ b/src/d/d_a/d_a_item_static.cpp @@ -1 +1,17 @@ -// ok +#include "d/d_a/d_a_item_static/d_a_item_static.h" +#include "global.h" + +u32 daItem_c::startCtrl(void){ + this->unk2376 |= 4; + return 1; +} + +u32 daItem_c::startControl(void){ + this->unk2378 = 1; + return 1; +} + +u32 daItem_c::endControl(void){ + this->unk2378 = 0; + return 1; +} \ No newline at end of file