make display effect code reusable and move it to display.c

This commit is contained in:
nhmall
2019-06-08 23:19:29 -04:00
parent ea9a385d67
commit 54d24d0333
3 changed files with 28 additions and 13 deletions

View File

@@ -1067,6 +1067,28 @@ int x, y;
} /* end case */
}
/*
* flash_glyph_at(x, y, glyph)
*
* Briefly flash between the passed glyph and the glyph that's
* meant to be at the location.
*/
void
flash_glyph_at(x, y, tg)
int x, y, tg;
{
int i, glyph[2];
glyph[0] = tg;
glyph[1] = glyph_at(x, y);
for (i = 0; i < 15; i++) {
show_glyph(x, y, glyph[i % 2]);
flush_screen(1);
delay_output();
}
newsym(x, y);
}
/*
* swallowed()
*