From e9de54fb5ad49ecd6d6a54e59390231ef1e09d23 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Tue, 13 Oct 2020 01:32:30 +0200 Subject: [PATCH] Calculate position of item highlighting --- Source/automap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/automap.cpp b/Source/automap.cpp index 5a313b938..bdebed289 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -544,8 +544,8 @@ void SearchAutomapItem() px = i - 2 * AutoMapXOfs - ViewX; py = j - 2 * AutoMapYOfs - ViewY; - x = (ScrollInfo._sxoff * AutoMapScale / 100 >> 1) + (px - py) * AmLine16 + 384; - y = (ScrollInfo._syoff * AutoMapScale / 100 >> 1) + (px + py) * AmLine8 + 336; + x = (ScrollInfo._sxoff * AutoMapScale / 100 >> 1) + (px - py) * AmLine16 + SCREEN_WIDTH / 2 + SCREEN_X; + y = (ScrollInfo._syoff * AutoMapScale / 100 >> 1) + (px + py) * AmLine8 + (SCREEN_HEIGHT - PANEL_HEIGHT) / 2 + SCREEN_Y; if (invflag || sbookflag) x -= 160;