Cleanup
This commit is contained in:
@@ -33,9 +33,6 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
|
||||
@Override
|
||||
public void setup(){
|
||||
//array textures are gl30 only
|
||||
if(gl30 == null) useArrayTextures = false;
|
||||
|
||||
loader = new LoadRenderer();
|
||||
Events.fire(new ClientCreateEvent());
|
||||
|
||||
@@ -70,9 +67,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
|
||||
assets.load(new AssetDescriptor<>("sprites/sprites.atlas", TextureAtlas.class)).loaded = t -> {
|
||||
atlas = (TextureAtlas)t;
|
||||
if(!useArrayTextures){
|
||||
Fonts.mergeFontAtlas(atlas);
|
||||
}
|
||||
Fonts.mergeFontAtlas(atlas);
|
||||
};
|
||||
|
||||
assets.loadRun("maps", Map.class, () -> maps.loadPreviews());
|
||||
|
||||
@@ -38,8 +38,6 @@ public class Vars implements Loadable{
|
||||
public static boolean loadedLogger = false, loadedFileLogger = false;
|
||||
/** Maximum schematic size.*/
|
||||
public static final int maxSchematicSize = 32;
|
||||
/** Whether to use array texture batches. */
|
||||
public static boolean useArrayTextures = false;
|
||||
/** All schematic base64 starts with this string.*/
|
||||
public static final String schematicBaseStart ="bXNjaAB";
|
||||
/** IO buffer size. */
|
||||
|
||||
@@ -237,7 +237,6 @@ public class Renderer implements ApplicationListener{
|
||||
if(settings.getBool("animatedshields")){
|
||||
Draw.drawRange(Layer.shields, 1f, () -> effectBuffer.begin(Color.clear), () -> {
|
||||
effectBuffer.end();
|
||||
|
||||
effectBuffer.blit(Shaders.shield);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,10 +10,9 @@ import arc.math.geom.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.type.*;
|
||||
|
||||
import static mindustry.Vars.renderer;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class Shaders{
|
||||
public static BlockBuild blockbuild;
|
||||
@@ -134,7 +133,7 @@ public class Shaders{
|
||||
|
||||
public static class FogShader extends LoadShader{
|
||||
public FogShader(){
|
||||
super("fog", "default", true);
|
||||
super("fog", "default");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +143,7 @@ public class Shaders{
|
||||
public TextureRegion region;
|
||||
|
||||
public UnitBuild(){
|
||||
super("unitbuild", "default", true);
|
||||
super("unitbuild", "default");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -164,7 +163,7 @@ public class Shaders{
|
||||
public TextureRegion region = new TextureRegion();
|
||||
|
||||
public BlockBuild(){
|
||||
super("blockbuild", "default", true);
|
||||
super("blockbuild", "default");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -227,18 +226,7 @@ public class Shaders{
|
||||
public static class LoadShader extends Shader{
|
||||
|
||||
public LoadShader(String frag, String vert){
|
||||
this(frag, vert, false);
|
||||
}
|
||||
|
||||
public LoadShader(String frag, String vert, boolean preprocess){
|
||||
super(
|
||||
preprocess && Core.gl30 != null && Vars.useArrayTextures ? ArrayTextureSpriteBatch.preprocessShader(
|
||||
Core.files.internal("shaders/" + vert + ".vert").readString(), false) :
|
||||
Core.files.internal("shaders/" + vert + ".vert").readString(),
|
||||
preprocess && Core.gl30 != null && Vars.useArrayTextures ? ArrayTextureSpriteBatch.preprocessShader(
|
||||
Core.files.internal("shaders/" + frag + ".frag").readString(), true) :
|
||||
Core.files.internal("shaders/" + frag + ".frag").readString()
|
||||
);
|
||||
super(Core.files.internal("shaders/" + vert + ".vert").readString(), Core.files.internal("shaders/" + frag + ".frag").readString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,15 +163,17 @@ public class ForceProjector extends Block{
|
||||
if(Core.settings.getBool("animatedshields")){
|
||||
Fill.poly(x, y, 6, radius);
|
||||
|
||||
Draw.z(Layer.shields + 0.1f);
|
||||
Draw.z(Layer.shields + 0.01f);
|
||||
|
||||
Draw.color(Color.white);
|
||||
Draw.alpha(hit);
|
||||
Fill.poly(x, y, 6, radius);
|
||||
Draw.color();
|
||||
if(hit > 0){
|
||||
Draw.color(Color.white);
|
||||
Draw.alpha(1f);
|
||||
Fill.poly(x, y, 6, radius);
|
||||
Draw.color();
|
||||
}
|
||||
}else{
|
||||
Lines.stroke(1.5f);
|
||||
Draw.alpha(0.09f + 0.08f * hit);
|
||||
Draw.alpha(0.09f + Mathf.clamp(0.08f * hit));
|
||||
Fill.poly(x, y, 6, radius);
|
||||
Draw.alpha(1f);
|
||||
Lines.poly(x, y, 6, radius);
|
||||
|
||||
Reference in New Issue
Block a user