Animation format: convert to more xml-ish format

and make it consistent with the format used by tiles.idx
This commit is contained in:
Jason Long 2014-09-20 13:06:49 -04:00
parent ba4a159e34
commit 5863323d2f
6 changed files with 33 additions and 41 deletions

View file

@ -71,15 +71,7 @@ public class Animation extends TileImage
String tmp = in.getAttributeValue(null, "duration");
int duration = tmp != null ? Integer.parseInt(tmp) : DEFAULT_DURATION;
String text = in.getElementText();
TileImage frameImage;
try {
frameImage = ctx.parseFrameSpec(text);
}
catch (IOException e) {
throw new XMLStreamException("Unable to load frame image: "+text, e);
}
TileImage frameImage = TileImage.readTileImageM(in, ctx);
addFrame( frameImage, duration );
}
else {