summaryrefslogtreecommitdiff
path: root/src/window_8bpp.c
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2020-04-10 16:36:41 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2020-04-10 16:36:41 -0400
commitc29408cbbb822f530c781daf4a0c34ac2f2fd98b (patch)
tree9b8a0203bfc5f88fbc07b1437406cc6dd974afaf /src/window_8bpp.c
parentaea30489fc3994a856ba929d075ed762c7fb1967 (diff)
Use defines/enums in window.c, window_8bpp.c
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;