Put const data in teachers

This commit is contained in:
Tal Hayon 2022-04-16 11:28:41 +03:00
parent f4ab2b02b6
commit f614c35329
4 changed files with 24 additions and 26 deletions

View File

@ -39372,16 +39372,6 @@
"size": 30,
"type": "animation"
},
{
"path": "teachers/gUnk_08113910.bin",
"start": 1128720,
"size": 32
},
{
"path": "teachers/gUnk_08113930.bin",
"start": 1128752,
"size": 128
},
{
"path": "animations/gSpriteAnimations_WindTribespeople_0_0.bin",
"start": 1129279,

View File

@ -1,11 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08113910:: @ 08113910
.incbin "teachers/gUnk_08113910.bin"
gUnk_08113930:: @ 08113930
.incbin "teachers/gUnk_08113930.bin"

View File

@ -1274,7 +1274,7 @@ SECTIONS {
src/npc/mama.o(.rodata);
data/animations/npc/mama.o(.rodata);
data/animations/npc/emma.o(.rodata);
data/const/npc/teachers.o(.rodata);
src/npc/teachers.o(.rodata);
data/animations/npc/teachers.o(.rodata);
data/const/npc/windTribespeople.o(.rodata);
data/animations/npc/windTribespeople.o(.rodata);

View File

@ -5,9 +5,10 @@
#include "script.h"
#include "npc.h"
extern SpriteLoadData gUnk_08113910[];
extern Dialog gUnk_08113930[];
static const SpriteLoadData gUnk_08113910[] = {
{ 0x103, 0x4f, 0x4 }, { 0x2103, 0x4f, 0x4 }, { 0, 0, 0 }, { 0, 0, 0 },
{ 0, 0x50, 0x4 }, { 0x2002, 0x50, 0x4 }, { 0x4000, 0x50, 0x4 }, { 0, 0, 0 },
};
void Teachers(Entity* this) {
switch (this->action) {
@ -70,13 +71,31 @@ void Teachers_Head(Entity* this) {
}
void sub_0806C70C(Entity* this) {
static const Dialog gUnk_08113930[][8] = {
{ { 0, 0, 1, 1, { 0, 0x3e01 } },
{ 0, 0, 1, 1, { 0, 0x3e01 } },
{ 0, 0, 1, 1, { 0, 0x3e01 } },
{ 0, 0, 1, 1, { 0, 0x3e01 } },
{ 0, 0, 1, 1, { 0, 0x3e01 } },
{ 0, 0, 1, 1, { 0, 0x3e01 } },
{ 0, 0, 1, 1, { 0, 0x3e09 } },
{ 0, 0, 1, 1, { 0, 0x3e09 } } },
{ { 0xa, 0, 3, 1, { 0x3435, 0x3434 } },
{ 0xa, 0, 3, 1, { 0x3435, 0x3434 } },
{ 0xa, 0, 3, 1, { 0x3528, 0x3527 } },
{ 0xa, 0, 3, 1, { 0x3625, 0x3624 } },
{ 0, 0, 3, 1, { 0x3e03, 0x3e02 } },
{ 0, 0, 1, 1, { 0, 0x3e06 } },
{ 0, 0, 1, 1, { 0, 0x3e0a } },
{ 0, 0, 1, 1, { 0, 0x3e0a } } },
};
int offset;
offset = gSave.global_progress - 2;
if (offset < 0)
offset = 0;
ShowNPCDialogue(this, gUnk_08113930 + this->type * 8 + offset);
ShowNPCDialogue(this, &gUnk_08113930[this->type][offset]);
}
void Teachers_Fusion(Entity* this) {