summaryrefslogtreecommitdiff
path: root/src/pokeblock.c
diff options
context:
space:
mode:
authorgarak <garakmon@gmail.com>2018-09-24 08:40:33 -0400
committergarak <garakmon@gmail.com>2018-09-24 08:40:33 -0400
commit72f9afcbf4a81909019f21acad0484b72ed217f6 (patch)
treebc7e9a48b8056e28403e251dab7ac64f649ad9e4 /src/pokeblock.c
parent3964dbd4822f1b22bbc696add7e56ff0c5b2caea (diff)
parent7ceabffc842dfdf127fd594055f895a0803f54f6 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/pokeblock.c')
-rw-r--r--src/pokeblock.c125
1 files changed, 111 insertions, 14 deletions
diff --git a/src/pokeblock.c b/src/pokeblock.c
index 7dd20b237..d0a867b3a 100644
--- a/src/pokeblock.c
+++ b/src/pokeblock.c
@@ -294,21 +294,118 @@ static const struct Pokeblock sFavoritePokeblocksTable[] =
static const struct WindowTemplate sWindowTemplatesForPokeblockMenu[] =
{
- {0, 2, 1, 9, 2, 0xF, 0x1E},
- {0, 0xF, 1, 0xE, 0x12, 0xF, 0x30},
- {0, 2, 0xD, 5, 2, 0xF, 0x12C},
- {0, 2, 0xF, 5, 2, 0xF, 0x136},
- {0, 2, 0x11, 5, 2, 0xF, 0x140},
- {0, 8, 0xD, 5, 2, 0xF, 0x14A},
- {0, 8, 0xF, 5, 2, 0xF, 0x154},
- {0, 0xB, 0x11, 2, 2, 0xF, 0x15E},
- {1, 7, 5, 6, 6, 0xF, 0x162},
- {1, 7, 7, 6, 4, 0xF, 0x186},
- {1, 2, 0xF, 0x1B, 4, 0xF, 0x19E},
+ {
+ .priority = 0,
+ .tilemapLeft = 2,
+ .tilemapTop = 1,
+ .width = 9,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x1E
+ },
+ {
+ .priority = 0,
+ .tilemapLeft = 15,
+ .tilemapTop = 1,
+ .width = 14,
+ .height = 18,
+ .paletteNum = 15,
+ .baseBlock = 0x30
+ },
+ {
+ .priority = 0,
+ .tilemapLeft = 2,
+ .tilemapTop = 13,
+ .width = 5,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x12C
+ },
+ {
+ .priority = 0,
+ .tilemapLeft = 2,
+ .tilemapTop = 15,
+ .width = 5,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x136
+ },
+ {
+ .priority = 0,
+ .tilemapLeft = 2,
+ .tilemapTop = 17,
+ .width = 5,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x140
+ },
+ {
+ .priority = 0,
+ .tilemapLeft = 8,
+ .tilemapTop = 13,
+ .width = 5,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x14A
+ },
+ {
+ .priority = 0,
+ .tilemapLeft = 8,
+ .tilemapTop = 15,
+ .width = 5,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x154
+ },
+ {
+ .priority = 0,
+ .tilemapLeft = 11,
+ .tilemapTop = 17,
+ .width = 2,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x15E
+ },
+ {
+ .priority = 1,
+ .tilemapLeft = 7,
+ .tilemapTop = 5,
+ .width = 6,
+ .height = 6,
+ .paletteNum = 15,
+ .baseBlock = 0x162
+ },
+ {
+ .priority = 1,
+ .tilemapLeft = 7,
+ .tilemapTop = 7,
+ .width = 6,
+ .height = 4,
+ .paletteNum = 15,
+ .baseBlock = 0x186
+ },
+ {
+ .priority = 1,
+ .tilemapLeft = 2,
+ .tilemapTop = 15,
+ .width = 27,
+ .height = 4,
+ .paletteNum = 15,
+ .baseBlock = 0x19E
+ },
DUMMY_WIN_TEMPLATE
};
-static const struct WindowTemplate sTossPkblockWindowTemplate = {1, 0x15, 9, 5, 4, 0xF, 0x20A};
+static const struct WindowTemplate sTossPkblockWindowTemplate =
+{
+ .priority = 1,
+ .tilemapLeft = 21,
+ .tilemapTop = 9,
+ .width = 5,
+ .height = 4,
+ .paletteNum = 15,
+ .baseBlock = 0x20A
+};
static const struct ListMenuTemplate sPokeblockListMenuTemplate =
{
@@ -580,7 +677,7 @@ static void HandleInitWindows(void)
static void PrintOnPokeblockWindow(u8 windowId, const u8 *string, s32 x)
{
- AddTextPrinterParameterized2(windowId, 1, x, 1, 0, 0, sTextColorInPokeblockMenu, 0, string);
+ AddTextPrinterParameterized4(windowId, 1, x, 1, 0, 0, sTextColorInPokeblockMenu, 0, string);
}
static void PutPokeblockInfoText(void)
@@ -1042,7 +1139,7 @@ static void Task_HandlePokeblockOptionsInput(u8 taskId)
if (sub_81221EC() == TRUE)
return;
- itemId = ProcessMenuInputNoWrapAround();
+ itemId = Menu_ProcessInputNoWrapAround();
if (itemId == MENU_NOTHING_CHOSEN)
{
return;