Commit Graph

494 Commits

Author SHA1 Message Date
Michael Bayne 79da3ac15c Let the caller know that we're refusing a duplicate interesting object.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3071 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-13 20:48:27 +00:00
Michael Bayne 1da753e14d Brought things up to date with the latest Jakarta Commons world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3058 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-13 16:34:49 +00:00
Eric Lundberg beb2539663 Get rid of the not needed code that I had previously checked in for a
short stint of actually being used.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2988 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-03-31 02:16:12 +00:00
Eric Lundberg 74eb2bef88 Added code to allow object visitors to visit a specific section.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2986 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-03-30 01:30:38 +00:00
Michael Bayne d618d3c771 Eclipse suggested cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:50:28 +00:00
Ray Greenwell 796c953c89 Window.show() is deprecated in jdk 1.5, replaced with setVisible(true).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2965 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-22 18:55:26 +00:00
Michael Bayne 1688a19704 Allow for "loose" path location which gets the sprite as close as possible
by normal means and then walks them in a straight line from there (when
the straight line part will invariably be off-screen, this is OK).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2937 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-12 05:53:59 +00:00
Michael Bayne 7568ae1223 Provide support for locating incomplete paths.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2936 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-12 05:52:05 +00:00
Michael Bayne 7f4a01b795 Made getBlock() public, added enumerateResolvedBlocks(), pressObject().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2934 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-11 12:22:05 +00:00
Michael Bayne 197067593f Added support for visiting just the interesting objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2933 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-11 12:21:17 +00:00
Michael Bayne 0315c4316f Removed the hard coded jiggery pokery that we were doing to layout scene
object tips, replaced it with a system whereby custom tip layout
mechanisms can be registered for object action prefixes. The default tip
layout centers the tip in the object exactly as before minus the height
limitation business (which is actually no longer needed as the sailing
duty stations are no longer assigned to the rigging but to the wall below
the rigging).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2932 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-11 08:26:18 +00:00
Michael Bayne 9f48d11b4e Make the screen coordinates of the object's spot available since we have
them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2931 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-11 08:24:16 +00:00
Ray Greenwell 424c9b0e0e Let object action handlers have a crack at modifying the tool tip text
for an action (we already let them have a crack at the icon).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2930 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-07 22:03:08 +00:00
Michael Bayne d43f20d60f Only warn if we take a (relatively) long time path finding (ie. over 500ms).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2910 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-13 02:52:00 +00:00
Ray Greenwell bb11cd4d0a Some better comments, tightening up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2853 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-12 23:13:45 +00:00
Ray Greenwell 7795edf604 Use BaseTile objects to contain fringe tile info, mark them as impassible
if they are fringed on by any SPECIFIED tileId (ie, not the default tileId)
that is impassible.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2852 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-12 23:05:41 +00:00
Michael Bayne d7c1a05854 Deal more gracefully if some pathological circumstance prevents us from
resolving a scene object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2844 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-29 01:42:37 +00:00
Michael Bayne a02d076d8e Tone down the max path length, when searching for a path in unresolved
space, it ends up considering up to 10,000 nodes with a max path length of
50 which causes the client to hang for like 5 seconds. Not so good. With a
max path length of 20, that comes down to about 1,300 nodes which ends up
being non-linearly faster.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2825 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-15 23:20:40 +00:00
Michael Bayne 48cbb2d095 Track the amount of time we spend searching for paths and report it if
it's lengthy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2792 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-09-08 18:42:38 +00:00
Michael Bayne 11fc21a59b Added code for refreshing the currently displayed scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2777 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-16 03:42:28 +00:00
Michael Bayne f252c0f88d Added sanity check.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2729 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-27 02:50:53 +00:00
Michael Bayne 48c9556d18 Fine grained scene block resolution instrumentation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2706 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-12 04:16:32 +00:00
Michael Bayne eec42e8f42 Report our fully qualified tile id more human readibly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2705 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-12 04:16:10 +00:00
Michael Bayne b8b76e091c Preserve command events as is.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2676 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-23 20:16:07 +00:00
Michael Bayne 2f63091f59 No show all.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2672 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-20 21:50:56 +00:00
Michael Bayne fc9f2d88f3 Fire a special scene object action when an object is clicked or object
radial menu item is selected.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2671 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-19 22:20:02 +00:00
Michael Bayne 629c40f631 Increased the padding around the icon and between the icon and text. We're
going to need to make this customizable by derived classes at some point.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2670 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-19 22:12:51 +00:00
Michael Bayne e7a7c2ba09 Pulled icon lookup into method that can be overridden.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2669 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-19 22:03:14 +00:00
Michael Bayne 105aa7384d Added toArray().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2651 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-12 05:24:08 +00:00
Michael Bayne e6c3d54905 Disabled scene memory usage reporting as we get a good enough idea from
periodic cache stats at the moment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2643 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-05 18:41:36 +00:00
Michael Bayne 368cd940b6 Make all of our object radial menus the same size; having them scale to
the size of the object is not at all useful.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2630 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-02 18:57:15 +00:00
Michael Bayne 73a4a02aa1 A few substantial changes:
- Tiles are initialized after being constructed which makes life simpler
  for custom tiles which no longer have to have their own constructor that
  passes Tile's stuff down to it.

