From 4b4372dbd7c7d966246020cedf43ed4b28f75bcd Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Sun, 17 Apr 2022 20:44:10 +0300 Subject: [PATCH] Put const data in heartContainer --- assets/assets.json | 5 ----- data/const/object/heartContainer.s | 8 -------- linker.ld | 1 - src/object/heartContainer.c | 4 ++-- src/object/object30.c | 2 +- 5 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 data/const/object/heartContainer.s diff --git a/assets/assets.json b/assets/assets.json index 08cd07d8..cdd9009e 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -42640,11 +42640,6 @@ "size": 60, "type": "animation" }, - { - "path": "heartContainer/gUnk_08121C58.bin", - "start": 1186904, - "size": 12 - }, { "path": "animations/gSpriteAnimations_FileScreenObjects_0.bin", "start": 1187364, diff --git a/data/const/object/heartContainer.s b/data/const/object/heartContainer.s deleted file mode 100644 index efba07ef..00000000 --- a/data/const/object/heartContainer.s +++ /dev/null @@ -1,8 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08121C58:: @ 08121C58 - .incbin "heartContainer/gUnk_08121C58.bin" diff --git a/linker.ld b/linker.ld index f8d8de49..3904d151 100644 --- a/linker.ld +++ b/linker.ld @@ -1422,7 +1422,6 @@ SECTIONS { data/animations/object/object45.o(.rodata); src/object/giantBookLadder.o(.rodata); src/object/heartContainer.o(.rodata); - data/const/object/heartContainer.o(.rodata); data/const/object/fileScreenObjects.o(.rodata); data/animations/object/fileScreenObjects.o(.rodata); data/const/object/object49.o(.rodata); diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c index b195e6f6..9d02d53f 100644 --- a/src/object/heartContainer.c +++ b/src/object/heartContainer.c @@ -17,7 +17,7 @@ static void (*const gHeartContainerActions[])(Entity*) = { sub_0808E764, }; -extern Hitbox gUnk_08121C58; +const Hitbox3D gUnk_08121C58 = { 0, -3, { 5, 3, 3, 5 }, 6, 6, 12, {} }; void HeartContainer(Entity* this) { gHeartContainerActions[this->action](this); @@ -30,7 +30,7 @@ static void sub_0808E6A0(Entity* this) { this->action = 1; this->type = 0x62; this->spriteSettings.draw = 0; - this->hitbox = &gUnk_08121C58; + this->hitbox = (Hitbox*)&gUnk_08121C58; this->collisionLayer = 3; this->updatePriority = PRIO_NO_BLOCK; } diff --git a/src/object/object30.c b/src/object/object30.c index 6a999eb3..6ebc3d4f 100644 --- a/src/object/object30.c +++ b/src/object/object30.c @@ -21,7 +21,7 @@ typedef struct { } Object30Entity; extern u32 sub_0806F798(Entity*); -extern const Hitbox gUnk_08121C58; +extern const Hitbox3D gUnk_08121C58; void Object30_Init(Object30Entity*); void Object30_Action1(Object30Entity*);