diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-11 02:04:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-11 02:04:11 +0300 |
commit | bf05109ae3a06961cb5d5d02fc6917a88a53870b (patch) | |
tree | be6b08189c1b5786f598eafaf34091681e806ee1 /testxml/testxml.py | |
parent | f3bfee71a3921e4000852744b225aaf8713982b4 (diff) | |
download | evol-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/testxml.py')
-rwxr-xr-x | testxml/testxml.py | 13 |
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: |