From 7ff4d3307a92b0c577163011e39bca95724f5737 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Thu, 22 Nov 2018 17:36:28 +0400 Subject: [PATCH] Add gdx-tools dependency, add TextureSetup class --- build.gradle | 1 + .../me/brickbuster/desktop/TextureSetup.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 desktop/src/com/me/brickbuster/desktop/TextureSetup.java diff --git a/build.gradle b/build.gradle index 8f083b0..f1e5a99 100644 --- a/build.gradle +++ b/build.gradle @@ -44,6 +44,7 @@ project(":desktop") { dependencies { compile project(":core") + compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion" compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" diff --git a/desktop/src/com/me/brickbuster/desktop/TextureSetup.java b/desktop/src/com/me/brickbuster/desktop/TextureSetup.java new file mode 100644 index 0000000..f1bf2f1 --- /dev/null +++ b/desktop/src/com/me/brickbuster/desktop/TextureSetup.java @@ -0,0 +1,17 @@ +package com.me.brickbuster.desktop; + +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.tools.texturepacker.TexturePacker; + +public class TextureSetup { + + public static void main(String[] args) { + TexturePacker.Settings settings = new TexturePacker.Settings(); + settings.paddingX = 8; + settings.paddingY = 8; + settings.filterMin = Texture.TextureFilter.MipMapLinearLinear; + settings.filterMag = Texture.TextureFilter.MipMapLinearLinear; + TexturePacker.process(settings,"sprites", "./", "textures"); + } + +}