diff --git a/src/java/com/threerings/media/image/ColorPository.java b/src/java/com/threerings/media/image/ColorPository.java index cb68db55..c617cdcd 100644 --- a/src/java/com/threerings/media/image/ColorPository.java +++ b/src/java/com/threerings/media/image/ColorPository.java @@ -23,6 +23,7 @@ package com.threerings.media.image; import java.util.ArrayList; +import java.util.Collection; import java.util.Iterator; import java.io.File; @@ -86,8 +87,8 @@ public class ColorPository implements Serializable public void addColor (ColorRecord record) { // validate the color id - if (record.colorId > 255) { - log.warning("Refusing to add color record; colorId > 255", + if (record.colorId > 127) { + log.warning("Refusing to add color record; colorId > 127", "class", this, "record", record); } else { record.cclass = this; @@ -251,6 +252,11 @@ public class ColorPository implements Serializable return _classes.values().iterator(); } + public Collection getClasses () + { + return _classes.values(); + } + /** * Returns an array containing the records for the colors in the * specified class. diff --git a/src/java/com/threerings/miso/data/ObjectInfo.java b/src/java/com/threerings/miso/data/ObjectInfo.java index 05c6239d..8e5df9c2 100644 --- a/src/java/com/threerings/miso/data/ObjectInfo.java +++ b/src/java/com/threerings/miso/data/ObjectInfo.java @@ -103,7 +103,7 @@ public class ObjectInfo extends SimpleStreamableObject */ public int getPrimaryZation () { - return (zations & 0xFFFF); + return (zations & 0xFF); } /** @@ -111,15 +111,31 @@ public class ObjectInfo extends SimpleStreamableObject */ public int getSecondaryZation () { - return ((zations >> 16) & 0xFFFF); + return ((zations >> 16) & 0xFF); + } + + /** + * Returns the tertiary colorization assignment. + */ + public int getTertiaryZation () + { + return ((zations >> 24) & 0xFF); + } + + /** + * Returns the quaternary colorization assignment. + */ + public int getQuaternaryZation () + { + return ((zations >> 8) & 0xFF); } /** * Sets the primary and secondary colorization assignments. */ - public void setZations (short primary, short secondary) + public void setZations (byte primary, byte secondary, byte tertiary, byte quaternary) { - zations = ((secondary << 16) | primary); + zations = (primary | (secondary << 16) | (tertiary << 24) | (quaternary << 8)); } /**