Commit Graph

102 Commits

Author SHA1 Message Date
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 9ff74211d4 Obsolete.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1526 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:44:50 +00:00
Michael Bayne 4357c047f3 Trimmed tileset takes care of setting up its name, but the image path must
be set by the caller.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1525 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:44:28 +00:00
Michael Bayne c3c08a03b3 Refactored the tileset trimming code so that it can more easily be reused
to trim object tilesets.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1524 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:09:37 +00:00
Michael Bayne 73ee48bc3f Provide access to our trimmed bounds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1499 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 23:28:14 +00:00
Michael Bayne fcc65fc4d9 A utility class for generating a trimmed tileset (and associated trimmed
image) from some other (presumably non-trimmed) tileset.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1489 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 08:29:59 +00:00
Michael Bayne 2c50a44608 Formatting fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1488 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 08:28:55 +00:00
Michael Bayne 38584bb12e Switch to using a subimage instead of clipping because clipping creates
too much garbage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1487 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 08:28:25 +00:00
Michael Bayne 1b6811d221 Tileset -> TileSet.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1486 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 08:27:35 +00:00
Michael Bayne 5214d15ac6 Tileset => TileSet; made getTileSetImage() public so that the trimming
code can get to the underlying tileset image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1485 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 08:27:06 +00:00
Michael Bayne 2c9be83574 Moved subimage creation into overridable method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1484 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 08:26:22 +00:00
Michael Bayne e91b6420b1 Go ahead and return our cached subimage since we have it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1479 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 00:20:49 +00:00
Michael Bayne 4b29f806df We've discovered that setting the clipping rectangle generates a crapload
of rectangle objects. Thus rendering hundreds of tiles each frame has an
"undesirable" impact on garbage collection. I think Walter and I were
seeing something like 400k per second of garbage. So we're back to
extracting a subimage, which we're pretty sure doesn't copy the image
data, but simply draws the cropped image data directly from the original
rasters without creating shitloads of garbage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1474 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 22:19:56 +00:00
Michael Bayne 1b3b5bb794 Wrote tools to ease the process of renaming tilesets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1421 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-04 02:50:02 +00:00
Ray Greenwell 9a55ae3989 oops: removed leftover debugging
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 01:53:36 +00:00
Ray Greenwell 0dc1f378e5 use the standard hitTest utility method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1362 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 01:49:38 +00:00
Michael Bayne 78ec4ab84b Temporary ship recolorizations.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 18:43:32 +00:00
Michael Bayne 34f9f3d8c6 Leave the images in 8-bit format when we return them from the tileset
bundle so that we can recolor them if we later desire.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 16:51:26 +00:00
Michael Bayne 320706e857 Do our recoloring in one fell swoop.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1341 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 23:23:27 +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
Ray Greenwell 30556274df Obsolete. Functionality made more generic and moved to
com.threerings.media.util.ImageUtil.composeMaskedImage()


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1205 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 03:44:41 +00:00
Ray Greenwell 9106842c04 initial revision
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1200 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 02:15:37 +00:00
Michael Bayne 50012b1cd1 Only rewrite out the tileset map if it has changed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1180 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-03 22:42:22 +00:00
Michael Bayne 5d55a29da4 Generate the name of the bundle.jar file from the bundle description file
so that we can generate a whole set of bundles in a directory tree in one
fell swoop.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1177 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-03 22:21:35 +00:00
Michael Bayne f495557624 Report the file on which we choked when we choke.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1176 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-03 22:20:50 +00:00
Michael Bayne 507920843d Added method for checking to see if a tileset is mapped to an id.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1175 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-03 22:03:23 +00:00
Michael Bayne 4110fb82c4 Validate gapSize and offsetPos arrays before trying to use them.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1170 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-01 22:53:39 +00:00
Michael Bayne 4afaa186eb Track some repackaging in the Jakarta libs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1168 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-01 16:49:26 +00:00
Michael Bayne bf9a2ca151 Added methods to allow parsing from a file or directly from an input
stream.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1165 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-28 00:56:20 +00:00
Ray Greenwell 1a53da6727 Formatting changes:
- removed tabs
- explicitly specify imports
- I made each comment a complete and punctuated sentance.
- other minor convention changes


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1155 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-26 23:35:02 +00:00
Ray Greenwell aca95b8540 Store object tiles in HashIntMaps instead of in arrays because they may
have coordinates outside of the normal scene coordinates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1150 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-26 20:17:51 +00:00
Michael Bayne 4641d00583 Moved ImageUtil into media.util with the rest of the util classes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1067 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-24 02:20:44 +00:00
Michael Bayne 0f47b72787 Repackaging! Changed a bunch of foo.tools.bar to foo.bar.tools and brought
some other things up to date with changes that had been made to that
effect previously. I love the vast sweeping changes that come along with a
change of mind.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@933 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-05 20:29:10 +00:00
Michael Bayne f1f4e9c59a Added hitTest() which determines whether or not a point touches a
non-transparent pixel in an object's image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@901 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 02:08:52 +00:00
Walter Korman d6aa41396b Added ImageUtil.createImage() to create blank images that are compatible
with the destination screen device.  Updated existing code that previously
created buffered images directly to reference ImageUtil.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@870 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 17:48:11 +00:00
Michael Bayne c6e4b73851 Added comments to some code that needs to be fixed later.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@868 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-17 23:43:14 +00:00
Michael Bayne b9f77beded Construct resource manager according to new method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@866 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:01:45 +00:00
Michael Bayne 861e8ffb98 Added support for explicitly specifying the offset into the object tile
image that should be centered at the origin when the tile is rendered.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@826 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-18 08:37:54 +00:00
Michael Bayne 940154d7e3 The image manager now falls back to loading images via the Toolkit if it
can't load the ImageIO classes. This unfortunately means that we're back
to passing a Component instance to the ImageManager at construct time.
Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-07 01:33:29 +00:00
Michael Bayne 9a02d456e5 Obtain our images through the image manager. We may be back later to have
the image manager cache them as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@718 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-30 02:34:58 +00:00
Michael Bayne 0905d5c0ce Added ability to dump tiles in addition to tilesets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@710 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 23:07:38 +00:00
Michael Bayne 70f6e9091d Was assigning object tile dimensions incorrectly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@709 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 23:07:12 +00:00
Michael Bayne 8d30af6db4 Added bundle dumper.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@708 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 22:10:54 +00:00
Michael Bayne be165a5c12 Added toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@707 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 22:10:42 +00:00
Michael Bayne fef4803767 Extended the wrong class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@706 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 22:10:28 +00:00
Michael Bayne 46b71392aa Moved some stuff into BundleUtil. Added code to support post-parsing
tileset validation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@700 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 21:58:15 +00:00
Michael Bayne be5428a2f7 Moved some bundle stuff into BundleUtil. Added methods to support
post-parsing tileset validation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@699 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 21:57:31 +00:00
Michael Bayne 4f6e0f7542 Documentation fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@693 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 20:39:37 +00:00
Michael Bayne 075ea5e9fe Created a persistent tileset name to id broker implementation; wrote an
ANT task for creating tileset bundles.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@659 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 00:14:11 +00:00
Michael Bayne b7312882f4 Added enumerateTileSetIds().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@658 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-29 00:13:42 +00:00