Commit Graph

110 Commits

Author SHA1 Message Date
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
Ray Greenwell f448ebe4f1 Create the polygon cache hash with custom parameters to the constructor
to optimize memory performance.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1408 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-30 22:21:51 +00:00
Michael Bayne 4d62053e4d Check for tile intersection using the polygon's bounds rather than doing
the expensive polygon/rectangle intersection test (since we're doing 400
of these every frame).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1308 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 23:07:41 +00:00
Michael Bayne 938445071e Removed the last vestiges of the object "layer". Scenes now simply have a
list of objects, they can overlap (I think that objects added to a scene
later will be rendered before objects added earlier which ends up feeling
natural in the editor); no longer are objects ignored when their footprint
lies outside the scene bounds.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1302 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 18:41:14 +00:00
Michael Bayne 0bde11ee81 Major low-level rendering rethink.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1287 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:18:17 +00:00
Michael Bayne 6acdb6daae Act on an object's entire bounds rather than one constrained to the shape
of the bottom of its footprint. This allows objects to spill out beyond
their footprint (and not get clipped) as long as they are otherwise well
behaved.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1172 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-02 01:06:46 +00:00
Ray Greenwell 1a53da6727 Formatting changes:
- removed tabs
- explicitly specify imports
- I made each comment a complete and punctuated sentance.
- other minor convention changes


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1155 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-26 23:35:02 +00:00
Ray Greenwell aca95b8540 Store object tiles in HashIntMaps instead of in arrays because they may
have coordinates outside of the normal scene coordinates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1150 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-26 20:17:51 +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 9b465b9fe3 Split the rendering into scrolled items and fixed items. Render the
sprites (and object tiles) as fixed items.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1047 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 19:57:46 +00:00
Michael Bayne 7db44c5ee3 Let the animated panel handle invalidating the regions exposed by
scrolling so that it can do so with the actual dimensions of the panel
(the scene view only knows how big its model wants to be). Changed
scrollView to viewWillScroll to more accurately reflect what's going on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 05:03:17 +00:00
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