Commit Graph

733 Commits

Author SHA1 Message Date
Ray Greenwell 71109615bc Added setMirage().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2678 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-24 02:25:10 +00:00
Ray Greenwell 0d79024b5c When centering on a pathable, center on its center rather than its
upper-left coordinate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2677 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-24 02:24:54 +00:00
Michael Bayne 25ebfba64f For some strange reason, reusing Colorization instances causes character
creation to break.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2675 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-23 18:06:57 +00:00
Michael Bayne 28a9441143 Allow the ImageManager to function if we're running in headless mode. It
will create all images as 32-bit ARGB.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2674 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-23 17:59:04 +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
Ray Greenwell d9e38c1d35 Don't hork if there is a config for a music key, but it's empty.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2647 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-07 00:41:25 +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 52e5206ff4 Keep a single colorization record around for each ColorRecord rather than
creating the same Colorization instance over and over each time we're
asked for one.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2641 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-05 17:31:21 +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
Ray Greenwell 35f7f0806b Make sure that the transparent color is first in the colormap so that
Java's png encoder doesn't get confused and merge black pixels into
the transparency.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2636 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-04 05:56:58 +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
Ray Greenwell 3f0d839400 Noted that I had changed the QUICK constant to false.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2625 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 03:08:37 +00:00
Ray Greenwell c941c96141 Color reduction algorithm. From web, with modifications to support
transparency.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2624 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 03:02: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 cb0d7713b5 Use our handy dandy new DelegatingPathable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2590 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-20 04:09:13 +00:00
Michael Bayne 1981f9b2d2 A helper class for easily delegating all calls but those we want to mess
with to a subordinate pathable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2589 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-20 04:04:56 +00:00
Michael Bayne 234e8a8ade Make available the frame that we manage.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2588 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-19 03:01:13 +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 4d19964e46 A handy class to sequence paths.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2585 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 02:22:52 +00:00
Ray Greenwell cf99e657e7 Allow a LinePath to be constructed with only one point, and the
source point will be the position of the pathable at initialization time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2584 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 02:22:19 +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
Michael Bayne d4c4596403 Build our new unsafe library (on Linux at least) and some other random
viztool crap that doesn't really matter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2561 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-09 03:24:12 +00:00
Michael Bayne fa5c8cc6a3 Use our native (select()-based) sleep() on Linux to achieve 10ms
granularity instead of 20ms which is what we get from Thread.sleep() which
probably uses the less than aptly named nanosleep() which seems to give
about that granularity.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-08 21:26:27 +00:00
Michael Bayne 704cee77d1 No more regions of interest, now we follow pathables.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2555 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-08 16:10:50 +00:00
Michael Bayne fac7c3cb75 The frame manager may decide not to paint us if needsPaint() returns
false, but we still need to call willPaint() after *every* tick, so we
have to do that in needsPaint() where we can be sure it will get called.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2554 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-08 05:46:45 +00:00
Ray Greenwell 4d267ebc8c Allow specification of a background image to tile the background
of the panel in an aligned manner.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2553 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-08 04:52:24 +00:00
Michael Bayne 684102f32e Use mirages in tileImage*.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2550 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-07 19:14:38 +00:00
Ray Greenwell e174e71b8a Subsumed tileImageAcross and tileImageDown into the new tileImage.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-07 01:48:27 +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 56df0d29f5 Let's actually use the flip buffer capabilities that we go to such trouble
to create.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-05 01:41:57 +00:00
Michael Bayne baf4873fa6 Not to freak out if we can't get a graphics to lay out our FPS label.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2542 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-04 23:28:18 +00:00
Michael Bayne 21210eae62 Documentation clarification.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2541 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-04 18:50:23 +00:00
Ray Greenwell 9643db4632 Use RunAnywhere.isLinux() to determine if we should skip draining.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2538 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-03 00:13:04 +00:00
Michael Bayne 352b3d3d6d We need to dispose of the graphics that we obtain from getDrawGraphics().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2536 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:54:56 +00:00
Michael Bayne 2d0897ed4b Default to flip-buffer rendering on the MacOS because the volatile back
buffer approach don't work.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2535 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:53:55 +00:00
Michael Bayne df50d9fb0d Only do the Windows copyArea() workaround on Windows because it crashes
the MacOS JVM (though the MacOS JVM has the same fricking bug, it's just
that the workaround doesn't "work").


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2534 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:49:57 +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 6669e39a8e Added other forms of getPreparedImage();
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2529 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:09:28 +00:00
Michael Bayne c7765a9862 Added getPreparedImage().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 22:59:20 +00:00
Michael Bayne e9b0df1751 Scratch that, reverse it. We just have to recreate our graphics objects,
not the whole image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2526 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 18:46:42 +00:00
Michael Bayne 7c7db998ac With this fix, and the new JVM, I think full screen actually works now.
It's a miracle!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2523 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 18:03:17 +00:00