Render animations behind sprites in the back layer and in front of sprites

in the front layer which is generally what we want.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3190 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-10-29 17:10:46 +00:00
parent 78e7fd6837
commit b3de84c918
+10 -3
View File
@@ -1,5 +1,5 @@
//
// $Id: MediaPanel.java,v 1.45 2004/09/18 23:50:20 mdb Exp $
// $Id: MediaPanel.java,v 1.46 2004/10/29 17:10:46 mdb Exp $
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -42,6 +42,8 @@ import com.samskivert.util.IntListUtil;
import com.samskivert.util.RuntimeAdjust;
import com.samskivert.util.StringUtil;
import com.threerings.media.timer.MediaTimer;
import com.threerings.media.animation.Animation;
import com.threerings.media.animation.AnimationManager;
@@ -544,8 +546,13 @@ public class MediaPanel extends JComponent
*/
protected void paintBits (Graphics2D gfx, int layer, Rectangle dirty)
{
_animmgr.paint(gfx, layer, dirty);
_spritemgr.paint(gfx, layer, dirty);
if (layer == FRONT) {
_spritemgr.paint(gfx, layer, dirty);
_animmgr.paint(gfx, layer, dirty);
} else {
_animmgr.paint(gfx, layer, dirty);
_spritemgr.paint(gfx, layer, dirty);
}
}
/** The frame manager with whom we register. */