mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Document main_menu state machine, name window constants
The new names for the constants (and newly named functions) give a much better understanding of what the window system is trying to do.
This commit is contained in:
parent
6f1d2b870c
commit
d979ac3bf3
@ -745,7 +745,7 @@ _08017228:
|
|||||||
bl DestroyListMenuTask
|
bl DestroyListMenuTask
|
||||||
ldrb r0, [r5]
|
ldrb r0, [r5]
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_819746C
|
bl ClearWindowAndBorder
|
||||||
ldrb r0, [r5]
|
ldrb r0, [r5]
|
||||||
bl RemoveWindow
|
bl RemoveWindow
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -765,7 +765,7 @@ _08017264:
|
|||||||
bl DestroyListMenuTask
|
bl DestroyListMenuTask
|
||||||
ldrb r0, [r5]
|
ldrb r0, [r5]
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_819746C
|
bl ClearWindowAndBorder
|
||||||
ldrb r0, [r5]
|
ldrb r0, [r5]
|
||||||
bl RemoveWindow
|
bl RemoveWindow
|
||||||
strb r4, [r7]
|
strb r4, [r7]
|
||||||
@ -23941,7 +23941,7 @@ _08022DE8:
|
|||||||
beq _08022DFA
|
beq _08022DFA
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_8197434
|
bl ClearWindowAndWideBorder
|
||||||
_08022DFA:
|
_08022DFA:
|
||||||
ldrb r0, [r7, 0xE]
|
ldrb r0, [r7, 0xE]
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
@ -24245,7 +24245,7 @@ _0802301E:
|
|||||||
_08023044:
|
_08023044:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_8197434
|
bl ClearWindowAndWideBorder
|
||||||
movs r0, 0xA
|
movs r0, 0xA
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
movs r2, 0
|
movs r2, 0
|
||||||
@ -26578,7 +26578,7 @@ _080242A4:
|
|||||||
_080242A6:
|
_080242A6:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_8197434
|
bl ClearWindowAndWideBorder
|
||||||
movs r4, 0
|
movs r4, 0
|
||||||
str r4, [sp]
|
str r4, [sp]
|
||||||
adds r0, r6, 0
|
adds r0, r6, 0
|
||||||
@ -26756,7 +26756,7 @@ _080243EA:
|
|||||||
_080243F6:
|
_080243F6:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_8197434
|
bl ClearWindowAndWideBorder
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl sub_8021488
|
bl sub_8021488
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
filler_03002F58
|
filler_03002F58
|
||||||
filler_03002F5C
|
filler_03002F5C
|
||||||
gUnknown_03002F60
|
gTransparentTileNumber
|
||||||
filler_03002F64
|
filler_03002F64
|
||||||
gUnknown_03002F70
|
gUnknown_03002F70
|
||||||
|
@ -26,11 +26,11 @@ void sub_8197200(void);
|
|||||||
u16 RunTextPrintersAndIsPrinter0Active(void);
|
u16 RunTextPrintersAndIsPrinter0Active(void);
|
||||||
void sub_81973A4(void);
|
void sub_81973A4(void);
|
||||||
void NewMenuHelpers_DrawDialogueFrame(u8, u8);
|
void NewMenuHelpers_DrawDialogueFrame(u8, u8);
|
||||||
void sub_819746C(u8 windowId, bool8 copyToVram);
|
void ClearWindowAndBorder(u8 windowId, bool8 copyToVram);
|
||||||
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||||
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
|
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
|
||||||
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
||||||
void sub_8197434(u8 windowId, bool8 copyToVram);
|
void ClearWindowAndWideBorder(u8 windowId, bool8 copyToVram);
|
||||||
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
|
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
|
||||||
void DisplayYesNoMenu(void);
|
void DisplayYesNoMenu(void);
|
||||||
u32 GetPlayerTextSpeed(void);
|
u32 GetPlayerTextSpeed(void);
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
#ifndef GUARD_WINDOW_H
|
#ifndef GUARD_WINDOW_H
|
||||||
#define GUARD_WINDOW_H
|
#define GUARD_WINDOW_H
|
||||||
|
|
||||||
|
// The tile ID for a transparent tile in the window tilesheet
|
||||||
|
#define TRANSPARENT_TILE_NUMBER 0
|
||||||
|
|
||||||
|
#define PIXEL_BUFFER_TRANSPARENT 0x00
|
||||||
|
#define PIXEL_BUFFER_WHITE 0x11
|
||||||
|
#define PIXEL_BUFFER_UNKNOWN 0xFF
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
WINDOW_BG,
|
WINDOW_BG,
|
||||||
@ -73,6 +80,7 @@ extern u32 filler_03002F58;
|
|||||||
extern u32 filler_03002F5C;
|
extern u32 filler_03002F5C;
|
||||||
extern u32 filler_03002F64;
|
extern u32 filler_03002F64;
|
||||||
|
|
||||||
extern u8 gUnknown_03002F60;
|
// This global is set to TRANSPARENT_TILE_NUMBER and never changed.
|
||||||
|
extern u8 gTransparentTileNumber;
|
||||||
|
|
||||||
#endif // GUARD_WINDOW_H
|
#endif // GUARD_WINDOW_H
|
||||||
|
@ -90,7 +90,7 @@ static void LinkPartnerHandleBattleAnimation(void);
|
|||||||
static void LinkPartnerHandleLinkStandbyMsg(void);
|
static void LinkPartnerHandleLinkStandbyMsg(void);
|
||||||
static void LinkPartnerHandleResetActionMoveSelection(void);
|
static void LinkPartnerHandleResetActionMoveSelection(void);
|
||||||
static void LinkPartnerHandleCmd55(void);
|
static void LinkPartnerHandleCmd55(void);
|
||||||
static void nullsub_113(void);
|
static void SpriteCB_Null3(void);
|
||||||
|
|
||||||
static void LinkPartnerBufferRunCommand(void);
|
static void LinkPartnerBufferRunCommand(void);
|
||||||
static void LinkPartnerBufferExecCompleted(void);
|
static void LinkPartnerBufferExecCompleted(void);
|
||||||
@ -161,10 +161,10 @@ static void (*const sLinkPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
|||||||
LinkPartnerHandleLinkStandbyMsg,
|
LinkPartnerHandleLinkStandbyMsg,
|
||||||
LinkPartnerHandleResetActionMoveSelection,
|
LinkPartnerHandleResetActionMoveSelection,
|
||||||
LinkPartnerHandleCmd55,
|
LinkPartnerHandleCmd55,
|
||||||
nullsub_113
|
SpriteCB_Null3
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nullsub_112(void)
|
static void SpriteCB_Null2(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1564,7 +1564,7 @@ static void LinkPartnerHandleIntroTrainerBallThrow(void)
|
|||||||
gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary;
|
gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary;
|
||||||
|
|
||||||
gBattleSpritesDataPtr->animationData->field_9_x1 = 1;
|
gBattleSpritesDataPtr->animationData->field_9_x1 = 1;
|
||||||
gBattlerControllerFuncs[gActiveBattler] = nullsub_112;
|
gBattlerControllerFuncs[gActiveBattler] = SpriteCB_Null2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_814DCCC(u8 taskId)
|
static void sub_814DCCC(u8 taskId)
|
||||||
@ -1687,6 +1687,6 @@ static void LinkPartnerHandleCmd55(void)
|
|||||||
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_113(void)
|
static void SpriteCB_Null3(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ static void RecordedOpponentHandleBattleAnimation(void);
|
|||||||
static void RecordedOpponentHandleLinkStandbyMsg(void);
|
static void RecordedOpponentHandleLinkStandbyMsg(void);
|
||||||
static void RecordedOpponentHandleResetActionMoveSelection(void);
|
static void RecordedOpponentHandleResetActionMoveSelection(void);
|
||||||
static void RecordedOpponentHandleCmd55(void);
|
static void RecordedOpponentHandleCmd55(void);
|
||||||
static void nullsub_119(void);
|
static void SpriteCB_Null9(void);
|
||||||
|
|
||||||
static void RecordedOpponentBufferRunCommand(void);
|
static void RecordedOpponentBufferRunCommand(void);
|
||||||
static void RecordedOpponentBufferExecCompleted(void);
|
static void RecordedOpponentBufferExecCompleted(void);
|
||||||
@ -165,7 +165,7 @@ static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void
|
|||||||
RecordedOpponentHandleLinkStandbyMsg,
|
RecordedOpponentHandleLinkStandbyMsg,
|
||||||
RecordedOpponentHandleResetActionMoveSelection,
|
RecordedOpponentHandleResetActionMoveSelection,
|
||||||
RecordedOpponentHandleCmd55,
|
RecordedOpponentHandleCmd55,
|
||||||
nullsub_119
|
SpriteCB_Null9
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nullsub_70(void)
|
static void nullsub_70(void)
|
||||||
@ -1791,6 +1791,6 @@ static void RecordedOpponentHandleCmd55(void)
|
|||||||
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_119(void)
|
static void SpriteCB_Null9(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ static void SafariHandleBattleAnimation(void);
|
|||||||
static void SafariHandleLinkStandbyMsg(void);
|
static void SafariHandleLinkStandbyMsg(void);
|
||||||
static void SafariHandleResetActionMoveSelection(void);
|
static void SafariHandleResetActionMoveSelection(void);
|
||||||
static void SafariHandleCmd55(void);
|
static void SafariHandleCmd55(void);
|
||||||
static void nullsub_115(void);
|
static void SpriteCB_Null5(void);
|
||||||
|
|
||||||
static void SafariBufferRunCommand(void);
|
static void SafariBufferRunCommand(void);
|
||||||
static void SafariBufferExecCompleted(void);
|
static void SafariBufferExecCompleted(void);
|
||||||
@ -148,10 +148,10 @@ static void (*const sSafariBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
|||||||
SafariHandleLinkStandbyMsg,
|
SafariHandleLinkStandbyMsg,
|
||||||
SafariHandleResetActionMoveSelection,
|
SafariHandleResetActionMoveSelection,
|
||||||
SafariHandleCmd55,
|
SafariHandleCmd55,
|
||||||
nullsub_115
|
SpriteCB_Null5
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nullsub_114(void)
|
static void SpriteCB_Null4(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -688,6 +688,6 @@ static void SafariHandleCmd55(void)
|
|||||||
gBattlerControllerFuncs[gActiveBattler] = sub_81595E4;
|
gBattlerControllerFuncs[gActiveBattler] = sub_81595E4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_115(void)
|
static void SpriteCB_Null5(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ static void WallyHandleBattleAnimation(void);
|
|||||||
static void WallyHandleLinkStandbyMsg(void);
|
static void WallyHandleLinkStandbyMsg(void);
|
||||||
static void WallyHandleResetActionMoveSelection(void);
|
static void WallyHandleResetActionMoveSelection(void);
|
||||||
static void WallyHandleCmd55(void);
|
static void WallyHandleCmd55(void);
|
||||||
static void nullsub_118(void);
|
static void SpriteCB_Null8(void);
|
||||||
|
|
||||||
static void WallyBufferRunCommand(void);
|
static void WallyBufferRunCommand(void);
|
||||||
static void WallyBufferExecCompleted(void);
|
static void WallyBufferExecCompleted(void);
|
||||||
@ -161,10 +161,10 @@ static void (*const sWallyBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
|||||||
WallyHandleLinkStandbyMsg,
|
WallyHandleLinkStandbyMsg,
|
||||||
WallyHandleResetActionMoveSelection,
|
WallyHandleResetActionMoveSelection,
|
||||||
WallyHandleCmd55,
|
WallyHandleCmd55,
|
||||||
nullsub_118
|
SpriteCB_Null8
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nullsub_117(void)
|
static void SpriteCB_Null7(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1559,6 +1559,6 @@ static void WallyHandleCmd55(void)
|
|||||||
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_118(void)
|
static void SpriteCB_Null8(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -3794,7 +3794,7 @@ static void sub_8190CD4(u8 taskId)
|
|||||||
for (i = windowId; i < windowId + 9; i++)
|
for (i = windowId; i < windowId + 9; i++)
|
||||||
{
|
{
|
||||||
CopyWindowToVram(i, 2);
|
CopyWindowToVram(i, 2);
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
gTasks[taskId].data[0] = 3;
|
gTasks[taskId].data[0] = 3;
|
||||||
break;
|
break;
|
||||||
|
@ -1786,14 +1786,14 @@ static void sub_819B958(u8 windowId)
|
|||||||
{
|
{
|
||||||
gSprites[sFactorySelectScreen->menuCursor1SpriteId].invisible = TRUE;
|
gSprites[sFactorySelectScreen->menuCursor1SpriteId].invisible = TRUE;
|
||||||
gSprites[sFactorySelectScreen->menuCursor2SpriteId].invisible = TRUE;
|
gSprites[sFactorySelectScreen->menuCursor2SpriteId].invisible = TRUE;
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(windowId, 2);
|
CopyWindowToVram(windowId, 2);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Select_PrintRentalPkmnString(void)
|
static void Select_PrintRentalPkmnString(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized(0, 1, gText_RentalPkmn2, 2, 1, 0, NULL);
|
AddTextPrinterParameterized(0, 1, gText_RentalPkmn2, 2, 1, 0, NULL);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
}
|
}
|
||||||
@ -1804,7 +1804,7 @@ static void Select_PrintMonSpecies(void)
|
|||||||
u8 x;
|
u8 x;
|
||||||
u8 monId = sFactorySelectScreen->cursorPos;
|
u8 monId = sFactorySelectScreen->cursorPos;
|
||||||
|
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
|
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
|
||||||
StringCopy(gStringVar4, gSpeciesNames[species]);
|
StringCopy(gStringVar4, gSpeciesNames[species]);
|
||||||
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
|
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
|
||||||
@ -1816,7 +1816,7 @@ static void Select_PrintSelectMonString(void)
|
|||||||
{
|
{
|
||||||
const u8 *str = NULL;
|
const u8 *str = NULL;
|
||||||
|
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (sFactorySelectScreen->selectingMonsState == 1)
|
if (sFactorySelectScreen->selectingMonsState == 1)
|
||||||
str = gText_SelectFirstPkmn;
|
str = gText_SelectFirstPkmn;
|
||||||
else if (sFactorySelectScreen->selectingMonsState == 2)
|
else if (sFactorySelectScreen->selectingMonsState == 2)
|
||||||
@ -1832,7 +1832,7 @@ static void Select_PrintSelectMonString(void)
|
|||||||
|
|
||||||
static void Select_PrintCantSelectSameMon(void)
|
static void Select_PrintCantSelectSameMon(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized(2, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL);
|
AddTextPrinterParameterized(2, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL);
|
||||||
CopyWindowToVram(2, 2);
|
CopyWindowToVram(2, 2);
|
||||||
}
|
}
|
||||||
@ -1842,7 +1842,7 @@ static void Select_PrintMenuOptions(void)
|
|||||||
u8 selectedId = sFactorySelectScreen->mons[sFactorySelectScreen->cursorPos].selectedId;
|
u8 selectedId = sFactorySelectScreen->mons[sFactorySelectScreen->cursorPos].selectedId;
|
||||||
|
|
||||||
PutWindowTilemap(3);
|
PutWindowTilemap(3);
|
||||||
FillWindowPixelBuffer(3, 0);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized3(3, 1, 7, 1, gUnknown_08610476, 0, gText_Summary);
|
AddTextPrinterParameterized3(3, 1, 7, 1, gUnknown_08610476, 0, gText_Summary);
|
||||||
if (selectedId != 0)
|
if (selectedId != 0)
|
||||||
AddTextPrinterParameterized3(3, 1, 7, 17, gUnknown_08610476, 0, gText_Deselect);
|
AddTextPrinterParameterized3(3, 1, 7, 17, gUnknown_08610476, 0, gText_Deselect);
|
||||||
@ -1856,7 +1856,7 @@ static void Select_PrintMenuOptions(void)
|
|||||||
static void Select_PrintYesNoOptions(void)
|
static void Select_PrintYesNoOptions(void)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(4);
|
PutWindowTilemap(4);
|
||||||
FillWindowPixelBuffer(4, 0);
|
FillWindowPixelBuffer(4, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610476, 0, gText_Yes2);
|
AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610476, 0, gText_Yes2);
|
||||||
AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610476, 0, gText_No2);
|
AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610476, 0, gText_No2);
|
||||||
CopyWindowToVram(4, 3);
|
CopyWindowToVram(4, 3);
|
||||||
@ -1924,7 +1924,7 @@ static void Select_PrintMonCategory(void)
|
|||||||
if (monId < SELECTABLE_MONS_COUNT)
|
if (monId < SELECTABLE_MONS_COUNT)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(5);
|
PutWindowTilemap(5);
|
||||||
FillWindowPixelBuffer(5, 0);
|
FillWindowPixelBuffer(5, PIXEL_BUFFER_TRANSPARENT);
|
||||||
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
|
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
|
||||||
CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text);
|
CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text);
|
||||||
x = GetStringRightAlignXOffset(1, text, 0x76);
|
x = GetStringRightAlignXOffset(1, text, 0x76);
|
||||||
@ -2873,7 +2873,7 @@ static void sub_819D588(u8 taskId)
|
|||||||
case 3:
|
case 3:
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(5, 0);
|
FillWindowPixelBuffer(5, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(5, 2);
|
CopyWindowToVram(5, 2);
|
||||||
if (sFactorySwapScreen->inEnemyScreen == TRUE)
|
if (sFactorySwapScreen->inEnemyScreen == TRUE)
|
||||||
{
|
{
|
||||||
@ -3002,7 +3002,7 @@ static void sub_819D770(u8 taskId)
|
|||||||
gTasks[taskId].data[0]++;
|
gTasks[taskId].data[0]++;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
FillWindowPixelBuffer(5, 0);
|
FillWindowPixelBuffer(5, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(5, 2);
|
CopyWindowToVram(5, 2);
|
||||||
gTasks[taskId].data[0]++;
|
gTasks[taskId].data[0]++;
|
||||||
break;
|
break;
|
||||||
@ -3546,7 +3546,7 @@ static void sub_819EA64(u8 windowId)
|
|||||||
{
|
{
|
||||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = TRUE;
|
gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = TRUE;
|
||||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = TRUE;
|
gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = TRUE;
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(windowId, 2);
|
CopyWindowToVram(windowId, 2);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
}
|
}
|
||||||
@ -3554,14 +3554,14 @@ static void sub_819EA64(u8 windowId)
|
|||||||
static void sub_819EAC0(void)
|
static void sub_819EAC0(void)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(1, 2);
|
CopyWindowToVram(1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_819EADC(void)
|
static void sub_819EADC(void)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(7);
|
PutWindowTilemap(7);
|
||||||
FillWindowPixelBuffer(7, 0);
|
FillWindowPixelBuffer(7, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(7, 2);
|
CopyWindowToVram(7, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3569,13 +3569,13 @@ static void sub_819EAF8(void)
|
|||||||
{
|
{
|
||||||
sub_819EAC0();
|
sub_819EAC0();
|
||||||
PutWindowTilemap(5);
|
PutWindowTilemap(5);
|
||||||
FillWindowPixelBuffer(5, 0);
|
FillWindowPixelBuffer(5, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(5, 2);
|
CopyWindowToVram(5, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Swap_PrintPkmnSwap(void)
|
static void Swap_PrintPkmnSwap(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(0, 1, gText_PkmnSwap, 2, 1, 0, NULL);
|
AddTextPrinterParameterized(0, 1, gText_PkmnSwap, 2, 1, 0, NULL);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
}
|
}
|
||||||
@ -3585,7 +3585,7 @@ static void Swap_PrintMonSpecies(void)
|
|||||||
u16 species;
|
u16 species;
|
||||||
u8 x;
|
u8 x;
|
||||||
|
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (sFactorySwapScreen->cursorPos > 2)
|
if (sFactorySwapScreen->cursorPos > 2)
|
||||||
{
|
{
|
||||||
CopyWindowToVram(1, 2);
|
CopyWindowToVram(1, 2);
|
||||||
@ -3606,7 +3606,7 @@ static void Swap_PrintMonSpecies(void)
|
|||||||
|
|
||||||
static void Swap_PrintOnInfoWindow(const u8 *str)
|
static void Swap_PrintOnInfoWindow(const u8 *str)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized(2, 1, str, 2, 5, 0, NULL);
|
AddTextPrinterParameterized(2, 1, str, 2, 5, 0, NULL);
|
||||||
CopyWindowToVram(2, 2);
|
CopyWindowToVram(2, 2);
|
||||||
}
|
}
|
||||||
@ -3614,7 +3614,7 @@ static void Swap_PrintOnInfoWindow(const u8 *str)
|
|||||||
static void Swap_PrintMenuOptions(void)
|
static void Swap_PrintMenuOptions(void)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(3);
|
PutWindowTilemap(3);
|
||||||
FillWindowPixelBuffer(3, 0);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized3(3, 1, 15, 1, gUnknown_08610922, 0, gText_Summary2);
|
AddTextPrinterParameterized3(3, 1, 15, 1, gUnknown_08610922, 0, gText_Summary2);
|
||||||
AddTextPrinterParameterized3(3, 1, 15, 17, gUnknown_08610922, 0, gText_Swap);
|
AddTextPrinterParameterized3(3, 1, 15, 17, gUnknown_08610922, 0, gText_Swap);
|
||||||
AddTextPrinterParameterized3(3, 1, 15, 33, gUnknown_08610922, 0, gText_Rechoose);
|
AddTextPrinterParameterized3(3, 1, 15, 33, gUnknown_08610922, 0, gText_Rechoose);
|
||||||
@ -3624,7 +3624,7 @@ static void Swap_PrintMenuOptions(void)
|
|||||||
static void Swap_PrintYesNoOptions(void)
|
static void Swap_PrintYesNoOptions(void)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(4);
|
PutWindowTilemap(4);
|
||||||
FillWindowPixelBuffer(4, 0);
|
FillWindowPixelBuffer(4, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610922, 0, gText_Yes3);
|
AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610922, 0, gText_Yes3);
|
||||||
AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610922, 0, gText_No3);
|
AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610922, 0, gText_No3);
|
||||||
CopyWindowToVram(4, 3);
|
CopyWindowToVram(4, 3);
|
||||||
@ -3638,7 +3638,7 @@ static void Swap_PrintActionString(const u8 *str, u32 y, u32 windowId)
|
|||||||
|
|
||||||
static void Swap_PrintActionStrings(void)
|
static void Swap_PrintActionStrings(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(5, 0);
|
FillWindowPixelBuffer(5, PIXEL_BUFFER_TRANSPARENT);
|
||||||
switch (sFactorySwapScreen->inEnemyScreen)
|
switch (sFactorySwapScreen->inEnemyScreen)
|
||||||
{
|
{
|
||||||
case TRUE:
|
case TRUE:
|
||||||
@ -3652,7 +3652,7 @@ static void Swap_PrintActionStrings(void)
|
|||||||
|
|
||||||
static void Swap_PrintActionStrings2(void)
|
static void Swap_PrintActionStrings2(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(3, 0);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
|
||||||
switch (sFactorySwapScreen->inEnemyScreen)
|
switch (sFactorySwapScreen->inEnemyScreen)
|
||||||
{
|
{
|
||||||
case TRUE:
|
case TRUE:
|
||||||
@ -3693,7 +3693,7 @@ static void Swap_PrintMonSpecies2(void)
|
|||||||
LoadPalette(pal, 0xF0, 0xA);
|
LoadPalette(pal, 0xF0, 0xA);
|
||||||
|
|
||||||
PutWindowTilemap(7);
|
PutWindowTilemap(7);
|
||||||
FillWindowPixelBuffer(7, 0);
|
FillWindowPixelBuffer(7, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (sFactorySwapScreen->cursorPos > 2)
|
if (sFactorySwapScreen->cursorPos > 2)
|
||||||
{
|
{
|
||||||
CopyWindowToVram(7, 3);
|
CopyWindowToVram(7, 3);
|
||||||
@ -3745,7 +3745,7 @@ static void Swap_PrintMonCategory(void)
|
|||||||
u8 x;
|
u8 x;
|
||||||
u8 monId = sFactorySwapScreen->cursorPos;
|
u8 monId = sFactorySwapScreen->cursorPos;
|
||||||
|
|
||||||
FillWindowPixelBuffer(8, 0);
|
FillWindowPixelBuffer(8, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (monId > 2)
|
if (monId > 2)
|
||||||
{
|
{
|
||||||
CopyWindowToVram(8, 2);
|
CopyWindowToVram(8, 2);
|
||||||
@ -3940,7 +3940,7 @@ static void Task_SwapCantHaveSameMons(u8 taskId)
|
|||||||
case 2:
|
case 2:
|
||||||
if (sFactorySwapScreen->unk30 != TRUE)
|
if (sFactorySwapScreen->unk30 != TRUE)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(5, 0);
|
FillWindowPixelBuffer(5, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(5, 2);
|
CopyWindowToVram(5, 2);
|
||||||
gTasks[taskId].data[0]++;
|
gTasks[taskId].data[0]++;
|
||||||
}
|
}
|
||||||
|
@ -651,7 +651,7 @@ static void PrintItemDescription(s32 listMenuId)
|
|||||||
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
|
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
|
||||||
desc = gStringVar4;
|
desc = gStringVar4;
|
||||||
}
|
}
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PrintOnWindow_Font1(1, desc, 3, 0, 0, 1, 0, 0);
|
PrintOnWindow_Font1(1, desc, 3, 0, 0, 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -911,7 +911,7 @@ static void sub_81C5D20(u8 taskId)
|
|||||||
|
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
|
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
||||||
if (gPyramidBagResources->menuActionsCount == 1)
|
if (gPyramidBagResources->menuActionsCount == 1)
|
||||||
sub_81C5EAC(sub_81C6D24(0));
|
sub_81C5EAC(sub_81C6D24(0));
|
||||||
@ -1048,7 +1048,7 @@ static void BagAction_UseOnField(u8 taskId)
|
|||||||
else if (ItemId_GetFieldFunc(gSpecialVar_ItemId) != NULL)
|
else if (ItemId_GetFieldFunc(gSpecialVar_ItemId) != NULL)
|
||||||
{
|
{
|
||||||
sub_81C61A8();
|
sub_81C61A8();
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
|
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
|
||||||
}
|
}
|
||||||
@ -1086,7 +1086,7 @@ static void BagAction_Toss(u8 taskId)
|
|||||||
{
|
{
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
|
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
||||||
sub_81C6404();
|
sub_81C6404();
|
||||||
gTasks[taskId].func = sub_81C64B4;
|
gTasks[taskId].func = sub_81C64B4;
|
||||||
@ -1100,7 +1100,7 @@ static void sub_81C6350(u8 taskId)
|
|||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2);
|
ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
|
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
||||||
sub_81C6DAC(taskId, &sYesNoTossFuncions);
|
sub_81C6DAC(taskId, &sYesNoTossFuncions);
|
||||||
}
|
}
|
||||||
@ -1168,7 +1168,7 @@ static void TossItem(u8 taskId)
|
|||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2);
|
ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
|
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
||||||
gTasks[taskId].func = sub_81C65CC;
|
gTasks[taskId].func = sub_81C65CC;
|
||||||
}
|
}
|
||||||
@ -1265,7 +1265,7 @@ static void Task_BeginItemSwap(u8 taskId)
|
|||||||
ListMenuSetUnkIndicatorsStructField(data[0], 0x10, 1);
|
ListMenuSetUnkIndicatorsStructField(data[0], 0x10, 1);
|
||||||
CopyItemName(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][data[1]], gStringVar1);
|
CopyItemName(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][data[1]], gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
|
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
|
||||||
sub_81C5A98(data[0], 1);
|
sub_81C5A98(data[0], 1);
|
||||||
sub_81C704C(data[1]);
|
sub_81C704C(data[1]);
|
||||||
@ -1395,7 +1395,7 @@ static void sub_81C6BD8(void)
|
|||||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||||
|
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
|
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
@ -1456,7 +1456,7 @@ static void sub_81C6DAC(u8 taskId, const struct YesNoFuncTable *yesNoTable)
|
|||||||
|
|
||||||
void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId))
|
void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId))
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(2, 0x11);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_WHITE);
|
||||||
DisplayMessageAndContinueTask(taskId, 2, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback);
|
DisplayMessageAndContinueTask(taskId, 2, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback);
|
||||||
schedule_bg_copy_tilemap_to_vram(1);
|
schedule_bg_copy_tilemap_to_vram(1);
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ void ShowLinkBattleRecords(void)
|
|||||||
|
|
||||||
gRecordsWindowId = AddWindow(&sLinkBattleRecordsWindow);
|
gRecordsWindowId = AddWindow(&sLinkBattleRecordsWindow);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults);
|
StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults);
|
||||||
|
|
||||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
||||||
@ -342,7 +342,7 @@ void ShowLinkBattleRecords(void)
|
|||||||
|
|
||||||
void RemoveRecordsWindow(void)
|
void RemoveRecordsWindow(void)
|
||||||
{
|
{
|
||||||
sub_819746C(gRecordsWindowId, FALSE);
|
ClearWindowAndBorder(gRecordsWindowId, FALSE);
|
||||||
RemoveWindow(gRecordsWindowId);
|
RemoveWindow(gRecordsWindowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ static void Task_ExitTrainerHillRecords(u8 taskId)
|
|||||||
|
|
||||||
static void RemoveTrainerHillRecordsWindow(u8 windowId)
|
static void RemoveTrainerHillRecordsWindow(u8 windowId)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
CopyWindowToVram(windowId, 2);
|
CopyWindowToVram(windowId, 2);
|
||||||
RemoveWindow(windowId);
|
RemoveWindow(windowId);
|
||||||
|
@ -51,7 +51,7 @@ static void AwardBattleTowerRibbons(void);
|
|||||||
static void SaveBattleTowerProgress(void);
|
static void SaveBattleTowerProgress(void);
|
||||||
static void sub_8163914(void);
|
static void sub_8163914(void);
|
||||||
static void nullsub_61(void);
|
static void nullsub_61(void);
|
||||||
static void nullsub_116(void);
|
static void SpriteCB_Null6(void);
|
||||||
static void sub_81642A0(void);
|
static void sub_81642A0(void);
|
||||||
static void sub_8164828(void);
|
static void sub_8164828(void);
|
||||||
static void sub_8164B74(void);
|
static void sub_8164B74(void);
|
||||||
@ -1061,7 +1061,7 @@ static void (* const gUnknown_085DF96C[])(void) =
|
|||||||
SaveBattleTowerProgress,
|
SaveBattleTowerProgress,
|
||||||
sub_8163914,
|
sub_8163914,
|
||||||
nullsub_61,
|
nullsub_61,
|
||||||
nullsub_116,
|
SpriteCB_Null6,
|
||||||
sub_81642A0,
|
sub_81642A0,
|
||||||
sub_8164828,
|
sub_8164828,
|
||||||
sub_8164B74,
|
sub_8164B74,
|
||||||
@ -2437,7 +2437,7 @@ static void nullsub_61(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_116(void)
|
static void SpriteCB_Null6(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -945,7 +945,7 @@ static void InitBerryBlenderWindows(void)
|
|||||||
|
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
|
|
||||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
|
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
|
||||||
sub_81978B0(0xE0);
|
sub_81978B0(0xE0);
|
||||||
@ -3538,7 +3538,7 @@ void ShowBerryBlenderRecordWindow(void)
|
|||||||
winTemplate = sBlenderRecordWindowTemplate;
|
winTemplate = sBlenderRecordWindowTemplate;
|
||||||
gRecordsWindowId = AddWindow(&winTemplate);
|
gRecordsWindowId = AddWindow(&winTemplate);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, 0);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, 0);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
|
|
||||||
xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90);
|
xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
|
||||||
|
@ -226,8 +226,8 @@ static void berry_fix_gpu_set(void)
|
|||||||
|
|
||||||
DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20);
|
DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20);
|
||||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP);
|
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP);
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
FillWindowPixelBuffer(3, 0);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
|
||||||
FillWindowPixelBuffer(0, 0xAA);
|
FillWindowPixelBuffer(0, 0xAA);
|
||||||
|
|
||||||
width = GetStringWidth(0, sUnknown_08617E9B, 0);
|
width = GetStringWidth(0, sUnknown_08617E9B, 0);
|
||||||
|
@ -381,7 +381,7 @@ static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s
|
|||||||
static void AddBerryTagTextToBg0(void)
|
static void AddBerryTagTextToBg0(void)
|
||||||
{
|
{
|
||||||
memcpy(GetBgTilemapBuffer(0), sBerryTag->tilemapBuffers[2], sizeof(sBerryTag->tilemapBuffers[2]));
|
memcpy(GetBgTilemapBuffer(0), sBerryTag->tilemapBuffers[2], sizeof(sBerryTag->tilemapBuffers[2]));
|
||||||
FillWindowPixelBuffer(WIN_BERRY_TAG, 0xFF);
|
FillWindowPixelBuffer(WIN_BERRY_TAG, PIXEL_BUFFER_UNKNOWN);
|
||||||
PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(1, gText_BerryTag, 0x40), 1, 0, 1);
|
PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(1, gText_BerryTag, 0x40), 1, 0, 1);
|
||||||
PutWindowTilemap(WIN_BERRY_TAG);
|
PutWindowTilemap(WIN_BERRY_TAG);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
@ -598,7 +598,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
|
|||||||
switch (data[0])
|
switch (data[0])
|
||||||
{
|
{
|
||||||
case 0x30:
|
case 0x30:
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
break;
|
break;
|
||||||
case 0x40:
|
case 0x40:
|
||||||
PrintBerryNumberAndName();
|
PrintBerryNumberAndName();
|
||||||
@ -608,7 +608,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
|
|||||||
CreateBerrySprite();
|
CreateBerrySprite();
|
||||||
break;
|
break;
|
||||||
case 0x60:
|
case 0x60:
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
break;
|
break;
|
||||||
case 0x70:
|
case 0x70:
|
||||||
PrintBerrySize();
|
PrintBerrySize();
|
||||||
@ -620,7 +620,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
|
|||||||
SetFlavorCirclesVisiblity();
|
SetFlavorCirclesVisiblity();
|
||||||
break;
|
break;
|
||||||
case 0xA0:
|
case 0xA0:
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
break;
|
break;
|
||||||
case 0xB0:
|
case 0xB0:
|
||||||
PrintBerryDescription1();
|
PrintBerryDescription1();
|
||||||
@ -635,7 +635,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
|
|||||||
switch (data[0])
|
switch (data[0])
|
||||||
{
|
{
|
||||||
case 0x30:
|
case 0x30:
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
break;
|
break;
|
||||||
case 0x40:
|
case 0x40:
|
||||||
PrintBerryDescription2();
|
PrintBerryDescription2();
|
||||||
@ -647,7 +647,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
|
|||||||
SetFlavorCirclesVisiblity();
|
SetFlavorCirclesVisiblity();
|
||||||
break;
|
break;
|
||||||
case 0x70:
|
case 0x70:
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
break;
|
break;
|
||||||
case 0x80:
|
case 0x80:
|
||||||
PrintBerryFirmness();
|
PrintBerryFirmness();
|
||||||
@ -660,7 +660,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
|
|||||||
CreateBerrySprite();
|
CreateBerrySprite();
|
||||||
break;
|
break;
|
||||||
case 0xB0:
|
case 0xB0:
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
break;
|
break;
|
||||||
case 0xC0:
|
case 0xC0:
|
||||||
PrintBerryNumberAndName();
|
PrintBerryNumberAndName();
|
||||||
|
@ -92,7 +92,9 @@ static void sub_80B23B0(u16 windowId, u32 value)
|
|||||||
|
|
||||||
static void sub_80B241C(u16 windowId)
|
static void sub_80B241C(u16 windowId)
|
||||||
{
|
{
|
||||||
sub_819746C(windowId, FALSE);
|
// Following this call with a copy-to-vram with mode 3 is identical to
|
||||||
|
// calling ClearWindowAndBorder(windowId, TRUE).
|
||||||
|
ClearWindowAndBorder(windowId, FALSE);
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
|
|||||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
FillWindowPixelBuffer(0, 17);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0);
|
AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0);
|
||||||
gTasks[taskId].func = Task_ClearSaveData;
|
gTasks[taskId].func = Task_ClearSaveData;
|
||||||
break;
|
break;
|
||||||
@ -203,7 +203,7 @@ static void InitClearSaveDataScreenWindows(void)
|
|||||||
{
|
{
|
||||||
InitWindows(sClearSaveTextWindow);
|
InitWindows(sClearSaveTextWindow);
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
LoadWindowGfx(0, 0, 2, 224);
|
LoadWindowGfx(0, 0, 2, 224);
|
||||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y)
|
|||||||
struct WindowTemplate template;
|
struct WindowTemplate template;
|
||||||
SetWindowTemplateFields(&template, 0, x, y, 8, 2, 0xF, 0x141);
|
SetWindowTemplateFields(&template, 0, x, y, 8, 2, 0xF, 0x141);
|
||||||
sCoinsWindowId = AddWindow(&template);
|
sCoinsWindowId = AddWindow(&template);
|
||||||
FillWindowPixelBuffer(sCoinsWindowId, 0);
|
FillWindowPixelBuffer(sCoinsWindowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(sCoinsWindowId);
|
PutWindowTilemap(sCoinsWindowId);
|
||||||
SetWindowBorderStyle(sCoinsWindowId, FALSE, 0x214, 0xE);
|
SetWindowBorderStyle(sCoinsWindowId, FALSE, 0x214, 0xE);
|
||||||
PrintCoinsString(coinAmount);
|
PrintCoinsString(coinAmount);
|
||||||
@ -35,7 +35,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y)
|
|||||||
|
|
||||||
void HideCoinsWindow(void)
|
void HideCoinsWindow(void)
|
||||||
{
|
{
|
||||||
sub_819746C(sCoinsWindowId, TRUE);
|
ClearWindowAndBorder(sCoinsWindowId, TRUE);
|
||||||
RemoveWindow(sCoinsWindowId);
|
RemoveWindow(sCoinsWindowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -819,7 +819,7 @@ static void sub_80D8490(u8 taskId)
|
|||||||
}
|
}
|
||||||
r5 = StringCopy(r5, gMoveNames[move]);
|
r5 = StringCopy(r5, gMoveNames[move]);
|
||||||
|
|
||||||
FillWindowPixelBuffer(i + 5, 0);
|
FillWindowPixelBuffer(i + 5, PIXEL_BUFFER_TRANSPARENT);
|
||||||
Contest_PrintTextToBg0WindowAt(i + 5, sp8, 5, 1, 7);
|
Contest_PrintTextToBg0WindowAt(i + 5, sp8, 5, 1, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -941,7 +941,7 @@ static void sub_80D895C(u8 taskId)
|
|||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(5 + i, 0);
|
FillWindowPixelBuffer(5 + i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(5 + i);
|
PutWindowTilemap(5 + i);
|
||||||
CopyWindowToVram(5 + i, 2);
|
CopyWindowToVram(5 + i, 2);
|
||||||
}
|
}
|
||||||
@ -2258,7 +2258,7 @@ static void sub_80DAEA4(void)
|
|||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gUnknown_02039F26[i], 0);
|
FillWindowPixelBuffer(gUnknown_02039F26[i], PIXEL_BUFFER_TRANSPARENT);
|
||||||
sub_80DAF04(i);
|
sub_80DAF04(i);
|
||||||
sub_80DAF88(i);
|
sub_80DAF88(i);
|
||||||
}
|
}
|
||||||
@ -2478,7 +2478,7 @@ static void prints_contest_move_description(u16 a)
|
|||||||
ContestBG_FillBoxWithTile(0, 0x5036, 0x15, 0x20, 0x08, 0x01, 0x11);
|
ContestBG_FillBoxWithTile(0, 0x5036, 0x15, 0x20, 0x08, 0x01, 0x11);
|
||||||
ContestBG_FillBoxWithTile(0, 0x5014, 0x15, 0x20, numHearts, 0x01, 0x11);
|
ContestBG_FillBoxWithTile(0, 0x5014, 0x15, 0x20, numHearts, 0x01, 0x11);
|
||||||
|
|
||||||
FillWindowPixelBuffer(10, 0);
|
FillWindowPixelBuffer(10, PIXEL_BUFFER_TRANSPARENT);
|
||||||
Contest_PrintTextToBg0WindowStd(10, gContestEffectDescriptionPointers[gContestMoves[a].effect]);
|
Contest_PrintTextToBg0WindowStd(10, gContestEffectDescriptionPointers[gContestMoves[a].effect]);
|
||||||
Contest_PrintTextToBg0WindowStd(9, gText_Slash);
|
Contest_PrintTextToBg0WindowStd(9, gText_Slash);
|
||||||
}
|
}
|
||||||
@ -2621,7 +2621,7 @@ static void sub_80DB884(void)
|
|||||||
|
|
||||||
static void sub_80DB89C(void)
|
static void sub_80DB89C(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(4, 0);
|
FillWindowPixelBuffer(4, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(4, 2);
|
CopyWindowToVram(4, 2);
|
||||||
Contest_SetBgCopyFlags(0);
|
Contest_SetBgCopyFlags(0);
|
||||||
}
|
}
|
||||||
@ -3456,7 +3456,7 @@ static void sub_80DCD48(void)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
value = sContestantStatus[i].unk4;
|
value = sContestantStatus[i].unk4;
|
||||||
@ -5038,7 +5038,7 @@ static void sub_80DF750(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
|
|
||||||
if (gHeap[0x1A000] == 2)
|
if (gHeap[0x1A000] == 2)
|
||||||
{
|
{
|
||||||
|
@ -904,7 +904,7 @@ static void sub_80F6AE8(void)
|
|||||||
// windowTemplate.width = 30;
|
// windowTemplate.width = 30;
|
||||||
// windowTemplate.height = 2;
|
// windowTemplate.height = 2;
|
||||||
// windowId = AddWindow(&windowTemplate);
|
// windowId = AddWindow(&windowTemplate);
|
||||||
// FillWindowPixelBuffer(windowId, 0x11);
|
// FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
// origWidth = GetStringWidth(1, text, 0) + 9;
|
// origWidth = GetStringWidth(1, text, 0) + 9;
|
||||||
// strWidth = origWidth;
|
// strWidth = origWidth;
|
||||||
// if (strWidth < 0)
|
// if (strWidth < 0)
|
||||||
|
@ -279,7 +279,7 @@ static void InitContestPaintingWindow(void)
|
|||||||
SetBgTilemapBuffer(1, AllocZeroed(BG_SCREEN_SIZE));
|
SetBgTilemapBuffer(1, AllocZeroed(BG_SCREEN_SIZE));
|
||||||
gContestPaintingWindowId = AddWindow(&gUnknown_085B07EC);
|
gContestPaintingWindowId = AddWindow(&gUnknown_085B07EC);
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
FillWindowPixelBuffer(gContestPaintingWindowId, 0);
|
FillWindowPixelBuffer(gContestPaintingWindowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(gContestPaintingWindowId);
|
PutWindowTilemap(gContestPaintingWindowId);
|
||||||
CopyWindowToVram(gContestPaintingWindowId, 3);
|
CopyWindowToVram(gContestPaintingWindowId, 3);
|
||||||
ShowBg(1);
|
ShowBg(1);
|
||||||
|
@ -1592,7 +1592,7 @@ static void sub_8175DA0(u8 taskIdB)
|
|||||||
case 5:
|
case 5:
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(0, 2);
|
CopyWindowToVram(0, 2);
|
||||||
gTasks[taskIdB].data[TDB_0] = 2;
|
gTasks[taskIdB].data[TDB_0] = 2;
|
||||||
}
|
}
|
||||||
|
@ -1259,7 +1259,7 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
|
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
|
||||||
sub_819746C(gTasks[taskId].tWindowId, TRUE);
|
ClearWindowAndBorder(gTasks[taskId].tWindowId, TRUE);
|
||||||
RemoveWindow(gTasks[taskId].tWindowId);
|
RemoveWindow(gTasks[taskId].tWindowId);
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
EnableBothScriptContexts();
|
EnableBothScriptContexts();
|
||||||
@ -1268,7 +1268,7 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
|
|||||||
{
|
{
|
||||||
gSpecialVar_Result = 2;
|
gSpecialVar_Result = 2;
|
||||||
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
|
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
|
||||||
sub_819746C(gTasks[taskId].tWindowId, TRUE);
|
ClearWindowAndBorder(gTasks[taskId].tWindowId, TRUE);
|
||||||
RemoveWindow(gTasks[taskId].tWindowId);
|
RemoveWindow(gTasks[taskId].tWindowId);
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
EnableBothScriptContexts();
|
EnableBothScriptContexts();
|
||||||
|
@ -543,7 +543,7 @@ void sub_8126B80(u8 taskId)
|
|||||||
|
|
||||||
void sub_8126C08(void)
|
void sub_8126C08(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ void SecretBasePC_PutAway(u8 taskId)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
sub_8126A58(0);
|
sub_8126A58(0);
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
FadeScreen(1, 0);
|
FadeScreen(1, 0);
|
||||||
gTasks[taskId].data[2] = 0;
|
gTasks[taskId].data[2] = 0;
|
||||||
gTasks[taskId].func = sub_8129ABC;
|
gTasks[taskId].func = sub_8129ABC;
|
||||||
@ -617,7 +617,7 @@ void sub_8126DA4(u8 taskId)
|
|||||||
void SecretBasePC_PrepMenuForSelectingStoredDecors(u8 taskId)
|
void SecretBasePC_PrepMenuForSelectingStoredDecors(u8 taskId)
|
||||||
{
|
{
|
||||||
LoadPalette(gUnknown_085A6BB0, 0xd0, 0x20);
|
LoadPalette(gUnknown_085A6BB0, 0xd0, 0x20);
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
sub_8126A58(0);
|
sub_8126A58(0);
|
||||||
sub_8126DFC(taskId);
|
sub_8126DFC(taskId);
|
||||||
}
|
}
|
||||||
@ -634,7 +634,7 @@ void sub_8126DFC(u8 taskId)
|
|||||||
|
|
||||||
void sub_8126E44(u8 taskId)
|
void sub_8126E44(u8 taskId)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(sDecorMenuWindowIndices[1], 0x11);
|
FillWindowPixelBuffer(sDecorMenuWindowIndices[1], PIXEL_BUFFER_WHITE);
|
||||||
sub_8126E8C(taskId);
|
sub_8126E8C(taskId);
|
||||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDecorMenuWindowIndices[1], 9, sCurDecorationCategory);
|
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDecorMenuWindowIndices[1], 9, sCurDecorationCategory);
|
||||||
gTasks[taskId].func = sub_8127088;
|
gTasks[taskId].func = sub_8127088;
|
||||||
@ -751,7 +751,7 @@ void sub_81270E8(u8 taskId)
|
|||||||
|
|
||||||
void sub_8127180(u8 taskId)
|
void sub_8127180(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
sub_8126DFC(taskId);
|
sub_8126DFC(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,7 +779,7 @@ void sub_81271CC(u8 taskId)
|
|||||||
void sub_8127208(u8 taskId)
|
void sub_8127208(u8 taskId)
|
||||||
{
|
{
|
||||||
LoadPalette(gUnknown_085A6BB0, 0xd0, 0x20);
|
LoadPalette(gUnknown_085A6BB0, 0xd0, 0x20);
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
gTasks[taskId].data[11] = 2;
|
gTasks[taskId].data[11] = 2;
|
||||||
sCurDecorationCategory = DECORCAT_DESK;
|
sCurDecorationCategory = DECORCAT_DESK;
|
||||||
sub_8126DFC(taskId);
|
sub_8126DFC(taskId);
|
||||||
@ -968,7 +968,7 @@ void sub_8127744(u32 a0)
|
|||||||
const u8 *txt;
|
const u8 *txt;
|
||||||
|
|
||||||
winidx = sDecorMenuWindowIndices[3];
|
winidx = sDecorMenuWindowIndices[3];
|
||||||
FillWindowPixelBuffer(winidx, 0x11);
|
FillWindowPixelBuffer(winidx, PIXEL_BUFFER_WHITE);
|
||||||
if (a0 >= sCurDecorCatCount)
|
if (a0 >= sCurDecorCatCount)
|
||||||
{
|
{
|
||||||
txt = gText_GoBackPrevMenu;
|
txt = gText_GoBackPrevMenu;
|
||||||
@ -1095,7 +1095,7 @@ void sub_8127A14(u8 taskId)
|
|||||||
|
|
||||||
void sub_8127A30(u8 taskId)
|
void sub_8127A30(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
gTasks[taskId].func = sub_8127A14;
|
gTasks[taskId].func = sub_8127A14;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1103,7 +1103,7 @@ void sub_8127A5C(u8 taskId)
|
|||||||
{
|
{
|
||||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
sub_81269D4(1);
|
sub_81269D4(1);
|
||||||
sub_8127620(taskId);
|
sub_8127620(taskId);
|
||||||
}
|
}
|
||||||
@ -1634,7 +1634,7 @@ void sub_81289D0(u8 taskId)
|
|||||||
|
|
||||||
void sub_81289F0(u8 taskId)
|
void sub_81289F0(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
sub_8128AAC(taskId);
|
sub_8128AAC(taskId);
|
||||||
if (gDecorations[gCurDecorInventoryItems[gCurDecorationIndex]].permission != DECORPERM_SOLID_MAT)
|
if (gDecorations[gCurDecorInventoryItems[gCurDecorationIndex]].permission != DECORPERM_SOLID_MAT)
|
||||||
{
|
{
|
||||||
@ -1699,7 +1699,7 @@ void sub_8128B80(u8 taskId)
|
|||||||
|
|
||||||
void sub_8128BA0(u8 taskId)
|
void sub_8128BA0(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
sub_8128BBC(taskId);
|
sub_8128BBC(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1887,7 +1887,7 @@ void sub_8128E18(u8 taskId)
|
|||||||
|
|
||||||
void sub_8128FD8(u8 taskId)
|
void sub_8128FD8(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 1);
|
ClearWindowAndWideBorder(0, 1);
|
||||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
|
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
|
||||||
gTasks[taskId].data[10] = 0;
|
gTasks[taskId].data[10] = 0;
|
||||||
gTasks[taskId].func = sub_8128E18;
|
gTasks[taskId].func = sub_8128E18;
|
||||||
@ -2251,7 +2251,7 @@ void sub_81298EC(u8 taskId)
|
|||||||
if (!gPaletteFade.active) {
|
if (!gPaletteFade.active) {
|
||||||
DrawWholeMapView();
|
DrawWholeMapView();
|
||||||
ScriptContext1_SetupScript(EventScript_275D2E);
|
ScriptContext1_SetupScript(EventScript_275D2E);
|
||||||
sub_8197434(0, 1);
|
ClearWindowAndWideBorder(0, 1);
|
||||||
gTasks[taskId].data[2] = 2;
|
gTasks[taskId].data[2] = 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2343,7 +2343,7 @@ void sub_8129ABC(u8 taskId)
|
|||||||
|
|
||||||
void sub_8129B34(u8 taskId)
|
void sub_8129B34(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 1);
|
ClearWindowAndWideBorder(0, 1);
|
||||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
|
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
|
||||||
gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE;
|
gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE;
|
||||||
gSprites[sDecor_CameraSpriteObjectIdx1].callback = sub_812A36C;
|
gSprites[sDecor_CameraSpriteObjectIdx1].callback = sub_812A36C;
|
||||||
@ -2607,7 +2607,7 @@ void sub_812A1F0(u8 taskId)
|
|||||||
|
|
||||||
void sub_812A210(u8 taskId)
|
void sub_812A210(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
sub_812A22C(taskId);
|
sub_812A22C(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ static void InitDiplomaWindow(void)
|
|||||||
InitWindows(sDiplomaWinTemplates);
|
InitWindows(sDiplomaWinTemplates);
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ static void CB2_EggHatch_1(void)
|
|||||||
case 1:
|
case 1:
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(sEggHatchData->windowId, 0);
|
FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
sEggHatchData->CB2_PalCounter = 0;
|
sEggHatchData->CB2_PalCounter = 0;
|
||||||
sEggHatchData->CB2_state++;
|
sEggHatchData->CB2_state++;
|
||||||
}
|
}
|
||||||
@ -857,7 +857,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8
|
|||||||
|
|
||||||
static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
|
static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(windowId, 0xFF);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_UNKNOWN);
|
||||||
sEggHatchData->textColor[0] = 0;
|
sEggHatchData->textColor[0] = 0;
|
||||||
sEggHatchData->textColor[1] = 5;
|
sEggHatchData->textColor[1] = 5;
|
||||||
sEggHatchData->textColor[2] = 6;
|
sEggHatchData->textColor[2] = 6;
|
||||||
|
@ -127,7 +127,7 @@ static void textbox_auto_and_task_add(void)
|
|||||||
void HideFieldMessageBox(void)
|
void HideFieldMessageBox(void)
|
||||||
{
|
{
|
||||||
task_del_textbox();
|
task_del_textbox();
|
||||||
sub_8197434(0, 1);
|
ClearWindowAndWideBorder(0, 1);
|
||||||
sFieldMessageBoxMode = 0;
|
sFieldMessageBoxMode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1918,7 +1918,7 @@ static bool8 Fishing9(struct Task *task)
|
|||||||
static bool8 Fishing10(struct Task *task)
|
static bool8 Fishing10(struct Task *task)
|
||||||
{
|
{
|
||||||
AlignFishingAnimationFrames();
|
AlignFishingAnimationFrames();
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3);
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
task->tFrameCounter = 0;
|
task->tFrameCounter = 0;
|
||||||
@ -1944,7 +1944,7 @@ static bool8 Fishing11(struct Task *task)
|
|||||||
sub_8155604(gEventObjects[gPlayerAvatar.eventObjectId].fieldEffectSpriteId, 0, 0);
|
sub_8155604(gEventObjects[gPlayerAvatar.eventObjectId].fieldEffectSpriteId, 0, 0);
|
||||||
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
|
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
|
||||||
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
|
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
task->tFrameCounter++;
|
task->tFrameCounter++;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -1966,7 +1966,7 @@ static bool8 Fishing12(struct Task *task)
|
|||||||
{
|
{
|
||||||
AlignFishingAnimationFrames();
|
AlignFishingAnimationFrames();
|
||||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3);
|
||||||
task->tStep = FISHING_SHOW_RESULT;
|
task->tStep = FISHING_SHOW_RESULT;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1977,7 +1977,7 @@ static bool8 Fishing13(struct Task *task)
|
|||||||
{
|
{
|
||||||
AlignFishingAnimationFrames();
|
AlignFishingAnimationFrames();
|
||||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -2017,7 +2017,7 @@ static bool8 Fishing16(struct Task *task)
|
|||||||
gPlayerAvatar.preventStep = FALSE;
|
gPlayerAvatar.preventStep = FALSE;
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
UnfreezeEventObjects();
|
UnfreezeEventObjects();
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
sub_80ED950(0);
|
sub_80ED950(0);
|
||||||
DestroyTask(FindTaskIdByFunc(Task_Fishing));
|
DestroyTask(FindTaskIdByFunc(Task_Fishing));
|
||||||
}
|
}
|
||||||
|
@ -196,13 +196,13 @@ static void PrintRegionMapSecName(void)
|
|||||||
{
|
{
|
||||||
if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE)
|
if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2645,7 +2645,7 @@ static void sub_813A570(u8 taskId)
|
|||||||
DestroyListMenuTask(task->data[14], NULL, NULL);
|
DestroyListMenuTask(task->data[14], NULL, NULL);
|
||||||
Free(gUnknown_0203AB64);
|
Free(gUnknown_0203AB64);
|
||||||
sub_8198070(task->data[13], 1);
|
sub_8198070(task->data[13], 1);
|
||||||
FillWindowPixelBuffer(task->data[13], 0);
|
FillWindowPixelBuffer(task->data[13], PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(task->data[13], 2);
|
CopyWindowToVram(task->data[13], 2);
|
||||||
RemoveWindow(task->data[13]);
|
RemoveWindow(task->data[13]);
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
@ -3226,7 +3226,7 @@ void sub_813AF48(void)
|
|||||||
DestroyListMenuTask(task->data[14], NULL, NULL);
|
DestroyListMenuTask(task->data[14], NULL, NULL);
|
||||||
Free(gUnknown_0203AB64);
|
Free(gUnknown_0203AB64);
|
||||||
sub_8198070(task->data[13], TRUE);
|
sub_8198070(task->data[13], TRUE);
|
||||||
FillWindowPixelBuffer(task->data[13], 0);
|
FillWindowPixelBuffer(task->data[13], PIXEL_BUFFER_TRANSPARENT);
|
||||||
ClearWindowTilemap(task->data[13]);
|
ClearWindowTilemap(task->data[13]);
|
||||||
CopyWindowToVram(task->data[13], 2);
|
CopyWindowToVram(task->data[13], 2);
|
||||||
RemoveWindow(task->data[13]);
|
RemoveWindow(task->data[13]);
|
||||||
|
@ -1090,7 +1090,7 @@ static void ShowAndPrintWindows(void)
|
|||||||
for (i = 0; i < WINDOW_COUNT; i++)
|
for (i = 0; i < WINDOW_COUNT; i++)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(i);
|
PutWindowTilemap(i);
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
x = GetStringCenterAlignXOffset(1, gText_SymbolsEarned, 96);
|
x = GetStringCenterAlignXOffset(1, gText_SymbolsEarned, 96);
|
||||||
@ -1116,7 +1116,7 @@ static void ShowAndPrintWindows(void)
|
|||||||
|
|
||||||
static void PrintAreaDescription(u8 cursorArea)
|
static void PrintAreaDescription(u8 cursorArea)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(WINDOW_DESCRIPTION, 0);
|
FillWindowPixelBuffer(WINDOW_DESCRIPTION, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (cursorArea == CURSOR_AREA_RECORD && !sPassData->hasBattleRecord)
|
if (cursorArea == CURSOR_AREA_RECORD && !sPassData->hasBattleRecord)
|
||||||
AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[0]);
|
AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[0]);
|
||||||
else if (cursorArea != CURSOR_AREA_NOTHING)
|
else if (cursorArea != CURSOR_AREA_NOTHING)
|
||||||
@ -1656,7 +1656,7 @@ static void PrintOnFrontierMap(void)
|
|||||||
for (i = 0; i < MAP_WINDOW_COUNT; i++)
|
for (i = 0; i < MAP_WINDOW_COUNT; i++)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(i);
|
PutWindowTilemap(i);
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < NUM_FRONTIER_FACILITIES; i++)
|
for (i = 0; i < NUM_FRONTIER_FACILITIES; i++)
|
||||||
@ -1698,7 +1698,7 @@ static void HandleFrontierMapCursorMove(u8 direction)
|
|||||||
StartSpriteAnim(sMapData->mapIndicatorSprite, sMapLandmarks[sMapData->cursorPos].animNum);
|
StartSpriteAnim(sMapData->mapIndicatorSprite, sMapLandmarks[sMapData->cursorPos].animNum);
|
||||||
sMapData->mapIndicatorSprite->pos1.x = sMapLandmarks[sMapData->cursorPos].x;
|
sMapData->mapIndicatorSprite->pos1.x = sMapLandmarks[sMapData->cursorPos].x;
|
||||||
sMapData->mapIndicatorSprite->pos1.y = sMapLandmarks[sMapData->cursorPos].y;
|
sMapData->mapIndicatorSprite->pos1.y = sMapLandmarks[sMapData->cursorPos].y;
|
||||||
FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, 0);
|
FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, PIXEL_BUFFER_TRANSPARENT);
|
||||||
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
|
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
|
@ -1045,7 +1045,7 @@ static void ShowTowerResultsWindow(u8 battleMode)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
if (battleMode == FRONTIER_MODE_SINGLES)
|
if (battleMode == FRONTIER_MODE_SINGLES)
|
||||||
StringExpandPlaceholders(gStringVar4, gText_SingleBattleRoomResults);
|
StringExpandPlaceholders(gStringVar4, gText_SingleBattleRoomResults);
|
||||||
else if (battleMode == FRONTIER_MODE_DOUBLES)
|
else if (battleMode == FRONTIER_MODE_DOUBLES)
|
||||||
@ -1116,7 +1116,7 @@ static void ShowDomeResultsWindow(u8 battleMode)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
if (battleMode == FRONTIER_MODE_SINGLES)
|
if (battleMode == FRONTIER_MODE_SINGLES)
|
||||||
StringExpandPlaceholders(gStringVar4, gText_SingleBattleTourneyResults);
|
StringExpandPlaceholders(gStringVar4, gText_SingleBattleTourneyResults);
|
||||||
else
|
else
|
||||||
@ -1192,7 +1192,7 @@ static void ShowPalaceResultsWindow(u8 battleMode)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
if (battleMode == FRONTIER_MODE_SINGLES)
|
if (battleMode == FRONTIER_MODE_SINGLES)
|
||||||
StringExpandPlaceholders(gStringVar4, gText_SingleBattleHallResults);
|
StringExpandPlaceholders(gStringVar4, gText_SingleBattleHallResults);
|
||||||
else
|
else
|
||||||
@ -1248,7 +1248,7 @@ static void ShowPikeResultsWindow(void)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults);
|
StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults);
|
||||||
PrintAligned(gStringVar4, 0);
|
PrintAligned(gStringVar4, 0);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
||||||
@ -1310,7 +1310,7 @@ static void ShowArenaResultsWindow(void)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults);
|
StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults);
|
||||||
PrintAligned(gStringVar4, 2);
|
PrintAligned(gStringVar4, 2);
|
||||||
@ -1396,7 +1396,7 @@ static void ShowFactoryResultsWindow(u8 battleMode)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
if (battleMode == FRONTIER_MODE_SINGLES)
|
if (battleMode == FRONTIER_MODE_SINGLES)
|
||||||
StringExpandPlaceholders(gStringVar4, gText_BattleSwapSingleResults);
|
StringExpandPlaceholders(gStringVar4, gText_BattleSwapSingleResults);
|
||||||
else
|
else
|
||||||
@ -1461,7 +1461,7 @@ static void ShowPyramidResultsWindow(void)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults);
|
StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults);
|
||||||
PrintAligned(gStringVar4, 2);
|
PrintAligned(gStringVar4, 2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL);
|
||||||
@ -1484,7 +1484,7 @@ static void ShowLinkContestResultsWindow(void)
|
|||||||
|
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C7C);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C7C);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
|
|
||||||
StringExpandPlaceholders(gStringVar4, gText_LinkContestResults);
|
StringExpandPlaceholders(gStringVar4, gText_LinkContestResults);
|
||||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
||||||
@ -2354,7 +2354,7 @@ void ShowRankingHallRecordsWindow(void)
|
|||||||
{
|
{
|
||||||
gRecordsWindowId = AddWindow(&gUnknown_08611C84);
|
gRecordsWindowId = AddWindow(&gUnknown_08611C84);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_50);
|
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_50);
|
||||||
PutWindowTilemap(gRecordsWindowId);
|
PutWindowTilemap(gRecordsWindowId);
|
||||||
CopyWindowToVram(gRecordsWindowId, 3);
|
CopyWindowToVram(gRecordsWindowId, 3);
|
||||||
@ -2362,7 +2362,7 @@ void ShowRankingHallRecordsWindow(void)
|
|||||||
|
|
||||||
void ScrollRankingHallRecordsWindow(void)
|
void ScrollRankingHallRecordsWindow(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
|
||||||
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_OPEN);
|
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_OPEN);
|
||||||
CopyWindowToVram(gRecordsWindowId, 2);
|
CopyWindowToVram(gRecordsWindowId, 2);
|
||||||
}
|
}
|
||||||
|
@ -570,7 +570,7 @@ static void Task_Hof_DisplayMon(u8 taskId)
|
|||||||
gSprites[spriteId].tSpecies = currMon->species;
|
gSprites[spriteId].tSpecies = currMon->species;
|
||||||
gSprites[spriteId].callback = SpriteCB_GetOnScreenAndAnimate;
|
gSprites[spriteId].callback = SpriteCB_GetOnScreenAndAnimate;
|
||||||
gTasks[taskId].tMonSpriteId(currMonId) = spriteId;
|
gTasks[taskId].tMonSpriteId(currMonId) = spriteId;
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
gTasks[taskId].func = Task_Hof_PrintMonInfoAfterAnimating;
|
gTasks[taskId].func = Task_Hof_PrintMonInfoAfterAnimating;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,7 +649,7 @@ static void sub_8173DC0(u8 taskId)
|
|||||||
gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1;
|
gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1;
|
||||||
}
|
}
|
||||||
BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24));
|
BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24));
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
gTasks[taskId].tFrameCount = 7;
|
gTasks[taskId].tFrameCount = 7;
|
||||||
gTasks[taskId].func = sub_8173EA4;
|
gTasks[taskId].func = sub_8173EA4;
|
||||||
@ -1086,7 +1086,7 @@ static void Task_HofPC_ExitOnButtonPress(u8 taskId)
|
|||||||
|
|
||||||
static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2)
|
static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sUnknown_085E5388, 0, gText_WelcomeToHOF);
|
AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sUnknown_085E5388, 0, gText_WelcomeToHOF);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
@ -1099,7 +1099,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
|||||||
s32 dexNumber;
|
s32 dexNumber;
|
||||||
s32 width;
|
s32 width;
|
||||||
|
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
|
|
||||||
// dex number
|
// dex number
|
||||||
@ -1180,7 +1180,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
|
|||||||
u32 width;
|
u32 width;
|
||||||
u16 trainerId;
|
u16 trainerId;
|
||||||
|
|
||||||
FillWindowPixelBuffer(1, 0x11);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
SetWindowBorderStyle(1, FALSE, 0x21D, 0xD);
|
SetWindowBorderStyle(1, FALSE, 0x21D, 0xD);
|
||||||
AddTextPrinterParameterized3(1, 1, 0, 1, sUnknown_085E538C, -1, gText_Name);
|
AddTextPrinterParameterized3(1, 1, 0, 1, sUnknown_085E538C, -1, gText_Name);
|
||||||
|
@ -884,7 +884,7 @@ void bag_menu_print_description_box_text(int a)
|
|||||||
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
|
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
|
||||||
str = gStringVar4;
|
str = gStringVar4;
|
||||||
}
|
}
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
bag_menu_print(1, 1, str, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, str, 3, 1, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1028,7 +1028,7 @@ void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u
|
|||||||
s16* data = gTasks[taskId].data;
|
s16* data = gTasks[taskId].data;
|
||||||
|
|
||||||
data[10] = AddItemMessageWindow(4);
|
data[10] = AddItemMessageWindow(4);
|
||||||
FillWindowPixelBuffer(data[10], 17);
|
FillWindowPixelBuffer(data[10], PIXEL_BUFFER_WHITE);
|
||||||
DisplayMessageAndContinueTask(taskId, data[10], 10, 13, fontId, GetPlayerTextSpeedDelay(), str, callback);
|
DisplayMessageAndContinueTask(taskId, data[10], 10, 13, fontId, GetPlayerTextSpeedDelay(), str, callback);
|
||||||
schedule_bg_copy_tilemap_to_vram(1);
|
schedule_bg_copy_tilemap_to_vram(1);
|
||||||
}
|
}
|
||||||
@ -1293,7 +1293,7 @@ void bag_menu_swap_items(u8 taskId)
|
|||||||
gUnknown_0203CE54->unk81A = data[1];
|
gUnknown_0203CE54->unk81A = data[1];
|
||||||
CopyItemName(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, data[1]), gStringVar1);
|
CopyItemName(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, data[1]), gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
|
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||||
sub_80D4FEC(data[1]);
|
sub_80D4FEC(data[1]);
|
||||||
sub_81AB89C();
|
sub_81AB89C();
|
||||||
@ -1505,7 +1505,7 @@ void sub_81AC644(u8 unused)
|
|||||||
{
|
{
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
|
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
if (gUnknown_0203CE54->unk828 == 1)
|
if (gUnknown_0203CE54->unk828 == 1)
|
||||||
@ -1646,7 +1646,7 @@ void ItemMenu_UseOutOfBattle(u8 taskId)
|
|||||||
bag_menu_print_there_is_no_pokemon(taskId);
|
bag_menu_print_there_is_no_pokemon(taskId);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
if (gUnknown_0203CE58.pocket != BERRIES_POCKET)
|
if (gUnknown_0203CE58.pocket != BERRIES_POCKET)
|
||||||
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
|
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
|
||||||
@ -1670,7 +1670,7 @@ void ItemMenu_Toss(u8 taskId)
|
|||||||
{
|
{
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
|
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||||
sub_81ABC3C(7);
|
sub_81ABC3C(7);
|
||||||
gTasks[taskId].func = Task_ChooseHowManyToToss;
|
gTasks[taskId].func = Task_ChooseHowManyToToss;
|
||||||
@ -1684,7 +1684,7 @@ void BagMenuConfirmToss(u8 taskId)
|
|||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3);
|
ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
|
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||||
bag_menu_yes_no(taskId, 5, &gUnknown_08614084);
|
bag_menu_yes_no(taskId, 5, &gUnknown_08614084);
|
||||||
}
|
}
|
||||||
@ -1727,7 +1727,7 @@ void BagMenuActuallyToss(u8 taskId)
|
|||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3);
|
ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
|
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||||
gTasks[taskId].func = Task_ActuallyToss;
|
gTasks[taskId].func = Task_ActuallyToss;
|
||||||
}
|
}
|
||||||
@ -2043,7 +2043,7 @@ void display_deposit_item_ask_str(u8 taskId)
|
|||||||
{
|
{
|
||||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1);
|
StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||||
sub_81ABC3C(7);
|
sub_81ABC3C(7);
|
||||||
gTasks[taskId].func = sub_81ADA7C;
|
gTasks[taskId].func = sub_81ADA7C;
|
||||||
@ -2078,7 +2078,7 @@ void sub_81ADB14(u8 taskId)
|
|||||||
{
|
{
|
||||||
s16* data = gTasks[taskId].data;
|
s16* data = gTasks[taskId].data;
|
||||||
|
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (ItemId_GetImportance(gSpecialVar_ItemId))
|
if (ItemId_GetImportance(gSpecialVar_ItemId))
|
||||||
{
|
{
|
||||||
bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0);
|
bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0);
|
||||||
@ -2244,7 +2244,7 @@ void bag_menu_print_pocket_names(const u8 *pocketName1, const u8 *pocketName2)
|
|||||||
window.width = 16;
|
window.width = 16;
|
||||||
window.height = 2;
|
window.height = 2;
|
||||||
windowId = AddWindow(&window);
|
windowId = AddWindow(&window);
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
offset = GetStringCenterAlignXOffset(1, pocketName1, 0x40);
|
offset = GetStringCenterAlignXOffset(1, pocketName1, 0x40);
|
||||||
bag_menu_print(windowId, 1, pocketName1, offset, 1, 0, 0, -1, 1);
|
bag_menu_print(windowId, 1, pocketName1, offset, 1, 0, 0, -1, 1);
|
||||||
if (pocketName2)
|
if (pocketName2)
|
||||||
@ -2283,7 +2283,7 @@ void setup_bag_menu_textboxes(void)
|
|||||||
LoadPalette(&gUnknown_0860F074, 0xF0, 0x20);
|
LoadPalette(&gUnknown_0860F074, 0xF0, 0x20);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(i);
|
PutWindowTilemap(i);
|
||||||
}
|
}
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
@ -2366,7 +2366,7 @@ void bag_menu_remove_money_window(void)
|
|||||||
|
|
||||||
void bag_menu_prepare_tmhm_move_window(void)
|
void bag_menu_prepare_tmhm_move_window(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(3, 0);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
|
||||||
blit_move_info_icon(3, 19, 0, 0);
|
blit_move_info_icon(3, 19, 0, 0);
|
||||||
blit_move_info_icon(3, 20, 0, 12);
|
blit_move_info_icon(3, 20, 0, 12);
|
||||||
blit_move_info_icon(3, 21, 0, 24);
|
blit_move_info_icon(3, 21, 0, 24);
|
||||||
@ -2380,7 +2380,7 @@ void PrintTMHMMoveData(u16 itemId)
|
|||||||
u16 moveId;
|
u16 moveId;
|
||||||
const u8* text;
|
const u8* text;
|
||||||
|
|
||||||
FillWindowPixelBuffer(4, 0);
|
FillWindowPixelBuffer(4, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (itemId == ITEM_NONE)
|
if (itemId == ITEM_NONE)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
@ -188,7 +188,7 @@ void DisplayCannotDismountBikeMessage(u8 taskId, bool8 isUsingRegisteredKeyItemO
|
|||||||
|
|
||||||
void CleanUpAfterFailingToUseRegisteredKeyItemOnField(u8 taskId)
|
void CleanUpAfterFailingToUseRegisteredKeyItemOnField(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 1);
|
ClearWindowAndWideBorder(0, 1);
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
ScriptUnfreezeEventObjects();
|
ScriptUnfreezeEventObjects();
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
@ -350,7 +350,7 @@ void sub_80FD504(u8 taskId)
|
|||||||
|
|
||||||
void sub_80FD5CC(u8 taskId)
|
void sub_80FD5CC(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 1);
|
ClearWindowAndWideBorder(0, 1);
|
||||||
ScriptUnfreezeEventObjects();
|
ScriptUnfreezeEventObjects();
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
|
@ -498,7 +498,7 @@ static void LearnMoveMain(void)
|
|||||||
case 27:
|
case 27:
|
||||||
if (!sub_81D2C3C())
|
if (!sub_81D2C3C())
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(3, 0x11);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_WHITE);
|
||||||
if (sLearnMoveStruct2.showContestInfo == FALSE)
|
if (sLearnMoveStruct2.showContestInfo == FALSE)
|
||||||
{
|
{
|
||||||
sLearnMoveStruct->state = 3;
|
sLearnMoveStruct->state = 3;
|
||||||
@ -631,7 +631,7 @@ static void HideSpritesAndPrintTeachText(bool8 a)
|
|||||||
if (!a)
|
if (!a)
|
||||||
{
|
{
|
||||||
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
||||||
FillWindowPixelBuffer(3, 0x11);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -695,7 +695,7 @@ static void ShowTeachMoveText(bool8 showContest)
|
|||||||
if (showContest == FALSE)
|
if (showContest == FALSE)
|
||||||
{
|
{
|
||||||
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
||||||
FillWindowPixelBuffer(3, 0x11);
|
FillWindowPixelBuffer(3, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,11 +355,11 @@ s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenu
|
|||||||
switch (arg2)
|
switch (arg2)
|
||||||
{
|
{
|
||||||
case 0: // can never be reached, because of the if statement above
|
case 0: // can never be reached, because of the if statement above
|
||||||
sub_819746C(sMysteryGiftLinkMenu.windowId, FALSE);
|
ClearWindowAndBorder(sMysteryGiftLinkMenu.windowId, FALSE);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
case 1:
|
case 1:
|
||||||
sub_819746C(sMysteryGiftLinkMenu.windowId, FALSE);
|
ClearWindowAndBorder(sMysteryGiftLinkMenu.windowId, FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,8 +477,8 @@ static void sub_8121B1C(void)
|
|||||||
y = 0;
|
y = 0;
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
for (i = 0; i < sMailRead->layout->numSubStructs; i ++)
|
for (i = 0; i < sMailRead->layout->numSubStructs; i ++)
|
||||||
{
|
{
|
||||||
if (sMailRead->strbuf[i][0] == EOS || sMailRead->strbuf[i][0] == CHAR_SPACE)
|
if (sMailRead->strbuf[i][0] == EOS || sMailRead->strbuf[i][0] == CHAR_SPACE)
|
||||||
|
189
src/main_menu.c
189
src/main_menu.c
@ -39,6 +39,135 @@
|
|||||||
#include "title_screen.h"
|
#include "title_screen.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main menu state machine
|
||||||
|
* -----------------------
|
||||||
|
*
|
||||||
|
* Entry point: CB2_InitMainMenu
|
||||||
|
*
|
||||||
|
* Note: States advance sequentially unless otherwise stated.
|
||||||
|
*
|
||||||
|
* CB2_InitMainMenu / CB2_ReinitMainMenu
|
||||||
|
* - Both of these states call InitMainMenu, which does all the work.
|
||||||
|
* - In the Reinit case, the init code will check if the user came from
|
||||||
|
* the options screen. If they did, then the options menu item is
|
||||||
|
* pre-selected.
|
||||||
|
*
|
||||||
|
* Task_MainMenuCheckSaveFile
|
||||||
|
* - Determines how many menu options to show based on whether
|
||||||
|
* the save file is Ok, empty, corrupted, etc.
|
||||||
|
* - If there was an error loading the save file, advance to
|
||||||
|
* Task_WaitForSaveFileErrorWindow.
|
||||||
|
* - If there were no errors, advance to Task_MainMenuCheckBattery.
|
||||||
|
* - Note that the check to enable Mystery Events would normally happen
|
||||||
|
* here, but this version of Emerald has them disabled.
|
||||||
|
*
|
||||||
|
* Task_WaitForSaveFileErrorWindow
|
||||||
|
* - Wait for the text to finish printing and then for the A button
|
||||||
|
* to be pressed.
|
||||||
|
*
|
||||||
|
* Task_MainMenuCheckBattery
|
||||||
|
* - If the battery is OK, advance to Task_DisplayMainMenu.
|
||||||
|
* - If the battery is dry, advance to Task_WaitForBatteryDryErrorWindow.
|
||||||
|
*
|
||||||
|
* Task_WaitForBatteryDryErrorWindow
|
||||||
|
* - Wait for the text to finish printing and then for the A button
|
||||||
|
* to be pressed.
|
||||||
|
*
|
||||||
|
* Task_DisplayMainWindow
|
||||||
|
* - Display the buttons to the user. If the menu is in HAS_MYSTERY_EVENTS
|
||||||
|
* mode, there are too many buttons for one screen and a scrollbar is added,
|
||||||
|
* and the scrollbar task is spawned (Task_ScrollIndicatorArrowPairOnMainMenu).
|
||||||
|
*
|
||||||
|
* Task_HighlightSelectedMainMenuItem
|
||||||
|
* - Update the UI to match the currently selected item.
|
||||||
|
*
|
||||||
|
* Task_HandleMainMenuInput
|
||||||
|
* - If A is pressed, advance to Task_HandleMainMenuAPressed.
|
||||||
|
* - If B is pressed, return to the title screen via CB2_InitTitleScreen.
|
||||||
|
* - If Up or Down is pressed, handle scrolling if there is a scroll bar, change
|
||||||
|
* the selection, then go back to Task_HighlightSelectedMainMenuItem.
|
||||||
|
*
|
||||||
|
* Task_HandleMainMenuAPressed
|
||||||
|
* - If the user selected New Game, advance to Task_NewGameBirchSpeech_Init.
|
||||||
|
* - If the user selected Continue, advance to CB2_ContinueSavedGame.
|
||||||
|
* - If the user selected the Options menu, advance to CB2_InitOptionMenu.
|
||||||
|
* - If the user selected Mystery Gift, advance to CB2_MysteryGift. However,
|
||||||
|
* if the wireless adapter was removed, instead advance to
|
||||||
|
* Task_DisplayMainMenuInvalidActionError.
|
||||||
|
* - Code to start a Mystery Event is present here, but is unreachable in this
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
* Task_HandleMainMenuBPressed
|
||||||
|
* - Clean up the main menu and go back to CB2_InitTitleScreen.
|
||||||
|
*
|
||||||
|
* Task_DisplayMainMenuInvalidActionError
|
||||||
|
* - Print one of three different error messages, wait for the text to stop
|
||||||
|
* printing, and then wait for A or B to be pressed.
|
||||||
|
* - Then advance to Task_HandleMainMenuBPressed.
|
||||||
|
*
|
||||||
|
* Task_NewGameBirchSpeechInit
|
||||||
|
* - Load the sprites for the intro speech, start playing music
|
||||||
|
* Task_NewGameBirchSpeech_WaitToShowBirch
|
||||||
|
* - Spawn Task_NewGameBirchSpeech_FadeInTarget1OutTarget2
|
||||||
|
* - Spawn Task_NewGameBirchSpeech_FadePlatformOut
|
||||||
|
* - Both of these tasks destroy themselves when done.
|
||||||
|
* Task_NewGameBirchSpeech_WaitForSpriteFadeInWelcome
|
||||||
|
* Task_NewGameBirchSpeech_ThisIsAPokemon
|
||||||
|
* - When the text is done printing, spawns Task_NewGameBirchSpeechSub_InitPokeball
|
||||||
|
* Task_NewGameBirchSpeech_MainSpeech
|
||||||
|
* Task_NewGameBirchSpeech_AndYouAre
|
||||||
|
* Task_NewGameBirchSpeech_StartBirchLotadPlatformFade
|
||||||
|
* Task_NewGameBirchSpeech_StartBirchLotadPlatformFade
|
||||||
|
* Task_NewGameBirchSpeech_SlidePlatformAway
|
||||||
|
* Task_NewGameBirchSpeech_StartPlayerFadeIn
|
||||||
|
* Task_NewGameBirchSpeech_WaitForPlayerFadeIn
|
||||||
|
* Task_NewGameBirchSpeech_BoyOrGirl
|
||||||
|
* Task_NewGameBirchSpeech_WaitToShowGenderMenu
|
||||||
|
* Task_NewGameBirchSpeech_ChooseGender
|
||||||
|
* - Animates by advancing to Task_NewGameBirchSpeech_SlideOutOldGenderSprite
|
||||||
|
* whenever the player's selection changes.
|
||||||
|
* - Advances to Task_NewGameBirchSpeech_WhatsYourName when done.
|
||||||
|
*
|
||||||
|
* Task_NewGameBirchSpeech_SlideOutOldGenderSprite
|
||||||
|
* Task_NewGameBirchSpeech_SlideInNewGenderSprite
|
||||||
|
* - Returns back to Task_NewGameBirchSpeech_ChooseGender.
|
||||||
|
*
|
||||||
|
* Task_NewGameBirchSpeech_WhatsYourName
|
||||||
|
* Task_NewGameBirchSpeech_WaitForWhatsYourNameToPrint
|
||||||
|
* Task_NewGameBirchSpeech_WaitPressBeforeNameChoice
|
||||||
|
* Task_NewGameBirchSpeech_StartNamingScreen
|
||||||
|
* C2_NamingScreen
|
||||||
|
* - Returns to CB2_NewGameBirchSpeech_ReturnFromNamingScreen when done
|
||||||
|
* CB2_NewGameBirchSpeech_ReturnFromNamingScreen
|
||||||
|
* Task_NewGameBirchSpeech_ReturnFromNamingScreenShowTextbox
|
||||||
|
* Task_NewGameBirchSpeech_SoItsPlayerName
|
||||||
|
* Task_NewGameBirchSpeech_CreateNameYesNo
|
||||||
|
* Task_NewGameBirchSpeech_ProcessNameYesNoMenu
|
||||||
|
* - If confirmed, advance to Task_NewGameBirchSpeech_SlidePlatformAway2.
|
||||||
|
* - Otherwise, return to Task_NewGameBirchSpeech_BoyOrGirl.
|
||||||
|
*
|
||||||
|
* Task_NewGameBirchSpeech_SlidePlatformAway2
|
||||||
|
* Task_NewGameBirchSpeech_ReshowBirchLotad
|
||||||
|
* Task_NewGameBirchSpeech_WaitForSpriteFadeInAndTextPrinter
|
||||||
|
* Task_NewGameBirchSpeech_AreYouReady
|
||||||
|
* Task_NewGameBirchSpeech_ShrinkPlayer
|
||||||
|
* Task_NewGameBirchSpeech_WaitForPlayerShrink
|
||||||
|
* Task_NewGameBirchSpeech_FadePlayerToWhite
|
||||||
|
* Task_NewGameBirchSpeech_Cleanup
|
||||||
|
* - Advances to CB2_NewGame.
|
||||||
|
*
|
||||||
|
* Task_NewGameBirchSpeechSub_InitPokeball
|
||||||
|
* - Advances to Task_NewGameBirchSpeechSub_WaitForLotad
|
||||||
|
* Task_NewGameBirchSpeechSub_WaitForLotad
|
||||||
|
* - Destroys itself when done.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// These two defines are used with the sCurrItemAndOptionsMenuCheck,
|
||||||
|
// to distinguish between its two parts.
|
||||||
|
#define OPTION_MENU_FLAG 0x8000
|
||||||
|
#define CURRENT_ITEM_MASK 0x7FFF
|
||||||
|
|
||||||
// Static type declarations
|
// Static type declarations
|
||||||
|
|
||||||
// Static RAM declarations
|
// Static RAM declarations
|
||||||
@ -112,7 +241,7 @@ static void SpriteCB_MovePlayerDownWhileShrinking(struct Sprite*);
|
|||||||
static void Task_NewGameBirchSpeech_WaitForPlayerShrink(u8);
|
static void Task_NewGameBirchSpeech_WaitForPlayerShrink(u8);
|
||||||
static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8);
|
static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8);
|
||||||
static void Task_NewGameBirchSpeech_Cleanup(u8);
|
static void Task_NewGameBirchSpeech_Cleanup(u8);
|
||||||
static void nullsub_11();
|
static void SpriteCB_Null();
|
||||||
static void Task_NewGameBirchSpeech_ReturnFromNamingScreenShowTextbox(u8);
|
static void Task_NewGameBirchSpeech_ReturnFromNamingScreenShowTextbox(u8);
|
||||||
static void MainMenu_FormatSavegamePlayer(void);
|
static void MainMenu_FormatSavegamePlayer(void);
|
||||||
static void MainMenu_FormatSavegamePokedex(void);
|
static void MainMenu_FormatSavegamePokedex(void);
|
||||||
@ -247,7 +376,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] =
|
|||||||
DUMMY_WIN_TEMPLATE
|
DUMMY_WIN_TEMPLATE
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate gUnknown_082FF080[] =
|
static const struct WindowTemplate gNewGameBirchSpeechTextWindows[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
.bg = 0,
|
.bg = 0,
|
||||||
@ -542,7 +671,7 @@ static void Task_MainMenuCheckSaveFile(u8 taskId)
|
|||||||
gTasks[taskId].func = Task_WaitForSaveFileErrorWindow;
|
gTasks[taskId].func = Task_WaitForSaveFileErrorWindow;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sCurrItemAndOptionMenuCheck & 0x8000) // are we returning from the options menu?
|
if (sCurrItemAndOptionMenuCheck & OPTION_MENU_FLAG) // are we returning from the options menu?
|
||||||
{
|
{
|
||||||
switch (tMenuType) // if so, highlight the OPTIONS item
|
switch (tMenuType) // if so, highlight the OPTIONS item
|
||||||
{
|
{
|
||||||
@ -558,7 +687,7 @@ static void Task_MainMenuCheckSaveFile(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sCurrItemAndOptionMenuCheck &= 0x7FFF; // turn off the "returning from options menu" flag
|
sCurrItemAndOptionMenuCheck &= CURRENT_ITEM_MASK; // turn off the "returning from options menu" flag
|
||||||
tCurrItem = sCurrItemAndOptionMenuCheck;
|
tCurrItem = sCurrItemAndOptionMenuCheck;
|
||||||
tItemCount = tMenuType + 2;
|
tItemCount = tMenuType + 2;
|
||||||
}
|
}
|
||||||
@ -637,6 +766,8 @@ static void Task_DisplayMainMenu(u8 taskId)
|
|||||||
palette = RGB(26, 26, 25);
|
palette = RGB(26, 26, 25);
|
||||||
LoadPalette(&palette, 252, 2);
|
LoadPalette(&palette, 252, 2);
|
||||||
|
|
||||||
|
// Note: If there is no save file, the save block is zeroed out,
|
||||||
|
// so the default gender is MALE.
|
||||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||||
{
|
{
|
||||||
palette = RGB(4, 16, 31);
|
palette = RGB(4, 16, 31);
|
||||||
@ -813,14 +944,14 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
|
|||||||
{
|
{
|
||||||
if (gTasks[taskId].tMenuType == HAS_MYSTERY_EVENTS)
|
if (gTasks[taskId].tMenuType == HAS_MYSTERY_EVENTS)
|
||||||
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
|
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
|
||||||
sub_819746C(0, 1);
|
ClearWindowAndBorder(0, TRUE);
|
||||||
sub_819746C(1, 1);
|
ClearWindowAndBorder(1, TRUE);
|
||||||
sub_819746C(2, 1);
|
ClearWindowAndBorder(2, TRUE);
|
||||||
sub_819746C(3, 1);
|
ClearWindowAndBorder(3, TRUE);
|
||||||
sub_819746C(4, 1);
|
ClearWindowAndBorder(4, TRUE);
|
||||||
sub_819746C(5, 1);
|
ClearWindowAndBorder(5, TRUE);
|
||||||
sub_819746C(6, 1);
|
ClearWindowAndBorder(6, TRUE);
|
||||||
sub_819746C(7, 1);
|
ClearWindowAndBorder(7, TRUE);
|
||||||
wirelessAdapterConnected = IsWirelessAdapterConnected();
|
wirelessAdapterConnected = IsWirelessAdapterConnected();
|
||||||
switch (gTasks[taskId].tMenuType)
|
switch (gTasks[taskId].tMenuType)
|
||||||
{
|
{
|
||||||
@ -973,7 +1104,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
|
|||||||
if (action != ACTION_OPTION)
|
if (action != ACTION_OPTION)
|
||||||
sCurrItemAndOptionMenuCheck = 0;
|
sCurrItemAndOptionMenuCheck = 0;
|
||||||
else
|
else
|
||||||
sCurrItemAndOptionMenuCheck |= 0x8000; // entering the options menu
|
sCurrItemAndOptionMenuCheck |= OPTION_MENU_FLAG; // entering the options menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -981,7 +1112,7 @@ static void Task_HandleMainMenuBPressed(u8 taskId)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
if (gTasks[taskId].tMenuType == 3)
|
if (gTasks[taskId].tMenuType == HAS_MYSTERY_EVENTS)
|
||||||
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
|
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
|
||||||
sCurrItemAndOptionMenuCheck = 0;
|
sCurrItemAndOptionMenuCheck = 0;
|
||||||
FreeAllWindowBuffers();
|
FreeAllWindowBuffers();
|
||||||
@ -1199,7 +1330,7 @@ static void Task_NewGameBirchSpeech_WaitForSpriteFadeInWelcome(u8 taskId)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InitWindows(gUnknown_082FF080);
|
InitWindows(gNewGameBirchSpeechTextWindows);
|
||||||
LoadMainMenuWindowFrameTiles(0, 0xF3);
|
LoadMainMenuWindowFrameTiles(0, 0xF3);
|
||||||
LoadMessageBoxGfx(0, 0xFC, 0xF0);
|
LoadMessageBoxGfx(0, 0xFC, 0xF0);
|
||||||
NewGameBirchSpeech_ShowDialogueWindow(0, 1);
|
NewGameBirchSpeech_ShowDialogueWindow(0, 1);
|
||||||
@ -1642,7 +1773,7 @@ static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8 taskId)
|
|||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
spriteId = gTasks[taskId].tPlayerSpriteId;
|
spriteId = gTasks[taskId].tPlayerSpriteId;
|
||||||
gSprites[spriteId].callback = nullsub_11;
|
gSprites[spriteId].callback = SpriteCB_Null;
|
||||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||||
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 16, RGB_WHITEALPHA);
|
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 16, RGB_WHITEALPHA);
|
||||||
gTasks[taskId].func = Task_NewGameBirchSpeech_Cleanup;
|
gTasks[taskId].func = Task_NewGameBirchSpeech_Cleanup;
|
||||||
@ -1730,14 +1861,14 @@ static void CB2_NewGameBirchSpeech_ReturnFromNamingScreen(void)
|
|||||||
REG_IME = savedIme;
|
REG_IME = savedIme;
|
||||||
SetVBlankCallback(VBlankCB_MainMenu);
|
SetVBlankCallback(VBlankCB_MainMenu);
|
||||||
SetMainCallback2(CB2_MainMenu);
|
SetMainCallback2(CB2_MainMenu);
|
||||||
InitWindows(gUnknown_082FF080);
|
InitWindows(gNewGameBirchSpeechTextWindows);
|
||||||
LoadMainMenuWindowFrameTiles(0, 0xF3);
|
LoadMainMenuWindowFrameTiles(0, 0xF3);
|
||||||
LoadMessageBoxGfx(0, 0xFC, 0xF0);
|
LoadMessageBoxGfx(0, 0xFC, 0xF0);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_11(struct Sprite *sprite)
|
static void SpriteCB_Null(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1763,22 +1894,22 @@ static void AddBirchSpeechObjects(u8 taskId)
|
|||||||
u8 maySpriteId;
|
u8 maySpriteId;
|
||||||
|
|
||||||
birchSpriteId = AddNewGameBirchObject(0x88, 0x3C, 1);
|
birchSpriteId = AddNewGameBirchObject(0x88, 0x3C, 1);
|
||||||
gSprites[birchSpriteId].callback = nullsub_11;
|
gSprites[birchSpriteId].callback = SpriteCB_Null;
|
||||||
gSprites[birchSpriteId].oam.priority = 0;
|
gSprites[birchSpriteId].oam.priority = 0;
|
||||||
gSprites[birchSpriteId].invisible = TRUE;
|
gSprites[birchSpriteId].invisible = TRUE;
|
||||||
gTasks[taskId].tBirchSpriteId = birchSpriteId;
|
gTasks[taskId].tBirchSpriteId = birchSpriteId;
|
||||||
lotadSpriteId = NewGameBirchSpeech_CreateLotadSprite(100, 0x4B);
|
lotadSpriteId = NewGameBirchSpeech_CreateLotadSprite(100, 0x4B);
|
||||||
gSprites[lotadSpriteId].callback = nullsub_11;
|
gSprites[lotadSpriteId].callback = SpriteCB_Null;
|
||||||
gSprites[lotadSpriteId].oam.priority = 0;
|
gSprites[lotadSpriteId].oam.priority = 0;
|
||||||
gSprites[lotadSpriteId].invisible = TRUE;
|
gSprites[lotadSpriteId].invisible = TRUE;
|
||||||
gTasks[taskId].tLotadSpriteId = lotadSpriteId;
|
gTasks[taskId].tLotadSpriteId = lotadSpriteId;
|
||||||
brendanSpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_BRENDAN), 120, 60, 0, &gDecompressionBuffer[0]);
|
brendanSpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_BRENDAN), 120, 60, 0, &gDecompressionBuffer[0]);
|
||||||
gSprites[brendanSpriteId].callback = nullsub_11;
|
gSprites[brendanSpriteId].callback = SpriteCB_Null;
|
||||||
gSprites[brendanSpriteId].invisible = TRUE;
|
gSprites[brendanSpriteId].invisible = TRUE;
|
||||||
gSprites[brendanSpriteId].oam.priority = 0;
|
gSprites[brendanSpriteId].oam.priority = 0;
|
||||||
gTasks[taskId].tBrendanSpriteId = brendanSpriteId;
|
gTasks[taskId].tBrendanSpriteId = brendanSpriteId;
|
||||||
maySpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_MAY), 120, 60, 0, &gDecompressionBuffer[0x800]);
|
maySpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_MAY), 120, 60, 0, &gDecompressionBuffer[0x800]);
|
||||||
gSprites[maySpriteId].callback = nullsub_11;
|
gSprites[maySpriteId].callback = SpriteCB_Null;
|
||||||
gSprites[maySpriteId].invisible = TRUE;
|
gSprites[maySpriteId].invisible = TRUE;
|
||||||
gSprites[maySpriteId].oam.priority = 0;
|
gSprites[maySpriteId].oam.priority = 0;
|
||||||
gTasks[taskId].tMaySpriteId = maySpriteId;
|
gTasks[taskId].tMaySpriteId = maySpriteId;
|
||||||
@ -1966,8 +2097,8 @@ static void NewGameBirchSpeech_StartFadePlatformOut(u8 taskId, u8 delay)
|
|||||||
|
|
||||||
static void NewGameBirchSpeech_ShowGenderMenu(void)
|
static void NewGameBirchSpeech_ShowGenderMenu(void)
|
||||||
{
|
{
|
||||||
DrawMainMenuWindowBorder(&gUnknown_082FF080[1], 0xF3);
|
DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3);
|
||||||
FillWindowPixelBuffer(1, 17);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_WHITE);
|
||||||
PrintMenuTable(1, 2, sMenuActions_Gender);
|
PrintMenuTable(1, 2, sMenuActions_Gender);
|
||||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
|
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
@ -1995,7 +2126,7 @@ static void NewGameBirchSpeech_SetDefaultPlayerName(u8 nameId)
|
|||||||
|
|
||||||
static void CreateMainMenuErrorWindow(const u8* str)
|
static void CreateMainMenuErrorWindow(const u8* str)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(7, 17);
|
FillWindowPixelBuffer(7, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(7, 1, str, 0, 1, 2, 0);
|
AddTextPrinterParameterized(7, 1, str, 0, 1, 2, 0);
|
||||||
PutWindowTilemap(7);
|
PutWindowTilemap(7);
|
||||||
CopyWindowToVram(7, 2);
|
CopyWindowToVram(7, 2);
|
||||||
@ -2105,12 +2236,12 @@ static void NewGameBirchSpeech_ClearGenderWindowTilemap(u8 a, u8 b, u8 c, u8 d,
|
|||||||
FillBgTilemapBufferRect(a, 0, b + 0xFF, c + 0xFF, d + 2, e + 2, 2);
|
FillBgTilemapBufferRect(a, 0, b + 0xFF, c + 0xFF, d + 2, e + 2, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, u8 a)
|
static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, bool8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, NewGameBirchSpeech_ClearGenderWindowTilemap);
|
CallWindowFunction(windowId, NewGameBirchSpeech_ClearGenderWindowTilemap);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
if (a == 1)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2146,7 +2277,7 @@ void CreateYesNoMenuParameterized(u8 a, u8 b, u16 c, u16 d, u8 e, u8 f)
|
|||||||
static void NewGameBirchSpeech_ShowDialogueWindow(u8 windowId, u8 copyToVram)
|
static void NewGameBirchSpeech_ShowDialogueWindow(u8 windowId, u8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, NewGameBirchSpeech_CreateDialogueWindowBorder);
|
CallWindowFunction(windowId, NewGameBirchSpeech_CreateDialogueWindowBorder);
|
||||||
FillWindowPixelBuffer(windowId, 17);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
|
@ -276,7 +276,7 @@ static void Task_MapNamePopUpWindow(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
sub_819746C(GetMapNamePopUpWindowId(), TRUE);
|
ClearWindowAndBorder(GetMapNamePopUpWindowId(), TRUE);
|
||||||
task->data[0] = 5;
|
task->data[0] = 5;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
@ -290,7 +290,7 @@ void HideMapNamePopUpWindow(void)
|
|||||||
{
|
{
|
||||||
if (FuncIsActiveTask(Task_MapNamePopUpWindow))
|
if (FuncIsActiveTask(Task_MapNamePopUpWindow))
|
||||||
{
|
{
|
||||||
sub_819746C(GetMapNamePopUpWindowId(), TRUE);
|
ClearWindowAndBorder(GetMapNamePopUpWindowId(), TRUE);
|
||||||
RemoveMapNamePopUpWindow();
|
RemoveMapNamePopUpWindow();
|
||||||
SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, 0);
|
SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, 0);
|
||||||
DestroyTask(sPopupTaskId);
|
DestroyTask(sPopupTaskId);
|
||||||
|
51
src/menu.c
51
src/menu.c
@ -126,8 +126,8 @@ const struct MoveMenuInfoIcon gMoveMenuInfoIcons[] =
|
|||||||
extern void sub_81973A4(void);
|
extern void sub_81973A4(void);
|
||||||
extern void DrawStandardFrame(u8, u8, u8, u8, u8, u8);
|
extern void DrawStandardFrame(u8, u8, u8, u8, u8, u8);
|
||||||
extern void DrawDialogueFrame(u8, u8, u8, u8, u8, u8);
|
extern void DrawDialogueFrame(u8, u8, u8, u8, u8, u8);
|
||||||
extern void sub_81977BC(u8, u8, u8, u8, u8, u8);
|
extern void ClearWindowAndBorderTilemap(u8, u8, u8, u8, u8, u8);
|
||||||
extern void sub_8197804(u8, u8, u8, u8, u8, u8);
|
extern void ClearWindowAndWideBorderTilemap(u8, u8, u8, u8, u8, u8);
|
||||||
extern void sub_8197BB4(u8, u8, u8, u8, u8, u8);
|
extern void sub_8197BB4(u8, u8, u8, u8, u8, u8);
|
||||||
extern void sub_8197E30(u8, u8, u8, u8, u8, u8);
|
extern void sub_8197E30(u8, u8, u8, u8, u8, u8);
|
||||||
extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8);
|
extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8);
|
||||||
@ -213,7 +213,7 @@ void sub_81973A4(void)
|
|||||||
void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram)
|
void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, DrawDialogueFrame);
|
CallWindowFunction(windowId, DrawDialogueFrame);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -222,25 +222,25 @@ void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram)
|
|||||||
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 copyToVram)
|
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, DrawStandardFrame);
|
CallWindowFunction(windowId, DrawStandardFrame);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8197434(u8 windowId, bool8 copyToVram)
|
void ClearWindowAndWideBorder(u8 windowId, bool8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, sub_8197804);
|
CallWindowFunction(windowId, ClearWindowAndWideBorderTilemap);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_819746C(u8 windowId, bool8 copyToVram)
|
void ClearWindowAndBorder(u8 windowId, bool8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, sub_81977BC);
|
CallWindowFunction(windowId, ClearWindowAndBorderTilemap);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -408,14 +408,17 @@ void DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height
|
|||||||
DLG_WINDOW_PALETTE_NUM);
|
DLG_WINDOW_PALETTE_NUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81977BC(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
|
// Clears the given window, and a 1-tile border around the window, to transparent tiles.
|
||||||
|
void ClearWindowAndBorderTilemap(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
|
||||||
{
|
{
|
||||||
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, STD_WINDOW_PALETTE_NUM);
|
FillBgTilemapBufferRect(bg, TRANSPARENT_TILE_NUMBER, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, STD_WINDOW_PALETTE_NUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8197804(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
|
// Clears the given window, and a 1-tile border the top and bottom, plus a 3-tile border on the left and right.
|
||||||
|
// Tiles are set to a transparent tile.
|
||||||
|
void ClearWindowAndWideBorderTilemap(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
|
||||||
{
|
{
|
||||||
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, STD_WINDOW_PALETTE_NUM);
|
FillBgTilemapBufferRect(bg, TRANSPARENT_TILE_NUMBER, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, STD_WINDOW_PALETTE_NUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram)
|
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram)
|
||||||
@ -554,7 +557,7 @@ void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 tileNum, u8 paletteNum)
|
|||||||
sTileNum = tileNum;
|
sTileNum = tileNum;
|
||||||
sPaletteNum = paletteNum;
|
sPaletteNum = paletteNum;
|
||||||
CallWindowFunction(windowId, sub_8197BB4);
|
CallWindowFunction(windowId, sub_8197BB4);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -565,7 +568,7 @@ void sub_8197B64(u8 windowId, bool8 copyToVram, u16 tileNum)
|
|||||||
sTileNum = tileNum;
|
sTileNum = tileNum;
|
||||||
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
|
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
|
||||||
CallWindowFunction(windowId, sub_8197BB4);
|
CallWindowFunction(windowId, sub_8197BB4);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -669,7 +672,7 @@ void sub_8197BB4(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 p
|
|||||||
void sub_8197DF8(u8 windowId, bool8 copyToVram)
|
void sub_8197DF8(u8 windowId, bool8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, sub_8197E30);
|
CallWindowFunction(windowId, sub_8197E30);
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -685,7 +688,7 @@ void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 baseTileNum, u8 pal
|
|||||||
sTileNum = baseTileNum;
|
sTileNum = baseTileNum;
|
||||||
sPaletteNum = paletteNum;
|
sPaletteNum = paletteNum;
|
||||||
CallWindowFunction(windowId, DrawWindowBorder);
|
CallWindowFunction(windowId, DrawWindowBorder);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -696,7 +699,7 @@ void sub_8197EC8(u8 windowId, bool8 copyToVram, u16 baseTileNum)
|
|||||||
sTileNum = baseTileNum;
|
sTileNum = baseTileNum;
|
||||||
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
|
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
|
||||||
CallWindowFunction(windowId, DrawWindowBorder);
|
CallWindowFunction(windowId, DrawWindowBorder);
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -765,7 +768,7 @@ void DrawWindowBorder(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height,
|
|||||||
void sub_8198070(u8 windowId, bool8 copyToVram)
|
void sub_8198070(u8 windowId, bool8 copyToVram)
|
||||||
{
|
{
|
||||||
CallWindowFunction(windowId, sub_81980A8);
|
CallWindowFunction(windowId, sub_81980A8);
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
ClearWindowTilemap(windowId);
|
ClearWindowTilemap(windowId);
|
||||||
if (copyToVram == TRUE)
|
if (copyToVram == TRUE)
|
||||||
CopyWindowToVram(windowId, 3);
|
CopyWindowToVram(windowId, 3);
|
||||||
@ -811,7 +814,7 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram)
|
|||||||
if (sWindowId != 0xFF)
|
if (sWindowId != 0xFF)
|
||||||
{
|
{
|
||||||
PutWindowTilemap(sWindowId);
|
PutWindowTilemap(sWindowId);
|
||||||
FillWindowPixelBuffer(sWindowId, 0xFF);
|
FillWindowPixelBuffer(sWindowId, PIXEL_BUFFER_UNKNOWN);
|
||||||
width = GetStringWidth(0, string, 0);
|
width = GetStringWidth(0, string, 0);
|
||||||
AddTextPrinterParameterized3(sWindowId,
|
AddTextPrinterParameterized3(sWindowId,
|
||||||
0,
|
0,
|
||||||
@ -845,7 +848,7 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo
|
|||||||
color[2] = 2;
|
color[2] = 2;
|
||||||
}
|
}
|
||||||
PutWindowTilemap(sWindowId);
|
PutWindowTilemap(sWindowId);
|
||||||
FillWindowPixelBuffer(sWindowId, 0xFF);
|
FillWindowPixelBuffer(sWindowId, PIXEL_BUFFER_UNKNOWN);
|
||||||
if (string2 != NULL)
|
if (string2 != NULL)
|
||||||
{
|
{
|
||||||
width = GetStringWidth(0, string2, 0);
|
width = GetStringWidth(0, string2, 0);
|
||||||
@ -873,7 +876,7 @@ void sub_81982F0(void)
|
|||||||
{
|
{
|
||||||
if (sWindowId != 0xFF)
|
if (sWindowId != 0xFF)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(sWindowId, 0xFF);
|
FillWindowPixelBuffer(sWindowId, PIXEL_BUFFER_UNKNOWN);
|
||||||
CopyWindowToVram(sWindowId, 3);
|
CopyWindowToVram(sWindowId, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -882,7 +885,7 @@ void sub_8198314(void)
|
|||||||
{
|
{
|
||||||
if (sWindowId != 0xFF)
|
if (sWindowId != 0xFF)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(sWindowId, 0);
|
FillWindowPixelBuffer(sWindowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
ClearWindowTilemap(sWindowId);
|
ClearWindowTilemap(sWindowId);
|
||||||
CopyWindowToVram(sWindowId, 3);
|
CopyWindowToVram(sWindowId, 3);
|
||||||
RemoveWindow(sWindowId);
|
RemoveWindow(sWindowId);
|
||||||
|
@ -169,7 +169,7 @@ void DrawMoneyBox(int amount, u8 x, u8 y)
|
|||||||
|
|
||||||
SetWindowTemplateFields(&template, 0, x + 1, y + 1, 10, 2, 15, 8);
|
SetWindowTemplateFields(&template, 0, x + 1, y + 1, 10, 2, 15, 8);
|
||||||
sMoneyBoxWindowId = AddWindow(&template);
|
sMoneyBoxWindowId = AddWindow(&template);
|
||||||
FillWindowPixelBuffer(sMoneyBoxWindowId, 0);
|
FillWindowPixelBuffer(sMoneyBoxWindowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(sMoneyBoxWindowId);
|
PutWindowTilemap(sMoneyBoxWindowId);
|
||||||
CopyWindowToVram(sMoneyBoxWindowId, 1);
|
CopyWindowToVram(sMoneyBoxWindowId, 1);
|
||||||
PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x214, 14, amount);
|
PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x214, 14, amount);
|
||||||
|
@ -90,7 +90,7 @@ void CB2_InitMysteryEventMenu(void)
|
|||||||
|
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
|
|
||||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
|
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
|
||||||
LoadUserWindowBorderGfx(0, 1u, 0xD0u);
|
LoadUserWindowBorderGfx(0, 1u, 0xD0u);
|
||||||
|
@ -1474,7 +1474,7 @@ static void HandleDpadMovement(struct Task *task)
|
|||||||
|
|
||||||
static void sub_80E4894(void)
|
static void sub_80E4894(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11);
|
FillWindowPixelBuffer(gNamingScreenData->windows[3], PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, gNamingScreenData->template->title, 8, 1, 0, 0);
|
AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, gNamingScreenData->template->title, 8, 1, 0, 0);
|
||||||
PutWindowTilemap(gNamingScreenData->windows[3]);
|
PutWindowTilemap(gNamingScreenData->windows[3]);
|
||||||
}
|
}
|
||||||
@ -1485,7 +1485,7 @@ static void sub_80E48E8(void)
|
|||||||
|
|
||||||
StringCopy(buffer, gSpeciesNames[gNamingScreenData->monSpecies]);
|
StringCopy(buffer, gSpeciesNames[gNamingScreenData->monSpecies]);
|
||||||
StringAppendN(buffer, gNamingScreenData->template->title, 15);
|
StringAppendN(buffer, gNamingScreenData->template->title, 15);
|
||||||
FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11);
|
FillWindowPixelBuffer(gNamingScreenData->windows[3], PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0);
|
AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0);
|
||||||
PutWindowTilemap(gNamingScreenData->windows[3]);
|
PutWindowTilemap(gNamingScreenData->windows[3]);
|
||||||
}
|
}
|
||||||
@ -1672,7 +1672,7 @@ static void sub_80E4D10(void)
|
|||||||
u8 maxChars = gNamingScreenData->template->maxChars;
|
u8 maxChars = gNamingScreenData->template->maxChars;
|
||||||
u16 unk = gNamingScreenData->inputCharBaseXPos - 0x40;
|
u16 unk = gNamingScreenData->inputCharBaseXPos - 0x40;
|
||||||
|
|
||||||
FillWindowPixelBuffer(gNamingScreenData->windows[2], 0x11);
|
FillWindowPixelBuffer(gNamingScreenData->windows[2], PIXEL_BUFFER_WHITE);
|
||||||
|
|
||||||
for (i = 0; i < maxChars; i++)
|
for (i = 0; i < maxChars; i++)
|
||||||
{
|
{
|
||||||
@ -1766,7 +1766,7 @@ static void sub_80E4EF0(void)
|
|||||||
{
|
{
|
||||||
const u8 color[3] = { 15, 1, 2 };
|
const u8 color[3] = { 15, 1, 2 };
|
||||||
|
|
||||||
FillWindowPixelBuffer(gNamingScreenData->windows[4], 0xFF);
|
FillWindowPixelBuffer(gNamingScreenData->windows[4], PIXEL_BUFFER_UNKNOWN);
|
||||||
AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack);
|
AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack);
|
||||||
PutWindowTilemap(gNamingScreenData->windows[4]);
|
PutWindowTilemap(gNamingScreenData->windows[4]);
|
||||||
CopyWindowToVram(gNamingScreenData->windows[4], 3);
|
CopyWindowToVram(gNamingScreenData->windows[4], 3);
|
||||||
|
@ -620,7 +620,7 @@ static void ButtonMode_DrawChoices(u8 selection)
|
|||||||
|
|
||||||
static void DrawTextOption(void)
|
static void DrawTextOption(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(WIN_TEXT_OPTION, 0x11);
|
FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL);
|
||||||
CopyWindowToVram(WIN_TEXT_OPTION, 3);
|
CopyWindowToVram(WIN_TEXT_OPTION, 3);
|
||||||
}
|
}
|
||||||
@ -629,7 +629,7 @@ static void DrawOptionMenuTexts(void)
|
|||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
FillWindowPixelBuffer(WIN_OPTIONS, 0x11);
|
FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_BUFFER_WHITE);
|
||||||
for (i = 0; i < MENUITEM_COUNT; i++)
|
for (i = 0; i < MENUITEM_COUNT; i++)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
||||||
|
@ -3108,7 +3108,7 @@ static void sub_81B239C(u8 a)
|
|||||||
}
|
}
|
||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
for (i = 0; i < PARTY_SIZE; i++)
|
for (i = 0; i < PARTY_SIZE; i++)
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
LoadUserWindowBorderGfx(0, 0x4F, 0xD0);
|
LoadUserWindowBorderGfx(0, 0x4F, 0xD0);
|
||||||
LoadPalette(GetOverworldTextboxPalettePtr(), 0xE0, 0x20);
|
LoadPalette(GetOverworldTextboxPalettePtr(), 0xE0, 0x20);
|
||||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||||
@ -3126,7 +3126,7 @@ static void sub_81B2428(bool8 a)
|
|||||||
if (a == TRUE)
|
if (a == TRUE)
|
||||||
{
|
{
|
||||||
firstWindowId = AddWindow(&gUnknown_08615918);
|
firstWindowId = AddWindow(&gUnknown_08615918);
|
||||||
FillWindowPixelBuffer(firstWindowId, 0);
|
FillWindowPixelBuffer(firstWindowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48);
|
mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48);
|
||||||
AddTextPrinterParameterized4(firstWindowId, 0, mainOffset, 1, 0, 0, gUnknown_086157FC[0], -1, gMenuText_Confirm);
|
AddTextPrinterParameterized4(firstWindowId, 0, mainOffset, 1, 0, 0, gUnknown_086157FC[0], -1, gMenuText_Confirm);
|
||||||
PutWindowTilemap(firstWindowId);
|
PutWindowTilemap(firstWindowId);
|
||||||
@ -3139,7 +3139,7 @@ static void sub_81B2428(bool8 a)
|
|||||||
windowId = AddWindow(&gUnknown_08615908);
|
windowId = AddWindow(&gUnknown_08615908);
|
||||||
offset = 3;
|
offset = 3;
|
||||||
}
|
}
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (gUnknown_0203CEC8.unk8_0 != 10)
|
if (gUnknown_0203CEC8.unk8_0 != 10)
|
||||||
{
|
{
|
||||||
mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48);
|
mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48);
|
||||||
|
@ -403,7 +403,7 @@ static void PlayerPC_Mailbox(u8 taskId)
|
|||||||
ItemStorage_SetItemAndMailCount(taskId);
|
ItemStorage_SetItemAndMailCount(taskId);
|
||||||
if (sub_81D1C44(playerPCItemPageInfo.count) == TRUE)
|
if (sub_81D1C44(playerPCItemPageInfo.count) == TRUE)
|
||||||
{
|
{
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
Mailbox_DrawMailboxMenu(taskId);
|
Mailbox_DrawMailboxMenu(taskId);
|
||||||
gTasks[taskId].func = Mailbox_ProcessInput;
|
gTasks[taskId].func = Mailbox_ProcessInput;
|
||||||
}
|
}
|
||||||
@ -560,7 +560,7 @@ static void ItemStorage_WithdrawToss_Helper(u8 taskId, bool8 toss)
|
|||||||
FreeAndReserveObjectSpritePalettes();
|
FreeAndReserveObjectSpritePalettes();
|
||||||
LoadListMenuArrowsGfx();
|
LoadListMenuArrowsGfx();
|
||||||
sub_8122344(gUnknown_0203BCC4->spriteIds, 7);
|
sub_8122344(gUnknown_0203BCC4->spriteIds, 7);
|
||||||
sub_8197434(0,0);
|
ClearWindowAndWideBorder(0,0);
|
||||||
gTasks[taskId].func = ItemStorage_ProcessWithdrawTossInput;
|
gTasks[taskId].func = ItemStorage_ProcessWithdrawTossInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -863,7 +863,7 @@ static void Mailbox_NoPokemonForMail(u8 taskId)
|
|||||||
static void Mailbox_Cancel(u8 taskId)
|
static void Mailbox_Cancel(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_81D1D04(2);
|
sub_81D1D04(2);
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
Mailbox_DrawMailboxMenu(taskId);
|
Mailbox_DrawMailboxMenu(taskId);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
gTasks[taskId].func = Mailbox_ProcessInput;
|
gTasks[taskId].func = Mailbox_ProcessInput;
|
||||||
@ -977,7 +977,7 @@ static void sub_816BEF0(s32 id)
|
|||||||
description = (u8 *)ItemId_GetDescription(gSaveBlock1Ptr->pcItems[id].itemId);
|
description = (u8 *)ItemId_GetDescription(gSaveBlock1Ptr->pcItems[id].itemId);
|
||||||
else
|
else
|
||||||
description = ItemStorage_GetItemPcResponse(ITEMPC_GO_BACK_TO_PREV);
|
description = ItemStorage_GetItemPcResponse(ITEMPC_GO_BACK_TO_PREV);
|
||||||
FillWindowPixelBuffer(windowId, 17);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1123,7 +1123,7 @@ static const u8* ItemStorage_GetItemPcResponse(u16 itemId)
|
|||||||
static void ItemStorage_PrintItemPcResponse(const u8 *string)
|
static void ItemStorage_PrintItemPcResponse(const u8 *string)
|
||||||
{
|
{
|
||||||
u8 windowId = gUnknown_0203BCC4->windowIds[1];
|
u8 windowId = gUnknown_0203BCC4->windowIds[1];
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
StringExpandPlaceholders(gStringVar4, string);
|
StringExpandPlaceholders(gStringVar4, string);
|
||||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL);
|
||||||
}
|
}
|
||||||
|
@ -665,7 +665,7 @@ static void HandleInitWindows(void)
|
|||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(sWindowTemplatesForPokeblockMenu) - 1; i++)
|
for (i = 0; i < ARRAY_COUNT(sWindowTemplatesForPokeblockMenu) - 1; i++)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
@ -749,7 +749,7 @@ static void sub_8135FCC(s32 pkblId)
|
|||||||
struct Pokeblock *pokeblock;
|
struct Pokeblock *pokeblock;
|
||||||
u16 rectTilemapSrc[2];
|
u16 rectTilemapSrc[2];
|
||||||
|
|
||||||
FillWindowPixelBuffer(7, 0);
|
FillWindowPixelBuffer(7, PIXEL_BUFFER_TRANSPARENT);
|
||||||
|
|
||||||
if (pkblId != LIST_B_PRESSED)
|
if (pkblId != LIST_B_PRESSED)
|
||||||
{
|
{
|
||||||
|
@ -704,7 +704,7 @@ static void HandleInitWindows(void)
|
|||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
LoadUserWindowBorderGfx(0, 1, 0xE0);
|
LoadUserWindowBorderGfx(0, 1, 0xE0);
|
||||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
}
|
}
|
||||||
|
@ -2926,7 +2926,7 @@ void sub_80BEA24(u8 taskId)
|
|||||||
case 1:
|
case 1:
|
||||||
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
|
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
|
||||||
CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0);
|
CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0);
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
sub_80C0D30(1, sPokedexListItem->dexNum);
|
sub_80C0D30(1, sPokedexListItem->dexNum);
|
||||||
@ -3221,7 +3221,7 @@ void sub_80BF250(u8 taskId)
|
|||||||
case 1:
|
case 1:
|
||||||
DecompressAndLoadBgGfxUsingHeap(3, &gPokedexMenu_Gfx, 0x2000, 0, 0);
|
DecompressAndLoadBgGfxUsingHeap(3, &gPokedexMenu_Gfx, 0x2000, 0, 0);
|
||||||
CopyToBgTilemapBuffer(3, &gPokedexTilemap_CryScreen, 0, 0);
|
CopyToBgTilemapBuffer(3, &gPokedexTilemap_CryScreen, 0, 0);
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
PutWindowTilemap(3);
|
PutWindowTilemap(3);
|
||||||
PutWindowTilemap(2);
|
PutWindowTilemap(2);
|
||||||
@ -3415,7 +3415,7 @@ void sub_80BF82C(u8 taskId)
|
|||||||
case 1:
|
case 1:
|
||||||
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
|
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
|
||||||
CopyToBgTilemapBuffer(3, gPokedexTilemap_SizeScreen, 0, 0);
|
CopyToBgTilemapBuffer(3, gPokedexTilemap_SizeScreen, 0, 0);
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
@ -3762,7 +3762,7 @@ void sub_80BFE38(u8 taskId)
|
|||||||
case 1:
|
case 1:
|
||||||
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
|
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
|
||||||
CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0);
|
CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0);
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
sub_80C0D30(1, gTasks[taskId].data[1]);
|
sub_80C0D30(1, gTasks[taskId].data[1]);
|
||||||
|
@ -1218,7 +1218,7 @@ static const u16 gWallpaperPalettes_Plain[][16] =
|
|||||||
static const u32 gWallpaperTiles_Plain[] = INCBIN_U32("graphics/pokemon_storage/plain.4bpp.lz");
|
static const u32 gWallpaperTiles_Plain[] = INCBIN_U32("graphics/pokemon_storage/plain.4bpp.lz");
|
||||||
static const u32 gWallpaperTilemap_Plain[] = INCBIN_U32("graphics/pokemon_storage/plain.bin.lz");
|
static const u32 gWallpaperTilemap_Plain[] = INCBIN_U32("graphics/pokemon_storage/plain.bin.lz");
|
||||||
|
|
||||||
// 12×18 tilemap
|
// 12<EFBFBD>18 tilemap
|
||||||
static const u32 gUnknown_085773C4[] = INCBIN_U32("graphics/unused/tilemap_5773C4.bin");
|
static const u32 gUnknown_085773C4[] = INCBIN_U32("graphics/unused/tilemap_5773C4.bin");
|
||||||
|
|
||||||
static const u16 gUnknown_08577574[][2] =
|
static const u16 gUnknown_08577574[][2] =
|
||||||
@ -1737,7 +1737,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
|||||||
CreatePCMenu(task->data[1], &task->data[15]);
|
CreatePCMenu(task->data[1], &task->data[15]);
|
||||||
sub_81973A4();
|
sub_81973A4();
|
||||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
CopyWindowToVram(task->data[15], 3);
|
CopyWindowToVram(task->data[15], 3);
|
||||||
@ -1763,13 +1763,13 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
|||||||
if (task->data[1] != task->data[3])
|
if (task->data[1] != task->data[3])
|
||||||
{
|
{
|
||||||
task->data[1] = task->data[3];
|
task->data[1] = task->data[3];
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MENU_B_PRESSED:
|
case MENU_B_PRESSED:
|
||||||
case 4:
|
case 4:
|
||||||
sub_819746C(task->data[15], TRUE);
|
ClearWindowAndBorder(task->data[15], TRUE);
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
EnableBothScriptContexts();
|
EnableBothScriptContexts();
|
||||||
RemoveWindow(task->data[15]);
|
RemoveWindow(task->data[15]);
|
||||||
@ -1778,13 +1778,13 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
|||||||
default:
|
default:
|
||||||
if (task->data[2] == 0 && CountPartyMons() == PARTY_SIZE)
|
if (task->data[2] == 0 && CountPartyMons() == PARTY_SIZE)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3);
|
||||||
task->data[0] = 3;
|
task->data[0] = 3;
|
||||||
}
|
}
|
||||||
else if (task->data[2] == 1 && CountPartyMons() == 1)
|
else if (task->data[2] == 1 && CountPartyMons() == 1)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3);
|
||||||
task->data[0] = 3;
|
task->data[0] = 3;
|
||||||
}
|
}
|
||||||
@ -1799,7 +1799,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
|||||||
case 3:
|
case 3:
|
||||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
||||||
task->data[0] = 2;
|
task->data[0] = 2;
|
||||||
}
|
}
|
||||||
@ -1809,7 +1809,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
|||||||
task->data[1] = 4;
|
task->data[1] = 4;
|
||||||
Menu_MoveCursor(-1);
|
Menu_MoveCursor(-1);
|
||||||
task->data[1] = Menu_GetCursorPos();
|
task->data[1] = Menu_GetCursorPos();
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
||||||
task->data[0] = 2;
|
task->data[0] = 2;
|
||||||
}
|
}
|
||||||
@ -1819,7 +1819,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
|||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
Menu_MoveCursor(1);
|
Menu_MoveCursor(1);
|
||||||
task->data[1] = Menu_GetCursorPos();
|
task->data[1] = Menu_GetCursorPos();
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
||||||
task->data[0] = 2;
|
task->data[0] = 2;
|
||||||
}
|
}
|
||||||
@ -4107,7 +4107,7 @@ static void LoadCursorMonGfx(u16 species, u32 pid)
|
|||||||
|
|
||||||
static void PrintCursorMonInfo(void)
|
static void PrintCursorMonInfo(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
if (sPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
if (sPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(0, 1, sPSSData->cursorMonNickText, 6, 0, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, 1, sPSSData->cursorMonNickText, 6, 0, TEXT_SPEED_FF, NULL);
|
||||||
@ -4416,7 +4416,7 @@ static void PrintStorageActionText(u8 id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPSSData->field_2190, gPCStorageActionTexts[id].text);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPSSData->field_2190, gPCStorageActionTexts[id].text);
|
||||||
FillWindowPixelBuffer(1, 0x11);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(1, 1, sPSSData->field_2190, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(1, 1, sPSSData->field_2190, 0, 1, TEXT_SPEED_FF, NULL);
|
||||||
sub_8098858(1, 2, 14);
|
sub_8098858(1, 2, 14);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
@ -8835,7 +8835,7 @@ static bool8 sub_80D0164(void)
|
|||||||
sPSSData->field_2200 = AddWindow8Bit(&gUnknown_0857BB1C);
|
sPSSData->field_2200 = AddWindow8Bit(&gUnknown_0857BB1C);
|
||||||
if (sPSSData->field_2200 != 0xFF)
|
if (sPSSData->field_2200 != 0xFF)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(sPSSData->field_2200, 0);
|
FillWindowPixelBuffer(sPSSData->field_2200, PIXEL_BUFFER_TRANSPARENT);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9911,7 +9911,7 @@ static void PrintItemDescription(void)
|
|||||||
else
|
else
|
||||||
description = ItemId_GetDescription(sPSSData->cursorMonItem);
|
description = ItemId_GetDescription(sPSSData->cursorMonItem);
|
||||||
|
|
||||||
FillWindowPixelBuffer(2, 0x11);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized5(2, 1, description, 4, 0, 0, NULL, 0, 1);
|
AddTextPrinterParameterized5(2, 1, description, 4, 0, 0, NULL, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2631,7 +2631,7 @@ static void ResetWindows(void)
|
|||||||
|
|
||||||
for (i = 0; i < 20; i++)
|
for (i = 0; i < 20; i++)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
|
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
|
||||||
{
|
{
|
||||||
@ -2646,9 +2646,9 @@ static void SummaryScreen_PrintTextOnWindow(u8 windowId, const u8 *string, u8 x,
|
|||||||
|
|
||||||
static void sub_81C25E8(void)
|
static void sub_81C25E8(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(17, 0);
|
FillWindowPixelBuffer(17, PIXEL_BUFFER_TRANSPARENT);
|
||||||
FillWindowPixelBuffer(18, 0);
|
FillWindowPixelBuffer(18, PIXEL_BUFFER_TRANSPARENT);
|
||||||
FillWindowPixelBuffer(19, 0);
|
FillWindowPixelBuffer(19, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (!pssData->summary.isEgg)
|
if (!pssData->summary.isEgg)
|
||||||
sub_81C2628();
|
sub_81C2628();
|
||||||
else
|
else
|
||||||
@ -2899,7 +2899,7 @@ static u8 AddWindowFromTemplateList(const struct WindowTemplate *template, u8 te
|
|||||||
if (*windowIdPtr == 0xFF)
|
if (*windowIdPtr == 0xFF)
|
||||||
{
|
{
|
||||||
*windowIdPtr = AddWindow(&template[templateId]);
|
*windowIdPtr = AddWindow(&template[templateId]);
|
||||||
FillWindowPixelBuffer(*windowIdPtr, 0);
|
FillWindowPixelBuffer(*windowIdPtr, PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
return *windowIdPtr;
|
return *windowIdPtr;
|
||||||
}
|
}
|
||||||
@ -2921,7 +2921,7 @@ static void PrintPageSpecificText(u8 pageIndex)
|
|||||||
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
|
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
|
||||||
{
|
{
|
||||||
if (pssData->windowIds[i] != 0xFF)
|
if (pssData->windowIds[i] != 0xFF)
|
||||||
FillWindowPixelBuffer(pssData->windowIds[i], 0);
|
FillWindowPixelBuffer(pssData->windowIds[i], PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
sTextPrinterFunctions[pageIndex]();
|
sTextPrinterFunctions[pageIndex]();
|
||||||
}
|
}
|
||||||
@ -3568,7 +3568,7 @@ static void PrintContestMoveDescription(u8 moveSlot)
|
|||||||
static void PrintMoveDetails(u16 move)
|
static void PrintMoveDetails(u16 move)
|
||||||
{
|
{
|
||||||
u8 windowId = AddWindowFromTemplateList(gUnknown_0861CD14, 2);
|
u8 windowId = AddWindowFromTemplateList(gUnknown_0861CD14, 2);
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
if (move != MOVE_NONE)
|
if (move != MOVE_NONE)
|
||||||
{
|
{
|
||||||
if (pssData->currPageIndex == 2)
|
if (pssData->currPageIndex == 2)
|
||||||
@ -3642,7 +3642,7 @@ static void sub_81C40A0(u8 moveIndex1, u8 moveIndex2)
|
|||||||
static void PrintHMMovesCantBeForgotten(void)
|
static void PrintHMMovesCantBeForgotten(void)
|
||||||
{
|
{
|
||||||
u8 windowId = AddWindowFromTemplateList(gUnknown_0861CD14, 2);
|
u8 windowId = AddWindowFromTemplateList(gUnknown_0861CD14, 2);
|
||||||
FillWindowPixelBuffer(windowId, 0);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
SummaryScreen_PrintTextOnWindow(windowId, gText_HMMovesCantBeForgotten2, 6, 1, 0, 0);
|
SummaryScreen_PrintTextOnWindow(windowId, gText_HMMovesCantBeForgotten2, 6, 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ static void Task_RecordMixing_Main(u8 taskId)
|
|||||||
{
|
{
|
||||||
CreateTask(sub_80AF2B4, 10);
|
CreateTask(sub_80AF2B4, 10);
|
||||||
}
|
}
|
||||||
sub_8197434(0, 1);
|
ClearWindowAndWideBorder(0, 1);
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
EnableBothScriptContexts();
|
EnableBothScriptContexts();
|
||||||
}
|
}
|
||||||
|
@ -1707,7 +1707,7 @@ static void sub_8124904(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
@ -1721,7 +1721,7 @@ static void sub_8124904(void)
|
|||||||
sub_8198070(1, FALSE);
|
sub_8198070(1, FALSE);
|
||||||
SetWindowBorderStyle(0, FALSE, 0x65, 0x0d);
|
SetWindowBorderStyle(0, FALSE, 0x65, 0x0d);
|
||||||
}
|
}
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
CopyWindowToVram(0, 2);
|
CopyWindowToVram(0, 2);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
gUnknown_03001180 = FALSE;
|
gUnknown_03001180 = FALSE;
|
||||||
|
@ -387,7 +387,7 @@ void nullsub_89(void)
|
|||||||
|
|
||||||
void sub_80124EC(u8 windowId, u8 arg1, u8 stringId)
|
void sub_80124EC(u8 windowId, u8 arg1, u8 stringId)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(windowId, 0x11);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
|
||||||
switch (arg1 << 8)
|
switch (arg1 << 8)
|
||||||
{
|
{
|
||||||
case 0x200:
|
case 0x200:
|
||||||
@ -786,10 +786,10 @@ void sub_8012780(u8 taskId)
|
|||||||
void sub_8012F64(struct UnkStruct_Leader *data)
|
void sub_8012F64(struct UnkStruct_Leader *data)
|
||||||
{
|
{
|
||||||
ClearWindowTilemap(data->field_11);
|
ClearWindowTilemap(data->field_11);
|
||||||
sub_819746C(data->field_11, FALSE);
|
ClearWindowAndBorder(data->field_11, FALSE);
|
||||||
DestroyListMenuTask(data->listTaskId, 0, 0);
|
DestroyListMenuTask(data->listTaskId, 0, 0);
|
||||||
ClearWindowTilemap(data->field_10);
|
ClearWindowTilemap(data->field_10);
|
||||||
sub_819746C(data->listWindowId, FALSE);
|
ClearWindowAndBorder(data->listWindowId, FALSE);
|
||||||
CopyBgTilemapBufferToVram(0);
|
CopyBgTilemapBufferToVram(0);
|
||||||
RemoveWindow(data->field_11);
|
RemoveWindow(data->field_11);
|
||||||
RemoveWindow(data->listWindowId);
|
RemoveWindow(data->listWindowId);
|
||||||
@ -1254,10 +1254,10 @@ void sub_80134E8(u8 taskId)
|
|||||||
case 18:
|
case 18:
|
||||||
case 20:
|
case 20:
|
||||||
ClearWindowTilemap(data->field_D);
|
ClearWindowTilemap(data->field_D);
|
||||||
sub_819746C(data->field_D, FALSE);
|
ClearWindowAndBorder(data->field_D, FALSE);
|
||||||
DestroyListMenuTask(data->listTaskId, 0, 0);
|
DestroyListMenuTask(data->listTaskId, 0, 0);
|
||||||
ClearWindowTilemap(data->field_C);
|
ClearWindowTilemap(data->field_C);
|
||||||
sub_819746C(data->listWindowId, FALSE);
|
ClearWindowAndBorder(data->listWindowId, FALSE);
|
||||||
CopyBgTilemapBufferToVram(0);
|
CopyBgTilemapBufferToVram(0);
|
||||||
RemoveWindow(data->field_D);
|
RemoveWindow(data->field_D);
|
||||||
RemoveWindow(data->listWindowId);
|
RemoveWindow(data->listWindowId);
|
||||||
@ -2155,7 +2155,7 @@ void sub_8014F48(u8 taskId)
|
|||||||
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
|
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
|
||||||
|
|
||||||
sub_8018784(data->field_D);
|
sub_8018784(data->field_D);
|
||||||
FillWindowPixelBuffer(data->field_D, 0x11);
|
FillWindowPixelBuffer(data->field_D, PIXEL_BUFFER_WHITE);
|
||||||
PutWindowTilemap(data->field_D);
|
PutWindowTilemap(data->field_D);
|
||||||
sub_80125BC(data->field_D);
|
sub_80125BC(data->field_D);
|
||||||
CopyWindowToVram(data->field_D, 2);
|
CopyWindowToVram(data->field_D, 2);
|
||||||
|
@ -1052,7 +1052,7 @@ static void sub_8140914(u8 taskId)
|
|||||||
|
|
||||||
static void sub_8140968(u8 taskId)
|
static void sub_8140968(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_819746C(0, TRUE);
|
ClearWindowAndBorder(0, TRUE);
|
||||||
gTasks[taskId].func = sub_8140BD0;
|
gTasks[taskId].func = sub_8140BD0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3272,7 +3272,7 @@ static void sub_81428E4(u8 taskId)
|
|||||||
|
|
||||||
static void sub_8142918(u8 taskId)
|
static void sub_8142918(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_819746C(0, TRUE);
|
ClearWindowAndBorder(0, TRUE);
|
||||||
HideCoinsWindow();
|
HideCoinsWindow();
|
||||||
FreeAllWindowBuffers();
|
FreeAllWindowBuffers();
|
||||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||||
@ -3283,7 +3283,7 @@ static void sub_8142918(u8 taskId)
|
|||||||
|
|
||||||
static void sub_814297C(u8 taskId)
|
static void sub_814297C(u8 taskId)
|
||||||
{
|
{
|
||||||
sub_819746C(0, FALSE);
|
ClearWindowAndBorder(0, FALSE);
|
||||||
HideCoinsWindow();
|
HideCoinsWindow();
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
@ -3296,7 +3296,7 @@ static void sub_81429A0(u8 taskId)
|
|||||||
{
|
{
|
||||||
gSpecialVar_0x8004 = 1;
|
gSpecialVar_0x8004 = 1;
|
||||||
HideCoinsWindow();
|
HideCoinsWindow();
|
||||||
sub_819746C(0, TRUE);
|
ClearWindowAndBorder(0, TRUE);
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
}
|
}
|
||||||
|
@ -231,8 +231,8 @@ static void CB2_SaveFailedScreen(void)
|
|||||||
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
|
||||||
SetWindowBorderStyle(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE);
|
SetWindowBorderStyle(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE);
|
||||||
SetWindowBorderStyle(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE);
|
SetWindowBorderStyle(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE);
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], 0x11); // backwards?
|
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], PIXEL_BUFFER_WHITE); // backwards?
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
|
||||||
CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again?
|
CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again?
|
||||||
CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1);
|
CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1);
|
||||||
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
|
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
|
||||||
@ -265,19 +265,19 @@ static void CB2_WipeSave(void)
|
|||||||
{
|
{
|
||||||
if (WipeSectors(gDamagedSaveSectors) != FALSE)
|
if (WipeSectors(gDamagedSaveSectors) != FALSE)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
|
||||||
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
|
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
|
||||||
SetMainCallback2(CB2_GameplayCannotBeContinued);
|
SetMainCallback2(CB2_GameplayCannotBeContinued);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
|
||||||
SaveFailedScreenTextPrint(gText_CheckCompleted, 1, 0);
|
SaveFailedScreenTextPrint(gText_CheckCompleted, 1, 0);
|
||||||
HandleSavingData(gSaveFailedType);
|
HandleSavingData(gSaveFailedType);
|
||||||
|
|
||||||
if (gDamagedSaveSectors != 0)
|
if (gDamagedSaveSectors != 0)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
|
||||||
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
|
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,12 +286,12 @@ static void CB2_WipeSave(void)
|
|||||||
|
|
||||||
if (wipeTries == 3)
|
if (wipeTries == 3)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
|
||||||
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
|
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
|
||||||
|
|
||||||
if (gGameContinueCallback == NULL)
|
if (gGameContinueCallback == NULL)
|
||||||
SaveFailedScreenTextPrint(gText_SaveCompleteGameCannotContinue, 1, 0);
|
SaveFailedScreenTextPrint(gText_SaveCompleteGameCannotContinue, 1, 0);
|
||||||
@ -308,7 +308,7 @@ static void CB2_GameplayCannotBeContinued(void)
|
|||||||
|
|
||||||
if (gMain.newKeys & A_BUTTON)
|
if (gMain.newKeys & A_BUTTON)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
|
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
|
||||||
SaveFailedScreenTextPrint(gText_GamePlayCannotBeContinued, 1, 0);
|
SaveFailedScreenTextPrint(gText_GamePlayCannotBeContinued, 1, 0);
|
||||||
SetVBlankCallback(VBlankCB);
|
SetVBlankCallback(VBlankCB);
|
||||||
SetMainCallback2(CB2_FadeAndReturnToTitleScreen);
|
SetMainCallback2(CB2_FadeAndReturnToTitleScreen);
|
||||||
|
@ -1519,7 +1519,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
|||||||
LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0);
|
LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0);
|
||||||
NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0);
|
NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0);
|
||||||
PutWindowTilemap(gUnknown_03000F30);
|
PutWindowTilemap(gUnknown_03000F30);
|
||||||
FillWindowPixelBuffer(gUnknown_03000F30, 0x11);
|
FillWindowPixelBuffer(gUnknown_03000F30, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0);
|
AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0);
|
||||||
CopyWindowToVram(gUnknown_03000F30, 3);
|
CopyWindowToVram(gUnknown_03000F30, 3);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -2254,7 +2254,7 @@ bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx)
|
|||||||
|
|
||||||
void sub_809BDB4(void)
|
void sub_809BDB4(void)
|
||||||
{
|
{
|
||||||
sub_819746C(gUnknown_03000F30, 1);
|
ClearWindowAndBorder(gUnknown_03000F30, 1);
|
||||||
RemoveWindow(gUnknown_03000F30);
|
RemoveWindow(gUnknown_03000F30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1639,27 +1639,27 @@ static void sub_80E2A94(u8 multichoiceId)
|
|||||||
switch (multichoiceId)
|
switch (multichoiceId)
|
||||||
{
|
{
|
||||||
case 77:
|
case 77:
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||||
break;
|
break;
|
||||||
case 76:
|
case 76:
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||||
break;
|
break;
|
||||||
case 78:
|
case 78:
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||||
break;
|
break;
|
||||||
case 79:
|
case 79:
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||||
break;
|
break;
|
||||||
case 75:
|
case 75:
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||||
break;
|
break;
|
||||||
case 74:
|
case 74:
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -871,7 +871,7 @@ void sub_80E9C9C(u8 taskId)
|
|||||||
{
|
{
|
||||||
data[1] = 0;
|
data[1] = 0;
|
||||||
data[2] = 0;
|
data[2] = 0;
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
gUnknown_0203A020 = calloc(1, sizeof(struct SecretBaseListMenuBuffer));
|
gUnknown_0203A020 = calloc(1, sizeof(struct SecretBaseListMenuBuffer));
|
||||||
data[6] = AddWindow(&gUnknown_0858D06C[0]);
|
data[6] = AddWindow(&gUnknown_0858D06C[0]);
|
||||||
game_continue(taskId);
|
game_continue(taskId);
|
||||||
@ -963,7 +963,7 @@ void sub_80E9E90(u8 taskId)
|
|||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
DestroyListMenuTask(data[5], NULL, NULL);
|
DestroyListMenuTask(data[5], NULL, NULL);
|
||||||
RemoveScrollIndicatorArrowPair(data[8]);
|
RemoveScrollIndicatorArrowPair(data[8]);
|
||||||
sub_819746C(data[6], 0);
|
ClearWindowAndBorder(data[6], 0);
|
||||||
ClearWindowTilemap(data[6]);
|
ClearWindowTilemap(data[6]);
|
||||||
RemoveWindow(data[6]);
|
RemoveWindow(data[6]);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
@ -1020,8 +1020,8 @@ void sub_80E9FFC(u8 taskId)
|
|||||||
s16 *data;
|
s16 *data;
|
||||||
|
|
||||||
data = gTasks[taskId].data;
|
data = gTasks[taskId].data;
|
||||||
sub_819746C(data[6], FALSE);
|
ClearWindowAndBorder(data[6], FALSE);
|
||||||
sub_819746C(data[7], FALSE);
|
ClearWindowAndBorder(data[7], FALSE);
|
||||||
ClearWindowTilemap(data[6]);
|
ClearWindowTilemap(data[6]);
|
||||||
ClearWindowTilemap(data[7]);
|
ClearWindowTilemap(data[7]);
|
||||||
RemoveWindow(data[7]);
|
RemoveWindow(data[7]);
|
||||||
@ -1042,7 +1042,7 @@ void sub_80EA08C(u8 taskId)
|
|||||||
s16 *data;
|
s16 *data;
|
||||||
|
|
||||||
data = gTasks[taskId].data;
|
data = gTasks[taskId].data;
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
DestroyListMenuTask(data[5], &data[2], &data[1]);
|
DestroyListMenuTask(data[5], &data[2], &data[1]);
|
||||||
gSaveBlock1Ptr->secretBases[data[4]].sbr_field_1_6 = 0;
|
gSaveBlock1Ptr->secretBases[data[4]].sbr_field_1_6 = 0;
|
||||||
game_continue(taskId);
|
game_continue(taskId);
|
||||||
@ -1061,7 +1061,7 @@ void sub_80EA13C(u8 taskId)
|
|||||||
s16 *data;
|
s16 *data;
|
||||||
|
|
||||||
data = gTasks[taskId].data;
|
data = gTasks[taskId].data;
|
||||||
sub_8197434(0, 0);
|
ClearWindowAndWideBorder(0, 0);
|
||||||
DestroyListMenuTask(data[5], &data[2], &data[1]);
|
DestroyListMenuTask(data[5], &data[2], &data[1]);
|
||||||
sub_80E9E00(taskId);
|
sub_80E9E00(taskId);
|
||||||
gTasks[taskId].func = sub_80E9E90;
|
gTasks[taskId].func = sub_80E9E90;
|
||||||
@ -1073,7 +1073,7 @@ void sub_80EA18C(u8 taskId)
|
|||||||
|
|
||||||
data = gTasks[taskId].data;
|
data = gTasks[taskId].data;
|
||||||
sub_80E9E44(taskId);
|
sub_80E9E44(taskId);
|
||||||
sub_819746C(data[7], 0);
|
ClearWindowAndBorder(data[7], 0);
|
||||||
ClearWindowTilemap(data[7]);
|
ClearWindowTilemap(data[7]);
|
||||||
RemoveWindow(data[7]);
|
RemoveWindow(data[7]);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
|
@ -545,7 +545,7 @@ static void BuyMenuPrintItemDescriptionAndShowItemIcon(int item, bool8 onInit, s
|
|||||||
description = gText_QuitShopping;
|
description = gText_QuitShopping;
|
||||||
}
|
}
|
||||||
|
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
BuyMenuPrint(2, description, 3, 1, 0, 0);
|
BuyMenuPrint(2, description, 3, 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1144,7 +1144,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
|
|||||||
{
|
{
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
|
||||||
FillWindowPixelBuffer(4, 0x11);
|
FillWindowPixelBuffer(4, PIXEL_BUFFER_WHITE);
|
||||||
PrintMoneyAmount(4, 38, 1, gShopDataPtr->totalCost, TEXT_SPEED_FF);
|
PrintMoneyAmount(4, 38, 1, gShopDataPtr->totalCost, TEXT_SPEED_FF);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, tItemCount, 2, 2);
|
ConvertIntToDecimalStringN(gStringVar1, tItemCount, 2, 2);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
|
@ -1026,7 +1026,7 @@ void PlaySlotMachine(u8 arg0, MainCallback cb)
|
|||||||
{
|
{
|
||||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
sSlotMachine->state = 5;
|
sSlotMachine->state = 5;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1269,7 +1269,7 @@ void PlaySlotMachine(u8 arg0, MainCallback cb)
|
|||||||
s8 input = Menu_ProcessInputNoWrapClearOnChoose();
|
s8 input = Menu_ProcessInputNoWrapClearOnChoose();
|
||||||
if (input == 0)
|
if (input == 0)
|
||||||
{
|
{
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
sub_8103D8C(0);
|
sub_8103D8C(0);
|
||||||
sub_8103D8C(1);
|
sub_8103D8C(1);
|
||||||
sub_8103D8C(2);
|
sub_8103D8C(2);
|
||||||
@ -1278,7 +1278,7 @@ void PlaySlotMachine(u8 arg0, MainCallback cb)
|
|||||||
}
|
}
|
||||||
else if (input == 1 || input == -1)
|
else if (input == 1 || input == -1)
|
||||||
{
|
{
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
sSlotMachine->state = 5;
|
sSlotMachine->state = 5;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1297,7 +1297,7 @@ void PlaySlotMachine(u8 arg0, MainCallback cb)
|
|||||||
{
|
{
|
||||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
sSlotMachine->state = 5;
|
sSlotMachine->state = 5;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1316,7 +1316,7 @@ void PlaySlotMachine(u8 arg0, MainCallback cb)
|
|||||||
{
|
{
|
||||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
sSlotMachine->state = 27;
|
sSlotMachine->state = 27;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -3036,7 +3036,7 @@ s16 sub_8102D5C(s16 a0)
|
|||||||
sub_81065DC();
|
sub_81065DC();
|
||||||
AddWindow(&gUnknown_085A7444);
|
AddWindow(&gUnknown_085A7444);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
task->data[0]++;
|
task->data[0]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3052,7 +3052,7 @@ s16 sub_8102D5C(s16 a0)
|
|||||||
{
|
{
|
||||||
if (gMain.newKeys & (B_BUTTON | SELECT_BUTTON))
|
if (gMain.newKeys & (B_BUTTON | SELECT_BUTTON))
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
ClearWindowTilemap(1);
|
ClearWindowTilemap(1);
|
||||||
CopyWindowToVram(1, 1);
|
CopyWindowToVram(1, 1);
|
||||||
RemoveWindow(1);
|
RemoveWindow(1);
|
||||||
|
@ -897,7 +897,7 @@ static void SaveGameTask(u8 taskId)
|
|||||||
|
|
||||||
static void sub_80A0014(void)
|
static void sub_80A0014(void)
|
||||||
{
|
{
|
||||||
sub_8197434(0, TRUE);
|
ClearWindowAndWideBorder(0, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HideSaveInfoWindow(void)
|
static void HideSaveInfoWindow(void)
|
||||||
@ -943,7 +943,7 @@ static bool8 SaveErrorTimer(void)
|
|||||||
|
|
||||||
static u8 SaveConfirmSaveCallback(void)
|
static u8 SaveConfirmSaveCallback(void)
|
||||||
{
|
{
|
||||||
sub_819746C(GetStartMenuWindowId(), FALSE);
|
ClearWindowAndBorder(GetStartMenuWindowId(), FALSE);
|
||||||
RemoveStartMenuWindow();
|
RemoveStartMenuWindow();
|
||||||
ShowSaveInfoWindow();
|
ShowSaveInfoWindow();
|
||||||
|
|
||||||
@ -1135,7 +1135,7 @@ static void InitBattlePyramidRetire(void)
|
|||||||
|
|
||||||
static u8 BattlePyramidConfirmRetireCallback(void)
|
static u8 BattlePyramidConfirmRetireCallback(void)
|
||||||
{
|
{
|
||||||
sub_819746C(GetStartMenuWindowId(), FALSE);
|
ClearWindowAndBorder(GetStartMenuWindowId(), FALSE);
|
||||||
RemoveStartMenuWindow();
|
RemoveStartMenuWindow();
|
||||||
ShowSaveMessage(gText_BattlePyramidConfirmRetire, BattlePyramidRetireYesNoCallback);
|
ShowSaveMessage(gText_BattlePyramidConfirmRetire, BattlePyramidRetireYesNoCallback);
|
||||||
|
|
||||||
@ -1232,7 +1232,7 @@ static void sub_80A0550(u8 taskId)
|
|||||||
switch (*step)
|
switch (*step)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
FillWindowPixelBuffer(0, 17);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized2(0,
|
AddTextPrinterParameterized2(0,
|
||||||
1,
|
1,
|
||||||
gText_SavingDontTurnOffPower,
|
gText_SavingDontTurnOffPower,
|
||||||
@ -1364,7 +1364,7 @@ static void ShowSaveInfoWindow(void)
|
|||||||
|
|
||||||
static void RemoveSaveInfoWindow(void)
|
static void RemoveSaveInfoWindow(void)
|
||||||
{
|
{
|
||||||
sub_819746C(sSaveInfoWindowId, FALSE);
|
ClearWindowAndBorder(sSaveInfoWindowId, FALSE);
|
||||||
RemoveWindow(sSaveInfoWindowId);
|
RemoveWindow(sSaveInfoWindowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1386,7 +1386,7 @@ void sub_80A08CC(void) // Referenced in data/specials.inc and data/scripts/maps/
|
|||||||
|
|
||||||
static void HideStartMenuWindow(void)
|
static void HideStartMenuWindow(void)
|
||||||
{
|
{
|
||||||
sub_819746C(GetStartMenuWindowId(), TRUE);
|
ClearWindowAndBorder(GetStartMenuWindowId(), TRUE);
|
||||||
RemoveStartMenuWindow();
|
RemoveStartMenuWindow();
|
||||||
ScriptUnfreezeEventObjects();
|
ScriptUnfreezeEventObjects();
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
|
@ -523,7 +523,7 @@ static void Task_StarterChoose3(u8 taskId)
|
|||||||
static void Task_StarterChoose4(u8 taskId)
|
static void Task_StarterChoose4(u8 taskId)
|
||||||
{
|
{
|
||||||
PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0);
|
PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0);
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
CreateYesNoMenu(&gUnknown_085B1DDC, 0x2A8, 0xD, 0);
|
CreateYesNoMenu(&gUnknown_085B1DDC, 0x2A8, 0xD, 0);
|
||||||
@ -579,7 +579,7 @@ static void CreateStarterPokemonLabel(u8 selection)
|
|||||||
winTemplate.tilemapTop = gStarterChoose_LabelCoords[selection][1];
|
winTemplate.tilemapTop = gStarterChoose_LabelCoords[selection][1];
|
||||||
|
|
||||||
sStarterChooseWindowId = AddWindow(&winTemplate);
|
sStarterChooseWindowId = AddWindow(&winTemplate);
|
||||||
FillWindowPixelBuffer(sStarterChooseWindowId, 0);
|
FillWindowPixelBuffer(sStarterChooseWindowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
|
|
||||||
width = GetStringCenterAlignXOffset(7, text, 0x68);
|
width = GetStringCenterAlignXOffset(7, text, 0x68);
|
||||||
AddTextPrinterParameterized3(sStarterChooseWindowId, 7, width, 1, gUnknown_085B1E0C, 0, text);
|
AddTextPrinterParameterized3(sStarterChooseWindowId, 7, width, 1, gUnknown_085B1E0C, 0, text);
|
||||||
@ -600,7 +600,7 @@ static void CreateStarterPokemonLabel(u8 selection)
|
|||||||
|
|
||||||
static void sub_8134604(void)
|
static void sub_8134604(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(sStarterChooseWindowId, 0);
|
FillWindowPixelBuffer(sStarterChooseWindowId, PIXEL_BUFFER_TRANSPARENT);
|
||||||
ClearWindowTilemap(sStarterChooseWindowId);
|
ClearWindowTilemap(sStarterChooseWindowId);
|
||||||
RemoveWindow(sStarterChooseWindowId);
|
RemoveWindow(sStarterChooseWindowId);
|
||||||
sStarterChooseWindowId = 0xFF;
|
sStarterChooseWindowId = 0xFF;
|
||||||
|
18
src/trade.c
18
src/trade.c
@ -1418,7 +1418,7 @@ static void sub_80772A4(void)
|
|||||||
for (i = 0; i < 18; i++)
|
for (i = 0; i < 18; i++)
|
||||||
{
|
{
|
||||||
ClearWindowTilemap(i);
|
ClearWindowTilemap(i);
|
||||||
FillWindowPixelBuffer(i, 0);
|
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
FillBgTilemapBufferRect(0, 0, 0, 0, 30, 20, 15);
|
FillBgTilemapBufferRect(0, 0, 0, 0, 30, 20, 15);
|
||||||
@ -2461,7 +2461,7 @@ static void sub_8078DBC(void)
|
|||||||
if (gUnknown_0203229C->tradeMenuCursorPosition < 6)
|
if (gUnknown_0203229C->tradeMenuCursorPosition < 6)
|
||||||
{
|
{
|
||||||
sub_8098858(1, 1, 14);
|
sub_8098858(1, 1, 14);
|
||||||
FillWindowPixelBuffer(1, 0x11);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_WHITE);
|
||||||
PrintMenuTable(1, 2, gUnknown_0832DEAC);
|
PrintMenuTable(1, 2, gUnknown_0832DEAC);
|
||||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
|
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
@ -2724,7 +2724,7 @@ static void sub_8079408(void)
|
|||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(i + 14, 0);
|
FillWindowPixelBuffer(i + 14, PIXEL_BUFFER_TRANSPARENT);
|
||||||
rbox_fill_rectangle(i + 14);
|
rbox_fill_rectangle(i + 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3256,7 +3256,7 @@ static void sub_807A0C4(void)
|
|||||||
|
|
||||||
static void sub_807A19C(u8 a0)
|
static void sub_807A19C(u8 a0)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
|
||||||
AddTextPrinterParameterized(0, 1, gUnknown_0832DEBC[a0], 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, 1, gUnknown_0832DEBC[a0], 0, 1, TEXT_SPEED_FF, NULL);
|
||||||
sub_8098858(0, 20, 12);
|
sub_8098858(0, 20, 12);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
@ -4185,7 +4185,7 @@ void sub_807B140(void)
|
|||||||
|
|
||||||
void sub_807B154(void)
|
void sub_807B154(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0xFF);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_UNKNOWN);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
}
|
}
|
||||||
@ -4263,7 +4263,7 @@ static void sub_807B270(void)
|
|||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
sub_807ACFC(1, 1);
|
sub_807ACFC(1, 1);
|
||||||
FillWindowPixelBuffer(0, 0xFF);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_UNKNOWN);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
@ -4654,7 +4654,7 @@ static bool8 sub_807BBEC(void)
|
|||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
sub_807B62C(4);
|
sub_807B62C(4);
|
||||||
FillWindowPixelBuffer(0, 0xFF);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_UNKNOWN);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
gUnknown_020322A0->state++;
|
gUnknown_020322A0->state++;
|
||||||
}
|
}
|
||||||
@ -5146,7 +5146,7 @@ static bool8 sub_807CFC8(void)
|
|||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
sub_807B62C(4);
|
sub_807B62C(4);
|
||||||
FillWindowPixelBuffer(0, 0xFF);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_UNKNOWN);
|
||||||
CopyWindowToVram(0, 3);
|
CopyWindowToVram(0, 3);
|
||||||
gUnknown_020322A0->state++;
|
gUnknown_020322A0->state++;
|
||||||
}
|
}
|
||||||
@ -6085,7 +6085,7 @@ void sub_807F19C(void)
|
|||||||
|
|
||||||
void sub_807F1A8(u8 windowId, const u8 *str, u8 speed)
|
void sub_807F1A8(u8 windowId, const u8 *str, u8 speed)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(windowId, 0xFF);
|
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_UNKNOWN);
|
||||||
gUnknown_020322A0->unk_F6[0] = 15;
|
gUnknown_020322A0->unk_F6[0] = 15;
|
||||||
gUnknown_020322A0->unk_F6[1] = 1;
|
gUnknown_020322A0->unk_F6[1] = 1;
|
||||||
gUnknown_020322A0->unk_F6[2] = 6;
|
gUnknown_020322A0->unk_F6[2] = 6;
|
||||||
|
@ -350,7 +350,7 @@ static void sub_80C2760(u8 taskId)
|
|||||||
case 0:
|
case 0:
|
||||||
if (!IsDma3ManagerBusyWithBgCopy())
|
if (!IsDma3ManagerBusyWithBgCopy())
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
sData->var_0++;
|
sData->var_0++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -363,7 +363,7 @@ static void sub_80C2760(u8 taskId)
|
|||||||
sData->var_0++;
|
sData->var_0++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
sub_80C4FF0();
|
sub_80C4FF0();
|
||||||
sub_80C438C(2);
|
sub_80C438C(2);
|
||||||
sData->var_0++;
|
sData->var_0++;
|
||||||
@ -1634,7 +1634,7 @@ static bool8 sub_80C4B08(struct Task* task)
|
|||||||
switch (sData->var_4)
|
switch (sData->var_4)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
FillWindowPixelBuffer(1, 0);
|
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
|
||||||
FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 0x20, 0x20);
|
FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 0x20, 0x20);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -1659,7 +1659,7 @@ static bool8 sub_80C4B08(struct Task* task)
|
|||||||
if (!sData->var_8)
|
if (!sData->var_8)
|
||||||
sub_80C474C();
|
sub_80C474C();
|
||||||
else
|
else
|
||||||
FillWindowPixelBuffer(2, 0);
|
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (sData->var_8)
|
if (sData->var_8)
|
||||||
|
@ -609,7 +609,7 @@ void PrintOnTrainerHillRecordsWindow(void)
|
|||||||
u32 total, minutes, secondsWhole, secondsFraction;
|
u32 total, minutes, secondsWhole, secondsFraction;
|
||||||
|
|
||||||
SetUpDataStruct();
|
SetUpDataStruct();
|
||||||
FillWindowPixelBuffer(0, 0);
|
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
|
||||||
x = GetStringCenterAlignXOffset(1, gText_TimeBoard, 0xD0);
|
x = GetStringCenterAlignXOffset(1, gText_TimeBoard, 0xD0);
|
||||||
AddTextPrinterParameterized3(0, 1, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard);
|
AddTextPrinterParameterized3(0, 1, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
u32 filler_03002F58;
|
u32 filler_03002F58;
|
||||||
u32 filler_03002F5C;
|
u32 filler_03002F5C;
|
||||||
u8 gUnknown_03002F60;
|
u8 gTransparentTileNumber;
|
||||||
u32 filler_03002F64;
|
u32 filler_03002F64;
|
||||||
void *gUnknown_03002F70[4];
|
void *gUnknown_03002F70[4];
|
||||||
extern u32 gUnneededFireRedVariable;
|
extern u32 gUnneededFireRedVariable;
|
||||||
@ -106,7 +106,7 @@ bool16 InitWindows(const struct WindowTemplate *templates)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gUnknown_03002F60 = 0;
|
gTransparentTileNumber = TRANSPARENT_TILE_NUMBER;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,13 +359,14 @@ void PutWindowRectTilemapOverridePalette(u8 windowId, u8 x, u8 y, u8 width, u8 h
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fills a window with transparent tiles.
|
||||||
void ClearWindowTilemap(u8 windowId)
|
void ClearWindowTilemap(u8 windowId)
|
||||||
{
|
{
|
||||||
struct Window windowLocal = gWindows[windowId];
|
struct Window windowLocal = gWindows[windowId];
|
||||||
|
|
||||||
FillBgTilemapBufferRect(
|
FillBgTilemapBufferRect(
|
||||||
windowLocal.window.bg,
|
windowLocal.window.bg,
|
||||||
gUnknown_03002F60,
|
gTransparentTileNumber,
|
||||||
windowLocal.window.tilemapLeft,
|
windowLocal.window.tilemapLeft,
|
||||||
windowLocal.window.tilemapTop,
|
windowLocal.window.tilemapTop,
|
||||||
windowLocal.window.width,
|
windowLocal.window.width,
|
||||||
@ -451,6 +452,7 @@ void CopyToWindowPixelBuffer(u8 windowId, const void *src, u16 size, u16 tileOff
|
|||||||
LZ77UnCompWram(src, gWindows[windowId].tileData + (0x20 * tileOffset));
|
LZ77UnCompWram(src, gWindows[windowId].tileData + (0x20 * tileOffset));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets all pixels within the window to the fillValue color.
|
||||||
void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
|
void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
|
||||||
{
|
{
|
||||||
int fillSize = gWindows[windowId].window.width * gWindows[windowId].window.height;
|
int fillSize = gWindows[windowId].window.width * gWindows[windowId].window.height;
|
||||||
|
Loading…
Reference in New Issue
Block a user