Added support for explicitly specifying the offset into the object tile
image that should be centered at the origin when the tile is rendered. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@826 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ObjectTileSetRuleSet.java,v 1.2 2001/11/29 22:10:28 mdb Exp $
|
||||
// $Id: ObjectTileSetRuleSet.java,v 1.3 2001/12/18 08:37:54 mdb Exp $
|
||||
|
||||
package com.threerings.media.tools.tile.xml;
|
||||
|
||||
@@ -65,6 +65,26 @@ public class ObjectTileSetRuleSet extends SwissArmyTileSetRuleSet
|
||||
((ObjectTileSet)target).setObjectHeights(heights);
|
||||
}
|
||||
});
|
||||
|
||||
digester.addRule(
|
||||
_prefix + TILESET_PATH + "/xOrigins",
|
||||
new CallMethodSpecialRule(digester) {
|
||||
public void parseAndSet (String bodyText, Object target)
|
||||
{
|
||||
int[] xorigins = StringUtil.parseIntArray(bodyText);
|
||||
((ObjectTileSet)target).setXOrigins(xorigins);
|
||||
}
|
||||
});
|
||||
|
||||
digester.addRule(
|
||||
_prefix + TILESET_PATH + "/yOrigins",
|
||||
new CallMethodSpecialRule(digester) {
|
||||
public void parseAndSet (String bodyText, Object target)
|
||||
{
|
||||
int[] yorigins = StringUtil.parseIntArray(bodyText);
|
||||
((ObjectTileSet)target).setYOrigins(yorigins);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
|
||||
Reference in New Issue
Block a user