The camera position should consider the width of a tile

This commit is contained in:
Yohann D'ANELLO 2020-11-11 15:10:46 +01:00
parent 1e66e263bc
commit 2f3a03dbf7

View File

@ -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)