diff --git a/meson.build b/meson.build index 3444446073..a82c67297c 100644 --- a/meson.build +++ b/meson.build @@ -177,6 +177,7 @@ main = executable('main', c_consts_generators, naix_headers, h_headers, + embed_headers, ], c_args: [ pokeplatinum_args, diff --git a/res/fonts/arrow_cursor.png b/res/fonts/arrow_cursor.png new file mode 100644 index 0000000000..dbad8ea374 Binary files /dev/null and b/res/fonts/arrow_cursor.png differ diff --git a/res/fonts/meson.build b/res/fonts/meson.build index 9f91f1b0ba..65e4df4845 100644 --- a/res/fonts/meson.build +++ b/res/fonts/meson.build @@ -109,5 +109,15 @@ pl_font_narc = custom_target('pl_font.narc', ], ) +arrow_cursor_embed = custom_target('arrow_cursor.4bpp.h', + output: [ + 'arrow_cursor.4bpp', + 'arrow_cursor.4bpp.h', + ], + input: files('arrow_cursor.png'), + command: [ nitrogfx_exe, '@INPUT@', '@OUTPUT0@', '-embed', 'sArrowCursorBitmap' ], +) + nitrofs_files += pl_font_narc naix_headers += pl_font_narc[1] +embed_headers += arrow_cursor_embed[1] diff --git a/res/meson.build b/res/meson.build index 504393fc54..e420cc0f70 100644 --- a/res/meson.build +++ b/res/meson.build @@ -1,6 +1,7 @@ nitrofs_files = [] naix_headers = [] h_headers = [] +embed_headers = [] ### PREBUILT FILES ### subdir('prebuilt') diff --git a/src/menu.c b/src/menu.c index d3fdd26667..c48128dfa7 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1,8 +1,5 @@ #include "menu.h" -#include -#include - #include "bg_window.h" #include "colored_arrow.h" #include "font.h" @@ -410,72 +407,7 @@ void Menu_DestroyForExit(Menu *menu, u32 heapID) Menu_Free(menu, NULL); } -static const u8 sArrowCursorBitmap[] = { - 0xff, - 0xff, - 0xff, - 0x0, - 0xff, - 0xff, - 0xff, - 0x0, - 0x21, - 0xff, - 0xff, - 0x0, - 0x11, - 0xf2, - 0xff, - 0x0, - 0x11, - 0x21, - 0xff, - 0x0, - 0x11, - 0x11, - 0xf2, - 0x0, - 0x11, - 0x11, - 0x21, - 0x0, - 0x11, - 0x11, - 0x22, - 0x0, - 0x11, - 0x21, - 0xf2, - 0x0, - 0x11, - 0x22, - 0xff, - 0x0, - 0x21, - 0xf2, - 0xff, - 0x0, - 0x22, - 0xff, - 0xff, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0 -}; +#include "res/fonts/arrow_cursor.4bpp.h" void Window_DrawMenuCursor(Window *window, u32 x, u32 y) {