mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-19 12:08:34 +01:00
Replace more instances of fill values
This commit is contained in:
parent
c96f8751cd
commit
199863f21f
@ -698,7 +698,7 @@ static void ListMenuErasePrintedCursor(struct ListMenu *list, u16 selectedRow)
|
|||||||
u8 width = GetMenuCursorDimensionByFont(list->template.fontId, 0);
|
u8 width = GetMenuCursorDimensionByFont(list->template.fontId, 0);
|
||||||
u8 height = GetMenuCursorDimensionByFont(list->template.fontId, 1);
|
u8 height = GetMenuCursorDimensionByFont(list->template.fontId, 1);
|
||||||
FillWindowPixelRect(list->template.windowId,
|
FillWindowPixelRect(list->template.windowId,
|
||||||
(list->template.fillValue << 4) | (list->template.fillValue),
|
PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue),
|
||||||
list->template.cursor_X,
|
list->template.cursor_X,
|
||||||
selectedRow * yMultiplier + list->template.upText_Y,
|
selectedRow * yMultiplier + list->template.upText_Y,
|
||||||
width,
|
width,
|
||||||
@ -806,26 +806,26 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, bool8 movingDown)
|
|||||||
{
|
{
|
||||||
u16 y, width, height;
|
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);
|
ListMenuPrintEntries(list, list->scrollOffset, 0, count);
|
||||||
|
|
||||||
y = (list->template.maxShowed * yMultiplier) + list->template.upText_Y;
|
y = (list->template.maxShowed * yMultiplier) + list->template.upText_Y;
|
||||||
width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8;
|
width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8;
|
||||||
height = (GetWindowAttribute(list->template.windowId, WINDOW_HEIGHT) * 8) - y;
|
height = (GetWindowAttribute(list->template.windowId, WINDOW_HEIGHT) * 8) - y;
|
||||||
FillWindowPixelRect(list->template.windowId,
|
FillWindowPixelRect(list->template.windowId,
|
||||||
(list->template.fillValue << 4) | (list->template.fillValue),
|
PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue),
|
||||||
0, y, width, height);
|
0, y, width, height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
u16 width;
|
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);
|
ListMenuPrintEntries(list, list->scrollOffset + (list->template.maxShowed - count), list->template.maxShowed - count, count);
|
||||||
|
|
||||||
width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8;
|
width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8;
|
||||||
FillWindowPixelRect(list->template.windowId,
|
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);
|
0, 0, width, list->template.upText_Y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1704,7 +1704,9 @@ static const struct TextColorThing sUnkColorStruct =
|
|||||||
|
|
||||||
static const u8 sFillValues[3] =
|
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] =
|
static const u8 *const sUnkColors[3] =
|
||||||
|
@ -9194,7 +9194,7 @@ static void sub_80D0834(u8 arg0, u8 arg1)
|
|||||||
if (species != SPECIES_NONE)
|
if (species != SPECIES_NONE)
|
||||||
{
|
{
|
||||||
FillWindowPixelRect8Bit(sPSSData->field_2200,
|
FillWindowPixelRect8Bit(sPSSData->field_2200,
|
||||||
0,
|
PALETTE_NUM_TO_FILL_VALUE(0),
|
||||||
24 * arg0,
|
24 * arg0,
|
||||||
24 * arg1,
|
24 * arg1,
|
||||||
32,
|
32,
|
||||||
|
@ -1724,12 +1724,12 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
int speed = gWindowVerticalScrollSpeeds[scrollSpeed];
|
int speed = gWindowVerticalScrollSpeeds[scrollSpeed];
|
||||||
if (textPrinter->scrollDistance < speed)
|
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;
|
textPrinter->scrollDistance = 0;
|
||||||
}
|
}
|
||||||
else
|
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;
|
textPrinter->scrollDistance -= speed;
|
||||||
}
|
}
|
||||||
CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);
|
CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);
|
||||||
|
@ -166,12 +166,12 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
if (textPrinter->scrollDistance < sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed])
|
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;
|
textPrinter->scrollDistance = 0;
|
||||||
}
|
}
|
||||||
else
|
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];
|
textPrinter->scrollDistance -= sUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed];
|
||||||
}
|
}
|
||||||
CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);
|
CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user