Added the interface RecolorableTileSet which indicates that a TileSet
has colorizations and implements the "String[] getColorizations()" method. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3111 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ObjectTileSet.java,v 1.18 2004/08/27 02:12:41 mdb Exp $
|
// $Id: ObjectTileSet.java,v 1.19 2004/08/30 22:09:29 ray Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -33,6 +33,7 @@ import com.threerings.media.image.Colorization;
|
|||||||
* @see ObjectTile
|
* @see ObjectTile
|
||||||
*/
|
*/
|
||||||
public class ObjectTileSet extends SwissArmyTileSet
|
public class ObjectTileSet extends SwissArmyTileSet
|
||||||
|
implements RecolorableTileSet
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Sets the widths (in unit tile count) of the objects in this
|
* Sets the widths (in unit tile count) of the objects in this
|
||||||
@@ -139,10 +140,7 @@ public class ObjectTileSet extends SwissArmyTileSet
|
|||||||
return (_sorients == null) ? 0 : _sorients[tileIdx];
|
return (_sorients == null) ? 0 : _sorients[tileIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// documentation inherited from interface RecolorableTileSet
|
||||||
* Returns the colorization classes that should be used to recolor
|
|
||||||
* objects in this tileset.
|
|
||||||
*/
|
|
||||||
public String[] getColorizations ()
|
public String[] getColorizations ()
|
||||||
{
|
{
|
||||||
return _zations;
|
return _zations;
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// $Id: RecolorableTileSet.java,v 1.1 2004/08/30 22:09:29 ray Exp $
|
||||||
|
|
||||||
|
package com.threerings.media.tile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that a tileset has recolorization classes defined.
|
||||||
|
*/
|
||||||
|
public interface RecolorableTileSet
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Returns the colorization classes that should be used to recolor
|
||||||
|
* objects in this tileset.
|
||||||
|
*/
|
||||||
|
public String[] getColorizations ();
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TrimmedObjectTileSet.java,v 1.15 2004/08/27 02:12:41 mdb Exp $
|
// $Id: TrimmedObjectTileSet.java,v 1.16 2004/08/30 22:09:29 ray Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -39,6 +39,7 @@ import com.threerings.media.tile.util.TileSetTrimmer;
|
|||||||
* interchangeable (and more memory efficient).
|
* interchangeable (and more memory efficient).
|
||||||
*/
|
*/
|
||||||
public class TrimmedObjectTileSet extends TileSet
|
public class TrimmedObjectTileSet extends TileSet
|
||||||
|
implements RecolorableTileSet
|
||||||
{
|
{
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
public int getTileCount ()
|
public int getTileCount ()
|
||||||
@@ -74,10 +75,7 @@ public class TrimmedObjectTileSet extends TileSet
|
|||||||
return (_bits == null) ? -1 : _bits[tileIdx].sorient;
|
return (_bits == null) ? -1 : _bits[tileIdx].sorient;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// documentation inherited from interface RecolorableTileSet
|
||||||
* Returns the colorization classes that should be used to recolor
|
|
||||||
* objects in this tileset.
|
|
||||||
*/
|
|
||||||
public String[] getColorizations ()
|
public String[] getColorizations ()
|
||||||
{
|
{
|
||||||
return _zations;
|
return _zations;
|
||||||
|
|||||||
Reference in New Issue
Block a user