Use defines/enums in window.c, window_8bpp.c
This commit is contained in:
+3
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user