Move pokedex_screen data from asm to C

This commit is contained in:
GriffinR
2020-11-11 21:02:20 -05:00
parent 2062659541
commit 66e9059578
7 changed files with 1704 additions and 1507 deletions
File diff suppressed because it is too large Load Diff
+4
View File
@@ -4930,4 +4930,8 @@ extern const u16 gPSSMenu_Pal[];
extern const u16 gUnknown_8E9C3F8[]; extern const u16 gUnknown_8E9C3F8[];
extern const u16 gUnknown_8E9C418[]; extern const u16 gUnknown_8E9C418[];
// pokedex_screen
extern const u16 gUnknown_8E9C14C[];
extern const u16 gUnknown_8E9C16C[];
#endif //GUARD_GRAPHICS_H #endif //GUARD_GRAPHICS_H
+23
View File
@@ -1516,4 +1516,27 @@ extern const u8 gUnknown_8419AA2[];
extern const u8 gUnknown_8419ADE[]; extern const u8 gUnknown_8419ADE[];
extern const u8 gUnknown_8419B18[]; extern const u8 gUnknown_8419B18[];
// pokedex_screen
extern const u8 gText_DexCategory_GrasslandPkmn[];
extern const u8 gText_DexCategory_ForestPkmn[];
extern const u8 gText_DexCategory_WatersEdgePkmn[];
extern const u8 gText_DexCategory_SeaPkmn[];
extern const u8 gText_DexCategory_CavePkmn[];
extern const u8 gText_DexCategory_MountainPkmn[];
extern const u8 gText_DexCategory_RoughTerrainPkmn[];
extern const u8 gText_DexCategory_UrbanPkmn[];
extern const u8 gText_DexCategory_RarePkmn[];
extern const u8 gUnknown_8415EFB[];
extern const u8 gUnknown_8415E95[];
extern const u8 gUnknown_8415DE0[];
extern const u8 gUnknown_8415E88[];
extern const u8 gUnknown_8415EA4[];
extern const u8 gUnknown_8415ED5[];
extern const u8 gUnknown_8415EDF[];
extern const u8 gUnknown_8415EED[];
extern const u8 gUnknown_8415EB0[];
extern const u8 gUnknown_8415EC7[];
extern const u8 gUnknown_8415F0E[];
extern const u8 gUnknown_8415F24[];
#endif //GUARD_STRINGS_H #endif //GUARD_STRINGS_H
-1
View File
@@ -540,7 +540,6 @@ SECTIONS {
src/easy_chat_2.o(.rodata); src/easy_chat_2.o(.rodata);
src/easy_chat_3.o(.rodata); src/easy_chat_3.o(.rodata);
src/pokedex_screen.o(.rodata); src/pokedex_screen.o(.rodata);
data/pokedex_screen.o(.rodata);
src/list_menu.o(.rodata); src/list_menu.o(.rodata);
src/item_menu.o(.rodata); src/item_menu.o(.rodata);
src/save_location.o(.rodata); src/save_location.o(.rodata);
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1246,7 +1246,7 @@ const u16 gUnknown_8E9BF28[] = INCBIN_U16("graphics/interface/link_rfu_frame.gba
const u32 gUnknown_8E9BF48[] = INCBIN_U32("graphics/interface/link_rfu_status.4bpp.lz"); const u32 gUnknown_8E9BF48[] = INCBIN_U32("graphics/interface/link_rfu_status.4bpp.lz");
const u16 gUnknown_8E9C14C[] = INCBIN_U16("graphics/interface/pokedex_abc.gbapal"); const u16 gUnknown_8E9C14C[] = INCBIN_U16("graphics/interface/pokedex_abc.gbapal");
const u32 gUnknown_8E9C16C[] = INCBIN_U32("graphics/interface/pokedex_abc.4bpp.lz"); const u16 gUnknown_8E9C16C[] = INCBIN_U16("graphics/interface/pokedex_abc.4bpp.lz");
const u16 gPSSMenu_Pal[] = INCBIN_U16("graphics/interface/box_tiles_pal1.gbapal"); const u16 gPSSMenu_Pal[] = INCBIN_U16("graphics/interface/box_tiles_pal1.gbapal");
const u16 gUnknown_8E9C3F8[] = INCBIN_U16("graphics/interface/box_tiles_pal2.gbapal"); const u16 gUnknown_8E9C3F8[] = INCBIN_U16("graphics/interface/box_tiles_pal2.gbapal");
+675 -71
View File
@@ -69,8 +69,14 @@ struct PokedexScreenData
struct PokedexScreenWindowGfx struct PokedexScreenWindowGfx
{ {
const u16 *map; const u16 * map;
const u16 *pal; const u16 * pal;
};
struct PokedexCategoryPage
{
const u16 * species;
u8 count;
}; };
EWRAM_DATA struct PokedexScreenData * gUnknown_203ACF0 = NULL; EWRAM_DATA struct PokedexScreenData * gUnknown_203ACF0 = NULL;
@@ -114,6 +120,9 @@ void sub_81068DC(u8 category, u8 a1);
u8 sub_8106AF8(u16 a0); u8 sub_8106AF8(u16 a0);
void sub_8106B34(void); void sub_8106B34(void);
void sub_8106E78(const u8 *a0, s32 a1); void sub_8106E78(const u8 *a0, s32 a1);
static void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list);
static void sub_8102F48(u8 windowId, s32 itemId, u8 y);
static void sub_8103A40(u8 windowId, s32 itemId, u8 y);
#include "data/pokemon_graphics/footprint_table.h" #include "data/pokemon_graphics/footprint_table.h"
@@ -132,21 +141,21 @@ const u16 gUnknown_84406C8[] = {
}; };
const u16 gUnknown_84406E0[] = INCBIN_U16("graphics/pokedex/unk_84406E0.gbapal"); const u16 gUnknown_84406E0[] = INCBIN_U16("graphics/pokedex/unk_84406E0.gbapal");
const u32 gUnknown_84408E0[] = INCBIN_U32("graphics/pokedex/unk_84408E0.bin.lz"); const u16 gUnknown_84408E0[] = INCBIN_U16("graphics/pokedex/unk_84408E0.bin.lz");
const u32 gUnknown_8440BD8[] = INCBIN_U32("graphics/pokedex/unk_8440BD8.bin.lz"); const u16 gUnknown_8440BD8[] = INCBIN_U16("graphics/pokedex/unk_8440BD8.bin.lz");
const u32 gUnknown_8440EF0[] = INCBIN_U32("graphics/pokedex/unk_8440EF0.bin.lz"); const u32 gUnknown_8440EF0[] = INCBIN_U32("graphics/pokedex/unk_8440EF0.bin.lz");
const u32 gUnknown_844112C[] = INCBIN_U32("graphics/pokedex/unk_844112C.bin.lz"); const u16 gUnknown_844112C[] = INCBIN_U16("graphics/pokedex/unk_844112C.bin.lz");
const u32 gUnknown_84414BC[] = INCBIN_U32("graphics/pokedex/unk_84414BC.bin.lz"); const u16 gUnknown_84414BC[] = INCBIN_U16("graphics/pokedex/unk_84414BC.bin.lz");
const u32 gUnknown_8441808[] = INCBIN_U32("graphics/pokedex/unk_8441808.bin.lz"); const u32 gUnknown_8441808[] = INCBIN_U32("graphics/pokedex/unk_8441808.bin.lz");
const u32 gUnknown_8441A40[] = INCBIN_U32("graphics/pokedex/unk_8441A40.bin.lz"); const u16 gUnknown_8441A40[] = INCBIN_U16("graphics/pokedex/unk_8441A40.bin.lz");
const u32 gUnknown_8441D54[] = INCBIN_U32("graphics/pokedex/unk_8441D54.bin.lz"); const u16 gUnknown_8441D54[] = INCBIN_U16("graphics/pokedex/unk_8441D54.bin.lz");
const u32 gUnknown_8442004[] = INCBIN_U32("graphics/pokedex/unk_8442004.bin.lz"); const u16 gUnknown_8442004[] = INCBIN_U16("graphics/pokedex/unk_8442004.bin.lz");
const u32 gUnknown_844223C[] = INCBIN_U32("graphics/pokedex/unk_844223C.bin.lz"); const u16 gUnknown_844223C[] = INCBIN_U16("graphics/pokedex/unk_844223C.bin.lz");
const u32 gUnknown_84424E4[] = INCBIN_U32("graphics/pokedex/unk_84424E4.bin.lz"); const u16 gUnknown_84424E4[] = INCBIN_U16("graphics/pokedex/unk_84424E4.bin.lz");
const u32 gUnknown_8442838[] = INCBIN_U32("graphics/pokedex/unk_8442838.bin.lz"); const u16 gUnknown_8442838[] = INCBIN_U16("graphics/pokedex/unk_8442838.bin.lz");
const u32 gUnknown_8442BC0[] = INCBIN_U32("graphics/pokedex/unk_8442BC0.bin.lz"); const u16 gUnknown_8442BC0[] = INCBIN_U16("graphics/pokedex/unk_8442BC0.bin.lz");
const u32 gUnknown_8442EF8[] = INCBIN_U32("graphics/pokedex/unk_8442EF8.bin.lz"); const u16 gUnknown_8442EF8[] = INCBIN_U16("graphics/pokedex/unk_8442EF8.bin.lz");
const u32 gUnknown_844318C[] = INCBIN_U32("graphics/pokedex/unk_844318C.bin.lz"); const u16 gUnknown_844318C[] = INCBIN_U16("graphics/pokedex/unk_844318C.bin.lz");
const u16 gUnknown_8443420[] = INCBIN_U16("graphics/pokedex/unk_8443420.gbapal"); const u16 gUnknown_8443420[] = INCBIN_U16("graphics/pokedex/unk_8443420.gbapal");
const u16 gUnknown_8443440[] = INCBIN_U16("graphics/pokedex/unk_8443440.gbapal"); const u16 gUnknown_8443440[] = INCBIN_U16("graphics/pokedex/unk_8443440.gbapal");
const u16 gUnknown_8443460[] = INCBIN_U16("graphics/pokedex/unk_8443460.gbapal"); const u16 gUnknown_8443460[] = INCBIN_U16("graphics/pokedex/unk_8443460.gbapal");
@@ -180,29 +189,623 @@ static const u8 gExpandedPlaceholder_PokedexDescription[] = _("");
#include "data/pokemon/pokedex_text.h" #include "data/pokemon/pokedex_text.h"
#include "data/pokemon/pokedex_entries.h" #include "data/pokemon/pokedex_entries.h"
extern const struct BgTemplate gUnknown_8451EBC[4];
extern const struct WindowTemplate gUnknown_8451ECC[]; static const struct BgTemplate sUnknown_8451EBC[] = {
extern const struct PokedexScreenData gUnknown_8451EE4; {
extern const struct WindowTemplate gUnknown_8451F54; .bg = 0,
extern const struct WindowTemplate gUnknown_8451F5C; .charBaseIndex = 0,
extern const struct WindowTemplate gUnknown_8451F64; .mapBaseIndex = 5,
extern const struct ListMenuTemplate gUnknown_8452004; .screenSize = 0,
extern const struct ListMenuTemplate gUnknown_84520BC; .paletteMode = 0,
extern const struct ScrollArrowsTemplate gUnknown_84520D4; .priority = 0,
extern const struct ScrollArrowsTemplate gUnknown_84520E4; .baseTile = 0x0000
extern const struct PokedexScreenWindowGfx gUnknown_84520F4[]; },
extern const struct WindowTemplate gUnknown_845216C; {
extern const struct ListMenuTemplate gUnknown_8452174; .bg = 1,
extern const struct ListMenuWindowRect gUnknown_845218C; .charBaseIndex = 2,
extern const struct ScrollArrowsTemplate gUnknown_84521B4; .mapBaseIndex = 4,
extern const struct WindowTemplate gUnknown_84521C4; .screenSize = 0,
extern const struct WindowTemplate gUnknown_84521CC; .paletteMode = 0,
extern const u16 gUnknown_845228C[]; .priority = 1,
extern const u8 (*const gUnknown_8452334[])[4]; .baseTile = 0x0000
extern const u8 *const gDexCategoryNamePtrs[]; },
extern const u8 gUnknown_8452388[][30]; {
extern const struct ScrollArrowsTemplate gUnknown_84524B4; .bg = 2,
extern const struct CursorStruct gUnknown_84524C4; .charBaseIndex = 2,
.mapBaseIndex = 6,
.screenSize = 0,
.paletteMode = 0,
.priority = 2,
.baseTile = 0x0000
},
{
.bg = 3,
.charBaseIndex = 0,
.mapBaseIndex = 7,
.screenSize = 0,
.paletteMode = 0,
.priority = 3,
.baseTile = 0x0000
},
};
static const struct WindowTemplate sUnknown_8451ECC[] = {
{
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 0,
.width = 30,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x03c4
},
{
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 18,
.width = 30,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x0388
},
{
.bg = 255,
.tilemapLeft = 0,
.tilemapTop = 0,
.width = 0,
.height = 0,
.paletteNum = 0,
.baseBlock = 0x0000
},
};
static const struct PokedexScreenData sUnknown_8451EE4 = {
.field_10 = 1,
.field_14 = -1,
.field_15 = -1,
.field_16 = -1,
.field_18 = {-1, -1, -1, -1},
.field_20 = {-1, -1, -1, -1},
.field_24 = {-1, -1, -1, -1},
.field_40 = -1,
.field_4A = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
.field_60 = -1,
.field_61 = -1,
};
static const struct WindowTemplate sUnknown_8451F54 = {
.bg = 1,
.tilemapLeft = 1,
.tilemapTop = 2,
.width = 20,
.height = 16,
.paletteNum = 0,
.baseBlock = 0x0008
};
static const struct WindowTemplate sUnknown_8451F5C = {
.bg = 1,
.tilemapLeft = 21,
.tilemapTop = 11,
.width = 8,
.height = 6,
.paletteNum = 1,
.baseBlock = 0x0148
};
static const struct WindowTemplate sUnknown_8451F64 = {
.bg = 1,
.tilemapLeft = 21,
.tilemapTop = 2,
.width = 9,
.height = 9,
.paletteNum = 0,
.baseBlock = 0x0178
};
static const struct ListMenuItem sUnknown_8451F6C[] = {
{gUnknown_8415EFB, -3},
{gUnknown_8415E95, 9},
{gUnknown_8415DE0, -3},
{gText_DexCategory_GrasslandPkmn, 0},
{gText_DexCategory_ForestPkmn, 1},
{gText_DexCategory_WatersEdgePkmn, 2},
{gText_DexCategory_SeaPkmn, 3},
{gText_DexCategory_CavePkmn, 4},
{gText_DexCategory_MountainPkmn, 5},
{gText_DexCategory_RoughTerrainPkmn, 6},
{gText_DexCategory_UrbanPkmn, 7},
{gText_DexCategory_RarePkmn, 8},
{gUnknown_8415E88, -3},
{gUnknown_8415EA4, 10},
{gUnknown_8415ED5, 11},
{gUnknown_8415EDF, 12},
{gUnknown_8415EED, 13},
{gUnknown_8415EB0, -3},
{gUnknown_8415EC7, -2},
};
static const struct ListMenuTemplate sUnknown_8452004 = {
.items = sUnknown_8451F6C,
.moveCursorFunc = sub_8102EC0,
.itemPrintFunc = sub_8102F48,
.totalItems = NELEMS(sUnknown_8451F6C),
.maxShowed = 9,
.windowId 0,
.header_X = 0,
.item_X = 12,
.cursor_X = 4,
.upText_Y = 2,
.cursorPal = 1,
.fillValue = 0,
.cursorShadowPal = 3,
.lettersSpacing = 1,
.itemVerticalPadding = 0,
.scrollMultiple = 0,
.fontId = 2,
.cursorKind = 0,
};
static const struct ListMenuItem sUnknown_845201C[] = {
{gUnknown_8415EFB, -3},
{gUnknown_8415F0E, 9},
{gUnknown_8415F24, 14},
{gUnknown_8415DE0, -3},
{gText_DexCategory_GrasslandPkmn, 0},
{gText_DexCategory_ForestPkmn, 1},
{gText_DexCategory_WatersEdgePkmn, 2},
{gText_DexCategory_SeaPkmn, 3},
{gText_DexCategory_CavePkmn, 4},
{gText_DexCategory_MountainPkmn, 5},
{gText_DexCategory_RoughTerrainPkmn, 6},
{gText_DexCategory_UrbanPkmn, 7},
{gText_DexCategory_RarePkmn, 8},
{gUnknown_8415E88, -3},
{gUnknown_8415EA4, 10},
{gUnknown_8415ED5, 11},
{gUnknown_8415EDF, 12},
{gUnknown_8415EED, 13},
{gUnknown_8415EB0, -3},
{gUnknown_8415EC7, -2},
};
static const struct ListMenuTemplate sUnknown_84520BC = {
.items = sUnknown_845201C,
.moveCursorFunc = sub_8102EC0,
.itemPrintFunc = sub_8102F48,
.totalItems = NELEMS(sUnknown_845201C),
.maxShowed = 9,
.windowId 0,
.header_X = 0,
.item_X = 12,
.cursor_X = 4,
.upText_Y = 2,
.cursorPal = 1,
.fillValue = 0,
.cursorShadowPal = 3,
.lettersSpacing = 1,
.itemVerticalPadding = 0,
.scrollMultiple = 0,
.fontId = 2,
.cursorKind = 0,
};
static const struct ScrollArrowsTemplate sUnknown_84520D4 = {
.firstArrowType = 2,
.firstX = 200,
.firstY = 19,
.secondArrowType = 3,
.secondX = 200,
.secondY = 141,
.fullyUpThreshold = 0,
.fullyDownThreshold = 10,
.tileTag = 2000,
.palTag = 0xFFFF,
.palNum = 1
};
static const struct ScrollArrowsTemplate sUnknown_84520E4 = {
.firstArrowType = 2,
.firstX = 200,
.firstY = 19,
.secondArrowType = 3,
.secondX = 200,
.secondY = 141,
.fullyUpThreshold = 0,
.fullyDownThreshold = 11,
.tileTag = 2000,
.palTag = 0xFFFF,
.palNum = 1
};
static const struct PokedexScreenWindowGfx sUnknown_84520F4[] = {
{.map = gUnknown_84414BC, .pal = gUnknown_84434A0},
{.map = gUnknown_844112C, .pal = gUnknown_8443480},
{.map = gUnknown_8442838, .pal = gUnknown_8443580},
{.map = gUnknown_8442004, .pal = gUnknown_8443520},
{.map = gUnknown_84408E0, .pal = gUnknown_8443420},
{.map = gUnknown_8441A40, .pal = gUnknown_84434E0},
{.map = gUnknown_84424E4, .pal = gUnknown_8443560},
{.map = gUnknown_8440BD8, .pal = gUnknown_8443440},
{.map = gUnknown_8441D54, .pal = gUnknown_8443500},
{.map = gUnknown_844223C, .pal = gUnknown_8443540},
{.map = gUnknown_8E9C16C, .pal = gUnknown_8E9C14C},
{.map = gUnknown_8442BC0, .pal = gUnknown_84435A0},
{.map = gUnknown_8442EF8, .pal = gUnknown_84435C0},
{.map = gUnknown_844318C, .pal = gUnknown_84435E0},
{.map = gUnknown_844223C, .pal = gUnknown_8443540},
};
static const struct WindowTemplate sUnknown_845216C = {
.bg = 1,
.tilemapLeft = 2,
.tilemapTop = 2,
.width = 23,
.height = 16,
.paletteNum = 0,
.baseBlock = 0x0008
};
static const struct ListMenuTemplate sUnknown_8452174 = {
.items = sUnknown_8451F6C,
.moveCursorFunc = ListMenuDefaultCursorMoveFunc,
.itemPrintFunc = sub_8103A40,
.totalItems = 0,
.maxShowed = 9,
.windowId = 0,
.header_X = 0,
.item_X = 56,
.cursor_X = 4,
.upText_Y = 2,
.cursorPal = 1,
.fillValue = 0,
.cursorShadowPal = 3,
.lettersSpacing = 1,
.itemVerticalPadding = 0,
.scrollMultiple = 1,
.fontId = 2,
.cursorKind = 0,
};
static const struct ListMenuWindowRect sUnknown_845218C = {
.x = 0,
.y = 0,
.width = 5,
.height = 16,
.palNum = 0,
};
// Unused
static const u8 gUnknown_8452194[] = {
0x05, 0x00, 0x02, 0x10, 0x01, 0x00, 0x00, 0x00,
0x07, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x00, 0x08, 0x10, 0x02, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00
};
static const struct ScrollArrowsTemplate sUnknown_84521B4 = {
.firstArrowType = 2,
.firstX = 200,
.firstY = 19,
.secondArrowType = 3,
.secondX = 200,
.secondY = 141,
.fullyUpThreshold = 0,
.fullyDownThreshold = 0,
.tileTag = 2000,
.palTag = 0xFFFF,
.palNum = 1,
};
static const struct WindowTemplate sUnknown_84521C4 = {
.bg = 2,
.tilemapLeft = 0,
.tilemapTop = 0,
.width = 8,
.height = 8,
.paletteNum = 0,
.baseBlock = 0x0000
};
static const struct WindowTemplate sUnknown_84521CC = {
.bg = 1,
.tilemapLeft = 0,
.tilemapTop = 0,
.width = 8,
.height = 5,
.paletteNum = 0,
.baseBlock = 0x0000
};
const struct WindowTemplate gUnknown_84521D4 = {
.bg = 1,
.tilemapLeft = 19,
.tilemapTop = 3,
.width = 8,
.height = 8,
.paletteNum = 9,
.baseBlock = 0x01a8
};
const struct WindowTemplate gUnknown_84521DC = {
.bg = 1,
.tilemapLeft = 2,
.tilemapTop = 3,
.width = 13,
.height = 8,
.paletteNum = 0,
.baseBlock = 0x01e8
};
const struct WindowTemplate gUnknown_84521E4 = {
.bg = 1,
.tilemapLeft = 0,
.tilemapTop = 11,
.width = 30,
.height = 7,
.paletteNum = 0,
.baseBlock = 0x0250
};
const struct WindowTemplate gUnknown_84521EC = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 2,
.width = 4,
.height = 4,
.paletteNum = 10,
.baseBlock = 0x01a8
};
const struct WindowTemplate gUnknown_84521F4 = {
.bg = 2,
.tilemapLeft = 5,
.tilemapTop = 2,
.width = 8,
.height = 3,
.paletteNum = 0,
.baseBlock = 0x01b8
};
const struct WindowTemplate gUnknown_84521FC = {
.bg = 2,
.tilemapLeft = 2,
.tilemapTop = 7,
.width = 10,
.height = 2,
.paletteNum = 0,
.baseBlock = 0x01d0
};
const struct WindowTemplate gUnknown_8452204 = {
.bg = 2,
.tilemapLeft = 18,
.tilemapTop = 2,
.width = 10,
.height = 2,
.paletteNum = 0,
.baseBlock = 0x01e4
};
const struct WindowTemplate gUnknown_845220C = {
.bg = 2,
.tilemapLeft = 5,
.tilemapTop = 5,
.width = 8,
.height = 2,
.paletteNum = 11,
.baseBlock = 0x01f8
};
const struct WindowTemplate gUnknown_8452214 = {
.bg = 2,
.tilemapLeft = 17,
.tilemapTop = 4,
.width = 12,
.height = 9,
.paletteNum = 0,
.baseBlock = 0x0208
};
static const struct WindowTemplate sUnknown_845221C = {
.bg = 2,
.tilemapLeft = 13,
.tilemapTop = 4,
.width = 4,
.height = 3,
.paletteNum = 0,
.baseBlock = 0x0274
};
static const struct WindowTemplate sUnknown_8452224 = {
.bg = 2,
.tilemapLeft = 13,
.tilemapTop = 7,
.width = 4,
.height = 3,
.paletteNum = 0,
.baseBlock = 0x0280
};
static const struct WindowTemplate sUnknown_845222C = {
.bg = 2,
.tilemapLeft = 13,
.tilemapTop = 10,
.width = 4,
.height = 3,
.paletteNum = 0,
.baseBlock = 0x028c
};
static const struct WindowTemplate sUnknown_8452234 = {
.bg = 2,
.tilemapLeft = 13,
.tilemapTop = 13,
.width = 4,
.height = 4,
.paletteNum = 0,
.baseBlock = 0x0298
};
static const struct WindowTemplate sUnknown_845223C = {
.bg = 2,
.tilemapLeft = 17,
.tilemapTop = 13,
.width = 4,
.height = 4,
.paletteNum = 0,
.baseBlock = 0x02a8
};
static const struct WindowTemplate sUnknown_8452244 = {
.bg = 2,
.tilemapLeft = 21,
.tilemapTop = 13,
.width = 4,
.height = 4,
.paletteNum = 0,
.baseBlock = 0x02b8
};
static const struct WindowTemplate sUnknown_845224C = {
.bg = 2,
.tilemapLeft = 25,
.tilemapTop = 13,
.width = 4,
.height = 4,
.paletteNum = 0,
.baseBlock = 0x02c8
};
struct {
const struct WindowTemplate * window;
const u32 * tilemap;
} const gUnknown_8452254[] = {
{&sUnknown_845221C, gUnknown_8443910},
{&sUnknown_8452224, gUnknown_8443988},
{&sUnknown_845222C, gUnknown_84439FC},
{&sUnknown_8452234, gUnknown_8443A78},
{&sUnknown_845223C, gUnknown_8443AF8},
{&sUnknown_8452244, gUnknown_8443BB0},
{&sUnknown_845224C, gUnknown_8443C54},
};
static const u16 sUnknown_845228C[] = INCBIN_U16("graphics/pokedex/unk_845228C.bin");
static const u8 sUnknown_845230C[][4] = {
{0x0b, 0x03, 0x0b, 0x0b},
};
static const u8 sUnknown_8452310[][4] = {
{0x03, 0x03, 0x0b, 0x03},
{0x12, 0x09, 0x0a, 0x0b},
};
static const u8 sUnknown_8452318[][4] = {
{0x01, 0x02, 0x09, 0x02},
{0x0b, 0x09, 0x03, 0x0b},
{0x15, 0x03, 0x15, 0x0b}
};
static const u8 sUnknown_8452324[][4] = {
{0x00, 0x02, 0x06, 0x03},
{0x07, 0x0a, 0x00, 0x0c},
{0x0f, 0x0a, 0x16, 0x0b},
{0x16, 0x02, 0x0f, 0x04}
};
const u8 (*const gUnknown_8452334[])[4] = {
sUnknown_845230C,
sUnknown_8452310,
sUnknown_8452318,
sUnknown_8452324,
};
static const u8 * const sDexCategoryNamePtrs[] = {
gText_DexCategory_GrasslandPkmn,
gText_DexCategory_ForestPkmn,
gText_DexCategory_WatersEdgePkmn,
gText_DexCategory_SeaPkmn,
gText_DexCategory_CavePkmn,
gText_DexCategory_MountainPkmn,
gText_DexCategory_RoughTerrainPkmn,
gText_DexCategory_UrbanPkmn,
gText_DexCategory_RarePkmn,
};
const u16 gUnknown_8452368[] = INCBIN_U16("graphics/pokedex/unk_8452368.gbapal");
static const u8 sUnknown_8452388[][30] = {
{
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
}, {
0x05, 0x0b, 0x11, 0x17, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
}, {
0x02, 0x05, 0x08, 0x0b, 0x0e, 0x11, 0x14, 0x17, 0x1a, 0x1d,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
}, {
0x02, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x11, 0x13,
0x15, 0x17, 0x19, 0x1b, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
}, {
0x02, 0x04, 0x05, 0x07, 0x08, 0x0a, 0x0b, 0x0d, 0x0e, 0x10,
0x11, 0x13, 0x14, 0x16, 0x17, 0x19, 0x1a, 0x1c, 0x1d, 0x1e,
0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
}, {
0x01, 0x02, 0x03, 0x04, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
0x0d, 0x0f, 0x10, 0x11, 0x13, 0x14, 0x15, 0x17, 0x18, 0x19,
0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e
}, {
0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x09, 0x0a, 0x0b,
0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x14, 0x15, 0x16,
0x17, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e
}, {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0b,
0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x15, 0x16,
0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e
}, {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14,
0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e
}, {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13,
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d
},
};
static const struct ScrollArrowsTemplate sUnknown_84524B4 = {
.firstArrowType = 0,
.firstX = 16,
.firstY = 80,
.secondArrowType = 1,
.secondX = 224,
.secondY = 80,
.fullyUpThreshold = 0,
.fullyDownThreshold = 0,
.tileTag = 2000,
.palTag = 0xFFFF,
.palNum = 1,
};
const struct CursorStruct gUnknown_84524C4 = {
.left = 0,
.top = 160,
.rowWidth = 64,
.rowHeight = 40,
.tileTag = 2002,
.palTag = 0xFFFF,
.palNum = 4,
};
#include "data/pokemon/pokedex_categories.h"
void sub_81024C0(void) void sub_81024C0(void)
{ {
@@ -239,7 +842,7 @@ void sub_810250C(void)
ResetTasks(); ResetTasks();
ScanlineEffect_Stop(); ScanlineEffect_Stop();
ResetBgsAndClearDma3BusyFlags(TRUE); ResetBgsAndClearDma3BusyFlags(TRUE);
InitBgsFromTemplates(0, gUnknown_8451EBC, NELEMS(gUnknown_8451EBC)); InitBgsFromTemplates(0, sUnknown_8451EBC, NELEMS(sUnknown_8451EBC));
SetBgTilemapBuffer(3, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(3, (u16*)Alloc(BG_SCREEN_SIZE));
SetBgTilemapBuffer(2, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(2, (u16*)Alloc(BG_SCREEN_SIZE));
SetBgTilemapBuffer(1, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(1, (u16*)Alloc(BG_SCREEN_SIZE));
@@ -248,14 +851,14 @@ void sub_810250C(void)
DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_84403AC, BG_SCREEN_SIZE, 0, 0); DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_84403AC, BG_SCREEN_SIZE, 0, 0);
else else
DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_8440274, BG_SCREEN_SIZE, 0, 0); DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_8440274, BG_SCREEN_SIZE, 0, 0);
InitWindows(gUnknown_8451ECC); InitWindows(sUnknown_8451ECC);
DeactivateAllTextPrinters(); DeactivateAllTextPrinters();
m4aSoundVSyncOn(); m4aSoundVSyncOn();
SetVBlankCallback(sub_81024C0); SetVBlankCallback(sub_81024C0);
EnableInterrupts(INTR_FLAG_VBLANK); EnableInterrupts(INTR_FLAG_VBLANK);
taskId = CreateTask(sub_810287C, 0); taskId = CreateTask(sub_810287C, 0);
gUnknown_203ACF0 = Alloc(sizeof(struct PokedexScreenData)); gUnknown_203ACF0 = Alloc(sizeof(struct PokedexScreenData));
*gUnknown_203ACF0 = gUnknown_8451EE4; *gUnknown_203ACF0 = sUnknown_8451EE4;
gUnknown_203ACF0->field_00 = taskId; gUnknown_203ACF0->field_00 = taskId;
gUnknown_203ACF0->field_44 = Alloc(NATIONAL_DEX_COUNT * sizeof(struct ListMenuItem)); gUnknown_203ACF0->field_44 = Alloc(NATIONAL_DEX_COUNT * sizeof(struct ListMenuItem));
gUnknown_203ACF0->field_6A = sub_8104BBC(0, 1); gUnknown_203ACF0->field_6A = sub_8104BBC(0, 1);
@@ -381,9 +984,9 @@ static void sub_810287C(u8 taskId)
case 5: case 5:
ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL);
if (IsNationalPokedexEnabled()) if (IsNationalPokedexEnabled())
gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&gUnknown_84520E4, &gUnknown_203ACF0->field_62); gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&sUnknown_84520E4, &gUnknown_203ACF0->field_62);
else else
gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&gUnknown_84520D4, &gUnknown_203ACF0->field_62); gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&sUnknown_84520D4, &gUnknown_203ACF0->field_62);
gUnknown_203ACF0->field_01 = 6; gUnknown_203ACF0->field_01 = 6;
break; break;
case 6: case 6:
@@ -478,12 +1081,12 @@ static void sub_8102C28(void)
FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00);
FillBgTilemapBufferRect(2, 0x000, 0, 0, 30, 20, 0x11); FillBgTilemapBufferRect(2, 0x000, 0, 0, 30, 20, 0x11);
FillBgTilemapBufferRect(1, 0x000, 0, 0, 30, 20, 0x11); FillBgTilemapBufferRect(1, 0x000, 0, 0, 30, 20, 0x11);
gUnknown_203ACF0->field_14 = AddWindow(&gUnknown_8451F54); gUnknown_203ACF0->field_14 = AddWindow(&sUnknown_8451F54);
gUnknown_203ACF0->field_15 = AddWindow(&gUnknown_8451F5C); gUnknown_203ACF0->field_15 = AddWindow(&sUnknown_8451F5C);
gUnknown_203ACF0->field_16 = AddWindow(&gUnknown_8451F64); gUnknown_203ACF0->field_16 = AddWindow(&sUnknown_8451F64);
if (IsNationalPokedexEnabled()) if (IsNationalPokedexEnabled())
{ {
listMenuTemplate = gUnknown_84520BC; listMenuTemplate = sUnknown_84520BC;
listMenuTemplate.windowId = gUnknown_203ACF0->field_14; listMenuTemplate.windowId = gUnknown_203ACF0->field_14;
gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10); gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10);
FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0)); FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0));
@@ -500,7 +1103,7 @@ static void sub_8102C28(void)
} }
else else
{ {
listMenuTemplate = gUnknown_8452004; listMenuTemplate = sUnknown_8452004;
listMenuTemplate.windowId = gUnknown_203ACF0->field_14; listMenuTemplate.windowId = gUnknown_203ACF0->field_14;
gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10); gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10);
FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0)); FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0));
@@ -521,7 +1124,7 @@ static void sub_8102C28(void)
CopyWindowToVram(gUnknown_203ACF0->field_16, COPYWIN_GFX); CopyWindowToVram(gUnknown_203ACF0->field_16, COPYWIN_GFX);
} }
void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list) static void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list)
{ {
if (!onInit) if (!onInit)
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
@@ -532,16 +1135,17 @@ void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list)
} }
else else
{ {
CopyToWindowPixelBuffer(gUnknown_203ACF0->field_15, gUnknown_84520F4[itemIndex].map, 0x000, 0x000); CopyToWindowPixelBuffer(gUnknown_203ACF0->field_15, sUnknown_84520F4[itemIndex].map, 0x000, 0x000);
LoadPalette(gUnknown_84520F4[itemIndex].pal, 0x10, 0x20); LoadPalette(sUnknown_84520F4[itemIndex].pal, 0x10, 0x20);
} }
PutWindowTilemap(gUnknown_203ACF0->field_15); PutWindowTilemap(gUnknown_203ACF0->field_15);
CopyWindowToVram(gUnknown_203ACF0->field_15, COPYWIN_GFX); CopyWindowToVram(gUnknown_203ACF0->field_15, COPYWIN_GFX);
} }
void sub_8102F48(u8 windowId, u32 itemId, u8 y) static void sub_8102F48(u8 windowId, s32 itemId, u8 y)
{ {
if (itemId > 8 || gUnknown_203ACF0->field_08 & (1 << itemId)) u32 itemId_ = itemId;
if (itemId_ > 8 || gUnknown_203ACF0->field_08 & (1 << itemId_))
ListMenuOverrideSetColors(1, 0, 3); ListMenuOverrideSetColors(1, 0, 3);
else else
ListMenuOverrideSetColors(10, 0, 11); ListMenuOverrideSetColors(10, 0, 11);
@@ -619,8 +1223,8 @@ static void sub_810317C(void)
struct ListMenuTemplate template; struct ListMenuTemplate template;
FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00);
FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11);
gUnknown_203ACF0->field_40 = AddWindow(&gUnknown_845216C); gUnknown_203ACF0->field_40 = AddWindow(&sUnknown_845216C);
template = gUnknown_8452174; template = sUnknown_8452174;
template.items = gUnknown_203ACF0->field_44; template.items = gUnknown_203ACF0->field_44;
template.windowId = gUnknown_203ACF0->field_40; template.windowId = gUnknown_203ACF0->field_40;
template.totalItems = gUnknown_203ACF0->field_48; template.totalItems = gUnknown_203ACF0->field_48;
@@ -705,8 +1309,8 @@ static void sub_810345C(void)
struct ListMenuTemplate template; struct ListMenuTemplate template;
FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00);
FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11);
gUnknown_203ACF0->field_40 = AddWindow(&gUnknown_845216C); gUnknown_203ACF0->field_40 = AddWindow(&sUnknown_845216C);
template = gUnknown_8452174; template = sUnknown_8452174;
template.items = gUnknown_203ACF0->field_44; template.items = gUnknown_203ACF0->field_44;
template.windowId = gUnknown_203ACF0->field_40; template.windowId = gUnknown_203ACF0->field_40;
template.totalItems = gUnknown_203ACF0->field_48; template.totalItems = gUnknown_203ACF0->field_48;
@@ -845,16 +1449,16 @@ static void sub_8103924(const struct ListMenuTemplate * template, u8 a1)
{ {
default: default:
case 0: case 0:
gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &gUnknown_845218C, gUnknown_203ACF0->field_36, gUnknown_203ACF0->field_34); gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_36, gUnknown_203ACF0->field_34);
break; break;
case 1: case 1:
case 2: case 2:
case 3: case 3:
case 4: case 4:
gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &gUnknown_845218C, gUnknown_203ACF0->field_3A, gUnknown_203ACF0->field_38); gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_3A, gUnknown_203ACF0->field_38);
break; break;
case 5: case 5:
gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &gUnknown_845218C, gUnknown_203ACF0->field_3E, gUnknown_203ACF0->field_3C); gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_3E, gUnknown_203ACF0->field_3C);
break; break;
} }
} }
@@ -881,9 +1485,9 @@ static void sub_8103988(u8 a0)
static u8 sub_81039F0(void) static u8 sub_81039F0(void)
{ {
struct ScrollArrowsTemplate template = gUnknown_84521B4; struct ScrollArrowsTemplate template = sUnknown_84521B4;
if (gUnknown_203ACF0->field_48 > gUnknown_8452174.maxShowed) if (gUnknown_203ACF0->field_48 > sUnknown_8452174.maxShowed)
template.fullyDownThreshold = gUnknown_203ACF0->field_48 - gUnknown_8452174.maxShowed; template.fullyDownThreshold = gUnknown_203ACF0->field_48 - sUnknown_8452174.maxShowed;
else else
template.fullyDownThreshold = 0; template.fullyDownThreshold = 0;
return AddScrollIndicatorArrowPair(&template, &gUnknown_203ACF0->field_62); return AddScrollIndicatorArrowPair(&template, &gUnknown_203ACF0->field_62);
@@ -896,7 +1500,7 @@ struct PokedexListItem
bool8 caught:1; bool8 caught:1;
}; };
void sub_8103A40(u8 windowId, s32 itemId, u8 y) static void sub_8103A40(u8 windowId, s32 itemId, u8 y)
{ {
u32 itemId_ = itemId; u32 itemId_ = itemId;
u16 species = itemId_; u16 species = itemId_;
@@ -1222,7 +1826,7 @@ static void sub_8103AC8(u8 taskId)
static u8 sub_8104234(void) static u8 sub_8104234(void)
{ {
struct ScrollArrowsTemplate template = gUnknown_84524B4; struct ScrollArrowsTemplate template = sUnknown_84524B4;
template.fullyUpThreshold = gUnknown_203ACF0->field_29; template.fullyUpThreshold = gUnknown_203ACF0->field_29;
template.fullyDownThreshold = gUnknown_203ACF0->field_2A - 1; template.fullyDownThreshold = gUnknown_203ACF0->field_2A - 1;
gUnknown_203ACF0->field_62 = gUnknown_203ACF0->field_2B; gUnknown_203ACF0->field_62 = gUnknown_203ACF0->field_2B;
@@ -1649,10 +2253,10 @@ bool8 sub_8104C64(u16 a0, u8 a1, u8 a2)
{ {
struct WindowTemplate template; struct WindowTemplate template;
a2--; a2--;
CopyToBgTilemapBufferRect_ChangePalette(3, gUnknown_845228C, gUnknown_8452334[a2][a1][0], gUnknown_8452334[a2][a1][1], 8, 8, a1 + 5); CopyToBgTilemapBufferRect_ChangePalette(3, sUnknown_845228C, gUnknown_8452334[a2][a1][0], gUnknown_8452334[a2][a1][1], 8, 8, a1 + 5);
if (gUnknown_203ACF0->field_20[a1] == 0xFF) if (gUnknown_203ACF0->field_20[a1] == 0xFF)
{ {
template = gUnknown_84521C4; template = sUnknown_84521C4;
template.tilemapLeft = gUnknown_8452334[a2][a1][0]; template.tilemapLeft = gUnknown_8452334[a2][a1][0];
template.tilemapTop = gUnknown_8452334[a2][a1][1]; template.tilemapTop = gUnknown_8452334[a2][a1][1];
template.paletteNum = a1 + 1; template.paletteNum = a1 + 1;
@@ -1670,7 +2274,7 @@ bool8 sub_8104C64(u16 a0, u8 a1, u8 a2)
{ {
if (a0 != SPECIES_NONE) if (a0 != SPECIES_NONE)
{ {
template = gUnknown_84521CC; template = sUnknown_84521CC;
template.tilemapLeft = gUnknown_8452334[a2][a1][2]; template.tilemapLeft = gUnknown_8452334[a2][a1][2];
template.tilemapTop = gUnknown_8452334[a2][a1][3]; template.tilemapTop = gUnknown_8452334[a2][a1][3];
template.baseBlock = a1 * 40 + 0x108; template.baseBlock = a1 * 40 + 0x108;
@@ -1719,11 +2323,11 @@ bool8 sub_8104F0C(bool8 a0)
FillWindowPixelBuffer(0, PIXEL_FILL(15)); FillWindowPixelBuffer(0, PIXEL_FILL(15));
if (a0) if (a0)
{ {
sub_8106E78(gDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 1); sub_8106E78(sDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 1);
} }
else else
{ {
sub_8106E78(gDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 0); sub_8106E78(sDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 0);
sub_8104EC0(0, sub_8106AF8(gUnknown_203ACF0->field_2B), sub_8106AF8(gUnknown_203ACF0->field_2A - 1), 160, 2); sub_8104EC0(0, sub_8106AF8(gUnknown_203ACF0->field_2B), sub_8106AF8(gUnknown_203ACF0->field_2A - 1), 160, 2);
} }
CopyWindowToVram(0, COPYWIN_GFX); CopyWindowToVram(0, COPYWIN_GFX);
@@ -1824,7 +2428,7 @@ bool8 sub_81051F0(u8 a0)
u16 *sp0C = gUnknown_203ACF0->field_5C + 0x000; u16 *sp0C = gUnknown_203ACF0->field_5C + 0x000;
for (i = 0; i < 30; i++) for (i = 0; i < 30; i++)
{ {
r4 = gUnknown_8452388[a0][i]; r4 = sUnknown_8452388[a0][i];
if (r4 == 30) if (r4 == 30)
{ {
sub_81051D0(0x000, bg1buff, i); sub_81051D0(0x000, bg1buff, i);