summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilesdl.cc
diff options
context:
space:
mode:
authorEnne Walker <ennewalker@users.sourceforge.net>2009-11-03 22:34:28 -0500
committerEnne Walker <ennewalker@users.sourceforge.net>2009-11-03 22:36:12 -0500
commitf251994ff016cc935e026fe0366d4384890b638a (patch)
tree4052f58b190797d0320167185bde06bae0e9db91 /crawl-ref/source/tilesdl.cc
parent1bf203aaf578284d268fdca67c9d334a79a53c0d (diff)
downloadcrawl-ref-f251994ff016cc935e026fe0366d4384890b638a.tar.gz
crawl-ref-f251994ff016cc935e026fe0366d4384890b638a.zip
Support for X map multi-level viewing on tiles.
Fixes seeing in-LOS squares on incorrect levels. Fixes the minimap not updating. Fixes the player dot appearing on the minimap on wrong levels.
Diffstat (limited to 'crawl-ref/source/tilesdl.cc')
-rw-r--r--crawl-ref/source/tilesdl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index fb56de2c8e..90d3ac4ef1 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -427,6 +427,8 @@ void TilesFramework::load_dungeon(const coord_def &cen)
unsigned int *tb = (unsigned int*)alloca(sizeof(unsigned int) *
wy * wx * 2);
+ bool draw_los = you.on_current_level;
+
int count = 0;
for (int y = 0; y < wy; y++)
for (int x = 0; x < wx; x++)
@@ -444,7 +446,7 @@ void TilesFramework::load_dungeon(const coord_def &cen)
fg = 0;
bg = TILE_DNGN_UNSEEN;
}
- else if (!crawl_view.in_grid_los(gc) || !env.show(ep))
+ else if (!crawl_view.in_grid_los(gc) || !env.show(ep) || !draw_los)
{
fg = env.tile_bk_fg(gc);
bg = env.tile_bk_bg(gc);
@@ -1325,7 +1327,7 @@ void TilesFramework::update_minimap(int gx, int gy, map_feature f)
coord_def gc(gx, gy);
- if (you.pos() == gc)
+ if (you.pos() == gc && you.on_current_level)
{
f = MF_PLAYER;
}