Commit Graph

95 Commits

Author SHA1 Message Date
Michael Bayne 7428f885cf Moved getTileHash() into TileUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3628 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-28 17:42:55 +00:00
Michael Bayne d62b0dfdbb Missed another serialization spot.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3403 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-14 23:58:02 +00:00
Michael Bayne b97d9ac7c3 Not to booch when serialized and then dead-code removed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3402 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-14 23:53:36 +00:00
Michael Bayne d29db7765a Updated to use non-deprecated method signatures.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3254 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-30 20:03:47 +00:00
Michael Bayne a70efc3ffb NoLongerAnySuchNoSuchTileException. Instead we just log a warning and
return a tile with an error image so that the caller doesn't freak out and
we achieve maximal "continue to work as much as possible."


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3177 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-28 17:49:02 +00:00
Michael Bayne a9720fd905 LGPLed the library. Hello world.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-27 02:21:06 +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
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 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 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
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 e44f7c243a Close streams immediately after using them.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2575 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-14 21:34:01 +00:00
Michael Bayne daa9c8ee0e We can use the raw images here because we eventually splat all fringe
tiles into a composited image which has been prepared for display.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:33:30 +00:00
Michael Bayne 76cb19646c Use the default base tileset when computing fringe if an actual base tile
is not specified.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2444 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-22 20:36:11 +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 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 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
Michael Bayne 8c831a0f9f Oh how I love to fiddle with the serialVersionUID.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2157 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 09:11:37 +00:00
Michael Bayne 5720be31a5 Have to pass in our friendly neighborhood image manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2137 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 02:50:54 +00:00
Michael Bayne 9233719363 Modified to support tile immutability and new media architecture; auto
fringer now generates fully stamped fringe tiles rather than tiles with a
list of images to be painted every time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2120 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 22:55:12 +00:00
Michael Bayne 1ce6951cb6 Repackaged a few things in media: sounds stuff went into media.sound and
image stuff went into media.image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2100 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-08 04:09:03 +00:00
Walter Korman 53d4108602 Added temporary fringe debug logging so that we can assess time and memory
usage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:30:37 +00:00
Michael Bayne 11d84452bb Whoops. Need the right modifiers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1651 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-19 22:58:15 +00:00
Michael Bayne 4cbd454b24 Added serialVersionUID to the various classes we serialize for
configuration reasons to avoid annoying "recompile and nothing works"
phenomenon. We'll opt for the "make incompatible class change and nothing
works" scenario instead.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1650 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-19 22:28:05 +00:00
Ray Greenwell 0c664ce9b7 Use the new accessor methods for getting base tile ids from the model.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 19:07:04 +00:00
Michael Bayne 609c6939da Minor formatting edits that occurred in the course of debugging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 16:48:34 +00:00
Michael Bayne 8ad4c1abea Dooh! Graphics not Graphics2D.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 16:47:48 +00:00
Michael Bayne 6dcdba4540 Added toString() to records; report which record we're failing to add when
such things happen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1343 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-07 00:05:02 +00:00
Michael Bayne 99c4330646 The vast and the sweeping. Modified the tile framework such that tiles no
longer provide access to their underlying image (they actually still do,
but not in the normal course of affairs). This will allow us to use
"trimmed" tiles which are trimmed to the smallest rectangle that contains
the non-transparent pixels in a tile image, which will shrink up our
components and other tiles a great deal.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 18:08:32 +00:00
Michael Bayne 2005f22000 Moved fringing code into base display miso scene and added code to fringe
a scene when it is first displayed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1327 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 04:12:48 +00:00
Ray Greenwell f687571d0f How did this get away with having the old path for the .dat file?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1249 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 21:30:56 +00:00
Ray Greenwell 02dd621601 If fringing a rectangular area, you must pass in your own Random object.
If fringing an entire scene, you must pass in a randomization seed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1226 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 18:05:07 +00:00
Ray Greenwell 94feee3436 Moved the bits -> index reverse lookup from FringeConfiguration to
AutoFringer because our fringe tileset is hardcoded now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1220 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-08 19:41:52 +00:00
Ray Greenwell 41185335c7 Don't parse the 'tiles' attribute, we decide to just hardcode the tiles
since the autofringer can create any fringe now anyway.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1219 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-08 19:40:04 +00:00
Ray Greenwell 03579fa0ef Oops: our variables were still defined as 'static'.
Changed private to protected.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1218 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-08 18:41:58 +00:00
Ray Greenwell 601d515df2 If we fail on a lookup of turning fringebits into a fringe index,
try decomposing the bits into contiguous regions and see if we
can't get fringe indexes for those regions.
This makes everything always fringes everywhere.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1211 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 22:07:41 +00:00
Ray Greenwell 0768f82fd9 Use the FringeTile multi-image functionality to allow different base tilesets
to simultaneously fringe upon another base.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1210 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 20:50:30 +00:00
Ray Greenwell 79cde8f9eb cleanup
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1206 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 03:52:28 +00:00
Ray Greenwell 91b7065486 Store images in our mask cache, use the new FringeTile object and
ImageUtil.composeMaskedImage() to create the masked fringe images.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1204 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 03:43:24 +00:00
Ray Greenwell 3474c9c199 FringeTile- a Tile object that may contain multiple images.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1203 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 03:41:58 +00:00
Ray Greenwell 07eb05ce27 compiles now!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1198 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 02:07:13 +00:00
Michael Bayne 168b16d006 Screw the miso tileset repository; we'll just have the miso tile manager
load the fringe configuration from a standard place in the classpath.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1194 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:56:46 +00:00
Ray Greenwell 7bac770744 The AutoFringer!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1192 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:53:58 +00:00
Michael Bayne b4d6464075 Miso tile manager extends regular tile manager and provides access to an
auto fringer; miso tileset repository does same and provides access to
fringe configuration.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1190 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:46:56 +00:00
Michael Bayne bab3b54d41 Moved into miso.tile from miso.scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1189 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:38:32 +00:00
Ray Greenwell b2180b0072 Added method to get a whole random FringeTileSetRecord, instead of getting
the fringe tsid.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1188 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:34:12 +00:00
Ray Greenwell 3ca8de355e Fixed turning a String into a boolean value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1187 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-05 23:18:36 +00:00