Standartize AddTextPrinterParametrized functions,
This commit is contained in:
+294
-21
@@ -90,6 +90,12 @@ struct FactorySelectMonsStruct
|
||||
|
||||
// 'Action' refers to the Cancel, Pknm for swap windows.
|
||||
|
||||
struct UnkField18Struct
|
||||
{
|
||||
u8 unk0;
|
||||
u8 unk1[7];
|
||||
};
|
||||
|
||||
struct FactorySwapMonsStruct
|
||||
{
|
||||
u8 menuCursorPos;
|
||||
@@ -105,11 +111,8 @@ struct FactorySwapMonsStruct
|
||||
u8 actionsState;
|
||||
bool8 fromSummaryScreen;
|
||||
u8 yesNoCursorPos;
|
||||
u8 unk17;
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
u8 unk1A;
|
||||
u8 unk1B;
|
||||
u8 actionsCount;
|
||||
struct UnkField18Struct *unk18;
|
||||
u8 unk1C;
|
||||
u8 unk1D;
|
||||
u8 unk1E;
|
||||
@@ -174,8 +177,9 @@ static u8 Select_OptionRentDeselect(void);
|
||||
u8 sub_81A6F70(u8 battleMode, u8 lvlMode);
|
||||
u8 sub_81A6CA8(u8 arg0, u8 arg1);
|
||||
static bool32 Select_AreSpeciesValid(u16 monSetId);
|
||||
void sub_819E538(void);
|
||||
void sub_819E9E0(void);
|
||||
void Swap_DestroyAllSprites(void);
|
||||
void Swap_ShowYesNoOptions(void);
|
||||
void sub_819E8EC(void);
|
||||
void sub_819EAC0(void);
|
||||
void Swap_UpdateYesNoCursorPosition(s8 direction);
|
||||
void Swap_UpdateMenuCursorPosition(s8 direction);
|
||||
@@ -185,6 +189,8 @@ void Task_HandleSwapScreenChooseMons(u8 taskId);
|
||||
void sub_819D588(u8 taskId);
|
||||
void Swap_PrintOnInfoWindow(const u8 *str);
|
||||
void Swap_ShowMenuOptions(void);
|
||||
void Swap_PrintMenuOptions(void);
|
||||
void Swap_PrintYesNoOptions(void);
|
||||
void Swap_PrintMonSpecies(void);
|
||||
void Swap_PrintMonSpecies2(void);
|
||||
void Swap_PrintMonSpecies3(void);
|
||||
@@ -201,19 +207,20 @@ void Swap_RunMenuOptionFunc(u8 taskId);
|
||||
void sub_819F184(u8 taskId);
|
||||
void Swap_PrintActionStrings(void);
|
||||
void Swap_PrintActionStrings2(void);
|
||||
void Swap_PrintActionStrings3(u8 field);
|
||||
void sub_819F048(u8 field);
|
||||
void Swap_PrintActionStrings3(u8 arg0);
|
||||
void sub_819F048(u8 arg0);
|
||||
void sub_819E838(u8 arg0);
|
||||
|
||||
// Ewram variables
|
||||
EWRAM_DATA u8 *gUnknown_0203CE2C = NULL;
|
||||
EWRAM_DATA u8 *gUnknown_0203CE30 = NULL;
|
||||
EWRAM_DATA u8 *gUnknown_0203CE34 = NULL;
|
||||
EWRAM_DATA u8 *gUnknown_0203CE38 = NULL;
|
||||
static EWRAM_DATA struct Pokemon *sFactorySelectMons = NULL;
|
||||
extern u8 *gUnknown_0203CE40;
|
||||
extern u8 *gUnknown_0203CE44;
|
||||
extern u8 *gUnknown_0203CE48;
|
||||
extern u8 *gUnknown_0203CE4C;
|
||||
EWRAM_DATA struct Pokemon *sFactorySelectMons = NULL;
|
||||
EWRAM_DATA u8 *gUnknown_0203CE40 = NULL;
|
||||
EWRAM_DATA u8 *gUnknown_0203CE44 = NULL;
|
||||
EWRAM_DATA u8 *gUnknown_0203CE48 = NULL;
|
||||
EWRAM_DATA u8 *gUnknown_0203CE4C = NULL;
|
||||
|
||||
// IWRAM bss
|
||||
IWRAM_DATA struct FactorySelectMonsStruct *sFactorySelectScreen;
|
||||
@@ -281,6 +288,7 @@ extern const struct SpriteTemplate gUnknown_08610608;
|
||||
extern const struct SpriteTemplate gUnknown_08610620;
|
||||
extern const struct SpriteTemplate gUnknown_08610638;
|
||||
extern const u8 gUnknown_08610479[];
|
||||
extern const u8 gUnknown_08610925[];
|
||||
extern const u8 gUnknown_08610476[];
|
||||
extern const struct SpritePalette gUnknown_086106B0[];
|
||||
extern const struct SpriteSheet gUnknown_08610650[];
|
||||
@@ -308,6 +316,7 @@ extern const u8 gText_QuitSwapping[];
|
||||
extern const u8 gText_AcceptThisPkmn[];
|
||||
extern const u8 gText_SelectPkmnToAccept[];
|
||||
extern const u8 gText_SelectPkmnToSwap[];
|
||||
extern const u8 gText_PkmnSwap[];
|
||||
|
||||
// code
|
||||
void sub_819A44C(struct Sprite *sprite)
|
||||
@@ -1066,7 +1075,7 @@ static void sub_819B958(u8 windowId)
|
||||
static void Select_PrintRentalPkmnString(void)
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0);
|
||||
PrintTextOnWindow(0, 1, gText_RentalPkmn2, 2, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, 1, gText_RentalPkmn2, 2, 1, 0, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
@@ -1098,14 +1107,14 @@ static void Select_PrintSelectMonString(void)
|
||||
else
|
||||
str = gText_TheseThreePkmnOkay;
|
||||
|
||||
PrintTextOnWindow(2, 1, str, 2, 5, 0, NULL);
|
||||
AddTextPrinterParameterized(2, 1, str, 2, 5, 0, NULL);
|
||||
CopyWindowToVram(2, 2);
|
||||
}
|
||||
|
||||
static void Select_PrintCantSelectSameMon(void)
|
||||
{
|
||||
FillWindowPixelBuffer(2, 0);
|
||||
PrintTextOnWindow(2, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL);
|
||||
AddTextPrinterParameterized(2, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL);
|
||||
CopyWindowToVram(2, 2);
|
||||
}
|
||||
|
||||
@@ -1200,7 +1209,7 @@ static void Select_PrintMonCategory(void)
|
||||
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
|
||||
CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text);
|
||||
x = GetStringRightAlignXOffset(1, text, 0x76);
|
||||
PrintTextOnWindow(5, 1, text, x, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(5, 1, text, x, 1, 0, NULL);
|
||||
CopyWindowToVram(5, 2);
|
||||
}
|
||||
}
|
||||
@@ -1554,7 +1563,7 @@ void sub_819C90C(u8 taskId) // Task_FromSelectScreenToSummaryScreen
|
||||
{
|
||||
DestroyTask(sFactorySwapScreen->palBlendTaskId);
|
||||
sub_819F444(sFactorySwapScreen->unk2C, &sFactorySwapScreen->unk30);
|
||||
sub_819E538();
|
||||
Swap_DestroyAllSprites();
|
||||
FREE_AND_SET_NULL(gUnknown_0203CE40);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CE44);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CE48);
|
||||
@@ -1606,7 +1615,7 @@ void sub_819CA08(u8 taskId) // Task_CloseSelectionScreen
|
||||
if (!UpdatePaletteFade())
|
||||
{
|
||||
DestroyTask(sFactorySwapScreen->palBlendTaskId);
|
||||
sub_819E538();
|
||||
Swap_DestroyAllSprites();
|
||||
FREE_AND_SET_NULL(gUnknown_0203CE40);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CE44);
|
||||
FREE_AND_SET_NULL(gUnknown_0203CE48);
|
||||
@@ -1630,7 +1639,7 @@ void Task_HandleSwapScreenYesNo(u8 taskId)
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 4:
|
||||
sub_819E9E0();
|
||||
Swap_ShowYesNoOptions();
|
||||
gTasks[taskId].data[0] = 5;
|
||||
break;
|
||||
case 5:
|
||||
@@ -2623,3 +2632,267 @@ void Swap_InitAllSprites(void)
|
||||
gSprites[sFactorySwapScreen->unk8[0][1]].invisible = 0;
|
||||
gSprites[sFactorySwapScreen->unk8[0][2]].invisible = 0;
|
||||
}
|
||||
|
||||
void Swap_DestroyAllSprites(void)
|
||||
{
|
||||
u8 i, j;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
DestroySprite(&gSprites[sFactorySwapScreen->ballSpriteIds[i]]);
|
||||
DestroySprite(&gSprites[sFactorySwapScreen->cursorSpriteId]);
|
||||
DestroySprite(&gSprites[sFactorySwapScreen->menuCursor1SpriteId]);
|
||||
DestroySprite(&gSprites[sFactorySwapScreen->menuCursor2SpriteId]);
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
for (j = 0; j < 3; j++)
|
||||
DestroySprite(&gSprites[sFactorySwapScreen->unk8[i][j]]);
|
||||
}
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
for (j = 0; j < 2; j++)
|
||||
DestroySprite(&gSprites[sFactorySwapScreen->unkE[i][j]]);
|
||||
}
|
||||
}
|
||||
|
||||
void Swap_HandleActionCursorChange(u8 cursorId)
|
||||
{
|
||||
if (cursorId < 3)
|
||||
{
|
||||
gSprites[sFactorySwapScreen->cursorSpriteId].invisible = 0;
|
||||
sub_819E8EC();
|
||||
gSprites[sFactorySwapScreen->cursorSpriteId].pos1.x = gSprites[sFactorySwapScreen->ballSpriteIds[cursorId]].pos1.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSprites[sFactorySwapScreen->cursorSpriteId].invisible = 1;
|
||||
sub_819E838(sFactorySwapScreen->unk18[cursorId].unk0);
|
||||
}
|
||||
}
|
||||
|
||||
void Swap_UpdateBallCursorPosition(s8 direction)
|
||||
{
|
||||
u8 cursorPos;
|
||||
PlaySE(SE_SELECT);
|
||||
if (direction > 0) // Move cursor right.
|
||||
{
|
||||
if (sFactorySwapScreen->cursorPos + 1 != sFactorySwapScreen->actionsCount)
|
||||
sFactorySwapScreen->cursorPos++;
|
||||
else
|
||||
sFactorySwapScreen->cursorPos = 0;
|
||||
}
|
||||
else // Move cursor left.
|
||||
{
|
||||
if (sFactorySwapScreen->cursorPos != 0)
|
||||
sFactorySwapScreen->cursorPos--;
|
||||
else
|
||||
sFactorySwapScreen->cursorPos = sFactorySwapScreen->actionsCount - 1;
|
||||
}
|
||||
|
||||
cursorPos = sFactorySwapScreen->cursorPos;
|
||||
Swap_HandleActionCursorChange(cursorPos);
|
||||
}
|
||||
|
||||
void Swap_UpdateActionCursorPosition(s8 direction)
|
||||
{
|
||||
u8 cursorPos;
|
||||
PlaySE(SE_SELECT);
|
||||
if (direction > 0) // Move cursor down.
|
||||
{
|
||||
if (sFactorySwapScreen->cursorPos < 3)
|
||||
sFactorySwapScreen->cursorPos = 3;
|
||||
else if (sFactorySwapScreen->cursorPos + 1 != sFactorySwapScreen->actionsCount)
|
||||
sFactorySwapScreen->cursorPos++;
|
||||
else
|
||||
sFactorySwapScreen->cursorPos = 0;
|
||||
}
|
||||
else // Move cursor up.
|
||||
{
|
||||
if (sFactorySwapScreen->cursorPos < 3)
|
||||
sFactorySwapScreen->cursorPos = sFactorySwapScreen->actionsCount - 1;
|
||||
else if (sFactorySwapScreen->cursorPos != 0)
|
||||
sFactorySwapScreen->cursorPos--;
|
||||
else
|
||||
sFactorySwapScreen->cursorPos = sFactorySwapScreen->actionsCount - 1;
|
||||
}
|
||||
|
||||
cursorPos = sFactorySwapScreen->cursorPos;
|
||||
Swap_HandleActionCursorChange(cursorPos);
|
||||
}
|
||||
|
||||
void Swap_UpdateYesNoCursorPosition(s8 direction)
|
||||
{
|
||||
if (direction > 0) // Move cursor down.
|
||||
{
|
||||
if (sFactorySwapScreen->yesNoCursorPos != 1)
|
||||
sFactorySwapScreen->yesNoCursorPos++;
|
||||
else
|
||||
sFactorySwapScreen->yesNoCursorPos = 0;
|
||||
}
|
||||
else // Move cursor up.
|
||||
{
|
||||
if (sFactorySwapScreen->yesNoCursorPos != 0)
|
||||
sFactorySwapScreen->yesNoCursorPos--;
|
||||
else
|
||||
sFactorySwapScreen->yesNoCursorPos = 1;
|
||||
}
|
||||
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].pos1.y = (sFactorySwapScreen->yesNoCursorPos * 16) + 112;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].pos1.y = (sFactorySwapScreen->yesNoCursorPos * 16) + 112;
|
||||
}
|
||||
|
||||
void Swap_UpdateMenuCursorPosition(s8 direction)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
if (direction > 0) // Move cursor down.
|
||||
{
|
||||
if (sFactorySwapScreen->menuCursorPos != MENU_OPTIONS_COUNT - 1)
|
||||
sFactorySwapScreen->menuCursorPos++;
|
||||
else
|
||||
sFactorySwapScreen->menuCursorPos = 0;
|
||||
}
|
||||
else // Move cursor up.
|
||||
{
|
||||
if (sFactorySwapScreen->menuCursorPos != 0)
|
||||
sFactorySwapScreen->menuCursorPos--;
|
||||
else
|
||||
sFactorySwapScreen->menuCursorPos = MENU_OPTIONS_COUNT - 1;
|
||||
}
|
||||
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].pos1.y = (sFactorySwapScreen->menuCursorPos * 16) + 112;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].pos1.y = (sFactorySwapScreen->menuCursorPos * 16) + 112;
|
||||
}
|
||||
|
||||
void sub_819E838(u8 arg0)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if (arg0 == 2)
|
||||
{
|
||||
gSprites[sFactorySwapScreen->unk8[1][i]].invisible = 0;
|
||||
if (i < 2)
|
||||
gSprites[sFactorySwapScreen->unkE[1][i]].invisible = 1;
|
||||
}
|
||||
else if (arg0 == 3)
|
||||
{
|
||||
if (i < 2)
|
||||
gSprites[sFactorySwapScreen->unkE[1][i]].invisible = 0;
|
||||
gSprites[sFactorySwapScreen->unk8[1][i]].invisible = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_819E8EC(void)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
gSprites[sFactorySwapScreen->unk8[1][i]].invisible = 1;
|
||||
if (i < 2)
|
||||
gSprites[sFactorySwapScreen->unkE[1][i]].invisible = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void Swap_ShowMenuOptions(void)
|
||||
{
|
||||
if (sFactorySwapScreen->fromSummaryScreen == TRUE)
|
||||
sFactorySwapScreen->fromSummaryScreen = FALSE;
|
||||
else
|
||||
sFactorySwapScreen->menuCursorPos = 0;
|
||||
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].pos1.x = 176;
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].pos1.y = (sFactorySwapScreen->menuCursorPos * 16) + 112;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].pos1.x = 208;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].pos1.y = (sFactorySwapScreen->menuCursorPos * 16) + 112;
|
||||
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = 0;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = 0;
|
||||
|
||||
Swap_PrintMenuOptions();
|
||||
}
|
||||
|
||||
void Swap_ShowYesNoOptions(void)
|
||||
{
|
||||
sFactorySwapScreen->yesNoCursorPos = 0;
|
||||
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].pos1.x = 176;
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].pos1.y = 112;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].pos1.x = 208;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].pos1.y = 112;
|
||||
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = 0;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = 0;
|
||||
|
||||
Swap_PrintYesNoOptions();
|
||||
}
|
||||
|
||||
void sub_819EA64(u8 windowId)
|
||||
{
|
||||
gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = 1;
|
||||
gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = 1;
|
||||
FillWindowPixelBuffer(windowId, 0);
|
||||
CopyWindowToVram(windowId, 2);
|
||||
ClearWindowTilemap(windowId);
|
||||
}
|
||||
|
||||
void sub_819EAC0(void)
|
||||
{
|
||||
PutWindowTilemap(1);
|
||||
FillWindowPixelBuffer(1, 0);
|
||||
CopyWindowToVram(1, 2);
|
||||
}
|
||||
|
||||
void sub_819EADC(void)
|
||||
{
|
||||
PutWindowTilemap(7);
|
||||
FillWindowPixelBuffer(7, 0);
|
||||
CopyWindowToVram(7, 2);
|
||||
}
|
||||
|
||||
void sub_819EAF8(void)
|
||||
{
|
||||
sub_819EAC0();
|
||||
PutWindowTilemap(5);
|
||||
FillWindowPixelBuffer(5, 0);
|
||||
CopyWindowToVram(5, 2);
|
||||
}
|
||||
|
||||
void Swap_PrintPkmnSwap(void)
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(0, 1, gText_PkmnSwap, 2, 1, 0, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
void Swap_PrintMonSpecies(void)
|
||||
{
|
||||
u16 species;
|
||||
u8 x;
|
||||
|
||||
FillWindowPixelBuffer(1, 0);
|
||||
if (sFactorySwapScreen->cursorPos > 2)
|
||||
{
|
||||
CopyWindowToVram(1, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 monId = sFactorySwapScreen->cursorPos;
|
||||
if (sFactorySwapScreen->actionsState == 0)
|
||||
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL);
|
||||
else
|
||||
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
|
||||
StringCopy(gStringVar4, gSpeciesNames[species]);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(1, 1, x, 1, gUnknown_08610925, 0, gStringVar4);
|
||||
CopyWindowToVram(1, 3);
|
||||
}
|
||||
}
|
||||
|
||||
void Swap_PrintOnInfoWindow(const u8 *str)
|
||||
{
|
||||
FillWindowPixelBuffer(2, 0);
|
||||
AddTextPrinterParameterized(2, 1, str, 2, 5, 0, NULL);
|
||||
CopyWindowToVram(2, 2);
|
||||
}
|
||||
|
||||
@@ -2589,7 +2589,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
|
||||
color[1] = 1;
|
||||
color[2] = 3;
|
||||
|
||||
AddTextPrinterParameterized2(winId, 0, x, y, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(winId, 0, x, y, 0, 0, color, -1, str);
|
||||
|
||||
*windowId = winId;
|
||||
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));
|
||||
|
||||
@@ -997,7 +997,7 @@ static void sub_81C6404(void)
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
sub_81C6CEC(3);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28);
|
||||
PrintTextOnWindow(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
}
|
||||
|
||||
static void sub_81C645C(s16 value)
|
||||
@@ -1007,7 +1007,7 @@ static void sub_81C645C(s16 value)
|
||||
ConvertIntToDecimalStringN(gStringVar1, value, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28);
|
||||
PrintTextOnWindow(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, x, 2, 0, NULL);
|
||||
}
|
||||
|
||||
static void sub_81C64B4(u8 taskId)
|
||||
@@ -1280,12 +1280,12 @@ static void sub_81C6BD8(void)
|
||||
|
||||
static void PrintOnWindow_Font1(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
}
|
||||
|
||||
static void PrintOnWindow_Font7(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 7, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
AddTextPrinterParameterized4(windowId, 7, x, y, letterSpacing, lineSpacing, sColorTable[colorTableId], speed, src);
|
||||
}
|
||||
|
||||
static void sub_81C6CEC(u8 windowId)
|
||||
|
||||
+11
-11
@@ -266,7 +266,7 @@ static void PrintLinkBattleWinsLossesDraws(struct LinkBattleRecord *records)
|
||||
StringExpandPlaceholders(gStringVar4, gText_TotalRecordWLD);
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0xD0);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gStringVar4, x, 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 0x11, 0, NULL);
|
||||
}
|
||||
|
||||
static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 language)
|
||||
@@ -274,10 +274,10 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 lan
|
||||
if (record->wins == 0 && record->losses == 0 && record->draws == 0)
|
||||
{
|
||||
// empty slot
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoPlayer, 8, (y * 8) + 1, 0, NULL);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoScore, 80, (y * 8) + 1, 0, NULL);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoScore, 128, (y * 8) + 1, 0, NULL);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoScore, 176, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoPlayer, 8, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 80, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 128, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 176, (y * 8) + 1, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -285,16 +285,16 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 lan
|
||||
StringCopyN(gStringVar1, record->name, 7);
|
||||
ConvertInternationalString(gStringVar1, language);
|
||||
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 8, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 8, (y * 8) + 1, 0, NULL);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, record->wins, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 80, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 80, (y * 8) + 1, 0, NULL);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, record->losses, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 128, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 128, (y * 8) + 1, 0, NULL);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 176, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 176, (y * 8) + 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,11 +308,11 @@ void ShowLinkBattleRecords(void)
|
||||
StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults);
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gStringVar4, x, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 1, 0, NULL);
|
||||
PrintLinkBattleWinsLossesDraws(gSaveBlock1Ptr->linkBattleRecords.entries);
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, gText_WinLoseDraw);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gStringVar4, 0, 41, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, 0, 41, 0, NULL);
|
||||
|
||||
for (i = 0; i < LINK_B_RECORDS_COUNT; i++)
|
||||
{
|
||||
|
||||
+4
-4
@@ -3487,8 +3487,8 @@ void ShowBerryBlenderRecordWindow(void)
|
||||
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, gText_234Players, 4, 0x29, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_234Players, 4, 0x29, 0, NULL);
|
||||
|
||||
for (i = 0, yPos = 0x29; i < BLENDER_SCORES_NO; i++)
|
||||
{
|
||||
@@ -3503,7 +3503,7 @@ void ShowBerryBlenderRecordWindow(void)
|
||||
txtPtr = StringAppend(txtPtr, sText_RPM);
|
||||
|
||||
xPos = GetStringRightAlignXOffset(1, text, 0x8C);
|
||||
PrintTextOnWindow(gRecordsWindowId, 1, text, xPos, yPos + (i * 16), 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, text, xPos, yPos + (i * 16), 0, NULL);
|
||||
}
|
||||
|
||||
PutWindowTilemap(gRecordsWindowId);
|
||||
@@ -3596,7 +3596,7 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3
|
||||
FillWindowPixelBuffer(windowId, txtColor[0] | (txtColor[0] << 4));
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string);
|
||||
}
|
||||
|
||||
static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed)
|
||||
|
||||
@@ -343,7 +343,7 @@ static void HandleInitWindows(void)
|
||||
|
||||
static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed, u8 colorStructId)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, sTextColors[colorStructId], speed, text);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sTextColors[colorStructId], speed, text);
|
||||
}
|
||||
|
||||
static void AddBerryTagTextToBg0(void)
|
||||
@@ -376,7 +376,7 @@ static void PrintBerryNumberAndName(void)
|
||||
static void PrintBerrySize(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
PrintTextOnWindow(WIN_SIZE_FIRM, 1, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
if (berry->size != 0)
|
||||
{
|
||||
u32 inches, fraction;
|
||||
@@ -390,34 +390,34 @@ static void PrintBerrySize(void)
|
||||
ConvertIntToDecimalStringN(gStringVar1, inches, 0, 2);
|
||||
ConvertIntToDecimalStringN(gStringVar2, fraction, 0, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1DotVar2);
|
||||
PrintTextOnWindow(WIN_SIZE_FIRM, 1, gStringVar4, 0x28, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gStringVar4, 0x28, 1, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintTextOnWindow(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void PrintBerryFirmness(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
PrintTextOnWindow(WIN_SIZE_FIRM, 1, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL);
|
||||
if (berry->firmness != 0)
|
||||
PrintTextOnWindow(WIN_SIZE_FIRM, 1, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL);
|
||||
else
|
||||
PrintTextOnWindow(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 0x11, 0, NULL);
|
||||
}
|
||||
|
||||
static void PrintBerryDescription1(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
PrintTextOnWindow(WIN_DESC, 1, berry->description1, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_DESC, 1, berry->description1, 0, 1, 0, NULL);
|
||||
}
|
||||
|
||||
static void PrintBerryDescription2(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
PrintTextOnWindow(WIN_DESC, 1, berry->description2, 0, 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_DESC, 1, berry->description2, 0, 0x11, 0, NULL);
|
||||
}
|
||||
|
||||
static void CreateBerrySprite(void)
|
||||
|
||||
@@ -79,7 +79,7 @@ void CB2_InitClearSaveDataScreen(void)
|
||||
static void Task_DoClearSaveDataScreenYesNo(u8 taskId)
|
||||
{
|
||||
SetWindowBorderStyle(0, 0, 2, 14);
|
||||
PrintTextOnWindow(0, 1, gText_ClearAllSaveData, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_ClearAllSaveData, 0, 1, 0, 0);
|
||||
CreateYesNoMenu(sClearSaveYesNo, 2, 14, 1);
|
||||
gTasks[taskId].func = Task_ClearSaveDataScreenYesNoChoice;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
FillWindowPixelBuffer(0, 17);
|
||||
PrintTextOnWindow(0, 1, gText_ClearingData, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0);
|
||||
gTasks[taskId].func = Task_ClearSaveData;
|
||||
break;
|
||||
case 1:
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ void PrintCoinsString(u32 coinAmount)
|
||||
StringExpandPlaceholders(gStringVar4, gText_Coins);
|
||||
|
||||
xAlign = GetStringRightAlignXOffset(1, gStringVar4, 0x40);
|
||||
PrintTextOnWindow(sCoinsWindowId, 1, gStringVar4, xAlign, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(sCoinsWindowId, 1, gStringVar4, xAlign, 1, 0, NULL);
|
||||
}
|
||||
|
||||
void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y)
|
||||
|
||||
+1
-1
@@ -1189,7 +1189,7 @@ static void sub_81755BC(const u8 *string, u8 y, u8 a2)
|
||||
}
|
||||
|
||||
x = GetStringCenterAlignXOffsetWithLetterSpacing(1, string, 0xF0, 1);
|
||||
AddTextPrinterParameterized2(0, 1, x, y, 1, 0, color, -1, string);
|
||||
AddTextPrinterParameterized4(0, 1, x, y, 1, 0, color, -1, string);
|
||||
}
|
||||
|
||||
void sub_8175620(void)
|
||||
|
||||
+5
-5
@@ -499,7 +499,7 @@ void sub_8126B80(u8 taskId)
|
||||
void sub_8126C08(void)
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3);
|
||||
}
|
||||
|
||||
void SecretBasePC_Decorate(u8 taskId)
|
||||
@@ -622,7 +622,7 @@ void sub_8126E8C(u8 taskId)
|
||||
sub_8126F68(r5, i, 8, i << 4, FALSE, 0xFF);
|
||||
}
|
||||
}
|
||||
PrintTextOnWindow(r5, 1, gTasks[taskId].data[11] == 2 ? gText_Exit : gText_Cancel, 8, (i << 4) + 1, 0, 0);
|
||||
AddTextPrinterParameterized(r5, 1, gTasks[taskId].data[11] == 2 ? gText_Exit : gText_Cancel, 8, (i << 4) + 1, 0, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
}
|
||||
|
||||
@@ -636,12 +636,12 @@ void sub_8126F68(u8 winid, u8 decorCat, u8 x, u8 y, bool8 flag, u8 speed)
|
||||
sub_8127058(gStringVar4, flag);
|
||||
strbuf = StringLength(gStringVar4) + gStringVar4;
|
||||
StringCopy(strbuf, sDecorCatNames[decorCat]);
|
||||
PrintTextOnWindow(winid, 1, gStringVar4, x, y, speed, NULL);
|
||||
AddTextPrinterParameterized(winid, 1, gStringVar4, x, y, speed, NULL);
|
||||
strbuf = ConvertIntToDecimalStringN(strbuf, CountDecorationCategoryN(decorCat), STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
*strbuf++ = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(strbuf, gDecorationInventories[decorCat].size, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar4, width);
|
||||
PrintTextOnWindow(winid, 1, gStringVar4, x, y, speed, NULL);
|
||||
AddTextPrinterParameterized(winid, 1, gStringVar4, x, y, speed, NULL);
|
||||
}
|
||||
|
||||
void sub_8127058(u8 *str, bool8 flag)
|
||||
@@ -932,7 +932,7 @@ void sub_8127744(u32 a0)
|
||||
{
|
||||
txt = gDecorations[gCurDecorInventoryItems[a0]].description;
|
||||
}
|
||||
PrintTextOnWindow(winidx, 1, txt, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(winidx, 1, txt, 0, 1, 0, 0);
|
||||
}
|
||||
|
||||
void sub_81277A8(void)
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ extern int decompress_and_copy_tile_data_to_vram(u8 bg_id, void *src, int size,
|
||||
extern bool8 free_temp_tile_data_buffers_if_possible(void);
|
||||
extern void sub_80861E8(void); // rom4
|
||||
extern bool16 sub_80C0944(void);
|
||||
extern void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 *color, s8 speed, u8 *str);
|
||||
extern void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 *color, s8 speed, u8 *str);
|
||||
|
||||
extern u16 gUnknown_0860F074[];
|
||||
|
||||
@@ -210,5 +210,5 @@ static void PrintDiplomaText(u8 *text, u8 var1, u8 var2)
|
||||
{
|
||||
u8 color[3] = {0, 2, 3};
|
||||
|
||||
AddTextPrinterParameterized2(0, 1, var1, var2, 0, 0, color, -1, text);
|
||||
AddTextPrinterParameterized4(0, 1, var1, var2, 0, 0, color, -1, text);
|
||||
}
|
||||
|
||||
+1
-1
@@ -856,7 +856,7 @@ static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
|
||||
sEggHatchData->textColor[0] = 0;
|
||||
sEggHatchData->textColor[1] = 5;
|
||||
sEggHatchData->textColor[2] = 6;
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string);
|
||||
}
|
||||
|
||||
u8 GetEggStepsToSubtract(void)
|
||||
|
||||
@@ -126,7 +126,7 @@ static void FieldUpdateRegionMap(void)
|
||||
case 1:
|
||||
SetWindowBorderStyle(1, 0, 0x27, 0xd);
|
||||
offset = GetStringCenterAlignXOffset(1, gText_Hoenn, 0x38);
|
||||
PrintTextOnWindow(1, 1, gText_Hoenn, offset, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(1, 1, gText_Hoenn, offset, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
SetWindowBorderStyle(0, 0, 0x27, 0xd);
|
||||
PrintRegionMapSecName();
|
||||
@@ -182,7 +182,7 @@ static void PrintRegionMapSecName(void)
|
||||
if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE)
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
PrintTextOnWindow(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);
|
||||
}
|
||||
else
|
||||
|
||||
+14
-14
@@ -1836,10 +1836,10 @@ void sub_8139B60(void)
|
||||
SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0);
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64);
|
||||
PrintTextOnWindow(gUnknown_0203AB5E, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gElevatorFloorsTable[gSpecialVar_0x8005], 64);
|
||||
PrintTextOnWindow(gUnknown_0203AB5E, 1, gElevatorFloorsTable[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gElevatorFloorsTable[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
|
||||
|
||||
PutWindowTilemap(gUnknown_0203AB5E);
|
||||
CopyWindowToVram(gUnknown_0203AB5E, 3);
|
||||
@@ -2178,13 +2178,13 @@ void sub_8139F20(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (gSaveBlock2Ptr->frontier.field_DE2[0] >= gSaveBlock2Ptr->frontier.field_DE2[1])
|
||||
if (gSaveBlock2Ptr->frontier.field_DE2[0][0] >= gSaveBlock2Ptr->frontier.field_DE2[0][1])
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DE2[0];
|
||||
unk = gSaveBlock2Ptr->frontier.field_DE2[0][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
unk = gSaveBlock2Ptr->frontier.field_DE2[1];
|
||||
unk = gSaveBlock2Ptr->frontier.field_DE2[0][1];
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
@@ -3063,7 +3063,7 @@ void sub_813A8FC(void)
|
||||
u32 x;
|
||||
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.frontierBattlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
|
||||
x = GetStringRightAlignXOffset(1, string, 48);
|
||||
PrintTextOnWindow(gUnknown_0203AB6D, 1, string, x, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gUnknown_0203AB6D, 1, string, x, 1, 0, NULL);
|
||||
}
|
||||
|
||||
void sub_813A958(void)
|
||||
@@ -3201,7 +3201,7 @@ static void sub_813AA60(u16 a0, u16 a1)
|
||||
switch (a0)
|
||||
{
|
||||
case 3:
|
||||
AddTextPrinterParameterized(0, 1, gUnknown_085B3170[a1], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085B3170[a1], 0, NULL, 2, 1, 3);
|
||||
if (gUnknown_085B312C[a1] == 0xFFFF)
|
||||
{
|
||||
sub_813ABD4(gUnknown_085B312C[a1]);
|
||||
@@ -3214,7 +3214,7 @@ static void sub_813AA60(u16 a0, u16 a1)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
AddTextPrinterParameterized(0, 1, gUnknown_085B319C[a1], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085B319C[a1], 0, NULL, 2, 1, 3);
|
||||
if (gUnknown_085B3142[a1] == 0xFFFF)
|
||||
{
|
||||
sub_813ABD4(gUnknown_085B3142[a1]);
|
||||
@@ -3227,11 +3227,11 @@ static void sub_813AA60(u16 a0, u16 a1)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
AddTextPrinterParameterized(0, 1, gUnknown_085B31B4[a1], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085B31B4[a1], 0, NULL, 2, 1, 3);
|
||||
sub_813ABD4(gUnknown_085B314E[a1]);
|
||||
break;
|
||||
case 6:
|
||||
AddTextPrinterParameterized(0, 1, gUnknown_085B31D0[a1], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085B31D0[a1], 0, NULL, 2, 1, 3);
|
||||
sub_813ABD4(gUnknown_085B315C[a1]);
|
||||
break;
|
||||
}
|
||||
@@ -3339,11 +3339,11 @@ static void sub_813AD34(u8 a0, u16 a1)
|
||||
FillWindowPixelRect(gUnknown_0203AB5E, 0x11, 0, 0, 96, 48);
|
||||
if (a0 == 10)
|
||||
{
|
||||
PrintTextOnWindow(gUnknown_0203AB5E, 1, gUnknown_085B3254[a1], 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gUnknown_085B3254[a1], 0, 1, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintTextOnWindow(gUnknown_0203AB5E, 1, gUnknown_085B3228[a1], 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gUnknown_085B3228[a1], 0, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3367,10 +3367,10 @@ void sub_813ADD4(void)
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
sub_8199F74(task->data[13], 1, gUnknown_085B2CF0[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
|
||||
AddTextPrinterParameterized5(task->data[13], 1, gUnknown_085B2CF0[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
|
||||
}
|
||||
|
||||
PrintTextOnWindow(task->data[13], 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(task->data[13], 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
|
||||
PutWindowTilemap(task->data[13]);
|
||||
CopyWindowToVram(task->data[13], 3);
|
||||
}
|
||||
|
||||
+3
-3
@@ -531,7 +531,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
|
||||
*lastSavedTeam = *sHofMonPtr;
|
||||
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_Hof_TrySaveData;
|
||||
}
|
||||
@@ -738,7 +738,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId)
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
|
||||
HallOfFame_PrintPlayerInfo(1, 2);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_LeagueChamp, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gText_LeagueChamp, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_Hof_ExitOnKeyPressed;
|
||||
}
|
||||
@@ -1107,7 +1107,7 @@ static void Task_HofPC_PrintDataIsCorrupted(u8 taskId)
|
||||
{
|
||||
sub_8198180(gText_UnkCtrlF800Exit, 8, 1);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_HofPC_ExitOnButtonPress;
|
||||
}
|
||||
|
||||
+3
-3
@@ -884,7 +884,7 @@ void sub_81ABC54(u8 a, s16 b)
|
||||
u8 r3 = (gUnknown_0203CE58.pocket == 3) ? 3 : 2;
|
||||
ConvertIntToDecimalStringN(gStringVar1, b, 2, r3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
PrintTextOnWindow(a, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 0x28), 2, 0, 0);
|
||||
AddTextPrinterParameterized(a, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 0x28), 2, 0, 0);
|
||||
}
|
||||
|
||||
void sub_81ABCC0(int a, int b, int c)
|
||||
@@ -892,7 +892,7 @@ void sub_81ABCC0(int a, int b, int c)
|
||||
u8 r3 = (gUnknown_0203CE58.pocket == 3) ? 3 : 2;
|
||||
ConvertIntToDecimalStringN(gStringVar1, b, 2, r3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
PrintTextOnWindow(a, 1, gStringVar4, 0, 1, -1, 0);
|
||||
AddTextPrinterParameterized(a, 1, gStringVar4, 0, 1, -1, 0);
|
||||
PrintMoneyAmount(a, 0x26, 1, c, 0);
|
||||
}
|
||||
|
||||
@@ -2118,7 +2118,7 @@ void setup_bag_menu_textboxes(void)
|
||||
|
||||
void bag_menu_print(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 h)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, fontId, left, top, letterSpacing, lineSpacing, gUnknown_08614164[h], speed, str);
|
||||
AddTextPrinterParameterized4(windowId, fontId, left, top, letterSpacing, lineSpacing, gUnknown_08614164[h], speed, str);
|
||||
}
|
||||
|
||||
u8 sub_81AE124(u8 a)
|
||||
|
||||
+2
-2
@@ -632,7 +632,7 @@ static void HideSpritesAndPrintTeachText(bool8 a)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
||||
FillWindowPixelBuffer(3, 0x11);
|
||||
PrintTextOnWindow(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,7 +696,7 @@ static void ShowTeachMoveText(bool8 showContest)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
||||
FillWindowPixelBuffer(3, 0x11);
|
||||
PrintTextOnWindow(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -600,7 +600,7 @@ static void ListMenuPrint(struct ListMenu *list, const u8 *str, u8 x, u8 y)
|
||||
colors[0] = gListMenuOverride.fillValue;
|
||||
colors[1] = gListMenuOverride.cursorPal;
|
||||
colors[2] = gListMenuOverride.cursorShadowPal;
|
||||
AddTextPrinterParameterized2(list->template.windowId,
|
||||
AddTextPrinterParameterized4(list->template.windowId,
|
||||
gListMenuOverride.fontId,
|
||||
x, y,
|
||||
gListMenuOverride.lettersSpacing,
|
||||
@@ -613,7 +613,7 @@ static void ListMenuPrint(struct ListMenu *list, const u8 *str, u8 x, u8 y)
|
||||
colors[0] = list->template.fillValue;
|
||||
colors[1] = list->template.cursorPal;
|
||||
colors[2] = list->template.cursorShadowPal;
|
||||
AddTextPrinterParameterized2(list->template.windowId,
|
||||
AddTextPrinterParameterized4(list->template.windowId,
|
||||
list->template.fontId,
|
||||
x, y,
|
||||
list->template.lettersSpacing,
|
||||
|
||||
+1
-1
@@ -1820,7 +1820,7 @@ void set_default_player_name(u8 nameId)
|
||||
void CreateMainMenuErrorWindow(const u8* str)
|
||||
{
|
||||
FillWindowPixelBuffer(7, 17);
|
||||
PrintTextOnWindow(7, 1, str, 0, 1, 2, 0);
|
||||
AddTextPrinterParameterized(7, 1, str, 0, 1, 2, 0);
|
||||
PutWindowTilemap(7);
|
||||
CopyWindowToVram(7, 2);
|
||||
DrawMainMenuWindowBorder(sWindowTemplate_ErrorWindow, MAIN_MENU_BORDER_TILE);
|
||||
|
||||
@@ -251,7 +251,7 @@ static void ShowMapNamePopUpWindow(void)
|
||||
mapDisplayHeader[0] = EXT_CTRL_CODE_BEGIN;
|
||||
mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT;
|
||||
mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT;
|
||||
PrintTextOnWindow(GetMapNamePopUpWindowId(), 7, mapDisplayHeader, x, 3, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(GetMapNamePopUpWindowId(), 7, mapDisplayHeader, x, 3, 0xFF, NULL);
|
||||
CopyWindowToVram(GetMapNamePopUpWindowId(), 3);
|
||||
}
|
||||
|
||||
|
||||
@@ -438,7 +438,7 @@ static void BardSong_TextSubPrinter(struct TextSubPrinter * printer, u16 a1)
|
||||
static void sub_8120708(const u8 * src)
|
||||
{
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
PrintTextOnWindow(0, 1, src, 0, 1, 1, BardSong_TextSubPrinter);
|
||||
AddTextPrinterParameterized(0, 1, src, 0, 1, 1, BardSong_TextSubPrinter);
|
||||
gUnknown_03002F84 = TRUE;
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
@@ -1160,9 +1160,9 @@ static void PrintStoryList(void)
|
||||
u16 gameStatID = sStorytellerPtr->gameStatIDs[i];
|
||||
if (gameStatID == 0)
|
||||
break;
|
||||
PrintTextOnWindow(sStorytellerWindowId, 1, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sStorytellerWindowId, 1, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL);
|
||||
}
|
||||
PrintTextOnWindow(sStorytellerWindowId, 1, gText_Exit, 8, 16 * i + 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sStorytellerWindowId, 1, gText_Exit, 8, 16 * i + 1, 0xFF, NULL);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sStorytellerWindowId, GetFreeStorySlot() + 1, 0);
|
||||
CopyWindowToVram(sStorytellerWindowId, 3);
|
||||
}
|
||||
|
||||
+16
-16
@@ -149,7 +149,7 @@ u16 sub_8197224(void)
|
||||
return IsTextPrinterActive(0);
|
||||
}
|
||||
|
||||
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor)
|
||||
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor)
|
||||
{
|
||||
struct TextSubPrinter printer;
|
||||
|
||||
@@ -175,19 +175,19 @@ void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress)
|
||||
{
|
||||
void (*callback)(struct TextSubPrinter *, u16) = NULL;
|
||||
gTextFlags.flag_0 = allowSkippingDelayWithButtonPress;
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), callback, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeed(), callback, 2, 1, 3);
|
||||
}
|
||||
|
||||
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress)
|
||||
{
|
||||
gTextFlags.flag_0 = allowSkippingDelayWithButtonPress;
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeed(), NULL, 2, 1, 3);
|
||||
}
|
||||
|
||||
void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed)
|
||||
{
|
||||
gTextFlags.flag_0 = allowSkippingDelayWithButtonPress;
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, speed, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, speed, NULL, 2, 1, 3);
|
||||
}
|
||||
|
||||
void sub_81973A4(void)
|
||||
@@ -525,7 +525,7 @@ void RemoveMapNamePopUpWindow(void)
|
||||
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextSubPrinter *, u16))
|
||||
{
|
||||
gTextFlags.flag_0 = a1;
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), callback, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeed(), callback, 2, 1, 3);
|
||||
}
|
||||
|
||||
void sub_8197AE8(bool8 copyToVram)
|
||||
@@ -843,7 +843,7 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo
|
||||
0,
|
||||
string2);
|
||||
}
|
||||
AddTextPrinterParameterized2(gUnknown_0203CDA0, 1, 4, 1, 0, 0, color, 0, string);
|
||||
AddTextPrinterParameterized4(gUnknown_0203CDA0, 1, 4, 1, 0, 0, color, 0, string);
|
||||
if (copyToVram)
|
||||
CopyWindowToVram(gUnknown_0203CDA0, 3);
|
||||
}
|
||||
@@ -918,7 +918,7 @@ void RedrawMenuCursor(u8 oldPos, u8 newPos)
|
||||
width = GetMenuCursorDimensionByFont(gUnknown_0203CD90.fontId, 0);
|
||||
height = GetMenuCursorDimensionByFont(gUnknown_0203CD90.fontId, 1);
|
||||
FillWindowPixelRect(gUnknown_0203CD90.windowId, 0x11, gUnknown_0203CD90.left, gUnknown_0203CD90.optionHeight * oldPos + gUnknown_0203CD90.top, width, height);
|
||||
PrintTextOnWindow(gUnknown_0203CD90.windowId, gUnknown_0203CD90.fontId, gText_SelectorArrow3, gUnknown_0203CD90.left, gUnknown_0203CD90.optionHeight * newPos + gUnknown_0203CD90.top, 0, 0);
|
||||
AddTextPrinterParameterized(gUnknown_0203CD90.windowId, gUnknown_0203CD90.fontId, gText_SelectorArrow3, gUnknown_0203CD90.left, gUnknown_0203CD90.optionHeight * newPos + gUnknown_0203CD90.top, 0, 0);
|
||||
}
|
||||
|
||||
u8 MoveMenuCursor(s8 cursorDelta)
|
||||
@@ -1079,7 +1079,7 @@ void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 i
|
||||
u8 i;
|
||||
for (i = 0; i < itemCount; i++)
|
||||
{
|
||||
PrintTextOnWindow(windowId, fontId, strs[i].text, left, (lineHeight * i) + top, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(windowId, fontId, strs[i].text, left, (lineHeight * i) + top, 0xFF, NULL);
|
||||
}
|
||||
CopyWindowToVram(windowId, 2);
|
||||
}
|
||||
@@ -1089,7 +1089,7 @@ void sub_81987BC(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 item
|
||||
u8 i;
|
||||
for (i = 0; i < itemCount; i++)
|
||||
{
|
||||
sub_8199F74(windowId, fontId, strs[i].text, left, (lineHeight * i) + top, 0xFF, NULL, a6, a7);
|
||||
AddTextPrinterParameterized5(windowId, fontId, strs[i].text, left, (lineHeight * i) + top, 0xFF, NULL, a6, a7);
|
||||
}
|
||||
CopyWindowToVram(windowId, 2);
|
||||
}
|
||||
@@ -1209,7 +1209,7 @@ void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u
|
||||
{
|
||||
for (j = 0; j < a6; j++)
|
||||
{
|
||||
PrintTextOnWindow(windowId, fontId, strs[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(windowId, fontId, strs[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, 0xFF, NULL);
|
||||
}
|
||||
}
|
||||
CopyWindowToVram(windowId, 2);
|
||||
@@ -1303,7 +1303,7 @@ void sub_8199060(u8 oldCursorPos, u8 newCursorPos)
|
||||
cursorHeight);
|
||||
xPos = (newCursorPos % gUnknown_0203CD90.horizontalCount) * gUnknown_0203CD90.optionWidth + gUnknown_0203CD90.left;
|
||||
yPos = (newCursorPos / gUnknown_0203CD90.horizontalCount) * gUnknown_0203CD90.optionHeight + gUnknown_0203CD90.top;
|
||||
PrintTextOnWindow(gUnknown_0203CD90.windowId,
|
||||
AddTextPrinterParameterized(gUnknown_0203CD90.windowId,
|
||||
gUnknown_0203CD90.fontId,
|
||||
gText_SelectorArrow3,
|
||||
xPos,
|
||||
@@ -1588,7 +1588,7 @@ void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs)
|
||||
|
||||
for (i = 0; i < itemCount; i++)
|
||||
{
|
||||
PrintTextOnWindow(windowId, 1, strs[i].text, 8, (i * 16) + 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, strs[i].text, 8, (i * 16) + 1, 0xFF, NULL);
|
||||
}
|
||||
|
||||
CopyWindowToVram(windowId, 2);
|
||||
@@ -1654,7 +1654,7 @@ void sub_81997AC(u8 windowId, u8 a4, u8 a6, u8 a7, const struct MenuAction *strs
|
||||
{
|
||||
for (j = 0; j < a6; j++)
|
||||
{
|
||||
PrintTextOnWindow(windowId, 1, strs[(i * a6) + j].text, (a4 * j) + 8, (i * 16) + 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, strs[(i * a6) + j].text, (a4 * j) + 8, (i * 16) + 1, 0xFF, NULL);
|
||||
}
|
||||
}
|
||||
CopyWindowToVram(windowId, 2);
|
||||
@@ -1946,7 +1946,7 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const
|
||||
AddTextPrinter(&printer, speed, NULL);
|
||||
}
|
||||
|
||||
void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str)
|
||||
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str)
|
||||
{
|
||||
struct TextSubPrinter printer;
|
||||
|
||||
@@ -1967,7 +1967,7 @@ void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 left, u8 top, u8 le
|
||||
AddTextPrinter(&printer, speed, NULL);
|
||||
}
|
||||
|
||||
void sub_8199F74(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 letterSpacing, u8 lineSpacing)
|
||||
void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 letterSpacing, u8 lineSpacing)
|
||||
{
|
||||
struct TextSubPrinter printer;
|
||||
|
||||
@@ -1997,7 +1997,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y)
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, src);
|
||||
|
||||
PrintTextOnWindow(windowId, 1, gStringVar4, x, y, 0xFF, 0);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, 0xFF, 0);
|
||||
}
|
||||
|
||||
//Screw this function, it's long and unreferenced and ugh
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 arg2, u8 arg3, u8
|
||||
StringExpandPlaceholders(gStringVar4, string);
|
||||
|
||||
gTextFlags.flag_0 = 1;
|
||||
AddTextPrinterParameterized(windowId, fontId, gStringVar4, textSpeed, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(windowId, fontId, gStringVar4, textSpeed, NULL, 2, 1, 3);
|
||||
gUnknown_0300117C = taskFunc;
|
||||
gTasks[taskId].func = Task_ContinueTaskAfterMessagePrints;
|
||||
}
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed)
|
||||
*(txtPtr++) = 0x77;
|
||||
|
||||
StringExpandPlaceholders(txtPtr, gText_PokedollarVar1);
|
||||
PrintTextOnWindow(windowId, 1, gStringVar4, x, y, speed, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, speed, NULL);
|
||||
}
|
||||
|
||||
void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount)
|
||||
|
||||
@@ -298,5 +298,5 @@ static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 sp
|
||||
textColor[2] = 3;
|
||||
|
||||
FillWindowPixelBuffer(windowId, (textColor[0]) | (textColor[0] << 4));
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text);
|
||||
}
|
||||
|
||||
+4
-4
@@ -531,7 +531,7 @@ static void DisplaySentToPCMessage(void)
|
||||
StringExpandPlaceholders(gStringVar4, gUnknown_0858BDB8[stringToDisplay]);
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
gTextFlags.flag_0 = TRUE;
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeed(), 0, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
@@ -1447,7 +1447,7 @@ static void HandleDpadMovement(struct Task *task)
|
||||
static void sub_80E4894(void)
|
||||
{
|
||||
FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11);
|
||||
PrintTextOnWindow(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]);
|
||||
}
|
||||
|
||||
@@ -1458,7 +1458,7 @@ static void sub_80E48E8(void)
|
||||
StringCopy(buffer, gSpeciesNames[gNamingScreenData->monSpecies]);
|
||||
StringAppendN(buffer, gNamingScreenData->template->title, 15);
|
||||
FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11);
|
||||
PrintTextOnWindow(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0);
|
||||
AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0);
|
||||
PutWindowTilemap(gNamingScreenData->windows[3]);
|
||||
}
|
||||
|
||||
@@ -1652,7 +1652,7 @@ static void sub_80E4D10(void)
|
||||
temp[1] = gExpandedPlaceholder_Empty[0];
|
||||
unk2 = (sub_80E503C(temp[0]) == 1) ? 2 : 0;
|
||||
|
||||
PrintTextOnWindow(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL);
|
||||
}
|
||||
|
||||
sub_80E498C();
|
||||
|
||||
+3
-3
@@ -379,7 +379,7 @@ static void DrawOptionMenuChoice(const u8 *text, u8 x, u8 y, u8 style)
|
||||
}
|
||||
|
||||
dst[i] = EOS;
|
||||
PrintTextOnWindow(WIN_OPTIONS, 1, dst, x, y + 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_OPTIONS, 1, dst, x, y + 1, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static u8 TextSpeed_ProcessInput(u8 selection)
|
||||
@@ -605,7 +605,7 @@ static void ButtonMode_DrawChoices(u8 selection)
|
||||
static void DrawTextOption(void)
|
||||
{
|
||||
FillWindowPixelBuffer(WIN_TEXT_OPTION, 0x11);
|
||||
PrintTextOnWindow(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);
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ static void DrawOptionMenuTexts(void)
|
||||
FillWindowPixelBuffer(WIN_OPTIONS, 0x11);
|
||||
for (i = 0; i < MENUITEM_COUNT; i++)
|
||||
{
|
||||
PrintTextOnWindow(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);
|
||||
}
|
||||
CopyWindowToVram(WIN_OPTIONS, 3);
|
||||
}
|
||||
|
||||
+8
-8
@@ -371,7 +371,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
|
||||
static void ItemStorageMenuPrint(const u8 *textPtr)
|
||||
{
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
PrintTextOnWindow(0, 1, textPtr, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, textPtr, 0, 1, 0, 0);
|
||||
}
|
||||
|
||||
static void ItemStorageMenuProcessInput(u8 taskId)
|
||||
@@ -544,7 +544,7 @@ static void Mailbox_DrawMailboxMenu(u8 taskId)
|
||||
|
||||
windowId = sub_81D1C84(0);
|
||||
sub_81D1C84(1);
|
||||
PrintTextOnWindow(windowId, 1, gText_Mailbox, GetStringCenterAlignXOffset(1, gText_Mailbox, 0x40), 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_Mailbox, GetStringCenterAlignXOffset(1, gText_Mailbox, 0x40), 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
gTasks[taskId].data[5] = sub_81D1DC0(&playerPCItemPageInfo);
|
||||
sub_81D1E90(&playerPCItemPageInfo);
|
||||
@@ -883,7 +883,7 @@ static void fish4_goto_x5_or_x6(u8 windowId, s32 id, u8 yOffset)
|
||||
}
|
||||
ConvertIntToDecimalStringN(gStringVar1, gSaveBlock1Ptr->pcItems[id].quantity, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
PrintTextOnWindow(windowId, 7, gStringVar4, GetStringRightAlignXOffset(7, gStringVar4, 104), yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 7, gStringVar4, GetStringRightAlignXOffset(7, gStringVar4, 104), yOffset, 0xFF, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,7 +897,7 @@ static void sub_816BEF0(s32 id)
|
||||
else
|
||||
description = ItemStorage_GetItemPcResponse(ITEMPC_GO_BACK_TO_PREV);
|
||||
FillWindowPixelBuffer(windowId, 17);
|
||||
PrintTextOnWindow(windowId, 1, description, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL);
|
||||
}
|
||||
|
||||
static void ItemStorage_StartScrollIndicator(void)
|
||||
@@ -926,7 +926,7 @@ static void sub_816BFE0(u8 y, u8 b, u8 speed)
|
||||
if(b == 0xFF)
|
||||
FillWindowPixelRect(windowId, 17, 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
|
||||
else
|
||||
AddTextPrinterParameterized2(windowId, 1, 0, y, 0, 0, gUnknown_085DFF8C, speed, gText_SelectorArrow2);
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, y, 0, 0, gUnknown_085DFF8C, speed, gText_SelectorArrow2);
|
||||
}
|
||||
|
||||
static void sub_816C060(u16 itemId)
|
||||
@@ -988,7 +988,7 @@ static void ItemStorage_ProcessWithdrawTossInput(u8 taskId)
|
||||
if(!toss)
|
||||
text = gText_WithdrawItem;
|
||||
x = GetStringCenterAlignXOffset(1, text, 104);
|
||||
PrintTextOnWindow(gUnknown_0203BCC4->windowIds[3], 1, text, x, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gUnknown_0203BCC4->windowIds[3], 1, text, x, 1, 0, NULL);
|
||||
CopyWindowToVram(gUnknown_0203BCC4->windowIds[2], 2);
|
||||
sub_816C110();
|
||||
sub_816C140();
|
||||
@@ -1044,7 +1044,7 @@ static void ItemStorage_PrintItemPcResponse(const u8 *string)
|
||||
u8 windowId = gUnknown_0203BCC4->windowIds[1];
|
||||
FillWindowPixelBuffer(windowId, 0x11);
|
||||
StringExpandPlaceholders(gStringVar4, string);
|
||||
PrintTextOnWindow(windowId, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
}
|
||||
|
||||
static void ItemStorage_ProcessInput(u8 taskId)
|
||||
@@ -1202,7 +1202,7 @@ static void sub_816C6BC(u8 windowId, u16 value, u32 mode, u8 x, u8 y, u8 n)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, value, mode, n);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
PrintTextOnWindow(windowId, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 48), y, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 48), y, 0, NULL);
|
||||
}
|
||||
|
||||
static void ItemStorage_DoItemAction(u8 taskId)
|
||||
|
||||
+1
-1
@@ -580,7 +580,7 @@ static void HandleInitWindows(void)
|
||||
|
||||
static void PrintOnPokeblockWindow(u8 windowId, const u8 *string, s32 x)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 1, x, 1, 0, 0, sTextColorInPokeblockMenu, 0, string);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, 1, 0, 0, sTextColorInPokeblockMenu, 0, string);
|
||||
}
|
||||
|
||||
static void PutPokeblockInfoText(void)
|
||||
|
||||
@@ -789,7 +789,7 @@ static void Task_HandleMonAtePokeblock(u8 taskId)
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1DisdainfullyAteVar2);
|
||||
|
||||
gTextFlags.flag_0 = 1;
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeed(), NULL, 2, 1, 3);
|
||||
gTasks[taskId].func = Task_WaitForAtePokeblockText;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1637,7 +1637,7 @@ void sub_80BCE2C(u8 windowId, u8 fontId, const u8* str, u8 left, u8 top)
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
AddTextPrinterParameterized2(windowId, fontId, left * 8, (top * 8) + 1, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(windowId, fontId, left * 8, (top * 8) + 1, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
void sub_80BCE84(u8 a, u16 b, u16 c)
|
||||
@@ -2450,7 +2450,7 @@ void sub_80BE8DC(const u8* str, u8 left, u8 top)
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
|
||||
AddTextPrinterParameterized2(0, 1, left, top, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(0, 1, left, top, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
u8 sub_80BE91C(struct PokedexListItem* item, u8 b)
|
||||
@@ -4065,7 +4065,7 @@ void sub_80C0A88(u8 windowId, const u8 *str, u8 left, u8 top)
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
|
||||
AddTextPrinterParameterized2(windowId, 1, left, top, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(windowId, 1, left, top, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
void sub_80C0AC4(u8 windowId, u16 order, u8 left, u8 top)
|
||||
@@ -4368,7 +4368,7 @@ void sub_80C1270(const u8 *str, u32 left, u32 top)
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 2;
|
||||
AddTextPrinterParameterized2(0, 1, left, top, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(0, 1, left, top, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
void sub_80C12B0(u32 x, u32 y, u32 width, u32 height)
|
||||
|
||||
@@ -258,7 +258,7 @@ void Task_PokemonStorageSystem(u8 taskId)
|
||||
sub_81973A4();
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(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(task->data[15], 3);
|
||||
task->data[0]++;
|
||||
@@ -284,7 +284,7 @@ void Task_PokemonStorageSystem(u8 taskId)
|
||||
{
|
||||
task->data[1] = task->data[3];
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(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;
|
||||
case -1:
|
||||
@@ -299,13 +299,13 @@ void Task_PokemonStorageSystem(u8 taskId)
|
||||
if (task->data[2] == 0 && CountPartyMons() == PARTY_SIZE)
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3);
|
||||
task->data[0] = 3;
|
||||
}
|
||||
else if (task->data[2] == 1 && CountPartyMons() == 1)
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3);
|
||||
task->data[0] = 3;
|
||||
}
|
||||
else
|
||||
@@ -320,7 +320,7 @@ void Task_PokemonStorageSystem(u8 taskId)
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(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;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_UP)
|
||||
@@ -330,7 +330,7 @@ void Task_PokemonStorageSystem(u8 taskId)
|
||||
MoveMenuCursor(-1);
|
||||
task->data[1] = GetMenuCursorPos();
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(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;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
@@ -340,7 +340,7 @@ void Task_PokemonStorageSystem(u8 taskId)
|
||||
MoveMenuCursor(1);
|
||||
task->data[1] = GetMenuCursorPos();
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
AddTextPrinterParameterized(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;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2379,7 +2379,7 @@ static void sub_81C2554(void)
|
||||
|
||||
static void SummaryScreen_PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, u8 y, u8 lineSpacing, u8 colorId)
|
||||
{
|
||||
AddTextPrinterParameterized2(windowId, 1, x, y, 0, lineSpacing, sTextColors_861CD2C[colorId], 0, string);
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, 0, lineSpacing, sTextColors_861CD2C[colorId], 0, string);
|
||||
}
|
||||
|
||||
static void sub_81C25E8(void)
|
||||
|
||||
+1
-1
@@ -306,7 +306,7 @@ static void ReceiveExchangePacket(u32 which)
|
||||
static void PrintTextOnRecordMixing(const u8 *src)
|
||||
{
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
PrintTextOnWindow(0, 1, src, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, 1, src, 0, 1, 0, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1631,7 +1631,7 @@ void MCB2_FlyMap(void)
|
||||
LoadPalette(sRegionMapFramePal, 0x10, 0x20);
|
||||
PutWindowTilemap(2);
|
||||
FillWindowPixelBuffer(2, 0x00);
|
||||
PrintTextOnWindow(2, 1, gText_FlyToWhere, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
gMain.state++;
|
||||
break;
|
||||
@@ -1697,9 +1697,9 @@ static void sub_8124904(void)
|
||||
flag = TRUE;
|
||||
sub_8198070(0, FALSE);
|
||||
SetWindowBorderStyle(1, FALSE, 0x65, 0x0d);
|
||||
PrintTextOnWindow(1, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(1, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
name = gUnknown_085A1EDC[i].name[sFlyMap->regionMap.posWithinMapSec];
|
||||
PrintTextOnWindow(1, 1, name, GetStringRightAlignXOffset(1, name, 0x60), 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 0x60), 0x11, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
gUnknown_03001180 = TRUE;
|
||||
}
|
||||
@@ -1717,7 +1717,7 @@ static void sub_8124904(void)
|
||||
{
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
}
|
||||
PrintTextOnWindow(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);
|
||||
gUnknown_03001180 = FALSE;
|
||||
}
|
||||
|
||||
@@ -314,14 +314,14 @@ static void PrintTime(u8 windowId, u8 x, u8 y, u16 days, u8 hours, u8 minutes, u
|
||||
ConvertIntToDecimalStringN(gStringVar1, seconds, 2, 2);
|
||||
dest = StringCopy(dest, gStringVar1);
|
||||
|
||||
PrintTextOnWindow(windowId, 1, gStringVar4, x, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8 seconds)
|
||||
{
|
||||
SetWindowBorderStyle(windowId, FALSE, 0x214, 0xE);
|
||||
PrintTime(windowId, 0, 1, days, hours, minutes, seconds);
|
||||
PrintTextOnWindow(windowId, 1, gText_Confirm2, 126, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_Confirm2, 126, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ static void VBlankCB(void)
|
||||
static void ShowMessage(const u8 *str)
|
||||
{
|
||||
sub_8197B1C(1, FALSE, 0x200, 0xF);
|
||||
PrintTextOnWindow(1, 1, str, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(1, 1, str, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
SetWindowBorderStyle(0, FALSE, 0x214, 0xE);
|
||||
PrintTextOnWindow(0, 1, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0);
|
||||
PrintTime(
|
||||
0,
|
||||
0,
|
||||
@@ -517,7 +517,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
|
||||
gLocalTime.hours,
|
||||
gLocalTime.minutes,
|
||||
gLocalTime.seconds);
|
||||
PrintTextOnWindow(0, 1, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0);
|
||||
PrintTime(
|
||||
0,
|
||||
0,
|
||||
|
||||
@@ -173,7 +173,7 @@ static void SaveFailedScreenTextPrint(u8 *text, u8 var1, u8 var2)
|
||||
color[0] = 0;
|
||||
color[1] = 15;
|
||||
color[2] = 3;
|
||||
AddTextPrinterParameterized2(gSaveFailedWindowIds[TEXT_WIN_ID], 1, var1 * 8, var2 * 8 + 1, 0, 0, color, 0, text);
|
||||
AddTextPrinterParameterized4(gSaveFailedWindowIds[TEXT_WIN_ID], 1, var1 * 8, var2 * 8 + 1, 0, 0, color, 0, text);
|
||||
}
|
||||
|
||||
void DoSaveFailedScreen(u8 saveType)
|
||||
|
||||
+2
-2
@@ -1304,7 +1304,7 @@ bool8 ScrCmd_cmdDB(struct ScriptContext *ctx)
|
||||
msg = (const u8 *)ctx->data[0];
|
||||
sub_81973A4();
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 1);
|
||||
PrintTextOnWindow(0, 1, msg, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, msg, 0, 1, 0, 0);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1521,7 +1521,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
||||
NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0);
|
||||
PutWindowTilemap(gUnknown_03000F30);
|
||||
FillWindowPixelBuffer(gUnknown_03000F30, 0x11);
|
||||
PrintTextOnWindow(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0);
|
||||
AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0);
|
||||
CopyWindowToVram(gUnknown_03000F30, 3);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+4
-4
@@ -725,7 +725,7 @@ extern const u8 gText_YouveRunOutOfCoins[];
|
||||
bool8 sub_8101F44(struct Task *task)
|
||||
{
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
PrintTextOnWindow(0, 1, gText_YouDontHaveThreeCoins, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_YouDontHaveThreeCoins, 0, 1, 0, 0);
|
||||
CopyWindowToVram(0, 3);
|
||||
sSlotMachine->state = 7;
|
||||
return FALSE;
|
||||
@@ -966,7 +966,7 @@ bool8 sub_81022F0(struct Task *task)
|
||||
bool8 sub_8102318(struct Task *task)
|
||||
{
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
PrintTextOnWindow(0, 1, gText_QuitTheGame, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_QuitTheGame, 0, 1, 0, 0);
|
||||
CopyWindowToVram(0, 3);
|
||||
sub_80323CC(0x15, 7, 0x214, 0x180, 0xE, 0xF);
|
||||
sSlotMachine->state = 22;
|
||||
@@ -996,7 +996,7 @@ bool8 sub_8102344(struct Task *task)
|
||||
bool8 sub_810239C(struct Task *task)
|
||||
{
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
PrintTextOnWindow(0, 1, gText_YouveGot9999Coins, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_YouveGot9999Coins, 0, 1, 0, 0);
|
||||
CopyWindowToVram(0, 3);
|
||||
sSlotMachine->state = 24;
|
||||
return FALSE;
|
||||
@@ -1015,7 +1015,7 @@ bool8 sub_81023B8(struct Task *task)
|
||||
bool8 sub_81023E0_(struct Task *task)
|
||||
{
|
||||
NewMenuHelpers_DrawDialogueFrame(0, 0);
|
||||
PrintTextOnWindow(0, 1, gText_YouveRunOutOfCoins, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, 1, gText_YouveRunOutOfCoins, 0, 1, 0, 0);
|
||||
CopyWindowToVram(0, 3);
|
||||
sSlotMachine->state = 26;
|
||||
return FALSE;
|
||||
|
||||
+12
-12
@@ -377,7 +377,7 @@ static void ShowSafariBallsWindow(void)
|
||||
NewMenuHelpers_DrawStdWindowFrame(sSafariBallsWindowId, FALSE);
|
||||
ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_SafariBallStock);
|
||||
PrintTextOnWindow(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(sSafariBallsWindowId, 2);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ static void ShowPyramidFloorWindow(void)
|
||||
NewMenuHelpers_DrawStdWindowFrame(sBattlePyramidFloorWindowId, FALSE);
|
||||
StringCopy(gStringVar1, sPyramindFloorNames[gSaveBlock2Ptr->frontier.field_CB2]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor);
|
||||
PrintTextOnWindow(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(sBattlePyramidFloorWindowId, 2);
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ static bool32 PrintStartMenuActions(s8 *pIndex, u32 count)
|
||||
}
|
||||
else {
|
||||
StringExpandPlaceholders(gStringVar4, sStartMenuItems[sCurrentStartMenuActions[index]].text);
|
||||
PrintTextOnWindow(GetStartMenuWindowId(), 1, gStringVar4, 8, (index << 4) + 9, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(GetStartMenuWindowId(), 1, gStringVar4, 8, (index << 4) + 9, 0xFF, NULL);
|
||||
}
|
||||
|
||||
index++;
|
||||
@@ -1249,7 +1249,7 @@ static void sub_80A0550(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
FillWindowPixelBuffer(0, 17);
|
||||
AddTextPrinterParameterized(0,
|
||||
AddTextPrinterParameterized2(0,
|
||||
1,
|
||||
gText_SavingDontTurnOffPower,
|
||||
255,
|
||||
@@ -1342,38 +1342,38 @@ static void ShowSaveInfoWindow(void)
|
||||
// Print region name
|
||||
yOffset = 1;
|
||||
sub_819A344(3, gStringVar4, TEXT_COLOR_GREEN);
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gStringVar4, 0, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, 0, yOffset, 0xFF, NULL);
|
||||
|
||||
// Print player name
|
||||
yOffset = 0x11;
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gText_SavingPlayer, 0, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPlayer, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(0, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
PrintPlayerNameOnWindow(sSaveInfoWindowId, gStringVar4, xOffset, yOffset);
|
||||
|
||||
// Print badge count
|
||||
yOffset = 0x21;
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gText_SavingBadges, 0, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingBadges, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(4, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
|
||||
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
|
||||
{
|
||||
// Print pokedex count
|
||||
yOffset = 0x31;
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gText_SavingPokedex, 0, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPokedex, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(1, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
}
|
||||
|
||||
// Print play time
|
||||
yOffset += 0x10;
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gText_SavingTime, 0, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingTime, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(2, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
PrintTextOnWindow(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
|
||||
CopyWindowToVram(sSaveInfoWindowId, 2);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ static void Task_StarterChoose1(u8 taskId)
|
||||
{
|
||||
CreateStarterPokemonLabel(gTasks[taskId].tStarterSelection);
|
||||
SetWindowBorderStyle(0, FALSE, 0x2A8, 0xD);
|
||||
PrintTextOnWindow(0, 1, gText_BirchInTrouble, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, 1, gText_BirchInTrouble, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
gTasks[taskId].func = Task_StarterChoose2;
|
||||
@@ -243,7 +243,7 @@ static void Task_StarterChoose4(u8 taskId)
|
||||
{
|
||||
PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0);
|
||||
FillWindowPixelBuffer(0, 0x11);
|
||||
PrintTextOnWindow(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
CreateYesNoMenu(&gUnknown_085B1DDC, 0x2A8, 0xD, 0);
|
||||
gTasks[taskId].func = Task_StarterChoose5;
|
||||
|
||||
+2
-2
@@ -139,14 +139,14 @@ void SetFontsPointer(const struct FontInfo *fonts)
|
||||
gFonts = fonts;
|
||||
}
|
||||
|
||||
void DeactivateAllTextPrinters (void)
|
||||
void DeactivateAllTextPrinters(void)
|
||||
{
|
||||
int printer;
|
||||
for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer)
|
||||
gTextPrinters[printer].sub_union.sub.active = 0;
|
||||
}
|
||||
|
||||
u16 PrintTextOnWindow(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16))
|
||||
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16))
|
||||
{
|
||||
struct TextSubPrinter subPrinter;
|
||||
|
||||
|
||||
+3
-3
@@ -77,11 +77,11 @@ void CreateAvailableDecorationsMenu(u8 taskId)
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (trader->decorIds[i] > NUM_DECORATIONS)
|
||||
PrintTextOnWindow(data[3], 1, gText_FiveMarks, 8, 16 * i + 1, 255, NULL);
|
||||
AddTextPrinterParameterized(data[3], 1, gText_FiveMarks, 8, 16 * i + 1, 255, NULL);
|
||||
else
|
||||
PrintTextOnWindow(data[3], 1, gDecorations[trader->decorIds[i]].name, 8, 16 * i + 1, 255, NULL);
|
||||
AddTextPrinterParameterized(data[3], 1, gDecorations[trader->decorIds[i]].name, 8, 16 * i + 1, 255, NULL);
|
||||
}
|
||||
PrintTextOnWindow(data[3], 1, gText_Exit, 8, 16 * i + 1, 255, NULL);
|
||||
AddTextPrinterParameterized(data[3], 1, gText_Exit, 8, 16 * i + 1, 255, NULL);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[3], 5, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
}
|
||||
|
||||
+3
-3
@@ -639,7 +639,7 @@ void CB2_StartWallClock(void)
|
||||
|
||||
WallClockInit();
|
||||
|
||||
PrintTextOnWindow(1, 1, gText_Confirm3, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(1, 1, gText_Confirm3, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
}
|
||||
@@ -687,7 +687,7 @@ void CB2_ViewWallClock(void)
|
||||
|
||||
WallClockInit();
|
||||
|
||||
PrintTextOnWindow(1, 1, gText_Cancel4, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(1, 1, gText_Cancel4, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
}
|
||||
@@ -754,7 +754,7 @@ static void Task_SetClock2(u8 taskId)
|
||||
static void Task_SetClock3(u8 taskId)
|
||||
{
|
||||
SetWindowBorderStyle(0, FALSE, 0x250, 0x0d);
|
||||
PrintTextOnWindow(0, 1, gText_IsThisTheCorrectTime, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, 1, gText_IsThisTheCorrectTime, 0, 1, 0, NULL);
|
||||
PutWindowTilemap(0);
|
||||
schedule_bg_copy_tilemap_to_vram(0);
|
||||
CreateYesNoMenu(&gUnknown_085B21F4, 0x250, 0x0d, 1);
|
||||
|
||||
Reference in New Issue
Block a user