projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Eigenes Verzeichnis für Level spendiert.
[hackover2013-badge-firmware.git]
/
badge
/
jumpnrun
/
level_load.c
diff --git
a/badge/jumpnrun/level_load.c
b/badge/jumpnrun/level_load.c
index
ae1a91f
..
a386ecf
100644
(file)
--- a/
badge/jumpnrun/level_load.c
+++ b/
badge/jumpnrun/level_load.c
@@
-100,6
+100,14
@@
int jumpnrun_load_level_from_file(jumpnrun_level *dest, FIL *fd) {
dest->start_pos.y = FIXED_INT( spos[1] * JUMPNRUN_TILE_PIXEL_HEIGHT);
}
dest->start_pos.y = FIXED_INT( spos[1] * JUMPNRUN_TILE_PIXEL_HEIGHT);
}
+#ifdef __linux__
+ if(1 != fread(&dest->start_lives, 1, 1, fd)) {
+#else
+ if(FR_OK != f_read(fd, &dest->start_lives, sizeof(dest->start_lives), &count) || count != sizeof(dest->start_lives)) {
+#endif
+ return JUMPNRUN_LEVEL_LOAD_ERROR;
+ }
+
for(i = 0; i < dest->header.tile_count; ++i) {
#ifdef __linux__
if(1 != fread(buf, 3, 1, fd)) {
for(i = 0; i < dest->header.tile_count; ++i) {
#ifdef __linux__
if(1 != fread(buf, 3, 1, fd)) {
This page took
0.025792 seconds
and
4
git commands to generate.