MCPcopy Create free account
hub / github.com/NetHack/NetHack / flash_glyph_at

Function flash_glyph_at

src/display.c:1304–1321  ·  view source on GitHub ↗

* flash_glyph_at(x, y, glyph, repeatcount) * * Briefly flash between the passed glyph and the glyph that's * meant to be at the location. */

Source from the content-addressed store, hash-verified

1302 * meant to be at the location.
1303 */
1304void
1305flash_glyph_at(coordxy x, coordxy y, int tg, int rpt)
1306{
1307 int i, glyph[2];
1308
1309 rpt *= 2; /* two loop iterations per 'count' */
1310 glyph[0] = tg;
1311 glyph[1] = (svl.level.flags.hero_memory) ? levl[x][y].glyph
1312 : back_to_glyph(x, y);
1313 /* even iteration count (guaranteed) ends with glyph[1] showing;
1314 caller might want to override that, but no newsym() calls here
1315 in case caller has tinkered with location visibility */
1316 for (i = 0; i < rpt; i++) {
1317 show_glyph(x, y, glyph[i % 2]);
1318 flush_screen(1);
1319 nh_delay_output();
1320 }
1321}
1322
1323/*
1324 * swallowed()

Callers 3

detect_obj_trapsFunction · 0.85
findoneFunction · 0.85
flash_monFunction · 0.85

Calls 3

back_to_glyphFunction · 0.85
show_glyphFunction · 0.85
flush_screenFunction · 0.85

Tested by

no test coverage detected