diff --git a/src/list_menu.c b/src/list_menu.c index 83293890c..656ab7a15 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -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, - (list->template.fillValue << 4) | (list->template.fillValue), + PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue), list->template.cursor_X, selectedRow * yMultiplier + list->template.upText_Y, width, @@ -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, (list->template.fillValue << 4) | (list->template.fillValue)); + ScrollWindow(list->template.windowId, 1, count * yMultiplier, PALETTE_NUM_TO_FILL_VALUE(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, - (list->template.fillValue << 4) | (list->template.fillValue), + PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue), 0, y, width, height); } else { u16 width; - ScrollWindow(list->template.windowId, 0, count * yMultiplier, (list->template.fillValue << 4) | (list->template.fillValue)); + ScrollWindow(list->template.windowId, 0, count * yMultiplier, PALETTE_NUM_TO_FILL_VALUE(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, - (list->template.fillValue << 4) | (list->template.fillValue), + PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue), 0, 0, width, list->template.upText_Y); } } diff --git a/src/naming_screen.c b/src/naming_screen.c index a84cbd657..013eb37ca 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1704,7 +1704,9 @@ static const struct TextColorThing sUnkColorStruct = static const u8 sFillValues[3] = { - 0xEE, 0xDD, 0xFF + PALETTE_NUM_TO_FILL_VALUE(0xE), + PALETTE_NUM_TO_FILL_VALUE(0xD), + PALETTE_NUM_TO_FILL_VALUE(0xF) }; static const u8 *const sUnkColors[3] = diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 8abb349ef..d4c4c5224 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -9194,7 +9194,7 @@ static void sub_80D0834(u8 arg0, u8 arg1) if (species != SPECIES_NONE) { FillWindowPixelRect8Bit(sPSSData->field_2200, - 0, + PALETTE_NUM_TO_FILL_VALUE(0), 24 * arg0, 24 * arg1, 32, diff --git a/src/text.c b/src/text.c index c3ae315d0..dc28d71c8 100644 --- a/src/text.c +++ b/src/text.c @@ -1724,12 +1724,12 @@ u16 RenderText(struct TextPrinter *textPrinter) int speed = gWindowVerticalScrollSpeeds[scrollSpeed]; if (textPrinter->scrollDistance < speed) { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, textPrinter->printerTemplate.bgColor << 4 | textPrinter->printerTemplate.bgColor); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance = 0; } else { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, textPrinter->printerTemplate.bgColor << 4 | textPrinter->printerTemplate.bgColor); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance -= speed; } CopyWindowToVram(textPrinter->printerTemplate.windowId, 2); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index 08fdf2e84..6fbe6d04f 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -166,12 +166,12 @@ u16 Font6Func(struct TextPrinter *textPrinter) { if (textPrinter->scrollDistance < sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]) { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, textPrinter->printerTemplate.bgColor | (textPrinter->printerTemplate.bgColor << 4)); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance = 0; } else { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed], textPrinter->printerTemplate.bgColor | (textPrinter->printerTemplate.bgColor << 4)); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed], PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance -= sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]; } CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);