projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix email
[hackover2013-badge-firmware.git]
/
badge
/
jumpnrun
/
levels.h
diff --git
a/badge/jumpnrun/levels.h
b/badge/jumpnrun/levels.h
index
c4336cb
..
c02ab97
100644
(file)
--- a/
badge/jumpnrun/levels.h
+++ b/
badge/jumpnrun/levels.h
@@
-10,6
+10,8
@@
#include <stddef.h>
#include <stdio.h>
#include <stddef.h>
#include <stdio.h>
+#define JUMPNRUN_PATH "/hackio"
+
typedef struct jumpnrun_level_header {
uint16_t tile_count;
uint16_t item_count;
typedef struct jumpnrun_level_header {
uint16_t tile_count;
uint16_t item_count;
@@
-73,7
+75,8
@@
int jumpnrun_load_level_from_file (jumpnrun_level *dest, FIL *fd);
#define JUMPNRUN_LEVEL_LOAD(lv, lvname) \
memset(&(lv), 0, sizeof(lv)); \
FIL fd; \
#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)) { \
+ 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)) { \
return JUMPNRUN_ERROR; \
} \
if(0 != jumpnrun_load_level_header_from_file(&(lv), &fd)) { \
This page took
0.022859 seconds
and
4
git commands to generate.