summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r--crawl-ref/source/stuff.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index b9b55300eb..89ac13703f 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -1340,6 +1340,22 @@ unsigned char random_uncommon_colour()
return (result);
}
+unsigned char make_low_colour(unsigned char colour)
+{
+ if (colour >= 8 && colour <= 15)
+ return (colour - 8);
+
+ return (colour);
+}
+
+unsigned char make_high_colour(unsigned char colour)
+{
+ if (colour >= 0 && colour <= 7)
+ return (colour + 8);
+
+ return (colour);
+}
+
// returns if a colour is one of the special element colours (ie not regular)
bool is_element_colour( int col )
{