- Tiles are no longer LRU cached (because we blow through that cache
  instantly on all but the smallest of scenes), and are now tracked by
  weak references so that we guarantee that only one instance of a tile is
  ever in memory.

- Added code to track and report memory usage of weak cached tiles as well
  as "stray" tiles which are created through other means than asking a
  TileSet for a tile (fringe tiles being the most prolific example).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2628 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-31 00:56:38 +00:00
Michael Bayne 6d3d80c58e Keep a rectangle around with our tile coordinate footprint and use that
for overlapping calculations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2627 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-31 00:52:15 +00:00
Ray Greenwell 99ccd996df Oops, remove these too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2623 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 01:59:17 +00:00
Ray Greenwell af504ef8aa Added MisoUtil.getTileHash(), made both SceneBlock and AutoFringer use
it to pick random tiles based on x/y location.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2622 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 01:58:06 +00:00
Ray Greenwell bace19ea71 The AutoFringer picks which fringe tile to use next by querying a
Random, instead it relies on a duplicatable hashing method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2621 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 01:04:58 +00:00
Ray Greenwell 5f8309f118 publicized computeTips().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2620 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-28 18:15:26 +00:00
Michael Bayne f6325c5d4c Pass all the object info along when visiting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2615 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 19:04:29 +00:00
Michael Bayne a5e3752a7b Make it possible to refresh our object tile if we've had our colorizations
changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2614 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 18:25:19 +00:00
Michael Bayne 3bacbbe803 More useful debugging information.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2605 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-23 19:35:11 +00:00
Michael Bayne 328f4786ba Report our resolution on the AWT thread rather than the scene block
resolution thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2604 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-22 22:18:27 +00:00
Michael Bayne 9ab9a7f84b Let's not freak out, but warn and return -1. This is one of those "should
never happen" things that keeps happening.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2603 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-22 22:18:02 +00:00
Michael Bayne 8197441658 Restructure our block visible warning so that derived classes can augment
it as well as inhibit it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2601 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-22 16:10:54 +00:00
Michael Bayne 0642b97258 Warn if blocks take a long time to resolve; added debug logging to report
a histogram of block load times.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2600 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 17:10:41 +00:00
Michael Bayne 768da14b79 Allow derived class to turn off "block visible" warning. More debug
logging to help sort out the blue screen problem.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2599 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 17:10:05 +00:00
Michael Bayne 569522fd01 rethink() needs to return the number of "visible" blocks pending; added
code to log when we're not painting for lack of blocks and when we restore
painting so that we can further debug the proverbial blue screen situation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2598 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 15:27:45 +00:00
Michael Bayne 98216ddcbb Account for blocks a bit below our visible bounds because otherwise there
can be serious popping when entire buildings don't come into view until
after we've started displaying.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2597 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 00:28:22 +00:00
Michael Bayne bf4142423f That should be debug not info.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2596 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-20 23:58:27 +00:00
Michael Bayne 5bdf72f615 Differentiate between blocks that are visible and those that probably
aren't (we can't truly know if a block is visible until we resolve it
because objects of arbitrary height can overlap the view bounds even if
the block's footprint does not); resolve the definitely visible ones first
and go ahead and start drawing once the known visible blocks are ready.
This cuts the time spent on the "blue screen" by about 75%.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2595 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-20 23:57:48 +00:00
Ray Greenwell 7071f2e0da Don't save empty sections when saving scenes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2586 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 17:26:07 +00:00