diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-02-09 11:10:18 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-02-09 11:10:18 -0200 |
commit | 17ee6a850d1ca5aa52e644fc4c2a809246392f33 (patch) | |
tree | e126ff615809a7bf4e440be21306ea22f4100087 | |
parent | dfea40876271290acb6a50a55f88a8e6b50db1fd (diff) | |
download | tools-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)
-rwxr-xr-x | hercules/tmx_converter.py | 3 |
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'): |