diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2018-03-01 01:01:18 +0100 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2018-03-01 01:01:18 +0100 |
commit | 988f0b7e19a4505bdd0e846550382661dcf53cc7 (patch) | |
tree | 0e1ccb1aaa62828adbcf2108c7d8c59909ff55c4 /src/window.c | |
parent | d29b9d268fe46322c740fe5ac440641834686f9d (diff) | |
parent | bcef4e7d1c20bad3d4631c5a8314a8de8da80e49 (diff) |
Merge branch 'master' into decompile_battle_link_817C95C
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/window.c b/src/window.c index 589557d43..9a52a5a20 100644 --- a/src/window.c +++ b/src/window.c @@ -1,6 +1,8 @@ #include "global.h" #include "window.h" #include "malloc.h" +#include "bg.h" +#include "blit.h" u32 filler_03002F58; u32 filler_03002F5C; @@ -15,19 +17,6 @@ EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0}; EWRAM_DATA static struct Window* sWindowPtr = NULL; EWRAM_DATA static u16 sWindowSize = 0; -extern void* GetBgTilemapBuffer(u8 bg); -extern int DummiedOutFireRedLeafGreenTileAllocFunc(int, int, int, int); -extern u16 GetBgAttribute(u8 bg, u8 attributeId); -extern void SetBgTilemapBuffer(u8 bg, void *tilemap); -extern void CopyBgTilemapBufferToVram(u8 bg); -extern u8 LoadBgTiles(u8 bg, void *src, u16 size, u16 destOffset); -extern void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 width, u8 height, u8 paletteSlot, u16 tileNumDelta); -extern void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette); -extern void BlitBitmapRect4Bit(struct Bitmap *src, struct Bitmap *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height, u8 colorKey); -extern void BlitBitmapRect4BitTo8Bit(struct Bitmap *src, struct Bitmap *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height, u8 colorKey, u8 paletteNum); -extern void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue); -extern void FillBitmapRect8Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue); - static u8 GetNumActiveWindowsOnBg(u8 bgId); static u8 GetNumActiveWindowsOnBg8Bit(u8 bgId); @@ -130,13 +119,13 @@ u16 AddWindow(const struct WindowTemplate *template) u8 *allocatedTilemapBuffer; int i; - for (win = 0; win < 0x20; ++win) + for (win = 0; win < WINDOWS_MAX; ++win) { if ((bgLayer = gWindows[win].window.priority) == 0xFF) break; } - if (win == 0x20) + if (win == WINDOWS_MAX) return 0xFF; bgLayer = template->priority; @@ -199,13 +188,13 @@ int AddWindowWithoutTileMap(const struct WindowTemplate *template) u8 bgLayer; int allocatedBaseBlock; - for (win = 0; win < 0x20; ++win) + for (win = 0; win < WINDOWS_MAX; ++win) { if (gWindows[win].window.priority == 0xFF) break; } - if (win == 0x20) + if (win == WINDOWS_MAX) return 0xFF; bgLayer = template->priority; |