summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 16:32:21 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 16:32:21 +0000
commit7da71d18a7403dcd95b2e57370dc26bf1274f436 (patch)
tree9620f6d29ccce6bb1446e002ff59293c66f85d27 /crawl-ref/source/view.cc
parent494e955621e1c6c759d54c65daafc8cecc030645 (diff)
downloadcrawl-ref-7da71d18a7403dcd95b2e57370dc26bf1274f436.tar.gz
crawl-ref-7da71d18a7403dcd95b2e57370dc26bf1274f436.zip
Add miscellaneous minor cleanups to prepare for the introduction of
Yred's injury mirroring: move the routine to make a visible monster flash a particular color into its own function, add an integer-based square root function based on Newton's method to stuff.cc, and adjust prayer lengths for Zin (1 turn), Yred (20 turns), Ely (same as Yred), and all gods who ignore prayers (same as Zin). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6982 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 67a1b11393..ba78faa667 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -4736,6 +4736,28 @@ void view_update_at(const coord_def &pos)
#endif
}
+#ifndef USE_TILE
+void flash_monster_colour(const monsters *mon, unsigned char fmc_colour,
+ int fmc_delay)
+{
+ if (mons_near(mon) && player_monster_visible(mon))
+ {
+ unsigned char old_flash_colour = you.flash_colour;
+ coord_def c(mon->pos());
+
+ you.flash_colour = fmc_colour;
+ view_update_at(c);
+
+ update_screen();
+ delay(fmc_delay);
+
+ you.flash_colour = old_flash_colour;
+ view_update_at(c);
+ update_screen();
+ }
+}
+#endif
+
bool view_update()
{
if (you.num_turns > you.last_view_update)