MCPcopy Index your code
hub / github.com/NetHack/NetHack / browse_map

Function browse_map

src/detect.c:105–118  ·  view source on GitHub ↗

use getpos()'s 'autodescribe' to view whatever is currently shown on map */

Source from the content-addressed store, hash-verified

103
104/* use getpos()'s 'autodescribe' to view whatever is currently shown on map */
105staticfn void
106browse_map(unsigned ter_typ, const char *ter_explain)
107{
108 coord dummy_pos; /* don't care whether player actually picks a spot */
109 boolean save_autodescribe;
110
111 dummy_pos.x = u.ux, dummy_pos.y = u.uy; /* starting spot for getpos() */
112 save_autodescribe = iflags.autodescribe;
113 iflags.autodescribe = TRUE;
114 iflags.terrainmode = ter_typ;
115 (void) getpos(&dummy_pos, FALSE, ter_explain);
116 iflags.terrainmode = 0;
117 iflags.autodescribe = save_autodescribe;
118}
119
120/* extracted from monster_detection() so can be shared by do_vicinity_map() */
121staticfn void

Callers 9

gold_detectFunction · 0.85
food_detectFunction · 0.85
object_detectFunction · 0.85
monster_detectFunction · 0.85
display_trap_mapFunction · 0.85
furniture_detectFunction · 0.85
do_mappingFunction · 0.85
do_vicinity_mapFunction · 0.85
reveal_terrainFunction · 0.85

Calls 1

getposFunction · 0.85

Tested by

no test coverage detected