From f74adc80c126bd451767c917d53e7240ebcc7950 Mon Sep 17 00:00:00 2001 From: Slawter666 <38655737+Slawter666@users.noreply.github.com> Date: Sun, 2 Sep 2018 17:53:52 +0100 Subject: Format more templates --- src/naming_screen.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 6 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index f99d23bc3..42525380b 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -113,12 +113,53 @@ static const struct BgTemplate gUnknown_0858BE00[] = } }; -static const struct WindowTemplate gUnknown_0858BE10[] = { - { 0x01, 0x03, 0x0A, 0x13, 0x08, 0x0A, 0x030 }, - { 0x02, 0x03, 0x0A, 0x13, 0x08, 0x0A, 0x0C8 }, - { 0x03, 0x08, 0x06, 0x11, 0x02, 0x0A, 0x030 }, - { 0x03, 0x08, 0x04, 0x11, 0x02, 0x0A, 0x052 }, - { 0x00, 0x00, 0x00, 0x1E, 0x02, 0x0B, 0x074 }, +static const struct WindowTemplate gUnknown_0858BE10[] = +{ + { + .priority = 1, + .tilemapLeft = 3, + .tilemapTop = 10, + .width = 19, + .height = 8, + .paletteNum = 10, + .baseBlock = 0x030 + }, + { + .priority = 2, + .tilemapLeft = 3, + .tilemapTop = 10, + .width = 19, + .height = 8, + .paletteNum = 10, + .baseBlock = 0x0C8 + }, + { + .priority = 3, + .tilemapLeft = 8, + .tilemapTop = 6, + .width = 17, + .height = 2, + .paletteNum = 10, + .baseBlock = 0x030 + }, + { + .priority = 3, + .tilemapLeft = 8, + .tilemapTop = 4, + .width = 17, + .height = 2, + .paletteNum = 10, + .baseBlock = 0x052 + }, + { + .priority = 0, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 30, + .height = 2, + .paletteNum = 11, + .baseBlock = 0x074 + }, DUMMY_WIN_TEMPLATE }; -- cgit v1.2.3 From 24b9cd721ff1f5c7f2fdd674299d0d2d9f396be2 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 3 Sep 2018 22:55:55 +0200 Subject: More Battle Factory --- src/naming_screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/naming_screen.c') diff --git a/src/naming_screen.c b/src/naming_screen.c index f99d23bc3..35a05499b 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1515,7 +1515,7 @@ static void sub_80E49BC(void) StringCopy(genderSymbol, gText_FemaleSymbol); isFemale = TRUE; } - box_print(gNamingScreenData->windows[2], 1, 0x68, 1, sGenderColors[isFemale], -1, genderSymbol); + AddTextPrinterParameterized3(gNamingScreenData->windows[2], 1, 0x68, 1, sGenderColors[isFemale], -1, genderSymbol); } } @@ -1694,7 +1694,7 @@ static void sub_80E4DE4(u8 window, u8 a1) for (i = 0; i < 4; i++) { - box_print(window, 1, 0, i * 16 + 1, sUnkColors[a1], 0, gUnknown_0858C198[a1][i]); + AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sUnkColors[a1], 0, gUnknown_0858C198[a1][i]); } PutWindowTilemap(window); @@ -1739,7 +1739,7 @@ static void sub_80E4EF0(void) const u8 color[3] = { 15, 1, 2 }; FillWindowPixelBuffer(gNamingScreenData->windows[4], 0xFF); - box_print(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack); + AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack); PutWindowTilemap(gNamingScreenData->windows[4]); CopyWindowToVram(gNamingScreenData->windows[4], 3); } -- cgit v1.2.3 From 2f59df03ab8dbd5d9edb28b5680cc668aafc6684 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 8 Sep 2018 23:38:30 +0200 Subject: Standartize AddTextPrinterParametrized functions, --- 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 35a05499b..c5a44cb82 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -531,7 +531,7 @@ static void DisplaySentToPCMessage(void) StringExpandPlaceholders(gStringVar4, gUnknown_0858BDB8[stringToDisplay]); NewMenuHelpers_DrawDialogueFrame(0, 0); gTextFlags.flag_0 = TRUE; - AddTextPrinterParameterized(0, 1, gStringVar4, GetPlayerTextSpeed(), 0, 2, 1, 3); + AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeed(), 0, 2, 1, 3); CopyWindowToVram(0, 3); } @@ -1447,7 +1447,7 @@ static void HandleDpadMovement(struct Task *task) static void sub_80E4894(void) { FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11); - PrintTextOnWindow(gNamingScreenData->windows[3], 1, gNamingScreenData->template->title, 8, 1, 0, 0); + AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, gNamingScreenData->template->title, 8, 1, 0, 0); PutWindowTilemap(gNamingScreenData->windows[3]); } @@ -1458,7 +1458,7 @@ static void sub_80E48E8(void) StringCopy(buffer, gSpeciesNames[gNamingScreenData->monSpecies]); StringAppendN(buffer, gNamingScreenData->template->title, 15); FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11); - PrintTextOnWindow(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0); + AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0); PutWindowTilemap(gNamingScreenData->windows[3]); } @@ -1652,7 +1652,7 @@ static void sub_80E4D10(void) temp[1] = gExpandedPlaceholder_Empty[0]; unk2 = (sub_80E503C(temp[0]) == 1) ? 2 : 0; - PrintTextOnWindow(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL); + AddTextPrinterParameterized(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL); } sub_80E498C(); -- cgit v1.2.3