Commit Graph

43 Commits

Author SHA1 Message Date
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 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 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
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
Michael Bayne d5dbc514ca Use observer lists.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1906 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-05 20:52:39 +00:00
Ray Greenwell a0730067ec Pulled out gobs of Sprite/Animation functionality into AbstractMedia.
Pulled out gobs of SpriteManager/AnimationManager functionality into
  AbstractMediaManager.
The big change: sprites can have their render order fine-tuned like
animations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1787 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-08 21:03:37 +00:00
Michael Bayne cecb5fbef5 We'll be needing the -- not the ++.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1722 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-20 02:19:53 +00:00
Michael Bayne 7e45b58f50 Modified tick() order to prevent unhappy business if a sprite removes
itself in tick().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1721 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-20 02:12:33 +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 baab1443ef Added method for obtaining access to an immutable list of the sprites
currently registered with the sprite manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:36:50 +00:00
Michael Bayne a930ae0f0c Added clearSprites() for clearing all sprites in one fell swoop.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1542 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 17:31:17 +00:00
Michael Bayne 5db81eb137 Don't check for sprite collisions presently. We'll have to revisit this
when we actually want to use the collision support.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1503 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 00:54:53 +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
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 a814589499 Get the sprites involved in scrolling; they now either scroll with the
view or remain fixed relative to the scrolling view (the default and also
the old behavior).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1253 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 23:10:24 +00:00
Walter Korman 76cff072be Split Sprite into Sprite and ImageSprite. Added LabelSprite. Cleaned up
directional constant usage.  Added ability to render sprites in two
distinct layers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1132 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-16 03:15:06 +00:00
Michael Bayne 3dbf935e3a Render all sprites that intersect the repaint bounds, not just the ones
that are contained within the bounds.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1081 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-28 23:25:15 +00:00
Michael Bayne 137e9e9ea8 Revampola! Moved the code that handles viewport offset into the animated
panel; restructured things so everyone deals with "view" coordinates
rather than screen coordinates and the animated panel takes care of doing
the final translation before rendering.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1065 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-21 06:01:29 +00:00
Michael Bayne ee3532f6f1 Added mechanism by which the sprite manager can be informed that the view
on which its sprites are rendered was scrolled so that it can generate the
appropriate dirty rectangles or update its sprite's positions.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1045 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 19:55:14 +00:00
Michael Bayne 958cb213d5 Blarg. Have to tell the sprite manager about the viewport offset when
we're using it to render sprites into a view that is being displayed in a
viewport that is smaller than the actual size of the view. Oh the
jockeying.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:41:36 +00:00
Michael Bayne fc58eec429 Whoops, missed a change.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:58:37 +00:00
Michael Bayne 9b9211de16 Use a SortableArrayList instead of going for object creation mania every
time we sort the sprite list.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:57:53 +00:00
Michael Bayne 65900ecefa Added getHitSprites() which populates a list with the sprites that are
"hit" by a particular pixel as determined by Sprite.hitTest().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@898 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 01:04:13 +00:00
Walter Korman d6b17cd36c Reduced the specificity of the object detailing the bounds within which to
render sprites to a Shape rather than a Polygon.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@889 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-22 20:09:02 +00:00
Walter Korman 651ff37b66 Javadoc edits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@888 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-22 18:58:52 +00:00
Walter Korman aa574a8182 Added support for animations to the animation manager. Moved animation
classes into their own package.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@849 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-11 16:17:34 +00:00
Walter Korman 4b1f7af899 Merge any overlapping dirty rectangles before making them available to
outsiders.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@553 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-25 01:40:26 +00:00
Walter Korman 3773da79a6 More work on object tiles. Revamped isometric scene rendering to
gather dirty sprites and objects and render after base and fringe tile
layers.  Add shadow tiles in the footprint of objects to make them
impassable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@460 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-13 01:08:59 +00:00
Michael Bayne 00fde3eeb3 Modified sprite event mechanism to used classes derived from SpriteEvent
rather than codes to indicate different types of events. Also modified
name of sprite observer callback as spriteChanged() implies that the
sprite actually changed which it may not have, whereas handleEvent()
doesn't imply anything other than the sprite observer is being asked to
deal with a sprite event.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@338 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-13 19:36:20 +00:00
Michael Bayne 780e39d4e9 Modified animation manager to provide a timestamp with every tick.
Modified sprite and path code to make use of these timestamps to determine
a sprite's progress along the path. Abstracted the path stuff so that
paths other than line segment paths can be cleanly implemented.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@337 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-13 19:10:26 +00:00
Walter Korman 4553c01d6d Handle all sprite events at the end of each SpriteManager.tick() so
that observers can do things like remove sprites without unhappy
side-effects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@335 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-07 23:01:53 +00:00
Walter Korman 4f92224a8f Minor comment re-formatting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@327 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-05 00:40:33 +00:00
Michael Bayne c2fd4ed6c3 Modified sprite management so that if in the course of processing its
dirty rectangles, an animated view has to expand the dirty region, it can
call back to the sprite manager to determine whether this new, expanded
dirty region includes sprites that weren't previously considered to be
dirty. If so, those sprites' rendered bounds are added to the dirty
rectangle list being processed so that they will be properly redrawn
(which may trigger more sprites to be included and so on).

Also modified sprite internals in a cleany uppy sort of way.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@309 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-22 02:14:57 +00:00
Michael Bayne bbd1eb9ced Modified sprites not to take a sprite manager reference upon construction
but to have it set by the sprite manager when it is requested to manage
them.

Modified sprite manager to invalidate the view when sprites are added and
removed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@295 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 19:40:30 +00:00
Michael Bayne bee0ae1ddb Provide a mechanism for unregistering a sprite.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@284 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 00:58:36 +00:00
Walter Korman affc3e82b7 Fixed up path-finding, path-following, and tile coordinate drawing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@260 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-15 22:06:21 +00:00
Michael Bayne 0d0cb7f8ec Moved sprite stuff into media package. Need to abstract out and remove
miso dependencies.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@244 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-14 22:54:45 +00:00
Walter Korman efb1881507 Use a polygon to determine whether a sprite is within a particular
tile.  Updated scene/tile dimensions and default scene to use 64x48
tiles.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@151 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-02 18:59:00 +00:00
Walter Korman 1032b8f325 Moved much of the IsoSceneView data into the IsoSceneModel. More work
on sprites and animation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@138 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-02 00:42:02 +00:00
Walter Korman 82831f3baf Work on rendering a character in the scene and moving them about with
mouse-click events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@134 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-31 01:38:28 +00:00
Walter Korman 11800e8a43 Added simple test character sprite to viewer application, and render
any involved sprites in IsoSceneView after each set of tiles is drawn.
Exit the viewer and editor applications on window close.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@133 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-30 15:38:52 +00:00
Walter Korman c76ae0ccf5 Initial version of mostly-placeholder sprite-related classes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@132 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-28 01:50:07 +00:00