diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-06-19 01:34:07 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-06-19 14:49:13 +0530 |
commit | bdc215203d0065aa2f9f4a388644c30963a44301 (patch) | |
tree | df307fe45d2ed347f939728795d8888ea67625ee /crawl-ref/source/tags.h | |
parent | 9d2d31534bf474d02f76551e9d311fd39111a4f6 (diff) | |
download | crawl-ref-bdc215203d0065aa2f9f4a388644c30963a44301.tar.gz crawl-ref-bdc215203d0065aa2f9f4a388644c30963a44301.zip |
Move Sprint saves into $SAVEDIR/sprint.
This allows the same character name to have ongoing Crawl and Sprint games
without filename collisions. I'm using a subdirectory instead of a filename
suffix (such as Foo-501-spr.chr) to avoid blowing DOS compatibility.
Add GAME_TYPE_UNSPECIFIED as the uninitialised game_type. It's synonymous with
GAME_TYPE_NORMAL, but allows the code to distinguish between a player having
chosen the main game and the player not having made a choice yet.
get_savefile_directory() returns the current savefile directory based on game
type. Direct use of Options.save_dir should be avoided in new code.
player_save_info now tracks game type as well.
Diffstat (limited to 'crawl-ref/source/tags.h')
-rw-r--r-- | crawl-ref/source/tags.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h index a884317022..d8f08c5f2a 100644 --- a/crawl-ref/source/tags.h +++ b/crawl-ref/source/tags.h @@ -28,7 +28,11 @@ enum tag_type // used during save/load process to identify data blocks TAG_LOST_MONSTERS, // monsters in transit TAG_LEVEL_TILES, TAG_GAME_STATE, - NUM_TAGS + NUM_TAGS, + + // Returned when a known tag was deliberately not read. This value is + // never saved and can safely be changed at any point. + TAG_SKIP }; enum tag_file_type // file types supported by tag system @@ -184,7 +188,7 @@ inline enm unmarshallEnum(writer& wr) * Tag interface * *********************************************************************** */ -tag_type tag_read(FILE* inf, char minorVersion); +tag_type tag_read(FILE* inf, char minorVersion, char expected_tags[NUM_TAGS]); void tag_write(tag_type tagID, FILE* outf); void tag_set_expected(char tags[], int fileType); void tag_missing(int tag, char minorVersion); |