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

@ -1,12 +1,7 @@
#ifndef GUARD_WINDOW_H
#define GUARD_WINDOW_H
// The tile ID for a transparent tile in the window tilesheet
#define TRANSPARENT_TILE_NUMBER 0
#define PIXEL_BUFFER_TRANSPARENT 0x00
#define PIXEL_BUFFER_WHITE 0x11
#define PIXEL_BUFFER_UNKNOWN 0xFF
#define PALETTE_NUM_TO_FILL_VALUE(num) ((num) | ((num) << 4))
enum
{
@ -80,7 +75,7 @@ extern u32 filler_03002F58;
extern u32 filler_03002F5C;
extern u32 filler_03002F64;
// This global is set to TRANSPARENT_TILE_NUMBER and never changed.
// This global is set to 0 and never changed.
extern u8 gTransparentTileNumber;
#endif // GUARD_WINDOW_H

View File

@ -3794,7 +3794,7 @@ static void sub_8190CD4(u8 taskId)
for (i = windowId; i < windowId + 9; i++)
{
CopyWindowToVram(i, 2);
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0));
}
gTasks[taskId].data[0] = 3;
break;

View File

@ -1786,14 +1786,14 @@ static void sub_819B958(u8 windowId)
{
gSprites[sFactorySelectScreen->menuCursor1SpriteId].invisible = TRUE;
gSprites[sFactorySelectScreen->menuCursor2SpriteId].invisible = TRUE;
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0));
CopyWindowToVram(windowId, 2);
ClearWindowTilemap(windowId);
}
static void Select_PrintRentalPkmnString(void)
{
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
CopyWindowToVram(1, 2);
}
static void sub_819EADC(void)
{
PutWindowTilemap(7);
FillWindowPixelBuffer(7, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(0));
CopyWindowToVram(7, 2);
}
@ -3569,13 +3569,13 @@ static void sub_819EAF8(void)
{
sub_819EAC0();
PutWindowTilemap(5);
FillWindowPixelBuffer(5, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0));
CopyWindowToVram(5, 2);
}
static void Swap_PrintPkmnSwap(void)
{
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0));
switch (sFactorySwapScreen->inEnemyScreen)
{
case TRUE:
@ -3652,7 +3652,7 @@ static void Swap_PrintActionStrings(void)
static void Swap_PrintActionStrings2(void)
{
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0));
switch (sFactorySwapScreen->inEnemyScreen)
{
case TRUE:
@ -3693,7 +3693,7 @@ static void Swap_PrintMonSpecies2(void)
LoadPalette(pal, 0xF0, 0xA);
PutWindowTilemap(7);
FillWindowPixelBuffer(7, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(8, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(5, PALETTE_NUM_TO_FILL_VALUE(0));
CopyWindowToVram(5, 2);
gTasks[taskId].data[0]++;
}

View File

@ -2578,7 +2578,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
struct WindowTemplate winTemplate = sHealthboxWindowTemplate;
winId = AddWindow(&winTemplate);
FillWindowPixelBuffer(winId, (bgColor << 4) | (bgColor));
FillWindowPixelBuffer(winId, PALETTE_NUM_TO_FILL_VALUE(bgColor));
color[0] = bgColor;
color[1] = 1;

View File

@ -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 = 0xFF,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(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 = 0xFF,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(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 = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1393,7 +1393,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 3 Top left move
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1405,7 +1405,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 4 Top right move
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1417,7 +1417,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 5 Bottom left move
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1429,7 +1429,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 6 Bottom right move
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1441,7 +1441,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 7 "PP"
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1453,7 +1453,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 11,
},
{ // 8
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1465,7 +1465,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 9 PP remaining
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 2,
.y = 1,
@ -1477,7 +1477,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 11,
},
{ // 10 "type"
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1489,7 +1489,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 11 "switch which?"
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1501,7 +1501,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 12 "gText_BattleYesNoChoice"
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1513,7 +1513,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 13
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1525,7 +1525,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 14
.fillValue = 0x0,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0),
.fontId = 1,
.x = 32,
.y = 1,
@ -1537,7 +1537,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 2,
},
{ // 15
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1549,7 +1549,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 16
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1561,7 +1561,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 17
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1573,7 +1573,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 18
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1585,7 +1585,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 19
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1597,7 +1597,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 20
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1609,7 +1609,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 21
.fillValue = 0x0,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0),
.fontId = 1,
.x = -1,
.y = 1,
@ -1621,7 +1621,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 6,
},
{ // 22
.fillValue = 0x0,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0),
.fontId = 1,
.x = -1,
.y = 1,
@ -1633,7 +1633,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 6,
},
{ // 23
.fillValue = 0x0,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(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 = 0xFF,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xF),
.fontId = 1,
.x = 0,
.y = 1,
@ -1661,7 +1661,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 6,
},
{ // 1
.fillValue = 0xFF,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xF),
.fontId = 1,
.x = 1,
.y = 1,
@ -1673,7 +1673,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 6,
},
{ // 2
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1685,7 +1685,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 3
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1697,7 +1697,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 4
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1709,7 +1709,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 5
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1721,7 +1721,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 6
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1733,7 +1733,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 7
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1745,7 +1745,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 11,
},
{ // 8
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1757,7 +1757,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 9
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 2,
.y = 1,
@ -1769,7 +1769,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 11,
},
{ // 10
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1781,7 +1781,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 11
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1793,7 +1793,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 12
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1805,7 +1805,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 13
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1817,7 +1817,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 14
.fillValue = 0x0,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0),
.fontId = 1,
.x = 32,
.y = 1,
@ -1829,7 +1829,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 2,
},
{ // 15
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1841,7 +1841,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 16
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1853,7 +1853,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 17
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1865,7 +1865,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 18
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1877,7 +1877,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 19
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1889,7 +1889,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 20
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1901,7 +1901,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 21
.fillValue = 0xEE,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1913,7 +1913,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 22
.fillValue = 0x11,
.fillValue = PALETTE_NUM_TO_FILL_VALUE(0x1),
.fontId = 1,
.x = 0,
.y = 1,

View File

@ -651,7 +651,7 @@ static void PrintItemDescription(s32 listMenuId)
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
desc = gStringVar4;
}
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
PrintOnWindow_Font1(1, desc, 3, 0, 0, 1, 0, 0);
}
@ -911,7 +911,7 @@ static void sub_81C5D20(u8 taskId)
CopyItemName(gSpecialVar_ItemId, gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(1));
DisplayMessageAndContinueTask(taskId, 2, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback);
schedule_bg_copy_tilemap_to_vram(1);
}

