diff options
author | sceptillion <33798691+sceptillion@users.noreply.github.com> | 2017-12-17 13:22:46 -0800 |
---|---|---|
committer | sceptillion <33798691+sceptillion@users.noreply.github.com> | 2017-12-17 13:22:46 -0800 |
commit | b849ce93dbafac8e4961b531ab40585c0fdd103a (patch) | |
tree | 1cfd5cf3b7223a8e91dd0a0d4e6e112bd3458d8b /include/window.h | |
parent | 3ddda066d91cbbd377584acacaea62a9deba8873 (diff) |
decompile main
Diffstat (limited to 'include/window.h')
-rw-r--r-- | include/window.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/include/window.h b/include/window.h new file mode 100644 index 000000000..b630cd316 --- /dev/null +++ b/include/window.h @@ -0,0 +1,72 @@ +#ifndef GUARD_WINDOW_H +#define GUARD_WINDOW_H + +enum +{ + WINDOW_PRIORITY, + WINDOW_TILEMAP_LEFT, + WINDOW_TILEMAP_TOP, + WINDOW_WIDTH, + WINDOW_HEIGHT, + WINDOW_PALETTE_NUM, + WINDOW_BASE_BLOCK, + WINDOW_TILE_DATA +}; + +struct WindowTemplate +{ + u8 priority; + u8 tilemapLeft; + u8 tilemapTop; + u8 width; + u8 height; + u8 paletteNum; + u16 baseBlock; +}; + +#define DUMMY_WIN_TEMPLATE \ +{ \ + 0xFF, \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ +} + +struct Window +{ + struct WindowTemplate window; + u8 *tileData; +}; + +bool16 InitWindows(const struct WindowTemplate *templates); +u16 AddWindow(const struct WindowTemplate *template); +int AddWindowWithoutTileMap(const struct WindowTemplate *template); +void RemoveWindow(u8 windowId); +void FreeAllWindowBuffers(void); +void CopyWindowToVram(u8 windowId, u8 mode); +void CopyWindowRectToVram(u32 windowId, u32 mode, u32 x, u32 y, u32 w, u32 h); +void PutWindowTilemap(u8 windowId); +void PutWindowRectTilemapOverridePalette(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 palette); +void ClearWindowTilemap(u8 windowId); +void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height); +void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height); +void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight); +void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); +void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset); +void FillWindowPixelBuffer(u8 windowId, u8 fillValue); +void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue); +void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8)); +bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value); +u32 GetWindowAttribute(u8 windowId, u8 attributeId); +u16 AddWindow8Bit(struct WindowTemplate *template); +u16 AddWindow8Bit(struct WindowTemplate *template); +void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); +void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum); +void CopyWindowToVram8Bit(u8 windowId, u8 mode); + +extern struct Window gWindows[]; + +#endif // GUARD_WINDOW_H |