summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/colour.cc
diff options
context:
space:
mode:
authorontoclasm <yokomeshi@gmail.com>2013-01-12 22:17:46 -0600
committerontoclasm <yokomeshi@gmail.com>2013-01-12 22:18:08 -0600
commit8968c45923a8e01dfc31f54adf431032b4ed2f90 (patch)
tree780e168acfaf2d842a0d93464a4d2012fcc41491 /crawl-ref/source/colour.cc
parent1a32ccd05a03cd6d20ed0f4c7d2b6611c5ddcb87 (diff)
downloadcrawl-ref-8968c45923a8e01dfc31f54adf431032b4ed2f90.tar.gz
crawl-ref-8968c45923a8e01dfc31f54adf431032b4ed2f90.zip
Disjunction aura tiles.
Diffstat (limited to 'crawl-ref/source/colour.cc')
-rw-r--r--crawl-ref/source/colour.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/crawl-ref/source/colour.cc b/crawl-ref/source/colour.cc
index f3034478b3..dc7c6cb4b5 100644
--- a/crawl-ref/source/colour.cc
+++ b/crawl-ref/source/colour.cc
@@ -166,7 +166,7 @@ static int _etc_waves(int, const coord_def& loc)
return CYAN;
}
-static int _etc_disjunction(int, const coord_def& loc)
+int get_disjunct_phase(const coord_def& loc)
{
static int turns = you.num_turns;
static coord_def centre = find_centre_for(loc, AREA_DISJUNCTION);
@@ -178,20 +178,25 @@ static int _etc_disjunction(int, const coord_def& loc)
}
if (centre.origin())
- return MAGENTA;
+ return 2;
int x = loc.x - centre.x;
int y = loc.y - centre.y;
double dist = sqrt(x*x + y*y);
int parity = ((int) (dist / PI) + you.frame_no / 11) % 2 ? 1 : -1;
double dir = sin(atan2(x, y)*PI + parity * you.frame_no / 3) + 1;
- switch ((int) floor(dir * 2))
+ return 1 + (int) floor(dir * 2);
+}
+
+static int _etc_disjunction(int, const coord_def& loc)
+{
+ switch (get_disjunct_phase(loc))
{
- case 0:
- return LIGHTBLUE;
case 1:
- return BLUE;
+ return LIGHTBLUE;
case 2:
+ return BLUE;
+ case 3:
return MAGENTA;
default:
return LIGHTMAGENTA;