View File

@ -321,7 +321,7 @@ void ShowLinkBattleRecords(void)
gRecordsWindowId = AddWindow(&sLinkBattleRecordsWindow);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0));
ClearWindowTilemap(windowId);
CopyWindowToVram(windowId, 2);
RemoveWindow(windowId);

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);

View File

@ -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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, 0xAA);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0));
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0));
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, 0xAA);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0xA));
AddTextPrinterParameterized3(1, 1, 0, 0, sUnknown_08618158, -1, gUnknown_08618160[scene]);
PutWindowTilemap(1);
CopyWindowToVram(1, 2);

View File

@ -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, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(WIN_BERRY_TAG, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
break;
case 0x40:
PrintBerryNumberAndName();
@ -608,7 +608,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
CreateBerrySprite();
break;
case 0x60:
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
break;
case 0x70:
PrintBerrySize();
@ -620,7 +620,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
SetFlavorCirclesVisiblity();
break;
case 0xA0:
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0));
break;
case 0xB0:
PrintBerryDescription1();
@ -635,7 +635,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
switch (data[0])
{
case 0x30:
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0));
break;
case 0x40:
PrintBerryDescription2();
@ -647,7 +647,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
SetFlavorCirclesVisiblity();
break;
case 0x70:
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
break;
case 0x80:
PrintBerryFirmness();
@ -660,7 +660,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
CreateBerrySprite();
break;
case 0xB0:
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
break;
case 0xC0:
PrintBerryNumberAndName();

View File

@ -90,7 +90,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
switch (Menu_ProcessInputNoWrapClearOnChoose())
{
case 0:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
LoadWindowGfx(0, 0, 2, 224);
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
}

View File

