From 4357c047f3d193d46a3715d028b467e84570979c Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 21 Jun 2002 18:44:28 +0000 Subject: [PATCH] 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 --- .../cast/bundle/tools/ComponentBundlerTask.java | 3 +-- src/java/com/threerings/media/tile/TrimmedTileSet.java | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java b/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java index 340e72138..9c56fd587 100644 --- a/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java +++ b/src/java/com/threerings/cast/bundle/tools/ComponentBundlerTask.java @@ -1,5 +1,5 @@ // -// $Id: ComponentBundlerTask.java,v 1.10 2002/06/21 18:09:37 mdb Exp $ +// $Id: ComponentBundlerTask.java,v 1.11 2002/06/21 18:44:28 mdb Exp $ package com.threerings.cast.bundle.tools; @@ -184,7 +184,6 @@ public class ComponentBundlerTask extends Task TrimmedTileSet tset = TrimmedTileSet.trimTileSet(aset, jout); tset.setImagePath(ipath); - tset.setName(aset.getName()); // also write our trimmed tileset to the jar file String tpath = composePath( diff --git a/src/java/com/threerings/media/tile/TrimmedTileSet.java b/src/java/com/threerings/media/tile/TrimmedTileSet.java index bd5622f25..649902afc 100644 --- a/src/java/com/threerings/media/tile/TrimmedTileSet.java +++ b/src/java/com/threerings/media/tile/TrimmedTileSet.java @@ -1,5 +1,5 @@ // -// $Id: TrimmedTileSet.java,v 1.2 2002/06/21 18:09:34 mdb Exp $ +// $Id: TrimmedTileSet.java,v 1.3 2002/06/21 18:44:27 mdb Exp $ package com.threerings.media.tile; @@ -38,14 +38,18 @@ public class TrimmedTileSet extends TileSet } /** - * Creates a trimmed tileset from the supplied source tileset. See - * {@link TileSetTrimmer#trimTileSet} for further information. + * Creates a trimmed tileset from the supplied source tileset. The + * image path must be set by hand to the appropriate path based on + * where the image data that is written to the destImage + * parameter is actually stored on the file system. See {@link + * TileSetTrimmer#trimTileSet} for further information. */ public static TrimmedTileSet trimTileSet ( TileSet source, OutputStream destImage) throws IOException { final TrimmedTileSet tset = new TrimmedTileSet(); + tset.setName(source.getName()); int tcount = source.getTileCount(); // grab the dimensions of the original tiles