Commit Graph

28 Commits

Author SHA1 Message Date
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
Andrzej Kapolka f6b35f8217 Added a method to get the resource path of a file within the
resource directory.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@545 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-19 01:45:11 +00:00
Charlie Groves 9d5f63d758 Expose the locale prefix and resource list to the whole world
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@524 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-05 00:14:28 +00:00
Mike Thomas 2381ec5640 Split out the creation of the file & network resource bundles so that subclasses can potentially create their own extensions to these.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@515 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-29 23:44:40 +00:00
Charlie Groves 7ddd442d68 Break createResourceBundle out of resolveResourceSet such that subclasses might make their own types of resource bundles
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@513 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-28 01:56:07 +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
Andrzej Kapolka 7c67df8e37 Made the initResourceDir method public so that we can reconfigure
the resource directory in tools.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@504 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-23 19:30:47 +00:00
Mike Thomas ef15781c28 Add the ability for network resource bundles to have an index file which tells them which files they should expect to find. This turns out to be pretty useful since resources try to grab a locale-specific version first, which often fails, and then they have to grab their generic version. This allows us to bypass some of this latency when we're able to know ahead of time which resources we will have.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@500 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-22 18:34:37 +00:00
Michael Bayne 7835b083b8 Nixed some if true then true (ITTT?) stylings. Ray happiness++.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@499 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-21 11:19:51 +00:00
Mike Thomas 9d6fa8d4d5 The earlier workaround didn't succeed in working around anything. The stream's data got used up in the failing attempt to create the image and so there's nothing left to create it the second way.
Instead, let's directly check the java version number.  Oh, the hackery...  (The check-versions functionality should perhaps be moved to RunAnywhere in samskivert, but this should work for now.)



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@377 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-13 03:29:19 +00:00
Mike Thomas a06eddcd95 Super-sweet. Java 1.4.2 apparently has some kind of awesome bug in its MemoryCacheImageStream. Let's work around that by falling back to the Image IO reading that's gonna bork in sandbox land. Guess anything in a sandbox is gonna require Java 1.5 unless we find a different way around this.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@376 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-13 00:48:34 +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
Michael Bayne cba2fc4f67 Freak not out when loading images from input streams in a sandbox.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@333 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-08 02:36:17 +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
Michael Bayne 7a65a62927 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@262 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-06-14 17:42:52 +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
Mark Johnson 9e30c0be4b When unpacking, tell the observer we've started so that the client can display something to
the user at the start, rather then after the first bundle has completed.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@157 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-19 18:26:57 +00:00
Michael Bayne 420140a3bc Oh the bad choice of property names. That's not no. Also added a comment
explaining why we don't care if we get a SecurityException.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@136 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 19:25:09 +00:00
Michael Bayne 5fe2a337c1 This needs to be done in a sandbox safe manner.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@135 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 19:23:35 +00:00
Michael Bayne c69a5527b9 Don't register the resource: handler by default. It causes problems and we only
want to do it in our clients. Also demoted some log messages to debug and
widened.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@134 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 07:34:08 +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
Mike Thomas e74970ac1e Also need to adjust the path to find localized resource files if we come through the getResource/getImageResource calls that pass us a resource set.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@85 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-02 01:41:28 +00:00
Mike Thomas 5fda18ef31 Add two features our multi-locale yohoho is going to need:
- Ability to set a locale prefix in which to search for locale-specific images.
- Ability to clear the image cache (we want to do this when we switch locales, otherwise we end up with wrong-language images cached.)


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@83 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-01 18:49:09 +00:00
Michael Bayne dd7c611975 Various sandbox related fallbacks.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@36 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-08-25 05:04:59 +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