Commit Graph

717 Commits

Author SHA1 Message Date
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
Michael Bayne e6126a4787 If FPS display is on, dirty it properly when the view scrolls.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2521 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 15:11:51 +00:00
Michael Bayne 9454a1e35a Commented out avg. dirty regions per tick display and modified FPS display
to facilitate efficient checking of whether it's activated or not.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2520 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 15:11:12 +00:00
Michael Bayne 94697f3e3f If our sleep granularity is zero, yield rather than call sleep() which
would do nothing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2519 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 15:09:57 +00:00
Michael Bayne 31e26c681c Need to take a different approach to get everything to repaint when we
lose our back buffer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2518 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-01 22:06:52 +00:00
Michael Bayne b2ba9dc9c6 We'll be needin' to use that width and height that are passed in.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2517 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-01 22:04:48 +00:00
Michael Bayne 357e17d7c7 Because we cleverly do nothing in paint() if there are no dirty regions,
we have to go out of our way to let the abstract media managers know when
tick() is all done and paint() *may* be called. This way they can properly
clear out their tick stamps because they know that no more media fooling
around will happen between the call to willPaint() and the call to paint()
(which used to be called renderMedia() but is now paint() to remain in
line with all the other places were we tick() and then paint()).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 20:48:38 +00:00
Michael Bayne 6cff845a6c Use our own thread to queue up frame ticks rather than the standard Java
Timer which does undesirable things like suffer from 20 ms granularity on
Linux and rapid fire multiple invocations of our timer task if it has
fallen behind.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2507 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 06:42:50 +00:00
Michael Bayne 9372df6ff0 Render the additional performance metrics when such are activated.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 06:34:55 +00:00
Michael Bayne 580fdba83b Revamped animation observation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 00:45:02 +00:00
Michael Bayne 99127e4ce0 Revamped sprite observation and added support for being notified if a path
is cancelled.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2504 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 00:44:36 +00:00
Michael Bayne 3cfccff0c6 The revamp that made me nervous about our rendering performance but turned
out to be not at all related.

Out with the wacky system of events that require the observers to
instanceof to the high heavens. Now we just call sensible methods directly
on the observers who care and not on those who don't.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2503 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 00:43:54 +00:00
Michael Bayne 83d7506e0f Utility class for tracking trailing averages.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2502 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 00:38:35 +00:00
Michael Bayne b2cbd63be2 Display FPS in the media panel where we have tight control over dirtying
and repainting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2501 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-29 18:15:10 +00:00
Michael Bayne 83cdc0b0fb Canned support for FPS display by the frame manager; it just can't manage
the dirty regions effectively.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2500 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-29 18:14:37 +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