Commit Graph

254 Commits

Author SHA1 Message Date
Michael Bayne 3a1ec157c2 Added fineToFull().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2232 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-04 03:11:13 +00:00
Michael Bayne e6796b2d55 The amazing revamp four hundred billion. Let's see:
- Reworked colorization repository such that we now have arbitrary named
  "colorization classes" which can be used by various and sundry entities
  to colorize themselves.

- Added support for individual object colorizations as well as "spots"
  that go along with objects (will be used to automatically create portals
  into buildings and automatically position users properly when at a
  "station").

- Repackaged things in miso to more closely mimic what we do everywhere
  else (no more miso.scene, now we have miso.data and miso.client).

- Fixed up miso scene XML representation so that objects can more easily
  be expanded to have yet more stuff if we think of more stuff that they
  might aught to have in the future. Structured the miso scene model so
  that "uninteresting" objects (those that simply sit somewhere and don't
  do anything) take up a lot less memory than "interesting" objects (those
  that have action strings, "spots", colorizations and the works). I may
  want to roll colorizations into the "uninteresting" realm, but that
  remains to be seen.

- Made it possible for object tilesets to specify default render
  priorities for objects in that tileset. This will hopefully allow us to
  get by without any "custom" render priorities that are specified on
  scene objects, instead relying on the default priorities to resolve
  common conflicts.

There are surely other cleanups in there, but I think that was the major
thrust of it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2228 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-31 23:10:46 +00:00
Walter Korman 2fc3e90773 Fixed typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2164 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 21:44:52 +00:00
Michael Bayne 1032c513e6 We love to do it with logic!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2163 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 21:43:33 +00:00
Walter Korman 26378d816f Fixed bug wherein we no longer considered off-screen coordinates to be
traversable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2162 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 21:27:41 +00:00
Walter Korman 2314fa2059 Obsolete.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2160 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 21:13:01 +00:00
Walter Korman 90480544e1 Revised various iso scene view debug rendering options to be accessible
via the runtime adjustments.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2159 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 21:12:45 +00:00
Walter Korman e4ed924095 Added runtime adjustment to toggle debug rendering that highlights covered
and non-traversable tiles.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2155 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 04:25:45 +00:00
Michael Bayne b9be0aef92 Tiles are now immutable, so the DisplayMisoScene becomes the arbiter of
whether or not a traverser can traverse a tile.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2119 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 22:53:56 +00:00
Walter Korman 3ccbb4ad5b Whitespace change.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2053 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-11 23:05:07 +00:00
Michael Bayne 5373597143 Removed caching of tile coordinates as it was too fragile. It is easy to
forget to update a sprite's tile coordinates when updating its screen
coordinates and only TilePath could be used for sprites in the view and
generally a huge pain was incurred to avoid what isn't very expensive
which is to calculate a sprite's tile coordinates from its screen
coordinates when that sprite is involved in a repaint.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2029 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-05 23:06:30 +00:00
Michael Bayne 130d126238 Make it possible for other kinds of sprites to know and report their tile
coordinates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2004 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-28 03:42:17 +00:00
Michael Bayne 26cd1188ae Improved documentation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2003 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-28 03:41:58 +00:00
Michael Bayne 0c42e140b4 Changed code to report rather than freak out if it finds a non-Miso
sprite. It's possible that this is a normal occurrence, but until we
ascertain such, we'll go ahead and log what we find.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1978 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 22:16:54 +00:00
Michael Bayne 3736670fb0 Refuse to set a null scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1887 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-03 01:15:06 +00:00
Ray Greenwell dda1039dc0 Created changeHoverObject() to consolidate setting a new hover object and
do the required changes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1816 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-18 19:44:00 +00:00
Ray Greenwell c1a56db9c4 added hoverObjectChanged(), does nothing in this class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1811 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-17 02:12:42 +00:00
Ray Greenwell 619ceb03af removed getTightObjectBounds(), unused and possibly buggy.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1808 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-16 20:39:46 +00:00
Ray Greenwell a5d00cb1ca - Added hook for adding additional objects to the scene other than those
provided by the DisplayMisoScene.
- If hover objects are SceneObjects, tell them when we start/stop hovering
  on them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1806 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-16 01:55:22 +00:00
Ray Greenwell 1c0f405121 added setHovered() so that a SceneObject can be told when it is being
hovered over, and can request to have it's object tile repainted.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1805 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-16 01:53:57 +00:00
Ray Greenwell 86c9fa82cf if two items are in the same tile, render the sprite on top.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1804 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-16 01:53:10 +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
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 7dccce81c5 Account for sprite render priority when sorting sprites.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1758 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-26 23:35:10 +00:00
Walter Korman 6fc4c718ab Properly return an explicitly-specified preferred size in
getPreferredSize().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1750 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-24 07:56:25 +00:00
Michael Bayne 64bb4715cc Added le big hackola, grabNewObjects(), to tide us over until IsoSceneView
properly obtains new objects as they are scrolled into view (which I won't
be doing for Alpha (tm)).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-24 05:33:51 +00:00
Michael Bayne 0a90590134 Exposed getScene().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1748 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-24 05:33:05 +00:00
Michael Bayne 68af441fbf Objects now have explicit render priorities rather than relying on the
order in which they were added to the scene (that information is no longer
available as objects are reordered arbitrarily once loaded).

