mirror of https://github.com/zeldaret/tmc.git
Put const data into malon
This commit is contained in:
parent
1267ee74f6
commit
cc28208137
|
|
@ -1,14 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_0810FF5C:: @ 0810FF5C
|
||||
.4byte sub_08065864
|
||||
.4byte sub_08065880
|
||||
|
||||
gUnk_0810FF64:: @ 0810FF64
|
||||
.4byte sub_08065888
|
||||
.4byte sub_080658BC
|
||||
.4byte sub_08065900
|
||||
|
|
@ -1201,7 +1201,7 @@ SECTIONS {
|
|||
data/animations/npc/stockwell.o(.rodata);
|
||||
src/npc/talon.o(.rodata);
|
||||
data/animations/npc/talon.o(.rodata);
|
||||
data/const/npc/malon.o(.rodata);
|
||||
src/npc/malon.o(.rodata);
|
||||
data/animations/npc/malon.o(.rodata);
|
||||
data/const/npc/epona.o(.rodata);
|
||||
data/animations/npc/epona.o(.rodata);
|
||||
|
|
|
|||
|
|
@ -3,14 +3,26 @@
|
|||
#include "script.h"
|
||||
#include "npc.h"
|
||||
|
||||
extern void (*gUnk_0810FF5C[])(Entity* this);
|
||||
extern void (*gUnk_0810FF64[])(Entity* this);
|
||||
void sub_08065864(Entity* this);
|
||||
void sub_08065880(Entity* this);
|
||||
void sub_08065888(Entity* this);
|
||||
void sub_080658BC(Entity* this);
|
||||
void sub_08065900(Entity* this);
|
||||
|
||||
void Malon(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity * this) = {
|
||||
sub_08065864,
|
||||
sub_08065880,
|
||||
};
|
||||
static void (*const scriptedActionFuncs[])(Entity * this) = {
|
||||
sub_08065888,
|
||||
sub_080658BC,
|
||||
sub_08065900,
|
||||
};
|
||||
if (this->flags & ENT_SCRIPTED) {
|
||||
gUnk_0810FF64[this->action](this);
|
||||
scriptedActionFuncs[this->action](this);
|
||||
} else {
|
||||
gUnk_0810FF5C[this->action](this);
|
||||
actionFuncs[this->action](this);
|
||||
if (this->action != 0) {
|
||||
sub_0806ED78(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue