From cae8554b62a6cedae108919ec0cc57d9694dcfac Mon Sep 17 00:00:00 2001 From: ennewalker Date: Mon, 5 Jan 2009 02:19:21 +0000 Subject: 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 --- crawl-ref/source/tilepick.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/tilepick.cc') 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; } -- cgit v1.2.3-54-g00ecf