branch instead of only up and down in the current branch. Wizmode &d, &u remains unchanged, although you can also hit &"> and &"< to do the same thing.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@946 c06c8d41-db1a-0410-9941-cceddc491573
ZHFUXYUHS6V47WK2NRH7OU6RX77NRKTXOZC3MND2GG7PEEWSGFTAC
5UVDIVD4NSXA52U4QMQIVST3GSZJ2A2YZK3RUEXKPM43YVQ7LI5AC
GCIZIUXO5TYROKDUYB3HAY7H7MRDTJNM7HR7DGSH7KXDIZC2LCDAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
5ASC3STDYCNLZFEBN6UTMUCGDETHBR2OCBZCF5VIAZ5RRWLOTDYQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
GACH6PWPGGUBEE7PFEPQMOZKSR7HTQGL2WLGF2AQPJD3FCCSKZNQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
enum translevel_prompt_flags
{
TPF_NO_FLAGS = 0,
TPF_ALLOW_WAYPOINTS = 0x1,
TPF_ALLOW_UPDOWN = 0x2,
TPF_REMEMBER_TARGET = 0x4,
TPF_SHOW_ALL_BRANCHES = 0x8,
TPF_DEFAULT_OPTIONS = TPF_ALLOW_WAYPOINTS | TPF_ALLOW_UPDOWN
| TPF_REMEMBER_TARGET
};
level_pos prompt_translevel_target(int prompt_flags = TPF_DEFAULT_OPTIONS);
snprintf(buf, sizeof buf, "(%c) %-14s ",
branches[br[i]].travel_shortcut,
branches[br[i]].shortname);
line += buf;
line += make_stringf("(%c) %-14s ",
branches[br[i]].travel_shortcut,
branches[br[i]].shortname);
static void wizard_go_to_level(const level_pos &pos)
{
const int abs_depth = absdungeon_depth(pos.id.branch, pos.id.depth);
const int stair_taken =
abs_depth > you.your_level? DNGN_STONE_STAIRS_DOWN_I
: DNGN_STONE_STAIRS_UP_I;
const int old_level = you.your_level;
const int old_where = you.where_are_you;
const bool was_a_labyrinth = you.level_type == LEVEL_LABYRINTH;
you.level_type = LEVEL_DUNGEON;
you.where_are_you = pos.id.branch;
you.your_level = abs_depth;
load(stair_taken, LOAD_ENTER_LEVEL, was_a_labyrinth, old_level, old_where);
save_game_state();
new_level();
viewwindow(1, true);
// Tell the travel code that we're now on a new level
init_new_level(true);
}
void wizard_interlevel_travel()
{
const level_pos pos =
prompt_translevel_target(TPF_ALLOW_UPDOWN | TPF_SHOW_ALL_BRANCHES);
if (pos.id.depth < 1 || pos.id.depth > branches[pos.id.branch].depth)
{
canned_msg(MSG_OK);
return;
}
wizard_go_to_level(pos);
}