summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libgui.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 14:20:40 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 14:20:40 +0000
commit2450cbe42b1f36bd2b85abfc08ae25f6663b6a16 (patch)
tree9a2de352f79fe388903b08845c69a8db24eaa84c /crawl-ref/source/libgui.cc
parent19d229916a442397c1726d04298329283f2f39f2 (diff)
downloadcrawl-ref-2450cbe42b1f36bd2b85abfc08ae25f6663b6a16.tar.gz
crawl-ref-2450cbe42b1f36bd2b85abfc08ae25f6663b6a16.zip
Fixing minimap issue where the markers could get confused if there were multiple squares with the player colour. Markers no longer depend on the contents of the map.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4409 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libgui.cc')
-rw-r--r--crawl-ref/source/libgui.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc
index a63497d717..6ccf2ae5a7 100644
--- a/crawl-ref/source/libgui.cc
+++ b/crawl-ref/source/libgui.cc
@@ -341,6 +341,9 @@ int tile_idx_unseen_terrain(int x, int y, int what)
void GmapUpdate(int x, int y, int what, bool upd_tile)
{
+ if ((you.level_type == LEVEL_LABYRINTH) || (you.level_type == LEVEL_ABYSS))
+ return;
+
int c;
if (x == you.x_pos && y == you.y_pos)
@@ -467,16 +470,25 @@ void GmapDisplay(int linex, int liney)
count += GXM - (gmap_max_x - gmap_min_x + 1);
}
- if ( (you.level_type != LEVEL_LABYRINTH)&&(you.level_type != LEVEL_ABYSS) )
+ bool show_mark = false;
+ int mark_x = 0;
+ int mark_y = 0;
+ if ((you.level_type != LEVEL_LABYRINTH) && (you.level_type != LEVEL_ABYSS))
{
ox += linex - gmap_min_x;
oy += liney - gmap_min_y;
+
+ mark_x = ox;
+ mark_y = oy;
+ show_mark = true;
+
// highlight centre of the map
+ // [enne] Maybe we need another colour for the highlight?
buf2[ox + oy * GXM] = Options.tile_player_col;
}
region_map->flag = true;
- region_map->draw_data(buf2);
+ region_map->draw_data(buf2, show_mark, mark_x, mark_y);
}
/* initialize routines */