summaryrefslogtreecommitdiff
path: root/hercules/tmx_converter.py
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/tmx_converter.py')
-rwxr-xr-xhercules/tmx_converter.py4
1 files changed, 4 insertions, 0 deletions
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())