Commit Graph

302 Commits

Author SHA1 Message Date
Charlie Groves 7b7131bf7c Need to weak reference the values too if they're going to be collectable. Use Arrays.hashCode to calculate the hash code of a long[] thanks to Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@550 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-23 23:50:57 +00:00
Charlie Groves cd30b42cd8 Allow the size of the sound cache to be set in the sound manager's constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@549 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-23 22:00:22 +00:00
Charlie Groves 7ace9ac320 * Add a fringe tile cache
Fringe tiles are added to a WeakHashMap used across the scene panel as they're
created and then held with hard references by the scene blocks they're in.
Whenever the last scene block referencing a fringe tile goes out of the
influential radius, the fringe can be collected from the cache.  In fringe
heavy scenes this reduces the memory for fringe by a third.

* Remove the mask cache

The fringe cache reduced the number of times a mask needs to be generated, so
eliminate the mask cache in the hopes of reclaiming a little more memory.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@548 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-23 21:59:16 +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 49777fab3f Everybody's favorite new game show, Name That Thread
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@538 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-11 00:46:48 +00:00
Charlie Groves ef4e27cdd0 Need to synchronize around adjustSize as it can lead to a flush
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@536 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-10 23:33:58 +00:00
Charlie Groves d67c0bd7b7 Only use the set cache value for the current set of managers, don't store it in the RuntimeAdjust
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@535 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-10 21:37:57 +00:00
Mike Thomas 06e3217d6b Well that's just peachy. When we drawImage from a BufferedImage, the performance is relative to the size of the source image, not to the size of the resulting tile subimage. Therefore, for largish tileset sources, this was taking a Very Long Time. So, we take a subimage first and use that for our drawing. (I believe it's still accurate that we cannot just use the subimage directly due to various factors - though if we somehow could, it would save us some cache space).
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@534 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-10 20:29:20 +00:00
Charlie Groves 79bdb30108 Stop spamming the logs with every resource fetched over the network
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@532 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-10 00:42:23 +00:00
Charlie Groves 70ef6a644a Widened and genericized
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@528 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-06 21:16:45 +00:00
Charlie Groves 7d613a999a Allow cache sizes to be set programatically
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@527 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-06 21:15:05 +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
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
Charlie Groves 6a0da5531e Genercize
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@522 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-04 18:18:56 +00:00
Charlie Groves 795bfe0429 Log every time we get a resource from the network
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@521 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-04 18:18:10 +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
Mike Thomas 3839762bc8 Split out the actual loading from a particular URL to a static function we may want to call from other places.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@516 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-29 23:45:29 +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
Dave Hoover d6319c128d If we pass in a panel, we really DO want to use it.
And don't NPE if we resolve a block and don't have a panel (though my NPE was really
because of the first problem)


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@514 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-29 00:09:51 +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
Charlie Groves 2a2d36d528 Break SceneBlock and RethinkOp out of MisoScenePanel so the blocks in a visible region can be resolved without an underlying panel
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@512 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-28 01:55:15 +00:00
Charlie Groves 4ec18f5250 The resource url isn't necessarily going over http
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@511 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-28 01:29:50 +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
Charlie Groves b521b4bfbf Instead of caching the last 10 sound clips, cache up to 4 megs of clips
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@509 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-27 22:09:03 +00:00
Michael Bayne 209504479d Fix this user of samskivert's log object.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@507 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-27 18:53:20 +00:00
Charlie Groves 3b86bbe9cc Check if a block was the last visible one we were waiting on even if it was abandoned before it was resolved. The view location can change before resolution completes.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@506 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-23 23:49:38 +00:00
Charlie Groves dce34521a3 When refreshing a scene, only delay repaints if rethink finds new blocks to resolve
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@505 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-23 22:43:23 +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 bde434eb88 Remove some spurious debugging.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@502 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-23 01:18:22 +00:00
Mike Thomas 25be8e02df Need to include the bundle's ident in our lookup to the resource list.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@501 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-23 01:11:29 +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
Charlie Groves a012977741 Need to use floating point numbers if you want floating point math
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@498 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-20 22:04:13 +00:00
Charlie Groves 14dd85bb45 Switch to fixed-delay scheduling from fixed-rate so our interval being blocked
won't cause multiple calls to calibrate.  Since a fixed-delay Interval can't be
used with a RunQueue, move the calibrate interval onto the Timer's thread and
switch to floats for the drift ratio so synchronization isn't needed around
updating it as a double.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@497 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-20 21:05:46 +00:00
Charlie Groves c0b0b9c94a Start with no alpha so getting a paint before we're ticked doesn't blow up
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@495 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-14 21:18:54 +00:00
Charlie Groves 731c6fe082 Expose isResolved so things changing the block can decide if they should add or remove objects from it
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@494 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-14 06:30:35 +00:00
Michael Bayne 51c01493f2 Type safety, redundant case removal, other cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@490 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-09 11:39:45 +00:00
Charlie Groves 6029530e73 Wait till willStart to create the gleaming functions so subclasses can fill in their desired alpha ranges and so on and the huge constructors aren't needed
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@476 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-24 01:05:10 +00:00
Charlie Groves 5cca3c2fe2 Root needs to end with a slash
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@475 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-22 22:45:00 +00:00
Charlie Groves c44a63c3f4 Let us not go softly into unexplained resource failure
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@474 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-22 20:42:54 +00:00
Charlie Groves 0b5b4f41e5 Go ahead and add a toString for NetworkResourceBundle in the style of FileResourceBundle
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@473 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-22 18:34:34 +00:00
Charlie Groves 65a579c583 Log the failing URL when the security manager denies access
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@472 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-22 18:09:18 +00:00
Charlie Groves 9b20077820 Allow the min alpha to be specified in addition to the max
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@471 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-21 19:03:47 +00:00
Charlie Groves 0a5fff92d3 Don't require a SpriteManager for gleamed sprites that aren't used as sprites otherwise
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@470 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-19 23:05:47 +00:00
Charlie Groves b01c773d20 Generalize SceneObjectTips into SceneObjectIndicators to allow things other
than tooltips to be painted for interesting objects.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@469 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-19 23:05:04 +00:00
Charlie Groves ab5729654c Keep the drift ratio between .01 and 10 for timer siestas and fiestas
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@468 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-18 19:01:44 +00:00
Eric Woroshow 81c5760863 Added an AL context. Provide a method in the sound manager to preload sound data.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@459 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-07 18:57:41 +00:00
Andrzej Kapolka 10b2587fba I don't remember putting that there!
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@455 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-21 02:02:09 +00:00
Andrzej Kapolka fcb5fa200c Removed dependency on JME for OggStreamDecoder (use JOrbis
directly).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@454 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-21 02:00:20 +00:00
Charlie Groves 5a654ebd99 Don't compound the problem of the timer going into the past by sticking the drift at 0 for 5 seconds
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@445 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-13 01:27:04 +00:00