From 0905d5c0ced396a02d9b61ca2ec8d496ae8347f0 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 29 Nov 2001 23:07:38 +0000 Subject: [PATCH] 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 --- .../media/tile/bundle/tools/DumpBundle.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/tile/bundle/tools/DumpBundle.java b/src/java/com/threerings/media/tile/bundle/tools/DumpBundle.java index 8ec4a5037..1c683ab5a 100644 --- a/src/java/com/threerings/media/tile/bundle/tools/DumpBundle.java +++ b/src/java/com/threerings/media/tile/bundle/tools/DumpBundle.java @@ -1,5 +1,5 @@ // -// $Id: DumpBundle.java,v 1.1 2001/11/29 22:10:54 mdb Exp $ +// $Id: DumpBundle.java,v 1.2 2001/11/29 23:07:38 mdb Exp $ package com.threerings.media.tools.tile.bundle; @@ -20,6 +20,8 @@ public class DumpBundle { public static void main (String[] args) { + boolean dumpTiles = false; + if (args.length < 1) { String usage = "Usage: DumpBundle bundle.jar [bundle.jar ...]"; System.err.println(usage); @@ -27,6 +29,12 @@ public class DumpBundle } for (int i = 0; i < args.length; i++) { + // oh the hackery + if (args[i].equals("-tiles")) { + dumpTiles = true; + continue; + } + File file = new File(args[i]); try { ResourceBundle bundle = new ResourceBundle(file); @@ -36,6 +44,12 @@ public class DumpBundle Integer tsid = (Integer)tsids.next(); TileSet set = tsb.getTileSet(tsid.intValue()); System.out.println(tsid + " => " + set); + if (dumpTiles) { + for (int t = 0; t < set.getTileCount(); t++) { + System.out.println(" " + t + " => " + + set.getTile(t)); + } + } } } catch (Exception e) {