Commit Graph

99 Commits

Author SHA1 Message Date
Michael Bayne f2f6407c1e Need to account for negative scrolling deltas.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 04:45:14 +00:00
Michael Bayne b0364efa34 Only request a repaint in mouseMoved() when our hobject changes if we're
highlighting objects and the object's action status is in line with
whether or not we're only highlighting objects with actions. Also changed
some things to support the new, simpler, AnimatedView interface.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1023 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:26:17 +00:00
Michael Bayne 4b783c4482 Enhancements to support simple scrolling. A number of things don't work if
the view is scrolled, like object tiles, mouse coordinate computation and
pretty much anything other than rendering a scrolling background under
some sprites. Someday we'll probably want to sort out all that other
business, but not under current monthstone circumstances.

Note: the scrolling still feels a bit choppy (even under Windows) which is
annoying, but I'm doing everything by the book and have spent too much
time fine tuning it already, so we'll have to come back to this later if
we're not happy with the visuals.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1012 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:45:36 +00:00
Michael Bayne fdf15f0f52 Moved config toggle for showing object footprints into the scene view
model where it resides happily with existing toggles for showing
coordinates and sprite paths; did some other cosmetic cleanup.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1008 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 08:09:11 +00:00
Michael Bayne 42261772a5 Modified scene interface so that tiles are requested directly so that we
can implement "virtual" scenes which return tiles infinitely in all
directions in anticipation of supporting scrolling.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 08:01:15 +00:00
Michael Bayne 1bd4668067 Minor code cleanup; didn't turn out to be useful to have the object action
in the object metrics record.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1006 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 07:30:45 +00:00
Michael Bayne 318b476632 Create tile bounding polygons on demand; changed object tile handling such
that a list of object metric records is used rather than a hashtable
mapping tile coords to object tile bounding polygons because we were never
doing a hash lookup, only iterating over the whole table.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1004 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 07:16:21 +00:00
Michael Bayne 8399c9a9cf Removed the code that was setting the clip as it wasn't actually doing
anything. The clip is already properly set before render() is called.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@993 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-12 08:54:49 +00:00
Michael Bayne 554d11c62b Added support for rendering object footprints when rendering objects
(useful in the editor to see what's traversable and what's not).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@948 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-06 23:14:56 +00:00
Michael Bayne 81ed1f42e8 Removed the ShadowTile and replaced it with facilities in the BaseTile to
"cover" a tile with an object tile. While a tile is covered, it is
impassable. This allows us to have base tiles under object tile footprints
that are rendered, but not traversable by character sprites.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@944 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-06 17:13:06 +00:00
Walter Korman a63692e7b3 Javadoc fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@909 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 17:43:57 +00:00
Michael Bayne 71c7c4bdb2 Added getScene() and getHoverCoords().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@905 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 02:53:29 +00:00
Michael Bayne 899523d8b6 Removed debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@904 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 02:12:35 +00:00
Michael Bayne 4143fbf383 Set the default to never highlight objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@903 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 02:10:36 +00:00
Michael Bayne cc045d3fe3 Got object tile highlighting working. Now the IsoSceneView correctly keeps
track of the front-most object that the mouse is over.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@902 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 02:10:00 +00:00
Michael Bayne 0b78324abf Beginnings of support for the scene view to track the object (sprite or
object tile) over which the mouse is hovering. The iso scene view will
also support highlighting the object tile over which the mouse is hovering
as well as base tile highlighting to make the editor's life easier.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@900 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 01:07:02 +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 e3c4fd02b7 Initial work on making use of full-screen exclusive mode and additional
rendering optimizations available in JDK 1.4.  Use a BufferStrategy, and
changed AnimatedPanel to extend Canvas rather than JPanel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@847 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-08 22:16:59 +00:00
Michael Bayne 4aef9a0d74 Removed commented out location painting code as it's now in its new home.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@827 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-18 08:38:33 +00:00
Michael Bayne 4f716cd540 Added a callback method that allows derived classes to paint things after
the base tiles have been painted, but before anything else. This allows us
to paint things that appear to be on the ground (like locations).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@802 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-16 08:31:17 +00:00
Walter Korman 1e1b5e1d4a Rejiggered the iso scene rendering yet again to address objects in the
scene that may partition two items, and to address the lack of a proper
total ordering of dirty items in the non-partitioned comparison case.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@792 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-16 05:42:16 +00:00
Michael Bayne 37b9ff1d20 Added getScreenCoords(), invalidateRect().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@785 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-15 04:20:55 +00:00
Walter Korman b00fdc6ab5 Use String.valueOf(int) to convert int to string.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@782 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-14 23:31:04 +00:00
Michael Bayne 54b02ad1ff Not to freak out if we have no scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@760 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-12 19:53:11 +00:00
Michael Bayne 7ce8846420 If we're showing coordinates, also outline the tiles.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@714 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 23:35:37 +00:00
Michael Bayne d2dff11867 Fixed x,y vs. col,row thing once and for all. Also cleaned up object tile
footprint setting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@711 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 23:08:28 +00:00
Michael Bayne 2ad3f03a34 Changed MisoTile to BaseTile.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@654 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-27 22:17:42 +00:00
Michael Bayne ae1052a371 Oh the vast sweeping changes, and they're not even close to complete, but
things compile and most things run so this is a good time to checkpoint.
Let me recall:

