Shadows setting / Server map text limit / Fallback spritesheet

This commit is contained in:
Anuken
2019-03-23 11:02:59 -04:00
parent 4bc9143306
commit ed4d0eb5d0
15 changed files with 10978 additions and 11 deletions

View File

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

View File

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

View File

@@ -413,6 +413,7 @@ category.items = Items
category.crafting = Input/Output category.crafting = Input/Output
category.shooting = Shooting category.shooting = Shooting
category.optional = Optional Enhancements category.optional = Optional Enhancements
setting.shadows.name = Shadows
setting.animatedwater.name = Animated Water setting.animatedwater.name = Animated Water
setting.antialias.name = Antialias[LIGHT_GRAY] (requires restart)[] setting.antialias.name = Antialias[LIGHT_GRAY] (requires restart)[]
setting.indicators.name = Enemy/Ally Indicators setting.indicators.name = Enemy/Ally Indicators
@@ -623,10 +624,10 @@ block.pine.name = Pine
block.white-tree-dead.name = White Tree Dead block.white-tree-dead.name = White Tree Dead
block.white-tree.name = White Tree block.white-tree.name = White Tree
block.spore-cluster.name = Spore Cluster block.spore-cluster.name = Spore Cluster
block.metal-floor.name = Metal Floor block.metal-floor.name = Metal Floor 1
block.metal-floor-2.name = Metal Floor 2 block.metal-floor-2.name = Metal Floor 2
block.metal-floor-3.name = Metal Floor 3 block.metal-floor-3.name = Metal Floor 3
block.metal-floor-5.name = Metal Floor 5 block.metal-floor-5.name = Metal Floor 4
block.metal-floor-damaged.name = Metal Floor Damaged block.metal-floor-damaged.name = Metal Floor Damaged
block.ignarock.name = Igna Rock block.ignarock.name = Igna Rock
block.hotrock.name = Hot Rock block.hotrock.name = Hot Rock

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -4,12 +4,11 @@ import io.anuke.arc.ApplicationListener;
import io.anuke.arc.Core; import io.anuke.arc.Core;
import io.anuke.arc.Events; import io.anuke.arc.Events;
import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.GL20;
import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.Draw;
import io.anuke.arc.graphics.g2d.TextureAtlas; import io.anuke.arc.graphics.g2d.TextureAtlas;
import io.anuke.arc.input.KeyCode; import io.anuke.arc.input.KeyCode;
import io.anuke.arc.util.Interval; import io.anuke.arc.util.*;
import io.anuke.arc.util.Strings;
import io.anuke.arc.util.Time;
import io.anuke.mindustry.content.Mechs; import io.anuke.mindustry.content.Mechs;
import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.entities.Effects; import io.anuke.mindustry.entities.Effects;
@@ -32,6 +31,7 @@ import io.anuke.mindustry.ui.dialogs.FloatingDialog;
import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.Tile;
import java.io.IOException; import java.io.IOException;
import java.nio.IntBuffer;
import static io.anuke.arc.Core.scene; import static io.anuke.arc.Core.scene;
import static io.anuke.mindustry.Vars.*; import static io.anuke.mindustry.Vars.*;
@@ -51,6 +51,10 @@ public class Control implements ApplicationListener{
private InputHandler[] inputs = {}; private InputHandler[] inputs = {};
public Control(){ public Control(){
IntBuffer buf = BufferUtils.newIntBuffer(1);
Core.gl.glGetIntegerv(GL20.GL_MAX_TEXTURE_SIZE, buf);
int maxSize = buf.get(0);
saves = new Saves(); saves = new Saves();
data = new GlobalData(); data = new GlobalData();
@@ -59,7 +63,7 @@ public class Control implements ApplicationListener{
Effects.setShakeFalloff(10000f); Effects.setShakeFalloff(10000f);
content.initialize(Content::init); content.initialize(Content::init);
Core.atlas = new TextureAtlas("sprites/sprites.atlas"); Core.atlas = new TextureAtlas(maxSize < 2048 ? "sprites/sprites_fallback.atlas" : "sprites/sprites.atlas");
Draw.scl = 1f / Core.atlas.find("scale_marker").getWidth(); Draw.scl = 1f / Core.atlas.find("scale_marker").getWidth();
content.initialize(Content::load); content.initialize(Content::load);

View File

@@ -26,7 +26,6 @@ import static io.anuke.mindustry.Vars.*;
public class BlockRenderer{ public class BlockRenderer{
private final static int initialRequests = 32 * 32; private final static int initialRequests = 32 * 32;
private final static int expandr = 9; private final static int expandr = 9;
private final static boolean disableShadows = false;
private final static Color shadowColor = new Color(0, 0, 0, 0.19f); private final static Color shadowColor = new Color(0, 0, 0, 0.19f);
public final FloorRenderer floor = new FloorRenderer(); public final FloorRenderer floor = new FloorRenderer();
@@ -100,7 +99,7 @@ public class BlockRenderer{
} }
public void drawShadows(){ public void drawShadows(){
if(disableShadows) return; if(!Core.settings.getBool("shadows")) return;
Draw.color(); Draw.color();

View File

@@ -168,12 +168,12 @@ public class JoinDialog extends FloatingDialog{
server.content.table(t -> { server.content.table(t -> {
t.add(versionString).left(); t.add(versionString).left();
t.row(); t.row();
t.add("[lightgray]" + Core.bundle.format("server.hostname", host.name)).left(); t.add("[lightgray]" + Core.bundle.format("server.hostname", host.name)).width(targetWidth() - 10f).left().get().setEllipsis(true);
t.row(); t.row();
t.add("[lightgray]" + (host.players != 1 ? Core.bundle.format("players", host.players) : t.add("[lightgray]" + (host.players != 1 ? Core.bundle.format("players", host.players) :
Core.bundle.format("players.single", host.players))).left(); Core.bundle.format("players.single", host.players))).left();
t.row(); t.row();
t.add("[lightgray]" + Core.bundle.format("save.map", host.mapname) + " / " + Core.bundle.format("save.wave", host.wave)).left(); t.add("[lightgray]" + Core.bundle.format("save.map", host.mapname) + " / " + Core.bundle.format("save.wave", host.wave)).width(targetWidth() - 10f).left().get().setEllipsis(true);
}).expand().left().bottom().padLeft(12f).padBottom(8); }).expand().left().bottom().padLeft(12f).padBottom(8);
}, e -> { }, e -> {

View File

@@ -198,6 +198,7 @@ public class SettingsMenuDialog extends SettingsDialog{
graphics.checkPref("fps", false); graphics.checkPref("fps", false);
graphics.checkPref("indicators", true); graphics.checkPref("indicators", true);
graphics.checkPref("shadows", true);
graphics.checkPref("animatedwater", !mobile); graphics.checkPref("animatedwater", !mobile);
graphics.checkPref("lasers", true); graphics.checkPref("lasers", true);
} }

View File

@@ -11,7 +11,6 @@ import java.awt.image.BufferedImage
def outFolder = "../core/assets-raw/sprites_out/" def outFolder = "../core/assets-raw/sprites_out/"
def genFolder = "../core/assets-raw/sprites_out/generated/" def genFolder = "../core/assets-raw/sprites_out/generated/"
def packFile = "../core/assets-raw/sprites/pack.json"
def doAntialias = !project.hasProperty("disableAntialias") def doAntialias = !project.hasProperty("disableAntialias")
def antialias = {File file -> def antialias = {File file ->
@@ -201,6 +200,19 @@ task pack(){
} }
TexturePacker.process("core/assets-raw/sprites_out/", "core/assets/sprites/", "sprites.atlas") TexturePacker.process("core/assets-raw/sprites_out/", "core/assets/sprites/", "sprites.atlas")
delete{
delete fileTree(dir: '../core/assets-raw/sprites_out/' , include: '**/pack.json')
}
copy{
from '../core/assets-raw/sprites_out/'
into '../core/assets-raw/sprites_out/'
include '**/*.json'
rename 'pack_fallback.json', "pack.json"
}
TexturePacker.process("core/assets-raw/sprites_out/", "core/assets/sprites/", "sprites_fallback.atlas")
} }
} }