From 3716da5430a976d05afecdf82f43f14fc2584949 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 2 Mar 2019 17:25:39 -0500 Subject: [PATCH] Rename macro with correct name for pixel values --- include/window.h | 2 +- src/battle_dome.c | 2 +- src/battle_factory_screen.c | 48 +++++++++--------- src/battle_interface.c | 2 +- src/battle_message.c | 94 ++++++++++++++++++------------------ src/battle_pyramid_bag.c | 20 ++++---- src/battle_records.c | 4 +- src/berry_blender.c | 6 +-- src/berry_fix_program.c | 8 +-- src/berry_tag_screen.c | 14 +++--- src/clear_save_data_screen.c | 4 +- src/coins.c | 2 +- src/contest.c | 14 +++--- src/contest_link_80F57C4.c | 2 +- src/contest_painting.c | 2 +- src/credits.c | 2 +- src/decoration.c | 6 +-- src/diploma.c | 2 +- src/easy_chat.c | 16 +++--- src/egg_hatch.c | 4 +- src/field_player_avatar.c | 6 +-- src/field_region_map.c | 4 +- src/field_specials.c | 8 +-- src/frontier_pass.c | 8 +-- src/frontier_util.c | 20 ++++---- src/hall_of_fame.c | 8 +-- src/item_menu.c | 30 ++++++------ src/learn_move.c | 6 +-- src/link.c | 8 +-- src/list_menu.c | 16 +++--- src/mail.c | 4 +- src/main_menu.c | 36 +++++++------- src/match_call.c | 6 +-- src/menu.c | 32 ++++++------ src/money.c | 2 +- src/mystery_event_menu.c | 4 +- src/naming_screen.c | 14 +++--- src/option_menu.c | 4 +- src/party_menu.c | 6 +-- src/player_pc.c | 6 +-- src/pokeblock.c | 4 +- src/pokeblock_feed.c | 2 +- src/pokedex.c | 14 +++--- src/pokemon_storage_system.c | 32 ++++++------ src/pokemon_summary_screen.c | 28 +++++------ src/pokenav.c | 4 +- src/region_map.c | 6 +-- src/rom_8011DC0.c | 8 +-- src/save_failed_screen.c | 16 +++--- src/scrcmd.c | 2 +- src/script_menu.c | 12 ++--- src/shop.c | 4 +- src/slot_machine.c | 4 +- src/start_menu.c | 2 +- src/starter_choose.c | 6 +-- src/text.c | 8 +-- src/trade.c | 18 +++---- src/trainer_card.c | 10 ++-- src/trainer_hill.c | 2 +- src/unk_text_util_2.c | 8 +-- 60 files changed, 336 insertions(+), 336 deletions(-) diff --git a/include/window.h b/include/window.h index ece1ecd21..10e447789 100644 --- a/include/window.h +++ b/include/window.h @@ -1,7 +1,7 @@ #ifndef GUARD_WINDOW_H #define GUARD_WINDOW_H -#define PALETTE_NUM_TO_FILL_VALUE(num) ((num) | ((num) << 4)) +#define PIXEL_FILL(num) ((num) | ((num) << 4)) enum { diff --git a/src/battle_dome.c b/src/battle_dome.c index 9ef66aac4..f86faeffb 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -3794,7 +3794,7 @@ static void sub_8190CD4(u8 taskId) for (i = windowId; i < windowId + 9; i++) { CopyWindowToVram(i, 2); - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); } gTasks[taskId].data[0] = 3; break; diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index d4abe3c96..5cbe97702 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -1786,14 +1786,14 @@ static void sub_819B958(u8 windowId) { gSprites[sFactorySelectScreen->menuCursor1SpriteId].invisible = TRUE; gSprites[sFactorySelectScreen->menuCursor2SpriteId].invisible = TRUE; - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); CopyWindowToVram(windowId, 2); ClearWindowTilemap(windowId); } static void Select_PrintRentalPkmnString(void) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); AddTextPrinterParameterized(0, 1, gText_RentalPkmn2, 2, 1, 0, NULL); CopyWindowToVram(0, 3); } @@ -1804,7 +1804,7 @@ static void Select_PrintMonSpecies(void) u8 x; u8 monId = sFactorySelectScreen->cursorPos; - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(1, gStringVar4, 86); @@ -1816,7 +1816,7 @@ static void Select_PrintSelectMonString(void) { const u8 *str = NULL; - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); if (sFactorySelectScreen->selectingMonsState == 1) str = gText_SelectFirstPkmn; else if (sFactorySelectScreen->selectingMonsState == 2) @@ -1832,7 +1832,7 @@ static void Select_PrintSelectMonString(void) static void Select_PrintCantSelectSameMon(void) { - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); AddTextPrinterParameterized(2, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL); CopyWindowToVram(2, 2); } @@ -1842,7 +1842,7 @@ static void Select_PrintMenuOptions(void) u8 selectedId = sFactorySelectScreen->mons[sFactorySelectScreen->cursorPos].selectedId; PutWindowTilemap(3); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(3, PIXEL_FILL(0)); AddTextPrinterParameterized3(3, 1, 7, 1, gUnknown_08610476, 0, gText_Summary); if (selectedId != 0) AddTextPrinterParameterized3(3, 1, 7, 17, gUnknown_08610476, 0, gText_Deselect); @@ -1856,7 +1856,7 @@ static void Select_PrintMenuOptions(void) static void Select_PrintYesNoOptions(void) { PutWindowTilemap(4); - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(4, PIXEL_FILL(0)); AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610476, 0, gText_Yes2); AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610476, 0, gText_No2); CopyWindowToVram(4, 3); @@ -1924,7 +1924,7 @@ static void Select_PrintMonCategory(void) if (monId < SELECTABLE_MONS_COUNT) { PutWindowTilemap(5); - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(5, PIXEL_FILL(0)); species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL); CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text); x = GetStringRightAlignXOffset(1, text, 0x76); @@ -2873,7 +2873,7 @@ static void sub_819D588(u8 taskId) case 3: if (!gPaletteFade.active) { - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(5, PIXEL_FILL(0)); CopyWindowToVram(5, 2); if (sFactorySwapScreen->inEnemyScreen == TRUE) { @@ -3002,7 +3002,7 @@ static void sub_819D770(u8 taskId) gTasks[taskId].data[0]++; break; case 6: - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(5, PIXEL_FILL(0)); CopyWindowToVram(5, 2); gTasks[taskId].data[0]++; break; @@ -3546,7 +3546,7 @@ static void sub_819EA64(u8 windowId) { gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = TRUE; gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = TRUE; - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); CopyWindowToVram(windowId, 2); ClearWindowTilemap(windowId); } @@ -3554,14 +3554,14 @@ static void sub_819EA64(u8 windowId) static void sub_819EAC0(void) { PutWindowTilemap(1); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); CopyWindowToVram(1, 2); } static void sub_819EADC(void) { PutWindowTilemap(7); - FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(7, PIXEL_FILL(0)); CopyWindowToVram(7, 2); } @@ -3569,13 +3569,13 @@ static void sub_819EAF8(void) { sub_819EAC0(); PutWindowTilemap(5); - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(5, PIXEL_FILL(0)); CopyWindowToVram(5, 2); } static void Swap_PrintPkmnSwap(void) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized(0, 1, gText_PkmnSwap, 2, 1, 0, NULL); CopyWindowToVram(0, 3); } @@ -3585,7 +3585,7 @@ static void Swap_PrintMonSpecies(void) u16 species; u8 x; - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); if (sFactorySwapScreen->cursorPos > 2) { CopyWindowToVram(1, 2); @@ -3606,7 +3606,7 @@ static void Swap_PrintMonSpecies(void) static void Swap_PrintOnInfoWindow(const u8 *str) { - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); AddTextPrinterParameterized(2, 1, str, 2, 5, 0, NULL); CopyWindowToVram(2, 2); } @@ -3614,7 +3614,7 @@ static void Swap_PrintOnInfoWindow(const u8 *str) static void Swap_PrintMenuOptions(void) { PutWindowTilemap(3); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(3, PIXEL_FILL(0)); AddTextPrinterParameterized3(3, 1, 15, 1, gUnknown_08610922, 0, gText_Summary2); AddTextPrinterParameterized3(3, 1, 15, 17, gUnknown_08610922, 0, gText_Swap); AddTextPrinterParameterized3(3, 1, 15, 33, gUnknown_08610922, 0, gText_Rechoose); @@ -3624,7 +3624,7 @@ static void Swap_PrintMenuOptions(void) static void Swap_PrintYesNoOptions(void) { PutWindowTilemap(4); - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(4, PIXEL_FILL(0)); AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610922, 0, gText_Yes3); AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610922, 0, gText_No3); CopyWindowToVram(4, 3); @@ -3638,7 +3638,7 @@ static void Swap_PrintActionString(const u8 *str, u32 y, u32 windowId) static void Swap_PrintActionStrings(void) { - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(5, PIXEL_FILL(0)); switch (sFactorySwapScreen->inEnemyScreen) { case TRUE: @@ -3652,7 +3652,7 @@ static void Swap_PrintActionStrings(void) static void Swap_PrintActionStrings2(void) { - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(3, PIXEL_FILL(0)); switch (sFactorySwapScreen->inEnemyScreen) { case TRUE: @@ -3693,7 +3693,7 @@ static void Swap_PrintMonSpecies2(void) LoadPalette(pal, 0xF0, 0xA); PutWindowTilemap(7); - FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(7, PIXEL_FILL(0)); if (sFactorySwapScreen->cursorPos > 2) { CopyWindowToVram(7, 3); @@ -3745,7 +3745,7 @@ static void Swap_PrintMonCategory(void) u8 x; u8 monId = sFactorySwapScreen->cursorPos; - FillWindowPixelBuffer(8, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(8, PIXEL_FILL(0)); if (monId > 2) { CopyWindowToVram(8, 2); @@ -3940,7 +3940,7 @@ static void Task_SwapCantHaveSameMons(u8 taskId) case 2: if (sFactorySwapScreen->unk30 != TRUE) { - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(5, PIXEL_FILL(0)); CopyWindowToVram(5, 2); gTasks[taskId].data[0]++; } diff --git a/src/battle_interface.c b/src/battle_interface.c index a86f0ea84..f2916012e 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2579,7 +2579,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, struct WindowTemplate winTemplate = sHealthboxWindowTemplate; winId = AddWindow(&winTemplate); - FillWindowPixelBuffer(winId, PALETTE_NUM_TO_FILL_VALUE(bgColor)); + FillWindowPixelBuffer(winId, PIXEL_FILL(bgColor)); color[0] = bgColor; color[1] = 1; diff --git a/src/battle_message.c b/src/battle_message.c index b203f0b3e..6762cd416 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1357,7 +1357,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = { // The corresponding WindowTemplate is gStandardBattleWindowTemplates[] within src/battle_bg.c { // 0 Standard battle message - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xF), + .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 0, .y = 1, @@ -1369,7 +1369,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 6, }, { // 1 "What will (pokemon) do?" - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xF), + .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 1, .y = 1, @@ -1381,7 +1381,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 6, }, { // 2 "Fight/Pokemon/Bag/Run" - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1393,7 +1393,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 3 Top left move - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1405,7 +1405,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 4 Top right move - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1417,7 +1417,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 5 Bottom left move - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1429,7 +1429,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 6 Bottom right move - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1441,7 +1441,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 7 "PP" - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1453,7 +1453,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 11, }, { // 8 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1465,7 +1465,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 9 PP remaining - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 2, .y = 1, @@ -1477,7 +1477,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 11, }, { // 10 "type" - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1489,7 +1489,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 11 "switch which?" - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1501,7 +1501,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 12 "gText_BattleYesNoChoice" - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1513,7 +1513,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 13 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1525,7 +1525,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 14 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0), + .fillValue = PIXEL_FILL(0), .fontId = 1, .x = 32, .y = 1, @@ -1537,7 +1537,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 2, }, { // 15 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1549,7 +1549,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 16 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1561,7 +1561,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 17 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1573,7 +1573,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 18 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1585,7 +1585,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 19 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1597,7 +1597,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 20 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1609,7 +1609,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 15, }, { // 21 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0), + .fillValue = PIXEL_FILL(0), .fontId = 1, .x = -1, .y = 1, @@ -1621,7 +1621,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 6, }, { // 22 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0), + .fillValue = PIXEL_FILL(0), .fontId = 1, .x = -1, .y = 1, @@ -1633,7 +1633,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .shadowColor = 6, }, { // 23 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0x0), + .fillValue = PIXEL_FILL(0x0), .fontId = 1, .x = -1, .y = 1, @@ -1649,7 +1649,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = { { // 0 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xF), + .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 0, .y = 1, @@ -1661,7 +1661,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 6, }, { // 1 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xF), + .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 1, .y = 1, @@ -1673,7 +1673,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 6, }, { // 2 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1685,7 +1685,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 3 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1697,7 +1697,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 4 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1709,7 +1709,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 5 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1721,7 +1721,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 6 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1733,7 +1733,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 7 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1745,7 +1745,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 11, }, { // 8 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1757,7 +1757,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 9 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 2, .y = 1, @@ -1769,7 +1769,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 11, }, { // 10 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1781,7 +1781,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 11 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, .y = 1, @@ -1793,7 +1793,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 12 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1805,7 +1805,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 13 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, .y = 1, @@ -1817,7 +1817,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 14 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0), + .fillValue = PIXEL_FILL(0), .fontId = 1, .x = 32, .y = 1, @@ -1829,7 +1829,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 2, }, { // 15 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1841,7 +1841,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 16 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1853,7 +1853,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 17 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1865,7 +1865,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 18 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1877,7 +1877,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 19 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1889,7 +1889,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 20 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1901,7 +1901,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 21 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE), + .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, .y = 1, @@ -1913,7 +1913,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .shadowColor = 15, }, { // 22 - .fillValue = PALETTE_NUM_TO_FILL_VALUE(0x1), + .fillValue = PIXEL_FILL(0x1), .fontId = 1, .x = 0, .y = 1, diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index dec8d4bca..2e13ea08b 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -651,7 +651,7 @@ static void PrintItemDescription(s32 listMenuId) StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1); desc = gStringVar4; } - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); PrintOnWindow_Font1(1, desc, 3, 0, 0, 1, 0, 0); } @@ -804,7 +804,7 @@ static void sub_81C5A98(u8 listMenuTaskId, u8 arg1) static void sub_81C5AB8(u8 y, u8 arg1) { if (arg1 == 0xFF) - FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); + FillWindowPixelRect(0, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); else PrintOnWindow_Font1(0, gText_SelectorArrow2, 0, y, 0, 0, 0, arg1); } @@ -911,7 +911,7 @@ static void sub_81C5D20(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0); if (gPyramidBagResources->menuActionsCount == 1) sub_81C5EAC(sub_81C6D24(0)); @@ -1048,7 +1048,7 @@ static void BagAction_UseOnField(u8 taskId) else if (ItemId_GetFieldFunc(gSpecialVar_ItemId) != NULL) { sub_81C61A8(); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); schedule_bg_copy_tilemap_to_vram(0); ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId); } @@ -1086,7 +1086,7 @@ static void BagAction_Toss(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0); sub_81C6404(); gTasks[taskId].func = sub_81C64B4; @@ -1100,7 +1100,7 @@ static void sub_81C6350(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0); sub_81C6DAC(taskId, &sYesNoTossFuncions); } @@ -1168,7 +1168,7 @@ static void TossItem(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0); gTasks[taskId].func = sub_81C65CC; } @@ -1265,7 +1265,7 @@ static void Task_BeginItemSwap(u8 taskId) ListMenuSetUnkIndicatorsStructField(data[0], 0x10, 1); CopyItemName(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][data[1]], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0); sub_81C5A98(data[0], 1); sub_81C704C(data[1]); @@ -1395,7 +1395,7 @@ static void sub_81C6BD8(void) LoadPalette(gUnknown_0860F074, 0xF0, 0x20); for (i = 0; i < 5; i++) - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); PutWindowTilemap(0); PutWindowTilemap(1); @@ -1456,7 +1456,7 @@ static void sub_81C6DAC(u8 taskId, const struct YesNoFuncTable *yesNoTable) void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId)) { - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(2, PIXEL_FILL(1)); DisplayMessageAndContinueTask(taskId, 2, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback); schedule_bg_copy_tilemap_to_vram(1); } diff --git a/src/battle_records.c b/src/battle_records.c index 03d2088b4..6997e40dd 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -321,7 +321,7 @@ void ShowLinkBattleRecords(void) gRecordsWindowId = AddWindow(&sLinkBattleRecordsWindow); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults); x = GetStringCenterAlignXOffset(1, gStringVar4, 208); @@ -383,7 +383,7 @@ static void Task_ExitTrainerHillRecords(u8 taskId) static void RemoveTrainerHillRecordsWindow(u8 windowId) { - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); ClearWindowTilemap(windowId); CopyWindowToVram(windowId, 2); RemoveWindow(windowId); diff --git a/src/berry_blender.c b/src/berry_blender.c index 35749db54..0241fa26d 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -945,7 +945,7 @@ static void InitBerryBlenderWindows(void) DeactivateAllTextPrinters(); for (i = 0; i < 5; i++) - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14); sub_81978B0(0xE0); @@ -3538,7 +3538,7 @@ void ShowBerryBlenderRecordWindow(void) winTemplate = sBlenderRecordWindowTemplate; gRecordsWindowId = AddWindow(&winTemplate); DrawStdWindowFrame(gRecordsWindowId, 0); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90); AddTextPrinterParameterized(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL); @@ -3647,7 +3647,7 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3 if (caseId != 3) { - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(txtColor[0])); + FillWindowPixelBuffer(windowId, PIXEL_FILL(txtColor[0])); } AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string); diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 24198fc87..37be569f8 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -226,9 +226,9 @@ static void berry_fix_gpu_set(void) DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP); - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(3, PIXEL_FILL(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0xA)); width = GetStringWidth(0, sUnknown_08617E9B, 0); left = (0x78 - width) / 2; @@ -273,7 +273,7 @@ static int berry_fix_text_update(int checkval) static void berry_fix_text_print(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(1, PIXEL_FILL(0xA)); AddTextPrinterParameterized3(1, 1, 0, 0, sUnknown_08618158, -1, gUnknown_08618160[scene]); PutWindowTilemap(1); CopyWindowToVram(1, 2); diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index 7b6935778..a7cf4daf2 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -381,7 +381,7 @@ static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s static void AddBerryTagTextToBg0(void) { memcpy(GetBgTilemapBuffer(0), sBerryTag->tilemapBuffers[2], sizeof(sBerryTag->tilemapBuffers[2])); - FillWindowPixelBuffer(WIN_BERRY_TAG, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(WIN_BERRY_TAG, PIXEL_FILL(15)); PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(1, gText_BerryTag, 0x40), 1, 0, 1); PutWindowTilemap(WIN_BERRY_TAG); schedule_bg_copy_tilemap_to_vram(0); @@ -598,7 +598,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) switch (data[0]) { case 0x30: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); break; case 0x40: PrintBerryNumberAndName(); @@ -608,7 +608,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) CreateBerrySprite(); break; case 0x60: - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); break; case 0x70: PrintBerrySize(); @@ -620,7 +620,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) SetFlavorCirclesVisiblity(); break; case 0xA0: - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); break; case 0xB0: PrintBerryDescription1(); @@ -635,7 +635,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) switch (data[0]) { case 0x30: - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); break; case 0x40: PrintBerryDescription2(); @@ -647,7 +647,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) SetFlavorCirclesVisiblity(); break; case 0x70: - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); break; case 0x80: PrintBerryFirmness(); @@ -660,7 +660,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) CreateBerrySprite(); break; case 0xB0: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); break; case 0xC0: PrintBerryNumberAndName(); diff --git a/src/clear_save_data_screen.c b/src/clear_save_data_screen.c index 619b39410..c1d6930c7 100644 --- a/src/clear_save_data_screen.c +++ b/src/clear_save_data_screen.c @@ -90,7 +90,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0); gTasks[taskId].func = Task_ClearSaveData; break; @@ -203,7 +203,7 @@ static void InitClearSaveDataScreenWindows(void) { InitWindows(sClearSaveTextWindow); DeactivateAllTextPrinters(); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadWindowGfx(0, 0, 2, 224); LoadPalette(gUnknown_0860F074, 0xF0, 0x20); } diff --git a/src/coins.c b/src/coins.c index a8d8eae06..b838c303e 100644 --- a/src/coins.c +++ b/src/coins.c @@ -27,7 +27,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y) struct WindowTemplate template; SetWindowTemplateFields(&template, 0, x, y, 8, 2, 0xF, 0x141); sCoinsWindowId = AddWindow(&template); - FillWindowPixelBuffer(sCoinsWindowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sCoinsWindowId, PIXEL_FILL(0)); PutWindowTilemap(sCoinsWindowId); DrawStdFrameWithCustomTileAndPalette(sCoinsWindowId, FALSE, 0x214, 0xE); PrintCoinsString(coinAmount); diff --git a/src/contest.c b/src/contest.c index f668baf92..e9353596b 100644 --- a/src/contest.c +++ b/src/contest.c @@ -819,7 +819,7 @@ static void sub_80D8490(u8 taskId) } r5 = StringCopy(r5, gMoveNames[move]); - FillWindowPixelBuffer(i + 5, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i + 5, PIXEL_FILL(0)); Contest_PrintTextToBg0WindowAt(i + 5, sp8, 5, 1, 7); } @@ -941,7 +941,7 @@ static void sub_80D895C(u8 taskId) for (i = 0; i < 4; i++) { - FillWindowPixelBuffer(5 + i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(5 + i, PIXEL_FILL(0)); PutWindowTilemap(5 + i); CopyWindowToVram(5 + i, 2); } @@ -2258,7 +2258,7 @@ static void sub_80DAEA4(void) for (i = 0; i < 4; i++) { - FillWindowPixelBuffer(gUnknown_02039F26[i], PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(gUnknown_02039F26[i], PIXEL_FILL(0)); sub_80DAF04(i); sub_80DAF88(i); } @@ -2478,7 +2478,7 @@ static void prints_contest_move_description(u16 a) ContestBG_FillBoxWithTile(0, 0x5036, 0x15, 0x20, 0x08, 0x01, 0x11); ContestBG_FillBoxWithTile(0, 0x5014, 0x15, 0x20, numHearts, 0x01, 0x11); - FillWindowPixelBuffer(10, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(10, PIXEL_FILL(0)); Contest_PrintTextToBg0WindowStd(10, gContestEffectDescriptionPointers[gContestMoves[a].effect]); Contest_PrintTextToBg0WindowStd(9, gText_Slash); } @@ -2621,7 +2621,7 @@ static void sub_80DB884(void) static void sub_80DB89C(void) { - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(4, PIXEL_FILL(0)); CopyWindowToVram(4, 2); Contest_SetBgCopyFlags(0); } @@ -3456,7 +3456,7 @@ static void sub_80DCD48(void) break; default: for (i = 0; i < 4; i++) - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); for (i = 0; i < 4; i++) { value = sContestantStatus[i].unk4; @@ -5038,7 +5038,7 @@ static void sub_80DF750(void) return; for (i = 0; i < 4; i++) - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); if (gHeap[0x1A000] == 2) { diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c index f2b708db4..b2ce52757 100644 --- a/src/contest_link_80F57C4.c +++ b/src/contest_link_80F57C4.c @@ -935,7 +935,7 @@ static void sub_80F6AE8(void) // windowTemplate.width = 30; // windowTemplate.height = 2; // windowId = AddWindow(&windowTemplate); -// FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); +// FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); // origWidth = GetStringWidth(1, text, 0) + 9; // strWidth = origWidth; // if (strWidth < 0) diff --git a/src/contest_painting.c b/src/contest_painting.c index b961c7a65..931deb01b 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -279,7 +279,7 @@ static void InitContestPaintingWindow(void) SetBgTilemapBuffer(1, AllocZeroed(BG_SCREEN_SIZE)); gContestPaintingWindowId = AddWindow(&gUnknown_085B07EC); DeactivateAllTextPrinters(); - FillWindowPixelBuffer(gContestPaintingWindowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(gContestPaintingWindowId, PIXEL_FILL(0)); PutWindowTilemap(gContestPaintingWindowId); CopyWindowToVram(gContestPaintingWindowId, 3); ShowBg(1); diff --git a/src/credits.c b/src/credits.c index 66f9f7ea8..4483e3160 100644 --- a/src/credits.c +++ b/src/credits.c @@ -1592,7 +1592,7 @@ static void sub_8175DA0(u8 taskIdB) case 5: if (!gPaletteFade.active) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); CopyWindowToVram(0, 2); gTasks[taskIdB].data[TDB_0] = 2; } diff --git a/src/decoration.c b/src/decoration.c index 207cb1bf0..8f6c9c449 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -543,7 +543,7 @@ void sub_8126B80(u8 taskId) void sub_8126C08(void) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3); } @@ -634,7 +634,7 @@ void sub_8126DFC(u8 taskId) void sub_8126E44(u8 taskId) { - FillWindowPixelBuffer(sDecorMenuWindowIndices[1], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(sDecorMenuWindowIndices[1], PIXEL_FILL(1)); sub_8126E8C(taskId); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDecorMenuWindowIndices[1], 9, sCurDecorationCategory); gTasks[taskId].func = sub_8127088; @@ -968,7 +968,7 @@ void sub_8127744(u32 a0) const u8 *txt; winidx = sDecorMenuWindowIndices[3]; - FillWindowPixelBuffer(winidx, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(winidx, PIXEL_FILL(1)); if (a0 >= sCurDecorCatCount) { txt = gText_GoBackPrevMenu; diff --git a/src/diploma.c b/src/diploma.c index f2c2a965c..716495034 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -197,7 +197,7 @@ static void InitDiplomaWindow(void) InitWindows(sDiplomaWinTemplates); DeactivateAllTextPrinters(); LoadPalette(gUnknown_0860F074, 0xF0, 0x20); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); } diff --git a/src/easy_chat.c b/src/easy_chat.c index 5a3ebf69c..b602077ad 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3689,7 +3689,7 @@ static void sub_811CFCC(void) return; xOffset = GetStringCenterAlignXOffset(1, titleText, 144); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); sub_811D058(0, 1, titleText, xOffset, 1, 0xFF, 0, 2, 3); PutWindowTilemap(0); CopyWindowToVram(0, 3); @@ -3759,7 +3759,7 @@ static void sub_811D104(u8 arg0) break; } - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(1, PIXEL_FILL(1)); if (text1) sub_811D028(1, 1, text1, 0, 1, 0xFF, 0); @@ -3809,7 +3809,7 @@ static void sub_811D2C8(void) if (var0 == 7) var1 = 1; - FillWindowPixelBuffer(gUnknown_0203A11C->windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gUnknown_0203A11C->windowId, PIXEL_FILL(1)); for (i = 0; i < numRows; i++) { memcpy(spC, sText_Clear17, sizeof(sText_Clear17)); @@ -3949,7 +3949,7 @@ static void sub_811D684(void) static void sub_811D698(u32 arg0) { sub_811DD84(); - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(2, PIXEL_FILL(1)); switch (arg0) { case 0: @@ -4106,14 +4106,14 @@ static void sub_811D950(u8 arg0, u8 arg1) var1 = 0; } - FillWindowPixelRect(2, PALETTE_NUM_TO_FILL_VALUE(1), 0, y, 224, var2); + FillWindowPixelRect(2, PIXEL_FILL(1), 0, y, 224, var2); if (var1) - FillWindowPixelRect(2, PALETTE_NUM_TO_FILL_VALUE(1), 0, 0, 224, var1); + FillWindowPixelRect(2, PIXEL_FILL(1), 0, 0, 224, var1); } static void sub_811D9B4(void) { - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(2, PIXEL_FILL(1)); CopyWindowToVram(2, 2); } @@ -4783,7 +4783,7 @@ static void sub_811E948(void) template.paletteNum = 11; template.baseBlock = 0x34; windowId = AddWindow(&template); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); for (i = 0; i < 4; i++) { const u8 *str = sFooterTextOptions[var0][i]; diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 66114f19f..a9b6001ec 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -606,7 +606,7 @@ static void CB2_EggHatch_1(void) case 1: if (!gPaletteFade.active) { - FillWindowPixelBuffer(sEggHatchData->windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_FILL(0)); sEggHatchData->CB2_PalCounter = 0; sEggHatchData->CB2_state++; } @@ -857,7 +857,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) { - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(15)); sEggHatchData->textColor[0] = 0; sEggHatchData->textColor[1] = 5; sEggHatchData->textColor[2] = 6; diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 4ab3cb21e..96e679dd7 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1918,7 +1918,7 @@ static bool8 Fishing9(struct Task *task) static bool8 Fishing10(struct Task *task) { AlignFishingAnimationFrames(); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3); task->tStep++; task->tFrameCounter = 0; @@ -1966,7 +1966,7 @@ static bool8 Fishing12(struct Task *task) { AlignFishingAnimationFrames(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3); task->tStep = FISHING_SHOW_RESULT; return TRUE; @@ -1977,7 +1977,7 @@ static bool8 Fishing13(struct Task *task) { AlignFishingAnimationFrames(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3); task->tStep++; return TRUE; diff --git a/src/field_region_map.c b/src/field_region_map.c index 850e84554..1d54333fb 100644 --- a/src/field_region_map.c +++ b/src/field_region_map.c @@ -196,13 +196,13 @@ static void PrintRegionMapSecName(void) { if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL); schedule_bg_copy_tilemap_to_vram(0); } else { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); CopyWindowToVram(0, 3); } } diff --git a/src/field_specials.c b/src/field_specials.c index b4017f0ef..2e0b03290 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -2646,7 +2646,7 @@ static void sub_813A570(u8 taskId) DestroyListMenuTask(task->data[14], NULL, NULL); Free(gUnknown_0203AB64); ClearStdWindowAndFrameToTransparent(task->data[13], 1); - FillWindowPixelBuffer(task->data[13], PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0)); CopyWindowToVram(task->data[13], 2); RemoveWindow(task->data[13]); DestroyTask(taskId); @@ -3001,7 +3001,7 @@ static void sub_813AA60(u16 a0, u16 a1) if (a0 > 2 && a0 < 7) { - FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(1), 0, 0, 216, 32); + FillWindowPixelRect(0, PIXEL_FILL(1), 0, 0, 216, 32); switch (a0) { case 3: @@ -3140,7 +3140,7 @@ static void sub_813AD34(u8 a0, u16 a1) if (a0 == 9 || a0 == 10) { - FillWindowPixelRect(gUnknown_0203AB5E, PALETTE_NUM_TO_FILL_VALUE(1), 0, 0, 96, 48); + FillWindowPixelRect(gUnknown_0203AB5E, PIXEL_FILL(1), 0, 0, 96, 48); if (a0 == 10) { AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gUnknown_085B3254[a1], 0, 1, 0, NULL); @@ -3227,7 +3227,7 @@ void sub_813AF48(void) DestroyListMenuTask(task->data[14], NULL, NULL); Free(gUnknown_0203AB64); ClearStdWindowAndFrameToTransparent(task->data[13], TRUE); - FillWindowPixelBuffer(task->data[13], PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0)); ClearWindowTilemap(task->data[13]); CopyWindowToVram(task->data[13], 2); RemoveWindow(task->data[13]); diff --git a/src/frontier_pass.c b/src/frontier_pass.c index c449a50f0..fff93c3c7 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -1090,7 +1090,7 @@ static void ShowAndPrintWindows(void) for (i = 0; i < WINDOW_COUNT; i++) { PutWindowTilemap(i); - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); } x = GetStringCenterAlignXOffset(1, gText_SymbolsEarned, 96); @@ -1116,7 +1116,7 @@ static void ShowAndPrintWindows(void) static void PrintAreaDescription(u8 cursorArea) { - FillWindowPixelBuffer(WINDOW_DESCRIPTION, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(WINDOW_DESCRIPTION, PIXEL_FILL(0)); if (cursorArea == CURSOR_AREA_RECORD && !sPassData->hasBattleRecord) AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[0]); else if (cursorArea != CURSOR_AREA_NOTHING) @@ -1656,7 +1656,7 @@ static void PrintOnFrontierMap(void) for (i = 0; i < MAP_WINDOW_COUNT; i++) { PutWindowTilemap(i); - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); } for (i = 0; i < NUM_FRONTIER_FACILITIES; i++) @@ -1698,7 +1698,7 @@ static void HandleFrontierMapCursorMove(u8 direction) StartSpriteAnim(sMapData->mapIndicatorSprite, sMapLandmarks[sMapData->cursorPos].animNum); sMapData->mapIndicatorSprite->pos1.x = sMapLandmarks[sMapData->cursorPos].x; sMapData->mapIndicatorSprite->pos1.y = sMapLandmarks[sMapData->cursorPos].y; - FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, PIXEL_FILL(0)); AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description); for (i = 0; i < 3; i++) diff --git a/src/frontier_util.c b/src/frontier_util.c index ec7327ca3..0c68bf119 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -1045,7 +1045,7 @@ static void ShowTowerResultsWindow(u8 battleMode) { gRecordsWindowId = AddWindow(&gUnknown_08611C74); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); if (battleMode == FRONTIER_MODE_SINGLES) StringExpandPlaceholders(gStringVar4, gText_SingleBattleRoomResults); else if (battleMode == FRONTIER_MODE_DOUBLES) @@ -1116,7 +1116,7 @@ static void ShowDomeResultsWindow(u8 battleMode) { gRecordsWindowId = AddWindow(&gUnknown_08611C74); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); if (battleMode == FRONTIER_MODE_SINGLES) StringExpandPlaceholders(gStringVar4, gText_SingleBattleTourneyResults); else @@ -1192,7 +1192,7 @@ static void ShowPalaceResultsWindow(u8 battleMode) { gRecordsWindowId = AddWindow(&gUnknown_08611C74); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); if (battleMode == FRONTIER_MODE_SINGLES) StringExpandPlaceholders(gStringVar4, gText_SingleBattleHallResults); else @@ -1248,7 +1248,7 @@ static void ShowPikeResultsWindow(void) { gRecordsWindowId = AddWindow(&gUnknown_08611C74); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults); PrintAligned(gStringVar4, 0); AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); @@ -1310,7 +1310,7 @@ static void ShowArenaResultsWindow(void) { gRecordsWindowId = AddWindow(&gUnknown_08611C74); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); PrintHyphens(10); StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults); PrintAligned(gStringVar4, 2); @@ -1396,7 +1396,7 @@ static void ShowFactoryResultsWindow(u8 battleMode) { gRecordsWindowId = AddWindow(&gUnknown_08611C74); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); if (battleMode == FRONTIER_MODE_SINGLES) StringExpandPlaceholders(gStringVar4, gText_BattleSwapSingleResults); else @@ -1461,7 +1461,7 @@ static void ShowPyramidResultsWindow(void) { gRecordsWindowId = AddWindow(&gUnknown_08611C74); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults); PrintAligned(gStringVar4, 2); AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL); @@ -1484,7 +1484,7 @@ static void ShowLinkContestResultsWindow(void) gRecordsWindowId = AddWindow(&gUnknown_08611C7C); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_LinkContestResults); x = GetStringCenterAlignXOffset(1, gStringVar4, 208); @@ -2354,7 +2354,7 @@ void ShowRankingHallRecordsWindow(void) { gRecordsWindowId = AddWindow(&gUnknown_08611C84); DrawStdWindowFrame(gRecordsWindowId, FALSE); - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_50); PutWindowTilemap(gRecordsWindowId); CopyWindowToVram(gRecordsWindowId, 3); @@ -2362,7 +2362,7 @@ void ShowRankingHallRecordsWindow(void) void ScrollRankingHallRecordsWindow(void) { - FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_OPEN); CopyWindowToVram(gRecordsWindowId, 2); } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index d3b94cff6..53577e166 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -649,7 +649,7 @@ static void sub_8173DC0(u8 taskId) gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1; } BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24)); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); CopyWindowToVram(0, 3); gTasks[taskId].tFrameCount = 7; gTasks[taskId].func = sub_8173EA4; @@ -1086,7 +1086,7 @@ static void Task_HofPC_ExitOnButtonPress(u8 taskId) static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sUnknown_085E5388, 0, gText_WelcomeToHOF); CopyWindowToVram(0, 3); @@ -1099,7 +1099,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u s32 dexNumber; s32 width; - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); // dex number @@ -1180,7 +1180,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) u32 width; u16 trainerId; - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(1, PIXEL_FILL(1)); PutWindowTilemap(1); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD); AddTextPrinterParameterized3(1, 1, 0, 1, sUnknown_085E538C, -1, gText_Name); diff --git a/src/item_menu.c b/src/item_menu.c index 8ade67614..ae2b7d47b 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -884,7 +884,7 @@ void bag_menu_print_description_box_text(int a) StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1); str = gStringVar4; } - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); bag_menu_print(1, 1, str, 3, 1, 0, 0, 0, 0); } @@ -896,7 +896,7 @@ void bag_menu_print_cursor_(u8 a, u8 b) void bag_menu_print_cursor(u8 a, u8 b) { if (b == 0xFF) - FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), 0, a, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); + FillWindowPixelRect(0, PIXEL_FILL(0), 0, a, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); else bag_menu_print(0, 1, gText_SelectorArrow2, 0, a, 0, 0, 0, b); @@ -1028,7 +1028,7 @@ void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u s16* data = gTasks[taskId].data; data[10] = AddItemMessageWindow(4); - FillWindowPixelBuffer(data[10], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(data[10], PIXEL_FILL(1)); DisplayMessageAndContinueTask(taskId, data[10], 10, 13, fontId, GetPlayerTextSpeedDelay(), str, callback); schedule_bg_copy_tilemap_to_vram(1); } @@ -1293,7 +1293,7 @@ void bag_menu_swap_items(u8 taskId) gUnknown_0203CE54->unk81A = data[1]; CopyItemName(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, data[1]), gStringVar1); StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); sub_80D4FEC(data[1]); sub_81AB89C(); @@ -1505,7 +1505,7 @@ void sub_81AC644(u8 unused) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); } if (gUnknown_0203CE54->unk828 == 1) @@ -1646,7 +1646,7 @@ void ItemMenu_UseOutOfBattle(u8 taskId) bag_menu_print_there_is_no_pokemon(taskId); else { - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); schedule_bg_copy_tilemap_to_vram(0); if (gUnknown_0203CE58.pocket != BERRIES_POCKET) ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId); @@ -1670,7 +1670,7 @@ void ItemMenu_Toss(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); sub_81ABC3C(7); gTasks[taskId].func = Task_ChooseHowManyToToss; @@ -1684,7 +1684,7 @@ void BagMenuConfirmToss(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3); StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); bag_menu_yes_no(taskId, 5, &gUnknown_08614084); } @@ -1727,7 +1727,7 @@ void BagMenuActuallyToss(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3); StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); gTasks[taskId].func = Task_ActuallyToss; } @@ -2043,7 +2043,7 @@ void display_deposit_item_ask_str(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); sub_81ABC3C(7); gTasks[taskId].func = sub_81ADA7C; @@ -2078,7 +2078,7 @@ void sub_81ADB14(u8 taskId) { s16* data = gTasks[taskId].data; - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); if (ItemId_GetImportance(gSpecialVar_ItemId)) { bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0); @@ -2244,7 +2244,7 @@ void bag_menu_print_pocket_names(const u8 *pocketName1, const u8 *pocketName2) window.width = 16; window.height = 2; windowId = AddWindow(&window); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); offset = GetStringCenterAlignXOffset(1, pocketName1, 0x40); bag_menu_print(windowId, 1, pocketName1, offset, 1, 0, 0, -1, 1); if (pocketName2) @@ -2283,7 +2283,7 @@ void setup_bag_menu_textboxes(void) LoadPalette(&gUnknown_0860F074, 0xF0, 0x20); for (i = 0; i < 3; i++) { - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); PutWindowTilemap(i); } schedule_bg_copy_tilemap_to_vram(0); @@ -2367,7 +2367,7 @@ void bag_menu_remove_money_window(void) void bag_menu_prepare_tmhm_move_window(void) { - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(3, PIXEL_FILL(0)); blit_move_info_icon(3, 19, 0, 0); blit_move_info_icon(3, 20, 0, 12); blit_move_info_icon(3, 21, 0, 24); @@ -2381,7 +2381,7 @@ void PrintTMHMMoveData(u16 itemId) u16 moveId; const u8* text; - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(4, PIXEL_FILL(0)); if (itemId == ITEM_NONE) { for (i = 0; i < 4; i++) diff --git a/src/learn_move.c b/src/learn_move.c index 517352555..879acff6d 100644 --- a/src/learn_move.c +++ b/src/learn_move.c @@ -498,7 +498,7 @@ static void LearnMoveMain(void) case 27: if (!sub_81D2C3C()) { - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(3, PIXEL_FILL(1)); if (sLearnMoveStruct2.showContestInfo == FALSE) { sLearnMoveStruct->state = 3; @@ -631,7 +631,7 @@ static void HideSpritesAndPrintTeachText(bool8 a) if (!a) { StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(3, PIXEL_FILL(1)); AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL); } } @@ -695,7 +695,7 @@ static void ShowTeachMoveText(bool8 showContest) if (showContest == FALSE) { StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(3, PIXEL_FILL(1)); AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL); } } diff --git a/src/link.c b/src/link.c index 5c7614c1b..9aedbc961 100644 --- a/src/link.c +++ b/src/link.c @@ -1683,8 +1683,8 @@ static void sub_800B080(void) CopyToBgTilemapBuffer(1, gWirelessLinkDisplayTilemap, 0, 0); CopyBgTilemapBufferToVram(1); LoadPalette(gWirelessLinkDisplayPal, 0, 0x20); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); AddTextPrinterParameterized3(0, 3, 2, 6, gUnknown_082ED224, 0, gText_CommErrorEllipsis); AddTextPrinterParameterized3(2, 3, 2, 1, gUnknown_082ED224, 0, gText_MoveCloserToLinkPartner); PutWindowTilemap(0); @@ -1696,8 +1696,8 @@ static void sub_800B080(void) static void sub_800B138(void) { LoadBgTiles(0, g2BlankTilesGfx, 0x20, 0); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); AddTextPrinterParameterized3(1, 3, 2, 0, gUnknown_082ED224, 0, gText_CommErrorCheckConnections); PutWindowTilemap(1); PutWindowTilemap(2); diff --git a/src/list_menu.c b/src/list_menu.c index b8e186348..51d7dcb15 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -486,7 +486,7 @@ void RedrawListMenu(u8 listTaskId) { struct ListMenu *list = (void*) gTasks[listTaskId].data; - FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue)); + FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue)); ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed); ListMenuDrawCursor(list); CopyWindowToVram(list->template.windowId, 2); @@ -584,7 +584,7 @@ static u8 ListMenuInitInternal(struct ListMenuTemplate *listMenuTemplate, u16 sc if (list->template.totalItems < list->template.maxShowed) list->template.maxShowed = list->template.totalItems; - FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue)); + FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue)); ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed); ListMenuDrawCursor(list); ListMenuCallSelectionChangedCallback(list, TRUE); @@ -698,7 +698,7 @@ static void ListMenuErasePrintedCursor(struct ListMenu *list, u16 selectedRow) u8 width = GetMenuCursorDimensionByFont(list->template.fontId, 0); u8 height = GetMenuCursorDimensionByFont(list->template.fontId, 1); FillWindowPixelRect(list->template.windowId, - PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue), + PIXEL_FILL(list->template.fillValue), list->template.cursor_X, selectedRow * yMultiplier + list->template.upText_Y, width, @@ -795,7 +795,7 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, bool8 movingDown) { if (count >= list->template.maxShowed) { - FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue)); + FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue)); ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed); } else @@ -806,26 +806,26 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, bool8 movingDown) { u16 y, width, height; - ScrollWindow(list->template.windowId, 1, count * yMultiplier, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue)); + ScrollWindow(list->template.windowId, 1, count * yMultiplier, PIXEL_FILL(list->template.fillValue)); ListMenuPrintEntries(list, list->scrollOffset, 0, count); y = (list->template.maxShowed * yMultiplier) + list->template.upText_Y; width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8; height = (GetWindowAttribute(list->template.windowId, WINDOW_HEIGHT) * 8) - y; FillWindowPixelRect(list->template.windowId, - PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue), + PIXEL_FILL(list->template.fillValue), 0, y, width, height); } else { u16 width; - ScrollWindow(list->template.windowId, 0, count * yMultiplier, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue)); + ScrollWindow(list->template.windowId, 0, count * yMultiplier, PIXEL_FILL(list->template.fillValue)); ListMenuPrintEntries(list, list->scrollOffset + (list->template.maxShowed - count), list->template.maxShowed - count, count); width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8; FillWindowPixelRect(list->template.windowId, - PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue), + PIXEL_FILL(list->template.fillValue), 0, 0, width, list->template.upText_Y); } } diff --git a/src/mail.c b/src/mail.c index 27716a3f8..9cca4492e 100644 --- a/src/mail.c +++ b/src/mail.c @@ -477,8 +477,8 @@ static void sub_8121B1C(void) y = 0; PutWindowTilemap(0); PutWindowTilemap(1); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); for (i = 0; i < sMailRead->layout->numSubStructs; i ++) { if (sMailRead->strbuf[i][0] == EOS || sMailRead->strbuf[i][0] == CHAR_SPACE) diff --git a/src/main_menu.c b/src/main_menu.c index 6ad1776f8..e6e29d942 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -783,8 +783,8 @@ static void Task_DisplayMainMenu(u8 taskId) { case HAS_NO_SAVED_GAME: default: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(0, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(1, PIXEL_FILL(0xA)); AddTextPrinterParameterized3(0, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); AddTextPrinterParameterized3(1, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); PutWindowTilemap(0); @@ -795,9 +795,9 @@ static void Task_DisplayMainMenu(u8 taskId) DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[1], MAIN_MENU_BORDER_TILE); break; case HAS_SAVED_GAME: - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(2, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(3, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); @@ -813,10 +813,10 @@ static void Task_DisplayMainMenu(u8 taskId) DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[4], MAIN_MENU_BORDER_TILE); break; case HAS_MYSTERY_GIFT: - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(2, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(3, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(5, PIXEL_FILL(0xA)); AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift); @@ -836,11 +836,11 @@ static void Task_DisplayMainMenu(u8 taskId) DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[5], MAIN_MENU_BORDER_TILE); break; case HAS_MYSTERY_EVENTS: - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0xA)); - FillWindowPixelBuffer(6, PALETTE_NUM_TO_FILL_VALUE(0xA)); + FillWindowPixelBuffer(2, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(3, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(5, PIXEL_FILL(0xA)); + FillWindowPixelBuffer(6, PIXEL_FILL(0xA)); AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2); @@ -2098,7 +2098,7 @@ static void NewGameBirchSpeech_StartFadePlatformOut(u8 taskId, u8 delay) static void NewGameBirchSpeech_ShowGenderMenu(void) { DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, 2, sMenuActions_Gender); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0); PutWindowTilemap(1); @@ -2126,7 +2126,7 @@ static void NewGameBirchSpeech_SetDefaultPlayerName(u8 nameId) static void CreateMainMenuErrorWindow(const u8* str) { - FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(7, PIXEL_FILL(1)); AddTextPrinterParameterized(7, 1, str, 0, 1, 2, 0); PutWindowTilemap(7); CopyWindowToVram(7, 2); @@ -2239,7 +2239,7 @@ static void NewGameBirchSpeech_ClearGenderWindowTilemap(u8 a, u8 b, u8 c, u8 d, static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, bool8 copyToVram) { CallWindowFunction(windowId, NewGameBirchSpeech_ClearGenderWindowTilemap); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -2277,7 +2277,7 @@ void CreateYesNoMenuParameterized(u8 a, u8 b, u16 c, u16 d, u8 e, u8 f) static void NewGameBirchSpeech_ShowDialogueWindow(u8 windowId, u8 copyToVram) { CallWindowFunction(windowId, NewGameBirchSpeech_CreateDialogueWindowBorder); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); diff --git a/src/match_call.c b/src/match_call.c index 76012e076..d4da8d791 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1191,7 +1191,7 @@ static bool32 LoadMatchCallWindowGfx(u8 taskId) return FALSE; } - FillWindowPixelBuffer(taskData[2], PALETTE_NUM_TO_FILL_VALUE(8)); + FillWindowPixelBuffer(taskData[2], PIXEL_FILL(8)); LoadPalette(sUnknown_0860EA4C, 0xE0, 0x20); LoadPalette(sPokeNavIconPalette, 0xF0, 0x20); ChangeBgY(0, -0x2000, 0); @@ -1241,7 +1241,7 @@ static bool32 sub_81962D8(u8 taskId) s16 *taskData = gTasks[taskId].data; if (!ExecuteMatchCallTextPrinter(taskData[2])) { - FillWindowPixelBuffer(taskData[2], PALETTE_NUM_TO_FILL_VALUE(8)); + FillWindowPixelBuffer(taskData[2], PIXEL_FILL(8)); if (!gMatchCallState.triggeredFromScript) SelectMatchCallMessage(gMatchCallState.trainerId, gStringVar4); @@ -1257,7 +1257,7 @@ static bool32 sub_8196330(u8 taskId) s16 *taskData = gTasks[taskId].data; if (!ExecuteMatchCallTextPrinter(taskData[2]) && !IsSEPlaying() && gMain.newKeys & (A_BUTTON | B_BUTTON)) { - FillWindowPixelBuffer(taskData[2], PALETTE_NUM_TO_FILL_VALUE(8)); + FillWindowPixelBuffer(taskData[2], PIXEL_FILL(8)); CopyWindowToVram(taskData[2], 2); PlaySE(SE_TOREOFF); return TRUE; diff --git a/src/menu.c b/src/menu.c index 6a181532e..8cb7ac0b2 100644 --- a/src/menu.c +++ b/src/menu.c @@ -213,7 +213,7 @@ void sub_81973A4(void) void DrawDialogueFrame(u8 windowId, bool8 copyToVram) { CallWindowFunction(windowId, WindowFunc_DrawDialogueFrame); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -222,7 +222,7 @@ void DrawDialogueFrame(u8 windowId, bool8 copyToVram) void DrawStdWindowFrame(u8 windowId, bool8 copyToVram) { CallWindowFunction(windowId, WindowFunc_DrawStandardFrame); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -231,7 +231,7 @@ void DrawStdWindowFrame(u8 windowId, bool8 copyToVram) void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram) { CallWindowFunction(windowId, WindowFunc_ClearDialogWindowAndFrame); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -240,7 +240,7 @@ void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram) void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram) { CallWindowFunction(windowId, WindowFunc_ClearStdWindowAndFrame); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -554,7 +554,7 @@ void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 sTileNum = tileNum; sPaletteNum = paletteNum; CallWindowFunction(windowId, WindowFunc_DrawDialogFrameWithCustomTileAndPalette); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -566,7 +566,7 @@ void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum) sTileNum = tileNum; sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM); CallWindowFunction(windowId, WindowFunc_DrawDialogFrameWithCustomTileAndPalette); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -671,7 +671,7 @@ void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram) { // The palette slot doesn't matter, since the tiles are transparent. CallWindowFunction(windowId, WindowFunc_ClearDialogWindowAndFrameNullPalette); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -687,7 +687,7 @@ void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 bas sTileNum = baseTileNum; sPaletteNum = paletteNum; CallWindowFunction(windowId, WindowFunc_DrawStdFrameWithCustomTileAndPalette); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -699,7 +699,7 @@ void DrawStdFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 baseTileNum) sTileNum = baseTileNum; sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM); CallWindowFunction(windowId, WindowFunc_DrawStdFrameWithCustomTileAndPalette); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -768,7 +768,7 @@ void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 t void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram) { CallWindowFunction(windowId, WindowFunc_ClearStdWindowAndFrameToTransparent); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) CopyWindowToVram(windowId, 3); @@ -814,7 +814,7 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram) if (sWindowId != 0xFF) { PutWindowTilemap(sWindowId); - FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); width = GetStringWidth(0, string, 0); AddTextPrinterParameterized3(sWindowId, 0, @@ -848,7 +848,7 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo color[2] = 2; } PutWindowTilemap(sWindowId); - FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); if (string2 != NULL) { width = GetStringWidth(0, string2, 0); @@ -876,7 +876,7 @@ void sub_81982F0(void) { if (sWindowId != 0xFF) { - FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); CopyWindowToVram(sWindowId, 3); } } @@ -885,7 +885,7 @@ void sub_8198314(void) { if (sWindowId != 0xFF) { - FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sWindowId, PIXEL_FILL(0)); ClearWindowTilemap(sWindowId); CopyWindowToVram(sWindowId, 3); RemoveWindow(sWindowId); @@ -934,7 +934,7 @@ void RedrawMenuCursor(u8 oldPos, u8 newPos) width = GetMenuCursorDimensionByFont(sMenu.fontId, 0); height = GetMenuCursorDimensionByFont(sMenu.fontId, 1); - FillWindowPixelRect(sMenu.windowId, PALETTE_NUM_TO_FILL_VALUE(1), sMenu.left, sMenu.optionHeight * oldPos + sMenu.top, width, height); + FillWindowPixelRect(sMenu.windowId, PIXEL_FILL(1), sMenu.left, sMenu.optionHeight * oldPos + sMenu.top, width, height); AddTextPrinterParameterized(sMenu.windowId, sMenu.fontId, gText_SelectorArrow3, sMenu.left, sMenu.optionHeight * newPos + sMenu.top, 0, 0); } @@ -1313,7 +1313,7 @@ void sub_8199060(u8 oldCursorPos, u8 newCursorPos) u8 xPos = (oldCursorPos % sMenu.horizontalCount) * sMenu.optionWidth + sMenu.left; u8 yPos = (oldCursorPos / sMenu.horizontalCount) * sMenu.optionHeight + sMenu.top; FillWindowPixelRect(sMenu.windowId, - PALETTE_NUM_TO_FILL_VALUE(1), + PIXEL_FILL(1), xPos, yPos, cursorWidth, diff --git a/src/money.c b/src/money.c index e7ae6080c..4ff8086ea 100644 --- a/src/money.c +++ b/src/money.c @@ -169,7 +169,7 @@ void DrawMoneyBox(int amount, u8 x, u8 y) SetWindowTemplateFields(&template, 0, x + 1, y + 1, 10, 2, 15, 8); sMoneyBoxWindowId = AddWindow(&template); - FillWindowPixelBuffer(sMoneyBoxWindowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sMoneyBoxWindowId, PIXEL_FILL(0)); PutWindowTilemap(sMoneyBoxWindowId); CopyWindowToVram(sMoneyBoxWindowId, 1); PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x214, 14, amount); diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 2a1617592..1c886565a 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -90,7 +90,7 @@ void CB2_InitMysteryEventMenu(void) DeactivateAllTextPrinters(); for (i = 0; i < 2; i++) - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14); LoadUserWindowBorderGfx(0, 1u, 0xD0u); @@ -313,6 +313,6 @@ static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 sp textColor[1] = 2; textColor[2] = 3; - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(textColor[0])); + FillWindowPixelBuffer(windowId, PIXEL_FILL(textColor[0])); AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text); } diff --git a/src/naming_screen.c b/src/naming_screen.c index e4159e3be..22bbb84d7 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1474,7 +1474,7 @@ static void HandleDpadMovement(struct Task *task) static void sub_80E4894(void) { - FillWindowPixelBuffer(gNamingScreenData->windows[3], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gNamingScreenData->windows[3], PIXEL_FILL(1)); AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, gNamingScreenData->template->title, 8, 1, 0, 0); PutWindowTilemap(gNamingScreenData->windows[3]); } @@ -1485,7 +1485,7 @@ static void sub_80E48E8(void) StringCopy(buffer, gSpeciesNames[gNamingScreenData->monSpecies]); StringAppendN(buffer, gNamingScreenData->template->title, 15); - FillWindowPixelBuffer(gNamingScreenData->windows[3], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gNamingScreenData->windows[3], PIXEL_FILL(1)); AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0); PutWindowTilemap(gNamingScreenData->windows[3]); } @@ -1672,7 +1672,7 @@ static void sub_80E4D10(void) u8 maxChars = gNamingScreenData->template->maxChars; u16 unk = gNamingScreenData->inputCharBaseXPos - 0x40; - FillWindowPixelBuffer(gNamingScreenData->windows[2], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gNamingScreenData->windows[2], PIXEL_FILL(1)); for (i = 0; i < maxChars; i++) { @@ -1704,9 +1704,9 @@ static const struct TextColorThing sUnkColorStruct = static const u8 sFillValues[3] = { - PALETTE_NUM_TO_FILL_VALUE(0xE), - PALETTE_NUM_TO_FILL_VALUE(0xD), - PALETTE_NUM_TO_FILL_VALUE(0xF) + PIXEL_FILL(0xE), + PIXEL_FILL(0xD), + PIXEL_FILL(0xF) }; static const u8 *const sUnkColors[3] = @@ -1768,7 +1768,7 @@ static void sub_80E4EF0(void) { const u8 color[3] = { 15, 1, 2 }; - FillWindowPixelBuffer(gNamingScreenData->windows[4], PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(gNamingScreenData->windows[4], PIXEL_FILL(15)); AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack); PutWindowTilemap(gNamingScreenData->windows[4]); CopyWindowToVram(gNamingScreenData->windows[4], 3); diff --git a/src/option_menu.c b/src/option_menu.c index 94bbef306..1766f0bdb 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -620,7 +620,7 @@ static void ButtonMode_DrawChoices(u8 selection) static void DrawTextOption(void) { - FillWindowPixelBuffer(WIN_TEXT_OPTION, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1)); AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(WIN_TEXT_OPTION, 3); } @@ -629,7 +629,7 @@ static void DrawOptionMenuTexts(void) { u8 i; - FillWindowPixelBuffer(WIN_OPTIONS, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1)); for (i = 0; i < MENUITEM_COUNT; i++) { AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); diff --git a/src/party_menu.c b/src/party_menu.c index 03e267e74..23e4361bc 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -3108,7 +3108,7 @@ static void sub_81B239C(u8 a) } DeactivateAllTextPrinters(); for (i = 0; i < PARTY_SIZE; i++) - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); LoadUserWindowBorderGfx(0, 0x4F, 0xD0); LoadPalette(GetOverworldTextboxPalettePtr(), 0xE0, 0x20); LoadPalette(gUnknown_0860F074, 0xF0, 0x20); @@ -3126,7 +3126,7 @@ static void sub_81B2428(bool8 a) if (a == TRUE) { firstWindowId = AddWindow(&gUnknown_08615918); - FillWindowPixelBuffer(firstWindowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(firstWindowId, PIXEL_FILL(0)); mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48); AddTextPrinterParameterized4(firstWindowId, 0, mainOffset, 1, 0, 0, gUnknown_086157FC[0], -1, gMenuText_Confirm); PutWindowTilemap(firstWindowId); @@ -3139,7 +3139,7 @@ static void sub_81B2428(bool8 a) windowId = AddWindow(&gUnknown_08615908); offset = 3; } - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); if (gUnknown_0203CEC8.unk8_0 != 10) { mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48); diff --git a/src/player_pc.c b/src/player_pc.c index c088a6ce7..6e78533e7 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -977,7 +977,7 @@ static void sub_816BEF0(s32 id) description = (u8 *)ItemId_GetDescription(gSaveBlock1Ptr->pcItems[id].itemId); else description = ItemStorage_GetItemPcResponse(ITEMPC_GO_BACK_TO_PREV); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL); } @@ -1005,7 +1005,7 @@ static void sub_816BFE0(u8 y, u8 b, u8 speed) { u8 windowId = gUnknown_0203BCC4->windowIds[0]; if (b == 0xFF) - FillWindowPixelRect(windowId, PALETTE_NUM_TO_FILL_VALUE(1), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); + FillWindowPixelRect(windowId, PIXEL_FILL(1), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); else AddTextPrinterParameterized4(windowId, 1, 0, y, 0, 0, gUnknown_085DFF8C, speed, gText_SelectorArrow2); } @@ -1123,7 +1123,7 @@ static const u8* ItemStorage_GetItemPcResponse(u16 itemId) static void ItemStorage_PrintItemPcResponse(const u8 *string) { u8 windowId = gUnknown_0203BCC4->windowIds[1]; - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, string); AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL); } diff --git a/src/pokeblock.c b/src/pokeblock.c index 4bd4a8ccb..2682754aa 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -665,7 +665,7 @@ static void HandleInitWindows(void) for (i = 0; i < ARRAY_COUNT(sWindowTemplatesForPokeblockMenu) - 1; i++) { - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); } schedule_bg_copy_tilemap_to_vram(0); @@ -749,7 +749,7 @@ static void sub_8135FCC(s32 pkblId) struct Pokeblock *pokeblock; u16 rectTilemapSrc[2]; - FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(7, PIXEL_FILL(0)); if (pkblId != LIST_B_PRESSED) { diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 908aec1c0..d72a9ffbe 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -704,7 +704,7 @@ static void HandleInitWindows(void) DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 1, 0xE0); LoadPalette(gUnknown_0860F074, 0xF0, 0x20); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); schedule_bg_copy_tilemap_to_vram(0); } diff --git a/src/pokedex.c b/src/pokedex.c index f54fdbd29..4bf8dff6d 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -2152,7 +2152,7 @@ static void CreateCaughtBall(u16 a, u8 x, u8 y, u16 unused) if (a) BlitBitmapToWindow(0, gUnknown_0855D2BE, x * 8, y * 8, 8, 16); else - FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), x * 8, y * 8, 8, 16); + FillWindowPixelRect(0, PIXEL_FILL(0), x * 8, y * 8, 8, 16); } static u8 CreateMonName(u16 num, u8 left, u8 top) @@ -2170,7 +2170,7 @@ static u8 CreateMonName(u16 num, u8 left, u8 top) void sub_80BD28C(u8 x, u8 y, u16 unused) { - FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), x * 8, y * 8, 0x60, 16); + FillWindowPixelRect(0, PIXEL_FILL(0), x * 8, y * 8, 0x60, 16); } static void CreateInitialPokemonSprites(u16 selectedMon, u16 b) @@ -2927,7 +2927,7 @@ void sub_80BEA24(u8 taskId) case 1: DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); PutWindowTilemap(1); sub_80C0D30(1, sPokedexListItem->dexNum); @@ -3222,7 +3222,7 @@ void sub_80BF250(u8 taskId) case 1: DecompressAndLoadBgGfxUsingHeap(3, &gPokedexMenu_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, &gPokedexTilemap_CryScreen, 0, 0); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); PutWindowTilemap(3); PutWindowTilemap(2); @@ -3416,7 +3416,7 @@ void sub_80BF82C(u8 taskId) case 1: DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, gPokedexTilemap_SizeScreen, 0, 0); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); gMain.state++; break; @@ -3766,7 +3766,7 @@ void sub_80BFE38(u8 taskId) case 1: DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); PutWindowTilemap(1); sub_80C0D30(1, gTasks[taskId].data[1]); @@ -4784,7 +4784,7 @@ void sub_80C1270(const u8 *str, u32 left, u32 top) void sub_80C12B0(u32 x, u32 y, u32 width, u32 height) { - FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), x, y, width, height); + FillWindowPixelRect(0, PIXEL_FILL(0), x, y, width, height); } void sub_80C12E0(u8 taskId) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index d18077f21..9681b72f4 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1552,7 +1552,7 @@ void sub_80C6D80(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 arg4) winTemplate.width = 24; winTemplate.height = 2; windowId = AddWindow(&winTemplate); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(arg3)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(arg3)); tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA); tileData2 = (winTemplate.width * 32) + tileData1; @@ -1599,7 +1599,7 @@ void sub_80C6EAC(const u8 *string, void *dst, u16 arg2, u8 arg3, u8 clr2, u8 clr winTemplate.height = 2; var = winTemplate.width * 32; windowId = AddWindow(&winTemplate); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(arg3)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(arg3)); tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA); tileData2 = (winTemplate.width * 32) + tileData1; txtColor[0] = arg3; @@ -1737,7 +1737,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId) CreatePCMenu(task->data[1], &task->data[15]); sub_81973A4(); DrawDialogueFrame(0, 0); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, TEXT_SPEED_FF, NULL, 2, 1, 3); CopyWindowToVram(0, 3); CopyWindowToVram(task->data[15], 3); @@ -1763,7 +1763,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId) if (task->data[1] != task->data[3]) { task->data[1] = task->data[3]; - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3); } break; @@ -1778,13 +1778,13 @@ static void Task_PokemonStorageSystemPC(u8 taskId) default: if (task->data[2] == 0 && CountPartyMons() == PARTY_SIZE) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3); task->data[0] = 3; } else if (task->data[2] == 1 && CountPartyMons() == 1) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3); task->data[0] = 3; } @@ -1799,7 +1799,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId) case 3: if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3); task->data[0] = 2; } @@ -1809,7 +1809,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId) task->data[1] = 4; Menu_MoveCursor(-1); task->data[1] = Menu_GetCursorPos(); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3); task->data[0] = 2; } @@ -1819,7 +1819,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId) task->data[1] = 0; Menu_MoveCursor(1); task->data[1] = Menu_GetCursorPos(); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3); task->data[0] = 2; } @@ -2103,7 +2103,7 @@ static void sub_80C7BE4(void) winTemplate.height = 4; windowId = AddWindow(&winTemplate); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(4)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(4)); center = GetStringCenterAlignXOffset(1, boxName, 64); AddTextPrinterParameterized3(windowId, 1, center, 1, gUnknown_08571734, TEXT_SPEED_FF, boxName); @@ -4107,7 +4107,7 @@ static void LoadCursorMonGfx(u16 species, u32 pid) static void PrintCursorMonInfo(void) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); if (sPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) { AddTextPrinterParameterized(0, 1, sPSSData->cursorMonNickText, 6, 0, TEXT_SPEED_FF, NULL); @@ -4416,7 +4416,7 @@ static void PrintStorageActionText(u8 id) } DynamicPlaceholderTextUtil_ExpandPlaceholders(sPSSData->field_2190, gPCStorageActionTexts[id].text); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(1, PIXEL_FILL(1)); AddTextPrinterParameterized(1, 1, sPSSData->field_2190, 0, 1, TEXT_SPEED_FF, NULL); sub_8098858(1, 2, 14); PutWindowTilemap(1); @@ -8835,7 +8835,7 @@ static bool8 sub_80D0164(void) sPSSData->field_2200 = AddWindow8Bit(&gUnknown_0857BB1C); if (sPSSData->field_2200 != 0xFF) { - FillWindowPixelBuffer(sPSSData->field_2200, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sPSSData->field_2200, PIXEL_FILL(0)); return TRUE; } } @@ -8892,7 +8892,7 @@ static bool8 sub_80D024C(void) ChangeBgX(0, -1024, 0); ChangeBgY(0, -1024, 0); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); - FillWindowPixelBuffer8Bit(sPSSData->field_2200, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer8Bit(sPSSData->field_2200, PIXEL_FILL(0)); sub_80D07B0(sMoveMonsPtr->fromRow, sMoveMonsPtr->fromColumn); SetBgAttribute(0, BG_ATTR_PALETTEMODE, 1); PutWindowTilemap(sPSSData->field_2200); @@ -9194,7 +9194,7 @@ static void sub_80D0834(u8 arg0, u8 arg1) if (species != SPECIES_NONE) { FillWindowPixelRect8Bit(sPSSData->field_2200, - PALETTE_NUM_TO_FILL_VALUE(0), + PIXEL_FILL(0), 24 * arg0, 24 * arg1, 32, @@ -9911,7 +9911,7 @@ static void PrintItemDescription(void) else description = ItemId_GetDescription(sPSSData->cursorMonItem); - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(2, PIXEL_FILL(1)); AddTextPrinterParameterized5(2, 1, description, 4, 0, 0, NULL, 0, 1); } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index f0c68e7d0..91e344123 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -2629,7 +2629,7 @@ static void ResetWindows(void) for (i = 0; i < 20; i++) { - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); } for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++) { @@ -2644,9 +2644,9 @@ static void SummaryScreen_PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, static void sub_81C25E8(void) { - FillWindowPixelBuffer(17, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(18, PALETTE_NUM_TO_FILL_VALUE(0)); - FillWindowPixelBuffer(19, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(17, PIXEL_FILL(0)); + FillWindowPixelBuffer(18, PIXEL_FILL(0)); + FillWindowPixelBuffer(19, PIXEL_FILL(0)); if (!pssData->summary.isEgg) sub_81C2628(); else @@ -2898,7 +2898,7 @@ static u8 AddWindowFromTemplateList(const struct WindowTemplate *template, u8 te if (*windowIdPtr == 0xFF) { *windowIdPtr = AddWindow(&template[templateId]); - FillWindowPixelBuffer(*windowIdPtr, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(*windowIdPtr, PIXEL_FILL(0)); } return *windowIdPtr; } @@ -2920,7 +2920,7 @@ static void PrintPageSpecificText(u8 pageIndex) for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++) { if (pssData->windowIds[i] != 0xFF) - FillWindowPixelBuffer(pssData->windowIds[i], PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(pssData->windowIds[i], PIXEL_FILL(0)); } sTextPrinterFunctions[pageIndex](); } @@ -3469,7 +3469,7 @@ static void PrintMovePowerAndAccuracy(u16 moveIndex) const u8 *text; if (moveIndex != 0) { - FillWindowPixelRect(14, PALETTE_NUM_TO_FILL_VALUE(0), 53, 0, 19, 32); + FillWindowPixelRect(14, PIXEL_FILL(0), 53, 0, 19, 32); if (gBattleMoves[moveIndex].power < 2) { @@ -3567,7 +3567,7 @@ static void PrintContestMoveDescription(u8 moveSlot) static void PrintMoveDetails(u16 move) { u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, 2); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); if (move != MOVE_NONE) { if (pssData->currPageIndex == 2) @@ -3619,7 +3619,7 @@ static void PrintNewMoveDetailsOrCancelText(void) static void sub_81C4064(void) { u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, 0); - FillWindowPixelRect(windowId, PALETTE_NUM_TO_FILL_VALUE(0), 0, 66, 72, 16); + FillWindowPixelRect(windowId, PIXEL_FILL(0), 0, 66, 72, 16); CopyWindowToVram(windowId, 2); } @@ -3628,11 +3628,11 @@ static void sub_81C40A0(u8 moveIndex1, u8 moveIndex2) u8 windowId1 = AddWindowFromTemplateList(sPageMovesTemplate, 0); u8 windowId2 = AddWindowFromTemplateList(sPageMovesTemplate, 1); - FillWindowPixelRect(windowId1, PALETTE_NUM_TO_FILL_VALUE(0), 0, moveIndex1 * 16, 0x48, 0x10); - FillWindowPixelRect(windowId1, PALETTE_NUM_TO_FILL_VALUE(0), 0, moveIndex2 * 16, 0x48, 0x10); + FillWindowPixelRect(windowId1, PIXEL_FILL(0), 0, moveIndex1 * 16, 0x48, 0x10); + FillWindowPixelRect(windowId1, PIXEL_FILL(0), 0, moveIndex2 * 16, 0x48, 0x10); - FillWindowPixelRect(windowId2, PALETTE_NUM_TO_FILL_VALUE(0), 0, moveIndex1 * 16, 0x30, 0x10); - FillWindowPixelRect(windowId2, PALETTE_NUM_TO_FILL_VALUE(0), 0, moveIndex2 * 16, 0x30, 0x10); + FillWindowPixelRect(windowId2, PIXEL_FILL(0), 0, moveIndex1 * 16, 0x30, 0x10); + FillWindowPixelRect(windowId2, PIXEL_FILL(0), 0, moveIndex2 * 16, 0x30, 0x10); PrintMoveNameAndPP(moveIndex1); PrintMoveNameAndPP(moveIndex2); @@ -3641,7 +3641,7 @@ static void sub_81C40A0(u8 moveIndex1, u8 moveIndex2) static void PrintHMMovesCantBeForgotten(void) { u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, 2); - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); SummaryScreen_PrintTextOnWindow(windowId, gText_HMMovesCantBeForgotten2, 6, 1, 0, 0); } diff --git a/src/pokenav.c b/src/pokenav.c index 05aa559ec..217d98132 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -1138,8 +1138,8 @@ bool32 IsDma3ManagerBusyWithBgCopy_(void) void sub_81C7BF8(u32 windowId) { - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(4)); - FillWindowPixelRect(windowId, PALETTE_NUM_TO_FILL_VALUE(5), 0, 0, 0x80, 1); + FillWindowPixelBuffer(windowId, PIXEL_FILL(4)); + FillWindowPixelRect(windowId, PIXEL_FILL(5), 0, 0, 0x80, 1); } void sub_81C7C28(void) diff --git a/src/region_map.c b/src/region_map.c index 6d5224821..67cf9cc0f 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1622,7 +1622,7 @@ void MCB2_FlyMap(void) case 7: LoadPalette(sRegionMapFramePal, 0x10, 0x20); PutWindowTilemap(2); - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL); schedule_bg_copy_tilemap_to_vram(0); gMain.state++; @@ -1707,7 +1707,7 @@ static void sub_8124904(void) } else { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); } AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); schedule_bg_copy_tilemap_to_vram(0); @@ -1721,7 +1721,7 @@ static void sub_8124904(void) ClearStdWindowAndFrameToTransparent(1, FALSE); DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x65, 0x0d); } - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); CopyWindowToVram(0, 2); schedule_bg_copy_tilemap_to_vram(0); gUnknown_03001180 = FALSE; diff --git a/src/rom_8011DC0.c b/src/rom_8011DC0.c index 7e9e81e96..b06e5cd61 100644 --- a/src/rom_8011DC0.c +++ b/src/rom_8011DC0.c @@ -387,7 +387,7 @@ void nullsub_89(void) void sub_80124EC(u8 windowId, u8 arg1, u8 stringId) { - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); switch (arg1 << 8) { case 0x200: @@ -506,7 +506,7 @@ void sub_8012780(u8 taskId) } data->field_11 = AddWindow(&gUnknown_082F012C); - FillWindowPixelBuffer(data->field_10, PALETTE_NUM_TO_FILL_VALUE(2)); + FillWindowPixelBuffer(data->field_10, PIXEL_FILL(2)); sub_80173E0(data->field_10, 0, gUnknown_082EDBC4, 8, 1, 4); PutWindowTilemap(data->field_10); CopyWindowToVram(data->field_10, 2); @@ -1075,7 +1075,7 @@ void sub_80134E8(u8 taskId) data->listWindowId = AddWindow(&gUnknown_082F0174); data->field_D = AddWindow(&gUnknown_082F017C); - FillWindowPixelBuffer(data->field_C, PALETTE_NUM_TO_FILL_VALUE(2)); + FillWindowPixelBuffer(data->field_C, PIXEL_FILL(2)); sub_80173E0(data->field_C, 0, gUnknown_082EF7DC, 8, 1, 4); PutWindowTilemap(data->field_C); CopyWindowToVram(data->field_C, 2); @@ -2155,7 +2155,7 @@ void sub_8014F48(u8 taskId) data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0); sub_8018784(data->field_D); - FillWindowPixelBuffer(data->field_D, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(data->field_D, PIXEL_FILL(1)); PutWindowTilemap(data->field_D); sub_80125BC(data->field_D); CopyWindowToVram(data->field_D, 2); diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 1f0fe69c9..08f193890 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -231,8 +231,8 @@ static void CB2_SaveFailedScreen(void) LoadPalette(gUnknown_0860F074, 0xF0, 0x20); DrawStdFrameWithCustomTileAndPalette(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE); DrawStdFrameWithCustomTileAndPalette(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE); - FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); // backwards? - FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], PIXEL_FILL(1)); // backwards? + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again? CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1); SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0); @@ -265,19 +265,19 @@ static void CB2_WipeSave(void) { if (WipeSectors(gDamagedSaveSectors) != FALSE) { - FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0); SetMainCallback2(CB2_GameplayCannotBeContinued); return; } - FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); SaveFailedScreenTextPrint(gText_CheckCompleted, 1, 0); HandleSavingData(gSaveFailedType); if (gDamagedSaveSectors != 0) { - FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0); } @@ -286,12 +286,12 @@ static void CB2_WipeSave(void) if (wipeTries == 3) { - FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0); } else { - FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); if (gGameContinueCallback == NULL) SaveFailedScreenTextPrint(gText_SaveCompleteGameCannotContinue, 1, 0); @@ -308,7 +308,7 @@ static void CB2_GameplayCannotBeContinued(void) if (gMain.newKeys & A_BUTTON) { - FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); SaveFailedScreenTextPrint(gText_GamePlayCannotBeContinued, 1, 0); SetVBlankCallback(VBlankCB); SetMainCallback2(CB2_FadeAndReturnToTitleScreen); diff --git a/src/scrcmd.c b/src/scrcmd.c index b42b3e5f7..d60fb071c 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1519,7 +1519,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0); DrawStdWindowFrame(gUnknown_03000F30, 0); PutWindowTilemap(gUnknown_03000F30); - FillWindowPixelBuffer(gUnknown_03000F30, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(gUnknown_03000F30, PIXEL_FILL(1)); AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0); CopyWindowToVram(gUnknown_03000F30, 3); return FALSE; diff --git a/src/script_menu.c b/src/script_menu.c index 409191803..afb1ef312 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -1639,27 +1639,27 @@ static void sub_80E2A94(u8 multichoiceId) switch (multichoiceId) { case 77: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case 76: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case 78: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case 79: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case 75: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case 74: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; } diff --git a/src/shop.c b/src/shop.c index 55a7a20f7..e03e2ab0c 100755 --- a/src/shop.c +++ b/src/shop.c @@ -545,7 +545,7 @@ static void BuyMenuPrintItemDescriptionAndShowItemIcon(int item, bool8 onInit, s description = gText_QuitShopping; } - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); BuyMenuPrint(2, description, 3, 1, 0, 0); } @@ -1144,7 +1144,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId) { s16 *data = gTasks[taskId].data; - FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(4, PIXEL_FILL(1)); PrintMoneyAmount(4, 38, 1, gShopDataPtr->totalCost, TEXT_SPEED_FF); ConvertIntToDecimalStringN(gStringVar1, tItemCount, 2, 2); StringExpandPlaceholders(gStringVar4, gText_xVar1); diff --git a/src/slot_machine.c b/src/slot_machine.c index 189bca80f..759704f2b 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -3036,7 +3036,7 @@ s16 sub_8102D5C(s16 a0) sub_81065DC(); AddWindow(&gUnknown_085A7444); PutWindowTilemap(1); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); task->data[0]++; } @@ -3052,7 +3052,7 @@ s16 sub_8102D5C(s16 a0) { if (gMain.newKeys & (B_BUTTON | SELECT_BUTTON)) { - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); ClearWindowTilemap(1); CopyWindowToVram(1, 1); RemoveWindow(1); diff --git a/src/start_menu.c b/src/start_menu.c index 94b1c79fc..1be530d3c 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -1232,7 +1232,7 @@ static void sub_80A0550(u8 taskId) switch (*step) { case 0: - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, diff --git a/src/starter_choose.c b/src/starter_choose.c index 3ffc8e286..4ed53539f 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -523,7 +523,7 @@ static void Task_StarterChoose3(u8 taskId) static void Task_StarterChoose4(u8 taskId) { PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL); schedule_bg_copy_tilemap_to_vram(0); CreateYesNoMenu(&gUnknown_085B1DDC, 0x2A8, 0xD, 0); @@ -579,7 +579,7 @@ static void CreateStarterPokemonLabel(u8 selection) winTemplate.tilemapTop = gStarterChoose_LabelCoords[selection][1]; sStarterChooseWindowId = AddWindow(&winTemplate); - FillWindowPixelBuffer(sStarterChooseWindowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sStarterChooseWindowId, PIXEL_FILL(0)); width = GetStringCenterAlignXOffset(7, text, 0x68); AddTextPrinterParameterized3(sStarterChooseWindowId, 7, width, 1, gUnknown_085B1E0C, 0, text); @@ -600,7 +600,7 @@ static void CreateStarterPokemonLabel(u8 selection) static void sub_8134604(void) { - FillWindowPixelBuffer(sStarterChooseWindowId, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(sStarterChooseWindowId, PIXEL_FILL(0)); ClearWindowTilemap(sStarterChooseWindowId); RemoveWindow(sStarterChooseWindowId); sStarterChooseWindowId = 0xFF; diff --git a/src/text.c b/src/text.c index dc28d71c8..2d286992d 100644 --- a/src/text.c +++ b/src/text.c @@ -1581,7 +1581,7 @@ u16 RenderText(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentChar++; return 2; case 15: - FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; return 2; @@ -1702,7 +1702,7 @@ u16 RenderText(struct TextPrinter *textPrinter) case 2: if (TextPrinterWaitWithDownArrow(textPrinter)) { - FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; textPrinter->state = 0; @@ -1724,12 +1724,12 @@ u16 RenderText(struct TextPrinter *textPrinter) int speed = gWindowVerticalScrollSpeeds[scrollSpeed]; if (textPrinter->scrollDistance < speed) { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance = 0; } else { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance -= speed; } CopyWindowToVram(textPrinter->printerTemplate.windowId, 2); diff --git a/src/trade.c b/src/trade.c index 5595cee94..d74b7dfc3 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1418,7 +1418,7 @@ static void sub_80772A4(void) for (i = 0; i < 18; i++) { ClearWindowTilemap(i); - FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i, PIXEL_FILL(0)); } FillBgTilemapBufferRect(0, 0, 0, 0, 30, 20, 15); @@ -2461,7 +2461,7 @@ static void sub_8078DBC(void) if (gUnknown_0203229C->tradeMenuCursorPosition < 6) { sub_8098858(1, 1, 14); - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, 2, gUnknown_0832DEAC); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0); PutWindowTilemap(1); @@ -2724,7 +2724,7 @@ static void sub_8079408(void) for (i = 0; i < 4; i++) { - FillWindowPixelBuffer(i + 14, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(i + 14, PIXEL_FILL(0)); rbox_fill_rectangle(i + 14); } @@ -3256,7 +3256,7 @@ static void sub_807A0C4(void) static void sub_807A19C(u8 a0) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized(0, 1, gUnknown_0832DEBC[a0], 0, 1, TEXT_SPEED_FF, NULL); sub_8098858(0, 20, 12); PutWindowTilemap(0); @@ -4185,7 +4185,7 @@ void sub_807B140(void) void sub_807B154(void) { - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(0, PIXEL_FILL(15)); PutWindowTilemap(0); CopyWindowToVram(0, 3); } @@ -4263,7 +4263,7 @@ static void sub_807B270(void) break; case 8: sub_807ACFC(1, 1); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(0, PIXEL_FILL(15)); PutWindowTilemap(0); CopyWindowToVram(0, 3); gMain.state++; @@ -4654,7 +4654,7 @@ static bool8 sub_807BBEC(void) if (!gPaletteFade.active) { sub_807B62C(4); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(0, PIXEL_FILL(15)); CopyWindowToVram(0, 3); gUnknown_020322A0->state++; } @@ -5146,7 +5146,7 @@ static bool8 sub_807CFC8(void) if (!gPaletteFade.active) { sub_807B62C(4); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(0, PIXEL_FILL(15)); CopyWindowToVram(0, 3); gUnknown_020322A0->state++; } @@ -6085,7 +6085,7 @@ void sub_807F19C(void) void sub_807F1A8(u8 windowId, const u8 *str, u8 speed) { - FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(15)); + FillWindowPixelBuffer(windowId, PIXEL_FILL(15)); gUnknown_020322A0->unk_F6[0] = 15; gUnknown_020322A0->unk_F6[1] = 1; gUnknown_020322A0->unk_F6[2] = 6; diff --git a/src/trainer_card.c b/src/trainer_card.c index 8d244d656..4a3385559 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -350,7 +350,7 @@ static void sub_80C2760(u8 taskId) case 0: if (!IsDma3ManagerBusyWithBgCopy()) { - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); sData->var_0++; } break; @@ -363,7 +363,7 @@ static void sub_80C2760(u8 taskId) sData->var_0++; break; case 3: - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); sub_80C4FF0(); sub_80C438C(2); sData->var_0++; @@ -1103,7 +1103,7 @@ static void PrintTimeOnCard(void) r10 = width + 30; r7 -= r10; - FillWindowPixelRect(1, PALETTE_NUM_TO_FILL_VALUE(0), r7, r4, r10, 15); + FillWindowPixelRect(1, PIXEL_FILL(0), r7, r4, r10, 15); ConvertIntToDecimalStringN(gStringVar4, hours, 1, 3); AddTextPrinterParameterized3(1, 1, r7, r4, gUnknown_0856FB0C, TEXT_SPEED_FF, gStringVar4); r7 += 18; @@ -1634,7 +1634,7 @@ static bool8 sub_80C4B08(struct Task* task) switch (sData->var_4) { case 0: - FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(1, PIXEL_FILL(0)); FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 0x20, 0x20); break; case 1: @@ -1659,7 +1659,7 @@ static bool8 sub_80C4B08(struct Task* task) if (!sData->var_8) sub_80C474C(); else - FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); break; case 4: if (sData->var_8) diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 2873fdf8f..bf8482d69 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -609,7 +609,7 @@ void PrintOnTrainerHillRecordsWindow(void) u32 total, minutes, secondsWhole, secondsFraction; SetUpDataStruct(); - FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0)); + FillWindowPixelBuffer(0, PIXEL_FILL(0)); x = GetStringCenterAlignXOffset(1, gText_TimeBoard, 0xD0); AddTextPrinterParameterized3(0, 1, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index 6fbe6d04f..03e049d72 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -114,7 +114,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++; return 2; case 15: - FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); return 2; } break; @@ -146,7 +146,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) case 2: if (TextPrinterWaitWithDownArrow(textPrinter)) { - FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; textPrinter->state = 0; @@ -166,12 +166,12 @@ u16 Font6Func(struct TextPrinter *textPrinter) { if (textPrinter->scrollDistance < sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]) { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance = 0; } else { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed], PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance -= sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]; } CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);