diff --git a/charmap.txt b/charmap.txt index 3a34bada5..c96202a09 100644 --- a/charmap.txt +++ b/charmap.txt @@ -405,7 +405,7 @@ B_BUFF3 = FD 34 NAME_END = FC 00 @ special 0xF7 character -SPECIAL_F7 = F7 +DYNAMIC = F7 @ more text functions @@ -415,15 +415,15 @@ SHADOW = FC 03 @ same as fc 01 COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes PALETTE = FC 05 @ used in credits SIZE = FC 06 @ note that anything other than "SMALL" is invalid -UNKNOWN_7 = FC 07 +RESET_SIZE = FC 07 PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them PAUSE_UNTIL_PRESS = FC 09 WAIT_SE = FC 0A PLAY_BGM = FC 0B ESCAPE = FC 0C SHIFT_TEXT = FC 0D -UNKNOWN_E = FC 0E -UNKNOWN_F = FC 0F +SHIFT_DOWN = FC 0E +FILL_WINDOW = FC 0F PLAY_SE = FC 10 CLEAR = FC 11 SKIP = FC 12 diff --git a/gflib/string_util.c b/gflib/string_util.c index db972a8ed..92f8eea5a 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -342,50 +342,61 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src) switch (c) { - case PLACEHOLDER_BEGIN: - placeholderId = *src++; - expandedString = GetExpandedPlaceholder(placeholderId); - dest = StringExpandPlaceholders(dest, expandedString); - break; - case EXT_CTRL_CODE_BEGIN: - *dest++ = c; - c = *src++; - *dest++ = c; + case PLACEHOLDER_BEGIN: + placeholderId = *src++; + expandedString = GetExpandedPlaceholder(placeholderId); + dest = StringExpandPlaceholders(dest, expandedString); + break; + case EXT_CTRL_CODE_BEGIN: + *dest++ = c; + c = *src++; + *dest++ = c; - switch (c) - { - case 0x07: - case 0x09: - case 0x0F: - case 0x15: - case 0x16: - case 0x17: - case 0x18: - break; - case 0x04: - *dest++ = *src++; - case 0x0B: - *dest++ = *src++; - default: - *dest++ = *src++; - } + switch (c) + { + case EXT_CTRL_CODE_RESET_SIZE: + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: + case EXT_CTRL_CODE_FILL_WINDOW: + case EXT_CTRL_CODE_JPN: + case EXT_CTRL_CODE_ENG: + case EXT_CTRL_CODE_PAUSE_MUSIC: + case EXT_CTRL_CODE_RESUME_MUSIC: break; - case EOS: - *dest = EOS; - return dest; - case CHAR_PROMPT_SCROLL: - case CHAR_PROMPT_CLEAR: - case CHAR_NEWLINE: + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: + *dest++ = *src++; + case EXT_CTRL_CODE_PLAY_BGM: + *dest++ = *src++; default: - *dest++ = c; + *dest++ = *src++; + } + break; + case EOS: + *dest = EOS; + return dest; + case CHAR_PROMPT_SCROLL: + case CHAR_PROMPT_CLEAR: + case CHAR_NEWLINE: + default: + *dest++ = c; } } } u8 *StringBraille(u8 *dest, const u8 *src) { - u8 setBrailleFont[] = { EXT_CTRL_CODE_BEGIN, 0x06, 0x06, EOS }; - u8 gotoLine2[] = { CHAR_NEWLINE, EXT_CTRL_CODE_BEGIN, 0x0E, 0x02, EOS }; + const u8 setBrailleFont[] = { + EXT_CTRL_CODE_BEGIN, + EXT_CTRL_CODE_SIZE, + 6, + EOS + }; + const u8 gotoLine2[] = { + CHAR_NEWLINE, + EXT_CTRL_CODE_BEGIN, + EXT_CTRL_CODE_SHIFT_DOWN, + 2, + EOS + }; dest = StringCopy(dest, setBrailleFont); @@ -395,16 +406,16 @@ u8 *StringBraille(u8 *dest, const u8 *src) switch (c) { - case EOS: - *dest = c; - return dest; - case CHAR_NEWLINE: - dest = StringCopy(dest, gotoLine2); - break; - default: - *dest++ = c; - *dest++ = c + 0x40; - break; + case EOS: + *dest = c; + return dest; + case CHAR_NEWLINE: + dest = StringCopy(dest, gotoLine2); + break; + default: + *dest++ = c; + *dest++ = c + 0x40; + break; } } } @@ -564,7 +575,7 @@ u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n) else { *dest++ = *src++; - if (*(src - 1) == CHAR_SPECIAL_F9) + if (*(src - 1) == CHAR_EXTRA_SYMBOL) *dest++ = *src++; } } @@ -579,7 +590,7 @@ u32 StringLength_Multibyte(const u8 *str) while (*str != EOS) { - if (*str == CHAR_SPECIAL_F9) + if (*str == CHAR_EXTRA_SYMBOL) str++; str++; length++; @@ -596,15 +607,15 @@ u8 *WriteColorChangeControlCode(u8 *dest, u32 colorType, u8 color) switch (colorType) { case 0: - *dest = 1; + *dest = EXT_CTRL_CODE_COLOR; dest++; break; case 1: - *dest = 3; + *dest = EXT_CTRL_CODE_SHADOW; dest++; break; case 2: - *dest = 2; + *dest = EXT_CTRL_CODE_HIGHLIGHT; dest++; break; } @@ -619,7 +630,7 @@ bool32 IsStringJapanese(u8 *str) { while (*str != EOS) { - if (*str <= 0xA0) + if (*str < CHAR_0) if (*str != CHAR_SPACE) return TRUE; str++; @@ -634,7 +645,7 @@ bool32 sub_800924C(u8 *str, s32 n) for (i = 0; *str != EOS && i < n; i++) { - if (*str <= 0xA0) + if (*str < CHAR_0) if (*str != CHAR_SPACE) return TRUE; str++; @@ -647,31 +658,31 @@ u8 GetExtCtrlCodeLength(u8 code) { static const u8 lengths[] = { - 1, - 2, - 2, - 2, - 4, - 2, - 2, - 1, - 2, - 1, - 1, - 3, - 2, - 2, - 2, - 1, - 3, - 2, - 2, - 2, - 2, - 1, - 1, - 1, - 1, + [0] = 1, + [EXT_CTRL_CODE_COLOR] = 2, + [EXT_CTRL_CODE_HIGHLIGHT] = 2, + [EXT_CTRL_CODE_SHADOW] = 2, + [EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW] = 4, + [EXT_CTRL_CODE_PALETTE] = 2, + [EXT_CTRL_CODE_SIZE] = 2, + [EXT_CTRL_CODE_RESET_SIZE] = 1, + [EXT_CTRL_CODE_PAUSE] = 2, + [EXT_CTRL_CODE_PAUSE_UNTIL_PRESS] = 1, + [EXT_CTRL_CODE_WAIT_SE] = 1, + [EXT_CTRL_CODE_PLAY_BGM] = 3, + [EXT_CTRL_CODE_ESCAPE] = 2, + [EXT_CTRL_CODE_SHIFT_TEXT] = 2, + [EXT_CTRL_CODE_SHIFT_DOWN] = 2, + [EXT_CTRL_CODE_FILL_WINDOW] = 1, + [EXT_CTRL_CODE_PLAY_SE] = 3, + [EXT_CTRL_CODE_CLEAR] = 2, + [EXT_CTRL_CODE_SKIP] = 2, + [EXT_CTRL_CODE_CLEAR_TO] = 2, + [EXT_CTRL_CODE_MIN_LETTER_SPACING] = 2, + [EXT_CTRL_CODE_JPN] = 1, + [EXT_CTRL_CODE_ENG] = 1, + [EXT_CTRL_CODE_PAUSE_MUSIC] = 1, + [EXT_CTRL_CODE_RESUME_MUSIC] = 1, }; u8 length = 0; @@ -734,7 +745,7 @@ void ConvertInternationalString(u8 *s, u8 language) StripExtCtrlCodes(s); i = StringLength(s); s[i++] = EXT_CTRL_CODE_BEGIN; - s[i++] = 22; + s[i++] = EXT_CTRL_CODE_ENG; s[i++] = EOS; i--; @@ -746,7 +757,7 @@ void ConvertInternationalString(u8 *s, u8 language) } s[0] = EXT_CTRL_CODE_BEGIN; - s[1] = 21; + s[1] = EXT_CTRL_CODE_JPN; } } diff --git a/gflib/text.c b/gflib/text.c index 6e5af0e12..5d407e5e4 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -67,19 +67,19 @@ const struct GlyphWidthFunc gGlyphWidthFuncs[] = const struct KeypadIcon gKeypadIcons[] = { - { 0x0, 0x8, 0xC }, - { 0x1, 0x8, 0xC }, - { 0x2, 0x10, 0xC }, - { 0x4, 0x10, 0xC }, - { 0x6, 0x18, 0xC }, - { 0x9, 0x18, 0xC }, - { 0xC, 0x8, 0xC }, - { 0xD, 0x8, 0xC }, - { 0xE, 0x8, 0xC }, - { 0xF, 0x8, 0xC }, - { 0x20, 0x8, 0xC }, - { 0x21, 0x8, 0xC }, - { 0x22, 0x8, 0xC } + [CHAR_A_BUTTON] = { 0x0, 0x8, 0xC }, + [CHAR_B_BUTTON] = { 0x1, 0x8, 0xC }, + [CHAR_L_BUTTON] = { 0x2, 0x10, 0xC }, + [CHAR_R_BUTTON] = { 0x4, 0x10, 0xC }, + [CHAR_START_BUTTON] = { 0x6, 0x18, 0xC }, + [CHAR_SELECT_BUTTON] = { 0x9, 0x18, 0xC }, + [CHAR_DPAD_UP] = { 0xC, 0x8, 0xC }, + [CHAR_DPAD_DOWN] = { 0xD, 0x8, 0xC }, + [CHAR_DPAD_LEFT] = { 0xE, 0x8, 0xC }, + [CHAR_DPAD_RIGHT] = { 0xF, 0x8, 0xC }, + [CHAR_DPAD_UPDOWN] = { 0x20, 0x8, 0xC }, + [CHAR_DPAD_LEFTRIGHT] = { 0x21, 0x8, 0xC }, + [CHAR_DPAD_NONE] = { 0x22, 0x8, 0xC } }; const u8 gKeypadIconTiles[] = INCBIN_U8("graphics/fonts/keypad_icons.4bpp"); @@ -1609,22 +1609,22 @@ u16 RenderText(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentChar++; switch (currChar) { - case 1: + case EXT_CTRL_CODE_COLOR: textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 2: + case EXT_CTRL_CODE_HIGHLIGHT: textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 3: + case EXT_CTRL_CODE_SHADOW: textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 4: + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar; @@ -1633,63 +1633,63 @@ u16 RenderText(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 5: + case EXT_CTRL_CODE_PALETTE: textPrinter->printerTemplate.currentChar++; return 2; - case 6: + case EXT_CTRL_CODE_SIZE: subStruct->glyphId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; - case EXT_CTRL_CODE_UNKNOWN_7: + case EXT_CTRL_CODE_RESET_SIZE: return 2; - case 8: + case EXT_CTRL_CODE_PAUSE: textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; textPrinter->state = 6; return 2; - case 9: + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: textPrinter->state = 1; if (gTextFlags.autoScroll) subStruct->autoScrollDelay = 0; return 3; - case 10: + case EXT_CTRL_CODE_WAIT_SE: textPrinter->state = 5; return 3; - case 11: + case EXT_CTRL_CODE_PLAY_BGM: currChar = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; currChar |= *textPrinter->printerTemplate.currentChar << 8; textPrinter->printerTemplate.currentChar++; PlayBGM(currChar); return 2; - case 12: + case EXT_CTRL_CODE_ESCAPE: currChar = *textPrinter->printerTemplate.currentChar | 0x100; textPrinter->printerTemplate.currentChar++; break; - case 16: + case EXT_CTRL_CODE_PLAY_SE: currChar = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; currChar |= (*textPrinter->printerTemplate.currentChar << 8); textPrinter->printerTemplate.currentChar++; PlaySE(currChar); return 2; - case 13: + case EXT_CTRL_CODE_SHIFT_TEXT: textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; - case 14: + case EXT_CTRL_CODE_SHIFT_DOWN: textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; - case 15: + case EXT_CTRL_CODE_FILL_WINDOW: FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; return 2; - case 23: + case EXT_CTRL_CODE_PAUSE_MUSIC: m4aMPlayStop(&gMPlayInfo_BGM); return 2; - case 24: + case EXT_CTRL_CODE_RESUME_MUSIC: m4aMPlayContinue(&gMPlayInfo_BGM); return 2; case EXT_CTRL_CODE_CLEAR: @@ -1702,7 +1702,7 @@ u16 RenderText(struct TextPrinter *textPrinter) return 0; } return 2; - case 18: + case EXT_CTRL_CODE_SKIP: textPrinter->printerTemplate.currentX = *textPrinter->printerTemplate.currentChar + textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentChar++; return 2; @@ -1739,11 +1739,11 @@ u16 RenderText(struct TextPrinter *textPrinter) textPrinter->state = 3; TextPrinterInitDownArrowCounters(textPrinter); return 3; - case CHAR_SPECIAL_F9: + case CHAR_EXTRA_SYMBOL: currChar = *textPrinter->printerTemplate.currentChar | 0x100; textPrinter->printerTemplate.currentChar++; break; - case CHAR_SPECIAL_F8: + case CHAR_KEYPAD_ICON: currChar = *textPrinter->printerTemplate.currentChar++; gUnknown_03002F90.unk80 = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY); textPrinter->printerTemplate.currentX += gUnknown_03002F90.unk80 + textPrinter->printerTemplate.letterSpacing; @@ -1891,45 +1891,45 @@ u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) temp2 = strLocal[strPos++]; switch (temp2) { - case 0x4: + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: ++strPos; - case 0xB: - case 0x10: + case EXT_CTRL_CODE_PLAY_BGM: + case EXT_CTRL_CODE_PLAY_SE: ++strPos; - case 0x1: - case 0x2: - case 0x3: - case 0x5: - case 0x6: - case 0x8: - case 0xC: - case 0xD: - case 0xE: - case 0x11: - case 0x12: - case 0x13: - case 0x14: + case EXT_CTRL_CODE_COLOR: + case EXT_CTRL_CODE_HIGHLIGHT: + case EXT_CTRL_CODE_SHADOW: + case EXT_CTRL_CODE_PALETTE: + case EXT_CTRL_CODE_SIZE: + case EXT_CTRL_CODE_PAUSE: + case EXT_CTRL_CODE_ESCAPE: + case EXT_CTRL_CODE_SHIFT_TEXT: + case EXT_CTRL_CODE_SHIFT_DOWN: + case EXT_CTRL_CODE_CLEAR: + case EXT_CTRL_CODE_SKIP: + case EXT_CTRL_CODE_CLEAR_TO: + case EXT_CTRL_CODE_MIN_LETTER_SPACING: ++strPos; break; - case EXT_CTRL_CODE_UNKNOWN_7: - case 0x9: - case 0xA: - case 0xF: + case EXT_CTRL_CODE_RESET_SIZE: + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: + case EXT_CTRL_CODE_WAIT_SE: + case EXT_CTRL_CODE_FILL_WINDOW: case EXT_CTRL_CODE_JPN: case EXT_CTRL_CODE_ENG: default: break; } break; - case CHAR_SPECIAL_F7: + case CHAR_DYNAMIC: case PLACEHOLDER_BEGIN: ++strPos; break; case CHAR_PROMPT_SCROLL: case CHAR_PROMPT_CLEAR: break; - case CHAR_SPECIAL_F8: - case CHAR_SPECIAL_F9: + case CHAR_KEYPAD_ICON: + case CHAR_EXTRA_SYMBOL: ++strPos; default: ++width; @@ -1999,19 +1999,19 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) case PLACEHOLDER_BEGIN: switch (*++str) { - case 0x2: + case PLACEHOLDER_ID_STRING_VAR_1: bufferPointer = gStringVar1; break; - case 0x3: + case PLACEHOLDER_ID_STRING_VAR_2: bufferPointer = gStringVar2; break; - case 0x4: + case PLACEHOLDER_ID_STRING_VAR_3: bufferPointer = gStringVar3; break; default: return 0; } - case CHAR_SPECIAL_F7: + case CHAR_DYNAMIC: if (bufferPointer == NULL) bufferPointer = DynamicPlaceholderTextUtil_GetPlaceholderPtr(*++str); while (*bufferPointer != EOS) @@ -2035,40 +2035,40 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) case EXT_CTRL_CODE_BEGIN: switch (*++str) { - case 0x4: + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: ++str; - case 0xB: - case 0x10: + case EXT_CTRL_CODE_PLAY_BGM: + case EXT_CTRL_CODE_PLAY_SE: ++str; - case 0x1: - case 0x2: - case 0x3: - case 0x5: - case 0x8: - case 0xC: - case 0xD: - case 0xE: + case EXT_CTRL_CODE_COLOR: + case EXT_CTRL_CODE_HIGHLIGHT: + case EXT_CTRL_CODE_SHADOW: + case EXT_CTRL_CODE_PALETTE: + case EXT_CTRL_CODE_PAUSE: + case EXT_CTRL_CODE_ESCAPE: + case EXT_CTRL_CODE_SHIFT_TEXT: + case EXT_CTRL_CODE_SHIFT_DOWN: ++str; break; - case 0x6: + case EXT_CTRL_CODE_SIZE: func = GetFontWidthFunc(*++str); if (func == NULL) return 0; if (letterSpacing == -1) localLetterSpacing = GetFontAttribute(*str, FONTATTR_LETTER_SPACING); break; - case 0x11: + case EXT_CTRL_CODE_CLEAR: glyphWidth = *++str; lineWidth += glyphWidth; break; - case 0x12: + case EXT_CTRL_CODE_SKIP: lineWidth = *++str; break; - case 0x13: + case EXT_CTRL_CODE_CLEAR_TO: if (*++str > lineWidth) lineWidth = *str; break; - case 0x14: + case EXT_CTRL_CODE_MIN_LETTER_SPACING: minGlyphWidth = *++str; break; case EXT_CTRL_CODE_JPN: @@ -2077,17 +2077,17 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) case EXT_CTRL_CODE_ENG: isJapanese = 0; break; - case EXT_CTRL_CODE_UNKNOWN_7: - case 0x9: - case 0xA: - case 0xF: + case EXT_CTRL_CODE_RESET_SIZE: + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: + case EXT_CTRL_CODE_WAIT_SE: + case EXT_CTRL_CODE_FILL_WINDOW: default: break; } break; - case CHAR_SPECIAL_F8: - case CHAR_SPECIAL_F9: - if (*str == CHAR_SPECIAL_F9) + case CHAR_KEYPAD_ICON: + case CHAR_EXTRA_SYMBOL: + if (*str == CHAR_EXTRA_SYMBOL) glyphWidth = func(*++str | 0x100, isJapanese); else glyphWidth = GetKeypadIconWidth(*++str); @@ -2146,11 +2146,11 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str) SaveTextColors(&colorBackup[0], &colorBackup[1], &colorBackup[2]); - fgColor = 1; - bgColor = 0; - shadowColor = 3; + fgColor = TEXT_COLOR_WHITE; + bgColor = TEXT_COLOR_TRANSPARENT; + shadowColor = TEXT_COLOR_LIGHT_GREY; - GenerateFontHalfRowLookupTable(1, 0, 3); + GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GREY); strLocal = str; strPos = 0; @@ -2163,54 +2163,54 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str) temp2 = strLocal[strPos++]; switch (temp2) { - case 0x4: + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: fgColor = strLocal[strPos++]; bgColor = strLocal[strPos++]; shadowColor = strLocal[strPos++]; GenerateFontHalfRowLookupTable(fgColor, bgColor, shadowColor); continue; - case 0x1: + case EXT_CTRL_CODE_COLOR: fgColor = strLocal[strPos++]; GenerateFontHalfRowLookupTable(fgColor, bgColor, shadowColor); continue; - case 0x2: + case EXT_CTRL_CODE_HIGHLIGHT: bgColor = strLocal[strPos++]; GenerateFontHalfRowLookupTable(fgColor, bgColor, shadowColor); continue; - case 0x3: + case EXT_CTRL_CODE_SHADOW: shadowColor = strLocal[strPos++]; GenerateFontHalfRowLookupTable(fgColor, bgColor, shadowColor); continue; - case 0x6: + case EXT_CTRL_CODE_SIZE: fontId = strLocal[strPos++]; break; - case 0xB: - case 0x10: + case EXT_CTRL_CODE_PLAY_BGM: + case EXT_CTRL_CODE_PLAY_SE: ++strPos; - case 0x5: - case 0x8: - case 0xC: - case 0xD: - case 0xE: - case 0x11: - case 0x12: - case 0x13: - case 0x14: + case EXT_CTRL_CODE_PALETTE: + case EXT_CTRL_CODE_PAUSE: + case EXT_CTRL_CODE_ESCAPE: + case EXT_CTRL_CODE_SHIFT_TEXT: + case EXT_CTRL_CODE_SHIFT_DOWN: + case EXT_CTRL_CODE_CLEAR: + case EXT_CTRL_CODE_SKIP: + case EXT_CTRL_CODE_CLEAR_TO: + case EXT_CTRL_CODE_MIN_LETTER_SPACING: ++strPos; break; - case EXT_CTRL_CODE_UNKNOWN_7: - case 0x9: - case 0xA: - case 0xF: + case EXT_CTRL_CODE_RESET_SIZE: + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: + case EXT_CTRL_CODE_WAIT_SE: + case EXT_CTRL_CODE_FILL_WINDOW: case EXT_CTRL_CODE_JPN: case EXT_CTRL_CODE_ENG: default: continue; } break; - case CHAR_SPECIAL_F7: - case CHAR_SPECIAL_F8: - case CHAR_SPECIAL_F9: + case CHAR_DYNAMIC: + case CHAR_KEYPAD_ICON: + case CHAR_EXTRA_SYMBOL: case PLACEHOLDER_BEGIN: ++strPos; break; diff --git a/gflib/text.h b/gflib/text.h index 5b317600e..ba74cde6e 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -169,9 +169,9 @@ #define CHAR_a_DIAERESIS 0xF4 #define CHAR_o_DIAERESIS 0xF5 #define CHAR_u_DIAERESIS 0xF6 -#define CHAR_SPECIAL_F7 0xF7 -#define CHAR_SPECIAL_F8 0xF8 -#define CHAR_SPECIAL_F9 0xF9 +#define CHAR_DYNAMIC 0xF7 +#define CHAR_KEYPAD_ICON 0xF8 +#define CHAR_EXTRA_SYMBOL 0xF9 #define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog #define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog #define EXT_CTRL_CODE_BEGIN 0xFC // extended control code @@ -179,7 +179,22 @@ #define CHAR_NEWLINE 0xFE #define EOS 0xFF // end of string -// Special F9 chars +// CHAR_KEYPAD_ICON chars +#define CHAR_A_BUTTON 0x00 +#define CHAR_B_BUTTON 0x01 +#define CHAR_L_BUTTON 0x02 +#define CHAR_R_BUTTON 0x03 +#define CHAR_START_BUTTON 0x04 +#define CHAR_SELECT_BUTTON 0x05 +#define CHAR_DPAD_UP 0x06 +#define CHAR_DPAD_DOWN 0x07 +#define CHAR_DPAD_LEFT 0x08 +#define CHAR_DPAD_RIGHT 0x09 +#define CHAR_DPAD_UPDOWN 0x0A +#define CHAR_DPAD_LEFTRIGHT 0x0B +#define CHAR_DPAD_NONE 0x0C + +// CHAR_EXTRA_SYMBOL chars #define CHAR_UP_ARROW_2 0x00 #define CHAR_DOWN_ARROW_2 0x01 #define CHAR_LEFT_ARROW_2 0x02 @@ -191,18 +206,30 @@ #define CHAR_NO 0x08 #define CHAR_UNDERSCORE 0x09 -#define EXT_CTRL_CODE_COLOR 0x1 -#define EXT_CTRL_CODE_HIGHLIGHT 0x2 -#define EXT_CTRL_CODE_SHADOW 0x3 -// -#define EXT_CTRL_CODE_UNKNOWN_7 0x7 -// -#define EXT_CTRL_CODE_CLEAR 0x11 -// -#define EXT_CTRL_CODE_CLEAR_TO 0x13 -#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14 -#define EXT_CTRL_CODE_JPN 0x15 -#define EXT_CTRL_CODE_ENG 0x16 +#define EXT_CTRL_CODE_COLOR 0x01 +#define EXT_CTRL_CODE_HIGHLIGHT 0x02 +#define EXT_CTRL_CODE_SHADOW 0x03 +#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04 +#define EXT_CTRL_CODE_PALETTE 0x05 +#define EXT_CTRL_CODE_SIZE 0x06 +#define EXT_CTRL_CODE_RESET_SIZE 0x07 +#define EXT_CTRL_CODE_PAUSE 0x08 +#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09 +#define EXT_CTRL_CODE_WAIT_SE 0x0A +#define EXT_CTRL_CODE_PLAY_BGM 0x0B +#define EXT_CTRL_CODE_ESCAPE 0x0C +#define EXT_CTRL_CODE_SHIFT_TEXT 0x0D +#define EXT_CTRL_CODE_SHIFT_DOWN 0x0E +#define EXT_CTRL_CODE_FILL_WINDOW 0x0F +#define EXT_CTRL_CODE_PLAY_SE 0x10 +#define EXT_CTRL_CODE_CLEAR 0x11 +#define EXT_CTRL_CODE_SKIP 0x12 +#define EXT_CTRL_CODE_CLEAR_TO 0x13 +#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14 +#define EXT_CTRL_CODE_JPN 0x15 +#define EXT_CTRL_CODE_ENG 0x16 +#define EXT_CTRL_CODE_PAUSE_MUSIC 0x17 +#define EXT_CTRL_CODE_RESUME_MUSIC 0x18 #define TEXT_COLOR_TRANSPARENT 0x0 #define TEXT_COLOR_WHITE 0x1 diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index fd18c3187..1dd0914e4 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1468,8 +1468,7 @@ static void MoveSelectionDisplayPpNumber(void) SetPpNumbersPaletteInMoveSelection(); moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]); txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2); - txtPtr[0] = CHAR_SLASH; - txtPtr++; + *(txtPtr)++ = CHAR_SLASH; ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2); BattlePutTextOnWindow(gDisplayedStringBattle, 9); @@ -1481,12 +1480,9 @@ static void MoveSelectionDisplayMoveType(void) struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]); txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType); - txtPtr[0] = EXT_CTRL_CODE_BEGIN; - txtPtr++; - txtPtr[0] = 6; - txtPtr++; - txtPtr[0] = 1; - txtPtr++; + *(txtPtr)++ = EXT_CTRL_CODE_BEGIN; + *(txtPtr)++ = EXT_CTRL_CODE_SIZE; + *(txtPtr)++ = 1; StringCopy(txtPtr, gTypeNames[gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].type]); BattlePutTextOnWindow(gDisplayedStringBattle, 10); diff --git a/src/battle_message.c b/src/battle_message.c index 2fba578dc..14eba28ab 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2756,7 +2756,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) { dst[dstID] = EXT_CTRL_CODE_BEGIN; dstID++; - dst[dstID] = 9; + dst[dstID] = EXT_CTRL_CODE_PAUSE_UNTIL_PRESS; dstID++; } } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6ccefd7be..5c1b1e370 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6340,15 +6340,13 @@ static void PutLevelAndGenderOnLvlUpBox(void) AddTextPrinter(&printerTemplate, 0xFF, NULL); txtPtr = gStringVar4; - gStringVar4[0] = CHAR_SPECIAL_F9; - txtPtr++; - txtPtr[0] = CHAR_LV_2; - txtPtr++; + *(txtPtr)++ = CHAR_EXTRA_SYMBOL; + *(txtPtr)++ = CHAR_LV_2; var = (u32)(txtPtr); txtPtr = ConvertIntToDecimalStringN(txtPtr, monLevel, STR_CONV_MODE_LEFT_ALIGN, 3); var = (u32)(txtPtr) - var; - txtPtr = StringFill(txtPtr, 0x77, 4 - var); + txtPtr = StringFill(txtPtr, CHAR_UNK_SPACER, 4 - var); if (monGender != MON_GENDERLESS) { diff --git a/src/data/union_room.h b/src/data/union_room.h index 704978766..be7bfae71 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -222,7 +222,7 @@ static const u8 *const sAwaitingResponseTexts[] = { ALIGNED(4) const u8 sText_ShowTrainerCard[] = _("The other TRAINER showed\nyou their TRAINER CARD.\pWould you like to show your\nTRAINER CARD?"); ALIGNED(4) const u8 sText_BattleChallenge[] = _("The other TRAINER challenges you\nto battle.\pWill you accept the battle\nchallenge?"); ALIGNED(4) const u8 sText_ChatInvitation[] = _("The other TRAINER invites you\nto chat.\pWill you accept the chat\ninvitation?"); -ALIGNED(4) const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}\pin exchange for a\nLv. {SPECIAL_F7 0x02} {SPECIAL_F7 0x03}.\pWill you accept this trade\noffer?"); +ALIGNED(4) const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {DYNAMIC 0} {DYNAMIC 1}\pin exchange for a\nLv. {DYNAMIC 2} {DYNAMIC 3}.\pWill you accept this trade\noffer?"); ALIGNED(4) const u8 sText_OfferToTradeEgg[] = _("There is an offer to trade your\nregistered EGG.\lWill you accept this trade offer?"); ALIGNED(4) const u8 sText_ChatDropped[] = _("The chat has been dropped.\p"); ALIGNED(4) const u8 sText_OfferDeclined1[] = _("You declined the offer.\p"); @@ -567,17 +567,17 @@ static const u8 *const sCardColorTexts[] = { sText_ItsGoldCard }; -ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}'s\nTRAINER CARD…\l{SPECIAL_F7 0x02}\pPOKéDEX: {SPECIAL_F7 0x03}\nTIME: {SPECIAL_F7 0x04}:{SPECIAL_F7 0x05}\p"); -ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {SPECIAL_F7 0x00} LOSSES: {SPECIAL_F7 0x02}\nTRADES: {SPECIAL_F7 0x03}\p“{SPECIAL_F7 0x04} {SPECIAL_F7 0x05}\n{SPECIAL_F7 0x06} {SPECIAL_F7 0x07}”\p"); -ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{SPECIAL_F7 0x01}: Glad to have met you!{PAUSE 60}"); -ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{SPECIAL_F7 0x01}: Glad to meet you!{PAUSE 60}"); +ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {DYNAMIC 0} {DYNAMIC 1}'s\nTRAINER CARD…\l{DYNAMIC 2}\pPOKéDEX: {DYNAMIC 3}\nTIME: {DYNAMIC 4}:{DYNAMIC 5}\p"); +ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {DYNAMIC 0} LOSSES: {DYNAMIC 2}\nTRADES: {DYNAMIC 3}\p“{DYNAMIC 4} {DYNAMIC 5}\n{DYNAMIC 6} {DYNAMIC 7}”\p"); +ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{DYNAMIC 1}: Glad to have met you!{PAUSE 60}"); +ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{DYNAMIC 1}: Glad to meet you!{PAUSE 60}"); const u8 *const sGladToMeetYouTexts[GENDER_COUNT] = { sText_GladToMeetYouMale, sText_GladToMeetYouFemale }; -ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}"); +ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {DYNAMIC 1}'s\nTRAINER CARD.{PAUSE 60}"); static const u8 *const sLinkGroupActivityNameTexts[] = { [ACTIVITY_NONE] = sText_EmptyString, diff --git a/src/dynamic_placeholder_text_util.c b/src/dynamic_placeholder_text_util.c index bdfcf6653..1ec0c1e06 100644 --- a/src/dynamic_placeholder_text_util.c +++ b/src/dynamic_placeholder_text_util.c @@ -32,7 +32,7 @@ u8 *DynamicPlaceholderTextUtil_ExpandPlaceholders(u8 *dest, const u8 *src) { while (*src != EOS) { - if (*src != CHAR_SPECIAL_F7) + if (*src != CHAR_DYNAMIC) { *dest++ = *src++; } diff --git a/src/international_string_util.c b/src/international_string_util.c index ec5057359..23ca6c081 100644 --- a/src/international_string_util.c +++ b/src/international_string_util.c @@ -136,7 +136,7 @@ void PadNameString(u8 *dest, u8 padChar) while (length < PLAYER_NAME_LENGTH - 1) { dest[length] = EXT_CTRL_CODE_BEGIN; - dest[length + 1] = EXT_CTRL_CODE_UNKNOWN_7; + dest[length + 1] = EXT_CTRL_CODE_RESET_SIZE; length += 2; } } diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index c53e1c59e..db1ba8b43 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -220,9 +220,9 @@ static const u8 sWireless_RSEtoASCIITable[256] = { [CHAR_y] = 'y', [CHAR_z] = 'z', 0x20, 0x20, 0x2b, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - [CHAR_SPECIAL_F7] = ' ', - [CHAR_SPECIAL_F8] = ' ', - [CHAR_SPECIAL_F9] = ' ', + [CHAR_DYNAMIC] = ' ', + [CHAR_KEYPAD_ICON] = ' ', + [CHAR_EXTRA_SYMBOL] = ' ', [CHAR_PROMPT_SCROLL] = ' ', [CHAR_PROMPT_CLEAR] = ' ', [EXT_CTRL_CODE_BEGIN] = ' ', diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index bbf0f8972..af68c6116 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -220,7 +220,7 @@ static void PrepareSongText(void) if (lineNum == 0) { *(wordEnd++) = EXT_CTRL_CODE_BEGIN; - *(wordEnd++) = 15; + *(wordEnd++) = EXT_CTRL_CODE_FILL_WINDOW; } } } diff --git a/src/menu_specialized.c b/src/menu_specialized.c index b7dd1f33a..ecef9982b 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -884,10 +884,10 @@ static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId) u8 *str; *(dst++) = EXT_CTRL_CODE_BEGIN; - *(dst++) = 4; - *(dst++) = 8; - *(dst++) = 0; - *(dst++) = 9; + *(dst++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(dst++) = TEXT_COLOR_BLUE; + *(dst++) = TEXT_COLOR_TRANSPARENT; + *(dst++) = TEXT_COLOR_LIGHT_BLUE; if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL)) { return StringCopyPadded(dst, gText_EggNickname, 0, 12); @@ -920,8 +920,8 @@ static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId) ; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 0x12; - *(str++) = 0x3C; + *(str++) = EXT_CTRL_CODE_SKIP; + *(str++) = 60; switch (gender) { @@ -931,30 +931,30 @@ static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId) case MON_MALE: *(str++) = EXT_CTRL_CODE_BEGIN; *(str++) = EXT_CTRL_CODE_COLOR; - *(str++) = 4; + *(str++) = TEXT_COLOR_RED; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 3; - *(str++) = 5; + *(str++) = EXT_CTRL_CODE_SHADOW; + *(str++) = TEXT_COLOR_LIGHT_RED; *(str++) = CHAR_MALE; break; case MON_FEMALE: *(str++) = EXT_CTRL_CODE_BEGIN; *(str++) = EXT_CTRL_CODE_COLOR; - *(str++) = 6; + *(str++) = TEXT_COLOR_GREEN; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 3; - *(str++) = 7; + *(str++) = EXT_CTRL_CODE_SHADOW; + *(str++) = TEXT_COLOR_LIGHT_GREEN; *(str++) = CHAR_FEMALE; break; } *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 4; - *(str++) = 8; - *(str++) = 0; - *(str++) = 9; + *(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(str++) = TEXT_COLOR_BLUE; + *(str++) = TEXT_COLOR_TRANSPARENT; + *(str++) = TEXT_COLOR_LIGHT_BLUE; *(str++) = CHAR_SLASH; - *(str++) = CHAR_SPECIAL_F9; + *(str++) = CHAR_EXTRA_SYMBOL; *(str++) = CHAR_LV_2; str = ConvertIntToDecimalStringN(str, level, STR_CONV_MODE_LEFT_ALIGN, 3); *(str++) = CHAR_SPACE; @@ -989,10 +989,10 @@ void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, { sub_81D2CD0(nameDst, boxId, monId); dst[0] = EXT_CTRL_CODE_BEGIN; - dst[1] = 4; - dst[2] = 8; - dst[3] = 0; - dst[4] = 9; + dst[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + dst[2] = TEXT_COLOR_BLUE; + dst[3] = TEXT_COLOR_TRANSPARENT; + dst[4] = TEXT_COLOR_LIGHT_BLUE; if (boxId == TOTAL_BOXES_COUNT) // Party mon. { sub_81D2E7C(dst + 5, gText_InParty, 8); diff --git a/src/pokeblock.c b/src/pokeblock.c index f654e0782..025adf875 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -725,8 +725,8 @@ static void PutPokeblockListMenuString(u8 *dst, u16 pkblId) u8 *txtPtr = StringCopy(dst, gPokeblockNames[pkblock->color]); *(txtPtr++) = EXT_CTRL_CODE_BEGIN; - *(txtPtr++) = 0x12; - *(txtPtr++) = 0x57; + *(txtPtr++) = EXT_CTRL_CODE_SKIP; + *(txtPtr++) = 87; ConvertIntToDecimalStringN(gStringVar1, GetHighestPokeblocksFlavorLevel(pkblock), STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(txtPtr, gText_LvVar1); diff --git a/src/pokedex.c b/src/pokedex.c index 777cc52cd..2a6a33633 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4145,7 +4145,7 @@ static void PrintMonHeight(u16 height, u8 left, u8 top) inches = (inches - (feet * 120)) / 10; buffer[i++] = EXT_CTRL_CODE_BEGIN; - buffer[i++] = 0x13; + buffer[i++] = EXT_CTRL_CODE_CLEAR_TO; if (feet / 10 == 0) { buffer[i++] = 18; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 59dc0acce..115c369af 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6869,36 +6869,36 @@ static void SetCursorMonData(void *pokemon, u8 mode) txtPtr = sPSSData->cursorMonGenderLvlText; *(txtPtr)++ = EXT_CTRL_CODE_BEGIN; - *(txtPtr)++ = 4; + *(txtPtr)++ = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; switch (gender) { case MON_MALE: - *(txtPtr)++ = 4; - *(txtPtr)++ = 1; - *(txtPtr)++ = 5; + *(txtPtr)++ = TEXT_COLOR_RED; + *(txtPtr)++ = TEXT_COLOR_WHITE; + *(txtPtr)++ = TEXT_COLOR_LIGHT_RED; *(txtPtr)++ = CHAR_MALE; break; case MON_FEMALE: - *(txtPtr)++ = 6; - *(txtPtr)++ = 1; - *(txtPtr)++ = 7; + *(txtPtr)++ = TEXT_COLOR_GREEN; + *(txtPtr)++ = TEXT_COLOR_WHITE; + *(txtPtr)++ = TEXT_COLOR_LIGHT_GREEN; *(txtPtr)++ = CHAR_FEMALE; break; default: - *(txtPtr)++ = 2; - *(txtPtr)++ = 1; - *(txtPtr)++ = 3; - *(txtPtr)++ = 0x77; + *(txtPtr)++ = TEXT_COLOR_DARK_GREY; + *(txtPtr)++ = TEXT_COLOR_WHITE; + *(txtPtr)++ = TEXT_COLOR_LIGHT_GREY; + *(txtPtr)++ = CHAR_UNK_SPACER; break; } *(txtPtr++) = EXT_CTRL_CODE_BEGIN; - *(txtPtr++) = 4; - *(txtPtr++) = 2; - *(txtPtr++) = 1; - *(txtPtr++) = 3; - *(txtPtr++) = 0; - *(txtPtr++) = CHAR_SPECIAL_F9; + *(txtPtr++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(txtPtr++) = TEXT_COLOR_DARK_GREY; + *(txtPtr++) = TEXT_COLOR_WHITE; + *(txtPtr++) = TEXT_COLOR_LIGHT_GREY; + *(txtPtr++) = CHAR_SPACE; + *(txtPtr++) = CHAR_EXTRA_SYMBOL; *(txtPtr++) = CHAR_LV_2; txtPtr = ConvertIntToDecimalStringN(txtPtr, sPSSData->cursorMonLevel, STR_CONV_MODE_LEFT_ALIGN, 3); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index a3efe09d7..2e7995222 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -709,9 +709,9 @@ static void (*const sTextPrinterTasks[])(u8 taskId) = static const u8 sMemoNatureTextColor[] = _("{COLOR LIGHT_RED}{SHADOW GREEN}"); static const u8 sMemoMiscTextColor[] = _("{COLOR WHITE}{SHADOW DARK_GREY}"); // This is also affected by palettes, apparently -static const u8 sStatsLeftColumnLayout[] = _("{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}\n{SPECIAL_F7 0x03}"); -static const u8 sStatsRightColumnLayout[] = _("{SPECIAL_F7 0x00}\n{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}"); -static const u8 sMovesPPLayout[] = _("{PP}{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}"); +static const u8 sStatsLeftColumnLayout[] = _("{DYNAMIC 0}/{DYNAMIC 1}\n{DYNAMIC 2}\n{DYNAMIC 3}"); +static const u8 sStatsRightColumnLayout[] = _("{DYNAMIC 0}\n{DYNAMIC 1}\n{DYNAMIC 2}"); +static const u8 sMovesPPLayout[] = _("{PP}{DYNAMIC 0}/{DYNAMIC 1}"); #define TAG_MOVE_SELECTOR 30000 #define TAG_MON_STATUS 30001 diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index 84e2a9682..7184271ea 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -337,10 +337,10 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3) boxId = unkPtr->unk4[id].boxId; monId = unkPtr->unk4[id].monId; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 4; - *(str++) = 8; - *(str++) = 0; - *(str++) = 9; + *(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(str++) = TEXT_COLOR_BLUE; + *(str++) = TEXT_COLOR_TRANSPARENT; + *(str++) = TEXT_COLOR_LIGHT_BLUE; if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL)) return StringCopyPadded(str, gText_EggNickname, CHAR_SPACE, 12); @@ -368,40 +368,40 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3) (str_++); *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 0x12; - *(str_++) = 0x3C; + *(str_++) = EXT_CTRL_CODE_SKIP; + *(str_++) = 60; switch (gender) { default: - *(str_++) = 0x77; + *(str_++) = CHAR_UNK_SPACER; break; case MON_MALE: *(str_++) = EXT_CTRL_CODE_BEGIN; *(str_++) = EXT_CTRL_CODE_COLOR; - *(str_++) = 4; + *(str_++) = TEXT_COLOR_RED; *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 3; - *(str_++) = 5; + *(str_++) = EXT_CTRL_CODE_SHADOW; + *(str_++) = TEXT_COLOR_LIGHT_RED; *(str_++) = CHAR_MALE; break; case MON_FEMALE: *(str_++) = EXT_CTRL_CODE_BEGIN; *(str_++) = EXT_CTRL_CODE_COLOR; - *(str_++) = 6; + *(str_++) = TEXT_COLOR_GREEN; *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 3; - *(str_++) = 7; + *(str_++) = EXT_CTRL_CODE_SHADOW; + *(str_++) = TEXT_COLOR_LIGHT_GREEN; *(str_++) = CHAR_FEMALE; break; } *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 4; - *(str_++) = 8; - *(str_++) = 0; - *(str_++) = 9; + *(str_++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(str_++) = TEXT_COLOR_BLUE; + *(str_++) = TEXT_COLOR_TRANSPARENT; + *(str_++) = TEXT_COLOR_LIGHT_BLUE; *(str_++) = CHAR_SLASH; - *(str_++) = CHAR_SPECIAL_F9; + *(str_++) = CHAR_EXTRA_SYMBOL; *(str_++) = CHAR_LV_2; txtPtr = str_; str_ = ConvertIntToDecimalStringN(str_, level, STR_CONV_MODE_LEFT_ALIGN, 3); @@ -429,10 +429,10 @@ void sub_81CD824(s16 arg0, u8 arg1) sub_81CD624(structPtr->unk6368[arg1], arg0, FALSE); boxId = unkPtr->unk4[arg0].boxId; structPtr->unk6320[arg1][0] = EXT_CTRL_CODE_BEGIN; - structPtr->unk6320[arg1][1] = 4; - structPtr->unk6320[arg1][2] = 8; - structPtr->unk6320[arg1][3] = 0; - structPtr->unk6320[arg1][4] = 9; + structPtr->unk6320[arg1][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + structPtr->unk6320[arg1][2] = TEXT_COLOR_BLUE; + structPtr->unk6320[arg1][3] = TEXT_COLOR_TRANSPARENT; + structPtr->unk6320[arg1][4] = TEXT_COLOR_LIGHT_BLUE; if (boxId == TOTAL_BOXES_COUNT) sub_81CD5CC(&structPtr->unk6320[arg1][5], gText_InParty, 8); else diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index 65a85aa7e..32e673aa4 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -581,10 +581,10 @@ bool32 sub_81CE754(u8 a0, u16 a1, bool8 a2) str = sub_81CDD24(a1); AddTextPrinterParameterized(structPtr->unk1820, 1, str, 0, 17, 0, NULL); text[0] = EXT_CTRL_CODE_BEGIN; - text[1] = 4; - text[2] = 8; - text[3] = 0; - text[4] = 9; + 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->unk1821, 1, text, 4, 1, 0, NULL); ConvertIntToDecimalStringN(text + 5, sub_81CDD48(), STR_CONV_MODE_RIGHT_ALIGN, 4); diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 7a48b9234..eea4aa397 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -707,7 +707,7 @@ static void sub_81CF8E4(struct PokenavMonList * item, u8 * dest) } s = StringCopy(gStringVar1, genderStr); *s++ = CHAR_SLASH; - *s++ = CHAR_SPECIAL_F9; + *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); sub_81DB494(dest, 1, gStringVar1, 40); diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index ffc049c47..aad0053a8 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -724,7 +724,7 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest) s = StringCopy(gStringVar1, genderStr); *s++ = CHAR_SLASH; - *s++ = CHAR_SPECIAL_F9; + *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); dest = sub_81DB494(dest, 1, gStringVar1, 54); diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index bb6116472..e5a89acad 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -836,7 +836,7 @@ void sub_81D0FF0(struct PokenavSub14 *structPtr) txtPtr = StringCopy(gStringVar1, genderTxt); *(txtPtr++) = CHAR_SLASH; - *(txtPtr++) = CHAR_SPECIAL_F9; + *(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); diff --git a/src/strings.c b/src/strings.c index 2ea06c1ad..07361ba60 100644 --- a/src/strings.c +++ b/src/strings.c @@ -512,14 +512,14 @@ const u8 gText_EggWillTakeSomeTime[] = _("What will hatch from this?\nIt will ta const u8 gText_EggWillHatchSoon[] = _("It moves occasionally.\nIt should hatch soon."); const u8 gText_EggAboutToHatch[] = _("It's making sounds.\nIt's about to hatch!"); const u8 gText_HMMovesCantBeForgotten2[] = _("HM moves can't be\nforgotten now."); -const u8 gText_XNatureMetAtYZ[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureHatchedAtYZ[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureObtainedInTrade[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a trade."); -const u8 gText_XNatureFatefulEncounter[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a fateful\nencounter at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureProbablyMetAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nprobably met at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}."); -const u8 gText_XNature[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature"); -const u8 gText_XNatureMetSomewhereAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet somewhere at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureHatchedSomewhereAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched somewhere at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}."); +const u8 gText_XNatureMetAtYZ[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nmet at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}."); +const u8 gText_XNatureHatchedAtYZ[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nhatched at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}."); +const u8 gText_XNatureObtainedInTrade[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nobtained in a trade."); +const u8 gText_XNatureFatefulEncounter[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nobtained in a fateful\nencounter at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}."); +const u8 gText_XNatureProbablyMetAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nprobably met at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}."); +const u8 gText_XNature[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature"); +const u8 gText_XNatureMetSomewhereAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nmet somewhere at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}."); +const u8 gText_XNatureHatchedSomewhereAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nhatched somewhere at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}."); const u8 gText_OddEggFoundByCouple[] = _("An odd POKéMON EGG found\nby the DAY CARE couple."); const u8 gText_PeculiarEggNicePlace[] = _("A peculiar POKéMON EGG\nobtained at the nice place."); const u8 gText_PeculiarEggTrade[] = _("A peculiar POKéMON EGG\nobtained in a trade."); @@ -861,14 +861,14 @@ const u8 gText_ExitFromBox[] = _("Exit from the BOX?"); const u8 gText_WhatDoYouWantToDo[] = _("What do you want to do?"); const u8 gText_PleasePickATheme[] = _("Please pick a theme."); const u8 gText_PickTheWallpaper[] = _("Pick the wallpaper."); -const u8 gText_PkmnIsSelected[] = _("{SPECIAL_F7 0x00} is selected."); +const u8 gText_PkmnIsSelected[] = _("{DYNAMIC 0} is selected."); const u8 gText_JumpToWhichBox[] = _("Jump to which BOX?"); const u8 gText_DepositInWhichBox[] = _("Deposit in which BOX?"); -const u8 gText_PkmnWasDeposited[] = _("{SPECIAL_F7 0x00} was deposited."); +const u8 gText_PkmnWasDeposited[] = _("{DYNAMIC 0} was deposited."); const u8 gText_BoxIsFull2[] = _("The BOX is full."); const u8 gText_ReleaseThisPokemon[] = _("Release this POKéMON?"); -const u8 gText_PkmnWasReleased[] = _("{SPECIAL_F7 0x00} was released."); -const u8 gText_ByeByePkmn[] = _("Bye-bye, {SPECIAL_F7 0x00}!"); +const u8 gText_PkmnWasReleased[] = _("{DYNAMIC 0} was released."); +const u8 gText_ByeByePkmn[] = _("Bye-bye, {DYNAMIC 0}!"); const u8 gText_MarkYourPkmn[] = _("Mark your POKéMON."); const u8 gText_ThatsYourLastPkmn[] = _("That's your last POKéMON!"); const u8 gText_YourPartysFull[] = _("Your party's full!"); @@ -876,7 +876,7 @@ const u8 gText_YoureHoldingAPkmn[] = _("You're holding a POKéMON!"); const u8 gText_WhichOneWillYouTake[] = _("Which one will you take?"); const u8 gText_YouCantReleaseAnEgg[] = _("You can't release an EGG."); const u8 gText_ContinueBoxOperations[] = _("Continue BOX operations?"); -const u8 gText_PkmnCameBack[] = _("{SPECIAL_F7 0x00} came back!"); +const u8 gText_PkmnCameBack[] = _("{DYNAMIC 0} came back!"); const u8 gText_WasItWorriedAboutYou[] = _("Was it worried about you?"); const u8 gText_FourEllipsesExclamation[] = _("… … … … !"); const u8 gText_PleaseRemoveTheMail[] = _("Please remove the MAIL."); @@ -884,8 +884,8 @@ const u8 gText_GiveToAPkmn[] = _("GIVE to a POKéMON?"); const u8 gText_PlacedItemInBag[] = _("Placed item in the BAG."); const u8 gText_BagIsFull2[] = _("The BAG is full."); const u8 gText_PutItemInBag[] = _("Put this item in the BAG?"); -const u8 gText_ItemIsNowHeld[] = _("{SPECIAL_F7 0x00} is now held."); -const u8 gText_ChangedToNewItem[] = _("Changed to {SPECIAL_F7 0x00}."); +const u8 gText_ItemIsNowHeld[] = _("{DYNAMIC 0} is now held."); +const u8 gText_ChangedToNewItem[] = _("Changed to {DYNAMIC 0}."); const u8 gText_MailCantBeStored[] = _("MAIL can't be stored!"); const u8 gPCText_Cancel[] = _("CANCEL"); const u8 gPCText_Store[] = _("STORE"); @@ -981,18 +981,18 @@ const u8 gText_TrainerCloseBy[] = _("That TRAINER is close by.\nTalk to the TRAI const u8 gText_InParty[] = _("IN PARTY"); const u8 gText_Number2[] = _("No. "); const u8 gText_Ribbons[] = _("RIBBONS"); // Unused -const u8 gText_PokemonMaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused -const u8 gText_PokemonFemaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused -const u8 gText_PokemonNoGenderLv[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}"); // Unused +const u8 gText_PokemonMaleLv[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}"); // Unused +const u8 gText_PokemonFemaleLv[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}"); // Unused +const u8 gText_PokemonNoGenderLv[] = _("{DYNAMIC 0}/{LV}{DYNAMIC 1}"); // Unused const u8 gText_Unknown[] = _("UNKNOWN"); const u8 gText_Call[] = _("CALL"); const u8 gText_Check[] = _("CHECK"); const u8 gText_Cancel6[] = _("CANCEL"); -const u8 gText_NumberF700[] = _("No. {SPECIAL_F7 0x00}"); -const u8 gText_RibbonsF700[] = _("RIBBONS {SPECIAL_F7 0x00}"); -const u8 gText_PokemonMaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused -const u8 gText_PokemonFemaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused -const u8 gText_PokemonNoGenderLv2[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused +const u8 gText_NumberF700[] = _("No. {DYNAMIC 0}"); +const u8 gText_RibbonsF700[] = _("RIBBONS {DYNAMIC 0}"); +const u8 gText_PokemonMaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused +const u8 gText_PokemonFemaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused +const u8 gText_PokemonNoGenderLv2[] = _("{DYNAMIC 0}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused const u8 gText_CombineFourWordsOrPhrases[] = _("Combine four words or phrases"); const u8 gText_AndMakeYourProfile[] = _("and make your profile."); const u8 gText_CombineSixWordsOrPhrases[] = _("Combine six words or phrases"); @@ -1063,7 +1063,7 @@ const u8 gText_ApprenticesPhrase[] = _("Apprentice's phrase"); const u8 gText_Questionnaire[] = _("QUESTIONNAIRE"); const u8 gText_YouCannotQuitHere[] = _("You cannot quit here."); const u8 gText_SectionMustBeCompleted[] = _("This section must be completed."); -const u8 gText_F700sQuiz[] = _("{SPECIAL_F7 0x00}'s quiz"); +const u8 gText_F700sQuiz[] = _("{DYNAMIC 0}'s quiz"); const u8 gText_Lady[] = _("Lady"); const u8 gText_AfterYouHaveReadTheQuiz[] = _("After you have read the quiz"); const u8 gText_QuestionPressTheAButton[] = _("question, press the A Button."); @@ -1255,16 +1255,16 @@ const u8 gText_QuitChatting[] = _("Quit chatting?"); const u8 gText_RegisterTextWhere[] = _("Register text where?"); const u8 gText_RegisterTextHere[] = _("Register text here?"); const u8 gText_InputText[] = _("Input text."); -const u8 gText_F700JoinedChat[] = _("{SPECIAL_F7 0x00} joined the chat!"); -const u8 gText_F700LeftChat[] = _("{SPECIAL_F7 0x00} left the chat."); -const u8 gJPText_PlayersXPokemon[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめ:"); // Unused -const u8 gJPText_PlayersXPokmonDoesNotExist[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめは いません"); // Unused +const u8 gText_F700JoinedChat[] = _("{DYNAMIC 0} joined the chat!"); +const u8 gText_F700LeftChat[] = _("{DYNAMIC 0} left the chat."); +const u8 gJPText_PlayersXPokemon[] = _("{DYNAMIC 0}の{DYNAMIC 1}ひきめ:"); // Unused +const u8 gJPText_PlayersXPokmonDoesNotExist[] = _("{DYNAMIC 0}の{DYNAMIC 1}ひきめは いません"); // Unused const u8 gText_ExitingChat[] = _("Exiting the chat…"); -const u8 gText_LeaderLeftEndingChat[] = _("The LEADER, {SPECIAL_F7 0x00}, has\nleft, ending the chat."); +const u8 gText_LeaderLeftEndingChat[] = _("The LEADER, {DYNAMIC 0}, has\nleft, ending the chat."); const u8 gText_RegisteredTextChangedOKToSave[] = _("The registered text has been changed.\nIs it okay to save the game?"); const u8 gText_AlreadySavedFile_Chat[] = _("There is already a saved file.\nIs it okay to overwrite it?"); const u8 gText_SavingDontTurnOff_Chat[] = _("SAVING…\nDON'T TURN OFF THE POWER."); -const u8 gText_PlayerSavedGame_Chat[] = _("{SPECIAL_F7 0x00} saved the game."); +const u8 gText_PlayerSavedGame_Chat[] = _("{DYNAMIC 0} saved the game."); const u8 gText_IfLeaderLeavesChatEnds[] = _("If the LEADER leaves, the chat\nwill end. Is that okay?"); const u8 gText_Hello[] = _("HELLO"); const u8 gText_Pokemon2[] = _("POKéMON"); @@ -1301,8 +1301,8 @@ ALIGNED(4) const u8 gText_YouHaveNoBerries[] = _("You have no BERRIES.\nThe game ALIGNED(4) const u8 gText_MemberDroppedOut[] = _("A member dropped out.\nThe game will be canceled."); ALIGNED(4) const u8 gText_TimesUpNoGoodPowder[] = _("Time's up.\pGood BERRY POWDER could not be\nmade…\p"); ALIGNED(4) const u8 gText_CommunicationStandby2[] = _("Communication standby…"); -ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}"); -ALIGNED(4) const u8 gText_1DotF700[] = _("1. {SPECIAL_F7 0x00}"); +ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{DYNAMIC 0}"); +ALIGNED(4) const u8 gText_1DotF700[] = _("1. {DYNAMIC 0}"); ALIGNED(4) const u8 gText_SpaceTimes2[] = _(" time(s)"); ALIGNED(4) const u8 gText_XDotY[] = _("{STR_VAR_1}.{STR_VAR_2}"); ALIGNED(4) const u8 gText_Var1Berry[] = _("{STR_VAR_1} BERRY"); @@ -1375,7 +1375,7 @@ const u8 gText_2Colon[] = _("2:"); const u8 gText_3Colon[] = _("3:"); const u8 gText_4Colon[] = _("4:"); const u8 gText_5Colon[] = _("5:"); -const u8 gText_FirstPlacePrize[] = _("The first-place winner gets\nthis {SPECIAL_F7 0x00}!"); +const u8 gText_FirstPlacePrize[] = _("The first-place winner gets\nthis {DYNAMIC 0}!"); const u8 gText_CantHoldAnyMore[] = _("You can't hold any more!"); const u8 gText_FilledStorageSpace[] = _("It filled its storage space."); const u8 gText_WantToPlayAgain[] = _("Want to play again?"); @@ -1388,7 +1388,7 @@ const u8 gText_PkmnJumpRecords[] = _("POKéMON JUMP RECORDS"); const u8 gText_JumpsInARow[] = _("Jumps in a row:"); const u8 gText_BestScore2[] = _("Best score:"); const u8 gText_ExcellentsInARow[] = _("EXCELLENTS in a row:"); -const u8 gText_AwesomeWonF701F700[] = _("Awesome score! You've\nwon {SPECIAL_F7 0x01} {SPECIAL_F7 0x00}!"); +const u8 gText_AwesomeWonF701F700[] = _("Awesome score! You've\nwon {DYNAMIC 1} {DYNAMIC 0}!"); const u8 gText_FilledStorageSpace2[] = _("It filled its storage space."); const u8 gText_CantHoldMore[] = _("You can't hold any more!"); const u8 gText_WantToPlayAgain2[] = _("Want to play again?"); @@ -1645,10 +1645,10 @@ const u8 gText_PeopleTrading[] = _("People trading:"); const u8 gText_PeopleBattling[] = _("People battling:"); const u8 gText_PeopleInUnionRoom[] = _("People in the UNION ROOM:"); const u8 gText_PeopleCommunicating[] = _("People communicating:"); -const u8 gText_F700Players[] = _("{SPECIAL_F7 0} players"); -const u8 gText_F701Players[] = _("{SPECIAL_F7 1} players"); -const u8 gText_F702Players[] = _("{SPECIAL_F7 2} players"); -const u8 gText_F703Players[] = _("{SPECIAL_F7 3} players"); +const u8 gText_F700Players[] = _("{DYNAMIC 0} players"); +const u8 gText_F701Players[] = _("{DYNAMIC 1} players"); +const u8 gText_F702Players[] = _("{DYNAMIC 2} players"); +const u8 gText_F703Players[] = _("{DYNAMIC 3} players"); const u8 *const gTextTable_Players[] = { gText_F700Players, diff --git a/src/union_room_chat.c b/src/union_room_chat.c index fefb285a8..c656063a2 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -1646,7 +1646,7 @@ static void AppendTextToMessage(void) charsStr = sUnionRoomKeyboardText[sChat->currentPage][sChat->currentRow]; for (i = 0; i < sChat->currentCol; i++) { - if (*charsStr == CHAR_SPECIAL_F9) + if (*charsStr == CHAR_EXTRA_SYMBOL) charsStr++; charsStr++; } @@ -1670,7 +1670,7 @@ static void AppendTextToMessage(void) str = GetEndOfMessagePtr(); while (--strLength != -1 && sChat->bufferCursorPos < MAX_MESSAGE_LENGTH) { - if (*charsStr == CHAR_SPECIAL_F9) + if (*charsStr == CHAR_EXTRA_SYMBOL) { *str = *charsStr; charsStr++; @@ -1705,7 +1705,7 @@ static void SwitchCaseOfLastMessageCharacter(void) sChat->lastBufferCursorPos = sChat->bufferCursorPos - 1; str = GetLastCharOfMessagePtr(); - if (*str != CHAR_SPECIAL_F9) + if (*str != CHAR_EXTRA_SYMBOL) { character = sCaseToggleTable[*str]; if (character) @@ -1763,7 +1763,7 @@ static u8 *GetLastCharOfMessagePtr(void) while (*currChar != EOS) { lastChar = currChar; - if (*currChar == CHAR_SPECIAL_F9) + if (*currChar == CHAR_EXTRA_SYMBOL) currChar++; currChar++; } @@ -1784,7 +1784,7 @@ static u16 GetNumOverflowCharsInMessage(void) strLength -= 10; for (i = 0; i < strLength; i++) { - if (*str == CHAR_SPECIAL_F9) + if (*str == CHAR_EXTRA_SYMBOL) str++; str++; @@ -1925,7 +1925,7 @@ static u8 *GetLimitedMessageStartPtr(void) u8 *str = sChat->messageEntryBuffer; for (i = 0; i < numChars; i++) { - if (*str == CHAR_SPECIAL_F9) + if (*str == CHAR_EXTRA_SYMBOL) *str++; str++; @@ -1942,7 +1942,7 @@ static u16 GetLimitedMessageStartPos(void) u8 *str = sChat->messageEntryBuffer; for (count = 0, i = 0; i < numChars; count++, i++) { - if (*str == CHAR_SPECIAL_F9) + if (*str == CHAR_EXTRA_SYMBOL) str++; str++; diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index a0b1281a4..2ff8c6507 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -57,19 +57,19 @@ u16 Font6Func(struct TextPrinter *textPrinter) char_ = *textPrinter->printerTemplate.currentChar++; switch (char_) { - case 1: + case EXT_CTRL_CODE_COLOR: textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 2: + case EXT_CTRL_CODE_HIGHLIGHT: textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 3: + case EXT_CTRL_CODE_SHADOW: textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 4: + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.bgColor = *++textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.shadowColor = *++textPrinter->printerTemplate.currentChar; @@ -77,43 +77,43 @@ u16 Font6Func(struct TextPrinter *textPrinter) GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 5: + case EXT_CTRL_CODE_PALETTE: textPrinter->printerTemplate.currentChar++; return 2; - case 6: + case EXT_CTRL_CODE_SIZE: subStruct->glyphId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; - case 7: + case EXT_CTRL_CODE_RESET_SIZE: return 2; - case 8: + case EXT_CTRL_CODE_PAUSE: textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++; textPrinter->state = 6; return 2; - case 9: + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: textPrinter->state = 1; if (gTextFlags.autoScroll) { subStruct->autoScrollDelay = 0; } return 3; - case 10: + case EXT_CTRL_CODE_WAIT_SE: textPrinter->state = 5; return 3; - case 11: - case 16: + case EXT_CTRL_CODE_PLAY_BGM: + case EXT_CTRL_CODE_PLAY_SE: textPrinter->printerTemplate.currentChar += 2; return 2; - case 12: + case EXT_CTRL_CODE_ESCAPE: char_ = *++textPrinter->printerTemplate.currentChar; break; - case 13: + case EXT_CTRL_CODE_SHIFT_TEXT: textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++; return 2; - case 14: + case EXT_CTRL_CODE_SHIFT_DOWN: textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++; return 2; - case 15: + case EXT_CTRL_CODE_FILL_WINDOW: FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); return 2; } @@ -126,10 +126,10 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->state = 3; TextPrinterInitDownArrowCounters(textPrinter); return 3; - case 0xF9: + case CHAR_EXTRA_SYMBOL: char_ = *textPrinter->printerTemplate.currentChar++| 0x100; break; - case 0xF8: + case CHAR_KEYPAD_ICON: textPrinter->printerTemplate.currentChar++; return 0; }