overlay 17: Rename to berry_pots_app, identify rodata types

This commit is contained in:
tgsm 2023-10-09 23:41:43 -05:00
parent 11490df32b
commit 89d3620617
4 changed files with 344 additions and 167 deletions

313
asm/berry_pots_app_rodata.s Normal file
View File

@ -0,0 +1,313 @@
.include "asm/macros.inc"
.include "overlay_17.inc"
.include "global.inc"
.rodata
; FIXME: Convert all of these to C structs/arrays and figure out what order they go in.
ov17_02203D50:
.byte 2, 1, 0, 0
ov17_02203D54:
.byte 5, 1, 0, 0
ov17_02203D58:
.byte 3, 1, 0, 0
ov17_02203D5C:
.byte 4, 3, 1, 0
.public ov17_02203D60
// UnkStruct_ov17_02203D60
ov17_02203D60: ; 0x02203D60
.byte 0, 2, 1, 0, 0, 4, 3, 0, 0, 6, 5, 0
.short 0x403
.short 0xB00
.short 0
.short 58
.short 31
.short 84
.public ov17_02203D78
// u16[7]
ov17_02203D78: ; 0x02203D78
.short 30 ; NARC_resdat_resdat_00000030_bin
.short 31 ; NARC_resdat_resdat_00000031_bin
.short 29 ; NARC_resdat_resdat_00000029_bin
.short 28 ; NARC_resdat_resdat_00000028_bin
.short 0xFFFF
.short 0xFFFF
.short 79 ; NARC_resdat_resdat_00000079_bin
.balign 4, 0
.public ov17_02203D88
// GraphicsModes
ov17_02203D88: ; 0x02203D88
.word 1 ; GX_DISPMODE_GRAPHICS
.word 0 ; GX_BGMODE_0
.word 0 ; GX_BGMODE_0
.word 0 ; GX_BG0_AS_2D
.public ov17_02203D98
// Unk122_021E92D0
ov17_02203D98: ; 0x02203D98
.word 0x8
.word 0x10000
.word 0x4000
.word 0x10
.word 0x10
.public ov17_02203DAC
// SpriteResourceCountsListUnion
ov17_02203DAC: ; 0x02203DAC
.word 1
.word 1
.word 1
.word 1
.word 0
.word 0
.public ov17_02203DC4
// WindowTemplate[3]
ov17_02203DC4: ; 0x02203DC4
.byte 2
.byte 25
.byte 21
.byte 6
.byte 2
.byte 9
.short 0x1A2
.byte 0
.byte 2
.byte 19
.byte 19
.byte 4
.byte 12
.short 0xCA
.byte 0
.byte 2
.byte 19
.byte 27
.byte 4
.byte 12
.short 0x136
.public ov17_02203DDC
// BgTemplate
ov17_02203DDC: ; 0x02203DDC
.word 0
.word 0
.word 0x800
.word 0
.byte 1 ; GF_BG_SCR_SIZE_256x256
.byte 0 ; GX_BG_COLORMODE_16
.byte 30 ; GX_BG_SCRBASE_0xf000
.byte 0 ; GX_BG_CHARBASE_0x00000
.byte 0 ; GX_BG_EXTPLTT_01
.byte 3
.byte 0 ; GX_BG_AREAOVER_XLU
.byte 0
.word 0 ; FALSE
.public ov17_02203DF8
// BgTemplate
ov17_02203DF8: ; 0x02203DF8
.word 0
.word 0
.word 0x800
.word 0
.byte 1 ; GF_BG_SCR_SIZE_256x256
.byte 0 ; GX_BG_COLORMODE_16
.byte 31 ; GX_BG_SCRBASE_0xf800
.byte 4 ; GX_BG_CHARBASE_0x10000
.byte 0 ; GX_BG_EXTPLTT_01
.byte 0
.byte 0 ; GX_BG_AREAOVER_XLU
.byte 0
.word 0 ; FALSE
.public ov17_02203E14
// BgTemplate
ov17_02203E14: ; 0x02203E14
.word 0
.word 0
.word 0x800
.word 0
.byte 1 ; GF_BG_SCR_SIZE_256x256
.byte 0 ; GX_BG_COLORMODE_16
.byte 30 ; GX_BG_SCRBASE_0xf000
.byte 4 ; GX_BG_CHARBASE_0x10000
.byte 0 ; GX_BG_EXTPLTT_01
.byte 2
.byte 0 ; GX_BG_AREAOVER_XLU
.byte 0
.word 0 ; FALSE
.public ov17_02203E30
// BgTemplate
ov17_02203E30: ; 0x02203E30
.word 0
.word 0
.word 0x800
.word 0
.byte 1 ; GF_BG_SCR_SIZE_256x256
.byte 0 ; GX_BG_COLORMODE_16
.byte 31 ; GX_BG_SCRBASE_0xf800
.byte 4 ; GX_BG_CHARBASE_0x10000
.byte 0 ; GX_BG_EXTPLTT_01
.byte 0
.byte 0 ; GX_BG_AREAOVER_XLU
.byte 0
.word 0 ; FALSE
.public ov17_02203E4C
// BgTemplate
ov17_02203E4C: ; 0x02203E4C
.word 0
.word 0
.word 0x800
.word 0
.byte 1 ; GF_BG_SCR_SIZE_256x256
.byte 0 ; GX_BG_COLORMODE_16
.byte 29 ; GX_BG_SCRBASE_0xe800
.byte 0 ; GX_BG_CHARBASE_0x00000
.byte 0 ; GX_BG_EXTPLTT_01
.byte 3
.byte 0 ; GX_BG_AREAOVER_XLU
.byte 0
.word 0 ; FALSE
.public ov17_02203E68
// Unk122_021E92FC
ov17_02203E68: ; 0x02203E68
.word 0
.word 0x80
.word 0
.word 0x20
.word 0
.word 0x80
.word 0
.word 0x20
.public ov17_02203E88
// UnkStruct_ov17_02203E88
ov17_02203E88: ; 0x02203E88
.word 3, ov17_02203D5C
.word 2, ov17_02203D58
.word 2, ov17_02203D50
.word 2, ov17_02203D54
.public ov17_02203EA8
// UnkStruct_0200D2B4
ov17_02203EA8: ; 0x02203EA8
.word 0
.short 27
.short 96
.short 0
.short 5
.word 13
.word 0
.word 1 ; NNS_G2D_VRAM_TYPE_2DMAIN
.word 1
.word 0
.word 0
.word 0
.public ov17_02203ED0
// GraphicsBanks
ov17_02203ED0: ; 0x02203ED0
.word 1 ; GX_VRAM_BG_128_A
.word 0 ; GX_VRAM_BGEXTPLTT_NONE
.word 4 ; GX_VRAM_SUB_BG_128_C
.word 0 ; GX_VRAM_SUB_BGEXTPLTT_NONE
.word 16 ; GX_VRAM_OBJ_64_E
.word 0 ; GX_VRAM_OBJEXTPLTT_NONE
.word 256 ; GX_VRAM_SUB_OBJ_16_I
.word 0 ; GX_VRAM_SUB_OBJEXTPLTT_NONE
.word 0 ; GX_VRAM_TEX_NONE
.word 0 ; GX_VRAM_TEXPLTT_NONE
.public ov17_02203EF8
// UnkStruct_0200D2B4[2]
ov17_02203EF8: ; 0x02203EF8
.word 0
.short 224
.short 176
.short 0
.short 0
.word 15
.word 0
.word 1 ; NNS_G2D_VRAM_TYPE_2DMAIN
.word 1
.word 0
.word 0
.word 0
.word 0
.short 27
.short 96
.short 0
.short 2
.word 0
.word 0
.word 1 ; NNS_G2D_VRAM_TYPE_2DMAIN
.word 1
.word 0
.word 0
.word 0
.public ov17_02203F48
// UnkStruct_0200D2B4
ov17_02203F48: ; 0x02203F48
.word 0
.short 31
.short 56
.short 0
.short 8
.word 1
.word 0
.word 1 ; NNS_G2D_VRAM_TYPE_2DMAIN
.word 1
.word 0
.word 0
.word 0
.public ov17_02203F70
// UnkStruct_0200D2B4
ov17_02203F70: ; 0x02203F70
.word 0
.short 27
.short 99
.short 0
.short 4
.word 14
.word 0
.word 1 ; NNS_G2D_VRAM_TYPE_2DMAIN
.word 1
.word 0
.word 0
.word 0
.public ov17_02203F98
// UnkStruct_0200D2B4
ov17_02203F98: ; 0x02203F98
.word 0
.short 27
.short 88
.short 0
.short 7
.word 12
.word 0
.word 1 ; NNS_G2D_VRAM_TYPE_2DMAIN
.word 1
.word 0
.word 0
.word 0
.public ov17_02203FC0
// u8[4]
ov17_02203FC0: ; 0x02203FC0
.byte 160, 192, 192, 0

