From 9117616b0c74c0c855a881966b983ae8a3bd3a47 Mon Sep 17 00:00:00 2001 From: Ziemas Date: Mon, 18 Nov 2019 23:42:38 +0100 Subject: [PATCH] Fix the tile coordinates shown in the top left (#208) --- d2core/d2scene/map_engine_testing.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d2core/d2scene/map_engine_testing.go b/d2core/d2scene/map_engine_testing.go index f9735ab4..97320ac3 100644 --- a/d2core/d2scene/map_engine_testing.go +++ b/d2core/d2scene/map_engine_testing.go @@ -184,9 +184,9 @@ func (v *MapEngineTest) Render(screen *ebiten.Image) { line := fmt.Sprintf("%d, %d (Tile %d.%d, %d.%d)", int(math.Ceil(actualX)), int(math.Ceil(actualY)), - int(math.Ceil(tileX))-curRegion.Rect.Left, + int(math.Floor(tileX))-curRegion.Rect.Left, subtileX, - int(math.Ceil(tileY))-curRegion.Rect.Top, + int(math.Floor(tileY))-curRegion.Rect.Top, subtileY, )