Commit Graph

282 Commits

Author SHA1 Message Date
Michael Bayne 7d9dc465a0 Updated debugging output.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1417 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 22:14:44 +00:00
Michael Bayne 2740e670cb Modified LinePath so that separate time stamps are kept for the x and y
directions, otherwise movement in one direction will unnecessarily reset
the "move stamp" for the other direction in which we didn't actually move.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1415 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 20:47:32 +00:00
Michael Bayne af28864778 New interface related to repackaged path stuff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1414 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 07:34:45 +00:00
Michael Bayne 823de4a1a0 Added means by which a view can be scrolled to follow a path.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1411 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 07:33:52 +00:00
Michael Bayne ccbc47a7de Separated path code from sprite code so that we can have other things
follow a path (specifically, I want to allow the media panel to be
"scrolled" along a path).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1409 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 03:38:03 +00:00
Michael Bayne 7c4f86e63a pathBeginning() and pathCompleted() need to be public so that we can
create paths outside the media.sprite package.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1407 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-29 23:27:14 +00:00
Michael Bayne e00610ecdb Ensure that we're loading our images through a BufferedInputStream.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1406 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-29 18:45:00 +00:00
Walter Korman 3bc46992bf Set a flag to note whether we're paused and check the flag to avoid
ticking when paused rather than un-registering and re-registering
ourselves as a frame participant to effect same.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-22 01:56:25 +00:00
Walter Korman cd9131c551 Use an ObserverList to store and work with the frame participants.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-22 01:48:08 +00:00
Walter Korman 4acd5fcfdd Added convenience class for observing animations and being notified when
each individual animation completes and when all added animations have
completed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-21 17:59:11 +00:00
Michael Bayne 325433a763 Created a path that follows a single straight line and does so using the
same math that the scrolling code does to scroll in a straight line.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1377 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:14:06 +00:00
Michael Bayne 814bd71637 Moved getDirection() into DirectionUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1376 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:13:26 +00:00
Michael Bayne a8caf98434 Added a version of distance() that takes Point objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:13:03 +00:00
Michael Bayne db31cedbd8 Removed setVelocity() from the interface. Paths may or may not want to use
the notion of velocity and they can expose that interface to whomever
creates them. We don't need to set the velocity in the abstract.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1374 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:12:48 +00:00
Michael Bayne ee9ff7d46b Enhanced debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:11:34 +00:00
Michael Bayne 95daba5bee Offset not Offsets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1366 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 03:00:29 +00:00
Michael Bayne 612166a572 Created an Icon implementation that can be used to render sprites anywhere
that icons can be rendered.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1365 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 02:58:59 +00:00
Ray Greenwell 9a55ae3989 oops: removed leftover debugging
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 01:53:36 +00:00
Ray Greenwell 0dc1f378e5 use the standard hitTest utility method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1362 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 01:49:38 +00:00
Michael Bayne b15d38b54d Relegated a shitload of logging to DEBUG status.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1361 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-15 23:54:35 +00:00
Michael Bayne 70c8067048 Don't consider modes with higher than 75Hz refresh.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1358 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 18:43:56 +00:00
Michael Bayne 78ec4ab84b Temporary ship recolorizations.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 18:43:32 +00:00
Michael Bayne 34f9f3d8c6 Leave the images in 8-bit format when we return them from the tileset
bundle so that we can recolor them if we later desire.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 16:51:26 +00:00
Michael Bayne 2739abf915 Support compositing images that haven't already been expanded into
separate rasters.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 16:49:16 +00:00
Walter Korman bd6146292f Restore the original clip only after we've un-translated the graphics
context.  Minor reformatting and enhanced toString().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1352 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 04:42:10 +00:00
Michael Bayne 7a7309f347 Make the tiler cope if it's given a null source image.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1348 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-07 03:23:46 +00:00
Michael Bayne 04a1b4a38a Created a helper class that can be used to render a tiled background image
that is generated by cutting up a small image into nine sections and using
each appropriately to create the expanded background.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1347 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-07 03:11:17 +00:00
Michael Bayne ac31caa28b Added support for centering the media panel on a region of interest when
it is displaying in a space smaller than its desired view size.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1345 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-07 00:53:56 +00:00
Michael Bayne 320706e857 Do our recoloring in one fell swoop.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1341 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 23:23:27 +00:00
Michael Bayne 8063347815 Modified image recoloring to use Colorization objects since they now live
in the same package. Also added support for applying a set of
recolorizations all at once so that previous recolorings aren't borked by
subsequent recolorings (plus it's more efficient).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1340 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 23:23:08 +00:00
Michael Bayne 99c4330646 The vast and the sweeping. Modified the tile framework such that tiles no
longer provide access to their underlying image (they actually still do,
but not in the normal course of affairs). This will allow us to use
"trimmed" tiles which are trimmed to the smallest rectangle that contains
the non-transparent pixels in a tile image, which will shrink up our
components and other tiles a great deal.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 18:08:32 +00:00
Ray Greenwell 1c182d6e36 this line should have been commented out too
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1338 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 21:36:32 +00:00
Michael Bayne 47e38b4fa8 Changed MultiFrameImage around so that it retains total control over its
internal images and doesn't necessarily need to decode them into multiple
images or even have actual images at all. This cleans things up and paves
the way for our "trimmed" image support which is forthcoming.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1335 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 19:35:31 +00:00
Michael Bayne 0492637aa0 Moved hitTest() into ImageUtil where its accessible to all that need it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1334 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 19:34:14 +00:00
Michael Bayne 33eb11b8f6 Fixed yet another bug with the Swing rendering code: apparently the
JEditorPane, when displaying HTML that contains forms, pointlessly wraps
its Swing components in heavy weight AWT components which would otherwise
trigger some funny business that we don't want it to trigger.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1332 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 05:13:54 +00:00
Michael Bayne d43442b3dd Changed debug logging so that it is easier to enable and disable since I
seem to be debugging the fucking rendering every other day. Fixed bug with
dirty region combining.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1331 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 03:09:46 +00:00
Michael Bayne a98f5f617a Yet more rendering fixes: we render the frame participants before the dirty
Swing components and we go through and specifically render any components
in the upper layers (see JLayeredPane for what this means) that overlap
our frame participants every frame. This is non-optimal, but the hairy
code that somehow magically works out who to repaint when components
overlap is not even something that I want to dig more deeply into. There
are generally not many components in the upper layers (only popups like
menus and tooltips and internal frames when we use them).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1329 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 04:16:41 +00:00
Michael Bayne 4da9a66c1d Fixed more repaint bugs. We weren't properly painting the opaque component
when doing old-skool rendering. We also needed to climb up the hierarchy
looking to see if a parent is dirty for each dirty component and combine
the child and parent dirty rects and only repaint the parent otherwise we
can run into problems with render order. Oh the complexity (though Swing
does this too).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1328 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 04:14:20 +00:00
Michael Bayne 530a348890 Added tileImageDown().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-30 02:14:13 +00:00
Michael Bayne 6ecc381180 Added tileImageAcross().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1316 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-29 01:12:54 +00:00
Michael Bayne d107dd790f If we have no clip, we need to repaint our whole bounds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1314 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 02:50:32 +00:00
Michael Bayne b602cb4fce Modified frame manager to do the right thing in terms of repainting
everything if we lose our volatile offscreen buffer image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 02:49:32 +00:00
Michael Bayne 7af3e3afdc Was preferring lowest not highest.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1311 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 01:30:10 +00:00
Michael Bayne 872e10f11d Catch IllegalArgumentException if it's thrown while we're loading our
images. The PNG loader seems to be kind enough to throw fucking runtime
exceptions when it encounters file format problems instead of throwing
IOException or some other declared exception.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 01:19:11 +00:00
Michael Bayne b68d34e4e8 Use the width and height that we so handily obtained earlier.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 22:40:09 +00:00
Michael Bayne 46b6defc06 Removed some debug logging; tried the buffer strategy approach which won't
work because we're not painting everything on every frame, but left the
commented out alternative rendering code in there in case we want to
fiddle with it at a later date (or provide support for buffer strategies
for applications that do want to paint everything).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1306 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 22:39:45 +00:00
Michael Bayne 116ce388ca Need to translate to the coordinates of the opaque parent we're
repainting, not necessarily the original component we're repainting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1305 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 19:12:00 +00:00
Michael Bayne b9af18d10e We need to paint the first opaque parent of a dirty component rather than
the dirty component directly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1304 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 18:59:55 +00:00
Michael Bayne 6a7fd11321 Try filling the offscreen buffer with a solid color after we create it to
avoid painting garbage to the screen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 18:59:27 +00:00
Michael Bayne 3fa39d06ff Fixed up borked translated dirty region handling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 04:57:05 +00:00