com.threerings.media.tile.tools.xml
Class ObjectTileSetRuleSet

java.lang.Object
  extended by org.apache.commons.digester.RuleSetBase
      extended by com.threerings.media.tile.tools.xml.TileSetRuleSet
          extended by com.threerings.media.tile.tools.xml.SwissArmyTileSetRuleSet
              extended by com.threerings.media.tile.tools.xml.ObjectTileSetRuleSet
All Implemented Interfaces:
ValidatedSetNextRule.Validator, org.apache.commons.digester.RuleSet

public class ObjectTileSetRuleSet
extends SwissArmyTileSetRuleSet

Parses ObjectTileSet instances from a tileset description. An object tileset description looks like so: <tileset name="Sample Object Tileset"> <imagePath>path/to/image.png</imagePath> <!-- the widths (per row) of each tile in pixels --> <widths>265</widths> <!-- the heights (per row) of each tile in pixels --> <heights>224</heights> <!-- the number of tiles in each row --> <tileCounts>4</tileCounts> <!-- the offset in pixels to the upper left tile --> <offsetPos>0, 0</offsetPos> <!-- the gap between tiles in pixels --> <gapSize>0, 0</gapSize> <!-- the widths (in unit tile count) of the objects --> <objectWidths>4, 3, 4, 3</objectWidths> <!-- the heights (in unit tile count) of the objects --> <objectHeights>3, 4, 3, 4</objectHeights> <!-- the default render priorities for these object tiles --> <priorities>0, 0, -1, 0</priorities> <!-- the constraints for these object tiles --> <constraints>ATTACH_N, ATTACH_E, ATTACH_S, ATTACH_W</constraints> </tileset>


Field Summary
 
Fields inherited from class com.threerings.media.tile.tools.xml.TileSetRuleSet
TILESET_PATH
 
Constructor Summary
ObjectTileSetRuleSet()
           
 
Method Summary
 void addRuleInstances(org.apache.commons.digester.Digester digester)
          Adds the necessary rules to the digester to parse our tilesets.
 
Methods inherited from class com.threerings.media.tile.tools.xml.SwissArmyTileSetRuleSet
isValid
 
Methods inherited from class com.threerings.media.tile.tools.xml.TileSetRuleSet
getPath, setPrefix
 
Methods inherited from class org.apache.commons.digester.RuleSetBase
getNamespaceURI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectTileSetRuleSet

public ObjectTileSetRuleSet()
Method Detail

addRuleInstances

public void addRuleInstances(org.apache.commons.digester.Digester digester)
Description copied from class: TileSetRuleSet
Adds the necessary rules to the digester to parse our tilesets. Derived classes should override this method, being sure to call the superclass method and then adding their own rule instances (which should register themselves relative to the _prefix member).

Specified by:
addRuleInstances in interface org.apache.commons.digester.RuleSet
Overrides:
addRuleInstances in class SwissArmyTileSetRuleSet


Copyright © 2011. All Rights Reserved.