Commit Graph

562 Commits

Author SHA1 Message Date
Michael Bayne 8c831a0f9f Oh how I love to fiddle with the serialVersionUID.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2157 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 09:11:37 +00:00
Michael Bayne c98f45e3a0 Let's get those nots in the right places.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2154 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 02:50:36 +00:00
Michael Bayne 0558830cff Had the beans above the frank.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2153 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 02:48:45 +00:00
Michael Bayne bd943707f3 Add debug toggles for running blank and disabling image preparation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2152 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 02:45:37 +00:00
Michael Bayne 01a3630493 Use the adjustment directly rather than going through the prefs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2150 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 02:36:18 +00:00
Michael Bayne 43bc29afd8 Static variables go above static constants.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2149 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 02:31:50 +00:00
Walter Korman c9dc85cd0d Added a variety of test listeners for the frame so that we can observe
events the frame receives, and a flag to toggle whether to add the
listeners.  Make sure to dispose of the frame graphics context if it
becomes invalid.  Removed code to prevent adding a frame participant more
than once since the observer list now handles that for us.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2148 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 02:21:07 +00:00
Michael Bayne 65af7a36e4 A preferences repository for narya.media preferences.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2146 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 00:47:29 +00:00
Michael Bayne 60a60d49ec Use runtime adjustments for our image and tile cache size.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2145 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 00:47:09 +00:00
Ray Greenwell 4ba1fe57c3 Modified so that it will work if re-inited with a new Pathable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2144 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 22:37:38 +00:00
Ray Greenwell 9587014664 A Path used to bobble a sprite...
..she's starting to shimmy!
      ..she's starting to shake!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2142 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 04:40:45 +00:00
Michael Bayne 6c7b0b3836 Create our image through the image manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2141 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 04:18:25 +00:00
Michael Bayne f26cfb322d Temporary hack to make all images translucent since that works around
strange slow rendering problems we see when we allow mixed BITMASK and
TRANSLUCENT images to be rendered.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2140 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 04:05:56 +00:00
Michael Bayne e38c4aaf80 Allow tilesets to be loaded in the background.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2139 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 02:52:04 +00:00
Michael Bayne 1512fdfa1f Begone ImageUtil.createImage(), all images are created through the image
manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2136 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 02:50:34 +00:00
Michael Bayne 3c58a1ac26 Use the appropriate transparency when creating our prepared image.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2135 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 00:59:55 +00:00
Michael Bayne 5a51f58bdd Go ahead and support primitive mirage loading so that the editor test tile
loader will work.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2131 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 00:23:19 +00:00
Michael Bayne ed847b964d Provide the appropriate transparency when requested.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2129 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 23:56:01 +00:00
Michael Bayne 98c2dd45db Deal with fucking stupid ass close() behavior from ImageInputStreamImpl.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2128 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 23:55:05 +00:00
Michael Bayne 0ae21770d0 Don't draw outside the lines.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2126 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 23:53:34 +00:00
Michael Bayne 100aa3ace3 Major media subsystem revamp:
- All images are loaded through the image manager
- Architected to allow the use of prepared or unprepared images (and
  volatile images when the day comes that they support alpha)
- Tunable caches for images and tiles
- Resource manager caches unpacked resources on the filesystem
- Various and sundry other cleanups


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2116 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 22:49:47 +00:00
Walter Korman 4956ed66ae Added and commented out debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2110 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 01:19:58 +00:00
Walter Korman 3bf267fc26 Fixed javadoc typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2109 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 01:19:33 +00:00
Ray Greenwell 125a0c4fef updated to reflect new home of ImageIOLoader
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2102 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-08 05:17:35 +00:00
Ray Greenwell d595a2fab8 Added a version of composeMaskedImage() that takes a Shape object to use
as the mask.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2101 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-08 04:28:13 +00:00
Michael Bayne 1ce6951cb6 Repackaged a few things in media: sounds stuff went into media.sound and
image stuff went into media.image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2100 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-08 04:09:03 +00:00
Michael Bayne 2807056a44 Close the InputStream instances we get from the resource manager after
we're done loading images from them.

