From 2450cbe42b1f36bd2b85abfc08ae25f6663b6a16 Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sun, 20 Apr 2008 14:20:40 +0000 Subject: 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 --- crawl-ref/source/libgui.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/libgui.cc') 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 */ -- cgit v1.2.3-54-g00ecf