@ -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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(sCoinsWindowId, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(sCoinsWindowId);
SetWindowBorderStyle(sCoinsWindowId, FALSE, 0x214, 0xE);
PrintCoinsString(coinAmount);

View File

@ -819,7 +819,7 @@ static void sub_80D8490(u8 taskId)
}
r5 = StringCopy(r5, gMoveNames[move]);
FillWindowPixelBuffer(i + 5, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i + 5, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(5 + i, PALETTE_NUM_TO_FILL_VALUE(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], PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(gUnknown_02039F26[i], PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(10, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0));
if (gHeap[0x1A000] == 2)
{

View File

@ -935,7 +935,7 @@ static void sub_80F6AE8(void)
// windowTemplate.width = 30;
// windowTemplate.height = 2;
// windowId = AddWindow(&windowTemplate);
// FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
// FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
// origWidth = GetStringWidth(1, text, 0) + 9;
// strWidth = origWidth;
// if (strWidth < 0)

View File

@ -279,7 +279,7 @@ static void InitContestPaintingWindow(void)
SetBgTilemapBuffer(1, AllocZeroed(BG_SCREEN_SIZE));
gContestPaintingWindowId = AddWindow(&gUnknown_085B07EC);
DeactivateAllTextPrinters();
FillWindowPixelBuffer(gContestPaintingWindowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(gContestPaintingWindowId, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(gContestPaintingWindowId);
CopyWindowToVram(gContestPaintingWindowId, 3);
ShowBg(1);

View File

@ -1592,7 +1592,7 @@ static void sub_8175DA0(u8 taskIdB)
case 5:
if (!gPaletteFade.active)
{
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
CopyWindowToVram(0, 2);
gTasks[taskIdB].data[TDB_0] = 2;
}

View File

@ -543,7 +543,7 @@ void sub_8126B80(u8 taskId)
void sub_8126C08(void)
{
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(sDecorMenuWindowIndices[1], PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(winidx, PALETTE_NUM_TO_FILL_VALUE(1));
if (a0 >= sCurDecorCatCount)
{
txt = gText_GoBackPrevMenu;

View File

@ -197,7 +197,7 @@ static void InitDiplomaWindow(void)
InitWindows(sDiplomaWinTemplates);
DeactivateAllTextPrinters();
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(0);
}

View File

@ -606,7 +606,7 @@ static void CB2_EggHatch_1(void)
case 1:
if (!gPaletteFade.active)
{
FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(sEggHatchData->windowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(15));
sEggHatchData->textColor[0] = 0;
sEggHatchData->textColor[1] = 5;
sEggHatchData->textColor[2] = 6;

View File

@ -1918,7 +1918,7 @@ static bool8 Fishing9(struct Task *task)
static bool8 Fishing10(struct Task *task)
{
AlignFishingAnimationFrames();
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
task->tStep++;
return TRUE;

View File

@ -196,13 +196,13 @@ static void PrintRegionMapSecName(void)
{
if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE)
{
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
}
else
{
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
CopyWindowToVram(0, 3);
}
}

View File

@ -2645,7 +2645,7 @@ static void sub_813A570(u8 taskId)
DestroyListMenuTask(task->data[14], NULL, NULL);
Free(gUnknown_0203AB64);
sub_8198070(task->data[13], 1);
FillWindowPixelBuffer(task->data[13], PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(task->data[13], PALETTE_NUM_TO_FILL_VALUE(0));
CopyWindowToVram(task->data[13], 2);
RemoveWindow(task->data[13]);
DestroyTask(taskId);
@ -3226,7 +3226,7 @@ void sub_813AF48(void)
DestroyListMenuTask(task->data[14], NULL, NULL);
Free(gUnknown_0203AB64);
sub_8198070(task->data[13], TRUE);
FillWindowPixelBuffer(task->data[13], PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(task->data[13], PALETTE_NUM_TO_FILL_VALUE(0));
ClearWindowTilemap(task->data[13]);
CopyWindowToVram(task->data[13], 2);
RemoveWindow(task->data[13]);

View File

@ -1090,7 +1090,7 @@ static void ShowAndPrintWindows(void)
for (i = 0; i < WINDOW_COUNT; i++)
{
PutWindowTilemap(i);
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0));
}
x = GetStringCenterAlignXOffset(1, gText_SymbolsEarned, 96);
@ -1116,7 +1116,7 @@ static void ShowAndPrintWindows(void)
static void PrintAreaDescription(u8 cursorArea)
{
FillWindowPixelBuffer(WINDOW_DESCRIPTION, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(WINDOW_DESCRIPTION, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, PALETTE_NUM_TO_FILL_VALUE(0));
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
for (i = 0; i < 3; i++)

View File

@ -1045,7 +1045,7 @@ static void ShowTowerResultsWindow(u8 battleMode)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(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);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1));
if (battleMode == FRONTIER_MODE_SINGLES)
StringExpandPlaceholders(gStringVar4, gText_SingleBattleTourneyResults);
else
@ -1192,7 +1192,7 @@ static void ShowPalaceResultsWindow(u8 battleMode)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1));
if (battleMode == FRONTIER_MODE_SINGLES)
StringExpandPlaceholders(gStringVar4, gText_SingleBattleHallResults);
else
@ -1248,7 +1248,7 @@ static void ShowPikeResultsWindow(void)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(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);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1));
PrintHyphens(10);
StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults);
PrintAligned(gStringVar4, 2);
@ -1396,7 +1396,7 @@ static void ShowFactoryResultsWindow(u8 battleMode)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1));
if (battleMode == FRONTIER_MODE_SINGLES)
StringExpandPlaceholders(gStringVar4, gText_BattleSwapSingleResults);
else
@ -1461,7 +1461,7 @@ static void ShowPyramidResultsWindow(void)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(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);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1));
StringExpandPlaceholders(gStringVar4, gText_LinkContestResults);
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
@ -2354,7 +2354,7 @@ void ShowRankingHallRecordsWindow(void)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C84);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1));
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_50);
PutWindowTilemap(gRecordsWindowId);
CopyWindowToVram(gRecordsWindowId, 3);
@ -2362,7 +2362,7 @@ void ShowRankingHallRecordsWindow(void)
void ScrollRankingHallRecordsWindow(void)
{
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gRecordsWindowId, PALETTE_NUM_TO_FILL_VALUE(1));
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_OPEN);
CopyWindowToVram(gRecordsWindowId, 2);
}

