summaryrefslogtreecommitdiff
path: root/testxml
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-11 02:04:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-11 02:04:11 +0300
commitbf05109ae3a06961cb5d5d02fc6917a88a53870b (patch)
treebe6b08189c1b5786f598eafaf34091681e806ee1 /testxml
parentf3bfee71a3921e4000852744b225aaf8713982b4 (diff)
downloadevol-tools-bf05109ae3a06961cb5d5d02fc6917a88a53870b.tar.gz
evol-tools-bf05109ae3a06961cb5d5d02fc6917a88a53870b.tar.bz2
evol-tools-bf05109ae3a06961cb5d5d02fc6917a88a53870b.tar.xz
evol-tools-bf05109ae3a06961cb5d5d02fc6917a88a53870b.zip
testxml: fix error in multiple imagesets.
Diffstat (limited to 'testxml')
-rwxr-xr-xtestxml/testxml.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py
index a20051d..ceba29b 100755
--- a/testxml/testxml.py
+++ b/testxml/testxml.py
@@ -407,6 +407,7 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser
showMsgSprite(fileLoc, "incorrect number of imageset tags", iserr)
return
isets = set()
+ imagesetnums = dict()
num = 0
for imageset in imagesets:
try:
@@ -519,7 +520,8 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser
+ ". Frames number " + str(num) + ", id=" + str(id), iserr)
if num < 1:
showMsgSprite(fileLoc, "image have zero frames: " + image, iserr)
-
+ if name is not None and num > 0:
+ imagesetnums[name] = num
try:
includes = dom.getElementsByTagName("include")
@@ -556,6 +558,15 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser
except:
showMsgSprite("no action name", iserr)
continue
+ try:
+ setname = action.attributes["imageset"].value
+ except:
+ setname = ""
+ if setname in imagesetnums:
+ num = imagesetnums[setname]
+ else:
+ num = 0
+ showMsgSprite(fileLoc, "using incorrect imageset name in action: " + name, iserr)
frameSet = frameSet | testSpriteAction(fileLoc, name, action, num, iserr)
if name in actset: