git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@621 c06c8d41-db1a-0410-9941-cceddc491573
T4IH76FA5TWHFOZUJFHLQXQJENJHWTUZZP4EGNA7D4GTZY7D4ZKAC
XP3TQISCLEST3ZNTF6OZ6FYMHIIPMVTNVBIIG47LA5PS7J234SQAC
MSQI3TH6T62JAXQGLL52QZCWAMC372TGB6ZNNRDGUGMJKBNNV2VAC
IPXXB4VRVZWOU5DKQ5ZTD37LS3QNK2R6APNZUO672YEEJT6OFAYQC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
5ASC3STDYCNLZFEBN6UTMUCGDETHBR2OCBZCF5VIAZ5RRWLOTDYQC
547JREUJXTZNYVGHNNAET5F5O5JYYGNTDQB6ABZNT7YX5EY64OHAC
GACH6PWPGGUBEE7PFEPQMOZKSR7HTQGL2WLGF2AQPJD3FCCSKZNQC
PJDC24L7LXX6NZ7J5P7MNJJHAKQDJQEBV4CMDR4VSXLMWRIBMNKQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
unsigned char branch; // The branch in which the level is.
int depth; // What depth (in this branch - starting from 1)
// this level is.
level_id() : branch(0), depth(-1) { }
public:
int branch; // The branch in which the level is.
int depth; // What depth (in this branch - starting from 1)
int level_type;
level_id(unsigned char br, int dep) : branch(br), depth(dep) { }
public:
level_id() : branch(0), depth(-1), level_type(LEVEL_DUNGEON) { }
level_id(int br, int dep, int ltype = LEVEL_DUNGEON)
: branch(br), depth(dep), level_type(ltype)
{
if (level_type != LEVEL_DUNGEON)
branch = depth = -1;
}
level_id(int ltype) : branch(-1), depth(-1), level_type(ltype) { }
level_id clid(branch, subdungeon_depth(branch, depth));
std::string lplace = "{" + short_place_name(clid) + "}";
for (c_stashes::const_iterator iter = stashes.begin();
std::string lplace = "{" + place.describe() + "}";
for (stashes_t::const_iterator iter = stashes.begin();
std::vector<LevelStashes>::iterator iter = levels.begin();
for ( ; iter != levels.end() && !iter->isBelowPlayer(); iter++)
{
if (iter->isCurrent()) return *iter;
}
if (iter == levels.end())
levels.push_back(LevelStashes());
else
levels.insert(iter, LevelStashes());
return get_current_level();
return (levels[level_id::current()]);
}
LevelStashes *StashTracker::find_level(const level_id &id)
{
stash_levels_t::iterator i = levels.find(id);
return (i != levels.end()? &i->second : NULL);
std::vector<LevelStashes>::iterator iter = levels.begin();
for ( ; iter != levels.end() && !iter->isBelowPlayer(); iter++)
{
if (iter->isCurrent()) return &*iter;
}
return (NULL);
return find_level(level_id::current());
if (!determine_version(charf, majorVersion, minorVersion))
goto done_reading_character;
if (determine_version(charf, majorVersion, minorVersion)
&& majorVersion == SAVE_MAJOR_VERSION)
{
restore_tagged_file(charf, TAGTYPE_PLAYER_NAME, minorVersion);
fromfile = you;
you = backup;
}
if (majorVersion != SAVE_MAJOR_VERSION)
goto done_reading_character;
restore_tagged_file(charf, TAGTYPE_PLAYER_NAME, minorVersion);
fromfile = you;
you = backup;
done_reading_character:
// Uncomment to prevent Crawl from looking for a list of saves when
// asking the player to enter a name. This can speed up startup
// considerably if you have a lot of saves lying around (even more so
// if the saves are zipped).
//
// #define DISABLE_SAVEGAME_LISTS
// Uncomment to prevent Crawl from remembering startup preferences.
//
// #define DISABLE_STICKY_STARTUP_OPTIONS