Commit Graph

392 Commits

Author SHA1 Message Date
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 95b19feb51 The scene metrics are now *much* simpler.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2433 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 22:37:57 +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 7d58b4ed93 Fixed incorrect argument ordering.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2420 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 22:59:18 +00:00
Michael Bayne 81f90d1ee6 Fix bounding polygon calculation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2419 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 22:59:04 +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 50bf565485 Canned setBaseTiles().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2415 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 18:31:21 +00:00
Michael Bayne 27184f6ddd Fixed bug in footprint calculation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2414 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-18 18:30:57 +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 d933605343 Moved object handling into base MisoSceneModel, created new
SectionedMisoSceneModel for storing info on a section of a larger scene.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2406 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-12 02:14:10 +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 f15987477b made Cloneable
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2299 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-05 21:17:27 +00:00
Michael Bayne 5ed8637ecf In order to properly pick up any changes made to ObjectInfo records in our
objects array, we have to recreate it completely because objects could
become interesting or uninteresting and we'd never know when to remove
them from one storage mechanism and stick them in the other.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2289 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-24 18:40:41 +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 f06bb6beaa Combined display/runtime/editable scenes; revamped parser system.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2272 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 07:21:50 +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 38f11ca4c4 Combined display/runtime/editable scenes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2269 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:41:12 +00:00
Michael Bayne 89e6252169 Refactored Miso scene system to support larger (tiled) scenes in the
future.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2268 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:39:15 +00:00
Michael Bayne 9b487083d4 Tile layers went away.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2267 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:38:32 +00:00
Michael Bayne eaf00bf441 Fringe a tile at a time; made some small performance tweaks.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2266 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:38:12 +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 a5c01f8343 Added addObject().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2237 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-04 17:24:56 +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