Commit Graph

549 Commits

Author SHA1 Message Date
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
Walter Korman 6552b5bd8b Include the timestamp associated with sprite events in the event.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2020 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 02:45:09 +00:00
Ray Greenwell c321f7eb33 - added debug logging so that we can see the time elapsed between the
moment that a sound is requested to just before the LineSpooler object
  that it was given to starts writing the data to a line.
- Turned drain() back on, but only if we're not running under linux.
  If we're in linux, we instead sleep for 3 seconds, and gosh darn it, the
  sound should be finished after that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2019 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 02:14:12 +00:00
Michael Bayne 1d9de38b61 Make the frames per second info available to callers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2018 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 01:25:17 +00:00
Michael Bayne 6cabb846c5 Use a separate runnable for the AWT queue to avoid a call to
EventQueue.isEventDispatchThread() and to make Ray happy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2017 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:42:21 +00:00
Michael Bayne b2454c59f3 Removed performance monitor stuff because we can track our frame rate
without expensive calls to System.currentTimeMillis().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2016 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:29:35 +00:00
Michael Bayne 6eed170158 Fixed problem with ticker wherein it was not properly dropping frames when
it should. Added code to track and report desired and obtained frame rate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:28:04 +00:00
Michael Bayne 0f0631f318 Do some jiggery poker to make sure that if a path completes as a result of
our call to Path.init() we don't freak out. Also made a note that paths
will be ticked after being init()ed because that's the way it works.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2011 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-02 20:11:24 +00:00
Ray Greenwell d5cc64aa87 Went back to only draining when we detect that the line is active.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 21:22:46 +00:00
Michael Bayne 8529dd08bf Added support for an orientation offset which will be used to orient the
pathable some number of ticks offset from the "natural" orientation which
would be in the direction it is traveling along the arc.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2002 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 23:48:24 +00:00
Ray Greenwell 0403db5e73 catch NPE. A song can be the top song on the stack and not be playing
if musicvolume is 0.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2001 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 21:41:53 +00:00
Walter Korman 709e65f947 Moved sword spark animation here from there, and allowed specifying the
spark duration.  Spark is perhaps a bit of a misnomer as the animation is
really more of a specialized kind of explosion.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2000 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 01:37:14 +00:00
Ray Greenwell 2895b65909 - always drain again
- increased buffer size to 24k


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1999 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 00:12:14 +00:00
Ray Greenwell dd87f55b45 Fuck the windows file separator character.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1998 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 00:08:36 +00:00