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
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<micropolis-animation>
|
||||
<frame>terrain@0,896</frame>
|
||||
<frame>terrain@0,912</frame>
|
||||
<frame>terrain@0,928</frame>
|
||||
<frame>terrain@0,944</frame>
|
||||
<frame>terrain@0,960</frame>
|
||||
<frame>terrain@0,976</frame>
|
||||
<frame>terrain@0,992</frame>
|
||||
<frame>terrain@0,1008</frame>
|
||||
<frame><image src="terrain" at="0,896"/></frame>
|
||||
<frame><image src="terrain" at="0,912"/></frame>
|
||||
<frame><image src="terrain" at="0,928"/></frame>
|
||||
<frame><image src="terrain" at="0,944"/></frame>
|
||||
<frame><image src="terrain" at="0,960"/></frame>
|
||||
<frame><image src="terrain" at="0,976"/></frame>
|
||||
<frame><image src="terrain" at="0,992"/></frame>
|
||||
<frame><image src="terrain" at="0,1008"/></frame>
|
||||
</micropolis-animation>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<micropolis-animation>
|
||||
<frame>misc_animation@0,208</frame>
|
||||
<frame>misc_animation@0,224</frame>
|
||||
<frame>misc_animation@0,240</frame>
|
||||
<frame>misc_animation@0,256</frame>
|
||||
<frame><image src="misc_animation" at="0,208"/></frame>
|
||||
<frame><image src="misc_animation" at="0,224"/></frame>
|
||||
<frame><image src="misc_animation" at="0,240"/></frame>
|
||||
<frame><image src="misc_animation" at="0,256"/></frame>
|
||||
</micropolis-animation>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<micropolis-animation>
|
||||
<frame>misc_animation@0,2000</frame>
|
||||
<frame>misc_animation@0,2016</frame>
|
||||
<frame>misc_animation@0,2032</frame>
|
||||
<frame>misc_animation@0,2048</frame>
|
||||
<frame><image src="misc_animation" at="0,2000"/></frame>
|
||||
<frame><image src="misc_animation" at="0,2016"/></frame>
|
||||
<frame><image src="misc_animation" at="0,2032"/></frame>
|
||||
<frame><image src="misc_animation" at="0,2048"/></frame>
|
||||
</micropolis-animation>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<micropolis-animation>
|
||||
<frame>misc_animation@0,80</frame>
|
||||
<frame>misc_animation@0,96</frame>
|
||||
<frame>misc_animation@0,112</frame>
|
||||
<frame>misc_animation@0,128</frame>
|
||||
<frame>misc_animation@0,144</frame>
|
||||
<frame>misc_animation@0,160</frame>
|
||||
<frame>misc_animation@0,176</frame>
|
||||
<frame>misc_animation@0,192</frame>
|
||||
<frame><image src="misc_animation" at="0,80"/></frame>
|
||||
<frame><image src="misc_animation" at="0,96"/></frame>
|
||||
<frame><image src="misc_animation" at="0,112"/></frame>
|
||||
<frame><image src="misc_animation" at="0,128"/></frame>
|
||||
<frame><image src="misc_animation" at="0,144"/></frame>
|
||||
<frame><image src="misc_animation" at="0,160"/></frame>
|
||||
<frame><image src="misc_animation" at="0,176"/></frame>
|
||||
<frame><image src="misc_animation" at="0,192"/></frame>
|
||||
</micropolis-animation>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<micropolis-animation>
|
||||
<frame>stadium_animation_gfx@0,0</frame>
|
||||
<frame>stadium_animation_gfx@16,0</frame>
|
||||
<frame>stadium_animation_gfx@32,0</frame>
|
||||
<frame>stadium_animation_gfx@48,0</frame>
|
||||
<frame>stadium_animation_gfx@64,0</frame>
|
||||
<frame>stadium_animation_gfx@80,0</frame>
|
||||
<frame>stadium_animation_gfx@96,0</frame>
|
||||
<frame>stadium_animation_gfx@112,0</frame>
|
||||
<frame><image src="stadium_animation_gfx" at="0,0"/></frame>
|
||||
<frame><image src="stadium_animation_gfx" at="16,0"/></frame>
|
||||
<frame><image src="stadium_animation_gfx" at="32,0"/></frame>
|
||||
<frame><image src="stadium_animation_gfx" at="48,0"/></frame>
|
||||
<frame><image src="stadium_animation_gfx" at="64,0"/></frame>
|
||||
<frame><image src="stadium_animation_gfx" at="80,0"/></frame>
|
||||
<frame><image src="stadium_animation_gfx" at="96,0"/></frame>
|
||||
<frame><image src="stadium_animation_gfx" at="112,0"/></frame>
|
||||
</micropolis-animation>
|
||||
|
|
|
@ -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