Also removed old-school scene conversion.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1743 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-23 23:07:11 +00:00
Michael Bayne 92c8748c7c More progress toward arbitrarily scrollable scenes. The IsoSceneView still
requests all objects in God's green earth, but we now have the necessary
structures for it to request new objects as they scroll (nearly) into view
and for it to abandon objects as they scroll (way) out of view.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1742 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-23 21:54:50 +00:00
Michael Bayne 552d73de59 Used to keep around all visible (or nearly visible) objects in a scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1741 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-23 21:53:23 +00:00
Michael Bayne 9fb0de8e29 Miso scene revamp to more cleanly deal with object tiles and their
associated metrics. Also fixed render order handling such that any
overlapping object tiles are rendered in the order that they are added to
the scene. This gives us control over what to do in situations that are
impossible to determine based on object footprint alone.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1708 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-18 02:32:57 +00:00
Ray Greenwell 6419d06f3c Fixed offscreen determination.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1677 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-13 00:51:19 +00:00
Michael Bayne d287fa7195 Catch tile exceptions and report them instead of giving birth to a sizable
member of the bovine community.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1673 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-12 21:10:31 +00:00
Walter Korman 6bff0d778a Added getObjectTileBounds() to get the bounds of a particular object in a
scene.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1663 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-05 02:21:54 +00:00
Michael Bayne b93bcfaa11 When two sprites occupy the same tile, their screen y coordinate is used
instead of their fine coordinates. It achieves the same effect and
alleviates the need to track fine coordinates in the MisoCharacterSprite.

Additionally, IsoSceneView and friends were modified to allow any sprites
to wander their crooked realms, MisoCharacterSprite instances are simply
more efficient because they maintain cached copies of their tile
coordinates whereas other sprites must have their tile location computed
from their screen location whenever they are to be repainted.

At some point in the future, the tile coordinate tracking facilities of
MisoCharacterSprite should be accessed through an interface so that other
spritely entities can cache their tile coordinates if they so desire.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1560 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-08 21:41:30 +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
Ray Greenwell a31730278b added hoverObjectWillChange()
fixed bug that happened when HIGHLIGHT_WITH_ACTION was on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1555 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-29 01:32:28 +00:00
Ray Greenwell 99f7c227c7 Minor bugfix: fix tile coordinate computation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1549 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-27 01:27:13 +00:00
Michael Bayne e75ae89f22 Various and sundry modifications to clean up orientation handling and add
support for 16 orientations in situations where it is merited.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 23:53:07 +00:00
Michael Bayne 624923ed40 Brought comment into line with reality.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1538 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:20:07 +00:00
Ray Greenwell c467da448a The tragic end of ScreenTilePath
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1534 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 01:00:32 +00:00
Ray Greenwell d597e91e44 rollback to 1.7, which is the same as 1.5 (ugh)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 00:59:02 +00:00
Ray Greenwell 7846ddd0d7 Re-enabled the ability to traverse offscreen, but fixed some
problems with my previous hack and made offscreen also paths have
huge 'costs', and also bound in potential paths from being
too expensive (to prevent infinite loops if there's no path to a location.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1532 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 00:49:15 +00:00
Ray Greenwell 7860992f57 Allow paths to go to offscreen coordinates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1531 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 00:45:18 +00:00
Michael Bayne 53ca4a30ce Whoops, -1 is not a good value for "invalid offset" because object tiles
may well have a -1 origin offset. We use Integer.MIN_VALUE now which is
definitely not going to be a valid value.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:52:36 +00:00
Michael Bayne a42e485d06 Only bound our view's coordinates if the view model is configured for a
bounded view.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1522 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 00:04:41 +00:00
Michael Bayne ea31232166 Added code to ensure that the scene view is not scrolled outside the
bounds described by the view model.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 07:50:33 +00:00
Walter Korman 43191a0512 Minor reformatting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 07:47:14 +00:00
Michael Bayne 4036904d0e Brought miso stuff into line with new media architecture; implemented
various and sundry optimizations in the process. We love the spiral
development.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1476 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 22:38:12 +00:00
Ray Greenwell f91f47d73b Added ScreenTilePath, which does everything in screen coordinates,
but after each movement it updates the sprite that it's moving to tell
it the latest tile coordinates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1472 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 21:22:34 +00:00