diff --git a/assets/assets.json b/assets/assets.json index 9be3efb1..3000863c 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -42304,11 +42304,6 @@ "size": 40, "type": "animation" }, - { - "path": "smoke/gUnk_08121068.bin", - "start": 1183848, - "size": 8 - }, { "path": "animations/gSpriteAnimations_PushableRock_0.bin", "start": 1183888, diff --git a/data/const/object/smoke.s b/data/const/object/smoke.s deleted file mode 100644 index ec51b4fa..00000000 --- a/data/const/object/smoke.s +++ /dev/null @@ -1,16 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08121060:: @ 08121060 - .4byte sub_0808A40C - .4byte sub_0808A46C - -gUnk_08121068:: @ 08121068 - .incbin "smoke/gUnk_08121068.bin" - -gUnk_08121070:: @ 08121070 - .4byte sub_0808A484 - .4byte sub_0808A4D0 diff --git a/linker.ld b/linker.ld index 4b41aeec..bb948f8e 100644 --- a/linker.ld +++ b/linker.ld @@ -1384,7 +1384,7 @@ SECTIONS { data/animations/object/object2A.o(.rodata); src/object/beanstalk.o(.rodata); data/animations/object/beanstalk.o(.rodata); - data/const/object/smoke.o(.rodata); + src/object/smoke.o(.rodata); src/object/pushableRock.o(.rodata); data/animations/object/pushableRock.o(.rodata); src/object/hittableLever.o(.rodata); diff --git a/src/object/smoke.c b/src/object/smoke.c index a33cf5b3..8f76ea10 100644 --- a/src/object/smoke.c +++ b/src/object/smoke.c @@ -1,15 +1,22 @@ #include "object.h" -extern void (*const gUnk_08121060[])(Entity*); -extern void (*const gUnk_08121070[])(Entity*); - -extern s8 gUnk_08121068[]; +void sub_0808A40C(Entity*); +void sub_0808A46C(Entity*); +void sub_0808A484(Entity*); +void sub_0808A4D0(Entity*); void Smoke(Entity* this) { - gUnk_08121060[this->type](this); + static void (*const typeFuncs[])(Entity*) = { + sub_0808A40C, + sub_0808A46C, + }; + typeFuncs[this->type](this); } void sub_0808A40C(Entity* this) { + static const s8 gUnk_08121068[] = { + -1, 1, -2, 2, 0, 0, 0, 0, + }; Entity* ent; if (this->action == 0) { @@ -27,7 +34,11 @@ void sub_0808A40C(Entity* this) { } void sub_0808A46C(Entity* this) { - gUnk_08121070[this->action](this); + static void (*const actionFuncs[])(Entity*) = { + sub_0808A484, + sub_0808A4D0, + }; + actionFuncs[this->action](this); } void sub_0808A484(Entity* this) {