X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=saveresume.c;h=276667d1f2a661d21e56760b281c21d5f7f65711;hb=5613b0ce36636d421cfa3002d39aeb0e2f69e389;hp=49e0021b91c55f4434935774ca29d12884357f8e;hpb=85f8334e17b9e3118a73f2e9405e9db5f94ad648;p=open-adventure.git diff --git a/saveresume.c b/saveresume.c index 49e0021..276667d 100644 --- a/saveresume.c +++ b/saveresume.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "advent.h" #include "dungeon.h" @@ -10,7 +11,7 @@ * see the history.adoc file in the source distribution for discussion. */ -#define VRSION 26 /* bump on save format change */ +#define VRSION 27 /* bump on save format change */ /* * If you change the first three members, the resume function may not properly @@ -31,12 +32,8 @@ struct save_t save; int savefile(FILE *fp, long version) /* Save game to file. No input or output from user. */ { - long i, k; - datime(&i, &k); - k = i + 650 * k; - save.savetime = k; + save.savetime = time(NULL); save.mode = -1; - save.version = (version == 0) ? VRSION : version; memcpy(&save.game, &game, sizeof(struct game_t));