More work on character components.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@579 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-10-30 16:16:01 +00:00
parent 933a427b68
commit 3ea91cdfdd
19 changed files with 1099 additions and 191 deletions
@@ -1,22 +1,22 @@
//
// $Id: CharacterDescriptor.java,v 1.1 2001/10/26 01:17:21 shaper Exp $
// $Id: CharacterDescriptor.java,v 1.2 2001/10/30 16:16:01 shaper Exp $
package com.threerings.cast;
import com.samskivert.util.StringUtil;
/**
* The character descriptor object contains all necessary information
* on the character components that are composited together to create
* a character image.
* The character descriptor object details the components that are
* pieced together to create a single character image.
*/
public class CharacterDescriptor
{
/**
* Constructs the character descriptor.
*/
public CharacterDescriptor (int components[])
public CharacterDescriptor (ComponentType type, int components[])
{
_type = type;
_components = components;
}
@@ -29,16 +29,28 @@ public class CharacterDescriptor
return _components;
}
/**
* Returns the {@link ComponentType} of the character's components.
*/
public ComponentType getType ()
{
return _type;
}
/**
* Returns a string representation of this character descriptor.
*/
public String toString ()
{
StringBuffer buf = new StringBuffer();
buf.append("[").append(StringUtil.toString(_components));
buf.append("[type=").append(_type);
buf.append(StringUtil.toString(_components));
return buf.append("]").toString();
}
/** The array of component identifiers. */
protected int _components[];
/** The component type of the character's components. */
protected ComponentType _type;
}