Commit Graph

288 Commits

Author SHA1 Message Date
Michael Bayne e628a8e429 Added support for specifying a default tileset for scenes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2439 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-21 17:08:57 +00:00
Michael Bayne 3c94cd67f6 Various fixes to support negative tile coordinates; created sparse miso
scene model and associated business to store scene data in an arbitrary
set of blocks rather than fixed arrays; finally stuck a fork in scene
width and height as well as view width and height along with origin offset
and a few other now obsolete bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2434 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 22:40:34 +00:00
Michael Bayne 299e0845bb Center on the center of the scene when it is first set. Adjust our view
bounds to preserve the current center point when we are resized. Deep
sixed "bounded" and some other needless fiddling.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2430 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 17:06:08 +00:00
Michael Bayne bdd1697a41 Don't repaint when we rethink, rearranged some things so that we can avoid
recomputing visible objects, etc. if no blocks were loaded or flushed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2429 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 02:01:56 +00:00
Michael Bayne 7772cdc175 Make our bounds available.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2428 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 02:01:08 +00:00
Michael Bayne 626d59a718 Apparently revalidating ain't going to do it, so we recenter and rethink.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2427 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 01:04:57 +00:00
Michael Bayne 3abbd1c8af Removed old testing code. Whoopskidoodle!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2425 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 00:56:35 +00:00
Michael Bayne d398c84a7b Pass the mouse event so that other information can be obtained.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2424 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 00:25:13 +00:00
Michael Bayne f0a1bf2311 Don't can all mouse button 1 presses; allow objects without actions to
become the hover object if derived classes really want it (like the
editor).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2423 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 23:19:13 +00:00
Michael Bayne ffb9e3b4e4 Added code to enable bounds checking of calls to index. Not enabled by
default because we can generally figure it out from the NPE and this gets
called a crapload so we don't want to negatively impact performance.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2422 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 23:18:30 +00:00
Michael Bayne 6e967c699c Was calculating footprint dimensions incorrectly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2421 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 23:17:33 +00:00
Michael Bayne a4d16abb4c Added code to support scene editing: adding and removing objects, updating
base and fringe tiles.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2418 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 18:33:31 +00:00
Michael Bayne 3a7f7f6bdb Allow an object to be relocated (which requires recalculation of our
cached screen bounds, etc.).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2417 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 18:33:07 +00:00
Michael Bayne 1182241d57 Removed highlighting code; cleaned up some other stuff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2416 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 18:32:24 +00:00
Michael Bayne d5701962a3 The big fat bernie revamp! Er, big fat miso revamp rather:
- Combined SceneViewPanel and IsoSceneView into one happy panel.
- Ditched the DisplayMisoScene notion; the new MisoScenePanel now manages
  resolved scene information (like base, object and fringe tiles) itself
  so that it can...
- ...support scrolling scenes by keeping blocks of resolved base, fringe
  and object information loaded only for what is potentially visible
  rather than for the whole scene.

Other things were surely cleaned up or broken in the process to keep a
keen eye out.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2413 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-17 19:21:17 +00:00
Michael Bayne bae9fdf1e0 Exorcised scene width and height; make models unbounded by default;
cleaned up AStarPathUtil.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2407 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-12 02:14:52 +00:00
Michael Bayne d987d66bf3 Whatever reason we had for assuming all off-screen tiles are passable,
that can't possibly be the right way to handle it. If you can't get there
by staying on the screen, you're not going.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-07 23:53:41 +00:00
Michael Bayne 4e1b4a00d8 Allow turning off the rendering of objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-07 23:32:47 +00:00
Michael Bayne 036104a7d5 If there's no base tile, it sure as hell ain't passable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-07 22:04:39 +00:00
Michael Bayne 7c2c067439 Fill in black if there's no base tile at all.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-07 21:43:00 +00:00
Michael Bayne c8b14399c7 Added getColorizer() to allow derived classes to provide a colorizer for
use when obtaining object tiles.

Broke out display scene initialization into an init() method so that
derived classes can overrride getColorizer() and rely on their constructor
having already been called.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2368 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-01 02:17:58 +00:00
Michael Bayne 17b3922946 Rewrote the iso sorting algorithm yet again. Now it's less efficient but
actually works. (Or so we hope.) Yay!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2348 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-30 02:15:13 +00:00
Ray Greenwell 152344f223 Merged grabNewObjects and prepareObjectList into one method:
refreshObjectList, so that we can remove objects as well as add them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2301 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-10 09:24:04 +00:00
Ray Greenwell 5962fa1e54 Made note of and implemented clearing of fringes when a base tile is set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2287 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-20 00:40:13 +00:00
Michael Bayne 1fa367e46f Render the tile grid when rendering coordinates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2282 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-14 22:10:48 +00:00
Michael Bayne 14dbc463a2 More Miso modifications: support new combined scene interface stuff; new
scene model stuff; other small business.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2271 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 07:21:15 +00:00
Michael Bayne f1ced5a3c5 Small changes: render object spots; handle ObjectList changes; other
business.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2270 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:46:05 +00:00
Michael Bayne a9ba8fdfe5 Report our effective render priority in toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2265 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:37:19 +00:00
Michael Bayne fc11f92371 Manipulate ObjectInfo rather than DisplayObjectInfo objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:36:44 +00:00
Michael Bayne c19bc45e29 More methods for converting and handling tile/fine/full coordinates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2263 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:36:18 +00:00
Michael Bayne 340124d567 Need to incorporate render priority in every comparison; rather than
assuming equality for display object vs. non-display object comparison.
Instead assume non-display objects have render priority of zero.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2252 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-11 05:47:28 +00:00
Michael Bayne dbbd006c6a Account for partitioning objects that overlap the objects they partition;
account for render priority when sorting the partitioning objects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2250 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-07 22:06:28 +00:00
Michael Bayne 3bada90f77 Handle non-existent object tiles gracefully.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2240 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-04 21:39:28 +00:00
Michael Bayne 5198206dfd Modified render priority handling so that a default priority can be
returned without modifying ObjectInfo.priority which would cause the
default priority to be written out as an overridden priority.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2235 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-04 03:33:09 +00:00
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