Commit Graph

97 Commits

Author SHA1 Message Date
Ted V 42fb1f095b Needed some debug information from this class; figured I'd leave the
Log import in there.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-28 21:13:27 +00:00
Michael Bayne afabea71ad Big fat Bernie javadoc cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-24 23:08:21 +00:00
Michael Bayne 0c5f723046 Added a method for computing the standard deviation of a set of values.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3201 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-04 04:52:31 +00:00
Michael Bayne 7b4aaa099f Handy functions for computing a value that smoothly progresses as a
function of time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3122 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-09-18 22:57:08 +00:00
Michael Bayne 1f8c4578b7 LGPLed the library. Hello world.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3098 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-27 02:12:55 +00:00
Michael Bayne 685f989dc9 A one shot component for tiling an area with a background tiler.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3011 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-05-21 07:36:17 +00:00
Michael Bayne d618d3c771 Eclipse suggested cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:50:28 +00:00
Michael Bayne e213827ee9 Let's just warn and cope rather than sticking a fork in things.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2918 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-15 20:06:09 +00:00
Michael Bayne e3b2930778 Added getNaturalWidth() and getNaturalHeight().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2860 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-19 18:27:10 +00:00
Ray Greenwell 515e5a293e Instead of drawing thousands of little pieces of the background tiled,
draw but 9 images, with the non-corner ones being scaled as appropriate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2856 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-14 19:39:52 +00:00
Michael Bayne e6ae375c00 Not to freak out if somehow we don't have a current path.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2815 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-09-25 21:07:20 +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
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
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 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 1cb3d1edb5 Added floorDiv().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2432 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 22:28:28 +00:00
Michael Bayne 98e48001dc Added bound().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2405 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-12 02:06:35 +00:00
Michael Bayne fe88ce14a6 Checkus sanitorium.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-30 02:19:56 +00:00
Michael Bayne 8a430a41aa Make orientation of pathable at end of path available.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2256 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:27:57 +00:00
Ray Greenwell 35f0954744 Restore the Pathable to its original position when we're removed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2179 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-17 23:19:20 +00:00
Michael Bayne 0dcb5d67d1 Added Path.wasRemoved(), call it in the Sprite code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2178 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-17 22:57:08 +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 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