summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fieldmap.h1
-rw-r--r--include/graphics.h56
-rw-r--r--include/item.h1
-rw-r--r--include/list_menu.h38
-rw-r--r--include/pokeball.h1
-rw-r--r--include/sea_cottage_special_anim.h12
-rw-r--r--include/shop.h10
-rw-r--r--include/strings.h15
-rw-r--r--include/task.h14
9 files changed, 93 insertions, 55 deletions
diff --git a/include/fieldmap.h b/include/fieldmap.h
index 4af4342f7..f1107100f 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -16,6 +16,7 @@ extern const struct MapData Route1_Layout;
u32 MapGridGetMetatileIdAt(int, int);
u32 MapGridGetMetatileBehaviorAt(int, int);
+u8 MapGridGetMetatileLayerTypeAt(s16 x, s16 y);
void MapGridSetMetatileIdAt(int, int, u16);
void MapGridSetMetatileEntryAt(int, int, u16);
void GetCameraCoords(u16*, u16*);
diff --git a/include/graphics.h b/include/graphics.h
index 30b1011f3..bb501ffb0 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -7,31 +7,31 @@
#include "global.h"
-extern const u8 gInterfaceGfx_PokeBall[];
-extern const u8 gInterfacePal_PokeBall[];
-extern const u8 gInterfaceGfx_GreatBall[];
-extern const u8 gInterfacePal_GreatBall[];
-extern const u8 gInterfaceGfx_SafariBall[];
-extern const u8 gInterfacePal_SafariBall[];
-extern const u8 gInterfaceGfx_UltraBall[];
-extern const u8 gInterfacePal_UltraBall[];
-extern const u8 gInterfaceGfx_MasterBall[];
-extern const u8 gInterfacePal_MasterBall[];
-extern const u8 gInterfaceGfx_NetBall[];
-extern const u8 gInterfacePal_NetBall[];
-extern const u8 gInterfaceGfx_DiveBall[];
-extern const u8 gInterfacePal_DiveBall[];
-extern const u8 gInterfaceGfx_NestBall[];
-extern const u8 gInterfacePal_NestBall[];
-extern const u8 gInterfaceGfx_RepeatBall[];
-extern const u8 gInterfacePal_RepeatBall[];
-extern const u8 gInterfaceGfx_TimerBall[];
-extern const u8 gInterfacePal_TimerBall[];
-extern const u8 gInterfaceGfx_LuxuryBall[];
-extern const u8 gInterfacePal_LuxuryBall[];
-extern const u8 gInterfaceGfx_PremierBall[];
-extern const u8 gInterfacePal_PremierBall[];
-extern const u8 gOpenPokeballGfx[];
+extern const u32 gInterfaceGfx_PokeBall[];
+extern const u32 gInterfacePal_PokeBall[];
+extern const u32 gInterfaceGfx_GreatBall[];
+extern const u32 gInterfacePal_GreatBall[];
+extern const u32 gInterfaceGfx_SafariBall[];
+extern const u32 gInterfacePal_SafariBall[];
+extern const u32 gInterfaceGfx_UltraBall[];
+extern const u32 gInterfacePal_UltraBall[];
+extern const u32 gInterfaceGfx_MasterBall[];
+extern const u32 gInterfacePal_MasterBall[];
+extern const u32 gInterfaceGfx_NetBall[];
+extern const u32 gInterfacePal_NetBall[];
+extern const u32 gInterfaceGfx_DiveBall[];
+extern const u32 gInterfacePal_DiveBall[];
+extern const u32 gInterfaceGfx_NestBall[];
+extern const u32 gInterfacePal_NestBall[];
+extern const u32 gInterfaceGfx_RepeatBall[];
+extern const u32 gInterfacePal_RepeatBall[];
+extern const u32 gInterfaceGfx_TimerBall[];
+extern const u32 gInterfacePal_TimerBall[];
+extern const u32 gInterfaceGfx_LuxuryBall[];
+extern const u32 gInterfacePal_LuxuryBall[];
+extern const u32 gInterfaceGfx_PremierBall[];
+extern const u32 gInterfacePal_PremierBall[];
+extern const u32 gOpenPokeballGfx[];
// pokemon gfx
extern const u32 gMonFrontPic_Bulbasaur[];
@@ -4839,6 +4839,12 @@ extern const u16 gUnknown_8E97DDC[];
extern const u32 gUnknown_8E97DFC[];
extern const u32 gUnknown_8E97EC4[];
+// shop menu
+extern const u32 gBuyMenuFrame_Gfx[];
+extern const u32 gBuyMenuFrame_Tilemap[];
+extern const u32 gBuyMenuFrame_TmHmTilemap[];
+extern const u32 gBuyMenuFrame_Pal[];
+
// battle_message
extern const u16 gUnknown_8D2FBB4[];
diff --git a/include/item.h b/include/item.h
index 01d2a55e5..7a4279976 100644
--- a/include/item.h
+++ b/include/item.h
@@ -68,6 +68,7 @@ bool8 AddBagItem(u16 itemId, u16 amount);
void SortPocketAndPlaceHMsFirst(struct BagPocket * pocket);
u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 itemId);
u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 itemId);
+u16 BagGetQuantityByItemId(u16 item);
bool8 itemid_is_unique(u16 itemId);
void BagPocketCompaction(struct ItemSlot * slots, u8 capacity);
u16 GetPcItemQuantity(u16 *);
diff --git a/include/list_menu.h b/include/list_menu.h
index e688c474f..94a49d2c2 100644
--- a/include/list_menu.h
+++ b/include/list_menu.h
@@ -30,25 +30,25 @@ struct ListMenu;
struct ListMenuTemplate
{
- const struct ListMenuItem *items;
- void (* moveCursorFunc)(s32 itemIndex, bool8 onInit, struct ListMenu *list);
- void (* itemPrintFunc)(u8 windowId, s32 itemId, u8 y);
- u16 totalItems;
- u16 maxShowed;
- u8 windowId;
- u8 header_X;
- u8 item_X;
- u8 cursor_X;
- u8 upText_Y:4; // x1, x2, x4, x8 = xF
- u8 cursorPal:4; // x10, x20, x40, x80 = xF0
- u8 fillValue:4; // x1, x2, x4, x8 = xF
- u8 cursorShadowPal:4; // x10, x20, x40, x80 = xF0
- u8 lettersSpacing:3;
- u8 itemVerticalPadding:3;
- u8 scrollMultiple:2; // x40, x80 = xC0
- u8 fontId:6; // x1, x2, x4, x8, x10, x20 = x3F
- u8 cursorKind:2; // x40, x80
-};
+ /*0x00*/ const struct ListMenuItem *items;
+ /*0x04*/ void (* moveCursorFunc)(s32 itemIndex, bool8 onInit, struct ListMenu *list);
+ /*0x08*/ void (* itemPrintFunc)(u8 windowId, s32 itemId, u8 y);
+ /*0x0C*/ u16 totalItems;
+ /*0x0E*/ u16 maxShowed;
+ /*0x10*/ u8 windowId;
+ /*0x11*/ u8 header_X;
+ /*0x12*/ u8 item_X;
+ /*0x13*/ u8 cursor_X;
+ /*0x14*/ u8 upText_Y:4; // x1, x2, x4, x8 = xF
+ u8 cursorPal:4; // x10, x20, x40, x80 = xF0
+ /*0x15*/ u8 fillValue:4; // x1, x2, x4, x8 = xF
+ u8 cursorShadowPal:4; // x10, x20, x40, x80 = xF0
+ /*0x16*/ u8 lettersSpacing:3;
+ u8 itemVerticalPadding:3;
+ u8 scrollMultiple:2; // x40, x80 = xC0
+ /*0x17*/ u8 fontId:6; // x1, x2, x4, x8, x10, x20 = x3F
+ u8 cursorKind:2; // x40, x80
+}; /* size = 0x18 */
struct ListMenu
{
diff --git a/include/pokeball.h b/include/pokeball.h
index 9e135db99..1c2241246 100644
--- a/include/pokeball.h
+++ b/include/pokeball.h
@@ -34,5 +34,6 @@ void DoHitAnimHealthboxEffect(u8 bank);
void LoadBallGfx(u8 ballId);
void FreeBallGfx(u8 ballId);
void sub_804BD94(u8 battler);
+void DestroySpriteAndFreeResources2(struct Sprite *sprite);
#endif // GUARD_POKEBALL_H
diff --git a/include/sea_cottage_special_anim.h b/include/sea_cottage_special_anim.h
new file mode 100644
index 000000000..5c939df12
--- /dev/null
+++ b/include/sea_cottage_special_anim.h
@@ -0,0 +1,12 @@
+#ifndef GUARD_SEA_COTTAGE_SPECIAL_ANIM_H
+#define GUARD_SEA_COTTAGE_SPECIAL_ANIM_H
+
+#include "global.h"
+
+void sub_809C448(u8 a0);
+void sub_809C460(void);
+bool8 sub_809C474(void);
+void sub_809C4A8(void);
+void sub_809C5FC(void);
+
+#endif // GUARD_SEA_COTTAGE_SPECIAL_ANIM_H
diff --git a/include/shop.h b/include/shop.h
index 481fd6c76..482c3ddaa 100644
--- a/include/shop.h
+++ b/include/shop.h
@@ -4,18 +4,20 @@
#include "global.h"
#include "menu_helpers.h"
+#define INDEX_CANCEL -2
+
extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3];
-void CreatePokemartMenu(const u16 *);
+void CreatePokemartMenu(const u16 *itemsForSale);
void CreateDecorationShop1Menu(const u16 *);
void CreateDecorationShop2Menu(const u16 *);
-void sub_809C09C(u16, u16, u8);
-u8 sub_809B56C(void);
+u8 GetMartUnk16_4(void);
+void RecordItemPurchase(u16 a0, u16 a1, u8 a2);
// buy_menu_helper
void BuyMenuInitWindows(bool32 isSellingTM);
void BuyMenuDrawMoneyBox(void);
-void BuyMenuPrint(u8 windowId, u8 font, const u8 *text, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, s8 speed, u8 color);
+void BuyMenuPrint(u8 windowId, u8 font, const u8 *text, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 color);
void BuyMenuDisplayMessage(u8 taskId, const u8 *text, TaskFunc callback);
void BuyMenuQuantityBoxNormalBorder(u8 windowId, bool8 copyToVram);
void BuyMenuQuantityBoxThinBorder(u8 windowId, bool8 copyToVram);
diff --git a/include/strings.h b/include/strings.h
index e55cb02f5..d71d94d48 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -97,6 +97,7 @@ extern const u8 gOtherText_Toss[];
extern const u8 gOtherText_Give[];
extern const u8 gOtherText_Exit[];
extern const u8 gText_ThreeHyphens[];
+extern const u8 gText_SevenHyphens[];
extern const u8 gOtherText_UnkF9_08_Clear_01[];
extern const u8 gText_TimesStrVar1[];
extern const u8 gText_IsSelected[];
@@ -928,4 +929,18 @@ extern const u8 gText_CongratsPkmnEvolved[];
extern const u8 gText_EllipsisQuestionMark[];
extern const u8 gText_PkmnStoppedEvolving[];
+// shop
+extern const u8 gText_ShopBuy[];
+extern const u8 gText_ShopSell[];
+extern const u8 gText_ShopQuit[];
+extern const u8 gText_CanIHelpWithAnythingElse[];
+extern const u8 gText_QuitShopping[];
+extern const u8 gText_PokedollarVar1[];
+extern const u8 gText_YouDontHaveMoney[];
+extern const u8 gText_Var1CertainlyHowMany[];
+extern const u8 gText_InBagVar1[];
+extern const u8 gText_Var1AndYouWantedVar2[];
+extern const u8 gText_HereYouGoThankYou[];
+extern const u8 gText_NoMoreRoomForThis[];
+
#endif //GUARD_STRINGS_H
diff --git a/include/task.h b/include/task.h
index 834bb5655..7a7a2ff22 100644
--- a/include/task.h
+++ b/include/task.h
@@ -10,13 +10,13 @@ typedef void (*TaskFunc)(u8 taskId);
struct Task
{
- TaskFunc func;
- bool8 isActive;
- u8 prev;
- u8 next;
- u8 priority;
- s16 data[16];
-};
+ /*0x00*/ TaskFunc func;
+ /*0x04*/ bool8 isActive;
+ /*0x05*/ u8 prev;
+ /*0x06*/ u8 next;
+ /*0x07*/ u8 priority;
+ /*0x08*/ s16 data[16];
+}; /*size = 0x28*/
extern struct Task gTasks[];