From 61cae4a761c2f72cda44ae269c7007b37a0c14a7 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 26 Jun 2008 10:39:39 +0000 Subject: Misc. minor cleanups. (Yes, a huge amount of them but still...) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/cloud.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/cloud.cc') diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc index 324b4c76e8..daaa238c0e 100644 --- a/crawl-ref/source/cloud.cc +++ b/crawl-ref/source/cloud.cc @@ -298,17 +298,19 @@ void place_cloud(cloud_type cl_type, int ctarget_x, bool is_opaque_cloud(unsigned char cloud_idx) { - if ( cloud_idx == EMPTY_CLOUD ) - return false; + 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) ); + return (ctype == CLOUD_BLACK_SMOKE + || ctype >= CLOUD_GREY_SMOKE && ctype <= CLOUD_STEAM); } cloud_type cloud_type_at(const coord_def &c) { const int cloudno = env.cgrid(c); - return (cloudno == EMPTY_CLOUD? CLOUD_NONE : env.cloud[cloudno].type); + return (cloudno == EMPTY_CLOUD ? CLOUD_NONE + : env.cloud[cloudno].type); } cloud_type random_smoke_type() @@ -675,16 +677,16 @@ void place_fog_machine(fog_machine_data data, int x, int y) bool valid_fog_machine_data(fog_machine_data data) { if (data.fm_type < FM_GEYSER || data.fm_type >= NUM_FOG_MACHINE_TYPES) - return false; + return (false); if (data.cl_type <= CLOUD_NONE || (data.cl_type >= CLOUD_RANDOM && data.cl_type != CLOUD_DEBUGGING)) - return false; + return (false); if (data.size < 1 || data.power < 1) - return false; + return (false); - return true; + return (true); } int num_fogs_for_place(int level_number, const level_id &place) -- cgit v1.2.3-54-g00ecf