summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-03-30 13:11:51 -0500
committerGitHub <noreply@github.com>2021-03-30 13:11:51 -0500
commita2d206665c6fffbd962375f262b7fbb05c7b7478 (patch)
tree6710109c4d9098b74da68ca8f18024d6c184ebc2 /include
parent2fd4f339b42c010191c199772b09ac34c580de94 (diff)
Move some data and Splitting (#32)
* move friend area settings to src * split out playtime into different C file and decomp a few more funcs * time -> play_time * fix include * split out more wonder mail stuff * unify 203B2C0 and unkDungeon structs. snuck in a decomp func too * split out more menu screens * work some more on trade items * doc a few more things * add a close nonmatch and decomp nullsub and small func * rollback struct attempt since it causes nonmatchings * only one func left in asm * death to trade_item asm and unify into one C file * more docing and cleanup * label main menu and trade items menu global menu struct * doc itemMode
Diffstat (limited to 'include')
-rw-r--r--include/code_8041D5C.h23
-rw-r--r--include/constants/friend_area.h8
-rw-r--r--include/friend_area.h6
-rw-r--r--include/play_time.h (renamed from include/time.h)6
-rw-r--r--include/save.h2
-rw-r--r--include/trade_items_menu.h57
-rw-r--r--include/wonder_mail.h46
7 files changed, 138 insertions, 10 deletions
diff --git a/include/code_8041D5C.h b/include/code_8041D5C.h
new file mode 100644
index 0000000..e0cf614
--- /dev/null
+++ b/include/code_8041D5C.h
@@ -0,0 +1,23 @@
+#ifndef CODE_8041D5C_H
+#define CODE_8041D5C_H
+
+struct subStruct_8048524
+{
+ u8 fill0[0x6];
+ u8 unk6;
+ u8 unk7;
+ u8 fill8[0xAC - 0x8];
+ u8 unkAC;
+ u8 fillAD[0x112 - 0xAD];
+ u8 unk112;
+ u8 fill113[0x13C - 0x113];
+ u32 unk13C;
+};
+
+struct unkDungeon_8041D5C
+{
+ u8 padding[0x70];
+ struct subStruct_8048524 *unk70;
+};
+
+#endif
diff --git a/include/constants/friend_area.h b/include/constants/friend_area.h
index 061e1ae..4692f89 100644
--- a/include/constants/friend_area.h
+++ b/include/constants/friend_area.h
@@ -4,6 +4,12 @@
#define NUM_FRIEND_AREAS 58
+// Unlock Condition
+#define UNLOCK_SHOP_STORY 0
+#define UNLOCK_SHOP_POST_GAME 1
+#define UNLOCK_WONDER_MAIL 2
+#define UNLOCK_LEGENDARY_REQUEST 3
+
#define NONE 0
#define BOUNTIFUL_SEA 1
#define TREASURE_SEA 2
@@ -11,7 +17,7 @@
#define DEEP_SEA_FLOOR 4
#define DEEP_SEA_CURRENT 5
#define SEAFLOOR_CAVE 6
-#define SHALLOW_CAVE 7
+#define SHALLOW_BEACH 7
#define MT_DEEPGREEN 8
#define MT_CLEFT 9
#define MT_MOONVIEW 10
diff --git a/include/friend_area.h b/include/friend_area.h
index a1234a7..f85cb66 100644
--- a/include/friend_area.h
+++ b/include/friend_area.h
@@ -4,11 +4,7 @@
struct FriendAreaSettings
{
s16 num_pokemon;
- u8 unlock_condition;
- // 0 - Shop (Story)
- // 1 - Shop (Story Post-game)
- // 2 - Wonder Mail
- // 3 - Legendary Request (unlocks when lengendary joins)
+ u16 unlock_condition;
u32 price;
};
diff --git a/include/time.h b/include/play_time.h
index 936540b..faae1d0 100644
--- a/include/time.h
+++ b/include/play_time.h
@@ -1,5 +1,5 @@
-#ifndef TIME_H
-#define TIME_H
+#ifndef PLAY_TIME_H
+#define PLAY_TIME_H
struct PlayTimeStruct
{
@@ -16,5 +16,5 @@ void DeconstructPlayTime(struct PlayTimeStruct *r0, u32 *outHours, u32 *outMinut
void InitializePlayTime(void);
-#endif // TIME_H
+#endif // PLAY_TIME_H
diff --git a/include/save.h b/include/save.h
index 4ea03c6..2b4c1ec 100644
--- a/include/save.h
+++ b/include/save.h
@@ -1,7 +1,7 @@
#ifndef SAVE_H
#define SAVE_H
-#include "time.h"
+#include "play_time.h"
#include "exclusive_pokemon.h"
#include "rescue_team_info.h"
diff --git a/include/trade_items_menu.h b/include/trade_items_menu.h
new file mode 100644
index 0000000..73435a3
--- /dev/null
+++ b/include/trade_items_menu.h
@@ -0,0 +1,57 @@
+#ifndef GUARD_TRADE_ITEMS_MENU_H
+#define GUARD_TRADE_ITEMS_MENU_H
+
+struct unkData
+{
+ u8 unk0[24];
+};
+
+struct TradeSubStruct
+{
+ u8 unk0; // item id?
+ u8 fill3[0x3];
+ u32 unk4; // number of items?
+};
+
+
+struct TradeItemsMenu
+{
+ // size: 0x3A0
+ u32 currMenu;
+ u32 unk4;
+ u32 itemMode;
+ u32 linkStatus;
+ u32 unk10;
+ u32 unk14; // item #
+ u32 unk18;
+ u32 unk1C;
+ u32 unk20;
+ u32 unk24;
+ u32 unk28;
+ struct unkData *unk2C;
+ u32 unk30;
+ u32 unk34;
+ u8 fill38[0x44 - 0x38];
+ u32 unk44;
+ u8 fill8[0x134 - 0x48];
+ u32 unk134;
+ u8 fill138[0x184 - 0x138];
+ struct unkData unk184[3]; // guessing the size until I know
+ u8 fill188[0x1E4 - 0x1CC];
+ u32 unk1E4;
+ u8 fill1E8[0x244 - 0x1E8];
+
+ // TODO These might be structs...
+ struct TradeSubStruct unk244;
+
+ struct TradeSubStruct unk24C;
+
+ struct TradeSubStruct unk254;
+
+ u8 unk25C;
+ u8 unk25D;
+ u8 unk25E;
+ u8 fill25F[0x3A0 - 0x25F];
+};
+
+#endif
diff --git a/include/wonder_mail.h b/include/wonder_mail.h
new file mode 100644
index 0000000..39cc9b2
--- /dev/null
+++ b/include/wonder_mail.h
@@ -0,0 +1,46 @@
+#ifndef GUARD_WONDER_MAIL_H
+#define GUARD_WONDER_MAIL_H
+
+#include "file_system.h"
+
+struct WonderMailStruct_203B2C0
+{
+ u32 unk0;
+ u32 unk4;
+ u8 unk8[0x36];
+ u8 unk3E;
+ u32 unk40;
+ u32 linkError;
+ u16 unk48[232];
+ u8 unk218;
+ u8 padding7[3];
+ u32 unk21C;
+ u8 padding[0x7C];
+ u32 unk29C;
+ u8 padding6[0x6C];
+ u32 unk30C;
+ u8 padding8[0x4C];
+ u32 unk35C;
+ u8 padding5[0x5C];
+ u32 unk3BC;
+ u8 padding4[0x60];
+ struct OpenedFile *faceFile;
+ u8 *faceData;
+ u16 unk428;
+ u16 unk42A;
+ u8 unk42C;
+ u8 unk42D;
+ u8 unk42E;
+ u8 padding3[0x534 - 0x430];
+ u32 unk534;
+ s32 unk538; // A7 << 3
+ u32 unk53C;
+ u32 unk540; // A8 << 4
+ s16 unk544;
+
+};
+
+void sub_8028B04(u32 r0);
+
+
+#endif