From 61061548016a66bc1d981e7c5c77f6a849f1486c Mon Sep 17 00:00:00 2001 From: Slawter666 <38655737+Slawter666@users.noreply.github.com> Date: Sun, 2 Sep 2018 16:26:23 +0100 Subject: [PATCH] Format WindowTemplate in battle_pyramid_bag.c --- src/battle_pyramid_bag.c | 90 ++++++++++++++++++++++++++++++++++++---- src/item_menu.c | 6 +-- 2 files changed, 84 insertions(+), 12 deletions(-) diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 8a5ce7a99..6629e6a0a 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -193,20 +193,92 @@ static const u8 sColorTable[][3] = static const struct WindowTemplate gUnknown_0861F328[] = { - {0x00, 0x0e, 0x02, 0x0f, 0x10, 0x0f, 0x001e}, - {0x00, 0x00, 0x0d, 0x0e, 0x06, 0x0f, 0x010e}, - {0x01, 0x02, 0x0f, 0x1b, 0x04, 0x0f, 0x0162}, - {0x01, 0x18, 0x11, 0x05, 0x02, 0x0f, 0x01ce}, + { + .priority = 0, + .tilemapLeft = 14, + .tilemapTop = 2, + .width = 15, + .height = 16, + .paletteNum = 15, + .baseBlock = 30 + }, + { + .priority = 0, + .tilemapLeft = 0, + .tilemapTop = 13, + .width = 14, + .height = 6, + .paletteNum = 15, + .baseBlock = 270 + }, + { + .priority = 1, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 27, + .height = 4, + .paletteNum = 15, + .baseBlock = 354 + }, + { + .priority = 1, + .tilemapLeft = 24, + .tilemapTop = 17, + .width = 5, + .height = 2, + .paletteNum = 15, + .baseBlock = 462 + }, DUMMY_WIN_TEMPLATE, }; static const struct WindowTemplate gUnknown_0861F350[] = { - {0x01, 0x16, 0x11, 0x07, 0x02, 0x0f, 0x01d8}, - {0x01, 0x16, 0x0f, 0x07, 0x04, 0x0f, 0x01d8}, - {0x01, 0x0f, 0x0f, 0x0e, 0x04, 0x0f, 0x01d8}, - {0x01, 0x0f, 0x0d, 0x0e, 0x06, 0x0f, 0x01d8}, - {0x01, 0x18, 0x0f, 0x05, 0x04, 0x0f, 0x01d8}, + { + .priority = 1, + .tilemapLeft = 22, + .tilemapTop = 17, + .width = 7, + .height = 2, + .paletteNum = 15, + .baseBlock = 472 + }, + { + .priority = 1, + .tilemapLeft = 22, + .tilemapTop = 15, + .width = 7, + .height = 4, + .paletteNum = 15, + .baseBlock = 472 + }, + { + .priority = 1, + .tilemapLeft = 15, + .tilemapTop = 15, + .width = 14, + .height = 4, + .paletteNum = 15, + .baseBlock = 472 + }, + { + .priority = 1, + .tilemapLeft = 15, + .tilemapTop = 13, + .width = 14, + .height = 6, + .paletteNum = 15, + .baseBlock = 472 + }, + { + .priority = 1, + .tilemapLeft = 24, + .tilemapTop = 15, + .width = 5, + .height = 4, + .paletteNum = 15, + .baseBlock = 472 + }, }; extern const struct CompressedSpriteSheet gUnknown_0861F3CC; diff --git a/src/item_menu.c b/src/item_menu.c index 5fea1326e..196ba9474 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -182,9 +182,9 @@ const struct BgTemplate gUnknown_08613F90[3] = const struct ListMenuTemplate gUnknown_08613F9C = { - NULL, - bag_menu_change_item_callback, - sub_81AB520, + .items = NULL, + .moveCursorFunc = bag_menu_change_item_callback, + .itemPrintFunc = sub_81AB520, .totalItems = 0, .maxShowed = 0, .windowId = 0,