Dave Hoover
b473318b12
More import cleanups to go with r662, along with a little bit of foreaching, widening, etc.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@664 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-26 17:29:23 +00:00
Michael Bayne
8e69ff612e
Some import cleanups from Dave.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@662 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-25 22:16:10 +00:00
Michael Bayne
a2f5bd532e
In this case I think the helper function reduces clarity rather than adds.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@643 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-21 18:30:01 +00:00
Charlie Groves
81a2d3d104
Clean up some possible nulls to quiet Eclipse
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@641 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-21 01:50:06 +00:00
Michael Bayne
659f5bc5e2
Code hygiene. Not as pedantic as I'd like, but I couldn't resist the huge time
...
saver that is Eclipse's "Infer generic types" which leaves HashMap and
ArrayList as the declared type where I would normally prefer to change those to
Map and List and use Maps and Lists to instantiate them.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@593 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 15:56:37 +00:00
Dave Hoover
5f1eed7b94
Add in @Overrides across the board, clean up the comments around them some, and remove
...
unneeded imports.
I've got partially completed patches for narya & vilya, too, but nenya was the
only one that wound up in a decent state after a friday evening puttering at it,
killing time waiting on other things to finish.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@572 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-14 18:19:23 +00:00
Charlie Groves
228762fc0d
Pass the set of all valid paths through to getFramePath so it can fall back to the default action if the specified action doesn't exist
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@523 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-04 23:42:36 +00:00
Mike Thomas
c2561037f0
Create a way to find out what the resource path is for the component & action in question.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@517 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-30 03:17:24 +00:00
Michael Bayne
e00b4ddd6b
Switch to new logging API.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@510 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-27 22:55:10 +00:00
Mike Thomas
8a10f090da
Apparently only yohoho ever uses the runtimeadjust stuff, so we don't care about backwards compatibility and this naming scheme is better. We now have ClientImageManager and ImageManager.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@434 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-06 18:56:26 +00:00
Mike Thomas
f00ff51a7b
Split the runtime-adjustment functionality of ImageManager out. In order to preserve backwards compatibility, the complete functionality including runtime-adjustment can be found in ImageManager which now extends BaseImageManager. The bulk of functionality is now in BaseImageManager and anyone who wants an image manager without the RuntimeAdjustment bits (it uses ClientPrefs and thus isn't friendly in server-land) should use that directly.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@433 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-06 18:31:04 +00:00
Charlie Groves
80a952de68
The DirectoryComponentBundler task doesn't create a single output stream for a jar file, so fout doesn't need to be closed at the end of the bundling
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@378 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-13 18:51:48 +00:00
Mike Thomas
c73ec397e0
The old way I had the Directory-based bundlers checking for out-of-dateness was prone to error in the face of new files or unfortunate subdirectory situations. Now check on an entry-by-entry basis instead, which is much happier.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@351 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-15 21:56:34 +00:00
Mike Thomas
d6b01cab7a
Enable keyword substitution on these new files.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@348 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-13 19:24:53 +00:00
Mike Thomas
f57e973987
Rather than forcing a rebuild of our tileset and component bundles every time when we're deploying to a directory bundle, decide based on the oldest modification time stamp of any file within the directory. Otherwise, these builds get crazy long.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@347 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-13 18:29:49 +00:00
Mike Thomas
a0b5874d5f
Since we're dropping in individual files here, always assume out of date rather than using the directory's modification time. Eventually, maybe we can scan the directory for the newest file and use that, but we'll cross that bridge later.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@346 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-13 17:49:05 +00:00
Mike Thomas
ee73dd43de
New type of ResourceBundle - NetworkResourceBundle - This bundle grabs its resources over HTTP from a root URL rather than from a local jar file. To make use of this, we need a way to put all the contents of the bundle into an appropriate directory instead of a jar, including its metadata, so some new Bundler Tasks were created to do this. Finally, allow tile set trimming to be done to a non-raw image format through passing an optional imgFormat parameter. If no parameter is passed, it'll default ot the old behavior of using raw/FastIO. Note that to use network bundles, you can set the set_type in the resource manager.properties file. (e.g. "resource.set_type.tilesets = network") If no set_type is set for a resource set, it defaults to a normal FileResourceBundle
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@343 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-13 01:12:18 +00:00
Mike Thomas
b9d255b032
We can't reliably make the decision as to how to load the image (FastImageIO/raw v normal) at the ResourceManager level - the path name by this point may be a file in the cache which will have lost its indicative extension. Instead, make the decision before we turn the resource path into an actual file name. This fixes YPP's current image loading issues.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@318 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-29 20:15:25 +00:00
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
Charlie Groves
205d57a7fe
Allow TileSetRuleSets to specify a custom tileset tag name, and use that to allow UniformTileSets as <uniformTileset> in addition to the existing SwissArmyTileSets as <tileset> in the bundle tasks.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@281 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-02 23:18:16 +00:00
Mike Thomas
1f435d582d
If our build process fails to properly trim a tile set, it's kinda a big deal, so throw a BuildException so ant hears about it and stops.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@280 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-07-30 20:59:32 +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
Michael Bayne
8df7f7e0b3
Support (but don't require) compiling to a custom destination directory.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@150 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-07 18:44: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