From 8ecf3b2159efbbd760fcf8fc6a16990bd409269f Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 1 Sep 2018 17:15:35 -0500 Subject: Start decompiling shop.c --- include/shop.h | 34 ++++++++++++++++++++++++++++++++++ include/strings.h | 7 +++++-- include/tv.h | 1 + 3 files changed, 40 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/shop.h b/include/shop.h index 9b14a672e..d7822ec31 100644 --- a/include/shop.h +++ b/include/shop.h @@ -3,6 +3,40 @@ extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3]; +enum +{ + MART_TYPE_0, // normal mart + MART_TYPE_1, + MART_TYPE_2, +}; + +struct MartInfo +{ + /*0x0*/ void (* callback) (void); + /*0x4*/ const struct MenuAction *menuActions; + /*0x8*/ const u16 *itemList; + /*0xC*/ u16 itemCount; + /*0xE*/ u8 windowId; + /*0xF*/ u8 martType; +}; + +struct BuyMenuLabel +{ + u8 label[16]; +}; + +struct ShopData +{ + /*0x0000*/ u8 filler0[0x2004]; + /*0x2004*/ u16 unk2004; + /*0x2006*/ u8 filler2006[0x5]; + /*0x200B*/ u8 unk200B; + /*0x200C*/ u8 unk200C; + /*0x200D*/ s8 unk200D; + /*0x200E*/ s8 unk200E; + /*0x200F*/ u8 filler200F[0xA1]; +}; + void CreatePokemartMenu(const u16 *); void CreateDecorationShop1Menu(const u16 *); void CreateDecorationShop2Menu(const u16 *); diff --git a/include/strings.h b/include/strings.h index e72360563..0515f953f 100644 --- a/include/strings.h +++ b/include/strings.h @@ -151,8 +151,6 @@ extern const u8 gMenuText_Confirm[]; extern const u8 gMenuText_Show[]; extern const u8 gMenuText_Give2[]; -extern const u8 gText_Cancel2[]; - extern const u8 gText_WithdrawPokemon[]; extern const u8 gText_WithdrawMonDescription[]; extern const u8 gText_DepositPokemon[]; @@ -843,4 +841,9 @@ extern const u8 gText_TwoDashes[]; extern const u8 *const gReturnToXStringsTable2[]; +extern const u8 gText_CanIHelpWithAnythingElse[]; +extern const u8 gText_AnythingElseICanHelp[]; +extern const u8 gText_QuitShopping[]; +extern const u8 gText_PokedollarVar1[]; + #endif //GUARD_STRINGS_H diff --git a/include/tv.h b/include/tv.h index 7a938f888..4f1d7730f 100644 --- a/include/tv.h +++ b/include/tv.h @@ -50,5 +50,6 @@ void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlaye void BravoTrainerPokemonProfile_BeforeInterview1(u16 move); void UpdateTVScreensOnMap(int, int); void TV_PrintIntToStringVar(u8 varIdx, int value); +void SaveRecordedItemPurchasesForTVShow(void); #endif //GUARD_TV_H -- cgit v1.2.3 From fa9d1759bd7fa17ced37225bd31d46466da857c6 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 6 Sep 2018 11:37:45 -0500 Subject: checkpoint --- include/battle_pyramid_bag.h | 2 +- include/shop.h | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/battle_pyramid_bag.h b/include/battle_pyramid_bag.h index 5d5d8ccfa..2301b0aa0 100644 --- a/include/battle_pyramid_bag.h +++ b/include/battle_pyramid_bag.h @@ -11,7 +11,7 @@ struct PyramidBagResources u8 windowIds[5]; u8 unk814; u8 unk815; - u8 scrollArrowSpriteId; + u8 scrollIndicatorsTaskId; const u8 *menuActionIds; u8 filler81C[0x820 - 0x81C]; u8 menuActionsCount; diff --git a/include/shop.h b/include/shop.h index d7822ec31..067b8fee4 100644 --- a/include/shop.h +++ b/include/shop.h @@ -27,13 +27,15 @@ struct BuyMenuLabel struct ShopData { - /*0x0000*/ u8 filler0[0x2004]; + /*0x0000*/ u8 tilemapBuffers[4][0x800]; + /*0x2000*/ u8 filler2000[0x4]; /*0x2004*/ u16 unk2004; - /*0x2006*/ u8 filler2006[0x5]; - /*0x200B*/ u8 unk200B; + /*0x2006*/ u8 filler2006[0x2]; + /*0x2008*/ u16 unk2008; + /*0x200A*/ u8 filler200A; + /*0x200B*/ u8 scrollIndicatorsTaskId; /*0x200C*/ u8 unk200C; - /*0x200D*/ s8 unk200D; - /*0x200E*/ s8 unk200E; + /*0x200D*/ u8 unk200D[2]; /*0x200F*/ u8 filler200F[0xA1]; }; -- cgit v1.2.3