mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Text clean-up, TEXT_SPEED_FF to TEXT_SKIP_DRAW
This commit is contained in:
parent
085f8adec6
commit
50d3003a0d
185
gflib/text.c
185
gflib/text.c
@ -13,6 +13,8 @@
|
|||||||
#include "dynamic_placeholder_text_util.h"
|
#include "dynamic_placeholder_text_util.h"
|
||||||
#include "fonts.h"
|
#include "fonts.h"
|
||||||
|
|
||||||
|
static u16 RenderText(struct TextPrinter *textPrinter);
|
||||||
|
static u32 RenderFont(struct TextPrinter *textPrinter);
|
||||||
static u16 FontFunc_Small(struct TextPrinter *);
|
static u16 FontFunc_Small(struct TextPrinter *);
|
||||||
static u16 FontFunc_Normal(struct TextPrinter *);
|
static u16 FontFunc_Normal(struct TextPrinter *);
|
||||||
static u16 FontFunc_Short(struct TextPrinter *);
|
static u16 FontFunc_Short(struct TextPrinter *);
|
||||||
@ -42,7 +44,7 @@ static u16 gLastTextFgColor;
|
|||||||
static u16 gLastTextShadowColor;
|
static u16 gLastTextShadowColor;
|
||||||
|
|
||||||
const struct FontInfo *gFonts;
|
const struct FontInfo *gFonts;
|
||||||
u8 gDisableTextPrinters;
|
bool8 gDisableTextPrinters;
|
||||||
struct TextGlyph gCurGlyph;
|
struct TextGlyph gCurGlyph;
|
||||||
TextFlags gTextFlags;
|
TextFlags gTextFlags;
|
||||||
|
|
||||||
@ -234,7 +236,7 @@ void DeactivateAllTextPrinters(void)
|
|||||||
{
|
{
|
||||||
int printer;
|
int printer;
|
||||||
for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer)
|
for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer)
|
||||||
gTextPrinters[printer].active = 0;
|
gTextPrinters[printer].active = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16))
|
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16))
|
||||||
@ -265,16 +267,14 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
|||||||
if (!gFonts)
|
if (!gFonts)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gTempTextPrinter.active = 1;
|
gTempTextPrinter.active = TRUE;
|
||||||
gTempTextPrinter.state = 0;
|
gTempTextPrinter.state = RENDER_STATE_HANDLE_CHAR;
|
||||||
gTempTextPrinter.textSpeed = speed;
|
gTempTextPrinter.textSpeed = speed;
|
||||||
gTempTextPrinter.delayCounter = 0;
|
gTempTextPrinter.delayCounter = 0;
|
||||||
gTempTextPrinter.scrollDistance = 0;
|
gTempTextPrinter.scrollDistance = 0;
|
||||||
|
|
||||||
for (i = 0; i < 7; i++)
|
for (i = 0; i < (int)ARRAY_COUNT(gTempTextPrinter.subStructFields); i++)
|
||||||
{
|
|
||||||
gTempTextPrinter.subStructFields[i] = 0;
|
gTempTextPrinter.subStructFields[i] = 0;
|
||||||
}
|
|
||||||
|
|
||||||
gTempTextPrinter.printerTemplate = *printerTemplate;
|
gTempTextPrinter.printerTemplate = *printerTemplate;
|
||||||
gTempTextPrinter.callback = callback;
|
gTempTextPrinter.callback = callback;
|
||||||
@ -282,7 +282,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
|||||||
gTempTextPrinter.japanese = 0;
|
gTempTextPrinter.japanese = 0;
|
||||||
|
|
||||||
GenerateFontHalfRowLookupTable(printerTemplate->fgColor, printerTemplate->bgColor, printerTemplate->shadowColor);
|
GenerateFontHalfRowLookupTable(printerTemplate->fgColor, printerTemplate->bgColor, printerTemplate->shadowColor);
|
||||||
if (speed != TEXT_SPEED_FF && speed != 0)
|
if (speed != TEXT_SKIP_DRAW && speed != 0)
|
||||||
{
|
{
|
||||||
--gTempTextPrinter.textSpeed;
|
--gTempTextPrinter.textSpeed;
|
||||||
gTextPrinters[printerTemplate->windowId] = gTempTextPrinter;
|
gTextPrinters[printerTemplate->windowId] = gTempTextPrinter;
|
||||||
@ -290,17 +290,20 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
gTempTextPrinter.textSpeed = 0;
|
gTempTextPrinter.textSpeed = 0;
|
||||||
|
|
||||||
|
// Render all text (up to limit) at once
|
||||||
for (j = 0; j < 0x400; ++j)
|
for (j = 0; j < 0x400; ++j)
|
||||||
{
|
{
|
||||||
if (RenderFont(&gTempTextPrinter) == 1)
|
if (RenderFont(&gTempTextPrinter) == RENDER_FINISH)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (speed != TEXT_SPEED_FF)
|
// All the text is rendered to the window but don't draw it yet.
|
||||||
|
if (speed != TEXT_SKIP_DRAW)
|
||||||
CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, COPYWIN_GFX);
|
CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, COPYWIN_GFX);
|
||||||
gTextPrinters[printerTemplate->windowId].active = 0;
|
gTextPrinters[printerTemplate->windowId].active = FALSE;
|
||||||
}
|
}
|
||||||
gDisableTextPrinters = 0;
|
gDisableTextPrinters = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,7 +311,7 @@ void RunTextPrinters(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (gDisableTextPrinters == 0)
|
if (!gDisableTextPrinters)
|
||||||
{
|
{
|
||||||
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
|
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
|
||||||
{
|
{
|
||||||
@ -317,14 +320,14 @@ void RunTextPrinters(void)
|
|||||||
u16 temp = RenderFont(&gTextPrinters[i]);
|
u16 temp = RenderFont(&gTextPrinters[i]);
|
||||||
switch (temp)
|
switch (temp)
|
||||||
{
|
{
|
||||||
case 0:
|
case RENDER_PRINT:
|
||||||
CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX);
|
CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX);
|
||||||
case 3:
|
case RENDER_UPDATE:
|
||||||
if (gTextPrinters[i].callback != 0)
|
if (gTextPrinters[i].callback != 0)
|
||||||
gTextPrinters[i].callback(&gTextPrinters[i].printerTemplate, temp);
|
gTextPrinters[i].callback(&gTextPrinters[i].printerTemplate, temp);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case RENDER_FINISH:
|
||||||
gTextPrinters[i].active = 0;
|
gTextPrinters[i].active = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -337,13 +340,13 @@ bool16 IsTextPrinterActive(u8 id)
|
|||||||
return gTextPrinters[id].active;
|
return gTextPrinters[id].active;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 RenderFont(struct TextPrinter *textPrinter)
|
static u32 RenderFont(struct TextPrinter *textPrinter)
|
||||||
{
|
{
|
||||||
u32 ret;
|
u32 ret;
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
ret = gFonts[textPrinter->printerTemplate.fontId].fontFunction(textPrinter);
|
ret = gFonts[textPrinter->printerTemplate.fontId].fontFunction(textPrinter);
|
||||||
if (ret != 2)
|
if (ret != RENDER_REPEAT)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -929,7 +932,7 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 RenderText(struct TextPrinter *textPrinter)
|
static u16 RenderText(struct TextPrinter *textPrinter)
|
||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
u16 currChar;
|
u16 currChar;
|
||||||
@ -938,7 +941,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
|
|
||||||
switch (textPrinter->state)
|
switch (textPrinter->state)
|
||||||
{
|
{
|
||||||
case 0:
|
case RENDER_STATE_HANDLE_CHAR:
|
||||||
if ((JOY_HELD(A_BUTTON | B_BUTTON)) && subStruct->hasPrintBeenSpedUp)
|
if ((JOY_HELD(A_BUTTON | B_BUTTON)) && subStruct->hasPrintBeenSpedUp)
|
||||||
textPrinter->delayCounter = 0;
|
textPrinter->delayCounter = 0;
|
||||||
|
|
||||||
@ -950,7 +953,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
subStruct->hasPrintBeenSpedUp = TRUE;
|
subStruct->hasPrintBeenSpedUp = TRUE;
|
||||||
textPrinter->delayCounter = 0;
|
textPrinter->delayCounter = 0;
|
||||||
}
|
}
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED) && gTextFlags.autoScroll)
|
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED) && gTextFlags.autoScroll)
|
||||||
@ -966,10 +969,10 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
case CHAR_NEWLINE:
|
case CHAR_NEWLINE:
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
||||||
textPrinter->printerTemplate.currentY += (gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing);
|
textPrinter->printerTemplate.currentY += (gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case PLACEHOLDER_BEGIN:
|
case PLACEHOLDER_BEGIN:
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_BEGIN:
|
case EXT_CTRL_CODE_BEGIN:
|
||||||
currChar = *textPrinter->printerTemplate.currentChar;
|
currChar = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
@ -979,17 +982,17 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar;
|
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_HIGHLIGHT:
|
case EXT_CTRL_CODE_HIGHLIGHT:
|
||||||
textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar;
|
textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_SHADOW:
|
case EXT_CTRL_CODE_SHADOW:
|
||||||
textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar;
|
textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW:
|
case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW:
|
||||||
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar;
|
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
@ -998,36 +1001,36 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar;
|
textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PALETTE:
|
case EXT_CTRL_CODE_PALETTE:
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_FONT:
|
case EXT_CTRL_CODE_FONT:
|
||||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_RESET_SIZE:
|
case EXT_CTRL_CODE_RESET_SIZE:
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PAUSE:
|
case EXT_CTRL_CODE_PAUSE:
|
||||||
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar;
|
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
textPrinter->state = 6;
|
textPrinter->state = RENDER_STATE_PAUSE;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||||
textPrinter->state = 1;
|
textPrinter->state = RENDER_STATE_WAIT;
|
||||||
if (gTextFlags.autoScroll)
|
if (gTextFlags.autoScroll)
|
||||||
subStruct->autoScrollDelay = 0;
|
subStruct->autoScrollDelay = 0;
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case EXT_CTRL_CODE_WAIT_SE:
|
case EXT_CTRL_CODE_WAIT_SE:
|
||||||
textPrinter->state = 5;
|
textPrinter->state = RENDER_STATE_WAIT_SE;
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case EXT_CTRL_CODE_PLAY_BGM:
|
case EXT_CTRL_CODE_PLAY_BGM:
|
||||||
currChar = *textPrinter->printerTemplate.currentChar;
|
currChar = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
currChar |= *textPrinter->printerTemplate.currentChar << 8;
|
currChar |= *textPrinter->printerTemplate.currentChar << 8;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
PlayBGM(currChar);
|
PlayBGM(currChar);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_ESCAPE:
|
case EXT_CTRL_CODE_ESCAPE:
|
||||||
currChar = *textPrinter->printerTemplate.currentChar | 0x100;
|
currChar = *textPrinter->printerTemplate.currentChar | 0x100;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
@ -1038,26 +1041,26 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
currChar |= (*textPrinter->printerTemplate.currentChar << 8);
|
currChar |= (*textPrinter->printerTemplate.currentChar << 8);
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
PlaySE(currChar);
|
PlaySE(currChar);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar;
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||||
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar;
|
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||||
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
||||||
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
|
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PAUSE_MUSIC:
|
case EXT_CTRL_CODE_PAUSE_MUSIC:
|
||||||
m4aMPlayStop(&gMPlayInfo_BGM);
|
m4aMPlayStop(&gMPlayInfo_BGM);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_RESUME_MUSIC:
|
case EXT_CTRL_CODE_RESUME_MUSIC:
|
||||||
m4aMPlayContinue(&gMPlayInfo_BGM);
|
m4aMPlayContinue(&gMPlayInfo_BGM);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_CLEAR:
|
case EXT_CTRL_CODE_CLEAR:
|
||||||
width = *textPrinter->printerTemplate.currentChar;
|
width = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
@ -1065,13 +1068,13 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
ClearTextSpan(textPrinter, width);
|
ClearTextSpan(textPrinter, width);
|
||||||
textPrinter->printerTemplate.currentX += width;
|
textPrinter->printerTemplate.currentX += width;
|
||||||
return 0;
|
return RENDER_PRINT;
|
||||||
}
|
}
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_SKIP:
|
case EXT_CTRL_CODE_SKIP:
|
||||||
textPrinter->printerTemplate.currentX = *textPrinter->printerTemplate.currentChar + textPrinter->printerTemplate.x;
|
textPrinter->printerTemplate.currentX = *textPrinter->printerTemplate.currentChar + textPrinter->printerTemplate.x;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_CLEAR_TO:
|
case EXT_CTRL_CODE_CLEAR_TO:
|
||||||
{
|
{
|
||||||
widthHelper = *textPrinter->printerTemplate.currentChar;
|
widthHelper = *textPrinter->printerTemplate.currentChar;
|
||||||
@ -1082,29 +1085,29 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
ClearTextSpan(textPrinter, width);
|
ClearTextSpan(textPrinter, width);
|
||||||
textPrinter->printerTemplate.currentX += width;
|
textPrinter->printerTemplate.currentX += width;
|
||||||
return 0;
|
return RENDER_PRINT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||||
textPrinter->minLetterSpacing = *textPrinter->printerTemplate.currentChar++;
|
textPrinter->minLetterSpacing = *textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_JPN:
|
case EXT_CTRL_CODE_JPN:
|
||||||
textPrinter->japanese = 1;
|
textPrinter->japanese = TRUE;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_ENG:
|
case EXT_CTRL_CODE_ENG:
|
||||||
textPrinter->japanese = 0;
|
textPrinter->japanese = FALSE;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CHAR_PROMPT_CLEAR:
|
case CHAR_PROMPT_CLEAR:
|
||||||
textPrinter->state = 2;
|
textPrinter->state = RENDER_STATE_CLEAR;
|
||||||
TextPrinterInitDownArrowCounters(textPrinter);
|
TextPrinterInitDownArrowCounters(textPrinter);
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case CHAR_PROMPT_SCROLL:
|
case CHAR_PROMPT_SCROLL:
|
||||||
textPrinter->state = 3;
|
textPrinter->state = RENDER_STATE_SCROLL_START;
|
||||||
TextPrinterInitDownArrowCounters(textPrinter);
|
TextPrinterInitDownArrowCounters(textPrinter);
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case CHAR_EXTRA_SYMBOL:
|
case CHAR_EXTRA_SYMBOL:
|
||||||
currChar = *textPrinter->printerTemplate.currentChar | 0x100;
|
currChar = *textPrinter->printerTemplate.currentChar | 0x100;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
@ -1113,9 +1116,9 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
currChar = *textPrinter->printerTemplate.currentChar++;
|
currChar = *textPrinter->printerTemplate.currentChar++;
|
||||||
gCurGlyph.width = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY);
|
gCurGlyph.width = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY);
|
||||||
textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing;
|
textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing;
|
||||||
return 0;
|
return RENDER_PRINT;
|
||||||
case EOS:
|
case EOS:
|
||||||
return 1;
|
return RENDER_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (subStruct->fontId)
|
switch (subStruct->fontId)
|
||||||
@ -1161,30 +1164,30 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
else
|
else
|
||||||
textPrinter->printerTemplate.currentX += gCurGlyph.width;
|
textPrinter->printerTemplate.currentX += gCurGlyph.width;
|
||||||
}
|
}
|
||||||
return 0;
|
return RENDER_PRINT;
|
||||||
case 1:
|
case RENDER_STATE_WAIT:
|
||||||
if (TextPrinterWait(textPrinter))
|
if (TextPrinterWait(textPrinter))
|
||||||
textPrinter->state = 0;
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case 2:
|
case RENDER_STATE_CLEAR:
|
||||||
if (TextPrinterWaitWithDownArrow(textPrinter))
|
if (TextPrinterWaitWithDownArrow(textPrinter))
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
||||||
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
|
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
|
||||||
textPrinter->state = 0;
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
}
|
}
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case 3:
|
case RENDER_STATE_SCROLL_START:
|
||||||
if (TextPrinterWaitWithDownArrow(textPrinter))
|
if (TextPrinterWaitWithDownArrow(textPrinter))
|
||||||
{
|
{
|
||||||
TextPrinterClearDownArrow(textPrinter);
|
TextPrinterClearDownArrow(textPrinter);
|
||||||
textPrinter->scrollDistance = gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing;
|
textPrinter->scrollDistance = gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing;
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
||||||
textPrinter->state = 4;
|
textPrinter->state = RENDER_STATE_SCROLL;
|
||||||
}
|
}
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case 4:
|
case RENDER_STATE_SCROLL:
|
||||||
if (textPrinter->scrollDistance)
|
if (textPrinter->scrollDistance)
|
||||||
{
|
{
|
||||||
int scrollSpeed = GetPlayerTextSpeed();
|
int scrollSpeed = GetPlayerTextSpeed();
|
||||||
@ -1203,22 +1206,22 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
textPrinter->state = 0;
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
}
|
}
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case 5:
|
case RENDER_STATE_WAIT_SE:
|
||||||
if (!IsSEPlaying())
|
if (!IsSEPlaying())
|
||||||
textPrinter->state = 0;
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case 6:
|
case RENDER_STATE_PAUSE:
|
||||||
if (textPrinter->delayCounter != 0)
|
if (textPrinter->delayCounter != 0)
|
||||||
textPrinter->delayCounter--;
|
textPrinter->delayCounter--;
|
||||||
else
|
else
|
||||||
textPrinter->state = 0;
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return RENDER_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unused
|
// Unused
|
||||||
@ -1363,17 +1366,17 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
|||||||
case PLACEHOLDER_BEGIN:
|
case PLACEHOLDER_BEGIN:
|
||||||
switch (*++str)
|
switch (*++str)
|
||||||
{
|
{
|
||||||
case PLACEHOLDER_ID_STRING_VAR_1:
|
case PLACEHOLDER_ID_STRING_VAR_1:
|
||||||
bufferPointer = gStringVar1;
|
bufferPointer = gStringVar1;
|
||||||
break;
|
break;
|
||||||
case PLACEHOLDER_ID_STRING_VAR_2:
|
case PLACEHOLDER_ID_STRING_VAR_2:
|
||||||
bufferPointer = gStringVar2;
|
bufferPointer = gStringVar2;
|
||||||
break;
|
break;
|
||||||
case PLACEHOLDER_ID_STRING_VAR_3:
|
case PLACEHOLDER_ID_STRING_VAR_3:
|
||||||
bufferPointer = gStringVar3;
|
bufferPointer = gStringVar3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case CHAR_DYNAMIC:
|
case CHAR_DYNAMIC:
|
||||||
if (bufferPointer == NULL)
|
if (bufferPointer == NULL)
|
||||||
|
25
gflib/text.h
25
gflib/text.h
@ -5,7 +5,9 @@
|
|||||||
|
|
||||||
#define NUM_TEXT_PRINTERS 32
|
#define NUM_TEXT_PRINTERS 32
|
||||||
|
|
||||||
#define TEXT_SPEED_FF 0xFF
|
// Given as a text speed when all the text should be
|
||||||
|
// loaded at once but not copied to vram yet.
|
||||||
|
#define TEXT_SKIP_DRAW 0xFF
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FONT_SMALL,
|
FONT_SMALL,
|
||||||
@ -20,6 +22,25 @@ enum {
|
|||||||
FONT_BOLD, // JP glyph set only
|
FONT_BOLD, // JP glyph set only
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Return values for font functions
|
||||||
|
enum {
|
||||||
|
RENDER_PRINT,
|
||||||
|
RENDER_FINISH,
|
||||||
|
RENDER_REPEAT, // Run render function again, if e.g. a control code is encountered.
|
||||||
|
RENDER_UPDATE,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Text printer states read by RenderText / FontFunc_Braille
|
||||||
|
enum {
|
||||||
|
RENDER_STATE_HANDLE_CHAR,
|
||||||
|
RENDER_STATE_WAIT,
|
||||||
|
RENDER_STATE_CLEAR,
|
||||||
|
RENDER_STATE_SCROLL_START,
|
||||||
|
RENDER_STATE_SCROLL,
|
||||||
|
RENDER_STATE_WAIT_SE,
|
||||||
|
RENDER_STATE_PAUSE,
|
||||||
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FONTATTR_MAX_LETTER_WIDTH,
|
FONTATTR_MAX_LETTER_WIDTH,
|
||||||
FONTATTR_MAX_LETTER_HEIGHT,
|
FONTATTR_MAX_LETTER_HEIGHT,
|
||||||
@ -128,7 +149,6 @@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8
|
|||||||
bool16 AddTextPrinter(struct TextPrinterTemplate *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16));
|
bool16 AddTextPrinter(struct TextPrinterTemplate *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16));
|
||||||
void RunTextPrinters(void);
|
void RunTextPrinters(void);
|
||||||
bool16 IsTextPrinterActive(u8 id);
|
bool16 IsTextPrinterActive(u8 id);
|
||||||
u32 RenderFont(struct TextPrinter *textPrinter);
|
|
||||||
void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor);
|
void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||||
void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
||||||
void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
||||||
@ -145,7 +165,6 @@ bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter);
|
|||||||
bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter);
|
bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter);
|
||||||
bool16 TextPrinterWait(struct TextPrinter *textPrinter);
|
bool16 TextPrinterWait(struct TextPrinter *textPrinter);
|
||||||
void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex);
|
void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex);
|
||||||
u16 RenderText(struct TextPrinter *textPrinter);
|
|
||||||
s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
|
s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
|
||||||
u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str);
|
u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str);
|
||||||
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
|
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
|
||||||
|
@ -643,7 +643,7 @@ static void CreateApprenticeMenu(u8 menu)
|
|||||||
SetStandardWindowBorderStyle(windowId, 0);
|
SetStandardWindowBorderStyle(windowId, 0);
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
InitMenuInUpperLeftCornerNormal(windowId, count, 0);
|
InitMenuInUpperLeftCornerNormal(windowId, count, 0);
|
||||||
CreateChooseAnswerTask(TRUE, count, windowId);
|
CreateChooseAnswerTask(TRUE, count, windowId);
|
||||||
|
@ -2525,7 +2525,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
|
|||||||
color[1] = 1;
|
color[1] = 1;
|
||||||
color[2] = 3;
|
color[2] = 3;
|
||||||
|
|
||||||
AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, -1, str);
|
AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||||
|
|
||||||
*windowId = winId;
|
*windowId = winId;
|
||||||
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));
|
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));
|
||||||
|
@ -682,7 +682,7 @@ static void CB2_InitBattleInternal(void)
|
|||||||
{
|
{
|
||||||
CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A, TRUE);
|
CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A, TRUE);
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||||
CreateNPCTrainerParty(&gEnemyParty[3], gTrainerBattleOpponent_B, FALSE);
|
CreateNPCTrainerParty(&gEnemyParty[PARTY_SIZE / 2], gTrainerBattleOpponent_B, FALSE);
|
||||||
SetWildMonHeldItem();
|
SetWildMonHeldItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ static void PrintItemQuantity(u8 windowId, u32 itemIndex, u8 y)
|
|||||||
2);
|
2);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
xAlign = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
xAlign = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
||||||
PyramidBagPrint_Quantity(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SPEED_FF, COLORID_DARK_GRAY);
|
PyramidBagPrint_Quantity(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SKIP_DRAW, COLORID_DARK_GRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintItemDescription(s32 listMenuId)
|
static void PrintItemDescription(s32 listMenuId)
|
||||||
|
@ -6053,7 +6053,7 @@ static void DrawLevelUpBannerText(void)
|
|||||||
printerTemplate.bgColor = TEXT_COLOR_TRANSPARENT;
|
printerTemplate.bgColor = TEXT_COLOR_TRANSPARENT;
|
||||||
printerTemplate.shadowColor = TEXT_COLOR_DARK_GRAY;
|
printerTemplate.shadowColor = TEXT_COLOR_DARK_GRAY;
|
||||||
|
|
||||||
AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printerTemplate, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
txtPtr = gStringVar4;
|
txtPtr = gStringVar4;
|
||||||
*(txtPtr)++ = CHAR_EXTRA_SYMBOL;
|
*(txtPtr)++ = CHAR_EXTRA_SYMBOL;
|
||||||
@ -6083,7 +6083,7 @@ static void DrawLevelUpBannerText(void)
|
|||||||
|
|
||||||
printerTemplate.y = 10;
|
printerTemplate.y = 10;
|
||||||
printerTemplate.currentY = 10;
|
printerTemplate.currentY = 10;
|
||||||
AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printerTemplate, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, COPYWIN_GFX);
|
CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
@ -3495,7 +3495,7 @@ static bool8 PrintBlendingResults(void)
|
|||||||
u8 *txtPtr;
|
u8 *txtPtr;
|
||||||
|
|
||||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_BlendingResults, 0xA8);
|
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_BlendingResults, 0xA8);
|
||||||
Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SPEED_FF, 0);
|
Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SKIP_DRAW, 0);
|
||||||
|
|
||||||
if (sBerryBlender->numPlayers == BLENDER_MAX_PLAYERS)
|
if (sBerryBlender->numPlayers == BLENDER_MAX_PLAYERS)
|
||||||
yPos = 17;
|
yPos = 17;
|
||||||
@ -3510,15 +3510,15 @@ static bool8 PrintBlendingResults(void)
|
|||||||
StringAppend(sBerryBlender->stringVar, sText_Dot);
|
StringAppend(sBerryBlender->stringVar, sText_Dot);
|
||||||
StringAppend(sBerryBlender->stringVar, gText_Space);
|
StringAppend(sBerryBlender->stringVar, gText_Space);
|
||||||
StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name);
|
StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 8, yPos, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 8, yPos, TEXT_SKIP_DRAW, 3);
|
||||||
|
|
||||||
StringCopy(sBerryBlender->stringVar, sBerryBlender->blendedBerries[place].name);
|
StringCopy(sBerryBlender->stringVar, sBerryBlender->blendedBerries[place].name);
|
||||||
ConvertInternationalString(sBerryBlender->stringVar, gLinkPlayers[place].language);
|
ConvertInternationalString(sBerryBlender->stringVar, gLinkPlayers[place].language);
|
||||||
StringAppend(sBerryBlender->stringVar, sText_SpaceBerry);
|
StringAppend(sBerryBlender->stringVar, sText_SpaceBerry);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0x54, yPos, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0x54, yPos, TEXT_SKIP_DRAW, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
Blender_AddTextPrinter(5, sText_MaximumSpeed, 0, 0x51, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sText_MaximumSpeed, 0, 0x51, TEXT_SKIP_DRAW, 3);
|
||||||
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->maxRPM / 100, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->maxRPM / 100, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
StringAppend(sBerryBlender->stringVar, sText_Dot);
|
StringAppend(sBerryBlender->stringVar, sText_Dot);
|
||||||
|
|
||||||
@ -3527,8 +3527,8 @@ static bool8 PrintBlendingResults(void)
|
|||||||
StringAppend(sBerryBlender->stringVar, sText_RPM);
|
StringAppend(sBerryBlender->stringVar, sText_RPM);
|
||||||
|
|
||||||
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
|
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SKIP_DRAW, 3);
|
||||||
Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SKIP_DRAW, 3);
|
||||||
|
|
||||||
seconds = (sBerryBlender->gameFrameTime / 60) % 60;
|
seconds = (sBerryBlender->gameFrameTime / 60) % 60;
|
||||||
minutes = (sBerryBlender->gameFrameTime / (60 * 60));
|
minutes = (sBerryBlender->gameFrameTime / (60 * 60));
|
||||||
@ -3540,7 +3540,7 @@ static bool8 PrintBlendingResults(void)
|
|||||||
StringAppend(sBerryBlender->stringVar, sText_Sec);
|
StringAppend(sBerryBlender->stringVar, sText_Sec);
|
||||||
|
|
||||||
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
|
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SKIP_DRAW, 3);
|
||||||
|
|
||||||
sBerryBlender->framesToWait = 0;
|
sBerryBlender->framesToWait = 0;
|
||||||
sBerryBlender->mainState++;
|
sBerryBlender->mainState++;
|
||||||
@ -3694,7 +3694,7 @@ static bool8 PrintBlendingRanking(void)
|
|||||||
case 3:
|
case 3:
|
||||||
DrawStdFrameWithCustomTileAndPalette(5, 0, 1, 0xD);
|
DrawStdFrameWithCustomTileAndPalette(5, 0, 1, 0xD);
|
||||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168);
|
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168);
|
||||||
Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SPEED_FF, 0);
|
Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0);
|
||||||
|
|
||||||
sBerryBlender->scoreIconIds[SCORE_BEST] = CreateSprite(&sSpriteTemplate_ScoreSymbols, 128, 52, 0);
|
sBerryBlender->scoreIconIds[SCORE_BEST] = CreateSprite(&sSpriteTemplate_ScoreSymbols, 128, 52, 0);
|
||||||
StartSpriteAnim(&gSprites[sBerryBlender->scoreIconIds[SCORE_BEST]], SCOREANIM_BEST_STATIC);
|
StartSpriteAnim(&gSprites[sBerryBlender->scoreIconIds[SCORE_BEST]], SCOREANIM_BEST_STATIC);
|
||||||
@ -3718,16 +3718,16 @@ static bool8 PrintBlendingRanking(void)
|
|||||||
StringAppend(sBerryBlender->stringVar, sText_Dot);
|
StringAppend(sBerryBlender->stringVar, sText_Dot);
|
||||||
StringAppend(sBerryBlender->stringVar, gText_Space);
|
StringAppend(sBerryBlender->stringVar, gText_Space);
|
||||||
StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name);
|
StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0, yPos, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0, yPos, TEXT_SKIP_DRAW, 3);
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_BEST], STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_BEST], STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78, yPos, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78, yPos, TEXT_SKIP_DRAW, 3);
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_GOOD], STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_GOOD], STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SKIP_DRAW, 3);
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_MISS], STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_MISS], STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SPEED_FF, 3);
|
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SKIP_DRAW, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
PutWindowTilemap(5);
|
PutWindowTilemap(5);
|
||||||
|
@ -305,19 +305,19 @@ static void BerryFix_GpuSet(void)
|
|||||||
|
|
||||||
width = GetStringWidth(FONT_SMALL, sText_Emerald, 0);
|
width = GetStringWidth(FONT_SMALL, sText_Emerald, 0);
|
||||||
left = (120 - width) / 2;
|
left = (120 - width) / 2;
|
||||||
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_Emerald);
|
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_Emerald);
|
||||||
|
|
||||||
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
|
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
|
||||||
left = (120 - width) / 2 + 120;
|
left = (120 - width) / 2 + 120;
|
||||||
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire);
|
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire);
|
||||||
|
|
||||||
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
|
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
|
||||||
left = (112 - width) / 2;
|
left = (112 - width) / 2;
|
||||||
AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire);
|
AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire);
|
||||||
|
|
||||||
width = GetStringWidth(FONT_NORMAL, sText_BerryProgramUpdate, 0);
|
width = GetStringWidth(FONT_NORMAL, sText_BerryProgramUpdate, 0);
|
||||||
left = (208 - width) / 2;
|
left = (208 - width) / 2;
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SKIP_DRAW, sText_BerryProgramUpdate);
|
||||||
|
|
||||||
CopyWindowToVram(2, COPYWIN_GFX);
|
CopyWindowToVram(2, COPYWIN_GFX);
|
||||||
CopyWindowToVram(3, COPYWIN_GFX);
|
CopyWindowToVram(3, COPYWIN_GFX);
|
||||||
@ -346,7 +346,7 @@ static void BerryFix_SetScene(int scene)
|
|||||||
{
|
{
|
||||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
|
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
|
||||||
FillWindowPixelBuffer(1, PIXEL_FILL(10));
|
FillWindowPixelBuffer(1, PIXEL_FILL(10));
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, TEXT_SKIP_DRAW, sBerryProgramTexts[scene]);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
CopyWindowToVram(1, COPYWIN_GFX);
|
CopyWindowToVram(1, COPYWIN_GFX);
|
||||||
switch (scene)
|
switch (scene)
|
||||||
|
@ -211,7 +211,7 @@ static void PrintBerryPowderAmount(u8 windowId, int amount, u8 x, u8 y, u8 speed
|
|||||||
static void DrawPlayerPowderAmount(u8 windowId, u16 baseTileOffset, u8 paletteNum, u32 amount)
|
static void DrawPlayerPowderAmount(u8 windowId, u16 baseTileOffset, u8 paletteNum, u32 amount)
|
||||||
{
|
{
|
||||||
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, baseTileOffset, paletteNum);
|
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, baseTileOffset, paletteNum);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Powder, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Powder, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintBerryPowderAmount(windowId, amount, 26, 17, 0);
|
PrintBerryPowderAmount(windowId, amount, 26, 17, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ static void PrintBerryNumberAndName(void)
|
|||||||
static void PrintBerrySize(void)
|
static void PrintBerrySize(void)
|
||||||
{
|
{
|
||||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_SizeSlash, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
if (berry->size != 0)
|
if (berry->size != 0)
|
||||||
{
|
{
|
||||||
u32 inches, fraction;
|
u32 inches, fraction;
|
||||||
@ -434,7 +434,7 @@ static void PrintBerrySize(void)
|
|||||||
static void PrintBerryFirmness(void)
|
static void PrintBerryFirmness(void)
|
||||||
{
|
{
|
||||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_FirmSlash, 0, 0x11, TEXT_SKIP_DRAW, NULL);
|
||||||
if (berry->firmness != 0)
|
if (berry->firmness != 0)
|
||||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL);
|
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL);
|
||||||
else
|
else
|
||||||
|
319
src/braille.c
319
src/braille.c
@ -21,187 +21,174 @@ u16 FontFunc_Braille(struct TextPrinter *textPrinter)
|
|||||||
|
|
||||||
switch (textPrinter->state)
|
switch (textPrinter->state)
|
||||||
{
|
{
|
||||||
case 0:
|
case RENDER_STATE_HANDLE_CHAR:
|
||||||
if (JOY_HELD(A_BUTTON | B_BUTTON) && subStruct->hasPrintBeenSpedUp)
|
if (JOY_HELD(A_BUTTON | B_BUTTON) && subStruct->hasPrintBeenSpedUp)
|
||||||
|
{
|
||||||
|
textPrinter->delayCounter = 0;
|
||||||
|
}
|
||||||
|
if (textPrinter->delayCounter && textPrinter->textSpeed)
|
||||||
|
{
|
||||||
|
textPrinter->delayCounter --;
|
||||||
|
if (gTextFlags.canABSpeedUpPrint && JOY_NEW(A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
|
subStruct->hasPrintBeenSpedUp = TRUE;
|
||||||
textPrinter->delayCounter = 0;
|
textPrinter->delayCounter = 0;
|
||||||
}
|
}
|
||||||
if (textPrinter->delayCounter && textPrinter->textSpeed)
|
return RENDER_UPDATE;
|
||||||
{
|
}
|
||||||
textPrinter->delayCounter --;
|
if (gTextFlags.autoScroll)
|
||||||
if (gTextFlags.canABSpeedUpPrint && JOY_NEW(A_BUTTON | B_BUTTON))
|
textPrinter->delayCounter = 3;
|
||||||
{
|
else
|
||||||
subStruct->hasPrintBeenSpedUp = TRUE;
|
textPrinter->delayCounter = textPrinter->textSpeed;
|
||||||
textPrinter->delayCounter = 0;
|
|
||||||
}
|
char_ = *textPrinter->printerTemplate.currentChar++;
|
||||||
return 3;
|
switch (char_)
|
||||||
}
|
{
|
||||||
if (gTextFlags.autoScroll)
|
case EOS:
|
||||||
{
|
return RENDER_FINISH;
|
||||||
textPrinter->delayCounter = 3;
|
case CHAR_NEWLINE:
|
||||||
}
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
||||||
else
|
textPrinter->printerTemplate.currentY += gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing;
|
||||||
{
|
return RENDER_REPEAT;
|
||||||
textPrinter->delayCounter = textPrinter->textSpeed;
|
case PLACEHOLDER_BEGIN:
|
||||||
}
|
textPrinter->printerTemplate.currentChar++;
|
||||||
|
return RENDER_REPEAT;
|
||||||
|
case EXT_CTRL_CODE_BEGIN:
|
||||||
char_ = *textPrinter->printerTemplate.currentChar++;
|
char_ = *textPrinter->printerTemplate.currentChar++;
|
||||||
switch (char_)
|
switch (char_)
|
||||||
{
|
{
|
||||||
case EOS:
|
case EXT_CTRL_CODE_COLOR:
|
||||||
return 1;
|
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar++;
|
||||||
case CHAR_NEWLINE:
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
return RENDER_REPEAT;
|
||||||
textPrinter->printerTemplate.currentY += gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing;
|
case EXT_CTRL_CODE_HIGHLIGHT:
|
||||||
return 2;
|
textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar++;
|
||||||
case PLACEHOLDER_BEGIN:
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
textPrinter->printerTemplate.currentChar++;
|
return RENDER_REPEAT;
|
||||||
return 2;
|
case EXT_CTRL_CODE_SHADOW:
|
||||||
case EXT_CTRL_CODE_BEGIN:
|
textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar++;
|
||||||
char_ = *textPrinter->printerTemplate.currentChar++;
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
switch (char_)
|
return RENDER_REPEAT;
|
||||||
{
|
case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW:
|
||||||
case EXT_CTRL_CODE_COLOR:
|
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.bgColor = *++textPrinter->printerTemplate.currentChar;
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
textPrinter->printerTemplate.shadowColor = *++textPrinter->printerTemplate.currentChar;
|
||||||
return 2;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
case EXT_CTRL_CODE_HIGHLIGHT:
|
|
||||||
textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar++;
|
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
|
||||||
return 2;
|
|
||||||
case EXT_CTRL_CODE_SHADOW:
|
|
||||||
textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar++;
|
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
|
||||||
return 2;
|
|
||||||
case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW:
|
|
||||||
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar;
|
|
||||||
textPrinter->printerTemplate.bgColor = *++textPrinter->printerTemplate.currentChar;
|
|
||||||
textPrinter->printerTemplate.shadowColor = *++textPrinter->printerTemplate.currentChar;
|
|
||||||
textPrinter->printerTemplate.currentChar++;
|
|
||||||
|
|
||||||
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PALETTE:
|
case EXT_CTRL_CODE_PALETTE:
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_FONT:
|
case EXT_CTRL_CODE_FONT:
|
||||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_RESET_SIZE:
|
case EXT_CTRL_CODE_RESET_SIZE:
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PAUSE:
|
case EXT_CTRL_CODE_PAUSE:
|
||||||
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++;
|
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++;
|
||||||
textPrinter->state = 6;
|
textPrinter->state = RENDER_STATE_PAUSE;
|
||||||
return 2;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||||
textPrinter->state = 1;
|
textPrinter->state = RENDER_STATE_WAIT;
|
||||||
if (gTextFlags.autoScroll)
|
if (gTextFlags.autoScroll)
|
||||||
{
|
subStruct->autoScrollDelay = 0;
|
||||||
subStruct->autoScrollDelay = 0;
|
return RENDER_UPDATE;
|
||||||
}
|
case EXT_CTRL_CODE_WAIT_SE:
|
||||||
return 3;
|
textPrinter->state = RENDER_STATE_WAIT_SE;
|
||||||
case EXT_CTRL_CODE_WAIT_SE:
|
return RENDER_UPDATE;
|
||||||
textPrinter->state = 5;
|
case EXT_CTRL_CODE_PLAY_BGM:
|
||||||
return 3;
|
case EXT_CTRL_CODE_PLAY_SE:
|
||||||
case EXT_CTRL_CODE_PLAY_BGM:
|
textPrinter->printerTemplate.currentChar += 2;
|
||||||
case EXT_CTRL_CODE_PLAY_SE:
|
return RENDER_REPEAT;
|
||||||
textPrinter->printerTemplate.currentChar += 2;
|
case EXT_CTRL_CODE_ESCAPE:
|
||||||
return 2;
|
char_ = *++textPrinter->printerTemplate.currentChar;
|
||||||
case EXT_CTRL_CODE_ESCAPE:
|
break;
|
||||||
char_ = *++textPrinter->printerTemplate.currentChar;
|
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||||
break;
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++;
|
||||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
return RENDER_REPEAT;
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++;
|
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||||
return 2;
|
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++;
|
||||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
return RENDER_REPEAT;
|
||||||
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++;
|
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||||
return 2;
|
|
||||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
|
||||||
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CHAR_PROMPT_CLEAR:
|
|
||||||
textPrinter->state = 2;
|
|
||||||
TextPrinterInitDownArrowCounters(textPrinter);
|
|
||||||
return 3;
|
|
||||||
case CHAR_PROMPT_SCROLL:
|
|
||||||
textPrinter->state = 3;
|
|
||||||
TextPrinterInitDownArrowCounters(textPrinter);
|
|
||||||
return 3;
|
|
||||||
case CHAR_EXTRA_SYMBOL:
|
|
||||||
char_ = *textPrinter->printerTemplate.currentChar++| 0x100;
|
|
||||||
break;
|
|
||||||
case CHAR_KEYPAD_ICON:
|
|
||||||
textPrinter->printerTemplate.currentChar++;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
DecompressGlyph_Braille(char_);
|
|
||||||
CopyGlyphToWindow(textPrinter);
|
|
||||||
textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing;
|
|
||||||
return 0;
|
|
||||||
case 1:
|
|
||||||
if (TextPrinterWait(textPrinter))
|
|
||||||
{
|
|
||||||
textPrinter->state = 0;
|
|
||||||
}
|
|
||||||
return 3;
|
|
||||||
case 2:
|
|
||||||
if (TextPrinterWaitWithDownArrow(textPrinter))
|
|
||||||
{
|
|
||||||
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
return RENDER_REPEAT;
|
||||||
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
|
|
||||||
textPrinter->state = 0;
|
|
||||||
}
|
}
|
||||||
return 3;
|
break;
|
||||||
case 3:
|
case CHAR_PROMPT_CLEAR:
|
||||||
if (TextPrinterWaitWithDownArrow(textPrinter))
|
textPrinter->state = RENDER_STATE_CLEAR;
|
||||||
|
TextPrinterInitDownArrowCounters(textPrinter);
|
||||||
|
return RENDER_UPDATE;
|
||||||
|
case CHAR_PROMPT_SCROLL:
|
||||||
|
textPrinter->state = RENDER_STATE_SCROLL_START;
|
||||||
|
TextPrinterInitDownArrowCounters(textPrinter);
|
||||||
|
return RENDER_UPDATE;
|
||||||
|
case CHAR_EXTRA_SYMBOL:
|
||||||
|
char_ = *textPrinter->printerTemplate.currentChar++| 0x100;
|
||||||
|
break;
|
||||||
|
case CHAR_KEYPAD_ICON:
|
||||||
|
textPrinter->printerTemplate.currentChar++;
|
||||||
|
return RENDER_PRINT;
|
||||||
|
}
|
||||||
|
DecompressGlyph_Braille(char_);
|
||||||
|
CopyGlyphToWindow(textPrinter);
|
||||||
|
textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing;
|
||||||
|
return RENDER_PRINT;
|
||||||
|
case RENDER_STATE_WAIT:
|
||||||
|
if (TextPrinterWait(textPrinter))
|
||||||
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
|
return RENDER_UPDATE;
|
||||||
|
case RENDER_STATE_CLEAR:
|
||||||
|
if (TextPrinterWaitWithDownArrow(textPrinter))
|
||||||
|
{
|
||||||
|
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||||
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
||||||
|
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
|
||||||
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
|
}
|
||||||
|
return RENDER_UPDATE;
|
||||||
|
case RENDER_STATE_SCROLL_START:
|
||||||
|
if (TextPrinterWaitWithDownArrow(textPrinter))
|
||||||
|
{
|
||||||
|
TextPrinterClearDownArrow(textPrinter);
|
||||||
|
textPrinter->scrollDistance = gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing;
|
||||||
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
||||||
|
textPrinter->state = RENDER_STATE_SCROLL;
|
||||||
|
}
|
||||||
|
return RENDER_UPDATE;
|
||||||
|
case RENDER_STATE_SCROLL:
|
||||||
|
if (textPrinter->scrollDistance)
|
||||||
|
{
|
||||||
|
if (textPrinter->scrollDistance < sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed])
|
||||||
{
|
{
|
||||||
TextPrinterClearDownArrow(textPrinter);
|
ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||||
textPrinter->scrollDistance = gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing;
|
textPrinter->scrollDistance = 0;
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
|
|
||||||
textPrinter->state = 4;
|
|
||||||
}
|
|
||||||
return 3;
|
|
||||||
case 4:
|
|
||||||
if (textPrinter->scrollDistance)
|
|
||||||
{
|
|
||||||
if (textPrinter->scrollDistance < sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed])
|
|
||||||
{
|
|
||||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
|
||||||
textPrinter->scrollDistance = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
|
||||||
textPrinter->scrollDistance -= sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed];
|
|
||||||
}
|
|
||||||
CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
textPrinter->state = 0;
|
ScrollWindow(textPrinter->printerTemplate.windowId, 0, sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||||
|
textPrinter->scrollDistance -= sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed];
|
||||||
}
|
}
|
||||||
return 3;
|
CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX);
|
||||||
case 5:
|
}
|
||||||
if (!IsSEPlaying())
|
else
|
||||||
{
|
{
|
||||||
textPrinter->state = 0;
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
}
|
}
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
case 6:
|
case RENDER_STATE_WAIT_SE:
|
||||||
if (textPrinter->delayCounter)
|
if (!IsSEPlaying())
|
||||||
{
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
textPrinter->delayCounter --;
|
return RENDER_UPDATE;
|
||||||
}
|
case RENDER_STATE_PAUSE:
|
||||||
else
|
if (textPrinter->delayCounter)
|
||||||
{
|
textPrinter->delayCounter --;
|
||||||
textPrinter->state = 0;
|
else
|
||||||
}
|
textPrinter->state = RENDER_STATE_HANDLE_CHAR;
|
||||||
return 3;
|
return RENDER_UPDATE;
|
||||||
}
|
}
|
||||||
return 1;
|
return RENDER_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DecompressGlyph_Braille(u16 glyph)
|
static void DecompressGlyph_Braille(u16 glyph)
|
||||||
|
@ -100,7 +100,7 @@ static void PrintNumPlayersInLink(u16 windowId, u32 numPlayers)
|
|||||||
SetStandardWindowBorderStyle(windowId, 0);
|
SetStandardWindowBorderStyle(windowId, 0);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink);
|
StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink);
|
||||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88);
|
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, 0xFF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(windowId, COPYWIN_FULL);
|
CopyWindowToVram(windowId, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1181,7 +1181,7 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId)
|
|||||||
if (strWidth > 30)
|
if (strWidth > 30)
|
||||||
strWidth = 30;
|
strWidth = 30;
|
||||||
|
|
||||||
AddTextPrinterParameterized3(windowId, FONT_NORMAL, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text);
|
AddTextPrinterParameterized3(windowId, FONT_NORMAL, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, TEXT_SKIP_DRAW, text);
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
struct Sprite *sprite;
|
struct Sprite *sprite;
|
||||||
|
@ -401,7 +401,7 @@ static void PrintCreditsText(const u8 *string, u8 y, bool8 isTitle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
x = GetStringCenterAlignXOffsetWithLetterSpacing(FONT_NORMAL, string, DISPLAY_WIDTH, 1);
|
x = GetStringCenterAlignXOffsetWithLetterSpacing(FONT_NORMAL, string, DISPLAY_WIDTH, 1);
|
||||||
AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 1, 0, color, -1, string);
|
AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 1, 0, color, TEXT_SKIP_DRAW, string);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define tMainTaskId data[1]
|
#define tMainTaskId data[1]
|
||||||
|
@ -1199,7 +1199,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
|
|||||||
printer.bgColor = 1;
|
printer.bgColor = 1;
|
||||||
printer.shadowColor = 3;
|
printer.shadowColor = 3;
|
||||||
|
|
||||||
AddTextPrinter(&printer, 0xFF, NULL);
|
AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DaycarePrintMonNickname(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
|
static void DaycarePrintMonNickname(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
|
||||||
|
@ -723,9 +723,9 @@ static void PrintDecorationCategoryMenuItems(u8 taskId)
|
|||||||
{
|
{
|
||||||
// Only DOLL and CUSHION decorations are enabled when decorating the player's room.
|
// Only DOLL and CUSHION decorations are enabled when decorating the player's room.
|
||||||
if (shouldDisable == TRUE && i != DECORCAT_DOLL && i != DECORCAT_CUSHION)
|
if (shouldDisable == TRUE && i != DECORCAT_DOLL && i != DECORCAT_CUSHION)
|
||||||
PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, TRUE, TEXT_SPEED_FF);
|
PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, TRUE, TEXT_SKIP_DRAW);
|
||||||
else
|
else
|
||||||
PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, FALSE, TEXT_SPEED_FF);
|
PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, FALSE, TEXT_SKIP_DRAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gTasks[taskId].tDecorationMenuCommand == DECOR_MENU_TRADE ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gTasks[taskId].tDecorationMenuCommand == DECOR_MENU_TRADE ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL);
|
||||||
|
@ -205,5 +205,5 @@ static void PrintDiplomaText(u8 *text, u8 var1, u8 var2)
|
|||||||
{
|
{
|
||||||
u8 color[3] = {0, 2, 3};
|
u8 color[3] = {0, 2, 3};
|
||||||
|
|
||||||
AddTextPrinterParameterized4(0, FONT_NORMAL, var1, var2, 0, 0, color, -1, text);
|
AddTextPrinterParameterized4(0, FONT_NORMAL, var1, var2, 0, 0, color, TEXT_SKIP_DRAW, text);
|
||||||
}
|
}
|
||||||
|
@ -3008,14 +3008,14 @@ static void PrintRecordsText(u8 windowId, s32 width)
|
|||||||
LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0);
|
LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0);
|
||||||
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
||||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BerryPickingRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryPickingRecords, width * 8), 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BerryPickingRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryPickingRecords, width * 8), 1, TEXT_SKIP_DRAW, NULL);
|
||||||
for (i = 0; i < NUM_RECORD_TYPES; i++)
|
for (i = 0; i < NUM_RECORD_TYPES; i++)
|
||||||
{
|
{
|
||||||
ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, sRecordNumMaxDigits[i]);
|
ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, sRecordNumMaxDigits[i]);
|
||||||
numWidth = GetStringWidth(FONT_NORMAL, gStringVar1, -1);
|
numWidth = GetStringWidth(FONT_NORMAL, gStringVar1, -1);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SKIP_DRAW, NULL);
|
||||||
x = (width * 8) - numWidth;
|
x = (width * 8) - numWidth;
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
}
|
}
|
||||||
@ -4649,7 +4649,7 @@ static void ShowNames(void)
|
|||||||
if (playerId == GetMultiplayerId())
|
if (playerId == GetMultiplayerId())
|
||||||
colorsId = COLORID_BLUE;
|
colorsId = COLORID_BLUE;
|
||||||
name = GetPlayerName(playerId);
|
name = GetPlayerName(playerId);
|
||||||
AddTextPrinterParameterized3(sGfx->windowIds[i], FONT_NORMAL, left, 1, sTextColorTable[colorsId], -1, name);
|
AddTextPrinterParameterized3(sGfx->windowIds[i], FONT_NORMAL, left, 1, sTextColorTable[colorsId], TEXT_SKIP_DRAW, name);
|
||||||
CopyWindowToVram(sGfx->windowIds[i], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[i], COPYWIN_GFX);
|
||||||
window.baseBlock += 0xE;
|
window.baseBlock += 0xE;
|
||||||
DrawMessageWindow(&window);
|
DrawMessageWindow(&window);
|
||||||
@ -4733,15 +4733,15 @@ static void PrintRankedScores(u8 numPlayers_)
|
|||||||
u8 playerId = playersByRanking[i];
|
u8 playerId = playersByRanking[i];
|
||||||
u32 points = scoreResults[playerId].score;
|
u32 points = scoreResults[playerId].score;
|
||||||
|
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], TEXT_SKIP_DRAW, NULL);
|
||||||
if (playerId == GetMultiplayerId())
|
if (playerId == GetMultiplayerId())
|
||||||
colorsId = COLORID_BLUE;
|
colorsId = COLORID_BLUE;
|
||||||
name = GetPlayerName(playerId);
|
name = GetPlayerName(playerId);
|
||||||
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 28, sRankingYCoords[i], sTextColorTable[colorsId], -1, name);
|
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 28, sRankingYCoords[i], sTextColorTable[colorsId], TEXT_SKIP_DRAW, name);
|
||||||
ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_LEFT_ALIGN, 7);
|
ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_LEFT_ALIGN, 7);
|
||||||
numWidth = GetStringWidth(FONT_NORMAL, numString, -1);
|
numWidth = GetStringWidth(FONT_NORMAL, numString, -1);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, numString, x - numWidth, sRankingYCoords[i], -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, numString, x - numWidth, sRankingYCoords[i], TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_SpacePoints, x, sRankingYCoords[i], -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_SpacePoints, x, sRankingYCoords[i], TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4772,8 +4772,8 @@ static void ShowResults(void)
|
|||||||
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
||||||
strWidth = GetStringWidth(FONT_NORMAL, gText_BerryPickingResults, -1);
|
strWidth = GetStringWidth(FONT_NORMAL, gText_BerryPickingResults, -1);
|
||||||
x = (224 - strWidth) / 2;
|
x = (224 - strWidth) / 2;
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_BerryPickingResults, x, 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_BerryPickingResults, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_10P30P50P50P, 68, 17, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_10P30P50P50P, 68, 17, TEXT_SKIP_DRAW, NULL);
|
||||||
for (i = 0; i < numPlayers; i++)
|
for (i = 0; i < numPlayers; i++)
|
||||||
{
|
{
|
||||||
u8 colorsId = COLORID_GRAY;
|
u8 colorsId = COLORID_GRAY;
|
||||||
@ -4781,7 +4781,7 @@ static void ShowResults(void)
|
|||||||
colorsId = COLORID_BLUE;
|
colorsId = COLORID_BLUE;
|
||||||
|
|
||||||
name = GetPlayerName(i);
|
name = GetPlayerName(i);
|
||||||
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 0, sResultsYCoords[i], sTextColorTable[colorsId], -1, name);
|
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 0, sResultsYCoords[i], sTextColorTable[colorsId], TEXT_SKIP_DRAW, name);
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
u32 width;
|
u32 width;
|
||||||
@ -4793,9 +4793,9 @@ static void ShowResults(void)
|
|||||||
|
|
||||||
// If player got the most of a berry type, highlight their number in red
|
// If player got the most of a berry type, highlight their number in red
|
||||||
if (maxBerriesPicked == berriesPicked && maxBerriesPicked != 0)
|
if (maxBerriesPicked == berriesPicked && maxBerriesPicked != 0)
|
||||||
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], -1, gStringVar4);
|
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], TEXT_SKIP_DRAW, gStringVar4);
|
||||||
else
|
else
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
||||||
@ -4826,7 +4826,7 @@ static void ShowResults(void)
|
|||||||
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
||||||
strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingRankings, -1);
|
strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingRankings, -1);
|
||||||
x = (224 - strWidth) / 2;
|
x = (224 - strWidth) / 2;
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingRankings, x, 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingRankings, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
sGfx->state++;
|
sGfx->state++;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
@ -4872,12 +4872,12 @@ static void ShowResults(void)
|
|||||||
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
||||||
strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingPrizes, -1);
|
strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingPrizes, -1);
|
||||||
x = (224 - strWidth) / 2;
|
x = (224 - strWidth) / 2;
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingPrizes, x, 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingPrizes, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
DynamicPlaceholderTextUtil_Reset();
|
DynamicPlaceholderTextUtil_Reset();
|
||||||
CopyItemName(GetPrizeItemId(), gStringVar1);
|
CopyItemName(GetPrizeItemId(), gStringVar1);
|
||||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FirstPlacePrize);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FirstPlacePrize);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
prizeState = TryGivePrize();
|
prizeState = TryGivePrize();
|
||||||
if (prizeState != PRIZE_RECEIVED && prizeState != NO_PRIZE)
|
if (prizeState != PRIZE_RECEIVED && prizeState != NO_PRIZE)
|
||||||
{
|
{
|
||||||
@ -4888,7 +4888,7 @@ static void ShowResults(void)
|
|||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_CantHoldAnyMore);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_CantHoldAnyMore);
|
||||||
else if (prizeState == PRIZE_FILLED_BAG)
|
else if (prizeState == PRIZE_FILLED_BAG)
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FilledStorageSpace);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FilledStorageSpace);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 41, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 41, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
||||||
CopyWindowToVram(sGfx->windowIds[1], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[1], COPYWIN_GFX);
|
||||||
@ -4946,10 +4946,10 @@ static void Msg_WantToPlayAgain(void)
|
|||||||
// Print text
|
// Print text
|
||||||
FillWindowPixelBuffer(sGfx->windowIds[WIN_PLAY_AGAIN], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[WIN_PLAY_AGAIN], PIXEL_FILL(1));
|
||||||
FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], FONT_NORMAL, gText_WantToPlayAgain, 0, 5, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], FONT_NORMAL, gText_WantToPlayAgain, 0, 5, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sGfx->windowIds[WIN_PLAY_AGAIN], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[WIN_PLAY_AGAIN], COPYWIN_GFX);
|
||||||
CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_GFX);
|
||||||
sGfx->state++;
|
sGfx->state++;
|
||||||
@ -4970,9 +4970,9 @@ static void Msg_WantToPlayAgain(void)
|
|||||||
if (y == PLAY_AGAIN_NONE)
|
if (y == PLAY_AGAIN_NONE)
|
||||||
y = PLAY_AGAIN_YES;
|
y = PLAY_AGAIN_YES;
|
||||||
FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_FULL);
|
CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_FULL);
|
||||||
|
|
||||||
// Increment state only if A or B button have been pressed.
|
// Increment state only if A or B button have been pressed.
|
||||||
@ -5063,7 +5063,7 @@ static void Msg_CommunicationStandby(void)
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_CommunicationStandby3, 0, 5, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_CommunicationStandby3, 0, 5, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
||||||
sGfx->state++;
|
sGfx->state++;
|
||||||
break;
|
break;
|
||||||
@ -5103,7 +5103,7 @@ static void Msg_SomeoneDroppedOut(void)
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_SomeoneDroppedOut, 0, 5, -1, NULL);
|
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_SomeoneDroppedOut, 0, 5, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX);
|
||||||
sGfx->state++;
|
sGfx->state++;
|
||||||
break;
|
break;
|
||||||
|
@ -3932,7 +3932,7 @@ static void PrintTitle(void)
|
|||||||
|
|
||||||
xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144);
|
xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144);
|
||||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||||
PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SPEED_FF, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY);
|
PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
@ -4003,10 +4003,10 @@ static void PrintEasyChatStdMessage(u8 msgId)
|
|||||||
|
|
||||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||||
if (text1)
|
if (text1)
|
||||||
PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SPEED_FF, 0);
|
PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SKIP_DRAW, 0);
|
||||||
|
|
||||||
if (text2)
|
if (text2)
|
||||||
PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SPEED_FF, 0);
|
PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SKIP_DRAW, 0);
|
||||||
|
|
||||||
CopyWindowToVram(1, COPYWIN_FULL);
|
CopyWindowToVram(1, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
@ -4099,7 +4099,7 @@ static void PrintCurrentPhrase(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
*str = EOS;
|
*str = EOS;
|
||||||
PrintEasyChatText(sScreenControl->windowId, FONT_NORMAL, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SPEED_FF, 0);
|
PrintEasyChatText(sScreenControl->windowId, FONT_NORMAL, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SKIP_DRAW, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyWindowToVram(sScreenControl->windowId, COPYWIN_FULL);
|
CopyWindowToVram(sScreenControl->windowId, COPYWIN_FULL);
|
||||||
@ -4245,7 +4245,7 @@ static void PrintKeyboardGroupNames(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SPEED_FF, NULL);
|
PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
y += 16;
|
y += 16;
|
||||||
@ -4257,7 +4257,7 @@ static void PrintKeyboardAlphabet(void)
|
|||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++)
|
for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++)
|
||||||
PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SPEED_FF, NULL);
|
PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintInitialWordSelectText(void)
|
static void PrintInitialWordSelectText(void)
|
||||||
@ -4328,9 +4328,9 @@ static void PrintWordSelectText(u8 scrollOffset, u8 numRows)
|
|||||||
{
|
{
|
||||||
CopyEasyChatWordPadded(sScreenControl->wordSelectPrintBuffer, easyChatWord, 0);
|
CopyEasyChatWordPadded(sScreenControl->wordSelectPrintBuffer, easyChatWord, 0);
|
||||||
if (!DummyWordCheck(easyChatWord))
|
if (!DummyWordCheck(easyChatWord))
|
||||||
PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, NULL);
|
PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, NULL);
|
||||||
else // Never reached
|
else // Never reached
|
||||||
PrintEasyChatTextWithColors(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY);
|
PrintEasyChatTextWithColors(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ static void CB2_EggHatch_1(void)
|
|||||||
case 5:
|
case 5:
|
||||||
GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
|
GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg);
|
StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg);
|
||||||
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, 0xFF);
|
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, TEXT_SKIP_DRAW);
|
||||||
PlayFanfare(MUS_EVOLVED);
|
PlayFanfare(MUS_EVOLVED);
|
||||||
sEggHatchData->CB2_state++;
|
sEggHatchData->CB2_state++;
|
||||||
PutWindowTilemap(sEggHatchData->windowId);
|
PutWindowTilemap(sEggHatchData->windowId);
|
||||||
|
@ -1911,10 +1911,10 @@ void ShowDeptStoreElevatorFloorSelect(void)
|
|||||||
SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0);
|
SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0);
|
||||||
|
|
||||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64);
|
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64);
|
||||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], 64);
|
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], 64);
|
||||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
PutWindowTilemap(sTutorMoveAndElevatorWindowId);
|
PutWindowTilemap(sTutorMoveAndElevatorWindowId);
|
||||||
CopyWindowToVram(sTutorMoveAndElevatorWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTutorMoveAndElevatorWindowId, COPYWIN_FULL);
|
||||||
@ -3236,9 +3236,9 @@ void ScrollableMultichoice_RedrawPersistentMenu(void)
|
|||||||
SetStandardWindowBorderStyle(task->tWindowId, 0);
|
SetStandardWindowBorderStyle(task->tWindowId, 0);
|
||||||
|
|
||||||
for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++)
|
for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++)
|
||||||
AddTextPrinterParameterized5(task->tWindowId, FONT_NORMAL, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
|
AddTextPrinterParameterized5(task->tWindowId, FONT_NORMAL, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SKIP_DRAW, NULL, 0, 0);
|
||||||
|
|
||||||
AddTextPrinterParameterized(task->tWindowId, FONT_NORMAL, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(task->tWindowId, FONT_NORMAL, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SKIP_DRAW, NULL);
|
||||||
PutWindowTilemap(task->tWindowId);
|
PutWindowTilemap(task->tWindowId);
|
||||||
CopyWindowToVram(task->tWindowId, COPYWIN_FULL);
|
CopyWindowToVram(task->tWindowId, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
|
@ -960,7 +960,7 @@ static void PrintAligned(const u8 *str, s32 y)
|
|||||||
{
|
{
|
||||||
s32 x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 224);
|
s32 x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 224);
|
||||||
y = (y * 8) + 1;
|
y = (y * 8) + 1;
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintHyphens(s32 y)
|
static void PrintHyphens(s32 y)
|
||||||
@ -973,18 +973,18 @@ static void PrintHyphens(s32 y)
|
|||||||
text[i] = EOS;
|
text[i] = EOS;
|
||||||
|
|
||||||
y = (y * 8) + 1;
|
y = (y * 8) + 1;
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, 4, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, 4, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Battle Tower records.
|
// Battle Tower records.
|
||||||
static void TowerPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
static void TowerPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL);
|
||||||
if (num > MAX_STREAK)
|
if (num > MAX_STREAK)
|
||||||
num = MAX_STREAK;
|
num = MAX_STREAK;
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TowerPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
static void TowerPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||||
@ -1056,8 +1056,8 @@ static void ShowTowerResultsWindow(u8 battleMode)
|
|||||||
StringExpandPlaceholders(gStringVar4, gText_LinkMultiBattleRoomResults);
|
StringExpandPlaceholders(gStringVar4, gText_LinkMultiBattleRoomResults);
|
||||||
|
|
||||||
PrintAligned(gStringVar4, 2);
|
PrintAligned(gStringVar4, 2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
TowerPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 132, 49);
|
TowerPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 132, 49);
|
||||||
TowerPrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 132, 65);
|
TowerPrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 132, 65);
|
||||||
@ -1079,10 +1079,10 @@ static u16 DomeGetWinStreak(u8 battleMode, u8 lvlMode)
|
|||||||
|
|
||||||
static void PrintTwoStrings(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y)
|
static void PrintTwoStrings(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SKIP_DRAW, NULL);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, str2);
|
StringExpandPlaceholders(gStringVar4, str2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DomePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
static void DomePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||||
@ -1123,8 +1123,8 @@ static void ShowDomeResultsWindow(u8 battleMode)
|
|||||||
StringExpandPlaceholders(gStringVar4, gText_DoubleBattleTourneyResults);
|
StringExpandPlaceholders(gStringVar4, gText_DoubleBattleTourneyResults);
|
||||||
|
|
||||||
PrintAligned(gStringVar4, 0);
|
PrintAligned(gStringVar4, 0);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
DomePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 64, 121, 33);
|
DomePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 64, 121, 33);
|
||||||
PrintTwoStrings(gText_Record, gText_ClearStreak, gSaveBlock2Ptr->frontier.domeRecordWinStreaks[battleMode][FRONTIER_LVL_50], 64, 121, 49);
|
PrintTwoStrings(gText_Record, gText_ClearStreak, gSaveBlock2Ptr->frontier.domeRecordWinStreaks[battleMode][FRONTIER_LVL_50], 64, 121, 49);
|
||||||
@ -1139,12 +1139,12 @@ static void ShowDomeResultsWindow(u8 battleMode)
|
|||||||
// Battle Palace records.
|
// Battle Palace records.
|
||||||
static void PalacePrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
static void PalacePrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL);
|
||||||
if (num > MAX_STREAK)
|
if (num > MAX_STREAK)
|
||||||
num = MAX_STREAK;
|
num = MAX_STREAK;
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PalacePrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
static void PalacePrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||||
@ -1199,8 +1199,8 @@ static void ShowPalaceResultsWindow(u8 battleMode)
|
|||||||
StringExpandPlaceholders(gStringVar4, gText_DoubleBattleHallResults);
|
StringExpandPlaceholders(gStringVar4, gText_DoubleBattleHallResults);
|
||||||
|
|
||||||
PrintAligned(gStringVar4, 2);
|
PrintAligned(gStringVar4, 2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
PalacePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 131, 49);
|
PalacePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 131, 49);
|
||||||
PalacePrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 131, 65);
|
PalacePrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 131, 65);
|
||||||
@ -1222,10 +1222,10 @@ static u16 PikeGetWinStreak(u8 lvlMode)
|
|||||||
|
|
||||||
static void PikePrintCleared(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y)
|
static void PikePrintCleared(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SKIP_DRAW, NULL);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, str2);
|
StringExpandPlaceholders(gStringVar4, str2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PikePrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
static void PikePrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||||
@ -1251,8 +1251,8 @@ static void ShowPikeResultsWindow(void)
|
|||||||
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
||||||
StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults);
|
StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults);
|
||||||
PrintAligned(gStringVar4, 0);
|
PrintAligned(gStringVar4, 0);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
PikePrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 114, 33);
|
PikePrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 114, 33);
|
||||||
PikePrintCleared(gText_Record, gText_RoomsCleared, gSaveBlock2Ptr->frontier.pikeRecordStreaks[FRONTIER_LVL_50], 64, 114, 49);
|
PikePrintCleared(gText_Record, gText_RoomsCleared, gSaveBlock2Ptr->frontier.pikeRecordStreaks[FRONTIER_LVL_50], 64, 114, 49);
|
||||||
@ -1267,12 +1267,12 @@ static void ShowPikeResultsWindow(void)
|
|||||||
// Battle Arena records.
|
// Battle Arena records.
|
||||||
static void ArenaPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
static void ArenaPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL);
|
||||||
if (num > MAX_STREAK)
|
if (num > MAX_STREAK)
|
||||||
num = MAX_STREAK;
|
num = MAX_STREAK;
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_KOsInARow);
|
StringExpandPlaceholders(gStringVar4, gText_KOsInARow);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ArenaPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
static void ArenaPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||||
@ -1314,8 +1314,8 @@ static void ShowArenaResultsWindow(void)
|
|||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults);
|
StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults);
|
||||||
PrintAligned(gStringVar4, 2);
|
PrintAligned(gStringVar4, 2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SKIP_DRAW, NULL);
|
||||||
ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 72, 126, 49);
|
ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 72, 126, 49);
|
||||||
ArenaPrintRecordStreak(FRONTIER_LVL_50, 72, 126, 65);
|
ArenaPrintRecordStreak(FRONTIER_LVL_50, 72, 126, 65);
|
||||||
ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_OPEN, 72, 126, 97);
|
ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_OPEN, 72, 126, 97);
|
||||||
@ -1327,16 +1327,16 @@ static void ShowArenaResultsWindow(void)
|
|||||||
// Battle Factory records.
|
// Battle Factory records.
|
||||||
static void FactoryPrintStreak(const u8 *str, u16 num1, u16 num2, u8 x1, u8 x2, u8 x3, u8 y)
|
static void FactoryPrintStreak(const u8 *str, u16 num1, u16 num2, u8 x1, u8 x2, u8 x3, u8 y)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL);
|
||||||
if (num1 > MAX_STREAK)
|
if (num1 > MAX_STREAK)
|
||||||
num1 = MAX_STREAK;
|
num1 = MAX_STREAK;
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num1, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num1, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num2, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num2, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_TimesVar1);
|
StringExpandPlaceholders(gStringVar4, gText_TimesVar1);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x3, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x3, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FactoryPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 x3, u8 y)
|
static void FactoryPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 x3, u8 y)
|
||||||
@ -1403,9 +1403,9 @@ static void ShowFactoryResultsWindow(u8 battleMode)
|
|||||||
StringExpandPlaceholders(gStringVar4, gText_BattleSwapDoubleResults);
|
StringExpandPlaceholders(gStringVar4, gText_BattleSwapDoubleResults);
|
||||||
|
|
||||||
PrintAligned(gStringVar4, 0);
|
PrintAligned(gStringVar4, 0);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_RentalSwap, 152, 33, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_RentalSwap, 152, 33, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
FactoryPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 49);
|
FactoryPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 49);
|
||||||
FactoryPrintRecordStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 65);
|
FactoryPrintRecordStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 65);
|
||||||
@ -1418,12 +1418,12 @@ static void ShowFactoryResultsWindow(u8 battleMode)
|
|||||||
// Battle Pyramid records.
|
// Battle Pyramid records.
|
||||||
static void PyramidPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
static void PyramidPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL);
|
||||||
if (num > MAX_STREAK)
|
if (num > MAX_STREAK)
|
||||||
num = MAX_STREAK;
|
num = MAX_STREAK;
|
||||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_FloorsCleared);
|
StringExpandPlaceholders(gStringVar4, gText_FloorsCleared);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PyramidPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
static void PyramidPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||||
@ -1464,8 +1464,8 @@ static void ShowPyramidResultsWindow(void)
|
|||||||
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
||||||
StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults);
|
StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults);
|
||||||
PrintAligned(gStringVar4, 2);
|
PrintAligned(gStringVar4, 2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 49, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintHyphens(10);
|
PrintHyphens(10);
|
||||||
PyramidPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 111, 49);
|
PyramidPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 111, 49);
|
||||||
PyramidPrintRecordStreak(FRONTIER_LVL_50, 64, 111, 65);
|
PyramidPrintRecordStreak(FRONTIER_LVL_50, 64, 111, 65);
|
||||||
@ -1488,37 +1488,37 @@ static void ShowLinkContestResultsWindow(void)
|
|||||||
|
|
||||||
StringExpandPlaceholders(gStringVar4, gText_LinkContestResults);
|
StringExpandPlaceholders(gStringVar4, gText_LinkContestResults);
|
||||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208);
|
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_1st;
|
str = gText_1st;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 50;
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 50;
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_2nd;
|
str = gText_2nd;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 88;
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 88;
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_3rd;
|
str = gText_3rd;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 126;
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 126;
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_4th;
|
str = gText_4th;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 164;
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 164;
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
x = 6;
|
x = 6;
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cool, x, 41, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cool, x, 41, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Beauty, x, 57, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Beauty, x, 57, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cute, x, 73, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cute, x, 73, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Smart, x, 89, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Smart, x, 89, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Tough, x, 105, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Tough, x, 105, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
for (i = 0; i < CONTEST_CATEGORIES_COUNT; i++)
|
for (i = 0; i < CONTEST_CATEGORIES_COUNT; i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < CONTESTANT_COUNT; j++)
|
for (j = 0; j < CONTESTANT_COUNT; j++)
|
||||||
{
|
{
|
||||||
ConvertIntToDecimalStringN(gStringVar4, gSaveBlock2Ptr->contestLinkResults[i][j], STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar4, gSaveBlock2Ptr->contestLinkResults[i][j], STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2224,18 +2224,18 @@ static void Print1PRecord(s32 position, s32 x, s32 y, struct RankingHall1P *hall
|
|||||||
u8 text[32];
|
u8 text[32];
|
||||||
u16 winStreak;
|
u16 winStreak;
|
||||||
|
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
hallRecord->name[PLAYER_NAME_LENGTH] = EOS;
|
hallRecord->name[PLAYER_NAME_LENGTH] = EOS;
|
||||||
if (hallRecord->winStreak)
|
if (hallRecord->winStreak)
|
||||||
{
|
{
|
||||||
TVShowConvertInternationalString(text, hallRecord->name, hallRecord->language);
|
TVShowConvertInternationalString(text, hallRecord->name, hallRecord->language);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
winStreak = hallRecord->winStreak;
|
winStreak = hallRecord->winStreak;
|
||||||
if (winStreak > MAX_STREAK)
|
if (winStreak > MAX_STREAK)
|
||||||
winStreak = MAX_STREAK;
|
winStreak = MAX_STREAK;
|
||||||
ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[hallFacilityId]);
|
StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[hallFacilityId]);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[hallFacilityId], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[hallFacilityId], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2244,25 +2244,25 @@ static void Print2PRecord(s32 position, s32 x, s32 y, struct RankingHall2P *hall
|
|||||||
u8 text[32];
|
u8 text[32];
|
||||||
u16 winStreak;
|
u16 winStreak;
|
||||||
|
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
if (hallRecord->winStreak)
|
if (hallRecord->winStreak)
|
||||||
{
|
{
|
||||||
hallRecord->name1[PLAYER_NAME_LENGTH] = EOS;
|
hallRecord->name1[PLAYER_NAME_LENGTH] = EOS;
|
||||||
hallRecord->name2[PLAYER_NAME_LENGTH] = EOS;
|
hallRecord->name2[PLAYER_NAME_LENGTH] = EOS;
|
||||||
TVShowConvertInternationalString(text, hallRecord->name1, hallRecord->language);
|
TVShowConvertInternationalString(text, hallRecord->name1, hallRecord->language);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position - 1)) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position - 1)) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
if (IsStringJapanese(hallRecord->name2))
|
if (IsStringJapanese(hallRecord->name2))
|
||||||
TVShowConvertInternationalString(text, hallRecord->name2, LANGUAGE_JAPANESE);
|
TVShowConvertInternationalString(text, hallRecord->name2, LANGUAGE_JAPANESE);
|
||||||
else
|
else
|
||||||
StringCopy(text, hallRecord->name2);
|
StringCopy(text, hallRecord->name2);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 4) * 8, (8 * (y + 5 * position + 1)) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 4) * 8, (8 * (y + 5 * position + 1)) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
winStreak = hallRecord->winStreak;
|
winStreak = hallRecord->winStreak;
|
||||||
if (winStreak > MAX_STREAK)
|
if (winStreak > MAX_STREAK)
|
||||||
winStreak = MAX_STREAK;
|
winStreak = MAX_STREAK;
|
||||||
ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||||
StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK]);
|
StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK]);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2343,9 +2343,9 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode)
|
|||||||
|
|
||||||
StringCopy(gStringVar1, sRecordsWindowChallengeTexts[hallFacilityId][0]);
|
StringCopy(gStringVar1, sRecordsWindowChallengeTexts[hallFacilityId][0]);
|
||||||
StringExpandPlaceholders(gStringVar4, sRecordsWindowChallengeTexts[hallFacilityId][1]);
|
StringExpandPlaceholders(gStringVar4, sRecordsWindowChallengeTexts[hallFacilityId][1]);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, sLevelModeText[lvlMode], 0xD0);
|
x = GetStringRightAlignXOffset(FONT_NORMAL, sLevelModeText[lvlMode], 0xD0);
|
||||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sLevelModeText[lvlMode], x, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sLevelModeText[lvlMode], x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
if (hallFacilityId == RANKING_HALL_TOWER_LINK)
|
if (hallFacilityId == RANKING_HALL_TOWER_LINK)
|
||||||
{
|
{
|
||||||
gSaveBlock2Ptr->frontier.opponentNames[0][PLAYER_NAME_LENGTH] = EOS;
|
gSaveBlock2Ptr->frontier.opponentNames[0][PLAYER_NAME_LENGTH] = EOS;
|
||||||
|
@ -1149,7 +1149,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
|||||||
*(stringPtr)++ = CHAR_QUESTION_MARK;
|
*(stringPtr)++ = CHAR_QUESTION_MARK;
|
||||||
}
|
}
|
||||||
stringPtr[0] = EOS;
|
stringPtr[0] = EOS;
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x10, 1, sMonInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x10, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nick, species names, gender and level
|
// nick, species names, gender and level
|
||||||
@ -1158,13 +1158,13 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
|||||||
if (currMon->species == SPECIES_EGG)
|
if (currMon->species == SPECIES_EGG)
|
||||||
{
|
{
|
||||||
width = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0xD0);
|
width = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0xD0);
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x80);
|
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x80);
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
|
|
||||||
text[0] = CHAR_SLASH;
|
text[0] = CHAR_SLASH;
|
||||||
stringPtr = StringCopy(text + 1, gSpeciesNames[currMon->species]);
|
stringPtr = StringCopy(text + 1, gSpeciesNames[currMon->species]);
|
||||||
@ -1185,15 +1185,15 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
stringPtr[0] = EOS;
|
stringPtr[0] = EOS;
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x80, 1, sMonInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x80, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
|
|
||||||
stringPtr = StringCopy(text, gText_Level);
|
stringPtr = StringCopy(text, gText_Level);
|
||||||
ConvertIntToDecimalStringN(stringPtr, currMon->lvl, STR_CONV_MODE_LEFT_ALIGN, 3);
|
ConvertIntToDecimalStringN(stringPtr, currMon->lvl, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x24, 0x11, sMonInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x24, 0x11, sMonInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
|
|
||||||
stringPtr = StringCopy(text, gText_IDNumber);
|
stringPtr = StringCopy(text, gText_IDNumber);
|
||||||
ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5);
|
ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5);
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x68, 0x11, sMonInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x68, 0x11, sMonInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
|
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
@ -1208,10 +1208,10 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
|
|||||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD);
|
DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sPlayerInfoTextColors, -1, gText_Name);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sPlayerInfoTextColors, TEXT_SKIP_DRAW, gText_Name);
|
||||||
|
|
||||||
width = GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 0x70);
|
width = GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 0x70);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 1, sPlayerInfoTextColors, -1, gSaveBlock2Ptr->playerName);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 1, sPlayerInfoTextColors, TEXT_SKIP_DRAW, gSaveBlock2Ptr->playerName);
|
||||||
|
|
||||||
trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) | (gSaveBlock2Ptr->playerTrainerId[1] << 8);
|
trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) | (gSaveBlock2Ptr->playerTrainerId[1] << 8);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber);
|
||||||
@ -1222,9 +1222,9 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
|
|||||||
text[4] = (trainerId % 10) / 1 + CHAR_0;
|
text[4] = (trainerId % 10) / 1 + CHAR_0;
|
||||||
text[5] = EOS;
|
text[5] = EOS;
|
||||||
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70);
|
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x11, sPlayerInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x11, sPlayerInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
|
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x21, sPlayerInfoTextColors, -1, gText_Time);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x21, sPlayerInfoTextColors, TEXT_SKIP_DRAW, gText_Time);
|
||||||
text[0] = (gSaveBlock2Ptr->playTimeHours / 100) + CHAR_0;
|
text[0] = (gSaveBlock2Ptr->playTimeHours / 100) + CHAR_0;
|
||||||
text[1] = (gSaveBlock2Ptr->playTimeHours % 100) / 10 + CHAR_0;
|
text[1] = (gSaveBlock2Ptr->playTimeHours % 100) / 10 + CHAR_0;
|
||||||
text[2] = (gSaveBlock2Ptr->playTimeHours % 10) + CHAR_0;
|
text[2] = (gSaveBlock2Ptr->playTimeHours % 10) + CHAR_0;
|
||||||
@ -1240,7 +1240,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
|
|||||||
text[6] = EOS;
|
text[6] = EOS;
|
||||||
|
|
||||||
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70);
|
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x21, sPlayerInfoTextColors, -1, text);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x21, sPlayerInfoTextColors, TEXT_SKIP_DRAW, text);
|
||||||
|
|
||||||
CopyWindowToVram(1, COPYWIN_FULL);
|
CopyWindowToVram(1, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
|
@ -974,7 +974,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y)
|
|||||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BERRY_CAPACITY_DIGITS);
|
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BERRY_CAPACITY_DIGITS);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
||||||
BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL);
|
BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SKIP_DRAW, COLORID_NORMAL);
|
||||||
}
|
}
|
||||||
else if (gBagPosition.pocket != KEYITEMS_POCKET && ItemId_GetImportance(itemId) == FALSE)
|
else if (gBagPosition.pocket != KEYITEMS_POCKET && ItemId_GetImportance(itemId) == FALSE)
|
||||||
{
|
{
|
||||||
@ -982,7 +982,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y)
|
|||||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BAG_ITEM_CAPACITY_DIGITS);
|
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BAG_ITEM_CAPACITY_DIGITS);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
||||||
BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL);
|
BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SKIP_DRAW, COLORID_NORMAL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1204,7 +1204,7 @@ static void PrintItemSoldAmount(int windowId, int numSold, int moneyEarned)
|
|||||||
u8 numDigits = (gBagPosition.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS;
|
u8 numDigits = (gBagPosition.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS;
|
||||||
ConvertIntToDecimalStringN(gStringVar1, numSold, STR_CONV_MODE_LEADING_ZEROS, numDigits);
|
ConvertIntToDecimalStringN(gStringVar1, numSold, STR_CONV_MODE_LEADING_ZEROS, numDigits);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, 0);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, 0);
|
||||||
PrintMoneyAmount(windowId, 38, 1, moneyEarned, 0);
|
PrintMoneyAmount(windowId, 38, 1, moneyEarned, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2417,11 +2417,11 @@ static void PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2)
|
|||||||
windowId = AddWindow(&window);
|
windowId = AddWindow(&window);
|
||||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
|
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
|
||||||
offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName1, 0x40);
|
offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName1, 0x40);
|
||||||
BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME);
|
BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SKIP_DRAW, COLORID_POCKET_NAME);
|
||||||
if (pocketName2)
|
if (pocketName2)
|
||||||
{
|
{
|
||||||
offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName2, 0x40);
|
offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName2, 0x40);
|
||||||
BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME);
|
BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SKIP_DRAW, COLORID_POCKET_NAME);
|
||||||
}
|
}
|
||||||
CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer));
|
CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer));
|
||||||
RemoveWindow(windowId);
|
RemoveWindow(windowId);
|
||||||
@ -2557,7 +2557,7 @@ static void PrintTMHMMoveData(u16 itemId)
|
|||||||
if (itemId == ITEM_NONE)
|
if (itemId == ITEM_NONE)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO);
|
||||||
CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX);
|
CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2575,7 +2575,7 @@ static void PrintTMHMMoveData(u16 itemId)
|
|||||||
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].power, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].power, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
text = gStringVar1;
|
text = gStringVar1;
|
||||||
}
|
}
|
||||||
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO);
|
||||||
|
|
||||||
// Print TMHM accuracy
|
// Print TMHM accuracy
|
||||||
if (gBattleMoves[moveId].accuracy == 0)
|
if (gBattleMoves[moveId].accuracy == 0)
|
||||||
@ -2587,11 +2587,11 @@ static void PrintTMHMMoveData(u16 itemId)
|
|||||||
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
text = gStringVar1;
|
text = gStringVar1;
|
||||||
}
|
}
|
||||||
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO);
|
||||||
|
|
||||||
// Print TMHM pp
|
// Print TMHM pp
|
||||||
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO);
|
||||||
|
|
||||||
CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX);
|
CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ static void ListMenuPrint(struct ListMenu *list, const u8 *str, u8 x, u8 y)
|
|||||||
gListMenuOverride.fontId,
|
gListMenuOverride.fontId,
|
||||||
x, y,
|
x, y,
|
||||||
gListMenuOverride.lettersSpacing,
|
gListMenuOverride.lettersSpacing,
|
||||||
0, colors, TEXT_SPEED_FF, str);
|
0, colors, TEXT_SKIP_DRAW, str);
|
||||||
|
|
||||||
gListMenuOverride.enabled = FALSE;
|
gListMenuOverride.enabled = FALSE;
|
||||||
}
|
}
|
||||||
@ -617,7 +617,7 @@ static void ListMenuPrint(struct ListMenu *list, const u8 *str, u8 x, u8 y)
|
|||||||
list->template.fontId,
|
list->template.fontId,
|
||||||
x, y,
|
x, y,
|
||||||
list->template.lettersSpacing,
|
list->template.lettersSpacing,
|
||||||
0, colors, TEXT_SPEED_FF, str);
|
0, colors, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,8 +780,8 @@ static void Task_DisplayMainMenu(u8 taskId)
|
|||||||
default:
|
default:
|
||||||
FillWindowPixelBuffer(0, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(0, PIXEL_FILL(0xA));
|
||||||
FillWindowPixelBuffer(1, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(1, PIXEL_FILL(0xA));
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
CopyWindowToVram(0, COPYWIN_GFX);
|
CopyWindowToVram(0, COPYWIN_GFX);
|
||||||
@ -793,9 +793,9 @@ static void Task_DisplayMainMenu(u8 taskId)
|
|||||||
FillWindowPixelBuffer(2, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(2, PIXEL_FILL(0xA));
|
||||||
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
|
||||||
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuContinue);
|
||||||
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame);
|
||||||
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption);
|
||||||
MainMenu_FormatSavegameText();
|
MainMenu_FormatSavegameText();
|
||||||
PutWindowTilemap(2);
|
PutWindowTilemap(2);
|
||||||
PutWindowTilemap(3);
|
PutWindowTilemap(3);
|
||||||
@ -812,10 +812,10 @@ static void Task_DisplayMainMenu(u8 taskId)
|
|||||||
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
|
||||||
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
||||||
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuContinue);
|
||||||
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame);
|
||||||
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift);
|
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuMysteryGift);
|
||||||
AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption);
|
||||||
MainMenu_FormatSavegameText();
|
MainMenu_FormatSavegameText();
|
||||||
PutWindowTilemap(2);
|
PutWindowTilemap(2);
|
||||||
PutWindowTilemap(3);
|
PutWindowTilemap(3);
|
||||||
@ -836,11 +836,11 @@ static void Task_DisplayMainMenu(u8 taskId)
|
|||||||
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
||||||
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
|
||||||
FillWindowPixelBuffer(6, PIXEL_FILL(0xA));
|
FillWindowPixelBuffer(6, PIXEL_FILL(0xA));
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuContinue);
|
||||||
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame);
|
||||||
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2);
|
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuMysteryGift2);
|
||||||
AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryEvents);
|
AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuMysteryEvents);
|
||||||
AddTextPrinterParameterized3(6, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
AddTextPrinterParameterized3(6, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption);
|
||||||
MainMenu_FormatSavegameText();
|
MainMenu_FormatSavegameText();
|
||||||
PutWindowTilemap(2);
|
PutWindowTilemap(2);
|
||||||
PutWindowTilemap(3);
|
PutWindowTilemap(3);
|
||||||
@ -2136,8 +2136,8 @@ static void MainMenu_FormatSavegameText(void)
|
|||||||
static void MainMenu_FormatSavegamePlayer(void)
|
static void MainMenu_FormatSavegamePlayer(void)
|
||||||
{
|
{
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPlayer);
|
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPlayer);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 17, sTextColor_MenuInfo, -1, gStringVar4);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, -1, gSaveBlock2Ptr->playerName);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gSaveBlock2Ptr->playerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MainMenu_FormatSavegameTime(void)
|
static void MainMenu_FormatSavegameTime(void)
|
||||||
@ -2146,11 +2146,11 @@ static void MainMenu_FormatSavegameTime(void)
|
|||||||
u8* ptr;
|
u8* ptr;
|
||||||
|
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuTime);
|
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuTime);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 17, sTextColor_MenuInfo, -1, gStringVar4);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
ptr = ConvertIntToDecimalStringN(str, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3);
|
ptr = ConvertIntToDecimalStringN(str, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
*ptr = 0xF0;
|
*ptr = 0xF0;
|
||||||
ConvertIntToDecimalStringN(ptr + 1, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(ptr + 1, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 17, sTextColor_MenuInfo, -1, str);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MainMenu_FormatSavegamePokedex(void)
|
static void MainMenu_FormatSavegamePokedex(void)
|
||||||
@ -2165,9 +2165,9 @@ static void MainMenu_FormatSavegamePokedex(void)
|
|||||||
else
|
else
|
||||||
dexCount = GetHoennPokedexCount(FLAG_GET_CAUGHT);
|
dexCount = GetHoennPokedexCount(FLAG_GET_CAUGHT);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPokedex);
|
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPokedex);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 33, sTextColor_MenuInfo, -1, gStringVar4);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
ConvertIntToDecimalStringN(str, dexCount, STR_CONV_MODE_LEFT_ALIGN, 3);
|
ConvertIntToDecimalStringN(str, dexCount, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 100), 33, sTextColor_MenuInfo, -1, str);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 100), 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2183,9 +2183,9 @@ static void MainMenu_FormatSavegameBadges(void)
|
|||||||
badgeCount++;
|
badgeCount++;
|
||||||
}
|
}
|
||||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuBadges);
|
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuBadges);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 33, sTextColor_MenuInfo, -1, gStringVar4);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
ConvertIntToDecimalStringN(str, badgeCount, STR_CONV_MODE_LEADING_ZEROS, 1);
|
ConvertIntToDecimalStringN(str, badgeCount, STR_CONV_MODE_LEADING_ZEROS, 1);
|
||||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 33, sTextColor_MenuInfo, -1, str);
|
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LoadMainMenuWindowFrameTiles(u8 bgId, u16 tileOffset)
|
static void LoadMainMenuWindowFrameTiles(u8 bgId, u16 tileOffset)
|
||||||
|
@ -329,7 +329,7 @@ static void ShowMapNamePopUpWindow(void)
|
|||||||
mapDisplayHeader[0] = EXT_CTRL_CODE_BEGIN;
|
mapDisplayHeader[0] = EXT_CTRL_CODE_BEGIN;
|
||||||
mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT;
|
mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT;
|
||||||
mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT;
|
mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT;
|
||||||
AddTextPrinterParameterized(GetMapNamePopUpWindowId(), FONT_NARROW, mapDisplayHeader, x, 3, 0xFF, NULL);
|
AddTextPrinterParameterized(GetMapNamePopUpWindowId(), FONT_NARROW, mapDisplayHeader, x, 3, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(GetMapNamePopUpWindowId(), COPYWIN_FULL);
|
CopyWindowToVram(GetMapNamePopUpWindowId(), COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1343,9 +1343,9 @@ static void PrintStoryList(void)
|
|||||||
u16 gameStatID = sStorytellerPtr->gameStatIDs[i];
|
u16 gameStatID = sStorytellerPtr->gameStatIDs[i];
|
||||||
if (gameStatID == 0)
|
if (gameStatID == 0)
|
||||||
break;
|
break;
|
||||||
AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL);
|
AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 0xFF, NULL);
|
AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
InitMenuInUpperLeftCornerNormal(sStorytellerWindowId, GetFreeStorySlot() + 1, 0);
|
InitMenuInUpperLeftCornerNormal(sStorytellerWindowId, GetFreeStorySlot() + 1, 0);
|
||||||
CopyWindowToVram(sStorytellerWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sStorytellerWindowId, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
|
24
src/menu.c
24
src/menu.c
@ -1109,7 +1109,7 @@ void PrintMenuActionTextsAtPos(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineH
|
|||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
for (i = 0; i < itemCount; i++)
|
for (i = 0; i < itemCount; i++)
|
||||||
AddTextPrinterParameterized(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1118,7 +1118,7 @@ static void PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8
|
|||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
for (i = 0; i < itemCount; i++)
|
for (i = 0; i < itemCount; i++)
|
||||||
AddTextPrinterParameterized5(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SPEED_FF, NULL, letterSpacing, lineSpacing);
|
AddTextPrinterParameterized5(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SKIP_DRAW, NULL, letterSpacing, lineSpacing);
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1149,7 +1149,7 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l
|
|||||||
printer.currentChar = menuActions[actionIds[i]].text;
|
printer.currentChar = menuActions[actionIds[i]].text;
|
||||||
printer.y = (lineHeight * i) + top;
|
printer.y = (lineHeight * i) + top;
|
||||||
printer.currentY = printer.y;
|
printer.currentY = printer.y;
|
||||||
AddTextPrinter(&printer, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
@ -1208,7 +1208,7 @@ static void CreateYesNoMenuAtPos(const struct WindowTemplate *window, u8 fontId,
|
|||||||
printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
|
printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
|
||||||
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
|
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
|
||||||
|
|
||||||
AddTextPrinter(&printer, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
InitMenuNormal(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos);
|
InitMenuNormal(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos);
|
||||||
}
|
}
|
||||||
@ -1239,7 +1239,7 @@ void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u
|
|||||||
for (i = 0; i < a7; i++)
|
for (i = 0; i < a7; i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < a6; j++)
|
for (j = 0; j < a6; j++)
|
||||||
AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
@ -1273,7 +1273,7 @@ void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth
|
|||||||
printer.y = (GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT) * i) + top;
|
printer.y = (GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT) * i) + top;
|
||||||
printer.currentX = printer.x;
|
printer.currentX = printer.x;
|
||||||
printer.currentY = printer.y;
|
printer.currentY = printer.y;
|
||||||
AddTextPrinter(&printer, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1609,7 +1609,7 @@ void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *menuActi
|
|||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
for (i = 0; i < itemCount; i++)
|
for (i = 0; i < itemCount; i++)
|
||||||
AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
@ -1635,7 +1635,7 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions
|
|||||||
printer.currentChar = menuActions[actionIds[i]].text;
|
printer.currentChar = menuActions[actionIds[i]].text;
|
||||||
printer.y = (i * 16) + 1;
|
printer.y = (i * 16) + 1;
|
||||||
printer.currentY = (i * 16) + 1;
|
printer.currentY = (i * 16) + 1;
|
||||||
AddTextPrinter(&printer, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
@ -1662,7 +1662,7 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa
|
|||||||
printer.letterSpacing = 0;
|
printer.letterSpacing = 0;
|
||||||
printer.lineSpacing = 0;
|
printer.lineSpacing = 0;
|
||||||
|
|
||||||
AddTextPrinter(&printer, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL);
|
||||||
InitMenuInUpperLeftCornerNormal(sYesNoWindowId, 2, initialCursorPos);
|
InitMenuInUpperLeftCornerNormal(sYesNoWindowId, 2, initialCursorPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1673,7 +1673,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const
|
|||||||
for (i = 0; i < rows; i++)
|
for (i = 0; i < rows; i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < columns; j++)
|
for (j = 0; j < columns; j++)
|
||||||
AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
@ -1702,7 +1702,7 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M
|
|||||||
printer.y = (16 * i) + 1;
|
printer.y = (16 * i) + 1;
|
||||||
printer.currentX = printer.x;
|
printer.currentX = printer.x;
|
||||||
printer.currentY = printer.y;
|
printer.currentY = printer.y;
|
||||||
AddTextPrinter(&printer, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2012,7 +2012,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y)
|
|||||||
|
|
||||||
StringExpandPlaceholders(gStringVar4, src);
|
StringExpandPlaceholders(gStringVar4, src);
|
||||||
|
|
||||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SPEED_FF, 0);
|
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SKIP_DRAW, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unused. Similar to BlitBitmapRect4Bit.
|
// Unused. Similar to BlitBitmapRect4Bit.
|
||||||
|
@ -268,7 +268,7 @@ static void MailboxMenu_ItemPrintFunc(u8 windowId, u32 itemId, u8 y)
|
|||||||
length = StringLength(buffer);
|
length = StringLength(buffer);
|
||||||
if (length < PLAYER_NAME_LENGTH - 1)
|
if (length < PLAYER_NAME_LENGTH - 1)
|
||||||
ConvertInternationalString(buffer, LANGUAGE_JAPANESE);
|
ConvertInternationalString(buffer, LANGUAGE_JAPANESE);
|
||||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 8, y, 0, 0, sPlayerNameTextColors, -1, buffer);
|
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 8, y, 0, 0, sPlayerNameTextColors, TEXT_SKIP_DRAW, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page)
|
u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page)
|
||||||
@ -740,18 +740,18 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
|||||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||||
str = gText_MoveRelearnerBattleMoves;
|
str = gText_MoveRelearnerBattleMoves;
|
||||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80);
|
x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_MoveRelearnerPP;
|
str = gText_MoveRelearnerPP;
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x29, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x29, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_MoveRelearnerPower;
|
str = gText_MoveRelearnerPower;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A);
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x19, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_MoveRelearnerAccuracy;
|
str = gText_MoveRelearnerAccuracy;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A);
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SKIP_DRAW, NULL);
|
||||||
if (chosenMove == LIST_CANCEL)
|
if (chosenMove == LIST_CANCEL)
|
||||||
{
|
{
|
||||||
CopyWindowToVram(0, COPYWIN_GFX);
|
CopyWindowToVram(0, COPYWIN_GFX);
|
||||||
@ -759,11 +759,11 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
|||||||
}
|
}
|
||||||
move = &gBattleMoves[chosenMove];
|
move = &gBattleMoves[chosenMove];
|
||||||
str = gTypeNames[move->type];
|
str = gTypeNames[move->type];
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x19, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0);
|
x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0);
|
||||||
ConvertIntToDecimalStringN(buffer, move->pp, STR_CONV_MODE_LEFT_ALIGN, 2);
|
ConvertIntToDecimalStringN(buffer, move->pp, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, buffer, x, 0x29, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, buffer, x, 0x29, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
if (move->power < 2)
|
if (move->power < 2)
|
||||||
{
|
{
|
||||||
@ -774,7 +774,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
|||||||
ConvertIntToDecimalStringN(buffer, move->power, STR_CONV_MODE_LEFT_ALIGN, 3);
|
ConvertIntToDecimalStringN(buffer, move->power, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
str = buffer;
|
str = buffer;
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x19, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x19, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
if (move->accuracy == 0)
|
if (move->accuracy == 0)
|
||||||
{
|
{
|
||||||
@ -785,7 +785,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
|||||||
ConvertIntToDecimalStringN(buffer, move->accuracy, STR_CONV_MODE_LEFT_ALIGN, 3);
|
ConvertIntToDecimalStringN(buffer, move->accuracy, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
str = buffer;
|
str = buffer;
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gMoveDescriptionPointers[chosenMove - 1];
|
str = gMoveDescriptionPointers[chosenMove - 1];
|
||||||
AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL);
|
AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL);
|
||||||
@ -801,15 +801,15 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove)
|
|||||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||||
str = gText_MoveRelearnerContestMovesTitle;
|
str = gText_MoveRelearnerContestMovesTitle;
|
||||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80);
|
x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80);
|
||||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_MoveRelearnerAppeal;
|
str = gText_MoveRelearnerAppeal;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C);
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C);
|
||||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x19, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gText_MoveRelearnerJam;
|
str = gText_MoveRelearnerJam;
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C);
|
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C);
|
||||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x29, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
if (chosenMove == MENU_NOTHING_CHOSEN)
|
if (chosenMove == MENU_NOTHING_CHOSEN)
|
||||||
{
|
{
|
||||||
@ -819,10 +819,10 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove)
|
|||||||
|
|
||||||
move = &gContestMoves[chosenMove];
|
move = &gContestMoves[chosenMove];
|
||||||
str = gContestMoveTypeTextPointers[move->contestCategory];
|
str = gContestMoveTypeTextPointers[move->contestCategory];
|
||||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(1, FONT_NORMAL, str, 4, 0x19, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
str = gContestEffectDescriptionPointers[move->effect];
|
str = gContestEffectDescriptionPointers[move->effect];
|
||||||
AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
CopyWindowToVram(1, COPYWIN_GFX);
|
CopyWindowToVram(1, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
@ -490,8 +490,8 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel)
|
|||||||
options = gJPText_DecideStop;
|
options = gJPText_DecideStop;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header);
|
AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, header);
|
||||||
AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options);
|
AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, options);
|
||||||
CopyWindowToVram(0, COPYWIN_GFX);
|
CopyWindowToVram(0, COPYWIN_GFX);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
}
|
}
|
||||||
|
@ -1781,7 +1781,7 @@ static void DrawGenderIcon(void)
|
|||||||
StringCopy(text, gText_FemaleSymbol);
|
StringCopy(text, gText_FemaleSymbol);
|
||||||
isFemale = TRUE;
|
isFemale = TRUE;
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, 0x68, 1, sGenderColors[isFemale], -1, text);
|
AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, 0x68, 1, sGenderColors[isFemale], TEXT_SKIP_DRAW, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1921,7 +1921,7 @@ static void DrawTextEntry(void)
|
|||||||
temp[1] = gText_ExpandedPlaceholder_Empty[0];
|
temp[1] = gText_ExpandedPlaceholder_Empty[0];
|
||||||
extraWidth = (IsWideLetter(temp[0]) == TRUE) ? 2 : 0;
|
extraWidth = (IsWideLetter(temp[0]) == TRUE) ? 2 : 0;
|
||||||
|
|
||||||
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, temp, i * 8 + x + extraWidth, 1, 0xFF, NULL);
|
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, temp, i * 8 + x + extraWidth, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
TryDrawGenderIcon();
|
TryDrawGenderIcon();
|
||||||
|
@ -400,7 +400,7 @@ static void DrawOptionMenuChoice(const u8 *text, u8 x, u8 y, u8 style)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dst[i] = EOS;
|
dst[i] = EOS;
|
||||||
AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, dst, x, y + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, dst, x, y + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 TextSpeed_ProcessInput(u8 selection)
|
static u8 TextSpeed_ProcessInput(u8 selection)
|
||||||
@ -626,7 +626,7 @@ static void ButtonMode_DrawChoices(u8 selection)
|
|||||||
static void DrawTextOption(void)
|
static void DrawTextOption(void)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1));
|
FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_NORMAL, gText_Option, 8, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_NORMAL, gText_Option, 8, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(WIN_TEXT_OPTION, COPYWIN_FULL);
|
CopyWindowToVram(WIN_TEXT_OPTION, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -636,7 +636,7 @@ static void DrawOptionMenuTexts(void)
|
|||||||
|
|
||||||
FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1));
|
FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1));
|
||||||
for (i = 0; i < MENUITEM_COUNT; i++)
|
for (i = 0; i < MENUITEM_COUNT; i++)
|
||||||
AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(WIN_OPTIONS, COPYWIN_FULL);
|
CopyWindowToVram(WIN_OPTIONS, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2036,7 +2036,7 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf)
|
|||||||
confirmWindowId = AddWindow(&sConfirmButtonWindowTemplate);
|
confirmWindowId = AddWindow(&sConfirmButtonWindowTemplate);
|
||||||
FillWindowPixelBuffer(confirmWindowId, PIXEL_FILL(0));
|
FillWindowPixelBuffer(confirmWindowId, PIXEL_FILL(0));
|
||||||
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gMenuText_Confirm, 48);
|
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gMenuText_Confirm, 48);
|
||||||
AddTextPrinterParameterized4(confirmWindowId, FONT_SMALL, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm);
|
AddTextPrinterParameterized4(confirmWindowId, FONT_SMALL, mainOffset, 1, 0, 0, sFontColorTable[0], TEXT_SKIP_DRAW, gMenuText_Confirm);
|
||||||
PutWindowTilemap(confirmWindowId);
|
PutWindowTilemap(confirmWindowId);
|
||||||
CopyWindowToVram(confirmWindowId, COPYWIN_GFX);
|
CopyWindowToVram(confirmWindowId, COPYWIN_GFX);
|
||||||
cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate);
|
cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate);
|
||||||
@ -2053,12 +2053,12 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf)
|
|||||||
if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE)
|
if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE)
|
||||||
{
|
{
|
||||||
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel, 48);
|
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel, 48);
|
||||||
AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel);
|
AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], TEXT_SKIP_DRAW, gText_Cancel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel2, 48);
|
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel2, 48);
|
||||||
AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2);
|
AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], TEXT_SKIP_DRAW, gText_Cancel2);
|
||||||
}
|
}
|
||||||
PutWindowTilemap(cancelWindowId);
|
PutWindowTilemap(cancelWindowId);
|
||||||
CopyWindowToVram(cancelWindowId, COPYWIN_GFX);
|
CopyWindowToVram(cancelWindowId, COPYWIN_GFX);
|
||||||
@ -4504,7 +4504,7 @@ static void ShowMoveSelectWindow(u8 slot)
|
|||||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
{
|
{
|
||||||
move = GetMonData(&gPlayerParty[slot], MON_DATA_MOVE1 + i);
|
move = GetMonData(&gPlayerParty[slot], MON_DATA_MOVE1 + i);
|
||||||
AddTextPrinterParameterized(windowId, fontId, gMoveNames[move], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, fontId, gMoveNames[move], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
if (move != MOVE_NONE)
|
if (move != MOVE_NONE)
|
||||||
moveCount++;
|
moveCount++;
|
||||||
}
|
}
|
||||||
|
@ -1027,13 +1027,13 @@ static void ItemStorage_PrintMenuItem(u8 windowId, u32 id, u8 yOffset)
|
|||||||
if (sItemStorageMenu->toSwapPos != NOT_SWAPPING)
|
if (sItemStorageMenu->toSwapPos != NOT_SWAPPING)
|
||||||
{
|
{
|
||||||
if (sItemStorageMenu->toSwapPos == (u8)id)
|
if (sItemStorageMenu->toSwapPos == (u8)id)
|
||||||
ItemStorage_DrawSwapArrow(yOffset, 0, TEXT_SPEED_FF);
|
ItemStorage_DrawSwapArrow(yOffset, 0, TEXT_SKIP_DRAW);
|
||||||
else
|
else
|
||||||
ItemStorage_DrawSwapArrow(yOffset, 0xFF, TEXT_SPEED_FF);
|
ItemStorage_DrawSwapArrow(yOffset, 0xFF, TEXT_SKIP_DRAW);
|
||||||
}
|
}
|
||||||
ConvertIntToDecimalStringN(gStringVar1, gSaveBlock1Ptr->pcItems[id].quantity, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(gStringVar1, gSaveBlock1Ptr->pcItems[id].quantity, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NARROW, gStringVar4, GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 104), yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NARROW, gStringVar4, GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 104), yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2324,7 +2324,7 @@ static void PrintMonDexNumAndName(u8 windowId, u8 fontId, const u8* str, u8 left
|
|||||||
color[0] = TEXT_COLOR_TRANSPARENT;
|
color[0] = TEXT_COLOR_TRANSPARENT;
|
||||||
color[1] = TEXT_DYNAMIC_COLOR_6;
|
color[1] = TEXT_DYNAMIC_COLOR_6;
|
||||||
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
||||||
AddTextPrinterParameterized4(windowId, fontId, left * 8, (top * 8) + 1, 0, 0, color, -1, str);
|
AddTextPrinterParameterized4(windowId, fontId, left * 8, (top * 8) + 1, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
// u16 ignored is passed but never used
|
// u16 ignored is passed but never used
|
||||||
@ -3167,7 +3167,7 @@ static void PrintInfoScreenText(const u8* str, u8 left, u8 top)
|
|||||||
color[1] = TEXT_DYNAMIC_COLOR_6;
|
color[1] = TEXT_DYNAMIC_COLOR_6;
|
||||||
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
||||||
|
|
||||||
AddTextPrinterParameterized4(0, FONT_NORMAL, left, top, 0, 0, color, -1, str);
|
AddTextPrinterParameterized4(0, FONT_NORMAL, left, top, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define tScrolling data[0]
|
#define tScrolling data[0]
|
||||||
@ -4474,7 +4474,7 @@ static void PrintInfoSubMenuText(u8 windowId, const u8 *str, u8 left, u8 top)
|
|||||||
color[1] = TEXT_DYNAMIC_COLOR_6;
|
color[1] = TEXT_DYNAMIC_COLOR_6;
|
||||||
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
||||||
|
|
||||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, left, top, 0, 0, color, -1, str);
|
AddTextPrinterParameterized4(windowId, FONT_NORMAL, left, top, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UnusedPrintNum(u8 windowId, u16 num, u8 left, u8 top)
|
static void UnusedPrintNum(u8 windowId, u16 num, u8 left, u8 top)
|
||||||
@ -4781,7 +4781,7 @@ static void PrintSearchText(const u8 *str, u32 x, u32 y)
|
|||||||
color[0] = TEXT_COLOR_TRANSPARENT;
|
color[0] = TEXT_COLOR_TRANSPARENT;
|
||||||
color[1] = TEXT_DYNAMIC_COLOR_6;
|
color[1] = TEXT_DYNAMIC_COLOR_6;
|
||||||
color[2] = TEXT_COLOR_DARK_GRAY;
|
color[2] = TEXT_COLOR_DARK_GRAY;
|
||||||
AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 0, 0, color, -1, str);
|
AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ClearSearchMenuRect(u32 x, u32 y, u32 width, u32 height)
|
static void ClearSearchMenuRect(u32 x, u32 y, u32 width, u32 height)
|
||||||
|
@ -367,7 +367,7 @@ static void FindMapsWithMon(u16 species)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; gWildMonHeaders[i].mapGroup != 0xFF; i++)
|
for (i = 0; gWildMonHeaders[i].mapGroup != MAP_GROUP(UNDEFINED); i++)
|
||||||
{
|
{
|
||||||
if (MapHasMon(&gWildMonHeaders[i], species))
|
if (MapHasMon(&gWildMonHeaders[i], species))
|
||||||
{
|
{
|
||||||
|
@ -3313,7 +3313,7 @@ static void Msg_WantToPlayAgain(void)
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2);
|
sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2);
|
||||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_WantToPlayAgain2, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
||||||
sPokemonJumpGfx->mainState++;
|
sPokemonJumpGfx->mainState++;
|
||||||
break;
|
break;
|
||||||
@ -3340,7 +3340,7 @@ static void Msg_SavingDontTurnOff(void)
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4);
|
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4);
|
||||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
||||||
sPokemonJumpGfx->mainState++;
|
sPokemonJumpGfx->mainState++;
|
||||||
break;
|
break;
|
||||||
@ -3383,7 +3383,7 @@ static void Msg_SomeoneDroppedOut(void)
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4);
|
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4);
|
||||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SomeoneDroppedOut2, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
||||||
sPokemonJumpGfx->mainState++;
|
sPokemonJumpGfx->mainState++;
|
||||||
break;
|
break;
|
||||||
@ -3409,7 +3409,7 @@ static void Msg_CommunicationStandby(void)
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2);
|
sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2);
|
||||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_CommunicationStandby4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
||||||
sPokemonJumpGfx->mainState++;
|
sPokemonJumpGfx->mainState++;
|
||||||
break;
|
break;
|
||||||
@ -3487,7 +3487,7 @@ static void PrintPrizeMessage(u16 itemId, u16 quantity)
|
|||||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, sPokemonJumpGfx->itemQuantityStr);
|
DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, sPokemonJumpGfx->itemQuantityStr);
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700);
|
||||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
|
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
|
||||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
||||||
sPokemonJumpGfx->fanfare = MUS_LEVEL_UP;
|
sPokemonJumpGfx->fanfare = MUS_LEVEL_UP;
|
||||||
sPokemonJumpGfx->msgWindowState = 0;
|
sPokemonJumpGfx->msgWindowState = 0;
|
||||||
@ -3500,7 +3500,7 @@ static void PrintPrizeFilledBagMessage(u16 itemId)
|
|||||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
|
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2);
|
||||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
|
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
|
||||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
||||||
sPokemonJumpGfx->fanfare = MUS_DUMMY;
|
sPokemonJumpGfx->fanfare = MUS_DUMMY;
|
||||||
sPokemonJumpGfx->msgWindowState = 0;
|
sPokemonJumpGfx->msgWindowState = 0;
|
||||||
@ -3513,7 +3513,7 @@ static void PrintNoRoomForPrizeMessage(u16 itemId)
|
|||||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
|
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore);
|
||||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2);
|
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2);
|
||||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX);
|
||||||
sPokemonJumpGfx->fanfare = MUS_DUMMY;
|
sPokemonJumpGfx->fanfare = MUS_DUMMY;
|
||||||
sPokemonJumpGfx->msgWindowState = 0;
|
sPokemonJumpGfx->msgWindowState = 0;
|
||||||
@ -3857,7 +3857,7 @@ static void PrintPokeJumpPlayerName(int multiplayerId, u8 bgColor, u8 fgColor, u
|
|||||||
FillWindowPixelBuffer(sPokemonJumpGfx->nameWindowIds[multiplayerId], 0);
|
FillWindowPixelBuffer(sPokemonJumpGfx->nameWindowIds[multiplayerId], 0);
|
||||||
x = 64 - GetStringWidth(FONT_NORMAL, GetPokeJumpPlayerName(multiplayerId), -1);
|
x = 64 - GetStringWidth(FONT_NORMAL, GetPokeJumpPlayerName(multiplayerId), -1);
|
||||||
x /= 2;
|
x /= 2;
|
||||||
AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_NORMAL, x, 1, colors, -1, GetPokeJumpPlayerName(multiplayerId));
|
AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_NORMAL, x, 1, colors, TEXT_SKIP_DRAW, GetPokeJumpPlayerName(multiplayerId));
|
||||||
CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], COPYWIN_GFX);
|
CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4217,14 +4217,14 @@ static void PrintRecordsText(u16 windowId, int width)
|
|||||||
LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0);
|
LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0);
|
||||||
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
||||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PkmnJumpRecords, width * 8), 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PkmnJumpRecords, width * 8), 1, TEXT_SKIP_DRAW, NULL);
|
||||||
for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++)
|
for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SKIP_DRAW, NULL);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, 5);
|
ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, 5);
|
||||||
TruncateToFirstWordOnly(gStringVar1);
|
TruncateToFirstWordOnly(gStringVar1);
|
||||||
x = (width * 8) - GetStringWidth(FONT_NORMAL, gStringVar1, 0);
|
x = (width * 8) - GetStringWidth(FONT_NORMAL, gStringVar1, 0);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, 25 + (i * 16), TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, 25 + (i * 16), TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
PutWindowTilemap(windowId);
|
PutWindowTilemap(windowId);
|
||||||
}
|
}
|
||||||
|
@ -1358,7 +1358,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero
|
|||||||
txtColor[0] = zero2;
|
txtColor[0] = zero2;
|
||||||
txtColor[1] = TEXT_DYNAMIC_COLOR_6;
|
txtColor[1] = TEXT_DYNAMIC_COLOR_6;
|
||||||
txtColor[2] = TEXT_DYNAMIC_COLOR_5;
|
txtColor[2] = TEXT_DYNAMIC_COLOR_5;
|
||||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 1, 0, 0, txtColor, -1, string);
|
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 1, 0, 0, txtColor, TEXT_SKIP_DRAW, string);
|
||||||
|
|
||||||
tileBytesToBuffer = bytesToBuffer;
|
tileBytesToBuffer = bytesToBuffer;
|
||||||
if (tileBytesToBuffer > 6u)
|
if (tileBytesToBuffer > 6u)
|
||||||
@ -1402,7 +1402,7 @@ static void UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgC
|
|||||||
txtColor[0] = bgColor;
|
txtColor[0] = bgColor;
|
||||||
txtColor[1] = fgColor;
|
txtColor[1] = fgColor;
|
||||||
txtColor[2] = shadowColor;
|
txtColor[2] = shadowColor;
|
||||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, txtColor, -1, string);
|
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, txtColor, TEXT_SKIP_DRAW, string);
|
||||||
CpuCopy16(tileData1, dst, tileSize);
|
CpuCopy16(tileData1, dst, tileSize);
|
||||||
CpuCopy16(tileData2, dst + offset, tileSize);
|
CpuCopy16(tileData2, dst + offset, tileSize);
|
||||||
RemoveWindow(windowId);
|
RemoveWindow(windowId);
|
||||||
@ -1561,7 +1561,7 @@ static void Task_PCMainMenu(u8 taskId)
|
|||||||
LoadMessageBoxAndBorderGfx();
|
LoadMessageBoxAndBorderGfx();
|
||||||
DrawDialogueFrame(0, 0);
|
DrawDialogueFrame(0, 0);
|
||||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
|
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SKIP_DRAW, NULL, 2, 1, 3);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
CopyWindowToVram(task->tWindowId, COPYWIN_FULL);
|
CopyWindowToVram(task->tWindowId, COPYWIN_FULL);
|
||||||
task->tState++;
|
task->tState++;
|
||||||
@ -1951,13 +1951,13 @@ static void ChooseBoxMenu_PrintInfo(void)
|
|||||||
|
|
||||||
// Print box name
|
// Print box name
|
||||||
center = GetStringCenterAlignXOffset(FONT_NORMAL, boxName, 64);
|
center = GetStringCenterAlignXOffset(FONT_NORMAL, boxName, 64);
|
||||||
AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 1, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, boxName);
|
AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 1, sChooseBoxMenu_TextColors, TEXT_SKIP_DRAW, boxName);
|
||||||
|
|
||||||
// Print #/30 for number of Pokémon in the box
|
// Print #/30 for number of Pokémon in the box
|
||||||
ConvertIntToDecimalStringN(numBoxMonsText, numInBox, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
ConvertIntToDecimalStringN(numBoxMonsText, numInBox, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||||
StringAppend(numBoxMonsText, sText_OutOf30);
|
StringAppend(numBoxMonsText, sText_OutOf30);
|
||||||
center = GetStringCenterAlignXOffset(FONT_NORMAL, numBoxMonsText, 64);
|
center = GetStringCenterAlignXOffset(FONT_NORMAL, numBoxMonsText, 64);
|
||||||
AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 17, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, numBoxMonsText);
|
AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 17, sChooseBoxMenu_TextColors, TEXT_SKIP_DRAW, numBoxMonsText);
|
||||||
|
|
||||||
winTileData = GetWindowAttribute(windowId, WINDOW_TILE_DATA);
|
winTileData = GetWindowAttribute(windowId, WINDOW_TILE_DATA);
|
||||||
CpuCopy32((void *)winTileData, (void *)OBJ_VRAM0 + 0x100 + (GetSpriteTileStartByTag(sChooseBoxMenu->tileTag) * 32), 0x400);
|
CpuCopy32((void *)winTileData, (void *)OBJ_VRAM0 + 0x100 + (GetSpriteTileStartByTag(sChooseBoxMenu->tileTag) * 32), 0x400);
|
||||||
@ -4005,17 +4005,17 @@ static void PrintDisplayMonInfo(void)
|
|||||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||||
if (sStorage->boxOption != OPTION_MOVE_ITEMS)
|
if (sStorage->boxOption != OPTION_MOVE_ITEMS)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyWindowToVram(0, COPYWIN_GFX);
|
CopyWindowToVram(0, COPYWIN_GFX);
|
||||||
@ -4319,7 +4319,7 @@ static void PrintMessage(u8 id)
|
|||||||
|
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sStorage->messageText, sMessages[id].text);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(sStorage->messageText, sMessages[id].text);
|
||||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
DrawTextBorderOuter(1, 2, 14);
|
DrawTextBorderOuter(1, 2, 14);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
CopyWindowToVram(1, COPYWIN_GFX);
|
CopyWindowToVram(1, COPYWIN_GFX);
|
||||||
|
@ -655,9 +655,9 @@ static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList)
|
|||||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||||
*gStringVar1 = EOS;
|
*gStringVar1 = EOS;
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberF700);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberF700);
|
||||||
AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, 0xFF, NULL);
|
AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, 0xFF, NULL);
|
AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(searchList->winid, COPYWIN_GFX);
|
CopyWindowToVram(searchList->winid, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -986,14 +986,14 @@ static void PrintNumberOfBattles(u16 windowId)
|
|||||||
static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top)
|
static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top)
|
||||||
{
|
{
|
||||||
int y = top * 16 + 1;
|
int y = top * 16 + 1;
|
||||||
AddTextPrinterParameterized(windowId, FONT_NARROW, str, 2, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NARROW, str, 2, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top)
|
static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top)
|
||||||
{
|
{
|
||||||
int x = GetStringRightAlignXOffset(FONT_NARROW, str, 86);
|
int x = GetStringRightAlignXOffset(FONT_NARROW, str, 86);
|
||||||
int y = top * 16 + 1;
|
int y = top * 16 + 1;
|
||||||
AddTextPrinterParameterized(windowId, FONT_NARROW, str, x, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NARROW, str, x, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1)
|
static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1)
|
||||||
@ -1023,7 +1023,7 @@ static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state)
|
|||||||
if (optionText == MATCH_CALL_OPTION_COUNT)
|
if (optionText == MATCH_CALL_OPTION_COUNT)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX);
|
CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX);
|
||||||
|
@ -713,7 +713,7 @@ void sub_81C8CB4(struct MatchCallWindowState *state, struct PokenavSub17Substruc
|
|||||||
list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer);
|
list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer);
|
||||||
list->unk38(list->listWindow.windowId, state->windowTopIndex, list->listWindow.unkA);
|
list->unk38(list->listWindow.windowId, state->windowTopIndex, list->listWindow.unkA);
|
||||||
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16);
|
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16);
|
||||||
AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SPEED_FF, list->unkTextBuffer);
|
AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SKIP_DRAW, list->unkTextBuffer);
|
||||||
sub_81C8C64(&list->listWindow, 1);
|
sub_81C8C64(&list->listWindow, 1);
|
||||||
CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_FULL, 0, list->listWindow.unkA * 2, list->listWindow.unk4, 2);
|
CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_FULL, 0, list->listWindow.unkA * 2, list->listWindow.unk4, 2);
|
||||||
}
|
}
|
||||||
@ -722,7 +722,7 @@ void sub_81C8D4C(struct MatchCallWindowState *state, struct PokenavSub17Substruc
|
|||||||
{
|
{
|
||||||
list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer);
|
list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer);
|
||||||
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16);
|
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16);
|
||||||
AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->unkTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->unkTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
sub_81C8C64(&list->listWindow, 0);
|
sub_81C8C64(&list->listWindow, 0);
|
||||||
CopyWindowToVram(list->listWindow.windowId, COPYWIN_FULL);
|
CopyWindowToVram(list->listWindow.windowId, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
@ -734,7 +734,7 @@ void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId)
|
|||||||
u32 top = (list->listWindow.unkA + 1 + (fieldId * 2)) & 0xF;
|
u32 top = (list->listWindow.unkA + 1 + (fieldId * 2)) & 0xF;
|
||||||
|
|
||||||
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16);
|
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16);
|
||||||
AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]);
|
AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, TEXT_SKIP_DRAW, fieldNames[fieldId]);
|
||||||
CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, top << 1, list->listWindow.unk4, 2);
|
CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, top << 1, list->listWindow.unk4, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -755,7 +755,7 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok
|
|||||||
if (str != NULL)
|
if (str != NULL)
|
||||||
{
|
{
|
||||||
sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2);
|
sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2);
|
||||||
AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, r6 * 2, list->listWindow.unk4, 2);
|
CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, r6 * 2, list->listWindow.unk4, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -535,7 +535,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
|||||||
case MAPSECTYPE_CITY_CANFLY:
|
case MAPSECTYPE_CITY_CANFLY:
|
||||||
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
||||||
PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2);
|
PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2);
|
||||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
DrawCityMap(state, regionMap->mapSecId, regionMap->posWithinMapSec);
|
DrawCityMap(state, regionMap->mapSecId, regionMap->posWithinMapSec);
|
||||||
CopyWindowToVram(state->infoWindowId, COPYWIN_FULL);
|
CopyWindowToVram(state->infoWindowId, COPYWIN_FULL);
|
||||||
SetCityZoomTextInvisibility(FALSE);
|
SetCityZoomTextInvisibility(FALSE);
|
||||||
@ -543,7 +543,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
|||||||
case MAPSECTYPE_CITY_CANTFLY:
|
case MAPSECTYPE_CITY_CANTFLY:
|
||||||
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
||||||
PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2);
|
PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2);
|
||||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17);
|
FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17);
|
||||||
CopyWindowToVram(state->infoWindowId, COPYWIN_FULL);
|
CopyWindowToVram(state->infoWindowId, COPYWIN_FULL);
|
||||||
SetCityZoomTextInvisibility(TRUE);
|
SetCityZoomTextInvisibility(TRUE);
|
||||||
@ -552,7 +552,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
|||||||
case MAPSECTYPE_BATTLE_FRONTIER:
|
case MAPSECTYPE_BATTLE_FRONTIER:
|
||||||
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
||||||
PutWindowTilemap(state->infoWindowId);
|
PutWindowTilemap(state->infoWindowId);
|
||||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
PrintLandmarkNames(state, regionMap->mapSecId, regionMap->posWithinMapSec);
|
PrintLandmarkNames(state, regionMap->mapSecId, regionMap->posWithinMapSec);
|
||||||
CopyWindowToVram(state->infoWindowId, COPYWIN_FULL);
|
CopyWindowToVram(state->infoWindowId, COPYWIN_FULL);
|
||||||
SetCityZoomTextInvisibility(TRUE);
|
SetCityZoomTextInvisibility(TRUE);
|
||||||
@ -654,7 +654,7 @@ static void PrintLandmarkNames(struct Pokenav5Struct_2 *state, int mapSecId, int
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
StringCopyPadded(gStringVar1, landmarkName, CHAR_SPACE, 12);
|
StringCopyPadded(gStringVar1, landmarkName, CHAR_SPACE, 12);
|
||||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, gStringVar1, 0, i * 16 + 17, TEXT_SKIP_DRAW, NULL);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -674,7 +674,7 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2)
|
|||||||
*ptr++ = CHAR_SLASH;
|
*ptr++ = CHAR_SLASH;
|
||||||
ConvertIntToDecimalStringN(ptr, val2, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(ptr, val2, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, strbuf, 56);
|
x = GetStringCenterAlignXOffset(FONT_NORMAL, strbuf, 56);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, 0xFF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void InitMonRibbonPokenavListMenuTemplate(void)
|
static void InitMonRibbonPokenavListMenuTemplate(void)
|
||||||
|
@ -809,7 +809,7 @@ static void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr)
|
|||||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700);
|
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700);
|
||||||
FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4));
|
FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4));
|
||||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, -1, gStringVar4);
|
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX);
|
CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -824,7 +824,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr)
|
|||||||
{
|
{
|
||||||
// Print normal ribbon name/description
|
// Print normal ribbon name/description
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]);
|
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gRibbonDescriptionPointers[ribbonId][i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -840,7 +840,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr)
|
|||||||
// Print gift ribbon name/description
|
// Print gift ribbon name/description
|
||||||
ribbonId--;
|
ribbonId--;
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]);
|
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gGiftRibbonDescriptionPointers[ribbonId][i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX);
|
CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX);
|
||||||
@ -877,7 +877,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr)
|
|||||||
|
|
||||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||||
GetMonNicknameLevelGender(gStringVar3, &level, &gender);
|
GetMonNicknameLevelGender(gStringVar3, &level, &gender);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar3, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar3, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
switch (gender)
|
switch (gender)
|
||||||
{
|
{
|
||||||
case MON_MALE:
|
case MON_MALE:
|
||||||
@ -896,7 +896,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr)
|
|||||||
*(txtPtr++) = CHAR_EXTRA_SYMBOL;
|
*(txtPtr++) = CHAR_EXTRA_SYMBOL;
|
||||||
*(txtPtr++) = CHAR_LV_2;
|
*(txtPtr++) = CHAR_LV_2;
|
||||||
ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, 60, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -933,7 +933,7 @@ static void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr)
|
|||||||
*(txtPtr++) = CHAR_SLASH;
|
*(txtPtr++) = CHAR_SLASH;
|
||||||
ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar1, 56);
|
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar1, 56);
|
||||||
AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(structPtr->listIdxWindowId, COPYWIN_GFX);
|
CopyWindowToVram(structPtr->listIdxWindowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ static void PrintTime(u8 windowId, u8 x, u8 y, u16 days, u8 hours, u8 minutes, u
|
|||||||
ConvertIntToDecimalStringN(gStringVar1, seconds, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar1, seconds, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||||
dest = StringCopy(dest, gStringVar1);
|
dest = StringCopy(dest, gStringVar1);
|
||||||
|
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8 seconds)
|
static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8 seconds)
|
||||||
@ -578,7 +578,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
|
|||||||
case 0:
|
case 0:
|
||||||
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x214, 0xE);
|
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x214, 0xE);
|
||||||
|
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0);
|
AddTextPrinterParameterized(0, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SKIP_DRAW, 0);
|
||||||
PrintTime(
|
PrintTime(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@ -588,7 +588,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
|
|||||||
gLocalTime.minutes,
|
gLocalTime.minutes,
|
||||||
gLocalTime.seconds);
|
gLocalTime.seconds);
|
||||||
|
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0);
|
AddTextPrinterParameterized(0, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SKIP_DRAW, 0);
|
||||||
PrintTime(
|
PrintTime(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -1223,7 +1223,7 @@ static void CB2_LoadRoulette(void)
|
|||||||
SetMultiplierSprite(SELECTION_NONE);
|
SetMultiplierSprite(SELECTION_NONE);
|
||||||
DrawGridBackground(SELECTION_NONE);
|
DrawGridBackground(SELECTION_NONE);
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
gSpriteCoordOffsetX = -60;
|
gSpriteCoordOffsetX = -60;
|
||||||
gSpriteCoordOffsetY = 0;
|
gSpriteCoordOffsetY = 0;
|
||||||
@ -1294,7 +1294,7 @@ static void Task_AskKeepPlaying(u8 taskId)
|
|||||||
{
|
{
|
||||||
DisplayYesNoMenuDefaultYes();
|
DisplayYesNoMenuDefaultYes();
|
||||||
DrawStdWindowFrame(sTextWindowId, 0);
|
DrawStdWindowFrame(sTextWindowId, 0);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SKIP_DRAW, 0);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying);
|
DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying);
|
||||||
}
|
}
|
||||||
@ -1806,14 +1806,14 @@ static void Task_PrintSpinResult(u8 taskId)
|
|||||||
{
|
{
|
||||||
PlayFanfare(MUS_SLOTS_JACKPOT);
|
PlayFanfare(MUS_SLOTS_JACKPOT);
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_Jackpot, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PlayFanfare(MUS_SLOTS_WIN);
|
PlayFanfare(MUS_SLOTS_WIN);
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ItsAHit, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1821,7 +1821,7 @@ static void Task_PrintSpinResult(u8 taskId)
|
|||||||
default:
|
default:
|
||||||
m4aSongNumStart(SE_FAILURE);
|
m4aSongNumStart(SE_FAILURE);
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NothingDoing, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1866,7 +1866,7 @@ static void Task_PrintPayout(u8 taskId)
|
|||||||
ConvertIntToDecimalStringN(gStringVar1, (sRoulette->minBet * gTasks[taskId].tMultiplier), STR_CONV_MODE_LEFT_ALIGN, 2);
|
ConvertIntToDecimalStringN(gStringVar1, (sRoulette->minBet * gTasks[taskId].tMultiplier), STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_YouveWonXCoins);
|
StringExpandPlaceholders(gStringVar4, Roulette_Text_YouveWonXCoins);
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
gTasks[taskId].tPayout = (sRoulette->minBet * gTasks[taskId].tMultiplier);
|
gTasks[taskId].tPayout = (sRoulette->minBet * gTasks[taskId].tMultiplier);
|
||||||
gTasks[taskId].data[7] = 0;
|
gTasks[taskId].data[7] = 0;
|
||||||
@ -1902,7 +1902,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId)
|
|||||||
{
|
{
|
||||||
// Reached Ball 6, clear board
|
// Reached Ball 6, clear board
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
StartTaskAfterDelayOrInput(taskId, Task_ClearBoard, NO_DELAY, A_BUTTON | B_BUTTON);
|
StartTaskAfterDelayOrInput(taskId, Task_ClearBoard, NO_DELAY, A_BUTTON | B_BUTTON);
|
||||||
}
|
}
|
||||||
@ -1910,7 +1910,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId)
|
|||||||
{
|
{
|
||||||
// Player maxed out coins
|
// Player maxed out coins
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON);
|
StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON);
|
||||||
}
|
}
|
||||||
@ -1924,7 +1924,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId)
|
|||||||
{
|
{
|
||||||
// Player out of coins
|
// Player out of coins
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
StartTaskAfterDelayOrInput(taskId, Task_StopPlaying, 60, A_BUTTON | B_BUTTON);
|
StartTaskAfterDelayOrInput(taskId, Task_StopPlaying, 60, A_BUTTON | B_BUTTON);
|
||||||
}
|
}
|
||||||
@ -1949,7 +1949,7 @@ static void Task_ClearBoard(u8 taskId)
|
|||||||
if (gTasks[taskId].tCoins == MAX_COINS)
|
if (gTasks[taskId].tCoins == MAX_COINS)
|
||||||
{
|
{
|
||||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
|
||||||
StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON);
|
StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON);
|
||||||
}
|
}
|
||||||
@ -3426,7 +3426,7 @@ static void Task_PrintMinBet(u8 taskId)
|
|||||||
ConvertIntToDecimalStringN(gStringVar1, minBet, STR_CONV_MODE_LEADING_ZEROS, 1);
|
ConvertIntToDecimalStringN(gStringVar1, minBet, STR_CONV_MODE_LEADING_ZEROS, 1);
|
||||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
|
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
|
||||||
DrawStdWindowFrame(0, FALSE);
|
DrawStdWindowFrame(0, FALSE);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
gTasks[taskId].func = Task_ShowMinBetYesNo;
|
gTasks[taskId].func = Task_ShowMinBetYesNo;
|
||||||
}
|
}
|
||||||
@ -3445,7 +3445,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId)
|
|||||||
{
|
{
|
||||||
// Special rate for Game Corner service day (only at second table)
|
// Special rate for Game Corner service day (only at second table)
|
||||||
DrawStdWindowFrame(0, FALSE);
|
DrawStdWindowFrame(0, FALSE);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
gTasks[taskId].func = Task_PrintMinBet;
|
gTasks[taskId].func = Task_PrintMinBet;
|
||||||
}
|
}
|
||||||
@ -3454,7 +3454,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId)
|
|||||||
// Print minimum bet
|
// Print minimum bet
|
||||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
|
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
|
||||||
DrawStdWindowFrame(0, FALSE);
|
DrawStdWindowFrame(0, FALSE);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
gTasks[taskId].func = Task_ShowMinBetYesNo;
|
gTasks[taskId].func = Task_ShowMinBetYesNo;
|
||||||
}
|
}
|
||||||
@ -3464,7 +3464,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId)
|
|||||||
// Not enough for minimum bet
|
// Not enough for minimum bet
|
||||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_NotEnoughCoins);
|
StringExpandPlaceholders(gStringVar4, Roulette_Text_NotEnoughCoins);
|
||||||
DrawStdWindowFrame(0, FALSE);
|
DrawStdWindowFrame(0, FALSE);
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
gTasks[taskId].func = Task_NotEnoughForMinBet;
|
gTasks[taskId].func = Task_NotEnoughForMinBet;
|
||||||
gTasks[taskId].tCoins = 0;
|
gTasks[taskId].tCoins = 0;
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#include "tv.h"
|
#include "tv.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "constants/event_objects.h"
|
#include "constants/event_objects.h"
|
||||||
|
#include "constants/maps.h"
|
||||||
|
|
||||||
typedef u16 (*SpecialFunc)(void);
|
typedef u16 (*SpecialFunc)(void);
|
||||||
typedef void (*NativeFunc)(void);
|
typedef void (*NativeFunc)(void);
|
||||||
@ -790,7 +791,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx)
|
|||||||
u16 y;
|
u16 y;
|
||||||
|
|
||||||
PlayerGetDestCoords(&x, &y);
|
PlayerGetDestCoords(&x, &y);
|
||||||
if (mapGroup == 0xFF && mapNum == 0xFF)
|
if (mapGroup == MAP_GROUP(UNDEFINED) && mapNum == MAP_NUM(UNDEFINED))
|
||||||
SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET);
|
SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET);
|
||||||
else
|
else
|
||||||
SetWarpDestination(mapGroup, mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET);
|
SetWarpDestination(mapGroup, mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET);
|
||||||
@ -1532,7 +1533,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
|||||||
DrawStdWindowFrame(gBrailleWindowId, 0);
|
DrawStdWindowFrame(gBrailleWindowId, 0);
|
||||||
PutWindowTilemap(gBrailleWindowId);
|
PutWindowTilemap(gBrailleWindowId);
|
||||||
FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, 0xFF, 0x0);
|
AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(gBrailleWindowId, COPYWIN_FULL);
|
CopyWindowToVram(gBrailleWindowId, COPYWIN_FULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -353,22 +353,22 @@ static void CreatePCMultichoice(void)
|
|||||||
numChoices = 4;
|
numChoices = 4;
|
||||||
windowId = CreateWindowFromRect(0, 0, width, 8);
|
windowId = CreateWindowFromRect(0, 0, width, 8);
|
||||||
SetStandardWindowBorderStyle(windowId, 0);
|
SetStandardWindowBorderStyle(windowId, 0);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
numChoices = 3;
|
numChoices = 3;
|
||||||
windowId = CreateWindowFromRect(0, 0, width, 6);
|
windowId = CreateWindowFromRect(0, 0, width, 6);
|
||||||
SetStandardWindowBorderStyle(windowId, 0);
|
SetStandardWindowBorderStyle(windowId, 0);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change PC name if player has met Lanette
|
// Change PC name if player has met Lanette
|
||||||
if (FlagGet(FLAG_SYS_PC_LANETTE))
|
if (FlagGet(FLAG_SYS_PC_LANETTE))
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
else
|
else
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
StringExpandPlaceholders(gStringVar4, gText_PlayersPC);
|
StringExpandPlaceholders(gStringVar4, gText_PlayersPC);
|
||||||
PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17);
|
PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17);
|
||||||
@ -527,7 +527,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
|
|||||||
{
|
{
|
||||||
if (sLilycoveSSTidalSelections[i] != 0xFF)
|
if (sLilycoveSSTidalSelections[i] != 0xFF)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SKIP_DRAW, NULL);
|
||||||
selectionCount++;
|
selectionCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -688,14 +688,14 @@ static void CreateStartMenuForPokenavTutorial(void)
|
|||||||
{
|
{
|
||||||
u8 windowId = CreateWindowFromRect(21, 0, 7, 18);
|
u8 windowId = CreateWindowFromRect(21, 0, 7, 18);
|
||||||
SetStandardWindowBorderStyle(windowId, 0);
|
SetStandardWindowBorderStyle(windowId, 0);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SKIP_DRAW, NULL);
|
||||||
InitMenuNormal(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0);
|
InitMenuNormal(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0);
|
||||||
InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU);
|
InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU);
|
||||||
CopyWindowToVram(windowId, COPYWIN_FULL);
|
CopyWindowToVram(windowId, COPYWIN_FULL);
|
||||||
|
@ -577,7 +577,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y)
|
|||||||
|
|
||||||
StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1);
|
StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1);
|
||||||
x = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 0x78);
|
x = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 0x78);
|
||||||
AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, 0, 0, sShopBuyMenuTextColors[1], -1, gStringVar4);
|
AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, 0, 0, sShopBuyMenuTextColors[1], TEXT_SKIP_DRAW, gStringVar4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1145,7 +1145,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
|
|||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
|
||||||
FillWindowPixelBuffer(4, PIXEL_FILL(1));
|
FillWindowPixelBuffer(4, PIXEL_FILL(1));
|
||||||
PrintMoneyAmount(4, 38, 1, sShopData->totalCost, TEXT_SPEED_FF);
|
PrintMoneyAmount(4, 38, 1, sShopData->totalCost, TEXT_SKIP_DRAW);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, tItemCount, STR_CONV_MODE_LEADING_ZEROS, BAG_ITEM_CAPACITY_DIGITS);
|
ConvertIntToDecimalStringN(gStringVar1, tItemCount, STR_CONV_MODE_LEADING_ZEROS, BAG_ITEM_CAPACITY_DIGITS);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||||
BuyMenuPrint(4, gStringVar4, 0, 1, 0, 0);
|
BuyMenuPrint(4, gStringVar4, 0, 1, 0, 0);
|
||||||
|
@ -386,7 +386,7 @@ static void ShowSafariBallsWindow(void)
|
|||||||
DrawStdWindowFrame(sSafariBallsWindowId, FALSE);
|
DrawStdWindowFrame(sSafariBallsWindowId, FALSE);
|
||||||
ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_SafariBallStock);
|
StringExpandPlaceholders(gStringVar4, gText_SafariBallStock);
|
||||||
AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL);
|
AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sSafariBallsWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sSafariBallsWindowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ static void ShowPyramidFloorWindow(void)
|
|||||||
DrawStdWindowFrame(sBattlePyramidFloorWindowId, FALSE);
|
DrawStdWindowFrame(sBattlePyramidFloorWindowId, FALSE);
|
||||||
StringCopy(gStringVar1, sPyramidFloorNames[gSaveBlock2Ptr->frontier.curChallengeBattleNum]);
|
StringCopy(gStringVar1, sPyramidFloorNames[gSaveBlock2Ptr->frontier.curChallengeBattleNum]);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor);
|
StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor);
|
||||||
AddTextPrinterParameterized(sBattlePyramidFloorWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL);
|
AddTextPrinterParameterized(sBattlePyramidFloorWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
CopyWindowToVram(sBattlePyramidFloorWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sBattlePyramidFloorWindowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,7 +433,7 @@ static bool32 PrintStartMenuActions(s8 *pIndex, u32 count)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringExpandPlaceholders(gStringVar4, sStartMenuItems[sCurrentStartMenuActions[index]].text);
|
StringExpandPlaceholders(gStringVar4, sStartMenuItems[sCurrentStartMenuActions[index]].text);
|
||||||
AddTextPrinterParameterized(GetStartMenuWindowId(), FONT_NORMAL, gStringVar4, 8, (index << 4) + 9, 0xFF, NULL);
|
AddTextPrinterParameterized(GetStartMenuWindowId(), FONT_NORMAL, gStringVar4, 8, (index << 4) + 9, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
@ -1240,7 +1240,7 @@ static void Task_SaveAfterLinkBattle(u8 taskId)
|
|||||||
AddTextPrinterParameterized2(0,
|
AddTextPrinterParameterized2(0,
|
||||||
FONT_NORMAL,
|
FONT_NORMAL,
|
||||||
gText_SavingDontTurnOffPower,
|
gText_SavingDontTurnOffPower,
|
||||||
TEXT_SPEED_FF,
|
TEXT_SKIP_DRAW,
|
||||||
NULL,
|
NULL,
|
||||||
TEXT_COLOR_DARK_GRAY,
|
TEXT_COLOR_DARK_GRAY,
|
||||||
TEXT_COLOR_WHITE,
|
TEXT_COLOR_WHITE,
|
||||||
@ -1330,38 +1330,38 @@ static void ShowSaveInfoWindow(void)
|
|||||||
// Print region name
|
// Print region name
|
||||||
yOffset = 1;
|
yOffset = 1;
|
||||||
BufferSaveMenuText(SAVE_MENU_LOCATION, gStringVar4, TEXT_COLOR_GREEN);
|
BufferSaveMenuText(SAVE_MENU_LOCATION, gStringVar4, TEXT_COLOR_GREEN);
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, 0, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, 0, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
// Print player name
|
// Print player name
|
||||||
yOffset += 16;
|
yOffset += 16;
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPlayer, 0, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPlayer, 0, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
BufferSaveMenuText(SAVE_MENU_NAME, gStringVar4, color);
|
BufferSaveMenuText(SAVE_MENU_NAME, gStringVar4, color);
|
||||||
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
||||||
PrintPlayerNameOnWindow(sSaveInfoWindowId, gStringVar4, xOffset, yOffset);
|
PrintPlayerNameOnWindow(sSaveInfoWindowId, gStringVar4, xOffset, yOffset);
|
||||||
|
|
||||||
// Print badge count
|
// Print badge count
|
||||||
yOffset += 16;
|
yOffset += 16;
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingBadges, 0, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingBadges, 0, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
BufferSaveMenuText(SAVE_MENU_BADGES, gStringVar4, color);
|
BufferSaveMenuText(SAVE_MENU_BADGES, gStringVar4, color);
|
||||||
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
|
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
|
||||||
{
|
{
|
||||||
// Print pokedex count
|
// Print pokedex count
|
||||||
yOffset += 16;
|
yOffset += 16;
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPokedex, 0, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPokedex, 0, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
BufferSaveMenuText(SAVE_MENU_CAUGHT, gStringVar4, color);
|
BufferSaveMenuText(SAVE_MENU_CAUGHT, gStringVar4, color);
|
||||||
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print play time
|
// Print play time
|
||||||
yOffset += 16;
|
yOffset += 16;
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingTime, 0, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingTime, 0, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
BufferSaveMenuText(SAVE_MENU_PLAY_TIME, gStringVar4, color);
|
BufferSaveMenuText(SAVE_MENU_PLAY_TIME, gStringVar4, color);
|
||||||
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70);
|
||||||
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, TEXT_SKIP_DRAW, NULL);
|
||||||
|
|
||||||
CopyWindowToVram(sSaveInfoWindowId, COPYWIN_GFX);
|
CopyWindowToVram(sSaveInfoWindowId, COPYWIN_GFX);
|
||||||
}
|
}
|
||||||
|
@ -2153,7 +2153,7 @@ static void DoQueuedActions(void)
|
|||||||
static void PrintTradeMessage(u8 messageId)
|
static void PrintTradeMessage(u8 messageId)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||||
AddTextPrinterParameterized(0, FONT_NORMAL, sTradeMessages[messageId], 0, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(0, FONT_NORMAL, sTradeMessages[messageId], 0, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
DrawTextBorderOuter(0, 20, 12);
|
DrawTextBorderOuter(0, 20, 12);
|
||||||
PutWindowTilemap(0);
|
PutWindowTilemap(0);
|
||||||
CopyWindowToVram(0, COPYWIN_FULL);
|
CopyWindowToVram(0, COPYWIN_FULL);
|
||||||
|
@ -1001,9 +1001,9 @@ static void PrintNameOnCardFront(void)
|
|||||||
StringCopy(txtPtr, sData->trainerCard.playerName);
|
StringCopy(txtPtr, sData->trainerCard.playerName);
|
||||||
ConvertInternationalString(txtPtr, sData->language);
|
ConvertInternationalString(txtPtr, sData->language);
|
||||||
if (sData->cardType == CARD_TYPE_FRLG)
|
if (sData->cardType == CARD_TYPE_FRLG)
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 28, sTrainerCardTextColors, TEXT_SPEED_FF, buffer);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 28, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer);
|
||||||
else
|
else
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 33, sTrainerCardTextColors, TEXT_SPEED_FF, buffer);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintIdOnCard(void)
|
static void PrintIdOnCard(void)
|
||||||
@ -1025,7 +1025,7 @@ static void PrintIdOnCard(void)
|
|||||||
top = 9;
|
top = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, xPos, top, sTrainerCardTextColors, TEXT_SPEED_FF, buffer);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, xPos, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintMoneyOnCard(void)
|
static void PrintMoneyOnCard(void)
|
||||||
@ -1034,9 +1034,9 @@ static void PrintMoneyOnCard(void)
|
|||||||
u8 top;
|
u8 top;
|
||||||
|
|
||||||
if (!sData->isHoenn)
|
if (!sData->isHoenn)
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 56, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 56, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney);
|
||||||
else
|
else
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 57, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 57, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney);
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(gStringVar1, sData->trainerCard.money, STR_CONV_MODE_LEFT_ALIGN, 6);
|
ConvertIntToDecimalStringN(gStringVar1, sData->trainerCard.money, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||||
StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1);
|
StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1);
|
||||||
@ -1050,7 +1050,7 @@ static void PrintMoneyOnCard(void)
|
|||||||
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128);
|
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128);
|
||||||
top = 57;
|
top = 57;
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u16 GetCaughtMonsCount(void)
|
static u16 GetCaughtMonsCount(void)
|
||||||
@ -1068,9 +1068,9 @@ static void PrintPokedexOnCard(void)
|
|||||||
if (FlagGet(FLAG_SYS_POKEDEX_GET))
|
if (FlagGet(FLAG_SYS_POKEDEX_GET))
|
||||||
{
|
{
|
||||||
if (!sData->isHoenn)
|
if (!sData->isHoenn)
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 72, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 72, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex);
|
||||||
else
|
else
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 73, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 73, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex);
|
||||||
StringCopy(ConvertIntToDecimalStringN(gStringVar4, sData->trainerCard.caughtMonsCount, STR_CONV_MODE_LEFT_ALIGN, 3), gText_EmptyString6);
|
StringCopy(ConvertIntToDecimalStringN(gStringVar4, sData->trainerCard.caughtMonsCount, STR_CONV_MODE_LEFT_ALIGN, 3), gText_EmptyString6);
|
||||||
if (!sData->isHoenn)
|
if (!sData->isHoenn)
|
||||||
{
|
{
|
||||||
@ -1082,7 +1082,7 @@ static void PrintPokedexOnCard(void)
|
|||||||
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128);
|
xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128);
|
||||||
top = 73;
|
top = 73;
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1096,9 +1096,9 @@ static void PrintTimeOnCard(void)
|
|||||||
u32 x, y, totalWidth;
|
u32 x, y, totalWidth;
|
||||||
|
|
||||||
if (!sData->isHoenn)
|
if (!sData->isHoenn)
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 88, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 88, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime);
|
||||||
else
|
else
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 89, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 89, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime);
|
||||||
|
|
||||||
if (sData->isLink)
|
if (sData->isLink)
|
||||||
{
|
{
|
||||||
@ -1132,12 +1132,12 @@ static void PrintTimeOnCard(void)
|
|||||||
|
|
||||||
FillWindowPixelRect(1, PIXEL_FILL(0), x, y, totalWidth, 15);
|
FillWindowPixelRect(1, PIXEL_FILL(0), x, y, totalWidth, 15);
|
||||||
ConvertIntToDecimalStringN(gStringVar4, hours, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
ConvertIntToDecimalStringN(gStringVar4, hours, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
x += 18;
|
x += 18;
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SPEED_FF, gText_Colon2);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SKIP_DRAW, gText_Colon2);
|
||||||
x += width;
|
x += width;
|
||||||
ConvertIntToDecimalStringN(gStringVar4, minutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar4, minutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintProfilePhraseOnCard(void)
|
static void PrintProfilePhraseOnCard(void)
|
||||||
@ -1147,10 +1147,10 @@ static void PrintProfilePhraseOnCard(void)
|
|||||||
|
|
||||||
if (sData->isLink)
|
if (sData->isLink)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[0]);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[0]);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[1]);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[1]);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[2]);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[2]);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[3]);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1168,9 +1168,9 @@ static void BufferNameForCardBack(void)
|
|||||||
static void PrintNameOnCardBack(void)
|
static void PrintNameOnCardBack(void)
|
||||||
{
|
{
|
||||||
if (!sData->isHoenn)
|
if (!sData->isHoenn)
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 136, 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, 136, 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard);
|
||||||
else
|
else
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const u8 sText_HofTime[] = _("{STR_VAR_1}:{STR_VAR_2}:{STR_VAR_3}");
|
static const u8 sText_HofTime[] = _("{STR_VAR_1}:{STR_VAR_2}:{STR_VAR_3}");
|
||||||
@ -1191,8 +1191,8 @@ static void PrintStatOnBackOfCard(u8 top, const u8* statName, u8* stat, const u8
|
|||||||
static const u8 xOffsets[] = {8, 16};
|
static const u8 xOffsets[] = {8, 16};
|
||||||
static const u8 widths[] = {216, 216};
|
static const u8 widths[] = {216, 216};
|
||||||
|
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SPEED_FF, statName);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, statName);
|
||||||
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SPEED_FF, stat);
|
AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SKIP_DRAW, stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintHofDebutTimeOnCard(void)
|
static void PrintHofDebutTimeOnCard(void)
|
||||||
|
@ -591,12 +591,12 @@ void PrintOnTrainerHillRecordsWindow(void)
|
|||||||
SetUpDataStruct();
|
SetUpDataStruct();
|
||||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_TimeBoard, 0xD0);
|
x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_TimeBoard, 0xD0);
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, x, 2, sRecordWinColors, TEXT_SKIP_DRAW, gText_TimeBoard);
|
||||||
|
|
||||||
y = 18;
|
y = 18;
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0, y, sRecordWinColors, TEXT_SPEED_FF, sTagMatchStrings[i]);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, 0, y, sRecordWinColors, TEXT_SKIP_DRAW, sTagMatchStrings[i]);
|
||||||
y += 15;
|
y += 15;
|
||||||
total = GetTimerValue(&gSaveBlock1Ptr->trainerHillTimes[i]);
|
total = GetTimerValue(&gSaveBlock1Ptr->trainerHillTimes[i]);
|
||||||
minutes = total / (60 * 60);
|
minutes = total / (60 * 60);
|
||||||
@ -609,7 +609,7 @@ void PrintOnTrainerHillRecordsWindow(void)
|
|||||||
ConvertIntToDecimalStringN(gStringVar3, secondsFraction, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar3, secondsFraction, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||||
StringExpandPlaceholders(StringCopy(gStringVar4, gText_TimeCleared), gText_XMinYDotZSec);
|
StringExpandPlaceholders(StringCopy(gStringVar4, gText_TimeCleared), gText_XMinYDotZSec);
|
||||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0xD0);
|
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0xD0);
|
||||||
AddTextPrinterParameterized3(0, FONT_NORMAL, x, y, sRecordWinColors, TEXT_SPEED_FF, gStringVar4);
|
AddTextPrinterParameterized3(0, FONT_NORMAL, x, y, sRecordWinColors, TEXT_SKIP_DRAW, gStringVar4);
|
||||||
y += 17;
|
y += 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3852,7 +3852,7 @@ static void PrintUnionRoomText(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL);
|
AddTextPrinter(&printerTemplate, TEXT_SKIP_DRAW, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ClearRfuPlayerList(struct RfuPlayer *players, u8 count)
|
static void ClearRfuPlayerList(struct RfuPlayer *players, u8 count)
|
||||||
|
@ -2740,8 +2740,8 @@ static void AddYesNoMenuAt(u8 left, u8 top, u8 initialCursorPos)
|
|||||||
{
|
{
|
||||||
FillWindowPixelBuffer(sDisplay->yesNoMenuWindowId, PIXEL_FILL(1));
|
FillWindowPixelBuffer(sDisplay->yesNoMenuWindowId, PIXEL_FILL(1));
|
||||||
PutWindowTilemap(sDisplay->yesNoMenuWindowId);
|
PutWindowTilemap(sDisplay->yesNoMenuWindowId);
|
||||||
AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_Yes, 8, 1, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_Yes, 8, 1, TEXT_SKIP_DRAW, NULL);
|
||||||
AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_No, 8, 17, TEXT_SPEED_FF, NULL);
|
AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_No, 8, 17, TEXT_SKIP_DRAW, NULL);
|
||||||
DrawTextBorderOuter(sDisplay->yesNoMenuWindowId, 1, 13);
|
DrawTextBorderOuter(sDisplay->yesNoMenuWindowId, 1, 13);
|
||||||
InitMenuInUpperLeftCornerNormal(sDisplay->yesNoMenuWindowId, 2, initialCursorPos);
|
InitMenuInUpperLeftCornerNormal(sDisplay->yesNoMenuWindowId, 2, initialCursorPos);
|
||||||
}
|
}
|
||||||
@ -2815,7 +2815,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs)
|
|||||||
str,
|
str,
|
||||||
sDisplayStdMessages[msgId].x + 8,
|
sDisplayStdMessages[msgId].x + 8,
|
||||||
sDisplayStdMessages[msgId].y + 8,
|
sDisplayStdMessages[msgId].y + 8,
|
||||||
TEXT_SPEED_FF,
|
TEXT_SKIP_DRAW,
|
||||||
NULL,
|
NULL,
|
||||||
sDisplayStdMessages[msgId].letterSpacing,
|
sDisplayStdMessages[msgId].letterSpacing,
|
||||||
sDisplayStdMessages[msgId].lineSpacing);
|
sDisplayStdMessages[msgId].lineSpacing);
|
||||||
@ -2829,7 +2829,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs)
|
|||||||
str,
|
str,
|
||||||
sDisplayStdMessages[msgId].x,
|
sDisplayStdMessages[msgId].x,
|
||||||
sDisplayStdMessages[msgId].y,
|
sDisplayStdMessages[msgId].y,
|
||||||
TEXT_SPEED_FF,
|
TEXT_SKIP_DRAW,
|
||||||
NULL,
|
NULL,
|
||||||
sDisplayStdMessages[msgId].letterSpacing,
|
sDisplayStdMessages[msgId].letterSpacing,
|
||||||
sDisplayStdMessages[msgId].lineSpacing);
|
sDisplayStdMessages[msgId].lineSpacing);
|
||||||
@ -2877,7 +2877,7 @@ static void DrawTextEntryMessage(u16 x, u8 *str, u8 bgColor, u8 fgColor, u8 shad
|
|||||||
strBuffer[1] = EXT_CTRL_CODE_MIN_LETTER_SPACING;
|
strBuffer[1] = EXT_CTRL_CODE_MIN_LETTER_SPACING;
|
||||||
strBuffer[2] = 8;
|
strBuffer[2] = 8;
|
||||||
StringCopy(&strBuffer[3], str);
|
StringCopy(&strBuffer[3], str);
|
||||||
AddTextPrinterParameterized3(1, FONT_SHORT, x * 8, 1, color, TEXT_SPEED_FF, strBuffer);
|
AddTextPrinterParameterized3(1, FONT_SHORT, x * 8, 1, color, TEXT_SKIP_DRAW, strBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintCurrentKeyboardPage(void)
|
static void PrintCurrentKeyboardPage(void)
|
||||||
@ -2912,7 +2912,7 @@ static void PrintCurrentKeyboardPage(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
StringCopy(&str[3], sUnionRoomKeyboardText[page][i]);
|
StringCopy(&str[3], sUnionRoomKeyboardText[page][i]);
|
||||||
AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str);
|
AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2923,7 +2923,7 @@ static void PrintCurrentKeyboardPage(void)
|
|||||||
str2 = GetRegisteredTextByRow(i);
|
str2 = GetRegisteredTextByRow(i);
|
||||||
if (GetStringWidth(FONT_SMALL, str2, 0) <= 40)
|
if (GetStringWidth(FONT_SMALL, str2, 0) <= 40)
|
||||||
{
|
{
|
||||||
AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str2);
|
AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2934,8 +2934,8 @@ static void PrintCurrentKeyboardPage(void)
|
|||||||
StringCopyN_Multibyte(str, str2, length);
|
StringCopyN_Multibyte(str, str2, length);
|
||||||
} while (GetStringWidth(FONT_SMALL, str, 0) > 35);
|
} while (GetStringWidth(FONT_SMALL, str, 0) > 35);
|
||||||
|
|
||||||
AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str);
|
AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str);
|
||||||
AddTextPrinterParameterized3(2, FONT_SMALL, left + 35, top, color, TEXT_SPEED_FF, sText_Ellipsis);
|
AddTextPrinterParameterized3(2, FONT_SMALL, left + 35, top, color, TEXT_SKIP_DRAW, sText_Ellipsis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3006,7 +3006,7 @@ static void PrintChatMessage(u16 row, u8 *str, u8 colorIdx)
|
|||||||
color[1] = colorIdx * 2 + 2;
|
color[1] = colorIdx * 2 + 2;
|
||||||
color[2] = colorIdx * 2 + 3;
|
color[2] = colorIdx * 2 + 3;
|
||||||
FillWindowPixelRect(0, PIXEL_FILL(1), 0, row * 15, 168, 15);
|
FillWindowPixelRect(0, PIXEL_FILL(1), 0, row * 15, 168, 15);
|
||||||
AddTextPrinterParameterized3(0, FONT_SHORT, 0, row * 15 + 1, color, TEXT_SPEED_FF, str);
|
AddTextPrinterParameterized3(0, FONT_SHORT, 0, row * 15 + 1, color, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ResetGpuBgState(void)
|
static void ResetGpuBgState(void)
|
||||||
|
@ -301,7 +301,7 @@ static u16 GetCurrentMapWildMonHeaderId(void)
|
|||||||
for (i = 0; ; i++)
|
for (i = 0; ; i++)
|
||||||
{
|
{
|
||||||
const struct WildPokemonHeader *wildHeader = &gWildMonHeaders[i];
|
const struct WildPokemonHeader *wildHeader = &gWildMonHeaders[i];
|
||||||
if (wildHeader->mapGroup == 0xFF)
|
if (wildHeader->mapGroup == MAP_GROUP(UNDEFINED))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (gWildMonHeaders[i].mapGroup == gSaveBlock1Ptr->location.mapGroup &&
|
if (gWildMonHeaders[i].mapGroup == gSaveBlock1Ptr->location.mapGroup &&
|
||||||
|
@ -344,7 +344,7 @@ static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTextPrinterParameterized4(windowId, fontId, x, y, 0, 0, color, -1, str);
|
AddTextPrinterParameterized4(windowId, fontId, x, y, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * groupCounts)
|
static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * groupCounts)
|
||||||
|
Loading…
Reference in New Issue
Block a user