diff --git a/headers/data/arm9.h b/headers/data/arm9.h index 820019a8..127a44b4 100644 --- a/headers/data/arm9.h +++ b/headers/data/arm9.h @@ -247,6 +247,12 @@ extern int16_t TBL_TALK_GROUP_STRING_ID_START[6]; extern struct menu_control* MENU_CONTROL_PTR; extern int16_t KEYBOARD_STRING_IDS[30]; extern struct mission_reward_struct_main* MISSION_REWARD_STRUCT_MAIN_PTR; +extern struct unk_storage_struct_0xc UNK_STORAGE_STRUCT_0XC; +extern struct unk_storage_struct_0x14 UNK_STORAGE_STRUCT_0X14; +extern struct unk_storage_struct_0x8* UNK_STORAGE_STRUCT_0X8_PTR_1; +extern struct unk_storage_window_struct_0xc* UNK_STORAGE_WINDOW_STRUCT_0XC_PTR; +extern struct unk_storage_struct_0x8* UNK_STORAGE_STRUCT_0X8_PTR_2; +extern struct unk_storage_struct_0x410* UNK_STORAGE_STRUCT_0X410_PTR; extern bool NOTIFY_NOTE; extern struct monster_id_16 DEFAULT_HERO_ID; extern struct monster_id_16 DEFAULT_PARTNER_ID; diff --git a/headers/data/overlay11.h b/headers/data/overlay11.h index ffa2bdb2..4681ac6c 100644 --- a/headers/data/overlay11.h +++ b/headers/data/overlay11.h @@ -33,6 +33,8 @@ extern undefined4 OV11_STATIC_INITIALIZER; extern struct main_ground_data GROUND_STATE_PTRS; extern struct exclusive_item_requirements* EXCLUSIVE_ITEM_REQUIREMENTS_PTR; extern struct swap_shop_inventory_ptrs SWAP_SHOP_INVENTORY_PTRS; +extern int SPINDA_CAFE_OVERLAY_STATUS; +extern int RECYCLE_SHOP_OVERLAY_STATUS; extern uint32_t WORLD_MAP_MODE; #endif diff --git a/headers/data/overlay15.h b/headers/data/overlay15.h index 3275d3b1..e40272dc 100644 --- a/headers/data/overlay15.h +++ b/headers/data/overlay15.h @@ -3,10 +3,21 @@ extern struct simple_menu_id_item BANK_MAIN_MENU_ITEMS[5]; extern struct window_params BANK_WINDOW_PARAMS_1; -extern struct window_params BANK_WINDOW_PARAMS_2; -extern struct window_params BANK_WINDOW_PARAMS_3; -extern struct window_params BANK_WINDOW_PARAMS_4; +extern struct window_params BANK_GOLD_STATUS_WINDOW_PARAMS; +extern struct window_params BANK_ADVANCED_TEXTBOX_WINDOW_PARAMS; +extern struct window_params BANK_MAIN_MENU_WINDOW_PARAMS; extern struct window_params BANK_WINDOW_PARAMS_5; +extern char BANK_R_CLOSE_STR[9]; +extern char BANK_M_OPEN_STR[8]; +extern char BANK_S_CLOSE_STR[9]; +extern char MENU_BANK_MODE_CANCEL_STR[23]; +extern char BANK_P_OPEN_STR[8]; +extern char BANK_G_OPEN_STR[8]; +extern char BANK_MES_NOT_CLOSE_STR[15]; +extern char BANK_SUB_NOT_CLOSE_STR[15]; +extern char BANK_SELECT_NOT_CLOSE_STR[18]; +extern char BANK_INPUT_NOT_CLOSE_STR[17]; extern undefined4 OV15_STATIC_INITIALIZER; +extern struct duskull_bank* DUSKULL_BANK_STRUCT_PTR; #endif diff --git a/headers/data/overlay22.h b/headers/data/overlay22.h index cd5676ce..f20abe03 100644 --- a/headers/data/overlay22.h +++ b/headers/data/overlay22.h @@ -2,11 +2,17 @@ #define HEADERS_DATA_OVERLAY22_H_ extern struct window_params SHOP_WINDOW_PARAMS_1; +extern char GREEN_KEC_SHOP_RED_COLOR_TEXT_TAG[7]; +extern char GREEN_KEC_SHOP_UNCOLOR_TEXT_TAG[5]; extern struct window_params SHOP_WINDOW_PARAMS_2; +extern char PURPLE_KEC_SHOP_RED_COLOR_TEXT_TAG[7]; +extern char PURPLE_KEC_SHOP_UNCOLOR_TEXT_TAG[5]; +extern bool KECLEON_SHOP_ITEM_CATEGORY_BOOLS[12]; extern struct simple_menu_id_item SHOP_MENU_ITEMS_CONFIRM[3]; extern struct simple_menu_id_item SHOP_MAIN_MENU_ITEMS_1[4]; extern struct simple_menu_id_item SHOP_MAIN_MENU_ITEMS_2[4]; extern struct simple_menu_id_item SHOP_MAIN_MENU_ITEMS_3[6]; +extern int16_t KECLEON_SHOP_TEXT_STRINGS[2][24]; extern struct window_params SHOP_WINDOW_PARAMS_3; extern struct window_params SHOP_WINDOW_PARAMS_4; extern struct window_params SHOP_WINDOW_PARAMS_5; @@ -15,6 +21,52 @@ extern struct window_params SHOP_WINDOW_PARAMS_7; extern struct window_params SHOP_WINDOW_PARAMS_8; extern struct window_params SHOP_WINDOW_PARAMS_9; extern struct window_params SHOP_WINDOW_PARAMS_10; +extern char KEC_SHOP_START_STR[8]; +extern char KEC_SHOP_RESTART_STR[10]; +extern char KEC_SHOP_SELECTMENU_STR[13]; +extern char KEC_SHOP_EXPLANATION_STR[14]; +extern char KEC_SHOP_THANKS_STR[9]; +extern char KEC_SHOP_SHOP_NON_STR[11]; +extern char KEC_SHOP_GOLD_NON_STR[11]; +extern char KEC_SHOP_GOLD_MAX_STR[11]; +extern char KEC_SHOP_GOLD_FULL_STR[12]; +extern char KEC_SHOP_SELL_NON_STR[11]; +extern char KEC_SHOP_ITEM_NON_STR[11]; +extern char KEC_SHOP_ITEM_MAX_STR[11]; +extern char KEC_SHOP_SOLD_OUT_STR[11]; +extern char KEC_SHOP_BUY_POOR_STR[11]; +extern char KEC_SHOP_SELL_BAD_STR[11]; +extern char KEC_SHOP_SELL_FULL_STR[12]; +extern char KEC_SHOP_MODE_BUY_START_STR[17]; +extern char KEC_SHOP_BUY_RESTART_STR[14]; +extern char KEC_SHOP_BUY_SELECT_STR[13]; +extern char KEC_SHOP_BUY_RESELECT_STR[15]; +extern char KEC_SHOP_SUB_MENU_BUY_STR[15]; +extern char KEC_SHOP_BUY_CONFIRM_STR[14]; +extern char KEC_SHOP_BUY_EXPLA_ITEM_STR[27]; +extern char KEC_SHOP_ITEM_TEXT_TAG[9]; +extern char KEC_SHOP_BUY_THANKS_STR[13]; +extern char KEC_SHOP_SELL_START_STR[13]; +extern char KEC_SHOP_SELL_RESTART_STR[15]; +extern char KEC_SHOP_SELL_SELECT_STR[14]; +extern char KEC_SHOP_SELL_RESELECT_STR[16]; +extern char KEC_SHOP_SELL_SUB_MENU_STR[16]; +extern char KEC_SHOP_SELL_CONFIRM_STR[15]; +extern char KEC_SHOP_SELL_CONFIRM_NEW_STR[19]; +extern char KEC_SHOP_BUY_CONFIRM_NEW_STR[18]; +extern char KEC_SHOP_SELL_EXPLA_STR[13]; +extern char KEC_SHOP_SELL_THANKS_STR[14]; +extern char KEC_SHOP_SELL_ALL_STR[11]; +extern char KEC_SHOP_BUT_MULTI_STR[12]; +extern char KEC_SHOP_SELL_MULTI_STR[13]; +extern char KEC_SHOP_ALL_CONFIRM_STR[14]; +extern char KEC_SHOP_SELL_ALL_THANKS_STR[17]; +extern char KEC_SHOP_BUY_MULTI_THANKS_STR[18]; +extern char KEC_SHOP_SELL_MULTI_THANKS_STR[19]; +extern char KEC_SHOP_CHANGEJOB_STR[11]; extern undefined4 OV22_STATIC_INITIALIZER; +extern struct green_kec_shop_item_data_wrapper GREEN_KEC_SHOP_ITEM_DATA_WRAPPER; +extern struct purple_kec_shop_item_data_wrapper PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER; +extern struct kecleon_shop_shared_struct* KECLEON_SHOP_SHARED_STRUCT_PTR; #endif diff --git a/headers/data/overlay23.h b/headers/data/overlay23.h index a71df23c..b508f438 100644 --- a/headers/data/overlay23.h +++ b/headers/data/overlay23.h @@ -1,6 +1,9 @@ #ifndef HEADERS_DATA_OVERLAY23_H_ #define HEADERS_DATA_OVERLAY23_H_ +extern int8_t STORAGE_OPTION_STATES_1[4]; +extern int8_t STORAGE_OPTION_STATES_2[4]; +extern bool STORAGE_ITEM_CATEGORY_BOOLS[12]; extern struct simple_menu_id_item STORAGE_MENU_ITEMS_CONFIRM[3]; extern struct simple_menu_id_item STORAGE_MAIN_MENU_ITEMS_1[4]; extern struct simple_menu_id_item STORAGE_MAIN_MENU_ITEMS_2[4]; @@ -15,5 +18,6 @@ extern struct window_params STORAGE_WINDOW_PARAMS_6; extern struct window_params STORAGE_WINDOW_PARAMS_7; extern struct window_params STORAGE_WINDOW_PARAMS_8; extern undefined4 OV23_STATIC_INITIALIZER; +extern struct kangaskhan_storage_manager* KANGASKHAN_STORAGE_MANAGER_PTR; #endif diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index a523ba3e..bb45a22b 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -176,7 +176,11 @@ int GetDisplayedSellPrice(struct item* item); int GetActualBuyPrice(struct item* item); int GetActualSellPrice(struct item* item); int FindItemInInventory(enum item_id item_id); +void MaybeGetFormattedItemName(char* item_name, struct item* item, bool* category_table, + bool is_colored, bool space_align_non_sticky_items); int SprintfStatic(char* str, const char* format, ...); +void MaybeGetUncoloredFormattedItemName(char* item_name, struct item* item, bool* category_table); +void MaybeGetColoredFormattedItemName(char* item_name, struct item* item, bool* category_table); void ItemZInit(struct item* item); bool AreItemsEquivalent(struct item* item1, struct item* item2, int bitmask); int GetMoneyQuantity(struct item* item); @@ -264,6 +268,7 @@ int CountItemTypeInStorage(struct bulk_item* bulk_item); int GetEquivBulkItemIdxInStorage(struct bulk_item* bulk_item); bool ConvertStorageItemAtIdxToBulkItem(int idx, struct bulk_item* bulk_item); bool ConvertStorageItemAtIdxToItem(int idx, struct item* item); +void MaybeUpdateStorage(void); bool RemoveItemAtIdxInStorage(int idx); bool RemoveBulkItemInStorage(struct bulk_item* bulk_item); bool RemoveItemInStorage(struct item* item); @@ -286,10 +291,13 @@ void SetEggHatchTimer(uint16_t hatch_timer); void DecrementEggHatchTimer(void); int RemoveInvalidKecleonShop1Items(void); void RemoveItemFromKecleonShop1(int slot); +struct bulk_item* GetCurrentKecleonShop1ItemByIndex(int index); void SortKecleonItems1(void); void GenerateKecleonItems1(enum kecleon_shop_version kecleon_shop_version); bool AddItemToKecleonShop1(enum item_id item_id); +int RemoveInvalidKecleonShop2Items(void); void RemoveItemFromKecleonShop2(int slot); +struct bulk_item* GetCurrentKecleonShop2ItemByIndex(int index); void SortKecleonItems2(void); void GenerateKecleonItems2(enum kecleon_shop_version kecleon_shop_version); bool AddItemToKecleonShop2(enum item_id item_id); @@ -617,8 +625,8 @@ void LoadTblTalk(void); int GetTalkLine(int personality_idx, enum talk_type talk_type, int restrictions); bool IsAOrBPressed(void); void DrawTextInWindow(int window_id, int x, int y, char* string); -void AppendStandardStringToMission(undefined4 param_1, undefined4 param_2, undefined4 param_3, - int string_id); +void AppendStringIdToWindow(undefined4 param_1, undefined4 param_2, undefined4 param_3, + int string_id); uint8_t GetCharWidth(char symbol); int GetColorCodePaletteOffset(char symbol); uint8_t DrawChar(int window_id, int x, int y, char symbol, int color_offset); @@ -753,6 +761,7 @@ int CreateTextBoxWithArg(struct window_params* params, text_box_callback_with_ar void* cb_arg); void CloseTextBox(int window_id); void CloseTextBox2(int window_id); +bool IsTextboxState3(int window_id); struct text_box* CreateTextBoxInternal(struct window_params* params); void UpdateTextBox(struct window* window); bool IsTextBoxActive(int window_id); @@ -790,6 +799,7 @@ void CloseAdvancedTextBox2(int window_id); void SetAdvancedTextBoxState5(int window_id); void CloseAdvancedTextBox(int window_id); bool IsAdvancedTextBoxActive(int window_id); +uint32_t GetDigitInputResult(int window_id); uint8_t GetWindowIdPageStart(int window_id); uint32_t GetAdvancedTextBoxFlags2(int window_id); void SetUnkAdvancedTextBoxFn(int window_id, unk_advanced_text_box_fn_t fn); @@ -839,6 +849,16 @@ int SetupAndShowKeyboard(int menu_type, char* buffer1, char* buffer2); int ShowKeyboard(int menu_type, char* buffer1, int param_3, char* buffer2); int GetKeyboardStatus(void); int GetKeyboardStringResult(void); +void DigitInputMenuInit(struct digit_input_menu* digit_input_menu); +int32_t DigitInputMenuReturn(struct digit_input_menu* digit_input_menu); +void DigitInputMenuInitDigits(struct digit_input_menu* digit_input_menu); +undefined DigitInputMenuGetDigits(int* digit_values, int max_value, int max_digit); +undefined4 DigitInputMenuFrameUpdate(struct digit_input_menu* digit_input_menu); +undefined4 DigitInputMenuCheckValidTouchScreenInput(struct digit_input_menu* digit_input_menu); +undefined DigitInputMenuCheckTouchUpDownArrow(struct digit_input_menu* digit_input_menu, + int param_2, int param_3); +void DigitInputMenuDrawDigits(struct digit_input_menu* digit_input_menu); +void DigitInputMenuDrawDigitsCallback(void); char* TeamSelectionMenuGetItem(char* buffer, int member_idx); void FreeMissionRewardStructMain(void); void MissionRewardCloseAllBoxes(void); @@ -846,6 +866,24 @@ void PrintMoveOptionMenu(void); void PrintIqSkillsMenu(enum monster_id monster_id, uint32_t* iq_skills_flags, int monster_iq, bool is_blinded); char* GetCheckIqMenuSkillString(char* buf, int iq_entry_idx); +int InitUnkStorageStruct0xA0(int32_t param_1, undefined4 param_2, int param_3, int param_4); +void FreeUnkStorageStruct0xA0(void); +void ClearBagSelectedItemTable(void); +bool IsBagItemIndexSelected(int index); +void AllocUnkBagStruct(void); +void FreeUnkBagStruct(void); +int InitUnkStorageStruct0x18c0(int param_1, undefined4 param_2, int param_3); +bool MaybeTrySelectStorageItem(struct buttons inputs); +void FreeUnkStorageStruct0x18c0(void); +void ClearStorageSelectedItemTable(void); +int CountSelectedStorageItems(void); +int GetFirstSelectedStorageItemIndex(void); +bool IsStorageItemIndexSelected(int index); +void AllocStorageSelectedItemTable(void); +void FreeStorageSelectedItemTable(void); +undefined4 InitUnkStorageStruct0x410(undefined2* param_1, int param_2); +void UnkStorageStruct0x410CloseSimpleMenu(void); +void UnkStorageStruct0x410CreateDialogueBox(void); void PlayMissionClearBgm(void); bool GetNotifyNote(void); void SetNotifyNote(bool flag); diff --git a/headers/functions/overlay11.h b/headers/functions/overlay11.h index 5bb8b0a1..71ffa3a9 100644 --- a/headers/functions/overlay11.h +++ b/headers/functions/overlay11.h @@ -178,7 +178,25 @@ bool IsGroundMonsterAtMaxLevel(struct ground_monster* ground_monster); void GetExclusiveItemRequirements(undefined param_1, undefined param_2); void SwapShopInventoryManager(enum swap_shop_inventory_case inventory_case, int monster_id_or_exc_item_count); -void LoadRecycleShopOverlay(void); +void LoadDuskullBankOverlay(void); +void LoadLuminousSpringOverlay(void); +void LoadChimechoAssemblyOverlay(undefined4 param_1); +void LoadElectivireLinkShopOverlay(undefined4 param_1); +void LoadSpindaCafeOverlayInit(void); +void LoadSpindaCafeOverlayResume(void); +bool IsSpindaCafeOverlaySuspended(void); +void LoadRecycleShopOverlayInit(void); +void LoadRecycleShopOverlayResume(void); +bool IsRecycleShopOverlaySuspended(void); +void LoadCroagunkSwapShopOverlay(void); +void LoadKecleonShopOverlay(bool is_purple_kec); +void LoadKangaskhanOverlay(int param_1); +void LoadChanseyDaycareOverlay(void); +void LoadXatuAppraisalOverlay(void); +void LoadMissionRewardOverlay(void); +void LoadRuleDungeonEffectsOverlay(void); +void LoadSpecialEpisodeDiscardOverlay1(void); +void LoadSpecialEpisodeDiscardOverlay2(void); void HandleControlsTopScreenGround(void); bool GetDungeonMapPos(struct uvec2* out_pos, enum dungeon_id dungeon); void WorldMapSetMode(uint32_t world_map_mode); diff --git a/headers/functions/overlay15.h b/headers/functions/overlay15.h new file mode 100644 index 00000000..ecfcb96c --- /dev/null +++ b/headers/functions/overlay15.h @@ -0,0 +1,14 @@ +#ifndef HEADERS_FUNCTIONS_OVERLAY15_H_ +#define HEADERS_FUNCTIONS_OVERLAY15_H_ + +void InitDuskullBankStruct(void); +undefined4 DuskullBankSubcaseManager1(void); +void DuskullBankSubcaseManager2(enum bank_subcase subcase); +void BankUpdateDigitInputMenuDisplay(bool is_withdrawing); +void DuskullBankTextboxGoldStatusCallback(int window_id); +void DuskullBankDigitInputDisplayCallback(void); +undefined4 DuskullBankEntryPoint(void); +void DuskullBankDestructor(void); +undefined4 DuskullBankFrameUpdate(void); + +#endif diff --git a/headers/functions/overlay22.h b/headers/functions/overlay22.h new file mode 100644 index 00000000..00c830e1 --- /dev/null +++ b/headers/functions/overlay22.h @@ -0,0 +1,46 @@ +#ifndef HEADERS_FUNCTIONS_OVERLAY22_H_ +#define HEADERS_FUNCTIONS_OVERLAY22_H_ + +void GreenKecleonShopUpdateItemNamesAndCollectionMenu(void); +int GreenKecleonShopInitCollectionMenu(void); +void GreenKecleonShopDoNothing(void); +undefined4 GreenKecleonShopGetCollectionMenuStatus(void); +uint16_t GreenKecleonShopGetShopItemSlot(void); +void GreenKecleonShopInitItemNameData(void); +void GreenKecleonShopFreeItemNameData(void); +void GreenKecleonShopFillItemNameData(void); +int GreenKecleonShopCountSelectedItems(void); +int GreenKecleonShopGetFirstSelectedItemIndex(void); +int GreenKecleonShopSumSelectedItemPrices(void); +void GreenKecleonShopPurchaseSingleItem(uint32_t item_slot); +void GreenKecleonShopPurchaseSelectedItems(void); +char* GreenKecleonGetItemNameStringByIndex(undefined4 param_1, int param_2, uint32_t* param_3); +undefined4 GreenKecleonShopUnkCollectionMenuCallback(uint32_t param_1); +void GreenKecleonShopVoidFnCollectionMenuCallback(uint32_t param_1); +void PurpleKecleonShopUpdateItemNamesAndCollectionMenu(void); +int PurpleKecleonShopInitCollectionMenu(void); +void PurpleKecleonShopDoNothing(void); +undefined4 PurpleKecleonShopGetCollectionMenuStatus(void); +uint16_t PurpleKecleonShopGetShopItemSlot(void); +void PurpleKecleonShopInitItemNameData(void); +void PurpleKecleonShopFreeItemNameData(void); +void PurpleKecleonShopFillItemNameData(void); +int PurpleKecleonShopCountSelectedItems(void); +int PurpleKecleonShopGetFirstSelectedItemIndex(void); +int PurpleKecleonShopSumSelectedItemPrices(void); +void PurpleKecleonShopPurchaseSingleItem(uint32_t item_slot); +void PurpleKecleonShopPurchaseSelectedItems(void); +char* PurpleKecleonGetItemNameStringByIndex(undefined4 param_1, int param_2, uint32_t* param_3); +undefined4 PurpleKecleonShopUnkCollectionMenuCallback(uint32_t param_1); +void PurpleKecleonShopCollectionMenuCallback(uint32_t param_1); +void KecleonShopSubcaseManager1(int32_t subcase_id); +void KecleonShopSubcaseManager2(void); +void RemoveInvalidKecleonShopItems(void); +void KecleonShopSumBagItemSellPrices(void); +void KecleonShopUpdatePortraitEmotion(bool is_angry); +undefined4 KecleonShopEntryPoint(void); +void KecleonShopDestructor(void); +undefined4 KecleonShopFrameUpdate(void); +void KecleonShopCloseSimpleMenu(void); + +#endif diff --git a/headers/functions/overlay23.h b/headers/functions/overlay23.h new file mode 100644 index 00000000..6cf89d61 --- /dev/null +++ b/headers/functions/overlay23.h @@ -0,0 +1,18 @@ +#ifndef HEADERS_FUNCTIONS_OVERLAY23_H_ +#define HEADERS_FUNCTIONS_OVERLAY23_H_ + +void KangaskhanStorageSubcaseManager1(int32_t subcase_id); +void KangaskhanStorageSubcaseManager2(void); +undefined4 KangaskhanStorageEntryPoint(void); +void KangaskhanStorageDestructor(void); +undefined4 KangaskhanStorageFrameUpdate(void); +void KangaskhanStorageCloseSimpleMenu(void); +void KangaskhanStorageShowDialogueAndPortraitIfNotRock(int window_id, + struct preprocessor_flags flags, + int string_id); +void KangaskhanStorageWithdrawSelectedItems(void); +void KangaskhanStorageDepositSelectedItems(void); +void KangaskhanStorageWithdrawSingleItem(void); +void KangaskhanStorageDepositSingleItem(void); + +#endif diff --git a/headers/types/common/common.h b/headers/types/common/common.h index 79ddd871..83edd9e6 100644 --- a/headers/types/common/common.h +++ b/headers/types/common/common.h @@ -1558,4 +1558,104 @@ struct mission_reward_struct_overlay { }; ASSERT_SIZE(struct mission_reward_struct_overlay, 156); +struct unk_storage_struct_0x18c0 { + int field0_0x0; + int16_t storage_block_indices[1000]; + int8_t collection_menu_window_id; + int8_t textbox_window_id_1; + int8_t textbox_window_id_2; + int8_t field5_0x7d7; + int8_t field6_0x7d8; + int8_t field7_0x7d9; + undefined field8_0x7da; + undefined field9_0x7db; + struct window_extra_info window_extra_info; + undefined field11_0x874[4168]; + undefined4 field4175_0x18bc; +}; +ASSERT_SIZE(struct unk_storage_struct_0x18c0, 6336); + +struct unk_storage_struct_0x14 { + int16_t field0_0x0; + int16_t field1_0x2; + struct unk_storage_struct_0x18c0* struct_0x18c0_ptr; + bool* are_selected_items; // Points to bool table of size 1000 + undefined4 field4_0xc; + undefined4 field5_0x10; +}; +ASSERT_SIZE(struct unk_storage_struct_0x14, 20); + +struct unk_storage_struct_0xc { + undefined2 field0_0x0; + undefined field1_0x2; + undefined field2_0x3; + struct storage_collection_menu_manager* unk_struct_size_0xa0; + bool* are_selected_items; // Points to a bool table of size 50 +}; +ASSERT_SIZE(struct unk_storage_struct_0xc, 12); + +struct unk_storage_window_struct_0xc { + undefined4 field0_0x0; + undefined field1_0x4; + undefined field2_0x5; + undefined2 field3_0x6; + undefined2 field4_0x8; + int8_t textbox_window_id; + undefined field6_0xb; +}; +ASSERT_SIZE(struct unk_storage_window_struct_0xc, 12); + +struct unk_storage_struct_0x8 { + undefined4 field0_0x0; + undefined field1_0x4; + int8_t textbox_window_id; + undefined field3_0x6; + undefined field4_0x7; +}; +ASSERT_SIZE(struct unk_storage_struct_0x8, 8); + +struct unk_storage_struct_0x410 { + undefined4 field0_0x0; + int32_t case_id; + int32_t next_case; + undefined field3_0xc; + undefined field4_0xd; + undefined field5_0xe; + undefined field6_0xf; + undefined field7_0x10; + undefined field8_0x11; + undefined field9_0x12; + undefined field10_0x13; + int8_t dialogue_box_window_id; + int8_t window_id_0x15; + int8_t simple_menu_window_id; + int8_t scroll_box_window_id; + undefined4 subcase_id; + struct preprocessor_args preprocessor_args; + undefined4 field17_0x6c; + char unk_buffer_0x70[256]; + undefined4 field271_0x170; + char unk_buffer_0x174[256]; + undefined4 field528_0x274; + // The usage of this field is inconsistent with it being a buffer, but it is suspiciously + // sized... + undefined field529_0x278[256]; + undefined4 field785_0x378; + undefined field786_0x37c; + undefined field787_0x37d; + undefined field788_0x37e; + undefined field789_0x37f; + undefined2 field790_0x380; + undefined2 field791_0x382; + undefined2 field792_0x384; + undefined field793_0x386; + undefined field794_0x387; + undefined2 field795_0x388; + undefined field796_0x38a; + undefined field797_0x38b; + undefined4 field798_0x38c; + char unk_buffer_0x390[128]; +}; +ASSERT_SIZE(struct unk_storage_struct_0x410, 1040); + #endif diff --git a/headers/types/common/window.h b/headers/types/common/window.h index 93b040a1..3caba2e2 100644 --- a/headers/types/common/window.h +++ b/headers/types/common/window.h @@ -1107,4 +1107,40 @@ struct stairs_menu { }; ASSERT_SIZE(struct stairs_menu, 24); +// Used for creating and managing the advanced textbox that handles digit inputs, such as duskull +// bank transactions. +struct digit_input_menu { + int32_t current_value; + int32_t initial_value; + int32_t min_value; + int32_t max_value; + int32_t initial_digit; + uint8_t advanced_textbox_window_id; + undefined field6_0x15; + undefined field7_0x16; + undefined field8_0x17; + // Offset for the advanced menu's position. Not used by the duskull bank. + int32_t window_offset_coords[2]; + // Seems to be related to the touch screen hitbox for the up and down arrows for a digit. + // Relative to the position of the window. + int32_t ts_arrow_coords[2]; + int8_t selected_digit; + int8_t num_digits; + undefined field13_0x2a; + undefined field14_0x2b; +}; +ASSERT_SIZE(struct digit_input_menu, 44); + +// Not a window, but seems to be a manger struct for the collection menu that handles kangaskhan +// storage. +struct storage_collection_menu_manager { + int32_t case_id; + int8_t collection_menu_window_id; + undefined field2_0x5; + undefined field3_0x6; + undefined field4_0x7; + struct window_extra_info window_extra_info; +}; +ASSERT_SIZE(struct storage_collection_menu_manager, 160); + #endif diff --git a/headers/types/ground_mode/enums.h b/headers/types/ground_mode/enums.h index edab74dd..28f3a16f 100644 --- a/headers/types/ground_mode/enums.h +++ b/headers/types/ground_mode/enums.h @@ -2367,6 +2367,32 @@ enum recycle_case_id { RECYCLE_UNK_SUSPEND_0x8 = 8, }; +enum bank_main_case_id { + BANK_BEGIN_MENU = 0, + BANK_DO_SUBCASE = 1, + BANK_WAIT_CLOSE_MENU = 2, + BANK_END_MENU = 3, + BANK_UNK_0x4 = 4, + BANK_CLOSE_MENU = 5, +}; + +enum bank_subcase { + SBANK_WELCOME = 0, + SBANK_MAIN_MENU_DIALOGUE = 1, + SBANK_MAIN_MENU_SELECTION = 2, + SBANK_INFO_DIALOGUE = 3, + SBANK_BEGIN_EXIT = 4, + SBANK_BACK_OUT_DIGIT_MENU = 5, + SBANK_EXIT = 6, + SBANK_TRY_BEGIN_DEPOSIT = 7, + SBANK_DEPOSIT_DIGIT_MENU = 8, + SBANK_DEPOSIT_END = 9, + SBANK_TRY_BEGIN_WITHDRAW = 10, + SBANK_WITHDRAW_DIGIT_MENU = 11, + SBANK_WITHDRAW_END = 12, + SBANK_UPDATE_GOLD_STATUS = 13, +}; + // These are super long, so split them out into a separate file #include "version_dep_enums.h" diff --git a/headers/types/ground_mode/ground_mode.h b/headers/types/ground_mode/ground_mode.h index d8d10c67..b78161de 100644 --- a/headers/types/ground_mode/ground_mode.h +++ b/headers/types/ground_mode/ground_mode.h @@ -1287,4 +1287,202 @@ struct recycle_unk_struct_0x1cc { }; ASSERT_SIZE(struct recycle_unk_struct_0x1cc, 460); +struct duskull_bank { + enum bank_main_case_id main_case_id; + enum bank_subcase current_subcase_id; + enum bank_subcase next_subcase_id; + int gold_withdrawn; // If negative, is storing gold + undefined4 field4_0x10; // Zeroed but otherwise unused + undefined field5_0x14[64]; // Seems to be fully unused. + struct digit_input_menu digit_input_menu; + int8_t dialogue_box_window_id; + int8_t portrait_box_window_id; + int8_t gold_status_window_id; // Referred to by debug prints as a "sub" of some kind + int8_t simple_menu_window_id; + int8_t unk_input_window_id; + undefined field12_0x85; + undefined field13_0x86; + undefined field14_0x87; + struct preprocessor_args preprocessor_args; + bool is_withdrawing; + undefined field17_0xd9; + undefined field18_0xda; + undefined field19_0xdb; + struct portrait_params portrait_params; +}; +ASSERT_SIZE(struct duskull_bank, 236); + +struct kecleon_shop_shared_struct { + bool is_purple_kec; + undefined field_0x1; + undefined field_0x2; + undefined field_0x3; + // As the menu is better understood, an enum should be made for this field. + int32_t main_case_id; + bool is_green_kec; + undefined field3_0x9; + undefined field4_0xa; + undefined field5_0xb; + undefined4 field6_0xc; + // As the menu is better understood, an enum should be made for this field. + int32_t subcase_id; + undefined field8_0x14; + undefined field9_0x15; + undefined field10_0x16; + undefined field11_0x17; + undefined field12_0x18; + undefined field13_0x19; + undefined field14_0x1a; + undefined field15_0x1b; + undefined field16_0x1c; + undefined field17_0x1d; + undefined field18_0x1e; + undefined field19_0x1f; + undefined field20_0x20; + undefined field21_0x21; + undefined field22_0x22; + undefined field23_0x23; + int num_items_to_sell; + int total_sell_price; + struct item selected_item; + int8_t selected_item_green; + int8_t selected_item_purple; + undefined field29_0x34; + undefined field30_0x35; + undefined field31_0x36; + undefined field32_0x37; + undefined4 field33_0x38; + undefined4 field34_0x3c; + undefined4 field35_0x40; + struct game_state_values* game_state_values_ptr; + int8_t dialogue_box_window_id; + int8_t portrait_box_window_id; + int8_t collection_menu_window_id; + int8_t window_id_0x4b; + int8_t simple_menu_window_id; + undefined field42_0x4d; + undefined field43_0x4e; + undefined field44_0x4f; + struct preprocessor_args preprocessor_args; + undefined fields46_0xa0[320]; + struct portrait_params portrait_params; +}; +ASSERT_SIZE(struct kecleon_shop_shared_struct, 496); + +struct shop_item_name { + char* item_name_ptr; // Points to buffer of size 80 + int item_slot_id; +}; +ASSERT_SIZE(struct shop_item_name, 8); + +struct purple_kec_shop_item_data { + undefined4 field0_0x0; // Set by Arm9LoadUnkFieldNa0x2029EC8... + undefined4 field1_0x4; + int16_t shop_name_string_id; + undefined field3_0xa; + undefined field4_0xb; + undefined4 field5_0xc; + undefined fields6_0x10[136]; + int8_t collection_menu_window_id; // Created by Rename Structure Field action + undefined field143_0x99; + undefined field144_0x9a; + undefined field145_0x9b; + int32_t num_items_for_sale; + struct shop_item_name shop_item_name_table[4]; + struct shop_item_name unk_shop_item_name; + char item_name_buffers[4][80]; + undefined1 unk_item_field_tbl_1[4]; + undefined1 unk_item_field_tbl_1_unuse[4]; + int32_t item_prices[4]; + int32_t item_prices_unused[4]; + bool items_are_selected[4]; +}; +ASSERT_SIZE(struct purple_kec_shop_item_data, 564); + +struct purple_kec_shop_item_data_wrapper { + int16_t selected_item_slot; + undefined field1_0x2; + undefined field2_0x3; + struct purple_kec_shop_item_data* purple_kec_item_data_ptr; +}; +ASSERT_SIZE(struct purple_kec_shop_item_data_wrapper, 8); + +struct green_kec_shop_item_data { + undefined4 field0_0x0; // Set by Arm9LoadUnkFieldNa0x2029EC8... + int field1_0x4; + int16_t shop_name_string_id; // Created by Rename Structure Field action + undefined field3_0xa; + undefined field4_0xb; + int field5_0xc; + undefined fields_0x10[136]; + int8_t collection_menu_window_id; + undefined field143_0x99; + undefined field144_0x9a; + undefined field145_0x9b; + int32_t num_items_for_sale; // Created by Rename Structure Field action + struct shop_item_name shop_item_name_table[8]; + struct shop_item_name unk_shop_item_name; + char item_name_buffers[8][80]; + int8_t unk_item_field_tbl_1[8]; + int item_prices[8]; + undefined1 items_are_selected[8]; +}; +ASSERT_SIZE(struct green_kec_shop_item_data, 920); + +struct green_kec_shop_item_data_wrapper { + int16_t selected_item_slot; + undefined field1_0x2; + undefined field2_0x3; + struct green_kec_shop_item_data* green_kec_item_data_ptr; +}; +ASSERT_SIZE(struct green_kec_shop_item_data_wrapper, 8); + +// Exclusively used within the overlay +struct kangaskhan_storage_manager { + int32_t kangaskhan_type; // 0 is likely kangaskhan, 1 and 2 are treated the same, consistent + // with kanga rock behavior. + undefined4 field1_0x4; + int32_t subcase_id; + int32_t next_subcase; + int32_t unk_counter_0x10; + int32_t unk_timer_0x14; + struct item bag_item_to_store; + undefined field7_0x1e; + undefined field8_0x1f; + int8_t item_slot; + undefined field10_0x21; + undefined field11_0x22; + undefined field12_0x23; + int16_t block_storage_item_slot; + undefined field14_0x26; + undefined field15_0x27; + undefined4 field16_0x28; + undefined4 field17_0x2c; + undefined4 field18_0x30; + undefined fields19_0x34[84]; + struct portrait_emotion_8 portrait_emotion; + undefined field104_0x89; + undefined field105_0x8a; + undefined field106_0x8b; + undefined4 case_id; // Seems strange for it to be all the way down here... + undefined1 field108_0x90[5]; + int8_t dialogue_box_window_id; + int8_t portrait_box_window_id; + int8_t collection_menu_window_id; + int8_t window_id_0x98; + int8_t simple_menu_window_id; + undefined field114_0x9a; + undefined field115_0x9b; + struct preprocessor_args preprocessor_args; + undefined fields117_0xec[64]; + char string_buffer[128]; + struct portrait_params portrait_params; + bool window_is_copied; + undefined field_0x1bd; + undefined field_0x1be; + undefined field_0x1bf; + struct window_extra_info window_extra_info; +}; +ASSERT_SIZE(struct kangaskhan_storage_manager, 600); + #endif diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 693ff6ff..9b485e1a 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -1811,6 +1811,17 @@ arm9: r0: item_id return: inventory index + - name: MaybeGetFormattedItemName + address: + EU: 0x200D398 + description: |- + Seems to get a formatted copy of an item. + + r0: [output] name string + r1: item pointer + r2: bool table corresponding to item categories? + r3: 1 if name should be colored, 0 if not + stack[0]: 1 if should align with sticky items, 0 if not. - name: SprintfStatic address: EU: @@ -1873,6 +1884,24 @@ arm9: r1: format ...: variadic return: number of characters printed, excluding the null-terminator + - name: MaybeGetUncoloredFormattedItemName + address: + EU: 0x200D6E4 + description: |- + Seems to return an uncolored copy of the item name, with the appropriate quantity tag. + + r0: [output] name string + r1: item pointer + r2: bool table corresponding to item categories? + - name: MaybeGetColoredFormattedItemName + address: + EU: 0x200D6F8 + description: |- + Seems to return a colored copy of the item name, with the appropriate color and quantity tag. + + r0: [output] name string + r1: item pointer + r2: bool table corresponding to item categories? - name: ItemZInit address: EU: 0x200D8A4 @@ -2766,6 +2795,15 @@ arm9: r0: item index r1: [output] pointer to an item return: bool whether or not the item id is not 0 + - name: MaybeUpdateStorage + address: + EU: 0x2010124 + description: |- + Just a guess. + Seems like it might handle updating storage, syncing the item count data to the temporary item slots after interacting with storage. + Used as a sort parallel to RemoveEmptyItemsInBag. + + No params. - name: RemoveItemAtIdxInStorage address: EU: 0x2010248 @@ -2978,6 +3016,14 @@ arm9: Removes an item from the first Kecleon Shop at a specific slot in the shop list. r0: item slot (0-7) + - name: GetCurrentKecleonShop1ItemByIndex + address: + EU: 0x2010940 + description: |- + Retrieves a bulk_item from the first Kecleon Shop at a specified index. + + r0: index + return: bulk_item pointer - name: SortKecleonItems1 address: EU: 0x20109FC @@ -3009,6 +3055,13 @@ arm9: r0: item ID return: whether the item was added succesfully + - name: RemoveInvalidKecleonShop2Items + address: + EU: 0x2010BE4 + description: |- + Iterates through the current first Kecleon Shop items, and removes any with item_id ITEM_NONE. + + return: number of items removed from the shop. - name: RemoveItemFromKecleonShop2 address: EU: 0x2010C20 @@ -3018,6 +3071,14 @@ arm9: Removes an item from the second Kecleon Shop at a specific slot in the shop list. r0: item slot (0-4) + - name: GetCurrentKecleonShop2ItemByIndex + address: + EU: 0x2010C4C + description: |- + Retrieves a bulk_item from the first Kecleon Shop at a specified index. + + r0: index + return: bulk_item pointer - name: SortKecleonItems2 address: EU: 0x2010D08 @@ -5908,14 +5969,15 @@ arm9: r1: x offset within window r2: y offset within window r3: text to draw - - name: AppendStandardStringToMission + - name: AppendStringIdToWindow + aliases: + - AppendStandardStringToMission address: EU: 0x202654C NA: 0x2026268 JP: 0x2026340 description: |- - Seems to append a string from a string_id to text. Known to be used for this purpose in MakeMissionDetails. - + Seems to append a string from a string_id to text. Known to be used for this purpose in MakeMissionDetails and BankUpdateDigitInputMenuDisplay. r0: undefined4 r1: undefined4 @@ -7112,6 +7174,14 @@ arm9: Seems to do some things with the text box, before doing the same things that CloseTextBox does. r0: window_id + - name: IsTextboxState3 + address: + EU: 0x202FCAC + description: |- + Checks if a text_box is in state 3. + + r0: window_id + return: bool - name: CreateTextBoxInternal address: EU: 0x202FCD0 @@ -7427,6 +7497,14 @@ arm9: r0: window_id return: bool + - name: GetDigitInputResult + address: + EU: 0x2030C34 + description: |- + Seems to retrieve the result of a digit input advanced textbox. + + r0: advanced textbox window_id + return: value submitted in a digit input advanced texbox. - name: GetWindowIdPageStart address: EU: 0x2030D0C @@ -7851,6 +7929,82 @@ arm9: Note: unverified, ported from Irdkwia's notes return: ? + - name: DigitInputMenuInit + address: + EU: 0x203975C + description: |- + Seems to handle initialization of a digit_input_window_manager. + Used by something other than Duskull Bank! + + r0: digit_input_menu pointer + - name: DigitInputMenuReturn + address: + EU: 0x2039824 + description: |- + Seems to process the result of DigitInputMenuFrameUpdate. + Used by something other than Duskull Bank! + + r0: digit_input_menu pointer + return: int32_t + - name: DigitInputMenuInitDigits + address: + EU: 0x20398C8 + description: |- + Seems to handle initializing the digit fields of a digit_input_menu struct, adjusting the max_digits to align with max_value, and more. + + r0: digit_input_menu pointer + - name: DigitInputMenuGetDigits + address: + EU: 0x203997C + description: |- + Seems to handle generating the digits of a digit input menu, given the max value it can display and the number of digits it can hold. + + r0: [output] digit_values + r1: max_value + r2: max_digits + return: ? + - name: DigitInputMenuFrameUpdate + address: + EU: 0x20399E0 + description: |- + Run every frame a digit input menu is active, detecting player inputs via both buttons and the touch screen. + + r0: digit_input_menu pointer + return: Some kind of exit code, interpreted by DigitInputMenuReturn + - name: DigitInputMenuCheckValidTouchScreenInput + address: + EU: 0x2039C48 + description: |- + Just a guess. Seems to be checking for touch screen input, and interpreting the results as an equivalent set of button inputs? + + r0: digit_input_menu pointer + return: undefined4 + - name: DigitInputMenuCheckTouchUpDownArrow + address: + EU: 0x2039CF8 + description: |- + Called by DigitInputMenuCheckValidTouchScreenInput, which this function assumes to be generally correct. + Seems to specifically check for a touch screen press above or below the current digit, to increment/decrement it + + r0: digit_input_menu pointer + r1: int + r2: int + return: ? + - name: DigitInputMenuDrawDigits + address: + EU: 0x2039E08 + description: |- + Seems to handle actually drawing the digits on the advanced textbox for a digit_input_window_manager. + + r0: digit_input_menu pointer + - name: DigitInputMenuDrawDigitsCallback + address: + EU: 0x2039F10 + description: |- + A text_box_callback_fn_t for a digit input window advanced_text_box. + Is used by something other than the Duskull Bank! + + No params. - name: TeamSelectionMenuGetItem address: EU: 0x203AA58 @@ -7914,6 +8068,162 @@ arm9: r0: [output] buffer r1: id in team member's IQ skill list return: input buffer + - name: InitUnkStorageStruct0xA0 + address: + EU: 0x2042554 + description: |- + Initializes an unknown struct of size 0xA0, to a pointer in UNK_STORAGE_STRUCT_0XC. + Appears to be used for kangaskhan storage. + + r0: int32_t + r1: undefined4 + r2: int + r3: int + return: int + - name: FreeUnkStorageStruct0xA0 + address: + EU: 0x2042980 + description: |- + Frees an unknown struct of size 0xA0, to a pointer in UNK_STORAGE_STRUCT_0XC. + Appears to be used for kangaskhan storage. + + No params. + - name: ClearBagSelectedItemTable + address: + EU: 0x2042E14 + description: |- + Seems to clear the list of selected bag item bools. + Known to be used by Kangaskhan Storage. + + No params. + - name: IsBagItemIndexSelected + address: + EU: 0x2042EA0 + description: |- + Seems to check if a specified index in the bag is selected. + Known to be used by Kangaskhan Storage. + + r0: index + return: bool + - name: AllocUnkBagStruct + address: + EU: 0x2042EB4 + description: |- + Allocates a currently unknown struct UNK_STORAGE_STRUCT_0XC, that seems to manage the bag while interacting with storage. + Known to be used by Kangaskhan Storage. + + No params. + - name: FreeUnkBagStruct + address: + EU: 0x2042ED8 + description: |- + Frees a currently unknown struct UNK_STORAGE_STRUCT_0XC, that seems to manage the bag while interacting with storage. + Known to be used by Kangaskhan Storage. + + No params. + - name: InitUnkStorageStruct0x18c0 + address: + EU: 0x204300C + description: |- + Allocates a currently unknown struct of size 0x18c0, and stores it to a pointer at UNK_STORAGE_STRUCT_0X14. + Known to be used by Kangaskhan Storage. + + r0: int + r1: undefined4 + r2: int + return: int + - name: MaybeTrySelectStorageItem + address: + EU: 0x20432D4 + description: |- + Seems to be responsible for selecting an item from storage, for multi-select. + Known to be used by Kangaskhan Storage. + + r0: buttons struct? Seems to be checking for the R button... + return: bool + - name: FreeUnkStorageStruct0x18c0 + address: + EU: 0x2043498 + description: |- + Frees a currently unknown struct of size 0x18c0 from a pointer at UNK_STORAGE_STRUCT_0X14. + Known to be used by Kangaskhan Storage. + + No params. + - name: ClearStorageSelectedItemTable + address: + EU: 0x20437F0 + description: |- + Seems to clear the selected item bool table for storage. + Known to be used by Kangaskhan Storage. + + No params. + - name: CountSelectedStorageItems + address: + EU: 0x2043818 + description: |- + Seems to count the number of currently selected items in storage. + Known to be used by Kangaskhan Storage. + + return: number of selected items + - name: GetFirstSelectedStorageItemIndex + address: + EU: 0x2043848 + description: |- + Seems to retrieve the index of the first currently selected item in storage. + Known to be used by Kangaskhan Storage. + + return: index of first selected item + - name: IsStorageItemIndexSelected + address: + EU: 0x2043884 + description: |- + Seems to check if a specified storage item index is selected. + Known to be used by Kangaskhan Storage. + + r0: index + return: bool + - name: AllocStorageSelectedItemTable + address: + EU: 0x20443B0 + description: |- + Seems to allocate a table of bools for selected storage items to a pointer in UNK_STORAGE_STRUCT_0X14. + Known to be used by Kangaskhan Storage. + + No params. + - name: FreeStorageSelectedItemTable + address: + EU: 0x20443D4 + description: |- + Seems to free a table of bools for selected storage items from a pointer in UNK_STORAGE_STRUCT_0X14. + Known to be used by Kangaskhan Storage. + + No params. + - name: InitUnkStorageStruct0x410 + address: + EU: 0x2045714 + description: |- + Allocates a currently unknown struct of size 0x410 at UNK_STORAGE_STRUCT_0X410_PTR. May be a state case structure of some kind. + Likely used by Kangaskhan Storage, or some other storage interaction menu. + + r0: undefined2 pointer + r1: int + return: undefined4 + - name: UnkStorageStruct0x410CloseSimpleMenu + address: + EU: 0x20468F8 + description: |- + Seems to close a simple menu for a currently unknown struct of size 0x410 at UNK_STORAGE_STRUCT_0X410_PTR. May be a state case structure of some kind. + Likely used by Kangaskhan Storage, or some other storage interaction menu. + + No params. + - name: UnkStorageStruct0x410CreateDialogueBox + address: + EU: 0x2046940 + description: |- + Seems to create a dialogue box for a currently unknown struct of size 0x410 at UNK_STORAGE_STRUCT_0X410_PTR. May be a state case structure of some kind. + Likely used by Kangaskhan Storage, or some other storage interaction menu. + + No params. - name: PlayMissionClearBgm address: EU: 0x2046A5C @@ -15960,6 +16270,60 @@ arm9: Is also used sparingly during the Spinda Cafe egg event. type: mission_reward_struct_main pointer + - name: UNK_STORAGE_STRUCT_0XC + address: + EU: 0x20B07C4 + length: + EU: 0xC + description: |- + A currently unknown struct of size 0xc, with ties to kangaskhan storage. + + type: struct unk_storage_struct_0xc + - name: UNK_STORAGE_STRUCT_0X14 + address: + EU: 0x20B07D0 + length: + EU: 0x14 + description: |- + A currently unknown struct of size 0x14, with ties to kangaskhan storage. + + type: struct unk_storage_struct_0x14 + - name: UNK_STORAGE_STRUCT_0X8_PTR_1 + address: + EU: 0x20B07E4 + length: + EU: 0x4 + description: |- + A pointer to a currently unknown struct of size 0x8, with ties to kangaskhan storage. + + type: struct unk_storage_struct_0x8* + - name: UNK_STORAGE_WINDOW_STRUCT_0XC_PTR + address: + EU: 0x20B07E8 + length: + EU: 0x4 + description: |- + A pointer to a currently unknown struct of size 0xc, with ties to kangaskhan storage. + + type: struct unk_storage_window_struct_0xc* + - name: UNK_STORAGE_STRUCT_0X8_PTR_2 + address: + EU: 0x20B07EC + length: + EU: 0x4 + description: |- + A pointer to a currently unknown struct of size 0x8, with ties to kangaskhan storage. + + type: struct unk_storage_struct_0x8* + - name: UNK_STORAGE_STRUCT_0X410_PTR + address: + EU: 0x20B07F0 + length: + EU: 0x4 + description: |- + A pointer to a currently unknown struct of size 0x410, with ties to kangaskhan storage. + + type: struct unk_storage_struct_0x410* - name: NOTIFY_NOTE address: EU: 0x20B0814 diff --git a/symbols/overlay11.yml b/symbols/overlay11.yml index c9c2cc7d..403e1108 100644 --- a/symbols/overlay11.yml +++ b/symbols/overlay11.yml @@ -1659,13 +1659,141 @@ overlay11: r0: switch case index for the function: 0 = Swap List Inventory, 1 = Unknown, 2 = Species Exclusive Item List, 3 = Item Trade Away Selection List. r1: Depends on r0. If case 2: ID of the monster to retrieve an exclusive item list for. If case 3: Number of Exclusive Items the player owns. - - name: LoadRecycleShopOverlay + - name: LoadDuskullBankOverlay + address: + EU: 0x230D54C + description: |- + Seems to handle loading overlay 15 for the duskull bank. + + No params. + - name: LoadLuminousSpringOverlay + address: + EU: 0x230D560 + description: |- + Seems to handle loading overlay 16 for luminous spring. + + No params. + - name: LoadChimechoAssemblyOverlay + address: + EU: 0x230D574 + description: |- + Seems to handle loading overlay 17 for the chimecho assembly. + + r0: undefined4 + - name: LoadElectivireLinkShopOverlay + address: + EU: 0x230D59C + description: |- + Seems to handle loading overlay 18 for the electivire link shop. + + r0: undefined4 + - name: LoadSpindaCafeOverlayInit + address: + EU: 0x230D5C4 + description: |- + Seems to handle loading overlay 19 for initializing the spinda cafe. + + No params. + - name: LoadSpindaCafeOverlayResume + address: + EU: 0x230D5E8 + description: |- + Seems to handle loading overlay 19 for resuming operations of the spinda cafe. + + No params. + - name: IsSpindaCafeOverlaySuspended + address: + EU: 0x230D60C + description: |- + Checks SPINDA_CAFE_OVERLAY_STATUS for if the Spinda Cafe is inactive. + + return: 1 if the cafe is suspended, 0 if not. + - name: LoadRecycleShopOverlayInit + address: + EU: 0x230D61C + description: |- + Seems to handle loading overlay 20 for initializing the recycle shop. + + No params. + - name: LoadRecycleShopOverlayResume + address: + EU: 0x230D644 + description: |- + Seems to handle loading overlay 20 for resuming operations of the recycle shop. + + No params. + - name: IsRecycleShopOverlaySuspended + address: + EU: 0x230D67C + description: |- + Checks RECYCLE_SHOP_OVERLAY_STATUS for if the recycle shop is inactive. + + return: 1 if the recycle shop is suspended, 0 if not. + - name: LoadCroagunkSwapShopOverlay + address: + EU: 0x230D6E4 + description: |- + Seems to handle loading overlay 21 for the croagunk swap shop. + + No params. + - name: LoadKecleonShopOverlay + address: + EU: 0x230D6F8 + description: |- + Seems to handle loading overlay 22 for the kecleon brothers shop. Is used by both colors of Kecleon. + + r0: 1 for purple kecleon, 0 for green kecleon. + - name: LoadKangaskhanOverlay + address: + EU: 0x230D720 + description: |- + Seems to handle loading overlay 23 for Kangaskhan storage, as well as Kangaskhan rock storage. + + r0: 2 for kangaskhan rock, 0 otherwise? + - name: LoadChanseyDaycareOverlay + address: + EU: 0x230D740 + description: |- + Seems to handle loading overlay 24 for the Chansey daycare. + + No params. + - name: LoadXatuAppraisalOverlay + address: + EU: 0x230D754 + description: |- + Seems to handle loading overlay 24 for Xatu's appraisal. + + No params. + - name: LoadMissionRewardOverlay + aliases: + - LoadRecycleShopOverlay address: EU: 0x230D768 NA: 0x230CDCC JP: 0x230E378 description: |- - Seems to be responsible for loading overlay 20 for the recycle shop. + Seems to be responsible for loading overlay 26 for the mission reward sequence. + + No params. + - name: LoadRuleDungeonEffectsOverlay + address: + EU: 0x230D77C + description: |- + Seems to be responsible for loading overlay 26 to handle rule dungeon effects. + + No params. + - name: LoadSpecialEpisodeDiscardOverlay1 + address: + EU: 0x230D7CC + description: |- + Seems to load overlay 27, which is believed to handle special episode discarding. + + No params. + - name: LoadSpecialEpisodeDiscardOverlay2 + address: + EU: 0x230D7E0 + description: |- + Seems to load overlay 27, which is believed to handle special episode discarding. No params. - name: HandleControlsTopScreenGround @@ -2111,6 +2239,24 @@ overlay11: length: EU: 0x8 description: Host pointers to multiple structures used for performing internal Swap Shop checks. + - name: SPINDA_CAFE_OVERLAY_STATUS + address: + EU: 0x23258EC + length: + EU: 0x4 + description: |- + Tracks whether or not the spinda cafe overlay is suspended. 1 if it is inactive, 0 if it is active. + + type: int + - name: RECYCLE_SHOP_OVERLAY_STATUS + address: + EU: 0x23258F4 + length: + EU: 0x4 + description: |- + Tracks whether or not the recycle shop overlay is suspended. 1 if it is inactive, 0 if it is active. + + type: int - name: WORLD_MAP_MODE address: EU: 0x2325924 diff --git a/symbols/overlay15.yml b/symbols/overlay15.yml index 26985e45..a3a08aa1 100644 --- a/symbols/overlay15.yml +++ b/symbols/overlay15.yml @@ -12,7 +12,72 @@ overlay15: NA: 0x1060 JP: 0x1060 description: Controls the Duskull Bank. - functions: [] + functions: + - name: InitDuskullBankStruct + address: + EU: 0x238AC80 + description: |- + Allocates and initializes a duskull_bank struct at DUSKULL_BANK_STRUCT_PTR. + + No params. + - name: DuskullBankSubcaseManager1 + address: + EU: 0x238AD74 + description: |- + Seems to manage the more niche operations of the bank, primarily window management and player input interpretation. + Consists of a switch case over the bank_subcase enum. + + return: undefined4 + - name: DuskullBankSubcaseManager2 + address: + EU: 0x238B02C + description: |- + Seems to manage the more niche operations of the bank, primarily window generation. + Consists of a switch case over the bank_subcase enum. + + r0: enum bank_subcase + - name: BankUpdateDigitInputMenuDisplay + address: + EU: 0x238B8E4 + description: |- + Runs once every frame while the digit display menu is up, to redraw it as needed. + + r0: 1 for the withdrawing text string, 0 for depositing. + - name: DuskullBankTextboxGoldStatusCallback + address: + EU: 0x238B930 + description: |- + A text_box_callback_fn_t function for the gold status window that seems to populate the current and stored money. + + r0: window_id + - name: DuskullBankDigitInputDisplayCallback + address: + EU: 0x238B9D8 + description: |- + A text_box_callback_fn_t function for the digit display window that calls BankUpdateDigitInputMenuDisplay with the correct param from the duskull_bank struct. + + No params. + - name: DuskullBankEntryPoint + address: + EU: 0x238B9F4 + description: |- + The sole entry_point function for the duskull bank overlay. + + return: undefined4 + - name: DuskullBankDestructor + address: + EU: 0x238BA04 + description: |- + The sole destructor function for the duskull bank overlay. + + No params. + - name: DuskullBankFrameUpdate + address: + EU: 0x238BAC0 + description: |- + The sole frame_update function for the duskull bank overlay. + + return: undefined4 data: - name: BANK_MAIN_MENU_ITEMS address: @@ -25,11 +90,16 @@ overlay15: JP: 0x28 - name: BANK_WINDOW_PARAMS_1 address: + EU: 0x238BBE8 NA: 0x238B07C length: + EU: 0x10 NA: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: BANK_WINDOW_PARAMS_2 + description: |- + Seems to be fully unused. May be a leftover from Time/Darkness or Rescue Team? + + type: struct window_params + - name: BANK_GOLD_STATUS_WINDOW_PARAMS address: EU: 0x238BBF8 NA: 0x238B08C @@ -37,8 +107,11 @@ overlay15: length: EU: 0x10 NA: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: BANK_WINDOW_PARAMS_3 + description: |- + A window_params struct used by the window displaying stored and carried gold for the duskull bank. + + type: struct window_params + - name: BANK_ADVANCED_TEXTBOX_WINDOW_PARAMS address: EU: 0x238BC08 NA: 0x238B09C @@ -46,8 +119,11 @@ overlay15: length: EU: 0x10 NA: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: BANK_WINDOW_PARAMS_4 + description: |- + A window_params struct used by the digit input advanced textbox for the duskull bank. + + type: struct window_params + - name: BANK_MAIN_MENU_WINDOW_PARAMS address: EU: 0x238BC18 NA: 0x238B0AC @@ -55,13 +131,111 @@ overlay15: length: EU: 0x10 NA: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + A window_params struct used by the main menu of the duskull bank. + + type: struct window_params - name: BANK_WINDOW_PARAMS_5 address: + EU: 0x238BC28 NA: 0x238B0BC length: + EU: 0x10 NA: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + Seems to be fully unused. May be a leftover from Time/Darkness or Rescue Team? + + type: struct window_params + - name: BANK_R_CLOSE_STR + address: + EU: 0x238BC38 + length: + EU: 0x9 + description: |- + "R-Close\n" + + type: string + - name: BANK_M_OPEN_STR + address: + EU: 0x238BC44 + length: + EU: 0x8 + description: |- + "M-Open\n" + + type: string + - name: BANK_S_CLOSE_STR + address: + EU: 0x238BC4C + length: + EU: 0x9 + description: |- + "S-Close\n" + + type: string + - name: MENU_BANK_MODE_CANCEL_STR + address: + EU: 0x238BC58 + length: + EU: 0x17 + description: |- + "Menu_Bank_Mode_Cancel\n" + + type: string + - name: BANK_P_OPEN_STR + address: + EU: 0x238BC70 + length: + EU: 0x8 + description: |- + "P-Open\n" + + type: string + - name: BANK_G_OPEN_STR + address: + EU: 0x238BC78 + length: + EU: 0x8 + description: |- + "G-Open\n" + + type: string + - name: BANK_MES_NOT_CLOSE_STR + address: + EU: 0x238BC80 + length: + EU: 0xF + description: |- + "mes not close\n" + + type: string + - name: BANK_SUB_NOT_CLOSE_STR + address: + EU: 0x238BC90 + length: + EU: 0xF + description: |- + "sub not close\n" + + type: string + - name: BANK_SELECT_NOT_CLOSE_STR + address: + EU: 0x238BCA0 + length: + EU: 0x12 + description: |- + "select not close\n" + + type: string + - name: BANK_INPUT_NOT_CLOSE_STR + address: + EU: 0x238BCB4 + length: + EU: 0x11 + description: |- + "Input not close\n" + + type: string - name: OV15_STATIC_INITIALIZER aliases: - OVERLAY15_RESERVED_SPACE @@ -74,11 +248,15 @@ overlay15: NA: 0x4 JP: 0x4 description: Static initializer for overlay 15. - - name: OVERLAY15_UNKNOWN_POINTER__NA_238B180 + - name: DUSKULL_BANK_STRUCT_PTR address: EU: 0x238BCE0 NA: 0x238B180 JP: 0x238C6E0 length: + EU: 0x4 NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + Manages the majority of duskull bank operations for the overlay. + + type: duskull_bank struct pointer diff --git a/symbols/overlay22.yml b/symbols/overlay22.yml index 3bd44b79..aba39469 100644 --- a/symbols/overlay22.yml +++ b/symbols/overlay22.yml @@ -12,7 +12,307 @@ overlay22: NA: 0x4B40 JP: 0x4B40 description: Controls the Kecleon Shop in Treasure Town. - functions: [] + functions: + - name: GreenKecleonShopUpdateItemNamesAndCollectionMenu + address: + EU: 0x238AC80 + description: |- + Calls GreenKecleonShopFillItemNameData and GreenKecleonShopInitCollectionMenu, then returns. + + No params. + - name: GreenKecleonShopInitCollectionMenu + address: + EU: 0x238AC90 + description: |- + Seems to initialize a collection menu for green kecleon with data from GREEN_KEC_SHOP_ITEM_DATA_WRAPPER. + + return: collection menu window_id + - name: GreenKecleonShopDoNothing + address: + EU: 0x238AD6C + description: |- + Does nothing but return. Is exclusively called by the green kecleon shop. + + No params. + - name: GreenKecleonShopGetCollectionMenuStatus + address: + EU: 0x238AD70 + description: |- + Seems to return some kind of status data for the collection menu from GREEN_KEC_SHOP_ITEM_DATA_WRAPPER. + + return: collection menu status? + - name: GreenKecleonShopGetShopItemSlot + address: + EU: 0x238ADEC + description: |- + Seems to retrieve the item slot the cursor is currently pointing to from GREEN_KEC_SHOP_ITEM_DATA_WRAPPER. + + return: shop item slot index + - name: GreenKecleonShopInitItemNameData + address: + EU: 0x238AE00 + description: |- + Initializes a green_kec_shop_item_data struct in GREEN_KEC_SHOP_ITEM_DATA_WRAPPER. + + No params. + - name: GreenKecleonShopFreeItemNameData + address: + EU: 0x238AE34 + description: |- + Frees a green_kec_shop_item_data struct in GREEN_KEC_SHOP_ITEM_DATA_WRAPPER. + + No params. + - name: GreenKecleonShopFillItemNameData + address: + EU: 0x238AE60 + description: |- + Populates a green_kec_shop_item_data struct in GREEN_KEC_SHOP_ITEM_DATA_WRAPPER. + + No params. + - name: GreenKecleonShopCountSelectedItems + address: + EU: 0x238B00C + description: |- + Counts the number of multi-selected items in the green kecleon shop. + + return: # of selected items. + - name: GreenKecleonShopGetFirstSelectedItemIndex + address: + EU: 0x238B048 + description: |- + Retrieves the index of the first multi-selected item in the green kecleon shop. + + return: index of the first selected shop item. + - name: GreenKecleonShopSumSelectedItemPrices + address: + EU: 0x238B084 + description: |- + Sums the prices of all currently selected items in the green kecleon shop. + + return: total price of all selected shop items. + - name: GreenKecleonShopPurchaseSingleItem + address: + EU: 0x238B0C8 + description: |- + Handles purchasing a single item from the green kecleon shop, by index. + + r0: shop item slot + - name: GreenKecleonShopPurchaseSelectedItems + address: + EU: 0x238B10C + description: |- + Handles purchasing all selected items from the green kecleon shop. + Will not be used if only one item is selected. + + No params. + - name: GreenKecleonGetItemNameStringByIndex + address: + EU: 0x238B180 + description: |- + Retrieves the item name string for a shop item in the green kecleon shop by index. + + r0: unused + r1: int + r2: uint32_t pointer + return: item name string (buffer size 80) + - name: GreenKecleonShopUnkCollectionMenuCallback + address: + EU: 0x238B1BC + description: |- + An unk_collection_menu_fn_t function used by GreenKecleonShopInitCollectionMenu. + + r0: uint + return: undefined4 + - name: GreenKecleonShopVoidFnCollectionMenuCallback + address: + EU: 0x238B2B4 + description: |- + An unk_collection_menu_void_fn_t function used by GreenKecleonShopInitCollectionMenu. + + r0: uint + - name: PurpleKecleonShopUpdateItemNamesAndCollectionMenu + address: + EU: 0x238B2CC + description: |- + Calls PurpleKecleonShopFillItemNameData and PurpleKecleonShopInitCollectionMenu, then returns. + + No params. + - name: PurpleKecleonShopInitCollectionMenu + address: + EU: 0x238B2DC + description: |- + Seems to initialize a collection menu for purple kecleon with data from PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER. + + return: collection menu window_id + - name: PurpleKecleonShopDoNothing + address: + EU: 0x238B3B8 + description: |- + Does nothing but return. Is exclusively called by the purple kecleon shop. + + No params. + - name: PurpleKecleonShopGetCollectionMenuStatus + address: + EU: 0x238B3BC + description: |- + Seems to return some kind of status data for the collection menu from PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER. + + return: collection menu status? + - name: PurpleKecleonShopGetShopItemSlot + address: + EU: 0x238B438 + description: |- + Seems to retrieve the item slot the cursor is currently pointing to from PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER. + + return: shop item slot index + - name: PurpleKecleonShopInitItemNameData + address: + EU: 0x238B44C + description: |- + Initializes a purple_kec_shop_item_data struct in PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER. + + No params. + - name: PurpleKecleonShopFreeItemNameData + address: + EU: 0x238B480 + description: |- + Frees a purple_kec_shop_item_data struct in PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER. + + No params. + - name: PurpleKecleonShopFillItemNameData + address: + EU: 0x238B4AC + description: |- + Frees a purple_kec_shop_item_data struct in PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER. + + No params. + - name: PurpleKecleonShopCountSelectedItems + address: + EU: 0x238B658 + description: |- + Counts the number of multi-selected items in the purple kecleon shop. + + return: # of selected items. + - name: PurpleKecleonShopGetFirstSelectedItemIndex + address: + EU: 0x238B694 + description: |- + Retrieves the index of the first multi-selected item in the purple kecleon shop. + + return: index of the first selected shop item. + - name: PurpleKecleonShopSumSelectedItemPrices + address: + EU: 0x238B6D0 + description: |- + Sums the prices of all currently selected items in the purple kecleon shop. + + return: total price of all selected shop items. + - name: PurpleKecleonShopPurchaseSingleItem + address: + EU: 0x238B714 + description: |- + Handles purchasing a single item from the purple kecleon shop, by index. + + r0: shop item slot + - name: PurpleKecleonShopPurchaseSelectedItems + address: + EU: 0x238B758 + description: |- + Handles purchasing all selected items from the purple kecleon shop. + Will not be used if only one item is selected. + + No params. + - name: PurpleKecleonGetItemNameStringByIndex + address: + EU: 0x238B7CC + description: |- + Retrieves the item name string for a shop item in the purple kecleon shop by index. + + r0: unused + r1: int + r2: uint32_t pointer + return: item name string (buffer size 80) + - name: PurpleKecleonShopUnkCollectionMenuCallback + address: + EU: 0x238B808 + description: |- + An unk_collection_menu_fn_t function used by PurpleKecleonShopInitCollectionMenu. + + r0: uint + return: undefined4 + - name: PurpleKecleonShopCollectionMenuCallback + address: + EU: 0x238B900 + description: |- + An unk_collection_menu_void_fn_t function used by PurpleKecleonShopInitCollectionMenu. + + r0: uint + - name: KecleonShopSubcaseManager1 + address: + EU: 0x238B918 + description: |- + Seems responsible for handling the majority of the frame update behavior for both kecleon shops, particularly window management. + Shares this responsibility with KecleonShopSubcaseManager2. + + r0: subcase id (should eventually be an enum) + - name: KecleonShopSubcaseManager2 + address: + EU: 0x238CCC4 + description: |- + Seems responsible for handling the majority of the frame update behavior for both kecleon shops, particularly window management. + Shares this responsibility with KecleonShopSubcaseManager1. + + No params. + - name: RemoveInvalidKecleonShopItems + address: + EU: 0x238E068 + description: |- + Calls either RemoveInvalidKecleonShop1Items or RemoveInvalidKecleonShop2Items depending on which kecleon shop is active. + + No params. + - name: KecleonShopSumBagItemSellPrices + address: + EU: 0x238E094 + description: |- + Sums the sell prices of all items in the bag, presumably for the Sell All option for both kecleon shops. + + No params. + - name: KecleonShopUpdatePortraitEmotion + address: + EU: 0x238E134 + description: |- + Updates the portrait emotion for the currently active kecleon shop. + Can only change the portrait to PORTRAIT_NORMAL or PORTRAIT_ANGRY. + + r0: 1 if angry, 0 if normal. + - name: KecleonShopEntryPoint + address: + EU: 0x238E180 + description: |- + The sole entry_point for the kecleon shop overlay. + + return: undefined4 + - name: KecleonShopDestructor + address: + EU: 0x238E2F0 + description: |- + The sole destructor for the kecleon shop overlay. + + No params. + - name: KecleonShopFrameUpdate + address: + EU: 0x238E340 + description: |- + The sole frame_update for the kecleon shop overlay. + + return: undefined4 + - name: KecleonShopCloseSimpleMenu + address: + EU: 0x238F324 + description: |- + Closes a simple menu for the kecleon shop. + + No params. data: - name: SHOP_WINDOW_PARAMS_1 address: @@ -23,6 +323,26 @@ overlay22: EU: 0x10 NA: 0x10 description: "Note: unverified, ported from Irdkwia's notes" + - name: GREEN_KEC_SHOP_RED_COLOR_TEXT_TAG + address: + EU: 0x238F36C + length: + EU: 0x7 + description: |- + "[CS:W]" + Used exclusively before items in green kecleon's shop that the player cannot buy/sell. + + type: string + - name: GREEN_KEC_SHOP_UNCOLOR_TEXT_TAG + address: + EU: 0x238F374 + length: + EU: 0x5 + description: |- + "[CR]" + Used exclusively after items in green kecleon's shop that the player cannot buy/sell. + + type: string - name: SHOP_WINDOW_PARAMS_2 address: EU: 0x238F37C @@ -32,14 +352,37 @@ overlay22: EU: 0x10 NA: 0x10 description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY22_UNKNOWN_STRUCT__NA_238E85C + - name: PURPLE_KEC_SHOP_RED_COLOR_TEXT_TAG + address: + EU: 0x238F38C + length: + EU: 0x7 + description: |- + "[CS:W]" + Used exclusively before items in purple kecleon's shop that the player cannot buy/sell. + + type: string + - name: PURPLE_KEC_SHOP_UNCOLOR_TEXT_TAG + address: + EU: 0x238F394 + length: + EU: 0x5 + description: |- + "[CR]" + Used exclusively after items in purple kecleon's shop that the player cannot buy/sell. + + type: string + - name: KECLEON_SHOP_ITEM_CATEGORY_BOOLS address: EU: 0x238F39C NA: 0x238E85C JP: 0x238FDBC length: + EU: 0xC NA: 0xC - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + Exclusively passed into MaybeGetUncoloredFormattedItemName and MaybeGetColoredFormattedItemName. + The exact purpose of this struct is unknown, but the only "true" bool in the table is for "Other" items. - name: SHOP_MENU_ITEMS_CONFIRM address: EU: 0x238F3A8 @@ -76,30 +419,39 @@ overlay22: EU: 0x30 NA: 0x30 JP: 0x30 - - name: OVERLAY22_UNKNOWN_STRING_IDS + - name: KECLEON_SHOP_TEXT_STRINGS address: EU: 0x238F430 NA: 0x238E8F0 JP: 0x238FE50 length: NA: 0x60 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + A collection of 48 text string ids, 24 for green kecleon, and 24 for purple kecleon. + + type: int16_t[2][24] - name: SHOP_WINDOW_PARAMS_3 address: + EU: 0x238F490 NA: 0x238E950 length: + EU: 0x10 NA: 0x10 description: "Note: unverified, ported from Irdkwia's notes" - name: SHOP_WINDOW_PARAMS_4 address: + EU: 0x238F4A0 NA: 0x238E960 length: + EU: 0x10 NA: 0x10 description: "Note: unverified, ported from Irdkwia's notes" - name: SHOP_WINDOW_PARAMS_5 address: + EU: 0x238F4B0 NA: 0x238E970 length: + EU: 0x10 NA: 0x10 description: "Note: unverified, ported from Irdkwia's notes" - name: SHOP_WINDOW_PARAMS_6 @@ -147,6 +499,394 @@ overlay22: EU: 0x10 NA: 0x10 description: "Note: unverified, ported from Irdkwia's notes" + - name: KEC_SHOP_START_STR + address: + EU: 0x238F510 + length: + EU: 0x8 + description: |- + "_START\n" + + type: string + - name: KEC_SHOP_RESTART_STR + address: + EU: 0x238F518 + length: + EU: 0xA + description: |- + "_RESTART\n" + + type: string + - name: KEC_SHOP_SELECTMENU_STR + address: + EU: 0x238F524 + length: + EU: 0xD + description: |- + "_SELECTMENU\n" + + type: string + - name: KEC_SHOP_EXPLANATION_STR + address: + EU: 0x238F534 + length: + EU: 0xE + description: |- + "_EXPLANATION\n" + + type: string + - name: KEC_SHOP_THANKS_STR + address: + EU: 0x238F544 + length: + EU: 0x9 + description: |- + "_THANKS\n" + + type: string + - name: KEC_SHOP_SHOP_NON_STR + address: + EU: 0x238F550 + length: + EU: 0xB + description: |- + "_SHOP_NON\n" + + type: string + - name: KEC_SHOP_GOLD_NON_STR + address: + EU: 0x238F55C + length: + EU: 0xB + description: |- + "_GOLD_NON\n" + + type: string + - name: KEC_SHOP_GOLD_MAX_STR + address: + EU: 0x238F568 + length: + EU: 0xB + description: |- + "_GOLD_MAX\n" + + type: string + - name: KEC_SHOP_GOLD_FULL_STR + address: + EU: 0x238F574 + length: + EU: 0xC + description: |- + "_GOLD_FULL\n" + + type: string + - name: KEC_SHOP_SELL_NON_STR + address: + EU: 0x238F580 + length: + EU: 0xB + description: |- + "_SELL_NON\n" + + type: string + - name: KEC_SHOP_ITEM_NON_STR + address: + EU: 0x238F58C + length: + EU: 0xB + description: |- + "_ITEM_NON\n" + + type: string + - name: KEC_SHOP_ITEM_MAX_STR + address: + EU: 0x238F598 + length: + EU: 0xB + description: |- + "_ITEM_MAX\n" + + type: string + - name: KEC_SHOP_SOLD_OUT_STR + address: + EU: 0x238F5A4 + length: + EU: 0xB + description: |- + "_SOLD_OUT\n" + + type: string + - name: KEC_SHOP_BUY_POOR_STR + address: + EU: 0x238F5B0 + length: + EU: 0xB + description: |- + "_BUY_POOR\n" + + type: string + - name: KEC_SHOP_SELL_BAD_STR + address: + EU: 0x238F5BC + length: + EU: 0xB + description: |- + "_SELL_BAD\n" + + type: string + - name: KEC_SHOP_SELL_FULL_STR + address: + EU: 0x238F5C8 + length: + EU: 0xC + description: |- + "_SELL_FULL\n" + + type: string + - name: KEC_SHOP_MODE_BUY_START_STR + address: + EU: 0x238F5D4 + length: + EU: 0x11 + description: |- + "_MODE_BUY_START\n" + + type: string + - name: KEC_SHOP_BUY_RESTART_STR + address: + EU: 0x238F5E8 + length: + EU: 0xE + description: |- + "_BUY_RESTART\n" + + type: string + - name: KEC_SHOP_BUY_SELECT_STR + address: + EU: 0x238F5F8 + length: + EU: 0xD + description: |- + "_BUY_SELECT\n" + + type: string + - name: KEC_SHOP_BUY_RESELECT_STR + address: + EU: 0x238F608 + length: + EU: 0xF + description: |- + "_BUY_RESELECT\n" + + type: string + - name: KEC_SHOP_SUB_MENU_BUY_STR + address: + EU: 0x238F618 + length: + EU: 0xF + description: |- + "_SUB_MENU_BUY\n" + + type: string + - name: KEC_SHOP_BUY_CONFIRM_STR + address: + EU: 0x238F628 + length: + EU: 0xE + description: |- + "_BUY_CONFIRM\n" + + type: string + - name: KEC_SHOP_BUY_EXPLA_ITEM_STR + address: + EU: 0x238F638 + length: + EU: 0x1B + description: |- + "_BUY_EXPLA Item%d Count%d\n" + + type: string + - name: KEC_SHOP_ITEM_TEXT_TAG + address: + EU: 0x238F654 + length: + EU: 0x9 + description: |- + "[item:0]" + + type: string + - name: KEC_SHOP_BUY_THANKS_STR + address: + EU: 0x238F660 + length: + EU: 0xD + description: |- + "_BUY_THANKS\n" + + type: string + - name: KEC_SHOP_SELL_START_STR + address: + EU: 0x238F670 + length: + EU: 0xD + description: |- + "_SELL_START\n" + + type: string + - name: KEC_SHOP_SELL_RESTART_STR + address: + EU: 0x238F680 + length: + EU: 0xF + description: |- + "_SELL_RESTART\n" + + type: string + - name: KEC_SHOP_SELL_SELECT_STR + address: + EU: 0x238F690 + length: + EU: 0xE + description: |- + "_SELL_SELECT\n" + + type: string + - name: KEC_SHOP_SELL_RESELECT_STR + address: + EU: 0x238F6A0 + length: + EU: 0x10 + description: |- + "_SELL_RESELECT\n" + + type: string + - name: KEC_SHOP_SELL_SUB_MENU_STR + address: + EU: 0x238F6B0 + length: + EU: 0x10 + description: |- + "_SELL_SUB_MENU\n" + + type: string + - name: KEC_SHOP_SELL_CONFIRM_STR + address: + EU: 0x238F6C0 + length: + EU: 0xF + description: |- + "_SELL_CONFIRM\n" + + type: string + - name: KEC_SHOP_SELL_CONFIRM_NEW_STR + address: + EU: 0x238F6D0 + length: + EU: 0x13 + description: |- + "_SELL_CONFIRM NEW\n" + + type: string + - name: KEC_SHOP_BUY_CONFIRM_NEW_STR + address: + EU: 0x238F6E4 + length: + EU: 0x12 + description: |- + "_BUY_CONFIRM NEW\n" + + type: string + - name: KEC_SHOP_SELL_EXPLA_STR + address: + EU: 0x238F6F8 + length: + EU: 0xD + description: |- + "_SELL_EXPLA\n" + + type: string + - name: KEC_SHOP_SELL_THANKS_STR + address: + EU: 0x238F708 + length: + EU: 0xE + description: |- + "_SELL_THANKS\n" + + type: string + - name: KEC_SHOP_SELL_ALL_STR + address: + EU: 0x238F718 + length: + EU: 0xB + description: |- + "_SELL_ALL\n" + + type: string + - name: KEC_SHOP_BUT_MULTI_STR + address: + EU: 0x238F724 + length: + EU: 0xC + description: |- + "_BUT_MULTI\n" + Likely a typo for "_BUY_MULTI\n". + + type: string + - name: KEC_SHOP_SELL_MULTI_STR + address: + EU: 0x238F730 + length: + EU: 0xD + description: |- + "_SELL_MULTI\n" + + type: string + - name: KEC_SHOP_ALL_CONFIRM_STR + address: + EU: 0x238F740 + length: + EU: 0xE + description: |- + "_ALL_CONFIRM\n" + + type: string + - name: KEC_SHOP_SELL_ALL_THANKS_STR + address: + EU: 0x238F750 + length: + EU: 0x11 + description: |- + "SELL_ALL_THANKS\n" + + type: string + - name: KEC_SHOP_BUY_MULTI_THANKS_STR + address: + EU: 0x238F764 + length: + EU: 0x12 + description: |- + "BUY_MULTI_THANKS\n" + + type: string + - name: KEC_SHOP_SELL_MULTI_THANKS_STR + address: + EU: 0x238F778 + length: + EU: 0x13 + description: |- + "SELL_MULTI_THANKS\n" + + type: string + - name: KEC_SHOP_CHANGEJOB_STR + address: + EU: 0x238F78C + length: + EU: 0xB + description: |- + "ChangeJob\n" + + type: string - name: OV22_STATIC_INITIALIZER aliases: - OVERLAY22_RESERVED_SPACE @@ -159,39 +899,39 @@ overlay22: NA: 0x4 JP: 0x4 description: Static initializer for overlay 22. - - name: OVERLAY22_UNKNOWN_POINTER__NA_238EC60 + - name: GREEN_KEC_SHOP_ITEM_DATA_WRAPPER address: EU: 0x238F7A0 NA: 0x238EC60 JP: 0x23901C0 length: - NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY22_UNKNOWN_POINTER__NA_238EC64 - address: - NA: 0x238EC64 - length: - NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY22_UNKNOWN_POINTER__NA_238EC68 + EU: 0x8 + NA: 0x8 + description: |- + Seems to contain item property data for the green kecleon shop. + + type: green_kec_shop_item_data_wrapper + - name: PURPLE_KEC_SHOP_ITEM_DATA_WRAPPER address: EU: 0x238F7A8 NA: 0x238EC68 JP: 0x23901C8 length: - NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY22_UNKNOWN_POINTER__NA_238EC6C - address: - NA: 0x238EC6C - length: - NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY22_UNKNOWN_POINTER__NA_238EC70 + EU: 0x8 + NA: 0x8 + description: |- + Seems to contain item property data for the purple kecleon shop. + + type: purple_kec_shop_item_data_wrapper + - name: KECLEON_SHOP_SHARED_STRUCT_PTR address: EU: 0x238F7B0 NA: 0x238EC70 JP: 0x23901D0 length: + EU: 0x4 NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + Seems to handle the operations of the kecleon shop, and is shared for both brothers. + + type: kecleon_shop_shared_struct* diff --git a/symbols/overlay23.yml b/symbols/overlay23.yml index 85d306e7..ce0a366b 100644 --- a/symbols/overlay23.yml +++ b/symbols/overlay23.yml @@ -12,32 +12,131 @@ overlay23: NA: 0x3780 JP: 0x37E0 description: Controls Kangaskhan Storage (both in Treasure Town and via Kangaskhan Rocks). - functions: [] + functions: + - name: KangaskhanStorageSubcaseManager1 + address: + EU: 0x238AC80 + description: |- + Seems responsible for handling the majority of the frame update behavior for kangaskhan storage, particularly window management. + Shares this responsibility with KangaskhanStorageSubcaseManager1. + + r0: subcase id (should eventually be an enum) + - name: KangaskhanStorageSubcaseManager2 + address: + EU: 0x238BD78 + description: |- + Seems responsible for handling the majority of the frame update behavior for kangaskhan storage, particularly window management. + Shares this responsibility with KangaskhanStorageSubcaseManager2. + + No params. + - name: KangaskhanStorageEntryPoint + address: + EU: 0x238CE68 + description: |- + The sole entry_point for the kangaskhan storage overlay. + + return: undefined4 + - name: KangaskhanStorageDestructor + address: + EU: 0x238CF88 + description: |- + The sole destructor for the kangaskhan storage overlay. + + No params. + - name: KangaskhanStorageFrameUpdate + address: + EU: 0x238CFB4 + description: |- + The sole frame_update for the kangaskhan storage overlay. + + return: undefined4 + - name: KangaskhanStorageCloseSimpleMenu + address: + EU: 0x238DBD8 + description: |- + Closes a simple menu with the simple_menu_window_id from KANGASKHAN_STORAGE_MENU_PTR. + + No params. + - name: KangaskhanStorageShowDialogueAndPortraitIfNotRock + address: + EU: 0x238DC20 + description: |- + Seems responsible for handling dialogue from kangaskhan. + Does nothing if "KANGASKHAN_STORAGE_MENU_PTR->is_kanga_rock" is true. + + r0: window_id + r1: preprocessor_flags + r2: string_id + - name: KangaskhanStorageWithdrawSelectedItems + address: + EU: 0x238DC88 + description: |- + Seems to iteratively remove selected items from storage, and add them to the bag. + Only used when multiple items are selected. + + No params. + - name: KangaskhanStorageDepositSelectedItems + address: + EU: 0x238DCF8 + description: |- + Seems to iteratively remove selected items from the bag, and add them to storage. + Only used when multiple items are selected. + + No params. + - name: KangaskhanStorageWithdrawSingleItem + address: + EU: 0x238DD78 + description: |- + Seems to remove a single item from storage, and add it to the bag. + Subsequently clears the storage selected item table, likely for if multi-select was used on a single item. + + No params. + - name: KangaskhanStorageDepositSingleItem + address: + EU: 0x238DDB8 + description: |- + Seems to remove a single item from the bag, and add it to storage. + Subsequently clears the bag selected item table, likely for if multi-select was used on a single item. + + No params. data: - - name: OVERLAY23_UNKNOWN_VALUE__NA_238D2E8 + - name: STORAGE_OPTION_STATES_1 address: EU: 0x238DE28 NA: 0x238D2E8 JP: 0x238E8A0 length: NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY23_UNKNOWN_VALUE__NA_238D2EC + description: |- + A list of states per menu option. Enabled is 0x0 and Disabled is 0x3. + Not currently known how these are used. + + type: int8_t[4] + - name: STORAGE_OPTION_STATES_2 address: EU: 0x238DE2C NA: 0x238D2EC JP: 0x238E8A4 length: NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY23_UNKNOWN_STRUCT__NA_238D2F0 + description: |- + A list of states per menu option. Enabled is 0x0 and Disabled is 0x3. + Not currently known how these are used. + + type: int8_t[4] + - name: STORAGE_ITEM_CATEGORY_BOOLS address: EU: 0x238DE30 NA: 0x238D2F0 JP: 0x238E8A8 length: + EU: 0xC NA: 0xC - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + Exclusively passed into MaybeGetUncoloredFormattedItemName and MaybeGetColoredFormattedItemName. + The exact purpose of this struct is unknown, but the only "true" bool in the table is for "Other" items. + + type: bool[12] - name: STORAGE_MENU_ITEMS_CONFIRM address: EU: 0x238DE3C @@ -164,11 +263,14 @@ overlay23: NA: 0x4 JP: 0x4 description: Static initializer for overlay 23. - - name: OVERLAY23_UNKNOWN_POINTER__NA_238D8A0 + - name: KANGASKHAN_STORAGE_MANAGER_PTR address: EU: 0x238E3E0 NA: 0x238D8A0 JP: 0x238EE60 length: NA: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + The main struct that manages kangaskhan storage behavior for the overlay. + + type: kangaskhan_storage_manager struct pointer