Working visibility and displaying it, still need to hide things that aren't visible
This commit is contained in:
@ -15,8 +15,15 @@ class MapDisplay(Display):
|
||||
self.pad = self.newpad(m.height, self.pack.tile_width * m.width + 1)
|
||||
|
||||
def update_pad(self) -> None:
|
||||
self.addstr(self.pad, 0, 0, self.map.draw_string(self.pack),
|
||||
self.pack.tile_fg_color, self.pack.tile_bg_color)
|
||||
for j in range(len(self.map.tiles)):
|
||||
for i in range(len(self.map.tiles[j])):
|
||||
color = self.pack.tile_fg_visible_color if \
|
||||
self.map.visibility[j][i] else self.pack.tile_fg_color
|
||||
self.addstr(self.pad, j, self.pack.tile_width * i,
|
||||
self.map.tiles[j][i].char(self.pack),
|
||||
color, self.pack.tile_bg_color)
|
||||
# self.addstr(self.pad, 0, 0, self.map.draw_string(self.pack),
|
||||
# self.pack.tile_fg_color, self.pack.tile_bg_color)
|
||||
for e in self.map.entities:
|
||||
self.addstr(self.pad, e.y, self.pack.tile_width * e.x,
|
||||
self.pack[e.name.upper()],
|
||||
|
Reference in New Issue
Block a user