initial commit
This commit is contained in:
11
util/build.gradle
Normal file
11
util/build.gradle
Normal file
@@ -0,0 +1,11 @@
|
||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||
eclipse.project.name = appName + '-util'
|
||||
|
||||
dependencies {
|
||||
api "com.badlogicgames.gdx:gdx:$gdxVersion"
|
||||
api "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
|
||||
|
||||
if(enableGraalNative == 'true') {
|
||||
implementation "io.github.berstanio:gdx-svmhelper-annotations:$graalHelperVersion"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package io.github.com.quillraven.util;
|
||||
|
||||
import com.badlogic.gdx.tools.texturepacker.TexturePacker;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Utility class to execute LibGDX's TextureAtlas packer tool.
|
||||
* This tool packs multiple images into a single texture atlas.
|
||||
*/
|
||||
public class TexturePackerTool {
|
||||
public static void main(String[] args) {
|
||||
String inputDir = "assets_raw/map";
|
||||
String outputDir = "assets/maps";
|
||||
String packFileName = "tileset";
|
||||
|
||||
System.out.println("Packing textures from " + inputDir + " to " + outputDir + "/" + packFileName);
|
||||
TexturePacker.process(inputDir, outputDir, packFileName);
|
||||
System.out.println("Texture packing completed successfully!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user