From fbb1ce9a755af2a406584353bfb6f7b2abcb8e3e Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 8 Nov 2010 22:27:05 +0000 Subject: [PATCH] Pass our component and color classes to CastUtil explicitly. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@993 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../stage/tools/viewer/ViewerScenePanel.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/stage/tools/viewer/ViewerScenePanel.java b/src/java/com/threerings/stage/tools/viewer/ViewerScenePanel.java index ec387cb8..6623f04f 100644 --- a/src/java/com/threerings/stage/tools/viewer/ViewerScenePanel.java +++ b/src/java/com/threerings/stage/tools/viewer/ViewerScenePanel.java @@ -64,8 +64,12 @@ public class ViewerScenePanel extends StageScenePanel _charmgr = charmgr; // create the character descriptors - _descUser = CastUtil.getRandomDescriptor("female", ctx.getComponentRepository()); - _descDecoy = CastUtil.getRandomDescriptor("male", ctx.getComponentRepository()); + _descUser = CastUtil.getRandomDescriptor( + ctx.getComponentRepository(), "female", COMP_CLASSES, + ctx.getColorPository(), COLOR_CLASSES); + _descDecoy = CastUtil.getRandomDescriptor( + ctx.getComponentRepository(), "male", COMP_CLASSES, + ctx.getColorPository(), COLOR_CLASSES); // create the manipulable sprite _sprite = createSprite(_descUser); @@ -250,4 +254,13 @@ public class ViewerScenePanel extends StageScenePanel /** The test sprites that meander about aimlessly. */ protected CharacterSprite[] _decoys; + + /** Defines our various character component classes. */ + protected static final String[] COMP_CLASSES = { + "legs", "feet", "hand_left", "hand_right", "torso", + "head", "hair", "hat", "eyepatch" }; + + /** Defines the colorization classes used in the character component images. */ + protected static final String[] COLOR_CLASSES = { + "skin", "hair", "textile_p", "textile_s" }; }