Put const data in thoughtBubble

This commit is contained in:
Tal Hayon 2022-04-18 00:18:13 +03:00
parent de1df01c43
commit 2a528d35b3
4 changed files with 13 additions and 20 deletions

View File

@ -42966,11 +42966,6 @@
"size": 28,
"type": "animation"
},
{
"path": "thoughtBubble/ThoughtBubble_SFX.bin",
"start": 1189264,
"size": 8
},
{
"path": "animations/gSpriteAnimations_GentariCurtains_0.bin",
"start": 1189404,

View File

@ -1,12 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
ThoughtBubble_SFX:: @ 08122590
.incbin "thoughtBubble/ThoughtBubble_SFX.bin"
ThoughtBubble_Behaviors:: @ 08122598
.4byte ThoughtBubble_Init
.4byte ThoughtBubble_Update

View File

@ -1437,7 +1437,7 @@ SECTIONS {
data/animations/object/pullableLever.o(.rodata);
src/object/minecart.o(.rodata);
data/animations/object/minecart.o(.rodata);
data/const/object/thoughtBubble.o(.rodata);
src/object/thoughtBubble.o(.rodata);
data/animations/object/thoughtBubble.o(.rodata);
data/const/object/hiddenLadderDown.o(.rodata);
src/object/gentariCurtains.o(.rodata);

View File

@ -2,11 +2,21 @@
#include "entity.h"
#include "sound.h"
extern void (*const ThoughtBubble_Behaviors[])(Entity*);
void ThoughtBubble_Init(Entity*);
void ThoughtBubble_Update(Entity*);
extern u16 ThoughtBubble_SFX[];
static const u16 ThoughtBubble_SFX[] = {
SFX_METAL_CLINK,
SFX_F3,
SFX_NONE,
SFX_NONE,
};
void ThoughtBubble(Entity* this) {
static void (*const ThoughtBubble_Behaviors[])(Entity*) = {
ThoughtBubble_Init,
ThoughtBubble_Update,
};
ThoughtBubble_Behaviors[this->action](this);
}