Font constants and slight PSS sync

This commit is contained in:
Eduardo Quezada
2022-07-31 21:00:27 -04:00
parent bcfebc7de4
commit 95dd979f09
93 changed files with 1243 additions and 1206 deletions
+16 -16
View File
@@ -3169,7 +3169,7 @@ static void Msg_WantToPlayAgain(void)
{
case 0:
sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_WantToPlayAgain2, 0, 2, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_WantToPlayAgain2, 0, 2, TEXT_SKIP_DRAW, NULL);
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
sPokemonJumpGfx->mainState++;
break;
@@ -3196,7 +3196,7 @@ static void Msg_SavingDontTurnOff(void)
{
case 0:
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_SavingDontTurnOffPower, 0, 2, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_SavingDontTurnOffPower, 0, 2, TEXT_SKIP_DRAW, NULL);
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
sPokemonJumpGfx->mainState++;
break;
@@ -3239,7 +3239,7 @@ static void Msg_SomeoneDroppedOut(void)
{
case 0:
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_SomeoneDroppedOut2, 0, 2, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_SomeoneDroppedOut2, 0, 2, TEXT_SKIP_DRAW, NULL);
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
sPokemonJumpGfx->mainState++;
break;
@@ -3265,7 +3265,7 @@ static void Msg_CommunicationStandby(void)
{
case 0:
sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_CommunicationStandby4, 0, 2, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_CommunicationStandby4, 0, 2, TEXT_SKIP_DRAW, NULL);
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
sPokemonJumpGfx->mainState++;
break;
@@ -3358,7 +3358,7 @@ static void PrintPrizeMessage(u16 itemId, u16 quantity)
DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, sPokemonJumpGfx->itemQuantityStr);
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700);
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL);
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
sPokemonJumpGfx->fanfare = MUS_LEVEL_UP;
sPokemonJumpGfx->msgWindowState = 0;
@@ -3371,7 +3371,7 @@ static void PrintPrizeFilledBagMessage(u16 itemId)
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2);
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL);
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
sPokemonJumpGfx->fanfare = MUS_DUMMY;
sPokemonJumpGfx->msgWindowState = 0;
@@ -3384,7 +3384,7 @@ static void PrintNoRoomForPrizeMessage(u16 itemId)
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore);
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL);
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
sPokemonJumpGfx->fanfare = MUS_DUMMY;
sPokemonJumpGfx->msgWindowState = 0;
@@ -3493,7 +3493,7 @@ static void CreatePokeJumpYesNoMenu(u16 left, u16 top, u8 cursorPos)
window.paletteNum = 2;
window.baseBlock = 0x2B;
CreateYesNoMenu(&window, 2, 0, 2, 0x00a, 0xD, a);
CreateYesNoMenu(&window, FONT_2, 0, 2, 0x00a, 0xD, a);
}
// "Points" for jump score and "times" for number of jumps in a row
@@ -3505,8 +3505,8 @@ static void PrintScoreSuffixes(void)
PutWindowTilemap(WIN_TIMES);
FillWindowPixelBuffer(WIN_POINTS, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_TIMES, PIXEL_FILL(0));
AddTextPrinterParameterized3(WIN_POINTS, 0, 0, 2, color, 0, gText_SpacePoints2);
AddTextPrinterParameterized3(WIN_TIMES, 0, 0, 2, color, 0, gText_SpaceTimes3);
AddTextPrinterParameterized3(WIN_POINTS, FONT_0, 0, 2, color, 0, gText_SpacePoints2);
AddTextPrinterParameterized3(WIN_TIMES, FONT_0, 0, 2, color, 0, gText_SpaceTimes3);
}
// The venusaurs in the background are actually an empty 256x512 bg with 3 pairs of venusaurs on it.
@@ -3726,9 +3726,9 @@ static void PrintPokeJumpPlayerName(int multiplayerId, u8 bgColor, u8 fgColor, u
u8 colors[3] = {bgColor, fgColor, shadow};
FillWindowPixelBuffer(sPokemonJumpGfx->nameWindowIds[multiplayerId], PIXEL_FILL(0));
x = 64 - GetStringWidth(0, GetPokeJumpPlayerName(multiplayerId), -1);
x = 64 - GetStringWidth(FONT_0, GetPokeJumpPlayerName(multiplayerId), -1);
x /= 2;
AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], 0, x, 2, colors, TEXT_SKIP_DRAW, GetPokeJumpPlayerName(multiplayerId));
AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_0, x, 2, colors, TEXT_SKIP_DRAW, GetPokeJumpPlayerName(multiplayerId));
CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], COPYWIN_GFX);
}
@@ -4557,14 +4557,14 @@ static void PrintRecordsText(u16 windowId)
TextWindow_SetStdFrame0_WithPal(windowId, 0x21D, 0xD0);
DrawTextBorderOuter(windowId, 0x21D, 0xD);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
AddTextPrinterParameterized5(windowId, 2, gText_PkmnJumpRecords, 0, 0, TEXT_SKIP_DRAW, NULL, 1, 0);
AddTextPrinterParameterized5(windowId, FONT_2, gText_PkmnJumpRecords, 0, 0, TEXT_SKIP_DRAW, NULL, 1, 0);
for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++)
{
AddTextPrinterParameterized5(windowId, 2, sRecordsTexts[i], 0, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 1, 0);
AddTextPrinterParameterized5(windowId, FONT_2, sRecordsTexts[i], 0, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 1, 0);
ConvertIntToDecimalStringN(strbuf, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, 5);
TruncateToFirstWordOnly(strbuf);
x = 0xDE - GetStringWidth(2, strbuf, 0);
AddTextPrinterParameterized5(windowId, 2, strbuf, x, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 0, 0);
x = 0xDE - GetStringWidth(FONT_2, strbuf, 0);
AddTextPrinterParameterized5(windowId, FONT_2, strbuf, x, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 0, 0);
}
PutWindowTilemap(windowId);
}