From b5a19fc68d5950a6bb2132d4d7839df98736b169 Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Fri, 8 Oct 2010 18:56:17 +0000 Subject: [PATCH] Add a convenience function for checking start color if you have the full colorPrint git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1017 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/java/com/threerings/media/image/ColorPository.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/java/com/threerings/media/image/ColorPository.java b/src/java/com/threerings/media/image/ColorPository.java index 0eab85c3..29b5d205 100644 --- a/src/java/com/threerings/media/image/ColorPository.java +++ b/src/java/com/threerings/media/image/ColorPository.java @@ -304,6 +304,16 @@ public class ColorPository implements Serializable return cids; } + /** + * Returns true if the specified color is legal for use at character creation time. false is + * always returned for non-existent colors or classes. + */ + public boolean isLegalStartColor (int colorPrint) + { + ColorRecord color = getColorRecord(colorPrint >> 8, colorPrint & 0xFF); + return (color == null) ? false : color.starter; + } + /** * Returns true if the specified color is legal for use at character creation time. false is * always returned for non-existent colors or classes.