summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/colour.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-08-27 02:23:55 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-08-27 02:23:55 +0200
commitb4c3ab02fd3fa948ef14aaddb099732e62ca1ef0 (patch)
tree045fb35db7573775c1578ab57b1f78b63a016b33 /crawl-ref/source/colour.cc
parent571e60d2acef11a585d3ead6eed4ec952f02469e (diff)
downloadcrawl-ref-b4c3ab02fd3fa948ef14aaddb099732e62ca1ef0.tar.gz
crawl-ref-b4c3ab02fd3fa948ef14aaddb099732e62ca1ef0.zip
Orb glow in tiles.
Diffstat (limited to 'crawl-ref/source/colour.cc')
-rw-r--r--crawl-ref/source/colour.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/colour.cc b/crawl-ref/source/colour.cc
index 0d4fadcfba..c95758b061 100644
--- a/crawl-ref/source/colour.cc
+++ b/crawl-ref/source/colour.cc
@@ -242,10 +242,15 @@ static int _etc_tornado(int, const coord_def& loc)
}
}
-static int _etc_orb_glow(int, const coord_def& loc)
+bool get_orb_phase(const coord_def& loc)
{
int dist = (loc - env.orb_pos).abs();
- return ((you.frame_no - dist*2/3)&4) ? LIGHTMAGENTA : MAGENTA;
+ return (you.frame_no - dist*2/3)&4;
+}
+
+static int _etc_orb_glow(int, const coord_def& loc)
+{
+ return get_orb_phase(loc) ? LIGHTMAGENTA : MAGENTA;
}
static int _etc_random(int, const coord_def&)