Added the ability to add translations on a per-component-instance basis.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@160 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Andrzej Kapolka
2007-02-28 21:51:47 +00:00
parent dc4b721198
commit 6e7b1741ff
7 changed files with 170 additions and 83 deletions
@@ -21,6 +21,7 @@
package com.threerings.cast;
import java.awt.Point;
import java.util.Arrays;
import com.samskivert.util.StringUtil;
import com.threerings.media.image.Colorization;
@@ -75,6 +76,23 @@ public class CharacterDescriptor
_zations = zations;
}
/**
* Returns the array of translations to be applied to the components
* when compositing action images.
*/
public Point[] getTranslations ()
{
return _xlations;
}
/**
* Updates the translations to be used by this character descriptor.
*/
public void setTranslations (Point[] xlations)
{
_xlations = xlations;
}
/**
* Compute a sensible hashcode for this object.
*/
@@ -124,7 +142,7 @@ public class CharacterDescriptor
}
}
return true;
return Arrays.equals(_xlations, odesc._xlations);
}
/**
@@ -141,4 +159,7 @@ public class CharacterDescriptor
/** The colorizations to apply when compositing this character. */
protected Colorization[][] _zations;
/** The translations to apply when compositing this character. */
protected Point[] _xlations;
}