summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilepick.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-05 02:19:21 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-05 02:19:21 +0000
commitcae8554b62a6cedae108919ec0cc57d9694dcfac (patch)
tree41d8eb152993885b50415271c302258d8d79ab21 /crawl-ref/source/tilepick.cc
parentdfbb2ae3abe47a0db72825e65d9c140c5a78ea0f (diff)
downloadcrawl-ref-cae8554b62a6cedae108919ec0cc57d9694dcfac.tar.gz
crawl-ref-cae8554b62a6cedae108919ec0cc57d9694dcfac.zip
Fixing floating exclusion areas in 'X' mode.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8225 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r--crawl-ref/source/tilepick.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index fb4a196b39..bccdff96db 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -4450,24 +4450,24 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy)
for (y = 0; y < crawl_view.viewsz.y; y++)
for (x = 0; x < crawl_view.viewsz.x; x++)
{
- const int gx = view2gridX(x + crawl_view.viewp.x);
- const int gy = view2gridY(y + crawl_view.viewp.y);
+ const coord_def ep = coord_def(x, y) + crawl_view.viewp
+ + coord_def(cx, cy) - crawl_view.vgrdc;
+ const coord_def gc = view2grid(ep);
unsigned char wall_flv = 0;
unsigned char floor_flv = 0;
unsigned char special_flv = 0;
- const bool in_bounds = (map_bounds(gx, gy));
+ const bool in_bounds = (map_bounds(gc));
if (in_bounds)
{
- wall_flv = env.tile_flv[gx][gy].wall;
- floor_flv = env.tile_flv[gx][gy].floor;
- special_flv = env.tile_flv[gx][gy].special;
+ wall_flv = env.tile_flv[gc.x][gc.y].wall;
+ floor_flv = env.tile_flv[gc.x][gc.y].floor;
+ special_flv = env.tile_flv[gc.x][gc.y].special;
}
_finalize_tile(&tileb[count+1], wall_flv, floor_flv, special_flv);
- const coord_def gc(gx, gy);
if (is_excluded(gc))
{
if (is_exclude_root(gc))
@@ -4497,7 +4497,7 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy)
if (print_blood && is_bloodcovered(gc))
tileb[count+1] |= TILE_FLAG_BLOOD;
- if (is_sanctuary(coord_def(gx, gy)))
+ if (is_sanctuary(gc))
tileb[count+1] |= TILE_FLAG_SANCTUARY;
}