- Refactored the whole scene deal.
- Revamped the XML parser stuff (now uses Digester).
- Rethought the tile management.
- Started tile bundle stuff.
- Wrote some tests.
- Did a bit of Mike-ification.

Onward and moreward.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@621 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-18 04:09:23 +00:00
Walter Korman 933a427b68 Render scene tile layers inclusive of the fringe layer.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@578 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-27 01:37:37 +00:00
Walter Korman d102a47f13 Abstracted character-sprite-related activity to the cast package in
preparation for character component compositing and other
character-related antics.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@575 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-26 01:17:22 +00:00
Walter Korman 4b58a696ca Added the ability to specify one portal in a scene as the "default
entrance."  The default entrance is specially highlighted in the scene
and can be read from and written to XML scene description files.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@558 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-25 16:36:43 +00:00
Walter Korman 092d96509e We can't merge dirty rectangles for each dirty item when rendering
into a single rectangle, since doing so may cause new areas to be
dirtied that impact portions of other sprites or objects that won't
get properly redrawn.  Sigh.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@550 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-24 01:33:47 +00:00
Walter Korman c839b61548 More polishing work on scene rendering.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-24 00:55:08 +00:00
Walter Korman 64ed794d3d Removed unnecessary clipping.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@526 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 02:04:07 +00:00
Walter Korman c7d26cea8e Fixed scene rendering issues and improved performance.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@517 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-22 18:21:42 +00:00
Walter Korman ef97b42acd Revamped iso scene rendering yet again to remove unnecessary dirty
rectangle propagation and to only render the dirty portions of dirty
objects and sprites.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@509 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-19 23:26:31 +00:00
Walter Korman bcae50aa08 Render the placing tile to facilitate proper tile placement. Fixed up
tile highlighting accordingly on tile deletion and location actions.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@495 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-18 20:25:46 +00:00
Walter Korman bed0a2facb Invalidate objects, and any tiles, sprites or objects impacted by an
object's dirty rectangle, when invalidating dirty rectangles.
Commented out verbose logging.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@484 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 23:39:06 +00:00
Walter Korman 2ecd879692 More work on object placement, removal, and rendering within scenes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@479 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 22:21:22 +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
Walter Korman 6638380a4d More work on object tiles.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@448 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:42:08 +00:00
Walter Korman 915e13ca12 Make sure screen coordinates that are converted to tile and full
coordinates when editing a scene are valid before forging ahead with
scene modifications.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@436 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 16:21:09 +00:00
Walter Korman ad7b64d4a1 Initial work on support for objects whose images span multiple tiles.
Made TileSet an interface.  Throw exceptions for unknown tile or tile
set requests.  General clean-up and documentation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@427 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 00:41:27 +00:00
Michael Bayne cdaea4bbab Waffle waffle. Changed MisoScene back to returning lists rather than
arrays for locations, portals and clusters.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-28 01:31:32 +00:00
Michael Bayne 2fb833fd5b Serious scene surgery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@344 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-21 02:30:35 +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 a7c639ffe0 Modified MisoScene and related classes to obtain the scene tile
dimensions from the scene view data model.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@319 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-29 19:50:46 +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 8aed4795e1 Modified sprite to use iterator rather than enumerator. Made x and y
members protected and provided accessors. Added toString() to Path.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@300 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 21:18:42 +00:00
Michael Bayne 8376b6e9fa Extracted tile code from MISO and moved it into it's own package in media
because it's general purpose.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@273 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 23:14:21 +00:00