Get AS fringing actually working. We end up with a double-layer of sprites on the base tiles for the background as one and all the fringing as another. This is definitely pretty slow in the debug player, so still need to track down what's spending all that time.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@954 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Mike Thomas
2010-07-15 19:03:55 +00:00
parent 6a064af9dc
commit 3d70c731a5
13 changed files with 172 additions and 39 deletions
@@ -20,6 +20,7 @@
package com.threerings.miso.tile {
import com.threerings.media.tile.TileManager;
import com.threerings.util.Set;
/**
* Extends the basic tile manager and provides support for automatically generating fringes in
@@ -27,6 +28,28 @@ import com.threerings.media.tile.TileManager;
*/
public class MisoTileManager extends TileManager
{
// TODO: Fringing.
public function setFringer (fringer :AutoFringer) :void
{
_fringer = fringer;
}
public function getFringer () :AutoFringer
{
return _fringer;
}
override public function ensureLoaded (tileSets :Set, completeCallback :Function,
progressCallback :Function) :void
{
// Get those we'll use to fringe with us, too.
var fringeSets :Set = _fringer.getFringeSets(tileSets);
fringeSets.forEach(function (tsetId :int) :void {
tileSets.add(tsetId);
});
super.ensureLoaded(tileSets, completeCallback, progressCallback);
}
protected var _fringer :AutoFringer;
}
}