Animation format: convert to more xml-ish format
and make it consistent with the format used by tiles.idx
This commit is contained in:
parent
ba4a159e34
commit
5863323d2f
6 changed files with 33 additions and 41 deletions
|
@ -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 {
|
||||
|
|
Reference in a new issue