From 4c623c92c30ec582a759548042fa4e8955608fed Mon Sep 17 00:00:00 2001 From: "jason@long.name" Date: Wed, 17 Jul 2013 20:30:36 +0000 Subject: [PATCH] MakeTiles: impl generation of different-sized tiles git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@734 d9718cc8-9f43-0410-858b-315f434eb58c --- build.xml | 6 ++++++ src/micropolisj/build_tool/MakeTiles.java | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index ff919f1..122d2d5 100644 --- a/build.xml +++ b/build.xml @@ -50,6 +50,12 @@ + + + + + diff --git a/src/micropolisj/build_tool/MakeTiles.java b/src/micropolisj/build_tool/MakeTiles.java index 6e056f9..a113ac9 100644 --- a/src/micropolisj/build_tool/MakeTiles.java +++ b/src/micropolisj/build_tool/MakeTiles.java @@ -16,11 +16,19 @@ public class MakeTiles static final Charset UTF8 = Charset.forName("UTF-8"); static final int NTILES = 960; - static final int TILE_SIZE = 16; + static int TILE_SIZE = 16; public static void main(String [] args) throws Exception { + if (args.length != 2) { + throw new Exception("Wrong number of arguments"); + } + + if (System.getProperty("tile_size") != null) { + TILE_SIZE = Integer.parseInt(System.getProperty("tile_size")); + } + File recipeFile = new File(args[0]); File outputFile = new File(args[1]);