From: nhmall Date: Sun, 9 Jun 2019 13:45:14 +0000 (-0400) Subject: Merge branch 'NetHack-3.6' X-Git-Tag: NetHack-3.7.0_WIP~378 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=797579399cdf14c75fd7cfb71f3e12c77aea3bea;p=nethack Merge branch 'NetHack-3.6' --- 797579399cdf14c75fd7cfb71f3e12c77aea3bea diff --cc src/display.c index f650fc49c,8f7207ad9..8da876c66 --- a/src/display.c +++ b/src/display.c @@@ -1074,21 -1074,24 +1074,24 @@@ int x, y * meant to be at the location. */ void - flash_glyph_at(x, y, tg) - int x, y, tg; + flash_glyph_at(x, y, tg, rpt) + int x, y; + int tg, rpt; { - int i, glyph[2]; - - glyph[0] = tg; - glyph[1] = (g.level.flags.hero_memory) - ? levl[x][y].glyph - : back_to_glyph(x, y); - for (i = 0; i < 15; i++) { - show_glyph(x, y, glyph[i % 2]); - flush_screen(1); - delay_output(); - } - newsym(x, y); + int i, glyph[2]; + + rpt *= 2; /* two loop iterations per 'count' */ + glyph[0] = tg; - glyph[1] = (level.flags.hero_memory) ? levl[x][y].glyph ++ glyph[1] = (g.level.flags.hero_memory) ? levl[x][y].glyph + : back_to_glyph(x, y); + /* even iteration count (guaranteed) ends with glyph[1] showing; + caller might want to override that, but no newsym() calls here + in case caller has tinkered with location visibility */ + for (i = 0; i < rpt; i++) { + show_glyph(x, y, glyph[i % 2]); + flush_screen(1); + delay_output(); + } } /*