View File

@ -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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(0);
// dex number
@ -1180,7 +1180,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
u32 width;
u16 trainerId;
FillWindowPixelBuffer(1, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(1);
SetWindowBorderStyle(1, FALSE, 0x21D, 0xD);
AddTextPrinterParameterized3(1, 1, 0, 1, sUnknown_085E538C, -1, gText_Name);

View File

@ -884,7 +884,7 @@ void bag_menu_print_description_box_text(int a)
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
str = gStringVar4;
}
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
bag_menu_print(1, 1, str, 3, 1, 0, 0, 0, 0);
}
@ -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], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(data[10], PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(i);
}
schedule_bg_copy_tilemap_to_vram(0);
@ -2366,7 +2366,7 @@ void bag_menu_remove_money_window(void)
void bag_menu_prepare_tmhm_move_window(void)
{
FillWindowPixelBuffer(3, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(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);
@ -2380,7 +2380,7 @@ void PrintTMHMMoveData(u16 itemId)
u16 moveId;
const u8* text;
FillWindowPixelBuffer(4, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(0));
if (itemId == ITEM_NONE)
{
for (i = 0; i < 4; i++)

View File

@ -498,7 +498,7 @@ static void LearnMoveMain(void)
case 27:
if (!sub_81D2C3C())
{
FillWindowPixelBuffer(3, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
}
}

View File

@ -1683,8 +1683,8 @@ static void sub_800B080(void)
CopyToBgTilemapBuffer(1, gWirelessLinkDisplayTilemap, 0, 0);
CopyBgTilemapBufferToVram(1);
LoadPalette(gWirelessLinkDisplayPal, 0, 0x20);
FillWindowPixelBuffer(0, 0x00);
FillWindowPixelBuffer(2, 0x00);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(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, 0x00);
FillWindowPixelBuffer(2, 0x00);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0));
AddTextPrinterParameterized3(1, 3, 2, 0, gUnknown_082ED224, 0, gText_CommErrorCheckConnections);
PutWindowTilemap(1);
PutWindowTilemap(2);

View File

@ -486,7 +486,7 @@ void RedrawListMenu(u8 listTaskId)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(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, (list->template.fillValue << 4) | (list->template.fillValue));
FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
ListMenuDrawCursor(list);
ListMenuCallSelectionChangedCallback(list, TRUE);
@ -795,7 +795,7 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, bool8 movingDown)
{
if (count >= list->template.maxShowed)
{
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
}
else

View File

@ -477,8 +477,8 @@ static void sub_8121B1C(void)
y = 0;
PutWindowTilemap(0);
PutWindowTilemap(1);
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
for (i = 0; i < sMailRead->layout->numSubStructs; i ++)
{
if (sMailRead->strbuf[i][0] == EOS || sMailRead->strbuf[i][0] == CHAR_SPACE)

View File

@ -783,8 +783,8 @@ static void Task_DisplayMainMenu(u8 taskId)
{
case HAS_NO_SAVED_GAME:
default:
FillWindowPixelBuffer(0, 0xAA);
FillWindowPixelBuffer(1, 0xAA);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0xA));
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, 0xAA);
FillWindowPixelBuffer(3, 0xAA);
FillWindowPixelBuffer(4, 0xAA);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0xA));
FillWindowPixelBuffer(3, PALETTE_NUM_TO_FILL_VALUE(0xA));
FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(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, 0xAA);
FillWindowPixelBuffer(3, 0xAA);
FillWindowPixelBuffer(4, 0xAA);
FillWindowPixelBuffer(5, 0xAA);
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));
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, 0xAA);
FillWindowPixelBuffer(3, 0xAA);
FillWindowPixelBuffer(4, 0xAA);
FillWindowPixelBuffer(5, 0xAA);
FillWindowPixelBuffer(6, 0xAA);
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));
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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);

View File

