Missed some fill values

Must have forgotten to check FillWindowPixelRect.
This commit is contained in:
Phlosioneer 2019-02-26 22:45:39 -05:00
parent 72bb0daccb
commit b2c92ee8c5
10 changed files with 22 additions and 21 deletions

View File

@ -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, 0, 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
else
PrintOnWindow_Font1(0, gText_SelectorArrow2, 0, y, 0, 0, 0, arg1);
}

View File

@ -4106,9 +4106,9 @@ static void sub_811D950(u8 arg0, u8 arg1)
var1 = 0;
}
FillWindowPixelRect(2, 0x11, 0, y, 224, var2);
FillWindowPixelRect(2, PALETTE_NUM_TO_FILL_VALUE(1), 0, y, 224, var2);
if (var1)
FillWindowPixelRect(2, 0x11, 0, 0, 224, var1);
FillWindowPixelRect(2, PALETTE_NUM_TO_FILL_VALUE(1), 0, 0, 224, var1);
}
static void sub_811D9B4(void)

View File

@ -3001,7 +3001,7 @@ static void sub_813AA60(u16 a0, u16 a1)
if (a0 > 2 && a0 < 7)
{
FillWindowPixelRect(0, 0x11, 0, 0, 216, 32);
FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(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, 0x11, 0, 0, 96, 48);
FillWindowPixelRect(gUnknown_0203AB5E, PALETTE_NUM_TO_FILL_VALUE(1), 0, 0, 96, 48);
if (a0 == 10)
{
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gUnknown_085B3254[a1], 0, 1, 0, NULL);

View File

@ -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, 0, 0, a, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), 0, a, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
else
bag_menu_print(0, 1, gText_SelectorArrow2, 0, a, 0, 0, 0, b);

View File

@ -934,7 +934,7 @@ void RedrawMenuCursor(u8 oldPos, u8 newPos)
width = GetMenuCursorDimensionByFont(sMenu.fontId, 0);
height = GetMenuCursorDimensionByFont(sMenu.fontId, 1);
FillWindowPixelRect(sMenu.windowId, 0x11, sMenu.left, sMenu.optionHeight * oldPos + sMenu.top, width, height);
FillWindowPixelRect(sMenu.windowId, PALETTE_NUM_TO_FILL_VALUE(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,
0x11,
PALETTE_NUM_TO_FILL_VALUE(1),
xPos,
yPos,
cursorWidth,

View File

@ -3479,8 +3479,9 @@ static void DisplayPartyPokemonHPBar(u16 hp, u16 maxhp, struct Struct203CEDC *pt
FillWindowPixelRect(ptr->windowId, gUnknown_08615AB8[0], ptr->unk0->unk4[20], ptr->unk0->unk4[21] + 1, hpFraction, 2);
if (hpFraction != ptr->unk0->unk4[22])
{
FillWindowPixelRect(ptr->windowId, 13, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21], ptr->unk0->unk4[22] - hpFraction, 1);
FillWindowPixelRect(ptr->windowId, 2, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21] + 1, ptr->unk0->unk4[22] - hpFraction, 2);
// This appears to be an alternating fill
FillWindowPixelRect(ptr->windowId, 0x0D, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21], ptr->unk0->unk4[22] - hpFraction, 1);
FillWindowPixelRect(ptr->windowId, 0x02, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21] + 1, ptr->unk0->unk4[22] - hpFraction, 2);
}
CopyWindowToVram(ptr->windowId, 2);
}

View File

@ -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, 17, 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
FillWindowPixelRect(windowId, PALETTE_NUM_TO_FILL_VALUE(1), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
else
AddTextPrinterParameterized4(windowId, 1, 0, y, 0, 0, gUnknown_085DFF8C, speed, gText_SelectorArrow2);
}

View File

@ -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, 0, x * 8, y * 8, 8, 16);
FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(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, 0, x * 8, y * 8, 0x60, 16);
FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), x * 8, y * 8, 0x60, 16);
}
static void CreateInitialPokemonSprites(u16 selectedMon, u16 b)
@ -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, 0, x, y, width, height);
FillWindowPixelRect(0, PALETTE_NUM_TO_FILL_VALUE(0), x, y, width, height);
}
void sub_80C12E0(u8 taskId)

View File

@ -3469,7 +3469,7 @@ static void PrintMovePowerAndAccuracy(u16 moveIndex)
const u8 *text;
if (moveIndex != 0)
{
FillWindowPixelRect(14, 0, 53, 0, 19, 32);
FillWindowPixelRect(14, PALETTE_NUM_TO_FILL_VALUE(0), 53, 0, 19, 32);
if (gBattleMoves[moveIndex].power < 2)
{
@ -3619,7 +3619,7 @@ static void PrintNewMoveDetailsOrCancelText(void)
static void sub_81C4064(void)
{
u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, 0);
FillWindowPixelRect(windowId, 0, 0, 66, 72, 16);
FillWindowPixelRect(windowId, PALETTE_NUM_TO_FILL_VALUE(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, 0, 0, moveIndex1 * 16, 0x48, 0x10);
FillWindowPixelRect(windowId1, 0, 0, moveIndex2 * 16, 0x48, 0x10);
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(windowId2, 0, 0, moveIndex1 * 16, 0x30, 0x10);
FillWindowPixelRect(windowId2, 0, 0, moveIndex2 * 16, 0x30, 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);
PrintMoveNameAndPP(moveIndex1);
PrintMoveNameAndPP(moveIndex2);

View File

@ -1103,7 +1103,7 @@ static void PrintTimeOnCard(void)
r10 = width + 30;
r7 -= r10;
FillWindowPixelRect(1, 0, r7, r4, r10, 15);
FillWindowPixelRect(1, PALETTE_NUM_TO_FILL_VALUE(0), r7, r4, r10, 15);
ConvertIntToDecimalStringN(gStringVar4, hours, 1, 3);
AddTextPrinterParameterized3(1, 1, r7, r4, gUnknown_0856FB0C, TEXT_SPEED_FF, gStringVar4);
r7 += 18;