mirror of https://github.com/zeldaret/tmc.git
Put const data in itemLantern
This commit is contained in:
parent
7ce1bdd245
commit
d2d458d702
|
@ -1,11 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
.align 2
|
|
||||||
|
|
||||||
gUnk_0811BD68:: @ 0811BD68
|
|
||||||
.4byte sub_08075A0C
|
|
||||||
.4byte sub_08075ADC
|
|
||||||
.4byte sub_08075B54
|
|
||||||
.4byte sub_08075C9C
|
|
|
@ -1308,7 +1308,7 @@ SECTIONS {
|
||||||
src/player.o(.rodata);
|
src/player.o(.rodata);
|
||||||
src/item.o(.rodata);
|
src/item.o(.rodata);
|
||||||
src/item/itemSword.o(.rodata);
|
src/item/itemSword.o(.rodata);
|
||||||
data/const/item/itemLantern.o(.rodata);
|
src/item/itemLantern.o(.rodata);
|
||||||
data/const/item/itemBoomerang.o(.rodata);
|
data/const/item/itemBoomerang.o(.rodata);
|
||||||
data/const/item/itemBow.o(.rodata);
|
data/const/item/itemBow.o(.rodata);
|
||||||
data/const/item/itemBomb.o(.rodata);
|
data/const/item/itemBomb.o(.rodata);
|
||||||
|
|
|
@ -4,17 +4,22 @@
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
|
||||||
extern void (*const gUnk_0811BD68[])(ItemBehavior*, u32);
|
|
||||||
|
|
||||||
extern s8 gUnk_08126EEC[];
|
extern s8 gUnk_08126EEC[];
|
||||||
extern Entity* sub_08077BD4(ItemBehavior*);
|
extern Entity* sub_08077BD4(ItemBehavior*);
|
||||||
|
|
||||||
extern bool32 sub_08077F10(ItemBehavior*);
|
|
||||||
|
|
||||||
extern void sub_0807AB44(Entity*, s32, s32);
|
extern void sub_0807AB44(Entity*, s32, s32);
|
||||||
|
void sub_08075A0C(ItemBehavior*, u32);
|
||||||
|
void sub_08075ADC(ItemBehavior*, u32);
|
||||||
|
void sub_08075B54(ItemBehavior*, u32);
|
||||||
|
void sub_08075C9C(ItemBehavior*, u32);
|
||||||
|
|
||||||
void ItemLantern(ItemBehavior* this, u32 idx) {
|
void ItemLantern(ItemBehavior* this, u32 idx) {
|
||||||
gUnk_0811BD68[this->stateID](this, idx);
|
static void (*const stateFuncs[])(ItemBehavior*, u32) = {
|
||||||
|
sub_08075A0C,
|
||||||
|
sub_08075ADC,
|
||||||
|
sub_08075B54,
|
||||||
|
sub_08075C9C,
|
||||||
|
};
|
||||||
|
stateFuncs[this->stateID](this, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_08075A0C(ItemBehavior* this, u32 idx) {
|
void sub_08075A0C(ItemBehavior* this, u32 idx) {
|
||||||
|
|
Loading…
Reference in New Issue