Use defines/enums in window.c, window_8bpp.c

This commit is contained in:
PikalaxALT
2020-04-10 16:36:41 -04:00
parent aea30489fc
commit c29408cbbb
4 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ u16 AddWindow8Bit(const struct WindowTemplate *template)
u8* memAddress;
u8 bgLayer;
for (windowId = 0; windowId < 32; windowId++)
for (windowId = 0; windowId < WINDOWS_MAX; windowId++)
{
if (gWindows[windowId].window.bg == 0xFF)
break;
@@ -24,9 +24,9 @@ u16 AddWindow8Bit(const struct WindowTemplate *template)
if (windowId == WINDOWS_MAX)
return 0xFF;
bgLayer = template->bg;
if (gWindowBgTilemapBuffers[bgLayer] == 0)
if (gWindowBgTilemapBuffers[bgLayer] == NULL)
{
u16 attribute = GetBgAttribute(bgLayer, 8);
u16 attribute = GetBgAttribute(bgLayer, BG_ATTR_MAPSIZE);
if (attribute != 0xFFFF)
{
s32 i;