From 306ce048ad07d62bed2028bfc8f30c03f5bc8db7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 8 Sep 2019 21:07:54 -0400 Subject: Move gflib srcs and headers to gflib subdir --- src/naming_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index 7da7d99b0..b259d9a24 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1,6 +1,6 @@ #include "global.h" #include "naming_screen.h" -#include "alloc.h" +#include "malloc.h" #include "palette.h" #include "task.h" #include "sprite.h" -- cgit v1.2.3 From 6ab192e7393a23ef811a83bdc7e631eafdf368b9 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 17 Sep 2019 01:49:07 -0400 Subject: Review changes for #807 --- src/naming_screen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index 7da7d99b0..472489a26 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -541,16 +541,16 @@ static void DisplaySentToPCMessage(void) { u8 stringToDisplay = 0; - if (!sub_813B260()) + if (!IsDestinationBoxFull()) { - StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN))); + StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); StringCopy(gStringVar2, gNamingScreenData->destBuffer); } else { - StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN))); + StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); StringCopy(gStringVar2, gNamingScreenData->destBuffer); - StringCopy(gStringVar3, GetBoxNamePtr(get_unknown_box_id())); + StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon())); stringToDisplay = 2; } -- cgit v1.2.3 From 53bc1bd0d196ff5975c76be474d033db778aa6e2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 30 Sep 2019 00:09:29 -0400 Subject: Document text input strings --- src/naming_screen.c | 116 ++++++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 54 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index 472489a26..c4dbe2bda 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -43,18 +43,6 @@ extern const u8 gText_YourName[]; extern const u8 gText_BoxName[]; extern const u8 gText_PkmnsNickname[]; extern const u8 gText_TellHimTheWords[]; -extern const u8 gUnknown_0862B88D[]; -extern const u8 gUnknown_0862B8AE[]; -extern const u8 gUnknown_0862B8CF[]; -extern const u8 gUnknown_0862B8F0[]; -extern const u8 gUnknown_0862B911[]; -extern const u8 gUnknown_0862B932[]; -extern const u8 gUnknown_0862B953[]; -extern const u8 gUnknown_0862B974[]; -extern const u8 gUnknown_0862B995[]; -extern const u8 gUnknown_0862B9AE[]; -extern const u8 gUnknown_0862B9C7[]; -extern const u8 gUnknown_0862B9E0[]; // start of .rodata @@ -171,7 +159,7 @@ static const struct SpriteTemplate gUnknown_0858C138; static const struct SpriteTemplate sSpriteTemplate_InputArrow; static const struct SpriteTemplate sSpriteTemplate_Underscore; static const struct SpriteTemplate gUnknown_0858C180; -static const u8* const gUnknown_0858C198[][4]; +static const u8* const sNamingScreenKeyboardText[KBPAGE_COUNT][KBROW_COUNT]; static const struct SpriteSheet gUnknown_0858C1C8[]; static const struct SpritePalette gUnknown_0858C230[]; @@ -428,35 +416,52 @@ static void sub_80E31B0(u8 taskId) } } -static const u8 gUnknown_0858BEBB[] = { 0, 2, 1 }; -static const u8 gUnknown_0858BEBE[] = { 1, 0, 2 }; -static const u8 gUnknown_0858BEC1[] = { 2, 1, 0 }; +static const u8 sPageOrderLowerFirst[] = +{ + KBPAGE_LETTERS_LOWER, + KBPAGE_SYMBOLS, + KBPAGE_LETTERS_UPPER +}; + +static const u8 sPageOrderUpperFirst[] = +{ + KBPAGE_LETTERS_UPPER, + KBPAGE_LETTERS_LOWER, + KBPAGE_SYMBOLS +}; + +static const u8 sPageOrderSymbolsFirst[] = +{ + KBPAGE_SYMBOLS, + KBPAGE_LETTERS_UPPER, + KBPAGE_LETTERS_LOWER +}; static u8 sub_80E3244(u8 a1) { - return gUnknown_0858BEBB[a1]; + return sPageOrderLowerFirst[a1]; } static u8 sub_80E3254(void) { - return gUnknown_0858BEBE[gNamingScreenData->currentPage]; + return sPageOrderUpperFirst[gNamingScreenData->currentPage]; } static u8 sub_80E3274(void) { - return gUnknown_0858BEC1[gNamingScreenData->currentPage]; + return sPageOrderSymbolsFirst[gNamingScreenData->currentPage]; } static bool8 MainState_BeginFadeIn(void) { sub_80E4CF8(3, gUnknown_08DD4544); - gNamingScreenData->currentPage = PAGE_UPPER; + gNamingScreenData->currentPage = KBPAGE_LETTERS_UPPER; sub_80E4CF8(2, gUnknown_08DD46E0); sub_80E4CF8(1, gUnknown_08DD4620); - sub_80E4DE4(gNamingScreenData->windows[1], 0); - sub_80E4DE4(gNamingScreenData->windows[0], 1); - nullsub_10(2, 0); - nullsub_10(1, 1); + sub_80E4DE4(gNamingScreenData->windows[1], KBPAGE_LETTERS_LOWER); + sub_80E4DE4(gNamingScreenData->windows[0], KBPAGE_LETTERS_UPPER); + nullsub_10(2, KBPAGE_LETTERS_LOWER); + nullsub_10(1, KBPAGE_LETTERS_UPPER); sub_80E4D10(); sub_80E4964(); sub_80E4EF0(); @@ -1660,7 +1665,7 @@ static void sub_80E4CF8(u8 bg, const void *src) CopyToBgTilemapBuffer(bg, src, 0, 0); } -static void nullsub_10(u8 a1, u8 a2) +static void nullsub_10(u8 a1, u8 page) { } @@ -1703,29 +1708,29 @@ static const struct TextColorThing sUnkColorStruct = } }; -static const u8 sFillValues[3] = +static const u8 sFillValues[KBPAGE_COUNT] = { - PIXEL_FILL(0xE), - PIXEL_FILL(0xD), - PIXEL_FILL(0xF) + [KBPAGE_LETTERS_LOWER] = PIXEL_FILL(0xE), + [KBPAGE_LETTERS_UPPER] = PIXEL_FILL(0xD), + [KBPAGE_SYMBOLS] = PIXEL_FILL(0xF) }; -static const u8 *const sUnkColors[3] = +static const u8 *const sUnkColors[KBPAGE_COUNT] = { - sUnkColorStruct.colors[1], - sUnkColorStruct.colors[0], - sUnkColorStruct.colors[2] + [KBPAGE_LETTERS_LOWER] = sUnkColorStruct.colors[1], + [KBPAGE_LETTERS_UPPER] = sUnkColorStruct.colors[0], + [KBPAGE_SYMBOLS] = sUnkColorStruct.colors[2] }; -static void sub_80E4DE4(u8 window, u8 a1) +static void sub_80E4DE4(u8 window, u8 page) { u8 i; - FillWindowPixelBuffer(window, sFillValues[a1]); + FillWindowPixelBuffer(window, sFillValues[page]); - for (i = 0; i < 4; i++) + for (i = 0; i < KBROW_COUNT; i++) { - AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sUnkColors[a1], 0, gUnknown_0858C198[a1][i]); + AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sUnkColors[page], 0, sNamingScreenKeyboardText[page][i]); } PutWindowTilemap(window); @@ -1857,7 +1862,7 @@ static const struct NamingScreenTemplate playerNamingScreenTemplate = .maxChars = 7, .iconFunction = 1, .addGenderIcon = 0, - .initialPage = PAGE_UPPER, + .initialPage = KBPAGE_LETTERS_UPPER, .unused = 35, .title = gText_YourName, }; @@ -1868,7 +1873,7 @@ static const struct NamingScreenTemplate pcBoxNamingTemplate = .maxChars = 8, .iconFunction = 2, .addGenderIcon = 0, - .initialPage = PAGE_UPPER, + .initialPage = KBPAGE_LETTERS_UPPER, .unused = 19, .title = gText_BoxName, }; @@ -1879,7 +1884,7 @@ static const struct NamingScreenTemplate monNamingScreenTemplate = .maxChars = 10, .iconFunction = 3, .addGenderIcon = 1, - .initialPage = PAGE_UPPER, + .initialPage = KBPAGE_LETTERS_UPPER, .unused = 35, .title = gText_PkmnsNickname, }; @@ -1890,7 +1895,7 @@ static const struct NamingScreenTemplate wandaWordsScreenTemplate = .maxChars = 15, .iconFunction = 4, .addGenderIcon = 0, - .initialPage = PAGE_UPPER, + .initialPage = KBPAGE_LETTERS_UPPER, .unused = 11, .title = gText_TellHimTheWords, }; @@ -2144,25 +2149,28 @@ static const struct SpriteTemplate gUnknown_0858C180 = .callback = SpriteCallbackDummy }; -static const u8* const gUnknown_0858C198[][4] = +static const u8* const sNamingScreenKeyboardText[KBPAGE_COUNT][KBROW_COUNT] = { + [KBPAGE_LETTERS_LOWER] = { - gUnknown_0862B88D, - gUnknown_0862B8AE, - gUnknown_0862B8CF, - gUnknown_0862B8F0 + gText_NamingScreenKeyboard_abcdef, + gText_NamingScreenKeyboard_ghijkl, + gText_NamingScreenKeyboard_mnopqrs, + gText_NamingScreenKeyboard_tuvwxyz }, + [KBPAGE_LETTERS_UPPER] = { - gUnknown_0862B911, - gUnknown_0862B932, - gUnknown_0862B953, - gUnknown_0862B974 + gText_NamingScreenKeyboard_ABCDEF, + gText_NamingScreenKeyboard_GHIJKL, + gText_NamingScreenKeyboard_MNOPQRS, + gText_NamingScreenKeyboard_TUVWXYZ }, + [KBPAGE_SYMBOLS] = { - gUnknown_0862B995, - gUnknown_0862B9AE, - gUnknown_0862B9C7, - gUnknown_0862B9E0 + gText_NamingScreenKeyboard_01234, + gText_NamingScreenKeyboard_56789, + gText_NamingScreenKeyboard_Symbols1, + gText_NamingScreenKeyboard_Symbols2 }, }; -- cgit v1.2.3 From ca2c6fa9b1222c1e871c41c497b8690405845b66 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Oct 2019 18:07:08 -0400 Subject: Document pc_transfer.inc --- src/naming_screen.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index cc73031aa..73eda32c8 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -34,10 +34,6 @@ extern u16 gKeyRepeatStartDelay; // extern text extern const u8 gExpandedPlaceholder_Empty[]; -extern const u8 gText_PkmnTransferredSomeonesPC[]; -extern const u8 gText_PkmnTransferredLanettesPC[]; -extern const u8 gText_PkmnBoxSomeonesPCFull[]; -extern const u8 gText_PkmnBoxLanettesPCFull[]; extern const u8 gText_MoveOkBack[]; extern const u8 gText_YourName[]; extern const u8 gText_BoxName[]; @@ -51,12 +47,12 @@ static const u8 gSpriteImage_858BCB8[] = INCBIN_U8("graphics/naming_screen/pc_ic static const u16 gUnknown_0858BD78[] = INCBIN_U16("graphics/naming_screen/0.gbapal"); static const u16 gUnknown_0858BD98[] = INCBIN_U16("graphics/naming_screen/1.gbapal"); -static const u8 *const gUnknown_0858BDB8[] = +static const u8 *const sTransferredToPCMessages[] = { gText_PkmnTransferredSomeonesPC, gText_PkmnTransferredLanettesPC, - gText_PkmnBoxSomeonesPCFull, - gText_PkmnBoxLanettesPCFull + gText_PkmnTransferredSomeonesPCBoxFull, + gText_PkmnTransferredLanettesPCBoxFull }; static const u8 gUnknown_0858BDC8[] = _("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"); @@ -562,7 +558,7 @@ static void DisplaySentToPCMessage(void) if (FlagGet(FLAG_SYS_PC_LANETTE)) stringToDisplay++; - StringExpandPlaceholders(gStringVar4, gUnknown_0858BDB8[stringToDisplay]); + StringExpandPlaceholders(gStringVar4, sTransferredToPCMessages[stringToDisplay]); DrawDialogueFrame(0, 0); gTextFlags.canABSpeedUpPrint = TRUE; AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); -- cgit v1.2.3 From 548af3c0f1a2807e791fe7bbfe1fc57ddb726c5e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Dec 2019 15:33:36 -0500 Subject: Document a bit of Match Call --- src/naming_screen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index 73eda32c8..a282b728a 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -33,7 +33,6 @@ EWRAM_DATA static struct NamingScreenData *gNamingScreenData = NULL; extern u16 gKeyRepeatStartDelay; // extern text -extern const u8 gExpandedPlaceholder_Empty[]; extern const u8 gText_MoveOkBack[]; extern const u8 gText_YourName[]; extern const u8 gText_BoxName[]; @@ -1679,7 +1678,7 @@ static void sub_80E4D10(void) for (i = 0; i < maxChars; i++) { temp[0] = gNamingScreenData->textBuffer[i]; - temp[1] = gExpandedPlaceholder_Empty[0]; + temp[1] = gText_ExpandedPlaceholder_Empty[0]; unk2 = (sub_80E503C(temp[0]) == 1) ? 2 : 0; AddTextPrinterParameterized(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL); -- cgit v1.2.3 From 27567719586859201cab665f9406ef8f39a39748 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 4 Dec 2019 21:00:45 -0500 Subject: More usage of ST_OAM constants and SPRITE macros --- src/naming_screen.c | 172 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 152 insertions(+), 20 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index 73eda32c8..ebf57be0c 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -914,7 +914,7 @@ static void CursorInit(void) gNamingScreenData->cursorSpriteId = CreateSprite(&gUnknown_0858C138, 38, 88, 1); sub_80E3E3C(1); gSprites[gNamingScreenData->cursorSpriteId].oam.priority = 1; - gSprites[gNamingScreenData->cursorSpriteId].oam.objMode = 1; + gSprites[gNamingScreenData->cursorSpriteId].oam.objMode = ST_OAM_OBJ_BLEND; gSprites[gNamingScreenData->cursorSpriteId].data[6] = 1; gSprites[gNamingScreenData->cursorSpriteId].data[6] = 2; SetCursorPos(0, 0); @@ -1949,37 +1949,169 @@ const struct OamData gOamData_858BFFC = static const struct Subsprite gUnknown_0858C004[] = { - {-20, -16, 1, 1, 0, 1}, - { 12, -16, 0, 0, 4, 1}, - {-20, -8, 1, 1, 5, 1}, - { 12, -8, 0, 0, 9, 1}, - {-20, 0, 1, 1, 10, 1}, - { 12, 0, 0, 0, 14, 1}, - {-20, 8, 1, 1, 15, 1}, - { 12, 8, 0, 0, 19, 1} + { + .x = -20, + .y = -16, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, + .priority = 1 + }, + { + .x = 12, + .y = -16, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 4, + .priority = 1 + }, + { + .x = -20, + .y = -8, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 5, + .priority = 1 + }, + { + .x = 12, + .y = -8, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 9, + .priority = 1 + }, + { + .x = -20, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 10, + .priority = 1 + }, + { + .x = 12, + .y = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 14, + .priority = 1 + }, + { + .x = -20, + .y = 8, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 15, + .priority = 1 + }, + { + .x = 12, + .y = 8, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 19, + .priority = 1 + } }; static const struct Subsprite gUnknown_0858C024[] = { - {-12, -4, 1, 0, 0, 1}, - { 4, -4, 0, 0, 2, 1} + { + .x = -12, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 0, + .priority = 1 + }, + { + .x = 4, + .y = -4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 2, + .priority = 1 + } }; static const struct Subsprite gUnknown_0858C02C[] = { - {-20, -12, 1, 1, 0, 1}, - { 12, -12, 0, 0, 4, 1}, - {-20, -4, 1, 1, 5, 1}, - { 12, -4, 0, 0, 9, 1}, - {-20, 4, 1, 1, 10, 1}, - { 12, 4, 0, 0, 14, 1} + { + .x = -20, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, + .priority = 1 + }, + { + .x = 12, + .y = -12, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 4, + .priority = 1 + }, + { + .x = -20, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 5, + .priority = 1 + }, + {.x = 12, + .y = -4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 9, + .priority = 1 + }, + { + .x = -20, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 10, + .priority = 1 + }, + { + .x = 12, + .y = 4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 14, + .priority = 1 + } }; static const struct Subsprite gUnknown_0858C044[] = { - {-8, -12, 1, 0, 0, 3}, - {-8, -4, 1, 0, 2, 3}, - {-8, 4, 1, 0, 4, 3} + { + .x = -8, + .y = -12, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 0, + .priority = 3 + }, + { + .x = -8, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 2, + .priority = 3 + }, + { + .x = -8, + .y = 4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 4, + .priority = 3 + } }; static const struct SubspriteTable gUnknown_0858C050[] = -- cgit v1.2.3 From 05af6b467ccef12985bb3e4aba164ce5240c0515 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Dec 2019 22:38:01 -0500 Subject: Fix Subsprite formatting --- src/naming_screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index ebf57be0c..04258de0c 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -2061,7 +2061,8 @@ static const struct Subsprite gUnknown_0858C02C[] = .tileOffset = 5, .priority = 1 }, - {.x = 12, + { + .x = 12, .y = -4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), -- cgit v1.2.3 From ed1ff0ad774c67e7184fb0c862005e487fed42ec Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 10 Dec 2019 13:48:20 -0500 Subject: Document misc strings and text colors --- src/naming_screen.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index 04258de0c..3d0d71866 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -55,7 +55,7 @@ static const u8 *const sTransferredToPCMessages[] = gText_PkmnTransferredLanettesPCBoxFull }; -static const u8 gUnknown_0858BDC8[] = _("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"); +static const u8 sText_AlphabetUpperLower[] = _("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"); static const struct BgTemplate gUnknown_0858BE00[] = { @@ -222,7 +222,7 @@ static void NamingScreen_TurnOffScreen(void); static void NamingScreen_InitDisplayMode(void); static void VBlankCB_NamingScreen(void); static void sub_80E501C(void); -static bool8 sub_80E503C(u8); +static bool8 IsLetter(u8); void DoNamingScreen(u8 templateNum, u8 *destBuffer, u16 monSpecies, u16 monGender, u32 monPersonality, MainCallback returnCallback) { @@ -1527,8 +1527,8 @@ static void TaskDummy3(void) static const u8 sGenderColors[2][3] = { - {0, 9, 8}, - {0, 5, 4} + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_BLUE, TEXT_COLOR_BLUE}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_RED} }; static void sub_80E49BC(void) @@ -1680,7 +1680,7 @@ static void sub_80E4D10(void) { temp[0] = gNamingScreenData->textBuffer[i]; temp[1] = gExpandedPlaceholder_Empty[0]; - unk2 = (sub_80E503C(temp[0]) == 1) ? 2 : 0; + unk2 = (IsLetter(temp[0]) == TRUE) ? 2 : 0; AddTextPrinterParameterized(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL); } @@ -1690,17 +1690,17 @@ static void sub_80E4D10(void) PutWindowTilemap(gNamingScreenData->windows[2]); } -struct TextColorThing // needed because of alignment... it's so stupid +struct TextColor // Needed because of alignment { u8 colors[3][4]; }; -static const struct TextColorThing sUnkColorStruct = +static const struct TextColor sTextColorStruct = { { - {13, 1, 2}, - {14, 1, 2}, - {15, 1, 2} + {TEXT_DYNAMIC_COLOR_4, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}, + {TEXT_DYNAMIC_COLOR_5, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}, + {TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY} } }; @@ -1711,11 +1711,11 @@ static const u8 sFillValues[KBPAGE_COUNT] = [KBPAGE_SYMBOLS] = PIXEL_FILL(0xF) }; -static const u8 *const sUnkColors[KBPAGE_COUNT] = +static const u8 *const sKeyboardTextColors[KBPAGE_COUNT] = { - [KBPAGE_LETTERS_LOWER] = sUnkColorStruct.colors[1], - [KBPAGE_LETTERS_UPPER] = sUnkColorStruct.colors[0], - [KBPAGE_SYMBOLS] = sUnkColorStruct.colors[2] + [KBPAGE_LETTERS_LOWER] = sTextColorStruct.colors[1], + [KBPAGE_LETTERS_UPPER] = sTextColorStruct.colors[0], + [KBPAGE_SYMBOLS] = sTextColorStruct.colors[2] }; static void sub_80E4DE4(u8 window, u8 page) @@ -1726,7 +1726,7 @@ static void sub_80E4DE4(u8 window, u8 page) for (i = 0; i < KBROW_COUNT; i++) { - AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sUnkColors[page], 0, sNamingScreenKeyboardText[page][i]); + AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]); } PutWindowTilemap(window); @@ -1768,7 +1768,7 @@ static void sub_80E4E5C(void) static void sub_80E4EF0(void) { - const u8 color[3] = { 15, 1, 2 }; + const u8 color[3] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY }; FillWindowPixelBuffer(gNamingScreenData->windows[4], PIXEL_FILL(15)); AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack); @@ -1816,13 +1816,13 @@ static void sub_80E501C(void) ShowBg(3); } -static bool8 sub_80E503C(u8 character) +static bool8 IsLetter(u8 character) { u8 i; - for (i = 0; gUnknown_0858BDC8[i] != EOS; i++) + for (i = 0; sText_AlphabetUpperLower[i] != EOS; i++) { - if (character == gUnknown_0858BDC8[i]) + if (character == sText_AlphabetUpperLower[i]) return FALSE; } return FALSE; -- cgit v1.2.3