summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/battle_pyramid_bag.c6
-rwxr-xr-xsrc/item_menu.c12
-rw-r--r--src/match_call.c2
-rw-r--r--src/menu.c28
-rw-r--r--src/menu_specialized.c6
-rwxr-xr-xsrc/party_menu.c8
-rw-r--r--src/player_pc.c6
-rw-r--r--src/pokemon_summary_screen.c10
-rw-r--r--src/pokenav_match_call_ui.c2
-rw-r--r--src/starter_choose.c2
-rwxr-xr-xsrc/union_room_chat.c4
11 files changed, 43 insertions, 43 deletions
diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c
index 8fee57855..5537b302e 100644
--- a/src/battle_pyramid_bag.c
+++ b/src/battle_pyramid_bag.c
@@ -1428,7 +1428,7 @@ static u8 sub_81C6D08(u8 windowArrayId)
static u8 sub_81C6D24(u8 windowArrayId)
{
u8 *windowId = &gPyramidBagResources->windowIds[windowArrayId];
- if (*windowId == 0xFF)
+ if (*windowId == WINDOW_NONE)
{
*windowId = AddWindow(&gUnknown_0861F350[windowArrayId]);
DrawStdFrameWithCustomTileAndPalette(*windowId, FALSE, 1, 0xE);
@@ -1440,13 +1440,13 @@ static u8 sub_81C6D24(u8 windowArrayId)
static void sub_81C6D6C(u8 windowArrayId)
{
u8 *windowId = &gPyramidBagResources->windowIds[windowArrayId];
- if (*windowId != 0xFF)
+ if (*windowId != WINDOW_NONE)
{
ClearStdWindowAndFrameToTransparent(*windowId, FALSE);
ClearWindowTilemap(*windowId);
RemoveWindow(*windowId);
ScheduleBgCopyTilemapToVram(1);
- *windowId = 0xFF;
+ *windowId = WINDOW_NONE;
}
}
diff --git a/src/item_menu.c b/src/item_menu.c
index 375e15cab..89374c5d2 100755
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -2390,7 +2390,7 @@ u8 sub_81AE124(u8 which)
u8 BagMenu_AddWindow(u8 which)
{
u8 *ptr = &gBagMenu->windowPointers[which];
- if (*ptr == 0xFF)
+ if (*ptr == WINDOW_NONE)
{
*ptr = AddWindow(&sContextMenuWindowTemplates[which]);
DrawStdFrameWithCustomTileAndPalette(*ptr, 0, 1, 14);
@@ -2402,20 +2402,20 @@ u8 BagMenu_AddWindow(u8 which)
void BagMenu_RemoveWindow(u8 which)
{
u8 *ptr = &gBagMenu->windowPointers[which];
- if (*ptr != 0xFF)
+ if (*ptr != WINDOW_NONE)
{
ClearStdWindowAndFrameToTransparent(*ptr, FALSE);
ClearWindowTilemap(*ptr);
RemoveWindow(*ptr);
ScheduleBgCopyTilemapToVram(1);
- *ptr = 0xFF;
+ *ptr = WINDOW_NONE;
}
}
u8 AddItemMessageWindow(u8 which)
{
u8 *ptr = &gBagMenu->windowPointers[which];
- if (*ptr == 0xFF)
+ if (*ptr == WINDOW_NONE)
*ptr = AddWindow(&sContextMenuWindowTemplates[which]);
return *ptr;
}
@@ -2423,14 +2423,14 @@ u8 AddItemMessageWindow(u8 which)
void BagMenu_RemoveBagItemMessageWindow(u8 which)
{
u8 *ptr = &gBagMenu->windowPointers[which];
- if (*ptr != 0xFF)
+ if (*ptr != WINDOW_NONE)
{
ClearDialogWindowAndFrameToTransparent(*ptr, FALSE);
// This ClearWindowTilemap call is redundant, since ClearDialogWindowAndFrameToTransparent already calls it.
ClearWindowTilemap(*ptr);
RemoveWindow(*ptr);
ScheduleBgCopyTilemapToVram(1);
- *ptr = 0xFF;
+ *ptr = WINDOW_NONE;
}
}
diff --git a/src/match_call.c b/src/match_call.c
index 68b630d6b..fb8ebc98c 100644
--- a/src/match_call.c
+++ b/src/match_call.c
@@ -1168,7 +1168,7 @@ static bool32 LoadMatchCallWindowGfx(u8 taskId)
{
s16 *taskData = gTasks[taskId].data;
taskData[2] = AddWindow(&sMatchCallTextWindow);
- if (taskData[2] == 0xFF)
+ if (taskData[2] == WINDOW_NONE)
{
DestroyTask(taskId);
return FALSE;
diff --git a/src/menu.c b/src/menu.c
index 4813f7b02..86e5caac2 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -144,8 +144,8 @@ void task_free_buf_after_copying_tile_data_to_vram(u8 taskId);
void InitStandardTextBoxWindows(void)
{
InitWindows(sStandardTextBox_WindowTemplates);
- sStartMenuWindowId = 0xFF;
- sMapNamePopupWindowId = 0xFF;
+ sStartMenuWindowId = WINDOW_NONE;
+ sMapNamePopupWindowId = WINDOW_NONE;
}
void FreeAllOverworldWindowBuffers(void)
@@ -490,7 +490,7 @@ u8 GetPlayerTextSpeedDelay(void)
u8 sub_81979C4(u8 a1)
{
- if (sStartMenuWindowId == 0xFF)
+ if (sStartMenuWindowId == WINDOW_NONE)
sStartMenuWindowId = sub_8198AA4(0, 0x16, 1, 7, (a1 * 2) + 2, 0xF, 0x139);
return sStartMenuWindowId;
}
@@ -502,10 +502,10 @@ u8 GetStartMenuWindowId(void)
void RemoveStartMenuWindow(void)
{
- if (sStartMenuWindowId != 0xFF)
+ if (sStartMenuWindowId != WINDOW_NONE)
{
RemoveWindow(sStartMenuWindowId);
- sStartMenuWindowId = 0xFF;
+ sStartMenuWindowId = WINDOW_NONE;
}
}
@@ -521,7 +521,7 @@ u16 sub_8197A38(void)
u8 AddMapNamePopUpWindow(void)
{
- if (sMapNamePopupWindowId == 0xFF)
+ if (sMapNamePopupWindowId == WINDOW_NONE)
sMapNamePopupWindowId = sub_8198AA4(0, 1, 1, 10, 3, 14, 0x107);
return sMapNamePopupWindowId;
}
@@ -533,10 +533,10 @@ u8 GetMapNamePopUpWindowId(void)
void RemoveMapNamePopUpWindow(void)
{
- if (sMapNamePopupWindowId != 0xFF)
+ if (sMapNamePopupWindowId != WINDOW_NONE)
{
RemoveWindow(sMapNamePopupWindowId);
- sMapNamePopupWindowId = 0xFF;
+ sMapNamePopupWindowId = WINDOW_NONE;
}
}
@@ -815,7 +815,7 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram)
{
u16 width = 0;
- if (sWindowId != 0xFF)
+ if (sWindowId != WINDOW_NONE)
{
PutWindowTilemap(sWindowId);
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15));
@@ -837,7 +837,7 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo
u8 color[3];
u16 width = 0;
- if (sWindowId != 0xFF)
+ if (sWindowId != WINDOW_NONE)
{
if (a3 != 0)
{
@@ -872,13 +872,13 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo
void sub_81982D8(void)
{
- if (sWindowId != 0xFF)
+ if (sWindowId != WINDOW_NONE)
CopyWindowToVram(sWindowId, 3);
}
void sub_81982F0(void)
{
- if (sWindowId != 0xFF)
+ if (sWindowId != WINDOW_NONE)
{
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15));
CopyWindowToVram(sWindowId, 3);
@@ -887,13 +887,13 @@ void sub_81982F0(void)
void sub_8198314(void)
{
- if (sWindowId != 0xFF)
+ if (sWindowId != WINDOW_NONE)
{
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(0));
ClearWindowTilemap(sWindowId);
CopyWindowToVram(sWindowId, 3);
RemoveWindow(sWindowId);
- sWindowId = 0xFF;
+ sWindowId = WINDOW_NONE;
}
}
diff --git a/src/menu_specialized.c b/src/menu_specialized.c
index 74e3455c3..cdf0137cd 100644
--- a/src/menu_specialized.c
+++ b/src/menu_specialized.c
@@ -216,14 +216,14 @@ bool8 sub_81D1C44(u8 count)
return FALSE;
for (i = 0; i < ARRAY_COUNT(sUnknown_0203CF48); i++)
- sUnknown_0203CF48[i] = 0xFF;
+ sUnknown_0203CF48[i] = WINDOW_NONE;
return TRUE;
}
u8 sub_81D1C84(u8 a0)
{
- if (sUnknown_0203CF48[a0] == 0xFF)
+ if (sUnknown_0203CF48[a0] == WINDOW_NONE)
{
if (a0 == 2)
{
@@ -245,7 +245,7 @@ void sub_81D1D04(u8 a0)
ClearStdWindowAndFrameToTransparent(sUnknown_0203CF48[a0], 0);
ClearWindowTilemap(sUnknown_0203CF48[a0]);
RemoveWindow(sUnknown_0203CF48[a0]);
- sUnknown_0203CF48[a0] = 0xFF;
+ sUnknown_0203CF48[a0] = WINDOW_NONE;
}
static u8 sub_81D1D34(u8 a0)
diff --git a/src/party_menu.c b/src/party_menu.c
index 95c41ac05..dbb5cf0e6 100755
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -443,7 +443,7 @@ static void InitPartyMenu(u8 menuType, u8 layout, u8 partyAction, bool8 keepCurs
for (i = 0; i < ARRAY_COUNT(sPartyMenuInternal->data); i++)
sPartyMenuInternal->data[i] = 0;
for (i = 0; i < ARRAY_COUNT(sPartyMenuInternal->windowId); i++)
- sPartyMenuInternal->windowId[i] = 0xFF;
+ sPartyMenuInternal->windowId[i] = WINDOW_NONE;
if (!keepCursorPos)
gPartyMenu.slotId = 0;
@@ -2371,11 +2371,11 @@ static void DisplayPartyPokemonDescriptionText(u8 stringID, struct PartyMenuBox
static void PartyMenuRemoveWindow(u8 *ptr)
{
- if (*ptr != 0xFF)
+ if (*ptr != WINDOW_NONE)
{
ClearStdWindowAndFrameToTransparent(*ptr, 0);
RemoveWindow(*ptr);
- *ptr = 0xFF;
+ *ptr = WINDOW_NONE;
ScheduleBgCopyTilemapToVram(2);
}
}
@@ -2384,7 +2384,7 @@ void DisplayPartyMenuStdMessage(u32 stringId)
{
u8 *windowPtr = &sPartyMenuInternal->windowId[1];
- if (*windowPtr != 0xFF)
+ if (*windowPtr != WINDOW_NONE)
PartyMenuRemoveWindow(windowPtr);
if (stringId != PARTY_MSG_NONE)
diff --git a/src/player_pc.c b/src/player_pc.c
index 1f293a195..447fa82c1 100644
--- a/src/player_pc.c
+++ b/src/player_pc.c
@@ -889,7 +889,7 @@ static void sub_816BC58(void)
static u8 sub_816BC7C(u8 a)
{
u8 *windowIdLoc = &(gUnknown_0203BCC4->windowIds[a]);
- if (*windowIdLoc == 0xFF)
+ if (*windowIdLoc == WINDOW_NONE)
{
*windowIdLoc = AddWindow(&gUnknown_085DFF5C[a]);
DrawStdFrameWithCustomTileAndPalette(*windowIdLoc, FALSE, 0x214, 0xE);
@@ -901,13 +901,13 @@ static u8 sub_816BC7C(u8 a)
static void sub_816BCC4(u8 a)
{
u8 *windowIdLoc = &(gUnknown_0203BCC4->windowIds[a]);
- if (*windowIdLoc != 0xFF)
+ if (*windowIdLoc != WINDOW_NONE)
{
ClearStdWindowAndFrameToTransparent(*windowIdLoc, FALSE);
ClearWindowTilemap(*windowIdLoc);
ScheduleBgCopyTilemapToVram(0);
RemoveWindow(*windowIdLoc);
- *windowIdLoc = 0xFF;
+ *windowIdLoc = WINDOW_NONE;
}
}
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index b3cc1e516..53ec7c1d1 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -2680,7 +2680,7 @@ static void ResetWindows(void)
for (i = 0; i < PSS_LABEL_WINDOW_END; i++)
FillWindowPixelBuffer(i, PIXEL_FILL(0));
for (i = 0; i < ARRAY_COUNT(sMonSummaryScreen->windowIds); i++)
- sMonSummaryScreen->windowIds[i] = 0xFF;
+ sMonSummaryScreen->windowIds[i] = WINDOW_NONE;
}
static void PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, u8 y, u8 lineSpacing, u8 colorId)
@@ -2938,7 +2938,7 @@ static void ClearPageWindowTilemaps(u8 page)
static u8 AddWindowFromTemplateList(const struct WindowTemplate *template, u8 templateId)
{
u8 *windowIdPtr = &sMonSummaryScreen->windowIds[templateId];
- if (*windowIdPtr == 0xFF)
+ if (*windowIdPtr == WINDOW_NONE)
{
*windowIdPtr = AddWindow(&template[templateId]);
FillWindowPixelBuffer(*windowIdPtr, PIXEL_FILL(0));
@@ -2949,11 +2949,11 @@ static u8 AddWindowFromTemplateList(const struct WindowTemplate *template, u8 te
static void RemoveWindowByIndex(u8 windowIndex)
{
u8 *windowIdPtr = &sMonSummaryScreen->windowIds[windowIndex];
- if (*windowIdPtr != 0xFF)
+ if (*windowIdPtr != WINDOW_NONE)
{
ClearWindowTilemap(*windowIdPtr);
RemoveWindow(*windowIdPtr);
- *windowIdPtr = 0xFF;
+ *windowIdPtr = WINDOW_NONE;
}
}
@@ -2962,7 +2962,7 @@ static void PrintPageSpecificText(u8 pageIndex)
u16 i;
for (i = 0; i < ARRAY_COUNT(sMonSummaryScreen->windowIds); i++)
{
- if (sMonSummaryScreen->windowIds[i] != 0xFF)
+ if (sMonSummaryScreen->windowIds[i] != WINDOW_NONE)
FillWindowPixelBuffer(sMonSummaryScreen->windowIds[i], PIXEL_FILL(0));
}
sTextPrinterFunctions[pageIndex]();
diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c
index 2d89f9c39..11bb30162 100644
--- a/src/pokenav_match_call_ui.c
+++ b/src/pokenav_match_call_ui.c
@@ -987,7 +987,7 @@ bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const str
window.baseBlock = a3 + 2;
dest->listWindow.windowId = AddWindow(&window);
- if (dest->listWindow.windowId == 0xFF)
+ if (dest->listWindow.windowId == WINDOW_NONE)
return FALSE;
dest->listWindow.unkA = 0;
diff --git a/src/starter_choose.c b/src/starter_choose.c
index f7ffcfc2c..587169841 100644
--- a/src/starter_choose.c
+++ b/src/starter_choose.c
@@ -613,7 +613,7 @@ static void ClearStarterLabel(void)
FillWindowPixelBuffer(sStarterLabelWindowId, PIXEL_FILL(0));
ClearWindowTilemap(sStarterLabelWindowId);
RemoveWindow(sStarterLabelWindowId);
- sStarterLabelWindowId = 0xFF;
+ sStarterLabelWindowId = WINDOW_NONE;
SetGpuReg(REG_OFFSET_WIN0H, 0);
SetGpuReg(REG_OFFSET_WIN0V, 0);
ScheduleBgCopyTilemapToVram(0);
diff --git a/src/union_room_chat.c b/src/union_room_chat.c
index 75464529f..131c57bbb 100755
--- a/src/union_room_chat.c
+++ b/src/union_room_chat.c
@@ -2724,7 +2724,7 @@ static void AddYesNoMenuAt(u8 left, u8 top, u8 initialCursorPos)
template.paletteNum = 14;
template.baseBlock = 0x52;
sDisplay->yesNoMenuWindowId = AddWindow(&template);
- if (sDisplay->yesNoMenuWindowId != 0xFF)
+ if (sDisplay->yesNoMenuWindowId != WINDOW_NONE)
{
FillWindowPixelBuffer(sDisplay->yesNoMenuWindowId, PIXEL_FILL(1));
PutWindowTilemap(sDisplay->yesNoMenuWindowId);
@@ -2778,7 +2778,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs)
sDisplay->messageWindowId = AddWindow(&template);
windowId = sDisplay->messageWindowId;
- if (sDisplay->messageWindowId == 0xFF)
+ if (sDisplay->messageWindowId == WINDOW_NONE)
return;
if (sDisplayStdMessages[msgId].hasPlaceholders)