From 05724d3db1208ffdb867aba5aa9441d538ba9e26 Mon Sep 17 00:00:00 2001 From: Evan Date: Sat, 16 Nov 2019 19:45:55 -0700 Subject: remove compile errors --- include/global.h | 10 +++++----- include/strings.h | 11 +++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 2f34de1a0..63c6923bd 100644 --- a/include/global.h +++ b/include/global.h @@ -291,11 +291,11 @@ struct SaveBlock2 /*0x012*/ u8 playTimeVBlanks; /*0x013*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] /*0x014*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] - u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes - u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO] - u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] - u16 optionsBattleSceneOff:1; // whether battle animations are disabled - u16 regionMapZoom:1; // whether the map is zoomed in + u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes + /*0x15*/ u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO] + u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] + u16 optionsBattleSceneOff:1; // whether battle animations are disabled + u16 regionMapZoom:1; // whether the map is zoomed in /*0x018*/ struct Pokedex pokedex; /*0x090*/ u8 filler_90[0x8]; /*0x098*/ struct Time localTimeOffset; diff --git a/include/strings.h b/include/strings.h index 377b6ea39..286a65190 100644 --- a/include/strings.h +++ b/include/strings.h @@ -763,4 +763,15 @@ extern const u8 gText_DecimalPoint[]; // map_name_popup extern const u8 gUnknown_841D18D[]; +// options menu +extern const u8 gText_TextSpeed[]; +extern const u8 gText_BattleScene[]; +extern const u8 gText_BattleStyle[]; +extern const u8 gText_Sound[]; +extern const u8 gText_ButtonMode[]; +extern const u8 gText_Frame[]; +extern const u8 gText_OptionMenuCancel[]; +extern const u8 gText_PickSwitchCancel[]; + + #endif //GUARD_STRINGS_H -- cgit v1.2.3 From b58554b9aebf7b8d6cebf682020a267c981bd5a0 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 18 Nov 2019 15:21:22 -0700 Subject: matching up to sub_8088D8C --- include/menu_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/menu_helpers.h b/include/menu_helpers.h index 6ea771500..8d042825c 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -12,7 +12,7 @@ struct YesNoFuncTable }; bool16 RunTextPrinters_CheckActive(u8 textPrinterId); -bool8 sub_80BF72C(void); +bool32 sub_80BF72C(void); bool8 sub_80BF748(void); bool8 MenuHelpers_LinkSomething(void); void SetVBlankHBlankCallbacksToNull(void); -- cgit v1.2.3 From cb5dc21a4e8fecbffcb46e34782d9db3b21ccb13 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 18 Nov 2019 21:03:51 -0700 Subject: matching rom --- include/menu_helpers.h | 2 +- include/strings.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/menu_helpers.h b/include/menu_helpers.h index 8d042825c..6ea771500 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -12,7 +12,7 @@ struct YesNoFuncTable }; bool16 RunTextPrinters_CheckActive(u8 textPrinterId); -bool32 sub_80BF72C(void); +bool8 sub_80BF72C(void); bool8 sub_80BF748(void); bool8 MenuHelpers_LinkSomething(void); void SetVBlankHBlankCallbacksToNull(void); diff --git a/include/strings.h b/include/strings.h index 286a65190..9d4d26ba1 100644 --- a/include/strings.h +++ b/include/strings.h @@ -771,6 +771,20 @@ extern const u8 gText_Sound[]; extern const u8 gText_ButtonMode[]; extern const u8 gText_Frame[]; extern const u8 gText_OptionMenuCancel[]; +extern const u8 gText_TextSpeedSlow[]; +extern const u8 gText_TextSpeedMid[]; +extern const u8 gText_TextSpeedFast[]; +extern const u8 gText_BattleSceneOn[]; +extern const u8 gText_BattleSceneOff[]; +extern const u8 gText_BattleStyleShift[]; +extern const u8 gText_BattleStyleSet[]; +extern const u8 gText_SoundMono[]; +extern const u8 gText_SoundStereo[]; +extern const u8 gText_ButtonTypeNormal[]; +extern const u8 gText_ButtonTypeLR[]; +extern const u8 gText_ButtonTypeLEqualsA[]; +extern const u8 gText_MenuOptionOption[]; +extern const u8 gText_FrameType[]; extern const u8 gText_PickSwitchCancel[]; -- cgit v1.2.3 From 5bb5d38d225d4ea426b6bf90778a10cb42cb84d4 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 18 Nov 2019 21:41:45 -0700 Subject: match baserom --- include/strings.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/strings.h b/include/strings.h index 9d4d26ba1..89149a8eb 100644 --- a/include/strings.h +++ b/include/strings.h @@ -763,7 +763,7 @@ extern const u8 gText_DecimalPoint[]; // map_name_popup extern const u8 gUnknown_841D18D[]; -// options menu +// option menu extern const u8 gText_TextSpeed[]; extern const u8 gText_BattleScene[]; extern const u8 gText_BattleStyle[]; @@ -787,5 +787,4 @@ extern const u8 gText_MenuOptionOption[]; extern const u8 gText_FrameType[]; extern const u8 gText_PickSwitchCancel[]; - #endif //GUARD_STRINGS_H -- cgit v1.2.3 From 79b2bc17124bf69ce6486ff7db60798454ba538c Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 19 Nov 2019 09:46:10 -0700 Subject: update option menu const structs --- include/text.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/text.h b/include/text.h index c4199190f..578a0d735 100644 --- a/include/text.h +++ b/include/text.h @@ -81,6 +81,19 @@ #define TEXT_COLOR_TRANSPARENT 0x0 #define TEXT_COLOR_WHITE 0x1 #define TEXT_COLOR_DARK_GREY 0x2 +#define TEXT_COLOR_LIGHT_GREY 0x3 +#define TEXT_COLOR_RED 0x4 +#define TEXT_COLOR_LIGHT_RED 0x5 +#define TEXT_COLOR_GREEN 0x6 +#define TEXT_COLOR_LIGHT_GREEN 0x7 +#define TEXT_COLOR_BLUE 0x8 +#define TEXT_COLOR_LIGHT_BLUE 0x9 +#define TEXT_DYNAMIC_COLOR_1 0xA // Usually white +#define TEXT_DYNAMIC_COLOR_2 0xB // Usually white w/ tinge of green +#define TEXT_DYNAMIC_COLOR_3 0xC // Usually white +#define TEXT_DYNAMIC_COLOR_4 0xD // Usually aquamarine +#define TEXT_DYNAMIC_COLOR_5 0xE // Usually blue-green +#define TEXT_DYNAMIC_COLOR_6 0xF // Usually cerulean // battle placeholders are located in battle_message.h #define EXT_CTRL_CODE_COLOR 0x1 -- cgit v1.2.3 From d84cf59678d75c50896ba46b3047c65ea5e106d9 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 19 Nov 2019 09:55:31 -0700 Subject: fix tab vs space format --- include/global.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 63c6923bd..744d23eb3 100644 --- a/include/global.h +++ b/include/global.h @@ -291,11 +291,11 @@ struct SaveBlock2 /*0x012*/ u8 playTimeVBlanks; /*0x013*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] /*0x014*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] - u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes + u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes /*0x15*/ u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO] - u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] - u16 optionsBattleSceneOff:1; // whether battle animations are disabled - u16 regionMapZoom:1; // whether the map is zoomed in + u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] + u16 optionsBattleSceneOff:1; // whether battle animations are disabled + u16 regionMapZoom:1; // whether the map is zoomed in /*0x018*/ struct Pokedex pokedex; /*0x090*/ u8 filler_90[0x8]; /*0x098*/ struct Time localTimeOffset; -- cgit v1.2.3 From 2cc4db0c786e20c1ef9823d0d0a027f39dfef9f3 Mon Sep 17 00:00:00 2001 From: Evan Date: Sun, 24 Nov 2019 16:23:06 -0700 Subject: remove .s files --- include/list_menu.h | 38 +++++++++++++++++++------------------- include/shop.h | 31 ++++++++++++++++++++++++++++--- include/strings.h | 15 +++++++++++++++ 3 files changed, 62 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index df53bb529..54e598d2a 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/shop.h b/include/shop.h index 481fd6c76..129839e33 100644 --- a/include/shop.h +++ b/include/shop.h @@ -4,18 +4,43 @@ #include "global.h" #include "menu_helpers.h" +#define MENU_NOTHING_CHOSEN -2 +#define MENU_B_PRESSED -1 + +#define INDEX_CANCEL -2 + +#define NUM_CHARS_PRICE 4 + +// shop view window NPC info enum +enum +{ + EVENT_OBJ_ID, + X_COORD, + Y_COORD, + ANIM_NUM +}; + 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); +void sub_809C09C(u16 a0, u16 a1, u8 a2); + +// wrong file +void sub_809C1D8(u8 taskId, const u16* a1, u16 a2); +void sub_809C448(u8 a0); +void sub_809C460(void); +bool8 sub_809C474(void); +void sub_809C4A8(void); +void sub_809C5FC(void); + // 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 7750b271c..29caabae4 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[]; @@ -794,4 +795,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 -- cgit v1.2.3 From e6a882cc920077f7e555714983a8835fbbe3e4bd Mon Sep 17 00:00:00 2001 From: Evan Date: Sun, 24 Nov 2019 17:22:02 -0700 Subject: separate sea cottage anim functions --- include/sea_cottage.h | 13 +++++++++++++ include/shop.h | 9 --------- 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 include/sea_cottage.h (limited to 'include') diff --git a/include/sea_cottage.h b/include/sea_cottage.h new file mode 100644 index 000000000..dce6862ff --- /dev/null +++ b/include/sea_cottage.h @@ -0,0 +1,13 @@ +#ifdndef GUARD_SEA_COTTAGE_H +#define GUARD_SEA_COTTAGE_H + +#include "global.h" + +void sub_809C1D8(u8 taskId, const u16* a1, u16 a2); +void sub_809C448(u8 a0); +void sub_809C460(void); +bool8 sub_809C474(void); +void sub_809C4A8(void); +void sub_809C5FC(void); + +#endif // GUARD_SHOP_H \ No newline at end of file diff --git a/include/shop.h b/include/shop.h index 129839e33..27014580d 100644 --- a/include/shop.h +++ b/include/shop.h @@ -28,15 +28,6 @@ void CreateDecorationShop2Menu(const u16 *); u8 sub_809B56C(void); void sub_809C09C(u16 a0, u16 a1, u8 a2); -// wrong file -void sub_809C1D8(u8 taskId, const u16* a1, u16 a2); -void sub_809C448(u8 a0); -void sub_809C460(void); -bool8 sub_809C474(void); -void sub_809C4A8(void); -void sub_809C5FC(void); - - // buy_menu_helper void BuyMenuInitWindows(bool32 isSellingTM); void BuyMenuDrawMoneyBox(void); -- cgit v1.2.3 From c73f061cc68468c3227be98fd49cba9514bbd567 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 25 Nov 2019 15:04:38 -0700 Subject: update ewram --- include/shop.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/shop.h b/include/shop.h index 27014580d..91ce421aa 100644 --- a/include/shop.h +++ b/include/shop.h @@ -11,22 +11,13 @@ #define NUM_CHARS_PRICE 4 -// shop view window NPC info enum -enum -{ - EVENT_OBJ_ID, - X_COORD, - Y_COORD, - ANIM_NUM -}; - extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3]; void CreatePokemartMenu(const u16 *itemsForSale); void CreateDecorationShop1Menu(const u16 *); void CreateDecorationShop2Menu(const u16 *); -u8 sub_809B56C(void); -void sub_809C09C(u16 a0, u16 a1, u8 a2); +u8 GetMartUnk16_4(void); +void RecordItemPurchase(u16 a0, u16 a1, u8 a2); // buy_menu_helper void BuyMenuInitWindows(bool32 isSellingTM); -- cgit v1.2.3 From d1142b4290e8688a0d42bfc1b95b9d90b1721459 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 26 Nov 2019 11:47:12 -0700 Subject: extract graphics data --- include/graphics.h | 6 ++++++ include/sea_cottage.h | 1 - include/shop.h | 2 -- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index 354339235..559036ef7 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4239,4 +4239,10 @@ 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[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/sea_cottage.h b/include/sea_cottage.h index dce6862ff..d9885edd5 100644 --- a/include/sea_cottage.h +++ b/include/sea_cottage.h @@ -3,7 +3,6 @@ #include "global.h" -void sub_809C1D8(u8 taskId, const u16* a1, u16 a2); void sub_809C448(u8 a0); void sub_809C460(void); bool8 sub_809C474(void); diff --git a/include/shop.h b/include/shop.h index 91ce421aa..75e1f7298 100644 --- a/include/shop.h +++ b/include/shop.h @@ -9,8 +9,6 @@ #define INDEX_CANCEL -2 -#define NUM_CHARS_PRICE 4 - extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3]; void CreatePokemartMenu(const u16 *itemsForSale); -- cgit v1.2.3 From d81a67ea2d4486827e0cb2c066a8d7ae4682ec27 Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 28 Nov 2019 11:04:49 -0500 Subject: fix nonmatchings --- include/sea_cottage.h | 12 ------------ include/sea_cottage_special_anim.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 include/sea_cottage.h create mode 100644 include/sea_cottage_special_anim.h (limited to 'include') diff --git a/include/sea_cottage.h b/include/sea_cottage.h deleted file mode 100644 index bba6286ff..000000000 --- a/include/sea_cottage.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifdndef GUARD_SEA_COTTAGE_H -#define GUARD_SEA_COTTAGE_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_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 -- cgit v1.2.3