summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-06-19 18:03:24 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-06-19 18:28:55 -0400
commit7eeba327bd6dc235a33f06a7779e3b3c52f04475 (patch)
treee9639b90704ac227cb14a0ec87b9dc0b2a478a15 /include
parentcaa193364bf786cb567ed16eb4670ed2cc4cb362 (diff)
Dump items and start decomp item_use
Diffstat (limited to 'include')
-rw-r--r--include/berry_pouch.h7
-rw-r--r--include/bike.h2
-rw-r--r--include/constants/global.h79
-rw-r--r--include/constants/items.h7
-rw-r--r--include/field_fadetransition.h1
-rw-r--r--include/field_player_avatar.h2
-rw-r--r--include/field_weather.h1
-rw-r--r--include/global.h74
-rw-r--r--include/item.h12
-rw-r--r--include/item_menu.h5
-rw-r--r--include/item_use.h33
-rw-r--r--include/mail.h1
-rw-r--r--include/overworld.h3
-rw-r--r--include/strings.h3
14 files changed, 145 insertions, 85 deletions
diff --git a/include/berry_pouch.h b/include/berry_pouch.h
new file mode 100644
index 000000000..8427afc7e
--- /dev/null
+++ b/include/berry_pouch.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_BERRY_POUCH_H
+#define GUARD_BERRY_POUCH_H
+
+void sub_813D808(u8 taskId);
+void sub_813D934(void (*)(void));
+
+#endif //GUARD_BERRY_POUCH_H
diff --git a/include/bike.h b/include/bike.h
index 468c48273..9185afb31 100644
--- a/include/bike.h
+++ b/include/bike.h
@@ -2,5 +2,7 @@
#define GUARD_BIKE_H
void sub_80BD620(u32 unkC, u32 unk10);
+bool8 sub_80BD540(void);
+void sub_80BD5C8(u8 flags);
#endif //GUARD_BIKE_H
diff --git a/include/constants/global.h b/include/constants/global.h
new file mode 100644
index 000000000..4e798d1ef
--- /dev/null
+++ b/include/constants/global.h
@@ -0,0 +1,79 @@
+#ifndef GUARD_CONSTANTS_GLOBAL_H
+#define GUARD_CONSTANTS_GLOBAL_H
+
+#define POKEMON_SLOTS_NUMBER 412
+
+#define ITEM_NAME_LENGTH 14
+#define POKEMON_NAME_LENGTH 10
+#define OT_NAME_LENGTH 7
+
+enum
+{
+ VERSION_SAPPHIRE = 1,
+ VERSION_RUBY = 2,
+ VERSION_EMERALD = 3,
+ VERSION_FIRE_RED = 4,
+ VERSION_LEAF_GREEN = 5,
+};
+
+enum LanguageId {
+ LANGUAGE_JAPANESE = 1,
+ LANGUAGE_ENGLISH = 2,
+ LANGUAGE_FRENCH = 3,
+ LANGUAGE_ITALIAN = 4,
+ LANGUAGE_GERMAN = 5,
+ // 6 goes unused but the theory is it was meant to be Korean
+ LANGUAGE_SPANISH = 7,
+};
+
+#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
+
+#define PC_ITEMS_COUNT 30
+#define BAG_ITEMS_COUNT 42
+#define BAG_KEYITEMS_COUNT 30
+#define BAG_POKEBALLS_COUNT 13
+#define BAG_TMHM_COUNT 58
+#define BAG_BERRIES_COUNT 43
+
+enum
+{
+ MALE,
+ FEMALE
+};
+
+enum
+{
+ OPTIONS_BUTTON_MODE_NORMAL,
+ OPTIONS_BUTTON_MODE_LR,
+ OPTIONS_BUTTON_MODE_L_EQUALS_A
+};
+
+enum
+{
+ OPTIONS_TEXT_SPEED_SLOW,
+ OPTIONS_TEXT_SPEED_MID,
+ OPTIONS_TEXT_SPEED_FAST
+};
+
+enum
+{
+ OPTIONS_SOUND_MONO,
+ OPTIONS_SOUND_STEREO
+};
+
+enum
+{
+ OPTIONS_BATTLE_STYLE_SHIFT,
+ OPTIONS_BATTLE_STYLE_SET
+};
+
+enum
+{
+ POCKET_ITEMS = 1,
+ POCKET_KEY_ITEMS,
+ POCKET_POKE_BALLS,
+ POCKET_TM_CASE,
+ POCKET_BERRY_POUCH,
+};
+
+#endif //GUARD_CONSTANTS_GLOBAL_H
diff --git a/include/constants/items.h b/include/constants/items.h
index cc73119e6..6959ad358 100644
--- a/include/constants/items.h
+++ b/include/constants/items.h
@@ -395,11 +395,4 @@
// Check if the item is one that can be used on a Pokemon.
#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2)
-// POCKETS
-#define POCKET_ITEMS 1
-#define POCKET_KEY_ITEMS 2
-#define POCKET_POKE_BALLS 3
-#define POCKET_TM_CASE 4
-#define POCKET_BERRY_POUCH 5
-
#endif // GUARD_CONSTANTS_ITEMS_H
diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h
index d0856c84c..4ba350491 100644
--- a/include/field_fadetransition.h
+++ b/include/field_fadetransition.h
@@ -14,5 +14,6 @@ void sub_807E500(void);
void sub_807DF64(void);
void sub_807DC18(void);
void FieldCallback_ReturnToEventScript2(void);
+void sub_807DC00(void);
#endif // GUARD_FIELD_FADETRANSITION_H
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index b365a9d92..4871bd082 100644
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -22,5 +22,7 @@ void sub_805D9C4(struct Sprite *sprite);
void sub_805D154(u8 direction);
void sub_805DAE4(u8 direction);
void SetPlayerAvatarTransitionFlags(u16 a);
+bool8 IsPlayerFacingSurfableFishableWater(void);
+void sub_805D2C0(u8 secondaryId);
#endif //GUARD_FIELD_PLAYER_AVATAR_H
diff --git a/include/field_weather.h b/include/field_weather.h
index cf0e34d06..13a1b4fcb 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -13,5 +13,6 @@ void DoCurrentWeather(void);
void SetSav1WeatherFromCurrMapHeader(void);
void sub_807B0C4(u16 *, u16 *, u32);
void PlayRainStoppingSoundEffect(void);
+bool8 sub_807AA70(void);
#endif // GUARD_WEATHER_H
diff --git a/include/global.h b/include/global.h
index d08a1e0df..050c311e4 100644
--- a/include/global.h
+++ b/include/global.h
@@ -4,6 +4,7 @@
#include "config.h"
#include "gba/gba.h"
#include <string.h>
+#include "constants/global.h"
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
@@ -39,10 +40,6 @@
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
-#define POKEMON_SLOTS_NUMBER 412
-#define POKEMON_NAME_LENGTH 10
-#define OT_NAME_LENGTH 7
-
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
@@ -79,75 +76,6 @@ extern u8 gStringVar2[];
extern u8 gStringVar3[];
extern u8 gStringVar4[];
-enum
-{
- VERSION_SAPPHIRE = 1,
- VERSION_RUBY = 2,
- VERSION_EMERALD = 3,
- VERSION_FIRE_RED = 4,
- VERSION_LEAF_GREEN = 5,
-};
-
-enum LanguageId {
- LANGUAGE_JAPANESE = 1,
- LANGUAGE_ENGLISH = 2,
- LANGUAGE_FRENCH = 3,
- LANGUAGE_ITALIAN = 4,
- LANGUAGE_GERMAN = 5,
- // 6 goes unused but the theory is it was meant to be Korean
- LANGUAGE_SPANISH = 7,
-};
-
-#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
-
-#define PC_ITEMS_COUNT 30
-#define BAG_ITEMS_COUNT 42
-#define BAG_KEYITEMS_COUNT 30
-#define BAG_POKEBALLS_COUNT 13
-#define BAG_TMHM_COUNT 58
-#define BAG_BERRIES_COUNT 43
-
-enum
-{
- MALE,
- FEMALE
-};
-
-enum
-{
- OPTIONS_BUTTON_MODE_NORMAL,
- OPTIONS_BUTTON_MODE_LR,
- OPTIONS_BUTTON_MODE_L_EQUALS_A
-};
-
-enum
-{
- OPTIONS_TEXT_SPEED_SLOW,
- OPTIONS_TEXT_SPEED_MID,
- OPTIONS_TEXT_SPEED_FAST
-};
-
-enum
-{
- OPTIONS_SOUND_MONO,
- OPTIONS_SOUND_STEREO
-};
-
-enum
-{
- OPTIONS_BATTLE_STYLE_SHIFT,
- OPTIONS_BATTLE_STYLE_SET
-};
-
-enum
-{
- BAG_ITEMS = 1,
- BAG_POKEBALLS,
- BAG_TMsHMs,
- BAG_BERRIES,
- BAG_KEYITEMS
-};
-
struct Coords16
{
s16 x;
diff --git a/include/item.h b/include/item.h
index f5a8db699..f21c207e0 100644
--- a/include/item.h
+++ b/include/item.h
@@ -1,18 +1,20 @@
-#ifndef ITEM_H
-#define ITEM_H
+#ifndef GUARD_ITEM_H
+#define GUARD_ITEM_H
+
+#include "global.h"
typedef void (*ItemUseFunc)(u8);
struct Item
{
- u8 name[14];
+ u8 name[ITEM_NAME_LENGTH];
u16 itemId;
u16 price;
u8 holdEffect;
u8 holdEffectParam;
const u8 *description;
u8 importance;
- u8 unk19;
+ u8 exitsBagOnUse;
u8 pocket;
u8 type;
ItemUseFunc fieldUseFunc;
@@ -76,4 +78,4 @@ u16 GetBagItemId(u16 *);
void ItemPcCompaction(void);
void RemoveItemFromPC(u16 itemId, u16 quantity);
-#endif // ITEM_H
+#endif // GUARD_ITEM_H
diff --git a/include/item_menu.h b/include/item_menu.h
index 2d4be4fd7..b4815d164 100644
--- a/include/item_menu.h
+++ b/include/item_menu.h
@@ -28,5 +28,10 @@ void sub_8108CF0(void);
void sub_810B108(u8);
void UseFameCheckerFromMenu(void);
void ItemMenu_MoveItemSlotToNewPositionInArray(struct ItemSlot * slots, int pos1, int pos2);
+void sub_8108B50(u8 taskId);
+void sub_8108CB4(void);
+void sub_8108EE0(void (*)(void));
+void sub_8108E70(u8, u8, const u8 *, void (*)(u8));
+void sub_810A1F8(u8 taskId);
#endif //GUARD_ITEM_MENU_H
diff --git a/include/item_use.h b/include/item_use.h
index 04e61ab59..a34090af1 100644
--- a/include/item_use.h
+++ b/include/item_use.h
@@ -6,4 +6,37 @@
void sub_80A1E0C(u8);
void ItemUse_SetQuestLogEvent(u8, struct Pokemon *, u16, u16);
+void sub_80A11E8(u8 taskId);
+void sub_80A122C(u8 taskId);
+void sub_80A1338(u8 taskId);
+void sub_80A1460(u8 taskId);
+void sub_80A14E8(u8 taskId);
+void sub_80A156C(u8 taskId);
+void sub_80A16E0(u8 taskId);
+void sub_80A16FC(u8 taskId);
+void sub_80A1718(u8 taskId);
+void sub_80A1734(u8 taskId);
+void sub_80A1750(u8 taskId);
+void sub_80A176C(u8 taskId);
+void sub_80A1788(u8 taskId);
+void sub_80A1820(u8 taskId);
+void sub_80A18B8(u8 taskId);
+void sub_80A18EC(u8 taskId);
+void sub_80A1998(u8 taskId);
+void sub_80A1A94(u8 taskId);
+void sub_80A1C60(u8 taskId);
+void sub_80A1CF8(u8 taskId);
+void sub_80A1D9C(u8 taskId);
+void sub_80A1E1C(u8 taskId);
+void sub_80A1E64(u8 taskId);
+void sub_80A1E7C(u8 taskId);
+void sub_80A1FBC(u8 taskId);
+void sub_80A1FF4(u8 taskId);
+void sub_80A2010(u8 taskId);
+void sub_80A2238(u8 taskId);
+void ItemUseOutOfBattle_EscapeRope(u8 taskId);
+void ItemUseOutOfBattle_EnigmaBerry(u8 taskId);
+void ItemUseInBattle_EnigmaBerry(u8 taskId);
+void ItemUseOutOfBattle_Itemfinder(u8 taskId);
+
#endif //GUARD_ITEM_USE_H
diff --git a/include/mail.h b/include/mail.h
index 5d6ad559b..8cfca66dd 100644
--- a/include/mail.h
+++ b/include/mail.h
@@ -21,5 +21,6 @@ bool8 MonHasMail(struct Pokemon *mon);
void TakeMailFromMon(struct Pokemon *mon);
u8 GiveMailToMon2(struct Pokemon *mon, struct MailStruct *mail);
void ClearMailStruct(struct MailStruct *mail);
+void sub_80BEBEC(u16 *, void (*)(void), u8);
#endif // GUARD_MAIL_H
diff --git a/include/overworld.h b/include/overworld.h
index b8cf58b4d..122d73736 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -31,6 +31,8 @@ extern MainCallback gFieldCallback;
extern struct WarpData gUnknown_2031DBC;
+extern u8 gUnknown_2031DE0;
+
void IncrementGameStat(u8 index);
void Overworld_SetMapObjTemplateCoords(u8, s16, s16);
@@ -112,5 +114,6 @@ void sub_805671C(void);
void sub_8055DC4(void);
bool8 sub_8055FC4(void);
bool8 is_light_level_8_or_9(u8 mapType);
+bool32 sub_8055C9C(void);
#endif //GUARD_ROM4_H
diff --git a/include/strings.h b/include/strings.h
index 08dd25174..805516cec 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -161,4 +161,7 @@ extern const u8 gText_WithdrawItem[];
extern const u8 gText_Withdraw[];
extern const u8 gText_ReturnToPC[];
+extern const u8 gUnknown_8416425[];
+extern const u8 gUnknown_8416451[];
+
#endif //GUARD_STRINGS_H