Document item_menu
This commit is contained in:
@@ -22001,7 +22001,7 @@ GetItemIconPic: @ 8096674
|
|||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
bl sub_8098974
|
bl GetItemIconGfxPtr
|
||||||
pop {r1}
|
pop {r1}
|
||||||
bx r1
|
bx r1
|
||||||
thumb_func_end GetItemIconPic
|
thumb_func_end GetItemIconPic
|
||||||
@@ -22012,7 +22012,7 @@ GetItemIconPalette: @ 8096684
|
|||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_8098974
|
bl GetItemIconGfxPtr
|
||||||
pop {r1}
|
pop {r1}
|
||||||
bx r1
|
bx r1
|
||||||
thumb_func_end GetItemIconPalette
|
thumb_func_end GetItemIconPalette
|
||||||
|
|||||||
@@ -1537,7 +1537,7 @@ EventScript_1A778C:: @ 81A778C
|
|||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
gUnknown_81A77A0:: @ 81A77A0
|
EventScript_BagItemCanBeRegistered:: @ 81A77A0
|
||||||
msgbox Text_BagItemCanBeRegistered, MSGBOX_SIGN
|
msgbox Text_BagItemCanBeRegistered, MSGBOX_SIGN
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -14004,11 +14004,11 @@ gUnknown_8E83444:: @ 8E83444
|
|||||||
.incbin "graphics/item_menu/bag_tilemap2.bin.lz" @ PC deposit items
|
.incbin "graphics/item_menu/bag_tilemap2.bin.lz" @ PC deposit items
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gUnknown_8E835B4:: @ 8E835B4
|
gBagBgPalette:: @ 8E835B4
|
||||||
.incbin "graphics/item_menu/bag_pal1.gbapal.lz" @ palette 1 (Boy + misc Pal)
|
.incbin "graphics/item_menu/bag_pal1.gbapal.lz" @ palette 1 (Boy + misc Pal)
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gUnknown_8E83604:: @ 8E83604
|
gBagBgPalette_FemaleOverride:: @ 8E83604
|
||||||
.incbin "graphics/item_menu/bag_pal2.gbapal.lz" @ palette 2 (Girl)
|
.incbin "graphics/item_menu/bag_pal2.gbapal.lz" @ palette 2 (Girl)
|
||||||
|
|
||||||
gUnknown_8E8362C:: @ 8E8362C
|
gUnknown_8E8362C:: @ 8E8362C
|
||||||
|
|||||||
+13
-13
@@ -3,18 +3,18 @@
|
|||||||
|
|
||||||
#include "menu_helpers.h"
|
#include "menu_helpers.h"
|
||||||
|
|
||||||
void sub_810B858(void);
|
void InitBagWindows(void);
|
||||||
void sub_810B8F0(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx);
|
void BagPrintTextOnWindow(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx);
|
||||||
void sub_810B958(const u8 * str, u8 unused);
|
void BagPrintTextOnWin1CenteredColor0(const u8 * str, u8 unused);
|
||||||
void sub_810B994(void);
|
void BagDrawDepositItemTextBox(void);
|
||||||
u8 sub_810B9DC(u8 a0, u8 a1);
|
u8 ShowBagWindow(u8 whichWindow, u8 nItems);
|
||||||
void sub_810BA3C(u8 a0);
|
void HideBagWindow(u8 whichWindow);
|
||||||
u8 sub_810BA70(u8 a0);
|
u8 OpenBagWindow(u8 whichWindow);
|
||||||
void sub_810BA9C(u8 a0);
|
void CloseBagWindow(u8 whichWindow);
|
||||||
u8 sub_810BAD8(u8 a0);
|
u8 GetBagWindow(u8 whichWindow);
|
||||||
void sub_810BAE8(u8 taskId, const struct YesNoFuncTable * ptrs);
|
void BagCreateYesNoMenuBottomRight(u8 taskId, const struct YesNoFuncTable * ptrs);
|
||||||
void sub_810BB14(u8 taskId, const struct YesNoFuncTable * ptrs);
|
void BagCreateYesNoMenuTopRight(u8 taskId, const struct YesNoFuncTable * ptrs);
|
||||||
void sub_810BB40(void);
|
void BagPrintMoneyAmount(void);
|
||||||
void sub_810BB74(u8 windowId);
|
void BagDrawTextBoxOnWindow(u8 windowId);
|
||||||
|
|
||||||
#endif //GUARD_BAG_H
|
#endif //GUARD_BAG_H
|
||||||
|
|||||||
@@ -1,6 +1,24 @@
|
|||||||
#ifndef GUARD_CONSTANTS_ITEM_MENU_H
|
#ifndef GUARD_CONSTANTS_ITEM_MENU_H
|
||||||
#define GUARD_CONSTANTS_ITEM_MENU_H
|
#define GUARD_CONSTANTS_ITEM_MENU_H
|
||||||
|
|
||||||
|
#define OPEN_BAG_ITEMS 0
|
||||||
|
#define OPEN_BAG_KEYITEMS 1
|
||||||
|
#define OPEN_BAG_POKEBALLS 2
|
||||||
|
#define OPEN_BAG_LAST 3
|
||||||
|
|
||||||
|
#define ITEMMENULOCATION_FIELD 0
|
||||||
|
#define ITEMMENULOCATION_PARTY 1
|
||||||
|
#define ITEMMENULOCATION_SHOP 2
|
||||||
|
#define ITEMMENULOCATION_ITEMPC 3
|
||||||
|
#define ITEMMENULOCATION_PCBOX 4
|
||||||
|
#define ITEMMENULOCATION_BATTLE 5
|
||||||
|
#define ITEMMENULOCATION_OLDMAN 6
|
||||||
|
#define ITEMMENULOCATION_TTVSCR_STATUS 7
|
||||||
|
#define ITEMMENULOCATION_TTVSCR_CATCHING 8
|
||||||
|
#define ITEMMENULOCATION_TTVSCR_REGISTER 9
|
||||||
|
#define ITEMMENULOCATION_TTVSCR_TMS 10
|
||||||
|
#define ITEMMENULOCATION_LAST 11
|
||||||
|
|
||||||
#define ITEMMENUACTION_USE 0
|
#define ITEMMENUACTION_USE 0
|
||||||
#define ITEMMENUACTION_TOSS 1
|
#define ITEMMENUACTION_TOSS 1
|
||||||
#define ITEMMENUACTION_REGISTER 2
|
#define ITEMMENUACTION_REGISTER 2
|
||||||
|
|||||||
@@ -1195,6 +1195,6 @@ extern const u8 Text_1A5D31[];
|
|||||||
extern const u8 Text_1A5D6E[];
|
extern const u8 Text_1A5D6E[];
|
||||||
extern const u8 Text_1A5DB1[];
|
extern const u8 Text_1A5DB1[];
|
||||||
|
|
||||||
extern const u8 gUnknown_81A77A0[];
|
extern const u8 EventScript_BagItemCanBeRegistered[];
|
||||||
|
|
||||||
#endif //GUARD_EVENT_SCRIPTS_H
|
#endif //GUARD_EVENT_SCRIPTS_H
|
||||||
|
|||||||
+2
-2
@@ -4861,7 +4861,7 @@ extern const u16 gUnknown_8D12404[];
|
|||||||
extern const u32 gUnknown_8E830CC[];
|
extern const u32 gUnknown_8E830CC[];
|
||||||
extern const u32 gUnknown_8E832C0[];
|
extern const u32 gUnknown_8E832C0[];
|
||||||
extern const u32 gUnknown_8E83444[];
|
extern const u32 gUnknown_8E83444[];
|
||||||
extern const u32 gUnknown_8E835B4[];
|
extern const u32 gBagBgPalette[];
|
||||||
extern const u32 gUnknown_8E83604[];
|
extern const u32 gBagBgPalette_FemaleOverride[];
|
||||||
|
|
||||||
#endif //GUARD_GRAPHICS_H
|
#endif //GUARD_GRAPHICS_H
|
||||||
|
|||||||
+10
-10
@@ -13,13 +13,13 @@ struct BagStruct
|
|||||||
{
|
{
|
||||||
void (*bagCallback)(void);
|
void (*bagCallback)(void);
|
||||||
u8 location;
|
u8 location;
|
||||||
u8 unk5;
|
u8 bagOpen;
|
||||||
u16 pocket;
|
u16 pocket;
|
||||||
u16 itemsAbove[3];
|
u16 itemsAbove[3];
|
||||||
u16 cursorPos[3];
|
u16 cursorPos[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct BagStruct gUnknown_203ACFC;
|
extern struct BagStruct gBagMenuState;
|
||||||
|
|
||||||
extern u16 gSpecialVar_ItemId;
|
extern u16 gSpecialVar_ItemId;
|
||||||
|
|
||||||
@@ -27,19 +27,19 @@ extern u16 gSpecialVar_ItemId;
|
|||||||
void sub_81AAC50(void);
|
void sub_81AAC50(void);
|
||||||
void sub_81AAC70(void);
|
void sub_81AAC70(void);
|
||||||
void CB2_SetUpReshowBattleScreenAfterMenu(void);
|
void CB2_SetUpReshowBattleScreenAfterMenu(void);
|
||||||
void sub_81089BC(void);
|
void ResetBagCursorPositions(void);
|
||||||
void sub_810B108(u8);
|
void InitPokeDudeBag(u8);
|
||||||
void CB2_BagMenuFromStartMenu(void);
|
void CB2_BagMenuFromStartMenu(void);
|
||||||
void MoveItemSlotInList(struct ItemSlot * itemSlots_, u32 from, u32 to_);
|
void MoveItemSlotInList(struct ItemSlot * itemSlots_, u32 from, u32 to_);
|
||||||
void ItemMenu_StartFadeToExitCallback(u8 taskId);
|
void ItemMenu_StartFadeToExitCallback(u8 taskId);
|
||||||
void sub_8108CB4(void);
|
void Bag_BeginCloseWin0Animation(void);
|
||||||
void ItemMenu_SetExitCallback(void (*)(void));
|
void ItemMenu_SetExitCallback(void (*)(void));
|
||||||
void DisplayItemMessageInBag(u8 taskId, u8 fontId, const u8 * string, TaskFunc followUpFunc);
|
void DisplayItemMessageInBag(u8 taskId, u8 fontId, const u8 * string, TaskFunc followUpFunc);
|
||||||
void sub_810A1F8(u8 taskId);
|
void Task_ReturnToBagFromContextMenu(u8 taskId);
|
||||||
void sub_8107ECC(void);
|
void CB2_BagMenuFromBattle(void);
|
||||||
void InitTutorialBag(void);
|
void InitOldManBag(void);
|
||||||
void sub_8108DC8(u8 pocketId);
|
void Pocket_CalculateNItemsAndMaxShowed(u8 pocketId);
|
||||||
void sub_81089F4(u8 pocketId);
|
void PocketCalculateInitialCursorPosAndItemsAbove(u8 pocketId);
|
||||||
void GoToBagMenu(u8 menuType, u8 pocket, MainCallback callback);
|
void GoToBagMenu(u8 menuType, u8 pocket, MainCallback callback);
|
||||||
|
|
||||||
#endif //GUARD_ITEM_MENU_H
|
#endif //GUARD_ITEM_MENU_H
|
||||||
|
|||||||
@@ -3,28 +3,26 @@
|
|||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
extern void * gUnknown_2039884;
|
extern const struct CompressedSpriteSheet gSpriteSheet_Backpack;
|
||||||
|
extern const struct CompressedSpriteSheet gSpriteSheet_Satchel;
|
||||||
extern const struct CompressedSpriteSheet gUnknown_83D41E4;
|
extern const struct CompressedSpritePalette gSpritePalette_BagOrSatchel;
|
||||||
extern const struct CompressedSpriteSheet gUnknown_83D41EC;
|
|
||||||
extern const struct CompressedSpritePalette gUnknown_83D41F4;
|
|
||||||
|
|
||||||
extern const struct CompressedSpriteSheet gBagSwapSpriteSheet;
|
extern const struct CompressedSpriteSheet gBagSwapSpriteSheet;
|
||||||
extern const struct CompressedSpritePalette gBagSwapSpritePalette;
|
extern const struct CompressedSpritePalette gBagSwapSpritePalette;
|
||||||
|
|
||||||
void ResetItemMenuIconState(void);
|
void ResetItemMenuIconState(void);
|
||||||
void sub_80985E4(void);
|
void ItemMenuIcons_CreateInsertIndicatorBarHidden(void);
|
||||||
void DestroyItemMenuIcon(bool8 a0);
|
void DestroyItemMenuIcon(bool8 a0);
|
||||||
void CreateItemMenuIcon(u16 itemId, bool8 a0);
|
void CreateItemMenuIcon(u16 itemId, bool8 a0);
|
||||||
void CopyItemIconPicTo4x4Buffer(const void *src, void *dest);
|
void CopyItemIconPicTo4x4Buffer(const void *src, void *dest);
|
||||||
u8 AddItemIconObject(u16 tilesTag, u16 paletteTag, u16 itemId);
|
u8 AddItemIconObject(u16 tilesTag, u16 paletteTag, u16 itemId);
|
||||||
u8 AddItemIconObjectWithCustomObjectTemplate(const struct SpriteTemplate * origTemplate, u16 tilesTag, u16 paletteTag, u16 itemId);
|
u8 AddItemIconObjectWithCustomObjectTemplate(const struct SpriteTemplate * origTemplate, u16 tilesTag, u16 paletteTag, u16 itemId);
|
||||||
void sub_80989A0(u16 itemId, u8 idx);
|
void sub_80989A0(u16 itemId, u8 idx);
|
||||||
void sub_80986A8(s16 x, u16 y);
|
void ItemMenuIcons_MoveInsertIndicatorBar(s16 x, u16 y);
|
||||||
void sub_8098660(u8);
|
void ItemMenuIcons_ToggleInsertIndicatorBarVisibility(bool8 invisible);
|
||||||
void sub_8098528(u8);
|
void sub_8098528(u8);
|
||||||
void sub_8098580(void);
|
void sub_8098580(void);
|
||||||
const void * sub_8098974(u16 itemId, u8 ptrId);
|
const void * GetItemIconGfxPtr(u16 itemId, u8 ptrId);
|
||||||
void sub_80984FC(u8 animNum);
|
void CreateBagOrSatchelSprite(u8 animNum);
|
||||||
|
|
||||||
#endif // GUARD_ITEM_MENU_ICONS
|
#endif // GUARD_ITEM_MENU_ICONS
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ bool8 sub_80BF748(void);
|
|||||||
bool8 MenuHelpers_LinkSomething(void);
|
bool8 MenuHelpers_LinkSomething(void);
|
||||||
void SetVBlankHBlankCallbacksToNull(void);
|
void SetVBlankHBlankCallbacksToNull(void);
|
||||||
void ResetAllBgsCoordinatesAndBgCntRegs(void);
|
void ResetAllBgsCoordinatesAndBgCntRegs(void);
|
||||||
u8 sub_80BF8E4(void);
|
u8 GetDialogBoxFontId(void);
|
||||||
bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1);
|
bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1);
|
||||||
void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 tileNum, u8 paletteNum, u8 fontId, u8 textSpeed, const u8 *string, void *taskFunc);
|
void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 tileNum, u8 paletteNum, u8 fontId, u8 textSpeed, const u8 *string, void *taskFunc);
|
||||||
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 fontId, u8 left, u8 top, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
|
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 fontId, u8 left, u8 top, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
|
||||||
|
|||||||
@@ -1038,6 +1038,9 @@ extern const u8 gText_SaveFailedScreen_CheckingBackupMemory[];
|
|||||||
extern const u8 gText_SaveFailedScreen_BackupMemoryDamaged[];
|
extern const u8 gText_SaveFailedScreen_BackupMemoryDamaged[];
|
||||||
extern const u8 gText_SaveFailedScreen_SaveCompleted[];
|
extern const u8 gText_SaveFailedScreen_SaveCompleted[];
|
||||||
|
|
||||||
|
// bag
|
||||||
|
extern const u8 gText_DepositItem[];
|
||||||
|
|
||||||
// item_menu
|
// item_menu
|
||||||
extern const u8 gOtherText_Register[];
|
extern const u8 gOtherText_Register[];
|
||||||
extern const u8 gOtherText_Walk[];
|
extern const u8 gOtherText_Walk[];
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
#ifndef GUARD_TEACHY_TV_H
|
#ifndef GUARD_TEACHY_TV_H
|
||||||
#define GUARD_TEACHY_TV_H
|
#define GUARD_TEACHY_TV_H
|
||||||
|
|
||||||
|
enum TeachyTvScript
|
||||||
|
{
|
||||||
|
TTVSCR_BATTLE,
|
||||||
|
TTVSCR_STATUS,
|
||||||
|
TTVSCR_MATCHUPS,
|
||||||
|
TTVSCR_CATCHING,
|
||||||
|
TTVSCR_TMS,
|
||||||
|
TTVSCR_REGISTER
|
||||||
|
};
|
||||||
|
|
||||||
void InitTeachyTvController(u8 mode, void (*cb)());
|
void InitTeachyTvController(u8 mode, void (*cb)());
|
||||||
void CB2_ReturnToTeachyTV(void);
|
void CB2_ReturnToTeachyTV(void);
|
||||||
void SetTeachyTvControllerModeToResume(void);
|
void SetTeachyTvControllerModeToResume(void);
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
#ifndef GUARD_TM_CASE_H
|
#ifndef GUARD_TM_CASE_H
|
||||||
#define GUARD_TM_CASE_H
|
#define GUARD_TM_CASE_H
|
||||||
|
|
||||||
|
enum TmCaseType
|
||||||
|
{
|
||||||
|
TMCASE_FROMFIELD,
|
||||||
|
TMCASE_FROMPARTYGIVE,
|
||||||
|
TMCASE_FROMMARTSELL,
|
||||||
|
TMCASE_FROMPOKEMONSTORAGEPC,
|
||||||
|
TMCASE_FROMBATTLE,
|
||||||
|
TMCASE_NA
|
||||||
|
};
|
||||||
|
|
||||||
void InitTMCase(u8 a0, void (* a1)(void), u8 a2);
|
void InitTMCase(u8 a0, void (* a1)(void), u8 a2);
|
||||||
void ResetTMCaseCursorPos(void);
|
void ResetTMCaseCursorPos(void);
|
||||||
void PokeDude_InitTMCase(void);
|
void PokeDude_InitTMCase(void);
|
||||||
|
|||||||
@@ -10,17 +10,18 @@
|
|||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "money.h"
|
#include "money.h"
|
||||||
#include "bag.h"
|
#include "bag.h"
|
||||||
|
#include "strings.h"
|
||||||
|
|
||||||
extern const u8 gText_DepositItem[];
|
static const u16 sBagWindowPalF[] = INCBIN_U16("data/bag/bag_window_pal.gbapal");
|
||||||
|
|
||||||
const u16 gUnknown_8453098[] = INCBIN_U16("data/bag/bag_window_pal.gbapal");
|
static const u8 sTextColors[][3] = {
|
||||||
const u8 gUnknown_84530B8[][3] = {
|
|
||||||
{0, 1, 2},
|
{0, 1, 2},
|
||||||
{0, 2, 3},
|
{0, 2, 3},
|
||||||
{0, 3, 2},
|
{0, 3, 2},
|
||||||
{0, 8, 9}
|
{0, 8, 9}
|
||||||
};
|
};
|
||||||
const struct WindowTemplate gUnknown_84530C4[] = {
|
|
||||||
|
const struct WindowTemplate sDefaultBagWindowsStd[] = {
|
||||||
{
|
{
|
||||||
.bg = 0,
|
.bg = 0,
|
||||||
.tilemapLeft = 0x0b,
|
.tilemapLeft = 0x0b,
|
||||||
@@ -47,7 +48,8 @@ const struct WindowTemplate gUnknown_84530C4[] = {
|
|||||||
.baseBlock = 0x01f8
|
.baseBlock = 0x01f8
|
||||||
}, DUMMY_WIN_TEMPLATE
|
}, DUMMY_WIN_TEMPLATE
|
||||||
};
|
};
|
||||||
const struct WindowTemplate gUnknown_84530E4[] = {
|
|
||||||
|
const struct WindowTemplate sDefaultBagWindowsDeposit[] = {
|
||||||
{
|
{
|
||||||
.bg = 0,
|
.bg = 0,
|
||||||
.tilemapLeft = 0x0b,
|
.tilemapLeft = 0x0b,
|
||||||
@@ -74,7 +76,8 @@ const struct WindowTemplate gUnknown_84530E4[] = {
|
|||||||
.baseBlock = 0x01f8
|
.baseBlock = 0x01f8
|
||||||
}, DUMMY_WIN_TEMPLATE
|
}, DUMMY_WIN_TEMPLATE
|
||||||
};
|
};
|
||||||
const struct WindowTemplate gUnknown_8453104[] = {
|
|
||||||
|
const struct WindowTemplate sWindowTemplates[] = {
|
||||||
{
|
{
|
||||||
.bg = 0,
|
.bg = 0,
|
||||||
.tilemapLeft = 24,
|
.tilemapLeft = 24,
|
||||||
@@ -99,122 +102,114 @@ const struct WindowTemplate gUnknown_8453104[] = {
|
|||||||
.height = 3,
|
.height = 3,
|
||||||
.paletteNum = 0xC,
|
.paletteNum = 0xC,
|
||||||
.baseBlock = 0x272
|
.baseBlock = 0x272
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 23,
|
||||||
|
.tilemapTop = 15,
|
||||||
|
.width = 6,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xF,
|
||||||
|
.baseBlock = 0x28a
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 21,
|
||||||
|
.tilemapTop = 9,
|
||||||
|
.width = 6,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xF,
|
||||||
|
.baseBlock = 0x28a
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 2,
|
||||||
|
.tilemapTop = 15,
|
||||||
|
.width = 26,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xF,
|
||||||
|
.baseBlock = 0x2a2
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 6,
|
||||||
|
.tilemapTop = 15,
|
||||||
|
.width = 14,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xC,
|
||||||
|
.baseBlock = 0x2a2
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 6,
|
||||||
|
.tilemapTop = 15,
|
||||||
|
.width = 15,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xC,
|
||||||
|
.baseBlock = 0x2da
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 6,
|
||||||
|
.tilemapTop = 15,
|
||||||
|
.width = 16,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xC,
|
||||||
|
.baseBlock = 0x316
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 6,
|
||||||
|
.tilemapTop = 15,
|
||||||
|
.width = 23,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xC,
|
||||||
|
.baseBlock = 0x356
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 22,
|
||||||
|
.tilemapTop = 17,
|
||||||
|
.width = 7,
|
||||||
|
.height = 2,
|
||||||
|
.paletteNum = 0xF,
|
||||||
|
.baseBlock = 0x20a
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 22,
|
||||||
|
.tilemapTop = 15,
|
||||||
|
.width = 7,
|
||||||
|
.height = 4,
|
||||||
|
.paletteNum = 0xF,
|
||||||
|
.baseBlock = 0x20a
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 22,
|
||||||
|
.tilemapTop = 13,
|
||||||
|
.width = 7,
|
||||||
|
.height = 6,
|
||||||
|
.paletteNum = 0xF,
|
||||||
|
.baseBlock = 0x20a
|
||||||
|
}, {
|
||||||
|
.bg = 0,
|
||||||
|
.tilemapLeft = 22,
|
||||||
|
.tilemapTop = 11,
|
||||||
|
.width = 7,
|
||||||
|
.height = 8,
|
||||||
|
.paletteNum = 0xF,
|
||||||
|
.baseBlock = 0x20a
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct WindowTemplate gUnknown_845311C = {
|
static const u8 sUnused_8453174[] = {16, 8, 4};
|
||||||
.bg = 0,
|
|
||||||
.tilemapLeft = 23,
|
|
||||||
.tilemapTop = 15,
|
|
||||||
.width = 6,
|
|
||||||
.height = 4,
|
|
||||||
.paletteNum = 0xF,
|
|
||||||
.baseBlock = 0x28a
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct WindowTemplate gUnknown_8453124 = {
|
static EWRAM_DATA u8 sOpenWindows[11] = {};
|
||||||
.bg = 0,
|
|
||||||
.tilemapLeft = 21,
|
|
||||||
.tilemapTop = 9,
|
|
||||||
.width = 6,
|
|
||||||
.height = 4,
|
|
||||||
.paletteNum = 0xF,
|
|
||||||
.baseBlock = 0x28a
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct WindowTemplate gUnknown_845312C[] = {
|
void InitBagWindows(void)
|
||||||
{
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x02,
|
|
||||||
.tilemapTop = 0x0f,
|
|
||||||
.width = 0x1a,
|
|
||||||
.height = 0x04,
|
|
||||||
.paletteNum = 0x0f,
|
|
||||||
.baseBlock = 0x02a2
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x06,
|
|
||||||
.tilemapTop = 0x0f,
|
|
||||||
.width = 0x0e,
|
|
||||||
.height = 0x04,
|
|
||||||
.paletteNum = 0x0c,
|
|
||||||
.baseBlock = 0x02a2
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x06,
|
|
||||||
.tilemapTop = 0x0f,
|
|
||||||
.width = 0x0f,
|
|
||||||
.height = 0x04,
|
|
||||||
.paletteNum = 0x0c,
|
|
||||||
.baseBlock = 0x02da
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x06,
|
|
||||||
.tilemapTop = 0x0f,
|
|
||||||
.width = 0x10,
|
|
||||||
.height = 0x04,
|
|
||||||
.paletteNum = 0x0c,
|
|
||||||
.baseBlock = 0x0316
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x06,
|
|
||||||
.tilemapTop = 0x0f,
|
|
||||||
.width = 0x17,
|
|
||||||
.height = 0x04,
|
|
||||||
.paletteNum = 0x0c,
|
|
||||||
.baseBlock = 0x0356
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x16,
|
|
||||||
.tilemapTop = 0x11,
|
|
||||||
.width = 0x07,
|
|
||||||
.height = 0x02,
|
|
||||||
.paletteNum = 0x0f,
|
|
||||||
.baseBlock = 0x020a
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x16,
|
|
||||||
.tilemapTop = 0x0f,
|
|
||||||
.width = 0x07,
|
|
||||||
.height = 0x04,
|
|
||||||
.paletteNum = 0x0f,
|
|
||||||
.baseBlock = 0x020a
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x16,
|
|
||||||
.tilemapTop = 0x0d,
|
|
||||||
.width = 0x07,
|
|
||||||
.height = 0x06,
|
|
||||||
.paletteNum = 0x0f,
|
|
||||||
.baseBlock = 0x020a
|
|
||||||
}, {
|
|
||||||
.bg = 0x00,
|
|
||||||
.tilemapLeft = 0x16,
|
|
||||||
.tilemapTop = 0x0b,
|
|
||||||
.width = 0x07,
|
|
||||||
.height = 0x08,
|
|
||||||
.paletteNum = 0x0f,
|
|
||||||
.baseBlock = 0x020a
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const u8 gUnknown_8453174[] = {16, 8, 4};
|
|
||||||
|
|
||||||
EWRAM_DATA u8 gUnknown_203AD34[11] = {};
|
|
||||||
|
|
||||||
void sub_810B858(void)
|
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
if (gUnknown_203ACFC.location != 3)
|
if (gBagMenuState.location != 3)
|
||||||
InitWindows(gUnknown_84530C4);
|
InitWindows(sDefaultBagWindowsStd);
|
||||||
else
|
else
|
||||||
InitWindows(gUnknown_84530E4);
|
InitWindows(sDefaultBagWindowsDeposit);
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
TextWindow_SetUserSelectedFrame(0, 0x64, 0xE0);
|
TextWindow_SetUserSelectedFrame(0, 0x64, 0xE0);
|
||||||
TextWindow_LoadResourcesStdFrame0(0, 0x6D, 0xD0);
|
TextWindow_LoadResourcesStdFrame0(0, 0x6D, 0xD0);
|
||||||
TextWindow_SetStdFrame0_WithPal(0, 0x81, 0xC0);
|
TextWindow_SetStdFrame0_WithPal(0, 0x81, 0xC0);
|
||||||
LoadPalette(gUnknown_8453098, 0xF0, 0x20);
|
LoadPalette(sBagWindowPalF, 0xF0, 0x20);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(i, 0x00);
|
FillWindowPixelBuffer(i, 0x00);
|
||||||
@@ -223,22 +218,22 @@ void sub_810B858(void)
|
|||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
for (i = 0; i < 11; i++)
|
for (i = 0; i < 11; i++)
|
||||||
{
|
{
|
||||||
gUnknown_203AD34[i] = 0xFF;
|
sOpenWindows[i] = 0xFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810B8F0(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx)
|
void BagPrintTextOnWindow(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, gUnknown_84530B8[colorIdx], speed, str);
|
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, sTextColors[colorIdx], speed, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810B958(const u8 * str, u8 unused)
|
void BagPrintTextOnWin1CenteredColor0(const u8 * str, u8 unused)
|
||||||
{
|
{
|
||||||
u32 x = 0x48 - GetStringWidth(1, str, 0);
|
u32 x = 0x48 - GetStringWidth(1, str, 0);
|
||||||
AddTextPrinterParameterized3(2, 1, x / 2, 1, gUnknown_84530B8[0], 0, str);
|
AddTextPrinterParameterized3(2, 1, x / 2, 1, sTextColors[0], 0, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810B994(void)
|
void BagDrawDepositItemTextBox(void)
|
||||||
{
|
{
|
||||||
u32 x;
|
u32 x;
|
||||||
DrawStdFrameWithCustomTileAndPalette(2, FALSE, 0x081, 0x0C);
|
DrawStdFrameWithCustomTileAndPalette(2, FALSE, 0x081, 0x0C);
|
||||||
@@ -246,77 +241,76 @@ void sub_810B994(void)
|
|||||||
AddTextPrinterParameterized(2, 0, gText_DepositItem, x / 2, 1, 0, NULL);
|
AddTextPrinterParameterized(2, 0, gText_DepositItem, x / 2, 1, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_810B9DC(u8 a0, u8 a1)
|
u8 ShowBagWindow(u8 whichWindow, u8 nItems)
|
||||||
{
|
{
|
||||||
if (gUnknown_203AD34[a0] == 0xFF)
|
if (sOpenWindows[whichWindow] == 0xFF)
|
||||||
{
|
{
|
||||||
gUnknown_203AD34[a0] = AddWindow(&gUnknown_8453104[a0 + a1]);
|
sOpenWindows[whichWindow] = AddWindow(&sWindowTemplates[whichWindow + nItems]);
|
||||||
if (a0 != 6)
|
if (whichWindow != 6)
|
||||||
{
|
{
|
||||||
DrawStdFrameWithCustomTileAndPalette(gUnknown_203AD34[a0], FALSE, 0x064, 0x0E);
|
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x064, 0xE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DrawStdFrameWithCustomTileAndPalette(gUnknown_203AD34[a0], FALSE, 0x081, 0x0C);
|
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x081, 0xC);
|
||||||
}
|
}
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
}
|
}
|
||||||
return gUnknown_203AD34[a0];
|
return sOpenWindows[whichWindow];
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810BA3C(u8 a0)
|
void HideBagWindow(u8 whichWindow)
|
||||||
{
|
{
|
||||||
ClearStdWindowAndFrameToTransparent(gUnknown_203AD34[a0], FALSE);
|
ClearStdWindowAndFrameToTransparent(sOpenWindows[whichWindow], FALSE);
|
||||||
ClearWindowTilemap(gUnknown_203AD34[a0]);
|
ClearWindowTilemap(sOpenWindows[whichWindow]);
|
||||||
RemoveWindow(gUnknown_203AD34[a0]);
|
RemoveWindow(sOpenWindows[whichWindow]);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
gUnknown_203AD34[a0] = 0xFF;
|
sOpenWindows[whichWindow] = 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_810BA70(u8 a0)
|
u8 OpenBagWindow(u8 whichWindow)
|
||||||
{
|
{
|
||||||
if (gUnknown_203AD34[a0] == 0xFF)
|
if (sOpenWindows[whichWindow] == 0xFF)
|
||||||
{
|
{
|
||||||
gUnknown_203AD34[a0] = AddWindow(&gUnknown_8453104[a0]);
|
sOpenWindows[whichWindow] = AddWindow(&sWindowTemplates[whichWindow]);
|
||||||
}
|
}
|
||||||
return gUnknown_203AD34[a0];
|
return sOpenWindows[whichWindow];
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810BA9C(u8 a0)
|
void CloseBagWindow(u8 whichWindow)
|
||||||
{
|
{
|
||||||
if (gUnknown_203AD34[a0] != 0xFF)
|
if (sOpenWindows[whichWindow] != 0xFF)
|
||||||
{
|
{
|
||||||
ClearDialogWindowAndFrameToTransparent(gUnknown_203AD34[a0], FALSE);
|
ClearDialogWindowAndFrameToTransparent(sOpenWindows[whichWindow], FALSE);
|
||||||
ClearWindowTilemap(gUnknown_203AD34[a0]);
|
ClearWindowTilemap(sOpenWindows[whichWindow]);
|
||||||
RemoveWindow(gUnknown_203AD34[a0]);
|
RemoveWindow(sOpenWindows[whichWindow]);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
gUnknown_203AD34[a0] = 0xFF;
|
sOpenWindows[whichWindow] = 0xFF;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_810BAD8(u8 a0)
|
u8 GetBagWindow(u8 whichWindow)
|
||||||
{
|
{
|
||||||
return gUnknown_203AD34[a0];
|
return sOpenWindows[whichWindow];
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810BAE8(u8 taskId, const struct YesNoFuncTable * ptrs)
|
void BagCreateYesNoMenuBottomRight(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||||
{
|
{
|
||||||
CreateYesNoMenuWithCallbacks(taskId, &gUnknown_845311C, 2, 0, 2, 0x64, 0x0E, ptrs);
|
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[3], 2, 0, 2, 0x064, 0x0E, ptrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810BB14(u8 taskId, const struct YesNoFuncTable * ptrs)
|
void BagCreateYesNoMenuTopRight(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||||
{
|
{
|
||||||
CreateYesNoMenuWithCallbacks(taskId, &gUnknown_8453124, 2, 0, 2, 0x064, 0x0E, ptrs);
|
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[4], 2, 0, 2, 0x064, 0x0E, ptrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810BB40(void)
|
void BagPrintMoneyAmount(void)
|
||||||
{
|
{
|
||||||
PrintMoneyAmountInMoneyBoxWithBorder(sub_810B9DC(2, 0), 0x081, 0x0C, GetMoney(&gSaveBlock1Ptr->money));
|
PrintMoneyAmountInMoneyBoxWithBorder(ShowBagWindow(2, 0), 0x081, 0x0C, GetMoney(&gSaveBlock1Ptr->money));
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810BB74(u8 windowId)
|
void BagDrawTextBoxOnWindow(u8 windowId)
|
||||||
{
|
{
|
||||||
DrawTextBorderOuter(windowId, 0x064, 0x0E);
|
DrawTextBorderOuter(windowId, 0x064, 0x0E);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,9 +379,9 @@ static void OpenBagAndChooseItem(void)
|
|||||||
nullsub_44();
|
nullsub_44();
|
||||||
FreeAllWindowBuffers();
|
FreeAllWindowBuffers();
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
|
if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
|
||||||
sub_8107ECC();
|
CB2_BagMenuFromBattle();
|
||||||
else
|
else
|
||||||
InitTutorialBag();
|
InitOldManBag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1330,7 +1330,7 @@ static void OpenBagAndChooseItem(void)
|
|||||||
gBattlerControllerFuncs[gActiveBattler] = CompleteWhenChoseItem;
|
gBattlerControllerFuncs[gActiveBattler] = CompleteWhenChoseItem;
|
||||||
nullsub_44();
|
nullsub_44();
|
||||||
FreeAllWindowBuffers();
|
FreeAllWindowBuffers();
|
||||||
sub_8107ECC();
|
CB2_BagMenuFromBattle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "battle_interface.h"
|
#include "battle_interface.h"
|
||||||
#include "battle_message.h"
|
#include "battle_message.h"
|
||||||
#include "reshow_battle_screen.h"
|
#include "reshow_battle_screen.h"
|
||||||
|
#include "teachy_tv.h"
|
||||||
#include "constants/songs.h"
|
#include "constants/songs.h"
|
||||||
#include "constants/items.h"
|
#include "constants/items.h"
|
||||||
#include "constants/moves.h"
|
#include "constants/moves.h"
|
||||||
@@ -733,15 +734,15 @@ static void OpenBagAndChooseItem(void)
|
|||||||
FreeAllWindowBuffers();
|
FreeAllWindowBuffers();
|
||||||
switch (gSpecialVar_0x8004)
|
switch (gSpecialVar_0x8004)
|
||||||
{
|
{
|
||||||
case 1:
|
case TTVSCR_STATUS:
|
||||||
default:
|
default:
|
||||||
callbackId = 7;
|
callbackId = ITEMMENULOCATION_TTVSCR_STATUS;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case TTVSCR_CATCHING:
|
||||||
callbackId = 8;
|
callbackId = ITEMMENULOCATION_TTVSCR_CATCHING;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sub_810B108(callbackId);
|
InitPokeDudeBag(callbackId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -1269,7 +1269,7 @@ static void Task_ContextMenu_Sell(u8 taskId)
|
|||||||
{
|
{
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat);
|
StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat);
|
||||||
DisplayItemMessageInBerryPouch(taskId, sub_80BF8E4(), gStringVar4, Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu);
|
DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1285,7 +1285,7 @@ static void Task_ContextMenu_Sell(u8 taskId)
|
|||||||
data[2] = 99;
|
data[2] = 99;
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell);
|
StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell);
|
||||||
DisplayItemMessageInBerryPouch(taskId, sub_80BF8E4(), gStringVar4, Task_Sell_PrintSelectMultipleUI);
|
DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_Sell_PrintSelectMultipleUI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1295,7 +1295,7 @@ static void Task_AskSellMultiple(u8 taskId)
|
|||||||
s16 * data = gTasks[taskId].data;
|
s16 * data = gTasks[taskId].data;
|
||||||
ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6);
|
ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay);
|
StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay);
|
||||||
DisplayItemMessageInBerryPouch(taskId, sub_80BF8E4(), gStringVar4, Task_SellMultiple_CreateYesNoMenu);
|
DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_SellMultiple_CreateYesNoMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Task_SellMultiple_CreateYesNoMenu(u8 taskId)
|
static void Task_SellMultiple_CreateYesNoMenu(u8 taskId)
|
||||||
|
|||||||
+790
-783
File diff suppressed because it is too large
Load Diff
+76
-72
@@ -5,14 +5,14 @@
|
|||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "constants/items.h"
|
#include "constants/items.h"
|
||||||
|
|
||||||
static EWRAM_DATA u8 gUnknown_2039878[12] = {0};
|
static EWRAM_DATA u8 sItemMenuIconSpriteIds[12] = {0};
|
||||||
EWRAM_DATA void * gUnknown_2039884 = NULL;
|
static EWRAM_DATA void * sItemIconTilesBuffer = NULL;
|
||||||
static EWRAM_DATA void * gUnknown_2039888 = NULL;
|
static EWRAM_DATA void * sItemIconTilesBufferPadded = NULL;
|
||||||
|
|
||||||
static void sub_8098560(struct Sprite * sprite);
|
static void sub_8098560(struct Sprite * sprite);
|
||||||
static void sub_80985BC(struct Sprite * sprite);
|
static void sub_80985BC(struct Sprite * sprite);
|
||||||
|
|
||||||
static const struct OamData gUnknown_83D416C = {
|
static const struct OamData sOamData_BagOrSatchel = {
|
||||||
.affineMode = ST_OAM_AFFINE_NORMAL,
|
.affineMode = ST_OAM_AFFINE_NORMAL,
|
||||||
.shape = ST_OAM_SQUARE,
|
.shape = ST_OAM_SQUARE,
|
||||||
.size = 3,
|
.size = 3,
|
||||||
@@ -20,36 +20,36 @@ static const struct OamData gUnknown_83D416C = {
|
|||||||
.paletteNum = 0
|
.paletteNum = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AnimCmd gUnknown_83D4174[] = {
|
static const union AnimCmd sAnim_BagOrSatchel_OpenItemPocket[] = {
|
||||||
ANIMCMD_FRAME( 0, 5),
|
ANIMCMD_FRAME( 0, 5),
|
||||||
ANIMCMD_FRAME(0x40, 0),
|
ANIMCMD_FRAME(0x40, 0),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AnimCmd gUnknown_83D4180[] = {
|
static const union AnimCmd sAnim_BagOrSatchel_OpenKeyItemPocket[] = {
|
||||||
ANIMCMD_FRAME( 0, 5),
|
ANIMCMD_FRAME( 0, 5),
|
||||||
ANIMCMD_FRAME(0x80, 0),
|
ANIMCMD_FRAME(0x80, 0),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AnimCmd gUnknown_83D418C[] = {
|
static const union AnimCmd sAnim_BagOrSatchel_OpenPokeBallsPocket[] = {
|
||||||
ANIMCMD_FRAME( 0, 5),
|
ANIMCMD_FRAME( 0, 5),
|
||||||
ANIMCMD_FRAME(0xc0, 0),
|
ANIMCMD_FRAME(0xc0, 0),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AnimCmd *const gUnknown_83D4198[] = {
|
static const union AnimCmd *const sAnimTable_BagOrSatchel[] = {
|
||||||
gUnknown_83D4180,
|
sAnim_BagOrSatchel_OpenKeyItemPocket,
|
||||||
gUnknown_83D418C,
|
sAnim_BagOrSatchel_OpenPokeBallsPocket,
|
||||||
gUnknown_83D4174
|
sAnim_BagOrSatchel_OpenItemPocket
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AffineAnimCmd gUnknown_83D41A4[] = {
|
static const union AffineAnimCmd sAffineAnim_Idle[] = {
|
||||||
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
|
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
|
||||||
AFFINEANIMCMD_END
|
AFFINEANIMCMD_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AffineAnimCmd gUnknown_83D41B4[] = {
|
static const union AffineAnimCmd sAffineAnim_Wobble[] = {
|
||||||
AFFINEANIMCMD_FRAME(0, 0, -2, 2),
|
AFFINEANIMCMD_FRAME(0, 0, -2, 2),
|
||||||
AFFINEANIMCMD_FRAME(0, 0, 2, 4),
|
AFFINEANIMCMD_FRAME(0, 0, 2, 4),
|
||||||
AFFINEANIMCMD_FRAME(0, 0, -2, 4),
|
AFFINEANIMCMD_FRAME(0, 0, -2, 4),
|
||||||
@@ -57,35 +57,35 @@ static const union AffineAnimCmd gUnknown_83D41B4[] = {
|
|||||||
AFFINEANIMCMD_END
|
AFFINEANIMCMD_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AffineAnimCmd *const gUnknown_83D41DC[] = {
|
static const union AffineAnimCmd *const sAffineAnimTable_BagOrSatchel[] = {
|
||||||
gUnknown_83D41A4,
|
sAffineAnim_Idle,
|
||||||
gUnknown_83D41B4
|
sAffineAnim_Wobble
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct CompressedSpriteSheet gUnknown_83D41E4 = {
|
const struct CompressedSpriteSheet gSpriteSheet_Backpack = {
|
||||||
gUnknown_8E8362C,
|
gUnknown_8E8362C,
|
||||||
0x2000,
|
0x2000,
|
||||||
100
|
100
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct CompressedSpriteSheet gUnknown_83D41EC = {
|
const struct CompressedSpriteSheet gSpriteSheet_Satchel = {
|
||||||
gUnknown_8E83DBC,
|
gUnknown_8E83DBC,
|
||||||
0x2000,
|
0x2000,
|
||||||
100
|
100
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct CompressedSpritePalette gUnknown_83D41F4 = {
|
const struct CompressedSpritePalette gSpritePalette_BagOrSatchel = {
|
||||||
gUnknown_8E84560,
|
gUnknown_8E84560,
|
||||||
100
|
100
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct SpriteTemplate gUnknown_83D41FC = {
|
static const struct SpriteTemplate sSpriteTemplate_BagOrSatchel = {
|
||||||
100,
|
100,
|
||||||
100,
|
100,
|
||||||
&gUnknown_83D416C,
|
&sOamData_BagOrSatchel,
|
||||||
gUnknown_83D4198,
|
sAnimTable_BagOrSatchel,
|
||||||
NULL,
|
NULL,
|
||||||
gUnknown_83D41DC,
|
sAffineAnimTable_BagOrSatchel,
|
||||||
SpriteCallbackDummy
|
SpriteCallbackDummy
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ static const struct SpriteTemplate gUnknown_83D4250 = {
|
|||||||
SpriteCallbackDummy
|
SpriteCallbackDummy
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct OamData gUnknown_83D4268 = {
|
static const struct OamData sOamData_ItemIcon = {
|
||||||
.affineMode = ST_OAM_AFFINE_OFF,
|
.affineMode = ST_OAM_AFFINE_OFF,
|
||||||
.shape = ST_OAM_SQUARE,
|
.shape = ST_OAM_SQUARE,
|
||||||
.size = 2,
|
.size = 2,
|
||||||
@@ -147,26 +147,26 @@ static const struct OamData gUnknown_83D4268 = {
|
|||||||
.paletteNum = 2
|
.paletteNum = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AnimCmd gUnknown_83D4270[] = {
|
static const union AnimCmd sAnim_ItemIcon_0[] = {
|
||||||
ANIMCMD_FRAME(0, 0),
|
ANIMCMD_FRAME(0, 0),
|
||||||
ANIMCMD_END
|
ANIMCMD_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AnimCmd *const gUnknown_83D4278[] = {
|
static const union AnimCmd *const sAnimTable_ItemIcon[] = {
|
||||||
gUnknown_83D4270
|
sAnim_ItemIcon_0
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct SpriteTemplate gUnknown_83D427C = {
|
static const struct SpriteTemplate sSpriteTemplate_ItemIcon = {
|
||||||
102,
|
102,
|
||||||
102,
|
102,
|
||||||
&gUnknown_83D4268,
|
&sOamData_ItemIcon,
|
||||||
gUnknown_83D4278,
|
sAnimTable_ItemIcon,
|
||||||
NULL,
|
NULL,
|
||||||
gDummySpriteAffineAnimTable,
|
gDummySpriteAffineAnimTable,
|
||||||
SpriteCallbackDummy
|
SpriteCallbackDummy
|
||||||
};
|
};
|
||||||
|
|
||||||
static const void *const gUnknown_83D4294[][2] = {
|
static const void *const sItemIconGfxPtrs[][2] = {
|
||||||
{gFile_graphics_items_icons_question_mark_sheet, gFile_graphics_items_icon_palettes_question_mark_palette},
|
{gFile_graphics_items_icons_question_mark_sheet, gFile_graphics_items_icon_palettes_question_mark_palette},
|
||||||
{gFile_graphics_items_icons_master_ball_sheet, gFile_graphics_items_icon_palettes_master_ball_palette},
|
{gFile_graphics_items_icons_master_ball_sheet, gFile_graphics_items_icon_palettes_master_ball_palette},
|
||||||
{gFile_graphics_items_icons_ultra_ball_sheet, gFile_graphics_items_icon_palettes_ultra_ball_palette},
|
{gFile_graphics_items_icons_ultra_ball_sheet, gFile_graphics_items_icon_palettes_ultra_ball_palette},
|
||||||
@@ -549,19 +549,19 @@ void ResetItemMenuIconState(void)
|
|||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
||||||
for (i = 0; i < NELEMS(gUnknown_2039878); i++)
|
for (i = 0; i < NELEMS(sItemMenuIconSpriteIds); i++)
|
||||||
gUnknown_2039878[i] = 0xFF;
|
sItemMenuIconSpriteIds[i] = 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80984FC(u8 animNum)
|
void CreateBagOrSatchelSprite(u8 animNum)
|
||||||
{
|
{
|
||||||
gUnknown_2039878[0] = CreateSprite(&gUnknown_83D41FC, 40, 68, 0);
|
sItemMenuIconSpriteIds[0] = CreateSprite(&sSpriteTemplate_BagOrSatchel, 40, 68, 0);
|
||||||
sub_8098528(animNum);
|
sub_8098528(animNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8098528(u8 animNum)
|
void sub_8098528(u8 animNum)
|
||||||
{
|
{
|
||||||
struct Sprite * sprite = &gSprites[gUnknown_2039878[0]];
|
struct Sprite * sprite = &gSprites[sItemMenuIconSpriteIds[0]];
|
||||||
sprite->pos2.y = -5;
|
sprite->pos2.y = -5;
|
||||||
sprite->callback = sub_8098560;
|
sprite->callback = sub_8098560;
|
||||||
StartSpriteAnim(sprite, animNum);
|
StartSpriteAnim(sprite, animNum);
|
||||||
@@ -577,7 +577,7 @@ static void sub_8098560(struct Sprite * sprite)
|
|||||||
|
|
||||||
void sub_8098580(void)
|
void sub_8098580(void)
|
||||||
{
|
{
|
||||||
struct Sprite * sprite = &gSprites[gUnknown_2039878[0]];
|
struct Sprite * sprite = &gSprites[sItemMenuIconSpriteIds[0]];
|
||||||
if (sprite->affineAnimEnded)
|
if (sprite->affineAnimEnded)
|
||||||
{
|
{
|
||||||
StartSpriteAffineAnim(sprite, 1);
|
StartSpriteAffineAnim(sprite, 1);
|
||||||
@@ -594,40 +594,44 @@ static void sub_80985BC(struct Sprite * sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80985E4(void)
|
void ItemMenuIcons_CreateInsertIndicatorBarHidden(void)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
u8 * ptr = &gUnknown_2039878[1];
|
u8 * ptr = &sItemMenuIconSpriteIds[1];
|
||||||
|
|
||||||
for (i = 0; i < 9; i++)
|
for (i = 0; i < 9; i++)
|
||||||
{
|
{
|
||||||
ptr[i] = CreateSprite(&gUnknown_83D4250, i * 16 + 0x60, 7, 0);
|
ptr[i] = CreateSprite(&gUnknown_83D4250, i * 16 + 0x60, 7, 0);
|
||||||
if (i != 0)
|
switch (i)
|
||||||
{
|
{
|
||||||
if (i == 8)
|
case 0:
|
||||||
StartSpriteAnim(&gSprites[ptr[i]], 2);
|
break;
|
||||||
else
|
case 8:
|
||||||
StartSpriteAnim(&gSprites[ptr[i]], 1);
|
StartSpriteAnim(&gSprites[ptr[i]], 2);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
StartSpriteAnim(&gSprites[ptr[i]], 1);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
gSprites[ptr[i]].invisible = TRUE;
|
gSprites[ptr[i]].invisible = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8098660(u8 flag)
|
void ItemMenuIcons_ToggleInsertIndicatorBarVisibility(bool8 invisible)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
u8 * ptr = &gUnknown_2039878[1];
|
u8 * ptr = &sItemMenuIconSpriteIds[1];
|
||||||
|
|
||||||
for (i = 0; i < 9; i++)
|
for (i = 0; i < 9; i++)
|
||||||
{
|
{
|
||||||
gSprites[ptr[i]].invisible = flag;
|
gSprites[ptr[i]].invisible = invisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80986A8(s16 x, u16 y)
|
void ItemMenuIcons_MoveInsertIndicatorBar(s16 x, u16 y)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
u8 * ptr = &gUnknown_2039878[1];
|
u8 * ptr = &sItemMenuIconSpriteIds[1];
|
||||||
|
|
||||||
for (i = 0; i < 9; i++)
|
for (i = 0; i < 9; i++)
|
||||||
{
|
{
|
||||||
@@ -636,15 +640,15 @@ void sub_80986A8(s16 x, u16 y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 sub_80986EC(void)
|
static bool8 TryAllocItemIconTilesBuffers(void)
|
||||||
{
|
{
|
||||||
void ** ptr1, ** ptr2;
|
void ** ptr1, ** ptr2;
|
||||||
|
|
||||||
ptr1 = &gUnknown_2039884;
|
ptr1 = &sItemIconTilesBuffer;
|
||||||
*ptr1 = Alloc(0x120);
|
*ptr1 = Alloc(0x120);
|
||||||
if (*ptr1 == NULL)
|
if (*ptr1 == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
ptr2 = &gUnknown_2039888;
|
ptr2 = &sItemIconTilesBufferPadded;
|
||||||
*ptr2 = AllocZeroed(0x200);
|
*ptr2 = AllocZeroed(0x200);
|
||||||
if (*ptr2 == NULL)
|
if (*ptr2 == NULL)
|
||||||
{
|
{
|
||||||
@@ -671,27 +675,27 @@ u8 AddItemIconObject(u16 tilesTag, u16 paletteTag, u16 itemId)
|
|||||||
struct CompressedSpritePalette spritePalette;
|
struct CompressedSpritePalette spritePalette;
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
|
|
||||||
if (!sub_80986EC())
|
if (!TryAllocItemIconTilesBuffers())
|
||||||
return MAX_SPRITES;
|
return MAX_SPRITES;
|
||||||
|
|
||||||
LZDecompressWram(sub_8098974(itemId, 0), gUnknown_2039884);
|
LZDecompressWram(GetItemIconGfxPtr(itemId, 0), sItemIconTilesBuffer);
|
||||||
CopyItemIconPicTo4x4Buffer(gUnknown_2039884, gUnknown_2039888);
|
CopyItemIconPicTo4x4Buffer(sItemIconTilesBuffer, sItemIconTilesBufferPadded);
|
||||||
spriteSheet.data = gUnknown_2039888;
|
spriteSheet.data = sItemIconTilesBufferPadded;
|
||||||
spriteSheet.size = 0x200;
|
spriteSheet.size = 0x200;
|
||||||
spriteSheet.tag = tilesTag;
|
spriteSheet.tag = tilesTag;
|
||||||
LoadSpriteSheet(&spriteSheet);
|
LoadSpriteSheet(&spriteSheet);
|
||||||
|
|
||||||
spritePalette.data = sub_8098974(itemId, 1);
|
spritePalette.data = GetItemIconGfxPtr(itemId, 1);
|
||||||
spritePalette.tag = paletteTag;
|
spritePalette.tag = paletteTag;
|
||||||
LoadCompressedSpritePalette(&spritePalette);
|
LoadCompressedSpritePalette(&spritePalette);
|
||||||
|
|
||||||
CpuCopy16(&gUnknown_83D427C, &template, sizeof(struct SpriteTemplate));
|
CpuCopy16(&sSpriteTemplate_ItemIcon, &template, sizeof(struct SpriteTemplate));
|
||||||
template.tileTag = tilesTag;
|
template.tileTag = tilesTag;
|
||||||
template.paletteTag = paletteTag;
|
template.paletteTag = paletteTag;
|
||||||
spriteId = CreateSprite(&template, 0, 0, 0);
|
spriteId = CreateSprite(&template, 0, 0, 0);
|
||||||
|
|
||||||
Free(gUnknown_2039884);
|
Free(sItemIconTilesBuffer);
|
||||||
Free(gUnknown_2039888);
|
Free(sItemIconTilesBufferPadded);
|
||||||
return spriteId;
|
return spriteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,17 +706,17 @@ u8 AddItemIconObjectWithCustomObjectTemplate(const struct SpriteTemplate * origT
|
|||||||
struct CompressedSpritePalette spritePalette;
|
struct CompressedSpritePalette spritePalette;
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
|
|
||||||
if (!sub_80986EC())
|
if (!TryAllocItemIconTilesBuffers())
|
||||||
return MAX_SPRITES;
|
return MAX_SPRITES;
|
||||||
|
|
||||||
LZDecompressWram(sub_8098974(itemId, 0), gUnknown_2039884);
|
LZDecompressWram(GetItemIconGfxPtr(itemId, 0), sItemIconTilesBuffer);
|
||||||
CopyItemIconPicTo4x4Buffer(gUnknown_2039884, gUnknown_2039888);
|
CopyItemIconPicTo4x4Buffer(sItemIconTilesBuffer, sItemIconTilesBufferPadded);
|
||||||
spriteSheet.data = gUnknown_2039888;
|
spriteSheet.data = sItemIconTilesBufferPadded;
|
||||||
spriteSheet.size = 0x200;
|
spriteSheet.size = 0x200;
|
||||||
spriteSheet.tag = tilesTag;
|
spriteSheet.tag = tilesTag;
|
||||||
LoadSpriteSheet(&spriteSheet);
|
LoadSpriteSheet(&spriteSheet);
|
||||||
|
|
||||||
spritePalette.data = sub_8098974(itemId, 1);
|
spritePalette.data = GetItemIconGfxPtr(itemId, 1);
|
||||||
spritePalette.tag = paletteTag;
|
spritePalette.tag = paletteTag;
|
||||||
LoadCompressedSpritePalette(&spritePalette);
|
LoadCompressedSpritePalette(&spritePalette);
|
||||||
|
|
||||||
@@ -721,14 +725,14 @@ u8 AddItemIconObjectWithCustomObjectTemplate(const struct SpriteTemplate * origT
|
|||||||
template.paletteTag = paletteTag;
|
template.paletteTag = paletteTag;
|
||||||
spriteId = CreateSprite(&template, 0, 0, 0);
|
spriteId = CreateSprite(&template, 0, 0, 0);
|
||||||
|
|
||||||
Free(gUnknown_2039884);
|
Free(sItemIconTilesBuffer);
|
||||||
Free(gUnknown_2039888);
|
Free(sItemIconTilesBufferPadded);
|
||||||
return spriteId;
|
return spriteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateItemMenuIcon(u16 itemId, u8 idx)
|
void CreateItemMenuIcon(u16 itemId, u8 idx)
|
||||||
{
|
{
|
||||||
u8 * ptr = &gUnknown_2039878[10];
|
u8 * ptr = &sItemMenuIconSpriteIds[10];
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
|
|
||||||
if (ptr[idx] == 0xFF)
|
if (ptr[idx] == 0xFF)
|
||||||
@@ -747,7 +751,7 @@ void CreateItemMenuIcon(u16 itemId, u8 idx)
|
|||||||
|
|
||||||
void DestroyItemMenuIcon(u8 idx)
|
void DestroyItemMenuIcon(u8 idx)
|
||||||
{
|
{
|
||||||
u8 * ptr = &gUnknown_2039878[10];
|
u8 * ptr = &sItemMenuIconSpriteIds[10];
|
||||||
|
|
||||||
if (ptr[idx] != 0xFF)
|
if (ptr[idx] != 0xFF)
|
||||||
{
|
{
|
||||||
@@ -756,16 +760,16 @@ void DestroyItemMenuIcon(u8 idx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const void * sub_8098974(u16 itemId, u8 attrId)
|
const void * GetItemIconGfxPtr(u16 itemId, u8 attrId)
|
||||||
{
|
{
|
||||||
if (itemId > ITEM_N_A)
|
if (itemId > ITEM_N_A)
|
||||||
itemId = ITEM_NONE;
|
itemId = ITEM_NONE;
|
||||||
return gUnknown_83D4294[itemId][attrId];
|
return sItemIconGfxPtrs[itemId][attrId];
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80989A0(u16 itemId, u8 idx)
|
void sub_80989A0(u16 itemId, u8 idx)
|
||||||
{
|
{
|
||||||
u8 * ptr = &gUnknown_2039878[10];
|
u8 * ptr = &sItemMenuIconSpriteIds[10];
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
|
|
||||||
if (ptr[idx] == 0xFF)
|
if (ptr[idx] == 0xFF)
|
||||||
|
|||||||
+6
-6
@@ -348,7 +348,7 @@ static bool8 ItemPc_DoGfxSetup(void)
|
|||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
sub_80985E4();
|
ItemMenuIcons_CreateInsertIndicatorBarHidden();
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
@@ -780,8 +780,8 @@ static void ItemPc_MoveItemModeInit(u8 taskId, s16 pos)
|
|||||||
StringExpandPlaceholders(gStringVar4, gOtherText_WhereShouldTheStrVar1BePlaced);
|
StringExpandPlaceholders(gStringVar4, gOtherText_WhereShouldTheStrVar1BePlaced);
|
||||||
FillWindowPixelBuffer(1, 0x00);
|
FillWindowPixelBuffer(1, 0x00);
|
||||||
ItemPc_AddTextPrinterParameterized(1, 2, gStringVar4, 0, 3, 2, 3, 0, 0);
|
ItemPc_AddTextPrinterParameterized(1, 2, gStringVar4, 0, 3, 2, 3, 0, 0);
|
||||||
sub_80986A8(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
ItemMenuIcons_MoveInsertIndicatorBar(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
||||||
sub_8098660(0);
|
ItemMenuIcons_ToggleInsertIndicatorBarVisibility(0);
|
||||||
ItemPc_PrintOrRemoveCursor(data[0], 2);
|
ItemPc_PrintOrRemoveCursor(data[0], 2);
|
||||||
gTasks[taskId].func = Task_ItemPcMoveItemModeRun;
|
gTasks[taskId].func = Task_ItemPcMoveItemModeRun;
|
||||||
}
|
}
|
||||||
@@ -792,7 +792,7 @@ static void Task_ItemPcMoveItemModeRun(u8 taskId)
|
|||||||
|
|
||||||
ListMenu_ProcessInput(data[0]);
|
ListMenu_ProcessInput(data[0]);
|
||||||
ListMenuGetScrollAndRow(data[0], &sListMenuState.scroll, &sListMenuState.row);
|
ListMenuGetScrollAndRow(data[0], &sListMenuState.scroll, &sListMenuState.row);
|
||||||
sub_80986A8(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
ItemMenuIcons_MoveInsertIndicatorBar(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
||||||
if (JOY_NEW(A_BUTTON | SELECT_BUTTON))
|
if (JOY_NEW(A_BUTTON | SELECT_BUTTON))
|
||||||
{
|
{
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
@@ -820,7 +820,7 @@ static void ItemPc_InsertItemIntoNewSlot(u8 taskId, u32 pos)
|
|||||||
sListMenuState.row--;
|
sListMenuState.row--;
|
||||||
ItemPc_BuildListMenuTemplate();
|
ItemPc_BuildListMenuTemplate();
|
||||||
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sListMenuState.scroll, sListMenuState.row);
|
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sListMenuState.scroll, sListMenuState.row);
|
||||||
sub_8098660(1);
|
ItemMenuIcons_ToggleInsertIndicatorBarVisibility(1);
|
||||||
gTasks[taskId].func = Task_ItemPcMain;
|
gTasks[taskId].func = Task_ItemPcMain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -834,7 +834,7 @@ static void ItemPc_MoveItemModeCancel(u8 taskId, u32 pos)
|
|||||||
sListMenuState.row--;
|
sListMenuState.row--;
|
||||||
ItemPc_BuildListMenuTemplate();
|
ItemPc_BuildListMenuTemplate();
|
||||||
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sListMenuState.scroll, sListMenuState.row);
|
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sListMenuState.scroll, sListMenuState.row);
|
||||||
sub_8098660(1);
|
ItemMenuIcons_ToggleInsertIndicatorBarVisibility(1);
|
||||||
gTasks[taskId].func = Task_ItemPcMain;
|
gTasks[taskId].func = Task_ItemPcMain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-17
@@ -154,7 +154,7 @@ static void sub_80A0FBC(u8 taskId)
|
|||||||
{
|
{
|
||||||
ItemMenu_SetExitCallback(gUnknown_83E2954[itemType]);
|
ItemMenu_SetExitCallback(gUnknown_83E2954[itemType]);
|
||||||
if (itemType == 1)
|
if (itemType == 1)
|
||||||
sub_8108CB4();
|
Bag_BeginCloseWin0Animation();
|
||||||
ItemMenu_StartFadeToExitCallback(taskId);
|
ItemMenu_StartFadeToExitCallback(taskId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,7 +188,7 @@ static void sub_80A10C4(u8 taskId, bool8 a1, u8 a2, const u8 * str)
|
|||||||
{
|
{
|
||||||
StringExpandPlaceholders(gStringVar4, str);
|
StringExpandPlaceholders(gStringVar4, str);
|
||||||
if (a1 == FALSE)
|
if (a1 == FALSE)
|
||||||
DisplayItemMessageInBag(taskId, a2, gStringVar4, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, a2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||||
else
|
else
|
||||||
DisplayItemMessageOnField(taskId, a2, gStringVar4, sub_80A112C);
|
DisplayItemMessageOnField(taskId, a2, gStringVar4, sub_80A112C);
|
||||||
}
|
}
|
||||||
@@ -345,7 +345,7 @@ void FieldUseFunc_CoinCase(u8 taskId)
|
|||||||
StringExpandPlaceholders(gStringVar4, gUnknown_8416537);
|
StringExpandPlaceholders(gStringVar4, gUnknown_8416537);
|
||||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
||||||
if (gTasks[taskId].data[3] == 0)
|
if (gTasks[taskId].data[3] == 0)
|
||||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||||
else
|
else
|
||||||
DisplayItemMessageOnField(taskId, 2, gStringVar4, sub_80A112C);
|
DisplayItemMessageOnField(taskId, 2, gStringVar4, sub_80A112C);
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ void FieldUseFunc_PowderJar(u8 taskId)
|
|||||||
StringExpandPlaceholders(gStringVar4, gUnknown_8416644);
|
StringExpandPlaceholders(gStringVar4, gUnknown_8416644);
|
||||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
||||||
if (gTasks[taskId].data[3] == 0)
|
if (gTasks[taskId].data[3] == 0)
|
||||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||||
else
|
else
|
||||||
DisplayItemMessageOnField(taskId, 2, gStringVar4, sub_80A112C);
|
DisplayItemMessageOnField(taskId, 2, gStringVar4, sub_80A112C);
|
||||||
}
|
}
|
||||||
@@ -384,7 +384,7 @@ void FieldUseFunc_PokeFlute(u8 taskId)
|
|||||||
{
|
{
|
||||||
// Now that's a catchy tune!
|
// Now that's a catchy tune!
|
||||||
if (gTasks[taskId].data[3] == 0)
|
if (gTasks[taskId].data[3] == 0)
|
||||||
DisplayItemMessageInBag(taskId, 2, gUnknown_841665C, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gUnknown_841665C, Task_ReturnToBagFromContextMenu);
|
||||||
else
|
else
|
||||||
DisplayItemMessageOnField(taskId, 2, gUnknown_841665C, sub_80A112C);
|
DisplayItemMessageOnField(taskId, 2, gUnknown_841665C, sub_80A112C);
|
||||||
}
|
}
|
||||||
@@ -401,7 +401,7 @@ static void sub_80A1674(u8 taskId)
|
|||||||
if (WaitFanfare(FALSE))
|
if (WaitFanfare(FALSE))
|
||||||
{
|
{
|
||||||
if (gTasks[taskId].data[3] == 0)
|
if (gTasks[taskId].data[3] == 0)
|
||||||
DisplayItemMessageInBag(taskId, 2, gUnknown_84166A7, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gUnknown_84166A7, Task_ReturnToBagFromContextMenu);
|
||||||
else
|
else
|
||||||
DisplayItemMessageOnField(taskId, 2, gUnknown_84166A7, sub_80A112C);
|
DisplayItemMessageOnField(taskId, 2, gUnknown_84166A7, sub_80A112C);
|
||||||
}
|
}
|
||||||
@@ -518,7 +518,7 @@ void BattleUseFunc_BerryPouch(u8 taskId)
|
|||||||
|
|
||||||
static void InitBerryPouchFromBattle(void)
|
static void InitBerryPouchFromBattle(void)
|
||||||
{
|
{
|
||||||
InitBerryPouch(BERRYPOUCH_FROMBATTLE, sub_8107ECC, 0);
|
InitBerryPouch(BERRYPOUCH_FROMBATTLE, CB2_BagMenuFromBattle, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FieldUseFunc_TeachyTv(u8 taskId)
|
void FieldUseFunc_TeachyTv(u8 taskId)
|
||||||
@@ -562,7 +562,7 @@ void FieldUseFunc_SuperRepel(u8 taskId)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
// An earlier repel is still in effect
|
// An earlier repel is still in effect
|
||||||
DisplayItemMessageInBag(taskId, 2, gUnknown_841659E, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gUnknown_841659E, Task_ReturnToBagFromContextMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80A19E8(u8 taskId)
|
static void sub_80A19E8(u8 taskId)
|
||||||
@@ -572,15 +572,15 @@ static void sub_80A19E8(u8 taskId)
|
|||||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
||||||
VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId));
|
VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId));
|
||||||
sub_80A1A44();
|
sub_80A1A44();
|
||||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80A1A44(void)
|
static void sub_80A1A44(void)
|
||||||
{
|
{
|
||||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||||
sub_8108DC8(ItemId_GetPocket(gSpecialVar_ItemId));
|
Pocket_CalculateNItemsAndMaxShowed(ItemId_GetPocket(gSpecialVar_ItemId));
|
||||||
sub_81089F4(ItemId_GetPocket(gSpecialVar_ItemId));
|
PocketCalculateInitialCursorPosAndItemsAbove(ItemId_GetPocket(gSpecialVar_ItemId));
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||||
StringExpandPlaceholders(gStringVar4, gUnknown_841658C);
|
StringExpandPlaceholders(gStringVar4, gUnknown_841658C);
|
||||||
}
|
}
|
||||||
@@ -613,7 +613,7 @@ static void sub_80A1B48(u8 taskId)
|
|||||||
if (++gTasks[taskId].data[8] > 7)
|
if (++gTasks[taskId].data[8] > 7)
|
||||||
{
|
{
|
||||||
PlaySE(SE_BIDORO);
|
PlaySE(SE_BIDORO);
|
||||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -745,18 +745,18 @@ void BattleUseFunc_PokeBallEtc(u8 taskId)
|
|||||||
if (!IsPlayerPartyAndPokemonStorageFull())
|
if (!IsPlayerPartyAndPokemonStorageFull())
|
||||||
{
|
{
|
||||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||||
sub_8108CB4();
|
Bag_BeginCloseWin0Animation();
|
||||||
ItemMenu_StartFadeToExitCallback(taskId);
|
ItemMenu_StartFadeToExitCallback(taskId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DisplayItemMessageInBag(taskId, 2, gUnknown_8416631, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gUnknown_8416631, Task_ReturnToBagFromContextMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleUseFunc_PokeFlute(u8 taskId)
|
void BattleUseFunc_PokeFlute(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8108CB4();
|
Bag_BeginCloseWin0Animation();
|
||||||
ItemMenu_StartFadeToExitCallback(taskId);
|
ItemMenu_StartFadeToExitCallback(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -764,7 +764,7 @@ void BattleUseFunc_GuardSpec(u8 taskId)
|
|||||||
{
|
{
|
||||||
if (ExecuteTableBasedItemEffect(&gPlayerParty[gBattlerPartyIndexes[gBattlerInMenuId]], gSpecialVar_ItemId, gBattlerPartyIndexes[gBattlerInMenuId], 0))
|
if (ExecuteTableBasedItemEffect(&gPlayerParty[gBattlerPartyIndexes[gBattlerInMenuId]], gSpecialVar_ItemId, gBattlerPartyIndexes[gBattlerInMenuId], 0))
|
||||||
{
|
{
|
||||||
DisplayItemMessageInBag(taskId, 2, gText_WontHaveEffect, sub_810A1F8);
|
DisplayItemMessageInBag(taskId, 2, gText_WontHaveEffect, Task_ReturnToBagFromContextMenu);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -790,7 +790,7 @@ static void Task_BattleUse_StatBooster_WaitButton_ReturnToBattle(u8 taskId)
|
|||||||
{
|
{
|
||||||
if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON))
|
if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON))
|
||||||
{
|
{
|
||||||
sub_8108CB4();
|
Bag_BeginCloseWin0Animation();
|
||||||
ItemMenu_StartFadeToExitCallback(taskId);
|
ItemMenu_StartFadeToExitCallback(taskId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -242,7 +242,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_80BF8E4(void)
|
u8 GetDialogBoxFontId(void)
|
||||||
{
|
{
|
||||||
if (!ContextNpcGetTextColor())
|
if (!ContextNpcGetTextColor())
|
||||||
return 4;
|
return 4;
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@ void ResetMenuAndMonGlobals(void)
|
|||||||
gDifferentSaveFile = FALSE;
|
gDifferentSaveFile = FALSE;
|
||||||
ZeroPlayerPartyMons();
|
ZeroPlayerPartyMons();
|
||||||
ZeroEnemyPartyMons();
|
ZeroEnemyPartyMons();
|
||||||
sub_81089BC();
|
ResetBagCursorPositions();
|
||||||
ResetTMCaseCursorPos();
|
ResetTMCaseCursorPos();
|
||||||
BerryPouch_CursorResetToTop();
|
BerryPouch_CursorResetToTop();
|
||||||
ResetQuestLog();
|
ResetQuestLog();
|
||||||
|
|||||||
+6
-6
@@ -3451,7 +3451,7 @@ static void CursorCB_Give(u8 taskId)
|
|||||||
|
|
||||||
void CB2_SelectBagItemToGive(void)
|
void CB2_SelectBagItemToGive(void)
|
||||||
{
|
{
|
||||||
GoToBagMenu(1, 3, CB2_GiveHoldItem);
|
GoToBagMenu(ITEMMENULOCATION_PARTY, OPEN_BAG_LAST, CB2_GiveHoldItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CB2_GiveHoldItem(void)
|
void CB2_GiveHoldItem(void)
|
||||||
@@ -4283,12 +4283,12 @@ void CB2_ShowPartyMenuForItemUse(void)
|
|||||||
|
|
||||||
static void CB2_ReturnToBagMenu(void)
|
static void CB2_ReturnToBagMenu(void)
|
||||||
{
|
{
|
||||||
GoToBagMenu(11, 3, NULL);
|
GoToBagMenu(ITEMMENULOCATION_LAST, OPEN_BAG_LAST, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CB2_ReturnToTMCaseMenu(void)
|
static void CB2_ReturnToTMCaseMenu(void)
|
||||||
{
|
{
|
||||||
InitTMCase(5, NULL, 0xFF);
|
InitTMCase(TMCASE_NA, NULL, 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CB2_ReturnToBerryPouchMenu(void)
|
static void CB2_ReturnToBerryPouchMenu(void)
|
||||||
@@ -5904,7 +5904,7 @@ void OpenPartyMenuInBattle(void)
|
|||||||
|
|
||||||
void ChooseMonForInBattleItem(void)
|
void ChooseMonForInBattleItem(void)
|
||||||
{
|
{
|
||||||
InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE, GetPartyLayoutFromBattleType(), PARTY_ACTION_REUSABLE_ITEM, FALSE, PARTY_MSG_USE_ON_WHICH_MON, sub_8120FCC, sub_8107ECC);
|
InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE, GetPartyLayoutFromBattleType(), PARTY_ACTION_REUSABLE_ITEM, FALSE, PARTY_MSG_USE_ON_WHICH_MON, sub_8120FCC, CB2_BagMenuFromBattle);
|
||||||
nullsub_44();
|
nullsub_44();
|
||||||
UpdatePartyToBattleOrder();
|
UpdatePartyToBattleOrder();
|
||||||
}
|
}
|
||||||
@@ -5919,7 +5919,7 @@ void sub_81279E0(void)
|
|||||||
FALSE,
|
FALSE,
|
||||||
PARTY_MSG_NONE,
|
PARTY_MSG_NONE,
|
||||||
sub_8120C3C,
|
sub_8120C3C,
|
||||||
sub_8107ECC);
|
CB2_BagMenuFromBattle);
|
||||||
sub_80EB2F4(8);
|
sub_80EB2F4(8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -5929,7 +5929,7 @@ void sub_81279E0(void)
|
|||||||
if (GetPocketByItemId(gSpecialVar_ItemId) == POCKET_BERRY_POUCH)
|
if (GetPocketByItemId(gSpecialVar_ItemId) == POCKET_BERRY_POUCH)
|
||||||
callback = CB2_ReturnToBerryPouchMenu;
|
callback = CB2_ReturnToBerryPouchMenu;
|
||||||
else
|
else
|
||||||
callback = sub_8107ECC;
|
callback = CB2_BagMenuFromBattle;
|
||||||
InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE,
|
InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE,
|
||||||
GetPartyLayoutFromBattleType(),
|
GetPartyLayoutFromBattleType(),
|
||||||
PARTY_ACTION_USE_ITEM,
|
PARTY_ACTION_USE_ITEM,
|
||||||
|
|||||||
+1
-1
@@ -322,7 +322,7 @@ static void Task_DepositItem_WaitFadeAndGoToBag(u8 taskId)
|
|||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
GoToBagMenu(3, POCKET_ITEMS - 1, CB2_ReturnToField);
|
GoToBagMenu(ITEMMENULOCATION_ITEMPC, OPEN_BAG_ITEMS, CB2_ReturnToField);
|
||||||
gFieldCallback = CB2_ReturnFromDepositMenu;
|
gFieldCallback = CB2_ReturnFromDepositMenu;
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -307,7 +307,7 @@ static void Task_HandleShopMenuSell(u8 taskId)
|
|||||||
|
|
||||||
static void CB2_GoToSellMenu(void)
|
static void CB2_GoToSellMenu(void)
|
||||||
{
|
{
|
||||||
GoToBagMenu(2, POCKET_POKE_BALLS, CB2_ReturnToField);
|
GoToBagMenu(ITEMMENULOCATION_SHOP, OPEN_BAG_LAST, CB2_ReturnToField);
|
||||||
gFieldCallback = MapPostLoadHook_ReturnToShopMenu;
|
gFieldCallback = MapPostLoadHook_ReturnToShopMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-12
@@ -34,16 +34,6 @@
|
|||||||
#include "fieldmap.h"
|
#include "fieldmap.h"
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
|
|
||||||
enum TeachyTvScript
|
|
||||||
{
|
|
||||||
TTVSCR_BATTLE,
|
|
||||||
TTVSCR_STATUS,
|
|
||||||
TTVSCR_MATCHUPS,
|
|
||||||
TTVSCR_CATCHING,
|
|
||||||
TTVSCR_TMS,
|
|
||||||
TTVSCR_REGISTER
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TeachyTvCtrlBlk
|
struct TeachyTvCtrlBlk
|
||||||
{
|
{
|
||||||
MainCallback callback;
|
MainCallback callback;
|
||||||
@@ -1103,9 +1093,9 @@ static void TTVcmd_TaskBattleOrFadeByOptionChosen(u8 taskId)
|
|||||||
static void TeachyTvSetupBagItemsByOptionChosen(void)
|
static void TeachyTvSetupBagItemsByOptionChosen(void)
|
||||||
{
|
{
|
||||||
if (sStaticResources.whichScript == TTVSCR_TMS)
|
if (sStaticResources.whichScript == TTVSCR_TMS)
|
||||||
sub_810B108(10);
|
InitPokeDudeBag(10);
|
||||||
else
|
else
|
||||||
sub_810B108(9);
|
InitPokeDudeBag(9);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TeachyTvPostBattleFadeControl(u8 taskId)
|
static void TeachyTvPostBattleFadeControl(u8 taskId)
|
||||||
|
|||||||
+3
-3
@@ -977,7 +977,7 @@ static void Task_SelectTMAction_FromSellMenu(u8 taskId)
|
|||||||
{
|
{
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat);
|
StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat);
|
||||||
TMCase_PrintMessageWithFollowupTask(taskId, sub_80BF8E4(), gStringVar4, Subtask_CloseContextMenuAndReturnToMain);
|
TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Subtask_CloseContextMenuAndReturnToMain);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -993,7 +993,7 @@ static void Task_SelectTMAction_FromSellMenu(u8 taskId)
|
|||||||
data[2] = 99;
|
data[2] = 99;
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell);
|
StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell);
|
||||||
TMCase_PrintMessageWithFollowupTask(taskId, sub_80BF8E4(), gStringVar4, Task_InitQuantitySelectUI);
|
TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_InitQuantitySelectUI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1004,7 +1004,7 @@ static void Task_AskConfirmSaleWithAmount(u8 taskId)
|
|||||||
|
|
||||||
ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6);
|
ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay);
|
StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay);
|
||||||
TMCase_PrintMessageWithFollowupTask(taskId, sub_80BF8E4(), gStringVar4, Task_PlaceYesNoBox);
|
TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_PlaceYesNoBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Task_PlaceYesNoBox(u8 taskId)
|
static void Task_PlaceYesNoBox(u8 taskId)
|
||||||
|
|||||||
+1
-30
@@ -335,36 +335,7 @@ gUnknown_203ACF0: @ 203ACF0
|
|||||||
.align 2
|
.align 2
|
||||||
.include "src/list_menu.o"
|
.include "src/list_menu.o"
|
||||||
.align 2
|
.align 2
|
||||||
gUnknown_203ACFC: @ 203ACFC
|
.include "src/item_menu.o"
|
||||||
.space 0x14
|
|
||||||
|
|
||||||
gUnknown_203AD10: @ 203AD10
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_203AD14: @ 203AD14
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_203AD18: @ 203AD18
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_203AD1C: @ 203AD1C
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_203AD20: @ 203AD20
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_203AD24: @ 203AD24
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_203AD28: @ 203AD28
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_203AD2C: @ 203AD2C
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gSpecialVar_ItemId: @ 203AD30
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
.include "src/bag.o"
|
.include "src/bag.o"
|
||||||
.align 2
|
.align 2
|
||||||
|
|||||||
Reference in New Issue
Block a user