-#define JUMPNRUN_LEVEL_LOAD(lv, lvname) \
- memset(&(lv), 0, sizeof(lv)); \
- FIL fd; \
- if(FR_OK != f_open(&fd, (lvname), FA_OPEN_EXISTING | FA_READ)) { \
- return JUMPNRUN_ERROR; \
- } \
- if(0 != jumpnrun_load_level_header_from_file(&(lv), &fd)) { \
- f_close(&fd); \
- return JUMPNRUN_ERROR; \
- } \
- JUMPNRUN_LEVEL_MAKE_SPACE(lv); \
- int err = jumpnrun_load_level_from_file(&(lv), &fd); \
- f_close(&fd); \
- if(err != 0) { \
- return JUMPNRUN_ERROR; \
+#define JUMPNRUN_LEVEL_LOAD(lv, lvname) \
+ memset(&(lv), 0, sizeof(lv)); \
+ FIL fd; \
+ if(FR_OK != f_chdir(JUMPNRUN_PATH) || \
+ FR_OK != f_open(&fd, (lvname), FA_OPEN_EXISTING | FA_READ)) { \
+ return JUMPNRUN_ERROR; \
+ } \
+ if(0 != jumpnrun_load_level_header_from_file(&(lv), &fd)) { \
+ f_close(&fd); \
+ return JUMPNRUN_ERROR; \
+ } \
+ JUMPNRUN_LEVEL_MAKE_SPACE(lv); \
+ int err = jumpnrun_load_level_from_file(&(lv), &fd); \
+ f_close(&fd); \
+ if(err != 0) { \
+ return JUMPNRUN_ERROR; \