summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/cloud.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/cloud.cc')
-rw-r--r--crawl-ref/source/cloud.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc
index 43fc2ee1c6..8ecfa7b158 100644
--- a/crawl-ref/source/cloud.cc
+++ b/crawl-ref/source/cloud.cc
@@ -264,3 +264,12 @@ void place_cloud(int cl_type, int ctarget_x,
}
}
} // end place_cloud();
+
+bool is_opaque_cloud(unsigned char cloud_idx)
+{
+ if ( cloud_idx == EMPTY_CLOUD )
+ return false;
+ const int ctype = env.cloud[cloud_idx].type;
+ return ( ctype == CLOUD_BLACK_SMOKE ||
+ (ctype >= CLOUD_GREY_SMOKE && ctype <= CLOUD_STEAM) );
+}