Improve window palette macros

This commit is contained in:
Phlosioneer
2019-02-21 23:27:12 -05:00
parent 399d646e3f
commit c96f8751cd
60 changed files with 301 additions and 306 deletions

View File

@@ -945,7 +945,7 @@ static void InitBerryBlenderWindows(void)
DeactivateAllTextPrinters();
for (i = 0; i < 5; i++)
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0));
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
sub_81978B0(0xE0);
@@ -3538,7 +3538,7 @@ void ShowBerryBlenderRecordWindow(void)
winTemplate = sBlenderRecordWindowTemplate;
gRecordsWindowId = AddWindow(&winTemplate);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, 0);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(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, txtColor[0] | (txtColor[0] << 4));
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(txtColor[0]));
}
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string);