summaryrefslogtreecommitdiff
path: root/src/window_8bpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window_8bpp.c')
-rw-r--r--src/window_8bpp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window_8bpp.c b/src/window_8bpp.c
index f7e380f63..a96785339 100644
--- a/src/window_8bpp.c
+++ b/src/window_8bpp.c
@@ -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;