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

Function clear_stale_map

src/detect.c:317–331  ·  view source on GitHub ↗

* When doing detection, remove stale data from the map display (corpses * rotted away, objects carried away by monsters, etc) so that it won't * reappear after the detection has completed. Return true if noticeable * change occurs. */

Source from the content-addressed store, hash-verified

315 * change occurs.
316 */
317staticfn boolean
318clear_stale_map(char oclass, unsigned material)
319{
320 coordxy zx, zy;
321 boolean change_made = FALSE;
322
323 for (zx = 1; zx < COLNO; zx++)
324 for (zy = 0; zy < ROWNO; zy++)
325 if (check_map_spot(zx, zy, oclass, material)) {
326 unmap_object(zx, zy);
327 change_made = TRUE;
328 }
329
330 return change_made;
331}
332
333/* look for gold, on the floor or in monsters' possession */
334int

Callers 3

gold_detectFunction · 0.85
food_detectFunction · 0.85
object_detectFunction · 0.85

Calls 2

check_map_spotFunction · 0.85
unmap_objectFunction · 0.85

Tested by

no test coverage detected