Always load through a BufferedInputStream because that seems to fix the
bogosity with ImageIO.load() not working without a cache.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2098 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-07 07:55:24 +00:00
Michael Bayne 76abfba3c3 An animation that does nothing but hang around for a specified period of
time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2091 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-29 04:32:14 +00:00
Ray Greenwell 822dabef8c added a way to remove observers
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2073 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-18 23:14:23 +00:00
Walter Korman 3807953a55 Added MediaPanel.clearAnimations(), fixed up comments and removed
unnecessary SpriteManager.clearSprites().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2069 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-15 23:12:37 +00:00
Walter Korman 1c4503efe5 Added toString(DisplayMode).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2066 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-13 04:37:27 +00:00
Walter Korman 90a919720a Removed code to disallow adding an observer more than once since the
observer list now takes care of that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2064 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 23:56:36 +00:00
Michael Bayne df30c37892 Log a more informative message when we catch an exception.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2059 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 19:00:25 +00:00
Michael Bayne a2c3741b2b A few things:
- Use Constant objects for the command constants because the toString()
output on those is more sensible.

- Fall back to the classpath if we don't find our resource in a bundle

- Don't make the sound manager thread a daemon thread as it provides a
  shutdown() which is a more civilized way to make it go away anyhow and
  allows the sound manager to be used in one-shot tools and test
  programs. At the moment, the sound manager (on Linux at least) seems to
  start up some threads that refuse to go away anyway but that's a problem
  for another time.

- Report if a command is queued up that we don't know about.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-10 21:36:33 +00:00
Michael Bayne 3b09893292 The end of more font hackery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2046 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 05:13:45 +00:00
Walter Korman 100739bff5 Removed font hackery now that we've understood and fixed the "font bug",
which turned out to be due to improper restoring of the anti-aliasing
setting in graphics contexts.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2045 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 05:00:48 +00:00
Walter Korman ee83234bee Removed unused imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 04:42:54 +00:00
Michael Bayne 5e81502af3 Track and report our average number of dirty regions per tick.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2042 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-08 02:49:53 +00:00
Michael Bayne 8ab0623a9c Refuse to allow a frame participant to be added more than once; enhanced
FPS display, made it possible for frame participants to add to the
performance status string. Also modified perf status to be double
buffered. It's not repainting exactly properly at the moment; soon to be
remedied.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-08 02:49:12 +00:00
Michael Bayne 6caca5fe5a Added code to easily disable the sound manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2039 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 22:41:10 +00:00
Walter Korman e45ba41b0f Realized that the icon manager is caching icon tilesets, not icons
themselves, and accordingly dramatically reduced the cache size and fixed
comment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:13:00 +00:00
Walter Korman eda77a227d Use an LRUHashMap to cache icons.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2035 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:09:45 +00:00
Walter Korman acaf39b070 Estimate memory usage in bytes rather than pixel area, assuming an int per
pixel for now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:04:32 +00:00
Walter Korman ea545bcb66 Log the size of the cache along with its efficiency.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2033 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 01:10:25 +00:00
Walter Korman be34314e1a Report image cache performance in all relevant places.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 01:00:58 +00:00
Walter Korman 8c5d490b53 Use an LRUHashMap to cache images, and limit caching to 30 images.
Periodically log cache efficiency and estimated image size.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 00:58:00 +00:00
Michael Bayne acae62db72 Remove the frame rate logging because we have a handy dandy visual display
now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2026 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 23:21:25 +00:00
Walter Korman 28ee999426 Added facility for displaying the current frame rate information within
the frame buffer, and a debug chord (Alt+Shift+F) to toggle the display.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2025 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 22:07:28 +00:00
Ray Greenwell 83d9cf3363 added versions of lock() and unlock() that take a list of sound keys to
operate on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2023 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 21:42:34 +00:00
Walter Korman fc14518506 Removed verbose logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2022 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 03:01:12 +00:00