Composite masks after generating the shadows so we can mask the shadows
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@57 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -295,17 +295,6 @@ public class CharacterManager
|
||||
}
|
||||
}
|
||||
|
||||
// add any necessary masks
|
||||
for (int ii = 0; ii < ccount; ii++) {
|
||||
ComponentFrames cframes = (ComponentFrames)sources.get(ii);
|
||||
CharacterComponent mcomp = (CharacterComponent)ccomps.get(
|
||||
cframes.ccomp.componentClass.mask);
|
||||
if (mcomp != null) {
|
||||
cframes.frames = compositeMask(action, cframes.ccomp,
|
||||
cframes.frames, mcomp);
|
||||
}
|
||||
}
|
||||
|
||||
// now create any necessary shadow layers
|
||||
if (shadows != null) {
|
||||
Iterator iter = shadows.entrySet().iterator();
|
||||
@@ -320,6 +309,18 @@ public class CharacterManager
|
||||
}
|
||||
}
|
||||
|
||||
// add any necessary masks
|
||||
for (int ii = 0, nn = sources.size(); ii < nn; ii++) {
|
||||
ComponentFrames cframes = (ComponentFrames)sources.get(ii);
|
||||
CharacterComponent mcomp = (CharacterComponent)ccomps.get(
|
||||
cframes.ccomp.componentClass.mask);
|
||||
if (mcomp != null) {
|
||||
cframes.frames = compositeMask(action, cframes.ccomp,
|
||||
cframes.frames, mcomp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// use those to create an entity that will lazily composite things
|
||||
// together as they are needed
|
||||
ComponentFrames[] cfvec = (ComponentFrames[])sources.toArray(
|
||||
|
||||
Reference in New Issue
Block a user