diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-27 21:59:53 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-27 21:59:53 +0000 |
commit | 64a7e033fb59bbff69d24ad494fea9625f32b8ea (patch) | |
tree | 728e051f15566d9249bc12c4228550a9f3e6104f /crawl-ref/source/tile2.cc | |
parent | a0b40ce9a2db02a88b27380b50816fe43bf77f28 (diff) | |
download | crawl-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/tile2.cc')
-rw-r--r-- | crawl-ref/source/tile2.cc | 33 |
1 files changed, 20 insertions, 13 deletions
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) |