Merge branch 'master' of gitlab:wintermute/hackover2013-badge-firmware
[hackover2013-badge-firmware.git] / mock / badge_main_loop.c
index 86a72b1..f2a366e 100644 (file)
 
 #define MAX_LEVELS 1024
 
 
 #define MAX_LEVELS 1024
 
+#define PATH_PREFIX "../badge/jumpnrun/levels/"
+
 void badge_main_loop(void) {
   char menu_buf[MAX_LEVELS][32];
 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;
 
 
   int i;
 
@@ -36,8 +38,8 @@ void badge_main_loop(void) {
   for(;;) {
     choice = badge_menu(menu, ARRAY_SIZE(menu), &first_visible, choice);
     char lvname[256];
   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(lvname);
+    jumpnrun_play_level(lvname);
   }
 }
   }
 }
This page took 0.024134 seconds and 4 git commands to generate.