diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-10 16:36:41 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-10 16:36:41 -0400 |
commit | c29408cbbb822f530c781daf4a0c34ac2f2fd98b (patch) | |
tree | 9b8a0203bfc5f88fbc07b1437406cc6dd974afaf /src/window_8bpp.c | |
parent | aea30489fc3994a856ba929d075ed762c7fb1967 (diff) |
Use defines/enums in window.c, window_8bpp.c
Diffstat (limited to 'src/window_8bpp.c')
-rw-r--r-- | src/window_8bpp.c | 6 |
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; |