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/files.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/files.h')
-rw-r--r-- | crawl-ref/source/files.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/files.h b/crawl-ref/source/files.h index 9374f92d21..86f49e0479 100644 --- a/crawl-ref/source/files.h +++ b/crawl-ref/source/files.h @@ -63,9 +63,13 @@ std::string canonicalise_file_separator(const std::string &path); bool check_mkdir(const std::string &what, std::string *dir, bool silent = false); +// Find saved games for all game types. +std::vector<player_save_info> find_all_saved_characters(); + +// Find saved games for the current game type. std::vector<player_save_info> find_saved_characters(); -std::string get_savedir(); +std::string get_savefile_directory(bool ignore_game_type = false); std::string get_save_filename(const std::string &pre, const std::string &suf, const std::string &ext, @@ -74,6 +78,7 @@ std::string get_savedir_filename(const std::string &pre, const std::string &suf, const std::string &ext, bool suppress_uid = false); +std::string get_base_savedir_path(const std::string &subpath = ""); std::string get_savedir_path(const std::string &shortpath); std::string savedir_versioned_path(const std::string &subdirs = ""); std::string get_prefs_filename(); |