Charlie Groves
611098c7d6
Mac version of Dave's libunsafegc
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@400 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-17 23:40:42 +00:00
Dave Hoover
406b2a4662
Break Unsafe apart into Unsafe and UnsafeGC, the latter having only the
...
things to play with garbage collection. The gc stuff required JVMPI which the
"server" jvm doesn't have, so poor saps like me with two processors and gobs
of ram needed to hack things to run yohoho & force java to run with the
"client" vm since it used stuff out of unsafe (but not the gc stuff)
Still need to hit up people to build me the shared objects on other platforms,
but the linux ones are there & working.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@398 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-17 23:10:46 +00:00
Dave Hoover
f91b7714a5
Remove unneeded casts.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@397 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-17 01:26:05 +00:00
Dave Hoover
d8367eeb6f
Quick smattering of type safety to go along with other misc cleanup I've
...
got in progress over in yohoho.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@395 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-15 21:32:59 +00:00
Dave Hoover
56df6f1913
Truth in commenting: the DirectoryTileSetBundler isn't rewriting things in our own image format
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@392 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-10 19:55:45 +00:00
Dave Hoover
9733142d35
It's not a perfect solution, but make it so we can call the tile trimming task and
...
not actually write out new image to a file if we don't need to.
This cuts my tileset building from 42 seconds to 22 when no files have changed
(as opposed to 4 when it was skipping it altogether, but winding up with a hosed
tsbundles.dat), so it's at least a decent bit better.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@391 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-10 19:51:24 +00:00
Dave Hoover
9458c0704a
Truth in commenting: don't claim we can't trim something and then immediately turn around and trim it.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@390 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-10 19:27:49 +00:00
Dave Hoover
7ef9682355
We can't skip these tilesets even if they're up to date like this, since we would've
...
done some extra logic & changed the tileset on the bundle. I obviously want to fix this
so things aren't so insanely grindy when nothing's changed, but it's time to run for my
train, so in the meantime I'm going to make this burn cpu but do the right thing.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@389 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-10 01:45:15 +00:00
Michael Bayne
73b8dd0d48
Nix stray crowd dependency. No one uses this interface.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@382 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-18 00:19:18 +00:00
Charlie Groves
ce1649d79b
Don't adjust the image path to end in .raw since we're actually making .pngs
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@380 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-13 19:17:42 +00:00
Charlie Groves
60cb064c21
Vestigial Random
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@379 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-13 18:55:30 +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
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
Dave Hoover
1074d68d5f
While one could fake this up by asking for all objects in a region large
...
enough to cover the scene, I really just wanted a quick & dirty way to get
all objects in the scene.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@372 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-12 07:55:51 +00:00
Dave Hoover
8f2700dcc8
Keyword substitution.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@359 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-03 21:08:33 +00:00
Michael Bayne
d0f8f1e1d0
Turns out people had extended Sprite and added their own Comparable
...
implementation, so let's not stick a fork in that.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@353 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-22 06:45:42 +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
c68df0bab2
If the directory is missing/empty, don't fail to get the last modification date.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@350 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-15 18:28:20 +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
785eb10234
Other errors can occur when loading native keyboard lib, such as security exceptions, so let's catch those too and cope.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@342 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-13 00:44:53 +00:00
Michael Bayne
93e28d42a6
Let's just install rather than build and install here as well.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@337 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-10 19:43:07 +00:00
Michael Bayne
fd64f4d460
Nix unused imports.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@336 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-10 01:19:07 +00:00
Michael Bayne
5485cf2ab4
Make our ManagedRoot available to callers.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@335 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-09 23:00:04 +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
Dave Hoover
ffd07764ee
In case something goes screwy and we come up with a bogus time to sleep waiting
...
on our sound to play, make sure we do at least our half second fudge, rather
than spewing errors as we try to sleep for negative amounts of time.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@332 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-07 18:34:40 +00:00
Dave Hoover
e46e126604
Cut this back; 16 seems to be adequate, and with how everything's structured
...
right now, we only cancel looping sounds after working with a full buffer's
worth of audio, so going too large is problematic.
It'd probably be a Good Thing to do something a little fancier for cancelling
looping sounds more immediately, but for now, we'll stick with close to what's
been the status quo for years.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@331 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-05 19:58:43 +00:00
Michael Bayne
9055539f69
We want to hear about repaints, though I need to test this more in various
...
other scenarios to really really be sure. Oh the twisty maze of AWT passages.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@330 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-11-03 00:45:12 +00:00
Dave Hoover
bbbb5a2498
Only jump through extra hoops converting our sounds to pcm if we need to
...
(e.g. decoding oggs, but not playing wavs)
And then make looping work even if we're playing something that doesn't
support resetting to marks in the stream (e.g. decoding oggs)
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@325 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-31 23:34:03 +00:00
Mike Thomas
5ab6e41f2f
Rename parameters to reflect reality.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@324 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-31 23:21:59 +00:00
Dave Hoover
b0a9cb847e
Millis, not seconds.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@322 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-30 23:10:40 +00:00
Dave Hoover
bf50fef84c
When playing sounds, sleep for our estimated line reading time based on
...
how long we think the sound will really take to play, not how long the last
chunk of our buffer will take. With bumped up LINEBUF_SIZE, we'd sleep longer,
but would actually START sleeping much sooner, so we would truncate sounds.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@321 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-30 22:54:46 +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
Dave Hoover
618e688aab
Nix unnecessary cast and unused compare function.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@314 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-26 22:55:49 +00:00
Michael Bayne
cbe348db9a
Fixed warning messages.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@313 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-26 20:17:30 +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
9103590534
Load our images directly. Yay.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@311 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-26 19:52:52 +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
Dave Hoover
0f98f64a9a
If we want to use fancier SPI things (such as the stuff to trivially let us
...
play oggs), we need to jump through slightly more hoops with our audio.
Also, bumping up LINEBUF_SIZE appears to clear up some general issues with
linux playback being worse than other platforms, but definitely solves issues
where playing ogg turned into a bowl of rice krispies on all platforms.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@308 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-23 00:08:22 +00:00
Dave Hoover
1ebd28a450
Little bit of widening, type safety, and flagging overrides.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@306 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-17 23:34:32 +00:00
Michael Bayne
07830b303f
Nixed a bunch of redundant casts.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@304 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-17 21:52:40 +00:00
Charlie Groves
e0a22877e2
This seems like its been pretty happy on ice, so take off the training wheels
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@303 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-12 20:11:00 +00:00
Mike Thomas
8bc738c6d8
If a scene block resolution somehow gets abandoned, remove it from the list of blocks we're awaiting. I'd like to believe this is related to the mysterious YPP missing scene block bugs we've seen forever, but since I can't reproduce it - no idea if it actually is.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@302 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-10 18:15:15 +00:00
Charlie Groves
094e6b1730
Dirty SceneObjectTips as they're laid out. This was relying on tips being added and laid out before the initial paint.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@299 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-08 23:00:20 +00:00
Charlie Groves
b4417cc330
Add a switch to disable dirtying the whole screen on an invalid component on the Mac again. I can't reproduce the problem now, and I might have just been seeing some sea monster badness before. Leave the current behavior on by default though.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@298 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-03 22:10:28 +00:00
Charlie Groves
1423c03890
Incidental genericity
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@297 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-03 21:26:25 +00:00
Charlie Groves
ddb3c92fa1
Let's not make things that actually compose stuff hop about the screen by using their VolatileMirage offset in the place of their origin offset.
...
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@296 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-09-26 22:18:27 +00:00