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
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
//
|
||||
// $Id: DumpBundle.java,v 1.2 2001/11/29 23:07:38 mdb Exp $
|
||||
// $Id: DumpBundle.java,v 1.3 2001/11/30 02:34:58 mdb Exp $
|
||||
|
||||
package com.threerings.media.tools.tile.bundle;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.threerings.resource.ResourceManager;
|
||||
import com.threerings.resource.ResourceBundle;
|
||||
|
||||
import com.threerings.media.ImageManager;
|
||||
|
||||
import com.threerings.media.tile.TileSet;
|
||||
import com.threerings.media.tile.bundle.BundleUtil;
|
||||
import com.threerings.media.tile.bundle.TileSetBundle;
|
||||
@@ -28,6 +31,11 @@ public class DumpBundle
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
// create a resource and image manager in case they want to dump
|
||||
// the tiles
|
||||
ResourceManager rmgr = new ResourceManager(null, "rsrc");
|
||||
ImageManager imgr = new ImageManager(rmgr);
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
// oh the hackery
|
||||
if (args[i].equals("-tiles")) {
|
||||
@@ -39,6 +47,8 @@ public class DumpBundle
|
||||
try {
|
||||
ResourceBundle bundle = new ResourceBundle(file);
|
||||
TileSetBundle tsb = BundleUtil.extractBundle(bundle);
|
||||
tsb.init(bundle, imgr);
|
||||
|
||||
Iterator tsids = tsb.enumerateTileSetIds();
|
||||
while (tsids.hasNext()) {
|
||||
Integer tsid = (Integer)tsids.next();
|
||||
|
||||
Reference in New Issue
Block a user