Put const data in smallTownMinish

This commit is contained in:
Tal Hayon 2022-04-16 14:33:06 +03:00
parent 08211a573a
commit e0f57b7acf
4 changed files with 62 additions and 38 deletions

View File

@ -39909,21 +39909,6 @@
"size": 5,
"type": "animation"
},
{
"path": "smallTownMinish/gUnk_081142FC.bin",
"start": 1131260,
"size": 8
},
{
"path": "smallTownMinish/gUnk_08114304.bin",
"start": 1131268,
"size": 4
},
{
"path": "smallTownMinish/gUnk_08114308.bin",
"start": 1131272,
"size": 448
},
{
"path": "animations/gSpriteAnimations_HurdyGurdyMan_8.bin",
"start": 1131836,

View File

@ -1,14 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_081142FC:: @ 081142FC
.incbin "smallTownMinish/gUnk_081142FC.bin"
gUnk_08114304:: @ 08114304
.incbin "smallTownMinish/gUnk_08114304.bin"
gUnk_08114308:: @ 08114308
.incbin "smallTownMinish/gUnk_08114308.bin"

View File

@ -1290,7 +1290,7 @@ SECTIONS {
src/npc/clothesRack.o(.rodata);
data/animations/npc/clothesRack.o(.rodata);
src/npc/picolyteBottle.o(.rodata);
data/const/npc/smallTownMinish.o(.rodata);
src/npc/smallTownMinish.o(.rodata);
data/animations/npc/smallTownMinish.o(.rodata);
data/const/npc/hurdyGurdyMan.o(.rodata);
data/animations/npc/hurdyGurdyMan.o(.rodata);

View File

@ -6,17 +6,14 @@
#include "npc.h"
#include "functions.h"
extern Hitbox gUnk_081142FC;
extern u32 gUnk_08114304;
extern Dialog gUnk_08114308[];
void SmallTownMinish(Entity* this) {
static const Hitbox gUnk_081142FC = { -2, 1, { 0, 0, 0, 0 }, 6, 6 };
static const u8 gUnk_08114304[] = { -2, 1, 6, 6 };
if (this->action == 0) {
this->action += 1;
this->hitbox = &gUnk_081142FC;
this->hitbox = (Hitbox*)&gUnk_081142FC;
sub_0807DD50(this);
sub_08078850(this, 1, 0, &gUnk_08114304);
sub_08078850(this, 1, 0, gUnk_08114304);
} else {
sub_0807DD94(this, NULL);
}
@ -28,9 +25,65 @@ void SmallTownMinish(Entity* this) {
}
void sub_0806E2DC(Entity* this) {
static const Dialog gUnk_08114308[][8] = { { { 0x0, 0x0, 1, 1, { 0x0, 0x3539 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3539 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3539 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3638 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3737 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3839 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392c } } },
{ { 0x0, 0x0, 1, 1, { 0x0, 0x353a } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x353a } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x353a } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3639 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3738 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x383a } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392d } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392d } } },
{ { 0x0, 0x0, 1, 1, { 0x0, 0x353b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x353b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x353b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x363a } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3739 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x383b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392e } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392e } } },
{ { 0x45, 0x4, 4, 1, { 0x363c, 0x363b } },
{ 0x45, 0x4, 4, 1, { 0x363c, 0x363b } },
{ 0x45, 0x4, 4, 1, { 0x363c, 0x363b } },
{ 0x45, 0x4, 4, 1, { 0x363c, 0x363b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x373a } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x383c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392f } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x392f } } },
{ { 0x0, 0x0, 1, 1, { 0x0, 0x373b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x373b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x373b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x373b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x373b } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x383d } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3930 } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x3930 } } },
{ { 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } },
{ 0x0, 0x0, 1, 1, { 0x0, 0x4e1c } } },
{ { 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } },
{ 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } },
{ 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } },
{ 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } },
{ 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } },
{ 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } },
{ 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } },
{ 0x45, 0x4, 4, 1, { 0x4e1e, 0x4e1d } } } };
s32 dialog = gSave.global_progress - 2;
if (dialog < 0) {
dialog = 0;
}
ShowNPCDialogue(this, gUnk_08114308 + this->type2 * 8 + dialog);
ShowNPCDialogue(this, &gUnk_08114308[this->type2][dialog]);
}