summaryrefslogtreecommitdiff
path: root/hercules
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-02-09 11:10:18 -0200
committerJesusaves <cpntb1@ymail.com>2019-02-09 11:10:18 -0200
commit17ee6a850d1ca5aa52e644fc4c2a809246392f33 (patch)
treee126ff615809a7bf4e440be21306ea22f4100087 /hercules
parentdfea40876271290acb6a50a55f88a8e6b50db1fd (diff)
downloadtools-17ee6a850d1ca5aa52e644fc4c2a809246392f33.tar.gz
tools-17ee6a850d1ca5aa52e644fc4c2a809246392f33.tar.bz2
tools-17ee6a850d1ca5aa52e644fc4c2a809246392f33.tar.xz
tools-17ee6a850d1ca5aa52e644fc4c2a809246392f33.zip
Report too small map width on map converter (causes display bugs)
Diffstat (limited to 'hercules')
-rwxr-xr-xhercules/tmx_converter.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py
index f2b40c0..86e75bb 100755
--- a/hercules/tmx_converter.py
+++ b/hercules/tmx_converter.py
@@ -210,6 +210,9 @@ class ContentHandler(xml.sax.ContentHandler):
self.height = int(attr[u'height'])
self.state = State.LAYER
heigherror=False
+ # 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))
elif self.state is State.LAYER:
if name == u'data':
if attr.get(u'encoding','') not in (u'', u'csv'):