Icon generation improvements
|
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 766 B |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 380 KiB |
|
Before Width: | Height: | Size: 611 KiB After Width: | Height: | Size: 632 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 279 KiB After Width: | Height: | Size: 258 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 285 KiB |
|
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 905 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 271 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 916 KiB After Width: | Height: | Size: 955 KiB |
@@ -175,6 +175,7 @@ public class Mods implements Loadable{
|
|||||||
arr.each(c -> {
|
arr.each(c -> {
|
||||||
if(c instanceof UnlockableContent && c.minfo.mod != null){
|
if(c instanceof UnlockableContent && c.minfo.mod != null){
|
||||||
UnlockableContent u = (UnlockableContent)c;
|
UnlockableContent u = (UnlockableContent)c;
|
||||||
|
u.load();
|
||||||
u.createIcons(packer);
|
u.createIcons(packer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -443,13 +443,13 @@ public class Block extends UnlockableContent{
|
|||||||
return editorVariantRegions;
|
return editorVariantRegions;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TextureRegion[] generateIcons(){
|
protected TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name)};
|
return new TextureRegion[]{region};
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextureRegion[] getGeneratedIcons(){
|
public TextureRegion[] getGeneratedIcons(){
|
||||||
if(generatedIcons == null){
|
if(generatedIcons == null){
|
||||||
generatedIcons = generateIcons();
|
generatedIcons = icons();
|
||||||
}
|
}
|
||||||
return generatedIcons;
|
return generatedIcons;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.defense;
|
package mindustry.world.blocks.defense;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -15,7 +14,7 @@ import mindustry.gen.*;
|
|||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.Vars.tilesize;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class PointDefenseTurret extends Block{
|
public class PointDefenseTurret extends Block{
|
||||||
public final int timerTarget = timers++;
|
public final int timerTarget = timers++;
|
||||||
@@ -48,8 +47,8 @@ public class PointDefenseTurret extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find("block-" + size), Core.atlas.find(name)};
|
return new TextureRegion[]{baseRegion, region};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PointDefenseEntity extends TileEntity{
|
public class PointDefenseEntity extends TileEntity{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class Wall extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};
|
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,8 +123,8 @@ public abstract class Turret extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find("block-" + size), Core.atlas.find(name)};
|
return new TextureRegion[]{baseRegion, region};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.distribution;
|
package mindustry.world.blocks.distribution;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -72,8 +71,8 @@ public class Conveyor extends Block implements Autotiler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name + "-0-0")};
|
return new TextureRegion[]{regions[0][0]};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.distribution;
|
package mindustry.world.blocks.distribution;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
@@ -48,8 +47,8 @@ public class MassDriver extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name + "-base"), Core.atlas.find(name)};
|
return new TextureRegion[]{baseRegion, region};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class PayloadConveyor extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected TextureRegion[] generateIcons(){
|
protected TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name + "-icon")};
|
return new TextureRegion[]{Core.atlas.find(name + "-icon")};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class Floor extends Block{
|
|||||||
|
|
||||||
Color color = new Color();
|
Color color = new Color();
|
||||||
Color color2 = new Color();
|
Color color2 = new Color();
|
||||||
PixmapRegion image = Core.atlas.getPixmap((AtlasRegion)generateIcons()[0]);
|
PixmapRegion image = Core.atlas.getPixmap((AtlasRegion)icons()[0]);
|
||||||
PixmapRegion edge = Core.atlas.getPixmap("edge-stencil");
|
PixmapRegion edge = Core.atlas.getPixmap("edge-stencil");
|
||||||
Pixmap result = new Pixmap(edge.width, edge.height);
|
Pixmap result = new Pixmap(edge.width, edge.height);
|
||||||
|
|
||||||
@@ -146,11 +146,6 @@ public class Floor extends Block{
|
|||||||
packer.add(PageType.environment, name + "-edge", result);
|
packer.add(PageType.environment, name + "-edge", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TextureRegion[] generateIcons(){
|
|
||||||
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawBase(Tile tile){
|
public void drawBase(Tile tile){
|
||||||
Mathf.random.setSeed(tile.pos());
|
Mathf.random.setSeed(tile.pos());
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ public class Rock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return variants == 0 ? super.generateIcons() : new TextureRegion[]{Core.atlas.find(name + "1")};
|
return variants == 0 ? super.icons() : new TextureRegion[]{Core.atlas.find(name + "1")};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import mindustry.type.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.*;
|
import mindustry.world.blocks.*;
|
||||||
|
|
||||||
import static mindustry.Vars.tilesize;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class Conduit extends LiquidBlock implements Autotiler{
|
public class Conduit extends LiquidBlock implements Autotiler{
|
||||||
public final int timerFlow = timers++;
|
public final int timerFlow = timers++;
|
||||||
@@ -68,8 +68,8 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find("conduit-bottom"), Core.atlas.find(name + "-top-0")};
|
return new TextureRegion[]{Core.atlas.find("conduit-bottom"), topRegions[0]};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConduitEntity extends LiquidBlockEntity{
|
public class ConduitEntity extends LiquidBlockEntity{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.liquid;
|
package mindustry.world.blocks.liquid;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
@@ -22,8 +21,8 @@ public class LiquidBlock extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name + "-top")};
|
return new TextureRegion[]{bottomRegion, topRegion};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LiquidBlockEntity extends TileEntity{
|
public class LiquidBlockEntity extends TileEntity{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.liquid;
|
package mindustry.world.blocks.liquid;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
@@ -25,8 +24,8 @@ public class LiquidJunction extends LiquidBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name)};
|
return new TextureRegion[]{region};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LiquidJunctionEntity extends TileEntity{
|
public class LiquidJunctionEntity extends TileEntity{
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ public class ImpactReactor extends PowerGenerator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name)};
|
return new TextureRegion[]{bottomRegion, region};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FusionReactorEntity extends GeneratorEntity{
|
public class FusionReactorEntity extends GeneratorEntity{
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ public class Cultivator extends GenericCrafter{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-top"),};
|
return new TextureRegion[]{region, topRegion};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CultivatorEntity extends GenericCrafterEntity{
|
public class CultivatorEntity extends GenericCrafterEntity{
|
||||||
|
|||||||
@@ -164,8 +164,8 @@ public class Drill extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-rotator"), Core.atlas.find(name + "-top")};
|
return new TextureRegion[]{region, rotatorRegion, topRegion};
|
||||||
}
|
}
|
||||||
|
|
||||||
void countOre(Tile tile){
|
void countOre(Tile tile){
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.production;
|
package mindustry.world.blocks.production;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
@@ -30,8 +29,8 @@ public class Fracker extends SolidPump{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-rotator"), Core.atlas.find(name + "-top")};
|
return new TextureRegion[]{region, rotatorRegion, topRegion};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FrackerEntity extends SolidPumpEntity{
|
public class FrackerEntity extends SolidPumpEntity{
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ public class GenericCrafter extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return drawIcons == null ? super.generateIcons() : drawIcons.get();
|
return drawIcons == null ? super.icons() : drawIcons.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ public class Pump extends LiquidBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name)};
|
return new TextureRegion[]{region};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ public class SolidPump extends Pump{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-rotator"), Core.atlas.find(name + "-top")};
|
return new TextureRegion[]{region, rotatorRegion, topRegion};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SolidPumpEntity extends PumpEntity{
|
public class SolidPumpEntity extends PumpEntity{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.units;
|
package mindustry.world.blocks.units;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
@@ -35,8 +34,8 @@ public class Reconstructor extends UnitBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-out"), Core.atlas.find(name + "-top")};
|
return new TextureRegion[]{region, outRegion, topRegion};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.units;
|
package mindustry.world.blocks.units;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -14,7 +13,7 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.tilesize;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class RepairPoint extends Block{
|
public class RepairPoint extends Block{
|
||||||
private static final Rect rect = new Rect();
|
private static final Rect rect = new Rect();
|
||||||
@@ -56,8 +55,8 @@ public class RepairPoint extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name + "-base"), Core.atlas.find(name)};
|
return new TextureRegion[]{baseRegion, region};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RepairPointEntity extends TileEntity{
|
public class RepairPointEntity extends TileEntity{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.world.blocks.units;
|
package mindustry.world.blocks.units;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -86,8 +85,8 @@ public class UnitFactory extends UnitBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TextureRegion[] generateIcons(){
|
public TextureRegion[] icons(){
|
||||||
return new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-out"), Core.atlas.find(name + "-top")};
|
return new TextureRegion[]{region, outRegion, topRegion};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -99,10 +99,11 @@ public class Generators{
|
|||||||
Image colors = new Image(content.blocks().size, 1);
|
Image colors = new Image(content.blocks().size, 1);
|
||||||
|
|
||||||
for(Block block : content.blocks()){
|
for(Block block : content.blocks()){
|
||||||
|
block.load();
|
||||||
|
|
||||||
TextureRegion[] regions = block.getGeneratedIcons();
|
TextureRegion[] regions = block.getGeneratedIcons();
|
||||||
|
|
||||||
if(block instanceof Floor){
|
if(block instanceof Floor){
|
||||||
block.load();
|
|
||||||
for(TextureRegion region : block.variantRegions()){
|
for(TextureRegion region : block.variantRegions()){
|
||||||
GenRegion gen = (GenRegion)region;
|
GenRegion gen = (GenRegion)region;
|
||||||
if(gen.path == null) continue;
|
if(gen.path == null) continue;
|
||||||
@@ -198,7 +199,7 @@ public class Generators{
|
|||||||
}catch(IllegalArgumentException e){
|
}catch(IllegalArgumentException e){
|
||||||
Log.info("Skipping &ly'@'", block.name);
|
Log.info("Skipping &ly'@'", block.name);
|
||||||
}catch(NullPointerException e){
|
}catch(NullPointerException e){
|
||||||
Log.err("Block &ly'@'&lr has an null region!");
|
Log.err("Block &ly'@'&lr has an null region!", block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +230,7 @@ public class Generators{
|
|||||||
});
|
});
|
||||||
|
|
||||||
ImagePacker.generate("item-icons", () -> {
|
ImagePacker.generate("item-icons", () -> {
|
||||||
for(UnlockableContent item : (Seq<? extends UnlockableContent>)(Seq)Seq.withArrays(content.items(), content.liquids())){
|
for(UnlockableContent item : Seq.<UnlockableContent>withArrays(content.items(), content.liquids())){
|
||||||
Image base = ImagePacker.get(item.getContentType().name() + "-" + item.name);
|
Image base = ImagePacker.get(item.getContentType().name() + "-" + item.name);
|
||||||
for(Cicon icon : Cicon.scaled){
|
for(Cicon icon : Cicon.scaled){
|
||||||
//if(icon.size == base.width) continue;
|
//if(icon.size == base.width) continue;
|
||||||
@@ -339,7 +340,7 @@ public class Generators{
|
|||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
Image image = gens.get(floor, ImagePacker.get(floor.generateIcons()[0]));
|
Image image = gens.get(floor, ImagePacker.get(floor.getGeneratedIcons()[0]));
|
||||||
Image edge = ImagePacker.get("edge-stencil");
|
Image edge = ImagePacker.get("edge-stencil");
|
||||||
Image result = new Image(edge.width, edge.height);
|
Image result = new Image(edge.width, edge.height);
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,14 @@ public class ImagePacker{
|
|||||||
return (AtlasRegion)regionCache.get(name);
|
return (AtlasRegion)regionCache.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AtlasRegion find(String name, String def){
|
||||||
|
if(!regionCache.containsKey(name)){
|
||||||
|
return (AtlasRegion)regionCache.get(def);
|
||||||
|
}
|
||||||
|
return (AtlasRegion)regionCache.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean has(String s){
|
public boolean has(String s){
|
||||||
return regionCache.containsKey(s);
|
return regionCache.containsKey(s);
|
||||||
|
|||||||