Add font id constants
10
charmap.txt
@ -414,7 +414,7 @@ HIGHLIGHT = FC 02 @ same as fc 01
|
||||
SHADOW = FC 03 @ same as fc 01
|
||||
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
|
||||
PALETTE = FC 05 @ used in credits
|
||||
FONT = FC 06 @ valid values are 0, 1, 2, 6 (braille), 7 and 8
|
||||
FONT = FC 06 @ Given a font id, or use font constants below instead
|
||||
RESET_SIZE = FC 07
|
||||
PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
|
||||
PAUSE_UNTIL_PRESS = FC 09
|
||||
@ -434,6 +434,14 @@ ENG = FC 16
|
||||
PAUSE_MUSIC = FC 17
|
||||
RESUME_MUSIC = FC 18
|
||||
|
||||
@ fonts
|
||||
|
||||
FONT_SMALL = FC 06 00
|
||||
FONT_NORMAL = FC 06 01
|
||||
FONT_SHORT = FC 06 02
|
||||
FONT_NARROW = FC 06 07
|
||||
FONT_SMALL_NARROW = FC 06 08
|
||||
|
||||
@ colors
|
||||
|
||||
TRANSPARENT = 00
|
||||
|
56
data/fonts.s
@ -4,52 +4,52 @@
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gFont8LatinGlyphs::
|
||||
.incbin "graphics/fonts/font8.latfont"
|
||||
gFontSmallNarrowLatinGlyphs::
|
||||
.incbin "graphics/fonts/small_narrow/glyphs.latfont"
|
||||
|
||||
.align 2
|
||||
gFont8LatinGlyphWidths::
|
||||
.include "graphics/fonts/font8_latin_widths.inc"
|
||||
gFontSmallNarrowLatinGlyphWidths::
|
||||
.include "graphics/fonts/small_narrow/latin_widths.inc"
|
||||
|
||||
.align 2
|
||||
gFont0LatinGlyphs::
|
||||
.incbin "graphics/fonts/font0.latfont"
|
||||
gFontSmallLatinGlyphs::
|
||||
.incbin "graphics/fonts/small/glyphs.latfont"
|
||||
|
||||
.align 2
|
||||
gFont0LatinGlyphWidths::
|
||||
.include "graphics/fonts/font0_latin_widths.inc"
|
||||
gFontSmallLatinGlyphWidths::
|
||||
.include "graphics/fonts/small/latin_widths.inc"
|
||||
|
||||
.align 2
|
||||
gFont7LatinGlyphs::
|
||||
.incbin "graphics/fonts/font7.latfont"
|
||||
gFontNarrowLatinGlyphs::
|
||||
.incbin "graphics/fonts/narrow/glyphs.latfont"
|
||||
|
||||
.align 2
|
||||
gFont7LatinGlyphWidths::
|
||||
.include "graphics/fonts/font7_latin_widths.inc"
|
||||
gFontNarrowLatinGlyphWidths::
|
||||
.include "graphics/fonts/narrow/latin_widths.inc"
|
||||
|
||||
.align 2
|
||||
gFont2LatinGlyphs::
|
||||
.incbin "graphics/fonts/font2.latfont"
|
||||
gFontShortLatinGlyphs::
|
||||
.incbin "graphics/fonts/short/glyphs.latfont"
|
||||
|
||||
.align 2
|
||||
gFont2LatinGlyphWidths::
|
||||
.include "graphics/fonts/font2_latin_widths.inc"
|
||||
gFontShortLatinGlyphWidths::
|
||||
.include "graphics/fonts/short/latin_widths.inc"
|
||||
|
||||
.align 2
|
||||
gFont1LatinGlyphs::
|
||||
.incbin "graphics/fonts/font1.latfont"
|
||||
gFontNormalLatinGlyphs::
|
||||
.incbin "graphics/fonts/normal/glyphs.latfont"
|
||||
|
||||
.align 2
|
||||
gFont1LatinGlyphWidths::
|
||||
.include "graphics/fonts/font1_latin_widths.inc"
|
||||
gFontNormalLatinGlyphWidths::
|
||||
.include "graphics/fonts/normal/latin_widths.inc"
|
||||
|
||||
.align 2
|
||||
gFont0JapaneseGlyphs::
|
||||
.incbin "graphics/fonts/font0.hwjpnfont"
|
||||
gFontSmallJapaneseGlyphs::
|
||||
.incbin "graphics/fonts/small/glyphs.hwjpnfont"
|
||||
|
||||
.align 2
|
||||
gFont1JapaneseGlyphs::
|
||||
.incbin "graphics/fonts/font1.hwjpnfont"
|
||||
gFontNormalJapaneseGlyphs::
|
||||
.incbin "graphics/fonts/normal/glyphs.hwjpnfont"
|
||||
|
||||
.align 2
|
||||
gUnusedJapaneseFireRedLeafGreenMaleFontGlyphs::
|
||||
@ -68,9 +68,9 @@ gUnusedJapaneseFireRedLeafGreenFemaleFontGlyphWidths::
|
||||
.include "graphics/fonts/unused_japanese_frlg_female_font_widths.inc"
|
||||
|
||||
.align 2
|
||||
gFont2JapaneseGlyphs::
|
||||
.incbin "graphics/fonts/font2.fwjpnfont"
|
||||
gFontShortJapaneseGlyphs::
|
||||
.incbin "graphics/fonts/short/glyphs.fwjpnfont"
|
||||
|
||||
.align 2
|
||||
gFont2JapaneseGlyphWidths::
|
||||
.include "graphics/fonts/font2_japanese_widths.inc"
|
||||
gFontShortJapaneseGlyphWidths::
|
||||
.include "graphics/fonts/short/japanese_widths.inc"
|
||||
|
@ -248,17 +248,6 @@
|
||||
#define TEXT_DYNAMIC_COLOR_5 0xE // Usually blue-green
|
||||
#define TEXT_DYNAMIC_COLOR_6 0xF // Usually cerulean
|
||||
|
||||
#define FONT_0 0
|
||||
#define FONT_1 1
|
||||
#define FONT_2 2
|
||||
#define FONT_3 3
|
||||
#define FONT_4 4
|
||||
#define FONT_5 5
|
||||
#define FONT_6 6
|
||||
#define FONT_7 7
|
||||
#define FONT_8 8
|
||||
|
||||
|
||||
#define PLACEHOLDER_ID_UNKNOWN 0x0
|
||||
#define PLACEHOLDER_ID_PLAYER 0x1
|
||||
#define PLACEHOLDER_ID_STRING_VAR_1 0x2
|
||||
|
419
gflib/text.c
@ -12,6 +12,26 @@
|
||||
#include "menu.h"
|
||||
#include "dynamic_placeholder_text_util.h"
|
||||
|
||||
static u16 FontFunc_Small(struct TextPrinter *);
|
||||
static u16 FontFunc_Normal(struct TextPrinter *);
|
||||
static u16 FontFunc_Short(struct TextPrinter *);
|
||||
static u16 FontFunc_ShortCopy1(struct TextPrinter *);
|
||||
static u16 FontFunc_ShortCopy2(struct TextPrinter *);
|
||||
static u16 FontFunc_ShortCopy3(struct TextPrinter *);
|
||||
static u16 FontFunc_Narrow(struct TextPrinter *);
|
||||
static u16 FontFunc_SmallNarrow(struct TextPrinter *);
|
||||
static void DecompressGlyph_Small(u16 glyphId, bool32 isJapanese);
|
||||
static void DecompressGlyph_Normal(u16 glyphId, bool32 isJapanese);
|
||||
static void DecompressGlyph_Short(u16 glyphId, bool32 isJapanese);
|
||||
static void DecompressGlyph_Narrow(u16 glyphId, bool32 isJapanese);
|
||||
static void DecompressGlyph_SmallNarrow(u16 glyphId, bool32 isJapanese);
|
||||
static void DecompressGlyph_Bold(u16 glyphId);
|
||||
static u32 GetGlyphWidth_Small(u16 glyphId, bool32 isJapanese);
|
||||
static u32 GetGlyphWidth_Normal(u16 glyphId, bool32 isJapanese);
|
||||
static u32 GetGlyphWidth_Short(u16 glyphId, bool32 isJapanese);
|
||||
static u32 GetGlyphWidth_Narrow(u16 glyphId, bool32 isJapanese);
|
||||
static u32 GetGlyphWidth_SmallNarrow(u16 glyphId, bool32 isJapanese);
|
||||
|
||||
EWRAM_DATA struct TextPrinter gTempTextPrinter = {0};
|
||||
EWRAM_DATA struct TextPrinter gTextPrinters[NUM_TEXT_PRINTERS] = {0};
|
||||
|
||||
@ -49,20 +69,20 @@ const u8 gDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow.4bpp");
|
||||
const u8 gDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_RS.4bpp");
|
||||
const u8 gUnusedFRLGBlankedDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_blanked_down_arrow.4bpp");
|
||||
const u8 gUnusedFRLGDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_down_arrow.4bpp");
|
||||
const u8 gDownArrowYCoords[] = { 0x0, 0x1, 0x2, 0x1 };
|
||||
const u8 gWindowVerticalScrollSpeeds[] = { 0x1, 0x2, 0x4, 0x0 };
|
||||
const u8 gDownArrowYCoords[] = { 0, 1, 2, 1 };
|
||||
const u8 gWindowVerticalScrollSpeeds[] = { 1, 2, 4, 0x0 };
|
||||
|
||||
const struct GlyphWidthFunc gGlyphWidthFuncs[] =
|
||||
static const struct GlyphWidthFunc sGlyphWidthFuncs[] =
|
||||
{
|
||||
{ 0x0, GetGlyphWidthFont0 },
|
||||
{ 0x1, GetGlyphWidthFont1 },
|
||||
{ 0x2, GetGlyphWidthFont2 },
|
||||
{ 0x3, GetGlyphWidthFont2 },
|
||||
{ 0x4, GetGlyphWidthFont2 },
|
||||
{ 0x5, GetGlyphWidthFont2 },
|
||||
{ 0x6, GetGlyphWidthFont6 },
|
||||
{ 0x7, GetGlyphWidthFont7 },
|
||||
{ 0x8, GetGlyphWidthFont8 }
|
||||
{ FONT_SMALL, GetGlyphWidth_Small },
|
||||
{ FONT_NORMAL, GetGlyphWidth_Normal },
|
||||
{ FONT_SHORT, GetGlyphWidth_Short },
|
||||
{ FONT_SHORT_COPY_1, GetGlyphWidth_Short },
|
||||
{ FONT_SHORT_COPY_2, GetGlyphWidth_Short },
|
||||
{ FONT_SHORT_COPY_3, GetGlyphWidth_Short },
|
||||
{ FONT_BRAILLE, GetGlyphWidth_Braille },
|
||||
{ FONT_NARROW, GetGlyphWidth_Narrow },
|
||||
{ FONT_SMALL_NARROW, GetGlyphWidth_SmallNarrow }
|
||||
};
|
||||
|
||||
const struct KeypadIcon gKeypadIcons[] =
|
||||
@ -84,52 +104,142 @@ const struct KeypadIcon gKeypadIcons[] =
|
||||
|
||||
const u8 gKeypadIconTiles[] = INCBIN_U8("graphics/fonts/keypad_icons.4bpp");
|
||||
|
||||
const struct FontInfo gFontInfos[] =
|
||||
static const struct FontInfo sFontInfos[] =
|
||||
{
|
||||
{ Font0Func, 0x5, 0xC, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font1Func, 0x6, 0x10, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font2Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font3Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font4Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font5Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font6Func, 0x8, 0x10, 0x0, 0x8, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font7Func, 0x5, 0x10, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ Font8Func, 0x5, 0x8, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 },
|
||||
{ NULL, 0x8, 0x8, 0x0, 0x0, 0x0, 0x1, 0x2, 0xF }
|
||||
[FONT_SMALL] = {
|
||||
.fontFunction = FontFunc_Small,
|
||||
.maxLetterWidth = 5,
|
||||
.maxLetterHeight = 12,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_NORMAL] = {
|
||||
.fontFunction = FontFunc_Normal,
|
||||
.maxLetterWidth = 6,
|
||||
.maxLetterHeight = 16,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_SHORT] = {
|
||||
.fontFunction = FontFunc_Short,
|
||||
.maxLetterWidth = 6,
|
||||
.maxLetterHeight = 14,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_SHORT_COPY_1] = {
|
||||
.fontFunction = FontFunc_ShortCopy1,
|
||||
.maxLetterWidth = 6,
|
||||
.maxLetterHeight = 14,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_SHORT_COPY_2] = {
|
||||
.fontFunction = FontFunc_ShortCopy2,
|
||||
.maxLetterWidth = 6,
|
||||
.maxLetterHeight = 14,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_SHORT_COPY_3] = {
|
||||
.fontFunction = FontFunc_ShortCopy3,
|
||||
.maxLetterWidth = 6,
|
||||
.maxLetterHeight = 14,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_BRAILLE] = {
|
||||
.fontFunction = FontFunc_Braille,
|
||||
.maxLetterWidth = 8,
|
||||
.maxLetterHeight = 16,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 8,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_NARROW] = {
|
||||
.fontFunction = FontFunc_Narrow,
|
||||
.maxLetterWidth = 5,
|
||||
.maxLetterHeight = 16,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_SMALL_NARROW] = {
|
||||
.fontFunction = FontFunc_SmallNarrow,
|
||||
.maxLetterWidth = 5,
|
||||
.maxLetterHeight = 8,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
},
|
||||
[FONT_BOLD] = {
|
||||
.fontFunction = NULL,
|
||||
.maxLetterWidth = 8,
|
||||
.maxLetterHeight = 8,
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 2,
|
||||
.shadowColor = 15,
|
||||
}
|
||||
};
|
||||
|
||||
const u8 gMenuCursorDimensions[][2] =
|
||||
static const u8 sMenuCursorDimensions[][2] =
|
||||
{
|
||||
{ 0x8, 0xC },
|
||||
{ 0x8, 0xF },
|
||||
{ 0x8, 0xE },
|
||||
{ 0x8, 0xE },
|
||||
{ 0x8, 0xE },
|
||||
{ 0x8, 0xE },
|
||||
{ 0x8, 0x10 },
|
||||
{ 0x8, 0xF },
|
||||
{ 0x8, 0x8 },
|
||||
{ 0x0, 0x0 }
|
||||
[FONT_SMALL] = { 8, 12 },
|
||||
[FONT_NORMAL] = { 8, 15 },
|
||||
[FONT_SHORT] = { 8, 14 },
|
||||
[FONT_SHORT_COPY_1] = { 8, 14 },
|
||||
[FONT_SHORT_COPY_2] = { 8, 14 },
|
||||
[FONT_SHORT_COPY_3] = { 8, 14 },
|
||||
[FONT_BRAILLE] = { 8, 16 },
|
||||
[FONT_NARROW] = { 8, 15 },
|
||||
[FONT_SMALL_NARROW] = { 8, 8 },
|
||||
[FONT_BOLD] = {}
|
||||
};
|
||||
|
||||
const u16 gFont9JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font9.hwjpnfont");
|
||||
const u16 gFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold_glyphs.hwjpnfont");
|
||||
|
||||
extern const u16 gFont8LatinGlyphs[];
|
||||
extern const u8 gFont8LatinGlyphWidths[];
|
||||
extern const u16 gFont0LatinGlyphs[];
|
||||
extern const u8 gFont0LatinGlyphWidths[];
|
||||
extern const u16 gFont7LatinGlyphs[];
|
||||
extern const u8 gFont7LatinGlyphWidths[];
|
||||
extern const u16 gFont2LatinGlyphs[];
|
||||
extern const u8 gFont2LatinGlyphWidths[];
|
||||
extern const u16 gFont1LatinGlyphs[];
|
||||
extern const u8 gFont1LatinGlyphWidths[];
|
||||
extern const u16 gFont0JapaneseGlyphs[];
|
||||
extern const u16 gFont1JapaneseGlyphs[];
|
||||
extern const u16 gFont2JapaneseGlyphs[];
|
||||
extern const u8 gFont2JapaneseGlyphWidths[];
|
||||
extern const u16 gFontNormalLatinGlyphs[];
|
||||
extern const u8 gFontNormalLatinGlyphWidths[];
|
||||
extern const u16 gFontNormalJapaneseGlyphs[];
|
||||
extern const u16 gFontSmallLatinGlyphs[];
|
||||
extern const u8 gFontSmallLatinGlyphWidths[];
|
||||
extern const u16 gFontSmallJapaneseGlyphs[];
|
||||
extern const u16 gFontShortLatinGlyphs[];
|
||||
extern const u8 gFontShortLatinGlyphWidths[];
|
||||
extern const u16 gFontShortJapaneseGlyphs[];
|
||||
extern const u8 gFontShortJapaneseGlyphWidths[];
|
||||
extern const u16 gFontNarrowLatinGlyphs[];
|
||||
extern const u8 gFontNarrowLatinGlyphWidths[];
|
||||
extern const u16 gFontSmallNarrowLatinGlyphs[];
|
||||
extern const u8 gFontSmallNarrowLatinGlyphWidths[];
|
||||
|
||||
void SetFontsPointer(const struct FontInfo *fonts)
|
||||
static void SetFontsPointer(const struct FontInfo *fonts)
|
||||
{
|
||||
gFonts = fonts;
|
||||
}
|
||||
@ -565,98 +675,98 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
||||
}
|
||||
}
|
||||
|
||||
u16 Font0Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_Small(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 0;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_SMALL;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
|
||||
u16 Font1Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_Normal(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 1;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_NORMAL;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
|
||||
u16 Font2Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_Short(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 2;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_SHORT;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
|
||||
u16 Font3Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_ShortCopy1(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 3;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_SHORT_COPY_1;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
|
||||
u16 Font4Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_ShortCopy2(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 4;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_SHORT_COPY_2;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
|
||||
u16 Font5Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_ShortCopy3(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 5;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_SHORT_COPY_3;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
|
||||
u16 Font7Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_Narrow(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 7;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_NARROW;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
|
||||
u16 Font8Func(struct TextPrinter *textPrinter)
|
||||
static u16 FontFunc_SmallNarrow(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
if (subStruct->hasFontIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 8;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
subStruct->fontId = FONT_SMALL_NARROW;
|
||||
subStruct->hasFontIdBeenSet = TRUE;
|
||||
}
|
||||
return RenderText(textPrinter);
|
||||
}
|
||||
@ -907,7 +1017,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return 2;
|
||||
case EXT_CTRL_CODE_FONT:
|
||||
subStruct->glyphId = *textPrinter->printerTemplate.currentChar;
|
||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return 2;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
@ -1022,27 +1132,27 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (subStruct->glyphId)
|
||||
switch (subStruct->fontId)
|
||||
{
|
||||
case 0:
|
||||
DecompressGlyphFont0(currChar, textPrinter->japanese);
|
||||
case FONT_SMALL:
|
||||
DecompressGlyph_Small(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 1:
|
||||
DecompressGlyphFont1(currChar, textPrinter->japanese);
|
||||
case FONT_NORMAL:
|
||||
DecompressGlyph_Normal(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
DecompressGlyphFont2(currChar, textPrinter->japanese);
|
||||
case FONT_SHORT:
|
||||
case FONT_SHORT_COPY_1:
|
||||
case FONT_SHORT_COPY_2:
|
||||
case FONT_SHORT_COPY_3:
|
||||
DecompressGlyph_Short(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 7:
|
||||
DecompressGlyphFont7(currChar, textPrinter->japanese);
|
||||
case FONT_NARROW:
|
||||
DecompressGlyph_Narrow(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 8:
|
||||
DecompressGlyphFont8(currChar, textPrinter->japanese);
|
||||
case FONT_SMALL_NARROW:
|
||||
DecompressGlyph_SmallNarrow(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 6:
|
||||
case FONT_BRAILLE:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1125,7 +1235,8 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing)
|
||||
// Unused
|
||||
static u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing)
|
||||
{
|
||||
int i;
|
||||
u8 width;
|
||||
@ -1136,10 +1247,8 @@ u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing)
|
||||
u8 lineWidths[8];
|
||||
const u8 *strLocal;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
for (i = 0; i < (int)ARRAY_COUNT(lineWidths); i++)
|
||||
lineWidths[i] = 0;
|
||||
}
|
||||
|
||||
width = 0;
|
||||
line = 0;
|
||||
@ -1216,14 +1325,14 @@ u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing)
|
||||
return (u8)(GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH) + letterSpacing) * width;
|
||||
}
|
||||
|
||||
u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32)
|
||||
static u32 (*GetFontWidthFunc(u8 fontId))(u16, bool32)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
for (i = 0; i < ARRAY_COUNT(sGlyphWidthFuncs); ++i)
|
||||
{
|
||||
if (glyphId == gGlyphWidthFuncs[i].fontId)
|
||||
return gGlyphWidthFuncs[i].func;
|
||||
if (fontId == sGlyphWidthFuncs[i].fontId)
|
||||
return sGlyphWidthFuncs[i].func;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -1233,7 +1342,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
{
|
||||
bool8 isJapanese;
|
||||
int minGlyphWidth;
|
||||
u32 (*func)(u16 glyphId, bool32 isJapanese);
|
||||
u32 (*func)(u16 fontId, bool32 isJapanese);
|
||||
int localLetterSpacing;
|
||||
u32 lineWidth;
|
||||
const u8 *bufferPointer;
|
||||
@ -1490,12 +1599,12 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
|
||||
default:
|
||||
switch (fontId)
|
||||
{
|
||||
case 9:
|
||||
DecompressGlyphFont9(temp);
|
||||
case FONT_BOLD:
|
||||
DecompressGlyph_Bold(temp);
|
||||
break;
|
||||
case 1:
|
||||
case FONT_NORMAL:
|
||||
default:
|
||||
DecompressGlyphFont1(temp, 1);
|
||||
DecompressGlyph_Normal(temp, TRUE);
|
||||
break;
|
||||
}
|
||||
CpuCopy32(gCurGlyph.gfxBufferTop, pixels, 0x20);
|
||||
@ -1543,7 +1652,7 @@ u8 GetKeypadIconHeight(u8 keypadIconId)
|
||||
|
||||
void SetDefaultFontsPointer(void)
|
||||
{
|
||||
SetFontsPointer(&gFontInfos[0]);
|
||||
SetFontsPointer(sFontInfos);
|
||||
}
|
||||
|
||||
u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
||||
@ -1552,28 +1661,28 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
||||
switch (attributeId)
|
||||
{
|
||||
case FONTATTR_MAX_LETTER_WIDTH:
|
||||
result = gFontInfos[fontId].maxLetterWidth;
|
||||
result = sFontInfos[fontId].maxLetterWidth;
|
||||
break;
|
||||
case FONTATTR_MAX_LETTER_HEIGHT:
|
||||
result = gFontInfos[fontId].maxLetterHeight;
|
||||
result = sFontInfos[fontId].maxLetterHeight;
|
||||
break;
|
||||
case FONTATTR_LETTER_SPACING:
|
||||
result = gFontInfos[fontId].letterSpacing;
|
||||
result = sFontInfos[fontId].letterSpacing;
|
||||
break;
|
||||
case FONTATTR_LINE_SPACING:
|
||||
result = gFontInfos[fontId].lineSpacing;
|
||||
result = sFontInfos[fontId].lineSpacing;
|
||||
break;
|
||||
case FONTATTR_UNKNOWN:
|
||||
result = gFontInfos[fontId].unk;
|
||||
result = sFontInfos[fontId].unk;
|
||||
break;
|
||||
case FONTATTR_COLOR_FOREGROUND:
|
||||
result = gFontInfos[fontId].fgColor;
|
||||
result = sFontInfos[fontId].fgColor;
|
||||
break;
|
||||
case FONTATTR_COLOR_BACKGROUND:
|
||||
result = gFontInfos[fontId].bgColor;
|
||||
result = sFontInfos[fontId].bgColor;
|
||||
break;
|
||||
case FONTATTR_COLOR_SHADOW:
|
||||
result = gFontInfos[fontId].shadowColor;
|
||||
result = sFontInfos[fontId].shadowColor;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
@ -1581,16 +1690,16 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
||||
|
||||
u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension)
|
||||
{
|
||||
return gMenuCursorDimensions[fontId][whichDimension];
|
||||
return sMenuCursorDimensions[fontId][whichDimension];
|
||||
}
|
||||
|
||||
void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
|
||||
static void DecompressGlyph_Small(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
|
||||
if (isJapanese == 1)
|
||||
{
|
||||
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
glyphs = gFontSmallJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
@ -1598,8 +1707,8 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont0LatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFont0LatinGlyphWidths[glyphId];
|
||||
glyphs = gFontSmallLatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFontSmallLatinGlyphWidths[glyphId];
|
||||
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
@ -1618,21 +1727,21 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese)
|
||||
static u32 GetGlyphWidth_Small(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
if (isJapanese == TRUE)
|
||||
return 8;
|
||||
else
|
||||
return gFont0LatinGlyphWidths[glyphId];
|
||||
return gFontSmallLatinGlyphWidths[glyphId];
|
||||
}
|
||||
|
||||
void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
|
||||
static void DecompressGlyph_Narrow(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10));
|
||||
glyphs = gFontNormalJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10));
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
@ -1640,8 +1749,8 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont7LatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFont7LatinGlyphWidths[glyphId];
|
||||
glyphs = gFontNarrowLatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFontNarrowLatinGlyphWidths[glyphId];
|
||||
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
@ -1660,21 +1769,21 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetGlyphWidthFont7(u16 glyphId, bool32 isJapanese)
|
||||
static u32 GetGlyphWidth_Narrow(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
if (isJapanese == TRUE)
|
||||
return 8;
|
||||
else
|
||||
return gFont7LatinGlyphWidths[glyphId];
|
||||
return gFontNarrowLatinGlyphWidths[glyphId];
|
||||
}
|
||||
|
||||
void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
|
||||
static void DecompressGlyph_SmallNarrow(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
glyphs = gFontSmallJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
@ -1682,8 +1791,8 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont8LatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFont8LatinGlyphWidths[glyphId];
|
||||
glyphs = gFontSmallNarrowLatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFontSmallNarrowLatinGlyphWidths[glyphId];
|
||||
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
@ -1702,32 +1811,32 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetGlyphWidthFont8(u16 glyphId, bool32 isJapanese)
|
||||
static u32 GetGlyphWidth_SmallNarrow(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
if (isJapanese == TRUE)
|
||||
return 8;
|
||||
else
|
||||
return gFont8LatinGlyphWidths[glyphId];
|
||||
return gFontSmallNarrowLatinGlyphWidths[glyphId];
|
||||
}
|
||||
|
||||
void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
|
||||
static void DecompressGlyph_Short(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
|
||||
glyphs = gFontShortJapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); // gCurGlyph + 0x20
|
||||
DecompressGlyphTile(glyphs + 0x88, gCurGlyph.gfxBufferBottom + 8); // gCurGlyph + 0x60
|
||||
gCurGlyph.width = gFont2JapaneseGlyphWidths[glyphId];
|
||||
gCurGlyph.width = gFontShortJapaneseGlyphWidths[glyphId];
|
||||
gCurGlyph.height = 14;
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont2LatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFont2LatinGlyphWidths[glyphId];
|
||||
glyphs = gFontShortLatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFontShortLatinGlyphWidths[glyphId];
|
||||
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
@ -1746,21 +1855,21 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese)
|
||||
static u32 GetGlyphWidth_Short(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
if (isJapanese == TRUE)
|
||||
return gFont2JapaneseGlyphWidths[glyphId];
|
||||
return gFontShortJapaneseGlyphWidths[glyphId];
|
||||
else
|
||||
return gFont2LatinGlyphWidths[glyphId];
|
||||
return gFontShortLatinGlyphWidths[glyphId];
|
||||
}
|
||||
|
||||
void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
|
||||
static void DecompressGlyph_Normal(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10));
|
||||
glyphs = gFontNormalJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10));
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
@ -1768,8 +1877,8 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont1LatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFont1LatinGlyphWidths[glyphId];
|
||||
glyphs = gFontNormalLatinGlyphs + (0x20 * glyphId);
|
||||
gCurGlyph.width = gFontNormalLatinGlyphWidths[glyphId];
|
||||
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
@ -1788,19 +1897,19 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese)
|
||||
static u32 GetGlyphWidth_Normal(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
if (isJapanese == TRUE)
|
||||
return 8;
|
||||
else
|
||||
return gFont1LatinGlyphWidths[glyphId];
|
||||
return gFontNormalLatinGlyphWidths[glyphId];
|
||||
}
|
||||
|
||||
void DecompressGlyphFont9(u16 glyphId)
|
||||
static void DecompressGlyph_Bold(u16 glyphId)
|
||||
{
|
||||
const u16* glyphs;
|
||||
|
||||
glyphs = gFont9JapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF));
|
||||
glyphs = gFontBoldJapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
|
49
gflib/text.h
@ -7,8 +7,20 @@
|
||||
|
||||
#define TEXT_SPEED_FF 0xFF
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
FONT_SMALL,
|
||||
FONT_NORMAL,
|
||||
FONT_SHORT,
|
||||
FONT_SHORT_COPY_1,
|
||||
FONT_SHORT_COPY_2,
|
||||
FONT_SHORT_COPY_3,
|
||||
FONT_BRAILLE,
|
||||
FONT_NARROW,
|
||||
FONT_SMALL_NARROW, // Very similar to FONT_SMALL, some glyphs are narrower
|
||||
FONT_BOLD, // JP glyph set only
|
||||
};
|
||||
|
||||
enum {
|
||||
FONTATTR_MAX_LETTER_WIDTH,
|
||||
FONTATTR_MAX_LETTER_HEIGHT,
|
||||
FONTATTR_LETTER_SPACING,
|
||||
@ -21,12 +33,12 @@ enum
|
||||
|
||||
struct TextPrinterSubStruct
|
||||
{
|
||||
u8 glyphId:4; // 0x14
|
||||
u8 fontId:4; // 0x14
|
||||
bool8 hasPrintBeenSpedUp:1;
|
||||
u8 unk:3;
|
||||
u8 downArrowDelay:5;
|
||||
u8 downArrowYPosIdx:2;
|
||||
bool8 hasGlyphIdBeenSet:1;
|
||||
bool8 hasFontIdBeenSet:1;
|
||||
u8 autoScrollDelay;
|
||||
};
|
||||
|
||||
@ -111,7 +123,6 @@ extern TextFlags gTextFlags;
|
||||
extern u8 gDisableTextPrinters;
|
||||
extern struct TextGlyph gCurGlyph;
|
||||
|
||||
void SetFontsPointer(const struct FontInfo *fonts);
|
||||
void DeactivateAllTextPrinters(void);
|
||||
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16));
|
||||
bool16 AddTextPrinter(struct TextPrinterTemplate *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16));
|
||||
@ -127,15 +138,6 @@ void CopyGlyphToWindow(struct TextPrinter *x);
|
||||
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width);
|
||||
u8 GetMenuCursorDimensionByFont(u8, u8);
|
||||
|
||||
u16 Font0Func(struct TextPrinter *textPrinter);
|
||||
u16 Font1Func(struct TextPrinter *textPrinter);
|
||||
u16 Font2Func(struct TextPrinter *textPrinter);
|
||||
u16 Font3Func(struct TextPrinter *textPrinter);
|
||||
u16 Font4Func(struct TextPrinter *textPrinter);
|
||||
u16 Font5Func(struct TextPrinter *textPrinter);
|
||||
u16 Font7Func(struct TextPrinter *textPrinter);
|
||||
u16 Font8Func(struct TextPrinter *textPrinter);
|
||||
|
||||
void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter);
|
||||
void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter);
|
||||
void TextPrinterClearDownArrow(struct TextPrinter *textPrinter);
|
||||
@ -144,8 +146,6 @@ bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter);
|
||||
bool16 TextPrinterWait(struct TextPrinter *textPrinter);
|
||||
void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex);
|
||||
u16 RenderText(struct TextPrinter *textPrinter);
|
||||
u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing);
|
||||
u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32);
|
||||
s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
|
||||
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str);
|
||||
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
|
||||
@ -155,20 +155,9 @@ u8 GetKeypadIconHeight(u8 keypadIconId);
|
||||
void SetDefaultFontsPointer(void);
|
||||
u8 GetFontAttribute(u8 fontId, u8 attributeId);
|
||||
u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension);
|
||||
void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese);
|
||||
u32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese);
|
||||
void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese);
|
||||
u32 GetGlyphWidthFont7(u16 glyphId, bool32 isJapanese);
|
||||
void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese);
|
||||
u32 GetGlyphWidthFont8(u16 glyphId, bool32 isJapanese);
|
||||
void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese);
|
||||
u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese);
|
||||
void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese);
|
||||
u32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese);
|
||||
void DecompressGlyphFont9(u16 glyphId);
|
||||
|
||||
// unk_text_util_2.c
|
||||
u16 Font6Func(struct TextPrinter *textPrinter);
|
||||
u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese);
|
||||
// braille.c
|
||||
u16 FontFunc_Braille(struct TextPrinter *textPrinter);
|
||||
u32 GetGlyphWidth_Braille(u16 glyphId, bool32 isJapanese);
|
||||
|
||||
#endif // GUARD_TEXT_H
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
@ -289,34 +289,34 @@ $(TILESETGFXDIR)/secondary/mystery_events_house/tiles.4bpp: %.4bpp: %.png
|
||||
|
||||
### Fonts ###
|
||||
|
||||
$(FONTGFXDIR)/font0.latfont: $(FONTGFXDIR)/font0_latin.png
|
||||
$(FONTGFXDIR)/small/glyphs.latfont: $(FONTGFXDIR)/small/latin.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font1.latfont: $(FONTGFXDIR)/font1_latin.png
|
||||
$(FONTGFXDIR)/normal/glyphs.latfont: $(FONTGFXDIR)/normal/latin.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font2.latfont: $(FONTGFXDIR)/font2_latin.png
|
||||
$(FONTGFXDIR)/short/glyphs.latfont: $(FONTGFXDIR)/short/latin.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font7.latfont: $(FONTGFXDIR)/font7_latin.png
|
||||
$(FONTGFXDIR)/narrow/glyphs.latfont: $(FONTGFXDIR)/narrow/latin.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font8.latfont: $(FONTGFXDIR)/font8_latin.png
|
||||
$(FONTGFXDIR)/small_narrow/glyphs.latfont: $(FONTGFXDIR)/small_narrow/latin.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font0.hwjpnfont: $(FONTGFXDIR)/font0_japanese.png
|
||||
$(FONTGFXDIR)/small/glyphs.hwjpnfont: $(FONTGFXDIR)/small/japanese.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font1.hwjpnfont: $(FONTGFXDIR)/font1_japanese.png
|
||||
$(FONTGFXDIR)/normal/glyphs.hwjpnfont: $(FONTGFXDIR)/normal/japanese.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font9.hwjpnfont: $(FONTGFXDIR)/font9_japanese.png
|
||||
$(FONTGFXDIR)/bold_glyphs.hwjpnfont: $(FONTGFXDIR)/bold_japanese.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font2.fwjpnfont: $(FONTGFXDIR)/font2_japanese.png
|
||||
$(FONTGFXDIR)/short/glyphs.fwjpnfont: $(FONTGFXDIR)/short/japanese.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/font6.fwjpnfont: $(FONTGFXDIR)/font6_braille.png
|
||||
$(FONTGFXDIR)/braille_glyphs.fwjpnfont: $(FONTGFXDIR)/braille.png
|
||||
$(GFX) $< $@
|
||||
|
||||
$(FONTGFXDIR)/unused_frlg_male.fwjpnfont: $(FONTGFXDIR)/unused_japanese_frlg_male_font.png
|
||||
|
@ -299,7 +299,7 @@ SECTIONS {
|
||||
src/item_icon.o(.text);
|
||||
src/party_menu.o(.text);
|
||||
src/battle_tent.o(.text);
|
||||
src/unk_text_util_2.o(.text);
|
||||
src/braille.o(.text);
|
||||
src/multiboot.o(.text);
|
||||
src/berry_fix_graphics.o(.text);
|
||||
src/battle_controller_player_partner.o(.text);
|
||||
@ -654,7 +654,7 @@ SECTIONS {
|
||||
src/item_icon.o(.rodata);
|
||||
src/party_menu.o(.rodata);
|
||||
src/battle_tent.o(.rodata);
|
||||
src/unk_text_util_2.o(.rodata);
|
||||
src/braille.o(.rodata);
|
||||
src/multiboot.o(.rodata);
|
||||
src/berry_fix_graphics.o(.rodata);
|
||||
src/battle_controller_player_partner.o(.rodata);
|
||||
|
@ -632,7 +632,7 @@ static void CreateApprenticeMenu(u8 menu)
|
||||
pixelWidth = 0;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
s32 width = GetStringWidth(1, strings[i], 0);
|
||||
s32 width = GetStringWidth(FONT_NORMAL, strings[i], 0);
|
||||
if (width > pixelWidth)
|
||||
pixelWidth = width;
|
||||
}
|
||||
@ -643,7 +643,7 @@ static void CreateApprenticeMenu(u8 menu)
|
||||
SetStandardWindowBorderStyle(windowId, 0);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
AddTextPrinterParameterized(windowId, 1, strings[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, 0);
|
||||
CreateChooseAnswerTask(TRUE, count, windowId);
|
||||
|
@ -4312,7 +4312,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
||||
}
|
||||
|
||||
// Initialize the text printer
|
||||
textPrinter.fontId = 2;
|
||||
textPrinter.fontId = FONT_SHORT;
|
||||
textPrinter.x = 0;
|
||||
textPrinter.y = 0;
|
||||
textPrinter.currentX = textPrinter.x;
|
||||
@ -4393,7 +4393,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
||||
else
|
||||
textPrinter.currentChar = sBattleDomePotentialTexts[trainerTourneyId];
|
||||
|
||||
textPrinter.fontId = 1;
|
||||
textPrinter.fontId = FONT_NORMAL;
|
||||
textPrinter.windowId = windowId + 4;
|
||||
textPrinter.currentX = 0;
|
||||
textPrinter.y = 4;
|
||||
@ -4859,7 +4859,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo)
|
||||
StringExpandPlaceholders(gStringVar4, sBattleDomeWinTexts[winStringId]);
|
||||
textPrinter.currentChar = gStringVar4;
|
||||
textPrinter.windowId = windowId + 8;
|
||||
textPrinter.fontId = 1;
|
||||
textPrinter.fontId = FONT_NORMAL;
|
||||
PutWindowTilemap(windowId + 8);
|
||||
CopyWindowToVram(windowId + 8, 3);
|
||||
textPrinter.currentX = 0;
|
||||
@ -4874,7 +4874,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo)
|
||||
else
|
||||
CopyDomeTrainerName(gStringVar1, trainerIds[0]);
|
||||
|
||||
textPrinter.fontId = 2;
|
||||
textPrinter.fontId = FONT_SHORT;
|
||||
textPrinter.letterSpacing = 2;
|
||||
textPrinter.currentChar = gStringVar1;
|
||||
textPrinter.windowId = windowId + 6;
|
||||
@ -5339,7 +5339,7 @@ static void Task_ShowTourneyTree(u8 taskId)
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 4:
|
||||
textPrinter.fontId = 2;
|
||||
textPrinter.fontId = FONT_SHORT;
|
||||
textPrinter.currentChar = gText_BattleTourney;
|
||||
textPrinter.windowId = 2;
|
||||
textPrinter.x = 0;
|
||||
@ -5524,7 +5524,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].tState = STATE_DELAY;
|
||||
gTasks[taskId].data[3] = 64;
|
||||
textPrinter.fontId = 2;
|
||||
textPrinter.fontId = FONT_SHORT;
|
||||
textPrinter.x = 0;
|
||||
textPrinter.y = 0;
|
||||
textPrinter.letterSpacing = 2;
|
||||
|
@ -1861,7 +1861,7 @@ static void Select_ErasePopupMenu(u8 windowId)
|
||||
static void Select_PrintRentalPkmnString(void)
|
||||
{
|
||||
FillWindowPixelBuffer(SELECT_WIN_TITLE, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized(SELECT_WIN_TITLE, 1, gText_RentalPkmn2, 2, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(SELECT_WIN_TITLE, FONT_NORMAL, gText_RentalPkmn2, 2, 1, 0, NULL);
|
||||
CopyWindowToVram(SELECT_WIN_TITLE, 3);
|
||||
}
|
||||
|
||||
@ -1874,8 +1874,8 @@ static void Select_PrintMonSpecies(void)
|
||||
FillWindowPixelBuffer(SELECT_WIN_SPECIES, PIXEL_FILL(0));
|
||||
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
|
||||
StringCopy(gStringVar4, gSpeciesNames[species]);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_SPECIES, 1, x, 1, sSpeciesNameTextColors, 0, gStringVar4);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_SPECIES, FONT_NORMAL, x, 1, sSpeciesNameTextColors, 0, gStringVar4);
|
||||
CopyWindowToVram(SELECT_WIN_SPECIES, 2);
|
||||
}
|
||||
|
||||
@ -1893,14 +1893,14 @@ static void Select_PrintSelectMonString(void)
|
||||
else
|
||||
str = gText_TheseThreePkmnOkay;
|
||||
|
||||
AddTextPrinterParameterized(SELECT_WIN_INFO, 1, str, 2, 5, 0, NULL);
|
||||
AddTextPrinterParameterized(SELECT_WIN_INFO, FONT_NORMAL, str, 2, 5, 0, NULL);
|
||||
CopyWindowToVram(SELECT_WIN_INFO, 2);
|
||||
}
|
||||
|
||||
static void Select_PrintCantSelectSameMon(void)
|
||||
{
|
||||
FillWindowPixelBuffer(SELECT_WIN_INFO, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized(SELECT_WIN_INFO, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL);
|
||||
AddTextPrinterParameterized(SELECT_WIN_INFO, FONT_NORMAL, gText_CantSelectSamePkmn, 2, 5, 0, NULL);
|
||||
CopyWindowToVram(SELECT_WIN_INFO, 2);
|
||||
}
|
||||
|
||||
@ -1910,13 +1910,13 @@ static void Select_PrintMenuOptions(void)
|
||||
|
||||
PutWindowTilemap(SELECT_WIN_OPTIONS);
|
||||
FillWindowPixelBuffer(SELECT_WIN_OPTIONS, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 1, sMenuOptionTextColors, 0, gText_Summary);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 1, sMenuOptionTextColors, 0, gText_Summary);
|
||||
if (selectedId != 0)
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 17, sMenuOptionTextColors, 0, gText_Deselect);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_Deselect);
|
||||
else
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 17, sMenuOptionTextColors, 0, gText_Rent);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_Rent);
|
||||
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 33, sMenuOptionTextColors, 0, gText_Others2);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 33, sMenuOptionTextColors, 0, gText_Others2);
|
||||
CopyWindowToVram(SELECT_WIN_OPTIONS, 3);
|
||||
}
|
||||
|
||||
@ -1924,8 +1924,8 @@ static void Select_PrintYesNoOptions(void)
|
||||
{
|
||||
PutWindowTilemap(SELECT_WIN_YES_NO);
|
||||
FillWindowPixelBuffer(SELECT_WIN_YES_NO, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(SELECT_WIN_YES_NO, 1, 7, 1, sMenuOptionTextColors, 0, gText_Yes2);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_YES_NO, 1, 7, 17, sMenuOptionTextColors, 0, gText_No2);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_YES_NO, FONT_NORMAL, 7, 1, sMenuOptionTextColors, 0, gText_Yes2);
|
||||
AddTextPrinterParameterized3(SELECT_WIN_YES_NO, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_No2);
|
||||
CopyWindowToVram(SELECT_WIN_YES_NO, 3);
|
||||
}
|
||||
|
||||
@ -1994,8 +1994,8 @@ static void Select_PrintMonCategory(void)
|
||||
FillWindowPixelBuffer(SELECT_WIN_MON_CATEGORY, PIXEL_FILL(0));
|
||||
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
|
||||
CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text);
|
||||
x = GetStringRightAlignXOffset(1, text, 0x76);
|
||||
AddTextPrinterParameterized(SELECT_WIN_MON_CATEGORY, 1, text, x, 1, 0, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x76);
|
||||
AddTextPrinterParameterized(SELECT_WIN_MON_CATEGORY, FONT_NORMAL, text, x, 1, 0, NULL);
|
||||
CopyWindowToVram(SELECT_WIN_MON_CATEGORY, 2);
|
||||
}
|
||||
}
|
||||
@ -3753,7 +3753,7 @@ static void Swap_EraseActionFadeWindow(void)
|
||||
static void Swap_PrintPkmnSwap(void)
|
||||
{
|
||||
FillWindowPixelBuffer(SWAP_WIN_TITLE, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(SWAP_WIN_TITLE, 1, gText_PkmnSwap, 2, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(SWAP_WIN_TITLE, FONT_NORMAL, gText_PkmnSwap, 2, 1, 0, NULL);
|
||||
CopyWindowToVram(SWAP_WIN_TITLE, 3);
|
||||
}
|
||||
|
||||
@ -3775,8 +3775,8 @@ static void Swap_PrintMonSpecies(void)
|
||||
else
|
||||
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
|
||||
StringCopy(gStringVar4, gSpeciesNames[species]);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_SPECIES, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
|
||||
CopyWindowToVram(SWAP_WIN_SPECIES, 3);
|
||||
}
|
||||
}
|
||||
@ -3784,7 +3784,7 @@ static void Swap_PrintMonSpecies(void)
|
||||
static void Swap_PrintOnInfoWindow(const u8 *str)
|
||||
{
|
||||
FillWindowPixelBuffer(SWAP_WIN_INFO, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized(SWAP_WIN_INFO, 1, str, 2, 5, 0, NULL);
|
||||
AddTextPrinterParameterized(SWAP_WIN_INFO, FONT_NORMAL, str, 2, 5, 0, NULL);
|
||||
CopyWindowToVram(SWAP_WIN_INFO, 2);
|
||||
}
|
||||
|
||||
@ -3792,9 +3792,9 @@ static void Swap_PrintMenuOptions(void)
|
||||
{
|
||||
PutWindowTilemap(SWAP_WIN_OPTIONS);
|
||||
FillWindowPixelBuffer(SWAP_WIN_OPTIONS, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, 1, 15, 1, sSwapMenuOptionsTextColors, 0, gText_Summary2);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, 1, 15, 17, sSwapMenuOptionsTextColors, 0, gText_Swap);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, 1, 15, 33, sSwapMenuOptionsTextColors, 0, gText_Rechoose);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 1, sSwapMenuOptionsTextColors, 0, gText_Summary2);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 17, sSwapMenuOptionsTextColors, 0, gText_Swap);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 33, sSwapMenuOptionsTextColors, 0, gText_Rechoose);
|
||||
CopyWindowToVram(SWAP_WIN_OPTIONS, 3);
|
||||
}
|
||||
|
||||
@ -3802,15 +3802,15 @@ static void Swap_PrintYesNoOptions(void)
|
||||
{
|
||||
PutWindowTilemap(SWAP_WIN_YES_NO);
|
||||
FillWindowPixelBuffer(SWAP_WIN_YES_NO, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(SWAP_WIN_YES_NO, 1, 7, 1, sSwapMenuOptionsTextColors, 0, gText_Yes3);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_YES_NO, 1, 7, 17, sSwapMenuOptionsTextColors, 0, gText_No3);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_YES_NO, FONT_NORMAL, 7, 1, sSwapMenuOptionsTextColors, 0, gText_Yes3);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_YES_NO, FONT_NORMAL, 7, 17, sSwapMenuOptionsTextColors, 0, gText_No3);
|
||||
CopyWindowToVram(SWAP_WIN_YES_NO, 3);
|
||||
}
|
||||
|
||||
static void Swap_PrintActionString(const u8 *str, u32 y, u32 windowId)
|
||||
{
|
||||
s32 x = GetStringRightAlignXOffset(0, str, 0x46);
|
||||
AddTextPrinterParameterized3(windowId, 0, x, y, sSwapMenuOptionsTextColors, 0, str);
|
||||
s32 x = GetStringRightAlignXOffset(FONT_SMALL, str, 0x46);
|
||||
AddTextPrinterParameterized3(windowId, FONT_SMALL, x, y, sSwapMenuOptionsTextColors, 0, str);
|
||||
}
|
||||
|
||||
static void Swap_PrintActionStrings(void)
|
||||
@ -3884,8 +3884,8 @@ static void Swap_PrintMonSpeciesAtFade(void)
|
||||
else
|
||||
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
|
||||
StringCopy(gStringVar4, gSpeciesNames[species]);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_SPECIES_AT_FADE, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_SPECIES_AT_FADE, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
|
||||
CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, 3);
|
||||
}
|
||||
}
|
||||
@ -3911,8 +3911,8 @@ static void Swap_PrintMonSpeciesForTransition(void)
|
||||
else
|
||||
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
|
||||
StringCopy(gStringVar4, gSpeciesNames[species]);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_SPECIES, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
|
||||
AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
|
||||
CopyWindowToVram(SWAP_WIN_SPECIES, 3);
|
||||
}
|
||||
}
|
||||
@ -3937,8 +3937,8 @@ static void Swap_PrintMonCategory(void)
|
||||
else
|
||||
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
|
||||
CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text);
|
||||
x = GetStringRightAlignXOffset(1, text, 0x76);
|
||||
AddTextPrinterParameterized(SWAP_WIN_MON_CATEGORY, 1, text, x, 1, 0, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x76);
|
||||
AddTextPrinterParameterized(SWAP_WIN_MON_CATEGORY, FONT_NORMAL, text, x, 1, 0, NULL);
|
||||
CopyWindowToVram(SWAP_WIN_MON_CATEGORY, 2);
|
||||
}
|
||||
}
|
||||
|
@ -718,21 +718,8 @@ static const struct SpriteTemplate sStatusSummaryBallsSpriteTemplates[2] =
|
||||
}
|
||||
};
|
||||
|
||||
// possibly text
|
||||
static const u8 sUnknown_0832C3C4[] =
|
||||
{
|
||||
0xfc, 0x01, 0x01, 0xfc, 0x02, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
// possibly text
|
||||
static const u8 sUnknown_0832C3D8[] =
|
||||
{
|
||||
0xfc, 0x01, 0x01, 0xfc, 0x02, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static const u8 sEmptyWhiteText_GrayHighlight[] = __("{COLOR WHITE}{HIGHLIGHT DARK_GRAY} ");
|
||||
static const u8 sEmptyWhiteText_TransparentHighlight[] = __("{COLOR WHITE}{HIGHLIGHT TRANSPARENT} ");
|
||||
|
||||
enum
|
||||
{
|
||||
@ -1166,7 +1153,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
{
|
||||
u8 battler;
|
||||
|
||||
memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4));
|
||||
memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight));
|
||||
battler = gSprites[healthboxSpriteId].hMain_Battler;
|
||||
if (IsDoubleBattle() == TRUE || GetBattlerSide(battler) == B_SIDE_OPPONENT)
|
||||
{
|
||||
@ -1193,7 +1180,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
}
|
||||
|
||||
ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text);
|
||||
RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text);
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
@ -1245,7 +1232,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
{
|
||||
u8 battlerId;
|
||||
|
||||
memcpy(text, sUnknown_0832C3D8, sizeof(sUnknown_0832C3D8));
|
||||
memcpy(text, sEmptyWhiteText_TransparentHighlight, sizeof(sEmptyWhiteText_TransparentHighlight));
|
||||
battlerId = gSprites[healthboxSpriteId].hMain_Battler;
|
||||
|
||||
if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) // don't print text if only bars are visible
|
||||
@ -1262,7 +1249,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
if (!maxOrCurrent)
|
||||
StringCopy(txtPtr, gText_Slash);
|
||||
RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text);
|
||||
RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text);
|
||||
|
||||
for (i = var; i < var + 3; i++)
|
||||
{
|
||||
@ -1308,12 +1295,12 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
u8 *barFontGfx;
|
||||
u8 i, var, nature, healthBarSpriteId;
|
||||
|
||||
memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4));
|
||||
memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight));
|
||||
barFontGfx = &gMonSpritesGfxPtr->barFontGfx[0x520 + (GetBattlerPosition(gSprites[healthboxSpriteId].hMain_Battler) * 384)];
|
||||
var = 5;
|
||||
nature = GetNature(mon);
|
||||
StringCopy(text + 6, gNatureNamePointers[nature]);
|
||||
RenderTextFont9(barFontGfx, 9, text);
|
||||
RenderTextFont9(barFontGfx, FONT_BOLD, text);
|
||||
|
||||
for (j = 6, i = 0; i < var; i++, j++)
|
||||
{
|
||||
@ -1345,7 +1332,7 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
ConvertIntToDecimalStringN(text + 9, gBattleStruct->safariEscapeFactor, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
text[5] = CHAR_SPACE;
|
||||
text[8] = CHAR_SLASH;
|
||||
RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text);
|
||||
RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text);
|
||||
|
||||
j = healthBarSpriteId; // Needed to match for some reason.
|
||||
for (j = 0; j < 5; j++)
|
||||
@ -2130,7 +2117,7 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId)
|
||||
txtPtr = StringCopy(text, gText_SafariBallLeft);
|
||||
ConvertIntToDecimalStringN(txtPtr, gNumSafariBalls, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(0, text, 0x2F), 3, 2, &windowId);
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(FONT_SMALL, text, 0x2F), 3, 2, &windowId);
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
|
||||
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
|
||||
@ -2538,7 +2525,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
|
||||
color[1] = 1;
|
||||
color[2] = 3;
|
||||
|
||||
AddTextPrinterParameterized4(winId, 0, x, y, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, -1, str);
|
||||
|
||||
*windowId = winId;
|
||||
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));
|
||||
|
@ -1482,7 +1482,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
{
|
||||
[B_WIN_MSG] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1494,7 +1494,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_ACTION_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1506,7 +1506,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_ACTION_MENU] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1518,7 +1518,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_1] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1530,7 +1530,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_2] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1542,7 +1542,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_3] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1554,7 +1554,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_4] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1566,7 +1566,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_PP] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1578,7 +1578,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_DUMMY] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1590,7 +1590,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_PP_REMAINING] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 2,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1602,7 +1602,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_MOVE_TYPE] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1614,7 +1614,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_SWITCH_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1626,7 +1626,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_YESNO] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1638,7 +1638,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_LEVEL_UP_BOX] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1650,7 +1650,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_LEVEL_UP_BANNER] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 32,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1662,7 +1662,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_PLAYER] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1674,7 +1674,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_OPPONENT] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1686,7 +1686,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_1] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1698,7 +1698,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_2] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1710,7 +1710,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_3] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1722,7 +1722,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_4] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1734,7 +1734,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_OUTCOME_DRAW] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1746,7 +1746,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_OUTCOME_LEFT] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1758,7 +1758,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
},
|
||||
[B_WIN_VS_OUTCOME_RIGHT] = {
|
||||
.fillValue = PIXEL_FILL(0x0),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1774,7 +1774,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
{
|
||||
[B_WIN_MSG] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1786,7 +1786,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_ACTION_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1798,7 +1798,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_ACTION_MENU] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1810,7 +1810,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_1] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1822,7 +1822,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_2] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1834,7 +1834,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_3] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1846,7 +1846,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_MOVE_NAME_4] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1858,7 +1858,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_PP] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1870,7 +1870,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_DUMMY] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1882,7 +1882,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_PP_REMAINING] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 2,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1894,7 +1894,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_MOVE_TYPE] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1906,7 +1906,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_SWITCH_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1918,7 +1918,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_YESNO] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1930,7 +1930,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_LEVEL_UP_BOX] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1942,7 +1942,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[B_WIN_LEVEL_UP_BANNER] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 32,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1954,7 +1954,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_PLAYER_NAME] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1966,7 +1966,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_VS] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1978,7 +1978,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_OPPONENT_NAME] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -1990,7 +1990,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_MIND] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -2002,7 +2002,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_SKILL] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -2014,7 +2014,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_BODY] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -2026,7 +2026,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_JUDGEMENT_TITLE] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = -1,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
@ -2038,7 +2038,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
},
|
||||
[ARENA_WIN_JUDGEMENT_TEXT] = {
|
||||
.fillValue = PIXEL_FILL(0x1),
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.x = 0,
|
||||
.y = 1,
|
||||
.letterSpacing = 0,
|
||||
|
@ -88,8 +88,8 @@ static void CopyBagItemName(u8 *, u16);
|
||||
static void FreeItemIconSpriteByAltId(u8);
|
||||
static void PrintItemDescription(s32);
|
||||
static void PrintSelectorArrowAtPos(u8, u8);
|
||||
static void PrintOnWindow_Font1(u8, const u8 *, u8, u8, u8, u8, u8, u8);
|
||||
static void PrintOnWindow_Font7(u8, const u8 *, u8, u8, u8, u8, u8, u8);
|
||||
static void PyramidBagPrint(u8, const u8 *, u8, u8, u8, u8, u8, u8);
|
||||
static void PyramidBagPrint_Quantity(u8, const u8 *, u8, u8, u8, u8, u8, u8);
|
||||
static u8 OpenMenuActionWindowById(u8);
|
||||
static void CloseMenuActionWindowById(u8);
|
||||
static void PrintMenuActionText_SingleRow(u8);
|
||||
@ -159,7 +159,7 @@ static const struct ListMenuTemplate sListMenuTemplate =
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -672,8 +672,8 @@ static void PrintItemQuantity(u8 windowId, u32 itemIndex, u8 y)
|
||||
STR_CONV_MODE_RIGHT_ALIGN,
|
||||
2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
xAlign = GetStringRightAlignXOffset(7, gStringVar4, 119);
|
||||
PrintOnWindow_Font7(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SPEED_FF, COLORID_DARK_GRAY);
|
||||
xAlign = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
||||
PyramidBagPrint_Quantity(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SPEED_FF, COLORID_DARK_GRAY);
|
||||
}
|
||||
|
||||
static void PrintItemDescription(s32 listMenuId)
|
||||
@ -690,7 +690,7 @@ static void PrintItemDescription(s32 listMenuId)
|
||||
desc = gStringVar4;
|
||||
}
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PrintOnWindow_Font1(WIN_INFO, desc, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
PyramidBagPrint(WIN_INFO, desc, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
}
|
||||
|
||||
static void AddScrollArrows(void)
|
||||
@ -849,9 +849,9 @@ static void PrintSelectorArrow(u8 listMenuTaskId, u8 colorId)
|
||||
static void PrintSelectorArrowAtPos(u8 y, u8 colorId)
|
||||
{
|
||||
if (colorId == COLORID_NONE) // If 'no color', erase arrow
|
||||
FillWindowPixelRect(WIN_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
|
||||
FillWindowPixelRect(WIN_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(FONT_NORMAL, 0), GetMenuCursorDimensionByFont(FONT_NORMAL, 1));
|
||||
else
|
||||
PrintOnWindow_Font1(WIN_LIST, gText_SelectorArrow2, 0, y, 0, 0, 0, colorId);
|
||||
PyramidBagPrint(WIN_LIST, gText_SelectorArrow2, 0, y, 0, 0, 0, colorId);
|
||||
}
|
||||
|
||||
void CloseBattlePyramidBag(u8 taskId)
|
||||
@ -962,7 +962,7 @@ static void OpenContextMenu(u8 taskId)
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
if (gPyramidBagMenu->menuActionsCount == 1)
|
||||
PrintMenuActionText_SingleRow(OpenMenuActionWindowById(MENU_WIN_1x1));
|
||||
else if (gPyramidBagMenu->menuActionsCount == 2)
|
||||
@ -978,13 +978,13 @@ static void OpenContextMenu(u8 taskId)
|
||||
|
||||
static void PrintMenuActionText_SingleRow(u8 windowId)
|
||||
{
|
||||
AddItemMenuActionTextPrinters(windowId, 7, 8, 1, 0, 0x10, gPyramidBagMenu->menuActionsCount, sMenuActions, gPyramidBagMenu->menuActionIds);
|
||||
AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 0x10, gPyramidBagMenu->menuActionsCount, sMenuActions, gPyramidBagMenu->menuActionIds);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, gPyramidBagMenu->menuActionsCount, 0);
|
||||
}
|
||||
|
||||
static void PrintMenuActionText_MultiRow(u8 windowId, u8 horizontalCount, u8 verticalCount)
|
||||
{
|
||||
PrintMenuActionGrid(windowId, 7, 8, 1, 56, horizontalCount, verticalCount, sMenuActions, gPyramidBagMenu->menuActionIds);
|
||||
PrintMenuActionGrid(windowId, FONT_NARROW, 8, 1, 56, horizontalCount, verticalCount, sMenuActions, gPyramidBagMenu->menuActionIds);
|
||||
InitMenuActionGrid(windowId, 56, horizontalCount, verticalCount, 0);
|
||||
}
|
||||
|
||||
@ -1137,7 +1137,7 @@ static void BagAction_Toss(u8 taskId)
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
ShowNumToToss();
|
||||
gTasks[taskId].func = Task_ChooseHowManyToToss;
|
||||
}
|
||||
@ -1151,7 +1151,7 @@ static void AskConfirmToss(u8 taskId)
|
||||
ConvertIntToDecimalStringN(gStringVar2, tNumToToss, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
CreatePyramidBagYesNo(taskId, &sYesNoTossFuncions);
|
||||
}
|
||||
|
||||
@ -1170,8 +1170,8 @@ static void ShowNumToToss(void)
|
||||
ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
DrawTossNumberWindow(WIN_TOSS_NUM);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28);
|
||||
AddTextPrinterParameterized(WIN_TOSS_NUM, 1, gStringVar4, x, 2, 0, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0x28);
|
||||
AddTextPrinterParameterized(WIN_TOSS_NUM, FONT_NORMAL, gStringVar4, x, 2, 0, NULL);
|
||||
}
|
||||
|
||||
static void UpdateNumToToss(s16 num)
|
||||
@ -1179,8 +1179,8 @@ static void UpdateNumToToss(s16 num)
|
||||
s32 x;
|
||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28);
|
||||
AddTextPrinterParameterized(WIN_TOSS_NUM, 1, gStringVar4, x, 2, 0, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0x28);
|
||||
AddTextPrinterParameterized(WIN_TOSS_NUM, FONT_NORMAL, gStringVar4, x, 2, 0, NULL);
|
||||
}
|
||||
|
||||
static void Task_ChooseHowManyToToss(u8 taskId)
|
||||
@ -1219,7 +1219,7 @@ static void TossItem(u8 taskId)
|
||||
ConvertIntToDecimalStringN(gStringVar2, tNumToToss, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
gTasks[taskId].func = Task_TossItem;
|
||||
}
|
||||
|
||||
@ -1316,7 +1316,7 @@ static void Task_BeginItemSwap(u8 taskId)
|
||||
CopyItemName(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][tListPos], gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY);
|
||||
PrintSelectorArrow(tListTaskId, COLORID_LIGHT_GRAY);
|
||||
UpdateSwapLinePos(tListPos);
|
||||
gTasks[taskId].func = Task_ItemSwapHandleInput;
|
||||
@ -1454,14 +1454,14 @@ static void InitPyramidBagWindows(void)
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
static void PrintOnWindow_Font1(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
static void PyramidBagPrint(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
{
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src);
|
||||
}
|
||||
|
||||
static void PrintOnWindow_Font7(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
static void PyramidBagPrint_Quantity(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId)
|
||||
{
|
||||
AddTextPrinterParameterized4(windowId, 7, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src);
|
||||
}
|
||||
|
||||
static void DrawTossNumberWindow(u8 windowId)
|
||||
@ -1509,7 +1509,7 @@ static void CreatePyramidBagYesNo(u8 taskId, const struct YesNoFuncTable *yesNoT
|
||||
void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId))
|
||||
{
|
||||
FillWindowPixelBuffer(WIN_MSG, PIXEL_FILL(1));
|
||||
DisplayMessageAndContinueTask(taskId, WIN_MSG, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback);
|
||||
DisplayMessageAndContinueTask(taskId, WIN_MSG, 0xA, 0xD, FONT_NORMAL, GetPlayerTextSpeedDelay(), str, callback);
|
||||
ScheduleBgCopyTilemapToVram(1);
|
||||
}
|
||||
|
||||
|
@ -282,8 +282,8 @@ static void PrintLinkBattleWinsLossesDraws(struct LinkBattleRecord *records)
|
||||
ConvertIntToDecimalStringN(gStringVar3, GetGameStat(GAME_STAT_LINK_BATTLE_DRAWS), STR_CONV_MODE_LEFT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_TotalRecordWLD);
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 0xD0);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 0x11, 0, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0xD0);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 0x11, 0, NULL);
|
||||
}
|
||||
|
||||
static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 language)
|
||||
@ -291,10 +291,10 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 lan
|
||||
if (record->wins == 0 && record->losses == 0 && record->draws == 0)
|
||||
{
|
||||
// empty slot
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoPlayer, 8, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 80, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 128, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 176, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoPlayer, 8, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoScore, 80, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoScore, 128, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoScore, 176, (y * 8) + 1, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -302,16 +302,16 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 lan
|
||||
StringCopyN(gStringVar1, record->name, 7);
|
||||
ConvertInternationalString(gStringVar1, language);
|
||||
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 8, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 8, (y * 8) + 1, 0, NULL);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, record->wins, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 80, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 80, (y * 8) + 1, 0, NULL);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, record->losses, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 128, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 128, (y * 8) + 1, 0, NULL);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 176, (y * 8) + 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 176, (y * 8) + 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,12 +324,12 @@ void ShowLinkBattleRecords(void)
|
||||
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
||||
StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults);
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 1, 0, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, 0, NULL);
|
||||
PrintLinkBattleWinsLossesDraws(gSaveBlock1Ptr->linkBattleRecords.entries);
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, gText_WinLoseDraw);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, 0, 41, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 41, 0, NULL);
|
||||
|
||||
for (i = 0; i < LINK_B_RECORDS_COUNT; i++)
|
||||
{
|
||||
|
@ -6041,7 +6041,7 @@ static void DrawLevelUpBannerText(void)
|
||||
|
||||
printerTemplate.currentChar = gStringVar4;
|
||||
printerTemplate.windowId = B_WIN_LEVEL_UP_BANNER;
|
||||
printerTemplate.fontId = 0;
|
||||
printerTemplate.fontId = FONT_SMALL;
|
||||
printerTemplate.x = 32;
|
||||
printerTemplate.y = 0;
|
||||
printerTemplate.currentX = 32;
|
||||
|
@ -1909,7 +1909,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
void FrontierSpeechToString(const u16 *words)
|
||||
{
|
||||
ConvertEasyChatWordsToString(gStringVar4, words, 3, 2);
|
||||
if (GetStringWidth(1, gStringVar4, -1) > 204u)
|
||||
if (GetStringWidth(FONT_NORMAL, gStringVar4, -1) > 204u)
|
||||
{
|
||||
s32 i = 0;
|
||||
|
||||
|
@ -1608,7 +1608,7 @@ static void PrintPlayerNames(void)
|
||||
|
||||
text[0] = EOS;
|
||||
StringCopy(text, gLinkPlayers[sBerryBlender->arrowIdToPlayerId[i]].name);
|
||||
xPos = GetStringCenterAlignXOffset(1, text, 0x38);
|
||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0x38);
|
||||
|
||||
if (playerId == sBerryBlender->arrowIdToPlayerId[i])
|
||||
Blender_AddTextPrinter(i, text, xPos, 1, 0, 2); // Highlight player's name in red
|
||||
@ -3494,7 +3494,7 @@ static bool8 PrintBlendingResults(void)
|
||||
u16 minutes, seconds;
|
||||
u8 *txtPtr;
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, sText_BlendingResults, 0xA8);
|
||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_BlendingResults, 0xA8);
|
||||
Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SPEED_FF, 0);
|
||||
|
||||
if (sBerryBlender->numPlayers == BLENDER_MAX_PLAYERS)
|
||||
@ -3526,7 +3526,7 @@ static bool8 PrintBlendingResults(void)
|
||||
StringAppend(sBerryBlender->stringVar, text);
|
||||
StringAppend(sBerryBlender->stringVar, sText_RPM);
|
||||
|
||||
xPos = GetStringRightAlignXOffset(1, sBerryBlender->stringVar, 0xA8);
|
||||
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
|
||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SPEED_FF, 3);
|
||||
Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SPEED_FF, 3);
|
||||
|
||||
@ -3539,7 +3539,7 @@ static bool8 PrintBlendingResults(void)
|
||||
ConvertIntToDecimalStringN(txtPtr, seconds, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringAppend(sBerryBlender->stringVar, sText_Sec);
|
||||
|
||||
xPos = GetStringRightAlignXOffset(1, sBerryBlender->stringVar, 0xA8);
|
||||
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
|
||||
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SPEED_FF, 3);
|
||||
|
||||
sBerryBlender->framesToWait = 0;
|
||||
@ -3693,7 +3693,7 @@ static bool8 PrintBlendingRanking(void)
|
||||
break;
|
||||
case 3:
|
||||
DrawStdFrameWithCustomTileAndPalette(5, 0, 1, 0xD);
|
||||
xPos = GetStringCenterAlignXOffset(1, sText_Ranking, 168);
|
||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168);
|
||||
Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SPEED_FF, 0);
|
||||
|
||||
sBerryBlender->scoreIconIds[SCORE_BEST] = CreateSprite(&sSpriteTemplate_ScoreSymbols, 128, 52, 0);
|
||||
@ -3767,9 +3767,9 @@ void ShowBerryBlenderRecordWindow(void)
|
||||
DrawStdWindowFrame(gRecordsWindowId, 0);
|
||||
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 144);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_234Players, 4, 41, 0, NULL);
|
||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_BlenderMaxSpeedRecord, 144);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_234Players, 4, 41, 0, NULL);
|
||||
|
||||
for (i = 0, yPos = 41; i < NUM_SCORE_TYPES; i++)
|
||||
{
|
||||
@ -3783,8 +3783,8 @@ void ShowBerryBlenderRecordWindow(void)
|
||||
txtPtr = ConvertIntToDecimalStringN(txtPtr, record % 100, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
txtPtr = StringAppend(txtPtr, sText_RPM);
|
||||
|
||||
xPos = GetStringRightAlignXOffset(1, text, 140);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, text, xPos, yPos + (i * 16), 0, NULL);
|
||||
xPos = GetStringRightAlignXOffset(FONT_NORMAL, text, 140);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, xPos, yPos + (i * 16), 0, NULL);
|
||||
}
|
||||
|
||||
PutWindowTilemap(gRecordsWindowId);
|
||||
@ -3879,7 +3879,7 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(txtColor[0]));
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, 1, txtColor, speed, string);
|
||||
}
|
||||
|
||||
static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed)
|
||||
|
@ -1591,8 +1591,8 @@ static void FramesToMinSec(struct BerryCrushGame_Gfx *gfx, u16 frames)
|
||||
|
||||
static void PrintTextCentered(u8 windowId, u8 left, u8 colorId, const u8 *string)
|
||||
{
|
||||
left = (left * 4) - (GetStringWidth(2, string, -1) / 2u);
|
||||
AddTextPrinterParameterized3(windowId, 2, left, 0, sTextColorTable[colorId], 0, string);
|
||||
left = (left * 4) - (GetStringWidth(FONT_SHORT, string, -1) / 2u);
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT, left, 0, sTextColorTable[colorId], 0, string);
|
||||
}
|
||||
|
||||
static void PrintResultsText(struct BerryCrushGame * game, u8 page, u8 sp14, u8 baseY)
|
||||
@ -1652,8 +1652,8 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 page, u8 sp14, u8
|
||||
StringExpandPlaceholders(gStringVar4, sResultsTexts[page]);
|
||||
break;
|
||||
}
|
||||
x = GetStringRightAlignXOffset(2, gStringVar4, sp14 - 4);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
x = GetStringRightAlignXOffset(FONT_SHORT, gStringVar4, sp14 - 4);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
if (playerId == game->localId)
|
||||
StringCopy(gStringVar3, gText_1DotBlueF700);
|
||||
else
|
||||
@ -1661,7 +1661,7 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 page, u8 sp14, u8
|
||||
gStringVar3[0] = ranking + CHAR_1;
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, game->players[playerId].name);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gStringVar3);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 4, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, 4, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1676,34 +1676,34 @@ static void PrintCrushingResults(struct BerryCrushGame *game)
|
||||
FramesToMinSec(&game->gfx, results->time);
|
||||
|
||||
// Print time text
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimeColon);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimeColon);
|
||||
|
||||
// Print seconds text
|
||||
x = 176 - (u8)GetStringWidth(2, gText_SpaceSec, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceSec);
|
||||
x = 176 - (u8)GetStringWidth(FONT_SHORT, gText_SpaceSec, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceSec);
|
||||
|
||||
// Print seconds value
|
||||
ConvertIntToDecimalStringN(gStringVar1, game->gfx.secondsInt, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
ConvertIntToDecimalStringN(gStringVar2, game->gfx.secondsFrac, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_XDotY2);
|
||||
x -= GetStringWidth(2, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
x -= GetStringWidth(FONT_SHORT, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
|
||||
// Print minutes text
|
||||
x -= GetStringWidth(2, gText_SpaceMin, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceMin);
|
||||
x -= GetStringWidth(FONT_SHORT, gText_SpaceMin, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceMin);
|
||||
|
||||
// Print minutes value
|
||||
ConvertIntToDecimalStringN(gStringVar1, game->gfx.minutes, STR_CONV_MODE_LEADING_ZEROS, 1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_StrVar1);
|
||||
x -= GetStringWidth(2, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
x -= GetStringWidth(FONT_SHORT, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
|
||||
// Print pressing speed text
|
||||
y += 14;
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_PressingSpeed);
|
||||
x = 176 - (u8)GetStringWidth(2, gText_TimesPerSec, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_PressingSpeed);
|
||||
x = 176 - (u8)GetStringWidth(FONT_SHORT, gText_TimesPerSec, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec);
|
||||
|
||||
// Print pressing speed value
|
||||
for (i = 0; i < 8; i++)
|
||||
@ -1712,21 +1712,21 @@ static void PrintCrushingResults(struct BerryCrushGame *game)
|
||||
ConvertIntToDecimalStringN(gStringVar1, game->pressingSpeed >> 8, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
ConvertIntToDecimalStringN(gStringVar2, pressingSpeedFrac / 1000000, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_XDotY3);
|
||||
x -= GetStringWidth(2, gStringVar4, -1);
|
||||
x -= GetStringWidth(FONT_SHORT, gStringVar4, -1);
|
||||
if (game->newRecord)
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_RED], 0, gStringVar4);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_RED], 0, gStringVar4);
|
||||
else
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
|
||||
// Print silkiness text
|
||||
y += 14;
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_Silkiness);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_Silkiness);
|
||||
|
||||
// Print silkiness value
|
||||
ConvertIntToDecimalStringN(gStringVar1, results->silkiness, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1Percent);
|
||||
x = 176 - (u8)GetStringWidth(2, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
x = 176 - (u8)GetStringWidth(FONT_SHORT, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
}
|
||||
|
||||
static bool32 OpenResultsWindow(struct BerryCrushGame *game, struct BerryCrushGame_Gfx *gfx)
|
||||
@ -1814,10 +1814,10 @@ static void Task_ShowRankings(u8 taskId)
|
||||
break;
|
||||
case 1:
|
||||
// Print header text
|
||||
xPos = 96 - GetStringWidth(1, gText_BerryCrush2, -1) / 2u;
|
||||
AddTextPrinterParameterized3(tWindowId, 1, xPos, 1, sTextColorTable[COLORID_BLUE], 0, gText_BerryCrush2);
|
||||
xPos = 96 - GetStringWidth(1, gText_PressingSpeedRankings, -1) / 2u;
|
||||
AddTextPrinterParameterized3(tWindowId, 1, xPos, 17, sTextColorTable[COLORID_BLUE], 0, gText_PressingSpeedRankings);
|
||||
xPos = 96 - GetStringWidth(FONT_NORMAL, gText_BerryCrush2, -1) / 2u;
|
||||
AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, 1, sTextColorTable[COLORID_BLUE], 0, gText_BerryCrush2);
|
||||
xPos = 96 - GetStringWidth(FONT_NORMAL, gText_PressingSpeedRankings, -1) / 2u;
|
||||
AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, 17, sTextColorTable[COLORID_BLUE], 0, gText_PressingSpeedRankings);
|
||||
|
||||
// Print pressing speed record for each group size, ranked
|
||||
yPos = 41;
|
||||
@ -1825,9 +1825,9 @@ static void Task_ShowRankings(u8 taskId)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, i + 2, STR_CONV_MODE_LEFT_ALIGN, 1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1Players);
|
||||
AddTextPrinterParameterized3(tWindowId, 1, 0, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
xPos = 192 - (u8)GetStringWidth(1, gText_TimesPerSec, -1);
|
||||
AddTextPrinterParameterized3(tWindowId, 1, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec);
|
||||
AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, 0, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
xPos = 192 - (u8)GetStringWidth(FONT_NORMAL, gText_TimesPerSec, -1);
|
||||
AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec);
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
if (((tPressingSpeeds(i) & 0xFF) >> (7 - j)) & 1)
|
||||
@ -1836,8 +1836,8 @@ static void Task_ShowRankings(u8 taskId)
|
||||
ConvertIntToDecimalStringN(gStringVar1, (u16)tPressingSpeeds(i) >> 8, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
ConvertIntToDecimalStringN(gStringVar2, score / 1000000, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_XDotY3);
|
||||
xPos -= GetStringWidth(1, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(tWindowId, 1, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
xPos -= GetStringWidth(FONT_NORMAL, gStringVar4, -1);
|
||||
AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4);
|
||||
yPos += 16;
|
||||
score = 0;
|
||||
}
|
||||
@ -1913,8 +1913,8 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game)
|
||||
// Print the player's name
|
||||
AddTextPrinterParameterized4(
|
||||
game->gfx.nameWindowIds[i],
|
||||
2,
|
||||
36 - GetStringWidth(2, game->players[i].name, 0) / 2u,
|
||||
FONT_SHORT,
|
||||
36 - GetStringWidth(FONT_SHORT, game->players[i].name, 0) / 2u,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
@ -1928,8 +1928,8 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game)
|
||||
// Print a partner's name
|
||||
AddTextPrinterParameterized4(
|
||||
game->gfx.nameWindowIds[i],
|
||||
2,
|
||||
36 - GetStringWidth(2, game->players[i].name, 0) / 2u,
|
||||
FONT_SHORT,
|
||||
36 - GetStringWidth(FONT_SHORT, game->players[i].name, 0) / 2u,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
@ -2258,11 +2258,11 @@ static u32 Cmd_PrintMessage(struct BerryCrushGame *game, u8 *args)
|
||||
if (args[1] & F_MSG_EXPAND)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, sMessages[args[0]]);
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, game->textSpeed, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, game->textSpeed, 0, 2, 1, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTextPrinterParameterized2(0, 1, sMessages[args[0]], game->textSpeed, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[args[0]], game->textSpeed, 0, 2, 1, 3);
|
||||
}
|
||||
CopyWindowToVram(0, 3);
|
||||
break;
|
||||
@ -3242,7 +3242,7 @@ static u32 Cmd_SaveGame(struct BerryCrushGame *game, u8 *args)
|
||||
if (!IsLinkTaskFinished())
|
||||
return 0;
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
CreateTask(Task_LinkSave, 0);
|
||||
break;
|
||||
@ -3391,9 +3391,9 @@ static u32 Cmd_StopGame(struct BerryCrushGame *game, u8 *args)
|
||||
case 0:
|
||||
DrawDialogueFrame(0, 0);
|
||||
if (game->playAgainState == PLAY_AGAIN_NO_BERRIES)
|
||||
AddTextPrinterParameterized2(0, 1, sMessages[MSG_NO_BERRIES], game->textSpeed, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[MSG_NO_BERRIES], game->textSpeed, 0, 2, 1, 3);
|
||||
else
|
||||
AddTextPrinterParameterized2(0, 1, sMessages[MSG_DROPPED], game->textSpeed, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[MSG_DROPPED], game->textSpeed, 0, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
break;
|
||||
case 1:
|
||||
|
@ -303,21 +303,21 @@ static void BerryFix_GpuSet(void)
|
||||
FillWindowPixelBuffer(3, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(10));
|
||||
|
||||
width = GetStringWidth(0, sText_Emerald, 0);
|
||||
width = GetStringWidth(FONT_SMALL, sText_Emerald, 0);
|
||||
left = (120 - width) / 2;
|
||||
AddTextPrinterParameterized3(2, 0, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_Emerald);
|
||||
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_Emerald);
|
||||
|
||||
width = GetStringWidth(0, sText_RubySapphire, 0);
|
||||
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
|
||||
left = (120 - width) / 2 + 120;
|
||||
AddTextPrinterParameterized3(2, 0, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire);
|
||||
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire);
|
||||
|
||||
width = GetStringWidth(0, sText_RubySapphire, 0);
|
||||
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
|
||||
left = (112 - width) / 2;
|
||||
AddTextPrinterParameterized3(3, 0, left, 0, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire);
|
||||
AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire);
|
||||
|
||||
width = GetStringWidth(1, sText_BerryProgramUpdate, 0);
|
||||
width = GetStringWidth(FONT_NORMAL, sText_BerryProgramUpdate, 0);
|
||||
left = (208 - width) / 2;
|
||||
AddTextPrinterParameterized3(0, 1, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate);
|
||||
|
||||
CopyWindowToVram(2, 2);
|
||||
CopyWindowToVram(3, 2);
|
||||
@ -346,7 +346,7 @@ static void BerryFix_SetScene(int scene)
|
||||
{
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(10));
|
||||
AddTextPrinterParameterized3(1, 1, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(1, 2);
|
||||
switch (scene)
|
||||
|
@ -205,13 +205,13 @@ u32 GetBerryPowder(void)
|
||||
static void PrintBerryPowderAmount(u8 windowId, int amount, u8 x, u8 y, u8 speed)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, amount, STR_CONV_MODE_RIGHT_ALIGN, 5);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar1, x, y, speed, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, y, speed, NULL);
|
||||
}
|
||||
|
||||
static void DrawPlayerPowderAmount(u8 windowId, u16 baseTileOffset, u8 paletteNum, u32 amount)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, baseTileOffset, paletteNum);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_Powder, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Powder, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
PrintBerryPowderAmount(windowId, amount, 26, 17, 0);
|
||||
}
|
||||
|
||||
|
@ -376,14 +376,14 @@ static void HandleInitWindows(void)
|
||||
|
||||
static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed, u8 colorStructId)
|
||||
{
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sTextColors[colorStructId], speed, text);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, 0, sTextColors[colorStructId], speed, text);
|
||||
}
|
||||
|
||||
static void AddBerryTagTextToBg0(void)
|
||||
{
|
||||
memcpy(GetBgTilemapBuffer(0), sBerryTag->tilemapBuffers[2], sizeof(sBerryTag->tilemapBuffers[2]));
|
||||
FillWindowPixelBuffer(WIN_BERRY_TAG, PIXEL_FILL(15));
|
||||
PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(1, gText_BerryTag, 0x40), 1, 0, 1);
|
||||
PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryTag, 0x40), 1, 0, 1);
|
||||
PutWindowTilemap(WIN_BERRY_TAG);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
@ -409,7 +409,7 @@ static void PrintBerryNumberAndName(void)
|
||||
static void PrintBerrySize(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
if (berry->size != 0)
|
||||
{
|
||||
u32 inches, fraction;
|
||||
@ -423,34 +423,34 @@ static void PrintBerrySize(void)
|
||||
ConvertIntToDecimalStringN(gStringVar1, inches, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
ConvertIntToDecimalStringN(gStringVar2, fraction, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1DotVar2);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gStringVar4, 0x28, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gStringVar4, 0x28, 1, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_ThreeMarks, 0x28, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void PrintBerryFirmness(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL);
|
||||
if (berry->firmness != 0)
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_ThreeMarks, 0x28, 0x11, 0, NULL);
|
||||
}
|
||||
|
||||
static void PrintBerryDescription1(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
AddTextPrinterParameterized(WIN_DESC, 1, berry->description1, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_DESC, FONT_NORMAL, berry->description1, 0, 1, 0, NULL);
|
||||
}
|
||||
|
||||
static void PrintBerryDescription2(void)
|
||||
{
|
||||
const struct Berry *berry = GetBerryInfo(sBerryTag->berryId);
|
||||
AddTextPrinterParameterized(WIN_DESC, 1, berry->description2, 0, 0x11, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_DESC, FONT_NORMAL, berry->description2, 0, 0x11, 0, NULL);
|
||||
}
|
||||
|
||||
static void CreateBerrySprite(void)
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
ALIGNED(4)
|
||||
static const u8 sScrollDistances[] = {1, 2, 4};
|
||||
static const u16 sFont6BrailleGlyphs[] = INCBIN_U16("graphics/fonts/font6.fwjpnfont");
|
||||
static const u16 sFont_Braille[] = INCBIN_U16("graphics/fonts/braille_glyphs.fwjpnfont");
|
||||
|
||||
static void DecompressGlyphFont6(u16);
|
||||
static void DecompressGlyph_Braille(u16);
|
||||
|
||||
u16 Font6Func(struct TextPrinter *textPrinter)
|
||||
u16 FontFunc_Braille(struct TextPrinter *textPrinter)
|
||||
{
|
||||
u16 char_;
|
||||
struct TextPrinterSubStruct *subStruct;
|
||||
@ -81,7 +81,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return 2;
|
||||
case EXT_CTRL_CODE_FONT:
|
||||
subStruct->glyphId = *textPrinter->printerTemplate.currentChar;
|
||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return 2;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
@ -133,7 +133,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return 0;
|
||||
}
|
||||
DecompressGlyphFont6(char_);
|
||||
DecompressGlyph_Braille(char_);
|
||||
CopyGlyphToWindow(textPrinter);
|
||||
textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing;
|
||||
return 0;
|
||||
@ -201,20 +201,18 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void DecompressGlyphFont6(u16 glyph)
|
||||
static void DecompressGlyph_Braille(u16 glyph)
|
||||
{
|
||||
const u16 *glyphs;
|
||||
|
||||
glyphs = sFont6BrailleGlyphs + 0x100 * (glyph / 8) + 0x10 * (glyph % 8);
|
||||
const u16 *glyphs = sFont_Braille + 0x100 * (glyph / 8) + 0x10 * (glyph % 8);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
DecompressGlyphTile(glyphs + 0x88, gCurGlyph.gfxBufferBottom + 8);
|
||||
gCurGlyph.width = 0x10;
|
||||
gCurGlyph.height = 0x10;
|
||||
gCurGlyph.width = 16;
|
||||
gCurGlyph.height = 16;
|
||||
}
|
||||
|
||||
u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese)
|
||||
u32 GetGlyphWidth_Braille(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
return 0x10;
|
||||
return 16;
|
||||
}
|
@ -99,8 +99,8 @@ static void PrintNumPlayersInLink(u16 windowId, u32 numPlayers)
|
||||
ConvertIntToDecimalStringN(gStringVar1, numPlayers, STR_CONV_MODE_LEFT_ALIGN, 1);
|
||||
SetStandardWindowBorderStyle(windowId, 0);
|
||||
StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink);
|
||||
xPos = GetStringCenterAlignXOffset(1, gStringVar4, 88);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, xPos, 1, 0xFF, NULL);
|
||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(windowId, 3);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ void CB2_InitClearSaveDataScreen(void)
|
||||
static void Task_DoClearSaveDataScreenYesNo(u8 taskId)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(0, 0, 2, 14);
|
||||
AddTextPrinterParameterized(0, 1, gText_ClearAllSaveData, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gText_ClearAllSaveData, 0, 1, 0, 0);
|
||||
CreateYesNoMenu(sClearSaveYesNo, 2, 14, 1);
|
||||
gTasks[taskId].func = Task_ClearSaveDataScreenYesNoChoice;
|
||||
}
|
||||
@ -91,7 +91,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gText_ClearingData, 0, 1, 0, 0);
|
||||
gTasks[taskId].func = Task_ClearSaveData;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -17,8 +17,8 @@ void PrintCoinsString(u32 coinAmount)
|
||||
ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, MAX_COIN_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Coins);
|
||||
|
||||
xAlign = GetStringRightAlignXOffset(1, gStringVar4, 0x40);
|
||||
AddTextPrinterParameterized(sCoinsWindowId, 1, gStringVar4, xAlign, 1, 0, NULL);
|
||||
xAlign = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x40);
|
||||
AddTextPrinterParameterized(sCoinsWindowId, FONT_NORMAL, gStringVar4, xAlign, 1, 0, NULL);
|
||||
}
|
||||
|
||||
void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y)
|
||||
|
@ -1543,7 +1543,7 @@ static void Task_ShowMoveSelectScreen(u8 taskId)
|
||||
moveNameBuffer = StringCopy(moveNameBuffer, gMoveNames[move]);
|
||||
|
||||
FillWindowPixelBuffer(i + MOVE_WINDOWS_START, PIXEL_FILL(0));
|
||||
Contest_PrintTextToBg0WindowAt(i + MOVE_WINDOWS_START, moveName, 5, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(i + MOVE_WINDOWS_START, moveName, 5, 1, FONT_NARROW);
|
||||
}
|
||||
|
||||
DrawMoveSelectArrow(eContest.playerMoveChoice);
|
||||
@ -3029,10 +3029,10 @@ static void PrintContestantTrainerNameWithColor(u8 contestant, u8 color)
|
||||
StringCopy(buffer, gText_Slash);
|
||||
StringAppend(buffer, gContestMons[contestant].trainerName);
|
||||
Contest_CopyStringWithColor(buffer, color);
|
||||
offset = GetStringRightAlignXOffset(7, gDisplayedStringBattle, 0x60);
|
||||
offset = GetStringRightAlignXOffset(FONT_NARROW, gDisplayedStringBattle, 0x60);
|
||||
if (offset > 55)
|
||||
offset = 55;
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, offset, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, offset, 1, FONT_NARROW);
|
||||
}
|
||||
|
||||
static void PrintContestantMonName(u8 contestant)
|
||||
@ -3043,7 +3043,7 @@ static void PrintContestantMonName(u8 contestant)
|
||||
static void PrintContestantMonNameWithColor(u8 contestant, u8 color)
|
||||
{
|
||||
Contest_CopyStringWithColor(gContestMons[contestant].nickname, color);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, 5, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, 5, 1, FONT_NARROW);
|
||||
}
|
||||
|
||||
static u16 CalculateContestantRound1Points(u8 who, u8 contestCategory)
|
||||
@ -4273,7 +4273,7 @@ static void ContestDebugDoPrint(void)
|
||||
txtPtr = StringCopy(txtPtr, gText_OneDash);
|
||||
}
|
||||
ConvertIntToDecimalStringN(txtPtr, value, STR_CONV_MODE_LEFT_ALIGN, 4);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 55, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 55, 1, FONT_NARROW);
|
||||
}
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
{
|
||||
@ -4285,7 +4285,7 @@ static void ContestDebugDoPrint(void)
|
||||
txtPtr = StringCopy(txtPtr, gText_OneDash);
|
||||
}
|
||||
ConvertIntToDecimalStringN(txtPtr, value, STR_CONV_MODE_LEFT_ALIGN, 4);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 5, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 5, 1, FONT_NARROW);
|
||||
}
|
||||
SwapMoveDescAndContestTilemaps();
|
||||
break;
|
||||
@ -5410,7 +5410,7 @@ static void Contest_PrintTextToBg0WindowStd(u32 windowId, const u8 *b)
|
||||
|
||||
printerTemplate.currentChar = b;
|
||||
printerTemplate.windowId = windowId;
|
||||
printerTemplate.fontId = 1;
|
||||
printerTemplate.fontId = FONT_NORMAL;
|
||||
printerTemplate.x = 0;
|
||||
printerTemplate.y = 1;
|
||||
printerTemplate.currentX = 0;
|
||||
@ -5457,7 +5457,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b)
|
||||
|
||||
printerTemplate.currentChar = currChar;
|
||||
printerTemplate.windowId = 4;
|
||||
printerTemplate.fontId = 1;
|
||||
printerTemplate.fontId = FONT_NORMAL;
|
||||
printerTemplate.x = 0;
|
||||
printerTemplate.y = 1;
|
||||
printerTemplate.currentX = 0;
|
||||
@ -5968,7 +5968,7 @@ static void ContestDebugPrintBitStrings(void)
|
||||
for (i = 0; i < CONTESTANT_COUNT; i++)
|
||||
{
|
||||
txtPtr = StringCopy(text1, gText_CDot);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1, 5, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1, 5, 1, FONT_NARROW);
|
||||
bits = gContestResources->tv[i].winnerFlags;
|
||||
for (j = 7; j > -1; j--) // Weird loop.
|
||||
{
|
||||
@ -5981,7 +5981,7 @@ static void ContestDebugPrintBitStrings(void)
|
||||
|
||||
text2[j] = EOS;
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text2, 5, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, FONT_NARROW);
|
||||
}
|
||||
}
|
||||
else // CONTEST_DEBUG_MODE_PRINT_LOSER_FLAGS
|
||||
@ -6001,8 +6001,8 @@ static void ContestDebugPrintBitStrings(void)
|
||||
text2[j] = text1[j];
|
||||
|
||||
text2[j] = EOS;
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text2, 5, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, 7);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text2, 5, 1, FONT_NARROW);
|
||||
Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, FONT_NARROW);
|
||||
}
|
||||
}
|
||||
SwapMoveDescAndContestTilemaps();
|
||||
|
@ -306,8 +306,8 @@ static void PrintContestPaintingCaption(u8 contestType, bool8 isForArtist)
|
||||
StringExpandPlaceholders(gStringVar4, sMuseumCaptions[category]);
|
||||
}
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
||||
AddTextPrinterParameterized(sWindowId, 1, gStringVar4, x, 1, 0, 0);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208);
|
||||
AddTextPrinterParameterized(sWindowId, FONT_NORMAL, gStringVar4, x, 1, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
}
|
||||
|
||||
|
@ -1176,12 +1176,12 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId)
|
||||
windowId = AddWindow(&windowTemplate);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
|
||||
origWidth = GetStringWidth(1, text, 0);
|
||||
origWidth = GetStringWidth(FONT_NORMAL, text, 0);
|
||||
strWidth = (origWidth + 9) / 8;
|
||||
if (strWidth > 30)
|
||||
strWidth = 30;
|
||||
|
||||
AddTextPrinterParameterized3(windowId, 1, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text);
|
||||
AddTextPrinterParameterized3(windowId, FONT_NORMAL, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text);
|
||||
{
|
||||
s32 i;
|
||||
struct Sprite *sprite;
|
||||
@ -1931,7 +1931,7 @@ static void AddContestTextPrinter(int windowId, u8 *str, int x)
|
||||
struct TextPrinterTemplate textPrinter;
|
||||
textPrinter.currentChar = str;
|
||||
textPrinter.windowId = windowId;
|
||||
textPrinter.fontId = 7;
|
||||
textPrinter.fontId = FONT_NARROW;
|
||||
textPrinter.x = x;
|
||||
textPrinter.y = 2;
|
||||
textPrinter.currentX = x;
|
||||
|
@ -400,8 +400,8 @@ static void PrintCreditsText(const u8 *string, u8 y, bool8 isTitle)
|
||||
color[2] = TEXT_COLOR_DARK_GRAY;
|
||||
}
|
||||
|
||||
x = GetStringCenterAlignXOffsetWithLetterSpacing(1, string, DISPLAY_WIDTH, 1);
|
||||
AddTextPrinterParameterized4(0, 1, x, y, 1, 0, color, -1, string);
|
||||
x = GetStringCenterAlignXOffsetWithLetterSpacing(FONT_NORMAL, string, DISPLAY_WIDTH, 1);
|
||||
AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 1, 0, color, -1, string);
|
||||
}
|
||||
|
||||
#define tMainTaskId data[1]
|
||||
|
@ -77,7 +77,7 @@ static const struct ListMenuTemplate sDaycareListMenuLevelTemplate =
|
||||
.lettersSpacing = 1,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -1186,7 +1186,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
|
||||
|
||||
printer.currentChar = text;
|
||||
printer.windowId = windowId;
|
||||
printer.fontId = 1;
|
||||
printer.fontId = FONT_NORMAL;
|
||||
printer.x = x;
|
||||
printer.y = y;
|
||||
printer.currentX = x;
|
||||
@ -1222,7 +1222,7 @@ static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycare
|
||||
level = GetLevelAfterDaycareSteps(&daycare->mons[daycareSlotId].mon, daycare->mons[daycareSlotId].steps);
|
||||
ConvertIntToDecimalStringN(intText, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
StringAppend(lvlText, intText);
|
||||
x = GetStringRightAlignXOffset(1, lvlText, 112);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, lvlText, 112);
|
||||
DaycareAddTextPrinter(windowId, lvlText, x, y);
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@ static const struct ListMenuTemplate sDecorationItemsListMenuTemplate =
|
||||
.lettersSpacing = FALSE,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = FALSE,
|
||||
.fontId = 7
|
||||
.fontId = FONT_NARROW
|
||||
};
|
||||
|
||||
#include "data/decoration/icon.h"
|
||||
@ -615,7 +615,7 @@ static void HandleDecorationActionsMenuInput(u8 taskId)
|
||||
static void PrintCurMainMenuDescription(void)
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sSecretBasePCMenuItemDescriptions[sDecorationActionsCursorPos], 0, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sSecretBasePCMenuItemDescriptions[sDecorationActionsCursorPos], 0, 0, 2, 1, 3);
|
||||
}
|
||||
|
||||
static void DecorationMenuAction_Decorate(u8 taskId)
|
||||
@ -728,7 +728,7 @@ static void PrintDecorationCategoryMenuItems(u8 taskId)
|
||||
PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, FALSE, TEXT_SPEED_FF);
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized(windowId, 1, 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);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
@ -742,12 +742,12 @@ static void PrintDecorationCategoryMenuItem(u8 winid, u8 category, u8 x, u8 y, b
|
||||
ColorMenuItemString(gStringVar4, disabled);
|
||||
str = StringLength(gStringVar4) + gStringVar4;
|
||||
StringCopy(str, sDecorationCategoryNames[category]);
|
||||
AddTextPrinterParameterized(winid, 1, gStringVar4, x, y, speed, NULL);
|
||||
AddTextPrinterParameterized(winid, FONT_NORMAL, gStringVar4, x, y, speed, NULL);
|
||||
str = ConvertIntToDecimalStringN(str, GetNumOwnedDecorationsInCategory(category), STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
*(str++) = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(str, gDecorationInventories[category].size, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar4, width);
|
||||
AddTextPrinterParameterized(winid, 1, gStringVar4, x, y, speed, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, width);
|
||||
AddTextPrinterParameterized(winid, FONT_NORMAL, gStringVar4, x, y, speed, NULL);
|
||||
}
|
||||
|
||||
static void ColorMenuItemString(u8 *str, bool8 disabled)
|
||||
@ -1024,7 +1024,7 @@ static void PrintDecorationItemDescription(s32 itemIndex)
|
||||
else
|
||||
str = gDecorations[gCurDecorationItems[itemIndex]].description;
|
||||
|
||||
AddTextPrinterParameterized(windowId, 1, str, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, str, 0, 1, 0, 0);
|
||||
}
|
||||
|
||||
static void RemoveDecorationItemsOtherWindows(void)
|
||||
|
@ -205,5 +205,5 @@ static void PrintDiplomaText(u8 *text, u8 var1, u8 var2)
|
||||
{
|
||||
u8 color[3] = {0, 2, 3};
|
||||
|
||||
AddTextPrinterParameterized4(0, 1, var1, var2, 0, 0, color, -1, text);
|
||||
AddTextPrinterParameterized4(0, FONT_NORMAL, var1, var2, 0, 0, color, -1, text);
|
||||
}
|
||||
|
@ -2954,10 +2954,10 @@ static void Task_ShowDodrioBerryPickingRecords(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
window = sWindowTemplates_Records;
|
||||
width = GetStringWidth(1, gText_BerryPickingRecords, 0);
|
||||
width = GetStringWidth(FONT_NORMAL, gText_BerryPickingRecords, 0);
|
||||
for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++)
|
||||
{
|
||||
widthCurr = GetStringWidth(1, sRecordsTexts[i], 0) + 50;
|
||||
widthCurr = GetStringWidth(FONT_NORMAL, sRecordsTexts[i], 0) + 50;
|
||||
if (widthCurr > width)
|
||||
width = widthCurr;
|
||||
}
|
||||
@ -3008,14 +3008,14 @@ static void PrintRecordsText(u8 windowId, s32 width)
|
||||
LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0);
|
||||
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(windowId, 1, gText_BerryPickingRecords, GetStringCenterAlignXOffset(1, gText_BerryPickingRecords, width * 8), 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BerryPickingRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryPickingRecords, width * 8), 1, TEXT_SPEED_FF, NULL);
|
||||
for (i = 0; i < NUM_RECORD_TYPES; i++)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, sRecordNumMaxDigits[i]);
|
||||
numWidth = GetStringWidth(1, gStringVar1, -1);
|
||||
AddTextPrinterParameterized(windowId, 1, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SPEED_FF, NULL);
|
||||
numWidth = GetStringWidth(FONT_NORMAL, gStringVar1, -1);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SPEED_FF, NULL);
|
||||
x = (width * 8) - numWidth;
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
PutWindowTilemap(windowId);
|
||||
}
|
||||
@ -4640,7 +4640,7 @@ static void ShowNames(void)
|
||||
{
|
||||
colorsId = COLORID_GRAY;
|
||||
playerId = GetPlayerIdByPos(i);
|
||||
left = (56 - GetStringWidth(1, GetPlayerName(playerId), -1)) / 2u;
|
||||
left = (56 - GetStringWidth(FONT_NORMAL, GetPlayerName(playerId), -1)) / 2u;
|
||||
window.tilemapLeft = coords->left;
|
||||
window.tilemapTop = coords->top;
|
||||
sGfx->windowIds[i] = AddWindow(&window);
|
||||
@ -4649,7 +4649,7 @@ static void ShowNames(void)
|
||||
if (playerId == GetMultiplayerId())
|
||||
colorsId = COLORID_BLUE;
|
||||
name = GetPlayerName(playerId);
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[i], 1, left, 1, sTextColorTable[colorsId], -1, name);
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[i], FONT_NORMAL, left, 1, sTextColorTable[colorsId], -1, name);
|
||||
CopyWindowToVram(sGfx->windowIds[i], 2);
|
||||
window.baseBlock += 0xE;
|
||||
DrawMessageWindow(&window);
|
||||
@ -4726,22 +4726,22 @@ static void PrintRankedScores(u8 numPlayers_)
|
||||
}
|
||||
|
||||
// Print text
|
||||
x = 216 - GetStringWidth(1, gText_SpacePoints, 0);
|
||||
x = 216 - GetStringWidth(FONT_NORMAL, gText_SpacePoints, 0);
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
{
|
||||
u8 colorsId = COLORID_GRAY;
|
||||
u8 playerId = playersByRanking[i];
|
||||
u32 points = scoreResults[playerId].score;
|
||||
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], 1, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], -1, NULL);
|
||||
if (playerId == GetMultiplayerId())
|
||||
colorsId = COLORID_BLUE;
|
||||
name = GetPlayerName(playerId);
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[1], 1, 28, sRankingYCoords[i], sTextColorTable[colorsId], -1, name);
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 28, sRankingYCoords[i], sTextColorTable[colorsId], -1, name);
|
||||
ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_LEFT_ALIGN, 7);
|
||||
numWidth = GetStringWidth(1, numString, -1);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], 1, numString, x - numWidth, sRankingYCoords[i], -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], 1, gText_SpacePoints, x, sRankingYCoords[i], -1, NULL);
|
||||
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, gText_SpacePoints, x, sRankingYCoords[i], -1, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4770,10 +4770,10 @@ static void ShowResults(void)
|
||||
case 2:
|
||||
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
||||
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
||||
strWidth = GetStringWidth(1, gText_BerryPickingResults, -1);
|
||||
strWidth = GetStringWidth(FONT_NORMAL, gText_BerryPickingResults, -1);
|
||||
x = (224 - strWidth) / 2;
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_BerryPickingResults, x, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], 1, gText_10P30P50P50P, 68, 17, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_BerryPickingResults, x, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_10P30P50P50P, 68, 17, -1, NULL);
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
{
|
||||
u8 colorsId = COLORID_GRAY;
|
||||
@ -4781,7 +4781,7 @@ static void ShowResults(void)
|
||||
colorsId = COLORID_BLUE;
|
||||
|
||||
name = GetPlayerName(i);
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[1], 1, 0, sResultsYCoords[i], sTextColorTable[colorsId], -1, name);
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 0, sResultsYCoords[i], sTextColorTable[colorsId], -1, name);
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
u32 width;
|
||||
@ -4789,13 +4789,13 @@ static void ShowResults(void)
|
||||
u16 maxBerriesPicked = Min(GetHighestBerryResult(j), MAX_BERRIES);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar4, berriesPicked, STR_CONV_MODE_LEFT_ALIGN, 4);
|
||||
width = GetStringWidth(1, gStringVar4, -1);
|
||||
width = GetStringWidth(FONT_NORMAL, gStringVar4, -1);
|
||||
|
||||
// If player got the most of a berry type, highlight their number in red
|
||||
if (maxBerriesPicked == berriesPicked && maxBerriesPicked != 0)
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[1], 1, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], -1, gStringVar4);
|
||||
AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], -1, gStringVar4);
|
||||
else
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], 1, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], -1, NULL);
|
||||
}
|
||||
}
|
||||
CopyWindowToVram(sGfx->windowIds[0], 2);
|
||||
@ -4824,9 +4824,9 @@ static void ShowResults(void)
|
||||
case 5:
|
||||
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
||||
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
||||
strWidth = GetStringWidth(1, gText_AnnouncingRankings, -1);
|
||||
strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingRankings, -1);
|
||||
x = (224 - strWidth) / 2;
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_AnnouncingRankings, x, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingRankings, x, 1, -1, NULL);
|
||||
sGfx->state++;
|
||||
break;
|
||||
case 6:
|
||||
@ -4870,14 +4870,14 @@ static void ShowResults(void)
|
||||
PlayNewMapMusic(MUS_LEVEL_UP);
|
||||
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
||||
FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1));
|
||||
strWidth = GetStringWidth(1, gText_AnnouncingPrizes, -1);
|
||||
strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingPrizes, -1);
|
||||
x = (224 - strWidth) / 2;
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_AnnouncingPrizes, x, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingPrizes, x, 1, -1, NULL);
|
||||
DynamicPlaceholderTextUtil_Reset();
|
||||
CopyItemName(GetPrizeItemId(), gStringVar1);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FirstPlacePrize);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], 1, gStringVar4, 0, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 1, -1, NULL);
|
||||
prizeState = TryGivePrize();
|
||||
if (prizeState != PRIZE_RECEIVED && prizeState != NO_PRIZE)
|
||||
{
|
||||
@ -4888,7 +4888,7 @@ static void ShowResults(void)
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_CantHoldAnyMore);
|
||||
else if (prizeState == PRIZE_FILLED_BAG)
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FilledStorageSpace);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], 1, gStringVar4, 0, 41, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 41, -1, NULL);
|
||||
}
|
||||
CopyWindowToVram(sGfx->windowIds[0], 2);
|
||||
CopyWindowToVram(sGfx->windowIds[1], 2);
|
||||
@ -4946,10 +4946,10 @@ static void Msg_WantToPlayAgain(void)
|
||||
// Print text
|
||||
FillWindowPixelBuffer(sGfx->windowIds[WIN_PLAY_AGAIN], PIXEL_FILL(1));
|
||||
FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], 1, gText_WantToPlayAgain, 0, 5, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_Yes, 8, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_No, 8, 17, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_SelectorArrow2, 0, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], FONT_NORMAL, gText_WantToPlayAgain, 0, 5, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, 1, -1, NULL);
|
||||
CopyWindowToVram(sGfx->windowIds[WIN_PLAY_AGAIN], 2);
|
||||
CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], 2);
|
||||
sGfx->state++;
|
||||
@ -4970,9 +4970,9 @@ static void Msg_WantToPlayAgain(void)
|
||||
if (y == PLAY_AGAIN_NONE)
|
||||
y = PLAY_AGAIN_YES;
|
||||
FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_Yes, 8, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_No, 8, 17, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL);
|
||||
CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], 3);
|
||||
|
||||
// Increment state only if A or B button have been pressed.
|
||||
@ -5025,7 +5025,7 @@ static void Msg_SavingDontTurnOff(void)
|
||||
{
|
||||
case 0:
|
||||
DrawDialogueFrame(0, FALSE);
|
||||
AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
|
||||
sGfx->state++;
|
||||
break;
|
||||
case 1:
|
||||
@ -5063,7 +5063,7 @@ static void Msg_CommunicationStandby(void)
|
||||
break;
|
||||
case 1:
|
||||
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_CommunicationStandby3, 0, 5, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_CommunicationStandby3, 0, 5, -1, NULL);
|
||||
CopyWindowToVram(sGfx->windowIds[0], 2);
|
||||
sGfx->state++;
|
||||
break;
|
||||
@ -5103,7 +5103,7 @@ static void Msg_SomeoneDroppedOut(void)
|
||||
break;
|
||||
case 1:
|
||||
FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_SomeoneDroppedOut, 0, 5, -1, NULL);
|
||||
AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_SomeoneDroppedOut, 0, 5, -1, NULL);
|
||||
CopyWindowToVram(sGfx->windowIds[0], 2);
|
||||
sGfx->state++;
|
||||
break;
|
||||
|
@ -3176,7 +3176,7 @@ static bool8 UpdateMainCursor(void)
|
||||
else
|
||||
{
|
||||
CopyEasyChatWord(str, *ecWord);
|
||||
stringWidth = GetStringWidth(1, str, 0);
|
||||
stringWidth = GetStringWidth(FONT_NORMAL, str, 0);
|
||||
}
|
||||
|
||||
trueStringWidth = stringWidth + 17;
|
||||
@ -3930,9 +3930,9 @@ static void PrintTitle(void)
|
||||
if (!titleText)
|
||||
return;
|
||||
|
||||
xOffset = GetStringCenterAlignXOffset(1, titleText, 144);
|
||||
xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||
PrintEasyChatTextWithColors(0, 1, 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_SPEED_FF, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY);
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
@ -4003,10 +4003,10 @@ static void PrintEasyChatStdMessage(u8 msgId)
|
||||
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||
if (text1)
|
||||
PrintEasyChatText(1, 1, text1, 0, 1, TEXT_SPEED_FF, 0);
|
||||
PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SPEED_FF, 0);
|
||||
|
||||
if (text2)
|
||||
PrintEasyChatText(1, 1, text2, 0, 17, TEXT_SPEED_FF, 0);
|
||||
PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SPEED_FF, 0);
|
||||
|
||||
CopyWindowToVram(1, 3);
|
||||
}
|
||||
@ -4099,7 +4099,7 @@ static void PrintCurrentPhrase(void)
|
||||
}
|
||||
|
||||
*str = EOS;
|
||||
PrintEasyChatText(sScreenControl->windowId, 1, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SPEED_FF, 0);
|
||||
PrintEasyChatText(sScreenControl->windowId, FONT_NORMAL, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SPEED_FF, 0);
|
||||
}
|
||||
|
||||
CopyWindowToVram(sScreenControl->windowId, 3);
|
||||
@ -4245,7 +4245,7 @@ static void PrintKeyboardGroupNames(void)
|
||||
return;
|
||||
}
|
||||
|
||||
PrintEasyChatText(2, 1, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SPEED_FF, NULL);
|
||||
PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
y += 16;
|
||||
@ -4257,7 +4257,7 @@ static void PrintKeyboardAlphabet(void)
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++)
|
||||
PrintEasyChatText(2, 1, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SPEED_FF, NULL);
|
||||
PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void PrintInitialWordSelectText(void)
|
||||
@ -4328,9 +4328,9 @@ static void PrintWordSelectText(u8 scrollOffset, u8 numRows)
|
||||
{
|
||||
CopyEasyChatWordPadded(sScreenControl->wordSelectPrintBuffer, easyChatWord, 0);
|
||||
if (!DummyWordCheck(easyChatWord))
|
||||
PrintEasyChatText(2, 1, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, NULL);
|
||||
PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, NULL);
|
||||
else // Never reached
|
||||
PrintEasyChatTextWithColors(2, 1, 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_SPEED_FF, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5082,7 +5082,7 @@ static void AddMainScreenButtonWindow(void)
|
||||
if (str)
|
||||
{
|
||||
int x = sFooterOptionXOffsets[footerIndex][i];
|
||||
PrintEasyChatText(windowId, 1, str, x, 1, 0, NULL);
|
||||
PrintEasyChatText(windowId, FONT_NORMAL, str, x, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -866,7 +866,7 @@ static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
|
||||
sEggHatchData->textColor[0] = 0;
|
||||
sEggHatchData->textColor[1] = 5;
|
||||
sEggHatchData->textColor[2] = 6;
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, 0, sEggHatchData->textColor, speed, string);
|
||||
}
|
||||
|
||||
u8 GetEggCyclesToSubtract(void)
|
||||
|
@ -1807,7 +1807,7 @@ static bool8 Fishing_ShowDots(struct Task *task)
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTextPrinterParameterized(0, 1, dot, task->tNumDots * 8, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, dot, task->tNumDots * 8, 1, 0, NULL);
|
||||
task->tNumDots++;
|
||||
}
|
||||
}
|
||||
@ -1856,7 +1856,7 @@ static bool8 Fishing_CheckForBite(struct Task *task)
|
||||
static bool8 Fishing_GotBite(struct Task *task)
|
||||
{
|
||||
AlignFishingAnimationFrames();
|
||||
AddTextPrinterParameterized(0, 1, gText_OhABite, 0, 17, 0, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gText_OhABite, 0, 17, 0, NULL);
|
||||
task->tStep++;
|
||||
task->tFrameCounter = 0;
|
||||
return FALSE;
|
||||
@ -1911,7 +1911,7 @@ static bool8 Fishing_MonOnHook(struct Task *task)
|
||||
{
|
||||
AlignFishingAnimationFrames();
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_PokemonOnHook, 1, 0, 2, 1, 3);
|
||||
task->tStep++;
|
||||
task->tFrameCounter = 0;
|
||||
return FALSE;
|
||||
@ -1958,7 +1958,7 @@ static bool8 Fishing_NotEvenNibble(struct Task *task)
|
||||
AlignFishingAnimationFrames();
|
||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_NotEvenANibble, 1, 0, 2, 1, 3);
|
||||
task->tStep = FISHING_SHOW_RESULT;
|
||||
return TRUE;
|
||||
}
|
||||
@ -1968,7 +1968,7 @@ static bool8 Fishing_GotAway(struct Task *task)
|
||||
AlignFishingAnimationFrames();
|
||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_ItGotAway, 1, 0, 2, 1, 3);
|
||||
task->tStep++;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -151,8 +151,8 @@ static void FieldUpdateRegionMap(void)
|
||||
break;
|
||||
case 1:
|
||||
DrawStdFrameWithCustomTileAndPalette(1, 0, 0x27, 0xd);
|
||||
offset = GetStringCenterAlignXOffset(1, gText_Hoenn, 0x38);
|
||||
AddTextPrinterParameterized(1, 1, gText_Hoenn, offset, 1, 0, NULL);
|
||||
offset = GetStringCenterAlignXOffset(FONT_NORMAL, gText_Hoenn, 0x38);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, gText_Hoenn, offset, 1, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
DrawStdFrameWithCustomTileAndPalette(0, 0, 0x27, 0xd);
|
||||
PrintRegionMapSecName();
|
||||
@ -207,7 +207,7 @@ static void PrintRegionMapSecName(void)
|
||||
if (sFieldRegionMapHandler->regionMap.mapSecType != MAPSECTYPE_NONE)
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
else
|
||||
|
@ -1910,11 +1910,11 @@ void ShowDeptStoreElevatorFloorSelect(void)
|
||||
sTutorMoveAndElevatorWindowId = AddWindow(&gElevatorFloor_WindowTemplate);
|
||||
SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0);
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64);
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
|
||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64);
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
xPos = GetStringCenterAlignXOffset(1, gDeptStoreFloorNames[gSpecialVar_0x8005], 64);
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
|
||||
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], 64);
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
|
||||
|
||||
PutWindowTilemap(sTutorMoveAndElevatorWindowId);
|
||||
CopyWindowToVram(sTutorMoveAndElevatorWindowId, 3);
|
||||
@ -2653,7 +2653,7 @@ static void InitScrollableMultichoice(void)
|
||||
gScrollableMultichoice_ListMenuTemplate.lettersSpacing = 0;
|
||||
gScrollableMultichoice_ListMenuTemplate.itemVerticalPadding = 0;
|
||||
gScrollableMultichoice_ListMenuTemplate.scrollMultiple = 0;
|
||||
gScrollableMultichoice_ListMenuTemplate.fontId = 1;
|
||||
gScrollableMultichoice_ListMenuTemplate.fontId = FONT_NORMAL;
|
||||
gScrollableMultichoice_ListMenuTemplate.cursorKind = 0;
|
||||
}
|
||||
|
||||
@ -2957,8 +2957,8 @@ void UpdateBattlePointsWindow(void)
|
||||
u8 string[32];
|
||||
u32 x;
|
||||
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.battlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
|
||||
x = GetStringRightAlignXOffset(1, string, 48);
|
||||
AddTextPrinterParameterized(sBattlePointsWindowId, 1, string, x, 1, 0, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, string, 48);
|
||||
AddTextPrinterParameterized(sBattlePointsWindowId, FONT_NORMAL, string, x, 1, 0, NULL);
|
||||
}
|
||||
|
||||
void ShowBattlePointsWindow(void)
|
||||
@ -3047,7 +3047,7 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
|
||||
switch (menu)
|
||||
{
|
||||
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1:
|
||||
AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3);
|
||||
if (sFrontierExchangeCorner_Decor1[selection] == 0xFFFF)
|
||||
{
|
||||
ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor1[selection]);
|
||||
@ -3060,7 +3060,7 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
|
||||
}
|
||||
break;
|
||||
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
|
||||
AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3);
|
||||
if (sFrontierExchangeCorner_Decor2[selection] == 0xFFFF)
|
||||
{
|
||||
ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor2[selection]);
|
||||
@ -3073,11 +3073,11 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
|
||||
}
|
||||
break;
|
||||
case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
|
||||
AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3);
|
||||
ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Vitamins[selection]);
|
||||
break;
|
||||
case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR:
|
||||
AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3);
|
||||
ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_HoldItems[selection]);
|
||||
break;
|
||||
}
|
||||
@ -3216,11 +3216,11 @@ static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection)
|
||||
FillWindowPixelRect(sTutorMoveAndElevatorWindowId, PIXEL_FILL(1), 0, 0, 96, 48);
|
||||
if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_2)
|
||||
{
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3244,9 +3244,9 @@ void ScrollableMultichoice_RedrawPersistentMenu(void)
|
||||
SetStandardWindowBorderStyle(task->tWindowId, 0);
|
||||
|
||||
for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++)
|
||||
AddTextPrinterParameterized5(task->tWindowId, 1, 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_SPEED_FF, NULL, 0, 0);
|
||||
|
||||
AddTextPrinterParameterized(task->tWindowId, 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(task->tWindowId, FONT_NORMAL, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
|
||||
PutWindowTilemap(task->tWindowId);
|
||||
CopyWindowToVram(task->tWindowId, 3);
|
||||
}
|
||||
|
@ -1150,16 +1150,16 @@ static void ShowAndPrintWindows(void)
|
||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||
}
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, gText_SymbolsEarned, 96);
|
||||
AddTextPrinterParameterized3(WINDOW_EARNED_SYMBOLS, 1, x, 5, sTextColors[0], 0, gText_SymbolsEarned);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_SymbolsEarned, 96);
|
||||
AddTextPrinterParameterized3(WINDOW_EARNED_SYMBOLS, FONT_NORMAL, x, 5, sTextColors[0], 0, gText_SymbolsEarned);
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, gText_BattleRecord, 96);
|
||||
AddTextPrinterParameterized3(WINDOW_BATTLE_RECORD, 1, x, 5, sTextColors[0], 0, gText_BattleRecord);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_BattleRecord, 96);
|
||||
AddTextPrinterParameterized3(WINDOW_BATTLE_RECORD, FONT_NORMAL, x, 5, sTextColors[0], 0, gText_BattleRecord);
|
||||
|
||||
AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, 8, 5, 4, sTextColors[0], 0, gText_BattlePoints);
|
||||
AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, FONT_SMALL_NARROW, 5, 4, sTextColors[0], 0, gText_BattlePoints);
|
||||
ConvertIntToDecimalStringN(gStringVar4, sPassData->battlePoints, STR_CONV_MODE_LEFT_ALIGN, 5);
|
||||
x = GetStringRightAlignXOffset(8, gStringVar4, 91);
|
||||
AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, 8, x, 16, sTextColors[0], 0, gStringVar4);
|
||||
x = GetStringRightAlignXOffset(FONT_SMALL_NARROW, gStringVar4, 91);
|
||||
AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, FONT_SMALL_NARROW, x, 16, sTextColors[0], 0, gStringVar4);
|
||||
|
||||
sPassData->cursorArea = GetCursorAreaFromCoords(sPassData->cursorX - 5, sPassData->cursorY + 5);
|
||||
sPassData->previousCursorArea = CURSOR_AREA_NOTHING;
|
||||
@ -1176,9 +1176,9 @@ static void PrintAreaDescription(u8 cursorArea)
|
||||
FillWindowPixelBuffer(WINDOW_DESCRIPTION, PIXEL_FILL(0));
|
||||
|
||||
if (cursorArea == CURSOR_AREA_RECORD && !sPassData->hasBattleRecord)
|
||||
AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[CURSOR_AREA_NOTHING]);
|
||||
AddTextPrinterParameterized3(WINDOW_DESCRIPTION, FONT_NORMAL, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[CURSOR_AREA_NOTHING]);
|
||||
else if (cursorArea != CURSOR_AREA_NOTHING)
|
||||
AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[cursorArea]);
|
||||
AddTextPrinterParameterized3(WINDOW_DESCRIPTION, FONT_NORMAL, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[cursorArea]);
|
||||
|
||||
CopyWindowToVram(WINDOW_DESCRIPTION, 3);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
@ -1715,12 +1715,12 @@ static void PrintOnFrontierMap(void)
|
||||
for (i = 0; i < NUM_FRONTIER_FACILITIES; i++)
|
||||
{
|
||||
if (i == sMapData->cursorPos)
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (i * 16) + 1, sTextColors[2], 0, sMapLandmarks[i].name);
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (i * 16) + 1, sTextColors[2], 0, sMapLandmarks[i].name);
|
||||
else
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (i * 16) + 1, sTextColors[1], 0, sMapLandmarks[i].name);
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (i * 16) + 1, sTextColors[1], 0, sMapLandmarks[i].name);
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, FONT_NORMAL, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
|
||||
|
||||
for (i = 0; i < MAP_WINDOW_COUNT; i++)
|
||||
CopyWindowToVram(i, 3);
|
||||
@ -1743,8 +1743,8 @@ static void HandleFrontierMapCursorMove(u8 direction)
|
||||
sMapData->cursorPos = (oldCursorPos + 1) % NUM_FRONTIER_FACILITIES;
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (oldCursorPos * 16) + 1, sTextColors[1], 0, sMapLandmarks[oldCursorPos].name);
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (sMapData->cursorPos * 16) + 1, sTextColors[2], 0, sMapLandmarks[sMapData->cursorPos].name);
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (oldCursorPos * 16) + 1, sTextColors[1], 0, sMapLandmarks[oldCursorPos].name);
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (sMapData->cursorPos * 16) + 1, sTextColors[2], 0, sMapLandmarks[sMapData->cursorPos].name);
|
||||
|
||||
sMapData->cursorSprite->y = (sMapData->cursorPos * 16) + 8;
|
||||
|
||||
@ -1752,7 +1752,7 @@ static void HandleFrontierMapCursorMove(u8 direction)
|
||||
sMapData->mapIndicatorSprite->x = sMapLandmarks[sMapData->cursorPos].x;
|
||||
sMapData->mapIndicatorSprite->y = sMapLandmarks[sMapData->cursorPos].y;
|
||||
FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
|
||||
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, FONT_NORMAL, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
|
||||
|
||||
for (i = 0; i < MAP_WINDOW_COUNT; i++)
|
||||
CopyWindowToVram(i, 3);
|
||||
|
@ -958,9 +958,9 @@ static bool8 IsWinStreakActive(u32 challenge)
|
||||
|
||||
static void PrintAligned(const u8 *str, s32 y)
|
||||
{
|
||||
s32 x = GetStringCenterAlignXOffset(1, str, 224);
|
||||
s32 x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 224);
|
||||
y = (y * 8) + 1;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void PrintHyphens(s32 y)
|
||||
@ -973,18 +973,18 @@ static void PrintHyphens(s32 y)
|
||||
text[i] = EOS;
|
||||
|
||||
y = (y * 8) + 1;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, text, 4, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, 4, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
// Battle Tower records.
|
||||
static void TowerPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
if (num > MAX_STREAK)
|
||||
num = MAX_STREAK;
|
||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
PrintAligned(gStringVar4, 2);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
||||
PrintHyphens(10);
|
||||
TowerPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 132, 49);
|
||||
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)
|
||||
{
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str1, x1, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL);
|
||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, str2);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
PrintAligned(gStringVar4, 0);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
PrintHyphens(10);
|
||||
DomePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 64, 121, 33);
|
||||
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.
|
||||
static void PalacePrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
if (num > MAX_STREAK)
|
||||
num = MAX_STREAK;
|
||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
PrintAligned(gStringVar4, 2);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
||||
PrintHyphens(10);
|
||||
PalacePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 131, 49);
|
||||
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)
|
||||
{
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str1, x1, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL);
|
||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, str2);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void PikePrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
@ -1251,8 +1251,8 @@ static void ShowPikeResultsWindow(void)
|
||||
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
||||
StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults);
|
||||
PrintAligned(gStringVar4, 0);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
PrintHyphens(10);
|
||||
PikePrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 114, 33);
|
||||
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.
|
||||
static void ArenaPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
if (num > MAX_STREAK)
|
||||
num = MAX_STREAK;
|
||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_KOsInARow);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void ArenaPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
@ -1314,8 +1314,8 @@ static void ShowArenaResultsWindow(void)
|
||||
PrintHyphens(10);
|
||||
StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults);
|
||||
PrintAligned(gStringVar4, 2);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL);
|
||||
ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 72, 126, 49);
|
||||
ArenaPrintRecordStreak(FRONTIER_LVL_50, 72, 126, 65);
|
||||
ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_OPEN, 72, 126, 97);
|
||||
@ -1327,16 +1327,16 @@ static void ShowArenaResultsWindow(void)
|
||||
// Battle Factory records.
|
||||
static void FactoryPrintStreak(const u8 *str, u16 num1, u16 num2, u8 x1, u8 x2, u8 x3, u8 y)
|
||||
{
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
if (num1 > MAX_STREAK)
|
||||
num1 = MAX_STREAK;
|
||||
ConvertIntToDecimalStringN(gStringVar1, num1, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_WinStreak);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, num2, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_TimesVar1);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x3, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x3, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
PrintAligned(gStringVar4, 0);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_RentalSwap, 152, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_RentalSwap, 152, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
PrintHyphens(10);
|
||||
FactoryPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 49);
|
||||
FactoryPrintRecordStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 65);
|
||||
@ -1418,12 +1418,12 @@ static void ShowFactoryResultsWindow(u8 battleMode)
|
||||
// Battle Pyramid records.
|
||||
static void PyramidPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y)
|
||||
{
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL);
|
||||
if (num > MAX_STREAK)
|
||||
num = MAX_STREAK;
|
||||
ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_FloorsCleared);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void PyramidPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
|
||||
@ -1464,8 +1464,8 @@ static void ShowPyramidResultsWindow(void)
|
||||
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
||||
StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults);
|
||||
PrintAligned(gStringVar4, 2);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL);
|
||||
PrintHyphens(10);
|
||||
PyramidPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 111, 49);
|
||||
PyramidPrintRecordStreak(FRONTIER_LVL_50, 64, 111, 65);
|
||||
@ -1487,38 +1487,38 @@ static void ShowLinkContestResultsWindow(void)
|
||||
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, gText_LinkContestResults);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 1, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_1st;
|
||||
x = GetStringRightAlignXOffset(1, str, 38) + 50;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 50;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_2nd;
|
||||
x = GetStringRightAlignXOffset(1, str, 38) + 88;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 88;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_3rd;
|
||||
x = GetStringRightAlignXOffset(1, str, 38) + 126;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 126;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_4th;
|
||||
x = GetStringRightAlignXOffset(1, str, 38) + 164;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 164;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL);
|
||||
|
||||
x = 6;
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Cool, x, 41, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Beauty, x, 57, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Cute, x, 73, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Smart, x, 89, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Tough, x, 105, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cool, x, 41, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Beauty, x, 57, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cute, x, 73, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Smart, x, 89, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Tough, x, 105, TEXT_SPEED_FF, NULL);
|
||||
|
||||
for (i = 0; i < CONTEST_CATEGORIES_COUNT; i++)
|
||||
{
|
||||
for (j = 0; j < CONTESTANT_COUNT; j++)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar4, gSaveBlock2Ptr->contestLinkResults[i][j], STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2224,18 +2224,18 @@ static void Print1PRecord(s32 position, s32 x, s32 y, struct RankingHall1P *hall
|
||||
u8 text[32];
|
||||
u16 winStreak;
|
||||
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, 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_SPEED_FF, NULL);
|
||||
hallRecord->name[PLAYER_NAME_LENGTH] = EOS;
|
||||
if (hallRecord->winStreak)
|
||||
{
|
||||
TVShowConvertInternationalString(text, hallRecord->name, hallRecord->language);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, 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_SPEED_FF, NULL);
|
||||
winStreak = hallRecord->winStreak;
|
||||
if (winStreak > MAX_STREAK)
|
||||
winStreak = MAX_STREAK;
|
||||
ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[hallFacilityId]);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, GetStringRightAlignXOffset(1, 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_SPEED_FF, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2244,25 +2244,25 @@ static void Print2PRecord(s32 position, s32 x, s32 y, struct RankingHall2P *hall
|
||||
u8 text[32];
|
||||
u16 winStreak;
|
||||
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, 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_SPEED_FF, NULL);
|
||||
if (hallRecord->winStreak)
|
||||
{
|
||||
hallRecord->name1[PLAYER_NAME_LENGTH] = EOS;
|
||||
hallRecord->name2[PLAYER_NAME_LENGTH] = EOS;
|
||||
TVShowConvertInternationalString(text, hallRecord->name1, hallRecord->language);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, 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_SPEED_FF, NULL);
|
||||
if (IsStringJapanese(hallRecord->name2))
|
||||
TVShowConvertInternationalString(text, hallRecord->name2, LANGUAGE_JAPANESE);
|
||||
else
|
||||
StringCopy(text, hallRecord->name2);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, 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_SPEED_FF, NULL);
|
||||
|
||||
winStreak = hallRecord->winStreak;
|
||||
if (winStreak > MAX_STREAK)
|
||||
winStreak = MAX_STREAK;
|
||||
ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK]);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, GetStringRightAlignXOffset(1, 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_SPEED_FF, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2343,9 +2343,9 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode)
|
||||
|
||||
StringCopy(gStringVar1, sRecordsWindowChallengeTexts[hallFacilityId][0]);
|
||||
StringExpandPlaceholders(gStringVar4, sRecordsWindowChallengeTexts[hallFacilityId][1]);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(1, sLevelModeText[lvlMode], 0xD0);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, 1, sLevelModeText[lvlMode], x, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, sLevelModeText[lvlMode], 0xD0);
|
||||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sLevelModeText[lvlMode], x, 1, TEXT_SPEED_FF, NULL);
|
||||
if (hallFacilityId == RANKING_HALL_TOWER_LINK)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.opponentNames[0][PLAYER_NAME_LENGTH] = EOS;
|
||||
|
@ -514,7 +514,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
|
||||
*lastSavedTeam = *sHofMonPtr;
|
||||
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_Hof_TrySaveData;
|
||||
}
|
||||
@ -724,7 +724,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId)
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
|
||||
HallOfFame_PrintPlayerInfo(1, 2);
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized2(0, 1, gText_LeagueChamp, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_LeagueChamp, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_Hof_ExitOnKeyPressed;
|
||||
}
|
||||
@ -1093,7 +1093,7 @@ static void Task_HofPC_PrintDataIsCorrupted(u8 taskId)
|
||||
{
|
||||
sub_8198180(gText_AButtonExit, 8, TRUE);
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized2(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_HOFCorrupted, 0, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_HofPC_ExitOnButtonPress;
|
||||
}
|
||||
@ -1114,7 +1114,7 @@ static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2)
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||
PutWindowTilemap(0);
|
||||
AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sMonInfoTextColors, 0, gText_WelcomeToHOF);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, GetStringCenterAlignXOffset(FONT_NORMAL, gText_WelcomeToHOF, 0xD0), 1, sMonInfoTextColors, 0, gText_WelcomeToHOF);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
@ -1150,7 +1150,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
||||
*(stringPtr)++ = CHAR_QUESTION_MARK;
|
||||
}
|
||||
stringPtr[0] = EOS;
|
||||
AddTextPrinterParameterized3(0, 1, 0x10, 1, sMonInfoTextColors, -1, text);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x10, 1, sMonInfoTextColors, -1, text);
|
||||
}
|
||||
|
||||
// nick, species names, gender and level
|
||||
@ -1158,14 +1158,14 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
||||
text[POKEMON_NAME_LENGTH] = EOS;
|
||||
if (currMon->species == SPECIES_EGG)
|
||||
{
|
||||
width = GetStringCenterAlignXOffset(1, text, 0xD0);
|
||||
AddTextPrinterParameterized3(0, 1, width, 1, sMonInfoTextColors, -1, text);
|
||||
width = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0xD0);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = GetStringRightAlignXOffset(1, text, 0x80);
|
||||
AddTextPrinterParameterized3(0, 1, width, 1, sMonInfoTextColors, -1, text);
|
||||
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x80);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text);
|
||||
|
||||
text[0] = CHAR_SLASH;
|
||||
stringPtr = StringCopy(text + 1, gSpeciesNames[currMon->species]);
|
||||
@ -1186,15 +1186,15 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
||||
}
|
||||
|
||||
stringPtr[0] = EOS;
|
||||
AddTextPrinterParameterized3(0, 1, 0x80, 1, sMonInfoTextColors, -1, text);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x80, 1, sMonInfoTextColors, -1, text);
|
||||
|
||||
stringPtr = StringCopy(text, gText_Level);
|
||||
ConvertIntToDecimalStringN(stringPtr, currMon->lvl, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
AddTextPrinterParameterized3(0, 1, 0x24, 0x11, sMonInfoTextColors, -1, text);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x24, 0x11, sMonInfoTextColors, -1, text);
|
||||
|
||||
stringPtr = StringCopy(text, gText_IDNumber);
|
||||
ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5);
|
||||
AddTextPrinterParameterized3(0, 1, 0x68, 0x11, sMonInfoTextColors, -1, text);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0x68, 0x11, sMonInfoTextColors, -1, text);
|
||||
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
@ -1209,23 +1209,23 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||
PutWindowTilemap(1);
|
||||
DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD);
|
||||
AddTextPrinterParameterized3(1, 1, 0, 1, sPlayerInfoTextColors, -1, gText_Name);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sPlayerInfoTextColors, -1, gText_Name);
|
||||
|
||||
width = GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 0x70);
|
||||
AddTextPrinterParameterized3(1, 1, width, 1, sPlayerInfoTextColors, -1, gSaveBlock2Ptr->playerName);
|
||||
width = GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 0x70);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 1, sPlayerInfoTextColors, -1, gSaveBlock2Ptr->playerName);
|
||||
|
||||
trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) | (gSaveBlock2Ptr->playerTrainerId[1] << 8);
|
||||
AddTextPrinterParameterized3(1, 1, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber);
|
||||
text[0] = (trainerId % 100000) / 10000 + CHAR_0;
|
||||
text[1] = (trainerId % 10000) / 1000 + CHAR_0;
|
||||
text[2] = (trainerId % 1000) / 100 + CHAR_0;
|
||||
text[3] = (trainerId % 100) / 10 + CHAR_0;
|
||||
text[4] = (trainerId % 10) / 1 + CHAR_0;
|
||||
text[5] = EOS;
|
||||
width = GetStringRightAlignXOffset(1, text, 0x70);
|
||||
AddTextPrinterParameterized3(1, 1, width, 0x11, sPlayerInfoTextColors, -1, text);
|
||||
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x11, sPlayerInfoTextColors, -1, text);
|
||||
|
||||
AddTextPrinterParameterized3(1, 1, 0, 0x21, sPlayerInfoTextColors, -1, gText_Time);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x21, sPlayerInfoTextColors, -1, gText_Time);
|
||||
text[0] = (gSaveBlock2Ptr->playTimeHours / 100) + CHAR_0;
|
||||
text[1] = (gSaveBlock2Ptr->playTimeHours % 100) / 10 + CHAR_0;
|
||||
text[2] = (gSaveBlock2Ptr->playTimeHours % 10) + CHAR_0;
|
||||
@ -1240,8 +1240,8 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
|
||||
text[5] = (gSaveBlock2Ptr->playTimeMinutes % 10) + CHAR_0;
|
||||
text[6] = EOS;
|
||||
|
||||
width = GetStringRightAlignXOffset(1, text, 0x70);
|
||||
AddTextPrinterParameterized3(1, 1, width, 0x21, sPlayerInfoTextColors, -1, text);
|
||||
width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x21, sPlayerInfoTextColors, -1, text);
|
||||
|
||||
CopyWindowToVram(1, 3);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ int GetMaxWidthInMenuTable(const struct MenuAction *actions, int numActions)
|
||||
|
||||
for (maxWidth = 0, i = 0; i < numActions; i++)
|
||||
{
|
||||
int stringWidth = GetStringWidth(1, actions[i].text, 0);
|
||||
int stringWidth = GetStringWidth(FONT_NORMAL, actions[i].text, 0);
|
||||
if (stringWidth > maxWidth)
|
||||
maxWidth = stringWidth;
|
||||
}
|
||||
@ -54,7 +54,7 @@ int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8* a
|
||||
|
||||
for (maxWidth = 0, i = 0; i < numActions; i++)
|
||||
{
|
||||
int stringWidth = GetStringWidth(1, actions[actionIds[i]].text, 0);
|
||||
int stringWidth = GetStringWidth(FONT_NORMAL, actions[actionIds[i]].text, 0);
|
||||
if (stringWidth > maxWidth)
|
||||
maxWidth = stringWidth;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ static const struct ListMenuTemplate sItemListMenu =
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 7,
|
||||
.fontId = FONT_NARROW,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -973,16 +973,16 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y)
|
||||
// Print berry quantity
|
||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BERRY_CAPACITY_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
offset = GetStringRightAlignXOffset(7, gStringVar4, 119);
|
||||
BagMenu_Print(windowId, 7, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL);
|
||||
offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
||||
BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL);
|
||||
}
|
||||
else if (gBagPosition.pocket != KEYITEMS_POCKET && ItemId_GetImportance(itemId) == FALSE)
|
||||
{
|
||||
// Print item quantity
|
||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BAG_ITEM_CAPACITY_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
offset = GetStringRightAlignXOffset(7, gStringVar4, 119);
|
||||
BagMenu_Print(windowId, 7, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL);
|
||||
offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119);
|
||||
BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1008,7 +1008,7 @@ static void PrintItemDescription(int itemIndex)
|
||||
str = gStringVar4;
|
||||
}
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, str, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, str, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
}
|
||||
|
||||
static void BagMenu_PrintCursor(u8 listTaskId, u8 colorIndex)
|
||||
@ -1019,9 +1019,9 @@ static void BagMenu_PrintCursor(u8 listTaskId, u8 colorIndex)
|
||||
static void BagMenu_PrintCursorAtPos(u8 y, u8 colorIndex)
|
||||
{
|
||||
if (colorIndex == COLORID_NONE)
|
||||
FillWindowPixelRect(WIN_ITEM_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
|
||||
FillWindowPixelRect(WIN_ITEM_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(FONT_NORMAL, 0), GetMenuCursorDimensionByFont(FONT_NORMAL, 1));
|
||||
else
|
||||
BagMenu_Print(WIN_ITEM_LIST, 1, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIndex);
|
||||
BagMenu_Print(WIN_ITEM_LIST, FONT_NORMAL, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIndex);
|
||||
|
||||
}
|
||||
|
||||
@ -1195,7 +1195,7 @@ static void PrintItemQuantity(u8 windowId, s16 quantity)
|
||||
u8 numDigits = (gBagPosition.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS;
|
||||
ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_LEADING_ZEROS, numDigits);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 0x28), 2, 0, 0);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0x28), 2, 0, 0);
|
||||
}
|
||||
|
||||
// Prints the quantity of items to be sold and the amount that would be earned
|
||||
@ -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;
|
||||
ConvertIntToDecimalStringN(gStringVar1, numSold, STR_CONV_MODE_LEADING_ZEROS, numDigits);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, 0);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, 0);
|
||||
PrintMoneyAmount(windowId, 38, 1, moneyEarned, 0);
|
||||
}
|
||||
|
||||
@ -1438,7 +1438,7 @@ static void StartItemSwap(u8 taskId)
|
||||
CopyItemName(BagGetItemIdByPocketPosition(gBagPosition.pocket + 1, tListPosition), gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
UpdateItemMenuSwapLinePos(tListPosition);
|
||||
DestroyPocketSwitchArrowPair();
|
||||
BagMenu_PrintCursor(tListTaskId, COLORID_GRAY_CURSOR);
|
||||
@ -1653,7 +1653,7 @@ static void OpenContextMenu(u8 taskId)
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
}
|
||||
if (gBagMenu->contextMenuNumItems == 1)
|
||||
PrintContextMenuItems(BagMenu_AddWindow(ITEMWIN_1x1));
|
||||
@ -1667,13 +1667,13 @@ static void OpenContextMenu(u8 taskId)
|
||||
|
||||
static void PrintContextMenuItems(u8 windowId)
|
||||
{
|
||||
AddItemMenuActionTextPrinters(windowId, 7, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr);
|
||||
AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, gBagMenu->contextMenuNumItems, 0);
|
||||
}
|
||||
|
||||
static void PrintContextMenuItemGrid(u8 windowId, u8 columns, u8 rows)
|
||||
{
|
||||
PrintMenuActionGrid(windowId, 7, 8, 1, 56, columns, rows, sItemMenuActions, gBagMenu->contextMenuItemsPtr);
|
||||
PrintMenuActionGrid(windowId, FONT_NARROW, 8, 1, 56, columns, rows, sItemMenuActions, gBagMenu->contextMenuItemsPtr);
|
||||
InitMenuActionGrid(windowId, 56, columns, rows, 0);
|
||||
}
|
||||
|
||||
@ -1819,7 +1819,7 @@ static void ItemMenu_Toss(u8 taskId)
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
AddItemQuantityWindow(ITEMWIN_QUANTITY);
|
||||
gTasks[taskId].func = Task_ChooseHowManyToToss;
|
||||
}
|
||||
@ -1833,7 +1833,7 @@ static void AskTossItems(u8 taskId)
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_YesNo(taskId, ITEMWIN_YESNO_LOW, &sYesNoTossFunctions);
|
||||
}
|
||||
|
||||
@ -1876,7 +1876,7 @@ static void ConfirmToss(u8 taskId)
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
gTasks[taskId].func = Task_RemoveItemFromBag;
|
||||
}
|
||||
|
||||
@ -1924,7 +1924,7 @@ static void ItemMenu_Give(u8 taskId)
|
||||
RemoveContextWindow();
|
||||
if (!IsWritingMailAllowed(gSpecialVar_ItemId))
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gText_CantWriteMail, HandleErrorMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_CantWriteMail, HandleErrorMessage);
|
||||
}
|
||||
else if (!ItemId_GetImportance(gSpecialVar_ItemId))
|
||||
{
|
||||
@ -1946,14 +1946,14 @@ static void ItemMenu_Give(u8 taskId)
|
||||
|
||||
static void PrintThereIsNoPokemon(u8 taskId)
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gText_NoPokemon, HandleErrorMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_NoPokemon, HandleErrorMessage);
|
||||
}
|
||||
|
||||
static void PrintItemCantBeHeld(u8 taskId)
|
||||
{
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeld);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, HandleErrorMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, HandleErrorMessage);
|
||||
}
|
||||
|
||||
static void HandleErrorMessage(u8 taskId)
|
||||
@ -2001,13 +2001,13 @@ static void Task_ItemContext_GiveToParty(u8 taskId)
|
||||
{
|
||||
if (!IsWritingMailAllowed(gSpecialVar_ItemId))
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gText_CantWriteMail, HandleErrorMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_CantWriteMail, HandleErrorMessage);
|
||||
}
|
||||
else if (!IsHoldingItemAllowed(gSpecialVar_ItemId))
|
||||
{
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeldHere);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, HandleErrorMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, HandleErrorMessage);
|
||||
}
|
||||
else if (gBagPosition.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId))
|
||||
{
|
||||
@ -2023,7 +2023,7 @@ static void Task_ItemContext_GiveToParty(u8 taskId)
|
||||
static void Task_ItemContext_GiveToPC(u8 taskId)
|
||||
{
|
||||
if (ItemIsMail(gSpecialVar_ItemId) == TRUE)
|
||||
DisplayItemMessage(taskId, 1, gText_CantWriteMail, HandleErrorMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_CantWriteMail, HandleErrorMessage);
|
||||
else if (gBagPosition.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId))
|
||||
gTasks[taskId].func = Task_FadeAndCloseBagMenu;
|
||||
else
|
||||
@ -2072,7 +2072,7 @@ static void Task_ItemContext_Sell(u8 taskId)
|
||||
{
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_CantBuyKeyItem);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2086,7 +2086,7 @@ static void Task_ItemContext_Sell(u8 taskId)
|
||||
{
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_HowManyToSell);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, InitSellHowManyInput);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, InitSellHowManyInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2097,7 +2097,7 @@ static void DisplaySellItemPriceAndConfirm(u8 taskId)
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ICanPayVar1);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, AskSellItems);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, AskSellItems);
|
||||
}
|
||||
|
||||
static void AskSellItems(u8 taskId)
|
||||
@ -2157,7 +2157,7 @@ static void ConfirmSell(u8 taskId)
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||
ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
StringExpandPlaceholders(gStringVar4, gText_TurnedOverVar1ForVar2);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, SellItem);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, SellItem);
|
||||
}
|
||||
|
||||
static void SellItem(u8 taskId)
|
||||
@ -2203,7 +2203,7 @@ static void Task_ItemContext_Deposit(u8 taskId)
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1);
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
AddItemQuantityWindow(ITEMWIN_QUANTITY);
|
||||
gTasks[taskId].func = Task_ChooseHowManyToDeposit;
|
||||
}
|
||||
@ -2241,7 +2241,7 @@ static void TryDepositItem(u8 taskId)
|
||||
if (ItemId_GetImportance(gSpecialVar_ItemId))
|
||||
{
|
||||
// Can't deposit important items
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
gTasks[taskId].func = WaitDepositErrorMessage;
|
||||
}
|
||||
else if (AddPCItem(gSpecialVar_ItemId, tItemCount) == TRUE)
|
||||
@ -2250,13 +2250,13 @@ static void TryDepositItem(u8 taskId)
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_DepositedVar2Var1s);
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
gTasks[taskId].func = Task_RemoveItemFromBag;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No room to deposit
|
||||
BagMenu_Print(WIN_DESCRIPTION, 1, gText_NoRoomForItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gText_NoRoomForItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
|
||||
gTasks[taskId].func = WaitDepositErrorMessage;
|
||||
}
|
||||
}
|
||||
@ -2416,12 +2416,12 @@ static void PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2)
|
||||
window.height = 2;
|
||||
windowId = AddWindow(&window);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
|
||||
offset = GetStringCenterAlignXOffset(1, pocketName1, 0x40);
|
||||
BagMenu_Print(windowId, 1, pocketName1, offset, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME);
|
||||
offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName1, 0x40);
|
||||
BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME);
|
||||
if (pocketName2)
|
||||
{
|
||||
offset = GetStringCenterAlignXOffset(1, pocketName2, 0x40);
|
||||
BagMenu_Print(windowId, 1, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME);
|
||||
offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName2, 0x40);
|
||||
BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME);
|
||||
}
|
||||
CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer));
|
||||
RemoveWindow(windowId);
|
||||
@ -2557,7 +2557,7 @@ static void PrintTMHMMoveData(u16 itemId)
|
||||
if (itemId == ITEM_NONE)
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
BagMenu_Print(WIN_TMHM_INFO, 1, 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_SPEED_FF, COLORID_TMHM_INFO);
|
||||
CopyWindowToVram(WIN_TMHM_INFO, 2);
|
||||
}
|
||||
else
|
||||
@ -2575,7 +2575,7 @@ static void PrintTMHMMoveData(u16 itemId)
|
||||
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].power, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
text = gStringVar1;
|
||||
}
|
||||
BagMenu_Print(WIN_TMHM_INFO, 1, text, 7, 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
||||
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
||||
|
||||
// Print TMHM accuracy
|
||||
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);
|
||||
text = gStringVar1;
|
||||
}
|
||||
BagMenu_Print(WIN_TMHM_INFO, 1, text, 7, 24, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
||||
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
||||
|
||||
// Print TMHM pp
|
||||
ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
BagMenu_Print(WIN_TMHM_INFO, 1, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
||||
BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO);
|
||||
|
||||
CopyWindowToVram(WIN_TMHM_INFO, 2);
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ static void DisplayCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKeyIte
|
||||
if (!isUsingRegisteredKeyItemOnField)
|
||||
{
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_DadsAdvice, Task_CloseBattlePyramidBagMessage);
|
||||
}
|
||||
@ -651,7 +651,7 @@ void ItemUseOutOfBattle_CoinCase(u8 taskId)
|
||||
|
||||
if (!gTasks[taskId].tUsingRegisteredKeyItem)
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -666,7 +666,7 @@ void ItemUseOutOfBattle_PowderJar(u8 taskId)
|
||||
|
||||
if (!gTasks[taskId].tUsingRegisteredKeyItem)
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -782,9 +782,9 @@ void ItemUseOutOfBattle_RareCandy(u8 taskId)
|
||||
void ItemUseOutOfBattle_TMHM(u8 taskId)
|
||||
{
|
||||
if (gSpecialVar_ItemId >= ITEM_HM01_CUT)
|
||||
DisplayItemMessage(taskId, 1, gText_BootedUpHM, BootUpSoundTMHM); // HM
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_BootedUpHM, BootUpSoundTMHM); // HM
|
||||
else
|
||||
DisplayItemMessage(taskId, 1, gText_BootedUpTM, BootUpSoundTMHM); // TM
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_BootedUpTM, BootUpSoundTMHM); // TM
|
||||
}
|
||||
|
||||
static void BootUpSoundTMHM(u8 taskId)
|
||||
@ -799,7 +799,7 @@ static void Task_ShowTMHMContainedMessage(u8 taskId)
|
||||
{
|
||||
StringCopy(gStringVar1, gMoveNames[ItemIdToBattleMoveId(gSpecialVar_ItemId)]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_TMHMContainedVar1);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, UseTMHMYesNo);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, UseTMHMYesNo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -836,7 +836,7 @@ void ItemUseOutOfBattle_Repel(u8 taskId)
|
||||
if (VarGet(VAR_REPEL_STEP_COUNT) == 0)
|
||||
gTasks[taskId].func = Task_StartUseRepel;
|
||||
else if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gText_RepelEffectsLingered, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_RepelEffectsLingered, CloseItemMessage);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_RepelEffectsLingered, Task_CloseBattlePyramidBagMessage);
|
||||
}
|
||||
@ -860,7 +860,7 @@ static void Task_UseRepel(u8 taskId)
|
||||
VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId));
|
||||
RemoveUsedItem();
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gStringVar4, Task_CloseBattlePyramidBagMessage);
|
||||
}
|
||||
@ -872,7 +872,7 @@ static void Task_UsedBlackWhiteFlute(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_GLASS_FLUTE);
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gStringVar4, Task_CloseBattlePyramidBagMessage);
|
||||
}
|
||||
@ -951,7 +951,7 @@ void ItemUseInBattle_PokeBall(u8 taskId)
|
||||
}
|
||||
else if (!InBattlePyramid())
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gText_BoxFull, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_BoxFull, CloseItemMessage);
|
||||
}
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_BoxFull, Task_CloseBattlePyramidBagMessage);
|
||||
@ -975,7 +975,7 @@ static void Task_UseStatIncreaseItem(u8 taskId)
|
||||
PlaySE(SE_USE_ITEM);
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, UseStatIncreaseItem(gSpecialVar_ItemId), Task_CloseStatIncreaseMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, UseStatIncreaseItem(gSpecialVar_ItemId), Task_CloseStatIncreaseMessage);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, UseStatIncreaseItem(gSpecialVar_ItemId), Task_CloseStatIncreaseMessage);
|
||||
}
|
||||
@ -989,7 +989,7 @@ void ItemUseInBattle_StatIncrease(u8 taskId)
|
||||
if (ExecuteTableBasedItemEffect(&gPlayerParty[partyId], gSpecialVar_ItemId, partyId, 0) != FALSE)
|
||||
{
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gText_WontHaveEffect, CloseItemMessage);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gText_WontHaveEffect, CloseItemMessage);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_WontHaveEffect, Task_CloseBattlePyramidBagMessage);
|
||||
}
|
||||
@ -1041,7 +1041,7 @@ void ItemUseInBattle_Escape(u8 taskId)
|
||||
{
|
||||
RemoveUsedItem();
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, Task_FadeAndCloseBagMenu);
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, Task_FadeAndCloseBagMenu);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gStringVar4, CloseBattlePyramidBag);
|
||||
}
|
||||
|
10
src/link.c
@ -1644,8 +1644,8 @@ static void ErrorMsg_MoveCloserToPartner(void)
|
||||
LoadPalette(sWirelessLinkDisplayPal, 0, 0x20);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(0, 3, 2, 6, sTextColors, 0, gText_CommErrorEllipsis);
|
||||
AddTextPrinterParameterized3(2, 3, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner);
|
||||
AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 6, sTextColors, 0, gText_CommErrorEllipsis);
|
||||
AddTextPrinterParameterized3(2, FONT_SHORT_COPY_1, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner);
|
||||
PutWindowTilemap(0);
|
||||
PutWindowTilemap(2);
|
||||
CopyWindowToVram(0, 0);
|
||||
@ -1657,7 +1657,7 @@ static void ErrorMsg_CheckConnections(void)
|
||||
LoadBgTiles(0, sCommErrorBg_Gfx, 0x20, 0);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(1, 3, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections);
|
||||
AddTextPrinterParameterized3(1, FONT_SHORT_COPY_1, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections);
|
||||
PutWindowTilemap(1);
|
||||
PutWindowTilemap(2);
|
||||
CopyWindowToVram(1, 0);
|
||||
@ -1692,9 +1692,9 @@ static void CB2_PrintErrorMessage(void)
|
||||
break;
|
||||
case 130:
|
||||
if (gWirelessCommType == 2)
|
||||
AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnTitleScreen);
|
||||
AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnTitleScreen);
|
||||
else if (gWirelessCommType == 1)
|
||||
AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter);
|
||||
AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter);
|
||||
break;
|
||||
}
|
||||
if (gMain.state == 160)
|
||||
|
@ -692,14 +692,14 @@ static void PrintMailText(void)
|
||||
if (sMailRead->message[i][0] == EOS || sMailRead->message[i][0] == CHAR_SPACE)
|
||||
continue;
|
||||
|
||||
AddTextPrinterParameterized3(0, 1, sMailRead->layout->lines[i].xOffset + sMailRead->layout->wordsXPos, y + sMailRead->layout->wordsYPos, sTextColors, 0, sMailRead->message[i]);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, sMailRead->layout->lines[i].xOffset + sMailRead->layout->wordsXPos, y + sMailRead->layout->wordsYPos, sTextColors, 0, sMailRead->message[i]);
|
||||
y += sMailRead->layout->lines[i].height;
|
||||
}
|
||||
bufptr = StringCopy(signature, gText_FromSpace);
|
||||
StringCopy(bufptr, sMailRead->playerName);
|
||||
box_x = GetStringCenterAlignXOffset(1, signature, sMailRead->signatureWidth) + 104;
|
||||
box_x = GetStringCenterAlignXOffset(FONT_NORMAL, signature, sMailRead->signatureWidth) + 104;
|
||||
box_y = sMailRead->layout->signatureYPos + 88;
|
||||
AddTextPrinterParameterized3(0, 1, box_x, box_y, sTextColors, 0, signature);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, box_x, box_y, sTextColors, 0, signature);
|
||||
CopyWindowToVram(0, 3);
|
||||
CopyWindowToVram(1, 3);
|
||||
}
|
||||
|
@ -780,8 +780,8 @@ static void Task_DisplayMainMenu(u8 taskId)
|
||||
default:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0xA));
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0xA));
|
||||
AddTextPrinterParameterized3(0, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(1, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
AddTextPrinterParameterized3(0, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
PutWindowTilemap(0);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(0, 2);
|
||||
@ -793,9 +793,9 @@ static void Task_DisplayMainMenu(u8 taskId)
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0xA));
|
||||
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
|
||||
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
||||
AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
MainMenu_FormatSavegameText();
|
||||
PutWindowTilemap(2);
|
||||
PutWindowTilemap(3);
|
||||
@ -812,10 +812,10 @@ static void Task_DisplayMainMenu(u8 taskId)
|
||||
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
|
||||
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
||||
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
|
||||
AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift);
|
||||
AddTextPrinterParameterized3(5, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift);
|
||||
AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
MainMenu_FormatSavegameText();
|
||||
PutWindowTilemap(2);
|
||||
PutWindowTilemap(3);
|
||||
@ -836,11 +836,11 @@ static void Task_DisplayMainMenu(u8 taskId)
|
||||
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
|
||||
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
|
||||
FillWindowPixelBuffer(6, PIXEL_FILL(0xA));
|
||||
AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2);
|
||||
AddTextPrinterParameterized3(5, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryEvents);
|
||||
AddTextPrinterParameterized3(6, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
|
||||
AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
|
||||
AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2);
|
||||
AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryEvents);
|
||||
AddTextPrinterParameterized3(6, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
|
||||
MainMenu_FormatSavegameText();
|
||||
PutWindowTilemap(2);
|
||||
PutWindowTilemap(3);
|
||||
@ -2117,7 +2117,7 @@ static void NewGameBirchSpeech_SetDefaultPlayerName(u8 nameId)
|
||||
static void CreateMainMenuErrorWindow(const u8* str)
|
||||
{
|
||||
FillWindowPixelBuffer(7, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(7, 1, str, 0, 1, 2, 0);
|
||||
AddTextPrinterParameterized(7, FONT_NORMAL, str, 0, 1, 2, 0);
|
||||
PutWindowTilemap(7);
|
||||
CopyWindowToVram(7, 2);
|
||||
DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[7], MAIN_MENU_BORDER_TILE);
|
||||
@ -2136,8 +2136,8 @@ static void MainMenu_FormatSavegameText(void)
|
||||
static void MainMenu_FormatSavegamePlayer(void)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPlayer);
|
||||
AddTextPrinterParameterized3(2, 1, 0, 17, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, -1, gSaveBlock2Ptr->playerName);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 17, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, -1, gSaveBlock2Ptr->playerName);
|
||||
}
|
||||
|
||||
static void MainMenu_FormatSavegameTime(void)
|
||||
@ -2146,11 +2146,11 @@ static void MainMenu_FormatSavegameTime(void)
|
||||
u8* ptr;
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuTime);
|
||||
AddTextPrinterParameterized3(2, 1, 0x6C, 17, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 17, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
ptr = ConvertIntToDecimalStringN(str, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*ptr = 0xF0;
|
||||
ConvertIntToDecimalStringN(ptr + 1, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 17, sTextColor_MenuInfo, -1, str);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 17, sTextColor_MenuInfo, -1, str);
|
||||
}
|
||||
|
||||
static void MainMenu_FormatSavegamePokedex(void)
|
||||
@ -2165,9 +2165,9 @@ static void MainMenu_FormatSavegamePokedex(void)
|
||||
else
|
||||
dexCount = GetHoennPokedexCount(FLAG_GET_CAUGHT);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPokedex);
|
||||
AddTextPrinterParameterized3(2, 1, 0, 33, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 33, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
ConvertIntToDecimalStringN(str, dexCount, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 100), 33, sTextColor_MenuInfo, -1, str);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 100), 33, sTextColor_MenuInfo, -1, str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2183,9 +2183,9 @@ static void MainMenu_FormatSavegameBadges(void)
|
||||
badgeCount++;
|
||||
}
|
||||
StringExpandPlaceholders(gStringVar4, gText_ContinueMenuBadges);
|
||||
AddTextPrinterParameterized3(2, 1, 0x6C, 33, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 33, sTextColor_MenuInfo, -1, gStringVar4);
|
||||
ConvertIntToDecimalStringN(str, badgeCount, STR_CONV_MODE_LEADING_ZEROS, 1);
|
||||
AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 33, sTextColor_MenuInfo, -1, str);
|
||||
AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 33, sTextColor_MenuInfo, -1, str);
|
||||
}
|
||||
|
||||
static void LoadMainMenuWindowFrameTiles(u8 bgId, u16 tileOffset)
|
||||
@ -2237,9 +2237,9 @@ static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, bool8 copyToVram)
|
||||
|
||||
static void NewGameBirchSpeech_ClearWindow(u8 windowId)
|
||||
{
|
||||
u8 bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
|
||||
u8 maxCharWidth = GetFontAttribute(1, FONTATTR_MAX_LETTER_WIDTH);
|
||||
u8 maxCharHeight = GetFontAttribute(1, FONTATTR_MAX_LETTER_HEIGHT);
|
||||
u8 bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND);
|
||||
u8 maxCharWidth = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_WIDTH);
|
||||
u8 maxCharHeight = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_HEIGHT);
|
||||
u8 winWidth = GetWindowAttribute(windowId, WINDOW_WIDTH);
|
||||
u8 winHeight = GetWindowAttribute(windowId, WINDOW_HEIGHT);
|
||||
|
||||
|
@ -325,11 +325,11 @@ static void ShowMapNamePopUpWindow(void)
|
||||
}
|
||||
AddMapNamePopUpWindow();
|
||||
LoadMapNamePopUpWindowBg();
|
||||
x = GetStringCenterAlignXOffset(7, withoutPrefixPtr, 80);
|
||||
x = GetStringCenterAlignXOffset(FONT_NARROW, withoutPrefixPtr, 80);
|
||||
mapDisplayHeader[0] = EXT_CTRL_CODE_BEGIN;
|
||||
mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT;
|
||||
mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT;
|
||||
AddTextPrinterParameterized(GetMapNamePopUpWindowId(), 7, mapDisplayHeader, x, 3, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(GetMapNamePopUpWindowId(), FONT_NARROW, mapDisplayHeader, x, 3, 0xFF, NULL);
|
||||
CopyWindowToVram(GetMapNamePopUpWindowId(), 3);
|
||||
}
|
||||
|
||||
|
@ -1401,7 +1401,7 @@ static void InitMatchCallTextPrinter(int windowId, const u8 *str)
|
||||
struct TextPrinterTemplate printerTemplate;
|
||||
printerTemplate.currentChar = str;
|
||||
printerTemplate.windowId = windowId;
|
||||
printerTemplate.fontId = 1;
|
||||
printerTemplate.fontId = FONT_NORMAL;
|
||||
printerTemplate.x = 32;
|
||||
printerTemplate.y = 1;
|
||||
printerTemplate.currentX = 32;
|
||||
|
@ -447,7 +447,7 @@ static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1)
|
||||
static void DrawSongTextWindow(const u8 * str)
|
||||
{
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, str, 0, 1, 1, DisableTextPrinters);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0, 1, 1, DisableTextPrinters);
|
||||
gDisableTextPrinters = TRUE;
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
@ -1324,7 +1324,7 @@ static void StorytellerDisplayStory(u32 player)
|
||||
static void PrintStoryList(void)
|
||||
{
|
||||
s32 i;
|
||||
s32 width = GetStringWidth(1, gText_Exit, 0);
|
||||
s32 width = GetStringWidth(FONT_NORMAL, gText_Exit, 0);
|
||||
for (i = 0; i < NUM_STORYTELLER_TALES; i++)
|
||||
{
|
||||
s32 curWidth;
|
||||
@ -1332,7 +1332,7 @@ static void PrintStoryList(void)
|
||||
|
||||
if (gameStatID == 0)
|
||||
break;
|
||||
curWidth = GetStringWidth(1, GetStoryTitleByStat(gameStatID), 0);
|
||||
curWidth = GetStringWidth(FONT_NORMAL, GetStoryTitleByStat(gameStatID), 0);
|
||||
if (curWidth > width)
|
||||
width = curWidth;
|
||||
}
|
||||
@ -1343,9 +1343,9 @@ static void PrintStoryList(void)
|
||||
u16 gameStatID = sStorytellerPtr->gameStatIDs[i];
|
||||
if (gameStatID == 0)
|
||||
break;
|
||||
AddTextPrinterParameterized(sStorytellerWindowId, 1, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL);
|
||||
}
|
||||
AddTextPrinterParameterized(sStorytellerWindowId, 1, gText_Exit, 8, 16 * i + 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 0xFF, NULL);
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sStorytellerWindowId, GetFreeStorySlot() + 1, 0);
|
||||
CopyWindowToVram(sStorytellerWindowId, 3);
|
||||
}
|
||||
|
66
src/menu.c
@ -193,19 +193,19 @@ void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress)
|
||||
{
|
||||
void (*callback)(struct TextPrinterTemplate *, u16) = NULL;
|
||||
gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress;
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3);
|
||||
}
|
||||
|
||||
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress)
|
||||
{
|
||||
gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress;
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3);
|
||||
}
|
||||
|
||||
void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed)
|
||||
{
|
||||
gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress;
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, speed, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, speed, NULL, 2, 1, 3);
|
||||
}
|
||||
|
||||
void LoadMessageBoxAndBorderGfx(void)
|
||||
@ -458,7 +458,7 @@ u16 sub_81978D0(u8 colorNum)
|
||||
void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback)
|
||||
{
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, 1, GetPlayerTextSpeedDelay(), string, callback);
|
||||
DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, FONT_NORMAL, GetPlayerTextSpeedDelay(), string, callback);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
@ -545,7 +545,7 @@ void RemoveMapNamePopUpWindow(void)
|
||||
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16))
|
||||
{
|
||||
gTextFlags.canABSpeedUpPrint = a1;
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3);
|
||||
}
|
||||
|
||||
void sub_8197AE8(bool8 copyToVram)
|
||||
@ -821,9 +821,9 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram)
|
||||
{
|
||||
PutWindowTilemap(sWindowId);
|
||||
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15));
|
||||
width = GetStringWidth(0, string, 0);
|
||||
width = GetStringWidth(FONT_SMALL, string, 0);
|
||||
AddTextPrinterParameterized3(sWindowId,
|
||||
0,
|
||||
FONT_SMALL,
|
||||
0xEC - (GetWindowAttribute(sWindowId, WINDOW_TILEMAP_LEFT) * 8) - a2 - width,
|
||||
1,
|
||||
sTextColors,
|
||||
@ -857,16 +857,16 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo
|
||||
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15));
|
||||
if (string2 != NULL)
|
||||
{
|
||||
width = GetStringWidth(0, string2, 0);
|
||||
width = GetStringWidth(FONT_SMALL, string2, 0);
|
||||
AddTextPrinterParameterized3(sWindowId,
|
||||
0,
|
||||
FONT_SMALL,
|
||||
0xEC - (GetWindowAttribute(sWindowId, WINDOW_TILEMAP_LEFT) * 8) - a4 - width,
|
||||
1,
|
||||
color,
|
||||
0,
|
||||
string2);
|
||||
}
|
||||
AddTextPrinterParameterized4(sWindowId, 1, 4, 1, 0, 0, color, 0, string);
|
||||
AddTextPrinterParameterized4(sWindowId, FONT_NORMAL, 4, 1, 0, 0, color, 0, string);
|
||||
if (copyToVram)
|
||||
CopyWindowToVram(sWindowId, 3);
|
||||
}
|
||||
@ -1200,7 +1200,7 @@ void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top
|
||||
printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
|
||||
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
|
||||
|
||||
AddTextPrinter(&printer, 0xFF, NULL);
|
||||
AddTextPrinter(&printer, TEXT_SPEED_FF, NULL);
|
||||
|
||||
sub_81983AC(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos);
|
||||
}
|
||||
@ -1578,7 +1578,7 @@ u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, boo
|
||||
sMenu.minCursorPos = 0;
|
||||
sMenu.maxCursorPos = itemCount - 1;
|
||||
sMenu.windowId = windowId;
|
||||
sMenu.fontId = 1;
|
||||
sMenu.fontId = FONT_NORMAL;
|
||||
sMenu.optionHeight = 16;
|
||||
sMenu.APressMuted = APressMuted;
|
||||
|
||||
@ -1615,11 +1615,11 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions
|
||||
struct TextPrinterTemplate printer;
|
||||
|
||||
printer.windowId = windowId;
|
||||
printer.fontId = 1;
|
||||
printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW);
|
||||
printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN);
|
||||
printer.fontId = FONT_NORMAL;
|
||||
printer.fgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_SHADOW);
|
||||
printer.unk = GetFontAttribute(FONT_NORMAL, FONTATTR_UNKNOWN);
|
||||
printer.letterSpacing = 0;
|
||||
printer.lineSpacing = 0;
|
||||
printer.x = 8;
|
||||
@ -1645,15 +1645,15 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa
|
||||
|
||||
printer.currentChar = gText_YesNo;
|
||||
printer.windowId = sYesNoWindowId;
|
||||
printer.fontId = 1;
|
||||
printer.fontId = FONT_NORMAL;
|
||||
printer.x = 8;
|
||||
printer.y = 1;
|
||||
printer.currentX = printer.x;
|
||||
printer.currentY = printer.y;
|
||||
printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW);
|
||||
printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN);
|
||||
printer.fgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_SHADOW);
|
||||
printer.unk = GetFontAttribute(FONT_NORMAL, FONTATTR_UNKNOWN);
|
||||
printer.letterSpacing = 0;
|
||||
printer.lineSpacing = 0;
|
||||
|
||||
@ -1680,11 +1680,11 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M
|
||||
struct TextPrinterTemplate printer;
|
||||
|
||||
printer.windowId = windowId;
|
||||
printer.fontId = 1;
|
||||
printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW);
|
||||
printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN);
|
||||
printer.fontId = FONT_NORMAL;
|
||||
printer.fgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_SHADOW);
|
||||
printer.unk = GetFontAttribute(FONT_NORMAL, FONTATTR_UNKNOWN);
|
||||
printer.letterSpacing = 0;
|
||||
printer.lineSpacing = 0;
|
||||
|
||||
@ -1713,7 +1713,7 @@ u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initi
|
||||
sMenu.minCursorPos = 0;
|
||||
sMenu.maxCursorPos = (columns * rows) - 1;
|
||||
sMenu.windowId = windowId;
|
||||
sMenu.fontId = 1;
|
||||
sMenu.fontId = FONT_NORMAL;
|
||||
sMenu.optionWidth = optionWidth;
|
||||
sMenu.optionHeight = 16;
|
||||
sMenu.columns = columns;
|
||||
@ -1946,8 +1946,8 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const
|
||||
printer.y = top;
|
||||
printer.currentX = printer.x;
|
||||
printer.currentY = printer.y;
|
||||
printer.letterSpacing = GetFontAttribute(fontId, 2);
|
||||
printer.lineSpacing = GetFontAttribute(fontId, 3);
|
||||
printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
|
||||
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
|
||||
printer.unk = 0;
|
||||
printer.fgColor = color[1];
|
||||
printer.bgColor = color[0];
|
||||
@ -1992,9 +1992,9 @@ void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left
|
||||
printer.lineSpacing = lineSpacing;
|
||||
printer.unk = 0;
|
||||
|
||||
printer.fgColor = GetFontAttribute(fontId, 5);
|
||||
printer.bgColor = GetFontAttribute(fontId, 6);
|
||||
printer.shadowColor = GetFontAttribute(fontId, 7);
|
||||
printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND);
|
||||
printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND);
|
||||
printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW);
|
||||
|
||||
AddTextPrinter(&printer, speed, callback);
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ static const struct ListMenuTemplate sMoveRelearnerMovesListTemplate =
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -268,7 +268,7 @@ static void MailboxMenu_ItemPrintFunc(u8 windowId, u32 itemId, u8 y)
|
||||
length = StringLength(buffer);
|
||||
if (length < PLAYER_NAME_LENGTH - 1)
|
||||
ConvertInternationalString(buffer, LANGUAGE_JAPANESE);
|
||||
AddTextPrinterParameterized4(windowId, 1, 8, y, 0, 0, sPlayerNameTextColors, -1, buffer);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 8, y, 0, 0, sPlayerNameTextColors, -1, buffer);
|
||||
}
|
||||
|
||||
u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page)
|
||||
@ -296,7 +296,7 @@ u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page)
|
||||
gMultiuseListMenuTemplate.cursorShadowPal = 3;
|
||||
gMultiuseListMenuTemplate.moveCursorFunc = MailboxMenu_MoveCursorFunc;
|
||||
gMultiuseListMenuTemplate.itemPrintFunc = MailboxMenu_ItemPrintFunc;
|
||||
gMultiuseListMenuTemplate.fontId = 1;
|
||||
gMultiuseListMenuTemplate.fontId = FONT_NORMAL;
|
||||
gMultiuseListMenuTemplate.cursorKind = 0;
|
||||
gMultiuseListMenuTemplate.lettersSpacing = 0;
|
||||
gMultiuseListMenuTemplate.itemVerticalPadding = 0;
|
||||
@ -739,19 +739,19 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
||||
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
str = gText_MoveRelearnerBattleMoves;
|
||||
x = GetStringCenterAlignXOffset(1, str, 0x80);
|
||||
AddTextPrinterParameterized(0, 1, str, x, 1, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_MoveRelearnerPP;
|
||||
AddTextPrinterParameterized(0, 1, str, 4, 0x29, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x29, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_MoveRelearnerPower;
|
||||
x = GetStringRightAlignXOffset(1, str, 0x6A);
|
||||
AddTextPrinterParameterized(0, 1, str, x, 0x19, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_MoveRelearnerAccuracy;
|
||||
x = GetStringRightAlignXOffset(1, str, 0x6A);
|
||||
AddTextPrinterParameterized(0, 1, str, x, 0x29, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL);
|
||||
if (chosenMove == LIST_CANCEL)
|
||||
{
|
||||
CopyWindowToVram(0, 2);
|
||||
@ -759,11 +759,11 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
||||
}
|
||||
move = &gBattleMoves[chosenMove];
|
||||
str = gTypeNames[move->type];
|
||||
AddTextPrinterParameterized(0, 1, str, 4, 0x19, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL);
|
||||
|
||||
x = 4 + GetStringWidth(1, gText_MoveRelearnerPP, 0);
|
||||
x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0);
|
||||
ConvertIntToDecimalStringN(buffer, move->pp, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
AddTextPrinterParameterized(0, 1, buffer, x, 0x29, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, buffer, x, 0x29, TEXT_SPEED_FF, NULL);
|
||||
|
||||
if (move->power < 2)
|
||||
{
|
||||
@ -774,7 +774,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
||||
ConvertIntToDecimalStringN(buffer, move->power, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
str = buffer;
|
||||
}
|
||||
AddTextPrinterParameterized(0, 1, str, 0x6A, 0x19, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x19, TEXT_SPEED_FF, NULL);
|
||||
|
||||
if (move->accuracy == 0)
|
||||
{
|
||||
@ -785,10 +785,10 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove)
|
||||
ConvertIntToDecimalStringN(buffer, move->accuracy, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
str = buffer;
|
||||
}
|
||||
AddTextPrinterParameterized(0, 1, str, 0x6A, 0x29, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gMoveDescriptionPointers[chosenMove - 1];
|
||||
AddTextPrinterParameterized(0, 7, str, 0, 0x41, 0, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL);
|
||||
}
|
||||
|
||||
static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove)
|
||||
@ -800,16 +800,16 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove)
|
||||
MoveRelearnerShowHideHearts(chosenMove);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||
str = gText_MoveRelearnerContestMovesTitle;
|
||||
x = GetStringCenterAlignXOffset(1, str, 0x80);
|
||||
AddTextPrinterParameterized(1, 1, str, x, 1, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_MoveRelearnerAppeal;
|
||||
x = GetStringRightAlignXOffset(1, str, 0x5C);
|
||||
AddTextPrinterParameterized(1, 1, str, x, 0x19, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gText_MoveRelearnerJam;
|
||||
x = GetStringRightAlignXOffset(1, str, 0x5C);
|
||||
AddTextPrinterParameterized(1, 1, str, x, 0x29, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL);
|
||||
|
||||
if (chosenMove == MENU_NOTHING_CHOSEN)
|
||||
{
|
||||
@ -819,10 +819,10 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove)
|
||||
|
||||
move = &gContestMoves[chosenMove];
|
||||
str = gContestMoveTypeTextPointers[move->contestCategory];
|
||||
AddTextPrinterParameterized(1, 1, str, 4, 0x19, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL);
|
||||
|
||||
str = gContestEffectDescriptionPointers[move->effect];
|
||||
AddTextPrinterParameterized(1, 7, str, 0, 0x41, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SPEED_FF, NULL);
|
||||
|
||||
CopyWindowToVram(1, 2);
|
||||
}
|
||||
@ -842,7 +842,7 @@ void MoveRelearnerPrintText(u8 *str)
|
||||
FillWindowPixelBuffer(3, PIXEL_FILL(1));
|
||||
gTextFlags.canABSpeedUpPrint = TRUE;
|
||||
speed = GetPlayerTextSpeedDelay();
|
||||
AddTextPrinterParameterized2(3, 1, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, 3);
|
||||
AddTextPrinterParameterized2(3, FONT_NORMAL, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, 3);
|
||||
}
|
||||
|
||||
bool16 MoveRelearnerRunTextPrinters(void)
|
||||
@ -1512,7 +1512,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
||||
{
|
||||
|
||||
AddTextPrinterParameterized3(windowId,
|
||||
1,
|
||||
FONT_NORMAL,
|
||||
0,
|
||||
15 * i,
|
||||
color,
|
||||
@ -1521,7 +1521,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
||||
|
||||
StringCopy(text, (statsDiff[i] >= 0) ? gText_Plus : gText_Dash);
|
||||
AddTextPrinterParameterized3(windowId,
|
||||
1,
|
||||
FONT_NORMAL,
|
||||
56,
|
||||
15 * i,
|
||||
color,
|
||||
@ -1534,7 +1534,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
||||
|
||||
ConvertIntToDecimalStringN(text, abs(statsDiff[i]), STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
AddTextPrinterParameterized3(windowId,
|
||||
1,
|
||||
FONT_NORMAL,
|
||||
56 + x,
|
||||
15 * i,
|
||||
color,
|
||||
@ -1576,7 +1576,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s
|
||||
x = 6 * (4 - numDigits);
|
||||
|
||||
AddTextPrinterParameterized3(windowId,
|
||||
1,
|
||||
FONT_NORMAL,
|
||||
0,
|
||||
15 * i,
|
||||
color,
|
||||
@ -1584,7 +1584,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s
|
||||
sLvlUpStatStrings[i]);
|
||||
|
||||
AddTextPrinterParameterized3(windowId,
|
||||
1,
|
||||
FONT_NORMAL,
|
||||
56 + x,
|
||||
15 * i,
|
||||
color,
|
||||
|
@ -149,7 +149,7 @@ void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed)
|
||||
*(txtPtr++) = 0x77;
|
||||
|
||||
StringExpandPlaceholders(txtPtr, gText_PokedollarVar1);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, speed, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, speed, NULL);
|
||||
}
|
||||
|
||||
void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount)
|
||||
|
@ -766,7 +766,7 @@ static void HideHeartSpritesAndShowTeachMoveText(bool8 onlyHideSprites)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
||||
FillWindowPixelBuffer(3, 0x11);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(3, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -836,7 +836,7 @@ static void ShowTeachMoveText(bool8 shouldDoNothingInstead)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
|
||||
FillWindowPixelBuffer(3, 0x11);
|
||||
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(3, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,5 +315,5 @@ static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 sp
|
||||
textColor[2] = 3;
|
||||
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(textColor[0]));
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, lineSpacing, textColor, speed, text);
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = {
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -280,7 +280,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSendToss = {
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -301,7 +301,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveToss = {
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -322,7 +322,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSend = {
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -343,7 +343,7 @@ static const struct ListMenuTemplate sListMenu_Receive = {
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
@ -490,8 +490,8 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel)
|
||||
options = gJPText_DecideStop;
|
||||
}
|
||||
|
||||
AddTextPrinterParameterized4(0, 1, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header);
|
||||
AddTextPrinterParameterized4(0, 0, GetStringRightAlignXOffset(0, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options);
|
||||
AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header);
|
||||
AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options);
|
||||
CopyWindowToVram(0, 2);
|
||||
PutWindowTilemap(0);
|
||||
}
|
||||
@ -537,7 +537,7 @@ void AddTextPrinterToWindow1(const u8 *str)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
FillWindowPixelBuffer(1, 0x11);
|
||||
AddTextPrinterParameterized4(1, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4);
|
||||
AddTextPrinterParameterized4(1, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4);
|
||||
DrawTextBorderOuter(1, 0x001, 0xF);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(1, 3);
|
||||
@ -669,7 +669,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c
|
||||
else
|
||||
*windowId = AddWindow(&sWindowTemplate_YesNoMsg);
|
||||
FillWindowPixelBuffer(*windowId, 0x11);
|
||||
AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4);
|
||||
AddTextPrinterParameterized4(*windowId, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4);
|
||||
DrawTextBorderOuter(*windowId, 0x001, 0x0F);
|
||||
CopyWindowToVram(*windowId, 2);
|
||||
PutWindowTilemap(*windowId);
|
||||
@ -726,7 +726,7 @@ static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotTos
|
||||
StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithNews);
|
||||
*windowId = AddWindow(&sWindowTemplate_GiftSelect);
|
||||
FillWindowPixelBuffer(*windowId, 0x11);
|
||||
AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4);
|
||||
AddTextPrinterParameterized4(*windowId, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4);
|
||||
DrawTextBorderOuter(*windowId, 0x001, 0x0F);
|
||||
CopyWindowToVram(*windowId, 2);
|
||||
PutWindowTilemap(*windowId);
|
||||
|
@ -424,25 +424,25 @@ static void DrawCardWindow(u8 whichWindow)
|
||||
{
|
||||
// Print card title/subtitle
|
||||
s32 x;
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 1, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->titleText);
|
||||
x = 160 - GetStringWidth(3, sWonderCardData->subtitleText, GetFontAttribute(3, FONTATTR_LETTER_SPACING));
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0, 1, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->titleText);
|
||||
x = 160 - GetStringWidth(FONT_SHORT_COPY_1, sWonderCardData->subtitleText, GetFontAttribute(FONT_SHORT_COPY_1, FONTATTR_LETTER_SPACING));
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(windowId, 3, x, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->subtitleText);
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, x, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->subtitleText);
|
||||
|
||||
// Print id number
|
||||
if (sWonderCardData->card.idNumber != 0)
|
||||
AddTextPrinterParameterized3(windowId, 1, 166, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->idNumberText);
|
||||
AddTextPrinterParameterized3(windowId, FONT_NORMAL, 166, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->idNumberText);
|
||||
break;
|
||||
}
|
||||
case CARD_WIN_BODY:
|
||||
// Print body text
|
||||
for (; i < WONDER_CARD_BODY_TEXT_LINES; i++)
|
||||
AddTextPrinterParameterized3(windowId, 3, 0, 16 * i + 2, sCard_TextColorTable[sWonderCardData->gfx->bodyTextPal], 0, sWonderCardData->bodyText[i]);
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0, 16 * i + 2, sCard_TextColorTable[sWonderCardData->gfx->bodyTextPal], 0, sWonderCardData->bodyText[i]);
|
||||
break;
|
||||
case CARD_WIN_FOOTER:
|
||||
// Print footer line 1
|
||||
AddTextPrinterParameterized3(windowId, 3, 0,
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0,
|
||||
sCard_FooterTextOffsets[sWonderCardData->card.type],
|
||||
sCard_TextColorTable[sWonderCardData->gfx->footerTextPal],
|
||||
0, sWonderCardData->footerLine1Text);
|
||||
@ -452,7 +452,7 @@ static void DrawCardWindow(u8 whichWindow)
|
||||
{
|
||||
// Print gift text
|
||||
// Odd that CARD_TYPE_STAMP is not ignored, it has empty text for this
|
||||
AddTextPrinterParameterized3(windowId, 3, 0,
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0,
|
||||
16 + sCard_FooterTextOffsets[sWonderCardData->card.type],
|
||||
sCard_TextColorTable[sWonderCardData->gfx->footerTextPal],
|
||||
0, sWonderCardData->giftText);
|
||||
@ -461,19 +461,19 @@ static void DrawCardWindow(u8 whichWindow)
|
||||
{
|
||||
s32 x = 0;
|
||||
s32 y = sCard_FooterTextOffsets[sWonderCardData->card.type] + 16;
|
||||
s32 spacing = GetFontAttribute(3, FONTATTR_LETTER_SPACING);
|
||||
s32 spacing = GetFontAttribute(FONT_SHORT_COPY_1, FONTATTR_LETTER_SPACING);
|
||||
for (; i < sWonderCardData->statFooterWidth; i++)
|
||||
{
|
||||
// Print stat text
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y, sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->statTextData[i].statText);
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, x, y, sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->statTextData[i].statText);
|
||||
if (sWonderCardData->statTextData[i].statNumberText[0] != EOS)
|
||||
{
|
||||
// Print stat number
|
||||
x += GetStringWidth(3, sWonderCardData->statTextData[i].statText, spacing);
|
||||
AddTextPrinterParameterized3(windowId, 3, x, y,
|
||||
x += GetStringWidth(FONT_SHORT_COPY_1, sWonderCardData->statTextData[i].statText, spacing);
|
||||
AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, x, y,
|
||||
sCard_TextColorTable[sWonderCardData->gfx->footerTextPal],
|
||||
0, sWonderCardData->statTextData[i].statNumberText);
|
||||
x += GetStringWidth(3, sWonderCardData->statTextData[i].statNumberText, spacing) + sWonderCardData->statTextData[i].width;
|
||||
x += GetStringWidth(FONT_SHORT_COPY_1, sWonderCardData->statTextData[i].statNumberText, spacing) + sWonderCardData->statTextData[i].width;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -893,14 +893,14 @@ static void DrawNewsWindows(void)
|
||||
FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_BODY], 0);
|
||||
|
||||
// Print title text
|
||||
x = (224 - GetStringWidth(3, sWonderNewsData->titleText, GetFontAttribute(3, FONTATTR_LETTER_SPACING))) / 2;
|
||||
x = (224 - GetStringWidth(FONT_SHORT_COPY_1, sWonderNewsData->titleText, GetFontAttribute(FONT_SHORT_COPY_1, FONTATTR_LETTER_SPACING))) / 2;
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], 3, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText);
|
||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], FONT_SHORT_COPY_1, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText);
|
||||
|
||||
// Print body text
|
||||
for (; i < WONDER_NEWS_BODY_TEXT_LINES; i++)
|
||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], 3, 0,
|
||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], FONT_SHORT_COPY_1, 0,
|
||||
16 * i + 2,
|
||||
sNews_TextColorTable[sWonderNewsData->gfx->bodyTextPal],
|
||||
0, sWonderNewsData->bodyText[i]);
|
||||
|
@ -740,7 +740,7 @@ static void DisplaySentToPCMessage(void)
|
||||
StringExpandPlaceholders(gStringVar4, sTransferredToPCMessages[stringToDisplay]);
|
||||
DrawDialogueFrame(0, 0);
|
||||
gTextFlags.canABSpeedUpPrint = TRUE;
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
@ -1714,7 +1714,7 @@ static void HandleDpadMovement(struct Task *task)
|
||||
static void DrawNormalTextEntryBox(void)
|
||||
{
|
||||
FillWindowPixelBuffer(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], 1, sNamingScreen->template->title, 8, 1, 0, 0);
|
||||
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], FONT_NORMAL, sNamingScreen->template->title, 8, 1, 0, 0);
|
||||
PutWindowTilemap(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX]);
|
||||
}
|
||||
|
||||
@ -1725,7 +1725,7 @@ static void DrawMonTextEntryBox(void)
|
||||
StringCopy(buffer, gSpeciesNames[sNamingScreen->monSpecies]);
|
||||
StringAppendN(buffer, sNamingScreen->template->title, 15);
|
||||
FillWindowPixelBuffer(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], 1, buffer, 8, 1, 0, 0);
|
||||
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], FONT_NORMAL, buffer, 8, 1, 0, 0);
|
||||
PutWindowTilemap(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX]);
|
||||
}
|
||||
|
||||
@ -1781,7 +1781,7 @@ static void DrawGenderIcon(void)
|
||||
StringCopy(text, gText_FemaleSymbol);
|
||||
isFemale = TRUE;
|
||||
}
|
||||
AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], 1, 0x68, 1, sGenderColors[isFemale], -1, text);
|
||||
AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, 0x68, 1, sGenderColors[isFemale], -1, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1921,7 +1921,7 @@ static void DrawTextEntry(void)
|
||||
temp[1] = gText_ExpandedPlaceholder_Empty[0];
|
||||
extraWidth = (IsWideLetter(temp[0]) == TRUE) ? 2 : 0;
|
||||
|
||||
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], 1, temp, i * 8 + x + extraWidth, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, temp, i * 8 + x + extraWidth, 1, 0xFF, NULL);
|
||||
}
|
||||
|
||||
TryDrawGenderIcon();
|
||||
@ -1964,7 +1964,7 @@ static void PrintKeyboardKeys(u8 window, u8 page)
|
||||
FillWindowPixelBuffer(window, sFillValues[page]);
|
||||
|
||||
for (i = 0; i < KBROW_COUNT; i++)
|
||||
AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]);
|
||||
AddTextPrinterParameterized3(window, FONT_NORMAL, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]);
|
||||
|
||||
PutWindowTilemap(window);
|
||||
}
|
||||
@ -2010,7 +2010,7 @@ static void PrintControls(void)
|
||||
const u8 color[3] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY };
|
||||
|
||||
FillWindowPixelBuffer(sNamingScreen->windows[WIN_BANNER], PIXEL_FILL(15));
|
||||
AddTextPrinterParameterized3(sNamingScreen->windows[WIN_BANNER], 0, 2, 1, color, 0, gText_MoveOkBack);
|
||||
AddTextPrinterParameterized3(sNamingScreen->windows[WIN_BANNER], FONT_SMALL, 2, 1, color, 0, gText_MoveOkBack);
|
||||
PutWindowTilemap(sNamingScreen->windows[WIN_BANNER]);
|
||||
CopyWindowToVram(sNamingScreen->windows[WIN_BANNER], 3);
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ static void DrawOptionMenuChoice(const u8 *text, u8 x, u8 y, u8 style)
|
||||
}
|
||||
|
||||
dst[i] = EOS;
|
||||
AddTextPrinterParameterized(WIN_OPTIONS, 1, dst, x, y + 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, dst, x, y + 1, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static u8 TextSpeed_ProcessInput(u8 selection)
|
||||
@ -438,15 +438,15 @@ static void TextSpeed_DrawChoices(u8 selection)
|
||||
|
||||
DrawOptionMenuChoice(gText_TextSpeedSlow, 104, YPOS_TEXTSPEED, styles[0]);
|
||||
|
||||
widthSlow = GetStringWidth(1, gText_TextSpeedSlow, 0);
|
||||
widthMid = GetStringWidth(1, gText_TextSpeedMid, 0);
|
||||
widthFast = GetStringWidth(1, gText_TextSpeedFast, 0);
|
||||
widthSlow = GetStringWidth(FONT_NORMAL, gText_TextSpeedSlow, 0);
|
||||
widthMid = GetStringWidth(FONT_NORMAL, gText_TextSpeedMid, 0);
|
||||
widthFast = GetStringWidth(FONT_NORMAL, gText_TextSpeedFast, 0);
|
||||
|
||||
widthMid -= 94;
|
||||
xMid = (widthSlow - widthMid - widthFast) / 2 + 104;
|
||||
DrawOptionMenuChoice(gText_TextSpeedMid, xMid, YPOS_TEXTSPEED, styles[1]);
|
||||
|
||||
DrawOptionMenuChoice(gText_TextSpeedFast, GetStringRightAlignXOffset(1, gText_TextSpeedFast, 198), YPOS_TEXTSPEED, styles[2]);
|
||||
DrawOptionMenuChoice(gText_TextSpeedFast, GetStringRightAlignXOffset(FONT_NORMAL, gText_TextSpeedFast, 198), YPOS_TEXTSPEED, styles[2]);
|
||||
}
|
||||
|
||||
static u8 BattleScene_ProcessInput(u8 selection)
|
||||
@ -469,7 +469,7 @@ static void BattleScene_DrawChoices(u8 selection)
|
||||
styles[selection] = 1;
|
||||
|
||||
DrawOptionMenuChoice(gText_BattleSceneOn, 104, YPOS_BATTLESCENE, styles[0]);
|
||||
DrawOptionMenuChoice(gText_BattleSceneOff, GetStringRightAlignXOffset(1, gText_BattleSceneOff, 198), YPOS_BATTLESCENE, styles[1]);
|
||||
DrawOptionMenuChoice(gText_BattleSceneOff, GetStringRightAlignXOffset(FONT_NORMAL, gText_BattleSceneOff, 198), YPOS_BATTLESCENE, styles[1]);
|
||||
}
|
||||
|
||||
static u8 BattleStyle_ProcessInput(u8 selection)
|
||||
@ -492,7 +492,7 @@ static void BattleStyle_DrawChoices(u8 selection)
|
||||
styles[selection] = 1;
|
||||
|
||||
DrawOptionMenuChoice(gText_BattleStyleShift, 104, YPOS_BATTLESTYLE, styles[0]);
|
||||
DrawOptionMenuChoice(gText_BattleStyleSet, GetStringRightAlignXOffset(1, gText_BattleStyleSet, 198), YPOS_BATTLESTYLE, styles[1]);
|
||||
DrawOptionMenuChoice(gText_BattleStyleSet, GetStringRightAlignXOffset(FONT_NORMAL, gText_BattleStyleSet, 198), YPOS_BATTLESTYLE, styles[1]);
|
||||
}
|
||||
|
||||
static u8 Sound_ProcessInput(u8 selection)
|
||||
@ -516,7 +516,7 @@ static void Sound_DrawChoices(u8 selection)
|
||||
styles[selection] = 1;
|
||||
|
||||
DrawOptionMenuChoice(gText_SoundMono, 104, YPOS_SOUND, styles[0]);
|
||||
DrawOptionMenuChoice(gText_SoundStereo, GetStringRightAlignXOffset(1, gText_SoundStereo, 198), YPOS_SOUND, styles[1]);
|
||||
DrawOptionMenuChoice(gText_SoundStereo, GetStringRightAlignXOffset(FONT_NORMAL, gText_SoundStereo, 198), YPOS_SOUND, styles[1]);
|
||||
}
|
||||
|
||||
static u8 FrameType_ProcessInput(u8 selection)
|
||||
@ -612,21 +612,21 @@ static void ButtonMode_DrawChoices(u8 selection)
|
||||
|
||||
DrawOptionMenuChoice(gText_ButtonTypeNormal, 104, YPOS_BUTTONMODE, styles[0]);
|
||||
|
||||
widthNormal = GetStringWidth(1, gText_ButtonTypeNormal, 0);
|
||||
widthLR = GetStringWidth(1, gText_ButtonTypeLR, 0);
|
||||
widthLA = GetStringWidth(1, gText_ButtonTypeLEqualsA, 0);
|
||||
widthNormal = GetStringWidth(FONT_NORMAL, gText_ButtonTypeNormal, 0);
|
||||
widthLR = GetStringWidth(FONT_NORMAL, gText_ButtonTypeLR, 0);
|
||||
widthLA = GetStringWidth(FONT_NORMAL, gText_ButtonTypeLEqualsA, 0);
|
||||
|
||||
widthLR -= 94;
|
||||
xLR = (widthNormal - widthLR - widthLA) / 2 + 104;
|
||||
DrawOptionMenuChoice(gText_ButtonTypeLR, xLR, YPOS_BUTTONMODE, styles[1]);
|
||||
|
||||
DrawOptionMenuChoice(gText_ButtonTypeLEqualsA, GetStringRightAlignXOffset(1, gText_ButtonTypeLEqualsA, 198), YPOS_BUTTONMODE, styles[2]);
|
||||
DrawOptionMenuChoice(gText_ButtonTypeLEqualsA, GetStringRightAlignXOffset(FONT_NORMAL, gText_ButtonTypeLEqualsA, 198), YPOS_BUTTONMODE, styles[2]);
|
||||
}
|
||||
|
||||
static void DrawTextOption(void)
|
||||
{
|
||||
FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_NORMAL, gText_Option, 8, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(WIN_TEXT_OPTION, 3);
|
||||
}
|
||||
|
||||
@ -637,7 +637,7 @@ static void DrawOptionMenuTexts(void)
|
||||
FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1));
|
||||
for (i = 0; i < MENUITEM_COUNT; i++)
|
||||
{
|
||||
AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
CopyWindowToVram(WIN_OPTIONS, 3);
|
||||
}
|
||||
|
@ -2035,8 +2035,8 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf)
|
||||
{
|
||||
confirmWindowId = AddWindow(&sConfirmButtonWindowTemplate);
|
||||
FillWindowPixelBuffer(confirmWindowId, PIXEL_FILL(0));
|
||||
mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48);
|
||||
AddTextPrinterParameterized4(confirmWindowId, 0, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm);
|
||||
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gMenuText_Confirm, 48);
|
||||
AddTextPrinterParameterized4(confirmWindowId, FONT_SMALL, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm);
|
||||
PutWindowTilemap(confirmWindowId);
|
||||
CopyWindowToVram(confirmWindowId, 2);
|
||||
cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate);
|
||||
@ -2052,13 +2052,13 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf)
|
||||
// Branches are functionally identical. Second branch is never reached, Spin Trade wasnt fully implemented
|
||||
if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE)
|
||||
{
|
||||
mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48);
|
||||
AddTextPrinterParameterized3(cancelWindowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel);
|
||||
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel, 48);
|
||||
AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel);
|
||||
}
|
||||
else
|
||||
{
|
||||
mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel2, 48);
|
||||
AddTextPrinterParameterized3(cancelWindowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2);
|
||||
mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel2, 48);
|
||||
AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2);
|
||||
}
|
||||
PutWindowTilemap(cancelWindowId);
|
||||
CopyWindowToVram(cancelWindowId, 2);
|
||||
@ -2205,7 +2205,7 @@ static void LoadPartyBoxPalette(struct PartyMenuBox *menuBox, u8 palFlags)
|
||||
|
||||
static void DisplayPartyPokemonBarDetail(u8 windowId, const u8 *str, u8 color, const u8 *align)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, 0, align[0], align[1], sFontColorTable[color], 0, str);
|
||||
AddTextPrinterParameterized3(windowId, FONT_SMALL, align[0], align[1], sFontColorTable[color], 0, str);
|
||||
}
|
||||
|
||||
static void DisplayPartyPokemonNickname(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c)
|
||||
@ -2366,7 +2366,7 @@ static void DisplayPartyPokemonDescriptionText(u8 stringID, struct PartyMenuBox
|
||||
menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->descTextLeft >> 3, menuBox->infoRects->descTextTop >> 3, width, height, TRUE);
|
||||
}
|
||||
if (c != 2)
|
||||
AddTextPrinterParameterized3(menuBox->windowId, 1, menuBox->infoRects->descTextLeft, menuBox->infoRects->descTextTop, sFontColorTable[0], 0, sDescriptionStringTable[stringID]);
|
||||
AddTextPrinterParameterized3(menuBox->windowId, FONT_NORMAL, menuBox->infoRects->descTextLeft, menuBox->infoRects->descTextTop, sFontColorTable[0], 0, sDescriptionStringTable[stringID]);
|
||||
}
|
||||
|
||||
static void PartyMenuRemoveWindow(u8 *ptr)
|
||||
@ -2421,7 +2421,7 @@ void DisplayPartyMenuStdMessage(u32 stringId)
|
||||
}
|
||||
DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD);
|
||||
StringExpandPlaceholders(gStringVar4, sActionStringTable[stringId]);
|
||||
AddTextPrinterParameterized(*windowPtr, 1, gStringVar4, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(*windowPtr, FONT_NORMAL, gStringVar4, 0, 1, 0, 0);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
}
|
||||
}
|
||||
@ -2449,7 +2449,7 @@ static u8 DisplaySelectionWindow(u8 windowType)
|
||||
{
|
||||
struct WindowTemplate window;
|
||||
u8 cursorDimension;
|
||||
u8 fontAttribute;
|
||||
u8 letterSpacing;
|
||||
u8 i;
|
||||
|
||||
switch (windowType)
|
||||
@ -2472,13 +2472,13 @@ static u8 DisplaySelectionWindow(u8 windowType)
|
||||
DrawStdFrameWithCustomTileAndPalette(sPartyMenuInternal->windowId[0], FALSE, 0x4F, 13);
|
||||
if (windowType == SELECTWINDOW_MOVES)
|
||||
return sPartyMenuInternal->windowId[0];
|
||||
cursorDimension = GetMenuCursorDimensionByFont(1, 0);
|
||||
fontAttribute = GetFontAttribute(1, 2);
|
||||
cursorDimension = GetMenuCursorDimensionByFont(FONT_NORMAL, 0);
|
||||
letterSpacing = GetFontAttribute(FONT_NORMAL, FONTATTR_LETTER_SPACING);
|
||||
|
||||
for (i = 0; i < sPartyMenuInternal->numActions; i++)
|
||||
{
|
||||
u8 fontColorsId = (sPartyMenuInternal->actions[i] >= MENU_FIELD_MOVES) ? 4 : 3;
|
||||
AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text);
|
||||
AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], FONT_NORMAL, cursorDimension, (i * 16) + 1, letterSpacing, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text);
|
||||
}
|
||||
|
||||
InitMenuInUpperLeftCorner(sPartyMenuInternal->windowId[0], sPartyMenuInternal->numActions, 0, 1);
|
||||
@ -2491,7 +2491,7 @@ static void PartyMenuPrintText(const u8 *text)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(6, FALSE, 0x4F, 13);
|
||||
gTextFlags.canABSpeedUpPrint = TRUE;
|
||||
AddTextPrinterParameterized2(6, 1, text, GetPlayerTextSpeedDelay(), 0, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(6, FONT_NORMAL, text, GetPlayerTextSpeedDelay(), 0, 2, 1, 3);
|
||||
}
|
||||
|
||||
static void PartyMenuDisplayYesNoMenu(void)
|
||||
@ -4498,7 +4498,7 @@ static void ShowMoveSelectWindow(u8 slot)
|
||||
{
|
||||
u8 i;
|
||||
u8 moveCount = 0;
|
||||
u8 fontId = 1;
|
||||
u8 fontId = FONT_NORMAL;
|
||||
u8 windowId = DisplaySelectionWindow(SELECTWINDOW_MOVES);
|
||||
u16 move;
|
||||
|
||||
|
@ -291,7 +291,7 @@ static const struct ListMenuTemplate sListMenuTemplate_ItemStorage =
|
||||
.lettersSpacing = FALSE,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = FALSE,
|
||||
.fontId = 7
|
||||
.fontId = FONT_NARROW
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplates_ItemStorage[ITEMPC_WIN_COUNT] =
|
||||
@ -519,7 +519,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
|
||||
static void ItemStorageMenuPrint(const u8 *textPtr)
|
||||
{
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, textPtr, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, textPtr, 0, 1, 0, 0);
|
||||
}
|
||||
|
||||
static void ItemStorageMenuProcessInput(u8 taskId)
|
||||
@ -691,7 +691,7 @@ static void Mailbox_DrawMailboxMenu(u8 taskId)
|
||||
{
|
||||
u8 windowId = MailboxMenu_AddWindow(MAILBOXWIN_TITLE);
|
||||
MailboxMenu_AddWindow(MAILBOXWIN_LIST);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_Mailbox, GetStringCenterAlignXOffset(1, gText_Mailbox, 0x40), 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Mailbox, GetStringCenterAlignXOffset(FONT_NORMAL, gText_Mailbox, 0x40), 1, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gTasks[taskId].tListTaskId = MailboxMenu_CreateList(&gPlayerPCItemPageInfo);
|
||||
MailboxMenu_AddScrollArrows(&gPlayerPCItemPageInfo);
|
||||
@ -1033,7 +1033,7 @@ static void ItemStorage_PrintMenuItem(u8 windowId, u32 id, u8 yOffset)
|
||||
}
|
||||
ConvertIntToDecimalStringN(gStringVar1, gSaveBlock1Ptr->pcItems[id].quantity, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
AddTextPrinterParameterized(windowId, 7, gStringVar4, GetStringRightAlignXOffset(7, gStringVar4, 104), yOffset, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NARROW, gStringVar4, GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 104), yOffset, 0xFF, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1049,7 +1049,7 @@ static void ItemStorage_PrintDescription(s32 id)
|
||||
description = ItemStorage_GetMessage(MSG_GO_BACK_TO_PREV);
|
||||
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, description, 0, 1, 0, NULL);
|
||||
}
|
||||
|
||||
static void ItemStorage_AddScrollIndicator(void)
|
||||
@ -1080,9 +1080,9 @@ static void ItemStorage_DrawSwapArrow(u8 y, u8 b, u8 speed)
|
||||
{
|
||||
u8 windowId = sItemStorageMenu->windowIds[ITEMPC_WIN_LIST];
|
||||
if (b == 0xFF)
|
||||
FillWindowPixelRect(windowId, PIXEL_FILL(1), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
|
||||
FillWindowPixelRect(windowId, PIXEL_FILL(1), 0, y, GetMenuCursorDimensionByFont(FONT_NORMAL, 0), GetMenuCursorDimensionByFont(FONT_NORMAL, 1));
|
||||
else
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, y, 0, 0, sSwapArrowTextColors, speed, gText_SelectorArrow2);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, y, 0, 0, sSwapArrowTextColors, speed, gText_SelectorArrow2);
|
||||
}
|
||||
|
||||
static void ItemStorage_DrawItemIcon(u16 itemId)
|
||||
@ -1142,8 +1142,8 @@ static void ItemStorage_CreateListMenu(u8 taskId)
|
||||
text = gText_TossItem;
|
||||
if (!toss)
|
||||
text = gText_WithdrawItem;
|
||||
x = GetStringCenterAlignXOffset(1, text, 104);
|
||||
AddTextPrinterParameterized(sItemStorageMenu->windowIds[ITEMPC_WIN_TITLE], 1, text, x, 1, 0, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 104);
|
||||
AddTextPrinterParameterized(sItemStorageMenu->windowIds[ITEMPC_WIN_TITLE], FONT_NORMAL, text, x, 1, 0, NULL);
|
||||
CopyWindowToVram(sItemStorageMenu->windowIds[ITEMPC_WIN_ICON], 2);
|
||||
ItemStorage_CompactList();
|
||||
ItemStorage_CompactCursor();
|
||||
@ -1199,7 +1199,7 @@ static void ItemStorage_PrintMessage(const u8 *string)
|
||||
u8 windowId = sItemStorageMenu->windowIds[ITEMPC_WIN_MESSAGE];
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
StringExpandPlaceholders(gStringVar4, string);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL);
|
||||
}
|
||||
|
||||
// Process input while on the item storage's item list
|
||||
@ -1338,7 +1338,7 @@ static void ItemStorage_PrintItemQuantity(u8 windowId, u16 value, u32 mode, u8 x
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, value, mode, n);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 48), y, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 48), y, 0, NULL);
|
||||
}
|
||||
|
||||
// Start an item Withdraw/Toss
|
||||
|
@ -443,7 +443,7 @@ static const struct ListMenuTemplate sPokeblockListMenuTemplate =
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||
.fontId = 1,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 1
|
||||
};
|
||||
|
||||
@ -696,7 +696,7 @@ static void HandleInitWindows(void)
|
||||
|
||||
static void PrintOnPokeblockWindow(u8 windowId, const u8 *string, s32 x)
|
||||
{
|
||||
AddTextPrinterParameterized4(windowId, 1, x, 1, 0, 0, sTextColor, 0, string);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, 1, 0, 0, sTextColor, 0, string);
|
||||
}
|
||||
|
||||
static void DrawPokeblockMenuTitleText(void)
|
||||
@ -704,7 +704,7 @@ static void DrawPokeblockMenuTitleText(void)
|
||||
u8 i;
|
||||
|
||||
const u8 *itemName = ItemId_GetName(ITEM_POKEBLOCK_CASE);
|
||||
PrintOnPokeblockWindow(WIN_TITLE, itemName, GetStringCenterAlignXOffset(1, itemName, 0x48));
|
||||
PrintOnPokeblockWindow(WIN_TITLE, itemName, GetStringCenterAlignXOffset(FONT_NORMAL, itemName, 0x48));
|
||||
|
||||
PrintOnPokeblockWindow(WIN_SPICY, gText_Spicy, 0);
|
||||
PrintOnPokeblockWindow(WIN_DRY, gText_Dry, 0);
|
||||
@ -732,7 +732,7 @@ static void UpdatePokeblockList(void)
|
||||
sPokeblockMenu->items[i].id = LIST_CANCEL;
|
||||
|
||||
gMultiuseListMenuTemplate = sPokeblockListMenuTemplate;
|
||||
gMultiuseListMenuTemplate.fontId = 7;
|
||||
gMultiuseListMenuTemplate.fontId = FONT_NARROW;
|
||||
gMultiuseListMenuTemplate.totalItems = sPokeblockMenu->itemsNo;
|
||||
gMultiuseListMenuTemplate.items = sPokeblockMenu->items;
|
||||
gMultiuseListMenuTemplate.maxShowed = sPokeblockMenu->maxShowed;
|
||||
@ -1208,7 +1208,7 @@ static void PokeblockAction_Toss(u8 taskId)
|
||||
ClearStdWindowAndFrameToTransparent(tWindowId, FALSE);
|
||||
StringCopy(gStringVar1, gPokeblockNames[gSaveBlock1Ptr->pokeblocks[gSpecialVar_ItemId].color]);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ThrowAwayVar1);
|
||||
DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, 1, GetPlayerTextSpeedDelay(), gStringVar4, CreateTossPokeblockYesNoMenu);
|
||||
DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, FONT_NORMAL, GetPlayerTextSpeedDelay(), gStringVar4, CreateTossPokeblockYesNoMenu);
|
||||
}
|
||||
|
||||
static void CreateTossPokeblockYesNoMenu(u8 taskId)
|
||||
@ -1219,7 +1219,7 @@ static void CreateTossPokeblockYesNoMenu(u8 taskId)
|
||||
static void TossedPokeblockMessage(u8 taskId)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1ThrownAway);
|
||||
DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, 1, GetPlayerTextSpeedDelay(), gStringVar4, TossPokeblock);
|
||||
DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, FONT_NORMAL, GetPlayerTextSpeedDelay(), gStringVar4, TossPokeblock);
|
||||
}
|
||||
|
||||
static void TossPokeblock(u8 taskId)
|
||||
|
@ -874,7 +874,7 @@ static void Task_PrintAtePokeblockMessage(u8 taskId)
|
||||
StringExpandPlaceholders(gStringVar4, gText_Var1DisdainfullyAteVar2);
|
||||
|
||||
gTextFlags.canABSpeedUpPrint = TRUE;
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3);
|
||||
gTasks[taskId].func = Task_WaitForAtePokeblockMessage;
|
||||
}
|
||||
|
||||
|
@ -2427,7 +2427,7 @@ static void CreateMonDexNum(u16 entryNum, u8 left, u8 top, u16 unused)
|
||||
text[2] = CHAR_0 + dexNum / 100;
|
||||
text[3] = CHAR_0 + (dexNum % 100) / 10;
|
||||
text[4] = CHAR_0 + (dexNum % 100) % 10;
|
||||
PrintMonDexNumAndName(0, 7, text, left, top);
|
||||
PrintMonDexNumAndName(0, FONT_NARROW, text, left, top);
|
||||
}
|
||||
|
||||
static void CreateCaughtBall(bool16 owned, u8 x, u8 y, u16 unused)
|
||||
@ -2447,7 +2447,7 @@ static u8 CreateMonName(u16 num, u8 left, u8 top)
|
||||
str = gSpeciesNames[num];
|
||||
else
|
||||
str = sText_TenDashes;
|
||||
PrintMonDexNumAndName(0, 7, str, left, top);
|
||||
PrintMonDexNumAndName(0, FONT_NARROW, str, left, top);
|
||||
return StringLength(str);
|
||||
}
|
||||
|
||||
@ -3167,7 +3167,7 @@ static void PrintInfoScreenText(const u8* str, u8 left, u8 top)
|
||||
color[1] = TEXT_DYNAMIC_COLOR_6;
|
||||
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
||||
|
||||
AddTextPrinterParameterized4(0, 1, left, top, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(0, FONT_NORMAL, left, top, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
#define tScrolling data[0]
|
||||
@ -3752,7 +3752,7 @@ static void Task_LoadSizeScreen(u8 taskId)
|
||||
|
||||
StringCopy(string, gText_SizeComparedTo);
|
||||
StringAppend(string, gSaveBlock2Ptr->playerName);
|
||||
PrintInfoScreenText(string, GetStringCenterAlignXOffset(1, string, 0xF0), 0x79);
|
||||
PrintInfoScreenText(string, GetStringCenterAlignXOffset(FONT_NORMAL, string, 0xF0), 0x79);
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
@ -4100,7 +4100,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry)
|
||||
const u8 *description;
|
||||
|
||||
if (newEntry)
|
||||
PrintInfoScreenText(gText_PokedexRegistration, GetStringCenterAlignXOffset(1, gText_PokedexRegistration, 0xF0), 0);
|
||||
PrintInfoScreenText(gText_PokedexRegistration, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PokedexRegistration, 0xF0), 0);
|
||||
if (value == 0)
|
||||
value = NationalToHoennOrder(num);
|
||||
else
|
||||
@ -4139,7 +4139,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry)
|
||||
description = gPokedexEntries[num].description;
|
||||
else
|
||||
description = gExpandedPlaceholder_PokedexDescription;
|
||||
PrintInfoScreenText(description, GetStringCenterAlignXOffset(1, description, 0xF0), 0x5F);
|
||||
PrintInfoScreenText(description, GetStringCenterAlignXOffset(FONT_NORMAL, description, 0xF0), 0x5F);
|
||||
}
|
||||
|
||||
static void PrintMonHeight(u16 height, u8 left, u8 top)
|
||||
@ -4474,7 +4474,7 @@ static void PrintInfoSubMenuText(u8 windowId, const u8 *str, u8 left, u8 top)
|
||||
color[1] = TEXT_DYNAMIC_COLOR_6;
|
||||
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
||||
|
||||
AddTextPrinterParameterized4(windowId, 1, left, top, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, left, top, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
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[1] = TEXT_DYNAMIC_COLOR_6;
|
||||
color[2] = TEXT_COLOR_DARK_GRAY;
|
||||
AddTextPrinterParameterized4(0, 1, x, y, 0, 0, color, -1, str);
|
||||
AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 0, 0, color, -1, str);
|
||||
}
|
||||
|
||||
static void ClearSearchMenuRect(u32 x, u32 y, u32 width, u32 height)
|
||||
|
@ -3313,7 +3313,7 @@ static void Msg_WantToPlayAgain(void)
|
||||
{
|
||||
case 0:
|
||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2);
|
||||
sPokemonJumpGfx->mainState++;
|
||||
break;
|
||||
@ -3340,7 +3340,7 @@ static void Msg_SavingDontTurnOff(void)
|
||||
{
|
||||
case 0:
|
||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2);
|
||||
sPokemonJumpGfx->mainState++;
|
||||
break;
|
||||
@ -3383,7 +3383,7 @@ static void Msg_SomeoneDroppedOut(void)
|
||||
{
|
||||
case 0:
|
||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2);
|
||||
sPokemonJumpGfx->mainState++;
|
||||
break;
|
||||
@ -3409,7 +3409,7 @@ static void Msg_CommunicationStandby(void)
|
||||
{
|
||||
case 0:
|
||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2);
|
||||
sPokemonJumpGfx->mainState++;
|
||||
break;
|
||||
@ -3487,7 +3487,7 @@ static void PrintPrizeMessage(u16 itemId, u16 quantity)
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, sPokemonJumpGfx->itemQuantityStr);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700);
|
||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2);
|
||||
sPokemonJumpGfx->fanfare = MUS_LEVEL_UP;
|
||||
sPokemonJumpGfx->msgWindowState = 0;
|
||||
@ -3500,7 +3500,7 @@ static void PrintPrizeFilledBagMessage(u16 itemId)
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2);
|
||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2);
|
||||
sPokemonJumpGfx->fanfare = MUS_DUMMY;
|
||||
sPokemonJumpGfx->msgWindowState = 0;
|
||||
@ -3513,7 +3513,7 @@ static void PrintNoRoomForPrizeMessage(u16 itemId)
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore);
|
||||
sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2);
|
||||
sPokemonJumpGfx->fanfare = MUS_DUMMY;
|
||||
sPokemonJumpGfx->msgWindowState = 0;
|
||||
@ -3634,8 +3634,8 @@ static void PrintScoreSuffixes(void)
|
||||
PutWindowTilemap(WIN_TIMES);
|
||||
FillWindowPixelBuffer(WIN_POINTS, 0);
|
||||
FillWindowPixelBuffer(WIN_TIMES, 0);
|
||||
AddTextPrinterParameterized3(WIN_POINTS, 0, 0, 1, color, 0, gText_SpacePoints2);
|
||||
AddTextPrinterParameterized3(WIN_TIMES, 0, 0, 1, color, 0, gText_SpaceTimes3);
|
||||
AddTextPrinterParameterized3(WIN_POINTS, FONT_SMALL, 0, 1, color, 0, gText_SpacePoints2);
|
||||
AddTextPrinterParameterized3(WIN_TIMES, FONT_SMALL, 0, 1, color, 0, gText_SpaceTimes3);
|
||||
}
|
||||
|
||||
// The venusaurs in the background are actually an empty 256x512 bg with 3 pairs of venusaurs on it.
|
||||
@ -3855,9 +3855,9 @@ static void PrintPokeJumpPlayerName(int multiplayerId, u8 bgColor, u8 fgColor, u
|
||||
u8 colors[3] = {bgColor, fgColor, shadow};
|
||||
|
||||
FillWindowPixelBuffer(sPokemonJumpGfx->nameWindowIds[multiplayerId], 0);
|
||||
x = 64 - GetStringWidth(1, GetPokeJumpPlayerName(multiplayerId), -1);
|
||||
x = 64 - GetStringWidth(FONT_NORMAL, GetPokeJumpPlayerName(multiplayerId), -1);
|
||||
x /= 2;
|
||||
AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], 1, x, 1, colors, -1, GetPokeJumpPlayerName(multiplayerId));
|
||||
AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_NORMAL, x, 1, colors, -1, GetPokeJumpPlayerName(multiplayerId));
|
||||
CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], 2);
|
||||
}
|
||||
|
||||
@ -4162,10 +4162,10 @@ static void Task_ShowPokemonJumpRecords(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
window = sWindowTemplate_Records;
|
||||
width = GetStringWidth(1, gText_PkmnJumpRecords, 0);
|
||||
width = GetStringWidth(FONT_NORMAL, gText_PkmnJumpRecords, 0);
|
||||
for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++)
|
||||
{
|
||||
widthCurr = GetStringWidth(1, sRecordsTexts[i], 0) + 38;
|
||||
widthCurr = GetStringWidth(FONT_NORMAL, sRecordsTexts[i], 0) + 38;
|
||||
if (widthCurr > width)
|
||||
width = widthCurr;
|
||||
}
|
||||
@ -4217,14 +4217,14 @@ static void PrintRecordsText(u16 windowId, int width)
|
||||
LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0);
|
||||
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(windowId, 1, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(1, gText_PkmnJumpRecords, width * 8), 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PkmnJumpRecords, width * 8), 1, TEXT_SPEED_FF, NULL);
|
||||
for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++)
|
||||
{
|
||||
AddTextPrinterParameterized(windowId, 1, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SPEED_FF, NULL);
|
||||
ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, 5);
|
||||
TruncateToFirstWordOnly(gStringVar1);
|
||||
x = (width * 8) - GetStringWidth(1, gStringVar1, 0);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar1, x, 25 + (i * 16), TEXT_SPEED_FF, NULL);
|
||||
x = (width * 8) - GetStringWidth(FONT_NORMAL, gStringVar1, 0);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, 25 + (i * 16), TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
PutWindowTilemap(windowId);
|
||||
}
|
||||
|
@ -1358,7 +1358,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero
|
||||
txtColor[0] = zero2;
|
||||
txtColor[1] = TEXT_DYNAMIC_COLOR_6;
|
||||
txtColor[2] = TEXT_DYNAMIC_COLOR_5;
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, 1, 0, 0, txtColor, -1, string);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 1, 0, 0, txtColor, -1, string);
|
||||
|
||||
tileBytesToBuffer = bytesToBuffer;
|
||||
if (tileBytesToBuffer > 6u)
|
||||
@ -1402,7 +1402,7 @@ static void UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgC
|
||||
txtColor[0] = bgColor;
|
||||
txtColor[1] = fgColor;
|
||||
txtColor[2] = shadowColor;
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, txtColor, -1, string);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, txtColor, -1, string);
|
||||
CpuCopy16(tileData1, dst, tileSize);
|
||||
CpuCopy16(tileData2, dst + offset, tileSize);
|
||||
RemoveWindow(windowId);
|
||||
@ -1561,7 +1561,7 @@ static void Task_PCMainMenu(u8 taskId)
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 0);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
|
||||
CopyWindowToVram(0, 3);
|
||||
CopyWindowToVram(task->tWindowId, 3);
|
||||
task->tState++;
|
||||
@ -1585,7 +1585,7 @@ static void Task_PCMainMenu(u8 taskId)
|
||||
{
|
||||
task->tSelectedOption = task->tNextOption;
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
}
|
||||
break;
|
||||
case MENU_B_PRESSED:
|
||||
@ -1601,14 +1601,14 @@ static void Task_PCMainMenu(u8 taskId)
|
||||
{
|
||||
// Can't withdraw
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_PartyFull, 0, NULL, 2, 1, 3);
|
||||
task->tState = STATE_ERROR_MSG;
|
||||
}
|
||||
else if (task->tInput == OPTION_DEPOSIT && CountPartyMons() == 1)
|
||||
{
|
||||
// Can't deposit
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_JustOnePkmn, 0, NULL, 2, 1, 3);
|
||||
task->tState = STATE_ERROR_MSG;
|
||||
}
|
||||
else
|
||||
@ -1626,7 +1626,7 @@ static void Task_PCMainMenu(u8 taskId)
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
task->tState = STATE_HANDLE_INPUT;
|
||||
}
|
||||
else if (JOY_NEW(DPAD_UP))
|
||||
@ -1636,7 +1636,7 @@ static void Task_PCMainMenu(u8 taskId)
|
||||
Menu_MoveCursor(-1);
|
||||
task->tSelectedOption = Menu_GetCursorPos();
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
task->tState = STATE_HANDLE_INPUT;
|
||||
}
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
@ -1646,7 +1646,7 @@ static void Task_PCMainMenu(u8 taskId)
|
||||
Menu_MoveCursor(1);
|
||||
task->tSelectedOption = Menu_GetCursorPos();
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3);
|
||||
task->tState = STATE_HANDLE_INPUT;
|
||||
}
|
||||
break;
|
||||
@ -1950,14 +1950,14 @@ static void ChooseBoxMenu_PrintInfo(void)
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(4));
|
||||
|
||||
// Print box name
|
||||
center = GetStringCenterAlignXOffset(1, boxName, 64);
|
||||
AddTextPrinterParameterized3(windowId, 1, center, 1, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, boxName);
|
||||
center = GetStringCenterAlignXOffset(FONT_NORMAL, boxName, 64);
|
||||
AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 1, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, boxName);
|
||||
|
||||
// Print #/30 for number of Pokémon in the box
|
||||
ConvertIntToDecimalStringN(numBoxMonsText, numInBox, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
StringAppend(numBoxMonsText, sText_OutOf30);
|
||||
center = GetStringCenterAlignXOffset(1, numBoxMonsText, 64);
|
||||
AddTextPrinterParameterized3(windowId, 1, center, 17, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, numBoxMonsText);
|
||||
center = GetStringCenterAlignXOffset(FONT_NORMAL, numBoxMonsText, 64);
|
||||
AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 17, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, numBoxMonsText);
|
||||
|
||||
winTileData = GetWindowAttribute(windowId, WINDOW_TILE_DATA);
|
||||
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));
|
||||
if (sStorage->boxOption != OPTION_MOVE_ITEMS)
|
||||
{
|
||||
AddTextPrinterParameterized(0, 1, sStorage->displayMonNameText, 6, 0, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, 2, sStorage->displayMonSpeciesName, 6, 15, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, 2, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, 0, sStorage->displayMonItemName, 6, 43, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTextPrinterParameterized(0, 0, sStorage->displayMonItemName, 6, 0, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, 1, sStorage->displayMonNameText, 6, 13, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, 2, sStorage->displayMonSpeciesName, 6, 28, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, 2, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
CopyWindowToVram(0, 2);
|
||||
@ -4319,7 +4319,7 @@ static void PrintMessage(u8 id)
|
||||
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(sStorage->messageText, sMessages[id].text);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(1, 1, sStorage->messageText, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
DrawTextBorderOuter(1, 2, 14);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(1, 2);
|
||||
@ -5635,7 +5635,7 @@ static void CycleBoxTitleColor(void)
|
||||
|
||||
static s16 GetBoxTitleBaseX(const u8 *string)
|
||||
{
|
||||
return DISPLAY_WIDTH - 64 - GetStringWidth(1, string, 0) / 2;
|
||||
return DISPLAY_WIDTH - 64 - GetStringWidth(FONT_NORMAL, string, 0) / 2;
|
||||
}
|
||||
|
||||
|
||||
@ -9203,7 +9203,7 @@ static void PrintItemDescription(void)
|
||||
description = ItemId_GetDescription(sStorage->displayMonItemId);
|
||||
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized5(2, 1, description, 4, 0, 0, NULL, 0, 1);
|
||||
AddTextPrinterParameterized5(2, FONT_NORMAL, description, 4, 0, 0, NULL, 0, 1);
|
||||
}
|
||||
|
||||
static void InitItemInfoWindow(void)
|
||||
|
@ -2700,7 +2700,7 @@ static void ResetWindows(void)
|
||||
|
||||
static void PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, u8 y, u8 lineSpacing, u8 colorId)
|
||||
{
|
||||
AddTextPrinterParameterized4(windowId, 1, x, y, 0, lineSpacing, sTextColors[colorId], 0, string);
|
||||
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, lineSpacing, sTextColors[colorId], 0, string);
|
||||
}
|
||||
|
||||
static void PrintMonInfo(void)
|
||||
@ -2803,21 +2803,21 @@ static void PrintPageNamesAndStats(void)
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_BATTLE_MOVES_TITLE, gText_BattleMoves, 2, 1, 0, 1);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_CONTEST_MOVES_TITLE, gText_ContestMoves, 2, 1, 0, 1);
|
||||
|
||||
stringXPos = GetStringRightAlignXOffset(1, gText_Cancel2, 62);
|
||||
stringXPos = GetStringRightAlignXOffset(FONT_NORMAL, gText_Cancel2, 62);
|
||||
iconXPos = stringXPos - 16;
|
||||
if (iconXPos < 0)
|
||||
iconXPos = 0;
|
||||
PrintAOrBButtonIcon(PSS_LABEL_WINDOW_PROMPT_CANCEL, FALSE, iconXPos);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_PROMPT_CANCEL, gText_Cancel2, stringXPos, 1, 0, 0);
|
||||
|
||||
stringXPos = GetStringRightAlignXOffset(1, gText_Info, 62);
|
||||
stringXPos = GetStringRightAlignXOffset(FONT_NORMAL, gText_Info, 62);
|
||||
iconXPos = stringXPos - 16;
|
||||
if (iconXPos < 0)
|
||||
iconXPos = 0;
|
||||
PrintAOrBButtonIcon(PSS_LABEL_WINDOW_PROMPT_INFO, FALSE, iconXPos);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_PROMPT_INFO, gText_Info, stringXPos, 1, 0, 0);
|
||||
|
||||
stringXPos = GetStringRightAlignXOffset(1, gText_Switch, 62);
|
||||
stringXPos = GetStringRightAlignXOffset(FONT_NORMAL, gText_Switch, 62);
|
||||
iconXPos = stringXPos - 16;
|
||||
if (iconXPos < 0)
|
||||
iconXPos = 0;
|
||||
@ -2826,17 +2826,17 @@ static void PrintPageNamesAndStats(void)
|
||||
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_INFO_RENTAL, gText_RentalPkmn, 0, 1, 0, 1);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_INFO_TYPE, gText_TypeSlash, 0, 1, 0, 0);
|
||||
statsXPos = 6 + GetStringCenterAlignXOffset(1, gText_HP4, 42);
|
||||
statsXPos = 6 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_HP4, 42);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_LEFT, gText_HP4, statsXPos, 1, 0, 1);
|
||||
statsXPos = 6 + GetStringCenterAlignXOffset(1, gText_Attack3, 42);
|
||||
statsXPos = 6 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_Attack3, 42);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_LEFT, gText_Attack3, statsXPos, 17, 0, 1);
|
||||
statsXPos = 6 + GetStringCenterAlignXOffset(1, gText_Defense3, 42);
|
||||
statsXPos = 6 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_Defense3, 42);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_LEFT, gText_Defense3, statsXPos, 33, 0, 1);
|
||||
statsXPos = 2 + GetStringCenterAlignXOffset(1, gText_SpAtk4, 36);
|
||||
statsXPos = 2 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_SpAtk4, 36);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_RIGHT, gText_SpAtk4, statsXPos, 1, 0, 1);
|
||||
statsXPos = 2 + GetStringCenterAlignXOffset(1, gText_SpDef4, 36);
|
||||
statsXPos = 2 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_SpDef4, 36);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_RIGHT, gText_SpDef4, statsXPos, 17, 0, 1);
|
||||
statsXPos = 2 + GetStringCenterAlignXOffset(1, gText_Speed2, 36);
|
||||
statsXPos = 2 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_Speed2, 36);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_RIGHT, gText_Speed2, statsXPos, 33, 0, 1);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_EXP, gText_ExpPoints, 6, 1, 0, 1);
|
||||
PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_EXP, gText_NextLv, 6, 17, 0, 1);
|
||||
@ -3045,7 +3045,7 @@ static void PrintMonOTName(void)
|
||||
{
|
||||
windowId = AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ORIGINAL_TRAINER);
|
||||
PrintTextOnWindow(windowId, gText_OTSlash, 0, 1, 0, 1);
|
||||
x = GetStringWidth(1, gText_OTSlash, 0);
|
||||
x = GetStringWidth(FONT_NORMAL, gText_OTSlash, 0);
|
||||
if (sMonSummaryScreen->summary.OTGender == 0)
|
||||
PrintTextOnWindow(windowId, sMonSummaryScreen->summary.OTName, x, 1, 0, 5);
|
||||
else
|
||||
@ -3059,7 +3059,7 @@ static void PrintMonOTID(void)
|
||||
if (InBattleFactory() != TRUE && InSlateportBattleTent() != TRUE)
|
||||
{
|
||||
ConvertIntToDecimalStringN(StringCopy(gStringVar1, gText_IDNumber2), (u16)sMonSummaryScreen->summary.OTID, STR_CONV_MODE_LEADING_ZEROS, 5);
|
||||
xPos = GetStringRightAlignXOffset(1, gStringVar1, 56);
|
||||
xPos = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 56);
|
||||
PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ID), gStringVar1, xPos, 1, 0, 1);
|
||||
}
|
||||
}
|
||||
@ -3204,7 +3204,7 @@ static bool8 IsInGamePartnerMon(void)
|
||||
static void PrintEggOTName(void)
|
||||
{
|
||||
u32 windowId = AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ORIGINAL_TRAINER);
|
||||
u32 width = GetStringWidth(1, gText_OTSlash, 0);
|
||||
u32 width = GetStringWidth(FONT_NORMAL, gText_OTSlash, 0);
|
||||
PrintTextOnWindow(windowId, gText_OTSlash, 0, 1, 0, 1);
|
||||
PrintTextOnWindow(windowId, gText_FiveMarks, width, 1, 0, 1);
|
||||
}
|
||||
@ -3214,7 +3214,7 @@ static void PrintEggOTID(void)
|
||||
int x;
|
||||
StringCopy(gStringVar1, gText_IDNumber2);
|
||||
StringAppend(gStringVar1, gText_FiveMarks);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar1, 56);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 56);
|
||||
PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ID), gStringVar1, x, 1, 0, 1);
|
||||
}
|
||||
|
||||
@ -3327,7 +3327,7 @@ static void PrintHeldItemName(void)
|
||||
text = gStringVar1;
|
||||
}
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, text, 72) + 6;
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 72) + 6;
|
||||
PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_HELD_ITEM), text, x, 1, 0, 0);
|
||||
}
|
||||
|
||||
@ -3347,7 +3347,7 @@ static void PrintRibbonCount(void)
|
||||
text = gStringVar4;
|
||||
}
|
||||
|
||||
x = GetStringCenterAlignXOffset(1, text, 70) + 6;
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 70) + 6;
|
||||
PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_RIBBON_COUNT), text, x, 1, 0, 0);
|
||||
}
|
||||
|
||||
@ -3407,7 +3407,7 @@ static void PrintExpPointsNextLevel(void)
|
||||
u32 expToNextLevel;
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, sum->exp, STR_CONV_MODE_RIGHT_ALIGN, 7);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar1, 42) + 2;
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 42) + 2;
|
||||
PrintTextOnWindow(windowId, gStringVar1, x, 1, 0, 0);
|
||||
|
||||
if (sum->level < MAX_LEVEL)
|
||||
@ -3416,7 +3416,7 @@ static void PrintExpPointsNextLevel(void)
|
||||
expToNextLevel = 0;
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, expToNextLevel, STR_CONV_MODE_RIGHT_ALIGN, 6);
|
||||
x = GetStringRightAlignXOffset(1, gStringVar1, 42) + 2;
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 42) + 2;
|
||||
PrintTextOnWindow(windowId, gStringVar1, x, 17, 0, 0);
|
||||
}
|
||||
|
||||
@ -3509,14 +3509,14 @@ static void PrintMoveNameAndPP(u8 moveIndex)
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, sMovesPPLayout);
|
||||
text = gStringVar4;
|
||||
ppState = GetCurrentPpToMaxPpState(summary->pp[moveIndex], pp) + 9;
|
||||
x = GetStringRightAlignXOffset(1, text, 44);
|
||||
x = GetStringRightAlignXOffset(FONT_NORMAL, text, 44);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintTextOnWindow(moveNameWindowId, gText_OneDash, 0, moveIndex * 16 + 1, 0, 1);
|
||||
text = gText_TwoDashes;
|
||||
ppState = 12;
|
||||
x = GetStringCenterAlignXOffset(1, text, 44);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 44);
|
||||
}
|
||||
|
||||
PrintTextOnWindow(ppValueWindowId, text, x, moveIndex * 16 + 1, 0, ppState);
|
||||
@ -3669,7 +3669,7 @@ static void PrintNewMoveDetailsOrCancelText(void)
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gStringVar1);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, sMovesPPLayout);
|
||||
PrintTextOnWindow(windowId2, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 44), 65, 0, 12);
|
||||
PrintTextOnWindow(windowId2, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 44), 65, 0, 12);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,23 +572,23 @@ bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode)
|
||||
if (GetConditionGraphCurrentMonIndex() != GetMonListCount() - 1 || IsConditionMenuSearchMode() == TRUE)
|
||||
{
|
||||
str = GetConditionMonNameBuffer(bufferIndex);
|
||||
AddTextPrinterParameterized(structPtr->nameGenderWindowId, 1, str, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 1, 0, NULL);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (IsConditionMenuSearchMode() == TRUE)
|
||||
{
|
||||
str = GetConditionMonLocationBuffer(bufferIndex);
|
||||
AddTextPrinterParameterized(structPtr->nameGenderWindowId, 1, str, 0, 17, 0, NULL);
|
||||
AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 17, 0, NULL);
|
||||
text[0] = EXT_CTRL_CODE_BEGIN;
|
||||
text[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
|
||||
text[2] = TEXT_COLOR_BLUE;
|
||||
text[3] = TEXT_COLOR_TRANSPARENT;
|
||||
text[4] = TEXT_COLOR_LIGHT_BLUE;
|
||||
StringCopy(text + 5, gText_Number2);
|
||||
AddTextPrinterParameterized(structPtr->listIndexWindowId, 1, text, 4, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 4, 1, 0, NULL);
|
||||
ConvertIntToDecimalStringN(text + 5, GetConditionMonDataBuffer(), STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
AddTextPrinterParameterized(structPtr->listIndexWindowId, 1, text, 28, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 28, 1, 0, NULL);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
|
@ -655,9 +655,9 @@ static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList)
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||
*gStringVar1 = EOS;
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberF700);
|
||||
AddTextPrinterParameterized(searchList->winid, 1, gStringVar2, 4, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, 0xFF, NULL);
|
||||
ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
AddTextPrinterParameterized(searchList->winid, 1, gStringVar1, 34, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(searchList->winid, 2);
|
||||
}
|
||||
|
||||
@ -674,7 +674,7 @@ static void InitConditionSearchListMenuTemplate(void)
|
||||
template.listTop = 1;
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 2;
|
||||
template.fontId = 1;
|
||||
template.fontId = FONT_NORMAL;
|
||||
template.listFunc.printMonFunc = PrintSearchMonListItem;
|
||||
template.unk14 = NULL;
|
||||
sub_81C81D4(&sConditionSearchResultBgTemplates[1], &template, 0);
|
||||
@ -705,7 +705,7 @@ static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest)
|
||||
}
|
||||
|
||||
StringGetEnd10(gStringVar3);
|
||||
dest = GetStringClearToWidth(dest, 1, gStringVar3, 60);
|
||||
dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar3, 60);
|
||||
switch (gender)
|
||||
{
|
||||
default:
|
||||
@ -723,5 +723,5 @@ static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest)
|
||||
*s++ = CHAR_EXTRA_SYMBOL;
|
||||
*s++ = CHAR_LV_2;
|
||||
ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
GetStringClearToWidth(dest, 1, gStringVar1, 40);
|
||||
GetStringClearToWidth(dest, FONT_NORMAL, gStringVar1, 40);
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ void PrintHelpBarText(u32 textId)
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
DrawHelpBar(structPtr->helpBarWindowId);
|
||||
AddTextPrinterParameterized3(structPtr->helpBarWindowId, 1, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]);
|
||||
AddTextPrinterParameterized3(structPtr->helpBarWindowId, FONT_NORMAL, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]);
|
||||
}
|
||||
|
||||
bool32 WaitForHelpBar(void)
|
||||
|
@ -413,12 +413,12 @@ void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries *matchCallEntry,
|
||||
|
||||
if (className && trainerName)
|
||||
{
|
||||
u8 *str2 = GetStringClearToWidth(str, 7, className, 69);
|
||||
GetStringClearToWidth(str2, 7, trainerName, 51);
|
||||
u8 *str2 = GetStringClearToWidth(str, FONT_NARROW, className, 69);
|
||||
GetStringClearToWidth(str2, FONT_NARROW, trainerName, 51);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetStringClearToWidth(str, 7, NULL, 120);
|
||||
GetStringClearToWidth(str, FONT_NARROW, NULL, 120);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -874,7 +874,7 @@ static void InitMatchCallPokenavListMenuTemplate(void)
|
||||
template.listTop = 1;
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 3;
|
||||
template.fontId = 7;
|
||||
template.fontId = FONT_NARROW;
|
||||
template.listFunc.unk10_2 = BufferMatchCallNameAndDesc;
|
||||
template.unk14 = TryDrawRematchPokeballIcon;
|
||||
sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2);
|
||||
@ -986,14 +986,14 @@ static void PrintNumberOfBattles(u16 windowId)
|
||||
static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top)
|
||||
{
|
||||
int y = top * 16 + 1;
|
||||
AddTextPrinterParameterized(windowId, 7, str, 2, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NARROW, str, 2, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top)
|
||||
{
|
||||
int x = GetStringRightAlignXOffset(7, str, 86);
|
||||
int x = GetStringRightAlignXOffset(FONT_NARROW, str, 86);
|
||||
int y = top * 16 + 1;
|
||||
AddTextPrinterParameterized(windowId, 7, str, x, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NARROW, str, x, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1)
|
||||
@ -1007,9 +1007,9 @@ static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1)
|
||||
else
|
||||
StringCopy(mapName, gText_Unknown);
|
||||
|
||||
x = GetStringCenterAlignXOffset(7, mapName, 88);
|
||||
x = GetStringCenterAlignXOffset(FONT_NARROW, mapName, 88);
|
||||
FillWindowPixelBuffer(state->locWindowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(state->locWindowId, 7, mapName, x, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(state->locWindowId, FONT_NARROW, mapName, x, 1, 0, NULL);
|
||||
}
|
||||
|
||||
static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state)
|
||||
@ -1023,7 +1023,7 @@ static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state)
|
||||
if (optionText == MATCH_CALL_OPTION_COUNT)
|
||||
break;
|
||||
|
||||
AddTextPrinterParameterized(state->infoBoxWindowId, 7, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
CopyWindowToVram(state->infoBoxWindowId, 2);
|
||||
@ -1095,7 +1095,7 @@ static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav4Struct *state)
|
||||
|
||||
static void PrintCallingDots(struct Pokenav4Struct *state)
|
||||
{
|
||||
AddTextPrinterParameterized(state->msgBoxWindowId, 1, sText_CallingDots, 32, 1, 1, NULL);
|
||||
AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, sText_CallingDots, 32, 1, 1, NULL);
|
||||
}
|
||||
|
||||
static bool32 WaitForCallingDotsText(struct Pokenav4Struct *state)
|
||||
@ -1106,7 +1106,7 @@ static bool32 WaitForCallingDotsText(struct Pokenav4Struct *state)
|
||||
|
||||
static void PrintTrainerIsCloseBy(struct Pokenav4Struct *state)
|
||||
{
|
||||
AddTextPrinterParameterized(state->msgBoxWindowId, 1, gText_TrainerCloseBy, 0, 1, 1, NULL);
|
||||
AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, gText_TrainerCloseBy, 0, 1, 1, NULL);
|
||||
}
|
||||
|
||||
static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *state)
|
||||
@ -1120,7 +1120,7 @@ static void PrintMatchCallMessage(struct Pokenav4Struct *state)
|
||||
int index = GetSelectedPokenavListIndex();
|
||||
const u8 *str = GetMatchCallMessageText(index, &state->unkF);
|
||||
u8 speed = GetPlayerTextSpeedDelay();
|
||||
AddTextPrinterParameterized(state->msgBoxWindowId, 1, str, 32, 1, speed, NULL);
|
||||
AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, str, 32, 1, speed, NULL);
|
||||
}
|
||||
|
||||
static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *state)
|
||||
|
@ -734,7 +734,7 @@ void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId)
|
||||
u32 top = (list->listWindow.unkA + 1 + (fieldId * 2)) & 0xF;
|
||||
|
||||
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16);
|
||||
AddTextPrinterParameterized3(list->listWindow.windowId, 7, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]);
|
||||
AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]);
|
||||
CopyWindowRectToVram(list->listWindow.windowId, 2, 0, top << 1, list->listWindow.unk4, 2);
|
||||
}
|
||||
|
||||
@ -755,7 +755,7 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok
|
||||
if (str != NULL)
|
||||
{
|
||||
sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2);
|
||||
AddTextPrinterParameterized(list->listWindow.windowId, 7, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowRectToVram(list->listWindow.windowId, 2, 0, r6 * 2, list->listWindow.unk4, 2);
|
||||
}
|
||||
}
|
||||
|
@ -1133,9 +1133,9 @@ static void PrintCurrentOptionDescription(void)
|
||||
struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS);
|
||||
int menuItem = GetCurrentMenuItemId();
|
||||
const u8 * s = sPageDescriptions[menuItem];
|
||||
u32 width = GetStringWidth(1, s, -1);
|
||||
u32 width = GetStringWidth(FONT_NORMAL, s, -1);
|
||||
FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(ptr->optionDescWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors, 0, s);
|
||||
AddTextPrinterParameterized3(ptr->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors, 0, s);
|
||||
}
|
||||
|
||||
// Printed when Ribbons is selected if no PC/party mons have ribbons
|
||||
@ -1144,9 +1144,9 @@ static void PrintNoRibbonWinners(void)
|
||||
{
|
||||
struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS);
|
||||
const u8 * s = gText_NoRibbonWinners;
|
||||
u32 width = GetStringWidth(1, s, -1);
|
||||
u32 width = GetStringWidth(FONT_NORMAL, s, -1);
|
||||
FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6));
|
||||
AddTextPrinterParameterized3(ptr->optionDescWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s);
|
||||
AddTextPrinterParameterized3(ptr->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s);
|
||||
}
|
||||
|
||||
static bool32 IsDma3ManagerBusyWithBgCopy_(void)
|
||||
|
@ -535,7 +535,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
||||
case MAPSECTYPE_CITY_CANFLY:
|
||||
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
||||
PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2);
|
||||
AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
DrawCityMap(state, regionMap->mapSecId, regionMap->posWithinMapSec);
|
||||
CopyWindowToVram(state->infoWindowId, 3);
|
||||
SetCityZoomTextInvisibility(FALSE);
|
||||
@ -543,7 +543,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
||||
case MAPSECTYPE_CITY_CANTFLY:
|
||||
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
||||
PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2);
|
||||
AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17);
|
||||
CopyWindowToVram(state->infoWindowId, 3);
|
||||
SetCityZoomTextInvisibility(TRUE);
|
||||
@ -552,7 +552,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
||||
case MAPSECTYPE_BATTLE_FRONTIER:
|
||||
FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1));
|
||||
PutWindowTilemap(state->infoWindowId);
|
||||
AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
PrintLandmarkNames(state, regionMap->mapSecId, regionMap->posWithinMapSec);
|
||||
CopyWindowToVram(state->infoWindowId, 3);
|
||||
SetCityZoomTextInvisibility(TRUE);
|
||||
@ -654,7 +654,7 @@ static void PrintLandmarkNames(struct Pokenav5Struct_2 *state, int mapSecId, int
|
||||
break;
|
||||
|
||||
StringCopyPadded(gStringVar1, landmarkName, CHAR_SPACE, 12);
|
||||
AddTextPrinterParameterized(state->infoWindowId, 7, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -673,8 +673,8 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2)
|
||||
ptr = ConvertIntToDecimalStringN(ptr, val1, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
*ptr++ = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(ptr, val2, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
x = GetStringCenterAlignXOffset(1, strbuf, 56);
|
||||
AddTextPrinterParameterized(windowId, 1, strbuf, x, 1, 0xFF, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, strbuf, 56);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, 0xFF, NULL);
|
||||
}
|
||||
|
||||
static void InitMonRibbonPokenavListMenuTemplate(void)
|
||||
@ -689,7 +689,7 @@ static void InitMonRibbonPokenavListMenuTemplate(void)
|
||||
template.listTop = 1;
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 2;
|
||||
template.fontId = 1;
|
||||
template.fontId = FONT_NORMAL;
|
||||
template.listFunc.printMonFunc = BufferRibbonMonInfoText;
|
||||
template.unk14 = NULL;
|
||||
sub_81C81D4(&sMonRibbonListBgTemplates[1], &template, 0);
|
||||
@ -722,7 +722,7 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest)
|
||||
}
|
||||
|
||||
StringGetEnd10(gStringVar3);
|
||||
dest = GetStringClearToWidth(dest, 1, gStringVar3, 60);
|
||||
dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar3, 60);
|
||||
switch (gender)
|
||||
{
|
||||
default:
|
||||
@ -741,6 +741,6 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest)
|
||||
*s++ = CHAR_EXTRA_SYMBOL;
|
||||
*s++ = CHAR_LV_2;
|
||||
ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
dest = GetStringClearToWidth(dest, 1, gStringVar1, 54);
|
||||
dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar1, 54);
|
||||
ConvertIntToDecimalStringN(dest, item->data, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
}
|
||||
|
@ -809,7 +809,7 @@ static void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr)
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700);
|
||||
FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4));
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, 1, color, -1, gStringVar4);
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, -1, gStringVar4);
|
||||
CopyWindowToVram(structPtr->ribbonCountWindowId, 2);
|
||||
}
|
||||
|
||||
@ -824,7 +824,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
// Print normal ribbon name/description
|
||||
for (i = 0; i < 2; i++)
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]);
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -840,7 +840,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr)
|
||||
// Print gift ribbon name/description
|
||||
ribbonId--;
|
||||
for (i = 0; i < 2; i++)
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]);
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]);
|
||||
}
|
||||
|
||||
CopyWindowToVram(structPtr->ribbonCountWindowId, 2);
|
||||
@ -877,7 +877,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr)
|
||||
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
GetMonNicknameLevelGender(gStringVar3, &level, &gender);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar3, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar3, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
switch (gender)
|
||||
{
|
||||
case MON_MALE:
|
||||
@ -896,7 +896,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr)
|
||||
*(txtPtr++) = CHAR_EXTRA_SYMBOL;
|
||||
*(txtPtr++) = CHAR_LV_2;
|
||||
ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(windowId, 2);
|
||||
}
|
||||
|
||||
@ -932,8 +932,8 @@ static void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr)
|
||||
txtPtr = ConvertIntToDecimalStringN(gStringVar1, id, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
*(txtPtr++) = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar1, 56);
|
||||
AddTextPrinterParameterized(structPtr->listIdxWindowId, 1, gStringVar1, x, 1, TEXT_SPEED_FF, NULL);
|
||||
x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar1, 56);
|
||||
AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(structPtr->listIdxWindowId, 2);
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ static void ReceiveExchangePacket(u32 multiplayerId)
|
||||
static void PrintTextOnRecordMixing(const u8 *src)
|
||||
{
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, src, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, src, 0, 1, 0, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
|
@ -1718,7 +1718,7 @@ void CB2_OpenFlyMap(void)
|
||||
LoadPalette(sRegionMapFramePal, 0x10, 0x20);
|
||||
PutWindowTilemap(2);
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(2, FONT_NORMAL, gText_FlyToWhere, 0, 1, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -1784,9 +1784,9 @@ static void DrawFlyDestTextWindow(void)
|
||||
namePrinted = TRUE;
|
||||
ClearStdWindowAndFrameToTransparent(0, FALSE);
|
||||
DrawStdFrameWithCustomTileAndPalette(1, FALSE, 101, 13);
|
||||
AddTextPrinterParameterized(1, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec];
|
||||
AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 96), 17, 0, NULL);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, name, GetStringRightAlignXOffset(FONT_NORMAL, name, 96), 17, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
sDrawFlyDestTextWindow = TRUE;
|
||||
}
|
||||
@ -1805,7 +1805,7 @@ static void DrawFlyDestTextWindow(void)
|
||||
// Window is already drawn, just empty it
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
}
|
||||
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
sDrawFlyDestTextWindow = FALSE;
|
||||
}
|
||||
|
@ -381,14 +381,14 @@ 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);
|
||||
dest = StringCopy(dest, gStringVar1);
|
||||
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8 seconds)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 0x214, 0xE);
|
||||
PrintTime(windowId, 0, 1, days, hours, minutes, seconds);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_Confirm2, 126, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Confirm2, 126, 1, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
@ -563,7 +563,7 @@ static void VBlankCB(void)
|
||||
static void ShowMessage(const u8 *str)
|
||||
{
|
||||
DrawDialogFrameWithCustomTileAndPalette(1, FALSE, 0x200, 0xF);
|
||||
AddTextPrinterParameterized(1, 1, str, 0, 1, 0, NULL);
|
||||
AddTextPrinterParameterized(1, FONT_NORMAL, str, 0, 1, 0, NULL);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
@ -578,7 +578,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
|
||||
case 0:
|
||||
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x214, 0xE);
|
||||
|
||||
AddTextPrinterParameterized(0, 1, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0);
|
||||
PrintTime(
|
||||
0,
|
||||
0,
|
||||
@ -588,7 +588,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
|
||||
gLocalTime.minutes,
|
||||
gLocalTime.seconds);
|
||||
|
||||
AddTextPrinterParameterized(0, 1, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0);
|
||||
PrintTime(
|
||||
0,
|
||||
0,
|
||||
|
@ -1223,7 +1223,7 @@ static void CB2_LoadRoulette(void)
|
||||
SetMultiplierSprite(SELECTION_NONE);
|
||||
DrawGridBackground(SELECTION_NONE);
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
gSpriteCoordOffsetX = -60;
|
||||
gSpriteCoordOffsetY = 0;
|
||||
@ -1294,7 +1294,7 @@ static void Task_AskKeepPlaying(u8 taskId)
|
||||
{
|
||||
DisplayYesNoMenuDefaultYes();
|
||||
DrawStdWindowFrame(sTextWindowId, 0);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying);
|
||||
}
|
||||
@ -1806,14 +1806,14 @@ static void Task_PrintSpinResult(u8 taskId)
|
||||
{
|
||||
PlayFanfare(MUS_SLOTS_JACKPOT);
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayFanfare(MUS_SLOTS_WIN);
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
}
|
||||
break;
|
||||
@ -1821,7 +1821,7 @@ static void Task_PrintSpinResult(u8 taskId)
|
||||
default:
|
||||
m4aSongNumStart(SE_FAILURE);
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
break;
|
||||
}
|
||||
@ -1866,7 +1866,7 @@ static void Task_PrintPayout(u8 taskId)
|
||||
ConvertIntToDecimalStringN(gStringVar1, (sRoulette->minBet * gTasks[taskId].tMultiplier), STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_YouveWonXCoins);
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
gTasks[taskId].tPayout = (sRoulette->minBet * gTasks[taskId].tMultiplier);
|
||||
gTasks[taskId].data[7] = 0;
|
||||
@ -1902,7 +1902,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId)
|
||||
{
|
||||
// Reached Ball 6, clear board
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
StartTaskAfterDelayOrInput(taskId, Task_ClearBoard, NO_DELAY, A_BUTTON | B_BUTTON);
|
||||
}
|
||||
@ -1910,7 +1910,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId)
|
||||
{
|
||||
// Player maxed out coins
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON);
|
||||
}
|
||||
@ -1924,7 +1924,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId)
|
||||
{
|
||||
// Player out of coins
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
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)
|
||||
{
|
||||
DrawStdWindowFrame(sTextWindowId, FALSE);
|
||||
AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(sTextWindowId, 3);
|
||||
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);
|
||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
|
||||
DrawStdWindowFrame(0, FALSE);
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
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)
|
||||
DrawStdWindowFrame(0, FALSE);
|
||||
AddTextPrinterParameterized(0, 1, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_PrintMinBet;
|
||||
}
|
||||
@ -3454,7 +3454,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId)
|
||||
// Print minimum bet
|
||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
|
||||
DrawStdWindowFrame(0, FALSE);
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_ShowMinBetYesNo;
|
||||
}
|
||||
@ -3464,7 +3464,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId)
|
||||
// Not enough for minimum bet
|
||||
StringExpandPlaceholders(gStringVar4, Roulette_Text_NotEnoughCoins);
|
||||
DrawStdWindowFrame(0, FALSE);
|
||||
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(0, 3);
|
||||
gTasks[taskId].func = Task_NotEnoughForMinBet;
|
||||
gTasks[taskId].tCoins = 0;
|
||||
|
@ -153,7 +153,7 @@ static void SaveFailedScreenTextPrint(const u8 *text, u8 x, u8 y)
|
||||
color[0] = TEXT_COLOR_TRANSPARENT;
|
||||
color[1] = TEXT_DYNAMIC_COLOR_6;
|
||||
color[2] = TEXT_COLOR_LIGHT_GRAY;
|
||||
AddTextPrinterParameterized4(sWindowIds[TEXT_WIN_ID], 1, x * 8, y * 8 + 1, 0, 0, color, 0, text);
|
||||
AddTextPrinterParameterized4(sWindowIds[TEXT_WIN_ID], FONT_NORMAL, x * 8, y * 8 + 1, 0, 0, color, 0, text);
|
||||
}
|
||||
|
||||
void DoSaveFailedScreen(u8 saveType)
|
||||
|
@ -1310,7 +1310,7 @@ bool8 ScrCmd_messageinstant(struct ScriptContext *ctx)
|
||||
msg = (const u8 *)ctx->data[0];
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
AddTextPrinterParameterized(0, 1, msg, 0, 1, 0, 0);
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, 0);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1497,7 +1497,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
||||
// in Emerald they are unused and position is calculated below instead
|
||||
StringExpandPlaceholders(gStringVar4, ptr + 6);
|
||||
|
||||
width = GetStringWidth(6, gStringVar4, -1) / 8u;
|
||||
width = GetStringWidth(FONT_BRAILLE, gStringVar4, -1) / 8u;
|
||||
|
||||
if (width > 28)
|
||||
width = 28;
|
||||
@ -1532,7 +1532,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
|
||||
DrawStdWindowFrame(gBrailleWindowId, 0);
|
||||
PutWindowTilemap(gBrailleWindowId);
|
||||
FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(gBrailleWindowId, 6, gStringVar4, xText, yText, 0xFF, 0x0);
|
||||
AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, 0xFF, 0x0);
|
||||
CopyWindowToVram(gBrailleWindowId, 3);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -353,22 +353,22 @@ static void CreatePCMultichoice(void)
|
||||
numChoices = 4;
|
||||
windowId = CreateWindowFromRect(0, 0, width, 8);
|
||||
SetStandardWindowBorderStyle(windowId, 0);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_LogOff, y, 49, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
numChoices = 3;
|
||||
windowId = CreateWindowFromRect(0, 0, width, 6);
|
||||
SetStandardWindowBorderStyle(windowId, 0);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL);
|
||||
}
|
||||
|
||||
// Change PC name if player has met Lanette
|
||||
if (FlagGet(FLAG_SYS_PC_LANETTE))
|
||||
AddTextPrinterParameterized(windowId, 1, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(windowId, 1, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL);
|
||||
|
||||
StringExpandPlaceholders(gStringVar4, gText_PlayersPC);
|
||||
PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17);
|
||||
@ -380,7 +380,7 @@ static void CreatePCMultichoice(void)
|
||||
void ScriptMenu_DisplayPCStartupPrompt(void)
|
||||
{
|
||||
sub_819786C(0, TRUE);
|
||||
AddTextPrinterParameterized2(0, 1, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3);
|
||||
}
|
||||
|
||||
bool8 ScriptMenu_CreateLilycoveSSTidalMultichoice(void)
|
||||
@ -414,7 +414,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
|
||||
sLilycoveSSTidalSelections[i] = 0xFF;
|
||||
}
|
||||
|
||||
GetFontAttribute(1, FONTATTR_MAX_LETTER_WIDTH);
|
||||
GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_WIDTH);
|
||||
|
||||
if (gSpecialVar_0x8004 == 0)
|
||||
{
|
||||
@ -527,7 +527,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
|
||||
{
|
||||
if (sLilycoveSSTidalSelections[i] != 0xFF)
|
||||
{
|
||||
AddTextPrinterParameterized(windowId, 1, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL);
|
||||
selectionCount++;
|
||||
}
|
||||
}
|
||||
@ -645,27 +645,27 @@ static void DrawLinkServicesMultichoiceMenu(u8 multichoiceId)
|
||||
{
|
||||
case MULTI_WIRELESS_NO_BERRY:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sWirelessOptionsNoBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptionsNoBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case MULTI_CABLE_CLUB_WITH_RECORD_MIX:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sCableClubOptions_WithRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sCableClubOptions_WithRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case MULTI_WIRELESS_NO_RECORD:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case MULTI_WIRELESS_ALL_SERVICES:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sWirelessOptions_AllServices[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_AllServices[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case MULTI_WIRELESS_NO_RECORD_BERRY:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMixBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_NoRecordMixBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case MULTI_CABLE_CLUB_NO_RECORD_MIX:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, sCableClubOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
AddTextPrinterParameterized2(0, FONT_NORMAL, sCableClubOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -688,15 +688,15 @@ static void CreateStartMenuForPokenavTutorial(void)
|
||||
{
|
||||
u8 windowId = CreateWindowFromRect(21, 0, 7, 18);
|
||||
SetStandardWindowBorderStyle(windowId, 0);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, 1, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL);
|
||||
sub_81983AC(windowId, 1, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL);
|
||||
sub_81983AC(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0);
|
||||
InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU);
|
||||
CopyWindowToVram(windowId, 3);
|
||||
}
|
||||
@ -727,7 +727,7 @@ static int DisplayTextAndGetWidthInternal(const u8 *str)
|
||||
{
|
||||
u8 temp[64];
|
||||
StringExpandPlaceholders(temp, str);
|
||||
return GetStringWidth(1, temp, 0);
|
||||
return GetStringWidth(FONT_NORMAL, temp, 0);
|
||||
}
|
||||
|
||||
int DisplayTextAndGetWidth(const u8 *str, int prevWidth)
|
||||
|