@ -1191,7 +1191,7 @@ static bool32 LoadMatchCallWindowGfx(u8 taskId)
return FALSE;
}
FillWindowPixelBuffer(taskData[2], 0x88);
FillWindowPixelBuffer(taskData[2], PALETTE_NUM_TO_FILL_VALUE(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], 0x88);
FillWindowPixelBuffer(taskData[2], PALETTE_NUM_TO_FILL_VALUE(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], 0x88);
FillWindowPixelBuffer(taskData[2], PALETTE_NUM_TO_FILL_VALUE(8));
CopyWindowToVram(taskData[2], 2);
PlaySE(SE_TOREOFF);
return TRUE;

View File

@ -213,7 +213,7 @@ void sub_81973A4(void)
void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, DrawDialogueFrame);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -222,7 +222,7 @@ void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram)
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, DrawStandardFrame);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -231,7 +231,7 @@ void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 copyToVram)
void ClearWindowAndWideBorder(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, ClearWindowAndWideBorderTilemap);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
ClearWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -240,7 +240,7 @@ void ClearWindowAndWideBorder(u8 windowId, bool8 copyToVram)
void ClearWindowAndBorder(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, ClearWindowAndBorderTilemap);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
ClearWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -411,14 +411,14 @@ void DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height
// Clears the given window, and a 1-tile border around the window, to transparent tiles.
void ClearWindowAndBorderTilemap(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg, TRANSPARENT_TILE_NUMBER, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, STD_WINDOW_PALETTE_NUM);
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, STD_WINDOW_PALETTE_NUM);
}
// Clears the given window, and a 1-tile border the top and bottom, plus a 3-tile border on the left and right.
// Tiles are set to a transparent tile.
void ClearWindowAndWideBorderTilemap(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg, TRANSPARENT_TILE_NUMBER, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, STD_WINDOW_PALETTE_NUM);
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, STD_WINDOW_PALETTE_NUM);
}
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram)
@ -557,7 +557,7 @@ void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 tileNum, u8 paletteNum)
sTileNum = tileNum;
sPaletteNum = paletteNum;
CallWindowFunction(windowId, sub_8197BB4);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -568,7 +568,7 @@ void sub_8197B64(u8 windowId, bool8 copyToVram, u16 tileNum)
sTileNum = tileNum;
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
CallWindowFunction(windowId, sub_8197BB4);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -672,7 +672,7 @@ void sub_8197BB4(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 p
void sub_8197DF8(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, sub_8197E30);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0));
ClearWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -688,7 +688,7 @@ void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 baseTileNum, u8 pal
sTileNum = baseTileNum;
sPaletteNum = paletteNum;
CallWindowFunction(windowId, DrawWindowBorder);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -699,7 +699,7 @@ void sub_8197EC8(u8 windowId, bool8 copyToVram, u16 baseTileNum)
sTileNum = baseTileNum;
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
CallWindowFunction(windowId, DrawWindowBorder);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
@ -768,7 +768,7 @@ void DrawWindowBorder(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height,
void sub_8198070(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, sub_81980A8);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(15));
if (string2 != NULL)
{
width = GetStringWidth(0, string2, 0);
@ -876,7 +876,7 @@ void sub_81982F0(void)
{
if (sWindowId != 0xFF)
{
FillWindowPixelBuffer(sWindowId, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(15));
CopyWindowToVram(sWindowId, 3);
}
}
@ -885,7 +885,7 @@ void sub_8198314(void)
{
if (sWindowId != 0xFF)
{
FillWindowPixelBuffer(sWindowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(sWindowId, PALETTE_NUM_TO_FILL_VALUE(0));
ClearWindowTilemap(sWindowId);
CopyWindowToVram(sWindowId, 3);
RemoveWindow(sWindowId);

View File

@ -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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(sMoneyBoxWindowId, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(sMoneyBoxWindowId);
CopyWindowToVram(sMoneyBoxWindowId, 1);
PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x214, 14, amount);

View File

@ -90,7 +90,7 @@ void CB2_InitMysteryEventMenu(void)
DeactivateAllTextPrinters();
for (i = 0; i < 2; i++)
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(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, (textColor[0]) | (textColor[0] << 4));
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(textColor[0]));
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text);
}

View File

@ -1474,7 +1474,7 @@ static void HandleDpadMovement(struct Task *task)
static void sub_80E4894(void)
{
FillWindowPixelBuffer(gNamingScreenData->windows[3], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gNamingScreenData->windows[3], PALETTE_NUM_TO_FILL_VALUE(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], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gNamingScreenData->windows[3], PALETTE_NUM_TO_FILL_VALUE(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], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gNamingScreenData->windows[2], PALETTE_NUM_TO_FILL_VALUE(1));
for (i = 0; i < maxChars; i++)
{
@ -1766,7 +1766,7 @@ static void sub_80E4EF0(void)
{
const u8 color[3] = { 15, 1, 2 };
FillWindowPixelBuffer(gNamingScreenData->windows[4], PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(gNamingScreenData->windows[4], PALETTE_NUM_TO_FILL_VALUE(15));
AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack);
PutWindowTilemap(gNamingScreenData->windows[4]);
CopyWindowToVram(gNamingScreenData->windows[4], 3);

View File

@ -620,7 +620,7 @@ static void ButtonMode_DrawChoices(u8 selection)
static void DrawTextOption(void)
{
FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(WIN_TEXT_OPTION, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(WIN_OPTIONS, PALETTE_NUM_TO_FILL_VALUE(1));
for (i = 0; i < MENUITEM_COUNT; i++)
{
AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);

View File

@ -3108,7 +3108,7 @@ static void sub_81B239C(u8 a)
}
DeactivateAllTextPrinters();
for (i = 0; i < PARTY_SIZE; i++)
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(firstWindowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0));
if (gUnknown_0203CEC8.unk8_0 != 10)
{
mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48);

View File

@ -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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL);
}
@ -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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(1));
StringExpandPlaceholders(gStringVar4, string);
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL);
}

