Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<project name="Graphics Converter" default="atlasses">
<property name="C:/Program Files (x86)/Adobe Gaming SDK 1.4/Utilities/ATF Tools/png2atf.exe"/>
<property name="graphics.souce" location="../_sources/atlasses_ready." />
<property name="graphics.destanation" location="../bin/graphics" />
<macrodef name="png2atf">
<attribute name="from" />
<attribute name="to" />
<sequential>
<apply executable="${atf.tool}">
<arg value="-e" />
<arg value="-i" />
<srcfile />
<arg value="-o" />
<targetfile />
<fileset dir="@{from}" includes="**/*.png" />
<mapper type="glob" from="*.png" to="@{to}/*.atf" />
</apply>
</sequential>
</macrodef>
<target name="-convert.atlasses.graphics" description="Convert all png atlasses to atf">
<delete dir="${graphics.destanation}"/>
<mkdir dir="${graphics.destanation}"/>
<png2atf from="${graphics.souce}" to="${graphics.destanation}" />
</target>
<target name="-move.xmls" description="Move xml files to destanation">
<copy todir="${graphics.destanation}">
<fileset dir="${graphics.souce}" includes="**/*.xml" />
</copy>
</target>
<target name="atlasses" depends="-convert.atlasses.graphics, -move.xmls" description="Run all targets" />
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment