miscellaneous formatting
This commit is contained in:
213
src/cmd.c
213
src/cmd.c
@@ -2756,133 +2756,198 @@ int final;
|
||||
#define ISCTRL(c) ((uchar)(c) < 0x20)
|
||||
#define UNCTRL(c) (ISCTRL(c) ? (0x60 | (c)) : (c))
|
||||
|
||||
/* ordered by command name */
|
||||
struct ext_func_tab extcmdlist[] = {
|
||||
{ '#', "#", "perform an extended command", doextcmd, IFBURIED|GENERALCMD },
|
||||
{ M('?'), "?", "get this list of extended commands", doextlist, IFBURIED|AUTOCOMPLETE|GENERALCMD },
|
||||
{ M('a'), "adjust", "adjust inventory letters", doorganize, IFBURIED|AUTOCOMPLETE },
|
||||
{ M('A'), "annotate", "name current level", donamelevel, IFBURIED|AUTOCOMPLETE },
|
||||
{ 'a', "apply", "apply (use) a tool (pick-axe, key, lamp...)", doapply },
|
||||
{ C('x'), "attributes", "show your attributes", doattributes, IFBURIED },
|
||||
{ '@', "autopickup", "toggle the pickup option on/off", dotogglepickup, IFBURIED },
|
||||
{ '#', "#", "perform an extended command",
|
||||
doextcmd, IFBURIED | GENERALCMD },
|
||||
{ M('?'), "?", "get this list of extended commands",
|
||||
doextlist, IFBURIED | AUTOCOMPLETE | GENERALCMD },
|
||||
{ M('a'), "adjust", "adjust inventory letters",
|
||||
doorganize, IFBURIED | AUTOCOMPLETE },
|
||||
{ M('A'), "annotate", "name current level",
|
||||
donamelevel, IFBURIED | AUTOCOMPLETE },
|
||||
{ 'a', "apply", "apply (use) a tool (pick-axe, key, lamp...)",
|
||||
doapply },
|
||||
{ C('x'), "attributes", "show your attributes",
|
||||
doattributes, IFBURIED },
|
||||
{ '@', "autopickup", "toggle the pickup option on/off",
|
||||
dotogglepickup, IFBURIED },
|
||||
{ 'C', "call", "call (name) something", docallcmd, IFBURIED },
|
||||
{ 'Z', "cast", "zap (cast) a spell", docast, IFBURIED },
|
||||
{ M('c'), "chat", "talk to someone", dotalk, IFBURIED|AUTOCOMPLETE },
|
||||
{ M('c'), "chat", "talk to someone", dotalk, IFBURIED | AUTOCOMPLETE },
|
||||
{ 'c', "close", "close a door", doclose },
|
||||
{ M('C'), "conduct", "list voluntary challenges you have maintained", doconduct, IFBURIED|AUTOCOMPLETE },
|
||||
{ M('C'), "conduct", "list voluntary challenges you have maintained",
|
||||
doconduct, IFBURIED | AUTOCOMPLETE },
|
||||
{ M('d'), "dip", "dip an object into something", dodip, AUTOCOMPLETE },
|
||||
{ '>', "down", "go down a staircase", dodown },
|
||||
{ 'd', "drop", "drop an item", dodrop },
|
||||
{ 'D', "droptype", "drop specific item types", doddrop },
|
||||
{ 'e', "eat", "eat something", doeat },
|
||||
{ 'E', "engrave", "engrave writing on the floor", doengrave },
|
||||
{ M('e'), "enhance", "advance or check weapon and spell skills", enhance_weapon_skill, IFBURIED|AUTOCOMPLETE },
|
||||
{ '\0', "exploremode", "enter explore (discovery) mode", enter_explore_mode, IFBURIED },
|
||||
{ M('e'), "enhance", "advance or check weapon and spell skills",
|
||||
enhance_weapon_skill, IFBURIED | AUTOCOMPLETE },
|
||||
{ '\0', "exploremode", "enter explore (discovery) mode",
|
||||
enter_explore_mode, IFBURIED },
|
||||
{ 'f', "fire", "fire ammunition from quiver", dofire },
|
||||
{ M('f'), "force", "force a lock", doforce, AUTOCOMPLETE },
|
||||
{ ';', "glance", "show what type of thing a map symbol corresponds to", doquickwhatis, IFBURIED|GENERALCMD },
|
||||
{ '?', "help", "give a help message", dohelp, IFBURIED|GENERALCMD },
|
||||
{ 'V', "history", "show long version and game history", dohistory, IFBURIED|GENERALCMD },
|
||||
{ ';', "glance", "show what type of thing a map symbol corresponds to",
|
||||
doquickwhatis, IFBURIED | GENERALCMD },
|
||||
{ '?', "help", "give a help message", dohelp, IFBURIED | GENERALCMD },
|
||||
{ 'V', "history", "show long version and game history",
|
||||
dohistory, IFBURIED | GENERALCMD },
|
||||
{ 'i', "inventory", "show your inventory", ddoinv, IFBURIED },
|
||||
{ 'I', "inventtype", "inventory specific item types", dotypeinv, IFBURIED },
|
||||
{ M('i'), "invoke", "invoke an object's special powers", doinvoke, IFBURIED|AUTOCOMPLETE },
|
||||
{ 'I', "inventtype", "inventory specific item types",
|
||||
dotypeinv, IFBURIED },
|
||||
{ M('i'), "invoke", "invoke an object's special powers",
|
||||
doinvoke, IFBURIED | AUTOCOMPLETE },
|
||||
{ M('j'), "jump", "jump to another location", dojump, AUTOCOMPLETE },
|
||||
{ C('d'), "kick", "kick something", dokick },
|
||||
{ '\\', "known", "show what object types have been discovered", dodiscovered, IFBURIED|GENERALCMD },
|
||||
{ '`', "knownclass", "show discovered types for one class of objects", doclassdisco, IFBURIED|GENERALCMD },
|
||||
{ '\0', "levelchange", "change experience level", wiz_level_change, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "lightsources", "show mobile light sources", wiz_light_sources, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\\', "known", "show what object types have been discovered",
|
||||
dodiscovered, IFBURIED | GENERALCMD },
|
||||
{ '`', "knownclass", "show discovered types for one class of objects",
|
||||
doclassdisco, IFBURIED|GENERALCMD },
|
||||
{ '\0', "levelchange", "change experience level",
|
||||
wiz_level_change, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "lightsources", "show mobile light sources",
|
||||
wiz_light_sources, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ ':', "look", "look at what is here", dolook, IFBURIED },
|
||||
{ M('l'), "loot", "loot a box on the floor", doloot, AUTOCOMPLETE },
|
||||
#ifdef DEBUG_MIGRATING_MONS
|
||||
{ '\0', "migratemons", "migrate n random monsters", wiz_migrate_mons, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "migratemons", "migrate N random monsters",
|
||||
wiz_migrate_mons, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
#endif
|
||||
{ '\0', "monpolycontrol", "control monster polymorphs", wiz_mon_polycontrol, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ M('m'), "monster", "use a monster's special ability", domonability, IFBURIED|AUTOCOMPLETE },
|
||||
{ 'N', "name", "name a monster or an object", docallcmd, IFBURIED|AUTOCOMPLETE },
|
||||
{ M('o'), "offer", "offer a sacrifice to the gods", dosacrifice, AUTOCOMPLETE },
|
||||
{ '\0', "monpolycontrol", "control monster polymorphs",
|
||||
wiz_mon_polycontrol, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ M('m'), "monster", "use monster's special ability",
|
||||
domonability, IFBURIED | AUTOCOMPLETE },
|
||||
{ 'N', "name", "name a monster or an object",
|
||||
docallcmd, IFBURIED | AUTOCOMPLETE },
|
||||
{ M('o'), "offer", "offer a sacrifice to the gods",
|
||||
dosacrifice, AUTOCOMPLETE },
|
||||
{ 'o', "open", "open a door", doopen },
|
||||
{ 'O', "options", "show option settings, possibly change them", doset, IFBURIED|GENERALCMD },
|
||||
{ C('o'), "overview", "show a summary of the explored dungeon", dooverview, IFBURIED|AUTOCOMPLETE },
|
||||
{ '\0', "panic", "test panic routine (fatal to game)", wiz_panic, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ 'O', "options", "show option settings, possibly change them",
|
||||
doset, IFBURIED|GENERALCMD },
|
||||
{ C('o'), "overview", "show a summary of the explored dungeon",
|
||||
dooverview, IFBURIED|AUTOCOMPLETE },
|
||||
{ '\0', "panic", "test panic routine (fatal to game)",
|
||||
wiz_panic, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ 'p', "pay", "pay your shopping bill", dopay },
|
||||
{ ',', "pickup", "pick up things at the current location", dopickup },
|
||||
{ '\0', "polyself", "polymorph self", wiz_polyself, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "polyself", "polymorph self",
|
||||
wiz_polyself, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
#ifdef PORT_DEBUG
|
||||
{ '\0', "portdebug", "wizard port debug command", wiz_port_debug, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "portdebug", "wizard port debug command",
|
||||
wiz_port_debug, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
#endif
|
||||
{ M('p'), "pray", "pray to the gods for help", dopray, IFBURIED|AUTOCOMPLETE },
|
||||
{ C('p'), "prevmsg", "toggle through previously displayed game messages", doprev_message, IFBURIED|GENERALCMD },
|
||||
{ M('p'), "pray", "pray to the gods for help",
|
||||
dopray, IFBURIED | AUTOCOMPLETE },
|
||||
{ C('p'), "prevmsg", "view recent game messages",
|
||||
doprev_message, IFBURIED|GENERALCMD },
|
||||
{ 'P', "puton", "put on an accessory (ring, amulet, etc)", doputon },
|
||||
{ 'q', "quaff", "quaff (drink) something", dodrink },
|
||||
{ M('q'), "quit", "exit without saving current game", done2, IFBURIED|AUTOCOMPLETE|GENERALCMD },
|
||||
{ M('q'), "quit", "exit without saving current game",
|
||||
done2, IFBURIED | AUTOCOMPLETE | GENERALCMD },
|
||||
{ 'Q', "quiver", "select ammunition for quiver", dowieldquiver },
|
||||
{ 'r', "read", "read a scroll or spellbook", doread },
|
||||
{ C('r'), "redraw", "redraw screen", doredraw, IFBURIED|GENERALCMD },
|
||||
{ C('r'), "redraw", "redraw screen", doredraw, IFBURIED | GENERALCMD },
|
||||
{ 'R', "remove", "remove an accessory (ring, amulet, etc)", doremring },
|
||||
{ M('R'), "ride", "mount or dismount a saddled steed", doride, AUTOCOMPLETE },
|
||||
{ M('R'), "ride", "mount or dismount a saddled steed",
|
||||
doride, AUTOCOMPLETE },
|
||||
{ M('r'), "rub", "rub a lamp or a stone", dorub, AUTOCOMPLETE },
|
||||
{ 'S', "save", "save the game", dosave, IFBURIED|GENERALCMD },
|
||||
{ 's', "search", "search for traps and secret doors", dosearch, IFBURIED, "searching" },
|
||||
{ 'S', "save", "save the game and exit", dosave, IFBURIED | GENERALCMD },
|
||||
{ 's', "search", "search for traps and secret doors",
|
||||
dosearch, IFBURIED, "searching" },
|
||||
{ '*', "seeall", "show all equipment in use", doprinuse, IFBURIED },
|
||||
{ AMULET_SYM, "seeamulet", "show the amulet currently worn", dopramulet, IFBURIED },
|
||||
{ ARMOR_SYM, "seearmor", "show the armor currently worn", doprarm, IFBURIED },
|
||||
{ AMULET_SYM, "seeamulet", "show the amulet currently worn",
|
||||
dopramulet, IFBURIED },
|
||||
{ ARMOR_SYM, "seearmor", "show the armor currently worn",
|
||||
doprarm, IFBURIED },
|
||||
{ GOLD_SYM, "seegold", "count your gold", doprgold, IFBURIED },
|
||||
{ '\0', "seenv", "show seen vectors", wiz_show_seenv, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ RING_SYM, "seerings", "show the ring(s) currently worn", doprring, IFBURIED },
|
||||
{ SPBOOK_SYM, "seespells", "list and reorder known spells", dovspell, IFBURIED },
|
||||
{ TOOL_SYM, "seetools", "show the tools currently in use", doprtool, IFBURIED },
|
||||
{ '^', "seetrap", "show the type of a trap", doidtrap, IFBURIED },
|
||||
{ WEAPON_SYM, "seeweapon", "show the weapon currently wielded", doprwep, IFBURIED },
|
||||
{ '\0', "seenv", "show seen vectors",
|
||||
wiz_show_seenv, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ RING_SYM, "seerings", "show the ring(s) currently worn",
|
||||
doprring, IFBURIED },
|
||||
{ SPBOOK_SYM, "seespells", "list and reorder known spells",
|
||||
dovspell, IFBURIED },
|
||||
{ TOOL_SYM, "seetools", "show the tools currently in use",
|
||||
doprtool, IFBURIED },
|
||||
{ '^', "seetrap", "show the type of adjacent trap", doidtrap, IFBURIED },
|
||||
{ WEAPON_SYM, "seeweapon", "show the weapon currently wielded",
|
||||
doprwep, IFBURIED },
|
||||
#ifdef SHELL
|
||||
{ '!', "shell", "do a shell escape", dosh, IFBURIED|GENERALCMD },
|
||||
{ '!', "shell", "do a shell escape", dosh, IFBURIED | GENERALCMD },
|
||||
#endif /* SHELL */
|
||||
{ M('s'), "sit", "sit down", dosit, AUTOCOMPLETE },
|
||||
{ '\0', "stats", "show memory statistics", wiz_show_stats, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "stats", "show memory statistics",
|
||||
wiz_show_stats, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
#ifdef SUSPEND
|
||||
{ C('z'), "suspend", "suspend the game", dosuspend_core, IFBURIED|GENERALCMD },
|
||||
{ C('z'), "suspend", "suspend the game",
|
||||
dosuspend_core, IFBURIED | GENERALCMD },
|
||||
#endif /* SUSPEND */
|
||||
{ 'x', "swap", "swap wielded and secondary weapons", doswapweapon },
|
||||
{ 'T', "takeoff", "take off one piece of armor", dotakeoff },
|
||||
{ 'A', "takeoffall", "remove all armor", doddoremarm },
|
||||
{ C('t'), "teleport", "teleport around the level", dotele, IFBURIED },
|
||||
{ '\0', "terrain", "show map without obstructions", doterrain, IFBURIED|AUTOCOMPLETE },
|
||||
{ '\0', "terrain", "show map without obstructions",
|
||||
doterrain, IFBURIED | AUTOCOMPLETE },
|
||||
{ 't', "throw", "throw something", dothrow },
|
||||
{ '\0', "timeout", "look at timeout queue", wiz_timeout_queue, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "timeout", "look at timeout queue",
|
||||
wiz_timeout_queue, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ M('T'), "tip", "empty a container", dotip, AUTOCOMPLETE },
|
||||
{ '_', "travel", "travel to a specific location on the map", dotravel },
|
||||
{ M('t'), "turn", "turn undead away", doturn, IFBURIED|AUTOCOMPLETE },
|
||||
{ 'X', "twoweapon", "toggle two-weapon combat", dotwoweapon, AUTOCOMPLETE },
|
||||
{ M('t'), "turn", "turn undead away", doturn, IFBURIED | AUTOCOMPLETE },
|
||||
{ 'X', "twoweapon", "toggle two-weapon combat",
|
||||
dotwoweapon, AUTOCOMPLETE },
|
||||
{ M('u'), "untrap", "untrap something", dountrap, AUTOCOMPLETE },
|
||||
{ '<', "up", "go up a staircase", doup },
|
||||
{ '\0', "vanquished", "list vanquished monsters", dovanquished, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ M('v'), "version", "list compile time options for this version of NetHack", doextversion, IFBURIED|AUTOCOMPLETE|GENERALCMD },
|
||||
{ 'v', "versionshort", "show version", doversion, IFBURIED|GENERALCMD },
|
||||
{ '\0', "vision", "show vision array", wiz_show_vision, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '.', "wait", "rest one move while doing nothing", donull, IFBURIED, "waiting" },
|
||||
{ '\0', "vanquished", "list vanquished monsters",
|
||||
dovanquished, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ M('v'), "version",
|
||||
"list compile time options for this version of NetHack",
|
||||
doextversion, IFBURIED | AUTOCOMPLETE | GENERALCMD },
|
||||
{ 'v', "versionshort", "show version", doversion, IFBURIED | GENERALCMD },
|
||||
{ '\0', "vision", "show vision array",
|
||||
wiz_show_vision, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '.', "wait", "rest one move while doing nothing",
|
||||
donull, IFBURIED, "waiting" },
|
||||
{ 'W', "wear", "wear a piece of armor", dowear },
|
||||
{ '&', "whatdoes", "tell what a command does", dowhatdoes, IFBURIED },
|
||||
{ '/', "whatis", "show what type of thing a symbol corresponds to", dowhatis, IFBURIED|GENERALCMD },
|
||||
{ '/', "whatis", "show what type of thing a symbol corresponds to",
|
||||
dowhatis, IFBURIED | GENERALCMD },
|
||||
{ 'w', "wield", "wield (put in use) a weapon", dowield },
|
||||
{ M('w'), "wipe", "wipe off your face", dowipe, AUTOCOMPLETE },
|
||||
#ifdef DEBUG
|
||||
{ '\0', "wizdebug_bury", "wizard debug: bury objs under and around you", wiz_debug_cmd_bury, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wizdebug_traveldisplay", "wizard debug: toggle travel display", wiz_debug_cmd_traveldisplay, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wizdebug_bury", "wizard debug: bury objs under and around you",
|
||||
wiz_debug_cmd_bury, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "wizdebug_traveldisplay", "wizard debug: toggle travel display",
|
||||
wiz_debug_cmd_traveldisplay, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
#endif
|
||||
{ C('e'), "wizdetect", "search a room", wiz_detect, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ C('g'), "wizgenesis", "create a monster", wiz_genesis, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ C('i'), "wizidentify", "identify all items in inventory", wiz_identify, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wizintrinsic", "set intrinsic", wiz_intrinsic, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ C('v'), "wizlevelport", "teleport to another level", wiz_level_tele, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wizmakemap", "recreate the current level", wiz_makemap, IFBURIED|WIZMODECMD },
|
||||
{ C('f'), "wizmap", "map the level", wiz_map, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wizsmell", "smell monster", wiz_smell, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wizwhere", "show locations of special levels", wiz_where, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ C('w'), "wizwish", "wish for something", wiz_wish, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ '\0', "wmode", "show wall modes", wiz_show_wmodes, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||
{ C('e'), "wizdetect", "reveal hidden things within a small radius",
|
||||
wiz_detect, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ C('g'), "wizgenesis", "create a monster",
|
||||
wiz_genesis, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ C('i'), "wizidentify", "identify all items in inventory",
|
||||
wiz_identify, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "wizintrinsic", "set an intrinsic",
|
||||
wiz_intrinsic, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ C('v'), "wizlevelport", "teleport to another level",
|
||||
wiz_level_tele, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "wizmakemap", "recreate the current level",
|
||||
wiz_makemap, IFBURIED | WIZMODECMD },
|
||||
{ C('f'), "wizmap", "map the level",
|
||||
wiz_map, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "wizrumorcheck", "verify rumor boundaries",
|
||||
wiz_rumor_check, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "wizsmell", "smell monster",
|
||||
wiz_smell, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "wizwhere", "show locations of special levels",
|
||||
wiz_where, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ C('w'), "wizwish", "wish for something",
|
||||
wiz_wish, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ '\0', "wmode", "show wall modes",
|
||||
wiz_show_wmodes, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
|
||||
{ 'z', "zap", "zap a wand", dozap },
|
||||
|
||||
{ '\0', (char *)0, (char *)0, donull } /* sentinel */
|
||||
{ '\0', (char *) 0, (char *) 0, donull, 0, (char *) 0 } /* sentinel */
|
||||
};
|
||||
|
||||
const char *
|
||||
|
||||
33
src/detect.c
33
src/detect.c
@@ -25,7 +25,8 @@ STATIC_DCL void FDECL(show_map_spot, (int, int));
|
||||
STATIC_PTR void FDECL(findone, (int, int, genericptr_t));
|
||||
STATIC_PTR void FDECL(openone, (int, int, genericptr_t));
|
||||
STATIC_DCL int FDECL(mfind0, (struct monst *, BOOLEAN_P));
|
||||
STATIC_DCL int FDECL(reveal_terrain_getglyph, (int, int, int, unsigned, int, int));
|
||||
STATIC_DCL int FDECL(reveal_terrain_getglyph, (int, int, int,
|
||||
unsigned, int, int));
|
||||
|
||||
/* bring hero out from underwater or underground or being engulfed;
|
||||
return True iff any change occurred */
|
||||
@@ -1717,8 +1718,8 @@ sokoban_detect()
|
||||
}
|
||||
|
||||
STATIC_DCL int
|
||||
reveal_terrain_getglyph(x,y, full, swallowed, default_glyph, which_subset)
|
||||
int x,y, full;
|
||||
reveal_terrain_getglyph(x, y, full, swallowed, default_glyph, which_subset)
|
||||
int x, y, full;
|
||||
unsigned swallowed;
|
||||
int default_glyph, which_subset;
|
||||
{
|
||||
@@ -1734,17 +1735,15 @@ int default_glyph, which_subset;
|
||||
otherwise what the hero remembers for seen locations with
|
||||
monsters, objects, and/or traps removed as caller dictates */
|
||||
seenv = (full || level.flags.hero_memory)
|
||||
? levl[x][y].seenv : cansee(x, y) ? SVALL : 0;
|
||||
? levl[x][y].seenv : cansee(x, y) ? SVALL : 0;
|
||||
if (full) {
|
||||
levl[x][y].seenv = SVALL;
|
||||
glyph = back_to_glyph(x, y);
|
||||
levl[x][y].seenv = seenv;
|
||||
} else {
|
||||
levl_glyph = level.flags.hero_memory
|
||||
? levl[x][y].glyph
|
||||
: seenv
|
||||
? back_to_glyph(x, y)
|
||||
: default_glyph;
|
||||
? levl[x][y].glyph
|
||||
: seenv ? back_to_glyph(x, y): default_glyph;
|
||||
/* glyph_at() returns the displayed glyph, which might
|
||||
be a monster. levl[][].glyph contains the remembered
|
||||
glyph, which will never be a monster (unless it is
|
||||
@@ -1777,14 +1776,13 @@ int default_glyph, which_subset;
|
||||
&& mtmp->m_ap_type == M_AP_FURNITURE) {
|
||||
glyph = cmap_to_glyph(mtmp->mappearance);
|
||||
} else {
|
||||
/* we have a topology type but we want a
|
||||
screen symbol in order to derive a glyph;
|
||||
some screen symbols need the flags field
|
||||
of levl[][] in addition to the type
|
||||
(to disambiguate STAIRS to S_upstair or
|
||||
S_dnstair, for example; current flags
|
||||
might not be intended for remembered
|
||||
type, but we've got no other choice) */
|
||||
/* we have a topology type but we want a screen
|
||||
symbol in order to derive a glyph; some screen
|
||||
symbols need the flags field of levl[][] in
|
||||
addition to the type (to disambiguate STAIRS to
|
||||
S_upstair or S_dnstair, for example; current
|
||||
flags might not be intended for remembered type,
|
||||
but we've got no other choice) */
|
||||
schar save_typ = levl[x][y].typ;
|
||||
|
||||
levl[x][y].typ = lastseentyp[x][y];
|
||||
@@ -1803,7 +1801,7 @@ void
|
||||
dump_map()
|
||||
{
|
||||
int x, y, glyph;
|
||||
int subset = TER_MAP|TER_TRP|TER_OBJ|TER_MON;
|
||||
int subset = TER_MAP | TER_TRP | TER_OBJ | TER_MON;
|
||||
int default_glyph = cmap_to_glyph(level.flags.arboreal ? S_tree : S_stone);
|
||||
char buf[BUFSZ];
|
||||
|
||||
@@ -1811,6 +1809,7 @@ dump_map()
|
||||
for (x = 1; x < COLNO; x++) {
|
||||
int ch, color;
|
||||
unsigned special;
|
||||
|
||||
glyph = reveal_terrain_getglyph(x,y, FALSE, u.uswallow,
|
||||
default_glyph, subset);
|
||||
(void) mapglyph(glyph, &ch, &color, &special, x, y);
|
||||
|
||||
Reference in New Issue
Block a user