From 17ee6a850d1ca5aa52e644fc4c2a809246392f33 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 9 Feb 2019 11:10:18 -0200 Subject: Report too small map width on map converter (causes display bugs) --- hercules/tmx_converter.py | 3 +++ 1 file changed, 3 insertions(+) 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'): -- cgit v1.2.3-70-g09d2