Skip to content

Instantly share code, notes, and snippets.

@illuzor
Created March 30, 2015 11:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save illuzor/637c196f90a8fe179311 to your computer and use it in GitHub Desktop.
Save illuzor/637c196f90a8fe179311 to your computer and use it in GitHub Desktop.
<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