summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-21 12:37:25 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-21 12:37:25 -0600
commit4277eaea5e02fb69d64193a0395357e2c346afdb (patch)
tree68806b639fbb4d2e08215b12517c86c2eee0fe94 /crawl-ref/source/dungeon.cc
parent505571294e7ca02c0af89ff2b25f3cecde439448 (diff)
downloadcrawl-ref-4277eaea5e02fb69d64193a0395357e2c346afdb.tar.gz
crawl-ref-4277eaea5e02fb69d64193a0395357e2c346afdb.zip
Add formatting fixes.
This mostly puts && and || on the proper lines, per the style guide.
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 8549e94f84..bc1972db56 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -6089,9 +6089,9 @@ void spotty_level(bool seeded, int iterations, bool boxy)
// Boxy levels have more clearing, so they get fewer iterations.
if (l == 0)
- l = 200 + random2( (boxy ? 750 : 1500) );
+ l = 200 + random2((boxy ? 750 : 1500));
- for (i = 0; i < l; i++)
+ for (i = 0; i < l; ++i)
{
do
{
@@ -6136,24 +6136,24 @@ void spotty_level(bool seeded, int iterations, bool boxy)
void smear_feature(int iterations, bool boxy, dungeon_feature_type feature,
int x1, int y1, int x2, int y2)
{
- for (int i = 0; i < iterations; i++)
+ for (int i = 0; i < iterations; ++i)
{
int x, y;
bool diagonals, straights;
do
{
- x = random_range(x1+1, x2-1);
- y = random_range(y1+1, y2-1);
+ x = random_range(x1 + 1, x2 - 1);
+ y = random_range(y1 + 1, y2 - 1);
- diagonals = grd[x+1][y+1] == feature ||
- grd[x-1][y+1] == feature ||
- grd[x-1][y-1] == feature ||
- grd[x+1][y-1] == feature;
+ diagonals = grd[x + 1][y + 1] == feature
+ || grd[x - 1][y + 1] == feature
+ || grd[x - 1][y - 1] == feature
+ || grd[x + 1][y - 1] == feature;
- straights = grd[x+1][y] == feature ||
- grd[x-1][y] == feature ||
- grd[x][y+1] == feature ||
- grd[x][y-1] == feature;
+ straights = grd[x + 1][y] == feature
+ || grd[x - 1][y] == feature
+ || grd[x][y + 1] == feature
+ || grd[x][y - 1] == feature;
}
while (grd[x][y] == feature || !straights && (boxy || !diagonals));