summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/graphics.h12
-rw-r--r--include/menu_helpers.h4
-rw-r--r--include/menu_specialized.h20
-rw-r--r--include/player_pc.h71
4 files changed, 24 insertions, 83 deletions
diff --git a/include/graphics.h b/include/graphics.h
index 1f40cda01..dcb47a226 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -4955,13 +4955,13 @@ extern const u32 gKantoTrainerCardFrontLink_Tilemap[];
extern const u32 gHoennTrainerCardBg_Tilemap[];
// Frontier Pass
-extern const u32 gUnknown_08DE08C8[];
-extern const u32 gUnknown_08DE2084[];
-extern const u32 gUnknown_08DE3350[];
-extern const u32 gUnknown_08DE3374[];
-extern const u32 gUnknown_08DE3060[];
+extern const u32 gFrontierPassBg_Gfx[];
+extern const u32 gFrontierPassBg_Tilemap[];
+extern const u16 gFrontierPassBg_Pal[][16];
+extern const u32 gFrontierPassMapAndCard_Gfx[];
+extern const u32 gFrontierPassCancelButton_Tilemap[];
+extern const u32 gFrontierPassCancelButtonHighlighted_Tilemap[];
extern const u32 gFrontierPassMedals_Gfx[];
-extern const u16 gUnknown_08DE07C8[][16];
extern const u16 gFrontierPassCursor_Pal[];
extern const u16 gFrontierPassMedalsGold_Pal[];
extern const u16 gFrontierPassMedalsSilver_Pal[];
diff --git a/include/menu_helpers.h b/include/menu_helpers.h
index 9909437a2..b8ac067ed 100644
--- a/include/menu_helpers.h
+++ b/include/menu_helpers.h
@@ -32,8 +32,8 @@ bool8 sub_8122148(u16 itemId);
bool8 IsWritingMailAllowed(u16 itemId);
bool8 MenuHelpers_LinkSomething(void);
bool8 MenuHelpers_CallLinkSomething(void);
-void sub_812220C(struct ItemSlot *slots, u8 count, u8 *arg2, u8 *usedSlotsCount, u8 maxUsedSlotsCount);
-void sub_812225C(u16 *scrollOffset, u16 *cursorPos, u8 maxShownItems, u8 numItems);
+void SetItemListPerPageCount(struct ItemSlot *slots, u8 slotsCount, u8 *pageItems, u8 *totalItems, u8 maxPerPage);
+void SetCursorWithinListBounds(u16 *scrollOffset, u16 *cursorPos, u8 maxShownItems, u8 totalItems);
void sub_8122298(u16 *arg0, u16 *arg1, u8 arg2, u8 arg3, u8 arg4);
void LoadListMenuSwapLineGfx(void);
void CreateSwapLineSprites(u8 *spriteIds, u8 count);
diff --git a/include/menu_specialized.h b/include/menu_specialized.h
index 987fca9fc..c29110662 100644
--- a/include/menu_specialized.h
+++ b/include/menu_specialized.h
@@ -15,6 +15,14 @@
#define MAX_CONDITION_SPARKLES 10
+// Window IDs for the Player PC Mailbox
+enum {
+ MAILBOXWIN_TITLE,
+ MAILBOXWIN_LIST,
+ MAILBOXWIN_OPTIONS,
+ MAILBOXWIN_COUNT
+};
+
struct UnknownSubStruct_81D1ED4
{
u16 unk0;
@@ -35,12 +43,12 @@ struct ConditionGraph
/*0x355*/ u8 state;
};
-bool8 sub_81D1C44(u8 count);
-u8 sub_81D1C84(u8 a0);
-u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page);
-void sub_81D1E90(struct PlayerPCItemPageStruct *page);
-void sub_81D1EC0(void);
-void sub_81D1D04(u8 a0);
+bool8 MailboxMenu_Alloc(u8 count);
+u8 MailboxMenu_AddWindow(u8 windowIdx);
+u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page);
+void MailboxMenu_AddScrollArrows(struct PlayerPCItemPageStruct *page);
+void MailboxMenu_Free(void);
+void MailboxMenu_RemoveWindow(u8 windowIdx);
void InitConditionGraphData(struct ConditionGraph *graph);
void sub_81D2108(struct ConditionGraph *graph);
void SetConditionGraphIOWindows(u8 bg);
diff --git a/include/player_pc.h b/include/player_pc.h
index bdf4a4e0e..2521eac13 100644
--- a/include/player_pc.h
+++ b/include/player_pc.h
@@ -3,69 +3,6 @@
#include "menu.h"
-// local task defines
-#define PAGE_INDEX data[0]
-#define ITEMS_ABOVE_TOP data[1]
-#define NUM_ITEMS data[1]
-#define NUM_QUANTITY_ROLLER data[3]
-#define NUM_PAGE_ITEMS data[4]
-// not used
-#define CURRENT_ITEM_STORAGE_MENU data[3]
-// not used
-#define SWAP_ITEM_INDEX data[8]
-#define SWITCH_MODE_ACTIVE data[9]
-
-// this is potentially an ewram access occuring in high ewram. TODO: investigate this further.
-#define NEW_GAME_PC_ITEMS(i, type) ((u16)((u16 *)gNewGamePCItems + type)[i * 2])
-
-// defined and used in the above macro
-enum
-{
- PC_ITEM_ID,
- PC_QUANTITY
-};
-
-// player PC menu options
-enum
-{
- PLAYERPC_MENU_ITEMSTORAGE,
- PLAYERPC_MENU_MAILBOX,
- PLAYERPC_MENU_DECORATION,
- PLAYERPC_MENU_TURNOFF
-};
-
-// item storage menus
-enum
-{
- ITEMPC_MENU_WITHDRAW,
- ITEMPC_MENU_DEPOSIT,
- ITEMPC_MENU_TOSS,
- ITEMPC_MENU_EXIT
-};
-
-// mailbox mail options
-enum
-{
- MAILBOX_READ,
- MAILBOX_MOVE_TO_BAG,
- MAILBOX_GIVE,
- MAILBOX_CANCEL,
-};
-
-// special item description handlers
-enum
-{
- ITEMPC_SWITCH_WHICH_ITEM = 0xFFF7,
- ITEMPC_OKAY_TO_THROW_AWAY,
- ITEMPC_TOO_IMPORTANT,
- ITEMPC_NO_MORE_ROOM,
- ITEMPC_THREW_AWAY_ITEM,
- ITEMPC_HOW_MANY_TO_TOSS,
- ITEMPC_WITHDREW_THING,
- ITEMPC_HOW_MANY_TO_WITHDRAW,
- ITEMPC_GO_BACK_TO_PREV
-};
-
struct PlayerPCItemPageStruct
{
u16 cursorPos;
@@ -76,16 +13,12 @@ struct PlayerPCItemPageStruct
u8 scrollIndicatorTaskId;
};
-// Exported type declarations
-
-// Exported RAM declarations
-extern struct PlayerPCItemPageStruct playerPCItemPageInfo;
+extern struct PlayerPCItemPageStruct gPlayerPCItemPageInfo;
-// Exported ROM declarations
extern const struct MenuAction gMailboxMailOptions[];
void ReshowPlayerPC(u8 taskId);
-void sub_816B31C(void);
+void CB2_PlayerPCExitBagMenu(void);
void Mailbox_ReturnToMailListAfterDeposit(void);
void NewGameInitPCItems(void);