summaryrefslogtreecommitdiff
path: root/src/pokeblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pokeblock.c')
-rw-r--r--src/pokeblock.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/pokeblock.c b/src/pokeblock.c
index b244409c4..7dd20b237 100644
--- a/src/pokeblock.c
+++ b/src/pokeblock.c
@@ -3,6 +3,7 @@
#include "bg.h"
#include "strings.h"
#include "text.h"
+#include "text_window.h"
#include "menu.h"
#include "task.h"
#include "menu_helpers.h"
@@ -24,11 +25,11 @@
#include "constants/songs.h"
#include "sound.h"
#include "berry.h"
-#include "menu_indicators.h"
#include "event_data.h"
#include "battle_message.h"
#include "safari_zone.h"
#include "lilycove_lady.h"
+#include "overworld.h"
#define POKEBLOCK_MAX_FEEL 99
#define FIELD_E75_COUNT 7
@@ -70,14 +71,11 @@ enum
};
extern u16 gSpecialVar_ItemId;
-extern void (*gFieldCallback)(void);
extern const u16 gUnknown_0860F074[];
extern void CB2_ReturnToField(void);
extern bool8 sub_81221EC(void);
-extern void sub_809882C(u8, u16, u8);
-extern void copy_textbox_border_tile_patterns_to_vram(u8, u16, u8);
extern void sub_80AF168(void);
// this file's functions
@@ -316,19 +314,19 @@ static const struct ListMenuTemplate sPokeblockListMenuTemplate =
{
.items = NULL,
.moveCursorFunc = MovePokeblockMenuCursor,
- .unk_08 = NULL,
+ .itemPrintFunc = NULL,
.totalItems = 0,
.maxShowed = 0,
.windowId = 1,
- .unk_11 = 0,
- .unk_12 = 1,
+ .header_X = 0,
+ .item_X = 1,
.cursor_X = 0,
.upText_Y = 1,
.cursorPal = 2,
.fillValue = 0,
.cursorShadowPal = 3,
.lettersSpacing = 0,
- .unk_16_3 = 0,
+ .itemVerticalPadding = 0,
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
.fontId = 1,
.cursorKind = 1
@@ -460,7 +458,7 @@ static bool8 InitPokeblockMenu(void)
gMain.state++;
break;
case 10:
- sub_8122344(&sPokeblockMenu->field_E75, FIELD_E75_COUNT);
+ sub_8122344(sPokeblockMenu->field_E75, FIELD_E75_COUNT);
gMain.state++;
break;
case 11:
@@ -493,7 +491,7 @@ static bool8 InitPokeblockMenu(void)
gMain.state++;
break;
case 18:
- BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
gPaletteFade.bufferTransferDisabled = 0;
gMain.state++;
break;
@@ -567,8 +565,8 @@ static void HandleInitWindows(void)
InitWindows(sWindowTemplatesForPokeblockMenu);
DeactivateAllTextPrinters();
- sub_809882C(0, 1, 0xE0);
- copy_textbox_border_tile_patterns_to_vram(0, 0xA, 0xD0);
+ LoadUserWindowBorderGfx(0, 1, 0xE0);
+ LoadMessageBoxGfx(0, 0xA, 0xD0);
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
for (i = 0; i < ARRAY_COUNT(sWindowTemplatesForPokeblockMenu) - 1; i++)
@@ -589,7 +587,7 @@ static void PutPokeblockInfoText(void)
{
u8 i;
- const u8 *itemName = ItemId_GetItem(ITEM_POKEBLOCK_CASE)->name;
+ const u8 *itemName = ItemId_GetName(ITEM_POKEBLOCK_CASE);
PrintOnPokeblockWindow(0, itemName, GetStringCenterAlignXOffset(1, itemName, 0x48));
PrintOnPokeblockWindow(2, gText_Spicy, 0);
@@ -808,7 +806,7 @@ static void sub_81363BC(void)
{
if (sPokeblockMenu->unkTaskId == 0xFF)
{
- sPokeblockMenu->unkTaskId = AddScrollIndicatorArrowPairParametrized(2, 0xB0, 8, 0x98, sPokeblockMenu->itemsNo - sPokeblockMenu->maxShowed,
+ sPokeblockMenu->unkTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xB0, 8, 0x98, sPokeblockMenu->itemsNo - sPokeblockMenu->maxShowed,
0x456, 0x456, &sSavedPokeblockData.lastItemPage);
}
}
@@ -856,7 +854,7 @@ static void sub_8136470(struct Sprite *sprite)
static void FadePaletteAndSetTaskToClosePokeblockCase(u8 taskId)
{
- BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
gTasks[taskId].func = Task_FreeDataAndExitPokeblockCase;
}