X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=f9a6a9ae84f555e335bbf0ffb36f42d8e4a59ca1;hp=faf298e04af52eee8aed786dbfcecd0b56c235b1;hb=d16822a5837f5243e708b5349dbb0e4144152a23;hpb=3640e5cb96db9057dec008b05e69d27676ecbfbb diff --git a/advent.h b/advent.h index faf298e..f9a6a9a 100644 --- a/advent.h +++ b/advent.h @@ -233,7 +233,12 @@ typedef struct { * files afterwards. Otherwise you will get a spurious failure due to the old version * having been generated into a check file. */ -#define SAVE_VERSION 29 +#define SAVE_VERSION 30 + +/* + * Goes at start of gile so sabes can be identified by file(1) and the like. + */ +#define ADVENT_MAGIC "open-adventure\n" /* * If you change the first three members, the resume function may not properly @@ -241,8 +246,7 @@ typedef struct { * when you do that. */ struct save_t { - int64_t savetime; - int32_t mode; /* not used, must be present for version detection */ + char magic[sizeof(ADVENT_MAGIC)]; int32_t version; struct game_t game; };