summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-23 12:10:53 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-23 12:10:53 -0300
commit140eea91129c42c14c603a741799868204fa04ae (patch)
tree525b646add001f807549351d2bd94a803f7bd5fb
parent309e46d5367f717d6f8db98ad2df9c3c0bc9d64c (diff)
downloadevol-tools-140eea91129c42c14c603a741799868204fa04ae.tar.gz
evol-tools-140eea91129c42c14c603a741799868204fa04ae.tar.bz2
evol-tools-140eea91129c42c14c603a741799868204fa04ae.tar.xz
evol-tools-140eea91129c42c14c603a741799868204fa04ae.zip
Make it easier to change when there are screens with width bigger than 1920
-rwxr-xr-xhercules/tmx_converter.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py
index e612303..5efe117 100755
--- a/hercules/tmx_converter.py
+++ b/hercules/tmx_converter.py
@@ -45,6 +45,7 @@ other_warp_fields = (
)
TILESIZE = 32
+WIDESCREEN=1920
SEPARATOR = ''
MESSAGE = 'This file is generated automatically. All manually added changes will be removed when running the Converter.'
CLIENT_MAPS = 'maps'
@@ -202,9 +203,9 @@ class ContentHandler(xml.sax.ContentHandler):
self.layer_name = attr[u'name'].lower()
self.state = State.LAYER
# Map width must be enough to fill the largest widescreen on market
- if (self.width < 1920/TILESIZE):
- print('Bad map width: %d (min. %d)' % (self.width, 1920/TILESIZE))
- raise Exception('Invalid map width: %d (min. %d)' % (self.width, 1920/TILESIZE))
+ if (self.width < WIDESCREEN/TILESIZE):
+ print('Bad map width: %d (min. %d)' % (self.width, WIDESCREEN/TILESIZE))
+ raise Exception('Invalid map width: %d (min. %d)' % (self.width, WIDESCREEN/TILESIZE))
elif self.state is State.LAYER:
if name == u'layer':
self.layers.add(attr[u'name'].lower())