View File

@ -1,132 +0,0 @@
.include "asm/macros.inc"
.include "overlay_17.inc"
.include "global.inc"
.rodata
ov17_02203D50:
.byte 0x02, 0x01, 0x00, 0x00
ov17_02203D54:
.byte 0x05, 0x01, 0x00, 0x00
ov17_02203D58:
.byte 0x03, 0x01, 0x00, 0x00
ov17_02203D5C:
.byte 0x04, 0x03, 0x01, 0x00
.public ov17_02203D60
ov17_02203D60: ; 0x02203D60
.byte 0x00, 0x02, 0x01, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x06, 0x05, 0x00, 0x03, 0x04, 0x00, 0x0B
.byte 0x00, 0x00, 0x3A, 0x00, 0x1F, 0x00, 0x54, 0x00
.public ov17_02203D78
ov17_02203D78: ; 0x02203D78
.byte 0x1E, 0x00, 0x1F, 0x00, 0x1D, 0x00, 0x1C, 0x00
.byte 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0x00, 0x00, 0x00
.public ov17_02203D88
ov17_02203D88: ; 0x02203D88
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203D98
ov17_02203D98: ; 0x02203D98
.byte 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00
.byte 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
.public ov17_02203DAC
ov17_02203DAC: ; 0x02203DAC
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.public ov17_02203DC4
ov17_02203DC4: ; 0x02203DC4
.byte 0x02, 0x19, 0x15, 0x06, 0x02, 0x09, 0xA2, 0x01, 0x00, 0x02, 0x13, 0x13
.byte 0x04, 0x0C, 0xCA, 0x00, 0x00, 0x02, 0x13, 0x1B, 0x04, 0x0C, 0x36, 0x01
.public ov17_02203DDC
ov17_02203DDC: ; 0x02203DDC
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1E, 0x00
.byte 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203DF8
ov17_02203DF8: ; 0x02203DF8
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1F, 0x04, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.public ov17_02203E14
ov17_02203E14: ; 0x02203E14
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1E, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203E30
ov17_02203E30: ; 0x02203E30
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x1F, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203E4C
ov17_02203E4C: ; 0x02203E4C
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1D, 0x00
.byte 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203E68
ov17_02203E68: ; 0x02203E68
.byte 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
.public ov17_02203E88
ov17_02203E88: ; 0x02203E88
.word 3, ov17_02203D5C
.word 2, ov17_02203D58
.word 2, ov17_02203D50
.word 2, ov17_02203D54
.public ov17_02203EA8
ov17_02203EA8: ; 0x02203EA8
.byte 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x60, 0x00
.byte 0x00, 0x00, 0x05, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203ED0
ov17_02203ED0: ; 0x02203ED0
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203EF8
ov17_02203EF8: ; 0x02203EF8
.byte 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xB0, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203F48
ov17_02203F48: ; 0x02203F48
.byte 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x38, 0x00
.byte 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203F70
ov17_02203F70: ; 0x02203F70
.byte 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x63, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203F98
ov17_02203F98: ; 0x02203F98
.byte 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x58, 0x00
.byte 0x00, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.public ov17_02203FC0
ov17_02203FC0: ; 0x02203FC0
.byte 0xA0, 0xC0, 0xC0, 0x00

