From b9ad9b3ad547b200e66b293169acbbfe4f50f76d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 7 Jan 2018 19:20:15 -0500 Subject: through sub_8096874 --- src/engine/naming_screen.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/engine/naming_screen.c') diff --git a/src/engine/naming_screen.c b/src/engine/naming_screen.c index 440504d5a..6f34fd678 100644 --- a/src/engine/naming_screen.c +++ b/src/engine/naming_screen.c @@ -26,8 +26,6 @@ #define COLUMN_COUNT 10 #endif -extern u16 gKeyRepeatStartDelay; - extern u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality); const u8 gSpriteImage_83CE094[] = INCBIN_U8("graphics/naming_screen/pc_icon/0.4bpp"); -- cgit v1.2.3 From 6d16dba22e9ea2b40bf684f7549b73a583d143f6 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Mon, 8 Jan 2018 23:16:13 -0600 Subject: re-label some window and text code --- src/engine/naming_screen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/engine/naming_screen.c') diff --git a/src/engine/naming_screen.c b/src/engine/naming_screen.c index 440504d5a..5685584f5 100644 --- a/src/engine/naming_screen.c +++ b/src/engine/naming_screen.c @@ -503,7 +503,7 @@ static bool8 MainState_6(struct Task *task) static bool8 MainState_UpdateSentToPCMessage(struct Task *task) { - if (MenuUpdateWindowText()) + if (Menu_UpdateWindowText()) namingScreenDataPtr->state++; return FALSE; } @@ -1611,7 +1611,7 @@ static void DisplaySentToPCMessage(void) StringCopy(gStringVar1, namingScreenDataPtr->destBuffer); StringExpandPlaceholders(gStringVar4, gOtherText_SentToPC); BasicInitMenuWindow(&gWindowConfig_81E6E88); - MenuDisplayMessageBox(); + Menu_DisplayDialogueFrame(); MenuPrintMessageDefaultCoords(gStringVar4); } @@ -1757,7 +1757,7 @@ static void (*const gUnknown_083CE310[][2])(void) = sub_80B7844, }; -static const struct WindowConfig *const gUnknown_083CE328[][2][2] = +static const struct WindowTemplate *const gUnknown_083CE328[][2][2] = { { {&gWindowConfig_81E6EDC, &gWindowConfig_81E6EF8}, @@ -1838,7 +1838,7 @@ static void PrintKeyboardCharacters(u8 page) //print letters on page s16 r5; for (i = 0, r5 = 9; i < 4; i++, r5 += 2) - MenuPrint(sKeyboardCharacters[page][i], 3, r5); + Menu_PrintText(sKeyboardCharacters[page][i], 3, r5); } static void sub_80B78A8(void) @@ -1846,7 +1846,7 @@ static void sub_80B78A8(void) BasicInitMenuWindow(&gWindowConfig_81E6F4C); gUnknown_083CE358[namingScreenDataPtr->templateNum](); gUnknown_083CE368[namingScreenDataPtr->template->unk3](); - MenuPrint(namingScreenDataPtr->template->title, 9, 2); + Menu_PrintText(namingScreenDataPtr->template->title, 9, 2); } static void nullsub_61(void) @@ -1870,7 +1870,7 @@ static void sub_80B7924(void) { if ((s16)namingScreenDataPtr->unk40 == MON_FEMALE) genderSymbol[0] = 0xB6; //female symbol - MenuPrint(genderSymbol, 0x14, 4); + Menu_PrintText(genderSymbol, 0x14, 4); } } @@ -1887,7 +1887,7 @@ static void sub_80B7960(void) string += 6; StringCopy(string, namingScreenDataPtr->textBuffer); BasicInitMenuWindow(&gWindowConfig_81E6F4C); - MenuPrint(gStringVar1, namingScreenDataPtr->unk2, 4); + Menu_PrintText(gStringVar1, namingScreenDataPtr->unk2, 4); } //-------------------------------------------------- -- cgit v1.2.3 From 8869cbc98e2f8e761e9ff89182933643992e2bd7 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 9 Jan 2018 00:16:15 -0600 Subject: s/gWindowConfig/gWindowTemplate/g --- src/engine/naming_screen.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/engine/naming_screen.c') diff --git a/src/engine/naming_screen.c b/src/engine/naming_screen.c index 5685584f5..880187dc0 100644 --- a/src/engine/naming_screen.c +++ b/src/engine/naming_screen.c @@ -325,8 +325,8 @@ static void NamingScreen_Init(void) static void NamingScreen_SetUpWindow(void) { - SetUpWindowConfig(&gWindowConfig_81E6E88); - InitMenuWindow(&gWindowConfig_81E6E88); + SetUpWindowConfig(&gWindowTemplate_81E6E88); + InitMenuWindow(&gWindowTemplate_81E6E88); } static void NamingScreen_ResetObjects(void) @@ -1610,7 +1610,7 @@ static void DisplaySentToPCMessage(void) { StringCopy(gStringVar1, namingScreenDataPtr->destBuffer); StringExpandPlaceholders(gStringVar4, gOtherText_SentToPC); - BasicInitMenuWindow(&gWindowConfig_81E6E88); + BasicInitMenuWindow(&gWindowTemplate_81E6E88); Menu_DisplayDialogueFrame(); MenuPrintMessageDefaultCoords(gStringVar4); } @@ -1760,16 +1760,16 @@ static void (*const gUnknown_083CE310[][2])(void) = static const struct WindowTemplate *const gUnknown_083CE328[][2][2] = { { - {&gWindowConfig_81E6EDC, &gWindowConfig_81E6EF8}, - {&gWindowConfig_81E6EA4, &gWindowConfig_81E6EC0}, + {&gWindowTemplate_81E6EDC, &gWindowTemplate_81E6EF8}, + {&gWindowTemplate_81E6EA4, &gWindowTemplate_81E6EC0}, }, { - {&gWindowConfig_81E6EA4, &gWindowConfig_81E6EC0}, - {&gWindowConfig_81E6F14, &gWindowConfig_81E6F30}, + {&gWindowTemplate_81E6EA4, &gWindowTemplate_81E6EC0}, + {&gWindowTemplate_81E6F14, &gWindowTemplate_81E6F30}, }, { - {&gWindowConfig_81E6F14, &gWindowConfig_81E6F30}, - {&gWindowConfig_81E6EDC, &gWindowConfig_81E6EF8}, + {&gWindowTemplate_81E6F14, &gWindowTemplate_81E6F30}, + {&gWindowTemplate_81E6EDC, &gWindowTemplate_81E6EF8}, }, }; @@ -1843,7 +1843,7 @@ static void PrintKeyboardCharacters(u8 page) //print letters on page static void sub_80B78A8(void) { - BasicInitMenuWindow(&gWindowConfig_81E6F4C); + BasicInitMenuWindow(&gWindowTemplate_81E6F4C); gUnknown_083CE358[namingScreenDataPtr->templateNum](); gUnknown_083CE368[namingScreenDataPtr->template->unk3](); Menu_PrintText(namingScreenDataPtr->template->title, 9, 2); @@ -1886,7 +1886,7 @@ static void sub_80B7960(void) string[5] = 1; string += 6; StringCopy(string, namingScreenDataPtr->textBuffer); - BasicInitMenuWindow(&gWindowConfig_81E6F4C); + BasicInitMenuWindow(&gWindowTemplate_81E6F4C); Menu_PrintText(gStringVar1, namingScreenDataPtr->unk2, 4); } -- cgit v1.2.3 From 03b167a73e2f18fa79bbf0e6ffe11e0c35c12ad8 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 9 Jan 2018 14:26:15 -0600 Subject: more text/menu renaming --- src/engine/naming_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine/naming_screen.c') diff --git a/src/engine/naming_screen.c b/src/engine/naming_screen.c index 880187dc0..eddfdeda5 100644 --- a/src/engine/naming_screen.c +++ b/src/engine/naming_screen.c @@ -325,7 +325,7 @@ static void NamingScreen_Init(void) static void NamingScreen_SetUpWindow(void) { - SetUpWindowConfig(&gWindowTemplate_81E6E88); + Text_LoadWindowTemplate(&gWindowTemplate_81E6E88); InitMenuWindow(&gWindowTemplate_81E6E88); } -- cgit v1.2.3 From f07cdb4c9723bdbb1fcdbbe622d39936ae5b532f Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Wed, 17 Jan 2018 17:47:46 -0500 Subject: use Dma Large loops for every while(1) Dma loop --- src/engine/naming_screen.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/engine/naming_screen.c') diff --git a/src/engine/naming_screen.c b/src/engine/naming_screen.c index eddfdeda5..d54b84720 100644 --- a/src/engine/naming_screen.c +++ b/src/engine/naming_screen.c @@ -258,20 +258,7 @@ static void NamingScreen_InitDisplayMode(void) static void NamingScreen_ClearVram(void) { - u8 *addr = (void *)VRAM; - u32 size = 0x10000; - - while (1) - { - DmaFill16(3, 0, addr, 0x1000); - addr += 0x1000; - size -= 0x1000; - if (size <= 0x1000) - { - DmaFill16(3, 0, addr, size); - break; - } - } + DmaFill16Large(3, 0, (void *)VRAM, 0x10000, 0x1000); } static void NamingScreen_ClearOam(void) -- cgit v1.2.3 From 2869160d630f569110ca895ff924070d626fd54b Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Wed, 17 Jan 2018 19:31:23 -0500 Subject: use Defvars instead of some Dma macros and hopefully last while(1)s --- src/engine/naming_screen.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/engine/naming_screen.c') diff --git a/src/engine/naming_screen.c b/src/engine/naming_screen.c index d54b84720..97819322c 100644 --- a/src/engine/naming_screen.c +++ b/src/engine/naming_screen.c @@ -1616,16 +1616,8 @@ static void sub_80B7558(void) static void sub_80B7568(void) { - const void *src; - void *dst; - - src = gNamingScreenMenu_Gfx; - dst = (void *)(VRAM + gMenuMessageBoxContentTileOffset * 32); - DmaCopy16(3, src, dst, 0x800); - - src = gNamingScreenMenu_Gfx; - dst = (void *)(VRAM + 0x8000 + gMenuMessageBoxContentTileOffset * 32); - DmaCopy16(3, src, dst, 0x800); + DmaCopy16Defvars(3, gNamingScreenMenu_Gfx, (void *)(VRAM + gMenuMessageBoxContentTileOffset * 32), 0x800); + DmaCopy16Defvars(3, gNamingScreenMenu_Gfx, (void *)(VRAM + 0x8000 + gMenuMessageBoxContentTileOffset * 32), 0x800); } static void sub_80B75B0(void) -- cgit v1.2.3