diff --git a/charmap.txt b/charmap.txt index 7271c621ca..c26c07e78b 100644 --- a/charmap.txt +++ b/charmap.txt @@ -61,13 +61,6 @@ UP_ARROW = 79 DOWN_ARROW = 7A LEFT_ARROW = 7B RIGHT_ARROW = 7C -@ Case-fixing/unfixing chars -@ These are 1-2 pixel spaces in vanilla. -@ 7D collides with 'ヲ' in JP, -@ but that kana is practically unused in JP text. -FIXED_CASE = 7D -UNFIX_CASE = 7E - SUPER_E = 84 '<' = 85 '>' = 86 @@ -354,10 +347,6 @@ ARCHIE = FD 0A MAXIE = FD 0B KYOGRE = FD 0C GROUDON = FD 0D -@ Like STR_VAR_X, but prepends CHAR_FIXED_CASE -STR_VAR_1_FIXED = FD 82 -STR_VAR_2_FIXED = FD 83 -STR_VAR_3_FIXED = FD 84 @ battle string placeholders diff --git a/data/text/pc_transfer.inc b/data/text/pc_transfer.inc index 01fe80a426..3fa255340b 100644 --- a/data/text/pc_transfer.inc +++ b/data/text/pc_transfer.inc @@ -1,11 +1,11 @@ gText_PkmnTransferredSomeonesPC:: - .string "{STR_VAR_2_FIXED} was transferred to\n" + .string "{STR_VAR_2} was transferred to\n" .string "SOMEONE'S PC.\p" .string "It was placed in \n" .string "BOX “{STR_VAR_1}.”$" gText_PkmnTransferredLanettesPC:: - .string "{STR_VAR_2_FIXED} was transferred to\n" + .string "{STR_VAR_2} was transferred to\n" .string "LANETTE'S PC.\p" .string "It was placed in \n" .string "BOX “{STR_VAR_1}.”$" @@ -13,13 +13,13 @@ gText_PkmnTransferredLanettesPC:: gText_PkmnTransferredSomeonesPCBoxFull:: .string "BOX “{STR_VAR_3}” on\n" .string "SOMEONE'S PC was full.\p" - .string "{STR_VAR_2_FIXED} was transferred to\n" + .string "{STR_VAR_2} was transferred to\n" .string "BOX “{STR_VAR_1}.”$" gText_PkmnTransferredLanettesPCBoxFull:: .string "BOX “{STR_VAR_3}” on\n" .string "LANETTE'S PC was full.\p" - .string "{STR_VAR_2_FIXED} was transferred to\n" + .string "{STR_VAR_2} was transferred to\n" .string "BOX “{STR_VAR_1}.”$" gText_NoMoreRoomForPokemon:: diff --git a/data/text/save.inc b/data/text/save.inc index 4c16fd2fe6..4d17327c9b 100644 --- a/data/text/save.inc +++ b/data/text/save.inc @@ -7,14 +7,14 @@ gText_AlreadySavedFile:: .string "Is it okay to overwrite it?$" gText_SavingDontTurnOff:: - .fixstr "SAVING…\n" + .string "SAVING…\n" .string "DON'T TURN OFF THE POWER.$" gText_PlayerSavedGame:: .string "{PLAYER} saved the game.$" gText_DifferentSaveFile:: - .string "{FIXED_CASE}WARNING!{UNFIX_CASE}\p" + .string "WARNING!\p" .string "There is a different game file that\n" .string "is already saved.\p" .string "If you save now, the other file's\n" @@ -29,5 +29,5 @@ gText_SaveError:: .string "backup memory.$" gText_SavingDontTurnOffPower:: - .fixstr "SAVING…\n" + .string "SAVING…\n" .string "DON'T TURN OFF THE POWER.$" diff --git a/gflib/characters.h b/gflib/characters.h index 3b00fa1eea..8ed440e63a 100644 --- a/gflib/characters.h +++ b/gflib/characters.h @@ -77,9 +77,6 @@ #define CHAR_DOWN_ARROW 0x7A #define CHAR_LEFT_ARROW 0x7B #define CHAR_RIGHT_ARROW 0x7C -// Case-fixing characters -#define CHAR_FIXED_CASE 0x7D -#define CHAR_UNFIX_CASE 0x7E // #define CHAR_SUPER_E 0x84 #define CHAR_LESS_THAN 0x85 @@ -265,10 +262,6 @@ #define PLACEHOLDER_ID_MAXIE 0xB #define PLACEHOLDER_ID_KYOGRE 0xC #define PLACEHOLDER_ID_GROUDON 0xD -// Fixed-case placeholders -// These behave the same as their (id & 0x7F), -// but prepend CHAR_FIXED_CASE -#define PLACEHOLDER_FIXED_MASK 0x80 // battle placeholders are located in battle_message.h diff --git a/gflib/string_util.c b/gflib/string_util.c index 6720299a82..0fde2cb861 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -26,29 +26,11 @@ static const s32 sPowersOfTen[] = 1000000000, }; -// Tries to determine whether `str` is safe to prepend a ctrl char to -// gStringVarX are always safe, as well as stack allocated IWRAM -// (if `length mod 4` is 1 or 2) -bool32 IsStringAddrSafe(u8 *str, u32 length) -{ - if (((u32)str) >> 24 == 3) - return (str >= gStackBase && (length & 3) && (length & 3) <= 2); - return (str >= gStringVar1 && str < sUnknownStringVar); -} - u8 *StringCopy_Nickname(u8 *dest, const u8 *src) { - u32 i; + u8 i; u32 limit = POKEMON_NAME_LENGTH; - if (DECAP_ENABLED && !DECAP_NICKNAMES) - { - if (IsStringAddrSafe(dest, limit) && *src != CHAR_FIXED_CASE) - *dest++ = CHAR_FIXED_CASE; - else if (*src == CHAR_FIXED_CASE) - *dest++ = *src++; - } - for (i = 0; i < limit; i++) { dest[i] = src[i]; @@ -66,9 +48,6 @@ u8 *StringGet_Nickname(u8 *str) u32 i; u32 limit = POKEMON_NAME_LENGTH; - if (DECAP_ENABLED && !DECAP_NICKNAMES && *str == CHAR_FIXED_CASE) - str++; - for (i = 0; i < limit; i++) if (str[i] == EOS) return &str[i]; @@ -82,9 +61,6 @@ u8 *StringCopy_PlayerName(u8 *dest, const u8 *src) s32 i; s32 limit = PLAYER_NAME_LENGTH; - if (DECAP_ENABLED && !DECAP_NICKNAMES && IsStringAddrSafe(dest, limit) && *src != CHAR_FIXED_CASE) - *dest++ = CHAR_FIXED_CASE; - for (i = 0; i < limit; i++) { dest[i] = src[i]; @@ -99,10 +75,6 @@ u8 *StringCopy_PlayerName(u8 *dest, const u8 *src) u8 *StringCopy(u8 *dest, const u8 *src) { - // If `src` is mirrored, prepend fixed-case char - if (DECAP_ENABLED && DECAP_MIRRORING && IsMirrorPtr(src) && *src != CHAR_FIXED_CASE) - *dest++ = CHAR_FIXED_CASE; - while (*src != EOS) { *dest = *src; @@ -152,14 +124,6 @@ u16 StringLength(const u8 *str) s32 StringCompare(const u8 *str1, const u8 *str2) { - // Ignore leading fixed-case char - if (DECAP_ENABLED) - { - if (*str1 == CHAR_FIXED_CASE) - str1++; - if (*str2 == CHAR_FIXED_CASE) - str2++; - } while (*str1 == *str2) { if (*str1 == EOS) @@ -173,14 +137,6 @@ s32 StringCompare(const u8 *str1, const u8 *str2) s32 StringCompareN(const u8 *str1, const u8 *str2, u32 n) { - // Ignore leading fixed-case char - if (DECAP_ENABLED) - { - if (*str1 == CHAR_FIXED_CASE) - str1++; - if (*str2 == CHAR_FIXED_CASE) - str2++; - } while (*str1 == *str2) { if (*str1 == EOS) @@ -379,7 +335,6 @@ u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 u8 *StringExpandPlaceholders(u8 *dest, const u8 *src) { - bool32 fixedCase = FALSE; for (;;) { u8 c = *src++; @@ -390,20 +345,7 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src) { case PLACEHOLDER_BEGIN: placeholderId = *src++; - if (DECAP_ENABLED) - { - // Handle fixed-case versions of placeholders - if (!fixedCase && (placeholderId & PLACEHOLDER_FIXED_MASK || placeholderId == PLACEHOLDER_ID_PLAYER)) - { - *dest++ = CHAR_FIXED_CASE; - expandedString = GetExpandedPlaceholder(placeholderId & ~PLACEHOLDER_FIXED_MASK); - dest = StringExpandPlaceholders(dest, expandedString); - *dest++ = CHAR_UNFIX_CASE; - *dest = EOS; - break; - } - } - expandedString = GetExpandedPlaceholder(placeholderId & ~PLACEHOLDER_FIXED_MASK); + expandedString = GetExpandedPlaceholder(placeholderId); dest = StringExpandPlaceholders(dest, expandedString); break; case EXT_CTRL_CODE_BEGIN: @@ -430,19 +372,8 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src) } break; case EOS: - if (DECAP_ENABLED && fixedCase) - *dest++ = CHAR_UNFIX_CASE; *dest = EOS; return dest; - #if DECAP_ENABLED - case CHAR_UNFIX_CASE: - fixedCase = FALSE; - *dest++ = c; - break; - case CHAR_FIXED_CASE: - fixedCase = TRUE; - // fallthrough - #endif case CHAR_PROMPT_SCROLL: case CHAR_PROMPT_CLEAR: case CHAR_NEWLINE: @@ -769,9 +700,6 @@ static const u8 *SkipExtCtrlCode(const u8 *s) s += GetExtCtrlCodeLength(*s); } - while (DECAP_ENABLED && (*s == CHAR_FIXED_CASE || *s == CHAR_UNFIX_CASE)) - s++; - return s; } diff --git a/gflib/string_util.h b/gflib/string_util.h index 75d2ada0a3..9e5dfffd57 100644 --- a/gflib/string_util.h +++ b/gflib/string_util.h @@ -13,7 +13,6 @@ enum StringConvertMode STR_CONV_MODE_LEADING_ZEROS }; -bool32 IsStringAddrSafe(u8 *ptr, u32 length); u8 *StringCopy_Nickname(u8 *dest, const u8 *src); u8 *StringGet_Nickname(u8 *str); u8 *StringCopy_PlayerName(u8 *dest, const u8 *src); diff --git a/gflib/text.c b/gflib/text.c index cc6a6e90f2..20927e4f80 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -241,35 +241,6 @@ static void SetFontsPointer(const struct FontInfo *fonts) gFonts = fonts; } -// Any ROM address must have bit 27 set (0x8000000) -// so this is used to check if a pointer points to ROM -#define IS_ROM_PTR(ptr) (((u32)ptr) >> 27) - -void * MirrorPtr(const void *ptr) -{ - if (IS_ROM_PTR(ptr)) // ROM - return ROM_MIRROR_PTR(ptr); - else // RAM - return RAM_MIRROR_PTR(ptr); -} - -void * UnmirrorPtr(const void *ptr) -{ - u32 value = (u32) ptr; - if (IS_ROM_PTR(ptr)) // ROM - return (void*)(value & ~ROM_MIRROR_MASK); - else // RAM - return (void*)(value & ~RAM_MIRROR_MASK); -} - -bool32 IsMirrorPtr(const void *ptr) -{ - if (IS_ROM_PTR(ptr)) - return ((u32)ptr) & ROM_MIRROR_MASK; - else - return ((u32)ptr) & RAM_MIRROR_MASK; -} - void DeactivateAllTextPrinters(void) { int printer; @@ -297,11 +268,6 @@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 return AddTextPrinter(&printerTemplate, speed, callback); } -u16 AddTextPrinterFixedCaseParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) -{ - return AddTextPrinterParameterized(windowId, fontId, MirrorPtr(str), x, y, speed, callback); -} - bool32 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) { int i; @@ -315,16 +281,6 @@ bool32 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi sTempTextPrinter.textSpeed = speed; sTempTextPrinter.delayCounter = 0; sTempTextPrinter.scrollDistance = 0; - if (DECAP_ENABLED) - { - // string address is mirrored; treat it as a fixed-case string - // Technically, unmirroring isn't necessary; - // but older emulators may not support mirroring - // printerTemplate->currentChar = UnmirrorPtr(printerTemplate->currentChar); - if (DECAP_MIRRORING && IsMirrorPtr(printerTemplate->currentChar)) - sTempTextPrinter.lastChar = CHAR_FIXED_CASE; - sTempTextPrinter.lastChar = 0; - } for (i = 0; i < (int)ARRAY_COUNT(sTempTextPrinter.subStructFields); i++) sTempTextPrinter.subStructFields[i] = 0; @@ -975,30 +931,10 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool32 drawArrow, u8 * } } -// if table[char] & 0xFF == 0, character is not uppercase -const u16 gLowercaseDiffTable[] = { - // English - [CHAR_SPACE] = 0, - [CHAR_SPACER] = 0, - [CHAR_A ... CHAR_Z] = CHAR_a - CHAR_A, - // é treated as uppercase so POKéDEX, POKéMON, etc. decapped - [CHAR_e_ACUTE] = 0 | MARK_UPPER_FLAG, - [CHAR_SGL_QUOTE_RIGHT] = 0 | MARK_UPPER_FLAG, - // International - [CHAR_A_GRAVE ... CHAR_A_ACUTE] = CHAR_a_GRAVE - CHAR_A_GRAVE, - [CHAR_A_CIRCUMFLEX] = CHAR_a_CIRCUMFLEX, - [CHAR_C_CEDILLA ... CHAR_I_GRAVE] = CHAR_c_CEDILLA - CHAR_C_CEDILLA, - [CHAR_I_ACUTE] = CHAR_i_ACUTE, - [CHAR_I_CIRCUMFLEX ... CHAR_N_TILDE] = CHAR_i_CIRCUMFLEX - CHAR_I_CIRCUMFLEX, - [CHAR_A_DIAERESIS ... CHAR_U_DIAERESIS] = CHAR_a_DIAERESIS - CHAR_A_DIAERESIS, - [EOS] = 0, -}; - static u16 RenderText(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - u32 currChar; - u32 lastChar; + u16 currChar; s32 width; s32 widthHelper; @@ -1026,12 +962,6 @@ static u16 RenderText(struct TextPrinter *textPrinter) currChar = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; - if (DECAP_ENABLED) - { - lastChar = textPrinter->lastChar; - if (lastChar != CHAR_FIXED_CASE) - textPrinter->lastChar = currChar; - } switch (currChar) { @@ -1187,47 +1117,7 @@ static u16 RenderText(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing; return RENDER_PRINT; case EOS: - if (DECAP_ENABLED) - // Clear fixed case - textPrinter->lastChar = currChar; return RENDER_FINISH; - #if DECAP_ENABLED - // Disable/enable decapitalization - // In vanilla these are 1-2 pixel spaces - case CHAR_FIXED_CASE: - case CHAR_UNFIX_CASE: - textPrinter->lastChar = currChar; - if (!textPrinter->japanese) - return RENDER_REPEAT; - break; - // common decap exceptions - case CHAR_V: - if (lastChar == CHAR_T) // TV - lastChar = 0; - break; - case CHAR_M: - if (lastChar == CHAR_T) { // TM - lastChar = 0; - break; - } - case CHAR_P: - if (lastChar == CHAR_H) { // HP, HM - lastChar = 0; - break; - } - case CHAR_C: - if (lastChar == CHAR_P) // PC, PP, PM - lastChar = 0; - break; - #endif - } - - // If not Japanese or fixed case, try to decap - if (DECAP_ENABLED && !textPrinter->japanese && lastChar != CHAR_FIXED_CASE) - { - // Two consecutive uppercase chars; lowercase this one - if (IS_UPPER(currChar) && IS_UPPER(lastChar)) - currChar = TO_LOWER(currChar); } switch (subStruct->fontId) diff --git a/gflib/text.h b/gflib/text.h index 7e1d7bfb11..76d140d86c 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -7,14 +7,6 @@ // loaded at once but not copied to vram yet. #define TEXT_SKIP_DRAW 0xFF -// See include/config/decap.h for decap configuration -#if DECAP_MIRRORING -#define ROM_MIRROR_MASK (0x02000000) -#define RAM_MIRROR_MASK (0x00800000) -#define ROM_MIRROR_PTR(x) ((void*)(((u32)(x)) | ROM_MIRROR_MASK)) -#define RAM_MIRROR_PTR(x) ((void*)(((u32)(x)) | RAM_MIRROR_MASK)) -#endif - enum { FONT_SMALL, FONT_NORMAL, @@ -100,7 +92,6 @@ struct TextPrinter u8 scrollDistance; u8 minLetterSpacing; // 0x20 u8 japanese; - u8 lastChar; // used to determine whether to decap strings }; struct FontInfo @@ -144,19 +135,6 @@ extern TextFlags gTextFlags; extern u8 gDisableTextPrinters; extern struct TextGlyph gCurGlyph; -extern const u16 gLowercaseDiffTable[]; -// in gLowercaseDiffTable, 0x100 represents a character treated as uppercase, -// but that maps to itself; only the lower 8 bits are used for mapping -#define MARK_UPPER_FLAG 0x100 -#define LOWERCASE_DIFF_MASK 0xFF -#define IS_UPPER(x) (gLowercaseDiffTable[(x) & LOWERCASE_DIFF_MASK]) -#define TO_LOWER(x) (((x) + gLowercaseDiffTable[(x)]) & LOWERCASE_DIFF_MASK) - -void * UnmirrorPtr(const void * ptr); -void * MirrorPtr(const void * ptr); -bool32 IsMirrorPtr(const void *ptr); -u16 AddTextPrinterFixedCaseParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); - void DeactivateAllTextPrinters(void); u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); bool32 AddTextPrinter(struct TextPrinterTemplate *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); diff --git a/include/config/decap.h b/include/config/decap.h deleted file mode 100644 index 60168d0a27..0000000000 --- a/include/config/decap.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef GUARD_CONFIG_DECAP_H -#define GUARD_CONFIG_DECAP_H - -/* -Enable automatic decapitalization of *all* text -Exceptions: -- Several bigrams: TV, TM, HP, HM, PC, PP, PM -- Player names, nicknames, box names -- Strings beginning with {FIXED_CASE} -- C strings that use `_C` or `__C` -- ASM strings that use `.fixstr` -- If mirroring enabled, string addresses passed through MirrorPtr -*/ -#define DECAP_ENABLED FALSE -// Enables signaling that a string's case should be preserved -// by *mirroring* its address: i.e 08xxxxxx to 0Axxxxxx -// Unless you are targeting a different platform than the GBA, -// there aren't many reasons to disable this -#define DECAP_MIRRORING TRUE - -// If TRUE, *all* Pokemon nicknames and player names will be decapitalized. -// Otherwise, their case will be preserved. Default FALSE -#define DECAP_NICKNAMES FALSE - -#define DECAP_MAIN_MENU TRUE // Main menu text. -#define DECAP_OPTION_MENU TRUE // Option menu text. -#define DECAP_START_MENU TRUE // Start menu options & Save menu text. -#define DECAP_PARTY_MENU TRUE // Party menu text. -#define DECAP_MAP_NAMES TRUE // Map and location names. -#define DECAP_EASY_CHAT TRUE // Easy Chat words and interface. -#define DECAP_FIELD_MSG TRUE // Field messages (including scripts!). -#define DECAP_SUMMARY TRUE // Summary interface text. -#define DECAP_ITEM_NAMES TRUE // Item names (obtained via ItemId_GetName). - -#endif // GUARD_CONFIG_DECAP_H diff --git a/include/constants/global.h b/include/constants/global.h index bcbf37e2d7..b6d553f8c9 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -7,7 +7,6 @@ #include "config/level_caps.h" #include "config/pokemon.h" #include "config/overworld.h" -#include "config/decap.h" // Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen. // In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen. diff --git a/include/global.h b/include/global.h index 83bff49c0c..7db040697d 100644 --- a/include/global.h +++ b/include/global.h @@ -32,9 +32,6 @@ // We define these when using certain IDEs to fool preproc #define _(x) {x} #define __(x) {x} -// Like the above, but prepends a fixed-case character -#define _C(x) {x} -#define __C(x) {x} #define INCBIN(...) {0} #define INCBIN_U8 INCBIN #define INCBIN_U16 INCBIN @@ -1094,6 +1091,4 @@ struct MapPosition s8 elevation; }; -extern u8 gStackBase[]; // Start of stack-allocated IWRAM - #endif // GUARD_GLOBAL_H diff --git a/ld_script.ld b/ld_script.ld index f54272499c..e9cbae8957 100644 --- a/ld_script.ld +++ b/ld_script.ld @@ -56,7 +56,6 @@ SECTIONS { /* COMMON starts at 0x30022A8 */ INCLUDE "sym_common.ld" *libc.a:sbrkr.o(COMMON); - gStackBase = .; } > IWRAM /* BEGIN ROM DATA */ diff --git a/ld_script_modern.ld b/ld_script_modern.ld index d5724ebf84..fd35a1ca31 100644 --- a/ld_script_modern.ld +++ b/ld_script_modern.ld @@ -52,7 +52,6 @@ SECTIONS { gflib/*.o(COMMON); *libc.a:*.o(COMMON); *libnosys.a:*.o(COMMON); - gStackBase = .; } > IWRAM /* BEGIN ROM DATA */ diff --git a/ld_script_test.ld b/ld_script_test.ld index e05971dfde..ec99609a7e 100644 --- a/ld_script_test.ld +++ b/ld_script_test.ld @@ -55,7 +55,6 @@ SECTIONS { data/*.o(COMMON); test/*.o(COMMON); *libc.a:sbrkr.o(COMMON); - gStackBase = .; /* .persistent starts at 0x3007F00 */ /* WARNING: This is the end of the IRQ stack, if there's too diff --git a/src/battle_message.c b/src/battle_message.c index a54aba645e..0da0cba0e7 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3182,13 +3182,6 @@ static const u8 *BattleStringGetPlayerName(u8 *text, u8 battler) break; } - if (DECAP_ENABLED && !DECAP_NICKNAMES && toCpy != text && *toCpy != CHAR_FIXED_CASE) - { - *text = CHAR_FIXED_CASE; - StringCopyN(text+1, toCpy, PLAYER_NAME_LENGTH + 1); - toCpy = text; - } - return toCpy; } @@ -3245,7 +3238,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (*src == PLACEHOLDER_BEGIN) { src++; - switch (*src & ~PLACEHOLDER_FIXED_MASK) + switch (*src) { case B_TXT_BUFF1: if (gBattleTextBuff1[0] == B_BUFF_PLACEHOLDER_BEGIN) @@ -3620,28 +3613,11 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) if (toCpy != NULL) { - if (DECAP_ENABLED) + while (*toCpy != EOS) { - bool32 fixedCase = *src & PLACEHOLDER_FIXED_MASK; - - if (fixedCase) - dst[dstID++] = CHAR_FIXED_CASE; - - while (*toCpy != EOS) - { - if (*toCpy == CHAR_FIXED_CASE) - fixedCase = TRUE; - else if (*toCpy == CHAR_UNFIX_CASE) - fixedCase = FALSE; - dst[dstID++] = *toCpy++; - } - if (fixedCase) - dst[dstID++] = CHAR_UNFIX_CASE; - } - else - { - while (*toCpy != EOS) - dst[dstID++] = *toCpy++; + dst[dstID] = *toCpy; + dstID++; + toCpy++; } } diff --git a/src/easy_chat.c b/src/easy_chat.c index dbdd80be63..ce3b4fe907 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3954,8 +3954,6 @@ static void PrintTitle(void) static void PrintEasyChatText(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) { - if (DECAP_ENABLED && DECAP_MIRRORING && !DECAP_EASY_CHAT) - str = MirrorPtr(str); AddTextPrinterParameterized(windowId, fontId, str, x, y, speed, callback); } @@ -5242,9 +5240,6 @@ u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows u16 i, j; u16 numColumns = columns - 1; - if (DECAP_ENABLED && !DECAP_EASY_CHAT) - *dest++ = CHAR_FIXED_CASE; - for (i = 0; i < rows; i++) { for (j = 0; j < numColumns; j++) diff --git a/src/field_message_box.c b/src/field_message_box.c index 46f0f2898d..b797e1d353 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -117,15 +117,7 @@ bool8 ShowFieldMessageFromBuffer(void) static void ExpandStringAndStartDrawFieldMessage(const u8 *str, bool32 allowSkippingDelayWithButtonPress) { - if (DECAP_ENABLED && DECAP_MIRRORING && !DECAP_FIELD_MSG) - { - gStringVar4[0] = CHAR_FIXED_CASE; - StringExpandPlaceholders(gStringVar4+1, str); - } - else - { - StringExpandPlaceholders(gStringVar4, str); - } + StringExpandPlaceholders(gStringVar4, str); AddTextPrinterForMessage(allowSkippingDelayWithButtonPress); CreateTask_DrawFieldMessage(); } diff --git a/src/fonts.c b/src/fonts.c index 72de054b73..381fd795e9 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -9,7 +9,7 @@ ALIGNED(4) const u8 gFontSmallNarrowLatinGlyphWidths[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4, - 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 0, 0, 3, + 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 1, 2, 3, 4, 5, 6, 7, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 3, 5, 5, @@ -45,7 +45,7 @@ ALIGNED(4) const u8 gFontSmallLatinGlyphWidths[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 4, 7, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4, - 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 0, 0, 3, + 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 1, 2, 3, 4, 5, 6, 7, 5, 7, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, @@ -81,7 +81,7 @@ ALIGNED(4) const u8 gFontNarrowLatinGlyphWidths[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 4, 8, 8, 8, 7, 8, 8, 4, 4, 6, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4, - 3, 3, 3, 3, 3, 3, 3, 5, 3, 7, 7, 7, 7, 0, 0, 3, + 3, 3, 3, 3, 3, 3, 3, 5, 3, 7, 7, 7, 7, 1, 2, 3, 4, 5, 6, 7, 5, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 3, 5, 3, @@ -117,7 +117,7 @@ ALIGNED(4) const u8 gFontShortLatinGlyphWidths[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 8, 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6, - 3, 3, 3, 3, 3, 3, 3, 6, 3, 12, 12, 12, 12, 0, 0, 3, + 3, 3, 3, 3, 3, 3, 3, 6, 3, 12, 12, 12, 12, 1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, @@ -153,7 +153,7 @@ ALIGNED(4) const u8 gFontNormalLatinGlyphWidths[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6, - 3, 3, 3, 3, 3, 3, 3, 6, 3, 7, 7, 7, 7, 0, 0, 3, + 3, 3, 3, 3, 3, 3, 3, 6, 3, 7, 7, 7, 7, 1, 2, 3, 4, 5, 6, 7, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 6, 3, 6, 3, diff --git a/src/item.c b/src/item.c index c9318ee4a7..3fcafccc02 100644 --- a/src/item.c +++ b/src/item.c @@ -848,10 +848,7 @@ static u16 SanitizeItemId(u16 itemId) const u8 *ItemId_GetName(u16 itemId) { - if (DECAP_ENABLED && DECAP_MIRRORING && !DECAP_ITEM_NAMES) - return ROM_MIRROR_PTR(gItemsInfo[SanitizeItemId(itemId)].name); - else - return gItemsInfo[SanitizeItemId(itemId)].name; + return gItemsInfo[SanitizeItemId(itemId)].name; } u32 ItemId_GetPrice(u16 itemId) diff --git a/src/main.c b/src/main.c index 32e103b6e8..4bd9816398 100644 --- a/src/main.c +++ b/src/main.c @@ -93,14 +93,7 @@ void AgbMain() { *(vu16 *)BG_PLTT = RGB_WHITE; // Set the backdrop to white on startup InitGpuRegManager(); - // Setup waitstates for all ROM mirrors - if (DECAP_ENABLED && DECAP_MIRRORING) - REG_WAITCNT = WAITCNT_PREFETCH_ENABLE - | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3 - | WAITCNT_WS1_S_1 | WAITCNT_WS1_N_3 - | WAITCNT_WS2_S_1 | WAITCNT_WS2_N_3; - else - REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3; + REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3; InitKeys(); InitIntrHandlers(); m4aSoundInit(); diff --git a/src/main_menu.c b/src/main_menu.c index 6a225bf97d..c1f092b2ca 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -163,11 +163,6 @@ * - Destroys itself when done. */ -#if (DECAP_ENABLED) && (DECAP_MIRRORING) && !(DECAP_MAIN_MENU) -#define AddTextPrinterParameterized3(a, b, c, d, e, f, str) AddTextPrinterParameterized3(a, b, c, d, e, f, MirrorPtr(str)) -#endif - - #define OPTION_MENU_FLAG (1 << 15) // Static type declarations diff --git a/src/naming_screen.c b/src/naming_screen.c index 848e5b1a48..0f2e2dbb7f 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1856,18 +1856,7 @@ static void SaveInputText(void) { if (sNamingScreen->textBuffer[i] != CHAR_SPACE && sNamingScreen->textBuffer[i] != EOS) { - // If there is space, prepend fixed-case character - if (DECAP_ENABLED && !DECAP_NICKNAMES - && (sNamingScreen->templateNum == NAMING_SCREEN_PLAYER - || sNamingScreen->templateNum == NAMING_SCREEN_NICKNAME - || sNamingScreen->templateNum == NAMING_SCREEN_CAUGHT_MON) - && sNamingScreen->textBuffer[GetTextEntryPosition()] == EOS) - { - *sNamingScreen->destBuffer = CHAR_FIXED_CASE; - StringCopyN(sNamingScreen->destBuffer + 1, sNamingScreen->textBuffer, sNamingScreen->template->maxChars + 0); - } - else - StringCopyN(sNamingScreen->destBuffer, sNamingScreen->textBuffer, sNamingScreen->template->maxChars + 1); + StringCopyN(sNamingScreen->destBuffer, sNamingScreen->textBuffer, sNamingScreen->template->maxChars + 1); break; } } @@ -2595,3 +2584,5 @@ static const struct SpritePalette sSpritePalettes[] = {gNamingScreenMenu_Pal[4], PALTAG_OK_BUTTON}, {} }; + + diff --git a/src/option_menu.c b/src/option_menu.c index 273353c22b..fda3a24c47 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -24,11 +24,6 @@ #define tButtonMode data[5] #define tWindowFrameType data[6] -#if (DECAP_ENABLED) && (DECAP_MIRRORING) && !(DECAP_OPTION_MENU) -#define AddTextPrinterParameterized3(a, b, c, d, e, f, str) AddTextPrinterParameterized3(a, b, c, d, e, f, MirrorPtr(str)) -#define AddTextPrinterParameterized4(a, b, c, d, e, f, g, h, str) AddTextPrinterParameterized4(a, b, c, d, e, f, g, h, MirrorPtr(str)) -#endif - enum { MENUITEM_TEXTSPEED, diff --git a/src/party_menu.c b/src/party_menu.c index 6b5926bdc0..7a14d0fb72 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -75,12 +75,6 @@ #include "constants/rgb.h" #include "constants/songs.h" -#if (DECAP_ENABLED) && (DECAP_MIRRORING) && !(DECAP_PARTY_MENU) -#define gStringVar4 (MirrorPtr(gStringVar4)) -#define AddTextPrinterParameterized4(a, b, c, d, e, f, g, h, str) (AddTextPrinterParameterized4(a, b, c, d, e, f, g, h, MirrorPtr(str))) -#define AddTextPrinterParameterized3(a, b, c, d, e, f, str) AddTextPrinterParameterized3(a, b, c, d, e, f, MirrorPtr(str)) -#endif - enum { MENU_SUMMARY, MENU_SWITCH, @@ -2752,10 +2746,7 @@ static void PrintMessage(const u8 *text) { DrawStdFrameWithCustomTileAndPalette(WIN_MSG, FALSE, 0x4F, 13); gTextFlags.canABSpeedUpPrint = TRUE; - if (DECAP_ENABLED && DECAP_MIRRORING && !DECAP_PARTY_MENU) - AddTextPrinterParameterized2(WIN_MSG, FONT_NORMAL, MirrorPtr(text), GetPlayerTextSpeedDelay(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - else - AddTextPrinterParameterized2(WIN_MSG, FONT_NORMAL, text, GetPlayerTextSpeedDelay(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(WIN_MSG, FONT_NORMAL, text, GetPlayerTextSpeedDelay(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void PartyMenuDisplayYesNoMenu(void) diff --git a/src/pokemon.c b/src/pokemon.c index e7db64cd9a..b02eb87d93 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2204,8 +2204,6 @@ u32 GetBoxMonData3(struct BoxPokemon *boxMon, s32 field, u8 *data) } else { - if (DECAP_ENABLED && !DECAP_NICKNAMES && IsStringAddrSafe(data, POKEMON_NAME_LENGTH)) - *data++ = CHAR_FIXED_CASE; retVal = 0; while (retVal < min(sizeof(boxMon->nickname), POKEMON_NAME_LENGTH)) { @@ -2574,8 +2572,6 @@ u32 GetBoxMonData3(struct BoxPokemon *boxMon, s32 field, u8 *data) break; case MON_DATA_OT_NAME: { - if (DECAP_ENABLED && !DECAP_NICKNAMES && IsStringAddrSafe(data, PLAYER_NAME_LENGTH)) - *data++ = CHAR_FIXED_CASE; retVal = 0; while (retVal < PLAYER_NAME_LENGTH) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 8f981ed854..88a7dee20e 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5548,10 +5548,7 @@ static void InitBoxTitle(u8 boxId) sStorage->wallpaperPalBits |= (1 << 16) << tagIndex; StringCopyPadded(sStorage->boxTitleText, GetBoxNamePtr(boxId), 0, BOX_NAME_LENGTH); - if (DECAP_ENABLED && DECAP_MIRRORING) - DrawTextWindowAndBufferTiles(MirrorPtr(sStorage->boxTitleText), sStorage->boxTitleTiles, 0, 0, 2); - else - DrawTextWindowAndBufferTiles(sStorage->boxTitleText, sStorage->boxTitleTiles, 0, 0, 2); + DrawTextWindowAndBufferTiles(sStorage->boxTitleText, sStorage->boxTitleTiles, 0, 0, 2); LoadSpriteSheet(&spriteSheet); x = GetBoxTitleBaseX(GetBoxNamePtr(boxId)); @@ -9609,10 +9606,7 @@ struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 boxPosition) u8 *GetBoxNamePtr(u8 boxId) { if (boxId < TOTAL_BOXES_COUNT) - if (DECAP_ENABLED && DECAP_MIRRORING) - return MirrorPtr(gPokemonStoragePtr->boxNames[boxId]); - else - return gPokemonStoragePtr->boxNames[boxId]; + return gPokemonStoragePtr->boxNames[boxId]; else return NULL; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index f5c2e7f6b7..d47d5d7f27 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -2797,10 +2797,7 @@ static void ResetWindows(void) static void PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, u8 y, u8 lineSpacing, u8 colorId) { - if (DECAP_ENABLED && DECAP_MIRRORING && !DECAP_SUMMARY) - AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, lineSpacing, sTextColors[colorId], 0, MirrorPtr(string)); - else - AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, lineSpacing, sTextColors[colorId], 0, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, lineSpacing, sTextColors[colorId], 0, string); } static void PrintMonInfo(void) diff --git a/src/region_map.c b/src/region_map.c index 36c6ae8fc6..8936e668ac 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1570,9 +1570,6 @@ u8 *GetMapName(u8 *dest, u16 regionMapId, u16 padLength) u8 *str; u16 i; - if (DECAP_ENABLED && !DECAP_MAP_NAMES) - *dest++ = CHAR_FIXED_CASE; - if (regionMapId == MAPSEC_SECRET_BASE) { str = GetSecretBaseMapName(dest); diff --git a/src/start_menu.c b/src/start_menu.c index 857eed168d..0525ccf70d 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -48,10 +48,6 @@ #include "constants/rgb.h" #include "constants/songs.h" -#if (DECAP_ENABLED) && (DECAP_MIRRORING) && !(DECAP_START_MENU) -#define AddTextPrinterParameterized (AddTextPrinterFixedCaseParameterized) -#endif - // Menu actions enum { diff --git a/src/strings.c b/src/strings.c index 4fde380240..ff1c3dbed4 100644 --- a/src/strings.c +++ b/src/strings.c @@ -2,7 +2,6 @@ #include "strings.h" #include "battle_pyramid_bag.h" #include "item_menu.h" -#include "text.h" ALIGNED(4) const u8 gText_ExpandedPlaceholder_Empty[] = _(""); @@ -176,7 +175,7 @@ const u8 gText_Number[] = _("No. "); const u8 gText_Level[] = _("Lv. "); const u8 gText_IdNumberSlash[] = _("IDNo. /"); // Unused const u8 gText_Name[] = _("NAME"); -const u8 gText_IDNumber[] = _C("IDNo."); +const u8 gText_IDNumber[] = _("IDNo."); const u8 gText_BirchInTrouble[] = _("PROF. BIRCH is in trouble!\nRelease a POKéMON and rescue him!"); const u8 gText_ConfirmStarterChoice[] = _("Do you choose this POKéMON?"); const u8 gText_Pokemon4[] = _("POKéMON"); // Unused @@ -504,7 +503,7 @@ const u8 gText_SpDef4[] = _("SP. DEF"); const u8 gText_Speed2[] = _("SPEED"); const u8 gText_HP4[] = _("HP"); const u8 gText_EmptyString8[] = _(""); // Unused -const u8 gText_OTSlash[] = _C("OT/"); +const u8 gText_OTSlash[] = _("OT/"); const u8 gText_RentalPkmn[] = _("RENTAL POKéMON"); const u8 gText_TypeSlash[] = _("TYPE/"); const u8 gText_Power[] = _("POWER"); @@ -521,7 +520,7 @@ const u8 gText_Switch[] = _("SWITCH"); const u8 gText_PkmnInfo[] = _("POKéMON INFO"); const u8 gText_PkmnSkills[] = _("POKéMON SKILLS"); const u8 gText_BattleMoves[] = _("BATTLE MOVES"); -const u8 gText_ContestMoves[] = _("CONTEST MOVES"); +const u8 gText_ContestMoves[] = _("C0NTEST MOVES"); const u8 gText_Info[] = _("INFO"); const u8 gText_EggWillTakeALongTime[] = _("It looks like this EGG will\ntake a long time to hatch."); const u8 gText_EggWillTakeSomeTime[] = _("What will hatch from this?\nIt will take some time."); @@ -1107,15 +1106,9 @@ const u8 gText_GamePlayCannotBeContinued[] = _("{COLOR RED}“Game play cannot b const u8 gText_CheckCompleted[] = _("Check completed.\nAttempting to save again.\nPlease wait."); const u8 gText_SaveCompleteGameCannotContinue[] = _("Save completed.\n{COLOR RED}“Game play cannot be continued.\nReturning to the title screen.”"); const u8 gText_SaveCompletePressA[] = _("Save completed.\n{COLOR RED}“Please press the A Button.”"); -#if (DECAP_ENABLED) && !(DECAP_MAP_NAMES) -const u8 gText_Ferry[] = _C("FERRY"); -const u8 gText_SecretBase[] = _C("SECRET BASE"); -const u8 gText_Hideout[] = _C("HIDEOUT"); -#else const u8 gText_Ferry[] = _("FERRY"); const u8 gText_SecretBase[] = _("SECRET BASE"); const u8 gText_Hideout[] = _("HIDEOUT"); -#endif const u8 gText_ResetRTCConfirmCancel[] = _("Reset RTC?\nA: Confirm, B: Cancel"); const u8 gText_PresentTime[] = _("Present time in game"); const u8 gText_PreviousTime[] = _("Previous time in game"); @@ -1213,7 +1206,7 @@ const u8 gText_PkmnFainted_FldPsn[] = _("{STR_VAR_1} survived the poisoning.\nTh #endif const u8 gText_Marco[] = _("MARCO"); const u8 gText_TrainerCardName[] = _("NAME: "); -const u8 gText_TrainerCardIDNo[] = _C("IDNo."); +const u8 gText_TrainerCardIDNo[] = _("IDNo."); const u8 gText_TrainerCardMoney[] = _("MONEY"); const u8 gText_PokeDollar[] = _("¥"); // Unused const u8 gText_TrainerCardPokedex[] = _("POKéDEX"); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index b800f9099f..30183a6dc8 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -12,7 +12,6 @@ #include "random.h" #include "test/battle.h" #include "window.h" -#include "text.h" #include "constants/trainers.h" #if defined(__INTELLISENSE__) @@ -1186,13 +1185,6 @@ static s32 TryMessage(s32 i, s32 n, const u8 *string) if (string[j] == CHAR_PROMPT_CLEAR) j++; } - if (DECAP_ENABLED && (string[j] == CHAR_FIXED_CASE || string[j] == CHAR_UNFIX_CASE)) - { - // Ignores case-fixing characters in string - // k will be incremented in 'continue' - k--; - continue; - } if (string[j] != event->pattern[k]) { break; diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index 95655f6ac9..04a7410e00 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -170,8 +170,6 @@ Directive AsmFile::GetDirective() if (CheckForDirective(".include")) return Directive::Include; - else if (CheckForDirective(".fixstr")) - return Directive::FixedString; else if (CheckForDirective(".string")) return Directive::String; else if (CheckForDirective(".braille")) diff --git a/tools/preproc/asm_file.h b/tools/preproc/asm_file.h index 9659c7264f..29435f76a4 100644 --- a/tools/preproc/asm_file.h +++ b/tools/preproc/asm_file.h @@ -31,7 +31,6 @@ enum class Directive Include, String, Braille, - FixedString, Unknown }; diff --git a/tools/preproc/c_file.cpp b/tools/preproc/c_file.cpp index d400a75d04..508c628731 100644 --- a/tools/preproc/c_file.cpp +++ b/tools/preproc/c_file.cpp @@ -195,7 +195,6 @@ void CFile::TryConvertString() long oldPos = m_pos; long oldLineNum = m_lineNum; bool noTerminator = false; - bool fixedCase = false; if (m_buffer[m_pos] != '_' || (m_pos > 0 && IsIdentifierChar(m_buffer[m_pos - 1]))) return; @@ -208,13 +207,6 @@ void CFile::TryConvertString() m_pos++; } - // Fixed-case string - if (m_buffer[m_pos] == 'C') - { - fixedCase = true; - m_pos++; - } - SkipWhitespace(); if (m_buffer[m_pos] != '(') @@ -242,13 +234,7 @@ void CFile::TryConvertString() try { - if (fixedCase) { - s[0] = '\x7d'; // FIXED_CASE - m_pos += stringParser.ParseString(m_pos, s+1, length); - length++; - } else { - m_pos += stringParser.ParseString(m_pos, s, length); - } + m_pos += stringParser.ParseString(m_pos, s, length); } catch (std::runtime_error& e) { diff --git a/tools/preproc/preproc.cpp b/tools/preproc/preproc.cpp index 554482dfb1..eb2d4c8a23 100644 --- a/tools/preproc/preproc.cpp +++ b/tools/preproc/preproc.cpp @@ -76,16 +76,6 @@ void PreprocAsmFile(std::string filename) PrintAsmBytes(s, length); break; } - // Like String, but prepends FIXED_CASE char - case Directive::FixedString: - { - unsigned char s[kMaxStringLength]; - int length = 0; - s[length++] = '\x7d'; // FIXED_CASE - length += stack.top().ReadString(s+length); - PrintAsmBytes(s, length); - break; - } case Directive::Braille: { unsigned char s[kMaxStringLength];