Split up Abyss/Pan/Labyrinth save files. The only practical use right now is to be able to correctly place Abyss and Pan ghosts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1295 c06c8d41-db1a-0410-9941-cceddc491573
W5VEC2PBIM5DMU5233HOWAZUEPTGWJRZZIA3H35YYQQW6BTP6XUAC ACKNLTFL2RI3PMRWLNRVLRWGQAMLRFKNGNS5LED6NFE5GVGFIHFAC LEY3EZGTCBV6CYX4L727KQ4ZXL2LZLT5WESN3WAF65VRMX4EDP4QC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC 7KWDC7XFNMBLSUO2HISIROBINZBX5T67LJEEXTAORXW2YZ7VWFGAC R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC TV3ZC6WOZKSQQJQN26JIVKCHK6UK7WMDBYZDUYRWEAZ4JB4YVNAAC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC GBUB77EAYHOFY6GQ5IY3ZSBC7FSQFZZKYNBD5QMCQFIKFLYLWHOQC 74LQ7JXVLAFSHLI7LCBKFX47CNTYSKGUQSXNX5FCIUIGCC2JTR3QC 7AMQN7MITMXBNVDAK5VOXTQ4TZIAOD6ZLOFJG7GQMBTY23Y2BKSAC ZP2KE7A2LE7Z2S7AC45WE4CXDSEVDTWIMV2EM4IBUKXYJIDU6R7QC ZHFUXYUHS6V47WK2NRH7OU6RX77NRKTXOZC3MND2GG7PEEWSGFTAC // temp level, if anyunlink( make_filename( you.your_name, 0, 0, true, false ).c_str() );
// temp levels, if anyunlink( make_filename( you.your_name, 0, 0, LEVEL_ABYSS, false ).c_str() );unlink( make_filename( you.your_name, 0, 0,LEVEL_PANDEMONIUM, false ).c_str() );unlink( make_filename( you.your_name, 0, 0,LEVEL_LABYRINTH, false ).c_str() );
m_transit_list *get_transit_list(level_id where);void add_monster_to_transit(level_id dest, const monsters &m);
m_transit_list *get_transit_list(const level_id &where);void add_monster_to_transit(const level_id &dest, const monsters &m);
unsigned char stair_find = grd[you.x_pos][you.y_pos];char old_where = you.where_are_you;bool was_a_labyrinth = false;
int stair_find = grd[you.x_pos][you.y_pos];const branch_type old_where = you.where_are_you;const bool was_a_labyrinth = you.level_type != LEVEL_DUNGEON;
if (you.level_type == LEVEL_PANDEMONIUM&& stair_find == DNGN_TRANSIT_PANDEMONIUM){was_a_labyrinth = true;}else
if (you.level_type != LEVEL_DUNGEON&& (you.level_type != LEVEL_PANDEMONIUM|| stair_find != DNGN_TRANSIT_PANDEMONIUM))
static std::string get_level_suffix(int level, int where, level_area_type lt){switch (lt){default:case LEVEL_DUNGEON:return (make_stringf("%02d%c", level, where + 'a'));case LEVEL_LABYRINTH:return ("lab");case LEVEL_ABYSS:return ("abs");case LEVEL_PANDEMONIUM:return ("pan");}}
char suffix[4], lvl[5];strcpy(suffix, (level < 10) ? "0" : "");itoa(level, lvl, 10);strcat(suffix, lvl);suffix[2] = where + 97;suffix[3] = 0;return get_savedir_filename( prefix, "", isLabyrinth ? "lab" : suffix,
return get_savedir_filename( prefix, "",get_level_suffix(level, where, ltype),
void load( unsigned char stair_taken, int load_mode, bool was_a_labyrinth,char old_level, char where_were_you2 )
void load( int stair_taken, int load_mode, bool was_a_labyrinth,int old_level, branch_type where_were_you2 )
// For monster names ending with these suffixes, we pluralize directly without
std::string apostrophise(const std::string &name){if (name.empty())return (name);const char lastc = name[ name.length() - 1 ];return (name + (lastc == 's' || lastc == 'x'? "'" : "'s"));}// For monster names ending with these suffixes, we pluralise directly without