through sub_8154A2C; reorganize dbp files a bit

This commit is contained in:
PikalaxALT
2020-03-04 17:21:41 -05:00
parent ff13649f47
commit e9c3b78d9f
9 changed files with 1460 additions and 3458 deletions
File diff suppressed because it is too large Load Diff
+49
View File
@@ -1,6 +1,25 @@
#ifndef GUARD_DODRIO_BERRY_PICKING_H
#define GUARD_DODRIO_BERRY_PICKING_H
struct DodrioSubstruct_0160
{
/*0x0000 : 0x3000*/ u16 ALIGNED(4) tilemapBuffers[3][BG_SCREEN_SIZE];
/*0x3000 : 0x3160*/ bool32 finished;
/*0x3004 : 0x3164*/ u8 ALIGNED(4) unk3004;
/*0x3008 : 0x3168*/ u8 ALIGNED(4) unk3008[10];
/*0x3014 : 0x3174*/ u8 ALIGNED(4) state;
/*0x3018 : 0x3178*/ u8 ALIGNED(4) unk3018;
/*0x301C : 0x317C*/ u16 ALIGNED(4) unk301C;
/*0x3020 : 0x3180*/ u8 ALIGNED(4) unk3020;
/*0x3024 : 0x3184*/ u8 ALIGNED(4) unk3024;
/*0x3024 : 0x3184*/ void (*unk3028)(void);
}; // size = 0x302C
struct DodrioSubstruct_318C
{
bool8 isShiny;
};
struct DodrioSubstruct_31A0_14
{
u8 unk0[11];
@@ -34,5 +53,35 @@ void sub_815AAD8(u8 a0);
void sub_815AB3C(u8 a0);
u8 sub_815A5E8(s32 a0);
u32 IncrementWithLimit(u32, u32);
void sub_8153A9C(void);
void sub_8153AFC(struct DodrioSubstruct_318C * unk318C, u8 a1, u8 a2, u8 a3);
void sub_8153BC0(u8 a0);
void sub_8153BF8(u8 a0);
void sub_8153D08(u8 playerCount);
u8 sub_8155E8C(void);
u8 sub_81533B4(void);
void sub_8153DA8(u8 a0, u8 a1);
void sub_8153D80(bool8 a0, u8 a1);
void sub_8153FC8(u8 a0);
void sub_8153DD8(void);
void sub_8153E28(void);
void sub_8153ED8(void);
bool32 sub_8153F1C(void);
void sub_81540DC(bool8 a0);
void sub_8154128(void);
void sub_815417C(void);
void sub_8154274(void);
void sub_81542EC(u8 a0, u8 a1);
void sub_8154370(u8 a0, u8 a1);
void sub_8154398(u16 a0, u8 a1);
void sub_8154438(void);
void sub_81544F0(void);
void sub_8154540(void);
void sub_8154578(void);
void sub_81545BC(bool8 a0);
void sub_81546C0(void);
void sub_8154730(void);
void sub_8154968(struct DodrioSubstruct_0160 * unk0160);
void sub_81549D4(u8 a0);
#endif //GUARD_DODRIO_BERRY_PICKING_H
+4 -2
View File
@@ -287,11 +287,12 @@ SECTIONS {
src/text_window.o(.text);
src/quest_log_player.o(.text);
src/dodrio_berry_picking.o(.text);
src/dodrio_berry_picking_2.o(.text);
asm/dodrio_berry_picking.o(.text);
src/battle_controller_pokedude.o(.text);
src/quest_log_objects.o(.text);
src/dodrio_berry_picking_2.o(.text);
asm/dodrio_berry_picking_2.o(.text);
src/dodrio_berry_picking_3.o(.text);
asm/dodrio_berry_picking_3.o(.text);
src/teachy_tv.o(.text);
src/ereader_helpers.o(.text);
src/digit_obj_util.o(.text);
@@ -580,6 +581,7 @@ SECTIONS {
src/text_window_graphics.o(.rodata);
src/quest_log_player.o(.rodata);
src/dodrio_berry_picking.o(.rodata);
src/dodrio_berry_picking_2.o(.rodata);
src/battle_controller_pokedude.o(.rodata);
src/teachy_tv.o(.rodata);
src/digit_obj_util.o(.rodata);
+247
View File
@@ -0,0 +1,247 @@
#ifndef GUARD_DATA_DODRIO_BERRY_PICKING_H
#define GUARD_DATA_DODRIO_BERRY_PICKING_H
static const struct BgTemplate sUnknown_847565C[] =
{
{
.bg = 0,
.charBaseIndex = 0,
.mapBaseIndex = 30,
.screenSize = 0,
.paletteMode = 0,
.priority = 0,
.baseTile = 0
},
{
.bg = 1,
.charBaseIndex = 2,
.mapBaseIndex = 12,
.screenSize = 1,
.paletteMode = 0,
.priority = 1,
.baseTile = 0
},
{
.bg = 2,
.charBaseIndex = 2,
.mapBaseIndex = 14,
.screenSize = 1,
.paletteMode = 0,
.priority = 1,
.baseTile = 0
},
{
.bg = 3,
.charBaseIndex = 3,
.mapBaseIndex = 31,
.screenSize = 0,
.paletteMode = 0,
.priority = 2,
.baseTile = 0
},
};
// Unknown unreferenced data, feel free to remove.
static const u32 sUnused[] = {255, 0};
static const struct WindowTemplate sUnknown_8475674[] =
{
{
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 1,
.width = 28,
.height = 3,
.paletteNum = 13,
.baseBlock = 0x13,
},
{
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 6,
.width = 28,
.height = 13,
.paletteNum = 13,
.baseBlock = 0x67,
}
};
static const struct WindowTemplate sUnknown_8475684 =
{
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 6,
.width = 28,
.height = 7,
.paletteNum = 13,
.baseBlock = 0x67,
};
static const struct WindowTemplate sUnknown_847568C[] =
{
{
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 8,
.width = 19,
.height = 3,
.paletteNum = 13,
.baseBlock = 0x13,
},
{
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 7,
.width = 6,
.height = 4,
.paletteNum = 13,
.baseBlock = 0x4C,
}
};
static const struct WindowTemplate sUnknown_847569C =
{
.bg = 0,
.tilemapLeft = 4,
.tilemapTop = 6,
.width = 22,
.height = 5,
.paletteNum = 13,
.baseBlock = 0x13,
};
static const struct WindowTemplate sUnknown_84756A4 =
{
.bg = 0,
.tilemapLeft = 5,
.tilemapTop = 8,
.width = 19,
.height = 3,
.paletteNum = 13,
.baseBlock = 0x13,
};
static const u8 sUnknown_8471F50[5][5][11] =
{
{
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
},
{
{0, 1, 2, 3, 4, 5, 6, 3, 8, 9, 0},
{0, 1, 2, 5, 6, 3, 4, 5, 8, 9, 0},
},
{
{0, 1, 2, 3, 4, 5, 6, 7, 2, 9, 0},
{0, 1, 4, 5, 6, 7, 2, 3, 4, 9, 0},
{0, 1, 6, 7, 2, 3, 4, 5, 6, 9, 0},
},
{
{0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 0},
{0, 3, 4, 5, 6, 7, 8, 1, 2, 3, 0},
{0, 5, 6, 7, 8, 1, 2, 3, 4, 5, 0},
{0, 7, 8, 1, 2, 3, 4, 5, 6, 7, 0},
},
{
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
{2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2},
{4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4},
{6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6},
{8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8},
},
};
static const u8 sUnknown_8472063[5][5][3] =
{
{
{4, 5, 6},
},
{
{3, 4, 5},
{5, 6, 3},
},
{
{4, 5, 6},
{6, 7, 2},
{2, 3, 4},
},
{
{3, 4, 5},
{5, 6, 7},
{7, 8, 1},
{1, 2, 3},
},
{
{4, 5, 6},
{6, 7, 8},
{8, 9, 0},
{0, 1, 2},
{2, 3, 4},
},
};
static const u8 sUnknown_84720AE[5][5][3] =
{
{
{1, 0, 1},
},
{
{1, 0, 1},
{0, 1, 0},
},
{
{2, 0, 1},
{0, 1, 2},
{1, 2, 0},
},
{
{3, 0, 1},
{0, 1, 2},
{1, 2, 3},
{2, 3, 0},
},
{
{4, 0, 1},
{0, 1, 2},
{1, 2, 3},
{2, 3, 4},
{3, 4, 0},
},
};
ALIGNED(4)
static const u8 sUnknown_84720FC[5][11] =
{
{9, 9, 9, 9, 1, 1, 1, 9, 9, 9, 9},
{9, 9, 9, 0, 0, 1, 1, 0, 9, 9, 9},
{9, 9, 2, 2, 0, 0, 1, 1, 1, 9, 9},
{9, 3, 3, 0, 0, 1, 1, 2, 2, 3, 9},
{3, 3, 4, 4, 0, 0, 1, 1, 2, 2, 3},
};
static const u8 sUnknown_8472133[5][5] =
{
{5},
{4, 6},
{3, 5, 7},
{2, 4, 6, 8},
{1, 3, 5, 6, 9},
};
static const u16 sDodrioBerryBgPal1[] = INCBIN_U16("graphics/link_games/dodrioberry_bg1.gbapal",
"graphics/link_games/dodrioberry_bg2.gbapal");
static const u16 sDodrioBerryPkmnPal[] = INCBIN_U16("graphics/link_games/dodrioberry_pkmn.gbapal");
static const u16 sDodrioBerryShinyPal[] = INCBIN_U16("graphics/link_games/dodrioberry_shiny.gbapal");
static const u16 sDodrioBerryStatusPal[] = INCBIN_U16("graphics/link_games/dodrioberry_status.gbapal");
static const u16 sDodrioBerrySpritesPal[] = INCBIN_U16("graphics/link_games/dodrioberry_berrysprites.gbapal");
static const u32 sDodrioBerrySpritesGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_berrysprites.4bpp.lz");
static const u16 sDodrioBerryPlatformPal[] = INCBIN_U16("graphics/link_games/dodrioberry_platform.gbapal");
static const u32 sDodrioBerryBgGfx1[] = INCBIN_U32("graphics/link_games/dodrioberry_bg1.4bpp.lz");
static const u32 sDodrioBerryBgGfx2[] = INCBIN_U32("graphics/link_games/dodrioberry_bg2.4bpp.lz");
static const u32 sDodrioBerryStatusGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_status.4bpp.lz");
static const u32 sDodrioBerryPlatformGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_platform.4bpp.lz");
static const u32 sDodrioBerryPkmnGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_pkmn.4bpp.lz");
static const u32 sDodrioBerryBgTilemap1[] = INCBIN_U32("graphics/link_games/dodrioberry_bg1.bin.lz");
static const u32 sDodrioBerryBgTilemap2Right[] = INCBIN_U32("graphics/link_games/dodrioberry_bg2right.bin.lz");
static const u32 sDodrioBerryBgTilemap2Left[] = INCBIN_U32("graphics/link_games/dodrioberry_bg2left.bin.lz");
#endif //GUARD_DATA_DODRIO_BERRY_PICKING_H
+105 -897
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
#include "global.h"
#include "link.h"
#include "link_rfu.h"
void sub_815A5BC(s32 a0)
{
struct Padded_U8 data[2];
data[0].value = 1;
data[1].value = a0;
RfuPrepareSend0x2f00(data);
}
u8 sub_815A5E8(s32 a0)
{
u8 * r1;
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
return 0;
r1 = (u8 *)&gRecvCmds[a0][1];
if (r1[0] == 1)
return r1[4];
return 0;
}
+2
View File
@@ -452,6 +452,8 @@ gUnknown_203B170: @ 203B170
.align 2
.include "src/dodrio_berry_picking.o"
.align 2
.include "src/dodrio_berry_picking_2.o"
.align 2
.include "src/teachy_tv.o"
.align 2
.include "src/digit_obj_util.o"