View File

@ -665,7 +665,7 @@ static void HandleInitWindows(void)
for (i = 0; i < ARRAY_COUNT(sWindowTemplatesForPokeblockMenu) - 1; i++)
{
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(7, PALETTE_NUM_TO_FILL_VALUE(0));
if (pkblId != LIST_B_PRESSED)
{

View File

@ -704,7 +704,7 @@ static void HandleInitWindows(void)
DeactivateAllTextPrinters();
LoadUserWindowBorderGfx(0, 1, 0xE0);
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(0);
schedule_bg_copy_tilemap_to_vram(0);
}

View File

@ -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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
PutWindowTilemap(0);
PutWindowTilemap(1);
sub_80C0D30(1, gTasks[taskId].data[1]);

View File

@ -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, (arg3 << 4) | arg3);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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, (arg3 << 4) | arg3);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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();
NewMenuHelpers_DrawDialogueFrame(0, 0);
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, 0x44);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(sPSSData->field_2200, PALETTE_NUM_TO_FILL_VALUE(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, 0);
FillWindowPixelBuffer8Bit(sPSSData->field_2200, PALETTE_NUM_TO_FILL_VALUE(0));
sub_80D07B0(sMoveMonsPtr->fromRow, sMoveMonsPtr->fromColumn);
SetBgAttribute(0, BG_ATTR_PALETTEMODE, 1);
PutWindowTilemap(sPSSData->field_2200);
@ -9911,7 +9911,7 @@ static void PrintItemDescription(void)
else
description = ItemId_GetDescription(sPSSData->cursorMonItem);
FillWindowPixelBuffer(2, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized5(2, 1, description, 4, 0, 0, NULL, 0, 1);
}

View File

@ -2631,7 +2631,7 @@ static void ResetWindows(void)
for (i = 0; i < 20; i++)
{
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(0));
}
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
{
@ -2646,9 +2646,9 @@ static void SummaryScreen_PrintTextOnWindow(u8 windowId, const u8 *string, u8 x,
static void sub_81C25E8(void)
{
FillWindowPixelBuffer(17, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(18, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(19, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(17, PALETTE_NUM_TO_FILL_VALUE(0));
FillWindowPixelBuffer(18, PALETTE_NUM_TO_FILL_VALUE(0));
FillWindowPixelBuffer(19, PALETTE_NUM_TO_FILL_VALUE(0));
if (!pssData->summary.isEgg)
sub_81C2628();
else
@ -2899,7 +2899,7 @@ static u8 AddWindowFromTemplateList(const struct WindowTemplate *template, u8 te
if (*windowIdPtr == 0xFF)
{
*windowIdPtr = AddWindow(&template[templateId]);
FillWindowPixelBuffer(*windowIdPtr, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(*windowIdPtr, PALETTE_NUM_TO_FILL_VALUE(0));
}
return *windowIdPtr;
}
@ -2921,7 +2921,7 @@ static void PrintPageSpecificText(u8 pageIndex)
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
{
if (pssData->windowIds[i] != 0xFF)
FillWindowPixelBuffer(pssData->windowIds[i], PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(pssData->windowIds[i], PALETTE_NUM_TO_FILL_VALUE(0));
}
sTextPrinterFunctions[pageIndex]();
}
@ -3568,7 +3568,7 @@ static void PrintContestMoveDescription(u8 moveSlot)
static void PrintMoveDetails(u16 move)
{
u8 windowId = AddWindowFromTemplateList(gUnknown_0861CD14, 2);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0));
if (move != MOVE_NONE)
{
if (pssData->currPageIndex == 2)
@ -3642,7 +3642,7 @@ static void sub_81C40A0(u8 moveIndex1, u8 moveIndex2)
static void PrintHMMovesCantBeForgotten(void)
{
u8 windowId = AddWindowFromTemplateList(gUnknown_0861CD14, 2);
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(0));
SummaryScreen_PrintTextOnWindow(windowId, gText_HMMovesCantBeForgotten2, 6, 1, 0, 0);
}

View File

@ -1158,7 +1158,7 @@ bool8 sub_81C7BE8(void)
void sub_81C7BF8(u32 a0)
{
FillWindowPixelBuffer(a0, 0x44);
FillWindowPixelBuffer(a0, PALETTE_NUM_TO_FILL_VALUE(4));
FillWindowPixelRect(a0, 0x55, 0, 0, 0x80, 1);
}

View File

@ -1622,7 +1622,7 @@ void MCB2_FlyMap(void)
case 7:
LoadPalette(sRegionMapFramePal, 0x10, 0x20);
PutWindowTilemap(2);
FillWindowPixelBuffer(2, 0x00);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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)
sub_8198070(1, FALSE);
SetWindowBorderStyle(0, FALSE, 0x65, 0x0d);
}
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
CopyWindowToVram(0, 2);
schedule_bg_copy_tilemap_to_vram(0);
gUnknown_03001180 = FALSE;

View File

@ -387,7 +387,7 @@ void nullsub_89(void)
void sub_80124EC(u8 windowId, u8 arg1, u8 stringId)
{
FillWindowPixelBuffer(windowId, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(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, 0x22);
FillWindowPixelBuffer(data->field_10, PALETTE_NUM_TO_FILL_VALUE(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, 0x22);
FillWindowPixelBuffer(data->field_C, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(data->field_D, PALETTE_NUM_TO_FILL_VALUE(1));
PutWindowTilemap(data->field_D);
sub_80125BC(data->field_D);
CopyWindowToVram(data->field_D, 2);

View File

@ -231,8 +231,8 @@ static void CB2_SaveFailedScreen(void)
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
SetWindowBorderStyle(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE);
SetWindowBorderStyle(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE);
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], PIXEL_BUFFER_WHITE); // backwards?
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1)); // backwards?
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(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], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1));
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
SetMainCallback2(CB2_GameplayCannotBeContinued);
return;
}
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1));
SaveFailedScreenTextPrint(gText_CheckCompleted, 1, 0);
HandleSavingData(gSaveFailedType);
if (gDamagedSaveSectors != 0)
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1));
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
}
@ -286,12 +286,12 @@ static void CB2_WipeSave(void)
if (wipeTries == 3)
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1));
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
}
else
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(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], PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PALETTE_NUM_TO_FILL_VALUE(1));
SaveFailedScreenTextPrint(gText_GamePlayCannotBeContinued, 1, 0);
SetVBlankCallback(VBlankCB);
SetMainCallback2(CB2_FadeAndReturnToTitleScreen);

