From 2fad609d6e016e0770a22839a79be038b91b3e3d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 12 Apr 2006 22:05:33 +0000 Subject: [PATCH] Allow shadows to be omitted without generating a warning. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4014 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/cast/CharacterManager.java | 7 ++----- src/java/com/threerings/cast/ComponentClass.java | 2 +- .../threerings/cast/bundle/BundledComponentRepository.java | 7 +++++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/cast/CharacterManager.java b/src/java/com/threerings/cast/CharacterManager.java index 23e8bf15f..054c7ce22 100644 --- a/src/java/com/threerings/cast/CharacterManager.java +++ b/src/java/com/threerings/cast/CharacterManager.java @@ -352,8 +352,8 @@ public class CharacterManager { final ComponentClass cclass = _crepo.getComponentClass(sclass); if (cclass == null) { - Log.warning("Components reference non-existent shadow layer class " + - "[sclass=" + sclass + + Log.warning("Components reference non-existent shadow layer " + + "class [sclass=" + sclass + ", scomps=" + StringUtil.toString(scomps) + "]."); return null; } @@ -369,9 +369,6 @@ public class CharacterManager source.frames = source.ccomp.getFrames( action, StandardActions.SHADOW_TYPE); if (source.frames == null) { - Log.warning("Missing shadow frames for action " + - "[action=" + action + - ", comp=" + source.ccomp + "]."); // skip this shadow component continue; } diff --git a/src/java/com/threerings/cast/ComponentClass.java b/src/java/com/threerings/cast/ComponentClass.java index 985957fbd..a58477611 100644 --- a/src/java/com/threerings/cast/ComponentClass.java +++ b/src/java/com/threerings/cast/ComponentClass.java @@ -120,7 +120,7 @@ public class ComponentClass implements Serializable /** The class name of the layer from which this component class obtains a * mask to limit rendering to certain areas. */ public String mask; - + /** Indicates the class name of the shadow layer to which this component * class contributes a shadow. */ public String shadow; diff --git a/src/java/com/threerings/cast/bundle/BundledComponentRepository.java b/src/java/com/threerings/cast/bundle/BundledComponentRepository.java index cf192771d..7d8d942cf 100644 --- a/src/java/com/threerings/cast/bundle/BundledComponentRepository.java +++ b/src/java/com/threerings/cast/bundle/BundledComponentRepository.java @@ -61,6 +61,7 @@ import com.threerings.cast.ComponentRepository; import com.threerings.cast.FrameProvider; import com.threerings.cast.Log; import com.threerings.cast.NoSuchComponentException; +import com.threerings.cast.StandardActions; import com.threerings.cast.TrimmedMultiFrameImage; /** @@ -344,6 +345,12 @@ public class BundledComponentRepository _setcache.put(dpath, aset); } + // if this is a shadow image, no need to freak out as they are + // optional + if (type.equals(StandardActions.SHADOW_TYPE)) { + return null; + } + // if that failed too, we're hosed if (aset == null) { Log.warning("Unable to locate tileset for action '" +