diff options
author | sceptillion <33798691+sceptillion@users.noreply.github.com> | 2017-12-20 07:55:09 -0800 |
---|---|---|
committer | sceptillion <33798691+sceptillion@users.noreply.github.com> | 2017-12-20 07:55:09 -0800 |
commit | 791d5a48cc85e5bc93ad3a60ccfe11db76ea9f1e (patch) | |
tree | 8cafc8511ba37b17187e1b77317bd110b28ee197 | |
parent | 236f91e6f0e30197d44fa8352350f4cbf9218a59 (diff) |
common symbols for window and text
-rw-r--r-- | common_syms/text.txt | 1 | ||||
-rw-r--r-- | common_syms/window.txt | 2 | ||||
-rw-r--r-- | include/bg.h | 2 | ||||
-rw-r--r-- | include/window.h | 1 | ||||
-rw-r--r-- | src/bg.c | 2 | ||||
-rw-r--r-- | src/window.c | 5 | ||||
-rw-r--r-- | src/window_8bpp.c | 2 | ||||
-rw-r--r-- | sym_common.txt | 12 |
8 files changed, 11 insertions, 16 deletions
diff --git a/common_syms/text.txt b/common_syms/text.txt new file mode 100644 index 000000000..dbaaa0b49 --- /dev/null +++ b/common_syms/text.txt @@ -0,0 +1 @@ +gTextFlags diff --git a/common_syms/window.txt b/common_syms/window.txt new file mode 100644 index 000000000..0371083ce --- /dev/null +++ b/common_syms/window.txt @@ -0,0 +1,2 @@ +gWindowClearTile +gWindowBgTilemapBuffers diff --git a/include/bg.h b/include/bg.h index e8634ee9d..0700e2d23 100644 --- a/include/bg.h +++ b/include/bg.h @@ -89,4 +89,6 @@ u32 GetBgType(u8 bg); bool32 IsInvalidBg32(u8 bg); bool32 IsTileMapOutsideWram(u8 bg); +extern bool32 gWindowTileAutoAllocEnabled; + #endif // GUARD_BG_H diff --git a/include/window.h b/include/window.h index 09fd00b6d..1e29119ea 100644 --- a/include/window.h +++ b/include/window.h @@ -69,6 +69,7 @@ void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, 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 void *gWindowBgTilemapBuffers[]; extern struct Window gWindows[]; #endif // GUARD_WINDOW_H @@ -42,7 +42,7 @@ static struct BgConfig2 sGpuBgConfigs2[4]; static u32 sDmaBusyBitfield[4]; static u8 gpu_tile_allocation_map_bg[0x100]; -u32 gWindowTileAutoAllocEnabled; +bool32 gWindowTileAutoAllocEnabled; static const struct BgConfig sZeroedBgControlStruct = { 0 }; diff --git a/src/window.c b/src/window.c index 4f922084a..e760fc8e4 100644 --- a/src/window.c +++ b/src/window.c @@ -3,9 +3,8 @@ #include "malloc.h" #include "bg.h" -extern u8 gWindowClearTile; -extern void* gWindowBgTilemapBuffers[]; -extern u32 gWindowTileAutoAllocEnabled; +u8 gWindowClearTile; +void *gWindowBgTilemapBuffers[4]; EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0}; diff --git a/src/window_8bpp.c b/src/window_8bpp.c index a1c19314c..5eac3c558 100644 --- a/src/window_8bpp.c +++ b/src/window_8bpp.c @@ -3,8 +3,6 @@ #include "malloc.h" #include "bg.h" -extern void* gWindowBgTilemapBuffers[]; - EWRAM_DATA static struct Window* sWindowPtr = NULL; EWRAM_DATA static u16 sWindowSize = 0; diff --git a/sym_common.txt b/sym_common.txt index 56298064a..f3a44cf03 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -1,16 +1,8 @@ .include "main.o" .include "bg.o" .include "text_printer.o" - -gWindowClearTile: @ 3003E30 - .space 0x10 - -gWindowBgTilemapBuffers: @ 3003E40 - .space 0x10 - -gTextFlags: @ 3003E50 - .space 0x4 - + .include "window.o" + .include "text.o" .include "sprite.o" .align 4 |