mirror of https://github.com/zeldaret/tmc.git
Put const data into zelda and mutoh
This commit is contained in:
parent
878ad8878e
commit
212dffac89
|
|
@ -37285,16 +37285,6 @@
|
|||
"size": 24,
|
||||
"type": "animation"
|
||||
},
|
||||
{
|
||||
"path": "zelda/gUnk_08110BE0.bin",
|
||||
"start": 1117152,
|
||||
"size": 32
|
||||
},
|
||||
{
|
||||
"path": "zelda/gUnk_08110C00.bin",
|
||||
"start": 1117184,
|
||||
"size": 12
|
||||
},
|
||||
{
|
||||
"path": "animations/gSpriteAnimations_Mutoh_0.bin",
|
||||
"start": 1117280,
|
||||
|
|
@ -37319,16 +37309,6 @@
|
|||
"size": 5,
|
||||
"type": "animation"
|
||||
},
|
||||
{
|
||||
"path": "mutoh/gUnk_08110C0C.bin",
|
||||
"start": 1117196,
|
||||
"size": 4
|
||||
},
|
||||
{
|
||||
"path": "mutoh/gUnk_08110C10.bin",
|
||||
"start": 1117200,
|
||||
"size": 80
|
||||
},
|
||||
{
|
||||
"path": "animations/gSpriteAnimations_Carpenter_0.bin",
|
||||
"start": 1117448,
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_08110C0C:: @ 08110C0C
|
||||
.incbin "mutoh/gUnk_08110C0C.bin"
|
||||
|
||||
gUnk_08110C10:: @ 08110C10
|
||||
.incbin "mutoh/gUnk_08110C10.bin"
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_08110BD8:: @ 08110BD8
|
||||
.4byte sub_08066CCC
|
||||
.4byte sub_08066CF8
|
||||
|
||||
gUnk_08110BE0:: @ 08110BE0
|
||||
.incbin "zelda/gUnk_08110BE0.bin"
|
||||
|
||||
gUnk_08110C00:: @ 08110C00
|
||||
.incbin "zelda/gUnk_08110C00.bin"
|
||||
|
|
@ -1220,8 +1220,8 @@ SECTIONS {
|
|||
data/animations/npc/npc26.o(.rodata);
|
||||
src/npc/vaati.o(.rodata);
|
||||
data/animations/npc/vaati.o(.rodata);
|
||||
data/const/npc/zelda.o(.rodata);
|
||||
data/const/npc/mutoh.o(.rodata);
|
||||
src/npc/zelda.o(.rodata);
|
||||
src/npc/mutoh.o(.rodata);
|
||||
data/animations/npc/mutoh.o(.rodata);
|
||||
data/const/npc/carpenter.o(.rodata);
|
||||
data/animations/npc/carpenter.o(.rodata);
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@
|
|||
#include "npc.h"
|
||||
#include "item.h"
|
||||
|
||||
extern SpriteLoadData gUnk_08110C00;
|
||||
extern u16 gUnk_08110C0C[];
|
||||
extern Dialog gUnk_08110C10[];
|
||||
static const SpriteLoadData gUnk_08110C00[] = {
|
||||
{ 0x51, 0x3e, 0x4 },
|
||||
{ 0x1051, 0x3e, 0x4 },
|
||||
{ 0, 0, 0 },
|
||||
};
|
||||
|
||||
void Mutoh(Entity* this) {
|
||||
if (*(u32*)&this->cutsceneBeh == 0) {
|
||||
|
|
@ -17,7 +19,7 @@ void Mutoh(Entity* this) {
|
|||
|
||||
switch (this->action) {
|
||||
case 0:
|
||||
if (LoadExtraSpriteData(this, &gUnk_08110C00)) {
|
||||
if (LoadExtraSpriteData(this, gUnk_08110C00)) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
|
|
@ -49,6 +51,10 @@ void Mutoh_Head(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_080670B4(Entity* this) {
|
||||
static const u16 messageIndices[] = {
|
||||
0x1b02,
|
||||
0x1b03,
|
||||
};
|
||||
u32 uVar2;
|
||||
|
||||
uVar2 = 0;
|
||||
|
|
@ -57,11 +63,18 @@ void sub_080670B4(Entity* this) {
|
|||
uVar2 = 1;
|
||||
}
|
||||
}
|
||||
MessageNoOverlap(gUnk_08110C0C[uVar2], this);
|
||||
MessageNoOverlap(messageIndices[uVar2], this);
|
||||
}
|
||||
|
||||
void sub_080670E4(Entity* this) {
|
||||
ShowNPCDialogue(this, &gUnk_08110C10[gSave.global_progress]);
|
||||
static const Dialog dialogs[] = {
|
||||
{ 0, 0, 3, 1, { 0x4101, 0x4100 } }, { 0, 0, 3, 1, { 0x4101, 0x4100 } },
|
||||
{ 0, 0, 3, 1, { 0x4101, 0x4100 } }, { 0, 0, 3, 1, { 0x4101, 0x4100 } },
|
||||
{ 0, 0, 3, 1, { 0x4101, 0x4100 } }, { 0xb, 3, 4, 1, { 0x4104, 0x4102 } },
|
||||
{ 0xb, 3, 4, 1, { 0x4104, 0x4103 } }, { 0xb, 3, 4, 1, { 0x4104, 0x4103 } },
|
||||
{ 0xb, 3, 4, 1, { 0x4104, 0x4105 } }, { 0xb, 3, 4, 1, { 0x4104, 0x4105 } },
|
||||
};
|
||||
ShowNPCDialogue(this, &dialogs[gSave.global_progress]);
|
||||
}
|
||||
|
||||
void sub_08067100(Entity* this) {
|
||||
|
|
@ -71,7 +84,7 @@ void sub_08067100(Entity* this) {
|
|||
|
||||
void Mutoh_Fusion(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_08110C00) != 0) {
|
||||
if (LoadExtraSpriteData(this, gUnk_08110C00) != 0) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
InitializeAnimation(this, 2);
|
||||
|
|
|
|||
|
|
@ -9,11 +9,14 @@ void sub_08068680(Entity*, Entity*);
|
|||
void sub_08068694(Entity*, Entity*);
|
||||
extern Entity* GetEntityByType(u32, u32);
|
||||
extern void sub_080686C4(Entity*, Entity*);
|
||||
|
||||
extern void (*gUnk_08110BD8[])(Entity* ent);
|
||||
extern u16 gUnk_08110BE0[];
|
||||
void sub_08066CCC(Entity*);
|
||||
void sub_08066CF8(Entity*);
|
||||
|
||||
void Zelda(Entity* this) {
|
||||
static void (*const gUnk_08110BD8[])(Entity * ent) = {
|
||||
sub_08066CCC,
|
||||
sub_08066CF8,
|
||||
};
|
||||
gUnk_08110BD8[this->action](this);
|
||||
}
|
||||
|
||||
|
|
@ -161,9 +164,13 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
|
|||
gActiveScriptInfo.commandSize = 0;
|
||||
}
|
||||
|
||||
static const u16 gUnk_08110BE0[] = {
|
||||
0x81c, 0x85c, 0x89c, 0x8dc, 0x91c, 0x95c, 0x99c, 0x9dc, 0x9dd, 0x9de, 0x9df, 0x9e0, 0x9e1, 0x9e2, 0x0, 0x0,
|
||||
};
|
||||
|
||||
void sub_08066F94(void) {
|
||||
u16 uVar1;
|
||||
u16* puVar2;
|
||||
const u16* puVar2;
|
||||
|
||||
puVar2 = gUnk_08110BE0;
|
||||
while (*puVar2 != 0) {
|
||||
|
|
@ -175,7 +182,7 @@ void sub_08066F94(void) {
|
|||
|
||||
void sub_08066FB8(void) {
|
||||
u16 uVar1;
|
||||
u16* puVar2;
|
||||
const u16* puVar2;
|
||||
|
||||
puVar2 = gUnk_08110BE0;
|
||||
while (*puVar2 != 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue