home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf8a2df
)
Minor refactoring of save_game().
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 21 Aug 2013 02:50:48 +0000
(
04:50
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 21 Aug 2013 02:50:48 +0000
(
04:50
+0200)
src/misc.c
patch
|
blob
|
history
diff --git
a/src/misc.c
b/src/misc.c
index 883325289475b850a3814c213262a262806bb645..dac4c974f07767228510e4444583a02be3f43d38 100644
(file)
--- a/
src/misc.c
+++ b/
src/misc.c
@@
-133,13
+133,12
@@
extern void turn_over(struct World * world, char action)
extern void save_game(struct World * world)
{
- uint8_t err = 0;
char * err_msg = "Error saving game.";
FILE * file = fopen("savefile", "w");
- // err = (0 == file);
exit_err(0 == file, world, err_msg);
+ uint8_t err;
err = write_uint32_bigendian(world->seed, file);
err = err | write_uint32_bigendian(world->turn, file);
err = err | write_uint16_bigendian(world->player->pos.y + 1, file);