From 2f3a03dbf76fbbdce4665b1c1f824582bb315c36 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 11 Nov 2020 15:10:46 +0100 Subject: [PATCH] The camera position should consider the width of a tile --- dungeonbattle/display/mapdisplay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dungeonbattle/display/mapdisplay.py b/dungeonbattle/display/mapdisplay.py index 8ab7be7..aa40039 100644 --- a/dungeonbattle/display/mapdisplay.py +++ b/dungeonbattle/display/mapdisplay.py @@ -24,7 +24,7 @@ class MapDisplay(Display): self.pack[e.name.upper()], self.color_pair(2)) def display(self) -> None: - y, x = self.map.currenty, self.map.currentx + y, x = self.map.currenty, self.pack.tile_width * self.map.currentx deltay, deltax = (self.height // 2) + 1, (self.width // 2) + 1 pminrow, pmincol = y - deltay, x - deltax sminrow, smincol = max(-pminrow, 0), max(-pmincol, 0)