The camera position should consider the width of a tile
This commit is contained in:
parent
1e66e263bc
commit
2f3a03dbf7
|
@ -24,7 +24,7 @@ class MapDisplay(Display):
|
||||||
self.pack[e.name.upper()], self.color_pair(2))
|
self.pack[e.name.upper()], self.color_pair(2))
|
||||||
|
|
||||||
def display(self) -> None:
|
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
|
deltay, deltax = (self.height // 2) + 1, (self.width // 2) + 1
|
||||||
pminrow, pmincol = y - deltay, x - deltax
|
pminrow, pmincol = y - deltay, x - deltax
|
||||||
sminrow, smincol = max(-pminrow, 0), max(-pmincol, 0)
|
sminrow, smincol = max(-pminrow, 0), max(-pmincol, 0)
|
||||||
|
|
Loading…
Reference in New Issue