Splitting UI atlas

This commit is contained in:
Anuken
2019-07-03 15:59:50 -04:00
parent b7008072f8
commit d3c8678f80
11 changed files with 7011 additions and 7379 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -0,0 +1,8 @@
{
duplicatePadding: true,
combineSubdirectories: true,
flattenPaths: true,
maxWidth: 2048,
maxHeight: 2048,
fast: true
}

View File

@@ -0,0 +1,8 @@
{
duplicatePadding: true,
combineSubdirectories: true,
flattenPaths: true,
maxWidth: 1024,
maxHeight: 1024,
fast: true
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1019 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -2,12 +2,9 @@ package io.anuke.mindustry;
import io.anuke.arc.*; import io.anuke.arc.*;
import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.Texture; import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.graphics.g2d.Draw;
import io.anuke.arc.graphics.g2d.SpriteBatch;
import io.anuke.arc.math.Mathf; import io.anuke.arc.math.Mathf;
import io.anuke.arc.util.Log; import io.anuke.arc.util.*;
import io.anuke.arc.util.Time;
import io.anuke.mindustry.core.*; import io.anuke.mindustry.core.*;
import io.anuke.mindustry.game.EventType.GameLoadEvent; import io.anuke.mindustry.game.EventType.GameLoadEvent;
import io.anuke.mindustry.io.BundleLoader; import io.anuke.mindustry.io.BundleLoader;
@@ -64,12 +61,12 @@ public class Mindustry extends ApplicationCore{
Core.graphics.clear(Color.BLACK); Core.graphics.clear(Color.BLACK);
Draw.proj().setOrtho(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight()); Draw.proj().setOrtho(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
Texture icon = new Texture("sprites/logotext.png"); //Texture icon = new Texture("sprites/logotext.png");
float width = Math.min(Core.graphics.getWidth() - 10f, icon.getWidth()); //float width = Math.min(Core.graphics.getWidth() - 10f, icon.getWidth());
Draw.rect(Draw.wrap(icon), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, width, (float)icon.getHeight() / icon.getWidth() * width); //Draw.rect(Draw.wrap(icon), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, width, (float)icon.getHeight() / icon.getWidth() * width);
Draw.flush(); //Draw.flush();
icon.dispose(); //icon.dispose();
} }
} }

View File

@@ -264,7 +264,7 @@ task tileImages(){
} }
} }
task pack(){ task pack(dependsOn: classes){
doLast{ doLast{
//cleanup old sprites //cleanup old sprites
@@ -281,7 +281,6 @@ task pack(){
//run generation task; generate all needed sprites //run generation task; generate all needed sprites
file(genFolder).mkdirs() file(genFolder).mkdirs()
javaexec{ javaexec{
main = "io.anuke.mindustry.ImagePacker" main = "io.anuke.mindustry.ImagePacker"
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
standardInput = System.in standardInput = System.in