com.threerings.stage.tools.editor
Class TestTileLoader

java.lang.Object
  extended by com.threerings.stage.tools.editor.TestTileLoader
All Implemented Interfaces:
com.threerings.media.tile.TileSetIDBroker

public class TestTileLoader
extends Object
implements com.threerings.media.tile.TileSetIDBroker

The TestTileLoader handles test tiles. Test tiles are tiles that an artist can load in on-the-fly to see how things look in the scene editor.


Constructor Summary
TestTileLoader()
          Construct the TestTileLoader.
 
Method Summary
 void commit()
          Since we're just testing, we don't save these crazy IDs.
 int getTileSetID(String tileSetPath)
          Generate unique and completely fake tileset IDs that will be stable even after a reload of test tiles.
 HashIntMap<com.threerings.media.tile.TileSet> loadTestTiles()
          Check the specified directory and all its subdirectories for xml files.
 boolean tileSetMapped(String tilesetPath)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTileLoader

public TestTileLoader()
Construct the TestTileLoader.

Method Detail

loadTestTiles

public HashIntMap<com.threerings.media.tile.TileSet> loadTestTiles()
Check the specified directory and all its subdirectories for xml files. Each directory should contain at most one xml file, each xml file should specify at most one tileset. That tileset specification will be used to create tilesets for all the .png files in the same directory.

Returns:
a HashIntMap containing a TileSetId -> TileSet mapping for all the tilesets we create.

getTileSetID

public int getTileSetID(String tileSetPath)
Generate unique and completely fake tileset IDs that will be stable even after a reload of test tiles.

Specified by:
getTileSetID in interface com.threerings.media.tile.TileSetIDBroker

tileSetMapped

public boolean tileSetMapped(String tilesetPath)
Specified by:
tileSetMapped in interface com.threerings.media.tile.TileSetIDBroker

commit

public void commit()
Since we're just testing, we don't save these crazy IDs.

Specified by:
commit in interface com.threerings.media.tile.TileSetIDBroker


Copyright © 2011. All Rights Reserved.