summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tile1.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-27 21:59:53 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-27 21:59:53 +0000
commit64a7e033fb59bbff69d24ad494fea9625f32b8ea (patch)
tree728e051f15566d9249bc12c4228550a9f3e6104f /crawl-ref/source/tile1.cc
parenta0b40ce9a2db02a88b27380b50816fe43bf77f28 (diff)
downloadcrawl-ref-64a7e033fb59bbff69d24ad494fea9625f32b8ea.tar.gz
crawl-ref-64a7e033fb59bbff69d24ad494fea9625f32b8ea.zip
Add a few new tiles, one the exclusion centre (I can't be the only one
who has trouble to remove an exclusion because I can't find its centre) and four additional blood variations. They are all rather similar to the up to now only one - too similar, perhaps. In any case, those areas of bloodsoaked battlefields (such as you'll encounter in the Abyss or Pandemonium) look a bit more interesting now. The way the variant is chosen is unfortunately rather hacky, and might lead to unexpected patterns. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6176 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tile1.cc')
-rw-r--r--crawl-ref/source/tile1.cc42
1 files changed, 26 insertions, 16 deletions
diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc
index d088b05d2e..0eed3cec7b 100644
--- a/crawl-ref/source/tile1.cc
+++ b/crawl-ref/source/tile1.cc
@@ -3663,7 +3663,6 @@ void tile_init_flavor()
const unsigned short baz_col = get_bazaar_special_colour();
for (int x = 0; x < GXM; x++)
- {
for (int y = 0; y < GYM; y++)
{
int max_wall_flavor = get_num_wall_flavors() - 1;
@@ -3678,7 +3677,7 @@ void tile_init_flavor()
{
// Check for horizontal gates.
- bool door_left = (x > 0 && grd[x-1][y] == grd[x][y]);
+ bool door_left = (x > 0 && grd[x-1][y] == grd[x][y]);
bool door_right = (x < GXM - 1 && grd[x+1][y] == grd[x][y]);
if (door_left || door_right)
@@ -3691,7 +3690,7 @@ void tile_init_flavor()
else
target = TILE_DNGN_GATE_CLOSED_LEFT;
- // NOTE: this requires that closed gates and open gates
+ // NOTE: This requires that closed gates and open gates
// are positioned in the tile set relative to their
// door counterpart.
env.tile_flavor[x][y].special =
@@ -3705,10 +3704,10 @@ void tile_init_flavor()
else if (bazaar && env.grid_colours[x][y] == baz_col
&& grd[x][y] == DNGN_FLOOR)
{
- int left_grd = (x > 0) ? grd[x-1][y] : DNGN_ROCK_WALL;
+ int left_grd = (x > 0) ? grd[x-1][y] : DNGN_ROCK_WALL;
int right_grd = (x < GXM - 1) ? grd[x+1][y] : DNGN_ROCK_WALL;
- int up_grd = (y > 0) ? grd[x][y-1] : DNGN_ROCK_WALL;
- int down_grd = (y < GYM - 1) ? grd[x][y+1] : DNGN_ROCK_WALL;
+ int up_grd = (y > 0) ? grd[x][y-1] : DNGN_ROCK_WALL;
+ int down_grd = (y < GYM - 1) ? grd[x][y+1] : DNGN_ROCK_WALL;
unsigned short left_col = (x > 0) ?
env.grid_colours[x-1][y] : BLACK;
unsigned short right_col = (x < GXM - 1) ?
@@ -3789,11 +3788,15 @@ void tile_init_flavor()
else if (l_spc && d_spc)
env.tile_flavor[x][y].special = SPECIAL_NE;
else if (r_spc)
+ {
env.tile_flavor[x][y].special = coinflip() ?
SPECIAL_N : SPECIAL_NW;
+ }
else if (l_spc)
+ {
env.tile_flavor[x][y].special = coinflip() ?
SPECIAL_N : SPECIAL_NE;
+ }
else
env.tile_flavor[x][y].special = jitter(SPECIAL_N);
}
@@ -3806,11 +3809,15 @@ void tile_init_flavor()
else if (l_spc && u_spc)
env.tile_flavor[x][y].special = SPECIAL_SE;
else if (r_spc)
+ {
env.tile_flavor[x][y].special = coinflip() ?
SPECIAL_S : SPECIAL_SW;
+ }
else if (l_spc)
+ {
env.tile_flavor[x][y].special = coinflip() ?
SPECIAL_S : SPECIAL_SE;
+ }
else
env.tile_flavor[x][y].special = jitter(SPECIAL_S);
}
@@ -3864,7 +3871,6 @@ void tile_init_flavor()
env.tile_flavor[x][y].special = 0;
}
}
- }
if (!bazaar)
return;
@@ -3893,18 +3899,18 @@ void tile_init_flavor()
if (grd[x][y] != DNGN_FLOOR || env.grid_colours[x][y] != baz_col)
continue;
- if (env.tile_flavor[x][y].special != SPECIAL_N &&
- env.tile_flavor[x][y].special != SPECIAL_S &&
- env.tile_flavor[x][y].special != SPECIAL_E &&
- env.tile_flavor[x][y].special != SPECIAL_W)
+ if (env.tile_flavor[x][y].special != SPECIAL_N
+ && env.tile_flavor[x][y].special != SPECIAL_S
+ && env.tile_flavor[x][y].special != SPECIAL_E
+ && env.tile_flavor[x][y].special != SPECIAL_W)
{
continue;
}
- int right_flavor = x < GXM - 1 ? env.tile_flavor[x+1][y].special :
- SPECIAL_FULL;
- int down_flavor = y < GYM - 1 ? env.tile_flavor[x][y+1].special :
- SPECIAL_FULL;
+ int right_flavor = x < GXM - 1 ? env.tile_flavor[x+1][y].special
+ : SPECIAL_FULL;
+ int down_flavor = y < GYM - 1 ? env.tile_flavor[x][y+1].special
+ : SPECIAL_FULL;
int this_flavor = env.tile_flavor[x][y].special;
if (this_flavor == SPECIAL_N && right_flavor == SPECIAL_S)
@@ -4236,9 +4242,13 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy)
wall_flv, floor_flv, special_flv);
const coord_def gc(gx, gy);
+
if (is_excluded(gc))
{
- tileb[count+1] |= TILE_FLAG_TRAVEL_EX;
+ if (is_exclude_root(gc))
+ tileb[count+1] |= TILE_FLAG_EXCL_CTR;
+ else
+ tileb[count+1] |= TILE_FLAG_TRAV_EXCL;
}
if (in_bounds)