X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/c39bf81f1820600053271e037891e614f67c9646..5337261a68ea89b88624ca6fd7319cadd662e057:/mock/badge_main_loop.c?ds=sidebyside diff --git a/mock/badge_main_loop.c b/mock/badge_main_loop.c index 41d4113..f2a366e 100644 --- a/mock/badge_main_loop.c +++ b/mock/badge_main_loop.c @@ -13,9 +13,11 @@ #define MAX_LEVELS 1024 +#define PATH_PREFIX "../badge/jumpnrun/levels/" + void badge_main_loop(void) { char menu_buf[MAX_LEVELS][32]; - FILE *fd = fopen("../badge/jumpnrun/levels.txt", "r"); + FILE *fd = fopen("levels.txt", "r"); int i; @@ -36,7 +38,7 @@ void badge_main_loop(void) { for(;;) { choice = badge_menu(menu, ARRAY_SIZE(menu), &first_visible, choice); char lvname[256]; - sprintf(lvname, "../badge/jumpnrun/%s.lvl", menu[choice]); + sprintf(lvname, PATH_PREFIX "%s.lvl", menu[choice]); jumpnrun_play_level(lvname); }