Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
11149e5
Add Remaining Mission Subtypes
HappyLappy1 Jun 1, 2025
4289ebb
"Complete" mission_template struct
HappyLappy1 Jun 2, 2025
542d5d2
New mission_template structs + enums
HappyLappy1 Jun 2, 2025
d5ef888
Update mission_rescue_bin name
HappyLappy1 Jun 2, 2025
6f2179c
Add mission_weighted_categories struct
HappyLappy1 Jun 2, 2025
464d216
Add comments to new struct :D
HappyLappy1 Jun 2, 2025
c91aa76
Move mission types and subtypes to common/enum.h
HappyLappy1 Jun 4, 2025
aba0f44
Port mission types/subtypes to common/enums.h (2)
HappyLappy1 Jun 4, 2025
7747fd9
Complete mission_template struct
HappyLappy1 Jun 4, 2025
0255bc3
Create rescue.h
HappyLappy1 Jun 6, 2025
65b1f0b
Update rescue.h
HappyLappy1 Jun 6, 2025
306efca
Add New Mission Template Structs
HappyLappy1 Jun 6, 2025
ad3337c
Update Enums
HappyLappy1 Jun 6, 2025
3085491
add mission_window_details struct
HappyLappy1 Jun 6, 2025
17d1f88
Add New Functions
HappyLappy1 Jun 6, 2025
6d6735d
Add New Functions (2)
HappyLappy1 Jun 6, 2025
7e6954b
Add New Functions (3)
HappyLappy1 Jun 6, 2025
52ac106
Add an ASSERT_SIZE
HappyLappy1 Jun 6, 2025
f8f30be
Fix Syntax Errors and overlapping enums
HappyLappy1 Jun 6, 2025
cccabbd
Add Aliases
HappyLappy1 Jun 6, 2025
04414d0
Fix Overlapping Enums... again
HappyLappy1 Jun 6, 2025
b6c2231
Fix c syntax
HappyLappy1 Jun 6, 2025
eec2623
remove enums from mission_weighted_cetegory
HappyLappy1 Jun 6, 2025
4a3018f
C Syntax (x2)
HappyLappy1 Jun 6, 2025
966de7f
Move ";" from enum to common
HappyLappy1 Jun 6, 2025
4df0d93
Maybe I should assert the size of the right struct...
HappyLappy1 Jun 6, 2025
f0fa197
Slowly learning how enums work...
HappyLappy1 Jun 7, 2025
ab055ba
Formatting yay!
HappyLappy1 Jun 7, 2025
2a72129
Look ma! I'm in the credits!
HappyLappy1 Jun 7, 2025
616fd27
Yeah that makes sense... Please be fix?
HappyLappy1 Jun 7, 2025
78dbaf8
Learning to pragma
HappyLappy1 Jun 7, 2025
e06ac57
Fixed Enums (pt. 2)
HappyLappy1 Jun 7, 2025
b7f479b
Ohhhh they turn into structs! Cool!
HappyLappy1 Jun 7, 2025
8ff8fc9
Still learning to pragma
HappyLappy1 Jun 7, 2025
854dad6
What if I move the space BEFORE the *
HappyLappy1 Jun 7, 2025
db04379
Update common.h
HappyLappy1 Jun 7, 2025
c0e053c
Let's try this...
HappyLappy1 Jun 7, 2025
3c2a597
Formatting, yay! (x2)
HappyLappy1 Jun 7, 2025
d28c6c7
Fix Alias Syntax
HappyLappy1 Jun 7, 2025
ef1e777
Remove duplicate symbols and bogus addresses
HappyLappy1 Jun 7, 2025
7bd312d
More wrong addresses...
HappyLappy1 Jun 7, 2025
38ed07a
Gut the excess aliases
HappyLappy1 Jun 7, 2025
7f09aae
"Misson". Incredible
HappyLappy1 Jun 7, 2025
5633d31
Final Syntax Fix???
HappyLappy1 Jun 7, 2025
f382d0d
Merge branch 'master' of https://github.com/HappyLappy1/pmdsky-debug
HappyLappy1 Jun 7, 2025
422fe63
Final Syntax Fix Real?
HappyLappy1 Jun 7, 2025
7450451
Update headers/functions/arm9.h
HappyLappy1 Jun 7, 2025
56812a1
Update symbols/arm9.yml
HappyLappy1 Jun 7, 2025
c95b7e3
Apply feedback
HappyLappy1 Jun 7, 2025
0ac4108
Apply suggestions to common.h
HappyLappy1 Jun 7, 2025
0f5f3ff
Remove Redundant Enums
HappyLappy1 Jun 7, 2025
ffbe9d1
Stop using redundant enums
HappyLappy1 Jun 7, 2025
b1745fc
Apply suggestions to rescue.h
HappyLappy1 Jun 7, 2025
9ade5f1
I think I did bad hex math... 0x64 != 104
HappyLappy1 Jun 7, 2025
32465ef
Update rescue.h
HappyLappy1 Jun 8, 2025
554f3f6
Remove redundant \n
HappyLappy1 Jun 8, 2025
4256c3c
Fix AppendMissionSummary params
HappyLappy1 Jun 8, 2025
a9bfd44
Fix symbols
HappyLappy1 Jun 8, 2025
358f6c4
Final Syntax Fix Real Again?
HappyLappy1 Jun 8, 2025
d982a68
Syntax Real True Actual I
HappyLappy1 Jun 8, 2025
16bb1a0
Update arm9.h
HappyLappy1 Jun 8, 2025
c143da9
7 Treasures is actually 0xE, not 0xF...
HappyLappy1 Jun 9, 2025
663a2fb
Merge SPECIAL_EPISODE and SEVEN_TREASURE (they are subtypes of the sa…
HappyLappy1 Jun 9, 2025
6ceafc9
Remove extraneous comment
HappyLappy1 Jun 9, 2025
b9917eb
Apply suggestions from code review
HappyLappy1 Jun 9, 2025
51dcdf6
Update rescue.h
HappyLappy1 Jun 9, 2025
8789cb8
Apply suggestions from code review
HappyLappy1 Jun 9, 2025
1b5e2be
Apply feedback to arm9.yml
HappyLappy1 Jun 9, 2025
84ba81d
Formatting fix real true ultra mega final
HappyLappy1 Jun 9, 2025
af7dfb9
Apply suggestions from code review
HappyLappy1 Jun 10, 2025
1c93a59
Update arm9.yml
HappyLappy1 Jun 10, 2025
2b06856
Syntax?
HappyLappy1 Jun 10, 2025
46a0a21
Final Syntax edits on yml
HappyLappy1 Jun 10, 2025
4968607
Merge branch 'UsernameFodder:master' into master
HappyLappy1 Jun 10, 2025
10ccaa0
Merge branch 'UsernameFodder:master' into master
HappyLappy1 Aug 11, 2025
8353b7b
Formatting, yay!
HappyLappy1 Aug 12, 2025
587f1da
I thiiink I made an endian oopsie?
HappyLappy1 Aug 19, 2025
ad40296
Update common.h
HappyLappy1 Aug 19, 2025
f76c46b
Merge branch 'master' into patch-2
HappyLappy1 Aug 19, 2025
d61f707
Merge pull request #1 from HappyLappy1/patch-2
HappyLappy1 Aug 19, 2025
61b74f6
Update overlay21.yml
HappyLappy1 Aug 22, 2025
f5c21f5
Update overlay11.yml
HappyLappy1 Aug 22, 2025
5717c64
Update overlay21.yml
HappyLappy1 Aug 22, 2025
47a307d
Update overlay21.yml
HappyLappy1 Aug 23, 2025
4344760
Create overlay21.h
HappyLappy1 Aug 23, 2025
d2b450d
Update overlay21.yml
HappyLappy1 Aug 23, 2025
fb47719
Update overlay21.yml
HappyLappy1 Aug 23, 2025
02e7639
Update overlay21.h
HappyLappy1 Aug 23, 2025
3981fdf
Update ground_mode.h
HappyLappy1 Aug 23, 2025
9d222aa
Update overlay21.yml
HappyLappy1 Aug 23, 2025
2510de2
Update overlay21.h
HappyLappy1 Aug 23, 2025
6e8e5aa
Update ground_mode.h
HappyLappy1 Aug 23, 2025
facaa3c
Update overlay21.yml
HappyLappy1 Aug 23, 2025
5bf91f4
Update overlay21.yml
HappyLappy1 Aug 24, 2025
ba485ae
Update overlay21.h
HappyLappy1 Aug 24, 2025
9f66ede
Update ground_mode.h
HappyLappy1 Aug 24, 2025
e05dae0
Update overlay11.yml
HappyLappy1 Aug 24, 2025
9eb924a
Update overlay21.h
HappyLappy1 Aug 24, 2025
1b71f53
Update overlay11.yml
HappyLappy1 Aug 24, 2025
26008f5
Update overlay21.h
HappyLappy1 Aug 24, 2025
f2cb48e
Update ground_mode.h
HappyLappy1 Aug 24, 2025
cd12926
Update ground_mode.h
HappyLappy1 Aug 24, 2025
d69f745
Update ground_mode.h
HappyLappy1 Aug 24, 2025
c2eef4c
Update ground_mode.h
HappyLappy1 Aug 24, 2025
6d14f6d
Update ground_mode.h
HappyLappy1 Aug 24, 2025
cd34182
Update ground_mode.h
HappyLappy1 Aug 24, 2025
9241e31
Update overlay11.yml
HappyLappy1 Aug 24, 2025
b176f9c
Update ground_mode.h
HappyLappy1 Aug 24, 2025
f8fca2d
Update ground_mode.h
HappyLappy1 Aug 24, 2025
e5571a3
Update common.h
HappyLappy1 Aug 24, 2025
292ce4d
Update common.h
HappyLappy1 Aug 24, 2025
a84eee6
Update ground_mode.h
HappyLappy1 Aug 24, 2025
7696f6d
Update overlay11.yml
HappyLappy1 Aug 24, 2025
6c1a1e6
Update overlay21.yml
HappyLappy1 Aug 24, 2025
b11c72e
Update overlay21.yml
HappyLappy1 Aug 24, 2025
d2ab5d9
Update overlay21.yml
HappyLappy1 Aug 24, 2025
bc31dfa
Update overlay21.yml
HappyLappy1 Aug 24, 2025
7c69f6a
Update overlay21.yml
HappyLappy1 Aug 24, 2025
a384749
Update overlay21.yml
HappyLappy1 Aug 24, 2025
d396b9d
Update overlay21.yml
HappyLappy1 Aug 24, 2025
5b636c1
Update overlay21.yml
HappyLappy1 Aug 24, 2025
0e70dac
Merge branch 'master' of https://github.com/HappyLappy1/pmdsky-debug
HappyLappy1 Aug 24, 2025
f77a1e7
Revert "Merge branch 'master' of https://github.com/HappyLappy1/pmdsk…
HappyLappy1 Aug 24, 2025
6a54bde
Reapply "Merge branch 'master' of https://github.com/HappyLappy1/pmds…
HappyLappy1 Aug 24, 2025
b075187
Why did everything break????
HappyLappy1 Aug 24, 2025
4eb5dda
Formatting... again....
HappyLappy1 Aug 24, 2025
b174bf7
Merge branch 'master' of https://github.com/HappyLappy1/pmdsky-debug
HappyLappy1 Aug 24, 2025
4f18878
Update overlay21.yml
HappyLappy1 Aug 24, 2025
f8378a7
Apply suggestions from code review
HappyLappy1 Aug 24, 2025
98eebfa
Update overlay21.h
HappyLappy1 Aug 24, 2025
9f55be9
Update arm9.h
HappyLappy1 Aug 24, 2025
03ac86a
Update overlay21.h
HappyLappy1 Aug 24, 2025
00a24b6
Update common.h
HappyLappy1 Aug 24, 2025
b98b9b2
Update enums.h
HappyLappy1 Aug 24, 2025
129be4d
Update ground_mode.h
HappyLappy1 Aug 24, 2025
c832618
Update overlay21.yml
HappyLappy1 Aug 24, 2025
bef3a7e
Update enums.h
HappyLappy1 Aug 24, 2025
e51668d
Update ground_mode.h
HappyLappy1 Aug 24, 2025
472b2a6
Update overlay11.h
HappyLappy1 Aug 24, 2025
1bf9e0a
Update overlay21.yml
HappyLappy1 Aug 24, 2025
73e7771
Update overlay21.yml
HappyLappy1 Aug 24, 2025
91ad371
Update overlay21.h
HappyLappy1 Aug 24, 2025
88494fd
Update overlay21.yml
HappyLappy1 Aug 24, 2025
bdc92de
Update overlay21.yml
HappyLappy1 Aug 24, 2025
8e8eafd
Update overlay21.yml
HappyLappy1 Aug 24, 2025
f24253d
Update overlay21.h
HappyLappy1 Aug 24, 2025
1d5b086
Update overlay21.h
HappyLappy1 Aug 24, 2025
ece5783
Update overlay21.yml
HappyLappy1 Aug 24, 2025
e5109d4
Update overlay21.yml
HappyLappy1 Aug 24, 2025
7e1da84
Update overlay21.yml
HappyLappy1 Aug 24, 2025
8cede1b
Formatting.... again.
HappyLappy1 Aug 24, 2025
3a3062f
Apply suggestions from code review
HappyLappy1 Aug 24, 2025
e4f5daf
Update overlay21.h
HappyLappy1 Aug 24, 2025
4fe75b5
Update overlay11.yml
HappyLappy1 Aug 24, 2025
efbb9d2
Update overlay11.h
HappyLappy1 Aug 24, 2025
0da535a
Update overlay11.h
HappyLappy1 Aug 24, 2025
00b7d10
Update overlay11.yml
HappyLappy1 Aug 24, 2025
4b900df
Update overlay11.h
HappyLappy1 Aug 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions headers/data/overlay11.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern struct ground_entity_function_table PERFORMER_FUNCTION_TABLE;
extern struct window_params TEAM_INFO_BOX_DEFAULT_WINDOW_PARAMS;
extern struct overlay_load_entry OVERLAY11_OVERLAY_LOAD_TABLE[21];
extern struct main_ground_data GROUND_STATE_PTRS;
extern struct swap_shop_inventory_ptrs SWAP_SHOP_INVENTORY_PTRS;
extern uint32_t WORLD_MAP_MODE;

#endif
31 changes: 31 additions & 0 deletions headers/data/overlay21.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extern struct simple_menu_id_item SWAP_SHOP_SUBMENU_ITEMS_2[4];
extern struct simple_menu_id_item SWAP_SHOP_MAIN_MENU_ITEMS_1[4];
extern struct simple_menu_id_item SWAP_SHOP_MAIN_MENU_ITEMS_2[5];
extern struct simple_menu_id_item SWAP_SHOP_SUBMENU_ITEMS_3[6];
extern int16_t OVERLAY21_UNKNOWN_STRING_IDS[24];
extern struct window_params SWAP_SHOP_WINDOW_PARAMS_2;
extern struct window_params SWAP_SHOP_WINDOW_PARAMS_3;
extern struct window_params SWAP_SHOP_WINDOW_PARAMS_4;
Expand All @@ -16,5 +17,35 @@ extern struct window_params SWAP_SHOP_WINDOW_PARAMS_6;
extern struct window_params SWAP_SHOP_WINDOW_PARAMS_7;
extern struct window_params SWAP_SHOP_WINDOW_PARAMS_8;
extern struct window_params SWAP_SHOP_WINDOW_PARAMS_9;
extern char SWAP_SHOP_TALK_WELCOME_DEBUG_STRING[28];
extern char SWAP_SHOP_MAIN_MENU_OPTIONS_DEBUG_STRING[33];
extern char SWAP_SHOP_TALK_CONTINUE_SWAP_DEBUG_STRING[30];
extern char SWAP_SHOP_TALK_SUBINFO_DEBUG_STRING[34];
extern char SWAP_SHOP_TALK_COME_AGAIN_DEBUG_STRING[29];
extern char SWAP_SHOP_TALK_LACKING_SWAP_ITEMS_DEBUG_STRING[31];
extern char SWAP_SHOP_TALK_SWAP_BROKE_DEBUG_STRING[30];
extern char SWAP_SHOP_TALK_SWAP_POOR_DEBUG_STRING[19];
extern char SWAP_SHOP_UNK_8_DEBUG_STRING[34];
extern char SWAP_SHOP_CLOSE_SHOP_DEBUG_STRING[26];
extern char SWAP_SHOP_TALK_WHAT_ITEMS_DEBUG_STRING[35];
extern char SWAP_SHOP_TALK_VALUABLE_SWAP_DEBUG_STRING[31];
extern char SWAP_SHOP_INIT_SWAP_ITEMS_MENU_DEBUG_STRING[34];
extern char SWAP_SHOP_SWAP_ITEMS_MENU_DEBUG_STRING[36];
extern char SWAP_SHOP_RETURN_SWAP_ITEMS_MENU_DEBUG_STRING[38];
extern char SWAP_SHOP_SELECT_SWAP_ITEM_OPTIONS_DEBUG_STRING[40];
extern char SWAP_SHOP_SWAP_ITEM_GET_INFO_DEBUG_STRING[34];
extern char SWAP_SHOP_ITEM_ZERO_STRING[8];
extern char SWAP_SHOP_TALK_CONFIRM_SWAP_DEBUG_STRING[39];
extern char SWAP_SHOP_CONFIRM_CHOICE_DEBUG_STRING[21];
extern char SWAP_SHOP_INIT_SCRIPT_ACTION_1_DEBUG_STRING[43];
extern char SWAP_SHOP_INIT_SCRIPT_ACTION_2_DEBUG_STRING[44];
extern char SWAP_SHOP_INIT_SCRIPT_ACTION_3_DEBUG_STRING[44];
extern char SWAP_SHOP_TEXT_PUT_IN_CAULDRON_DEBUG_STRING[38];
extern char SWAP_SHOP_DO_SWAP_THEN_TALK_DEBUG_STRING[36];
extern wchar_t OVERLAY21_JP_STRING[3];
extern char SWAP_SHOP_GOLD_STRING[18];
extern undefined OVERLAY21_RESERVED_SPACE[8];
extern struct swap_shop_menu_data* SWAP_SHOP_MENU_DATA_PTR;
extern undefined* OVERLAY21_UNKNOWN_POINTER__NA_238CF44;

Comment thread
HappyLappy1 marked this conversation as resolved.
#endif
2 changes: 2 additions & 0 deletions headers/functions/overlay11.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ void CloseTopGroundMenu(void);
int UpdateTopGroundMenu(void);
bool IsBagNotEmpty(void);
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 HandleControlsTopScreenGround(void);
bool GetDungeonMapPos(struct uvec2* out_pos, enum dungeon_id dungeon);
void WorldMapSetMode(uint32_t world_map_mode);
Expand Down
12 changes: 12 additions & 0 deletions headers/functions/overlay21.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef HEADERS_FUNCTIONS_OVERLAY21_H_
#define HEADERS_FUNCTIONS_OVERLAY21_H_

void SwapShopDialogueManager(enum swap_shared_case new_shared_case);
enum item_id GetFirstExclusivePrerequisite(enum item_id item_id);
int SwapShopEntryPoint(void);
void SwapShopDestructor(void);
int SwapShopMainManager(void);
void CloseTextboxAndSimpleMenu(void);
void SwapShopPrintCurrentGold(int window_id);

#endif
Comment thread
HappyLappy1 marked this conversation as resolved.
5 changes: 3 additions & 2 deletions headers/types/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,9 @@ struct synth_template {
struct item_id_16 exc_item_id;
// 0x2: Weight for that item to appear in the swap shop.
int16_t item_weight;
// 0x4: Seem to be powers of 2: 2/4/8/16/32. Possibly unused weights from EoTD?
int16_t unk_0x4;
// 0x4: Number of items required to trade for that item in the shop. Seems to match even for
// items with specific requirements.
int16_t num_to_trade;
// 0x6: Minimum $SCENARIO_BALANCE_FLAG value for it to spawn.
// Only used for the Water Float (6) and the Phione/Manaphy items (7).
int16_t min_balance_flag;
Expand Down
99 changes: 99 additions & 0 deletions headers/types/ground_mode/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,105 @@ enum script_routine_kind {
ENUM_16_BIT(script_routine_kind);
#pragma pack(pop)

enum swap_shop_shared_case {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to make you do extra research, sorry. I thought this was smaller/you already knew the cases. In the future if you don't know all the cases feel free to just say so and leave it as an int.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I did have this information, it was just a matter of naming each case honestly. Probably better that it's done than not done.

SWAP_SHARED_CASE_TALK_WELCOME = 0,
SWAP_SHARED_CASE_TALK_CONTINUE_SWAP = 1,
SWAP_SHARED_CASE_TALK_WHAT_INFO = 2,
SWAP_SHARED_CASE_TALK_COME_AGAIN = 3,
SWAP_SHARED_CASE_CLOSE_SHOP = 4,
SWAP_SHARED_CASE_TALK_LACKING_SWAP_ITEMS = 5,
SWAP_SHARED_CASE_TALK_SWAP_BROKE = 6,
SWAP_SHARED_CASE_TALK_SWAP_POOR = 7,
// Seems to be an identical copy of SWAP_SHARED_CASE_TALK_SEND_TO_STORAGE.
// Perhaps this was once intended for trying to swap with a full storage, which is impossible by
// design.
SWAP_SHARED_CASE_UNK_0x8 = 8,
SWAP_SHARED_CASE_TALK_WHAT_ITEMS = 9,
SWAP_SHARED_CASE_TALK_VALUABLE_SWAP = 10,
SWAP_SHARED_CASE_INIT_SWAP_ITEMS_MENU = 11,
SWAP_SHARED_CASE_SWAP_ITEMS_MENU = 12,
SWAP_SHARED_CASE_RETURN_SWAP_ITEMS_MENU = 13,
SWAP_SHARED_CASE_SELECT_SWAP_ITEM_OPTIONS = 14,
SWAP_SHARED_CASE_SWAP_ITEM_GET_INFO = 15,
SWAP_SHARED_CASE_TALK_CONFIRM_SWAP = 16,
SWAP_SHARED_CASE_DO_SWAP_THEN_TALK = 17,
SWAP_SHARED_CASE_INIT_SCRIPT_ACTION_1 = 18,
SWAP_SHARED_CASE_INIT_SCRIPT_ACTION_2 = 19,
SWAP_SHARED_CASE_INIT_SCRIPT_ACTION_3 = 20,
SWAP_SHARED_CASE_TEXT_PUT_IN_CAULDRON = 21,
SWAP_SHARED_CASE_TALK_WHAT_WOAH = 22,
SWAP_SHARED_CASE_TALK_SUCCESSFUL_SWAP = 23,
SWAP_SHARED_CASE_TEXT_RECEIVE_SWAP_ITEM = 24,
SWAP_SHARED_CASE_TALK_SEND_TO_STORAGE = 25,
SWAP_SHARED_CASE_CLOSE_DIALOGUE_BOX = 26,
SWAP_SHARED_CASE_MAIN_MENU_OPTIONS = 27,
SWAP_SHARED_CASE_SWAP_CANCELLED = 28,
SWAP_SHARED_CASE_UNK_0x1D = 29,
SWAP_SHARED_CASE_CONFIRM_CHOICE = 30,
SWAP_SHARED_CASE_SWAP_DENIED = 31,
SWAP_SHARED_CASE_TALK_SUBINFO_TRADE_2 = 32,
SWAP_SHARED_CASE_SUBINFO_OPTIONS = 33,
SWAP_SHARED_CASE_TALK_SUBINFO_TRADE_1 = 34,
SWAP_SHARED_CASE_TALK_SUBINFO_LIST = 35,
SWAP_SHARED_CASE_TALK_VIEW_WHOSE_LIST = 36,
SWAP_SHARED_CASE_WHOSE_LIST_OPTIONS = 37,
SWAP_SHARED_CASE_WHOSE_LIST_SUBOPTIONS = 38,
SWAP_SHARED_CASE_CLOSE_LIST_SUBOPTIONS = 39,
SWAP_SHARED_CASE_SHOW_SPECIES_SUMMARY = 40,
SWAP_SHARED_CASE_CLOSE_SPECIES_SUMMARY = 41,
SWAP_SHARED_CASE_SHOW_SPECIES_MOVES = 42,
SWAP_SHARED_CASE_CLOSE_SPECIES_MOVES = 43,
SWAP_SHARED_CASE_SHOW_SPECIES_MOVE_INFO = 44,
SWAP_SHARED_CASE_RETURN_SPECIES_MOVES = 45,
SWAP_SHARED_CASE_SHOW_SPECIES_IQ = 46,
SWAP_SHARED_CASE_CLOSE_SPECIES_IQ = 47,
SWAP_SHARED_CASE_TALK_LIST_SPECIES_CAN_USE = 48,
SWAP_SHARED_CASE_INIT_SPECIES_LIST = 49,
SWAP_SHARED_CASE_CLOSE_SPECIES_LIST = 50,
SWAP_SHARED_CASE_SPECIES_LIST_ITEM_OPTIONS = 51,
SWAP_SHARED_CASE_SPECIES_LIST_ITEM_INFO = 52,
SWAP_SHARED_CASE_TALK_CANCEL_SPECIES_ITEM_LIST = 53,
SWAP_SHARED_CASE_TALK_SEE_OTHER_LISTS = 54,
SWAP_SHARED_CASE_SEE_OTHER_LIST_OPTIONS = 55,
SWAP_SHARED_CASE_TALK_NOBODY_TO_TRADE_WITH = 56,
SWAP_SHARED_CASE_TALK_WHICH_ITEMS_IN_RETURN = 57,
SWAP_SHARED_CASE_INIT_TRADE_AWAY_LIST = 58,
SWAP_SHARED_CASE_RESUME_TRADE_AWAY_LIST = 59,
SWAP_SHARED_CASE_CLOSE_TRADE_AWAY_ITEM_LIST = 60,
SWAP_SHARED_CASE_CLOSE_TRADE_AWAY_ITEM_LIST_INFO = 61,
SWAP_SHARED_CASE_TRADE_AWAY_LIST_ITEM_OPTIONS = 62,
SWAP_SHARED_CASE_SHOW_TRADE_AWAY_LIST_ITEM_INFO = 63,
SWAP_SHARED_CASE_TALK_CANCEL_TRADE_AWAY_ITEM_LIST = 64,
SWAP_SHARED_CASE_INIT_SWAP_SHOP = 65,
SWAP_SHARED_CASE_UNK_0x42 = 66,
SWAP_SHARED_CASE_UNK_0x43 = 67,
};
// Used exclusively by SwapShopMainManager.
enum swap_shop_main_manager_case {
SWAP_MAIN_CASE_ENTRY_POINT = 0, // Assigned by SwapShopEntryPoint. Seems to set the script
// output case to 0, perhaps resetting it?
SWAP_MAIN_CASE_USE_SHARED_CASE = 1, // Will navigate to the shared_case-specific index.
SWAP_MAIN_CASE_CLOSE_PORTRAIT_AND_TEXTBOX =
2, // Subsequently sets the case to SWAP_MAIN_CASE_EXIT_SWAP_SHOP
SWAP_MAIN_CASE_EXIT_SWAP_SHOP = 3, // Also sets the script output case to -1.
SWAP_MAIN_CASE_RUN_SCRIPT_ACTION = 4, // Called after each script action, and the entry point.
// Possibly enables the script to run?
SWAP_MAIN_CASE_UNK_0x5 = 5, // Always returns 1. Seems unused.
SWAP_MAIN_CASE_SET_SCRIPT_ACTION_1 =
6, // Sets script output to 1, allowing croagunk to turn towards the cauldron.
SWAP_MAIN_CASE_SET_SCRIPT_ACTION_2 =
7, // Sets script output to 2, causing flashing lights and earthquake effects
SWAP_MAIN_CASE_SET_SCRIPT_ACTION_3 =
8, // Sets script output to 3, causing croagunk to turn towards the player.
};

enum swap_shop_inventory_case {
SWAP_INV_CASE_SHOP_ITEMS = 0,
SWAP_INV_CASE_UNK_0x1 = 1,
SWAP_INV_CASE_SPECIES_EXC_ITEM_LIST = 2,
SWAP_INV_CASE_CHOOSE_TRADE_AWAY_ITEMS_LIST = 3,
};

// These are super long, so split them out into a separate file
#include "version_dep_enums.h"

Expand Down
138 changes: 138 additions & 0 deletions headers/types/ground_mode/ground_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,4 +636,142 @@ struct ground_entity_function_table {
};
ASSERT_SIZE(struct ground_entity_function_table, 80);

struct swap_shop_menu_data {
// 0x0: The switch case index shared by SwapShopMainManager and SwapShopDialogueManager.
enum swap_shop_shared_case current_shared_case;
// 0x4: The "next" switch case index to be shared, typically assigned by SwapShopMainManager.
enum swap_shop_shared_case next_shared_case;
// 0x8: Used exclusively by SwapShopMainManager. More research needed.
int32_t unk_windows_counter;
// 0xC: If true, croagunk will not ask the player if they want to continue swapping.
bool croagunk_out_of_swaps;
undefined field_0xd;
// 0xE: The item the player will receive by swapping.
struct bulk_item received_item;
undefined field_0x12;
undefined field_0x13;
undefined field_0x14;
undefined field_0x15;
undefined field_0x16;
undefined field_0x17;
// 0x18: While selecting which items to give croagunk, this field is filled when selecting
// "info" on an item in the list.
struct bulk_item described_item;
// 0x1C: Whenever a simple menu is run, this field is where the result is stored.
int32_t simple_menu_result;
// 0x20: Zeroed in SwapShopEntryPoint, but never modified
undefined4 unk_int_1;
// 0x24: Zeroed in SwapShopEntryPoint, but never modified
undefined4 unk_int_2;
// 0x28: Emotion for croagunk's portrait.
enum portrait_emotion emotion_id;
// 0x2C: The case menu for a smaller switch case at the top of SwapShopMainManager.
enum swap_shop_main_manager_case main_manager_case;
// 0x30: Stores preprocessor_args for the next window.
struct preprocessor_args preprocessor_args;
// 0x80: The window_id of the current dialogue box window. -2 if none are present.
int8_t dialogue_window_id;
// 0x81: The window_id of the current portrait window. -2 if none are present.
int8_t portrait_window_id;
// 0x82: The window_id of the current advanced textbox window. -2 if none are present.
int8_t advanced_textbox_window_id;
// 0x83: The window_id of the current simple menu window. -2 if none are present.
int8_t simple_menu_window_id;
// 0x84: The window_id of the current text box window. -2 if none are present.
int8_t text_window_id;
// 0x85: The window_id of the current scroll box window. -2 if none are present.
int8_t scroll_box_window_id;
// 0x86: A small buffer for preprocessed text strings.
char text_string[66];
// 0xC8: Stores portrait_params for croagunk's next portrait.
struct portrait_params portrait_params;
// 0xD8: Stores the number of items required to trade for the current trade.
int16_t exc_item_trade_count;
// 0xDA: The number of exclusive items currently in the bag.
int16_t exc_bag_item_count;
// 0xDC: The individual item IDs of the exclusive items present in the bag.
struct item_id_16 exc_bag_items[50];
// 0x140: The number of exclusive items currently in storage.
int16_t exc_storage_item_count;
// 0x142: The individual item IDs of the exclusive items in storage.
struct item_id_16 exc_storage_items[1000];
undefined field_0x912;
undefined field_0x913;
// 0x914: The team member slot whose exclusive items are about to be viewed.
int32_t selected_team_member_slot;
// 0x918: The move slot to create an info menu for.
int16_t selected_move_slot;
// 0x91A: The four moves known by selected_team_member_slot.
struct move known_moves[4];
undefined field_0x93a;
undefined field_0x93b;
};
ASSERT_SIZE(struct swap_shop_menu_data, 2364);

struct swap_shop_inventory_ptrs {
// 0x0: Seems to be a pointer to some kind of temporary variable?
undefined* temp_variable;
// 0x4: A pointer to the swap_shop_inventory_data struct.
struct swap_shop_inventory_data* inventory_data;
};
ASSERT_SIZE(struct swap_shop_inventory_ptrs, 8);

struct exc_item_trade_slot {
// 0x0: The trade type the item slot uses.
int16_t trade_type;
// 0x2: This is likely either the item_id of the slot, or the index of the slot. It might vary
// depending on the trade_type.
int16_t unk_0x2;
// 0x4: If the player has enough exclusive items to swap for the item, this will be true.
bool can_afford_item;
undefined unk_0x5;
};
ASSERT_SIZE(struct exc_item_trade_slot, 6);

struct swap_shop_inventory_data {
// 0x0: switch case id for SwapShopInventoryManager
enum swap_shop_inventory_case inventory_case;
// 0x4: A copy of num_valid_shop_items to be used by CreateCollectionMenu?
int32_t num_valid_shop_items_temp;
// 0x8: Seemingly unused, these are zeroed for some reason?
int32_t field_0x8[1068];
// 0x10B8: If the item is purchasable, this field will be 0x2. Otherwise, it will be 0x0.
int8_t is_item_purchasable[1068];
// 0x14E4: Seems to be a window_id for a collection menu.
int8_t collection_menu_window_id;
undefined field_0x14e5;
// 0x14E6: Seems to be a struct for each item in the shop.
struct exc_item_trade_slot exc_item_trade_slots[1068];
// 0x2DEE: For each item in the swap list, is the number of that item available?
int16_t item_quantities[1068];
// 0x3646: List of every exclusive item the player owns.
struct item_id_16 owned_exclusive_items[1000];
// 0x3E16: List of how much of each owned_exclusive_item the player owns.
int16_t owned_item_quantities[1000];
// 0x45E6: The synth_templates matching today's rolled swap shop items.
struct synth_template shop_synth_templates[8];
// 0x4626: Total number of items for sale in the swap shop.
int16_t num_valid_shop_items;
// 0x4628: Number of items required to be traded to croagunk for the selected item.
int16_t num_required_trade_items;
undefined field_0x462a;
undefined field_0x462b;
// 0x462C
struct window_extra_info window_extra_info;
// 0x46C4: Whether or not the synth.bin file is open.
bool synth_bin_open;
undefined field_0x46c5;
undefined field_0x46c6;
undefined field_0x46c7;
// 0x46C8
int32_t textbox_window_id;
struct text_box* textbox_ptr;
// 0x46D0: The item ID the player selects when choosing items to give croagunk. Used to check
// the item info.
struct item_id_16 selected_item;
undefined field_0x46d2;
undefined field_0x46d3;
};
ASSERT_SIZE(struct swap_shop_inventory_data, 18132);

#endif
16 changes: 16 additions & 0 deletions symbols/overlay11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,16 @@ overlay11:

r0: ?
r1: ?
- name: SwapShopInventoryManager
Comment thread
HappyLappy1 marked this conversation as resolved.
address:
EU: 0x230BBA8
description: |-
Called primarily handle the display and preparation of the swap shop inventory list, exclusive items list, and the item trade list.
Creates a swap_shop_inventory_data struct if one does not already exist.
Is the child function to SwapShopDialogueManager.

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: HandleControlsTopScreenGround
address:
EU: 0x230EFB4
Expand Down Expand Up @@ -1811,6 +1821,12 @@ overlay11:
Host pointers to multiple structure used for performing an overworld scene

type: struct main_ground_data
- name: SWAP_SHOP_INVENTORY_PTRS
Comment thread
HappyLappy1 marked this conversation as resolved.
address:
EU: 0x23258E4
length:
EU: 0x8
description: Host pointers to multiple structures used for performing internal Swap Shop checks.
- name: WORLD_MAP_MODE
address:
EU: 0x2325924
Expand Down
Loading
Loading