Commit Graph

74 Commits

Author SHA1 Message Date
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 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
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
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 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
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
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
Michael Bayne c4591a92ef System.currentTimeMillis() begone! We use our own pluggable timer system
now (which uses System.currentTimeMillis() at the moment but eventually
won't).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1968 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 02:18:49 +00:00
Michael Bayne c3eb45bbed Remove crack pipe; insert correct code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1834 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-26 23:21:19 +00:00
Michael Bayne 868ce6f471 Added method for obtaining the sign of a value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1832 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-26 20:31:06 +00:00
Walter Korman ea6733ba20 Log image dimensions when given a badly sized image.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1822 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-22 02:05:42 +00:00
Walter Korman 2a26c76006 Deal gracefully with images that we can't usefully tile (which includes
the default 1x1 transparent image we're given if the image manager failed
to load an image successfully.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1821 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-22 02:02:40 +00:00
Ray Greenwell be2bc4205b Anally removed Comparator.equals() implementations that overrode
Object.equals() with equivalent functionality.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1799 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-15 21:01:39 +00:00
Walter Korman fd71c2a853 Take into account the x-offset of the rectangle within which the image is
being rendered when drawing the right edge of the image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1754 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-25 21:49:53 +00:00
Ray Greenwell e6d5adfb96 removed unneeded import
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-20 21:35:32 +00:00
Ray Greenwell 6a64d45eed bugfixes
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1704 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 21:58:25 +00:00
Michael Bayne 963dfe16a8 Created an mechanism for more sophisticated sequencing of animation
frames.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1695 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 20:07:28 +00:00
Michael Bayne 380fa50610 Moved MultiFrameImage and friends from media.sprite into media.util
because they'll be used for both sprites and animations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1692 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 19:11:13 +00:00
Michael Bayne 88e423bdfa Created a path for moving things along the arc of a circle or ellipse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1691 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 04:00:37 +00:00
Michael Bayne 9ee8dde710 Added Ramanujan's formula for an approximation of the circumference of an
ellipse. I didn't end up using it in the ArcPath, but it will surely come
in handy eventually.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1690 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 04:00:09 +00:00
Michael Bayne 90d0503cba Created TimedPath to factor out code common to paths that effect
themselves in a fixed period of time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1688 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 03:59:05 +00:00
Walter Korman 627ee5a1db Javadoc fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-02 23:15:53 +00:00
Michael Bayne d1b428158a Added getOrientation() as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1547 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 23:51:06 +00:00
Michael Bayne fd05e9cdbc Added access to the pathable's bounds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1507 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 07:50:02 +00:00
Michael Bayne 7253a68c7c Death, taxes and refactoring: seriously revamped the low-level media code
to handle scrolling in a much cleaner and happier way. There's now a
VirtualMediaPanel which operates in virtual coordinates and can be made to
"view" any location in those virtual coordinates. By changing the view,
the view can be scrolled and the view can be made to center on a pathable
(generally a sprite) which will cause it to scroll around as the pathable
moves around in the virtual coordinate space.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1475 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 22:25:33 +00:00
Ray Greenwell 541eb01446 Added a constructor that takes two Points and a direction.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1455 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 23:33:03 +00:00
Michael Bayne ad5b77899f We want to truncate rather than round; it's faster and more consistent
with the other math done in the rendering code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1443 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 01:11:55 +00:00
Michael Bayne d7a41e61d8 We need the ability to instruct the path *not* to scroll with the view
(useful when the path is actually operating in virtual coordinates which
are mapped to scrolled view coordinates by the pathable).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1441 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 00:49:15 +00:00
Michael Bayne 544d2382ad Extracted position computation into static method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1438 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-11 02:39:14 +00:00
Michael Bayne cccd28ea9d Now that paths drive the scrolling of our view, we can go back to the
simple line path calculations that don't suffer from the accumulated
rounding errors that our previous method did.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1434 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-11 00:03:30 +00:00
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 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 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 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 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 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 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 23d170c83e Added support for pausing a media panel which pauses all sprites and
animations currently operating therein. (It doesn't pause scrolling which
I suppose I'll have to fix at some point if we ever need it.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1292 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-25 16:23:31 +00:00
Michael Bayne cc6a9d00ef Major low-level rendering rethink. There will be much follow-on cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1286 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:16:28 +00:00
Michael Bayne 6a908b86c6 Added a utility class that encapsulates our display mode jockeying.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1280 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-19 00:38:44 +00:00
Michael Bayne c0a265d284 Removed debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1260 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-16 20:38:24 +00:00
Michael Bayne 1e5c1bcfe7 Only update the sprite's orientation if we have a valid one.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1259 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-16 18:24:43 +00:00
Michael Bayne 935276fb5d Made addNode() public so that external entites can create line segment
paths one node at a time and add their desired orientation to the nodes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1256 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-16 17:00:33 +00:00