changed a few errors
This commit is contained in:
parent
38ed5259d5
commit
4a54609bad
|
@ -2,7 +2,7 @@
|
||||||
import curses
|
import curses
|
||||||
from dungeonbattle.interfaces import Map
|
from dungeonbattle.interfaces import Map
|
||||||
from dungeonbattle.settings import Settings
|
from dungeonbattle.settings import Settings
|
||||||
import dungeonbattle.texturepack
|
import dungeonbattle.texturepack as tp
|
||||||
|
|
||||||
class MapDisplay:
|
class MapDisplay:
|
||||||
|
|
||||||
|
@ -11,13 +11,15 @@ class MapDisplay:
|
||||||
self.height = height
|
self.height = height
|
||||||
self.map = m
|
self.map = m
|
||||||
self.pad = curses.newpad(m.height, m.width+1)
|
self.pad = curses.newpad(m.height, m.width+1)
|
||||||
if Settings.TEXTURE_PACK == 'ASCII'
|
if self.settings.TEXTURE_PACK == 'ASCII'
|
||||||
self.textures = ascii_textures
|
self.textures = tp.ascii_textures
|
||||||
|
if self.settings.TEXTURE_PACK == 'SQUIRREL'
|
||||||
|
self.textures = tp.squirrel_textures
|
||||||
|
|
||||||
def update_pad(self):
|
def update_pad(self):
|
||||||
self.pad.addstr(0, 0, self.map.draw_string())
|
self.pad.addstr(0, 0, self.map.draw_string())
|
||||||
for e in self.map.entities:
|
for e in self.map.entities:
|
||||||
self.pad.addch(e.y, e.x, self.textures[e.name])
|
self.pad.addstr(e.y, e.x, self.textures[e.name])
|
||||||
|
|
||||||
def display(self, y, x):
|
def display(self, y, x):
|
||||||
deltay, deltax = (self.height // 2) + 1, (self.width //2) + 1
|
deltay, deltax = (self.height // 2) + 1, (self.width //2) + 1
|
||||||
|
|
Loading…
Reference in New Issue