summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
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
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')
-rw-r--r--crawl-ref/source/rltiles/dc-misc.txt5
-rw-r--r--crawl-ref/source/rltiles/dc-misc/blood_red1.bmpbin0 -> 2102 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-misc/blood_red2.bmpbin0 -> 2102 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-misc/blood_red3.bmpbin0 -> 2102 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-misc/blood_red4.bmpbin0 -> 2102 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-misc/travel_exclusion_centre.bmpbin0 -> 2102 bytes
-rw-r--r--crawl-ref/source/tile1.cc42
-rw-r--r--crawl-ref/source/tile2.cc33
-rw-r--r--crawl-ref/source/tiles.h5
9 files changed, 54 insertions, 31 deletions
diff --git a/crawl-ref/source/rltiles/dc-misc.txt b/crawl-ref/source/rltiles/dc-misc.txt
index b331142539..0c89b0b41a 100644
--- a/crawl-ref/source/rltiles/dc-misc.txt
+++ b/crawl-ref/source/rltiles/dc-misc.txt
@@ -42,6 +42,10 @@ unseen_item UNSEEN_ITEM
unseen_monster UNSEEN_CORPSE
%corpse 0
dc-misc/blood_red BLOOD0
+dc-misc/blood_red1 BLOOD1
+dc-misc/blood_red2 BLOOD2
+dc-misc/blood_red3 BLOOD3
+dc-misc/blood_red4 BLOOD4
%back none
dc-dngn/dngn_altar UNSEEN_ALTAR
dc-dngn/dngn_entrance UNSEEN_ENTRANCE
@@ -75,6 +79,7 @@ txt4 TEXT_DOLLS_E
something_under SOMETHING_UNDER
error ERROR
travel_exclusion TRAVEL_EXCLUSION
+travel_exclusion_centre TRAVEL_EXCL_CENTRE
%rim 1
todo TODO
new_stair NEW_STAIR
diff --git a/crawl-ref/source/rltiles/dc-misc/blood_red1.bmp b/crawl-ref/source/rltiles/dc-misc/blood_red1.bmp
new file mode 100644
index 0000000000..8b7e35296c
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-misc/blood_red1.bmp
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-misc/blood_red2.bmp b/crawl-ref/source/rltiles/dc-misc/blood_red2.bmp
new file mode 100644
index 0000000000..d395b8a0b4
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-misc/blood_red2.bmp
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-misc/blood_red3.bmp b/crawl-ref/source/rltiles/dc-misc/blood_red3.bmp
new file mode 100644
index 0000000000..17870b0d90
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-misc/blood_red3.bmp
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-misc/blood_red4.bmp b/crawl-ref/source/rltiles/dc-misc/blood_red4.bmp
new file mode 100644
index 0000000000..42d7206be9
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-misc/blood_red4.bmp
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-misc/travel_exclusion_centre.bmp b/crawl-ref/source/rltiles/dc-misc/travel_exclusion_centre.bmp
new file mode 100644
index 0000000000..35a4a0d967
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-misc/travel_exclusion_centre.bmp
Binary files differ
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)
diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc
index 0e85818e53..e04679829a 100644
--- a/crawl-ref/source/tile2.cc
+++ b/crawl-ref/source/tile2.cc
@@ -417,11 +417,11 @@ static int _tcache_find_id_normal(int *fg, int *bg, int *is_new)
}
_lift_tcache(tc0->idx);
- return tc0->idx;
+ return (tc0->idx);
}
-/*** overlay a tile onto an exsisting image with transpalency operation */
+// Overlay a tile onto an existing image with transparency operation.
static void _tcache_overlay(img_type img, int idx, int tile,
int *copy, char *mask, unsigned int shift_left = 0)
{
@@ -438,32 +438,32 @@ static void _tcache_overlay(img_type img, int idx, int tile,
tile &= TILE_FLAG_MASK;
- x0 = (tile % TILE_PER_ROW)*TILE_X;
- y0 = (tile / TILE_PER_ROW)*TILE_Y;
+ x0 = (tile % TILE_PER_ROW) * TILE_X;
+ y0 = (tile / TILE_PER_ROW) * TILE_Y;
if (mask != NULL)
{
- if (*copy ==2)
+ if (*copy == 2)
{
ImgCopyMaskedH(src, x0 + sx, y0 + sy, wx, wy,
- img, ox, oy + idx*uy, mask);
+ img, ox, oy + idx*uy, mask);
}
else
{
ImgCopyMasked(src, x0 + sx, y0 + sy, wx, wy,
- img, ox, oy + idx*uy, mask);
+ img, ox, oy + idx*uy, mask);
}
}
// Hack: hilite rim color
- else if (*copy ==2)
+ else if (*copy == 2)
{
ImgCopyH(src, x0 + sx, y0 + sy, wx, wy,
- img, ox, oy + idx*uy, *copy);
+ img, ox, oy + idx*uy, *copy);
}
else
{
ImgCopy(src, x0 + sx, y0 + sy, wx, wy,
- img, ox, oy + idx*uy, *copy);
+ img, ox, oy + idx*uy, *copy);
}
*copy = 0;
}
@@ -657,7 +657,7 @@ void _tcache_compose_normal(int ix, int *fg, int *bg)
_tcache_overlay(tcache_image, ix, bbg, &c, NULL);
if (bg0 & TILE_FLAG_BLOOD)
- _tcache_overlay(tcache_image, ix, TILE_BLOOD0, &c, NULL);
+ _tcache_overlay(tcache_image, ix, TILE_BLOOD0 + ix % 5, &c, NULL);
if (new_bg)
_tcache_overlay(tcache_image, ix, new_bg, &c, NULL);
@@ -670,8 +670,10 @@ void _tcache_compose_normal(int ix, int *fg, int *bg)
// Apply the travel exclusion under the foreground if the cell is
// visible. It will be applied later if the cell is unseen.
- if ((bg0 & TILE_FLAG_TRAVEL_EX) && !(bg0 & TILE_FLAG_UNSEEN))
+ if ((bg0 & TILE_FLAG_TRAV_EXCL) && !(bg0 & TILE_FLAG_UNSEEN))
_tcache_overlay(tcache_image, ix, TILE_TRAVEL_EXCLUSION, &c, NULL);
+ else if ((bg0 & TILE_FLAG_EXCL_CTR) && !(bg0 & TILE_FLAG_UNSEEN))
+ _tcache_overlay(tcache_image, ix, TILE_TRAVEL_EXCL_CENTRE, &c, NULL);
if (bg0 & TILE_FLAG_RAY)
_tcache_overlay(tcache_image, ix, TILE_RAY_MESH, &c, NULL);
@@ -747,11 +749,16 @@ void _tcache_compose_normal(int ix, int *fg, int *bg)
if (bg0 & TILE_FLAG_NEW_STAIR && status_shift == 0)
_tcache_overlay(tcache_image, ix, TILE_NEW_STAIR, &c, NULL);
- if ((bg0 & TILE_FLAG_TRAVEL_EX) && (bg0 & TILE_FLAG_UNSEEN))
+ if ((bg0 & TILE_FLAG_TRAV_EXCL) && (bg0 & TILE_FLAG_UNSEEN))
{
_tcache_overlay(tcache_image, ix, TILE_TRAVEL_EXCLUSION, &c,
NULL);
}
+ else if ((bg0 & TILE_FLAG_EXCL_CTR) && (bg0 & TILE_FLAG_UNSEEN))
+ {
+ _tcache_overlay(tcache_image, ix, TILE_TRAVEL_EXCL_CENTRE, &c,
+ NULL);
+ }
// Tile cursor
if (bg0 & TILE_FLAG_CURSOR)
diff --git a/crawl-ref/source/tiles.h b/crawl-ref/source/tiles.h
index f563cec8d4..f15faade53 100644
--- a/crawl-ref/source/tiles.h
+++ b/crawl-ref/source/tiles.h
@@ -161,8 +161,9 @@ enum tile_flags
TILE_FLAG_BLOOD = 0x00010000,
TILE_FLAG_HALO = 0x00020000,
TILE_FLAG_NEW_STAIR = 0x00040000,
- TILE_FLAG_TRAVEL_EX = 0x00080000,
- TILE_FLAG_SANCTUARY = 0x00100000,
+ TILE_FLAG_TRAV_EXCL = 0x00080000,
+ TILE_FLAG_EXCL_CTR = 0x00100000,
+ TILE_FLAG_SANCTUARY = 0x00200000,
// General
TILE_FLAG_MASK = 0x000007FF