diff --git a/src/java/com/threerings/cast/CharacterManager.java b/src/java/com/threerings/cast/CharacterManager.java index bcda0c1d3..37f551ba5 100644 --- a/src/java/com/threerings/cast/CharacterManager.java +++ b/src/java/com/threerings/cast/CharacterManager.java @@ -251,6 +251,9 @@ public class CharacterManager Log.debug("Compositing action [action=" + action + ", descrip=" + descrip + "]."); + // this will be used to construct any shadow layers + HashMap shadows = null; + // create colorized versions of all of the source action frames ComponentFrames[] sources = new ComponentFrames[ccount]; for (int ii = 0; ii < ccount; ii++) { @@ -268,16 +271,16 @@ public class CharacterManager sources[ii].frames = (zations == null || zations[ii] == null) ? source : source.cloneColorized(zations[ii]); - // load up the shadow images if they are needed - if (sources[ii].ccomp.componentClass.shadowed) { - sources[ii].shadowFrames = sources[ii].ccomp.getFrames( - action + StandardActions.SHADOW_SUFFIX); - if (sources[ii].shadowFrames == null) { - Log.warning("Missing shadow frames for action " + - "[action=" + action + - ", comp=" + sources[ii].ccomp + "]."); - } - } +// // load up the shadow images if they are needed +// if (sources[ii].ccomp.componentClass.isShadowed()) { +// sources[ii].shadowFrames = sources[ii].ccomp.getFrames( +// action + StandardActions.SHADOW_SUFFIX); +// if (sources[ii].shadowFrames == null) { +// Log.warning("Missing shadow frames for action " + +// "[action=" + action + +// ", comp=" + sources[ii].ccomp + "]."); +// } +// } } // use those to create an entity that will lazily composite things diff --git a/src/java/com/threerings/cast/ComponentClass.java b/src/java/com/threerings/cast/ComponentClass.java index 4681490e7..c92ade1eb 100644 --- a/src/java/com/threerings/cast/ComponentClass.java +++ b/src/java/com/threerings/cast/ComponentClass.java @@ -117,24 +117,14 @@ public class ComponentClass implements Serializable * be null if a system does not use recolorable components. */ public String[] colors; - /** Indicates whether or not components in this class have an associated - * shadow image. */ - public boolean shadowed; + /** Indicates the class name of the shadow layer to which this component + * class contributes a shadow. */ + public String shadow; /** Null for a normal component, the color of the pre-composited shadow for * the special "shadow" component class. */ public Color shadowColor; - /** Zero for a normal component, defines the (inclusive) lower bound of the - * range of components whose shadow will be included in this pre-composited - * shadow layer for a shadow component. */ - public int minShadowPri; - - /** Zero for a normal component, defines the (inclusive) upper bound of the - * range of components whose shadow will be included in this pre-composited - * shadow layer for a shadow component. */ - public int maxShadowPri; - /** * Creates an uninitialized instance suitable for unserialization or * population during XML parsing. @@ -177,6 +167,25 @@ public class ComponentClass implements Serializable _overrides.insertSorted(override); } + /** + * Returns true if this component class contributes a shadow to a + * particular shadow layer. Note: this is different from being a + * shadow layer which is determined by calling {@link #isShadow}. + */ + public boolean isShadowed () + { + return (shadow != null); + } + + /** + * Returns true if this component class is a shadow layer rather than a + * normal component class. + */ + public boolean isShadow () + { + return (shadowColor != null); + } + /** * Classes with the same name are the same. */ @@ -211,10 +220,8 @@ public class ComponentClass implements Serializable if (shadowColor != null) { buf.append(", shadow="); buf.append(StringUtil.toString(shadowColor.getComponents(null))); - buf.append(" (").append(minShadowPri).append("-"); - buf.append(maxShadowPri).append(")"); - } else { - buf.append(", shadowed=").append(shadowed); + } else if (shadow != null) { + buf.append(", shadow=").append(shadow); } return buf.append("]").toString(); } diff --git a/src/java/com/threerings/cast/CompositedActionFrames.java b/src/java/com/threerings/cast/CompositedActionFrames.java index 2dbaed973..8f85c3613 100644 --- a/src/java/com/threerings/cast/CompositedActionFrames.java +++ b/src/java/com/threerings/cast/CompositedActionFrames.java @@ -46,10 +46,6 @@ public class CompositedActionFrames public ActionFrames frames; - public ActionFrames shadowFrames; - - public ActionFrames cropFrames; - public String toString () { return ccomp + ":" + frames; }