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
+12 -2
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);
}