summaryrefslogtreecommitdiff
path: root/testxml/testxml.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-03 21:06:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-03 21:06:43 +0300
commited749ce280bf3b2d2f88fc97105cf117e1483060 (patch)
tree755fb4c3f53fc0f1285ea5f468ea3dd11b142e75 /testxml/testxml.py
parent575a168de27749e663d9fb122d7efbc4221060ba (diff)
downloadtools-ed749ce280bf3b2d2f88fc97105cf117e1483060.tar.gz
tools-ed749ce280bf3b2d2f88fc97105cf117e1483060.tar.bz2
tools-ed749ce280bf3b2d2f88fc97105cf117e1483060.tar.xz
tools-ed749ce280bf3b2d2f88fc97105cf117e1483060.zip
testxml: add check for tsx files
testxml: add partial support for extern tilesets.
Diffstat (limited to 'testxml/testxml.py')
-rwxr-xr-xtestxml/testxml.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py
index 650785c..99bf386 100755
--- a/testxml/testxml.py
+++ b/testxml/testxml.py
@@ -16,7 +16,7 @@ from xml.dom import minidom
from PIL import Image
import zlib
-filt = re.compile(".+[.](xml|tmx)", re.IGNORECASE)
+filt = re.compile(".+[.](xml|tmx|tsx)", re.IGNORECASE)
filtmaps = re.compile(".+[.]tmx", re.IGNORECASE)
filtimages = re.compile(".+[.]png", re.IGNORECASE)
filtxmls = re.compile(".+[.]xml", re.IGNORECASE)
@@ -1216,6 +1216,17 @@ def testMap(file, path):
tilesMap = dict()
for tileset in dom.getElementsByTagName("tileset"):
+ try:
+ source = tileset.attributes["source"].value
+ if source is not None and source != "":
+ file2 = os.path.abspath(parentDir + os.path.sep + mapsDir + source)
+ if not os.path.isfile(file2):
+ showMsgFile(file, "missing source file in tileset " + source, True)
+
+ continue;
+ except:
+ None
+
name = readAttr(tileset, "name", "", "warning: missing tile name: " + file, False)
tileWidth = readAttrI(tileset, "tilewidth", mapTileWidth, \
"error: missing tile width in tileset: " + name + ", " + file, True)