Commit Graph

11 Commits

Author SHA1 Message Date
Michael Bayne ee10bb11ed Extract FileResourceBundle into a separate subclass and hide it away from the
rest of the world.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@312 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-26 20:08:38 +00:00
Michael Bayne ecc173d6ad Revamped image loading such that the ResourceManager handles loading images
given a resource path so that it can be smart about loading from files versus
streams depending on what works based based on where the resources are coming
from. Also moved FastImageIO into com.threerings.resource to avoid a dependence
on com.threerings.media in resource.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@310 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-26 19:50:53 +00:00
Charlie Groves c45878681f If we're creating a CompositedMultiFrameImage with only a single source image and it's a TileSetFrameImage, just use the Mirages in that TileSet rather than creating a whole new set of BufferedImages to composite them into. This halves the image memory used by anything that's just colorizing and transforming its images and doesn't really need composition.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@295 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-09-26 21:49:11 +00:00
Charlie Groves 65b8cdbc3a Factor in the percentage of the databuffer a BufferedMirage is using to
estimate its memory if its BufferedImage is a subimage of another
BufferedImage.

Include the amount of memory used by colorizations in ImageManager's cache
usage calculations.

Crank ImageManager's cache size up to 32 megs since a) it's actually seeing the
memory used by colorizations and b) the new seamonsters are pretty sizable.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@291 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-30 22:50:24 +00:00
Michael Bayne 069fe85c70 A whole lot of widening, refactoring, thinking, rethinking and fiddling around
for what ultimately boils down adding this method to BundledComponentRepository:

    @Override // from IMImageProvider
    public Mirage getTileImage (String path, Rectangle bounds, Colorization[] zations)
    {
        // we don't need our images prepared for screen rendering
        BufferedImage src = _imgr.getImage(getImageKey(path), zations);
        if (bounds != null) {
            src = src.getSubimage(bounds.x, bounds.y, bounds.width, bounds.height);
        }
        return new BufferedMirage(src);
    }

So much fun to revisit code I wrote six years ago.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@283 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-03 22:04:04 +00:00
Andrzej Kapolka 6e7b1741ff Added the ability to add translations on a per-component-instance basis.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@160 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-28 21:51:47 +00:00
Michael Bayne b6f5317ad2 More header patrol.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@158 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-24 00:38:17 +00:00
Dave Hoover 120e9c0db9 Actually substitute keywords (these files are chock full of stale $Id$ tags)
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@119 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-24 00:22:12 +00:00
Mark Johnson 4175ec61da Let's allow crop mask images to be optional as well
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@61 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-10-19 18:29:28 +00:00
Ray Greenwell bb05bd3f3f Use the samskivert Predicate.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@39 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-08-28 18:39:13 +00:00
Michael Bayne c2117ee86d Behold, Nenya, Ring of Water and repository for our media and animation related
goodies, both Java 2D and LWJGL/JME 3D.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-06-23 18:07:28 +00:00