mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Merge pull request #1074 from Sierraffinity/item-menu-cleanup
Begin item_menu.c cleanup
This commit is contained in:
commit
46f4a4bbf7
@ -16,5 +16,9 @@
|
||||
#define KEYITEMS_POCKET 4
|
||||
#define POCKETS_COUNT 5
|
||||
|
||||
// The TM/HM pocket is the largest pocket, so the maximum amount of items
|
||||
// in a pocket is its count + 1 for the cancel option
|
||||
#define MAX_POCKET_ITEMS (BAG_TMHM_COUNT + 1)
|
||||
|
||||
|
||||
#endif // GUARD_ITEM_CONSTANTS_H
|
||||
|
@ -4,19 +4,35 @@
|
||||
#include "item.h"
|
||||
#include "menu_helpers.h"
|
||||
|
||||
#define RETURN_LOCATION_FIELD 0
|
||||
#define RETURN_LOCATION_BATTLE 1
|
||||
#define RETURN_LOCATION_POKEMON_LIST 2
|
||||
#define RETURN_LOCATION_SHOP 3
|
||||
#define RETURN_LOCATION_FIELD_2 4
|
||||
#define RETURN_LOCATION_FIELD_3 5
|
||||
#define RETURN_LOCATION_PC 6
|
||||
#define RETURN_LOCATION_FIELD_4 7
|
||||
#define RETURN_LOCATION_FIELD_5 8
|
||||
#define RETURN_LOCATION_FIELD_6 9
|
||||
#define RETURN_LOCATION_BATTLE_2 10
|
||||
#define RETURN_LOCATION_PC_2 11
|
||||
#define RETURN_LOCATION_UNCHANGED 12
|
||||
#define ITEMMENULOCATION_FIELD 0
|
||||
#define ITEMMENULOCATION_BATTLE 1
|
||||
#define ITEMMENULOCATION_PARTY 2
|
||||
#define ITEMMENULOCATION_SHOP 3
|
||||
#define ITEMMENULOCATION_BERRY_TREE 4
|
||||
#define ITEMMENULOCATION_BERRY_BLENDER_CRUSH 5
|
||||
#define ITEMMENULOCATION_ITEMPC 6
|
||||
#define ITEMMENULOCATION_FAVOR_LADY 7
|
||||
#define ITEMMENULOCATION_QUIZ_LADY 8
|
||||
#define ITEMMENULOCATION_APPRENTICE 9
|
||||
#define ITEMMENULOCATION_WALLY 10
|
||||
#define ITEMMENULOCATION_PCBOX 11
|
||||
#define ITEMMENULOCATION_LAST 12
|
||||
|
||||
#define ITEMMENUACTION_USE 0
|
||||
#define ITEMMENUACTION_TOSS 1
|
||||
#define ITEMMENUACTION_REGISTER 2
|
||||
#define ITEMMENUACTION_GIVE 3
|
||||
#define ITEMMENUACTION_CANCEL 4
|
||||
#define ITEMMENUACTION_BATTLE_USE 5
|
||||
#define ITEMMENUACTION_CHECK 6
|
||||
#define ITEMMENUACTION_WALK 7
|
||||
#define ITEMMENUACTION_DESELECT 8
|
||||
#define ITEMMENUACTION_CHECK_TAG 9
|
||||
#define ITEMMENUACTION_CONFIRM 10
|
||||
#define ITEMMENUACTION_SHOW 11
|
||||
#define ITEMMENUACTION_GIVE_2 12
|
||||
#define ITEMMENUACTION_CONFIRM_2 13
|
||||
#define ITEMMENUACTION_DUMMY 14
|
||||
|
||||
// Exported type declarations
|
||||
struct BagStruct
|
||||
@ -33,29 +49,27 @@ extern struct BagStruct gBagPositionStruct;
|
||||
|
||||
struct BagMenuStruct
|
||||
{
|
||||
void (*mainCallback2)(void);
|
||||
void (*exitCallback)(void);
|
||||
u8 tilemapBuffer[0x800];
|
||||
u8 spriteId[12];
|
||||
u8 windowPointers[7];
|
||||
u8 unk817;
|
||||
u8 unk818;
|
||||
u8 unk819;
|
||||
u8 unk81A;
|
||||
u8 unk81B:4;
|
||||
u8 unk81B_1:2;
|
||||
u8 unk81B_3:1;
|
||||
u8 itemOriginalLocation;
|
||||
u8 pocketSwitchDisabled:4;
|
||||
u8 itemIconSlot:2;
|
||||
u8 inhibitItemDescriptionPrint:1;
|
||||
u8 hideCloseBagText:1;
|
||||
u8 filler3[2];
|
||||
u8 unk81E;
|
||||
u8 unk81F;
|
||||
const u8* unk820;
|
||||
u8 unk824;
|
||||
u8 unk825;
|
||||
u8 filler[2];
|
||||
u8 unk828;
|
||||
u8 pocketScrollArrowsTask;
|
||||
u8 pocketSwitchArrowsTask;
|
||||
const u8* contextMenuItemsPtr;
|
||||
u8 contextMenuItemsBuffer[4];
|
||||
u8 contextMenuNumItems;
|
||||
u8 numItemStacks[POCKETS_COUNT];
|
||||
u8 numShownItems[6];
|
||||
s16 unk834;
|
||||
s16 graphicsLoadState;
|
||||
u8 filler4[0xE];
|
||||
u8 pocketNameBuffer[32][32];
|
||||
u8 filler2[4];
|
||||
@ -68,11 +82,11 @@ extern struct BagMenuStruct *gBagMenu;
|
||||
extern u16 gSpecialVar_ItemId;
|
||||
|
||||
// Exported ROM declarations
|
||||
void sub_81AAC14(void);
|
||||
void CB2_GoToItemDepositMenu(void);
|
||||
void FavorLadyOpenBagMenu(void);
|
||||
void QuizLadyOpenBagMenu(void);
|
||||
void ApprenticeOpenBagMenu(void);
|
||||
void sub_81AABB0(void);
|
||||
void CB2_BagMenuFromBattle(void);
|
||||
void SetInitialScrollAndCursorPositions(u8 pocketId);
|
||||
void CB2_ReturnToBagMenuPocket(void);
|
||||
void CB2_BagMenuFromStartMenu(void);
|
||||
|
@ -10,7 +10,7 @@ extern const struct CompressedSpritePalette gBerryCheckCirclePaletteTable;
|
||||
void RemoveBagSprite(u8 id);
|
||||
void AddBagVisualSprite(u8 bagPocketId);
|
||||
void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets);
|
||||
void ShakeBagVisual(void);
|
||||
void ShakeBagSprite(void);
|
||||
void AddSwitchPocketRotatingBallSprite(s16 rotationDirection);
|
||||
void AddBagItemIconSprite(u16 itemId, u8 id);
|
||||
void RemoveBagItemIconSprite(u8 id);
|
||||
|
@ -49,16 +49,16 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const
|
||||
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
||||
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
||||
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
||||
void schedule_bg_copy_tilemap_to_vram(u8 bgNum);
|
||||
void ScheduleBgCopyTilemapToVram(u8 bgNum);
|
||||
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
||||
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
|
||||
u8 Menu_GetCursorPos(void);
|
||||
s8 Menu_ProcessInput(void);
|
||||
s8 Menu_ProcessInputNoWrap(void);
|
||||
void blit_move_info_icon(u8 winId, u8 a2, u16 x, u16 y);
|
||||
void reset_temp_tile_data_buffers(void);
|
||||
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
||||
bool8 free_temp_tile_data_buffers_if_possible(void);
|
||||
void ResetTempTileDataBuffers(void);
|
||||
void *DecompressAndCopyTileDataToVram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
||||
bool8 FreeTempTileDataBuffersIfPossible(void);
|
||||
struct WindowTemplate CreateWindowTemplate(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock);
|
||||
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
|
||||
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
||||
|
@ -30,8 +30,8 @@ u8 GetLRKeysPressed(void);
|
||||
u8 GetLRKeysPressedAndHeld(void);
|
||||
bool8 sub_8122148(u16 itemId);
|
||||
bool8 itemid_80BF6D8_mail_related(u16 itemId);
|
||||
bool8 sub_81221AC(void);
|
||||
bool8 sub_81221EC(void);
|
||||
bool8 MenuHelpers_LinkSomething(void);
|
||||
bool8 MenuHelpers_CallLinkSomething(void);
|
||||
void sub_812220C(struct ItemSlot *slots, u8 count, u8 *arg2, u8 *usedSlotsCount, u8 maxUsedSlotsCount);
|
||||
void sub_812225C(u16 *scrollOffset, u16 *cursorPos, u8 maxShownItems, u8 numItems);
|
||||
void sub_8122298(u16 *arg0, u16 *arg1, u8 arg2, u8 arg3, u8 arg4);
|
||||
|
@ -1361,7 +1361,7 @@ static void OpenBagAndChooseItem(void)
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteWhenChoseItem;
|
||||
nullsub_35();
|
||||
FreeAllWindowBuffers();
|
||||
sub_81AABB0();
|
||||
CB2_BagMenuFromBattle();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ static void sub_81C5038(void)
|
||||
|
||||
static void sub_81C504C(void)
|
||||
{
|
||||
while (sub_81221EC() != TRUE && sub_81C5078() != TRUE && sub_81221AC() != TRUE);
|
||||
while (MenuHelpers_CallLinkSomething() != TRUE && sub_81C5078() != TRUE && MenuHelpers_LinkSomething() != TRUE);
|
||||
}
|
||||
|
||||
static bool8 sub_81C5078(void)
|
||||
@ -445,7 +445,7 @@ static bool8 sub_81C5078(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 5:
|
||||
if (!sub_81221AC())
|
||||
if (!MenuHelpers_LinkSomething())
|
||||
{
|
||||
ResetTasks();
|
||||
}
|
||||
@ -516,7 +516,7 @@ static void sub_81C51DC(void)
|
||||
InitBgsFromTemplates(0, gUnknown_0861F2B4, ARRAY_COUNT(gUnknown_0861F2B4));
|
||||
SetBgTilemapBuffer(2, gPyramidBagResources->tilemapBuffer);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 |
|
||||
DISPCNT_OBJ_1D_MAP |
|
||||
DISPCNT_OBJ_ON);
|
||||
@ -531,12 +531,12 @@ static bool8 sub_81C5238(void)
|
||||
switch (gPyramidBagResources->state)
|
||||
{
|
||||
case 0:
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(2, gBagScreen_Gfx, 0, 0, 0);
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(2, gBagScreen_Gfx, 0, 0, 0);
|
||||
gPyramidBagResources->state++;
|
||||
break;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
LZDecompressWram(gBattleFrontierGfx_PyramidBagTileMap, gPyramidBagResources->tilemapBuffer);
|
||||
gPyramidBagResources->state++;
|
||||
@ -837,7 +837,7 @@ static void sub_81C5B4C(u8 taskId)
|
||||
static void Task_HandlePyramidBagInput(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
if (sub_81221EC() != TRUE && !gPaletteFade.active)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active)
|
||||
{
|
||||
if (gMain.newKeys & SELECT_BUTTON)
|
||||
{
|
||||
@ -940,7 +940,7 @@ static void sub_81C5F08(u8 windowId, u8 horizontalCount, u8 verticalCount)
|
||||
|
||||
static void HandleFewMenuActionsInput(u8 taskId)
|
||||
{
|
||||
if (sub_81221EC() != TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
s32 id = Menu_ProcessInputNoWrap();
|
||||
switch (id)
|
||||
@ -962,7 +962,7 @@ static void HandleFewMenuActionsInput(u8 taskId)
|
||||
|
||||
static void HandleMenuActionInput(u8 taskId)
|
||||
{
|
||||
if (sub_81221EC() != TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
s8 id = Menu_GetCursorPos();
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
@ -1049,7 +1049,7 @@ static void BagAction_UseOnField(u8 taskId)
|
||||
{
|
||||
sub_81C61A8();
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0));
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
|
||||
}
|
||||
}
|
||||
@ -1060,8 +1060,8 @@ static void BagAction_Cancel(u8 taskId)
|
||||
|
||||
sub_81C61A8();
|
||||
PrintItemDescription(data[1]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
sub_81C5A98(data[0], 0);
|
||||
SetTaskToMainPyramidBagInputHandler(taskId);
|
||||
}
|
||||
@ -1148,7 +1148,7 @@ static void sub_81C64B4(u8 taskId)
|
||||
PlaySE(SE_SELECT);
|
||||
ClearStdWindowAndFrameToTransparent(3, 0);
|
||||
ClearWindowTilemap(3);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
sub_81C6350(taskId);
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
@ -1156,7 +1156,7 @@ static void sub_81C64B4(u8 taskId)
|
||||
PlaySE(SE_SELECT);
|
||||
ClearStdWindowAndFrameToTransparent(3, 0);
|
||||
ClearWindowTilemap(3);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
DontTossItem(taskId);
|
||||
}
|
||||
}
|
||||
@ -1188,7 +1188,7 @@ static void sub_81C65CC(u8 taskId)
|
||||
sub_81C59BC();
|
||||
SetBagItemsListTemplate();
|
||||
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollOffset, *selectedRow);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
SetTaskToMainPyramidBagInputHandler(taskId);
|
||||
}
|
||||
}
|
||||
@ -1275,7 +1275,7 @@ static void Task_BeginItemSwap(u8 taskId)
|
||||
static void Task_ItemSwapHandleInput(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
if (sub_81221EC() != TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
if (gMain.newKeys & SELECT_BUTTON)
|
||||
{
|
||||
@ -1400,8 +1400,8 @@ static void sub_81C6BD8(void)
|
||||
|
||||
PutWindowTilemap(0);
|
||||
PutWindowTilemap(1);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void PrintOnWindow_Font1(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
@ -1417,7 +1417,7 @@ static void PrintOnWindow_Font7(u8 windowId, const u8 *src, u8 x, u8 y, u8 lette
|
||||
static void sub_81C6CEC(u8 windowId)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, 0, 1, 0xE);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static u8 sub_81C6D08(u8 windowArrayId)
|
||||
@ -1432,7 +1432,7 @@ static u8 sub_81C6D24(u8 windowArrayId)
|
||||
{
|
||||
*windowId = AddWindow(&gUnknown_0861F350[windowArrayId]);
|
||||
DrawStdFrameWithCustomTileAndPalette(*windowId, FALSE, 1, 0xE);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
return *windowId;
|
||||
}
|
||||
@ -1445,7 +1445,7 @@ static void sub_81C6D6C(u8 windowArrayId)
|
||||
ClearStdWindowAndFrameToTransparent(*windowId, FALSE);
|
||||
ClearWindowTilemap(*windowId);
|
||||
RemoveWindow(*windowId);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
*windowId = 0xFF;
|
||||
}
|
||||
}
|
||||
@ -1459,7 +1459,7 @@ void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback
|
||||
{
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(1));
|
||||
DisplayMessageAndContinueTask(taskId, 2, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void CloseBattlePyramidBagTextWindow(void)
|
||||
@ -1467,7 +1467,7 @@ static void CloseBattlePyramidBagTextWindow(void)
|
||||
ClearDialogWindowAndFrameToTransparent(2, FALSE);
|
||||
// This ClearWindowTilemap call is redundant, since ClearDialogWindowAndFrameToTransparent already calls it.
|
||||
ClearWindowTilemap(2);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
#define ITEM_IMAGE_TAG 0x1024
|
||||
|
@ -1031,7 +1031,7 @@ int sub_802104C(void)
|
||||
SetHBlankCallback(NULL);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
ScanlineEffect_Stop();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
break;
|
||||
case 1:
|
||||
CpuFill16(0, (void *)OAM, OAM_SIZE);
|
||||
@ -1069,10 +1069,10 @@ int sub_802104C(void)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
decompress_and_copy_tile_data_to_vram(1, gUnknown_08DE34B8, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_08DE34B8, 0, 0, 0);
|
||||
break;
|
||||
case 6:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return 0;
|
||||
|
||||
InitStandardTextBoxWindows();
|
||||
|
@ -201,11 +201,11 @@ static void CB2_InitBerryTagScreen(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (sub_81221EC() == TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() == TRUE)
|
||||
break;
|
||||
if (InitBerryTagScreen() == TRUE)
|
||||
break;
|
||||
if (sub_81221AC() == TRUE)
|
||||
if (MenuHelpers_LinkSomething() == TRUE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -238,7 +238,7 @@ static bool8 InitBerryTagScreen(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 5:
|
||||
if (!sub_81221AC())
|
||||
if (!MenuHelpers_LinkSomething())
|
||||
ResetTasks();
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -301,8 +301,8 @@ static void HandleInitBackgrounds(void)
|
||||
SetBgTilemapBuffer(2, sBerryTag->tilemapBuffers[0]);
|
||||
SetBgTilemapBuffer(3, sBerryTag->tilemapBuffers[1]);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
ShowBg(0);
|
||||
@ -318,12 +318,12 @@ static bool8 LoadBerryTagGfx(void)
|
||||
switch (sBerryTag->gfxState)
|
||||
{
|
||||
case 0:
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(2, gBerryCheck_Gfx, 0, 0, 0);
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(2, gBerryCheck_Gfx, 0, 0, 0);
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
LZDecompressWram(gBerryTag_Gfx, sBerryTag->tilemapBuffers[0]);
|
||||
sBerryTag->gfxState++;
|
||||
@ -371,8 +371,8 @@ static void HandleInitWindows(void)
|
||||
LoadPalette(sFontPalette, 0xF0, 0x20);
|
||||
for (i = 0; i < ARRAY_COUNT(sWindowTemplates) - 1; i++)
|
||||
PutWindowTilemap(i);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed, u8 colorStructId)
|
||||
@ -386,7 +386,7 @@ static void AddBerryTagTextToBg0(void)
|
||||
FillWindowPixelBuffer(WIN_BERRY_TAG, PIXEL_FILL(15));
|
||||
PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(1, gText_BerryTag, 0x40), 1, 0, 1);
|
||||
PutWindowTilemap(WIN_BERRY_TAG);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void PrintAllBerryData(void)
|
||||
|
@ -265,7 +265,7 @@ static void CableCarMainCallback_Setup(void)
|
||||
ResetTasks();
|
||||
FreeAllSpritePalettes();
|
||||
ResetPaletteFade();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
StartWeather();
|
||||
for (i = 0; i < 20; i++)
|
||||
gWeatherPtr->sprites.s2.ashSprites[i] = NULL;
|
||||
@ -291,11 +291,11 @@ static void CableCarMainCallback_Setup(void)
|
||||
sCableCar->mountainTilemap = malloc_and_decompress(gCableCarMountainTilemap, &sizeOut);
|
||||
sCableCar->pylonStemTilemap = malloc_and_decompress(gCableCarPylonStemTilemap, &sizeOut);
|
||||
sCableCar->pylonHookTilemapEntries = gCableCarPylonHookTilemapEntries;
|
||||
decompress_and_copy_tile_data_to_vram(0, gUnknown_08DBA5B8, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(0, gUnknown_08DBA5B8, 0, 0, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 3:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
LoadPalette(gUnknown_08DBA518, 0, 0x80);
|
||||
gMain.state++;
|
||||
|
@ -541,7 +541,7 @@ static u8 AddDecorationWindow(u8 windowIndex)
|
||||
}
|
||||
|
||||
DrawStdFrameWithCustomTileAndPalette(*windowId, FALSE, 0x214, 14);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
return *windowId;
|
||||
}
|
||||
|
||||
@ -550,7 +550,7 @@ static void RemoveDecorationWindow(u8 windowIndex)
|
||||
ClearStdWindowAndFrameToTransparent(sDecorMenuWindowIds[windowIndex], FALSE);
|
||||
ClearWindowTilemap(sDecorMenuWindowIds[windowIndex]);
|
||||
RemoveWindow(sDecorMenuWindowIds[windowIndex]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void AddDecorationActionsWindow(void)
|
||||
@ -729,7 +729,7 @@ static void PrintDecorationCategoryMenuItems(u8 taskId)
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized(windowId, 1, gTasks[taskId].tDecorationMenuCommand == DECOR_MENU_TRADE ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void PrintDecorationCategoryMenuItem(u8 winid, u8 category, u8 x, u8 y, bool8 disabled, u8 speed)
|
||||
|
@ -76,9 +76,9 @@ void CB2_ShowDiploma(void)
|
||||
sDiplomaTilemapPtr = malloc(0x1000);
|
||||
InitDiplomaBg();
|
||||
InitDiplomaWindow();
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(1, &sDiplomaTiles, 0, 0, 0);
|
||||
while (free_temp_tile_data_buffers_if_possible())
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(1, &sDiplomaTiles, 0, 0, 0);
|
||||
while (FreeTempTileDataBuffersIfPossible())
|
||||
;
|
||||
LZDecompressWram(sDiplomaTilemap, sDiplomaTilemapPtr);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
|
@ -4644,16 +4644,16 @@ static bool32 sub_802A8E8(void)
|
||||
LoadPalette(gDodrioBerryBgPal1, 0, sizeof(gDodrioBerryBgPal1));
|
||||
break;
|
||||
case 1:
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
break;
|
||||
case 2:
|
||||
decompress_and_copy_tile_data_to_vram(3, gDodrioBerryBgGfx1, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(3, gDodrioBerryBgGfx1, 0, 0, 0);
|
||||
break;
|
||||
case 3:
|
||||
decompress_and_copy_tile_data_to_vram(1, gDodrioBerryBgGfx2, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gDodrioBerryBgGfx2, 0, 0, 0);
|
||||
break;
|
||||
case 4:
|
||||
if (free_temp_tile_data_buffers_if_possible() == TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() == TRUE)
|
||||
return FALSE;
|
||||
break;
|
||||
case 5:
|
||||
|
@ -490,7 +490,7 @@ static void CB2_EggHatch_0(void)
|
||||
SetVBlankCallback(VBlankCB_EggHatch);
|
||||
gSpecialVar_0x8005 = GetCurrentMapMusic();
|
||||
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, sBgTemplates_EggHatch, ARRAY_COUNT(sBgTemplates_EggHatch));
|
||||
|
||||
|
@ -306,9 +306,9 @@ static void DrawMetatile(s32 metatileLayerType, u16 *metatiles, u16 offset)
|
||||
gBGTilemapBuffers2[offset + 0x21] = metatiles[7];
|
||||
break;
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
}
|
||||
|
||||
static s32 MapPosToBgTilemapOffset(struct FieldCameraOffset *cameraOffset, s32 x, s32 y)
|
||||
|
@ -153,7 +153,7 @@ static void FieldUpdateRegionMap(void)
|
||||
DrawStdFrameWithCustomTileAndPalette(1, 0, 0x27, 0xd);
|
||||
offset = GetStringCenterAlignXOffset(1, gText_Hoenn, 0x38);
|
||||
AddTextPrinterParameterized(1, 1, gText_Hoenn, offset, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
DrawStdFrameWithCustomTileAndPalette(0, 0, 0x27, 0xd);
|
||||
PrintRegionMapSecName();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
@ -208,7 +208,7 @@ static void PrintRegionMapSecName(void)
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1137,7 +1137,7 @@ static void Task_OrbEffect(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ);
|
||||
SetBgTilemapPalette(0, 0, 0, 0x1E, 0x14, 0xF);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
SetOrbFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], tCenterX, tCenterY, 1);
|
||||
CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480);
|
||||
ScanlineEffect_SetParams(sFlashEffectParams);
|
||||
|
@ -2642,7 +2642,7 @@ static void Task_ShowScrollableMultichoice(u8 taskId)
|
||||
|
||||
ScrollableMultichoice_UpdateScrollArrows(taskId);
|
||||
task->tListTaskId = ListMenuInit(&gScrollableMultichoice_ListMenuTemplate, task->tScrollOffset, task->tSelectedRow);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = ScrollableMultichoice_ProcessInput;
|
||||
}
|
||||
|
||||
|
@ -950,7 +950,7 @@ void copy_tileset_patterns_to_vram(struct Tileset const *tileset, u16 numTiles,
|
||||
if (!tileset->isCompressed)
|
||||
LoadBgTiles(2, tileset->tiles, numTiles * 32, offset);
|
||||
else
|
||||
decompress_and_copy_tile_data_to_vram(2, tileset->tiles, numTiles * 32, offset, 0);
|
||||
DecompressAndCopyTileDataToVram(2, tileset->tiles, numTiles * 32, offset, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ static void Task_DisplayHPRestoredMessage(u8 taskId)
|
||||
GetMonNickname(&gPlayerParty[gPartyMenu.slotId2], gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2);
|
||||
DisplayPartyMenuMessage(gStringVar4, FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_FinishSoftboiled;
|
||||
}
|
||||
|
||||
@ -106,6 +106,6 @@ static void CantUseSoftboiledOnMon(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayPartyMenuMessage(gText_CantBeUsedOnPkmn, FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_ChooseNewMonForSoftboiled;
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ static bool32 InitFrontierPass(void)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
ResetPaletteFade();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
break;
|
||||
case 3:
|
||||
AllocateFrontierPassGfx();
|
||||
@ -719,11 +719,11 @@ static bool32 InitFrontierPass(void)
|
||||
sPassGfx->unk20 = malloc_and_decompress(gUnknown_085712F8, &sizeOut);
|
||||
sPassGfx->unk24 = malloc_and_decompress(gUnknown_08571060, &sizeOut);
|
||||
sPassGfx->unk28 = malloc_and_decompress(gUnknown_085712C0, &sizeOut);
|
||||
decompress_and_copy_tile_data_to_vram(1, gUnknown_08DE08C8, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_08DE2084, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_08DE08C8, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gUnknown_08DE2084, 0, 0, 0);
|
||||
break;
|
||||
case 7:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return FALSE;
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 30, 20);
|
||||
@ -1353,7 +1353,7 @@ static bool32 InitFrontierMap(void)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
ResetPaletteFade();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
break;
|
||||
case 3:
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
@ -1372,10 +1372,10 @@ static bool32 InitFrontierMap(void)
|
||||
InitWindows(sMapWindowTemplates);
|
||||
DeactivateAllTextPrinters();
|
||||
PrintOnFrontierMap();
|
||||
decompress_and_copy_tile_data_to_vram(1, gUnknown_0856FBBC, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_0856FBBC, 0, 0, 0);
|
||||
break;
|
||||
case 5:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return FALSE;
|
||||
LoadPalette(gUnknown_08DE07C8[0], 0, 0x1A0);
|
||||
LoadPalette(stdpal_get(0), 0xF0, 0x20);
|
||||
|
@ -1255,7 +1255,7 @@ static void sub_8174F70(void)
|
||||
ScanlineEffect_Stop();
|
||||
ResetTasks();
|
||||
ResetSpriteData();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
ResetAllPicSprites();
|
||||
FreeAllSpritePalettes();
|
||||
gReservedSpritePaletteCount = 8;
|
||||
@ -1282,10 +1282,10 @@ static bool8 sub_8175024(void)
|
||||
switch (sHofGfxPtr->state)
|
||||
{
|
||||
case 0:
|
||||
decompress_and_copy_tile_data_to_vram(1, sHallOfFame_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, sHallOfFame_Gfx, 0, 0, 0);
|
||||
break;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return TRUE;
|
||||
break;
|
||||
case 2:
|
||||
|
781
src/item_menu.c
781
src/item_menu.c
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ struct CompressedTilesPal
|
||||
|
||||
// this file's functions
|
||||
static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite);
|
||||
static void SpriteCB_ShakeBagVisual(struct Sprite *sprite);
|
||||
static void SpriteCB_ShakeBagSprite(struct Sprite *sprite);
|
||||
static void SpriteCB_SwitchPocketRotatingBallInit(struct Sprite *sprite);
|
||||
static void SpriteCB_SwitchPocketRotatingBallContinue(struct Sprite *sprite);
|
||||
|
||||
@ -456,17 +456,17 @@ static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void ShakeBagVisual(void)
|
||||
void ShakeBagSprite(void)
|
||||
{
|
||||
struct Sprite *sprite = &gSprites[gBagMenu->spriteId[0]];
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
sprite->callback = SpriteCB_ShakeBagVisual;
|
||||
sprite->callback = SpriteCB_ShakeBagSprite;
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_ShakeBagVisual(struct Sprite *sprite)
|
||||
static void SpriteCB_ShakeBagSprite(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ static void SetUpItemUseCallback(u8 taskId)
|
||||
type = ItemId_GetType(gSpecialVar_ItemId) - 1;
|
||||
if (!InBattlePyramid())
|
||||
{
|
||||
gBagMenu->mainCallback2 = sItemUseCallbacks[type];
|
||||
gBagMenu->exitCallback = sItemUseCallbacks[type];
|
||||
Task_FadeAndCloseBagMenu(taskId);
|
||||
}
|
||||
else
|
||||
@ -192,7 +192,7 @@ static void CB2_CheckMail(void)
|
||||
|
||||
void ItemUseOutOfBattle_Mail(u8 taskId)
|
||||
{
|
||||
gBagMenu->mainCallback2 = CB2_CheckMail;
|
||||
gBagMenu->exitCallback = CB2_CheckMail;
|
||||
Task_FadeAndCloseBagMenu(taskId);
|
||||
}
|
||||
|
||||
@ -611,13 +611,13 @@ static void Task_StandingOnHiddenItem(u8 taskId)
|
||||
|
||||
void ItemUseOutOfBattle_PokeblockCase(u8 taskId)
|
||||
{
|
||||
if (sub_81221AC() == TRUE) // link func
|
||||
if (MenuHelpers_LinkSomething() == TRUE) // link func
|
||||
{
|
||||
DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].tUsingRegisteredKeyItem);
|
||||
}
|
||||
else if (gTasks[taskId].tUsingRegisteredKeyItem != TRUE)
|
||||
{
|
||||
gBagMenu->mainCallback2 = CB2_OpenPokeblockCaseOnField;
|
||||
gBagMenu->exitCallback = CB2_OpenPokeblockCaseOnField;
|
||||
Task_FadeAndCloseBagMenu(taskId);
|
||||
}
|
||||
else
|
||||
@ -679,7 +679,7 @@ void ItemUseOutOfBattle_Berry(u8 taskId)
|
||||
{
|
||||
sItemUseOnFieldCB = ItemUseOnFieldCB_Berry;
|
||||
gFieldCallback = FieldCB_UseItemOnField;
|
||||
gBagMenu->mainCallback2 = CB2_ReturnToField;
|
||||
gBagMenu->exitCallback = CB2_ReturnToField;
|
||||
Task_FadeAndCloseBagMenu(taskId);
|
||||
}
|
||||
else
|
||||
@ -1003,7 +1003,7 @@ static void ItemUseInBattle_ShowPartyMenu(u8 taskId)
|
||||
{
|
||||
if (!InBattlePyramid())
|
||||
{
|
||||
gBagMenu->mainCallback2 = ChooseMonForInBattleItem;
|
||||
gBagMenu->exitCallback = ChooseMonForInBattleItem;
|
||||
Task_FadeAndCloseBagMenu(taskId);
|
||||
}
|
||||
else
|
||||
|
@ -1657,7 +1657,7 @@ void CB2_LinkError(void)
|
||||
if (InitWindows(gUnknown_082ED204))
|
||||
{
|
||||
DeactivateAllTextPrinters();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
|
@ -323,7 +323,7 @@ static bool8 MailReadBuildGraphics(void)
|
||||
break;
|
||||
case 5:
|
||||
FreeAllSpritePalettes();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, 0);
|
||||
@ -346,10 +346,10 @@ static bool8 MailReadBuildGraphics(void)
|
||||
DeactivateAllTextPrinters();
|
||||
break;
|
||||
case 8:
|
||||
decompress_and_copy_tile_data_to_vram(1, sUnknown_0859F2B8[sMailRead->mailType].tiles, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, sUnknown_0859F2B8[sMailRead->mailType].tiles, 0, 0, 0);
|
||||
break;
|
||||
case 9:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -438,7 +438,7 @@ static void CB2_InitMailRead(void)
|
||||
SetMainCallback2(CB2_MailRead);
|
||||
break;
|
||||
}
|
||||
} while (sub_81221AC() != TRUE);
|
||||
} while (MenuHelpers_LinkSomething() != TRUE);
|
||||
}
|
||||
|
||||
static void sub_8121A1C(void)
|
||||
|
@ -1182,7 +1182,7 @@ static bool32 LoadMatchCallWindowGfx(u8 taskId)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!decompress_and_copy_tile_data_to_vram(0, sPokeNavIconGfx, 0, 0x279, 0))
|
||||
if (!DecompressAndCopyTileDataToVram(0, sPokeNavIconGfx, 0, 0x279, 0))
|
||||
{
|
||||
RemoveWindow(taskData[2]);
|
||||
DestroyTask(taskId);
|
||||
@ -1199,7 +1199,7 @@ static bool32 LoadMatchCallWindowGfx(u8 taskId)
|
||||
static bool32 MoveMatchCallWindowToVram(u8 taskId)
|
||||
{
|
||||
s16 *taskData = gTasks[taskId].data;
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return FALSE;
|
||||
|
||||
PutWindowTilemap(taskData[2]);
|
||||
|
@ -1742,7 +1742,7 @@ void clear_scheduled_bg_copies_to_vram(void)
|
||||
memset(gUnknown_0203CDA4, 0, sizeof(gUnknown_0203CDA4));
|
||||
}
|
||||
|
||||
void schedule_bg_copy_tilemap_to_vram(u8 bgId)
|
||||
void ScheduleBgCopyTilemapToVram(u8 bgId)
|
||||
{
|
||||
gUnknown_0203CDA4[bgId] = TRUE;
|
||||
}
|
||||
@ -1771,7 +1771,7 @@ void do_scheduled_bg_tilemap_copies_to_vram(void)
|
||||
}
|
||||
}
|
||||
|
||||
void reset_temp_tile_data_buffers(void)
|
||||
void ResetTempTileDataBuffers(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < (s32)ARRAY_COUNT(gUnknown_0203CDAC); i++)
|
||||
@ -1781,7 +1781,7 @@ void reset_temp_tile_data_buffers(void)
|
||||
gUnknown_0203CDA8 = 0;
|
||||
}
|
||||
|
||||
bool8 free_temp_tile_data_buffers_if_possible(void)
|
||||
bool8 FreeTempTileDataBuffersIfPossible(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1803,7 +1803,7 @@ bool8 free_temp_tile_data_buffers_if_possible(void)
|
||||
}
|
||||
}
|
||||
|
||||
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode)
|
||||
void *DecompressAndCopyTileDataToVram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode)
|
||||
{
|
||||
u32 sizeOut;
|
||||
if (gUnknown_0203CDA8 < ARRAY_COUNT(gUnknown_0203CDAC))
|
||||
|
@ -299,7 +299,7 @@ bool8 itemid_80BF6D8_mail_related(u16 itemId)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_81221AC(void)
|
||||
bool8 MenuHelpers_LinkSomething(void)
|
||||
{
|
||||
if (IsUpdateLinkStateCBActive() == TRUE || gReceivedRemoteLinkPlayers == 1)
|
||||
return TRUE;
|
||||
@ -309,13 +309,13 @@ bool8 sub_81221AC(void)
|
||||
|
||||
static bool8 sub_81221D0(void)
|
||||
{
|
||||
if (!sub_81221AC())
|
||||
if (!MenuHelpers_LinkSomething())
|
||||
return FALSE;
|
||||
else
|
||||
return sub_8087598();
|
||||
}
|
||||
|
||||
bool8 sub_81221EC(void)
|
||||
bool8 MenuHelpers_CallLinkSomething(void)
|
||||
{
|
||||
if (sub_81221D0() == TRUE)
|
||||
return TRUE;
|
||||
|
@ -704,7 +704,7 @@ void InitMoveRelearnerWindows(bool8 useContextWindow)
|
||||
DrawStdFrameWithCustomTileAndPalette(2, 0, 1, 0xE);
|
||||
DrawStdFrameWithCustomTileAndPalette(3, 0, 1, 0xE);
|
||||
nullsub_79();
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void nullsub_79(void)
|
||||
|
@ -200,13 +200,13 @@ s32 FadeToWonderCardMenu(void)
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
decompress_and_copy_tile_data_to_vram(2, sWonderCardData->unk_0170->tiles, 0, 0x008, 0);
|
||||
DecompressAndCopyTileDataToVram(2, sWonderCardData->unk_0170->tiles, 0, 0x008, 0);
|
||||
sWonderCardData->unk_0176[0] = AddWindow(&gUnknown_082F0E1C[0]);
|
||||
sWonderCardData->unk_0176[1] = AddWindow(&gUnknown_082F0E1C[1]);
|
||||
sWonderCardData->unk_0176[2] = AddWindow(&gUnknown_082F0E1C[2]);
|
||||
break;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return 0;
|
||||
LoadPalette(stdpal_get(1), 0x20, 0x20);
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
@ -600,12 +600,12 @@ s32 FadeToWonderNewsMenu(void)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
decompress_and_copy_tile_data_to_vram(3, sWonderNewsData->unk_01BC->tiles, 0, 8, 0);
|
||||
DecompressAndCopyTileDataToVram(3, sWonderNewsData->unk_01BC->tiles, 0, 8, 0);
|
||||
sWonderNewsData->unk_01C8[0] = AddWindow(&gUnknown_082F1DE8[0]);
|
||||
sWonderNewsData->unk_01C8[1] = AddWindow(&gUnknown_082F1DE8[1]);
|
||||
break;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return 0;
|
||||
LoadPalette(stdpal_get(1), 0x20, 0x20);
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
|
@ -796,7 +796,7 @@ static void HandleInput(bool8 showContest)
|
||||
sMoveRelearnerMenuSate.showContestInfo = FALSE;
|
||||
}
|
||||
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
MoveRelearnerShowHideHearts(GetCurrentSelectedMove());
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
|
@ -1858,7 +1858,7 @@ static bool32 map_loading_iteration_3(u8 *state)
|
||||
(*state)++;
|
||||
break;
|
||||
case 8:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
apply_map_tileset1_tileset2_palette(gMapHeader.mapLayout);
|
||||
(*state)++;
|
||||
@ -1933,7 +1933,7 @@ static bool32 load_map_stuff(u8 *state, u32 a2)
|
||||
(*state)++;
|
||||
break;
|
||||
case 8:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
apply_map_tileset1_tileset2_palette(gMapHeader.mapLayout);
|
||||
(*state)++;
|
||||
@ -2030,7 +2030,7 @@ static bool32 map_loading_iteration_2_link(u8 *state)
|
||||
(*state)++;
|
||||
break;
|
||||
case 7:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
apply_map_tileset1_tileset2_palette(gMapHeader.mapLayout);
|
||||
(*state)++;
|
||||
@ -2101,7 +2101,7 @@ static void sub_8086860(void)
|
||||
static void InitOverworldGraphicsRegisters(void)
|
||||
{
|
||||
clear_scheduled_bg_copies_to_vram();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WINOBJ_BG0);
|
||||
@ -2113,9 +2113,9 @@ static void InitOverworldGraphicsRegisters(void)
|
||||
| BLDCNT_TGT2_OBJ | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(13, 7));
|
||||
InitOverworldBgs();
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
ChangeBgX(1, 0, 0);
|
||||
|
104
src/party_menu.c
104
src/party_menu.c
@ -479,7 +479,7 @@ static void CB2_InitPartyMenu(void)
|
||||
{
|
||||
while (TRUE)
|
||||
{
|
||||
if (sub_81221EC() == TRUE || ShowPartyMenu() == TRUE || sub_81221AC() == TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() == TRUE || ShowPartyMenu() == TRUE || MenuHelpers_LinkSomething() == TRUE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -512,7 +512,7 @@ static bool8 ShowPartyMenu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 5:
|
||||
if (!sub_81221AC())
|
||||
if (!MenuHelpers_LinkSomething())
|
||||
ResetTasks();
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -645,7 +645,7 @@ static bool8 AllocPartyMenuBg(void)
|
||||
InitBgsFromTemplates(0, sPartyMenuBgTemplates, ARRAY_COUNT(sPartyMenuBgTemplates));
|
||||
SetBgTilemapBuffer(1, sPartyBgTilemapBuffer);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
ShowBg(0);
|
||||
@ -759,7 +759,7 @@ static void RenderPartyMenuBox(u8 slot)
|
||||
LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_MULTI_ALT);
|
||||
CopyWindowToVram(sPartyMenuBoxes[slot].windowId, 2);
|
||||
PutWindowTilemap(sPartyMenuBoxes[slot].windowId);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -792,7 +792,7 @@ static void RenderPartyMenuBox(u8 slot)
|
||||
AnimatePartySlot(slot, 0);
|
||||
}
|
||||
PutWindowTilemap(sPartyMenuBoxes[slot].windowId);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1086,7 +1086,7 @@ void AnimatePartySlot(u8 slot, u8 animNum)
|
||||
break;
|
||||
}
|
||||
PartyMenuStartSpriteAnim(spriteId, animNum);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static u8 GetPartyBoxPaletteFlags(u8 slot, u8 animNum)
|
||||
@ -1127,7 +1127,7 @@ static void DrawCancelConfirmButtons(void)
|
||||
{
|
||||
CopyToBgTilemapBufferRect_ChangePalette(1, sConfirmButton_Tilemap, 23, 16, 7, 2, 17);
|
||||
CopyToBgTilemapBufferRect_ChangePalette(1, sCancelButton_Tilemap, 23, 18, 7, 2, 17);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
bool8 IsMultiBattle(void)
|
||||
@ -1185,7 +1185,7 @@ u8 GetPartyMenuType(void)
|
||||
|
||||
void Task_HandleChooseMonInput(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active && sub_81221EC() != TRUE)
|
||||
if (!gPaletteFade.active && MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
s8 *slotPtr = GetCurrentPartySlotPtr();
|
||||
|
||||
@ -1322,7 +1322,7 @@ static void HandleChooseMonCancel(u8 taskId, s8 *slotPtr)
|
||||
PlaySE(SE_SELECT);
|
||||
if (DisplayCancelChooseMonYesNo(taskId) != TRUE)
|
||||
{
|
||||
if (!sub_81221AC())
|
||||
if (!MenuHelpers_LinkSomething())
|
||||
gSpecialVar_0x8004 = PARTY_SIZE + 1;
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
*slotPtr = PARTY_SIZE + 1;
|
||||
@ -1662,7 +1662,7 @@ bool8 IsPartyMenuTextPrinterActive(void)
|
||||
|
||||
static void Task_WaitForLinkAndReturnToChooseMon(u8 taskId)
|
||||
{
|
||||
if (sub_81221EC() != TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON);
|
||||
gTasks[taskId].func = Task_HandleChooseMonInput;
|
||||
@ -1675,7 +1675,7 @@ static void Task_ReturnToChooseMonAfterText(u8 taskId)
|
||||
{
|
||||
ClearStdWindowAndFrameToTransparent(6, 0);
|
||||
ClearWindowTilemap(6);
|
||||
if (sub_81221AC() == TRUE)
|
||||
if (MenuHelpers_LinkSomething() == TRUE)
|
||||
{
|
||||
gTasks[taskId].func = Task_WaitForLinkAndReturnToChooseMon;
|
||||
}
|
||||
@ -1693,7 +1693,7 @@ static void DisplayGaveHeldItemMessage(struct Pokemon *mon, u16 item, bool8 keep
|
||||
CopyItemName(item, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnWasGivenItem);
|
||||
DisplayPartyMenuMessage(gStringVar4, keepOpen);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void DisplayTookHeldItemMessage(struct Pokemon *mon, u16 item, bool8 keepOpen)
|
||||
@ -1702,7 +1702,7 @@ static void DisplayTookHeldItemMessage(struct Pokemon *mon, u16 item, bool8 keep
|
||||
CopyItemName(item, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ReceivedItemFromPkmn);
|
||||
DisplayPartyMenuMessage(gStringVar4, keepOpen);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void DisplayAlreadyHoldingItemSwitchMessage(struct Pokemon *mon, u16 item, bool8 keepOpen)
|
||||
@ -1711,7 +1711,7 @@ static void DisplayAlreadyHoldingItemSwitchMessage(struct Pokemon *mon, u16 item
|
||||
CopyItemName(item, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnAlreadyHoldingItemSwitch);
|
||||
DisplayPartyMenuMessage(gStringVar4, keepOpen);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void DisplaySwitchedHeldItemMessage(u16 item, u16 item2, bool8 keepOpen)
|
||||
@ -1720,7 +1720,7 @@ static void DisplaySwitchedHeldItemMessage(u16 item, u16 item2, bool8 keepOpen)
|
||||
CopyItemName(item2, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_SwitchedPkmnItem);
|
||||
DisplayPartyMenuMessage(gStringVar4, keepOpen);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void GiveItemToMon(struct Pokemon *mon, u16 item)
|
||||
@ -1919,7 +1919,7 @@ static void TryEnterMonForMinigame(u8 taskId, u8 slot)
|
||||
{
|
||||
PlaySE(SE_HAZURE);
|
||||
DisplayPartyMenuMessage(gText_PkmnCantParticipate, FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
|
||||
}
|
||||
}
|
||||
@ -1927,7 +1927,7 @@ static void TryEnterMonForMinigame(u8 taskId, u8 slot)
|
||||
static void CancelParticipationPrompt(u8 taskId)
|
||||
{
|
||||
DisplayPartyMenuMessage(gText_CancelParticipation, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_CancelParticipationYesNo;
|
||||
}
|
||||
|
||||
@ -2067,7 +2067,7 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf)
|
||||
}
|
||||
PutWindowTilemap(cancelWindowId);
|
||||
CopyWindowToVram(cancelWindowId, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2381,7 +2381,7 @@ static void PartyMenuRemoveWindow(u8 *ptr)
|
||||
ClearStdWindowAndFrameToTransparent(*ptr, 0);
|
||||
RemoveWindow(*ptr);
|
||||
*ptr = 0xFF;
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2427,7 +2427,7 @@ void DisplayPartyMenuStdMessage(u32 stringId)
|
||||
DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD);
|
||||
StringExpandPlaceholders(gStringVar4, sActionStringTable[stringId]);
|
||||
AddTextPrinterParameterized(*windowPtr, 1, gStringVar4, 0, 1, 0, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2487,7 +2487,7 @@ static u8 DisplaySelectionWindow(u8 windowType)
|
||||
}
|
||||
|
||||
InitMenuInUpperLeftCorner(sPartyMenuInternal->windowId[0], sPartyMenuInternal->numActions, 0, 1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
|
||||
return sPartyMenuInternal->windowId[0];
|
||||
}
|
||||
@ -2649,7 +2649,7 @@ static bool8 CreateSelectionWindow(u8 taskId)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnNotHolding);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_UpdateHeldItemSprite;
|
||||
return FALSE;
|
||||
}
|
||||
@ -2668,7 +2668,7 @@ static void Task_TryCreateSelectionWindow(u8 taskId)
|
||||
|
||||
static void Task_HandleSelectionMenuInput(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active && sub_81221EC() != TRUE)
|
||||
if (!gPaletteFade.active && MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
s8 input;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
@ -2860,7 +2860,7 @@ static void SlidePartyMenuBoxOneStep(u8 taskId)
|
||||
MoveAndBufferPartySlot(sSlot1TilemapBuffer, tSlot1Left + tSlot1Offset, tSlot1Top, tSlot1Width, tSlot1Height, tSlot1SlideDir);
|
||||
if (tSlot2SlideDir != 0)
|
||||
MoveAndBufferPartySlot(sSlot2TilemapBuffer, tSlot2Left + tSlot2Offset, tSlot2Top, tSlot2Width, tSlot2Height, tSlot2SlideDir);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void Task_SlideSelectedSlotsOffscreen(u8 taskId)
|
||||
@ -2905,7 +2905,7 @@ static void Task_SlideSelectedSlotsOnscreen(u8 taskId)
|
||||
{
|
||||
PutWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId].windowId);
|
||||
PutWindowTilemap(sPartyMenuBoxes[gPartyMenu.slotId2].windowId);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
Free(sSlot1TilemapBuffer);
|
||||
Free(sSlot2TilemapBuffer);
|
||||
FinishTwoMonAction(taskId);
|
||||
@ -3023,7 +3023,7 @@ static void CursorCb_Give(u8 taskId)
|
||||
static void CB2_SelectBagItemToGive(void)
|
||||
{
|
||||
if (InBattlePyramid() == FALSE)
|
||||
GoToBagMenu(RETURN_LOCATION_POKEMON_LIST, POCKETS_COUNT, CB2_GiveHoldItem);
|
||||
GoToBagMenu(ITEMMENULOCATION_PARTY, POCKETS_COUNT, CB2_GiveHoldItem);
|
||||
else
|
||||
GoToBattlePyramidBagMenu(2, CB2_GiveHoldItem);
|
||||
}
|
||||
@ -3223,7 +3223,7 @@ static void CursorCb_TakeItem(u8 taskId)
|
||||
DisplayTookHeldItemMessage(mon, item, TRUE);
|
||||
break;
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_UpdateHeldItemSprite;
|
||||
}
|
||||
|
||||
@ -3640,7 +3640,7 @@ static void CursorCb_FieldMove(u8 taskId)
|
||||
|
||||
PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]);
|
||||
PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]);
|
||||
if (sub_81221AC() == TRUE || InUnionRoom() == TRUE)
|
||||
if (MenuHelpers_LinkSomething() == TRUE || InUnionRoom() == TRUE)
|
||||
{
|
||||
if (fieldMove == FIELD_MOVE_MILK_DRINK || fieldMove == FIELD_MOVE_SOFT_BOILED)
|
||||
DisplayPartyMenuStdMessage(PARTY_MSG_CANT_USE_HERE);
|
||||
@ -4206,7 +4206,7 @@ void CB2_ShowPartyMenuForItemUse(void)
|
||||
static void CB2_ReturnToBagMenu(void)
|
||||
{
|
||||
if (InBattlePyramid() == FALSE)
|
||||
GoToBagMenu(RETURN_LOCATION_UNCHANGED, POCKETS_COUNT, NULL);
|
||||
GoToBagMenu(ITEMMENULOCATION_LAST, POCKETS_COUNT, NULL);
|
||||
else
|
||||
GoToBattlePyramidBagMenu(4, gPyramidBagCursorData.callback);
|
||||
}
|
||||
@ -4345,7 +4345,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task)
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
return;
|
||||
}
|
||||
@ -4381,7 +4381,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task)
|
||||
GetMonNickname(mon, gStringVar1);
|
||||
GetMedicineItemEffectMessage(item);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
}
|
||||
}
|
||||
@ -4391,7 +4391,7 @@ static void Task_DisplayHPRestoredMessage(u8 taskId)
|
||||
GetMonNickname(&gPlayerParty[gPartyMenu.slotId], gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2);
|
||||
DisplayPartyMenuMessage(gStringVar4, FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
HandleBattleLowHpMusicChange();
|
||||
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
|
||||
}
|
||||
@ -4422,7 +4422,7 @@ void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task)
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
}
|
||||
else
|
||||
@ -4444,7 +4444,7 @@ void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task)
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnAdoresBaseVar2Fell);
|
||||
}
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
}
|
||||
}
|
||||
@ -4512,7 +4512,7 @@ static void ShowMoveSelectWindow(u8 slot)
|
||||
moveCount++;
|
||||
}
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, moveCount, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void Task_HandleWhichMoveInput(u8 taskId)
|
||||
@ -4586,7 +4586,7 @@ static void TryUsePPItem(u8 taskId)
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
|
||||
}
|
||||
else
|
||||
@ -4599,7 +4599,7 @@ static void TryUsePPItem(u8 taskId)
|
||||
StringCopy(gStringVar1, gMoveNames[move]);
|
||||
GetMedicineItemEffectMessage(item);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
|
||||
}
|
||||
}
|
||||
@ -4646,7 +4646,7 @@ static void DisplayLearnMoveMessage(const u8 *str)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void DisplayLearnMoveMessageAndClose(u8 taskId, const u8 *str)
|
||||
@ -4709,7 +4709,7 @@ static void Task_LearnedMove(u8 taskId)
|
||||
StringCopy(gStringVar2, gMoveNames[move[0]]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnLearnedMove3);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_DoLearnedMoveFanfareAfterText;
|
||||
}
|
||||
|
||||
@ -4824,7 +4824,7 @@ static void StopLearningMovePrompt(u8 taskId)
|
||||
StringCopy(gStringVar2, gMoveNames[gPartyMenu.data1]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_StopLearningMove2);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_StopLearningMoveYesNo;
|
||||
}
|
||||
|
||||
@ -4900,7 +4900,7 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task)
|
||||
{
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
}
|
||||
else
|
||||
@ -4913,7 +4913,7 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task)
|
||||
ConvertIntToDecimalStringN(gStringVar2, GetMonData(mon, MON_DATA_LEVEL), STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_DisplayLevelUpStatsPg1;
|
||||
}
|
||||
}
|
||||
@ -4928,7 +4928,7 @@ static void UpdateMonDisplayInfoAfterRareCandy(u8 slot, struct Pokemon *mon)
|
||||
DisplayPartyPokemonHPBarCheck(mon, &sPartyMenuBoxes[slot]);
|
||||
UpdatePartyMonHPBar(sPartyMenuBoxes[slot].monSpriteId, mon);
|
||||
AnimatePartySlot(slot, 1);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void Task_DisplayLevelUpStatsPg1(u8 taskId)
|
||||
@ -4958,7 +4958,7 @@ static void DisplayLevelUpStatsPg1(u8 taskId)
|
||||
arrayPtr[12] = CreateLevelUpStatsWindow();
|
||||
DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY);
|
||||
CopyWindowToVram(arrayPtr[12], 2);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void DisplayLevelUpStatsPg2(u8 taskId)
|
||||
@ -4967,7 +4967,7 @@ static void DisplayLevelUpStatsPg2(u8 taskId)
|
||||
|
||||
DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY);
|
||||
CopyWindowToVram(arrayPtr[12], 2);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void Task_TryLearnNewMoves(u8 taskId)
|
||||
@ -5041,7 +5041,7 @@ static void DisplayMonNeedsToReplaceMove(u8 taskId)
|
||||
StringCopy(gStringVar2, gMoveNames[gMoveToLearn]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnNeedsToReplaceMove);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gPartyMenu.data1 = gMoveToLearn;
|
||||
gTasks[taskId].func = Task_ReplaceMoveYesNo;
|
||||
}
|
||||
@ -5052,7 +5052,7 @@ static void DisplayMonLearnedMove(u8 taskId, u16 move)
|
||||
StringCopy(gStringVar2, gMoveNames[move]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnLearnedMove3);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gPartyMenu.data1 = move;
|
||||
gTasks[taskId].func = Task_DoLearnedMoveFanfareAfterText;
|
||||
}
|
||||
@ -5124,7 +5124,7 @@ static void Task_SacredAshLoop(u8 taskId)
|
||||
{
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5146,7 +5146,7 @@ static void Task_SacredAshDisplayHPRestored(u8 taskId)
|
||||
GetMonNickname(&gPlayerParty[gPartyMenu.slotId], gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2);
|
||||
DisplayPartyMenuMessage(gStringVar4, FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_SacredAshLoop;
|
||||
}
|
||||
|
||||
@ -5162,7 +5162,7 @@ void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task)
|
||||
{
|
||||
gPartyMenuUseExitCallback = FALSE;
|
||||
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
}
|
||||
else
|
||||
@ -5440,7 +5440,7 @@ static void Task_HandleSwitchItemsFromBagYesNoInput(u8 taskId)
|
||||
static void DisplayItemMustBeRemovedFirstMessage(u8 taskId)
|
||||
{
|
||||
DisplayPartyMenuMessage(gText_RemoveMailBeforeItem, TRUE);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu;
|
||||
}
|
||||
|
||||
@ -5484,7 +5484,7 @@ static void TryGiveMailToSelectedMon(u8 taskId)
|
||||
ClearMailStruct(mail);
|
||||
DisplayPartyMenuMessage(gText_MailTransferredFromMailbox, TRUE);
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_UpdateHeldItemSpriteAndClosePartyMenu;
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ static void InitPlayerPCMenu(u8 taskId)
|
||||
SetStandardWindowBorderStyle(data[4], 0);
|
||||
sub_81995E4(data[4], gPcItemMenuOptionsNum, sPlayerPCMenuActions, gPcItemMenuOptionOrder);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[4], gPcItemMenuOptionsNum, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = PlayerPCProcessMenuInput;
|
||||
}
|
||||
|
||||
@ -364,14 +364,14 @@ static void PlayerPCProcessMenuInput(u8 taskId)
|
||||
ClearStdWindowAndFrameToTransparent(data[4], FALSE);
|
||||
ClearWindowTilemap(data[4]);
|
||||
RemoveWindow(data[4]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = PlayerPC_TurnOff;
|
||||
break;
|
||||
default:
|
||||
ClearStdWindowAndFrameToTransparent(data[4], FALSE);
|
||||
ClearWindowTilemap(data[4]);
|
||||
RemoveWindow(data[4]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = sPlayerPCMenuActions[gPcItemMenuOptionOrder[inputOptionId]].func.void_u8;
|
||||
break;
|
||||
}
|
||||
@ -445,7 +445,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
|
||||
SetStandardWindowBorderStyle(data[4], 0);
|
||||
PrintMenuTable(data[4], 4, gPCText_ItemPCOptionsText);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[4], 4, var);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ItemStorageMenuPrint(gPCText_OptionDescList[var]);
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ static void Task_ItemStorage_Deposit(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
sub_81AAC14();
|
||||
CB2_GoToItemDepositMenu();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
@ -586,7 +586,7 @@ static void sub_816B4DC(u8 taskId)
|
||||
ClearStdWindowAndFrameToTransparent(data[4], FALSE);
|
||||
ClearWindowTilemap(data[4]);
|
||||
RemoveWindow(data[4]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static u8 GetMailboxMailCount(void)
|
||||
@ -626,7 +626,7 @@ static void Mailbox_DrawMailboxMenu(u8 taskId)
|
||||
windowId = sub_81D1C84(0);
|
||||
sub_81D1C84(1);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_Mailbox, GetStringCenterAlignXOffset(1, gText_Mailbox, 0x40), 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].data[5] = sub_81D1DC0(&playerPCItemPageInfo);
|
||||
sub_81D1E90(&playerPCItemPageInfo);
|
||||
}
|
||||
@ -655,7 +655,7 @@ static void Mailbox_ProcessInput(u8 taskId)
|
||||
sub_81D1D04(0);
|
||||
sub_81D1D04(1);
|
||||
DestroyListMenuTask(data[5], &(playerPCItemPageInfo.itemsAbove), &(playerPCItemPageInfo.cursorPos));
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
RemoveScrollIndicatorArrowPair(playerPCItemPageInfo.scrollIndicatorId);
|
||||
gTasks[taskId].func = Mailbox_PrintWhatToDoWithPlayerMailText;
|
||||
break;
|
||||
@ -678,7 +678,7 @@ static void Mailbox_ReturnToPlayerPC(u8 taskId)
|
||||
sub_81D1D04(0);
|
||||
sub_81D1D04(1);
|
||||
DestroyListMenuTask(data[5], NULL, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
sub_81D1EC0();
|
||||
ReshowPlayerPC(taskId);
|
||||
}
|
||||
@ -688,7 +688,7 @@ static void Mailbox_PrintMailOptions(u8 taskId)
|
||||
u8 r4 = sub_81D1C84(2);
|
||||
PrintMenuTable(r4, 4, gMailboxMailOptions);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(r4, 4, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = Mailbox_MailOptionsProcessInput;
|
||||
}
|
||||
|
||||
@ -865,7 +865,7 @@ static void Mailbox_Cancel(u8 taskId)
|
||||
sub_81D1D04(2);
|
||||
ClearDialogWindowAndFrame(0, 0);
|
||||
Mailbox_DrawMailboxMenu(taskId);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = Mailbox_ProcessInput;
|
||||
}
|
||||
|
||||
@ -893,7 +893,7 @@ static u8 sub_816BC7C(u8 a)
|
||||
{
|
||||
*windowIdLoc = AddWindow(&gUnknown_085DFF5C[a]);
|
||||
DrawStdFrameWithCustomTileAndPalette(*windowIdLoc, FALSE, 0x214, 0xE);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
return *windowIdLoc;
|
||||
}
|
||||
@ -905,7 +905,7 @@ static void sub_816BCC4(u8 a)
|
||||
{
|
||||
ClearStdWindowAndFrameToTransparent(*windowIdLoc, FALSE);
|
||||
ClearWindowTilemap(*windowIdLoc);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
RemoveWindow(*windowIdLoc);
|
||||
*windowIdLoc = 0xFF;
|
||||
}
|
||||
@ -1076,7 +1076,7 @@ static void ItemStorage_ProcessWithdrawTossInput(u8 taskId)
|
||||
ItemStorage_RefreshListMenu();
|
||||
data[5] = ListMenuInit(&gMultiuseListMenuTemplate, playerPCItemPageInfo.itemsAbove, playerPCItemPageInfo.cursorPos);
|
||||
ItemStorage_StartScrollIndicator();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = ItemStorage_ProcessInput;
|
||||
}
|
||||
|
||||
@ -1272,7 +1272,7 @@ static void ItemStorage_DoItemSwap(u8 taskId, bool8 a)
|
||||
sub_81223FC(gUnknown_0203BCC4->spriteIds, 7, 1);
|
||||
gUnknown_0203BCC4->unk666 = 0xFF;
|
||||
data[5] = ListMenuInit(&gMultiuseListMenuTemplate, playerPCItemPageInfo.itemsAbove, playerPCItemPageInfo.cursorPos);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = ItemStorage_ProcessInput;
|
||||
}
|
||||
|
||||
|
@ -490,11 +490,11 @@ static void CB2_InitPokeblockMenu(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (sub_81221EC() == TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() == TRUE)
|
||||
break;
|
||||
if (InitPokeblockMenu() == TRUE)
|
||||
break;
|
||||
if (sub_81221AC() == TRUE)
|
||||
if (MenuHelpers_LinkSomething() == TRUE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -606,7 +606,7 @@ static void HandleInitBackgrounds(void)
|
||||
InitBgsFromTemplates(0, sBgTemplatesForPokeblockMenu, ARRAY_COUNT(sBgTemplatesForPokeblockMenu));
|
||||
SetBgTilemapBuffer(2, sPokeblockMenu->tilemap);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
|
||||
@ -622,12 +622,12 @@ static bool8 LoadPokeblockMenuGfx(void)
|
||||
switch (sPokeblockMenu->gfxState)
|
||||
{
|
||||
case 0:
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(2, gMenuPokeblock_Gfx, 0, 0, 0);
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(2, gMenuPokeblock_Gfx, 0, 0, 0);
|
||||
sPokeblockMenu->gfxState++;
|
||||
break;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
LZDecompressWram(gMenuPokeblock_Tilemap, sPokeblockMenu->tilemap);
|
||||
sPokeblockMenu->gfxState++;
|
||||
@ -669,8 +669,8 @@ static void HandleInitWindows(void)
|
||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||
}
|
||||
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void PrintOnPokeblockWindow(u8 windowId, const u8 *string, s32 x)
|
||||
@ -786,14 +786,14 @@ static void sub_8135FCC(s32 pkblId)
|
||||
CopyWindowToVram(7, 2);
|
||||
}
|
||||
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void HandlePokeblockMenuCursor(u16 cursorPos, u16 arg1)
|
||||
{
|
||||
FillBgTilemapBufferRect_Palette0(2, arg1, 0xF, (cursorPos * 2) + 1, 0xE, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void CompactPokeblockSlots(void)
|
||||
@ -982,7 +982,7 @@ static void Task_HandlePokeblockMenuInput(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (!gPaletteFade.active && sub_81221EC() != TRUE)
|
||||
if (!gPaletteFade.active && MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
if (gMain.newKeys & SELECT_BUTTON)
|
||||
{
|
||||
@ -1032,7 +1032,7 @@ static void Task_HandlePokeblocksSwapInput(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (sub_81221EC() == TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() == TRUE)
|
||||
return;
|
||||
|
||||
if (gMain.newKeys & SELECT_BUTTON)
|
||||
@ -1101,7 +1101,7 @@ static void HandlePokeblocksSwap(u8 taskId, bool8 noSwap)
|
||||
sSavedPokeblockData.lastItemPos--;
|
||||
|
||||
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sSavedPokeblockData.lastItemPage, sSavedPokeblockData.lastItemPos);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
sub_81223FC(sPokeblockMenu->field_E75, FIELD_E75_COUNT, 1);
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
@ -1125,7 +1125,7 @@ static void PutPokeblockOptionsWindow(u8 taskId)
|
||||
sub_81995E4(data[1], sPokeblockMenu->optionsNo, sPokeblockMenuActions, sPokeblockMenu->pokeblockOptionsIds);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[1], sPokeblockMenu->optionsNo, 0);
|
||||
PutWindowTilemap(data[1]);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
|
||||
gTasks[taskId].func = Task_HandlePokeblockOptionsInput;
|
||||
}
|
||||
@ -1134,7 +1134,7 @@ static void Task_HandlePokeblockOptionsInput(u8 taskId)
|
||||
{
|
||||
s8 itemId;
|
||||
|
||||
if (sub_81221EC() == TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() == TRUE)
|
||||
return;
|
||||
|
||||
itemId = Menu_ProcessInputNoWrap();
|
||||
@ -1212,8 +1212,8 @@ static void HandleErasePokeblock(u8 taskId)
|
||||
HandlePokeblockListMenuItems();
|
||||
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *lastPage, *lastPos);
|
||||
HandlePokeblockMenuCursor(*lastPos, 0x1005);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
TossPokeblockChoice_No(taskId);
|
||||
}
|
||||
}
|
||||
@ -1221,7 +1221,7 @@ static void HandleErasePokeblock(u8 taskId)
|
||||
static void TossPokeblockChoice_No(u8 taskId)
|
||||
{
|
||||
ClearDialogWindowAndFrameToTransparent(10, FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
sub_81363BC();
|
||||
gTasks[taskId].func = Task_HandlePokeblockMenuInput;
|
||||
}
|
||||
@ -1268,7 +1268,7 @@ static void PokeblockAction_Cancel(u8 taskId)
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
ClearStdWindowAndFrameToTransparent(data[1], FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
sub_81363BC();
|
||||
gTasks[taskId].func = Task_HandlePokeblockMenuInput;
|
||||
}
|
||||
|
@ -607,11 +607,11 @@ void CB2_PreparePokeblockFeedScene(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (sub_81221EC() == TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() == TRUE)
|
||||
break;
|
||||
if (TransitionToPokeblockFeedScene() == TRUE)
|
||||
break;
|
||||
if (sub_81221AC() == TRUE)
|
||||
if (MenuHelpers_LinkSomething() == TRUE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -624,7 +624,7 @@ static void HandleInitBackgrounds(void)
|
||||
InitBgsFromTemplates(0, sBackgroundTemplates, ARRAY_COUNT(sBackgroundTemplates));
|
||||
SetBgTilemapBuffer(1, sPokeblockFeed->tilemapBuffer);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
|
||||
@ -676,12 +676,12 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon)
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 6:
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(1, gBattleTerrainTiles_Building, 0, 0, 0);
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(1, gBattleTerrainTiles_Building, 0, 0, 0);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 7:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
LZDecompressWram(gUnknown_08D9BA44, sPokeblockFeed->tilemapBuffer);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
@ -704,7 +704,7 @@ static void HandleInitWindows(void)
|
||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||
PutWindowTilemap(0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void SetPokeblockSpritePal(u8 pokeblockCaseId)
|
||||
|
@ -23,15 +23,15 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template)
|
||||
if (mode == 0)
|
||||
{
|
||||
SetBgAttribute(template->bg, BG_ATTR_METRIC, 0);
|
||||
decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMap_Gfx, 0, template->offset, 0);
|
||||
sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMap_Tilemap, 0, 0, 1), template->offset, 32, 32, FALSE);
|
||||
DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMap_Gfx, 0, template->offset, 0);
|
||||
sub_8199D3C(DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMap_Tilemap, 0, 0, 1), template->offset, 32, 32, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBgAttribute(template->bg, BG_ATTR_METRIC, 2);
|
||||
SetBgAttribute(template->bg, BG_ATTR_TYPE, 1);
|
||||
decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMapAffine_Gfx, 0, template->offset, 0);
|
||||
sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMapAffine_Tilemap, 0, 0, 1), template->offset, 64, 64, TRUE);
|
||||
DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMapAffine_Gfx, 0, template->offset, 0);
|
||||
sub_8199D3C(DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMapAffine_Tilemap, 0, 0, 1), template->offset, 64, 64, TRUE);
|
||||
}
|
||||
|
||||
ChangeBgX(template->bg, 0, 0);
|
||||
@ -43,7 +43,7 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template)
|
||||
|
||||
bool32 sub_81C4E90(void)
|
||||
{
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
ShowBg(*sPokedexAreaMapBgNum);
|
||||
return FALSE;
|
||||
|
@ -310,11 +310,11 @@ static bool8 DrawAreaGlow(void)
|
||||
BuildAreaGlowTilemap();
|
||||
break;
|
||||
case 2:
|
||||
decompress_and_copy_tile_data_to_vram(2, sAreaGlow_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, sAreaGlow_Gfx, 0, 0, 0);
|
||||
LoadBgTilemap(2, sPokedexAreaScreen->areaGlowTilemap, 0x500, 0);
|
||||
break;
|
||||
case 3:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
CpuCopy32(sAreaGlow_Pal, gPlttBufferUnfaded + 0xA0, 0x20);
|
||||
sPokedexAreaScreen->drawAreaGlowState++;
|
||||
|
@ -2966,18 +2966,18 @@ static void sub_802D150(void)
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_082FE164, ARRAY_COUNT(gUnknown_082FE164));
|
||||
InitWindows(gUnknown_082FE174);
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
sub_802C974(gUnknown_02022D00);
|
||||
sub_802DD08();
|
||||
LoadPalette(gPkmnJumpBgPal, 0, 0x20);
|
||||
decompress_and_copy_tile_data_to_vram(3, gPkmnJumpBgGfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(3, gPkmnJumpBgTilemap, 0, 0, 1);
|
||||
DecompressAndCopyTileDataToVram(3, gPkmnJumpBgGfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(3, gPkmnJumpBgTilemap, 0, 0, 1);
|
||||
LoadPalette(gPkmnJumpVenusaurPal, 0x30, 0x20);
|
||||
decompress_and_copy_tile_data_to_vram(2, gPkmnJumpVenusaurGfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, gPkmnJumpVenusaurTilemap, 0, 0, 1);
|
||||
DecompressAndCopyTileDataToVram(2, gPkmnJumpVenusaurGfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gPkmnJumpVenusaurTilemap, 0, 0, 1);
|
||||
LoadPalette(gPkmnJumpResultsPal, 0x10, 0x20);
|
||||
decompress_and_copy_tile_data_to_vram(1, gPkmnJumpResultsGfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(1, gPkmnJumpResultsTilemap, 0, 0, 1);
|
||||
DecompressAndCopyTileDataToVram(1, gPkmnJumpResultsGfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gPkmnJumpResultsTilemap, 0, 0, 1);
|
||||
LoadPalette(gPkmnJumpPal3, 0x20, 0x20);
|
||||
SetBgTilemapBuffer(0, gUnknown_02022D00->tilemapBuffer);
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
|
||||
@ -2991,7 +2991,7 @@ static void sub_802D150(void)
|
||||
gUnknown_02022D00->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_802DBF8();
|
||||
sub_802CE9C(gUnknown_02022D00);
|
||||
|
@ -3892,7 +3892,7 @@ static void Cb_ChangeScreen(u8 taskId)
|
||||
break;
|
||||
case SCREEN_CHANGE_ITEM_FROM_BAG:
|
||||
FreePSSData();
|
||||
GoToBagMenu(11, 0, Cb2_ReturnToPSS);
|
||||
GoToBagMenu(ITEMMENULOCATION_PCBOX, 0, Cb2_ReturnToPSS);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3944,7 +3944,7 @@ static void LoadPSSMenuGfx(void)
|
||||
LZ77UnCompWram(gUnknown_085722A0, sPSSData->field_5AC4);
|
||||
SetBgTilemapBuffer(1, sPSSData->field_5AC4);
|
||||
ShowBg(1);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static bool8 InitPSSWindows(void)
|
||||
@ -4010,7 +4010,7 @@ static void RefreshCursorMonData(void)
|
||||
LoadCursorMonGfx(sPSSData->cursorMonSpecies, sPSSData->cursorMonPersonality);
|
||||
PrintCursorMonInfo();
|
||||
sub_80CA65C();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void BoxSetMosaic(void)
|
||||
@ -4154,7 +4154,7 @@ static void sub_80CA65C(void)
|
||||
}
|
||||
|
||||
sub_80D2918(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void sub_80CA704(void)
|
||||
@ -4181,7 +4181,7 @@ static void sub_80CA704(void)
|
||||
sub_80D2918(2);
|
||||
}
|
||||
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
sPSSData->unk_02C7 = 0;
|
||||
}
|
||||
|
||||
@ -4202,7 +4202,7 @@ static bool8 ShowPartyMenu(void)
|
||||
sPSSData->field_2C2++;
|
||||
sub_80D27F4(1, 3, 1);
|
||||
sub_80D2918(1);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
sub_80CBAF0(8);
|
||||
if (++sPSSData->field_2C5 == 20)
|
||||
{
|
||||
@ -4236,7 +4236,7 @@ static bool8 HidePartyMenu(void)
|
||||
sub_80CBAF0(-8);
|
||||
if (++sPSSData->field_2C5 != 20)
|
||||
{
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
@ -4246,7 +4246,7 @@ static bool8 HidePartyMenu(void)
|
||||
CompactPartySlots();
|
||||
sub_80D27AC(2, 0, 0, 9, 2);
|
||||
sub_80D2918(2);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -4262,7 +4262,7 @@ static void sub_80CA984(bool8 arg0)
|
||||
sub_80D27AC(2, 0, 2, 9, 2);
|
||||
|
||||
sub_80D2918(2);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void sub_80CA9C0(void)
|
||||
@ -4331,7 +4331,7 @@ static void sub_80CAB20(void)
|
||||
sub_80CAA74();
|
||||
sub_80D27AC(1, 0, 0, 12, 22);
|
||||
sub_80D2918(1);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void SetUpDoShowPartyMenu(void)
|
||||
@ -4422,7 +4422,7 @@ static void PrintStorageActionText(u8 id)
|
||||
DrawTextBorderOuter(1, 2, 14);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(1, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void ShowYesNoWindow(s8 cursorPos)
|
||||
@ -4434,7 +4434,7 @@ static void ShowYesNoWindow(s8 cursorPos)
|
||||
static void ClearBottomWindow(void)
|
||||
{
|
||||
ClearStdWindowAndFrameToTransparent(1, FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void AddWallpaperSetsMenu(void)
|
||||
@ -7904,7 +7904,7 @@ static void AddMenu(void)
|
||||
DrawStdFrameWithCustomTileAndPalette(sPSSData->field_CB0, FALSE, 11, 14);
|
||||
PrintMenuTable(sPSSData->field_CB0, sPSSData->menuItemsCount, (void*)sPSSData->menuItems);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sPSSData->field_CB0, sPSSData->menuItemsCount, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
sPSSData->field_CAE = 0;
|
||||
}
|
||||
|
||||
@ -9127,7 +9127,7 @@ static bool8 sub_80D18E4(void)
|
||||
sub_80D19B4(var);
|
||||
|
||||
FillBgTilemapBufferRect(0, 0, var + 1, 12, 1, 9, 0x11);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -9141,7 +9141,7 @@ static void sub_80D19B4(u32 arg0)
|
||||
FillBgTilemapBufferRect(0, 0x13B, arg0, 0xD, 1, 7, 0xFu);
|
||||
FillBgTilemapBufferRect(0, 0x13C, arg0, 0xC, 1, 1, 0xFu);
|
||||
FillBgTilemapBufferRect(0, 0x13D, arg0, 0x14, 1, 1, 0xFu);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void sub_80D1A48(struct Sprite *sprite)
|
||||
|
@ -1133,7 +1133,7 @@ static void VBlank(void)
|
||||
|
||||
static void CB2_InitSummaryScreen(void)
|
||||
{
|
||||
while (sub_81221EC() != TRUE && LoadGraphics() != TRUE && sub_81221AC() != TRUE);
|
||||
while (MenuHelpers_CallLinkSomething() != TRUE && LoadGraphics() != TRUE && MenuHelpers_LinkSomething() != TRUE);
|
||||
}
|
||||
|
||||
static bool8 LoadGraphics(void)
|
||||
@ -1271,9 +1271,9 @@ static void InitBGs(void)
|
||||
SetBgTilemapBuffer(2, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_SKILLS][0]);
|
||||
SetBgTilemapBuffer(3, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][0]);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
ShowBg(0);
|
||||
@ -1287,12 +1287,12 @@ static bool8 DecompressGraphics(void)
|
||||
switch (sMonSummaryScreen->switchCounter)
|
||||
{
|
||||
case 0:
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(1, &gStatusScreenBitmap, 0, 0, 0);
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(1, &gStatusScreenBitmap, 0, 0, 0);
|
||||
sMonSummaryScreen->switchCounter++;
|
||||
break;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible() != 1)
|
||||
if (FreeTempTileDataBuffersIfPossible() != 1)
|
||||
{
|
||||
LZDecompressWram(gPageInfoTilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][0]);
|
||||
sMonSummaryScreen->switchCounter++;
|
||||
@ -1477,7 +1477,7 @@ static void BeginCloseSummaryScreen(u8 taskId)
|
||||
|
||||
static void CloseSummaryScreen(u8 taskId)
|
||||
{
|
||||
if (sub_81221EC() != TRUE && !gPaletteFade.active)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active)
|
||||
{
|
||||
SetMainCallback2(sMonSummaryScreen->callback);
|
||||
gLastViewedMonIndex = sMonSummaryScreen->curMonIndex;
|
||||
@ -1495,7 +1495,7 @@ static void CloseSummaryScreen(u8 taskId)
|
||||
|
||||
static void Task_HandleInput(u8 taskId)
|
||||
{
|
||||
if (sub_81221EC() != TRUE && !gPaletteFade.active)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active)
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
@ -1579,7 +1579,7 @@ static void ChangeSummaryPokemon(u8 taskId, s8 delta)
|
||||
{
|
||||
SetSpriteInvisibility(SPRITE_ARR_ID_STATUS, TRUE);
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATUS);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
HandleStatusTilemap(0, 2);
|
||||
}
|
||||
sMonSummaryScreen->curMonIndex = monId;
|
||||
@ -1647,7 +1647,7 @@ static void Task_ChangeSummaryMon(u8 taskId)
|
||||
gSprites[sMonSummaryScreen->spriteIds[SPRITE_ARR_ID_MON]].data[2] = 0;
|
||||
break;
|
||||
default:
|
||||
if (sub_81221EC() == 0 && FuncIsActiveTask(Task_ShowStatusWindow) == 0)
|
||||
if (MenuHelpers_CallLinkSomething() == 0 && FuncIsActiveTask(Task_ShowStatusWindow) == 0)
|
||||
{
|
||||
data[0] = 0;
|
||||
gTasks[taskId].func = Task_HandleInput;
|
||||
@ -1756,14 +1756,14 @@ static void PssScrollRight(u8 taskId) // Scroll right
|
||||
data[1] = 1;
|
||||
SetBgAttribute(1, BG_ATTR_PRIORITY, 1);
|
||||
SetBgAttribute(2, BG_ATTR_PRIORITY, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
data[1] = 2;
|
||||
SetBgAttribute(2, BG_ATTR_PRIORITY, 1);
|
||||
SetBgAttribute(1, BG_ATTR_PRIORITY, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
ChangeBgX(data[1], 0, 0);
|
||||
SetBgTilemapBuffer(data[1], sMonSummaryScreen->bgTilemapBuffers[sMonSummaryScreen->currPageIndex][0]);
|
||||
@ -1813,13 +1813,13 @@ static void PssScrollLeftEnd(u8 taskId) // display left
|
||||
{
|
||||
SetBgAttribute(1, BG_ATTR_PRIORITY, 1);
|
||||
SetBgAttribute(2, BG_ATTR_PRIORITY, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBgAttribute(2, BG_ATTR_PRIORITY, 1);
|
||||
SetBgAttribute(1, BG_ATTR_PRIORITY, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
if (sMonSummaryScreen->currPageIndex > 1)
|
||||
{
|
||||
@ -1865,9 +1865,9 @@ static void SwitchToMoveSelection(u8 taskId)
|
||||
PrintMoveDetails(move);
|
||||
PrintNewMoveDetailsOrCancelText();
|
||||
SetNewMoveTypeIcon();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
CreateMoveSelectorSprites(SPRITE_ARR_ID_MOVE_SELECTOR1);
|
||||
gTasks[taskId].func = Task_HandleInput_MoveSelect;
|
||||
}
|
||||
@ -1876,7 +1876,7 @@ static void Task_HandleInput_MoveSelect(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (sub_81221EC() != 1)
|
||||
if (MenuHelpers_CallLinkSomething() != 1)
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
@ -1950,8 +1950,8 @@ static void ChangeSelectedMove(s16 *taskData, s8 direction, u8 *moveIndexPtr)
|
||||
break;
|
||||
}
|
||||
DrawContestMoveHearts(move);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
PrintMoveDetails(move);
|
||||
if ((*moveIndexPtr == MAX_MON_MOVES && sMonSummaryScreen->newMove == MOVE_NONE)
|
||||
|| taskData[1] == 1)
|
||||
@ -1959,7 +1959,7 @@ static void ChangeSelectedMove(s16 *taskData, s8 direction, u8 *moveIndexPtr)
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES);
|
||||
if (!gSprites[sMonSummaryScreen->spriteIds[SPRITE_ARR_ID_STATUS]].invisible)
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATUS);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
HandlePowerAccTilemap(9, -3);
|
||||
HandleAppealJamTilemap(9, -3, move);
|
||||
}
|
||||
@ -1969,7 +1969,7 @@ static void ChangeSelectedMove(s16 *taskData, s8 direction, u8 *moveIndexPtr)
|
||||
{
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_MOVES_POWER_ACC);
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_MOVES_APPEAL_JAM);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
HandlePowerAccTilemap(0, 3);
|
||||
HandleAppealJamTilemap(0, 3, 0);
|
||||
}
|
||||
@ -1998,9 +1998,9 @@ static void CloseMoveSelectMode(u8 taskId)
|
||||
HandlePowerAccTilemap(0, 3);
|
||||
HandleAppealJamTilemap(0, 3, 0);
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_HandleInput;
|
||||
}
|
||||
|
||||
@ -2016,7 +2016,7 @@ static void Task_HandleInput_MovePositionSwitch(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
|
||||
if (sub_81221EC() != TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
@ -2071,8 +2071,8 @@ static void ExitMovePositionSwitchMode(u8 taskId, bool8 swapMoves)
|
||||
move = sMonSummaryScreen->summary.moves[sMonSummaryScreen->firstMoveIndex];
|
||||
PrintMoveDetails(move);
|
||||
DrawContestMoveHearts(move);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_HandleInput_MoveSelect;
|
||||
}
|
||||
|
||||
@ -2157,7 +2157,7 @@ static void Task_HandleReplaceMoveInput(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
|
||||
if (sub_81221EC() != TRUE)
|
||||
if (MenuHelpers_CallLinkSomething() != TRUE)
|
||||
{
|
||||
if (gPaletteFade.active != TRUE)
|
||||
{
|
||||
@ -2221,7 +2221,7 @@ static void ShowCantForgetHMsWindow(u8 taskId)
|
||||
{
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_MOVES_POWER_ACC);
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_MOVES_APPEAL_JAM);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
HandlePowerAccTilemap(0, 3);
|
||||
HandleAppealJamTilemap(0, 3, 0);
|
||||
PrintHMMovesCantBeForgotten();
|
||||
@ -2286,7 +2286,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
|
||||
ClearWindowTilemap(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATUS);
|
||||
move = sMonSummaryScreen->summary.moves[sMonSummaryScreen->firstMoveIndex];
|
||||
PrintMoveDetails(move);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
HandlePowerAccTilemap(9, -3);
|
||||
HandleAppealJamTilemap(9, -3, move);
|
||||
gTasks[taskId].func = Task_HandleReplaceMoveInput;
|
||||
@ -2362,7 +2362,7 @@ static void DrawPagination(void) // Updates the pagination dots at the top of th
|
||||
}
|
||||
}
|
||||
CopyToBgTilemapBufferRect_ChangePalette(3, alloced, 11, 0, 8, 2, 16);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
Free(alloced);
|
||||
}
|
||||
|
||||
@ -2435,11 +2435,11 @@ static void Task_ShowPowerAccWindow(u8 taskId)
|
||||
PutWindowTilemap(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATUS);
|
||||
PutWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES);
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void HandleAppealJamTilemap(u16 a, s16 b, u16 move)
|
||||
@ -2491,11 +2491,11 @@ static void Task_ShowAppealJamWindow(u8 taskId)
|
||||
}
|
||||
PutWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES);
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void HandleStatusTilemap(u16 a, s16 b)
|
||||
@ -2525,14 +2525,14 @@ static void Task_ShowStatusWindow(u8 taskId)
|
||||
data[1] = sStatusTilemapCtrl1.field_6;
|
||||
ChangeTilemap(&sStatusTilemapCtrl1, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][0], data[1], FALSE);
|
||||
ChangeTilemap(&sStatusTilemapCtrl2, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][0], data[1], FALSE);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
if (data[1] <= 0 || data[1] >= sStatusTilemapCtrl1.field_6)
|
||||
{
|
||||
if (data[0] < 0)
|
||||
{
|
||||
CreateSetStatusSprite();
|
||||
PutWindowTilemap(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATUS);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
@ -2576,7 +2576,7 @@ static void DrawPokerusCuredSymbol(struct Pokemon *mon) // This checks if the mo
|
||||
sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][0][0x223] = 0x81A;
|
||||
sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1][0x223] = 0x81A;
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
}
|
||||
|
||||
static void SetDexNumberColor(bool8 isMonShiny)
|
||||
@ -2585,7 +2585,7 @@ static void SetDexNumberColor(bool8 isMonShiny)
|
||||
SetBgTilemapPalette(3, 1, 4, 8, 8, 0);
|
||||
else
|
||||
SetBgTilemapPalette(3, 1, 4, 8, 8, 5);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
}
|
||||
|
||||
static void DrawExperienceProgressBar(struct Pokemon *unused)
|
||||
@ -2625,9 +2625,9 @@ static void DrawExperienceProgressBar(struct Pokemon *unused)
|
||||
}
|
||||
|
||||
if (GetBgTilemapBuffer(1) == sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_SKILLS][0])
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
else
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void DrawContestMoveHearts(u16 move)
|
||||
@ -2698,7 +2698,7 @@ static void PrintMonInfo(void)
|
||||
PrintNotEggInfo();
|
||||
else
|
||||
PrintEggInfo();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void PrintNotEggInfo(void)
|
||||
@ -2886,7 +2886,7 @@ static void PutPageWindowTilemaps(u8 page)
|
||||
for (i = 0; i < ARRAY_COUNT(sMonSummaryScreen->windowIds); i++)
|
||||
PutWindowTilemap(sMonSummaryScreen->windowIds[i]);
|
||||
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void ClearPageWindowTilemaps(u8 page)
|
||||
@ -2933,7 +2933,7 @@ static void ClearPageWindowTilemaps(u8 page)
|
||||
for (i = 0; i < ARRAY_COUNT(sMonSummaryScreen->windowIds); i++)
|
||||
RemoveWindowByIndex(i);
|
||||
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static u8 AddWindowFromTemplateList(const struct WindowTemplate *template, u8 templateId)
|
||||
@ -3629,7 +3629,7 @@ static void PrintMoveDetails(u16 move)
|
||||
ClearWindowTilemap(windowId);
|
||||
}
|
||||
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void PrintNewMoveDetailsOrCancelText(void)
|
||||
@ -3712,7 +3712,7 @@ static void SetSpriteInvisibility(u8 spriteArrayId, bool8 invisible)
|
||||
|
||||
static void HidePageSpecificSprites(void)
|
||||
{
|
||||
// Keeps Pokémon, caught ball and status sprites visible.
|
||||
// Keeps Pok<EFBFBD>mon, caught ball and status sprites visible.
|
||||
u8 i;
|
||||
|
||||
for (i = SPRITE_ARR_ID_TYPE; i < ARRAY_COUNT(sMonSummaryScreen->spriteIds); i++)
|
||||
|
@ -208,15 +208,15 @@ u32 sub_81CDE94(s32 state)
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON | DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG3_ON);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG3);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(11, 4));
|
||||
decompress_and_copy_tile_data_to_vram(3, gPokenavCondition_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(3, gPokenavCondition_Gfx, 0, 0, 0);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_08623228, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gUnknown_08623228, 0, 0, 0);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
|
||||
LZ77UnCompVram(gPokenavCondition_Tilemap, structPtr->tilemapBuffers[0]);
|
||||
@ -230,7 +230,7 @@ u32 sub_81CDE94(s32 state)
|
||||
structPtr->unk1814 = -80;
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
|
||||
LZ77UnCompVram(gUnknown_0862323C, structPtr->tilemapBuffers[2]);
|
||||
@ -246,7 +246,7 @@ u32 sub_81CDE94(s32 state)
|
||||
SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 6:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
|
||||
structPtr->unk1820 = AddWindow(&gUnknown_08623364);
|
||||
|
@ -408,7 +408,7 @@ static u32 sub_81CF418(s32 state)
|
||||
{
|
||||
case 0:
|
||||
InitBgTemplates(gUnknown_08623590, NELEMS(gUnknown_08623590));
|
||||
decompress_and_copy_tile_data_to_vram(1, gUnknown_086233E4, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_086233E4, 0, 0, 0);
|
||||
SetBgTilemapBuffer(1, unk->buff);
|
||||
CopyToBgTilemapBuffer(1, gUnknown_086234AC, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
@ -416,13 +416,13 @@ static u32 sub_81CF418(s32 state)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
if (!sub_81CF0C0())
|
||||
return LT_PAUSE;
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623570, 0x20, 0x20);
|
||||
sub_81CF88C();
|
||||
@ -434,7 +434,7 @@ static u32 sub_81CF418(s32 state)
|
||||
PrintHelpBarText(HELPBAR_CONDITION_MON_LIST);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
ChangeBgX(1, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
|
@ -342,18 +342,18 @@ static u32 LoopedTask_InitPokenavMenu(s32 a0)
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gPokenavMainMenuBgTemplates, ARRAY_COUNT(gPokenavMainMenuBgTemplates));
|
||||
ResetBgPositions();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 1:
|
||||
structPtr = GetSubstructPtr(0);
|
||||
decompress_and_copy_tile_data_to_vram(0, &gPokenavHeader_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(0, &gPokenavHeader_Gfx, 0, 0, 0);
|
||||
SetBgTilemapBuffer(0, structPtr->tilemapBuffer);
|
||||
CopyToBgTilemapBuffer(0, &gPokenavHeader_Tilemap, 0, 0);
|
||||
CopyPaletteIntoBufferUnfaded(gPokenavHeader_Pal, 0, 0x20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
|
||||
InitHelpBar();
|
||||
|
@ -325,7 +325,7 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState)
|
||||
InitBgTemplates(gUnknown_0862278C, ARRAY_COUNT(gUnknown_0862278C));
|
||||
ChangeBgX(2, 0, 0);
|
||||
ChangeBgY(2, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, sMatchCallUI_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, sMatchCallUI_Gfx, 0, 0, 0);
|
||||
SetBgTilemapBuffer(2, state->unk1024);
|
||||
CopyToBgTilemapBuffer(2, sMatchCallUI_Tilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
@ -333,7 +333,7 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState)
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_8199DF0(1, 0, 0, 1);
|
||||
@ -343,16 +343,16 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81CC034(state);
|
||||
decompress_and_copy_tile_data_to_vram(3, gUnknown_08622760, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(3, gUnknown_08622760, 0, 0, 0);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08622700, 0x30, 0x20);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08622720, 0x50, 0x20);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible() || !sub_81CAE28())
|
||||
if (FreeTempTileDataBuffersIfPossible() || !sub_81CAE28())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81CBBB8();
|
||||
|
@ -410,7 +410,7 @@ static u32 LoopedTask_OpenMenu(s32 state)
|
||||
{
|
||||
case 0:
|
||||
InitBgTemplates(gUnknown_08620194, ARRAY_COUNT(gUnknown_08620194));
|
||||
decompress_and_copy_tile_data_to_vram(1, gPokenavMessageBox_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gPokenavMessageBox_Gfx, 0, 0, 0);
|
||||
SetBgTilemapBuffer(1, unk->bg1TilemapBuffer);
|
||||
CopyToBgTilemapBuffer(1, gPokenavMessageBox_Tilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
@ -423,23 +423,23 @@ static u32 LoopedTask_OpenMenu(s32 state)
|
||||
ChangeBgY(3, 0, 0);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_0861FD6C, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_0861FFF4, 0, 0, 1);
|
||||
DecompressAndCopyTileDataToVram(2, gUnknown_0861FD6C, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gUnknown_0861FFF4, 0, 0, 1);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_0861FD4C, 0x20, 0x20);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
decompress_and_copy_tile_data_to_vram(3, gUnknown_0861FC98, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(3, gUnknown_0861FCAC, 0, 0, 1);
|
||||
DecompressAndCopyTileDataToVram(3, gUnknown_0861FC98, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(3, gUnknown_0861FCAC, 0, 0, 1);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_0861FC78, 0x30, 0x20);
|
||||
if (GetPokenavMenuType() == POKENAV_MENU_TYPE_CONDITION || GetPokenavMenuType() == POKENAV_MENU_TYPE_CONDITION_SEARCH)
|
||||
sub_81CA850();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
AddOptionDescriptionWindow();
|
||||
sub_81CA7D4();
|
||||
|
@ -506,7 +506,7 @@ static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *state)
|
||||
state->infoWindowId = AddWindow(&sMapSecInfoWindowTemplate);
|
||||
LoadUserWindowBorderGfx_(state->infoWindowId, 0x42, 0x40);
|
||||
DrawTextBorderOuter(state->infoWindowId, 0x42, 4);
|
||||
decompress_and_copy_tile_data_to_vram(1, sRegionMapCityZoomTiles_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, sRegionMapCityZoomTiles_Gfx, 0, 0, 0);
|
||||
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
||||
PutWindowTilemap(state->infoWindowId);
|
||||
CopyWindowToVram(state->infoWindowId, 3);
|
||||
@ -522,7 +522,7 @@ static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *state)
|
||||
|
||||
static bool32 TryFreeTempTileDataBuffers(void)
|
||||
{
|
||||
return free_temp_tile_data_buffers_if_possible();
|
||||
return FreeTempTileDataBuffersIfPossible();
|
||||
}
|
||||
|
||||
static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
||||
|
@ -414,14 +414,14 @@ static u32 sub_81CFEB8(s32 state)
|
||||
{
|
||||
case 0:
|
||||
InitBgTemplates(gUnknown_086237B0, NELEMS(gUnknown_086237B0));
|
||||
decompress_and_copy_tile_data_to_vram(1, gUnknown_08623604, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_08623604, 0, 0, 0);
|
||||
SetBgTilemapBuffer(1, unk->buff);
|
||||
CopyToBgTilemapBuffer(1, gUnknown_086236CC, 0, 0);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_086235E4, 0x10, 0x20);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
if (!sub_81CFB18())
|
||||
return LT_PAUSE;
|
||||
@ -430,7 +430,7 @@ static u32 sub_81CFEB8(s32 state)
|
||||
ShowBg(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623790, 0x20, 0x20);
|
||||
sub_81D0304();
|
||||
@ -441,7 +441,7 @@ static u32 sub_81CFEB8(s32 state)
|
||||
sub_81D024C(unk);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
ShowBg(2);
|
||||
HideBg(3);
|
||||
|
@ -517,17 +517,17 @@ u32 sub_81D0A6C(s32 state)
|
||||
{
|
||||
case 0:
|
||||
InitBgTemplates(gUnknown_08624B98, ARRAY_COUNT(gUnknown_08624B98));
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_08DDE030, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gUnknown_08DDE030, 0, 0, 0);
|
||||
SetBgTilemapBuffer(2, structPtr->tilemapBuffers[0]);
|
||||
CopyToBgTilemapBuffer(2, gUnknown_08DDE12C, 0, 0);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08DDE010, 0x10, 0x20);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_8199DF0(1, 0, 0, 1);
|
||||
decompress_and_copy_tile_data_to_vram(1, sRibbonIconsSmall_Gfx, 0, 1, 0);
|
||||
DecompressAndCopyTileDataToVram(1, sRibbonIconsSmall_Gfx, 0, 1, 0);
|
||||
SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623FF8, 0x20, 0xA0);
|
||||
@ -537,21 +537,21 @@ u32 sub_81D0A6C(s32 state)
|
||||
}
|
||||
return LT_PAUSE;
|
||||
case 2:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_81D0E60(structPtr);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
case 3:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_81D0FCC(structPtr);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
case 4:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_81D10A4(structPtr);
|
||||
return LT_INC_AND_PAUSE;
|
||||
|
@ -1508,9 +1508,9 @@ static void sub_81D6FE0(void)
|
||||
SetBgTilemapBuffer(1, sRayScene->tilemapBuffers[1]);
|
||||
SetBgTilemapBuffer(2, sRayScene->tilemapBuffers[2]);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -1520,9 +1520,9 @@ static void sub_81D6FE0(void)
|
||||
|
||||
static void sub_81D706C(void)
|
||||
{
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(0, gRaySceneClouds_Gfx, 0, 0, 0);
|
||||
while (free_temp_tile_data_buffers_if_possible());
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(0, gRaySceneClouds_Gfx, 0, 0, 0);
|
||||
while (FreeTempTileDataBuffersIfPossible());
|
||||
|
||||
LZDecompressWram(gRaySceneClouds2_Tilemap, sRayScene->tilemapBuffers[0]);
|
||||
LZDecompressWram(gRaySceneClouds1_Tilemap, sRayScene->tilemapBuffers[1]);
|
||||
@ -1921,9 +1921,9 @@ static void sub_81D7E10(void)
|
||||
SetBgTilemapBuffer(1, sRayScene->tilemapBuffers[1]);
|
||||
SetBgTilemapBuffer(2, sRayScene->tilemapBuffers[2]);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -1933,11 +1933,11 @@ static void sub_81D7E10(void)
|
||||
|
||||
static void sub_81D7E9C(void)
|
||||
{
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(0, gRaySceneClouds_Gfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(1, gRaySceneOvercast_Gfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, gRaySceneRayquaza_Gfx, 0, 0, 0);
|
||||
while (free_temp_tile_data_buffers_if_possible());
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(0, gRaySceneClouds_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gRaySceneOvercast_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gRaySceneRayquaza_Gfx, 0, 0, 0);
|
||||
while (FreeTempTileDataBuffersIfPossible());
|
||||
|
||||
LZDecompressWram(gRaySceneClouds2_Tilemap, sRayScene->tilemapBuffers[0]);
|
||||
LZDecompressWram(gRaySceneOvercast_Tilemap, sRayScene->tilemapBuffers[1]);
|
||||
@ -2090,10 +2090,10 @@ static void sub_81D82B0(void)
|
||||
SetBgTilemapBuffer(2, sRayScene->tilemapBuffers[2]);
|
||||
SetBgTilemapBuffer(3, sRayScene->tilemapBuffers[3]);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -2104,10 +2104,10 @@ static void sub_81D82B0(void)
|
||||
|
||||
static void sub_81D8358(void)
|
||||
{
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(0, gRaySceneRayquazaLight_Gfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(1, gRaySceneOvercast2_Gfx, 0, 0, 0);
|
||||
while (free_temp_tile_data_buffers_if_possible());
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(0, gRaySceneRayquazaLight_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gRaySceneOvercast2_Gfx, 0, 0, 0);
|
||||
while (FreeTempTileDataBuffersIfPossible());
|
||||
|
||||
LZDecompressWram(gRaySceneRayquazaLight_Tilemap, sRayScene->tilemapBuffers[0]);
|
||||
LZDecompressWram(gRaySceneOvercast2_Tilemap, sRayScene->tilemapBuffers[3]);
|
||||
@ -2312,10 +2312,10 @@ static void sub_81D8828(void)
|
||||
SetBgTilemapBuffer(2, sRayScene->tilemapBuffers[2]);
|
||||
SetBgTilemapBuffer(3, sRayScene->tilemapBuffers[3]);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP | DISPCNT_WIN0_ON);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -2326,11 +2326,11 @@ static void sub_81D8828(void)
|
||||
|
||||
static void sub_81D88D0(void)
|
||||
{
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(1, gRaySceneRayquazaChase_Gfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, gRaySceneChaseStreaks_Gfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(3, gRaySceneChaseBg_Gfx, 0, 0, 0);
|
||||
while (free_temp_tile_data_buffers_if_possible());
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(1, gRaySceneRayquazaChase_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gRaySceneChaseStreaks_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(3, gRaySceneChaseBg_Gfx, 0, 0, 0);
|
||||
while (FreeTempTileDataBuffersIfPossible());
|
||||
|
||||
LZDecompressWram(gRayChaseRayquazaChase2_Tilemap, sRayScene->tilemapBuffers[0]);
|
||||
LZDecompressWram(gRayChaseRayquazaChase_Tilemap, sRayScene->tilemapBuffers[1]);
|
||||
@ -2468,9 +2468,9 @@ static void sub_81D8C38(void)
|
||||
SetBgTilemapBuffer(1, sRayScene->tilemapBuffers[1]);
|
||||
SetBgTilemapBuffer(2, sRayScene->tilemapBuffers[2]);
|
||||
ResetAllBgsCoordinates();
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP | DISPCNT_WIN0_ON);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -2480,10 +2480,10 @@ static void sub_81D8C38(void)
|
||||
|
||||
static void sub_81D8CC4(void)
|
||||
{
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(2, gRaySceneHushRing_Gfx, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(0, gRaySceneHushBg_Gfx, 0, 0, 0);
|
||||
while (free_temp_tile_data_buffers_if_possible());
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(2, gRaySceneHushRing_Gfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(0, gRaySceneHushBg_Gfx, 0, 0, 0);
|
||||
while (FreeTempTileDataBuffersIfPossible());
|
||||
|
||||
LZDecompressWram(gRaySceneHushRing_Tilemap, sRayScene->tilemapBuffers[1]);
|
||||
LZDecompressWram(gRaySceneHushBg_Tilemap, sRayScene->tilemapBuffers[0]);
|
||||
|
@ -547,15 +547,15 @@ bool8 LoadRegionMapGfx(void)
|
||||
{
|
||||
case 0:
|
||||
if (gRegionMap->bgManaged)
|
||||
decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBg_GfxLZ, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(gRegionMap->bgNum, sRegionMapBg_GfxLZ, 0, 0, 0);
|
||||
else
|
||||
LZ77UnCompVram(sRegionMapBg_GfxLZ, (u16 *)BG_CHAR_ADDR(2));
|
||||
break;
|
||||
case 1:
|
||||
if (gRegionMap->bgManaged)
|
||||
{
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBg_TilemapLZ, 0, 0, 1);
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
DecompressAndCopyTileDataToVram(gRegionMap->bgNum, sRegionMapBg_TilemapLZ, 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -563,7 +563,7 @@ bool8 LoadRegionMapGfx(void)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
LoadPalette(sRegionMapBg_Pal, 0x70, 0x60);
|
||||
break;
|
||||
case 3:
|
||||
@ -1710,7 +1710,7 @@ void CB2_OpenFlyMap(void)
|
||||
PutWindowTilemap(2);
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 8:
|
||||
@ -1778,7 +1778,7 @@ static void DrawFlyDestTextWindow(void)
|
||||
AddTextPrinterParameterized(1, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec];
|
||||
AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 96), 17, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gUnknown_03001180 = TRUE;
|
||||
}
|
||||
break;
|
||||
@ -1796,7 +1796,7 @@ static void DrawFlyDestTextWindow(void)
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
}
|
||||
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gUnknown_03001180 = FALSE;
|
||||
}
|
||||
}
|
||||
@ -1809,7 +1809,7 @@ static void DrawFlyDestTextWindow(void)
|
||||
}
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
CopyWindowToVram(0, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gUnknown_03001180 = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ static void HideChooseTimeWindow(u8 windowId)
|
||||
{
|
||||
ClearStdWindowAndFrameToTransparent(windowId, FALSE);
|
||||
RemoveWindow(windowId);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void PrintTime(u8 windowId, u8 x, u8 y, u16 days, u8 hours, u8 minutes, u8 seconds)
|
||||
@ -323,7 +323,7 @@ static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 0x214, 0xE);
|
||||
PrintTime(windowId, 0, 1, days, hours, minutes, seconds);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_Confirm2, 126, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static bool32 MoveTimeUpDown(s16 *val, int minVal, int maxVal, u16 keys)
|
||||
@ -470,7 +470,7 @@ static void sub_809F048(void)
|
||||
clear_scheduled_bg_copies_to_vram();
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, sBackgroundTemplates, ARRAY_COUNT(sBackgroundTemplates));
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
InitWindows(sUnknown_08510408);
|
||||
@ -498,7 +498,7 @@ static void ShowMessage(const u8 *str)
|
||||
{
|
||||
DrawDialogFrameWithCustomTileAndPalette(1, FALSE, 0x200, 0xF);
|
||||
AddTextPrinterParameterized(1, 1, str, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void Task_ShowResetRtcPrompt(u8 taskId)
|
||||
@ -529,7 +529,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
|
||||
gSaveBlock2Ptr->lastBerryTreeUpdate.seconds);
|
||||
ShowMessage(gText_ResetRTCConfirmCancel);
|
||||
CopyWindowToVram(0, 2);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
data[0]++;
|
||||
case 1:
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
|
@ -943,15 +943,15 @@ static void sub_81405CC(void)
|
||||
ResetPaletteFade();
|
||||
ResetSpriteData();
|
||||
ResetTasks();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
break;
|
||||
case 3:
|
||||
LoadPalette(&gUnknown_085B5BFC, 0, 0x1C0);
|
||||
decompress_and_copy_tile_data_to_vram(1, gRouletteMenuTiles, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, gRouletteWheelTiles, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gRouletteMenuTiles, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gRouletteWheelTiles, 0, 0, 0);
|
||||
break;
|
||||
case 4:
|
||||
if (free_temp_tile_data_buffers_if_possible())
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return;
|
||||
|
||||
sub_8140470();
|
||||
|
@ -110,7 +110,7 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, bool8 ignoreB
|
||||
SetStandardWindowBorderStyle(windowId, 0);
|
||||
PrintMenuTable(windowId, count, actions);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, cursorPos);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
InitMultichoiceCheckWrap(ignoreBPress, count, windowId, multichoiceId);
|
||||
}
|
||||
|
||||
@ -595,7 +595,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y)
|
||||
gSprites[spriteId].callback = SpriteCallbackDummy;
|
||||
gSprites[spriteId].oam.priority = 0;
|
||||
SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, 1);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -947,7 +947,7 @@ static void FinalizeRegistryMenu(u8 taskId)
|
||||
SetStandardWindowBorderStyle(data[6], 0);
|
||||
data[5] = ListMenuInit(&gMultiuseListMenuTemplate, data[2], data[1]);
|
||||
AddRegistryMenuScrollArrows(taskId);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void AddRegistryMenuScrollArrows(u8 taskId)
|
||||
@ -975,7 +975,7 @@ static void HandleRegistryMenuInput(u8 taskId)
|
||||
ClearStdWindowAndFrame(data[6], 0);
|
||||
ClearWindowTilemap(data[6]);
|
||||
RemoveWindow(data[6]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
free(sRegistryMenu);
|
||||
GoToSecretBasePCRegisterMenu(taskId);
|
||||
break;
|
||||
@ -998,7 +998,7 @@ static void ShowRegistryMenuActions(u8 taskId)
|
||||
SetStandardWindowBorderStyle(data[7], 0);
|
||||
PrintMenuTable(data[7], 2, sRegistryMenuActions);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[7], 2, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = HandleRegistryMenuActionsInput;
|
||||
}
|
||||
|
||||
@ -1028,7 +1028,7 @@ static void ShowRegistryMenuDeleteConfirmation(u8 taskId)
|
||||
ClearWindowTilemap(data[6]);
|
||||
ClearWindowTilemap(data[7]);
|
||||
RemoveWindow(data[7]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
GetSecretBaseName(gStringVar1, data[4]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_OkayToDeleteFromRegistry);
|
||||
DisplayItemMessageOnField(taskId, gStringVar4, ShowRegistryMenuDeleteYesNo);
|
||||
@ -1073,7 +1073,7 @@ static void ReturnToMainRegistryMenu(u8 taskId)
|
||||
ClearStdWindowAndFrame(data[7], 0);
|
||||
ClearWindowTilemap(data[7]);
|
||||
RemoveWindow(data[7]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = HandleRegistryMenuInput;
|
||||
}
|
||||
|
||||
|
20
src/shop.c
20
src/shop.c
@ -441,7 +441,7 @@ static void CB2_InitBuyMenu(void)
|
||||
SetVBlankHBlankCallbacksToNull();
|
||||
CpuFastFill(0, (void *)OAM, OAM_SIZE);
|
||||
ScanlineEffect_Stop();
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
FreeAllSpritePalettes();
|
||||
ResetPaletteFade();
|
||||
ResetSpriteData();
|
||||
@ -462,7 +462,7 @@ static void CB2_InitBuyMenu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 1:
|
||||
if (!free_temp_tile_data_buffers_if_possible())
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
gMain.state++;
|
||||
break;
|
||||
default:
|
||||
@ -673,7 +673,7 @@ static void BuyMenuInitBgs(void)
|
||||
|
||||
static void BuyMenuDecompressBgGraphics(void)
|
||||
{
|
||||
decompress_and_copy_tile_data_to_vram(1, gBuyMenuFrame_Gfx, 0x3A0, 0x3E3, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gBuyMenuFrame_Gfx, 0x3A0, 0x3E3, 0);
|
||||
LZDecompressWram(gBuyMenuFrame_Tilemap, gShopDataPtr->tilemapBuffers[0]);
|
||||
LoadCompressedPalette(gMenuMoneyPal, 0xC0, 0x20);
|
||||
}
|
||||
@ -697,7 +697,7 @@ static void BuyMenuPrint(u8 windowId, const u8 *text, u8 x, u8 y, s8 speed, u8 c
|
||||
static void BuyMenuDisplayMessage(u8 taskId, const u8 *text, TaskFunc callback)
|
||||
{
|
||||
DisplayMessageAndContinueTask(taskId, 5, 10, 14, 1, GetPlayerTextSpeedDelay(), text, callback);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void BuyMenuDrawGraphics(void)
|
||||
@ -706,10 +706,10 @@ static void BuyMenuDrawGraphics(void)
|
||||
BuyMenuCopyMenuBgToBg1TilemapBuffer();
|
||||
AddMoneyLabelObject(19, 11);
|
||||
PrintMoneyAmountInMoneyBoxWithBorder(0, 1, 13, GetMoney(&gSaveBlock1Ptr->money));
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
ScheduleBgCopyTilemapToVram(3);
|
||||
}
|
||||
|
||||
static void BuyMenuDrawMapGraphics(void)
|
||||
@ -990,7 +990,7 @@ static void Task_BuyHowManyDialogueInit(u8 taskId)
|
||||
tItemCount = 1;
|
||||
DrawStdFrameWithCustomTileAndPalette(4, FALSE, 1, 13);
|
||||
BuyMenuPrintItemQuantityAndPrice(taskId);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
|
||||
maxQuantity = GetMoney(&gSaveBlock1Ptr->money) / gShopDataPtr->totalCost;
|
||||
|
||||
@ -1137,7 +1137,7 @@ static void BuyMenuReturnToItemList(u8 taskId)
|
||||
BuyMenuPrintCursor(tListTaskId, 1);
|
||||
PutWindowTilemap(1);
|
||||
PutWindowTilemap(2);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
BuyMenuAddScrollIndicatorArrows();
|
||||
gTasks[taskId].func = Task_BuyMenu;
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ static void Task_StarterChoose1(u8 taskId)
|
||||
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x2A8, 0xD);
|
||||
AddTextPrinterParameterized(0, 1, gText_BirchInTrouble, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].func = Task_StarterChoose2;
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ static void Task_StarterChoose4(u8 taskId)
|
||||
PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
CreateYesNoMenu(&gUnknown_085B1DDC, 0x2A8, 0xD, 0);
|
||||
gTasks[taskId].func = Task_StarterChoose5;
|
||||
}
|
||||
@ -603,7 +603,7 @@ static void CreateStarterPokemonLabel(u8 selection)
|
||||
AddTextPrinterParameterized3(sStarterChooseWindowId, 1, width, 0x11, sTextColors, 0, speciesName);
|
||||
|
||||
PutWindowTilemap(sStarterChooseWindowId);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
|
||||
labelLeft = sStarterLabelCoords[selection][0] * 8 - 4;
|
||||
labelRight = (sStarterLabelCoords[selection][0] + 13) * 8 + 4;
|
||||
@ -621,7 +621,7 @@ static void sub_8134604(void)
|
||||
sStarterChooseWindowId = 0xFF;
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void Task_MoveStarterChooseCursor(u8 taskId)
|
||||
|
@ -83,7 +83,7 @@ void CreateAvailableDecorationsMenu(u8 taskId)
|
||||
}
|
||||
AddTextPrinterParameterized(data[3], 1, gText_Exit, 8, 16 * i + 1, 255, NULL);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[3], 5, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
void Task_BufferDecorSelectionAndCloseWindow(u8 taskId, u8 decorationId)
|
||||
@ -101,7 +101,7 @@ void Task_BufferDecorSelectionAndCloseWindow(u8 taskId, u8 decorationId)
|
||||
ClearStdWindowAndFrameToTransparent(data[3], FALSE);
|
||||
ClearWindowTilemap(data[3]);
|
||||
RemoveWindow(data[3]);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
}
|
||||
|
@ -518,7 +518,7 @@ void sub_801AC54(void)
|
||||
ResetTasks();
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_082F0DD0, 1);
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
if (!InitWindows(gUnknown_082F0DD4))
|
||||
{
|
||||
return;
|
||||
|
@ -1828,7 +1828,7 @@ static bool8 sub_801F4D0(void)
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_082F2C60, ARRAY_COUNT(gUnknown_082F2C60));
|
||||
InitWindows(gUnknown_082F2C70);
|
||||
reset_temp_tile_data_buffers();
|
||||
ResetTempTileDataBuffers();
|
||||
sub_8020770();
|
||||
sub_801F574(gUnknown_02022C88);
|
||||
sub_801F580();
|
||||
@ -1916,7 +1916,7 @@ static bool8 sub_801F644(u8 arg0)
|
||||
|
||||
bool32 sub_801F658(u8 *state)
|
||||
{
|
||||
if (free_temp_tile_data_buffers_if_possible() == TRUE)
|
||||
if (FreeTempTileDataBuffersIfPossible() == TRUE)
|
||||
return TRUE;
|
||||
|
||||
switch (*state)
|
||||
@ -2739,7 +2739,7 @@ static void sub_80205B4(void)
|
||||
{
|
||||
LoadPalette(gUnknown_08DD4BD0, 0x70, 0x20);
|
||||
LoadPalette(gUnknown_08DD4BB0, 0xC0, 0x20);
|
||||
decompress_and_copy_tile_data_to_vram(1, gUnknown_08DD4BF0, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_08DD4BF0, 0, 0, 0);
|
||||
CopyToBgTilemapBuffer(1, gUnknown_08DD4C4C, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
}
|
||||
@ -2749,7 +2749,7 @@ static void sub_8020604(void)
|
||||
u8 *ptr;
|
||||
|
||||
LoadPalette(gLinkMiscMenu_Pal, 0, 0x20);
|
||||
ptr = decompress_and_copy_tile_data_to_vram(2, gLinkMiscMenu_Gfx, 0, 0, 0);
|
||||
ptr = DecompressAndCopyTileDataToVram(2, gLinkMiscMenu_Gfx, 0, 0, 0);
|
||||
if (ptr)
|
||||
{
|
||||
CpuFastCopy(&ptr[0x220], gUnknown_02022C88->unk2128, 0x20);
|
||||
|
@ -724,7 +724,7 @@ void CB2_StartWallClock(void)
|
||||
|
||||
AddTextPrinterParameterized(1, 1, gText_Confirm3, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
void CB2_ViewWallClock(void)
|
||||
@ -772,7 +772,7 @@ void CB2_ViewWallClock(void)
|
||||
|
||||
AddTextPrinterParameterized(1, 1, gText_Cancel4, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
|
||||
static void WallClockMainCallback(void)
|
||||
@ -839,7 +839,7 @@ static void Task_SetClock3(u8 taskId)
|
||||
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x250, 0x0d);
|
||||
AddTextPrinterParameterized(0, 1, gText_IsThisTheCorrectTime, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
CreateYesNoMenu(&gUnknown_085B21F4, 0x250, 0x0d, 1);
|
||||
gTasks[taskId].func = Task_SetClock4;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user