mirror of https://github.com/zeldaret/tmc.git
Put const data into castorWildStatue
This commit is contained in:
parent
6047d2ec3e
commit
08eba596c4
|
@ -37423,31 +37423,6 @@
|
||||||
"size": 6,
|
"size": 6,
|
||||||
"type": "animation"
|
"type": "animation"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "castorWildsStatue/gUnk_08110E64.bin",
|
|
||||||
"start": 1117796,
|
|
||||||
"size": 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "castorWildsStatue/gUnk_08110E68.bin",
|
|
||||||
"start": 1117800,
|
|
||||||
"size": 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "castorWildsStatue/gUnk_08110E78.bin",
|
|
||||||
"start": 1117816,
|
|
||||||
"size": 18
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "castorWildsStatue/gUnk_08110E8A.bin",
|
|
||||||
"start": 1117834,
|
|
||||||
"size": 10
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "castorWildsStatue/gUnk_08110E94.bin",
|
|
||||||
"start": 1117844,
|
|
||||||
"size": 8
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "cat/gUnk_08111114.bin",
|
"path": "cat/gUnk_08111114.bin",
|
||||||
"start": 1118484,
|
"start": 1118484,
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
.align 2
|
|
||||||
|
|
||||||
gUnk_08110E4C:: @ 08110E4C
|
|
||||||
.4byte sub_080673C0
|
|
||||||
.4byte sub_080673F4
|
|
||||||
.4byte sub_08067410
|
|
||||||
.4byte sub_0806752C
|
|
||||||
|
|
||||||
gUnk_08110E5C:: @ 08110E5C
|
|
||||||
.4byte sub_08067418
|
|
||||||
.4byte sub_08067514
|
|
||||||
|
|
||||||
gUnk_08110E64:: @ 08110E64
|
|
||||||
.incbin "castorWildsStatue/gUnk_08110E64.bin"
|
|
||||||
|
|
||||||
gUnk_08110E68:: @ 08110E68
|
|
||||||
.incbin "castorWildsStatue/gUnk_08110E68.bin"
|
|
||||||
|
|
||||||
gUnk_08110E78:: @ 08110E78
|
|
||||||
.incbin "castorWildsStatue/gUnk_08110E78.bin"
|
|
||||||
|
|
||||||
gUnk_08110E8A:: @ 08110E8A
|
|
||||||
.incbin "castorWildsStatue/gUnk_08110E8A.bin"
|
|
||||||
|
|
||||||
gUnk_08110E94:: @ 08110E94
|
|
||||||
.incbin "castorWildsStatue/gUnk_08110E94.bin"
|
|
|
@ -1225,7 +1225,7 @@ SECTIONS {
|
||||||
data/animations/npc/mutoh.o(.rodata);
|
data/animations/npc/mutoh.o(.rodata);
|
||||||
src/npc/carpenter.o(.rodata);
|
src/npc/carpenter.o(.rodata);
|
||||||
data/animations/npc/carpenter.o(.rodata);
|
data/animations/npc/carpenter.o(.rodata);
|
||||||
data/const/npc/castorWildsStatue.o(.rodata);
|
src/npc/castorWildsStatue.o(.rodata);
|
||||||
data/animations/npc/castorWildsStatue.o(.rodata);
|
data/animations/npc/castorWildsStatue.o(.rodata);
|
||||||
data/const/npc/cat.o(.rodata);
|
data/const/npc/cat.o(.rodata);
|
||||||
data/animations/npc/cat.o(.rodata);
|
data/animations/npc/cat.o(.rodata);
|
||||||
|
|
|
@ -6,27 +6,35 @@
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "npc.h"
|
#include "npc.h"
|
||||||
|
|
||||||
extern Hitbox gUnk_08110E94;
|
static const Hitbox gUnk_08110E94;
|
||||||
|
|
||||||
extern void (*gUnk_08110E4C[])(Entity*);
|
|
||||||
extern void (*gUnk_08110E5C[])(Entity*);
|
|
||||||
|
|
||||||
extern s8 gUnk_08110E64[];
|
|
||||||
|
|
||||||
extern u32 gUnk_08110E68[];
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
s8 x;
|
s8 x;
|
||||||
s8 y;
|
s8 y;
|
||||||
} PACKED PosOffset;
|
} PACKED PosOffset;
|
||||||
extern PosOffset gUnk_08110E78[];
|
|
||||||
extern PosOffset gUnk_08110E8A[];
|
void sub_080673C0(Entity*);
|
||||||
|
void sub_080673F4(Entity*);
|
||||||
|
void sub_08067410(Entity*);
|
||||||
|
void sub_0806752C(Entity*);
|
||||||
|
void sub_08067418(Entity*);
|
||||||
|
void sub_08067514(Entity*);
|
||||||
|
|
||||||
void CastorWildsStatue(Entity* this) {
|
void CastorWildsStatue(Entity* this) {
|
||||||
|
static void (*const actionFuncs[])(Entity*) = {
|
||||||
|
sub_080673C0,
|
||||||
|
sub_080673F4,
|
||||||
|
sub_08067410,
|
||||||
|
sub_0806752C,
|
||||||
|
};
|
||||||
|
static void (*const scriptedActionFuncs[])(Entity*) = {
|
||||||
|
sub_08067418,
|
||||||
|
sub_08067514,
|
||||||
|
};
|
||||||
if ((this->flags & ENT_SCRIPTED) != 0) {
|
if ((this->flags & ENT_SCRIPTED) != 0) {
|
||||||
gUnk_08110E5C[this->action](this);
|
scriptedActionFuncs[this->action](this);
|
||||||
} else {
|
} else {
|
||||||
gUnk_08110E4C[this->action](this);
|
actionFuncs[this->action](this);
|
||||||
sub_0806ED78(this);
|
sub_0806ED78(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +47,7 @@ void sub_080673C0(Entity* this) {
|
||||||
}
|
}
|
||||||
this->frameIndex = this->type & 1;
|
this->frameIndex = this->type & 1;
|
||||||
if ((this->type & 1) == 0) {
|
if ((this->type & 1) == 0) {
|
||||||
this->hitbox = &gUnk_08110E94;
|
this->hitbox = (Hitbox*)&gUnk_08110E94;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +66,7 @@ void sub_08067418(Entity* this) {
|
||||||
this->action = 1;
|
this->action = 1;
|
||||||
this->field_0x74.HWORD = COORD_TO_TILE(this);
|
this->field_0x74.HWORD = COORD_TO_TILE(this);
|
||||||
if (this->type == 0) {
|
if (this->type == 0) {
|
||||||
this->hitbox = &gUnk_08110E94;
|
this->hitbox = (Hitbox*)&gUnk_08110E94;
|
||||||
SetTile(0x4022, this->field_0x74.HWORD - 1, this->collisionLayer);
|
SetTile(0x4022, this->field_0x74.HWORD - 1, this->collisionLayer);
|
||||||
SetTile(0x4022, this->field_0x74.HWORD, this->collisionLayer);
|
SetTile(0x4022, this->field_0x74.HWORD, this->collisionLayer);
|
||||||
SetTile(0x4022, this->field_0x74.HWORD + 0x3f, this->collisionLayer);
|
SetTile(0x4022, this->field_0x74.HWORD + 0x3f, this->collisionLayer);
|
||||||
|
@ -94,6 +102,7 @@ void sub_0806752C(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_08067534(Entity* this) {
|
void sub_08067534(Entity* this) {
|
||||||
|
static const s8 gUnk_08110E64[] = { -8, 8, 0, 0 };
|
||||||
Entity* entity;
|
Entity* entity;
|
||||||
s32 i;
|
s32 i;
|
||||||
for (i = 0; i < 2; ++i) {
|
for (i = 0; i < 2; ++i) {
|
||||||
|
@ -108,6 +117,7 @@ void sub_08067534(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_0806757C(Entity* this) {
|
void sub_0806757C(Entity* this) {
|
||||||
|
static const u32 gUnk_08110E68[] = { 0xc8, 0xc9, 0xca, 0xc8 };
|
||||||
if (this->subAction != 0) {
|
if (this->subAction != 0) {
|
||||||
if (this->subAction >= 3) {
|
if (this->subAction >= 3) {
|
||||||
RestorePrevTileEntity(0xe81, 1);
|
RestorePrevTileEntity(0xe81, 1);
|
||||||
|
@ -121,7 +131,13 @@ void sub_0806757C(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_080675D4(Entity* this) {
|
void sub_080675D4(Entity* this) {
|
||||||
PosOffset* gUnk = gUnk_08110E78;
|
static const PosOffset gUnk_08110E78[] = { { 0x0, 0x0 }, { 0x0, -0x10 }, { 0x0, 0x10 },
|
||||||
|
{ -0x10, 0x0 }, { 0x10, 0x0 }, { -0x10, -0x10 },
|
||||||
|
{ -0x10, 0x10 }, { 0x10, 0x10 }, { 0x10, -0x10 } };
|
||||||
|
static const PosOffset gUnk_08110E8A[] = {
|
||||||
|
{ -0xc, -0xc }, { 0xc, -0xc }, { -0xc, 0xc }, { 0xc, 0xc }, { 0x0, 0x0 }
|
||||||
|
};
|
||||||
|
const PosOffset* gUnk = gUnk_08110E78;
|
||||||
u32 subAction = (this->subAction << 2) - 0xc;
|
u32 subAction = (this->subAction << 2) - 0xc;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
@ -155,6 +171,8 @@ void sub_080675D4(Entity* this) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const Hitbox gUnk_08110E94 = { 0, 3, { 5, 3, 3, 5 }, 12, 20 };
|
||||||
|
|
||||||
void sub_080676D8(Entity* this) {
|
void sub_080676D8(Entity* this) {
|
||||||
this->subAction += 1;
|
this->subAction += 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue