Major media subsystem revamp:

- All images are loaded through the image manager
- Architected to allow the use of prepared or unprepared images (and
  volatile images when the day comes that they support alpha)
- Tunable caches for images and tiles
- Resource manager caches unpacked resources on the filesystem
- Various and sundry other cleanups


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2116 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-01-13 22:49:47 +00:00
parent 8743be2131
commit 100aa3ace3
46 changed files with 1602 additions and 888 deletions
@@ -1,20 +1,20 @@
//
// $Id: SparkAnimation.java,v 1.1 2002/11/27 01:37:14 shaper Exp $
// $Id: SparkAnimation.java,v 1.2 2003/01/13 22:49:46 mdb Exp $
package com.threerings.media.animation;
import java.awt.AlphaComposite;
import java.awt.Composite;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Rectangle;
import java.util.Arrays;
import com.threerings.media.animation.Animation;
import com.threerings.util.RandomUtil;
import com.threerings.media.animation.Animation;
import com.threerings.media.image.Mirage;
/**
* Displays a set of spark images originating from a specified position
* and flying outward in random directions, fading out as they go, for a
@@ -41,7 +41,7 @@ public class SparkAnimation extends Animation
public SparkAnimation (Rectangle bounds, int x, int y, int jog,
float minxvel, float minyvel,
float xvel, float yvel,
float g, Image[] images, long delay)
float g, Mirage[] images, long delay)
{
super(bounds);
@@ -141,7 +141,7 @@ public class SparkAnimation extends Animation
gfx.setComposite(_comp);
// draw all sparks
for (int ii = 0; ii < _icount; ii++) {
gfx.drawImage(_images[ii], _xpos[ii], _ypos[ii], null);
_images[ii].paint(gfx, _xpos[ii], _ypos[ii]);
}
// restore the original composite
gfx.setComposite(ocomp);
@@ -158,7 +158,7 @@ public class SparkAnimation extends Animation
}
/** The spark images we're animating. */
protected Image[] _images;
protected Mirage[] _images;
/** The number of images we're animating. */
protected int _icount;