From 309e46d5367f717d6f8db98ad2df9c3c0bc9d64c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 23 Apr 2020 12:10:03 -0300 Subject: Break CI if map width is too small and cause render bugs. --- hercules/tmx_converter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py index 3ac33c7..e612303 100755 --- a/hercules/tmx_converter.py +++ b/hercules/tmx_converter.py @@ -201,6 +201,10 @@ class ContentHandler(xml.sax.ContentHandler): self.layers.add(attr[u'name'].lower()) 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)) elif self.state is State.LAYER: if name == u'layer': self.layers.add(attr[u'name'].lower()) -- cgit v1.2.3-70-g09d2