Michael Bayne
fbd52c2be3
Tone down cache performance reporting; upped image cache size by a meg.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-28 04:06:14 +00:00
Ray Greenwell
5398ce5656
Added support for adding a new bundle on the fly.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2666 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-19 01:12:32 +00:00
Michael Bayne
cbe229ccb7
Revamped BundledTileSetRepository to make it easier to add bundles on the
...
fly in the future; it also now provides efficient tileset name to tileset
id mappings which is exported via the TileSetRepository interface. Lastly,
TileManager now relies on TileSetRepository to efficiently provide tiles
by name or id and no longer maintains its own cache (because the
BundledTileSetRepository already maintains the same mappings).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2663 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-18 05:48:45 +00:00
Ray Greenwell
572570de75
Added a static createBundle() to create a jar file from an already prepared
...
TileSetBundle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2662 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-18 00:34:47 +00:00
Ray Greenwell
3fb9a4272d
Maximally compress jar files that we create.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2661 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-17 23:29:33 +00:00
Michael Bayne
ef6fe1c6ee
Whoops, left in a call to System.gc().
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2644 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-06 00:20:41 +00:00
Michael Bayne
d0ad3559cd
Use SoftReference rather than WeakReference, the former apparently being
...
subtly more appropriate for what we're doing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2642 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-05 17:32:03 +00:00
Michael Bayne
10f5536a6a
Not to create a key every time we do a lookup. Only create a key when we
...
know we're adding a new entry.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2637 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-04 22:00:59 +00:00
Michael Bayne
73a4a02aa1
A few substantial changes:
...
- Tiles are initialized after being constructed which makes life simpler
for custom tiles which no longer have to have their own constructor that
passes Tile's stuff down to it.
- Tiles are no longer LRU cached (because we blow through that cache
instantly on all but the smallest of scenes), and are now tracked by
weak references so that we guarantee that only one instance of a tile is
ever in memory.
- Added code to track and report memory usage of weak cached tiles as well
as "stray" tiles which are created through other means than asking a
TileSet for a tile (fringe tiles being the most prolific example).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2628 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-31 00:56:38 +00:00
Michael Bayne
acfea90fe4
Make our colorization options available.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2613 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 18:25:04 +00:00
Michael Bayne
9773147e54
Track and report statistics on the tile cache.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2587 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-17 18:39:26 +00:00
Ray Greenwell
e44f7c243a
Close streams immediately after using them.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2575 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-14 21:34:01 +00:00
Ray Greenwell
a323d157dd
UniformTileSets no longer need to have their tileCount set, they will
...
figure it out from their width/height compared to the source image's
width/height.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2573 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-13 21:33:58 +00:00
Michael Bayne
c0aacd5f41
Provide the colorization index when asking for an object colorization.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2572 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-13 02:16:21 +00:00
Michael Bayne
7f08d36ce7
Up the default tile cache to 2 megs.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2568 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-12 02:03:53 +00:00
Ray Greenwell
b9fdc60650
added a loadTileSet() that takes an ImageProvider,
...
added a way to register TileSets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2545 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-05 22:34:48 +00:00
Michael Bayne
55e84b0ae4
We can use the raw image here because we only use its dimensions.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2532 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:32:56 +00:00
Michael Bayne
1694881ac2
We can use the raw images here because we're just processing them into
...
other raw images.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2531 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:32:37 +00:00
Michael Bayne
77cd7f7efe
Renamed the methods that return raw tile images and added fat warnings not
...
to use these unless you're doing low-level image processing and will
eventually stuff the data into a prepared image.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2530 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:32:10 +00:00
Michael Bayne
72768a3a9e
More synchronization is needed! The dangers of multithreaded programming.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2485 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 17:38:06 +00:00
Michael Bayne
5c03adbb72
Added support for temporarily disabling image and tile cache flushing.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2483 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 07:33:15 +00:00
Michael Bayne
21889f5a9e
Trimmed tilesets are all fast. This should ensure that it's possible to
...
save the tileset image in fast format before doing so because the set of
formats for which we support trimming is slightly larger than those for
which we support saving in fast format. We don't use such formats
presently, so I'll temporarily punt.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2480 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 06:38:15 +00:00
Michael Bayne
b84f62e35d
If our image has been converted to fast format; load it up fast and propah!
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2478 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 06:35:09 +00:00
Michael Bayne
cab6cfb131
Convert images to "fast" images if possible. Also fixed a bug where it
...
wasn't cleaning up properly if it failed to generate a bundle. Plus the
error reporting is all much better.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2477 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 06:34:43 +00:00
Michael Bayne
65106d8815
Generate better error messages if we fail.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2476 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 06:33:40 +00:00
Michael Bayne
2051770c91
Synchronize access to the tile cache so that we can load tiles on other
...
threads.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2460 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-25 18:21:49 +00:00
Michael Bayne
34528419a0
We'll be needin' to use them tileset global colorizations if we got 'em.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2377 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-05 01:52:58 +00:00
Michael Bayne
ad266a629e
Added ability to fetch a tileset with specific colorizations.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-04 19:36:21 +00:00
Michael Bayne
1abea4cf12
Report the file we actually tried to load from the jar just for kicks.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-01 19:33:07 +00:00
Michael Bayne
927be852bd
Added support for providing colorization assignments when fetching tiles.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2367 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-01 02:16:28 +00:00
Michael Bayne
253079107c
Make object base dimensions available without having to instantiate an
...
object tile.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2328 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-26 00:18:55 +00:00
Ray Greenwell
e3e6077e1b
Don't complain if a direction for a spot is specified as '-1',
...
it's intentional.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2295 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-03 20:41:50 +00:00
Michael Bayne
77d0747692
Actually throw a NoSuchTileSetException when we say we're going it.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2293 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-28 02:03:43 +00:00
Michael Bayne
efec457ac7
Modified tileset bundler to not rebuild bundles that are demonstrably up
...
to date (all files involved in the making of the bundle are older than the
built bundle file).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2292 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-28 00:46:52 +00:00
Michael Bayne
4db9d58cb4
Handle spot information in such a way that we can easily tell if a spot
...
has been provided for an object tile or not.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2260 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:33:47 +00:00
Michael Bayne
03573d2a1e
Added hasSpot().
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2259 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:33:18 +00:00
Michael Bayne
a6e64a7f28
Added getTile(int fqTileId).
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2258 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:32:54 +00:00
Michael Bayne
e1a8bd2cc9
Added getTileSetId() and getTileIndex().
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2257 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:32:35 +00:00
Michael Bayne
db3790f438
Require spot orientations to be specified by direction string rather than
...
integer value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2254 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-11 06:18:59 +00:00
Michael Bayne
9e46af6dce
Make the spot information available via the object tile; convert object
...
tile internals to use dimension and points.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2244 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-06 06:23:05 +00:00
Michael Bayne
6b7f189fc6
Provide access to object tileset info.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2241 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-05 00:22:05 +00:00
Michael Bayne
103fcde490
Include the source tileset in the NoSuchTileException.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2239 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-04 21:38:46 +00:00
Michael Bayne
f2f8611028
Pass along the priorities and other business when trimming an object tile
...
set; also changed some things to be bytes since they are bytes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2231 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-04 02:59:47 +00:00
Michael Bayne
744421c9ec
Added support for specifying colorization classes that should be used to
...
colorize objects in particular tileset.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2226 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-29 21:53:51 +00:00
Michael Bayne
ec49d73391
Added support for default render priorities.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2225 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-29 21:31:37 +00:00
Michael Bayne
347a070e6a
Not to freak out if we get to a tileset image that we can't trim because
...
its hosed. Instead write an error image/tileset to the bundle and keep on
truckin'.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2219 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-24 21:51:26 +00:00
Michael Bayne
14331982f8
Return our image path if we have no name.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2217 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-24 21:42:15 +00:00
Michael Bayne
75f06dfd78
Removed inadvertently checked in debug logging.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2215 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-24 19:34:25 +00:00
Michael Bayne
18d0266055
Throw a sensible error message if we choke trimming a tileset.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2214 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-24 19:32:56 +00:00
Michael Bayne
e78c7fad81
Reinstated vessel tileset colorization hack.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2194 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-18 23:09:37 +00:00