git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@888 c06c8d41-db1a-0410-9941-cceddc491573
FEGNPOJI2SALUA2PVIXIQ2CIXFLSXD7UB7CNUSAAKV4L3POXCRFQC
YAAJ6PTN6QUSWE52URI5AENOGD366FIHOIFUOXFUJLVZYE4OG6HQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
TJRYL3NXPW5IUGEV3YOC7JYWEXCZDBFPLT4AUG4P227WVKVB72ZAC
RLL3KTSFFND4BVYIEJ4XVK74DPF5E3K77M6SOYQPURIKLU77HE5QC
// x and y offsets in the following order:
// SW, S, SE, W, E, NW, N, NE
static const char xcomp[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1 };
static const char ycomp[9] = { 1, 1, 1, 0, 0, 0, -1, -1, -1 };
// [dshaligram] Removed . and 5 from dirchars so it's easier to
// special case them.
static const char dirchars[19] = { "b1j2n3h4bbl6y7k8u9" };
static const char *aim_prompt = "Aim (move cursor or -/+, change mode with CTRL-F, select with . or >)";
static const char *aim_prompt = "Aim (move cursor or -/+, change mode with CTRL-F, select with . or !)";
//---------------------------------------------------------------
//
// direction
//
// use restrict == DIR_DIR to allow only a compass direction;
// == DIR_TARGET to allow only choosing a square;
// == DIR_NONE to allow either.
//
// outputs: dist structure:
//
// isValid a valid target or direction was chosen
// isCancel player hit 'escape'
// isTarget targetting was used
// tx,ty target x,y or logical beam extension to
// edge of map if keypad direction used.
// dx,dy direction delta if keypad used {-1,0,1}
//
// SYNOPSIS:
//
// gets a direction, or any of the follwing:
//
// * go to targetting mode
// +,= go to targetting mode, next monster
// - " , prev monster
// t,p,f auto-select previous target
//
//
//---------------------------------------------------------------
//---------------------------------------------------------------
//
// direction
//
// use restrict == DIR_DIR to allow only a compass direction;
// == DIR_TARGET to allow only choosing a square;
// == DIR_NONE to allow either.
//
// outputs: dist structure:
//
// isValid a valid target or direction was chosen
// isCancel player hit 'escape'
// isTarget targetting was used
// isEndpoint player wants the ray to stop on the dime
// tx,ty target x,y
// dx,dy direction delta for DIR_DIR
//
//---------------------------------------------------------------