From e1f1dbd2ba852c17344b86e9fc131936b4258606 Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sun, 20 Apr 2008 02:31:58 +0000 Subject: [1940992] Fixed minimap travel/view issues. This fixes both the "off by three squares" as well as an unmentioned "off by two pixels" issue. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4401 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/libgui.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/libgui.cc') diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index 4ade6d9bb3..a63497d717 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -596,7 +596,7 @@ void libgui_init() new MapRegionClass(MAP_XMAX+map_margin, MAP_YMAX+map_margin, map_margin, map_margin, - false); + 2); region_map->id = REGION_MAP; region_map->dx = map_px; region_map->dy = map_px; @@ -1153,8 +1153,8 @@ int convert_cursor_pos(int mx, int my, int *cx, int *cy) if (id == REGION_MAP) { - x -= gmap_ox + region_map->x_margin + 1; - y -= gmap_oy + region_map->y_margin + 1; + x -= gmap_ox - region_map->marker_length + 1; + y -= gmap_oy - region_map->marker_length + 1; } if (id == REGION_INV1 || id == REGION_INV2) -- cgit v1.2.3-54-g00ecf