From 07e00b2e41cf0180acbf57b3573cf99fbecacd16 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 1 Feb 2023 15:24:15 -0500 Subject: [PATCH] Additional window id constant usage --- src/berry_tag_screen.c | 12 ++++++------ src/contest.c | 4 ++-- src/pokeblock.c | 4 ++-- src/wireless_communication_status_screen.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index b65341e67..e43d68600 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -599,7 +599,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) switch (data[0]) { case 0x30: - FillWindowPixelBuffer(0, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0)); break; case 0x40: PrintBerryNumberAndName(); @@ -609,7 +609,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) CreateBerrySprite(); break; case 0x60: - FillWindowPixelBuffer(1, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0)); break; case 0x70: PrintBerrySize(); @@ -621,7 +621,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) SetFlavorCirclesVisiblity(); break; case 0xA0: - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0)); break; case 0xB0: PrintBerryDescription1(); @@ -636,7 +636,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) switch (data[0]) { case 0x30: - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0)); break; case 0x40: PrintBerryDescription2(); @@ -648,7 +648,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) SetFlavorCirclesVisiblity(); break; case 0x70: - FillWindowPixelBuffer(1, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0)); break; case 0x80: PrintBerryFirmness(); @@ -661,7 +661,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) CreateBerrySprite(); break; case 0xB0: - FillWindowPixelBuffer(0, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0)); break; case 0xC0: PrintBerryNumberAndName(); diff --git a/src/contest.c b/src/contest.c index 2a0e163a5..2c0f66f6b 100644 --- a/src/contest.c +++ b/src/contest.c @@ -5459,7 +5459,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b) u8 speed; printerTemplate.currentChar = currChar; - printerTemplate.windowId = 4; + printerTemplate.windowId = WIN_GENERAL_TEXT; printerTemplate.fontId = FONT_NORMAL; printerTemplate.x = 0; printerTemplate.y = 1; @@ -5485,7 +5485,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b) AddTextPrinter(&printerTemplate, speed, 0); } - PutWindowTilemap(4); + PutWindowTilemap(WIN_GENERAL_TEXT); Contest_SetBgCopyFlags(0); } diff --git a/src/pokeblock.c b/src/pokeblock.c index 3f0b3b5c5..e490f372c 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -765,7 +765,7 @@ static void DrawPokeblockInfo(s32 pkblId) struct Pokeblock *pokeblock; u16 rectTilemapSrc[2]; - FillWindowPixelBuffer(7, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_FEEL, PIXEL_FILL(0)); if (pkblId != LIST_CANCEL) { @@ -802,7 +802,7 @@ static void DrawPokeblockInfo(s32 pkblId) for (i = 0; i < FLAVOR_COUNT; i++) CopyToBgTilemapBufferRect(2, rectTilemapSrc, (i / 3 * 6) + 1, (i % 3 * 2) + 13, 1, 2); - CopyWindowToVram(7, COPYWIN_GFX); + CopyWindowToVram(WIN_FEEL, COPYWIN_GFX); } ScheduleBgCopyTilemapToVram(0); diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 488a3291e..dd99188ea 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -266,7 +266,7 @@ static void PrintHeaderTexts(void) s32 i; FillWindowPixelBuffer(WIN_TITLE, PIXEL_FILL(0)); FillWindowPixelBuffer(WIN_GROUP_NAMES, PIXEL_FILL(0)); - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_GROUP_COUNTS, PIXEL_FILL(0)); // Print title WCSS_AddTextPrinterParameterized(WIN_TITLE, FONT_NORMAL, sHeaderTexts[0], GetStringCenterAlignXOffset(FONT_NORMAL, sHeaderTexts[0], 0xC0), 6, COLORMODE_GREEN);