View File

@ -1519,7 +1519,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0);
NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0);
PutWindowTilemap(gUnknown_03000F30);
FillWindowPixelBuffer(gUnknown_03000F30, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(gUnknown_03000F30, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0);
CopyWindowToVram(gUnknown_03000F30, 3);
return FALSE;

View File

@ -1639,27 +1639,27 @@ static void sub_80E2A94(u8 multichoiceId)
switch (multichoiceId)
{
case 77:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 76:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 78:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 79:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 75:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 74:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
}

View File

@ -545,7 +545,7 @@ static void BuyMenuPrintItemDescriptionAndShowItemIcon(int item, bool8 onInit, s
description = gText_QuitShopping;
}
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0));
BuyMenuPrint(2, description, 3, 1, 0, 0);
}
@ -1144,7 +1144,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
{
s16 *data = gTasks[taskId].data;
FillWindowPixelBuffer(4, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(4, PALETTE_NUM_TO_FILL_VALUE(1));
PrintMoneyAmount(4, 38, 1, gShopDataPtr->totalCost, TEXT_SPEED_FF);
ConvertIntToDecimalStringN(gStringVar1, tItemCount, 2, 2);
StringExpandPlaceholders(gStringVar4, gText_xVar1);

View File

@ -3036,7 +3036,7 @@ s16 sub_8102D5C(s16 a0)
sub_81065DC();
AddWindow(&gUnknown_085A7444);
PutWindowTilemap(1);
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
task->data[0]++;
}
@ -3052,7 +3052,7 @@ s16 sub_8102D5C(s16 a0)
{
if (gMain.newKeys & (B_BUTTON | SELECT_BUTTON))
{
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
ClearWindowTilemap(1);
CopyWindowToVram(1, 1);
RemoveWindow(1);

View File

@ -1232,7 +1232,7 @@ static void sub_80A0550(u8 taskId)
switch (*step)
{
case 0:
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(1));
AddTextPrinterParameterized2(0,
1,
gText_SavingDontTurnOffPower,

View File

@ -523,7 +523,7 @@ static void Task_StarterChoose3(u8 taskId)
static void Task_StarterChoose4(u8 taskId)
{
PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0);
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(sStarterChooseWindowId, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(sStarterChooseWindowId, PALETTE_NUM_TO_FILL_VALUE(0));
ClearWindowTilemap(sStarterChooseWindowId);
RemoveWindow(sStarterChooseWindowId);
sStarterChooseWindowId = 0xFF;

View File

@ -1581,7 +1581,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
textPrinter->printerTemplate.currentChar++;
return 2;
case 15:
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, textPrinter->printerTemplate.bgColor | textPrinter->printerTemplate.bgColor << 4);
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(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, (textPrinter->printerTemplate.bgColor << 4) | textPrinter->printerTemplate.bgColor);
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor));
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
textPrinter->state = 0;

View File

@ -1418,7 +1418,7 @@ static void sub_80772A4(void)
for (i = 0; i < 18; i++)
{
ClearWindowTilemap(i);
FillWindowPixelBuffer(i, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(i + 14, PALETTE_NUM_TO_FILL_VALUE(0));
rbox_fill_rectangle(i + 14);
}
@ -3256,7 +3256,7 @@ static void sub_807A0C4(void)
static void sub_807A19C(u8 a0)
{
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(15));
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
}
@ -4263,7 +4263,7 @@ static void sub_807B270(void)
break;
case 8:
sub_807ACFC(1, 1);
FillWindowPixelBuffer(0, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(15));
CopyWindowToVram(0, 3);
gUnknown_020322A0->state++;
}
@ -5146,7 +5146,7 @@ static bool8 sub_807CFC8(void)
if (!gPaletteFade.active)
{
sub_807B62C(4);
FillWindowPixelBuffer(0, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_UNKNOWN);
FillWindowPixelBuffer(windowId, PALETTE_NUM_TO_FILL_VALUE(15));
gUnknown_020322A0->unk_F6[0] = 15;
gUnknown_020322A0->unk_F6[1] = 1;
gUnknown_020322A0->unk_F6[2] = 6;

View File

@ -350,7 +350,7 @@ static void sub_80C2760(u8 taskId)
case 0:
if (!IsDma3ManagerBusyWithBgCopy())
{
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(0));
sData->var_0++;
}
break;
@ -363,7 +363,7 @@ static void sub_80C2760(u8 taskId)
sData->var_0++;
break;
case 3:
FillWindowPixelBuffer(2, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0));
sub_80C4FF0();
sub_80C438C(2);
sData->var_0++;
@ -1634,7 +1634,7 @@ static bool8 sub_80C4B08(struct Task* task)
switch (sData->var_4)
{
case 0:
FillWindowPixelBuffer(1, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(1, PALETTE_NUM_TO_FILL_VALUE(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, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(2, PALETTE_NUM_TO_FILL_VALUE(0));
break;
case 4:
if (sData->var_8)

View File

@ -609,7 +609,7 @@ void PrintOnTrainerHillRecordsWindow(void)
u32 total, minutes, secondsWhole, secondsFraction;
SetUpDataStruct();
FillWindowPixelBuffer(0, PIXEL_BUFFER_TRANSPARENT);
FillWindowPixelBuffer(0, PALETTE_NUM_TO_FILL_VALUE(0));
x = GetStringCenterAlignXOffset(1, gText_TimeBoard, 0xD0);
AddTextPrinterParameterized3(0, 1, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard);

View File

@ -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, textPrinter->printerTemplate.bgColor | (textPrinter->printerTemplate.bgColor << 4));
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor));
return 2;
}
break;
@ -146,7 +146,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
case 2:
if (TextPrinterWaitWithDownArrow(textPrinter))
{
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, textPrinter->printerTemplate.bgColor | (textPrinter->printerTemplate.bgColor << 4));
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PALETTE_NUM_TO_FILL_VALUE(textPrinter->printerTemplate.bgColor));
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
textPrinter->state = 0;

View File

@ -106,7 +106,7 @@ bool16 InitWindows(const struct WindowTemplate *templates)
}
}
gTransparentTileNumber = TRANSPARENT_TILE_NUMBER;
gTransparentTileNumber = 0;
return TRUE;
}