]> granicus.if.org Git - nethack/commitdiff
Merge branch 'NetHack-3.6'
authornhmall <nhmall@nethack.org>
Sun, 9 Jun 2019 13:45:14 +0000 (09:45 -0400)
committernhmall <nhmall@nethack.org>
Sun, 9 Jun 2019 13:45:14 +0000 (09:45 -0400)
1  2 
include/extern.h
src/display.c
src/read.c

Simple merge
diff --cc src/display.c
index f650fc49cc232942e9ff3244cc5fd2ef24813e17,8f7207ad950ef8754d59405af833f4e182ed4f1d..8da876c66ce6108b2a8852d1747d0daaf2b25c2b
@@@ -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();
+     }
  }
  
  /*
diff --cc src/read.c
Simple merge