View File

@ -612,8 +612,8 @@ Overlay OVY_16
Overlay OVY_17
{
After OVY_16
Object src/overlay_17_c.o
Object asm/overlay_17.o
Object src/berry_pots_app.o
Object asm/berry_pots_app_rodata.o
}
Overlay OVY_18
{

View File

@ -102,12 +102,40 @@ typedef struct UnkData_ov17 {
void *unk1A8;
} UnkData_ov17;
struct UnkStruct_ov17_02203D60 {
u8 unk0[12];
Ov122_021E9282 unkC;
};
struct UnkStruct_ov17_02203E88 {
u32 unk0;
u8 *unk4;
};
extern const u8 ov17_02203D50[4];
extern const u8 ov17_02203D54[4];
extern const u8 ov17_02203D58[4];
extern const u8 ov17_02203D5C[4];
extern const struct UnkStruct_ov17_02203D60 ov17_02203D60;
extern const u16 ov17_02203D78[8];
extern const GraphicsModes ov17_02203D88;
extern const Unk122_021E92D0 ov17_02203D98;
extern const SpriteResourceCountsListUnion ov17_02203DAC;
extern WindowTemplate ov17_02203DC4[3];
extern BgTemplate ov17_02203DDC;
extern BgTemplate ov17_02203DF8;
extern BgTemplate ov17_02203E14;
extern BgTemplate ov17_02203E30;
extern BgTemplate ov17_02203E4C;
extern const Unk122_021E92FC ov17_02203E68;
extern struct UnkStruct_ov17_02203E88 ov17_02203E88[4];
extern const UnkStruct_0200D2B4 ov17_02203EA8;
extern GraphicsBanks ov17_02203ED0;
extern const UnkStruct_0200D2B4 ov17_02203EF8[2];
extern const UnkStruct_0200D2B4 ov17_02203F48;
extern const UnkStruct_0200D2B4 ov17_02203F70;
extern const UnkStruct_0200D2B4 ov17_02203F98;
extern const u8 ov17_02203FC0[4];
extern sub_0200B2E0();
extern sub_0200B2E8();
@ -912,20 +940,12 @@ void ov17_02202944(UnkData_ov17 *a0, u32 a1, u8 a2, BOOL a3) {
a0->unk7A = 60;
}
struct UnkStruct_ov17_02203D60 {
u8 unk0[12];
Ov122_021E9282 unkC;
};
extern struct UnkStruct_ov17_02203D60 ov17_02203D60;
// FIXME(tgsm): https://decomp.me/scratch/UpOrW
#ifdef NONMATCHING
void ov17_022029C8(UnkData_ov17 *a0, u32 a1) {
Ov122_021E7488 sp24;
MI_CpuFill8(&sp24, 0, sizeof(Ov122_021E7488));
sp24.unk0 = ov17_02203D60.unkC;
memcpy(&sp24.unk0, &ov17_02203D60.unkC, sizeof(Ov122_021E9282));
sp24.unkC = a0->unk198[a1];
sp24.unk10 = a0->bgConfig;
sp24.unk14 = ov17_02203E88[a1].unk0;
@ -1012,8 +1032,6 @@ int ov17_02202A50(UnkData_ov17 *a0) {
return r0;
}
extern const UnkStruct_0200D2B4 ov17_02203EA8;
void ov17_02202A84(UnkData_ov17 *a0, int index) {
UnkData_ov17_sub *sub = &a0->unk20[index];
if (sub->unkC != 0 && sub->soilSpriteMaybe != NULL) {
@ -1085,21 +1103,12 @@ void ov17_02202BF8(UnkData_ov17 *a0) {
OS_SetIrqCheckFlag(OS_IE_VBLANK);
}
extern GraphicsBanks ov17_02203ED0;
void ov17_02202C2C(void);
void ov17_02202C2C(void) {
GraphicsBanks banks = ov17_02203ED0;
GX_SetBanks(&banks);
}
extern GraphicsModes ov17_02203D88;
extern BgTemplate ov17_02203DDC;
extern BgTemplate ov17_02203DF8;
extern BgTemplate ov17_02203E14;
extern BgTemplate ov17_02203E30;
extern BgTemplate ov17_02203E4C;
void ov17_02202C4C(UnkData_ov17 *a0) {
ov17_02202C2C();
a0->bgConfig = BgConfig_Alloc(a0->heapId);
@ -1193,8 +1202,6 @@ void ov17_02202F7C(UnkData_ov17 *a0) {
FontID_Release(4);
}
extern WindowTemplate ov17_02203DC4[3];
void ov17_02202FC4(UnkData_ov17 *a0) {
for (int i = 0; i < 3; i++) {
AddWindow(a0->bgConfig, &a0->unkFC[i], &ov17_02203DC4[i]);
@ -1230,11 +1237,6 @@ void ov17_02203084(UnkData_ov17 *a0) {
}
}
extern const Unk122_021E92FC ov17_02203E68;
extern const Unk122_021E92D0 ov17_02203D98;
extern const u16 ov17_02203D78[7];
extern const SpriteResourceCountsListUnion ov17_02203DAC;
void ov17_022030A8(UnkData_ov17 *a0);
void ov17_022030A8(UnkData_ov17 *a0) {
GF_CreateVramTransferManager(32, a0->heapId);
@ -1294,11 +1296,6 @@ void ov17_02203290(UnkData_ov17 *a0) {
ov17_0220321C(a0);
}
extern const UnkStruct_0200D2B4 ov17_02203EF8[2];
extern const UnkStruct_0200D2B4 ov17_02203F48;
extern const UnkStruct_0200D2B4 ov17_02203F70;
extern const UnkStruct_0200D2B4 ov17_02203F98;
void ov17_022032AC(UnkData_ov17 *a0) {
for (int i = 0; i <= 1; i++) {
a0->unk164[i] = SpriteRenderer_CreateSprite(a0->spriteRenderer, a0->spriteGfxHandler1, &ov17_02203EF8[i]);
@ -1791,7 +1788,6 @@ int ov17_02203C78(UnkData_ov17 *a0) {
return -1;
}
extern const u8 ov17_02203FC0[4];
int ov17_02203CC8(UnkData_ov17 *a0) {
if (sub_02025320(&ov17_02203FC0)) {
return 5;